@olympeio/runtime-node 9.0.4 → 9.0.5

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,14 +211,14 @@ ea('String.prototype.padStart',function(a){return a?a:function(b,c){var d=ha(thi
211
211
  ea('Array.prototype.flatMap',function(a){return a?a:function(b,c){for(var d=[],e=0;e<this.length;e++){var f=b.call(c,this[e],e,this);Array.isArray(f)?d.push.apply(d,f):d.push(f)}return d}});ea('Object.entries',function(a){return a?a:function(b){var c=[],d;for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&c.push([d,b[d]]);return c}});ea('Object.values',function(a){return a?a:function(b){var c=[],d;for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&c.push(b[d]);return c}});
212
212
  ea('Promise.prototype.finally',function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});
213
213
  ea('Object.fromEntries',function(a){return a?a:function(b){var c={};if(!(Symbol.iterator in b))throw new TypeError(''+b+' is not iterable');b=b[Symbol.iterator].call(b);for(var d=b.next();!d.done;d=b.next()){d=d.value;if(Object(d)!==d)throw new TypeError('iterable for fromEntries should yield objects');c[d[0]]=d[1]}return c}});var ja=this||self;
214
- function z(a,b){a=a.split('.');let c=ja;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={hj:()=>'object'===typeof window?window:'object'===typeof global?global:self};olympe.hj().olympe=olympe;olympe.CC=(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.zf={};olympe.T.zf.no=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]).mj())throw Error('Service "'+b[c]+'" is defined as abstract and needs to be overridden');}};olympe.T.zf.no.la=[olympe.T.zf.sq];olympe.T.zf.oo=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.fj(),h),g=g.Gi,null!==g))for(let k=0,l=g.length;k<l;k++)c(g[k].fj(),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.Y(),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]]=
214
+ function z(a,b){a=a.split('.');let c=ja;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={hj:()=>'object'===typeof window?window:'object'===typeof global?global:self};olympe.hj().olympe=olympe;olympe.CC=(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.zf={};olympe.T.zf.no=class{process(a){const b=Object.keys(a.Ae);let c,d;c=0;for(d=b.length;c<d;c++)if(a.Qd(b[c]).mj())throw Error('Service "'+b[c]+'" is defined as abstract and needs to be overridden');}};olympe.T.zf.no.la=[olympe.T.zf.sq];olympe.T.zf.oo=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.Qd(g),c(g.fj(),h),g=g.Gi,null!==g))for(let k=0,l=g.length;k<l;k++)c(g[k].fj(),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.Y(),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
215
  !0;for(;void 0!==(e=d());)b(e,[])}};olympe.T.zf.oo.la=[olympe.T.zf.sq];olympe.T.zf.sq=class{process(){}};const ka=[],la=[];olympe.T.ro=class{constructor(){}static C(a,b){ka.push(new olympe.T.Al(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');});la.push(new olympe.T.Al(b,c,a))}};olympe.T.config=olympe.T.ro.C;olympe.T.run=olympe.T.ro.F;olympe.T.rl=class{constructor(){}getValue(){}};olympe.T.Al=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]))}}fj(){return this.G}};function ma(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.hf.C.Kh)return null;throw Error('Service "'+b+'" not found');}try{d=e.instantiate(a)}catch(f){throw a.L.error('Error during instantiation of service '+b),f;}!e.F&&(a.C[b]=d)}return d}function na(a,b){const c=b.length,d=Array(c);let e,f;for(e=0;e<c;e++)a.L.C++,f=b[e],d[e]=f instanceof olympe.T.rl?f.getValue(a):f,oa(a.L);return d}
216
216
  olympe.T.hf=class{constructor(a,b,c=2){this.F=a;this.parameters=b;this.C=Object.create(null);this.L=new olympe.T.Pp(c);a=olympe.T.O.dg;if(void 0!==this.C[a])throw Error('Service "'+a+'" has already been instantiated');this.C[a]=this}Xa(){return this.L}getParameter(a){return this.parameters[a.toLowerCase()]}};olympe.T.hf.C={bt:'exception',Kh:'null'};function pa(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 B(a,b,c,...d){qa(a.L,'Defining service '+b);a.C(b,c,d,!1,!1)}function ra(a,b,c,...d){qa(a.L,'Defining service '+b);a.C(b,c,d,!1,!0)}
217
217
  function C(a,b,c,d,e=!1){qa(a.L,'Defining service (as a factory) '+b);a.C(b,d,c,!0,e)}function sa(a,b,c,d=!1){qa(a.L,'Defining service alias '+b);a.C(b,e=>e,[c],!0,d)}function ta(a,b){qa(a.L,'Defining abstract service '+b);a.C(b).Vi=!0}function ua(a,b){a.parameters[olympe.H.Config.jo.toLowerCase()]=b}function E(a,b,c){b=b.toLowerCase();Object.prototype.hasOwnProperty.call(a.parameters,b)||(a.parameters[b]=c)}
218
218
  olympe.T.Ps=class{constructor(a){var b=va,c=wa;this.Ae=Object.create(null);this.parameters=Object.create(null);this.N=[new olympe.T.zf.no,new olympe.T.zf.oo];this.F=[];b&&pa(this,b);c&&pa(this,c,'version');a&&pa(this,a);a=this.getParameter(olympe.T.Config.Yt);this.G=void 0!==a?a:3;this.L=new olympe.T.Pp(this.G)}Xa(){return this.L}C(a,b,c,d,e){const f=a instanceof olympe.T.zb?a.Y():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
- var g=this.Ae[f];g.id=g.id+'!!'+ ++olympe.T.Gl.C;g.F=!0;g=g.id;c[h]=g;this.Ae[g]=this.Ae[f]}}this.Ae[f]=new olympe.T.Gl(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.L.debug('Calling '+a.length+' configure callbacks');this.L.C++;for(let b=0,c=a.length;b<c;b++)qa(this.L,'Calling callback'),this.L.C++,a[b].call(null,this),oa(this.L);oa(this.L);this.L.debug('Configuration summary: '+
219
+ var g=this.Ae[f];g.id=g.id+'!!'+ ++olympe.T.Gl.C;g.F=!0;g=g.id;c[h]=g;this.Ae[g]=this.Ae[f]}}this.Ae[f]=new olympe.T.Gl(b,c,d||!1,f,e||!1);return this.Ae[f]}Qd(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.L.debug('Calling '+a.length+' configure callbacks');this.L.C++;for(let b=0,c=a.length;b<c;b++)qa(this.L,'Calling callback'),this.L.C++,a[b].call(null,this),oa(this.L);oa(this.L);this.L.debug('Configuration summary: '+
220
220
  Object.keys(this.Ae).length+' definitions');this.L.debug('Compiling...');this.L.C++;a=this.N;for(let b=0,c=a.length;b<c;b++)this.L.debug('running compilation pass '+(b+1)+': '+a[b].constructor.name),a[b].process(this);oa(this.L);this.L.debug('Compilation done, returning container');return new olympe.T.hf(this.Ae,this.parameters,this.G)}};olympe.T.Gl=class{constructor(a,b,c,d,e=!0){this.G=a||null;this.N=!!c;this.C=[];this.Vi=!1;this.Gi=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.V=e;this.F=!1}Y(){return this.id}instantiate(a){const b=a.Xa();b.debug('Resolving arguments for '+this.id);const c=this.G;let d=na(a,this.C);const e=()=>{if(this.N)return c.apply(null,d);d.unshift(null);return new (c.bind.apply(c,d))};qa(b,'Instantiating '+this.id);const f=olympe.D?
221
- olympe.D.oh().run(()=>e()):e(),g=this.Gi;let h,k,l;if(null!==g&&0<g.length){b.C++;qa(b,'Calling configuration callbacks:');k=0;for(l=g.length;k<l;k++)b.C++,h=g[k],qa(b,'Calling additional configuration callback '+h.C),d=na(a,h.fj()),d.push(f),h.F.apply(null,d),oa(b);oa(b)}qa(b,'Done instantiating '+this.id);return f}oj(){return this.V}fj(){return this.C}mj(){return this.Vi}config(a,b,c){null===this.Gi&&(this.Gi=[]);this.Gi.push(new olympe.T.Al(b,c,a))}};olympe.T.Gl.C=0;function oa(a){0<a.C&&a.C--}function qa(a,b){1>=a.F&&xa(a,'log','DI: '+b)}function xa(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&&xa(this,'log','DI: '+a)}info(a){3>=this.F&&xa(this,'info','DI: '+a)}warn(a){4>=this.F&&xa(this,'warn','DI: '+a)}error(a){5>=this.F&&xa(this,'error','DI: '+a)}};olympe.T.fa=class extends olympe.T.rl{constructor(a){super();this.id=a}Y(){return this.id}getValue(a){return a.getParameter(this.id)}};olympe.T.zb=class extends olympe.T.rl{constructor(a,b){super();this.id=a;this.C=b||olympe.T.hf.C.bt}Y(){return this.id}getValue(a){return ma(a,this.id,this.C)}};olympe.T.O={dg:'di.Container',uA:'di.PublicContainer'};olympe.T.Config={Yt:'logging.di'};olympe.T.run([olympe.T.O.dg],a=>{olympe.T.getParameter=b=>a.getParameter(b)});olympe.W={};function ya(a){a='0'.repeat(12)+a.toString(16);return a.substring(a.length-12,a.length)}function za(){var a=Math.random();return ya((new Date).getTime())+(a.toString(16)+'0'.repeat(8)).substr(2,8)}let Aa=Math.pow(2,32)-1;olympe.W.lc=function(){return za()};olympe.W.ej=function(){return za()};olympe.W.ln=function(a,b=1){const c=a.substr(12,a.length-12);return ya(parseInt(a.substr(0,12),16)+b)+c};
221
+ olympe.D.oh().run(()=>e()):e(),g=this.Gi;let h,k,l;if(null!==g&&0<g.length){b.C++;qa(b,'Calling configuration callbacks:');k=0;for(l=g.length;k<l;k++)b.C++,h=g[k],qa(b,'Calling additional configuration callback '+h.C),d=na(a,h.fj()),d.push(f),h.F.apply(null,d),oa(b);oa(b)}qa(b,'Done instantiating '+this.id);return f}oj(){return this.V}fj(){return this.C}mj(){return this.Vi}config(a,b,c){null===this.Gi&&(this.Gi=[]);this.Gi.push(new olympe.T.Al(b,c,a))}};olympe.T.Gl.C=0;function oa(a){0<a.C&&a.C--}function qa(a,b){1>=a.F&&xa(a,'log','DI: '+b)}function xa(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&&xa(this,'log','DI: '+a)}info(a){3>=this.F&&xa(this,'info','DI: '+a)}warn(a){4>=this.F&&xa(this,'warn','DI: '+a)}error(a){5>=this.F&&xa(this,'error','DI: '+a)}};olympe.T.fa=class extends olympe.T.rl{constructor(a){super();this.id=a}Y(){return this.id}getValue(a){return a.getParameter(this.id)}};olympe.T.zb=class extends olympe.T.rl{constructor(a,b){super();this.id=a;this.C=b||olympe.T.hf.C.bt}Y(){return this.id}getValue(a){return ma(a,this.id,this.C)}};olympe.T.O={dg:'di.Container',uA:'di.PublicContainer'};olympe.T.Config={Yt:'logging.di'};olympe.T.run([olympe.T.O.dg],a=>{olympe.T.getParameter=b=>a.getParameter(b)});olympe.W={};function ya(a){a='0'.repeat(12)+a.toString(16);return a.substring(a.length-12,a.length)}function za(){var a=Math.random();return ya((new Date).getTime())+(a.toString(16)+'0'.repeat(8)).substr(2,8)}let Aa=Math.pow(2,32)-1;olympe.W.mc=function(){return za()};olympe.W.ej=function(){return za()};olympe.W.ln=function(a,b=1){const c=a.substr(12,a.length-12);return ya(parseInt(a.substr(0,12),16)+b)+c};
222
222
  olympe.W.Vw=function(a){return ya(parseInt(a.substr(0,12),16)+1)+(Math.random().toString(16)+'00000000').substr(2,8)};let Ba=0,Ca=0;olympe.W.fw=function(){var a=(new Date).getTime();a<=Ba?4294967295===Ca?(Ca=Math.floor(Math.random()/4*Aa),Ba+=1):Ca=Math.floor(Ca+(4294967295-Ca)/2):(Ca=Math.floor(Math.random()/4*Aa),Ba=a);a='00000000'+Ca.toString(16);return ya(Ba)+a.substr(a.length-8,8)};olympe.W.bD=function(){for(let a=0;1E4>a;a++)console.log(olympe.W.fw())};
223
223
  olympe.W.Ag=function(){let a='';for(let b=0;19>b;b++)a+='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'.charAt(Math.floor(62*Math.random()));return'@'+a};olympe.W.HC=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.EC=function(a,b){return(b?b:'UI')+'-'+a};olympe.W.Bp=class{constructor(a){this.id=a||olympe.W.Bp.C++}qb(a){return a?this.id===a.id:!1}toJSON(){return this.id.toString()}toString(){return this.id.toString()}};olympe.W.Bp.C=0;olympe.W.gA=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.Ih=function(a,b,c,d,e,f,g,h,k,l,n,p,q){this.values=[a,b,c,0,0,d,e,f,0,0,g,h,k,0,0,l,n,p,q,0]};olympe.W.Ih.F=function(a){return new olympe.W.Ih(.213+.787*a,.715-.715*a,.072-.072*a,.213-.213*a,.715+.285*a,.072-.072*a,.213-.213*a,.715-.715*a,.072+.928*a,0,0,0,1)};olympe.W.Ih.C=function(){return new olympe.W.Ih(0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0)};olympe.W.Ih.prototype.set=function(a,b,c){this.values[5*a+b]=c};olympe.W.Ih.prototype.get=function(a,b){return this.values[5*a+b]};function Da(a){return(new TextEncoder).encode(a).buffer}function Ea(a){return(new TextDecoder('utf8')).decode(a)}olympe.W.vl=class{V(){}C(){}G(){}N(){}F(){}Z(){}};olympe.W.Cr=a=>a.replace('+','-').replace('/','_');olympe.W.Cv=a=>a.replace('-','+').replace('_','/');function Fa(a){a.F=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?Fa(a):a.C&&a.C()},a.N)}function Ga(a,b){a.G=b;return a}
224
224
  olympe.W.fr=class{constructor(a,b=a/2){this.timeout=a;this.N=b;this.values=new Map;this.C=this.G=this.F=null}add(a){this.values.set(a,Date.now());null===this.F&&Fa(this)}has(a){return this.values.has(a)}delete(a){a=this.values.delete(a);0===this.values.size&&(this.F&&clearTimeout(this.F),this.C&&this.C());return a}};olympe.W.er=class{constructor(a){this.F=Ga(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)}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)}};function Ha(a,b){return a+b&4294967295}
@@ -236,13 +236,13 @@ olympe.pa.Ob.C={Zu:0,eg:1,Xt:2,xp:3,gv:4,qc:5,et:6,cm:7};olympe.pa.Ob.F={0:'TRAC
236
236
  olympe.pa.sd.Ob=class{constructor(a,b,c){this.name=a;this.C=b;this.ab=c;this.F=a.toUpperCase();this.qd=new Map;this.Sa=console}N(){return this.C}ra(){return this.C<=olympe.pa.Ob.C.Zu}G(){return this.C<=olympe.pa.Ob.C.eg}ka(){return this.C<=olympe.pa.Ob.C.Xt}aa(){return this.C<=olympe.pa.Ob.C.xp}Da(){return this.C<=olympe.pa.Ob.C.gv}V(){return this.C<=olympe.pa.Ob.C.qc}Z(){return this.C<=olympe.pa.Ob.C.et}trace(...a){this.ra()&&Ma(this,'log',this.F,a,'#99b','trace')}debug(...a){this.G()&&Ma(this,'log',
237
237
  this.F,a,'#888','debug')}log(...a){this.ka()&&Ma(this,'log',this.F,a,'#000','log')}info(...a){this.aa()&&Ma(this,'info',this.F,a,'#00f','info')}warn(...a){this.Da()&&Ma(this,'warn',this.F,a,'#684911','warn')}error(...a){this.V()&&Ma(this,'error',this.F,a,'#f00','error')}fatal(...a){this.Z()&&Ma(this,'error',this.F,a,'#f00','fatal')}};olympe.pa.sd.Ob.la=[olympe.pa.Ob];olympe.pa.sd.sa=class{constructor(a,b,c){this.C=a;this.F=parseInt(b,10);this.G=c;this.channels=new Map;this.L=this.Nc('logging');this.L.info('Logging initialized, global log level is '+olympe.pa.Ob.F[b])}Nc(a){var b=this.channels.get(a);if(!b){b=this.F;var c=`${olympe.pa.Config.Hs}.${a}`;Object.prototype.hasOwnProperty.call(this.C.parameters,c.toLowerCase())&&(b=parseInt(this.C.getParameter(c),10));let d=this.G;c=`${c}.${olympe.pa.Config.Nu}`;Object.prototype.hasOwnProperty.call(this.C.parameters,
238
238
  c.toLowerCase())&&(d=!0===this.C.getParameter(c));b=new olympe.pa.sd.Ob(a,b,d);this.channels.set(a,b)}return b}};olympe.pa.sd.sa.la=[olympe.pa.sa];olympe.pa.O={va:'logging.Manager'};olympe.pa.Config={Yo:'logging',Zo:'logging.showLogLevel',Hs:'logging',Nu:'showLogLevel'};olympe.T.config(function(a){E(a,olympe.pa.Config.Yo,olympe.pa.Ob.C.xp);E(a,olympe.pa.Config.Zo,!0);ra(a,olympe.pa.O.va,olympe.pa.sd.sa,olympe.T.O.dg,new olympe.T.fa(olympe.pa.Config.Yo),new olympe.T.fa(olympe.pa.Config.Zo))},'olympe.logging');olympe.T.run([olympe.pa.O.va],a=>{olympe.pa.Xa=b=>a.Nc(b)},'Logging singleton getter initialization');olympe.D={};olympe.D.Config={Vp:'df.nodeCreationThreshold'};const Na=[];function Oa(){}function Pa(){}olympe.D.J=class a{constructor(b,c,d){this.C=void 0===b?Oa:b;this.F=void 0===c?Na:c;this.aa=d}static N(){var b=[];return void 0===b||0===b.length?olympe.D.J.ka:new a(Pa,b)}N(){return this.C?this.C():void 0}G(){return this.F?this.F:Na}V(){return null===this.C&&null===this.F}Z(){return this.C===Pa}};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(Pa);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.V=new olympe.D.J(()=>olympe.D.qa);olympe.D.J.Z=new olympe.D.J(()=>olympe.D.jc);olympe.D.Ch=class{Y(){return''}Uk(){return''}destroy(){}yb(){return!1}gd(){return!1}run(a,...b){return a(...b)}Cb(a){return a}getParent(){return null}ns(){}lh(){}Ge(){}detach(){}Ok(){}Af(){}onDestroy(){return''}Je(){}vc(){return''}Bn(){}};olympe.D.Ch.prototype.offDestroy=olympe.D.Ch.prototype.Je;olympe.D.Ch.prototype.onDestroy=olympe.D.Ch.prototype.onDestroy;let Qa=0;olympe.T.run([new olympe.T.fa(olympe.D.Config.Vp)],()=>{});
240
- olympe.D.Wb=class{constructor(a='SimpleContext',b){++Qa;this.children=new Map;this.aa=new Map;this.Z=new Map;this.Sa=0;this.name=a;this.id=String(Qa);this.Da=this.ka=!1;(this.parent=void 0===b?olympe.D.Ia():b)&&this.parent.Ge(this);this.debug=!1}Y(){return this.id}Uk(){return this.name}run(a,...b){if(!this.ka){var c=olympe.D.ms(this);a=a(...b);c&&olympe.D.ms(c);return a}}Cb(a){return(...b)=>this.run(a,...b)}destroy(){if(!this.ka&&!this.Da){this.Da=!0;this.Af();for(const a of this.aa.keys())this.aa.has(a)&&
239
+ olympe.D.J.F=new olympe.D.J(()=>olympe.D.Wa);olympe.D.J.V=new olympe.D.J(()=>olympe.D.qa);olympe.D.J.Z=new olympe.D.J(()=>olympe.D.kc);olympe.D.Ch=class{Y(){return''}Uk(){return''}destroy(){}yb(){return!1}gd(){return!1}run(a,...b){return a(...b)}Cb(a){return a}getParent(){return null}ns(){}lh(){}Ge(){}detach(){}Ok(){}Af(){}onDestroy(){return''}Je(){}vc(){return''}Bn(){}};olympe.D.Ch.prototype.offDestroy=olympe.D.Ch.prototype.Je;olympe.D.Ch.prototype.onDestroy=olympe.D.Ch.prototype.onDestroy;let Qa=0;olympe.T.run([new olympe.T.fa(olympe.D.Config.Vp)],()=>{});
240
+ olympe.D.Wb=class{constructor(a='SimpleContext',b){++Qa;this.children=new Map;this.aa=new Map;this.Z=new Map;this.Sa=0;this.name=a;this.id=String(Qa);this.Da=this.ka=!1;(this.parent=void 0===b?olympe.D.Ja():b)&&this.parent.Ge(this);this.debug=!1}Y(){return this.id}Uk(){return this.name}run(a,...b){if(!this.ka){var c=olympe.D.ms(this);a=a(...b);c&&olympe.D.ms(c);return a}}Cb(a){return(...b)=>this.run(a,...b)}destroy(){if(!this.ka&&!this.Da){this.Da=!0;this.Af();for(const a of this.aa.keys())this.aa.has(a)&&
241
241
  this.aa.get(a)();this.aa.clear();this.Z.clear();this.parent&&(this.parent.detach(this,!1),this.parent=null);this.ka=!0;this.Da=!1;this.Af()}}yb(){return this.ka}gd(){return this.Da}Ge(a){if(!this.ka){var b;olympe.D.lb(a)?b=a.Ma:olympe.D.un(a)&&(b=a);b&&this.children.set(b.Y(),b)}}detach(a,b=!0){let c;olympe.D.lb(a)?c=a.Ma:olympe.D.un(a)&&(c=a);c&&this.children.has(c.Y())&&(b&&c.Ok(this),this.children.delete(c.Y()))}Ok(){this.parent=null;this.destroy()}Af(){const a=this.children;for(const b of a.keys())a.has(b)&&
242
242
  a.get(b).Ok(this);this.children.clear();for(const b of this.Z.keys())this.Z.has(b)&&this.Z.get(b)();this.Z.clear()}onDestroy(a,b){void 0===b&&(++this.Sa,b=String(this.Sa));this.aa.set(b,a);return b}Je(a){this.aa.delete(a)}vc(a){if(void 0===b){++this.Sa;var b=String(this.Sa)}this.Z.set(b,a);return b}Bn(a){this.Z.delete(a)}ns(a){this.parent&&this.parent.detach(this,!1);(this.parent=a||null)&&this.parent.Ge(this)}getParent(){return this.parent}lh(){return this.children}};
243
243
  olympe.D.Iq=class extends olympe.D.Wb{constructor(){super('Root',null)}destroy(){}onDestroy(){return''}Je(){}};olympe.D.Ch.la=[olympe.D.Ch];let Ra=0;
244
- function Sa(a,b){a.N||(a.N=new Map);a.N.set(b.Y(),b);switch(b.Rd()){case olympe.D.Node.C.Jh:break;case olympe.D.Node.C.Uh:break;case olympe.D.Node.C.jk:case olympe.D.Node.C.gg:olympe.D.L.warn('Not bad as such but should not happen!');break;case olympe.D.Node.C.Dh:Ta(a,olympe.D.Node.C.Dh);break;case olympe.D.Node.C.OBSOLETE:a.bb=!0;a.C!==olympe.D.Node.C.Dh&&Ta(a,olympe.D.Node.C.OBSOLETE);break;case olympe.D.Node.C.fg:olympe.D.L.warn('Adding a destroyed node as upstream => should never happen!');break;
245
- default:olympe.D.L.warn('Unknown state, investigate: ',b.Rd())}Ua(b,a)}
244
+ function Sa(a,b){a.N||(a.N=new Map);a.N.set(b.Y(),b);switch(b.Sd()){case olympe.D.Node.C.Jh:break;case olympe.D.Node.C.Uh:break;case olympe.D.Node.C.jk:case olympe.D.Node.C.gg:olympe.D.L.warn('Not bad as such but should not happen!');break;case olympe.D.Node.C.Dh:Ta(a,olympe.D.Node.C.Dh);break;case olympe.D.Node.C.OBSOLETE:a.bb=!0;a.C!==olympe.D.Node.C.Dh&&Ta(a,olympe.D.Node.C.OBSOLETE);break;case olympe.D.Node.C.fg:olympe.D.L.warn('Adding a destroyed node as upstream => should never happen!');break;
245
+ default:olympe.D.L.warn('Unknown state, investigate: ',b.Sd())}Ua(b,a)}
246
246
  function Va(a){if(a.Bd){var b=[],c=[];if(a.Yf)if(a.Yf instanceof olympe.D.Node)if(Wa(a.Yf))b=a.Yf.Ib;else return;else b=a.Yf;else b=null;if(null!==a.V){const e=a.wg;for(let f=0,g=a.V.length;f<g;f++)if(null!==e&&-1<e.indexOf(f)){const h=a.V[f];if(Wa(h))c.push(h.Ib);else return}else c.push(a.V[f])}if(a.Bd instanceof Function)var d=a.Bd;else b&&(b[a.Bd]||olympe.D.L.warn('looks like you forget a cast somewhere around '+a.Bd),d=b[a.Bd]);a.run(()=>{a.Af();if(void 0!==d){const e=d.apply(b,c);e&&e.wr?Xa(a,
247
247
  e.Ma):e instanceof olympe.D.Node?Xa(a,e):(K(a,e),void 0===e&&void 0===a.valueType&&Ta(a,olympe.D.Node.C.Uh))}else Ya(a)})}}function L(a){void 0===a.ab&&(a.ab=a.valueType===olympe.D.Proxy?Za(void 0,a.Ab):Za(a.valueType,a.Ab),a.ab.Ma=a);return a.ab}function $a(a){void 0!==a.F&&(ab(a.F,a),a.F=void 0)}function bb(a){if(a.C===olympe.D.Node.C.OBSOLETE&&(a.C=olympe.D.Node.C.Uh,null!==a.G))for(const b of a.G.values())cb(b)}function Ta(a,b){b!==a.C&&(a.C=b)}
248
248
  function db(a){if(a.C!==olympe.D.Node.C.OBSOLETE&&a.C!==olympe.D.Node.C.jk&&a.C!==olympe.D.Node.C.Jh&&a.C!==olympe.D.Node.C.Dh){Ta(a,olympe.D.Node.C.jk);var b=a.G;if(b)for(const c of b.values())b.has(c.Y())&&db(c);Ta(a,olympe.D.Node.C.OBSOLETE)}}function eb(a,b,c){if(a.C!==olympe.D.Node.C.gg)if(b===a.F)K(a,c,!0);else{if(a.C===olympe.D.Node.C.OBSOLETE||a.C===olympe.D.Node.C.jk)a.bb=!0;Va(a)}}
@@ -253,18 +253,18 @@ function fb(a,b){if(a.C!==olympe.D.Node.C.gg&&a.C!==olympe.D.Node.C.fg&&(a.C!==o
253
253
  function Xa(a,b){b===a?olympe.D.L.error('Setting a node as provider of itself. Ignoring'):(a.F&&a.F!==b&&$a(a),Ua(b,a),Wa(b)?K(a,b.Ib,!0):void 0!==a.defaultValue?K(a,a.defaultValue,!0):fb(a),a.F=b)}function gb(a,b){a.Bd&&(a.Bd=void 0);a.zd='Repeater';Xa(a,b)}function cb(a){a.F?bb(a):null!==a.N&&0===Array.from(a.N.values()).filter(b=>!Wa(b)).length&&(a.bb&&(a.bb=!1,Va(a)),bb(a))}
254
254
  function Ua(a,b){a.G||(a.G=new Map);a.G.set(b.Y(),b);a.C===olympe.D.Node.C.fg&&olympe.D.L.warn('adding a downstream node on a deleted one (#'+a.Y()+') !')}function ab(a,b){a.G&&(b=b.Y(),a.G.has(b)&&(a.G.delete(b),hb(a)))}function hb(a){if(null===a.getParent()){var b=a.G;b&&0<b.size||a.destroy()}}
255
255
  olympe.D.Node=class extends olympe.D.Wb{constructor({valueType:a,Bd:b,ay:c=!0,Yf:d,pn:e,debug:f=!1,wg:g=null,zd:h='Node',Wi:k}={}){++Ra;super(String(Ra));this.debug=!!f;this.zd=h;h&&'string'===typeof h||(b?this.zd=b.name?b.name:'anon()':this.zd='Node');this.V=e&&0<e.length?e:null;this.wg=g&&0<g.length?g:null;this.valueType=a;this.Ib=void 0;this.ra=!1;this.C=olympe.D.Node.C.Jh;this.bb=!1;this.G=this.N=null;this.Bd=b;this.Yf=d||null;this.defaultValue=this.ab=this.F=void 0;this.Wi=k;d&&d instanceof olympe.D.Node&&
256
- Sa(this,d);if(g)for(b=0;b<g.length;b++)a=e[g[b]],Sa(this,a);c&&Va(this)}df(a){this.defaultValue=a;this.C===olympe.D.Node.C.Jh&&K(this,a,!0);return this}Zi(a){this.valueType=a}Yb(){return this.valueType||Object}Rd(){return this.C}yb(){return this.C===olympe.D.Node.C.fg}gd(){return this.C===olympe.D.Node.C.gg}Ab(...a){if(this.Wi instanceof Function)return this.Wi(...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.gg&&a!==olympe.D.Node.C.fg||
256
+ Sa(this,d);if(g)for(b=0;b<g.length;b++)a=e[g[b]],Sa(this,a);c&&Va(this)}df(a){this.defaultValue=a;this.C===olympe.D.Node.C.Jh&&K(this,a,!0);return this}Zi(a){this.valueType=a}Yb(){return this.valueType||Object}Sd(){return this.C}yb(){return this.C===olympe.D.Node.C.fg}gd(){return this.C===olympe.D.Node.C.gg}Ab(...a){if(this.Wi instanceof Function)return this.Wi(...a);var b=a.length;--b;const c=a[b];--b;const d=a[b],e=Array(b);for(var f=0;f<b;f++)e[f]=a[f];a=this.Sd();a!==olympe.D.Node.C.gg&&a!==olympe.D.Node.C.fg||
257
257
  olympe.D.L.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.Ma);else for(let h=0,k=a.length;h<k;h++)g=a[h],f=e[g],void 0!==f&&null!==f&&f.xf&&(e[g]=f.Ma,b.push(g));return L(new olympe.D.Node({valueType:d.N(),Bd:c,Yf:this,pn:e,debug:!1,wg:b,zd:'Proxy.'+c+'()'}))}Ok(a){if(null===this.getParent())olympe.D.L.warn('context is undefined, investigate');else if(this.getParent()!==a){olympe.D.L.warn('Investigate a potential issue in creator-createe link: create node mismatch',
258
258
  a,this.getParent());return}this.ns(null);hb(this)}destroy(){var a=this.C;if(a!==olympe.D.Node.C.gg&&a!==olympe.D.Node.C.fg){Ta(this,olympe.D.Node.C.gg);if(a=this.G){for(const c of a.values())if(a.has(c.Y())){var b=c;b.N&&b.N.delete(this.Y());b.F&&b.F.Y()===this.Y()?b.F=void 0:b.destroy()}a.clear()}this.G=null;super.destroy();if(this.N){for(const c of this.N.values())this.N.has(c.Y())&&ab(c,this);this.N.clear()}this.N=null;this.F&&(ab(this.F,this),this.F=void 0);this.Ib=void 0;this.V&&(this.V.length=
259
259
  0,this.V=null);this.wg&&(this.wg.length=0,this.wg=null);this.Wi=this.Bd=void 0;this.defaultValue=this.Yf=null;this.zd=`** Destroyed ** ${this.zd}`;Ta(this,olympe.D.Node.C.fg)}}Uk(){return this.zd}};olympe.D.Node.F='rootNode';olympe.D.Node.C={Jh:0,Uh:1,Dh:3,jk:4,OBSOLETE:5,gg:6,fg:7};function Za(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.L.error('investigate');c=Object.create(ib(c,a.prototype));c.Hk=a;c.xr=b;return c}function ib(a,b){Object.prototype.hasOwnProperty.call(b,olympe.D.Proxy.nm)||Object.defineProperty(b,olympe.D.Proxy.nm,{enumerable:!1,configurable:!1,writable:!1,value:jb(a,b)});return b[olympe.D.Proxy.nm]}
260
260
  function kb(a,b){if(a.Hk!==b){a.Hk=b;b.prototype||olympe.D.L.error('Cast not possible, provided type is not a valid type!');var c=ib(a,b.prototype);Object.setPrototypeOf?Object.setPrototypeOf(a,c):a.__proto__=c;a.Ma&&a.Ma.Zi(b)}}
261
261
  function jb(a,b){let c={};if(b.prototype)olympe.D.L.error('first level of prototyping, investigate');else if(b.__proto__)c=Object.create(ib(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.V()?c[d]=function(...f){var g=this.Ma;if(g&&Wa(g)&&(g=g.Ib)&&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.Ma,
262
262
  ...f,e,d);const g=e.aa;if(g){const h=this.Ma.Ib;h&&h[g]&&kb(f,h[g])}return e.Z()?this:f})}});return c}function lb(a,b){K(a.Ma,b)}function mb(a){fb(a.Ma)}function nb(a){olympe.D.wc([olympe.D.qa.C],b=>{a.Ma.df(b)},'setDefaultValue');return a}function ob(a,b){gb(a.Ma,olympe.D.Tf(b)?b:b.Ma)}function pb(a,b){olympe.D.lb(b)||olympe.D.Tf(b)?ob(a,b):lb(a,b)}
263
- olympe.D.Proxy=class{constructor(a,b){this.Ma=null;this.Hk=a;this.xr=b}static lb(a){return!(!a||!a.xf)}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.Ma}};olympe.D.Proxy.nm='__opp__';olympe.D.Proxy.prototype.xf=!0;function qb(a,b){a.node.df(b);return a}olympe.D.Vj=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.Ya(a)):K(this.node,a);return this}repeat(a){gb(this.node,olympe.D.lb(a)?a.Ma:a);return this}clear(){fb(this.node);return this}Eb(){return L(this.node)}};function rb(a,b,c=1E3,d,e){const f=olympe.D.Kc(olympe.D.ea),g=d||olympe.D.ea.Eo.Lp;let h,k,l,n;f.update(olympe.D.ya(a));const p=window.performance.now(),q=b.valueOf();l=q-a.valueOf();if(0!==l&&void 0===n){const r=()=>{f.node.yb()||(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.ya(h)),1===k&&void 0!==e&&e(h),1>k&&(n=window.requestAnimationFrame(r)))};n=window.requestAnimationFrame(r)}return f.Eb()}
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 kc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return olympe.D.ya(b.value)}Kn(){return'number'===typeof this.value&&!isNaN(this.value)}isNaN(){return olympe.D.Ac(!this.Kn())}hd(){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!==
263
+ olympe.D.Proxy=class{constructor(a,b){this.Ma=null;this.Hk=a;this.xr=b}static lb(a){return!(!a||!a.xf)}qb(a){return olympe.D.Fa([this,a],(b,c)=>b===c,Boolean)}Ud(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.Ma}};olympe.D.Proxy.nm='__opp__';olympe.D.Proxy.prototype.xf=!0;function qb(a,b){a.node.df(b);return a}olympe.D.Vj=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.Ya(a)):K(this.node,a);return this}repeat(a){gb(this.node,olympe.D.lb(a)?a.Ma:a);return this}clear(){fb(this.node);return this}Eb(){return L(this.node)}};function rb(a,b,c=1E3,d,e){const f=olympe.D.Kc(olympe.D.ea),g=d||olympe.D.ea.Eo.Lp;let h,k,l,n;f.update(olympe.D.ya(a));const p=window.performance.now(),q=b.valueOf();l=q-a.valueOf();if(0!==l&&void 0===n){const r=()=>{f.node.yb()||(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.ya(h)),1===k&&void 0!==e&&e(h),1>k&&(n=window.requestAnimationFrame(r)))};n=window.requestAnimationFrame(r)}return f.Eb()}
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 lc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return olympe.D.ya(b.value)}Kn(){return'number'===typeof this.value&&!isNaN(this.value)}isNaN(){return olympe.D.Ac(!this.Kn())}hd(){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.Kn()?this.valueOf().toFixed(a):''}static max(a){const b=new Map;let c=-Infinity;const d=olympe.D.Kc(olympe.D.ea,'ONumber.max result'),e=()=>{c=-Infinity;for(const f of b.values())f>c&&(c=f);d.update(olympe.D.ya(c))};a.forEach((f,g)=>{olympe.D.wc([f],h=>{b.set(g,h.valueOf());e()})},f=>{if(!d.node.yb()){var g=b.get(f);b.delete(f);g===c&&
266
266
  e()}});return d.Eb()}he(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.ya(b.valueOf()+c.valueOf()),olympe.D.ea,'ONumber.plus')}xh(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.ya(b.valueOf()-c.valueOf()),olympe.D.ea,'ONumber.minus')}round(){return olympe.D.ya(Math.round(this.valueOf()))}Bj(){return olympe.D.ya(-this.valueOf())}cl(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.ya(b.valueOf()*c.valueOf()),olympe.D.ea,'ONumber.mul')}$i(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.ya(b.valueOf()/c.valueOf()),
267
- olympe.D.ea,'ONumber.div')}Bx(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.ya(b.valueOf()%c.valueOf()),olympe.D.ea,'ONumber.div')}floor(){return olympe.D.ya(Math.floor(this.valueOf()))}ceil(){return olympe.D.ya(Math.ceil(this.valueOf()))}trunc(){return olympe.D.ya(Math.trunc(this.valueOf()))}log(){return olympe.D.ya(Math.log(this.valueOf()))}pow(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.ya(Math.pow(b.valueOf(),c.valueOf())),olympe.D.ea,'ONumber.pow')}exp(){return olympe.D.ya(Math.exp(this.valueOf()))}Td(a){return olympe.D.Fa([this,
267
+ olympe.D.ea,'ONumber.div')}Bx(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.ya(b.valueOf()%c.valueOf()),olympe.D.ea,'ONumber.div')}floor(){return olympe.D.ya(Math.floor(this.valueOf()))}ceil(){return olympe.D.ya(Math.ceil(this.valueOf()))}trunc(){return olympe.D.ya(Math.trunc(this.valueOf()))}log(){return olympe.D.ya(Math.log(this.valueOf()))}pow(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.ya(Math.pow(b.valueOf(),c.valueOf())),olympe.D.ea,'ONumber.pow')}exp(){return olympe.D.ya(Math.exp(this.valueOf()))}Ud(a){return olympe.D.Fa([this,
268
268
  a],(b,c)=>olympe.D.Ac(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}Mw(){return this.valueOf()}sn(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')}dy(a){return olympe.D.Fa([this,a],(b,c)=>b.valueOf()>=c.valueOf()?b:olympe.D.ya(c),olympe.D.ea,'ONumber.returnsBiggest')}ks(a){return olympe.D.Fa([this,
269
269
  a],(b,c)=>b.valueOf()<=c.valueOf()?b:olympe.D.ya(c),olympe.D.ea,'ONumber.returnsSmallest')}sx(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.ya(Math.sin(this.valueOf()))}cos(){return olympe.D.ya(Math.cos(this.valueOf()))}atan2(a){return olympe.D.lb(a)?olympe.D.ie([a],b=>olympe.D.ya(Math.atan2(this.valueOf(),b.valueOf())),olympe.D.ea):olympe.D.ya(Math.atan2(this.valueOf(),a.valueOf()))}abs(){return olympe.D.ya(Math.abs(this.valueOf()))}qj(a,
270
270
  b){return olympe.D.lb(a)||olympe.D.lb(b)?olympe.D.ie([a,b],(c,d)=>olympe.D.ya(this.valueOf()*d.valueOf()+c.valueOf()*(1-d.valueOf())),olympe.D.ea):olympe.D.ya(this.valueOf()*b.valueOf()+a.valueOf()*(1-b.valueOf()))}static jv(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.nn(b.sn(c),()=>{olympe.pa.Xa('df').warn('You have a min bigger than max, cap your inputs')});
@@ -282,80 +282,80 @@ yz: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
282
282
  c*(2*d*d+2*d*a+-3*d)},lz:function(a,b,c,d){d=(a/=d)*a;return b+c*(4*d*a+-9*d+6*a)},mz:function(a,b,c,d){d=(a/=d)*a;return b+c*(-2*d*d+10*d*a+-15*d+8*a)},Jz: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)},Iz: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)},rz:function(a,b,c,d){d=(a/=d)*a;a*=d;return b+c*(33*a*d+-59*d*d+32*a+-5*d)},qz:function(a,b,c,d){d=(a/=d)*a;a*=d;return b+c*(56*a*d+-105*d*d+60*a+-10*d)},Fz:function(a,
283
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},nz: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.Kn.K=olympe.D.J.C;m.isNaN.K=olympe.D.J.V;m.hd.K=olympe.D.J.F;
284
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.xh.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.round.K=olympe.D.J.G;m.Bj.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.Bx.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.Mw.K=olympe.D.J.C;m.sn.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.dy.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.ks.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.sx.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 kc(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')}hd(){return this}yy(a){return olympe.D.ya(parseInt(this.value,
286
- a))}ts(){return olympe.D.ya(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.Ac(c&&b.valueOf()===c.valueOf()),olympe.D.qa,'OString.oEquals')}Rf(){return olympe.D.Ac(!this.value||0===this.value.length)}contains(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.Ac((c instanceof olympe.D.Wa||'string'===typeof c)&&b.valueOf().includes(c.valueOf())),
285
+ m.Ud.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.qb.K=olympe.D.J.C;m.valueOf.K=olympe.D.J.C;m.Mw.K=olympe.D.J.C;m.sn.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.dy.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.ks.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.sx.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 lc(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')}hd(){return this}yy(a){return olympe.D.ya(parseInt(this.value,
286
+ a))}ts(){return olympe.D.ya(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())}Ud(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.Ac(c&&b.valueOf()===c.valueOf()),olympe.D.qa,'OString.oEquals')}Rf(){return olympe.D.Ac(!this.value||0===this.value.length)}contains(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.Ac((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.Ac(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.Cg().valueOf()+e.valueOf()+1;return olympe.D.Ac(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.ya(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.ya(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')}Cg(){return olympe.D.ya(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
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')}vy(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.Ou=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.hd.K=olympe.D.J.F;m.yy.K=olympe.D.J.G;m.ts.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.Rf.K=olympe.D.J.V;
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.Ou=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.hd.K=olympe.D.J.F;m.yy.K=olympe.D.J.G;m.ts.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.Ud.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.Rf.K=olympe.D.J.V;
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.Cg.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.vy.K=olympe.D.J.F;olympe.D.qa=class{constructor(a){this.value=a}toJSON(){return`{ "type": "boolean", "value": ${this.value.valueOf()}}`}static kc(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)?
292
+ m.replace.K=olympe.D.J.F;m.vy.K=olympe.D.J.F;olympe.D.qa=class{constructor(a){this.value=a}toJSON(){return`{ "type": "boolean", "value": ${this.value.valueOf()}}`}static lc(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)}Ud(a){if(void 0!==a)return olympe.D.lb(a)?
293
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}vv(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
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.Ac(b&&!c||!b&&c)},olympe.D.qa,'OBoolean.xor')}hw(){return this.value}Tr(){return!0===this.value?olympe.D.ea.ONE:olympe.D.ea.ZERO}hd(){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.V;m.vv.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.hw.K=new olympe.D.J(()=>Boolean,[]);m.Tr.K=olympe.D.J.G;m.hd.K=olympe.D.J.F;m.toString.K=olympe.D.J.C;m.valueOf.K=olympe.D.J.C;function sb(a){return new olympe.D.jb(new Date(a))}
296
- olympe.D.jb=class{constructor(a){this.xb=a}toJSON(){return'{ "type": "dateTime", "value": "'+this.xb.toJSON()+'" }'}static kc(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)}pj(){return this.xb&&!isNaN(this.xb.getTime())?olympe.D.qa.F:olympe.D.qa.C}Ct(){return olympe.D.ya(this.xb.getMilliseconds())}Et(){return olympe.D.ya(this.xb.getSeconds())}Dt(){return olympe.D.ya(this.xb.getMinutes())}Bt(){return olympe.D.ya(this.xb.getHours())}qw(){return olympe.D.ya(this.xb.getDate())}getMonth(){return olympe.D.ya(this.xb.getMonth()+1)}Ft(){return olympe.D.ya(this.xb.getFullYear())}getTime(){return this.xb.getTime()}sy(){var a=
295
+ m.and.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.qb.K=olympe.D.J.C;m.Ud.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.not.K=olympe.D.J.V;m.vv.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.hw.K=new olympe.D.J(()=>Boolean,[]);m.Tr.K=olympe.D.J.G;m.hd.K=olympe.D.J.F;m.toString.K=olympe.D.J.C;m.valueOf.K=olympe.D.J.C;function sb(a){return new olympe.D.jb(new Date(a))}
296
+ olympe.D.jb=class{constructor(a){this.xb=a}toJSON(){return'{ "type": "dateTime", "value": "'+this.xb.toJSON()+'" }'}static lc(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)}pj(){return this.xb&&!isNaN(this.xb.getTime())?olympe.D.qa.F:olympe.D.qa.C}Ct(){return olympe.D.ya(this.xb.getMilliseconds())}Et(){return olympe.D.ya(this.xb.getSeconds())}Dt(){return olympe.D.ya(this.xb.getMinutes())}Bt(){return olympe.D.ya(this.xb.getHours())}qw(){return olympe.D.ya(this.xb.getDate())}getMonth(){return olympe.D.ya(this.xb.getMonth()+1)}Ft(){return olympe.D.ya(this.xb.getFullYear())}getTime(){return this.xb.getTime()}sy(){var a=
297
297
  olympe.D,b=a.Bb;var c=this.xb.getDate();c=10>c?'0'+c:c;var d=this.xb.getMonth()+1;return b.call(a,`${c}.${10>d?'0'+d:d}.${this.xb.getFullYear()}`)}toLocaleString(a){return void 0===a||'string'===typeof a?olympe.D.Bb(this.xb.toLocaleString(a)):olympe.D.Fa([this,a],(b,c)=>olympe.D.Bb(b.xb.toLocaleString(c.valueOf())),olympe.D.Wa)}toLocaleDateString(a){return void 0===a||'string'===typeof a?olympe.D.Bb(this.xb.toLocaleDateString(a)):olympe.D.Fa([this,a],(b,c)=>olympe.D.Bb(b.xb.toLocaleDateString(c.valueOf())),
298
298
  olympe.D.Wa)}toLocaleTimeString(a){return void 0===a||'string'===typeof a?olympe.D.Bb(this.xb.toLocaleTimeString(a)):olympe.D.Fa([this,a],(b,c)=>olympe.D.Bb(b.xb.toLocaleTimeString(c.valueOf())),olympe.D.Wa)}hd(){return olympe.D.Bb(this.xb.toISOString())}ss(){return new Date(this.getTime())}xy(){return this}zy(){return this}ng(a,b){return olympe.D.Fa([b],c=>{const d=new olympe.D.jb(new Date(this.xb.getTime()));d.xb['set'+a](this.xb['get'+a]()+c.valueOf());return d},olympe.D.jb)}mv(a){return this.ng('Milliseconds',
299
- a)}rv(a){return this.ng('Seconds',a)}nv(a){return this.ng('Minutes',a)}kv(a){return this.ng('Hours',a)}Jm(a){return this.ng('Date',a)}tv(a){return'number'===typeof a?this.Jm(7*a):this.Jm(a.cl(7))}ov(a){return this.ng('Month',a)}uv(a){return this.ng('FullYear',a)}ty(){let a=this.xb.getDay();a=0===a?6:a-1;return new olympe.D.jb(new Date(this.xb.getFullYear(),this.xb.getMonth(),this.xb.getDate()-a))}uy(){return new olympe.D.jb(new Date(this.xb.getFullYear(),this.xb.getMonth()))}Td(a){return olympe.D.Fa([a],
299
+ a)}rv(a){return this.ng('Seconds',a)}nv(a){return this.ng('Minutes',a)}kv(a){return this.ng('Hours',a)}Jm(a){return this.ng('Date',a)}tv(a){return'number'===typeof a?this.Jm(7*a):this.Jm(a.cl(7))}ov(a){return this.ng('Month',a)}uv(a){return this.ng('FullYear',a)}ty(){let a=this.xb.getDay();a=0===a?6:a-1;return new olympe.D.jb(new Date(this.xb.getFullYear(),this.xb.getMonth(),this.xb.getDate()-a))}uy(){return new olympe.D.jb(new Date(this.xb.getFullYear(),this.xb.getMonth()))}Ud(a){return olympe.D.Fa([a],
300
300
  b=>olympe.D.Ac(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}Fw(){let a=this.xb.getDay();0===a&&(a=7);return olympe.D.ya(a)}uw(a,b){return olympe.D.Fa([a,b],(c,d)=>{d=d.valueOf();'years'===d?c=this.xb.getFullYear()-c.xb.getFullYear():'months'===d?c=12*(this.xb.getFullYear()-c.xb.getFullYear())+(this.xb.getMonth()-c.xb.getMonth()):(d={milliseconds:1,seconds:1E3,minutes:6E4,hours:36E5,days:864E5,weeks:6048E5}[d],
301
301
  void 0===d&&(olympe.pa.Xa('df').warn("[getDiff] '_unit' is not a valid unit! Defaulting to milliseconds"),d=1),c=Math.trunc((this.xb.getTime()-c.xb.getTime())/d));return olympe.D.ya(c)},olympe.D.ea)}qx(a){return olympe.D.Fa([a],b=>olympe.D.Ac(this.getTime()<b.getTime()),olympe.D.qa)}ox(a){return olympe.D.Fa([a],b=>olympe.D.Ac(this.getTime()>b.getTime()),olympe.D.qa)}rx(a,b){return olympe.D.Fa([a,b],(c,d)=>olympe.D.Ac(this.getTime()>c.getTime()&&this.getTime()<d.getTime()),olympe.D.qa)}valueOf(){return this.pj().valueOf()?
302
302
  new Date(this.getTime()):new Date(0)}};olympe.D.jb.C=sb(0);olympe.D.jb.F=sb(Number.NaN);m=olympe.D.jb.prototype;m.pj.K=olympe.D.J.V;m.Ct.K=olympe.D.J.G;m.Et.K=olympe.D.J.G;m.Dt.K=olympe.D.J.G;m.Bt.K=olympe.D.J.G;m.qw.K=olympe.D.J.G;m.getMonth.K=olympe.D.J.G;m.Ft.K=olympe.D.J.G;m.getTime.K=olympe.D.J.C;m.sy.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.hd.K=olympe.D.J.F;m.ss.K=olympe.D.J.C;
303
303
  m.xy.K=new olympe.D.J(()=>olympe.D.jb,[]);m.zy.K=new olympe.D.J(()=>olympe.D.jb,[]);m.ng.K=new olympe.D.J(()=>olympe.D.jb,[]);m.mv.K=new olympe.D.J(()=>olympe.D.jb,[]);m.rv.K=new olympe.D.J(()=>olympe.D.jb,[]);m.nv.K=new olympe.D.J(()=>olympe.D.jb,[]);m.kv.K=new olympe.D.J(()=>olympe.D.jb,[]);m.Jm.K=new olympe.D.J(()=>olympe.D.jb,[0]);m.tv.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,[0]);
304
- m.ty.K=new olympe.D.J(()=>olympe.D.jb,[]);m.uy.K=new olympe.D.J(()=>olympe.D.jb,[]);m.Td.K=olympe.D.J.V;m.qb.K=olympe.D.J.C;m.Fw.K=olympe.D.J.G;m.uw.K=new olympe.D.J(()=>olympe.D.ea,[0,1]);m.qx.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.ox.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.rx.K=new olympe.D.J(()=>olympe.D.qa,[0,1]);m.valueOf.K=olympe.D.J.C;const tb=new Map,ub=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,vb=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i;function wb(a){const b=c=>{let d;c=c.valueOf();6>c.length?(d=17,c=vb.exec(c)):(d=1,c=ub.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.Uf(a)?olympe.D.ie([a],b,olympe.D.Color):b(a)}
305
- olympe.D.Color=class{constructor(a,b,c,d){this.C=olympe.D.ya(void 0!==a?Math.min(255,Math.max(0,Math.round(a))):0);this.F=olympe.D.ya(void 0!==b?Math.min(255,Math.max(0,Math.round(b))):0);this.b=olympe.D.ya(void 0!==c?Math.min(255,Math.max(0,Math.round(c))):0);this.a=olympe.D.ya(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 kc(a){let b;'string'===typeof a?b=
304
+ m.ty.K=new olympe.D.J(()=>olympe.D.jb,[]);m.uy.K=new olympe.D.J(()=>olympe.D.jb,[]);m.Ud.K=olympe.D.J.V;m.qb.K=olympe.D.J.C;m.Fw.K=olympe.D.J.G;m.uw.K=new olympe.D.J(()=>olympe.D.ea,[0,1]);m.qx.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.ox.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.rx.K=new olympe.D.J(()=>olympe.D.qa,[0,1]);m.valueOf.K=olympe.D.J.C;const tb=new Map,ub=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,vb=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i;function wb(a){const b=c=>{let d;c=c.valueOf();6>c.length?(d=17,c=vb.exec(c)):(d=1,c=ub.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.Uf(a)?olympe.D.ie([a],b,olympe.D.Color):b(a)}
305
+ olympe.D.Color=class{constructor(a,b,c,d){this.C=olympe.D.ya(void 0!==a?Math.min(255,Math.max(0,Math.round(a))):0);this.F=olympe.D.ya(void 0!==b?Math.min(255,Math.max(0,Math.round(b))):0);this.b=olympe.D.ya(void 0!==c?Math.min(255,Math.max(0,Math.round(c))):0);this.a=olympe.D.ya(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 lc(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.ya(void 0!==e?Math.min(255,Math.max(0,Math.round(e.valueOf()))):0);f=olympe.D.ya(void 0!==f?Math.min(255,Math.max(0,Math.round(f.valueOf()))):0);g=olympe.D.ya(void 0!==g?Math.min(255,Math.max(0,Math.round(g.valueOf()))):0);h=olympe.D.ya(void 0!==h?Math.min(1,Math.max(0,h.valueOf())):1);for(let k of tb.values())if(k&&k.C.qb(e)&&k.F.qb(f)&&k.b.qb(g)&&k.a.qb(h))return k;
307
307
  return new olympe.D.Color(e,f,g,h)},olympe.D.Color)}Of(){return this.C}Df(){return this.b}If(){return this.F}Cf(){return this.a}Dv(a,b){return olympe.D.Color.create(this.C.qj(a.Of(),b),this.F.qj(a.If(),b),this.b.qj(a.Df(),b),this.a.qj(a.Cf(),b))}Yv(a){return olympe.D.Color.create(this.C,this.F,this.b,a)}us(){return`rgba(${this.C},${this.F},${this.b},${this.a})`}Jn(){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
308
  return'#'+(a+b).toUpperCase()}toString(){return this.Jn()}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.Jn;olympe.D.Color.prototype.toRGBString=olympe.D.Color.prototype.us;olympe.D.Color.prototype.getAlpha=olympe.D.Color.prototype.Cf;
309
309
  olympe.D.Color.prototype.getGreen=olympe.D.Color.prototype.If;olympe.D.Color.prototype.getBlue=olympe.D.Color.prototype.Df;olympe.D.Color.prototype.getRed=olympe.D.Color.prototype.Of;olympe.D.Color.create=olympe.D.Color.create;m=olympe.D.Color.prototype;m.toJSON.K=olympe.D.J.C;m.Of.K=olympe.D.J.G;m.Df.K=olympe.D.J.G;m.If.K=olympe.D.J.G;m.Cf.K=olympe.D.J.G;m.Dv.K=new olympe.D.J(()=>olympe.D.Color,[]);m.Yv.K=new olympe.D.J(()=>olympe.D.Color,[]);m.us.K=new olympe.D.J(()=>String,[]);
310
- m.Jn.K=new olympe.D.J(()=>String,[]);m.qb.K=olympe.D.J.C;olympe.D.File=class{ma(){}Cp(){}Ul(){}jn(){}Sk(){}cn(){}Tk(){}rename(){}};olympe.D.jc=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.Ya(this.x).valueOf())+', "y": '+JSON.stringify(olympe.D.Ya(this.y).valueOf())+' }'}static kc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.D.jc(b.x,b.y)}kx(){return this.x}qy(a){pb(this.x,a)}lx(){return this.y}ry(a){pb(this.y,a)}ax(){return this.x.ks(this.y)}he(a){return olympe.D.Fa([this,a],(b,c)=>new olympe.D.jc(b.x.he(c.x),b.y.he(c.y)),
311
- olympe.D.jc,'Vector2.plus')}xh(a){return olympe.D.Fa([this,a],(b,c)=>new olympe.D.jc(b.x.xh(c.x),b.y.xh(c.y)),olympe.D.jc,'Vector2.minus')}Ex(a){return new olympe.D.jc(this.x.cl(a),this.y.cl(a))}Tv(a){return new olympe.D.jc(this.x.$i(a),this.y.$i(a))}Hx(){return new olympe.D.jc(this.x.Bj(),this.y.Bj())}Uv(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.ya(d*f+e*g),olympe.D.ea),olympe.D.ea)}length(){return olympe.D.Fa([this.x,this.y],(a,b)=>olympe.D.ya(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.jc(a/c,b/c)},olympe.D.jc)}floor(){return olympe.D.Fa([this.x,this.y],(a,b)=>new olympe.D.jc(Math.floor(a),Math.floor(b)),olympe.D.jc)}ceil(){return olympe.D.Fa([this.x,this.y],(a,b)=>new olympe.D.jc(Math.ceil(a),Math.ceil(b)),olympe.D.jc)}round(){return olympe.D.Fa([this.x,this.y],(a,b)=>new olympe.D.jc(Math.round(a),Math.round(b)),olympe.D.jc)}pv(a){return new olympe.D.jc(this.x.he(a),
313
- this.y.he(a))}qv(a,b){return new olympe.D.jc(this.x.he(a),this.y.he(b))}hd(){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.Ma.Ib}, ${this.y.Ma.Ib}]`}qb(a){return this===a?!0:!1}};m=olympe.D.jc.prototype;m.toJSON.K=olympe.D.J.C;m.kx.K=olympe.D.J.G;m.qy.K=olympe.D.J.C;m.lx.K=olympe.D.J.G;m.ry.K=olympe.D.J.C;m.ax.K=olympe.D.J.G;m.he.K=new olympe.D.J(()=>olympe.D.jc,[0]);
314
- m.xh.K=new olympe.D.J(()=>olympe.D.jc,[0]);m.Ex.K=olympe.D.J.Z;m.Tv.K=olympe.D.J.Z;m.Hx.K=olympe.D.J.Z;m.Uv.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.length.K=olympe.D.J.G;m.normalize.K=olympe.D.J.Z;m.floor.K=olympe.D.J.Z;m.ceil.K=olympe.D.J.Z;m.round.K=olympe.D.J.Z;m.pv.K=olympe.D.J.Z;m.qv.K=olympe.D.J.Z;m.hd.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(){}mh(){}has(){}Fg(){}Oc(){}Gf(){}mf(){}Bg(){}forEach(){}de(){}};olympe.D.Qg.prototype.forEachCurrentValue=olympe.D.Qg.prototype.de;olympe.D.Qg.prototype.forEach=olympe.D.Qg.prototype.forEach;m=olympe.D.Qg.prototype;m.has.K=olympe.D.J.V;m.Fg.K=olympe.D.J.C;m.Oc.K=new olympe.D.J(()=>Object,[]);m.Gf.K=new olympe.D.J(()=>String,[]);m.mf.K=olympe.D.J.G;m.Bg.K=olympe.D.J.C;m.forEach.K=new olympe.D.J(()=>{},[]);m.de.K=olympe.D.J.C;olympe.D.nd=class extends olympe.D.Qg{constructor(){super()}fe(){}Ff(){}Ye(){}Ef(){}re(){}Xe(){}cj(){}fi(){}};olympe.D.nd.prototype.getCurrentAt=olympe.D.nd.prototype.Xe;olympe.D.nd.prototype.getAt=olympe.D.nd.prototype.re;olympe.D.nd.prototype.getCurrentKeyAt=olympe.D.nd.prototype.Ef;olympe.D.nd.prototype.getKeyAt=olympe.D.nd.prototype.Ye;olympe.D.nd.prototype.getCurrentRank=olympe.D.nd.prototype.Ff;olympe.D.nd.prototype.getRank=olympe.D.nd.prototype.fe;m=olympe.D.nd.prototype;m.fe.K=olympe.D.J.G;
315
- m.Ff.K=olympe.D.J.C;m.Ye.K=new olympe.D.J(()=>String,[]);m.Ef.K=olympe.D.J.C;m.re.K=new olympe.D.J(()=>Object,[]);m.Xe.K=olympe.D.J.C;m.cj.K=olympe.D.J.C;m.fi.K=new olympe.D.J(()=>Array,[]);olympe.D.ri=class{constructor(a,b){this.V=b||olympe.D.Ia();this.valueType=a||Object;this.values={};this.Ab=this.Sa=null;this.Xf=0;this.aa=Object.create(null);this.Xb=Object.create(null);this.size=0;this.N=null;this.V.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()}}})}Hh(){return this.V}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,
310
+ m.Jn.K=new olympe.D.J(()=>String,[]);m.qb.K=olympe.D.J.C;olympe.D.File=class{ma(){}Cp(){}Ul(){}jn(){}Sk(){}cn(){}Tk(){}rename(){}};olympe.D.kc=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.Ya(this.x).valueOf())+', "y": '+JSON.stringify(olympe.D.Ya(this.y).valueOf())+' }'}static lc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.D.kc(b.x,b.y)}kx(){return this.x}qy(a){pb(this.x,a)}lx(){return this.y}ry(a){pb(this.y,a)}ax(){return this.x.ks(this.y)}he(a){return olympe.D.Fa([this,a],(b,c)=>new olympe.D.kc(b.x.he(c.x),b.y.he(c.y)),
311
+ olympe.D.kc,'Vector2.plus')}xh(a){return olympe.D.Fa([this,a],(b,c)=>new olympe.D.kc(b.x.xh(c.x),b.y.xh(c.y)),olympe.D.kc,'Vector2.minus')}Ex(a){return new olympe.D.kc(this.x.cl(a),this.y.cl(a))}Tv(a){return new olympe.D.kc(this.x.$i(a),this.y.$i(a))}Hx(){return new olympe.D.kc(this.x.Bj(),this.y.Bj())}Uv(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.ya(d*f+e*g),olympe.D.ea),olympe.D.ea)}length(){return olympe.D.Fa([this.x,this.y],(a,b)=>olympe.D.ya(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.kc(a/c,b/c)},olympe.D.kc)}floor(){return olympe.D.Fa([this.x,this.y],(a,b)=>new olympe.D.kc(Math.floor(a),Math.floor(b)),olympe.D.kc)}ceil(){return olympe.D.Fa([this.x,this.y],(a,b)=>new olympe.D.kc(Math.ceil(a),Math.ceil(b)),olympe.D.kc)}round(){return olympe.D.Fa([this.x,this.y],(a,b)=>new olympe.D.kc(Math.round(a),Math.round(b)),olympe.D.kc)}pv(a){return new olympe.D.kc(this.x.he(a),
313
+ this.y.he(a))}qv(a,b){return new olympe.D.kc(this.x.he(a),this.y.he(b))}hd(){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.Ma.Ib}, ${this.y.Ma.Ib}]`}qb(a){return this===a?!0:!1}};m=olympe.D.kc.prototype;m.toJSON.K=olympe.D.J.C;m.kx.K=olympe.D.J.G;m.qy.K=olympe.D.J.C;m.lx.K=olympe.D.J.G;m.ry.K=olympe.D.J.C;m.ax.K=olympe.D.J.G;m.he.K=new olympe.D.J(()=>olympe.D.kc,[0]);
314
+ m.xh.K=new olympe.D.J(()=>olympe.D.kc,[0]);m.Ex.K=olympe.D.J.Z;m.Tv.K=olympe.D.J.Z;m.Hx.K=olympe.D.J.Z;m.Uv.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.length.K=olympe.D.J.G;m.normalize.K=olympe.D.J.Z;m.floor.K=olympe.D.J.Z;m.ceil.K=olympe.D.J.Z;m.round.K=olympe.D.J.Z;m.pv.K=olympe.D.J.Z;m.qv.K=olympe.D.J.Z;m.hd.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(){}Hd(){}get(){}mh(){}has(){}Fg(){}Oc(){}Gf(){}mf(){}Bg(){}forEach(){}de(){}};olympe.D.Qg.prototype.forEachCurrentValue=olympe.D.Qg.prototype.de;olympe.D.Qg.prototype.forEach=olympe.D.Qg.prototype.forEach;m=olympe.D.Qg.prototype;m.has.K=olympe.D.J.V;m.Fg.K=olympe.D.J.C;m.Oc.K=new olympe.D.J(()=>Object,[]);m.Gf.K=new olympe.D.J(()=>String,[]);m.mf.K=olympe.D.J.G;m.Bg.K=olympe.D.J.C;m.forEach.K=new olympe.D.J(()=>{},[]);m.de.K=olympe.D.J.C;olympe.D.nd=class extends olympe.D.Qg{constructor(){super()}fe(){}Ff(){}Ye(){}Ef(){}re(){}Xe(){}cj(){}fi(){}};olympe.D.nd.prototype.getCurrentAt=olympe.D.nd.prototype.Xe;olympe.D.nd.prototype.getAt=olympe.D.nd.prototype.re;olympe.D.nd.prototype.getCurrentKeyAt=olympe.D.nd.prototype.Ef;olympe.D.nd.prototype.getKeyAt=olympe.D.nd.prototype.Ye;olympe.D.nd.prototype.getCurrentRank=olympe.D.nd.prototype.Ff;olympe.D.nd.prototype.getRank=olympe.D.nd.prototype.fe;m=olympe.D.nd.prototype;m.fe.K=olympe.D.J.G;
315
+ m.Ff.K=olympe.D.J.C;m.Ye.K=new olympe.D.J(()=>String,[]);m.Ef.K=olympe.D.J.C;m.re.K=new olympe.D.J(()=>Object,[]);m.Xe.K=olympe.D.J.C;m.cj.K=olympe.D.J.C;m.fi.K=new olympe.D.J(()=>Array,[]);olympe.D.ri=class{constructor(a,b){this.V=b||olympe.D.Ja();this.valueType=a||Object;this.values={};this.Ab=this.Sa=null;this.Xf=0;this.aa=Object.create(null);this.Xb=Object.create(null);this.size=0;this.N=null;this.V.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()}}})}Hh(){return this.V}Yb(){return this.valueType}Hd(a){this.valueType=a;const b=this.Sa;if(null!==b)for(const c in b)Object.prototype.hasOwnProperty.call(b,
316
316
  c)&&kb(b[c],a)}get(a){const b=c=>{null===this.Sa&&(this.Sa={});return this.gj(this.Sa,c,this.values[c],this.valueType,'Map.get('+c+')')};return olympe.D.Fa([a],c=>b(c),this.valueType)}mh(a){a=this.values[a];return olympe.D.lb(a)?Wa(a.Ma)?a.Ma.Ib:void 0:a}has(a){const b=c=>{null===this.Ab&&(this.Ab={});return this.gj(this.Ab,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)}Fg(a){return a in this.values}gj(a,b,c,d,e){let f=a[b];
317
- f||this.V.run(()=>{f=olympe.D.Md(d,void 0,e);a[b]=f;f.Ma.onDestroy(()=>delete a[b]);olympe.D.lb(c)?ob(f,c):lb(f,c)});return f}Oc(){throw Error('Abstract method getFirstKey needs to be overridden');}Gf(){throw Error('Abstract method getFirstKey needs to be overridden');}mf(){null===this.N&&this.V.run(()=>{this.N=olympe.D.Md(olympe.D.ea,olympe.D.ya(this.size));this.N.Ma.onDestroy(()=>{this.N=null})});return this.N}Bg(){return this.size}forEach(a,b){const c=this.Fm();a=this.yr(c,a,b);this.Em(c,a)}Fm(){return String(++this.Xf)}Em(a,
318
- b){this.Xb[a]=b;olympe.D.Ia().vc(()=>{const c=this.aa;for(const d in c)Object.prototype.hasOwnProperty.call(c,d)&&delete c[d][a];delete this.Xb[a]});this.de(b)}yr(a,b,c){const d=olympe.D.Ia();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.Im(a,f,g)})}}Im(a,b,c){void 0===this.aa[b]&&(this.aa[b]={});this.aa[b][a]=c}de(a){const b=this.values;for(const c in b)if(Object.prototype.hasOwnProperty.call(b,c)&&
317
+ f||this.V.run(()=>{f=olympe.D.Nd(d,void 0,e);a[b]=f;f.Ma.onDestroy(()=>delete a[b]);olympe.D.lb(c)?ob(f,c):lb(f,c)});return f}Oc(){throw Error('Abstract method getFirstKey needs to be overridden');}Gf(){throw Error('Abstract method getFirstKey needs to be overridden');}mf(){null===this.N&&this.V.run(()=>{this.N=olympe.D.Nd(olympe.D.ea,olympe.D.ya(this.size));this.N.Ma.onDestroy(()=>{this.N=null})});return this.N}Bg(){return this.size}forEach(a,b){const c=this.Fm();a=this.yr(c,a,b);this.Em(c,a)}Fm(){return String(++this.Xf)}Em(a,
318
+ b){this.Xb[a]=b;olympe.D.Ja().vc(()=>{const c=this.aa;for(const d in c)Object.prototype.hasOwnProperty.call(c,d)&&delete c[d][a];delete this.Xb[a]});this.de(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.Im(a,f,g)})}}Im(a,b,c){void 0===this.aa[b]&&(this.aa[b]={});this.aa[b][a]=c}de(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.Ui(a,!0);this.values[a]=b;var c=this.Sa;null!==c&&void 0!==c[a]&&(b&&b instanceof olympe.D.Proxy?ob(c[a],b):lb(c[a],b));c=this.Ab;null!==c&&void 0!==c[a]&&pb(c[a],!0);this.size++;c=this.Xb;for(const d in c)if(Object.prototype.hasOwnProperty.call(c,d))c[d](b,a,this)}Ui(a,b){const c=this.values;if(Object.prototype.hasOwnProperty.call(c,a)){var d=(d=c[a])&&d.xf?d.Ma.Ib:d;var e=this.Sa;null!==e&&void 0!==e[a]&&mb(e[a]);e=this.Ab;null!==e&&
320
320
  void 0!==e[a]&&pb(e[a],!1);delete c[a];this.size--;b||this.yf()}a=this.aa[a];if(void 0!==a)for(const f in a)Object.prototype.hasOwnProperty.call(a,f)&&a[f].destroy();return d}yf(){null!==this.N&&pb(this.N,this.size)}Xh(){var a=this.Sa;if(null!==a)for(const c in a)Object.prototype.hasOwnProperty.call(a,c)&&mb(a[c]);a=this.Ab;if(null!==a)for(var b in a)Object.prototype.hasOwnProperty.call(a,b)&&pb(a[b],!1);for(const c in this.values)Object.prototype.hasOwnProperty.call(this.values,c)&&delete this.values[c];
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.N&&pb(this.N,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.ri.la=[olympe.D.Qg];m=olympe.D.ri.prototype;m.Hh.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.mh.K=olympe.D.J.C;m.has.K=olympe.D.J.V;m.Fg.K=olympe.D.J.C;m.gj.K=olympe.D.J.C;m.mf.K=olympe.D.J.G;m.Bg.K=olympe.D.J.C;m.forEach.K=new olympe.D.J(()=>{},[]);m.Fm.K=olympe.D.J.C;m.Em.K=olympe.D.J.C;m.yr.K=olympe.D.J.C;m.Im.K=olympe.D.J.C;m.de.K=olympe.D.J.C;m.Jk.K=olympe.D.J.C;m.Ui.K=olympe.D.J.C;m.yf.K=olympe.D.J.C;m.Xh.K=olympe.D.J.C;m.Vg.K=olympe.D.J.C;olympe.D.Fj=class extends olympe.D.ri{constructor(a,b){super(a,b);this.F=Object.create(null);this.C=[];this.Da=this.ab=this.bb=this.ra=null}Gd(a){super.Gd(a);if(null!==this.Da)for(let b of this.Da.values())kb(b,a)}Oc(){return this.re(0)}Gf(){return this.Ye(0)}fe(a){const b=c=>{null===this.bb&&(this.bb=Object.create(null));let d=this.Ff(a);d=void 0!==d?olympe.D.ya(d):void 0;return this.gj(this.bb,c,d,olympe.D.ea,`List.getRank(${c})`)};return olympe.D.lb(a)?L(olympe.D.createNode(olympe.D.ea,b,null,
323
- [a.Ma],[0],'onResolved('+(b.name||'')+')')):b(a)}Ff(a){return this.F[a]}Ye(a){const b=c=>{const d=c.valueOf(),e=this.Ef(d);null===this.ab&&(this.ab=Object.create(null));return this.gj(this.ab,String(d),e,String,'List.getKeyAt('+c+')')};return olympe.D.Fa([a],c=>b(c),String)}Ef(a){return this.C[a.valueOf()]}re(a){if(olympe.D.lb(a))return this.get(olympe.D.Fa([a],c=>{c=this.Ye(c);if(!Wa(c.Ma)){const d=olympe.D.Ia();olympe.D.Tf(d)&&fb(d)}return c},String));null===this.Da&&(this.Da=new Map);let b=this.Da.get(a);
324
- b||this.V.run(()=>{b=this.get(this.Ye(a));this.Da.set(a,b);b.Ma.onDestroy(()=>this.Da.delete(a))});return b}Xe(a){return this.mh(this.Ef(a))}cj(a,b,c,d){let e=this.Fm();a=this.cs(e,a,b,c,d);this.Em(e,a)}cs(a,b,c,d,e){return olympe.D.Ia().Cb((f,g)=>{let h=!1,k=olympe.D.ef([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.Im(a,g,k)})}fi(){null===this.ra&&this.V.run(()=>{this.ra=olympe.D.Md(Array,this.C.filter(a=>void 0!==a));
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.N&&pb(this.N,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.ri.la=[olympe.D.Qg];m=olympe.D.ri.prototype;m.Hh.K=olympe.D.J.C;m.Yb.K=olympe.D.J.C;m.Hd.K=olympe.D.J.C;m.get.K=new olympe.D.J(()=>Object,[],'valueType');
322
+ m.mh.K=olympe.D.J.C;m.has.K=olympe.D.J.V;m.Fg.K=olympe.D.J.C;m.gj.K=olympe.D.J.C;m.mf.K=olympe.D.J.G;m.Bg.K=olympe.D.J.C;m.forEach.K=new olympe.D.J(()=>{},[]);m.Fm.K=olympe.D.J.C;m.Em.K=olympe.D.J.C;m.yr.K=olympe.D.J.C;m.Im.K=olympe.D.J.C;m.de.K=olympe.D.J.C;m.Jk.K=olympe.D.J.C;m.Ui.K=olympe.D.J.C;m.yf.K=olympe.D.J.C;m.Xh.K=olympe.D.J.C;m.Vg.K=olympe.D.J.C;olympe.D.Fj=class extends olympe.D.ri{constructor(a,b){super(a,b);this.F=Object.create(null);this.C=[];this.Da=this.ab=this.bb=this.ra=null}Hd(a){super.Hd(a);if(null!==this.Da)for(let b of this.Da.values())kb(b,a)}Oc(){return this.re(0)}Gf(){return this.Ye(0)}fe(a){const b=c=>{null===this.bb&&(this.bb=Object.create(null));let d=this.Ff(a);d=void 0!==d?olympe.D.ya(d):void 0;return this.gj(this.bb,c,d,olympe.D.ea,`List.getRank(${c})`)};return olympe.D.lb(a)?L(olympe.D.createNode(olympe.D.ea,b,null,
323
+ [a.Ma],[0],'onResolved('+(b.name||'')+')')):b(a)}Ff(a){return this.F[a]}Ye(a){const b=c=>{const d=c.valueOf(),e=this.Ef(d);null===this.ab&&(this.ab=Object.create(null));return this.gj(this.ab,String(d),e,String,'List.getKeyAt('+c+')')};return olympe.D.Fa([a],c=>b(c),String)}Ef(a){return this.C[a.valueOf()]}re(a){if(olympe.D.lb(a))return this.get(olympe.D.Fa([a],c=>{c=this.Ye(c);if(!Wa(c.Ma)){const d=olympe.D.Ja();olympe.D.Tf(d)&&fb(d)}return c},String));null===this.Da&&(this.Da=new Map);let b=this.Da.get(a);
324
+ b||this.V.run(()=>{b=this.get(this.Ye(a));this.Da.set(a,b);b.Ma.onDestroy(()=>this.Da.delete(a))});return b}Xe(a){return this.mh(this.Ef(a))}cj(a,b,c,d){let e=this.Fm();a=this.cs(e,a,b,c,d);this.Em(e,a)}cs(a,b,c,d,e){return olympe.D.Ja().Cb((f,g)=>{let h=!1,k=olympe.D.ef([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.Im(a,g,k)})}fi(){null===this.ra&&this.V.run(()=>{this.ra=olympe.D.Nd(Array,this.C.filter(a=>void 0!==a));
325
325
  this.ra.Ma.onDestroy(()=>{this.N=null})});return this.ra}de(a){if(this.C.length!==this.size)super.de(a);else{var b=this.values;for(let c of this.C.filter(d=>void 0!==d))if(Object.prototype.hasOwnProperty.call(b,c)&&!1===a(b[c],c,this))break}}Hm(a,b){const c=this.bb,d=this.ab,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]&&mb(c[g]),void 0!==
326
326
  c[a]&&lb(c[a],olympe.D.ya(f)));null!==d&&(void 0!==e&&null!==e&&void 0!==d[e]&&mb(d[e]),void 0!==d[b]&&lb(d[b],a))}}Gm(a){var b=this.ab,c=this.F[a];null!==c&&void 0!==c&&null!==b&&(b=b[c],void 0!==b&&b.Ma.Ib===a&&mb(b));delete this.F[a];this.C.splice(c,1);c=this.bb;null!==c&&void 0!==c[a]&&mb(c[a])}zr(){if(null!==this.ra){const a=this.C,b=this.ra.Ma.Ib;b&&a.join(',')!==b.join(',')&&lb(this.ra,a)}}yf(){this.zr();super.yf()}Xh(){var a=this.F;for(b in a)delete a[b];this.C.length=0;a=this.bb;if(null!==
327
- a)for(b in a)mb(a[b]);a=this.ab;if(null!==a)for(b in a)mb(a[parseInt(b,10)]);var b=this.ra;null!==b&&(db(b.Ma),lb(b,this.C));return olympe.D.ri.prototype.Xh.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.Fj.la=[olympe.D.nd];m=olympe.D.Fj.prototype;m.Gd.K=olympe.D.J.C;m.Oc.K=new olympe.D.J(()=>Object,[]);m.Gf.K=new olympe.D.J(()=>String,[]);m.fe.K=olympe.D.J.G;m.Ff.K=olympe.D.J.C;
328
- m.Ye.K=new olympe.D.J(()=>String,[]);m.Ef.K=olympe.D.J.C;m.re.K=new olympe.D.J(()=>Object,[]);m.Xe.K=olympe.D.J.C;m.cj.K=new olympe.D.J(()=>{},[]);m.cs.K=olympe.D.J.C;m.fi.K=new olympe.D.J(()=>Array,[]);m.de.K=olympe.D.J.C;m.Hm.K=olympe.D.J.C;m.Gm.K=olympe.D.J.C;m.zr.K=olympe.D.J.C;m.yf.K=olympe.D.J.C;m.Xh.K=olympe.D.J.C;m.Vg.K=olympe.D.J.C;olympe.D.Map=class extends olympe.D.ri{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&&kb(this.F,a);super.Gd(a)}Oc(){null===this.F&&this.Um();return this.F}Gf(){null===this.C&&this.Um();return this.C}Um(){this.Hh().run(()=>{this.F=olympe.D.Md(this.Yb());this.C=olympe.D.Md(String);this.yj(this.Zm())})}Zm(){const a=this.values;let b,c;for(b in a)if(Object.prototype.hasOwnProperty.call(a,b)){c=b;break}return c}yj(a){if(void 0!==
329
- a){const b=this.values[a];b&&b instanceof olympe.D.Proxy?ob(this.F,b):lb(this.F,b);lb(this.C,a)}else void 0!==this.F.Ma.Ib&&(mb(this.F),mb(this.C))}set(a,b){this.Jk(a,b);1===this.size&&null!==this.C&&this.yj(a);this.yf()}remove(a){const b=this.Ui(a);null!==this.C&&this.C.Ma.Ib===a&&this.yj(this.Zm());return b}clear(){this.Xh();null!==this.C&&this.yj(void 0)}};m=olympe.D.Map.prototype;m.Gd.K=olympe.D.J.C;m.Oc.K=new olympe.D.J(()=>Object,[]);m.Gf.K=new olympe.D.J(()=>String,[]);m.Um.K=olympe.D.J.C;
327
+ a)for(b in a)mb(a[b]);a=this.ab;if(null!==a)for(b in a)mb(a[parseInt(b,10)]);var b=this.ra;null!==b&&(db(b.Ma),lb(b,this.C));return olympe.D.ri.prototype.Xh.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.Fj.la=[olympe.D.nd];m=olympe.D.Fj.prototype;m.Hd.K=olympe.D.J.C;m.Oc.K=new olympe.D.J(()=>Object,[]);m.Gf.K=new olympe.D.J(()=>String,[]);m.fe.K=olympe.D.J.G;m.Ff.K=olympe.D.J.C;
328
+ m.Ye.K=new olympe.D.J(()=>String,[]);m.Ef.K=olympe.D.J.C;m.re.K=new olympe.D.J(()=>Object,[]);m.Xe.K=olympe.D.J.C;m.cj.K=new olympe.D.J(()=>{},[]);m.cs.K=olympe.D.J.C;m.fi.K=new olympe.D.J(()=>Array,[]);m.de.K=olympe.D.J.C;m.Hm.K=olympe.D.J.C;m.Gm.K=olympe.D.J.C;m.zr.K=olympe.D.J.C;m.yf.K=olympe.D.J.C;m.Xh.K=olympe.D.J.C;m.Vg.K=olympe.D.J.C;olympe.D.Map=class extends olympe.D.ri{constructor(a){a===olympe.D.Proxy&&(a=Object);super(a);this.C=this.F=null}Hd(a){a===olympe.D.Proxy&&(a=Object);null!==this.F&&kb(this.F,a);super.Hd(a)}Oc(){null===this.F&&this.Um();return this.F}Gf(){null===this.C&&this.Um();return this.C}Um(){this.Hh().run(()=>{this.F=olympe.D.Nd(this.Yb());this.C=olympe.D.Nd(String);this.yj(this.Zm())})}Zm(){const a=this.values;let b,c;for(b in a)if(Object.prototype.hasOwnProperty.call(a,b)){c=b;break}return c}yj(a){if(void 0!==
329
+ a){const b=this.values[a];b&&b instanceof olympe.D.Proxy?ob(this.F,b):lb(this.F,b);lb(this.C,a)}else void 0!==this.F.Ma.Ib&&(mb(this.F),mb(this.C))}set(a,b){this.Jk(a,b);1===this.size&&null!==this.C&&this.yj(a);this.yf()}remove(a){const b=this.Ui(a);null!==this.C&&this.C.Ma.Ib===a&&this.yj(this.Zm());return b}clear(){this.Xh();null!==this.C&&this.yj(void 0)}};m=olympe.D.Map.prototype;m.Hd.K=olympe.D.J.C;m.Oc.K=new olympe.D.J(()=>Object,[]);m.Gf.K=new olympe.D.J(()=>String,[]);m.Um.K=olympe.D.J.C;
330
330
  m.Zm.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.Fj{constructor(a){super(a)}set(a,b,c){this.Jk(a,b);void 0!==c&&olympe.D.wc([c],d=>{this.Hm(a,d)});this.yf()}remove(a){this.Gm(a);return this.Ui(a)}clear(){this.Xh()}};olympe.D.Wg.prototype.remove.K=olympe.D.J.C;olympe.D.Wg.prototype.clear.K=olympe.D.J.C;olympe.D.As=class extends olympe.D.Vj{constructor(a,b){super(olympe.D.ea,'animatedFlowSource');this.duration=a;this.C=b||olympe.D.ea.Eo.Lp}Eb(){return olympe.D.Lx(this.node,this.duration,this.C,void 0)}};let xb=null;olympe.D.L=void 0;olympe.D.En=void 0;olympe.D.ai=void 0;olympe.D.Wh=new Map;olympe.D.Wh.set(0,olympe.D.ea.ZERO);olympe.D.Wh.set(1,olympe.D.ea.ONE);olympe.D.Wh.set(2,olympe.D.ea.av);olympe.D.Ik=new Map;olympe.D.Ik.set('',olympe.D.Wa.EMPTY);olympe.D.Ik.set(' ',olympe.D.Wa.Ou);olympe.D.createNode=function(a,b,c,d,e,f,g,h){return new olympe.D.Node({valueType:a,Bd:b,Yf:c,pn:d,debug:g,wg:e,zd:f,Wi:h})};olympe.D.Tf=function(a){return!!(a&&a instanceof olympe.D.Node)};
331
- olympe.D.Md=function(a,b,c){a=olympe.D.createNode(a,void 0,void 0,void 0,void 0,c);olympe.D.Tf(b)?gb(a,b):olympe.D.lb(b)?gb(a,b.Ma):K(a,b);return L(a)};olympe.D.lb=function(a){return!(!a||!a.xf)};olympe.D.Uf=function(a){return!(!a||!(a instanceof olympe.D.Node||a.xf))};olympe.D.un=function(a){return olympe.D.Tf(a)||a instanceof olympe.D.Wb||a instanceof olympe.D.Iq};olympe.D.ii=function(a){return a instanceof olympe.D.Vj};
331
+ olympe.D.Nd=function(a,b,c){a=olympe.D.createNode(a,void 0,void 0,void 0,void 0,c);olympe.D.Tf(b)?gb(a,b):olympe.D.lb(b)?gb(a,b.Ma):K(a,b);return L(a)};olympe.D.lb=function(a){return!(!a||!a.xf)};olympe.D.Uf=function(a){return!(!a||!(a instanceof olympe.D.Node||a.xf))};olympe.D.un=function(a){return olympe.D.Tf(a)||a instanceof olympe.D.Wb||a instanceof olympe.D.Iq};olympe.D.ii=function(a){return a instanceof olympe.D.Vj};
332
332
  olympe.D.fl=function(a,b){if(void 0!==a){olympe.D.ii(a)&&(a=a.Eb().Ma);if(!olympe.D.Uf(a))return b(a);var c=[];olympe.D.lb(a)?c.push(a.Ma):c.push(a);return olympe.D.createNode(void 0,b,null,c,[0],'onResolved')}};olympe.D.Ya=function(a,b){let c=a;olympe.D.lb(a)?c=a.Ma.Ib:olympe.D.Tf(a)?c=a.Ib:olympe.D.ii(a)&&(c=a.Eb().Ma.Ib);return void 0===c?b:c};
333
333
  olympe.D.df=function(a,b){let c;olympe.D.lb(a)?c=a.Ma:olympe.D.Tf(a)?c=a:olympe.D.ii(a)&&(c=a.Eb().Ma);c&&olympe.D.wc([b],d=>{c.df(d)},'setDefaultValue');return a};olympe.D.ef=function(a,b,c,d){const e=a.length,f=Array(e),g=[];let h;for(let k=0;k<e;k++)h=a[k],void 0!==h&&null!==h&&(void 0!==h.wr?(h=h.Ma,g.push(k)):h instanceof olympe.D.Node?g.push(k):olympe.D.ii(h)&&(h=h.Eb().Ma,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.ef(a,b,c,d||'syncProxies'))};const yb=a=>{for(const b of a)if(olympe.D.Uf(b)||olympe.D.ii(b))return!1;return!0};olympe.D.Fa=function(a,b,c,d,e){if(yb(a))return b(...a);const f=olympe.D.ef(a,b,c,d||'TransformFlows');e&&olympe.D.wc([e],g=>{f.df(g)},'setDefaultValue');return L(f)};olympe.D.wc=function(a,b,c){yb(a)?b(...a):olympe.D.ef(a,b,void 0,c||'processFlows')};
335
- olympe.D.hs=function(a,b){if(yb(a))b(...a);else{const c=olympe.D.Ia();olympe.D.ef(a,(...d)=>{olympe.D.Ia().destroy();c.run(b,...d)},void 0,'processFlowsOnce')}};olympe.D.Dn=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.Ma,f.push(h)):g instanceof olympe.D.Node?f.push(h):olympe.D.ii(g)&&(g=g.Eb().Ma,f.push(h))),e[h]=g;0!==f.length&&new olympe.D.Node({Bd:b,pn:e,wg:f,ay:!1,zd:c})};
336
- olympe.D.YC=function(a,b,c){const d=olympe.D.Ia();olympe.D.Dn(a,(...e)=>{olympe.D.Ia().destroy();d.run(b,...e)},c||'processFutureFlowsOnce')};olympe.D.yC=function(a,b,c){a=new olympe.D.Vj(a,c);b(a);return a.Eb()};olympe.D.Kc=function(a,b='flowSource'){return new olympe.D.Vj(a,b)};olympe.D.aD=function(a,b,c,d){const e=olympe.D.Ia();olympe.D.ef(a,(...f)=>{olympe.D.Ia().destroy();e.run(b,...f)},c,d||'syncProxiesOnce')};
337
- olympe.D.nn=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.DC=function(a,b,...c){return a?a.run(b,...c):b(...c)};olympe.D.fD=function(a){return olympe.D.Ia().Cb(a)};olympe.D.BC=function(a,b,c){olympe.D.Vv(a?a.Ma:a,b,c)};
335
+ olympe.D.hs=function(a,b){if(yb(a))b(...a);else{const c=olympe.D.Ja();olympe.D.ef(a,(...d)=>{olympe.D.Ja().destroy();c.run(b,...d)},void 0,'processFlowsOnce')}};olympe.D.Dn=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.Ma,f.push(h)):g instanceof olympe.D.Node?f.push(h):olympe.D.ii(g)&&(g=g.Eb().Ma,f.push(h))),e[h]=g;0!==f.length&&new olympe.D.Node({Bd:b,pn:e,wg:f,ay:!1,zd:c})};
336
+ olympe.D.YC=function(a,b,c){const d=olympe.D.Ja();olympe.D.Dn(a,(...e)=>{olympe.D.Ja().destroy();d.run(b,...e)},c||'processFutureFlowsOnce')};olympe.D.yC=function(a,b,c){a=new olympe.D.Vj(a,c);b(a);return a.Eb()};olympe.D.Kc=function(a,b='flowSource'){return new olympe.D.Vj(a,b)};olympe.D.aD=function(a,b,c,d){const e=olympe.D.Ja();olympe.D.ef(a,(...f)=>{olympe.D.Ja().destroy();e.run(b,...f)},c,d||'syncProxiesOnce')};
337
+ olympe.D.nn=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.DC=function(a,b,...c){return a?a.run(b,...c):b(...c)};olympe.D.fD=function(a){return olympe.D.Ja().Cb(a)};olympe.D.BC=function(a,b,c){olympe.D.Vv(a?a.Ma:a,b,c)};
338
338
  olympe.D.Vv=function(a,b,c){if(a){var d=a.Y();null===xb&&(xb={});if(xb[d])olympe.D.L.log(`Already started node #${d} dump`+(b?`: ${b}`:''));else{xb[d]=!0;var e=`Starting node #${d} dump`+(b?`: ${b}`:'');c?olympe.D.L.warn(e):olympe.D.L.log(e);var f=`#${d}`+(b?`: ${b}`:'')+':';c=olympe.D.createNode(null,g=>{void 0===g?olympe.D.L.log(f,'undefined'):null===g?olympe.D.L.log(f,'null'):olympe.D.L.log(f,String(g))},null,[a],[0],'DataFlowDump');a.onDestroy(()=>{olympe.D.L.log(`Node #${d} destroyed`+(b?`: ${b}`:
339
- ''))});c.onDestroy(()=>{delete xb[d]})}}else olympe.D.L.log('NOT starting node dump, node is '+String(a))};olympe.D.AC=function(){let a='',b=olympe.D.Ia();for(;null!==b;)a+=b.Uk()+' --\x3e ',b=b.getParent();olympe.D.L.log(a)};
339
+ ''))});c.onDestroy(()=>{delete xb[d]})}}else olympe.D.L.log('NOT starting node dump, node is '+String(a))};olympe.D.AC=function(){let a='',b=olympe.D.Ja();for(;null!==b;)a+=b.Uk()+' --\x3e ',b=b.getParent();olympe.D.L.log(a)};
340
340
  olympe.D.ya=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.vt;if(-Infinity===a)return olympe.D.ea.hu;if(isNaN(a))var b=!1;else b=parseFloat(a),b=(b|0)===b;return b&&-1<=a&&100>=a?(olympe.D.Wh.has(a)||olympe.D.Wh.set(a,new olympe.D.ea(a)),olympe.D.Wh.get(a)):new olympe.D.ea(a)}return null};
341
- olympe.D.ge=function(a){return void 0===a?olympe.D.Md(olympe.D.ea):olympe.D.Md(olympe.D.ea,olympe.D.Uf(a)?a:olympe.D.ya(a))};olympe.D.Lx=olympe.D.ea.animate;olympe.D.SC=function(a,b){return new olympe.D.As(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.VC=function(a){return void 0===a?olympe.D.Md(olympe.D.Wa):olympe.D.Md(olympe.D.Wa,olympe.D.Uf(a)?a:olympe.D.Bb(a))};olympe.D.Ac=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.Xx=function(a){return void 0===a?olympe.D.Md(olympe.D.qa):olympe.D.Md(olympe.D.qa,olympe.D.Uf(a)?a:olympe.D.Ac(a))};olympe.D.Mx=function(a){if(a instanceof Date)return new olympe.D.jb(a)};
343
- olympe.D.UC=function(a){return olympe.D.Md(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.WC=function(a,b){return olympe.D.Md(olympe.D.jc,void 0===a&&void 0===b?void 0:new olympe.D.jc(a,b))};olympe.D.Wx=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.Md(olympe.D.Color,e)};olympe.D.TC=olympe.D.Wx;
344
- olympe.D.Lv=function(a){olympe.D.L=a;olympe.D.ai=olympe.D.oh()};olympe.D.oh=function(){olympe.D.En||(olympe.D.En=new olympe.D.Iq);return olympe.D.En};olympe.D.Ia=function(){olympe.D.ai||(olympe.D.ai=olympe.D.oh());return olympe.D.ai};olympe.D.ms=function(a){const b=olympe.D.ai;olympe.D.un(a)&&(olympe.D.ai=a);return b||null};
345
- olympe.D.kc=a=>{a='string'===typeof a?JSON.parse(a):a;if(a.type){let b=null;switch(a.type){case 'dateTime':b=olympe.D.jb.kc(a);break;case 'number':b=olympe.D.ea.kc(a);break;case 'string':b=olympe.D.Wa.kc(a);break;case 'vector2':b=olympe.D.jc.kc(a);break;case 'color':b=olympe.D.Color.kc(a);break;case 'boolean':b=olympe.D.qa.kc(a)}return b}return null};function zb(a){a.C.yb()||(a.G.forEach(b=>{b.destroy()}),a.G.clear(),a.F.clear(),a.size.clear(),a.V.clear(),a.Z.length=0,a.N.length=0)}
341
+ olympe.D.ge=function(a){return void 0===a?olympe.D.Nd(olympe.D.ea):olympe.D.Nd(olympe.D.ea,olympe.D.Uf(a)?a:olympe.D.ya(a))};olympe.D.Lx=olympe.D.ea.animate;olympe.D.SC=function(a,b){return new olympe.D.As(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.VC=function(a){return void 0===a?olympe.D.Nd(olympe.D.Wa):olympe.D.Nd(olympe.D.Wa,olympe.D.Uf(a)?a:olympe.D.Bb(a))};olympe.D.Ac=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.Xx=function(a){return void 0===a?olympe.D.Nd(olympe.D.qa):olympe.D.Nd(olympe.D.qa,olympe.D.Uf(a)?a:olympe.D.Ac(a))};olympe.D.Mx=function(a){if(a instanceof Date)return new olympe.D.jb(a)};
343
+ olympe.D.UC=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.WC=function(a,b){return olympe.D.Nd(olympe.D.kc,void 0===a&&void 0===b?void 0:new olympe.D.kc(a,b))};olympe.D.Wx=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.TC=olympe.D.Wx;
344
+ olympe.D.Lv=function(a){olympe.D.L=a;olympe.D.ai=olympe.D.oh()};olympe.D.oh=function(){olympe.D.En||(olympe.D.En=new olympe.D.Iq);return olympe.D.En};olympe.D.Ja=function(){olympe.D.ai||(olympe.D.ai=olympe.D.oh());return olympe.D.ai};olympe.D.ms=function(a){const b=olympe.D.ai;olympe.D.un(a)&&(olympe.D.ai=a);return b||null};
345
+ olympe.D.lc=a=>{a='string'===typeof a?JSON.parse(a):a;if(a.type){let b=null;switch(a.type){case 'dateTime':b=olympe.D.jb.lc(a);break;case 'number':b=olympe.D.ea.lc(a);break;case 'string':b=olympe.D.Wa.lc(a);break;case 'vector2':b=olympe.D.kc.lc(a);break;case 'color':b=olympe.D.Color.lc(a);break;case 'boolean':b=olympe.D.qa.lc(a)}return b}return null};function zb(a){a.C.yb()||(a.G.forEach(b=>{b.destroy()}),a.G.clear(),a.F.clear(),a.size.clear(),a.V.clear(),a.Z.length=0,a.N.length=0)}
346
346
  olympe.D.$A=class{constructor(){this.C=new olympe.D.Wb('Slot Manager context');this.G=new Map;this.C.run(()=>{this.F=olympe.D.Kc(Ab,'Last slot manager entry');this.size=qb(olympe.D.Kc(olympe.D.ea,'SlotManager size').repeat(this.F.Eb().en()),olympe.D.ea.ZERO);this.V=qb(olympe.D.Kc(olympe.D.ea,'last valid slots'),olympe.D.ya(-1))});this.Z=[];this.N=[];this.C.onDestroy(()=>{zb(this)})}};
347
347
  class Ab{constructor(a,b,c,d){this.id=a;this.tc=new olympe.D.Wb('Slot manager entry');this.G=c;this.N=d;this.tc.run(()=>{const e=qb(olympe.D.Kc(olympe.D.ea),olympe.D.ea.ZERO);olympe.D.lb(b)?e.repeat(b):e.update(b);this.C=olympe.D.Kc(olympe.D.ea);this.F=this.C.Eb().he(e.Eb())});this.next=null}Y(){return this.id}ex(){return this.C.Eb()}en(){return this.F}fe(){return this.G}px(){return this.N}By(a){this.G=a}ly(a){null===a?this.C.update(olympe.D.ea.ZERO):(this.C.repeat(a.en()),a.next=this)}Gt(){this.C.clear();
348
- this.next=null}destroy(){this.tc.destroy();this.F=this.C=this.next=null}}m=Ab.prototype;m.Y.K=olympe.D.J.C;m.ex.K=new olympe.D.J(()=>olympe.D.ea);m.en.K=new olympe.D.J(()=>olympe.D.ea);m.fe.K=olympe.D.J.C;m.px.K=olympe.D.J.C;m.By.K=olympe.D.J.C;m.ly.K=olympe.D.J.C;m.Gt.K=olympe.D.J.C;m.destroy.K=olympe.D.J.C;olympe.D.O={Ea:'df.Logger'};olympe.T.config(a=>{E(a,olympe.D.Config.Vp,Number.POSITIVE_INFINITY);C(a,olympe.D.O.Ea,[olympe.pa.O.va],b=>b.Nc('df'))},'olympe.df');olympe.T.run([olympe.D.O.Ea],a=>{olympe.D.Lv(a)},'olympe.df');olympe.host={};const Bb=new Map,Cb=new Map;olympe.host.Zp=class{static register(a,b,...c){Bb.set(a,b);0<c.length&&Cb.set(a,c)}static create(a,b,c,d){const e=Bb.get(a);if(void 0===e)throw Error('Undefined UI element type: '+a);a=Cb.get(a);return void 0!==a?new e(b,c,...a.map(f=>ma(d,f))):new e(b,c)}};function Db(a,b,c){a.L.debug('CREATE #',b,', type=',c);a.C.set(b,olympe.host.Zp.create(c,b,a.L,a.N))}function Eb(a,b,c,...d){const e=a.C.get(b);if(void 0!==e){a.L.N()<=olympe.pa.Ob.C.eg&&a.L.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.hv)||null);else if('function'===typeof f){const g=f,h=olympe.D.Ia();b.push((...k)=>{h.yb()||g(...k)})}else b.push(f.valueOf());e[c].apply(e,b)}}
348
+ this.next=null}destroy(){this.tc.destroy();this.F=this.C=this.next=null}}m=Ab.prototype;m.Y.K=olympe.D.J.C;m.ex.K=new olympe.D.J(()=>olympe.D.ea);m.en.K=new olympe.D.J(()=>olympe.D.ea);m.fe.K=olympe.D.J.C;m.px.K=olympe.D.J.C;m.By.K=olympe.D.J.C;m.ly.K=olympe.D.J.C;m.Gt.K=olympe.D.J.C;m.destroy.K=olympe.D.J.C;olympe.D.O={Ea:'df.Logger'};olympe.T.config(a=>{E(a,olympe.D.Config.Vp,Number.POSITIVE_INFINITY);C(a,olympe.D.O.Ea,[olympe.pa.O.va],b=>b.Nc('df'))},'olympe.df');olympe.T.run([olympe.D.O.Ea],a=>{olympe.D.Lv(a)},'olympe.df');olympe.host={};const Bb=new Map,Cb=new Map;olympe.host.Zp=class{static register(a,b,...c){Bb.set(a,b);0<c.length&&Cb.set(a,c)}static create(a,b,c,d){const e=Bb.get(a);if(void 0===e)throw Error('Undefined UI element type: '+a);a=Cb.get(a);return void 0!==a?new e(b,c,...a.map(f=>ma(d,f))):new e(b,c)}};function Db(a,b,c){a.L.debug('CREATE #',b,', type=',c);a.C.set(b,olympe.host.Zp.create(c,b,a.L,a.N))}function Eb(a,b,c,...d){const e=a.C.get(b);if(void 0!==e){a.L.N()<=olympe.pa.Ob.C.eg&&a.L.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.hv)||null);else if('function'===typeof f){const g=f,h=olympe.D.Ja();b.push((...k)=>{h.yb()||g(...k)})}else b.push(f.valueOf());e[c].apply(e,b)}}
349
349
  function Fb(a){var b=olympe.host.da.ad,c=olympe.host.da.Yp.rr;++a.G;const d=a.G;Db(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.Ma):olympe.D.Tf(p)&&h.push(n);g[n]=p}0===h.length?e.run(()=>{Eb(this,d,k,...g)}):(f=olympe.D.createNode(void 0,(...n)=>{e.run(()=>
350
- {Eb(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.vc(a.V.bind(a,d));a=L(e);a.hv=d;K(e,a);return a}olympe.host.sa=class{constructor(a,b){this.L=a;this.N=b;this.G=0;this.C=new Map;this.F=new Map;a.debug('Starting host manager')}Xa(){return this.L}V(a){this.L.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.Ia()}G(){return this.C}gd(){return this.C.Ma.gd()||this.F.gd()}yb(){return this.C.Ma.yb()}};olympe.host.Hd.prototype.G.K=new olympe.D.J(()=>olympe.host.da.Hd,[]);olympe.host.yk=class{};olympe.host.Fi=class{constructor(){}C(){}F(){}pj(){}};function Gb(a){return(a=a.find(b=>'authToken'===b.ma()))?a.getValue():null}olympe.host.Fi.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 Hb(){const a={}.parameters;return new olympe.host.Fi.C(a?a.map(b=>new olympe.host.Fi.F(b.name,b.value,b.hidden)):[])}
351
- olympe.host.Fi.C=class{constructor(a){this.parameters=a}zn(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 Ib(a,b){var c=olympe.host.cf;const d=olympe.W.lc(),e=new olympe.D.Wb('onTimeout context');c.C.aa(b,d,()=>{e.yb()||e.gd()||e.run(a);c.C.G(d)});return new olympe.host.ad.G(c.C,d)}function Jb(a,b){var c=olympe.host.cf;const d=olympe.W.lc(),e=new olympe.D.Wb('onInterval context');c.C.Z(b,d,()=>{e.yb()||e.gd()?c.C.F(d):e.run(a)});return new olympe.host.ad.F(c.C,d)}function Kb(a){var b=olympe.host.cf;a=a instanceof olympe.host.ad.F?a.Y():a;b.C.F(a)}olympe.host.ad=class{constructor(a){this.C=Fb(a)}};
352
- olympe.host.ad.C=class{constructor(a,b){this.cf=a;this.id=b}Y(){return this.id}cancel(){}};olympe.host.ad.N=class extends olympe.host.ad.C{cancel(){this.cf.V(this.id)}};olympe.host.ad.G=class extends olympe.host.ad.C{cancel(){this.cf.G(this.id)}};olympe.host.ad.F=class extends olympe.host.ad.C{cancel(){this.cf.F(this.id)}};olympe.host.da={};olympe.host.da.Hd=class{destroy(){}};olympe.host.da.Hd.prototype.destroy=olympe.host.da.Hd.prototype.destroy;olympe.host.da.Yp={Jy:100,Ly:101,Ky:102,Ny:103,My:104,Iy:105,NA:201,LA:202,IA:204,QA:205,HA:206,KA:207,OA:208,RA:209,SA:210,TA:211,JA:212,PA:218,MA:219,UA:220,GA:221,FA:222,cB:300,dB:301,eB:302,iB:303,jB:304,kB:305,fB:310,gB:311,hB:312,nA:400,oA:401,pA:402,jA:450,bA:500,$z:501,eA:502,dA:503,aA:504,cA:505,DB:600,uB:601,yB:602,qB:603,rB:604,oB:605,tB:606,JB:607,BB:608,lB:609,pB:610,sB:611,AB:612,FB:613,mB:614,EB:615,zB:616,IB:617,vB:618,wB:619,xB:620,CB:630,nB:631,GB:632,HB:633,lC:700,PB:701,QB:702,
350
+ {Eb(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.vc(a.V.bind(a,d));a=L(e);a.hv=d;K(e,a);return a}olympe.host.sa=class{constructor(a,b){this.L=a;this.N=b;this.G=0;this.C=new Map;this.F=new Map;a.debug('Starting host manager')}Xa(){return this.L}V(a){this.L.debug('DESTROY #',a);const b=this.C.get(a);this.C.delete(a);b.destroy()}};olympe.host.Id=class{constructor(a){this.C=a;this.F=olympe.D.Ja()}G(){return this.C}gd(){return this.C.Ma.gd()||this.F.gd()}yb(){return this.C.Ma.yb()}};olympe.host.Id.prototype.G.K=new olympe.D.J(()=>olympe.host.da.Id,[]);olympe.host.yk=class{};olympe.host.Fi=class{constructor(){}C(){}F(){}pj(){}};function Gb(a){return(a=a.find(b=>'authToken'===b.ma()))?a.getValue():null}olympe.host.Fi.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 Hb(){const a={}.parameters;return new olympe.host.Fi.C(a?a.map(b=>new olympe.host.Fi.F(b.name,b.value,b.hidden)):[])}
351
+ olympe.host.Fi.C=class{constructor(a){this.parameters=a}zn(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 Ib(a,b){var c=olympe.host.cf;const d=olympe.W.mc(),e=new olympe.D.Wb('onTimeout context');c.C.aa(b,d,()=>{e.yb()||e.gd()||e.run(a);c.C.G(d)});return new olympe.host.ad.G(c.C,d)}function Jb(a,b){var c=olympe.host.cf;const d=olympe.W.mc(),e=new olympe.D.Wb('onInterval context');c.C.Z(b,d,()=>{e.yb()||e.gd()?c.C.F(d):e.run(a)});return new olympe.host.ad.F(c.C,d)}function Kb(a){var b=olympe.host.cf;a=a instanceof olympe.host.ad.F?a.Y():a;b.C.F(a)}olympe.host.ad=class{constructor(a){this.C=Fb(a)}};
352
+ olympe.host.ad.C=class{constructor(a,b){this.cf=a;this.id=b}Y(){return this.id}cancel(){}};olympe.host.ad.N=class extends olympe.host.ad.C{cancel(){this.cf.V(this.id)}};olympe.host.ad.G=class extends olympe.host.ad.C{cancel(){this.cf.G(this.id)}};olympe.host.ad.F=class extends olympe.host.ad.C{cancel(){this.cf.F(this.id)}};olympe.host.da={};olympe.host.da.Id=class{destroy(){}};olympe.host.da.Id.prototype.destroy=olympe.host.da.Id.prototype.destroy;olympe.host.da.Yp={Jy:100,Ly:101,Ky:102,Ny:103,My:104,Iy:105,NA:201,LA:202,IA:204,QA:205,HA:206,KA:207,OA:208,RA:209,SA:210,TA:211,JA:212,PA:218,MA:219,UA:220,GA:221,FA:222,cB:300,dB:301,eB:302,iB:303,jB:304,kB:305,fB:310,gB:311,hB:312,nA:400,oA:401,pA:402,jA:450,bA:500,$z:501,eA:502,dA:503,aA:504,cA:505,DB:600,uB:601,yB:602,qB:603,rB:604,oB:605,tB:606,JB:607,BB:608,lB:609,pB:610,sB:611,AB:612,FB:613,mB:614,EB:615,zB:616,IB:617,vB:618,wB:619,xB:620,CB:630,nB:631,GB:632,HB:633,lC:700,PB:701,QB:702,
353
353
  RB:703,TB:704,UB:705,VB:706,SB:707,XB:708,WB:709,YB:710,bC:711,jC:712,ZB:713,$B:714,cC:715,dC:716,fC:717,gC:718,iC:719,eC:720,hC:721,kC:722,aC:723,mC:724,nC:725,rr:800};olympe.host.da.ad=class{V(){}aa(){}G(){}Z(){}F(){}};olympe.host.O={Wq:'host.System',Ml:'host.HistoryManager',Kq:'host.Scheduler',Ea:'host.platform.Logger',va:'host.Manager'};olympe.host.cf=null;olympe.T.config(function(a){ta(a,olympe.host.O.Wq);ta(a,olympe.host.O.Ml);C(a,olympe.host.O.Ea,[olympe.pa.O.va],function(b){return b.Nc('host')});B(a,olympe.host.O.va,olympe.host.sa,olympe.host.O.Ea,olympe.T.O.dg);C(a,olympe.host.O.Kq,[olympe.host.O.va],b=>{null===olympe.host.cf&&(olympe.host.cf=new olympe.host.ad(b));return olympe.host.cf},!0)},'olympe.host');
354
354
  olympe.T.run([olympe.host.O.Kq],a=>a,'olympe.host.scheduler');olympe.T.run([olympe.host.O.va],a=>a,'olympe.host');olympe.net={};olympe.net.eb={};olympe.net.eb.ae={mm:'POST',GET:'GET',st:'HEAD',mk:'PUT',Fc:'DELETE',gm:'OPTIONS',rA:'PATCH'};olympe.net.eb.ResponseType={zk:'text',sl:'blob',ARRAY_BUFFER:'arraybuffer'};olympe.net.eb.Headers={Lj:'content-type',Vy:'content-length',si:'authorization',zs:'access-control-allow-origin'};olympe.net.eb.Wy={Sz:'text/html',JSON:'application/json',qC:'application/zip'};olympe.net.eb.od={Gs:0,Lh:200,zl:201,Dj:202,Hy:400,NB:401,it:403,lA:404,fA:405,Lq:500,Mu:503};function Lb(a){return a.host&&encodeURI(a.host)}function Mb(a){return encodeURI(a.path).replace(olympe.net.Gk.C,(b,c)=>'%'+c)}function Nb(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`${Nb(this)?'wss':'ws'}://${Lb(this)}:${this.port}/${Mb(this)}`}toString(){return`${Lb(this)}:${this.port}/${Mb(this)}`}};
355
355
  olympe.net.Gk.C=/%25([0-9a-f]{2})/i;olympe.net.WebSocket=class{send(){}close(){}ka(){}aa(){}V(){}};function Ob(a,b,c,d){a=olympe.W.Zx(a.valueOf());if(!a.host&&!a.path)return null;const e=a.scheme?a.scheme.includes('s'):!1;b=new olympe.net.Zj(a.host,a.port||(e?443:80),a.path||'',e,b,c,d,a.query||void 0);a.vs&&(c=a.vs.split(':'),2===c.length&&(c=olympe.W.di().C(Da(`${c[0]}:${c[1]}`)),Pb(b,{Authorization:`Basic ${c}`})));return b}function Qb(a){return void 0!==a.query?a.query.replace(/[^=&]+/g,b=>encodeURIComponent(b)):null}
356
356
  function Pb(a,b){for(let c in b)Object.prototype.hasOwnProperty.call(b,c)&&(a.headers[c]=b[c])}
357
357
  olympe.net.Zj=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.eb.ae.GET;this.query=h;this.headers={};this.body=f;this.F=void 0!==g?g:olympe.net.eb.ResponseType.zk;this.ca=this.cert=this.key=null;this.rejectUnauthorized=!1}ij(){return this.headers}C(){let a=Qb(this);a=a?`?${a}`:'';return Lb(this)?`${Nb(this)?'https':'http'}://${Lb(this)}:${this.port}/${Mb(this)}${a}`:`${Mb(this)}${a}`}toString(){return this.C()}};
358
- olympe.net.Zj.ae={mm:'POST',GET:'GET',st:'HEAD',mk:'PUT',Fc:'DELETE',gm:'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}ij(){return this.headers}};function Rb(a,b,c){const d=olympe.D.Ia(),e=d.onDestroy(()=>{var f=a.F();const g=f.C.get(b);g&&(f.C.delete(b),g())});return d.Cb(f=>{d.Je(e);a.F().C.delete(b);c(f)})}olympe.net.sa=class{constructor(a){this.L=a;this.G=1;a='Initializing NET layer';this.L.G()&&(a+=' (implementation: '+this.V()+')');this.L.info(a);this.L.log('DONE initializing NET layer (ready to receive connection requests)')}F(){}aa(){}C(){}N(){}V(){}};function Sb(a){return!(!a.client||!a.client.connected)}function Tb(a,b,c){a.connect();a.client.subscribe(b,void 0,d=>{d?a.L.error(`Failed to subscribe to topic ${b}: ${d}`):a.C.set(b,c)})}function Ub(a,b,c){a.connect();a.client.unsubscribe(b,void 0,c);a.C.delete(b)}
358
+ olympe.net.Zj.ae={mm:'POST',GET:'GET',st:'HEAD',mk:'PUT',Fc:'DELETE',gm:'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}Sd(){return this.status}ij(){return this.headers}};function Rb(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.Cb(f=>{d.Je(e);a.F().C.delete(b);c(f)})}olympe.net.sa=class{constructor(a){this.L=a;this.G=1;a='Initializing NET layer';this.L.G()&&(a+=' (implementation: '+this.V()+')');this.L.info(a);this.L.log('DONE initializing NET layer (ready to receive connection requests)')}F(){}aa(){}C(){}N(){}V(){}};function Sb(a){return!(!a.client||!a.client.connected)}function Tb(a,b,c){a.connect();a.client.subscribe(b,void 0,d=>{d?a.L.error(`Failed to subscribe to topic ${b}: ${d}`):a.C.set(b,c)})}function Ub(a,b,c){a.connect();a.client.unsubscribe(b,void 0,c);a.C.delete(b)}
359
359
  olympe.net.hk=class{constructor(a,b){this.url=a;this.G=b||null;this.client=null;this.F=[];this.C=new Map;this.L=olympe.pa.Xa('MQTT')}connect(a){if(Sb(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.hk.C.gu,(b,c)=>{this.C.has(b)?this.C.get(b)(JSON.parse(c.toString())):this.L.warn('There is no subscriber for topic '+b)}),this.client.on(olympe.net.hk.C.Ls,()=>this.F.forEach(b=>b())));return this}publish(a,b,c,d){this.connect();
360
360
  this.client.publish(a,JSON.stringify(b),c,e=>{d&&d(e);e&&this.L.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.hk.C={Ls:'connect',gu:'message',Ry:'close',hz:'end'};olympe.net.Fk=class{constructor(a){this.L=a}aa(){this.L.error('Try to set cors policies on a web server with the browser implementation.');return this}N(){return Promise.reject('Try to open a route on a web server using the browser implementation.')}Z(){return Promise.reject('Try to close a route on a web server using the browser implementation.')}};olympe.net.O={va:'net.Manager',Ea:'net.Logger',Dm:'net.WebServer'};olympe.net.Config={Nl:'net.httpHost',Ol:'net.httpPort',mp:'net.httpSSL'};
361
361
  olympe.T.config(function(a){const b='object'===typeof window&&window.location&&window.location.hostname||'localhost',c='localhost'===b;E(a,olympe.net.Config.Nl,b);E(a,olympe.net.Config.Ol,c?3141:443);E(a,olympe.net.Config.mp,!c);ta(a,olympe.net.O.va);C(a,olympe.net.O.Ea,[olympe.pa.O.va],function(d){return d.Nc('net')});B(a,olympe.net.O.Dm,olympe.net.Fk,olympe.net.O.Ea)},'olympe.net');olympe.async={};function Vb(a,b){0<=b&&(a.timeout=b)}function Wb(a,b){a.N||a.qd.push(a.G.Cb(b))}
@@ -363,161 +363,161 @@ olympe.async.Mo=class{constructor(a,b=void 0===a){this.C=[];this.qd=[];this.G=a|
363
363
  [];this.qd=[];this.env.clear();this.ra&&this.G.destroy()}complete(a){if(!this.N){this.N=!0;this.Z&&(clearTimeout(this.Z),this.Z=0);this.L&&this.L.log(a?'Executor completed successfully':`Executor completed with error: ${this.F}`);for(const b of this.qd)b(a,a?null:this.F,this.env);this.clear()}}};
364
364
  function Xb(a){if(0<a.C.length){const b=a.C.shift();a.L&&a.L.log(`Executing next task. ${a.C.length} tasks left in the pipeline.`);a.G.run(()=>{b(()=>{Promise.resolve().then(()=>{Xb(a)})},c=>{c&&(a.F=c);a.complete(!1)},a.env)})}else a.complete(!0)}olympe.async.wk=class extends olympe.async.Mo{static create(){return new olympe.async.wk(new olympe.D.Wb('SequencedExecutor'),!0)}insert(a){this.N||this.C.unshift(a);return this}start(){this.V||(super.start(),Xb(this))}};
365
365
  olympe.async.qg=class extends olympe.async.Mo{constructor(a,b){super(a,b);this.aa=0;this.ka=!0}static create(){return new olympe.async.qg(new olympe.D.Wb('ParallelExecutor'),!0)}run(a){this.L&&this.L.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.V&&!this.N&&(this.aa++,this.run(a));return this}done(){this.aa--;0>=this.aa&&this.complete(this.ka)}start(){if(!this.V)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.hc={};olympe.hc.Wt=class{constructor(){}set(){}get(){}forEach(){}remove(){}clear(){}close(){}};olympe.hc.Vt=class{constructor(){}C(){}};olympe.hc.Storage=class{open(){}F(){}V(){}write(){}G(){}N(){}C(){}close(){}};function Yb(a,b,c){a.storage.F(c)}function Zb(a,b,c,d,e){a.storage.write(b,'transactions',c.toJSON(),'text/json',d,e)}function $b(a,b){a.storage.G(b)}function ac(a,b){a.storage.C(b)}function bc(a,b,c,d,e,f){a.storage.write(b,'files',c,d,()=>{e('files/'+b)},f)}function cc(a,b){a.storage.V(b)}olympe.hc.Xs=class{constructor(a){this.storage=a}};olympe.hc.O={dk:'localStorage.KeyValueManager',Ri:'localStorage.Storage',vo:'localStorage.DatacloudStorage',Ea:'localStorage.Logger'};olympe.T.config(function(a){ta(a,olympe.hc.O.dk);C(a,olympe.hc.O.Ea,[olympe.pa.O.va],function(b){return b.Nc('localstorage')});B(a,olympe.hc.O.vo,olympe.hc.Xs,olympe.hc.O.Ri)},'olympe.localstorage');olympe.auth={};olympe.auth.Uu=class{V(){}N(){}Sa(){}aa(){}ki(){}rh(){}Ur(){}};function dc(a){a.L.info('Initializing AUTH layer');let b=a.zc;if(a.ka){const c=a.ka.C(),d=Gb(c.parameters);b=d||b;d&&a.ka.F(c.parameters.filter(e=>'authToken'!==e.ma()))}b&&a.storage&&ec(a.storage,b,c=>{!c&&a.L.error('Could not store authToken')});a.L.debug('Asking to be notified when auth connector gets online');a.F.V(()=>{if(a.ab)if(a.N=olympe.auth.sa.G.xs,a.L.log('Connector online, parameter auth.autoLogin=true --\x3e attempting to log with parameters'),a.Z){const c=new olympe.auth.Request;c.set('username',
367
- a.Z);c.Hn(a.bb);a.L.log('Autologin with user "'+a.Z+'"');fc(a,c)}else a.L.error('autoLogin: auto user not specified.'),gc(a);else a.N=olympe.auth.sa.G.Ak,a.L.log('Connector online, attempting to log with token'),hc(a)});a.F.N(()=>{switch(olympe.D.Ya(a.G)){case olympe.auth.sa.C.Ng:a.L.warn('Disconnected from server - session of user '+olympe.D.Ya(a.C.Eb()).Sd()+' lost');break;case olympe.auth.sa.C.Eh:a.L.warn('Disconnected from server - guest session lost');break;case olympe.auth.sa.C.pi:a.L.warn('Disconnected from server - authentication aborted');
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.Wt=class{constructor(){}set(){}get(){}forEach(){}remove(){}clear(){}close(){}};olympe.ic.Vt=class{constructor(){}C(){}};olympe.ic.Storage=class{open(){}F(){}V(){}write(){}G(){}N(){}C(){}close(){}};function Yb(a,b,c){a.storage.F(c)}function Zb(a,b,c,d,e){a.storage.write(b,'transactions',c.toJSON(),'text/json',d,e)}function $b(a,b){a.storage.G(b)}function ac(a,b){a.storage.C(b)}function bc(a,b,c,d,e,f){a.storage.write(b,'files',c,d,()=>{e('files/'+b)},f)}function cc(a,b){a.storage.V(b)}olympe.ic.Xs=class{constructor(a){this.storage=a}};olympe.ic.O={dk:'localStorage.KeyValueManager',Ri:'localStorage.Storage',vo:'localStorage.DatacloudStorage',Ea:'localStorage.Logger'};olympe.T.config(function(a){ta(a,olympe.ic.O.dk);C(a,olympe.ic.O.Ea,[olympe.pa.O.va],function(b){return b.Nc('localstorage')});B(a,olympe.ic.O.vo,olympe.ic.Xs,olympe.ic.O.Ri)},'olympe.localstorage');olympe.auth={};olympe.auth.Uu=class{V(){}N(){}Sa(){}aa(){}ki(){}rh(){}Ur(){}};function dc(a){a.L.info('Initializing AUTH layer');let b=a.zc;if(a.ka){const c=a.ka.C(),d=Gb(c.parameters);b=d||b;d&&a.ka.F(c.parameters.filter(e=>'authToken'!==e.ma()))}b&&a.storage&&ec(a.storage,b,c=>{!c&&a.L.error('Could not store authToken')});a.L.debug('Asking to be notified when auth connector gets online');a.F.V(()=>{if(a.ab)if(a.N=olympe.auth.sa.G.xs,a.L.log('Connector online, parameter auth.autoLogin=true --\x3e attempting to log with parameters'),a.Z){const c=new olympe.auth.Request;c.set('username',
367
+ a.Z);c.Hn(a.bb);a.L.log('Autologin with user "'+a.Z+'"');fc(a,c)}else a.L.error('autoLogin: auto user not specified.'),gc(a);else a.N=olympe.auth.sa.G.Ak,a.L.log('Connector online, attempting to log with token'),hc(a)});a.F.N(()=>{switch(olympe.D.Ya(a.G)){case olympe.auth.sa.C.Ng:a.L.warn('Disconnected from server - session of user '+olympe.D.Ya(a.C.Eb()).Td()+' lost');break;case olympe.auth.sa.C.Eh:a.L.warn('Disconnected from server - guest session lost');break;case olympe.auth.sa.C.pi:a.L.warn('Disconnected from server - authentication aborted');
368
368
  break;case olympe.auth.sa.C.INIT:a.L.warn('Cannot open auth session - no server connection');break;default:a.L.error('Should not get there, investigate')}ic(a,olympe.auth.sa.C.hg)});a.F.Sa((c,d)=>{if(c===olympe.auth.sa.F.Dj)a.L.info('Authentication revoked'),gc(a),a.storage&&jc(a.storage),a.ra.forEach(e=>{e(c,d)});else if(c===olympe.auth.sa.F.pp)a.L.info('Redirection to IDP to invalidate token (SAML)'),a.storage&&jc(a.storage),a.Sa.F();else throw Error(`Unknown logout step coming from server : ${c}`);
369
369
  });a.L.log('DONE initializing AUTH layer (waiting for connector to be online)')}
370
- function hc(a){null!==a.storage?(a.L.debug('Retrieving token from local storage'),a.storage.ed(b=>{if(b){const d=new olympe.auth.Request;var c=b.Sd();d.set('username',c);b=b.Kf();d.set('nonce',b);a.L.debug('Token found, trying login with',d);fc(a,d,a.cc)}else a.L.debug('No token found, cannot perform auto login. Falling back in GUEST state'),gc(a)})):(a.L.error('Cannot retrieve token: no storage configured, cannot perform auto login. Falling back in GUEST state'),gc(a))}
370
+ function hc(a){null!==a.storage?(a.L.debug('Retrieving token from local storage'),a.storage.ed(b=>{if(b){const d=new olympe.auth.Request;var c=b.Td();d.set('username',c);b=b.Kf();d.set('nonce',b);a.L.debug('Token found, trying login with',d);fc(a,d,a.ec)}else a.L.debug('No token found, cannot perform auto login. Falling back in GUEST state'),gc(a)})):(a.L.error('Cannot retrieve token: no storage configured, cannot perform auto login. Falling back in GUEST state'),gc(a))}
371
371
  function ic(a,b){a.L.log('State change: ',kc(a),'--\x3e',b);a.G.update(b)}function gc(a){a.C.update(a.Da);ic(a,olympe.auth.sa.C.Eh);a.L.info('Authenticated as guest')}function kc(a){return olympe.D.Ya(a.G.Eb())}function lc(a){const b=olympe.auth.sa.C.Ng,c=olympe.auth.sa.C.Eh,d=olympe.auth.sa.C.pi,e=olympe.D.Kc(olympe.D.qa,'auth.isOnline');olympe.D.wc([a.G],f=>{f=olympe.D.Ac(f===b||f===c||f===d);const g=olympe.D.Ya(e);void 0!==g&&g.qb(f)||e.update(f)},'Router is online');return e.Eb()}
372
372
  function mc(a){var b=olympe.public.Ta.get(),c='logoutCallback';void 0===c&&(c=olympe.W.Ag());b.ra.set(c,a)}function nc(a){return a.C.Eb().Kf()}function oc(a,b,c,d=!1){b=b+c?':'+c.message:'';a.L.error(b);a.error.update(olympe.D.Bb(b));ic(a,olympe.auth.sa.C.qc);if(d)throw Error(b);}
373
373
  function fc(a,b,c,d){void 0===c&&(c=a.Ab);void 0===c&&oc(a,'No authentication provider specified',null,!0);const e=a.Hb.get(c);e||oc(a,'Undefined authentication provider "'+c+'"',null,!0);d&&a.V.set('login',d);a.L.log('Sending authentication request using "'+c+'" for '+b);e.ed(b,a.Xb.bind(a));ic(a,olympe.auth.sa.C.pi)}function pc(a,b,c){a.V.forEach(d=>{d(b,c)})}
374
- olympe.auth.sa=class{constructor(a,b,c,d,e,f,g,h,k,l,n,p){this.L=a;this.F=b;this.storage=c;this.Sa=d;this.ka=e;this.Ab=g;this.cc=h;this.ab=void 0===k?!0:k;this.Z=l;this.bb=n;this.zc=p;this.Hb=new Map;this.G=olympe.D.Kc(String).update(olympe.auth.sa.C.INIT);this.error=olympe.D.Kc(olympe.D.Wa);this.N=null;this.Da=new olympe.auth.tf('guest','0163d9653067b6237f62','e96e099c-55bb-4004-b0e8-bd76b6209218');this.C=olympe.D.Kc(olympe.auth.tf).update(this.Da);this.V=new Map;this.ra=new Map;f.forEach(q=>{const r=
375
- q.ma();if(this.Hb.has(r))throw Error('Provider "'+r+'" has already been registered !');this.Hb.set(r,q)});dc(this)}getState(){return this.G.Eb()}aa(){return this.error.Eb()}Sd(){return this.C.Eb().Sd()}Eg(){return this.C.Eb().Eg()}ei(){return this.C.Eb().ei()}rh(a,b){this.F.rh(a,olympe.D.Ya(nc(this)),b)}yn(){this.L.debug('Sending logout');jc(this.storage);this.F.aa(a=>{a?oc(this,'Logout request rejected:',a):this.L.debug('Logout request acknowledged')})}ki(){kc(this)===olympe.auth.sa.C.Ng&&this.F.ki(a=>
376
- {a&&this.L.error('Was not able to send the auth keep alive message:',a.message)})}Xb(a,b){const c=null===this.N?olympe.auth.sa.G.du:this.N;this.N=null;a?(this.L.warn('Authentication rejected: '+a.message+'. Falling back into GUEST state'),jc(this.storage),this.error.update(olympe.D.Bb(a.message)),gc(this),pc(this,a,c)):(this.L.info('User '+b.Sd()+' (#'+b.Eg()+') successfully authenticated'),this.C.update(b),ic(this,olympe.auth.sa.C.Ng),pc(this,a,c),this.storage&&ec(this.storage,b));this.V.has('login')&&
377
- this.V.delete('login')}};olympe.auth.sa.C={INIT:'init',hg:'disconnected',Eh:'guest',pi:'authenticating',qc:'error',Ng:'authenticated'};olympe.auth.sa.G={du:'manual',xs:'auto',Ak:'tokenOnFirstConnection'};olympe.auth.sa.F={Dj:'accepted',pp:'redirect'};olympe.auth.Oi=class{ma(){}ed(){}};olympe.auth.Request=class{constructor(){this.C=new Map}set(a,b){olympe.D.wc([b],c=>{this.C.set(a.toLocaleLowerCase(),c.toString())})}get(a){(a=this.C.get(a.toLowerCase()))&&a.xf&&(a=a.Ma.Ib);return a?a.valueOf():a}Sd(){return this.get('username')}Hn(a){this.set('password',a)}Kf(){return this.get('nonce')}toString(){return this.Sd()+(this.Kf()?' with nonce':'')+(this.get('password')?' with password':'')}};olympe.auth.tf=class{constructor(a,b,c,d={}){this.user=a;this.Cj=b;this.F=c;this.G=d}Sd(){return this.user}Eg(){return this.Cj}Kf(){return this.F}bk(){return this.G}ei(){return null}ia(){var a=olympe.W,b=a.Cr;var c=JSON.stringify({user:this.user,userTag:this.Cj,nonce:this.F,payload:this.G});c=olympe.W.di().C(Da(c));return b.call(a,c)}};m=olympe.auth.tf.prototype;m.Sd.K=new olympe.D.J(()=>String,[]);m.Eg.K=new olympe.D.J(()=>String,[]);m.Kf.K=new olympe.D.J(()=>String,[]);
378
- m.bk.K=new olympe.D.J(()=>Object,[]);m.ei.K=new olympe.D.J(()=>String,[]);m.ia.K=new olympe.D.J(()=>String,[]);olympe.auth.jm=class extends olympe.auth.tf{constructor(a,b,c,d){super(a,b,c,d)}ei(){return this.bk().access_token||null}};olympe.auth.Jq=class extends olympe.auth.tf{constructor(a,b,c,d){super(a,b,c,d);this.C=null}ei(){return this.C}ia(){var a=olympe.W.di(),b={user:this.Sd(),userTag:this.Eg(),nonce:this.Kf(),payload:this.bk(),fullToken:this.C},c=olympe.W,d=c.Cr;b=JSON.stringify(b);a=a.C(Da(b));return d.call(c,a)}};function ec(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 jc(a){const b=a.C.C('AUTH');b.remove(a.key,()=>b.close())}
374
+ olympe.auth.sa=class{constructor(a,b,c,d,e,f,g,h,k,l,n,p){this.L=a;this.F=b;this.storage=c;this.Sa=d;this.ka=e;this.Ab=g;this.ec=h;this.ab=void 0===k?!0:k;this.Z=l;this.bb=n;this.zc=p;this.Hb=new Map;this.G=olympe.D.Kc(String).update(olympe.auth.sa.C.INIT);this.error=olympe.D.Kc(olympe.D.Wa);this.N=null;this.Da=new olympe.auth.tf('guest','0163d9653067b6237f62','e96e099c-55bb-4004-b0e8-bd76b6209218');this.C=olympe.D.Kc(olympe.auth.tf).update(this.Da);this.V=new Map;this.ra=new Map;f.forEach(q=>{const r=
375
+ q.ma();if(this.Hb.has(r))throw Error('Provider "'+r+'" has already been registered !');this.Hb.set(r,q)});dc(this)}getState(){return this.G.Eb()}aa(){return this.error.Eb()}Td(){return this.C.Eb().Td()}Eg(){return this.C.Eb().Eg()}ei(){return this.C.Eb().ei()}rh(a,b){this.F.rh(a,olympe.D.Ya(nc(this)),b)}yn(){this.L.debug('Sending logout');jc(this.storage);this.F.aa(a=>{a?oc(this,'Logout request rejected:',a):this.L.debug('Logout request acknowledged')})}ki(){kc(this)===olympe.auth.sa.C.Ng&&this.F.ki(a=>
376
+ {a&&this.L.error('Was not able to send the auth keep alive message:',a.message)})}Xb(a,b){const c=null===this.N?olympe.auth.sa.G.du:this.N;this.N=null;a?(this.L.warn('Authentication rejected: '+a.message+'. Falling back into GUEST state'),jc(this.storage),this.error.update(olympe.D.Bb(a.message)),gc(this),pc(this,a,c)):(this.L.info('User '+b.Td()+' (#'+b.Eg()+') successfully authenticated'),this.C.update(b),ic(this,olympe.auth.sa.C.Ng),pc(this,a,c),this.storage&&ec(this.storage,b));this.V.has('login')&&
377
+ this.V.delete('login')}};olympe.auth.sa.C={INIT:'init',hg:'disconnected',Eh:'guest',pi:'authenticating',qc:'error',Ng:'authenticated'};olympe.auth.sa.G={du:'manual',xs:'auto',Ak:'tokenOnFirstConnection'};olympe.auth.sa.F={Dj:'accepted',pp:'redirect'};olympe.auth.Oi=class{ma(){}ed(){}};olympe.auth.Request=class{constructor(){this.C=new Map}set(a,b){olympe.D.wc([b],c=>{this.C.set(a.toLocaleLowerCase(),c.toString())})}get(a){(a=this.C.get(a.toLowerCase()))&&a.xf&&(a=a.Ma.Ib);return a?a.valueOf():a}Td(){return this.get('username')}Hn(a){this.set('password',a)}Kf(){return this.get('nonce')}toString(){return this.Td()+(this.Kf()?' with nonce':'')+(this.get('password')?' with password':'')}};olympe.auth.tf=class{constructor(a,b,c,d={}){this.user=a;this.Cj=b;this.F=c;this.G=d}Td(){return this.user}Eg(){return this.Cj}Kf(){return this.F}bk(){return this.G}ei(){return null}ia(){var a=olympe.W,b=a.Cr;var c=JSON.stringify({user:this.user,userTag:this.Cj,nonce:this.F,payload:this.G});c=olympe.W.di().C(Da(c));return b.call(a,c)}};m=olympe.auth.tf.prototype;m.Td.K=new olympe.D.J(()=>String,[]);m.Eg.K=new olympe.D.J(()=>String,[]);m.Kf.K=new olympe.D.J(()=>String,[]);
378
+ m.bk.K=new olympe.D.J(()=>Object,[]);m.ei.K=new olympe.D.J(()=>String,[]);m.ia.K=new olympe.D.J(()=>String,[]);olympe.auth.jm=class extends olympe.auth.tf{constructor(a,b,c,d){super(a,b,c,d)}ei(){return this.bk().access_token||null}};olympe.auth.Jq=class extends olympe.auth.tf{constructor(a,b,c,d){super(a,b,c,d);this.C=null}ei(){return this.C}ia(){var a=olympe.W.di(),b={user:this.Td(),userTag:this.Eg(),nonce:this.Kf(),payload:this.bk(),fullToken:this.C},c=olympe.W,d=c.Cr;b=JSON.stringify(b);a=a.C(Da(b));return d.call(c,a)}};function ec(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 jc(a){const b=a.C.C('AUTH');b.remove(a.key,()=>b.close())}
379
379
  olympe.auth.zm=class{constructor(a,b,c){this.C=a;this.L=b;this.key='OlympeToken-'+c.C}ed(a){const b=this.C.C('AUTH');this.L.debug(`olympe.auth.TokenStorage: retrieve token with key ${this.key}`);b.get(this.key,c=>{let d=null;if(c)try{this.L.debug('olympe.auth.TokenStorage: Token retrieved successfully');{var e=JSON,f=e.parse;var g=Ea(olympe.W.di().V(olympe.W.Cv(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.jm(h.user,h.userTag,h.nonce,h.payload):new olympe.auth.tf(h.user,h.userTag,h.nonce,h.payload)}}catch(h){this.L.error('Error while unserializing token: ',h.message)}else this.L.debug('olympe.auth.TokenStorage: No token found');b.close();a(d)})}};olympe.auth.zm.F='OlympeToken';olympe.auth.zm.C='AUTH';olympe.auth.tk=class{redirect(){}F(){}C(){}};olympe.auth.tk.C={GET:'GET',mm:'POST'};olympe.auth.ql=class{constructor(a){this.C=a||'default'}};olympe.auth.Hb={};olympe.auth.Hb.oa={};olympe.auth.Hb.oa.Ji=class{Z(){}};olympe.auth.Hb.oa.Re=class{ka(){}};olympe.auth.Hb.oa.Ee=class{ra(){}Da(){}};function qc(a,b){return olympe.W.mb(b+'-olympe-'+a.C[b])}olympe.auth.Hb.Ii=class{constructor(a){this.C=a}ma(){return'local'}ed(a,b){const c=a.Sd();if(c){const d=a.get('password'),e=a.Kf();a.C.delete('password');if(void 0!==e&&qc(this,c)===e){b(null,new olympe.auth.tf(c,'',qc(this,c)));return}a=olympe.W.mb(d||'');if(this.C[c]===a){b(null,new olympe.auth.tf(c,'',qc(this,c)));return}}b(Error('Invalid login'))}};olympe.auth.Hb.Ii.C='local';olympe.auth.Hb.Ii.la=[olympe.auth.Oi];olympe.auth.Hb.Ji=class{constructor(a,b){this.C=a;this.storage=b}ma(){return'localToken'}ed(a,b){this.storage.ed(c=>{this.C.Z(a,(d,e)=>{b(d,e||c)})})}};olympe.auth.Hb.Ji.C='localToken';olympe.auth.Hb.Ji.la=[olympe.auth.Oi];olympe.auth.Hb.im=class{constructor(a,b){this.C=a;this.F=b}ma(){return'openID'}ed(){const a=this.C.C();this.C.redirect(`${this.F}/auth?url=${a}`,null,olympe.auth.tk.C.GET)}};olympe.auth.Hb.im.C='openID';olympe.auth.Hb.im.la=[olympe.auth.Oi];olympe.auth.Hb.Re=class{constructor(a,b){this.F=a;this.C=b}ma(){return'saml'}ed(a,b){this.F.ka(c=>{c?b(c):this.C.F()})}};olympe.auth.Hb.Re.C='saml';olympe.auth.Hb.Re.la=[olympe.auth.Oi];olympe.auth.Hb.Ee=class{static dj(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.L=olympe.pa.Xa('auth')}ma(){return'srp'}ed(a,b){const c=a.get('password');a.C.delete('password');this.L.debug('Sending SRP request');this.C.ra(a,(d,e,f)=>{this.L.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);
380
+ h.payload.id_token?new olympe.auth.jm(h.user,h.userTag,h.nonce,h.payload):new olympe.auth.tf(h.user,h.userTag,h.nonce,h.payload)}}catch(h){this.L.error('Error while unserializing token: ',h.message)}else this.L.debug('olympe.auth.TokenStorage: No token found');b.close();a(d)})}};olympe.auth.zm.F='OlympeToken';olympe.auth.zm.C='AUTH';olympe.auth.tk=class{redirect(){}F(){}C(){}};olympe.auth.tk.C={GET:'GET',mm:'POST'};olympe.auth.ql=class{constructor(a){this.C=a||'default'}};olympe.auth.Hb={};olympe.auth.Hb.oa={};olympe.auth.Hb.oa.Ji=class{Z(){}};olympe.auth.Hb.oa.Re=class{ka(){}};olympe.auth.Hb.oa.Ee=class{ra(){}Da(){}};function qc(a,b){return olympe.W.mb(b+'-olympe-'+a.C[b])}olympe.auth.Hb.Ii=class{constructor(a){this.C=a}ma(){return'local'}ed(a,b){const c=a.Td();if(c){const d=a.get('password'),e=a.Kf();a.C.delete('password');if(void 0!==e&&qc(this,c)===e){b(null,new olympe.auth.tf(c,'',qc(this,c)));return}a=olympe.W.mb(d||'');if(this.C[c]===a){b(null,new olympe.auth.tf(c,'',qc(this,c)));return}}b(Error('Invalid login'))}};olympe.auth.Hb.Ii.C='local';olympe.auth.Hb.Ii.la=[olympe.auth.Oi];olympe.auth.Hb.Ji=class{constructor(a,b){this.C=a;this.storage=b}ma(){return'localToken'}ed(a,b){this.storage.ed(c=>{this.C.Z(a,(d,e)=>{b(d,e||c)})})}};olympe.auth.Hb.Ji.C='localToken';olympe.auth.Hb.Ji.la=[olympe.auth.Oi];olympe.auth.Hb.im=class{constructor(a,b){this.C=a;this.F=b}ma(){return'openID'}ed(){const a=this.C.C();this.C.redirect(`${this.F}/auth?url=${a}`,null,olympe.auth.tk.C.GET)}};olympe.auth.Hb.im.C='openID';olympe.auth.Hb.im.la=[olympe.auth.Oi];olympe.auth.Hb.Re=class{constructor(a,b){this.F=a;this.C=b}ma(){return'saml'}ed(a,b){this.F.ka(c=>{c?b(c):this.C.F()})}};olympe.auth.Hb.Re.C='saml';olympe.auth.Hb.Re.la=[olympe.auth.Oi];olympe.auth.Hb.Ee=class{static dj(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.L=olympe.pa.Xa('auth')}ma(){return'srp'}ed(a,b){const c=a.get('password');a.C.delete('password');this.L.debug('Sending SRP request');this.C.ra(a,(d,e,f)=>{this.L.debug('Received Salt+B message');if(d)b(d);else{try{const g=new SRPClient;g.step1(a.Td(),c);const h=g.step2(e,f);a.set('a',h.A);a.set('m1',h.M1)}catch(g){b(g);
381
381
  return}this.L.debug('Sending SRP A+M (proof) message');this.C.Da(a,b)}})}};olympe.auth.Hb.Ee.C='srp';olympe.auth.Hb.Ee.la=[olympe.auth.Oi];olympe.auth.O={va:'auth.Manager',Ea:'auth.Logger',Ri:'auth.Storage',Ej:'auth.appNameToken',pk:'auth.Redirector'};olympe.auth.td={va:'auth.ManagerConnector',Jp:'auth.LocalTokenConnector',Ee:'auth.SRPConnector',Re:'auth.SAMLConnector'};olympe.auth.Config={Dl:'auth.defaultProvider',Kp:'auth.localTokenProvider',Pn:'auth.autoLogin',Tn:'auth.autoUser',Qn:'auth.autoPassword',Ak:'auth.token',Nn:'auth.appToken'};
382
- olympe.T.config(function(a){E(a,olympe.auth.Config.Dl,'srp');E(a,olympe.auth.Config.Kp,'localToken');E(a,olympe.auth.Config.Pn,!1);E(a,olympe.auth.Config.Tn,'');E(a,olympe.auth.Config.Qn,'');E(a,olympe.auth.Config.Ak,'');E(a,olympe.auth.Config.Nn,'default');C(a,olympe.auth.O.Ea,[olympe.pa.O.va],b=>b.Nc('auth'));B(a,olympe.auth.O.Ej,olympe.auth.ql,new olympe.T.fa(olympe.auth.Config.Nn));B(a,olympe.auth.O.Ri,olympe.auth.zm,olympe.hc.O.dk,olympe.auth.O.Ea,olympe.auth.O.Ej);ta(a,olympe.auth.td.va);ta(a,
382
+ olympe.T.config(function(a){E(a,olympe.auth.Config.Dl,'srp');E(a,olympe.auth.Config.Kp,'localToken');E(a,olympe.auth.Config.Pn,!1);E(a,olympe.auth.Config.Tn,'');E(a,olympe.auth.Config.Qn,'');E(a,olympe.auth.Config.Ak,'');E(a,olympe.auth.Config.Nn,'default');C(a,olympe.auth.O.Ea,[olympe.pa.O.va],b=>b.Nc('auth'));B(a,olympe.auth.O.Ej,olympe.auth.ql,new olympe.T.fa(olympe.auth.Config.Nn));B(a,olympe.auth.O.Ri,olympe.auth.zm,olympe.ic.O.dk,olympe.auth.O.Ea,olympe.auth.O.Ej);ta(a,olympe.auth.td.va);ta(a,
383
383
  olympe.auth.O.pk);C(a,olympe.auth.O.va,[olympe.auth.O.Ea,olympe.auth.td.va,olympe.host.O.Ml,new olympe.T.zb(olympe.auth.O.Ri,olympe.T.hf.C.Kh),new olympe.T.fa(olympe.auth.Config.Dl),new olympe.T.fa(olympe.auth.Config.Kp),new olympe.T.fa(olympe.auth.Config.Pn),new olympe.T.fa(olympe.auth.Config.Tn),new olympe.T.fa(olympe.auth.Config.Qn),new olympe.T.fa(olympe.auth.Config.Ak),new olympe.T.zb(olympe.auth.O.pk,olympe.T.hf.C.Kh),new olympe.T.zb(olympe.auth.td.Jp,olympe.T.hf.C.Kh),new olympe.T.zb(olympe.auth.td.Ee,
384
384
  olympe.T.hf.C.Kh),new olympe.T.zb(olympe.auth.td.Re,olympe.T.hf.C.Kh)],(b,c,d,e,f,g,h,k,l,n,p,q,r,t)=>{const u=[];q&&u.push(new olympe.auth.Hb.Ji(q,e));r&&u.push(new olympe.auth.Hb.Ee(r));t&&p&&u.push(new olympe.auth.Hb.Re(t,p));p&&c&&u.push(new olympe.auth.Hb.im(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.Dl+'cannot be found');return new olympe.auth.sa(b,
385
- c,e,p,d.pj()?d:null,u,f,g,h,k,l,n)},!0)},'olympe.auth');olympe.T.run([olympe.auth.O.va],a=>{olympe.auth.Qc=()=>a});olympe.dc={};olympe.dc.za={ORIGIN:'<',DESTINATION:'>'};z('olympe.dc.Direction',olympe.dc.za);olympe.dc.ic={Tc:'ff022000000000000000',yi:'ff02200000000000000e',ko:'ff02200000000000000f'};olympe.dc.$b={VERSION:'@v',Jd:'@s'};olympe.dc.Ug={mc:'?'};olympe.dc.xk={cq:'online',em:'offline',yt:'invalidate'};olympe.dc.Ja={rb:'self',Vc:'server',lq:'peer',mc:'server'};olympe.dc.xa=function(a){if('string'===typeof a)return a;let b=null;a=olympe.D.Ya(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.Ba.Tb(a)));return b||''};z('olympe.dc.instanceToTag',olympe.dc.xa);olympe.dc.Na=function(){return olympe.dc.Ad().view};olympe.dc.register=function(a,b){olympe.dc.Ba.C(a,b)};olympe.dc.defineProperty=function(a){return new olympe.dc.ta.Property(a)};
386
- olympe.dc.jh=function(a,b=olympe.dc.za.DESTINATION,c=olympe.dc.CloudObject,d=olympe.dc.za.DESTINATION){const e=olympe.dc.za.DESTINATION;return b===olympe.dc.za.ORIGIN||b===e?new olympe.dc.ta.Relation(a,b):new olympe.dc.ta.Relation(a,d,b,c)};olympe.dc.Ov=function(a){return a.Pc()};olympe.dc.Writable=class{F(){}pc(){}Jc(){}Ra(){}ec(){}};olympe.dc.om=class{Mc(){}Y(){}G(){}};function rc(a,b,c,d,e,f,g){d=new olympe.dc.ga(olympe.dc.ga.ja.Th,{file:b,url:null,content:c,$e:e?h=>{sc(a,b,c);f(h)}:f,mimeType:d,te:g||null},[olympe.dc.Na().source(b)||olympe.dc.Ja.Vc]);a.F.send(d)}function tc(a,b,c,d,e,f){c=c instanceof olympe.D.Wa?c.valueOf():c;'string'===typeof c?c=new Blob([Da(c)],{type:d}):c instanceof ArrayBuffer&&(c=new Blob([c],{type:d}));rc(a,b,c,d,a.G,e,f)}
387
- function sc(a,b,c){const d=olympe.dc.xa(b);a.C.set(d,c);const e=olympe.W.Ag();uc(olympe.dc.Na(),d,f=>{f||(a.C.delete(d),vc(olympe.dc.Na(),d,e))},e)}function wc(a,b,c,d){olympe.D.hs([b.$r(),b.R(),b.Ul(),b.jn()],(e,f,g,h)=>{a.C.has(f)?c(a.C.get(f)):(e=new olympe.dc.ga(olympe.dc.ga.ja.Bh,{file:f,url:e.valueOf()?null:g,mimeType:h.valueOf(),$e:a.G?k=>{sc(a,f,k);c(k)}:c,te:d},[olympe.dc.Na().source(f)||olympe.dc.Ja.Vc]),a.F.send(e))})}
388
- olympe.dc.lt=class{constructor(a,b,c,d,e){this.L=a;this.F=c;this.G=e;this.C=new Map}};olympe.dc.sa=class{constructor(a){this.L=a}};function xc(a,b){a.F=b;return a}function M(a,b){a.Yh.unshift(b);return a}olympe.dc.ga=class{constructor(a,b,c){this.type=a;this.content=b;this.C=c;this.Yh=[];this.F=olympe.D.Ia()}validate(a=null){this.Yh.forEach(b=>{b(a||null)})}toString(){const a=olympe.W.Sr(olympe.dc.ga.ja,this.type);return a?a:'UNKNOWN_MESSAGE'}};
389
- olympe.dc.ga.ja={qc:1,og:2,Sg:10,Qz:11,Pu:20,YA:21,ZA:22,Ru:23,Bi:24,Ai:25,Rz:26,$o:28,rm:30,tm:31,yu:32,eh:40,Bk:41,Ah:45,Jj:46,Tj:47,Th:50,Bh:51,xi:52,ev:60,Eu:61,nt:62,ot:63,Js:64,ul:65,Pz:90,Cl:91,Ll:92,ap:93,Fp:94,ik:95,Qu:96,QUERY_RESULT:97,sm:98};olympe.dc.rg=class{process(){}};olympe.dc.pm=class{constructor(...a){this.Ub=a}process(a,b,c){const d=this.Ub.length,e=(f,g,h)=>{g||f>=d?c(g,h):this.Ub[f].process(a,h,e.bind(null,f+1))};e(0,null,b)}};olympe.dc.pm.la=[olympe.dc.rg];olympe.dc.Hc=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.Hc&&this.tag===a.tag}static kc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.dc.Hc(b.tag)}};olympe.dc.Hc.la=[olympe.dc.ze];olympe.dc.Hc.prototype.toJSON.K=olympe.D.J.C;olympe.dc.Hc.prototype.qb.K=olympe.D.J.C;olympe.dc.sg=class{send(){}C(){}ra(){}};const yc=olympe.dc.za.ORIGIN,zc=olympe.dc.za.DESTINATION,Ac=new Map,Bc=new Map,Cc=new Map,Dc=new Map;function Ec(a,b){var c=olympe.dm.File;let d=c;'function'===typeof c&&(d=b.entry);c=[...(d.In||[])];return olympe.dc.Ba.C(a,b,...c)}function Fc(a,b){Dc.set(a,b);return a}function Gc(a){return(a=Ac.get(a))&&a.C||olympe.dc.CloudObject}function Hc(a,b,c){const d=a+'@'+(b===zc?yc:zc);if(Bc.has(d))throw Error(`Try to register the same relation (${b+a}) multiple times.`);Bc.set(d,c)}
385
+ c,e,p,d.pj()?d:null,u,f,g,h,k,l,n)},!0)},'olympe.auth');olympe.T.run([olympe.auth.O.va],a=>{olympe.auth.Qc=()=>a});olympe.dc={};olympe.dc.za={ORIGIN:'<',DESTINATION:'>'};z('olympe.dc.Direction',olympe.dc.za);olympe.dc.jc={Tc:'ff022000000000000000',yi:'ff02200000000000000e',ko:'ff02200000000000000f'};olympe.dc.$b={VERSION:'@v',Kd:'@s'};olympe.dc.Ug={bc:'?'};olympe.dc.xk={cq:'online',em:'offline',yt:'invalidate'};olympe.dc.Ha={rb:'self',Vc:'server',lq:'peer',bc:'server'};olympe.dc.xa=function(a){if('string'===typeof a)return a;let b=null;a=olympe.D.Ya(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.Ba.Rb(a)));return b||''};z('olympe.dc.instanceToTag',olympe.dc.xa);olympe.dc.Na=function(){return olympe.dc.Ad().view};olympe.dc.register=function(a,b){olympe.dc.Ba.C(a,b)};olympe.dc.defineProperty=function(a){return new olympe.dc.ta.Property(a)};
386
+ olympe.dc.jh=function(a,b=olympe.dc.za.DESTINATION,c=olympe.dc.CloudObject,d=olympe.dc.za.DESTINATION){const e=olympe.dc.za.DESTINATION;return b===olympe.dc.za.ORIGIN||b===e?new olympe.dc.ta.Relation(a,b):new olympe.dc.ta.Relation(a,d,b,c)};olympe.dc.Ov=function(a){return a.Pc()};olympe.dc.Writable=class{F(){}pc(){}Jc(){}Ra(){}fc(){}};olympe.dc.om=class{Mc(){}Y(){}G(){}};function rc(a,b,c,d,e,f,g){d=new olympe.dc.ga(olympe.dc.ga.ja.Th,{file:b,url:null,content:c,$e:e?h=>{sc(a,b,c);f(h)}:f,mimeType:d,te:g||null},[olympe.dc.Na().source(b)||olympe.dc.Ha.Vc]);a.F.send(d)}function tc(a,b,c,d,e,f){c=c instanceof olympe.D.Wa?c.valueOf():c;'string'===typeof c?c=new Blob([Da(c)],{type:d}):c instanceof ArrayBuffer&&(c=new Blob([c],{type:d}));rc(a,b,c,d,a.G,e,f)}
387
+ function sc(a,b,c){const d=olympe.dc.xa(b);a.C.set(d,c);const e=olympe.W.Ag();uc(olympe.dc.Na(),d,f=>{f||(a.C.delete(d),vc(olympe.dc.Na(),d,e))},e)}function wc(a,b,c,d){olympe.D.hs([b.$r(),b.R(),b.Ul(),b.jn()],(e,f,g,h)=>{a.C.has(f)?c(a.C.get(f)):(e=new olympe.dc.ga(olympe.dc.ga.ja.Bh,{file:f,url:e.valueOf()?null:g,mimeType:h.valueOf(),$e:a.G?k=>{sc(a,f,k);c(k)}:c,te:d},[olympe.dc.Na().source(f)||olympe.dc.Ha.Vc]),a.F.send(e))})}
388
+ olympe.dc.lt=class{constructor(a,b,c,d,e){this.L=a;this.F=c;this.G=e;this.C=new Map}};olympe.dc.sa=class{constructor(a){this.L=a}};function xc(a,b){a.F=b;return a}function M(a,b){a.Yh.unshift(b);return a}olympe.dc.ga=class{constructor(a,b,c){this.type=a;this.content=b;this.C=c;this.Yh=[];this.F=olympe.D.Ja()}validate(a=null){this.Yh.forEach(b=>{b(a||null)})}toString(){const a=olympe.W.Sr(olympe.dc.ga.ja,this.type);return a?a:'UNKNOWN_MESSAGE'}};
389
+ olympe.dc.ga.ja={qc:1,og:2,Sg:10,Qz:11,Pu:20,YA:21,ZA:22,Ru:23,Bi:24,Ai:25,Rz:26,$o:28,rm:30,tm:31,yu:32,eh:40,Bk:41,Ah:45,Jj:46,Tj:47,Th:50,Bh:51,xi:52,ev:60,Eu:61,nt:62,ot:63,Js:64,ul:65,Pz:90,Cl:91,Ll:92,ap:93,Fp:94,ik:95,Qu:96,QUERY_RESULT:97,sm:98};olympe.dc.rg=class{process(){}};olympe.dc.pm=class{constructor(...a){this.Ub=a}process(a,b,c){const d=this.Ub.length,e=(f,g,h)=>{g||f>=d?c(g,h):this.Ub[f].process(a,h,e.bind(null,f+1))};e(0,null,b)}};olympe.dc.pm.la=[olympe.dc.rg];olympe.dc.Hc=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.Hc&&this.tag===a.tag}static lc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.dc.Hc(b.tag)}};olympe.dc.Hc.la=[olympe.dc.ze];olympe.dc.Hc.prototype.toJSON.K=olympe.D.J.C;olympe.dc.Hc.prototype.qb.K=olympe.D.J.C;olympe.dc.sg=class{send(){}C(){}ra(){}};const yc=olympe.dc.za.ORIGIN,zc=olympe.dc.za.DESTINATION,Ac=new Map,Bc=new Map,Cc=new Map,Dc=new Map;function Ec(a,b){var c=olympe.dm.File;let d=c;'function'===typeof c&&(d=b.entry);c=[...(d.In||[])];return olympe.dc.Ba.C(a,b,...c)}function Fc(a,b){Dc.set(a,b);return a}function Gc(a){return(a=Ac.get(a))&&a.C||olympe.dc.CloudObject}function Hc(a,b,c){const d=a+'@'+(b===zc?yc:zc);if(Bc.has(d))throw Error(`Try to register the same relation (${b+a}) multiple times.`);Bc.set(d,c)}
390
390
  function Ic(a){a=a.R()+'@'+a.Oa();return Bc.get(a)||olympe.dc.CloudObject}function N(a,b){b.NAME=a;Cc.set(a,b)}function O(a){return a.NAME||null}
391
- olympe.dc.Ba=class{constructor(){}static C(a,b,...c){if(Ac.has(a))throw Error(`Tag: ${a} - overwriting already defined sync ${Ac.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);Ac.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.Pc();Hc(b.R(),b.Oa(),a.C);return b}function Jc(a){a.F=!0;return a}
391
+ olympe.dc.Ba=class{constructor(){}static C(a,b,...c){if(Ac.has(a))throw Error(`Tag: ${a} - overwriting already defined sync ${Ac.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);Ac.set(a,b);return b.C.entry=b}static Rb(a){return(a=a.entry)&&a.R()||null}};olympe.dc.ta={};function P(a,b){b=b.Pc();Hc(b.R(),b.Oa(),a.C);return b}function Jc(a){a.F=!0;return a}
392
392
  olympe.dc.ta.Entry=class{constructor(a,b,c){this.tag=a;this.C=b;this.In=c||null;this.F=!1}R(){return this.tag}instantiate(a,b){const c=this.C;if(this.mj()&&b.getParameter(olympe.dc.Config.Ho)){var d=olympe.dc.Na();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.pa.Xa('dc').error(d)}return this.In?(a=[void 0,a].concat(na(b,this.In)),new c(...a)):new c(void 0,
393
393
  a)}Ca(a){return new olympe.dc.ta.Property(a)}Pa(a,b=olympe.dc.za.DESTINATION){Hc(a,b,this.C);return new olympe.dc.X.Qb(a,b)}mj(){return this.F}};z('olympe.dc.registry.Entry',olympe.dc.ta.Entry);olympe.dc.ta.Entry.prototype.addRelation=olympe.dc.ta.Entry.prototype.Pa;olympe.dc.ta.Entry.prototype.addProperty=olympe.dc.ta.Entry.prototype.Ca;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.za.DESTINATION,c=olympe.dc.CloudObject,d=olympe.dc.CloudObject){this.tag=olympe.dc.xa(a);this.direction=b;this.origin=c;this.destination=d}R(){return this.tag}Oa(){return this.direction}type(){return this.destination}Pc(){return new olympe.dc.ta.Relation(this.tag,this.direction===olympe.dc.za.DESTINATION?olympe.dc.za.ORIGIN:olympe.dc.za.DESTINATION,this.destination,this.origin)}qb(a){return a instanceof olympe.dc.ta.Relation?a.R()===this.R()&&
394
- a.Oa()===this.Oa():!1}toString(){return this.direction+this.tag}};olympe.dc.ta.Relation.prototype.getInverse=olympe.dc.ta.Relation.prototype.Pc;olympe.dc.ta.Relation.prototype.getDirection=olympe.dc.ta.Relation.prototype.Oa;olympe.dc.ta.Relation.prototype.getTag=olympe.dc.ta.Relation.prototype.R;olympe.dc.ta.Relation.la=[olympe.dc.ze];olympe.dc.db={};function Kc(a,b,c,d,e,f=olympe.dc.Ja.rb){const g=c.Y();Lc(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);Mc(h,Nc(h,k.C,h.C.length),k.source);h.F.delete(g)}}}}function Oc(a,b){a.Ha.Sa(b)}function Pc(a,b,c){b&&a.Ha.Xc(b);c&&a.Ha.Nd(c)}
395
- olympe.dc.db.Zs=class{constructor(a,b,c,d,e){this.L=a;this.Ha=b;this.C=new olympe.dc.db.Os(a,b,d);this.view=new olympe.dc.ib(a,b);this.Cx=new olympe.dc.db.ju(this.L,this.view,b,e)}Xa(){return this.L}persist(a){this.Ha.Da();this.Ha.Ab(a,olympe.dc.db.Instance.C.oq);this.Ha.ra()}bf(a,b){this.C.bf(a,b)}};const Qc=olympe.dc.$b.VERSION,Rc=olympe.dc.$b.Jd,Sc=olympe.dc.ic.Tc,Tc=olympe.dc.ic.yi;
396
- olympe.dc.db.Database=class a extends Map{constructor(b,c){super();this.id=olympe.W.lc();this.L=b;this.cc=olympe.D.Ia();this.He=c.get('defaultSource')||olympe.dc.Ja.rb;this.V=olympe.dc.db.Database.F.IDLE;this.ka=new Map;this.Xb=[];this.G=[];this.bb=new Map;b=c.get('garbageCollector')||olympe.dc.db.Ci.C.Fl;new olympe.dc.db.Ci(this,b,this.cc);c.get('debug')&&this.Wf()}Y(){return this.id}getState(){return this.V}Xa(){return this.L}create(b,c){const d=this.N(b,!0);d.cc(c&&parseInt(c.get(Qc),10)||1);d.mi(c&&
397
- c.get(Rc)||this.He);c&&(c.delete(Qc),c.delete(Rc),this.qe(d,c));this.C(a.C.yp,b)}update(b,c,d=!1){if(void 0!==c&&null!==c){b=this.N(b,!0);var e=c&&parseInt(c.get(Qc),10);0>e||!d&&b.version()>=e||(c.delete(Qc),b.cc(isNaN(e)?b.version()+1:e),this.qe(b,c))}}Jc(b){const c=this.get(b);void 0!==c&&(this.ab(c,!1),this.C(a.C.zp,b))}link(b,c,d){c=this.N(c,!0);d=this.N(d,!0);switch(b){case Sc:c.Ve(d);break;case Tc:c.qe(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 Sc:c.wh(d);break;case Tc:c.Xf(d);break;default:c.unlink(b,d)}}Xc(b){for(const c of b)this.N(c).Ge()}Nd(b){for(const c of b)(b=this.get(c))&&b.detach()}Ab(b,c){b.forEach(d=>{this.N(d).Qf(c)})}zc(b){const c=this.get(b);void 0!==c&&(c.clear(),super.delete(b),this.C(a.C.Go,b))}N(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.Fo,b),c&&this.C(a.C.Dk,b));return d}Z(b,c,d=!1,e=null){return{[Symbol.iterator]:function*(f){const g=olympe.dm.Relation.C.Ck,
399
- h=olympe.dm.Relation.C.rk,k=olympe.dc.za.ORIGIN,l=olympe.dc.za.DESTINATION,n=a.bc.Oh+c,p=d?h:g,q=d?g:h,r=(new Map).set(f,!1),t=(v,w)=>(v=this.get(v))&&0!==(v.get(n)&w),u=([v,w])=>!r.has(v)&&(e?e(w):!0);for(const v of r.keys())r.get(v)||(r.set(v,!0),yield v),f=this.get(v),void 0!==f&&f.forEach((w,y)=>{(y[0]===k&&t(y.substring(1),q)||y[0]===l&&t(y.substring(1),p))&&Array.from(w.entries()).filter(u).forEach(([A])=>{r.set(A,!1)})})}.bind(this,b)}}ce(b){this.G[0].Te(olympe.W.Ag(),b)}aa(b){if(0===this.G.length)debugger;
394
+ a.Oa()===this.Oa():!1}toString(){return this.direction+this.tag}};olympe.dc.ta.Relation.prototype.getInverse=olympe.dc.ta.Relation.prototype.Pc;olympe.dc.ta.Relation.prototype.getDirection=olympe.dc.ta.Relation.prototype.Oa;olympe.dc.ta.Relation.prototype.getTag=olympe.dc.ta.Relation.prototype.R;olympe.dc.ta.Relation.la=[olympe.dc.ze];olympe.dc.db={};function Kc(a,b,c,d,e,f=olympe.dc.Ha.rb){const g=c.Y();Lc(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);Mc(h,Nc(h,k.C,h.C.length),k.source);h.F.delete(g)}}}}function Oc(a,b){a.Ia.Sa(b)}function Pc(a,b,c){b&&a.Ia.Xc(b);c&&a.Ia.Od(c)}
395
+ olympe.dc.db.Zs=class{constructor(a,b,c,d,e){this.L=a;this.Ia=b;this.C=new olympe.dc.db.Os(a,b,d);this.view=new olympe.dc.ib(a,b);this.Cx=new olympe.dc.db.ju(this.L,this.view,b,e)}Xa(){return this.L}persist(a){this.Ia.Da();this.Ia.Ab(a,olympe.dc.db.Instance.C.oq);this.Ia.ra()}bf(a,b){this.C.bf(a,b)}};const Qc=olympe.dc.$b.VERSION,Rc=olympe.dc.$b.Kd,Sc=olympe.dc.jc.Tc,Tc=olympe.dc.jc.yi;
396
+ olympe.dc.db.Database=class a extends Map{constructor(b,c){super();this.id=olympe.W.mc();this.L=b;this.ec=olympe.D.Ja();this.He=c.get('defaultSource')||olympe.dc.Ha.rb;this.V=olympe.dc.db.Database.F.IDLE;this.ka=new Map;this.Xb=[];this.G=[];this.bb=new Map;b=c.get('garbageCollector')||olympe.dc.db.Ci.C.Fl;new olympe.dc.db.Ci(this,b,this.ec);c.get('debug')&&this.Wf()}Y(){return this.id}getState(){return this.V}Xa(){return this.L}create(b,c){const d=this.N(b,!0);d.ec(c&&parseInt(c.get(Qc),10)||1);d.mi(c&&
397
+ c.get(Rc)||this.He);c&&(c.delete(Qc),c.delete(Rc),this.qe(d,c));this.C(a.C.yp,b)}update(b,c,d=!1){if(void 0!==c&&null!==c){b=this.N(b,!0);var e=c&&parseInt(c.get(Qc),10);0>e||!d&&b.version()>=e||(c.delete(Qc),b.ec(isNaN(e)?b.version()+1:e),this.qe(b,c))}}Jc(b){const c=this.get(b);void 0!==c&&(this.ab(c,!1),this.C(a.C.zp,b))}link(b,c,d){c=this.N(c,!0);d=this.N(d,!0);switch(b){case Sc:c.Ve(d);break;case Tc:c.qe(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 Sc:c.wh(d);break;case Tc:c.Xf(d);break;default:c.unlink(b,d)}}Xc(b){for(const c of b)this.N(c).Ge()}Od(b){for(const c of b)(b=this.get(c))&&b.detach()}Ab(b,c){b.forEach(d=>{this.N(d).Qf(c)})}zc(b){const c=this.get(b);void 0!==c&&(c.clear(),super.delete(b),this.C(a.C.Go,b))}N(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.Fo,b),c&&this.C(a.C.Dk,b));return d}Z(b,c,d=!1,e=null){return{[Symbol.iterator]:function*(f){const g=olympe.dm.Relation.C.Ck,
399
+ h=olympe.dm.Relation.C.rk,k=olympe.dc.za.ORIGIN,l=olympe.dc.za.DESTINATION,n=a.cc.Oh+c,p=d?h:g,q=d?g:h,r=(new Map).set(f,!1),t=(v,w)=>(v=this.get(v))&&0!==(v.get(n)&w),u=([v,w])=>!r.has(v)&&(e?e(w):!0);for(const v of r.keys())r.get(v)||(r.set(v,!0),yield v),f=this.get(v),void 0!==f&&f.forEach((w,y)=>{(y[0]===k&&t(y.substring(1),q)||y[0]===l&&t(y.substring(1),p))&&Array.from(w.entries()).filter(u).forEach(([A])=>{r.set(A,!1)})})}.bind(this,b)}}ce(b){this.G[0].Te(olympe.W.Ag(),b)}aa(b){if(0===this.G.length)debugger;
400
400
  this.G[0].C.delete(b)}C(b,c,...d){this.ka.has(b)&&this.ka.get(b).forEach(e=>{e(c,...d)})}ab(b,c){this.bb.set(b,c)}Pf(b,c,d,e){0<this.G.length&&Uc(this.G[0],b).Ca(e?Vc+c:c,d)}Qf(b,c,d,e,f){if(0<this.G.length){var g=this.G[0];d===Wc?f?Uc(g,b).link(c,e):Uc(g,b).unlink(c,e):f?Uc(g,b).bb(c,e):Uc(g,b).Ab(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.Xb.push(b)}Ve(b){return this.G.reduce((c,d)=>d.G.has(b)||c,!1)}Da(){this.V===a.F.IDLE&&(this.V=a.F.Ds);this.G.unshift(new olympe.dc.db.dt(this,
401
- this.cc))}ra(){this.V=a.F.cg;this.Xf();Xc(this.G[0]);this.G.shift();0===this.G.length&&(this.V=a.F.IDLE,this.Xb.forEach(b=>{b()}))}qe(b,c){const d=a.bc.mc;for(const [e,f]of c)void 0!==f&&(e[0]===d?b.ji(e.substr(1),f):b.update(e,f))}Xf(){const b=a.bc.ORIGIN,c=this.bb,d=new Map,e=(g,h)=>{const k=g.get(b+Sc);k&&k.forEach((l,n)=>{g!==l&&(d.set(l,h),c.delete(n),e(l,h))})};c.forEach((g,h)=>{d.set(h,g);e(h,g)});const f=this.G[0];d.forEach((g,h)=>{h.ce(g)&&(h=h.tag(),g?Uc(f,h).create():Uc(f,h).delete())});
402
- this.bb.clear()}Wf(){const b=a.bc.DESTINATION,c=a.C.Hl,d=a.C.qk,e=new Set,f=new Map;this.F(a.C.yp,g=>{e.add(g)});this.F(c,g=>{e.delete(g);f.delete(g)});this.F(d,(g,...h)=>{if(h[0]===Tc&&h[1]===b){const k=h[2];this.get(k).Gb()||(h=f.get(k)||new Set,0===h.size&&f.set(k,h),h.add(g))}});this.Sa(()=>{e.forEach(g=>{const h=this.get(g);h&&null===h.model()&&this.L.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.L.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.bc={Oh:'$',wt:'~',mc:'?',ol:'=',fo:'@',ORIGIN:olympe.dc.za.ORIGIN,DESTINATION:olympe.dc.za.DESTINATION};olympe.dc.db.Database.C={Fo:0,Go:1,hr:2,Dk:3,ho:4,io:5,Hl:6,Fc:7,qk:8,um:9,yp:10,zp:11,Aq:12};olympe.dc.db.Database.F={IDLE:0,Ds:1,cg:2};const Q=olympe.dc.db.Database.C,Yc=olympe.dc.db.Database.bc.Oh,Zc=olympe.dc.db.Database.bc.wt,$c=olympe.dc.db.Database.bc.mc,ad=olympe.dc.db.Database.bc.ol,bd=olympe.dc.db.Database.bc.fo,R=olympe.dc.za.ORIGIN,S=olympe.dc.za.DESTINATION,cd=olympe.dc.ic.Tc,dd=olympe.dc.ic.yi;
404
- olympe.dc.db.Instance=class a extends Map{constructor(b,c){super();this.C=b;this.Xc=olympe.dc.Ja.rb;this.e=!1;this.bb=0;this.F=void 0;this.c=0;this.ka=a.C.oq;this.db=c}tag(){return this.C}Gb(){return this.e}Ab(){return this.db.Ve(this.C)}source(){return this.Xc}version(){return this.bb}model(){const b=this.get(S+cd);return b&&b.values().next().value||null}Bf(){const b=this.get(S+dd);return b&&b.values().next().value||null}persisted(){return this.ka!==a.C.sr}toString(){var b=this.fb(olympe.dc.CloudObject.nameProp.R());
401
+ this.ec))}ra(){this.V=a.F.cg;this.Xf();Xc(this.G[0]);this.G.shift();0===this.G.length&&(this.V=a.F.IDLE,this.Xb.forEach(b=>{b()}))}qe(b,c){const d=a.cc.bc;for(const [e,f]of c)void 0!==f&&(e[0]===d?b.ji(e.substr(1),f):b.update(e,f))}Xf(){const b=a.cc.ORIGIN,c=this.bb,d=new Map,e=(g,h)=>{const k=g.get(b+Sc);k&&k.forEach((l,n)=>{g!==l&&(d.set(l,h),c.delete(n),e(l,h))})};c.forEach((g,h)=>{d.set(h,g);e(h,g)});const f=this.G[0];d.forEach((g,h)=>{h.ce(g)&&(h=h.tag(),g?Uc(f,h).create():Uc(f,h).delete())});
402
+ this.bb.clear()}Wf(){const b=a.cc.DESTINATION,c=a.C.Hl,d=a.C.qk,e=new Set,f=new Map;this.F(a.C.yp,g=>{e.add(g)});this.F(c,g=>{e.delete(g);f.delete(g)});this.F(d,(g,...h)=>{if(h[0]===Tc&&h[1]===b){const k=h[2];this.get(k).Gb()||(h=f.get(k)||new Set,0===h.size&&f.set(k,h),h.add(g))}});this.Sa(()=>{e.forEach(g=>{const h=this.get(g);h&&null===h.model()&&this.L.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.L.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={Oh:'$',wt:'~',bc:'?',ol:'=',fo:'@',ORIGIN:olympe.dc.za.ORIGIN,DESTINATION:olympe.dc.za.DESTINATION};olympe.dc.db.Database.C={Fo:0,Go:1,hr:2,Dk:3,ho:4,io:5,Hl:6,Fc:7,qk:8,um:9,yp:10,zp:11,Aq:12};olympe.dc.db.Database.F={IDLE:0,Ds:1,cg:2};const Q=olympe.dc.db.Database.C,Yc=olympe.dc.db.Database.cc.Oh,Zc=olympe.dc.db.Database.cc.wt,$c=olympe.dc.db.Database.cc.bc,ad=olympe.dc.db.Database.cc.ol,bd=olympe.dc.db.Database.cc.fo,R=olympe.dc.za.ORIGIN,S=olympe.dc.za.DESTINATION,cd=olympe.dc.jc.Tc,dd=olympe.dc.jc.yi;
404
+ olympe.dc.db.Instance=class a extends Map{constructor(b,c){super();this.C=b;this.Xc=olympe.dc.Ha.rb;this.e=!1;this.bb=0;this.F=void 0;this.c=0;this.ka=a.C.oq;this.db=c}tag(){return this.C}Gb(){return this.e}Ab(){return this.db.Ve(this.C)}source(){return this.Xc}version(){return this.bb}model(){const b=this.get(S+cd);return b&&b.values().next().value||null}Bf(){const b=this.get(S+dd);return b&&b.values().next().value||null}persisted(){return this.ka!==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.Bf())?(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(Yc+b);return c||void 0!==d?d:this.get(ad+b)}ra(b,c=!1){const d=this.get($c+
406
406
  b);return c||void 0!==d?d:this.get(Zc+b)}update(b,c){const d=Yc+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.Hc&&(this.db.get(e.R()).zc(),this.db.Jc(e.R())),c instanceof olympe.dc.Hc&&(e=this.db.N(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.Wf(this.C,b)),e=ad+b,null===c?(this.delete(d),c=(c=this.model())&&c.ra(b),void 0!==c?(this.set(e,c),this.N(b,c,!0)):this.N(b,null,!1)):(this.set(d,c),this.delete(e),this.N(b,c,!1)))}ji(b,c){const d=$c+b;var e=this.get(d);(void 0===e?null:e)!==c&&(e=Zc+b,null===c?(this.delete(d),c=(c=this.Bf())&&c.ra(b),c=void 0===c?null:c,null!==c&&this.set(e,c),this.Z((new Map).set(b,c))):(void 0!==this.get(e)&&this.delete(e),this.set(d,c),this.Z((new Map).set(b,c))))}link(b,c){var d=R+b;const e=this.ab(S+
408
408
  b);d=c.ab(d);e.has(c.C)||(e.set(c.C,c),d.set(this.C,this),this.db.C(Q.qk,this.C,b,S,c.C),this.db.C(Q.qk,c.C,b,R,this.C),this.e&&c.e&&(this.G(b,S,c,!0),c.G(b,R,this,!0)))}unlink(b,c){const d=R+b;void 0!==this.Sa(S+b,c.C)&&(c.Sa(d,this.C),this.db.C(Q.um,this.C,b,S,c.C),this.db.C(Q.um,c.C,b,R,this.C),this.e&&c.e&&(this.G(b,S,c,!1),c.G(b,R,this,!1)))}Ve(b){const c=this.model();if(null!==c){if(c===b)return;this.unlink(cd,c)}this.link(cd,b);b.forEach((d,e)=>{e[0]!==$c&&e[0]!==Zc||this.Da(e.substr(1),d)});
409
409
  (b.e||b===this)&&this.db.ab(this,!0)}wh(b){this.unlink(cd,b);this.forEach((c,d)=>{this.Da(d.substr(1),null)});this.db.ab(this,!1)}qe(b){const c=this.Bf();if(null!==c){if(c===b)return;this.unlink(dd,c)}this.link(dd,b);const d=new Map;b.forEach((e,f)=>{if(f[0]===$c||f[0]===Zc)f=f.substr(1),this.has($c+f)||(this.set(Zc+f,e),d.set(f,e))});this.Z(d)}Xf(b){this.unlink(dd,b);const c=new Map;this.forEach((d,e)=>{e[0]===Zc&&(this.delete(e),c.set(e.substr(1),null))});this.Z(c)}Xb(b,c,d){const e=(...f)=>{var g=
410
- f.length;const h=f[g-2];(g=this.db.get(f[g-1]))&&(h?g.Ge():g.detach());d(...f)};this.Te(b,c,e);return e}Te(b,c,d){const e=this.ab(bd+b);e.has(c)||(e.set(c,d),this.Ge(),this.db.C(Q.ho,this.C,b,c))}V(b,c){const d=this.Sa(bd+b,c);void 0!==d&&(this.detach(),this.db.C(Q.io,this.C,b,c));return d}mi(b){this.Xc=b}cc(b){this.bb=b}Qf(b){this.ka=b;this.aa()||this.db.C(Q.Dk,this.C)}ce(b){const c=this.e!==b;c&&(b?(this.e=b,this.Pf()):(this.He(),this.e=b),this.Nd(b));return c}Ge(){this.c++;1===this.c&&this.db.C(Q.hr,
410
+ f.length;const h=f[g-2];(g=this.db.get(f[g-1]))&&(h?g.Ge():g.detach());d(...f)};this.Te(b,c,e);return e}Te(b,c,d){const e=this.ab(bd+b);e.has(c)||(e.set(c,d),this.Ge(),this.db.C(Q.ho,this.C,b,c))}V(b,c){const d=this.Sa(bd+b,c);void 0!==d&&(this.detach(),this.db.C(Q.io,this.C,b,c));return d}mi(b){this.Xc=b}ec(b){this.bb=b}Qf(b){this.ka=b;this.aa()||this.db.C(Q.Dk,this.C)}ce(b){const c=this.e!==b;c&&(b?(this.e=b,this.Pf()):(this.He(),this.e=b),this.Od(b));return c}Ge(){this.c++;1===this.c&&this.db.C(Q.hr,
411
411
  this.C)}detach(){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)}aa(){return 0<this.c||this.ka===olympe.dc.db.Instance.C.pq}clear(){this.forEach((b,c)=>{const d=c[0];if(d===R||d===S){const e=c.substr(1),f=d===R?S:R;
412
412
  b.forEach(g=>{const h=g.get(f+e);h.delete(this.C);0===h.size&&g.delete(f+e)})}d===Yc&&b instanceof olympe.dc.Hc&&this.db.get(b.R()).zc()});void 0!==this.F&&this.db.get(this.F.tag).delete(Yc+this.F.kb)}Wf(b,c){void 0===this.F&&this.Ge();this.F={tag:b,kb:c}}zc(){void 0!==this.F&&(this.detach(),this.F=void 0)}Pf(){this.forEach((b,c)=>{const d=c[0];if(d===R||d===S){const e=c.substr(1),f=d===R?S:R;b.forEach(g=>{g.e&&(this.G(e,d,g,!0),g.G(e,f,this,!0))})}else d!==Yc&&d!==ad||this.N(c.substr(1),b,d===ad)})}He(){this.forEach((b,
413
- c)=>{const d=c[0];if(d!==bd){var e=c.substr(1);d===R?b.forEach(f=>{f.unlink(e,this)}):d===S?b.forEach(f=>{this.unlink(e,f)}):d===Yc&&this.update(d,null);this.delete(c)}});this.bb=0;if(void 0!==this.F){const b=this.db.get(this.F.tag),c=b.get(Yc+this.F.kb);c&&c.R&&c.R()===this.C&&b.update(this.F.kb,null)}}Nd(b){this.db.C(b?Q.Hl:Q.Fc,this.C)}N(b,c,d){this.e&&this.db.Pf(this.C,b,c,d)}G(b,c,d,e){this.db.Qf(this.C,b,c,d.C,e)}Z(b,c=[]){var d=this.get(R+cd);void 0!==d&&d.forEach(e=>{b.forEach((f,g)=>e.Da(g,
413
+ c)=>{const d=c[0];if(d!==bd){var e=c.substr(1);d===R?b.forEach(f=>{f.unlink(e,this)}):d===S?b.forEach(f=>{this.unlink(e,f)}):d===Yc&&this.update(d,null);this.delete(c)}});this.bb=0;if(void 0!==this.F){const b=this.db.get(this.F.tag),c=b.get(Yc+this.F.kb);c&&c.R&&c.R()===this.C&&b.update(this.F.kb,null)}}Od(b){this.db.C(b?Q.Hl:Q.Fc,this.C)}N(b,c,d){this.e&&this.db.Pf(this.C,b,c,d)}G(b,c,d,e){this.db.Qf(this.C,b,c,d.C,e)}Z(b,c=[]){var d=this.get(R+cd);void 0!==d&&d.forEach(e=>{b.forEach((f,g)=>e.Da(g,
414
414
  f))});d=this.get(R+dd);void 0!==d&&d.forEach((e,f)=>{if(!c.includes(e.tag())){var g=new Map;b.forEach((h,k)=>{e.has($c+k)||(g.set(k,h),null!==h?e.set(Zc+k,h):e.delete(Zc+k))});e.Z(g,[...c,f])}})}Da(b,c){if(!this.has(Yc+b)){const d=ad+b,e=this.get(d);c!==(void 0!==e?e:null)&&(null===c?this.delete(d):this.set(d,c),this.N(b,c,null!==c))}}ab(b){let c=this.get(b);void 0===c&&(c=new Map,this.set(b,c));return c}Sa(b,c){const d=this.get(b);if(void 0!==d){const e=d.get(c);d.delete(c);0===d.size&&this.delete(b);
415
- return e}}};olympe.dc.db.Instance.C={sr:0,pq:1,oq:2};const Wc=olympe.dc.db.Database.bc.DESTINATION,Vc=olympe.dc.db.Database.bc.ol,ed=olympe.dc.db.Database.bc.Oh,fd=olympe.dc.db.Database.bc.fo,gd=olympe.dc.db.Database.bc.ORIGIN+Wc,hd=ed+ed;
416
- function Xc(a){const b=a.Ha;a.F.forEach((c,d)=>{const e=b.get(d);if(c.se()||c.N()){var f=e.get(fd);f&&id(a,f,c.se(),d);c.N()&&a.G.add(d)}for(const [l,n]of c.rd()){var g=l[0]===Vc;d=a;var h=e;f=g?l.substr(1):l;var k=n;const p=h.get(fd+ed+f);p&&id(d,p,k,g);(h=h.get(fd+hd))&&id(d,h,f,k,g)}for(const l of c.Sa())jd(a,e,...l)});a.F.clear();kd(a)}function Uc(a,b){let c=a.F.get(b);void 0===c&&(c=new olympe.dc.db.mg(b),a.F.set(b,c));return c}
415
+ return e}}};olympe.dc.db.Instance.C={sr:0,pq:1,oq:2};const Wc=olympe.dc.db.Database.cc.DESTINATION,Vc=olympe.dc.db.Database.cc.ol,ed=olympe.dc.db.Database.cc.Oh,fd=olympe.dc.db.Database.cc.fo,gd=olympe.dc.db.Database.cc.ORIGIN+Wc,hd=ed+ed;
416
+ function Xc(a){const b=a.Ia;a.F.forEach((c,d)=>{const e=b.get(d);if(c.se()||c.N()){var f=e.get(fd);f&&id(a,f,c.se(),d);c.N()&&a.G.add(d)}for(const [l,n]of c.rd()){var g=l[0]===Vc;d=a;var h=e;f=g?l.substr(1):l;var k=n;const p=h.get(fd+ed+f);p&&id(d,p,k,g);(h=h.get(fd+hd))&&id(d,h,f,k,g)}for(const l of c.Sa())jd(a,e,...l)});a.F.clear();kd(a)}function Uc(a,b){let c=a.F.get(b);void 0===c&&(c=new olympe.dc.db.mg(b),a.F.set(b,c));return c}
417
417
  function id(a,b,...c){b.forEach((d,e)=>{a.Te(e,d.bind(null,...c))})}function jd(a,b,c,d,e,f){const g=b.get(fd+d+c);g&&id(a,g,f,e);(b=b.get(fd+gd))&&id(a,b,c,d,f,e)}function kd(a){a.N.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.dt=class{constructor(a,b){this.Ha=a;this.N=b;this.F=new Map;this.G=new Set;this.C=new Map;this.buffer=[]}Te(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 ld(a){const b=olympe.dc.db.Database.C.Go,c=olympe.dc.db.Database.C.Hl,d=olympe.dc.db.Database.C.Fc,e=olympe.dc.db.Database.C.qk,f=olympe.dc.db.Database.C.um,g=olympe.dc.db.Database.C.ho,h=olympe.dc.db.Database.C.io,k=()=>{};a.Ha.F(olympe.dc.db.Database.C.Fo,()=>{});a.Ha.F(b,()=>{});a.Ha.F(c,l=>{a.Ha.ce(()=>{md(a.view,l,k,`monitorRelations${l}`)})});a.Ha.F(d,l=>{a.Ha.ce(()=>{nd(a.view,l,`monitorRelations${l}`)})});a.Ha.F(e,()=>{});a.Ha.F(f,()=>{});a.Ha.F(g,()=>{});a.Ha.F(h,()=>{})}
419
- olympe.dc.db.ju=class{constructor(a,b,c,d){this.L=a;this.view=b;this.Ha=c;d&&ld(this)}debug(a){const b=olympe.dc.xa(a);if(this.Ha.has(b)){var c=this.Ha.get(a);a='\n[DEBUG - DATABASE]\n'+c.toString();if(!c.Gb()){const d=[];for(;null!==c&&!d.includes(c.tag());)d.push(c.tag()),c=c.model();c=this.Ha.get(d[d.length-1]);const e=olympe.dc.db.Database.bc.Oh+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.L.info(a)}else this.L.info('[DATABASE] Instance',b,'has never been created or referred by the database')}};olympe.dc.db.Ci=class a{constructor(b,c,d){this.L=b.Xa();this.Ha=b;this.F=new Set;this.mode=c;this.N=d;this.C=!1;c!==a.C.Fl&&this.V()}run(){if(!this.C)switch(this.mode){case a.C.ws:this.C=!0;this.N.run(()=>{Ib(()=>{this.G();this.C=!1},0)});break;case a.C.Uq:this.C=!0,this.G(),this.C=!1}}G(){const b=this.Ha,c=olympe.dc.Rb.rf,d=this.F,e=h=>b.get(h);var f=h=>!(h.persisted()||h.aa());for(var g of d){const h=b.get(g);if(h&&!h.aa()){if(!h.persisted())continue;Array.from(b.Z(g,c,!1,f)).forEach(k=>{d.add(k)});
421
- b.zc(g)}d.delete(g)}for(const h of d)f=Array.from(b.Z(h,c,!0)).map(e),g=Array.from(b.Z(h,c)).map(e),f.some(k=>k.aa())?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.zc(k)});d.clear()}V(){this.Ha.Sa(this.run.bind(this));const b=olympe.dc.db.Database.C.hr,c=olympe.dc.db.Database.C.zp,d=olympe.dc.db.Database.C.Aq,e=olympe.dc.db.Database.F.IDLE,f=g=>{this.F.add(g);this.Ha.getState()===e&&this.run()};this.Ha.F(olympe.dc.db.Database.C.Dk,
422
- f.bind(this));this.Ha.F(c,f.bind(this));this.Ha.F(b,g=>{this.F.delete(g)});this.Ha.F(d,(g,...h)=>{this.L.error(h[0])})}};olympe.dc.db.Ci.C={Fl:0,Uq:1,ws:2};const od=olympe.dc.db.Database.bc.ORIGIN,pd=olympe.dc.db.Database.bc.DESTINATION,qd=olympe.dc.db.Database.bc.Oh,rd=olympe.dc.db.Database.bc.ol,sd=od+pd,td=qd+qd,ud=olympe.dc.db.Database.F;function uc(a,b,c,d){const e=a.Ha.N(olympe.dc.xa(b));d=d||vd(a);e.Te('',d,c);e.Gb()&&a.G.run(()=>{c(!0,b)});return d}function vc(a,b,c,d=!1){const e=U(a,b);if(null!==e){const f=e.V('',c);void 0!==f&&(a.Ha.getState()===ud.cg&&a.Ha.aa(c),!d&&e.Gb()&&a.G.run(()=>{f(!1,b)}))}}
423
- function md(a,b,c,d){const e=a.Ha.N(olympe.dc.xa(b));b=d||vd(a);const f=e.Xb(sd,b,c);e.Gb()&&e.forEach((g,h)=>{g=h[0];g!==od&&g!==pd||wd(a,e,h,!0,f,!0)})}function nd(a,b,c){const d=U(a,b);if(null!==d){const e=d.V(sd,c);void 0!==e&&(a.Ha.getState()!==ud.cg||d.Ab()||a.Ha.aa(c),d.Gb()&&d.forEach((f,g)=>{f=g[0];(f===od||f===pd)&&e&&wd(a,d,g,!1,e,!0)}))}}function vd(a){++a.N;return String(a.N)}
424
- function xd(a,b,c,d,e){b=a.Ha.N(olympe.dc.xa(b));c=olympe.dc.xa(c);const f=qd+c;e=e||vd(a);b.Te(f,e,d);if(b.Gb()){let g=!1,h=b.get(f);void 0===h&&(g=!0,h=b.get(rd+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.Ha.get(olympe.dc.xa(b));return!a||c&&!a.Gb()?null:a}
425
- function yd(a,b,c){b=a.Ha.N(olympe.dc.xa(b));const d=vd(a);b.Te(td,d,c);b.Gb()&&b.forEach((e,f)=>{const g=f[0];g!==qd&&g!==rd||a.G.run(()=>{c(f.substr(1),e,g===rd)})});return d}function wd(a,b,c,d,e,f){(b=b.get(c))&&b.forEach((g,h)=>{g.Gb()&&(f?a.G.run(()=>{e(c.substr(1),c[0],d,h)}):a.G.run(()=>{e(d,h)}))})}function V(a,b,c,d,e){b=a.Ha.N(olympe.dc.xa(b));c=c.Oa()+c.R();e=e||vd(a);d=b.Xb(c,e,d);b.Gb()&&wd(a,b,c,!0,d,!1);return e}function zd(a,b,c){return c===olympe.dc.Rb.NONE?0:a.fb(b,c,!0)||0}
418
+ olympe.dc.db.dt=class{constructor(a,b){this.Ia=a;this.N=b;this.F=new Map;this.G=new Set;this.C=new Map;this.buffer=[]}Te(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 ld(a){const b=olympe.dc.db.Database.C.Go,c=olympe.dc.db.Database.C.Hl,d=olympe.dc.db.Database.C.Fc,e=olympe.dc.db.Database.C.qk,f=olympe.dc.db.Database.C.um,g=olympe.dc.db.Database.C.ho,h=olympe.dc.db.Database.C.io,k=()=>{};a.Ia.F(olympe.dc.db.Database.C.Fo,()=>{});a.Ia.F(b,()=>{});a.Ia.F(c,l=>{a.Ia.ce(()=>{md(a.view,l,k,`monitorRelations${l}`)})});a.Ia.F(d,l=>{a.Ia.ce(()=>{nd(a.view,l,`monitorRelations${l}`)})});a.Ia.F(e,()=>{});a.Ia.F(f,()=>{});a.Ia.F(g,()=>{});a.Ia.F(h,()=>{})}
419
+ olympe.dc.db.ju=class{constructor(a,b,c,d){this.L=a;this.view=b;this.Ia=c;d&&ld(this)}debug(a){const b=olympe.dc.xa(a);if(this.Ia.has(b)){var c=this.Ia.get(a);a='\n[DEBUG - DATABASE]\n'+c.toString();if(!c.Gb()){const d=[];for(;null!==c&&!d.includes(c.tag());)d.push(c.tag()),c=c.model();c=this.Ia.get(d[d.length-1]);const e=olympe.dc.db.Database.cc.Oh+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.L.info(a)}else this.L.info('[DATABASE] Instance',b,'has never been created or referred by the database')}};olympe.dc.db.Ci=class a{constructor(b,c,d){this.L=b.Xa();this.Ia=b;this.F=new Set;this.mode=c;this.N=d;this.C=!1;c!==a.C.Fl&&this.V()}run(){if(!this.C)switch(this.mode){case a.C.ws:this.C=!0;this.N.run(()=>{Ib(()=>{this.G();this.C=!1},0)});break;case a.C.Uq:this.C=!0,this.G(),this.C=!1}}G(){const b=this.Ia,c=olympe.dc.Sb.rf,d=this.F,e=h=>b.get(h);var f=h=>!(h.persisted()||h.aa());for(var g of d){const h=b.get(g);if(h&&!h.aa()){if(!h.persisted())continue;Array.from(b.Z(g,c,!1,f)).forEach(k=>{d.add(k)});
421
+ b.zc(g)}d.delete(g)}for(const h of d)f=Array.from(b.Z(h,c,!0)).map(e),g=Array.from(b.Z(h,c)).map(e),f.some(k=>k.aa())?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.zc(k)});d.clear()}V(){this.Ia.Sa(this.run.bind(this));const b=olympe.dc.db.Database.C.hr,c=olympe.dc.db.Database.C.zp,d=olympe.dc.db.Database.C.Aq,e=olympe.dc.db.Database.F.IDLE,f=g=>{this.F.add(g);this.Ia.getState()===e&&this.run()};this.Ia.F(olympe.dc.db.Database.C.Dk,
422
+ f.bind(this));this.Ia.F(c,f.bind(this));this.Ia.F(b,g=>{this.F.delete(g)});this.Ia.F(d,(g,...h)=>{this.L.error(h[0])})}};olympe.dc.db.Ci.C={Fl:0,Uq:1,ws:2};const od=olympe.dc.db.Database.cc.ORIGIN,pd=olympe.dc.db.Database.cc.DESTINATION,qd=olympe.dc.db.Database.cc.Oh,rd=olympe.dc.db.Database.cc.ol,sd=od+pd,td=qd+qd,ud=olympe.dc.db.Database.F;function uc(a,b,c,d){const e=a.Ia.N(olympe.dc.xa(b));d=d||vd(a);e.Te('',d,c);e.Gb()&&a.G.run(()=>{c(!0,b)});return d}function vc(a,b,c,d=!1){const e=U(a,b);if(null!==e){const f=e.V('',c);void 0!==f&&(a.Ia.getState()===ud.cg&&a.Ia.aa(c),!d&&e.Gb()&&a.G.run(()=>{f(!1,b)}))}}
423
+ function md(a,b,c,d){const e=a.Ia.N(olympe.dc.xa(b));b=d||vd(a);const f=e.Xb(sd,b,c);e.Gb()&&e.forEach((g,h)=>{g=h[0];g!==od&&g!==pd||wd(a,e,h,!0,f,!0)})}function nd(a,b,c){const d=U(a,b);if(null!==d){const e=d.V(sd,c);void 0!==e&&(a.Ia.getState()!==ud.cg||d.Ab()||a.Ia.aa(c),d.Gb()&&d.forEach((f,g)=>{f=g[0];(f===od||f===pd)&&e&&wd(a,d,g,!1,e,!0)}))}}function vd(a){++a.N;return String(a.N)}
424
+ function xd(a,b,c,d,e){b=a.Ia.N(olympe.dc.xa(b));c=olympe.dc.xa(c);const f=qd+c;e=e||vd(a);b.Te(f,e,d);if(b.Gb()){let g=!1,h=b.get(f);void 0===h&&(g=!0,h=b.get(rd+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.Ia.get(olympe.dc.xa(b));return!a||c&&!a.Gb()?null:a}
425
+ function yd(a,b,c){b=a.Ia.N(olympe.dc.xa(b));const d=vd(a);b.Te(td,d,c);b.Gb()&&b.forEach((e,f)=>{const g=f[0];g!==qd&&g!==rd||a.G.run(()=>{c(f.substr(1),e,g===rd)})});return d}function wd(a,b,c,d,e,f){(b=b.get(c))&&b.forEach((g,h)=>{g.Gb()&&(f?a.G.run(()=>{e(c.substr(1),c[0],d,h)}):a.G.run(()=>{e(d,h)}))})}function V(a,b,c,d,e){b=a.Ia.N(olympe.dc.xa(b));c=c.Oa()+c.R();e=e||vd(a);d=b.Xb(c,e,d);b.Gb()&&wd(a,b,c,!0,d,!1);return e}function zd(a,b,c){return c===olympe.dc.Sb.NONE?0:a.fb(b,c,!0)||0}
426
426
  function Ad(a,b){return function*(c){if(c)for(const [d,e]of c)if(c=d[0],c===od||c===pd){const f=d.substring(1);for(const g of e.keys())yield[f,c,g]}}(U(a,b,!0))}function Bd(a,b,c){if(!a.Gb(b))return a.L.warn(`No instance found with tag ${b}`),new Map;const d=new Map,e=[olympe.dc.xa(b)];for(const f of e){const g=a.ub(f,c);d.set(f,g);for(const h of g.filter(k=>!d.has(k)))e.push(h)}a.L.debug(`Found ${d.size} instances in sub-tree rooted at ${olympe.dc.xa(b)}`);return d}
427
427
  function Cd(a,b,c){return null!==a.$m(c,olympe.dc.CloudObject.extendRel,d=>olympe.dc.Na().al(d,olympe.dc.CloudObject.propertyRel,b))}function Dd(a,b,c,d){return(c=(a=U(a,b,!0))&&a.get(d+c))?Array.from(c.values()).filter(e=>e.Gb()).length:0}
428
- olympe.dc.ib=class{constructor(a,b){this.L=a;this.G=new olympe.D.Wb('DB View context');this.Ha=b;this.N=0}Y(){return this.Ha.Y()}F(a,b,c){a=U(this,a);null!==a&&(b=olympe.dc.xa(b),a.V(qd+b,c),this.Ha.getState()===ud.cg&&this.Ha.aa(c))}C(a,b,c,d=!1){a=U(this,a);if(null!==a){b=b.Oa()+b.R();const e=a.V(b,c);void 0!==e&&(this.Ha.getState()!==ud.cg||a.Ab()&&!d||this.Ha.aa(c),!d&&a.Gb()&&wd(this,a,b,!1,e,!1))}}Gb(a){a=U(this,a);return!(!a||!a.Gb())}name(a){return(a=U(this,a))?a.fb(olympe.dc.CloudObject.nameProp.R()):
428
+ olympe.dc.ib=class{constructor(a,b){this.L=a;this.G=new olympe.D.Wb('DB View context');this.Ia=b;this.N=0}Y(){return this.Ia.Y()}F(a,b,c){a=U(this,a);null!==a&&(b=olympe.dc.xa(b),a.V(qd+b,c),this.Ia.getState()===ud.cg&&this.Ia.aa(c))}C(a,b,c,d=!1){a=U(this,a);if(null!==a){b=b.Oa()+b.R();const e=a.V(b,c);void 0!==e&&(this.Ia.getState()!==ud.cg||a.Ab()&&!d||this.Ia.aa(c),!d&&a.Gb()&&wd(this,a,b,!1,e,!1))}}Gb(a){a=U(this,a);return!(!a||!a.Gb())}name(a){return(a=U(this,a))?a.fb(olympe.dc.CloudObject.nameProp.R()):
429
429
  ''}model(a){return(a=(a=U(this,a,!0))?a.model():null)?a.tag():null}Bf(a){return(a=(a=U(this,a,!0))&&a.Bf())?a.tag():null}nj(a){a=U(this,a,!0);return!(!a||!a.Bf())}th(a,b){a=(a=U(this,a,!0))&&a.model();return!(!a||!this.Sf(a.tag(),b))}version(a){return(a=U(this,a,!0))&&a.version()}source(a){return(a=U(this,a,!0))&&a.source()}Vf(a){return(a=U(this,a,!1))?!!a.persisted():!0}fb(a,b,c){b=(a=U(this,a,!0))?a.fb(olympe.dc.xa(b),c):null;return void 0!==b?b:null}rd(a,b=!1){var c=U(this,a,!0);a=new Map;if(c)for(const [d,
430
- e]of c)c=d[0],(c===qd||!b&&c===rd)&&a.set(d.substring(1),e);return a}ub(a,b){return this.jj(a,[b])}al(a,b,c){return this.ub(a,b).includes(olympe.dc.xa(c))}jj(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.Oa()+c.R()),void 0!==a)for(const e of a.values())e.Gb()&&b.push(e.tag());a=b}return a}fc(a,b){var c=U(this,a,!0);return c?(c=c.get(b.Oa()+b.R()))&&1<c.size?(this.L.warn(`Relation ${b.R()} to instance ${a} is not unique: found ${c.size} related items`),
430
+ e]of c)c=d[0],(c===qd||!b&&c===rd)&&a.set(d.substring(1),e);return a}ub(a,b){return this.jj(a,[b])}al(a,b,c){return this.ub(a,b).includes(olympe.dc.xa(c))}jj(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.Oa()+c.R()),void 0!==a)for(const e of a.values())e.Gb()&&b.push(e.tag());a=b}return a}hc(a,b){var c=U(this,a,!0);return c?(c=c.get(b.Oa()+b.R()))&&1<c.size?(this.L.warn(`Relation ${b.R()} to instance ${a} is not unique: found ${c.size} related items`),
431
431
  null):(a=c?c.values().next().value:null)&&a.Gb()?a.tag():null:null}Nf(a,b,c){a=olympe.dc.xa(a);const d=Bd(this,a,b);d.delete(a);return c?(c=olympe.dc.xa(c),d.has(c)?Array.from(Bd(this,c,b.Pc()).keys()).filter(e=>d.has(e)):[]):Array.from(d.keys())}$m(a,b,c){if(!this.Gb(a))return null;b=Bd(this,a,b);const d=[olympe.dc.xa(a)];for(const e of d){if(c(e))return e;if(a=b.get(e))for(const f of a.filter(g=>!d.includes(g)))d.push(f)}return null}an(a,b,c){return this.jj(a,b).find(c)||null}Zv(a,b,c){return this.jj(a,
432
432
  b).filter(c)}gn(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.Bf();if(e.includes(c))throw Error(`Cycle detected when following recursively extend relations from base model instance "${a}".`);if(c&&!c.Gb())throw a=`Try to get all extensions of the model ${olympe.dc.xa(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}).`);
433
433
  return e.map(f=>f.tag())}Sf(a,b){const c=olympe.dc.xa(b);return!!this.$m(a,olympe.dc.CloudObject.extendRel,d=>d===c)}ee(a){return this.ub(a,olympe.dc.CloudObject.instancesRel)}};olympe.dc.ib.prototype.getInstances=olympe.dc.ib.prototype.ee;olympe.dc.ib.prototype.isExtending=olympe.dc.ib.prototype.Sf;olympe.dc.ib.prototype.getExtendedModels=olympe.dc.ib.prototype.gn;olympe.dc.ib.prototype.findAllRelated=olympe.dc.ib.prototype.Zv;olympe.dc.ib.prototype.findRelated=olympe.dc.ib.prototype.an;
434
- olympe.dc.ib.prototype.findRecursive=olympe.dc.ib.prototype.$m;olympe.dc.ib.prototype.getRecursiveRelated=olympe.dc.ib.prototype.Nf;olympe.dc.ib.prototype.getUniqueRelated=olympe.dc.ib.prototype.fc;olympe.dc.ib.prototype.getMultiRelated=olympe.dc.ib.prototype.jj;olympe.dc.ib.prototype.isRelated=olympe.dc.ib.prototype.al;olympe.dc.ib.prototype.getRelated=olympe.dc.ib.prototype.ub;olympe.dc.ib.prototype.getProperties=olympe.dc.ib.prototype.rd;olympe.dc.ib.prototype.getProperty=olympe.dc.ib.prototype.fb;
435
- olympe.dc.ib.prototype.isPersisted=olympe.dc.ib.prototype.Vf;olympe.dc.ib.prototype.instanceOf=olympe.dc.ib.prototype.th;olympe.dc.ib.prototype.isModel=olympe.dc.ib.prototype.nj;olympe.dc.ib.prototype.extension=olympe.dc.ib.prototype.Bf;olympe.dc.ib.prototype.model=olympe.dc.ib.prototype.model;olympe.dc.ib.prototype.name=olympe.dc.ib.prototype.name;olympe.dc.ib.prototype.exist=olympe.dc.ib.prototype.Gb;function Ed(a,b){let c=a.C.get(b);void 0===c&&(c=new olympe.dc.db.mg(b),a.C.set(b,c));return c}function Fd(a,b,c=olympe.dc.Rb.NONE){b=Gd(a,b,c);for(const d of b)Hd(a,d,!1),a.C.delete(d)}
434
+ olympe.dc.ib.prototype.findRecursive=olympe.dc.ib.prototype.$m;olympe.dc.ib.prototype.getRecursiveRelated=olympe.dc.ib.prototype.Nf;olympe.dc.ib.prototype.getUniqueRelated=olympe.dc.ib.prototype.hc;olympe.dc.ib.prototype.getMultiRelated=olympe.dc.ib.prototype.jj;olympe.dc.ib.prototype.isRelated=olympe.dc.ib.prototype.al;olympe.dc.ib.prototype.getRelated=olympe.dc.ib.prototype.ub;olympe.dc.ib.prototype.getProperties=olympe.dc.ib.prototype.rd;olympe.dc.ib.prototype.getProperty=olympe.dc.ib.prototype.fb;
435
+ olympe.dc.ib.prototype.isPersisted=olympe.dc.ib.prototype.Vf;olympe.dc.ib.prototype.instanceOf=olympe.dc.ib.prototype.th;olympe.dc.ib.prototype.isModel=olympe.dc.ib.prototype.nj;olympe.dc.ib.prototype.extension=olympe.dc.ib.prototype.Bf;olympe.dc.ib.prototype.model=olympe.dc.ib.prototype.model;olympe.dc.ib.prototype.name=olympe.dc.ib.prototype.name;olympe.dc.ib.prototype.exist=olympe.dc.ib.prototype.Gb;function Ed(a,b){let c=a.C.get(b);void 0===c&&(c=new olympe.dc.db.mg(b),a.C.set(b,c));return c}function Fd(a,b,c=olympe.dc.Sb.NONE){b=Gd(a,b,c);for(const d of b)Hd(a,d,!1),a.C.delete(d)}
436
436
  function Gd(a,b,c,d=!0){const e=olympe.dm.Relation.C.rk,f=olympe.dm.Relation.C.Ck,g=olympe.dc.za.ORIGIN,h=olympe.dc.Na();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.dd())r&&zd(h,p,c)&f?b.add(q):d||r||k.add(`${n}.${p}.${q}`);for(const [p,q,r]of l.ab())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=>
437
437
  a.C.has(n))}function Hd(a,b,c){const d=olympe.dc.za.ORIGIN,e=olympe.dc.za.DESTINATION,f=a.C.get(b);for(const [h,k,l]of f.dd())if(l||!c){f.V(h,e,k);var g=a.C.get(k);g&&g.V(h,d,b)}for(const [h,k,l]of f.ab())if(l||!c)f.V(h,d,k),(g=a.C.get(k))&&g.V(h,e,b)}function*Id(a,b,c,d,e=[]){e.push(b);b=a.Jf(b);for(const [f,g]of b.ub(c))e.includes(f)||(yield*Id(a,f,c,d,e),yield d(f,g))}function Jd(a,b,c,d){const e=a.C.get(c);a=a.C.get(d);e&&e.V(b,olympe.dc.za.DESTINATION,d);a&&a.V(b,olympe.dc.za.ORIGIN,c)}
438
- olympe.dc.db.xc=class{constructor(a){this.id=a||olympe.W.ej();this.C=new Map}toJSON(){let a='{ "id": '+JSON.stringify(this.id)+', "instances": {';for(const b of this.C.keys()){const c=this.C.get(b);a+=JSON.stringify(b)+': '+c.toJSON()+', '}a.endsWith(', ')&&(a=a.substr(0,a.length-2));return a+'}}'}static kc(a){var b;'string'===typeof a?b=JSON.parse(a):b=a;a=new olympe.dc.db.xc(b.id);b=b.instances;for(const c of Object.keys(b)){const d=olympe.dc.db.mg.kc(b[c]);a.C.set(c,d)}return a}Y(){return this.id}Mc(a){const b=
439
- olympe.dc.db.mg.C.bm,c=olympe.dc.db.mg.C.Fc,d=olympe.dc.db.mg.C.Ek;this.C.forEach((e,f)=>{const g=e.getState();switch(g.id){case b:a.F(f,e.Z()?e.rd():void 0);break;case d:e.Z()&&a.pc(f,e.rd(),g.bj);break;case c:a.Jc(f,g.bj)}for(const [h,k,l]of e.dd())l?a.Ra(h,f,k):a.ec(h,f,k)})}G(){let a=0;this.C.forEach(b=>{a+=b.cc()});return a}F(a,b){a=Ed(this,a).create();b&&a.ra(b)}pc(a,b,c){b&&(a=Ed(this,a).ra(b),c&&a.Xb())}Jc(a,b=olympe.dc.Rb.NONE){const c=this.C.get(a);if(c&&c.se())Fd(this,a,b);else{Ed(this,
440
- a).delete(b);for(const d of Gd(this,a,b,!1))this.C.get(d).rd().clear(),Hd(this,d,!0)}}Ra(a,b,c){Ed(this,b).link(a,c);Ed(this,c).bb(a,b)}ec(a,b,c){Ed(this,b).unlink(a,c);Ed(this,c).Ab(a,b)}ee(){return function*(a){for(const b of a.values())if(b.se()||b.N()||b.Z())yield b}(this.C)}Jf(a){return this.C.get(olympe.dc.xa(a))||null}dd(){return function*(a){for(var b=a.next();!b.done;){b=b.value;const c=b.tag();yield*b.dd((d,e,f)=>[d,c,e,f]);b=a.next()}}(this.C.values())}Nf(a,b,c=(d,e)=>[d,e]){return Id(this,
438
+ olympe.dc.db.xc=class{constructor(a){this.id=a||olympe.W.ej();this.C=new Map}toJSON(){let a='{ "id": '+JSON.stringify(this.id)+', "instances": {';for(const b of this.C.keys()){const c=this.C.get(b);a+=JSON.stringify(b)+': '+c.toJSON()+', '}a.endsWith(', ')&&(a=a.substr(0,a.length-2));return a+'}}'}static lc(a){var b;'string'===typeof a?b=JSON.parse(a):b=a;a=new olympe.dc.db.xc(b.id);b=b.instances;for(const c of Object.keys(b)){const d=olympe.dc.db.mg.lc(b[c]);a.C.set(c,d)}return a}Y(){return this.id}Mc(a){const b=
439
+ olympe.dc.db.mg.C.bm,c=olympe.dc.db.mg.C.Fc,d=olympe.dc.db.mg.C.Ek;this.C.forEach((e,f)=>{const g=e.getState();switch(g.id){case b:a.F(f,e.Z()?e.rd():void 0);break;case d:e.Z()&&a.pc(f,e.rd(),g.bj);break;case c:a.Jc(f,g.bj)}for(const [h,k,l]of e.dd())l?a.Ra(h,f,k):a.fc(h,f,k)})}G(){let a=0;this.C.forEach(b=>{a+=b.ec()});return a}F(a,b){a=Ed(this,a).create();b&&a.ra(b)}pc(a,b,c){b&&(a=Ed(this,a).ra(b),c&&a.Xb())}Jc(a,b=olympe.dc.Sb.NONE){const c=this.C.get(a);if(c&&c.se())Fd(this,a,b);else{Ed(this,
440
+ a).delete(b);for(const d of Gd(this,a,b,!1))this.C.get(d).rd().clear(),Hd(this,d,!0)}}Ra(a,b,c){Ed(this,b).link(a,c);Ed(this,c).bb(a,b)}fc(a,b,c){Ed(this,b).unlink(a,c);Ed(this,c).Ab(a,b)}ee(){return function*(a){for(const b of a.values())if(b.se()||b.N()||b.Z())yield b}(this.C)}Jf(a){return this.C.get(olympe.dc.xa(a))||null}dd(){return function*(a){for(var b=a.next();!b.done;){b=b.value;const c=b.tag();yield*b.dd((d,e,f)=>[d,c,e,f]);b=a.next()}}(this.C.values())}Nf(a,b,c=(d,e)=>[d,e]){return Id(this,
441
441
  a,b,c)}};olympe.dc.db.xc.la=[olympe.dc.Writable,olympe.dc.om];const Kd=new Map;
442
442
  olympe.dc.db.mg=class a{constructor(b){this.ka=b;this.G=a.F(a.C.Ek,!1);this.F=this.Ka=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.Ka){b+=', "relations": {';for(const d of this.Ka.keys()){c=this.Ka.get(d);b+=JSON.stringify(d)+
443
- ': {';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 kc(b){var c;'string'===typeof b?c=JSON.parse(b):c=b;b=new olympe.dc.db.mg(c.tag);b.G=c.state;const d=c.properties;if(d){b.C=new Map;for(var e of Object.keys(d)){const f=d[e],g=f.type;let h=f;g&&('reference'===g?h=olympe.dc.Hc.kc(f):h=olympe.D.kc(f));null!==h&&void 0!==h&&b.C.set(e,h)}}if(c=
444
- c.relations){b.Ka=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.Ka.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,bj:c},Kd.set(d,e));return e}tag(){return this.ka}getState(){return this.G}create(){this.G=a.F(a.C.bm);return this}delete(b=olympe.dc.Rb.NONE){this.G=a.F(a.C.Fc,b);this.C=null;return this}Xb(){this.G.id===a.C.Ek&&(this.G=a.F(a.C.Ek,!0))}Ca(b,c){if(this.G.type===a.C.Fc)return this;
443
+ ': {';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 lc(b){var c;'string'===typeof b?c=JSON.parse(b):c=b;b=new olympe.dc.db.mg(c.tag);b.G=c.state;const d=c.properties;if(d){b.C=new Map;for(var e of Object.keys(d)){const f=d[e],g=f.type;let h=f;g&&('reference'===g?h=olympe.dc.Hc.lc(f):h=olympe.D.lc(f));null!==h&&void 0!==h&&b.C.set(e,h)}}if(c=
444
+ c.relations){b.Ka=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.Ka.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,bj:c},Kd.set(d,e));return e}tag(){return this.ka}getState(){return this.G}create(){this.G=a.F(a.C.bm);return this}delete(b=olympe.dc.Sb.NONE){this.G=a.F(a.C.Fc,b);this.C=null;return this}Xb(){this.G.id===a.C.Ek&&(this.G=a.F(a.C.Ek,!0))}Ca(b,c){if(this.G.type===a.C.Fc)return this;
445
445
  this.C||(this.C=new Map);this.C.set(b,c);return this}ra(b){this.C||(this.C=new Map);b.forEach((c,d)=>{this.C.set(d,c)});return this}Da(b){this.C&&this.C.delete(b);0===this.C.size&&(this.C=null)}link(b,c){null===this.Ka&&(this.Ka=new Map);this.Pa(this.Ka,b,c,!0);return this}unlink(b,c){null===this.Ka&&(this.Ka=new Map);this.Pa(this.Ka,b,c,!1);return this}bb(b,c){this.F||(this.F=new Map);this.Pa(this.F,b,c,!0)}Ab(b,c){this.F||(this.F=new Map);this.Pa(this.F,b,c,!1)}zc(b,c,d){if(c=c===olympe.dc.za.ORIGIN?
446
- this.F:this.Ka)return(b=c.get(b))&&b.get(d)}V(b,c,d){const e=(c=c===olympe.dc.za.ORIGIN?this.F:this.Ka)&&c.get(b);e&&e.delete(d);e&&0===e.size&&c.delete(b)}se(){return this.G.id===a.C.bm}N(){return this.G.id===a.C.Fc}cc(){let b=this.C?this.C.size:0;this.Ka&&this.Ka.forEach(c=>{b+=c.size});return b}Z(){return null!==this.C}rd(){return this.C||new Map}fb(b){if(this.C)return this.C.get(b)}ub(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,f)}(b.Oa()===olympe.dc.za.ORIGIN?
447
- this.F:this.Ka)}fc(b){const c=b.Oa()===olympe.dc.za.ORIGIN?this.F:this.Ka;return(b=c&&c.get(b.R()))&&0!==b.size?Array.from(b.keys())[0]:null}ph(){return this.fc(olympe.dc.CloudObject.modelRel)}dd(b=(c,d,e)=>[c,d,e]){return this.aa(this.Ka,b)}ab(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.za.ORIGIN,d=olympe.dc.za.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),this.Ka,this.F)}Pa(b,c,
448
- d,e){if(this.G.id!==a.C.Fc||!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.mg.C={bm:0,Ek:1,Fc:2};function Lc(a,b,c,d,e,f=olympe.dc.Ja.rb){const g=olympe.dc.db.Instance.C.pq,h=olympe.dc.db.Instance.C.sr,k=c.Y();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.Ha.Da();a.Ha.Ab(d,g);a.Ha.Ab(e,h);Mc(a,c,f);const n=Array.from(c.ee()).filter(p=>p.se()).map(p=>p.tag());a.Ha.Xc(n);a.Ha.ra();0<n.length&&b.vc(()=>{a.Ha.Da();a.Ha.Nd(n);a.Ha.ra()})}
446
+ this.F:this.Ka)return(b=c.get(b))&&b.get(d)}V(b,c,d){const e=(c=c===olympe.dc.za.ORIGIN?this.F:this.Ka)&&c.get(b);e&&e.delete(d);e&&0===e.size&&c.delete(b)}se(){return this.G.id===a.C.bm}N(){return this.G.id===a.C.Fc}ec(){let b=this.C?this.C.size:0;this.Ka&&this.Ka.forEach(c=>{b+=c.size});return b}Z(){return null!==this.C}rd(){return this.C||new Map}fb(b){if(this.C)return this.C.get(b)}ub(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,f)}(b.Oa()===olympe.dc.za.ORIGIN?
447
+ this.F:this.Ka)}hc(b){const c=b.Oa()===olympe.dc.za.ORIGIN?this.F:this.Ka;return(b=c&&c.get(b.R()))&&0!==b.size?Array.from(b.keys())[0]:null}ph(){return this.hc(olympe.dc.CloudObject.modelRel)}dd(b=(c,d,e)=>[c,d,e]){return this.aa(this.Ka,b)}ab(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.za.ORIGIN,d=olympe.dc.za.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),this.Ka,this.F)}Pa(b,c,
448
+ d,e){if(this.G.id!==a.C.Fc||!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.mg.C={bm:0,Ek:1,Fc:2};function Lc(a,b,c,d,e,f=olympe.dc.Ha.rb){const g=olympe.dc.db.Instance.C.pq,h=olympe.dc.db.Instance.C.sr,k=c.Y();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.Ia.Da();a.Ia.Ab(d,g);a.Ia.Ab(e,h);Mc(a,c,f);const n=Array.from(c.ee()).filter(p=>p.se()).map(p=>p.tag());a.Ia.Xc(n);a.Ia.ra();0<n.length&&b.vc(()=>{a.Ia.Da();a.Ia.Od(n);a.Ia.ra()})}
449
449
  function Mc(a,b,c){a.G.process(c,b,d=>{d||a.L.debug('CommitController: Rebase of patch',b.Y(),'done')})}function Nc(a,b,c){return a.C.slice(0,c).map(d=>a.F.get(d)).reduce((d,e)=>e?e.bf(d):d,b)}
450
- function Md(a,b){const c=a.Ha,d=olympe.dc.db.Database.bc.Oh,e=olympe.dc.db.Database.bc.mc,f=olympe.dc.db.Database.bc.ORIGIN,g=olympe.dc.db.Database.bc.DESTINATION,h=olympe.dc.$b.VERSION,k=olympe.dc.$b.Jd,l=new olympe.dc.db.xc('rev-'+b.Y());a.L.debug('Generate the reverse graphLayer of',b.Y());b.C.forEach((n,p)=>{if(n.se()){l.Jc(p,olympe.dc.Rb.NONE);for(const [t,u]of n.dd())l.ec(t,p,u)}else{var q=c.get(p);if(void 0!==q)if(n.N()){n=n.getState().bj;for(const t of c.Z(p,n)){p=c.get(t);const u=(new Map).set(h,
451
- q.version()).set(k,q.source());p.forEach((v,w)=>{const y=w[0],A=w.substr(1);y===d?u.set(A,v):y===e?u.set(w,v):y===f?v.forEach((D,T)=>{l.Ra(A,T,t,0)}):y===g&&v.forEach((D,T)=>{l.Ra(A,t,T,0)})});l.F(t,u,0)}}else{const t=(new Map).set(h,q.version());for(const u of n.rd().keys()){var r=u[0]===e;const v=r?u.substr(1):u;r=r?q.ra(v,!0):q.fb(v,!0);t.set(u,void 0===r?null:r)}1<t.size&&l.pc(p,t,!0,0);for(const [u,v,w]of n.dd())w?l.ec(u,p,v):l.Ra(u,p,v)}}});return l}
452
- olympe.dc.db.Os=class{constructor(a,b,c){this.L=a;this.Ha=b;this.G=c;this.C=[];this.F=new Map}bf(a,b){Mc(this,Nc(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);Nc(this,c.F,b);this.F.delete(a)}}};function Nd(a,b,c,d){const e=olympe.dc.za.DESTINATION;c=c.tag();const f=a.C.Jf(c);b.rd().forEach((g,h)=>{f.Ca(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)}}
450
+ function Md(a,b){const c=a.Ia,d=olympe.dc.db.Database.cc.Oh,e=olympe.dc.db.Database.cc.bc,f=olympe.dc.db.Database.cc.ORIGIN,g=olympe.dc.db.Database.cc.DESTINATION,h=olympe.dc.$b.VERSION,k=olympe.dc.$b.Kd,l=new olympe.dc.db.xc('rev-'+b.Y());a.L.debug('Generate the reverse graphLayer of',b.Y());b.C.forEach((n,p)=>{if(n.se()){l.Jc(p,olympe.dc.Sb.NONE);for(const [t,u]of n.dd())l.fc(t,p,u)}else{var q=c.get(p);if(void 0!==q)if(n.N()){n=n.getState().bj;for(const t of c.Z(p,n)){p=c.get(t);const u=(new Map).set(h,
451
+ q.version()).set(k,q.source());p.forEach((v,w)=>{const y=w[0],A=w.substr(1);y===d?u.set(A,v):y===e?u.set(w,v):y===f?v.forEach((D,T)=>{l.Ra(A,T,t,0)}):y===g&&v.forEach((D,T)=>{l.Ra(A,t,T,0)})});l.F(t,u,0)}}else{const t=(new Map).set(h,q.version());for(const u of n.rd().keys()){var r=u[0]===e;const v=r?u.substr(1):u;r=r?q.ra(v,!0):q.fb(v,!0);t.set(u,void 0===r?null:r)}1<t.size&&l.pc(p,t,!0,0);for(const [u,v,w]of n.dd())w?l.fc(u,p,v):l.Ra(u,p,v)}}});return l}
452
+ olympe.dc.db.Os=class{constructor(a,b,c){this.L=a;this.Ia=b;this.G=c;this.C=[];this.F=new Map}bf(a,b){Mc(this,Nc(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);Nc(this,c.F,b);this.F.delete(a)}}};function Nd(a,b,c,d){const e=olympe.dc.za.DESTINATION;c=c.tag();const f=a.C.Jf(c);b.rd().forEach((g,h)=>{f.Ca(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
453
  function Od(a,b,c,d){const e=olympe.dc.za.DESTINATION,f=c.tag(),g=a.C.Jf(f);b.rd().forEach((h,k)=>{void 0!==c.fb(k)&&(g.Ca(k,h),b.Da(k))});for(const [h,k,l]of b.dd()){const n=c.zc(h,e,k);void 0!==n&&(Jd(d,h,f,k),n===l&&Jd(a.C,h,f,k))}}
454
454
  class Ld{constructor(a,b,c){this.F=a;this.C=b;this.source=c;this.db=olympe.dc.Na()}Y(){return this.F.Y()}bf(a){var b=this.F.C,c=a.C;const d=b.size>c.size,e=d?b:c;b=d?c:b;for(const [g,h]of b){b=g;var f=e.get(b);void 0!==f&&(c=d?f:h,f=d?h:f,f.N()?c.se()||Fd(this.C,b,f.getState().bj):c.N()?(Nd(this,f,c,a),Fd(a,b,c.getState().bj)):Od(this,f,c,a))}return a}};olympe.dc.db.O={Ea:'dc.db.Logger',va:'dc.db.DatabaseManager',Nj:'dc.db.Database',ib:'dc.db.Driver',pt:'dc.db.Graph',to:'dc.db.DataProcessor',xo:'dc.db.DebugProcessor',sA:'dc.db.PermissionProcessor',Ki:'dc.db.GraphMonitor'};olympe.dc.db.Config={Vo:'db.garbageCollector',Ki:'db.monitor',wo:'db.debug'};
455
455
  olympe.T.config(function(a){E(a,olympe.dc.db.Config.Vo,olympe.dc.db.Ci.C.Uq);E(a,olympe.dc.db.Config.Ki,!1);E(a,olympe.dc.db.Config.wo,!1);C(a,olympe.dc.db.O.Ea,[olympe.pa.O.va],b=>b.Nc('dc.db'));C(a,olympe.dc.db.O.Nj,[olympe.dc.db.O.Ea,new olympe.T.fa(olympe.dc.Config.yo),new olympe.T.fa(olympe.dc.db.Config.Vo),new olympe.T.fa(olympe.dc.Config.$g),new olympe.T.fa(olympe.dc.db.Config.wo)],(b,c,d,e,f)=>{d=e?olympe.dc.db.Ci.C.Fl:d;c=(new Map).set('defaultSource',c).set('garbageCollector',d).set('debug',
456
456
  f);return new olympe.dc.db.Database(b,c)});C(a,olympe.dc.db.O.ib,[olympe.dc.db.O.va],b=>b.view);C(a,olympe.dc.db.O.Ki,[olympe.dc.db.O.va],b=>b.Cx);B(a,olympe.dc.db.O.xo,olympe.dc.db.Ub.Do,olympe.dc.O.Ea);C(a,olympe.dc.db.O.to,[olympe.dc.db.O.Ea,olympe.dc.db.O.Nj,olympe.T.O.dg,new olympe.T.fa(olympe.dc.Config.eg)],(b,c,d,e)=>{b=new olympe.dc.db.Ub.vr(b,c);e&&(b=new olympe.dc.pm(ma(d,olympe.dc.db.O.xo),b));return b});B(a,olympe.dc.db.O.va,olympe.dc.db.Zs,olympe.dc.db.O.Ea,olympe.dc.db.O.Nj,olympe.dc.O.me,
457
- olympe.dc.db.O.to,new olympe.T.fa(olympe.dc.db.Config.Ki))},'olympe.dc.db');olympe.T.run([olympe.dc.db.O.Nj,olympe.dc.db.O.Ki],(a,b)=>{olympe.hj().db=a;olympe.hj().dbMonitor=b},'DC.DB debug service injection');olympe.dc.db.Ub={};olympe.dc.db.Ub.vr=class{constructor(a,b){this.L=a;this.Ha=b;this.buffer=[]}process(a,b,c){this.Ha.Da();b.Mc(this);this.Ha.ra();c(null,b)}F(a,b){this.Ha.create(a,b)}pc(a,b,c){this.Ha.update(a,b,c)}Jc(a,b=olympe.dc.Rb.NONE){for(const c of this.Ha.Z(a,b))this.Ha.Jc(c)}Ra(a,b,c){this.Ha.link(a,b,c)}ec(a,b,c){this.Ha.unlink(a,b,c)}};olympe.dc.db.Ub.vr.la=[olympe.dc.rg,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.Hc||f instanceof olympe.dc.CloudObject?d+='new olympe.dc.Reference("'+f.R()+'")':f instanceof olympe.D.Color?d+='new olympe.df.Color("'+f.Of()+','+f.If()+','+f.Df()+','+f.Cf()+'")':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'{'+
457
+ olympe.dc.db.O.to,new olympe.T.fa(olympe.dc.db.Config.Ki))},'olympe.dc.db');olympe.T.run([olympe.dc.db.O.Nj,olympe.dc.db.O.Ki],(a,b)=>{olympe.hj().db=a;olympe.hj().dbMonitor=b},'DC.DB debug service injection');olympe.dc.db.Ub={};olympe.dc.db.Ub.vr=class{constructor(a,b){this.L=a;this.Ia=b;this.buffer=[]}process(a,b,c){this.Ia.Da();b.Mc(this);this.Ia.ra();c(null,b)}F(a,b){this.Ia.create(a,b)}pc(a,b,c){this.Ia.update(a,b,c)}Jc(a,b=olympe.dc.Sb.NONE){for(const c of this.Ia.Z(a,b))this.Ia.Jc(c)}Ra(a,b,c){this.Ia.link(a,b,c)}fc(a,b,c){this.Ia.unlink(a,b,c)}};olympe.dc.db.Ub.vr.la=[olympe.dc.rg,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.Hc||f instanceof olympe.dc.CloudObject?d+='new olympe.dc.Reference("'+f.R()+'")':f instanceof olympe.D.Color?d+='new olympe.df.Color("'+f.Of()+','+f.If()+','+f.Df()+','+f.Cf()+'")':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'{'+
458
458
  (d?d:'')+'}'}
459
459
  olympe.dc.db.Ub.Do=class{constructor(a){this.L=a;this.output=''}process(a,b,c){this.output='Patch #'+b.Y()+' (source: '+a+')';b.Mc(this);this.L.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)+')')}pc(a,b){this.log('updateInstance("'+a+'", '+Pd(this,b)+')')}Jc(a,b){var c=olympe.dc.Na();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("'+
460
- a+'", "'+b+'", "'+c+'")',a===olympe.dc.ic.Tc?'Model':'')}ec(a,b,c){this.log('deleteRelation("'+a+'", "'+b+'", "'+c+'")',a===olympe.dc.ic.Tc?'Model':'')}};olympe.dc.db.Ub.Do.la=[olympe.dc.Writable,olympe.dc.rg];olympe.dc.transaction={};olympe.dc.ti=class a{constructor(b,c){this.id=b||olympe.W.lc();this.F=new olympe.D.Wb('BurstTransaction#'+this.id,c);this.cc=Qd(this);this.Z=!1;this.F.onDestroy(()=>this.V());this.Da=new Set;this.G=new Map;this.N=new Set;this.C=null;this.bb=olympe.T.getParameter(olympe.dc.transaction.Config.Zn)||30;this.ra=[]}static C(b,c){return`${b},${c}`}Xb(b){for(const c of this.ra)c(b);this.stop()}ab(){null!==this.C&&(clearTimeout(this.C),this.C=null);const b=this.ka(this.N);0<b.size&&Rd(this,b,!1);this.N.clear()}ka(b){const c=
461
- 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.cc(b,c,d);null===this.C&&(this.C=setTimeout(this.ab.bind(this),this.bb))}Sa(b,c,d){b=a.C(b,c);this.G.set(b,d);this.N.add(b)}Ab(b,c){return this.G.get(a.C(b,c))}push(b,c){const d=olympe.dc.xa(b);b=c.subscribe(e=>{for(const [f,g]of e)e=olympe.dc.xa(f),this.Ab(d,e)!==g&&this.aa(d,e,g.valueOf())});this.Da.add(b)}complete(){return new Promise((b,
460
+ a+'", "'+b+'", "'+c+'")',a===olympe.dc.jc.Tc?'Model':'')}fc(a,b,c){this.log('deleteRelation("'+a+'", "'+b+'", "'+c+'")',a===olympe.dc.jc.Tc?'Model':'')}};olympe.dc.db.Ub.Do.la=[olympe.dc.Writable,olympe.dc.rg];olympe.dc.transaction={};olympe.dc.ti=class a{constructor(b,c){this.id=b||olympe.W.mc();this.F=new olympe.D.Wb('BurstTransaction#'+this.id,c);this.ec=Qd(this);this.Z=!1;this.F.onDestroy(()=>this.V());this.Da=new Set;this.G=new Map;this.N=new Set;this.C=null;this.bb=olympe.T.getParameter(olympe.dc.transaction.Config.Zn)||30;this.ra=[]}static C(b,c){return`${b},${c}`}Xb(b){for(const c of this.ra)c(b);this.stop()}ab(){null!==this.C&&(clearTimeout(this.C),this.C=null);const b=this.ka(this.N);0<b.size&&Rd(this,b,!1);this.N.clear()}ka(b){const c=
461
+ 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.ec(b,c,d);null===this.C&&(this.C=setTimeout(this.ab.bind(this),this.bb))}Sa(b,c,d){b=a.C(b,c);this.G.set(b,d);this.N.add(b)}Ab(b,c){return this.G.get(a.C(b,c))}push(b,c){const d=olympe.dc.xa(b);b=c.subscribe(e=>{for(const [f,g]of e)e=olympe.dc.xa(f),this.Ab(d,e)!==g&&this.aa(d,e,g.valueOf())});this.Da.add(b)}complete(){return new Promise((b,
462
462
  c)=>{this.V((d,e)=>{for(const f of this.Da)f.unsubscribe();d?b():c(e)})})}update(b,c,d){const e=olympe.dc.xa(b),f=olympe.dc.xa(c);void 0===e||void 0===f?olympe.dc.hi().Xa().error('Burst transaction: instance tag or property tag is undefined'):(this.F.run(()=>{olympe.D.Dn([d],g=>{this.Z=!0;g instanceof olympe.dc.Hc?olympe.dc.hi().Xa().error('Cannot send complex property values in burst transactions'):this.aa(e,f,g.valueOf())})}),this.F.vc(this.V.bind(this)))}stop(){this.F.destroy();this.ra.length=
463
463
  0}Y(){return this.id}uh(){return!1}V(b){if(this.Z){this.Z=!1;null!==this.C&&(clearTimeout(this.C),this.C=null);this.N.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.ti.prototype.complete=olympe.dc.ti.prototype.complete;olympe.dc.ti.prototype.push=olympe.dc.ti.prototype.push;olympe.dc.iq=class{C(){}toString(){}};olympe.dc.transaction.pg=class{constructor(a){this.id=a||olympe.W.ej();this.ua=[];this.size=0}Y(){return this.id}G(){return this.size}concat(a){this.ua.push(...a.ua)}Mc(a){const b=olympe.dc.transaction.pg.C,c=this.ua.length;let d=0;for(;d<c;)switch(this.ua[d]){case b.lo:a.F(this.ua[d+1],this.ua[d+2],this.ua[d+3]);d+=4;break;case b.gr:a.pc(this.ua[d+1],this.ua[d+2],this.ua[d+3],this.ua[d+4]);d+=5;break;case b.zo:a.Jc(this.ua[d+1],this.ua[d+2],this.ua[d+3]);d+=4;break;case b.mo:a.Ra(this.ua[d+1],this.ua[d+
464
- 2],this.ua[d+3],this.ua[d+4]);d+=5;break;case b.Ao: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.pg.C.lo,a,b,c);this.size++}pc(a,b,c,d){this.ua.push(olympe.dc.transaction.pg.C.gr,a,b,c,d);this.size++}Jc(a,b=olympe.dc.Rb.NONE,c){this.ua.push(olympe.dc.transaction.pg.C.zo,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)');
465
- this.ua.push(olympe.dc.transaction.pg.C.mo,a,b,c,d);this.size++}ec(a,b,c,d){this.ua.push(olympe.dc.transaction.pg.C.Ao,a,b,c,d);this.size++}};olympe.dc.transaction.pg.C={lo:1,gr:2,zo:3,mo:4,Ao:5};olympe.dc.transaction.pg.la=[olympe.dc.Writable,olympe.dc.om];function Sd(a,b){return a.V.get(b)||a.db.source(b)||olympe.dc.Ja.mc}function Td(a,b){return a.N.has(b)?a.N.get(b):a.db.Vf(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.V.set(b,d.get(olympe.dc.$b.Jd));e=Sd(a,b);a.N.set(b,c&&a.F);a.Bc(e,c,f=>{f.F(b,d,0)})}
466
- olympe.dc.transaction.wu=class{constructor(a,b){this.id=b||olympe.W.lc();this.db=a;this.C=new Map;this.G=new olympe.dc.db.xc(b);this.versions=new Map;this.V=new Map;this.Z={};this.N=new Map;this.F=!0}Rf(){return 0===this.G.C.size}persist(a){this.F=a}pc(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.Bc(d,Td(this,a),e=>{e.pc(a,b,c,0)})}Jc(a,b){const c=Sd(this,a),d=Td(this,
467
- a);this.Bc(c,d,e=>{e.Jc(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.ic.Tc&&(olympe.pa.Xa('dc').warn(`Try to create a relation between 2 objects that have different locations: ${b}-[${a}]->${c}`),f=!1);this.Bc(d,f,g=>{g.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.ic.Tc&&(olympe.pa.Xa('dc').warn(`Try to delete a relation between 2 objects that have different locations: ${b}-[${a}]->${c}`),
468
- f=!1);this.Bc(d,f,g=>{g.ec(a,b,c,0)})}Bc(a,b,c){c(this.G);b&&this.F&&(b=this.C.get(a),b||(b=new olympe.dc.db.xc(this.id),this.C.set(a,b)),c(b))}};function 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.Ja.rb)d[g]=olympe.dc.Na().Y();else{if(e===olympe.dc.Ja.Vc)continue}else g.startsWith(olympe.dc.$b.VERSION)?(g=g.substr(1),e=null===e?1:e):g.startsWith(olympe.dc.Ug.mc)&&(g='fd'+g.substr(1));e=a.aa(e);c&&e instanceof Object&&8===e.c?a.Z.set(g,e):d[g]=e}return d}
464
+ 2],this.ua[d+3],this.ua[d+4]);d+=5;break;case b.Ao:a.fc(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.pg.C.lo,a,b,c);this.size++}pc(a,b,c,d){this.ua.push(olympe.dc.transaction.pg.C.gr,a,b,c,d);this.size++}Jc(a,b=olympe.dc.Sb.NONE,c){this.ua.push(olympe.dc.transaction.pg.C.zo,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)');
465
+ this.ua.push(olympe.dc.transaction.pg.C.mo,a,b,c,d);this.size++}fc(a,b,c,d){this.ua.push(olympe.dc.transaction.pg.C.Ao,a,b,c,d);this.size++}};olympe.dc.transaction.pg.C={lo:1,gr:2,zo:3,mo:4,Ao:5};olympe.dc.transaction.pg.la=[olympe.dc.Writable,olympe.dc.om];function Sd(a,b){return a.V.get(b)||a.db.source(b)||olympe.dc.Ha.bc}function Td(a,b){return a.N.has(b)?a.N.get(b):a.db.Vf(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.V.set(b,d.get(olympe.dc.$b.Kd));e=Sd(a,b);a.N.set(b,c&&a.F);a.Bc(e,c,f=>{f.F(b,d,0)})}
466
+ olympe.dc.transaction.wu=class{constructor(a,b){this.id=b||olympe.W.mc();this.db=a;this.C=new Map;this.G=new olympe.dc.db.xc(b);this.versions=new Map;this.V=new Map;this.Z={};this.N=new Map;this.F=!0}Rf(){return 0===this.G.C.size}persist(a){this.F=a}pc(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.Bc(d,Td(this,a),e=>{e.pc(a,b,c,0)})}Jc(a,b){const c=Sd(this,a),d=Td(this,
467
+ a);this.Bc(c,d,e=>{e.Jc(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.jc.Tc&&(olympe.pa.Xa('dc').warn(`Try to create a relation between 2 objects that have different locations: ${b}-[${a}]->${c}`),f=!1);this.Bc(d,f,g=>{g.Ra(a,b,c,0)})}fc(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.jc.Tc&&(olympe.pa.Xa('dc').warn(`Try to delete a relation between 2 objects that have different locations: ${b}-[${a}]->${c}`),
468
+ f=!1);this.Bc(d,f,g=>{g.fc(a,b,c,0)})}Bc(a,b,c){c(this.G);b&&this.F&&(b=this.C.get(a),b||(b=new olympe.dc.db.xc(this.id),this.C.set(a,b)),c(b))}};function 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.Kd)if(e===olympe.dc.Ha.rb)d[g]=olympe.dc.Na().Y();else{if(e===olympe.dc.Ha.Vc)continue}else g.startsWith(olympe.dc.$b.VERSION)?(g=g.substr(1),e=null===e?1:e):g.startsWith(olympe.dc.Ug.bc)&&(g='fd'+g.substr(1));e=a.aa(e);c&&e instanceof Object&&8===e.c?a.Z.set(g,e):d[g]=e}return d}
469
469
  function Wd(a){if(0===a.Z.size)return null;const b=Object.create(null);a.Z.forEach((c,d)=>{b[d]=c});a.Z.clear();return b}
470
470
  class Xd{constructor(){this.Z=new Map}aa(a){return a instanceof olympe.D.Wa||a instanceof olympe.D.qa||a instanceof olympe.D.ea?a.valueOf():a instanceof Date||a instanceof olympe.D.jb?(a=a instanceof olympe.D.jb?a.valueOf():a,{c:4,y:a.getUTCFullYear(),M:a.getUTCMonth()+1,d:a.getUTCDate(),h:a.getUTCHours(),m:a.getUTCMinutes(),s:a.getUTCSeconds(),S:a.getUTCMilliseconds(),z:0}):a instanceof olympe.D.Color?{c:7,r:a.Of().valueOf(),g:a.If().valueOf(),b:a.Df().valueOf(),a:a.Cf().valueOf()}:a&&'function'===
471
471
  typeof a.R?{c:8,t:a.R()}:a}}function Yd(a){a.Hg=[];a.Ue=[];a.$f=[];a.Ig=[];a.yg=[]}function Zd(a){const b={};0<a.yg.length&&(b.yg=a.yg);0<a.Ue.length&&(b.Ue=a.Ue);0<a.Hg.length&&(b.Hg=a.Hg);0<a.$f.length&&(b.$f=a.$f);0<a.Ig.length&&(b.Ig=a.Ig);Yd(a);return b}function $d(a){const b=[...a.yg,...a.Ue,...a.Hg,...a.$f,...a.Ig];Yd(a);return b}
472
472
  olympe.dc.transaction.wd=class{constructor(a=!1){this.Hg=[];this.Ue=[];this.$f=[];this.Ig=[];this.yg=[];this.G=a;this.C=olympe.D?new Xd:new class extends Xd{aa(b){return b&&'function'===typeof b.R?{c:8,t:b.R()}:b}}}flush(){return JSON.stringify($d(this))}F(a,b,c=-1){this.Hg.push({o:1,t:a,p:Vd(this.C,b||null,this.G),i:c});this.G&&(b=Wd(this.C))&&this.$f.push({o:2,t:a,p:b,i:c})}pc(a,b,c,d=-1){this.$f.push({o:2,t:a,p:Vd(this.C,b||null,!1),i:d})}Jc(a,b,c=-1){this.Ue.push({o:3,t:a,f:b,i:c})}Ra(a,b,c,d=
473
- -1){if(!a)throw Error('Cannot create relation of undefined type');if(!b)throw Error(`Cannot create relation ${a} from undefined origin to ${c}`);if(!c)throw Error(`Cannot create relation ${a} from ${b} to undefined destination`);this.Ig.push({o:4,m:a,l:b,r:c,i:d})}ec(a,b,c,d=-1){if(!a)throw Error('Cannot delete relation of undefined type');if(!b)throw Error('Cannot delete relation with undefined origin');if(!c)throw Error('Cannot delete relation with undefined destination');this.yg.push({o:5,m:a,
474
- l:b,r:c,i:d})}};olympe.dc.transaction.wd.la=[olympe.dc.Writable];olympe.dc.transaction.Sh=class{constructor(a){this.id=a||olympe.W.lc();this.C=new Map;this.Ka=new Map}Y(){return this.id}F(a,b){this.C.has(a)&&console.warn('Try to add twice the same instance in the graph');const c=new olympe.dc.transaction.Sh.Instance(a);if(b)for(const [d,e]of b)c.Ca(d,e);this.C.set(a,c)}pc(){throw Error('UpdateInstance should never be called on a SubGraph since it represents the result of a GraphDef Query');}Jc(){throw Error('DeleteInstance should never be called on a SubGraph since it represents the result of a GraphDef Query');
475
- }Ra(a,b,c){a=new olympe.dc.transaction.Sh.Relation(b,c,a);this.Ka.set(a.toString(),a)}ec(a,b,c){a=new olympe.dc.transaction.Sh.Relation(b,c,a);this.Ka.delete(a.F+'.'+a.G+'.'+a.C)}G(){return this.Ka.size+this.C.size}ee(){return this.C}Mc(a){const b=new Map;this.C.forEach((c,d)=>{const e=new Map;ae(c,(f,g)=>{if(g instanceof olympe.dc.Hc){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.pc(d,c)});this.Ka.forEach(c=>{a.Ra(c.C,c.F,c.G)})}};
473
+ -1){if(!a)throw Error('Cannot create relation of undefined type');if(!b)throw Error(`Cannot create relation ${a} from undefined origin to ${c}`);if(!c)throw Error(`Cannot create relation ${a} from ${b} to undefined destination`);this.Ig.push({o:4,m:a,l:b,r:c,i:d})}fc(a,b,c,d=-1){if(!a)throw Error('Cannot delete relation of undefined type');if(!b)throw Error('Cannot delete relation with undefined origin');if(!c)throw Error('Cannot delete relation with undefined destination');this.yg.push({o:5,m:a,
474
+ l:b,r:c,i:d})}};olympe.dc.transaction.wd.la=[olympe.dc.Writable];olympe.dc.transaction.Sh=class{constructor(a){this.id=a||olympe.W.mc();this.C=new Map;this.Ka=new Map}Y(){return this.id}F(a,b){this.C.has(a)&&console.warn('Try to add twice the same instance in the graph');const c=new olympe.dc.transaction.Sh.Instance(a);if(b)for(const [d,e]of b)c.Ca(d,e);this.C.set(a,c)}pc(){throw Error('UpdateInstance should never be called on a SubGraph since it represents the result of a GraphDef Query');}Jc(){throw Error('DeleteInstance should never be called on a SubGraph since it represents the result of a GraphDef Query');
475
+ }Ra(a,b,c){a=new olympe.dc.transaction.Sh.Relation(b,c,a);this.Ka.set(a.toString(),a)}fc(a,b,c){a=new olympe.dc.transaction.Sh.Relation(b,c,a);this.Ka.delete(a.F+'.'+a.G+'.'+a.C)}G(){return this.Ka.size+this.C.size}ee(){return this.C}Mc(a){const b=new Map;this.C.forEach((c,d)=>{const e=new Map;ae(c,(f,g)=>{if(g instanceof olympe.dc.Hc){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.pc(d,c)});this.Ka.forEach(c=>{a.Ra(c.C,c.F,c.G)})}};
476
476
  function ae(a,b){a.C.forEach((c,d)=>{b(d,b)})}olympe.dc.transaction.Sh.Instance=class{constructor(a){this.tag=a;this.C=new Map}R(){return this.tag}Ca(a,b){this.C.set(a,b);return this}deleteProperty(a){this.C.delete(a);return this}};olympe.dc.transaction.Sh.Relation=class{constructor(a,b,c){this.F=a;this.G=b;this.C=olympe.dc.xa(c)}toString(){return this.F+'.'+this.G+'.'+this.C}};olympe.dc.transaction.Sh.la=[olympe.dc.Writable,olympe.dc.om];function be(a,b){b&&a.ua.push(b);return b}function ce(a){return(b,c)=>a.forEach(d=>d&&d(b,c))}
477
- olympe.dc.Transaction=class{constructor(a){this.id=a||olympe.W.lc();this.ua=[];this.G=!0;this.F=[]}Y(){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.Xd(a,b))}uj(a,b=!0){const c=olympe.dc.xa(a);var d=this.ua.find(g=>g instanceof olympe.dc.transaction.ua.Xd&&g.R()===c);if(d)return d.persist(b);d=olympe.dc.Na();const e=d.model(a);if(null===e)throw Error('Try to persist a instance that does not exist: '+
478
- a);if(d.Vf(a))return null;const f=d.source(a)||olympe.dc.Ja.mc;a=this.create(e,a).persist(b).mi(f);for(const [g,h,k]of Ad(d,a))g!==olympe.dc.ic.Tc&&d.Vf(k)&&this.Ra(g,h===olympe.dc.za.DESTINATION?a:k,h===olympe.dc.za.DESTINATION?k:a);return a}delete(a,b=olympe.dc.Rb.Fc){be(this,new olympe.dc.transaction.ua.Qj(a,b))}update(a,b,c){return be(this,new olympe.dc.transaction.ua.Ti(a,b,c))}Ra(a,b,c){be(this,new olympe.dc.transaction.ua.so(a,b,c))}ec(a,b,c,d){be(this,new olympe.dc.transaction.ua.at(a,b,c,
479
- d))}Vm(a,b,c,d){be(this,new olympe.dc.transaction.ua.$s(a,b,c,d))}defineProperty(a,b,c,d,e,f){d=this.create(olympe.dm.Property,f);d.setProperty(olympe.dc.CloudObject.nameProp,c||'');void 0!==e&&this.update(a,olympe.dc.Ug.mc+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}jh(a,b,c='',{Yi:d=olympe.dm.Relation.F.fm,tj:e=olympe.dm.Relation.N,Mr:f=olympe.dm.Relation.C.Bq,Kr:g=olympe.dm.Relation.C.tl,
480
- wj:h=olympe.dm.Relation.C.rp}={},k=olympe.W.lc()){k=this.create(olympe.dm.Relation,k);k.setProperty(olympe.dc.CloudObject.nameProp,c||'');k.setProperty(olympe.dm.Relation.Nm,d);k.setProperty(olympe.dm.Relation.Cn,e);k.setProperty(olympe.dm.Relation.Xm,f);k.setProperty(olympe.dm.Relation.Wm,g);k.setProperty(olympe.dm.Relation.hl,h);k.setProperty(olympe.dm.Relation.hl,h);this.Ra(olympe.dc.CloudObject.G,a,k);this.Ra(olympe.dm.Relation.destinationModelRel,k,b);this.Ra(olympe.dc.CloudObject.containsRel,
481
- a,k);return k}uh(){return!1}Lm(a){this.F.push(olympe.D.Ia().Cb(a))}hb(a,b){a=ce([...this.F,a]);de(this,a,b)}Ym(a){a=ce([...this.F,a]);ee(olympe.dc.hi(),this,a,!0)}toString(){return`Transaction #${this.id}`}};olympe.dc.Transaction.la=[olympe.dc.iq];function Qd(a){var b=olympe.dc.hi();const c=a.Y();b.N.set(c,a);a.F.onDestroy(()=>{b.N.delete(c)});return(d,e,f)=>{const g=new olympe.dc.db.xc(c);e=(new Map).set(olympe.dc.$b.VERSION,b.db.version(d)+1).set(e,f);g.pc(d,e,!1,0);olympe.dc.Ad().bf(g,olympe.dc.Ja.rb)}}
482
- function Rd(a,b,c,d){var e=olympe.dc.hi();const f=olympe.dc.$b.VERSION,g=olympe.dc.ga.ja.Ah,h=olympe.dc.ga.ja.ul,k=a.Y(),l=a.uh(),n=new Map;for(const q of b.keys()){var p=e.db.source(q);if(p===olympe.dc.Ja.rb)continue;let r=n.get(p);r||(r=new olympe.dc.db.xc(k),n.set(p,r));p=b.get(q);p.set(f,e.db.version(q)+1);r.pc(q,p,!1,0)}for(const [q,r]of n)b=xc(new olympe.dc.ga(c?h:g,{Bc:r,uh:l},[q]),a.F),c&&d&&M(b,t=>{t?d(!1,t.message):d(!0,null)}),e.G.send(b)}
477
+ olympe.dc.Transaction=class{constructor(a){this.id=a||olympe.W.mc();this.ua=[];this.G=!0;this.F=[]}Y(){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.Xd(a,b))}uj(a,b=!0){const c=olympe.dc.xa(a);var d=this.ua.find(g=>g instanceof olympe.dc.transaction.ua.Xd&&g.R()===c);if(d)return d.persist(b);d=olympe.dc.Na();const e=d.model(a);if(null===e)throw Error('Try to persist a instance that does not exist: '+
478
+ a);if(d.Vf(a))return null;const f=d.source(a)||olympe.dc.Ha.bc;a=this.create(e,a).persist(b).mi(f);for(const [g,h,k]of Ad(d,a))g!==olympe.dc.jc.Tc&&d.Vf(k)&&this.Ra(g,h===olympe.dc.za.DESTINATION?a:k,h===olympe.dc.za.DESTINATION?k:a);return a}delete(a,b=olympe.dc.Sb.Fc){be(this,new olympe.dc.transaction.ua.Qj(a,b))}update(a,b,c){return be(this,new olympe.dc.transaction.ua.Ti(a,b,c))}Ra(a,b,c){be(this,new olympe.dc.transaction.ua.so(a,b,c))}fc(a,b,c,d){be(this,new olympe.dc.transaction.ua.at(a,b,c,
479
+ d))}Vm(a,b,c,d){be(this,new olympe.dc.transaction.ua.$s(a,b,c,d))}defineProperty(a,b,c,d,e,f){d=this.create(olympe.dm.Property,f);d.setProperty(olympe.dc.CloudObject.nameProp,c||'');void 0!==e&&this.update(a,olympe.dc.Ug.bc+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}jh(a,b,c='',{Yi:d=olympe.dm.Relation.F.fm,tj:e=olympe.dm.Relation.N,Mr:f=olympe.dm.Relation.C.Bq,Kr:g=olympe.dm.Relation.C.tl,
480
+ wj:h=olympe.dm.Relation.C.rp}={},k=olympe.W.mc()){k=this.create(olympe.dm.Relation,k);k.setProperty(olympe.dc.CloudObject.nameProp,c||'');k.setProperty(olympe.dm.Relation.Nm,d);k.setProperty(olympe.dm.Relation.Cn,e);k.setProperty(olympe.dm.Relation.Xm,f);k.setProperty(olympe.dm.Relation.Wm,g);k.setProperty(olympe.dm.Relation.hl,h);k.setProperty(olympe.dm.Relation.hl,h);this.Ra(olympe.dc.CloudObject.G,a,k);this.Ra(olympe.dm.Relation.destinationModelRel,k,b);this.Ra(olympe.dc.CloudObject.containsRel,
481
+ a,k);return k}uh(){return!1}Lm(a){this.F.push(olympe.D.Ja().Cb(a))}hb(a,b){a=ce([...this.F,a]);de(this,a,b)}Ym(a){a=ce([...this.F,a]);ee(olympe.dc.hi(),this,a,!0)}toString(){return`Transaction #${this.id}`}};olympe.dc.Transaction.la=[olympe.dc.iq];function Qd(a){var b=olympe.dc.hi();const c=a.Y();b.N.set(c,a);a.F.onDestroy(()=>{b.N.delete(c)});return(d,e,f)=>{const g=new olympe.dc.db.xc(c);e=(new Map).set(olympe.dc.$b.VERSION,b.db.version(d)+1).set(e,f);g.pc(d,e,!1,0);olympe.dc.Ad().bf(g,olympe.dc.Ha.rb)}}
482
+ function Rd(a,b,c,d){var e=olympe.dc.hi();const f=olympe.dc.$b.VERSION,g=olympe.dc.ga.ja.Ah,h=olympe.dc.ga.ja.ul,k=a.Y(),l=a.uh(),n=new Map;for(const q of b.keys()){var p=e.db.source(q);if(p===olympe.dc.Ha.rb)continue;let r=n.get(p);r||(r=new olympe.dc.db.xc(k),n.set(p,r));p=b.get(q);p.set(f,e.db.version(q)+1);r.pc(q,p,!1,0)}for(const [q,r]of n)b=xc(new olympe.dc.ga(c?h:g,{Bc:r,uh:l},[q]),a.F),c&&d&&M(b,t=>{t?d(!1,t.message):d(!0,null)}),e.G.send(b)}
483
483
  function de(a,b,c){var d=olympe.dc.hi();if(c&&b){const e=a.Y();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)}
484
- function fe(a){const b=olympe.dc.ga.ja.Tj;a.G.C(olympe.dc.ga.ja.Jj,(c,d)=>{c=d.id;var e=d.rollback;d=d.error;const f=a.N.get(c);void 0!==f&&(a.N.delete(c),f.Xb(d));olympe.dc.Ad().bf(e,olympe.dc.Ja.rb);a.L.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)})}
485
- function ee(a,b,c,d=!1){const e=olympe.D.Ia(),f=c?e.Cb(c):void 0;c=olympe.dc.Ad();const g=b.Y(),h=new olympe.dc.transaction.wu(a.db,g);b.C(h);if(h.Rf())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=Kc(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.uh(),(t,u)=>{!t&&a.C.has(g)&&(a.C.get(g).forEach(v=>v(olympe.dc.transaction.ug.C.ik,u)),je(a,g));n(t);p&&p(t);f&&f(t,u)})):(a.L.error(r),n(!1),f&&f(!1,r))})}}
484
+ function fe(a){const b=olympe.dc.ga.ja.Tj;a.G.C(olympe.dc.ga.ja.Jj,(c,d)=>{c=d.id;var e=d.rollback;d=d.error;const f=a.N.get(c);void 0!==f&&(a.N.delete(c),f.Xb(d));olympe.dc.Ad().bf(e,olympe.dc.Ha.rb);a.L.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)})}
485
+ function ee(a,b,c,d=!1){const e=olympe.D.Ja(),f=c?e.Cb(c):void 0;c=olympe.dc.Ad();const g=b.Y(),h=new olympe.dc.transaction.wu(a.db,g);b.C(h);if(h.Rf())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=Kc(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.uh(),(t,u)=>{!t&&a.C.has(g)&&(a.C.get(g).forEach(v=>v(olympe.dc.transaction.ug.C.ik,u)),je(a,g));n(t);p&&p(t);f&&f(t,u)})):(a.L.error(r),n(!1),f&&f(!1,r))})}}
486
486
  function ge(a,b,c){const d=[];for(const p of b.versions.keys())a.db.th(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.qg(olympe.D.oh()),n=olympe.W.di();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.Z(t);null===v?q():tc(a.Z,
487
487
  p,v,u,w=>{const y=h.reduce((A,D)=>A||D.Jf(p),null);null!==y&&(y.Ca(e,w).Ca(f,!0),k.push([p,w]));q()},w=>{r(w)})}):(2048<t.length&&a.L.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())})});Wb(l,(p,q)=>{let r=null;if(p){const t=new olympe.dc.db.xc;k.forEach(([u,v])=>{const w=new Map;w.set(e,v).set(f,!0).set(g,olympe.D.jb.now());t.pc(u,w,!0,0)});r=Kc(olympe.dc.Ad(),olympe.D.oh(),t,[],[])}c(r,p,q)});l.start()}}
488
488
  function he(a,b,c,d){const e=olympe.D.oh(),f=new olympe.async.qg(e);0<a.timeout&&Vb(f,a.timeout);const g=a.C.get(b);for(let h=0;h<d;h++)f.add((k,l,n)=>{g.push(e.Cb((p,q)=>{n.set('final',p);q?l(q):k()}))});Wb(f,(h,k,l)=>{h||a.L.warn(`An error occurred while processing the notification of transaction (${b}): ${k}.`);l.get('final')!==olympe.dc.transaction.ug.C.Xp&&olympe.dc.Ad().persist(c);je(a,b)});f.start()}
489
489
  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,{Bc:h,uh:d},[k]),p=>{p instanceof Error?n(p.message):l()});a.G.send(h)};var g=new olympe.async.qg(olympe.D.oh());for(const [h,k]of b)g.add(c.bind(null,k,h));Wb(g,e);g.start()}}function je(a,b){a.C.delete(b);if(0===a.C.size){for(var c of a.V)c();a.V=[]}a.F.has(b)&&(c=a.F.get(b),a.F.delete(b),c(!0,null))}
490
- function ke(a,b){0<a.C.size?a.V.push(olympe.D.Ia().Cb(b)):b()}olympe.dc.transaction.ug=class{constructor(a,b,c,d,e){this.L=a;this.db=b;this.G=c;this.Z=d;this.timeout=e;this.N=new Map;this.C=new Map;this.V=[];this.F=new Map;fe(this)}Xa(){return this.L}};olympe.dc.transaction.ug.C={ik:0,Wp:1,Xp:2};olympe.dc.transaction.O={Ea:'dc.transaction.Logger',va:'dc.transaction.Manager'};olympe.dc.transaction.Config={TIMEOUT:'dc.transaction.timeout',Zn:'dc.transaction.burstInterval'};
491
- olympe.T.config(function(a){E(a,olympe.dc.transaction.Config.TIMEOUT,6E4);E(a,olympe.dc.transaction.Config.Zn,30);C(a,olympe.dc.transaction.O.Ea,[olympe.pa.O.va],b=>b.Nc('dc'));B(a,olympe.dc.transaction.O.va,olympe.dc.transaction.ug,olympe.dc.transaction.O.Ea,olympe.dc.O.wi,olympe.dc.O.me,olympe.dc.O.zi,new olympe.T.fa(olympe.dc.transaction.Config.TIMEOUT))},'olympe.dc.transaction');olympe.dc.transaction.ua={};function W(a){return olympe.dc.xa(a)}function le(a,b){const c=new Map;for(const [d,e]of b)c.set(d,a.Ya(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 !');}Ya(a){a=olympe.D.Ya(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.Xd=class extends olympe.dc.transaction.ua.Pg{constructor(a,b){super();this.tag=void 0!==b?b:olympe.W.lc();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}mi(a){this.F.set(olympe.dc.$b.Jd,a);return this}ux(){this.F.set(olympe.dc.$b.Jd,olympe.dc.Ja.rb)}setProperty(a,b){this.F.set(olympe.dc.xa(a),b);return this}il(a){this.setProperty(olympe.dc.CloudObject.nameProp.R(),a);
492
- return this}C(a){const b=olympe.dc.Na(),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.Ja.mc)}if(b.Gb(d)&&!b.Vf(d)&&this.G){e=new Map([...b.rd(d,!0),...le(this,this.F)]);for(const g of e.values())g instanceof olympe.dc.Hc&&!Td(a,g.R())&&(f=new olympe.dc.Transaction,f.uj(g.R()),f.C(a));Ud(a,d,this.G,e);a.Ra(olympe.dc.CloudObject.modelRel.R(),
493
- d,c);for(const [g,h,k]of Ad(b,d))Td(a,k)&&(h===olympe.dc.za.ORIGIN?a.Ra(g,k,d):a.Ra(g,d,k))}else b.Gb(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.Xd.prototype.setProperty=olympe.dc.transaction.ua.Xd.prototype.setProperty;olympe.dc.transaction.ua.Xd.prototype.localSource=olympe.dc.transaction.ua.Xd.prototype.ux;olympe.dc.transaction.ua.Xd.prototype.persist=olympe.dc.transaction.ua.Xd.prototype.persist;
494
- olympe.dc.transaction.ua.Xd.prototype.getModelTag=olympe.dc.transaction.ua.Xd.prototype.Tb;olympe.dc.transaction.ua.Xd.prototype.getTag=olympe.dc.transaction.ua.Xd.prototype.R;olympe.dc.transaction.ua.Xd.la=[olympe.dc.ze];olympe.dc.transaction.ua.so=class extends olympe.dc.transaction.ua.Pg{constructor(a,b,c){super();this.type=a.Oa?a:new olympe.dc.X.Qb(W(a));this.F=b;this.G=c}Oa(){return this.Ya(this.type).Oa()}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.ic.Tc)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');
495
- const d=W(this.G);if(''===d)throw Error('OperationError: Cannot create relation, destination tag is undefined, null or empty string');this.Oa()===olympe.dc.za.DESTINATION?a.Ra(b,c,d):a.Ra(b,d,c)}toString(){return`CreateRelation('${this.Oa()}${W(this.type)}, ${W(this.F)}, ${W(this.G)})`}};olympe.dc.transaction.ua.dz=class extends olympe.dc.transaction.ua.Pg{constructor(a,b=olympe.dc.Rb.Fc){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.Na();for(const d of c.ee(b))d!==b&&(new olympe.dc.transaction.ua.Qj(d,this.F)).C(a)}toString(){return`DeleteAllInstances(${this.Tb()}, ${this.F})`}};olympe.dc.transaction.ua.$s=class extends olympe.dc.transaction.ua.Pg{constructor(a,b,c,d){super();this.F=a.Oa?a:new olympe.dc.X.Qb(W(a));this.G=b;this.N=c||!1;this.V=d instanceof Array?d.map(e=>W(e)):null}Oa(){return this.Ya(this.F).Oa()}C(a){const b=W(this.F);if(void 0===b)throw Error('OperationError: Cannot delete relation, type is undefined');if(b===olympe.dc.ic.Tc)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');
496
- var d=olympe.dc.Na();const e=this.Oa(),f=this.V;d=d.ub(c,this.F);for(const g of d)e===olympe.dc.za.DESTINATION?a.ec(b,c,g):a.ec(b,g,c),null!==f&&0<=f.indexOf(g)||this.N&&(new olympe.dc.transaction.ua.Qj(g,olympe.dc.Rb.Fc)).C(a)}toString(){return`DeleteAllRelations(${this.Oa()}${W(this.F)}, ${W(this.G)}, ${this.N})`}};olympe.dc.transaction.ua.Qj=class extends olympe.dc.transaction.ua.Pg{constructor(a,b=olympe.dc.Rb.Fc){super();this.tag=a;this.F=b}R(){return W(this.tag)}C(a){const b=olympe.dc.Na(),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.Jc(c,this.F)}toString(){return'DeleteInstance('+this.R()+', '+this.F+')'}};olympe.dc.transaction.ua.at=class extends olympe.dc.transaction.ua.so{constructor(a,b,c,d=!1){super(a,b,c);this.N=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.ic.Tc)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
- this.Oa()===olympe.dc.za.DESTINATION?a.ec(b,c,d):a.ec(b,d,c);this.N&&(new olympe.dc.transaction.ua.Qj(d,olympe.dc.Rb.Fc)).C(a)}toString(){return'DeleteRelation('+this.Oa()+W(this.type)+', '+W(this.F)+', '+W(this.G)+', '+this.N+')'}};olympe.dc.transaction.ua.Ti=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.Na();var d=c.version(b),e=a.versions.get(b);e=void 0!==e?e:d;if(null===e)throw Error('OperationError: Instance #'+
490
+ function ke(a,b){0<a.C.size?a.V.push(olympe.D.Ja().Cb(b)):b()}olympe.dc.transaction.ug=class{constructor(a,b,c,d,e){this.L=a;this.db=b;this.G=c;this.Z=d;this.timeout=e;this.N=new Map;this.C=new Map;this.V=[];this.F=new Map;fe(this)}Xa(){return this.L}};olympe.dc.transaction.ug.C={ik:0,Wp:1,Xp:2};olympe.dc.transaction.O={Ea:'dc.transaction.Logger',va:'dc.transaction.Manager'};olympe.dc.transaction.Config={TIMEOUT:'dc.transaction.timeout',Zn:'dc.transaction.burstInterval'};
491
+ olympe.T.config(function(a){E(a,olympe.dc.transaction.Config.TIMEOUT,6E4);E(a,olympe.dc.transaction.Config.Zn,30);C(a,olympe.dc.transaction.O.Ea,[olympe.pa.O.va],b=>b.Nc('dc'));B(a,olympe.dc.transaction.O.va,olympe.dc.transaction.ug,olympe.dc.transaction.O.Ea,olympe.dc.O.wi,olympe.dc.O.me,olympe.dc.O.zi,new olympe.T.fa(olympe.dc.transaction.Config.TIMEOUT))},'olympe.dc.transaction');olympe.dc.transaction.ua={};function W(a){return olympe.dc.xa(a)}function le(a,b){const c=new Map;for(const [d,e]of b)c.set(d,a.Ya(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 !');}Ya(a){a=olympe.D.Ya(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.Xd=class extends olympe.dc.transaction.ua.Pg{constructor(a,b){super();this.tag=void 0!==b?b:olympe.W.mc();this.model=a;this.F=new Map;this.G=!0;this.F.set(olympe.dc.$b.VERSION,1)}R(){return W(this.tag)}Rb(){return W(this.model)}persist(a){this.G=a;return this}mi(a){this.F.set(olympe.dc.$b.Kd,a);return this}ux(){this.F.set(olympe.dc.$b.Kd,olympe.dc.Ha.rb)}setProperty(a,b){this.F.set(olympe.dc.xa(a),b);return this}il(a){this.setProperty(olympe.dc.CloudObject.nameProp.R(),a);
492
+ return this}C(a){const b=olympe.dc.Na(),c=this.Rb(),d=this.R();if(void 0===c)throw Error('OperationError: Cannot create instance, model tag is undefined');var e=olympe.dc.$b.Kd;if(!this.F.has(e)){var f=b.source(c);this.F.set(e,null!==f?f:olympe.dc.Ha.bc)}if(b.Gb(d)&&!b.Vf(d)&&this.G){e=new Map([...b.rd(d,!0),...le(this,this.F)]);for(const g of e.values())g instanceof olympe.dc.Hc&&!Td(a,g.R())&&(f=new olympe.dc.Transaction,f.uj(g.R()),f.C(a));Ud(a,d,this.G,e);a.Ra(olympe.dc.CloudObject.modelRel.R(),
493
+ d,c);for(const [g,h,k]of Ad(b,d))Td(a,k)&&(h===olympe.dc.za.ORIGIN?a.Ra(g,k,d):a.Ra(g,d,k))}else b.Gb(d)||(Ud(a,d,this.G,le(this,this.F)),a.Ra(olympe.dc.CloudObject.modelRel.R(),d,c))}toString(){return`CreateInstance(${this.Rb()}, ${this.R()})`}};olympe.dc.transaction.ua.Xd.prototype.setProperty=olympe.dc.transaction.ua.Xd.prototype.setProperty;olympe.dc.transaction.ua.Xd.prototype.localSource=olympe.dc.transaction.ua.Xd.prototype.ux;olympe.dc.transaction.ua.Xd.prototype.persist=olympe.dc.transaction.ua.Xd.prototype.persist;
494
+ olympe.dc.transaction.ua.Xd.prototype.getModelTag=olympe.dc.transaction.ua.Xd.prototype.Rb;olympe.dc.transaction.ua.Xd.prototype.getTag=olympe.dc.transaction.ua.Xd.prototype.R;olympe.dc.transaction.ua.Xd.la=[olympe.dc.ze];olympe.dc.transaction.ua.so=class extends olympe.dc.transaction.ua.Pg{constructor(a,b,c){super();this.type=a.Oa?a:new olympe.dc.X.Qb(W(a));this.F=b;this.G=c}Oa(){return this.Ya(this.type).Oa()}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.jc.Tc)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');
495
+ const d=W(this.G);if(''===d)throw Error('OperationError: Cannot create relation, destination tag is undefined, null or empty string');this.Oa()===olympe.dc.za.DESTINATION?a.Ra(b,c,d):a.Ra(b,d,c)}toString(){return`CreateRelation('${this.Oa()}${W(this.type)}, ${W(this.F)}, ${W(this.G)})`}};olympe.dc.transaction.ua.dz=class extends olympe.dc.transaction.ua.Pg{constructor(a,b=olympe.dc.Sb.Fc){super();this.model=a;this.F=b}Rb(){return W(this.model)}C(a){const b=this.Rb();if(void 0===b)throw Error('OperationError: Cannot delete instances of model, model is undefined');const c=olympe.dc.Na();for(const d of c.ee(b))d!==b&&(new olympe.dc.transaction.ua.Qj(d,this.F)).C(a)}toString(){return`DeleteAllInstances(${this.Rb()}, ${this.F})`}};olympe.dc.transaction.ua.$s=class extends olympe.dc.transaction.ua.Pg{constructor(a,b,c,d){super();this.F=a.Oa?a:new olympe.dc.X.Qb(W(a));this.G=b;this.N=c||!1;this.V=d instanceof Array?d.map(e=>W(e)):null}Oa(){return this.Ya(this.F).Oa()}C(a){const b=W(this.F);if(void 0===b)throw Error('OperationError: Cannot delete relation, type is undefined');if(b===olympe.dc.jc.Tc)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');
496
+ var d=olympe.dc.Na();const e=this.Oa(),f=this.V;d=d.ub(c,this.F);for(const g of d)e===olympe.dc.za.DESTINATION?a.fc(b,c,g):a.fc(b,g,c),null!==f&&0<=f.indexOf(g)||this.N&&(new olympe.dc.transaction.ua.Qj(g,olympe.dc.Sb.Fc)).C(a)}toString(){return`DeleteAllRelations(${this.Oa()}${W(this.F)}, ${W(this.G)}, ${this.N})`}};olympe.dc.transaction.ua.Qj=class extends olympe.dc.transaction.ua.Pg{constructor(a,b=olympe.dc.Sb.Fc){super();this.tag=a;this.F=b}R(){return W(this.tag)}C(a){const b=olympe.dc.Na(),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.Jc(c,this.F)}toString(){return'DeleteInstance('+this.R()+', '+this.F+')'}};olympe.dc.transaction.ua.at=class extends olympe.dc.transaction.ua.so{constructor(a,b,c,d=!1){super(a,b,c);this.N=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.jc.Tc)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
+ this.Oa()===olympe.dc.za.DESTINATION?a.fc(b,c,d):a.fc(b,d,c);this.N&&(new olympe.dc.transaction.ua.Qj(d,olympe.dc.Sb.Fc)).C(a)}toString(){return'DeleteRelation('+this.Oa()+W(this.type)+', '+W(this.F)+', '+W(this.G)+', '+this.N+')'}};olympe.dc.transaction.ua.Ti=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.Na();var d=c.version(b),e=a.versions.get(b);e=void 0!==e?e:d;if(null===e)throw Error('OperationError: Instance #'+
498
498
  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.Hc&&(e=e.R(),a.Z[e]=!0),g instanceof olympe.dc.Hc&&!Td(a,g.R())&&(e=new olympe.dc.Transaction,e.uj(g.R()),e.C(a));a.pc(b,d)}toString(){return'UpdateInstance('+this.R()+', '+le(this,this.F)+')'}};olympe.dc.transaction.ua.Ti.prototype.setProperty=olympe.dc.transaction.ua.Ti.prototype.setProperty;
499
499
  olympe.dc.transaction.ua.Ti.prototype.getTag=olympe.dc.transaction.ua.Ti.prototype.R;olympe.dc.da={};olympe.dc.ze=class{R(){}};olympe.dc.ze.prototype.getTag=olympe.dc.ze.prototype.R;olympe.dc.Tz=olympe.dc.ze;olympe.dc.da.km={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.da.U.Gc(a.p,b,olympe.dc.Na());case 2:return new olympe.dc.da.U.Sc(a.p,a.s,olympe.dc.Na(),a.c);case 3:return new olympe.dc.da.U.Gh(a.p,a.b,a.l,a.s);case 4:return new olympe.dc.da.U.kd(me(a.v));case 5:return new olympe.dc.da.U.xd(a.p,new RegExp(a.r),olympe.dc.Na(),a.c);case 6:b=new olympe.dc.da.U.De(a.d);
500
500
  for(const [d,e,f]of a.r)a=new olympe.dc.query.Relation(d,e,f),f?b.Pk(a):b.sb(a);return b;case 7:return new olympe.dc.da.U.be(...a.p.map(d=>me(d)));case 8:return new olympe.dc.da.U.Vd(...a.p.map(d=>me(d)));default:return null}}
501
501
  olympe.dc.da.$a=class{observe(){}hb(){}clear(){}ia(){}toString(){}static qb(a,b){return new olympe.dc.da.U.Gc(a,b,olympe.dc.Na())}static contains(a,b,c=!1){return new olympe.dc.da.U.Sc(a,b,olympe.dc.Na(),c)}static js(a,b,c=!0){return new olympe.dc.da.U.xd(a,b,olympe.dc.Na(),c)}static Wk(a,b,c=!0){return new olympe.dc.da.U.Gh(a,b,!1,c)}static zj(a,b,c=!0){return new olympe.dc.da.U.Gh(a,b,!0,c)}static and(...a){return new olympe.dc.da.U.Vd(...a)}static or(...a){return new olympe.dc.da.U.be(...a)}static not(a){return new olympe.dc.da.U.kd(a)}};
502
502
  olympe.dc.da.$a.not=olympe.dc.da.$a.not;olympe.dc.da.$a.or=olympe.dc.da.$a.or;olympe.dc.da.$a.and=olympe.dc.da.$a.and;olympe.dc.da.$a.smallerThan=olympe.dc.da.$a.zj;olympe.dc.da.$a.greaterThan=olympe.dc.da.$a.Wk;olympe.dc.da.$a.regex=olympe.dc.da.$a.js;olympe.dc.da.$a.contains=olympe.dc.da.$a.contains;olympe.dc.da.$a.equals=olympe.dc.da.$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.da.Kb.jg||b instanceof olympe.dc.da.Kb.kg).length}function pe(a){const b=a.C.findIndex(c=>c instanceof olympe.dc.da.Kb.Rh);a=0===a.F.size?a.Xi():a;if(0<=b&&!a.F.has(b))throw Error('AndReturn was not called for the current level before sortBy operator');return a}
503
- function qe(a,b){const c=olympe.dc.Ed.SUBSCRIBE,d=olympe.dc.Ed.Mi,e=new olympe.dc.jf(a.G,b?c:d);for(const f of a.C)f instanceof olympe.dc.da.Kb.jg?e.sb(f.Qd()):f instanceof olympe.dc.da.Kb.kg?e.sb(f.Qd(),!0):f instanceof olympe.dc.da.Kb.rc&&(a=f.C,a instanceof olympe.dc.da.U.De&&(a=a.dd(),a.forEach(g=>e.sb(g)),re(e,a.length)));return e}function se(a){return new olympe.dc.gb(a.r,a.s,a.qp.map(b=>te(b)),new Set(a.lv),{max:a.lp.m,offset:a.lp.o})}
504
- olympe.dc.gb=class{constructor(a,b=olympe.dc.Ja.mc,c=[],d=new Set,e={max:-1,offset:0}){this.db=olympe.dc.Na();this.G=olympe.dc.xa(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){return new olympe.dc.gb(a)}static Yk(a,b){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.da.Kb.jg(this.db,a));return ne(this,b)}bw(a,b=!1){const c=Array.from(this.C);c.push(new olympe.dc.da.Kb.kg(this.db,
503
+ function qe(a,b){const c=olympe.dc.Fd.SUBSCRIBE,d=olympe.dc.Fd.Mi,e=new olympe.dc.jf(a.G,b?c:d);for(const f of a.C)f instanceof olympe.dc.da.Kb.jg?e.sb(f.Rd()):f instanceof olympe.dc.da.Kb.kg?e.sb(f.Rd(),!0):f instanceof olympe.dc.da.Kb.rc&&(a=f.C,a instanceof olympe.dc.da.U.De&&(a=a.dd(),a.forEach(g=>e.sb(g)),re(e,a.length)));return e}function se(a){return new olympe.dc.gb(a.r,a.s,a.qp.map(b=>te(b)),new Set(a.lv),{max:a.lp.m,offset:a.lp.o})}
504
+ olympe.dc.gb=class{constructor(a,b=null,c=[],d=new Set,e={max:-1,offset:0}){this.db=olympe.dc.Na();this.G=olympe.dc.xa(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 Yk(a,b=olympe.dc.Ha.bc){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.da.Kb.jg(this.db,a));return ne(this,b)}bw(a,b=!1){const c=Array.from(this.C);c.push(new olympe.dc.da.Kb.kg(this.db,
505
505
  a,b));return ne(this,c)}Xi(){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.da.Kb.rc(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})}ll(a,b){const c=Array.from(this.C);c.push(new olympe.dc.da.Kb.Rh(this.db,a,b));return ne(this,c)}hb(a){return ue(olympe.dc.Lf(),pe(this),'function'===typeof a.Ec?a.Ec():
506
506
  a)}observe(a){return ve(olympe.dc.Lf(),pe(this),'function'===typeof a.Ec?a.Ec():a)}bd(){var a=pe(this);return olympe.dc.Lf().V.bd(a)}Y(){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.bd;
507
507
  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.ll;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.Xi;olympe.dc.gb.prototype.followRecursively=olympe.dc.gb.prototype.bw;
508
508
  olympe.dc.gb.prototype.follow=olympe.dc.gb.prototype.sb;olympe.dc.gb.instancesOf=olympe.dc.gb.Yk;olympe.dc.gb.from=olympe.dc.gb.from;function te(a){const b=olympe.dc.Na();switch(a.t){case 1:return(a=me(a.p))?new olympe.dc.da.Kb.rc(a):null;case 2:return new olympe.dc.da.Kb.jg(b,new olympe.dc.query.Relation(a.r.t,a.r.d,!1));case 3:var c=a.s;return new olympe.dc.da.Kb.kg(b,new olympe.dc.query.Relation(a.r.t,a.r.d,!0),c);case 4:return c=a.o,new olympe.dc.da.Kb.Rh(b,new olympe.dc.ta.Property(a.p),c);default:return null}}olympe.dc.da.nk=class{ia(){}F(){}hb(){}observe(){}toString(){}};function we(a){return a.G.map(b=>a.F.get(a.C[b]))}function xe(a){return a.N.map(b=>{b=b.split('.');return 1===b.length?b[0]:b})}function ye(a){a=Array.from(a.F.values()).flat();return new Set(a.map(b=>b.R()))}function ze(a){return new Set(a.N.flatMap(b=>b.split('.')))}
509
- function Ae(a,b){var c=olympe.dc.Na();if(c.Gb(a)){b.F(a,c.rd(a,!0),0);b.Ra(olympe.dc.ic.Tc,a,c.model(a),0);for(const [d,e,f]of Ad(c,a))(c=b.Jf(f))&&c.se()&&(e===olympe.dc.za.DESTINATION?b.Ra(d,a,f,0):b.Ra(d,f,a,0))}else olympe.pa.Xa('Query Result').error(`Fail to serialize instance with tag ${a} not present in local DBView`)}
510
- function Be(a,b,c=olympe.dc.Ja.Vc){b&&b((new olympe.dc.W.Li(c)).C(a.p||[]));const d=olympe.dc.Na();let e=!1;b=a.k.map(f=>{const g=f.split('.').map(h=>d.Gb(h)?olympe.dc.CloudObject.get(h):(olympe.pa.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)}
509
+ function Ae(a,b){var c=olympe.dc.Na();if(c.Gb(a)){b.F(a,c.rd(a,!0),0);b.Ra(olympe.dc.jc.Tc,a,c.model(a),0);for(const [d,e,f]of Ad(c,a))(c=b.Jf(f))&&c.se()&&(e===olympe.dc.za.DESTINATION?b.Ra(d,a,f,0):b.Ra(d,f,a,0))}else olympe.pa.Xa('Query Result').error(`Fail to serialize instance with tag ${a} not present in local DBView`)}
510
+ function Be(a,b,c=olympe.dc.Ha.Vc){b&&b((new olympe.dc.W.Li(c)).C(a.p||[]));const d=olympe.dc.Na();let e=!1;b=a.k.map(f=>{const g=f.split('.').map(h=>d.Gb(h)?olympe.dc.CloudObject.get(h):(olympe.pa.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)}
511
511
  olympe.dc.Va=class{constructor(){this.C=[];this.F=new Map;this.G=[];this.N=[];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()}ff(){return this.C.map(a=>this.F.get(a))}size(){return this.C.length}has(a){return this.F.has(a)||this.ff().includes(a)}indexOf(a){return null===
512
512
  a||void 0===a?-1:'string'===typeof a?this.C.indexOf(a):this.ff().indexOf(a)}get(a){return(a=this.F.get(a))?a:null}Oc(){return this.re(0)}re(a){return a<this.C.length?this.F.get(this.C[a]):null}push(...a){const b=this.ff();b.push(...a);return b}pop(){if(0===this.C.length)return[];const a=this.ff();a.pop();return a}shift(){if(0<this.C.length){const a=this.ff();a.shift();return a}return[]}filter(a){return this.ff().filter(a)}find(a){return(a=this.ff().find(a))?a:null}forEach(a){this.C.forEach((b,c)=>
513
- a(this.F.get(b),c))}map(a){return this.ff().map(a)}sort(a){const b=this.entries().sort((c,d)=>a(c[1],d[1]));return olympe.dc.Va.create(b,Array.from(this.G),Array.from(this.N))}reduce(a,b){return this.ff().reduce(a,b)}concat(...a){const b=[this.entries(),...a.map(d=>d.entries())].flat();let c=Array.from(this.G);for(const d of a)c=c.concat(d.G.map(e=>e+c.length));a=this.N.concat(...a.map(d=>d.N));return olympe.dc.Va.create(b,c,a)}static from(a,b){const c=olympe.dc.Na();var d=Ce(b);if(b.Ld){const {kb:k,
514
- order:l,Ld:n,Gv:p}=b.Ld,q=Array.from(b.F).sort().indexOf(p),r=l===olympe.dc.da.km.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=>
513
+ a(this.F.get(b),c))}map(a){return this.ff().map(a)}sort(a){const b=this.entries().sort((c,d)=>a(c[1],d[1]));return olympe.dc.Va.create(b,Array.from(this.G),Array.from(this.N))}reduce(a,b){return this.ff().reduce(a,b)}concat(...a){const b=[this.entries(),...a.map(d=>d.entries())].flat();let c=Array.from(this.G);for(const d of a)c=c.concat(d.G.map(e=>e+c.length));a=this.N.concat(...a.map(d=>d.N));return olympe.dc.Va.create(b,c,a)}static from(a,b){const c=olympe.dc.Na();var d=Ce(b);if(b.Md){const {kb:k,
514
+ order:l,Md:n,Gv:p}=b.Md,q=Array.from(b.F).sort().indexOf(p),r=l===olympe.dc.da.km.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=>
515
515
  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.N=c||[];return e}ia(){const a=new olympe.dc.db.xc;var b=new Set(this.G.flatMap(c=>this.C[c].split('.')));for(const c of b)Ae(c,a);b=new olympe.dc.transaction.wd;a.Mc(b);return{k:this.C,p:$d(b),a:this.G,r:this.N}}};
516
516
  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;
517
517
  olympe.dc.Va.prototype.push=olympe.dc.Va.prototype.push;olympe.dc.Va.prototype.getAt=olympe.dc.Va.prototype.re;olympe.dc.Va.prototype.getFirst=olympe.dc.Va.prototype.Oc;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.ff;olympe.dc.Va.prototype.keys=olympe.dc.Va.prototype.keys;
518
- 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 Ce(a){var b=new Set(X(a,a.Cg()-1).keys());a.C.push((new Map).set('sink',b));b=[];for(const c of De(a,'sink',a.Cg()-1,''))b.push(c.slice(0,-1).split(';'));a.C.pop();return b}function Ee(a,b,c,d,e){a.Ld={Ld:b,Gv:c,order:d,kb:e}}function Fe(a,b){a.G=b}function Ge(a){a.G?a.N||(a.N=!0,a.G()):olympe.pa.Xa('dc').error('Trying to notify update for partial result but callback has not been previously set')}function X(a,b){return b>=a.Cg()?new Map:a.C[b]}
518
+ 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 Ce(a){var b=new Set(X(a,a.Cg()-1).keys());a.C.push((new Map).set('sink',b));b=[];for(const c of De(a,'sink',a.Cg()-1,''))b.push(c.slice(0,-1).split(';'));a.C.pop();return b}function Ee(a,b,c,d,e){a.Md={Md:b,Gv:c,order:d,kb:e}}function Fe(a,b){a.G=b}function Ge(a){a.G?a.N||(a.N=!0,a.G()):olympe.pa.Xa('dc').error('Trying to notify update for partial result but callback has not been previously set')}function X(a,b){return b>=a.Cg()?new Map:a.C[b]}
519
519
  function De(a,b,c,d){if(0===c)return a.F.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.F.has(c)?`${b};${d}`:d;return e.reduce((g,h)=>{for(const k of De(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)}
520
- olympe.dc.da.rq=class{constructor(a){this.C=Array.from({length:oe(a)+1},()=>new Map);this.F=new Set(Array.from(a.F));this.Ld=null;this.N=!1;this.G=null;this.max=a.max;this.offset=a.offset}Cg(){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.pa.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.Cg())return olympe.pa.Xa('dc').error('Try to insert result entry to a higher level than possible'),
520
+ olympe.dc.da.rq=class{constructor(a){this.C=Array.from({length:oe(a)+1},()=>new Map);this.F=new Set(Array.from(a.F));this.Md=null;this.N=!1;this.G=null;this.max=a.max;this.offset=a.offset}Cg(){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.pa.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.Cg())return olympe.pa.Xa('dc').error('Try to insert result entry to a higher level than possible'),
521
521
  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.pa.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 Ge(this),Ie(this,a,b,a),!0;Ge(this);return!1}};olympe.dc.ld=class{constructor(a){this.query=a}static from(a){return new olympe.dc.ld(olympe.dc.gb.from(a))}sb(a){return new olympe.dc.ld(this.query.sb(a))}Zi(){return this}hb(a){return this.query.hb(a).then(b=>{const c=b.size();return 1<c?(olympe.pa.Xa('dc').warn('a follow() on a QuerySingle has '+c+' results (0 or 1 expected) -> returns null'),null):b.Oc()||null})}bd(){const a=this.query.bd(),b=a.size();return 1<b?(olympe.pa.Xa('dc').warn('a follow() on a QuerySingle has '+b+' results (0 or 1 expected) -> returns null'),
522
522
  null):a.Oc()||null}};olympe.dc.ld.prototype.executeFromCache=olympe.dc.ld.prototype.bd;olympe.dc.ld.prototype.execute=olympe.dc.ld.prototype.hb;olympe.dc.ld.prototype.cast=olympe.dc.ld.prototype.Zi;olympe.dc.ld.prototype.follow=olympe.dc.ld.prototype.sb;olympe.dc.da.U={};olympe.dc.da.U.Vd=class{constructor(...a){this.U=a}hb(a){return this.U.reduce((b,c)=>b&&c.hb(a),!0)}observe(a,b,c){const d=this.U.map(()=>!1),e=this.U.map(()=>null),f=(g,h)=>{d[h]=g;g=d.every(k=>k);e[h]!==g&&(e[h]=g,c(g))};this.U.forEach((g,h)=>{g.observe(a,olympe.W.mb('AND-'+b+a+h),k=>f(k,h))})}ia(){return{pr:8,p:this.U.map(a=>a.ia())}}toString(){return'And-'+this.U.reduce((a,b)=>a+'-'+b.toString(),'')}clear(a,b){this.U.forEach((c,d)=>{c.clear(a,olympe.W.mb('AND-'+b+a+d))})}};
523
523
  olympe.dc.da.U.Vd.C=8;olympe.dc.da.U.Vd.la=[olympe.dc.da.$a];olympe.dc.da.U.Sc=class{constructor(a,b,c,d=!1){this.kb=olympe.dc.xa(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){xd(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+
@@ -530,93 +530,93 @@ p:this.kb,r:this.C.source,c:this.F}}clear(a,b){this.db.F(a,this.kb,olympe.W.mb(b
530
530
  f,g,h)=>e?f?this.db.Nf(g,h,c):this.db.Nf(g,h):this.db.ub(g,h);for(let e=0;e<this.Ka.length;++e){const f=this.Ka[e],g=this.recursive[e],h=e===this.Ka.length-1;if(0===e)b=d(g,h,a,f);else if(b=b.flatMap(k=>d(g,h,k,f)),0===b.length)return!1}return c?b.includes(c):0<b.length}observe(a,b,c){const d=this.Ka.length;let e=0;const f=new Set,g=(k,l)=>{this.destination&&this.destination!==l||(e+=k?1:-1,1<e||c(0<e))},h=(k,l,n,p)=>{const q=this.Ka[k],r=this.recursive[k-1]?this.Ka[k-1]:null;l=olympe.W.mb(l+k+p);
531
531
  const t=olympe.W.mb(l+'rec');k===d?g(n,p):n?f.has(p)||(f.add(p),V(this.db,p,q,h.bind(this,k+1,l),l),r&&V(this.db,p,r,h.bind(this,k,t),t)):(f.delete(p),this.db.C(p,q,l),r&&this.db.C(p,r,t))};h(0,b,!0,a);0===e&&c(!1)}ia(){return{pr:6,r:this.Ka.map((a,b)=>[a.R(),a.Oa(),this.recursive[b]]),d:this.destination}}toString(){const a=this.Ka.reduce((b,c,d)=>b+c.R()+this.recursive[d],'');return`RelatedTo-${this.destination}-${a}`}};olympe.dc.da.U.De.prototype.followRecursive=olympe.dc.da.U.De.prototype.Pk;
532
532
  olympe.dc.da.U.De.prototype.follow=olympe.dc.da.U.De.prototype.sb;olympe.dc.da.U.De.C=6;olympe.dc.da.U.De.la=[olympe.dc.da.$a];olympe.dc.da.Kb={};olympe.dc.da.Kb.rc=class{constructor(a){this.C=a}F(a){return a}hb(a,b){for(const c of X(a,b).keys())this.C.hb(c)||(0===b?a.remove(c,b,null):He(a,c,b).forEach(d=>{a.remove(c,b,d)}))}observe(a,b,c){let d=!1;return(e,f,g,h)=>{const k=olympe.W.mb(h+f+this.toString());e?this.C.observe(f,k,l=>{d||(l?a.insert(f,b,g):a.remove(f,b,g),c(l,f,g,k))}):(d=!0,this.C.clear(f,k),d=!1,c(!1,f,g,k))}}ia(){return{t:1,p:this.C.ia()}}toString(){return'filterQueryPart-'+this.C.toString()}};olympe.dc.da.Kb.rc.C=1;
533
- olympe.dc.da.Kb.rc.la=[olympe.dc.da.nk];olympe.dc.da.Kb.jg=class{constructor(a,b){this.db=a;this.C=b}Qd(){return this.C}F(a){return a+1}hb(a,b){for(const c of X(a,b).keys())this.db.ub(c,this.C).forEach(d=>{a.insert(d,b+1,c)})}observe(a,b,c){return(d,e,f,g)=>{const h=olympe.W.mb(g+e+this.toString());d?V(this.db,e,this.C,(k,l)=>{(k?a.insert(l,b+1,e):a.remove(l,b+1,e))&&c(k,l,e,h)},h):this.db.C(e,this.C,h)}}ia(){return{t:2,r:{t:this.C.R(),d:this.C.Oa()}}}toString(){return'followQueryPart-'+this.C.Oa()+this.C.R()}};olympe.dc.da.Kb.jg.C=2;
534
- olympe.dc.da.Kb.jg.la=[olympe.dc.da.nk];olympe.dc.da.Kb.kg=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.Nf(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,
535
- 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.Oa()}}}toString(){return'followRecursivelyQueryPart-'+this.C.Oa()+this.C.R()}};olympe.dc.da.Kb.kg.C=3;olympe.dc.da.Kb.kg.la=[olympe.dc.da.nk];function Me(a){a=a.db.fc(a.kb,olympe.dm.Property.typeRel);const b=olympe.dc.xa;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.pa.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)}}
536
- olympe.dc.da.Kb.Rh=class{constructor(a,b,c){this.db=a;this.kb=b;this.order=c}F(a){return a}hb(a,b){Ee(a,Me(this),b,this.order,this.kb)}observe(a,b,c){Ee(a,Me(this),b,this.order,this.kb);return(d,e,f,g)=>{g=olympe.W.mb(g+this.toString());d?xd(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.da.Kb.Rh.C=4;olympe.dc.da.Kb.Rh.la=[olympe.dc.da.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.lc();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.N.has(b)){a.N.add(b);for(const f of a.C.get(b))e=d.get(f),d.delete(f),c instanceof olympe.dc.query.aj.Yj?e(Error(c.aa()),c):'string'===typeof c?e(Error(c),null):e(null,c);a.C.delete(b);a.N.delete(b)}}else a.L.warn(e)}
537
- 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.Ns=class{constructor(a){this.L=a;this.C=new Map;this.F=new Map;this.G=new Map;this.N=new Set}};olympe.dc.Ne=class{ma(){}N(){}G(){}V(){}ia(){}toString(){}};olympe.dc.Ed={SUBSCRIBE:0,Mi:1,qm:2,WA: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.Rb.NONE,'back');let c=a.Z;for(let d=0;d<b&&null!==c;d++)c=a.F.get(c.F)||null;a.Z=c}function Ue(a){return'not_defined'===a.C?olympe.dc.Rb.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.Rb.NONE}
533
+ olympe.dc.da.Kb.rc.la=[olympe.dc.da.nk];olympe.dc.da.Kb.jg=class{constructor(a,b){this.db=a;this.C=b}Rd(){return this.C}F(a){return a+1}hb(a,b){for(const c of X(a,b).keys())this.db.ub(c,this.C).forEach(d=>{a.insert(d,b+1,c)})}observe(a,b,c){return(d,e,f,g)=>{const h=olympe.W.mb(g+e+this.toString());d?V(this.db,e,this.C,(k,l)=>{(k?a.insert(l,b+1,e):a.remove(l,b+1,e))&&c(k,l,e,h)},h):this.db.C(e,this.C,h)}}ia(){return{t:2,r:{t:this.C.R(),d:this.C.Oa()}}}toString(){return'followQueryPart-'+this.C.Oa()+this.C.R()}};olympe.dc.da.Kb.jg.C=2;
534
+ olympe.dc.da.Kb.jg.la=[olympe.dc.da.nk];olympe.dc.da.Kb.kg=class{constructor(a,b,c=!1){this.db=a;this.C=b;this.G=c}Rd(){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.Nf(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,
535
+ 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.Oa()}}}toString(){return'followRecursivelyQueryPart-'+this.C.Oa()+this.C.R()}};olympe.dc.da.Kb.kg.C=3;olympe.dc.da.Kb.kg.la=[olympe.dc.da.nk];function Me(a){a=a.db.hc(a.kb,olympe.dm.Property.typeRel);const b=olympe.dc.xa;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.pa.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)}}
536
+ olympe.dc.da.Kb.Rh=class{constructor(a,b,c){this.db=a;this.kb=b;this.order=c}F(a){return a}hb(a,b){Ee(a,Me(this),b,this.order,this.kb)}observe(a,b,c){Ee(a,Me(this),b,this.order,this.kb);return(d,e,f,g)=>{g=olympe.W.mb(g+this.toString());d?xd(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.da.Kb.Rh.C=4;olympe.dc.da.Kb.Rh.la=[olympe.dc.da.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.mc();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.N.has(b)){a.N.add(b);for(const f of a.C.get(b))e=d.get(f),d.delete(f),c instanceof olympe.dc.query.aj.Yj?e(Error(c.aa()),c):'string'===typeof c?e(Error(c),null):e(null,c);a.C.delete(b);a.N.delete(b)}}else a.L.warn(e)}
537
+ 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.Ns=class{constructor(a){this.L=a;this.C=new Map;this.F=new Map;this.G=new Map;this.N=new Set}};olympe.dc.Ne=class{ma(){}N(){}G(){}V(){}ia(){}toString(){}};olympe.dc.Fd={SUBSCRIBE:0,Mi:1,qm:2,WA:0,GET:1};olympe.dc.Fd.toString=function(a){for(const [b,c]of Object.entries(olympe.dc.Fd))if(c===a)return b;return null};function re(a,b=1){a.validate(olympe.dc.Sb.NONE,'back');let c=a.Z;for(let d=0;d<b&&null!==c;d++)c=a.F.get(c.F)||null;a.Z=c}function Ue(a){return'not_defined'===a.C?olympe.dc.Sb.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.Sb.NONE}
538
538
  function Xe(a){if(We(a))throw Error('An implicit GraphDef has no blocks');return a.F.values()}
539
539
  function Ye(a,b,c){c=new olympe.dc.query.Relation(b.R(),b.Oa(),c||b instanceof olympe.dc.X.Dc);b=[];var d;for(var e of Ze(a)){if(d=a.F.get(e)){var f=new olympe.dc.query.Xj(c,d.id);d.children.has(f.Y())?d=d.children.get(f.Y()):(d.children.set(f.Y(),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.Xj(g,h);d.V.set(f,g);d=g}f=d.Y();a.F.set(f,d);b.push(f)}e=b[0];a.ra.set(e,b);return a.F.get(e)}
540
- 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.jf(a.G,a.N);b.C=a.C;for(const [c,d]of a.V)b.V.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.Sl(bf(a),b||olympe.D.Ia()):new olympe.dc.query.Wj(bf(a),b||olympe.D.Ia())}
541
- function Ze(a){let b=a.Z;const c=[];for(;b&&b.Qd().recursive;)c.push(b.Y()),b=a.F.get(b.F)||null;c.push(b&&b.Y()||olympe.W.mb(a.G));const d=[];c.slice(0,5).forEach(e=>{d.push(...a.ra.get(e))});return d}
542
- olympe.dc.jf=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.xa(a);this.N=b;this.C='not_defined';this.aa=[];this.Z=null;this.V=new Map;this.F=new Map;this.ka=null;this.ra=(new Map).set(olympe.W.mb(this.G),[olympe.W.mb(this.G)])}static Jc(a,b){olympe.dc.jf.Ue([a],b)}static Ue(a,b){const c=new olympe.dc.Transaction;a.forEach(d=>c.delete(d,olympe.dc.Rb.Fc));c.hb(b)}toJSON(){const a=Object.create(null),
543
- b=c=>{const d=Object.create(null),e=c.Qd();d.t=e.R();d.d=e.Oa();d.r=e.recursive;d.c=c.lh().map(b);return d};a.t=this.G;a.o=this.N;a.f=Ue(this);a.b=Array.from(this.V.keys()).map(c=>b(this.F.get(c)));return JSON.stringify(a)}static kc(a){a='string'===typeof a?JSON.parse(a):a;const b=Ve(new olympe.dc.jf(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}Y(){const a=olympe.W.mb,b=d=>d.Y()+d.lh().map(e=>b(e)).sort().join(''),
544
- c=Array.from(this.V,([,d])=>b(d)).sort().join('');return a(`${this.N}-${this.G}${c}-${Ue(this)}`)}add(a,b=!1){this.validate(olympe.dc.Rb.NONE,'add');Ye(this,a,b);return this}sb(a,b=!1){this.validate(olympe.dc.Rb.NONE,'follow');this.Z=Ye(this,a,b);return this}hb(a=b=>b){'not_defined'===this.C&&(this.C=olympe.dc.Rb.NONE);const b=olympe.dc.Lf();a=olympe.D.Ia().Cb(a);switch(this.N){case olympe.dc.Ed.SUBSCRIBE:case olympe.dc.Ed.Mi:const c=df(b,this,a);olympe.D.Ia().vc(()=>{ef(olympe.dc.Lf(),c.Y())});break;
545
- case olympe.dc.Ed.qm: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.Rb.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.Mc(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.rt=class{constructor(a,b){this.id=a;this.C=new Map;this.data=b}Y(){return this.id}};class hf{constructor(a){this.id=a;this.add=[];this.remove=[]}Y(){return this.id}};function kf(a){return(a=a.C)&&olympe.dc.Na().source(a)||olympe.dc.Ja.Vc}function lf(a){return Array.from(a.Da,b=>a.F.get(b))}function mf(a){if(!a.N){for(const b of a.V.values())b();a.V.clear();a.N=!0}}
546
- olympe.dc.query.Wj=class{constructor(a,b){this.sh=a;this.C=a.G;this.id=a.Y();this.aa=new olympe.D.Wb(`GraphSubscription ${this.id}`,b);this.L=olympe.pa.Xa('dc.query');this.Da=[];this.F=new Map;this.N=!1;this.V=new Map;b=olympe.W.mb(this.C);if(!We(a))for(const c of Xe(a))this.F.set(c.Y(),c),c.F===b&&this.Da.push(c.Y())}Y(){return this.id}Ke(a,b){b=b||olympe.W.lc();this.N?a():this.V.set(b,olympe.D.Ia().Cb(a));return b}rj(a){return this.V.delete(a)}onDestroy(a){this.aa.onDestroy(a)}release(){this.aa.destroy()}Z(){return function*(a,
540
+ 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.jf(a.G,a.N);b.C=a.C;for(const [c,d]of a.V)b.V.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.Sl(bf(a),b||olympe.D.Ja()):new olympe.dc.query.Wj(bf(a),b||olympe.D.Ja())}
541
+ function Ze(a){let b=a.Z;const c=[];for(;b&&b.Rd().recursive;)c.push(b.Y()),b=a.F.get(b.F)||null;c.push(b&&b.Y()||olympe.W.mb(a.G));const d=[];c.slice(0,5).forEach(e=>{d.push(...a.ra.get(e))});return d}
542
+ olympe.dc.jf=class{constructor(a,b=olympe.dc.Fd.SUBSCRIBE){if(void 0===a||null===a)throw Error('Cannot create GraphDef with undefined or null baseTag');this.G=olympe.dc.xa(a);this.N=b;this.C='not_defined';this.aa=[];this.Z=null;this.V=new Map;this.F=new Map;this.ka=null;this.ra=(new Map).set(olympe.W.mb(this.G),[olympe.W.mb(this.G)])}static Jc(a,b){olympe.dc.jf.Ue([a],b)}static Ue(a,b){const c=new olympe.dc.Transaction;a.forEach(d=>c.delete(d,olympe.dc.Sb.Fc));c.hb(b)}toJSON(){const a=Object.create(null),
543
+ b=c=>{const d=Object.create(null),e=c.Rd();d.t=e.R();d.d=e.Oa();d.r=e.recursive;d.c=c.lh().map(b);return d};a.t=this.G;a.o=this.N;a.f=Ue(this);a.b=Array.from(this.V.keys()).map(c=>b(this.F.get(c)));return JSON.stringify(a)}static lc(a){a='string'===typeof a?JSON.parse(a):a;const b=Ve(new olympe.dc.jf(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}Y(){const a=olympe.W.mb,b=d=>d.Y()+d.lh().map(e=>b(e)).sort().join(''),
544
+ c=Array.from(this.V,([,d])=>b(d)).sort().join('');return a(`${this.N}-${this.G}${c}-${Ue(this)}`)}add(a,b=!1){this.validate(olympe.dc.Sb.NONE,'add');Ye(this,a,b);return this}sb(a,b=!1){this.validate(olympe.dc.Sb.NONE,'follow');this.Z=Ye(this,a,b);return this}hb(a=b=>b){'not_defined'===this.C&&(this.C=olympe.dc.Sb.NONE);const b=olympe.dc.Lf();a=olympe.D.Ja().Cb(a);switch(this.N){case olympe.dc.Fd.SUBSCRIBE:case olympe.dc.Fd.Mi:const c=df(b,this,a);olympe.D.Ja().vc(()=>{ef(olympe.dc.Lf(),c.Y())});break;
545
+ case olympe.dc.Fd.qm: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.Sb.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.Mc(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.rt=class{constructor(a,b){this.id=a;this.C=new Map;this.data=b}Y(){return this.id}};class hf{constructor(a){this.id=a;this.add=[];this.remove=[]}Y(){return this.id}};function kf(a){return(a=a.C)&&olympe.dc.Na().source(a)||olympe.dc.Ha.Vc}function lf(a){return Array.from(a.Da,b=>a.F.get(b))}function mf(a){if(!a.N){for(const b of a.V.values())b();a.V.clear();a.N=!0}}
546
+ olympe.dc.query.Wj=class{constructor(a,b){this.sh=a;this.C=a.G;this.id=a.Y();this.aa=new olympe.D.Wb(`GraphSubscription ${this.id}`,b);this.L=olympe.pa.Xa('dc.query');this.Da=[];this.F=new Map;this.N=!1;this.V=new Map;b=olympe.W.mb(this.C);if(!We(a))for(const c of Xe(a))this.F.set(c.Y(),c),c.F===b&&this.Da.push(c.Y())}Y(){return this.id}Ke(a,b){b=b||olympe.W.mc();this.N?a():this.V.set(b,olympe.D.Ja().Cb(a));return b}rj(a){return this.V.delete(a)}onDestroy(a){this.aa.onDestroy(a)}release(){this.aa.destroy()}Z(){return function*(a,
547
547
  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.L.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)})}ra(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=>
548
- k.C.delete(l)))):this.L.error(`A notification contains a block ${e} which is not present in the current graph query ${this.id}`)});Pc(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.lh().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,
548
+ k.C.delete(l)))):this.L.error(`A notification contains a block ${e} which is not present in the current graph query ${this.id}`)});Pc(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.Rd(),p=[e(k+n),e(k+new olympe.dc.query.Relation(n.tag,n.direction,!0))].filter(q=>f.has(q));return 0<p.length?l.lh().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,
549
549
  l))return!1;return!0})}};olympe.dc.query.Xj=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": [';
550
- for(const b of this.C)a+=JSON.stringify(b)+', ';a.endsWith(', ')&&(a=a.substr(0,a.length-2));a+=']'}return a+'}'}static kc(a){var b;'string'===typeof a?b=JSON.parse(a):b=a;a=olympe.dc.query.Relation.kc(b.relation);a=new olympe.dc.query.Xj(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.Xj.kc(c),a.children.set(b.id,b);return a}Y(){return this.id}Qd(){return this.G}lh(){return Array.from(this.children.values())}ee(){return this.C.values()}toString(){return this.F+
550
+ for(const b of this.C)a+=JSON.stringify(b)+', ';a.endsWith(', ')&&(a=a.substr(0,a.length-2));a+=']'}return a+'}'}static lc(a){var b;'string'===typeof a?b=JSON.parse(a):b=a;a=olympe.dc.query.Relation.lc(b.relation);a=new olympe.dc.query.Xj(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.Xj.lc(c),a.children.set(b.id,b);return a}Y(){return this.id}Rd(){return this.G}lh(){return Array.from(this.children.values())}ee(){return this.C.values()}toString(){return this.F+
551
551
  this.G.toString()}};function nf(a,b){a.C.forEach((c,d)=>b(d,c))}
552
- olympe.dc.query.Di=class{constructor(a,b,c,d){this.id=a;this.source=b;this.destination=c;this.C=new Map;this.Bc=d}toJSON(){let a=`{ "id": "${this.id}", "source": "${this.source}", "destination": "${this.destination}"`;a.endsWith(', ')&&(a=a.substr(0,a.length-2));a+=', "blocks": {';for(const [b,c]of this.C)a+=`"${b}": ${JSON.stringify(Array.from(c))}, `;a.endsWith(', ')&&(a=a.substr(0,a.length-2));a+=`}, "patch": ${this.Bc.toJSON()}`;return a+'}'}static kc(a){let b;'string'===typeof a?b=JSON.parse(a):
553
- b=a;a=olympe.dc.db.xc.kc(b.patch);a=new olympe.dc.query.Di(b.id,b.source,b.destination,a);for(const [c,d]of Object.entries(b.blocks))a.C.set(c,new Set(d));return a}Y(){return this.id}};const of=olympe.dc.ic.Tc,pf=olympe.dc.ic.yi,qf=olympe.dc.za.ORIGIN,rf=olympe.dc.za.DESTINATION;function sf(a,b,c){const d=a.sh.aa;return c.filter(e=>d.reduce((f,g)=>f&&!g(b,e.Qd()),!0))}
552
+ olympe.dc.query.Di=class{constructor(a,b,c,d){this.id=a;this.source=b;this.destination=c;this.C=new Map;this.Bc=d}toJSON(){let a=`{ "id": "${this.id}", "source": "${this.source}", "destination": "${this.destination}"`;a.endsWith(', ')&&(a=a.substr(0,a.length-2));a+=', "blocks": {';for(const [b,c]of this.C)a+=`"${b}": ${JSON.stringify(Array.from(c))}, `;a.endsWith(', ')&&(a=a.substr(0,a.length-2));a+=`}, "patch": ${this.Bc.toJSON()}`;return a+'}'}static lc(a){let b;'string'===typeof a?b=JSON.parse(a):
553
+ b=a;a=olympe.dc.db.xc.lc(b.patch);a=new olympe.dc.query.Di(b.id,b.source,b.destination,a);for(const [c,d]of Object.entries(b.blocks))a.C.set(c,new Set(d));return a}Y(){return this.id}};const of=olympe.dc.jc.Tc,pf=olympe.dc.jc.yi,qf=olympe.dc.za.ORIGIN,rf=olympe.dc.za.DESTINATION;function sf(a,b,c){const d=a.sh.aa;return c.filter(e=>d.reduce((f,g)=>f&&!g(b,e.Rd()),!0))}
554
554
  olympe.dc.query.Sl=class extends olympe.dc.query.Wj{constructor(a,b){super(a,b);this.G=(new Set).add(a.G)}Z(){return this.G.values()}ka(a){a=a.Bc;for(const b of a.ee())b.N()?this.G.delete(b.tag()):b.se()&&this.G.add(b.tag())}ra(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)))});Pc(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;
555
- b=olympe.dm.Relation.C.Ck;c=olympe.dm.Relation.C.rk;const e=olympe.dc.Na();for(const h of d){var f=h.Qd(),g=f.R();d=f.Oa();if(d!==rf||g!==of&&g!==pf){if(!e.Gb(f))return this.L.info('ImplicitGraphQuery: checking coverage of graphPath',a.Y(),'failed at the relation',g,'which is not in local DB'),!1;f=zd(e,f,Ue(this.sh));g=0===h.lh().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.Z()||(a=`Calling "${b}" on subscription with id ${a.Y()} while it is not ready (thus no data is available).`+'This call should be made within an onReady callback.',olympe.pa.Xa('dc').warn(a))}
555
+ b=olympe.dm.Relation.C.Ck;c=olympe.dm.Relation.C.rk;const e=olympe.dc.Na();for(const h of d){var f=h.Rd(),g=f.R();d=f.Oa();if(d!==rf||g!==of&&g!==pf){if(!e.Gb(f))return this.L.info('ImplicitGraphQuery: checking coverage of graphPath',a.Y(),'failed at the relation',g,'which is not in local DB'),!1;f=zd(e,f,Ue(this.sh));g=0===h.lh().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.Z()||(a=`Calling "${b}" on subscription with id ${a.Y()} while it is not ready (thus no data is available).`+'This call should be made within an onReady callback.',olympe.pa.Xa('dc').warn(a))}
556
556
  function vf(a,b){const c=new olympe.D.Wb('listDef toObservable',a.nc().Hh());return new rxjs.Observable(d=>{c.run(()=>{olympe.D.wc([b],e=>{d.next(e.valueOf())})});c.onDestroy(()=>{d.complete()});return c.destroy.bind(c)})}
557
- olympe.dc.Aa=class{constructor(a,b,c){void 0===a||null===a?olympe.pa.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.xa,String),this.X=void 0!==b&&(Array.isArray(b)?b:[b])||[],this.valueType=c||tf(this),this.C=null)}Qc(){return olympe.dc.Qc()}hb(){if(null===this.C){const a=olympe.dc.Lf();this.C=wf(a,this);null!==this.valueType&&this.C.Gd(this.valueType);olympe.D.Ia().vc(()=>{xf(a,this.C.Y());this.C=
558
- null})}return this}nc(){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}Vl(){return this.X}Ke(a,b){return this.nc().Ke(a,b)}rj(a){this.nc().rj(a)}Jt(){return this.nc().Qf()}It(){return this.nc().Z()}get(a){return this.nc().get(a)}fi(){return this.nc().fi()}mh(a){const b=this.nc();uf(b,'getCurrent');return b.mh(a)}has(a){return this.nc().has(a)}Fg(a){const b=
557
+ olympe.dc.Aa=class{constructor(a,b,c){void 0===a||null===a?olympe.pa.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.xa,String),this.X=void 0!==b&&(Array.isArray(b)?b:[b])||[],this.valueType=c||tf(this),this.C=null)}Qc(){return olympe.dc.Qc()}hb(){if(null===this.C){const a=olympe.dc.Lf();this.C=wf(a,this);null!==this.valueType&&this.C.Hd(this.valueType);olympe.D.Ja().vc(()=>{xf(a,this.C.Y());this.C=
558
+ null})}return this}nc(){null===this.C&&this.hb();return this.C}Hd(a){this.valueType=a;null!==this.C&&this.C.Hd(this.valueType)}Yb(){return null!==this.C?this.C.Yb():null===this.valueType?olympe.dc.CloudObject:this.valueType}Pd(){return this.F}Vl(){return this.X}Ke(a,b){return this.nc().Ke(a,b)}rj(a){this.nc().rj(a)}Jt(){return this.nc().Qf()}It(){return this.nc().Z()}get(a){return this.nc().get(a)}fi(){return this.nc().fi()}mh(a){const b=this.nc();uf(b,'getCurrent');return b.mh(a)}has(a){return this.nc().has(a)}Fg(a){const b=
559
559
  this.nc();uf(b,'hasCurrent');return b.Fg(a)}re(a){return this.nc().re(a)}Ox(a){return vf(this,this.re(a))}Xe(a){const b=this.nc();uf(b,'getCurrentAt');return b.Xe(a)}Ye(a){return this.nc().Ye(a)}Ef(a){const b=this.nc();uf(b,'getCurrentKeyAt');return b.Ef(a)}fe(a){return this.nc().fe(a)}Sx(a){return vf(this,this.fe(a))}Ff(a){const b=this.nc();uf(b,'getCurrentRank');return b.Ff(a)}Oc(){return this.nc().Oc()}Px(){return vf(this,this.Oc())}Gf(){return this.nc().Gf()}mf(){return this.nc().mf()}Tx(){return vf(this,
560
560
  this.mf())}Bg(){const a=this.nc();uf(a,'getCurrentSize');return a.Bg()}forEach(a,b){this.nc().forEach(a,b)}de(a){const b=this.nc();uf(b,'forEachCurrentValue');return b.de(a)}cj(a,b,c,d){a=new olympe.dc.X.$d(a,b);(new olympe.dc.Aa(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===
561
- 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.Aa(this.F,a);b.Gd(tf(b)||this.valueType||Object);return b}nl(a){return this.transform(new olympe.dc.X.uf(a))}filter(a){return this.transform(new olympe.dc.X.rc(a))}xg(){const a=new olympe.dc.fk(this.F,null===this.valueType?
561
+ 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.Aa(this.F,a);b.Hd(tf(b)||this.valueType||Object);return b}nl(a){return this.transform(new olympe.dc.X.uf(a))}filter(a){return this.transform(new olympe.dc.X.rc(a))}xg(){const a=new olympe.dc.fk(this.F,null===this.valueType?
562
562
  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.Ya(this.F)+a+')'}Ht(){return this.nc().Vg()}hd(){return olympe.D.Fa([this.mf()],a=>{let b='[';for(let c=0;c<a;c++){const d=this.Xe(c).toString();b=0<c&&c<a?b+(', '+d):b+d}return olympe.D.Bb(b+']')},olympe.D.Wa)}};olympe.dc.Aa.prototype.filter=olympe.dc.Aa.prototype.filter;olympe.dc.Aa.prototype.union=olympe.dc.Aa.prototype.nl;
563
563
  olympe.dc.Aa.prototype.transform=olympe.dc.Aa.prototype.transform;olympe.dc.Aa.prototype.forEachCurrentValue=olympe.dc.Aa.prototype.de;olympe.dc.Aa.prototype.forEach=olympe.dc.Aa.prototype.forEach;olympe.dc.Aa.prototype.getCurrentSize=olympe.dc.Aa.prototype.Bg;olympe.dc.Aa.prototype.observeSize=olympe.dc.Aa.prototype.Tx;olympe.dc.Aa.prototype.observeFirst=olympe.dc.Aa.prototype.Px;olympe.dc.Aa.prototype.getCurrentRank=olympe.dc.Aa.prototype.Ff;olympe.dc.Aa.prototype.observeRank=olympe.dc.Aa.prototype.Sx;
564
- olympe.dc.Aa.prototype.getCurrentAt=olympe.dc.Aa.prototype.Xe;olympe.dc.Aa.prototype.observeAt=olympe.dc.Aa.prototype.Ox;olympe.dc.Aa.prototype.offReady=olympe.dc.Aa.prototype.rj;olympe.dc.Aa.prototype.onReady=olympe.dc.Aa.prototype.Ke;olympe.dc.Aa.prototype.getBaseTag=olympe.dc.Aa.prototype.Od;olympe.dc.Aa.la=[olympe.D.nd];m=olympe.dc.Aa.prototype;m.Qc.K=olympe.D.J.C;m.hb.K=olympe.D.J.N();m.nc.K=new olympe.D.J(()=>olympe.dc.query.Subscription,[]);m.Gd.K=new olympe.D.J(()=>{},[]);
565
- m.Od.K=new olympe.D.J(()=>String,[]);m.Vl.K=new olympe.D.J(()=>Array,[]);m.Ke.K=new olympe.D.J(()=>String,[]);m.rj.K=new olympe.D.J(()=>{},[]);m.Jt.K=olympe.D.J.V;m.It.K=olympe.D.J.C;m.get.K=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.fi.K=new olympe.D.J(()=>Array,[]);m.mh.K=olympe.D.J.C;m.has.K=olympe.D.J.V;m.Fg.K=olympe.D.J.C;m.re.K=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.Xe.K=olympe.D.J.C;m.Ye.K=new olympe.D.J(()=>String,[]);m.Ef.K=olympe.D.J.C;m.fe.K=olympe.D.J.G;
564
+ olympe.dc.Aa.prototype.getCurrentAt=olympe.dc.Aa.prototype.Xe;olympe.dc.Aa.prototype.observeAt=olympe.dc.Aa.prototype.Ox;olympe.dc.Aa.prototype.offReady=olympe.dc.Aa.prototype.rj;olympe.dc.Aa.prototype.onReady=olympe.dc.Aa.prototype.Ke;olympe.dc.Aa.prototype.getBaseTag=olympe.dc.Aa.prototype.Pd;olympe.dc.Aa.la=[olympe.D.nd];m=olympe.dc.Aa.prototype;m.Qc.K=olympe.D.J.C;m.hb.K=olympe.D.J.N();m.nc.K=new olympe.D.J(()=>olympe.dc.query.Subscription,[]);m.Hd.K=new olympe.D.J(()=>{},[]);
565
+ m.Pd.K=new olympe.D.J(()=>String,[]);m.Vl.K=new olympe.D.J(()=>Array,[]);m.Ke.K=new olympe.D.J(()=>String,[]);m.rj.K=new olympe.D.J(()=>{},[]);m.Jt.K=olympe.D.J.V;m.It.K=olympe.D.J.C;m.get.K=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.fi.K=new olympe.D.J(()=>Array,[]);m.mh.K=olympe.D.J.C;m.has.K=olympe.D.J.V;m.Fg.K=olympe.D.J.C;m.re.K=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.Xe.K=olympe.D.J.C;m.Ye.K=new olympe.D.J(()=>String,[]);m.Ef.K=olympe.D.J.C;m.fe.K=olympe.D.J.G;
566
566
  m.Ff.K=olympe.D.J.C;m.Oc.K=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.Gf.K=new olympe.D.J(()=>String,[]);m.mf.K=olympe.D.J.G;m.Bg.K=olympe.D.J.C;m.forEach.K=new olympe.D.J(()=>{},[]);m.de.K=olympe.D.J.C;m.cj.K=new olympe.D.J(()=>{},[]);m.transform.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.nl.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.filter.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.xg.K=new olympe.D.J(()=>olympe.dc.fk,[]);m.toString.K=olympe.D.J.C;m.Ht.K=olympe.D.J.C;m.hd.K=olympe.D.J.F;const yf={Cy:'append',Il:'filter_not',Qo:'filter_and',Ro:'filter_or'};function zf(a,b){a=Af(a);a=olympe.dc.CloudObject.get(a);return(new olympe.dc.na.Un(a,b)).F}
567
567
  olympe.dc.fk=class{constructor(a,b){this.C=Af(a);this.L=olympe.dc.Lf().Xa();this.valueType=void 0===b?olympe.dc.CloudObject:b;this.X=[];this.ua=[]}nf(){return new olympe.dc.Aa(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',
568
568
  'one of the argument is not a Transformer '+d);const e=d.Yb();null!==e&&(this.valueType=e);this.X.push(d)}return this}nl(a){this.X.push(new olympe.dc.X.uf(a));return this}Ay(a){this.X.push(new olympe.dc.X.uf(Af(a)));return this}Lt(a){this.valueType=a;return this}sb(a){this.X.push(a);this.valueType=a.Yb()||olympe.dc.CloudObject;return this}dw(a){for(const b of a)this.X.push(b),this.valueType=b.Yb()||olympe.dc.CloudObject;return this}Pk(a,b,c){a=new olympe.dc.X.Dc(a,a.Oa(),b,c);this.X.push(a);this.valueType=
569
569
  a.Yb()||olympe.dc.CloudObject;return this}aw(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.Oa())}a=new olympe.dc.X.Be(b,c);this.X.push(a);this.valueType=a.Yb()||olympe.dc.CloudObject;return this}Kt(){this.sb(olympe.dc.CloudObject.instancesRel);return this}We(a){var b=this.ua.pop();b===yf.Il&&(a=new olympe.dc.U.kd(a),b=this.ua.pop());switch(b){case yf.Qo:b=this.X.pop().C;b instanceof olympe.dc.U.Vd?(b=b.U,b.push(a),a=new olympe.dc.U.Vd(...b)):a=new olympe.dc.U.Vd(b,
570
- a);b=this.ua.pop();break;case yf.Ro:b=this.X.pop().C,b instanceof olympe.dc.U.be?(b=b.U,b.push(a),a=new olympe.dc.U.be(...b)):a=new olympe.dc.U.be(b,a),b=this.ua.pop()}b===yf.Il&&(a=new olympe.dc.U.kd(a),this.ua.pop());this.X.push(new olympe.dc.X.rc(a));return this}Wv(a,b,c){return this.We(new olympe.dc.U.Gc(zf(a,c),new olympe.dc.na.Dd(b)))}contains(a,b,c=!1,d){return this.We(new olympe.dc.U.Sc(zf(a,d),new olympe.dc.na.Dd(b),c))}th(a){if(!(a instanceof Array))throw new Bf('instanceOf','Provided argument "models" must be an array.');
571
- const b=[];for(let c=0;c<a.length;c++)b.push(Af(a[c]));return this.We(new olympe.dc.U.lf(b))}Xk(a){return this.We(new olympe.dc.U.Gc(new olympe.dc.na.sf,new olympe.dc.na.Dd(Af(a))))}Xv(a){if(!Array.isArray(a))throw Error('ExcludeInstances should be called with an array');if(0<a.length){this.not().Xk(a[0]);for(let b=1,c=a.length;b<c;b++)this.and().not().Xk(a[b])}return this}lj(a,b){if(!(a instanceof Array))throw new Bf('hasRelated','Provided argument "relations" must be an array.');const c=[],d=[];
572
- a.forEach(e=>{c.push(e);d.push(e.Oa())});return this.We(new olympe.dc.U.kf(c,d,b))}Wk(a,b,c){a=zf(a,c);return this.We(new olympe.dc.U.ye(a,new olympe.dc.na.Dd(b)))}zj(a,b,c){a=zf(a,c);return this.We(new olympe.dc.U.Fe(a,new olympe.dc.na.Dd(b)))}Ax(a,b,c,d){a=zf(a,d);return this.We(new olympe.dc.U.xd(a,b,c))}filter(a){const b=new class extends olympe.dc.U.Og{C(c,d){return a(olympe.dc.CloudObject.get(d))}};return this.We(b)}not(){this.ua.push(yf.Il);return this}and(){this.X[this.X.length-1]instanceof
573
- olympe.dc.X.rc&&this.ua.push(yf.Qo);return this}or(){this.X[this.X.length-1]instanceof olympe.dc.X.rc&&this.ua.push(yf.Ro);return this}ll(a,b,c){a=Af(a);let d=null;switch(olympe.dc.Na().fc(a,olympe.dm.Property.typeRel)){case olympe.dm.String.P.R():d=new olympe.dc.Db.String(new olympe.dc.na.oe(a,c));break;case olympe.dm.Number.P.R():d=new olympe.dc.Db.Number(new olympe.dc.na.ke(a,c));break;case olympe.dm.DateTime.P.R():d=new olympe.dc.Db.DateTime(new olympe.dc.na.je(a,c))}c=d;null!==c&&this.X.push(new olympe.dc.X.Kd(c,
574
- b));return this}sort(a,b,c){const d=new class extends olympe.dc.Db.Og{N(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}Sv(){this.X.push(new olympe.dc.X.xe);return this}limit(a,b){this.X.push(new olympe.dc.X.$d(a,b));return this}};class Bf extends Error{constructor(a,b){super(`ListDefBuilder.${a}(): ${b}`)}}
575
- function Af(a){return'string'===typeof a||a instanceof olympe.D.Wa?a:'function'===typeof a?olympe.dc.Ba.Tb(a):olympe.D.lb(a)?a.Hk===olympe.D.Wa?a:olympe.D.Fa([a],b=>olympe.D.Bb(olympe.dc.xa(b)),olympe.D.Wa):a.R()}m=olympe.dc.fk.prototype;m.nf.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.transform.K=olympe.D.J.N();m.nl.K=olympe.D.J.N();m.Ay.K=olympe.D.J.N();m.Lt.K=olympe.D.J.N();m.sb.K=olympe.D.J.N();m.dw.K=olympe.D.J.N();m.Pk.K=olympe.D.J.N();m.aw.K=olympe.D.J.N();m.Kt.K=olympe.D.J.N();m.We.K=olympe.D.J.N();
570
+ a);b=this.ua.pop();break;case yf.Ro:b=this.X.pop().C,b instanceof olympe.dc.U.be?(b=b.U,b.push(a),a=new olympe.dc.U.be(...b)):a=new olympe.dc.U.be(b,a),b=this.ua.pop()}b===yf.Il&&(a=new olympe.dc.U.kd(a),this.ua.pop());this.X.push(new olympe.dc.X.rc(a));return this}Wv(a,b,c){return this.We(new olympe.dc.U.Gc(zf(a,c),new olympe.dc.na.Ed(b)))}contains(a,b,c=!1,d){return this.We(new olympe.dc.U.Sc(zf(a,d),new olympe.dc.na.Ed(b),c))}th(a){if(!(a instanceof Array))throw new Bf('instanceOf','Provided argument "models" must be an array.');
571
+ const b=[];for(let c=0;c<a.length;c++)b.push(Af(a[c]));return this.We(new olympe.dc.U.lf(b))}Xk(a){return this.We(new olympe.dc.U.Gc(new olympe.dc.na.sf,new olympe.dc.na.Ed(Af(a))))}Xv(a){if(!Array.isArray(a))throw Error('ExcludeInstances should be called with an array');if(0<a.length){this.not().Xk(a[0]);for(let b=1,c=a.length;b<c;b++)this.and().not().Xk(a[b])}return this}lj(a,b){if(!(a instanceof Array))throw new Bf('hasRelated','Provided argument "relations" must be an array.');const c=[],d=[];
572
+ a.forEach(e=>{c.push(e);d.push(e.Oa())});return this.We(new olympe.dc.U.kf(c,d,b))}Wk(a,b,c){a=zf(a,c);return this.We(new olympe.dc.U.ye(a,new olympe.dc.na.Ed(b)))}zj(a,b,c){a=zf(a,c);return this.We(new olympe.dc.U.Fe(a,new olympe.dc.na.Ed(b)))}Ax(a,b,c,d){a=zf(a,d);return this.We(new olympe.dc.U.xd(a,b,c))}filter(a){const b=new class extends olympe.dc.U.Og{C(c,d){return a(olympe.dc.CloudObject.get(d))}};return this.We(b)}not(){this.ua.push(yf.Il);return this}and(){this.X[this.X.length-1]instanceof
573
+ olympe.dc.X.rc&&this.ua.push(yf.Qo);return this}or(){this.X[this.X.length-1]instanceof olympe.dc.X.rc&&this.ua.push(yf.Ro);return this}ll(a,b,c){a=Af(a);let d=null;switch(olympe.dc.Na().hc(a,olympe.dm.Property.typeRel)){case olympe.dm.String.P.R():d=new olympe.dc.Db.String(new olympe.dc.na.oe(a,c));break;case olympe.dm.Number.P.R():d=new olympe.dc.Db.Number(new olympe.dc.na.ke(a,c));break;case olympe.dm.DateTime.P.R():d=new olympe.dc.Db.DateTime(new olympe.dc.na.je(a,c))}c=d;null!==c&&this.X.push(new olympe.dc.X.Ld(c,
574
+ b));return this}sort(a,b,c){const d=new class extends olympe.dc.Db.Og{N(e,f){return a(olympe.dc.CloudObject.get(f))}G(e,f){return b(e,f).valueOf()}};this.X.push(new olympe.dc.X.Ld(d,c));return this}Sv(){this.X.push(new olympe.dc.X.xe);return this}limit(a,b){this.X.push(new olympe.dc.X.$d(a,b));return this}};class Bf extends Error{constructor(a,b){super(`ListDefBuilder.${a}(): ${b}`)}}
575
+ function Af(a){return'string'===typeof a||a instanceof olympe.D.Wa?a:'function'===typeof a?olympe.dc.Ba.Rb(a):olympe.D.lb(a)?a.Hk===olympe.D.Wa?a:olympe.D.Fa([a],b=>olympe.D.Bb(olympe.dc.xa(b)),olympe.D.Wa):a.R()}m=olympe.dc.fk.prototype;m.nf.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.transform.K=olympe.D.J.N();m.nl.K=olympe.D.J.N();m.Ay.K=olympe.D.J.N();m.Lt.K=olympe.D.J.N();m.sb.K=olympe.D.J.N();m.dw.K=olympe.D.J.N();m.Pk.K=olympe.D.J.N();m.aw.K=olympe.D.J.N();m.Kt.K=olympe.D.J.N();m.We.K=olympe.D.J.N();
576
576
  m.Wv.K=olympe.D.J.N();m.contains.K=olympe.D.J.N();m.th.K=olympe.D.J.N();m.Xk.K=olympe.D.J.N();m.Xv.K=olympe.D.J.N();m.lj.K=olympe.D.J.N();m.Wk.K=olympe.D.J.N();m.zj.K=olympe.D.J.N();m.Ax.K=olympe.D.J.N();m.filter.K=olympe.D.J.N();m.not.K=olympe.D.J.N();m.and.K=olympe.D.J.N();m.or.K=olympe.D.J.N();m.ll.K=olympe.D.J.N();m.sort.K=olympe.D.J.N();m.Sv.K=olympe.D.J.N();m.limit.K=olympe.D.J.N();olympe.dc.query.Mp=class{constructor(a){this.id=a;this.C=[];this.data=new olympe.dc.db.xc}F(a){this.C.push(olympe.dc.xa(a))}Y(){return this.id}getData(){return this.data}};function Cf(a){return olympe.D.lb(a)?'Node#'+a.Ma.Y():String(a)}function Df(a,b){return olympe.D.lb(b)?'{"c":"Parameter","v":"'+a.add(b)+'"}':JSON.stringify(b)}
577
577
  olympe.dc.query.uu=class{constructor(){this.uid=0;this.values=null}add(a){let b;b=olympe.D.lb(a)?'n'+a.Ma.Y():'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 ue(a,b,c){return c.run(()=>a.V.hb(b,c))}function ve(a,b,c){return c.run(()=>Ef(a.V,b,c))}
578
- function df(a,b,c){var d=olympe.dc.Ja.rb;const e=b.Y();let f=Ff(a.ta,e),g=olympe.dc.Ja.rb;null===f&&(f=cf(b,a.G),a.N||(g=kf(f)));Gf(a.ta,f,d,g);c&&Pe(a.F,e,c);b=olympe.dc.ga.ja.Bi;const h=olympe.dc.ga.ja.Ai,k=l=>{if(null!==l){a.L.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.Ja.rb?(a.L.debug('QueryManager: [ID:',e,'] GraphQuery processed locally'),a.Z.process(d,f,k)):(b=M(new olympe.dc.ga(f.sh.N===olympe.dc.Ed.Mi?h:b,f,[g]),
579
- k),a.L.debug('QueryManager: [ID:',e,'] sending GraphQuery to',g),a.C.send(b));return f}function ef(a,b){var c=olympe.dc.Ja.rb;const d=olympe.dc.Ja.rb;if(c===d){const e=Ff(a.ta,b).sh.N,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.$o,String(b),[f]),g=>{g&&a.L.error(`Unsubscription of graphdef ${b} failed: ${g.message}`)}),a.C.send(c))}else Hf(a.ta,b,c)}
580
- function ff(a,b,c){var d=olympe.dc.Ja.rb;b=cf(b,a.G);const e=b.Y();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.Ja.rb?a.Z.process(d,b,f):(d=M(new olympe.dc.ga(olympe.dc.ga.ja.Ai,b,[g]),f),a.C.send(d))}}
581
- function wf(a,b){var c=olympe.dc.Ja.rb;const d=b.Od();var e=new olympe.dc.query.uu;let f;f=d;olympe.D.lb(f)&&(f=e.add(d));b=(b=b.Vl())?Array.isArray(b)?b:[b]:null;const g=olympe.dc.query.Subscription.G(f,b,e);e=Jf(a.ta,g);null===e&&(a.L.debug('QueryMGR: new',a.N?'local':'remote','subscription "',g,'": #',`${f},`,b),e=new olympe.dc.query.Subscription(g,d,b,a.G),a.N||e.qe());a.Sa.process(c,e,h=>{h&&(Kf(a.ta,g,c||olympe.dc.Ja.rb),a.L.error(`subscription "${g}" failed to subscribe ${h}`))});return e}
582
- function xf(a,b){var c=olympe.dc.Ja.rb;if(c===olympe.dc.Ja.rb){const d=If(a.ta,b);a.L.debug('QueryMGR: [ID:',b,'] - Unregistered');Kf(a.ta,b,c)&&d!==olympe.dc.Ja.rb&&(c=M(new olympe.dc.ga(olympe.dc.ga.ja.Ru,String(b),[d]),e=>{e&&a.L.error(`Unsubscription of listdef ${b} failed, ${e.message}`)}),a.C.send(c))}else Kf(a.ta,b,c)}
583
- function Lf(a){const b=olympe.dc.ga.ja.ap,c=olympe.dc.ga.ja.Cl,d=olympe.dc.ga.ja.Fp;a.C.C(olympe.dc.ga.ja.Ll,(e,f)=>{Mf(a,f,e)});a.C.C(b,(e,f)=>{Nf(a,f,e)});a.C.C(c,(e,f)=>{a.aa.bf(f,e)});a.C.C(d,(e,f)=>{Of(a,f,e)});a.C.ra((e,f)=>{Pf(a,f,e)})}function Qf(a,b){a.L.log('Received subscribeToAll command');b=b?olympe.D.Ia().Cb(b):void 0;const c=new olympe.dc.ga(olympe.dc.ga.ja.Sg,null,[olympe.dc.Ja.Vc]);b&&M(c,b);a.C.send(c)}
584
- function Mf(a,b,c=olympe.dc.Ja.rb){b.destination!==olympe.dc.Ja.rb?a.L.error(`Graphdefs registered from peers is not supported yet ! (id: ${b.Y()})`):a.ra.process(c,b,d=>{d&&a.L.error(`An error occurred during the process of a graphdef result ${b.Y()}: ${d.message}`)})}
585
- function Nf(a,b,c=olympe.dc.Ja.rb){const d=Rf(a.ta,b.Y());0!==d.length&&(1<d.length||d[0]!==olympe.dc.Ja.rb?a.L.error(`Notification received for graphdefs subscription registered from peers. Not supported yet ! (id: ${b.Y()})`):a.ka.process(c,b,e=>{e&&a.L.error(`An error occurred during the process of a graphNotification ${b.Y()}`)}))}
586
- function Of(a,b,c=olympe.dc.Ja.rb){const d=Sf(a.ta,b.Y());1<d.length||d[0]!==olympe.dc.Ja.rb?a.L.error(`Listdefs registered from peers is not supported yet ! (id: ${b.Y()})`):a.Da.process(c,b,e=>{e&&a.L.error(`An error occurred during the process of a listNotification ${b.Y()}`)})}
578
+ function df(a,b,c){var d=olympe.dc.Ha.rb;const e=b.Y();let f=Ff(a.ta,e),g=olympe.dc.Ha.rb;null===f&&(f=cf(b,a.G),a.N||(g=kf(f)));Gf(a.ta,f,d,g);c&&Pe(a.F,e,c);b=olympe.dc.ga.ja.Bi;const h=olympe.dc.ga.ja.Ai,k=l=>{if(null!==l){a.L.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.Ha.rb?(a.L.debug('QueryManager: [ID:',e,'] GraphQuery processed locally'),a.Z.process(d,f,k)):(b=M(new olympe.dc.ga(f.sh.N===olympe.dc.Fd.Mi?h:b,f,[g]),
579
+ k),a.L.debug('QueryManager: [ID:',e,'] sending GraphQuery to',g),a.C.send(b));return f}function ef(a,b){var c=olympe.dc.Ha.rb;const d=olympe.dc.Ha.rb;if(c===d){const e=Ff(a.ta,b).sh.N,f=If(a.ta,b);Hf(a.ta,b,c)&&f!==d&&e===olympe.dc.Fd.SUBSCRIBE&&(c=M(new olympe.dc.ga(olympe.dc.ga.ja.$o,String(b),[f]),g=>{g&&a.L.error(`Unsubscription of graphdef ${b} failed: ${g.message}`)}),a.C.send(c))}else Hf(a.ta,b,c)}
580
+ function ff(a,b,c){var d=olympe.dc.Ha.rb;b=cf(b,a.G);const e=b.Y();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.Ha.rb?a.Z.process(d,b,f):(d=M(new olympe.dc.ga(olympe.dc.ga.ja.Ai,b,[g]),f),a.C.send(d))}}
581
+ function wf(a,b){var c=olympe.dc.Ha.rb;const d=b.Pd();var e=new olympe.dc.query.uu;let f;f=d;olympe.D.lb(f)&&(f=e.add(d));b=(b=b.Vl())?Array.isArray(b)?b:[b]:null;const g=olympe.dc.query.Subscription.G(f,b,e);e=Jf(a.ta,g);null===e&&(a.L.debug('QueryMGR: new',a.N?'local':'remote','subscription "',g,'": #',`${f},`,b),e=new olympe.dc.query.Subscription(g,d,b,a.G),a.N||e.qe());a.Sa.process(c,e,h=>{h&&(Kf(a.ta,g,c||olympe.dc.Ha.rb),a.L.error(`subscription "${g}" failed to subscribe ${h}`))});return e}
582
+ function xf(a,b){var c=olympe.dc.Ha.rb;if(c===olympe.dc.Ha.rb){const d=If(a.ta,b);a.L.debug('QueryMGR: [ID:',b,'] - Unregistered');Kf(a.ta,b,c)&&d!==olympe.dc.Ha.rb&&(c=M(new olympe.dc.ga(olympe.dc.ga.ja.Ru,String(b),[d]),e=>{e&&a.L.error(`Unsubscription of listdef ${b} failed, ${e.message}`)}),a.C.send(c))}else Kf(a.ta,b,c)}
583
+ function Lf(a){const b=olympe.dc.ga.ja.ap,c=olympe.dc.ga.ja.Cl,d=olympe.dc.ga.ja.Fp;a.C.C(olympe.dc.ga.ja.Ll,(e,f)=>{Mf(a,f,e)});a.C.C(b,(e,f)=>{Nf(a,f,e)});a.C.C(c,(e,f)=>{a.aa.bf(f,e)});a.C.C(d,(e,f)=>{Of(a,f,e)});a.C.ra((e,f)=>{Pf(a,f,e)})}function Qf(a,b){a.L.log('Received subscribeToAll command');b=b?olympe.D.Ja().Cb(b):void 0;const c=new olympe.dc.ga(olympe.dc.ga.ja.Sg,null,[olympe.dc.Ha.Vc]);b&&M(c,b);a.C.send(c)}
584
+ function Mf(a,b,c=olympe.dc.Ha.rb){b.destination!==olympe.dc.Ha.rb?a.L.error(`Graphdefs registered from peers is not supported yet ! (id: ${b.Y()})`):a.ra.process(c,b,d=>{d&&a.L.error(`An error occurred during the process of a graphdef result ${b.Y()}: ${d.message}`)})}
585
+ function Nf(a,b,c=olympe.dc.Ha.rb){const d=Rf(a.ta,b.Y());0!==d.length&&(1<d.length||d[0]!==olympe.dc.Ha.rb?a.L.error(`Notification received for graphdefs subscription registered from peers. Not supported yet ! (id: ${b.Y()})`):a.ka.process(c,b,e=>{e&&a.L.error(`An error occurred during the process of a graphNotification ${b.Y()}`)}))}
586
+ function Of(a,b,c=olympe.dc.Ha.rb){const d=Sf(a.ta,b.Y());1<d.length||d[0]!==olympe.dc.Ha.rb?a.L.error(`Listdefs registered from peers is not supported yet ! (id: ${b.Y()})`):a.Da.process(c,b,e=>{e&&a.L.error(`An error occurred during the process of a listNotification ${b.Y()}`)})}
587
587
  function Pf(a,b,c){a.L.debug('Source event',b,'received for source',c);if(b===olympe.dc.xk.cq){const d=(e,f)=>{f&&a.L.error(`Error after trying to resubscribe to ${e}: ${f}`)};Tf(a.ta,c).forEach(e=>{Pe(a.F,e.Y(),d.bind(a,e.Y()));a.L.debug(`resubscribing graph subscription ${e.Y()} to destination : ${c}`);e=M(new olympe.dc.ga(olympe.dc.ga.ja.Bi,e,[c]),d.bind(a,e.Y()));a.C.send(e)});Uf(a.ta,c).forEach(e=>{a.L.debug(`resubscribing list subscription ${e.Y()} to destination : ${c}`);e=M(new olympe.dc.ga(olympe.dc.ga.ja.Pu,
588
- e,[c]),d.bind(a,e.Y()));a.C.send(e)})}}olympe.dc.query.Au=class{constructor(a,b,c,d,e,f,g,h){this.L=a;this.N=b;this.C=c;this.aa=d;this.ta=e;this.F=f;this.G=new olympe.D.Wb('Query Manager context');this.Sa=g[0];this.Z=g[1];this.ra=g[2];this.ka=g[3];this.Da=g[4];this.V=h;Lf(this)}Xa(){return this.L}};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.Oa())+', ';a+='"recursive": '+JSON.stringify(this.recursive);return a+'}'}static kc(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.Oa(),a instanceof olympe.dc.X.Dc)}Pc(){const a=
589
- olympe.dc.za.DESTINATION,b=olympe.dc.za.ORIGIN;return new olympe.dc.query.Relation(this.tag,this.direction===a?b:a,this.recursive)}toString(){return`${this.direction}${this.tag}${this.recursive?'-r':''}`}};olympe.dc.query.Subscription=class a extends olympe.D.Fj{constructor(b,c,d,e){super(olympe.dc.CloudObject,new olympe.D.Wb('context subscription '+b,e));this.id=b;this.Pf=c;this.X=d||null;this.G=this.V.run(()=>olympe.D.ge(olympe.dc.query.Subscription.C.INIT));this.He=!1;this.ka=this.Ve=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.lc()}return e}Y(){return this.id}Od(){return this.Pf}Dg(){return this.X}qe(){const b=
590
- olympe.dc.Na(),c=olympe.D.Ya(this.Od());return c?b.Vf(c)?b.source(c)||olympe.dc.Ja.Vc:olympe.dc.Ja.rb:olympe.dc.Ja.Vc}wh(){const b=this.G.Ma.Ib;return b&&b.valueOf()>=olympe.dc.query.Subscription.C.Rq}ji(){if(this.G.Ma.yb())throw Error(`Cannot set destroyed subscription '${this.id}' as subscribed`);const b=this.Ve;this.Ve=null;for(let c in b)if(Object.prototype.hasOwnProperty.call(b,c))b[c](this);pb(this.G,olympe.D.ge(olympe.dc.query.Subscription.C.Rq))}Qf(){return olympe.D.Fa([this.G],()=>{},olympe.D.qa)}Z(){const b=
591
- this.G.Ma.Ib;return b&&b.valueOf()>=olympe.dc.query.Subscription.C.yq}Ke(b,c){this.Z()?b(this):(null===this.ka&&(this.ka=new Map),void 0===c&&(c=olympe.W.lc()),this.ka.set(c,olympe.D.Ia().Cb(b)));return c||''}rj(b){null!==this.ka&&b&&this.ka.delete(b)}ce(){const b=olympe.dc.query.Subscription.C.yq;if(!this.G.Ma.yb()&&olympe.D.Ya(this.G)!==b&&(this.yf(),pb(this.G,b),null!==this.ka)){for(const c of this.ka.values())c(this);this.ka=null}}onDestroy(b){this.V.onDestroy(b)}release(){this.V.destroy()}cc(b){if(!this.G.Ma.yb()){for(let c=
592
- 0,d=b.length;c<d;c++)this.Hm(b[c],c);if(this.Z())this.yf();else{this.He=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.ce()}}}Nd(b){const c=this.F;for(let d in c)Object.prototype.hasOwnProperty.call(c,d)&&b(c[d],d)}zc(b,c){if(!this.G.Ma.yb()&&(this.Jk(b,olympe.dc.CloudObject.get(c)),b=this.Z(),this.He&&!b)){b=!0;for(let d in this.F)if(Object.prototype.hasOwnProperty.call(this.F,d)&&!Object.prototype.hasOwnProperty.call(this.values,
593
- d)){b=!1;break}b&&this.ce()}}Xc(b){this.G.Ma.yb()||(this.Gm(b),this.Ui(b,!this.Z()))}Vg(){return this.Z()?super.Vg():'Subscription is not ready!'}Wf(){const b=olympe.D.Ya(this.Od());return olympe.dc.query.Subscription.F(b,this.Dg())}static F(b,c){var d=new olympe.dc.jf(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.Qb||g instanceof olympe.dc.X.Dc)b.forEach(h=>{const k=olympe.dc.query.Relation.from(g);h.sb(k,k.recursive)});
594
- else if(g instanceof olympe.dc.X.uf)d=a.F(olympe.D.Ya(g.Od()),g.Dg()),b.push(...d);else if(g instanceof olympe.dc.X.rc||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.N)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.Y();let f=a.C.get(e);void 0===f&&(f=new olympe.dc.query.ta.qt(b,a.Z,a),a.C.set(e,f));f.N(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()):[]}
588
+ e,[c]),d.bind(a,e.Y()));a.C.send(e)})}}olympe.dc.query.Au=class{constructor(a,b,c,d,e,f,g,h){this.L=a;this.N=b;this.C=c;this.aa=d;this.ta=e;this.F=f;this.G=new olympe.D.Wb('Query Manager context');this.Sa=g[0];this.Z=g[1];this.ra=g[2];this.ka=g[3];this.Da=g[4];this.V=h;Lf(this)}Xa(){return this.L}};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.Oa())+', ';a+='"recursive": '+JSON.stringify(this.recursive);return a+'}'}static lc(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.Oa(),a instanceof olympe.dc.X.Dc)}Pc(){const a=
589
+ olympe.dc.za.DESTINATION,b=olympe.dc.za.ORIGIN;return new olympe.dc.query.Relation(this.tag,this.direction===a?b:a,this.recursive)}toString(){return`${this.direction}${this.tag}${this.recursive?'-r':''}`}};olympe.dc.query.Subscription=class a extends olympe.D.Fj{constructor(b,c,d,e){super(olympe.dc.CloudObject,new olympe.D.Wb('context subscription '+b,e));this.id=b;this.Pf=c;this.X=d||null;this.G=this.V.run(()=>olympe.D.ge(olympe.dc.query.Subscription.C.INIT));this.He=!1;this.ka=this.Ve=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.mc()}return e}Y(){return this.id}Pd(){return this.Pf}Dg(){return this.X}qe(){const b=
590
+ olympe.dc.Na(),c=olympe.D.Ya(this.Pd());return c?b.Vf(c)?b.source(c)||olympe.dc.Ha.Vc:olympe.dc.Ha.rb:olympe.dc.Ha.Vc}wh(){const b=this.G.Ma.Ib;return b&&b.valueOf()>=olympe.dc.query.Subscription.C.Rq}ji(){if(this.G.Ma.yb())throw Error(`Cannot set destroyed subscription '${this.id}' as subscribed`);const b=this.Ve;this.Ve=null;for(let c in b)if(Object.prototype.hasOwnProperty.call(b,c))b[c](this);pb(this.G,olympe.D.ge(olympe.dc.query.Subscription.C.Rq))}Qf(){return olympe.D.Fa([this.G],()=>{},olympe.D.qa)}Z(){const b=
591
+ this.G.Ma.Ib;return b&&b.valueOf()>=olympe.dc.query.Subscription.C.yq}Ke(b,c){this.Z()?b(this):(null===this.ka&&(this.ka=new Map),void 0===c&&(c=olympe.W.mc()),this.ka.set(c,olympe.D.Ja().Cb(b)));return c||''}rj(b){null!==this.ka&&b&&this.ka.delete(b)}ce(){const b=olympe.dc.query.Subscription.C.yq;if(!this.G.Ma.yb()&&olympe.D.Ya(this.G)!==b&&(this.yf(),pb(this.G,b),null!==this.ka)){for(const c of this.ka.values())c(this);this.ka=null}}onDestroy(b){this.V.onDestroy(b)}release(){this.V.destroy()}ec(b){if(!this.G.Ma.yb()){for(let c=
592
+ 0,d=b.length;c<d;c++)this.Hm(b[c],c);if(this.Z())this.yf();else{this.He=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.ce()}}}Od(b){const c=this.F;for(let d in c)Object.prototype.hasOwnProperty.call(c,d)&&b(c[d],d)}zc(b,c){if(!this.G.Ma.yb()&&(this.Jk(b,olympe.dc.CloudObject.get(c)),b=this.Z(),this.He&&!b)){b=!0;for(let d in this.F)if(Object.prototype.hasOwnProperty.call(this.F,d)&&!Object.prototype.hasOwnProperty.call(this.values,
593
+ d)){b=!1;break}b&&this.ce()}}Xc(b){this.G.Ma.yb()||(this.Gm(b),this.Ui(b,!this.Z()))}Vg(){return this.Z()?super.Vg():'Subscription is not ready!'}Wf(){const b=olympe.D.Ya(this.Pd());return olympe.dc.query.Subscription.F(b,this.Dg())}static F(b,c){var d=new olympe.dc.jf(b,olympe.dc.Fd.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.Qb||g instanceof olympe.dc.X.Dc)b.forEach(h=>{const k=olympe.dc.query.Relation.from(g);h.sb(k,k.recursive)});
594
+ else if(g instanceof olympe.dc.X.uf)d=a.F(olympe.D.Ya(g.Pd()),g.Dg()),b.push(...d);else if(g instanceof olympe.dc.X.rc||g instanceof olympe.dc.X.Ld){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.N)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.Y();let f=a.C.get(e);void 0===f&&(f=new olympe.dc.query.ta.qt(b,a.Z,a),a.C.set(e,f));f.N(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()):[]}
595
595
  function Sf(a,b){return(a=a.F.get(b))?Array.from(a.C.keys()):[]}function Tf(a,b){const c=new Set;(a.N.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.N.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}
596
- function Wf(a,b,c){let d=a.N.get(c);d?d.add(b):(d=(new Set).add(b),a.N.set(c,d))}function Yf(a,b,c){var d=olympe.dc.Ja.rb;const e=b.Y();let f=a.F.get(e);void 0===f&&(f=new olympe.dc.query.ta.cu(b,a.Z),a.F.set(e,f));f.N(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.N.get(d).delete(c),e.F().release(),b.delete(c),!0):0===e.C.get(d)}
596
+ function Wf(a,b,c){let d=a.N.get(c);d?d.add(b):(d=(new Set).add(b),a.N.set(c,d))}function Yf(a,b,c){var d=olympe.dc.Ha.rb;const e=b.Y();let f=a.F.get(e);void 0===f&&(f=new olympe.dc.query.ta.cu(b,a.Z),a.F.set(e,f));f.N(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.N.get(d).delete(c),e.F().release(),b.delete(c),!0):0===e.C.get(d)}
597
597
  function Zf(a,b){const c=b.Y();let d=a.G.get(c);d||(d=new olympe.dc.query.ta.Bu(b),a.G.set(c,d));d.counter++;return d}function $f(a,b){(a=a.G.get(b))&&a.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.L.error(`Try to set the subscription ${c.Y()} as covered by a graphquery that is not registered (${b}).`)}
598
598
  olympe.dc.query.Wu=class{constructor(a,b){this.L=a;this.C=new Map;this.F=new Map;this.G=new Map;this.V=new Set;this.N=new Map;this.Z=b}};olympe.dc.Wc=class{ma(){}Yb(){}getTransform(){}ia(){}toString(){}};olympe.dc.tq=class{F(){}};olympe.dc.wf=class{ma(){}getValue(){}C(){}ia(){}toString(){}};olympe.dc.query.O={Ea:'olympe.dc.query.Logger',va:'olympe.dc.query.QueryManager'};olympe.dc.query.Mb={Se:'olympe.dc.query.SubscriptionRegistry',Kj:'olympe.dc.query.CallbackRegistry',cp:'olympe.dc.query.GraphProcessor',bp:'olympe.dc.query.GraphNotificationProcessor',ep:'olympe.dc.query.GraphResultProcessor',Gp:'olympe.dc.query.ListProcessor',ek:'olympe.dc.query.ListNotificationProcessor',vq:'olympe.dc.query.QueryProcessor',yl:'olympe.dc.query.CoverageProcessor'};olympe.dc.query.Config={Sq:'subscription.debug'};
599
599
  olympe.T.config(function(a){E(a,olympe.dc.query.Config.Sq,!1);C(a,olympe.dc.query.O.Ea,[olympe.pa.O.va],b=>b.Nc('dc.query'));B(a,olympe.dc.query.Mb.Se,olympe.dc.query.Wu,olympe.dc.query.O.Ea,new olympe.T.fa(olympe.dc.query.Config.Sq));B(a,olympe.dc.query.Mb.Kj,olympe.dc.query.Ns,olympe.dc.query.O.Ea);B(a,olympe.dc.query.Mb.Gp,olympe.dc.query.Ub.Op,olympe.dc.query.O.Ea,olympe.dc.O.wi,olympe.dc.query.Mb.Se,olympe.dc.query.Mb.yl,olympe.dc.transaction.O.va,new olympe.T.fa(olympe.dc.Config.$g));B(a,olympe.dc.query.Mb.cp,
600
600
  olympe.dc.query.Ub.jp,olympe.dc.query.O.Ea,olympe.dc.query.Mb.Se,new olympe.T.fa(olympe.dc.Config.$g));B(a,olympe.dc.query.Mb.ep,olympe.dc.query.Ub.kp,olympe.dc.query.O.Ea,olympe.dc.query.Mb.Se,olympe.dc.query.Mb.Kj);B(a,olympe.dc.query.Mb.bp,olympe.dc.query.Ub.ip,olympe.dc.query.O.Ea,olympe.dc.query.Mb.Se);B(a,olympe.dc.query.Mb.ek,olympe.dc.query.Ub.Np,olympe.dc.query.O.Ea,olympe.dc.O.wi,olympe.dc.query.Mb.Se);B(a,olympe.dc.query.Mb.vq,olympe.dc.query.Ub.Cu,olympe.dc.query.O.Ea,olympe.dc.query.Mb.Se,
601
601
  olympe.dc.query.Mb.yl,olympe.dc.query.Mb.Kj,olympe.dc.O.me,olympe.dc.db.O.va);B(a,olympe.dc.query.Mb.yl,olympe.dc.query.Ub.Qs,olympe.dc.query.O.Ea,olympe.dc.query.Mb.Se,olympe.dc.transaction.O.va);C(a,olympe.dc.query.O.va,[olympe.dc.query.O.Ea,new olympe.T.fa(olympe.dc.Config.$g),olympe.dc.O.me,olympe.dc.db.O.va,olympe.dc.query.Mb.Se,olympe.dc.query.Mb.Kj,olympe.dc.query.Mb.Gp,olympe.dc.query.Mb.cp,olympe.dc.query.Mb.ep,olympe.dc.query.Mb.bp,olympe.dc.query.Mb.ek,olympe.dc.query.Mb.vq],(b,c,d,e,f,
602
602
  g,h,k,l,n,p,q)=>new olympe.dc.query.Au(b,c,d,e,f,g,[h,k,l,n,p],q))});olympe.T.run([olympe.dc.query.Mb.Se],a=>{olympe.hj().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')}
603
- olympe.dc.query.ta.ar=class{constructor(a,b){this.C=new Map;this.G=new Map;this.V=a;this.ka=b}F(){}N(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.Y();a.Z.set(c,b);olympe.D.Ia().onDestroy(()=>{a.Z.delete(c)})}function cg(a,b){const c=b.Y();a.aa.set(c,b);olympe.D.Ia().onDestroy(()=>{a.aa.delete(c)})}olympe.dc.query.ta.qt=class extends olympe.dc.query.ta.ar{constructor(a,b,c){super(a,b);this.ta=c;this.Z=new Map;this.aa=new Map;b&&dg()}F(){return this.V}};olympe.dc.query.ta.cu=class extends olympe.dc.query.ta.ar{constructor(a,b){super(a,b);this.Z=new Map}F(){return this.V}N(a){super.N(a);if(this.ka){const b='md_'+olympe.W.lc();this.Z.set(b,dg());olympe.D.Ia().onDestroy(()=>{this.Z.delete(b)})}}};olympe.dc.query.ta.Bu=class{constructor(a){this.query=a;this.F=olympe.dc.Ad();this.id=a.Y();this.C=olympe.D.Kc(olympe.dc.Va);this.G=null;this.counter=0}update(){const a=olympe.D.Ya(this.C)||olympe.dc.Va.empty(),b=olympe.dc.Va.from(a,this.G);this.G.N=!1;b!==a&&(Pc(this.F,null,ze(b)),this.C.update(b))}destroy(){const a=olympe.D.Ya(this.C)||olympe.dc.Va.empty();Pc(this.F,null,ye(a))}};olympe.dc.query.Ub={};function eg(a,b,c,d,e){a.L.debug('CoverageProcessor: [ID:',d,'] - checking coverage of remote query over',b.length,'paths.');const f=new olympe.async.qg(olympe.D.Ia()),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.Y()} has encountered an error: ${p}`):l()});ag(a.ta,k.Y(),c)})},h=Array.from(Tf(a.ta,olympe.dc.Ja.Vc));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.sh,!1);
604
- n=!0;break}}n?a.L.debug('CoverageProcessor: [ID:',d,'] - graphPath',k,' is covered'):g(k,!0)});Wb(f,(k,l)=>e(l));f.start()}function fg(a,b,c){const d=[b.Od()],e=g=>g instanceof olympe.dc.X.uf,f=(b.Dg()||[]).filter(e);for(const g of f)d.push(g.Od()),f.push(...(g.Dg()||[]).filter(e));ke(a.C,()=>{olympe.D.wc(d,()=>{const g=b.Wf();eg(a,g,b,b.Y(),c)})})}function gg(a,b,c,d){const e=b.Y(),f=[qe(b,c)];ke(a.C,()=>eg(a,f,b,e,d))}olympe.dc.query.Ub.Qs=class{constructor(a,b,c){this.L=a;this.ta=b;this.C=c}};olympe.dc.query.Ub.ip=class{constructor(a,b){this.L=a;this.ta=b}process(a,b,c){const d=b.Y();this.ta.C.has(d)?(Ff(this.ta,d).ra(b),olympe.dc.Ad().bf(b.data,a),c(null,b)):c(Error(`Received a notification for the graphdef ${d} which does not exist.`),b)}};olympe.dc.query.Ub.ip.la=[olympe.dc.rg];olympe.dc.query.Ub.jp=class{constructor(a,b,c){this.L=a;this.ta=b;this.C=c}process(a,b,c){var d=b.Y();if(a===olympe.dc.Ja.rb||this.ta.C.has(d)){if(c(null,b),a=Ff(this.ta,d),this.C||a&&a.N)a=olympe.dc.Ja.rb,d=new olympe.dc.query.Di(d,a,a,new olympe.dc.db.xc),Mf(olympe.dc.Lf(),d)}else c(Error('The local Graph Engine is not implemented yet. It should handle Graphdefs addressed to instances owned by this local OVM'),b)}};olympe.dc.query.Ub.jp.la=[olympe.dc.rg];olympe.dc.query.Ub.kp=class{constructor(a,b,c){this.L=a;this.C=b;this.F=c}process(a,b,c){const d=b.Y();if(this.C.C.has(d)){const f=Ff(this.C,d);if(b instanceof olympe.dc.query.aj.Yj)Hf(this.C,d,a);else if(!f.N){f.ka(b);const g=olympe.dc.Ad();Pc(g,f.Z());g.bf(b.Bc,b.destination);f.onDestroy(()=>{Pc(g,null,f.Z())});mf(f)}}let e;b instanceof olympe.dc.query.aj.Yj&&(e=`graph subscription "${d}" failed to create the initial result: ${b.aa()}`,this.L.error(e));Se(this.F,b.Y(),b);c(e?Error(e):null,b)}};
605
- olympe.dc.query.Ub.kp.la=[olympe.dc.rg];const hg=[],ig=new Map;function jg(a,b,c,d){uc(a.db,d,e=>{e?b.Fg(c)?a.L.warn('Adding the same index twice (should never happen) for sub #'+b.Y()+', index #'+c+', tag #'+d):b.zc(c,d):kg(a,b,c,d)},c)}function kg(a,b,c,d){vc(a.db,d,c,!0);b.Xc(c);hg.length=0;b.Nd(function(e,f){hg[e]=f});c=a=0;for(d=hg.length;a<d;a++)'string'===typeof hg[a]&&(hg[c++]=hg[a]);hg.length=c;b.cc(hg)}
606
- olympe.dc.query.Ub.Np=class{constructor(a,b,c){this.L=a;this.db=b;this.ta=c}process(a,b,c){const d=b.Y();a=b.C;const e=Jf(this.ta,d);if(null===e)c(Error(`Received list notification for undefined subscription "${d}"`),b);else{hg.length=a.length;e.Nd((f,g)=>{if(f=e.mh(g)){f=f.R();var h=ig.get(f);void 0===h?ig.set(f,g):'string'===typeof h?ig.set(f,[h,g]):h.push(g)}else this.L.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.')});
607
- for(let f=0,g=a.length;f<g;f++){const h=a[f];let k=ig.get(h);void 0===k?(k=olympe.W.lc(),jg(this,e,k,h)):'string'===typeof k?ig.delete(h):(k=k.pop(),0===k.length&&ig.delete(h));hg[f]=k}for(const [f,g]of ig){if('string'===typeof g)kg(this,e,g,f);else for(let h=0,k=g.length;h<k;h++)kg(this,e,g[h],f);ig.delete(f)}e.cc(hg);c(null,b)}}};olympe.dc.query.Ub.Np.la=[olympe.dc.rg];function lg(a,b,c,d){const e=c.Y();a.L.debug('ListProcessor: [ID:',e,'] - processing with source ',b);Yf(a.ta,c,b);if(Xf(a.ta,e,olympe.dc.Ja.rb))a.L.debug('ListProcessor: [ID:',e,'] - id already processed');else{a.L.debug('ListProcessor: [ID:',e,'] - NOT processed yet.');const f=c.qe();a.F||f===olympe.dc.Ja.rb?(a.L.debug('QueryMGR: [ID:',e,'] - Local subscription, no need for coverage check, booting subscription '),mg(a,c)):c.Hh().run(()=>{fg(a.C,c,g=>{g?a.L.error(g):mg(a,c)})})}b===olympe.dc.Ja.rb||
603
+ olympe.dc.query.ta.ar=class{constructor(a,b){this.C=new Map;this.G=new Map;this.V=a;this.ka=b}F(){}N(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.Y();a.Z.set(c,b);olympe.D.Ja().onDestroy(()=>{a.Z.delete(c)})}function cg(a,b){const c=b.Y();a.aa.set(c,b);olympe.D.Ja().onDestroy(()=>{a.aa.delete(c)})}olympe.dc.query.ta.qt=class extends olympe.dc.query.ta.ar{constructor(a,b,c){super(a,b);this.ta=c;this.Z=new Map;this.aa=new Map;b&&dg()}F(){return this.V}};olympe.dc.query.ta.cu=class extends olympe.dc.query.ta.ar{constructor(a,b){super(a,b);this.Z=new Map}F(){return this.V}N(a){super.N(a);if(this.ka){const b='md_'+olympe.W.mc();this.Z.set(b,dg());olympe.D.Ja().onDestroy(()=>{this.Z.delete(b)})}}};olympe.dc.query.ta.Bu=class{constructor(a){this.query=a;this.F=olympe.dc.Ad();this.id=a.Y();this.C=olympe.D.Kc(olympe.dc.Va);this.G=null;this.counter=0}update(){const a=olympe.D.Ya(this.C)||olympe.dc.Va.empty(),b=olympe.dc.Va.from(a,this.G);this.G.N=!1;b!==a&&(Pc(this.F,null,ze(b)),this.C.update(b))}destroy(){const a=olympe.D.Ya(this.C)||olympe.dc.Va.empty();Pc(this.F,null,ye(a))}};olympe.dc.query.Ub={};function eg(a,b,c,d,e){a.L.debug('CoverageProcessor: [ID:',d,'] - checking coverage of remote query over',b.length,'paths.');const f=new olympe.async.qg(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.Y()} has encountered an error: ${p}`):l()});ag(a.ta,k.Y(),c)})},h=Array.from(Tf(a.ta,olympe.dc.Ha.Vc));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.sh,!1);
604
+ n=!0;break}}n?a.L.debug('CoverageProcessor: [ID:',d,'] - graphPath',k,' is covered'):g(k,!0)});Wb(f,(k,l)=>e(l));f.start()}function fg(a,b,c){const d=[b.Pd()],e=g=>g instanceof olympe.dc.X.uf,f=(b.Dg()||[]).filter(e);for(const g of f)d.push(g.Pd()),f.push(...(g.Dg()||[]).filter(e));ke(a.C,()=>{olympe.D.wc(d,()=>{const g=b.Wf();eg(a,g,b,b.Y(),c)})})}function gg(a,b,c,d){const e=b.Y(),f=[qe(b,c)];ke(a.C,()=>eg(a,f,b,e,d))}olympe.dc.query.Ub.Qs=class{constructor(a,b,c){this.L=a;this.ta=b;this.C=c}};olympe.dc.query.Ub.ip=class{constructor(a,b){this.L=a;this.ta=b}process(a,b,c){const d=b.Y();this.ta.C.has(d)?(Ff(this.ta,d).ra(b),olympe.dc.Ad().bf(b.data,a),c(null,b)):c(Error(`Received a notification for the graphdef ${d} which does not exist.`),b)}};olympe.dc.query.Ub.ip.la=[olympe.dc.rg];olympe.dc.query.Ub.jp=class{constructor(a,b,c){this.L=a;this.ta=b;this.C=c}process(a,b,c){var d=b.Y();if(a===olympe.dc.Ha.rb||this.ta.C.has(d)){if(c(null,b),a=Ff(this.ta,d),this.C||a&&a.N)a=olympe.dc.Ha.rb,d=new olympe.dc.query.Di(d,a,a,new olympe.dc.db.xc),Mf(olympe.dc.Lf(),d)}else c(Error('The local Graph Engine is not implemented yet. It should handle Graphdefs addressed to instances owned by this local OVM'),b)}};olympe.dc.query.Ub.jp.la=[olympe.dc.rg];olympe.dc.query.Ub.kp=class{constructor(a,b,c){this.L=a;this.C=b;this.F=c}process(a,b,c){const d=b.Y();if(this.C.C.has(d)){const f=Ff(this.C,d);if(b instanceof olympe.dc.query.aj.Yj)Hf(this.C,d,a);else if(!f.N){f.ka(b);const g=olympe.dc.Ad();Pc(g,f.Z());g.bf(b.Bc,b.destination);f.onDestroy(()=>{Pc(g,null,f.Z())});mf(f)}}let e;b instanceof olympe.dc.query.aj.Yj&&(e=`graph subscription "${d}" failed to create the initial result: ${b.aa()}`,this.L.error(e));Se(this.F,b.Y(),b);c(e?Error(e):null,b)}};
605
+ olympe.dc.query.Ub.kp.la=[olympe.dc.rg];const hg=[],ig=new Map;function jg(a,b,c,d){uc(a.db,d,e=>{e?b.Fg(c)?a.L.warn('Adding the same index twice (should never happen) for sub #'+b.Y()+', index #'+c+', tag #'+d):b.zc(c,d):kg(a,b,c,d)},c)}function kg(a,b,c,d){vc(a.db,d,c,!0);b.Xc(c);hg.length=0;b.Od(function(e,f){hg[e]=f});c=a=0;for(d=hg.length;a<d;a++)'string'===typeof hg[a]&&(hg[c++]=hg[a]);hg.length=c;b.ec(hg)}
606
+ olympe.dc.query.Ub.Np=class{constructor(a,b,c){this.L=a;this.db=b;this.ta=c}process(a,b,c){const d=b.Y();a=b.C;const e=Jf(this.ta,d);if(null===e)c(Error(`Received list notification for undefined subscription "${d}"`),b);else{hg.length=a.length;e.Od((f,g)=>{if(f=e.mh(g)){f=f.R();var h=ig.get(f);void 0===h?ig.set(f,g):'string'===typeof h?ig.set(f,[h,g]):h.push(g)}else this.L.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.')});
607
+ for(let f=0,g=a.length;f<g;f++){const h=a[f];let k=ig.get(h);void 0===k?(k=olympe.W.mc(),jg(this,e,k,h)):'string'===typeof k?ig.delete(h):(k=k.pop(),0===k.length&&ig.delete(h));hg[f]=k}for(const [f,g]of ig){if('string'===typeof g)kg(this,e,g,f);else for(let h=0,k=g.length;h<k;h++)kg(this,e,g[h],f);ig.delete(f)}e.ec(hg);c(null,b)}}};olympe.dc.query.Ub.Np.la=[olympe.dc.rg];function lg(a,b,c,d){const e=c.Y();a.L.debug('ListProcessor: [ID:',e,'] - processing with source ',b);Yf(a.ta,c,b);if(Xf(a.ta,e,olympe.dc.Ha.rb))a.L.debug('ListProcessor: [ID:',e,'] - id already processed');else{a.L.debug('ListProcessor: [ID:',e,'] - NOT processed yet.');const f=c.qe();a.F||f===olympe.dc.Ha.rb?(a.L.debug('QueryMGR: [ID:',e,'] - Local subscription, no need for coverage check, booting subscription '),mg(a,c)):c.Hh().run(()=>{fg(a.C,c,g=>{g?a.L.error(g):mg(a,c)})})}b===olympe.dc.Ha.rb||
608
608
  Xf(a.ta,e,b)||a.notify(b,c);d(null,c)}
609
- function mg(a,b){if(b.Z())a.L.debug('ListProcessor: [ID:',b.Y(),'] - Subscription already booted, ignoring');else{a.L.debug('ListProcessor: [ID:',b.Y(),'] - Booting subscription');var c=new olympe.dc.oc.$q(a.db,a.L),d=ng(a,b,c),e=b.Y();b.Hh().run(()=>{olympe.D.wc([b.Od()],f=>{const g=olympe.dc.xa(f);a.L.debug('ListProcessor: [ID:',b.Y(),'] - Booting with baseTag',g);b.wh()||b.ji();uc(a.db,g,h=>d(h,g),e);olympe.D.Ia().vc(()=>vc(a.db,g,e));a.db.Gb(g.valueOf())||og(c);b.Z()||(og(c),b.cc([]))})})}}
610
- function ng(a,b,c){const d=new olympe.dc.oc.Ij;let e=!1;const f=b.Hh(),g=b.Dg(),h=[];h[g?g.length:0]=f.Cb((k,l,n,p)=>{f.gd()||f.yb()||(k?b.Fg(n)?a.L.warn('Adding the same index twice (should never happen) for sub #',b.Y(),', index #',n,', tag #',l):(a.L.debug('ListProcessor: [ID:',b.Y(),'] - Adding Instance',l,'to the subscription'),b.zc(n,l)):(a.L.debug('ListProcessor: [ID:',b.Y(),'] - Removing Instance',l,'from the subscription'),b.Xc(n)),e||(pg(c,()=>{p.vg();og(c)}),p.Qc().Lg(b.cc.bind(b)),e=!0),
609
+ function mg(a,b){if(b.Z())a.L.debug('ListProcessor: [ID:',b.Y(),'] - Subscription already booted, ignoring');else{a.L.debug('ListProcessor: [ID:',b.Y(),'] - Booting subscription');var c=new olympe.dc.oc.$q(a.db,a.L),d=ng(a,b,c),e=b.Y();b.Hh().run(()=>{olympe.D.wc([b.Pd()],f=>{const g=olympe.dc.xa(f);a.L.debug('ListProcessor: [ID:',b.Y(),'] - Booting with baseTag',g);b.wh()||b.ji();uc(a.db,g,h=>d(h,g),e);olympe.D.Ja().vc(()=>vc(a.db,g,e));a.db.Gb(g.valueOf())||og(c);b.Z()||(og(c),b.ec([]))})})}}
610
+ function ng(a,b,c){const d=new olympe.dc.oc.Ij;let e=!1;const f=b.Hh(),g=b.Dg(),h=[];h[g?g.length:0]=f.Cb((k,l,n,p)=>{f.gd()||f.yb()||(k?b.Fg(n)?a.L.warn('Adding the same index twice (should never happen) for sub #',b.Y(),', index #',n,', tag #',l):(a.L.debug('ListProcessor: [ID:',b.Y(),'] - Adding Instance',l,'to the subscription'),b.zc(n,l)):(a.L.debug('ListProcessor: [ID:',b.Y(),'] - Removing Instance',l,'from the subscription'),b.Xc(n)),e||(pg(c,()=>{p.vg();og(c)}),p.Qc().Lg(b.ec.bind(b)),e=!0),
611
611
  qg(c,n))});if(null!==g){const k=olympe.dc.Qc();for(let l=g.length-1;0<=l;l--)h[l]=f.Cb(g[l].getTransform(k,c,h[l+1]))}return(k,l)=>{const n=b.Y();c.register(n,null);const p=d.C(k,l,n,null);if(null!==p)h[0](k,l,n,rg(p,k,l,n))}}
612
- olympe.dc.query.Ub.Op=class{constructor(a,b,c,d,e,f){this.L=a;this.db=b;this.ta=c;this.C=d;this.F=f}process(a,b,c){lg(this,a,b,c)}notify(a,b){const c=b.Y();this.L.debug(`Register notification of list subscription ${c} for destination ${a}`);const d=()=>{const f=new olympe.dc.query.Mp(c);b.de(g=>f.F(g));Of(olympe.dc.Lf(),f)};let e=!1;b.forEach(()=>{e&&d()});b.Ke(()=>{e=!0;d()})}};olympe.dc.query.Ub.Op.la=[olympe.dc.rg];function Ef(a,b,c){const d=b.Y(),e=b.source,f=a.ta.G.has(d),g=Zf(a.ta,b);return new rxjs.Observable(h=>{c.run(()=>{olympe.D.wc([g.C.Eb()],h.next.bind(h))});const k=()=>{l&&c.Bn(l);{var n=a.ta;const q=n.G.get(d);var p;if(p=q)p=q,0<p.counter?p.counter--:olympe.pa.Xa('dc').warn('Try to decrement counter of query metadata below 0. Investigate...'),p=0===p.counter;p&&(q.destroy(),n.G.delete(d),n.V.delete(d))}},l=c.vc(k);if(!f)if(e===olympe.dc.Ja.Vc)gg(a.N,b,!0,n=>{n?(h.error(n),k()):sg(a,d,b,g,c)});else if(e===
613
- olympe.dc.Ja.rb)sg(a,d,b,g,c);else{const n=M(xc(new olympe.dc.ga(olympe.dc.ga.ja.tm,b,[e]),c),p=>{p&&(h.error(p.message),k())});a.G.send(n)}return k})}
612
+ olympe.dc.query.Ub.Op=class{constructor(a,b,c,d,e,f){this.L=a;this.db=b;this.ta=c;this.C=d;this.F=f}process(a,b,c){lg(this,a,b,c)}notify(a,b){const c=b.Y();this.L.debug(`Register notification of list subscription ${c} for destination ${a}`);const d=()=>{const f=new olympe.dc.query.Mp(c);b.de(g=>f.F(g));Of(olympe.dc.Lf(),f)};let e=!1;b.forEach(()=>{e&&d()});b.Ke(()=>{e=!0;d()})}};olympe.dc.query.Ub.Op.la=[olympe.dc.rg];function Ef(a,b,c){const d=b.Y(),e=b.source||b.db.source(b.G)||olympe.dc.Ha.bc,f=a.ta.G.has(d),g=Zf(a.ta,b);return new rxjs.Observable(h=>{c.run(()=>{olympe.D.wc([g.C.Eb()],h.next.bind(h))});const k=()=>{l&&c.Bn(l);{var n=a.ta;const q=n.G.get(d);var p;if(p=q)p=q,0<p.counter?p.counter--:olympe.pa.Xa('dc').warn('Try to decrement counter of query metadata below 0. Investigate...'),p=0===p.counter;p&&(q.destroy(),n.G.delete(d),n.V.delete(d))}},l=c.vc(k);if(!f)if(e===olympe.dc.Ha.Vc)gg(a.N,b,!0,n=>{n?
613
+ (h.error(n),k()):sg(a,d,b,g,c)});else if(e===olympe.dc.Ha.rb)sg(a,d,b,g,c);else{const n=M(xc(new olympe.dc.ga(olympe.dc.ga.ja.tm,b,[e]),c),p=>{p&&(h.error(p.message),k())});a.G.send(n)}return k})}
614
614
  function tg(a){const b=olympe.dc.ga.ja.sm,c=(d,e)=>Be(d,f=>{Pc(a.F,Array.from(f.ee()).filter(g=>g.se()).map(g=>g.tag()));a.F.bf(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))if(e=
615
615
  a.ta.G.get(e))f=olympe.D.Ya(e.C),f&&f.hash===d.hash||(Pc(e.F,null,ze(d)),e.C.update(d))});Oc(a.F,()=>{var d=a.ta;for(const e of d.V)$f(d,e);d.V.clear()})}
616
616
  function sg(a,b,c,d,e){const f=new olympe.dc.da.rq(c);Fe(f,()=>{var p=a.ta;p.G.has(b)&&p.V.add(b)});d.G=f;let g=(p,q)=>{p?a.L.debug(`New result tuple for query ${b}, ${q}`):a.L.debug(`Removed result tuple for query ${b}, ${q}`)};d=c.C;const h=d.reduce((p,q)=>{p.push(q.F(p[p.length-1]));return p},[0]);for(let p=d.length-1;0<=p;p--)g=d[p].observe(f,h[p],g);const k=a.F.view,l=c.G,n=uc(k,l,(p,q)=>{p?f.insert(q,0,null):f.remove(q,0,null);g(p,q,null,b)});e.vc(()=>vc(k,l,n));$f(a.ta,b)}
617
- olympe.dc.query.Ub.Cu=class{constructor(a,b,c,d,e,f){this.L=a;this.ta=b;this.N=c;this.C=d;this.G=e;this.F=f;tg(this)}hb(a,b){return new Promise((c,d)=>{var e=a.source;if(e===olympe.dc.Ja.Vc)gg(this.N,a,!1,f=>{f?d(f):c(this.bd(a))});else if(e===olympe.dc.Ja.rb)c(this.bd(a));else{const f=a.Y(),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.vc(h);Te(this.C,f,(l,n)=>{b.Bn(k);l?d(l.message):(b.vc(()=>{Pc(this.F,null,ye(n))}),c(n))});g||
618
- (e=M(xc(new olympe.dc.ga(olympe.dc.ga.ja.rm,a,[e]),b),l=>l&&h(l.message)),this.G.send(e))}})}bd(a){const b=new olympe.dc.da.rq(a);Fe(b,()=>{});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.aj={};olympe.dc.query.aj.Yj=class extends olympe.dc.query.Di{constructor(a,b,c,d){super(a,b,c,new olympe.dc.db.xc);this.error=d}aa(){return this.error}};olympe.dc.oc={};function rg(a,b,c,d){b?a.V[d]=c:delete a.V[d];null===a.F&&(a.F=new olympe.dc.oc.Pj(a.C,a));return a.F}function ug(a,b){for(let c=0;c<b;c++)if(null!==a.F)a=a.F;else break;return a}function vg(a,b){a=a.V;if(null!==a)for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(c)}olympe.dc.oc.Pj=class{constructor(a,b){this.C=a;this.parent=b||null;this.aa=b?b.aa+1:0;this.V=Object.create(null);this.F=null}Qc(){return this.C}vg(){this.C.V()?this.C.G():this.C.aa(this.aa-1)}};olympe.dc.oc.sa=class{constructor(){}C(){}V(){}aa(){}G(){}Lg(){}};olympe.dc.oc.Ij=class{constructor(){this.Z=this.N=this.index=this.F=null}V(){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.N;if(a&&null!==b)throw Error('The AutoManger handles only a single item.');a?(b=new olympe.dc.oc.Pj(this),this.index=c,this.N=b):this.N=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.Z){const a=
619
- [];null!==this.N&&(0<=this.F?vg(ug(this.N,this.F),a):a.push(this.index));this.Z(a)}}Lg(a){this.Z=a}};olympe.dc.oc.Ij.la=[olympe.dc.oc.sa];function wg(a,b){olympe.D.Uf(a.value)?(a.node=olympe.D.fl(a.value,b),Wa(a.node)||b()):b()}function xg(a,b){if(olympe.D.Uf(a.value)){const c=olympe.D.Ia(),d=a.N;olympe.D.wc([a.value],e=>{d!==e.valueOf()&&(c.run(()=>wg(a,b)),olympe.D.Ia().destroy())})}}
617
+ olympe.dc.query.Ub.Cu=class{constructor(a,b,c,d,e,f){this.L=a;this.ta=b;this.N=c;this.C=d;this.G=e;this.F=f;tg(this)}hb(a,b){return new Promise((c,d)=>{var e=a.source||a.db.source(a.G)||olympe.dc.Ha.bc;if(e===olympe.dc.Ha.Vc)gg(this.N,a,!1,f=>{f?d(f):c(this.bd(a))});else if(e===olympe.dc.Ha.rb)c(this.bd(a));else{const f=a.Y(),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.vc(h);Te(this.C,f,(l,n)=>{b.Bn(k);l?d(l.message):(b.vc(()=>
618
+ {Pc(this.F,null,ye(n))}),c(n))});g||(e=M(xc(new olympe.dc.ga(olympe.dc.ga.ja.rm,a,[e]),b),l=>l&&h(l.message)),this.G.send(e))}})}bd(a){const b=new olympe.dc.da.rq(a);Fe(b,()=>{});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.aj={};olympe.dc.query.aj.Yj=class extends olympe.dc.query.Di{constructor(a,b,c,d){super(a,b,c,new olympe.dc.db.xc);this.error=d}aa(){return this.error}};olympe.dc.oc={};function rg(a,b,c,d){b?a.V[d]=c:delete a.V[d];null===a.F&&(a.F=new olympe.dc.oc.Pj(a.C,a));return a.F}function ug(a,b){for(let c=0;c<b;c++)if(null!==a.F)a=a.F;else break;return a}function vg(a,b){a=a.V;if(null!==a)for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(c)}olympe.dc.oc.Pj=class{constructor(a,b){this.C=a;this.parent=b||null;this.aa=b?b.aa+1:0;this.V=Object.create(null);this.F=null}Qc(){return this.C}vg(){this.C.V()?this.C.G():this.C.aa(this.aa-1)}};olympe.dc.oc.sa=class{constructor(){}C(){}V(){}aa(){}G(){}Lg(){}};olympe.dc.oc.Ij=class{constructor(){this.Z=this.N=this.index=this.F=null}V(){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.N;if(a&&null!==b)throw Error('The AutoManger handles only a single item.');a?(b=new olympe.dc.oc.Pj(this),this.index=c,this.N=b):this.N=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.Z){const a=
619
+ [];null!==this.N&&(0<=this.F?vg(ug(this.N,this.F),a):a.push(this.index));this.Z(a)}}Lg(a){this.Z=a}};olympe.dc.oc.Ij.la=[olympe.dc.oc.sa];function wg(a,b){olympe.D.Uf(a.value)?(a.node=olympe.D.fl(a.value,b),Wa(a.node)||b()):b()}function xg(a,b){if(olympe.D.Uf(a.value)){const c=olympe.D.Ja(),d=a.N;olympe.D.wc([a.value],e=>{d!==e.valueOf()&&(c.run(()=>wg(a,b)),olympe.D.Ja().destroy())})}}
620
620
  class yg extends olympe.dc.oc.Pj{constructor(a,b,c){super(a);this.index=b;this.value=c;this.N=this.Ya();this.position=this.node=null;this.Z=!1;this.G=null}Ya(){const a=olympe.D.Ya(this.value);return a?a.valueOf():a}destroy(){this.node&&(this.node.destroy(),this.node=null);this.G=this.value=null}yb(){return null===this.value}}
621
621
  function zg(a,b){if(!b.yb()){var c=a.F;const d=a.Da,e=b.Ya();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].N,e);if(0===k||2>g-f){0>k&&null!==b.position&&b.position<=h&&(k=d(c[g].N,e));h=0>k?g:h;break}0>k?f=h:g=h}c=h;b.N=b.Ya();c!==b.position&&(a.insert(b,c),b.Z&&a.G())}}function Ag(a){const b=a.Da;a.F.sort((c,d)=>b(c.Ya(),d.Ya()))}
622
622
  olympe.dc.oc.Zq=class{constructor(a){this.Da=a;this.N=null;this.F=[];this.Z=[];this.ka=null;this.ra=new Map}C(a,b,c,d){b='$'+c;const e=this.F;let f;if(a)f=new yg(this,c,d),this.ra.set(b,f),this.V()?wg(f,()=>zg(this,f)):(f.position=e.length,e.push(f));else{f=this.ra.get(b);if(void 0===f)throw Error('Trying to remove an non-registered item: "'+c+'"');this.ra.delete(b);null!==f.position&&(this.V()?this.remove(f):delete e[f.position]);f.destroy()}return f}V(){return null!==this.N}aa(a){if(null!==this.N)throw Error('Manager already activated (depth='+
@@ -627,22 +627,22 @@ olympe.dc.oc.am=class{constructor(){this.N={};this.order=[];this.F=null;this.ra=
627
627
  f.G=ug(f,g)}null!==e.G&&vg(e.G,this.Z)}}this.ka&&this.ka(this.Z)}}Lg(a){this.ka=a}C(a,b,c){let d=this.N[c];a?void 0===d?(d=new Bg(this,c,b),this.N[c]=d):(d.tag=b,d.Z=!1):void 0!==d&&(d.Z=!0);return d}};olympe.dc.oc.am.la=[olympe.dc.oc.sa];function og(a){if(!a.F){for(let b in a.G)Dg(a.G[b]);a.F=!0}a.N=null;a.V=null}function pg(a,b,c){a.G[c||'root'].N=b}function qg(a,b,c){a.G[c||'root'].vg(b)}function Eg(a,b,c,d){const e=a.V,f=b+d+c;let g=e[f];void 0===g&&(g=Dd(a.db,b,c,d),e[f]=g);return g}function Fg(a,b){a.F||a.C.vg(b)}function Gg(a,b,c,d,e){if(!a.F){let f=Eg(a,c,d,e||olympe.dc.za.DESTINATION);e||(f+=Eg(a,c,d,olympe.dc.za.ORIGIN));0===f&&Fg(a,b)}}
628
628
  function Hg(a,b){const c=a.G[b];void 0!==c?(a.L&&a.L.debug('Set current block to',b,null!==c.parent?'parent = '+c.parent.Y():''),a.C=c):a.L&&a.L.error('Try to set a block that does not exists:',b)}function Ig(a){const b=String(++a.Z),c=a.C;a.G[b]=new Jg(b,c);Kg(c,b);c.F||(c.F=()=>Hg(a,c.Y()));return b}function Lg(a,b){const c=a.C;a.C.F=()=>{Hg(a,c.Y());b()}}function Mg(a,b){Dg(b?a.G[b]:a.C)}
629
629
  olympe.dc.oc.$q=class{constructor(a,b){this.db=a;this.L=b||null;this.N=Object.create(null);this.V=Object.create(null);this.F=!1;this.Z=0;this.C=new Jg('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=Eg(this,c,d,e),d=this.N[b]||0,this.N[b]=++d,this.C.C===b&&c<=d&&(this.C.C=a)):this.C.C=a)}};function Kg(a,b){null===a.children&&(a.children=Object.create(null));a.children[b]=!1}function Dg(a){a.G=!0;null!==a.parent&&a.parent.notify(a.id)}
630
- class Jg{constructor(a,b){this.id=a;this.parent=b||null;this.C=this.N=this.F=this.children=null;this.G=!1}Y(){return this.id}vg(a){const b=this.N;if(this.G||this.C===a||null===a)b&&b(),!b&&Dg(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.sf=class{ma(){return O(olympe.dc.na.sf)}C(){return[]}getValue(a,b){return b}ia(){return'{"c":"'+this.ma()+'","a":[]}'}toString(){return'Tag()'}};N('olympe.dc.valuedefs.Tag',olympe.dc.na.sf);olympe.dc.na.sf.la=[olympe.dc.wf];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.wf];function Ng(a,b,c,d){const e=olympe.dc.Na(),f=new olympe.dc.oc.Ij,g=new olympe.dc.oc.$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.Ia();w.gd()||w.yb()||(h||(pg(g,()=>{v.vg();og(g)}),v.Qc().Lg(l),h=!0),r?k[u]=t:delete k[u],qg(g,u))};const p=olympe.D.Ia();if(null!==c)for(let r=c.length-1;0<=r;r--)n=c[r].getTransform(a,g,p.Cb(n));n=p.Cb(n);const q=olympe.W.lc();uc(e,b,(r,t)=>{g.register(q,null);const u=f.C(r,b,q,
630
+ class Jg{constructor(a,b){this.id=a;this.parent=b||null;this.C=this.N=this.F=this.children=null;this.G=!1}Y(){return this.id}vg(a){const b=this.N;if(this.G||this.C===a||null===a)b&&b(),!b&&Dg(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.sf=class{ma(){return O(olympe.dc.na.sf)}C(){return[]}getValue(a,b){return b}ia(){return'{"c":"'+this.ma()+'","a":[]}'}toString(){return'Tag()'}};N('olympe.dc.valuedefs.Tag',olympe.dc.na.sf);olympe.dc.na.sf.la=[olympe.dc.wf];olympe.dc.na.Ed=class{constructor(a){this.value=a}ma(){return O(olympe.dc.na.Ed)}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.Ed);olympe.dc.na.Ed.la=[olympe.dc.wf];function Ng(a,b,c,d){const e=olympe.dc.Na(),f=new olympe.dc.oc.Ij,g=new olympe.dc.oc.$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.gd()||w.yb()||(h||(pg(g,()=>{v.vg();og(g)}),v.Qc().Lg(l),h=!0),r?k[u]=t:delete k[u],qg(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.Cb(n));n=p.Cb(n);const q=olympe.W.mc();uc(e,b,(r,t)=>{g.register(q,null);const u=f.C(r,b,q,
631
631
  null);n(r,t,q,rg(u,r,b,q))},q);p.onDestroy(()=>{vc(e,b,q)});e.Gb(b)||og(g)}function Og(a,b,c){const d=c.node,e=olympe.dc.Na(),f=a.G(),g=xd(e,b,a.af,d.Cb(h=>{null!==h&&(h=f(h));null===h?c.clear():c.update(h)}));d.onDestroy(()=>e.F(b,a.af,g))}
632
- olympe.dc.na.Lc=class{constructor(a,b,c){this.af=a&&a.R?a.R():a;this.X=b&&b.filter(d=>d instanceof olympe.dc.X.Qb||d instanceof olympe.dc.X.Dc)||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)),[])}df(a){this.defaultValue=a;return this}Dg(){return this.X}Od(){return this.F}getValue(a,b){const c=olympe.D.Kc(this.Yb()||Object,'AbstractProperty valueType');null!==this.defaultValue&&qb(c,this.defaultValue);b=this.F||
633
- b;null!==this.X?Ng(a,b,this.X,d=>{Og(this,d,c)}):Og(this,b,c);return c.Eb()}ia(a){const b=Df(a,this.af),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.af),b=this.F?','+Cf(this.F):'';let c='';this.X&&(c=','+this.X.join(','));return this.ma().replace(/^.+\./,'')+'('+a+c+b+')'}};olympe.dc.na.Lc.la=[olympe.dc.wf];olympe.dc.na.ke=class extends olympe.dc.na.Lc{constructor(a,b,c){super(a,b,c)}ma(){return O(olympe.dc.na.ke)}G(){return olympe.dc.W.Sb.Qm}Yb(){return olympe.D.ea}};N('olympe.dc.valuedefs.NumberProperty',olympe.dc.na.ke);olympe.dc.na.oe=class extends olympe.dc.na.Lc{constructor(a,b,c){super(a,b,c)}ma(){return O(olympe.dc.na.oe)}G(){return olympe.dc.W.Sb.Rm}Yb(){return olympe.D.Wa}};N('olympe.dc.valuedefs.StringProperty',olympe.dc.na.oe);olympe.dc.na.ue=class extends olympe.dc.na.Lc{constructor(a,b,c){super(a,b,c)}ma(){return O(olympe.dc.na.ue)}G(){return olympe.dc.W.Sb.Om}Yb(){return olympe.D.qa}};N('olympe.dc.valuedefs.BooleanProperty',olympe.dc.na.ue);olympe.dc.na.je=class extends olympe.dc.na.Lc{constructor(a,b,c){super(a,b,c)}ma(){return O(olympe.dc.na.je)}G(){return olympe.dc.W.Sb.Pm}Yb(){return olympe.D.jb}};N('olympe.dc.valuedefs.DateTimeProperty',olympe.dc.na.je);olympe.dc.na.Un=class{constructor(a,b){if(olympe.D.Uf(a))throw Error('Dataflows of Property not supported by AnyProperty');const c=a.R();var d=olympe.dc.Na();const e=d.fc(a,olympe.dm.Property.typeRel);if(!e)throw Error('Type of property '+a+'unavailable locally, cannot proceed with AnyProperty');a=d.Nf(e,olympe.dc.CloudObject.extendRel,olympe.dm.qf);d=null;switch(1<a.length?a[a.length-2]:e){case olympe.dm.String.P.R():d=new olympe.dc.na.oe(c,b);break;case olympe.dm.Number.P.R():d=new olympe.dc.na.ke(c,
632
+ olympe.dc.na.Lc=class{constructor(a,b,c){this.af=a&&a.R?a.R():a;this.X=b&&b.filter(d=>d instanceof olympe.dc.X.Qb||d instanceof olympe.dc.X.Dc)||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)),[])}df(a){this.defaultValue=a;return this}Dg(){return this.X}Pd(){return this.F}getValue(a,b){const c=olympe.D.Kc(this.Yb()||Object,'AbstractProperty valueType');null!==this.defaultValue&&qb(c,this.defaultValue);b=this.F||
633
+ b;null!==this.X?Ng(a,b,this.X,d=>{Og(this,d,c)}):Og(this,b,c);return c.Eb()}ia(a){const b=Df(a,this.af),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.af),b=this.F?','+Cf(this.F):'';let c='';this.X&&(c=','+this.X.join(','));return this.ma().replace(/^.+\./,'')+'('+a+c+b+')'}};olympe.dc.na.Lc.la=[olympe.dc.wf];olympe.dc.na.ke=class extends olympe.dc.na.Lc{constructor(a,b,c){super(a,b,c)}ma(){return O(olympe.dc.na.ke)}G(){return olympe.dc.W.Tb.Qm}Yb(){return olympe.D.ea}};N('olympe.dc.valuedefs.NumberProperty',olympe.dc.na.ke);olympe.dc.na.oe=class extends olympe.dc.na.Lc{constructor(a,b,c){super(a,b,c)}ma(){return O(olympe.dc.na.oe)}G(){return olympe.dc.W.Tb.Rm}Yb(){return olympe.D.Wa}};N('olympe.dc.valuedefs.StringProperty',olympe.dc.na.oe);olympe.dc.na.ue=class extends olympe.dc.na.Lc{constructor(a,b,c){super(a,b,c)}ma(){return O(olympe.dc.na.ue)}G(){return olympe.dc.W.Tb.Om}Yb(){return olympe.D.qa}};N('olympe.dc.valuedefs.BooleanProperty',olympe.dc.na.ue);olympe.dc.na.je=class extends olympe.dc.na.Lc{constructor(a,b,c){super(a,b,c)}ma(){return O(olympe.dc.na.je)}G(){return olympe.dc.W.Tb.Pm}Yb(){return olympe.D.jb}};N('olympe.dc.valuedefs.DateTimeProperty',olympe.dc.na.je);olympe.dc.na.Un=class{constructor(a,b){if(olympe.D.Uf(a))throw Error('Dataflows of Property not supported by AnyProperty');const c=a.R();var d=olympe.dc.Na();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.Nf(e,olympe.dc.CloudObject.extendRel,olympe.dm.qf);d=null;switch(1<a.length?a[a.length-2]:e){case olympe.dm.String.P.R():d=new olympe.dc.na.oe(c,b);break;case olympe.dm.Number.P.R():d=new olympe.dc.na.ke(c,
634
634
  b);break;case olympe.dm.Boolean.P.R():d=new olympe.dc.na.ue(c,b);break;case olympe.dm.DateTime.P.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.Un.la=[olympe.dc.wf];olympe.dc.Db={};olympe.dc.Db.Number=class{constructor(a){this.C=a}ma(){return O(olympe.dc.Db.Number)}V(){return this.C.C()}N(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.Db.Number);olympe.dc.Db.Number.la=[olympe.dc.Ne];olympe.dc.Db.String=class{constructor(a){this.C=a}ma(){return O(olympe.dc.Db.String)}V(){return this.C.C()}N(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.Db.String);olympe.dc.Db.String.la=[olympe.dc.Ne];olympe.dc.Db.DateTime=class{constructor(a){this.C=a}ma(){return O(olympe.dc.Db.DateTime)}V(){return this.C.C()}N(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.Db.DateTime);olympe.dc.Db.DateTime.la=[olympe.dc.Ne];let Pg=0;olympe.dc.Db.Og=class{constructor(){this.id=Pg++}ma(){return'CustomLocalComparator#'+Pg}V(){return[]}N(){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.Db.Og.la=[olympe.dc.Ne];olympe.dc.U={};olympe.dc.U.kd=class{constructor(a){this.G=a}ma(){return O(olympe.dc.U.kd)}F(){return this.G.F()}C(a,b){return olympe.D.fl(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.U.kd);olympe.dc.U.kd.la=[olympe.dc.$a];olympe.dc.U.Vd=class{constructor(a){this.U=[];for(let b=arguments.length,c=0;c<b;c++)Array.isArray(arguments[c])?this.U=this.U.concat(arguments[c]):this.U.push(arguments[c])}ma(){return O(olympe.dc.U.Vd)}F(){return this.U.reduce((a,b)=>a.concat(b.F()),[])}C(a,b){return olympe.D.ef(this.U.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.U.map(c=>c.ia(a));return'{"c":"'+this.ma()+'","a":['+b.join(',')+']}'}toString(){return'And('+
635
635
  this.U.map(a=>a.toString()).join(',')+')'}};N('olympe.dc.predicates.And',olympe.dc.U.Vd);olympe.dc.U.Vd.la=[olympe.dc.$a];olympe.dc.U.be=class{constructor(a){this.U=[];for(let b=arguments.length,c=0;c<b;c++)Array.isArray(arguments[c])?this.U=this.U.concat(arguments[c]):this.U.push(arguments[c])}ma(){return O(olympe.dc.U.be)}F(){return this.U.reduce((a,b)=>a.concat(b.F()),[])}C(a,b){return olympe.D.ef(this.U.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.U.map(c=>c.ia(a));return'{"c":"'+this.ma()+'","a":['+b.join(',')+']}'}toString(){return'Or('+
636
- this.U.map(a=>a.toString()).join(',')+')'}};N('olympe.dc.predicates.Or',olympe.dc.U.be);olympe.dc.U.be.la=[olympe.dc.$a];olympe.dc.U.pl=class{constructor(a,b){this.G=a;this.N=b}ma(){}F(){return[this.G.C(),this.N.C()]}C(a,b){return olympe.D.Fa([this.G.getValue(a,b),this.N.getValue(a,b)],(c,d)=>{c=c.valueOf();d=d.valueOf();return this.V('string'===typeof c?c:Number(c),'string'===typeof d?d:Number(d))},Boolean)}V(){}ia(a){return'{"c":"'+this.ma()+'","a":['+this.G.ia(a)+','+this.N.ia(a)+']}'}toString(){return this.ma().replace(/^.+\./,'')+'('+this.G.toString()+','+this.N.toString()+')'}};olympe.dc.U.pl.la=[olympe.dc.$a];olympe.dc.U.Gc=class{constructor(a,b){this.G=a;this.N=b}ma(){return O(olympe.dc.U.Gc)}F(){return[this.G.C(),this.N.C()]}C(a,b){return olympe.D.Fa([this.G.getValue(a,b),this.N.getValue(a,b)],(c,d)=>'object'===typeof c&&void 0!==c.Td?c.Td(d):'object'===typeof d&&void 0!==d.Td?d.Td(c):olympe.D.Ac(c.valueOf()===d.valueOf()),olympe.D.qa,'Test equal predicate')}ia(a){return'{"c":"'+this.ma()+'","a":['+this.G.ia(a)+','+this.N.ia(a)+']}'}toString(){return'Equals('+this.G.toString()+','+this.N.toString()+
637
- ')'}};N('olympe.dc.predicates.Equals',olympe.dc.U.Gc);olympe.dc.U.Gc.la=[olympe.dc.$a];olympe.dc.U.ct=class extends olympe.dc.U.Gc{constructor(a,b){super(a,new olympe.dc.na.Dd(b))}};olympe.dc.U.ct.la=[olympe.dc.$a];olympe.dc.U.ye=class extends olympe.dc.U.pl{constructor(a,b){super(a,b)}ma(){return O(olympe.dc.U.ye)}V(a,b){return a>b}};N('olympe.dc.predicates.Greater',olympe.dc.U.ye);olympe.dc.U.Fe=class extends olympe.dc.U.pl{constructor(a,b){super(a,b)}ma(){return O(olympe.dc.U.Fe)}V(a,b){return a<b}};N('olympe.dc.predicates.Smaller',olympe.dc.U.Fe);olympe.dc.U.Sc=class{constructor(a,b,c){this.source=a;this.value=b;this.G=c?c:!1}ma(){return O(olympe.dc.U.Sc)}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.Ac(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":['+
636
+ this.U.map(a=>a.toString()).join(',')+')'}};N('olympe.dc.predicates.Or',olympe.dc.U.be);olympe.dc.U.be.la=[olympe.dc.$a];olympe.dc.U.pl=class{constructor(a,b){this.G=a;this.N=b}ma(){}F(){return[this.G.C(),this.N.C()]}C(a,b){return olympe.D.Fa([this.G.getValue(a,b),this.N.getValue(a,b)],(c,d)=>{c=c.valueOf();d=d.valueOf();return this.V('string'===typeof c?c:Number(c),'string'===typeof d?d:Number(d))},Boolean)}V(){}ia(a){return'{"c":"'+this.ma()+'","a":['+this.G.ia(a)+','+this.N.ia(a)+']}'}toString(){return this.ma().replace(/^.+\./,'')+'('+this.G.toString()+','+this.N.toString()+')'}};olympe.dc.U.pl.la=[olympe.dc.$a];olympe.dc.U.Gc=class{constructor(a,b){this.G=a;this.N=b}ma(){return O(olympe.dc.U.Gc)}F(){return[this.G.C(),this.N.C()]}C(a,b){return olympe.D.Fa([this.G.getValue(a,b),this.N.getValue(a,b)],(c,d)=>'object'===typeof c&&void 0!==c.Ud?c.Ud(d):'object'===typeof d&&void 0!==d.Ud?d.Ud(c):olympe.D.Ac(c.valueOf()===d.valueOf()),olympe.D.qa,'Test equal predicate')}ia(a){return'{"c":"'+this.ma()+'","a":['+this.G.ia(a)+','+this.N.ia(a)+']}'}toString(){return'Equals('+this.G.toString()+','+this.N.toString()+
637
+ ')'}};N('olympe.dc.predicates.Equals',olympe.dc.U.Gc);olympe.dc.U.Gc.la=[olympe.dc.$a];olympe.dc.U.ct=class extends olympe.dc.U.Gc{constructor(a,b){super(a,new olympe.dc.na.Ed(b))}};olympe.dc.U.ct.la=[olympe.dc.$a];olympe.dc.U.ye=class extends olympe.dc.U.pl{constructor(a,b){super(a,b)}ma(){return O(olympe.dc.U.ye)}V(a,b){return a>b}};N('olympe.dc.predicates.Greater',olympe.dc.U.ye);olympe.dc.U.Fe=class extends olympe.dc.U.pl{constructor(a,b){super(a,b)}ma(){return O(olympe.dc.U.Fe)}V(a,b){return a<b}};N('olympe.dc.predicates.Smaller',olympe.dc.U.Fe);olympe.dc.U.Sc=class{constructor(a,b,c){this.source=a;this.value=b;this.G=c?c:!1}ma(){return O(olympe.dc.U.Sc)}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.Ac(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":['+
638
638
  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.U.Sc);olympe.dc.U.Sc.la=[olympe.dc.$a];olympe.dc.U.xd=class{constructor(a,b,c){this.source=a;this.N=b;this.G=void 0===c?!0:c}ma(){return O(olympe.dc.U.xd)}F(){return[this.source.C()]}C(a,b){return olympe.D.ef([this.source.getValue(a,b),this.N,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.N);a=Df(a,this.G);return'{"c":"'+this.ma()+'","a":['+b+','+c+','+a+']}'}toString(){const a=Cf(this.G);return'Regex('+this.source.toString()+
639
639
  ','+this.N+','+a+')'}};N('olympe.dc.predicates.Regex',olympe.dc.U.xd);olympe.dc.U.xd.la=[olympe.dc.$a];olympe.dc.U.lf=class{constructor(a){this.G=new Set;a instanceof Array?a.forEach(b=>{this.G.add(olympe.dc.xa(b))}):this.G.add(olympe.dc.xa(a))}ma(){return O(olympe.dc.U.lf)}F(){return[]}C(a,b){const c=olympe.D.createNode(Boolean),d=olympe.dc.Na();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.xa(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)?
640
640
  (K(c,!0),f()):(h=new Qg(k,olympe.dc.CloudObject.extendRel),e.push(h),V(d,h.tag,h.C,g,h.id))}};a=new Qg(b,olympe.dc.CloudObject.modelRel);e.push(a);V(d,a.tag,a.C,g,a.id);c.onDestroy(f);Wa(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 Qg{constructor(a,b){this.tag=a;this.C=b;this.id=olympe.W.Ag()}}N('olympe.dc.predicates.InstanceOf',olympe.dc.U.lf);olympe.dc.U.lf.la=[olympe.dc.$a];function Rg(a){return a.Ka.map(b=>b.R())}function Sg(a){return a.Ka.map(b=>b.Oa())}
641
- olympe.dc.U.kf=class{constructor(a,b,c){this.Ka=[];this.G=c instanceof Array?c:void 0!==c?[olympe.dc.xa(c)]:[];a=Array.isArray(a)?a:[a];for(let d=0,e=a.length;d<e;d++)c=a[d],c instanceof olympe.dc.X.Dc?this.Ka.push(new Tg(c.R(),c.Oa(),c.F,c.C)):this.Ka.push(new Tg(olympe.dc.xa(c),b[d],1,1))}ma(){return O(olympe.dc.U.kf)}F(){return[this.Ka.reduce((a,b)=>a.concat(b),[])]}C(a,b){const c=olympe.D.createNode(Boolean),d=olympe.W.lc(),e=olympe.dc.Na();let f=0;a=(h,k)=>{0!==this.G.length&&!this.G.includes(k)||
642
- c.yb()||(f+=h?1:-1,K(c,0<f))};const g=this.Ka;for(let h=g.length-1;0<=h;h--)a=Ug(g[h],e,a,d+h);uc(e,b,a,d);olympe.D.Ia().onDestroy(()=>{vc(e,b,d)});c.df(!1);return c}ia(){return'{"c":"'+this.ma()+'","a":['+JSON.stringify(this.Ka.map(a=>a.ia()))+(0!==this.G.length?',"'+this.G.toString():'')+'"]}'}toString(){return'HasRelated('+(0!==this.G.length?'#'+this.G.toString()+', ':'')+this.Ka.map(a=>a.ia())+')'}};N('olympe.dc.predicates.HasRelated',olympe.dc.U.kf);
641
+ olympe.dc.U.kf=class{constructor(a,b,c){this.Ka=[];this.G=c instanceof Array?c:void 0!==c?[olympe.dc.xa(c)]:[];a=Array.isArray(a)?a:[a];for(let d=0,e=a.length;d<e;d++)c=a[d],c instanceof olympe.dc.X.Dc?this.Ka.push(new Tg(c.R(),c.Oa(),c.F,c.C)):this.Ka.push(new Tg(olympe.dc.xa(c),b[d],1,1))}ma(){return O(olympe.dc.U.kf)}F(){return[this.Ka.reduce((a,b)=>a.concat(b),[])]}C(a,b){const c=olympe.D.createNode(Boolean),d=olympe.W.mc(),e=olympe.dc.Na();let f=0;a=(h,k)=>{0!==this.G.length&&!this.G.includes(k)||
642
+ c.yb()||(f+=h?1:-1,K(c,0<f))};const g=this.Ka;for(let h=g.length-1;0<=h;h--)a=Ug(g[h],e,a,d+h);uc(e,b,a,d);olympe.D.Ja().onDestroy(()=>{vc(e,b,d)});c.df(!1);return c}ia(){return'{"c":"'+this.ma()+'","a":['+JSON.stringify(this.Ka.map(a=>a.ia()))+(0!==this.G.length?',"'+this.G.toString():'')+'"]}'}toString(){return'HasRelated('+(0!==this.G.length?'#'+this.G.toString()+', ':'')+this.Ka.map(a=>a.ia())+')'}};N('olympe.dc.predicates.HasRelated',olympe.dc.U.kf);
643
643
  function Ug(a,b,c,d){const e=Object.create(null);d+=olympe.W.Ag();const f=(g,h,k)=>{k>=a.F&&c(g,h);if(!(0<=a.C&&k>=a.C)){var l=d+k;g?e[h]||(e[h]=!0,V(b,h,a,(n,p)=>{f(n,p,k+1)},l)):(delete e[h],b.C(h,a,l))}};return(g,h)=>f(g,h,0)}class Tg extends olympe.dc.query.Relation{constructor(a,b,c,d){super(a,b,1!==c||1!==d);this.F=c;this.C=d}ia(){return`${this.R()}, ${this.Oa()}, ${this.F}, ${this.C}`}}olympe.dc.U.kf.la=[olympe.dc.$a];olympe.dc.U.wl=class{constructor(a,b){this.G=a;this.value=b}C(a,b){return olympe.D.ef([this.G,this.value.getValue(a,b)],(c,d)=>{c=c.valueOf();return(Number(c)&Number(d.valueOf()))===Number(c)})}ma(){return O(olympe.dc.U.wl)}F(){return[this.value.C()]}ia(a){const b=olympe.D.lb(this.G)?this.G.Ma.Ib.valueOf():this.G.valueOf();return'{"c":"'+this.ma()+'","a":['+b+','+this.value.ia(a)+']}'}toString(){const a=olympe.D.lb(this.G)?this.G.Ma.Ib.valueOf():this.G.valueOf();return this.ma().replace(/^.+\./,'')+
644
644
  '('+a.toString()+','+this.value.toString()+')'}};N('olympe.dc.predicates.BitMask',olympe.dc.U.wl);olympe.dc.U.wl.la=[olympe.dc.$a];let Vg=0;olympe.dc.U.Og=class{constructor(){this.id=Vg++}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.U.Og.la=[olympe.dc.$a];olympe.dc.U.Pl=class{constructor(a,b,c){this.Ka=[];this.G=void 0!==c?c.map(olympe.dc.xa):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.Dc?this.Ka.push(new Wg(c.R(),c.Oa(),c.F,c.C)):this.Ka.push(new Wg(olympe.dc.xa(c),b[d],1,1))}ma(){return O(olympe.dc.U.Pl)}F(){return[this.Ka.reduce((a,b)=>a.concat(b),[])]}C(a,b){const c=olympe.D.createNode(Boolean),d=olympe.dc.Na(),e=olympe.W.Ag();a=(h,k,l)=>{k&&(null===this.G||this.G.includes(l))&&h(1)};const f=this.Ka;
645
- for(let h=f.length-1;0<=h;h--)a=f[h].getTransform(d,a,e+h);let g=0;uc(d,b,a.bind(null,h=>{c.gd()||c.yb()||(g+=h,K(c,0<g))}),e);olympe.D.Ia().onDestroy(()=>vc(d,b,e));c.df(!1);return c}ia(){return'{"c":"'+this.ma()+'","a":['+JSON.stringify(this.Ka.map(a=>a.ia()))+(null!==this.G?',"'+this.G.toString():'')+'"]}'}toString(){return'HasRelatedTree('+(null!==this.G?'#['+this.G.toString()+'], ':'')+this.Ka.map(a=>a.ia())+')'}};N('olympe.dc.predicates.HasRelatedTree',olympe.dc.U.Pl);
645
+ for(let h=f.length-1;0<=h;h--)a=f[h].getTransform(d,a,e+h);let g=0;uc(d,b,a.bind(null,h=>{c.gd()||c.yb()||(g+=h,K(c,0<g))}),e);olympe.D.Ja().onDestroy(()=>vc(d,b,e));c.df(!1);return c}ia(){return'{"c":"'+this.ma()+'","a":['+JSON.stringify(this.Ka.map(a=>a.ia()))+(null!==this.G?',"'+this.G.toString():'')+'"]}'}toString(){return'HasRelatedTree('+(null!==this.G?'#['+this.G.toString()+'], ':'')+this.Ka.map(a=>a.ia())+')'}};N('olympe.dc.predicates.HasRelatedTree',olympe.dc.U.Pl);
646
646
  class Wg extends olympe.dc.query.Relation{constructor(a,b,c,d){super(a,b,1!==c||1!==d);this.F=c;this.C=d;this.N=new Map;this.G=new Map}getTransform(a,b,c){const d=this.G,e=this.N,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.Ag();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&&
647
647
  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.Oa()}, ${this.F}, ${this.C}`}}olympe.dc.U.Pl.la=[olympe.dc.$a];olympe.dc.X={};olympe.dc.X.sk={ht:1,ut:-1,wp:0};olympe.dc.X.aB={Dy:!0,az:!1};olympe.dc.X.Qb=class extends olympe.dc.ta.Relation{constructor(a,b){super(a,b||olympe.dc.za.DESTINATION)}Yb(){return Ic(this)}ma(){return O(olympe.dc.X.Qb)}Pc(){return new olympe.dc.X.Qb(this.tag,this.direction===olympe.dc.za.DESTINATION?olympe.dc.za.ORIGIN:olympe.dc.za.DESTINATION)}getTransform(a,b,c){const d=olympe.dc.Na(),e=this.R(),f=this.Oa();return(g,h,k,l)=>{Gg(b,k,h,e,f);g?V(d,h,this,(n,p)=>{const q=olympe.W.mb(k+f+e+p,20),r=rg(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":"'+
648
648
  this.ma()+'","a":["'+this.R()+'","'+this.Oa()+'"]}'}toString(){return'Related('+this.Oa()+this.R()+')'}};N('olympe.dc.transformers.Related',olympe.dc.X.Qb);olympe.dc.X.Qb.la=[olympe.dc.Wc];olympe.dc.X.Dc=class extends olympe.dc.ta.Relation{constructor(a,b=olympe.dc.za.DESTINATION,c=1,d=-1){super(a,b);this.F=c;this.C=d}Yb(){return Ic(this)}ma(){return O(olympe.dc.X.Dc)}getTransform(a,b,c){const d=olympe.dc.Na(),e=Object.create(null),f=olympe.dc.za.ORIGIN,g=olympe.dc.za.DESTINATION,h=this.R(),k=this.Oa(),l=(p,q,r)=>{if(!(0<=this.C&&p>=this.C)){var t=d.ub(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,62 +651,62 @@ N('olympe.dc.transformers.RecursiveRelated',olympe.dc.X.Dc);olympe.dc.X.Dc.la=[o
651
651
  olympe.dc.X.Be=class{constructor(a,b){this.direction=b||olympe.dc.za.DESTINATION;this.Ka=a.map(c=>new olympe.dc.ta.Relation(c,this.direction))}Yb(){return olympe.dc.CloudObject}ma(){return O(olympe.dc.X.Be)}Oa(){return this.direction}getTransform(a,b,c){const d=olympe.dc.Na(),e=(f,g,h,k)=>V(d,f,k,(l,n)=>{var p=k.Oa();var q=k.R();p=olympe.W.mb(g+p+q+n,20);q=rg(h,l,n,p);l&&b.register(p,g,f,k.R(),k.Oa());c(l,n,p,q)},g);return(f,g,h,k)=>{f?this.Ka.forEach(l=>{Gg(b,h,g,l.R(),l.Oa());e(g,h,k,l)}):this.Ka.forEach(l=>
652
652
  {d.C(g,l,h)})}}ia(){return'{"c":"'+this.ma()+'","a":['+JSON.stringify(Xg(this))+',"'+this.direction+'"]}'}toString(){return'MultiRelated('+this.Oa()+'['+Xg(this).join(',')+'])'}};N('olympe.dc.transformers.MultiRelated',olympe.dc.X.Be);olympe.dc.X.Be.la=[olympe.dc.Wc];olympe.dc.X.Jl=class{constructor(a,b,c,d){this.C=new olympe.dc.ta.Relation(olympe.dc.xa(a),c||olympe.dc.za.DESTINATION);this.F=new olympe.dc.ta.Relation(olympe.dc.xa(b),d||olympe.dc.za.DESTINATION)}Yb(){return Ic(this.C)}ma(){return O(olympe.dc.X.Jl)}getTransform(a,b,c){const d=olympe.dc.Na(),e={},f=this.C.R(),g=this.C.Oa(),h=this.F.R(),k=this.F.Oa();let l=null,n=null;const p=(r,t,u,v,w,y)=>{if(w){if(w=()=>{const A=olympe.W.mb(u+g+(f+'_'+r)+y,20),D=rg(t,!0,y,A);l=r;n=()=>{c(!1,y,A,rg(t,!1,y,A))};
653
653
  b.register(A,u,v,f,g);c(!0,y,A,D)},w.Zr=r,e[v]=w,null===l||r<l)n&&n(),w()}else if(l===r){n();e[v]=!0;w=Infinity;let A=null;for(let D=Object.keys(e),T=D.length,I=0;I<T;I++){let aa=e[D[I]];aa.Zr<w&&(w=aa.Zr,A=aa)}A&&A()}},q=(r,t,u,v,w)=>{v?e[w]||(e[w]=!0,Gg(b,u,w,f,g),Gg(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":["'+
654
- this.C.toString()+'","'+this.F.toString()+'"]}'}toString(){return'FirstRelated('+this.C.toString()+', '+this.F.toString()+')'}};N('olympe.dc.transformers.FirstRelated',olympe.dc.X.Jl);olympe.dc.X.Jl.la=[olympe.dc.Wc];olympe.dc.X.xe=class{Yb(){return null}ma(){return O(olympe.dc.X.xe)}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,rg(h,!0,f,f))):(d[f]++,Fg(b,g)):void 0!==d[f]&&0>=--d[f]&&(delete d[f],c(!1,f,f,rg(h,!1,f,f)))}}ia(){return'{"c":"'+this.ma()+'"}'}toString(){return'Distinct()'}};N('olympe.dc.transformers.Distinct',olympe.dc.X.xe);olympe.dc.X.xe.la=[olympe.dc.Wc];olympe.dc.X.Kd=class{constructor(a,b){this.Ld=a;this.C=void 0===b?!0:!!b}Yb(){return null}ma(){return O(olympe.dc.X.Kd)}F(){return[this.Ld.V()]}getTransform(a,b,c){const d=new olympe.dc.oc.Zq(this.C?this.Ld.G.bind(this.Ld):(e,f)=>this.Ld.G(f,e));return(e,f,g)=>{var h=e?this.Ld.N(a,f):void 0;h=d.C(e,f,g,h);c(e,f,g,h)}}ia(a){return'{"c":"'+this.ma()+'","a":['+this.Ld.ia(a)+','+JSON.stringify(this.C)+']}'}toString(){return'Sort('+this.Ld.toString()+','+JSON.stringify(this.C)+')'}};
655
- N('olympe.dc.transformers.Sort',olympe.dc.X.Kd);olympe.dc.X.Kd.la=[olympe.dc.Wc,olympe.dc.tq];olympe.dc.X.rc=class{constructor(a){this.C=a}Yb(){return null}ma(){return O(olympe.dc.X.rc)}F(){return this.C.F()}getTransform(a,b,c){function d(f,g,h,k){k=k.valueOf();!1===k&&Fg(b,g);k!==!!e[g]&&(e[g]=k,c(k,f,g,rg(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.Ma),olympe.D.Tf(f)?(b.F||void 0!==olympe.D.Ya(f)||Fg(b,h),e[l]=f,olympe.D.wc([f],n=>{d(g,h,k,n)},'filterResultHandler')):d(g,h,k,f)):(void 0!==e[l]&&(e[l].destroy(),delete e[l]),d(g,h,k,!1),delete e[h])}}ia(a){return'{"c":"'+
654
+ this.C.toString()+'","'+this.F.toString()+'"]}'}toString(){return'FirstRelated('+this.C.toString()+', '+this.F.toString()+')'}};N('olympe.dc.transformers.FirstRelated',olympe.dc.X.Jl);olympe.dc.X.Jl.la=[olympe.dc.Wc];olympe.dc.X.xe=class{Yb(){return null}ma(){return O(olympe.dc.X.xe)}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,rg(h,!0,f,f))):(d[f]++,Fg(b,g)):void 0!==d[f]&&0>=--d[f]&&(delete d[f],c(!1,f,f,rg(h,!1,f,f)))}}ia(){return'{"c":"'+this.ma()+'"}'}toString(){return'Distinct()'}};N('olympe.dc.transformers.Distinct',olympe.dc.X.xe);olympe.dc.X.xe.la=[olympe.dc.Wc];olympe.dc.X.Ld=class{constructor(a,b){this.Md=a;this.C=void 0===b?!0:!!b}Yb(){return null}ma(){return O(olympe.dc.X.Ld)}F(){return[this.Md.V()]}getTransform(a,b,c){const d=new olympe.dc.oc.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.N(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)+')'}};
655
+ N('olympe.dc.transformers.Sort',olympe.dc.X.Ld);olympe.dc.X.Ld.la=[olympe.dc.Wc,olympe.dc.tq];olympe.dc.X.rc=class{constructor(a){this.C=a}Yb(){return null}ma(){return O(olympe.dc.X.rc)}F(){return this.C.F()}getTransform(a,b,c){function d(f,g,h,k){k=k.valueOf();!1===k&&Fg(b,g);k!==!!e[g]&&(e[g]=k,c(k,f,g,rg(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.Ma),olympe.D.Tf(f)?(b.F||void 0!==olympe.D.Ya(f)||Fg(b,h),e[l]=f,olympe.D.wc([f],n=>{d(g,h,k,n)},'filterResultHandler')):d(g,h,k,f)):(void 0!==e[l]&&(e[l].destroy(),delete e[l]),d(g,h,k,!1),delete e[h])}}ia(a){return'{"c":"'+
656
656
  this.ma()+'","a":['+this.C.ia(a)+']}'}toString(){return'Filter('+this.C.toString()+')'}};N('olympe.dc.transformers.Filter',olympe.dc.X.rc);olympe.dc.X.rc.la=[olympe.dc.Wc,olympe.dc.tq];olympe.dc.X.$d=class{constructor(a,b){this.start=a;this.C=b}Yb(){return null}ma(){return O(olympe.dc.X.$d)}getTransform(a,b,c){const d=new olympe.dc.oc.am;let e,f,g,h=!1;const k=()=>{if(void 0!==f&&void 0!==g&&void 0!==e){var n=f+g;b.F||(b.C.C=e[0>n-1?0:Math.min(e.length,n)-1]);Cg(d,e,f,n,c)}};olympe.D.ie([this.start,this.C],(n,p)=>{f=n.valueOf();g=p.valueOf();k()});Lg(b,k);const l=Ig(b);Hg(b,l);return(n,p,q,r)=>{h||(r.Qc().Lg(t=>{e=t;Mg(b,l)}),pg(b,()=>r.vg(),l),h=!0);d.C(n,p,q,null);qg(b,q,l)}}ia(a){return'{"c":"'+
657
- this.ma()+'","a":['+Df(a,this.start)+','+Df(a,this.C)+']}'}toString(){return`Limit(${olympe.D.Ya(this.start)},${olympe.D.Ya(this.C)})`}};N('olympe.dc.transformers.Limit',olympe.dc.X.$d);olympe.dc.X.$d.la=[olympe.dc.Wc];function Yg(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.Cb(f));f=n.Cb(f);e.register(h,null);r=d.C(p,q,c,null);f(p,q,h,rg(r,p,q,h))}const h=olympe.W.lc(),k=olympe.dc.Na(),l=a.X,n=olympe.D.Ia();olympe.D.wc([a.C],p=>{Zg(k,p,g,h);void 0===k.model(p)&&og(e)})}function Zg(a,b,c,d){const e=b&&b.valueOf();e&&(uc(a,e,c,d),olympe.D.Ia().vc(()=>vc(a,e,d)))}
658
- olympe.dc.X.uf=class{constructor(a,b){this.X=this.C=null;a instanceof olympe.dc.Aa?(this.C=a.Od(),this.X=a.Vl()):(this.C=a,b&&(this.X=b))}Yb(){return null}ma(){return O(olympe.dc.X.uf)||''}Dg(){return this.X}Od(){return this.C}getTransform(a,b,c){const d=new olympe.dc.oc.am,e=new olympe.dc.oc.Ij;let f=[],g=[],h=!1,k=!1;const l=Ig(b),n=Ig(b);Lg(b,()=>{const p=f.concat(g);0<p.length?b.F||(b.C.C=p[p.length-1]):Mg(b);Cg(d,p,0,p.length,c)});Hg(b,n);Yg(this,a,this.C,e,b,(p,q,r,t)=>{const u=olympe.D.Ia();
657
+ this.ma()+'","a":['+Df(a,this.start)+','+Df(a,this.C)+']}'}toString(){return`Limit(${olympe.D.Ya(this.start)},${olympe.D.Ya(this.C)})`}};N('olympe.dc.transformers.Limit',olympe.dc.X.$d);olympe.dc.X.$d.la=[olympe.dc.Wc];function Yg(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.Cb(f));f=n.Cb(f);e.register(h,null);r=d.C(p,q,c,null);f(p,q,h,rg(r,p,q,h))}const h=olympe.W.mc(),k=olympe.dc.Na(),l=a.X,n=olympe.D.Ja();olympe.D.wc([a.C],p=>{Zg(k,p,g,h);void 0===k.model(p)&&og(e)})}function Zg(a,b,c,d){const e=b&&b.valueOf();e&&(uc(a,e,c,d),olympe.D.Ja().vc(()=>vc(a,e,d)))}
658
+ olympe.dc.X.uf=class{constructor(a,b){this.X=this.C=null;a instanceof olympe.dc.Aa?(this.C=a.Pd(),this.X=a.Vl()):(this.C=a,b&&(this.X=b))}Yb(){return null}ma(){return O(olympe.dc.X.uf)||''}Dg(){return this.X}Pd(){return this.C}getTransform(a,b,c){const d=new olympe.dc.oc.am,e=new olympe.dc.oc.Ij;let f=[],g=[],h=!1,k=!1;const l=Ig(b),n=Ig(b);Lg(b,()=>{const p=f.concat(g);0<p.length?b.F||(b.C.C=p[p.length-1]):Mg(b);Cg(d,p,0,p.length,c)});Hg(b,n);Yg(this,a,this.C,e,b,(p,q,r,t)=>{const u=olympe.D.Ja();
659
659
  u.gd()||u.yb()||(k||(t.Qc().Lg(v=>{g=v;Mg(b,n)}),pg(b,()=>t.vg(),n),k=!0),d.C(p,q,r),qg(b,r,n))});Hg(b,l);return(p,q,r,t)=>{h||(t.Qc().Lg(u=>{f=u;Mg(b,l)}),pg(b,()=>t.vg(),l),h=!0);d.C(p,q,r,l);qg(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.Ma.Y():this.C.valueOf(),b=this.X?','+this.X.map(c=>c.toString()).join(','):'';return'Union('+a+b+')'}};
660
- N('olympe.dc.transformers.Union',olympe.dc.X.uf);olympe.dc.X.uf.la=[olympe.dc.Wc];olympe.dc.Mg={};function $g(a,b){let c=Ac.get(b)||null,d=null;for(;!c&&b&&b!==d;){d=b;b=a.db.Bf(b);if(null===b)break;c=Ac.get(b)||null}return c||null}olympe.dc.Mg.SyncManager=class{constructor(a,b,c){this.L=a;this.db=b;this.C=c}};olympe.dc.Mg.O={Ea:'dc.syncs.Logger',va:'dc.syncs.SyncManager'};olympe.T.config(function(a){C(a,olympe.dc.Mg.O.Ea,[olympe.pa.O.va],b=>b.Nc('dc'));B(a,olympe.dc.Mg.O.va,olympe.dc.Mg.SyncManager,olympe.dc.Mg.O.Ea,olympe.dc.O.wi,olympe.T.O.dg)});olympe.dc.W={};olympe.dc.W.LC=function(a){a=olympe.dc.xa(a);const b=olympe.D.Kc(olympe.D.Wa,'getInstanceName'),c=olympe.dc.Na(),d=xd(c,a,olympe.dc.CloudObject.nameProp,b.update.bind(b));olympe.D.Ia().vc(c.F.bind(c,a,olympe.dc.CloudObject.nameProp,d));return b.Eb()};olympe.dc.W.OC=function(a){return olympe.D.Fa([a],b=>olympe.D.Xx(olympe.dc.Na().nj(b)),olympe.D.qa)};olympe.dc.W.PC=function(a){return(a=olympe.D.Ya(a))?olympe.dc.Na().nj(a):!1};olympe.dc.W.Li=class a{constructor(b=olympe.dc.Ja.Vc){this.G=b}C(b){const c=new olympe.dc.db.xc;this.F(b,c);return c}V(b,c,d){const e=new olympe.dc.db.xc(b),f=new olympe.dc.query.Di(b,this.G,c,e);this.F(d,e,(g,h)=>{h=h||[];const k=f.C.get(g)||new Set;for(const l of h)k.add(l);f.C.set(g,k)});return f}N(b,c){const d=new olympe.dc.db.xc(b),e=new olympe.dc.query.rt(b,d);this.F(c,d,(f,g,h)=>{h=h||[];const k=new 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=
661
- 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.pc(f.t,a.C(f.p),!0,b);break;case 3:c.Jc(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=
662
- typeof e;b.startsWith('fd')&&(b=olympe.dc.Ug.mc+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&&
663
- 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.Hc(e.t));break;case 'untyped':null===e&&c.set(b,null)}}return c}};olympe.dc.W.Sb={};olympe.dc.W.Sb.Rm=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.Sb.Om=a=>'boolean'===typeof a||a instanceof Boolean?olympe.D.Ac(a):a instanceof olympe.D.qa?a:null;olympe.dc.W.Sb.Qm=a=>'number'===typeof a||a instanceof Number?olympe.D.ya(a):'string'===typeof a||a instanceof String?olympe.D.ya(Number.parseFloat(a.valueOf())):a instanceof olympe.D.ea?a:null;
664
- olympe.dc.W.Sb.Pm=function(a){return'number'===typeof a||a instanceof Number?sb(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.Sb.Er=function(a){return a instanceof olympe.D.Color?a:'string'===typeof a||a instanceof String?wb(a.valueOf()):null};olympe.dc.W.Sb.Fr=a=>a instanceof olympe.dc.CloudObject?a:a instanceof olympe.dc.Hc?olympe.dc.CloudObject.get(a.tag):null;
665
- olympe.dc.W.Sb.ih=a=>a instanceof olympe.dc.Hc?olympe.dc.CloudObject.get(a.tag):a;olympe.dc.W.Sb.vC=a=>{switch(typeof a){case 'boolean':return olympe.D.Ac(a);case 'number':return olympe.D.ya(a);case 'string':return olympe.D.Bb(a);case 'object':if(a instanceof Date)return olympe.D.Mx(a)}return a};
666
- olympe.dc.W.Sb.IC=a=>{switch(a){case olympe.D.qa:return olympe.dc.W.Sb.Om;case olympe.D.Wa:return olympe.dc.W.Sb.Rm;case olympe.D.ea:return olympe.dc.W.Sb.Qm;case olympe.D.jb:return olympe.dc.W.Sb.Pm;case olympe.D.Color:return olympe.dc.W.Sb.Er;case olympe.dc.CloudObject:return olympe.dc.W.Sb.Fr;default:return olympe.dc.W.Sb.ih}};olympe.dc.O={va:'dc.Manager',pt:'dc.Graph',wi:'dc.DBView',Ea:'dc.Logger',$u:'dc.TransactionLogger',zi:'dc.FileServiceManager',me:'dc.Router'};olympe.dc.Config={eg:'dc.debug',$g:'dc.subscribeAll',yo:'dc.defaultSource',Oo:'dc.fileCache',Ho:'dc.errorOnAbstractInstantiation'};
667
- olympe.T.config(function(a){E(a,olympe.dc.Config.eg,!1);E(a,olympe.dc.Config.$g,!1);E(a,olympe.dc.Config.yo,olympe.dc.Ja.Vc);E(a,olympe.dc.Config.Oo,!0);E(a,olympe.dc.Config.Ho,!0);C(a,olympe.dc.O.Ea,[olympe.pa.O.va],b=>b.Nc('dc'));sa(a,olympe.dc.O.$u,olympe.dc.transaction.O.Ea);sa(a,olympe.dc.O.wi,olympe.dc.db.O.ib);B(a,olympe.dc.O.zi,olympe.dc.lt,olympe.dc.O.Ea,olympe.net.O.va,olympe.dc.O.me,olympe.W.O.zh,new olympe.T.fa(olympe.dc.Config.Oo));ta(a,olympe.dc.O.me);B(a,olympe.dc.O.va,olympe.dc.sa,
660
+ N('olympe.dc.transformers.Union',olympe.dc.X.uf);olympe.dc.X.uf.la=[olympe.dc.Wc];olympe.dc.Mg={};function $g(a,b){let c=Ac.get(b)||null,d=null;for(;!c&&b&&b!==d;){d=b;b=a.db.Bf(b);if(null===b)break;c=Ac.get(b)||null}return c||null}olympe.dc.Mg.SyncManager=class{constructor(a,b,c){this.L=a;this.db=b;this.C=c}};olympe.dc.Mg.O={Ea:'dc.syncs.Logger',va:'dc.syncs.SyncManager'};olympe.T.config(function(a){C(a,olympe.dc.Mg.O.Ea,[olympe.pa.O.va],b=>b.Nc('dc'));B(a,olympe.dc.Mg.O.va,olympe.dc.Mg.SyncManager,olympe.dc.Mg.O.Ea,olympe.dc.O.wi,olympe.T.O.dg)});olympe.dc.W={};olympe.dc.W.LC=function(a){a=olympe.dc.xa(a);const b=olympe.D.Kc(olympe.D.Wa,'getInstanceName'),c=olympe.dc.Na(),d=xd(c,a,olympe.dc.CloudObject.nameProp,b.update.bind(b));olympe.D.Ja().vc(c.F.bind(c,a,olympe.dc.CloudObject.nameProp,d));return b.Eb()};olympe.dc.W.OC=function(a){return olympe.D.Fa([a],b=>olympe.D.Xx(olympe.dc.Na().nj(b)),olympe.D.qa)};olympe.dc.W.PC=function(a){return(a=olympe.D.Ya(a))?olympe.dc.Na().nj(a):!1};olympe.dc.W.Li=class a{constructor(b=olympe.dc.Ha.Vc){this.G=b}C(b){const c=new olympe.dc.db.xc;this.F(b,c);return c}V(b,c,d){const e=new olympe.dc.db.xc(b),f=new olympe.dc.query.Di(b,this.G,c,e);this.F(d,e,(g,h)=>{h=h||[];const k=f.C.get(g)||new Set;for(const l of h)k.add(l);f.C.set(g,k)});return f}N(b,c){const d=new olympe.dc.db.xc(b),e=new olympe.dc.query.rt(b,d);this.F(c,d,(f,g,h)=>{h=h||[];const k=new hf(f);k.add=g||[];k.remove=h;e.C.set(f,k)});return e}F(b,c,d){const e=olympe.dc.$b.Kd;for(const f of b)switch(b=
661
+ 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.pc(f.t,a.C(f.p),!0,b);break;case 3:c.Jc(f.t,f.f,b);break;case 4:c.Ra(f.m,f.l,f.r,b);break;case 5:c.fc(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.Kd||b===olympe.dc.$b.VERSION){c.set(b,e);continue}else if('v'===d){c.set(olympe.dc.$b.VERSION,e);continue}let f=
662
+ typeof e;b.startsWith('fd')&&(b=olympe.dc.Ug.bc+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&&
663
+ 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.Hc(e.t));break;case 'untyped':null===e&&c.set(b,null)}}return c}};olympe.dc.W.Tb={};olympe.dc.W.Tb.Rm=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.Tb.Om=a=>'boolean'===typeof a||a instanceof Boolean?olympe.D.Ac(a):a instanceof olympe.D.qa?a:null;olympe.dc.W.Tb.Qm=a=>'number'===typeof a||a instanceof Number?olympe.D.ya(a):'string'===typeof a||a instanceof String?olympe.D.ya(Number.parseFloat(a.valueOf())):a instanceof olympe.D.ea?a:null;
664
+ olympe.dc.W.Tb.Pm=function(a){return'number'===typeof a||a instanceof Number?sb(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.Tb.Er=function(a){return a instanceof olympe.D.Color?a:'string'===typeof a||a instanceof String?wb(a.valueOf()):null};olympe.dc.W.Tb.Fr=a=>a instanceof olympe.dc.CloudObject?a:a instanceof olympe.dc.Hc?olympe.dc.CloudObject.get(a.tag):null;
665
+ olympe.dc.W.Tb.ih=a=>a instanceof olympe.dc.Hc?olympe.dc.CloudObject.get(a.tag):a;olympe.dc.W.Tb.vC=a=>{switch(typeof a){case 'boolean':return olympe.D.Ac(a);case 'number':return olympe.D.ya(a);case 'string':return olympe.D.Bb(a);case 'object':if(a instanceof Date)return olympe.D.Mx(a)}return a};
666
+ olympe.dc.W.Tb.IC=a=>{switch(a){case olympe.D.qa:return olympe.dc.W.Tb.Om;case olympe.D.Wa:return olympe.dc.W.Tb.Rm;case olympe.D.ea:return olympe.dc.W.Tb.Qm;case olympe.D.jb:return olympe.dc.W.Tb.Pm;case olympe.D.Color:return olympe.dc.W.Tb.Er;case olympe.dc.CloudObject:return olympe.dc.W.Tb.Fr;default:return olympe.dc.W.Tb.ih}};olympe.dc.O={va:'dc.Manager',pt:'dc.Graph',wi:'dc.DBView',Ea:'dc.Logger',$u:'dc.TransactionLogger',zi:'dc.FileServiceManager',me:'dc.Router'};olympe.dc.Config={eg:'dc.debug',$g:'dc.subscribeAll',yo:'dc.defaultSource',Oo:'dc.fileCache',Ho:'dc.errorOnAbstractInstantiation'};
667
+ olympe.T.config(function(a){E(a,olympe.dc.Config.eg,!1);E(a,olympe.dc.Config.$g,!1);E(a,olympe.dc.Config.yo,olympe.dc.Ha.Vc);E(a,olympe.dc.Config.Oo,!0);E(a,olympe.dc.Config.Ho,!0);C(a,olympe.dc.O.Ea,[olympe.pa.O.va],b=>b.Nc('dc'));sa(a,olympe.dc.O.$u,olympe.dc.transaction.O.Ea);sa(a,olympe.dc.O.wi,olympe.dc.db.O.ib);B(a,olympe.dc.O.zi,olympe.dc.lt,olympe.dc.O.Ea,olympe.net.O.va,olympe.dc.O.me,olympe.W.O.zh,new olympe.T.fa(olympe.dc.Config.Oo));ta(a,olympe.dc.O.me);B(a,olympe.dc.O.va,olympe.dc.sa,
668
668
  olympe.dc.O.Ea,olympe.dc.db.O.va,olympe.dc.query.O.va,olympe.dc.transaction.O.va,olympe.dc.Mg.O.va,olympe.dc.O.zi)},'olympe.dc');olympe.T.run([olympe.dc.db.O.va,olympe.dc.query.O.va,olympe.dc.transaction.O.va,olympe.dc.Mg.O.va,olympe.dc.O.va,olympe.dc.O.zi],(a,b,c,d,e,f)=>{olympe.dc.Ad=()=>a;olympe.dc.Lf=()=>b;olympe.dc.hi=()=>c;olympe.dc.Xr=()=>d;olympe.dc.Qc=()=>e;olympe.dc.zw=()=>f},'DC singleton getter initialization');olympe.dc.CloudObject=class{constructor(a,b){this.tag=b;this.db=olympe.dc.Na();this.model=null}static get(a){{var b=olympe.dc.Xr();a=olympe.dc.xa(a);const c=$g(b,b.db.model(a));null===c?(b.L.error(`Instantiation of a CloudObject (tag = '${a}') that does not exist (or incompletely exists) in the local database.\n
669
669
  This could lead to unwanted behaviour and must be fixed.
670
- 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 Nv(a,b,c=olympe.dc.Ja.mc){if('undefined'===typeof olympe.sc)throw Error('Method CloudObject.createWith should only be used at runtime, when sc package exists');const d=new olympe.sc.Transaction(!1);a=d.create(b||this,a,c);d.hb().catch(e=>olympe.pa.Xa('dc').error(`Error occurred for transaction executed by CloudObject.createWith: ${e}`));
670
+ 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 Nv(a,b,c=olympe.dc.Ha.bc){if('undefined'===typeof olympe.sc)throw Error('Method CloudObject.createWith should only be used at runtime, when sc package exists');const d=new olympe.sc.Transaction(!1);a=d.create(b||this,a,c);d.hb().catch(e=>olympe.pa.Xa('dc').error(`Error occurred for transaction executed by CloudObject.createWith: ${e}`));
671
671
  return this.get(a)}static xv(){return this.get(this)}static Yk(a){return olympe.dc.gb.Yk(a)}static rd(){return olympe.dc.Na().ub(this,olympe.dc.CloudObject.propertyRel).map(a=>new olympe.dc.ta.Property(a))}static dd(){const a=olympe.dc.Na();return a.ub(this,olympe.dc.CloudObject.G).map(b=>new olympe.dc.ta.Relation(b)).concat(a.ub(this,olympe.dc.CloudObject.V).map(b=>new olympe.dc.ta.Relation(b,olympe.dc.za.ORIGIN)))}static Jf(a){return olympe.dc.CloudObject.get(a)}static Ew(a){var b=$g(olympe.dc.Xr(),
672
672
  olympe.dc.xa(a));b=b&&b.C;return new olympe.dc.Aa(olympe.dc.xa(a),olympe.dc.CloudObject.instancesRel,b)}R(){return this.tag}name(){return this.db.name(this)}ma(){return this.Fb(olympe.dc.CloudObject.nameProp)}ph(){this.model||(this.model=olympe.dc.CloudObject.get(this.db.model(this)));return this.model}query(){return olympe.dc.gb.from(this)}Vf(){return this.db.Vf(this)}jx(){return this.db.version(this)}Mt(){return this.db.source(this)}Rr(){return olympe.D.Fa([this.ma()],a=>olympe.D.Bb(a),olympe.D.Wa,
673
- 'getDisplayName',olympe.D.Bb('('+this.toString()+')'))}Tb(){return this.model?this.model.R():this.db.model(this)}observe(a,b){const c='function'===typeof a.Ec?a.Ec():a;return new rxjs.Observable(d=>{const e=xd(this.db,this.tag,b,f=>{null===f||void 0===f?d.next(null):d.next(f)});c.vc(()=>{d.complete();this.db.F(this.tag,b,e)});return()=>this.db.F(this.tag,b,e)})}Rx(a){return this.observe(olympe.D.Ia(),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)}cw(a){return olympe.dc.ld.from(this).sb(a)}nw(){return this.cd(olympe.dc.CloudObject.cc,
674
- olympe.dc.CloudObject)}dn(){return this.ub(olympe.dc.CloudObject.containsRel,olympe.dc.CloudObject)}Mf(a,b,c){const d=olympe.D.Kc(c,'Sync valueType'),e=xd(this.db,this.tag,a,olympe.D.Ia().Cb(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}Fb(a){return L(this.Mf(a,olympe.dc.W.Sb.Rm,olympe.D.Wa))}Ie(a){return L(this.Mf(a,olympe.dc.W.Sb.Qm,olympe.D.ea))}qh(a){return L(this.Mf(a,olympe.dc.W.Sb.Om,olympe.D.qa))}kj(a){return L(this.Mf(a,
675
- olympe.dc.W.Sb.Pm,olympe.D.jb))}Wr(){return L(this.Mf(olympe.dm.Color.valueProp,olympe.dc.W.Sb.Er,olympe.D.Color))}Uw(a){return L(this.Mf(a,olympe.dc.W.Sb.Fr,olympe.dc.CloudObject))}ub(a,b){a=a instanceof olympe.dc.X.Qb?a:new olympe.dc.X.Qb(a.R(),a.Oa());return new olympe.dc.Aa(this.R(),a,b)}cd(a,b){return this.ub(a,b).Oc()}Nr(a,b){const c=this.db,d=olympe.W.lc(),e=olympe.D.Ia(),f=new Map;V(c,this.tag,a,(g,h)=>{g?(g=new olympe.D.Wb(`forEachRelated: (${this.tag})-[:${a.R()}]-(${h})`,e),f.set(h,g),
673
+ 'getDisplayName',olympe.D.Bb('('+this.toString()+')'))}Rb(){return this.model?this.model.R():this.db.model(this)}observe(a,b){const c='function'===typeof a.Ec?a.Ec():a;return new rxjs.Observable(d=>{const e=xd(this.db,this.tag,b,f=>{null===f||void 0===f?d.next(null):d.next(f)});c.vc(()=>{d.complete();this.db.F(this.tag,b,e)});return()=>this.db.F(this.tag,b,e)})}Rx(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)}cw(a){return olympe.dc.ld.from(this).sb(a)}nw(){return this.cd(olympe.dc.CloudObject.ec,
674
+ olympe.dc.CloudObject)}dn(){return this.ub(olympe.dc.CloudObject.containsRel,olympe.dc.CloudObject)}Mf(a,b,c){const d=olympe.D.Kc(c,'Sync valueType'),e=xd(this.db,this.tag,a,olympe.D.Ja().Cb(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}Fb(a){return L(this.Mf(a,olympe.dc.W.Tb.Rm,olympe.D.Wa))}Ie(a){return L(this.Mf(a,olympe.dc.W.Tb.Qm,olympe.D.ea))}qh(a){return L(this.Mf(a,olympe.dc.W.Tb.Om,olympe.D.qa))}kj(a){return L(this.Mf(a,
675
+ olympe.dc.W.Tb.Pm,olympe.D.jb))}Wr(){return L(this.Mf(olympe.dm.Color.valueProp,olympe.dc.W.Tb.Er,olympe.D.Color))}Uw(a){return L(this.Mf(a,olympe.dc.W.Tb.Fr,olympe.dc.CloudObject))}ub(a,b){a=a instanceof olympe.dc.X.Qb?a:new olympe.dc.X.Qb(a.R(),a.Oa());return new olympe.dc.Aa(this.R(),a,b)}cd(a,b){return this.ub(a,b).Oc()}Nr(a,b){const c=this.db,d=olympe.W.mc(),e=olympe.D.Ja(),f=new Map;V(c,this.tag,a,(g,h)=>{g?(g=new olympe.D.Wb(`forEachRelated: (${this.tag})-[:${a.R()}]-(${h})`,e),f.set(h,g),
676
676
  g.run(b,olympe.dc.CloudObject.get(h))):f.has(h)&&(f.get(h).destroy(),f.delete(h))},d);e.vc(()=>{c.C(this.tag,a,d)})}wy(){return new olympe.dc.Aa(this.R(),[],Gc(this.R()))}transform(...a){return(new olympe.dc.Aa(this.R(),[],this.constructor)).transform(...a)}hd(){return this.Rr()}toString(){if(!this.db.Gb(this.tag))return`unknown object #${this.tag||'NULL_TAG'}`;const a=this.db.model(this.tag);var b=this.db.name(this);b=b?` instanceName: '${b}'`:'';return a?`${this.db.name(a)}#${this.tag}${b}`:`orphan object (no model) #${this.tag}${b}`}toJSON(){if(!this.db.Gb(this.tag))return{CloudObject:'Unknown tag'};
677
- 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})`}}qb(a){return a instanceof olympe.dc.CloudObject?this.R()===a.R():!1}Td(a){return olympe.D.Fa([a],b=>olympe.D.Ac(this.qb(b)),olympe.D.qa)}Pv(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.za.ORIGIN;for(const [e,f,g]of Ad(b,this))f===d?a.ec(e,g,this):e!==olympe.dc.CloudObject.modelRel.R()&&a.ec(e,this,g);a.delete(this,
678
- olympe.dc.Rb.NONE);c&&a.hb()}};olympe.dc.CloudObject.prototype.equals=olympe.dc.CloudObject.prototype.qb;olympe.dc.CloudObject.prototype.followSingle=olympe.dc.CloudObject.prototype.cw;olympe.dc.CloudObject.prototype.follow=olympe.dc.CloudObject.prototype.sb;olympe.dc.CloudObject.prototype.getProperty=olympe.dc.CloudObject.prototype.fb;olympe.dc.CloudObject.prototype.get=olympe.dc.CloudObject.prototype.get;olympe.dc.CloudObject.prototype.observeProperty=olympe.dc.CloudObject.prototype.Rx;
679
- 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.Vf;olympe.dc.CloudObject.prototype.query=olympe.dc.CloudObject.prototype.query;olympe.dc.CloudObject.prototype.getModel=olympe.dc.CloudObject.prototype.ph;olympe.dc.CloudObject.prototype.name=olympe.dc.CloudObject.prototype.name;
677
+ 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})`}}qb(a){return a instanceof olympe.dc.CloudObject?this.R()===a.R():!1}Ud(a){return olympe.D.Fa([a],b=>olympe.D.Ac(this.qb(b)),olympe.D.qa)}Pv(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.za.ORIGIN;for(const [e,f,g]of Ad(b,this))f===d?a.fc(e,g,this):e!==olympe.dc.CloudObject.modelRel.R()&&a.fc(e,this,g);a.delete(this,
678
+ olympe.dc.Sb.NONE);c&&a.hb()}};olympe.dc.CloudObject.prototype.equals=olympe.dc.CloudObject.prototype.qb;olympe.dc.CloudObject.prototype.followSingle=olympe.dc.CloudObject.prototype.cw;olympe.dc.CloudObject.prototype.follow=olympe.dc.CloudObject.prototype.sb;olympe.dc.CloudObject.prototype.getProperty=olympe.dc.CloudObject.prototype.fb;olympe.dc.CloudObject.prototype.get=olympe.dc.CloudObject.prototype.get;olympe.dc.CloudObject.prototype.observeProperty=olympe.dc.CloudObject.prototype.Rx;
679
+ olympe.dc.CloudObject.prototype.observe=olympe.dc.CloudObject.prototype.observe;olympe.dc.CloudObject.prototype.getModelTag=olympe.dc.CloudObject.prototype.Rb;olympe.dc.CloudObject.prototype.isPersisted=olympe.dc.CloudObject.prototype.Vf;olympe.dc.CloudObject.prototype.query=olympe.dc.CloudObject.prototype.query;olympe.dc.CloudObject.prototype.getModel=olympe.dc.CloudObject.prototype.ph;olympe.dc.CloudObject.prototype.name=olympe.dc.CloudObject.prototype.name;
680
680
  olympe.dc.CloudObject.prototype.getTag=olympe.dc.CloudObject.prototype.R;olympe.dc.CloudObject.getInstancesOf=olympe.dc.CloudObject.Ew;olympe.dc.CloudObject.getInstance=olympe.dc.CloudObject.Jf;olympe.dc.CloudObject.getRelations=olympe.dc.CloudObject.dd;olympe.dc.CloudObject.getProperties=olympe.dc.CloudObject.rd;olympe.dc.CloudObject.instancesOf=olympe.dc.CloudObject.Yk;olympe.dc.CloudObject.asInstance=olympe.dc.CloudObject.xv;olympe.dc.CloudObject.createWith=olympe.dc.CloudObject.Nv;
681
681
  olympe.dc.CloudObject.get=olympe.dc.CloudObject.get;olympe.dc.CloudObject.P=olympe.dc.Ba.C('ff021000000000000001',olympe.dc.CloudObject);olympe.dc.CloudObject.ji=olympe.dc.CloudObject.P.Ca(olympe.dc.$b.VERSION);olympe.dc.CloudObject.nameProp=olympe.dc.CloudObject.P.Ca('ff023000000000000011');z('olympe.dc.CloudObject.nameProp',olympe.dc.CloudObject.nameProp);olympe.dc.CloudObject.Z=olympe.dc.CloudObject.P.Ca('ff023000000000000012');olympe.dc.CloudObject.G=olympe.dc.CloudObject.P.Pa('ff02200000000000000a');
682
682
  olympe.dc.CloudObject.V=olympe.dc.CloudObject.P.Pa('ff02200000000000000b',olympe.dc.za.ORIGIN);olympe.dc.CloudObject.Pf=olympe.dc.CloudObject.P.Pa('017e9c4ba4c847d71cbf');olympe.dc.CloudObject.Ve=olympe.dc.CloudObject.P.Pa('017ea013caf8e89cedb2');olympe.dc.CloudObject.propertyRel=olympe.dc.CloudObject.P.Pa('ff02200000000000000c');z('olympe.dc.CloudObject.propertyRel',olympe.dc.CloudObject.propertyRel);olympe.dc.CloudObject.typeRel=olympe.dc.CloudObject.P.Pa('ff02200000000000000d',olympe.dc.za.ORIGIN);
683
- olympe.dc.CloudObject.modelRel=olympe.dc.CloudObject.P.Pa(olympe.dc.ic.Tc);z('olympe.dc.CloudObject.modelRel',olympe.dc.CloudObject.modelRel);olympe.dc.CloudObject.instancesRel=P(olympe.dc.CloudObject.P,olympe.dc.CloudObject.modelRel);z('olympe.dc.CloudObject.instancesRel',olympe.dc.CloudObject.instancesRel);olympe.dc.CloudObject.extendRel=olympe.dc.CloudObject.P.Pa(olympe.dc.ic.yi);z('olympe.dc.CloudObject.extendRel',olympe.dc.CloudObject.extendRel);
684
- olympe.dc.CloudObject.extendedByRel=P(olympe.dc.CloudObject.P,olympe.dc.CloudObject.extendRel);z('olympe.dc.CloudObject.extendedByRel',olympe.dc.CloudObject.extendedByRel);olympe.dc.CloudObject.containsRel=olympe.dc.CloudObject.P.Pa(olympe.dc.ic.ko);z('olympe.dc.CloudObject.containsRel',olympe.dc.CloudObject.containsRel);olympe.dc.CloudObject.cc=P(olympe.dc.CloudObject.P,olympe.dc.CloudObject.containsRel);olympe.dc.bB=olympe.dc.CloudObject;olympe.dc.CloudObject.la=[olympe.dc.ze];m=olympe.dc.CloudObject.prototype;
685
- m.R.K=new olympe.D.J(()=>String,[]);m.name.K=new olympe.D.J(()=>String,[]);m.ma.K=olympe.D.J.F;m.ph.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.jx.K=new olympe.D.J(()=>Number,[]);m.Mt.K=new olympe.D.J(()=>String,[]);m.Rr.K=olympe.D.J.F;m.Tb.K=new olympe.D.J(()=>String,[]);m.nw.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.dn.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.Mf.K=new olympe.D.J(()=>olympe.D.Node,[]);m.Fb.K=olympe.D.J.F;m.Ie.K=olympe.D.J.G;m.qh.K=olympe.D.J.V;
686
- m.kj.K=new olympe.D.J(()=>olympe.D.jb,[]);m.Wr.K=new olympe.D.J(()=>olympe.D.Color,[]);m.Uw.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.ub.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.cd.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Nr.K=new olympe.D.J(()=>{},[]);m.wy.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.transform.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.hd.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.V;m.Pv.K=new olympe.D.J(()=>{},[]);olympe.dc.gk=class{constructor(a){this.instance=a}R(){return this.instance.R()}mj(){return nb(this.instance.qh(olympe.dc.CloudObject.Z))}xw(){return this.instance.cd(olympe.dc.CloudObject.extendRel,olympe.dc.CloudObject)}gn(){return this.instance.transform(new olympe.dc.X.Dc(olympe.dc.CloudObject.extendRel.R(),olympe.dc.za.DESTINATION,olympe.dc.X.sk.ht))}kn(){return this.instance.transform(new olympe.dc.X.Dc(olympe.dc.CloudObject.extendRel.R(),olympe.dc.za.DESTINATION,olympe.dc.X.sk.wp))}rd(){return this.kn().transform(olympe.dc.CloudObject.propertyRel,
683
+ olympe.dc.CloudObject.modelRel=olympe.dc.CloudObject.P.Pa(olympe.dc.jc.Tc);z('olympe.dc.CloudObject.modelRel',olympe.dc.CloudObject.modelRel);olympe.dc.CloudObject.instancesRel=P(olympe.dc.CloudObject.P,olympe.dc.CloudObject.modelRel);z('olympe.dc.CloudObject.instancesRel',olympe.dc.CloudObject.instancesRel);olympe.dc.CloudObject.extendRel=olympe.dc.CloudObject.P.Pa(olympe.dc.jc.yi);z('olympe.dc.CloudObject.extendRel',olympe.dc.CloudObject.extendRel);
684
+ olympe.dc.CloudObject.extendedByRel=P(olympe.dc.CloudObject.P,olympe.dc.CloudObject.extendRel);z('olympe.dc.CloudObject.extendedByRel',olympe.dc.CloudObject.extendedByRel);olympe.dc.CloudObject.containsRel=olympe.dc.CloudObject.P.Pa(olympe.dc.jc.ko);z('olympe.dc.CloudObject.containsRel',olympe.dc.CloudObject.containsRel);olympe.dc.CloudObject.ec=P(olympe.dc.CloudObject.P,olympe.dc.CloudObject.containsRel);olympe.dc.bB=olympe.dc.CloudObject;olympe.dc.CloudObject.la=[olympe.dc.ze];m=olympe.dc.CloudObject.prototype;
685
+ m.R.K=new olympe.D.J(()=>String,[]);m.name.K=new olympe.D.J(()=>String,[]);m.ma.K=olympe.D.J.F;m.ph.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.jx.K=new olympe.D.J(()=>Number,[]);m.Mt.K=new olympe.D.J(()=>String,[]);m.Rr.K=olympe.D.J.F;m.Rb.K=new olympe.D.J(()=>String,[]);m.nw.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.dn.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.Mf.K=new olympe.D.J(()=>olympe.D.Node,[]);m.Fb.K=olympe.D.J.F;m.Ie.K=olympe.D.J.G;m.qh.K=olympe.D.J.V;
686
+ m.kj.K=new olympe.D.J(()=>olympe.D.jb,[]);m.Wr.K=new olympe.D.J(()=>olympe.D.Color,[]);m.Uw.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.ub.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.cd.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Nr.K=new olympe.D.J(()=>{},[]);m.wy.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.transform.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.hd.K=olympe.D.J.F;m.toString.K=olympe.D.J.C;m.qb.K=olympe.D.J.C;m.Ud.K=olympe.D.J.V;m.Pv.K=new olympe.D.J(()=>{},[]);olympe.dc.gk=class{constructor(a){this.instance=a}R(){return this.instance.R()}mj(){return nb(this.instance.qh(olympe.dc.CloudObject.Z))}xw(){return this.instance.cd(olympe.dc.CloudObject.extendRel,olympe.dc.CloudObject)}gn(){return this.instance.transform(new olympe.dc.X.Dc(olympe.dc.CloudObject.extendRel.R(),olympe.dc.za.DESTINATION,olympe.dc.X.sk.ht))}kn(){return this.instance.transform(new olympe.dc.X.Dc(olympe.dc.CloudObject.extendRel.R(),olympe.dc.za.DESTINATION,olympe.dc.X.sk.wp))}rd(){return this.kn().transform(olympe.dc.CloudObject.propertyRel,
687
687
  new olympe.dc.X.xe)}Nw(){return this.instance.transform(olympe.dc.CloudObject.propertyRel)}dd(){return this.kn().transform(olympe.dc.CloudObject.G,new olympe.dc.X.xe)}Ow(){return this.instance.transform(olympe.dc.CloudObject.G)}static from(a){return olympe.D.Fa([a],b=>{const c=b.R(),d=olympe.dc.Na();if(!d.nj(c))throw Error(`Instance "${d.name(c)}" (tag=${c}) is not a model.`);return new olympe.dc.gk(b)},olympe.dc.gk,'transformToModelInfo')}static mj(){return nb((void 0).qh(olympe.dc.CloudObject.Z))}};
688
688
  olympe.dc.gk.la=[olympe.dc.ze];m=olympe.dc.gk.prototype;m.xw.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.gn.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.kn.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.rd.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.Nw.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.dd.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.Ow.K=new olympe.D.J(()=>olympe.dc.Aa,[]);olympe.dc.iA=class{};olympe.dc.ba={};olympe.dc.ba.Ap=class{constructor(a){this.L=a}};olympe.dc.ba.Ap.od={Si:0,AA:1,BA:3,kA:4};olympe.dc.ba.$j=class{};function Y(a){if(a.Z)throw Error('Cannot modify definition after definition is written');}
689
- olympe.dc.ba.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.P.R();this.Da=new Map;this.ra=new Map;this.Z=this.ka=!1;this.V=null}Gn(a){Y(this);this.aa=a;return this}Tb(){return this.aa}xj(a){Y(this);
689
+ olympe.dc.ba.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.P.R();this.Da=new Map;this.ra=new Map;this.Z=this.ka=!1;this.V=null}Gn(a){Y(this);this.aa=a;return this}Rb(){return this.aa}xj(a){Y(this);
690
690
  this.V=a;return this}ky(){this.ka=!0;return this}jy(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}li(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}il(a){Y(this);const b=olympe.dc.CloudObject.nameProp.R();this.F.set(b,a);return this}Ar(a,b){Y(this);if(!a)throw Error('Cannot relate an object to another without a relation tag');
691
691
  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}Km(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.ra.set(a+'.'+b,[a,b]);return this}done(){if(this.Z)return this;const a=ah(this.C,this.ka);a.F(this.tag,this.F,
692
- -1);bh(this.C,this);a.Ra(olympe.dc.ic.Tc,this.tag,this.aa,-1);this.V&&a.Ra(olympe.dc.ic.ko,this.V,this.tag,-1);this.G(-1);this.Da.forEach(b=>{a.Ra(b[0],this.tag,b[1],-1)});this.ra.forEach(b=>{a.Ra(b[0],b[1],this.tag,-1)});this.Z=!0;this.C.C=void 0;return this}G(){}R(){return this.tag}ma(){return this.F.get('ff023000000000000011')}};olympe.dc.ba.Zb.prototype.getName=olympe.dc.ba.Zb.prototype.ma;olympe.dc.ba.Zb.prototype.getTag=olympe.dc.ba.Zb.prototype.R;olympe.dc.ba.Zb.prototype.done=olympe.dc.ba.Zb.prototype.done;
692
+ -1);bh(this.C,this);a.Ra(olympe.dc.jc.Tc,this.tag,this.aa,-1);this.V&&a.Ra(olympe.dc.jc.ko,this.V,this.tag,-1);this.G(-1);this.Da.forEach(b=>{a.Ra(b[0],this.tag,b[1],-1)});this.ra.forEach(b=>{a.Ra(b[0],b[1],this.tag,-1)});this.Z=!0;this.C.C=void 0;return this}G(){}R(){return this.tag}ma(){return this.F.get('ff023000000000000011')}};olympe.dc.ba.Zb.prototype.getName=olympe.dc.ba.Zb.prototype.ma;olympe.dc.ba.Zb.prototype.getTag=olympe.dc.ba.Zb.prototype.R;olympe.dc.ba.Zb.prototype.done=olympe.dc.ba.Zb.prototype.done;
693
693
  olympe.dc.ba.Zb.prototype.addRelationFrom=olympe.dc.ba.Zb.prototype.Km;olympe.dc.ba.Zb.prototype.addRelationTo=olympe.dc.ba.Zb.prototype.Ar;olympe.dc.ba.Zb.prototype.setName=olympe.dc.ba.Zb.prototype.il;olympe.dc.ba.Zb.prototype.setProperty=olympe.dc.ba.Zb.prototype.setProperty;olympe.dc.ba.Zb.prototype.setProperties=olympe.dc.ba.Zb.prototype.li;olympe.dc.ba.Zb.prototype.setNameOrProperties=olympe.dc.ba.Zb.prototype.jy;olympe.dc.ba.Zb.prototype.setOptional=olympe.dc.ba.Zb.prototype.ky;
694
- olympe.dc.ba.Zb.prototype.setContainedIn=olympe.dc.ba.Zb.prototype.xj;olympe.dc.ba.Zb.prototype.setModelTag=olympe.dc.ba.Zb.prototype.Gn;olympe.dc.ba.Zc=class extends olympe.dc.ba.Zb{constructor(a,b){super(a,b);this.Sa=this.C.OBJECT;this.ab=new Map;this.bb=new Map}ps(a){Y(this);this.Sa=a;return this}extends(a){return this.ps(a)}Vi(){Y(this);this.setProperty(olympe.dc.CloudObject.Z.R(),!0);return this}defineProperty(a,b,c,d){Y(this);this.ab.set(a,new olympe.dc.ba.Zc.Property(a,b,c,d));void 0!==d&&super.setProperty(olympe.dc.Ug.mc+a,d);return this}jh(a,b,c,d,e,{Yi:f=0,tj:g=olympe.dm.Relation.N,wj:h=0,kl:k=d,Nk:l=olympe.dm.Rc.NONE}={}){Y(this);
694
+ olympe.dc.ba.Zb.prototype.setContainedIn=olympe.dc.ba.Zb.prototype.xj;olympe.dc.ba.Zb.prototype.setModelTag=olympe.dc.ba.Zb.prototype.Gn;olympe.dc.ba.Zc=class extends olympe.dc.ba.Zb{constructor(a,b){super(a,b);this.Sa=this.C.OBJECT;this.ab=new Map;this.bb=new Map}ps(a){Y(this);this.Sa=a;return this}extends(a){return this.ps(a)}Vi(){Y(this);this.setProperty(olympe.dc.CloudObject.Z.R(),!0);return this}defineProperty(a,b,c,d){Y(this);this.ab.set(a,new olympe.dc.ba.Zc.Property(a,b,c,d));void 0!==d&&super.setProperty(olympe.dc.Ug.bc+a,d);return this}jh(a,b,c,d,e,{Yi:f=0,tj:g=olympe.dm.Relation.N,wj:h=0,kl:k=d,Nk:l=olympe.dm.Rc.NONE}={}){Y(this);
695
695
  b=new olympe.dc.ba.Zc.Relation(a,this.R(),b,c||'',d,e,h,k,f,g,l);this.bb.set(a,b);return this}G(a){super.G(a);ah(this.C).Ra(olympe.dc.CloudObject.extendRel.R(),this.tag,this.Sa,a);this.ab.forEach(b=>{const c={[olympe.dc.CloudObject.nameProp.R()]:b.name||''},d=olympe.dc.xa(olympe.dm.Property),e=olympe.dc.CloudObject.propertyRel.R(),f=b.tag;this.C.push();this.C.yh(f,d).li(c).done();this.C.pop();b=b.type;ah(this.C).Ra(e,this.R(),f,a);ah(this.C).Ra(olympe.dm.Property.typeRel.R(),f,b,a)});this.bb.forEach(b=>
696
696
  {this.C.jh(b.C,b.G,b.F,b.name,b.Mr,b.Kr,{wj:b.wj,kl:b.kl,Yi:b.Yi,tj:b.tj,Nk:b.Nk},a)})}};olympe.dc.ba.Zc.prototype.defineRelation=olympe.dc.ba.Zc.prototype.jh;olympe.dc.ba.Zc.prototype.defineProperty=olympe.dc.ba.Zc.prototype.defineProperty;olympe.dc.ba.Zc.prototype['abstract']=olympe.dc.ba.Zc.prototype.Vi;olympe.dc.ba.Zc.prototype['extends']=olympe.dc.ba.Zc.prototype.extends;olympe.dc.ba.Zc.prototype.setParentTag=olympe.dc.ba.Zc.prototype.ps;
697
697
  olympe.dc.ba.Zc.Property=class{constructor(a,b,c,d){this.tag=a;this.type=b;this.name=c||'';this.defaultValue=d}};olympe.dc.ba.Zc.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.wj=g;this.kl=h;this.Yi=k;this.tj=l;this.Nk=n}};function ah(a,b){return b?a.Z:a.F}function bh(a,b){0<a.N.length&&(b.V||a.F.Ra(olympe.dc.CloudObject.containsRel.R(),a.N[a.N.length-1].R(),b.R(),-1))}
698
- olympe.dc.ba.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.wd(!0);this.Z=new olympe.dc.transaction.wd(!0);this.L=a||null;this.Da=!1;this.G=null;this.ra=new Map;this.aa=null;this.ka=Object.create(null);this.C=void 0;this.N=[];this.V=!0;this.js=/eval \(eval at process .*<anonymous>:(\d+):(\d+)\)/m;this.DEFAULT=olympe.dc.Ug.mc;this.OBJECT=olympe.dc.CloudObject.P.R();
698
+ olympe.dc.ba.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.wd(!0);this.Z=new olympe.dc.transaction.wd(!0);this.L=a||null;this.Da=!1;this.G=null;this.ra=new Map;this.aa=null;this.ka=Object.create(null);this.C=void 0;this.N=[];this.V=!0;this.js=/eval \(eval at process .*<anonymous>:(\d+):(\d+)\)/m;this.DEFAULT=olympe.dc.Ug.bc;this.OBJECT=olympe.dc.CloudObject.P.R();
699
699
  this.PROPERTY=olympe.dm.Property.P.R();this.RELATION=olympe.dm.Relation.P.R();this.STRING=olympe.dm.String.P.R();this.BOOLEAN=olympe.dm.Boolean.P.R();this.NUMBER=olympe.dm.Number.P.R();this.DATETIME=olympe.dm.DateTime.P.R();this.COLOR=olympe.dm.Color.P.R();this.FILE=olympe.dm.File.P.R();this.ROLE=olympe.dm.$c.P.R();this.USER=olympe.dm.User.P.R();this.ONE_ONE=olympe.dm.Relation.F.mu;this.ONE_MANY=olympe.dm.Relation.F.fm;this.MANY_ONE=olympe.dm.Relation.F.eu;this.MANY_MANY=olympe.dm.Relation.F.$l;this.NONE=
700
700
  olympe.dm.Rc.NONE;this.DESTINATION_READ=olympe.dm.Rc.Us;this.DESTINATION_CREATE=olympe.dm.Rc.Bo;this.DESTINATION_WRITE=olympe.dm.Rc.Vs;this.DESTINATION_DELETE=olympe.dm.Rc.Rs;this.DESTINATION_LINK=olympe.dm.Rc.Ts;this.DESTINATION_FULL=olympe.dm.Rc.Ss;this.ORIGIN_READ=olympe.dm.Rc.qu;this.ORIGIN_CREATE=olympe.dm.Rc.nu;this.ORIGIN_WRITE=olympe.dm.Rc.ru;this.ORIGIN_DELETE=olympe.dm.Rc.ou;this.ORIGIN_LINK=olympe.dm.Rc.hq;this.ORIGIN_FULL=olympe.dm.Rc.pu;this.FULL=olympe.dm.Rc.jt;this.DUMP_IGNORE=olympe.dm.Relation.C.rp;
701
- this.DUMP_REF=olympe.dm.Relation.C.Bq;this.DUMP_REVERSE_REF=olympe.dm.Relation.C.Ju;this.DUMP_UNILATERAL=olympe.dm.Relation.C.Ck;this.DUMP_REVERSE_UNILATERAL=olympe.dm.Relation.C.rk;this.DUMP_EVERYTHING=olympe.dm.Relation.C.Io;this.DUMP_DEFAULT=olympe.dm.Relation.C.mc;this.DUMP_REV_DEFAULT=olympe.dm.Relation.C.Iu;this.DELETE_REF=this.DUMP_BOTH_REF=olympe.dm.Relation.C.tl;this.DELETE_REF_AND_DESTINATION=olympe.dm.Relation.C.Fu;this.DELETE_REF_AND_ORIGIN=olympe.dm.Relation.C.Gu;this.DELETE_EVERYTHING=
701
+ this.DUMP_REF=olympe.dm.Relation.C.Bq;this.DUMP_REVERSE_REF=olympe.dm.Relation.C.Ju;this.DUMP_UNILATERAL=olympe.dm.Relation.C.Ck;this.DUMP_REVERSE_UNILATERAL=olympe.dm.Relation.C.rk;this.DUMP_EVERYTHING=olympe.dm.Relation.C.Io;this.DUMP_DEFAULT=olympe.dm.Relation.C.bc;this.DUMP_REV_DEFAULT=olympe.dm.Relation.C.Iu;this.DELETE_REF=this.DUMP_BOTH_REF=olympe.dm.Relation.C.tl;this.DELETE_REF_AND_DESTINATION=olympe.dm.Relation.C.Fu;this.DELETE_REF_AND_ORIGIN=olympe.dm.Relation.C.Gu;this.DELETE_EVERYTHING=
702
702
  olympe.dm.Relation.C.Io;this.OLYMPE_AUTHENTICATED_USERS=olympe.dm.$c.F}push(){this.N.push(this.C);this.C=void 0}pop(){if(this.C)throw Error('Cannot unstack definition: current definition not closed');this.C=this.N.pop()}$v(){const a=new Map,b=olympe.dc.ba.Tu.C(this.aa,this.F,this.Z);for(const [c,d]of b.entries())a.set(c,d.Aj());return a}Xw(){return this.aa}iy(a){this.V=a}log(...a){this.V&&this.L&&this.L.log(...a)}xn(...a){this.V&&this.L&&this.L.debug(...a)}vx(...a){this.V&&this.L&&this.L.warn(...a)}bl(...a){this.V&&
703
703
  this.L&&this.L.error(...a)}zv(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.ej():olympe.W.Vw(this.G);this.log('Generating new tag to replace '+a+'. New tag is: '+this.G);return this.G}ln(a){const b=this.ra.get(a)||1,c=olympe.W.ln(a,b);this.ra.set(a,b+1);return c}oy(a){this.Da=a}Rv(){}my(a){this.aa=a}yh(a,b){return(new olympe.dc.ba.Zb(this,a)).Gn(b)}Jx(a,b){return(new olympe.dc.ba.Zc(this,
704
- a)).il(b)}Ix(a,b){return(new olympe.dc.ba.Zc(this,a)).il(b).Vi()}Kx(a){return new olympe.dc.ba.vf(this,a)}dl(a,b,c){this.F.Ra(a,b,c,-1)}defineProperty(a,b,c,d,e){this.xn('Defining property ',d,' on model ',a);d={[olympe.dc.CloudObject.nameProp.R()]:d||''};void 0!==e&&this.pc(a,{[olympe.dc.Ug.mc+c]:e});this.C?(this.push(),this.yh(c,olympe.dm.Property.P.R()).li(d).done(),this.pop()):this.yh(c,olympe.dm.Property.P.R()).li(d).xj(a).done();this.dl(olympe.dc.CloudObject.propertyRel.R(),a,c);this.dl(olympe.dm.Property.typeRel.R(),
704
+ a)).il(b)}Ix(a,b){return(new olympe.dc.ba.Zc(this,a)).il(b).Vi()}Kx(a){return new olympe.dc.ba.vf(this,a)}dl(a,b,c){this.F.Ra(a,b,c,-1)}defineProperty(a,b,c,d,e){this.xn('Defining property ',d,' on model ',a);d={[olympe.dc.CloudObject.nameProp.R()]:d||''};void 0!==e&&this.pc(a,{[olympe.dc.Ug.bc+c]:e});this.C?(this.push(),this.yh(c,olympe.dm.Property.P.R()).li(d).done(),this.pop()):this.yh(c,olympe.dm.Property.P.R()).li(d).xj(a).done();this.dl(olympe.dc.CloudObject.propertyRel.R(),a,c);this.dl(olympe.dm.Property.typeRel.R(),
705
705
  c,b)}jh(a,b,c,d,e,f,{Yi:g=olympe.dm.Relation.F.fm,tj:h=olympe.dm.Relation.N,wj:k=0,kl:l=e,Nk:n=olympe.dm.Rc.NONE}={},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=olympe.dm.Relation;d={[olympe.dc.CloudObject.nameProp.R()]:d||
706
- '',[q.Nm.R()]:g,[q.Cn.R()]:h,[q.Xm.R()]:e,[q.Wm.R()]:f,[q.hl.R()]:k,[q.qs.R()]:l,[q.Av.R()]:n};this.C?(this.push(),this.yh(a,q.P.R()).li(d).done(),this.pop()):this.yh(a,q.P.R()).li(d).xj(b).done();this.F.Ra(q.originModelRel.R(),b,a,p);this.F.Ra(q.destinationModelRel.R(),a,c,p)}tx(a,b){this.F.Ra(olympe.dm.$c.C.R(),a,b,-1)}pc(a,b,c=!1){this.xn('Updating instance ',a);delete b[olympe.dc.$b.Jd];delete b[olympe.dc.$b.VERSION];const d=new Map;Object.keys(b).forEach(e=>{d.set(e,b[e])});this.F.pc(a,d,c,-1)}assign(a,
706
+ '',[q.Nm.R()]:g,[q.Cn.R()]:h,[q.Xm.R()]:e,[q.Wm.R()]:f,[q.hl.R()]:k,[q.qs.R()]:l,[q.Av.R()]:n};this.C?(this.push(),this.yh(a,q.P.R()).li(d).done(),this.pop()):this.yh(a,q.P.R()).li(d).xj(b).done();this.F.Ra(q.originModelRel.R(),b,a,p);this.F.Ra(q.destinationModelRel.R(),a,c,p)}tx(a,b){this.F.Ra(olympe.dm.$c.C.R(),a,b,-1)}pc(a,b,c=!1){this.xn('Updating instance ',a);delete b[olympe.dc.$b.Kd];delete b[olympe.dc.$b.VERSION];const d=new Map;Object.keys(b).forEach(e=>{d.set(e,b[e])});this.F.pc(a,d,c,-1)}assign(a,
707
707
  b,c){this.dl(b,a,c)}yv(a,b,c){this.Z.Ra(b,a,c,-1)}Mv(a){return new olympe.dc.Hc(a)}Hv(a,b,c,d){const e={c:7};e.r=a;e.g=b;e.b=c;e.a=d;return e}Iv({year:a=1970,month:b=1,day:c=1,hour:d=1,minute:e=0,second:f=0,RC:g=0,cD: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}ew(a){a=new Date(Date.parse(a));const b={c:4};b.y=a.getFullYear();b.M=a.getMonth()+1;b.d=a.getDate();b.h=a.getHours();b.m=a.getMinutes();b.s=a.getSeconds();b.S=a.getMilliseconds();b.z=-a.getTimezoneOffset();
708
- return b}Jv(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}dj(a,b,c){return olympe.auth.Hb.Ee.dj(a,c)}Pr(a,b){return olympe.auth.Hb.Ee.dj(a,b)}ec(){throw Error('DeleteRelation method on OSaveFile is deprecated');}Jc(){throw Error('DeleteInstance method on OSaveFile is deprecated');}};
709
- olympe.dc.ba.Qa.prototype.deleteInstance=olympe.dc.ba.Qa.prototype.Jc;olympe.dc.ba.Qa.prototype.deleteRelation=olympe.dc.ba.Qa.prototype.ec;olympe.dc.ba.Qa.prototype.generateAuthenticationData=olympe.dc.ba.Qa.prototype.Pr;olympe.dc.ba.Qa.prototype.generateAuthData=olympe.dc.ba.Qa.prototype.dj;olympe.dc.ba.Qa.prototype.createDateTimeLegacy=olympe.dc.ba.Qa.prototype.Jv;olympe.dc.ba.Qa.prototype.fromISODate=olympe.dc.ba.Qa.prototype.ew;olympe.dc.ba.Qa.prototype.createDateTime=olympe.dc.ba.Qa.prototype.Iv;
708
+ return b}Jv(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}dj(a,b,c){return olympe.auth.Hb.Ee.dj(a,c)}Pr(a,b){return olympe.auth.Hb.Ee.dj(a,b)}fc(){throw Error('DeleteRelation method on OSaveFile is deprecated');}Jc(){throw Error('DeleteInstance method on OSaveFile is deprecated');}};
709
+ olympe.dc.ba.Qa.prototype.deleteInstance=olympe.dc.ba.Qa.prototype.Jc;olympe.dc.ba.Qa.prototype.deleteRelation=olympe.dc.ba.Qa.prototype.fc;olympe.dc.ba.Qa.prototype.generateAuthenticationData=olympe.dc.ba.Qa.prototype.Pr;olympe.dc.ba.Qa.prototype.generateAuthData=olympe.dc.ba.Qa.prototype.dj;olympe.dc.ba.Qa.prototype.createDateTimeLegacy=olympe.dc.ba.Qa.prototype.Jv;olympe.dc.ba.Qa.prototype.fromISODate=olympe.dc.ba.Qa.prototype.ew;olympe.dc.ba.Qa.prototype.createDateTime=olympe.dc.ba.Qa.prototype.Iv;
710
710
  olympe.dc.ba.Qa.prototype.createColor=olympe.dc.ba.Qa.prototype.Hv;olympe.dc.ba.Qa.prototype.createReference=olympe.dc.ba.Qa.prototype.Mv;olympe.dc.ba.Qa.prototype.assignOptional=olympe.dc.ba.Qa.prototype.yv;olympe.dc.ba.Qa.prototype.assign=olympe.dc.ba.Qa.prototype.assign;olympe.dc.ba.Qa.prototype.updateInstance=olympe.dc.ba.Qa.prototype.pc;olympe.dc.ba.Qa.prototype.linkRoleToUser=olympe.dc.ba.Qa.prototype.tx;olympe.dc.ba.Qa.prototype.defineRelation=olympe.dc.ba.Qa.prototype.jh;
711
711
  olympe.dc.ba.Qa.prototype.defineProperty=olympe.dc.ba.Qa.prototype.defineProperty;olympe.dc.ba.Qa.prototype.newRelation=olympe.dc.ba.Qa.prototype.dl;olympe.dc.ba.Qa.prototype.newUser=olympe.dc.ba.Qa.prototype.Kx;olympe.dc.ba.Qa.prototype.newAbstractModel=olympe.dc.ba.Qa.prototype.Ix;olympe.dc.ba.Qa.prototype.newModel=olympe.dc.ba.Qa.prototype.Jx;olympe.dc.ba.Qa.prototype.newInstance=olympe.dc.ba.Qa.prototype.yh;olympe.dc.ba.Qa.prototype.setRootInstanceTag=olympe.dc.ba.Qa.prototype.my;
712
712
  olympe.dc.ba.Qa.prototype.disableChecks=olympe.dc.ba.Qa.prototype.Rv;olympe.dc.ba.Qa.prototype.setUseNewTags=olympe.dc.ba.Qa.prototype.oy;olympe.dc.ba.Qa.prototype.assignTag=olympe.dc.ba.Qa.prototype.zv;olympe.dc.ba.Qa.prototype.logError=olympe.dc.ba.Qa.prototype.bl;olympe.dc.ba.Qa.prototype.logWarn=olympe.dc.ba.Qa.prototype.vx;olympe.dc.ba.Qa.prototype.logDebug=olympe.dc.ba.Qa.prototype.xn;olympe.dc.ba.Qa.prototype.log=olympe.dc.ba.Qa.prototype.log;olympe.dc.ba.Qa.prototype.setLoggingEnabled=olympe.dc.ba.Qa.prototype.iy;
@@ -714,63 +714,63 @@ olympe.dc.ba.Qa.prototype.getRootInstanceTag=olympe.dc.ba.Qa.prototype.Xw;olympe
714
714
  this.description&&a.setProperty(olympe.sc.Cc.C.R(),this.description),this.N&&a.setProperty(olympe.sc.Cc.N.R(),this.N),a.xj(this.tag).Ar(olympe.sc.Cc.F.R(),this.tag).done(),this.C.pop()}};olympe.dc.ba.tg.prototype.setSummary=olympe.dc.ba.tg.prototype.ny;olympe.dc.ba.tg.prototype.setDescription=olympe.dc.ba.tg.prototype.fy;olympe.dc.ba.tg.prototype.setIcon=olympe.dc.ba.tg.prototype.hy;olympe.dc.ba.tg.prototype.addToFolder=olympe.dc.ba.tg.prototype.Br;olympe.dc.ba.Tu=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.wd&&d instanceof olympe.dc.transaction.wd){c=Zd(c);var e=Zd(d)}else e=new olympe.dc.transaction.wd(!0),c.Mc(e),c=Zd(e),d.Mc(e),e=Zd(e);d=new Map;var f=new a(b,c.yg,e.yg);f.Rf()||d.set('delRel',f);f=new a(b,c.Ue,e.Ue);f.Rf()||d.set('detInst',f);f=new a(b,c.Hg,e.Hg);f.Rf()||d.set('newInst',f);f=new a(b,c.$f,e.$f);f.Rf()||d.set('updateInst',f);b=new a(b,c.Ig,e.Ig);b.Rf()||
715
715
  d.set('newRel',b);return d}Rf(){return 0===this.ua.length+this.C.length}static zn(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}Aj(){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):
716
716
  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.ba.vf=class extends olympe.dc.ba.Zb{constructor(a,b){super(a,b);this.password=this.N=null;this.Gn(olympe.dc.xa(olympe.dm.User))}py(a){Y(this);this.N=a;return this}Hn(a){Y(this);this.password=a;return this}gy(){return this}Bv(a){Y(this);this.Km(olympe.dm.User.C.R(),a);return this}G(a){super.G(a);if(null==this.N||''===this.N)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=
717
- this.C.Pr(this.N,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);ah(this.C).pc(this.R(),c,!1,a)}};olympe.dc.ba.vf.prototype.awardRole=olympe.dc.ba.vf.prototype.Bv;olympe.dc.ba.vf.prototype.setDomain=olympe.dc.ba.vf.prototype.gy;olympe.dc.ba.vf.prototype.setPassword=olympe.dc.ba.vf.prototype.Hn;olympe.dc.ba.vf.prototype.setUsername=olympe.dc.ba.vf.prototype.py;olympe.dc.ba.O={At:'dc.io.IOService',Fh:'dc.io.IOUrlsProvider'};olympe.T.config(function(a){ta(a,olympe.dc.ba.O.Fh);C(a,olympe.dc.ba.O.At,[olympe.pa.O.va,olympe.net.O.va,olympe.auth.O.va,olympe.dc.ba.O.Fh],b=>new olympe.dc.ba.Ap(b.Nc('dc.io')))},'olympe.dc.io');olympe.dc.ba.QC=function(a,b,c=!1){if(a.startsWith('@')||a.startsWith('v'))return!1;a.startsWith(olympe.dc.Ug.mc)&&(a=a.substring(1));const d=olympe.dc.Na();return b?c?Cd(d,a,b):Cd(d,a,d.model(b)):d.Gb(a)};olympe.dm={};olympe.dm.Rc={NONE:0,Us:1,Bo:2,Vs:4,Rs:8,Ts:16,Ss:31,qu:32,nu:64,ru:128,ou:256,hq:512,pu:992,jt:1023};olympe.dm.$c=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}ma(){return this.Fb(olympe.dc.CloudObject.nameProp)}C(){return olympe.D.Wa.EMPTY}F(){return olympe.D.qa.C}};olympe.dm.$c.P=olympe.dc.Ba.C('ff021000000000000002',olympe.dm.$c);olympe.dm.$c.ka=olympe.dm.$c.P.Ca('ff023000000000000035');olympe.dm.$c.C=olympe.dm.$c.P.Pa('ff022000000000000005');olympe.dm.$c.F=Fc('ff011000000000000001','AUTHENTICATED_USERS');olympe.dm.$c.aa=Fc('ff011000000000000002','PROJECT_RUNNER_USERS_ROLE');
717
+ this.C.Pr(this.N,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);ah(this.C).pc(this.R(),c,!1,a)}};olympe.dc.ba.vf.prototype.awardRole=olympe.dc.ba.vf.prototype.Bv;olympe.dc.ba.vf.prototype.setDomain=olympe.dc.ba.vf.prototype.gy;olympe.dc.ba.vf.prototype.setPassword=olympe.dc.ba.vf.prototype.Hn;olympe.dc.ba.vf.prototype.setUsername=olympe.dc.ba.vf.prototype.py;olympe.dc.ba.O={At:'dc.io.IOService',Fh:'dc.io.IOUrlsProvider'};olympe.T.config(function(a){ta(a,olympe.dc.ba.O.Fh);C(a,olympe.dc.ba.O.At,[olympe.pa.O.va,olympe.net.O.va,olympe.auth.O.va,olympe.dc.ba.O.Fh],b=>new olympe.dc.ba.Ap(b.Nc('dc.io')))},'olympe.dc.io');olympe.dc.ba.QC=function(a,b,c=!1){if(a.startsWith('@')||a.startsWith('v'))return!1;a.startsWith(olympe.dc.Ug.bc)&&(a=a.substring(1));const d=olympe.dc.Na();return b?c?Cd(d,a,b):Cd(d,a,d.model(b)):d.Gb(a)};olympe.dm={};olympe.dm.Rc={NONE:0,Us:1,Bo:2,Vs:4,Rs:8,Ts:16,Ss:31,qu:32,nu:64,ru:128,ou:256,hq:512,pu:992,jt:1023};olympe.dm.$c=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}ma(){return this.Fb(olympe.dc.CloudObject.nameProp)}C(){return olympe.D.Wa.EMPTY}F(){return olympe.D.qa.C}};olympe.dm.$c.P=olympe.dc.Ba.C('ff021000000000000002',olympe.dm.$c);olympe.dm.$c.ka=olympe.dm.$c.P.Ca('ff023000000000000035');olympe.dm.$c.C=olympe.dm.$c.P.Pa('ff022000000000000005');olympe.dm.$c.F=Fc('ff011000000000000001','AUTHENTICATED_USERS');olympe.dm.$c.aa=Fc('ff011000000000000002','PROJECT_RUNNER_USERS_ROLE');
718
718
  olympe.dm.$c.N=Fc('014831d95f83635090ea','ADMIN_USERS_ROLE');olympe.dm.$c.prototype.ma.K=olympe.D.J.F;olympe.dm.$c.prototype.C.K=olympe.D.J.F;olympe.dm.$c.prototype.F.K=olympe.D.J.V;olympe.dm.User=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}Aw(){return this.hn()}ma(){return this.hn()}hn(){return this.Fb(olympe.dm.User.loginProp)}Ot(){return this.Fb(olympe.dm.User.F)}Nt(){return olympe.D.Wa.EMPTY}Zw(){return this.Fb(olympe.dm.User.saltProp)}ix(){return this.Fb(olympe.dm.User.verifierProp)}Ww(){return this.ub(olympe.dm.User.C,olympe.dm.$c)}};olympe.dm.User.P=olympe.dc.Ba.C('ff021000000000000003',olympe.dm.User);olympe.dm.User.loginProp=olympe.dm.User.P.Ca('ff023000000000000001');
719
719
  z('olympe.dm.User.loginProp',olympe.dm.User.loginProp);olympe.dm.User.F=olympe.dm.User.P.Ca('ff023000000000000002');olympe.dm.User.saltProp=olympe.dm.User.P.Ca('ff023000000000000004');z('olympe.dm.User.saltProp',olympe.dm.User.saltProp);olympe.dm.User.verifierProp=olympe.dm.User.P.Ca('ff023000000000000005');z('olympe.dm.User.verifierProp',olympe.dm.User.verifierProp);olympe.dm.User.aa=olympe.dm.User.P.Ca('ff023000000000000020');olympe.dm.User.SAMLnameIdProp=olympe.dm.User.P.Ca('ff023000000000000036');
720
- z('olympe.dm.User.SAMLnameIdProp',olympe.dm.User.SAMLnameIdProp);olympe.dm.User.C=P(olympe.dm.User.P,olympe.dm.$c.C);olympe.dm.User.ka=olympe.dm.User.P.Pa('ff022000000000000002');olympe.dm.User.N=Fc('0163d9653067b6237f62','GUEST_USER');m=olympe.dm.User.prototype;m.Aw.K=olympe.D.J.F;m.ma.K=olympe.D.J.F;m.hn.K=olympe.D.J.F;m.Ot.K=olympe.D.J.F;m.Nt.K=olympe.D.J.F;m.Zw.K=olympe.D.J.F;m.ix.K=olympe.D.J.F;m.Ww.K=new olympe.D.J(()=>olympe.dc.Aa,[]);olympe.dm.we=class extends olympe.dc.CloudObject{ka(){return this.dn()}Ab(){return this.Fb(olympe.dm.we.Sa)}};olympe.dm.we.P=olympe.dc.Ba.C('01621fb84e3300000000',olympe.dm.we);olympe.dm.we.Sa=olympe.dm.we.P.Ca('01609de3f292e3c2c6ff');olympe.dm.we.prototype.ka.K=new olympe.D.J(()=>olympe.D.nd,[]);olympe.dm.we.prototype.Ab.K=olympe.D.J.F;olympe.dm.BrickMetadata=class extends olympe.dm.we{Xb(){return this.Fb(olympe.dm.BrickMetadata.ab)}Rd(){return this.Fb(olympe.dm.BrickMetadata.bb)}C(){return null}};olympe.dm.BrickMetadata.P=Jc(olympe.dc.Ba.C('01621fb84e3500000000',olympe.dm.BrickMetadata));olympe.dm.BrickMetadata.ab=olympe.dm.BrickMetadata.P.Ca('01621fb84e320000f001');olympe.dm.BrickMetadata.bb=olympe.dm.BrickMetadata.P.Ca('01703376c4a81c0e9d94');olympe.dm.BrickMetadata.Wf=olympe.dm.BrickMetadata.P.Pa('0161ae97622bb21f335b');
721
- olympe.dm.BrickMetadata.Ab={tA:'private',tu:'public'};olympe.dm.BrickMetadata.ce=Fc('01703376c4a81c0e9d95','BRICK_STATUS');olympe.dm.BrickMetadata.od={iz:'experimental',EA:'stable',$y:'deprecated'};olympe.dm.BrickMetadata.prototype.Xb.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.Pb=class extends olympe.dm.BrickMetadata{V(){return new olympe.dc.Aa(this.R(),[new olympe.dc.X.Dc(olympe.dm.Pb.F.R(),olympe.dc.za.DESTINATION,olympe.dc.X.sk.wp,olympe.dc.X.sk.ut),olympe.dm.Pb.C])}C(){return null}F(){return this.ub(olympe.dm.Pb.F,olympe.dm.Pb)}Z(){return this.ub(olympe.dm.Pb.C)}};olympe.dm.Pb.P=olympe.dc.Ba.C('01612df1db9749227626',olympe.dm.Pb);olympe.dm.Pb.F=olympe.dm.Pb.P.Pa('016a697ef00ce7554691');olympe.dm.Pb.Xb=P(olympe.dm.Pb.P,olympe.dm.Pb.F);olympe.dm.Pb.C=olympe.dm.Pb.P.Pa('016a697ef00ce7554692');
722
- P(olympe.dc.CloudObject.P,olympe.dm.Pb.C);olympe.dm.Pb.prototype.V.K=new olympe.D.J(()=>olympe.dc.Aa,[]);olympe.dm.Pb.prototype.F.K=new olympe.D.J(()=>olympe.dc.Aa,[]);olympe.dm.Pb.prototype.Z.K=new olympe.D.J(()=>olympe.dc.Aa,[]);olympe.dm.md=class extends olympe.dm.Pb{F(){return this.R()===olympe.dm.md.Da?this.ub(olympe.dm.md.aa,olympe.dm.Pb):this.ub(olympe.dm.md.ka,olympe.dm.Pb)}};olympe.dm.md.P=olympe.dc.Ba.C('ff021000000000000020',olympe.dm.md);olympe.dm.md.ka=olympe.dm.md.P.Pa('017e9c34cf48bd6965c1');olympe.dm.md.aa=olympe.dm.md.P.Pa('017e9c2e013e06bfffd9');olympe.dm.md.Da=Fc('10000000000000000000','ROOT_OF_ROOTS');olympe.dm.md.Nd=Fc('10000000000000000001','OLYMPE_FOLDER');
723
- olympe.dm.md.prototype.F.K=new olympe.D.J(()=>olympe.dc.Aa,[]);olympe.dm.Module=class extends olympe.dc.CloudObject{yw(){return this.Fb(olympe.dm.Module.ka)}Kw(){return this.Ie(olympe.dm.Module.ra)}Pt(){return this.Fb(olympe.dm.Module.F)}Pw(){return this.Fb(olympe.dm.Module.Da)}lw(){return this.Fb(olympe.dm.Module.N)}Lw(){return this.ub(olympe.dm.Module.aa,olympe.dm.Module)}$w(){return this.ub(olympe.dm.Module.C,olympe.dm.Fd)}};olympe.dm.Module.P=olympe.dc.Ba.C('ff021000000000000040',olympe.dm.Module);olympe.dm.Module.ka=olympe.dm.Module.P.Ca('ff023000000000000042');
720
+ z('olympe.dm.User.SAMLnameIdProp',olympe.dm.User.SAMLnameIdProp);olympe.dm.User.C=P(olympe.dm.User.P,olympe.dm.$c.C);olympe.dm.User.ka=olympe.dm.User.P.Pa('ff022000000000000002');olympe.dm.User.N=Fc('0163d9653067b6237f62','GUEST_USER');m=olympe.dm.User.prototype;m.Aw.K=olympe.D.J.F;m.ma.K=olympe.D.J.F;m.hn.K=olympe.D.J.F;m.Ot.K=olympe.D.J.F;m.Nt.K=olympe.D.J.F;m.Zw.K=olympe.D.J.F;m.ix.K=olympe.D.J.F;m.Ww.K=new olympe.D.J(()=>olympe.dc.Aa,[]);olympe.dm.we=class extends olympe.dc.CloudObject{ka(){return this.dn()}Ab(){return this.Fb(olympe.dm.we.Sa)}};olympe.dm.we.P=olympe.dc.Ba.C('01621fb84e3300000000',olympe.dm.we);olympe.dm.we.Sa=olympe.dm.we.P.Ca('01609de3f292e3c2c6ff');olympe.dm.we.prototype.ka.K=new olympe.D.J(()=>olympe.D.nd,[]);olympe.dm.we.prototype.Ab.K=olympe.D.J.F;olympe.dm.BrickMetadata=class extends olympe.dm.we{Xb(){return this.Fb(olympe.dm.BrickMetadata.ab)}Sd(){return this.Fb(olympe.dm.BrickMetadata.bb)}C(){return null}};olympe.dm.BrickMetadata.P=Jc(olympe.dc.Ba.C('01621fb84e3500000000',olympe.dm.BrickMetadata));olympe.dm.BrickMetadata.ab=olympe.dm.BrickMetadata.P.Ca('01621fb84e320000f001');olympe.dm.BrickMetadata.bb=olympe.dm.BrickMetadata.P.Ca('01703376c4a81c0e9d94');olympe.dm.BrickMetadata.Wf=olympe.dm.BrickMetadata.P.Pa('0161ae97622bb21f335b');
721
+ olympe.dm.BrickMetadata.Ab={tA:'private',tu:'public'};olympe.dm.BrickMetadata.ce=Fc('01703376c4a81c0e9d95','BRICK_STATUS');olympe.dm.BrickMetadata.od={iz:'experimental',EA:'stable',$y:'deprecated'};olympe.dm.BrickMetadata.prototype.Xb.K=olympe.D.J.F;olympe.dm.BrickMetadata.prototype.Sd.K=olympe.D.J.F;olympe.dm.BrickMetadata.prototype.C.K=new olympe.D.J(()=>String,[]);olympe.dm.Pb=class extends olympe.dm.BrickMetadata{V(){return new olympe.dc.Aa(this.R(),[new olympe.dc.X.Dc(olympe.dm.Pb.F.R(),olympe.dc.za.DESTINATION,olympe.dc.X.sk.wp,olympe.dc.X.sk.ut),olympe.dm.Pb.C])}C(){return null}F(){return this.ub(olympe.dm.Pb.F,olympe.dm.Pb)}Z(){return this.ub(olympe.dm.Pb.C)}};olympe.dm.Pb.P=olympe.dc.Ba.C('01612df1db9749227626',olympe.dm.Pb);olympe.dm.Pb.F=olympe.dm.Pb.P.Pa('016a697ef00ce7554691');olympe.dm.Pb.Xb=P(olympe.dm.Pb.P,olympe.dm.Pb.F);olympe.dm.Pb.C=olympe.dm.Pb.P.Pa('016a697ef00ce7554692');
722
+ P(olympe.dc.CloudObject.P,olympe.dm.Pb.C);olympe.dm.Pb.prototype.V.K=new olympe.D.J(()=>olympe.dc.Aa,[]);olympe.dm.Pb.prototype.F.K=new olympe.D.J(()=>olympe.dc.Aa,[]);olympe.dm.Pb.prototype.Z.K=new olympe.D.J(()=>olympe.dc.Aa,[]);olympe.dm.md=class extends olympe.dm.Pb{F(){return this.R()===olympe.dm.md.Da?this.ub(olympe.dm.md.aa,olympe.dm.Pb):this.ub(olympe.dm.md.ka,olympe.dm.Pb)}};olympe.dm.md.P=olympe.dc.Ba.C('ff021000000000000020',olympe.dm.md);olympe.dm.md.ka=olympe.dm.md.P.Pa('017e9c34cf48bd6965c1');olympe.dm.md.aa=olympe.dm.md.P.Pa('017e9c2e013e06bfffd9');olympe.dm.md.Da=Fc('10000000000000000000','ROOT_OF_ROOTS');olympe.dm.md.Od=Fc('10000000000000000001','OLYMPE_FOLDER');
723
+ olympe.dm.md.prototype.F.K=new olympe.D.J(()=>olympe.dc.Aa,[]);olympe.dm.Module=class extends olympe.dc.CloudObject{yw(){return this.Fb(olympe.dm.Module.ka)}Kw(){return this.Ie(olympe.dm.Module.ra)}Pt(){return this.Fb(olympe.dm.Module.F)}Pw(){return this.Fb(olympe.dm.Module.Da)}lw(){return this.Fb(olympe.dm.Module.N)}Lw(){return this.ub(olympe.dm.Module.aa,olympe.dm.Module)}$w(){return this.ub(olympe.dm.Module.C,olympe.dm.Gd)}};olympe.dm.Module.P=olympe.dc.Ba.C('ff021000000000000040',olympe.dm.Module);olympe.dm.Module.ka=olympe.dm.Module.P.Ca('ff023000000000000042');
724
724
  olympe.dm.Module.ra=olympe.dm.Module.P.Ca('ff023000000000000043');olympe.dm.Module.F=olympe.dm.Module.P.Ca('ff023000000000000044');olympe.dm.Module.Da=olympe.dm.Module.P.Ca('ff023000000000000045');olympe.dm.Module.N=olympe.dm.Module.P.Ca('ff023000000000000046');olympe.dm.Module.creationDateProp=olympe.dm.Module.P.Ca('ff023000000000000049');olympe.dm.Module.C=olympe.dm.Module.P.Pa('ff022000000000000013');olympe.dm.Module.aa=olympe.dm.Module.P.Pa('ff022000000000000014');
725
- olympe.dm.Module.Sa=Fc('016a69b9bceabd815b77','OLYMPE_SERVER_MODULE');m=olympe.dm.Module.prototype;m.yw.K=olympe.D.J.F;m.Kw.K=olympe.D.J.G;m.Pt.K=olympe.D.J.F;m.Pw.K=olympe.D.J.F;m.lw.K=olympe.D.J.F;m.Lw.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.$w.K=new olympe.D.J(()=>olympe.dc.Aa,[]);olympe.dm.File=class extends olympe.dc.CloudObject{constructor(a,b,c,d,e){super(a,b);this.F=c;this.G=d;this.C=e}jn(){return this.Fb(olympe.dm.File.mimeTypeProp)}Sk(a,b){const c=olympe.D.Ia().Cb(a),d=b&&olympe.D.Ia().Cb(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):wc(this.F,this,e=>{this.C.G(e,c)},e=>{d&&d(e)})}cn(a,b){this.Sk(c=>{a(Ea(c))},b)}Tk(a,b){const c=olympe.D.Ia().Cb(a);b=b&&olympe.D.Ia().Cb(b);const d=this.db.fb(this,olympe.dm.File.C),
726
- 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()?wc(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.Ia().Cb(b);olympe.D.hs([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)})})}ey(){this.G.N(this.db.fb(this,olympe.dm.File.mimeTypeProp))}Ul(){return this.Fb(olympe.dm.File.urlProp)}Cp(){return this.Fb(olympe.dm.File.nameProp)}ow(){return this.kj(olympe.dm.File.creationDateProp)}Jw(){return this.kj(olympe.dm.File.modificationDateProp)}$r(){return this.qh(olympe.dm.File.C)}static Kv(a,
727
- b,c,d,e,f){d=d||'application/data';c=olympe.W.di().N(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.Ja.mc,f)}};olympe.dm.File.createFromURL=olympe.dm.File.Jr;
725
+ olympe.dm.Module.Sa=Fc('016a69b9bceabd815b77','OLYMPE_SERVER_MODULE');m=olympe.dm.Module.prototype;m.yw.K=olympe.D.J.F;m.Kw.K=olympe.D.J.G;m.Pt.K=olympe.D.J.F;m.Pw.K=olympe.D.J.F;m.lw.K=olympe.D.J.F;m.Lw.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.$w.K=new olympe.D.J(()=>olympe.dc.Aa,[]);olympe.dm.File=class extends olympe.dc.CloudObject{constructor(a,b,c,d,e){super(a,b);this.F=c;this.G=d;this.C=e}jn(){return this.Fb(olympe.dm.File.mimeTypeProp)}Sk(a,b){const c=olympe.D.Ja().Cb(a),d=b&&olympe.D.Ja().Cb(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):wc(this.F,this,e=>{this.C.G(e,c)},e=>{d&&d(e)})}cn(a,b){this.Sk(c=>{a(Ea(c))},b)}Tk(a,b){const c=olympe.D.Ja().Cb(a);b=b&&olympe.D.Ja().Cb(b);const d=this.db.fb(this,olympe.dm.File.C),
726
+ 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()?wc(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().Cb(b);olympe.D.hs([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)})})}ey(){this.G.N(this.db.fb(this,olympe.dm.File.mimeTypeProp))}Ul(){return this.Fb(olympe.dm.File.urlProp)}Cp(){return this.Fb(olympe.dm.File.nameProp)}ow(){return this.kj(olympe.dm.File.creationDateProp)}Jw(){return this.kj(olympe.dm.File.modificationDateProp)}$r(){return this.qh(olympe.dm.File.C)}static Kv(a,
727
+ b,c,d,e,f){d=d||'application/data';c=olympe.W.di().N(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.Ha.bc,f)}};olympe.dm.File.createFromURL=olympe.dm.File.Jr;
728
728
  olympe.dm.File.createFromContent=olympe.dm.File.Kv;olympe.dm.File.prototype.saveAs=olympe.dm.File.prototype.ey;olympe.dm.File.prototype.getContentUrl=olympe.dm.File.prototype.Tk;olympe.dm.File.prototype.getContentAsString=olympe.dm.File.prototype.cn;olympe.dm.File.prototype.getContentAsBinary=olympe.dm.File.prototype.Sk;olympe.dm.File.P=olympe.dc.Ba.C('ff021000000000000030',olympe.dm.File,olympe.dc.O.zi,olympe.net.O.va,olympe.W.O.zh);olympe.dm.File.nameProp=olympe.dm.File.P.Ca('ff023000000000000050');
729
729
  z('olympe.dm.File.nameProp',olympe.dm.File.nameProp);olympe.dm.File.creationDateProp=olympe.dm.File.P.Ca('ff023000000000000051');z('olympe.dm.File.creationDateProp',olympe.dm.File.creationDateProp);olympe.dm.File.modificationDateProp=olympe.dm.File.P.Ca('ff023000000000000055');z('olympe.dm.File.modificationDateProp',olympe.dm.File.modificationDateProp);olympe.dm.File.mimeTypeProp=olympe.dm.File.P.Ca('ff023000000000000052');z('olympe.dm.File.mimeTypeProp',olympe.dm.File.mimeTypeProp);
730
730
  olympe.dm.File.urlProp=olympe.dm.File.P.Ca('ff023000000000000053');z('olympe.dm.File.urlProp',olympe.dm.File.urlProp);olympe.dm.File.C=olympe.dm.File.P.Ca('ff023000000000000054');olympe.dm.File.la=[olympe.D.File];m=olympe.dm.File.prototype;m.jn.K=olympe.D.J.F;m.Sk.K=new olympe.D.J(()=>{},[]);m.cn.K=new olympe.D.J(()=>{},[]);m.Tk.K=new olympe.D.J(()=>{},[]);m.rename.K=olympe.D.J.C;m.Ul.K=olympe.D.J.F;m.Cp.K=olympe.D.J.F;m.ow.K=new olympe.D.J(()=>olympe.D.jb,[]);
731
- m.Jw.K=new olympe.D.J(()=>olympe.D.jb,[]);m.$r.K=olympe.D.J.V;olympe.dm.Fd=class extends olympe.dc.CloudObject{C(){return this.Fb(olympe.dm.Fd.F)}G(){return this.Ie(olympe.dm.Fd.N)}F(){return this.ub(olympe.dm.Fd.C,olympe.dm.Module)}};olympe.dm.Fd.P=olympe.dc.Ba.C('ff021000000000000041',olympe.dm.Fd);olympe.dm.Fd.F=olympe.dm.Fd.P.Ca('ff023000000000000047');olympe.dm.Fd.N=olympe.dm.Fd.P.Ca('ff023000000000000048');olympe.dm.Fd.C=olympe.dm.Module.C.Pc();olympe.dm.Fd.prototype.C.K=olympe.D.J.F;olympe.dm.Fd.prototype.G.K=olympe.D.J.G;
732
- olympe.dm.Fd.prototype.F.K=new olympe.D.J(()=>olympe.dc.Aa,[]);olympe.dm.Nb=class extends olympe.dm.md{F(){return this.ub(olympe.dm.Pb.F,olympe.dm.Pb)}N(){return this.Fb(olympe.dm.Nb.ra)}aa(){return this.Fb(olympe.dm.Nb.Xc)}G(){return this.ub(olympe.dm.Nb.N,olympe.dm.Nb)}};olympe.dm.Nb.P=olympe.dc.Ba.C('0163d9594700fcf61e54',olympe.dm.Nb);olympe.dm.Nb.ra=olympe.dm.Nb.P.Ca('017869c7d2833c9492c1');olympe.dm.Nb.Xc=olympe.dm.Nb.P.Ca('017869c80bb9929c76d0');olympe.dm.Nb.N=olympe.dm.Nb.P.Pa('ff02200000000000002b');olympe.dm.Nb.Qf=P(olympe.dm.Nb.P,olympe.dm.Nb.N);
731
+ m.Jw.K=new olympe.D.J(()=>olympe.D.jb,[]);m.$r.K=olympe.D.J.V;olympe.dm.Gd=class extends olympe.dc.CloudObject{C(){return this.Fb(olympe.dm.Gd.F)}G(){return this.Ie(olympe.dm.Gd.N)}F(){return this.ub(olympe.dm.Gd.C,olympe.dm.Module)}};olympe.dm.Gd.P=olympe.dc.Ba.C('ff021000000000000041',olympe.dm.Gd);olympe.dm.Gd.F=olympe.dm.Gd.P.Ca('ff023000000000000047');olympe.dm.Gd.N=olympe.dm.Gd.P.Ca('ff023000000000000048');olympe.dm.Gd.C=olympe.dm.Module.C.Pc();olympe.dm.Gd.prototype.C.K=olympe.D.J.F;olympe.dm.Gd.prototype.G.K=olympe.D.J.G;
732
+ olympe.dm.Gd.prototype.F.K=new olympe.D.J(()=>olympe.dc.Aa,[]);olympe.dm.Nb=class extends olympe.dm.md{F(){return this.ub(olympe.dm.Pb.F,olympe.dm.Pb)}N(){return this.Fb(olympe.dm.Nb.ra)}aa(){return this.Fb(olympe.dm.Nb.Xc)}G(){return this.ub(olympe.dm.Nb.N,olympe.dm.Nb)}};olympe.dm.Nb.P=olympe.dc.Ba.C('0163d9594700fcf61e54',olympe.dm.Nb);olympe.dm.Nb.ra=olympe.dm.Nb.P.Ca('017869c7d2833c9492c1');olympe.dm.Nb.Xc=olympe.dm.Nb.P.Ca('017869c80bb9929c76d0');olympe.dm.Nb.N=olympe.dm.Nb.P.Pa('ff02200000000000002b');olympe.dm.Nb.Qf=P(olympe.dm.Nb.P,olympe.dm.Nb.N);
733
733
  olympe.dm.Nb.zc=olympe.dm.Nb.P.Pa('ff02200000000000002a');olympe.dm.Nb.He=olympe.dm.Nb.P.Pa('017e9c412e2b944bd590');olympe.dm.Nb.wh=olympe.dm.Nb.P.Pa('017e9c416872a89d3415');olympe.dm.Nb.Xf=olympe.dm.Nb.P.Pa('017ebf8fe5c506662098');P(olympe.dc.CloudObject.P,olympe.dm.Nb.zc);olympe.dm.Nb.qe=Fc('100000000000000000dd','PRIMORDIAL');olympe.dm.Nb.prototype.F.K=new olympe.D.J(()=>olympe.dc.Aa,[]);olympe.dm.Nb.prototype.N.K=olympe.D.J.F;olympe.dm.Nb.prototype.aa.K=olympe.D.J.F;
734
734
  olympe.dm.Nb.prototype.G.K=new olympe.D.J(()=>olympe.dc.Aa,[]);olympe.dm.Property=class extends olympe.dc.CloudObject{F(){return this.cd(olympe.dm.Property.definingModelRel,olympe.dc.CloudObject)}C(){return this.cd(olympe.dm.Property.typeRel,olympe.dc.CloudObject)}hd(){return this.F().ma().Hr(this.ma())}};olympe.dm.Property.P=olympe.dc.Ba.C('ff021000000000000005',olympe.dm.Property);olympe.dm.Property.definingModelRel=P(olympe.dm.Property.P,olympe.dc.CloudObject.propertyRel);z('olympe.dm.Property.definingModelRel',olympe.dm.Property.definingModelRel);
735
735
  olympe.dm.Property.typeRel=P(olympe.dm.Property.P,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)}Gw(){return olympe.D.Wa.EMPTY}jw(){return this.Ie(olympe.dm.Relation.Nm)}Qw(){return this.Ie(olympe.dm.Relation.Cn)}Qr(){return this.ub(olympe.dm.Relation.destinationModelRel,olympe.dc.CloudObject).Oc()}Vr(){return this.ub(olympe.dm.Relation.originModelRel,olympe.dc.CloudObject).Oc()}hd(){return this.Vr().ma().concat(['-',this.ma(),'->',this.Qr().ma()])}};olympe.dm.Relation.P=olympe.dc.Ba.C('ff021000000000000006',olympe.dm.Relation);
736
736
  olympe.dm.Relation.Cn=olympe.dm.Relation.P.Ca('ff023000000000000030');olympe.dm.Relation.Nm=olympe.dm.Relation.P.Ca('ff023000000000000034');olympe.dm.Relation.Xm=olympe.dm.Relation.P.Ca('ff023000000000000037');olympe.dm.Relation.Wm=olympe.dm.Relation.P.Ca('ff023000000000000137');olympe.dm.Relation.hl=olympe.dm.Relation.P.Ca('ff023000000000000237');olympe.dm.Relation.qs=olympe.dm.Relation.P.Ca('ff023000000000000337');olympe.dm.Relation.Av=olympe.dm.Relation.P.Ca('ff023000000000000031');
737
- olympe.dm.Relation.originModelRel=P(olympe.dm.Relation.P,olympe.dc.CloudObject.G);z('olympe.dm.Relation.originModelRel',olympe.dm.Relation.originModelRel);olympe.dm.Relation.destinationModelRel=P(olympe.dm.Relation.P,olympe.dc.CloudObject.V);z('olympe.dm.Relation.destinationModelRel',olympe.dm.Relation.destinationModelRel);olympe.dc.Rb={NONE:null,cz:olympe.dm.Relation.Xm.R(),Fc:olympe.dm.Relation.Wm.R(),rf:olympe.dm.Relation.hl.R(),DA:olympe.dm.Relation.qs.R()};
738
- olympe.dc.Rb.toString=function(a){for(const [b,c]of Object.entries(olympe.dc.Rb))if(c===a)return b;return null};olympe.dm.Relation.C={rp:0,tl:5,Bq:1,Ju:4,Ck:2,rk:8,Io:10,Fu:6,Gu:9,mc:6,Iu:9};olympe.dm.Relation.F={mu:3,fm:4,eu:5,$l:6};olympe.dm.Relation.N=olympe.dm.Rc.hq+olympe.dm.Rc.Bo;m=olympe.dm.Relation.prototype;m.Gw.K=olympe.D.J.F;m.jw.K=olympe.D.J.G;m.Qw.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.qf=class extends olympe.dc.CloudObject{getValue(){}};olympe.dm.qf.P=olympe.dc.Ba.C('ff021000000000000019',olympe.dm.qf);olympe.dm.String=class extends olympe.dm.qf{getValue(){return this.Fb(olympe.dm.String.valueProp)}toString(){return this.get(olympe.dm.String.valueProp)}};olympe.dm.String.P=olympe.dc.Ba.C('ff021000000000000011',olympe.dm.String);olympe.dm.String.valueProp=olympe.dm.String.P.Ca('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.qf{getValue(){return this.qh(olympe.dm.Boolean.valueProp)}};olympe.dm.Boolean.P=olympe.dc.Ba.C('ff021000000000000012',olympe.dm.Boolean);olympe.dm.Boolean.valueProp=olympe.dm.Boolean.P.Ca('ff023000000000000027');z('olympe.dm.Boolean.valueProp',olympe.dm.Boolean.valueProp);olympe.dm.Boolean.prototype.getValue.K=olympe.D.J.V;olympe.dm.Color=class extends olympe.dm.qf{getValue(){return this.Wr()}};olympe.dm.Color.P=olympe.dc.Ba.C('ff021000000000000017',olympe.dm.Color);olympe.dm.Color.valueProp=olympe.dm.Color.P.Ca('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.qf{getValue(){return this.kj(olympe.dm.DateTime.valueProp)}};olympe.dm.DateTime.P=olympe.dc.Ba.C('ff021000000000000014',olympe.dm.DateTime);olympe.dm.DateTime.valueProp=olympe.dm.DateTime.P.Ca('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.Ie(olympe.dm.Enum.rankProp)}static create(a,b,c,d,e){const f=olympe.dc.Na();e=void 0!==e?e:f.Gb(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;
737
+ olympe.dm.Relation.originModelRel=P(olympe.dm.Relation.P,olympe.dc.CloudObject.G);z('olympe.dm.Relation.originModelRel',olympe.dm.Relation.originModelRel);olympe.dm.Relation.destinationModelRel=P(olympe.dm.Relation.P,olympe.dc.CloudObject.V);z('olympe.dm.Relation.destinationModelRel',olympe.dm.Relation.destinationModelRel);olympe.dc.Sb={NONE:null,cz:olympe.dm.Relation.Xm.R(),Fc:olympe.dm.Relation.Wm.R(),rf:olympe.dm.Relation.hl.R(),DA:olympe.dm.Relation.qs.R()};
738
+ olympe.dc.Sb.toString=function(a){for(const [b,c]of Object.entries(olympe.dc.Sb))if(c===a)return b;return null};olympe.dm.Relation.C={rp:0,tl:5,Bq:1,Ju:4,Ck:2,rk:8,Io:10,Fu:6,Gu:9,bc:6,Iu:9};olympe.dm.Relation.F={mu:3,fm:4,eu:5,$l:6};olympe.dm.Relation.N=olympe.dm.Rc.hq+olympe.dm.Rc.Bo;m=olympe.dm.Relation.prototype;m.Gw.K=olympe.D.J.F;m.jw.K=olympe.D.J.G;m.Qw.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.qf=class extends olympe.dc.CloudObject{getValue(){}};olympe.dm.qf.P=olympe.dc.Ba.C('ff021000000000000019',olympe.dm.qf);olympe.dm.String=class extends olympe.dm.qf{getValue(){return this.Fb(olympe.dm.String.valueProp)}toString(){return this.get(olympe.dm.String.valueProp)}};olympe.dm.String.P=olympe.dc.Ba.C('ff021000000000000011',olympe.dm.String);olympe.dm.String.valueProp=olympe.dm.String.P.Ca('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.qf{getValue(){return this.qh(olympe.dm.Boolean.valueProp)}};olympe.dm.Boolean.P=olympe.dc.Ba.C('ff021000000000000012',olympe.dm.Boolean);olympe.dm.Boolean.valueProp=olympe.dm.Boolean.P.Ca('ff023000000000000027');z('olympe.dm.Boolean.valueProp',olympe.dm.Boolean.valueProp);olympe.dm.Boolean.prototype.getValue.K=olympe.D.J.V;olympe.dm.Color=class extends olympe.dm.qf{getValue(){return this.Wr()}};olympe.dm.Color.P=olympe.dc.Ba.C('ff021000000000000017',olympe.dm.Color);olympe.dm.Color.valueProp=olympe.dm.Color.P.Ca('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.qf{getValue(){return this.kj(olympe.dm.DateTime.valueProp)}};olympe.dm.DateTime.P=olympe.dc.Ba.C('ff021000000000000014',olympe.dm.DateTime);olympe.dm.DateTime.valueProp=olympe.dm.DateTime.P.Ca('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.Ie(olympe.dm.Enum.rankProp)}static create(a,b,c,d,e){const f=olympe.dc.Na();e=void 0!==e?e:f.Gb(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;
739
739
  olympe.dm.Enum.P=olympe.dc.Ba.C('016cdd861b32d56c81f7',olympe.dm.Enum);olympe.dm.Enum.rankProp=olympe.dm.Enum.P.Ca('017a7690c915975ea995');olympe.dm.Enum.prototype.fe.K=olympe.D.J.G;olympe.dm.ig=class extends olympe.dm.BrickMetadata{hx(){return this.sb(olympe.dc.CloudObject.instancesRel).ll(olympe.dm.Enum.rankProp,olympe.dc.da.km.ASC).bd()}static create(a,b){b=a.create(olympe.dm.ig,(new Map).set(olympe.dc.CloudObject.nameProp,b));a.Ra(olympe.dc.CloudObject.extendRel,b,olympe.dm.Enum);return b}};olympe.dm.ig.create=olympe.dm.ig.create;olympe.dm.ig.prototype.getValues=olympe.dm.ig.prototype.hx;olympe.dm.ig.P=olympe.dc.Ba.C('017a768f966fc08ebb98',olympe.dm.ig);olympe.dm.Number=class extends olympe.dm.qf{getValue(){return this.Ie(olympe.dm.Number.valueProp)}};olympe.dm.Number.P=olympe.dc.Ba.C('ff021000000000000013',olympe.dm.Number);olympe.dm.Number.valueProp=olympe.dm.Number.P.Ca('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.L=a;this.Z=new olympe.D.Wb(`${this.Y()} source context`);this.V=this.C=null}Y(){}N(){}close(){this.V&&this.V(this.Y(),olympe.dc.xk.yt);this.Z.destroy()}};function ch(a){olympe.D.wc([lc(a.ra)],b=>{if(b.valueOf()){const c=a.G.keys();dh(a,d=>{if(d)a.L.error('An error occurred while auto synchronising:\n'+d.message);else if(a.L.debug('Auto synchronise transactions successfully'),a.aa)for(const e of c)ac(a.F,f=>{a.L.error(`Could not clear transactions for ${e}: ${f}.`)})})}})}
740
740
  function eh(a){let b;olympe.D.wc([lc(a.ra)],c=>{c.valueOf()?(a.aa=!1,b&&(Kb(b),b=null)):(a.aa=!0,b=Jb(()=>{if(a.ka){a.ka=!1;for(const d of a.G.keys())Zb(a.F,d,a.G.get(d),()=>{},e=>{a.L.error(`Could persist transaction for ${d}: ${e}`)})}},5E3))})}
741
- function dh(a,b){const c=olympe.async.wk.create(),d=c.G;c.add((e,f)=>{a.F.storage.N(f)});c.add((e,f,g)=>{const h=olympe.dc.Ja.rb,k=g.get('files'),l=new olympe.async.qg(d);a.G.forEach((n,p)=>{if(p!==h){const q=a.Da.V(p);null!==q?(l.add(a.Sa.bind(a,n,q,k)),a.F.storage.C(void 0)):f(`The source: ${p} is not reachable.`)}});Wb(l,(n,p)=>{n?e():f(p||void 0)});l.start()});Wb(c,(e,f)=>{b(e?null:Error(f));e&&(a.ka=!1,a.G.clear())});c.start()}
742
- function fh(a,b){const c=new olympe.async.wk(olympe.D.Ia());c.add((d,e)=>{$b(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());Kc(e,olympe.D.Ia(),f,h,[],g)(!0)});d()});Wb(c,(d,e)=>{b(e?Error(e):null)});c.start()}
743
- olympe.Za.Ii=class extends olympe.Za.bh{constructor(a,b,c,d,e){super(a);this.G=new Map;this.ra=c;this.F=d;this.Da=b;this.ka=this.aa=!1;e.get('syncTimeout');e.get('autoSync')&&ch(this);e.get('autoPersist')&&eh(this)}Sa(a,b,c,d,e){const f=olympe.dc.ga.ja.Bk,g=olympe.dc.ga.ja.Cl,h=new olympe.dc.db.xc,k=new olympe.async.qg(olympe.D.Ia()),l=(n,p,q)=>{const r=n.tag(),t=n.fb(olympe.dm.File.mimeTypeProp.R());cc(this.F,u=>{tc(olympe.dc.zw(),r,u,t,v=>{n.Ca(olympe.dm.File.urlProp.R(),v);const w=new Map;w.set(olympe.dm.File.urlProp.R(),
744
- v);h.pc(r,w);this.F.storage.C(q)})})};for(const n of c)(c=a.Jf(n))&&c.se()&&k.add(l.bind(this,c));Wb(k,(n,p)=>{n?(n=M(new olympe.dc.ga(f,a,[b.Y()]),q=>{q?e(q.message):(this.C(b.Y(),g,h),q=Array.from(a.ee()).map(r=>r.tag()),olympe.dc.Ad().persist(q),d())}),b.N(n)):e(`Transaction synchronisation failed! ${p?p:''}`)});k.start()}Y(){return olympe.dc.Ja.rb}N(a){var b=olympe.dc.ga.ja.eh,c=olympe.dc.ga.ja.Ah;const d=olympe.dc.ga.ja.Bi,e=olympe.dc.ga.ja.Ai,f=olympe.dc.ga.ja.Sg,g=olympe.dc.ga.ja.Ll,h=olympe.dc.ga.ja.Th,
745
- k=olympe.dc.ga.ja.xi,l=olympe.dc.ga.ja.Bh;var n=olympe.dc.ga.ja.Tj;const p=a.type;switch(p){case f:a.validate(null);this.F.storage.F(void 0);fh(this,v=>{null!==v&&this.L.error(`Could not load transactions: ${v.message}`)});break;case b:case c:const q=a.content;a.C.forEach(v=>{let w=this.G.get(v);void 0===w&&(w=new olympe.dc.db.xc,this.G.set(v,w));q.Mc(w);this.aa&&(this.ka=!0)});a.validate(null);a=olympe.dc.transaction.ug.C.Xp;this.C(olympe.dc.Ja.rb,n,{id:q.Y(),finalize:a});break;case e:case d:const r=
746
- a.C[0],t=a.content;a.validate(null);Yb(this.F,t.Y(),v=>{this.L.warn('No graphresult for subscription : '+t.Y(),v,'\n',t.sh.toJSON());this.L.warn();this.C(r,g,new olympe.dc.query.Di(t.Y(),r,olympe.dc.Ja.rb,new olympe.dc.db.xc))});break;case h:case l:case k:n=a.content;b=n.file;const u=n.$e;c=n.te;p===h?bc(this.F,b,n.content,n.mimeType,u,c):p===l?cc(this.F,v=>{u(v)}):this.F.storage.C(c);a.validate(null)}}};olympe.Za.Ii.C='context';const gh=olympe.dc.ga.ja.rm,hh=olympe.dc.ga.ja.tm,ih=olympe.dc.ga.ja.QUERY_RESULT,jh=olympe.dc.ga.ja.sm,kh=olympe.dc.ga.ja.eh,lh=olympe.dc.ga.ja.Bk,mh=olympe.dc.ga.ja.Tj,nh=olympe.dc.ga.ja.Ah,oh=olympe.dc.ga.ja.Jj,ph=olympe.dc.ga.ja.ul,qh=olympe.dc.ga.ja.Th,rh=olympe.dc.ga.ja.Bh,sh=olympe.dc.ga.ja.xi,th=olympe.dc.ga.ja.og;
741
+ function dh(a,b){const c=olympe.async.wk.create(),d=c.G;c.add((e,f)=>{a.F.storage.N(f)});c.add((e,f,g)=>{const h=olympe.dc.Ha.rb,k=g.get('files'),l=new olympe.async.qg(d);a.G.forEach((n,p)=>{if(p!==h){const q=a.Da.V(p);null!==q?(l.add(a.Sa.bind(a,n,q,k)),a.F.storage.C(void 0)):f(`The source: ${p} is not reachable.`)}});Wb(l,(n,p)=>{n?e():f(p||void 0)});l.start()});Wb(c,(e,f)=>{b(e?null:Error(f));e&&(a.ka=!1,a.G.clear())});c.start()}
742
+ function fh(a,b){const c=new olympe.async.wk(olympe.D.Ja());c.add((d,e)=>{$b(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());Kc(e,olympe.D.Ja(),f,h,[],g)(!0)});d()});Wb(c,(d,e)=>{b(e?Error(e):null)});c.start()}
743
+ olympe.Za.Ii=class extends olympe.Za.bh{constructor(a,b,c,d,e){super(a);this.G=new Map;this.ra=c;this.F=d;this.Da=b;this.ka=this.aa=!1;e.get('syncTimeout');e.get('autoSync')&&ch(this);e.get('autoPersist')&&eh(this)}Sa(a,b,c,d,e){const f=olympe.dc.ga.ja.Bk,g=olympe.dc.ga.ja.Cl,h=new olympe.dc.db.xc,k=new olympe.async.qg(olympe.D.Ja()),l=(n,p,q)=>{const r=n.tag(),t=n.fb(olympe.dm.File.mimeTypeProp.R());cc(this.F,u=>{tc(olympe.dc.zw(),r,u,t,v=>{n.Ca(olympe.dm.File.urlProp.R(),v);const w=new Map;w.set(olympe.dm.File.urlProp.R(),
744
+ v);h.pc(r,w);this.F.storage.C(q)})})};for(const n of c)(c=a.Jf(n))&&c.se()&&k.add(l.bind(this,c));Wb(k,(n,p)=>{n?(n=M(new olympe.dc.ga(f,a,[b.Y()]),q=>{q?e(q.message):(this.C(b.Y(),g,h),q=Array.from(a.ee()).map(r=>r.tag()),olympe.dc.Ad().persist(q),d())}),b.N(n)):e(`Transaction synchronisation failed! ${p?p:''}`)});k.start()}Y(){return olympe.dc.Ha.rb}N(a){var b=olympe.dc.ga.ja.eh,c=olympe.dc.ga.ja.Ah;const d=olympe.dc.ga.ja.Bi,e=olympe.dc.ga.ja.Ai,f=olympe.dc.ga.ja.Sg,g=olympe.dc.ga.ja.Ll,h=olympe.dc.ga.ja.Th,
745
+ k=olympe.dc.ga.ja.xi,l=olympe.dc.ga.ja.Bh;var n=olympe.dc.ga.ja.Tj;const p=a.type;switch(p){case f:a.validate(null);this.F.storage.F(void 0);fh(this,v=>{null!==v&&this.L.error(`Could not load transactions: ${v.message}`)});break;case b:case c:const q=a.content;a.C.forEach(v=>{let w=this.G.get(v);void 0===w&&(w=new olympe.dc.db.xc,this.G.set(v,w));q.Mc(w);this.aa&&(this.ka=!0)});a.validate(null);a=olympe.dc.transaction.ug.C.Xp;this.C(olympe.dc.Ha.rb,n,{id:q.Y(),finalize:a});break;case e:case d:const r=
746
+ a.C[0],t=a.content;a.validate(null);Yb(this.F,t.Y(),v=>{this.L.warn('No graphresult for subscription : '+t.Y(),v,'\n',t.sh.toJSON());this.L.warn();this.C(r,g,new olympe.dc.query.Di(t.Y(),r,olympe.dc.Ha.rb,new olympe.dc.db.xc))});break;case h:case l:case k:n=a.content;b=n.file;const u=n.$e;c=n.te;p===h?bc(this.F,b,n.content,n.mimeType,u,c):p===l?cc(this.F,v=>{u(v)}):this.F.storage.C(c);a.validate(null)}}};olympe.Za.Ii.C='context';const gh=olympe.dc.ga.ja.rm,hh=olympe.dc.ga.ja.tm,ih=olympe.dc.ga.ja.QUERY_RESULT,jh=olympe.dc.ga.ja.sm,kh=olympe.dc.ga.ja.eh,lh=olympe.dc.ga.ja.Bk,mh=olympe.dc.ga.ja.Tj,nh=olympe.dc.ga.ja.Ah,oh=olympe.dc.ga.ja.Jj,ph=olympe.dc.ga.ja.ul,qh=olympe.dc.ga.ja.Th,rh=olympe.dc.ga.ja.Bh,sh=olympe.dc.ga.ja.xi,th=olympe.dc.ga.ja.og;
747
747
  function uh(a,b,c,d,e){const f=c.Y();c={t:gh,q:c.ia()};olympe.H.wa.nb.zb.get(b,c).then(g=>{g.t===ih?(d(null),a.C(b,e||ih,{i:f,r:g.r,s:b})):d(Error(g.e))}).catch(g=>d(Error(g)))}function vh(a,b,c,d,e){const f=c.Y();uh(a,b,c,g=>{if(g)e(g);else{wh(a,b,f);g={t:hh,q:c.ia()};var h=olympe.H.wa.nb.zb.observe(b,d,g).subscribe(k=>{const l=k.t;l===jh?(e(null),a.C(b,l,{i:f,r:k.r,s:b})):e(Error(k.e))});d.vc(()=>h.unsubscribe())}},jh)}
748
748
  function xh(a,b,c,d){const e=c.Bc;c=new olympe.dc.transaction.wd;e.Mc(c);c={t:kh,i:e.Y(),p:$d(c)};olympe.H.wa.nb.zb.send(b,c).then(()=>{d(null);a.C(b,mh,{id:e.Y(),finalize:olympe.dc.transaction.ug.C.Wp})}).catch(f=>d(Error(f)))}function yh(a,b,c,d,e){var f=c.Bc;c=f.Y();const g=new olympe.dc.transaction.wd;f.Mc(g);f={t:nh,i:c,p:$d(g)};olympe.H.wa.nb.zb.publish(b,f).then(()=>e(null)).catch(h=>e(Error(h)));zh(a,c,b,d)}
749
749
  function wh(a,b,c){const d=()=>{const f=setInterval(()=>{0===a.F.size?clearInterval(f):a.F.forEach((g,h)=>{olympe.H.wa.nb.zb.send(h,{t:th,s:Array.from(g)}).catch(k=>a.L.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()}
750
750
  function zh(a,b,c,d){const e=new olympe.H.wa.nb.zb(b,d);e.listen().subscribe(f=>{f=f.body();if(f.t===oh){a.L.error(`Burst Transaction ${b} failed. Local rollback is not supported yet. Refresh the application`);const g=new olympe.dc.db.xc;a.C(c,oh,{id:b,rollback:g,error:f.r})}});d.vc(()=>e.stop())}
751
- olympe.Za.xu=class extends olympe.Za.bh{constructor(a,b,c){super(a);this.F=new Map;this.G=b;this.aa=c}Y(){return olympe.dc.Ja.lq}N(a){const b=a.C[0],c=a.type,d=a.validate.bind(a),e=a.content;a=a.F;switch(c){case gh:uh(this,b,e,d);break;case hh:vh(this,b,e,a,d);break;case kh:case lh:xh(this,b,e,d);break;case nh:yh(this,b,e,a,d);break;case ph:e.t=c;olympe.H.wa.nb.zb.publish(b,e).then(d).catch(f=>d(Error(f)));break;case qh:case rh:case sh:olympe.H.wa.nb.zb.get(b,{t:c,f:e.file}).then(f=>{this.G.ka(e.file,
751
+ olympe.Za.xu=class extends olympe.Za.bh{constructor(a,b,c){super(a);this.F=new Map;this.G=b;this.aa=c}Y(){return olympe.dc.Ha.lq}N(a){const b=a.C[0],c=a.type,d=a.validate.bind(a),e=a.content;a=a.F;switch(c){case gh:uh(this,b,e,d);break;case hh:vh(this,b,e,a,d);break;case kh:case lh:xh(this,b,e,d);break;case nh:yh(this,b,e,a,d);break;case ph:e.t=c;olympe.H.wa.nb.zb.publish(b,e).then(d).catch(f=>d(Error(f)));break;case qh:case rh:case sh:olympe.H.wa.nb.zb.get(b,{t:c,f:e.file}).then(f=>{this.G.ka(e.file,
752
752
  b,f);c===qh?this.G.Z(e.file,e.content,e.mimeType,e.$e,e.te):c===rh?this.G.V(e.file,e.url,e.mimeType,e.$e,e.te):this.G.N(e.file,e.$e,e.te)}).catch(e.te);break;default:this.L.info(`Messages of type ${c} is not supported by the source ${this.Y()}`)}}};olympe.Za.Buffer=class{constructor(){this.counter=0;this.Jb=new Map}buffer(a){const b=this.counter++;this.Jb.set(b,a);return this.clear.bind(this,b)}clear(a){this.Jb.delete(a)}};olympe.Za.sg=class a{constructor(b,c,d){this.L=b;this.Z=c;this.ka=new olympe.Za.Buffer(this);this.N=new Map;this.G=this.Xb(d);new olympe.D.Wb('Data Router context');this.F=new Map;this.aa=new Map;this.ab()}ab(){this.L.info('Initializing DR layer');olympe.D.nn(lc(this.Z),()=>{this.L.info('Router: ONLINE')},()=>{this.L.log('Router: OFFLINE (no auth layer not online)');for(const b of this.ka.Jb.values())this.Da(b)});this.L.log('DONE initializing DR layer (waiting for AUTH layer session to be established)')}send(b){M(b,
753
- this.ka.buffer(b));this.Da(b)}C(b,c){const d=olympe.W.lc();let e=this.F.get(b);void 0===e&&(e=new Map,this.F.set(b,e));e.set(d,c)}ra(b){this.aa.set(olympe.W.Ag(),b)}Ab(b,c,d){this.F.has(c)&&this.F.get(c).forEach(e=>{e(b,d)})}cc(b,c){this.N.set(b,c);c.C=this.Ab.bind(this);c.V=this.Sa.bind(this)}V(b){return this.N.get(b)||this.N.get(olympe.dc.Ja.lq)}Sa(b,c){this.aa.forEach(d=>{d(b,c)})}Da(b){this.L.debug('Processing message',b.toString());this.bb(b).forEach(c=>{(c=this.V(c))&&c.N(b)})}bb(b){var c=olympe.dc.ga.ja.Sg,
753
+ this.ka.buffer(b));this.Da(b)}C(b,c){const d=olympe.W.mc();let e=this.F.get(b);void 0===e&&(e=new Map,this.F.set(b,e));e.set(d,c)}ra(b){this.aa.set(olympe.W.Ag(),b)}Ab(b,c,d){this.F.has(c)&&this.F.get(c).forEach(e=>{e(b,d)})}ec(b,c){this.N.set(b,c);c.C=this.Ab.bind(this);c.V=this.Sa.bind(this)}V(b){return this.N.get(b)||this.N.get(olympe.dc.Ha.lq)}Sa(b,c){this.aa.forEach(d=>{d(b,c)})}Da(b){this.L.debug('Processing message',b.toString());this.bb(b).forEach(c=>{(c=this.V(c))&&c.N(b)})}bb(b){var c=olympe.dc.ga.ja.Sg,
754
754
  d=olympe.dc.ga.ja.Ai,e=olympe.dc.ga.ja.Bi,f=olympe.dc.ga.ja.eh,g=olympe.dc.ga.ja.Ah;const h=olympe.dc.ga.ja.Th,k=olympe.dc.ga.ja.xi,l=olympe.dc.ga.ja.Bh;switch(b.type){case c:d=this.G.get(a.C.Sg)||[];break;case d:case e:d=this.G.get(a.C.qm)||[];break;case f:case g:d=this.G.get(a.C.TRANSACTION)||[];break;case h:case l:case k:d=this.G.get(a.C.gt)||[];break;default:d=[]}c=b.content;e=olympe.auth.sa.C.Ng;f=olympe.auth.sa.C.Eh;g=kc(this.Z);e=!(g===e||g===f);for(var n of d)if(d=n,f=c&&c.Y&&c.Y(),g=d.get('type'),
755
- g===a.F.em&&e||g===a.F.op&&d.get('id')===f||g===a.F.mc)return n=n.get('destinations'),this.L.debug('Message',b.toString(),'is redirect to',n),n;this.L.debug('Message',b.toString(),'not redirect');return b.C}Xb(b){const c=Object.values(olympe.Za.sg.C),d=Object.values(olympe.Za.sg.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',
755
+ g===a.F.em&&e||g===a.F.op&&d.get('id')===f||g===a.F.bc)return n=n.get('destinations'),this.L.debug('Message',b.toString(),'is redirect to',n),n;this.L.debug('Message',b.toString(),'not redirect');return b.C}Xb(b){const c=Object.values(olympe.Za.sg.C),d=Object.values(olympe.Za.sg.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',
756
756
  l).set('destinations',n),h.push(n),l===a.F.op&&n.set('id',k.id)):this.L.error('Routing rule',f,l,'is not valid. Destinations must be stored in an array')}else this.L.error('Routing rule',f,l,'is not valid. Valid rules are',d.toString())})}else this.L.error('Routing rule',f,'is not valid. Rules must be ordered in an array');else this.L.error('Routing rule',f,'is not valid. Valid messages are',c.toString())});return e}};olympe.Za.sg.C={Sg:'getContext',qm:'query',TRANSACTION:'transaction',gt:'file'};
757
- olympe.Za.sg.F={mc:'default',em:'offline',op:'id'};olympe.Za.sg.la=[olympe.dc.sg];olympe.Za.Uj=class{ka(){}Z(){}V(){}N(){}};olympe.Za.O={va:'dr.Manager',Ea:'dr.Logger',me:'dr.sources.Router',Ip:'dr.sources.Local',xm:'dr.sources.Server',nq:'dr.sources.Peer',Rg:'dr.sources.FileSource'};olympe.Za.Config={Zl:'dr.keepAliveTimeout',Sn:'dr.autoSync',Rn:'dr.autoPersist',Vq:'dr.syncTimeout',Hq:'dr.routing'};
758
- olympe.T.config(function(a){E(a,olympe.Za.Config.Hq,{});E(a,olympe.Za.Config.Zl,3E5);E(a,olympe.Za.Config.Sn,!1);E(a,olympe.Za.Config.Rn,!1);E(a,olympe.Za.Config.Vq,3E4);C(a,olympe.Za.O.Ea,[olympe.pa.O.va],b=>b.Nc('dr'));C(a,olympe.Za.O.Ip,[olympe.Za.O.Ea,olympe.Za.O.me,olympe.auth.O.va,olympe.hc.O.vo,new olympe.T.fa(olympe.Za.Config.Sn),new olympe.T.fa(olympe.Za.Config.Rn),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',
757
+ olympe.Za.sg.F={bc:'default',em:'offline',op:'id'};olympe.Za.sg.la=[olympe.dc.sg];olympe.Za.Uj=class{ka(){}Z(){}V(){}N(){}};olympe.Za.O={va:'dr.Manager',Ea:'dr.Logger',me:'dr.sources.Router',Ip:'dr.sources.Local',xm:'dr.sources.Server',nq:'dr.sources.Peer',Rg:'dr.sources.FileSource'};olympe.Za.Config={Zl:'dr.keepAliveTimeout',Sn:'dr.autoSync',Rn:'dr.autoPersist',Vq:'dr.syncTimeout',Hq:'dr.routing'};
758
+ olympe.T.config(function(a){E(a,olympe.Za.Config.Hq,{});E(a,olympe.Za.Config.Zl,3E5);E(a,olympe.Za.Config.Sn,!1);E(a,olympe.Za.Config.Rn,!1);E(a,olympe.Za.Config.Vq,3E4);C(a,olympe.Za.O.Ea,[olympe.pa.O.va],b=>b.Nc('dr'));C(a,olympe.Za.O.Ip,[olympe.Za.O.Ea,olympe.Za.O.me,olympe.auth.O.va,olympe.ic.O.vo,new olympe.T.fa(olympe.Za.Config.Sn),new olympe.T.fa(olympe.Za.Config.Rn),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',
759
759
  h);return new olympe.Za.Ii(b,c,d,e,f)});ta(a,olympe.Za.O.xm);B(a,olympe.Za.O.nq,olympe.Za.xu,olympe.Za.O.Ea,olympe.Za.O.Rg,new olympe.T.fa(olympe.Za.Config.Zl));ta(a,olympe.Za.O.Rg);B(a,olympe.Za.O.me,olympe.Za.sg,olympe.Za.O.Ea,olympe.auth.O.va,new olympe.T.fa(olympe.Za.Config.Hq));sa(a,olympe.dc.O.me,olympe.Za.O.me);C(a,olympe.dc.query.Mb.ek,[olympe.dc.query.Mb.ek],b=>new olympe.dc.pm(b))},'olympe.dr');
760
- olympe.T.run([olympe.Za.O.me,olympe.Za.O.Ip,olympe.Za.O.xm,olympe.Za.O.nq],(a,...b)=>{b.forEach(c=>a.cc(c.Y(),c))});olympe.H={};olympe.H.Uc={vi:1,eg:2,qc:3,pf:4,Ty:5,Ei:6,qA:7};olympe.H.ja={Ei:1,fv:2,ft:3,og:5};olympe.H.sa=class{bb(){}connect(){}disconnect(){}Qf(){}Wf(){}Z(){}zc(){}Xb(){}Da(){}qe(){}};olympe.H.sa.C={INIT:'initialize',CONNECTING:'connecting',hg:'disconnected',ui:'connected',Yg:'reconnecting',qc:'error'};olympe.H.sa.G={Lh:1,mt:-1,zt:-2,Yu:-3};function Ah(a,b){const c=a.G.get(b)||a.Sa;a.G.delete(b);return`${c}/${b}`}
761
- olympe.H.Uj=class{constructor(a,b,c,d,e){this.L=a;this.F=b;this.ra=c;this.Sa=d;this.ab=e;this.C=new Map;this.G=new Map;this.aa=new Map;this.Da=new olympe.D.Wb('File manager context')}ka(a,b,c){b&&this.G.set(a,`${this.ab}/${b}`);c&&this.aa.set(a,c)}Z(a,b,c,d,e){const f=Ob(Ah(this,a),olympe.net.eb.ae.mk,b,olympe.net.eb.ResponseType.sl);Pb(f,{[olympe.net.eb.Headers.si]:this.ed(a),[olympe.net.eb.Headers.Lj]:c||'application/octet-stream'});this.F.C(f,g=>{g=g.Rd();g===olympe.net.eb.od.Lh||g===olympe.net.eb.od.zl?
762
- (g=new URL(f.C()),d(g.pathname)):e&&(g=`Failed to create file ${a}. Response code ${g}`,this.L.error(g),e(g))})}V(a,b,c,d,e){const f=olympe.D.Ia();d={$e:f.Cb(d),te:e&&f.Cb(e)};if(this.C.has(a))this.C.get(a).push(d);else{this.C.set(a,[d]);if(null===b){var g=Ob(Ah(this,a));Pb(g,{[olympe.net.eb.Headers.si]:this.ed(a)})}else g=Ob(b);g.F=olympe.net.eb.ResponseType.sl;Pb(g,{[olympe.net.eb.Headers.Lj]:c||'application/octet-stream'});this.Da.run(()=>{this.F.C(g,h=>{const k=h.Rd(),l=this.C.get(a);if(200<=
763
- k&&300>k){const n=h.getData();l&&l.forEach(p=>{if(f.yb()){const q=f.Uk(),r=f.Y();this.L.warn(`Context ${q} ${r} is being destroyed while file tag ${a} is being downloaded`)}p.$e(n)})}else{const n=`Failed to download file ${a}. Response code ${k}`;l&&l.forEach(p=>{p.te&&p.te(n)})}this.C.delete(a)})})}}N(a,b,c){const d=Ob(Ah(this,a),olympe.net.eb.ae.Fc);Pb(d,{[olympe.net.eb.Headers.si]:this.ed(a)});this.F.C(d,e=>{e=e.Rd();200<=e&&300>e?b():(e=`Failed to delete file ${a}. Response code ${e}`,this.L.error(e),
760
+ olympe.T.run([olympe.Za.O.me,olympe.Za.O.Ip,olympe.Za.O.xm,olympe.Za.O.nq],(a,...b)=>{b.forEach(c=>a.ec(c.Y(),c))});olympe.H={};olympe.H.Uc={vi:1,eg:2,qc:3,pf:4,Ty:5,Ei:6,qA:7};olympe.H.ja={Ei:1,fv:2,ft:3,og:5};olympe.H.sa=class{bb(){}connect(){}disconnect(){}Qf(){}Wf(){}Z(){}zc(){}Xb(){}Da(){}qe(){}};olympe.H.sa.C={INIT:'initialize',CONNECTING:'connecting',hg:'disconnected',ui:'connected',Yg:'reconnecting',qc:'error'};olympe.H.sa.G={Lh:1,mt:-1,zt:-2,Yu:-3};function Ah(a,b){const c=a.G.get(b)||a.Sa;a.G.delete(b);return`${c}/${b}`}
761
+ olympe.H.Uj=class{constructor(a,b,c,d,e){this.L=a;this.F=b;this.ra=c;this.Sa=d;this.ab=e;this.C=new Map;this.G=new Map;this.aa=new Map;this.Da=new olympe.D.Wb('File manager context')}ka(a,b,c){b&&this.G.set(a,`${this.ab}/${b}`);c&&this.aa.set(a,c)}Z(a,b,c,d,e){const f=Ob(Ah(this,a),olympe.net.eb.ae.mk,b,olympe.net.eb.ResponseType.sl);Pb(f,{[olympe.net.eb.Headers.si]:this.ed(a),[olympe.net.eb.Headers.Lj]:c||'application/octet-stream'});this.F.C(f,g=>{g=g.Sd();g===olympe.net.eb.od.Lh||g===olympe.net.eb.od.zl?
762
+ (g=new URL(f.C()),d(g.pathname)):e&&(g=`Failed to create file ${a}. Response code ${g}`,this.L.error(g),e(g))})}V(a,b,c,d,e){const f=olympe.D.Ja();d={$e:f.Cb(d),te:e&&f.Cb(e)};if(this.C.has(a))this.C.get(a).push(d);else{this.C.set(a,[d]);if(null===b){var g=Ob(Ah(this,a));Pb(g,{[olympe.net.eb.Headers.si]:this.ed(a)})}else g=Ob(b);g.F=olympe.net.eb.ResponseType.sl;Pb(g,{[olympe.net.eb.Headers.Lj]:c||'application/octet-stream'});this.Da.run(()=>{this.F.C(g,h=>{const k=h.Sd(),l=this.C.get(a);if(200<=
763
+ k&&300>k){const n=h.getData();l&&l.forEach(p=>{if(f.yb()){const q=f.Uk(),r=f.Y();this.L.warn(`Context ${q} ${r} is being destroyed while file tag ${a} is being downloaded`)}p.$e(n)})}else{const n=`Failed to download file ${a}. Response code ${k}`;l&&l.forEach(p=>{p.te&&p.te(n)})}this.C.delete(a)})})}}N(a,b,c){const d=Ob(Ah(this,a),olympe.net.eb.ae.Fc);Pb(d,{[olympe.net.eb.Headers.si]:this.ed(a)});this.F.C(d,e=>{e=e.Sd();200<=e&&300>e?b():(e=`Failed to delete file ${a}. Response code ${e}`,this.L.error(e),
764
764
  c&&c(e))})}ed(a){const b=this.aa.get(a);b&&this.aa.delete(a);return b||olympe.D.Ya(nc(this.ra))}};olympe.H.Uj.la=[olympe.Za.Uj];const Bh=olympe.dc.ga.ja.Sg,Ch=olympe.dc.ga.ja.eh,Dh=olympe.dc.ga.ja.Bk,Eh=olympe.dc.ga.ja.Ah,Fh=olympe.dc.ga.ja.Ai,Gh=olympe.dc.ga.ja.Bi,Hh=olympe.dc.ga.ja.$o,Ih=olympe.dc.ga.ja.ap,Jh=olympe.dc.ga.ja.Ll,Kh=olympe.dc.ga.ja.xi,Lh=olympe.dc.ga.ja.Bh,Mh=olympe.dc.ga.ja.Th,Nh=olympe.dc.ga.ja.Tj,Oh=olympe.dc.ga.ja.ev,Ph=olympe.dc.ga.ja.Eu,Qh=olympe.dc.ga.ja.nt,Rh=olympe.dc.ga.ja.ul,Sh=olympe.dc.ga.ja.Js;
765
765
  function Th(a){a.G.Da(olympe.H.Uc.vi,a.ab.bind(a));olympe.D.wc([lc(a.ra)],b=>{b=b.valueOf()?olympe.dc.xk.cq:olympe.dc.xk.em;a.V&&a.V(a.Y(),b)},'Server source is online')}function Uh(a,b,c){const d=b.Bc;b=new olympe.dc.transaction.wd(!0);d.Mc(b);Vh(a,a.Ab,Ch,!0,$d(b),e=>{c&&c(e);a.C(a.Y(),Nh,{id:d.Y(),finalize:olympe.dc.transaction.ug.C.Wp})})}
766
- function Wh(a,b,c,d){const e=c.Y();a.L.log('Graphdef (ID ',e,') sent: ',c);const f=c instanceof olympe.dc.query.Sl?a.bb:a.Da,g=(new olympe.H.$.Wj).ia(c);c=new olympe.async.qg(a.Z);b===Gh&&c.add((k,l)=>{a.F.set(e,{notification:null,Vx:a.Z.Cb(n=>n?l(n):k())});Xh(a,b,g,n=>n&&l(n.message))});const h=olympe.D.Ia();c.add((k,l)=>{h.run(()=>{Vh(a,f,Fh,!1,g,a.Z.Cb(n=>n?l(n.message):k()))})});Wb(c,(k,l)=>{const n=a.F.get(e);k&&n&&n.notification?a.C(a.Y(),Ih,n.notification):!k&&n&&Yh(a,Hh,e,p=>p&&a.L.warn(p));
766
+ function Wh(a,b,c,d){const e=c.Y();a.L.log('Graphdef (ID ',e,') sent: ',c);const f=c instanceof olympe.dc.query.Sl?a.bb:a.Da,g=(new olympe.H.$.Wj).ia(c);c=new olympe.async.qg(a.Z);b===Gh&&c.add((k,l)=>{a.F.set(e,{notification:null,Vx:a.Z.Cb(n=>n?l(n):k())});Xh(a,b,g,n=>n&&l(n.message))});const h=olympe.D.Ja();c.add((k,l)=>{h.run(()=>{Vh(a,f,Fh,!1,g,a.Z.Cb(n=>n?l(n.message):k()))})});Wb(c,(k,l)=>{const n=a.F.get(e);k&&n&&n.notification?a.C(a.Y(),Ih,n.notification):!k&&n&&Yh(a,Hh,e,p=>p&&a.L.warn(p));
767
767
  a.F.delete(e);d(l?Error(l):null)});c.start()}function Yh(a,b,c,d){a.L.log('Unsubscribe to: ',c);Xh(a,b,{i:c},d)}function Xh(a,b,c,d){b={c:b};Object.assign(b,c);a.G.Z(olympe.H.Uc.vi,b,d&&(e=>{d(e)}))}function Vh(a,b,c,d,e,f){if(a.G.bb()){const g=olympe.H.Uc.vi;!d&&e&&Object.assign(e,{c});c=olympe.D.Ya(nc(a.ra)).valueOf();a.G.zc(b,g,c,d,e,f)}else a.L.error('Server is disconnected, data request of type',c,'on url',b,'is canceled.'),f(Error('Server is disconnected'))}
768
- olympe.H.bh=class extends olympe.Za.bh{constructor(a,b,c,d,e){super(a);this.G=b;this.ra=c;new olympe.H.$.gb;this.aa=new olympe.dc.W.Li(this.Y());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.bb=e[1];this.Da=e[2];this.Ab=e[3];this.F=new Map;Th(this)}Y(){return olympe.dc.Ja.Vc}N(a){var b=a.type;const c=a.validate.bind(a);a=a.content;switch(b){case Bh:Vh(this,
768
+ olympe.H.bh=class extends olympe.Za.bh{constructor(a,b,c,d,e){super(a);this.G=b;this.ra=c;new olympe.H.$.gb;this.aa=new olympe.dc.W.Li(this.Y());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.bb=e[1];this.Da=e[2];this.Ab=e[3];this.F=new Map;Th(this)}Y(){return olympe.dc.Ha.Vc}N(a){var b=a.type;const c=a.validate.bind(a);a=a.content;switch(b){case Bh:Vh(this,
769
769
  this.Sa,olympe.dc.ga.ja.Sg,!1,null,c);break;case Eh:b=new olympe.dc.transaction.wd;var d=a.Bc;a=a.uh;d.Mc(b);Xh(this,Eh,{i:d.Y(),r:a,p:$d(b)});c(null);break;case Rh:b=new olympe.dc.transaction.wd;a=a.Bc;a.Mc(b);Xh(this,Rh,{i:a.Y(),p:$d(b)},c);break;case Ch:b=new olympe.dc.transaction.wd;d=a.Bc;a=a.uh;d.Mc(b);Xh(this,olympe.dc.ga.ja.eh,{i:d.Y(),r:a,p:$d(b)},c);break;case Dh:Uh(this,a,c);break;case Fh:case Gh:Wh(this,b,a,c);break;case Hh:Yh(this,b,a,c);break;case Oh:Xh(this,Oh,{},c);break;case Ph:Xh(this,
770
770
  Ph,{},c);break;case Qh:Xh(this,Qh,{},c);break;case Sh:Xh(this,Sh,{},c);break;case Lh:this.ka.V(a.file,a.url,a.mimeType,a.$e,a.te);break;case Kh:this.ka.N(a.file,a.$e,a.te);break;case Mh:this.ka.Z(a.file,a.content,a.mimeType,a.$e,a.te);break;default:this.L.info(`Message of type ${b} not supported yet`)}}ab(a){var b=olympe.dc.ga.ja.Cl,c=olympe.dc.ga.ja.Jj;const d=olympe.dc.ga.ja.ik,e=olympe.dc.ga.ja.Qu,f=olympe.dc.ga.ja.Fp;var g=olympe.dc.ga.ja.ot;const h=a.c;h===b?(a=this.aa.C(a.p),this.C(this.Y(),
771
- b,a)):h===c?(g=a.error.reason,b=this.aa.C(a.p),this.C(this.Y(),c,{id:a.i,rollback:b,error:g})):h===Jh?(g=olympe.dc.Ja.rb,c=olympe.dc.Ja.Vc,b=a.i,0<a.s?g=new olympe.dc.query.aj.Yj(b,c,g,a.info.error.reason):(g=this.aa.V(b,g,a.p),this.L.debug('< Graphdef Result (ID ',g.Y(),'):',a.p),this.L.log('< Graphdef Result (ID ',g.Y(),') with',g.Bc.G(),'operations')),this.C(this.Y(),Jh,g)):h===Ih?(g=a.i,a=this.aa.N(g,a.p),this.F.has(g)?(g=this.F.get(g),g.notification?gf(a,g.notification):g.notification=a):this.C(this.Y(),
771
+ b,a)):h===c?(g=a.error.reason,b=this.aa.C(a.p),this.C(this.Y(),c,{id:a.i,rollback:b,error:g})):h===Jh?(g=olympe.dc.Ha.rb,c=olympe.dc.Ha.Vc,b=a.i,0<a.s?g=new olympe.dc.query.aj.Yj(b,c,g,a.info.error.reason):(g=this.aa.V(b,g,a.p),this.L.debug('< Graphdef Result (ID ',g.Y(),'):',a.p),this.L.log('< Graphdef Result (ID ',g.Y(),') with',g.Bc.G(),'operations')),this.C(this.Y(),Jh,g)):h===Ih?(g=a.i,a=this.aa.N(g,a.p),this.F.has(g)?(g=this.F.get(g),g.notification?gf(a,g.notification):g.notification=a):this.C(this.Y(),
772
772
  Ih,a)):h===f?(g=new olympe.dc.query.Mp(a.i),a.l.forEach(g.F.bind(g)),this.C(this.Y(),f,g)):h===d?(g=olympe.dc.transaction.ug.C.ik,c=0<a.s?a.info.error.reason:null,this.C(this.Y(),Nh,{id:a.i,finalize:g,error:c})):h===e?(g=this.F.get(a.i))&&g.Vx(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.Y(),g,{NC:c,dD:b,ZC:a}))}};olympe.H.bh.F={Wz:1,XA:2};olympe.H.bh.C={100:'Insufficient Rights',200:'Constraints',300:'IOException',400:'Unexpected',500:'Non Existing Subscription'};olympe.H.$j=class{constructor(){}};olympe.H.$j.la=[olympe.dc.ba.$j];olympe.H.wa={};function Zh(a,b,c){Tb(a.C,b,d=>{d=new olympe.H.wa.Jb.Request(d.dest,d.src,d.auth,d.seq,d.type,d.content);return c(d)})}function $h(a,b,c){a.N.set(b,c)}function ai(a,b){return new Promise((c,d)=>{Ub(a.C,b,e=>e?d(e):c())})}function bi(a,b){return new Promise((c,d)=>{a.V.rh(b.ed(),(e,f)=>e?d(e):c(f))})}
773
- olympe.H.wa.sa=class{constructor(a,b,c,d){this.L=a;this.V=c;a=new olympe.W.er(d.get('messageTimeout'));a.C=this.Z.bind(this);this.N=a;a=d.get('url');d=d.get('connectionOptions');this.C=new olympe.net.hk(a,d);this.G=1;this.F=olympe.W.lc()}connect(){return new Promise(a=>{Sb(this.C)?a():this.C.connect(()=>{Tb(this.C,this.F,b=>{b=new olympe.H.wa.Jb.Response(b.dest,b.src,b.seq,b.type,b.content);const c=this.N.get(b.G);c&&(this.N.delete(b.G),c(b))});a()})})}disconnect(){return new Promise(a=>this.C.end(!1,
773
+ olympe.H.wa.sa=class{constructor(a,b,c,d){this.L=a;this.V=c;a=new olympe.W.er(d.get('messageTimeout'));a.C=this.Z.bind(this);this.N=a;a=d.get('url');d=d.get('connectionOptions');this.C=new olympe.net.hk(a,d);this.G=1;this.F=olympe.W.mc()}connect(){return new Promise(a=>{Sb(this.C)?a():this.C.connect(()=>{Tb(this.C,this.F,b=>{b=new olympe.H.wa.Jb.Response(b.dest,b.src,b.seq,b.type,b.content);const c=this.N.get(b.G);c&&(this.N.delete(b.G),c(b))});a()})})}disconnect(){return new Promise(a=>this.C.end(!1,
774
774
  ()=>a()))}Le(a,b,c){return new Promise((d,e)=>{const f=a.source,g=new olympe.H.wa.Jb.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.Ya(nc(this.V));g=new olympe.H.wa.Jb.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.wa.Jb.Response(b,a,f,olympe.H.wa.Jb.Response.ja.Am,c);this.C.publish(b,
775
775
  f.ia(),void 0,g=>g?e(g):d())})}Z(a,b){b(new olympe.H.wa.Jb.Response(this.F,this.F,a,olympe.H.wa.Jb.Response.ja.qc,{reason:'Timeout'}))}};olympe.H.wa.Jb={};olympe.H.wa.Jb.Request=class{constructor(a,b,c,d,e,f){this.G=d;this.destination=a;this.source=b;this.N=c;this.C=e;this.F=f||null}ed(){return this.N}ia(){return{dest:this.destination,src:this.source,seq:this.G,auth:this.N,type:this.C,content:this.F}}toString(){return JSON.stringify(this)}};olympe.H.wa.Jb.Request.ja={SEND:0,GET:1,PUBLISH:2,SUBSCRIBE:3};olympe.H.wa.Jb.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.wa.Jb.Response.ja={Am:0,Mn:1,br:2,qc:3};olympe.H.wa.nb={};const ci=olympe.H.wa.Jb.Response.ja.Mn,di=olympe.H.wa.Jb.Response.ja.qc,ei=olympe.H.wa.Jb.Response.ja.Am,fi=olympe.H.wa.Jb.Response.ja.br,gi=olympe.H.wa.Jb.Request.ja.SEND,hi=olympe.H.wa.Jb.Request.ja.GET,ii=olympe.H.wa.Jb.Request.ja.PUBLISH,ji=olympe.H.wa.Jb.Request.ja.SUBSCRIBE;
776
776
  olympe.H.wa.nb.zb=class{constructor(a,b){this.C=olympe.H.wa.Qc();this.F=a;this.G=new olympe.D.Wb(`Service ${a}`,'function'===typeof b.Ec?b.Ec():b);this.L=olympe.pa.Xa(`Service ${this.F}`)}listen(){return new rxjs.Observable(a=>{const b=()=>{a.complete();ai(this.C,this.F).catch(c=>this.L.error('Failed to unsubscribe from '+this.F+', error: '+c))};this.G.onDestroy(b);this.C.connect().then(()=>{Zh(this.C,this.F,c=>a.next(new olympe.H.wa.nb.ga(c,this.C)))}).catch(c=>this.L.error('Failed to connect to the bus: '+
@@ -782,87 +782,87 @@ olympe.H.wa.nb.ga=class{constructor(a,b){this.request=a;this.C=b}Cj(){return bi(
782
782
  li,{reason:a.message})}};olympe.H.wa.nb.ga.prototype.fail=olympe.H.wa.nb.ga.prototype.zg;olympe.H.wa.nb.ga.prototype.notifyOn=olympe.H.wa.nb.ga.prototype.es;olympe.H.wa.nb.ga.prototype.reply=olympe.H.wa.nb.ga.prototype.Le;olympe.H.wa.nb.ga.prototype.ack=olympe.H.wa.nb.ga.prototype.Lk;olympe.H.wa.nb.ga.prototype.body=olympe.H.wa.nb.ga.prototype.body;olympe.H.wa.nb.ga.prototype.source=olympe.H.wa.nb.ga.prototype.source;olympe.H.wa.nb.ga.prototype.userTag=olympe.H.wa.nb.ga.prototype.Cj;olympe.H.oa={};function ri(a,b,c,d){c.c=b;a.C.Z(olympe.H.Uc.pf,c,d)}
783
783
  olympe.H.oa.Ta=class{constructor(a,b,c,d,e,f,g,h,k){this.L=a;this.C=b;this.F=h;this.ab=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())}V(a){this.C.Qf(a)}N(a){this.C.Wf(a)}Sa(a){this.C.qe(olympe.H.Uc.pf,'logoutHandler');this.C.Da(olympe.H.Uc.pf,b=>{const c=b.c;c===olympe.H.oa.Ta.C.Zt?(this.C.Xb(),a(olympe.auth.sa.F.Dj,b)):c===olympe.H.oa.Ta.C.Ku&&a(olympe.auth.sa.F.pp,
784
784
  b)},'logoutHandler')}Z(a,b){ri(this,olympe.H.oa.Ta.C.pf,{token:a.Kf()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.oa.Ta.C.qc:b(Error('Invalid token'));break;case olympe.H.oa.Ta.C.Si: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.jm(d,f,g,h))}b(null,c);break;default:b(Error('Unknown response from server'))}})}ra(a,b){ri(this,olympe.H.oa.Ta.C.tt,
785
- {I:a.Sd()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.oa.Ta.C.qc:b(Error(`Username '${a.Sd()}' invalid, or password does not match`));break;case olympe.H.oa.Ta.C.Su:c=d.payload;b(null,c.S,c.B);break;default:b(Error('Unknown response from server'))}})}Da(a,b){ri(this,olympe.H.oa.Ta.C.ys,{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.oa.Ta.C.qc:this.L.debug('Login failed, invalid username or password');b(Error('Invalid username or password'));
785
+ {I:a.Td()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.oa.Ta.C.qc:b(Error(`Username '${a.Td()}' invalid, or password does not match`));break;case olympe.H.oa.Ta.C.Su:c=d.payload;b(null,c.S,c.B);break;default:b(Error('Unknown response from server'))}})}Da(a,b){ri(this,olympe.H.oa.Ta.C.ys,{A:a.get('a'),M:a.get('m1'),I:a.Td()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.oa.Ta.C.qc:this.L.debug('Login failed, invalid username or password');b(Error('Invalid username or password'));
786
786
  break;case olympe.H.oa.Ta.C.Si:c=d.payload;this.L.debug('Login successful, creating token');d=c.payload?JSON.parse(c.payload):void 0;b(null,new olympe.auth.tf(c.userName,c.userTag,c.rndCook,d));break;default:b(Error(`Unknown response from server (type ${d.c})`))}})}ka(a){ri(this,olympe.H.oa.Ta.C.Re,{},(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.Ya(olympe.auth.Qc().C.Eb())||null;if(b instanceof
787
787
  olympe.auth.jm){const c=e=>{const f=Object.create(null);f.url=e;f.olympe_token=b.Kf();f.access_token=b.bk().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.Z(olympe.H.Uc.pf,{c:olympe.H.oa.Ta.C.$t},a)}ki(a){this.C.Z(olympe.H.Uc.pf,{c:olympe.H.oa.Ta.C.og},a)}rh(a,b,c){this.C.zc(this.ab+
788
- '/'+a,olympe.H.Uc.pf,b,!1,null,(d,e)=>{c(d,e)})}Ur(){return this.G}};olympe.H.oa.Ta.C={pf:1,$t:2,qc:3,og:5,Si:6,tt:10,Su:11,ys:12,Re:13,Ku:14,Zt:20};olympe.H.oa.Ta.la=[olympe.auth.Uu,olympe.auth.Hb.oa.Ji,olympe.auth.Hb.oa.Ee,olympe.auth.Hb.oa.Re];olympe.H.$={};olympe.H.$.Wc=function(){};olympe.H.$.Wc.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.$.wf=function(){};olympe.H.$.wf.prototype.ia=function(){};olympe.H.$.gb=function(){this.X={};this.Db={};this.U={};this.na=Object.create(null);var a=new olympe.H.$.X.Qb;this.X[O(olympe.dc.X.Qb)]=a;a=new olympe.H.$.X.Be;this.X[O(olympe.dc.X.Be)]=a;a=new olympe.H.$.X.Dc;this.X[O(olympe.dc.X.Dc)]=a;this.X[O(olympe.dc.X.Kd)]=new olympe.H.$.X.Kd;this.X[O(olympe.dc.X.rc)]=new olympe.H.$.X.rc;this.X[O(olympe.dc.X.$d)]=new olympe.H.$.X.$d;this.X[O(olympe.dc.X.xe)]=new olympe.H.$.X.xe;a=new olympe.H.$.Db.Number;this.Db[O(olympe.dc.Db.Number)]=a;a=new olympe.H.$.Db.String;
789
- this.Db[O(olympe.dc.Db.String)]=a;a=new olympe.H.$.U.Gc;this.U[O(olympe.dc.U.Gc)]=a;this.U[O(olympe.dc.U.ye)]=new olympe.H.$.U.ye;this.U[O(olympe.dc.U.Fe)]=new olympe.H.$.U.Fe;a=new olympe.H.$.U.Sc;this.U[O(olympe.dc.U.Sc)]=a;a=new olympe.H.$.U.xd;this.U[O(olympe.dc.U.xd)]=a;this.U[O(olympe.dc.U.kd)]=new olympe.H.$.U.kd;a=new olympe.H.$.U.kf;this.U[O(olympe.dc.U.kf)]=a;a=new olympe.H.$.U.lf;this.U[O(olympe.dc.U.lf)]=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)]=
788
+ '/'+a,olympe.H.Uc.pf,b,!1,null,(d,e)=>{c(d,e)})}Ur(){return this.G}};olympe.H.oa.Ta.C={pf:1,$t:2,qc:3,og:5,Si:6,tt:10,Su:11,ys:12,Re:13,Ku:14,Zt:20};olympe.H.oa.Ta.la=[olympe.auth.Uu,olympe.auth.Hb.oa.Ji,olympe.auth.Hb.oa.Ee,olympe.auth.Hb.oa.Re];olympe.H.$={};olympe.H.$.Wc=function(){};olympe.H.$.Wc.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.$.wf=function(){};olympe.H.$.wf.prototype.ia=function(){};olympe.H.$.gb=function(){this.X={};this.Db={};this.U={};this.na=Object.create(null);var a=new olympe.H.$.X.Qb;this.X[O(olympe.dc.X.Qb)]=a;a=new olympe.H.$.X.Be;this.X[O(olympe.dc.X.Be)]=a;a=new olympe.H.$.X.Dc;this.X[O(olympe.dc.X.Dc)]=a;this.X[O(olympe.dc.X.Ld)]=new olympe.H.$.X.Ld;this.X[O(olympe.dc.X.rc)]=new olympe.H.$.X.rc;this.X[O(olympe.dc.X.$d)]=new olympe.H.$.X.$d;this.X[O(olympe.dc.X.xe)]=new olympe.H.$.X.xe;a=new olympe.H.$.Db.Number;this.Db[O(olympe.dc.Db.Number)]=a;a=new olympe.H.$.Db.String;
789
+ this.Db[O(olympe.dc.Db.String)]=a;a=new olympe.H.$.U.Gc;this.U[O(olympe.dc.U.Gc)]=a;this.U[O(olympe.dc.U.ye)]=new olympe.H.$.U.ye;this.U[O(olympe.dc.U.Fe)]=new olympe.H.$.U.Fe;a=new olympe.H.$.U.Sc;this.U[O(olympe.dc.U.Sc)]=a;a=new olympe.H.$.U.xd;this.U[O(olympe.dc.U.xd)]=a;this.U[O(olympe.dc.U.kd)]=new olympe.H.$.U.kd;a=new olympe.H.$.U.kf;this.U[O(olympe.dc.U.kf)]=a;a=new olympe.H.$.U.lf;this.U[O(olympe.dc.U.lf)]=a;this.na[O(olympe.dc.na.Ed)]=new olympe.H.$.na.Ed;a=new olympe.H.$.na.ke;this.na[O(olympe.dc.na.ke)]=
790
790
  a;a=new olympe.H.$.na.oe;this.na[O(olympe.dc.na.oe)]=a;a=new olympe.H.$.na.ue;this.na[O(olympe.dc.na.ue)]=a;a=new olympe.H.$.na.je;this.na[O(olympe.dc.na.je)]=a;this.na[O(olympe.dc.na.sf)]=new olympe.H.$.na.sf};olympe.H.$.gb.prototype.constructor=olympe.H.$.gb;function si(a,b,c){var d=b.ma(),e=a.U[d];if(void 0===e)throw Error('No predicate registered for predicate: '+d);return e.ia(b,c,a)}
791
791
  function ti(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)}
792
792
  function ui(a,b){return a&&a.xf?'"$'+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.ss(),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.Of().valueOf()+',"g":'+a.If().valueOf()+',"b":'+a.Df().valueOf()+',"a":'+a.Cf().valueOf()+
793
- '}':a instanceof olympe.dc.Hc?'{"c":8,"t":"'+a.R()+'"}':JSON.stringify(a)};olympe.H.$.Wj=class{ia(a){const b=Object.create(null);b.i=a.Y();b.b=[a.C];b.m=!0;b.v=!0;b.f=a instanceof olympe.dc.query.Sl?Ue(a.sh):olympe.dc.Rb.NONE;b.q=lf(a).map(this.C.bind(this));return b}C(a){const b=a.Qd(),c=b.Oa()===olympe.dc.za.ORIGIN?olympe.H.$.X.Qb.C.Hi:olympe.H.$.X.Qb.C.Pi,d=Object.create(null);d.t=b.R();d.d=c;d.v=a.apply;d.r=b.recursive;d.q=a.lh().map(this.C.bind(this));return d}};olympe.H.$.X={};olympe.H.$.X.xe=class{ia(){return'{"y":15}'}};olympe.H.$.X.xe.la=[olympe.H.$.Wc];olympe.H.$.X.rc=function(){};olympe.H.$.X.rc.prototype.constructor=olympe.H.$.X.rc;olympe.H.$.X.rc.prototype.ia=function(a,b,c){return'{"y":21,"p":'+si(c,a.C,b)+'}'};olympe.H.$.X.rc.la=[olympe.H.$.Wc];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.Oa()?a.Oa()===olympe.dc.za.ORIGIN?olympe.H.$.X.Qb.C.Hi:olympe.H.$.X.Qb.C.Pi:olympe.H.$.X.Qb.C.Yn;return'{"y":12,"t":'+JSON.stringify(Xg(a))+',"d":'+b+'}'};olympe.H.$.X.Be.la=[olympe.H.$.Wc];olympe.H.$.X.Dc=function(){};olympe.H.$.X.Dc.prototype.constructor=olympe.H.$.X.Dc;olympe.H.$.X.Dc.prototype.ia=function(a){const b=null!==a.Oa()?a.Oa()===olympe.dc.za.ORIGIN?olympe.H.$.X.Qb.C.Hi:olympe.H.$.X.Qb.C.Pi:olympe.H.$.X.Qb.C.Yn;return'{"y":11,"t":"'+a.R()+'","d":'+b+',"s":'+a.F+',"e":'+a.C+'}'};olympe.H.$.X.Dc.la=[olympe.H.$.Wc];olympe.H.$.X.Qb=function(){};olympe.H.$.X.Qb.C={Yn:0,Hi:1,Pi:2};olympe.H.$.X.Qb.prototype.constructor=olympe.H.$.X.Qb;olympe.H.$.X.Qb.prototype.ia=function(a){const b=a.Oa()===olympe.dc.za.ORIGIN?olympe.H.$.X.Qb.C.Hi:olympe.H.$.X.Qb.C.Pi;return'{"y":10,"t":"'+a.R()+'","d":'+b+'}'};olympe.H.$.X.Qb.la=[olympe.H.$.Wc];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.Ld;const e=d.ma();var f=c.Db[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.$.Wc];olympe.H.$.X.$d=function(){};olympe.H.$.X.$d.prototype.constructor=olympe.H.$.X.$d;olympe.H.$.X.$d.prototype.ia=function(a,b){var c=a.start;c=c&&c.xf?'"$'+b.add(c)+'"':JSON.stringify(c);a=(a=a.C)&&a.xf?'"$'+b.add(a)+'"':JSON.stringify(a);return'{"y":22,"s":'+c+',"n":'+a+'}'};olympe.H.$.X.$d.la=[olympe.H.$.Wc];olympe.H.$.Db={};olympe.H.$.Db.Number=class{constructor(){}ia(a,b,c){return`{"y":11,"v":${ti(c,a.C,b)}}`}};olympe.H.$.Db.Number.la=[olympe.H.$.Ne];olympe.H.$.Db.String=class{constructor(){}ia(a,b,c){return`{"y":10,"v":${ti(c,a.C,b)}}`}};olympe.H.$.Db.String.la=[olympe.H.$.Ne];olympe.H.$.U={};olympe.H.$.U.Sc=function(){};olympe.H.$.U.Sc.prototype.constructor=olympe.H.$.U.Sc;olympe.H.$.U.Sc.prototype.ia=function(a,b,c){const d=ti(c,a.source,b);c=ti(c,a.getValue(),b);a=ui(a.G,b);return'{"y":20,"s":'+d+',"v":'+c+',"a":'+a+'}'};olympe.H.$.U.Sc.la=[olympe.H.$.$a];olympe.H.$.U.Gc=function(){};olympe.H.$.U.Gc.prototype.constructor=olympe.H.$.U.Gc;olympe.H.$.U.Gc.prototype.ia=function(a,b,c){const d=ti(c,a.G,b);a=ti(c,a.N,b);return'{"y":10,"l":'+d+',"r":'+a+'}'};olympe.H.$.U.Gc.la=[olympe.H.$.$a];olympe.H.$.U.ye=function(){};olympe.H.$.U.ye.prototype.constructor=olympe.H.$.U.ye;olympe.H.$.U.ye.prototype.ia=function(a,b,c){const d=ti(c,a.G,b);a=ti(c,a.N,b);return'{"y":11,"l":'+d+',"r":'+a+'}'};olympe.H.$.U.ye.la=[olympe.H.$.$a];olympe.H.$.U.kf=class{ia(a){const b=Rg(a).map(d=>'"'+d+'"'),c=Sg(a).map(d=>d===olympe.dc.za.DESTINATION?'2':'1');a=a.G;return'{"y":81,"r":['+b.toString()+'],"d":['+c.toString()+']'+(0!==a.length?',"t":"'+a.toString()+'"':'')+'}'}};olympe.H.$.U.kf.la=[olympe.H.$.$a];olympe.H.$.U.lf=class{ia(a){return'{"y":80,"m":['+Array.from(a.G).map(b=>'"'+b+'"').toString()+']}'}};olympe.H.$.U.lf.la=[olympe.H.$.$a];olympe.H.$.U.kd=class{ia(a,b,c){return'{"y":30,"p":'+si(c,a.G,b)+'}'}};olympe.H.$.U.kd.la=[olympe.H.$.$a];olympe.H.$.U.xd=class{ia(a,b,c){c=ti(c,a.source,b);const d=a.N;a=ui(a.G,b);return'{"y":23,"s":'+c+',"r":"'+d+'","a":'+a+'}'}};olympe.H.$.U.xd.la=[olympe.H.$.$a];olympe.H.$.U.Fe=function(){};olympe.H.$.U.Fe.prototype.constructor=olympe.H.$.U.Fe;olympe.H.$.U.Fe.prototype.ia=function(a,b,c){var d=ti(c,a.G,b);a=ti(c,a.N,b);return'{"y":12,"l":'+d+',"r":'+a+'}'};olympe.H.$.U.Fe.la=[olympe.H.$.$a];olympe.H.$.na={};olympe.H.$.na.Lc=function(){};olympe.H.$.na.Lc.prototype.constructor=olympe.H.$.na.Lc;olympe.H.$.na.Lc.prototype.C=function(){};
794
- olympe.H.$.na.Lc.prototype.ia=function(a,b,c){var d=ui(a.af,b),e=a.Od();e=e?',"b":'+ui(e,b):'';if(a=a.Dg()){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.Lc.la=[olympe.H.$.wf];olympe.H.$.na.ue=function(){olympe.H.$.na.Lc.call(this)};olympe.H.$.na.ue.prototype=Object.create(olympe.H.$.na.Lc.prototype);olympe.H.$.na.ue.prototype.constructor=olympe.H.$.na.ue;olympe.H.$.na.ue.prototype.C=function(){return 13};olympe.H.$.na.Dd=class{ia(a,b){return'{"y":10,"v":'+ui(a.value,b)+'}'}};olympe.H.$.na.Dd.la=[olympe.H.$.wf];olympe.H.$.na.je=function(){olympe.H.$.na.Lc.call(this)};olympe.H.$.na.je.prototype=Object.create(olympe.H.$.na.Lc.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.Lc.call(this)};olympe.H.$.na.ke.prototype=Object.create(olympe.H.$.na.Lc.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.Lc.call(this)};olympe.H.$.na.oe.prototype=Object.create(olympe.H.$.na.Lc.prototype);olympe.H.$.na.oe.prototype.constructor=olympe.H.$.na.oe;olympe.H.$.na.oe.prototype.C=function(){return 12};olympe.H.$.na.sf=class{ia(){return'{"y":19}'}};olympe.H.$.na.sf.la=[olympe.H.$.wf];olympe.H.sd={};function vi(a,b){a.L.info('Initializing SERVER layer');if(a.L.G()){const c=['Server layer parameters:'];b.forEach((d,e)=>{c.push(e+'="'+d+'"')});a.L.debug(c.join('\n\t'))}a.Da(olympe.H.Uc.qc,c=>{switch(c.c){case olympe.H.ja.fv:a.L.error('Unknown message sent to the server:',olympe.H.sa.F[c.s]);break;case olympe.H.ja.ft:a.L.error('Fatal error, the last message is probably too big according to the websocket config.'),a.F.forEach((d,e)=>{null!==d.Fn&&wi(a,e,c.i)})}});b.get('autoConnect')&&(a.L.debug('Connecting automatically'),
793
+ '}':a instanceof olympe.dc.Hc?'{"c":8,"t":"'+a.R()+'"}':JSON.stringify(a)};olympe.H.$.Wj=class{ia(a){const b=Object.create(null);b.i=a.Y();b.b=[a.C];b.m=!0;b.v=!0;b.f=a instanceof olympe.dc.query.Sl?Ue(a.sh):olympe.dc.Sb.NONE;b.q=lf(a).map(this.C.bind(this));return b}C(a){const b=a.Rd(),c=b.Oa()===olympe.dc.za.ORIGIN?olympe.H.$.X.Qb.C.Hi:olympe.H.$.X.Qb.C.Pi,d=Object.create(null);d.t=b.R();d.d=c;d.v=a.apply;d.r=b.recursive;d.q=a.lh().map(this.C.bind(this));return d}};olympe.H.$.X={};olympe.H.$.X.xe=class{ia(){return'{"y":15}'}};olympe.H.$.X.xe.la=[olympe.H.$.Wc];olympe.H.$.X.rc=function(){};olympe.H.$.X.rc.prototype.constructor=olympe.H.$.X.rc;olympe.H.$.X.rc.prototype.ia=function(a,b,c){return'{"y":21,"p":'+si(c,a.C,b)+'}'};olympe.H.$.X.rc.la=[olympe.H.$.Wc];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.Oa()?a.Oa()===olympe.dc.za.ORIGIN?olympe.H.$.X.Qb.C.Hi:olympe.H.$.X.Qb.C.Pi:olympe.H.$.X.Qb.C.Yn;return'{"y":12,"t":'+JSON.stringify(Xg(a))+',"d":'+b+'}'};olympe.H.$.X.Be.la=[olympe.H.$.Wc];olympe.H.$.X.Dc=function(){};olympe.H.$.X.Dc.prototype.constructor=olympe.H.$.X.Dc;olympe.H.$.X.Dc.prototype.ia=function(a){const b=null!==a.Oa()?a.Oa()===olympe.dc.za.ORIGIN?olympe.H.$.X.Qb.C.Hi:olympe.H.$.X.Qb.C.Pi:olympe.H.$.X.Qb.C.Yn;return'{"y":11,"t":"'+a.R()+'","d":'+b+',"s":'+a.F+',"e":'+a.C+'}'};olympe.H.$.X.Dc.la=[olympe.H.$.Wc];olympe.H.$.X.Qb=function(){};olympe.H.$.X.Qb.C={Yn:0,Hi:1,Pi:2};olympe.H.$.X.Qb.prototype.constructor=olympe.H.$.X.Qb;olympe.H.$.X.Qb.prototype.ia=function(a){const b=a.Oa()===olympe.dc.za.ORIGIN?olympe.H.$.X.Qb.C.Hi:olympe.H.$.X.Qb.C.Pi;return'{"y":10,"t":"'+a.R()+'","d":'+b+'}'};olympe.H.$.X.Qb.la=[olympe.H.$.Wc];olympe.H.$.X.Ld=function(){};olympe.H.$.X.Ld.prototype.constructor=olympe.H.$.X.Ld;olympe.H.$.X.Ld.prototype.ia=function(a,b,c){var d=a.Md;const e=d.ma();var f=c.Db[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.Ld.la=[olympe.H.$.Wc];olympe.H.$.X.$d=function(){};olympe.H.$.X.$d.prototype.constructor=olympe.H.$.X.$d;olympe.H.$.X.$d.prototype.ia=function(a,b){var c=a.start;c=c&&c.xf?'"$'+b.add(c)+'"':JSON.stringify(c);a=(a=a.C)&&a.xf?'"$'+b.add(a)+'"':JSON.stringify(a);return'{"y":22,"s":'+c+',"n":'+a+'}'};olympe.H.$.X.$d.la=[olympe.H.$.Wc];olympe.H.$.Db={};olympe.H.$.Db.Number=class{constructor(){}ia(a,b,c){return`{"y":11,"v":${ti(c,a.C,b)}}`}};olympe.H.$.Db.Number.la=[olympe.H.$.Ne];olympe.H.$.Db.String=class{constructor(){}ia(a,b,c){return`{"y":10,"v":${ti(c,a.C,b)}}`}};olympe.H.$.Db.String.la=[olympe.H.$.Ne];olympe.H.$.U={};olympe.H.$.U.Sc=function(){};olympe.H.$.U.Sc.prototype.constructor=olympe.H.$.U.Sc;olympe.H.$.U.Sc.prototype.ia=function(a,b,c){const d=ti(c,a.source,b);c=ti(c,a.getValue(),b);a=ui(a.G,b);return'{"y":20,"s":'+d+',"v":'+c+',"a":'+a+'}'};olympe.H.$.U.Sc.la=[olympe.H.$.$a];olympe.H.$.U.Gc=function(){};olympe.H.$.U.Gc.prototype.constructor=olympe.H.$.U.Gc;olympe.H.$.U.Gc.prototype.ia=function(a,b,c){const d=ti(c,a.G,b);a=ti(c,a.N,b);return'{"y":10,"l":'+d+',"r":'+a+'}'};olympe.H.$.U.Gc.la=[olympe.H.$.$a];olympe.H.$.U.ye=function(){};olympe.H.$.U.ye.prototype.constructor=olympe.H.$.U.ye;olympe.H.$.U.ye.prototype.ia=function(a,b,c){const d=ti(c,a.G,b);a=ti(c,a.N,b);return'{"y":11,"l":'+d+',"r":'+a+'}'};olympe.H.$.U.ye.la=[olympe.H.$.$a];olympe.H.$.U.kf=class{ia(a){const b=Rg(a).map(d=>'"'+d+'"'),c=Sg(a).map(d=>d===olympe.dc.za.DESTINATION?'2':'1');a=a.G;return'{"y":81,"r":['+b.toString()+'],"d":['+c.toString()+']'+(0!==a.length?',"t":"'+a.toString()+'"':'')+'}'}};olympe.H.$.U.kf.la=[olympe.H.$.$a];olympe.H.$.U.lf=class{ia(a){return'{"y":80,"m":['+Array.from(a.G).map(b=>'"'+b+'"').toString()+']}'}};olympe.H.$.U.lf.la=[olympe.H.$.$a];olympe.H.$.U.kd=class{ia(a,b,c){return'{"y":30,"p":'+si(c,a.G,b)+'}'}};olympe.H.$.U.kd.la=[olympe.H.$.$a];olympe.H.$.U.xd=class{ia(a,b,c){c=ti(c,a.source,b);const d=a.N;a=ui(a.G,b);return'{"y":23,"s":'+c+',"r":"'+d+'","a":'+a+'}'}};olympe.H.$.U.xd.la=[olympe.H.$.$a];olympe.H.$.U.Fe=function(){};olympe.H.$.U.Fe.prototype.constructor=olympe.H.$.U.Fe;olympe.H.$.U.Fe.prototype.ia=function(a,b,c){var d=ti(c,a.G,b);a=ti(c,a.N,b);return'{"y":12,"l":'+d+',"r":'+a+'}'};olympe.H.$.U.Fe.la=[olympe.H.$.$a];olympe.H.$.na={};olympe.H.$.na.Lc=function(){};olympe.H.$.na.Lc.prototype.constructor=olympe.H.$.na.Lc;olympe.H.$.na.Lc.prototype.C=function(){};
794
+ olympe.H.$.na.Lc.prototype.ia=function(a,b,c){var d=ui(a.af,b),e=a.Pd();e=e?',"b":'+ui(e,b):'';if(a=a.Dg()){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.Lc.la=[olympe.H.$.wf];olympe.H.$.na.ue=function(){olympe.H.$.na.Lc.call(this)};olympe.H.$.na.ue.prototype=Object.create(olympe.H.$.na.Lc.prototype);olympe.H.$.na.ue.prototype.constructor=olympe.H.$.na.ue;olympe.H.$.na.ue.prototype.C=function(){return 13};olympe.H.$.na.Ed=class{ia(a,b){return'{"y":10,"v":'+ui(a.value,b)+'}'}};olympe.H.$.na.Ed.la=[olympe.H.$.wf];olympe.H.$.na.je=function(){olympe.H.$.na.Lc.call(this)};olympe.H.$.na.je.prototype=Object.create(olympe.H.$.na.Lc.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.Lc.call(this)};olympe.H.$.na.ke.prototype=Object.create(olympe.H.$.na.Lc.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.Lc.call(this)};olympe.H.$.na.oe.prototype=Object.create(olympe.H.$.na.Lc.prototype);olympe.H.$.na.oe.prototype.constructor=olympe.H.$.na.oe;olympe.H.$.na.oe.prototype.C=function(){return 12};olympe.H.$.na.sf=class{ia(){return'{"y":19}'}};olympe.H.$.na.sf.la=[olympe.H.$.wf];olympe.H.sd={};function vi(a,b){a.L.info('Initializing SERVER layer');if(a.L.G()){const c=['Server layer parameters:'];b.forEach((d,e)=>{c.push(e+'="'+d+'"')});a.L.debug(c.join('\n\t'))}a.Da(olympe.H.Uc.qc,c=>{switch(c.c){case olympe.H.ja.fv:a.L.error('Unknown message sent to the server:',olympe.H.sa.F[c.s]);break;case olympe.H.ja.ft:a.L.error('Fatal error, the last message is probably too big according to the websocket config.'),a.F.forEach((d,e)=>{null!==d.Fn&&wi(a,e,c.i)})}});b.get('autoConnect')&&(a.L.debug('Connecting automatically'),
795
795
  a.connect());olympe.D.nn(a.V.Eb(),()=>{a.Xf.forEach(c=>c());Jb(a.ji.bind(a),a.Yx);Jb(a.Ve.bind(a),a.He)},()=>{a.aa=null;a.Pf.forEach(c=>c(a.G[2]));a.Ve()});a.L.log('DONE initializing SERVER layer (waiting for NET layer connection to be opened)')}
796
- function xi(a,b){if(a.C!==b)switch(a.L.debug('State change '+a.C+' --\x3e '+b),a.C=b,b){case olympe.H.sa.C.CONNECTING:break;case olympe.H.sa.C.ui:a.V.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.qc:a.L.error('Connection to server',a.ra.C(),'aborted due to error');a.V.update(olympe.D.qa.C);break;case olympe.H.sa.C.hg:a.V.update(olympe.D.qa.C);a.Ab&&(a.L.info('Disconnected, will try to auto reconnect in',a.cc,'ms'),Ib(()=>{a.connect()},a.cc));
796
+ function xi(a,b){if(a.C!==b)switch(a.L.debug('State change '+a.C+' --\x3e '+b),a.C=b,b){case olympe.H.sa.C.CONNECTING:break;case olympe.H.sa.C.ui:a.V.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.qc:a.L.error('Connection to server',a.ra.C(),'aborted due to error');a.V.update(olympe.D.qa.C);break;case olympe.H.sa.C.hg:a.V.update(olympe.D.qa.C);a.Ab&&(a.L.info('Disconnected, will try to auto reconnect in',a.ec,'ms'),Ib(()=>{a.connect()},a.ec));
797
797
  break;default:throw Error('State machine error in server manager. Should not get in state '+b);}}
798
798
  function yi(a,b){const c=olympe.H.sa.N.Si,d=olympe.H.sa.N.iu;return e=>{if(null!==e&&void 0!==e){var f=null,g=e.s;if(g===d)a.L.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}`);
799
799
  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 zi(a,b,c){var d=c.message;a.L.G()&&a.L.debug('>',Ai(d));(d=a.N.send(JSON.stringify(d)))?null===c.Yh?a.F.delete(b):c.Fn=Date.now():xi(a,olympe.H.sa.C.Yg);return d}
800
800
  function Ai(a){var b=JSON.parse(JSON.stringify(a));a=olympe.W.Sr;const c=b.messageFamily,d=a(olympe.H.Uc,c),e=b.payload;b='';switch(c){case olympe.H.Uc.vi:b=a(olympe.dc.ga.ja,e.c);break;case olympe.H.Uc.qc:b=a(olympe.H.ja,e.c);break;case olympe.H.Uc.pf:b=a(olympe.H.oa.Ta.C,e.c);break;case olympe.H.Uc.Ei:2===e.c&&(b=a(olympe.H.sa.G,e.status))}a=`${d} message`;b&&0<b.length&&(a+=` with payload "${b}"`);return a}
801
801
  function wi(a,b,c){if(a.F.has(b)){const {Yh:d}=a.F.get(b);a.F.delete(b);d&&d({s:23,info:c})}}function Bi(a,b){a.L.error(b);xi(a,olympe.H.sa.C.qc)}function Ci(a,b,c){a.L.info('Connected to',a.ra.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(!zi(a,d,e))return;xi(a,olympe.H.sa.C.ui)}
802
- olympe.H.sd.sa=class{constructor(a,b,c,d){this.L=a;this.ce=b;this.ra=c;this.N=null;this.config=d;this.cc=this.config.get('reconnectionDelay');this.Yx=this.config.get('pingInterval');this.by=this.cc/2;this.Ab=d.get('autoConnect');this.cy=d.get('retryHttpOverload');this.He=d.get('messageTimeout');this.ka=Ka(d.get('clientVersion'));this.ab=Ka(d.get('serverVersion'));this.C=olympe.H.sa.C.INIT;this.Xc=d.get('getContextMode');this.wh=1;this.aa=null;this.G=[0,0,0];this.Sa=new Map;this.V=olympe.D.Kc(olympe.D.qa,
803
- 'Server is online');this.Xf=new Map;this.Pf=new Map;this.F=new Map;this.Nx=new Map;vi(this,d)}bb(){return this.C===olympe.H.sa.C.ui}connect(){const a=olympe.H.sa.C.CONNECTING,b=olympe.H.sa.C.ui,c=olympe.H.sa.C.hg,d=olympe.H.sa.C.Yg,e=olympe.H.sa.C.qc;null!==this.N&&(this.N.V(null),this.N.close());this.Ab=!0;this.L.log(`Asking NET layer for a connection to ${Lb(this.ra)}:${this.ra.port}...`);this.N=this.ce.aa(this.ra);this.N.ka(this.Xb.bind(this));this.N.aa(this.Nd.bind(this));this.N.V(()=>{this.N=
804
- null;this.C===b?xi(this,d):this.C!==e&&xi(this,c)});this.C!==d&&xi(this,a)}disconnect(){const a=olympe.H.sa.C.CONNECTING;if(this.C===olympe.H.sa.C.ui||this.C===a)this.Ab=!1,xi(this,olympe.H.sa.C.hg)}Qf(a){const b=olympe.W.lc();this.Xf.set(b,a);olympe.D.Ya(this.V)===olympe.D.qa.F&&a()}Wf(a){var b;void 0===b&&(b=olympe.W.lc());this.Pf.set(b,a);olympe.D.Ya(this.V)===olympe.D.qa.C&&a(this.G[1])}Xb(){this.L.debug('Websocket connected, sending handshake. Client version:',La(this.ka),'subscribeEverything:',
802
+ olympe.H.sd.sa=class{constructor(a,b,c,d){this.L=a;this.ce=b;this.ra=c;this.N=null;this.config=d;this.ec=this.config.get('reconnectionDelay');this.Yx=this.config.get('pingInterval');this.by=this.ec/2;this.Ab=d.get('autoConnect');this.cy=d.get('retryHttpOverload');this.He=d.get('messageTimeout');this.ka=Ka(d.get('clientVersion'));this.ab=Ka(d.get('serverVersion'));this.C=olympe.H.sa.C.INIT;this.Xc=d.get('getContextMode');this.wh=1;this.aa=null;this.G=[0,0,0];this.Sa=new Map;this.V=olympe.D.Kc(olympe.D.qa,
803
+ 'Server is online');this.Xf=new Map;this.Pf=new Map;this.F=new Map;this.Nx=new Map;vi(this,d)}bb(){return this.C===olympe.H.sa.C.ui}connect(){const a=olympe.H.sa.C.CONNECTING,b=olympe.H.sa.C.ui,c=olympe.H.sa.C.hg,d=olympe.H.sa.C.Yg,e=olympe.H.sa.C.qc;null!==this.N&&(this.N.V(null),this.N.close());this.Ab=!0;this.L.log(`Asking NET layer for a connection to ${Lb(this.ra)}:${this.ra.port}...`);this.N=this.ce.aa(this.ra);this.N.ka(this.Xb.bind(this));this.N.aa(this.Od.bind(this));this.N.V(()=>{this.N=
804
+ null;this.C===b?xi(this,d):this.C!==e&&xi(this,c)});this.C!==d&&xi(this,a)}disconnect(){const a=olympe.H.sa.C.CONNECTING;if(this.C===olympe.H.sa.C.ui||this.C===a)this.Ab=!1,xi(this,olympe.H.sa.C.hg)}Qf(a){const b=olympe.W.mc();this.Xf.set(b,a);olympe.D.Ya(this.V)===olympe.D.qa.F&&a()}Wf(a){var b;void 0===b&&(b=olympe.W.mc());this.Pf.set(b,a);olympe.D.Ya(this.V)===olympe.D.qa.C&&a(this.G[1])}Xb(){this.L.debug('Websocket connected, sending handshake. Client version:',La(this.ka),'subscribeEverything:',
805
805
  this.Xc?'NO':'YES');this.Z(olympe.H.Uc.Ei,{c:olympe.H.ja.Ei,cv:La(this.ka),m:this.Xc?0:1,s:this.aa},this.Fx.bind(this))}Z(a,b,c){const d=this.wh;this.wh++;b={message:{seqId:d,messageFamily:a,payload:b},Yh:c?yi(this,c):null,Fn:null};this.F.set(d,b);c=[olympe.H.sa.C.CONNECTING,olympe.H.sa.C.Yg];(this.bb()||a===olympe.H.Uc.Ei&&c.includes(this.C))&&zi(this,d,b)}zc(a,b,c,d,e,f){c&&''!==c||this.L.warn('Trying to send an http request with an invalid authorizationToken');const g=Ob(a);if(e){g.method=olympe.net.eb.ae.mm;
806
- e=d?e:{messageFamily:b,seqId:1,payload:e};const k=JSON.stringify(e);g.body=k;Pb(g,{'Content-Type':'application/json'});this.L.log('HTTP POST >',Ai(e))}else this.L.log('HTTP GET call to',a);g.F=olympe.net.eb.ResponseType.zk;Pb(g,{Authorization:c});const h=()=>{this.ce.C(g,k=>{switch(k.Rd()){case olympe.net.eb.od.Lh:case olympe.net.eb.od.zl:case olympe.net.eb.od.Dj:k=k.getData();if(b!==olympe.H.Uc.vi||d){f&&f(null,k);break}k=this.Nd(k);f&&f(k);k&&this.L.error(k.message);break;case olympe.net.eb.od.Mu:Ib(h,
807
- this.cy);break;case olympe.net.eb.od.Gs:this.L.debug(`HTTP request canceled (${a}).`);f&&f(null);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.lc());let d=this.Sa.get(a);void 0===d&&(d=new Map,this.Sa.set(a,d));d.set(c,b)}qe(a,b){a=this.Sa.get(a);void 0!==a&&a.delete(b)}Fx(a,b){if(a)Bi(this,'Error in receiving handshake response: '+a.message);else{this.L.debug('Handshake response received');var c=olympe.H.sa.G;
806
+ e=d?e:{messageFamily:b,seqId:1,payload:e};const k=JSON.stringify(e);g.body=k;Pb(g,{'Content-Type':'application/json'});this.L.log('HTTP POST >',Ai(e))}else this.L.log('HTTP GET call to',a);g.F=olympe.net.eb.ResponseType.zk;Pb(g,{Authorization:c});const h=()=>{this.ce.C(g,k=>{switch(k.Sd()){case olympe.net.eb.od.Lh:case olympe.net.eb.od.zl:case olympe.net.eb.od.Dj:k=k.getData();if(b!==olympe.H.Uc.vi||d){f&&f(null,k);break}k=this.Od(k);f&&f(k);k&&this.L.error(k.message);break;case olympe.net.eb.od.Mu:Ib(h,
807
+ this.cy);break;case olympe.net.eb.od.Gs:this.L.debug(`HTTP request canceled (${a}).`);f&&f(null);break;default:k=Error(`Server is currently not available, http status: ${k.Sd()}`),f&&f(k)}})};h()}Da(a,b,c){void 0===c&&(c=olympe.W.mc());let d=this.Sa.get(a);void 0===d&&(d=new Map,this.Sa.set(a,d));d.set(c,b)}qe(a,b){a=this.Sa.get(a);void 0!==a&&a.delete(b)}Fx(a,b){if(a)Bi(this,'Error in receiving handshake response: '+a.message);else{this.L.debug('Handshake response received');var c=olympe.H.sa.G;
808
808
  a=b.sv||'undefined';var d=b.activityTimeout?Math.max(b.activityTimeout-60,5):null;switch(b.status){case c.zt:Bi(this,`Framework version (${La(this.ka)}) provided to the orchestrator was not valid. See orchestrator logs for more info.`);return;case c.Yu:Bi(this,`Framework version (${La(this.ka)}) is not compatible with the orchestrator in use. See orchestrator logs for more info.`);return;case c.mt:Bi(this,'Handshake failed. See orchestrator logs for more info.');return}if(this.ab.qb(olympe.W.Vh.C))this.L.warn('Handshake successful but received server version',
809
809
  a,'is invalid. Cannot check against it');else try{var e=Ka(a);if(e.zj(this.ab)){Bi(this,`Framework v${La(this.ka)} is expecting Orchestrator to be at least in v${La(this.ab)}`);return}this.L.log('Handshake successful. Orchestrator version: ',e,'required:',La(this.ab))}catch(f){Bi(this,f);return}e=olympe.H.sa.C.hg;if(this.C===olympe.H.sa.C.Yg&&null!==this.aa&&this.aa!==b.sessionId)this.L.warn('Trying to do a session recovering, but got another session id so retry from disconnected state'),xi(this,
810
- e);else{if(e=b.identityProviders)for(const [f,g]of Object.entries(e))this.Nx.set(f,g);this.aa=b.sessionId||null;Ci(this,a,d)}}}ji(){this.G[0]-this.G[1]>this.by?(this.L.debug('Ping did not get answer, try to reconnect'),xi(this,olympe.H.sa.C.Yg)):(this.L.debug('Sending Ping'),this.G[0]=Date.now(),this.N.send('ping')||(this.L.debug('Impossible to send ping, try to reconnect'),xi(this,olympe.H.sa.C.Yg)))}Nd(a){this.G[2]=Date.now();if(a.startsWith('pong'))return this.G[1]=this.G[2],null;try{var b=JSON.parse(a)}catch(d){return this.L.error('Unable to parse response from server: '+
810
+ e);else{if(e=b.identityProviders)for(const [f,g]of Object.entries(e))this.Nx.set(f,g);this.aa=b.sessionId||null;Ci(this,a,d)}}}ji(){this.G[0]-this.G[1]>this.by?(this.L.debug('Ping did not get answer, try to reconnect'),xi(this,olympe.H.sa.C.Yg)):(this.L.debug('Sending Ping'),this.G[0]=Date.now(),this.N.send('ping')||(this.L.debug('Impossible to send ping, try to reconnect'),xi(this,olympe.H.sa.C.Yg)))}Od(a){this.G[2]=Date.now();if(a.startsWith('pong'))return this.G[1]=this.G[2],null;try{var b=JSON.parse(a)}catch(d){return this.L.error('Unable to parse response from server: '+
811
811
  d.toString()),Error('Unable to parse response from server')}this.L.G()&&this.L.debug('<',Ai(b));a=b.seqId;const c=b.messageFamily;b=b.payload;if(this.F.has(a)){const {Yh: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}Ve(){const a=Date.now();for(const [b,{Fn:c}]of this.F)null!==c&&a-c>this.He&&(this.L.warn(`No response was received from the server for the seqId = ${b}`),wi(this,b,{error:{reason:'Message timeout: never receive acknowledge'}}))}};
812
812
  olympe.H.sa.N={Si:0,iu:18,Xz:23};
813
813
  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',
814
- 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.sd.sa.la=[olympe.H.sa];olympe.H.O={va:'server.Manager',ao:'server.bus.Manager',Ea:'server.Logger',Jd:'server.Source',Rg:'server.FileSource',vp:'server.ImportFileSvcHttpRequest',Xn:'server.BackupSvcHttpRequest',gq:'server.OpenIDSvcHttpRequest',Xo:'server.GetContextSvcPathRequest',sp:'server.ImplicitGDSvcPathRequest',Jo:'server.ExplicitGDSvcPathRequest',dr:'server.TransactionOverHttpPathRequest',qr:'server.UserTokenRequest',mr:'server.UserTagRequest',kr:'server.UserRolesRequest',Gq:'server.RoleMembersRequest',Fh:'server.IOUrlsProvider',
814
+ 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.sd.sa.la=[olympe.H.sa];olympe.H.O={va:'server.Manager',ao:'server.bus.Manager',Ea:'server.Logger',Kd:'server.Source',Rg:'server.FileSource',vp:'server.ImportFileSvcHttpRequest',Xn:'server.BackupSvcHttpRequest',gq:'server.OpenIDSvcHttpRequest',Xo:'server.GetContextSvcPathRequest',sp:'server.ImplicitGDSvcPathRequest',Jo:'server.ExplicitGDSvcPathRequest',dr:'server.TransactionOverHttpPathRequest',qr:'server.UserTokenRequest',mr:'server.UserTagRequest',kr:'server.UserRolesRequest',Gq:'server.RoleMembersRequest',Fh:'server.IOUrlsProvider',
815
815
  Po:'server.fileSvcUrl',mq:'communication.peerFileSvcUrl'};olympe.H.td={oi:'server.connectors.Auth',CA:'server.connectors.Signaling'};
816
- olympe.H.Config={vd:'server.host',Id:'server.port',yd:'server.ssl',On:'server.autoConnect',zq:'server.reconnectionDelay',qq:'server.pingInterval',Cm:'server.messageTimeout',Eq:'server.retryHttpOnOverload',jo:'server.clientVersion',Mq:'server.serverVersion',$n:'bus.host',bo:'bus.path',co:'bus.port',eo:'bus.vhost',og:'bus.keepalive',Hu:'bus.reschedulePings',Ks:'bus.clientId',Is:'bus.clean',Du:'bus.reconnectPeriod',Ms:'bus.connectTimeout',ir:'bus.username',kq:'bus.password',zu:'bus.queueQoSZero'};
817
- olympe.H.ob={Cd:'server.basePath',ur:'server.wsPath',No:'server.filePath',up:'server.importFilePath',Wn:'server.backupSvcPath',fq:'server.openIDSvcPath',Wo:'server.GetContextSvcPath',tp:'server.ImplicitGraphdefSvcPath',Ko:'server.ExplicitGraphdefSvcPath',cr:'server.TransactionOverHttpPath',nr:'server.userTokenSvcPath',lr:'server.userTagPath',jr:'server.userRolesPath',Fq:'server.roleMembersPath',lm:'communication.peerFileSvcPath'};
818
- olympe.T.config(function(a){var b='object'===typeof window&&window.location&&window.location.hostname||'localhost';const c='localhost'===b;E(a,olympe.H.Config.vd,b);E(a,olympe.H.Config.Id,c?8080:443);E(a,olympe.H.Config.yd,'localhost'!==b);E(a,olympe.H.ob.Cd,'OlympeServer');E(a,olympe.H.ob.ur,'websocket');E(a,olympe.H.ob.No,'rest/filesvc');E(a,olympe.H.ob.up,'rest/importsvc');E(a,olympe.H.ob.Wn,'rest/backupsvc');E(a,olympe.H.ob.fq,'rest/openid');E(a,olympe.H.ob.Wo,'rest/initialData');E(a,olympe.H.ob.tp,
816
+ olympe.H.Config={vd:'server.host',Jd:'server.port',yd:'server.ssl',On:'server.autoConnect',zq:'server.reconnectionDelay',qq:'server.pingInterval',Cm:'server.messageTimeout',Eq:'server.retryHttpOnOverload',jo:'server.clientVersion',Mq:'server.serverVersion',$n:'bus.host',bo:'bus.path',co:'bus.port',eo:'bus.vhost',og:'bus.keepalive',Hu:'bus.reschedulePings',Ks:'bus.clientId',Is:'bus.clean',Du:'bus.reconnectPeriod',Ms:'bus.connectTimeout',ir:'bus.username',kq:'bus.password',zu:'bus.queueQoSZero'};
817
+ olympe.H.ob={Dd:'server.basePath',ur:'server.wsPath',No:'server.filePath',up:'server.importFilePath',Wn:'server.backupSvcPath',fq:'server.openIDSvcPath',Wo:'server.GetContextSvcPath',tp:'server.ImplicitGraphdefSvcPath',Ko:'server.ExplicitGraphdefSvcPath',cr:'server.TransactionOverHttpPath',nr:'server.userTokenSvcPath',lr:'server.userTagPath',jr:'server.userRolesPath',Fq:'server.roleMembersPath',lm:'communication.peerFileSvcPath'};
818
+ olympe.T.config(function(a){var b='object'===typeof window&&window.location&&window.location.hostname||'localhost';const c='localhost'===b;E(a,olympe.H.Config.vd,b);E(a,olympe.H.Config.Jd,c?8080:443);E(a,olympe.H.Config.yd,'localhost'!==b);E(a,olympe.H.ob.Dd,'OlympeServer');E(a,olympe.H.ob.ur,'websocket');E(a,olympe.H.ob.No,'rest/filesvc');E(a,olympe.H.ob.up,'rest/importsvc');E(a,olympe.H.ob.Wn,'rest/backupsvc');E(a,olympe.H.ob.fq,'rest/openid');E(a,olympe.H.ob.Wo,'rest/initialData');E(a,olympe.H.ob.tp,
819
819
  'rest/querysvc/graphDefImplicit');E(a,olympe.H.ob.Ko,'rest/querysvc/graphDefExplicit');E(a,olympe.H.ob.cr,'rest/transaction');E(a,olympe.H.ob.nr,'rest/token');E(a,olympe.H.ob.lr,'rest/authorization/getUserTag');E(a,olympe.H.ob.jr,'rest/authorization/getUserRoles');E(a,olympe.H.ob.Fq,'rest/authorization/roleMembers');E(a,olympe.H.Config.On,!0);E(a,olympe.H.Config.zq,5E3);E(a,olympe.H.Config.qq,5E3);E(a,olympe.H.Config.Cm,15E3);E(a,olympe.H.Config.Eq,5E3);E(a,olympe.H.Config.Mq,'6.3.0');E(a,olympe.H.Config.$n,
820
820
  '');E(a,olympe.H.Config.bo,c?'':'/mqtt');E(a,olympe.H.Config.co,c?15675:443);E(a,olympe.H.Config.eo,c?'/':'');E(a,olympe.H.Config.ir,'guest');E(a,olympe.H.Config.kq,'guest');E(a,olympe.H.Config.og,30);E(a,olympe.H.ob.lm,'nodes/files');b=a.getParameter(olympe.Gg.Config.To);if(void 0!==b)ua(a,b);else throw Error('Framework version could not be found! Is field "olympe-framework" present in version.json?');C(a,olympe.H.O.Ea,[olympe.pa.O.va],d=>d.Nc('communication'));C(a,'server.WebSocketRequest',[new olympe.T.fa(olympe.H.Config.vd),
821
- new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.yd),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.Zj(d,e,`${g}${h?'/'+h:''}`.replace(/\/+/g,'/').replace(/\/$/,''),f)).C();C(a,olympe.H.O.vp,[new olympe.T.fa(olympe.H.Config.vd),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.yd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.up)],
822
- b);C(a,olympe.H.O.Xn,[new olympe.T.fa(olympe.H.Config.vd),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.yd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.Wn)],b);C(a,olympe.H.O.gq,[new olympe.T.fa(olympe.H.Config.vd),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.yd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.fq)],b);C(a,olympe.H.O.Xo,[new olympe.T.fa(olympe.H.Config.vd),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.yd),
823
- new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.Wo)],b);C(a,olympe.H.O.sp,[new olympe.T.fa(olympe.H.Config.vd),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.yd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.tp)],b);C(a,olympe.H.O.Jo,[new olympe.T.fa(olympe.H.Config.vd),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.yd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.Ko)],b);C(a,olympe.H.O.dr,[new olympe.T.fa(olympe.H.Config.vd),
824
- new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.yd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.cr)],b);C(a,olympe.H.O.qr,[new olympe.T.fa(olympe.H.Config.vd),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.yd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.nr)],b);C(a,olympe.H.O.mr,[new olympe.T.fa(olympe.H.Config.vd),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.yd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.lr)],
825
- b);C(a,olympe.H.O.kr,[new olympe.T.fa(olympe.H.Config.vd),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.yd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.jr)],b);C(a,olympe.H.O.Gq,[new olympe.T.fa(olympe.H.Config.vd),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.yd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.Fq)],b);C(a,olympe.H.O.Po,[new olympe.T.fa(olympe.H.Config.vd),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.yd),
826
- new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.No)],b);C(a,olympe.H.O.mq,[new olympe.T.fa(olympe.net.Config.Nl),new olympe.T.fa(olympe.net.Config.Ol),new olympe.T.fa(olympe.net.Config.mp),new olympe.T.fa(olympe.H.ob.lm)],b);C(a,'server.ManagerConfig',[new olympe.T.fa(olympe.H.Config.On),new olympe.T.fa(olympe.H.Config.zq),new olympe.T.fa(olympe.H.Config.qq),new olympe.T.fa(olympe.H.Config.Cm),new olympe.T.fa(olympe.H.Config.jo),new olympe.T.fa(olympe.H.Config.Mq),new olympe.T.fa(olympe.dc.Config.$g),
821
+ new olympe.T.fa(olympe.H.Config.Jd),new olympe.T.fa(olympe.H.Config.yd),new olympe.T.fa(olympe.H.ob.Dd),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.Zj(d,e,`${g}${h?'/'+h:''}`.replace(/\/+/g,'/').replace(/\/$/,''),f)).C();C(a,olympe.H.O.vp,[new olympe.T.fa(olympe.H.Config.vd),new olympe.T.fa(olympe.H.Config.Jd),new olympe.T.fa(olympe.H.Config.yd),new olympe.T.fa(olympe.H.ob.Dd),new olympe.T.fa(olympe.H.ob.up)],
822
+ b);C(a,olympe.H.O.Xn,[new olympe.T.fa(olympe.H.Config.vd),new olympe.T.fa(olympe.H.Config.Jd),new olympe.T.fa(olympe.H.Config.yd),new olympe.T.fa(olympe.H.ob.Dd),new olympe.T.fa(olympe.H.ob.Wn)],b);C(a,olympe.H.O.gq,[new olympe.T.fa(olympe.H.Config.vd),new olympe.T.fa(olympe.H.Config.Jd),new olympe.T.fa(olympe.H.Config.yd),new olympe.T.fa(olympe.H.ob.Dd),new olympe.T.fa(olympe.H.ob.fq)],b);C(a,olympe.H.O.Xo,[new olympe.T.fa(olympe.H.Config.vd),new olympe.T.fa(olympe.H.Config.Jd),new olympe.T.fa(olympe.H.Config.yd),
823
+ new olympe.T.fa(olympe.H.ob.Dd),new olympe.T.fa(olympe.H.ob.Wo)],b);C(a,olympe.H.O.sp,[new olympe.T.fa(olympe.H.Config.vd),new olympe.T.fa(olympe.H.Config.Jd),new olympe.T.fa(olympe.H.Config.yd),new olympe.T.fa(olympe.H.ob.Dd),new olympe.T.fa(olympe.H.ob.tp)],b);C(a,olympe.H.O.Jo,[new olympe.T.fa(olympe.H.Config.vd),new olympe.T.fa(olympe.H.Config.Jd),new olympe.T.fa(olympe.H.Config.yd),new olympe.T.fa(olympe.H.ob.Dd),new olympe.T.fa(olympe.H.ob.Ko)],b);C(a,olympe.H.O.dr,[new olympe.T.fa(olympe.H.Config.vd),
824
+ new olympe.T.fa(olympe.H.Config.Jd),new olympe.T.fa(olympe.H.Config.yd),new olympe.T.fa(olympe.H.ob.Dd),new olympe.T.fa(olympe.H.ob.cr)],b);C(a,olympe.H.O.qr,[new olympe.T.fa(olympe.H.Config.vd),new olympe.T.fa(olympe.H.Config.Jd),new olympe.T.fa(olympe.H.Config.yd),new olympe.T.fa(olympe.H.ob.Dd),new olympe.T.fa(olympe.H.ob.nr)],b);C(a,olympe.H.O.mr,[new olympe.T.fa(olympe.H.Config.vd),new olympe.T.fa(olympe.H.Config.Jd),new olympe.T.fa(olympe.H.Config.yd),new olympe.T.fa(olympe.H.ob.Dd),new olympe.T.fa(olympe.H.ob.lr)],
825
+ b);C(a,olympe.H.O.kr,[new olympe.T.fa(olympe.H.Config.vd),new olympe.T.fa(olympe.H.Config.Jd),new olympe.T.fa(olympe.H.Config.yd),new olympe.T.fa(olympe.H.ob.Dd),new olympe.T.fa(olympe.H.ob.jr)],b);C(a,olympe.H.O.Gq,[new olympe.T.fa(olympe.H.Config.vd),new olympe.T.fa(olympe.H.Config.Jd),new olympe.T.fa(olympe.H.Config.yd),new olympe.T.fa(olympe.H.ob.Dd),new olympe.T.fa(olympe.H.ob.Fq)],b);C(a,olympe.H.O.Po,[new olympe.T.fa(olympe.H.Config.vd),new olympe.T.fa(olympe.H.Config.Jd),new olympe.T.fa(olympe.H.Config.yd),
826
+ new olympe.T.fa(olympe.H.ob.Dd),new olympe.T.fa(olympe.H.ob.No)],b);C(a,olympe.H.O.mq,[new olympe.T.fa(olympe.net.Config.Nl),new olympe.T.fa(olympe.net.Config.Ol),new olympe.T.fa(olympe.net.Config.mp),new olympe.T.fa(olympe.H.ob.lm)],b);C(a,'server.ManagerConfig',[new olympe.T.fa(olympe.H.Config.On),new olympe.T.fa(olympe.H.Config.zq),new olympe.T.fa(olympe.H.Config.qq),new olympe.T.fa(olympe.H.Config.Cm),new olympe.T.fa(olympe.H.Config.jo),new olympe.T.fa(olympe.H.Config.Mq),new olympe.T.fa(olympe.dc.Config.$g),
827
827
  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.vd),new olympe.T.fa(olympe.H.Config.$n),new olympe.T.fa(olympe.H.Config.bo),new olympe.T.fa(olympe.H.Config.co),new olympe.T.fa(olympe.H.Config.eo),new olympe.T.fa(olympe.H.Config.ir),new olympe.T.fa(olympe.H.Config.yd),
828
828
  new olympe.T.fa(olympe.H.Config.og),new olympe.T.fa(olympe.H.Config.Hu),new olympe.T.fa(olympe.H.Config.Ks),new olympe.T.fa(olympe.H.Config.Is),new olympe.T.fa(olympe.H.Config.Du),new olympe.T.fa(olympe.H.Config.Ms),new olympe.T.fa(olympe.H.Config.kq),new olympe.T.fa(olympe.H.Config.zu),new olympe.T.fa(olympe.H.Config.Cm)],(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'.split(' ');
829
- 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});B(a,olympe.H.O.va,olympe.H.sd.sa,olympe.H.O.Ea,olympe.net.O.va,'server.WebSocketRequest','server.ManagerConfig');B(a,olympe.H.td.oi,olympe.H.oa.Ta,olympe.H.O.Ea,olympe.H.O.va,olympe.H.O.qr,olympe.H.O.mr,olympe.H.O.kr,olympe.H.O.Gq,olympe.H.O.gq,olympe.auth.O.pk,olympe.hc.O.dk);B(a,olympe.H.O.ao,olympe.H.wa.sa,olympe.H.O.Ea,olympe.net.O.va,olympe.auth.O.va,
830
- 'server.bus.ManagerConfig');sa(a,olympe.auth.td.va,olympe.H.td.oi);sa(a,olympe.auth.td.Jp,olympe.H.td.oi);sa(a,olympe.auth.td.Ee,olympe.H.td.oi);sa(a,olympe.auth.td.Re,olympe.H.td.oi);B(a,olympe.H.O.Rg,olympe.H.Uj,olympe.H.O.Ea,olympe.net.O.va,olympe.auth.O.va,olympe.H.O.Po,olympe.H.O.mq);sa(a,olympe.Za.O.Rg,olympe.H.O.Rg);C(a,olympe.H.O.Jd,[olympe.pa.O.va,olympe.H.O.va,olympe.auth.O.va,olympe.Za.O.Rg,olympe.H.O.Xo,olympe.H.O.sp,olympe.H.O.Jo,olympe.H.O.dr],(d,e,f,g,h,k,l,n)=>new olympe.H.bh(d.Nc('server.source'),
831
- e,f,g,[h,k,l,n]));B(a,olympe.H.O.Fh,olympe.H.$j,olympe.H.O.vp,olympe.H.O.Xn);sa(a,olympe.dc.ba.O.Fh,olympe.H.O.Fh);sa(a,olympe.Za.O.xm,olympe.H.O.Jd)},'olympe.communication');olympe.T.run([olympe.H.O.ao],a=>{olympe.H.wa.Qc=()=>a});olympe.sc={};olympe.sc.O={Ea:'sc.Logger',vm:'sc.RootContext'};olympe.sc.Config={gf:'sc.app',eg:'sc.debug',Ws:'sc.disableTheme',PRODUCTION:'sc.production',eq:'sc.onstartTimeout',Dq:'sc.remoteActionTimeout',bq:'sc.offlineStart',fu:'google.apikey'};
829
+ 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});B(a,olympe.H.O.va,olympe.H.sd.sa,olympe.H.O.Ea,olympe.net.O.va,'server.WebSocketRequest','server.ManagerConfig');B(a,olympe.H.td.oi,olympe.H.oa.Ta,olympe.H.O.Ea,olympe.H.O.va,olympe.H.O.qr,olympe.H.O.mr,olympe.H.O.kr,olympe.H.O.Gq,olympe.H.O.gq,olympe.auth.O.pk,olympe.ic.O.dk);B(a,olympe.H.O.ao,olympe.H.wa.sa,olympe.H.O.Ea,olympe.net.O.va,olympe.auth.O.va,
830
+ 'server.bus.ManagerConfig');sa(a,olympe.auth.td.va,olympe.H.td.oi);sa(a,olympe.auth.td.Jp,olympe.H.td.oi);sa(a,olympe.auth.td.Ee,olympe.H.td.oi);sa(a,olympe.auth.td.Re,olympe.H.td.oi);B(a,olympe.H.O.Rg,olympe.H.Uj,olympe.H.O.Ea,olympe.net.O.va,olympe.auth.O.va,olympe.H.O.Po,olympe.H.O.mq);sa(a,olympe.Za.O.Rg,olympe.H.O.Rg);C(a,olympe.H.O.Kd,[olympe.pa.O.va,olympe.H.O.va,olympe.auth.O.va,olympe.Za.O.Rg,olympe.H.O.Xo,olympe.H.O.sp,olympe.H.O.Jo,olympe.H.O.dr],(d,e,f,g,h,k,l,n)=>new olympe.H.bh(d.Nc('server.source'),
831
+ e,f,g,[h,k,l,n]));B(a,olympe.H.O.Fh,olympe.H.$j,olympe.H.O.vp,olympe.H.O.Xn);sa(a,olympe.dc.ba.O.Fh,olympe.H.O.Fh);sa(a,olympe.Za.O.xm,olympe.H.O.Kd)},'olympe.communication');olympe.T.run([olympe.H.O.ao],a=>{olympe.H.wa.Qc=()=>a});olympe.sc={};olympe.sc.O={Ea:'sc.Logger',vm:'sc.RootContext'};olympe.sc.Config={gf:'sc.app',eg:'sc.debug',Ws:'sc.disableTheme',PRODUCTION:'sc.production',eq:'sc.onstartTimeout',Dq:'sc.remoteActionTimeout',bq:'sc.offlineStart',fu:'google.apikey'};
832
832
  olympe.T.config(a=>{E(a,olympe.sc.Config.gf,'');E(a,olympe.sc.Config.bq,!1);E(a,olympe.sc.Config.eg,!1);E(a,olympe.sc.Config.Ws,!1);E(a,olympe.sc.Config.PRODUCTION,!1);E(a,olympe.sc.Config.eq,2E4);E(a,olympe.sc.Config.fu,'AIzaSyD0rTnF3Tq-ZjgdaqyvC8Jg-RSgpZM2jBU');E(a,olympe.sc.Config.Dq,1E4);C(a,olympe.sc.O.Ea,[olympe.pa.O.va],b=>b.Nc('sc'));C(a,olympe.sc.O.vm,[new olympe.T.fa(olympe.sc.Config.PRODUCTION),new olympe.T.fa(olympe.sc.Config.eq)],b=>{const c=new olympe.sc.Ua('root','root',null);olympe.sc.ls=
833
- c;c.set(olympe.sc.Ua.lg.PRODUCTION,b);return c})},'olympe.sc');olympe.T.run([olympe.sc.O.vm],a=>{olympe.hj().ctx=a});olympe.sc.rn=()=>null!==olympe.dc.Na().fc(void 0,olympe.sc.Runnable.F.Pc());olympe.sc.xC=(a,b,c,d)=>{c=a.create(olympe.sc.Cc).setProperty(olympe.sc.Cc.C,c||null).setProperty(olympe.sc.Cc.N,d||null);a.Ra(olympe.sc.Cc.F,c,b);a.Ra(olympe.dc.CloudObject.containsRel,b,c);return c.R()};olympe.sc.ih=a=>{a=olympe.dc.W.Sb.ih(a);return a instanceof olympe.sc.Ce?a.C():a};olympe.sc.MC=a=>{a=olympe.dc.CloudObject.get(a.tag);return a instanceof olympe.sc.Ce?a.C():a};
834
- olympe.sc.JC=function(a){const b=olympe.dm.Pb.C.Pc(),c=olympe.dc.CloudObject.containsRel.Pc();var d=olympe.dc.xa(a);if(void 0===d)return[];a=olympe.dc.Na();var e=a.model(d);const f=[],g=[];let h=[];if(a.Sf(e,olympe.dm.Pb))h.push(d);else{for(e=[];null===a.fc(d,b);){e.push(d);const k=a.fc(d,c);if(null===k)return olympe.pa.Xa('sc').warn(`Object ${d} has no container`),[];k===a.fc(d,olympe.dc.CloudObject.instancesRel)?(f.push(d),d=a.fc(k,c)):d=k;if(e.includes(d))throw Error(`Instance ${d} (${a.name(d)}) is part of a cyclic contain pattern`);
835
- }g.push(d);h.push(a.fc(g[0],b))}h=h.concat(a.Nf(h[0],olympe.dm.Pb.Xb));h=h.concat(a.Nf(h[h.length-1],olympe.dm.md.ka.Pc()));h=h.concat(a.Nf(h[h.length-1],olympe.dm.md.aa.Pc()));return[...f,...g,...h].reverse()};olympe.sc.KC=a=>{a=a&&a.valueOf()||'';return a.startsWith('image/')?olympe.sc.ak:a.startsWith('video/')?olympe.sc.Bm:a.startsWith('font/')||a.startsWith('application/font-woff')?olympe.sc.ud:olympe.dm.File};let Di=0,Ei=0;function Fi(a,b){if(a.children)for(const c of a.children.values())b(c)}function Gi(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),Pc(olympe.dc.Ad(),null,c[1]))}}function Hi(a,b){a.children&&a.children.delete(b.Y())}function Ii(a,b){if(null===a)return null;if(a.has(b))return a.get(b);for(const c of a.values())if(c.Mm&&c.oj()&&(a=Ii(c.children,b)))return a;return null}
833
+ c;c.set(olympe.sc.Ua.lg.PRODUCTION,b);return c})},'olympe.sc');olympe.T.run([olympe.sc.O.vm],a=>{olympe.hj().ctx=a});olympe.sc.rn=()=>null!==olympe.dc.Na().hc(void 0,olympe.sc.Runnable.F.Pc());olympe.sc.xC=(a,b,c,d)=>{c=a.create(olympe.sc.Cc).setProperty(olympe.sc.Cc.C,c||null).setProperty(olympe.sc.Cc.N,d||null);a.Ra(olympe.sc.Cc.F,c,b);a.Ra(olympe.dc.CloudObject.containsRel,b,c);return c.R()};olympe.sc.ih=a=>{a=olympe.dc.W.Tb.ih(a);return a instanceof olympe.sc.Ce?a.C():a};olympe.sc.MC=a=>{a=olympe.dc.CloudObject.get(a.tag);return a instanceof olympe.sc.Ce?a.C():a};
834
+ olympe.sc.JC=function(a){const b=olympe.dm.Pb.C.Pc(),c=olympe.dc.CloudObject.containsRel.Pc();var d=olympe.dc.xa(a);if(void 0===d)return[];a=olympe.dc.Na();var e=a.model(d);const f=[],g=[];let h=[];if(a.Sf(e,olympe.dm.Pb))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.pa.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`);
835
+ }g.push(d);h.push(a.hc(g[0],b))}h=h.concat(a.Nf(h[0],olympe.dm.Pb.Xb));h=h.concat(a.Nf(h[h.length-1],olympe.dm.md.ka.Pc()));h=h.concat(a.Nf(h[h.length-1],olympe.dm.md.aa.Pc()));return[...f,...g,...h].reverse()};olympe.sc.KC=a=>{a=a&&a.valueOf()||'';return a.startsWith('image/')?olympe.sc.ak:a.startsWith('video/')?olympe.sc.Bm:a.startsWith('font/')||a.startsWith('application/font-woff')?olympe.sc.ud:olympe.dm.File};let Di=0,Ei=0;function Fi(a,b){if(a.children)for(const c of a.children.values())b(c)}function Gi(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),Pc(olympe.dc.Ad(),null,c[1]))}}function Hi(a,b){a.children&&a.children.delete(b.Y())}function Ii(a,b){if(null===a)return null;if(a.has(b))return a.get(b);for(const c of a.values())if(c.Mm&&c.oj()&&(a=Ii(c.children,b)))return a;return null}
836
836
  function Ji(a,b){b=olympe.dc.xa(b);return a.vh&&(a.vh.get('O#'+b)||a.vh.get('IO#'+b))||b}function Ki(a,b,c,d){const e='$'+b;a.bi.add(b);c.map(f=>'@'+f+'.'+b).forEach(f=>{(f=a.qd&&a.qd.get(f))&&f.forEach(g=>{g(d)})});Fi(a,f=>{!f.Sm&&f.bi.has(b)||f.data.has(e)||Ki(f,b,c,d)});a.bi.delete(b)}function Li(a,b){b=olympe.dc.xa(b);return a.vh&&(a.vh.get('I#'+b)||a.vh.get('IO#'+b))||b}
837
837
  function Mi(a,b,c){a.bi.add(b);const d=a.qd&&a.qd.get('&'+b);if(d)for(const e of d.values())e(c);Fi(a,e=>{e.bi.has(b)||Mi(e,b,c)});a.bi.delete(b)}
838
838
  olympe.sc.Ua=class{constructor(a,b,c=olympe.sc.ls){++Ei;this.id=a;this.hh=new Set;this.parent=c;this.zd=b||null;this.tc=new olympe.D.Wb('SC Context');this.data=new Map;this.pe=this.children=this.qd=null;this.Tm=new Map;this.uid=Ei;this.Dr=null;this.Mm=!1;this.bi=new Set;this.Sm=!1;this.L=olympe.pa.Xa('sc');this.vh=null;this.tc.vc(()=>{Fi(this,d=>d.destroy())});this.tc.onDestroy(()=>{this.pe&&this.pe.forEach(([d],e)=>{for(let f=0;f<d;f++)Gi(this,e)});c&&Hi(this.parent,this);this.hh.clear();this.parent=
839
- null;null!==this.get(olympe.sc.Ua.lg.TRANSACTION)&&this.L.warn(`The context ${this.id} is being destroyed but still has unreleased transactions. You probably forgot to end a transaction.`)})}Y(){return this.id}mn(){return this.uid}getParent(){return this.parent}Rk(){return this.Dr}Ec(){return this.tc}wn(a){this.Dr=olympe.dc.xa(a);this.Mm=a.Pd().rn();a.aa().forEach(b=>{this.hh.add(b)});this.vh=a.Z()}Kk(){this.Sm=!0;Fi(this,a=>{a.Kk()})}ml(){this.Sm=!1;Fi(this,a=>{a.ml()})}set(a,b){if(this.tc.gd()||
839
+ null;null!==this.get(olympe.sc.Ua.lg.TRANSACTION)&&this.L.warn(`The context ${this.id} is being destroyed but still has unreleased transactions. You probably forgot to end a transaction.`)})}Y(){return this.id}mn(){return this.uid}getParent(){return this.parent}Rk(){return this.Dr}Ec(){return this.tc}wn(a){this.Dr=olympe.dc.xa(a);this.Mm=a.Qd().rn();a.aa().forEach(b=>{this.hh.add(b)});this.vh=a.Z()}Kk(){this.Sm=!0;Fi(this,a=>{a.Kk()})}ml(){this.Sm=!1;Fi(this,a=>{a.ml()})}set(a,b){if(this.tc.gd()||
840
840
  this.tc.yb())return this;a=Ji(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),Ki(this,a,['*',this.id,...this.hh],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),Ki(this,a,['*',this.id,...this.hh],b))}return this}ni(a){return this.set(a,Date.now())}remove(a){this.tc.yb()||this.tc.gd()||(a=Ji(this,a),this.data.delete('$'+a)&&Ki(this,a,['*',this.id,
841
841
  ...this.hh],null))}Eb(a,b,c=!1){const d=olympe.dc.xa(a),e=olympe.D.Kc(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.Eb()}get(a,b=!1){a=this.Ya(a,b);return void 0!==a?a:null}has(a,b=!1){a='$'+Li(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,b=!0,c=!1){return new rxjs.Observable(d=>{if(this.yb())return d.error('Context is already destroyed'),()=>
842
842
  {};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=Li(this,a);a=b.subscribe(d=>{null!==d?this.set(c,d):this.remove(c)});this.Jg(a.unsubscribe.bind(a));return this}gl(a){a=a instanceof olympe.sc.Runnable?a:this.get(a);if(!a)return null;const b=this.$h(`Runner ${olympe.D.Ya(a.ma(),'')}`);a.run(b);return b}Ln(a,b=!0,c=!1){return rxjs.firstValueFrom(this.observe(a,b,c))}jl(a){this.set(olympe.sc.Ua.lg.dg,
843
- a);return this}Ya(a,b=!0){a='$'+Li(this,a);let c=this.data.get(a),d=this.parent;if(b)for(;void 0===c&&null!==d;)c=d.data.get(a),d=d.parent;return c}on(a,b,c,d=!0){if(this.tc.yb()||this.tc.gd())return()=>{};const e=Li(this,a),f=c?olympe.dc.xa(c):'*';a=this.Te('@'+f+'.'+e,b);c=c?(c=this.gi(f))?c.Ya(e,!1):void 0:this.Ya(e);void 0!==c&&b(c);d&&olympe.D.Ia().onDestroy(a);return a}$h(a){const b='_'+olympe.W.lc();null===this.children&&(this.children=new Map);const c=this.tc.run(()=>new olympe.sc.Ua(b,a,
843
+ a);return this}Ya(a,b=!0){a='$'+Li(this,a);let c=this.data.get(a),d=this.parent;if(b)for(;void 0===c&&null!==d;)c=d.data.get(a),d=d.parent;return c}on(a,b,c,d=!0){if(this.tc.yb()||this.tc.gd())return()=>{};const e=Li(this,a),f=c?olympe.dc.xa(c):'*';a=this.Te('@'+f+'.'+e,b);c=c?(c=this.gi(f))?c.Ya(e,!1):void 0:this.Ya(e);void 0!==c&&b(c);d&&olympe.D.Ja().onDestroy(a);return a}$h(a){const b='_'+olympe.W.mc();null===this.children&&(this.children=new Map);const c=this.tc.run(()=>new olympe.sc.Ua(b,a,
844
844
  this));this.children.set(b,c);return c}Vk(a,b){a=olympe.dc.xa(a);null===this.children&&(this.children=new Map);let c=this.children.get(a);if(!c){c=new olympe.sc.Ua(a,b,this);this.children.set(a,c);for(b=c.parent;b&&b.Mm&&b.oj();)b=b.parent;b&&Mi(b,a,c)}return c}sj(a,b){const c=this.gi(a);if(c)return b(c),()=>{};const d=this.Te('&'+a,e=>{d&&d();b(e)});return d}gi(a){if(a===this.id||this.hh.has(a)||!a)return this;let b=this.parent;for(;b;){if(a===b.id||b.hh.has(a))return b;const c=Ii(b.children,a);
845
845
  if(c)return c;b=b.parent}return null}oj(){return!this.id.startsWith('_')}Mk(a,b){this.pe||(this.pe=new Map);const c=this.pe.get(a);c?c[0]+=1:(this.pe.set(a,[1,b]),Pc(olympe.dc.Ad(),b))}destroy(){this.tc.gd()||this.tc.yb()||this.tc.destroy()}Jg(a,b){return this.tc.yb()?b||'noId':(b=b||String(++Di),this.Tm.set(b,a),b)}el(a){this.Tm.delete(a)}onDestroy(a){return this.yb()?(a(),'noId'):this.tc.onDestroy(a)}Je(a){this.yb()||this.tc.Je(a)}clear(){this.tc.gd()||this.tc.yb()||(this.Tm.forEach(a=>a()),this.tc.Af())}Te(a,
846
846
  b){this.qd||(this.qd=new Map);let c=this.qd.get(a);void 0===c&&(c=new Map,this.qd.set(a,c));++Di;const d=Di;c.set(d,b);return()=>{const e=this.qd.get(a);e&&(e.delete(d),0===e.size&&this.qd.delete(a))}}yb(){return this.tc.yb()}tn(){const a=this.Ya(olympe.sc.Ua.lg.EDITION);return a?a:!1}$k(){const a=this.Ya(olympe.sc.Ua.lg.PRODUCTION);return a?a:!1}};olympe.sc.Ua.prototype.clear=olympe.sc.Ua.prototype.clear;olympe.sc.Ua.prototype.offDestroy=olympe.sc.Ua.prototype.Je;
847
847
  olympe.sc.Ua.prototype.onDestroy=olympe.sc.Ua.prototype.onDestroy;olympe.sc.Ua.prototype.offClear=olympe.sc.Ua.prototype.el;olympe.sc.Ua.prototype.onClear=olympe.sc.Ua.prototype.Jg;olympe.sc.Ua.prototype.destroy=olympe.sc.Ua.prototype.destroy;olympe.sc.Ua.prototype.getOtherContext=olympe.sc.Ua.prototype.gi;olympe.sc.Ua.prototype.onContext=olympe.sc.Ua.prototype.sj;olympe.sc.Ua.prototype.createChild=olympe.sc.Ua.prototype.$h;olympe.sc.Ua.prototype.setParentElement=olympe.sc.Ua.prototype.jl;
848
848
  olympe.sc.Ua.prototype.waitFor=olympe.sc.Ua.prototype.Ln;olympe.sc.Ua.prototype.runner=olympe.sc.Ua.prototype.gl;olympe.sc.Ua.prototype.repeat=olympe.sc.Ua.prototype.repeat;olympe.sc.Ua.prototype.observe=olympe.sc.Ua.prototype.observe;olympe.sc.Ua.prototype.has=olympe.sc.Ua.prototype.has;olympe.sc.Ua.prototype.get=olympe.sc.Ua.prototype.get;olympe.sc.Ua.prototype.remove=olympe.sc.Ua.prototype.remove;olympe.sc.Ua.prototype.trigger=olympe.sc.Ua.prototype.ni;olympe.sc.Ua.prototype.set=olympe.sc.Ua.prototype.set;
849
- olympe.sc.Ua.prototype.getParent=olympe.sc.Ua.prototype.getParent;olympe.sc.Ua.bc={xt:'I#',su:'O#',Vz:'IO#'};olympe.sc.Ua.lg={PRODUCTION:'__production',EDITION:'__editionMode',TRANSACTION:'__transaction',dg:'__htmlContainer',bz:'__dockableElement'};olympe.sc.Metadata=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}};olympe.sc.Metadata.P=olympe.dc.Ba.C('0161ae936c62f9fcd131',olympe.sc.Metadata);olympe.sc.Cc=class extends olympe.dc.CloudObject{F(){return this.Fb(olympe.sc.Cc.N)}C(){return this.Fb(olympe.sc.Cc.C)}};olympe.sc.Cc.P=olympe.dc.Ba.C('01703376c4a81c0e9d90',olympe.sc.Cc);olympe.sc.Cc.N=olympe.sc.Cc.P.Ca('01703376c4a81c0e9d91');olympe.sc.Cc.C=olympe.sc.Cc.P.Ca('01703376c4a81c0e9d92');olympe.sc.Cc.F=olympe.sc.Cc.P.Pa('01703376c4a81c0e9d93');P(olympe.dc.CloudObject.P,olympe.sc.Cc.F);olympe.sc.Cc.prototype.F.K=olympe.D.J.F;olympe.sc.Cc.prototype.C.K=olympe.D.J.F;olympe.sc.W={};function Ni(a,b){const c=Math.random().toString(36).substr(2)+Math.random().toString(36).substr(2);a.C.set(c,b);return c}
849
+ olympe.sc.Ua.prototype.getParent=olympe.sc.Ua.prototype.getParent;olympe.sc.Ua.cc={xt:'I#',su:'O#',Vz:'IO#'};olympe.sc.Ua.lg={PRODUCTION:'__production',EDITION:'__editionMode',TRANSACTION:'__transaction',dg:'__htmlContainer',bz:'__dockableElement'};olympe.sc.Metadata=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}};olympe.sc.Metadata.P=olympe.dc.Ba.C('0161ae936c62f9fcd131',olympe.sc.Metadata);olympe.sc.Cc=class extends olympe.dc.CloudObject{F(){return this.Fb(olympe.sc.Cc.N)}C(){return this.Fb(olympe.sc.Cc.C)}};olympe.sc.Cc.P=olympe.dc.Ba.C('01703376c4a81c0e9d90',olympe.sc.Cc);olympe.sc.Cc.N=olympe.sc.Cc.P.Ca('01703376c4a81c0e9d91');olympe.sc.Cc.C=olympe.sc.Cc.P.Ca('01703376c4a81c0e9d92');olympe.sc.Cc.F=olympe.sc.Cc.P.Pa('01703376c4a81c0e9d93');P(olympe.dc.CloudObject.P,olympe.sc.Cc.F);olympe.sc.Cc.prototype.F.K=olympe.D.J.F;olympe.sc.Cc.prototype.C.K=olympe.D.J.F;olympe.sc.W={};function Ni(a,b){const c=Math.random().toString(36).substr(2)+Math.random().toString(36).substr(2);a.C.set(c,b);return c}
850
850
  olympe.sc.W.kt=class{constructor(a,b,c){const d=olympe.net.eb.ae.GET,e=olympe.net.eb.ae.Fc,f=olympe.net.eb.ae.mk,g=olympe.net.eb.ae.gm,h=olympe.net.eb.Headers.Lj,k=olympe.net.eb.Headers.si;this.L=a;this.G=b.aa([d,e,f,g],[h,k]);this.N=c;this.C=new olympe.W.er(3E4);this.F=new olympe.D.Wb('FileService context')}start(a){var b=olympe.net.eb.ae.GET;const c=olympe.net.eb.ae.Fc,d=olympe.net.eb.ae.mk,e=olympe.net.eb.ae.gm,f=olympe.net.eb.od.Lh,g=olympe.net.eb.od.it,h=olympe.net.eb.od.Lq,k=olympe.net.eb.Headers.si,
851
851
  l=olympe.net.eb.Headers.zs,n=`fileServer_${a}`;a=`/${this.N}/${a}/:${'fileTag'}`.replace(/\/+/g,'/').replace(/\/$/,'');this.L.debug(`Started file service with path : ${a}`);b=this.G.N(n,a,[b,c,d,e],(p,q)=>{if(p.method===e)return Promise.resolve(new olympe.net.Tg('',f,'',{[l]:'*'}));const r=p.ij()[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.ij(),q.get('fileTag'),p.body).catch(u=>Promise.resolve(new olympe.net.Tg(`Internal server error: ${u}`,
852
852
  h,'Internal server error')))});this.F.onDestroy(()=>{this.G.Z(n).catch(p=>this.L.error(`An error occurred while stopping the file service: ${p}`))});return b}stop(){this.F.destroy()}};olympe.sc.Ze={};olympe.sc.Ze.fh={Sy:null,Lu:'screenflow',dv:'ui-design',Nq:'software-intelligence',Bl:'data-management'};olympe.sc.ne=class extends olympe.dm.BrickMetadata{C(){return olympe.sc.Ze.fh.Nq}F(){return this.ub(olympe.sc.ne.C,olympe.sc.logic.Ni)}G(){return this.ub(olympe.sc.ne.F,olympe.sc.logic.Ph)}};olympe.sc.ne.P=olympe.dc.Ba.C('011100000000000adef0',olympe.sc.ne);olympe.sc.ne.C=olympe.sc.ne.P.Pa('016ac4f59a2917fdef01');olympe.sc.ne.F=olympe.sc.ne.P.Pa('016ac4f59a2917fdef02');olympe.sc.ne.prototype.F.K=new olympe.D.J(()=>olympe.dc.Aa,[]);olympe.sc.ne.prototype.G.K=new olympe.D.J(()=>olympe.dc.Aa,[]);function Oi(a,b){[].forEach(c=>c.call(a,b,(d,e)=>{null===e?b.remove(d):b.set(d,e)}))}function Pi(a,b){const c=[];for(const d of b)b=a.db.fb(d,olympe.sc.logic.Ic.C,!0),c[b]=d;return c}
853
- olympe.sc.pb=class extends olympe.dm.BrickMetadata{Qt(a,b,c,d,e=!0){e||olympe.pa.Xa('sc').error('parameter own= false ignored, investigate');return olympe.D.df(L(this.Mf(a,olympe.dc.W.Sb.ih,c)),d)}Yw(){return this.ub(olympe.sc.pb.aa,olympe.sc.Runnable)}mw(){return this.ub(olympe.sc.pb.ka,olympe.sc.Runnable)}vn(){return this.db.fb(this,olympe.sc.pb.Xb)}rn(){return null!==this.db.fc(this.tag,olympe.sc.Runnable.F.Pc())}Wl(){return this.ub(olympe.sc.pb.F,olympe.sc.logic.Lb)}ck(){return this.ub(olympe.sc.pb.N,
853
+ olympe.sc.pb=class extends olympe.dm.BrickMetadata{Qt(a,b,c,d,e=!0){e||olympe.pa.Xa('sc').error('parameter own= false ignored, investigate');return olympe.D.df(L(this.Mf(a,olympe.dc.W.Tb.ih,c)),d)}Yw(){return this.ub(olympe.sc.pb.aa,olympe.sc.Runnable)}mw(){return this.ub(olympe.sc.pb.ka,olympe.sc.Runnable)}vn(){return this.db.fb(this,olympe.sc.pb.Xb)}rn(){return null!==this.db.hc(this.tag,olympe.sc.Runnable.F.Pc())}Wl(){return this.ub(olympe.sc.pb.F,olympe.sc.logic.Lb)}ck(){return this.ub(olympe.sc.pb.N,
854
854
  olympe.sc.logic.Vb)}};olympe.sc.pb.P=olympe.dc.Ba.C('0112000000000000def0',olympe.sc.pb);olympe.sc.pb.Xb=olympe.sc.pb.P.Ca('01692aa71f3108454479');olympe.sc.pb.zc=olympe.sc.pb.P.Ca('0166446c1f128ebc903a');olympe.sc.pb.aa=olympe.sc.pb.P.Pa('01692a4af82e8984742c');olympe.sc.pb.ka=olympe.sc.pb.P.Pa('01692a4af82e8984742d');olympe.sc.pb.Da=olympe.sc.pb.P.Pa('01692a4af82e8984742e');olympe.sc.pb.F=olympe.sc.pb.P.Pa('01621fb84e320000f00a');olympe.sc.pb.N=olympe.sc.pb.P.Pa('01621fb84e320000f00b');
855
- olympe.sc.pb.He=olympe.sc.pb.P.Pa('0171838bcfed0000e00e');olympe.sc.pb.qe=olympe.sc.pb.P.Pa('0171838bcfed0000a00a');m=olympe.sc.pb.prototype;m.Qt.K=olympe.D.J.C;m.Yw.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.mw.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.vn.K=olympe.D.J.C;m.rn.K=olympe.D.J.C;m.Wl.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.ck.K=new olympe.D.J(()=>olympe.dc.Aa,[]);function Qi(a){const b=new olympe.dc.Transaction,c=b.create(a).persist(!1).R();b.hb();olympe.D.Ia().onDestroy(()=>{const d=new olympe.dc.Transaction;d.delete(c);d.hb()});return olympe.dc.CloudObject.get(c)}function Ri(a,b){b.wn(a);Oi(a.Pd(),b);const c=a.N(),d=Si(b,c),e=[];c.forEach((f,g)=>{f===a.Da?e[0]=g:f===a.ra&&(e[1]=g)});void 0!==e[0]&&void 0!==e[1]&&(Ti(a,d[e[0]],d[e[1]]),c[e[0]]=null,c[e[1]]=null);c.forEach((f,g)=>{f&&f.call(a,b,d[g])})}
856
- function Ui(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.yb()||(b.clear(),null===h)?!1:(b.Ec().run(a.update.bind(a,new olympe.sc.cb(b),Array.isArray(h)?h:[h],g)),!0))).subscribe(rxjs.Subscriber.create(h=>h?a.L.debug(e):a.L.debug(f),a.ab.bind(a,b),()=>a.L.debug(`Brick ${d} completed`)));b.onDestroy(c.unsubscribe.bind(c))}
855
+ olympe.sc.pb.He=olympe.sc.pb.P.Pa('0171838bcfed0000e00e');olympe.sc.pb.qe=olympe.sc.pb.P.Pa('0171838bcfed0000a00a');m=olympe.sc.pb.prototype;m.Qt.K=olympe.D.J.C;m.Yw.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.mw.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.vn.K=olympe.D.J.C;m.rn.K=olympe.D.J.C;m.Wl.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.ck.K=new olympe.D.J(()=>olympe.dc.Aa,[]);function Qi(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)}function Ri(a,b){b.wn(a);Oi(a.Qd(),b);const c=a.N(),d=Si(b,c),e=[];c.forEach((f,g)=>{f===a.Da?e[0]=g:f===a.ra&&(e[1]=g)});void 0!==e[0]&&void 0!==e[1]&&(Ti(a,d[e[0]],d[e[1]]),c[e[0]]=null,c[e[1]]=null);c.forEach((f,g)=>{f&&f.call(a,b,d[g])})}
856
+ function Ui(a,b){var c=a.Rb();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.yb()||(b.clear(),null===h)?!1:(b.Ec().run(a.update.bind(a,new olympe.sc.cb(b),Array.isArray(h)?h:[h],g)),!0))).subscribe(rxjs.Subscriber.create(h=>h?a.L.debug(e):a.L.debug(f),a.ab.bind(a,b),()=>a.L.debug(`Brick ${d} completed`)));b.onDestroy(c.unsubscribe.bind(c))}
857
857
  function Vi(a,b,c,d){const e=d.Ec(),f=V(a.db,b,c,e.Cb((g,h)=>{const k=d.Vk(h);g?olympe.dc.CloudObject.get(h).run(k):k.destroy()}));e.vc(a.db.C.bind(a.db,b,c,f,!0))}function Si(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)}})}
858
- function Ti(a,b,c){const d=olympe.D.Ia(),e=yd(a.db,a.tag,d.Cb((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.ih(g)))}));d.onDestroy(()=>{var f=a.db;const g=U(f,a.tag);null!==g&&(g.V(td,e),f.Ha.getState()===ud.cg&&f.Ha.aa(e))})}
859
- olympe.sc.Runnable=class extends olympe.dm.BrickMetadata{constructor(a,b,c){super(a,b);this.L=c}run(a){const b=()=>{Ri(this,a);this.init(a);this.Pd().vn()?Ui(this,a):a.Ec().run(this.update.bind(this,new olympe.sc.cb(a),[],[]));a.ni(olympe.sc.pb.zc);a.Jg(this.clear.bind(this,a));a.onDestroy(this.destroy.bind(this,a))},c=a.getParent();c?c.Ec().run(b):b()}Pd(){return this.ph()}init(a){this.onInit(a)}update(a,b,c){const d=this.Pd();if(d.vn())this.onUpdate(a,b,c);else this.L.debug(`Softcoded runnable ${this.db.name(this)} with tag ${this.tag} running in context ${a.mn()}`),
860
- Vi(this,d,olympe.sc.pb.aa,a),this.Sa()&&Vi(this,d,olympe.sc.pb.Da,a)}clear(){}destroy(a){this.onDestroy(a)}setupExecution(){return rxjs.of([])}F(){return[]}onInit(){}onUpdate(){this.L.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 Pi(a,a.db.ub(a.tag,olympe.sc.pb.F))}getOutputs(){var a=this.Pd();return Pi(a,a.db.ub(a.tag,olympe.sc.pb.N))}aa(){return[]}Z(){return new Map}Sa(){return!1}G(a,
861
- b,c,d){a=b.Eb(a,c,!0);void 0!==d&&olympe.D.df(a,d);return a}cc(a,b,c,d,e){olympe.D.Dn([d],f=>{b.set(a,olympe.D.bs(f)?f.valueOf():f)});return this.G(a,b,c,e)}N(){return[this.Da,this.ra]}Da(a,b){Ti(this,b,null)}ra(a,b){Ti(this,null,b)}zc(a,b){const c=this.db,d=olympe.sc.logic.wb.N.Pc(),e=olympe.sc.logic.wb.F,f=olympe.sc.logic.wb.C;this.Nr(d,g=>{var h=g.R();if(h=c.fc(h,e)||c.fc(h,f))g=Wi(g,a,b.bind(null,h)),olympe.D.Ia().onDestroy(g)})}ab(a,b){const c=this.Tb();let d=this.db.name(c);try{const e=[a.Rk()];
858
+ function Ti(a,b,c){const d=olympe.D.Ja(),e=yd(a.db,a.tag,d.Cb((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.ih(g)))}));d.onDestroy(()=>{var f=a.db;const g=U(f,a.tag);null!==g&&(g.V(td,e),f.Ia.getState()===ud.cg&&f.Ia.aa(e))})}
859
+ olympe.sc.Runnable=class extends olympe.dm.BrickMetadata{constructor(a,b,c){super(a,b);this.L=c}run(a){const b=()=>{Ri(this,a);this.init(a);this.Qd().vn()?Ui(this,a):a.Ec().run(this.update.bind(this,new olympe.sc.cb(a),[],[]));a.ni(olympe.sc.pb.zc);a.Jg(this.clear.bind(this,a));a.onDestroy(this.destroy.bind(this,a))},c=a.getParent();c?c.Ec().run(b):b()}Qd(){return this.ph()}init(a){this.onInit(a)}update(a,b,c){const d=this.Qd();if(d.vn())this.onUpdate(a,b,c);else this.L.debug(`Softcoded runnable ${this.db.name(this)} with tag ${this.tag} running in context ${a.mn()}`),
860
+ Vi(this,d,olympe.sc.pb.aa,a),this.Sa()&&Vi(this,d,olympe.sc.pb.Da,a)}clear(){}destroy(a){this.onDestroy(a)}setupExecution(){return rxjs.of([])}F(){return[]}onInit(){}onUpdate(){this.L.error(`Brick ${this.db.name(this.Rb())} (${this.Rb()}) is flagged as hardcoded, but method update() has not been overridden.`)}onDestroy(){}getInputs(){var a=this.Qd();return Pi(a,a.db.ub(a.tag,olympe.sc.pb.F))}getOutputs(){var a=this.Qd();return Pi(a,a.db.ub(a.tag,olympe.sc.pb.N))}aa(){return[]}Z(){return new Map}Sa(){return!1}G(a,
861
+ b,c,d){a=b.Eb(a,c,!0);void 0!==d&&olympe.D.df(a,d);return a}ec(a,b,c,d,e){olympe.D.Dn([d],f=>{b.set(a,olympe.D.bs(f)?f.valueOf():f)});return this.G(a,b,c,e)}N(){return[this.Da,this.ra]}Da(a,b){Ti(this,b,null)}ra(a,b){Ti(this,null,b)}zc(a,b){const c=this.db,d=olympe.sc.logic.wb.N.Pc(),e=olympe.sc.logic.wb.F,f=olympe.sc.logic.wb.C;this.Nr(d,g=>{var h=g.R();if(h=c.hc(h,e)||c.hc(h,f))g=Wi(g,a,b.bind(null,h)),olympe.D.Ja().onDestroy(g)})}ab(a,b){const c=this.Rb();let d=this.db.name(c);try{const e=[a.Rk()];
862
862
  let f=a.getParent();for(;null!==f&&f!==olympe.sc.ls;)e.unshift(f.Rk()),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.L.warn(`Impossible to retrieve the stack for brick ${this.db.name(c)}.`)}this.L.error(`An error occurred in brick ${d} (${c}): ${b}\n${b.stack}`)}};olympe.sc.Runnable.P=Jc(olympe.dc.Ba.C('01130000000000ca1100',olympe.sc.Runnable));olympe.sc.Runnable.N=olympe.sc.Runnable.P.Pa('01692a4af82e8984742b');
863
- olympe.sc.Runnable.F=olympe.sc.Runnable.P.Pa('01756a18d4921c103111');olympe.sc.Runnable.V=P(olympe.sc.Runnable.P,olympe.sc.pb.aa);olympe.sc.Runnable.Z=P(olympe.sc.Runnable.P,olympe.sc.pb.ka);olympe.sc.Runnable.aa=P(olympe.sc.Runnable.P,olympe.sc.pb.Da);P(olympe.sc.pb.P,olympe.sc.Runnable.N);P(olympe.sc.pb.P,olympe.sc.Runnable.F);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.cc.K=olympe.D.J.C;function Xi(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.ub(this,olympe.sc.Ce.C)[0]}C(){return olympe.dc.CloudObject.get(Xi(this))}toString(){const a=Xi(this);let b;a&&(b=this.db.name(a));return b||super.toString()}};olympe.sc.Ce.P=olympe.dc.Ba.C('0163c9ae01f2d6e9ca49',olympe.sc.Ce);olympe.sc.Ce.C=olympe.sc.Ce.P.Pa('0169b5a8a33144fb0b49');
863
+ olympe.sc.Runnable.F=olympe.sc.Runnable.P.Pa('01756a18d4921c103111');olympe.sc.Runnable.V=P(olympe.sc.Runnable.P,olympe.sc.pb.aa);olympe.sc.Runnable.Z=P(olympe.sc.Runnable.P,olympe.sc.pb.ka);olympe.sc.Runnable.aa=P(olympe.sc.Runnable.P,olympe.sc.pb.Da);P(olympe.sc.pb.P,olympe.sc.Runnable.N);P(olympe.sc.pb.P,olympe.sc.Runnable.F);olympe.sc.Runnable.prototype.Qd.K=new olympe.D.J(()=>olympe.sc.pb,[]);olympe.sc.Runnable.prototype.G.K=new olympe.D.J(()=>Object,[]);olympe.sc.Runnable.prototype.ec.K=olympe.D.J.C;function Xi(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.ub(this,olympe.sc.Ce.C)[0]}C(){return olympe.dc.CloudObject.get(Xi(this))}toString(){const a=Xi(this);let b;a&&(b=this.db.name(a));return b||super.toString()}};olympe.sc.Ce.P=olympe.dc.Ba.C('0163c9ae01f2d6e9ca49',olympe.sc.Ce);olympe.sc.Ce.C=olympe.sc.Ce.P.Pa('0169b5a8a33144fb0b49');
864
864
  P(olympe.dc.CloudObject.P,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.Co=class extends olympe.dm.Pb{C(){return olympe.sc.Ze.fh.Bl}};olympe.sc.Co.P=olympe.dc.Ba.C('0163a68ce44f3d1fa84c',olympe.sc.Co);olympe.sc.xl=class extends olympe.dm.BrickMetadata{};olympe.sc.xl.P=olympe.dc.Ba.C('016324fde11a836f76c2',olympe.sc.xl);let Yi=null;
865
- function Zi(a,b){Yi=a;(new olympe.dc.jf(a,olympe.dc.Ed.Mi)).sb(olympe.sc.La.Me.C).sb(olympe.sc.jd.F.Pc()).hb((c,d)=>{if(c)olympe.pa.Xa('sc').error('Error while loading business container:',c.message),b(olympe.sc.jd.C.qc);else{c=null;for(const [e,f]of d.Bc.dd())e===olympe.sc.jd.F.R()&&(c=f);null!==c?$e(Ve(new olympe.dc.jf(c),olympe.dc.Rb.rf),(e,f)=>{const g=olympe.dc.ic.Tc,h=olympe.dc.ic.yi,k=f.R();f=f.Oa();return olympe.dc.Na().th(e,olympe.sc.xl)&&f===olympe.dc.za.ORIGIN&&(k===g||k===h)}).hb(()=>
865
+ function Zi(a,b){Yi=a;(new olympe.dc.jf(a,olympe.dc.Fd.Mi)).sb(olympe.sc.La.Me.C).sb(olympe.sc.jd.F.Pc()).hb((c,d)=>{if(c)olympe.pa.Xa('sc').error('Error while loading business container:',c.message),b(olympe.sc.jd.C.qc);else{c=null;for(const [e,f]of d.Bc.dd())e===olympe.sc.jd.F.R()&&(c=f);null!==c?$e(Ve(new olympe.dc.jf(c),olympe.dc.Sb.rf),(e,f)=>{const g=olympe.dc.jc.Tc,h=olympe.dc.jc.yi,k=f.R();f=f.Oa();return olympe.dc.Na().th(e,olympe.sc.xl)&&f===olympe.dc.za.ORIGIN&&(k===g||k===h)}).hb(()=>
866
866
  b(olympe.sc.jd.C.Hp)):(olympe.pa.Xa('sc').error('No container found for the application',a),b(olympe.sc.jd.C.cm))}})}olympe.sc.jd=class extends olympe.dc.CloudObject{};olympe.sc.jd.C={Hp:0,cm:1,qc:2};olympe.sc.jd.P=olympe.dc.Ba.C('017b3aa8fae1e3d044dc',olympe.sc.jd);olympe.sc.jd.F=olympe.sc.jd.P.Pa('017b3aa8fd1659291b92');olympe.sc.jd.N=olympe.sc.jd.P.Pa('017b3aa8fe7ec3fd52f2');olympe.sc.Map=class extends olympe.dc.CloudObject{};olympe.sc.Map.P=olympe.dc.Ba.C('01631aacd5c1f9d61c5d',olympe.sc.Map);olympe.sc.Wg=class extends olympe.sc.Map{};olympe.sc.Wg.P=olympe.dc.Ba.C('01631aacd8276ea98490',olympe.sc.Wg);olympe.sc.ak=class extends olympe.dm.File{N(){const a=olympe.D.Kc(olympe.D.Wa);this.Tk(b=>{a.update(olympe.D.Bb(b))});return a.Eb()}};olympe.sc.ak.P=Ec('01644b6297305d62fca2',olympe.sc.ak);olympe.sc.ak.prototype.N.K=olympe.D.J.F;olympe.sc.ud=class extends olympe.dm.File{N(){return this.Fb(olympe.sc.ud.F)}V(){return this.Fb(olympe.sc.ud.N)}Z(){return this.Ie(olympe.sc.ud.aa)}};olympe.sc.ud.P=Ec('01647e113043c637b541',olympe.sc.ud);olympe.sc.ud.F=olympe.sc.ud.P.Ca('01647e35ecd24ef0b88d');olympe.sc.ud.N=olympe.sc.ud.P.Ca('01647e677f5d1cfbdf42');olympe.sc.ud.aa=olympe.sc.ud.P.Ca('01647e6780999bf8bd25');olympe.sc.ud.prototype.N.K=olympe.D.J.F;olympe.sc.ud.prototype.V.K=olympe.D.J.F;olympe.sc.ud.prototype.Z.K=olympe.D.J.G;olympe.sc.Bm=class extends olympe.dm.File{};olympe.sc.Bm.P=Ec('0164643c432146a71d5c',olympe.sc.Bm);olympe.sc.tr=class extends olympe.dc.CloudObject{};olympe.sc.tr.P=olympe.dc.Ba.C('016421bb3797e22d1c4e',olympe.sc.tr);olympe.sc.logic={};olympe.sc.logic.hp=(a,b)=>a===b?0:a>b?1:-1;
867
867
  olympe.sc.logic.Zz=(a,b,c,d,e,f,g)=>{const h=b.R();b=olympe.D.Ya(b.C().R());let k,l;if(b===olympe.dc.xa(olympe.dm.String))k=c.valueOf().toLowerCase(),l=p=>p.Fb(h).toLowerCase();else if(b===olympe.dc.xa(olympe.dm.Number))k=c.valueOf(),l=p=>p.Ie(h);else if(b===olympe.dc.xa(olympe.dm.DateTime))k=c.getTime(),l=p=>olympe.D.Fa([p.kj(h)],q=>q.getTime(),Number,'FilterList Date&DateTime TransformFlows');else{c=olympe.dc.Na().name(b);g.warn(`Properties of type ${c} are not supported. List will not be filtered.`);e(a);
868
868
  return}let n;if('<'===f)n=(p,q)=>olympe.sc.logic.hp(q,p);else if('>'===f)n=(p,q)=>olympe.sc.logic.hp(p,q);else{g.error(`Unknown inequality ${f}. Please use '<' or '>'`);return}e(a.xg().filter(p=>olympe.D.Fa([l(p)],q=>{q=n(q.valueOf(),k);return olympe.D.Ac(d.valueOf()?1===q:0<=q)},olympe.D.qa,'FilterList ListDefBuilder Filter TransformFlows')).nf())};
@@ -871,53 +871,53 @@ olympe.sc.logic.Ba=class{constructor(){}static C(a,b,...c){if($i[a])throw c=bj(a
871
871
  olympe.sc.logic.Rj=class extends olympe.sc.logic.Mj{static create(a,b){return new olympe.sc.logic.Error(b,a)}};olympe.sc.logic.Rj.P=olympe.dc.Ba.C('016eeb5ede9f3094d8f0',olympe.sc.logic.Rj);olympe.sc.logic.le=class extends olympe.dc.CloudObject{C(){return this.cd(olympe.sc.logic.le.C,olympe.dc.CloudObject)}};olympe.sc.logic.le.P=olympe.dc.Ba.C('016ac4f59ee8ea2081ba',olympe.sc.logic.le);olympe.sc.logic.le.N=olympe.sc.logic.le.P.Ca('017bc044aeacce7ffc8f');olympe.sc.logic.le.C=olympe.sc.logic.le.P.Pa('016ac4f5a0091c4790e2');P(olympe.dc.CloudObject.P,olympe.sc.logic.le.C);olympe.sc.logic.le.prototype.C.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.sc.logic.Ni=class extends olympe.sc.logic.le{};olympe.sc.logic.Ni.P=olympe.dc.Ba.C('016ac4f59c592b862457',olympe.sc.logic.Ni);olympe.sc.logic.Ni.F=olympe.sc.ne.C.Pc();olympe.sc.logic.Ph=class extends olympe.sc.logic.le{};olympe.sc.logic.Ph.P=olympe.dc.Ba.C('016ac4f59dd99f5df3e1',olympe.sc.logic.Ph);olympe.sc.logic.Ph.F=P(olympe.sc.logic.Ph.P,olympe.sc.ne.F);olympe.sc.logic.Oe=class extends olympe.sc.pb{C(){return olympe.sc.Ze.fh.Nq}ka(){return this.dn().xg().th([olympe.sc.logic.Function]).and().not().th([olympe.sc.logic.Wd,olympe.sc.logic.Zd]).nf()}Bw(){return this.Wl().xg().lj([olympe.dc.CloudObject.modelRel,olympe.sc.logic.Ni.F]).nf()}Cw(){return this.ck().xg().lj([olympe.dc.CloudObject.modelRel,olympe.sc.logic.Ph.F]).nf()}Hf(a){const b=this.db.an(this,[olympe.sc.pb.F],c=>this.db.model(c)===olympe.dc.xa(a));return b?olympe.dc.CloudObject.get(b):null}nh(a){const b=
872
872
  this.db.an(this,[olympe.sc.pb.N],c=>this.db.model(c)===olympe.dc.xa(a));return b?olympe.dc.CloudObject.get(b):null}fx(){return this.Wl().xg().lj([olympe.dc.CloudObject.modelRel],olympe.sc.logic.Lb).nf()}gx(){return this.ck().xg().lj([olympe.dc.CloudObject.modelRel],olympe.sc.logic.Vb).nf()}};cj('01621fb84e320000f000',olympe.sc.logic.Oe,olympe.sc.logic.Function);m=olympe.sc.logic.Oe.prototype;m.Bw.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.Cw.K=new olympe.D.J(()=>olympe.dc.Aa,[]);
873
873
  m.Hf.K=new olympe.D.J(()=>olympe.sc.logic.Lb,[]);m.nh.K=new olympe.D.J(()=>olympe.sc.logic.Vb,[]);m.fx.K=new olympe.D.J(()=>olympe.dc.Aa,[]);m.gx.K=new olympe.D.J(()=>olympe.dc.Aa,[]);olympe.sc.logic.bg=class extends olympe.sc.logic.Oe{F(){return this.Hf('016ac63229782039429f')}G(){return this.nh('016ac6322acf67eebfe7')}N(){return this.ck().xg().sb(olympe.sc.logic.Ic.typeRel).Xk(olympe.sc.logic.Rj).nf().mf().sn(olympe.D.ea.ZERO)}};olympe.sc.logic.bg.C='016ac63229782039429f';olympe.sc.logic.bg.ra='016ac6322acf67eebfe7';olympe.sc.logic.bg.P=cj('01621fb84e320000a000',olympe.sc.logic.bg,olympe.sc.logic.Action);
874
- olympe.sc.logic.bg.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Lb,[]);olympe.sc.logic.bg.prototype.G.K=new olympe.D.J(()=>olympe.sc.logic.Vb,[]);olympe.sc.logic.bg.prototype.N.K=olympe.D.J.V;olympe.sc.logic.qo=class extends olympe.sc.logic.Oe{};olympe.sc.logic.qo.P=cj('01621fb84e320000f011',olympe.sc.logic.qo);olympe.sc.logic.po=class extends olympe.sc.logic.bg{};olympe.sc.logic.po.P=cj('01621fb84e320000f012',olympe.sc.logic.po);olympe.sc.logic.Function=class extends olympe.sc.Runnable{N(){return[this.zc]}Z(){const a=olympe.sc.Ua.bc.xt,b=olympe.sc.Ua.bc.su,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.al(b,olympe.sc.logic.Ic.typeRel,olympe.sc.logic.Mj)?a.ni.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=>
874
+ olympe.sc.logic.bg.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Lb,[]);olympe.sc.logic.bg.prototype.G.K=new olympe.D.J(()=>olympe.sc.logic.Vb,[]);olympe.sc.logic.bg.prototype.N.K=olympe.D.J.V;olympe.sc.logic.qo=class extends olympe.sc.logic.Oe{};olympe.sc.logic.qo.P=cj('01621fb84e320000f011',olympe.sc.logic.qo);olympe.sc.logic.po=class extends olympe.sc.logic.bg{};olympe.sc.logic.po.P=cj('01621fb84e320000f012',olympe.sc.logic.po);olympe.sc.logic.Function=class extends olympe.sc.Runnable{N(){return[this.zc]}Z(){const a=olympe.sc.Ua.cc.xt,b=olympe.sc.Ua.cc.su,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.al(b,olympe.sc.logic.Ic.typeRel,olympe.sc.logic.Mj)?a.ni.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=>
875
875
  c.includes(null)?null:c)):rxjs.of([])}};olympe.sc.logic.Function.P=olympe.dc.Ba.C('0168c6f020f2a96f0000',olympe.sc.logic.Function,olympe.sc.O.Ea);olympe.sc.logic.Ic=class extends olympe.dc.CloudObject{C(){return this.cd(olympe.sc.logic.Ic.typeRel,olympe.dc.CloudObject)}F(){return this.Ie(olympe.sc.logic.Ic.C)}};olympe.sc.logic.Ic.P=olympe.dc.Ba.C('0168a431d25001540000',olympe.sc.logic.Ic);olympe.sc.logic.Ic.C=olympe.sc.logic.Ic.P.Ca('01740c5d4ae4b520dd01');olympe.sc.logic.Ic.typeRel=olympe.sc.logic.Ic.P.Pa('0168a431d3b9b7438424');P(olympe.dc.CloudObject.P,olympe.sc.logic.Ic.typeRel);
876
876
  olympe.sc.logic.Ic.prototype.C.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.sc.logic.Ic.prototype.F.K=olympe.D.J.G;olympe.sc.logic.Lb=class extends olympe.sc.logic.Ic{};olympe.sc.logic.Lb.P=olympe.dc.Ba.C('0168a431d25001540001',olympe.sc.logic.Lb);olympe.sc.logic.Lb.ra=olympe.sc.logic.Ic.P.Ca('01740c5d4ae4b520dd02');olympe.sc.logic.Lb.ka=P(olympe.sc.logic.Lb.P,olympe.sc.pb.F);olympe.sc.logic.Lb.F=olympe.sc.logic.Lb.P.Pa('0168a431d91f2578000b',olympe.dc.za.ORIGIN);olympe.sc.logic.Lb.N=olympe.sc.logic.Lb.P.Pa('01621fb84e32000000a1',olympe.dc.za.ORIGIN);
877
- olympe.sc.logic.Lb.aa=olympe.sc.logic.Lb.P.Pa('01621fb84e32000000d1',olympe.dc.za.ORIGIN);olympe.sc.logic.Vb=class extends olympe.sc.logic.Ic{};olympe.sc.logic.Vb.P=olympe.dc.Ba.C('0168a431d25001540002',olympe.sc.logic.Vb);olympe.sc.logic.Vb.ka=P(olympe.sc.logic.Vb.P,olympe.sc.pb.N);olympe.sc.logic.Vb.F=olympe.sc.logic.Vb.P.Pa('0168a431d91f25780003',olympe.dc.za.ORIGIN);olympe.sc.logic.Vb.aa=olympe.sc.logic.Vb.P.Pa('01621fb84e32000000a2',olympe.dc.za.ORIGIN);olympe.sc.logic.Vb.N=olympe.sc.logic.Vb.P.Pa('01621fb84e32000000d2',olympe.dc.za.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.P=olympe.dc.Ba.C('0168c6f020f2a96a0000',olympe.sc.logic.Action,olympe.sc.O.Ea);olympe.sc.logic.Wd=class extends olympe.sc.logic.Function{run(a){Ri(this,a);const b=a.getParent(),c=this.db.fc(this,olympe.sc.logic.Wd.C),d=this.db.fc(this,olympe.sc.logic.Wd.G);a.on(c,e=>b.set(d,e),this.tag)}V(){return this.cd(olympe.sc.logic.Wd.C,olympe.sc.logic.Lb)}bb(){return this.cd(olympe.sc.logic.Wd.G,olympe.sc.logic.Vb)}};olympe.sc.logic.Wd.P=olympe.dc.Ba.C('01621fb84e32000000a0',olympe.sc.logic.Wd,olympe.sc.O.Ea);olympe.sc.logic.Wd.C=P(olympe.sc.logic.Wd.P,olympe.sc.logic.Lb.N);
878
- olympe.sc.logic.Wd.G=P(olympe.sc.logic.Wd.P,olympe.sc.logic.Vb.aa);olympe.sc.logic.Wd.prototype.V.K=new olympe.D.J(()=>olympe.sc.logic.Lb,[]);olympe.sc.logic.Wd.prototype.bb.K=new olympe.D.J(()=>olympe.sc.logic.Vb,[]);olympe.sc.logic.Zd=class extends olympe.sc.logic.Function{run(a){const b=a.getParent(),c=this.db.fc(this,olympe.sc.logic.Zd.G),d=this.db.fc(this,olympe.sc.logic.Zd.C);b.on(c,e=>a.set(d,e),b.Y())}bb(){return this.cd(olympe.sc.logic.Zd.G,olympe.sc.logic.Lb)}V(){return this.cd(olympe.sc.logic.Zd.C,olympe.sc.logic.Vb)}};olympe.sc.logic.Zd.P=olympe.dc.Ba.C('01621fb84e32000000d0',olympe.sc.logic.Zd,olympe.sc.O.Ea);olympe.sc.logic.Zd.G=P(olympe.sc.logic.Zd.P,olympe.sc.logic.Lb.aa);
879
- olympe.sc.logic.Zd.C=P(olympe.sc.logic.Zd.P,olympe.sc.logic.Vb.N);olympe.sc.logic.Zd.prototype.bb.K=new olympe.D.J(()=>olympe.sc.logic.Lb,[]);olympe.sc.logic.Zd.prototype.V.K=new olympe.D.J(()=>olympe.sc.logic.Vb,[]);function Wi(a,b,c){const d=a.db.fc(a,olympe.sc.logic.wb.ra)||a.db.fc(a,olympe.sc.logic.wb.aa),e=a.db.fc(a,olympe.sc.logic.wb.ka),f=a.db.Sf((()=>{let k=null,l=a.db.fc(a,olympe.sc.logic.wb.F);l?k=a.db.fc(l,olympe.dm.Property.typeRel):(l=a.db.fc(a,olympe.sc.logic.wb.C))&&(k=a.db.fc(l,olympe.sc.logic.Ic.typeRel));return k||olympe.dc.CloudObject.P.R()})(),olympe.dm.qf)?new olympe.D.Wb('Pipe Context'):null,g=a.F.bind(a,b,c,f);if(null!==d&&null!==e){let k;const l=b.sj(e,n=>{k&&k();k=n.on(d,g,e)});return()=>
877
+ olympe.sc.logic.Lb.aa=olympe.sc.logic.Lb.P.Pa('01621fb84e32000000d1',olympe.dc.za.ORIGIN);olympe.sc.logic.Vb=class extends olympe.sc.logic.Ic{};olympe.sc.logic.Vb.P=olympe.dc.Ba.C('0168a431d25001540002',olympe.sc.logic.Vb);olympe.sc.logic.Vb.ka=P(olympe.sc.logic.Vb.P,olympe.sc.pb.N);olympe.sc.logic.Vb.F=olympe.sc.logic.Vb.P.Pa('0168a431d91f25780003',olympe.dc.za.ORIGIN);olympe.sc.logic.Vb.aa=olympe.sc.logic.Vb.P.Pa('01621fb84e32000000a2',olympe.dc.za.ORIGIN);olympe.sc.logic.Vb.N=olympe.sc.logic.Vb.P.Pa('01621fb84e32000000d2',olympe.dc.za.ORIGIN);olympe.sc.logic.Action=class extends olympe.sc.logic.Function{setupExecution(a){const b=this.Qd().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.P=olympe.dc.Ba.C('0168c6f020f2a96a0000',olympe.sc.logic.Action,olympe.sc.O.Ea);olympe.sc.logic.Wd=class extends olympe.sc.logic.Function{run(a){Ri(this,a);const b=a.getParent(),c=this.db.hc(this,olympe.sc.logic.Wd.C),d=this.db.hc(this,olympe.sc.logic.Wd.G);a.on(c,e=>b.set(d,e),this.tag)}V(){return this.cd(olympe.sc.logic.Wd.C,olympe.sc.logic.Lb)}bb(){return this.cd(olympe.sc.logic.Wd.G,olympe.sc.logic.Vb)}};olympe.sc.logic.Wd.P=olympe.dc.Ba.C('01621fb84e32000000a0',olympe.sc.logic.Wd,olympe.sc.O.Ea);olympe.sc.logic.Wd.C=P(olympe.sc.logic.Wd.P,olympe.sc.logic.Lb.N);
878
+ olympe.sc.logic.Wd.G=P(olympe.sc.logic.Wd.P,olympe.sc.logic.Vb.aa);olympe.sc.logic.Wd.prototype.V.K=new olympe.D.J(()=>olympe.sc.logic.Lb,[]);olympe.sc.logic.Wd.prototype.bb.K=new olympe.D.J(()=>olympe.sc.logic.Vb,[]);olympe.sc.logic.Zd=class extends olympe.sc.logic.Function{run(a){const b=a.getParent(),c=this.db.hc(this,olympe.sc.logic.Zd.G),d=this.db.hc(this,olympe.sc.logic.Zd.C);b.on(c,e=>a.set(d,e),b.Y())}bb(){return this.cd(olympe.sc.logic.Zd.G,olympe.sc.logic.Lb)}V(){return this.cd(olympe.sc.logic.Zd.C,olympe.sc.logic.Vb)}};olympe.sc.logic.Zd.P=olympe.dc.Ba.C('01621fb84e32000000d0',olympe.sc.logic.Zd,olympe.sc.O.Ea);olympe.sc.logic.Zd.G=P(olympe.sc.logic.Zd.P,olympe.sc.logic.Lb.aa);
879
+ olympe.sc.logic.Zd.C=P(olympe.sc.logic.Zd.P,olympe.sc.logic.Vb.N);olympe.sc.logic.Zd.prototype.bb.K=new olympe.D.J(()=>olympe.sc.logic.Lb,[]);olympe.sc.logic.Zd.prototype.V.K=new olympe.D.J(()=>olympe.sc.logic.Vb,[]);function Wi(a,b,c){const d=a.db.hc(a,olympe.sc.logic.wb.ra)||a.db.hc(a,olympe.sc.logic.wb.aa),e=a.db.hc(a,olympe.sc.logic.wb.ka),f=a.db.Sf((()=>{let k=null,l=a.db.hc(a,olympe.sc.logic.wb.F);l?k=a.db.hc(l,olympe.dm.Property.typeRel):(l=a.db.hc(a,olympe.sc.logic.wb.C))&&(k=a.db.hc(l,olympe.sc.logic.Ic.typeRel));return k||olympe.dc.CloudObject.P.R()})(),olympe.dm.qf)?new olympe.D.Wb('Pipe Context'):null,g=a.F.bind(a,b,c,f);if(null!==d&&null!==e){let k;const l=b.sj(e,n=>{k&&k();k=n.on(d,g,e)});return()=>
880
880
  {g(null);l();k&&k()}}const h=xd(a.db,a,olympe.sc.logic.wb.valueProp,g);return()=>{g(null);a.db.F(a,olympe.sc.logic.wb.valueProp,h)}}
881
881
  olympe.sc.logic.wb=class extends olympe.dc.CloudObject{constructor(a,b,c){super(a,b);this.L=c;this.C=`detachObject${this.tag}`}F(a,b,c,d){null!==c&&c.Af();const e=a.get(this.C);e&&(e(),a.remove(this.C));const f=olympe.sc.ih(d);if(f instanceof olympe.dc.CloudObject){if(d=f.R(),this.Mk(a,d,[d]),null!==c&&'function'===typeof f.getValue){c.run(()=>{olympe.D.wc([f.getValue()],g=>{b(g.valueOf())})});return}}else f instanceof olympe.dc.Va&&this.Mk(a,`qr-${f.hash}`,ye(f));b(f)}Mk(a,b,c){const d=a.getParent();
882
- d.Mk(b,c);a.set(this.C,()=>Gi(d,b))}getValue(a){return this.Mf(olympe.sc.logic.wb.valueProp,a||olympe.dc.W.Sb.ih,Object)}Rt(){const a=this.transform(olympe.sc.logic.wb.C,olympe.sc.logic.Ic.typeRel);a.Gd(olympe.dc.CloudObject);return a.Oc()}dx(){return this.cd(olympe.sc.logic.wb.ka,olympe.dc.CloudObject)}bx(){return this.cd(olympe.sc.logic.wb.ra,olympe.sc.logic.Vb)}cx(){return this.cd(olympe.sc.logic.wb.aa,olympe.dm.Property)}tw(){return this.cd(olympe.sc.logic.wb.N,olympe.dc.CloudObject)}rw(){return this.cd(olympe.sc.logic.wb.C,
882
+ d.Mk(b,c);a.set(this.C,()=>Gi(d,b))}getValue(a){return this.Mf(olympe.sc.logic.wb.valueProp,a||olympe.dc.W.Tb.ih,Object)}Rt(){const a=this.transform(olympe.sc.logic.wb.C,olympe.sc.logic.Ic.typeRel);a.Hd(olympe.dc.CloudObject);return a.Oc()}dx(){return this.cd(olympe.sc.logic.wb.ka,olympe.dc.CloudObject)}bx(){return this.cd(olympe.sc.logic.wb.ra,olympe.sc.logic.Vb)}cx(){return this.cd(olympe.sc.logic.wb.aa,olympe.dm.Property)}tw(){return this.cd(olympe.sc.logic.wb.N,olympe.dc.CloudObject)}rw(){return this.cd(olympe.sc.logic.wb.C,
883
883
  olympe.sc.logic.Lb)}sw(){return this.cd(olympe.sc.logic.wb.F,olympe.dm.Property)}};olympe.sc.logic.wb.P=olympe.dc.Ba.C('0168a431d91f25780000',olympe.sc.logic.wb,olympe.sc.O.Ea);olympe.sc.logic.wb.valueProp=olympe.sc.logic.wb.P.Ca('0168a431d91f25780001');olympe.sc.logic.wb.ka=olympe.sc.logic.wb.P.Pa('0168a431d91f25780002');olympe.sc.logic.wb.ra=P(olympe.sc.logic.wb.P,olympe.sc.logic.Vb.F);olympe.sc.logic.wb.aa=olympe.sc.logic.wb.P.Pa('0168a431d91f25780004');olympe.sc.logic.wb.N=olympe.sc.logic.wb.P.Pa('0168a431d91f2578000a');
884
884
  olympe.sc.logic.wb.C=P(olympe.sc.logic.wb.P,olympe.sc.logic.Lb.F);olympe.sc.logic.wb.F=olympe.sc.logic.wb.P.Pa('0168a431d91f2578000c');P(olympe.dc.CloudObject.P,olympe.sc.logic.wb.ka);P(olympe.dm.Property.P,olympe.sc.logic.wb.aa);P(olympe.dc.CloudObject.P,olympe.sc.logic.wb.N);P(olympe.dm.Property.P,olympe.sc.logic.wb.F);m=olympe.sc.logic.wb.prototype;m.Rt.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.dx.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);
885
- m.bx.K=new olympe.D.J(()=>olympe.sc.logic.Vb,[]);m.cx.K=new olympe.D.J(()=>olympe.dm.Property,[]);m.tw.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.rw.K=new olympe.D.J(()=>olympe.sc.logic.Lb,[]);m.sw.K=new olympe.D.J(()=>olympe.dm.Property,[]);olympe.sc.logic.Yd=class extends olympe.sc.logic.Function{};olympe.sc.logic.Yd.P=olympe.dc.Ba.C('017dc8c114aa61a0e27f',olympe.sc.logic.Yd);olympe.sc.logic.Yd.C=olympe.sc.logic.Yd.P.Pa('017dc8d6d8ef9135f08a');olympe.sc.logic.Yd.G=olympe.sc.logic.Yd.P.Pa('017dc8d6d8ef9135f08b');P(olympe.dm.Nb.P,olympe.sc.logic.Yd.G);function dj(a,b){const c=a.Pd(),d=c.Xl().R(),e=c.Yl().R(),f=c.fn().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.wa.nb.zb.get(a.Tb(),g).then(h=>{h=ej(h,a.V.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.Rj.create(h.toString(),1))}))},b.Y())}
886
- function fj(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.zg(n).finally(()=>b.destroy())}}},h=b.Y(),k=b.on(c,g,h),l=b.on(d,g,h)}
887
- olympe.sc.logic.Qh=class extends olympe.sc.logic.Function{constructor(a,b,c,d,e){super(a,b,c);this.bb=d;this.timeout=e}run(a){a.tn()||(this.db.fb(this,olympe.sc.logic.Qh.C)?this.Xc(a):(Ri(this,a),dj(this,a)))}Xc(a){const b=this.Tb(),c=this.Pd(),d=c.Yr().R(),e=c.Xl().R(),f=c.Yl().R(),g=c.fn().R();(new olympe.H.wa.nb.zb(b,a)).listen().subscribe(rxjs.Subscriber.create(h=>{const k=a.$h('remote call'),l=ej(h.body(),this.V.bind(this,k)),n=Ib(()=>{h.zg(Error(`Timeout reached on remote action ${this.db.name(this)} (${this.tag})`));
888
- k.destroy()},this.timeout);fj(this,k,f,g,n,h);super.run(k);for(const [p,q]of l)p!==e&&k.set(p,q);h.Cj().then(p=>{var q=k.get(d);null!==q&&olympe.dc.xa(q)!==p&&(q=this.Tb(),this.L.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.L.error(`Error while listening on remote action ${this.db.name(k)} (${k}): ${h.message}`)}))}V(a,b){const c=Array.from(b.ee()).map(d=>d.tag());
889
- Kc(this.bb,a.Ec(),b,[],c)}};olympe.sc.logic.Qh.P=olympe.dc.Ba.C('017a7b0c5dcbd8964c5d',olympe.sc.logic.Qh,olympe.sc.O.Ea,olympe.dc.db.O.va,new olympe.T.fa(olympe.sc.Config.Dq));olympe.sc.logic.Qh.C=olympe.sc.logic.Qh.P.Ca('017a7b0c62a02a89444f');function ej(a,b){var c=(new olympe.dc.W.Li(olympe.dc.Ja.Vc)).C(a.p||[]);b&&b(c);c=new Map;for(const [d,e]of Object.entries(a.v||{}))c.set(d,gj(olympe.sc.logic.uk,e,b));return c}function hj(a){a.Bc=new olympe.dc.db.xc;a.values=Object.create(null)}
885
+ m.bx.K=new olympe.D.J(()=>olympe.sc.logic.Vb,[]);m.cx.K=new olympe.D.J(()=>olympe.dm.Property,[]);m.tw.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.rw.K=new olympe.D.J(()=>olympe.sc.logic.Lb,[]);m.sw.K=new olympe.D.J(()=>olympe.dm.Property,[]);olympe.sc.logic.Yd=class extends olympe.sc.logic.Function{};olympe.sc.logic.Yd.P=olympe.dc.Ba.C('017dc8c114aa61a0e27f',olympe.sc.logic.Yd);olympe.sc.logic.Yd.C=olympe.sc.logic.Yd.P.Pa('017dc8d6d8ef9135f08a');olympe.sc.logic.Yd.G=olympe.sc.logic.Yd.P.Pa('017dc8d6d8ef9135f08b');P(olympe.dm.Nb.P,olympe.sc.logic.Yd.G);function dj(a,b){const c=a.Qd(),d=c.Xl().R(),e=c.Yl().R(),f=c.fn().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.wa.nb.zb.get(a.Rb(),g).then(h=>{h=ej(h,a.V.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.Rj.create(h.toString(),1))}))},b.Y())}
886
+ function fj(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.Rb()}: ${p.message}`),f.zg(n).finally(()=>b.destroy())}}},h=b.Y(),k=b.on(c,g,h),l=b.on(d,g,h)}
887
+ olympe.sc.logic.Qh=class extends olympe.sc.logic.Function{constructor(a,b,c,d,e){super(a,b,c);this.bb=d;this.timeout=e}run(a){a.tn()||(this.db.fb(this,olympe.sc.logic.Qh.C)?this.Xc(a):(Ri(this,a),dj(this,a)))}Xc(a){const b=this.Rb(),c=this.Qd(),d=c.Yr().R(),e=c.Xl().R(),f=c.Yl().R(),g=c.fn().R();(new olympe.H.wa.nb.zb(b,a)).listen().subscribe(rxjs.Subscriber.create(h=>{const k=a.$h('remote call'),l=ej(h.body(),this.V.bind(this,k)),n=Ib(()=>{h.zg(Error(`Timeout reached on remote action ${this.db.name(this)} (${this.tag})`));
888
+ k.destroy()},this.timeout);fj(this,k,f,g,n,h);super.run(k);for(const [p,q]of l)p!==e&&k.set(p,q);h.Cj().then(p=>{var q=k.get(d);null!==q&&olympe.dc.xa(q)!==p&&(q=this.Rb(),this.L.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.Rb();this.L.error(`Error while listening on remote action ${this.db.name(k)} (${k}): ${h.message}`)}))}V(a,b){const c=Array.from(b.ee()).map(d=>d.tag());
889
+ Kc(this.bb,a.Ec(),b,[],c)}};olympe.sc.logic.Qh.P=olympe.dc.Ba.C('017a7b0c5dcbd8964c5d',olympe.sc.logic.Qh,olympe.sc.O.Ea,olympe.dc.db.O.va,new olympe.T.fa(olympe.sc.Config.Dq));olympe.sc.logic.Qh.C=olympe.sc.logic.Qh.P.Ca('017a7b0c62a02a89444f');function ej(a,b){var c=(new olympe.dc.W.Li(olympe.dc.Ha.Vc)).C(a.p||[]);b&&b(c);c=new Map;for(const [d,e]of Object.entries(a.v||{}))c.set(d,gj(olympe.sc.logic.uk,e,b));return c}function hj(a){a.Bc=new olympe.dc.db.xc;a.values=Object.create(null)}
890
890
  function gj(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 se(b.v);case 6:return Be(b.v,c);case 7:return new Map(Object.entries(b.m).map(([d,e])=>[d,gj(a,e,c)]));default:return Array.isArray(b)?b.map(d=>gj(a,d,c)):'object'===typeof b?Object.entries(b).reduce((d,[e,f])=>{d[e]=gj(a,f,c);return d},{}):b}}
891
- function ij(a,b){var c=a.db;a=a.Bc;if(c.Gb(b)){a.F(b,c.rd(b,!0),0);a.Ra(olympe.dc.ic.Tc,b,c.model(b),0);for(const [d,e,f]of Ad(c,b))(c=a.Jf(f))&&c.se()&&(e===olympe.dc.za.DESTINATION?a.Ra(d,b,f,0):a.Ra(d,f,b,0))}else olympe.pa.Xa('Remote Action').error(`Try to serialize an instance ${b} that does not exist in the local datacloud.`)}
891
+ function ij(a,b){var c=a.db;a=a.Bc;if(c.Gb(b)){a.F(b,c.rd(b,!0),0);a.Ra(olympe.dc.jc.Tc,b,c.model(b),0);for(const [d,e,f]of Ad(c,b))(c=a.Jf(f))&&c.se()&&(e===olympe.dc.za.DESTINATION?a.Ra(d,b,f,0):a.Ra(d,f,b,0))}else olympe.pa.Xa('Remote Action').error(`Try to serialize an instance ${b} that does not exist in the local datacloud.`)}
892
892
  olympe.sc.logic.uk=class{constructor(){this.db=olympe.dc.Na();hj(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.wd;this.Bc.Mc(b);a.p=$d(b);a.v=this.values;hj(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,
893
893
  r:a.Of().valueOf(),g:a.If().valueOf(),b:a.Df().valueOf(),a:a.Cf().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(),ij(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===
894
- a:case void 0===a:return null;case 'object'===typeof a:return Object.entries(a).reduce((c,[d,e])=>{c[d]=this.C(e);return c},{});default:return a}}};olympe.sc.logic.controllers={};olympe.sc.logic.controllers.Rl=class{constructor(a){this.db=olympe.dc.Na();this.typeRel=a}};olympe.sc.logic.controllers.Rl.C={Zy:-1,Uz:1};olympe.sc.logic.controllers.xA=class extends olympe.sc.logic.controllers.Rl{constructor(){super(olympe.sc.logic.le.C)}};olympe.sc.logic.controllers.zA=class extends olympe.sc.logic.controllers.Rl{constructor(){super(olympe.sc.logic.Ic.typeRel)}};olympe.sc.logic.Qk={};olympe.sc.logic.Qk.Vu=class extends olympe.sc.logic.Function{update(a,[b,c],[d]){const e=olympe.dc.xa(b);e?af(Ve(new olympe.dc.jf(e),olympe.dc.Rb.rf),c).hb(()=>{d(olympe.dc.CloudObject.get(e))}):this.L.warn('Cannot subscribe to an instance with no tag: '+e)}};olympe.sc.logic.Ba.C('0174bf4b7e006e4b788a',olympe.sc.logic.Qk.Vu);olympe.sc.logic.actions={};olympe.sc.logic.Qk.bu=class extends olympe.sc.logic.Function{run(a){Ri(this,a);const [b,c,d]=this.F(a);let e,f=null,g=null;const h=a.getParent(),k=()=>{null===g||0===e?(this.L.warn('No list to iter upon'),this.L.info(a.Y())):f<e?(b(g.Xe(f)),f++,c((new Date).getTime())):(h.ml(),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.Bg();f=0;h.Kk();k();break;case 2:k();break;default:this.L.error('Unhandled input')}},this.tag))}};
895
- olympe.sc.logic.Ba.C('0171889b060b6cd54300',olympe.sc.logic.Qk.bu);olympe.sc.logic.ac={};olympe.sc.logic.ac.uo=class extends olympe.sc.logic.Oe{F(){return this.Hf('017dc92292107fb98b21')}};cj('017dc8d6c8fd8c8bd2f0',olympe.sc.logic.ac.uo);olympe.sc.logic.ac.uo.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Lb,[]);olympe.sc.logic.ac.Tl=class extends olympe.sc.logic.Oe{F(){return this.Hf('016ac63808535703691c')}};olympe.sc.logic.ac.Tl.P=cj('0169b6876a03f139d50a',olympe.sc.logic.ac.Tl);olympe.sc.logic.ac.Tl.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Lb,[]);olympe.sc.logic.ac.hm=class extends olympe.sc.logic.Oe{F(){return this.Hf('016ac63809a9a8e6db96')}G(){return this.nh('016ac6380ab003363b3e')}};cj('01646ad602f933b8caaf',olympe.sc.logic.ac.hm);olympe.sc.logic.ac.hm.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Lb,[]);olympe.sc.logic.ac.hm.prototype.G.K=new olympe.D.J(()=>olympe.sc.logic.Vb,[]);olympe.sc.logic.ac.lk=class extends olympe.sc.logic.Oe{F(){return this.Hf('016ac6380bd98f1d91a0')}N(){return this.nh('016ac63c589ae38ca3ae')}G(){return this.nh('016ac63c5a377fceabaa')}};cj('0168ec42fc01747a98b6',olympe.sc.logic.ac.lk);olympe.sc.logic.ac.lk.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Lb,[]);olympe.sc.logic.ac.lk.prototype.N.K=new olympe.D.J(()=>olympe.sc.logic.Vb,[]);olympe.sc.logic.ac.lk.prototype.G.K=new olympe.D.J(()=>olympe.sc.logic.Vb,[]);olympe.sc.logic.ac.Zg=class extends olympe.sc.logic.Oe{Xl(){return this.Hf('017a7b07b09e3b22c8b4')}Yr(){return this.Hf('017a7b07ba05807a74b0')}Yl(){return this.nh('017a7b0818c12388d731')}fn(){return this.nh('017a7b085146d5e69aec')}St(){return olympe.D.qa.F}};olympe.sc.logic.ac.Zg.ra='017a7b07b09e3b22c8b4';olympe.sc.logic.ac.Zg.Nd='017a7b07ba05807a74b0';olympe.sc.logic.ac.Zg.Xc='017a7b0818c12388d731';olympe.sc.logic.ac.Zg.C='017a7b085146d5e69aec';
896
- olympe.sc.logic.ac.Zg.P=cj('017a7b07a948e30508fa',olympe.sc.logic.ac.Zg,olympe.sc.logic.Qh);m=olympe.sc.logic.ac.Zg.prototype;m.Xl.K=new olympe.D.J(()=>olympe.sc.logic.Lb,[]);m.Yr.K=new olympe.D.J(()=>olympe.sc.logic.Lb,[]);m.Yl.K=new olympe.D.J(()=>olympe.sc.logic.Vb,[]);m.fn.K=new olympe.D.J(()=>olympe.sc.logic.Vb,[]);m.St.K=olympe.D.J.V;olympe.sc.logic.ac.Xq=class extends olympe.sc.logic.Oe{F(){return this.Hf('016ac63c5b3ed0562740')}};cj('016a9766c230916ea5ec',olympe.sc.logic.ac.Xq);olympe.sc.logic.ac.Xq.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Lb,[]);olympe.sc.query={};olympe.sc.query.Vn=class extends olympe.sc.Wg{};olympe.sc.query.Vn.P=olympe.dc.Ba.C('01631aacd8276ea98491',olympe.sc.query.Vn);olympe.sc.query.jq=class extends olympe.dm.Enum{};olympe.sc.query.jq.P=olympe.dc.Ba.C('01631aacd8276ea98495',olympe.sc.query.jq);olympe.sc.query.uq=class extends olympe.dm.Enum{};olympe.sc.query.uq.P=olympe.dc.Ba.C('01631aacd8276ea98494',olympe.sc.query.uq);olympe.sc.query.wq=class extends olympe.sc.Wg{};olympe.sc.query.wq.P=olympe.dc.Ba.C('01631aacd8276ea98492',olympe.sc.query.wq);olympe.sc.query.xq=class extends olympe.dc.CloudObject{};olympe.sc.query.xq.P=olympe.dc.Ba.C('01631aacd8276ea98493',olympe.sc.query.xq);olympe.sc.La={};olympe.sc.La.Me=class extends olympe.sc.pb{C(){return olympe.sc.Ze.fh.Lu}};olympe.sc.La.Me.P=Jc(olympe.dc.Ba.C('01120300000000adef00',olympe.sc.La.Me));olympe.sc.La.Me.C=olympe.sc.La.Me.P.Pa('0171bc1f15da96dfdb89');P(olympe.dm.md.P,olympe.sc.La.Me.C);olympe.sc.La.Gj=class extends olympe.sc.Runnable{aa(){return[this.Tb()]}V(){return olympe.dc.ld.from(this.Tb()).sb(olympe.sc.La.Me.C).bd()}};olympe.sc.La.Gj.P=Jc(olympe.dc.Ba.C('0113030000000aca1100',olympe.sc.La.Gj));olympe.sc.La.Gj.prototype.V.K=new olympe.D.J(()=>olympe.dm.Nb,[]);olympe.sc.La.tb=class extends olympe.dc.CloudObject{Ut(){return this.qh(olympe.sc.La.tb.F)}Gx(){return this.qh(olympe.sc.La.tb.Ab)}Rd(){return this.Ie(olympe.sc.La.tb.C)}vw(){return this.Fb(olympe.sc.La.tb.ka)}Tw(){return this.Fb(olympe.sc.La.tb.bb)}Sw(){return this.Fb(olympe.sc.La.tb.Sa)}bn(){this.Fb(olympe.sc.La.tb.ab)}Hw(){return this.Fb(olympe.sc.La.tb.ra)}iw(){return this.Fb(olympe.sc.La.tb.N)}Rw(){return this.Fb(olympe.sc.La.tb.Da)}Tt(){return this.Fb(olympe.sc.La.tb.aa)}};
894
+ a:case void 0===a:return null;case 'object'===typeof a:return Object.entries(a).reduce((c,[d,e])=>{c[d]=this.C(e);return c},{});default:return a}}};olympe.sc.logic.controllers={};olympe.sc.logic.controllers.Rl=class{constructor(a){this.db=olympe.dc.Na();this.typeRel=a}};olympe.sc.logic.controllers.Rl.C={Zy:-1,Uz:1};olympe.sc.logic.controllers.xA=class extends olympe.sc.logic.controllers.Rl{constructor(){super(olympe.sc.logic.le.C)}};olympe.sc.logic.controllers.zA=class extends olympe.sc.logic.controllers.Rl{constructor(){super(olympe.sc.logic.Ic.typeRel)}};olympe.sc.logic.Qk={};olympe.sc.logic.Qk.Vu=class extends olympe.sc.logic.Function{update(a,[b,c],[d]){const e=olympe.dc.xa(b);e?af(Ve(new olympe.dc.jf(e),olympe.dc.Sb.rf),c).hb(()=>{d(olympe.dc.CloudObject.get(e))}):this.L.warn('Cannot subscribe to an instance with no tag: '+e)}};olympe.sc.logic.Ba.C('0174bf4b7e006e4b788a',olympe.sc.logic.Qk.Vu);olympe.sc.logic.actions={};olympe.sc.logic.Qk.bu=class extends olympe.sc.logic.Function{run(a){Ri(this,a);const [b,c,d]=this.F(a);let e,f=null,g=null;const h=a.getParent(),k=()=>{null===g||0===e?(this.L.warn('No list to iter upon'),this.L.info(a.Y())):f<e?(b(g.Xe(f)),f++,c((new Date).getTime())):(h.ml(),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.Bg();f=0;h.Kk();k();break;case 2:k();break;default:this.L.error('Unhandled input')}},this.tag))}};
895
+ olympe.sc.logic.Ba.C('0171889b060b6cd54300',olympe.sc.logic.Qk.bu);olympe.sc.logic.ac={};olympe.sc.logic.ac.uo=class extends olympe.sc.logic.Oe{F(){return this.Hf('017dc92292107fb98b21')}};cj('017dc8d6c8fd8c8bd2f0',olympe.sc.logic.ac.uo);olympe.sc.logic.ac.uo.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Lb,[]);olympe.sc.logic.ac.Tl=class extends olympe.sc.logic.Oe{F(){return this.Hf('016ac63808535703691c')}};olympe.sc.logic.ac.Tl.P=cj('0169b6876a03f139d50a',olympe.sc.logic.ac.Tl);olympe.sc.logic.ac.Tl.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Lb,[]);olympe.sc.logic.ac.hm=class extends olympe.sc.logic.Oe{F(){return this.Hf('016ac63809a9a8e6db96')}G(){return this.nh('016ac6380ab003363b3e')}};cj('01646ad602f933b8caaf',olympe.sc.logic.ac.hm);olympe.sc.logic.ac.hm.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Lb,[]);olympe.sc.logic.ac.hm.prototype.G.K=new olympe.D.J(()=>olympe.sc.logic.Vb,[]);olympe.sc.logic.ac.lk=class extends olympe.sc.logic.Oe{F(){return this.Hf('016ac6380bd98f1d91a0')}N(){return this.nh('016ac63c589ae38ca3ae')}G(){return this.nh('016ac63c5a377fceabaa')}};cj('0168ec42fc01747a98b6',olympe.sc.logic.ac.lk);olympe.sc.logic.ac.lk.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Lb,[]);olympe.sc.logic.ac.lk.prototype.N.K=new olympe.D.J(()=>olympe.sc.logic.Vb,[]);olympe.sc.logic.ac.lk.prototype.G.K=new olympe.D.J(()=>olympe.sc.logic.Vb,[]);olympe.sc.logic.ac.Zg=class extends olympe.sc.logic.Oe{Xl(){return this.Hf('017a7b07b09e3b22c8b4')}Yr(){return this.Hf('017a7b07ba05807a74b0')}Yl(){return this.nh('017a7b0818c12388d731')}fn(){return this.nh('017a7b085146d5e69aec')}St(){return olympe.D.qa.F}};olympe.sc.logic.ac.Zg.ra='017a7b07b09e3b22c8b4';olympe.sc.logic.ac.Zg.Od='017a7b07ba05807a74b0';olympe.sc.logic.ac.Zg.Xc='017a7b0818c12388d731';olympe.sc.logic.ac.Zg.C='017a7b085146d5e69aec';
896
+ olympe.sc.logic.ac.Zg.P=cj('017a7b07a948e30508fa',olympe.sc.logic.ac.Zg,olympe.sc.logic.Qh);m=olympe.sc.logic.ac.Zg.prototype;m.Xl.K=new olympe.D.J(()=>olympe.sc.logic.Lb,[]);m.Yr.K=new olympe.D.J(()=>olympe.sc.logic.Lb,[]);m.Yl.K=new olympe.D.J(()=>olympe.sc.logic.Vb,[]);m.fn.K=new olympe.D.J(()=>olympe.sc.logic.Vb,[]);m.St.K=olympe.D.J.V;olympe.sc.logic.ac.Xq=class extends olympe.sc.logic.Oe{F(){return this.Hf('016ac63c5b3ed0562740')}};cj('016a9766c230916ea5ec',olympe.sc.logic.ac.Xq);olympe.sc.logic.ac.Xq.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Lb,[]);olympe.sc.query={};olympe.sc.query.Vn=class extends olympe.sc.Wg{};olympe.sc.query.Vn.P=olympe.dc.Ba.C('01631aacd8276ea98491',olympe.sc.query.Vn);olympe.sc.query.jq=class extends olympe.dm.Enum{};olympe.sc.query.jq.P=olympe.dc.Ba.C('01631aacd8276ea98495',olympe.sc.query.jq);olympe.sc.query.uq=class extends olympe.dm.Enum{};olympe.sc.query.uq.P=olympe.dc.Ba.C('01631aacd8276ea98494',olympe.sc.query.uq);olympe.sc.query.wq=class extends olympe.sc.Wg{};olympe.sc.query.wq.P=olympe.dc.Ba.C('01631aacd8276ea98492',olympe.sc.query.wq);olympe.sc.query.xq=class extends olympe.dc.CloudObject{};olympe.sc.query.xq.P=olympe.dc.Ba.C('01631aacd8276ea98493',olympe.sc.query.xq);olympe.sc.La={};olympe.sc.La.Me=class extends olympe.sc.pb{C(){return olympe.sc.Ze.fh.Lu}};olympe.sc.La.Me.P=Jc(olympe.dc.Ba.C('01120300000000adef00',olympe.sc.La.Me));olympe.sc.La.Me.C=olympe.sc.La.Me.P.Pa('0171bc1f15da96dfdb89');P(olympe.dm.md.P,olympe.sc.La.Me.C);olympe.sc.La.Gj=class extends olympe.sc.Runnable{aa(){return[this.Rb()]}V(){return olympe.dc.ld.from(this.Rb()).sb(olympe.sc.La.Me.C).bd()}};olympe.sc.La.Gj.P=Jc(olympe.dc.Ba.C('0113030000000aca1100',olympe.sc.La.Gj));olympe.sc.La.Gj.prototype.V.K=new olympe.D.J(()=>olympe.dm.Nb,[]);olympe.sc.La.tb=class extends olympe.dc.CloudObject{Ut(){return this.qh(olympe.sc.La.tb.F)}Gx(){return this.qh(olympe.sc.La.tb.Ab)}Sd(){return this.Ie(olympe.sc.La.tb.C)}vw(){return this.Fb(olympe.sc.La.tb.ka)}Tw(){return this.Fb(olympe.sc.La.tb.bb)}Sw(){return this.Fb(olympe.sc.La.tb.Sa)}bn(){this.Fb(olympe.sc.La.tb.ab)}Hw(){return this.Fb(olympe.sc.La.tb.ra)}iw(){return this.Fb(olympe.sc.La.tb.N)}Rw(){return this.Fb(olympe.sc.La.tb.Da)}Tt(){return this.Fb(olympe.sc.La.tb.aa)}};
897
897
  olympe.sc.La.tb.P=olympe.dc.Ba.C('011203300000000adef5',olympe.sc.La.tb);olympe.sc.La.tb.F=olympe.sc.La.tb.P.Ca('011203300000000adef6');olympe.sc.La.tb.Ab=olympe.sc.La.tb.P.Ca('011203300000000adef7');olympe.sc.La.tb.C=olympe.sc.La.tb.P.Ca('011203300000000adef8');olympe.sc.La.tb.ka=olympe.sc.La.tb.P.Ca('011203300000000adef9');olympe.sc.La.tb.bb=olympe.sc.La.tb.P.Ca('011203300000000adefa');olympe.sc.La.tb.Sa=olympe.sc.La.tb.P.Ca('011203300000000adefb');olympe.sc.La.tb.N=olympe.sc.La.tb.P.Ca('011203300000000adefc');
898
- olympe.sc.La.tb.ab=olympe.sc.La.tb.P.Ca('011203300000000adefd');olympe.sc.La.tb.ra=olympe.sc.La.tb.P.Ca('011203300000000adefe');olympe.sc.La.tb.Da=olympe.sc.La.tb.P.Ca('011203300000000adeff');olympe.sc.La.tb.aa=olympe.sc.La.tb.P.Ca('011203300000000adee0');olympe.sc.La.tb.Xb={INIT:0,Py:1,Qi:2,ym:3,vk:4,VA:5,qc:9};m=olympe.sc.La.tb.prototype;m.Ut.K=olympe.D.J.V;m.Gx.K=olympe.D.J.V;m.Rd.K=olympe.D.J.G;m.vw.K=olympe.D.J.F;m.Tw.K=olympe.D.J.F;m.Sw.K=olympe.D.J.F;m.bn.K=olympe.D.J.F;m.Hw.K=olympe.D.J.F;
898
+ olympe.sc.La.tb.ab=olympe.sc.La.tb.P.Ca('011203300000000adefd');olympe.sc.La.tb.ra=olympe.sc.La.tb.P.Ca('011203300000000adefe');olympe.sc.La.tb.Da=olympe.sc.La.tb.P.Ca('011203300000000adeff');olympe.sc.La.tb.aa=olympe.sc.La.tb.P.Ca('011203300000000adee0');olympe.sc.La.tb.Xb={INIT:0,Py:1,Qi:2,ym:3,vk:4,VA:5,qc:9};m=olympe.sc.La.tb.prototype;m.Ut.K=olympe.D.J.V;m.Gx.K=olympe.D.J.V;m.Sd.K=olympe.D.J.G;m.vw.K=olympe.D.J.F;m.Tw.K=olympe.D.J.F;m.Sw.K=olympe.D.J.F;m.bn.K=olympe.D.J.F;m.Hw.K=olympe.D.J.F;
899
899
  m.iw.K=olympe.D.J.F;m.Rw.K=olympe.D.J.F;m.Tt.K=olympe.D.J.F;olympe.sc.La.np=class extends olympe.sc.La.Gj{Sa(){return!0}};olympe.sc.La.np.P=olympe.dc.Ba.C('0113032000000aca1102',olympe.sc.La.np,olympe.sc.O.Ea);olympe.sc.La.ah=class extends olympe.sc.La.Me{F(){return(new olympe.dc.fk(this.R(),olympe.sc.La.tb)).sb(olympe.sc.La.ah.ra).nf().Oc()}};olympe.sc.La.ah.P=olympe.dc.Ba.C('011203300000000adef3',olympe.sc.La.ah);olympe.sc.La.ah.ra=olympe.sc.La.ah.P.Pa('011203300000000adef4');P(olympe.sc.La.tb.P,olympe.sc.La.ah.ra);olympe.sc.La.ah.prototype.F.K=new olympe.D.J(()=>olympe.sc.La.tb,[]);olympe.sc.dh=class extends olympe.dc.CloudObject{static get(){return olympe.dc.CloudObject.get('011203300000000adf0f')}};olympe.sc.dh.P=olympe.dc.Ba.C('011203300000000adf00',olympe.sc.dh);olympe.sc.dh.F=olympe.sc.dh.P.Ca('011203300000000adf01');olympe.sc.dh.C=olympe.sc.dh.P.Ca('011203300000000adf02');olympe.sc.dh.N='011203300000000adf0f';olympe.sc.Xy=class{};olympe.sc.cb=class{constructor(a){this.vb=a}Y(){return this.vb.Y()}mn(){return this.vb.mn()}getParent(){return this.vb.getParent()}Rk(){return this.vb.Rk()}Ec(){return this.vb.Ec()}wn(a){this.vb.wn(a)}Kk(){this.vb.Kk()}ml(){this.vb.ml()}set(a,b){this.vb.set(a,b);return this}ni(a){this.vb.ni(a);return this}remove(a){this.vb.remove(a)}Eb(a,b,c=!1){return this.vb.Eb(a,b,c)}get(a,b=!1){return this.vb.get(a,b)}has(a,b=!1){return this.vb.has(a,b)}observe(a,b=!0,c=!1){return new rxjs.Observable(d=>{const e=
900
900
  this.get(a);b||null!==e||d.next(e);const f=this.on(a,d.next.bind(d),c?void 0:this.Y(),!1);this.Jg(()=>{f();d.complete()});return f})}repeat(a,b){this.vb.repeat(a,b);return this}gl(a){return this.vb.gl(a)}Ln(a,b=!0,c=!1){return rxjs.firstValueFrom(this.observe(a,b,c))}jl(a){this.vb.jl(a);return this}Ya(a,b=!0){return this.vb.Ya(a,b)}on(a,b,c,d=!0){return this.vb.on(a,b,c,d)}$h(a){return this.vb.$h(a)}Vk(a,b){return this.vb.Vk(a,b)}sj(a,b){return this.vb.sj(a,b)}gi(a){return this.vb.gi(a)}oj(){return this.vb.oj()}Jg(a,
901
901
  b){return this.vb.Jg(a,b)}el(a){this.vb.el(a)}onDestroy(a){return this.vb.onDestroy(a)}Je(a){this.vb.Je(a)}destroy(){this.vb.destroy()}clear(){this.vb.clear()}yb(){return this.vb.yb()}tn(){return this.vb.tn()}$k(){return this.vb.$k()}fb(a){if('function'!==typeof this.vb.getProperty)throw Error('Trying to call deprecated method $.getProperty() in a non-UI brick');return this.vb.getProperty(a)}ww(a){if('function'!==typeof this.vb.getEvent)throw Error('Trying to call deprecated method $.getEvent() in a non-UI brick');
902
902
  return this.vb.getEvent(a)}Qx(...a){if('function'!==typeof this.vb.observeMany)throw Error('Trying to call deprecated method $.observeMany() in a non-UI brick');return this.vb.observeMany(a)}};olympe.sc.cb.prototype.observeMany=olympe.sc.cb.prototype.Qx;olympe.sc.cb.prototype.getEvent=olympe.sc.cb.prototype.ww;olympe.sc.cb.prototype.getProperty=olympe.sc.cb.prototype.fb;olympe.sc.cb.prototype.clear=olympe.sc.cb.prototype.clear;olympe.sc.cb.prototype.destroy=olympe.sc.cb.prototype.destroy;
903
903
  olympe.sc.cb.prototype.offDestroy=olympe.sc.cb.prototype.Je;olympe.sc.cb.prototype.onDestroy=olympe.sc.cb.prototype.onDestroy;olympe.sc.cb.prototype.offClear=olympe.sc.cb.prototype.el;olympe.sc.cb.prototype.onClear=olympe.sc.cb.prototype.Jg;olympe.sc.cb.prototype.getOtherContext=olympe.sc.cb.prototype.gi;olympe.sc.cb.prototype.onContext=olympe.sc.cb.prototype.sj;olympe.sc.cb.prototype.createChild=olympe.sc.cb.prototype.$h;olympe.sc.cb.prototype.setParentElement=olympe.sc.cb.prototype.jl;
904
904
  olympe.sc.cb.prototype.waitFor=olympe.sc.cb.prototype.Ln;olympe.sc.cb.prototype.runner=olympe.sc.cb.prototype.gl;olympe.sc.cb.prototype.repeat=olympe.sc.cb.prototype.repeat;olympe.sc.cb.prototype.observe=olympe.sc.cb.prototype.observe;olympe.sc.cb.prototype.has=olympe.sc.cb.prototype.has;olympe.sc.cb.prototype.get=olympe.sc.cb.prototype.get;olympe.sc.cb.prototype.remove=olympe.sc.cb.prototype.remove;olympe.sc.cb.prototype.trigger=olympe.sc.cb.prototype.ni;olympe.sc.cb.prototype.set=olympe.sc.cb.prototype.set;
905
- olympe.sc.cb.prototype.getParent=olympe.sc.cb.prototype.getParent;olympe.sc.Oj=class extends olympe.dm.BrickMetadata{C(){return olympe.sc.Ze.fh.Bl}};olympe.sc.Oj.P=olympe.dc.Ba.C('01645fe6873aeea59e64',olympe.sc.Oj);olympe.sc.Oj.C=olympe.sc.Oj.P.Pa('017ed8ac775f48d4d589');olympe.sc.ve=class extends olympe.sc.Runnable{bb(){return this.ub(olympe.sc.ve.G,olympe.sc.Runnable)}V(){return this.ub(olympe.sc.ve.C,olympe.dm.Property)}};olympe.sc.ve.P=Jc(olympe.dc.Ba.C('016c2d996d9ca27fa9d8',olympe.sc.ve));olympe.sc.ve.G=olympe.sc.ve.P.Pa('016c3cb7742ec9309e0b');olympe.sc.ve.C=olympe.sc.ve.P.Pa('016c42d3454636f90533');olympe.sc.ve.prototype.bb.K=new olympe.D.J(()=>olympe.dc.Aa,[]);olympe.sc.ve.prototype.V.K=new olympe.D.J(()=>olympe.dc.Aa,[]);olympe.sc.Lo=class extends olympe.dm.Pb{C(){return olympe.sc.Ze.fh.Bl}};olympe.sc.Lo.P=olympe.dc.Ba.C('017a7a9ff057958e5678',olympe.sc.Lo);olympe.sc.Sp=class extends olympe.dm.Pb{C(){return olympe.sc.Ze.fh.dv}};olympe.sc.Sp.P=olympe.dc.Ba.C('01644b6d4543b344b857',olympe.sc.Sp);olympe.sc.Tp=class extends olympe.dc.CloudObject{};olympe.sc.Tp.P=olympe.dc.Ba.C('0162f672366be5ca7a86',olympe.sc.Tp);olympe.sc.Yq=class extends olympe.sc.ve{};olympe.sc.Yq.P=olympe.dc.Ba.C('016d3f37610ae4fc3962',olympe.sc.Yq);olympe.sc.Text=class extends olympe.dm.String{};olympe.sc.Text.P=olympe.dc.Ba.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.Ja.mc}static from(a){const b=olympe.sc.Ua.lg.TRANSACTION;return a.has(b,!0)?a.get(b,!0):new olympe.sc.Transaction}static process(a,b){return a.has(olympe.sc.Ua.lg.TRANSACTION,!0)?Promise.resolve(!1):b.hb().then(()=>!0)}Y(){return this.C.Y()}create(a,b=new Map,c=this.source,d){d=this.C.create(a,d).mi(c);this.F.set(d.R(),olympe.dc.xa(a));for(const [e,f]of b)d.setProperty(e,
906
- f);c===olympe.dc.Ja.Vc&&(b=olympe.dc.Na(),b=null!==Yi?b.jj(Yi,[olympe.sc.La.Me.C,olympe.sc.jd.F.Pc()])[0]||null:null,null!==b?this.Ra(olympe.sc.jd.N,b,d):olympe.pa.Xa('sc').warn('No business container for new instance of',olympe.dc.xa(a)));return d.R()}update(a,b,c){this.C.update(a,b,c);return this}Dx(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}Vm(a,b){this.C.Vm(a,
905
+ olympe.sc.cb.prototype.getParent=olympe.sc.cb.prototype.getParent;olympe.sc.Oj=class extends olympe.dm.BrickMetadata{C(){return olympe.sc.Ze.fh.Bl}};olympe.sc.Oj.P=olympe.dc.Ba.C('01645fe6873aeea59e64',olympe.sc.Oj);olympe.sc.Oj.C=olympe.sc.Oj.P.Pa('017ed8ac775f48d4d589');olympe.sc.ve=class extends olympe.sc.Runnable{bb(){return this.ub(olympe.sc.ve.G,olympe.sc.Runnable)}V(){return this.ub(olympe.sc.ve.C,olympe.dm.Property)}};olympe.sc.ve.P=Jc(olympe.dc.Ba.C('016c2d996d9ca27fa9d8',olympe.sc.ve));olympe.sc.ve.G=olympe.sc.ve.P.Pa('016c3cb7742ec9309e0b');olympe.sc.ve.C=olympe.sc.ve.P.Pa('016c42d3454636f90533');olympe.sc.ve.prototype.bb.K=new olympe.D.J(()=>olympe.dc.Aa,[]);olympe.sc.ve.prototype.V.K=new olympe.D.J(()=>olympe.dc.Aa,[]);olympe.sc.Lo=class extends olympe.dm.Pb{C(){return olympe.sc.Ze.fh.Bl}};olympe.sc.Lo.P=olympe.dc.Ba.C('017a7a9ff057958e5678',olympe.sc.Lo);olympe.sc.Sp=class extends olympe.dm.Pb{C(){return olympe.sc.Ze.fh.dv}};olympe.sc.Sp.P=olympe.dc.Ba.C('01644b6d4543b344b857',olympe.sc.Sp);olympe.sc.Tp=class extends olympe.dc.CloudObject{};olympe.sc.Tp.P=olympe.dc.Ba.C('0162f672366be5ca7a86',olympe.sc.Tp);olympe.sc.Yq=class extends olympe.sc.ve{};olympe.sc.Yq.P=olympe.dc.Ba.C('016d3f37610ae4fc3962',olympe.sc.Yq);olympe.sc.Text=class extends olympe.dm.String{};olympe.sc.Text.P=olympe.dc.Ba.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.Ha.bc}static from(a){const b=olympe.sc.Ua.lg.TRANSACTION;return a.has(b,!0)?a.get(b,!0):new olympe.sc.Transaction}static process(a,b){return a.has(olympe.sc.Ua.lg.TRANSACTION,!0)?Promise.resolve(!1):b.hb().then(()=>!0)}Y(){return this.C.Y()}create(a,b=new Map,c=this.source,d){d=this.C.create(a,d).mi(c);this.F.set(d.R(),olympe.dc.xa(a));for(const [e,f]of b)d.setProperty(e,
906
+ f);c===olympe.dc.Ha.Vc&&(b=olympe.dc.Na(),b=null!==Yi?b.jj(Yi,[olympe.sc.La.Me.C,olympe.sc.jd.F.Pc()])[0]||null:null,null!==b?this.Ra(olympe.sc.jd.N,b,d):olympe.pa.Xa('sc').warn('No business container for new instance of',olympe.dc.xa(a)));return d.R()}update(a,b,c){this.C.update(a,b,c);return this}Dx(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}fc(a,b,c){this.C.fc(a,b,c);return this}Vm(a,b){this.C.Vm(a,
907
907
  b);return this}persist(a=!0){this.C.persist(a);return this}uj(a,b=!0){this.C.uj(a,b);return this}mi(a){this.source=a;return this}model(a){return this.F.get(olympe.dc.xa(a))||olympe.dc.Na().model(a)}zn(a){be(this.C,a.C);return this}Lm(a){this.C.Lm(a);return this}hb(){return new Promise((a,b)=>{this.C.hb((c,d)=>{c?a():b(d)})})}Ym(){return new Promise((a,b)=>{this.C.Ym((c,d)=>{c?a():b(d)})})}};olympe.sc.Transaction.prototype.executeAsLarge=olympe.sc.Transaction.prototype.Ym;
908
908
  olympe.sc.Transaction.prototype.execute=olympe.sc.Transaction.prototype.hb;olympe.sc.Transaction.prototype.afterExecution=olympe.sc.Transaction.prototype.Lm;olympe.sc.Transaction.prototype.merge=olympe.sc.Transaction.prototype.zn;olympe.sc.Transaction.prototype.model=olympe.sc.Transaction.prototype.model;olympe.sc.Transaction.prototype.setSource=olympe.sc.Transaction.prototype.mi;olympe.sc.Transaction.prototype.persistInstance=olympe.sc.Transaction.prototype.uj;
909
- olympe.sc.Transaction.prototype.persist=olympe.sc.Transaction.prototype.persist;olympe.sc.Transaction.prototype.deleteAllRelations=olympe.sc.Transaction.prototype.Vm;olympe.sc.Transaction.prototype.deleteRelation=olympe.sc.Transaction.prototype.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.Dx;
910
- 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.Y;olympe.sc.Transaction.process=olympe.sc.Transaction.process;olympe.sc.Transaction.from=olympe.sc.Transaction.from;olympe.sc.Ze.BrickMetadata=olympe.dm.BrickMetadata;olympe.sc.Ze.we=olympe.dm.we;olympe.ha.node.oa={};const Z={client:'client',hostname:'host',port:'port',user:'user',password:'password',Ha:'database',schema:'schema',gs:'pollingFrequency',Ev:'burstTransactionInterval'},jj=olympe.dc.ga.ja.rm,kj=olympe.dc.ga.ja.tm,lj=olympe.dc.ga.ja.QUERY_RESULT,mj=olympe.dc.ga.ja.sm,nj=olympe.dc.ga.ja.og,oj=olympe.dc.ga.ja.Th,pj=olympe.dc.ga.ja.Bh,qj=olympe.dc.ga.ja.xi,rj=olympe.dc.ga.ja.Ah,sj=olympe.dc.ga.ja.eh,tj=olympe.dc.ga.ja.Jj,uj=olympe.dc.ga.ja.yu;
911
- function vj(a,b,c,d,e){const f=new olympe.H.wa.nb.zb(a.tag,b),g=new olympe.sc.W.kt(a.L,a.Nd,a.bb);g.start(a.tag).catch(h=>a.L.error(`Error occurred while starting the file service of SQLConnector ${e}: ${h}`));f.listen().subscribe(h=>{var k=h.body();a.L.debug(`Serving a new message : ${k.t}`);switch(k.t){case jj:var l=c.queryBuilder().withSchema(d);k=se(k.q);a.V(b,l,k,(t,u)=>{(u?h.zg(Error(u)):h.Le({t:lj,r:t})).then()});break;case kj:k=se(k.q);wj(a,b,()=>c.queryBuilder().withSchema(d),k,h);break;
912
- case uj:xj(b,k.i,h.source());h.Lk().then();break;case sj:k=(new olympe.dc.W.Li(a.Tb())).C(k.p);yj(a,b,c,d,k,t=>(t?h.zg(Error(t)):h.Lk()).then());break;case rj:l=k.i;k=(new olympe.dc.W.Li(a.Tb())).C(k.p);zj(a,b,l,k,c,d);break;case nj:const n=b.get('_subscription_cache');k=k.s.reduce((t,u)=>{n.has(u)?n.get(u).Ge(h.source()):t.push(u);return t},[]);(0<k.length?h.zg(Error(`These subscriptions was not kept alive: ${k}`)):h.Lk()).then();break;case oj:const p=k.f;a.L.debug(`Uploading a file: ${p}`);k=Ni(g,
909
+ olympe.sc.Transaction.prototype.persist=olympe.sc.Transaction.prototype.persist;olympe.sc.Transaction.prototype.deleteAllRelations=olympe.sc.Transaction.prototype.Vm;olympe.sc.Transaction.prototype.deleteRelation=olympe.sc.Transaction.prototype.fc;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.Dx;
910
+ 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.Y;olympe.sc.Transaction.process=olympe.sc.Transaction.process;olympe.sc.Transaction.from=olympe.sc.Transaction.from;olympe.sc.Ze.BrickMetadata=olympe.dm.BrickMetadata;olympe.sc.Ze.we=olympe.dm.we;olympe.ha.node.oa={};const Z={client:'client',hostname:'host',port:'port',user:'user',password:'password',Ia:'database',schema:'schema',gs:'pollingFrequency',Ev:'burstTransactionInterval'},jj=olympe.dc.ga.ja.rm,kj=olympe.dc.ga.ja.tm,lj=olympe.dc.ga.ja.QUERY_RESULT,mj=olympe.dc.ga.ja.sm,nj=olympe.dc.ga.ja.og,oj=olympe.dc.ga.ja.Th,pj=olympe.dc.ga.ja.Bh,qj=olympe.dc.ga.ja.xi,rj=olympe.dc.ga.ja.Ah,sj=olympe.dc.ga.ja.eh,tj=olympe.dc.ga.ja.Jj,uj=olympe.dc.ga.ja.yu;
911
+ function vj(a,b,c,d,e){const f=new olympe.H.wa.nb.zb(a.tag,b),g=new olympe.sc.W.kt(a.L,a.Od,a.bb);g.start(a.tag).catch(h=>a.L.error(`Error occurred while starting the file service of SQLConnector ${e}: ${h}`));f.listen().subscribe(h=>{var k=h.body();a.L.debug(`Serving a new message : ${k.t}`);switch(k.t){case jj:var l=c.queryBuilder().withSchema(d);k=se(k.q);a.V(b,l,k,(t,u)=>{(u?h.zg(Error(u)):h.Le({t:lj,r:t})).then()});break;case kj:k=se(k.q);wj(a,b,()=>c.queryBuilder().withSchema(d),k,h);break;
912
+ case uj:xj(b,k.i,h.source());h.Lk().then();break;case sj:k=(new olympe.dc.W.Li(a.Rb())).C(k.p);yj(a,b,c,d,k,t=>(t?h.zg(Error(t)):h.Lk()).then());break;case rj:l=k.i;k=(new olympe.dc.W.Li(a.Rb())).C(k.p);zj(a,b,l,k,c,d);break;case nj:const n=b.get('_subscription_cache');k=k.s.reduce((t,u)=>{n.has(u)?n.get(u).Ge(h.source()):t.push(u);return t},[]);(0<k.length?h.zg(Error(`These subscriptions was not kept alive: ${k}`)):h.Lk()).then();break;case oj:const p=k.f;a.L.debug(`Uploading a file: ${p}`);k=Ni(g,
913
913
  (t,u,v)=>{a.L.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?Aj(a,b,c,d,p,v).then(()=>new olympe.net.Tg('',olympe.net.eb.od.zl)):Promise.reject(`Try to upload content for file ${p} but body is not a Uint8Array or a string`)});h.Le(k).then();break;case pj:const q=k.f;a.L.debug(`Serving a file: ${q}`);k=Ni(g,(t,u)=>{a.L.debug(`File service received a download request for file : ${u}`);
914
914
  return q!==u?Promise.reject('The file to download is not the same as the one initially requested'):Bj(b,c.queryBuilder().withSchema(d),q).then(v=>{a.L.debug('File service download request, content is:',v);return new olympe.net.Tg(v,olympe.net.eb.od.Lh)})});h.Le(k).then();break;case qj:const r=k.f;a.L.debug(`Deleting a file: ${r}`);k=Ni(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.eb.od.Lh)));h.Le(k).then();
915
915
  break;default:h.zg(Error(`Unsupported message type: ${k.t}`)).then()}})}function wj(a,b,c,d,e){const f=d.Y(),g=`sub${f}`;e.es(g).then(()=>{const h=b.get('_subscription_cache');let k=h.get(f);k||(k=new Cj(f,d,c,b.get('_polling_frequency'),a.V.bind(a,b),a.Xc.bind(a,g,f),()=>h.delete(f)),h.set(f,k));k.Ge(e.source())}).catch(h=>e.zg(Error(h)).then())}function xj(a,b,c){(a=a.get('_subscription_cache').get(b))&&a.detach(c)}
916
916
  function yj(a,b,c,d,e,f){b=b.get('_data_model_observer');a=new olympe.ha.node.oa.Ga.Qq(a.L,b);e.Mc(a);Dj(a,c,d).then(()=>f(null)).catch(g=>f(g))}function zj(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);yj(a,b,e,f,k,l=>{l&&olympe.H.wa.nb.zb.publish(c,{t:tj,r:l})})},b.get('_burst_interval'))):d.Mc(h)}
917
- function Aj(a,b,c,d,e,f){const g=olympe.ha.node.oa.Ga.Yc.Sj,h=new olympe.dc.db.xc;h.F(e,(new Map).set(g,f),0);h.Ra(olympe.dc.ic.Tc,e,olympe.dc.xa(olympe.dm.File));return new Promise((k,l)=>{yj(a,b,c,d,h,n=>n?l(n):k())})}
918
- function Bj(a,b,c){return x(function*(){var d=olympe.ha.node.oa.Ga.Yc.Sj,e=olympe.ha.node.oa.Ga.Yc.Nh;const f=yield Ej(a.get('_data_model_observer').Ud,olympe.dc.xa(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`);}())}
919
- olympe.ha.node.oa.Pq=class extends olympe.sc.logic.Yd{constructor(a,b,c,d){super(a,b,c);this.Nd=d;this.bb=olympe.T.getParameter(olympe.H.ob.lm)}update(a,b){var [c]=b,d=l=>olympe.T.getParameter(`${'dbconnector'}.${c}.${l}`);const e=l=>olympe.T.getParameter(`${'dbconnector'}.${l}`);a.set('_burst_interval',d(Z.Ev)||5E3);a.set('_polling_frequency',d(Z.gs)||e(Z.gs)||6E5);const f=d(Z.client)||e(Z.client)||'pg',g=d(Z.hostname)||e(Z.hostname)||'',h=d(Z.Ha)||e(Z.Ha);b=d(Z.schema)||e(Z.schema)||c;const k=knex({client:f,
920
- connection:{host:g,port:d(Z.port)||e(Z.port),user:d(Z.user)||e(Z.user),password:d(Z.password)||e(Z.password),database:h}});this.L.info(`SQLConnector ${c} started with host ${g}, database ${h} on schema ${b}`);this.ce=olympe.pa.Xa('sql');a.Jg(()=>k.destroy().then());d=new olympe.ha.node.oa.Ga.Ys(k,b,this);a.set('_data_model_observer',d);a.set('_subscription_cache',new Map);vj(this,a,k,b,c)}V(a,b,c,d){a=a.get('_data_model_observer');const e=a.Ud,f=new olympe.ha.node.oa.Ga.vu(c,e);Fj(a).then(()=>Gj(f)).then(g=>
917
+ function Aj(a,b,c,d,e,f){const g=olympe.ha.node.oa.Ga.Yc.Sj,h=new olympe.dc.db.xc;h.F(e,(new Map).set(g,f),0);h.Ra(olympe.dc.jc.Tc,e,olympe.dc.xa(olympe.dm.File));return new Promise((k,l)=>{yj(a,b,c,d,h,n=>n?l(n):k())})}
918
+ function Bj(a,b,c){return x(function*(){var d=olympe.ha.node.oa.Ga.Yc.Sj,e=olympe.ha.node.oa.Ga.Yc.Nh;const f=yield Ej(a.get('_data_model_observer').Cd,olympe.dc.xa(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`);}())}
919
+ olympe.ha.node.oa.Pq=class extends olympe.sc.logic.Yd{constructor(a,b,c,d){super(a,b,c);this.Od=d;this.bb=olympe.T.getParameter(olympe.H.ob.lm)}update(a,b){var [c]=b,d=l=>olympe.T.getParameter(`${'dbconnector'}.${c}.${l}`);const e=l=>olympe.T.getParameter(`${'dbconnector'}.${l}`);a.set('_burst_interval',d(Z.Ev)||5E3);a.set('_polling_frequency',d(Z.gs)||e(Z.gs)||6E5);const f=d(Z.client)||e(Z.client)||'pg',g=d(Z.hostname)||e(Z.hostname)||'',h=d(Z.Ia)||e(Z.Ia);b=d(Z.schema)||e(Z.schema)||c;const k=knex({client:f,
920
+ connection:{host:g,port:d(Z.port)||e(Z.port),user:d(Z.user)||e(Z.user),password:d(Z.password)||e(Z.password),database:h}});this.L.info(`SQLConnector ${c} started with host ${g}, database ${h} on schema ${b}`);this.ce=olympe.pa.Xa('sql');a.Jg(()=>k.destroy().then());d=new olympe.ha.node.oa.Ga.Ys(k,b,this);a.set('_data_model_observer',d);a.set('_subscription_cache',new Map);vj(this,a,k,b,c)}V(a,b,c,d){a=a.get('_data_model_observer');const e=a.Cd,f=new olympe.ha.node.oa.Ga.vu(c,e);Fj(a).then(()=>Gj(f)).then(g=>
921
921
  {if(0===g.length)return[[],g];const h=Hj(new olympe.ha.node.oa.Ga.Oq(f,b,g));this.ce.debug(`Sending a sql query with the following text: ${h.toString()}`);return h.then(k=>[k,g])}).then(g=>{var [h,k]=g;return Ij(c.Y(),h,k,e)}).then(g=>d(g,null)).catch(g=>d({},g))}Xc(a,b,c){olympe.H.wa.nb.zb.publish(a,{t:mj,i:b,r:c}).then().catch(d=>this.L.error('Error occurred while publishing query result update: '+d))}};
922
922
  olympe.ha.node.oa.Pq.P=olympe.dc.Ba.C('017dc8db8074471acb7a',olympe.ha.node.oa.Pq,olympe.sc.O.Ea,olympe.net.O.Dm);
923
923
  class Cj{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.Zl)+6E4);a.C=g;this.C=a;this.start(c,e,f,d)}Ge(a){if(this.C.has(a)){var b=this.C;b.values.has(a)&&b.values.set(a,Date.now())}else this.C.add(a)}detach(a){this.C.delete(a)||olympe.pa.Xa('Subscription Cache').warn(`Try to unsubscribe to the subscription ${this.id} which is not registered.`)}start(a,b,c,d){let e=null,f=new Set;const g=()=>{0<this.C.values.size&&(b(a(),this.query,(h,k)=>
@@ -925,18 +925,18 @@ class Cj{constructor(a,b,c,d,e,f,g){this.id=a;this.query=b;a=new olympe.W.fr(oly
925
925
  function Nj(a){Oj(a,olympe.dc.xa(olympe.dm.File));const b=new Map;a.F.sb(olympe.sc.logic.Yd.C).observe(a.G).subscribe(c=>{we(c).forEach(d=>{const e=d.R();Pj(a,()=>{var g=Qj;const h=[{name:Lj,af:Lj,Zk:!1}];e===olympe.dc.xa(olympe.dm.File)&&h.push({name:Mj,af:Mj,Zk:!1});return g(a,e,e,h)},`Create Table for ${e}`);const f=new olympe.D.Wb('Business model context',a.G);b.set(e,f);f.run(()=>Rj(a,f,e))});xe(c).forEach(d=>{b.get(d).destroy();Pj(a,()=>Sj(a,d),`Delete Table for ${d}`)})})}
926
926
  function Tj(a){a.C++;1===a.C&&a.L.debug('Data model observer is busy')}function Uj(a){a.C--;if(0===a.C){a.L.debug('Data model observer is free');for(const b of a.N)b();a.N.clear()}}function Oj(a,b){if(!a.db.al(a.F,olympe.sc.logic.Yd.C,b)){Tj(a);const c=new olympe.dc.Transaction;c.Ra(olympe.sc.logic.Yd.C,a.F,b);c.hb((d,e)=>{d||a.L.error(`Error while linking the business model ${b} to the SQLConnector: ${e}`);Uj(a)},!0)}}function Vj(a){return a.client.schema.withSchema(a.schema)}
927
927
  function Pj(a,b,c){if(!a.G.gd()&&!a.G.yb()){a.L.debug(`Push operation:${c}`);Tj(a);var d=a.V,e=()=>{d.shift();Uj(a);if(0<d.length)d[0]()},f=()=>{b().then(()=>{a.L.debug(`Operation ${c} succeed`);e()}).catch(g=>{a.L.error(`Error for operation ${c}: ${g}`);e()})};d.push(f);1===d.length&&f()}}
928
- function Qj(a,b,c,d){return x(function*(){if(yield Vj(a).hasTable(b))return a.L.debug(`Table ${c} already exist`),Promise.resolve().then(()=>{var e=a.Ud;e.C.set(c,b);e.G.set(b,c)});a.L.debug('Create table for : '+c);return Vj(a).createTable(b,e=>{d.forEach(f=>{var {name:g,af:h,Gr:k,rs:l,Zk:n}=f;Wj(a,e,g,h,n,l,k)})}).then(()=>{var e=a.Ud;e.C.set(c,b);e.G.set(b,c)})}())}
928
+ function Qj(a,b,c,d){return x(function*(){if(yield Vj(a).hasTable(b))return a.L.debug(`Table ${c} already exist`),Promise.resolve().then(()=>{var e=a.Cd;e.C.set(c,b);e.G.set(b,c)});a.L.debug('Create table for : '+c);return Vj(a).createTable(b,e=>{d.forEach(f=>{var {name:g,af:h,Gr:k,rs:l,Zk:n}=f;Wj(a,e,g,h,n,l,k)})}).then(()=>{var e=a.Cd;e.C.set(c,b);e.G.set(b,c)})}())}
929
929
  function Rj(a,b,c){b.onDestroy(()=>{Pj(a,()=>Promise.all(Array.from(a.Ka.get(c)).map(d=>Sj(a,d))).then(()=>{a.Ka.delete(c)}),`Destroy relation tables of business model ${c}: relations: ${a.Ka.get(c)}`)});Xj(a,c,b);a.Ka.set(c,new Set);olympe.dc.gb.from(c).sb(olympe.dc.CloudObject.G).Xi().sb(olympe.dm.Relation.destinationModelRel).Xi().filter((new olympe.dc.da.U.De(a.F)).sb(olympe.sc.logic.Yd.C.Pc())).observe(b).subscribe(d=>{0<we(d).length&&(a.L.debug('Handle new relations : '+we(d)),Pj(a,()=>Promise.all(we(d).map(e=>
930
930
  {var [f,g]=e;a.Ka.get(c).add(f.R());a.Ka.get(g.R()).add(f.R());e=f.R();var h=Qj,k=g.R();return h(a,e,e,[{name:Jj,af:Jj,rs:c,Gr:Lj,Zk:!0},{name:Kj,af:Kj,rs:k,Gr:Lj,Zk:!0}])})).then(),`Add relation tables for business model ${c}: ${we(d)}`));0<xe(d).length&&(a.L.debug('Handle relations to remove : '+xe(d)),Pj(a,()=>Promise.all(xe(d).map(e=>{var [f,g]=e;a.Ka.get(c).delete(f);a.Ka.get(g).delete(f);return Sj(a,f)})).then(),`Delete relation tables for business model ${c}: ${xe(d)}`))})}
931
- function Sj(a,b){return x(function*(){try{var c=yield Ej(a.Ud,b)}catch(d){a.L.warn(`Try to delete a table not registered: ${d}`);return}if(yield Vj(a).hasTable(c)){Vj(a).dropTable(c);c=a.Ud;const d=c.C.get(b);c.G.delete(d)||c.C.delete(b)}}())}
931
+ function Sj(a,b){return x(function*(){try{var c=yield Ej(a.Cd,b)}catch(d){a.L.warn(`Try to delete a table not registered: ${d}`);return}if(yield Vj(a).hasTable(c)){Vj(a).dropTable(c);c=a.Cd;const d=c.C.get(b);c.G.delete(d)||c.C.delete(b)}}())}
932
932
  function Xj(a,b,c){a.L.debug('Observe properties for '+b);olympe.dc.gb.from(b).sb(olympe.dc.CloudObject.propertyRel).observe(c).subscribe(d=>{a.L.debug('New properties for '+b+' '+we(d));Pj(a,()=>Yj(a,b,we(d).map(e=>e.R()),xe(d)),`Update columns of ${b}: added: ${we(d)}, removed: ${xe(d)}`)})}
933
- function Yj(a,b,c,d){return x(function*(){const e=yield Ej(a.Ud,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 Vj(a).table(e,k=>{const l=new Set(Object.keys(h));f.forEach((n,p)=>{!l.has(n)&&Wj(a,k,n,c[p])});g.forEach(n=>{l.has(n)&&k.dropColumn(n)})})}())}
933
+ function Yj(a,b,c,d){return x(function*(){const e=yield Ej(a.Cd,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 Vj(a).table(e,k=>{const l=new Set(Object.keys(h));f.forEach((n,p)=>{!l.has(n)&&Wj(a,k,n,c[p])});g.forEach(n=>{l.has(n)&&k.dropColumn(n)})})}())}
934
934
  function Wj(a,b,c,d,e,f,g){e=void 0===e?!1:e;f=void 0===f?'':f;g=void 0===g?'':g;if(c===Lj)b.string(c,21).primary();else if(c===Jj||c===Kj){if(e)b.string(c).notNullable().references(g).inTable(f).onDelete('CASCADE')}else c===Mj?b.binary(c):d&&(a=a.db,d=olympe.dc.ld.from(d).sb(olympe.dm.Property.typeRel).bd(),a.Sf(d,olympe.dm.String)?b.string(c,1E3):a.Sf(d,olympe.dm.Number)?b.double(c):a.Sf(d,olympe.dm.Boolean)?b.boolean(c):a.Sf(d,olympe.dm.DateTime)?b.string(c):a.Sf(d,olympe.dm.Color)&&b.string(c,
935
- 50))}olympe.ha.node.oa.Ga.Ys=class{constructor(a,b,c){this.L=olympe.pa.Xa('sql');this.client=a;this.schema=b;this.F=c;this.Ud=new olympe.ha.node.oa.Ga.bv;this.G=new olympe.D.Wb(`Data Model Observer of ${c.R()}`);this.V=[];this.C=0;this.Ka=new Map;this.N=new Set;this.db=olympe.dc.Na();Nj(this)}};const Zj=olympe.ha.node.oa.Ga.yc.EQUAL,ak=olympe.ha.node.oa.Ga.yc.ag,bk=olympe.ha.node.oa.Ga.yc.Mh,ck=olympe.ha.node.oa.Ga.yc.Xg,dk=olympe.ha.node.oa.Ga.yc.So,ek=olympe.ha.node.oa.Ga.yc.fp,fk=olympe.ha.node.oa.Ga.yc.gp,gk=olympe.ha.node.oa.Ga.yc.Dp,hk=olympe.ha.node.oa.Ga.yc.Ep,ik=olympe.ha.node.oa.Ga.yc.Cq,jk=olympe.ha.node.oa.Ga.yc.Tq,kk=olympe.ha.node.oa.Ga.Yc.Nh;
936
- function Gj(a){return x(function*(){var b=a.query.G;let c=b;var d=[];const e=a.query.C;let f=olympe.dc.Na().nj(b);!f&&e[0]instanceof olympe.dc.da.Kb.jg&&(f=e[0].Qd().qb(olympe.dc.CloudObject.instancesRel));if(f){try{var g=yield Ej(a.Qe,b)}catch(l){return[]}f=!0;e.shift()}else{try{var h=yield a.Qe.Tb(b,'')}catch(l){return[]}c=h;g=yield Promise.resolve([['tagOlympe',b]]);1<g.length?d.push(['',ak,g.map(l=>{var [n,p]=l;return[n,Zj,lk(p)]})]):d.push([g[0][0],Zj,lk(g[0][1])]);g=yield Ej(a.Qe,h)}h=mk(a,
935
+ 50))}olympe.ha.node.oa.Ga.Ys=class{constructor(a,b,c){this.L=olympe.pa.Xa('sql');this.client=a;this.schema=b;this.F=c;this.Cd=new olympe.ha.node.oa.Ga.bv;this.G=new olympe.D.Wb(`Data Model Observer of ${c.R()}`);this.V=[];this.C=0;this.Ka=new Map;this.N=new Set;this.db=olympe.dc.Na();Nj(this)}};const Zj=olympe.ha.node.oa.Ga.yc.EQUAL,ak=olympe.ha.node.oa.Ga.yc.ag,bk=olympe.ha.node.oa.Ga.yc.Mh,ck=olympe.ha.node.oa.Ga.yc.Xg,dk=olympe.ha.node.oa.Ga.yc.So,ek=olympe.ha.node.oa.Ga.yc.fp,fk=olympe.ha.node.oa.Ga.yc.gp,gk=olympe.ha.node.oa.Ga.yc.Dp,hk=olympe.ha.node.oa.Ga.yc.Ep,ik=olympe.ha.node.oa.Ga.yc.Cq,jk=olympe.ha.node.oa.Ga.yc.Tq,kk=olympe.ha.node.oa.Ga.Yc.Nh;
936
+ function Gj(a){return x(function*(){var b=a.query.G;let c=b;var d=[];const e=a.query.C;let f=olympe.dc.Na().nj(b);!f&&e[0]instanceof olympe.dc.da.Kb.jg&&(f=e[0].Rd().qb(olympe.dc.CloudObject.instancesRel));if(f){try{var g=yield Ej(a.Qe,b)}catch(l){return[]}f=!0;e.shift()}else{try{var h=yield a.Qe.Rb(b,'')}catch(l){return[]}c=h;g=yield Promise.resolve([['tagOlympe',b]]);1<g.length?d.push(['',ak,g.map(l=>{var [n,p]=l;return[n,Zj,lk(p)]})]):d.push([g[0][0],Zj,lk(g[0][1])]);g=yield Ej(a.Qe,h)}h=mk(a,
937
937
  g);b=Array.from(a.query.F);b=b.includes(0)||b.includes(1)&&f;var k=[];if(b){const l=a.query.Y(),n=nk(a.Qe,l,c,kk);k=olympe.dc.gb.from(c).sb(olympe.dc.CloudObject.propertyRel).bd().map(q=>q.R());const p=yield Promise.all(k.map(q=>Promise.resolve(q)));k=k.map(q=>nk(a.Qe,l,c,q)).map((q,r)=>[q,p[r]]);k.unshift([n,kk])}a.C.limit=a.query.max;a.C.offset=a.query.offset;a.Pe.push({Kg:b,recursive:!1,filters:d,kh:'',ci:'',Zh:k,gh:h,name:g});d=0;for(const l of e)d=yield ok(a,l,d,f);return a.Pe}())}
938
938
  function mk(a,b){a.G++;return`alias-${b.charAt(0)}${a.G}`}function ok(a,b,c,d){let e=c;switch(!0){case b instanceof olympe.dc.da.Kb.jg:case b instanceof olympe.dc.da.Kb.kg:e+=1;a=pk(a,b,e,d);break;case b instanceof olympe.dc.da.Kb.rc:a=qk(a,b);break;case b instanceof olympe.dc.da.Kb.Rh:a=rk(a,b);break;default:a=Promise.reject(`Query part ${b.toString()} could not be parsed`)}return a.then(()=>e)}
939
- function pk(a,b,c,d){const e=b.Qd().R(),f=b.Qd().Oa()===olympe.dc.za.ORIGIN?olympe.dm.Relation.originModelRel:olympe.dm.Relation.destinationModelRel;let g=b instanceof olympe.dc.da.Kb.kg;const h=olympe.dm.Relation.F.$l,k=olympe.dc.ld.from(e).sb(f).bd();c=d?c+1:c;const l=Array.from(a.query.F).includes(c),[n,p]=['',''];return Ej(a.Qe,k.R()).then(q=>x(function*(){const r=mk(a,q),t=[];let u=Promise.resolve();h===olympe.dm.Relation.F.$l&&(u=Ej(a.Qe,e).then(v=>{const w=mk(a,v),[y,A]=sk(b.Qd().Oa());a.Pe.push({Kg:!1,
939
+ function pk(a,b,c,d){const e=b.Rd().R(),f=b.Rd().Oa()===olympe.dc.za.ORIGIN?olympe.dm.Relation.originModelRel:olympe.dm.Relation.destinationModelRel;let g=b instanceof olympe.dc.da.Kb.kg;const h=olympe.dm.Relation.F.$l,k=olympe.dc.ld.from(e).sb(f).bd();c=d?c+1:c;const l=Array.from(a.query.F).includes(c),[n,p]=['',''];return Ej(a.Qe,k.R()).then(q=>x(function*(){const r=mk(a,q),t=[];let u=Promise.resolve();h===olympe.dm.Relation.F.$l&&(u=Ej(a.Qe,e).then(v=>{const w=mk(a,v),[y,A]=sk(b.Rd().Oa());a.Pe.push({Kg:!1,
940
940
  gh:w,name:v,Zh:[],kh:y,ci:A,filters:[],recursive:g});g=!1}));return u.then(()=>x(function*(){let v=[];var w=Promise.resolve([]);let y=[];if(l){const A=a.query.Y(),D=nk(a.Qe,A,k.R(),kk);w=olympe.dc.gb.from(k.R()).sb(olympe.dc.CloudObject.propertyRel).Xi().bd().map(I=>I.R());v=w.map(I=>nk(a.Qe,A,k.R(),I));w=Promise.all(w.map(I=>Promise.resolve(I)));y.push([nk(a.Qe,A,k.R(),kk),kk]);const T=yield w;y=v.map((I,aa)=>[I,T[aa]]);y.unshift([D,kk])}a.Pe.push({Kg:l,gh:r,name:q,Zh:y,kh:n,ci:p,filters:t,recursive:g})}()))}()))}
941
941
  function qk(a,b){return a.F(b.C).then(c=>{a.Pe[a.Pe.length-1].filters.push(c)})}function rk(a,b){a.C.order=b.order;a.C.aliasSorting=a.Pe[a.Pe.length].gh;return Promise.resolve(b.fb().R()).then(c=>{a.C.columnSorting=c})}function sk(a){const b=olympe.ha.node.oa.Ga.Yc.kk,c=olympe.ha.node.oa.Ga.Yc.El;return a===olympe.dc.za.ORIGIN?[c,b]:[b,c]}
942
942
  olympe.ha.node.oa.Ga.vu=class{constructor(a,b){this.query=a;this.G=0;this.Qe=b;this.Pe=[];this.C={}}F(a){switch(!0){case a instanceof olympe.dc.da.U.Gc:const c=a.C;return Promise.resolve(a.fb()).then(h=>[h,Zj,lk(c)]);case a instanceof olympe.dc.da.U.Sc:const d=a.substring;return Promise.resolve(a.fb()).then(h=>[h,jk,d]);case a instanceof olympe.dc.da.U.xd: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)?
@@ -956,44 +956,44 @@ function zk(a,b,c){switch(b){case olympe.ha.node.oa.Ga.pd.NONE:a.where(c);break;
956
956
  function Bk(a,b,c,d,e,f){e=f?a.client.raw(e):e;switch(b){case olympe.ha.node.oa.Ga.pd.NONE:a.where(c,d,e);break;case olympe.ha.node.oa.Ga.pd.ag:a.andWhere(c,d,e);break;case olympe.ha.node.oa.Ga.pd.Mh:a.orWhere(c,d,e);break;case olympe.ha.node.oa.Ga.pd.Xg:a.whereNot(c,d,e);break;default:olympe.pa.Xa('storage').error(`Where operand ${b} not recognized`)}}function Ck(a,b){const c={'.+?':'_','.*':'%','.+':'_%'},d={'.+?':'?','.*':'*','.+':'?*'};return'mssql'===b?d[a]:c[a]}
957
957
  function Dk(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=/^(\.\+\?|\.\*|\.\+)/;
958
958
  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=[Ck(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,
959
- a.length)}return c+d+e}olympe.ha.node.oa.Ga.Oq=class{constructor(a,b,c){this.V=a;this.C=b;this.G=this.F='';this.N=0;this.Z=c}};olympe.ha.node.oa.Ga.pd={ag:'&',Mh:'|',Xg:'!',NONE:''};const Fk=olympe.ha.node.oa.Ga.Yc.kk,Gk=olympe.ha.node.oa.Ga.Yc.El,Hk=olympe.ha.node.oa.Ga.Yc.Nh,Ik=olympe.ha.node.oa.Ga.Yc.Sj,Jk=olympe.dc.$b.VERSION,Kk=olympe.dc.$b.Jd;function Dj(a,b,c){return x(function*(){yield Fj(a.C);yield b.transaction(d=>x(function*(){const e=()=>d.withSchema(c);for(const f of a.ua)yield f(e);a.L.debug(`Transaction after execute operations before commit : ${d.toString()}`);a.ua.length=0;a.qn.clear()}()))}())}
960
- olympe.ha.node.oa.Ga.Qq=class{constructor(a,b){this.L=a;this.C=b;this.Ud=b.Ud;this.qn=new Map;this.ua=[]}Aj(a,b,c){a=void 0===c||c?{[Hk]:a}:{};for(const d of b){const [e,f]=d;b=lk(f);a[e]=b.v}return a}F(a,b){b.delete(Kk);b.delete(Jk);this.qn.set(a,b||new Map)}pc(a,b){this.ua.push(c=>{const d=this;return x(function*(){b.delete(Jk);const e=yield Ej(d.Ud,a);yield c().table(e).where(Hk,a).update(d.Aj(a,b,!1))}())})}Jc(a){this.ua.push(b=>{const c=this;return x(function*(){var d=yield c.Ud.Tb(a,'');d=yield Ej(c.Ud,
961
- d);var e=olympe.dc.gb.from(d).sb(olympe.dc.CloudObject.G).bd();for(var f of e.keys())e=yield Promise.resolve(f),yield b().table(e).where(Fk,a).del();f=olympe.dc.gb.from(d).sb(olympe.dc.CloudObject.V).bd();for(const g of f.keys())f=yield Promise.resolve(g),yield b().table(f).where(Gk,a).del();yield b().table(d).where(Hk,a).del()}())})}Ra(a,b,c){a===olympe.dc.ic.Tc?(Oj(this.C,c),this.ua.push(d=>{const e=this;return x(function*(){const f=e.qn.get(b),g=yield Ej(e.Ud,c);c!==olympe.dc.xa(olympe.dm.File)||
962
- f.has(Ik)?(e.Ud.N.set(b,c),yield d().table(g).insert(e.Aj(b,f,!0))):yield d().table(g).where(Hk,b).update(e.Aj(b,f,!1))}())})):this.ua.push(d=>x(function*(){const e=yield Promise.resolve(a);yield d().table(e).insert({[Fk]:b,[Gk]:c})}()))}ec(a,b,c){this.ua.push(d=>x(function*(){const e=yield Promise.resolve(a);yield d().table(e).where({[Fk]:b,[Gk]:c}).del()}()))}};olympe.ha.node.oa.Ga.Qq.la=[olympe.dc.Writable];function Ej(a,b){return(a=a.C.get(b))?Promise.resolve(a):Promise.reject(`No table were found for model ${a}`)}function nk(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 vk(a,b,c){a=a.F.get(b)||new Map;return(a=Array.from(a).find(([,d])=>d===c))&&a[0]||null}
963
- olympe.ha.node.oa.Ga.bv=class{constructor(){this.N=new Map;this.F=new Map;this.C=new Map;this.G=new Map}static R(a,b,c){return c?b[0][1]:''}ph(a){return Promise.resolve(a)}fb(a){return Promise.resolve(a)}Tb(a){return(a=this.N.get(a))?Promise.resolve(a):Promise.reject('GET MODEL TAG OF INSTANCE NOT IMPLEMENTED')}};function lk(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`${a.Of().valueOf()}.${a.If().valueOf()}.${a.Df().valueOf()}.${a.Cf().valueOf()}`}return{t:b,v:c}}olympe.ha.node.oa.Ga.oC=class{};olympe.ha.node.host={};olympe.ha.node.host.Hd=function(a,b){this.uid=a;this.L=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.L};olympe.ha.node.host.Hd.la=[olympe.host.da.Hd];olympe.ha.node.host.$p=class{constructor(a){this.L=a}pj(){return!1}bl(){this.L.error('No history manager implemented in Node')}C(){this.bl();return Hb()}F(){this.bl()}};olympe.ha.node.host.$p.la=[olympe.host.Fi];olympe.ha.node.host.ad=class{constructor(){this.C={};this.N={}}destroy(){}V(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]}Z(a,b,c){this.N[b]=setInterval(c,a)}F(a){clearInterval(this.N[a]);delete this.N[a]}};olympe.host.Zp.register(olympe.host.da.Yp.rr,olympe.ha.node.host.ad);olympe.ha.node.host.ad.la=[olympe.host.da.ad];olympe.ha.node.host.yk=class{constructor(a){this.L=a}};olympe.ha.node.host.yk.la=[olympe.host.yk];olympe.T.config(function(a){ra(a,olympe.host.O.Ml,olympe.ha.node.host.$p,olympe.host.O.Ea);ra(a,olympe.host.O.Wq,olympe.ha.node.host.yk,olympe.host.O.Ea)},'olympe.native.node.host');olympe.net.sd={};olympe.net.sd.Ql=class{constructor(a){this.L=a;this.C=new Map}G(){}F(){}};olympe.net.sd.WebSocket=class{constructor(a,b){this.L=b;this.id=a;this.C=null;this.buffer=[];this.F=this.G=this.N=null}Y(){return this.id}open(a){const b=`#${this.id}`,c=this.Z(a);c.binaryType='arraybuffer';c.onopen=()=>{this.L.info('Websocket OPENED');this.N?(this.L.debug('Notifying upper layer for WebSocket',b),this.N()):this.L.warn('Nothing to notify for WebSocket',b);this.L.debug(b,`Send all buffered messages (n=${this.buffer.length}).`);this.buffer.forEach(c.send.bind(c));this.buffer.length=
959
+ a.length)}return c+d+e}olympe.ha.node.oa.Ga.Oq=class{constructor(a,b,c){this.V=a;this.C=b;this.G=this.F='';this.N=0;this.Z=c}};olympe.ha.node.oa.Ga.pd={ag:'&',Mh:'|',Xg:'!',NONE:''};const Fk=olympe.ha.node.oa.Ga.Yc.kk,Gk=olympe.ha.node.oa.Ga.Yc.El,Hk=olympe.ha.node.oa.Ga.Yc.Nh,Ik=olympe.ha.node.oa.Ga.Yc.Sj,Jk=olympe.dc.$b.VERSION,Kk=olympe.dc.$b.Kd;function Dj(a,b,c){return x(function*(){yield Fj(a.C);yield b.transaction(d=>x(function*(){const e=()=>d.withSchema(c);for(const f of a.ua)yield f(e);a.L.debug(`Transaction after execute operations before commit : ${d.toString()}`);a.ua.length=0;a.qn.clear()}()))}())}
960
+ olympe.ha.node.oa.Ga.Qq=class{constructor(a,b){this.L=a;this.C=b;this.Cd=b.Cd;this.qn=new Map;this.ua=[]}Aj(a,b,c){a=void 0===c||c?{[Hk]:a}:{};for(const d of b){const [e,f]=d;b=lk(f);a[e]=b.v}return a}F(a,b){b.delete(Kk);b.delete(Jk);this.qn.set(a,b||new Map)}pc(a,b){this.ua.push(c=>{const d=this;return x(function*(){b.delete(Jk);var e=yield d.Cd.Rb(a,'');e=yield Ej(d.Cd,e);yield c().table(e).where(Hk,a).update(d.Aj(a,b,!1))}())})}Jc(a){this.ua.push(b=>{const c=this;return x(function*(){var d=yield c.Cd.Rb(a,
961
+ '');d=yield Ej(c.Cd,d);var e=olympe.dc.gb.from(d).sb(olympe.dc.CloudObject.G).bd();for(var f of e.keys())e=yield Promise.resolve(f),yield b().table(e).where(Fk,a).del();f=olympe.dc.gb.from(d).sb(olympe.dc.CloudObject.V).bd();for(const g of f.keys())f=yield Promise.resolve(g),yield b().table(f).where(Gk,a).del();yield b().table(d).where(Hk,a).del()}())})}Ra(a,b,c){a===olympe.dc.jc.Tc?(Oj(this.C,c),this.ua.push(d=>{const e=this;return x(function*(){const f=e.qn.get(b),g=yield Ej(e.Cd,c);c!==olympe.dc.xa(olympe.dm.File)||
962
+ f.has(Ik)?(e.Cd.N.set(b,c),yield d().table(g).insert(e.Aj(b,f,!0))):yield d().table(g).where(Hk,b).update(e.Aj(b,f,!1))}())})):this.ua.push(d=>x(function*(){const e=yield Promise.resolve(a);yield d().table(e).insert({[Fk]:b,[Gk]:c})}()))}fc(a,b,c){this.ua.push(d=>x(function*(){const e=yield Promise.resolve(a);yield d().table(e).where({[Fk]:b,[Gk]:c}).del()}()))}};olympe.ha.node.oa.Ga.Qq.la=[olympe.dc.Writable];function Ej(a,b){return(a=a.C.get(b))?Promise.resolve(a):Promise.reject(`No table were found for model ${a}`)}function nk(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 vk(a,b,c){a=a.F.get(b)||new Map;return(a=Array.from(a).find(([,d])=>d===c))&&a[0]||null}
963
+ olympe.ha.node.oa.Ga.bv=class{constructor(){this.N=new Map;this.F=new Map;this.C=new Map;this.G=new Map}static R(a,b,c){return c?b[0][1]:''}ph(a){return Promise.resolve(a)}fb(a){return Promise.resolve(a)}Rb(a){return(a=this.N.get(a))?Promise.resolve(a):Promise.reject('GET MODEL TAG OF INSTANCE NOT IMPLEMENTED')}};function lk(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`${a.Of().valueOf()}.${a.If().valueOf()}.${a.Df().valueOf()}.${a.Cf().valueOf()}`}return{t:b,v:c}}olympe.ha.node.oa.Ga.oC=class{};olympe.ha.node.host={};olympe.ha.node.host.Id=function(a,b){this.uid=a;this.L=b};olympe.ha.node.host.Id.prototype.constructor=olympe.ha.node.host.Id;olympe.ha.node.host.Id.prototype.destroy=function(){};olympe.ha.node.host.Id.prototype.destroy=olympe.ha.node.host.Id.prototype.destroy;olympe.ha.node.host.Id.prototype.Xa=function(){return this.L};olympe.ha.node.host.Id.la=[olympe.host.da.Id];olympe.ha.node.host.$p=class{constructor(a){this.L=a}pj(){return!1}bl(){this.L.error('No history manager implemented in Node')}C(){this.bl();return Hb()}F(){this.bl()}};olympe.ha.node.host.$p.la=[olympe.host.Fi];olympe.ha.node.host.ad=class{constructor(){this.C={};this.N={}}destroy(){}V(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]}Z(a,b,c){this.N[b]=setInterval(c,a)}F(a){clearInterval(this.N[a]);delete this.N[a]}};olympe.host.Zp.register(olympe.host.da.Yp.rr,olympe.ha.node.host.ad);olympe.ha.node.host.ad.la=[olympe.host.da.ad];olympe.ha.node.host.yk=class{constructor(a){this.L=a}};olympe.ha.node.host.yk.la=[olympe.host.yk];olympe.T.config(function(a){ra(a,olympe.host.O.Ml,olympe.ha.node.host.$p,olympe.host.O.Ea);ra(a,olympe.host.O.Wq,olympe.ha.node.host.yk,olympe.host.O.Ea)},'olympe.native.node.host');olympe.net.sd={};olympe.net.sd.Ql=class{constructor(a){this.L=a;this.C=new Map}G(){}F(){}};olympe.net.sd.WebSocket=class{constructor(a,b){this.L=b;this.id=a;this.C=null;this.buffer=[];this.F=this.G=this.N=null}Y(){return this.id}open(a){const b=`#${this.id}`,c=this.Z(a);c.binaryType='arraybuffer';c.onopen=()=>{this.L.info('Websocket OPENED');this.N?(this.L.debug('Notifying upper layer for WebSocket',b),this.N()):this.L.warn('Nothing to notify for WebSocket',b);this.L.debug(b,`Send all buffered messages (n=${this.buffer.length}).`);this.buffer.forEach(c.send.bind(c));this.buffer.length=
964
964
  0};c.onmessage=d=>{d='string'===typeof d.data?String(d.data):Ea(d.data);this.L.debug(b,'<',d);this.F&&this.F(d)};c.onclose=()=>{this.L.debug(`WebSocket ${b} CLOSED`);this.G&&this.G()};c.onerror=()=>{this.L.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.L.debug(b,'>',a);this.C.send(a);break;case c.CONNECTING:this.L.debug(b,'- Connecting: BUFFER','>',a);this.buffer.push(a);break;default:return this.L.debug(b,
965
965
  '- Closed','>',a),!1}}else this.L.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.L.debug(`Force closing native websocket ${`#${this.id}`}`);this.C.close(1E3);return}}this.L.debug('Try to force close native websocket, but not open nor connecting')}ka(a){this.N=a||null}aa(a){this.F=a||null}V(a){this.G=a||null}Z(){}};olympe.net.sd.WebSocket.la=[olympe.net.WebSocket];olympe.ha.node.net={};olympe.ha.node.net.ku=class extends olympe.net.sa{constructor(a,b){super(a,b);this.Z=new olympe.ha.node.net.Ql(a)}V(){return'NodeJS'}aa(a){var b=this.G++;a=a.C();this.L.debug('CREATE Websocket #'+b+' to '+a);b=new olympe.ha.node.net.lu(b,this.L);b.open(a);return b}C(a,b){this.L.debug('SEND HTTP '+a.method+' to '+a.C());const c=this.G++;b=Rb(this,c,b);this.Z.G(c,{u:a.C(),s:Nb(a),h:Lb(a),p:a.port,z:Mb(a),q:Qb(a),m:a.method,v:a.ij(),k:a.key,c:a.cert,a:a.ca,j:a.rejectUnauthorized,b:a.body,r:a.F},b)}N(){this.L.warn('DOWNLOAD FILE not available with node native implementation. URL:')}F(){return this.Z}};const Lk=require('fs'),Mk=require('http'),Nk=require('https');
966
966
  olympe.ha.node.net.Ql=class extends olympe.net.sd.Ql{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,A)=>new Promise((D,T)=>{Lk.readFile(w,(I,aa)=>{I?T(I):(A[y]=aa,D(A))})});p=w=>{const y=D=>{D.setEncoding(v===olympe.net.eb.ResponseType.zk?'utf-8':'binary');let T='';D.on('data',I=>{T+=I});D.on('end',()=>{if(v!==olympe.net.eb.ResponseType.zk){var I=
967
967
  (new Uint8Array(Buffer.from(T,'binary'))).buffer;I=v===olympe.net.eb.ResponseType.sl?new Blob([I]):I}else I=T;c(this.F(D.statusCode,D.statusMessage,I,D.headers))})},A=d?new Nk.request(w,y):new Mk.request(w,y);this.C.set(a,()=>{A.destroy()});A.on('error',D=>{c(this.F(0,'Conection refused','Error connecting to '+u+' with method '+f+', code = '+D.code+', message = '+D.message,''))});!e||'POST'!==f&&'PUT'!==f?A.end():(e instanceof Blob?e.arrayBuffer():Promise.resolve(e)).then(D=>{A.write(D instanceof
968
968
  ArrayBuffer?Buffer.from(D):D);A.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.L.log('Error loading self signed files:',w)})):this.L.warn('All three self signed files must be specified!'):p(b)}F(a,b,c,d){this.L.debug('Received HTTP response',a,c);return new olympe.net.Tg(c,a,b,d)}};olympe.ha.node.net.lu=class extends olympe.net.sd.WebSocket{Z(a){return new (require('ws'))(a)}};olympe.ha.node.net.Config={OB:'native.html.net.useWorkers'};olympe.T.config(function(a){ra(a,olympe.net.O.va,olympe.ha.node.net.ku,olympe.net.O.Ea,olympe.host.O.va)},'olympe.native.node.net');olympe.ha.node.net.http={};const Ok=require('fastify'),Yk=require('fastify-cors'),Zk={Qi:0,ym:1,vk:2};
969
969
  function $k(a,b){a.F.route({url:b.path,method:b.methods,handler:(c,d)=>{a.L.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.Zj(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.mx(e,new Map(Object.entries(c.params))).then(k=>{const l=k.getData();a.L.debug('> HTTP: reply with body:',l instanceof ArrayBuffer?
970
- 'binary':l);d.code(k.Rd()).headers(k.ij()).send(l instanceof ArrayBuffer?Buffer.from(l):l)}).catch(k=>{a.L.debug('> HTTP: reply with internal server error:',k);d.code(olympe.net.eb.od.Lq).header(olympe.net.eb.Headers.Lj,'text/plain').send({error:`Internal server error: ${k}`})})}})}
970
+ 'binary':l);d.code(k.Sd()).headers(k.ij()).send(l instanceof ArrayBuffer?Buffer.from(l):l)}).catch(k=>{a.L.debug('> HTTP: reply with internal server error:',k);d.code(olympe.net.eb.od.Lq).header(olympe.net.eb.Headers.Lj,'text/plain').send({error:`Internal server error: ${k}`})})}})}
971
971
  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.V=null;this.C=Zk.Qi;this.Ke=new Set}aa(a,b){this.V={origin:'*',methods:a,allowedHeaders:b};return this}N(a,b,c,d){this.G.set(a,{path:b,methods:c,mx:d});switch(this.C){case Zk.Qi:return this.start();case Zk.vk:return this.stop(),this.start();case Zk.ym:return new Promise((e,f)=>{this.Ke.add(g=>g?f(g):e())});default:return Promise.reject('Webservice in unknown state')}}Z(a){this.G.delete(a);
972
972
  this.stop();return 0===this.G.size?Promise.resolve():this.start()}stop(){this.C===Zk.vk&&(this.F.close(),this.C=Zk.Qi,this.F=this.createServer())}start(){return this.C===Zk.Qi?new Promise((a,b)=>{this.F.register(Yk,this.V);for(const c of this.G.values())$k(this,c);this.C=Zk.ym;this.F.listen(this.port,'0.0.0.0',(c,d)=>{this.C=Zk.vk;this.Ke.forEach(e=>e(c));this.Ke.clear();c?(this.stop(),b(c)):(this.L.debug('Web server listening on '+d),a())})}):Promise.reject('Try to start a webservice already started')}createServer(){const a=
973
- Ok({logger:!0});a.addContentTypeParser('*',{parseAs:'buffer'},(b,c,d)=>{d(null,c)});return a}};olympe.T.config(function(a){B(a,olympe.net.O.Dm,olympe.ha.node.net.http.Fk,olympe.net.O.Ea,new olympe.T.fa(olympe.net.Config.Nl),new olympe.T.fa(olympe.net.Config.Ol))},'olympe.native.node.net.http');olympe.ha.node.W={};const al=new Map;olympe.ha.node.W.vl=class extends olympe.W.vl{V(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.Ia().Cb(b))}N(a){var b=()=>Math.random().toString(16).slice(-4);b=`blob://${`${b()}${b()}-${b()}-${b()}-${b()}-${b()}${b()}${b()}`}`;al.set(b,a);return b}F(a,b,c){al.has(a)?b(al.get(a)):c&&c('No object has been found for that url. Maybe the URL has already been revoked')}Z(a){al.delete(a)}};olympe.T.config(function(a){ra(a,olympe.W.O.zh,olympe.ha.node.W.vl)},'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=>{B(a,olympe.auth.O.pk,olympe.ha.node.auth.aq)},'olympe.native.node.auth');olympe.ha.node.hc={};olympe.ha.node.hc.Qp=class{constructor(a){this.F={};this.L=a}C(a){void 0===this.F[a]&&(this.F[a]=new olympe.ha.node.hc.Rp(a,this.L));return this.F[a].open()}};olympe.ha.node.hc.Qp.la=[olympe.hc.Vt];olympe.ha.node.hc.Rp=class{constructor(a,b){this.name=a;this.L=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();
974
- b&&b(!0)}clear(){this.C||this.open();this.db.setState({})}};olympe.ha.node.hc.Rp.la=[olympe.hc.Wt];olympe.T.config(function(a){B(a,olympe.hc.O.dk,olympe.ha.node.hc.Qp,olympe.hc.O.Ea)},'olympe.native.node.localstorage');olympe.ha.node.storage={};olympe.ha.node.storage.Storage=class{constructor(a){this.L=a}F(a){a&&a('Not Implemented.')}V(a){a&&a('Not Implemented.')}write(a,b,c,d,e){e&&e('Not Implemented.')}G(a){a&&a('Not Implemented.')}N(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.hc.Storage];olympe.T.config(function(a){ra(a,olympe.hc.O.Ri,olympe.ha.node.storage.Storage,olympe.host.O.Ea)},'olympe.native.html.storage');olympe.Gg={};olympe.Gg.Config={VERSION:'version.version',Es:'version.branch',cg:'version.commit',Xu:'version.tag',To:'version.olympe-framework',Fs:'version.build'};olympe.T.config(function(a){E(a,olympe.Gg.Config.VERSION,'');E(a,olympe.Gg.Config.Es,'');E(a,olympe.Gg.Config.cg,'');E(a,olympe.Gg.Config.Xu,'');E(a,olympe.Gg.Config.To,'');E(a,olympe.Gg.Config.Fs,'')},'olympe.main');const bl=require('fs');let wa,va;function cl(a,b){bl.readFile(a,(c,d)=>{c?b(Object.create(null)):(d=JSON.parse(d),b(d))})}
973
+ Ok({logger:!0});a.addContentTypeParser('*',{parseAs:'buffer'},(b,c,d)=>{d(null,c)});return a}};olympe.T.config(function(a){B(a,olympe.net.O.Dm,olympe.ha.node.net.http.Fk,olympe.net.O.Ea,new olympe.T.fa(olympe.net.Config.Nl),new olympe.T.fa(olympe.net.Config.Ol))},'olympe.native.node.net.http');olympe.ha.node.W={};const al=new Map;olympe.ha.node.W.vl=class extends olympe.W.vl{V(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().Cb(b))}N(a){var b=()=>Math.random().toString(16).slice(-4);b=`blob://${`${b()}${b()}-${b()}-${b()}-${b()}-${b()}${b()}${b()}`}`;al.set(b,a);return b}F(a,b,c){al.has(a)?b(al.get(a)):c&&c('No object has been found for that url. Maybe the URL has already been revoked')}Z(a){al.delete(a)}};olympe.T.config(function(a){ra(a,olympe.W.O.zh,olympe.ha.node.W.vl)},'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=>{B(a,olympe.auth.O.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.L=a}C(a){void 0===this.F[a]&&(this.F[a]=new olympe.ha.node.ic.Rp(a,this.L));return this.F[a].open()}};olympe.ha.node.ic.Qp.la=[olympe.ic.Vt];olympe.ha.node.ic.Rp=class{constructor(a,b){this.name=a;this.L=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();
974
+ b&&b(!0)}clear(){this.C||this.open();this.db.setState({})}};olympe.ha.node.ic.Rp.la=[olympe.ic.Wt];olympe.T.config(function(a){B(a,olympe.ic.O.dk,olympe.ha.node.ic.Qp,olympe.ic.O.Ea)},'olympe.native.node.localstorage');olympe.ha.node.storage={};olympe.ha.node.storage.Storage=class{constructor(a){this.L=a}F(a){a&&a('Not Implemented.')}V(a){a&&a('Not Implemented.')}write(a,b,c,d,e){e&&e('Not Implemented.')}G(a){a&&a('Not Implemented.')}N(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){ra(a,olympe.ic.O.Ri,olympe.ha.node.storage.Storage,olympe.host.O.Ea)},'olympe.native.html.storage');olympe.Gg={};olympe.Gg.Config={VERSION:'version.version',Es:'version.branch',cg:'version.commit',Xu:'version.tag',To:'version.olympe-framework',Fs:'version.build'};olympe.T.config(function(a){E(a,olympe.Gg.Config.VERSION,'');E(a,olympe.Gg.Config.Es,'');E(a,olympe.Gg.Config.cg,'');E(a,olympe.Gg.Config.Xu,'');E(a,olympe.Gg.Config.To,'');E(a,olympe.Gg.Config.Fs,'')},'olympe.main');const bl=require('fs');let wa,va;function cl(a,b){bl.readFile(a,(c,d)=>{c?b(Object.create(null)):(d=JSON.parse(d),b(d))})}
975
975
  function dl(){if(void 0!==wa&&void 0!==va){0===Object.keys(va).length&&console.warn('No configuration found. Check presence of oConfig.json');0===Object.keys(wa).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:d.test(f)?f='true'===f.toLowerCase():e.test(f)&&(f=parseFloat(f));a[g[1]]=f}a=new olympe.T.Ps(a);
976
976
  d=a.Xa();d.debug('Registering configurations...');d.C++;for(let f=0,g=ka.length;f<g;f++)b=a,c=ka[f],qa(b.L,'Registering configure callback '+(c.C?'for module '+c.C:'')),b.F.push(c.F);oa(d);d.debug('done registering');a=a.compile();c=a.Xa();c.debug('Running run callbacks of container...');for(let f=0,g=la.length;f<g;f++)c.C++,d=la[f],b=a,e=na(b,d.fj()),b.L.debug('Calling run callback '+(d.C?'for module '+d.C:'')),d.F.apply(null,e),oa(c);c.debug('done calling run callbacks. DI process completed!')}}
977
977
  olympe.W.bn('oConfig.json',cl,function(a){va=a;dl()});cl('version.json',function(a){wa=a;dl()});olympe.uc={};olympe.uc.Bs=class{run(){}};olympe.uc.sa=class{constructor(a,b){this.C=a;this.L=b;this.F=null;this.G='';this.L.info('HC Manager will execute application registered as:',this.C)}vj(a,b,c=''){b||(b='default');b===this.C?(null===this.F?this.L.log('Application',c,'designated to be launched'):this.L.log('OVERRIDE: Application',c,'designated to be launched'),this.F=a,this.G=c):this.L.debug('ignoring application:'+c+' as it is registered under name '+b+' and not '+this.C)}run(){null!==this.F?(this.L.info('Running application:',this.G),
978
- this.F.run()):this.L.error('No app registered under name: '+this.C)}};olympe.uc.vj=function(a,b,c){const d=a.Xa();c?d.debug('Pre-registering application '+b+' under name '+c+' (use '+olympe.uc.Config.gf+'='+c+' to start it)'):d.debug('Pre-registering application '+b+' as default one');a.Pd(olympe.uc.O.va).config([b],function(e,f){f.vj(e,c,b)},'olympe.hc.registerApp')};olympe.uc.O={va:'hc.Manager',Ea:'hc.Logger'};olympe.uc.Config={gf:'hc.app',Kl:'hc.globalToken'};olympe.T.config(function(a){E(a,olympe.uc.Config.gf,'default');E(a,olympe.uc.Config.Kl,!1);C(a,olympe.uc.O.Ea,[olympe.pa.O.va],b=>b.Nc('hc'));C(a,olympe.auth.O.Ej,[new olympe.T.fa(olympe.uc.Config.gf),new olympe.T.fa(olympe.uc.Config.Kl)],(b,c)=>new olympe.auth.ql(c?'':b));B(a,olympe.uc.O.va,olympe.uc.sa,new olympe.T.fa(olympe.uc.Config.gf),olympe.uc.O.Ea)},'olympe.hc');
979
- olympe.T.run([olympe.uc.O.va],a=>a.run(),'olympe.hc');olympe.sc.Zf={};function el(a){a.L.info('Starting application '+a.C);let b=!1;const c=olympe.dc.Na();if(0<a.C.length){const d=uc(c,a.C,(e,f)=>{if(e){const g=Qi(f);g.run?(a.L.debug('application retrieved: running'),(new olympe.D.Wb('Application execution context',a.F.Ec())).run(()=>{b=!0;g.run(a.F.Vk(g.R()))})):a.L.error('application retrieved: not an Application with a run() method')}else fl(a)});olympe.D.Ia().onDestroy(()=>{vc(c,a.C,d)});Ib(()=>{b||a.L.warn(`requested application ${a.C} may not be available (it may not exist or the logged user may not have the correct permissions)`)},
978
+ this.F.run()):this.L.error('No app registered under name: '+this.C)}};olympe.uc.vj=function(a,b,c){const d=a.Xa();c?d.debug('Pre-registering application '+b+' under name '+c+' (use '+olympe.uc.Config.gf+'='+c+' to start it)'):d.debug('Pre-registering application '+b+' as default one');a.Qd(olympe.uc.O.va).config([b],function(e,f){f.vj(e,c,b)},'olympe.hc.registerApp')};olympe.uc.O={va:'hc.Manager',Ea:'hc.Logger'};olympe.uc.Config={gf:'hc.app',Kl:'hc.globalToken'};olympe.T.config(function(a){E(a,olympe.uc.Config.gf,'default');E(a,olympe.uc.Config.Kl,!1);C(a,olympe.uc.O.Ea,[olympe.pa.O.va],b=>b.Nc('hc'));C(a,olympe.auth.O.Ej,[new olympe.T.fa(olympe.uc.Config.gf),new olympe.T.fa(olympe.uc.Config.Kl)],(b,c)=>new olympe.auth.ql(c?'':b));B(a,olympe.uc.O.va,olympe.uc.sa,new olympe.T.fa(olympe.uc.Config.gf),olympe.uc.O.Ea)},'olympe.hc');
979
+ olympe.T.run([olympe.uc.O.va],a=>a.run(),'olympe.hc');olympe.sc.Zf={};function el(a){a.L.info('Starting application '+a.C);let b=!1;const c=olympe.dc.Na();if(0<a.C.length){const d=uc(c,a.C,(e,f)=>{if(e){const g=Qi(f);g.run?(a.L.debug('application retrieved: running'),(new olympe.D.Wb('Application execution context',a.F.Ec())).run(()=>{b=!0;g.run(a.F.Vk(g.R()))})):a.L.error('application retrieved: not an Application with a run() method')}else fl(a)});olympe.D.Ja().onDestroy(()=>{vc(c,a.C,d)});Ib(()=>{b||a.L.warn(`requested application ${a.C} may not be available (it may not exist or the logged user may not have the correct permissions)`)},
980
980
  1E4)}}
981
- function gl(a,b){if(a.N)a.L.debug('Sending getContext request'),Qf(a.V,d=>{d?a.L.error('failed to synchronise (authenticated) with server: '+d.message):(a.L.debug('synchronisation request successful'),Yi=a.C,b())});else{var c=olympe.dc.Ed.SUBSCRIBE;const d=olympe.dc.Ed.Mi,e=a.F.$k()?d:c;a.L.debug((a.F.$k()?'PULLING':'SUBSCRIBING')+' application '+a.C);const f=olympe.D.Ia();c=new olympe.async.wk(f);c.add((g,h)=>{Ve(new olympe.dc.jf(a.C,e),olympe.dc.Rb.rf).hb(k=>{var l=olympe.dc.Ja;var n=(n=olympe.dc.ld.from(a.C).sb(olympe.sc.La.Me.C).sb(olympe.sc.logic.Yd.G.Pc()).bd())&&n.R()||
982
- olympe.dc.Ja.Vc;l.mc=n;k?h(k.message):g()})});c.add(g=>{olympe.D.wc([a.G.Eg()],h=>{(new olympe.dc.Aa(h)).Ke(f.Cb(g))})});c.add((g,h)=>{const k=olympe.sc.jd.C.Hp,l=olympe.sc.jd.C.cm;Zi(a.C,n=>{switch(n){case k:case l:g();break;default:h('Error while loading the business container')}})});Wb(c,(g,h)=>{if(h)throw Error(h);b()});c.start()}}function fl(a){a.L.debug('Stop the application');a.F.Ec().Af()}
981
+ function gl(a,b){if(a.N)a.L.debug('Sending getContext request'),Qf(a.V,d=>{d?a.L.error('failed to synchronise (authenticated) with server: '+d.message):(a.L.debug('synchronisation request successful'),Yi=a.C,b())});else{var c=olympe.dc.Fd.SUBSCRIBE;const d=olympe.dc.Fd.Mi,e=a.F.$k()?d:c;a.L.debug((a.F.$k()?'PULLING':'SUBSCRIBING')+' application '+a.C);const f=olympe.D.Ja();c=new olympe.async.wk(f);c.add((g,h)=>{Ve(new olympe.dc.jf(a.C,e),olympe.dc.Sb.rf).hb(k=>{var l=olympe.dc.Ha;var n=(n=olympe.dc.ld.from(a.C).sb(olympe.sc.La.Me.C).sb(olympe.sc.logic.Yd.G.Pc()).bd())&&n.R()||
982
+ olympe.dc.Ha.Vc;l.bc=n;k?h(k.message):g()})});c.add(g=>{olympe.D.wc([a.G.Eg()],h=>{(new olympe.dc.Aa(h)).Ke(f.Cb(g))})});c.add((g,h)=>{const k=olympe.sc.jd.C.Hp,l=olympe.sc.jd.C.cm;Zi(a.C,n=>{switch(n){case k:case l:g();break;default:h('Error while loading the business container')}})});Wb(c,(g,h)=>{if(h)throw Error(h);b()});c.start()}}function fl(a){a.L.debug('Stop the application');a.F.Ec().Af()}
983
983
  olympe.sc.Zf.wm=class{constructor(a,b,c,d,e,f,g){this.G=a;this.V=b;this.L=c;this.F=d;this.C=e;this.N=f;this.Z=g||!1}run(){const a=olympe.auth.sa.C.Ng,b=olympe.auth.sa.C.hg,c=olympe.auth.sa.C.Eh,d=olympe.auth.sa.C.pi;this.L.debug('runtime starting for app #'+this.C);let e=!1;const f=()=>{e||(el(this),e=!0)};olympe.D.wc([this.G.getState()],g=>{switch(g){case a:case c:this.L.debug('Server session opened, calling once connected callback');gl(this,f);break;case b:this.L.debug('Disconnected, working offline.');
984
984
  this.Z&&!e&&gl(this,f);break;case d:this.L.debug('waiting for authentication');break;default:this.L.debug('No server session available, waiting for connection'),e=!1,fl(this)}},'Runtime initial auth state listener')}};olympe.sc.Zf.wm.C='app_instance';olympe.sc.Zf.wm.la=[olympe.uc.Bs];olympe.sc.Zf.Hj={rf:'sc.runtime.Main'};
985
985
  olympe.T.config(function(a){C(a,olympe.auth.O.Ej,[new olympe.T.fa(olympe.uc.Config.gf),new olympe.T.fa(olympe.sc.Config.gf),new olympe.T.fa(olympe.uc.Config.Kl)],(b,c,d)=>new olympe.auth.ql(d?'':b+(c?'-'+c:'')));B(a,olympe.sc.Zf.Hj.rf,olympe.sc.Zf.wm,olympe.auth.O.va,olympe.dc.query.O.va,olympe.sc.O.Ea,olympe.sc.O.vm,new olympe.T.fa(olympe.sc.Config.gf),new olympe.T.fa(olympe.dc.Config.$g),new olympe.T.fa(olympe.sc.Config.bq));olympe.uc.vj(a,olympe.sc.Zf.Hj.rf,'sc.runtime');olympe.uc.vj(a,olympe.sc.Zf.Hj.rf,
986
986
  'sc.headless');olympe.uc.vj(a,olympe.sc.Zf.Hj.rf)},'olympe.sc.runtime');olympe.public={};function hl(a,b){const c=new olympe.auth.Request;for(const [d,e]of a)c.set(d,e);return new Promise(d=>{fc(olympe.public.Ta.get(),c,b,()=>{d()})})}
987
- olympe.public.Ta=class{static gw(a,b){return olympe.auth.Hb.Ee.dj(a,b)}static getState(){return kc(olympe.public.Ta.get())}static pw(){return olympe.D.Ya(olympe.public.Ta.get().Eg())}static Ux(a){const b=new olympe.D.Wb('Observe user tag','function'===typeof a.Ec?a.Ec():a);return new rxjs.Observable(c=>{b.run(()=>olympe.D.wc([olympe.public.Ta.get().Eg()],d=>{c.next(d);olympe.D.Ia().onDestroy(()=>c.complete())}));return()=>b.destroy()})}static ed(){return olympe.D.Ya(nc(olympe.public.Ta.get()))}static Dw(){return olympe.D.Ya(olympe.public.Ta.get().ei())||
987
+ olympe.public.Ta=class{static gw(a,b){return olympe.auth.Hb.Ee.dj(a,b)}static getState(){return kc(olympe.public.Ta.get())}static pw(){return olympe.D.Ya(olympe.public.Ta.get().Eg())}static Ux(a){const b=new olympe.D.Wb('Observe user tag','function'===typeof a.Ec?a.Ec():a);return new rxjs.Observable(c=>{b.run(()=>olympe.D.wc([olympe.public.Ta.get().Eg()],d=>{c.next(d);olympe.D.Ja().onDestroy(()=>c.complete())}));return()=>b.destroy()})}static ed(){return olympe.D.Ya(nc(olympe.public.Ta.get()))}static Dw(){return olympe.D.Ya(olympe.public.Ta.get().ei())||
988
988
  void 0}static ki(){olympe.public.Ta.get().ki()}static rh(a){return new Promise((b,c)=>{olympe.public.Ta.get().rh(a,d=>d?c(d):b())})}static yx(a,b){return hl((new Map).set('username',a).set('password',b),'srp')}static xx(){return hl(new Map,'saml')}static zx(a,b){return hl((new Map).set('username',a).set('nonce',b),'localToken')}static wx(){return hl(new Map,'openID')}static yn(){return new Promise(a=>{mc(()=>{olympe.public.Ta.get().ra.delete('logoutCallback');a()});olympe.public.Ta.get().yn()})}static get(){return olympe.auth.Qc()}};
989
989
  olympe.public.Ta.logout=olympe.public.Ta.yn;olympe.public.Ta.loginOpenID=olympe.public.Ta.wx;olympe.public.Ta.loginToken=olympe.public.Ta.zx;olympe.public.Ta.loginSAML=olympe.public.Ta.xx;olympe.public.Ta.loginSRP=olympe.public.Ta.yx;olympe.public.Ta.getUserFromToken=olympe.public.Ta.rh;olympe.public.Ta.sendKeepAlive=olympe.public.Ta.ki;olympe.public.Ta.getIDPToken=olympe.public.Ta.Dw;olympe.public.Ta.getToken=olympe.public.Ta.ed;olympe.public.Ta.observeUser=olympe.public.Ta.Ux;
990
- olympe.public.Ta.getCurrentUser=olympe.public.Ta.pw;olympe.public.Ta.getState=olympe.public.Ta.getState;olympe.public.Ta.generateSRPData=olympe.public.Ta.gw;olympe.public.$a=class{static create(a){return new class extends olympe.dc.U.Og{C(b,c){b=a(olympe.dc.CloudObject.get(c));if('boolean'===typeof b)return b;const d=olympe.D.Kc(olympe.D.qa),e=b.subscribe(f=>d.update(olympe.D.Ac(f)));olympe.D.Ia().vc(()=>e.unsubscribe());return d.Eb()}}}};
991
- olympe.public.Ne=class{static create(a){return new class extends olympe.dc.Db.Og{N(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.Kc(olympe.D.ea),e=b.subscribe(f=>d.update(olympe.D.ya(f)));olympe.D.Ia().vc(()=>e.unsubscribe());return d.Eb()}}}};'object'===typeof exports&&(exports={CloudObject:olympe.dc.CloudObject,Relation:olympe.dc.ta.Relation,Direction:olympe.dc.za,generateTag:olympe.W.ej,tagToString:olympe.dc.xa,register:olympe.dc.register,defineProperty:olympe.dc.defineProperty,defineRelation:olympe.dc.jh,defineInverseRelation:olympe.dc.Ov,BrickContext:olympe.sc.Ua,Brick:olympe.sc.logic.Function,ActionBrick:olympe.sc.logic.Action,GlobalProperties:olympe.sc.Ua.lg,registerBrick:olympe.sc.logic.Ba.C,FunctionBrick:olympe.sc.logic.Function,
990
+ olympe.public.Ta.getCurrentUser=olympe.public.Ta.pw;olympe.public.Ta.getState=olympe.public.Ta.getState;olympe.public.Ta.generateSRPData=olympe.public.Ta.gw;olympe.public.$a=class{static create(a){return new class extends olympe.dc.U.Og{C(b,c){b=a(olympe.dc.CloudObject.get(c));if('boolean'===typeof b)return b;const d=olympe.D.Kc(olympe.D.qa),e=b.subscribe(f=>d.update(olympe.D.Ac(f)));olympe.D.Ja().vc(()=>e.unsubscribe());return d.Eb()}}}};
991
+ olympe.public.Ne=class{static create(a){return new class extends olympe.dc.Db.Og{N(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.Kc(olympe.D.ea),e=b.subscribe(f=>d.update(olympe.D.ya(f)));olympe.D.Ja().vc(()=>e.unsubscribe());return d.Eb()}}}};'object'===typeof exports&&(exports={CloudObject:olympe.dc.CloudObject,Relation:olympe.dc.ta.Relation,Direction:olympe.dc.za,generateTag:olympe.W.ej,tagToString:olympe.dc.xa,register:olympe.dc.register,defineProperty:olympe.dc.defineProperty,defineRelation:olympe.dc.jh,defineInverseRelation:olympe.dc.Ov,BrickContext:olympe.sc.Ua,Brick:olympe.sc.logic.Function,ActionBrick:olympe.sc.logic.Action,GlobalProperties:olympe.sc.Ua.lg,registerBrick:olympe.sc.logic.Ba.C,FunctionBrick:olympe.sc.logic.Function,
992
992
  Context:olympe.sc.Ua,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.ig,EnumValue:olympe.dm.Enum,Transaction:olympe.sc.Transaction,BurstTransaction:olympe.dc.ti,QueryResult:olympe.dc.Va,Query:olympe.dc.gb,QuerySingle:olympe.dc.ld,Predicate:olympe.dc.da.$a,
993
993
  RelatedTo:olympe.dc.da.U.De,Order:olympe.dc.da.km,Config:class{static getParameter(a){return olympe.T.getParameter(a)}},Color:olympe.D.Color,ErrorFlow:olympe.sc.logic.Error,ServiceRequest:olympe.H.wa.nb.ga,Service:olympe.H.wa.nb.zb,RequestType:olympe.H.wa.Jb.Request.ja,Auth:olympe.public.Ta,AuthState:{INIT:olympe.auth.sa.C.INIT,DISCONNECTED:olympe.auth.sa.C.hg,GUEST:olympe.auth.sa.C.Eh,AUTHENTICATING:olympe.auth.sa.C.pi,ERROR:olympe.auth.sa.C.qc,AUTHENTICATED:olympe.auth.sa.C.Ng},Sync:olympe.dc.CloudObject,
994
- 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.Na()}},ListDef:olympe.dc.Aa,instanceToTag:olympe.dc.xa,registerSync:olympe.dc.Ba.C,getUniqueTag:olympe.W.ej,onDestroy:a=>olympe.D.Ia().onDestroy(a),offDestroy:a=>
995
- olympe.D.Ia().Je(a),FollowRules:olympe.dc.Rb,transformers:{Related:olympe.dc.X.Qb,RecursiveRelated:olympe.dc.X.Dc,Distinct:olympe.dc.X.xe,Filter:olympe.dc.X.rc,Limit:olympe.dc.X.$d,Sort:olympe.dc.X.Kd,Union:olympe.dc.X.uf},ListDefPredicate:olympe.public.$a,predicates:{And:olympe.dc.U.Vd,Or:olympe.dc.U.be,Not:olympe.dc.U.kd,Equals:olympe.dc.U.Gc,Contains:olympe.dc.U.Sc,Greater:olympe.dc.U.ye,Smaller:olympe.dc.U.Fe,HasRelated:olympe.dc.U.kf,InstanceOf:olympe.dc.U.lf,Regex:olympe.dc.U.xd},Comparator:olympe.public.Ne,
996
- comparators:{Number:olympe.dc.Db.Number,String:olympe.dc.Db.String,DateTime:olympe.dc.Db.DateTime},valuedefs:{BooleanProperty:olympe.dc.na.ue,StringProperty:olympe.dc.na.oe,NumberProperty:olympe.dc.na.ke,DateTimeProperty:olympe.dc.na.je,Constant:olympe.dc.na.Dd,Tag:olympe.dc.na.sf}});
994
+ 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.Na()}},ListDef:olympe.dc.Aa,instanceToTag:olympe.dc.xa,registerSync:olympe.dc.Ba.C,getUniqueTag:olympe.W.ej,onDestroy:a=>olympe.D.Ja().onDestroy(a),offDestroy:a=>
995
+ olympe.D.Ja().Je(a),FollowRules:olympe.dc.Sb,transformers:{Related:olympe.dc.X.Qb,RecursiveRelated:olympe.dc.X.Dc,Distinct:olympe.dc.X.xe,Filter:olympe.dc.X.rc,Limit:olympe.dc.X.$d,Sort:olympe.dc.X.Ld,Union:olympe.dc.X.uf},ListDefPredicate:olympe.public.$a,predicates:{And:olympe.dc.U.Vd,Or:olympe.dc.U.be,Not:olympe.dc.U.kd,Equals:olympe.dc.U.Gc,Contains:olympe.dc.U.Sc,Greater:olympe.dc.U.ye,Smaller:olympe.dc.U.Fe,HasRelated:olympe.dc.U.kf,InstanceOf:olympe.dc.U.lf,Regex:olympe.dc.U.xd},Comparator:olympe.public.Ne,
996
+ comparators:{Number:olympe.dc.Db.Number,String:olympe.dc.Db.String,DateTime:olympe.dc.Db.DateTime},valuedefs:{BooleanProperty:olympe.dc.na.ue,StringProperty:olympe.dc.na.oe,NumberProperty:olympe.dc.na.ke,DateTimeProperty:olympe.dc.na.je,Constant:olympe.dc.na.Ed,Tag:olympe.dc.na.sf}});
997
997
 
998
998
 
999
999
  }.bind(this))();