@olympeio/runtime-node 9.11.2 → 9.11.3

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
@@ -252,22 +252,22 @@ function wa(a,b){a=void 0!==a?String(a):' ';return 0<b&&a?a.repeat(Math.ceil(b/a
252
252
  ea('Promise.allSettled',function(a){function b(d){return{status:'fulfilled',value:d}}function c(d){return{status:'rejected',reason:d}}return a?a:function(d){var e=this;d=Array.from(d,function(f){return e.resolve(f).then(b,c)});return e.all(d)}});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}});
253
253
  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('Array.prototype.flat',function(a){return a?a:function(b){b=void 0===b?1:b;for(var c=[],d=0;d<this.length;d++){var e=this[d];Array.isArray(e)&&0<b?(e=Array.prototype.flat.call(e,b-1),c.push.apply(c,e)):c.push(e)}return c}});var xa=this||self;
254
254
  function w(a,b){a=a.split('.');let c=xa;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={ee:()=>'object'===typeof window?window:'object'===typeof global?global:self};if('olympe'in olympe.ee())throw Error('The olympe runtime is loaded more than once. Make sure not to import `@olympeio/runtime-web` or `@olympeio/runtime-node` explicitly, and to always use the `olympe` alias.');olympe.ee().olympe=olympe;olympe.XE=(a,...b)=>{b.forEach(c=>{Object.getOwnPropertyNames(c.prototype).forEach(d=>{'constructor'!==d&&void 0===a.prototype[d]&&(a.prototype[d]=c.prototype[d])})})};const za=require('util');function Aa(a){if('string'===typeof a)return a;let b=a;'function'===typeof(null==a?void 0:a.toJSON)&&(b=a.toJSON());let c,d;return'function'===typeof(null==(c=b)?void 0:c.toString)&&(null==(d=b)?void 0:d.toString)!==Object.prototype.toString?b.toString():za.inspect(b,{maxStringLength:1E4,depth:null,breakLength:Infinity})}function Ba(a,b){return JSON.stringify({level:a,message:b.map(Aa).join(' ')})}
255
- const Ca=console.trace,Da=console.debug,Ea=console.log,Fa=console.info,Ga=console.warn,Ha=console.error;console.trace=(...a)=>Ca.call(console,Ba('TRACE',a));console.debug=(...a)=>Da.call(console,Ba('DEBUG',a));console.log=(...a)=>Ea.call(console,Ba('LOG',a));console.info=(...a)=>Fa.call(console,Ba('INFO',a));console.warn=(...a)=>Ga.call(console,Ba('WARN',a));console.error=(...a)=>Ha.call(console,Ba('ERROR',a));olympe.Va={};olympe.Va.node={};olympe.W={};olympe.W.Of={};olympe.W.Of.Oo=class{process(a){for(const b of Object.keys(a.De))if(a.xd(b).Mn())throw Error('Service "'+b+'" is defined as abstract and needs to be overridden');}};olympe.W.Of.Oo.za=[olympe.W.Of.er];olympe.W.Of.Po=class{process(a){function b(e,f){if(f.includes(e))throw Error('Circular dependency detected: '+f.join(' > ')+' > '+e);if(d.has(e)){f=f.concat(e);d.delete(e);e=a.xd(e);c(e.zj(),f);for(const g of Ia(e))c(g.zj(),f)}}function c(e,f){for(const g of e)g instanceof olympe.W.rb&&b(g.T(),f)}const d=new Set(Object.keys(a.De));for(const e of d)b(e,[])}};olympe.W.Of.Po.za=[olympe.W.Of.er];olympe.W.Of.er=class{process(){}};const Ja=[],Ka=[];function La(a){const b=a.Ya();b.debug('Registering configurations...');b.j++;Ja.forEach(c=>{B(a.G,'Registering configure callback '+(c.j?'for module '+c.j:''));a.H.push(c.D)});Ma(b);b.debug('done registering')}function Na(a){const b=a.Ya();b.debug('Running run callbacks of container...');b.j++;Ka.forEach(c=>{const d=Oa(a,c.zj());a.G.debug('Calling run callback '+`for module ${c.j}`);c.D.apply(null,d)});Ma(b);b.debug('done calling run callbacks. DI process completed!')}
256
- olympe.W.Uo=class{constructor(){}static j(a,b){Ja.push(new olympe.W.Sl(a,b))}static D(a,b,c){a.forEach(d=>{if(null===d||void 0===d)throw Error('Cannot proceed - DI configuration error. '+(c?`Run callback "${c}"`:'A run callback')+' cannot have a null or undefined dependency');});Ka.push(new olympe.W.Sl(b,c,a))}};olympe.W.config=olympe.W.Uo.j;olympe.W.run=olympe.W.Uo.D;olympe.W.Os=a=>{const b=new Map,c=(d,e)=>{for(const [f,g]of Object.entries(d))d=e.concat((f.startsWith('#')?f.substring(1):f).toLowerCase()),'object'!==typeof g||null===g||f.startsWith('#')?b.set(d.join('.'),g):c(g,d)};c(a,[]);return b};olympe.W.Uj=class{constructor(){}getValue(){}};function Pa(a,b){let c,d;return null!=(d=null==(c=a.F)?void 0:c.call(a,b))?d:!0}olympe.W.Sl=class{constructor(a,b,c){this.D=a;this.Wd=(null!=c?c:[]).map(d=>'string'===typeof d?new olympe.W.rb(d):d);this.j=null!=b?b:'no name di callback';this.F=null}zj(){return this.Wd}};function Ra(a,b){var c=olympe.W.P.Fg;if(void 0!==a.j[c])throw Error('Service "'+c+'" has already been instantiated');a.j[c]=b}function Sa(a,b,c){let d=a.j[b];if(void 0===d){const e=a.H[b];if(void 0===e){if(c===olympe.W.Bh.j.Cm)return null;throw Error('Service "'+b+'" not found');}try{d=e.instantiate(a)}catch(f){throw a.G.error('Error during instantiation of service '+b),f;}!e.F&&(a.j[b]=d)}return d}
255
+ const Ca=console.trace,Da=console.debug,Ea=console.log,Fa=console.info,Ga=console.warn,Ha=console.error;console.trace=(...a)=>Ca.call(console,Ba('TRACE',a));console.debug=(...a)=>Da.call(console,Ba('DEBUG',a));console.log=(...a)=>Ea.call(console,Ba('LOG',a));console.info=(...a)=>Fa.call(console,Ba('INFO',a));console.warn=(...a)=>Ga.call(console,Ba('WARN',a));console.error=(...a)=>Ha.call(console,Ba('ERROR',a));olympe.Va={};olympe.Va.node={};olympe.W={};olympe.W.Of={};olympe.W.Of.Po=class{process(a){for(const b of Object.keys(a.De))if(a.xd(b).Nn())throw Error('Service "'+b+'" is defined as abstract and needs to be overridden');}};olympe.W.Of.Po.za=[olympe.W.Of.er];olympe.W.Of.Qo=class{process(a){function b(e,f){if(f.includes(e))throw Error('Circular dependency detected: '+f.join(' > ')+' > '+e);if(d.has(e)){f=f.concat(e);d.delete(e);e=a.xd(e);c(e.zj(),f);for(const g of Ia(e))c(g.zj(),f)}}function c(e,f){for(const g of e)g instanceof olympe.W.rb&&b(g.T(),f)}const d=new Set(Object.keys(a.De));for(const e of d)b(e,[])}};olympe.W.Of.Qo.za=[olympe.W.Of.er];olympe.W.Of.er=class{process(){}};const Ja=[],Ka=[];function La(a){const b=a.Ya();b.debug('Registering configurations...');b.j++;Ja.forEach(c=>{B(a.G,'Registering configure callback '+(c.j?'for module '+c.j:''));a.H.push(c.D)});Ma(b);b.debug('done registering')}function Na(a){const b=a.Ya();b.debug('Running run callbacks of container...');b.j++;Ka.forEach(c=>{const d=Oa(a,c.zj());a.G.debug('Calling run callback '+`for module ${c.j}`);c.D.apply(null,d)});Ma(b);b.debug('done calling run callbacks. DI process completed!')}
256
+ olympe.W.Vo=class{constructor(){}static j(a,b){Ja.push(new olympe.W.Sl(a,b))}static D(a,b,c){a.forEach(d=>{if(null===d||void 0===d)throw Error('Cannot proceed - DI configuration error. '+(c?`Run callback "${c}"`:'A run callback')+' cannot have a null or undefined dependency');});Ka.push(new olympe.W.Sl(b,c,a))}};olympe.W.config=olympe.W.Vo.j;olympe.W.run=olympe.W.Vo.D;olympe.W.Os=a=>{const b=new Map,c=(d,e)=>{for(const [f,g]of Object.entries(d))d=e.concat((f.startsWith('#')?f.substring(1):f).toLowerCase()),'object'!==typeof g||null===g||f.startsWith('#')?b.set(d.join('.'),g):c(g,d)};c(a,[]);return b};olympe.W.Uj=class{constructor(){}getValue(){}};function Pa(a,b){let c,d;return null!=(d=null==(c=a.F)?void 0:c.call(a,b))?d:!0}olympe.W.Sl=class{constructor(a,b,c){this.D=a;this.Wd=(null!=c?c:[]).map(d=>'string'===typeof d?new olympe.W.rb(d):d);this.j=null!=b?b:'no name di callback';this.F=null}zj(){return this.Wd}};function Ra(a,b){var c=olympe.W.P.Fg;if(void 0!==a.j[c])throw Error('Service "'+c+'" has already been instantiated');a.j[c]=b}function Sa(a,b,c){let d=a.j[b];if(void 0===d){const e=a.H[b];if(void 0===e){if(c===olympe.W.Bh.j.Dm)return null;throw Error('Service "'+b+'" not found');}try{d=e.instantiate(a)}catch(f){throw a.G.error('Error during instantiation of service '+b),f;}!e.F&&(a.j[b]=d)}return d}
257
257
  function Ta(a,b,c){b=b.toLowerCase();let d;const e=null!=(d=a.D.get(b))?d:[];e.push(c);a.D.set(b,e)}function Oa(a,b){const c=b.length,d=Array(c);let e,f;for(e=0;e<c;e++)a.G.j++,f=b[e],d[e]=f instanceof olympe.W.Uj?f.getValue(a):f,Ma(a.G);return d}
258
258
  olympe.W.Bh=class{constructor(a,b,c,d,e=2){this.H=a;this.F=b;this.parameters=c;this.j=Object.create(null);this.G=new olympe.W.tq(e);this.D=new Map;Ra(this,this);this.G.debug('Instantiate all computed parameters');d.forEach(f=>Sa(this,f).subscribe(this.Qj.bind(this,f)))}Ya(){return this.G}getParameter(a){a=a.toLowerCase();let b;return null!=(b=this.parameters[a])?b:this.F[a]}Qj(a,b){a=a.toLowerCase();if(this.parameters[a]!==b){var c,d;this.G.debug(`Updating parameter ${a} to ${b} and notify ${null!=
259
- (d=null==(c=this.D.get(a))?void 0:c.length)?d:0} listeners.`);this.parameters[a]=b;var e;for(const f of null!=(e=this.D.get(a))?e:[])f(b)}}};olympe.W.Bh.j={iu:'exception',Cm:'null'};function Ua(a,b){b=olympe.W.Os(b);for(const [c,d]of b)Va(a,c,d)}function C(a,b,c,...d){B(a.G,'Defining service '+b);a.j(b,c,d,!1,!1)}function Wa(a,b,c,...d){B(a.G,'Defining service '+b);a.j(b,c,d,!1,!0)}function D(a,b,c,d,e=!1){B(a.G,'Defining service (as a factory) '+b);a.j(b,d,c,!0,e)}function Xa(a,b,c,d=!1){B(a.G,'Defining service alias '+b);a.j(b,e=>e,[c],!0,d)}function Ya(a,b){B(a.G,'Defining abstract service '+b);a.j(b).D=!0}function Va(a,b,c){a.parameters[b.toLowerCase()]=c}
259
+ (d=null==(c=this.D.get(a))?void 0:c.length)?d:0} listeners.`);this.parameters[a]=b;var e;for(const f of null!=(e=this.D.get(a))?e:[])f(b)}}};olympe.W.Bh.j={iu:'exception',Dm:'null'};function Ua(a,b){b=olympe.W.Os(b);for(const [c,d]of b)Va(a,c,d)}function C(a,b,c,...d){B(a.G,'Defining service '+b);a.j(b,c,d,!1,!1)}function Wa(a,b,c,...d){B(a.G,'Defining service '+b);a.j(b,c,d,!1,!0)}function D(a,b,c,d,e=!1){B(a.G,'Defining service (as a factory) '+b);a.j(b,d,c,!0,e)}function Xa(a,b,c,d=!1){B(a.G,'Defining service alias '+b);a.j(b,e=>e,[c],!0,d)}function Ya(a,b){B(a.G,'Defining abstract service '+b);a.j(b).D=!0}function Va(a,b,c){a.parameters[b.toLowerCase()]=c}
260
260
  function Za(a,b,c,d){a.F.push(b);Va(a,b,d(...c.map(e=>a.getParameter(e))));D(a,b,c.map(e=>new olympe.W.Eh(e)),(...e)=>rxjs.combineLatest(e).pipe(rxjs.operators.skip(1),rxjs.operators.map(f=>d(...f)),rxjs.operators.distinctUntilChanged()))}function E(a,b,c){a.D[b.toLowerCase()]=c}
261
- olympe.W.Zt=class{constructor(a,b){this.De=Object.create(null);this.parameters=Object.create(null);this.D=Object.create(null);this.F=[];Ua(this,a);Ua(this,b);this.R=[new olympe.W.Of.Oo,new olympe.W.Of.Po];this.H=[];a=this.getParameter(olympe.W.U.pv);this.N=void 0!==a?a:3;this.G=new olympe.W.tq(this.N)}Ya(){return this.G}j(a,b,c,d,e){const f=a instanceof olympe.W.rb?a.T():a;if(3<=arguments.length&&c){const h=c.indexOf(f);if(-1!==h){if(void 0===this.De[f])throw Error(`ContainerBuilder.define: Service ${f} references itself and is not an override definition!`);
261
+ olympe.W.Zt=class{constructor(a,b){this.De=Object.create(null);this.parameters=Object.create(null);this.D=Object.create(null);this.F=[];Ua(this,a);Ua(this,b);this.R=[new olympe.W.Of.Po,new olympe.W.Of.Qo];this.H=[];a=this.getParameter(olympe.W.U.pv);this.N=void 0!==a?a:3;this.G=new olympe.W.tq(this.N)}Ya(){return this.G}j(a,b,c,d,e){const f=a instanceof olympe.W.rb?a.T():a;if(3<=arguments.length&&c){const h=c.indexOf(f);if(-1!==h){if(void 0===this.De[f])throw Error(`ContainerBuilder.define: Service ${f} references itself and is not an override definition!`);
262
262
  var g=this.De[f];g.id=g.id+'!!'+ ++olympe.W.cm.j;g.F=!0;g=g.id;c[h]=g;this.De[g]=this.De[f]}}this.De[f]=new olympe.W.cm(b,c,d||!1,f);return this.De[f]}xd(a){const b=this.De[a];if(void 0===b)throw Error(`DI Error: Definition ${a} was not found`);return b}getParameter(a){a=a.toLowerCase();let b;return null!=(b=this.parameters[a])?b:this.D[a]}compile(){const a=this.H;this.G.debug('Calling '+a.length+' configure callbacks');this.G.j++;a.forEach(b=>{B(this.G,'Calling callback');this.G.j++;b(this);Ma(this.G)});
263
263
  Ma(this.G);this.G.debug('Configuration summary: '+Object.keys(this.De).length+' definitions');this.G.debug('Compiling...');this.G.j++;this.R.forEach((b,c)=>{this.G.debug('running compilation pass '+(c+1)+': '+b.constructor.name);b.process(this)});Ma(this.G);this.G.debug('Compilation done, returning container');return new olympe.W.Bh(this.De,this.D,this.parameters,this.F,this.N)}};function Ia(a){let b,c;return null!=(c=null==(b=a.j)?void 0:b.values())?c:[]}
264
264
  olympe.W.cm=class{constructor(a,b,c,d){this.H=a||null;this.N=!!c;this.Wd=(null!=b?b:[]).map(e=>'string'===typeof e?new olympe.W.rb(e):e);this.D=!1;this.j=null;this.id=null!=d?d:'';this.F=!1}T(){return this.id}instantiate(a){const b=a.Ya();b.debug('Resolving arguments for '+this.id);const c=this.H;let d=Oa(a,this.Wd);const e=()=>{if(this.N)return c.apply(null,d);d.unshift(null);return new (c.bind.apply(c,d))};B(b,'Instantiating '+this.id);const f=olympe.C?olympe.C.lh().run(()=>e()):e();let g;if(0<
265
- (null==(g=this.j)?void 0:g.size)){b.j++;B(b,'Calling configuration callbacks:');for(const h of this.j.values())b.j++,B(b,'Check if need to call additional configuration callback '+h.j),Pa(h,f)?(B(b,'Calling additional configuration callback '+h.j),d=Oa(a,h.zj()),d.push(f),h.D.apply(null,d)):B(b,'Will not call additional configuration callback '+h.j+'predicate has returned false'),Ma(b);Ma(b)}B(b,'Done instantiating '+this.id);return f}zj(){return this.Wd}Mn(){return this.D}config(a,b,c,d,e){null===
265
+ (null==(g=this.j)?void 0:g.size)){b.j++;B(b,'Calling configuration callbacks:');for(const h of this.j.values())b.j++,B(b,'Check if need to call additional configuration callback '+h.j),Pa(h,f)?(B(b,'Calling additional configuration callback '+h.j),d=Oa(a,h.zj()),d.push(f),h.D.apply(null,d)):B(b,'Will not call additional configuration callback '+h.j+'predicate has returned false'),Ma(b);Ma(b)}B(b,'Done instantiating '+this.id);return f}zj(){return this.Wd}Nn(){return this.D}config(a,b,c,d,e){null===
266
266
  this.j&&(this.j=new Map);var f=this.j,g=f.set;b=new olympe.W.Sl(c,e,b);b.F=d;g.call(f,a,b)}};olympe.W.cm.j=0;olympe.W.Eh=class extends olympe.W.Uj{constructor(a){super();this.id=a}T(){return this.id}getValue(a){return new rxjs.Observable(b=>{b.next(a.getParameter(this.id));Ta(a,this.id,c=>b.next(c))})}};function Ma(a){0<a.j&&a.j--}function B(a,b){1>=a.D&&$a(a,'log','DI: '+b)}function $a(a,b,c){if(console&&console[b]){var d='';for(let e=0;e<a.j;e++)d+=' ';console[b](d+c)}}olympe.W.tq=class{constructor(a){this.D=a;this.j=0}debug(a){2>=this.D&&$a(this,'log','DI: '+a)}info(a){3>=this.D&&$a(this,'info','DI: '+a)}warn(a){4>=this.D&&$a(this,'warn','DI: '+a)}error(a){5>=this.D&&$a(this,'error','DI: '+a)}};olympe.W.pa=class extends olympe.W.Uj{constructor(a){super();this.id=a}T(){return this.id}getValue(a){return a.getParameter(this.id)}};olympe.W.rb=class extends olympe.W.Uj{constructor(a,b){super();this.id=a;this.j=b||olympe.W.Bh.j.iu}T(){return this.id}getValue(a){return Sa(a,this.id,this.j)}};olympe.W.P={Fg:'di.Container',FC:'di.PublicContainer'};olympe.W.U={pv:'logging.di'};olympe.W.run([olympe.W.P.Fg],a=>{olympe.W.getParameter=b=>a.getParameter(b);olympe.W.Qj=(b,c)=>a.Qj(b,c);olympe.ee().getConfig=b=>a.getParameter(b);olympe.ee().getConfigNames=()=>Object.keys(a.parameters);olympe.ee().updateConfig=(b,c)=>a.Qj(b,c)});olympe.V={};olympe.V.hq=class{constructor(a){this.id=a||olympe.V.hq.j++}Fa(a){return a?this.id===a.id:!1}toJSON(){return this.id.toString()}toString(){return this.id.toString()}print(){return('000000'+this.id).substr(-6)}};olympe.V.hq.j=0;olympe.V.iC=class{constructor(a,b,c,d,e,f){this.j=[a||0,b||0,0,c||0,d||0,0,e||0,f||0,1]}set(a,b,c){this.j[3*a+b]=c}get(a,b){return this.j[3*a+b]}};olympe.V.Oh=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.V.Oh.D=function(a){return new olympe.V.Oh(.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.V.Oh.j=function(){return new olympe.V.Oh(0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0)};olympe.V.Oh.prototype.set=function(a,b,c){this.values[5*a+b]=c};olympe.V.Oh.prototype.get=function(a,b){return this.values[5*a+b]};function ab(a){return(new TextEncoder).encode(a)}function bb(a,b){return a.j(ab(b))}function cb(a){return(new TextDecoder('utf8')).decode(a)}function eb(a){const b=new olympe.V.stream.mg;for(let c=0;c<a.length;c+=65536){const d=c+65536;b.write(a.subarray(c,d>a.length?a.length:d))}b.complete();return b}
267
267
  olympe.V.Jl=class{D(){}j(){}H(a){return u(function*(){if(a instanceof ArrayBuffer)return new Uint8Array(a);if(a instanceof Uint8Array)return a;if('string'===typeof a)return ab(a);if(a instanceof Blob)return new Uint8Array(yield a.arrayBuffer());if(a instanceof olympe.V.stream.mg){const b=[];for(const c=ha(a);;){const d=yield c.next();if(d.done)break;b.push(...d.value)}return new Uint8Array(b)}throw Error('Unsupported value type for binary conversion.');})}F(){}};
268
268
  olympe.V.ws=a=>a.replace('+','-').replace('/','_');olympe.V.ox=a=>a.replace('-','+').replace('_','/');function fb(a){a.j=setTimeout(()=>{const b=Date.now(),c=a.timeout;for(const [d,e]of a.values)b-e>c&&(a.delete(d),a.D&&a.D(d));if(0<a.values.size)fb(a);else{let d;null==(d=a.F)||d.call(a)}},a.H)}function gb(a,b){return a.values.has(b)?(a.values.set(b,Date.now()),!0):!1}function hb(a,b){a.D=b;return a}
269
- olympe.V.bn=class{constructor(a,b=a/2){this.timeout=a;this.H=b;this.values=new Map;this.F=this.D=this.j=null}add(a){this.values.set(a,Date.now());null===this.j&&fb(this)}has(a){return this.values.has(a)}forEach(a){this.values.forEach((b,c)=>a(c))}delete(a){a=this.values.delete(a);if(0===this.values.size){this.j&&clearTimeout(this.j);this.j=null;let b;null==(b=this.F)||b.call(this)}return a}clear(){this.j&&clearTimeout(this.j);this.j=null;this.values.clear();return this}};function ib(a,b){a.D=b;return a}function jb(a,b){a.j.F=b}
270
- olympe.V.$h=class{constructor(a){this.j=hb(new olympe.V.bn(a,void 0),b=>{const c=this.values.get(b);this.values.delete(b);let d;null==(d=this.D)||d.call(this,b,c)});this.values=new Map;this.D=null}set(a,b){this.values.set(a,b);this.j.add(a);return this}has(a){return this.values.has(a)}get(a){return this.values.get(a)}forEach(a){this.values.forEach((b,c)=>a(b,c))}delete(a){this.values.delete(a);return this.j.delete(a)}clear(){this.j.clear();this.values.clear();return this}};function F(a,b,...c){if(!a.N)throw Error('Cannot update state before starting the state machine');if(!a.R.has(b))throw Error(`State ${b} not found`);var d;let e;var f=null!=(e=null==(d=a.D[a.D.length-1])?void 0:d.state)?e:a.F.getValue();if(null!==f){if(f===b){a.G.debug(`Move request is a no-op, state ${b} is already active or queued`);return}d=a.Y.get(b);if(null!==d&&!d.has(f)){F(a,a.j,Error(`Cannot move to state ${b} from state ${f}`));return}}a.G.debug(`Plan moving to state ${b}, from state ${f}`);
269
+ olympe.V.cn=class{constructor(a,b=a/2){this.timeout=a;this.H=b;this.values=new Map;this.F=this.D=this.j=null}add(a){this.values.set(a,Date.now());null===this.j&&fb(this)}has(a){return this.values.has(a)}forEach(a){this.values.forEach((b,c)=>a(c))}delete(a){a=this.values.delete(a);if(0===this.values.size){this.j&&clearTimeout(this.j);this.j=null;let b;null==(b=this.F)||b.call(this)}return a}clear(){this.j&&clearTimeout(this.j);this.j=null;this.values.clear();return this}};function ib(a,b){a.D=b;return a}function jb(a,b){a.j.F=b}
270
+ olympe.V.$h=class{constructor(a){this.j=hb(new olympe.V.cn(a,void 0),b=>{const c=this.values.get(b);this.values.delete(b);let d;null==(d=this.D)||d.call(this,b,c)});this.values=new Map;this.D=null}set(a,b){this.values.set(a,b);this.j.add(a);return this}has(a){return this.values.has(a)}get(a){return this.values.get(a)}forEach(a){this.values.forEach((b,c)=>a(b,c))}delete(a){this.values.delete(a);return this.j.delete(a)}clear(){this.j.clear();this.values.clear();return this}};function F(a,b,...c){if(!a.N)throw Error('Cannot update state before starting the state machine');if(!a.R.has(b))throw Error(`State ${b} not found`);var d;let e;var f=null!=(e=null==(d=a.D[a.D.length-1])?void 0:d.state)?e:a.F.getValue();if(null!==f){if(f===b){a.G.debug(`Move request is a no-op, state ${b} is already active or queued`);return}d=a.Y.get(b);if(null!==d&&!d.has(f)){F(a,a.j,Error(`Cannot move to state ${b} from state ${f}`));return}}a.G.debug(`Plan moving to state ${b}, from state ${f}`);
271
271
  b===a.j&&(a.G.debug("Clear transition's queue to move to error state"),a.D=[]);a.D.push({state:b,Wd:c});1===a.D.length&&kb(a).then()}function lb(a,b,c){a.H.has(b)||a.H.set(b,new Set);a.H.get(b).add(c)}
272
272
  function mb(a,b){let c=null;return(new Promise((d,e)=>{if(a.F.getValue()===b)d();else if(a.F.getValue()===a.j)e(Error(`Error state reached: ${a.j}`));else{c=()=>{let h;null==(h=a.H.get(b))||h.delete(f);let k;null==(k=a.H.get(a.j))||k.delete(g)};const f=()=>d(),g=()=>e(Error('Reached error state'));lb(a,b,f);lb(a,a.j,g)}})).finally(()=>{let d;return null==(d=c)?void 0:d()})}
273
273
  function nb(a,b,c=()=>{},d=null){if(a.N)throw Error('Cannot add state after starting the state machine');if(a.R.has(b))throw Error(`State ${b} already exists`);a.R.set(b,c);a.Y.set(b,d?new Set(d):null)}function ob(a,b,c){nb(a,b,(d,e)=>u(function*(){try{yield c(d,e)}catch(f){a.G.error(`Error while processing error state ${b}: ${f}`)}}),null);a.j=b}
@@ -307,16 +307,16 @@ olympe.V.Oz=function(a){var b=/^(?:(\S*)@)?([^:]+)(?::(\d{2,5}))?$/;const c=/([^
307
307
  r=decodeURIComponent(r);b[q[1]]=r}return{scheme:a||null,GE:g||null,yt:l||null,host:n||null,port:p&&parseInt(p,10)||null,path:h&&'/'!==h?h:null,query:k||null,$E:f||null,parameters:b}};olympe.V.sF=function(a){a=a.substring(1);return''===a?new Map:new Map(a.split('&').map(b=>b.split('=').map(decodeURIComponent)))};
308
308
  olympe.V.vF=function(a){a=Array.from(a.entries()).filter(([,b])=>null!==b&&void 0!==b).map(([b,c])=>`${encodeURIComponent(b)}=${encodeURIComponent(c)}`).join('&');return 0<a.length?`#${a}`:''};olympe.V.gF=(a,b)=>{const c=Object.keys(a).find(d=>a[d]===b);return void 0===c?null:c};
309
309
  olympe.V.et=a=>{var b=Gb,c=Hb;return u(function*(){return(yield Promise.all(a.map(b))).map((d,e)=>{if('string'!==typeof d)return Object.create(null);try{return JSON.parse(d)}catch(f){if(a[e].endsWith('.json'))throw Error(`Failed to parse JSON Config file: ${a[e]}: ${f}`);const g=null!=c?c:'';return d.split('\n').filter(h=>h.startsWith(g)).reduce((h,k)=>{const [l,n]=k.split('=');h[l.slice(g.length)]=olympe.V.xs(n);return h},{})}}).reduce((d,e,f)=>{olympe.V.gt(d,e,'version.json'===a[f]?'version.':'');
310
- return d},Object.create(null))})};olympe.V.xs=a=>{const b=/^true|false$/i,c=/^\d+(\.\d+)?$/;void 0===a?a=!0:a.startsWith('"')&&a.endsWith('"')?a=a.substring(1,a.length-1):b.test(a)?a='true'===a.toLowerCase():c.test(a)&&(a=parseFloat(a));return a};olympe.V.gt=(a,b,c)=>{if(b instanceof Object)for(const d of Object.keys(b)){const e=c+d,f=b[d];f instanceof Object&&void 0!==a[e]?olympe.V.gt(a[e],f,''):a[e]=f}};olympe.V.FE=class a{constructor(b,c){this.x=b;this.y=c}add(b){return new a(this.x+b.x,this.y+b.y)}Fn(){return Math.sqrt(this.x*this.x+this.y*this.y)}toString(){return`Vector(${this.x}, ${this.y})`}};olympe.V.tv=class{constructor(a,b){this.start=a;this.end=b}};olympe.V.tv.j={XB:'left',PC:'right',BA:'bottom',YD:'top'};function Ib(a){return`${a.j}.${a.D}.${a.F}`}
310
+ return d},Object.create(null))})};olympe.V.xs=a=>{const b=/^true|false$/i,c=/^\d+(\.\d+)?$/;void 0===a?a=!0:a.startsWith('"')&&a.endsWith('"')?a=a.substring(1,a.length-1):b.test(a)?a='true'===a.toLowerCase():c.test(a)&&(a=parseFloat(a));return a};olympe.V.gt=(a,b,c)=>{if(b instanceof Object)for(const d of Object.keys(b)){const e=c+d,f=b[d];f instanceof Object&&void 0!==a[e]?olympe.V.gt(a[e],f,''):a[e]=f}};olympe.V.FE=class a{constructor(b,c){this.x=b;this.y=c}add(b){return new a(this.x+b.x,this.y+b.y)}Gn(){return Math.sqrt(this.x*this.x+this.y*this.y)}toString(){return`Vector(${this.x}, ${this.y})`}};olympe.V.tv=class{constructor(a,b){this.start=a;this.end=b}};olympe.V.tv.j={XB:'left',PC:'right',BA:'bottom',YD:'top'};function Ib(a){return`${a.j}.${a.D}.${a.F}`}
311
311
  olympe.V.Mf=class{constructor(a,b,c,d){this.j=a;this.D=b;this.F=c;this.H=d||null}static parse(a){a=/([0-9]*)\.([0-9]*)\.([0-9]*)-?([A-z\-_0-9]*)/.exec(a);if(null===a||4>a.length)return olympe.V.Mf.j;const b=Number.parseInt(a[1],10),c=Number.parseInt(a[2],10),d=Number.parseInt(a[3],10);return isNaN(b)||isNaN(c)||isNaN(d)?olympe.V.Mf.j:new olympe.V.Mf(b,c,d,a[4])}nl(a){return this.j!==a.j?this.j>a.j:this.D!==a.D?this.D>a.D:this.F>a.F}Oj(a){return this.j!==a.j?this.j<a.j:this.D!==a.D?this.D<a.D:this.F<
312
312
  a.F}Fa(a){return this.j===a.j&&this.D===a.D&&this.F===a.F}toString(){return`${this.j}.${this.D}.${this.F}`+(null!==this.H?`-${this.H}`:'')}};olympe.V.Mf.j=new olympe.V.Mf(Number.NaN,Number.NaN,Number.NaN);olympe.V.P={Eg:'utils.binaryConverter',Jt:'utils.base64Converter',jg:'utils.Profiler'};olympe.W.config(a=>{Ya(a,olympe.V.P.Eg);Xa(a,olympe.V.P.Jt,olympe.V.P.Eg,!0);C(a,olympe.V.P.jg,olympe.V.Yv)},'Utils services');olympe.W.run([olympe.V.P.Eg,olympe.V.P.jg],(a,b)=>{olympe.V.kf=()=>a;olympe.ee().isProfilerEnabled=()=>b.j;olympe.ee().startProfiler=()=>b.start();olympe.ee().stopProfiler=()=>b.stop();olympe.ee().getProfilerEvents=()=>({events:b.F,names:Object.fromEntries(b.N.entries()),models:Object.fromEntries(b.H.entries())})});olympe.ia={};olympe.ia.yb=class{la(){}H(){}F(){}j(){}ja(){}N(){}ta(){}$(){}ea(){}trace(){}debug(){}log(){}info(){}warn(){}error(){}fatal(){}};olympe.ia.yb.prototype.fatal=olympe.ia.yb.prototype.fatal;olympe.ia.yb.prototype.error=olympe.ia.yb.prototype.error;olympe.ia.yb.prototype.warn=olympe.ia.yb.prototype.warn;olympe.ia.yb.prototype.info=olympe.ia.yb.prototype.info;olympe.ia.yb.prototype.log=olympe.ia.yb.prototype.log;olympe.ia.yb.prototype.debug=olympe.ia.yb.prototype.debug;olympe.ia.yb.prototype.trace=olympe.ia.yb.prototype.trace;
313
313
  olympe.ia.yb.j={Gw:0,bg:1,ov:2,pk:3,ms:4,zb:5,lu:6,lC:7};olympe.ia.yb.D={0:'TRACE',1:'DEBUG',2:'LOG',3:'INFO',4:'WARN',5:'ERROR',6:'FATAL',7:'NOTHING'};olympe.ia.Ua=class{cd(){}};olympe.ia.we={};function Jb(a,b,c){a.Ha[b](`[OLYMPE.${a.Y}]:`,...c);if(0<a.R.size){var d=new Date;d=('00'+d.getHours()).substring(-2)+':'+('00'+d.getMinutes()).substring(-2)+':'+('00'+d.getSeconds()).substring(-2)+'.'+('00'+d.getMilliseconds()).substring(-3);for(const e of a.R.values())e(d,a.Y,b,...c)}}
314
314
  olympe.ia.we.yb=class{constructor(a,b){this.name=a;const c=b instanceof rxjs.Observable;this.D=c?olympe.ia.yb.j.pk:b;c&&b.subscribe(d=>{this.D=d});this.Y=a.toUpperCase();this.R=new Map;this.Ha=console}la(){return this.name}H(){return this.D}F(){return this.D<=olympe.ia.yb.j.Gw}j(){return this.D<=olympe.ia.yb.j.bg}N(){return this.D<=olympe.ia.yb.j.ov}ja(){return this.D<=olympe.ia.yb.j.pk}ta(){return this.D<=olympe.ia.yb.j.ms}$(){return this.D<=olympe.ia.yb.j.zb}ea(){return this.D<=olympe.ia.yb.j.lu}trace(...a){this.F()&&
315
315
  Jb(this,'trace',a)}debug(...a){this.j()&&Jb(this,'debug',a)}log(...a){this.N()&&Jb(this,'log',a)}info(...a){this.ja()&&Jb(this,'info',a)}warn(...a){this.ta()&&Jb(this,'warn',a)}error(...a){this.$()&&Jb(this,'error',a)}fatal(...a){this.ea()&&Jb(this,'error',a)}};olympe.ia.we.yb.za=[olympe.ia.yb];olympe.ia.we.Ua=class{constructor(a,b,c){this.j=a;this.D=parseInt(b,10);this.F=c;this.channels=new Map;this.G=this.cd('logging');this.G.log('Logging initialized, global log level is '+olympe.ia.yb.D[b])}cd(a){var b=this.channels.get(a);if(!b){b=`${olympe.ia.U.St}.${a}`;var c;const d=new rxjs.BehaviorSubject(null!=(c=this.j.getParameter(b))?c:this.D);Ta(this.j,b,e=>{d.next(e)});c=this.F;b=`${b}.${olympe.ia.U.rw}`;Object.prototype.hasOwnProperty.call(this.j.parameters,b.toLowerCase())&&(c=!0===this.j.getParameter(b));
316
316
  b=new olympe.ia.we.yb(a,d.asObservable(),c);this.channels.set(a,b)}return b}};olympe.ia.we.Ua.za=[olympe.ia.Ua];olympe.ia.P={Ea:'logging.Manager'};olympe.ia.U={Gp:'logging',Hp:'logging.showLogLevel',St:'logging',rw:'showLogLevel'};olympe.W.config(function(a){E(a,olympe.ia.U.Gp,olympe.ia.yb.j.pk);E(a,olympe.ia.U.Hp,!0);Wa(a,olympe.ia.P.Ea,olympe.ia.we.Ua,olympe.W.P.Fg,new olympe.W.pa(olympe.ia.U.Gp),new olympe.W.pa(olympe.ia.U.Hp))},'olympe.logging');olympe.W.run([olympe.ia.P.Ea],a=>{olympe.ia.Ya=b=>a.cd(b)},'Logging singleton getter initialization');olympe.C={};olympe.C.U={zq:'df.nodeCreationThreshold'};const Kb=[];function Lb(){}function Mb(){}olympe.C.J=class a{constructor(b,c,d){this.j=void 0===b?Lb:b;this.D=void 0===c?Kb:c;this.Y=d}static H(){var b=[];return void 0===b||0===b.length?olympe.C.J.$:new a(Mb,b)}H(){return this.j?this.j():void 0}F(){return this.D?this.D:Kb}N(){return null===this.j&&null===this.D}R(){return this.j===Mb}};olympe.C.J.Y=new olympe.C.J;olympe.C.J.j=new olympe.C.J(null,null);olympe.C.J.$=new olympe.C.J(Mb);olympe.C.J.F=new olympe.C.J(()=>olympe.C.aa);
317
- olympe.C.J.D=new olympe.C.J(()=>olympe.C.Ta);olympe.C.J.N=new olympe.C.J(()=>olympe.C.da);olympe.C.J.R=new olympe.C.J(()=>olympe.C.Zb);olympe.C.Gh=class{T(){return''}Dn(){return''}destroy(){}gb(){return!1}jd(){return!1}run(a,...b){return a(...b)}tc(a){return a}getParent(){return null}tt(){}oe(){}detach(){}el(){}sg(){}onDestroy(){return''}Xf(){}Yd(){return''}it(){}};olympe.C.Gh.prototype.offDestroy=olympe.C.Gh.prototype.Xf;olympe.C.Gh.prototype.onDestroy=olympe.C.Gh.prototype.onDestroy;let Nb=0;olympe.W.run([new olympe.W.pa(olympe.C.U.zq)],()=>{});
318
- olympe.C.Wb=class{constructor(a='SimpleContext',b){++Nb;this.ea=new Map;this.$=new Map;this.Y=new Map;this.Ha=0;this.name=a;this.id=String(Nb);this.F=this.ja=!1;(this.N=void 0===b?olympe.C.$a():b)&&this.N.oe(this);this.debug=!1}T(){return this.id}Dn(){return this.name}run(a,...b){if(!this.ja){var c=olympe.C.st(this);a=a(...b);c&&olympe.C.st(c);return a}}tc(a){return(...b)=>this.run(a,...b)}destroy(){if(!this.ja&&!this.F){this.F=!0;this.sg();for(const a of this.$.keys())this.$.has(a)&&this.$.get(a)();
319
- this.$.clear();this.Y.clear();this.N&&(this.N.detach(this,!1),this.N=null);this.ja=!0;this.F=!1;this.sg()}}gb(){return this.ja}jd(){return this.F}oe(a){if(!this.ja){var b;olympe.C.hb(a)?b=a.Ca:olympe.C.Pn(a)&&(b=a);b&&this.ea.set(b.T(),b)}}detach(a,b=!0){let c;olympe.C.hb(a)?c=a.Ca:olympe.C.Pn(a)&&(c=a);c&&this.ea.has(c.T())&&(b&&c.el(this),this.ea.delete(c.T()))}el(){this.N=null;this.destroy()}sg(){const a=this.ea;for(const b of a.keys())a.has(b)&&a.get(b).el(this);this.ea.clear();for(const b of this.Y.keys())this.Y.has(b)&&
317
+ olympe.C.J.D=new olympe.C.J(()=>olympe.C.Ta);olympe.C.J.N=new olympe.C.J(()=>olympe.C.da);olympe.C.J.R=new olympe.C.J(()=>olympe.C.Zb);olympe.C.Gh=class{T(){return''}En(){return''}destroy(){}gb(){return!1}jd(){return!1}run(a,...b){return a(...b)}tc(a){return a}getParent(){return null}tt(){}oe(){}detach(){}el(){}sg(){}onDestroy(){return''}Xf(){}Yd(){return''}it(){}};olympe.C.Gh.prototype.offDestroy=olympe.C.Gh.prototype.Xf;olympe.C.Gh.prototype.onDestroy=olympe.C.Gh.prototype.onDestroy;let Nb=0;olympe.W.run([new olympe.W.pa(olympe.C.U.zq)],()=>{});
318
+ olympe.C.Wb=class{constructor(a='SimpleContext',b){++Nb;this.ea=new Map;this.$=new Map;this.Y=new Map;this.Ha=0;this.name=a;this.id=String(Nb);this.F=this.ja=!1;(this.N=void 0===b?olympe.C.$a():b)&&this.N.oe(this);this.debug=!1}T(){return this.id}En(){return this.name}run(a,...b){if(!this.ja){var c=olympe.C.st(this);a=a(...b);c&&olympe.C.st(c);return a}}tc(a){return(...b)=>this.run(a,...b)}destroy(){if(!this.ja&&!this.F){this.F=!0;this.sg();for(const a of this.$.keys())this.$.has(a)&&this.$.get(a)();
319
+ this.$.clear();this.Y.clear();this.N&&(this.N.detach(this,!1),this.N=null);this.ja=!0;this.F=!1;this.sg()}}gb(){return this.ja}jd(){return this.F}oe(a){if(!this.ja){var b;olympe.C.hb(a)?b=a.Ca:olympe.C.Qn(a)&&(b=a);b&&this.ea.set(b.T(),b)}}detach(a,b=!0){let c;olympe.C.hb(a)?c=a.Ca:olympe.C.Qn(a)&&(c=a);c&&this.ea.has(c.T())&&(b&&c.el(this),this.ea.delete(c.T()))}el(){this.N=null;this.destroy()}sg(){const a=this.ea;for(const b of a.keys())a.has(b)&&a.get(b).el(this);this.ea.clear();for(const b of this.Y.keys())this.Y.has(b)&&
320
320
  this.Y.get(b)();this.Y.clear()}onDestroy(a,b){void 0===b&&(++this.Ha,b=String(this.Ha));this.$.set(b,a);return b}Xf(a){this.$.delete(a)}Yd(a){if(void 0===b){++this.Ha;var b=String(this.Ha)}this.Y.set(b,a);return b}it(a){this.Y.delete(a)}tt(a){this.N&&this.N.detach(this,!1);(this.N=a||null)&&this.N.oe(this)}getParent(){return this.N}};olympe.C.Dr=class extends olympe.C.Wb{constructor(){super('Root',null)}destroy(){}onDestroy(){return''}Xf(){}};olympe.C.Gh.za=[olympe.C.Gh];let Ob=0;
321
321
  function Pb(a,b){a.R||(a.R=new Map);a.R.set(b.T(),b);switch(b.Jc()){case olympe.C.Node.j.Ph:break;case olympe.C.Node.j.bi:break;case olympe.C.Node.j.vk:case olympe.C.Node.j.dg:olympe.C.G.warn('Not bad as such but should not happen!');break;case olympe.C.Node.j.Hh:Qb(a,olympe.C.Node.j.Hh);break;case olympe.C.Node.j.OBSOLETE:a.mb=!0;a.j!==olympe.C.Node.j.Hh&&Qb(a,olympe.C.Node.j.OBSOLETE);break;case olympe.C.Node.j.$d:olympe.C.G.warn('Adding a destroyed node as upstream => should never happen!');break;
322
322
  default:olympe.C.G.warn('Unknown state, investigate: ',b.Jc())}Rb(b,a)}
@@ -329,24 +329,24 @@ Object?d=!0:b.toLowerCase()!==e.toLowerCase()&&a.valueType!==Object&&(d=!0),d&&(
329
329
  function cc(a,b){if(a.j!==olympe.C.Node.j.dg&&a.j!==olympe.C.Node.j.$d&&(a.j!==olympe.C.Node.j.Ph||a.Lc)){var c=void 0!==a.defaultValue;a.Lc&&b!==a.D&&a.sg();if(c)L(a,a.defaultValue,!0);else if(a.Fb=void 0,Qb(a,olympe.C.Node.j.Ph),b=a.H)for(const d of b.values())cc(d,a)}}function Vb(a){if(a.j!==olympe.C.Node.j.Hh){Qb(a,olympe.C.Node.j.Hh);var b=a.H;if(b)for(const c of b.values())Vb(c);a.sg();void 0!==a.D&&Xb(a);a.Fb=a.defaultValue}}function Tb(a){return a.j===olympe.C.Node.j.bi}
330
330
  function Ub(a,b){b===a?olympe.C.G.error('Setting a node as provider of itself. Ignoring'):(a.D&&a.D!==b&&Xb(a),Rb(b,a),Tb(b)?L(a,b.Fb,!0):void 0!==a.defaultValue?L(a,a.defaultValue,!0):cc(a),a.D=b)}function dc(a,b){a.Lc&&(a.Lc=void 0);a.ad='Repeater';Ub(a,b)}function $b(a){a.D?Zb(a):null!==a.R&&0===Array.from(a.R.values()).filter(b=>!Tb(b)).length&&(a.mb&&(a.mb=!1,Sb(a)),Zb(a))}
331
331
  function Rb(a,b){a.H||(a.H=new Map);a.H.set(b.T(),b);a.j===olympe.C.Node.j.$d&&olympe.C.G.warn('adding a downstream node on a deleted one (#'+a.T()+') !')}function Yb(a,b){a.H&&(b=b.T(),a.H.has(b)&&(a.H.delete(b),ec(a)))}function ec(a){if(null===a.getParent()){var b=a.H;b&&0<b.size||a.destroy()}}
332
- olympe.C.Node=class extends olympe.C.Wb{constructor({valueType:a,Lc:b,Tz:c=!0,Yf:d,Ln:e,debug:f=!1,rg:g=null,ad:h='Node',qj:k}={}){++Ob;super(String(Ob));this.debug=!!f;this.ad=h;h&&'string'===typeof h||(b?this.ad=b.name?b.name:'anon()':this.ad='Node');this.Wd=e&&0<e.length?e:null;this.rg=g&&0<g.length?g:null;this.valueType=a;this.Fb=void 0;this.ta=!1;this.j=olympe.C.Node.j.Ph;this.mb=!1;this.H=this.R=null;this.Lc=b;this.Yf=d||null;this.defaultValue=this.Wa=this.D=void 0;this.qj=k;d&&d instanceof
332
+ olympe.C.Node=class extends olympe.C.Wb{constructor({valueType:a,Lc:b,Tz:c=!0,Yf:d,Mn:e,debug:f=!1,rg:g=null,ad:h='Node',qj:k}={}){++Ob;super(String(Ob));this.debug=!!f;this.ad=h;h&&'string'===typeof h||(b?this.ad=b.name?b.name:'anon()':this.ad='Node');this.Wd=e&&0<e.length?e:null;this.rg=g&&0<g.length?g:null;this.valueType=a;this.Fb=void 0;this.ta=!1;this.j=olympe.C.Node.j.Ph;this.mb=!1;this.H=this.R=null;this.Lc=b;this.Yf=d||null;this.defaultValue=this.Wa=this.D=void 0;this.qj=k;d&&d instanceof
333
333
  olympe.C.Node&&Pb(this,d);if(g)for(b=0;b<g.length;b++)a=e[g[b]],Pb(this,a);c&&Sb(this)}xh(a){this.defaultValue=a;this.j===olympe.C.Node.j.Ph&&L(this,a,!0);return this}sj(a){this.valueType=a}Nb(){return this.valueType||Object}asObservable(a=olympe.C.$a()){return new rxjs.Observable(b=>{const c=a.run(()=>olympe.C.createNode(this.valueType,b.next.bind(b),null,[this],[0],`Observable of ${this.ad}`));c.onDestroy(()=>b.complete());return()=>c.destroy()})}Jc(){return this.j}gb(){return this.j===olympe.C.Node.j.$d}jd(){return this.j===
334
334
  olympe.C.Node.j.dg}Eb(...a){if(this.qj instanceof Function)return this.qj(...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.Jc();a!==olympe.C.Node.j.dg&&a!==olympe.C.Node.j.$d||olympe.C.G.warn('Calling a function on a destroyed node!!!',this);a=d.F();b=[];if(1===a.length&&-1===a[0])for(var g of e)olympe.C.hb(g)&&b.push(g.Ca);else for(let h=0,k=a.length;h<k;h++)g=a[h],f=e[g],void 0!==f&&null!==f&&f.gh&&(e[g]=f.Ca,b.push(g));return M(new olympe.C.Node({valueType:d.H(),
335
- Lc:c,Yf:this,Ln:e,debug:!1,rg:b,ad:'Proxy.'+c+'()'}))}el(a){if(null===this.getParent())olympe.C.G.warn('context is undefined, investigate');else if(this.getParent()!==a){olympe.C.G.warn('Investigate a potential issue in creator-createe link: create node mismatch',a,this.getParent());return}this.tt(null);ec(this)}destroy(){var a=this.j;if(a!==olympe.C.Node.j.dg&&a!==olympe.C.Node.j.$d){Qb(this,olympe.C.Node.j.dg);if(a=this.H){for(const c of a.values())if(a.has(c.T())){var b=c;b.R&&b.R.delete(this.T());
336
- b.D&&b.D.T()===this.T()?b.D=void 0:b.destroy()}a.clear()}this.H=null;super.destroy();if(this.R){for(const c of this.R.values())this.R.has(c.T())&&Yb(c,this);this.R.clear()}this.R=null;this.D&&(Yb(this.D,this),this.D=void 0);this.Fb=void 0;this.Wd&&(this.Wd.length=0,this.Wd=null);this.rg&&(this.rg.length=0,this.rg=null);this.qj=this.Lc=void 0;this.defaultValue=this.Yf=null;this.ad=`** Destroyed ** ${this.ad}`;Qb(this,olympe.C.Node.j.$d)}}Dn(){return this.ad}print(){const a=this.Lc?this.Lc instanceof
337
- Function?this.Lc.name?this.Lc.name:'()':this.Lc:'{ }';return'#'+('000000'+this.T()).substr(-6)+(this.ad?' '+this.ad:'')+'>'+(a?' '+a+'()':'')}};olympe.C.Node.D='rootNode';olympe.C.Node.j={Ph:0,bi:1,Hh:3,vk:4,OBSOLETE:5,dg:6,$d:7};function Wb(a,b){if('function'!==typeof a)return new olympe.C.Proxy(a,b);var c=olympe.C.Proxy.prototype;void 0===a.prototype&&olympe.C.G.error('investigate');c=Object.create(fc(c,a.prototype));c.ei=a;c.ss=b;return c}function fc(a,b){Object.prototype.hasOwnProperty.call(b,olympe.C.Proxy.Nm)||Object.defineProperty(b,olympe.C.Proxy.Nm,{enumerable:!1,configurable:!1,writable:!1,value:gc(a,b)});return b[olympe.C.Proxy.Nm]}
335
+ Lc:c,Yf:this,Mn:e,debug:!1,rg:b,ad:'Proxy.'+c+'()'}))}el(a){if(null===this.getParent())olympe.C.G.warn('context is undefined, investigate');else if(this.getParent()!==a){olympe.C.G.warn('Investigate a potential issue in creator-createe link: create node mismatch',a,this.getParent());return}this.tt(null);ec(this)}destroy(){var a=this.j;if(a!==olympe.C.Node.j.dg&&a!==olympe.C.Node.j.$d){Qb(this,olympe.C.Node.j.dg);if(a=this.H){for(const c of a.values())if(a.has(c.T())){var b=c;b.R&&b.R.delete(this.T());
336
+ b.D&&b.D.T()===this.T()?b.D=void 0:b.destroy()}a.clear()}this.H=null;super.destroy();if(this.R){for(const c of this.R.values())this.R.has(c.T())&&Yb(c,this);this.R.clear()}this.R=null;this.D&&(Yb(this.D,this),this.D=void 0);this.Fb=void 0;this.Wd&&(this.Wd.length=0,this.Wd=null);this.rg&&(this.rg.length=0,this.rg=null);this.qj=this.Lc=void 0;this.defaultValue=this.Yf=null;this.ad=`** Destroyed ** ${this.ad}`;Qb(this,olympe.C.Node.j.$d)}}En(){return this.ad}print(){const a=this.Lc?this.Lc instanceof
337
+ Function?this.Lc.name?this.Lc.name:'()':this.Lc:'{ }';return'#'+('000000'+this.T()).substr(-6)+(this.ad?' '+this.ad:'')+'>'+(a?' '+a+'()':'')}};olympe.C.Node.D='rootNode';olympe.C.Node.j={Ph:0,bi:1,Hh:3,vk:4,OBSOLETE:5,dg:6,$d:7};function Wb(a,b){if('function'!==typeof a)return new olympe.C.Proxy(a,b);var c=olympe.C.Proxy.prototype;void 0===a.prototype&&olympe.C.G.error('investigate');c=Object.create(fc(c,a.prototype));c.ei=a;c.ss=b;return c}function fc(a,b){Object.prototype.hasOwnProperty.call(b,olympe.C.Proxy.Om)||Object.defineProperty(b,olympe.C.Proxy.Om,{enumerable:!1,configurable:!1,writable:!1,value:gc(a,b)});return b[olympe.C.Proxy.Om]}
338
338
  function hc(a,b){if(a.ei!==b){a.ei=b;b.prototype||olympe.C.G.error('Cast not possible, provided type is not a valid type!');var c=fc(a,b.prototype);Object.setPrototypeOf?Object.setPrototypeOf(a,c):a.__proto__=c;a.Ca&&a.Ca.sj(b)}}
339
339
  function gc(a,b){let c={};if(b.prototype)olympe.C.G.error('first level of prototyping, investigate');else if(b.__proto__)c=Object.create(fc(a,b.__proto__));else return olympe.C.Proxy.prototype;Object.getOwnPropertyNames(b).forEach(d=>{if('function'===typeof b[d]&&'__getReplacementFunction'!==d){var e=b[d].K;null===e||e&&e.N()?c[d]=function(...f){var g=this.Ca;if(g&&Tb(g)&&(g=g.Fb)&&g[d]&&'function'===typeof g[d])return g[d].apply(g,f)}:(e=e||b[d].__oSig__||olympe.C.J.Y,c[d]=function(...f){f=this.ss.call(this.Ca,
340
340
  ...f,e,d);const g=e.Y;if(g){const h=this.Ca.Fb;h&&h[g]&&hc(f,h[g])}return e.R()?this:f})}});return c}function ic(a,b){L(a.Ca,b)}function jc(a){cc(a.Ca)}function kc(a,b){dc(a.Ca,olympe.C.Vf(b)?b:b.Ca)}function lc(a,b){olympe.C.hb(b)||olympe.C.Vf(b)?kc(a,b):ic(a,b)}
341
- olympe.C.Proxy=class{constructor(a,b){this.Ca=null;this.ei=a;this.ss=b}static hb(a){return!(!a||!a.gh)}Fa(a){return olympe.C.ua([this,a],(b,c)=>b===c,Boolean)}Kd(a){return olympe.C.ua([this,a],(b,c)=>null===b||null===c?b===c?olympe.C.da.D:olympe.C.da.j:b.valueOf()===c.valueOf()?olympe.C.da.D:olympe.C.da.j,olympe.C.da)}asObservable(a){return this.Ca.asObservable(a)}rs(){return this.Ca}};olympe.C.Proxy.Nm='__opp__';olympe.C.Proxy.prototype.gh=!0;function mc(a,b){a.node.xh(b);return a}olympe.C.lk=class{constructor(a,b='FlowSource'){this.node=olympe.C.createNode(a,void 0,void 0,void 0,void 0,b)}update(a){olympe.C.hb(a)?L(this.node,olympe.C.Qa(a)):L(this.node,a);return this}repeat(a){dc(this.node,olympe.C.hb(a)?a.Ca:a);return this}clear(){cc(this.node);return this}tb(){return M(this.node)}getContext(){return this.node}};function nc(a,b,c=1E3,d,e){const f=olympe.C.cc(olympe.C.aa),g=d||olympe.C.aa.kp.rq;let h,k,l,n;f.update(olympe.C.ra(a));const p=window.performance.now(),q=b.valueOf();l=q-a.valueOf();if(0!==l&&void 0===n){const r=()=>{f.getContext().gb()||(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.C.ra(h)),1===k&&void 0!==e&&e(h),1>k&&(n=window.requestAnimationFrame(r)))};n=window.requestAnimationFrame(r)}return f.tb()}
342
- olympe.C.aa=class{constructor(a){this.value=void 0===a||null===a?0:a}toJSON(){return'{ "type": "number", "value": '+JSON.stringify(this.value)+' }'}static Qb(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return olympe.C.ra(b.value)}eo(){return'number'===typeof this.value&&!isNaN(this.value)}isNaN(){return olympe.C.Sb(!this.eo())}Wc(){return null===this.value||void 0===this.value||void 0===this.value.toString||isNaN(this.value)?olympe.C.xb(''):olympe.C.xb(this.value.toString())}toString(a,b){return void 0!==
343
- 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.eo()?this.valueOf().toFixed(a):''}static max(a){const b=new Map;let c=-Infinity;const d=olympe.C.cc(olympe.C.aa,'ONumber.max result'),e=()=>{c=-Infinity;for(const f of b.values())f>c&&(c=f);d.update(olympe.C.ra(c))};a.forEach((f,g)=>{olympe.C.Vc([f],h=>{b.set(g,h.valueOf());e()})},f=>{if(!d.getContext().gb()){var g=b.get(f);b.delete(f);
341
+ olympe.C.Proxy=class{constructor(a,b){this.Ca=null;this.ei=a;this.ss=b}static hb(a){return!(!a||!a.gh)}Fa(a){return olympe.C.ua([this,a],(b,c)=>b===c,Boolean)}Kd(a){return olympe.C.ua([this,a],(b,c)=>null===b||null===c?b===c?olympe.C.da.D:olympe.C.da.j:b.valueOf()===c.valueOf()?olympe.C.da.D:olympe.C.da.j,olympe.C.da)}asObservable(a){return this.Ca.asObservable(a)}rs(){return this.Ca}};olympe.C.Proxy.Om='__opp__';olympe.C.Proxy.prototype.gh=!0;function mc(a,b){a.node.xh(b);return a}olympe.C.lk=class{constructor(a,b='FlowSource'){this.node=olympe.C.createNode(a,void 0,void 0,void 0,void 0,b)}update(a){olympe.C.hb(a)?L(this.node,olympe.C.Qa(a)):L(this.node,a);return this}repeat(a){dc(this.node,olympe.C.hb(a)?a.Ca:a);return this}clear(){cc(this.node);return this}tb(){return M(this.node)}getContext(){return this.node}};function nc(a,b,c=1E3,d,e){const f=olympe.C.cc(olympe.C.aa),g=d||olympe.C.aa.lp.rq;let h,k,l,n;f.update(olympe.C.ra(a));const p=window.performance.now(),q=b.valueOf();l=q-a.valueOf();if(0!==l&&void 0===n){const r=()=>{f.getContext().gb()||(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.C.ra(h)),1===k&&void 0!==e&&e(h),1>k&&(n=window.requestAnimationFrame(r)))};n=window.requestAnimationFrame(r)}return f.tb()}
342
+ olympe.C.aa=class{constructor(a){this.value=void 0===a||null===a?0:a}toJSON(){return'{ "type": "number", "value": '+JSON.stringify(this.value)+' }'}static Qb(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return olympe.C.ra(b.value)}fo(){return'number'===typeof this.value&&!isNaN(this.value)}isNaN(){return olympe.C.Sb(!this.fo())}Wc(){return null===this.value||void 0===this.value||void 0===this.value.toString||isNaN(this.value)?olympe.C.xb(''):olympe.C.xb(this.value.toString())}toString(a,b){return void 0!==
343
+ 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.fo()?this.valueOf().toFixed(a):''}static max(a){const b=new Map;let c=-Infinity;const d=olympe.C.cc(olympe.C.aa,'ONumber.max result'),e=()=>{c=-Infinity;for(const f of b.values())f>c&&(c=f);d.update(olympe.C.ra(c))};a.forEach((f,g)=>{olympe.C.Vc([f],h=>{b.set(g,h.valueOf());e()})},f=>{if(!d.getContext().gb()){var g=b.get(f);b.delete(f);
344
344
  g===c&&e()}});return d.tb()}he(a){return olympe.C.ua([this,a],(b,c)=>olympe.C.ra(b.valueOf()+c.valueOf()),olympe.C.aa,'ONumber.plus')}vh(a){return olympe.C.ua([this,a],(b,c)=>olympe.C.ra(b.valueOf()-c.valueOf()),olympe.C.aa,'ONumber.minus')}round(){return olympe.C.ra(Math.round(this.valueOf()))}Pj(){return olympe.C.ra(-this.valueOf())}rl(a){return olympe.C.ua([this,a],(b,c)=>olympe.C.ra(b.valueOf()*c.valueOf()),olympe.C.aa,'ONumber.mul')}vj(a){return olympe.C.ua([this,a],(b,c)=>olympe.C.ra(b.valueOf()/
345
345
  c.valueOf()),olympe.C.aa,'ONumber.div')}vz(a){return olympe.C.ua([this,a],(b,c)=>olympe.C.ra(b.valueOf()%c.valueOf()),olympe.C.aa,'ONumber.div')}floor(){return olympe.C.ra(Math.floor(this.valueOf()))}ceil(){return olympe.C.ra(Math.ceil(this.valueOf()))}trunc(){return olympe.C.ra(Math.trunc(this.valueOf()))}log(){return olympe.C.ra(Math.log(this.valueOf()))}pow(a){return olympe.C.ua([this,a],(b,c)=>olympe.C.ra(Math.pow(b.valueOf(),c.valueOf())),olympe.C.aa,'ONumber.pow')}exp(){return olympe.C.ra(Math.exp(this.valueOf()))}Kd(a){return olympe.C.ua([this,
346
- a],(b,c)=>olympe.C.Sb(b.Fa(c)),olympe.C.da,'ONumber.oEquals')}Fa(a){return this.valueOf()===(void 0!==a&&null!==a?a.valueOf():void 0)}valueOf(){return void 0!==this.value?this.value.valueOf():void 0}Hy(){return this.valueOf()}On(a){return olympe.C.ua([this,a],(b,c)=>b.valueOf()>c.valueOf()?olympe.C.da.D:olympe.C.da.j,olympe.C.da,'ONumber.isBiggerThan')}Zz(a){return olympe.C.ua([this,a],(b,c)=>b.valueOf()>=c.valueOf()?b:olympe.C.ra(c),olympe.C.aa,'ONumber.returnsBiggest')}ot(a){return olympe.C.ua([this,
346
+ a],(b,c)=>olympe.C.Sb(b.Fa(c)),olympe.C.da,'ONumber.oEquals')}Fa(a){return this.valueOf()===(void 0!==a&&null!==a?a.valueOf():void 0)}valueOf(){return void 0!==this.value?this.value.valueOf():void 0}Hy(){return this.valueOf()}Pn(a){return olympe.C.ua([this,a],(b,c)=>b.valueOf()>c.valueOf()?olympe.C.da.D:olympe.C.da.j,olympe.C.da,'ONumber.isBiggerThan')}Zz(a){return olympe.C.ua([this,a],(b,c)=>b.valueOf()>=c.valueOf()?b:olympe.C.ra(c),olympe.C.aa,'ONumber.returnsBiggest')}ot(a){return olympe.C.ua([this,
347
347
  a],(b,c)=>b.valueOf()<=c.valueOf()?b:olympe.C.ra(c),olympe.C.aa,'ONumber.returnsSmallest')}lz(a){return olympe.C.ua([this,a],(b,c)=>b.valueOf()<c.valueOf()?olympe.C.da.D:olympe.C.da.j,olympe.C.da,'ONumber.isSmallerThan')}sin(){return olympe.C.ra(Math.sin(this.valueOf()))}cos(){return olympe.C.ra(Math.cos(this.valueOf()))}atan2(a){return olympe.C.hb(a)?olympe.C.ye([a],b=>olympe.C.ra(Math.atan2(this.valueOf(),b.valueOf())),olympe.C.aa):olympe.C.ra(Math.atan2(this.valueOf(),a.valueOf()))}abs(){return olympe.C.ra(Math.abs(this.valueOf()))}Ij(a,
348
- b){return olympe.C.hb(a)||olympe.C.hb(b)?olympe.C.ye([a,b],(c,d)=>olympe.C.ra(this.valueOf()*d.valueOf()+c.valueOf()*(1-d.valueOf())),olympe.C.aa):olympe.C.ra(this.valueOf()*b.valueOf()+a.valueOf()*(1-b.valueOf()))}static Zw(a,b,c,d){'number'===typeof a&&(a=olympe.C.ge(a));'number'===typeof b&&(b=olympe.C.ge(b));'number'===typeof c&&(c=olympe.C.ge(c));let e=0;const f=olympe.C.ge(0);let g,h;void 0!==b&&void 0!==c&&olympe.C.Gj(b.On(c),()=>{olympe.ia.Ya('df').warn('You have a min bigger than max, cap your inputs')});
349
- const k=(l,n)=>{n=olympe.C.ge(n);const p=olympe.C.aa.animate(n,500);kc(f,p);ic(n,olympe.C.ra(l));e=l};olympe.C.ye([a],l=>{e+=l.valueOf();e>h?k(h,e):e<g?k(g,e):kc(f,olympe.C.ge(e))},olympe.C.aa);void 0!==b&&olympe.C.Rn(b.valueOf(),l=>{if(g!==l&&(g=l,g>e)){const n=olympe.C.ge(e),p=olympe.C.aa.animate(n,400,d);l=olympe.C.ra(g);L(n.Ca,l);e=g;kc(f,p)}});void 0!==c&&olympe.C.Rn(c.valueOf(),l=>{if(h!==l&&(h=l,h<e)){const n=olympe.C.ge(e),p=olympe.C.aa.animate(n,400,d);l=olympe.C.ra(h);L(n.Ca,l);e=h;kc(f,
348
+ b){return olympe.C.hb(a)||olympe.C.hb(b)?olympe.C.ye([a,b],(c,d)=>olympe.C.ra(this.valueOf()*d.valueOf()+c.valueOf()*(1-d.valueOf())),olympe.C.aa):olympe.C.ra(this.valueOf()*b.valueOf()+a.valueOf()*(1-b.valueOf()))}static Zw(a,b,c,d){'number'===typeof a&&(a=olympe.C.ge(a));'number'===typeof b&&(b=olympe.C.ge(b));'number'===typeof c&&(c=olympe.C.ge(c));let e=0;const f=olympe.C.ge(0);let g,h;void 0!==b&&void 0!==c&&olympe.C.Gj(b.Pn(c),()=>{olympe.ia.Ya('df').warn('You have a min bigger than max, cap your inputs')});
349
+ const k=(l,n)=>{n=olympe.C.ge(n);const p=olympe.C.aa.animate(n,500);kc(f,p);ic(n,olympe.C.ra(l));e=l};olympe.C.ye([a],l=>{e+=l.valueOf();e>h?k(h,e):e<g?k(g,e):kc(f,olympe.C.ge(e))},olympe.C.aa);void 0!==b&&olympe.C.Sn(b.valueOf(),l=>{if(g!==l&&(g=l,g>e)){const n=olympe.C.ge(e),p=olympe.C.aa.animate(n,400,d);l=olympe.C.ra(g);L(n.Ca,l);e=g;kc(f,p)}});void 0!==c&&olympe.C.Sn(c.valueOf(),l=>{if(h!==l&&(h=l,h<e)){const n=olympe.C.ge(e),p=olympe.C.aa.animate(n,400,d);l=olympe.C.ra(h);L(n.Ca,l);e=h;kc(f,
350
350
  p)}});return f}static offset(a){let b;return olympe.C.ye([a],c=>{void 0===b&&(b=c);return olympe.C.ra(c-b)},olympe.C.aa,'offset')}static Es(a){let b,c,d;return olympe.C.ua([a],e=>{if(void 0===b)return b=e,c=window.performance.now(),olympe.C.ra(0);d=window.performance.now();const f=olympe.C.ra((e.valueOf()-b.valueOf())/(d-c));b=e;c=d;return f},olympe.C.aa,'derivative')}static dz(a){let b=olympe.C.ra(0),c,d,e;return olympe.C.ua([a],f=>{if(void 0===c)return c=f,d=window.performance.now(),olympe.C.ra(0);
351
351
  e=window.performance.now();b=b.he((f.valueOf()+c.valueOf())/2*(e-d));c=f;d=e;return b},olympe.C.aa,'integrate')}static Ix(a){let b;return olympe.C.ua([a],c=>{void 0===b&&(b=c.valueOf());const d=olympe.C.ra(c.valueOf()-b.valueOf());b=c;return d},olympe.C.aa,'diff')}static xx(a,b,c){return olympe.C.ye([a,b,c],(d,e,f)=>{d='number'===typeof d?d:d.valueOf();e='number'===typeof e?e:e.valueOf();f='number'===typeof f?f:f.valueOf();return olympe.C.ra(d>=e?d<=f?d:f:e)},olympe.C.aa)}static animate(a,b,c,d){let e;
352
352
  return e=olympe.C.ua([a],f=>{const g=olympe.C.Qa(b,1E3),h=olympe.C.Qa(e);return void 0===h?olympe.C.ra(f):nc(h,f,g,c,k=>{d&&d(k)})},olympe.C.aa)}static mx(a,b,c){let d,e,f,g,h,k,l=olympe.C.ge(),n;olympe.C.Vc([a],p=>{void 0===d?g=d=p.valueOf():d=g;f=window.performance.now();e=p.valueOf();k=e-d;0!==k&&void 0===n&&(n=setInterval(()=>{k=e-d;h=(window.performance.now()-f)/b;1<=h&&(h=1);g=d+k*c(h,0,1,1);ic(l,olympe.C.ra(g));1===h&&(clearTimeout(n),n=void 0)},0))});return l}static Wc(a){return olympe.C.hb(a)?
@@ -354,19 +354,19 @@ olympe.C.ua([a],b=>olympe.C.xb(b.valueOf().toString()),olympe.C.Ta):olympe.C.xb(
354
354
  'minus'):olympe.C.ra(a.valueOf()-b.valueOf())}static vj(a,b){return olympe.C.hb(a)||olympe.C.hb(b)?olympe.C.ye([a,b],(c,d)=>olympe.C.ra(c.valueOf()/d.valueOf()),olympe.C.aa,'div'):olympe.C.ra(a.valueOf()/b.valueOf())}static Rz(a,b){if(void 0===b)return a;olympe.C.Vc([b],c=>{c=olympe.C.ra(a.Ca.Fb.valueOf()+c.valueOf());L(a.Ca,c)},'plusEqual');return a}};olympe.C.aa.ZERO=new olympe.C.aa(0);olympe.C.aa.ONE=new olympe.C.aa(1);olympe.C.aa.Jw=new olympe.C.aa(2);olympe.C.aa.PI=new olympe.C.aa(Math.PI);
355
355
  olympe.C.aa.Cu=new olympe.C.aa(Infinity);olympe.C.aa.zv=new olympe.C.aa(-Infinity);olympe.C.aa.yq=new olympe.C.aa(NaN);olympe.C.aa.HC=olympe.C.aa.Rz;olympe.C.aa.sA=olympe.C.aa.Zw;olympe.C.aa.vC=olympe.C.aa.offset;olympe.C.aa.$A=olympe.C.aa.Es;olympe.C.aa.SE=olympe.C.aa.Es;olympe.C.aa.WB=olympe.C.aa.dz;olympe.C.aa.aB=olympe.C.aa.Ix;olympe.C.aa.IA=olympe.C.aa.xx;olympe.C.aa.tA=olympe.C.aa.animate;olympe.C.aa.uA=olympe.C.aa.mx;olympe.C.aa.aE=olympe.C.aa.Wc;olympe.C.aa.bE=olympe.C.aa.Pj;
356
356
  olympe.C.aa.GC=olympe.C.aa.he;olympe.C.aa.jC=olympe.C.aa.vh;olympe.C.aa.bB=olympe.C.aa.vj;
357
- olympe.C.aa.kp={rq:function(a,b,c,d){return c*a/d+b},vB:function(a,b,c,d){a/=d;return c*a*a+b},FB:function(a,b,c,d){a/=d;return-c*a*(a-2)+b},rB:function(a,b,c,d){a/=d/2;if(1>a)return c/2*a*a+b;a--;return-c/2*(a*(a-2)-1)+b},kB:function(a,b,c,d){a/=d;return c*a*a*a+b},BB:function(a,b,c,d){a/=d;a--;return c*(a*a*a+1)+b},pB:function(a,b,c,d){a/=d/2;if(1>a)return c/2*a*a*a+b;a-=2;return c/2*(a*a*a+2)+b},wB:function(a,b,c,d){a/=d;return c*a*a*a*a+b},GB:function(a,b,c,d){a/=d;a--;return-c*(a*a*a*a-1)+b},
357
+ olympe.C.aa.lp={rq:function(a,b,c,d){return c*a/d+b},vB:function(a,b,c,d){a/=d;return c*a*a+b},FB:function(a,b,c,d){a/=d;return-c*a*(a-2)+b},rB:function(a,b,c,d){a/=d/2;if(1>a)return c/2*a*a+b;a--;return-c/2*(a*(a-2)-1)+b},kB:function(a,b,c,d){a/=d;return c*a*a*a+b},BB:function(a,b,c,d){a/=d;a--;return c*(a*a*a+1)+b},pB:function(a,b,c,d){a/=d/2;if(1>a)return c/2*a*a*a+b;a-=2;return c/2*(a*a*a+2)+b},wB:function(a,b,c,d){a/=d;return c*a*a*a*a+b},GB:function(a,b,c,d){a/=d;a--;return-c*(a*a*a*a-1)+b},
358
358
  sB:function(a,b,c,d){a/=d/2;if(1>a)return c/2*a*a*a*a+b;a-=2;return-c/2*(a*a*a*a-2)+b},xB:function(a,b,c,d){a/=d;return c*a*a*a*a*a+b},HB:function(a,b,c,d){a/=d;a--;return c*(a*a*a*a*a+1)+b},tB:function(a,b,c,d){a/=d/2;if(1>a)return c/2*a*a*a*a*a+b;a-=2;return c/2*(a*a*a*a*a+2)+b},yB:function(a,b,c,d){return-c*Math.cos(a/d*(Math.PI/2))+c+b},IB:function(a,b,c,d){return c*Math.sin(a/d*(Math.PI/2))+b},uB:function(a,b,c,d){return-c/2*(Math.cos(Math.PI*a/d)-1)+b},nB:function(a,b,c,d){return c*Math.pow(2,
359
359
  10*(a/d-1))+b},EB:function(a,b,c,d){return c*(-Math.pow(2,-10*a/d)+1)+b},qB:function(a,b,c,d){a/=d/2;if(1>a)return c/2*Math.pow(2,10*(a-1))+b;a--;return c/2*(-Math.pow(2,-10*a)+2)+b},jB:function(a,b,c,d){a/=d;return-c*(Math.sqrt(1-a*a)-1)+b},AB:function(a,b,c,d){a/=d;a--;return c*Math.sqrt(1-a*a)+b},oB:function(a,b,c,d){a/=d/2;if(1>a)return-c/2*(Math.sqrt(1-a*a)-1)+b;a-=2;return c/2*(Math.sqrt(1-a*a)+1)+b},eB:function(a,b,c,d){d=(a/=d)*a;return b+c*(4*d*a+-3*d)},fB:function(a,b,c,d){d=(a/=d)*a;return b+
360
360
  c*(2*d*d+2*d*a+-3*d)},gB:function(a,b,c,d){d=(a/=d)*a;return b+c*(4*d*a+-9*d+6*a)},hB:function(a,b,c,d){d=(a/=d)*a;return b+c*(-2*d*d+10*d*a+-15*d+8*a)},DB: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)},CB: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)},mB:function(a,b,c,d){d=(a/=d)*a;a*=d;return b+c*(33*a*d+-59*d*d+32*a+-5*d)},lB:function(a,b,c,d){d=(a/=d)*a;a*=d;return b+c*(56*a*d+-105*d*d+60*a+-10*d)},zB:function(a,
361
- 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},iB: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.C.aa.prototype;m.toJSON.K=olympe.C.J.j;m.eo.K=olympe.C.J.j;m.isNaN.K=olympe.C.J.N;m.Wc.K=olympe.C.J.D;
361
+ 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},iB: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.C.aa.prototype;m.toJSON.K=olympe.C.J.j;m.fo.K=olympe.C.J.j;m.isNaN.K=olympe.C.J.N;m.Wc.K=olympe.C.J.D;
362
362
  m.toString.K=new olympe.C.J(()=>String,[]);m.toFixed.K=new olympe.C.J(()=>String,[]);m.he.K=new olympe.C.J(()=>olympe.C.aa,[0]);m.vh.K=new olympe.C.J(()=>olympe.C.aa,[0]);m.round.K=olympe.C.J.F;m.Pj.K=olympe.C.J.F;m.rl.K=new olympe.C.J(()=>olympe.C.aa,[0]);m.vj.K=new olympe.C.J(()=>olympe.C.aa,[0]);m.vz.K=new olympe.C.J(()=>olympe.C.aa,[0]);m.floor.K=olympe.C.J.F;m.ceil.K=olympe.C.J.F;m.trunc.K=olympe.C.J.F;m.log.K=olympe.C.J.F;m.pow.K=new olympe.C.J(()=>olympe.C.aa,[0]);m.exp.K=olympe.C.J.F;
363
- m.Kd.K=new olympe.C.J(()=>olympe.C.da,[0]);m.Fa.K=olympe.C.J.j;m.valueOf.K=olympe.C.J.j;m.Hy.K=olympe.C.J.j;m.On.K=new olympe.C.J(()=>olympe.C.da,[0]);m.Zz.K=new olympe.C.J(()=>olympe.C.aa,[0]);m.ot.K=new olympe.C.J(()=>olympe.C.aa,[0]);m.lz.K=new olympe.C.J(()=>olympe.C.da,[0]);m.sin.K=olympe.C.J.F;m.cos.K=olympe.C.J.F;m.atan2.K=new olympe.C.J(()=>olympe.C.aa,[0]);m.abs.K=olympe.C.J.F;m.Ij.K=new olympe.C.J(()=>olympe.C.aa,[0,1]);olympe.C.Ta=class{constructor(a){this.value=a}toJSON(){return'{ "type": "string", "value": '+JSON.stringify(this.value)+' }'}static Qb(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return olympe.C.xb(b.value)}Bs(a){return olympe.C.Ta.concat(this,'.',a)}concat(...a){let b;Array.isArray(a[0])?b=a[0]:b=a;return olympe.C.ua([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.C.xb(d)},olympe.C.Ta,'OString.concat')}Wc(){return this}lA(a){return olympe.C.ra(parseInt(this.value,
363
+ m.Kd.K=new olympe.C.J(()=>olympe.C.da,[0]);m.Fa.K=olympe.C.J.j;m.valueOf.K=olympe.C.J.j;m.Hy.K=olympe.C.J.j;m.Pn.K=new olympe.C.J(()=>olympe.C.da,[0]);m.Zz.K=new olympe.C.J(()=>olympe.C.aa,[0]);m.ot.K=new olympe.C.J(()=>olympe.C.aa,[0]);m.lz.K=new olympe.C.J(()=>olympe.C.da,[0]);m.sin.K=olympe.C.J.F;m.cos.K=olympe.C.J.F;m.atan2.K=new olympe.C.J(()=>olympe.C.aa,[0]);m.abs.K=olympe.C.J.F;m.Ij.K=new olympe.C.J(()=>olympe.C.aa,[0,1]);olympe.C.Ta=class{constructor(a){this.value=a}toJSON(){return'{ "type": "string", "value": '+JSON.stringify(this.value)+' }'}static Qb(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return olympe.C.xb(b.value)}Bs(a){return olympe.C.Ta.concat(this,'.',a)}concat(...a){let b;Array.isArray(a[0])?b=a[0]:b=a;return olympe.C.ua([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.C.xb(d)},olympe.C.Ta,'OString.concat')}Wc(){return this}lA(a){return olympe.C.ra(parseInt(this.value,
364
364
  a))}vt(){return olympe.C.ra(parseFloat(this.value))}toString(){return this.value}valueOf(){return this.value.valueOf()}Fa(a){return this.value===(void 0===a||null===a?void 0:a.valueOf())}Kd(a){return olympe.C.ua([this,a],(b,c)=>olympe.C.Sb(c&&b.valueOf()===c.valueOf()),olympe.C.da,'OString.oEquals')}pf(){return olympe.C.Sb(!this.value||0===this.value.length)}contains(a){return olympe.C.ua([this,a],(b,c)=>olympe.C.Sb((c instanceof olympe.C.Ta||'string'===typeof c)&&b.valueOf().includes(c.valueOf())),
365
- olympe.C.da,'OString.contains')}startsWith(a,b){return olympe.C.ua([this,a,b||0],(c,d,e)=>olympe.C.Sb(c.valueOf().startsWith(d.valueOf(),e.valueOf())),olympe.C.da,'OString.startsWith')}endsWith(a,b){return olympe.C.ua([this,a,b||-1],(c,d,e)=>{e=0<=e.valueOf()?e.valueOf():this.Fn().valueOf()+e.valueOf()+1;return olympe.C.Sb(c.valueOf().endsWith(d.valueOf(),e))},olympe.C.da,'OString.endsWith')}indexOf(a,b){return olympe.C.ua([this,a,b||0],(c,d,e)=>olympe.C.ra(c.valueOf().indexOf(d.valueOf(),e.valueOf())),
366
- olympe.C.aa,'OString.indexOf')}lastIndexOf(a,b){return olympe.C.ua([this,a,b||Infinity],(c,d,e)=>olympe.C.ra(c.valueOf().lastIndexOf(d.valueOf(),e.valueOf())),olympe.C.aa,'OString.lastIndexOf')}slice(a,b){return olympe.C.ua([this,a,b],(c,d,e)=>olympe.C.xb(c.valueOf().slice(d.valueOf(),e?e.valueOf():void 0)),olympe.C.Ta,'OString.slice')}Fn(){return olympe.C.ra(this.value.length)}threshold(a){return olympe.C.ua([this,a],(b,c)=>b.valueOf().length>=c.valueOf()?b:olympe.C.Ta.EMPTY,olympe.C.Ta,'OString.threshold')}toLowerCase(){return olympe.C.xb(this.value.toLowerCase())}toUpperCase(){return olympe.C.xb(this.value.toUpperCase())}trim(){return olympe.C.xb(this.value.trim())}padStart(a,
365
+ olympe.C.da,'OString.contains')}startsWith(a,b){return olympe.C.ua([this,a,b||0],(c,d,e)=>olympe.C.Sb(c.valueOf().startsWith(d.valueOf(),e.valueOf())),olympe.C.da,'OString.startsWith')}endsWith(a,b){return olympe.C.ua([this,a,b||-1],(c,d,e)=>{e=0<=e.valueOf()?e.valueOf():this.Gn().valueOf()+e.valueOf()+1;return olympe.C.Sb(c.valueOf().endsWith(d.valueOf(),e))},olympe.C.da,'OString.endsWith')}indexOf(a,b){return olympe.C.ua([this,a,b||0],(c,d,e)=>olympe.C.ra(c.valueOf().indexOf(d.valueOf(),e.valueOf())),
366
+ olympe.C.aa,'OString.indexOf')}lastIndexOf(a,b){return olympe.C.ua([this,a,b||Infinity],(c,d,e)=>olympe.C.ra(c.valueOf().lastIndexOf(d.valueOf(),e.valueOf())),olympe.C.aa,'OString.lastIndexOf')}slice(a,b){return olympe.C.ua([this,a,b],(c,d,e)=>olympe.C.xb(c.valueOf().slice(d.valueOf(),e?e.valueOf():void 0)),olympe.C.Ta,'OString.slice')}Gn(){return olympe.C.ra(this.value.length)}threshold(a){return olympe.C.ua([this,a],(b,c)=>b.valueOf().length>=c.valueOf()?b:olympe.C.Ta.EMPTY,olympe.C.Ta,'OString.threshold')}toLowerCase(){return olympe.C.xb(this.value.toLowerCase())}toUpperCase(){return olympe.C.xb(this.value.toUpperCase())}trim(){return olympe.C.xb(this.value.trim())}padStart(a,
367
367
  b){return olympe.C.ua([this,a,b],(c,d,e)=>olympe.C.xb(c.valueOf().padStart(d.valueOf(),e.valueOf())),olympe.C.Ta,'OString.padStart')}padEnd(a,b){return olympe.C.ua([this,a,b],(c,d,e)=>olympe.C.xb(c.valueOf().padEnd(d.valueOf(),e.valueOf())),olympe.C.Ta,'OString.padEnd')}replace(a,b){return olympe.C.ua([this,a,b],(c,d,e)=>olympe.C.xb(c.valueOf().replace(d.valueOf(),e.valueOf())),olympe.C.Ta,'OString.replace')}hA(a,b){return olympe.C.ua([this,a,b],(c,d,e)=>olympe.C.xb(c.valueOf().substr(d.valueOf(),
368
368
  e.valueOf())),olympe.C.Ta,'OString.subOStr')}static concat(...a){return olympe.C.xb('').concat(...a)}};olympe.C.Ta.EMPTY=new olympe.C.Ta('');olympe.C.Ta.uw=new olympe.C.Ta(' ');m=olympe.C.Ta.prototype;m.toJSON.K=olympe.C.J.j;m.Bs.K=new olympe.C.J(()=>olympe.C.Ta,[0,1]);m.concat.K=olympe.C.J.D;m.Wc.K=olympe.C.J.D;m.lA.K=olympe.C.J.F;m.vt.K=olympe.C.J.F;m.toString.K=olympe.C.J.j;m.valueOf.K=olympe.C.J.j;m.Fa.K=olympe.C.J.j;m.Kd.K=new olympe.C.J(()=>olympe.C.da,[0]);m.pf.K=olympe.C.J.N;
369
- m.contains.K=new olympe.C.J(()=>olympe.C.da,[0]);m.startsWith.K=new olympe.C.J(()=>olympe.C.da,[0,1]);m.endsWith.K=new olympe.C.J(()=>olympe.C.da,[0,1]);m.indexOf.K=new olympe.C.J(()=>olympe.C.aa,[0,1]);m.lastIndexOf.K=new olympe.C.J(()=>olympe.C.aa,[0,1]);m.slice.K=new olympe.C.J(()=>olympe.C.Ta,[0,1]);m.Fn.K=olympe.C.J.F;m.threshold.K=new olympe.C.J(()=>olympe.C.Ta,[0]);m.toLowerCase.K=olympe.C.J.D;m.toUpperCase.K=olympe.C.J.D;m.trim.K=olympe.C.J.D;m.padStart.K=olympe.C.J.D;m.padEnd.K=olympe.C.J.D;
369
+ m.contains.K=new olympe.C.J(()=>olympe.C.da,[0]);m.startsWith.K=new olympe.C.J(()=>olympe.C.da,[0,1]);m.endsWith.K=new olympe.C.J(()=>olympe.C.da,[0,1]);m.indexOf.K=new olympe.C.J(()=>olympe.C.aa,[0,1]);m.lastIndexOf.K=new olympe.C.J(()=>olympe.C.aa,[0,1]);m.slice.K=new olympe.C.J(()=>olympe.C.Ta,[0,1]);m.Gn.K=olympe.C.J.F;m.threshold.K=new olympe.C.J(()=>olympe.C.Ta,[0]);m.toLowerCase.K=olympe.C.J.D;m.toUpperCase.K=olympe.C.J.D;m.trim.K=olympe.C.J.D;m.padStart.K=olympe.C.J.D;m.padEnd.K=olympe.C.J.D;
370
370
  m.replace.K=olympe.C.J.D;m.hA.K=olympe.C.J.D;olympe.C.da=class{constructor(a){this.value=a}toJSON(){return`{ "type": "boolean", "value": ${this.value.valueOf()}}`}static Qb(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return b.value?olympe.C.da.D:olympe.C.da.j}and(a){if(void 0!==a)return olympe.C.hb(a)?olympe.C.ye([a],b=>new olympe.C.da(this.valueOf()&&b.valueOf()),olympe.C.da,'and'):this.value&&a.valueOf()?olympe.C.da.D:olympe.C.da.j}Fa(a){return this.valueOf()===(void 0!==a?a.valueOf():void 0)}Kd(a){if(void 0!==a)return olympe.C.hb(a)?
371
371
  olympe.C.ye([a],b=>new olympe.C.da(this.valueOf()===b.valueOf()),olympe.C.da,'oEquals'):this.Fa(a)?olympe.C.da.D:olympe.C.da.j}Ad(){return this.value?olympe.C.da.j:olympe.C.da.D}lx(a){if(void 0!==a)return olympe.C.hb(a)?olympe.C.ye([a],b=>new olympe.C.da(!(this.valueOf()&&b.valueOf())),olympe.C.da,'andNot'):this.value&&!a.valueOf()?olympe.C.da.D:olympe.C.da.j}or(a){if(void 0!==a)return olympe.C.hb(a)?olympe.C.ye([a],b=>new olympe.C.da(this.valueOf()||b.valueOf()),olympe.C.da,'or'):this.value||a.valueOf()?
372
372
  olympe.C.da.D:olympe.C.da.j}xor(a){return olympe.C.ua([this,a],(b,c)=>{b=b.valueOf();c=c.valueOf();return olympe.C.Sb(b&&!c||!b&&c)},olympe.C.da,'OBoolean.xor')}Wx(){return this.value}Ss(){return!0===this.value?olympe.C.aa.ONE:olympe.C.aa.ZERO}Wc(){return olympe.C.xb(this.toString())}toString(){return this.value?'true':'false'}valueOf(){return this.value}};olympe.C.da.D=new olympe.C.da(!0);olympe.C.da.j=new olympe.C.da(!1);m=olympe.C.da.prototype;m.toJSON.K=olympe.C.J.j;
@@ -374,127 +374,127 @@ m.and.K=new olympe.C.J(()=>olympe.C.da,[0]);m.Fa.K=olympe.C.J.j;m.Kd.K=new olymp
374
374
  olympe.C.eb=class{constructor(a){this.sb=a}toJSON(){return'{ "type": "dateTime", "value": "'+this.sb.toJSON()+'" }'}static Qb(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.C.eb(new Date(b.value.valueOf()))}static now(){return new olympe.C.eb(new Date)}jq(){return this.sb&&!isNaN(this.sb.getTime())?olympe.C.da.D:olympe.C.da.j}Ju(){return olympe.C.ra(this.sb.getMilliseconds())}Lu(){return olympe.C.ra(this.sb.getSeconds())}Ku(){return olympe.C.ra(this.sb.getMinutes())}Iu(){return olympe.C.ra(this.sb.getHours())}my(){return olympe.C.ra(this.sb.getDate())}getMonth(){return olympe.C.ra(this.sb.getMonth()+1)}Mu(){return olympe.C.ra(this.sb.getFullYear())}getTime(){return this.sb.getTime()}eA(){var a=
375
375
  olympe.C,b=a.xb;var c=this.sb.getDate();c=10>c?'0'+c:c;var d=this.sb.getMonth()+1;return b.call(a,`${c}.${10>d?'0'+d:d}.${this.sb.getFullYear()}`)}toLocaleString(a){return void 0===a||'string'===typeof a?olympe.C.xb(this.sb.toLocaleString(a)):olympe.C.ua([this,a],(b,c)=>olympe.C.xb(b.sb.toLocaleString(c.valueOf())),olympe.C.Ta)}toLocaleDateString(a){return void 0===a||'string'===typeof a?olympe.C.xb(this.sb.toLocaleDateString(a)):olympe.C.ua([this,a],(b,c)=>olympe.C.xb(b.sb.toLocaleDateString(c.valueOf())),
376
376
  olympe.C.Ta)}toLocaleTimeString(a){return void 0===a||'string'===typeof a?olympe.C.xb(this.sb.toLocaleTimeString(a)):olympe.C.ua([this,a],(b,c)=>olympe.C.xb(b.sb.toLocaleTimeString(c.valueOf())),olympe.C.Ta)}Wc(){return olympe.C.xb(this.sb.toISOString())}iA(){return new Date(this.getTime())}kA(){return this}mA(){return this}qg(a,b){return olympe.C.ua([b],c=>{const d=new olympe.C.eb(new Date(this.sb.getTime()));d.sb['set'+a](this.sb['get'+a]()+c.valueOf());return d},olympe.C.eb)}ax(a){return this.qg('Milliseconds',
377
- a)}ix(a){return this.qg('Seconds',a)}bx(a){return this.qg('Minutes',a)}$w(a){return this.qg('Hours',a)}kn(a){return this.qg('Date',a)}jx(a){return'number'===typeof a?this.kn(7*a):this.kn(a.rl(7))}ex(a){return this.qg('Month',a)}kx(a){return this.qg('FullYear',a)}fA(){let a=this.sb.getDay();a=0===a?6:a-1;return new olympe.C.eb(new Date(this.sb.getFullYear(),this.sb.getMonth(),this.sb.getDate()-a))}gA(){return new olympe.C.eb(new Date(this.sb.getFullYear(),this.sb.getMonth()))}Kd(a){return olympe.C.ua([a],
377
+ a)}ix(a){return this.qg('Seconds',a)}bx(a){return this.qg('Minutes',a)}$w(a){return this.qg('Hours',a)}ln(a){return this.qg('Date',a)}jx(a){return'number'===typeof a?this.ln(7*a):this.ln(a.rl(7))}ex(a){return this.qg('Month',a)}kx(a){return this.qg('FullYear',a)}fA(){let a=this.sb.getDay();a=0===a?6:a-1;return new olympe.C.eb(new Date(this.sb.getFullYear(),this.sb.getMonth(),this.sb.getDate()-a))}gA(){return new olympe.C.eb(new Date(this.sb.getFullYear(),this.sb.getMonth()))}Kd(a){return olympe.C.ua([a],
378
378
  b=>olympe.C.Sb(this.Fa(b)),olympe.C.da)}Fa(a){return a instanceof olympe.C.eb?this.getTime()===a.getTime()||isNaN(this.getTime())&&isNaN(a.getTime()):!1}zy(){let a=this.sb.getDay();0===a&&(a=7);return olympe.C.ra(a)}qy(a,b){return olympe.C.ua([a,b],(c,d)=>{d=d.valueOf();'years'===d?c=this.sb.getFullYear()-c.sb.getFullYear():'months'===d?c=12*(this.sb.getFullYear()-c.sb.getFullYear())+(this.sb.getMonth()-c.sb.getMonth()):(d={milliseconds:1,seconds:1E3,minutes:6E4,hours:36E5,days:864E5,weeks:6048E5}[d],
379
379
  void 0===d&&(olympe.ia.Ya('df').warn("[getDiff] '_unit' is not a valid unit! Defaulting to milliseconds"),d=1),c=Math.trunc((this.sb.getTime()-c.sb.getTime())/d));return olympe.C.ra(c)},olympe.C.aa)}gz(a){return olympe.C.ua([a],b=>olympe.C.Sb(this.getTime()<b.getTime()),olympe.C.da)}ez(a){return olympe.C.ua([a],b=>olympe.C.Sb(this.getTime()>b.getTime()),olympe.C.da)}hz(a,b){return olympe.C.ua([a,b],(c,d)=>olympe.C.Sb(this.getTime()>c.getTime()&&this.getTime()<d.getTime()),olympe.C.da)}valueOf(){return this.jq().valueOf()?
380
380
  new Date(this.getTime()):new Date(0)}};olympe.C.eb.j=oc(0);olympe.C.eb.D=oc(Number.NaN);m=olympe.C.eb.prototype;m.jq.K=olympe.C.J.N;m.Ju.K=olympe.C.J.F;m.Lu.K=olympe.C.J.F;m.Ku.K=olympe.C.J.F;m.Iu.K=olympe.C.J.F;m.my.K=olympe.C.J.F;m.getMonth.K=olympe.C.J.F;m.Mu.K=olympe.C.J.F;m.getTime.K=olympe.C.J.j;m.eA.K=new olympe.C.J(()=>olympe.C.Ta,[0]);m.toLocaleString.K=olympe.C.J.D;m.toLocaleDateString.K=olympe.C.J.D;m.toLocaleTimeString.K=olympe.C.J.D;m.Wc.K=olympe.C.J.D;m.iA.K=olympe.C.J.j;
381
- m.kA.K=new olympe.C.J(()=>olympe.C.eb,[]);m.mA.K=new olympe.C.J(()=>olympe.C.eb,[]);m.qg.K=new olympe.C.J(()=>olympe.C.eb,[]);m.ax.K=new olympe.C.J(()=>olympe.C.eb,[]);m.ix.K=new olympe.C.J(()=>olympe.C.eb,[]);m.bx.K=new olympe.C.J(()=>olympe.C.eb,[]);m.$w.K=new olympe.C.J(()=>olympe.C.eb,[]);m.kn.K=new olympe.C.J(()=>olympe.C.eb,[0]);m.jx.K=new olympe.C.J(()=>olympe.C.eb,[]);m.ex.K=new olympe.C.J(()=>olympe.C.eb,[]);m.kx.K=new olympe.C.J(()=>olympe.C.eb,[0]);
381
+ m.kA.K=new olympe.C.J(()=>olympe.C.eb,[]);m.mA.K=new olympe.C.J(()=>olympe.C.eb,[]);m.qg.K=new olympe.C.J(()=>olympe.C.eb,[]);m.ax.K=new olympe.C.J(()=>olympe.C.eb,[]);m.ix.K=new olympe.C.J(()=>olympe.C.eb,[]);m.bx.K=new olympe.C.J(()=>olympe.C.eb,[]);m.$w.K=new olympe.C.J(()=>olympe.C.eb,[]);m.ln.K=new olympe.C.J(()=>olympe.C.eb,[0]);m.jx.K=new olympe.C.J(()=>olympe.C.eb,[]);m.ex.K=new olympe.C.J(()=>olympe.C.eb,[]);m.kx.K=new olympe.C.J(()=>olympe.C.eb,[0]);
382
382
  m.fA.K=new olympe.C.J(()=>olympe.C.eb,[]);m.gA.K=new olympe.C.J(()=>olympe.C.eb,[]);m.Kd.K=olympe.C.J.N;m.Fa.K=olympe.C.J.j;m.zy.K=olympe.C.J.F;m.qy.K=new olympe.C.J(()=>olympe.C.aa,[0,1]);m.gz.K=new olympe.C.J(()=>olympe.C.da,[0]);m.ez.K=new olympe.C.J(()=>olympe.C.da,[0]);m.hz.K=new olympe.C.J(()=>olympe.C.da,[0,1]);m.valueOf.K=olympe.C.J.j;const pc=new Map,qc=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,rc=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i;function sc(a){const b=c=>{let d;c=c.valueOf();6>c.length?(d=17,c=rc.exec(c)):(d=1,c=qc.exec(c));c=c?c.slice(1).map(e=>parseInt(e,16)*d):[0,0,0];return olympe.C.Color.create(c[0],c[1],c[2],isNaN(c[3])?1:c[3]/255)};return olympe.C.qf(a)?olympe.C.ye([a],b,olympe.C.Color):b(a)}
383
383
  olympe.C.Color=class{constructor(a,b,c,d){this.j=olympe.C.ra(void 0!==a?Math.min(255,Math.max(0,Math.round(a))):0);this.D=olympe.C.ra(void 0!==b?Math.min(255,Math.max(0,Math.round(b))):0);this.b=olympe.C.ra(void 0!==c?Math.min(255,Math.max(0,Math.round(c))):0);this.a=olympe.C.ra(void 0!==d?Math.min(1,Math.max(0,d)):1)}toJSON(){return{r:this.j.valueOf(),g:this.D.valueOf(),b:this.b.valueOf(),a:this.a.valueOf()}}static Qb(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return olympe.C.Color.create(b.r,
384
384
  b.g,b.b,b.a)}static create(a,b,c,d=1){return olympe.C.ua([a,b,c,d],(e,f,g,h)=>{e=olympe.C.ra(void 0!==e?Math.min(255,Math.max(0,Math.round(e.valueOf()))):0);f=olympe.C.ra(void 0!==f?Math.min(255,Math.max(0,Math.round(f.valueOf()))):0);g=olympe.C.ra(void 0!==g?Math.min(255,Math.max(0,Math.round(g.valueOf()))):0);h=olympe.C.ra(void 0!==h?Math.min(1,Math.max(0,h.valueOf())):1);for(let k of pc.values())if(k&&k.j.Fa(e)&&k.D.Fa(f)&&k.b.Fa(g)&&k.a.Fa(h))return k;return new olympe.C.Color(e,f,g,h)},olympe.C.Color)}ph(){return this.j}ih(){return this.b}mh(){return this.D}hh(){return this.a}px(a,
385
- b){return olympe.C.Color.create(this.j.Ij(a.ph(),b),this.D.Ij(a.mh(),b),this.b.Ij(a.ih(),b),this.a.Ij(a.hh(),b))}Px(a){return olympe.C.Color.create(this.j,this.D,this.b,a)}wt(){return`rgba(${this.j},${this.D},${this.b},${this.a})`}bo(){const a=(16777216|this.b|this.D<<8|this.j<<16).toString(16).slice(1),b=1===this.a.valueOf()?'':(256|255*this.a).toString(16).slice(1);return'#'+(a+b).toUpperCase()}toString(){return this.bo()}Fa(a){return a instanceof olympe.C.Color?this.j.valueOf()===a.j.valueOf()&&
386
- this.D.valueOf()===a.D.valueOf()&&this.b.valueOf()===a.b.valueOf()&&this.a.valueOf()===a.a.valueOf():!1}compare(a){const b=(this.ph().valueOf()<<16|this.mh().valueOf()<<8|this.ih().valueOf())-(a.ph().valueOf()<<16|a.mh().valueOf()<<8|a.ih().valueOf());return 0===b?this.hh().valueOf()-a.hh().valueOf():b}};olympe.C.Color.prototype.equals=olympe.C.Color.prototype.Fa;olympe.C.Color.prototype.toHexString=olympe.C.Color.prototype.bo;olympe.C.Color.prototype.toRGBString=olympe.C.Color.prototype.wt;
385
+ b){return olympe.C.Color.create(this.j.Ij(a.ph(),b),this.D.Ij(a.mh(),b),this.b.Ij(a.ih(),b),this.a.Ij(a.hh(),b))}Px(a){return olympe.C.Color.create(this.j,this.D,this.b,a)}wt(){return`rgba(${this.j},${this.D},${this.b},${this.a})`}co(){const a=(16777216|this.b|this.D<<8|this.j<<16).toString(16).slice(1),b=1===this.a.valueOf()?'':(256|255*this.a).toString(16).slice(1);return'#'+(a+b).toUpperCase()}toString(){return this.co()}Fa(a){return a instanceof olympe.C.Color?this.j.valueOf()===a.j.valueOf()&&
386
+ this.D.valueOf()===a.D.valueOf()&&this.b.valueOf()===a.b.valueOf()&&this.a.valueOf()===a.a.valueOf():!1}compare(a){const b=(this.ph().valueOf()<<16|this.mh().valueOf()<<8|this.ih().valueOf())-(a.ph().valueOf()<<16|a.mh().valueOf()<<8|a.ih().valueOf());return 0===b?this.hh().valueOf()-a.hh().valueOf():b}};olympe.C.Color.prototype.equals=olympe.C.Color.prototype.Fa;olympe.C.Color.prototype.toHexString=olympe.C.Color.prototype.co;olympe.C.Color.prototype.toRGBString=olympe.C.Color.prototype.wt;
387
387
  olympe.C.Color.prototype.getAlpha=olympe.C.Color.prototype.hh;olympe.C.Color.prototype.getGreen=olympe.C.Color.prototype.mh;olympe.C.Color.prototype.getBlue=olympe.C.Color.prototype.ih;olympe.C.Color.prototype.getRed=olympe.C.Color.prototype.ph;olympe.C.Color.create=olympe.C.Color.create;m=olympe.C.Color.prototype;m.toJSON.K=olympe.C.J.j;m.ph.K=olympe.C.J.F;m.ih.K=olympe.C.J.F;m.mh.K=olympe.C.J.F;m.hh.K=olympe.C.J.F;m.px.K=new olympe.C.J(()=>olympe.C.Color,[]);
388
- m.Px.K=new olympe.C.J(()=>olympe.C.Color,[]);m.wt.K=new olympe.C.J(()=>String,[]);m.bo.K=new olympe.C.J(()=>String,[]);m.Fa.K=olympe.C.J.j;m.compare.K=olympe.C.J.j;olympe.C.File=class{la(){}kq(){}lq(){}Rs(){}gl(){}Bn(){}hl(){}rename(){}};olympe.C.Zb=class{constructor(a,b){this.x=olympe.C.ge(a);this.y=olympe.C.ge(b)}toJSON(){return'{ "type": "vector2", "x": '+JSON.stringify(olympe.C.Qa(this.x).valueOf())+', "y": '+JSON.stringify(olympe.C.Qa(this.y).valueOf())+' }'}static Qb(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.C.Zb(b.x,b.y)}Nu(){return this.x}cA(a){lc(this.x,a)}Ou(){return this.y}dA(a){lc(this.y,a)}Sy(){return this.x.ot(this.y)}he(a){return olympe.C.ua([this,a],(b,c)=>new olympe.C.Zb(b.x.he(c.x),b.y.he(c.y)),
388
+ m.Px.K=new olympe.C.J(()=>olympe.C.Color,[]);m.wt.K=new olympe.C.J(()=>String,[]);m.co.K=new olympe.C.J(()=>String,[]);m.Fa.K=olympe.C.J.j;m.compare.K=olympe.C.J.j;olympe.C.File=class{la(){}kq(){}lq(){}Rs(){}gl(){}Cn(){}hl(){}rename(){}};olympe.C.Zb=class{constructor(a,b){this.x=olympe.C.ge(a);this.y=olympe.C.ge(b)}toJSON(){return'{ "type": "vector2", "x": '+JSON.stringify(olympe.C.Qa(this.x).valueOf())+', "y": '+JSON.stringify(olympe.C.Qa(this.y).valueOf())+' }'}static Qb(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.C.Zb(b.x,b.y)}Nu(){return this.x}cA(a){lc(this.x,a)}Ou(){return this.y}dA(a){lc(this.y,a)}Sy(){return this.x.ot(this.y)}he(a){return olympe.C.ua([this,a],(b,c)=>new olympe.C.Zb(b.x.he(c.x),b.y.he(c.y)),
389
389
  olympe.C.Zb,'Vector2.plus')}vh(a){return olympe.C.ua([this,a],(b,c)=>new olympe.C.Zb(b.x.vh(c.x),b.y.vh(c.y)),olympe.C.Zb,'Vector2.minus')}xz(a){return new olympe.C.Zb(this.x.rl(a),this.y.rl(a))}Kx(a){return new olympe.C.Zb(this.x.vj(a),this.y.vj(a))}zz(){return new olympe.C.Zb(this.x.Pj(),this.y.Pj())}Lx(a){return olympe.C.ua([this,a],(b,c)=>olympe.C.ua([b.x,b.y,c.x,c.y],(d,e,f,g)=>olympe.C.ra(d*f+e*g),olympe.C.aa),olympe.C.aa)}length(){return olympe.C.ua([this.x,this.y],(a,b)=>olympe.C.ra(Math.sqrt(a*
390
390
  a+b*b)),olympe.C.aa)}normalize(){return olympe.C.ua([this.x,this.y],(a,b)=>{const c=Math.sqrt(a*a+b*b);return new olympe.C.Zb(a/c,b/c)},olympe.C.Zb)}floor(){return olympe.C.ua([this.x,this.y],(a,b)=>new olympe.C.Zb(Math.floor(a),Math.floor(b)),olympe.C.Zb)}ceil(){return olympe.C.ua([this.x,this.y],(a,b)=>new olympe.C.Zb(Math.ceil(a),Math.ceil(b)),olympe.C.Zb)}round(){return olympe.C.ua([this.x,this.y],(a,b)=>new olympe.C.Zb(Math.round(a),Math.round(b)),olympe.C.Zb)}gx(a){return new olympe.C.Zb(this.x.he(a),
391
391
  this.y.he(a))}hx(a,b){return new olympe.C.Zb(this.x.he(a),this.y.he(b))}Wc(){return olympe.C.ua([this.x,this.y],(a,b)=>olympe.C.xb(`Vector2[${a.valueOf()}, ${b.valueOf()}]`),olympe.C.Ta)}toString(){return`Vector2[${this.x.Ca.Fb}, ${this.y.Ca.Fb}]`}Fa(a){return this===a?!0:!1}};m=olympe.C.Zb.prototype;m.toJSON.K=olympe.C.J.j;m.Nu.K=olympe.C.J.F;m.cA.K=olympe.C.J.j;m.Ou.K=olympe.C.J.F;m.dA.K=olympe.C.J.j;m.Sy.K=olympe.C.J.F;m.he.K=new olympe.C.J(()=>olympe.C.Zb,[0]);
392
392
  m.vh.K=new olympe.C.J(()=>olympe.C.Zb,[0]);m.xz.K=olympe.C.J.R;m.Kx.K=olympe.C.J.R;m.zz.K=olympe.C.J.R;m.Lx.K=new olympe.C.J(()=>olympe.C.aa,[0]);m.length.K=olympe.C.J.F;m.normalize.K=olympe.C.J.R;m.floor.K=olympe.C.J.R;m.ceil.K=olympe.C.J.R;m.round.K=olympe.C.J.R;m.gx.K=olympe.C.J.R;m.hx.K=olympe.C.J.R;m.Wc.K=olympe.C.J.D;m.toString.K=olympe.C.J.j;m.Fa.K=olympe.C.J.j;olympe.C.Jg=class{constructor(){}Nb(){}Rd(){}get(){}ri(){}has(){}sh(){}Ic(){}Sf(){}Cf(){}xg(){}forEach(){}pe(){}};olympe.C.Jg.prototype.forEachCurrentValue=olympe.C.Jg.prototype.pe;olympe.C.Jg.prototype.forEach=olympe.C.Jg.prototype.forEach;m=olympe.C.Jg.prototype;m.has.K=olympe.C.J.N;m.sh.K=olympe.C.J.j;m.Ic.K=new olympe.C.J(()=>Object,[]);m.Sf.K=new olympe.C.J(()=>String,[]);m.Cf.K=olympe.C.J.F;m.xg.K=olympe.C.J.j;m.forEach.K=new olympe.C.J(()=>{},[]);m.pe.K=olympe.C.J.j;olympe.C.vd=class extends olympe.C.Jg{Id(){}Rf(){}nf(){}Qf(){}qe(){}mf(){}wj(){}ti(){}};olympe.C.vd.prototype.getCurrentAt=olympe.C.vd.prototype.mf;olympe.C.vd.prototype.getAt=olympe.C.vd.prototype.qe;olympe.C.vd.prototype.getCurrentKeyAt=olympe.C.vd.prototype.Qf;olympe.C.vd.prototype.getKeyAt=olympe.C.vd.prototype.nf;olympe.C.vd.prototype.getCurrentRank=olympe.C.vd.prototype.Rf;olympe.C.vd.prototype.getRank=olympe.C.vd.prototype.Id;m=olympe.C.vd.prototype;m.Id.K=olympe.C.J.F;m.Rf.K=olympe.C.J.j;
393
393
  m.nf.K=new olympe.C.J(()=>String,[]);m.Qf.K=olympe.C.J.j;m.qe.K=new olympe.C.J(()=>Object,[]);m.mf.K=olympe.C.J.j;m.wj.K=olympe.C.J.j;m.ti.K=new olympe.C.J(()=>Array,[]);olympe.C.Ci=class{constructor(a,b){this.H=b||olympe.C.$a();this.valueType=a||Object;this.values={};this.Wa=this.ja=null;this.Pe=0;this.R=Object.create(null);this.mb=Object.create(null);this.size=0;this.F=null;this.H.onDestroy(()=>{const c=this.R;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()}}})}getContext(){return this.H}Nb(){return this.valueType}Rd(a){this.valueType=a;const b=this.ja;if(null!==b)for(const c in b)Object.prototype.hasOwnProperty.call(b,
394
394
  c)&&hc(b[c],a)}get(a){const b=c=>{null===this.ja&&(this.ja={});return this.Bj(this.ja,c,this.values[c],this.valueType,'Map.get('+c+')')};return olympe.C.ua([a],c=>b(c),this.valueType)}ri(a){a=this.values[a];return olympe.C.hb(a)?Tb(a.Ca)?a.Ca.Fb:void 0:a}has(a){const b=c=>{null===this.Wa&&(this.Wa={});return this.Bj(this.Wa,c,c in this.values?olympe.C.da.D:olympe.C.da.j,olympe.C.da,'Map.has('+c+')')};return olympe.C.ua([a],c=>b(c),olympe.C.da)}sh(a){return a in this.values}Bj(a,b,c,d,e){let f=a[b];
395
- f||this.H.run(()=>{f=olympe.C.Xd(d,void 0,e);a[b]=f;f.Ca.onDestroy(()=>delete a[b]);olympe.C.hb(c)?kc(f,c):ic(f,c)});return f}Ic(){throw Error('Abstract method getFirstKey needs to be overridden');}Sf(){throw Error('Abstract method getFirstKey needs to be overridden');}Cf(){null===this.F&&this.H.run(()=>{this.F=olympe.C.Xd(olympe.C.aa,olympe.C.ra(this.size));this.F.Ca.onDestroy(()=>{this.F=null})});return this.F}xg(){return this.size}forEach(a,b){const c=this.fn();a=this.us(c,a,b);this.en(c,a)}fn(){return String(++this.Pe)}en(a,
396
- b){this.mb[a]=b;olympe.C.$a().Yd(()=>{const c=this.R;for(const d in c)Object.prototype.hasOwnProperty.call(c,d)&&delete c[d][a];delete this.mb[a]});this.pe(b)}us(a,b,c){const d=olympe.C.$a();return(e,f)=>{d.run(()=>{const g=olympe.C.createNode(void 0,b,null,[e,f,this],null,`forEach-${a}-${f}`);if(void 0!==c)g.onDestroy(()=>{c(f)});this.jn(a,f,g)})}}jn(a,b,c){void 0===this.R[b]&&(this.R[b]={});this.R[b][a]=c}pe(a){const b=this.values;for(const c in b)if(Object.prototype.hasOwnProperty.call(b,c)&&!1===
395
+ f||this.H.run(()=>{f=olympe.C.Xd(d,void 0,e);a[b]=f;f.Ca.onDestroy(()=>delete a[b]);olympe.C.hb(c)?kc(f,c):ic(f,c)});return f}Ic(){throw Error('Abstract method getFirstKey needs to be overridden');}Sf(){throw Error('Abstract method getFirstKey needs to be overridden');}Cf(){null===this.F&&this.H.run(()=>{this.F=olympe.C.Xd(olympe.C.aa,olympe.C.ra(this.size));this.F.Ca.onDestroy(()=>{this.F=null})});return this.F}xg(){return this.size}forEach(a,b){const c=this.gn();a=this.us(c,a,b);this.fn(c,a)}gn(){return String(++this.Pe)}fn(a,
396
+ b){this.mb[a]=b;olympe.C.$a().Yd(()=>{const c=this.R;for(const d in c)Object.prototype.hasOwnProperty.call(c,d)&&delete c[d][a];delete this.mb[a]});this.pe(b)}us(a,b,c){const d=olympe.C.$a();return(e,f)=>{d.run(()=>{const g=olympe.C.createNode(void 0,b,null,[e,f,this],null,`forEach-${a}-${f}`);if(void 0!==c)g.onDestroy(()=>{c(f)});this.kn(a,f,g)})}}kn(a,b,c){void 0===this.R[b]&&(this.R[b]={});this.R[b][a]=c}pe(a){const b=this.values;for(const c in b)if(Object.prototype.hasOwnProperty.call(b,c)&&!1===
397
397
  a(b[c],c,this))break}al(a,b){void 0!==this.values[a]&&this.pj(a,!0);this.values[a]=b;var c=this.ja;null!==c&&void 0!==c[a]&&(b&&b instanceof olympe.C.Proxy?kc(c[a],b):ic(c[a],b));c=this.Wa;null!==c&&void 0!==c[a]&&lc(c[a],!0);this.size++;c=this.mb;for(const d in c)if(Object.prototype.hasOwnProperty.call(c,d))c[d](b,a,this)}pj(a,b){const c=this.values;if(Object.prototype.hasOwnProperty.call(c,a)){var d=(d=c[a])&&d.gh?d.Ca.Fb:d;var e=this.ja;null!==e&&void 0!==e[a]&&jc(e[a]);e=this.Wa;null!==e&&void 0!==
398
398
  e[a]&&lc(e[a],!1);delete c[a];this.size--;b||this.Nf()}a=this.R[a];if(void 0!==a)for(const f in a)Object.prototype.hasOwnProperty.call(a,f)&&a[f].destroy();return d}Nf(){null!==this.F&&lc(this.F,this.size)}gi(){var a=this.ja;if(null!==a)for(const c in a)Object.prototype.hasOwnProperty.call(a,c)&&jc(a[c]);a=this.Wa;if(null!==a)for(var b in a)Object.prototype.hasOwnProperty.call(a,b)&&lc(a[b],!1);for(const c in this.values)Object.prototype.hasOwnProperty.call(this.values,c)&&delete this.values[c];for(const c in this.R)if(Object.prototype.hasOwnProperty.call(this.R,
399
399
  c)){b=this.R[c];for(const d in b)Object.prototype.hasOwnProperty.call(b,d)&&b[d].destroy()}this.size=0;null!==this.F&&lc(this.F,this.size)}Mg(){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.C.Ci.za=[olympe.C.Jg];m=olympe.C.Ci.prototype;m.getContext.K=olympe.C.J.j;m.Nb.K=olympe.C.J.j;m.Rd.K=olympe.C.J.j;m.get.K=new olympe.C.J(()=>Object,[],'valueType');m.ri.K=olympe.C.J.j;m.has.K=olympe.C.J.N;m.sh.K=olympe.C.J.j;m.Bj.K=olympe.C.J.j;
400
- m.Cf.K=olympe.C.J.F;m.xg.K=olympe.C.J.j;m.forEach.K=new olympe.C.J(()=>{},[]);m.fn.K=olympe.C.J.j;m.en.K=olympe.C.J.j;m.us.K=olympe.C.J.j;m.jn.K=olympe.C.J.j;m.pe.K=olympe.C.J.j;m.al.K=olympe.C.J.j;m.pj.K=olympe.C.J.j;m.Nf.K=olympe.C.J.j;m.gi.K=olympe.C.J.j;m.Mg.K=olympe.C.J.j;olympe.C.Tj=class extends olympe.C.Ci{constructor(a,b){super(a,b);this.D=Object.create(null);this.j=[];this.ea=this.ta=this.Ha=this.$=null}Rd(a){super.Rd(a);if(null!==this.ea)for(let b of this.ea.values())hc(b,a)}Ic(){return this.qe(0)}Sf(){return this.nf(0)}Id(a){const b=c=>{null===this.Ha&&(this.Ha=Object.create(null));let d=this.Rf(a);d=void 0!==d?olympe.C.ra(d):void 0;return this.Bj(this.Ha,c,d,olympe.C.aa,`List.getRank(${c})`)};return olympe.C.hb(a)?M(olympe.C.createNode(olympe.C.aa,b,null,[a.Ca],
400
+ m.Cf.K=olympe.C.J.F;m.xg.K=olympe.C.J.j;m.forEach.K=new olympe.C.J(()=>{},[]);m.gn.K=olympe.C.J.j;m.fn.K=olympe.C.J.j;m.us.K=olympe.C.J.j;m.kn.K=olympe.C.J.j;m.pe.K=olympe.C.J.j;m.al.K=olympe.C.J.j;m.pj.K=olympe.C.J.j;m.Nf.K=olympe.C.J.j;m.gi.K=olympe.C.J.j;m.Mg.K=olympe.C.J.j;olympe.C.Tj=class extends olympe.C.Ci{constructor(a,b){super(a,b);this.D=Object.create(null);this.j=[];this.ea=this.ta=this.Ha=this.$=null}Rd(a){super.Rd(a);if(null!==this.ea)for(let b of this.ea.values())hc(b,a)}Ic(){return this.qe(0)}Sf(){return this.nf(0)}Id(a){const b=c=>{null===this.Ha&&(this.Ha=Object.create(null));let d=this.Rf(a);d=void 0!==d?olympe.C.ra(d):void 0;return this.Bj(this.Ha,c,d,olympe.C.aa,`List.getRank(${c})`)};return olympe.C.hb(a)?M(olympe.C.createNode(olympe.C.aa,b,null,[a.Ca],
401
401
  [0],'onResolved('+(b.name||'')+')')):b(a)}Rf(a){return this.D[a]}nf(a){const b=c=>{const d=c.valueOf(),e=this.Qf(d);null===this.ta&&(this.ta=Object.create(null));return this.Bj(this.ta,String(d),e,String,'List.getKeyAt('+c+')')};return olympe.C.ua([a],c=>b(c),String)}Qf(a){return this.j[a.valueOf()]}qe(a){if(olympe.C.hb(a))return this.get(olympe.C.ua([a],c=>{c=this.nf(c);if(!Tb(c.Ca)){const d=olympe.C.$a();olympe.C.Vf(d)&&cc(d)}return c},String));null===this.ea&&(this.ea=new Map);let b=this.ea.get(a);
402
- b||this.H.run(()=>{b=this.get(this.nf(a));this.ea.set(a,b);b.Ca.onDestroy(()=>this.ea.delete(a))});return b}mf(a){return this.ri(this.Qf(a))}wj(a,b,c,d){let e=this.fn();a=this.ft(e,a,b,c,d);this.en(e,a)}ft(a,b,c,d,e){return olympe.C.$a().tc((f,g)=>{let h=!1,k=olympe.C.Ai([b,c,this.Id(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.jn(a,g,k)})}ti(){null===this.$&&this.H.run(()=>{this.$=olympe.C.Xd(Array,this.j.filter(a=>void 0!==a));this.$.Ca.onDestroy(()=>
403
- {this.F=null})});return this.$}pe(a){if(this.j.length!==this.size)super.pe(a);else{var b=this.values;for(let c of this.j.filter(d=>void 0!==d))if(Object.prototype.hasOwnProperty.call(b,c)&&!1===a(b[c],c,this))break}}hn(a,b){const c=this.Ha,d=this.ta,e=this.D[a],f=b.valueOf();if(e!==f||this.j[e]!==a){var g=this.j[f];void 0!==g&&delete this.D[g];void 0!==e&&null!==e&&this.j[e]===a&&(this.j[e]=void 0);this.D[a]=f;this.j[f]=a;null!==c&&(void 0!==g&&void 0!==c[g]&&jc(c[g]),void 0!==c[a]&&ic(c[a],olympe.C.ra(f)));
404
- null!==d&&(void 0!==e&&null!==e&&void 0!==d[e]&&jc(d[e]),void 0!==d[b]&&ic(d[b],a))}}gn(a){var b=this.ta,c=this.D[a];null!==c&&void 0!==c&&null!==b&&(b=b[c],void 0!==b&&b.Ca.Fb===a&&jc(b));delete this.D[a];this.j.splice(c,1);c=this.Ha;null!==c&&void 0!==c[a]&&jc(c[a])}vs(){if(null!==this.$){const a=this.j,b=this.$.Ca.Fb;b&&a.join(',')!==b.join(',')&&ic(this.$,a)}}Nf(){this.vs();super.Nf()}gi(){var a=this.D;for(b in a)delete a[b];this.j.length=0;a=this.Ha;if(null!==a)for(b in a)jc(a[b]);a=this.ta;
402
+ b||this.H.run(()=>{b=this.get(this.nf(a));this.ea.set(a,b);b.Ca.onDestroy(()=>this.ea.delete(a))});return b}mf(a){return this.ri(this.Qf(a))}wj(a,b,c,d){let e=this.gn();a=this.ft(e,a,b,c,d);this.fn(e,a)}ft(a,b,c,d,e){return olympe.C.$a().tc((f,g)=>{let h=!1,k=olympe.C.Ai([b,c,this.Id(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.kn(a,g,k)})}ti(){null===this.$&&this.H.run(()=>{this.$=olympe.C.Xd(Array,this.j.filter(a=>void 0!==a));this.$.Ca.onDestroy(()=>
403
+ {this.F=null})});return this.$}pe(a){if(this.j.length!==this.size)super.pe(a);else{var b=this.values;for(let c of this.j.filter(d=>void 0!==d))if(Object.prototype.hasOwnProperty.call(b,c)&&!1===a(b[c],c,this))break}}jn(a,b){const c=this.Ha,d=this.ta,e=this.D[a],f=b.valueOf();if(e!==f||this.j[e]!==a){var g=this.j[f];void 0!==g&&delete this.D[g];void 0!==e&&null!==e&&this.j[e]===a&&(this.j[e]=void 0);this.D[a]=f;this.j[f]=a;null!==c&&(void 0!==g&&void 0!==c[g]&&jc(c[g]),void 0!==c[a]&&ic(c[a],olympe.C.ra(f)));
404
+ null!==d&&(void 0!==e&&null!==e&&void 0!==d[e]&&jc(d[e]),void 0!==d[b]&&ic(d[b],a))}}hn(a){var b=this.ta,c=this.D[a];null!==c&&void 0!==c&&null!==b&&(b=b[c],void 0!==b&&b.Ca.Fb===a&&jc(b));delete this.D[a];this.j.splice(c,1);c=this.Ha;null!==c&&void 0!==c[a]&&jc(c[a])}vs(){if(null!==this.$){const a=this.j,b=this.$.Ca.Fb;b&&a.join(',')!==b.join(',')&&ic(this.$,a)}}Nf(){this.vs();super.Nf()}gi(){var a=this.D;for(b in a)delete a[b];this.j.length=0;a=this.Ha;if(null!==a)for(b in a)jc(a[b]);a=this.ta;
405
405
  if(null!==a)for(b in a)jc(a[parseInt(b,10)]);var b=this.$;null!==b&&(ac(b.Ca),ic(b,this.j));return olympe.C.Ci.prototype.gi.call(this)}Mg(){const a=this.values,b=this.D;let c='[\n';for(let d in a)Object.prototype.hasOwnProperty.call(a,d)&&(c+=`${b[d]}. ${a[d]}\n`);return c+']'}};olympe.C.Tj.za=[olympe.C.vd];m=olympe.C.Tj.prototype;m.Rd.K=olympe.C.J.j;m.Ic.K=new olympe.C.J(()=>Object,[]);m.Sf.K=new olympe.C.J(()=>String,[]);m.Id.K=olympe.C.J.F;m.Rf.K=olympe.C.J.j;m.nf.K=new olympe.C.J(()=>String,[]);
406
- m.Qf.K=olympe.C.J.j;m.qe.K=new olympe.C.J(()=>Object,[]);m.mf.K=olympe.C.J.j;m.wj.K=new olympe.C.J(()=>{},[]);m.ft.K=olympe.C.J.j;m.ti.K=new olympe.C.J(()=>Array,[]);m.pe.K=olympe.C.J.j;m.hn.K=olympe.C.J.j;m.gn.K=olympe.C.J.j;m.vs.K=olympe.C.J.j;m.Nf.K=olympe.C.J.j;m.gi.K=olympe.C.J.j;m.Mg.K=olympe.C.J.j;olympe.C.Map=class extends olympe.C.Ci{constructor(a){a===olympe.C.Proxy&&(a=Object);super(a);this.j=this.D=null}Rd(a){a===olympe.C.Proxy&&(a=Object);null!==this.D&&hc(this.D,a);super.Rd(a)}Ic(){null===this.D&&this.vn();return this.D}Sf(){null===this.j&&this.vn();return this.j}vn(){this.getContext().run(()=>{this.D=olympe.C.Xd(this.Nb());this.j=olympe.C.Xd(String);this.Nj(this.yn())})}yn(){const a=this.values;let b,c;for(b in a)if(Object.prototype.hasOwnProperty.call(a,b)){c=b;break}return c}Nj(a){if(void 0!==
407
- a){const b=this.values[a];b&&b instanceof olympe.C.Proxy?kc(this.D,b):ic(this.D,b);ic(this.j,a)}else void 0!==this.D.Ca.Fb&&(jc(this.D),jc(this.j))}set(a,b){this.al(a,b);1===this.size&&null!==this.j&&this.Nj(a);this.Nf()}remove(a){const b=this.pj(a);null!==this.j&&this.j.Ca.Fb===a&&this.Nj(this.yn());return b}clear(){this.gi();null!==this.j&&this.Nj()}};m=olympe.C.Map.prototype;m.Rd.K=olympe.C.J.j;m.Ic.K=new olympe.C.J(()=>Object,[]);m.Sf.K=new olympe.C.J(()=>String,[]);m.vn.K=olympe.C.J.j;
408
- m.yn.K=olympe.C.J.j;m.Nj.K=olympe.C.J.j;m.set.K=olympe.C.J.j;m.remove.K=new olympe.C.J(()=>Object,[]);m.clear.K=olympe.C.J.j;olympe.C.Pg=class extends olympe.C.Tj{constructor(a){super(a)}set(a,b,c){this.al(a,b);void 0!==c&&olympe.C.Vc([c],d=>{this.hn(a,d)});this.Nf()}remove(a){this.gn(a);return this.pj(a)}clear(){this.gi()}};olympe.C.Pg.prototype.remove.K=olympe.C.J.j;olympe.C.Pg.prototype.clear.K=olympe.C.J.j;olympe.C.Gt=class extends olympe.C.lk{constructor(a,b){super(olympe.C.aa,'animatedFlowSource');this.duration=a;this.j=b||olympe.C.aa.kp.rq}tb(){return olympe.C.Bz(this.node,this.duration,this.j,void 0)}};let tc=null;olympe.C.G=void 0;olympe.C.Un=void 0;olympe.C.li=void 0;olympe.C.fi=new Map;olympe.C.fi.set(0,olympe.C.aa.ZERO);olympe.C.fi.set(1,olympe.C.aa.ONE);olympe.C.fi.set(2,olympe.C.aa.Jw);olympe.C.$k=new Map;olympe.C.$k.set('',olympe.C.Ta.EMPTY);olympe.C.$k.set(' ',olympe.C.Ta.uw);olympe.C.createNode=function(a,b,c,d,e,f,g,h){return new olympe.C.Node({valueType:a,Lc:b,Yf:c,Ln:d,debug:g,rg:e,ad:f,qj:h})};olympe.C.Vf=function(a){return a instanceof olympe.C.Node};
409
- olympe.C.Xd=function(a,b,c){a=olympe.C.createNode(a,void 0,void 0,void 0,void 0,c);olympe.C.Vf(b)?dc(a,b):olympe.C.hb(b)?dc(a,b.Ca):L(a,b);return M(a)};olympe.C.hb=function(a){return!(!a||!a.gh)};olympe.C.qf=function(a){return!(!a||!(a instanceof olympe.C.Node||a.gh))};olympe.C.Pn=function(a){return a instanceof olympe.C.Wb||a instanceof olympe.C.Dr||a instanceof olympe.C.Node};olympe.C.th=function(a){return a instanceof olympe.C.lk};
410
- olympe.C.Rn=function(a,b){if(void 0!==a){olympe.C.th(a)&&(a=a.tb().Ca);if(!olympe.C.qf(a))return b(a);var c=[];olympe.C.hb(a)?c.push(a.Ca):c.push(a);return olympe.C.createNode(void 0,b,null,c,[0],'onResolved')}};olympe.C.Qa=function(a,b){let c=a;olympe.C.hb(a)?c=a.Ca.Fb:olympe.C.Vf(a)?c=a.Fb:olympe.C.th(a)&&(c=a.tb().Ca.Fb);return void 0===c?b:c};
406
+ m.Qf.K=olympe.C.J.j;m.qe.K=new olympe.C.J(()=>Object,[]);m.mf.K=olympe.C.J.j;m.wj.K=new olympe.C.J(()=>{},[]);m.ft.K=olympe.C.J.j;m.ti.K=new olympe.C.J(()=>Array,[]);m.pe.K=olympe.C.J.j;m.jn.K=olympe.C.J.j;m.hn.K=olympe.C.J.j;m.vs.K=olympe.C.J.j;m.Nf.K=olympe.C.J.j;m.gi.K=olympe.C.J.j;m.Mg.K=olympe.C.J.j;olympe.C.Map=class extends olympe.C.Ci{constructor(a){a===olympe.C.Proxy&&(a=Object);super(a);this.j=this.D=null}Rd(a){a===olympe.C.Proxy&&(a=Object);null!==this.D&&hc(this.D,a);super.Rd(a)}Ic(){null===this.D&&this.wn();return this.D}Sf(){null===this.j&&this.wn();return this.j}wn(){this.getContext().run(()=>{this.D=olympe.C.Xd(this.Nb());this.j=olympe.C.Xd(String);this.Nj(this.zn())})}zn(){const a=this.values;let b,c;for(b in a)if(Object.prototype.hasOwnProperty.call(a,b)){c=b;break}return c}Nj(a){if(void 0!==
407
+ a){const b=this.values[a];b&&b instanceof olympe.C.Proxy?kc(this.D,b):ic(this.D,b);ic(this.j,a)}else void 0!==this.D.Ca.Fb&&(jc(this.D),jc(this.j))}set(a,b){this.al(a,b);1===this.size&&null!==this.j&&this.Nj(a);this.Nf()}remove(a){const b=this.pj(a);null!==this.j&&this.j.Ca.Fb===a&&this.Nj(this.zn());return b}clear(){this.gi();null!==this.j&&this.Nj()}};m=olympe.C.Map.prototype;m.Rd.K=olympe.C.J.j;m.Ic.K=new olympe.C.J(()=>Object,[]);m.Sf.K=new olympe.C.J(()=>String,[]);m.wn.K=olympe.C.J.j;
408
+ m.zn.K=olympe.C.J.j;m.Nj.K=olympe.C.J.j;m.set.K=olympe.C.J.j;m.remove.K=new olympe.C.J(()=>Object,[]);m.clear.K=olympe.C.J.j;olympe.C.Pg=class extends olympe.C.Tj{constructor(a){super(a)}set(a,b,c){this.al(a,b);void 0!==c&&olympe.C.Vc([c],d=>{this.jn(a,d)});this.Nf()}remove(a){this.hn(a);return this.pj(a)}clear(){this.gi()}};olympe.C.Pg.prototype.remove.K=olympe.C.J.j;olympe.C.Pg.prototype.clear.K=olympe.C.J.j;olympe.C.Gt=class extends olympe.C.lk{constructor(a,b){super(olympe.C.aa,'animatedFlowSource');this.duration=a;this.j=b||olympe.C.aa.lp.rq}tb(){return olympe.C.Bz(this.node,this.duration,this.j,void 0)}};let tc=null;olympe.C.G=void 0;olympe.C.Vn=void 0;olympe.C.li=void 0;olympe.C.fi=new Map;olympe.C.fi.set(0,olympe.C.aa.ZERO);olympe.C.fi.set(1,olympe.C.aa.ONE);olympe.C.fi.set(2,olympe.C.aa.Jw);olympe.C.$k=new Map;olympe.C.$k.set('',olympe.C.Ta.EMPTY);olympe.C.$k.set(' ',olympe.C.Ta.uw);olympe.C.createNode=function(a,b,c,d,e,f,g,h){return new olympe.C.Node({valueType:a,Lc:b,Yf:c,Mn:d,debug:g,rg:e,ad:f,qj:h})};olympe.C.Vf=function(a){return a instanceof olympe.C.Node};
409
+ olympe.C.Xd=function(a,b,c){a=olympe.C.createNode(a,void 0,void 0,void 0,void 0,c);olympe.C.Vf(b)?dc(a,b):olympe.C.hb(b)?dc(a,b.Ca):L(a,b);return M(a)};olympe.C.hb=function(a){return!(!a||!a.gh)};olympe.C.qf=function(a){return!(!a||!(a instanceof olympe.C.Node||a.gh))};olympe.C.Qn=function(a){return a instanceof olympe.C.Wb||a instanceof olympe.C.Dr||a instanceof olympe.C.Node};olympe.C.th=function(a){return a instanceof olympe.C.lk};
410
+ olympe.C.Sn=function(a,b){if(void 0!==a){olympe.C.th(a)&&(a=a.tb().Ca);if(!olympe.C.qf(a))return b(a);var c=[];olympe.C.hb(a)?c.push(a.Ca):c.push(a);return olympe.C.createNode(void 0,b,null,c,[0],'onResolved')}};olympe.C.Qa=function(a,b){let c=a;olympe.C.hb(a)?c=a.Ca.Fb:olympe.C.Vf(a)?c=a.Fb:olympe.C.th(a)&&(c=a.tb().Ca.Fb);return void 0===c?b:c};
411
411
  olympe.C.xh=function(a,b){let c;olympe.C.hb(a)?c=a.Ca:olympe.C.Vf(a)?c=a:olympe.C.th(a)&&(c=a.tb().Ca);c&&olympe.C.Vc([b],d=>{c.xh(d)},'setDefaultValue');return a};olympe.C.Ai=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.rs?(h=h.Ca,g.push(k)):h instanceof olympe.C.Node?g.push(k):olympe.C.th(h)&&(h=h.tb().Ca,g.push(k))),f[k]=h;return olympe.C.createNode(c,b,null,f,g,d||'syncNodes')};
412
412
  olympe.C.ye=function(a,b,c,d){return M(olympe.C.Ai(a,b,c,d||'syncProxies'))};const uc=a=>{for(const b of a)if(olympe.C.qf(b)||olympe.C.th(b))return!1;return!0};olympe.C.ua=function(a,b,c,d,e){if(uc(a))return b(...a);const f=olympe.C.Ai(a,b,c,d||'TransformFlows');e&&olympe.C.Vc([e],g=>{f.xh(g)},'setDefaultValue');return M(f)};olympe.C.Vc=function(a,b,c){uc(a)?b(...a):olympe.C.Ai(a,b,void 0,c||'processFlows')};
413
413
  olympe.C.QE=function(a,b,c){const d=olympe.C.Vf(a)?a.Nb():olympe.C.th(a)?a.tb().ei:a.ei,e=olympe.C.cc(d,c),f=olympe.V.Promise.uj(g=>{e.getContext().gb()||e.update(g)},b);olympe.C.Vc([a],g=>f(g).then());return e.tb()};olympe.C.jt=function(a,b){if(uc(a))b(...a);else{const c=olympe.C.$a();olympe.C.Ai(a,(...d)=>{olympe.C.$a().destroy();c.run(b,...d)},void 0,'processFlowsOnce')}};
414
- olympe.C.Sn=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.C.hb(g)?(g=g.Ca,f.push(h)):g instanceof olympe.C.Node?f.push(h):olympe.C.th(g)&&(g=g.tb().Ca,f.push(h))),e[h]=g;0!==f.length&&new olympe.C.Node({Lc:b,Ln:e,rg:f,Tz:!1,ad:c})};olympe.C.kt=function(a,b){const c=olympe.C.$a();olympe.C.Sn(a,(...d)=>{olympe.C.$a().destroy();c.run(b,...d)},'processFutureFlowsOnce')};olympe.C.OE=function(a,b,c){a=new olympe.C.lk(a,c);b(a);return a.tb()};
414
+ olympe.C.Tn=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.C.hb(g)?(g=g.Ca,f.push(h)):g instanceof olympe.C.Node?f.push(h):olympe.C.th(g)&&(g=g.tb().Ca,f.push(h))),e[h]=g;0!==f.length&&new olympe.C.Node({Lc:b,Mn:e,rg:f,Tz:!1,ad:c})};olympe.C.kt=function(a,b){const c=olympe.C.$a();olympe.C.Tn(a,(...d)=>{olympe.C.$a().destroy();c.run(b,...d)},'processFutureFlowsOnce')};olympe.C.OE=function(a,b,c){a=new olympe.C.lk(a,c);b(a);return a.tb()};
415
415
  olympe.C.cc=function(a,b='flowSource'){return new olympe.C.lk(a,b)};olympe.C.wF=function(a,b,c,d){const e=olympe.C.$a();olympe.C.Ai(a,(...f)=>{olympe.C.$a().destroy();e.run(b,...f)},c,d||'syncProxiesOnce')};olympe.C.Gj=function(a,b,c){olympe.C.ua([a],d=>d.valueOf()?b.apply(null,void 0):c&&c.apply(null,void 0),Object,'If')};olympe.C.aF=function(a,b,c='from observable'){const d=olympe.C.cc(b,c),e=a.subscribe(f=>d.update(f));d.getContext().onDestroy(()=>e.unsubscribe());return d.tb()};
416
416
  olympe.C.YE=function(a,b,...c){return a?a.run(b,...c):b(...c)};olympe.C.AF=function(a){return olympe.C.$a().tc(a)};olympe.C.VE=function(a,b,c){olympe.C.Mx(a?a.Ca:a,b,c)};
417
417
  olympe.C.Mx=function(a,b,c){if(a){var d=a.T();null===tc&&(tc={});if(tc[d])olympe.C.G.log(`Already started node #${d} dump`+(b?`: ${b}`:''));else{tc[d]=!0;var e=`Starting node #${d} dump`+(b?`: ${b}`:'');c?olympe.C.G.warn(e):olympe.C.G.log(e);var f=`#${d}`+(b?`: ${b}`:'')+':';c=olympe.C.createNode(null,g=>{void 0===g?olympe.C.G.log(f,'undefined'):null===g?olympe.C.G.log(f,'null'):olympe.C.G.log(f,String(g))},null,[a],[0],'DataFlowDump');a.onDestroy(()=>{olympe.C.G.log(`Node #${d} destroyed`+(b?`: ${b}`:
418
- ''))});c.onDestroy(()=>{delete tc[d]})}}else olympe.C.G.log('NOT starting node dump, node is '+String(a))};olympe.C.UE=function(){let a='',b=olympe.C.$a();for(;null!==b;)a+=b.Dn()+' --\x3e ',b=b.getParent();olympe.C.G.log(a)};
418
+ ''))});c.onDestroy(()=>{delete tc[d]})}}else olympe.C.G.log('NOT starting node dump, node is '+String(a))};olympe.C.UE=function(){let a='',b=olympe.C.$a();for(;null!==b;)a+=b.En()+' --\x3e ',b=b.getParent();olympe.C.G.log(a)};
419
419
  olympe.C.ra=function(a){if(void 0===a)return olympe.C.aa.ZERO;if(a instanceof olympe.C.aa)return a;a&&a.valueOf&&(a=a.valueOf());if('number'===typeof a){if(isNaN(a))return olympe.C.aa.yq;if(a===Math.PI)return olympe.C.aa.PI;if(Infinity===a)return olympe.C.aa.Cu;if(-Infinity===a)return olympe.C.aa.zv;if(isNaN(a))var b=!1;else b=parseFloat(a),b=(b|0)===b;return b&&-1<=a&&100>=a?(olympe.C.fi.has(a)||olympe.C.fi.set(a,new olympe.C.aa(a)),olympe.C.fi.get(a)):new olympe.C.aa(a)}return null};
420
420
  olympe.C.ge=function(a){return void 0===a?olympe.C.Xd(olympe.C.aa):olympe.C.Xd(olympe.C.aa,olympe.C.qf(a)?a:olympe.C.ra(a))};olympe.C.Bz=olympe.C.aa.animate;olympe.C.lF=function(a,b){return new olympe.C.Gt(a,b)};olympe.C.xb=function(a){if(a instanceof olympe.C.Ta)return a;a instanceof Object&&(a=a.valueOf());const b=typeof a;if('string'===b||'number'===b||'boolean'===b)return a=String(a),olympe.C.$k.has(a)?olympe.C.$k.get(a):new olympe.C.Ta(a)};
421
421
  olympe.C.qF=function(a){return void 0===a?olympe.C.Xd(olympe.C.Ta):olympe.C.Xd(olympe.C.Ta,olympe.C.qf(a)?a:olympe.C.xb(a))};olympe.C.Sb=function(a){return a instanceof olympe.C.da?a:void 0!==a&&null!==a&&a.valueOf()?olympe.C.da.D:olympe.C.da.j};olympe.C.nF=function(a){return void 0===a?olympe.C.Xd(olympe.C.da):olympe.C.Xd(olympe.C.da,olympe.C.qf(a)?a:olympe.C.Sb(a))};olympe.C.mF=function(a){if(a instanceof Date)return new olympe.C.eb(a)};
422
422
  olympe.C.pF=function(a){return olympe.C.Xd(olympe.C.eb,void 0!==a?new olympe.C.eb(a):null)};olympe.C.$s=a=>a instanceof olympe.C.da||a instanceof olympe.C.aa||a instanceof olympe.C.Ta||a instanceof olympe.C.eb;olympe.C.rF=function(a,b){return olympe.C.Xd(olympe.C.Zb,void 0===a&&void 0===b?void 0:new olympe.C.Zb(a,b))};olympe.C.Nz=function(a,b,c,d){let e;void 0!==a&&(a instanceof olympe.C.Color?e=a:e=olympe.C.Color.create(a,b,c,d));return olympe.C.Xd(olympe.C.Color,e)};olympe.C.oF=olympe.C.Nz;
423
- olympe.C.Dx=function(a){olympe.C.G=a;olympe.C.li=olympe.C.lh()};olympe.C.lh=function(){olympe.C.Un||(olympe.C.Un=new olympe.C.Dr);return olympe.C.Un};olympe.C.$a=function(){olympe.C.li||(olympe.C.li=olympe.C.lh());return olympe.C.li};olympe.C.st=function(a){const b=olympe.C.li;olympe.C.Pn(a)&&(olympe.C.li=a);return null!=b?b:null};
423
+ olympe.C.Dx=function(a){olympe.C.G=a;olympe.C.li=olympe.C.lh()};olympe.C.lh=function(){olympe.C.Vn||(olympe.C.Vn=new olympe.C.Dr);return olympe.C.Vn};olympe.C.$a=function(){olympe.C.li||(olympe.C.li=olympe.C.lh());return olympe.C.li};olympe.C.st=function(a){const b=olympe.C.li;olympe.C.Qn(a)&&(olympe.C.li=a);return null!=b?b:null};
424
424
  olympe.C.Qb=a=>{a='string'===typeof a?JSON.parse(a):a;if(a.type){let b=null;switch(a.type){case 'dateTime':b=olympe.C.eb.Qb(a);break;case 'number':b=olympe.C.aa.Qb(a);break;case 'string':b=olympe.C.Ta.Qb(a);break;case 'vector2':b=olympe.C.Zb.Qb(a);break;case 'color':b=olympe.C.Color.Qb(a);break;case 'boolean':b=olympe.C.da.Qb(a)}return b}return null};function vc(a){a.j.gb()||(a.F.forEach(b=>{b.destroy()}),a.F.clear(),a.D.clear(),a.size.clear(),a.N.clear(),a.R.length=0,a.H.length=0)}
425
- olympe.C.lD=class{constructor(){this.j=new olympe.C.Wb('Slot Manager context');this.F=new Map;this.j.run(()=>{this.D=olympe.C.cc(wc,'Last slot manager entry');this.size=mc(olympe.C.cc(olympe.C.aa,'SlotManager size').repeat(this.D.tb().En()),olympe.C.aa.ZERO);this.N=mc(olympe.C.cc(olympe.C.aa,'last valid slots'),olympe.C.ra(-1))});this.R=[];this.H=[];this.j.onDestroy(()=>{vc(this)})}};
426
- class wc{constructor(a,b,c,d){this.id=a;this.D=new olympe.C.Wb('Slot manager entry');this.H=c;this.N=d;this.D.run(()=>{const e=mc(olympe.C.cc(olympe.C.aa),olympe.C.aa.ZERO);olympe.C.hb(b)?e.repeat(b):e.update(b);this.j=olympe.C.cc(olympe.C.aa);this.F=this.j.tb().he(e.tb())});this.next=null}T(){return this.id}Wy(){return this.j.tb()}En(){return this.F}Id(){return this.H}fz(){return this.N}oA(a){this.H=a}bA(a){null===a?this.j.update(olympe.C.aa.ZERO):(this.j.repeat(a.En()),a.next=this)}Pu(){this.j.clear();
427
- this.next=null}destroy(){this.D.destroy();this.F=this.j=this.next=null}}m=wc.prototype;m.T.K=olympe.C.J.j;m.Wy.K=new olympe.C.J(()=>olympe.C.aa);m.En.K=new olympe.C.J(()=>olympe.C.aa);m.Id.K=olympe.C.J.j;m.fz.K=olympe.C.J.j;m.oA.K=olympe.C.J.j;m.bA.K=olympe.C.J.j;m.Pu.K=olympe.C.J.j;m.destroy.K=olympe.C.J.j;olympe.C.P={Da:'df.Logger'};olympe.W.config(a=>{E(a,olympe.C.U.zq,Number.POSITIVE_INFINITY);D(a,olympe.C.P.Da,[olympe.ia.P.Ea],b=>b.cd('df'))},'olympe.df');olympe.W.run([olympe.C.P.Da],a=>{olympe.C.Dx(a)},'olympe.df');olympe.host={};const xc=new Map,yc=new Map;olympe.host.Gq=class{static register(a,b,...c){xc.set(a,b);0<c.length&&yc.set(a,c)}static create(a,b,c,d){const e=xc.get(a);if(void 0===e)throw Error('Undefined UI element type: '+a);a=yc.get(a);return void 0!==a?new e(b,c,...a.map(f=>Sa(d,f))):new e(b,c)}};function zc(a,b,c){a.G.debug('CREATE #',b,', type=',c);a.j.set(b,olympe.host.Gq.create(c,b,a.G,a.H))}function Ac(a,b,c,...d){const e=a.j.get(b);if(void 0!==e){a.G.H()<=olympe.ia.yb.j.bg&&a.G.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.C.hb(f))b.push(a.j.get(f.Yw)||null);else if('function'===typeof f){const g=f,h=olympe.C.$a();b.push((...k)=>{h.gb()||g(...k)})}else b.push(f.valueOf());e[c].apply(e,b)}}
425
+ olympe.C.lD=class{constructor(){this.j=new olympe.C.Wb('Slot Manager context');this.F=new Map;this.j.run(()=>{this.D=olympe.C.cc(wc,'Last slot manager entry');this.size=mc(olympe.C.cc(olympe.C.aa,'SlotManager size').repeat(this.D.tb().Fn()),olympe.C.aa.ZERO);this.N=mc(olympe.C.cc(olympe.C.aa,'last valid slots'),olympe.C.ra(-1))});this.R=[];this.H=[];this.j.onDestroy(()=>{vc(this)})}};
426
+ class wc{constructor(a,b,c,d){this.id=a;this.D=new olympe.C.Wb('Slot manager entry');this.H=c;this.N=d;this.D.run(()=>{const e=mc(olympe.C.cc(olympe.C.aa),olympe.C.aa.ZERO);olympe.C.hb(b)?e.repeat(b):e.update(b);this.j=olympe.C.cc(olympe.C.aa);this.F=this.j.tb().he(e.tb())});this.next=null}T(){return this.id}Wy(){return this.j.tb()}Fn(){return this.F}Id(){return this.H}fz(){return this.N}oA(a){this.H=a}bA(a){null===a?this.j.update(olympe.C.aa.ZERO):(this.j.repeat(a.Fn()),a.next=this)}Pu(){this.j.clear();
427
+ this.next=null}destroy(){this.D.destroy();this.F=this.j=this.next=null}}m=wc.prototype;m.T.K=olympe.C.J.j;m.Wy.K=new olympe.C.J(()=>olympe.C.aa);m.Fn.K=new olympe.C.J(()=>olympe.C.aa);m.Id.K=olympe.C.J.j;m.fz.K=olympe.C.J.j;m.oA.K=olympe.C.J.j;m.bA.K=olympe.C.J.j;m.Pu.K=olympe.C.J.j;m.destroy.K=olympe.C.J.j;olympe.C.P={Da:'df.Logger'};olympe.W.config(a=>{E(a,olympe.C.U.zq,Number.POSITIVE_INFINITY);D(a,olympe.C.P.Da,[olympe.ia.P.Ea],b=>b.cd('df'))},'olympe.df');olympe.W.run([olympe.C.P.Da],a=>{olympe.C.Dx(a)},'olympe.df');olympe.host={};const xc=new Map,yc=new Map;olympe.host.Gq=class{static register(a,b,...c){xc.set(a,b);0<c.length&&yc.set(a,c)}static create(a,b,c,d){const e=xc.get(a);if(void 0===e)throw Error('Undefined UI element type: '+a);a=yc.get(a);return void 0!==a?new e(b,c,...a.map(f=>Sa(d,f))):new e(b,c)}};function zc(a,b,c){a.G.debug('CREATE #',b,', type=',c);a.j.set(b,olympe.host.Gq.create(c,b,a.G,a.H))}function Ac(a,b,c,...d){const e=a.j.get(b);if(void 0!==e){a.G.H()<=olympe.ia.yb.j.bg&&a.G.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.C.hb(f))b.push(a.j.get(f.Yw)||null);else if('function'===typeof f){const g=f,h=olympe.C.$a();b.push((...k)=>{h.gb()||g(...k)})}else b.push(f.valueOf());e[c].apply(e,b)}}
428
428
  function Bc(a){var b=olympe.host.Oe.Fd,c=olympe.host.Oe.Fq.js;++a.F;const d=a.F;zc(a,d,c);const e=olympe.C.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.D.has(l)&&this.D.get(l).destroy();for(let n=0;n<f;n++){let p=arguments[n];olympe.C.hb(p)?(h.push(n),p=p.Ca):olympe.C.Vf(p)&&h.push(n);g[n]=p}0===h.length?e.run(()=>{Ac(this,d,k,...g)}):(f=olympe.C.createNode(void 0,(...n)=>{e.run(()=>
429
429
  {Ac(this,d,k,...n)})},void 0,g,h,'Native('+d+').'+k),this.D.set(l,f),f.onDestroy(()=>this.D.delete(l)));return null}.bind(a));e.Yd(a.N.bind(a,d));a=M(e);a.Yw=d;L(e,a);return a}olympe.host.Ua=class{constructor(a,b){this.G=a;this.H=b;this.F=0;this.j=new Map;this.D=new Map;a.debug('Starting host manager')}Ya(){return this.G}N(a){this.G.debug('DESTROY #',a);const b=this.j.get(a);this.j.delete(a);b.destroy()}};olympe.host.Td=class{constructor(a){this.j=a;this.D=olympe.C.$a()}F(){return this.j}jd(){return this.j.Ca.jd()||this.D.jd()}gb(){return this.j.Ca.gb()}};olympe.host.Td.prototype.F.K=new olympe.C.J(()=>olympe.host.Oe.Td,[]);olympe.host.Uk=class{j(){}D(){}};olympe.host.wu=class{};function Cc(a,b){var c=olympe.host.Zf;const d=olympe.V.Kc(),e=new olympe.C.Wb('onTimeout context');c.j.Y(b,d,()=>{e.gb()||e.jd()||e.run(a);c.j.F(d)});return new olympe.host.Fd.D(c.j,d,e)}function Dc(a,b){var c=olympe.host.Zf;const d=olympe.V.Kc(),e=new olympe.C.Wb('onInterval context');c.j.R(b,d,()=>{e.gb()||e.jd()?c.j.D(d):e.run(a)})}olympe.host.Fd=class{constructor(a){this.j=Bc(a)}};olympe.host.Fd.j=class{constructor(a,b,c){this.Zf=a;this.id=b;this.j=null!=c?c:null}T(){return this.id}cancel(){}};
430
430
  olympe.host.Fd.H=class extends olympe.host.Fd.j{cancel(){this.Zf.N(this.id);let a;null==(a=this.j)||a.destroy();this.j=null}};olympe.host.Fd.D=class extends olympe.host.Fd.j{cancel(){this.Zf.F(this.id);let a;null==(a=this.j)||a.destroy();this.j=null}};olympe.host.Fd.F=class extends olympe.host.Fd.j{cancel(){this.Zf.D(this.id);let a;null==(a=this.j)||a.destroy();this.j=null}};olympe.host.Je=class{H(a,b){return null!=b?b:''}ja(a,b){return null!=b?b:''}Ha(a,b){return null!=b?b:''}F(){}j(a,b){return null!=b?b:''}D(){}};olympe.host.Je.j={LIVENESS:'liveness',READINESS:'readiness',ALL:'all'};olympe.host.Oe={};olympe.host.Oe.Td=class{destroy(){}};olympe.host.Oe.Td.prototype.destroy=olympe.host.Oe.Td.prototype.destroy;olympe.host.Oe.Fq={wA:100,yA:101,xA:102,AA:103,zA:104,vA:105,cD:201,aD:202,YC:204,fD:205,XC:206,$C:207,dD:208,gD:209,hD:210,iD:211,ZC:212,eD:218,bD:219,jD:220,WC:221,VC:222,qD:300,rD:301,sD:302,wD:303,xD:304,yD:305,tD:310,uD:311,vD:312,wC:400,xC:401,yC:402,kC:450,dC:500,bC:501,gC:502,fC:503,cC:504,eC:505,RD:600,ID:601,MD:602,ED:603,FD:604,CD:605,HD:606,XD:607,PD:608,zD:609,DD:610,GD:611,OD:612,TD:613,AD:614,SD:615,ND:616,WD:617,JD:618,KD:619,LD:620,QD:630,BD:631,UD:632,VD:633,CE:700,fE:701,gE:702,
431
431
  hE:703,jE:704,kE:705,lE:706,iE:707,nE:708,mE:709,oE:710,sE:711,AE:712,pE:713,qE:714,tE:715,uE:716,wE:717,xE:718,zE:719,vE:720,yE:721,BE:722,rE:723,DE:724,EE:725,js:800};olympe.host.Oe.Fd=class{N(){}Y(){}F(){}R(){}D(){}};olympe.host.P={Qk:'host.System',Op:'host.HistoryManager',Fr:'host.Scheduler',Da:'host.platform.Logger',Ea:'host.Manager',Ge:'host.ProcessManager'};olympe.host.U={Jk:'role',Pp:'host.currentHost',br:'host.processProbe',Lr:'host.gracefulShutdownTimeout'};olympe.host.Xg={Al:'active',Uh:'preview'};olympe.host.Zf=null;
432
432
  olympe.W.config(function(a){var b,c;const d='object'===typeof window&&(null==(b=window)?void 0:null==(c=b.location)?void 0:c.hostname)||'127.0.0.1';Va(a,olympe.host.U.Pp,d);b=olympe.host.Xg.Al;c=olympe.host.Xg.Uh;E(a,olympe.host.U.Jk,d.startsWith(`${c}.`)?c:b);Ya(a,olympe.host.P.Qk);Ya(a,olympe.host.P.Op);C(a,olympe.host.P.Ge,olympe.host.Je);D(a,olympe.host.P.Da,[olympe.ia.P.Ea],e=>e.cd('host'));C(a,olympe.host.P.Ea,olympe.host.Ua,olympe.host.P.Da,olympe.W.P.Fg);D(a,olympe.host.P.Fr,[olympe.host.P.Ea],
433
- e=>{null===olympe.host.Zf&&(olympe.host.Zf=new olympe.host.Fd(e));return olympe.host.Zf},!0)},'olympe.host');olympe.W.run([olympe.host.P.Fr],a=>a,'olympe.host.scheduler');olympe.W.run([olympe.host.P.Ea],a=>a,'olympe.host');olympe.W.run([olympe.host.P.Ge],a=>{olympe.host.ll=()=>a});olympe.error={};olympe.error.pd=class extends Error{constructor(a,b=olympe.error.mc.Wk){super(a);this.code=b}Aj(){return this.code}};olympe.error.mc={Wk:0,Oi:1,Dq:401,kk:403,Zi:404,Dv:406,TIMEOUT:408,pw:503,Cq:530,Ql:600,Eq:1006};olympe.error.Vk=class extends olympe.error.pd{constructor(a){super(a,olympe.error.mc.TIMEOUT)}};olympe.error.Zq=class extends olympe.error.pd{constructor(a){super(a,olympe.error.mc.pw)}};olympe.error.uk=class extends olympe.error.pd{constructor(a){super(a,olympe.error.mc.Dq)}};olympe.error.Dm=class extends olympe.error.pd{constructor(a){super(a,olympe.error.mc.Zi)}};
434
- olympe.error.Mq=class extends olympe.error.pd{constructor(a){super(a,olympe.error.mc.Oi)}};olympe.error.Lq=class extends olympe.error.pd{constructor(a){super(a,olympe.error.mc.Dv)}};olympe.error.nC=class extends olympe.error.pd{constructor(a){super(a,olympe.error.mc.Cq)}};olympe.error.Tl=class extends olympe.error.pd{constructor(a){super(a,olympe.error.mc.Ql)}};olympe.error.jp=class extends olympe.error.pd{constructor(a){super(a,olympe.error.mc.Oi)}};
435
- olympe.error.Wq=class extends olympe.error.pd{constructor(){super('Working offline',olympe.error.mc.Oi)}};olympe.error.To=class extends olympe.error.pd{constructor(a){super(a,olympe.error.mc.Oi)}};olympe.error.Br=class extends olympe.error.pd{constructor(a){super(a,olympe.error.mc.Oi)}};olympe.error.Zm=class extends olympe.error.pd{constructor(a,b){super(a);this.id=b}T(){return this.id}};olympe.error.Qh=class extends olympe.error.Zm{};olympe.error.Go=class extends olympe.error.Zm{};
436
- olympe.error.Np=class extends olympe.error.Zm{};olympe.net={};olympe.net.wa={};olympe.net.wa.Sd={Th:'POST',GET:'GET',tu:'HEAD',cr:'PUT',Dc:'DELETE',Rq:'OPTIONS',zC:'PATCH'};olympe.net.wa.ResponseType={Xr:'text',JSON:'json',Hl:'blob',ai:'uint8array',ke:'stream'};olympe.net.wa.Headers={Ii:'content-type',LA:'content-length',so:'authorization',Ft:'access-control-allow-origin',Dt:'access-control-allow-headers',Et:'access-control-allow-methods',yp:'x-forwarded-host',zp:'x-forwarded-proto'};
437
- olympe.net.wa.Ul={NB:'text/html',JSON:'application/json',Xw:'application/zip',ke:'application/octet-stream'};olympe.net.wa.Ub={Lo:0,Rh:200,No:201,Rj:202,Fl:400,Mw:401,kk:403,Zi:404,hC:405,gj:500,lw:503};function Ec(a){return a.host&&encodeURI(a.host)}function Fc(a){return encodeURI(a.path).replace(olympe.net.oj.j,(b,c)=>'%'+c)}olympe.net.oj=class{constructor(a,b,c,d){this.host='localhost';this.port=80;this.path='';this.yh=!1;void 0!==a&&(this.host=a);void 0!==b&&(this.port=b);void 0!==c&&(this.path=c.replace(/^\/+/,''));void 0!==d&&(this.yh=d)}j(){return`${(void 0===this.yh?443===this.port:this.yh)?'wss':'ws'}://${Ec(this)}:${this.port}/${Fc(this)}`}toString(){return`${Ec(this)}:${this.port}/${Fc(this)}`}};
433
+ e=>{null===olympe.host.Zf&&(olympe.host.Zf=new olympe.host.Fd(e));return olympe.host.Zf},!0)},'olympe.host');olympe.W.run([olympe.host.P.Fr],a=>a,'olympe.host.scheduler');olympe.W.run([olympe.host.P.Ea],a=>a,'olympe.host');olympe.W.run([olympe.host.P.Ge],a=>{olympe.host.ll=()=>a});olympe.error={};olympe.error.pd=class extends Error{constructor(a,b=olympe.error.mc.Wk){super(a);this.code=b}Aj(){return this.code}};olympe.error.mc={Wk:0,Oi:1,Dq:401,kk:403,Zi:404,Dv:406,TIMEOUT:408,pw:503,Cq:530,Ql:600,Eq:1006};olympe.error.Vk=class extends olympe.error.pd{constructor(a){super(a,olympe.error.mc.TIMEOUT)}};olympe.error.Zq=class extends olympe.error.pd{constructor(a){super(a,olympe.error.mc.pw)}};olympe.error.uk=class extends olympe.error.pd{constructor(a){super(a,olympe.error.mc.Dq)}};olympe.error.Em=class extends olympe.error.pd{constructor(a){super(a,olympe.error.mc.Zi)}};
434
+ olympe.error.Mq=class extends olympe.error.pd{constructor(a){super(a,olympe.error.mc.Oi)}};olympe.error.Lq=class extends olympe.error.pd{constructor(a){super(a,olympe.error.mc.Dv)}};olympe.error.nC=class extends olympe.error.pd{constructor(a){super(a,olympe.error.mc.Cq)}};olympe.error.Tl=class extends olympe.error.pd{constructor(a){super(a,olympe.error.mc.Ql)}};olympe.error.kp=class extends olympe.error.pd{constructor(a){super(a,olympe.error.mc.Oi)}};
435
+ olympe.error.Wq=class extends olympe.error.pd{constructor(){super('Working offline',olympe.error.mc.Oi)}};olympe.error.Uo=class extends olympe.error.pd{constructor(a){super(a,olympe.error.mc.Oi)}};olympe.error.Br=class extends olympe.error.pd{constructor(a){super(a,olympe.error.mc.Oi)}};olympe.error.$m=class extends olympe.error.pd{constructor(a,b){super(a);this.id=b}T(){return this.id}};olympe.error.Qh=class extends olympe.error.$m{};olympe.error.Ho=class extends olympe.error.$m{};
436
+ olympe.error.Np=class extends olympe.error.$m{};olympe.net={};olympe.net.wa={};olympe.net.wa.Sd={Th:'POST',GET:'GET',tu:'HEAD',cr:'PUT',Dc:'DELETE',Rq:'OPTIONS',zC:'PATCH'};olympe.net.wa.ResponseType={Xr:'text',JSON:'json',Hl:'blob',ai:'uint8array',ke:'stream'};olympe.net.wa.Headers={Ii:'content-type',LA:'content-length',uo:'authorization',Ft:'access-control-allow-origin',Dt:'access-control-allow-headers',Et:'access-control-allow-methods',yp:'x-forwarded-host',zp:'x-forwarded-proto'};
437
+ olympe.net.wa.Ul={NB:'text/html',JSON:'application/json',Xw:'application/zip',ke:'application/octet-stream'};olympe.net.wa.Ub={Mo:0,Rh:200,Oo:201,Rj:202,Fl:400,Mw:401,kk:403,Zi:404,hC:405,gj:500,lw:503};function Ec(a){return a.host&&encodeURI(a.host)}function Fc(a){return encodeURI(a.path).replace(olympe.net.oj.j,(b,c)=>'%'+c)}olympe.net.oj=class{constructor(a,b,c,d){this.host='localhost';this.port=80;this.path='';this.yh=!1;void 0!==a&&(this.host=a);void 0!==b&&(this.port=b);void 0!==c&&(this.path=c.replace(/^\/+/,''));void 0!==d&&(this.yh=d)}j(){return`${(void 0===this.yh?443===this.port:this.yh)?'wss':'ws'}://${Ec(this)}:${this.port}/${Fc(this)}`}toString(){return`${Ec(this)}:${this.port}/${Fc(this)}`}};
438
438
  olympe.net.oj.j=/%25([0-9a-f]{2})/i;olympe.net.WebSocket=class{send(){}close(){}ea(){}$(){}Y(){}D(){}};function N(a,b,c,d){a=olympe.V.Oz(a.valueOf());if(!a.host&&!a.path)return null;const e=a.scheme?a.scheme.includes('s'):!1;b=new olympe.net.Si(a.host,a.port||(e?443:80),a.path||'',e,b,c,d,a.query||void 0);a.yt&&(c=a.yt.split(':'),2===c.length&&(c=bb(olympe.V.kf(),`${c[0]}:${c[1]}`),Gc(b,{Authorization:`Basic ${c}`})));return b}function Hc(a){return void 0!==a.query?a.query.replace(/[^=&]+/g,b=>encodeURIComponent(b)):null}function Ic(a,b){a.D=b;return a}function Gc(a,b){Object.assign(a.headers,b)}
439
439
  olympe.net.Si=class extends olympe.net.oj{constructor(a,b,c,d,e,f,g,h){super(a,b,c,d);this.method=null!=e?e:olympe.net.wa.Sd.GET;this.query=h;this.headers={};this.body=f;this.D=null!=g?g:olympe.net.wa.ResponseType.Xr}Cj(){return this.headers}j(){let a=Hc(this);a=a?`?${a}`:'';if(!Ec(this))return`${Fc(this)}${a}`;const b=Number.isInteger(this.port)?`:${this.port}`:'';return`${(void 0===this.yh?443===this.port:this.yh)?'https':'http'}://${Ec(this)}${b}/${Fc(this)}${a}`}toString(){return this.j()}};
440
440
  olympe.net.Si.Sd={Th:'POST',GET:'GET',tu:'HEAD',cr:'PUT',Dc:'DELETE',Rq:'OPTIONS'};olympe.net.qd=class{constructor(a,b,c,d){this.data=a;this.status=null!=b?b:200;this.statusText=null!=c?c:'';this.headers=null!=d?d:{}}getData(){return this.data}Jc(){return this.status}Cj(){return this.headers}};function Jc(a,b){if(!b)throw Error('Try to send an invalid HTTP request: '+b);a.G.debug('SEND HTTP '+b.method+' to '+b.j());const c=a.F++,d=olympe.C.$a(),e=d.onDestroy(()=>{var f=a.j;const g=f.j.get(c);f.j.delete(c);null==g||g()});return Kc(a.j,c,b).finally(()=>{d.Xf(e);a.j.j.delete(c)})}olympe.net.Ua=class{constructor(a){this.G=a;this.j=new olympe.net.we.xu(a);this.F=1;a='Initializing NET layer';this.G.j()&&(a+=' (implementation: '+this.R()+')');this.G.log(a);this.G.log('DONE initializing NET layer (ready to receive connection requests)')}D(){}N(){}H(){}Wf(){}R(){}};function Lc(a){const b=olympe.net.AMQPClient.j.ze,c=olympe.net.AMQPClient.j.CONNECTING,d=olympe.net.AMQPClient.j.vc,e=olympe.net.AMQPClient.j.zb;nb(a.state,b,a.ja.bind(a),[c]);nb(a.state,c,()=>{a.G.debug('Connecting to the AMQP Client..');a.F=!0;F(a.state,b)},[d]);nb(a.state,d,(f,g)=>u(function*(){a.F=null!=g?g:a.F;a.F||a.D.clear();yield Mc(a);if(a.F&&!a.Y&&null!==a.N){let h,k;setTimeout(()=>{a.G.debug('Reconnecting to the AMQPClient..');F(a.state,c)},null!=(k=null==(h=a.N)?void 0:h.lt)?k:5E3)}}),
441
441
  [b,c,e]);ob(a.state,e,(f,g)=>{a.G.warn(`Error occurred with the AMQP Client, (was in state ${f}): ${g}`);F(a.state,d,a.F)});a.state.start(d,!1)}function Nc(a,b){lb(a.state,olympe.net.AMQPClient.j.ze,b)}function Oc(a,b){lb(a.state,olympe.net.AMQPClient.j.CONNECTING,b)}function Pc(a,b){lb(a.state,olympe.net.AMQPClient.j.vc,b)}
442
442
  function Mc(a){return u(function*(){const b=a.j,c=a.H;a.j=a.H=null;!1===(null==b?void 0:b.closed)&&b.close().catch(d=>a.G.debug(`Issue while closing channel: ${d}`));!1===(null==c?void 0:c.closed)&&(yield olympe.V.Promise.$f(c.close(),500,'AMQPClient close timeout').catch(d=>{a.G.debug(`Error while closing client: ${d}`)}))})}function Qc(a){return null!==a.H&&!a.H.closed&&null!==a.j&&!a.j.closed&&a.F}function Rc(a,b){if(!Qc(a))throw new olympe.error.Tl(null!=b?b:'Not connected to the bus');}
443
443
  function Sc(a){let b,c;return Number.parseInt(null!=(c=null==(b=/^.*\((\d+)\)$/.exec(a instanceof Error?a.message:a))?void 0:b[1])?c:'0',10)}
444
- function Tc(a,b,c,d){return u(function*(){try{yield Uc(a,b,c)}catch(e){if(e instanceof olympe.error.Lq)return a.G.debug(`Queue ${b} already exists with different parameters, deleting it..`),yield Vc(a,b),new Promise((f,g)=>setTimeout(()=>{a.G.debug(`Redeclare queue ${b} with new parameters..`);Tc(a,b,c,d).then(f).catch(g)},500));throw Error(`Fail to declare queue ${b}: ${e}`);}try{let e,f;yield null==(e=a.D.get(b))?void 0:null==(f=e.un)?void 0:f.cancel()}catch(e){}try{yield Wc(a,b,c,d)}catch(e){throw Error(`Fail to consume queue ${b}: ${e}`);
445
- }})}function Xc(a,b,c,d){return u(function*(){Rc(a,'Cannot subscribe to a queue without being connected to the bus');if(a.D.has(b))throw Error(`Cannot subscribe twice to the queue ${b}.`);a.G.debug(`Subscribing to queue: ${b}, exclusive: ${c}`);a.D.set(b,{yl:new Set([b]),un:null,Kn:d,exclusive:c});yield Tc(a,b,c,d);a.G.debug(`Subscribed queue: ${b}.`)})}
446
- function Yc(a,b){return u(function*(){a.G.debug(`Closing subscription to queue: ${b}`);const c=a.D.get(b);a.D.delete(b);let d,e;if(!1===(null==(d=a.H)?void 0:d.closed)&&!1===(null==(e=a.j)?void 0:e.closed))try{let f;yield null==c?void 0:null==(f=c.un)?void 0:f.cancel()}catch(f){a.G.warn(`An error occurred while closing the subscription to queue: ${b}: ${f}`)}})}
444
+ function Tc(a,b,c,d){return u(function*(){try{yield Uc(a,b,c)}catch(e){if(e instanceof olympe.error.Lq)return a.G.debug(`Queue ${b} already exists with different parameters, deleting it..`),yield Vc(a,b),new Promise((f,g)=>setTimeout(()=>{a.G.debug(`Redeclare queue ${b} with new parameters..`);Tc(a,b,c,d).then(f).catch(g)},500));throw Error(`Fail to declare queue ${b}: ${e}`);}try{let e,f;yield null==(e=a.D.get(b))?void 0:null==(f=e.vn)?void 0:f.cancel()}catch(e){}try{yield Wc(a,b,c,d)}catch(e){throw Error(`Fail to consume queue ${b}: ${e}`);
445
+ }})}function Xc(a,b,c,d){return u(function*(){Rc(a,'Cannot subscribe to a queue without being connected to the bus');if(a.D.has(b))throw Error(`Cannot subscribe twice to the queue ${b}.`);a.G.debug(`Subscribing to queue: ${b}, exclusive: ${c}`);a.D.set(b,{yl:new Set([b]),vn:null,Ln:d,exclusive:c});yield Tc(a,b,c,d);a.G.debug(`Subscribed queue: ${b}.`)})}
446
+ function Yc(a,b){return u(function*(){a.G.debug(`Closing subscription to queue: ${b}`);const c=a.D.get(b);a.D.delete(b);let d,e;if(!1===(null==(d=a.H)?void 0:d.closed)&&!1===(null==(e=a.j)?void 0:e.closed))try{let f;yield null==c?void 0:null==(f=c.vn)?void 0:f.cancel()}catch(f){a.G.warn(`An error occurred while closing the subscription to queue: ${b}: ${f}`)}})}
447
447
  function Uc(a,b,c){return u(function*(){Rc(a,'Cannot declare a queue without being connected to the bus');a.G.debug(`Declaring queue: ${b}`);const d=yield Zc(a);try{yield d.queueDeclare(b,{durable:!c,exclusive:!1,autoDelete:!1,passive:!1},{'x-expires':c?3E4:a.N.Uz,'x-message-ttl':a.N.uz,'x-queue-type':c?'classic':'quorum'}),a.G.debug(`Queue: ${b} declared`)}catch(e){a.G.error(`Failed to declare queue: ${b}`,e);if(Sc(e)===olympe.net.AMQPClient.D.ar)throw new olympe.error.Lq(`Queue ${b} already exists with different parameters`);
448
448
  throw e;}finally{try{yield d.close()}catch(e){}}})}function Vc(a,b){return u(function*(){const c=yield Zc(a);try{yield c.queueDelete(b)}finally{yield c.close()}})}
449
- function Wc(a,b,c,d){return u(function*(){Rc(a,'Cannot consume a queue without being connected to the bus');a.G.debug(`Will consume queue: ${b}..`);const e=a.j,f={exclusive:c,noAck:!1},g=yield a.push(()=>e.basicConsume(b,f,h=>{a.G.j()&&a.G.debug(`AMQP < [${b}]: ${h.bodyToString()}`);d(new olympe.net.AMQPMessage(h,b,e))}));a.D.get(b).un=g;a.G.debug(`Consumer ${g.tag} subscribed to queue: ${b}, on channel ${e.id}`);g.wait().catch(h=>{a.G.debug(`Consumer of queue ${b} has been closed: ${h}`);h=Sc(h);
450
- if(h===olympe.net.AMQPClient.D.Qm||h===olympe.net.AMQPClient.D.Wk)h=Math.round(5E3*Math.random()),a.G.warn(`Consumer of queue ${b} has been forced closed, will recreate the queue in ${h}ms..`),setTimeout(()=>{a.j===e&&!1===(null==e?void 0:e.closed)&&Tc(a,b,c,d).catch(k=>{a.G.error(`Failed to resubscribe to queue ${b}: ${k}`)})},h)})})}
449
+ function Wc(a,b,c,d){return u(function*(){Rc(a,'Cannot consume a queue without being connected to the bus');a.G.debug(`Will consume queue: ${b}..`);const e=a.j,f={exclusive:c,noAck:!1},g=yield a.push(()=>e.basicConsume(b,f,h=>{a.G.j()&&a.G.debug(`AMQP < [${b}]: ${h.bodyToString()}`);d(new olympe.net.AMQPMessage(h,b,e))}));a.D.get(b).vn=g;a.G.debug(`Consumer ${g.tag} subscribed to queue: ${b}, on channel ${e.id}`);g.wait().catch(h=>{a.G.debug(`Consumer of queue ${b} has been closed: ${h}`);h=Sc(h);
450
+ if(h===olympe.net.AMQPClient.D.Rm||h===olympe.net.AMQPClient.D.Wk)h=Math.round(5E3*Math.random()),a.G.warn(`Consumer of queue ${b} has been forced closed, will recreate the queue in ${h}ms..`),setTimeout(()=>{a.j===e&&!1===(null==e?void 0:e.closed)&&Tc(a,b,c,d).catch(k=>{a.G.error(`Failed to resubscribe to queue ${b}: ${k}`)})},h)})})}
451
451
  function Zc(a,{id:b,Kz:c}={}){return u(function*(){const d=yield a.H.channel(b);d.onerror=null!=c?c:e=>{a.G.debug(`Error with channel (${d.id}): ${e}`)};return d})}
452
452
  function $c(a,b,c){return u(function*(){Rc(a,'Cannot bind a queue without being connected to the bus');var d;if(null==(d=a.D.get(b))?0:d.yl.has(c))throw Error(`Queue ${b} already bound to topic ${c}`);d=yield Zc(a);try{a.G.debug(`Binding queue ${b} to topic ${c}`),yield d.queueBind(b,'amq.topic',c),a.D.get(b).yl.add(c)}finally{yield d.close()}})}
453
453
  function ad(a,b,c){return u(function*(){Rc(a,'Cannot unbind a queue without being connected to the bus');const d=yield Zc(a);try{a.G.debug(`Unbinding queue ${b} to topic ${c}`);let e,f;null==(e=a.D.get(b))||null==(f=e.yl)||f.delete(c);yield d.queueUnbind(b,'amq.topic',c)}finally{try{yield d.close()}catch(e){}}})}
454
454
  olympe.net.AMQPClient=class{constructor(a,b){this.G=olympe.ia.Ya('AMQP');this.Y=this.F=!1;this.N=null;this.name=b;this.j=this.H=null;this.state=new olympe.V.Aw(this.G);this.D=new Map;this.R=new Map;this.ta=new olympe.V.promise.Tk;const c=olympe.V.Promise.uj(()=>{this.state.getState()===olympe.net.AMQPClient.j.vc?this.F&&F(this.state,olympe.net.AMQPClient.j.CONNECTING):F(this.state,olympe.net.AMQPClient.j.vc,this.F)},0);a.subscribe(d=>{this.G.j()&&this.G.debug('New AMQP configuration received',d);
455
455
  this.N=d;null!==d&&(this.Y=!1,c().then())});Lc(this)}connect(){const a=this;return u(function*(){if(Qc(a))return a;a.state.getState()===olympe.net.AMQPClient.j.vc&&F(a.state,olympe.net.AMQPClient.j.CONNECTING);yield mb(a.state,olympe.net.AMQPClient.j.ze);return a})}disconnect(){const a=this;return u(function*(){const b=olympe.net.AMQPClient.j.vc;a.state.getState()!==b&&(F(a.state,b,!1),yield mb(a.state,b))})}ld(a,b,c,d={mandatory:!1,xt:!1}){const e=this;return u(function*(){Rc(e,'Cannot publish a message without being connected to the bus');
456
- const f=JSON.stringify(c);e.G.j()&&e.G.debug(`AMQP > [${b}]: ${f}`);return(new Promise((g,h)=>{e.R.set(a,l=>h(new olympe.error.Mq(`Impossible to deliver message to topic "${b}": ${l}`)));const k={messageId:String(a)};e.push(()=>e.j.basicPublish(d.xt?'amq.topic':'',b,f,k,d.mandatory)).then(()=>g()).catch(l=>{l=Sc(l)===olympe.net.AMQPClient.D.Qm?new olympe.error.Dm(`Topic ${b} not deployed.`):Error(`Failed to publish a message ${f} to topic ${b}: ${l}`);h(l)})})).finally(()=>e.R.delete(a))})}ja(){const a=
456
+ const f=JSON.stringify(c);e.G.j()&&e.G.debug(`AMQP > [${b}]: ${f}`);return(new Promise((g,h)=>{e.R.set(a,l=>h(new olympe.error.Mq(`Impossible to deliver message to topic "${b}": ${l}`)));const k={messageId:String(a)};e.push(()=>e.j.basicPublish(d.xt?'amq.topic':'',b,f,k,d.mandatory)).then(()=>g()).catch(l=>{l=Sc(l)===olympe.net.AMQPClient.D.Rm?new olympe.error.Em(`Topic ${b} not deployed.`):Error(`Failed to publish a message ${f} to topic ${b}: ${l}`);h(l)})})).finally(()=>e.R.delete(a))})}ja(){const a=
457
457
  this;return u(function*(){if(null===a.N)throw Error('Cannot connect to the bus without a configuration');a.H=a.$(a.N,a.name);try{let b;yield olympe.V.Promise.nt(a.Ha.bind(a),(null!=(b=a.N.lt)?b:5E3)/2,[olympe.error.Tl]);a.G.debug('AMQP Client connected')}catch(b){if(b instanceof Event&&'close'===b.type)throw Error('Bus not ready, will try to reconnect..');throw b;}})}Ha(a){const b=this;return u(function*(){b.G.debug(`Connecting to the bus, tentative ${a+1}..`);b.H.onerror=d=>{if(d instanceof amqp.AMQPError){var e=
458
458
  olympe.error.mc.Ql;const f=olympe.error.mc.Eq,g=Sc(d);if(g===e||g===f){b.G.debug(`Connection closed by network: ${d}`);F(b.state,olympe.net.AMQPClient.j.vc,b.F);return}}else b.F=!1;e=b.state;F(e,e.j,d)};try{yield b.H.connect(),b.ea(b.H,d=>{b.G.debug(`AMQP connection closed ${d?'with error':'without error'}`);d||F(b.state,olympe.net.AMQPClient.j.vc,b.F)})}catch(d){if(d instanceof Error)switch(Sc(d)){case olympe.error.mc.Ql:case olympe.error.mc.Eq:throw new olympe.error.Tl(d);case olympe.error.mc.Cq:case olympe.error.mc.Dq:case olympe.error.mc.kk:throw b.Y=
459
- !0,new olympe.error.uk('Connection to the bus is not allowed: check your credentials');}throw new olympe.error.pd(`Connection to the bus failed: check your config and the availability of the bus: ${d}`);}const c=()=>u(function*(){b.j=yield Zc(b,{id:1,Kz:e=>{b.G.debug(`Error with channel 0: ${e}`);b.j=null;e=Sc(e);e!==olympe.net.AMQPClient.D.Qm&&e!==olympe.net.AMQPClient.D.ar||olympe.V.Promise.nt(f=>{b.G.warn(`Trying to recreate channel after being closed, tentative ${f+1}..`);return c()},500).catch(f=>
460
- {var g=b.state;F(g,g.j,f)})}});yield b.j.confirmSelect();let d;yield b.j.prefetch(null!=(d=b.N.Vz)?d:20);b.j.onReturn=e=>{const f=`Message returned by the server: ${e.bodyToString()}`;let g;null==(g=b.R.get(parseInt(e.properties.kF,10)))||g(f)};b.D.forEach(({Kn:e,exclusive:f},g)=>{Tc(b,g,f,e)})});yield c()})}push(a){return wb(this.ta,a)}$(){}ea(){}};olympe.net.AMQPClient.j={CONNECTING:'CONNECTING',ze:'CONNECTED',vc:'DISCONNECTED',zb:'ERROR'};
461
- olympe.net.AMQPClient.D={Wk:0,Qm:404,KC:405,ar:406,EA:504,cq:541};function bd(a){let b;return null!=(b=a.F)?b:{}}function cd(a){return!1===a.j.closed?a.j.basicNack(a.D,!1,void 0).catch(b=>{olympe.ia.Ya('amqp').error(`Failed to reject message ${a.D}: ${b}`)}):Promise.resolve()}
459
+ !0,new olympe.error.uk('Connection to the bus is not allowed: check your credentials');}throw new olympe.error.pd(`Connection to the bus failed: check your config and the availability of the bus: ${d}`);}const c=()=>u(function*(){b.j=yield Zc(b,{id:1,Kz:e=>{b.G.debug(`Error with channel 0: ${e}`);b.j=null;e=Sc(e);e!==olympe.net.AMQPClient.D.Rm&&e!==olympe.net.AMQPClient.D.ar||olympe.V.Promise.nt(f=>{b.G.warn(`Trying to recreate channel after being closed, tentative ${f+1}..`);return c()},500).catch(f=>
460
+ {var g=b.state;F(g,g.j,f)})}});yield b.j.confirmSelect();let d;yield b.j.prefetch(null!=(d=b.N.Vz)?d:20);b.j.onReturn=e=>{const f=`Message returned by the server: ${e.bodyToString()}`;let g;null==(g=b.R.get(parseInt(e.properties.kF,10)))||g(f)};b.D.forEach(({Ln:e,exclusive:f},g)=>{Tc(b,g,f,e)})});yield c()})}push(a){return wb(this.ta,a)}$(){}ea(){}};olympe.net.AMQPClient.j={CONNECTING:'CONNECTING',ze:'CONNECTED',vc:'DISCONNECTED',zb:'ERROR'};
461
+ olympe.net.AMQPClient.D={Wk:0,Rm:404,KC:405,ar:406,EA:504,cq:541};function bd(a){let b;return null!=(b=a.F)?b:{}}function cd(a){return!1===a.j.closed?a.j.basicNack(a.D,!1,void 0).catch(b=>{olympe.ia.Ya('amqp').error(`Failed to reject message ${a.D}: ${b}`)}):Promise.resolve()}
462
462
  olympe.net.AMQPMessage=class{constructor(a,b,c){this.H=a.redelivered;this.D=a.deliveryTag;this.N=a.routingKey;this.R=b;this.j=c;this.F=null;try{const d=a.bodyToString();this.F=JSON.parse(null!=d?d:'null')}catch(d){console.warn(`AMQPMessage: Failed to parse message payload: ${d}`)}}xi(){return this.H}ack(){return!1===this.j.closed?this.j.basicAck(this.D,!1).catch(a=>{olympe.ia.Ya('amqp').error(`Failed to ack message ${this.D}: ${a}`)}):Promise.resolve()}};olympe.net.di=class{constructor(a){this.G=a}start(){return Promise.reject('Try to start web server with the browser implementation.')}F(){return Promise.reject('Try to restart web server with the browser implementation.')}stop(){return Promise.reject('Try to stop web server with the browser implementation.')}D(){return Promise.reject('Try to open a route on a web server using the browser implementation.')}R(){return Promise.reject('Try to close a route on a web server using the browser implementation.')}};
463
- olympe.net.di.ALL='*';olympe.net.yw=class{register(){return u(function*(){throw Error('Service Worker Manager must be overridden by a native layer: called "register"');})}};olympe.net.P={Ea:'net.Manager',Da:'net.Logger',nj:'net.WebServer',qw:'net.ServiceWorkerManager',Fm:'net.OfflineConfig'};olympe.net.U={Bf:'net.httpPort',Sp:'net.httpBodyLimit',hs:'net.http2',Rp:'net.httpsCertificatesPath',xm:'net.localNetworkSuffix',bj:'offline.enabled',Em:'offline.autoBackOnline',Qq:'offline.downloadBatchSize'};
464
- olympe.W.config(function(a){E(a,olympe.net.U.Bf,3141);E(a,olympe.net.U.Sp,100);E(a,olympe.net.U.hs,!1);E(a,olympe.net.U.Rp,null);E(a,olympe.net.U.xm,'frontend');E(a,olympe.net.U.bj,!1);E(a,olympe.net.U.Em,!1);E(a,olympe.net.U.Qq,20);Ya(a,olympe.net.P.Ea);D(a,olympe.net.P.Da,[olympe.ia.P.Ea],b=>b.cd('net'));C(a,olympe.net.P.nj,olympe.net.di,olympe.net.P.Da);C(a,olympe.net.P.qw,olympe.net.yw);D(a,olympe.net.P.Fm,[new olympe.W.pa(olympe.net.U.bj),new olympe.W.pa(olympe.net.U.Em)],(b,c)=>new Map([['offlineEnabled',
463
+ olympe.net.di.ALL='*';olympe.net.yw=class{register(){return u(function*(){throw Error('Service Worker Manager must be overridden by a native layer: called "register"');})}};olympe.net.P={Ea:'net.Manager',Da:'net.Logger',nj:'net.WebServer',qw:'net.ServiceWorkerManager',Gm:'net.OfflineConfig'};olympe.net.U={Bf:'net.httpPort',Sp:'net.httpBodyLimit',hs:'net.http2',Rp:'net.httpsCertificatesPath',ym:'net.localNetworkSuffix',bj:'offline.enabled',Fm:'offline.autoBackOnline',Qq:'offline.downloadBatchSize'};
464
+ olympe.W.config(function(a){E(a,olympe.net.U.Bf,3141);E(a,olympe.net.U.Sp,100);E(a,olympe.net.U.hs,!1);E(a,olympe.net.U.Rp,null);E(a,olympe.net.U.ym,'frontend');E(a,olympe.net.U.bj,!1);E(a,olympe.net.U.Fm,!1);E(a,olympe.net.U.Qq,20);Ya(a,olympe.net.P.Ea);D(a,olympe.net.P.Da,[olympe.ia.P.Ea],b=>b.cd('net'));C(a,olympe.net.P.nj,olympe.net.di,olympe.net.P.Da);C(a,olympe.net.P.qw,olympe.net.yw);D(a,olympe.net.P.Gm,[new olympe.W.pa(olympe.net.U.bj),new olympe.W.pa(olympe.net.U.Fm)],(b,c)=>new Map([['offlineEnabled',
465
465
  b],['offlineAutoBackOnline',!b||c]]))},'olympe.net');olympe.Va.node.host={};olympe.Va.node.host.Td=function(a,b){this.G=b};olympe.Va.node.host.Td.prototype.constructor=olympe.Va.node.host.Td;olympe.Va.node.host.Td.prototype.destroy=function(){};olympe.Va.node.host.Td.prototype.destroy=olympe.Va.node.host.Td.prototype.destroy;olympe.Va.node.host.Td.prototype.Ya=function(){return this.G};olympe.Va.node.host.Td.za=[olympe.host.Oe.Td];olympe.Va.node.host.Hq=class{constructor(a){this.G=a}};olympe.Va.node.host.Hq.za=[olympe.host.wu];olympe.Va.node.host.Fd=class{constructor(){this.j={};this.H={}}destroy(){}N(a){clearTimeout(this.j[a]);delete this.j[a]}Y(a,b,c){this.j[b]=setTimeout(c,a)}F(a){clearTimeout(this.j[a]);delete this.j[a]}R(a,b,c){this.H[b]=setInterval(c,a)}D(a){clearInterval(this.H[a]);delete this.H[a]}};olympe.host.Gq.register(olympe.host.Oe.Fq.js,olympe.Va.node.host.Fd);olympe.Va.node.host.Fd.za=[olympe.host.Oe.Fd];olympe.Va.node.host.Uk=class{constructor(a){this.G=a}j(){return olympe.C.da.D}D(){return!0}};olympe.Va.node.host.Uk.za=[olympe.host.Uk];function dd(a){a.ta.D('readinessProbe','/readiness',[olympe.net.wa.Sd.GET],()=>fd(a,a.ea)).catch(b=>a.G.error(`Failed to add readiness health check route ${b}`));a.ta.D('livenessProbe','/liveness',[olympe.net.wa.Sd.GET],()=>fd(a,a.$)).catch(b=>a.G.error(`Failed to add liveness health check route ${b}`));a.H(()=>a.ta.stop())}
466
466
  function gd(a,b){b=Array.from(b.values()).map(c=>c());return Promise.allSettled(b).then(c=>{let d=!1;for(const e of c)'rejected'===e.status&&(d=!0,a.G.warn(`Failed to close some resource: ${e.reason}`));return d})}function hd(a){return u(function*(){try{const b=yield gd(a,a.N),c=yield gd(a,a.R),d=yield gd(a,a.Y);if(b||c||d)throw Error('Failed to gracefully close the backend');}finally{a.N.clear(),a.R.clear(),a.Y.clear()}})}
467
467
  function fd(a,b){const c=olympe.net.wa.Ub.Rh,d=olympe.net.wa.Ub.gj;b=Array.from(b.values()).map(e=>e.apply(a));return 0===b.length?Promise.resolve(new olympe.net.qd('No healthCheck is set',c,'Nothing to check')):Promise.allSettled(b).then(e=>{let f=!1,g='Health check result: ';for(const h of e)'rejected'===h.status?(f=!0,e=h.reason,g+=`\n${e}`,a.G.warn(`Health check detected a service which is DOWN: ${e}`)):g+=`\n${h.value}`;return new olympe.net.qd(g,f?d:c,f?'Some services are not working':'Everything is OK')})}
468
468
  olympe.Va.node.host.Je=class extends olympe.host.Je{constructor(a,b,c,d=!0){super();this.G=a;this.ta=b;this.Wa=c;this.$=new Map;this.ea=new Map;this.R=new Map;this.N=new Map;this.Y=new Map;d&&dd(this)}j(a,b=olympe.V.jf(),c=olympe.host.Je.j.ALL){switch(c){case olympe.host.Je.j.LIVENESS:this.$.set(b,a);break;case olympe.host.Je.j.READINESS:this.ea.set(b,a);break;default:this.$.set(b,a),this.ea.set(b,a)}return b}D(a){this.ea.delete(a);this.$.delete(a)}H(a,b=olympe.V.jf()){this.R.set(b,this.$f(b,a,this.Wa));
469
- return b}ja(a,b=olympe.V.jf(),c){this.N.set(b,this.$f(b,a,null!=c?c:this.Wa));return b}Ha(a,b=olympe.V.jf()){this.Y.set(b,this.$f(b,a,this.Wa));return b}F(a){this.R.has(a)?this.R.delete(a):this.N.has(a)?this.N.delete(a):this.Y.delete(a)}$f(a,b,c){return()=>olympe.V.Promise.$f(b(),c,`Shutdown hook ${a} has timeout`)}};olympe.W.config(function(a){E(a,olympe.host.U.br,!0);E(a,olympe.host.U.Lr,1E4);Wa(a,olympe.host.P.Op,olympe.Va.node.host.Hq,olympe.host.P.Da);Wa(a,olympe.host.P.Qk,olympe.Va.node.host.Uk,olympe.host.P.Da);C(a,olympe.host.P.Ge,olympe.Va.node.host.Je,olympe.host.P.Da,olympe.net.P.nj,new olympe.W.pa(olympe.host.U.Lr),new olympe.W.pa(olympe.host.U.br))},'olympe.native.node.host');olympe.W.run([olympe.host.P.Ge],a=>{olympe.Va.node.host.ll=()=>a});olympe.net.we={};function Kc(a,b,c){const d=olympe.net.wa.Ub.Lo,e=olympe.net.wa.Ub.gj,f=new AbortController;a.j.set(b,()=>f.abort());const g=c.j(),h=c.method;let k;return fetch(g,{method:h,headers:c.Cj(),body:null!=(k=c.body)?k:void 0,signal:f.signal}).then(l=>l.ok?id(l,c.D).catch(n=>new olympe.net.qd(`Error parsing response from ${g} with method ${h}: ${n.message}`,e,'Error handling response')):new olympe.net.qd(`Error fetching data from ${g} with method ${h}`,l.status,l.statusText,l.headers)).catch(l=>'AbortError'===
469
+ return b}ja(a,b=olympe.V.jf(),c){this.N.set(b,this.$f(b,a,null!=c?c:this.Wa));return b}Ha(a,b=olympe.V.jf()){this.Y.set(b,this.$f(b,a,this.Wa));return b}F(a){this.R.has(a)?this.R.delete(a):this.N.has(a)?this.N.delete(a):this.Y.delete(a)}$f(a,b,c){return()=>olympe.V.Promise.$f(b(),c,`Shutdown hook ${a} has timeout`)}};olympe.W.config(function(a){E(a,olympe.host.U.br,!0);E(a,olympe.host.U.Lr,1E4);Wa(a,olympe.host.P.Op,olympe.Va.node.host.Hq,olympe.host.P.Da);Wa(a,olympe.host.P.Qk,olympe.Va.node.host.Uk,olympe.host.P.Da);C(a,olympe.host.P.Ge,olympe.Va.node.host.Je,olympe.host.P.Da,olympe.net.P.nj,new olympe.W.pa(olympe.host.U.Lr),new olympe.W.pa(olympe.host.U.br))},'olympe.native.node.host');olympe.W.run([olympe.host.P.Ge],a=>{olympe.Va.node.host.ll=()=>a});olympe.net.we={};function Kc(a,b,c){const d=olympe.net.wa.Ub.Mo,e=olympe.net.wa.Ub.gj,f=new AbortController;a.j.set(b,()=>f.abort());const g=c.j(),h=c.method;let k;return fetch(g,{method:h,headers:c.Cj(),body:null!=(k=c.body)?k:void 0,signal:f.signal}).then(l=>l.ok?id(l,c.D).catch(n=>new olympe.net.qd(`Error parsing response from ${g} with method ${h}: ${n.message}`,e,'Error handling response')):new olympe.net.qd(`Error fetching data from ${g} with method ${h}`,l.status,l.statusText,l.headers)).catch(l=>'AbortError'===
470
470
  l.name?new olympe.net.qd('',d,'Request canceled'):new olympe.net.qd(`Error connecting to ${g} with method ${h}`,e,'Failed to fetch:'+l.message))}
471
471
  function id(a,b){return u(function*(){switch(b){case olympe.net.wa.ResponseType.Hl:var c=yield a.blob();break;case olympe.net.wa.ResponseType.ai:c=yield a.arrayBuffer();c=new Uint8Array(c,0,c.byteLength);break;case olympe.net.wa.ResponseType.JSON:c=yield a.json();break;case olympe.net.wa.ResponseType.ke:c=a.body;break;default:c=yield a.text()}return new olympe.net.qd(c,a.status,a.statusText,a.headers)})}olympe.net.we.xu=class{constructor(a){this.G=a;this.j=new Map}};olympe.net.we.WebSocket=class{constructor(a,b){this.G=b;this.id=a;this.j=null;this.buffer=[];this.N=this.F=this.H=this.R=null}T(){return this.id}open(a){const b=`#${this.id}`,c=this.ja(a);c.binaryType='arraybuffer';c.addEventListener('open',()=>{this.G.info(`Websocket ${b} OPENED`);this.R?(this.G.debug('Notifying upper layer for WebSocket',b),this.R()):this.G.warn('Nothing to notify for WebSocket',b);this.G.debug(b,`Send all buffered messages (n=${this.buffer.length}).`);this.buffer.forEach(c.send.bind(c));
472
472
  this.buffer.length=0});c.addEventListener('message',d=>{d='string'===typeof d.data?String(d.data):cb(d.data);(this.G.F()||this.G.j()&&!d.startsWith('pong'))&&this.G.debug(b,'<',d);this.F&&this.F(d)});c.addEventListener('close',()=>{this.G.info(`WebSocket ${b} CLOSED`);this.H&&this.H()});c.addEventListener('error',()=>{this.G.debug(`WebSocket ${b} ERROR`);this.N&&this.N()});this.j=c}send(a){const b=`#${this.id}`;if(null!==this.j){const c=this.j.constructor;switch(this.j.readyState){case c.OPEN:(this.G.F()||
473
473
  this.G.j()&&!a.startsWith('ping'))&&this.G.debug(b,'>',a);try{this.j.send(a)}catch(d){this.G.error(`Error while sending message to websocket: ${d}`)}break;case c.CONNECTING:this.G.debug(b,'- Connecting: BUFFER','>',a);this.buffer.push(a);break;default:return this.G.debug(b,'- Closed','>',a),!1}}else this.G.debug(b,'- Not opened yet: BUFFER','>',a),this.buffer.push(a);return!0}close(){if(null!==this.j){const a=this.j.constructor,b=this.j.readyState;if(b===a.OPEN||b===a.CONNECTING){this.G.debug(`Force closing native websocket ${`#${this.id}`}`);
474
474
  this.j.close(1E3);return}}this.G.debug('Try to force close native websocket, but not open nor connecting')}ea(a){this.R=a||null}$(a){this.F=a||null}D(a){this.N=a||null}Y(a){this.H=a||null}ja(){}};olympe.net.we.WebSocket.za=[olympe.net.WebSocket];olympe.Va.node.net={};olympe.Va.node.net.Fv=class extends olympe.net.Ua{R(){return'NodeJS'}Wf(){return olympe.C.da.D}D(a){var b=this.F++;a=a.j();this.G.debug('CREATE Websocket #'+b+' to '+a);b=new olympe.Va.node.net.Hv(b,this.G);b.open(a);return b}H(){this.G.warn('DOWNLOAD FILE not available with node native implementation. URL:')}N(a,b){return new olympe.Va.node.net.Gv(a,b)}};olympe.Va.node.net.Gv=class extends olympe.net.AMQPClient{$(a,b='olympe-node'){var c=a.host;const d=a.port,e=a.path,f=a.pA,g=a.bz;var h=URL,k=a.yh?'amqps':'amqp';var l=a.user;a=a.ed;l=`${encodeURIComponent(f||'/')}|${encodeURIComponent(l)}|${encodeURIComponent(a)}`;c=new h(`${k}://${l}:_@${c}:${d}${e}/${f}`);0<g&&c.searchParams.append('heartbeat',`${g}`);c.searchParams.append('name',b);this.G.debug(`Open AMQP Socket to: ${c.toString()}`);return new amqp.AMQPClient(c.toString())}ea(a,b){a.socket.on('close',
475
- b)}};olympe.Va.node.net.Hv=class extends olympe.net.we.WebSocket{ja(a){return new (require('ws'))(a)}};olympe.Va.node.net.U={eE:'native.html.net.useWorkers'};olympe.W.config(function(a){a.getParameter(olympe.net.U.bj)&&Va(a,olympe.net.U.bj,!1);Wa(a,olympe.net.P.Ea,olympe.Va.node.net.Fv,olympe.net.P.Da,olympe.host.P.Ea)},'olympe.native.node.net');olympe.Va.node.net.http={};const jd=require('fastify'),{Readable:kd}=require('stream'),ld={Pk:0,Ok:1,Wm:2},md=olympe.net.wa.Sd.Rq,nd=olympe.net.wa.Headers.Ft,od=olympe.net.wa.Headers.Dt,pd=olympe.net.wa.Headers.Et,qd=olympe.net.wa.Ub.Rh;
476
- function rd(a,b){const c=b.methods,d=b.Kn,e=b.headers,f=b.origin;a.j.route({bodyLimit:a.Y<<20,url:b.path,method:[...c,md],handler:(g,h)=>{a.G.debug('Incoming request:','hostname:',g.hostname,'headers:',g.headers);var k=g.method;const l={[nd]:f,[pd]:c,[od]:e};if(k===md)return a.G.debug('< HTTP: OPTIONS'),h.code(qd).headers(l).send();var n=g.body;if(n instanceof Buffer){var p=new Uint8Array(n.length);n.copy(p)}else if('string'===typeof n||n instanceof Object)p=n;const [q,r]=g.hostname.split(':');k=
475
+ b)}};olympe.Va.node.net.Hv=class extends olympe.net.we.WebSocket{ja(a){return new (require('ws'))(a)}};olympe.Va.node.net.U={eE:'native.html.net.useWorkers'};olympe.W.config(function(a){a.getParameter(olympe.net.U.bj)&&Va(a,olympe.net.U.bj,!1);Wa(a,olympe.net.P.Ea,olympe.Va.node.net.Fv,olympe.net.P.Da,olympe.host.P.Ea)},'olympe.native.node.net');olympe.Va.node.net.http={};const jd=require('fastify'),{Readable:kd}=require('stream'),ld={Pk:0,Ok:1,Xm:2},md=olympe.net.wa.Sd.Rq,nd=olympe.net.wa.Headers.Ft,od=olympe.net.wa.Headers.Dt,pd=olympe.net.wa.Headers.Et,qd=olympe.net.wa.Ub.Rh;
476
+ function rd(a,b){const c=b.methods,d=b.Ln,e=b.headers,f=b.origin;a.j.route({bodyLimit:a.Y<<20,url:b.path,method:[...c,md],handler:(g,h)=>{a.G.debug('Incoming request:','hostname:',g.hostname,'headers:',g.headers);var k=g.method;const l={[nd]:f,[pd]:c,[od]:e};if(k===md)return a.G.debug('< HTTP: OPTIONS'),h.code(qd).headers(l).send();var n=g.body;if(n instanceof Buffer){var p=new Uint8Array(n.length);n.copy(p)}else if('string'===typeof n||n instanceof Object)p=n;const [q,r]=g.hostname.split(':');k=
477
477
  new olympe.net.Si(q,parseInt(r,10),g.url,'https'===g.protocol,k,p);for(const [t,v]of Object.entries(g.headers))k.headers[t]=v;a.G.debug('< HTTP:',k.toString());n=new Map(Object.entries(g.params));g=new Map(Object.entries(g.query));return d(k,n,g).then(t=>{const v=t.Jc(),x=t.getData();(x instanceof Uint8Array||x instanceof ArrayBuffer||x instanceof kd)&&h.type(olympe.net.wa.Ul.ke);if(v>=olympe.net.wa.Ub.gj)throw Error(x);v>=olympe.net.wa.Ub.Fl?a.G.warn('> HTTP: client bad request: reply with error:',
478
478
  x):a.G.debug('> HTTP: reply with body:',Buffer.isBuffer(x)?'binary':x);return h.code(v).headers(Object.assign(l,t.Cj())).send(x)}).catch(t=>{a.G.error('> HTTP: reply with internal server error:',t);return h.code(olympe.net.wa.Ub.gj).headers(Object.assign(l,{[olympe.net.wa.Headers.Ii]:'text/plain'})).send('Internal server error')})}})}
479
- olympe.Va.node.net.http.di=class extends olympe.net.di{constructor(a,b,c,d,e){super(a);this.Y=c;this.port=b;this.$=d;this.N=e;this.j=this.createServer();this.H=new Map;this.state=ld.Pk;this.kd=new Set;this.timer=null}D(a,b,c,d){const e=olympe.net.di.ALL;this.H.set(a,{path:b,methods:c,Kn:d,headers:e,origin:e});return this.F()}R(a){const b=this;return u(function*(){b.H.delete(a);return 0<b.H.size?b.F():b.stop()})}start(){if(this.state===ld.Pk)return this.F();if(this.state===ld.Ok){for(const a of this.H.values())rd(this,
480
- a);return this.j.listen({port:this.port,host:'0.0.0.0'}).then(a=>{this.state=ld.Wm;this.G.debug('Web server listening on '+a);this.kd.forEach(b=>b(null))}).catch(a=>{this.stop().then();this.kd.forEach(b=>b(a))}).finally(()=>this.kd.clear())}return Promise.reject('Try to start a webservice already started')}F(){return this.state===ld.Ok?(new Promise((a,b)=>{this.kd.add(c=>c?b(c):a())})).then(()=>this.F()):new Promise((a,b)=>{this.kd.add(c=>c?b(c):a());this.uj(()=>{const c=this;return u(function*(){c.state=
481
- ld.Ok;yield c.j.close();c.j=c.createServer();yield c.start()})})})}stop(){return this.state===ld.Wm?this.j.close().then(()=>{this.state=ld.Pk}):Promise.resolve()}createServer(){var a=olympe.ia.yb.j.ms,b=this.G.H();a={logger:{level:olympe.ia.yb.D[b===olympe.ia.yb.j.pk?a:b].toLowerCase()},http2:this.$};if('string'===typeof this.N){b=require('fs');const c=require('path');Object.assign(a,{https:{allowHTTP1:!0,key:b.readFileSync(c.join(this.N,'key.pem')),cert:b.readFileSync(c.join(this.N,'cert.pem'))}})}a=
479
+ olympe.Va.node.net.http.di=class extends olympe.net.di{constructor(a,b,c,d,e){super(a);this.Y=c;this.port=b;this.$=d;this.N=e;this.j=this.createServer();this.H=new Map;this.state=ld.Pk;this.kd=new Set;this.timer=null}D(a,b,c,d){const e=olympe.net.di.ALL;this.H.set(a,{path:b,methods:c,Ln:d,headers:e,origin:e});return this.F()}R(a){const b=this;return u(function*(){b.H.delete(a);return 0<b.H.size?b.F():b.stop()})}start(){if(this.state===ld.Pk)return this.F();if(this.state===ld.Ok){for(const a of this.H.values())rd(this,
480
+ a);return this.j.listen({port:this.port,host:'0.0.0.0'}).then(a=>{this.state=ld.Xm;this.G.debug('Web server listening on '+a);this.kd.forEach(b=>b(null))}).catch(a=>{this.stop().then();this.kd.forEach(b=>b(a))}).finally(()=>this.kd.clear())}return Promise.reject('Try to start a webservice already started')}F(){return this.state===ld.Ok?(new Promise((a,b)=>{this.kd.add(c=>c?b(c):a())})).then(()=>this.F()):new Promise((a,b)=>{this.kd.add(c=>c?b(c):a());this.uj(()=>{const c=this;return u(function*(){c.state=
481
+ ld.Ok;yield c.j.close();c.j=c.createServer();yield c.start()})})})}stop(){return this.state===ld.Xm?this.j.close().then(()=>{this.state=ld.Pk}):Promise.resolve()}createServer(){var a=olympe.ia.yb.j.ms,b=this.G.H();a={logger:{level:olympe.ia.yb.D[b===olympe.ia.yb.j.pk?a:b].toLowerCase()},http2:this.$};if('string'===typeof this.N){b=require('fs');const c=require('path');Object.assign(a,{https:{allowHTTP1:!0,key:b.readFileSync(c.join(this.N,'key.pem')),cert:b.readFileSync(c.join(this.N,'cert.pem'))}})}a=
482
482
  jd(a);a.addContentTypeParser('*',{parseAs:'buffer'},(c,d,e)=>{e(null,d)});return a}uj(a,b=1E3){this.timer&&clearTimeout(this.timer);this.timer=setTimeout(a,b)}};olympe.W.config(function(a){C(a,olympe.net.P.nj,olympe.Va.node.net.http.di,olympe.net.P.Da,new olympe.W.pa(olympe.net.U.Bf),new olympe.W.pa(olympe.net.U.Sp),new olympe.W.pa(olympe.net.U.hs),new olympe.W.pa(olympe.net.U.Rp))},'olympe.native.node.net.http');olympe.Va.node.V={};const sd=require('stream').Readable,td=require('buffer');
483
483
  olympe.Va.node.V.Jl=class extends olympe.V.Jl{D(a){return new Uint8Array(Buffer.from(a,'base64'))}j(a){return a instanceof Uint8Array?Buffer.from(a,a.byteOffset,a.byteLength).toString('base64'):Buffer.from(a).toString('base64')}H(a){const b=this,c=()=>super.H;return u(function*(){if(a instanceof sd){const d=[];for(const e=ha(a);;){const f=yield e.next();if(f.done)break;d.push(f.value)}return Buffer.concat(d)}return c().call(b,a)})}F(a){return Promise.resolve().then(()=>td.resolveObjectURL(a)).catch(b=>
484
484
  {throw Error(`Error while trying to fetch buffer from ObjectURL: ${b}`);})}};olympe.W.config(function(a){Wa(a,olympe.V.P.Eg,olympe.Va.node.V.Jl)},'olympe.native.node.utils');olympe.async={};function ud(a,b){a.H||a.Y.push(a.F.tc(b))}
485
- olympe.async.rp=class{constructor(a,b=void 0===a){this.D=[];this.Y=[];this.F=a||new olympe.C.Wb('Async executor context');this.ja=b;this.j=null;this.env=new Map;this.env.set('Executor',this);this.H=this.N=!1;this.G=null;this.timer=this.timeout=0;this.$=olympe.V.Kc()}$f(a){0<=a&&(this.timeout=a);return this}Ya(){return this.G}add(a){this.H||this.D.push(this.F.tc(a));return this}start(){this.N||(this.G&&this.G.log('Executor started.'),this.N=!0,this.F.onDestroy(()=>{this.j='Context destroyed.';this.complete(!1)},
485
+ olympe.async.sp=class{constructor(a,b=void 0===a){this.D=[];this.Y=[];this.F=a||new olympe.C.Wb('Async executor context');this.ja=b;this.j=null;this.env=new Map;this.env.set('Executor',this);this.H=this.N=!1;this.G=null;this.timer=this.timeout=0;this.$=olympe.V.Kc()}$f(a){0<=a&&(this.timeout=a);return this}Ya(){return this.G}add(a){this.H||this.D.push(this.F.tc(a));return this}start(){this.N||(this.G&&this.G.log('Executor started.'),this.N=!0,this.F.onDestroy(()=>{this.j='Context destroyed.';this.complete(!1)},
486
486
  this.$),0<this.timeout&&(this.timer=setTimeout(()=>{this.j='Timeout expired.';this.timer=0;this.complete(!1)},this.timeout)))}clear(){this.D=[];this.Y=[];this.env.clear();this.ja&&this.F.destroy()}complete(a){this.F.Xf(this.$);if(!this.H){this.H=!0;this.timer&&(clearTimeout(this.timer),this.timer=0);this.G&&this.G.log(a?'Executor completed successfully':`Executor completed with error: ${this.j}`);for(const b of this.Y)b(a,a?null:this.j,this.env);this.clear()}}getContext(){return this.F}};
487
- function vd(a){if(0<a.D.length){const b=a.D.shift();a.G&&a.G.log(`Executing next task. ${a.D.length} tasks left in the pipeline.`);a.getContext().run(()=>{b(()=>{Promise.resolve().then(()=>{vd(a)})},c=>{c&&(a.j=c);a.complete(!1)},a.env)})}else a.complete(!0)}olympe.async.xw=class extends olympe.async.rp{static create(){return new olympe.async.xw(new olympe.C.Wb('SequencedExecutor'),!0)}start(){this.N||(super.start(),vd(this))}};
488
- olympe.async.Dk=class extends olympe.async.rp{constructor(a,b){super(a,b);this.R=0;this.ea=!0}static create(){return new olympe.async.Dk(new olympe.C.Wb('ParallelExecutor'),!0)}run(a){this.G&&this.G.log('Starting a task');this.getContext().run(()=>{a(()=>{this.done()},b=>{this.ea=!1;b&&(this.j=this.j?`${this.j}. ${b}`:b);this.done()},this.env)})}add(a){super.add(a);this.N&&!this.H&&(this.R++,this.run(a));return this}done(){this.R--;0>=this.R&&this.complete(this.ea)}start(){if(!this.N)if(super.start(),
489
- 0<this.D.length){this.R=this.D.length;for(const a of this.D)this.run(a)}else this.complete(!0)}};olympe.Db={};olympe.Db.lv=class{D(){return u(function*(){})}Y(){}N(){}F(){}R(){}forEach(){}has(){}get(){}set(){}remove(){}ea(){}$(){}clear(){}H(){}};olympe.Db.mv=class{D(){}};olympe.Db.Storage=class{open(){}write(){}close(){}};olympe.Db.wv=class{get(){return null}set(){return this}delete(){}};olympe.Db.P={qk:'localStorage.KeyValueDatabaseManager',hj:'localStorage.Storage',PA:'localStorage.DatacloudStorage',ym:'localStorage.LocalStorage',Da:'localStorage.Logger',ah:'localStorage.prefix'};olympe.W.config(function(a){Ya(a,olympe.Db.P.qk);D(a,olympe.Db.P.ah,[],()=>'olympe');D(a,olympe.Db.P.Da,[olympe.ia.P.Ea],b=>b.cd('localstorage'));C(a,olympe.Db.P.ym,olympe.Db.wv)},'olympe.localstorage');olympe.L={};olympe.L.Xb={ik:'urls.FileSvc',uo:'urls.BackupSvc',sr:'urls.RestoreBackupSvc',Kg:'urls.GetContext',Jp:'urls.GraphDef',Ho:'urls.StaticGraphDef',TRANSACTION:'urls.Transaction',gs:'urls.UserTagFromToken',Sw:'urls.UserNameFromTag',Rw:'urls.UserRoles',ew:'urls.RoleMembers',wk:'urls.OpenIDSvc'};
490
- olympe.W.config(a=>{E(a,olympe.L.Xb.ik,'rest/filesvc');E(a,olympe.L.Xb.uo,'rest/backupsvc');E(a,olympe.L.Xb.sr,'rest/backupsvc/restore');E(a,olympe.L.Xb.wk,'rest/openid');E(a,olympe.L.Xb.Kg,'rest/initialData');E(a,olympe.L.Xb.Jp,'rest/querysvc/graphDef');E(a,olympe.L.Xb.Ho,'rest/querysvc/graphDef/static');E(a,olympe.L.Xb.TRANSACTION,'rest/transaction');E(a,olympe.L.Xb.gs,'rest/token');E(a,olympe.L.Xb.Sw,'rest/authorization/getUserTag');E(a,olympe.L.Xb.Rw,'rest/authorization/getUserRoles');E(a,olympe.L.Xb.ew,
487
+ function vd(a){if(0<a.D.length){const b=a.D.shift();a.G&&a.G.log(`Executing next task. ${a.D.length} tasks left in the pipeline.`);a.getContext().run(()=>{b(()=>{Promise.resolve().then(()=>{vd(a)})},c=>{c&&(a.j=c);a.complete(!1)},a.env)})}else a.complete(!0)}olympe.async.xw=class extends olympe.async.sp{static create(){return new olympe.async.xw(new olympe.C.Wb('SequencedExecutor'),!0)}start(){this.N||(super.start(),vd(this))}};
488
+ olympe.async.Dk=class extends olympe.async.sp{constructor(a,b){super(a,b);this.R=0;this.ea=!0}static create(){return new olympe.async.Dk(new olympe.C.Wb('ParallelExecutor'),!0)}run(a){this.G&&this.G.log('Starting a task');this.getContext().run(()=>{a(()=>{this.done()},b=>{this.ea=!1;b&&(this.j=this.j?`${this.j}. ${b}`:b);this.done()},this.env)})}add(a){super.add(a);this.N&&!this.H&&(this.R++,this.run(a));return this}done(){this.R--;0>=this.R&&this.complete(this.ea)}start(){if(!this.N)if(super.start(),
489
+ 0<this.D.length){this.R=this.D.length;for(const a of this.D)this.run(a)}else this.complete(!0)}};olympe.Db={};olympe.Db.lv=class{D(){return u(function*(){})}Y(){}N(){}F(){}R(){}forEach(){}has(){}get(){}set(){}remove(){}ea(){}$(){}clear(){}H(){}};olympe.Db.mv=class{D(){}};olympe.Db.Storage=class{open(){}write(){}close(){}};olympe.Db.wv=class{get(){return null}set(){return this}delete(){}};olympe.Db.P={qk:'localStorage.KeyValueDatabaseManager',hj:'localStorage.Storage',PA:'localStorage.DatacloudStorage',zm:'localStorage.LocalStorage',Da:'localStorage.Logger',ah:'localStorage.prefix'};olympe.W.config(function(a){Ya(a,olympe.Db.P.qk);D(a,olympe.Db.P.ah,[],()=>'olympe');D(a,olympe.Db.P.Da,[olympe.ia.P.Ea],b=>b.cd('localstorage'));C(a,olympe.Db.P.zm,olympe.Db.wv)},'olympe.localstorage');olympe.L={};olympe.L.Xb={ik:'urls.FileSvc',vo:'urls.BackupSvc',sr:'urls.RestoreBackupSvc',Kg:'urls.GetContext',Jp:'urls.GraphDef',Io:'urls.StaticGraphDef',TRANSACTION:'urls.Transaction',gs:'urls.UserTagFromToken',Sw:'urls.UserNameFromTag',Rw:'urls.UserRoles',ew:'urls.RoleMembers',wk:'urls.OpenIDSvc'};
490
+ olympe.W.config(a=>{E(a,olympe.L.Xb.ik,'rest/filesvc');E(a,olympe.L.Xb.vo,'rest/backupsvc');E(a,olympe.L.Xb.sr,'rest/backupsvc/restore');E(a,olympe.L.Xb.wk,'rest/openid');E(a,olympe.L.Xb.Kg,'rest/initialData');E(a,olympe.L.Xb.Jp,'rest/querysvc/graphDef');E(a,olympe.L.Xb.Io,'rest/querysvc/graphDef/static');E(a,olympe.L.Xb.TRANSACTION,'rest/transaction');E(a,olympe.L.Xb.gs,'rest/token');E(a,olympe.L.Xb.Sw,'rest/authorization/getUserTag');E(a,olympe.L.Xb.Rw,'rest/authorization/getUserRoles');E(a,olympe.L.Xb.ew,
491
491
  'rest/authorization/roleMembers')});function wd(a,b){a.validate=b.ack.bind(b);a.H=b.xi();return a}
492
- olympe.L.xa=class{constructor(a,b,c,d,e,f){this.be=c;this.F=a;this.source=b;this.D=d;this.messageType=e;this.j=null!=f?f:null;this.H=!1;this.validate=()=>u(function*(){})}static F(a,b,c){const d=olympe.L.xa.D.Km,e=bd(a);let f;var g=olympe.L.xa,h=e[olympe.L.xa.D.DESTINATION],k=e[olympe.L.xa.D.$g],l=e[olympe.L.xa.D.Mk],n=e[olympe.L.xa.D.ng],p=e[olympe.L.xa.D.TYPE];b.R=c;return wd(new g(h,k,l,n,p,b.N(null!=(f=e[d])?f:null)),a)}xi(){return this.H}jc(){return this.F}jb(){return this.source}getType(){return this.messageType}ack(){return this.validate()}ga(a,b){const c=
493
- olympe.L.xa.D.Km,d={[olympe.L.xa.D.DESTINATION]:this.F,[olympe.L.xa.D.$g]:this.source,[olympe.L.xa.D.Mk]:this.be,[olympe.L.xa.D.ng]:this.D,[olympe.L.xa.D.TYPE]:this.messageType};null!==this.j&&(a.Y=b,d[c]=a.ga(this.j));return d}toString(){return`Message(dest: ${this.F}, src: ${this.source}, seqId: ${this.be}, topic: ${this.D}, type: ${this.messageType}, payload: ${this.j})`}};olympe.L.xa.D={DESTINATION:'d',$g:'s',Mk:'i',ng:'tp',TYPE:'t',Km:'p',If:'tk'};
494
- olympe.L.xa.j={SEND:0,GET:1,SUBSCRIBE:2,PUBLISH:3,ks:4,ke:5,ng:6,zb:7,Gr:10,Zr:11,ig:12,cs:13,Vm:14,Ep:15};olympe.L.Xm=class extends olympe.L.xa{constructor(a,b,c,d,e,f,g){super(a,b,d,e,f,g);this.ed=c}static F(a,b,c){const d=olympe.L.xa.D.Km,e=bd(a);let f;var g=olympe.L.Xm,h=e[olympe.L.xa.D.DESTINATION],k=e[olympe.L.xa.D.$g],l=e[olympe.L.xa.D.If],n=e[olympe.L.xa.D.Mk],p=e[olympe.L.xa.D.ng],q=e[olympe.L.xa.D.TYPE];b.R=c;b=new g(h,k,l,n,p,q,b.N(null!=(f=e[d])?f:null));wd(b,a);return b}te(){return this.ed}ga(a,b){return Object.assign(super.ga(a,b),{[olympe.L.xa.D.If]:this.ed})}toString(){return`SignedMessage{dest: ${this.F}, src: ${this.source}, seqId: ${this.be}, topic: ${this.D}, type: ${this.messageType}, token: ${this.ed}, payload: ${this.j}}`}};const xd=olympe.L.xa.j.SEND,yd=olympe.L.xa.j.GET,zd=olympe.L.xa.j.SUBSCRIBE,Ad=olympe.L.xa.j.ig,Bd=olympe.L.xa.j.Gr,Cd=olympe.L.xa.j.zb,Dd=olympe.L.xa.j.ks,Ed=olympe.L.xa.j.ng,Fd=olympe.L.xa.j.Zr;
492
+ olympe.L.xa=class{constructor(a,b,c,d,e,f){this.be=c;this.F=a;this.source=b;this.D=d;this.messageType=e;this.j=null!=f?f:null;this.H=!1;this.validate=()=>u(function*(){})}static F(a,b,c){const d=olympe.L.xa.D.Lm,e=bd(a);let f;var g=olympe.L.xa,h=e[olympe.L.xa.D.DESTINATION],k=e[olympe.L.xa.D.$g],l=e[olympe.L.xa.D.Mk],n=e[olympe.L.xa.D.ng],p=e[olympe.L.xa.D.TYPE];b.R=c;return wd(new g(h,k,l,n,p,b.N(null!=(f=e[d])?f:null)),a)}xi(){return this.H}jc(){return this.F}jb(){return this.source}getType(){return this.messageType}ack(){return this.validate()}ga(a,b){const c=
493
+ olympe.L.xa.D.Lm,d={[olympe.L.xa.D.DESTINATION]:this.F,[olympe.L.xa.D.$g]:this.source,[olympe.L.xa.D.Mk]:this.be,[olympe.L.xa.D.ng]:this.D,[olympe.L.xa.D.TYPE]:this.messageType};null!==this.j&&(a.Y=b,d[c]=a.ga(this.j));return d}toString(){return`Message(dest: ${this.F}, src: ${this.source}, seqId: ${this.be}, topic: ${this.D}, type: ${this.messageType}, payload: ${this.j})`}};olympe.L.xa.D={DESTINATION:'d',$g:'s',Mk:'i',ng:'tp',TYPE:'t',Lm:'p',If:'tk'};
494
+ olympe.L.xa.j={SEND:0,GET:1,SUBSCRIBE:2,PUBLISH:3,ks:4,ke:5,ng:6,zb:7,Gr:10,Zr:11,ig:12,cs:13,Wm:14,Ep:15};olympe.L.Ym=class extends olympe.L.xa{constructor(a,b,c,d,e,f,g){super(a,b,d,e,f,g);this.ed=c}static F(a,b,c){const d=olympe.L.xa.D.Lm,e=bd(a);let f;var g=olympe.L.Ym,h=e[olympe.L.xa.D.DESTINATION],k=e[olympe.L.xa.D.$g],l=e[olympe.L.xa.D.If],n=e[olympe.L.xa.D.Mk],p=e[olympe.L.xa.D.ng],q=e[olympe.L.xa.D.TYPE];b.R=c;b=new g(h,k,l,n,p,q,b.N(null!=(f=e[d])?f:null));wd(b,a);return b}te(){return this.ed}ga(a,b){return Object.assign(super.ga(a,b),{[olympe.L.xa.D.If]:this.ed})}toString(){return`SignedMessage{dest: ${this.F}, src: ${this.source}, seqId: ${this.be}, topic: ${this.D}, type: ${this.messageType}, token: ${this.ed}, payload: ${this.j}}`}};const xd=olympe.L.xa.j.SEND,yd=olympe.L.xa.j.GET,zd=olympe.L.xa.j.SUBSCRIBE,Ad=olympe.L.xa.j.ig,Bd=olympe.L.xa.j.Gr,Cd=olympe.L.xa.j.zb,Dd=olympe.L.xa.j.ks,Ed=olympe.L.xa.j.ng,Fd=olympe.L.xa.j.Zr;
495
495
  olympe.L.Fc=class{constructor(a,b,c){this.j=a;this.D=b;this.F=c;this.user=null;Object.defineProperties(this,{D:{enumerable:!1},F:{enumerable:!1}})}Bi(){return null!==this.user?Promise.resolve(this.user):Gd(this.D,this.j).then(a=>this.user=a)}xi(){return this.j.xi()}mt(){return this.j.getType()}source(){return this.j.jb()}body(){return this.j.j}ack(){const a=this;return u(function*(){if(a.j.getType()!==xd)throw Error('Should only call `ack` on SEND requests');yield a.j.ack();yield a.D.dd(a.j,Bd)})}dd(a){const b=
496
- this;return u(function*(){const c=b.j.getType();if(c===yd||c===Ad)yield b.j.ack(),yield b.D.dd(b.j,Dd,a);else throw Error('Should only call `reply` on GET requests');})}Qn(a){return this.j.getType()!==zd?Promise.reject(Error('Should only call `notifyOn` on SUBSCRIBE requests')):new Promise((b,c)=>{const d=`sub_${olympe.V.Kc()}`,e={seq:Hd(this.D,f=>{switch(f.getType()){case Fd:Id(this.F,d);b(d);break;case Cd:c(f.j.reason);break;default:c('Unsupported response type for a SUBSCRIBE request')}}),topic:a,
497
- id:d,refresh:this.D.ff};this.j.ack().then(()=>this.D.dd(this.j,Ed,e)).catch(c)})}mi(a){const b=this;return u(function*(){yield b.D.dd(b.j,Cd,{reason:a.message})})}};olympe.L.Fc.prototype.fail=olympe.L.Fc.prototype.mi;olympe.L.Fc.prototype.notifyOn=olympe.L.Fc.prototype.Qn;olympe.L.Fc.prototype.reply=olympe.L.Fc.prototype.dd;olympe.L.Fc.prototype.ack=olympe.L.Fc.prototype.ack;olympe.L.Fc.prototype.body=olympe.L.Fc.prototype.body;olympe.L.Fc.prototype.source=olympe.L.Fc.prototype.source;
496
+ this;return u(function*(){const c=b.j.getType();if(c===yd||c===Ad)yield b.j.ack(),yield b.D.dd(b.j,Dd,a);else throw Error('Should only call `reply` on GET requests');})}Rn(a){return this.j.getType()!==zd?Promise.reject(Error('Should only call `notifyOn` on SUBSCRIBE requests')):new Promise((b,c)=>{const d=`sub_${olympe.V.Kc()}`,e={seq:Hd(this.D,f=>{switch(f.getType()){case Fd:Id(this.F,d);b(d);break;case Cd:c(f.j.reason);break;default:c('Unsupported response type for a SUBSCRIBE request')}}),topic:a,
497
+ id:d,refresh:this.D.ff};this.j.ack().then(()=>this.D.dd(this.j,Ed,e)).catch(c)})}mi(a){const b=this;return u(function*(){yield b.D.dd(b.j,Cd,{reason:a.message})})}};olympe.L.Fc.prototype.fail=olympe.L.Fc.prototype.mi;olympe.L.Fc.prototype.notifyOn=olympe.L.Fc.prototype.Rn;olympe.L.Fc.prototype.reply=olympe.L.Fc.prototype.dd;olympe.L.Fc.prototype.ack=olympe.L.Fc.prototype.ack;olympe.L.Fc.prototype.body=olympe.L.Fc.prototype.body;olympe.L.Fc.prototype.source=olympe.L.Fc.prototype.source;
498
498
  olympe.L.Fc.prototype.requestType=olympe.L.Fc.prototype.mt;olympe.L.Fc.prototype.isRedelivered=olympe.L.Fc.prototype.xi;olympe.L.Fc.prototype.userTag=olympe.L.Fc.prototype.Bi;function Jd(a,b){b&&a.rf();null===a.D&&(a.D=setInterval(a.rf.bind(a),a.F))}function Kd(a){if(null!==a.D){var b=a.D;a.D=null;clearInterval(b)}}function Ld(a){return Array.from(a.j.values()).reduce((b,c)=>b+c.size,0)}function Md(a,b,c){const d=a.j.get(b);c=!(null==d||!d.delete(c));0===(null==d?void 0:d.size)&&a.j.delete(b)&&0===a.j.size&&Kd(a);return c}function Nd(a){a.j.forEach((b,c)=>{b.forEach((d,e)=>{Md(a,c,e);null==d||d(new olympe.error.Qh(`Subscription ${e} to be refreshed`,e))})})}
499
499
  function Od(a,b,c){let d;null==(d=a.j.get(b))||d.forEach((e,f)=>{Md(a,b,f);e(c)})}
500
500
  olympe.L.Dw=class{constructor(a,b,c,d){this.G=a;this.H=b;this.N=c;this.F=d;this.j=new Map;this.D=null}rf(){if(Pd(this.H)){var a=olympe.L.xa.j.ig;this.j.forEach((b,c)=>{this.H.request(c,this.N,a,Array.from(b.keys()),!0).then(d=>{d=d.j;0<d.length&&d.forEach(e=>{let f;const g=null==(f=this.j.get(c))?void 0:f.get(e);Md(this,c,e);null==g||g(new olympe.error.Qh('Subscription does not exist in the service.',e))})}).catch(d=>{const e=`Impossible to keep alive subscriptions of provider ${c}: ${d}`;d instanceof
@@ -506,7 +506,7 @@ function Td(a){a.G.info('Disconnected from bus.');let b;null==(b=a.D)||b.forEach
506
506
  function Vd(a){a.G.j()?a.G.debug(`Connected to bus: subscribe to ${a.$.size} active topics.`):a.G.info(`Connected to bus (session: ${a.j}).`);let b;null==(b=a.D)||b.forEach((c,d)=>{null===c.D&&(a.G.debug(`Connected to bus: start keep alive of ${Ld(c)} subscriptions for ${d} service.`),Jd(c,!0))});a.R.forEach(c=>c(null));a.R=[]}function Yd(a){a.Gd=a.ja.j(()=>Pd(a)?Promise.resolve('Bus connection OK'):Promise.reject('Bus is disconnected'))}
507
507
  function Zd(a,b,c,d=new Map){a.Nd.j&&sb(a.Nd,'com',d.set('id',`${b}`).set('channel','bus').set('eventType',c))}function $d(a,b,c){const d=`${b}:${c}`;b=a.ea.get(d);b||(b=new olympe.L.Yq(()=>a.ea.delete(d)),a.ea.set(d,b));return b}
508
508
  function ae(a,b){const c=olympe.L.Me.Hg,d=olympe.L.Me.Fh,e=olympe.L.Me.zb,f=b.j,{id:g,e:h}=f,k=`${b.jb()}:${g}`,l=$d(a,b.jb(),g);if(h===c){gb(a.ea.j,k);const {i:n,c:p}=f;l.write(p,n).catch(q=>{l.throw(q)})}else h===d?l.complete(f.s):h===e&&l.throw(Error(`Received stream error: ${f.reason}`));b.ack().catch(n=>a.G.error(`Failed to ack message: ${n}`))}
509
- function be(a,b,c){return u(function*(){let d;if('number'===typeof c)d=c;else{const f=ce(a,b,b,olympe.L.xa.j.Ep);d=f.be;yield a.ld(f)}let e=a.Wa.get(d);e||(e=[],a.Wa.set(d,e));return olympe.V.Promise.$f(new Promise(f=>{e.push(g=>f(g))}),15E3,`Timeout while getting the destination (sessionId) for message ${d}.`)})}function ce(a,b,c,d,e){const f=de(a.H).Hd();a.ta++;return new olympe.L.Xm(b,a.j,f,a.ta,c,d,e)}
509
+ function be(a,b,c){return u(function*(){let d;if('number'===typeof c)d=c;else{const f=ce(a,b,b,olympe.L.xa.j.Ep);d=f.be;yield a.ld(f)}let e=a.Wa.get(d);e||(e=[],a.Wa.set(d,e));return olympe.V.Promise.$f(new Promise(f=>{e.push(g=>f(g))}),15E3,`Timeout while getting the destination (sessionId) for message ${d}.`)})}function ce(a,b,c,d,e){const f=de(a.H).Hd();a.ta++;return new olympe.L.Ym(b,a.j,f,a.ta,c,d,e)}
510
510
  function ee(a,b,c,d){const e=b.be,f=h=>{g&&clearTimeout(g);a.Y.delete(e);c(h)};a.Y.set(e,f);const g=setTimeout(()=>f(new olympe.L.xa(a.j,a.j,e,b.D,olympe.L.xa.j.zb,{reason:'Timeout',code:olympe.error.mc.TIMEOUT})),d)}function fe(a,b,c,d,e,f){null===a.D&&(a.D=new Map);var g=a.D.get(b);g?(a=g,a.F!==e&&(a.F=e,null!==a.D&&(Kd(a),Jd(a,!1)))):(g=new olympe.L.Dw(a.G,a,b,e),a.D.set(b,g));e=g;g=e.j.size;a=e.j.get(c);a||(a=new Map,e.j.set(c,a));a.set(d,f);0===g&&Jd(e,!1)}
511
511
  function ge(a,b,c,d){var e;const f=null==(e=a.D)?void 0:e.get(b);if(null==f?0:Md(f,c,d))e=olympe.L.xa.j.cs,Pd(a)&&a.ld(ce(a,c,b,e,d)).catch(g=>a.G.error(`Impossible to keep alive subscriptions: ${g}`)),0===Ld(f)&&(a.D.delete(b),0===a.D.size&&(a.D=null))}
512
512
  olympe.L.Ll=class{constructor(a,b,c,d,e,f,g,h){this.G=a;this.wd=c;this.H=d;this.ja=e;this.le=f;this.Nd=g;this.Y=new Map;this.j=`${'olympe-runtime'}-${olympe.V.Kc()}`;this.mb=h.get('requestTimeout');this.ff=h.get('subscriptionsRefreshRate');this.Pc=h.get('allowGuest');a=h.get('connection');d=this.H.ed.tb().asObservable();c=c.Wf().asObservable();c=rxjs.combineLatest([a,d,c]).pipe(rxjs.operators.map(([k,l,n])=>n.valueOf()?Object.assign({},k,{user:l.yc(),ed:l.Hd()}):null));this.F=b.N(c,this.j);Sd(this);
@@ -516,42 +516,42 @@ this.Pe=this.ja.Ha(()=>this.disconnect(),'Bus websocket')):c(Error('Guest user i
516
516
  (yield c.connect());var d=a.F.startsWith('olympe-runtime'),e=d?a.jc():c.Yb+a.jc();try{Zd(c,a.be.toString(),'serialize');var f=a.ga(c.le,c.ug.bind(c,a.D,a.be));c.G.j()&&c.G.debug(`BUS > #${e}:`,JSON.stringify(f))}catch(h){throw Error(`An error occurred while serializing the message (seqId=${a.be}): ${h}`);}var g=Qd.has(a.getType());yield c.F.ld(a.be,e,f,{mandatory:g,xt:!(d||b)});Zd(c,a.be.toString(),'publish',(new Map).set('destination',a.jc()).set('messageType',a.getType().toString()))}})}ug(a,b,
517
517
  c){const d=this.ni++;(()=>{const e=this;return u(function*(){let f;try{f=yield be(e,a,b)}catch(p){e.G.error(`Error to get the destSessionId for the stream ${d}: ${p}`);return}const g=p=>e.ld(new olympe.L.xa(f,e.j,b,a,olympe.L.xa.j.ke,p)),h=olympe.L.Me.Hg,k=olympe.L.Me.Fh,l=olympe.L.Me.zb;let n=0;try{for(const p=ha(c);;){const q=yield p.next();if(q.done)break;const r=q.value;yield g({id:d,i:n++,e:h,c:r})}yield g({id:d,s:n,e:k})}catch(p){yield g({id:d,e:l,reason:`Error to complete the stream: ${p}`})}})})();
518
518
  return d}dd(a,b,c){return this.send(a.be,a.jb(),a.jb(),b,c)}send(a,b,c,d,e){return this.ld(new olympe.L.xa(c,this.j,a,b,d,e))}request(a,b,c,d,e,f){const g=ce(this,a,b,c,d);return c===olympe.L.xa.j.PUBLISH?this.ld(g,e):new Promise((h,k)=>{ee(this,g,h,null!=f?f:this.mb);this.ld(g,e).catch(k)})}tg(a,b){const c=olympe.L.xa.D.$g;a=olympe.L.xa.D.Mk;var d=olympe.L.xa.D.If;const e=b.R,f=bd(b);if(f[c]===this.j&&e===this.j)this.G.debug('Received and ignore a message sent by the same runtime.'),b.ack().catch(k=>
519
- this.G.error(`Failed to ack message: ${k}`));else{this.G.j()&&this.G.debug(`BUS < #${b.N}:`,JSON.stringify(f));Zd(this,f[a],'consumed');a=void 0===f[d]?olympe.L.xa.F:olympe.L.Xm.F;d=null;var g=!1;try{d=a.call(null,b,this.le,k=>{g=!0;return $d(this,f[c],k).stream}),Qd.has(d.getType())||b.ack().catch(k=>this.G.error(`Failed to ack message: ${k}`))}catch(k){this.G.error(`An error occurred while trying to deserialize the message: ${JSON.stringify(f)} with error ${k}`);cd(b).catch(l=>this.G.error(`Failed to reject message: ${l}`));
520
- return}var h=d;b=h.be;Zd(this,b.toString(),'deserialized',(new Map).set('source',h.jb()).set('messageType',h.getType().toString()));switch(h.getType()){case olympe.L.xa.j.ke:ae(this,h);break;case olympe.L.xa.j.Ep:this.dd(h,olympe.L.xa.j.Vm).catch(l=>this.G.error(`Failed to reply to get session message: ${l}`));break;case olympe.L.xa.j.Vm:let k;null==(k=this.Wa.get(b))||k.forEach(l=>l(h.jb()));break;default:g&&this.dd(h,olympe.L.xa.j.Vm).catch(l=>this.G.error(`Failed to send session id for stream publishing: ${l}`));
521
- try{let l;null==(l=this.$.get(h.D))||l(h)}catch(l){this.G.error(`An error occurred while trying to handle the message: ${l}`)}}}}};olympe.L.Ll.D='Timeout';olympe.L.Ll.j='olympe-runtime';const ie=olympe.net.wa.Headers.so,je=olympe.net.wa.Ub.Rh,ke=olympe.net.wa.Ub.No,le=olympe.net.wa.Ub.Rj,me=olympe.net.wa.Ub.lw,ne=olympe.net.wa.Ub.Lo,oe=olympe.net.wa.Ub.kk,pe=olympe.net.wa.Ub.Mw,qe=olympe.net.wa.Ub.Zi;function re(a,b){let c;return null!=(c=a.F.get(b))?c:''}function se(a,b,c,d=new Map){a.j.j&&sb(a.j,'com',d.set('id',`${b}`).set('channel','http').set('eventType',c))}
519
+ this.G.error(`Failed to ack message: ${k}`));else{this.G.j()&&this.G.debug(`BUS < #${b.N}:`,JSON.stringify(f));Zd(this,f[a],'consumed');a=void 0===f[d]?olympe.L.xa.F:olympe.L.Ym.F;d=null;var g=!1;try{d=a.call(null,b,this.le,k=>{g=!0;return $d(this,f[c],k).stream}),Qd.has(d.getType())||b.ack().catch(k=>this.G.error(`Failed to ack message: ${k}`))}catch(k){this.G.error(`An error occurred while trying to deserialize the message: ${JSON.stringify(f)} with error ${k}`);cd(b).catch(l=>this.G.error(`Failed to reject message: ${l}`));
520
+ return}var h=d;b=h.be;Zd(this,b.toString(),'deserialized',(new Map).set('source',h.jb()).set('messageType',h.getType().toString()));switch(h.getType()){case olympe.L.xa.j.ke:ae(this,h);break;case olympe.L.xa.j.Ep:this.dd(h,olympe.L.xa.j.Wm).catch(l=>this.G.error(`Failed to reply to get session message: ${l}`));break;case olympe.L.xa.j.Wm:let k;null==(k=this.Wa.get(b))||k.forEach(l=>l(h.jb()));break;default:g&&this.dd(h,olympe.L.xa.j.Wm).catch(l=>this.G.error(`Failed to send session id for stream publishing: ${l}`));
521
+ try{let l;null==(l=this.$.get(h.D))||l(h)}catch(l){this.G.error(`An error occurred while trying to handle the message: ${l}`)}}}}};olympe.L.Ll.D='Timeout';olympe.L.Ll.j='olympe-runtime';const ie=olympe.net.wa.Headers.uo,je=olympe.net.wa.Ub.Rh,ke=olympe.net.wa.Ub.Oo,le=olympe.net.wa.Ub.Rj,me=olympe.net.wa.Ub.lw,ne=olympe.net.wa.Ub.Mo,oe=olympe.net.wa.Ub.kk,pe=olympe.net.wa.Ub.Mw,qe=olympe.net.wa.Ub.Zi;function re(a,b){let c;return null!=(c=a.F.get(b))?c:''}function se(a,b,c,d=new Map){a.j.j&&sb(a.j,'com',d.set('id',`${b}`).set('channel','http').set('eventType',c))}
522
522
  function te(a,b,c){if(null===b)return Promise.reject('No http request to send');Gc(b,{[ie]:c});const d=b.j();return rxjs.firstValueFrom(rxjs.defer(()=>{a.D++;const e=a.D;if(a.G.j()){const f=b.body;a.G.debug('HTTP >',d,`body: ${'string'===typeof f?f:typeof f}`)}se(a,e,'request',(new Map).set('destination',b.j()).set('messageType',b.method.toString()));return Jc(a.H,b).then(f=>{se(a,e,'reply');switch(f.Jc()){case je:case ke:case le:var g=f.getData();a.G.j()&&a.G.debug('HTTP <',f.Jc(),`content: ${'string'===
523
- typeof g?g:typeof g}`);return f;case me:throw f=`HTTP < Service provider for http request to ${b.j()} is overloaded, retry later`,a.G.warn(f),new olympe.error.Zq(f);case ne:return a.G.debug(`HTTP < request canceled (${b.j()}).`),f;case oe:case pe:throw f=`HTTP < request authorization denied: ${b.j()}, ${f.statusText}`,a.G.error(f),new olympe.error.uk(f);case qe:throw f=`HTTP < requested resource not found: ${b.j()}`,a.G.error(f),new olympe.error.Dm(f);default:g=`HTTP < Error: ${f.Jc()}, ${f.statusText}`;
524
- a.G.error(g);if(500===f.Jc()&&'Connection refused'===f.statusText)throw new olympe.error.To(g);throw new olympe.error.pd(g);}})}).pipe(tb(olympe.error.Zq,(e,f)=>{a.G.warn(`Service overloaded (${d}), retry sending http request after ${f}ms.`)},a.N)))}olympe.L.uu=class{constructor(a,b,c,d,e){this.G=a;this.H=b;this.j=c;this.F=null;d.subscribe(f=>{this.F=f});this.N=e;this.D=0}};function O(a,b){if(a.state!==b)switch(a.G.debug('State change '+a.state+' --\x3e '+b),a.state=b,a.Eb.forEach(c=>c(b)),b){case olympe.L.Oa.j.Zk:case olympe.L.Oa.j.CONNECTING:case olympe.L.Oa.j.ep:break;case olympe.L.Oa.j.ze:a.connected.update(olympe.C.da.D);break;case olympe.L.Oa.j.Ug:a.F=[0,0,a.F[2]];ue(a);break;case olympe.L.Oa.j.zb:let c;a.G.error('Connection to server',null==(c=a.N)?void 0:c.j(),'aborted due to error');a.connected.update(olympe.C.da.j);break;case olympe.L.Oa.j.no:ue(a);break;case olympe.L.Oa.j.vc:a.connected.update(olympe.C.da.j);
523
+ typeof g?g:typeof g}`);return f;case me:throw f=`HTTP < Service provider for http request to ${b.j()} is overloaded, retry later`,a.G.warn(f),new olympe.error.Zq(f);case ne:return a.G.debug(`HTTP < request canceled (${b.j()}).`),f;case oe:case pe:throw f=`HTTP < request authorization denied: ${b.j()}, ${f.statusText}`,a.G.error(f),new olympe.error.uk(f);case qe:throw f=`HTTP < requested resource not found: ${b.j()}`,a.G.error(f),new olympe.error.Em(f);default:g=`HTTP < Error: ${f.Jc()}, ${f.statusText}`;
524
+ a.G.error(g);if(500===f.Jc()&&'Connection refused'===f.statusText)throw new olympe.error.Uo(g);throw new olympe.error.pd(g);}})}).pipe(tb(olympe.error.Zq,(e,f)=>{a.G.warn(`Service overloaded (${d}), retry sending http request after ${f}ms.`)},a.N)))}olympe.L.uu=class{constructor(a,b,c,d,e){this.G=a;this.H=b;this.j=c;this.F=null;d.subscribe(f=>{this.F=f});this.N=e;this.D=0}};function O(a,b){if(a.state!==b)switch(a.G.debug('State change '+a.state+' --\x3e '+b),a.state=b,a.Eb.forEach(c=>c(b)),b){case olympe.L.Oa.j.Zk:case olympe.L.Oa.j.CONNECTING:case olympe.L.Oa.j.fp:break;case olympe.L.Oa.j.ze:a.connected.update(olympe.C.da.D);break;case olympe.L.Oa.j.Ug:a.F=[0,0,a.F[2]];ue(a);break;case olympe.L.Oa.j.zb:let c;a.G.error('Connection to server',null==(c=a.N)?void 0:c.j(),'aborted due to error');a.connected.update(olympe.C.da.j);break;case olympe.L.Oa.j.oo:ue(a);break;case olympe.L.Oa.j.vc:a.connected.update(olympe.C.da.j);
525
525
  break;default:throw Error('State machine error in server manager. Should not get in state '+b);}}
526
- function ve(a){const b=olympe.L.Oa.j.no,c=olympe.L.Oa.j.Zk,d=olympe.L.Oa.j.vc,e=Fc(a.$);a.G.info(`Trying to wakeup orchestrator with ${e}`);O(a,c);const f=a.Gc.D(a.$);f.$(g=>{const h=JSON.parse(g);a.G.info(`${e}: ${null==h?void 0:h.status}`);switch(null==h?void 0:h.status){case 'ready':O(a,b);f.close();break;case 'asleep':a.G.info(`Trying to wakeup orchestrator with ${e}`);f.send('{"action": "wakeup"}');O(a,c);break;case 'waking-up':break;default:a.G.warn(`Invalid message from ${e}: ${g}`),f.close(),
526
+ function ve(a){const b=olympe.L.Oa.j.oo,c=olympe.L.Oa.j.Zk,d=olympe.L.Oa.j.vc,e=Fc(a.$);a.G.info(`Trying to wakeup orchestrator with ${e}`);O(a,c);const f=a.Gc.D(a.$);f.$(g=>{const h=JSON.parse(g);a.G.info(`${e}: ${null==h?void 0:h.status}`);switch(null==h?void 0:h.status){case 'ready':O(a,b);f.close();break;case 'asleep':a.G.info(`Trying to wakeup orchestrator with ${e}`);f.send('{"action": "wakeup"}');O(a,c);break;case 'waking-up':break;default:a.G.warn(`Invalid message from ${e}: ${g}`),f.close(),
527
527
  O(a,d)}});f.D(()=>{a.G.warn(`Communication with ${e} failed.`);f.close();O(a,d)});f.ea(()=>{a.G.info(`Checking orchestrator status with ${e}`);f.send('{"action": "status"}')})}
528
- function we(a,b,c){a.G.log('Initializing COMMUNICATION layer');if(a.G.j()){const d=['Server layer parameters:'];b.forEach((e,f)=>{d.push(f+'="'+e+'"')});a.G.debug(d.join('\n\t'))}xe(a,olympe.L.Ee.zb,d=>{switch(d.c){case olympe.L.sk.Ow:a.G.error('Unknown message sent to the server:',olympe.L.Oa.pc[d.s]);break;case olympe.L.sk.mu:a.G.error('Fatal error, the last message is probably too big according to the websocket config.'),a.D.forEach((e,f)=>{null!==e.Vn&&ye(a,f,d.i)})}});xe(a,olympe.L.Ee.pc,d=>
528
+ function we(a,b,c){a.G.log('Initializing COMMUNICATION layer');if(a.G.j()){const d=['Server layer parameters:'];b.forEach((e,f)=>{d.push(f+'="'+e+'"')});a.G.debug(d.join('\n\t'))}xe(a,olympe.L.Ee.zb,d=>{switch(d.c){case olympe.L.sk.Ow:a.G.error('Unknown message sent to the server:',olympe.L.Oa.pc[d.s]);break;case olympe.L.sk.mu:a.G.error('Fatal error, the last message is probably too big according to the websocket config.'),a.D.forEach((e,f)=>{null!==e.Wn&&ye(a,f,d.i)})}});xe(a,olympe.L.Ee.pc,d=>
529
529
  {d.c===olympe.L.sk.aw&&'boolean'===typeof d.a&&a.ug.update(olympe.C.Sb(d.a))});olympe.C.Gj(a.connected,()=>{let d=!1;olympe.C.Gj(a.Wa.j(),()=>{d&&(a.Pc(),a.mb(),d=!1);Dc(a.Pc.bind(a),a.Nd);Dc(a.mb.bind(a),a.ta)},()=>{a.F=[0,0,a.F[2]];d=!0})},()=>{a.R=null;Cc(a.mb.bind(a),a.ta)});c.j(()=>ze(a)?Promise.resolve('WebSocket connection to Orchestrator OK'):Promise.reject(`WebSocket connection to Orchestrator is ${a.state}`));c.Ha(()=>a.disconnect(),'Orchestrator websocket');ib(a.H,(d,e)=>{e.throw(Error('Stream timeout'))});
530
530
  a.G.log('DONE initializing SERVER layer (waiting for NET layer connection to be opened)')}function ze(a){return a.state===olympe.L.Oa.j.ze}function Ae(a,b,c,d=!1){const e=f=>{if(0===b.length||b.includes(f))d&&a.Eb.delete(e),c(f)};a.Eb.add(e);e(a.state)}function Be(a,b,c,d,e){a.ea.j&&sb(a.ea,'com',d.set('id',`${b}`).set('channel','ws').set('eventType',c),e)}
531
531
  function ue(a){const b=olympe.L.Oa.j.INIT,c=olympe.L.Oa.j.CONNECTING,d=olympe.L.Oa.j.ze,e=olympe.L.Oa.j.vc,f=olympe.L.Oa.j.Ug,g=olympe.L.Oa.j.Zk,h=olympe.L.Oa.j.zb;if(null===a.N)a.G.warn('Trying to open a connection to the orchestrator without a valid server request. Ignoring...'),O(a,e);else{null!==a.j&&(a.j.Y(null),a.j.close());var k,l;a.G.log(`Asking NET layer for a connection to ${null==(k=a.N)?void 0:Ec(k)}:${null==(l=a.N)?void 0:l.port}...`);a.j=a.Gc.D(a.N);a.j.ea(a.le.bind(a));a.j.$(a.ff.bind(a));
532
- a.j.Y(()=>{a.j=null;a.state===d?O(a,f):a.state!==h&&a.state!==g&&O(a,e)});a.$&&a.state===b&&a.j.D(()=>{a.j.D(null);a.state===c&&ve(a);a.$=null});a.state!==f&&O(a,c)}}function Ce(a,b,c,d){const e=a.Pe;a.Pe++;c={message:{seqId:e,messageFamily:b,payload:c},pn:d?De(d):null,Vn:null};a.D.set(e,c);Be(a,e,'publish',(new Map).set('family',b));d=[olympe.L.Oa.j.CONNECTING,olympe.L.Oa.j.Ug];(ze(a)||b===olympe.L.Ee.nk&&d.includes(a.state))&&Ee(a,e,c)}
532
+ a.j.Y(()=>{a.j=null;a.state===d?O(a,f):a.state!==h&&a.state!==g&&O(a,e)});a.$&&a.state===b&&a.j.D(()=>{a.j.D(null);a.state===c&&ve(a);a.$=null});a.state!==f&&O(a,c)}}function Ce(a,b,c,d){const e=a.Pe;a.Pe++;c={message:{seqId:e,messageFamily:b,payload:c},qn:d?De(d):null,Wn:null};a.D.set(e,c);Be(a,e,'publish',(new Map).set('family',b));d=[olympe.L.Oa.j.CONNECTING,olympe.L.Oa.j.Ug];(ze(a)||b===olympe.L.Ee.nk&&d.includes(a.state))&&Ee(a,e,c)}
533
533
  function De(a){const b=olympe.L.Oa.D.ij;return c=>{if(null!==c&&void 0!==c){var d=null,e=c.s;if(void 0!==e&&e!==b){d=void 0!==olympe.L.Oa.pc[e]?`Status code = ${e} [${olympe.L.Oa.pc[e]}]`:`Status code = ${e}`;e=olympe.error.Br;const f=c.error;'string'===typeof f&&0<f.length&&(f.includes('Message timeout')&&(e=olympe.error.Vk),d+=`\nReason:\n${f}`);d=new e('Rejected by orchestrator:\n'+d)}a(d,c)}}}
534
- function Ee(a,b,c){var d=c.message;a.G.j()&&a.G.debug('WS >',JSON.stringify(d.payload));(d=a.j.send(JSON.stringify(d)))?null===c.pn?a.D.delete(b):c.Vn=Date.now():olympe.C.Qa(a.Wa.j()).valueOf()&&O(a,olympe.L.Oa.j.Ug);return d}function xe(a,b,c,d){void 0===d&&(d=olympe.V.Kc());let e=a.ja.get(b);void 0===e&&(e=new Map,a.ja.set(b,e));e.set(d,c)}function Fe(a){a=a.ja.get(olympe.L.Ee.Og);void 0!==a&&a.delete('logoutHandler')}
535
- function ye(a,b,c){if(a.D.has(b)){const {pn:d}=a.D.get(b);a.D.delete(b);null==d||d({s:olympe.L.Oa.D.cq,error:c})}}function Ge(a,b){a.G.error(b);O(a,olympe.L.Oa.j.zb)}function He(a,b,c){a.wd=c?1E3*c:-1;let d;a.G.info(`Connected to ${null==(d=a.N)?void 0:d.j()}`,'|',b?`server version: ${b}`:'','|',null!==c?`activity timeout: ${c}s`:'');b=Array.from(a.D).sort(([e],[f])=>e-f);for(const [e,f]of b)if(!Ee(a,e,f))return;O(a,olympe.L.Oa.j.ze)}
534
+ function Ee(a,b,c){var d=c.message;a.G.j()&&a.G.debug('WS >',JSON.stringify(d.payload));(d=a.j.send(JSON.stringify(d)))?null===c.qn?a.D.delete(b):c.Wn=Date.now():olympe.C.Qa(a.Wa.j()).valueOf()&&O(a,olympe.L.Oa.j.Ug);return d}function xe(a,b,c,d){void 0===d&&(d=olympe.V.Kc());let e=a.ja.get(b);void 0===e&&(e=new Map,a.ja.set(b,e));e.set(d,c)}function Fe(a){a=a.ja.get(olympe.L.Ee.Og);void 0!==a&&a.delete('logoutHandler')}
535
+ function ye(a,b,c){if(a.D.has(b)){const {qn:d}=a.D.get(b);a.D.delete(b);null==d||d({s:olympe.L.Oa.D.cq,error:c})}}function Ge(a,b){a.G.error(b);O(a,olympe.L.Oa.j.zb)}function He(a,b,c){a.wd=c?1E3*c:-1;let d;a.G.info(`Connected to ${null==(d=a.N)?void 0:d.j()}`,'|',b?`server version: ${b}`:'','|',null!==c?`activity timeout: ${c}s`:'');b=Array.from(a.D).sort(([e],[f])=>e-f);for(const [e,f]of b)if(!Ee(a,e,f))return;O(a,olympe.L.Oa.j.ze)}
536
536
  function Ie(a,b){const c=olympe.L.Me.Hg,d=olympe.L.Me.Fh,e=olympe.L.Me.zb,{id:f,e:g}=b;let h=a.H.get(f);h||(h=new olympe.L.Yq(()=>a.H.delete(f)),a.H.set(f,h));if(g===c){gb(a.H.j,f);const {i:k,c:l}=b;h.write(l,k).catch(n=>{h.throw(n)})}else g===d?h.complete(b.s):g===e&&h.throw(Error(`Received stream error: ${b.reason}`))}
537
537
  olympe.L.Oa=class{constructor(a,b,c,d,e,f,g,h){this.G=a;this.Gc=b;this.N=null;e.subscribe(k=>{this.N=k;k=olympe.L.Oa.j.CONNECTING;if(this.state===olympe.L.Oa.j.ze||this.state===k){let l;null==(l=this.j)||l.close()}});this.$=this.j=null;e.subscribe(k=>{this.$=k;k=olympe.L.Oa.j.vc;this.state===olympe.L.Oa.j.Zk&&(O(this,k),ve(this))});this.ea=g;this.Nd=h.get('pingInterval');this.ta=h.get('messageTimeout');this.Y=olympe.V.Mf.parse(h.get('clientVersion'));this.Ha=olympe.V.Mf.parse(h.get('serverVersion'));
538
538
  this.state=olympe.L.Oa.j.INIT;this.Wa=d;this.Yb=h.get('getContextMode');this.Pe=1;this.R=null;this.F=[0,0,0];this.ja=new Map;this.connected=olympe.C.cc(olympe.C.da,'Server is connected');this.ug=mc(olympe.C.cc(olympe.C.da,'Server is readonly'),olympe.C.da.j);this.Eb=new Set;this.D=new Map;this.H=new olympe.V.$h(this.ta);this.Gd=new Map;this.wd=-1;we(this,h,c)}connect(){const a=olympe.L.Oa.j.ze,b=olympe.L.Oa.j.vc,c=olympe.L.Oa.j.zb,d=olympe.L.Oa.j.INIT;return new Promise((e,f)=>{this.state!==d&&this.state!==
539
- b||ue(this);Ae(this,[a,b,c],g=>{g===a?e():f(Error('Was not able to open a connection to the orchestrator'))},!0)})}disconnect(){return new Promise((a,b)=>{const c=olympe.L.Oa.j.ep,d=olympe.L.Oa.j.vc,e=olympe.L.Oa.j.CONNECTING,f=olympe.L.Oa.j.zb;this.state===olympe.L.Oa.j.ze||this.state===e||this.state===c?(Ae(this,[d,f],g=>{g===d?a():b(Error('Was not able to disconnect'))},!0),this.state!==c&&(O(this,c),this.j.close())):(O(this,d),a())})}le(){this.G.debug('Websocket connected, sending handshake. Client version:',
539
+ b||ue(this);Ae(this,[a,b,c],g=>{g===a?e():f(Error('Was not able to open a connection to the orchestrator'))},!0)})}disconnect(){return new Promise((a,b)=>{const c=olympe.L.Oa.j.fp,d=olympe.L.Oa.j.vc,e=olympe.L.Oa.j.CONNECTING,f=olympe.L.Oa.j.zb;this.state===olympe.L.Oa.j.ze||this.state===e||this.state===c?(Ae(this,[d,f],g=>{g===d?a():b(Error('Was not able to disconnect'))},!0),this.state!==c&&(O(this,c),this.j.close())):(O(this,d),a())})}le(){this.G.debug('Websocket connected, sending handshake. Client version:',
540
540
  Ib(this.Y),'subscribeEverything:',this.Yb?'NO':'YES');Ce(this,olympe.L.Ee.nk,{c:olympe.L.sk.nk,cv:Ib(this.Y),m:this.Yb?0:1,s:this.R,b:this.Wa.D()},this.tg.bind(this))}tg(a,b){if(a)Ge(this,'Error in receiving handshake response: '+a.message);else{this.G.debug('Handshake response received');var c=olympe.L.Oa.F;a=b.sv||'undefined';var d=b.activityTimeout?Math.max(b.activityTimeout-60,5):null;switch(b.status){case c.Fu:Ge(this,`Framework version (${Ib(this.Y)}) provided to the orchestrator was not valid. See orchestrator logs for more info.`);
541
541
  return;case c.Fw:Ge(this,`Framework version (${Ib(this.Y)}) is not compatible with the orchestrator in use. See orchestrator logs for more info.`);return;case c.pu:Ge(this,'Handshake failed. See orchestrator logs for more info.');return}if(this.Ha.Fa(olympe.V.Mf.j))this.G.warn('Handshake successful but received server version',a,'is invalid. Cannot check against it');else try{var e=olympe.V.Mf.parse(a);if(e.Oj(this.Ha)){Ge(this,`Framework v${Ib(this.Y)} is expecting Orchestrator to be at least in v${Ib(this.Ha)}`);
542
542
  return}this.G.log('Handshake successful. Orchestrator version: ',JSON.stringify(e),'required:',Ib(this.Ha))}catch(f){Ge(this,f);return}e=olympe.L.Oa.j.vc;if(this.state===olympe.L.Oa.j.Ug&&null!==this.R&&this.R!==b.sessionId)this.G.warn('Trying to do a session recovering, but got another session id so retry from disconnected state'),O(this,e);else{if(e=b.identityProviders)for(const [f,g]of Object.entries(e))this.Gd.set(f,g);this.R=b.sessionId||null;He(this,a,d)}}}Pc(){this.F[0]-this.F[1]>this.Nd/2?
543
543
  (this.G.debug('Ping did not get answer, try to reconnect'),O(this,olympe.L.Oa.j.Ug)):(this.F[0]=Date.now(),this.j.send('ping')||(this.G.debug('Impossible to send ping, try to reconnect'),O(this,olympe.L.Oa.j.Ug)))}ff(a){this.F[2]=Date.now();if(a.startsWith('pong'))return olympe.C.Qa(this.Wa.j()).valueOf()&&(this.F[1]=this.F[2]),null;var b=0;this.ea.j&&(b=performance.now()-this.ea.D);try{var c=JSON.parse(a)}catch(g){return this.G.error('Unable to parse response from server: '+g.toString()),Error('Unable to parse response from server')}a=
544
544
  c.seqId;var d=c.stream;const e=c.messageFamily;c=c.payload;if(this.G.j()){const g=({id:h,i:k,e:l,c:n})=>l===olympe.L.Me.Hg?`stream[${h}][${k}]: ${JSON.stringify(n)}`:l===olympe.L.Me.Fh?`stream[${h}]:END`:`stream[${h}]:ERROR`;this.G.debug(`WS < ${JSON.stringify(c)}, ${d?g(d):''}`)}Be(this,a,'consumed',new Map,b);Be(this,a,'deserialized',(new Map).set('family',e));if(void 0!==d){var f=d.id;b=this.H.has(f);Ie(this,d);if(b)return null;d=this.H.get(f);if(!d)return this.G.error(`Received a stream chunk for an unknown stream id: ${f}`),
545
- null;f=d.stream}this.D.has(a)&&({pn:d}=this.D.get(a),this.D.delete(a),null==d||d(c,f));a=this.ja.get(e);if(void 0!==a)for(const g of a.values())g(c,f);return null}mb(){const a=Date.now();for(const [b,{Vn:c}]of this.D)null!==c&&a-c>this.ta&&(this.G.warn(`No response was received from the server for the seqId = ${b}`),ye(this,b,'Message timeout: never receive acknowledge'))}};function Rd(a){return olympe.C.Qa(a.state)===olympe.L.uc.j.cj}
546
- function Je(a,b){const c=olympe.L.uc.j.Lm,d=olympe.L.uc.j.Ef,e=olympe.L.uc.j.vc,f=olympe.L.uc.j.sw,g=b.get('reconnectionDelay');Ae(a.D,[olympe.L.Oa.j.INIT],()=>{Ke(a)?(a.state.update(c),a.connect().catch(h=>a.G.error(h))):a.D.disconnect().catch(h=>a.G.error(h))},!0);Ae(a.D,[olympe.L.Oa.j.vc],()=>{if(olympe.C.Qa(a.state)===f)a.G.info('Disconnected, from orchestrator for shutdown');else if(a.state.update(a.j?d:e),Ke(a)&&a.N){const h=`Disconnected, will try to auto reconnect in ${g} ms`;a.j?a.G.log(h):
545
+ null;f=d.stream}this.D.has(a)&&({qn:d}=this.D.get(a),this.D.delete(a),null==d||d(c,f));a=this.ja.get(e);if(void 0!==a)for(const g of a.values())g(c,f);return null}mb(){const a=Date.now();for(const [b,{Wn:c}]of this.D)null!==c&&a-c>this.ta&&(this.G.warn(`No response was received from the server for the seqId = ${b}`),ye(this,b,'Message timeout: never receive acknowledge'))}};function Rd(a){return olympe.C.Qa(a.state)===olympe.L.uc.j.cj}
546
+ function Je(a,b){const c=olympe.L.uc.j.Mm,d=olympe.L.uc.j.Ef,e=olympe.L.uc.j.vc,f=olympe.L.uc.j.sw,g=b.get('reconnectionDelay');Ae(a.D,[olympe.L.Oa.j.INIT],()=>{Ke(a)?(a.state.update(c),a.connect().catch(h=>a.G.error(h))):a.D.disconnect().catch(h=>a.G.error(h))},!0);Ae(a.D,[olympe.L.Oa.j.vc],()=>{if(olympe.C.Qa(a.state)===f)a.G.info('Disconnected, from orchestrator for shutdown');else if(a.state.update(a.j?d:e),Ke(a)&&a.N){const h=`Disconnected, will try to auto reconnect in ${g} ms`;a.j?a.G.log(h):
547
547
  a.G.error(h);setTimeout(()=>a.connect().catch(k=>a.G.error(k)),g)}else a.G.info('Disconnected, stay offline.')});a.H.H(()=>{a.state.update(f);return Promise.resolve()},'Connectivity manager: shutdown state')}function Ke(a){return null===a.storage.get(a.F+'olympe_manual_offline')}
548
548
  olympe.L.uc=class{constructor(a,b,c,d,e,f){this.G=a;this.D=b;this.H=d;this.storage=e;this.state=olympe.C.cc(Number).update(olympe.L.uc.j.INIT);this.j=f.get('offlineEnabled');this.N=f.get('offlineAutoBackOnline');this.F=f.get('storagePrefix');Je(this,f)}Wf(){const a=olympe.L.uc.j.cj,b=olympe.L.uc.j.Ef,c=olympe.L.uc.j.vc;let d=olympe.C.da.j;return olympe.C.ua([this.state],e=>{if(e===a)d=olympe.C.da.D;else if(e===b||e===c)d=olympe.C.da.j;return d},olympe.C.da)}getState(){return this.state.tb()}connect(){const a=
549
- this;return u(function*(){const b=olympe.L.uc.j.cj,c=olympe.L.uc.j.Lm;olympe.C.Qa(a.state)!==b&&(a.state.update(c),a.storage.delete(a.F+'olympe_manual_offline'),yield a.D.connect(),yield Le(),a.state.update(b))})}disconnect(){const a=this;return u(function*(){const b=olympe.L.uc.j.Ef,c=olympe.L.uc.j.Lm;if(!a.j)throw Error('Try to go offline manually while the process does not support it. Please add `offline.enabled=true` in the config');a.storage.set(a.F+'olympe_manual_offline','true');olympe.C.Qa(a.state)!==
550
- b&&(a.state.update(c),yield olympe.L.jh().disconnect(),yield a.D.disconnect())})}};olympe.L.uc.j={INIT:0,Lm:1,cj:2,Ef:3,vc:4,sw:5};olympe.L.uc.D='olympe_manual_offline';olympe.L.ec=class{constructor(){this.R=this.Y=null}ga(a){a=this.D(a);this.Y=null;return a}N(a){a=this.j(a);this.R=null;return a}D(a){switch(!0){case null===a:case void 0===a:return null;case 'string'===typeof a:case 'boolean'===typeof a:case 'number'===typeof a:return a;case a instanceof olympe.C.eb:return this.format(olympe.L.ec.j.Wl,a.valueOf().toISOString());case a instanceof Date:return this.format(olympe.L.ec.j.Wl,a.toISOString());case a instanceof olympe.C.Color:return this.format(olympe.L.ec.j.COLOR,
549
+ this;return u(function*(){const b=olympe.L.uc.j.cj,c=olympe.L.uc.j.Mm;olympe.C.Qa(a.state)!==b&&(a.state.update(c),a.storage.delete(a.F+'olympe_manual_offline'),yield a.D.connect(),yield Le(),a.state.update(b))})}disconnect(){const a=this;return u(function*(){const b=olympe.L.uc.j.Ef,c=olympe.L.uc.j.Mm;if(!a.j)throw Error('Try to go offline manually while the process does not support it. Please add `offline.enabled=true` in the config');a.storage.set(a.F+'olympe_manual_offline','true');olympe.C.Qa(a.state)!==
550
+ b&&(a.state.update(c),yield olympe.L.jh().disconnect(),yield a.D.disconnect())})}};olympe.L.uc.j={INIT:0,Mm:1,cj:2,Ef:3,vc:4,sw:5};olympe.L.uc.D='olympe_manual_offline';olympe.L.ec=class{constructor(){this.R=this.Y=null}ga(a){a=this.D(a);this.Y=null;return a}N(a){a=this.j(a);this.R=null;return a}D(a){switch(!0){case null===a:case void 0===a:return null;case 'string'===typeof a:case 'boolean'===typeof a:case 'number'===typeof a:return a;case a instanceof olympe.C.eb:return this.format(olympe.L.ec.j.Wl,a.valueOf().toISOString());case a instanceof Date:return this.format(olympe.L.ec.j.Wl,a.toISOString());case a instanceof olympe.C.Color:return this.format(olympe.L.ec.j.COLOR,
551
551
  a.toJSON());case a instanceof Map:return a=Object.fromEntries(Array.from(a).map(([c,d])=>[c,this.D(d)])),this.format(olympe.L.ec.j.vq,a);case a instanceof Set:return a=Array.from(a).map(this.D.bind(this)),this.format(olympe.L.ec.j.Zg,a);case Array.isArray(a):return a.map(this.D.bind(this));case a instanceof ArrayBuffer:return a=olympe.V.kf().j(new Uint8Array(a)),this.format(olympe.L.ec.j.ARRAY_BUFFER,a);case a instanceof Uint8Array:return a=olympe.V.kf().j(a),this.format(olympe.L.ec.j.ai,a);case Symbol.asyncIterator in
552
552
  a:if(!this.Y)throw Error('No stream handler has been set, so cannot serialize the asyncIterable.');let b;return this.format(olympe.L.ec.j.ke,null==(b=this.Y)?void 0:b.call(this,a));case 'object'===typeof a:return a=Object.entries(a).reduce((c,[d,e])=>{c[d]=this.D(e);return c},{}),this.format(olympe.L.ec.j.Oq,a);default:throw Error(`Impossible to serialize the following value: ${a}`);}}j(a){switch(!0){case null===a:case void 0===a:return null;case 'string'===typeof a:case 'boolean'===typeof a:case 'number'===
553
- typeof a:return a}if(Array.isArray(a))return a.map(d=>this.j(d));if('object'!==typeof a)throw new olympe.error.jp(`Impossible to deserialize the following value: ${a}`);const {t:b,v:c}=a;switch(b){case olympe.L.ec.j.Wl:return new Date(c);case olympe.L.ec.j.COLOR:return olympe.C.Color.Qb(c);case olympe.L.ec.j.vq:return new Map(Object.entries(c).map(([e,f])=>[e,this.j(f)]));case olympe.L.ec.j.Zg:return new Set(c.map(e=>this.j(e)));case olympe.L.ec.j.ARRAY_BUFFER:return olympe.V.kf().D(c).buffer;case olympe.L.ec.j.ai:return olympe.V.kf().D(c);
554
- case olympe.L.ec.j.ke:if(!this.R)throw Error('No stream handler has been set, so cannot deserialize the stream.');let d;return null==(d=this.R)?void 0:d.call(this,c);case olympe.L.ec.j.Oq:return Object.entries(c).reduce((e,[f,g])=>{e[f]=this.j(g);return e},{});default:throw new olympe.error.jp(`Impossible to deserialize the following value: ${c}`);}}format(a,b){return{t:a,v:b}}};olympe.L.ec.j={Wl:1,COLOR:2,vq:3,Zg:4,ARRAY_BUFFER:5,ai:6,ke:7,Oq:8};const Me=olympe.L.xa.j.SEND,Ne=olympe.L.xa.j.GET,Oe=olympe.L.xa.j.PUBLISH,Pe=olympe.L.xa.j.SUBSCRIBE,Qe=olympe.L.xa.j.ig,Re=olympe.L.xa.j.cs,Se=olympe.L.xa.j.Gr,Te=olympe.L.xa.j.zb,Ue=olympe.L.xa.j.ks,Ve=olympe.L.xa.j.ng;function Id(a,b){a.j||(a.j=hb(new olympe.V.bn(a.D.ff+3E4),c=>{let d;null==(d=a.H)||d.call(a,c)}));a.j.add(b)}
553
+ typeof a:return a}if(Array.isArray(a))return a.map(d=>this.j(d));if('object'!==typeof a)throw new olympe.error.kp(`Impossible to deserialize the following value: ${a}`);const {t:b,v:c}=a;switch(b){case olympe.L.ec.j.Wl:return new Date(c);case olympe.L.ec.j.COLOR:return olympe.C.Color.Qb(c);case olympe.L.ec.j.vq:return new Map(Object.entries(c).map(([e,f])=>[e,this.j(f)]));case olympe.L.ec.j.Zg:return new Set(c.map(e=>this.j(e)));case olympe.L.ec.j.ARRAY_BUFFER:return olympe.V.kf().D(c).buffer;case olympe.L.ec.j.ai:return olympe.V.kf().D(c);
554
+ case olympe.L.ec.j.ke:if(!this.R)throw Error('No stream handler has been set, so cannot deserialize the stream.');let d;return null==(d=this.R)?void 0:d.call(this,c);case olympe.L.ec.j.Oq:return Object.entries(c).reduce((e,[f,g])=>{e[f]=this.j(g);return e},{});default:throw new olympe.error.kp(`Impossible to deserialize the following value: ${c}`);}}format(a,b){return{t:a,v:b}}};olympe.L.ec.j={Wl:1,COLOR:2,vq:3,Zg:4,ARRAY_BUFFER:5,ai:6,ke:7,Oq:8};const Me=olympe.L.xa.j.SEND,Ne=olympe.L.xa.j.GET,Oe=olympe.L.xa.j.PUBLISH,Pe=olympe.L.xa.j.SUBSCRIBE,Qe=olympe.L.xa.j.ig,Re=olympe.L.xa.j.cs,Se=olympe.L.xa.j.Gr,Te=olympe.L.xa.j.zb,Ue=olympe.L.xa.j.ks,Ve=olympe.L.xa.j.ng;function Id(a,b){a.j||(a.j=hb(new olympe.V.cn(a.D.ff+3E4),c=>{let d;null==(d=a.H)||d.call(a,c)}));a.j.add(b)}
555
555
  function We(a){let b,c;const d=null!=(c=null==(b=a.j)?void 0:b.code)?c:olympe.error.mc.Wk;let e,f;a=null!=(f=null==(e=a.j)?void 0:e.reason)?f:'Unknown Error';return d===olympe.error.mc.TIMEOUT?new olympe.error.Vk(a):new olympe.error.pd(a,d)}function Xe(a,b){const c=olympe.L.xa.j.ng,d=olympe.L.xa.j.Zr;return b.getType()!==c?Promise.reject('Should only call `topicAck` on TOPIC responses'):a.send(b.j.seq,b.jb(),b.jb(),d)}
556
556
  olympe.L.rb=class{constructor(a,b){this.D=olympe.L.jh();this.F=a;this.H=this.j=null;this.N=new olympe.C.Wb(`Service ${a}`,'function'===typeof b.Bb?b.Bb():b);this.G=olympe.ia.Ya(`Service ${this.F}`)}ut(a){this.H=a;return this}stop(){this.N.destroy()}clear(){Wd(this.D,this.F).catch(b=>this.G.error('Failed to unsubscribe from '+this.F+', error: '+b));if(this.H){let b;null==(b=this.j)||b.forEach(c=>{let d;return null==(d=this.H)?void 0:d.call(this,c)})}let a;null==(a=this.j)||a.clear()}static ld(a,b){return u(function*(){yield olympe.L.jh().request(a,
557
557
  a,Oe,b,!1)})}static Ws(a){const b=olympe.L.jh(),c=new olympe.L.Ek(a,b);be(b,a).then(d=>Ye(c,d)).catch(d=>olympe.ia.Ya('Publisher for service '+a).error('Failed to get session id for publisher',d));return c}static send(a,b,c={}){return olympe.L.jh().request(a,a,Me,b,!0,c.timeout).then(d=>{switch(d.getType()){case Se:break;case Te:throw We(d);default:throw Error('Unsupported response type for a SEND request');}})}static get(a,b,c={}){return olympe.L.jh().request(a,a,Ne,b,!0,c.timeout).then(d=>{switch(d.getType()){case Ue:d=
@@ -560,20 +560,20 @@ e.Yd(p);f.request(a,a,Pe,c,!0,d.timeout).then(q=>{switch(q.getType()){case Ve:Ye
560
560
  p()});break;case Te:h.error(We(q));break;default:h.error('Unsupported response type for a SUBSCRIBE request')}}).catch(q=>h.error(q));return p})).pipe(tb(olympe.error.Qh,(h,k)=>{olympe.ia.Ya(`Service ${a}`).debug(`Subscribed to topic ${h.T()} now that we are back online, after waiting for ${k}ms`);let l;null==(l=d.onRetry)||l.call(d)})),publisher:g}}listen(){return new rxjs.Observable(a=>{const b=()=>{a.complete();this.clear()};this.N.onDestroy(b);Xd(this.D,this.F,this.R.bind(this,a),!1).catch(c=>
561
561
  {c='Failed to connect to the bus: '+c;this.G.error(c);a.error(Error(c))});return b})}yi(a){const b=this;return u(function*(){yield b.D.request(b.F,b.F,Oe,a,!1,b.D.mb)})}R(a,b){var c=new olympe.L.Fc(b,this.D,this);switch(b.getType()){case Qe:var d=c.body().filter(f=>{let g;return!(null==(g=this.j)?0:gb(g,f))});c.dd(d).catch(f=>this.G.error('Not able to validate subscription keep alive',f));break;case Re:c=c.body();null==(d=this.j)||d.delete(c);let e;null==(e=this.H)||e.call(this,c);break;default:a.next(c)}}};
562
562
  olympe.L.rb.prototype.multicast=olympe.L.rb.prototype.yi;olympe.L.rb.prototype.listen=olympe.L.rb.prototype.listen;olympe.L.rb.observe=olympe.L.rb.observe;olympe.L.rb.get=olympe.L.rb.get;olympe.L.rb.send=olympe.L.rb.send;olympe.L.rb.getPublisher=olympe.L.rb.Ws;olympe.L.rb.publish=olympe.L.rb.ld;olympe.L.rb.prototype.stop=olympe.L.rb.prototype.stop;olympe.L.rb.prototype.setUnsubscriptionHandler=olympe.L.rb.prototype.ut;olympe.L.Yq=class{constructor(a){this.j=0;this.buffer=[];this.size=null;this.stream=new olympe.V.stream.mg;this.D=null!=a?a:()=>{}}write(a,b){const c=this;return u(function*(){if(b<c.j||null!==c.size&&b>=c.size)throw Error(`Received stream chunk with unexpected index = ${b}. That index has already been processed. Next expected once is ${c.j}`);for(c.buffer[b-c.j]=a;void 0!==c.buffer[0];){c.j++;const d=c.buffer.shift();yield c.stream.write(d)}c.j===c.size&&(c.D(),c.stream.complete())})}complete(a){if(null!==
563
- this.size)throw Error('The stream has already been completed');if(a<this.j+this.buffer.length)throw Error(`The stream has already reached element n\u00b0${this.j+this.buffer.length}, specified index must be greater or equal to it.`);this.size=a;this.j===this.size&&(this.D(),this.stream.complete())}throw(a){this.D();this.stream.throw(a)}};function Ye(a,b){a.j=b;a.D.forEach(c=>c());a.D=[];return a}olympe.L.Ek=class{constructor(a,b){this.F=b;this.D=[];this.H=a;this.j=null}ld(a){const b=this;return u(function*(){b.j||(yield new Promise(c=>{b.D.push(()=>c())}));yield b.F.request(b.j,b.H,olympe.L.xa.j.PUBLISH,a,!0)})}};olympe.L.Ek.prototype.publish=olympe.L.Ek.prototype.ld;olympe.L.Ee={Hg:1,bg:2,zb:3,Og:4,FA:5,nk:6,pc:7};olympe.L.sk={nk:1,Ow:2,mu:3,ig:5,aw:1,cE:2};olympe.L.Me={Hg:0,Fh:1,zb:2};olympe.L.Oa.j={INIT:'initialize',CONNECTING:'connecting',vc:'disconnected',ep:'disconnecting',ze:'connected',Ug:'reconnecting',Zk:'waking',no:'awake',zb:'error'};olympe.L.Oa.F={Rh:1,pu:-1,Fu:-2,Fw:-3};olympe.L.Oa.D={ij:0,cq:23};
563
+ this.size)throw Error('The stream has already been completed');if(a<this.j+this.buffer.length)throw Error(`The stream has already reached element n\u00b0${this.j+this.buffer.length}, specified index must be greater or equal to it.`);this.size=a;this.j===this.size&&(this.D(),this.stream.complete())}throw(a){this.D();this.stream.throw(a)}};function Ye(a,b){a.j=b;a.D.forEach(c=>c());a.D=[];return a}olympe.L.Ek=class{constructor(a,b){this.F=b;this.D=[];this.H=a;this.j=null}ld(a){const b=this;return u(function*(){b.j||(yield new Promise(c=>{b.D.push(()=>c())}));yield b.F.request(b.j,b.H,olympe.L.xa.j.PUBLISH,a,!0)})}};olympe.L.Ek.prototype.publish=olympe.L.Ek.prototype.ld;olympe.L.Ee={Hg:1,bg:2,zb:3,Og:4,FA:5,nk:6,pc:7};olympe.L.sk={nk:1,Ow:2,mu:3,ig:5,aw:1,cE:2};olympe.L.Me={Hg:0,Fh:1,zb:2};olympe.L.Oa.j={INIT:'initialize',CONNECTING:'connecting',vc:'disconnected',fp:'disconnecting',ze:'connected',Ug:'reconnecting',Zk:'waking',oo:'awake',zb:'error'};olympe.L.Oa.F={Rh:1,pu:-1,Fu:-2,Fw:-3};olympe.L.Oa.D={ij:0,cq:23};
564
564
  olympe.L.Oa.pc={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',
565
- 18:'Try to unsubscribe multiple times',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.L.P={vf:'com.ConnectivityManager',Nk:'com.ServerManager',Ao:'com.BusManager',km:'com.HttpManager',Le:'com.Serializer',Da:'com.Logger',$g:'com.Source',ds:'com.Urls',AC:'com.peerFileSvcUrl'};
566
- olympe.L.U={Yl:'defaultHost',kw:'server.host',mw:'server.port',nw:'server.ssl',Hr:'server.basePath',ps:'server.wsPath',Rm:'server.reconnectionDelay',$q:'server.pingInterval',ns:'server.messageTimeout',ur:'server.retryHttpOnOverload',Ol:'server.clientVersion',Kr:'server.serverVersion',ow:'server.wakeUpService',Nt:'bus.host',Ot:'bus.path',Pt:'bus.port',Rt:'bus.vhost',Qt:'bus.ssl',Eo:'bus.requestTimeout',Fo:'bus.subscriptionRefreshRate',Do:'bus.reconnectionDelay',zo:'bus.heartbeat',Bo:'bus.queueExpiration',
567
- Co:'bus.queuePrefetch',Il:'bus.allowGuest',$r:'bus.topicPrefix'};
568
- olympe.W.config(function(a){const b=olympe.host.Xg.Uh;E(a,olympe.L.U.Yl,a.getParameter(olympe.host.U.Pp));E(a,olympe.L.U.Hr,'OlympeServer');E(a,olympe.L.U.$r,'');Za(a,'com.hostConfig',[olympe.host.U.Jk,olympe.L.U.Yl,olympe.L.U.kw,olympe.L.U.mw,olympe.L.U.nw,olympe.L.U.Hr,olympe.L.U.Nt,olympe.L.U.Rt,olympe.L.U.Pt,olympe.L.U.Ot,olympe.L.U.Qt],(e,f,g,h,k,l,n,p,q,r,t)=>{var v=a.getParameter(olympe.net.U.xm);e=e===olympe.host.Xg.Uh;var x=['localhost','127.0.0.1'],y=f.endsWith(v),z=y&&e?`${f}-${b}`:f;const A=
569
- 'object'===typeof window;g=null!=g?g:z;n=null!=n?n:!A&&y?z.replace(new RegExp(`${v}$`),'rabbitmq'):z;z=(v=x.includes(g))||y;y=(x=x.includes(n))||y;f=x?'/':f.split('.')[0];return{Wn:g,Xn:null!=h?h:v?8080:z?e?85:80:443,Yn:null!=k?k:!z,qt:l,qx:n,vx:null!=p?p:f,tx:null!=q?q:A?x?15670:y?e?85:80:443:y?5672:5671,sx:null!=r?r:!x&&A?'/amqp/ws':'',ux:null!=t?t:!y}});E(a,olympe.L.U.ps,'websocket');E(a,olympe.L.U.Rm,5E3);E(a,olympe.L.U.$q,5E3);E(a,olympe.L.U.ns,3E4);E(a,olympe.L.U.ur,4E3);E(a,olympe.L.U.Kr,'7.5.2');
570
- E(a,olympe.L.U.Eo,6E4);E(a,olympe.L.U.Fo,6E4);E(a,olympe.L.U.Il,!1);E(a,olympe.L.U.Do,a.getParameter(olympe.L.U.Rm));E(a,olympe.L.U.zo,15);E(a,olympe.L.U.Bo,3E5);E(a,olympe.L.U.Co,20);const c=a.getParameter(olympe.yg.U.wp);if(void 0!==c)Va(a,olympe.L.U.Ol,c);else throw Error('Framework version could not be found! Is field "olympe-framework" present in version.json?');D(a,olympe.L.P.Da,[olympe.ia.P.Ea],e=>e.cd('communication'));D(a,'server.WebSocketRequest',[new olympe.W.Eh('com.hostConfig'),new olympe.W.pa(olympe.L.U.ps)],
571
- (e,f)=>e.pipe(rxjs.operators.map(({Wn:g,Xn:h,Yn:k,qt:l})=>new olympe.net.oj(g,h,(l+'/'+f).replace(/\/+/g,'/').replace(/\/$/,''),k))).pipe(rxjs.operators.shareReplay(1)));D(a,'server.wakeUpRequest',[new olympe.W.Eh('com.hostConfig'),new olympe.W.pa(olympe.L.U.ow)],(e,f)=>e.pipe(rxjs.operators.map(({Wn:g,Xn:h,Yn:k})=>{if(null===f||void 0===f)return null;const l=f.replace(/\/+/g,'/').replace(/\/$/,'');return new olympe.net.oj(g,h,l,k)})).pipe(rxjs.operators.shareReplay(1)));const d=Array.from(Object.values(olympe.L.Xb));
572
- D(a,olympe.L.P.ds,[new olympe.W.Eh('com.hostConfig'),...d.map(e=>new olympe.W.pa(e))],(e,...f)=>e.pipe(rxjs.operators.map(({Wn:g,Xn:h,Yn:k,qt:l})=>{const n=d.map((p,q)=>{q=f[q];q=(new olympe.net.Si(g,h,`${l}${q?'/'+q:''}`.replace(/\/+/g,'/').replace(/\/$/,''),k)).j();return[p,q]});return new Map(n)})).pipe(rxjs.operators.shareReplay(1)));C(a,olympe.L.P.Le,olympe.L.ec);C(a,olympe.L.P.km,olympe.L.uu,olympe.L.P.Da,olympe.net.P.Ea,olympe.V.P.jg,olympe.L.P.ds,new olympe.W.pa(olympe.L.U.ur));D(a,'com.server.ManagerConfig',
565
+ 18:'Try to unsubscribe multiple times',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.L.P={vf:'com.ConnectivityManager',Nk:'com.ServerManager',Bo:'com.BusManager',mm:'com.HttpManager',Le:'com.Serializer',Da:'com.Logger',$g:'com.Source',ds:'com.Urls',AC:'com.peerFileSvcUrl'};
566
+ olympe.L.U={Yl:'defaultHost',kw:'server.host',mw:'server.port',nw:'server.ssl',Hr:'server.basePath',ps:'server.wsPath',Sm:'server.reconnectionDelay',$q:'server.pingInterval',ns:'server.messageTimeout',ur:'server.retryHttpOnOverload',Ol:'server.clientVersion',Kr:'server.serverVersion',ow:'server.wakeUpService',Nt:'bus.host',Ot:'bus.path',Pt:'bus.port',Rt:'bus.vhost',Qt:'bus.ssl',Fo:'bus.requestTimeout',Go:'bus.subscriptionRefreshRate',Eo:'bus.reconnectionDelay',Ao:'bus.heartbeat',Co:'bus.queueExpiration',
567
+ Do:'bus.queuePrefetch',Il:'bus.allowGuest',$r:'bus.topicPrefix'};
568
+ olympe.W.config(function(a){const b=olympe.host.Xg.Uh;E(a,olympe.L.U.Yl,a.getParameter(olympe.host.U.Pp));E(a,olympe.L.U.Hr,'OlympeServer');E(a,olympe.L.U.$r,'');Za(a,'com.hostConfig',[olympe.host.U.Jk,olympe.L.U.Yl,olympe.L.U.kw,olympe.L.U.mw,olympe.L.U.nw,olympe.L.U.Hr,olympe.L.U.Nt,olympe.L.U.Rt,olympe.L.U.Pt,olympe.L.U.Ot,olympe.L.U.Qt],(e,f,g,h,k,l,n,p,q,r,t)=>{var v=a.getParameter(olympe.net.U.ym);e=e===olympe.host.Xg.Uh;var x=['localhost','127.0.0.1'],y=f.endsWith(v),z=y&&e?`${f}-${b}`:f;const A=
569
+ 'object'===typeof window;g=null!=g?g:z;n=null!=n?n:!A&&y?z.replace(new RegExp(`${v}$`),'rabbitmq'):z;z=(v=x.includes(g))||y;y=(x=x.includes(n))||y;f=x?'/':f.split('.')[0];return{Xn:g,Yn:null!=h?h:v?8080:z?e?85:80:443,Zn:null!=k?k:!z,qt:l,qx:n,vx:null!=p?p:f,tx:null!=q?q:A?x?15670:y?e?85:80:443:y?5672:5671,sx:null!=r?r:!x&&A?'/amqp/ws':'',ux:null!=t?t:!y}});E(a,olympe.L.U.ps,'websocket');E(a,olympe.L.U.Sm,5E3);E(a,olympe.L.U.$q,5E3);E(a,olympe.L.U.ns,3E4);E(a,olympe.L.U.ur,4E3);E(a,olympe.L.U.Kr,'7.5.2');
570
+ E(a,olympe.L.U.Fo,6E4);E(a,olympe.L.U.Go,6E4);E(a,olympe.L.U.Il,!1);E(a,olympe.L.U.Eo,a.getParameter(olympe.L.U.Sm));E(a,olympe.L.U.Ao,15);E(a,olympe.L.U.Co,3E5);E(a,olympe.L.U.Do,20);const c=a.getParameter(olympe.yg.U.xp);if(void 0!==c)Va(a,olympe.L.U.Ol,c);else throw Error('Framework version could not be found! Is field "olympe-framework" present in version.json?');D(a,olympe.L.P.Da,[olympe.ia.P.Ea],e=>e.cd('communication'));D(a,'server.WebSocketRequest',[new olympe.W.Eh('com.hostConfig'),new olympe.W.pa(olympe.L.U.ps)],
571
+ (e,f)=>e.pipe(rxjs.operators.map(({Xn:g,Yn:h,Zn:k,qt:l})=>new olympe.net.oj(g,h,(l+'/'+f).replace(/\/+/g,'/').replace(/\/$/,''),k))).pipe(rxjs.operators.shareReplay(1)));D(a,'server.wakeUpRequest',[new olympe.W.Eh('com.hostConfig'),new olympe.W.pa(olympe.L.U.ow)],(e,f)=>e.pipe(rxjs.operators.map(({Xn:g,Yn:h,Zn:k})=>{if(null===f||void 0===f)return null;const l=f.replace(/\/+/g,'/').replace(/\/$/,'');return new olympe.net.oj(g,h,l,k)})).pipe(rxjs.operators.shareReplay(1)));const d=Array.from(Object.values(olympe.L.Xb));
572
+ D(a,olympe.L.P.ds,[new olympe.W.Eh('com.hostConfig'),...d.map(e=>new olympe.W.pa(e))],(e,...f)=>e.pipe(rxjs.operators.map(({Xn:g,Yn:h,Zn:k,qt:l})=>{const n=d.map((p,q)=>{q=f[q];q=(new olympe.net.Si(g,h,`${l}${q?'/'+q:''}`.replace(/\/+/g,'/').replace(/\/$/,''),k)).j();return[p,q]});return new Map(n)})).pipe(rxjs.operators.shareReplay(1)));C(a,olympe.L.P.Le,olympe.L.ec);C(a,olympe.L.P.mm,olympe.L.uu,olympe.L.P.Da,olympe.net.P.Ea,olympe.V.P.jg,olympe.L.P.ds,new olympe.W.pa(olympe.L.U.ur));D(a,'com.server.ManagerConfig',
573
573
  [new olympe.W.pa(olympe.L.U.$q),new olympe.W.pa(olympe.L.U.ns),new olympe.W.pa(olympe.L.U.Ol),new olympe.W.pa(olympe.L.U.Kr),new olympe.W.pa(olympe.dc.U.Zh)],(...e)=>{const f=['pingInterval','messageTimeout','clientVersion','serverVersion','getContextMode'],g=new Map;e.forEach((h,k)=>g.set(f[k],h));return g});C(a,olympe.L.P.Nk,olympe.L.Oa,olympe.L.P.Da,olympe.net.P.Ea,olympe.host.P.Ge,olympe.host.P.Qk,'server.WebSocketRequest','server.wakeUpRequest',olympe.V.P.jg,'com.server.ManagerConfig');Za(a,
574
- 'com.bus.TopicPrefix',[olympe.host.U.Jk,olympe.L.U.$r],(e,f)=>e===olympe.host.Xg.Uh?`${b}-${f}`:f);D(a,'com.bus.ManagerConfig',[new olympe.W.Eh('com.hostConfig'),new olympe.W.Eh('com.bus.TopicPrefix'),new olympe.W.pa(olympe.L.U.Il),new olympe.W.pa(olympe.L.U.Eo),new olympe.W.pa(olympe.L.U.Fo),new olympe.W.pa(olympe.L.U.Do),new olympe.W.pa(olympe.L.U.Bo),new olympe.W.pa(olympe.L.U.Co),new olympe.W.pa(olympe.L.U.zo)],(e,f,g,h,k,l,n,p,q)=>{e=e.pipe(rxjs.operators.map(({qx:r,sx:t,tx:v,vx:x,ux:y})=>({host:r,
575
- yh:y,port:v,path:t,pA:x,lt:l,Uz:n,Vz:p,uz:h+3E4,bz:q})),rxjs.operators.shareReplay(1));return new Map([['connection',e],['topicPrefix',f],['allowGuest',g],['requestTimeout',h],['subscriptionsRefreshRate',k]])});C(a,olympe.L.P.Ao,olympe.L.Ll,olympe.L.P.Da,olympe.net.P.Ea,olympe.L.P.vf,olympe.auth.P.Ea,olympe.host.P.Ge,olympe.L.P.Le,olympe.V.P.jg,'com.bus.ManagerConfig');D(a,'com.connectivity.ManagerConfig',[olympe.net.P.Fm,olympe.Db.P.ah,new olympe.W.pa(olympe.L.U.Rm)],(e,...f)=>['storagePrefix','reconnectionDelay'].reduce((g,
576
- h,k)=>g.set(h,f[k]),e));C(a,olympe.L.P.vf,olympe.L.uc,olympe.L.P.Da,olympe.L.P.Nk,olympe.net.P.Ea,olympe.host.P.Ge,olympe.Db.P.ym,'com.connectivity.ManagerConfig')},'olympe.communication');olympe.W.run([olympe.L.P.Ao,olympe.L.P.vf],(a,b)=>{olympe.L.jh=()=>a;olympe.L.An=()=>b});olympe.auth={};function Ze(a,b){Fe(a.j);xe(a.j,olympe.L.Ee.Og,c=>{const d=c.c;d===olympe.auth.ud.j.qv?(a.j.le(),b(olympe.auth.Ua.D.Rj,c)):d===olympe.auth.ud.j.iw&&b(olympe.auth.Ua.D.Vp,c)},'logoutHandler')}
574
+ 'com.bus.TopicPrefix',[olympe.host.U.Jk,olympe.L.U.$r],(e,f)=>e===olympe.host.Xg.Uh?`${b}-${f}`:f);D(a,'com.bus.ManagerConfig',[new olympe.W.Eh('com.hostConfig'),new olympe.W.Eh('com.bus.TopicPrefix'),new olympe.W.pa(olympe.L.U.Il),new olympe.W.pa(olympe.L.U.Fo),new olympe.W.pa(olympe.L.U.Go),new olympe.W.pa(olympe.L.U.Eo),new olympe.W.pa(olympe.L.U.Co),new olympe.W.pa(olympe.L.U.Do),new olympe.W.pa(olympe.L.U.Ao)],(e,f,g,h,k,l,n,p,q)=>{e=e.pipe(rxjs.operators.map(({qx:r,sx:t,tx:v,vx:x,ux:y})=>({host:r,
575
+ yh:y,port:v,path:t,pA:x,lt:l,Uz:n,Vz:p,uz:h+3E4,bz:q})),rxjs.operators.shareReplay(1));return new Map([['connection',e],['topicPrefix',f],['allowGuest',g],['requestTimeout',h],['subscriptionsRefreshRate',k]])});C(a,olympe.L.P.Bo,olympe.L.Ll,olympe.L.P.Da,olympe.net.P.Ea,olympe.L.P.vf,olympe.auth.P.Ea,olympe.host.P.Ge,olympe.L.P.Le,olympe.V.P.jg,'com.bus.ManagerConfig');D(a,'com.connectivity.ManagerConfig',[olympe.net.P.Gm,olympe.Db.P.ah,new olympe.W.pa(olympe.L.U.Sm)],(e,...f)=>['storagePrefix','reconnectionDelay'].reduce((g,
576
+ h,k)=>g.set(h,f[k]),e));C(a,olympe.L.P.vf,olympe.L.uc,olympe.L.P.Da,olympe.L.P.Nk,olympe.net.P.Ea,olympe.host.P.Ge,olympe.Db.P.zm,'com.connectivity.ManagerConfig')},'olympe.communication');olympe.W.run([olympe.L.P.Bo,olympe.L.P.vf],(a,b)=>{olympe.L.jh=()=>a;olympe.L.Bn=()=>b});olympe.auth={};function Ze(a,b){Fe(a.j);xe(a.j,olympe.L.Ee.Og,c=>{const d=c.c;d===olympe.auth.ud.j.qv?(a.j.le(),b(olympe.auth.Ua.D.Rj,c)):d===olympe.auth.ud.j.iw&&b(olympe.auth.Ua.D.Vp,c)},'logoutHandler')}
577
577
  function $e(a,b,c){const d=null==b?void 0:b.Df();if(b instanceof olympe.auth.zk){const e=g=>{const h=Object.create(null);h.url=g;h.olympe_token=b.Hd();h.access_token=af(b);g=`${re(a.Mh,olympe.L.Xb.wk)}/logout${d?`?idpName=${d}`:''}`;a.D.redirect(g,h)};c=a.D.j();const f=new URL(c);0!==f.hash.length||0!==f.search.length?(f.hash='',f.search='',a.F.db.set('main',c,'redirectTo').then(()=>{e(f.toString())}).catch(g=>{a.G.error(`Error when trying to set the redirectKey in Auth store: ${g}`)})):e(c)}else Ce(a.j,
578
578
  olympe.L.Ee.Og,Object.assign({},{c:olympe.auth.ud.j.rv},d&&{idpName:d}),c)}function bf(a,b,c,d){olympe.C.Qa(a.H.getState())===olympe.L.uc.j.Ef?d(new olympe.error.Wq,'Working offline'):(c.c=b,Ce(a.j,olympe.L.Ee.Og,c,d))}
579
579
  function cf(a,b,c){if(b.Ng()!==olympe.auth.Ec.j.OAUTH2)c(Error('Only oAuth2 tokens can be refreshed'),null);else{var d=`?idpName=${b.Df()}&access_token=${af(b)}`;d=`${re(a.Mh,olympe.L.Xb.wk)}/refresh${d}`;d=Ic(N(d),olympe.net.wa.ResponseType.JSON);te(a.Mh,d,b.Hd()).then(e=>{(e=e.getData())?(e=new olympe.auth.zk(b.yc(),b.ue(),b.Hd(),e,b.Df()),c(null,e)):c(null,b)}).catch(e=>c(Error(e),null))}}
@@ -584,7 +584,7 @@ function hf(a){a.G.log('Initializing AUTH layer');let b=a.Yb;if('object'===typeo
584
584
  gf(a);break;case olympe.L.uc.j.vc:switch(olympe.C.Qa(a.state)){case olympe.auth.Ua.j.sf:c=olympe.C.Qa(a.ed).yc();kf(a,`Disconnected from server - session of user ${c} lost`);break;case olympe.auth.Ua.j.Pi:a.G.info('Disconnected from server - guest session lost');break;case olympe.auth.Ua.j.Sj:kf(a,'Disconnected from server - authentication aborted');break;case olympe.auth.Ua.j.INIT:kf(a,'Cannot open auth session - no server connection');break;default:kf(a,'Should not get there, investigate',!0)}}});
585
585
  Ze(a.D,(c,d)=>{if(c===olympe.auth.Ua.D.Rj){kf(a,'authentication revoked');let e;null==(e=a.storage)||lf(e).catch(f=>a.G.error('Failed to clear token',f));a.R.forEach(f=>{f(c,d)})}else if(c===olympe.auth.Ua.D.Vp){a.G.info('Redirection to IDP to invalidate token (SAML)');de(a);let e;null==(e=a.storage)||lf(e).catch(f=>a.G.error('Failed to clear token',f));a.Ha.D()}else throw Error(`Unknown logout step coming from server : ${c}`);});a.$=mf(a);a.G.log('DONE initializing AUTH layer (waiting for connector to be online)')}
586
586
  function nf(a,b){let c=null;olympe.C.Gj(a.state.tb().Kd(olympe.auth.Ua.j.sf).and(b),()=>{const d=de(a);!of(a)&&d&&(c=a.Zd.get(d.Ng()).H(d,(e,f)=>{e?(a.G.error('Failed to refresh token, error message: ',e.message),a.Jj().catch(g=>a.G.error(`Failed to logout after wrong refresh ${g}`))):f&&pf(a,f)}))},()=>{let d;null==(d=c)||d()})}
587
- function gf(a){null!==a.storage?(a.G.debug('Retrieving token from local storage'),a.storage.te().then(b=>{if(b){const e=new olympe.auth.Request;var c=b.yc();e.set('username',c);c=e;var d=b.Hd();c.set('nonce',d);'string'===typeof b.Df()&&e.set('idpName',b.Df());a.G.debug('Token found, trying login with',e);qf(a,e,olympe.auth.Ec.j.Gm)}else kf(a,'No token found, cannot perform auto login')}).catch(b=>{kf(a,b.message,!0)})):kf(a,'Cannot retrieve token: no storage configured, cannot perform auto login',
587
+ function gf(a){null!==a.storage?(a.G.debug('Retrieving token from local storage'),a.storage.te().then(b=>{if(b){const e=new olympe.auth.Request;var c=b.yc();e.set('username',c);c=e;var d=b.Hd();c.set('nonce',d);'string'===typeof b.Df()&&e.set('idpName',b.Df());a.G.debug('Token found, trying login with',e);qf(a,e,olympe.auth.Ec.j.Hm)}else kf(a,'No token found, cannot perform auto login')}).catch(b=>{kf(a,b.message,!0)})):kf(a,'Cannot retrieve token: no storage configured, cannot perform auto login',
588
588
  !0)}function kf(a,b,c=!1){a.ed.update(a.N);ef(a,olympe.auth.Ua.j.Pi);b=`Authenticated as guest (${b})`;c?a.G.error(b):a.G.info(b)}function mf(a){const b=[olympe.auth.Ua.j.sf];a.ja||b.push(olympe.auth.Ua.j.Pi);return a.ea.j(()=>{const c=rf(a);return b.includes(c)?Promise.resolve('The auth manager is OK'):Promise.reject(`The auth manager is not in valid state, the current state is: ${c}`)})}function ef(a,b){a.G.log('State change: ',rf(a),'--\x3e',b);a.state.update(b)}
589
589
  function ff(a){if(a.H){const b=new olympe.auth.Request;b.set('username',a.H);b.set('password',a.Wa);a.G.log('Autologin with user "'+a.H+'"');qf(a,b)}else kf(a,'No user specified for auto login',!0)}function of(a){return olympe.C.Qa(a.ed)===a.N}function pf(a,b){if(b){a.ed.update(b);let c;null==(c=a.storage)||jf(c,b).catch(d=>a.G.error(d));a.G.debug('Token updated')}}function rf(a){return olympe.C.Qa(a.state.tb())}function sf(){var a=olympe.public.Na.get();return new Map(a.D.j.Gd)}
590
590
  function tf(a,b,c,d=!1){b=b+c?':'+c.message:'';a.G.error(b);a.error.update(olympe.C.xb(b));ef(a,olympe.auth.Ua.j.zb);if(d)throw Error(b);}function qf(a,b,c,d){void 0===c&&(c=a.mb);void 0===c&&tf(a,'No authentication provider specified',null,!0);const e=a.Zd.get(c);e||tf(a,'Undefined authentication provider "'+c+'"',null,!0);d&&a.F.set('login',d);a.G.log('Sending authentication request using "'+c+'" for '+b);e.te(b,a.Eb.bind(a));ef(a,olympe.auth.Ua.j.Sj)}
@@ -594,62 +594,62 @@ this.F=new Map;this.R=new Map;this.Y=new olympe.V.$h(k.get('cacheTokenTimeout'))
594
594
  return d.tb()}zg(a){if(olympe.C.Qa(this.state)===olympe.auth.Ua.j.sf){var b=de(this);!of(this)&&b&&this.Zd.get(b.Ng()).zg(b,(c,d)=>{c?(this.G.error('Failed to refresh token, error message: ',c.message),this.Jj().catch(e=>this.G.error(`Failed to logout after wrong refresh ${e}`))):d&&pf(this,d);a(c)})}}getState(){return this.state.tb()}yc(){return this.ed.tb().yc()}ue(){return this.ed.tb().ue()}si(){return this.ed.tb().si()}rh(a,b){if(gb(this.Y.j,a))b(null,this.Y.get(a));else{var c,d=null==(c=olympe.C.Qa(this.ed.tb()))?
595
595
  void 0:c.Hd();this.D.rh(a,d,(e,f)=>{'string'===typeof f&&this.Y.set(a,f);b(e,f)})}}Jj(){return of(this)?(this.G.warn('Logout called for Guest user so it will be ignored'),Promise.resolve()):new Promise((a,b)=>{this.G.debug('Sending logout');let c;null==(c=this.storage)||lf(c).catch(d=>this.G.error('Failed to clear token',d));$e(this.D,de(this),d=>{d?(tf(this,'Logout request rejected:',d),b(d)):(this.G.debug('Logout request acknowledged'),a())});this.ea.D(this.$)})}rf(a){rf(this)===olympe.auth.Ua.j.sf&&
596
596
  this.D.rf(b=>{b&&this.G.error('Was not able to send the auth keep alive message:',b.message);null==a||a(b)})}Eb(a,b){const c=null===this.j?olympe.auth.Ua.F.yv:this.j;this.j=null;if(!a||a instanceof olympe.error.Wq){null===a?this.G.info(`User ${b.yc()} (#${b.ue()}) successfully authenticated`):this.G.info(`User ${b.yc()} (#${b.ue()}) recovered from token, while offline`);this.ed.update(b);ef(this,olympe.auth.Ua.j.sf);uf(this,a,c);let d;null==(d=this.storage)||jf(d,b).catch(e=>this.G.error(e))}else{let d;
597
- null==(d=this.storage)||lf(d).catch(e=>this.G.error(e));this.error.update(olympe.C.xb(a.message));kf(this,'authentication rejected: '+a.message);uf(this,a,c)}this.F.has('login')&&this.F.delete('login')}};olympe.auth.Ua.j={INIT:'init',Sj:'authenticating',Pi:'guest',sf:'authenticated',zb:'error'};olympe.auth.Ua.F={yv:'manual',Bt:'auto',If:'tokenOnFirstConnection'};olympe.auth.Ua.D={Rj:'accepted',Vp:'redirect'};olympe.auth.Ec=class{constructor(a,b){this.G=a;this.D=b;this.j=null}F(){}te(){}H(a,b){const c=()=>{this.j=setTimeout(()=>this.D.rf(d=>{d?b(d,null):(b(null,null),c())}),this.D.j.wd)};c();return()=>{this.j&&clearTimeout(this.j);this.j=null}}zg(a,b){this.D.rf(c=>{b(c,null)})}};olympe.auth.Ec.j={SAML:'saml',OAUTH2:'openID',SRP:'srp',Gm:'olympeToken'};function vf(a){return a.get('idpName')}olympe.auth.Request=class{constructor(){this.j=new Map}set(a,b){olympe.C.Vc([b],c=>{this.j.set(a.toLocaleLowerCase(),c.toString())})}get(a){(a=this.j.get(a.toLowerCase()))&&a.gh&&(a=a.Ca.Fb);return a?a.valueOf():a}yc(){return this.get('username')}Hd(){return this.get('nonce')}toString(){return this.yc()+(this.Hd()?' with nonce':'')+(this.get('password')?' with password':'')+(vf(this)?` with idp name ${vf(this)}`:'')}};olympe.auth.fh=class{constructor(a,b,c,d={},e=null){this.user=a;this.Bi=b;this.D=c;this.j=e;this.F=d}yc(){return this.user}ue(){return this.Bi}Hd(){return this.D}Vi(){return this.F}si(){return null}Df(){return this.j}ga(){const a=olympe.V.kf(),b=Object.assign({},{user:this.user,userTag:this.Bi,nonce:this.D},this.j&&{idpName:this.j},{payload:this.F});return olympe.V.ws(bb(a,JSON.stringify(b)))}Ng(){return olympe.auth.Ec.j.SRP}};m=olympe.auth.fh.prototype;m.yc.K=new olympe.C.J(()=>String,[]);
597
+ null==(d=this.storage)||lf(d).catch(e=>this.G.error(e));this.error.update(olympe.C.xb(a.message));kf(this,'authentication rejected: '+a.message);uf(this,a,c)}this.F.has('login')&&this.F.delete('login')}};olympe.auth.Ua.j={INIT:'init',Sj:'authenticating',Pi:'guest',sf:'authenticated',zb:'error'};olympe.auth.Ua.F={yv:'manual',Bt:'auto',If:'tokenOnFirstConnection'};olympe.auth.Ua.D={Rj:'accepted',Vp:'redirect'};olympe.auth.Ec=class{constructor(a,b){this.G=a;this.D=b;this.j=null}F(){}te(){}H(a,b){const c=()=>{this.j=setTimeout(()=>this.D.rf(d=>{d?b(d,null):(b(null,null),c())}),this.D.j.wd)};c();return()=>{this.j&&clearTimeout(this.j);this.j=null}}zg(a,b){this.D.rf(c=>{b(c,null)})}};olympe.auth.Ec.j={SAML:'saml',OAUTH2:'openID',SRP:'srp',Hm:'olympeToken'};function vf(a){return a.get('idpName')}olympe.auth.Request=class{constructor(){this.j=new Map}set(a,b){olympe.C.Vc([b],c=>{this.j.set(a.toLocaleLowerCase(),c.toString())})}get(a){(a=this.j.get(a.toLowerCase()))&&a.gh&&(a=a.Ca.Fb);return a?a.valueOf():a}yc(){return this.get('username')}Hd(){return this.get('nonce')}toString(){return this.yc()+(this.Hd()?' with nonce':'')+(this.get('password')?' with password':'')+(vf(this)?` with idp name ${vf(this)}`:'')}};olympe.auth.fh=class{constructor(a,b,c,d={},e=null){this.user=a;this.Bi=b;this.D=c;this.j=e;this.F=d}yc(){return this.user}ue(){return this.Bi}Hd(){return this.D}Vi(){return this.F}si(){return null}Df(){return this.j}ga(){const a=olympe.V.kf(),b=Object.assign({},{user:this.user,userTag:this.Bi,nonce:this.D},this.j&&{idpName:this.j},{payload:this.F});return olympe.V.ws(bb(a,JSON.stringify(b)))}Ng(){return olympe.auth.Ec.j.SRP}};m=olympe.auth.fh.prototype;m.yc.K=new olympe.C.J(()=>String,[]);
598
598
  m.ue.K=new olympe.C.J(()=>String,[]);m.Hd.K=new olympe.C.J(()=>String,[]);m.Vi.K=new olympe.C.J(()=>Object,[]);m.si.K=new olympe.C.J(()=>String,[]);m.Df.K=new olympe.C.J(()=>String,[]);m.ga.K=new olympe.C.J(()=>String,[]);m.Ng.K=new olympe.C.J(()=>String,[]);function af(a){return a.Vi().access_token||null}function wf(a){return 1E3*parseInt(a.Vi().access_token_exp||'0',10)}olympe.auth.zk=class extends olympe.auth.fh{constructor(a,b,c,d,e){super(a,b,c,d,e);this.H=Date.now()}si(){return af(this)}Ng(){return olympe.auth.Ec.j.OAUTH2}};olympe.auth.Er=class extends olympe.auth.fh{constructor(a,b,c,d,e,f){super(a,b,c,e,f);this.H=d}si(){return this.H}Ng(){return olympe.auth.Ec.j.SAML}ga(){const a=olympe.V.kf(),b=Object.assign({},{user:this.yc(),userTag:this.ue(),nonce:this.Hd()},this.Df()&&{idpName:this.Df()},{payload:this.Vi(),fullToken:this.H});return olympe.V.ws(bb(a,JSON.stringify(b)))}};function df(a){let b;return null!=(b=a.db.get('main','redirectTo'))?b:null}function jf(a,b){return wb(a.D,()=>a.db.set('main','string'===typeof b?b:b.ga(),a.j).catch(c=>{throw Error(`Error when trying to set the token from the auth store: ${c}`);}))}function lf(a){return wb(a.D,()=>a.db.remove('main',a.j).catch(b=>{a.G.error(`Error when trying to remove the token from the auth store: ${b}`)}))}
599
599
  olympe.auth.It=class{constructor(a,b,c){this.F=a;this.G=b;this.j='OlympeToken-'+c.j;this.D=new olympe.V.promise.Tk;this.db=this.F.D('AUTH')}te(){this.G.debug(`olympe.auth.AuthStorage: retrieve token with key ${this.j}`);return wb(this.D,()=>{const a=this;return u(function*(){let b;try{b=yield a.db.get('main',a.j)}catch(g){throw Error(`Error when trying to get the token from the auth store: ${g}`);}let c=null;if(b)try{a.G.debug('olympe.auth.AuthStorage: Token retrieved successfully');var d=JSON,e=
600
- d.parse;var f=cb(olympe.V.kf().D(olympe.V.ox(b)));const g=e.call(d,f);let h;g.fullToken?h=new olympe.auth.Er(g.user,g.userTag,g.nonce,g.fullToken,g.payload,g.idpName):g.payload&&g.payload.id_token?h=new olympe.auth.zk(g.user,g.userTag,g.nonce,g.payload,g.idpName):h=new olympe.auth.fh(g.user,g.userTag,g.nonce,g.payload,g.idpName);c=h}catch(g){throw Error(`Error while unserializing token: ${g}`);}else a.G.debug('olympe.auth.AuthStorage: No token found');return c})})}};olympe.auth.Lk=class{redirect(){}D(){}j(){}};olympe.auth.Lk.j={GET:'GET',Th:'POST'};olympe.auth.qo=class{constructor(a){this.j=a||'default'}};olympe.auth.Zd={};function xf(a,b,c){bf(a.D,olympe.auth.ud.j.Og,{token:b.Hd()},(d,e)=>{if(null!==d)c(d,null);else switch(e.c){case olympe.auth.ud.j.zb:c(Error('Invalid token'),null);break;case olympe.auth.ud.j.ij:d=null;if(e=e.payload){const f=e.userName,g=e.userTag,h=e.rndCook,k=e.payload,l=e.protocol;'SAML'===l?d=new olympe.auth.Er(f,g,h,e.samlToken,k,vf(b)):'openid'===l&&(d=new olympe.auth.zk(f,g,h,k,vf(b)))}c(null,d);break;default:c(Error('Unknown response from server'),null)}})}
601
- olympe.auth.Zd.xv=class extends olympe.auth.Ec{constructor(a,b,c){super(a,b);this.storage=c}F(){return olympe.auth.Ec.j.Gm}te(a,b){this.storage.te().then(c=>{xf(this,a,(d,e)=>{b(d,null!=e?e:c)})}).catch(c=>{b(c,null)})}};function yf(a,b,c){var d=wf(b);const e=Math.max(d-b.H,0),f=olympe.W.getParameter(olympe.auth.U.Yr);d=Math.max(Math.round(d-e*(1-Math.max(Math.min((f||50)/100,.95),0))-Date.now()),0);if(0<d)return setTimeout(()=>{a.zg(b,c)},d);a.zg(b,c);return null}
600
+ d.parse;var f=cb(olympe.V.kf().D(olympe.V.ox(b)));const g=e.call(d,f);let h;g.fullToken?h=new olympe.auth.Er(g.user,g.userTag,g.nonce,g.fullToken,g.payload,g.idpName):g.payload&&g.payload.id_token?h=new olympe.auth.zk(g.user,g.userTag,g.nonce,g.payload,g.idpName):h=new olympe.auth.fh(g.user,g.userTag,g.nonce,g.payload,g.idpName);c=h}catch(g){throw Error(`Error while unserializing token: ${g}`);}else a.G.debug('olympe.auth.AuthStorage: No token found');return c})})}};olympe.auth.Lk=class{redirect(){}D(){}j(){}};olympe.auth.Lk.j={GET:'GET',Th:'POST'};olympe.auth.ro=class{constructor(a){this.j=a||'default'}};olympe.auth.Zd={};function xf(a,b,c){bf(a.D,olympe.auth.ud.j.Og,{token:b.Hd()},(d,e)=>{if(null!==d)c(d,null);else switch(e.c){case olympe.auth.ud.j.zb:c(Error('Invalid token'),null);break;case olympe.auth.ud.j.ij:d=null;if(e=e.payload){const f=e.userName,g=e.userTag,h=e.rndCook,k=e.payload,l=e.protocol;'SAML'===l?d=new olympe.auth.Er(f,g,h,e.samlToken,k,vf(b)):'openid'===l&&(d=new olympe.auth.zk(f,g,h,k,vf(b)))}c(null,d);break;default:c(Error('Unknown response from server'),null)}})}
601
+ olympe.auth.Zd.xv=class extends olympe.auth.Ec{constructor(a,b,c){super(a,b);this.storage=c}F(){return olympe.auth.Ec.j.Hm}te(a,b){this.storage.te().then(c=>{xf(this,a,(d,e)=>{b(d,null!=e?e:c)})}).catch(c=>{b(c,null)})}};function yf(a,b,c){var d=wf(b);const e=Math.max(d-b.H,0),f=olympe.W.getParameter(olympe.auth.U.Yr);d=Math.max(Math.round(d-e*(1-Math.max(Math.min((f||50)/100,.95),0))-Date.now()),0);if(0<d)return setTimeout(()=>{a.zg(b,c)},d);a.zg(b,c);return null}
602
602
  olympe.auth.Zd.Ov=class extends olympe.auth.Ec{constructor(a,b,c,d){super(a,b);this.N=c;this.R=d}F(){return olympe.auth.Ec.j.OAUTH2}te(a){const b=encodeURIComponent(this.N.j());a=vf(a)?`idpName=${vf(a)}&`:'';this.N.redirect(`${this.R}/auth?${a}url=${b}`,null,olympe.auth.Lk.j.GET)}H(a,b){0<wf(a)?this.j=yf(this,a,b):b(null,a);return this.Y.bind(this)}zg(a,b){cf(this.D,a,(c,d)=>{c?b(c,null):d&&(b(null,d),this.j&&(this.j=yf(this,d,b)))})}Y(){this.j&&clearTimeout(this.j);this.j=null}};function zf(a,b){bf(a.D,olympe.auth.ud.j.SAML,{},(c,d)=>{null!==c?b(c):d.url&&d.request?b(null,d.url,d.request.replace(/\s/g,''),d.id):b(Error('Missing parameters from server response'))})}olympe.auth.Zd.SAML=class extends olympe.auth.Ec{constructor(a,b,c){super(a,b);this.N=c}F(){return olympe.auth.Ec.j.SAML}te(a,b){zf(this,c=>{c?b(c,null):this.N.D(vf(a))})}};function Af(a,b,c){const d=olympe.auth.ud.j.yu,e=olympe.auth.ud.j.zb,f=olympe.auth.ud.j.ww,g={I:b.yc()};bf(a.D,d,g,(h,k)=>{if(null!==h)c(h);else switch(k.c){case e:c(Error(`Username '${b.yc()}' invalid, or password does not match`));break;case f:h=k.payload;c(null,h.S,h.B);break;default:c(Error('Unknown response from server'))}})}
603
603
  function Bf(a,b,c){const d=olympe.auth.ud.j.Ct,e=olympe.auth.ud.j.zb,f=olympe.auth.ud.j.ij;b={A:b.get('a'),M:b.get('m1'),I:b.yc()};bf(a.D,d,b,(g,h)=>{if(null!==g)c(g,null);else switch(h.c){case e:a.G.debug('Login failed, invalid username or password');c(Error('Invalid username or password'),null);break;case f:g=h.payload;a.G.debug('Login successful, creating token');h=g.payload?JSON.parse(g.payload):void 0;c(null,new olympe.auth.fh(g.userName,g.userTag,g.rndCook,h));break;default:c(Error(`Unknown response from server (type ${h.c})`),
604
- null)}})}olympe.auth.Zd.SRP=class extends olympe.auth.Ec{F(){return olympe.auth.Ec.j.SRP}te(a,b){const c=a.get('password');a.j.delete('password');this.G.debug('Sending SRP request');Af(this,a,(d,e,f)=>{this.G.debug('Received Salt+B message');if(d)b(d,null);else{try{const g=new SRPClient;g.step1(a.yc(),c);const h=g.step2(e,f);a.set('a',h.A);a.set('m1',h.M1)}catch(g){b(g,null);return}this.G.debug('Sending SRP A+M (proof) message');Bf(this,a,b)}})}};olympe.auth.P={Ea:'auth.Manager',Da:'auth.Logger',hj:'auth.Storage',Cl:'auth.appNameToken',Hk:'auth.Redirector',Ir:'auth.ServerConnector'};olympe.auth.U={Zl:'auth.defaultProvider',ko:'auth.autoLogin',mo:'auth.autoUser',lo:'auth.autoPassword',If:'auth.token',Io:'auth.cacheTokenTimeout',Yr:'auth.tokenDurationPercentage'};
605
- olympe.W.config(function(a){E(a,olympe.auth.U.Zl,olympe.auth.Ec.j.SRP);E(a,olympe.auth.U.ko,!1);E(a,olympe.auth.U.mo,'');E(a,olympe.auth.U.lo,'');E(a,olympe.auth.U.If,'');E(a,olympe.auth.U.Yr,50);E(a,olympe.auth.U.Io,3E5);D(a,olympe.auth.P.Da,[olympe.ia.P.Ea],b=>b.cd('auth'));C(a,olympe.auth.P.Cl,olympe.auth.qo,olympe.Db.P.ah);C(a,olympe.auth.P.hj,olympe.auth.It,olympe.Db.P.qk,olympe.auth.P.Da,olympe.auth.P.Cl);C(a,olympe.auth.P.Ir,olympe.auth.ud,olympe.auth.P.Da,olympe.L.P.Nk,olympe.L.P.km,olympe.L.P.vf,
606
- olympe.auth.P.Hk,olympe.auth.P.hj);Ya(a,olympe.auth.P.Hk);D(a,olympe.auth.P.Ea,[olympe.auth.P.Da,olympe.L.P.vf,olympe.auth.P.Ir,olympe.host.P.Ge,olympe.host.P.Qk,new olympe.W.rb(olympe.auth.P.hj,olympe.W.Bh.j.Cm),new olympe.W.rb(olympe.auth.P.Hk,olympe.W.Bh.j.Cm),new olympe.W.pa(olympe.auth.U.Zl),new olympe.W.pa(olympe.auth.U.ko),new olympe.W.pa(olympe.auth.U.mo),new olympe.W.pa(olympe.auth.U.lo),new olympe.W.pa(olympe.auth.U.If),new olympe.W.pa(olympe.auth.U.Io)],(b,c,d,e,f,g,h,k,l,n,p,q,r)=>{const t=
604
+ null)}})}olympe.auth.Zd.SRP=class extends olympe.auth.Ec{F(){return olympe.auth.Ec.j.SRP}te(a,b){const c=a.get('password');a.j.delete('password');this.G.debug('Sending SRP request');Af(this,a,(d,e,f)=>{this.G.debug('Received Salt+B message');if(d)b(d,null);else{try{const g=new SRPClient;g.step1(a.yc(),c);const h=g.step2(e,f);a.set('a',h.A);a.set('m1',h.M1)}catch(g){b(g,null);return}this.G.debug('Sending SRP A+M (proof) message');Bf(this,a,b)}})}};olympe.auth.P={Ea:'auth.Manager',Da:'auth.Logger',hj:'auth.Storage',Cl:'auth.appNameToken',Hk:'auth.Redirector',Ir:'auth.ServerConnector'};olympe.auth.U={Zl:'auth.defaultProvider',lo:'auth.autoLogin',no:'auth.autoUser',mo:'auth.autoPassword',If:'auth.token',Jo:'auth.cacheTokenTimeout',Yr:'auth.tokenDurationPercentage'};
605
+ olympe.W.config(function(a){E(a,olympe.auth.U.Zl,olympe.auth.Ec.j.SRP);E(a,olympe.auth.U.lo,!1);E(a,olympe.auth.U.no,'');E(a,olympe.auth.U.mo,'');E(a,olympe.auth.U.If,'');E(a,olympe.auth.U.Yr,50);E(a,olympe.auth.U.Jo,3E5);D(a,olympe.auth.P.Da,[olympe.ia.P.Ea],b=>b.cd('auth'));C(a,olympe.auth.P.Cl,olympe.auth.ro,olympe.Db.P.ah);C(a,olympe.auth.P.hj,olympe.auth.It,olympe.Db.P.qk,olympe.auth.P.Da,olympe.auth.P.Cl);C(a,olympe.auth.P.Ir,olympe.auth.ud,olympe.auth.P.Da,olympe.L.P.Nk,olympe.L.P.mm,olympe.L.P.vf,
606
+ olympe.auth.P.Hk,olympe.auth.P.hj);Ya(a,olympe.auth.P.Hk);D(a,olympe.auth.P.Ea,[olympe.auth.P.Da,olympe.L.P.vf,olympe.auth.P.Ir,olympe.host.P.Ge,olympe.host.P.Qk,new olympe.W.rb(olympe.auth.P.hj,olympe.W.Bh.j.Dm),new olympe.W.rb(olympe.auth.P.Hk,olympe.W.Bh.j.Dm),new olympe.W.pa(olympe.auth.U.Zl),new olympe.W.pa(olympe.auth.U.lo),new olympe.W.pa(olympe.auth.U.no),new olympe.W.pa(olympe.auth.U.mo),new olympe.W.pa(olympe.auth.U.If),new olympe.W.pa(olympe.auth.U.Jo)],(b,c,d,e,f,g,h,k,l,n,p,q,r)=>{const t=
607
607
  [new olympe.auth.Zd.xv(b,d,g),new olympe.auth.Zd.SRP(b,d),new olympe.auth.Zd.SAML(b,d,h),new olympe.auth.Zd.Ov(b,d,h,re(d.Mh,olympe.L.Xb.wk))];if(!t.map(v=>v.F()).includes(k))throw Error(`Default provider name ${k} given by parameter ${olympe.auth.U.Zl} cannot be found`);return new olympe.auth.Ua(b,c,d,g,h,e,f,t,new Map([['defaultProvider',k],['autoLogin',l],['autoUser',n],['autoPassword',p],['autoToken',q],['cacheTokenTimeout',r]]))},!0)},'olympe.auth');
608
608
  olympe.W.run([olympe.auth.P.Ea],a=>{olympe.auth.re=()=>a});olympe.Va.node.auth={};olympe.Va.node.auth.Kq=class{redirect(){console.warn('Redirection n/a in Node.JS')}D(){console.warn('Redirection n/a in Node.JS')}j(){console.warn('Redirection n/a in Node.JS');return''}};olympe.Va.node.auth.Kq.za=[olympe.auth.Lk];olympe.W.config(a=>{C(a,olympe.auth.P.Hk,olympe.Va.node.auth.Kq)},'olympe.native.node.auth');olympe.Va.node.Db={};function Cf(){throw Error('Key-Value Database does not implement this in NodeJS');}
609
609
  olympe.Va.node.Db.Iq=class{constructor(a){this.G=a;this.j=new Map}Y(){return 0}N(a){const b=this;return u(function*(){let c,d;return null!=(d=null==(c=b.j.get(a))?void 0:c.size)?d:0})}F(a){const b=this;return u(function*(){const c=b.j.get(a);return c?Array.from(c.values()):[]})}R(a){const b=this;return u(function*(){const c=b.j.get(a);return c?Array.from(c.keys()):[]})}forEach(a,b){const c=this;return u(function*(){let d;for(const [e,f]of null!=(d=c.j.get(a))?d:new Map)b(f,e)})}has(a,b){const c=this;
610
610
  return u(function*(){let d,e;return null!=(e=null==(d=c.j.get(a))?void 0:d.has(b))?e:!1})}get(a,b){const c=this;return u(function*(){let d;return null==(d=c.j.get(a))?void 0:d.get(b)})}set(a,b,c){const d=this;return u(function*(){let e;return null==(e=d.j.get(a))?void 0:e.set(c,b)})}remove(a,b){const c=this;return u(function*(){let d;yield null==(d=c.j.get(a))?void 0:d.delete(b)})}ea(){Cf();return Promise.resolve()}$(){Cf();return Promise.resolve()}clear(a){const b=this;return u(function*(){let c;
611
- null==(c=b.j.get(a))||c.clear()})}H(){Cf();return Promise.resolve([])}D(){return u(function*(){Cf()})}};olympe.Va.node.Db.Iq.za=[olympe.Db.lv];olympe.Va.node.Db.Jq=class{constructor(a){this.j=new Map;this.G=a}D(a){this.j.has(a)||this.j.set(a,new olympe.Va.node.Db.Iq(this.G));return this.j.get(a)}};olympe.Va.node.Db.Jq.za=[olympe.Db.mv];olympe.W.config(function(a){C(a,olympe.Db.P.qk,olympe.Va.node.Db.Jq,olympe.Db.P.Da)},'olympe.native.node.localstorage');olympe.Va.node.storage={};olympe.Va.node.storage.Storage=class{constructor(a){this.G=a}write(a,b,c,d,e){e&&e('Not Implemented.')}open(a){a(null)}close(a){a(null)}};olympe.Va.node.storage.Storage.za=[olympe.Db.Storage];olympe.W.config(function(a){Wa(a,olympe.Db.P.hj,olympe.Va.node.storage.Storage,olympe.host.P.Da)},'olympe.native.html.storage');olympe.yg={};olympe.yg.U={VERSION:'version.version',Lt:'version.branch',uf:'version.commit',Ew:'version.tag',wp:'version.olympe-framework',Mt:'version.build'};olympe.W.config(function(a){E(a,olympe.yg.U.VERSION,'');E(a,olympe.yg.U.Lt,'');E(a,olympe.yg.U.uf,'');E(a,olympe.yg.U.Ew,'');E(a,olympe.yg.U.wp,'');E(a,olympe.yg.U.Mt,'')},'olympe.main');const Df=require('fs'),Ef=require('fs/promises');let Ff;const Gf=null!=(Ff=process.env.EXTRA_CONFIG_PATH)?Ff:null;let Hf;const Hb=null!=(Hf=process.env.EXTRA_CONFIG_KEY_PREFIX)?Hf:'';function Gb(a){return Ef.readFile(a,{encoding:'utf8'}).then(b=>'string'===typeof b?b:null).catch(()=>null)}
611
+ null==(c=b.j.get(a))||c.clear()})}H(){Cf();return Promise.resolve([])}D(){return u(function*(){Cf()})}};olympe.Va.node.Db.Iq.za=[olympe.Db.lv];olympe.Va.node.Db.Jq=class{constructor(a){this.j=new Map;this.G=a}D(a){this.j.has(a)||this.j.set(a,new olympe.Va.node.Db.Iq(this.G));return this.j.get(a)}};olympe.Va.node.Db.Jq.za=[olympe.Db.mv];olympe.W.config(function(a){C(a,olympe.Db.P.qk,olympe.Va.node.Db.Jq,olympe.Db.P.Da)},'olympe.native.node.localstorage');olympe.Va.node.storage={};olympe.Va.node.storage.Storage=class{constructor(a){this.G=a}write(a,b,c,d,e){e&&e('Not Implemented.')}open(a){a(null)}close(a){a(null)}};olympe.Va.node.storage.Storage.za=[olympe.Db.Storage];olympe.W.config(function(a){Wa(a,olympe.Db.P.hj,olympe.Va.node.storage.Storage,olympe.host.P.Da)},'olympe.native.html.storage');olympe.yg={};olympe.yg.U={VERSION:'version.version',Lt:'version.branch',uf:'version.commit',Ew:'version.tag',xp:'version.olympe-framework',Mt:'version.build'};olympe.W.config(function(a){E(a,olympe.yg.U.VERSION,'');E(a,olympe.yg.U.Lt,'');E(a,olympe.yg.U.uf,'');E(a,olympe.yg.U.Ew,'');E(a,olympe.yg.U.xp,'');E(a,olympe.yg.U.Mt,'')},'olympe.main');const Df=require('fs'),Ef=require('fs/promises');let Ff;const Gf=null!=(Ff=process.env.EXTRA_CONFIG_PATH)?Ff:null;let Hf;const Hb=null!=(Hf=process.env.EXTRA_CONFIG_KEY_PREFIX)?Hf:'';function Gb(a){return Ef.readFile(a,{encoding:'utf8'}).then(b=>'string'===typeof b?b:null).catch(()=>null)}
612
612
  function If(a){var b=Jf;console.debug(`Start watching config files for changes: ${b}`);b.forEach(c=>{Ef.access(c,Df.constants.F_OK).then(()=>{Df.watch(c,d=>u(function*(){if('change'===d){console.log(`Config file "${c}" has changed. Loading new configuration...`);try{const e=yield olympe.V.et([c]),f=olympe.W.Os(e);for(const [g,h]of f)a.Qj(g,h)}catch(e){console.error(`Failed to updated config from file ${c} with message: ${e.message}`)}}}))}).catch(()=>{})})}
613
613
  function Kf(){console.log('The node process received a signal for graceful shutdown');let a,b,c,d;(null!=(d=null==(b=(a=olympe.Va.node.host).ll)?void 0:null==(c=b.call(a))?void 0:hd(c))?d:Promise.resolve()).then(()=>console.log('The node backend has stopped successfully')).catch(e=>console.warn(e)).finally(()=>process.exit(0))}process.on('SIGTERM',Kf);process.on('SIGINT',Kf);process.on('SIGBREAK',Kf);process.on('SIGHUP',Kf);
614
614
  process.on('uncaughtException',a=>{console.error('Uncaught Exception:',a);Kf()});const Jf=['oConfig.json','conf.d/oConfig.json','version.json'];Gf&&Jf.push(Gf);
615
615
  olympe.V.et(Jf).then(a=>{try{const b=Object.create(null),c=process.argv;for(let f=2;f<c.length;f++){const g=/([^?&=]+)(=?([^?&=]+))?/g.exec(c[f]);!Array.isArray(g)||4>g.length?console.warn(`Malformed config parameter "${c[f]}" ignored. It should of the form 'a=b'`):b[g[1]]=olympe.V.xs(g[3])}const d=new olympe.W.Zt(a,b);La(d);const e=d.compile();Na(e);If(e)}catch(b){console.error(`Failed to start Olympe: ${b}`),process.exit(1)}}).catch(a=>{console.error(`Failed to load config files: ${a.message}.`);
616
616
  setInterval(()=>{},1073741824)});olympe.dc={};olympe.dc.va={ORIGIN:'<',DESTINATION:'>'};w('olympe.dc.Direction',olympe.dc.va);olympe.dc.hc={$c:'ff022000000000000000',Li:'ff02200000000000000e',Zj:'ff02200000000000000f'};olympe.dc.iq={VERSION:'@v',$g:'@s'};olympe.dc.ie={Ye:'?',hg:'~'};olympe.dc.nD={cj:'online',Ef:'offline',SB:'invalidate'};olympe.dc.Ia={SELF:'self',SERVER:'server',$e:'remote'};
617
- olympe.dc.Mb={NONE:null,fp:'ff023000000000000037',Dc:'ff023000000000000137',kg:'ff023000000000000237',tw:'ff023000000000000337',fu:'ff023000000000000437',Qw:'ff023000000000000537',UB:olympe.dc.ie.hg+'ff023000000000000037',VB:olympe.dc.ie.hg+'ff023000000000000237',TB:olympe.dc.ie.hg+'ff023000000000000437',dE:olympe.dc.ie.hg+'ff023000000000000537'};olympe.dc.Uq=class extends Error{constructor(a){var b=olympe.dc.ha(),c=olympe.dc.fe(),d=b.model(a);d=`\n- model: ${d} (${d?b.name(d):'no name'})`;b=b.source(a);c=`\n- source: ${b} (${b?c.jb(b).name():'no name'})`;super(`Trying to use a CloudObject that does not exist:\n- tag: ${a}${d}${c}${''}`)}};olympe.dc.Nq=class extends Error{constructor(){var a=Lf();super('Try to access a resource not available yet: BusinessContainer, wait for it to be ready');this.j=a}};olympe.dc.Writable=class{Rc(){}Yc(){}D(){}Pa(){}ic(){}};olympe.dc.fr=class{rc(){}T(){}H(){}};olympe.dc.wc=class{constructor(a){this.tag='string'===typeof a?a:a.X()}X(){return this.tag}Fa(a){return a instanceof olympe.dc.wc&&this.tag===a.tag}};olympe.dc.wc.za=[olympe.dc.Ze];olympe.dc.wc.prototype.Fa.K=olympe.C.J.j;olympe.dc.ou=class a{constructor(b,c,d,e,f,g){this.G=b;this.$=c;this.db=c.view;this.ea=d;this.Kb=e;this.D=f;this.N=g;this.j=new Map;this.F=ib(new olympe.V.$h(6E5),(h,k)=>{URL.revokeObjectURL(k);Mf(this.db,h,a.j(h))})}ja(b,c,d,e,f){this.Wa(c).then(g=>{this.mb(b,g,d,!!this.N,e,f)}).catch(g=>this.G.error(g))}H(b){const c=this;return u(function*(){const d=f=>{f=`Failed to download file ${b.X()}: ${f}`;c.G.error(f);throw Error(f);},e=b.X();if(gb(c.F.j,e)){const f=c.F.get(e);return c.D.F(f).then(g=>g.arrayBuffer()).then(g=>
617
+ olympe.dc.Mb={NONE:null,gp:'ff023000000000000037',Dc:'ff023000000000000137',kg:'ff023000000000000237',tw:'ff023000000000000337',fu:'ff023000000000000437',Qw:'ff023000000000000537',UB:olympe.dc.ie.hg+'ff023000000000000037',VB:olympe.dc.ie.hg+'ff023000000000000237',TB:olympe.dc.ie.hg+'ff023000000000000437',dE:olympe.dc.ie.hg+'ff023000000000000537'};olympe.dc.Uq=class extends Error{constructor(a){var b=olympe.dc.ha(),c=olympe.dc.fe(),d=b.model(a);d=`\n- model: ${d} (${d?b.name(d):'no name'})`;b=b.source(a);c=`\n- source: ${b} (${b?c.jb(b).name():'no name'})`;super(`Trying to use a CloudObject that does not exist:\n- tag: ${a}${d}${c}${''}`)}};olympe.dc.Nq=class extends Error{constructor(){var a=Lf();super('Try to access a resource not available yet: BusinessContainer, wait for it to be ready');this.j=a}};olympe.dc.Writable=class{Rc(){}Yc(){}D(){}Pa(){}ic(){}};olympe.dc.fr=class{rc(){}T(){}H(){}};olympe.dc.wc=class{constructor(a){this.tag='string'===typeof a?a:a.X()}X(){return this.tag}Fa(a){return a instanceof olympe.dc.wc&&this.tag===a.tag}};olympe.dc.wc.za=[olympe.dc.Ze];olympe.dc.wc.prototype.Fa.K=olympe.C.J.j;olympe.dc.ou=class a{constructor(b,c,d,e,f,g){this.G=b;this.$=c;this.db=c.view;this.ea=d;this.Kb=e;this.D=f;this.N=g;this.j=new Map;this.F=ib(new olympe.V.$h(6E5),(h,k)=>{URL.revokeObjectURL(k);Mf(this.db,h,a.j(h))})}ja(b,c,d,e,f){this.Wa(c).then(g=>{this.mb(b,g,d,!!this.N,e,f)}).catch(g=>this.G.error(g))}H(b){const c=this;return u(function*(){const d=f=>{f=`Failed to download file ${b.X()}: ${f}`;c.G.error(f);throw Error(f);},e=b.X();if(gb(c.F.j,e)){const f=c.F.get(e);return c.D.F(f).then(g=>g.arrayBuffer()).then(g=>
618
618
  new Uint8Array(g,0,g.byteLength)).catch(d)}return c.downloadFileContent(b).then(f=>c.D.H(f)).then(f=>{if(c.N){let g;const h=null!=(g=b.get(olympe.dm.File.mimeTypeProp))?g:'application/data';c.R(e,new Blob([f],{type:h}))}return f}).catch(d)})}downloadFileContent(b){var c=b.X(),d=b.get(olympe.dm.File.j);const e=b.get(olympe.dm.File.urlProp);if(e.startsWith('stream:'))return this.Y(c).then(()=>this.downloadFileContent(b));if(e.startsWith('blob:'))return this.D.F(e).then(f=>f.arrayBuffer()).then(f=>new Uint8Array(f,
619
619
  0,f.byteLength));if(d)return d=this.db.model(b),c=new olympe.dc.Request(olympe.dc.Request.j.eg,olympe.dc.fe().Qe(b),{tag:c,model:d,url:e.valueOf()}),this.Kb.request(c);c=N(e);Ic(c,olympe.net.wa.ResponseType.Hl);return Jc(this.ea,c).then(f=>{const g=f.Jc();if(200<=g&&300>g)return f.getData();throw Error(`Failed to download file ${b}. Response code ${g}`);})}ta(b,c,d){c=new olympe.dc.Request(olympe.dc.Request.j.cg,d,{tag:b,model:c});return this.Kb.request(c).then(()=>this.G.debug(`Successfully deleted file: ${b}`)).catch(e=>
620
620
  {throw Error(`Failed to delete file ${b}: ${e.message}`);})}Ha(b){const c=new olympe.V.stream.mg;this.H(b).then(d=>{eb(d).pipeTo(c).catch(()=>{})});return c}Eb(b,c){this.D.H(c).then(d=>{d=URL.createObjectURL(new Blob([d]));const e=new olympe.dc.db.fc;e.Yc(b,(new Map).set(olympe.dm.File.urlProp.X(),d));this.$.nd(Nf(e));let f;null==(f=this.j.get(b))||f.forEach(g=>g(null))}).catch(d=>{let e;null==(e=this.j.get(b))||e.forEach(f=>f(d))}).finally(()=>{this.j.delete(b)})}Y(b){return new Promise((c,d)=>{let e;
621
621
  const f=null!=(e=this.j.get(b))?e:[];f.push(g=>g?d(g):c());this.j.set(b,f)})}mb(b,c,d,e,f,g){const h=e?k=>{this.R(b,new Blob([c],{type:d}));f(k)}:f;e=this.db.model(b);e=new olympe.dc.Request(olympe.dc.Request.j.og,olympe.dc.fe().Qe(b),{tag:b,model:e,content:c,mimeType:d});this.Kb.request(e).then(k=>h(null!=k?k:'')).catch(null!=g?g:this.G.error.bind(this.G))}Wa(b){return u(function*(){var c=b instanceof olympe.C.Ta?b.valueOf():b;return'string'===typeof c?ab(c):c instanceof ArrayBuffer?new Uint8Array(c,
622
622
  0,c.byteLength):c instanceof Blob?(c=yield c.arrayBuffer(),new Uint8Array(c,0,c.byteLength)):c})}R(b,c){const d=olympe.dc.fa(b);b=URL.createObjectURL(c);this.F.set(d,b);const e=a.j(d);Of(this.db,d,f=>{f||(this.F.delete(d),Mf(this.db,d,e))},e)}static j(b){return`cacheBinary${b}`}};function Pf(a,b){let c=Qf(b),d=null;for(;!c&&b&&b!==d;){d=b;b=a.db.gf(b);if(null===b)break;c=Qf(b)}let e;return null!=(e=c)?e:null}olympe.dc.Hu=class{constructor(a,b,c){this.G=a;this.j=b;this.db=b.view;this.D=c;this.Sa=new FinalizationRegistry(d=>{this.G.F()&&this.G.debug(`Collect instance ${d} (${this.db.name(d)||'no name'})`);this.j.detach([d],olympe.dc.db.Instance.j.Zp)})}};function Rf(a,b){a.origin=b;return a}function Sf(a,b,c){a.D.set(b,c);return a}function Tf(a){let b;return null!=(b=a.D)?b:new Map}olympe.dc.Request=class{constructor(a,b,c,d){this.type=a;this.origin=olympe.dc.Ia.SELF;this.j=b;this.content=null!=c?c:null;this.user=null!=d?d:de(olympe.auth.re()).ue();this.D=new Map}getType(){return this.type}yc(){return this.user}jc(){return this.j}toString(){return`Request of type ${this.type}, from ${this.origin} to ${this.j}; content: ${this.content}`}};
623
- olympe.dc.Request.j={pc:1,Kg:10,qu:24,Kp:25,ru:28,Tg:30,Gk:31,JC:32,ef:40,eh:41,vo:42,tr:43,ZD:44,Fi:45,xo:46,jk:47,og:50,eg:51,cg:52,Nw:60,bw:61,Fp:62,LB:63,Tt:64,zh:65,ck:91,su:93,Bm:95,QUERY_RESULT:97};function Uf(a,b,c,d,e){const f=olympe.C.lh();a.sources.set(olympe.dc.Ia.SERVER,e.init(a));a.F?a.sources.set(olympe.dc.Ia.$e,d.init(a)):Of(b,a.j,()=>{a.sources.set(olympe.dc.Ia.$e,d.init(a));const g=new Map;olympe.dc.ma.from(a.j,a.j).fb(olympe.dm.DataSource.Lj).filter(olympe.dc.query.Ba.Fa(olympe.dm.DataSource.hi,!0)).observe(f).subscribe(h=>{var k=h.Ej();for(var l of k){const [p,q]=g.get(l);c.D(p);c.F(q);k=a.sources.get(l);a.sources.delete(l);var n=void 0;null==(n=k)||n.destroy()}h=h.yj();for(const p of h)if(h=
623
+ olympe.dc.Request.j={pc:1,Kg:10,qu:24,Kp:25,ru:28,Tg:30,Gk:31,JC:32,ef:40,eh:41,wo:42,tr:43,ZD:44,Fi:45,yo:46,jk:47,og:50,eg:51,cg:52,Nw:60,bw:61,Fp:62,LB:63,Tt:64,zh:65,ck:91,su:93,Cm:95,QUERY_RESULT:97};function Uf(a,b,c,d,e){const f=olympe.C.lh();a.sources.set(olympe.dc.Ia.SERVER,e.init(a));a.F?a.sources.set(olympe.dc.Ia.$e,d.init(a)):Of(b,a.j,()=>{a.sources.set(olympe.dc.Ia.$e,d.init(a));const g=new Map;olympe.dc.ma.from(a.j,a.j).fb(olympe.dm.DataSource.Lj).filter(olympe.dc.query.Ba.Fa(olympe.dm.DataSource.hi,!0)).observe(f).subscribe(h=>{var k=h.Ej();for(var l of k){const [p,q]=g.get(l);c.D(p);c.F(q);k=a.sources.get(l);a.sources.delete(l);var n=void 0;null==(n=k)||n.destroy()}h=h.yj();for(const p of h)if(h=
624
624
  p.X(),!a.sources.has(h)){const q=new olympe.dc.sources.sq(a.G,p);a.sources.set(h,q);l=c.j(()=>q.healthCheck(),h,olympe.host.Je.j.READINESS);n=c.H(()=>q.destroy(),`Datasource ${h}`);g.set(h,[l,n]);q.init(a)}});Mf(b,a.j,'router',!0)},'router')}function Vf(a,b,c){let d=a.D.get(b);void 0===d&&(d=[],a.D.set(b,d));d.push(c)}
625
625
  olympe.dc.gw=class{constructor(a,b,c,d,e,f,g){this.G=a;this.j=f;this.F=g;this.sources=new Map;this.D=new Map;Uf(this,d,e,b,c)}request(a){this.G.debug('Router: sends',a);return this.jb(a.jc()).request(a)}subscribe(a,b){this.G.debug('Router: subscribes',a);return this.jb(a.jc()).subscribe(a,b)}dd(a){if(a.jc()!==this.j)this.G.error(`Router: try to reply to a request that is not for this data cloud, ignore it: ${a}`);else{var b;null==(b=this.D.get(a.getType()))||b.forEach(c=>c(a))}}yi(a){let b;null==
626
626
  (b=this.D.get(a.getType()))||b.forEach(c=>c(a));return this.jb(olympe.dc.Ia.$e).yi(a)}jb(a){let b;return null!=(b=this.sources.get(a))?b:this.sources.get(olympe.dc.Ia.$e)}};function Nf(a,b){b=new olympe.dc.Ig(a.T(),null!=b?b:null);b.j=a;return b}function Wf(a,b,c,d){c=new olympe.dc.Ig(null!=d?d:olympe.V.Kc(),null!=c?c:null);c.D=b;c.Ga=a;return c}
627
627
  olympe.dc.Ig=class{constructor(a,b){this.id=a;this.Ga=this.j=this.D=null;this.dl=b}static j(a){return Wf(a.p,a.s,a.t,a.i)}T(){return this.id}rc(a){return this.j instanceof olympe.dc.db.fc?this.j.rc(a):Array.isArray(this.Ga)?(new olympe.dc.transaction.dj(this.D)).D(this.Ga,a):a}H(){let a,b,c,d;return null!=(d=null!=(c=null==(a=this.Ga)?void 0:a.length)?c:null==(b=this.j)?void 0:b.H())?d:0}bc(){return this.j instanceof olympe.dc.db.fc?this.j:Array.isArray(this.Ga)?(this.j=(new olympe.dc.transaction.dj(this.D)).j(this.Ga,
628
- this.id),this.Ga=null,this.j):new olympe.dc.db.fc(this.id)}jl(){if(Array.isArray(this.Ga))return this.Ga;if(this.j instanceof olympe.dc.db.fc){const a=new olympe.dc.transaction.He;this.j.rc(a);return Xf(a)}return[]}ga(){return{p:this.jl(),t:this.dl,s:this.D,i:this.id}}};olympe.dc.Ig.za=[olympe.dc.fr];olympe.dc.Sa={};const Yf=olympe.dc.va.ORIGIN,Zf=olympe.dc.va.DESTINATION,$f=new Map,ag=new Map,bg=new Map,cg=new Map;function Qf(a){let b;return null!=(b=$f.get(a))?b:null}function dg(a,b,c){let d=a;'function'===typeof a&&(d=c.entry);a=[...(d.ao||[])];return olympe.dc.na.j(b,c,...a)}function eg(a,b){cg.set(a,b);return a}function fg(a){let b,c;return null!=(c=null==(b=$f.get(a))?void 0:b.D)?c:olympe.dc.CloudObject}
628
+ this.id),this.Ga=null,this.j):new olympe.dc.db.fc(this.id)}jl(){if(Array.isArray(this.Ga))return this.Ga;if(this.j instanceof olympe.dc.db.fc){const a=new olympe.dc.transaction.He;this.j.rc(a);return Xf(a)}return[]}ga(){return{p:this.jl(),t:this.dl,s:this.D,i:this.id}}};olympe.dc.Ig.za=[olympe.dc.fr];olympe.dc.Sa={};const Yf=olympe.dc.va.ORIGIN,Zf=olympe.dc.va.DESTINATION,$f=new Map,ag=new Map,bg=new Map,cg=new Map;function Qf(a){let b;return null!=(b=$f.get(a))?b:null}function dg(a,b,c){let d=a;'function'===typeof a&&(d=c.entry);a=[...(d.bo||[])];return olympe.dc.oa.j(b,c,...a)}function eg(a,b){cg.set(a,b);return a}function fg(a){let b,c;return null!=(c=null==(b=$f.get(a))?void 0:b.D)?c:olympe.dc.CloudObject}
629
629
  function gg(a,b,c){const d=a+'@'+(b===Zf?Yf:Zf);if(ag.has(d))throw Error(`Try to register the same relation (${b+a}) multiple times.`);ag.set(d,c)}function hg(a){a=a.X()+'@'+a.La();return ag.get(a)||olympe.dc.CloudObject}function P(a,b){b.NAME=a;bg.set(a,b)}function Q(a){let b;return null!=(b=a.NAME)?b:null}
630
- olympe.dc.na=class{constructor(){}static j(a,b,...c){if($f.has(a))throw Error(`Tag: ${a} - overwriting already defined CloudObject class ${$f.get(a).D.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.W.rb(g):g}}b=new olympe.dc.Sa.Entry(a,b,d);$f.set(a,b);return b.D.entry=b}static ac(a){let b,c;return null!=(c=null==(b=a.entry)?void 0:b.X())?c:null}};function ig(a,b){a.j=b}function R(a,b){b=b.$b();gg(b.X(),b.La(),a.D);return b}function jg(a){a.F=!0;return a}
631
- olympe.dc.Sa.Entry=class{constructor(a,b,c){this.tag=a;this.D=b;this.ao=c||null;this.j=null;this.F=!1}X(){return this.tag}instantiate(a,b){const c=this.D;if(this.Mn()&&b.getParameter(olympe.dc.U.op)){var d=olympe.dc.ha();d=`Trying to instantiate an abstract class ${d.name(this)} (${this.X()}).`+` This may happen when the implementation of another class extending ${d.name(this)} has not been registered`;olympe.ia.Ya('dc').error(d)}return this.ao?(a=[void 0,a].concat(Oa(b,this.ao)),new c(...a)):new c(void 0,
632
- a)}ka(a){return new olympe.dc.Sa.Property(a)}sa(a,b=olympe.dc.va.DESTINATION){gg(a,b,this.D);return new olympe.dc.ba.af(a,b)}Mn(){return this.F}};w('olympe.dc.registry.Entry',olympe.dc.Sa.Entry);olympe.dc.Sa.Entry.prototype.addRelation=olympe.dc.Sa.Entry.prototype.sa;olympe.dc.Sa.Entry.prototype.addProperty=olympe.dc.Sa.Entry.prototype.ka;olympe.dc.Sa.Entry.za=[olympe.dc.Ze];olympe.dc.Sa.Property=class{constructor(a){this.tag=a}X(){return this.tag}toString(){return`Property: ${this.tag}`}};olympe.dc.Sa.Property.prototype.getTag=olympe.dc.Sa.Property.prototype.X;olympe.dc.Sa.Property.za=[olympe.dc.Ze];olympe.dc.Sa.Relation=class{constructor(a,b=olympe.dc.va.DESTINATION,c=olympe.dc.CloudObject,d=olympe.dc.CloudObject){this.tag=olympe.dc.fa(a);this.direction=b;this.origin=c;this.H=d}X(){return this.tag}La(){return this.direction}type(){return this.H}$b(){return new olympe.dc.Sa.Relation(this.tag,this.direction===olympe.dc.va.DESTINATION?olympe.dc.va.ORIGIN:olympe.dc.va.DESTINATION,this.H,this.origin)}Fa(a){return a instanceof olympe.dc.Sa.Relation?a.X()===this.X()&&a.La()===this.La():!1}toString(){return`${this.direction}${olympe.dc.ha().name(this.tag)} (${this.tag})`}};
630
+ olympe.dc.oa=class{constructor(){}static j(a,b,...c){if($f.has(a))throw Error(`Tag: ${a} - overwriting already defined CloudObject class ${$f.get(a).D.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.W.rb(g):g}}b=new olympe.dc.Sa.Entry(a,b,d);$f.set(a,b);return b.D.entry=b}static ac(a){let b,c;return null!=(c=null==(b=a.entry)?void 0:b.X())?c:null}};function ig(a,b){a.j=b}function R(a,b){b=b.$b();gg(b.X(),b.La(),a.D);return b}function jg(a){a.F=!0;return a}
631
+ olympe.dc.Sa.Entry=class{constructor(a,b,c){this.tag=a;this.D=b;this.bo=c||null;this.j=null;this.F=!1}X(){return this.tag}instantiate(a,b){const c=this.D;if(this.Nn()&&b.getParameter(olympe.dc.U.pp)){var d=olympe.dc.ha();d=`Trying to instantiate an abstract class ${d.name(this)} (${this.X()}).`+` This may happen when the implementation of another class extending ${d.name(this)} has not been registered`;olympe.ia.Ya('dc').error(d)}return this.bo?(a=[void 0,a].concat(Oa(b,this.bo)),new c(...a)):new c(void 0,
632
+ a)}ka(a){return new olympe.dc.Sa.Property(a)}sa(a,b=olympe.dc.va.DESTINATION){gg(a,b,this.D);return new olympe.dc.ba.af(a,b)}Nn(){return this.F}};w('olympe.dc.registry.Entry',olympe.dc.Sa.Entry);olympe.dc.Sa.Entry.prototype.addRelation=olympe.dc.Sa.Entry.prototype.sa;olympe.dc.Sa.Entry.prototype.addProperty=olympe.dc.Sa.Entry.prototype.ka;olympe.dc.Sa.Entry.za=[olympe.dc.Ze];olympe.dc.Sa.Property=class{constructor(a){this.tag=a}X(){return this.tag}toString(){return`Property: ${this.tag}`}};olympe.dc.Sa.Property.prototype.getTag=olympe.dc.Sa.Property.prototype.X;olympe.dc.Sa.Property.za=[olympe.dc.Ze];olympe.dc.Sa.Relation=class{constructor(a,b=olympe.dc.va.DESTINATION,c=olympe.dc.CloudObject,d=olympe.dc.CloudObject){this.tag=olympe.dc.fa(a);this.direction=b;this.origin=c;this.H=d}X(){return this.tag}La(){return this.direction}type(){return this.H}$b(){return new olympe.dc.Sa.Relation(this.tag,this.direction===olympe.dc.va.DESTINATION?olympe.dc.va.ORIGIN:olympe.dc.va.DESTINATION,this.H,this.origin)}Fa(a){return a instanceof olympe.dc.Sa.Relation?a.X()===this.X()&&a.La()===this.La():!1}toString(){return`${this.direction}${olympe.dc.ha().name(this.tag)} (${this.tag})`}};
633
633
  olympe.dc.Sa.Relation.prototype.getInverse=olympe.dc.Sa.Relation.prototype.$b;olympe.dc.Sa.Relation.prototype.getDirection=olympe.dc.Sa.Relation.prototype.La;olympe.dc.Sa.Relation.prototype.getTag=olympe.dc.Sa.Relation.prototype.X;olympe.dc.Sa.Relation.za=[olympe.dc.Ze];olympe.dc.db={};function kg(a,b){const c=a.H,d=olympe.dc.ha(),e=olympe.dc.db.Database.D.ej,f=olympe.dc.db.Database.D.Ye,g=olympe.dc.db.Database.D.ORIGIN,h=olympe.dc.db.Database.D.DESTINATION,k=new olympe.dc.db.fc('rev-'+b.T());a.G.debug('Generate the reverse graphLayer of',b.T());b.Ab.forEach((l,n)=>{if(l.D()){k.D(n,olympe.dc.Mb.NONE);for(const [r,t]of l.Jd())k.ic(r,n,t)}else{var p=c.get(n);if(void 0!==p)if(l.zd())for(const r of lg(d,n,l.F())){l=c.get(r);const t=new Map;l.forEach((v,x)=>{const y=x[0],z=x.substring(1);
634
634
  y===e?t.set(z,v):y===f?t.set(x,v):y===g?v.forEach((A,K)=>{k.Pa(z,K,r)}):y===h&&v.forEach((A,K)=>{k.Pa(z,r,K)})});l=l.source();k.Rc(r,l,t)}else{const r=new Map;for(const t of l.Cb().keys()){var q=t[0]===f;const v=q?t.substring(1):t;q=q?mg(p,v,!0):p.Ra(v,!0);let x;r.set(t,null!=(x=q)?x:null)}0<r.size&&k.Yc(n,r);for(const [t,v,x]of l.Jd())x?k.ic(t,n,v):k.Pa(t,n,v)}}});return k}
635
635
  function ng(a,b,c){const d=b.T();if(a.F.has(d))throw Error(`You try to execute the patch ${d} a second times whereas the first execution has not been validated yet.`);const e=new og(b,kg(a,b));a.D.unshift(d);a.F.set(d,e);a.H.Zs(c);a.write(b,!1,!1)}
636
636
  function pg(a,b,c){if(0>=a.N||null===c)return b;var d=a.j.findIndex(h=>h.T()===b.T()),e=a.j[d];-1<d&&a.j.splice(d,1);d=0<a.j.length?a.j.findIndex(h=>c>=h.D):0;d=-1<d?d:a.j.length;const f=a.j.slice(0,d).reduce((h,k)=>k.nd(h),b);let g;e=null!=(g=null==e?void 0:e.update(f,c))?g:new qg(f,c,a.j,a.N);a.j.splice(d,0,e);a.G.F()&&a.G.debug('CommitController buffer:\n',a.j.map(h=>`${h.T()} at ${h.D}`).join('\n'));return f}
637
- function rg(a,b,c){return a.D.slice(0,c).map(d=>a.F.get(d)).reduce((d,e)=>{let f;return null!=(f=null==e?void 0:e.nd(d))?f:d},b)}function sg(a,b,c,d=!1){return u(function*(){const e=new olympe.dc.db.dn(a.G,a.H,a.ha,c);e.open(d);for(const f=ha(b);;){const g=yield f.next();if(g.done)break;e.write(g.value,a.R)}e.close()})}
637
+ function rg(a,b,c){return a.D.slice(0,c).map(d=>a.F.get(d)).reduce((d,e)=>{let f;return null!=(f=null==e?void 0:e.nd(d))?f:d},b)}function sg(a,b,c,d=!1){return u(function*(){const e=new olympe.dc.db.en(a.G,a.H,a.ha,c);e.open(d);for(const f=ha(b);;){const g=yield f.next();if(g.done)break;e.write(g.value,a.R)}e.close()})}
638
638
  function tg(a,b,c,d){b=b.pipeThrough(olympe.V.stream.tap(e=>{0<a.D.length&&pg(a,rg(a,e.bc(),a.D.length),e.dl)}));return sg(a,b,c,d).then(()=>a.G.debug('Rebase stream completed')).catch(e=>a.G.error('Rebase stream failed:',e))}
639
639
  olympe.dc.db.Xt=class{constructor(a,b,c,d){this.G=a;this.H=b;this.ha=c;let e;this.R=null!=(e=d.get('debug'))?e:!1;let f;this.N=null!=(f=d.get('bufferTimeout'))?f:0;this.D=[];this.F=new Map;this.j=[];b.addEventListener(olympe.dc.db.Database.j.Bp,g=>{this.j.forEach(h=>{for(const k of g)h.j.j(k)})})}nd(a,b,c){const d=a.T(),e=a.dl;this.F.has(d)?this.push(d,e):(a=pg(this,rg(this,a.bc(),this.D.length),e),this.write(a,b,c))}push(a,b){const c=this.D.indexOf(a);if(-1<c){const d=this.F.get(a);this.D.splice(c,
640
- 1);pg(this,rg(this,d.D,c),b);this.F.delete(a)}}write(a,b,c=!1){b=new olympe.dc.db.dn(this.G,this.H,this.ha,b);b.open(c);b.write(a,this.R);b.close()}};class ug{T(){}nd(){}}function vg(a,b,c,d){const e=olympe.dc.va.DESTINATION;c=c.tag();const f=a.j.Tc(c);b.Cb().forEach((g,h)=>{f.ka(h,g);b.$(h)});for(const [g,h,k,l]of b.ea()){if(!l)continue;const n=h===e?c:k,p=h===e?k:c;a.j.Pa(g,n,p);d.N(g,n,p)}}
640
+ 1);pg(this,rg(this,d.D,c),b);this.F.delete(a)}}write(a,b,c=!1){b=new olympe.dc.db.en(this.G,this.H,this.ha,b);b.open(c);b.write(a,this.R);b.close()}};class ug{T(){}nd(){}}function vg(a,b,c,d){const e=olympe.dc.va.DESTINATION;c=c.tag();const f=a.j.Tc(c);b.Cb().forEach((g,h)=>{f.ka(h,g);b.$(h)});for(const [g,h,k,l]of b.ea()){if(!l)continue;const n=h===e?c:k,p=h===e?k:c;a.j.Pa(g,n,p);d.N(g,n,p)}}
641
641
  function wg(a,b,c,d){const e=olympe.dc.va.DESTINATION,f=c.tag(),g=a.j.Tc(f);b.Cb().forEach((h,k)=>{void 0!==c.Ra(k)&&(g.ka(k,h),b.$(k))});for(const [h,k,l]of b.Jd()){const n=c.mb(h,e,k);void 0!==n&&(d.N(h,f,k),n===l&&a.j.N(h,f,k))}}
642
642
  class og extends ug{constructor(a,b){super();this.D=a;this.j=b;this.db=olympe.dc.ha()}T(){return this.D.T()}nd(a){for(const [b,c]of this.D.ea(a)){const d=b.tag();c.zd()?b.D()?a.j(d,b.F()):(this.D.j(d,c.F()),this.j.j(d,c.F())):b.zd()?(vg(this,c,b,a),a.j(d,b.F())):wg(this,c,b,a)}return a}}function xg(a){clearTimeout(a.F);a.F=setTimeout(()=>{a.buffer.splice(a.buffer.indexOf(a),1)},a.H)}
643
643
  class qg extends ug{constructor(a,b,c,d){super();this.j=a;this.D=b;this.buffer=c;this.H=d;this.F=null;xg(this)}T(){return this.j.T()}nd(a){return a.R(this.j)}update(a,b){this.D=b;a.rc(this.j);xg(this);return this}};const yg=olympe.dc.hc.$c,zg=olympe.dc.hc.Li,Ag=olympe.dc.va.ORIGIN,Bg=olympe.dc.va.DESTINATION;let Cg=0;
644
644
  olympe.dc.db.Database=class a extends Map{constructor(b,c,d){super();let e;this.id=null!=(e=d.get('selfTag'))?e:olympe.dc.Ia.SELF;this.G=b;this.wd=olympe.C.$a();this.state=olympe.dc.db.Database.F.IDLE;this.ja=new Map;this.Yb=[];this.Y=new Map;this.H=null;this.ea=new Set;var f;b=null!=(f=d.get('garbageCollector'))?f:olympe.dc.db.Af.j.am;let g;f=null!=(g=d.get('garbageCollectorDelay'))?g:5E3;this.Gd=new olympe.dc.db.Af(c,this,b,f);d.get('debug')&&this.Xs()}T(){return this.id}getState(){return this.state}Ya(){return this.G}create(b,
645
645
  c,d,e=!1){var f=this.N(b,!0);if(!f.e&&null!==c&&(null===f.H||f.H===c)){f.H=c;let g;(null==(g=f.model())?0:g.e)&&f.db.$(f,!0)}e&&f.persist();this.state===a.F.Gl&&Dg(f,!0);d&&this.Pc(f,d);this.D(a.j.$p,b)}update(b,c){c&&(b=this.N(b,!0),this.Pc(b,c))}ta(b){const c=this.get(b);void 0!==c&&(this.$(c,!1),this.D(a.j.aq,b))}link(b,c,d){c=this.N(c,!0);d=this.N(d,!0);switch(b){case yg:Eg(c,d);break;case zg:Fg(c,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!==
646
- d)switch(b){case yg:Gg(c,d);break;case zg:Hg(c,d);break;default:c.unlink(b,d)}}tg(b,c){for(const d of b)this.N(d).oe(c)}ni(b,c){for(const d of b)(b=this.get(d))&&b.detach(c)}Zs(b){b.forEach(c=>{this.N(c).persist()})}Nd(b){const c=this.get(b);void 0!==c&&(c.clear(),super.delete(b),this.D(a.j.mp,b))}N(b,c=!1){let d;return null!=(d=this.get(b))?d:this.Rc(b,c)}Rc(b,c){const d=new olympe.dc.db.Instance(b,this);this.set(b,d);this.D(a.j.lp,b);c&&this.state!==a.F.Gl&&this.D(a.j.cn,b);return d}Eb(b){var c=
646
+ d)switch(b){case yg:Gg(c,d);break;case zg:Hg(c,d);break;default:c.unlink(b,d)}}tg(b,c){for(const d of b)this.N(d).oe(c)}ni(b,c){for(const d of b)(b=this.get(d))&&b.detach(c)}Zs(b){b.forEach(c=>{this.N(c).persist()})}Nd(b){const c=this.get(b);void 0!==c&&(c.clear(),super.delete(b),this.D(a.j.np,b))}N(b,c=!1){let d;return null!=(d=this.get(b))?d:this.Rc(b,c)}Rc(b,c){const d=new olympe.dc.db.Instance(b,this);this.set(b,d);this.D(a.j.mp,b);c&&this.state!==a.F.Gl&&this.D(a.j.dn,b);return d}Eb(b){var c=
647
647
  olympe.V.oi();this.H?Ig(this.H,c,b):b()}R(b){let c;null!=(c=this.H)&&c.j.delete(b)}Ha(b,...c){this.ja.has(b)&&this.ja.get(b).forEach(d=>{d(...c)})}D(b,c,...d){this.Ha(b,c,...d)}$(b,c){let d;null!=(d=this.H)&&d.H.set(b,c)}Pe(b,c,d,e){let f;null!=(f=this.H)&&Jg(f,b).ka(e?Kg+c:c,d)}ff(b,c,d,e,f){let g;null!=(g=this.H)&&(d===Lg?f?Jg(g,b).link(c,e):Jg(g,b).unlink(c,e):f?Jg(g,b).Eb(c,e):Jg(g,b).Gc(c,e))}Wa(b,c,d){let e;null!=(e=this.H)&&Jg(e,b).Nd(c,d)}addEventListener(b,c){let d=this.ja.get(b);void 0===
648
648
  d&&(d=[],this.ja.set(b,d));d.push(c)}j(b,c){this.addEventListener(b,c)}mb(b){this.Yb.push(b)}F(b){for(const c of this.Y.values())if(c.R.has(b))return!0;return!1}ug(b=!1){const c=Cg++;this.state=a.F.Al;this.ea.add(c);b||this.Y.set(c,new olympe.dc.db.ku(c,this,this.wd));return c}dt(b,c){if(!this.ea.has(b))throw Error('Database: cannot use a transaction that has not been started');let d;this.H=null!=(d=this.Y.get(b))?d:null;b=this.state;this.state=null===this.H?a.F.Gl:a.F.Tv;c();this.state=b;this.H=
649
649
  null}le(b){this.state=a.F.uf;const c=this.Y.get(b);c&&(this.H=c,Mg(this.H),Ng(this.H),this.Y.delete(b),this.H=null);this.ea.delete(b);0===this.ea.size&&(this.state=a.F.IDLE,this.Yb.forEach(d=>{d()}),Og(this.Gd))}Pc(b,c){const d=a.D.Ye;for(const [e,f]of c)void 0!==f&&(e[0]===d?Pg(b,e.substring(1),f):b.update(e,f))}Gc(b,c,d=[]){const e=c.tag();if(!b.has(e)&&(b.add(e),d.push(c),c=c.get(Ag+yg)))for(const f of c.values())null!==f.source()&&this.Gc(b,f,d);return d}Xs(){const b=a.j.em,c=a.j.Ik,d=new Set,
650
650
  e=new Map;this.j(a.j.$p,f=>{d.add(f)});this.j(b,f=>{d.delete(f);e.delete(f)});this.j(c,(f,...g)=>{if(g[0]===zg&&g[1]===Bg){const h=g[2];this.get(h).Ja()||(g=e.get(h)||new Set,0===g.size&&e.set(h,g),g.add(f))}});this.mb(()=>{d.forEach(f=>{const g=this.get(f);g&&null===g.model()&&this.G.error(`\n[DEBUG - DATABASE]\nInstance ${f} created but does not exist !\n${g.toString()}`)});d.clear();e.forEach((f,g)=>{const h=this.get(g);h&&this.G.error(`\n[DEBUG - DATABASE]\nThe model ${g} is extended by other models but does not exist !`+
651
- `\nExtension models: ${Array.from(f.values()).join(', ')}`+`\n\n ${h.toString()}`)});e.clear()})}};olympe.dc.db.Database.D={ej:'$',Du:'~',Ye:'?',Bl:'=',Xp:'|',Hi:'@',ORIGIN:olympe.dc.va.ORIGIN,DESTINATION:olympe.dc.va.DESTINATION};olympe.dc.db.Database.j={lp:0,mp:1,es:2,cn:3,Jo:4,Ko:5,em:6,Dc:7,Ik:8,Sm:9,$p:10,aq:11,mr:12,HA:13,GA:14,Iw:15,Bp:16};olympe.dc.db.Database.F={IDLE:0,Al:1,Tv:2,Gl:3,uf:4};function Qg(a,b,c=[]){const d=b.T();ng(a.j,b,c);return e=>{if(null!==e)a.j.push(d,e);else{e=a.j;var f=e.F.get(d);if(void 0!==f){const g=e.D.indexOf(d);e.D.splice(g,1);f=rg(e,f.j,e.D.length);e.write(pg(e,f,Date.now()),!1);e.F.delete(d)}}}}function Rg(a,b,c={}){let d,e;return tg(a.j,b,null!=(d=c.persist)?d:!0,null!=(e=c.nn)?e:!1)}function Sg(a,b){a.D.mb(b)}
652
- olympe.dc.db.gu=class{constructor(a,b,c,d,e){this.G=a;this.D=b;this.view=c;this.j=new olympe.dc.db.Xt(a,b,c,d);this.wz=new olympe.dc.db.Cv(a,c,b,e)}Ya(){return this.G}nd(a,b={}){let c,d;this.j.nd(a,null!=(c=b.persist)?c:!0,null!=(d=b.nn)?d:!1)}oe(a,b){this.D.tg(a,b)}detach(a,b){this.D.ni(a,b);return this}};const Tg=olympe.dc.db.Database.D.ORIGIN,Ug=olympe.dc.db.Database.D.DESTINATION,Vg=olympe.dc.db.Database.D.ej,Wg=olympe.dc.db.Database.D.Ye,Xg=olympe.dc.db.Database.D.Bl,Yg=olympe.dc.db.Database.D.Xp,Zg=Tg+Ug,$g=Vg+Vg,ah=olympe.dc.db.Database.F;let bh=0;function Mf(a,b,c,d=!1){const e=S(a,b);if(null!==e){const f=ch(e,'',c);void 0!==f&&(a.j.getState()!==ah.uf||e.F()&&!d||a.j.R(c),d||!e.Ja()&&!e.F()||f(!1,b))}}
651
+ `\nExtension models: ${Array.from(f.values()).join(', ')}`+`\n\n ${h.toString()}`)});e.clear()})}};olympe.dc.db.Database.D={ej:'$',Du:'~',Ye:'?',Bl:'=',Xp:'|',Hi:'@',ORIGIN:olympe.dc.va.ORIGIN,DESTINATION:olympe.dc.va.DESTINATION};olympe.dc.db.Database.j={mp:0,np:1,es:2,dn:3,Ko:4,Lo:5,em:6,Dc:7,Ik:8,Tm:9,$p:10,aq:11,mr:12,HA:13,GA:14,Iw:15,Bp:16};olympe.dc.db.Database.F={IDLE:0,Al:1,Tv:2,Gl:3,uf:4};function Qg(a,b,c=[]){const d=b.T();ng(a.j,b,c);return e=>{if(null!==e)a.j.push(d,e);else{e=a.j;var f=e.F.get(d);if(void 0!==f){const g=e.D.indexOf(d);e.D.splice(g,1);f=rg(e,f.j,e.D.length);e.write(pg(e,f,Date.now()),!1);e.F.delete(d)}}}}function Rg(a,b,c={}){let d,e;return tg(a.j,b,null!=(d=c.persist)?d:!0,null!=(e=c.pn)?e:!1)}function Sg(a,b){a.D.mb(b)}
652
+ olympe.dc.db.gu=class{constructor(a,b,c,d,e){this.G=a;this.D=b;this.view=c;this.j=new olympe.dc.db.Xt(a,b,c,d);this.wz=new olympe.dc.db.Cv(a,c,b,e)}Ya(){return this.G}nd(a,b={}){let c,d;this.j.nd(a,null!=(c=b.persist)?c:!0,null!=(d=b.pn)?d:!1)}oe(a,b){this.D.tg(a,b)}detach(a,b){this.D.ni(a,b);return this}};const Tg=olympe.dc.db.Database.D.ORIGIN,Ug=olympe.dc.db.Database.D.DESTINATION,Vg=olympe.dc.db.Database.D.ej,Wg=olympe.dc.db.Database.D.Ye,Xg=olympe.dc.db.Database.D.Bl,Yg=olympe.dc.db.Database.D.Xp,Zg=Tg+Ug,$g=Vg+Vg,ah=olympe.dc.db.Database.F;let bh=0;function Mf(a,b,c,d=!1){const e=S(a,b);if(null!==e){const f=ch(e,'',c);void 0!==f&&(a.j.getState()!==ah.uf||e.F()&&!d||a.j.R(c),d||!e.Ja()&&!e.F()||f(!1,b))}}
653
653
  function Of(a,b,c,d){a=a.j.N(dh(b));d=null!=d?d:eh();fh(a,'',d,c)&&a.Ja()&&c(!0,b);return d}function lg(a,b,c){return{[Symbol.iterator]:function*(d,e,f){const g=(new Set).add(olympe.dc.fa(e));for(const h of g)yield h,d.il(h,f).forEach(([k,,,l])=>{l&&g.add(k)})}.bind(null,a,b,c)}}function eh(){++bh;return String(bh)}function dh(a){if(a)return olympe.dc.fa(a);throw Error('DBView: Impossible to transform tag to string, provided tag is empty, null or undefined.');}
654
654
  function gh(a,b,c,d,e){a=a.j.N(dh(b));c=dh(c);b=Vg+c;e=null!=e?e:eh();if(fh(a,b,e,d)&&a.Ja()){let f=!1;b=a.get(b);void 0===b&&(f=!0,b=a.get(Xg+c));void 0!==b&&d(b,f)}return e}function S(a,b,c=!1){if(b)return a=a.j.get(olympe.dc.fa(b)),!a||c&&!a.Ja()?null:a;throw Error('DBView: Impossible to get instance, provided tag is empty, null or undefined.');}function hh(a,b,c,d){b=S(a,b);null!==b&&(c=olympe.dc.fa(c),ch(b,Vg+c,d),a.j.getState()===ah.uf&&a.j.R(d))}
655
655
  function ih(a,b,c,d){a=a.j.N(dh(b));d=null!=d?d:eh();fh(a,$g,d,c)&&a.Ja()&&a.forEach((e,f)=>{const g=f[0];g!==Vg&&g!==Xg||c(f.substring(1),e,g===Xg)});return d}function jh(a,b,c){b=S(a,b);null!==b&&(ch(b,$g,c),a.j.getState()===ah.uf&&a.j.R(c))}function kh(a,b,c,d,e){let f;null==(f=a.get(b))||f.forEach((g,h)=>{if(g.Ja()||!c&&g.F())e?d(b.substring(1),b[0],c,h):d(c,h)})}function T(a,b,c,d,e){a=a.j.N(dh(b));c=c.La()+c.X();e=null!=e?e:eh();(d=lh(a,c,e,d))&&a.Ja()&&kh(a,c,!0,d,!1);return e}
@@ -660,21 +660,21 @@ function ph(a,b,c){if(c===olympe.dc.Mb.NONE)return 0;const d=c[0]===olympe.dc.ie
660
660
  function uh(a,b,c){if(!a.Ja(b))return a.G.warn(`No instance found with tag ${b}`),new Map;const d=new Map,e=[olympe.dc.fa(b)];for(const f of e){const g=a.cb(f,c);d.set(f,g);for(const h of g.filter(k=>!d.has(k)))e.push(h)}a.G.debug(`Found ${d.size} instances in sub-tree rooted at ${olympe.dc.fa(b)}`);return d}function vh(a,b,c,d){return(c=(a=S(a,b,!0))&&a.get(d+c))?Array.from(c.values()).filter(e=>e.Ja()).length:0}
661
661
  olympe.dc.kb=class{constructor(a,b){this.G=a;this.j=b}T(){return this.j.T()}D(a,b,c,d=!1){a=S(this,a);if(null!==a){b=b.La()+b.X();const e=ch(a,b,c);void 0!==e&&(this.j.getState()!==ah.uf||a.F()&&!d||this.j.R(c),d||!a.Ja()&&!a.F()||kh(a,b,!1,e,!1))}}Ja(a){a=this.j.get(olympe.dc.fa(a));return!(null==a||!a.Ja())}name(a){let b,c;return null!=(c=null==(b=S(this,a))?void 0:b.Ra(olympe.dc.CloudObject.nameProp.X()))?c:''}model(a){return(a=(a=S(this,a,!0))?a.model():null)?a.tag():null}gf(a){return(a=(a=S(this,
662
662
  a,!0))&&a.gf())?a.tag():null}wi(a){a=S(this,a,!0);return!(!a||!a.gf())}Ob(a,b){a=(a=S(this,a,!0))&&a.model();return!(!a||!this.Uf(a.tag(),b))}source(a){return(a=S(this,a,!0))&&a.source()}Re(a){a=S(this,a,!1);return!a||a.N}Ra(a,b,c){a=S(this,a,!0);b=olympe.dc.fa(b);let d;return null!=(d=null==a?void 0:a.Ra(b,c))?d:null}Cb(a,b=!1){var c=S(this,a,!0);a=new Map;if(c)for(const [d,e]of c)c=d[0],(c===Vg||!b&&c===Xg)&&a.set(d.substring(1),e);return a}il(a,b){return oh(this,a,b).filter(([c])=>c.Ja()).map(([c,
663
- ...d])=>[c.tag(),...d])}cb(a,b){a=S(this,a,!0);b=b.La()+b.X();b=null==a?void 0:a.get(b);a=[];if(b)for(const c of b.values())c.Ja()&&a.push(c.tag());return a}bt(a,b,c){let d,e;a=null==(d=S(this,a,!0))?void 0:null==(e=d.get(b.La()+b.X()))?void 0:e.get(olympe.dc.fa(c));return!(null==a||!a.Ja())}Hn(a,b){a=S(this,a,!0);if(!a)return[];a=[a.tag()];for(const c of b){b=[];for(const d of a)if(a=S(this,d,!0).get(c.La()+c.X()),void 0!==a)for(const e of a.values())e.Ja()&&b.push(e.tag());a=b}return a}Jb(a,b){var c=
663
+ ...d])=>[c.tag(),...d])}cb(a,b){a=S(this,a,!0);b=b.La()+b.X();b=null==a?void 0:a.get(b);a=[];if(b)for(const c of b.values())c.Ja()&&a.push(c.tag());return a}bt(a,b,c){let d,e;a=null==(d=S(this,a,!0))?void 0:null==(e=d.get(b.La()+b.X()))?void 0:e.get(olympe.dc.fa(c));return!(null==a||!a.Ja())}In(a,b){a=S(this,a,!0);if(!a)return[];a=[a.tag()];for(const c of b){b=[];for(const d of a)if(a=S(this,d,!0).get(c.La()+c.X()),void 0!==a)for(const e of a.values())e.Ja()&&b.push(e.tag());a=b}return a}Jb(a,b){var c=
664
664
  S(this,a,!0);const d=b.La()+b.X();c=null==c?void 0:c.get(d);if(1<(null==c?void 0:c.size))return this.G.warn(`Relation ${b.X()} to instance ${a} is not unique: found ${c.size} related items`),null;a=null==c?void 0:c.values().next().value;return(null==a?0:a.Ja())?a.tag():null}oh(a,b,c){a=olympe.dc.fa(a);const d=uh(this,a,b);d.delete(a);return c?(c=olympe.dc.fa(c),d.has(c)?Array.from(uh(this,c,b.$b()).keys()).filter(e=>d.has(e)):[]):Array.from(d.keys())}Hs(a,b,c){if(!this.Ja(a))return null;b=uh(this,
665
- a,b);const d=[olympe.dc.fa(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}zn(a,b,c){return this.Hn(a,b).find(c)||null}Qx(a,b,c){return this.Hn(a,b).filter(c)}Ms(a,b=olympe.dc.CloudObject){var c=S(this,a,!0);const d=b&&S(this,b,!0),e=[c];for(;c&&c!==d;){c=c.gf();if(e.includes(c))throw Error(`Cycle detected when following recursively extend relations from base model instance "${a}".`);if(c&&!c.Ja())throw a=`Try to get all extensions of the model ${olympe.dc.fa(a)} but one of them does not exists (${c.tag()})`,
665
+ a,b);const d=[olympe.dc.fa(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.In(a,b).find(c)||null}Qx(a,b,c){return this.In(a,b).filter(c)}Ms(a,b=olympe.dc.CloudObject){var c=S(this,a,!0);const d=b&&S(this,b,!0),e=[c];for(;c&&c!==d;){c=c.gf();if(e.includes(c))throw Error(`Cycle detected when following recursively extend relations from base model instance "${a}".`);if(c&&!c.Ja())throw a=`Try to get all extensions of the model ${olympe.dc.fa(a)} but one of them does not exists (${c.tag()})`,
666
666
  Error(a);null!==c&&e.push(c)}c=S(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}).`);return e.map(f=>f.tag())}Uf(a,b){const c=olympe.dc.fa(b);return!!this.Hs(a,olympe.dc.CloudObject.extendRel,d=>d===c)}Uc(a){return this.cb(a,olympe.dc.CloudObject.instancesRel)}};olympe.dc.kb.prototype.getInstances=olympe.dc.kb.prototype.Uc;olympe.dc.kb.prototype.isExtending=olympe.dc.kb.prototype.Uf;
667
- olympe.dc.kb.prototype.getExtendedModels=olympe.dc.kb.prototype.Ms;olympe.dc.kb.prototype.findAllRelated=olympe.dc.kb.prototype.Qx;olympe.dc.kb.prototype.findRelated=olympe.dc.kb.prototype.zn;olympe.dc.kb.prototype.findRecursive=olympe.dc.kb.prototype.Hs;olympe.dc.kb.prototype.getRecursiveRelated=olympe.dc.kb.prototype.oh;olympe.dc.kb.prototype.getUniqueRelated=olympe.dc.kb.prototype.Jb;olympe.dc.kb.prototype.getMultiRelated=olympe.dc.kb.prototype.Hn;olympe.dc.kb.prototype.isRelated=olympe.dc.kb.prototype.bt;
667
+ olympe.dc.kb.prototype.getExtendedModels=olympe.dc.kb.prototype.Ms;olympe.dc.kb.prototype.findAllRelated=olympe.dc.kb.prototype.Qx;olympe.dc.kb.prototype.findRelated=olympe.dc.kb.prototype.An;olympe.dc.kb.prototype.findRecursive=olympe.dc.kb.prototype.Hs;olympe.dc.kb.prototype.getRecursiveRelated=olympe.dc.kb.prototype.oh;olympe.dc.kb.prototype.getUniqueRelated=olympe.dc.kb.prototype.Jb;olympe.dc.kb.prototype.getMultiRelated=olympe.dc.kb.prototype.In;olympe.dc.kb.prototype.isRelated=olympe.dc.kb.prototype.bt;
668
668
  olympe.dc.kb.prototype.getRelated=olympe.dc.kb.prototype.cb;olympe.dc.kb.prototype.getProperties=olympe.dc.kb.prototype.Cb;olympe.dc.kb.prototype.getProperty=olympe.dc.kb.prototype.Ra;olympe.dc.kb.prototype.isPersisted=olympe.dc.kb.prototype.Re;olympe.dc.kb.prototype.instanceOf=olympe.dc.kb.prototype.Ob;olympe.dc.kb.prototype.isModel=olympe.dc.kb.prototype.wi;olympe.dc.kb.prototype.extension=olympe.dc.kb.prototype.gf;olympe.dc.kb.prototype.model=olympe.dc.kb.prototype.model;
669
669
  olympe.dc.kb.prototype.name=olympe.dc.kb.prototype.name;olympe.dc.kb.prototype.exist=olympe.dc.kb.prototype.Ja;const wh=olympe.dc.db.Database.D.ORIGIN,Lg=olympe.dc.db.Database.D.DESTINATION,Kg=olympe.dc.db.Database.D.Bl,xh=olympe.dc.db.Database.D.ej,yh=olympe.dc.db.Database.D.Xp,zh=olympe.dc.db.Database.D.Hi,Ah=wh+Lg,Bh=xh+xh,Ch=Array.from(Object.values(olympe.dc.Mb)).filter(a=>null!==a);function Ig(a,b,c){let d=a.j.get(b);void 0===d&&(d=[],a.j.set(b,d));a.buffer.push([b,d.length]);d.push(c)}
670
670
  function Mg(a){for(const [b,c]of a.H)a.D.Gc(new Set,b).filter(d=>Dg(d,c)).forEach(d=>{d=d.tag();c?Jg(a,d).create():Jg(a,d).delete()})}
671
671
  function Ng(a){const b=a.D;a.F.forEach((c,d)=>{var e=b.get(d);if(c.D()||c.zd()){var f=e.get(zh);f&&Dh(a,f,c.D(),d);c.zd()&&a.R.add(d)}for(const [n,p]of c.Cb()){var g=n[0]===Kg,h=g?n.substring(1):n;f=a;var k=e,l=p;const q=k.get(zh+xh+h);q&&Dh(f,q,l,g);(k=k.get(zh+Bh))&&Dh(f,k,h,l,g)}for(const n of c.ea())Eh(a,e,...n);(e=c.Y)&&Fh(a,e,d,c.Yb,!c.zd())});a.H.clear();a.F.clear();a.N.clear();Gh(a)}function Jg(a,b){let c=a.F.get(b);void 0===c&&(c=new olympe.dc.db.Kh(b),a.F.set(b,c));return c}
672
672
  function Dh(a,b,...c){b.forEach((d,e)=>{Ig(a,e,d.bind(null,...c))})}function Eh(a,b,c,d,e,f){var g=b.get(zh+d+c);g&&Dh(a,g,f,e);(g=b.get(zh+Ah))&&Dh(a,g,c,d,f,e);Hh(a,c,d).forEach((h,k)=>{(k=b.get(zh+yh+k))&&Dh(a,k,c,d,h,f,e)})}function Fh(a,b,c,d,e){Ch.forEach(f=>{const g=f[0]===olympe.dc.ie.hg;(f=a.D.get(g?c:b).get(zh+yh+f))&&Dh(a,f,d,null,!0,e,g?b:c)})}
673
673
  function Gh(a){a.Y.run(()=>{const b=a.j;for(const [c,d]of a.buffer){let e,f,g;null==(e=b.get(c))||null==(g=(f=e)[d])||g.call(f)}});a.j.clear();a.buffer.length=0}function Hh(a,b,c){const d=b+c;let e=a.N.get(d);if(!e){const f=a.D.get(b);e=new Map;Ch.forEach(g=>{const h=g[0]===olympe.dc.ie.hg;var k=h?g.substring(1):g;let l;k=null!=(l=null==f?void 0:f.get(xh+k))?l:0;k=h?((k&3)<<2)+((k&12)>>2):k;(c===wh?12:3)&k&&e.set(g,!!((c===wh?8:2)&k))});a.N.set(d,e)}return e}
674
- olympe.dc.db.ku=class{constructor(a,b,c){this.id=a;this.D=b;this.Y=c;this.H=new Map;this.F=new Map;this.R=new Set;this.j=new Map;this.N=new Map;this.buffer=[]}T(){return this.id}};function Og(a){if(!a.F&&0<a.D.size)switch(a.mode){case olympe.dc.db.Af.j.io:a.F=!0;setTimeout(()=>{a.j.getState()===olympe.dc.db.Database.F.IDLE&&a.run()},a.delay);break;case olympe.dc.db.Af.j.vw:a.F=!0,a.run()}}
674
+ olympe.dc.db.ku=class{constructor(a,b,c){this.id=a;this.D=b;this.Y=c;this.H=new Map;this.F=new Map;this.R=new Set;this.j=new Map;this.N=new Map;this.buffer=[]}T(){return this.id}};function Og(a){if(!a.F&&0<a.D.size)switch(a.mode){case olympe.dc.db.Af.j.jo:a.F=!0;setTimeout(()=>{a.j.getState()===olympe.dc.db.Database.F.IDLE&&a.run()},a.delay);break;case olympe.dc.db.Af.j.vw:a.F=!0,a.run()}}
675
675
  olympe.dc.db.Af=class{constructor(a,b,c,d){this.G=a;this.j=b;this.D=new Set;this.mode=c;this.delay=d;this.F=!1;c!==olympe.dc.db.Af.j.am&&this.init()}run(){const a=this.j;this.G.debug('Start garbage collector with',this.D.size,'instances to check');const b=[];for(const c of this.D){const d=a.get(c);!d||0<d.c||(this.G.debug('Remove unused instance',c,'from database'),a.Nd(c),b.push(c))}this.D.clear();this.j.Ha(olympe.dc.db.Database.j.Bp,b);this.F=!1}init(){const a=olympe.dc.db.Database.j.es,b=olympe.dc.db.Database.j.aq,
676
- c=olympe.dc.db.Database.j.mr,d=olympe.dc.db.Database.F.IDLE,e=f=>{this.D.add(f);this.j.getState()===d&&Og(this)};this.j.j(olympe.dc.db.Database.j.cn,e.bind(this));this.j.j(b,e.bind(this));this.j.j(a,f=>{this.D.delete(f)});this.j.addEventListener(olympe.dc.db.Database.j.Iw,()=>{this.run()});this.j.j(c,(f,...g)=>{this.G.error(g[0])})}};olympe.dc.db.Af.j={am:0,vw:1,io:2};olympe.dc.db.Af.D=5E3;olympe.dc.db.fc=class{constructor(a){this.id=null!=a?a:olympe.V.jf();this.Ab=new Map}T(){return this.id}rc(a){const b=olympe.dc.db.Kh.j.Am,c=olympe.dc.db.Kh.j.Dc,d=olympe.dc.db.Kh.j.Xk;this.Ab.forEach((e,f)=>{const g=e.Vb();switch(e.getState()){case b:const h=e.jb();if(null===h)throw Error(`GraphPatch: try to create the instance ${f} with no source`);const k=e.N()?e.Cb():void 0;a.Rc(f,h,k,g);break;case d:e.N()&&a.Yc(f,e.Cb(),g);break;case c:a.D(f,e.F(),g)}for(const [h,k,l]of e.Jd())e=this.Ab.get(k),
677
- l?a.Pa(h,f,k,g,e.Vb()):a.ic(h,f,k,g,e.Vb())});return a}pf(){return 0===this.Ab.size}H(){let a=0;this.Ab.forEach(b=>{a+=b.wd()});return a}Rc(a,b,c,d=null){b=this.F(a).create(b);'string'===typeof d&&this.Pa(olympe.dc.hc.$c,a,d,d,null);c&&b.ln(c)}Yc(a,b,c=null){b&&this.F(a,c).ln(b)}D(a,b=olympe.dc.Mb.NONE,c=null){const d=this.Ab.get(a);if(d&&d.D())this.j(a,b);else{this.F(a,c).delete(b);for(const e of this.il(a,b,!1))this.Ab.get(e).Cb().clear(),this.Y(e,!0)}}Pa(a,b,c,d=null,e=null){this.F(b,d).link(a,
676
+ c=olympe.dc.db.Database.j.mr,d=olympe.dc.db.Database.F.IDLE,e=f=>{this.D.add(f);this.j.getState()===d&&Og(this)};this.j.j(olympe.dc.db.Database.j.dn,e.bind(this));this.j.j(b,e.bind(this));this.j.j(a,f=>{this.D.delete(f)});this.j.addEventListener(olympe.dc.db.Database.j.Iw,()=>{this.run()});this.j.j(c,(f,...g)=>{this.G.error(g[0])})}};olympe.dc.db.Af.j={am:0,vw:1,jo:2};olympe.dc.db.Af.D=5E3;olympe.dc.db.fc=class{constructor(a){this.id=null!=a?a:olympe.V.jf();this.Ab=new Map}T(){return this.id}rc(a){const b=olympe.dc.db.Kh.j.Bm,c=olympe.dc.db.Kh.j.Dc,d=olympe.dc.db.Kh.j.Xk;this.Ab.forEach((e,f)=>{const g=e.Vb();switch(e.getState()){case b:const h=e.jb();if(null===h)throw Error(`GraphPatch: try to create the instance ${f} with no source`);const k=e.N()?e.Cb():void 0;a.Rc(f,h,k,g);break;case d:e.N()&&a.Yc(f,e.Cb(),g);break;case c:a.D(f,e.F(),g)}for(const [h,k,l]of e.Jd())e=this.Ab.get(k),
677
+ l?a.Pa(h,f,k,g,e.Vb()):a.ic(h,f,k,g,e.Vb())});return a}pf(){return 0===this.Ab.size}H(){let a=0;this.Ab.forEach(b=>{a+=b.wd()});return a}Rc(a,b,c,d=null){b=this.F(a).create(b);'string'===typeof d&&this.Pa(olympe.dc.hc.$c,a,d,d,null);c&&b.mn(c)}Yc(a,b,c=null){b&&this.F(a,c).mn(b)}D(a,b=olympe.dc.Mb.NONE,c=null){const d=this.Ab.get(a);if(d&&d.D())this.j(a,b);else{this.F(a,c).delete(b);for(const e of this.il(a,b,!1))this.Ab.get(e).Cb().clear(),this.Y(e,!0)}}Pa(a,b,c,d=null,e=null){this.F(b,d).link(a,
678
678
  c);this.F(c,e).Eb(a,b)}ic(a,b,c,d=null,e=null){this.F(b,d).unlink(a,c);this.F(c,e).Gc(a,b)}$(a){var b=olympe.dc.ha();if(b.Ja(a)){const c=b.model(a),d=b.source(a),e=b.Cb(a,!0);sh(b,a).forEach((f,g)=>{e.set(`${olympe.dc.ie.Ye}${g}`,f)});this.Rc(a,d,e,c);(b=b.gf(a))&&this.Pa(olympe.dc.hc.Li,a,b);e.forEach(f=>{f instanceof olympe.dc.wc&&this.$(f.X())})}}Uc(){return function*(a){for(const b of a.values())if(b.D()||b.zd()||b.N())yield b}(this.Ab)}Tc(a){let b;return null!=(b=this.Ab.get(olympe.dc.fa(a)))?
679
679
  b:null}j(a,b=olympe.dc.Mb.NONE){a=this.il(a,b);for(const c of a)this.Y(c,!1),this.Ab.delete(c)}Jd(){return function*(a){for(var b=a.next();!b.done;){b=b.value;const c=b.tag();yield*b.Jd((d,e,f)=>[d,c,e,f]);b=a.next()}}(this.Ab.values())}oh(a,b,c=(d,e)=>[d,e]){return this.ja(a,b,c)}*ja(a,b,c,d=[]){d.push(a);a=this.Tc(a);for(const [e,f]of a.cb(b))d.includes(e)||(yield*this.ja(e,b,c,d),yield c(e,f))}N(a,b,c){const d=this.Ab.get(b),e=this.Ab.get(c);d&&d.H(a,olympe.dc.va.DESTINATION,c);e&&e.H(a,olympe.dc.va.ORIGIN,
680
680
  b)}Y(a,b){const c=olympe.dc.va.ORIGIN,d=olympe.dc.va.DESTINATION,e=this.Ab.get(a);for(const [g,h,k]of e.Jd())if(k||!b){e.H(g,d,h);var f=this.Ab.get(h);f&&f.H(g,c,a)}for(const [g,h,k]of e.Wa())if(k||!b)e.H(g,c,h),(f=this.Ab.get(h))&&f.H(g,d,a)}*Qs(a){let b;for(const [c,d]of(null==(b=this.Tc(a))?void 0:b.cb(olympe.dc.CloudObject.instancesRel))||[])d&&(a=this.Ab.get(c),a.zd()||(yield a))}il(a,b,c=!0){const d=olympe.dm.Relation.j.vr,e=olympe.dm.Relation.j.bs,f=olympe.dc.va.ORIGIN,g=olympe.dc.ha();a=new Set([a]);
@@ -682,8 +682,8 @@ const h=new Set;for(const l of a){var k=this.Ab.get(l);if(void 0!==k){for(const
682
682
  olympe.dc.va.DESTINATION;for(const [c,d]of this.ea(a))if(a=c.tag(),d.zd())this.j(a,d.F());else if(c.zd())d.D()&&this.j(a,c.F());else{c.Cb().forEach((e,f)=>{void 0!==d.Ra(f)&&c.$(f)});for(const [e,f,g]of c.Jd()){const h=d.mb(e,b,f);void 0!==h&&g!==h&&this.N(e,a,f)}}return this}*ea(a){var b=this.Ab;const c=a.Ab,d=(a=a.H()>this.H())?c:b;b=a?b:c;for(const [e,f]of b)b=d.get(e),void 0!==b&&(yield[a?f:b,a?b:f])}};olympe.dc.db.fc.za=[olympe.dc.Writable,olympe.dc.fr];const Ih=olympe.dc.db.Database.j,Jh=olympe.dc.db.Database.D.ej,Kh=olympe.dc.db.Database.D.Du,Lh=olympe.dc.db.Database.D.Ye,Mh=olympe.dc.db.Database.D.Bl,Nh=olympe.dc.db.Database.D.Hi,U=olympe.dc.va.ORIGIN,V=olympe.dc.va.DESTINATION,Oh=olympe.dc.hc.$c,Ph=olympe.dc.hc.Li;function mg(a,b,c=!1){const d=a.get(Lh+b);return c||void 0!==d?d:a.get(Kh+b)}function Dg(a,b){const c=a.e!==b;c&&(b?(a.e=b,Qh(a)):(Rh(a),a.e=b),a.db.D(b?Ih.em:Ih.Dc,a.j));return c}
683
683
  function Eg(a,b){const c=a.model();if(null!==c){if(c===b)return;a.unlink(Oh,c)}a.link(Oh,b);b.forEach((d,e)=>{if(e[0]===Lh||e[0]===Kh)e=e.substring(1),Sh(a,e,d)});null===a.H||!b.e&&b!==a||a.db.$(a,!0)}function Fg(a,b){const c=a.gf();if(null!==c){if(c===b)return;a.unlink(Ph,c)}a.link(Ph,b);const d=new Map;b.forEach((e,f)=>{if(f[0]===Lh||f[0]===Kh)f=f.substring(1),a.has(Lh+f)||(a.set(Kh+f,e),d.set(f,e))});Th(a,d)}
684
684
  function Gg(a,b){a.unlink(Oh,b);a.forEach((c,d)=>{c=d.substring(1);Sh(a,c,null)});a.db.$(a,!1)}function Hg(a,b){a.unlink(Ph,b);const c=new Map;a.forEach((d,e)=>{e[0]===Kh&&(a.delete(e),d=e.substring(1),c.set(d,null))});Th(a,c)}
685
- function Pg(a,b,c){const d=Lh+b;var e=a.get(d);e=void 0===e?null:e;if(!Uh(e,c))if(Vh(a,b,e,c,!0),e=Kh+b,null===c){a.delete(d);let f;c=null==(f=a.gf())?void 0:mg(f,b);c=void 0===c?null:c;null!==c&&a.set(e,c);Th(a,(new Map).set(b,c))}else void 0!==a.get(e)&&a.delete(e),a.set(d,c),Th(a,(new Map).set(b,c))}function fh(a,b,c,d){const e=Wh(a,Nh+b);return e.has(c)?!1:(e.set(c,d),a.oe(olympe.dc.db.Instance.j.Hi+b),a.db.D(Ih.Jo,a.j,b,c),!0)}
686
- function ch(a,b,c){const d=Xh(a,Nh+b,c);void 0!==d&&(a.detach(olympe.dc.db.Instance.j.Hi+b),a.db.D(Ih.Ko,a.j,b,c));return d}function lh(a,b,c,d){const e=(...f)=>{var g=f.length;const h=f[g-2];if(g=a.db.get(f[g-1])){const k=olympe.dc.db.Instance.j.dw+b;h?g.oe(k):g.detach(k)}d(...f)};return fh(a,b,c,e)?e:null}function Uh(a,b){return a instanceof Date?b instanceof Date&&a.getTime()===b.getTime():null!==a&&'function'===typeof a.Fa?a.Fa(b):a===b}
685
+ function Pg(a,b,c){const d=Lh+b;var e=a.get(d);e=void 0===e?null:e;if(!Uh(e,c))if(Vh(a,b,e,c,!0),e=Kh+b,null===c){a.delete(d);let f;c=null==(f=a.gf())?void 0:mg(f,b);c=void 0===c?null:c;null!==c&&a.set(e,c);Th(a,(new Map).set(b,c))}else void 0!==a.get(e)&&a.delete(e),a.set(d,c),Th(a,(new Map).set(b,c))}function fh(a,b,c,d){const e=Wh(a,Nh+b);return e.has(c)?!1:(e.set(c,d),a.oe(olympe.dc.db.Instance.j.Hi+b),a.db.D(Ih.Ko,a.j,b,c),!0)}
686
+ function ch(a,b,c){const d=Xh(a,Nh+b,c);void 0!==d&&(a.detach(olympe.dc.db.Instance.j.Hi+b),a.db.D(Ih.Lo,a.j,b,c));return d}function lh(a,b,c,d){const e=(...f)=>{var g=f.length;const h=f[g-2];if(g=a.db.get(f[g-1])){const k=olympe.dc.db.Instance.j.dw+b;h?g.oe(k):g.detach(k)}d(...f)};return fh(a,b,c,e)?e:null}function Uh(a,b){return a instanceof Date?b instanceof Date&&a.getTime()===b.getTime():null!==a&&'function'===typeof a.Fa?a.Fa(b):a===b}
687
687
  function Vh(a,b,c,d,e){c instanceof olympe.dc.wc&&(Yh(a.db.get(c.X())),a.db.ta(c.X()));d instanceof olympe.dc.wc&&(c=a.db.N(d.X(),!0),c.D&&c.D.tag!==a.j&&a.db.Ya().fatal('Instance',d.X(),'referenced multiple times!\nThis instance is currently property of',c.D.tag,'(for the property '+c.D.Ma+')','and is assigned as a property of',a.j,'(for the property '+b+')'),d=c,a=a.j,void 0===d.D&&(d.oe(olympe.dc.db.Instance.j.fj+a+':'+b),d.db.Wa(d.j,a,b)),d.D={tag:a,Ma:b,iz:e})}
688
688
  function Zh(a,b,c,d){a.e&&a.db.Pe(a.j,b,c,d)}function Th(a,b,c=[]){const d=a.get(U+Oh);void 0!==d&&d.forEach(e=>{b.forEach((f,g)=>Sh(e,g,f))});a=a.get(U+Ph);void 0!==a&&a.forEach((e,f)=>{if(!c.includes(e.tag())){var g=new Map;b.forEach((h,k)=>{e.has(Lh+k)||(g.set(k,h),null!==h?e.set(Kh+k,h):e.delete(Kh+k))});Th(e,g,[...c,f])}})}function Wh(a,b){let c;return null!=(c=a.get(b))?c:a.create(b)}function $h(a,b,c,d,e){a.db.ff(a.j,b,c,d.j,e)}
689
689
  function Xh(a,b,c){const d=a.get(b);if(void 0!==d){const e=d.get(c);d.delete(c);0===d.size&&a.delete(b);return e}}function Sh(a,b,c){if(!a.has(Jh+b)){const d=Mh+b,e=a.get(d);Uh(c,void 0!==e?e:null)||(null===c?a.delete(d):a.set(d,c),Zh(a,b,c,null!==c))}}function Qh(a){a.forEach((b,c)=>{const d=c[0];if(d===U||d===V){const e=c.substring(1),f=d===U?V:U;b.forEach(g=>{g.e&&($h(a,e,d,g,!0),$h(g,e,f,a,!0))})}else if(d===Jh||d===Mh)c=c.substring(1),Zh(a,c,b,d===Mh)})}
@@ -691,22 +691,22 @@ function Rh(a){a.forEach((b,c)=>{const d=c[0];if(d!==Nh){var e=c.substring(1);d=
691
691
  function Yh(a){void 0!==a.D&&(a.detach(olympe.dc.db.Instance.j.fj+a.D.tag+':'+a.D.Ma),a.db.Wa(a.j,a.D.tag,a.D.Ma),a.D=void 0)}
692
692
  olympe.dc.db.Instance=class extends Map{constructor(a,b){super();this.j=a;this.H=null;this.e=!1;this.D=void 0;this.c=0;this.N=!1;this.db=b}tag(){return this.j}Ja(){return this.e}F(){return this.db.F(this.j)}source(){return this.H}model(){const a=this.get(V+Oh);let b;return null!=(b=a&&Array.from(a.values())[0])?b:null}gf(){const a=this.get(V+Ph);let b;return null!=(b=a&&Array.from(a.values())[0])?b:null}toString(){var a=this.Ra(olympe.dc.CloudObject.nameProp.X());a=`Instance: ${this.j}, Exist: ${this.e}, Name: ${a}`;
693
693
  var b=this.model();if(b){var c=b.Ra(olympe.dc.CloudObject.nameProp.X())||'No model name';a+=`\nModel: ${b.j}, Exist: ${b.e}, Model name: ${c}`}else a+='\nModel: no model';(b=this.gf())?(c=b.Ra(olympe.dc.CloudObject.nameProp.X())||'No extension name',a+=`\nExtension: ${b.j}, Exist: ${b.e}, Extension name: ${c}`):a+='\nExtension: no extension';return a}Ra(a,b=!1){const c=this.get(Jh+a);return b||void 0!==c?c:this.get(Mh+a)}update(a,b){const c=Jh+a;var d=this.get(c);d=void 0===d?null:d;if(!Uh(d,b))if(Vh(this,
694
- a,d,b,!1),d=Mh+a,null===b){this.delete(c);let e;b=null==(e=this.model())?void 0:mg(e,a);void 0!==b?(this.set(d,b),Zh(this,a,b,!0)):Zh(this,a,null,!1)}else this.set(c,b),this.delete(d),Zh(this,a,b,!1)}link(a,b){var c=U+a;const d=Wh(this,V+a);c=Wh(b,c);d.has(b.j)||(d.set(b.j,b),c.set(this.j,this),this.db.D(Ih.Ik,this.j,a,V,b.j),this.db.D(Ih.Ik,b.j,a,U,this.j),this.e&&b.e&&($h(this,a,V,b,!0),$h(b,a,U,this,!0)))}unlink(a,b){const c=U+a;void 0!==Xh(this,V+a,b.j)&&(Xh(b,c,this.j),this.db.D(Ih.Sm,this.j,
695
- a,V,b.j),this.db.D(Ih.Sm,b.j,a,U,this.j),this.e&&b.e&&($h(this,a,V,b,!1),$h(b,a,U,this,!1)))}persist(){this.N=!0;return this}oe(){this.c++;1===this.c&&this.db.D(Ih.es,this.j)}detach(){0<this.c?--this.c:this.db.D(Ih.mr,this.j,`Try to decrease references on instance ${this.j} 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.D(Ih.cn,
696
- this.j)}clear(){this.forEach((a,b)=>{const c=b[0];if(c===U||c===V){const d=b.substring(1),e=c===U?V:U;a.forEach(f=>{const g=f.get(e+d);g.delete(this.j);0===g.size&&f.delete(e+d)})}c===Jh&&a instanceof olympe.dc.wc&&Yh(this.db.get(a.X()))});void 0!==this.D&&this.db.get(this.D.tag).delete(Jh+this.D.Ma)}create(a){const b=new Map;this.set(a,b);return b}};olympe.dc.db.Instance.j={Zp:'instance',dw:'rel',Hi:'cb',fj:'ref',TRANSACTION:'tx'};olympe.dc.db.Kh=class a{constructor(b){this.Pc=b;this.R=this.Ha=null;this.Pb=olympe.dc.Mb.NONE;this.state=a.j.Xk;this.j=this.pb=this.Yb=this.Y=this.properties=null}tag(){return this.Pc}Vb(){return this.R}jb(){return this.Ha}getState(){return this.state}ta(b){if(null===this.R)this.R=b;else if(this.R!==b)throw Error(`Try to set a model relation with another model ${b} than the one set initially ${this.R}`);return this}F(){return this.state===a.j.Dc?this.Pb:olympe.dc.Mb.NONE}create(b){this.state=a.j.Am;
697
- this.Ha=null!=b?b:null;return this}delete(b=olympe.dc.Mb.NONE){this.state=a.j.Dc;this.Pb=b;this.properties=null;return this}ka(b,c){if(this.state===a.j.Dc)return this;this.properties||(this.properties=new Map);this.properties.set(b,c);return this}ln(b){this.state!==a.j.Dc&&(this.properties||(this.properties=new Map),b.forEach((c,d)=>{this.properties.set(d,c)}))}Nd(b,c){if(null!==this.Y&&this.Y!==b)throw Error('An instance should never be set as complex property of multiple instances');this.Y=b;this.Yb=
694
+ a,d,b,!1),d=Mh+a,null===b){this.delete(c);let e;b=null==(e=this.model())?void 0:mg(e,a);void 0!==b?(this.set(d,b),Zh(this,a,b,!0)):Zh(this,a,null,!1)}else this.set(c,b),this.delete(d),Zh(this,a,b,!1)}link(a,b){var c=U+a;const d=Wh(this,V+a);c=Wh(b,c);d.has(b.j)||(d.set(b.j,b),c.set(this.j,this),this.db.D(Ih.Ik,this.j,a,V,b.j),this.db.D(Ih.Ik,b.j,a,U,this.j),this.e&&b.e&&($h(this,a,V,b,!0),$h(b,a,U,this,!0)))}unlink(a,b){const c=U+a;void 0!==Xh(this,V+a,b.j)&&(Xh(b,c,this.j),this.db.D(Ih.Tm,this.j,
695
+ a,V,b.j),this.db.D(Ih.Tm,b.j,a,U,this.j),this.e&&b.e&&($h(this,a,V,b,!1),$h(b,a,U,this,!1)))}persist(){this.N=!0;return this}oe(){this.c++;1===this.c&&this.db.D(Ih.es,this.j)}detach(){0<this.c?--this.c:this.db.D(Ih.mr,this.j,`Try to decrease references on instance ${this.j} 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.D(Ih.dn,
696
+ this.j)}clear(){this.forEach((a,b)=>{const c=b[0];if(c===U||c===V){const d=b.substring(1),e=c===U?V:U;a.forEach(f=>{const g=f.get(e+d);g.delete(this.j);0===g.size&&f.delete(e+d)})}c===Jh&&a instanceof olympe.dc.wc&&Yh(this.db.get(a.X()))});void 0!==this.D&&this.db.get(this.D.tag).delete(Jh+this.D.Ma)}create(a){const b=new Map;this.set(a,b);return b}};olympe.dc.db.Instance.j={Zp:'instance',dw:'rel',Hi:'cb',fj:'ref',TRANSACTION:'tx'};olympe.dc.db.Kh=class a{constructor(b){this.Pc=b;this.R=this.Ha=null;this.Pb=olympe.dc.Mb.NONE;this.state=a.j.Xk;this.j=this.pb=this.Yb=this.Y=this.properties=null}tag(){return this.Pc}Vb(){return this.R}jb(){return this.Ha}getState(){return this.state}ta(b){if(null===this.R)this.R=b;else if(this.R!==b)throw Error(`Try to set a model relation with another model ${b} than the one set initially ${this.R}`);return this}F(){return this.state===a.j.Dc?this.Pb:olympe.dc.Mb.NONE}create(b){this.state=a.j.Bm;
697
+ this.Ha=null!=b?b:null;return this}delete(b=olympe.dc.Mb.NONE){this.state=a.j.Dc;this.Pb=b;this.properties=null;return this}ka(b,c){if(this.state===a.j.Dc)return this;this.properties||(this.properties=new Map);this.properties.set(b,c);return this}mn(b){this.state!==a.j.Dc&&(this.properties||(this.properties=new Map),b.forEach((c,d)=>{this.properties.set(d,c)}))}Nd(b,c){if(null!==this.Y&&this.Y!==b)throw Error('An instance should never be set as complex property of multiple instances');this.Y=b;this.Yb=
698
698
  c}$(b){let c;null==(c=this.properties)||c.delete(b);0===this.properties.size&&(this.properties=null)}link(b,c){null===this.pb&&(this.pb=new Map);b===olympe.dc.hc.$c&&this.ta(c);this.sa(this.pb,b,c,!0);return this}unlink(b,c){null===this.pb&&(this.pb=new Map);b===olympe.dc.hc.$c&&this.ta(c);this.sa(this.pb,b,c,!1);return this}Eb(b,c){null===this.j&&(this.j=new Map);this.sa(this.j,b,c,!0)}Gc(b,c){null===this.j&&(this.j=new Map);this.sa(this.j,b,c,!1)}mb(b,c,d){if(c=c===olympe.dc.va.ORIGIN?this.j:this.pb)return(b=
699
- c.get(b))&&b.get(d)}H(b,c,d){const e=(c=c===olympe.dc.va.ORIGIN?this.j:this.pb)&&c.get(b);e&&e.delete(d);e&&0===e.size&&c.delete(b)}D(){return this.state===a.j.Am}zd(){return this.state===a.j.Dc}wd(){let b=this.properties?this.properties.size:0,c;null==(c=this.pb)||c.forEach(d=>{b+=d.size});return b}N(){return null!==this.properties}Gd(){return null!==this.pb||null!==this.j}Cb(){let b;return null!=(b=this.properties)?b:new Map}Ra(b){if(this.properties)return this.properties.get(b)}cb(b,c=(d,e)=>[d,
699
+ c.get(b))&&b.get(d)}H(b,c,d){const e=(c=c===olympe.dc.va.ORIGIN?this.j:this.pb)&&c.get(b);e&&e.delete(d);e&&0===e.size&&c.delete(b)}D(){return this.state===a.j.Bm}zd(){return this.state===a.j.Dc}wd(){let b=this.properties?this.properties.size:0,c;null==(c=this.pb)||c.forEach(d=>{b+=d.size});return b}N(){return null!==this.properties}Gd(){return null!==this.pb||null!==this.j}Cb(){let b;return null!=(b=this.properties)?b:new Map}Ra(b){if(this.properties)return this.properties.get(b)}cb(b,c=(d,e)=>[d,
700
700
  e]){return function*(d){if(d=d&&d.get(b.X()))for(const [e,f]of d)yield c(e,f)}(b.La()===olympe.dc.va.ORIGIN?this.j:this.pb)}Jb(b){const c=b.La()===olympe.dc.va.ORIGIN?this.j:this.pb;return(b=c&&c.get(b.X()))&&0!==b.size?Array.from(b.keys())[0]:null}Jd(b=(c,d,e)=>[c,d,e]){return this.ja(this.pb,b)}Wa(b=(c,d,e)=>[c,d,e]){return this.ja(this.j,b)}ea(b=(c,d,e,f)=>[c,d,e,f]){const c=olympe.dc.va.ORIGIN,d=olympe.dc.va.DESTINATION;return function*(e,f,g){yield*e(f,(h,k,l)=>b(h,d,k,l));yield*e(g,(h,k,l)=>
701
- b(h,c,k,l))}(this.ja.bind(this),this.pb,this.j)}sa(b,c,d,e){if(this.state!==a.j.Dc||!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)}}*ja(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.Kh.j={Am:0,Xk:1,Dc:2};olympe.dc.db.Cv=class{constructor(a,b,c,d){this.G=a;this.view=b;this.j=c;(this.active=d.get('active'))&&this.init()}debug(a){const b=olympe.dc.fa(a);if(this.j.has(b)){var c=this.j.get(a);a='\n[DEBUG - DATABASE]\n'+c.toString();if(!c.Ja()){const d=[];for(;null!==c&&!d.includes(c.tag());)d.push(c.tag()),c=c.model();c=this.j.get(d[d.length-1]);const e=olympe.dc.db.Database.D.ej+olympe.dc.CloudObject.nameProp.X();d.push('???');a+='\n\nThe instance <<'+b+'>> does not exists because the instance '+c.tag()+
702
- ' (name: '+c.get(e)+') has no model.\nList: '+d.join(' --M--\x3e ')}this.G.info(a)}else this.G.info('[DATABASE] Instance',b,'has never been created or referred by the database')}init(){const a=olympe.dc.db.Database.j.mp,b=olympe.dc.db.Database.j.em,c=olympe.dc.db.Database.j.Dc,d=olympe.dc.db.Database.j.Ik,e=olympe.dc.db.Database.j.Sm,f=olympe.dc.db.Database.j.Jo,g=olympe.dc.db.Database.j.Ko,h=()=>{};this.j.j(olympe.dc.db.Database.j.lp,()=>{});this.j.j(a,()=>{});this.j.j(b,k=>{this.j.Eb(()=>{mh(this.view,
703
- k,h,`monitorRelations${k}`)})});this.j.j(c,k=>{this.j.Eb(()=>{nh(this.view,k,`monitorRelations${k}`)})});this.j.j(d,()=>{});this.j.j(e,()=>{});this.j.j(f,()=>{});this.j.j(g,()=>{})}};olympe.dc.db.dn=class{constructor(a,b,c,d){this.G=a;this.j=b;this.ha=c;this.F=d;this.transactionId=null}open(a){if(null!==this.transactionId)throw Error('A transaction is already open');this.transactionId=this.j.ug(a);this.G.debug(`DB Writer: transaction ${this.transactionId} opened`)}write(a,b){b&&(b=new ai(this.ha),a.rc(b),this.G.info(b.flush()));if(null===this.transactionId)throw Error('You must first open a transaction before to write');this.G.debug('DB Writer: writing patch',a.T(),'for transaction',
701
+ b(h,c,k,l))}(this.ja.bind(this),this.pb,this.j)}sa(b,c,d,e){if(this.state!==a.j.Dc||!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)}}*ja(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.Kh.j={Bm:0,Xk:1,Dc:2};olympe.dc.db.Cv=class{constructor(a,b,c,d){this.G=a;this.view=b;this.j=c;(this.active=d.get('active'))&&this.init()}debug(a){const b=olympe.dc.fa(a);if(this.j.has(b)){var c=this.j.get(a);a='\n[DEBUG - DATABASE]\n'+c.toString();if(!c.Ja()){const d=[];for(;null!==c&&!d.includes(c.tag());)d.push(c.tag()),c=c.model();c=this.j.get(d[d.length-1]);const e=olympe.dc.db.Database.D.ej+olympe.dc.CloudObject.nameProp.X();d.push('???');a+='\n\nThe instance <<'+b+'>> does not exists because the instance '+c.tag()+
702
+ ' (name: '+c.get(e)+') has no model.\nList: '+d.join(' --M--\x3e ')}this.G.info(a)}else this.G.info('[DATABASE] Instance',b,'has never been created or referred by the database')}init(){const a=olympe.dc.db.Database.j.np,b=olympe.dc.db.Database.j.em,c=olympe.dc.db.Database.j.Dc,d=olympe.dc.db.Database.j.Ik,e=olympe.dc.db.Database.j.Tm,f=olympe.dc.db.Database.j.Ko,g=olympe.dc.db.Database.j.Lo,h=()=>{};this.j.j(olympe.dc.db.Database.j.mp,()=>{});this.j.j(a,()=>{});this.j.j(b,k=>{this.j.Eb(()=>{mh(this.view,
703
+ k,h,`monitorRelations${k}`)})});this.j.j(c,k=>{this.j.Eb(()=>{nh(this.view,k,`monitorRelations${k}`)})});this.j.j(d,()=>{});this.j.j(e,()=>{});this.j.j(f,()=>{});this.j.j(g,()=>{})}};olympe.dc.db.en=class{constructor(a,b,c,d){this.G=a;this.j=b;this.ha=c;this.F=d;this.transactionId=null}open(a){if(null!==this.transactionId)throw Error('A transaction is already open');this.transactionId=this.j.ug(a);this.G.debug(`DB Writer: transaction ${this.transactionId} opened`)}write(a,b){b&&(b=new ai(this.ha),a.rc(b),this.G.info(b.flush()));if(null===this.transactionId)throw Error('You must first open a transaction before to write');this.G.debug('DB Writer: writing patch',a.T(),'for transaction',
704
704
  this.transactionId);this.j.dt(this.transactionId,()=>a.rc(this))}close(){if(null===this.transactionId)throw Error('No transaction is open');this.j.le(this.transactionId);this.G.debug(`DB Writer: transaction ${this.transactionId} committed`);this.transactionId=null}Rc(a,b,c,d){this.j.create(a,b,c,this.F);d&&this.j.link(olympe.dc.hc.$c,a,d)}Yc(a,b){this.j.update(a,b)}D(a,b=olympe.dc.Mb.NONE){for(const c of lg(this.ha,a,b))this.j.ta(c)}Pa(a,b,c){this.j.link(a,b,c)}ic(a,b,c){this.j.unlink(a,b,c)}};
705
705
  function bi(a,b,c){if(!b)return'';let d='';if(c&&1<c)return'...';for(const [e,f]of b)if(d+=(d?', "':'"')+e+'":',!f)d+=JSON.stringify(f);else if(f instanceof olympe.dc.wc||f instanceof olympe.dc.CloudObject)d+='Reference("'+f.X()+'")';else if(f instanceof olympe.C.Color)d+='Color("'+f.ph()+','+f.mh()+','+f.ih()+','+f.hh()+'")';else if(f.constructor&&Object.prototype.hasOwnProperty.call(f.constructor.prototype,'toString'))d+=JSON.stringify(f.toString());else if('object'===typeof f){let g;d+=bi(a,f,
706
706
  (null!=(g=c)?g:0)+1)}return'{'+(d?d:'')+'}'}function ci(a,b){let c;return'string'===typeof b?null!=(c=a.db.name(b))?c:b:''}function di(a,b){let c;return b===olympe.dc.hc.$c?'Model':null!=(c=a.db.name(b))?c:b}
707
707
  class ai{constructor(a){this.db=a;this.output='Applying patch on the local database'}flush(){const a=this.output;this.output='';return a}log(a,b){this.output+=`\ndb.${a};${b?`// ${b}`:''}`}Rc(a,b,c,d){this.log(`createInstance(tag: ${a}, source: ${b}, ${bi(this,c)})`,ci(this,d))}Yc(a,b,c){this.log(`updateInstance(tag: ${a}, ${bi(this,b)})`,ci(this,c))}D(a,b,c){this.log(`deleteInstance("${a}", rule: ${b})`,ci(this,c))}Pa(a,b,c){this.log(`createRelation("${a}", "${b}", "${c}")`,di(this,a))}ic(a,b,c){this.log(`deleteRelation("${a}", "${b}", "${c}")`,
708
- di(this,a))}}olympe.dc.db.dn.za=[olympe.dc.Writable,olympe.dc.Writable];olympe.dc.db.P={Da:'dc.db.Logger',im:'dc.db.gc.Logger',Ea:'dc.db.DatabaseManager',bk:'dc.db.Database',Xl:'dc.db.DBView',MB:'dc.db.Graph',OA:'dc.db.DatabaseWriter',BC:'dc.db.PermissionProcessor',Yi:'dc.db.GraphMonitor'};olympe.dc.db.U={Cp:'db.garbageCollector',Dp:'db.garbageCollectorDelay',Pl:'db.commitBufferTimeout',Yi:'db.monitor',Bv:'db.monitorCounters',Av:'db.monitorCallbacks',cp:'db.debug'};
709
- olympe.W.config(function(a){E(a,olympe.dc.db.U.Cp,olympe.dc.db.Af.j.io);E(a,olympe.dc.db.U.Dp,5E3);E(a,olympe.dc.db.U.Pl,3E4);E(a,olympe.dc.db.U.Yi,!1);E(a,olympe.dc.db.U.cp,!1);D(a,olympe.dc.db.P.Da,[olympe.ia.P.Ea],b=>b.cd('db'));D(a,olympe.dc.db.P.im,[olympe.ia.P.Ea],b=>b.cd('gc'));D(a,olympe.dc.db.P.bk,[olympe.dc.db.P.Da,olympe.dc.db.P.im,new olympe.W.pa(olympe.dc.U.Yg),new olympe.W.pa(olympe.dc.db.U.Cp),new olympe.W.pa(olympe.dc.db.U.Dp),new olympe.W.pa(olympe.dc.U.Zh),new olympe.W.pa(olympe.dc.db.U.cp)],
708
+ di(this,a))}}olympe.dc.db.en.za=[olympe.dc.Writable,olympe.dc.Writable];olympe.dc.db.P={Da:'dc.db.Logger',jm:'dc.db.gc.Logger',Ea:'dc.db.DatabaseManager',bk:'dc.db.Database',Xl:'dc.db.DBView',MB:'dc.db.Graph',OA:'dc.db.DatabaseWriter',BC:'dc.db.PermissionProcessor',Yi:'dc.db.GraphMonitor'};olympe.dc.db.U={Cp:'db.garbageCollector',Dp:'db.garbageCollectorDelay',Pl:'db.commitBufferTimeout',Yi:'db.monitor',Bv:'db.monitorCounters',Av:'db.monitorCallbacks',ep:'db.debug'};
709
+ olympe.W.config(function(a){E(a,olympe.dc.db.U.Cp,olympe.dc.db.Af.j.jo);E(a,olympe.dc.db.U.Dp,5E3);E(a,olympe.dc.db.U.Pl,3E4);E(a,olympe.dc.db.U.Yi,!1);E(a,olympe.dc.db.U.ep,!1);D(a,olympe.dc.db.P.Da,[olympe.ia.P.Ea],b=>b.cd('db'));D(a,olympe.dc.db.P.jm,[olympe.ia.P.Ea],b=>b.cd('gc'));D(a,olympe.dc.db.P.bk,[olympe.dc.db.P.Da,olympe.dc.db.P.jm,new olympe.W.pa(olympe.dc.U.Yg),new olympe.W.pa(olympe.dc.db.U.Cp),new olympe.W.pa(olympe.dc.db.U.Dp),new olympe.W.pa(olympe.dc.U.Zh),new olympe.W.pa(olympe.dc.db.U.ep)],
710
710
  (b,c,d,e,f,g,h)=>{e=g?olympe.dc.db.Af.j.am:e;d=(new Map).set('selfTag',d).set('garbageCollector',e).set('garbageCollectorDelay',f).set('debug',h);return new olympe.dc.db.Database(b,c,d)});C(a,olympe.dc.db.P.Xl,olympe.dc.kb,olympe.dc.db.P.Da,olympe.dc.db.P.bk);D(a,olympe.dc.db.P.Yi,[olympe.dc.db.P.Ea],b=>b.wz);D(a,olympe.dc.db.P.Ea,[olympe.dc.db.P.Da,olympe.dc.db.P.bk,olympe.dc.db.P.Xl,new olympe.W.pa(olympe.dc.U.bg),new olympe.W.pa(olympe.dc.db.U.Pl),new olympe.W.pa(olympe.dc.db.U.Yi),new olympe.W.pa(olympe.dc.db.U.Bv),
711
711
  new olympe.W.pa(olympe.dc.db.U.Av)],(b,c,d,e,f,g,h,k)=>{g=(new Map).set('active',g).set('counters',h).set('callbacks',k);e=(new Map).set('debug',e).set('bufferTimeout',f);return new olympe.dc.db.gu(b,c,d,e,g)})},'olympe.dc.db');olympe.W.run([olympe.dc.db.P.bk,olympe.dc.db.P.Yi],(a,b)=>{olympe.ee().db=a;olympe.ee().dbMonitor=b},'DC.DB debug service injection');olympe.dc.query={};function ei(a){return(b,c)=>{const d=null===b,e=null===c;return d||e?d&&e?0:d?1:-1:a(b,c)}}
712
712
  olympe.dc.query.xf=class{constructor(a,b,c){this.db=olympe.dc.ha();this.j=a;this.Ma=b;this.Wi=c}ga(){return{p:this.Ma.X(),o:this.Wi}}toString(){return'sortByQueryPart-'+this.Wi+this.Ma.X()}kh(){const a=this.db.Jb(this.Ma,olympe.dm.Property.typeRel),b=olympe.dc.fa;if(this.db.Uf(a,olympe.dm.String))return ei((c,d)=>c.localeCompare(d));if(a===b(olympe.dm.Number)||a===b(olympe.dm.Boolean))return ei((c,d)=>c-d);if(a===b(olympe.dm.DateTime))return ei((c,d)=>c.getTime()-d.getTime());if(a===b(olympe.dm.Color))return ei((c,
@@ -717,41 +717,41 @@ q+A)))});c.set(g,[x,t&&h,q+v])}else c.set(g,[n,h,q])}let d;a=null==(d=c.get('roo
717
717
  function mi(a,b){let c;return null!=(c=a.j.get(b).Uc())?c:[]}function ni(a,b,c){let d,e;return null!=(e=null==(d=a.j.get(c))?void 0:d.has(b))?e:!1}function oi(a,b,c=a.F,d='root'){const e=a.j.get(c);if(!e)return a.G.error('Try to insert result entry to a higher level than possible'),null;const f=!e.has(b);e.D(b,d)&&li(a);let g;f&&(null==(g=a.Se)||g.watch(b,a.H.has(c)));return f}function pi(a,b,c,d,e,f){null!==a.Se&&(d===olympe.dc.va.ORIGIN?gi(a.Se,b,c,f,e):gi(a.Se,b,c,e,f))}
718
718
  function qi(a){a.G.j()&&a.G.debug(`Start sending notifications for query ${a.query.T()}`);const b=new olympe.dc.query.Iv(a.G,a.query.jb(),a.query.T(),a);a.j.forEach((c,d)=>{for(const e of c.Uc())b.watch(e,a.H.has(d))});null!=b.j||(b.j=new olympe.dc.db.fc);a.Se=b}function ri(a){null!==a.Se&&(a.G.j()&&a.G.debug(`Stop sending notifications for query ${a.query.T()}`),a.j.forEach(b=>{for(const c of b.Uc())a.Se.stop(c)}),a.Se=null)}
719
719
  function si(a){a.N=!1;if(null!=(a=a.Se)){let b;const c=!(null==(b=a.j)?0:b.pf());a.F=c?a.j:null;c&&(a.j=new olympe.dc.db.fc,a.G.j()&&a.G.debug(`Commit notification with ${a.F.H()} operations for query ${a.D}`))}}
720
- olympe.dc.query.dr=class{constructor(a,b){this.G=a;this.query=b;this.F=olympe.V.ub(b.D);this.oa=new Map;this.j=(new Map).set(this.F,new olympe.dc.query.oa.Ym);this.H=new Set(b.F);this.Md=-1;this.N=!1;this.R=null;this.Y=olympe.dc.Ka.empty();this.Se=this.D=null;a=ii(b);a.forEach(c=>{const d=c.T();this.oa.set(d,c.N());this.j.set(d,c.ja())});b=b.kh();if(null!==b){b=b.j;let c=-1;for(const d of[this.F].concat(a.map(e=>e.T())))if(c+=this.H.has(d)?1:0,b===d){this.Md=c;break}}}remove(a,b=this.F,c='root'){b=
721
- this.j.get(b);if(null==b?0:b.remove(a,c))if(li(this),!b.has(a)){let d;null==(d=this.Se)||d.stop(a);return!0}return!1}Qc(a){const b=a.D,c=olympe.V.ub(b);a=ii(a);const d=[];for(const [f,g]of this.j){if(g.H(b))return!0;g.has(b)&&d.push(f)}const e=(new Map).set(c,d);return 0<d.length&&a.every(f=>{let g;const h=(null!=(g=e.get(f.j))?g:[]).flatMap(k=>f.$(k,this.oa.get(k))).filter(k=>{let l,n;return null!=(n=null==(l=this.oa.get(k))?void 0:l.Qc(f))?n:!1});e.set(f.T(),h);return 0<h.length})}};function ti(a){if(!olympe.dc.ha().Ob(a,olympe.dm.Property))throw new olympe.dc.query.Dd(`The specified property while trying to build a query predicate is invalid: ${a}`);}
722
- function ui(a){var b=olympe.dc.query.Ba.j.Wr;const c=olympe.dc.query.Ba.j.np,d=olympe.dc.query.Ba.j.Zj,e=olympe.dc.query.Ba.j.Yp,f=olympe.dc.query.Ba.j.Aq,g=olympe.dc.query.Ba.j.nr,h=olympe.dc.query.Ba.j.fo,k=olympe.dc.query.Ba.j.Sq;switch(a.pr){case b:return new olympe.dc.query.Z.an(a.t);case c:b=a.v;switch(a.t){case 2:b=new Date(b);break;case 3:b=olympe.dc.CloudObject.get(b);break;case 4:b=olympe.C.Color.create(b.r,b.g,b.b,b.a)}return new olympe.dc.query.Z.Be(a.p,b,olympe.dc.ha());case d:return new olympe.dc.query.Z.yf(a.p,
720
+ olympe.dc.query.dr=class{constructor(a,b){this.G=a;this.query=b;this.F=olympe.V.ub(b.D);this.na=new Map;this.j=(new Map).set(this.F,new olympe.dc.query.na.Zm);this.H=new Set(b.F);this.Md=-1;this.N=!1;this.R=null;this.Y=olympe.dc.Ka.empty();this.Se=this.D=null;a=ii(b);a.forEach(c=>{const d=c.T();this.na.set(d,c.N());this.j.set(d,c.ja())});b=b.kh();if(null!==b){b=b.j;let c=-1;for(const d of[this.F].concat(a.map(e=>e.T())))if(c+=this.H.has(d)?1:0,b===d){this.Md=c;break}}}remove(a,b=this.F,c='root'){b=
721
+ this.j.get(b);if(null==b?0:b.remove(a,c))if(li(this),!b.has(a)){let d;null==(d=this.Se)||d.stop(a);return!0}return!1}Qc(a){const b=a.D,c=olympe.V.ub(b);a=ii(a);const d=[];for(const [f,g]of this.j){if(g.H(b))return!0;g.has(b)&&d.push(f)}const e=(new Map).set(c,d);return 0<d.length&&a.every(f=>{let g;const h=(null!=(g=e.get(f.j))?g:[]).flatMap(k=>f.$(k,this.na.get(k))).filter(k=>{let l,n;return null!=(n=null==(l=this.na.get(k))?void 0:l.Qc(f))?n:!1});e.set(f.T(),h);return 0<h.length})}};function ti(a){if(!olympe.dc.ha().Ob(a,olympe.dm.Property))throw new olympe.dc.query.Dd(`The specified property while trying to build a query predicate is invalid: ${a}`);}
722
+ function ui(a){var b=olympe.dc.query.Ba.j.Wr;const c=olympe.dc.query.Ba.j.op,d=olympe.dc.query.Ba.j.Zj,e=olympe.dc.query.Ba.j.Yp,f=olympe.dc.query.Ba.j.Aq,g=olympe.dc.query.Ba.j.nr,h=olympe.dc.query.Ba.j.ho,k=olympe.dc.query.Ba.j.Sq;switch(a.pr){case b:return new olympe.dc.query.Z.bn(a.t);case c:b=a.v;switch(a.t){case 2:b=new Date(b);break;case 3:b=olympe.dc.CloudObject.get(b);break;case 4:b=olympe.C.Color.create(b.r,b.g,b.b,b.a)}return new olympe.dc.query.Z.Be(a.p,b,olympe.dc.ha());case d:return new olympe.dc.query.Z.yf(a.p,
723
723
  a.s,olympe.dc.ha(),a.c);case e:return new olympe.dc.query.Z.Ti(olympe.dc.ha(),a.p,a.b,a.l,a.s);case f:return new olympe.dc.query.Z.je(ui(a.v));case g:return new olympe.dc.query.Z.Hf(a.p,new RegExp(a.r),olympe.dc.ha(),a.c);case k:return new olympe.dc.query.Z.Fe(...a.p.map(l=>ui(l)));case h:return new olympe.dc.query.Z.Od(...a.p.map(l=>ui(l)));default:return null}}
724
- olympe.dc.query.Ba=class{observe(){}ob(){}compile(){return[[this]]}Ad(){return new olympe.dc.query.Z.je(this)}Cb(){}Qc(){}clear(){}ga(){}Xc(){}toString(){}Fa(a){return this===a}static cz(...a){return new olympe.dc.query.Z.an(a)}static Fa(a,b){ti(a);return new olympe.dc.query.Z.Be(a,b,olympe.dc.ha())}static contains(a,b,c=!0){ti(a);return new olympe.dc.query.Z.yf(a,b,olympe.dc.ha(),c)}static Xz(a,b,c=!0){ti(a);return new olympe.dc.query.Z.Hf(a,b,olympe.dc.ha(),c)}static nl(a,b,c=!0){ti(a);return new olympe.dc.query.Z.Ti(olympe.dc.ha(),
724
+ olympe.dc.query.Ba=class{observe(){}ob(){}compile(){return[[this]]}Ad(){return new olympe.dc.query.Z.je(this)}Cb(){}Qc(){}clear(){}ga(){}Xc(){}toString(){}Fa(a){return this===a}static cz(...a){return new olympe.dc.query.Z.bn(a)}static Fa(a,b){ti(a);return new olympe.dc.query.Z.Be(a,b,olympe.dc.ha())}static contains(a,b,c=!0){ti(a);return new olympe.dc.query.Z.yf(a,b,olympe.dc.ha(),c)}static Xz(a,b,c=!0){ti(a);return new olympe.dc.query.Z.Hf(a,b,olympe.dc.ha(),c)}static nl(a,b,c=!0){ti(a);return new olympe.dc.query.Z.Ti(olympe.dc.ha(),
725
725
  a,b,!1,c)}static Oj(a,b,c=!0){ti(a);return new olympe.dc.query.Z.Ti(olympe.dc.ha(),a,b,!0,c)}static and(...a){if(!a.every(b=>b instanceof olympe.dc.query.Ba))throw new olympe.dc.query.Dd(`Some specified predicates, while trying to build an AND query predicate are invalid: ${a}`);return new olympe.dc.query.Z.Od(...a)}static or(...a){if(!a.every(b=>b instanceof olympe.dc.query.Ba))throw new olympe.dc.query.Dd(`Some specified predicates, while trying to build an OR query predicate are invalid: ${a}`);
726
726
  return new olympe.dc.query.Z.Fe(...a)}static Ad(a){if(!(a instanceof olympe.dc.query.Ba))throw new olympe.dc.query.Dd(`The specified predicate, while trying to build a NOT query predicate is invalid: ${a}`);return new olympe.dc.query.Z.je(a)}};olympe.dc.query.Ba.not=olympe.dc.query.Ba.Ad;olympe.dc.query.Ba.or=olympe.dc.query.Ba.or;olympe.dc.query.Ba.and=olympe.dc.query.Ba.and;olympe.dc.query.Ba.smallerThan=olympe.dc.query.Ba.Oj;olympe.dc.query.Ba.greaterThan=olympe.dc.query.Ba.nl;
727
- olympe.dc.query.Ba.regex=olympe.dc.query.Ba.Xz;olympe.dc.query.Ba.contains=olympe.dc.query.Ba.contains;olympe.dc.query.Ba.equals=olympe.dc.query.Ba.Fa;olympe.dc.query.Ba['in']=olympe.dc.query.Ba.cz;olympe.dc.query.Ba.j={Wr:0,np:1,Zj:2,Yp:3,Aq:4,nr:5,Sq:6,fo:7};function ii(a){return Array.from(a.oa)}
728
- function vi(a,b){var c=b.relation,d=olympe.dm.Relation.originModelRel,e=olympe.dm.Relation.destinationModelRel;d=a.db.Jb(c,c.La()===olympe.dc.va.ORIGIN?e:d);if(0>a.cursor)e=a.j.Te;else if(e=a.oa[a.cursor],null!==e.ta)e=e.ta;else{var f=olympe.dc.va.ORIGIN;e=olympe.dc.ha().Jb(e.relation,e.relation.La()===f?olympe.dm.Relation.originModelRel:olympe.dm.Relation.destinationModelRel)}if(a.db.Ja(olympe.dc.CloudObject)&&(null===d||!a.db.Uf(d,e)&&!a.db.Uf(e,d)))throw new olympe.dc.query.Dd(`The specified relation "${c}" is invalid at the current level "${a.db.name(e)} (${e})" of the Query you are building. Please make sure you did not forget a .back() or another relation.`);d=
729
- b.T();for(c=a.cursor+1;c<a.oa.length&&a.oa[c].T()!==d;)c++;b=c<a.oa.length?a.oa:a.oa.concat(b);return new olympe.dc.ma(a.D,a.source,b,c,a.F,a.j)}function wi(a,b=a.cursor){return 0<=b?a.oa[b].T():olympe.V.ub(a.D)}
730
- function xi(a,b,c,d={}){var e=olympe.dc.Mb.kg;const f=(null==d?0:d.md)?d.md:olympe.dc.ma.oc.wf,g=(null==d?0:d.$n)?'__code-as-data__':void 0;b=olympe.dc.fa(b);const h=olympe.dc.fe().Qe(b);b=(new olympe.dc.ma(b,h)).ne();b.oa=[f===olympe.dc.ma.oc.Rg?new olympe.dc.query.oa.xp(wi(b),e,c):new olympe.dc.query.oa.Pd(wi(b),e,c)];let k;b.H=null!=(k=null==d?void 0:d.at)?k:!1;return b.observe(a,{md:f,cl:g})}
727
+ olympe.dc.query.Ba.regex=olympe.dc.query.Ba.Xz;olympe.dc.query.Ba.contains=olympe.dc.query.Ba.contains;olympe.dc.query.Ba.equals=olympe.dc.query.Ba.Fa;olympe.dc.query.Ba['in']=olympe.dc.query.Ba.cz;olympe.dc.query.Ba.j={Wr:0,op:1,Zj:2,Yp:3,Aq:4,nr:5,Sq:6,ho:7};function ii(a){return Array.from(a.na)}
728
+ function vi(a,b){var c=b.relation,d=olympe.dm.Relation.originModelRel,e=olympe.dm.Relation.destinationModelRel;d=a.db.Jb(c,c.La()===olympe.dc.va.ORIGIN?e:d);if(0>a.cursor)e=a.j.Te;else if(e=a.na[a.cursor],null!==e.ta)e=e.ta;else{var f=olympe.dc.va.ORIGIN;e=olympe.dc.ha().Jb(e.relation,e.relation.La()===f?olympe.dm.Relation.originModelRel:olympe.dm.Relation.destinationModelRel)}if(a.db.Ja(olympe.dc.CloudObject)&&(null===d||!a.db.Uf(d,e)&&!a.db.Uf(e,d)))throw new olympe.dc.query.Dd(`The specified relation "${c}" is invalid at the current level "${a.db.name(e)} (${e})" of the Query you are building. Please make sure you did not forget a .back() or another relation.`);d=
729
+ b.T();for(c=a.cursor+1;c<a.na.length&&a.na[c].T()!==d;)c++;b=c<a.na.length?a.na:a.na.concat(b);return new olympe.dc.ma(a.D,a.source,b,c,a.F,a.j)}function wi(a,b=a.cursor){return 0<=b?a.na[b].T():olympe.V.ub(a.D)}
730
+ function xi(a,b,c,d={}){var e=olympe.dc.Mb.kg;const f=(null==d?0:d.md)?d.md:olympe.dc.ma.oc.wf,g=(null==d?0:d.ao)?'__code-as-data__':void 0;b=olympe.dc.fa(b);const h=olympe.dc.fe().Qe(b);b=(new olympe.dc.ma(b,h)).ne();b.na=[f===olympe.dc.ma.oc.Rg?new olympe.dc.query.na.im(wi(b),e,c):new olympe.dc.query.na.Pd(wi(b),e,c)];let k;b.H=null!=(k=null==d?void 0:d.at)?k:!1;return b.observe(a,{md:f,cl:g})}
731
731
  function yi(a){const b=0===a.F.size?a.ne():a;if(null!==b.j.Md&&!b.F.has(wi(a,b.j.Md)))throw new olympe.dc.query.Dd('AndReturn was not called for the current level before sortBy operator');return b}function zi(a,b){let c,d;return b.H||(null!=(d=null==(c=a.N)?void 0:c.has(b.T()))?d:!1)}
732
- olympe.dc.ma=class{constructor(a,b,c=[],d=-1,e=new Set,f={max:-1,offset:0,Md:null,Te:null}){this.db=olympe.dc.ha();if('string'!==typeof a||''===a)throw new olympe.dc.query.Dd('The root of the query cannot be empty.');this.D=a;this.source=b;this.oa=c;this.cursor=d;this.F=e;this.j=f;this.N=this.id=null;this.H=!1}static from(a,b){a=olympe.dc.fa(a);if(!olympe.dc.CloudObject.exists(a))throw new olympe.dc.query.Dd(`Try to create a query from an instance that does not exist (${a}). Please try to use \`Query.fromTag()\` instead.`);
732
+ olympe.dc.ma=class{constructor(a,b,c=[],d=-1,e=new Set,f={max:-1,offset:0,Md:null,Te:null}){this.db=olympe.dc.ha();if('string'!==typeof a||''===a)throw new olympe.dc.query.Dd('The root of the query cannot be empty.');this.D=a;this.source=b;this.na=c;this.cursor=d;this.F=e;this.j=f;this.N=this.id=null;this.H=!1}static from(a,b){a=olympe.dc.fa(a);if(!olympe.dc.CloudObject.exists(a))throw new olympe.dc.query.Dd(`Try to create a query from an instance that does not exist (${a}). Please try to use \`Query.fromTag()\` instead.`);
733
733
  b=null!=b?b:olympe.dc.fe().Qe(a);b=new olympe.dc.ma(a,b);b.j.Te=olympe.dc.ha().model(a);return b}static Qe(a,b,c){if(!olympe.dc.CloudObject.exists(b)&&!c)throw new olympe.dc.query.Dd(`Try to create a query from an instance (${a}) with an explicit datatype that does not exist (${b})`);a=olympe.dc.fa(a);c=null!=c?c:olympe.dc.fe().fromModel(b);c=new olympe.dc.ma(a,c);c.j.Te=olympe.dc.fa(b);return c}static pl(a,b=!0,c){const d=olympe.dc.fa(a);var e=olympe.dc.ha();if(!e.wi(d))throw new olympe.dc.query.Dd(`Try to create a query to get instances of ${a}, which is not a data type or does not exist.`);
734
- a=null!=c?c:olympe.dc.fe().fromModel(d);a=new olympe.dc.ma(d,a);a.j.Te=e.model(d);b&&(a=vi(a,new olympe.dc.query.oa.Ce(wi(a),olympe.dc.CloudObject.extendedByRel,!0,!1)));b=a;e=new olympe.dc.query.oa.Ih(wi(a),olympe.dc.CloudObject.instancesRel,!1);e.ta=d;return vi(b,e)}static Pb(a,b,c,d,e){var f;const g=null!=(f=null==e?void 0:e.md)?f:olympe.dc.ma.oc.wf;f=(null==e?0:e.$n)?'__code-as-data__':void 0;b=olympe.dc.fa(b);d=null!=d?d:olympe.dc.fe().Qe(b);d=(new olympe.dc.ma(b,d)).ne();b=g===olympe.dc.ma.oc.Rg;
735
- d.oa=[b?new olympe.dc.query.oa.xp(wi(d),c):new olympe.dc.query.oa.Pd(wi(d),c)];let h;d.H=null!=(h=null==e?void 0:e.at)?h:!1;let k;return d.observe(a,{md:g,cl:f,rj:null!=(k=null==e?void 0:e.rj)?k:b})}fb(a,b=!1){if(!(a instanceof olympe.dc.Sa.Relation))throw new olympe.dc.query.Dd(`The relation given to follow() is invalid: ${a}`);return vi(this,new olympe.dc.query.oa.Ih(wi(this),a,b))}vg(a,b=!1,c=!1){if(!(a instanceof olympe.dc.Sa.Relation))throw new olympe.dc.query.Dd(`The relation given to followRecursively() is invalid: ${a}`);
736
- return vi(this,new olympe.dc.query.oa.Ce(wi(this),a,b,c))}ne(){const a=(new Set(this.F)).add(wi(this));return new olympe.dc.ma(this.D,this.source,this.oa,this.cursor,a,this.j)}filter(a){if(!(a instanceof olympe.dc.query.Ba))throw new olympe.dc.query.Dd(`The specified predicate while trying to filter a query is invalid: ${a}`);const b=Array.from(this.oa);b[this.cursor]=b[this.cursor].filter(a);return new olympe.dc.ma(this.D,this.source,b,this.cursor,this.F,this.j)}sj(){return this}Hj(a,b=0){return new olympe.dc.ma(this.D,
737
- this.source,this.oa,this.cursor,this.F,{Md:this.j.Md,max:a,offset:b,Te:this.j.Te})}xl(a,b=olympe.dc.query.Bk.ASC){if(0>this.cursor)throw new olympe.dc.query.Dd('You are trying to sort an empty query. Please first follow at least one relation to sort a query.');if(!olympe.dc.ha().Ob(a,olympe.dm.Property))throw new olympe.dc.query.Dd(`The specified property while trying to sort a query is invalid: ${a}`);const c=this.oa[this.cursor],d={Md:this.cursor,max:this.j.max,offset:this.j.offset,Te:this.j.Te},
738
- e=Array.from(this.oa);e[this.cursor]=c.sort(a,b);return new olympe.dc.ma(this.D,this.source,e,this.cursor,this.F,d)}kh(){const a=this.j.Md;let b;return null!==a?null==(b=this.oa[a])?void 0:b.kh():null}back(a=1){if(0>this.cursor||1>a)return this;let b=this.cursor;for(let c=0;c<a;c++){const d=this.oa[b].j;for(b--;-1<b&&wi(this,b)!==d;)b--}return new olympe.dc.ma(this.D,this.source,Array.from(this.oa),b,this.F,this.j)}parse(){const a=new Map,b=wi(this,-1),c={limit:this.j.max,offset:this.j.offset,returned:this.F.has(b),
739
- filter:[],optional:!1,inheritance:!1,next:[]};a.set(b,c);this.db.wi(this.D)?c.dataType=olympe.dc.fa(this.D):(c.root=olympe.dc.fa(this.D),c.dataType=this.j.Te);this.oa.forEach((d,e)=>{const f=d.T(),g=d.Xc();Object.assign(g,{returned:this.F.has(f),next:[]});a.set(f,g);g.sort&&this.j.Md!==e&&delete g.sort;if(1>=e&&d instanceof olympe.dc.query.oa.Ih&&d.relation.Fa(olympe.dc.CloudObject.instancesRel))Object.assign(c,g);else if(0===e&&d instanceof olympe.dc.query.oa.Ce&&d.relation.Fa(olympe.dc.CloudObject.extendedByRel))Object.assign(c,
734
+ a=null!=c?c:olympe.dc.fe().fromModel(d);a=new olympe.dc.ma(d,a);a.j.Te=e.model(d);b&&(a=vi(a,new olympe.dc.query.na.Ce(wi(a),olympe.dc.CloudObject.extendedByRel,!0,!1)));b=a;e=new olympe.dc.query.na.Ih(wi(a),olympe.dc.CloudObject.instancesRel,!1);e.ta=d;return vi(b,e)}static Pb(a,b,c,d,e){var f;const g=null!=(f=null==e?void 0:e.md)?f:olympe.dc.ma.oc.wf;f=(null==e?0:e.ao)?'__code-as-data__':void 0;b=olympe.dc.fa(b);d=null!=d?d:olympe.dc.fe().Qe(b);d=(new olympe.dc.ma(b,d)).ne();b=g===olympe.dc.ma.oc.Rg;
735
+ d.na=[b?new olympe.dc.query.na.im(wi(d),c):new olympe.dc.query.na.Pd(wi(d),c)];let h;d.H=null!=(h=null==e?void 0:e.at)?h:!1;let k;return d.observe(a,{md:g,cl:f,rj:null!=(k=null==e?void 0:e.rj)?k:b})}fb(a,b=!1){if(!(a instanceof olympe.dc.Sa.Relation))throw new olympe.dc.query.Dd(`The relation given to follow() is invalid: ${a}`);return vi(this,new olympe.dc.query.na.Ih(wi(this),a,b))}vg(a,b=!1,c=!1){if(!(a instanceof olympe.dc.Sa.Relation))throw new olympe.dc.query.Dd(`The relation given to followRecursively() is invalid: ${a}`);
736
+ return vi(this,new olympe.dc.query.na.Ce(wi(this),a,b,c))}ne(){const a=(new Set(this.F)).add(wi(this));return new olympe.dc.ma(this.D,this.source,this.na,this.cursor,a,this.j)}filter(a){if(!(a instanceof olympe.dc.query.Ba))throw new olympe.dc.query.Dd(`The specified predicate while trying to filter a query is invalid: ${a}`);const b=Array.from(this.na);b[this.cursor]=b[this.cursor].filter(a);return new olympe.dc.ma(this.D,this.source,b,this.cursor,this.F,this.j)}sj(){return this}Hj(a,b=0){return new olympe.dc.ma(this.D,
737
+ this.source,this.na,this.cursor,this.F,{Md:this.j.Md,max:a,offset:b,Te:this.j.Te})}xl(a,b=olympe.dc.query.Bk.ASC){if(0>this.cursor)throw new olympe.dc.query.Dd('You are trying to sort an empty query. Please first follow at least one relation to sort a query.');if(!olympe.dc.ha().Ob(a,olympe.dm.Property))throw new olympe.dc.query.Dd(`The specified property while trying to sort a query is invalid: ${a}`);const c=this.na[this.cursor],d={Md:this.cursor,max:this.j.max,offset:this.j.offset,Te:this.j.Te},
738
+ e=Array.from(this.na);e[this.cursor]=c.sort(a,b);return new olympe.dc.ma(this.D,this.source,e,this.cursor,this.F,d)}kh(){const a=this.j.Md;let b;return null!==a?null==(b=this.na[a])?void 0:b.kh():null}back(a=1){if(0>this.cursor||1>a)return this;let b=this.cursor;for(let c=0;c<a;c++){const d=this.na[b].j;for(b--;-1<b&&wi(this,b)!==d;)b--}return new olympe.dc.ma(this.D,this.source,Array.from(this.na),b,this.F,this.j)}parse(){const a=new Map,b=wi(this,-1),c={limit:this.j.max,offset:this.j.offset,returned:this.F.has(b),
739
+ filter:[],optional:!1,inheritance:!1,next:[]};a.set(b,c);this.db.wi(this.D)?c.dataType=olympe.dc.fa(this.D):(c.root=olympe.dc.fa(this.D),c.dataType=this.j.Te);this.na.forEach((d,e)=>{const f=d.T(),g=d.Xc();Object.assign(g,{returned:this.F.has(f),next:[]});a.set(f,g);g.sort&&this.j.Md!==e&&delete g.sort;if(1>=e&&d instanceof olympe.dc.query.na.Ih&&d.relation.Fa(olympe.dc.CloudObject.instancesRel))Object.assign(c,g);else if(0===e&&d instanceof olympe.dc.query.na.Ce&&d.relation.Fa(olympe.dc.CloudObject.extendedByRel))Object.assign(c,
740
740
  g),c.inheritance=!0;else{let h;null==(h=a.get(d.j))||h.next.push(g)}});return c}ob(a){const b=(null==a?0:a.md)?a.md:olympe.dc.ma.oc.Ck;let c;return olympe.dc.query.ml().executeQuery(yi(this),b,{ji:null!=(c=null==a?void 0:a.cl)?c:null==a?void 0:a.cacheId,Bc:null==a?void 0:a.Bc}).then(d=>{let e;return null!=(e=null==d?void 0:ji(d))?e:olympe.dc.Ka.empty()})}Hc(){return ji(Ai(olympe.dc.query.ml(),yi(this)))}observe(a,b){const c=(null==b?0:b.md)?b.md:olympe.dc.ma.oc.wf;a='function'===typeof a.Bb?a.Bb():
741
- a;let d;return Bi(olympe.dc.query.ml(),yi(this),a,olympe.dc.Ia.SELF,c,{ji:null!=(d=null==b?void 0:b.cl)?d:null==b?void 0:b.cacheId,Bc:null==b?void 0:b.Bc,rj:null==b?void 0:b.rj}).pipe(rxjs.operators.map(e=>ji(e)),rxjs.operators.distinctUntilChanged())}T(){null===this.id&&(this.id=olympe.V.ub(this.D+ii(this).map(a=>a.H()).join()+Array.from(new Set(this.F)).sort().toString()+this.j.Md+this.j.max+this.j.offset));return this.id}jb(){return this.source}ga(){let a;return{b:this.D,p:this.oa.map(b=>b.ga()),
742
- r:Array.from(this.F),s:this.source,e:{m:this.j.max,o:this.j.offset,s:this.j.Md,rm:null!=(a=this.j.Te)?a:this.db.model(this.D)}}}toString(){return`Query: ${JSON.stringify(this)}`}toJSON(){return{origin:this.db.Ja(this.D)?olympe.dc.CloudObject.get(this.D):this.D,relations:this.oa.map(a=>a.toJSON())}}};olympe.dc.ma.prototype.observe=olympe.dc.ma.prototype.observe;olympe.dc.ma.prototype.executeFromCache=olympe.dc.ma.prototype.Hc;olympe.dc.ma.prototype.execute=olympe.dc.ma.prototype.ob;
741
+ a;let d;return Bi(olympe.dc.query.ml(),yi(this),a,olympe.dc.Ia.SELF,c,{ji:null!=(d=null==b?void 0:b.cl)?d:null==b?void 0:b.cacheId,Bc:null==b?void 0:b.Bc,rj:null==b?void 0:b.rj}).pipe(rxjs.operators.map(e=>ji(e)),rxjs.operators.distinctUntilChanged())}T(){null===this.id&&(this.id=olympe.V.ub(this.D+ii(this).map(a=>a.H()).join()+Array.from(new Set(this.F)).sort().toString()+this.j.Md+this.j.max+this.j.offset));return this.id}jb(){return this.source}ga(){let a;return{b:this.D,p:this.na.map(b=>b.ga()),
742
+ r:Array.from(this.F),s:this.source,e:{m:this.j.max,o:this.j.offset,s:this.j.Md,rm:null!=(a=this.j.Te)?a:this.db.model(this.D)}}}toString(){return`Query: ${JSON.stringify(this)}`}toJSON(){return{origin:this.db.Ja(this.D)?olympe.dc.CloudObject.get(this.D):this.D,relations:this.na.map(a=>a.toJSON())}}};olympe.dc.ma.prototype.observe=olympe.dc.ma.prototype.observe;olympe.dc.ma.prototype.executeFromCache=olympe.dc.ma.prototype.Hc;olympe.dc.ma.prototype.execute=olympe.dc.ma.prototype.ob;
743
743
  olympe.dc.ma.prototype.parse=olympe.dc.ma.prototype.parse;olympe.dc.ma.prototype.back=olympe.dc.ma.prototype.back;olympe.dc.ma.prototype.sortBy=olympe.dc.ma.prototype.xl;olympe.dc.ma.prototype.limit=olympe.dc.ma.prototype.Hj;olympe.dc.ma.prototype.cast=olympe.dc.ma.prototype.sj;olympe.dc.ma.prototype.filter=olympe.dc.ma.prototype.filter;olympe.dc.ma.prototype.andReturn=olympe.dc.ma.prototype.ne;olympe.dc.ma.prototype.followRecursively=olympe.dc.ma.prototype.vg;olympe.dc.ma.prototype.follow=olympe.dc.ma.prototype.fb;
744
744
  olympe.dc.ma.followRule=olympe.dc.ma.Pb;olympe.dc.ma.instancesOf=olympe.dc.ma.pl;olympe.dc.ma.fromTag=olympe.dc.ma.Qe;olympe.dc.ma.from=olympe.dc.ma.from;olympe.dc.ma.oc={wf:1,Ck:2,Rg:3};olympe.dc.ma.j={Ml:'cacheBucketName',fq:'isCacheable'};function Ci(a){null===a.Ga&&null===a.j&&(a.Ga=Xf(a.F))}
745
745
  olympe.dc.query.Ed=class extends olympe.dc.Ig{constructor(a){super(a,null);this.F=new olympe.dc.transaction.He}static xj(a){const b=new olympe.dc.query.Ed(`DataResult_${a.T()}`);b.D=a.jb();return b}static j(a){const b=new olympe.dc.query.Ed(a.i);let c;b.D=null!=(c=a.s)?c:null;let d;b.dl=null!=(d=a.t)?d:null;let e;b.Ga=null!=(e=a.p)?e:[];return b}rc(a){Ci(this);return super.rc(a)}bc(){Ci(this);return super.bc()}jl(){Ci(this);return super.jl()}create(a,b,c){this.F.Rc(a,this.D,c,b);return this}Pa(a,
746
746
  b,c){this.F.Pa(a,b,c,null,null);return this}ga(){return super.ga()}};olympe.dc.query.Ed.prototype.createRelation=olympe.dc.query.Ed.prototype.Pa;olympe.dc.query.Ed.prototype.create=olympe.dc.query.Ed.prototype.create;olympe.dc.query.Ed.fromQuery=olympe.dc.query.Ed.xj;function Ai(a,b){const c=new olympe.dc.query.dr(a.G,b);if(a.D.view.Ja(b.D)){oi(c,b.D);for(const d of ii(b))d.ob(c)}return c}
747
747
  function Bi(a,b,c,d,e,f){const g=b.T();let h=a.j.get(g);if(!h){var k=b.jb();a.G.debug(`Create new subscription for query ${g} for subscriber ${d}, to be executed by the data source ${k}`);k=!1===f.Bc||a.H&&k===olympe.dc.Ia.SERVER?[]:Array.from(a.j.values());h=new olympe.dc.query.lr(a.G,a.D,b,e,a.R.bind(a,e,f));a.j.set(g,h);Di(h,l=>a.F.add(l));h.start(k)&&(null==f?0:f.ji)&&Ei(a,b,e,f).catch(l=>{a.G.error(`Was not able to get the result of the subscribed query ${g} to add it to the cache: ${l}`)})}return new rxjs.Observable(l=>
748
748
  {const n=()=>{p&&c.it(p);l.complete();if(q){var r=q;const v=a.j.get(g);a.G.debug(`${d} unsubscribed from ${g}`);if(null==v)r=0;else{var t=v;t.H.delete(r)&&t.G.debug(`Remove subscriber ${d} for query ${t.query.T()}, now have ${t.H.size} subscribers`);d!==olympe.dc.Ia.SELF&&(t.$--,0===t.$&&ri(t.j));r=0===t.H.size}r&&(a.G.debug(`No more subscriber to ${g}, remove the subscription`),a.F.delete(g),a.j.delete(g),v.destroy())}},p=c.Yd(n),q=Fi(h,d,l);return n})}
749
- function Gi(a){a.F.forEach(b=>{let c;null==(c=a.j.get(b))||Hi(c)});a.F.clear()}function Ii(a,b,c,d){return u(function*(){const e=null!=d?d:c===olympe.dc.ma.oc.Rg;if(b instanceof ReadableStream)yield Rg(a.D,b,{nn:e});else{var f;if(f=b instanceof olympe.dc.Ig)f=b.T(),f=!a.N.H.has(f);f&&a.D.nd(b,{nn:e})}})}function Ji(a){a.G.debug('Send GetContext request to the orchestrator');const b=new olympe.dc.Request(olympe.dc.Request.j.Kg,olympe.dc.Ia.SERVER);return a.Kb.request(b).then(c=>{a.D.nd(c)})}
749
+ function Gi(a){a.F.forEach(b=>{let c;null==(c=a.j.get(b))||Hi(c)});a.F.clear()}function Ii(a,b,c,d){return u(function*(){const e=null!=d?d:c===olympe.dc.ma.oc.Rg;if(b instanceof ReadableStream)yield Rg(a.D,b,{pn:e});else{var f;if(f=b instanceof olympe.dc.Ig)f=b.T(),f=!a.N.H.has(f);f&&a.D.nd(b,{pn:e})}})}function Ji(a){a.G.debug('Send GetContext request to the orchestrator');const b=new olympe.dc.Request(olympe.dc.Request.j.Kg,olympe.dc.Ia.SERVER);return a.Kb.request(b).then(c=>{a.D.nd(c)})}
750
750
  function Ki(a,b){const c=b.jb();if(c===olympe.dc.Ia.SELF||a.H&&c===olympe.dc.Ia.SERVER)return Promise.resolve(!0);a=Array.from(a.j.values()).filter(d=>d.Qc(b)).map(d=>new Promise(e=>d.kd(f=>e(!f))));return Promise.all(a).then(d=>d.some(e=>e))}function Ei(a,b,c,d){return u(function*(){var e=b.jb();e=Sf(Sf(new olympe.dc.Request(olympe.dc.Request.j.Tg,e,b),olympe.dc.ma.j.fq,c===olympe.dc.ma.oc.Rg),olympe.dc.ma.j.Ml,null==d?void 0:d.ji);return a.Kb.request(e)})}
751
751
  function Li(a,b,c){const d=[];for(const e of a.j.values())Mi(e,b,c)&&d.push(Ei(a,e.query,olympe.dc.ma.oc.Ck,{}).then(f=>Ii(a,f,olympe.dc.ma.oc.Ck)));return Promise.all(d).then(()=>{})}
752
752
  olympe.dc.query.$v=class{constructor(a,b,c,d,e){this.G=a;this.D=b;this.N=c;this.Kb=d;this.H=e;this.j=new Map;this.F=new Set;Sg(b,()=>Gi(this));Vf(d,olympe.dc.Request.j.ck,f=>{Ii(this,f.content,olympe.dc.ma.oc.wf).catch(g=>this.G.error(`Error while applying data notification on DB: ${g}`))})}executeQuery(a,b,c){const d=this;return u(function*(){const e='boolean'===typeof c.Bc?c.Bc:yield Ki(d,a);if(!e||(null==c?0:c.ji))try{const f=yield Ei(d,a,b,c);e||(yield Ii(d,f,b))}catch(f){return d.G.error(`Error while sending a query to data source ${a.jb()}: ${f}`),
753
753
  null}return Ai(d,a)})}R(a,b,c,d,e,f){const g=c.jb();if(g===olympe.dc.Ia.SELF||b.Bc||this.H&&g===olympe.dc.Ia.SERVER)return e(),null;if(a!==olympe.dc.ma.oc.wf)return Ei(this,c,a,b).then(r=>{var t=r;r instanceof ReadableStream&&(t=(t=d())?r.pipeThrough(t):r);return Ii(this,t,a,b.rj)}).then(e).catch(f),null;let h,k=!1;const l=r=>{h=[];r&&this.G.debug(`Resend subscription ${c.T()} after detection of dead subscription in the remote service`);Ei(this,c,a,b).then(t=>{if(k)return this.G.warn(`Received data result after query subscription ${c.T()} has been destroyed. Could happen with queries observed multiple times successively quickly.`),
754
- Promise.resolve();var v=t;t instanceof ReadableStream&&(v=(v=d())?t.pipeThrough(v):t);return Ii(this,v,a,b.rj).then(()=>{h.forEach(x=>Ii(this,x,a))}).finally(()=>{h=null})}).then(e).catch(f)},n=c.T();l(!1);const p=Sf(new olympe.dc.Request(olympe.dc.Request.j.Gk,g,c),olympe.dc.ma.j.Ml,null==b?void 0:b.ji),q=this.Kb.subscribe(p,l.bind(this,!0)).pipe(tb(olympe.error.Np,()=>{},0)).pipe(tb(olympe.error.Go,(r,t)=>{this.G.debug(`Data Provider: Subscribe to topic ${r.T()} now that we are back online, after waiting for ${t}ms`);
754
+ Promise.resolve();var v=t;t instanceof ReadableStream&&(v=(v=d())?t.pipeThrough(v):t);return Ii(this,v,a,b.rj).then(()=>{h.forEach(x=>Ii(this,x,a))}).finally(()=>{h=null})}).then(e).catch(f)},n=c.T();l(!1);const p=Sf(new olympe.dc.Request(olympe.dc.Request.j.Gk,g,c),olympe.dc.ma.j.Ml,null==b?void 0:b.ji),q=this.Kb.subscribe(p,l.bind(this,!0)).pipe(tb(olympe.error.Np,()=>{},0)).pipe(tb(olympe.error.Ho,(r,t)=>{this.G.debug(`Data Provider: Subscribe to topic ${r.T()} now that we are back online, after waiting for ${t}ms`);
755
755
  l(!0)},0)).subscribe(rxjs.Subscriber.create(r=>{Array.isArray(h)?h.push(r):Ii(this,r,a)},r=>{this.G.error(`An error occurred with the subscription ${n}: ${r}`);f(String(r))}));return()=>{k=!0;this.G.debug(`Unsubscribe to query ${n} from data source ${g}`);q.unsubscribe()}}};function Ni(a){const b=olympe.dc.ha();let c=!1;const d=a.k.map(e=>{const f=e.split('.').map(g=>b.Ja(g)?olympe.dc.CloudObject.get(g):(olympe.ia.Ya('dc.query').error(`CloudObject with tag ${g} not present but required for deserialization`),c=!0,null));return[e,1===f.length?f[0]:f]});return c?null:olympe.dc.Ka.create(d,a.a,a.r)}
756
756
  olympe.dc.Ka=class{constructor(){this.j=[];this.D=new Map;this.F=[];this.H=[];this.hash=''}static empty(){return new olympe.dc.Ka}[Symbol.iterator](){let a=0;return{next:()=>{var b={done:!0};a<this.j.length&&(b=this.j[a],b={value:[b,this.D.get(b)],done:!1},a++);return b}}}entries(){return this.j.map(a=>[a,this.D.get(a)])}values(){return this.D.values()}keys(){return this.j.values()}Ue(){return this.j.map(a=>this.D.get(a))}size(){return this.j.length}has(a){return this.D.has(a)||this.Ue().includes(a)}indexOf(a){return null===
757
757
  a||void 0===a?-1:'string'===typeof a?this.j.indexOf(a):this.Ue().indexOf(a)}get(a){return(a=this.D.get(a))?a:null}Ic(){return this.qe(0)}qe(a){return a<this.j.length?this.D.get(this.j[a]):null}push(...a){const b=this.Ue();b.push(...a);return b}pop(){if(0===this.j.length)return[];const a=this.Ue();a.pop();return a}shift(){if(0<this.j.length){const a=this.Ue();a.shift();return a}return[]}filter(a){return this.Ue().filter(a)}find(a){return(a=this.Ue().find(a))?a:null}forEach(a){this.j.forEach((b,c)=>
@@ -768,55 +768,56 @@ function Si(a){const b=a.query.T(),c=new Map,d=q=>{const r=c.get(q);return r?1==
768
768
  function Ui(a){const b=a.Ha(a.query,a.Wa.bind(a),()=>{null===a.D||a.gb()||Si(a)},d=>{a.gb()||(a.G.error(`Error while getting data from data source (${a.query.jb()}) to ensure coverage of the query ${a.query.T()}: ${d}`),Ti(a))});let c;b&&(null==(c=a.Y)||c.push(b))}function Vi(a,b){a.N.delete(b);0===a.N.size&&(a.N=null,Promise.resolve().then(()=>{!a.gb()&&Ui(a)}))}function Ti(a){const b=a.D;a.D=null;null==b||b.forEach(c=>c())}
769
769
  olympe.dc.query.lr=class{constructor(a,b,c,d,e){this.G=a;this.ta=b;this.db=b.view;this.query=c;this.md=d;this.j=new olympe.dc.query.dr(this.G,c);this.$=0;this.ea=1;this.Y=[];this.H=new Map;this.D=[()=>si(this.j)];this.Ha=e;this.ja=new Wi(a,this.db,c,this.j);this.F=this.N=null;this.R=[]}start(a){return Ri(this,a,b=>{0<b.length?(this.N=new Set(b),this.N.forEach(c=>{null===c.F&&(c.F=new Set);c.F.add(this)}),Si(this)):Ui(this)})}Qc(a){return!this.gb()&&this.query.jb()===a.jb()&&(this.query.T()===a.T()||
770
770
  (null===this.D||this.query.D===a.D)&&this.j.Qc(a))}kd(a){null!==this.D?this.D.push(a):a();return this}destroy(a){a?this.G.error(`Destroy subscription ${this.query.T()} after error: ${a}`):this.G.debug(`Destroy subscription ${this.query.T()}`);const b=this.Y;this.Y=null;this.H.forEach(e=>a?e.error(a):e.complete());let c;null==(c=this.F)||c.forEach(e=>Vi(e,this));let d;null==(d=this.N)||d.forEach(e=>{e.F.delete(this);0===e.F.size&&(e.F=null)});b.forEach(e=>e())}gb(){return null===this.Y}Wa(){const a=
771
- olympe.dc.ma.oc.Rg;if(this.md===a)return olympe.V.stream.tap(c=>{c=c.jl().filter(d=>d.o===olympe.dc.Nc.j).map(d=>d.t);this.ta.oe(c,'Batch mode')});let b;if(0<(null==(b=this.R)?void 0:b.length)){const c=this.R.filter(e=>e.md===a).map(e=>new Promise(f=>e.kd(f))),d=this.R.filter(e=>e.md!==a).map(e=>new Promise(f=>e.kd(f)));this.R=void 0;return new TransformStream({start:()=>Promise.all(c),flush:()=>Promise.all(d)})}return null}};function Xi(a,b){return a.F.has(Qi+b)||a.F.has(Pi+b)}
772
- class Wi{constructor(a,b,c,d){this.G=a;this.db=b;this.H=d;this.R=[];this.N=-1<c.j.max||0<c.j.offset;this.F=new Map;this.j=!1;const e=new Map;for(const f of ii(c)){a=f.T();this.R.push(a);if(f instanceof olympe.dc.query.oa.Xh){a=f.relation;a=`${a.La()}${a.X()}`;let g;b=null!=(g=this.F.get(a))?g:[];b.push(f);this.F.set(a,b)}Yi(f).forEach(g=>{let h;const k=null!=(h=e.get(g))?h:[];k.push(f.T());e.set(g,k)})}this.properties=Array.from(e.entries())}flush(){const a=this.j;this.j=!1;return a}Rc(){}Yc(a,b){if(!(this.j||
771
+ olympe.dc.ma.oc.Rg;if(this.md===a)return olympe.V.stream.tap(c=>{c=c.jl().filter(e=>e.o===olympe.dc.Nc.j).map(e=>e.t);this.ta.oe(c,'Batch mode');const d=ii(this.query)[0];d instanceof olympe.dc.query.na.im&&c.forEach(e=>oi(this.j,e,d.T(),d.j))});let b;if(0<(null==(b=this.R)?void 0:b.length)){const c=this.R.filter(e=>e.md===a).map(e=>new Promise(f=>e.kd(f))),d=this.R.filter(e=>e.md!==a).map(e=>new Promise(f=>e.kd(f)));this.R=void 0;return new TransformStream({start:()=>Promise.all(c),flush:()=>Promise.all(d)})}return null}};
772
+ function Xi(a,b){return a.F.has(Qi+b)||a.F.has(Pi+b)}
773
+ class Wi{constructor(a,b,c,d){this.G=a;this.db=b;this.H=d;this.R=[];this.N=-1<c.j.max||0<c.j.offset;this.F=new Map;this.j=!1;const e=new Map;for(const f of ii(c)){a=f.T();this.R.push(a);if(f instanceof olympe.dc.query.na.Xh){a=f.relation;a=`${a.La()}${a.X()}`;let g;b=null!=(g=this.F.get(a))?g:[];b.push(f);this.F.set(a,b)}Yi(f).forEach(g=>{let h;const k=null!=(h=e.get(g))?h:[];k.push(f.T());e.set(g,k)})}this.properties=Array.from(e.entries())}flush(){const a=this.j;this.j=!1;return a}Rc(){}Yc(a,b){if(!(this.j||
773
774
  !this.N&&this.db.Ja(a))){var c;this.j||(this.j=null==(c=this.properties)?void 0:c.some(([d,e])=>b.has(d)&&ni(this.H,a,e)))}}D(a){this.j||this.db.Ja(a)&&!this.N||this.j||(this.j=this.R.some(b=>ni(this.H,a,b)))}Pa(a,b,c){if(!this.j&&Xi(this,a)){var d=this.db.Ja(b),e=this.db.Ja(c);if(d&&!e||!d&&e){const f=this.F.get(Qi+a);a=this.F.get(Pi+a);this.j||(this.j=d&&(null==f?void 0:f.some(g=>ni(this.H,b,g.j)))||e&&(null==a?void 0:a.some(g=>ni(this.H,c,g.j))))}}}ic(a,b,c){if(!this.j&&this.N&&Xi(this,a)&&this.db.bt(b,
774
775
  new olympe.dc.Sa.Relation(a),c)){const d=this.F.get(Qi+a);a=this.F.get(Pi+a);const e=this.H;this.j||(this.j=(null==d?void 0:d.some(f=>ni(e,b,f.j)&&ni(e,c,f.T())))||(null==a?void 0:a.some(f=>ni(e,c,f.j)&&ni(e,b,f.T()))))}}}olympe.dc.query.lr.za=[olympe.dc.Writable];function Zi(a){return new olympe.dc.query.Relation(a.tag,a.direction,!0)}
775
776
  olympe.dc.query.Relation=class extends olympe.dc.Sa.Relation{constructor(a,b,c){super(a,b);this.recursive=c}toJSON(){let a='{ "tag": '+JSON.stringify(this.X())+', ';a+='"direction": '+JSON.stringify(this.La())+', ';a+='"recursive": '+JSON.stringify(this.recursive);return a+'}'}static Qb(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,b){return new olympe.dc.query.Relation(a.X(),a.La(),null!=b?b:a instanceof olympe.dc.ba.Ke)}$b(){const a=
776
777
  olympe.dc.va.DESTINATION,b=olympe.dc.va.ORIGIN;return new olympe.dc.query.Relation(this.tag,this.direction===a?b:a,this.recursive)}T(){return`${this.direction}${this.tag}${this.recursive?'-r':''}`}};olympe.dc.query.P={Da:'dc.query.Logger',Fk:'dc.query.QueryProcessor'};olympe.W.config(function(a){D(a,olympe.dc.query.P.Da,[olympe.ia.P.Ea],b=>b.cd('query'));C(a,olympe.dc.query.P.Fk,olympe.dc.query.$v,olympe.dc.query.P.Da,olympe.dc.db.P.Ea,olympe.dc.transaction.P.Ea,olympe.dc.P.Vg,new olympe.W.pa(olympe.dc.U.Zh))});olympe.W.run([olympe.dc.query.P.Fk],a=>{olympe.dc.query.ml=()=>a});olympe.dc.query.Dd=class extends Error{};olympe.dc.query.Z={};olympe.dc.query.Z.Od=class extends olympe.dc.query.Ba{constructor(...a){super();this.Z=a}compile(){return this.Z.reduce((a,b)=>{const c=[];for(const d of b.compile()){for(const e of a)d.push(...e);c.push(d)}return c},[])}Ad(){return new olympe.dc.query.Z.Fe(...this.Z.map(a=>a.Ad()))}Cb(){return this.Z.flatMap(a=>a.Cb())}Qc(){throw Error('Should not try to check predicate coverage on And (should be removed by compiling predicates');}ob(a){return this.Z.reduce((b,c)=>b&&c.ob(a),!0)}observe(a,b,c){const d=
777
- Array(this.Z.length).fill(!1);let e=null;const f=(g,h)=>{d[g]=h;g=d.every(k=>k);e!==g&&(e=g,c(g))};this.Z.forEach((g,h)=>{g.observe(a,olympe.V.ub('AND-'+b+a+h),f.bind(null,h))})}ga(){return{pr:olympe.dc.query.Ba.j.fo,p:this.Z.map(a=>a.ga())}}Xc(){throw Error('toObject for AND predicate should not be called');}toString(){return'And-'+this.Z.reduce((a,b)=>a+'-'+b.toString(),'')}clear(a,b){this.Z.forEach((c,d)=>{c.clear(a,olympe.V.ub('AND-'+b+a+d))})}};olympe.dc.query.Z.yf=class extends olympe.dc.query.Ba{constructor(a,b,c,d=!1){super();this.Ma=olympe.dc.fa(a);this.substring=b;this.db=c;this.j=d}Cb(){return[this.Ma]}Qc(a,b){return a instanceof olympe.dc.query.Z.yf&&a.Ma===this.Ma?b?a.j?a.substring.toLowerCase().includes(this.substring.toLowerCase()):a.substring.includes(this.substring):this.j?this.substring.toLowerCase().includes(a.substring.toLowerCase()):this.substring.includes(a.substring):!1}Ra(){return this.Ma}ob(a){return this.apply(this.db.Ra(a,
778
+ Array(this.Z.length).fill(!1);let e=null;const f=(g,h)=>{d[g]=h;g=d.every(k=>k);e!==g&&(e=g,c(g))};this.Z.forEach((g,h)=>{g.observe(a,olympe.V.ub('AND-'+b+a+h),f.bind(null,h))})}ga(){return{pr:olympe.dc.query.Ba.j.ho,p:this.Z.map(a=>a.ga())}}Xc(){throw Error('toObject for AND predicate should not be called');}toString(){return'And-'+this.Z.reduce((a,b)=>a+'-'+b.toString(),'')}clear(a,b){this.Z.forEach((c,d)=>{c.clear(a,olympe.V.ub('AND-'+b+a+d))})}};olympe.dc.query.Z.yf=class extends olympe.dc.query.Ba{constructor(a,b,c,d=!1){super();this.Ma=olympe.dc.fa(a);this.substring=b;this.db=c;this.j=d}Cb(){return[this.Ma]}Qc(a,b){return a instanceof olympe.dc.query.Z.yf&&a.Ma===this.Ma?b?a.j?a.substring.toLowerCase().includes(this.substring.toLowerCase()):a.substring.includes(this.substring):this.j?this.substring.toLowerCase().includes(a.substring.toLowerCase()):this.substring.includes(a.substring):!1}Ra(){return this.Ma}ob(a){return this.apply(this.db.Ra(a,
778
779
  this.Ma))}observe(a,b,c){gh(this.db,a,this.Ma,d=>{c(this.apply(d))},olympe.V.ub(b+a+this.toString()))}apply(a){a=olympe.dc.nb.Cc(a);return'string'===typeof a?this.j?a.includes(this.substring):a.toLowerCase().includes(this.substring.toLowerCase()):!1}toString(){return'Contains'+this.Ma+'-'+this.substring+'-'+this.j}clear(a,b){hh(this.db,a,this.Ma,olympe.V.ub(b+a+this.toString()))}Xc(){return{name:'CONTAINS',property:this.Ra(),value:this.substring,caseSensitive:this.j}}ga(){return{pr:olympe.dc.query.Ba.j.Zj,
779
780
  p:this.Ma,s:this.substring,c:this.j}}};olympe.dc.query.Z.Be=class extends olympe.dc.query.Ba{constructor(a,b,c){super();this.Ma=olympe.dc.fa(a);this.j=olympe.dc.nb.Cc(null!=b?b:null);this.db=c}Cb(){return[this.Ma]}Qc(a){if(a instanceof olympe.dc.query.Z.Be&&this.Ma===a.Ma)if('object'===typeof this.j&&null!==this.j){if(this.j instanceof olympe.dc.CloudObject)return this.j.Fa(a.j);if(this.j instanceof Date)return a.j instanceof Date&&this.j.getTime()===a.j.getTime();if(this.j instanceof olympe.C.Color)return this.j.Fa(a.j)}else return this.j===
780
781
  a.j;return!1}ob(a){return this.apply(this.db.Ra(a,this.Ma))}observe(a,b,c){gh(this.db,a,this.Ma,d=>{c(this.apply(d))},olympe.V.ub(b+a+this.toString()));null===this.j&&null===this.db.Ra(a,this.Ma)&&c(!0)}clear(a,b){hh(this.db,a,this.Ma,olympe.V.ub(b+a+this.toString()))}apply(a){a=olympe.dc.nb.Cc(a);return'object'===typeof a&&null!==a?a instanceof olympe.dc.CloudObject?a.Fa(this.j):a instanceof Date?this.j instanceof Date&&this.j.getTime()===a.getTime():a instanceof olympe.C.Color?a.Fa(this.j):!1:a===
781
- this.j}toString(){let a,b;const c=null!=(b=null==(a=this.j)?void 0:a.toString())?b:'null';return'Equals-'+this.Ma+'-'+c}Xc(){return{name:'EQUALS',property:this.Ma,value:this.j}}ga(){let a=1,b=this.j;switch(!0){case this.j instanceof Date:a=2;b=this.j.toJSON();break;case this.j instanceof olympe.dc.CloudObject:a=3;b=this.j.X();break;case this.j instanceof olympe.C.Color:a=4,b=this.j.toJSON()}return{pr:olympe.dc.query.Ba.j.np,p:this.Ma,t:a,v:b}}};function $i(a,b,c){return olympe.V.ub(c+b+a.j+a.Ma)}
782
+ this.j}toString(){let a,b;const c=null!=(b=null==(a=this.j)?void 0:a.toString())?b:'null';return'Equals-'+this.Ma+'-'+c}Xc(){return{name:'EQUALS',property:this.Ma,value:this.j}}ga(){let a=1,b=this.j;switch(!0){case this.j instanceof Date:a=2;b=this.j.toJSON();break;case this.j instanceof olympe.dc.CloudObject:a=3;b=this.j.X();break;case this.j instanceof olympe.C.Color:a=4,b=this.j.toJSON()}return{pr:olympe.dc.query.Ba.j.op,p:this.Ma,t:a,v:b}}};function $i(a,b,c){return olympe.V.ub(c+b+a.j+a.Ma)}
782
783
  olympe.dc.query.Z.Ti=class extends olympe.dc.query.Ba{constructor(a,b,c,d=!0,e=!0){super();this.db=a;this.Ma=olympe.dc.fa(b);this.j=(this.F=('object'===typeof c||'string'===typeof c)&&olympe.dc.CloudObject.exists(c))?olympe.dc.fa(c):c;this.D=d;this.H=e}Ad(){return new olympe.dc.query.Z.Ti(this.db,this.Ma,this.j,!this.D,!this.H)}Cb(){return[this.Ma]}Qc(a,b){if(b)throw Error('Check coverage of inequality should not happen with opposite = true');return a instanceof olympe.dc.query.Z.Ti&&this.Ma===a.Ma?
783
784
  typeof this.j!==typeof a.j||this.D!==a.D?!1:this.F?this.j===a.j:this.D&&this.j>=a.j||!this.D&&this.j<=a.j:!1}Ra(){return this.Ma}ob(a){return this.compare(this.db.Ra(a,this.Ma),this.F?this.db.Ra(a,this.j):this.j)}observe(a,b,c){this.F&&gh(this.db,a,this.j,d=>{const e=this.db.Ra(a,this.Ma);null!==e&&c(this.compare(e,d))},$i(this,a,b));gh(this.db,a,this.Ma,d=>{const e=this.F?this.db.Ra(a,this.j):this.j;c(null!==e?this.compare(d,e):!0)},$i(this,a,b))}compare(a,b){return null===a?!1:null===b?!0:this.H?
784
785
  this.D?a<b:a>b:this.D?a<=b:a>=b}clear(a,b){hh(this.db,a,this.Ma,$i(this,a,b));this.F&&hh(this.db,a,this.j,$i(this,a,b))}Xc(){return{name:'INEQUALITY_OPERATOR',property:this.Ra(),operator:this.D?'<':'>',strict:this.H,value:this.j}}ga(){return{pr:olympe.dc.query.Ba.j.Yp,p:this.Ma,b:this.j,l:this.D,s:this.H}}toString(){return(this.D?'LowerThan-':'GreaterThan-')+this.Ma+'-'+this.H+'-'+this.j}};olympe.dc.query.Z.je=class extends olympe.dc.query.Ba{constructor(a){super();this.j=a}compile(){const a=this.j.Ad();return this.Fa(a)?super.compile():a.compile()}Ad(){return this.j}Cb(){return this.j.Cb()}Qc(a,b){return a instanceof olympe.dc.query.Z.je?this.j.Qc(a.j,b):this.j.Qc(a,!b)}ob(a){return!this.j.ob(a)}observe(a,b,c){let d=null;this.j.observe(a,olympe.V.ub('NOT'+b+a),e=>{!e!==d&&(d=!e,c(d))})}Xc(){return{name:'NOT',predicate:this.j.Xc()}}ga(){return{pr:olympe.dc.query.Ba.j.Aq,v:this.j.ga()}}toString(){return`NOT-${this.j.toString()}`}clear(a,
785
786
  b){this.j.clear(a,olympe.V.ub('NOT'+b+a))}Fa(a){return a instanceof olympe.dc.query.Z.je?this.j.Fa(a.j):!1}};olympe.dc.query.Z.Fe=class extends olympe.dc.query.Ba{constructor(...a){super();this.Z=a}compile(){return this.Z.map(a=>a.compile()).flat()}Ad(){return new olympe.dc.query.Z.Od(...this.Z.map(a=>a.Ad()))}Cb(){return this.Z.flatMap(a=>a.Cb())}Qc(){throw Error('Should not try to check predicate coverage on And (should be removed by compiling predicates');}ob(a){return this.Z.reduce((b,c)=>b||c.ob(a),!1)}observe(a,b,c){const d=Array(this.Z.length).fill(!1);let e=null;const f=(g,h)=>{d[g]=h;g=d.some(k=>
786
787
  k);e!==g&&(e=g,c(g))};this.Z.forEach((g,h)=>{g.observe(a,olympe.V.ub('OR-'+b+a+h),f.bind(null,h))})}Xc(){throw Error('toObject for OR predicate should not be called');}ga(){return{pr:olympe.dc.query.Ba.j.Sq,p:this.Z.map(a=>a.ga())}}toString(){return'And-'+this.Z.reduce((a,b)=>a.toString()+'-'+b.toString(),'')}clear(a,b){this.Z.forEach((c,d)=>{c.clear(a,olympe.V.ub('OR-'+b+a+d))})}};olympe.dc.query.Z.Hf=class extends olympe.dc.query.Ba{constructor(a,b,c,d=!0){super();this.Ma=olympe.dc.fa(a);this.j='string'===typeof b?new RegExp(d?b:b.toLowerCase()):d?b:new RegExp(b.source.toLowerCase());this.db=c;this.D=d}Cb(){return[this.Ma]}Qc(a){return a instanceof olympe.dc.query.Z.Hf&&this.Ma===a.Ma&&this.j.toString()===a.j.toString()}ob(a){return this.apply(this.db.Ra(a,this.Ma))}observe(a,b,c){gh(this.db,a,this.Ma,d=>{c(this.apply(d))},olympe.V.ub(b+a+this.toString()))}apply(a){a=olympe.dc.nb.Cc(a);
787
- return'string'===typeof a?(a=this.j.test(this.D?a:a.toLowerCase()),this.j.lastIndex=0,a):!1}toString(){return'Regex'+this.Ma+'-'+this.j.toString()+'-'+this.D}Xc(){return{name:'REGEX',property:this.Ma,pattern:this.j,caseSensitive:this.D}}ga(){return{pr:olympe.dc.query.Ba.j.nr,p:this.Ma,r:this.j.source,c:this.D}}clear(a,b){hh(this.db,a,this.Ma,olympe.V.ub(b+a+this.toString()))}};olympe.dc.query.Z.an=class extends olympe.dc.query.Ba{constructor(a){super();this.j=new Set(a.map(olympe.dc.fa))}Cb(){return[]}Qc(a){return a instanceof olympe.dc.query.Z.an&&Array.from(a.j).every(b=>this.j.has(b))}ob(a){return this.j.has(a)}observe(a,b,c){c(this.j.has(a))}clear(){}toString(){return'Tags-'+Array.from(this.j)}Xc(){return{name:'IS',tags:Array.from(this.j)}}ga(){return{pr:olympe.dc.query.Ba.j.Wr,t:Array.from(this.j)}}};olympe.dc.query.oa={};function Yi(a){let b,c;const d=new Set(null!=(c=null==(b=a.D)?void 0:b.Cb())?c:[]);let e;a.Hb&&d.add(null==(e=a.Hb)?void 0:e.Ra().X());return d}function aj(a){if(!a.ea){let b,c;a.ea=null!=(c=null==(b=a.D)?void 0:b.compile())?c:[]}return a.ea}function bj(a,b){for(const c of b)if(a.some(d=>d.Qc(c,!1)))return!0;return!1}
788
+ return'string'===typeof a?(a=this.j.test(this.D?a:a.toLowerCase()),this.j.lastIndex=0,a):!1}toString(){return'Regex'+this.Ma+'-'+this.j.toString()+'-'+this.D}Xc(){return{name:'REGEX',property:this.Ma,pattern:this.j,caseSensitive:this.D}}ga(){return{pr:olympe.dc.query.Ba.j.nr,p:this.Ma,r:this.j.source,c:this.D}}clear(a,b){hh(this.db,a,this.Ma,olympe.V.ub(b+a+this.toString()))}};olympe.dc.query.Z.bn=class extends olympe.dc.query.Ba{constructor(a){super();this.j=new Set(a.map(olympe.dc.fa))}Cb(){return[]}Qc(a){return a instanceof olympe.dc.query.Z.bn&&Array.from(a.j).every(b=>this.j.has(b))}ob(a){return this.j.has(a)}observe(a,b,c){c(this.j.has(a))}clear(){}toString(){return'Tags-'+Array.from(this.j)}Xc(){return{name:'IS',tags:Array.from(this.j)}}ga(){return{pr:olympe.dc.query.Ba.j.Wr,t:Array.from(this.j)}}};olympe.dc.query.na={};function Yi(a){let b,c;const d=new Set(null!=(c=null==(b=a.D)?void 0:b.Cb())?c:[]);let e;a.Hb&&d.add(null==(e=a.Hb)?void 0:e.Ra().X());return d}function aj(a){if(!a.ea){let b,c;a.ea=null!=(c=null==(b=a.D)?void 0:b.compile())?c:[]}return a.ea}function bj(a,b){for(const c of b)if(a.some(d=>d.Qc(c,!1)))return!0;return!1}
788
789
  function cj(a,b){if(null===a.D)return b;let c=!1;const d=a.toString();return(e,f,g,h)=>{const k=olympe.V.ub(h+f+d);e?a.D.observe(f,k,l=>{c||b(l,f,g,k)}):(c=!0,a.D.clear(f,k),c=!1,b(!1,f,g,k))}}function dj(a,b,c){if(null===a.Hb)return c;const d=a.toString();return(e,f,g,h)=>{const k=a.Hb.Ra();h=olympe.V.ub(h+d);e?gh(a.db,f,k,()=>{li(b)},h):hh(a.db,f,k,h);c(e,f,g,h)}}
789
- olympe.dc.query.oa.Om=class{constructor(a,b){this.db=olympe.dc.ha();this.j=a;this.optional=b;this.ea=this.Hb=this.D=this.id=null}static j(a){var b=a.i;if('string'===typeof a.f)return new olympe.dc.query.oa.Pd(b,a.f);var c=a.o;const d=new olympe.dc.Sa.Relation(a.t,a.d);b='boolean'===typeof a.s?new olympe.dc.query.oa.Ce(b,d,a.s,c):new olympe.dc.query.oa.Ih(b,d,c);void 0!==a.p&&(b.D=ui(a.p));void 0!==a.c&&(c=b.T(),a=a.c,a=new olympe.dc.query.xf(c,new olympe.dc.Sa.Property(a.p),a.o),b.Hb=a);return b}N(){}H(){let a,
790
- b,c,d;return`${this.j}-${this.optional}${null!=(c=null==(a=this.D)?void 0:a.toString())?c:''}${null!=(d=null==(b=this.Hb)?void 0:b.toString())?d:''}`}Xc(){}toJSON(){}ga(){const a={i:this.j,o:this.optional};null!==this.D&&(a.p=this.D.ga());null!==this.Hb&&(a.c=this.Hb.ga());return a}Y(){}ja(){return new olympe.dc.query.oa.Ym}$(){}T(){this.id||(this.id=this.Y());return this.id}R(){return this.optional}Qc(a){const b=aj(this);if(0===b.length)return!0;a=aj(a);if(0===a.length)return!1;for(const c of a)if(!b.some(d=>
790
+ olympe.dc.query.na.Pm=class{constructor(a,b){this.db=olympe.dc.ha();this.j=a;this.optional=b;this.ea=this.Hb=this.D=this.id=null}static j(a){var b=a.i;if('string'===typeof a.f)return new olympe.dc.query.na.Pd(b,a.f);var c=a.o;const d=new olympe.dc.Sa.Relation(a.t,a.d);b='boolean'===typeof a.s?new olympe.dc.query.na.Ce(b,d,a.s,c):new olympe.dc.query.na.Ih(b,d,c);void 0!==a.p&&(b.D=ui(a.p));void 0!==a.c&&(c=b.T(),a=a.c,a=new olympe.dc.query.xf(c,new olympe.dc.Sa.Property(a.p),a.o),b.Hb=a);return b}N(){}H(){let a,
791
+ b,c,d;return`${this.j}-${this.optional}${null!=(c=null==(a=this.D)?void 0:a.toString())?c:''}${null!=(d=null==(b=this.Hb)?void 0:b.toString())?d:''}`}Xc(){}toJSON(){}ga(){const a={i:this.j,o:this.optional};null!==this.D&&(a.p=this.D.ga());null!==this.Hb&&(a.c=this.Hb.ga());return a}Y(){}ja(){return new olympe.dc.query.na.Zm}$(){}T(){this.id||(this.id=this.Y());return this.id}R(){return this.optional}Qc(a){const b=aj(this);if(0===b.length)return!0;a=aj(a);if(0===a.length)return!1;for(const c of a)if(!b.some(d=>
791
792
  bj(d,c)))return!1;return!0}filter(a){const b=this.N(),c=b.D;null===c?b.D=a:b.D=c instanceof olympe.dc.query.Z.Od?new olympe.dc.query.Z.Od(...Array.from(c.Z),a):new olympe.dc.query.Z.Od(b.D,a);return b}sort(a,b){const c=this.N();c.Hb=new olympe.dc.query.xf(this.T(),a,b);return c}kh(){return this.Hb}ob(a){if(null!==this.D){var b=this.T();for(const c of mi(a,b))this.D.ob(c)||a.remove(c,b,null)}}observe(a,b){const c=this.T();return cj(this,dj(this,a,(d,e,f,g)=>{(d?oi(a,e,c,f):a.remove(e,c,f))&&b(d,e,
792
- f,g)}))}Fa(){}};olympe.dc.query.oa.Xh=class extends olympe.dc.query.oa.Om{constructor(a,b,c){super(a,c);this.relation=b;this.ta=null}};olympe.dc.query.oa.Pm=class{has(){}H(){}j(){}Uc(){}D(){}remove(){}};olympe.dc.query.oa.Pd=class extends olympe.dc.query.oa.Om{constructor(a,b,c){super(a,!1);this.Pb=b;this.F=null!=c?c:null}N(){return new olympe.dc.query.oa.Pd(this.j,this.Pb,this.F)}Y(){return olympe.V.ub(this.j+'followRules')}ja(){return new olympe.dc.query.oa.gq(this.db,this.F)}$(a,b){return b instanceof olympe.dc.query.oa.Pd?[a]:[olympe.V.ub(a+'followRules')]}Qc(a){if(a instanceof olympe.dc.query.oa.Xh){const b=olympe.dc.va.ORIGIN,c=olympe.dc.va.DESTINATION,d=olympe.dc.hc.$c,e=olympe.dc.hc.Li,f=
793
- olympe.dm.Relation.j.vr,g=olympe.dm.Relation.j.bs;a=a.relation;const h=a.La(),k=a.X();return h!==c||k!==d&&k!==e?!!(ph(this.db,a,this.Pb)&(a.La()===b?f:g)):!0}return a instanceof olympe.dc.query.oa.Pd?this.Pb===a.Pb:!1}ob(a){const b=this.T();for(const c of mi(a,this.j))for(const d of lg(this.db,c,this.Pb))oi(a,d,b,c)}observe(a,b){const c=this.T(),d=(e,f,g,h)=>{const k=`${h}:${g}`;f?qh(this.db,g,this.Pb,(l,n,p,q,r)=>{p&&(p=q?oi(a,r,c,g):a.remove(r,c,g),null!==n&&pi(a,q,l,n,g,r),p&&d(e,q,r,h))},k):
794
- rh(this.db,g,this.Pb,k);b(f,g,e,k)};return(e,f,g,h)=>{(e?oi(a,f,c,f):a.remove(f,c,f))&&d(f,e,f,olympe.V.ub(h+f+this.toString()))}}ga(){return Object.assign(super.ga(),{f:this.Pb})}H(){return`followRulePart-${this.Pb}-${super.H()}`}Xc(){throw Error('Try to parse a part of an implicit query. Data connectors do not support those queries.');}toString(){return`FollowRule Part: ${this.db.name(this.Pb)} (${this.Pb})`}Fa(a){return a instanceof olympe.dc.query.oa.Pd&&this.Pb===a.Pb}toJSON(){return{type:'follow rule',
795
- rule:`${this.db.name(this.Pb)} (${this.Pb})`}}R(){return!1}filter(){olympe.ia.Ya('dc.query').warn('Should never try to filter on queries with follow rules, ignore...');return this}sort(){olympe.ia.Ya('dc.query').warn('Should never try to sort queries with follow rules, ignore...');return this}};olympe.dc.query.oa.Pd.D='followRules';olympe.dc.query.oa.Ih=class extends olympe.dc.query.oa.Xh{constructor(a,b,c){super(a,olympe.dc.query.Relation.from(b,!1),c)}N(){const a=new olympe.dc.query.oa.Ih(this.j,this.relation,this.optional);a.D=this.D;a.Hb=this.Hb;return a}Y(){return olympe.V.ub(this.j+this.relation.T())}$(a,b){if(b instanceof olympe.dc.query.oa.Pd)return[a];const c=[a+this.relation.T(),a+Zi(this.relation).T()+!1,a+Zi(this.relation).T()+!0,a+'followRules'].map(d=>olympe.V.ub(d));b instanceof olympe.dc.query.oa.Ce&&b.relation.Fa(this.relation)&&
793
+ f,g)}))}Fa(){}};olympe.dc.query.na.Xh=class extends olympe.dc.query.na.Pm{constructor(a,b,c){super(a,c);this.relation=b;this.ta=null}};olympe.dc.query.na.Qm=class{has(){}H(){}j(){}Uc(){}D(){}remove(){}};olympe.dc.query.na.Pd=class extends olympe.dc.query.na.Pm{constructor(a,b,c){super(a,!1);this.Pb=b;this.F=null!=c?c:null}N(){return new olympe.dc.query.na.Pd(this.j,this.Pb,this.F)}Y(){return olympe.V.ub(this.j+'followRules')}ja(){return new olympe.dc.query.na.gq(this.db,this.F)}$(a,b){return b instanceof olympe.dc.query.na.Pd?[a]:[olympe.V.ub(a+'followRules')]}Qc(a){if(a instanceof olympe.dc.query.na.Xh){const b=olympe.dc.va.ORIGIN,c=olympe.dc.va.DESTINATION,d=olympe.dc.hc.$c,e=olympe.dc.hc.Li,f=
794
+ olympe.dm.Relation.j.vr,g=olympe.dm.Relation.j.bs;a=a.relation;const h=a.La(),k=a.X();return h!==c||k!==d&&k!==e?!!(ph(this.db,a,this.Pb)&(a.La()===b?f:g)):!0}return a instanceof olympe.dc.query.na.Pd?this.Pb===a.Pb:!1}ob(a){const b=this.T();for(const c of mi(a,this.j))for(const d of lg(this.db,c,this.Pb))oi(a,d,b,c)}observe(a,b){const c=this.T(),d=(e,f,g,h)=>{const k=`${h}:${g}`;f?qh(this.db,g,this.Pb,(l,n,p,q,r)=>{p&&(p=q?oi(a,r,c,g):a.remove(r,c,g),null!==n&&pi(a,q,l,n,g,r),p&&d(e,q,r,h))},k):
795
+ rh(this.db,g,this.Pb,k);b(f,g,e,k)};return(e,f,g,h)=>{(e?oi(a,f,c,f):a.remove(f,c,f))&&d(f,e,f,olympe.V.ub(h+f+this.toString()))}}ga(){return Object.assign(super.ga(),{f:this.Pb})}H(){return`followRulePart-${this.Pb}-${super.H()}`}Xc(){throw Error('Try to parse a part of an implicit query. Data connectors do not support those queries.');}toString(){return`FollowRule Part: ${this.db.name(this.Pb)} (${this.Pb})`}Fa(a){return a instanceof olympe.dc.query.na.Pd&&this.Pb===a.Pb}toJSON(){return{type:'follow rule',
796
+ rule:`${this.db.name(this.Pb)} (${this.Pb})`}}R(){return!1}filter(){olympe.ia.Ya('dc.query').warn('Should never try to filter on queries with follow rules, ignore...');return this}sort(){olympe.ia.Ya('dc.query').warn('Should never try to sort queries with follow rules, ignore...');return this}};olympe.dc.query.na.Pd.D='followRules';olympe.dc.query.na.Ih=class extends olympe.dc.query.na.Xh{constructor(a,b,c){super(a,olympe.dc.query.Relation.from(b,!1),c)}N(){const a=new olympe.dc.query.na.Ih(this.j,this.relation,this.optional);a.D=this.D;a.Hb=this.Hb;return a}Y(){return olympe.V.ub(this.j+this.relation.T())}$(a,b){if(b instanceof olympe.dc.query.na.Pd)return[a];const c=[a+this.relation.T(),a+Zi(this.relation).T()+!1,a+Zi(this.relation).T()+!0,a+'followRules'].map(d=>olympe.V.ub(d));b instanceof olympe.dc.query.na.Ce&&b.relation.Fa(this.relation)&&
796
797
  c.push(a);return c}ob(a){const b=this.T();for(const c of mi(a,this.j))this.db.cb(c,this.relation).forEach(d=>{oi(a,d,b,c)});super.ob(a)}observe(a,b){const c=super.observe(a,b),d=this.relation.X(),e=this.relation.La(),f=this.toString();return(g,h,k,l)=>{const n=olympe.V.ub(l+h+f);g?T(this.db,h,this.relation,(p,q)=>{pi(a,p,d,e,h,q);c(p,q,h,n)},n):this.db.D(h,this.relation,n)}}ga(){return Object.assign(super.ga(),{t:this.relation.X(),d:this.relation.La()})}H(){return`followPart-${this.relation.T()}-${super.H()}`}Xc(){const a=
797
- {recursive:!1,relation:this.relation,filter:aj(this).map(b=>b.map(c=>c.Xc())),optional:this.R()};this.Hb&&(a.sort={property:this.Hb.Ra(),order:this.Hb.Wi});return a}toString(){return`Follow Part: ${this.relation}`}toJSON(){return{type:'follow',relation:`${this.db.name(this.relation)} (${this.relation.X()})`,direction:this.relation.La()}}Fa(a){return a instanceof olympe.dc.query.oa.Ih&&this.relation.Fa(a.relation)}};olympe.dc.query.oa.Ce=class extends olympe.dc.query.oa.Xh{constructor(a,b,c,d){super(a,olympe.dc.query.Relation.from(b,!0),d);this.F=c}ja(){return new olympe.dc.query.oa.zr}N(){const a=new olympe.dc.query.oa.Ce(this.j,this.relation,this.F,this.optional);a.D=this.D;a.Hb=this.Hb;return a}Y(){return olympe.V.ub(this.j+this.relation.T()+this.F)}$(a,b){if(b instanceof olympe.dc.query.oa.Pd)return[a];const c=[a+this.relation.T()+this.F,a+'followRules'].map(d=>olympe.V.ub(d));b instanceof olympe.dc.query.oa.Ce&&
798
+ {recursive:!1,relation:this.relation,filter:aj(this).map(b=>b.map(c=>c.Xc())),optional:this.R()};this.Hb&&(a.sort={property:this.Hb.Ra(),order:this.Hb.Wi});return a}toString(){return`Follow Part: ${this.relation}`}toJSON(){return{type:'follow',relation:`${this.db.name(this.relation)} (${this.relation.X()})`,direction:this.relation.La()}}Fa(a){return a instanceof olympe.dc.query.na.Ih&&this.relation.Fa(a.relation)}};olympe.dc.query.na.Ce=class extends olympe.dc.query.na.Xh{constructor(a,b,c,d){super(a,olympe.dc.query.Relation.from(b,!0),d);this.F=c}ja(){return new olympe.dc.query.na.zr}N(){const a=new olympe.dc.query.na.Ce(this.j,this.relation,this.F,this.optional);a.D=this.D;a.Hb=this.Hb;return a}Y(){return olympe.V.ub(this.j+this.relation.T()+this.F)}$(a,b){if(b instanceof olympe.dc.query.na.Pd)return[a];const c=[a+this.relation.T()+this.F,a+'followRules'].map(d=>olympe.V.ub(d));b instanceof olympe.dc.query.na.Ce&&
798
799
  b.relation.Fa(this.relation)&&c.push(a);return c}ob(a){const b=this.T();for(const c of mi(a,this.j))this.F&&oi(a,c,b,c),this.db.oh(c,this.relation).forEach(d=>{oi(a,d,b,c)});super.ob(a)}observe(a,b){const c=this.relation.X(),d=this.relation.La(),e=(f,g,h,k)=>{const l=olympe.V.ub(k+g);f?T(this.db,g,this.relation,(n,p)=>{pi(a,n,c,d,g,p);super.observe(a,(q,r,t,v)=>{b(q,r,t,v);e(q,r,t,k)})(n,p,h,l)},l):this.db.D(g,this.relation,l)};return(f,g,h,k)=>{h=k+this.toString();this.F&&super.observe(a,b)(f,g,
799
800
  g,olympe.V.ub(h+g));e(f,g,g,h)}}ga(){return Object.assign(super.ga(),{s:this.F,t:this.relation.X(),d:this.relation.La()})}H(){return`followRecursivelyPart-${this.relation.T()}-${this.F}-${super.H()}`}Xc(){const a={recursive:this.F?'INCLUDE_SELF':'EXCLUDE_SELF',relation:this.relation,filter:aj(this).map(b=>b.map(c=>c.Xc())),optional:this.R()};this.Hb&&(a.sort={property:this.Hb.Ra(),order:this.Hb.Wi});return a}toString(){return`FollowRecursively Part: ${this.relation}`}toJSON(){return{type:'follow recursively',
800
- relation:`${this.db.name(this.relation)} (${this.relation.X()})`,direction:this.relation.La()}}Fa(a){return a instanceof olympe.dc.query.oa.Ce&&this.relation.Fa(a.relation)&&this.F===a.F}};olympe.dc.query.oa.xp=class extends olympe.dc.query.oa.Pd{observe(a,b){const c=this.T();return(d,e,f,g)=>{d?oi(a,e,c,e):a.remove(e,c,e);b(d,e,e,g)}}};olympe.dc.query.oa.gq=class{constructor(a,b){this.db=a;this.origin=null;this.content=new Map;this.F=null!=b?b:null}Uc(){return this.content.keys()}j(a){return this.content.has(a)&&null!==this.origin?[this.origin].values():[].values()}has(a){return this.content.has(a)}H(a){let b;return(null==(b=this.F)?void 0:b.call(this,a))||!1}D(a,b){null===this.origin&&(this.origin=b);const c=this.content.get(a);if(!c)return this.content.set(a,(new Map).set(b,1)),!0;let d;a=null!=(d=c.get(b))?d:0;c.set(b,a+1);return!1}remove(a,
801
- b){a===this.origin&&(this.origin=null);if(null===this.origin||!this.db.Ja(a)||!b)return this.content.delete(a);var c=this.content.get(a);if(!c)return!1;const d=c.get(b);if(1<d)return c.set(b,d-1),!0;b=c.delete(b);if(0===c.size)return this.content.delete(a);if(b){c=new Set(c.keys());for(const e of c){if(this.origin===e)return!0;let f,g;for(const h of null!=(g=null==(f=this.content.get(e))?void 0:f.keys())?g:[])c.add(h)}return this.content.delete(a)}return!1}};olympe.dc.query.oa.gq.za=[olympe.dc.query.oa.Pm];olympe.dc.query.oa.zr=class{constructor(){this.content=new Map}Uc(){return this.content.keys()}j(a){let b,c;return null!=(c=null==(b=this.content.get(a))?void 0:b.keys())?c:[]}has(a){return this.content.has(a)}H(){return!1}D(a,b){let c=this.content.get(a);c||(c=new Map,this.content.set(a,c));let d;a=null!=(d=c.get(b))?d:0;c.set(b,a+1);return 0===a}remove(a,b){if(null===b)return this.content.delete(a);const c=this.content.get(a),d=null==c?void 0:c.get(b);if(1<d)return c.set(b,d-1),!1;let e;b=null!=
802
- (e=null==c?void 0:c.delete(b))?e:!1;0===(null==c?void 0:c.size)&&this.content.delete(a);return b}};olympe.dc.query.oa.zr.za=[olympe.dc.query.oa.Pm];olympe.dc.query.oa.Ym=class{constructor(){this.content=new Map}Uc(){return this.content.keys()}j(a){let b,c;return null!=(c=null==(b=this.content.get(a))?void 0:b.values())?c:[]}has(a){return this.content.has(a)}H(){return!1}D(a,b){let c=this.content.get(a);c||(c=new Set,this.content.set(a,c));a=c.size;c.add(b);return a<c.size}remove(a,b){if(null===b)return this.content.delete(a);const c=this.content.get(a);let d;b=null!=(d=null==c?void 0:c.delete(b))?d:!1;0===(null==c?void 0:c.size)&&this.content.delete(a);
803
- return b}};olympe.dc.query.oa.Ym.za=[olympe.dc.query.oa.Pm];olympe.dc.sources={};olympe.dc.sources.fk=class{T(){}init(){}destroy(){}request(){return u(function*(){})}subscribe(){}};const ej=olympe.net.wa.Sd.GET,fj=olympe.net.wa.Sd.Th,gj=olympe.net.wa.Sd.Dc,hj=olympe.net.wa.Sd.cr,ij=olympe.net.wa.Headers.Ii,jj=olympe.net.wa.Headers.so,kj=olympe.net.wa.Ub.Rh,lj=olympe.net.wa.Ub.No,mj=olympe.net.wa.Ub.kk,nj=olympe.net.wa.Ub.gj,oj=olympe.net.wa.Ub.Zi;
804
- function pj(a){const b=`/${olympe.W.getParameter(olympe.dc.sources.U.jm)}/:${'sourceId'}/:${'requestType'}`.replace(/\/+/g,'/').replace(/\/$/,'');a.R.D('_DataSourcesHTTPService',b,[ej,fj,gj,hj],(c,d,e)=>u(function*(){const f=d.get('sourceId');var g=a.F.get(d.get('sourceId'));if(!g){var h;g=null!=(h=olympe.dc.ha().name(f))?h:'name unknown';return Promise.resolve(new olympe.net.qd(`No handler found for datasource ${f} called '${g}'`,oj,'Invalid source id'))}h=c.method;const k=c.Cj();try{var l=yield qj(a,
801
+ relation:`${this.db.name(this.relation)} (${this.relation.X()})`,direction:this.relation.La()}}Fa(a){return a instanceof olympe.dc.query.na.Ce&&this.relation.Fa(a.relation)&&this.F===a.F}};olympe.dc.query.na.im=class extends olympe.dc.query.na.Pd{observe(a,b){const c=this.T();return(d,e,f,g)=>{d?oi(a,e,c,e):a.remove(e,c,e);b(d,e,e,g)}}};olympe.dc.query.na.gq=class{constructor(a,b){this.db=a;this.origin=null;this.content=new Map;this.F=null!=b?b:null}Uc(){return this.content.keys()}j(a){return this.content.has(a)&&null!==this.origin?[this.origin].values():[].values()}has(a){return this.content.has(a)}H(a){let b;return(null==(b=this.F)?void 0:b.call(this,a))||!1}D(a,b){null===this.origin&&(this.origin=b);const c=this.content.get(a);if(!c)return this.content.set(a,(new Map).set(b,1)),!0;let d;a=null!=(d=c.get(b))?d:0;c.set(b,a+1);return!1}remove(a,
802
+ b){a===this.origin&&(this.origin=null);if(null===this.origin||!this.db.Ja(a)||!b)return this.content.delete(a);var c=this.content.get(a);if(!c)return!1;const d=c.get(b);if(1<d)return c.set(b,d-1),!0;b=c.delete(b);if(0===c.size)return this.content.delete(a);if(b){c=new Set(c.keys());for(const e of c){if(this.origin===e)return!0;let f,g;for(const h of null!=(g=null==(f=this.content.get(e))?void 0:f.keys())?g:[])c.add(h)}return this.content.delete(a)}return!1}};olympe.dc.query.na.gq.za=[olympe.dc.query.na.Qm];olympe.dc.query.na.zr=class{constructor(){this.content=new Map}Uc(){return this.content.keys()}j(a){let b,c;return null!=(c=null==(b=this.content.get(a))?void 0:b.keys())?c:[]}has(a){return this.content.has(a)}H(){return!1}D(a,b){let c=this.content.get(a);c||(c=new Map,this.content.set(a,c));let d;a=null!=(d=c.get(b))?d:0;c.set(b,a+1);return 0===a}remove(a,b){if(null===b)return this.content.delete(a);const c=this.content.get(a),d=null==c?void 0:c.get(b);if(1<d)return c.set(b,d-1),!1;let e;b=null!=
803
+ (e=null==c?void 0:c.delete(b))?e:!1;0===(null==c?void 0:c.size)&&this.content.delete(a);return b}};olympe.dc.query.na.zr.za=[olympe.dc.query.na.Qm];olympe.dc.query.na.Zm=class{constructor(){this.content=new Map}Uc(){return this.content.keys()}j(a){let b,c;return null!=(c=null==(b=this.content.get(a))?void 0:b.values())?c:[]}has(a){return this.content.has(a)}H(){return!1}D(a,b){let c=this.content.get(a);c||(c=new Set,this.content.set(a,c));a=c.size;c.add(b);return a<c.size}remove(a,b){if(null===b)return this.content.delete(a);const c=this.content.get(a);let d;b=null!=(d=null==c?void 0:c.delete(b))?d:!1;0===(null==c?void 0:c.size)&&this.content.delete(a);
804
+ return b}};olympe.dc.query.na.Zm.za=[olympe.dc.query.na.Qm];olympe.dc.sources={};olympe.dc.sources.fk=class{T(){}init(){}destroy(){}request(){return u(function*(){})}subscribe(){}};const ej=olympe.net.wa.Sd.GET,fj=olympe.net.wa.Sd.Th,gj=olympe.net.wa.Sd.Dc,hj=olympe.net.wa.Sd.cr,ij=olympe.net.wa.Headers.Ii,jj=olympe.net.wa.Headers.uo,kj=olympe.net.wa.Ub.Rh,lj=olympe.net.wa.Ub.Oo,mj=olympe.net.wa.Ub.kk,nj=olympe.net.wa.Ub.gj,oj=olympe.net.wa.Ub.Zi;
805
+ function pj(a){const b=`/${olympe.W.getParameter(olympe.dc.sources.U.km)}/:${'sourceId'}/:${'requestType'}`.replace(/\/+/g,'/').replace(/\/$/,'');a.R.D('_DataSourcesHTTPService',b,[ej,fj,gj,hj],(c,d,e)=>u(function*(){const f=d.get('sourceId');var g=a.F.get(d.get('sourceId'));if(!g){var h;g=null!=(h=olympe.dc.ha().name(f))?h:'name unknown';return Promise.resolve(new olympe.net.qd(`No handler found for datasource ${f} called '${g}'`,oj,'Invalid source id'))}h=c.method;const k=c.Cj();try{var l=yield qj(a,
805
806
  k[jj])}catch(r){return new olympe.net.qd(`Invalid token ${r}`,mj,'Access denied')}try{var n=Number(d.get('requestType')),p=c.body;const r=olympe.dc.Request.j.pc,t=olympe.dc.Request.j.Tg,v=olympe.dc.Request.j.ef,x=olympe.dc.Request.j.eh,y=olympe.dc.Request.j.zh,z=olympe.dc.Request.j.cg,A=olympe.dc.Request.j.eg,K=olympe.dc.Request.j.og;let Y;switch(n){case r:break;case t:case v:case y:case x:Y=a.D.N(p);break;case K:case z:case A:Y={tag:e.get('tag'),model:e.get('model'),mimeType:k[ij]};p instanceof Uint8Array&&
806
807
  (Y.content=p);break;default:throw Error(`Data Http request type not supported ${n}`);}let ya;const db=null!=(ya=k['X-Source-Origin'])?ya:olympe.dc.Ia.$e;var q=Rf(new olympe.dc.Request(n,f,Y,l),db);const Qa=yield g(q);let ed;void 0===Qa?ed='':Qa instanceof Blob||Qa instanceof Uint8Array||Qa instanceof ArrayBuffer||'function'===typeof(null==Qa?void 0:Qa.pipe)?ed=Qa:ed=JSON.stringify(a.D.ga(Qa));return new olympe.net.qd(ed,h===hj?lj:kj)}catch(r){return r instanceof olympe.error.uk?new olympe.net.qd(`Authorization error: ${r}`,
807
808
  mj,'Forbidden'):new olympe.net.qd(`Internal server error: ${r}`,nj,'Internal server error')}})).catch(c=>a.G.error(`Error while starting the HTTP Service: ${c}`));a.G.debug(`Started HTTP service with path: ${b}`)}function rj(a){a.R.R('_DataSourcesHTTPService').catch(b=>{a.G.error(`An error occurred while stopping the data sources http service: ${b}`)})}function sj(a,b,c){0===a.F.size&&pj(a);a.F.set(b,c);return()=>{a.F.delete(b);0===a.F.size&&rj(a)}}
808
809
  function tj(a,b,c){c=b instanceof olympe.dm.DataSource?b.Pf(c):uj(b,c);null===c&&a.G.error(`Impossible to build URL for data source ${b}`);return c}
809
- function vj(a,b,c){if(b===olympe.dc.Ia.SERVER){var d;return null!=(d=re(a.H,a.ea.get(c)))?d:null}var e=a.N.get(b);if(!e){d=a.$.jb(b);e=olympe.dc.sources.U.Jh;const f=olympe.dc.sources.U.Bf,g=olympe.dc.sources.U.Qi,h=olympe.dc.sources.U.jm;let k;e=`${tj(a,null!=d?d:b,g)?'https':'http'}://${tj(a,null!=d?d:b,e)}:${null!=(k=tj(a,null!=d?d:b,f))?k:tj(a,null!=d?d:b,g)?443:80}`+`/${tj(a,null!=d?d:b,h)}/${b}`.replace(/\/+/g,'/').replace(/\/$/,'');a.N.set(b,e)}return`${e}/${c}`}
810
+ function vj(a,b,c){if(b===olympe.dc.Ia.SERVER){var d;return null!=(d=re(a.H,a.ea.get(c)))?d:null}var e=a.N.get(b);if(!e){d=a.$.jb(b);e=olympe.dc.sources.U.Jh;const f=olympe.dc.sources.U.Bf,g=olympe.dc.sources.U.Qi,h=olympe.dc.sources.U.km;let k;e=`${tj(a,null!=d?d:b,g)?'https':'http'}://${tj(a,null!=d?d:b,e)}:${null!=(k=tj(a,null!=d?d:b,f))?k:tj(a,null!=d?d:b,g)?443:80}`+`/${tj(a,null!=d?d:b,h)}/${b}`.replace(/\/+/g,'/').replace(/\/$/,'');a.N.set(b,e)}return`${e}/${c}`}
810
811
  function wj(a,b){return b instanceof olympe.net.Si?te(a.H,b,de(a.Y).Hd()):Promise.reject('No http request to send')}function xj(a,b){var c=vj(a,b.jc(),b.getType());if(!c)return Promise.reject(`No destination URL to send the query to destination: ${b.jc()}`);const d=b.content,e=JSON.stringify(a.D.ga(d));c=N(c,fj,e,olympe.net.wa.ResponseType.JSON);Gc(c,{['X-Source-Origin']:b.origin,[ij]:'application/json'});return wj(a,c).then(f=>(f=f.getData())?a.D.N(f):olympe.dc.query.Ed.xj(d))}
811
812
  function yj(a,b){var c=vj(a,b.jc(),b.getType());if(!c)return Promise.reject(`No destination URL to send the transaction to destination: ${b.jc()}`);const d=JSON.stringify(a.D.ga(b.content));c=N(c,fj,d);Gc(c,{['X-Source-Origin']:b.origin,[ij]:'application/json'});return wj(a,c).then(e=>Number.parseInt(e.getData(),10))}function qj(a,b){return'string'!==typeof b?Promise.reject('Please provide an authorization token.'):new Promise((c,d)=>{a.Y.rh(b,(e,f)=>{e?d(e):c(f)})})}
812
- olympe.dc.sources.vu=class{constructor(a,b,c,d,e,f){this.G=a;this.R=b;this.H=c;this.Y=d;this.$=e;this.D=f;this.F=new Map;new olympe.C.Wb('Http service of remote data provider');this.N=new Map;this.j=new Map;this.ea=new Map([[olympe.dc.Request.j.Kg,olympe.L.Xb.Kg],[olympe.dc.Request.j.eg,olympe.L.Xb.ik],[olympe.dc.Request.j.og,olympe.L.Xb.ik],[olympe.dc.Request.j.cg,olympe.L.Xb.ik],[olympe.dc.Request.j.vo,olympe.L.Xb.uo],[olympe.dc.Request.j.tr,olympe.L.Xb.sr],[olympe.dc.Request.j.Kp,olympe.L.Xb.Jp],
813
- [olympe.dc.Request.j.Tg,olympe.L.Xb.Ho],[olympe.dc.Request.j.eh,olympe.L.Xb.TRANSACTION]])}Jc(a){var b=vj(this,a.jc(),a.getType());if(!b)return Promise.reject(`No destination URL to send the status request to destination: ${a.jc()}`);b=Ic(N(b,ej),olympe.net.wa.ResponseType.JSON);Gc(b,{['X-Source-Origin']:a.origin});return wj(this,b).then(c=>c.getData())}uploadFileContent(a){const {tag:b,model:c,content:d}=a.content,e=a.jc(),f=vj(this,e,a.getType());if(!f)return Promise.reject(`No destination URL to upload the file. ${b}`);
813
+ olympe.dc.sources.vu=class{constructor(a,b,c,d,e,f){this.G=a;this.R=b;this.H=c;this.Y=d;this.$=e;this.D=f;this.F=new Map;new olympe.C.Wb('Http service of remote data provider');this.N=new Map;this.j=new Map;this.ea=new Map([[olympe.dc.Request.j.Kg,olympe.L.Xb.Kg],[olympe.dc.Request.j.eg,olympe.L.Xb.ik],[olympe.dc.Request.j.og,olympe.L.Xb.ik],[olympe.dc.Request.j.cg,olympe.L.Xb.ik],[olympe.dc.Request.j.wo,olympe.L.Xb.vo],[olympe.dc.Request.j.tr,olympe.L.Xb.sr],[olympe.dc.Request.j.Kp,olympe.L.Xb.Jp],
814
+ [olympe.dc.Request.j.Tg,olympe.L.Xb.Io],[olympe.dc.Request.j.eh,olympe.L.Xb.TRANSACTION]])}Jc(a){var b=vj(this,a.jc(),a.getType());if(!b)return Promise.reject(`No destination URL to send the status request to destination: ${a.jc()}`);b=Ic(N(b,ej),olympe.net.wa.ResponseType.JSON);Gc(b,{['X-Source-Origin']:a.origin});return wj(this,b).then(c=>c.getData())}uploadFileContent(a){const {tag:b,model:c,content:d}=a.content,e=a.jc(),f=vj(this,e,a.getType());if(!f)return Promise.reject(`No destination URL to upload the file. ${b}`);
814
815
  const g=N(e===olympe.dc.Ia.SERVER?`${f}/${b}`:`${f}?tag=${b}&model=${c}`,hj,d);Gc(g,{[ij]:'application/octet-stream'});e!==olympe.dc.Ia.SERVER&&Gc(g,{['X-Source-Origin']:a.origin});return wj(this,g).then(()=>(new URL(g.j())).pathname)}deleteFileContent(a){const {tag:b,model:c}=a.content,d=a.jc();var e=vj(this,d,a.getType());if(!e)return Promise.reject(`No destination URL to delete the file. ${b}`);e=N(d===olympe.dc.Ia.SERVER?`${e}/${b}`:`${e}?tag=${b}&model=${c}`,gj,b);d!==olympe.dc.Ia.SERVER&&Gc(e,
815
816
  {['X-Source-Origin']:a.origin});return wj(this,e).then(()=>{})}downloadFileContent(a){const {tag:b,model:c}=a.content,d=a.jc();var e=vj(this,d,a.getType());if(!e)return Promise.reject(Error(`No destination URL to download the file. ${b}`));var f;const g=null!=(f=this.j.get(b))?f:[];f=new Promise((h,k)=>{g.push({done:h,mi:k})});if(this.j.has(b))return f;this.j.set(b,g);e=N(d===olympe.dc.Ia.SERVER?`${e}/${b}`:`${e}?tag=${b}&model=${c}`,ej,void 0,olympe.net.wa.ResponseType.ai);d!==olympe.dc.Ia.SERVER&&
816
817
  Gc(e,{['X-Source-Origin']:a.origin});wj(this,e).then(h=>{let k;null==(k=this.j.get(b))||k.forEach(l=>l.done(h.getData()))}).catch(h=>{let k;null==(k=this.j.get(b))||k.forEach(l=>l.mi(`${h}`))}).finally(()=>{this.j.delete(b)});return f}};olympe.dc.sources.eq=class{constructor(a,b){this.G=a;this.Kb=b}};olympe.dc.sources.eq.Ub={ij:0,SC:1,TC:3,mC:4};const zj=olympe.dc.Request.j.pc,Aj=olympe.dc.Request.j.Tg,Bj=olympe.dc.Request.j.Gk,Cj=olympe.dc.Request.j.og,Dj=olympe.dc.Request.j.eg,Ej=olympe.dc.Request.j.cg,Fj=olympe.dc.Request.j.Fi,Gj=olympe.dc.Request.j.zh,Hj=olympe.dc.Request.j.ef,Ij=olympe.dc.Request.j.eh,Jj=olympe.dc.Request.j.ck;
817
818
  function Kj(a,b){const c=b.T();null===a.D&&(a.D=new olympe.V.$h(6E4),ib(a.D,(f,g)=>{a.applyTransaction(g,!1).catch(h=>{a.G.error(`Error occurred when applying burst transaction ${f} to the data source: ${h}`)})}),jb(a.D,()=>{a.D=null}));let d;const e=null!=(d=a.D.get(c))?d:new olympe.dc.db.fc(c);b.rc(e);gb(a.D.j,c)||a.D.set(c,e)}function Lj(a,b){return u(function*(){const c=Rf(new olympe.dc.Request(olympe.dc.Request.j.ck,a.T(),b),olympe.dc.Ia.SELF);let d;yield null==(d=a.Kb)?void 0:d.yi(c)})}
818
819
  function Mj(a,b){const c=b.T();let d,e;const f=null!=(e=null==(d=a.D)?void 0:d.get(c))?e:new olympe.dc.db.fc(c);let g;null==(g=a.D)||g.delete(c);b.rc(f);return a.applyTransaction(f,!1).catch(h=>{a.G.error(`Error occurred when applying burst transaction ${c} to the data source: ${h}`)})}function Nj(a,b){const c=rxjs.defer(()=>a.j.executeQuery(b));return 0<a.N?rxjs.interval(a.N).pipe(rxjs.operators.switchMap(()=>c)):c}
819
- olympe.dc.sources.sq=class{constructor(a,b){this.G=a;this.j=b;this.Kb=null;this.H=olympe.dc.query.ml();this.F=new olympe.C.Wb('Context of source '+this.T());let c;this.N=null!=(c=b.Pf(olympe.dc.sources.U.Mm))?c:-1;this.D=null}T(){return this.j.T()}init(a){this.Kb=a;if(this.T()===olympe.dc.Ia.SELF)return this;(new Promise((b,c)=>{let d=!0;Oj(this.j,this.F).subscribe(rxjs.Subscriber.create(e=>{if(this.G.j()){this.G.debug(`Data source ${this.j.name()} has loaded ${e.size()} data types in its cache:`);
820
+ olympe.dc.sources.sq=class{constructor(a,b){this.G=a;this.j=b;this.Kb=null;this.H=olympe.dc.query.ml();this.F=new olympe.C.Wb('Context of source '+this.T());let c;this.N=null!=(c=b.Pf(olympe.dc.sources.U.Nm))?c:-1;this.D=null}T(){return this.j.T()}init(a){this.Kb=a;if(this.T()===olympe.dc.Ia.SELF)return this;(new Promise((b,c)=>{let d=!0;Oj(this.j,this.F).subscribe(rxjs.Subscriber.create(e=>{if(this.G.j()){this.G.debug(`Data source ${this.j.name()} has loaded ${e.size()} data types in its cache:`);
820
821
  for(const [f,g]of e)this.G.debug(`=> DataType: ${g.name()} (${f})`)}d&&(d=!1,b())},c))})).then(()=>this.j.init(this.F)).catch(b=>{this.G.error(`Error while initialization of DataSource ${this.j.name()} (${this.T()}): ${b}`)});return this}healthCheck(){return this.j.healthCheck().then(()=>`Data source ${this.j.name()} (${this.j.T()}) OK`)}destroy(){this.F.destroy();return this.j.destroy()}request(a){const b=a.content;var c=a.getType();switch(c){case zj:const d=olympe.dm.DataSource.pc.zb,e=olympe.dm.DataSource.pc.Wh;
821
822
  return this.j.healthCheck().then(()=>({s:e})).catch(h=>({s:d,r:String(h)}));case Aj:return this.j.executeQuery(b);case Fj:const f=b.bc();Kj(this,f);Lj(this,Nf(f)).catch(h=>{this.G.warn(`Error occurred when applying burst transaction ${f.T()} to the data source: ${h}`)});return Promise.resolve();case Hj:case Ij:const g=b.bc();return this.applyTransaction(g,c===Ij).finally(()=>{if(a.origin===olympe.dc.Ia.SELF){var h=g.T();h=Rf(new olympe.dc.Request(olympe.dc.Request.j.jk,olympe.dc.Ia.SELF,{id:h,finalize:olympe.dc.transaction.Jf.j.$i,
822
823
  error:null}),this.T());let k;null==(k=this.Kb)||k.dd(h)}});case Gj:return Mj(this,b.bc());case Cj:return b.content instanceof Uint8Array?this.j.uploadFileContent(b.tag,b.model,b.content).then(()=>`datasource://${b.tag}`):Promise.reject('File content is undefined');case Dj:return this.j.downloadFileContent(b.tag,b.model);case Ej:return this.j.deleteFileContent(b.tag,b.model);case Jj:return c=Rf(new olympe.dc.Request(Jj,olympe.dc.Ia.SELF,b,a.yc()),this.T()),this.Kb.dd(c);default:return Promise.reject(`Request of type ${a.getType()} is not supported by the data source`)}}subscribe(a){if(a.getType()===
@@ -828,34 +829,34 @@ olympe.dc.sources.Rl=class{constructor(a,b){this.G=a;this.D=b;this.Kb=null}T(){}
828
829
  q=a.getType(),r=a.jc();if(Rd(b.D)){q===d&&(c=a.content,(g=Tf(a).get(olympe.dc.ma.j.Ml))&&(yield Uj(p,c.T(),g)),b.G.debug(`Data Provider: Query ${c.T()} will be executed with its default Remote or Server provider`));if(q===l&&(l=a.content,'string'===typeof(null==l?void 0:l.url)&&l.url.startsWith('offline://')))return p.downloadFileContent(l.tag);l=yield b.Y(a);if(q===d){const t=a.content;d=l;const v=new olympe.dc.db.fc(`fullResult_${t.T()}`);l=d.pipeThrough(new TransformStream({transform:(x,y)=>u(function*(){const z=
829
830
  x.bc();yield Vj(p,z);z.rc(v);b.G.j()&&b.G.debug(`Data Provider: Data result for query ${t.T()}`,z.Ab.size,'instances',Array.from(z.Jd()).length,'relations');y.enqueue(x)}),flush:()=>u(function*(){yield Wj(p,t.T(),r,v,!0)})}))}else if(q===e||q===f||q===h)b.G.debug('Data Provider: Persisting graph patch in offline cache after successful transaction'),yield Xj(p,null,r,a.content.bc(),!1);return l}b.G.debug(`Data Provider: Request (type: ${q}) will be sent to the cache data provider: ${a.content}`);switch(q){case c:return{s:olympe.dm.DataSource.pc.Ef};
830
831
  case d:return p.executeQuery(a.content);case e:case f:case h:d=a.content;const t=d.bc().T();return p.applyTransaction(d,r).finally(()=>Tj(b,t));case g:return Promise.resolve();case k:return d=a.content,p.uploadFileContent(d.tag,d.content,d.mimeType);case l:return p.downloadFileContent(a.content.tag);case n:return p.deleteFileContent(a.content.tag);default:return Promise.reject(`Messages of type ${a.getType()} is not supported by the source ${b.T()}`)}})}subscribe(a,b){if(!this.D.j)return this.$(a,
831
- b);const c=olympe.dc.sources.de(),d=a.content,e=a.jc();return rxjs.of(null).pipe(rxjs.operators.switchMap(()=>{if(Rd(this.D)){const f=new rxjs.Observable(h=>{olympe.C.kt([this.D.Wf()],()=>{h.error(new olympe.error.Np('Go Offline',d.T()))})}),g=this.$(a,b);return rxjs.merge(f,g)}return new rxjs.Observable(f=>{olympe.C.kt([this.D.Wf()],()=>{f.error(new olympe.error.Go('Back Online',d.T()))})})})).pipe(rxjs.operators.switchMap(f=>rxjs.from(Xj(c,d.T(),e,f.bc()).then(()=>f).catch(g=>{this.G.error(`Data Provider: Cache database failed to handle the data result with message: ${g}`);
832
- throw g;}))))}};olympe.dc.sources.Rl.za=[olympe.dc.sources.fk];const Yj=olympe.dc.Request.j.pc,Zj=olympe.dc.Request.j.Tg,ak=olympe.dc.Request.j.Gk,bk=olympe.dc.Request.j.ef,ck=olympe.dc.Request.j.eh,dk=olympe.dc.Request.j.Fi,ek=olympe.dc.Request.j.zh,fk=olympe.dc.Request.j.og,gk=olympe.dc.Request.j.eg,hk=olympe.dc.Request.j.cg;function ik(a,b){let c;return(null==(c=a.Ha.jb(b))?void 0:c.Pf(olympe.dc.sources.U.We))!==olympe.dm.DataSource.We.Qp}function jk(a,b){let c;return(null==(c=a.Ha.jb(b))?void 0:c.Pf(olympe.dc.sources.U.We))!==olympe.dm.DataSource.We.yo}
833
- function kk(a,b,c){const d=c.content.bc().T();let e=a.ea.get(d);e||(e=olympe.L.rb.Ws(b),a.ea.set(d,e));return e.ld(c)}function lk(a,b){b=b.yc();if(b!==olympe.dm.User.j&&a.Pf(olympe.dc.sources.U.Tm))throw a=`User ${b} has no right to access the restricted data source ${a.name()} (${a.T()}). Please use an admin account instead.`,new olympe.error.uk(a);}
832
+ b);const c=olympe.dc.sources.de(),d=a.content,e=a.jc();return rxjs.of(null).pipe(rxjs.operators.switchMap(()=>{if(Rd(this.D)){const f=new rxjs.Observable(h=>{olympe.C.kt([this.D.Wf()],()=>{h.error(new olympe.error.Np('Go Offline',d.T()))})}),g=this.$(a,b);return rxjs.merge(f,g)}return new rxjs.Observable(f=>{olympe.C.kt([this.D.Wf()],()=>{f.error(new olympe.error.Ho('Back Online',d.T()))})})})).pipe(rxjs.operators.switchMap(f=>rxjs.from(Xj(c,d.T(),e,f.bc()).then(()=>f).catch(g=>{this.G.error(`Data Provider: Cache database failed to handle the data result with message: ${g}`);
833
+ throw g;}))))}};olympe.dc.sources.Rl.za=[olympe.dc.sources.fk];const Yj=olympe.dc.Request.j.pc,Zj=olympe.dc.Request.j.Tg,ak=olympe.dc.Request.j.Gk,bk=olympe.dc.Request.j.ef,ck=olympe.dc.Request.j.eh,dk=olympe.dc.Request.j.Fi,ek=olympe.dc.Request.j.zh,fk=olympe.dc.Request.j.og,gk=olympe.dc.Request.j.eg,hk=olympe.dc.Request.j.cg;function ik(a,b){let c;return(null==(c=a.Ha.jb(b))?void 0:c.Pf(olympe.dc.sources.U.We))!==olympe.dm.DataSource.We.Qp}function jk(a,b){let c;return(null==(c=a.Ha.jb(b))?void 0:c.Pf(olympe.dc.sources.U.We))!==olympe.dm.DataSource.We.zo}
834
+ function kk(a,b,c){const d=c.content.bc().T();let e=a.ea.get(d);e||(e=olympe.L.rb.Ws(b),a.ea.set(d,e));return e.ld(c)}function lk(a,b){b=b.yc();if(b!==olympe.dm.User.j&&a.Pf(olympe.dc.sources.U.Um))throw a=`User ${b} has no right to access the restricted data source ${a.name()} (${a.T()}). Please use an admin account instead.`,new olympe.error.uk(a);}
834
835
  function mk(a,b,c,d,e){return u(function*(){var f=olympe.L.xa.j.SEND,g=olympe.L.xa.j.GET;const h=olympe.L.xa.j.PUBLISH,k=olympe.L.xa.j.SUBSCRIBE,l=d.mt();var n=d.body();if(e!==n.yc())throw Error('Access denied: try to impersonate a user');lk(c,n);let p;if(null==(p=a.Kb)||!p.sources.has(n.jc()))throw Error(`Try to process a message with destination data source ${n.jc()} coming from remote but not started here`);if(l===k){if(n.getType()===ak)f=n.content.T();else throw Error('Not supported type of subscription');
835
- g=yield d.Qn(f);a.ja.set(g,f);g=a.N.get(f);g||(g=new nk(a.G,f,b,Rf(n,olympe.dc.Ia.$e)),a.N.set(f,g));g.subscribe()}else l===g?(n=yield b.request(n),void 0!==n?yield d.dd(n):a.G.warn(`Request from ${d.source()} requires an output value, but got undefined instead.`)):l===f?(yield b.request(n),yield d.ack()):l===h&&(yield b.request(n))})}
836
+ g=yield d.Rn(f);a.ja.set(g,f);g=a.N.get(f);g||(g=new nk(a.G,f,b,Rf(n,olympe.dc.Ia.$e)),a.N.set(f,g));g.subscribe()}else l===g?(n=yield b.request(n),void 0!==n?yield d.dd(n):a.G.warn(`Request from ${d.source()} requires an output value, but got undefined instead.`)):l===f?(yield b.request(n),yield d.ack()):l===h&&(yield b.request(n))})}
836
837
  olympe.dc.sources.Cr=class extends olympe.dc.sources.Rl{constructor(a,b,c,d,e,f){super(a,d);this.H=b;this.j=c;this.db=e;this.F=new olympe.C.Wb('Remote Provider Context');this.ta=new Map;this.R=new Map;this.N=new Map;this.ja=new Map;this.Ha=f;this.ea=new Map}T(){return olympe.dc.Ia.$e}Y(a){var b=olympe.L.rb;const c=a.jc();var d=a.getType();this.G.j()&&this.G.debug(`Request (type: ${d}) will be sent to remote data provider ${c}: ${a.content}`);switch(d){case Yj:const e=olympe.dm.DataSource.pc.zb,f=
837
838
  olympe.dm.DataSource.pc.Wh;b=ik(this,c)?b.get(c,a):Promise.resolve({s:f});a=jk(this,c)?this.j.Jc(a):Promise.resolve({s:f});return Promise.all([b,a]).then(([k,l])=>{if((null==k?void 0:k.s)===e||(null==l?void 0:l.s)===e){let n,p;return{s:e,r:`${null!=(n=null==k?void 0:k.r)?n:''} ${null!=(p=null==l?void 0:l.r)?p:''}`}}return{s:f}});case Zj:return jk(this,c)?xj(this.j,a):b.get(c,a);case bk:const g=a.content.bc().T();return(ik(this,c)?b.get(c,a):yj(this.j,a)).finally(()=>Tj(this,g));case ck:const h=a.content.bc().T();
838
839
  return(jk(this,c)?yj(this.j,a):b.get(c,a)).finally(()=>Tj(this,h));case dk:return ik(this,c)?kk(this,c,a).catch(k=>{this.G.error(`An error occurred while sending "burst transaction" to the data source ${c}: ${k}`)}):Promise.resolve();case ek:return d=a.content.bc().T(),this.ea.delete(d),ik(this,c)?b.get(c,a):yj(this.j,a);case fk:return jk(this,c)?this.j.uploadFileContent(a):b.get(c,a);case gk:return jk(this,c)?this.j.downloadFileContent(a):b.get(c,a);case hk:return jk(this,c)?this.j.deleteFileContent(a):
839
840
  b.send(c,a);default:return Promise.reject(`Messages of type ${a.getType()} is not supported by the source ${this.T()}`)}}$(a,b){const c=a.jc(),d=a.getType();if(!ik(this,c))return rxjs.throwError(()=>Error(`Subscription request not supported for data source ${this.db.name(c)} (${c}) which uses HTTP only.`));this.G.j()&&this.G.debug(`Subscription (type: ${d}) will be sent to remote data provider ${c}: ${a.content}`);return d===ak?olympe.L.rb.observe(c,this.F,a,{onRetry:b}).observable:rxjs.throwError(()=>
840
841
  Error(`Do not handle subscription request of type ${d}`))}init(a){super.init(a);if(a.F)return this;olympe.dc.ma.from(this.H,this.H).fb(olympe.dm.DataSource.Lj).filter(olympe.dc.query.Ba.Fa(olympe.dm.DataSource.hi,!0)).filter(olympe.dc.query.Ba.Fa(olympe.dm.DataSource.Gs,!0)).observe(this.F).subscribe(b=>{b.yj().forEach(this.mb.bind(this,a));b.Ej().forEach(c=>{let d;null==(d=this.ta.get(c))||d.destroy();this.ta.delete(c)})});this.db.Ra(this.H,olympe.dm.DataSource.Gs)&&(new olympe.L.rb(this.H,this.F)).listen().subscribe(b=>
841
- {b=b.body();b instanceof olympe.dc.Request?a.dd(b):this.G.error('Self source received something else than a data request, ignore it.')});return this}destroy(){return u(function*(){})}mb(a,b){const c=b.X(),d=new olympe.C.Wb(`Published data provider context ${c}`,this.F);this.ta.set(c,d);let e;ok(b,d).subscribe(f=>{let g;null==(g=e)||g();let h;null==(h=this.R.get(c))||h.stop();this.R.delete(c);f!==olympe.dm.DataSource.We.yo&&(e=sj(this.j,c,k=>{lk(b,k);return a.request(k)}),d.onDestroy(()=>{let k;return null==
842
+ {b=b.body();b instanceof olympe.dc.Request?a.dd(b):this.G.error('Self source received something else than a data request, ignore it.')});return this}destroy(){return u(function*(){})}mb(a,b){const c=b.X(),d=new olympe.C.Wb(`Published data provider context ${c}`,this.F);this.ta.set(c,d);let e;ok(b,d).subscribe(f=>{let g;null==(g=e)||g();let h;null==(h=this.R.get(c))||h.stop();this.R.delete(c);f!==olympe.dm.DataSource.We.zo&&(e=sj(this.j,c,k=>{lk(b,k);return a.request(k)}),d.onDestroy(()=>{let k;return null==
842
843
  (k=e)?void 0:k()}));f!==olympe.dm.DataSource.We.Qp&&(f=new olympe.C.Wb(`Bus Service of data source ${c}`,d),f=(new olympe.L.rb(c,f)).ut(this.Wa.bind(this)),this.R.set(c,f),f.listen().subscribe(k=>{k.Bi().then(l=>mk(this,a,b,k,l)).catch(l=>{this.G.warn(`Error occurred while processing request from ${k.source()}: ${l}`);return k.mi(l instanceof Error?l:Error(l))})}))})}yi(a){const b=this;return u(function*(){let c;yield null==(c=b.R.get(a.jc()))?void 0:c.yi(a)})}Wa(a){const b=this.ja.get(a);this.ja.delete(a);
843
844
  if(a=b)null==(a=this.N.get(b))?a=0:(0<a.j&&--a.j,0===a.j?(a.G.debug(`Data subscription ${a.D} has more subscriber: unsubscribe`),a.F.unsubscribe(),a=!0):(a.G.debug(`Data subscription ${a.D} has ${a.j} subscribers`),a=!1));a&&this.N.delete(b)}};
844
- class nk{constructor(a,b,c,d){this.G=a;this.D=b;this.j=0;this.F=c.subscribe(d).subscribe({next:e=>{olympe.L.rb.ld(b,e).catch(f=>a.error(`Error occurred while publishing a data notification: ${f}`))},error:e=>a.error(`Error occurred while trying to subscribe to topic ${b} for a datasource: ${e}`)})}subscribe(){this.j++;this.G.debug(`Data subscription ${this.D} has ${this.j} subscribers`);return this}}olympe.dc.sources.Cr.za=[olympe.dc.sources.fk];const W={qs:10,Mo:11,sp:12,ir:13,QUERY_RESULT:14,Lp:15,ap:16,ef:17,jr:18,$o:19,fj:20};function pk(a,b){const c=new olympe.dc.transaction.He,d=new olympe.dc.transaction.He;b.forEach(e=>{const f=new Map(Array.from(Object.entries(e.p).map(([h,k])=>[h,a.j(k)]))),g=e.v?d:c;g.Rc(e.t,e.s,f,e.m);e.r.forEach(h=>g.Pa(h.r,h.o,h.d))});a.$.nd(Wf(Xf(d),olympe.dc.Ia.SELF),{persist:!1});a.$.nd(Wf(Xf(c),olympe.dc.Ia.SELF))}
845
- olympe.dc.sources.ec=class extends olympe.L.ec{constructor(a){super();this.$=a;this.db=a.view;this.F=new Map}ga(a){a=super.ga(a);if(0<this.F.size){const b=Array.from(this.F.values());this.F.clear();return Object.assign(this.format(W.qs,a),{i:b})}return a}N(a){return(null==a?void 0:a.t)===W.qs&&Array.isArray(null==a?void 0:a.i)?(pk(this,a.i),this.j(a.v)):this.j(a)}D(a){switch(!0){case a instanceof olympe.dm.File:var b=this.format,c=W.sp;{const d=a.X(),e={t:d};if(!this.F.has(d)&&(this.H(d),!this.db.Re(d))){const f=
846
- a.get(olympe.dm.File.urlProp);if(f.startsWith('blob:')||f.startsWith('stream:'))a=olympe.dc.Ns().Ha(a),this.F.get(d).p[olympe.dm.File.urlProp.X()]='stream://'+d,e.s=this.D(a)}a=e}return b.call(this,c,a);case a instanceof olympe.dc.CloudObject:return this.format(W.Mo,this.H(a.X()));case a instanceof olympe.dc.ma:return this.format(W.ir,a.ga());case a instanceof olympe.dc.Ka:return this.format(W.QUERY_RESULT,a.ga(this.H.bind(this)));case a instanceof olympe.dc.db.fc:return b=new olympe.dc.transaction.He,
847
- a.rc(b),this.format(W.Lp,{i:a.T(),p:Xf(b)});case a instanceof olympe.dc.Request:return this.format(W.ap,{r:a.getType(),o:a.origin,d:a.jc(),u:a.yc(),c:this.D(a.content)});case a instanceof olympe.dc.transaction.lj:return this.format(W.ef,{r:a.uh(),p:this.D(a.bc())});case a instanceof olympe.dc.query.Ed:return this.format(W.jr,a.ga());case a instanceof olympe.dc.Ig:return this.format(W.$o,a.ga());case a instanceof olympe.dc.wc:return this.format(W.fj,this.H(a.X()));default:return super.D(a)}}j(a){if(null===
848
- a||'object'!==typeof a)return super.j(a);const {t:b,v:c}=a;switch(b){case W.sp:var d=c.t;c.s&&(a=this.j(c.s),olympe.dc.Ns().Eb(d,a));return olympe.dc.CloudObject.get(d);case W.Mo:return olympe.dc.CloudObject.get(c);case W.ir:return d=c.p.map(olympe.dc.query.oa.Om.j),a=c.e,new olympe.dc.ma(c.b,c.s,d,d.length-1,new Set(c.r),{max:a.m,offset:a.o,Md:a.s,Te:a.rm});case W.QUERY_RESULT:return Ni(c);case W.Lp:return(new olympe.dc.transaction.dj).j(c.p,c.i);case W.ap:return a=null!=(d=this.j(c.c))?d:void 0,
849
- Rf(new olympe.dc.Request(c.r,c.d,a,c.u),c.o);case W.ef:return d=this.j(c.p),new olympe.dc.transaction.lj(d,c.r);case W.jr:return olympe.dc.query.Ed.j(c);case W.$o:return olympe.dc.Ig.j(c);case W.fj:return new olympe.dc.wc(c);default:return super.j(a)}}H(a){if(this.F.has(a))return a;if(!this.db.Ja(a))throw new olympe.dc.Uq(a);const b={};this.db.Cb(a).forEach((d,e)=>{b[e]=this.D(d)});var c=[];for(const [d,e,f]of th(this.db,a))this.F.has(f)&&c.push(e===olympe.dc.va.DESTINATION?{r:d,o:a,d:f}:{r:d,o:f,
850
- d:a});c={t:a,m:this.db.model(a),s:this.db.source(a),p:b,r:c};this.db.Re(a)||(c.v=!0);this.F.set(a,c);return a}};const qk=olympe.dc.Request.j.Kg,rk=olympe.dc.Request.j.ef,sk=olympe.dc.Request.j.eh,tk=olympe.dc.Request.j.Fi,uk=olympe.dc.Request.j.vo,vk=olympe.dc.Request.j.tr,wk=olympe.dc.Request.j.Tg,xk=olympe.dc.Request.j.Gk,yk=olympe.dc.Request.j.Kp,zk=olympe.dc.Request.j.qu,Ak=olympe.dc.Request.j.ru,Bk=olympe.dc.Request.j.su,Ck=olympe.dc.Request.j.cg,Dk=olympe.dc.Request.j.eg,Ek=olympe.dc.Request.j.og,Fk=olympe.dc.Request.j.jk,Gk=olympe.dc.Request.j.Nw,Hk=olympe.dc.Request.j.bw,Ik=olympe.dc.Request.j.Fp,Jk=
845
+ class nk{constructor(a,b,c,d){this.G=a;this.D=b;this.j=0;this.F=c.subscribe(d).subscribe({next:e=>{olympe.L.rb.ld(b,e).catch(f=>a.error(`Error occurred while publishing a data notification: ${f}`))},error:e=>a.error(`Error occurred while trying to subscribe to topic ${b} for a datasource: ${e}`)})}subscribe(){this.j++;this.G.debug(`Data subscription ${this.D} has ${this.j} subscribers`);return this}}olympe.dc.sources.Cr.za=[olympe.dc.sources.fk];const W={qs:10,No:11,tp:12,ir:13,QUERY_RESULT:14,Lp:15,bp:16,ef:17,jr:18,ap:19,fj:20};function pk(a,b){const c=new olympe.dc.transaction.He,d=new olympe.dc.transaction.He;b.forEach(e=>{const f=new Map(Array.from(Object.entries(e.p).map(([h,k])=>[h,a.j(k)]))),g=e.v?d:c;g.Rc(e.t,e.s,f,e.m);e.r.forEach(h=>g.Pa(h.r,h.o,h.d))});a.$.nd(Wf(Xf(d),olympe.dc.Ia.SELF),{persist:!1});a.$.nd(Wf(Xf(c),olympe.dc.Ia.SELF))}
846
+ olympe.dc.sources.ec=class extends olympe.L.ec{constructor(a){super();this.$=a;this.db=a.view;this.F=new Map}ga(a){a=super.ga(a);if(0<this.F.size){const b=Array.from(this.F.values());this.F.clear();return Object.assign(this.format(W.qs,a),{i:b})}return a}N(a){return(null==a?void 0:a.t)===W.qs&&Array.isArray(null==a?void 0:a.i)?(pk(this,a.i),this.j(a.v)):this.j(a)}D(a){switch(!0){case a instanceof olympe.dm.File:var b=this.format,c=W.tp;{const d=a.X(),e={t:d};if(!this.F.has(d)&&(this.H(d),!this.db.Re(d))){const f=
847
+ a.get(olympe.dm.File.urlProp);if(f.startsWith('blob:')||f.startsWith('stream:'))a=olympe.dc.Ns().Ha(a),this.F.get(d).p[olympe.dm.File.urlProp.X()]='stream://'+d,e.s=this.D(a)}a=e}return b.call(this,c,a);case a instanceof olympe.dc.CloudObject:return this.format(W.No,this.H(a.X()));case a instanceof olympe.dc.ma:return this.format(W.ir,a.ga());case a instanceof olympe.dc.Ka:return this.format(W.QUERY_RESULT,a.ga(this.H.bind(this)));case a instanceof olympe.dc.db.fc:return b=new olympe.dc.transaction.He,
848
+ a.rc(b),this.format(W.Lp,{i:a.T(),p:Xf(b)});case a instanceof olympe.dc.Request:return this.format(W.bp,{r:a.getType(),o:a.origin,d:a.jc(),u:a.yc(),c:this.D(a.content)});case a instanceof olympe.dc.transaction.lj:return this.format(W.ef,{r:a.uh(),p:this.D(a.bc())});case a instanceof olympe.dc.query.Ed:return this.format(W.jr,a.ga());case a instanceof olympe.dc.Ig:return this.format(W.ap,a.ga());case a instanceof olympe.dc.wc:return this.format(W.fj,this.H(a.X()));default:return super.D(a)}}j(a){if(null===
849
+ a||'object'!==typeof a)return super.j(a);const {t:b,v:c}=a;switch(b){case W.tp:var d=c.t;c.s&&(a=this.j(c.s),olympe.dc.Ns().Eb(d,a));return olympe.dc.CloudObject.get(d);case W.No:return olympe.dc.CloudObject.get(c);case W.ir:return d=c.p.map(olympe.dc.query.na.Pm.j),a=c.e,new olympe.dc.ma(c.b,c.s,d,d.length-1,new Set(c.r),{max:a.m,offset:a.o,Md:a.s,Te:a.rm});case W.QUERY_RESULT:return Ni(c);case W.Lp:return(new olympe.dc.transaction.dj).j(c.p,c.i);case W.bp:return a=null!=(d=this.j(c.c))?d:void 0,
850
+ Rf(new olympe.dc.Request(c.r,c.d,a,c.u),c.o);case W.ef:return d=this.j(c.p),new olympe.dc.transaction.lj(d,c.r);case W.jr:return olympe.dc.query.Ed.j(c);case W.ap:return olympe.dc.Ig.j(c);case W.fj:return new olympe.dc.wc(c);default:return super.j(a)}}H(a){if(this.F.has(a))return a;if(!this.db.Ja(a))throw new olympe.dc.Uq(a);const b={};this.db.Cb(a).forEach((d,e)=>{b[e]=this.D(d)});var c=[];for(const [d,e,f]of th(this.db,a))this.F.has(f)&&c.push(e===olympe.dc.va.DESTINATION?{r:d,o:a,d:f}:{r:d,o:f,
851
+ d:a});c={t:a,m:this.db.model(a),s:this.db.source(a),p:b,r:c};this.db.Re(a)||(c.v=!0);this.F.set(a,c);return a}};const qk=olympe.dc.Request.j.Kg,rk=olympe.dc.Request.j.ef,sk=olympe.dc.Request.j.eh,tk=olympe.dc.Request.j.Fi,uk=olympe.dc.Request.j.wo,vk=olympe.dc.Request.j.tr,wk=olympe.dc.Request.j.Tg,xk=olympe.dc.Request.j.Gk,yk=olympe.dc.Request.j.Kp,zk=olympe.dc.Request.j.qu,Ak=olympe.dc.Request.j.ru,Bk=olympe.dc.Request.j.su,Ck=olympe.dc.Request.j.cg,Dk=olympe.dc.Request.j.eg,Ek=olympe.dc.Request.j.og,Fk=olympe.dc.Request.j.jk,Gk=olympe.dc.Request.j.Nw,Hk=olympe.dc.Request.j.bw,Ik=olympe.dc.Request.j.Fp,Jk=
851
852
  olympe.dc.Request.j.zh,Kk=olympe.dc.Request.j.Tt,Lk=olympe.dc.Request.j.pc;function Mk(a){return Nk(a,olympe.dc.Request.j.Kg).then(b=>{b=b.getData().p;const c=Wf(b,a.T());a.G.j()&&a.G.debug('< Get Context result',b);a.G.N()&&a.G.log('< Get Context result has',b.length,'operations');return c})}function Ok(a,b){const c=new olympe.dc.transaction.He({me:!1,ii:!1}),d=b.bc(),e=b.j;d.rc(c);return Pk(a,rk,{i:d.T(),r:b.uh(),p:Xf(c),bd:e?!0:void 0}).then(f=>f.ct)}
852
853
  function Qk(a,b){const c=b.bc(),d=new olympe.dc.transaction.He({wl:!0,me:!1,ii:!1});c.rc(d);b=b.j?'bd=true':'';return Nk(a,sk,Xf(d),b,olympe.net.wa.ResponseType.Xr).then(e=>{try{const f=e.getData();let g;return null!=(g=JSON.parse(f).ct)?g:Date.now()}catch(f){return Date.now()}}).finally(()=>{Rk(a,Fk,{id:c.T(),finalize:olympe.dc.transaction.Jf.j.$i})})}
853
854
  function Sk(a,b){const c=new olympe.dc.transaction.He({me:!1,ii:!1}),d=b.bc();d.rc(c);return Pk(a,tk,{i:d.T(),r:b.uh(),p:Xf(c)},!1).catch(e=>a.G.error(`Error while publishing burst transaction: ${e}`))}function Tk(a,b){const c=new olympe.dc.transaction.He({me:!1,ii:!1});b=b.bc();b.rc(c);return Pk(a,Jk,{i:b.T(),p:Xf(c)}).then(d=>d.ct)}
854
855
  function Uk(a,b){const c=encodeURI(bb(olympe.V.kf(),JSON.stringify(Vk(a,b))));a.G.j()&&a.G.debug(`Static GraphDef query ${b} sent to orchestrator`);return Nk(a,wk,void 0,`query=${c}&v=${a.version}`,olympe.net.wa.ResponseType.ke).then(d=>Wk(a,d))}function Xk(a,b){const c=b.T();a.G.j()&&a.G.debug(`Query (${c}) sent to orchestrator: ${b}`);const d=Vk(a,b);return wb(a.ta,()=>Nk(a,yk,d,void 0,olympe.net.wa.ResponseType.ke)).then(e=>Wk(a,e))}
855
- function Yk(a,b){if(!ze(a.F))return a.G.error(`Server is disconnected, backup of instance ${b} is canceled.`),Promise.reject('Server is disconnected');b=Vk(a,olympe.dc.ma.from(b));b.f=olympe.dc.Mb.fp;b=N(vj(a.j,olympe.dc.Ia.SERVER,uk),olympe.net.wa.Sd.Th,JSON.stringify(b),olympe.net.wa.ResponseType.ai);Gc(b,{[olympe.net.wa.Headers.Ii]:olympe.net.wa.Ul.JSON});return wj(a.j,b).then(c=>c.getData())}
856
+ function Yk(a,b){if(!ze(a.F))return a.G.error(`Server is disconnected, backup of instance ${b} is canceled.`),Promise.reject('Server is disconnected');b=Vk(a,olympe.dc.ma.from(b));b.f=olympe.dc.Mb.gp;b=N(vj(a.j,olympe.dc.Ia.SERVER,uk),olympe.net.wa.Sd.Th,JSON.stringify(b),olympe.net.wa.ResponseType.ai);Gc(b,{[olympe.net.wa.Headers.Ii]:olympe.net.wa.Ul.JSON});return wj(a.j,b).then(c=>c.getData())}
856
857
  function Zk(a,b,c,d){if(!ze(a.F))return a.G.error('Server is disconnected, restore of instance is canceled.'),Promise.reject('Server is disconnected');const e=vj(a.j,olympe.dc.Ia.SERVER,vk);b=N(e+`?debug=${c}&optional=${d}`,olympe.net.wa.Sd.Th,b);Gc(b,{[olympe.net.wa.Headers.Ii]:olympe.net.wa.Ul.Xw});return wj(a.j,b).then(f=>f.getData())}
857
858
  function Pk(a,b,c,d=!0){const e=olympe.L.Ee.Hg,f={c:b};Object.assign(f,c);if(d)return new Promise((g,h)=>{Ce(a.F,e,f,(k,l)=>{k?h(k):g(l)})});Ce(a.F,e,f);return Promise.resolve()}
858
- function Vk(a,b){var c=ii(b);b={i:b.T(),b:[b.D],m:!0,v:!0};if(c[0]instanceof olympe.dc.query.oa.Pd)Object.assign(b,{f:c[0].Pb,q:[]});else{const d=(h,k)=>{h.every(l=>!l.Fa(k))&&h.push(k);return h},e=new Map;for(let h=c.length-1;0<=h;h--){const k=c[h],l=k.j;let n;const p=d(null!=(n=e.get(l))?n:[],k);if(k instanceof olympe.dc.query.oa.Ce&&k.F){let q;null==(q=e.get(k.T()))||q.forEach(r=>d(p,r))}e.set(l,p)}let f,g;c=null!=(g=e.get(null==(f=c[0])?void 0:f.j))?g:[];Object.assign(b,{f:olympe.dc.Mb.NONE,q:c.map(a.ea.bind(a,
859
+ function Vk(a,b){var c=ii(b);b={i:b.T(),b:[b.D],m:!0,v:!0};if(c[0]instanceof olympe.dc.query.na.Pd)Object.assign(b,{f:c[0].Pb,q:[]});else{const d=(h,k)=>{h.every(l=>!l.Fa(k))&&h.push(k);return h},e=new Map;for(let h=c.length-1;0<=h;h--){const k=c[h],l=k.j;let n;const p=d(null!=(n=e.get(l))?n:[],k);if(k instanceof olympe.dc.query.na.Ce&&k.F){let q;null==(q=e.get(k.T()))||q.forEach(r=>d(p,r))}e.set(l,p)}let f,g;c=null!=(g=e.get(null==(f=c[0])?void 0:f.j))?g:[];Object.assign(b,{f:olympe.dc.Mb.NONE,q:c.map(a.ea.bind(a,
859
860
  e))})}return b}function Rk(a,b,c){b=Rf(new olympe.dc.Request(b,olympe.dc.Ia.SELF,c),a.T());let d;null==(d=a.Kb)||d.dd(b)}
860
861
  function Nk(a,b,c,d,e){const f=vj(a.j,a.T(),b);if('string'!==typeof f)return Promise.reject(`ServerProvider: no url for type ${b}`);b=N(`${f}${'string'===typeof d&&0<d.length?`?${d}`:''}`,void 0!==c?olympe.net.wa.Sd.Th:olympe.net.wa.Sd.GET,c&&JSON.stringify(c));Gc(b,{[olympe.net.wa.Headers.Ii]:'application/json'});Ic(b,null!=e?e:olympe.net.wa.ResponseType.JSON);return wj(a.j,b)}
861
862
  function Wk(a,b){return u(function*(){const c=b.headers.graphId,d=b.getData();let e,f;return(null!=(f=null==(e=a.Ha)?void 0:xb(e,d))?f:olympe.V.stream.Ak.transform(b.getData())).pipeThrough(new TransformStream({transform:(g,h)=>{a.G.debug(`Received ${g.length} operations for patch ${c}`);h.enqueue(Wf(g,a.T(),null,c))}}))})}
@@ -863,16 +864,16 @@ function $k(a,b,c){return u(function*(){const d=b.pi;let e;if(c instanceof olymp
863
864
  olympe.dc.sources.Qr=class extends olympe.dc.sources.Rl{constructor(a,b,c,d,e,f,g){super(a,c);this.F=b;this.j=d;this.R=new olympe.dc.transaction.dj(this.T());this.H=new Map;this.N=new Set;this.version=e||'unknown';this.Ha=g?new olympe.V.stream.Ww:null;this.ta=new olympe.V.promise.Ur(f);olympe.C.Gj(this.D.Wf(),()=>{this.H.forEach((h,k)=>{h.error(new olympe.error.Qh('Connection to server has been recovered',k))})})}T(){return olympe.dc.Ia.SERVER}Y(a){var b=a.getType();const c=a.content,d=Tf(a);switch(b){case Lk:return a=
864
865
  olympe.dm.DataSource.pc.zb,b=olympe.dm.DataSource.pc.Wh,Promise.resolve(ze(this.F)?{s:b}:{s:a,r:'Disconnected'});case qk:return Mk(this);case rk:return Ok(this,c);case sk:return Qk(this,c);case tk:return Sk(this,c);case Jk:return Tk(this,c);case wk:return d.get(olympe.dc.ma.j.fq)?Uk(this,c):Xk(this,c);case uk:return Yk(this,c);case vk:return Zk(this,c.BF,c.debug,c.optional);case Gk:case Hk:case Ik:case Kk:return Pk(this,b,{});case Dk:return this.j.downloadFileContent(a);case Ck:return this.j.deleteFileContent(a);
865
866
  case Ek:return this.j.uploadFileContent(a);default:return Promise.reject(`ServerProvider: Message of type ${b} not supported yet`)}}$(a,b){if(a.getType()===xk){const c=a.content,d=c.T();return(new rxjs.Observable(e=>{const f=Vk(this,c);this.N.delete(d);this.H.set(d,e);Pk(this,zk,f).catch(g=>e.error(g))})).pipe(tb(olympe.error.Qh,(e,f)=>{this.G.debug(`Subscribe to topic ${e.T()} now that we are back online, after waiting for ${f}ms`);b()}),rxjs.operators.finalize(()=>{this.N.add(d);Pk(this,Ak,{i:d}).catch(e=>
866
- {this.G.warn(`Fail to unsubscribe to graphdef ${d}: ${e}`)}).finally(()=>{this.N.has(d)&&this.H.delete(d);this.N.delete(d)})}))}return rxjs.throwError(()=>Error(`Subscription of type ${a.getType()} is not supported`))}init(a){super.init(a);xe(this.F,olympe.L.Ee.Hg,this.ja.bind(this));return this}destroy(){return u(function*(){})}ja(a,b){const c=olympe.dc.Request.j.xo,d=olympe.dc.Request.j.Bm,e=a.c;if(e===olympe.dc.Request.j.ck)$k(this,a,b).then(f=>{Rk(this,e,f)});else if(e===c)b=this.R.j(a.p,a.i),
867
- b=Nf(b,a.ct),Rk(this,e,{rollback:b,error:a.error});else if(e===Bk){const f=a.i;$k(this,a,b).then(g=>{let h;null==(h=this.H.get(f))||h.next(g)})}else e===d&&Rk(this,Fk,{id:a.i,finalize:olympe.dc.transaction.Jf.j.Bm,error:0<a.s?a.error:null})}ea(a,b){if(b instanceof olympe.dc.query.oa.Xh){const c=b.relation;let d;b=null!=(d=a.get(b.T()))?d:[];return{t:c.X(),d:c.La()===olympe.dc.va.ORIGIN?1:2,v:!0,r:c.recursive,q:b.map(this.ea.bind(this,a))}}return{}}};olympe.dc.sources.Qr.za=[olympe.dc.sources.fk];function al(a,b,c){const d=new olympe.C.Wb(`Source solver ${b.X()}`);b.fb(olympe.dm.Bd.F.$b()).fb(olympe.dm.Bd.D).ne().back().fb(olympe.dm.Bd.j).ne().observe(d,{md:c,Bc:!0}).subscribe(e=>{e.yj().forEach(([f,g])=>{a.D.set(f.X(),g.T())});e.Ej().forEach(([f])=>{a.D.delete(f)})});b.fb(olympe.dm.ib.D).observe(d,{md:c,Bc:!0}).subscribe(e=>{let f,g;a.F=null!=(g=null==(f=e.Ic())?void 0:f.T())?g:null});d.onDestroy(()=>{a.D.clear();a.F=null})}
867
+ {this.G.warn(`Fail to unsubscribe to graphdef ${d}: ${e}`)}).finally(()=>{this.N.has(d)&&this.H.delete(d);this.N.delete(d)})}))}return rxjs.throwError(()=>Error(`Subscription of type ${a.getType()} is not supported`))}init(a){super.init(a);xe(this.F,olympe.L.Ee.Hg,this.ja.bind(this));return this}destroy(){return u(function*(){})}ja(a,b){const c=olympe.dc.Request.j.yo,d=olympe.dc.Request.j.Cm,e=a.c;if(e===olympe.dc.Request.j.ck)$k(this,a,b).then(f=>{Rk(this,e,f)});else if(e===c)b=this.R.j(a.p,a.i),
868
+ b=Nf(b,a.ct),Rk(this,e,{rollback:b,error:a.error});else if(e===Bk){const f=a.i;$k(this,a,b).then(g=>{let h;null==(h=this.H.get(f))||h.next(g)})}else e===d&&Rk(this,Fk,{id:a.i,finalize:olympe.dc.transaction.Jf.j.Cm,error:0<a.s?a.error:null})}ea(a,b){if(b instanceof olympe.dc.query.na.Xh){const c=b.relation;let d;b=null!=(d=a.get(b.T()))?d:[];return{t:c.X(),d:c.La()===olympe.dc.va.ORIGIN?1:2,v:!0,r:c.recursive,q:b.map(this.ea.bind(this,a))}}return{}}};olympe.dc.sources.Qr.za=[olympe.dc.sources.fk];function al(a,b,c){const d=new olympe.C.Wb(`Source solver ${b.X()}`);b.fb(olympe.dm.Bd.F.$b()).fb(olympe.dm.Bd.D).ne().back().fb(olympe.dm.Bd.j).ne().observe(d,{md:c,Bc:!0}).subscribe(e=>{e.yj().forEach(([f,g])=>{a.D.set(f.X(),g.T())});e.Ej().forEach(([f])=>{a.D.delete(f)})});b.fb(olympe.dm.ib.D).observe(d,{md:c,Bc:!0}).subscribe(e=>{let f,g;a.F=null!=(g=null==(f=e.Ic())?void 0:f.T())?g:null});d.onDestroy(()=>{a.D.clear();a.F=null})}
868
869
  olympe.dc.sources.Sk=class{constructor(a,b,c){this.db=a;this.j=b;this.N=c;this.D=new Map;this.F=null;this.H=!1}fromModel(a){a=olympe.dc.fa(a);return this.D.has(a)?this.D.get(a):this.F&&this.R(a)?this.F:this.N}Qe(a){let b;return null!=(b=this.db.source(a))?b:this.N}jb(a){return a===this.j?olympe.dc.CloudObject.get(this.j):a===olympe.dc.Ia.SERVER?olympe.dc.CloudObject.get(olympe.dm.DataSource.SERVER):this.db.Ja(a)&&this.db.Ob(a,olympe.dm.DataSource)?olympe.dc.CloudObject.get(a):null}R(){return!1}init(){if(!this.H){this.H=
869
- !0;var a=new olympe.dc.Za;X(a.create(olympe.dm.DataSource,this.j).zi(this.j),olympe.dm.DataSource.hi,!0);a.Pa(olympe.dm.DataSource.Lj,this.j,this.j);a.ob(()=>{olympe.dc.ma.from(this.j).observe(olympe.C.lh()).subscribe(()=>{})})}}};olympe.dc.sources.P={Da:'dc.sources.Logger',mm:'dc.sources.HTTPService',Gu:'dc.sources.IOService',rr:'dc.sources.RemoteProvider',Jr:'dc.sources.ServerProvider',oC:'dc.sources.OfflineProvider',bf:'dc.sources.SourceSolver',Le:'dc.sources.Serializer',Yo:'dc.sources.cache.Cache',Zo:'dc.sources.cache.DATABASE',Nl:'dc.sources.cache.Logger'};
870
- olympe.dc.sources.U={Jh:'data.httpHost',Bf:'data.httpPort',Qi:'data.httpSSL',jm:'data.httpBasePath',Mm:'data.pollingFrequency',We:'data.communicationMode',Tm:'data.restrictedUse',VERSION:'version.version',Nr:'data.streamWorker',Tq:'data.queryConcurrencyLimit'};olympe.dc.sources.Lh={Sv:'olympe.internal.data.',Jh:'olympe.internal.data.httpHost',Bf:'olympe.internal.data.httpPort',Qi:'olympe.internal.data.httpSSL'};
871
- olympe.W.config(function(a){const b=['localhost','127.0.0.1'],c=a.getParameter(olympe.net.U.xm),d=`-${olympe.host.Xg.Uh}`;E(a,olympe.dc.sources.U.Jh,null);E(a,olympe.dc.sources.U.Bf,null);E(a,olympe.dc.sources.U.Qi,null);E(a,olympe.dc.sources.U.jm,'runtime/data');E(a,olympe.dc.sources.U.Nr,!1);E(a,olympe.dc.sources.U.Tq,10);Za(a,olympe.dc.sources.Lh.Jh,[olympe.host.U.Jk,olympe.L.U.Yl,olympe.dc.sources.U.Jh],(e,f,g)=>{if(g)return g;e=e===olympe.host.Xg.Uh;return f.endsWith(c)&&e?f+d:f});Za(a,olympe.dc.sources.Lh.Bf,
872
- [olympe.dc.sources.Lh.Jh,olympe.dc.sources.U.Bf],(e,f)=>{if(f)return f;f=b.includes(e);const g=e.endsWith(d);e=e.endsWith(c);return f?3141:g?85:e?80:443});Za(a,olympe.dc.sources.Lh.Qi,[olympe.dc.sources.Lh.Bf,olympe.dc.sources.U.Qi],(e,f)=>null!==f?f:443===e);E(a,olympe.dc.sources.U.Mm,null);E(a,olympe.dc.sources.U.We,null);E(a,olympe.dc.sources.U.Tm,null);D(a,olympe.dc.sources.P.Da,[olympe.ia.P.Ea],e=>e.cd('data'));C(a,olympe.dc.sources.P.Le,olympe.dc.sources.ec,olympe.dc.db.P.Ea);Xa(a,olympe.L.P.Le,
873
- olympe.dc.sources.P.Le);C(a,olympe.dc.sources.P.mm,olympe.dc.sources.vu,olympe.dc.sources.P.Da,olympe.net.P.nj,olympe.L.P.km,olympe.auth.P.Ea,olympe.dc.sources.P.bf,olympe.L.P.Le,new olympe.W.pa(olympe.L.U.Il));C(a,olympe.dc.sources.P.Gu,olympe.dc.sources.eq,olympe.dc.sources.P.Da,olympe.dc.P.Vg,olympe.net.P.Ea,olympe.auth.P.Ea);C(a,olympe.dc.sources.P.rr,olympe.dc.sources.Cr,olympe.dc.sources.P.Da,new olympe.W.pa(olympe.dc.U.Yg),olympe.dc.sources.P.mm,olympe.L.P.vf,olympe.dc.P.Dh,olympe.dc.sources.P.bf);
874
- C(a,olympe.dc.sources.P.Jr,olympe.dc.sources.Qr,olympe.dc.sources.P.Da,olympe.L.P.Nk,olympe.L.P.vf,olympe.dc.sources.P.mm,new olympe.W.pa(olympe.dc.sources.U.VERSION),new olympe.W.pa(olympe.dc.sources.U.Tq),new olympe.W.pa(olympe.dc.sources.U.Nr));C(a,olympe.dc.sources.P.bf,olympe.dc.sources.Sk,olympe.dc.P.Dh,new olympe.W.pa(olympe.dc.U.Yg),new olympe.W.pa(olympe.dc.U.$l));D(a,olympe.dc.sources.P.Nl,[olympe.ia.P.Ea],e=>e.cd('datacache'));C(a,olympe.dc.sources.P.Yo,olympe.dc.sources.cache.Cache,olympe.dc.sources.P.Nl,
875
- olympe.dc.P.Vg,olympe.dc.sources.P.Zo,olympe.dc.db.P.Ea,olympe.net.P.Ea,olympe.L.P.vf,olympe.Db.P.ym,olympe.V.P.Eg,new olympe.W.pa(olympe.net.U.Qq),new olympe.W.pa(olympe.dc.sources.U.VERSION));C(a,olympe.dc.sources.P.Zo,olympe.dc.sources.cache.yk,olympe.Db.P.ah,olympe.dc.sources.P.Nl,olympe.Db.P.qk)},'olympe.dc.sources');olympe.W.run([olympe.dc.sources.P.bf,olympe.dc.sources.P.Yo],(a,b)=>{olympe.dc.fe=()=>a;olympe.dc.sources.de=()=>b});olympe.dc.sources.cache={};olympe.dc.sources.cache.errors={};olympe.dc.sources.cache.errors.$m=class extends Error{constructor(a){super(a)}};olympe.dc.sources.cache.errors.Yt=class extends olympe.dc.sources.cache.errors.$m{};olympe.dc.sources.cache.errors.Kw=class extends olympe.dc.sources.cache.errors.$m{};olympe.dc.sources.cache.errors.Tw=class extends olympe.dc.sources.cache.errors.$m{};function bl(a){switch(!0){case null===a:case void 0===a:return null;case 'string'===typeof a:case 'boolean'===typeof a:case 'number'===typeof a:return a}switch(a.t){case 1:return new Date(a.d);case 2:return olympe.C.Color.Qb(a);case 17:return new olympe.dc.wc(a.v);case 13:return(new olympe.dc.transaction.dj).j(a.v,a.i);default:throw Error(`Impossible to deserialize the following value: ${a}`);}}
870
+ !0;var a=new olympe.dc.Za;X(a.create(olympe.dm.DataSource,this.j).zi(this.j),olympe.dm.DataSource.hi,!0);a.Pa(olympe.dm.DataSource.Lj,this.j,this.j);a.ob(()=>{olympe.dc.ma.from(this.j).observe(olympe.C.lh()).subscribe(()=>{})})}}};olympe.dc.sources.P={Da:'dc.sources.Logger',nm:'dc.sources.HTTPService',Gu:'dc.sources.IOService',rr:'dc.sources.RemoteProvider',Jr:'dc.sources.ServerProvider',oC:'dc.sources.OfflineProvider',bf:'dc.sources.SourceSolver',Le:'dc.sources.Serializer',Zo:'dc.sources.cache.Cache',$o:'dc.sources.cache.DATABASE',Nl:'dc.sources.cache.Logger'};
871
+ olympe.dc.sources.U={Jh:'data.httpHost',Bf:'data.httpPort',Qi:'data.httpSSL',km:'data.httpBasePath',Nm:'data.pollingFrequency',We:'data.communicationMode',Um:'data.restrictedUse',VERSION:'version.version',Nr:'data.streamWorker',Tq:'data.queryConcurrencyLimit'};olympe.dc.sources.Lh={Sv:'olympe.internal.data.',Jh:'olympe.internal.data.httpHost',Bf:'olympe.internal.data.httpPort',Qi:'olympe.internal.data.httpSSL'};
872
+ olympe.W.config(function(a){const b=['localhost','127.0.0.1'],c=a.getParameter(olympe.net.U.ym),d=`-${olympe.host.Xg.Uh}`;E(a,olympe.dc.sources.U.Jh,null);E(a,olympe.dc.sources.U.Bf,null);E(a,olympe.dc.sources.U.Qi,null);E(a,olympe.dc.sources.U.km,'runtime/data');E(a,olympe.dc.sources.U.Nr,!1);E(a,olympe.dc.sources.U.Tq,10);Za(a,olympe.dc.sources.Lh.Jh,[olympe.host.U.Jk,olympe.L.U.Yl,olympe.dc.sources.U.Jh],(e,f,g)=>{if(g)return g;e=e===olympe.host.Xg.Uh;return f.endsWith(c)&&e?f+d:f});Za(a,olympe.dc.sources.Lh.Bf,
873
+ [olympe.dc.sources.Lh.Jh,olympe.dc.sources.U.Bf],(e,f)=>{if(f)return f;f=b.includes(e);const g=e.endsWith(d);e=e.endsWith(c);return f?3141:g?85:e?80:443});Za(a,olympe.dc.sources.Lh.Qi,[olympe.dc.sources.Lh.Bf,olympe.dc.sources.U.Qi],(e,f)=>null!==f?f:443===e);E(a,olympe.dc.sources.U.Nm,null);E(a,olympe.dc.sources.U.We,null);E(a,olympe.dc.sources.U.Um,null);D(a,olympe.dc.sources.P.Da,[olympe.ia.P.Ea],e=>e.cd('data'));C(a,olympe.dc.sources.P.Le,olympe.dc.sources.ec,olympe.dc.db.P.Ea);Xa(a,olympe.L.P.Le,
874
+ olympe.dc.sources.P.Le);C(a,olympe.dc.sources.P.nm,olympe.dc.sources.vu,olympe.dc.sources.P.Da,olympe.net.P.nj,olympe.L.P.mm,olympe.auth.P.Ea,olympe.dc.sources.P.bf,olympe.L.P.Le,new olympe.W.pa(olympe.L.U.Il));C(a,olympe.dc.sources.P.Gu,olympe.dc.sources.eq,olympe.dc.sources.P.Da,olympe.dc.P.Vg,olympe.net.P.Ea,olympe.auth.P.Ea);C(a,olympe.dc.sources.P.rr,olympe.dc.sources.Cr,olympe.dc.sources.P.Da,new olympe.W.pa(olympe.dc.U.Yg),olympe.dc.sources.P.nm,olympe.L.P.vf,olympe.dc.P.Dh,olympe.dc.sources.P.bf);
875
+ C(a,olympe.dc.sources.P.Jr,olympe.dc.sources.Qr,olympe.dc.sources.P.Da,olympe.L.P.Nk,olympe.L.P.vf,olympe.dc.sources.P.nm,new olympe.W.pa(olympe.dc.sources.U.VERSION),new olympe.W.pa(olympe.dc.sources.U.Tq),new olympe.W.pa(olympe.dc.sources.U.Nr));C(a,olympe.dc.sources.P.bf,olympe.dc.sources.Sk,olympe.dc.P.Dh,new olympe.W.pa(olympe.dc.U.Yg),new olympe.W.pa(olympe.dc.U.$l));D(a,olympe.dc.sources.P.Nl,[olympe.ia.P.Ea],e=>e.cd('datacache'));C(a,olympe.dc.sources.P.Zo,olympe.dc.sources.cache.Cache,olympe.dc.sources.P.Nl,
876
+ olympe.dc.P.Vg,olympe.dc.sources.P.$o,olympe.dc.db.P.Ea,olympe.net.P.Ea,olympe.L.P.vf,olympe.Db.P.zm,olympe.V.P.Eg,new olympe.W.pa(olympe.net.U.Qq),new olympe.W.pa(olympe.dc.sources.U.VERSION));C(a,olympe.dc.sources.P.$o,olympe.dc.sources.cache.yk,olympe.Db.P.ah,olympe.dc.sources.P.Nl,olympe.Db.P.qk)},'olympe.dc.sources');olympe.W.run([olympe.dc.sources.P.bf,olympe.dc.sources.P.Zo],(a,b)=>{olympe.dc.fe=()=>a;olympe.dc.sources.de=()=>b});olympe.dc.sources.cache={};olympe.dc.sources.cache.errors={};olympe.dc.sources.cache.errors.an=class extends Error{constructor(a){super(a)}};olympe.dc.sources.cache.errors.Yt=class extends olympe.dc.sources.cache.errors.an{};olympe.dc.sources.cache.errors.Kw=class extends olympe.dc.sources.cache.errors.an{};olympe.dc.sources.cache.errors.Tw=class extends olympe.dc.sources.cache.errors.an{};function bl(a){switch(!0){case null===a:case void 0===a:return null;case 'string'===typeof a:case 'boolean'===typeof a:case 'number'===typeof a:return a}switch(a.t){case 1:return new Date(a.d);case 2:return olympe.C.Color.Qb(a);case 17:return new olympe.dc.wc(a.v);case 13:return(new olympe.dc.transaction.dj).j(a.v,a.i);default:throw Error(`Impossible to deserialize the following value: ${a}`);}}
876
877
  olympe.dc.sources.cache.Up=class{ga(a){switch(!0){case null===a:case void 0===a:return null;case 'string'===typeof a:case 'boolean'===typeof a:case 'number'===typeof a:return a;case a instanceof olympe.C.eb:return{t:1,d:a.valueOf().toISOString()};case a instanceof Date:return{t:1,d:a.toISOString()};case a instanceof olympe.C.Color:return Object.assign({t:2},a.toJSON());case a instanceof olympe.dc.wc:return{t:17,v:a.X()};case a instanceof olympe.dc.db.fc:const b=new olympe.dc.transaction.He;a.rc(b);
877
878
  return{t:13,i:a.T(),v:Xf(b)};default:throw Error(`Impossible to serialize the following value: ${a}`);}}};function Uj(a,b,c){return u(function*(){cl(a,'queries',b);yield a.init();const d=a.D.has(c)?a.D.get(c):new Set;d.has(b)||(d.add(b),a.D.set(c,d),a.N.next(dl(a)));return el(a.j,b,c)})}function Vj(a,b){return u(function*(){yield a.init();a.G.debug(`Cache: subtract pending transaction operations from ${b.T()}`);b.R(a.F)})}
878
879
  function Wj(a,b,c,d,e=!1){(()=>u(function*(){a.G.debug(`Cache: handle query ${b} graph patch: ${d.T()}`);try{const f=null===b?[]:Array.from(a.D.entries()).filter(([,h])=>h.has(b)).map(([h])=>h),g=1===f.length&&'__code-as-data__'===f[0];if(null===b||!g||a.$)a.G.debug('Cache: persist graph patch',d.T()),e&&b&&(Array.from(d.Uc()).filter(h=>!h.zd()).map(h=>h.tag()),yield fl(a.j)),yield gl(a.j,d,0<f.length?b:null),hl(a,d,c).catch(h=>{a.G.error(`Cache: Failed to download files of a graph patch: ${h}`)})}catch(f){a.G.error(`Cache: Failed to handle graph patch ${d.T()} with message: ${f}`),
@@ -885,7 +886,7 @@ function pl(a,b){return Array.from(a.D.values()).some(c=>c.has(b))}function dl(a
885
886
  function sl(a){if(!(2>a.length))for(let b=a.length-1;0<b;b--)for(let c=b-1;0<=c;c--)a[c].R(a[b])}
886
887
  function tl(a,b,c){return u(function*(){var d=olympe.dc.Request.j.ef;const e=olympe.dc.Request.j.cg,f=olympe.dc.Request.j.og;a.G.debug('Sync Cache: Applying transaction patch to destination',c,b.T());const g=ml(b);a.G.debug(`Sync Cache: Found ${g.length} files to send`);yield Promise.all(g.map(h=>u(function*(){const k=h.tag();var l=h.Vb();if(h.zd())l=new olympe.dc.Request(e,c,{tag:k,model:l});else{const n=yield ul(a.j,k);l=new olympe.dc.Request(f,c,{tag:k,model:l,content:n.content,mimeType:n.j})}if(!Rd(a.mb))throw Error('Lost connection, stop syncing');
887
888
  l=yield a.Kb.request(l);b.Yc(k,new Map([[olympe.dm.File.urlProp.X(),l]]))})));d=new olympe.dc.Request(d,c,new olympe.dc.transaction.lj(b,!1));if(!Rd(a.mb))throw Error('Lost connection, stop syncing');yield a.Kb.request(d)})}
888
- function vl(a,b,c){return c instanceof olympe.error.Vk||c instanceof olympe.error.To?(a.G.error('Sync Cache: Timeout or Connection error',c),new olympe.dc.sources.cache.errors.Yt('The connection has been lost. It can happen when the application loose connectivity or when the remote server is not responding correctly',c.message)):c instanceof olympe.error.Br?(a.G.error(`Sync Cache: transaction has been rejected by ${b} data source`,c),new olympe.dc.sources.cache.errors.Kw('The transaction has been rejected by the datasource',
889
+ function vl(a,b,c){return c instanceof olympe.error.Vk||c instanceof olympe.error.Uo?(a.G.error('Sync Cache: Timeout or Connection error',c),new olympe.dc.sources.cache.errors.Yt('The connection has been lost. It can happen when the application loose connectivity or when the remote server is not responding correctly',c.message)):c instanceof olympe.error.Br?(a.G.error(`Sync Cache: transaction has been rejected by ${b} data source`,c),new olympe.dc.sources.cache.errors.Kw('The transaction has been rejected by the datasource',
889
890
  c.message)):new olympe.dc.sources.cache.errors.Tw('Synchronisation error',c.message)}
890
891
  function wl(){var a=olympe.dc.sources.de();if(a.R)return rxjs.throwError(()=>Error('Another synchronisation is in progress'));a.R=!0;a.G.info('Sync Cache: Start synchronising transactions');const b=new rxjs.BehaviorSubject([null,null]);(()=>u(function*(){yield a.init();const c=yield xl(a.j);let d=0;const e=Array.from(c.values()).reduce((f,g)=>f+g.length,0);0<e&&b.next([e,d]);for(const [f,g]of c){sl(g);for(const h of g){a.G.debug(`Sync Cache: Processing patch ${d+1}/${e} (${h.T()})`);try{yield tl(a,
891
892
  h,f),yield yl(a.j,h)}catch(k){throw vl(a,f,k);}d+=1;b.next([e,d])}}a.H=null}))().then(()=>{a.R=!1;b.complete()}).catch(c=>{b.error(c.message)}).finally(()=>{kl(a).finally(()=>{a.R=!1})});return b.asObservable()}
@@ -893,32 +894,32 @@ function zl(){const a=olympe.dc.sources.de();return u(function*(){var b=new Set;
893
894
  function Bl(a){const b=olympe.dc.sources.de();return u(function*(){let c;try{c=JSON.parse(a)}catch(e){throw Error('Invalid pending changes, must be a JSON string');}var d=c.files;if(!Array.isArray(c.patches)||!Array.isArray(d))throw Error('Invalid pending changes, must contain a `patches` array and a `files` array');for(const e of c.files)d=b.ta.D(e.c),yield ol(b.j,e.t,d,e.m);yield Cl(b.j,c.patches);yield kl(b);b.Ha.nd(Nf(b.F))})}
894
895
  function Dl(){const a=olympe.dc.sources.de();return u(function*(){yield El(a.j);yield kl(a)})}
895
896
  olympe.dc.sources.cache.Cache=class{constructor(a,b,c,d,e,f,g,h,k,l){this.G=a;this.Kb=b;this.j=c;this.Ha=d;this.Gd=e;this.mb=f;this.Wa=g;this.ta=h;this.version=l;this.$=this.version!==this.Wa.get('__code-as-data-version__');this.Yb=this.Eb=!1;this.D=new Map;this.N=new rxjs.BehaviorSubject([]);this.H=null;this.ea=new rxjs.BehaviorSubject(!1);this.F=new olympe.dc.db.fc;this.Pc=this.Gc=!1;this.ja=[];this.Y=0;this.le=new rxjs.BehaviorSubject(!1);this.status=new rxjs.BehaviorSubject({processing:!1});this.R=
896
- !1;this.wd=new rxjs.Subject;this.Nd=new olympe.V.promise.Ur(k)}Jc(){return this.status.asObservable()}init(){const a=this;return u(function*(){if(!a.Gc)if(a.Pc)yield new Promise(b=>{a.ja.push(b)});else{a.Pc=!0;(yield Fl(a.j)).forEach(b=>{a.D.set(b.name,new Set(b.j))});a.N.next(dl(a));yield kl(a);a.Ha.nd(Nf(a.F));for(const b of a.ja)b();a.Gc=!0;a.ja=[]}})}executeQuery(a){const b=this;return u(function*(){yield b.init();return pl(b,a.T())&&ii(a).some(c=>c instanceof olympe.dc.query.oa.Pd)?Gl(b.j,a).then(olympe.V.stream.Js):
897
+ !1;this.wd=new rxjs.Subject;this.Nd=new olympe.V.promise.Ur(k)}Jc(){return this.status.asObservable()}init(){const a=this;return u(function*(){if(!a.Gc)if(a.Pc)yield new Promise(b=>{a.ja.push(b)});else{a.Pc=!0;(yield Fl(a.j)).forEach(b=>{a.D.set(b.name,new Set(b.j))});a.N.next(dl(a));yield kl(a);a.Ha.nd(Nf(a.F));for(const b of a.ja)b();a.Gc=!0;a.ja=[]}})}executeQuery(a){const b=this;return u(function*(){yield b.init();return pl(b,a.T())&&ii(a).some(c=>c instanceof olympe.dc.query.na.Pd)?Gl(b.j,a).then(olympe.V.stream.Js):
897
898
  b.j.executeQuery(a).then(olympe.V.stream.Js)})}applyTransaction(a,b){const c=this;return u(function*(){c.G.debug('Cache: apply transaction',a,b);yield c.init();const d=a.bc(),e=Array.from(d.Ab.keys());let f,g;const h=Array.from(null!=(g=null==(f=c.H)?void 0:f.j.Ab.keys())?g:[]);let k;b!==(null==(k=c.H)?void 0:k.D)||e.some(l=>!h.includes(l))?(yield Hl(c.j,d,b),c.H=new olympe.dc.sources.cache.Wt(d,b),c.ea.next(!0)):(d.rc(c.H.j),yield Hl(c.j,c.H.j,b));d.rc(c.F);yield gl(c.j,d,'local-transaction')})}uploadFileContent(a,
898
899
  b,c){const d=this;return u(function*(){yield d.init();yield ol(d.j,a,b,c);return`offline://${a}`})}downloadFileContent(a){const b=this;return u(function*(){yield b.init();return ul(b.j,a).then(c=>c.content)})}deleteFileContent(a){const b=this;return u(function*(){yield b.init();yield Il(b.j,[a])})}};olympe.dc.sources.cache.Wt=class{constructor(a,b){this.j=a;this.D=b}};olympe.dc.sources.cache.Cache.D='__code-as-data-version__';olympe.dc.sources.cache.Cache.j='__code-as-data__';function Fl(a){return u(function*(){return(yield a.db.F('buckets')).map(b=>olympe.dc.sources.cache.Vq.Qb(b))})}function ll(a){return u(function*(){return(yield a.db.F('pending-transactions')).map(b=>{b=olympe.dc.sources.cache.Sh.Qb(b);return bl(b.j)})})}function el(a,b,c){return u(function*(){a.G.debug(`Offline DB: Adding query ${b} in bucket ${c}`);return a.db.D()})}function fl(a){return u(function*(){return a.db.D()})}
899
900
  function gl(a,b,c){a.G.debug(`Offline DB: Apply patch ${b.T()} on local offline db`);Array.from(b.Ab.keys());return a.db.D().then(()=>{null===c&&(b.Ab.forEach((d,e)=>a.D.add(e)),a.F().then(()=>{}))})}function nl(a,b){return new Promise((c,d)=>{null!==a.files?c(a.files.has(b)):a.j.push(e=>{let f;return e?d(e):c(!(null==(f=a.files)||!f.has(b)))})})}
900
- function ol(a,b,c,d){c=new olympe.dc.sources.cache.Jm(b,c,d);a.files.add(b);return a.db.set('files',c.toJSON()).then(()=>{}).catch(e=>{a.files.delete(b);throw e;})}function rl(a,b){return u(function*(){return a.db.remove('buckets',b).then(()=>{})})}function xl(a){return u(function*(){return(yield a.db.F('pending-transactions')).reduce((b,c)=>{c=olympe.dc.sources.cache.Sh.Qb(c);const d=c.D;let e;const f=null!=(e=b.get(d))?e:[];f.push(bl(c.j));b.set(d,f);return b},new Map)})}
901
- function yl(a,b){return u(function*(){return a.db.remove('pending-transactions',b.T()).then(()=>{})})}function ul(a,b){return u(function*(){const c=yield a.db.get('files',b);if(!c)throw Error(`File ${b} not found in offline cache database`);return olympe.dc.sources.cache.Jm.Qb(c)})}function Al(a){return u(function*(){return a.db.F('pending-transactions')})}
901
+ function ol(a,b,c,d){c=new olympe.dc.sources.cache.Km(b,c,d);a.files.add(b);return a.db.set('files',c.toJSON()).then(()=>{}).catch(e=>{a.files.delete(b);throw e;})}function rl(a,b){return u(function*(){return a.db.remove('buckets',b).then(()=>{})})}function xl(a){return u(function*(){return(yield a.db.F('pending-transactions')).reduce((b,c)=>{c=olympe.dc.sources.cache.Sh.Qb(c);const d=c.D;let e;const f=null!=(e=b.get(d))?e:[];f.push(bl(c.j));b.set(d,f);return b},new Map)})}
902
+ function yl(a,b){return u(function*(){return a.db.remove('pending-transactions',b.T()).then(()=>{})})}function ul(a,b){return u(function*(){const c=yield a.db.get('files',b);if(!c)throw Error(`File ${b} not found in offline cache database`);return olympe.dc.sources.cache.Km.Qb(c)})}function Al(a){return u(function*(){return a.db.F('pending-transactions')})}
902
903
  function Cl(a,b){return u(function*(){const c=new Map;for(const d of b){const e=olympe.dc.sources.cache.Sh.Qb(d);e&&c.set(e.j.i,d)}yield a.db.ea()})}function El(a){return u(function*(){return a.db.clear('pending-transactions').then(()=>{})})}
903
904
  function Gl(a,b){return u(function*(){const c=b.jb();a.G.debug(`Offline DB: Executing query ${b.T()} by ID with source ${c}`);const d=olympe.dc.query.Ed.xj(b);var e=(yield a.db.H(b.T())).map(f=>olympe.dc.sources.cache.Qg.Qb(f));for(const f of e){if(f.source!==c)continue;e=olympe.dc.sources.cache.yk.ac(f);const g=Jl(f.Ld);d.create(f.tag,e,g);for(const h of f.pb)if(e=h.match(/^([a-z0-9]*)(<|>)([a-z0-9]*)$/)){const [,k,l,n]=e;e='<'===l;k===olympe.dc.hc.$c&&!0===e||d.Pa(k,e?n:f.tag,e?f.tag:n)}}a.G.j()&&
904
905
  a.G.debug(`Offline DB: Data result for query ${b.T()}`,d.bc().Ab.size,'instances',Array.from(d.bc().Jd()).length,'relations');return d})}function Hl(a,b,c){b=a.N.ga(b);a.G.debug(`save transaction in destination '${c}'`,JSON.stringify(b));return a.db.set('pending-transactions',(new olympe.dc.sources.cache.Sh(c,b,Date.now())).toJSON())}function Kl(a){return u(function*(){return a.db.N('pending-transactions')})}function Il(a,b){return u(function*(){b.forEach(c=>a.files.delete(c));yield a.db.$()})}
905
906
  function Jl(a){return Object.entries(a).reduce((b,[c,d])=>b.set(c,bl(d)),new Map)}
906
907
  olympe.dc.sources.cache.yk=class{constructor(a,b,c){this.H=`Olympe_Cache_${a}`;this.G=b;this.N=new olympe.dc.sources.cache.Up;this.db=c.D(this.H);this.D=new Set;this.j=[];this.files=null;this.db.R('files').then(d=>{this.files=new Set(d);this.j.forEach(e=>e(null))}).catch(d=>{this.j.forEach(e=>e(d))});this.F=olympe.V.Promise.uj(()=>{const d=this;return u(function*(){if(!(0===d.D.size||0<(yield Kl(d))))if(0<d.db.Y())d.F().then(()=>{}),d.G.debug('Offline DB GC: Postponing round while the stack is busy');
907
908
  else{d.G.debug(`Offline DB GC: Round with ${d.D.size} candidates`);var e=Date.now();yield d.db.D().then(()=>{});d.G.debug(`Offline DB GC: has taken ${Date.now()-e}ms to run`)}})},5E3)}static ac(a){const b=new RegExp(`^(${olympe.dc.hc.$c})>([a-z0-9]*)$`);for(const c of a.pb)if(a=c.match(b))return a[2];return null}executeQuery(a){const b=this;return u(function*(){const c=Date.now();b.G.debug(`Offline DB: Executing query ${a.T()} with source ${a.jb()}`);const d=olympe.dc.query.Ed.xj(a),e=a.jb();var f=
908
- yield b.db.get('instances',a.D),g=olympe.dc.sources.cache.Qg.Qb(f);if(!g)return d;f=new Map;const h=new Set([g.tag]);d.create(g.tag,olympe.dc.sources.cache.yk.ac(g),Jl(g.Ld));for(const p of ii(a))if(p instanceof olympe.dc.query.oa.Xh){var k=p.relation;g=k.La()===olympe.dc.va.ORIGIN;const q=k.X(),r=k.$b();k=new Set;f.set(p.T(),k);const t=[f.has(p.j)?new Set(f.get(p.j)):new Set([a.D])];for(const v of t){const x=new Map;var l=yield Promise.all(Array.from(v).map(y=>{if(!h.has(y))return b.G.warn(`Offline DB: Instance ${y} not found while processing query part, this should not happen`),
909
- Promise.resolve([]);r.X();return b.db.H().then(z=>z.map(A=>olympe.dc.sources.cache.Qg.Qb(A))).then(z=>{x.set(y,z)})})).then(()=>x);for(const [y,z]of l){p instanceof olympe.dc.query.oa.Ce&&p.F&&k.add(y);for(const A of z)if(l=A.tag,A.source===e){if(p instanceof olympe.dc.query.oa.Ce&&!k.has(l)){var n=t[t.length-1];n||(n=new Set,t.push(n));n.add(l)}k.add(l);h.has(l)||(h.add(l),n=olympe.dc.sources.cache.yk.ac(A),d.create(l,n,Jl(A.Ld)));q===olympe.dc.hc.$c&&!0===g||d.Pa(q,g?l:y,g?y:l)}}}}else p instanceof
910
- olympe.dc.query.oa.Pd&&b.G.warn(`Offline DB: Trying to execute a query ${a.T()} on the Cache DB that contains a FollowRule part. This is not supported and designed not to happen.`);b.G.j()&&(b.G.debug(`Offline DB: Data result for query ${a.T()}`,d.bc().Ab.size,'instances',Array.from(d.bc().Jd()).length,'relations'),b.G.debug(`Offline DB: Data result for query ${a.T()} took ${Date.now()-c}ms to be executed`));return d})}};
909
+ yield b.db.get('instances',a.D),g=olympe.dc.sources.cache.Qg.Qb(f);if(!g)return d;f=new Map;const h=new Set([g.tag]);d.create(g.tag,olympe.dc.sources.cache.yk.ac(g),Jl(g.Ld));for(const p of ii(a))if(p instanceof olympe.dc.query.na.Xh){var k=p.relation;g=k.La()===olympe.dc.va.ORIGIN;const q=k.X(),r=k.$b();k=new Set;f.set(p.T(),k);const t=[f.has(p.j)?new Set(f.get(p.j)):new Set([a.D])];for(const v of t){const x=new Map;var l=yield Promise.all(Array.from(v).map(y=>{if(!h.has(y))return b.G.warn(`Offline DB: Instance ${y} not found while processing query part, this should not happen`),
910
+ Promise.resolve([]);r.X();return b.db.H().then(z=>z.map(A=>olympe.dc.sources.cache.Qg.Qb(A))).then(z=>{x.set(y,z)})})).then(()=>x);for(const [y,z]of l){p instanceof olympe.dc.query.na.Ce&&p.F&&k.add(y);for(const A of z)if(l=A.tag,A.source===e){if(p instanceof olympe.dc.query.na.Ce&&!k.has(l)){var n=t[t.length-1];n||(n=new Set,t.push(n));n.add(l)}k.add(l);h.has(l)||(h.add(l),n=olympe.dc.sources.cache.yk.ac(A),d.create(l,n,Jl(A.Ld)));q===olympe.dc.hc.$c&&!0===g||d.Pa(q,g?l:y,g?y:l)}}}}else p instanceof
911
+ olympe.dc.query.na.Pd&&b.G.warn(`Offline DB: Trying to execute a query ${a.T()} on the Cache DB that contains a FollowRule part. This is not supported and designed not to happen.`);b.G.j()&&(b.G.debug(`Offline DB: Data result for query ${a.T()}`,d.bc().Ab.size,'instances',Array.from(d.bc().Jd()).length,'relations'),b.G.debug(`Offline DB: Data result for query ${a.T()} took ${Date.now()-c}ms to be executed`));return d})}};
911
912
  olympe.dc.sources.cache.Vq=class{constructor(a,b){this.name=a;this.j=b}static Qb(a){return a?new olympe.dc.sources.cache.Vq(a.name,a.queryIds):null}toJSON(){return{name:this.name,queryIds:this.j}}};
912
913
  olympe.dc.sources.cache.Qg=class{constructor(a,b,c,d,e){this.tag=a;this.source=b;this.Ld=null!=c?c:{};this.pb=null!=d?d:[];this.j=null!=e?e:[]}static Qb(a){return a?new olympe.dc.sources.cache.Qg(a.tag,a.source,a.props,a.relations,a.queryIds):null}toJSON(){return{tag:this.tag,source:this.source,props:this.Ld,relations:this.pb,queryIds:this.j}}};
913
914
  olympe.dc.sources.cache.Sh=class{constructor(a,b,c){this.D=a;this.j=b;this.timestamp=c}static Qb(a){return a?new olympe.dc.sources.cache.Sh(a.destination,a.patch,a.timestamp):null}toJSON(){return{destination:this.D,patch:this.j,timestamp:this.timestamp}}};
914
915
  olympe.dc.sources.cache.Nv=class extends olympe.dc.sources.cache.Sh{constructor(a,b,c,d){super(a,b,c);this.error=d}static Qb(a){return a?new olympe.dc.sources.cache.Nv(a.destination,a.patch,a.timestamp,a.error):null}toJSON(){return{destination:this.D,patch:this.j,timestamp:this.timestamp,error:this.error}}};
915
- olympe.dc.sources.cache.Jm=class{constructor(a,b,c){this.tag=a;this.content=b;this.j=c}static Qb(a){return a?new olympe.dc.sources.cache.Jm(a.tag,a.content,a.mimetype):null}toJSON(){return{tag:this.tag,content:this.content,mimetype:this.j}}};function Ll(a,b){let c=a.N.get(b);c||(c=new Set(a.j.get(b).pb),a.N.set(b,c));return c}
916
+ olympe.dc.sources.cache.Km=class{constructor(a,b,c){this.tag=a;this.content=b;this.j=c}static Qb(a){return a?new olympe.dc.sources.cache.Km(a.tag,a.content,a.mimetype):null}toJSON(){return{tag:this.tag,content:this.content,mimetype:this.j}}};function Ll(a,b){let c=a.N.get(b);c||(c=new Set(a.j.get(b).pb),a.N.set(b,c));return c}
916
917
  olympe.dc.sources.cache.zu=class{constructor(a,b){this.G=a;this.F=b;this.j=new Map;this.R=new Set;this.Y=new Set;this.H=new olympe.dc.sources.cache.Up;this.N=new Map}Uc(){this.R.forEach(a=>this.j.delete(a));Array.from(this.j.entries()).forEach(([a,b])=>{b||this.j.delete(a)});return this.j}Rc(a,b,c){const d=this.j.get(a);d||this.Y.add(a);var e;c=Array.from(null!=c?c:[]).reduce((h,k)=>{h[k[0]]=this.H.ga(k[1]);return h},null!=(e=null==d?void 0:d.Ld)?e:{});let f;e=null!=(f=null==d?void 0:d.j)?f:[];null===
917
918
  this.F||e.includes(this.F)||e.push(this.F);let g;b=new olympe.dc.sources.cache.Qg(a,b,c,null!=(g=null==d?void 0:d.pb)?g:[],e);this.j.set(a,b)}Yc(a,b){const c=this.j.get(a);if(c){var d;c.Ld=Array.from(b).reduce((e,[f,g])=>{null===g?delete e[f]:e[f]=this.H.ga(g);return e},null!=(d=c.Ld)?d:{})}else this.G.warn(`Trying to update an instance (${a}) which do not exists in the cache database: ignoring.`)}D(a){this.R.add(a)}Pa(a,b,c){var d;const e=null!=(d=this.j.get(b))?d:new olympe.dc.sources.cache.Qg(b,
918
919
  'unknown',{},[],[]);var f;d=null!=(f=this.j.get(c))?f:new olympe.dc.sources.cache.Qg(c,'unknown',{},[],[]);b=`${a}${olympe.dc.va.ORIGIN}${b}`;f=(g,h)=>{this.j.set(g.tag,g);const k=Ll(this,g.tag);k.has(h)||(g.pb.push(h),k.add(h));null===this.F||g.j.includes(this.F)||g.j.push(this.F)};f(e,`${a}${olympe.dc.va.DESTINATION}${c}`);f(d,b)}ic(a,b,c){const d=this.j.get(b),e=this.j.get(c);c=`${a}${olympe.dc.va.DESTINATION}${c}`;a=`${a}${olympe.dc.va.ORIGIN}${b}`;b=(f,g)=>{const h=Ll(this,f.tag);if(h.has(g)){const k=
919
- f.pb.indexOf(g);f.pb.splice(k,1);h.delete(g)}};d&&b(d,c);e&&b(e,a)}};olympe.dc.sources.cache.zu.za=[olympe.dc.Writable];olympe.dc.transaction={};olympe.dc.Gi=class a{constructor(b,c){this.id=null!=b?b:olympe.V.Kc();this.D=new olympe.C.Wb('BurstTransaction#'+this.id,c);this.Eb=Ml(this);this.R=!1;this.D.onDestroy(()=>this.N());this.Y=new Set;this.F=new Map;this.H=new Set;this.j=null;let d;this.Wa=null!=(d=olympe.W.getParameter(olympe.dc.transaction.U.wo))?d:30;this.ja=[]}static j(b,c){return`${b},${c}`}Yb(b){for(const c of this.ja)c(b);this.stop()}Ha(){null!==this.j&&(clearTimeout(this.j),this.j=null);const b=this.ea(this.H);0<b.size&&Nl(this,
920
+ f.pb.indexOf(g);f.pb.splice(k,1);h.delete(g)}};d&&b(d,c);e&&b(e,a)}};olympe.dc.sources.cache.zu.za=[olympe.dc.Writable];olympe.dc.transaction={};olympe.dc.Gi=class a{constructor(b,c){this.id=null!=b?b:olympe.V.Kc();this.D=new olympe.C.Wb('BurstTransaction#'+this.id,c);this.Eb=Ml(this);this.R=!1;this.D.onDestroy(()=>this.N());this.Y=new Set;this.F=new Map;this.H=new Set;this.j=null;let d;this.Wa=null!=(d=olympe.W.getParameter(olympe.dc.transaction.U.xo))?d:30;this.ja=[]}static j(b,c){return`${b},${c}`}Yb(b){for(const c of this.ja)c(b);this.stop()}Ha(){null!==this.j&&(clearTimeout(this.j),this.j=null);const b=this.ea(this.H);0<b.size&&Nl(this,
920
921
  b,!1);this.H.clear()}ea(b){const c=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.F.get(d))});return c}$(b,c,d){this.ta(b,c,d);this.Eb(b,c,d);null===this.j&&(this.j=setTimeout(this.Ha.bind(this),this.Wa))}ta(b,c,d){b=a.j(b,c);this.F.set(b,d);this.H.add(b)}mb(b,c){return this.F.get(a.j(b,c))}push(b,c){const d=olympe.dc.fa(b);b=c.subscribe(e=>{for(const [f,g]of e)e=olympe.dc.fa(f),this.mb(d,e)!==g&&this.$(d,e,g.valueOf())});this.Y.add(b)}complete(){return new Promise((b,
921
- c)=>{this.N((d,e)=>{for(const f of this.Y)f.unsubscribe();d?b():c(e)})})}update(b,c,d){const e=olympe.dc.fa(b),f=olympe.dc.fa(c);void 0===e||void 0===f?olympe.ia.Ya('dc').error('Burst transaction: instance tag or property tag is undefined'):(this.D.run(()=>{olympe.C.Sn([d],g=>{this.R=!0;if(g instanceof olympe.dc.wc)olympe.ia.Ya('dc').error('Cannot send complex property values in burst transactions');else{var h;this.$(e,f,null!=(h=null==g?void 0:g.valueOf())?h:null)}})}),this.D.Yd(()=>{this.N()}))}stop(){this.D.destroy();
922
+ c)=>{this.N((d,e)=>{for(const f of this.Y)f.unsubscribe();d?b():c(e)})})}update(b,c,d){const e=olympe.dc.fa(b),f=olympe.dc.fa(c);void 0===e||void 0===f?olympe.ia.Ya('dc').error('Burst transaction: instance tag or property tag is undefined'):(this.D.run(()=>{olympe.C.Tn([d],g=>{this.R=!0;if(g instanceof olympe.dc.wc)olympe.ia.Ya('dc').error('Cannot send complex property values in burst transactions');else{var h;this.$(e,f,null!=(h=null==g?void 0:g.valueOf())?h:null)}})}),this.D.Yd(()=>{this.N()}))}stop(){this.D.destroy();
922
923
  this.ja.length=0}getContext(){return this.D}T(){return this.id}uh(){return!1}N(b){if(this.R){this.R=!1;null!==this.j&&(clearTimeout(this.j),this.j=null);this.H.clear();const c=this.ea(new Set(this.F.keys()));Nl(this,c,!0,b)}else null==b||b(!0)}toString(){return'Burst transaction #'+this.id}};olympe.dc.Gi.prototype.complete=olympe.dc.Gi.prototype.complete;olympe.dc.Gi.prototype.push=olympe.dc.Gi.prototype.push;olympe.dc.Nc=class{j(){}toString(){}};olympe.dc.Nc.j=1;olympe.dc.Nc.D=2;olympe.dc.Nc.H=3;olympe.dc.Nc.F=4;olympe.dc.Nc.N=5;olympe.dc.transaction.dj=class a{constructor(b){this.F=null!=b?b:olympe.dc.Ia.SERVER}static j(b){const c=new Map;for(const [d,e]of Object.entries(b)){b=d;let f=typeof e;20<b.length&&b.startsWith('fd')&&(b=olympe.dc.ie.Ye+b.substring(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':case 'boolean':case 'number':c.set(b,e);break;case '4':c.set(b,new Date(Date.UTC(e.y,e.M-1,e.d,e.h,e.m,
923
924
  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&&e.M-1||0,e.d||1,e.h,e.m,e.s,e.S)));break;case '7':c.set(b,new olympe.C.Color(e.r,e.g,e.b,e.a));break;case '8':c.set(b,new olympe.dc.wc(e.t));break;case 'untyped':null===e&&c.set(b,null)}}return c}j(b,c){return this.D(b,new olympe.dc.db.fc(c))}D(b,c){for(const d of b)switch(d.o){case olympe.dc.Nc.j:b=a.j(d.p||{});let e;c.Rc(d.t,null!=(e=d.s)?e:this.F,b,d.m);break;case olympe.dc.Nc.D:c.Yc(d.t,
924
925
  a.j(d.p),d.m);break;case olympe.dc.Nc.H:c.D(d.t,d.f,d.m);break;case olympe.dc.Nc.F:c.Pa(d.m,d.l,d.r,d.lm,d.rm);break;case olympe.dc.Nc.N:c.ic(d.m,d.l,d.r,d.lm,d.rm);break;default:throw Error('Undefined patch operation: '+d.o);}return c}};function Ol(a,b){let c;return null!=(c=a.sources.get(b))?c:a.H.Qe(b)}function Pl(a,b){let c,d,e;return null!=(e=null!=(d=null==(c=a.j.Tc(b))?void 0:c.Vb())?d:a.db.model(b))?e:null}function Z(a,b){let c;return null!=(c=a.F.get(b))?c:a.db.Re(b)||!a.db.Ja(b)}function Ql(a,b){0===a.F.size?a.F=b:b.forEach((c,d)=>a.F.set(d,c))}function Rl(a){return Array.from(a.j.Uc()).filter(b=>!b.zd()).map(b=>b.tag())}function Sl(a){return Array.from(a.j.Uc()).filter(b=>b.zd()).map(b=>b.tag())}
@@ -931,58 +932,58 @@ typeof a.X?{c:8,t:a.X()}:a}}function Xf(a){const b=a.H.concat(a.F).concat(a.N).c
931
932
  olympe.dc.transaction.He=class{constructor({wl:a=!1,ii:b=!0,me:c=!0}={}){this.N=[];this.F=[];this.j=[];this.R=[];this.H=[];this.wl=null!=a?a:!1;this.me=null!=c?c:!0;this.ii=null!=b?b:!0;this.Y=olympe.C?new Xl:new class extends Xl{R(d){return d&&'function'===typeof d.X?{c:8,t:d.X()}:d}}}flush(){return JSON.stringify(Xf(this))}Rc(a,b,c,d=null){c=Vl(this.Y,null!=c?c:null,this.wl);c={o:olympe.dc.Nc.j,t:a,p:c};this.ii&&(c.s=b);this.me&&d&&(c.m=d);this.N.push(c);this.wl&&(b=Wl(this.Y))&&this.j.push({o:olympe.dc.Nc.D,
932
933
  t:a,p:b})}Yc(a,b,c=null){b=Vl(this.Y,b||null,!1);a={o:olympe.dc.Nc.D,t:a,p:b};this.me&&c&&(a.m=c);this.j.push(a)}D(a,b,c=null){a={o:olympe.dc.Nc.H,t:a,f:b};this.me&&c&&(a.m=c);this.F.push(a)}Pa(a,b,c,d=null,e=null){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`);a={o:olympe.dc.Nc.F,m:a,l:b,r:c};this.me&&d&&(a.lm=d);this.me&&
933
934
  e&&(a.rm=e);this.R.push(a)}ic(a,b,c,d=null,e=null){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');a={o:olympe.dc.Nc.N,m:a,l:b,r:c};this.me&&d&&(a.lm=d);this.me&&e&&(a.rm=e);this.H.push(a)}};olympe.dc.transaction.He.za=[olympe.dc.Writable];function Yl(a){var b=new olympe.dc.Za;b.Y=a;return b}function Zl(a,b){b instanceof olympe.dc.Za&&b.D.forEach((c,d)=>a.D.set(d,c));a.Ga.push(b);return b}
934
- function $l(a,b,c,d){c=a.create(null!=c?c:olympe.dc.CloudObject,void 0);if('string'===typeof b)b=b||'',X(c,olympe.dc.CloudObject.nameProp.X(),b);else for(const [f,g]of Object.entries(b))X(c,f,g);b=c.X();d=null!=d?d:olympe.dc.CloudObject;const e=olympe.dc.CloudObject.extendRel.X();Zl(a,new olympe.dc.transaction.Ga.hp(e,b));Zl(a,new olympe.dc.transaction.Ga.Vl(e,b,d));return c}
935
+ function $l(a,b,c,d){c=a.create(null!=c?c:olympe.dc.CloudObject,void 0);if('string'===typeof b)b=b||'',X(c,olympe.dc.CloudObject.nameProp.X(),b);else for(const [f,g]of Object.entries(b))X(c,f,g);b=c.X();d=null!=d?d:olympe.dc.CloudObject;const e=olympe.dc.CloudObject.extendRel.X();Zl(a,new olympe.dc.transaction.Ga.ip(e,b));Zl(a,new olympe.dc.transaction.Ga.Vl(e,b,d));return c}
935
936
  function am(a,b){if(a.H)throw Error('Operation not permitted: this transaction has already been executed');a.H=!0;const c=[d=>{a.H=d},...a.$,null!=b?b:()=>{}];return(d,e)=>{c.forEach(f=>f(d,e))}}
936
- olympe.dc.Za=class{constructor(a){this.id=null!=a?a:olympe.V.Kc();this.Ga=[];this.F=new Map;this.Y=!0;this.D=new Map;this.$=[];this.H=this.N=!1;this.R=[...olympe.dc.Fj().$]}T(){return this.id}model(a){let b;return null!=(b=this.F.get(olympe.dc.fa(a)))?b:olympe.dc.ha().model(a)}j(a){Ql(a,this.D);for(const b of this.Ga)b.j(a);try{this.R.forEach(b=>b(a))}catch(b){throw Error(`Transaction compilation error: ${b.message}`);}}create(a,b){b=Zl(this,new olympe.dc.transaction.Ga.Wo(a,b));const c=b.X();this.F.set(c,
937
+ olympe.dc.Za=class{constructor(a){this.id=null!=a?a:olympe.V.Kc();this.Ga=[];this.F=new Map;this.Y=!0;this.D=new Map;this.$=[];this.H=this.N=!1;this.R=[...olympe.dc.Fj().$]}T(){return this.id}model(a){let b;return null!=(b=this.F.get(olympe.dc.fa(a)))?b:olympe.dc.ha().model(a)}j(a){Ql(a,this.D);for(const b of this.Ga)b.j(a);try{this.R.forEach(b=>b(a))}catch(b){throw Error(`Transaction compilation error: ${b.message}`);}}create(a,b){b=Zl(this,new olympe.dc.transaction.Ga.Xo(a,b));const c=b.X();this.F.set(c,
937
938
  olympe.dc.fa(a));let d;this.persist(c,null!=(d=this.D.get(c))?d:this.Y);return b}persist(a,b=!0){const c=olympe.dc.fa(a);var d=olympe.dc.ha();this.D.set(c,b);if(b){let f;b=null!=(f=this.F.get(c))?f:d.model(c);if(null===b)throw Error(`Try to persist an instance that does not exist: ${c}`);var e;d=null!=(e=d.source(a))?e:olympe.dc.fe().fromModel(b);Zl(this,new olympe.dc.transaction.Ga.Xv(c,d))}else{if((e=d.Ja(c))&&d.Re(c))throw Error(`Try to remove persistence of an instance already persisted: ${c}`);
938
- if(!e&&!this.F.has(c))throw Error(`Try to remove persistence of an instance that does not exist and is not part of the transaction: ${c}`);}return this}delete(a,b=olympe.dc.Mb.Dc){Zl(this,new olympe.dc.transaction.Ga.ip(a,b))}update(a,b,c){return Zl(this,new olympe.dc.transaction.Ga.Vw(a,b,c))}Pa(a,b,c){Zl(this,new olympe.dc.transaction.Ga.Vl(a,b,c))}ic(a,b,c){Zl(this,new olympe.dc.transaction.Ga.hu(a,b,c))}wn(a,b){Zl(this,new olympe.dc.transaction.Ga.hp(a,b))}defineProperty(a,b,c,d,e,f){d=this.create(olympe.dm.Property,
939
+ if(!e&&!this.F.has(c))throw Error(`Try to remove persistence of an instance that does not exist and is not part of the transaction: ${c}`);}return this}delete(a,b=olympe.dc.Mb.Dc){Zl(this,new olympe.dc.transaction.Ga.jp(a,b))}update(a,b,c){return Zl(this,new olympe.dc.transaction.Ga.Vw(a,b,c))}Pa(a,b,c){Zl(this,new olympe.dc.transaction.Ga.Vl(a,b,c))}ic(a,b,c){Zl(this,new olympe.dc.transaction.Ga.hu(a,b,c))}xn(a,b){Zl(this,new olympe.dc.transaction.Ga.ip(a,b))}defineProperty(a,b,c,d,e,f){d=this.create(olympe.dm.Property,
939
940
  f);X(d,olympe.dc.CloudObject.nameProp,c||'');void 0!==e&&this.update(a,olympe.dc.ie.Ye+d.X(),e);this.Pa(olympe.dc.CloudObject.propertyRel,a,d);this.Pa(olympe.dm.Property.typeRel,d,b);this.Pa(olympe.dc.CloudObject.containsRel,a,d);return d}Ds(a,b,c='',{KE:d=olympe.dm.Relation.H.Jv,WE:e=olympe.dm.Relation.j.cw,RE:f=olympe.dm.Relation.j.Kt,uF:g=olympe.dm.Relation.j.Wp,HE:h=olympe.dm.Dl.NONE,tF:k=olympe.dm.Relation.N|h}={},l=olympe.V.Kc()){c=X(X(X(X(X(X(X(X(X(X(this.create(olympe.dm.Relation,l),olympe.dc.CloudObject.nameProp,
940
- c||''),olympe.dm.Relation.D,d),olympe.dm.Relation.F,k),olympe.dm.Relation.ea,e),olympe.dm.Relation.ta,e),olympe.dm.Relation.$,e),olympe.dm.Relation.Y,f),olympe.dm.Relation.ja,g),olympe.dm.Relation.Ha,olympe.dm.Relation.j.Wp),olympe.dm.Relation.R,h);this.Pa(olympe.dc.CloudObject.Kj,a,c);this.Pa(olympe.dm.Relation.destinationModelRel,c,b);this.Pa(olympe.dc.CloudObject.containsRel,a,c);return c}uh(){return!1}mn(a){this.$.push(olympe.C.$a().tc(a))}ob(a,b){bm(olympe.dc.Fj(),this,am(this,a),b)}xn(a){a=
941
+ c||''),olympe.dm.Relation.D,d),olympe.dm.Relation.F,k),olympe.dm.Relation.ea,e),olympe.dm.Relation.ta,e),olympe.dm.Relation.$,e),olympe.dm.Relation.Y,f),olympe.dm.Relation.ja,g),olympe.dm.Relation.Ha,olympe.dm.Relation.j.Wp),olympe.dm.Relation.R,h);this.Pa(olympe.dc.CloudObject.Kj,a,c);this.Pa(olympe.dm.Relation.destinationModelRel,c,b);this.Pa(olympe.dc.CloudObject.containsRel,a,c);return c}uh(){return!1}nn(a){this.$.push(olympe.C.$a().tc(a))}ob(a,b){bm(olympe.dc.Fj(),this,am(this,a),b)}yn(a){a=
941
942
  am(this,a);cm(olympe.dc.Fj(),this,a,!0)}toString(){return`Transaction #${this.id}`}};olympe.dc.Za.za=[olympe.dc.Nc];function Ml(a){var b=olympe.dc.Fj();const c=a.T();b.H.set(c,a);return(d,e,f)=>{const g=new olympe.dc.db.fc(c);g.Yc(d,(new Map).set(e,f),b.db.model(d));b.j.nd(Nf(g,Infinity))}}
942
943
  function Nl(a,b,c,d){var e=olympe.dc.Fj();const f=olympe.dc.Request.j.Fi,g=olympe.dc.Request.j.zh,h=a.T();a=a.uh();const k=new Map;for(const l of b.keys()){const n=e.db.source(l);if(n===olympe.dc.Ia.SELF||!e.db.Re(l))continue;let p=k.get(n);p||(p=new olympe.dc.db.fc(h),k.set(n,p));p.Yc(l,b.get(l),e.db.model(l))}for(const [l,n]of k)b=new olympe.dc.Request(c?g:f,l,new olympe.dc.transaction.lj(n,a)),b=e.Kb.request(b).catch(p=>null==d?void 0:d(!1,`${p}`)),c&&b.then(p=>{e.j.nd(Nf(n,p));null==d||d(!0)})}
943
- function bm(a,b,c,d){if(d){const e=b.T();a.D.set(e,c);cm(a,b,(f,g)=>{f||(a.D.delete(e),c(f,g))},!1)}else cm(a,b,c,!1)}function dm(a){const b=olympe.dc.Request.j.jk;Vf(a.Kb,olympe.dc.Request.j.xo,c=>{var d=c.content;c=d.rollback;d=d.error;const e=c.T(),f=a.H.get(e);void 0!==f&&(a.H.delete(e),f.Yb(d));a.j.nd(c);a.G.warn(`Burst update (id=${e}) has been refused and is rolled back. Error: ${d}`)});Vf(a.Kb,b,c=>{c=c.content;em(a,c.id,c.finalize,c.error)})}
944
+ function bm(a,b,c,d){if(d){const e=b.T();a.D.set(e,c);cm(a,b,(f,g)=>{f||(a.D.delete(e),c(f,g))},!1)}else cm(a,b,c,!1)}function dm(a){const b=olympe.dc.Request.j.jk;Vf(a.Kb,olympe.dc.Request.j.yo,c=>{var d=c.content;c=d.rollback;d=d.error;const e=c.T(),f=a.H.get(e);void 0!==f&&(a.H.delete(e),f.Yb(d));a.j.nd(c);a.G.warn(`Burst update (id=${e}) has been refused and is rolled back. Error: ${d}`)});Vf(a.Kb,b,c=>{c=c.content;em(a,c.id,c.finalize,c.error)})}
944
945
  function fm(a,b,c){if(!c)throw Error('Transaction compiler id is required');a.ta.has(c)||a.$.push(b);return a}
945
946
  function cm(a,b,c,d=!1){const e=b.T(),f=new olympe.dc.transaction.Wv(a.db,a.ja,e);try{b.j(f)}catch(q){if(q instanceof olympe.dc.Nq){q.j.then(()=>cm(a,b,c,d));return}c(!1,q.message);return}if(f.pf()){c(!0);var g;null==(g=a.D.get(e))||g(!0);a.D.delete(e)}else{a.F.set(e,[]);var h=Rl(f);a.j.oe(h,olympe.dc.db.Instance.j.TRANSACTION);g=h.filter(q=>Z(f,q));var k=Sl(f).filter(q=>a.db.Re(q)&&a.db.Ob(q,olympe.dm.File)&&a.db.source(q)!==olympe.dc.Ia.SERVER).map(q=>[q,a.db.model(q),a.db.source(q)]),l=Qg(a.j,
946
947
  f.j,g),n=olympe.C.$a().tc((q,r)=>c(null!==q,r)),p=[l,n];gm(a,f,g).then(q=>{p.splice(1,0,q);hm(a,e,h,f.D.size+1);return im(a,f.D,d,b.uh(),b.N)}).then(q=>Promise.allSettled(k.map(([r,t,v])=>a.N.ta(r,t,v))).then(r=>{r.forEach(t=>{'rejected'===t.status&&a.G.warn('Some binary files have not been deleted after the transaction:',t.reason)});return q})).then(q=>{p.forEach(r=>r(q));em(a,e,olympe.dc.transaction.Jf.j.$i)}).catch(q=>{a.G.error(q);p.forEach(r=>r(null,`${q}`));jm(a,e)})}}
947
948
  function gm(a,b,c){const d=b.j,e=olympe.dm.File.urlProp.X();c=c.filter(n=>{let p;return a.db.Ob(n,olympe.dm.File)&&void 0!==(null==(p=d.Tc(n))?void 0:p.Ra(e))}).map(olympe.dc.CloudObject.get);if(0===c.length)return Promise.resolve(()=>{});const f=olympe.dm.File.j.X(),g=olympe.dm.File.modificationDateProp.X(),h=Array.from(b.D.values()),k=[],l=olympe.V.kf();return Promise.all(c.map(n=>{const p=n.get(e);if(p.startsWith('blob:'))return l.F(p).then(q=>new Promise((r,t)=>{if(null===q)URL.revokeObjectURL(p),
948
- r();else{var v=n.X(),x,y=null!=(x=n.get(olympe.dm.File.mimeTypeProp))?x:'application/data';a.N.ja(v,q,y,z=>{const A=h.reduce((K,Y)=>K||Y.Tc(v),null);null!==A&&(z=(new Map).set(e,z).set(f,!0).set(g,new Date),A.ln(z),k.push([v,z]));URL.revokeObjectURL(p);r()},t)}}));2048<p.length&&a.G.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:',n.X());return Promise.resolve([])})).then(()=>{const n=k.reduce((p,[q,r])=>{p.Yc(q,r);return p},
949
+ r();else{var v=n.X(),x,y=null!=(x=n.get(olympe.dm.File.mimeTypeProp))?x:'application/data';a.N.ja(v,q,y,z=>{const A=h.reduce((K,Y)=>K||Y.Tc(v),null);null!==A&&(z=(new Map).set(e,z).set(f,!0).set(g,new Date),A.mn(z),k.push([v,z]));URL.revokeObjectURL(p);r()},t)}}));2048<p.length&&a.G.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:',n.X());return Promise.resolve([])})).then(()=>{const n=k.reduce((p,[q,r])=>{p.Yc(q,r);return p},
949
950
  new olympe.dc.db.fc);return Qg(a.j,n)})}function hm(a,b,c,d){const e=olympe.C.lh(),f=new olympe.async.Dk(e);0<a.R&&f.$f(a.R);const g=olympe.dc.transaction.Jf.j.Ev;let h=!0;const k=a.F.get(b);for(let l=0;l<d;l++)f.add((n,p)=>{k.push(e.tc((q,r)=>{h&&(h=q!==g);r?p(r):n()}))});ud(f,(l,n)=>{l||a.G.warn(`An error occurred while processing the notification of transaction (${b}): ${n}.`);h&&a.j.detach(c,olympe.dc.db.Instance.j.TRANSACTION);jm(a,b)});f.start()}
950
951
  function im(a,b,c,d,e){if(c&&olympe.C.Qa(a.ea.state)!==olympe.auth.Ua.j.sf)return Promise.reject('Cannot persist with batch transactions API if not authenticated (aka: `Transaction.executeAsLarge()`).');const f=c?olympe.dc.Request.j.eh:olympe.dc.Request.j.ef;return Promise.all(Array.from(b).map(([g,h])=>{g=new olympe.dc.Request(f,g,new olympe.dc.transaction.lj(h,d,e));return a.Kb.request(g)})).then(g=>g[0])}
951
952
  function em(a,b,c,d){let e,f;null==(f=null==(e=a.F.get(b))?void 0:e.pop())||f(c,null!=d?d:null)}function jm(a,b){var c;null==(c=a.F.get(b))||c.forEach(d=>{d(olympe.dc.transaction.Jf.j.$i,null)});a.F.delete(b);if(0===a.F.size){for(const d of a.Y)d();a.Y=[]}a.D.has(b)&&(c=a.D.get(b),a.D.delete(b),c(!0))}
952
953
  olympe.dc.transaction.Jf=class{constructor(a,b,c,d,e,f,g){this.G=a;this.j=b;this.db=b.view;this.Kb=c;this.ja=d;this.N=e;this.ea=f;this.R=g.get('notificationTimeout');this.$=[];let h;this.ta=new Set(null!=(h=g.get('disabledCompilers'))?h:[]);this.H=new olympe.V.$h(g.get('burstHoldTime'));this.F=new Map;this.Y=[];this.D=new Map;this.Ha=new olympe.V.promise.Tk;dm(this)}se(a){wb(this.Ha,()=>this.Kb.request(new olympe.dc.Request(olympe.dc.Request.j.Fp,olympe.dc.Ia.SERVER)).then(b=>{a(b.ids,b.undo_stack_size,
953
- b.redo_stack_size)}).catch(b=>this.G.error('Failed to process get stack request',b))).then(()=>{})}};olympe.dc.transaction.Jf.j={Bm:0,$i:1,Ev:2};olympe.dc.transaction.lj=class{constructor(a,b=!1,c=!1){this.D=a;this.F=b;this.j=c}uh(){return this.F}bc(){return this.D}};olympe.dc.transaction.P={Da:'dc.transaction.Logger',Ea:'dc.transaction.Manager'};olympe.dc.transaction.U={Bq:'dc.transaction.timeout',wo:'dc.transaction.burstInterval',bm:'dc.transaction.disabledCompilers'};
954
- olympe.W.config(function(a){E(a,olympe.dc.transaction.U.Bq,9E4);E(a,olympe.dc.transaction.U.wo,30);E(a,olympe.dc.transaction.U.bm,[]);D(a,olympe.dc.transaction.P.Da,[olympe.ia.P.Ea],b=>b.cd('dc'));D(a,'olympe.dc.transaction.Config',[new olympe.W.pa(olympe.dc.transaction.U.Bq),new olympe.W.pa(olympe.dc.transaction.U.bm),new olympe.W.pa(olympe.dc.db.U.Pl)],(b,c,d)=>new Map([['notificationTimeout',b],['disabledCompilers',c],['burstHoldTime',d]]));C(a,olympe.dc.transaction.P.Ea,olympe.dc.transaction.Jf,
955
- olympe.dc.transaction.P.Da,olympe.dc.db.P.Ea,olympe.dc.P.Vg,olympe.dc.sources.P.bf,olympe.dc.P.hk,olympe.auth.P.Ea,'olympe.dc.transaction.Config')},'olympe.dc.transaction');olympe.dc.transaction.Ga={};function km(a,b){const c=new Map;for(const [d,e]of b)c.set(d,a.Qa(e));return c}olympe.dc.transaction.Ga.Dg=class{constructor(){this.ha=olympe.dc.ha()}j(){throw Error('Abstract method build() not override !');}toString(){throw Error('Abstract method toString() not override !');}Qa(a){a=olympe.C.Qa(a);return void 0===a||null===a?null:olympe.C.$s(a)?a.valueOf():a}};olympe.dc.transaction.Ga.Dg.za=[olympe.dc.Nc];olympe.dc.transaction.Ga.oo=class extends olympe.dc.transaction.Ga.Dg{constructor(a,b){super();this.relation=a instanceof olympe.dc.Sa.Relation?a:new olympe.dc.Sa.Relation(olympe.dc.fa(a));this.origin=this.ha.Ja(b)?olympe.dc.CloudObject.get(b):b}getType(){return this.relation.X()}La(){return this.relation.La()}j(){throw Error('Abstract method build() not override !');}toString(){throw Error('Abstract method toString() not override !');}};function X(a,b,c){a.Ld.set(olympe.dc.fa(b),c);return a}olympe.dc.transaction.Ga.Wo=class extends olympe.dc.transaction.Ga.Dg{constructor(a,b){super();let c;this.tag=null!=(c=b&&olympe.dc.fa(b))?c:olympe.V.jf();this.model=olympe.dc.fa(a);this.source=null;this.Ld=new Map}X(){return this.tag}ac(){return this.model}zi(a){this.source=a;return this}j(a){const b=this.ac(),c=this.X();if(!b)throw Error('OperationError: Cannot create instance, model tag is undefined');a.Rc(c,b,this.source,km(this,this.Ld))}toString(){return`CreateInstance(${this.ac()}, ${this.X()})`}};
956
- olympe.dc.transaction.Ga.Wo.za=[olympe.dc.Ze];olympe.dc.transaction.Ga.Vl=class extends olympe.dc.transaction.Ga.oo{constructor(a,b,c){super(a,b);this.D=this.ha.Ja(c)?olympe.dc.CloudObject.get(c):c}j(a){const b=this.getType();if(''===b)throw Error('OperationError: Cannot create relation, type is undefined, null or empty string');if(b===olympe.dc.hc.$c)throw Error('OperationError: Cannot create the instance -> model relation');if(!this.origin)throw Error('OperationError: Cannot create relation, origin tag is undefined, null or empty string');
957
- if(!this.D)throw Error('OperationError: Cannot create relation, destination tag is undefined, null or empty string');this.relation.La()===olympe.dc.va.DESTINATION?a.Pa(b,olympe.dc.fa(this.origin),olympe.dc.fa(this.D)):a.Pa(b,olympe.dc.fa(this.D),olympe.dc.fa(this.origin))}toString(){return`CreateRelation('${this.relation.La()}${this.relation.X()}, ${olympe.dc.fa(this.origin)}, ${olympe.dc.fa(this.D)})`}};olympe.dc.transaction.Ga.ZA=class extends olympe.dc.transaction.Ga.Dg{constructor(a,b=olympe.dc.Mb.Dc){super();this.model=a instanceof olympe.dc.CloudObject?a:olympe.dc.CloudObject.get(a);this.Pb=b}j(a){for(const b of this.ha.Uc(this.model))b!==olympe.dc.fa(this.model)&&(new olympe.dc.transaction.Ga.ip(b,this.Pb)).j(a)}toString(){return`DeleteAllInstances(${this.model.X()}, ${this.Pb})`}};olympe.dc.transaction.Ga.hp=class extends olympe.dc.transaction.Ga.oo{j(a){const b=this.getType();if(void 0===b)throw Error('OperationError: Cannot delete relation, type is undefined');if(b===olympe.dc.hc.$c)throw Error('OperationError: Cannot delete the instance -> model relation');const c=olympe.dc.fa(this.origin);if(!this.origin)throw Error('OperationError: Cannot delete relation, left tag is undefined');const d=this.La(),e=this.ha.cb(c,this.relation);for(const f of e)d===olympe.dc.va.DESTINATION?
958
- a.ic(b,c,f):a.ic(b,f,c)}toString(){return`DeleteAllRelations(${this.La()}${this.getType()})`}};olympe.dc.transaction.Ga.ip=class extends olympe.dc.transaction.Ga.Dg{constructor(a,b=olympe.dc.Mb.Dc){super();this.tag=this.ha.Ja(a)?olympe.dc.CloudObject.get(a):a;this.Pb=b}X(){return olympe.dc.fa(this.tag)}j(a){const b=this.X();if(void 0===b)throw Error('OperationError: Cannot delete instance, tag is undefined');this.ha.Ja(b)&&Ul(a,b,this.Pb)}toString(){return'DeleteInstance('+this.X()+', '+this.Pb+')'}};olympe.dc.transaction.Ga.hu=class extends olympe.dc.transaction.Ga.Vl{j(a){const b=this.relation.X();if(void 0===b)throw Error('OperationError: Cannot delete relation, type is undefined');if(b===olympe.dc.hc.$c)throw Error('OperationError: Cannot delete the instance -> model relation');const c=olympe.dc.fa(this.origin);if(void 0===c)throw Error('OperationError: Cannot delete relation, left tag is undefined');const d=olympe.dc.fa(this.D);if(void 0===d)throw Error('OperationError: Cannot delete relation, right tag is undefined');
954
+ b.redo_stack_size)}).catch(b=>this.G.error('Failed to process get stack request',b))).then(()=>{})}};olympe.dc.transaction.Jf.j={Cm:0,$i:1,Ev:2};olympe.dc.transaction.lj=class{constructor(a,b=!1,c=!1){this.D=a;this.F=b;this.j=c}uh(){return this.F}bc(){return this.D}};olympe.dc.transaction.P={Da:'dc.transaction.Logger',Ea:'dc.transaction.Manager'};olympe.dc.transaction.U={Bq:'dc.transaction.timeout',xo:'dc.transaction.burstInterval',bm:'dc.transaction.disabledCompilers'};
955
+ olympe.W.config(function(a){E(a,olympe.dc.transaction.U.Bq,9E4);E(a,olympe.dc.transaction.U.xo,30);E(a,olympe.dc.transaction.U.bm,[]);D(a,olympe.dc.transaction.P.Da,[olympe.ia.P.Ea],b=>b.cd('dc'));D(a,'olympe.dc.transaction.Config',[new olympe.W.pa(olympe.dc.transaction.U.Bq),new olympe.W.pa(olympe.dc.transaction.U.bm),new olympe.W.pa(olympe.dc.db.U.Pl)],(b,c,d)=>new Map([['notificationTimeout',b],['disabledCompilers',c],['burstHoldTime',d]]));C(a,olympe.dc.transaction.P.Ea,olympe.dc.transaction.Jf,
956
+ olympe.dc.transaction.P.Da,olympe.dc.db.P.Ea,olympe.dc.P.Vg,olympe.dc.sources.P.bf,olympe.dc.P.hk,olympe.auth.P.Ea,'olympe.dc.transaction.Config')},'olympe.dc.transaction');olympe.dc.transaction.Ga={};function km(a,b){const c=new Map;for(const [d,e]of b)c.set(d,a.Qa(e));return c}olympe.dc.transaction.Ga.Dg=class{constructor(){this.ha=olympe.dc.ha()}j(){throw Error('Abstract method build() not override !');}toString(){throw Error('Abstract method toString() not override !');}Qa(a){a=olympe.C.Qa(a);return void 0===a||null===a?null:olympe.C.$s(a)?a.valueOf():a}};olympe.dc.transaction.Ga.Dg.za=[olympe.dc.Nc];olympe.dc.transaction.Ga.po=class extends olympe.dc.transaction.Ga.Dg{constructor(a,b){super();this.relation=a instanceof olympe.dc.Sa.Relation?a:new olympe.dc.Sa.Relation(olympe.dc.fa(a));this.origin=this.ha.Ja(b)?olympe.dc.CloudObject.get(b):b}getType(){return this.relation.X()}La(){return this.relation.La()}j(){throw Error('Abstract method build() not override !');}toString(){throw Error('Abstract method toString() not override !');}};function X(a,b,c){a.Ld.set(olympe.dc.fa(b),c);return a}olympe.dc.transaction.Ga.Xo=class extends olympe.dc.transaction.Ga.Dg{constructor(a,b){super();let c;this.tag=null!=(c=b&&olympe.dc.fa(b))?c:olympe.V.jf();this.model=olympe.dc.fa(a);this.source=null;this.Ld=new Map}X(){return this.tag}ac(){return this.model}zi(a){this.source=a;return this}j(a){const b=this.ac(),c=this.X();if(!b)throw Error('OperationError: Cannot create instance, model tag is undefined');a.Rc(c,b,this.source,km(this,this.Ld))}toString(){return`CreateInstance(${this.ac()}, ${this.X()})`}};
957
+ olympe.dc.transaction.Ga.Xo.za=[olympe.dc.Ze];olympe.dc.transaction.Ga.Vl=class extends olympe.dc.transaction.Ga.po{constructor(a,b,c){super(a,b);this.D=this.ha.Ja(c)?olympe.dc.CloudObject.get(c):c}j(a){const b=this.getType();if(''===b)throw Error('OperationError: Cannot create relation, type is undefined, null or empty string');if(b===olympe.dc.hc.$c)throw Error('OperationError: Cannot create the instance -> model relation');if(!this.origin)throw Error('OperationError: Cannot create relation, origin tag is undefined, null or empty string');
958
+ if(!this.D)throw Error('OperationError: Cannot create relation, destination tag is undefined, null or empty string');this.relation.La()===olympe.dc.va.DESTINATION?a.Pa(b,olympe.dc.fa(this.origin),olympe.dc.fa(this.D)):a.Pa(b,olympe.dc.fa(this.D),olympe.dc.fa(this.origin))}toString(){return`CreateRelation('${this.relation.La()}${this.relation.X()}, ${olympe.dc.fa(this.origin)}, ${olympe.dc.fa(this.D)})`}};olympe.dc.transaction.Ga.ZA=class extends olympe.dc.transaction.Ga.Dg{constructor(a,b=olympe.dc.Mb.Dc){super();this.model=a instanceof olympe.dc.CloudObject?a:olympe.dc.CloudObject.get(a);this.Pb=b}j(a){for(const b of this.ha.Uc(this.model))b!==olympe.dc.fa(this.model)&&(new olympe.dc.transaction.Ga.jp(b,this.Pb)).j(a)}toString(){return`DeleteAllInstances(${this.model.X()}, ${this.Pb})`}};olympe.dc.transaction.Ga.ip=class extends olympe.dc.transaction.Ga.po{j(a){const b=this.getType();if(void 0===b)throw Error('OperationError: Cannot delete relation, type is undefined');if(b===olympe.dc.hc.$c)throw Error('OperationError: Cannot delete the instance -> model relation');const c=olympe.dc.fa(this.origin);if(!this.origin)throw Error('OperationError: Cannot delete relation, left tag is undefined');const d=this.La(),e=this.ha.cb(c,this.relation);for(const f of e)d===olympe.dc.va.DESTINATION?
959
+ a.ic(b,c,f):a.ic(b,f,c)}toString(){return`DeleteAllRelations(${this.La()}${this.getType()})`}};olympe.dc.transaction.Ga.jp=class extends olympe.dc.transaction.Ga.Dg{constructor(a,b=olympe.dc.Mb.Dc){super();this.tag=this.ha.Ja(a)?olympe.dc.CloudObject.get(a):a;this.Pb=b}X(){return olympe.dc.fa(this.tag)}j(a){const b=this.X();if(void 0===b)throw Error('OperationError: Cannot delete instance, tag is undefined');this.ha.Ja(b)&&Ul(a,b,this.Pb)}toString(){return'DeleteInstance('+this.X()+', '+this.Pb+')'}};olympe.dc.transaction.Ga.hu=class extends olympe.dc.transaction.Ga.Vl{j(a){const b=this.relation.X();if(void 0===b)throw Error('OperationError: Cannot delete relation, type is undefined');if(b===olympe.dc.hc.$c)throw Error('OperationError: Cannot delete the instance -> model relation');const c=olympe.dc.fa(this.origin);if(void 0===c)throw Error('OperationError: Cannot delete relation, left tag is undefined');const d=olympe.dc.fa(this.D);if(void 0===d)throw Error('OperationError: Cannot delete relation, right tag is undefined');
959
960
  this.relation.La()===olympe.dc.va.DESTINATION?a.ic(b,c,d):a.ic(b,d,c)}toString(){return'DeleteRelation('+this.relation.La()+this.relation.X()+', '+olympe.dc.fa(this.origin)+', '+olympe.dc.fa(this.D)+')'}};olympe.dc.transaction.Ga.Vw=class extends olympe.dc.transaction.Ga.Dg{constructor(a,b,c){super();this.tag=this.ha.Ja(a)?olympe.dc.CloudObject.get(a):a;this.Ld=new Map;void 0!==b&&this.Ld.set(olympe.dc.fa(b),c)}X(){return olympe.dc.fa(this.tag)}j(a){const b=this.X();if(void 0===b)throw Error('OperationError: Cannot update instance, tag is undefined');var c;if(!(null!=(c=a.j.Tc(b))&&c.D()||this.ha.Ja(b)))throw Error('OperationError: Instance #'+b+' not found so it cannot be updated');c=km(this,this.Ld);
960
961
  for(const [e,f]of c){var d=this.ha.Ra(b,e,!0);d instanceof olympe.dc.wc&&Ul(a,d.X(),olympe.dc.Mb.Dc);f instanceof olympe.dc.wc&&!Z(a,f.X())&&(d=new olympe.dc.Za,d.persist(f.X()),d.j(a))}a.Yc(b,c)}toString(){return'UpdateInstance('+this.X()+', '+km(this,this.Ld)+')'}};olympe.dc.transaction.Ga.Xv=class a extends olympe.dc.transaction.Ga.Dg{constructor(b,c){super();this.tag=b;this.source=c}j(b){const c=olympe.dc.ha();if(Z(b,this.tag)&&c.Ja(this.tag)&&!c.Re(this.tag)){const e=c.Cb(this.tag,!0);var d;let f;null==(f=null==(d=b.j.Tc(this.tag))?void 0:d.Cb())||f.forEach((g,h)=>{e.set(h,g)});for(const g of e.values())g instanceof olympe.dc.wc&&c.Ja(g.X())&&(new a(g.X(),this.source)).j(b);d=c.model(this.tag);b.Rc(this.tag,d,this.source,e);for(const [g,h,k]of th(c,this.tag))Z(b,
961
- k)&&(h===olympe.dc.va.ORIGIN?b.Pa(g,k,this.tag):b.Pa(g,this.tag,k))}}toString(){return`PersistOperation: tag - ${this.tag}, src - ${this.source}`}};olympe.dc.fa=function(a){let b=null;if('string'===typeof a)return a;if('function'===typeof(null==a?void 0:a.X)&&(null==a||!a.gh))b=a.X();else if('function'===typeof a){let d;b=null!=(d=olympe.dc.na.ac(a))?d:''}else if(olympe.C.qf(a)){let d;b=olympe.dc.fa(null==(d=olympe.C.Qa(a))?void 0:d.valueOf())}let c;return null!=(c=b)?c:''};w('olympe.dc.instanceToTag',olympe.dc.fa);olympe.dc.ha=function(){return olympe.dc.ly().view};olympe.dc.register=function(a,b){olympe.dc.na.j(a,b)};
962
- olympe.dc.defineProperty=function(a){return new olympe.dc.Sa.Property(a)};olympe.dc.Ds=function(a,b=olympe.dc.va.DESTINATION,c=olympe.dc.CloudObject,d=olympe.dc.va.DESTINATION){const e=olympe.dc.va.DESTINATION;return b===olympe.dc.va.ORIGIN||b===e?new olympe.dc.Sa.Relation(a,b):new olympe.dc.Sa.Relation(a,d,b,c)};olympe.dc.Fx=function(a){return a.$b()};olympe.dc.nb={};olympe.dc.nb.tn=a=>'string'===typeof a||'number'===typeof a||'boolean'===typeof a||a instanceof String?olympe.C.xb(a):a instanceof olympe.C.Ta?a:null;olympe.dc.nb.qn=a=>'boolean'===typeof a||a instanceof Boolean?olympe.C.Sb(a):a instanceof olympe.C.da?a:null;olympe.dc.nb.sn=a=>'number'===typeof a||a instanceof Number?olympe.C.ra(a):'string'===typeof a||a instanceof String?olympe.C.ra(Number.parseFloat(a.valueOf())):a instanceof olympe.C.aa?a:null;
963
- olympe.dc.nb.rn=a=>'number'===typeof a||a instanceof Number?oc(a.valueOf()):'string'===typeof a||a instanceof String?new olympe.C.eb(new Date(a.valueOf().valueOf())):a instanceof Date?new olympe.C.eb(a):a instanceof olympe.C.eb?a:null;olympe.dc.nb.ys=function(a){return a instanceof olympe.C.Color?a:'string'===typeof a||a instanceof String?sc(a.valueOf()):null};olympe.dc.nb.zs=a=>a instanceof olympe.dc.CloudObject?a:a instanceof olympe.dc.wc?olympe.dc.CloudObject.get(a.tag):null;
962
+ k)&&(h===olympe.dc.va.ORIGIN?b.Pa(g,k,this.tag):b.Pa(g,this.tag,k))}}toString(){return`PersistOperation: tag - ${this.tag}, src - ${this.source}`}};olympe.dc.fa=function(a){let b=null;if('string'===typeof a)return a;if('function'===typeof(null==a?void 0:a.X)&&(null==a||!a.gh))b=a.X();else if('function'===typeof a){let d;b=null!=(d=olympe.dc.oa.ac(a))?d:''}else if(olympe.C.qf(a)){let d;b=olympe.dc.fa(null==(d=olympe.C.Qa(a))?void 0:d.valueOf())}let c;return null!=(c=b)?c:''};w('olympe.dc.instanceToTag',olympe.dc.fa);olympe.dc.ha=function(){return olympe.dc.ly().view};olympe.dc.register=function(a,b){olympe.dc.oa.j(a,b)};
963
+ olympe.dc.defineProperty=function(a){return new olympe.dc.Sa.Property(a)};olympe.dc.Ds=function(a,b=olympe.dc.va.DESTINATION,c=olympe.dc.CloudObject,d=olympe.dc.va.DESTINATION){const e=olympe.dc.va.DESTINATION;return b===olympe.dc.va.ORIGIN||b===e?new olympe.dc.Sa.Relation(a,b):new olympe.dc.Sa.Relation(a,d,b,c)};olympe.dc.Fx=function(a){return a.$b()};olympe.dc.nb={};olympe.dc.nb.un=a=>'string'===typeof a||'number'===typeof a||'boolean'===typeof a||a instanceof String?olympe.C.xb(a):a instanceof olympe.C.Ta?a:null;olympe.dc.nb.rn=a=>'boolean'===typeof a||a instanceof Boolean?olympe.C.Sb(a):a instanceof olympe.C.da?a:null;olympe.dc.nb.tn=a=>'number'===typeof a||a instanceof Number?olympe.C.ra(a):'string'===typeof a||a instanceof String?olympe.C.ra(Number.parseFloat(a.valueOf())):a instanceof olympe.C.aa?a:null;
964
+ olympe.dc.nb.sn=a=>'number'===typeof a||a instanceof Number?oc(a.valueOf()):'string'===typeof a||a instanceof String?new olympe.C.eb(new Date(a.valueOf().valueOf())):a instanceof Date?new olympe.C.eb(a):a instanceof olympe.C.eb?a:null;olympe.dc.nb.ys=function(a){return a instanceof olympe.C.Color?a:'string'===typeof a||a instanceof String?sc(a.valueOf()):null};olympe.dc.nb.zs=a=>a instanceof olympe.dc.CloudObject?a:a instanceof olympe.dc.wc?olympe.dc.CloudObject.get(a.tag):null;
964
965
  olympe.dc.nb.tj=a=>a instanceof olympe.dc.wc?olympe.dc.CloudObject.get(a.tag):a;olympe.dc.nb.Cc=a=>{a=a instanceof olympe.dc.wc?olympe.dc.CloudObject.get(a.tag):a;let b;return null!=(b=a instanceof olympe.dc.CloudObject?a.Cc():a)?b:null};
965
- olympe.dc.nb.Zx=a=>{switch(a){case olympe.C.da:return olympe.dc.nb.qn;case olympe.C.Ta:return olympe.dc.nb.tn;case olympe.C.aa:return olympe.dc.nb.sn;case olympe.C.eb:return olympe.dc.nb.rn;case olympe.C.Color:return olympe.dc.nb.ys;case olympe.dc.CloudObject:return olympe.dc.nb.zs;default:return olympe.dc.nb.tj}};olympe.dc.kc={};olympe.dc.xf=class{la(){}F(){}compare(){}H(){}ga(){}toString(){}};function lm(a){let b=null;for(a=[...a.ba];null===b&&0<a.length;)b=a.pop().Nb();return b}function mm(a,b){a.N()||(a=`Calling "${b}" on subscription with id ${a.T()} while it is not ready (thus no data is available).`+'This call should be made within an onReady callback. You can also consider to use Queries API instead of ListDefs (which are deprecated)',olympe.ia.Ya('dc').warn(a))}
966
+ olympe.dc.nb.Zx=a=>{switch(a){case olympe.C.da:return olympe.dc.nb.rn;case olympe.C.Ta:return olympe.dc.nb.un;case olympe.C.aa:return olympe.dc.nb.tn;case olympe.C.eb:return olympe.dc.nb.sn;case olympe.C.Color:return olympe.dc.nb.ys;case olympe.dc.CloudObject:return olympe.dc.nb.zs;default:return olympe.dc.nb.tj}};olympe.dc.kc={};olympe.dc.xf=class{la(){}F(){}compare(){}H(){}ga(){}toString(){}};function lm(a){let b=null;for(a=[...a.ba];null===b&&0<a.length;)b=a.pop().Nb();return b}function mm(a,b){a.N()||(a=`Calling "${b}" on subscription with id ${a.T()} while it is not ready (thus no data is available).`+'This call should be made within an onReady callback. You can also consider to use Queries API instead of ListDefs (which are deprecated)',olympe.ia.Ya('dc').warn(a))}
966
967
  olympe.dc.Aa=class{constructor(a,b,c){void 0===a||null===a?olympe.ia.Ya('dc').warn('attempt to create a listdef with a null or undefind basetag. This listdef is thus without effect.'):(this.D=olympe.C.ua([a],olympe.dc.fa,String),this.ba=void 0!==b&&(Array.isArray(b)?b:[b])||[],this.valueType=c||lm(this),this.j=null,this.Bc=void 0)}re(){return olympe.dc.re()}ob(){if(null===this.j){const a=olympe.dc.kc.By();this.j=nm(a,this,this.Bc);null!==this.valueType&&this.j.Rd(this.valueType);olympe.C.$a().Yd(()=>
967
- {var b=this.j.T();a.G.debug('QueryMGR: [ID:',b,'] - Unregistered');const c=a.j.get(b);if(null==c)var d=0;else 0<c.counter&&c.counter--,d=0===c.counter;d&&(c.j.release(),a.j.delete(b));this.j=null})}return this}nc(){null===this.j&&this.ob();return this.j}Rd(a){this.valueType=a;null!==this.j&&this.j.Rd(this.valueType)}Nb(){return null!==this.j?this.j.Nb():null===this.valueType?olympe.dc.CloudObject:this.valueType}ce(){return this.D}tm(){return this.ba}kd(a,b){return this.nc().kd(a,b)}tl(a){this.nc().tl(a)}Su(){return this.nc().Gd()}Ru(){return this.nc().N()}get(a){return this.nc().get(a)}ti(){return this.nc().ti()}ri(a){const b=
968
+ {var b=this.j.T();a.G.debug('QueryMGR: [ID:',b,'] - Unregistered');const c=a.j.get(b);if(null==c)var d=0;else 0<c.counter&&c.counter--,d=0===c.counter;d&&(c.j.release(),a.j.delete(b));this.j=null})}return this}nc(){null===this.j&&this.ob();return this.j}Rd(a){this.valueType=a;null!==this.j&&this.j.Rd(this.valueType)}Nb(){return null!==this.j?this.j.Nb():null===this.valueType?olympe.dc.CloudObject:this.valueType}ce(){return this.D}um(){return this.ba}kd(a,b){return this.nc().kd(a,b)}tl(a){this.nc().tl(a)}Su(){return this.nc().Gd()}Ru(){return this.nc().N()}get(a){return this.nc().get(a)}ti(){return this.nc().ti()}ri(a){const b=
968
969
  this.nc();mm(b,'getCurrent');return b.ri(a)}has(a){return this.nc().has(a)}sh(a){const b=this.nc();mm(b,'hasCurrent');return b.sh(a)}qe(a){return this.nc().qe(a)}Cz(a){return this.qe(a).asObservable()}mf(a){const b=this.nc();mm(b,'getCurrentAt');return b.mf(a)}nf(a){return this.nc().nf(a)}Qf(a){const b=this.nc();mm(b,'getCurrentKeyAt');return b.Qf(a)}Id(a){return this.nc().Id(a)}Hz(a){return this.Id(a).asObservable()}Rf(a){const b=this.nc();mm(b,'getCurrentRank');return b.Rf(a)}Ic(){return this.nc().Ic()}Dz(){return this.Ic().asObservable()}Sf(){return this.nc().Sf()}Cf(){return this.nc().Cf()}Iz(){return this.Cf().asObservable()}xg(){const a=
969
970
  this.nc();mm(a,'getCurrentSize');return a.xg()}forEach(a,b){this.nc().forEach(a,b)}pe(a){const b=this.nc();mm(b,'forEachCurrentValue');return b.pe(a)}wj(a,b,c,d){a=new olympe.dc.ba.Nh(a,b);(new olympe.dc.Aa(this.D,[...this.ba,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.ba];for(const c of b){if(void 0===c)throw Error('ListDef.transform(): Trying to set an undefined transformer');
970
971
  if(c instanceof olympe.dc.Sa.Property)throw Error(`ListDef.transform(): Properties cannot be used as transformer, unlike relations ${c}`);if(!c||'function'!==typeof c.j)break;a.push(c)}b=new olympe.dc.Aa(this.D,a);b.Bc=this.Bc;b.Rd(lm(b)||this.valueType||Object);return b}zl(a){return this.transform(new olympe.dc.ba.Lf(a))}filter(a){return this.transform(new olympe.dc.ba.zf(a))}bl(){const a=new olympe.dc.rk(this.D,null===this.valueType?void 0:this.valueType);'boolean'===typeof this.Bc&&(a.Bc=this.Bc);
971
972
  let b=this.ba;b instanceof Array||(b=b?[b]:[]);a.transform(b);return a}toString(){let a=this.ba;a=a?', '+(a.join?a.join(', '):a.toString()):'';return'ListDef(#'+olympe.C.Qa(this.D)+a+')'}Qu(){return this.nc().Mg()}Wc(){return olympe.C.ua([this.Cf()],a=>{let b='[';for(let c=0;c<a;c++){const d=this.mf(c).toString();b=0<c&&c<a?b+(', '+d):b+d}return olympe.C.xb(b+']')},olympe.C.Ta)}};olympe.dc.Aa.prototype.filter=olympe.dc.Aa.prototype.filter;olympe.dc.Aa.prototype.union=olympe.dc.Aa.prototype.zl;
972
973
  olympe.dc.Aa.prototype.transform=olympe.dc.Aa.prototype.transform;olympe.dc.Aa.prototype.forEachCurrentValue=olympe.dc.Aa.prototype.pe;olympe.dc.Aa.prototype.forEach=olympe.dc.Aa.prototype.forEach;olympe.dc.Aa.prototype.getCurrentSize=olympe.dc.Aa.prototype.xg;olympe.dc.Aa.prototype.observeSize=olympe.dc.Aa.prototype.Iz;olympe.dc.Aa.prototype.observeFirst=olympe.dc.Aa.prototype.Dz;olympe.dc.Aa.prototype.getCurrentRank=olympe.dc.Aa.prototype.Rf;olympe.dc.Aa.prototype.observeRank=olympe.dc.Aa.prototype.Hz;
973
974
  olympe.dc.Aa.prototype.getCurrentAt=olympe.dc.Aa.prototype.mf;olympe.dc.Aa.prototype.observeAt=olympe.dc.Aa.prototype.Cz;olympe.dc.Aa.prototype.offReady=olympe.dc.Aa.prototype.tl;olympe.dc.Aa.prototype.onReady=olympe.dc.Aa.prototype.kd;olympe.dc.Aa.prototype.getBaseTag=olympe.dc.Aa.prototype.ce;olympe.dc.Aa.za=[olympe.C.vd];m=olympe.dc.Aa.prototype;m.re.K=olympe.C.J.j;m.ob.K=olympe.C.J.H();m.nc.K=new olympe.C.J(()=>olympe.dc.kc.Subscription,[]);m.Rd.K=new olympe.C.J(()=>{},[]);
974
- m.ce.K=new olympe.C.J(()=>String,[]);m.tm.K=new olympe.C.J(()=>Array,[]);m.kd.K=new olympe.C.J(()=>String,[]);m.tl.K=new olympe.C.J(()=>{},[]);m.Su.K=olympe.C.J.N;m.Ru.K=olympe.C.J.j;m.get.K=new olympe.C.J(()=>olympe.dc.CloudObject,[],'valueType');m.ti.K=new olympe.C.J(()=>Array,[]);m.ri.K=olympe.C.J.j;m.has.K=olympe.C.J.N;m.sh.K=olympe.C.J.j;m.qe.K=new olympe.C.J(()=>olympe.dc.CloudObject,[],'valueType');m.mf.K=olympe.C.J.j;m.nf.K=new olympe.C.J(()=>String,[]);m.Qf.K=olympe.C.J.j;m.Id.K=olympe.C.J.F;
975
- m.Rf.K=olympe.C.J.j;m.Ic.K=new olympe.C.J(()=>olympe.dc.CloudObject,[],'valueType');m.Sf.K=new olympe.C.J(()=>String,[]);m.Cf.K=olympe.C.J.F;m.xg.K=olympe.C.J.j;m.forEach.K=new olympe.C.J(()=>{},[]);m.pe.K=olympe.C.J.j;m.wj.K=new olympe.C.J(()=>{},[]);m.transform.K=new olympe.C.J(()=>olympe.dc.Aa,[]);m.zl.K=new olympe.C.J(()=>olympe.dc.Aa,[]);m.filter.K=new olympe.C.J(()=>olympe.dc.Aa,[]);m.bl.K=new olympe.C.J(()=>olympe.dc.rk,[]);m.toString.K=olympe.C.J.j;m.Qu.K=olympe.C.J.j;m.Wc.K=olympe.C.J.D;const om={qA:'append',gm:'filter_not',up:'filter_and',vp:'filter_or'};function pm(a,b){a=qm(a);a=olympe.dc.CloudObject.get(a);return(new olympe.dc.bb.po(a,b)).D}
975
+ m.ce.K=new olympe.C.J(()=>String,[]);m.um.K=new olympe.C.J(()=>Array,[]);m.kd.K=new olympe.C.J(()=>String,[]);m.tl.K=new olympe.C.J(()=>{},[]);m.Su.K=olympe.C.J.N;m.Ru.K=olympe.C.J.j;m.get.K=new olympe.C.J(()=>olympe.dc.CloudObject,[],'valueType');m.ti.K=new olympe.C.J(()=>Array,[]);m.ri.K=olympe.C.J.j;m.has.K=olympe.C.J.N;m.sh.K=olympe.C.J.j;m.qe.K=new olympe.C.J(()=>olympe.dc.CloudObject,[],'valueType');m.mf.K=olympe.C.J.j;m.nf.K=new olympe.C.J(()=>String,[]);m.Qf.K=olympe.C.J.j;m.Id.K=olympe.C.J.F;
976
+ m.Rf.K=olympe.C.J.j;m.Ic.K=new olympe.C.J(()=>olympe.dc.CloudObject,[],'valueType');m.Sf.K=new olympe.C.J(()=>String,[]);m.Cf.K=olympe.C.J.F;m.xg.K=olympe.C.J.j;m.forEach.K=new olympe.C.J(()=>{},[]);m.pe.K=olympe.C.J.j;m.wj.K=new olympe.C.J(()=>{},[]);m.transform.K=new olympe.C.J(()=>olympe.dc.Aa,[]);m.zl.K=new olympe.C.J(()=>olympe.dc.Aa,[]);m.filter.K=new olympe.C.J(()=>olympe.dc.Aa,[]);m.bl.K=new olympe.C.J(()=>olympe.dc.rk,[]);m.toString.K=olympe.C.J.j;m.Qu.K=olympe.C.J.j;m.Wc.K=olympe.C.J.D;const om={qA:'append',gm:'filter_not',vp:'filter_and',wp:'filter_or'};function pm(a,b){a=qm(a);a=olympe.dc.CloudObject.get(a);return(new olympe.dc.bb.qo(a,b)).D}
976
977
  olympe.dc.rk=class{constructor(a,b){this.j=qm(a);this.G=olympe.ia.Ya('dc.query');this.valueType=void 0===b?olympe.dc.CloudObject:b;this.ba=[];this.Ga=[];this.Bc=void 0}Xi(){const a=new olympe.dc.Aa(this.j,this.ba,this.valueType);'boolean'===typeof this.Bc&&(a.Bc=this.Bc);return a}transform(a){for(let b=0,c=a.length,d;b<c;b++){d=a[b];if(void 0===d)throw new rm('transform','Trying to set an undefined transformer');if(d instanceof olympe.dc.Sa.Property)throw new rm('transform','Properties cannot be used as transformer, unlike relations '+
977
978
  d);if(!d||'function'!==typeof d.j)throw new rm('transform','one of the argument is not a Transformer '+d);const e=d.Nb();null!==e&&(this.valueType=e);this.ba.push(d)}return this}zl(a){this.ba.push(new olympe.dc.ba.Lf(a));return this}nA(a){this.ba.push(new olympe.dc.ba.Lf(qm(a)));return this}Uu(a){this.valueType=a;return this}fb(a){this.ba.push(a);this.valueType=a.Nb()||olympe.dc.CloudObject;return this}Tx(a){for(const b of a)this.ba.push(b),this.valueType=b.Nb()||olympe.dc.CloudObject;return this}Sx(a,
978
- b,c){a=new olympe.dc.ba.Ke(a,a.La(),b,c);this.ba.push(a);this.valueType=a.Nb()||olympe.dc.CloudObject;return this}Rx(a){const b=[];let c;for(let d=0;d<a.length;d++){const e=a[d];b.push(e.X());void 0===c&&(c=e.La())}a=new olympe.dc.ba.tk(b,c);this.ba.push(a);this.valueType=a.Nb()||olympe.dc.CloudObject;return this}Tu(){this.fb(olympe.dc.CloudObject.instancesRel);return this}hf(a){var b=this.Ga.pop();b===om.gm&&(a=new olympe.dc.Z.je(a),b=this.Ga.pop());switch(b){case om.up:b=this.ba.pop().D;b instanceof
979
- olympe.dc.Z.Od?(b=b.Z,b.push(a),a=new olympe.dc.Z.Od(...b)):a=new olympe.dc.Z.Od(b,a);b=this.Ga.pop();break;case om.vp:b=this.ba.pop().D,b instanceof olympe.dc.Z.Fe?(b=b.Z,b.push(a),a=new olympe.dc.Z.Fe(...b)):a=new olympe.dc.Z.Fe(b,a),b=this.Ga.pop()}b===om.gm&&(a=new olympe.dc.Z.je(a),this.Ga.pop());this.ba.push(new olympe.dc.ba.zf(a));return this}Nx(a,b,c){return this.hf(new olympe.dc.Z.Be(pm(a,c),new olympe.dc.bb.Xe(b)))}contains(a,b,c=!1,d){return this.hf(new olympe.dc.Z.yf(pm(a,d),new olympe.dc.bb.Xe(b),
979
+ b,c){a=new olympe.dc.ba.Ke(a,a.La(),b,c);this.ba.push(a);this.valueType=a.Nb()||olympe.dc.CloudObject;return this}Rx(a){const b=[];let c;for(let d=0;d<a.length;d++){const e=a[d];b.push(e.X());void 0===c&&(c=e.La())}a=new olympe.dc.ba.tk(b,c);this.ba.push(a);this.valueType=a.Nb()||olympe.dc.CloudObject;return this}Tu(){this.fb(olympe.dc.CloudObject.instancesRel);return this}hf(a){var b=this.Ga.pop();b===om.gm&&(a=new olympe.dc.Z.je(a),b=this.Ga.pop());switch(b){case om.vp:b=this.ba.pop().D;b instanceof
980
+ olympe.dc.Z.Od?(b=b.Z,b.push(a),a=new olympe.dc.Z.Od(...b)):a=new olympe.dc.Z.Od(b,a);b=this.Ga.pop();break;case om.wp:b=this.ba.pop().D,b instanceof olympe.dc.Z.Fe?(b=b.Z,b.push(a),a=new olympe.dc.Z.Fe(...b)):a=new olympe.dc.Z.Fe(b,a),b=this.Ga.pop()}b===om.gm&&(a=new olympe.dc.Z.je(a),this.Ga.pop());this.ba.push(new olympe.dc.ba.zf(a));return this}Nx(a,b,c){return this.hf(new olympe.dc.Z.Be(pm(a,c),new olympe.dc.bb.Xe(b)))}contains(a,b,c=!1,d){return this.hf(new olympe.dc.Z.yf(pm(a,d),new olympe.dc.bb.Xe(b),
980
981
  c))}Ob(a){if(!(a instanceof Array))throw new rm('instanceOf','Provided argument "models" must be an array.');const b=[];for(let c=0;c<a.length;c++)b.push(qm(a[c]));return this.hf(new olympe.dc.Z.Ui(b))}ol(a){return this.hf(new olympe.dc.Z.Be(new olympe.dc.bb.kj,new olympe.dc.bb.Xe(qm(a))))}Ox(a){if(!Array.isArray(a))throw Error('ExcludeInstances should be called with an array');if(0<a.length){this.Ad().ol(a[0]);for(let b=1,c=a.length;b<c;b++)this.and().Ad().ol(a[b])}return this}az(a,b){if(!(a instanceof
981
982
  Array))throw new rm('hasRelated','Provided argument "relations" must be an array.');const c=[],d=[];a.forEach(e=>{c.push(e);d.push(e.La())});return this.hf(new olympe.dc.Z.Ri(c,d,b))}nl(a,b,c){a=pm(a,c);return this.hf(new olympe.dc.Z.mk(a,new olympe.dc.bb.Xe(b)))}Oj(a,b,c){a=pm(a,c);return this.hf(new olympe.dc.Z.Rk(a,new olympe.dc.bb.Xe(b)))}sz(a,b,c,d){a=pm(a,d);return this.hf(new olympe.dc.Z.Hf(a,b,c))}filter(a){const b=new class extends olympe.dc.Z.Cg{j(c,d){return a(olympe.dc.CloudObject.get(d))}};
982
- return this.hf(b)}Ad(){this.Ga.push(om.gm);return this}and(){this.ba[this.ba.length-1]instanceof olympe.dc.ba.zf&&this.Ga.push(om.up);return this}or(){this.ba[this.ba.length-1]instanceof olympe.dc.ba.zf&&this.Ga.push(om.vp);return this}xl(a,b,c){a=qm(a);let d=null;switch(olympe.dc.ha().Jb(a,olympe.dm.Property.typeRel)){case olympe.dm.String.O.X():d=new olympe.dc.xc.String(new olympe.dc.bb.jj(a,c));break;case olympe.dm.Number.O.X():d=new olympe.dc.xc.Number(new olympe.dc.bb.aj(a,c));break;case olympe.dm.DateTime.O.X():d=
983
+ return this.hf(b)}Ad(){this.Ga.push(om.gm);return this}and(){this.ba[this.ba.length-1]instanceof olympe.dc.ba.zf&&this.Ga.push(om.vp);return this}or(){this.ba[this.ba.length-1]instanceof olympe.dc.ba.zf&&this.Ga.push(om.wp);return this}xl(a,b,c){a=qm(a);let d=null;switch(olympe.dc.ha().Jb(a,olympe.dm.Property.typeRel)){case olympe.dm.String.O.X():d=new olympe.dc.xc.String(new olympe.dc.bb.jj(a,c));break;case olympe.dm.Number.O.X():d=new olympe.dc.xc.Number(new olympe.dc.bb.aj(a,c));break;case olympe.dm.DateTime.O.X():d=
983
984
  new olympe.dc.xc.DateTime(new olympe.dc.bb.Ji(a,c))}c=d;null!==c&&this.ba.push(new olympe.dc.ba.bh(c,b));return this}sort(a,b,c){const d=new class extends olympe.dc.xc.Cg{F(e,f){return a(olympe.dc.CloudObject.get(f))}compare(e,f){return b(e,f).valueOf()}};this.ba.push(new olympe.dc.ba.bh(d,c));return this}Jx(){this.ba.push(new olympe.dc.ba.Ki);return this}Hj(a,b){this.ba.push(new olympe.dc.ba.Nh(a,b));return this}};class rm extends Error{constructor(a,b){super(`ListDefBuilder.${a}(): ${b}`)}}
984
- function qm(a){return'string'===typeof a||a instanceof olympe.C.Ta?a:'function'===typeof a?olympe.dc.na.ac(a):olympe.C.hb(a)?a.ei===olympe.C.Ta?a:olympe.C.ua([a],b=>olympe.C.xb(olympe.dc.fa(b)),olympe.C.Ta):a.X()}m=olympe.dc.rk.prototype;m.Xi.K=new olympe.C.J(()=>olympe.dc.Aa,[]);m.transform.K=olympe.C.J.H();m.zl.K=olympe.C.J.H();m.nA.K=olympe.C.J.H();m.Uu.K=olympe.C.J.H();m.fb.K=olympe.C.J.H();m.Tx.K=olympe.C.J.H();m.Sx.K=olympe.C.J.H();m.Rx.K=olympe.C.J.H();m.Tu.K=olympe.C.J.H();m.hf.K=olympe.C.J.H();
985
- m.Nx.K=olympe.C.J.H();m.contains.K=olympe.C.J.H();m.Ob.K=olympe.C.J.H();m.ol.K=olympe.C.J.H();m.Ox.K=olympe.C.J.H();m.az.K=olympe.C.J.H();m.nl.K=olympe.C.J.H();m.Oj.K=olympe.C.J.H();m.sz.K=olympe.C.J.H();m.filter.K=olympe.C.J.H();m.Ad.K=olympe.C.J.H();m.and.K=olympe.C.J.H();m.or.K=olympe.C.J.H();m.xl.K=olympe.C.J.H();m.sort.K=olympe.C.J.H();m.Jx.K=olympe.C.J.H();m.Hj.K=olympe.C.J.H();function nm(a,b,c){const d=b.ce();var e=new olympe.dc.query.Vv;let f;f=d;olympe.C.hb(f)&&(f=e.add(d));b=(b=b.tm())?Array.isArray(b)?b:[b]:null;e=olympe.dc.kc.Subscription.F(f,b,e);let g,h,k=null!=(h=null==(g=a.j.get(e))?void 0:g.j)?h:null;null===k&&(a.G.debug('QueryMGR: new',a.D?'local':'remote','subscription "',e,'": #',`${f},`,b),k=new olympe.dc.kc.Subscription(e,d,b,a.F));k.getContext().run(()=>a.process(k,c));return k}
985
+ function qm(a){return'string'===typeof a||a instanceof olympe.C.Ta?a:'function'===typeof a?olympe.dc.oa.ac(a):olympe.C.hb(a)?a.ei===olympe.C.Ta?a:olympe.C.ua([a],b=>olympe.C.xb(olympe.dc.fa(b)),olympe.C.Ta):a.X()}m=olympe.dc.rk.prototype;m.Xi.K=new olympe.C.J(()=>olympe.dc.Aa,[]);m.transform.K=olympe.C.J.H();m.zl.K=olympe.C.J.H();m.nA.K=olympe.C.J.H();m.Uu.K=olympe.C.J.H();m.fb.K=olympe.C.J.H();m.Tx.K=olympe.C.J.H();m.Sx.K=olympe.C.J.H();m.Rx.K=olympe.C.J.H();m.Tu.K=olympe.C.J.H();m.hf.K=olympe.C.J.H();
986
+ m.Nx.K=olympe.C.J.H();m.contains.K=olympe.C.J.H();m.Ob.K=olympe.C.J.H();m.ol.K=olympe.C.J.H();m.Ox.K=olympe.C.J.H();m.az.K=olympe.C.J.H();m.nl.K=olympe.C.J.H();m.Oj.K=olympe.C.J.H();m.sz.K=olympe.C.J.H();m.filter.K=olympe.C.J.H();m.Ad.K=olympe.C.J.H();m.and.K=olympe.C.J.H();m.or.K=olympe.C.J.H();m.xl.K=olympe.C.J.H();m.sort.K=olympe.C.J.H();m.Jx.K=olympe.C.J.H();m.Hj.K=olympe.C.J.H();function nm(a,b,c){const d=b.ce();var e=new olympe.dc.query.Vv;let f;f=d;olympe.C.hb(f)&&(f=e.add(d));b=(b=b.um())?Array.isArray(b)?b:[b]:null;e=olympe.dc.kc.Subscription.F(f,b,e);let g,h,k=null!=(h=null==(g=a.j.get(e))?void 0:g.j)?h:null;null===k&&(a.G.debug('QueryMGR: new',a.D?'local':'remote','subscription "',e,'": #',`${f},`,b),k=new olympe.dc.kc.Subscription(e,d,b,a.F));k.getContext().run(()=>a.process(k,c));return k}
986
987
  function sm(a,b){if(b.N())a.G.debug('ListProcessor: [ID:',b.T(),'] - Subscription already booted, ignoring');else{a.G.debug('ListProcessor: [ID:',b.T(),'] - Booting subscription');var c=new olympe.dc.lc.Vr(a.db,a.G),d=b.T();olympe.C.Vc([b.ce()],e=>{const f=olympe.dc.fa(e);a.G.debug('ListProcessor: [ID:',b.T(),'] - Booting with baseTag',f);b.tg()||b.ni();Of(a.db,f,tm(a,b,c),d);olympe.C.$a().Yd(()=>Mf(a.db,f,d));a.db.Ja(f.valueOf())||um(c);b.N()||(um(c),b.Pc([]))})}}
987
988
  function vm(a,b,c,d,e){const f=[b.ce()],g=l=>l instanceof olympe.dc.ba.Lf;let h;const k=(null!=(h=b.qh())?h:[]).filter(g);for(const l of k){f.push(l.ce());let n;k.push(...(null!=(n=l.qh())?n:[]).filter(g))}olympe.C.Vc(f,()=>{const l=b.le(c);wm(a,l,b.T(),d,e)})}
988
989
  function wm(a,b,c,d,e){a.G.debug('CoverageProcessor: [ID:',c,'] - checking coverage of remote query over',b.length,'paths.');const f=olympe.C.$a(),g=new olympe.async.Dk(f);b.forEach(h=>{g.add((k,l)=>{let n=!1;Bi(a.H,h,f,olympe.dc.Ia.SELF,olympe.dc.ma.oc.wf,{Bc:e}).subscribe(rxjs.Subscriber.create(()=>{n||(n=!0,f.run(k))},p=>f.run(()=>l(`The query ${c} is not covered by an existing graphdef, `+`and the specific graphdef id ${h.T()} has encountered an error: ${p}`))))})});ud(g,(h,k)=>d(k));g.start()}
@@ -993,8 +994,8 @@ sm(this,a)):vm(this,a,d,e=>{e?this.G.error(e):sm(this,a)},b))}};function Bm(a){r
993
994
  olympe.dc.query.Vv=class{constructor(){this.j=0;this.values=null}add(a){let b;b=olympe.C.hb(a)?'n'+a.Ca.T():'p'+ ++this.j;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.Ba=class{la(){}j(){}D(){}ga(){}toString(){}};olympe.dc.kc.Subscription=class a extends olympe.C.Tj{constructor(b,c,d,e){super(olympe.dc.CloudObject,new olympe.C.Wb('context subscription '+b,e));this.id=b;this.wd=c;this.ba=d||null;this.state=this.H.run(()=>olympe.C.ge(olympe.dc.kc.Subscription.j.INIT));this.Gc=!1;this.Y=this.Yb=null}static F(b,c,d){let e;try{e=b;if(c)for(let f=0,g=c.length;f<g;f++)e+='|'+c[f].ga(d);else e+='|null';e=olympe.V.ub(e)}catch(f){e=olympe.V.Kc()}return e}T(){return this.id}ce(){return this.wd}qh(){return this.ba}ff(){const b=
994
995
  olympe.dc.fe(),c=olympe.C.Qa(this.ce());let d;return olympe.dc.CloudObject.instancesRel.Fa(null==(d=this.ba)?void 0:d[0])?b.fromModel(c):b.Qe(c)}tg(){const b=olympe.C.Qa(this.state);return b&&b.valueOf()>=olympe.dc.kc.Subscription.j.Pr}ni(){if(this.state.Ca.gb())throw Error(`Cannot set destroyed subscription '${this.id}' as subscribed`);const b=this.Yb;this.Yb=null;for(let c in b)if(Object.prototype.hasOwnProperty.call(b,c))b[c](this);lc(this.state,olympe.C.ge(olympe.dc.kc.Subscription.j.Pr))}Gd(){return olympe.C.ua([this.state],
995
996
  ()=>{},olympe.C.da)}N(){const b=this.state.Ca.Fb;return b&&b.valueOf()>=olympe.dc.kc.Subscription.j.Wh}kd(b,c){this.N()?b(this):(null===this.Y&&(this.Y=new Map),void 0===c&&(c=olympe.V.Kc()),this.Y.set(c,olympe.C.$a().tc(b)));return c||''}tl(b){null!==this.Y&&b&&this.Y.delete(b)}Eb(){const b=olympe.dc.kc.Subscription.j.Wh;if(!this.state.Ca.gb()&&olympe.C.Qa(this.state)!==b&&(this.Nf(),lc(this.state,b),null!==this.Y)){for(const c of this.Y.values())c(this);this.Y=null}}onDestroy(b){this.H.onDestroy(b)}release(){this.H.destroy()}Pc(b){if(!this.state.Ca.gb()){for(let c=
996
- 0,d=b.length;c<d;c++)this.hn(b[c],c);if(this.N())this.Nf();else{this.Gc=b=!0;for(let c in this.D)if(Object.prototype.hasOwnProperty.call(this.D,c)&&!Object.prototype.hasOwnProperty.call(this.values,c)){b=!1;break}b&&this.Eb()}}}Nd(b,c){if(!this.state.Ca.gb()&&(this.al(b,olympe.dc.CloudObject.get(c)),b=this.N(),this.Gc&&!b)){b=!0;for(let d in this.D)if(Object.prototype.hasOwnProperty.call(this.D,d)&&!Object.prototype.hasOwnProperty.call(this.values,d)){b=!1;break}b&&this.Eb()}}ug(b){this.state.Ca.gb()||
997
- (this.gn(b),this.pj(b,!this.N()))}Mg(){return this.N()?super.Mg():'Subscription is not ready!'}le(b){const c=olympe.C.Qa(this.ce());return olympe.dc.kc.Subscription.D(c,b,this.qh())}static D(b,c,d){var e=olympe.dc.ma.from(b,c).ne();if(null===d)return[e];b=[];b.push(e);for(let f=0,g=d.length;f<g;f++)if(e=d[f],e instanceof olympe.dc.ba.af){const h=olympe.dc.query.Relation.from(e);b=b.map(k=>k.fb(h,!0))}else if(e instanceof olympe.dc.ba.Ke){const h=olympe.dc.query.Relation.from(e);b=b.map(k=>k.vg(h,
997
+ 0,d=b.length;c<d;c++)this.jn(b[c],c);if(this.N())this.Nf();else{this.Gc=b=!0;for(let c in this.D)if(Object.prototype.hasOwnProperty.call(this.D,c)&&!Object.prototype.hasOwnProperty.call(this.values,c)){b=!1;break}b&&this.Eb()}}}Nd(b,c){if(!this.state.Ca.gb()&&(this.al(b,olympe.dc.CloudObject.get(c)),b=this.N(),this.Gc&&!b)){b=!0;for(let d in this.D)if(Object.prototype.hasOwnProperty.call(this.D,d)&&!Object.prototype.hasOwnProperty.call(this.values,d)){b=!1;break}b&&this.Eb()}}ug(b){this.state.Ca.gb()||
998
+ (this.hn(b),this.pj(b,!this.N()))}Mg(){return this.N()?super.Mg():'Subscription is not ready!'}le(b){const c=olympe.C.Qa(this.ce());return olympe.dc.kc.Subscription.D(c,b,this.qh())}static D(b,c,d){var e=olympe.dc.ma.from(b,c).ne();if(null===d)return[e];b=[];b.push(e);for(let f=0,g=d.length;f<g;f++)if(e=d[f],e instanceof olympe.dc.ba.af){const h=olympe.dc.query.Relation.from(e);b=b.map(k=>k.fb(h,!0))}else if(e instanceof olympe.dc.ba.Ke){const h=olympe.dc.query.Relation.from(e);b=b.map(k=>k.vg(h,
998
999
  !0,!0))}else if(e instanceof olympe.dc.ba.Lf)e=a.D(olympe.C.Qa(e.ce()),c,e.qh()),b.push(...e);else if(e instanceof olympe.dc.ba.zf||e instanceof olympe.dc.ba.bh){const h=e.F();b=b.map(k=>{for(const l of h){for(const n of l)k=n.recursive?k.vg(n,!0,!0):k.fb(n,!0);k=k.back(l.length)}return k})}return b}};olympe.dc.kc.Subscription.j={INIT:0,Pr:1,Wh:2};olympe.dc.kc.Subscription.prototype.Mg.K=olympe.C.J.j;function Am(a){const b=a.D;a.D=!0;return b}olympe.dc.kc.Cw=class{constructor(a){this.counter=0;this.D=!1;this.j=a}};olympe.dc.Kf=class{la(){}Nb(){}j(){}ga(){}toString(){}};olympe.dc.gr=class{F(){}};olympe.dc.Yk=class{la(){}getValue(){}j(){}ga(){}toString(){}};olympe.dc.xc={};let Dm=0;olympe.dc.xc.Cg=class{constructor(){this.id=Dm++}la(){return'CustomLocalComparator#'+Dm}H(){return[]}F(){throw Error('GetComparedValue function was not implemented.');}compare(){throw Error('Compare function was not implemented.');}ga(){return`{"c":"${this.la()}"}`}toString(){return this.la()+'()'}};olympe.dc.xc.Cg.za=[olympe.dc.xf];olympe.dc.xc.DateTime=class{constructor(a){this.j=a}la(){return Q(olympe.dc.xc.DateTime)}H(){return this.j.j()}F(a,b){return this.j.getValue(a,b)}compare(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}ga(a){return'{"c":"'+this.la()+'",a:['+this.j.ga(a)+']}'}toString(){return'Number('+this.j.toString()+')'}};P('olympe.dc.comparators.DateTime',olympe.dc.xc.DateTime);olympe.dc.xc.DateTime.za=[olympe.dc.xf];olympe.dc.xc.Number=class{constructor(a){this.j=a}la(){return Q(olympe.dc.xc.Number)}H(){return this.j.j()}F(a,b){return this.j.getValue(a,b)}compare(a,b){return a!==b?a>b?1:-1:0}ga(a){return`{"c":"${this.la()}",a:[${this.j.ga(a)}]}`}toString(){return`Number(${this.j.toString()})`}};P('olympe.dc.comparators.Number',olympe.dc.xc.Number);olympe.dc.xc.Number.za=[olympe.dc.xf];olympe.dc.xc.String=class{constructor(a){this.j=a}la(){return Q(olympe.dc.xc.String)}H(){return this.j.j()}F(a,b){return olympe.C.ua([this.j.getValue(a,b)],c=>c.toLowerCase(),olympe.C.Ta)}compare(a,b){return void 0===a?void 0===b?0:1:a!==b?a>b?1:-1:0}ga(a){return`{"c":"${this.la()}",a:[${this.j.ga(a)}]}`}toString(){return`String(${this.j.toString()})`}};P('olympe.dc.comparators.String',olympe.dc.xc.String);olympe.dc.xc.String.za=[olympe.dc.xf];olympe.dc.Z={};let Em=0;olympe.dc.Z.Cg=class{constructor(){this.id=Em++}la(){return'CustomLocalPredicate#'+this.id}D(){return[]}j(){throw Error('Test function was not implemented.');}ga(){return`{"c":"${this.la()}"}`}toString(){return this.la()+'()'}};olympe.dc.Z.Cg.za=[olympe.dc.Ba];olympe.dc.Z.El=class{constructor(a,b){this.F=a;this.H=b}la(){}D(){return[this.F.j(),this.H.j()]}j(a,b){return a.run(()=>olympe.C.ua([this.F.getValue(a,b),this.H.getValue(a,b)],(c,d)=>{c=c.valueOf();d=d.valueOf();return olympe.C.Sb(this.N('string'===typeof c?c:Number(c),'string'===typeof d?d:Number(d)))},olympe.C.da))}N(){}ga(a){return'{"c":"'+this.la()+'","a":['+this.F.ga(a)+','+this.H.ga(a)+']}'}toString(){return this.la().replace(/^.+\./,'')+'('+this.F.toString()+','+this.H.toString()+')'}};
999
1000
  olympe.dc.Z.El.za=[olympe.dc.Ba];olympe.dc.Z.Od=class{constructor(a){this.Z=[];for(let b=arguments.length,c=0;c<b;c++)Array.isArray(arguments[c])?this.Z=this.Z.concat(arguments[c]):this.Z.push(arguments[c])}la(){return Q(olympe.dc.Z.Od)}D(){return this.Z.reduce((a,b)=>a.concat(b.D()),[])}j(a,b){return a.run(()=>olympe.C.ua(this.Z.map(c=>c.j(a,b)),(...c)=>olympe.C.Sb(c.every(d=>d.valueOf())),olympe.C.da))}ga(a){const b=this.Z.map(c=>c.ga(a));return'{"c":"'+this.la()+'","a":['+b.join(',')+']}'}toString(){return'And('+this.Z.map(a=>
1000
1001
  a.toString()).join(',')+')'}};P('olympe.dc.predicates.And',olympe.dc.Z.Od);olympe.dc.Z.Od.za=[olympe.dc.Ba];olympe.dc.Z.Kl=class{constructor(a,b){this.F=a;this.value=b}j(a,b){return a.run(()=>olympe.C.ua([this.F,this.value.getValue(a,b)],(c,d)=>{c=c.valueOf();return olympe.C.Sb((Number(c)&Number(d.valueOf()))===Number(c))},olympe.C.da))}la(){return Q(olympe.dc.Z.Kl)}D(){return[this.value.j()]}ga(a){const b=olympe.C.hb(this.F)?this.F.Ca.Fb.valueOf():this.F.valueOf();return'{"c":"'+this.la()+'","a":['+b+','+this.value.ga(a)+']}'}toString(){const a=olympe.C.hb(this.F)?this.F.Ca.Fb.valueOf():this.F.valueOf();
@@ -1002,18 +1003,18 @@ return this.la().replace(/^.+\./,'')+'('+a.toString()+','+this.value.toString()+
1002
1003
  return'{"c":"'+this.la()+'","a":['+b+','+c+','+a+']}'}toString(){const a=Bm(this.F);return'Contains('+this.source.toString()+','+this.value.toString()+','+a+')'}};P('olympe.dc.predicates.Contains',olympe.dc.Z.yf);olympe.dc.Z.yf.za=[olympe.dc.Ba];olympe.dc.Z.Be=class{constructor(a,b){this.F=a;this.H=b}la(){return Q(olympe.dc.Z.Be)}D(){return[this.F.j(),this.H.j()]}j(a,b){return a.run(()=>olympe.C.ua([this.F.getValue(a,b),this.H.getValue(a,b)],(c,d)=>'object'===typeof c&&void 0!==c.Kd?c.Kd(d):'object'===typeof d&&void 0!==d.Kd?d.Kd(c):olympe.C.Sb(c.valueOf()===d.valueOf()),olympe.C.da,'Test equal predicate'))}ga(a){return'{"c":"'+this.la()+'","a":['+this.F.ga(a)+','+this.H.ga(a)+']}'}toString(){return'Equals('+this.F.toString()+','+this.H.toString()+
1003
1004
  ')'}};P('olympe.dc.predicates.Equals',olympe.dc.Z.Be);olympe.dc.Z.Be.za=[olympe.dc.Ba];olympe.dc.Z.ju=class extends olympe.dc.Z.Be{constructor(a,b){super(a,new olympe.dc.bb.Xe(b))}};olympe.dc.Z.ju.za=[olympe.dc.Ba];olympe.dc.Z.mk=class extends olympe.dc.Z.El{constructor(a,b){super(a,b)}la(){return Q(olympe.dc.Z.mk)}N(a,b){return a>b}};P('olympe.dc.predicates.Greater',olympe.dc.Z.mk);olympe.dc.Z.Ri=class{constructor(a,b,c){this.pb=[];this.F=c instanceof Array?c:void 0!==c?[olympe.dc.fa(c)]:[];a=Array.isArray(a)?a:[a];for(let d=0,e=a.length;d<e;d++)c=a[d],c instanceof olympe.dc.ba.Ke?this.pb.push(new Fm(c.X(),c.La(),c.F,c.D)):this.pb.push(new Fm(olympe.dc.fa(c),b[d],1,1))}la(){return Q(olympe.dc.Z.Ri)}D(){return[this.pb.reduce((a,b)=>a.concat(b),[])]}j(a,b){const c=a.run(()=>mc(olympe.C.cc(Boolean),!1)),d=olympe.V.Kc(),e=olympe.dc.ha();let f=0;a=(h,k)=>{0!==this.F.length&&!this.F.includes(k)||
1004
1005
  c.getContext().gb()||c.getContext().jd()||(f+=h?1:-1,c.update(0<f))};const g=this.pb;for(let h=g.length-1;0<=h;h--)a=Gm(g[h],e,a,d+h);Of(e,b,a,d);c.getContext().onDestroy(()=>{Mf(e,b,d)});return c.tb()}ga(){return'{"c":"'+this.la()+'","a":['+JSON.stringify(this.pb.map(a=>a.ga()))+(0!==this.F.length?',"'+this.F.toString():'')+'"]}'}toString(){return'HasRelated('+(0!==this.F.length?'#'+this.F.toString()+', ':'')+this.pb.map(a=>a.ga())+')'}};P('olympe.dc.predicates.HasRelated',olympe.dc.Z.Ri);
1005
- function Gm(a,b,c,d){const e=Object.create(null);d+=olympe.V.oi();const f=(g,h,k)=>{k>=a.D&&c(g,h);if(!(0<=a.j&&k>=a.j)){var l=d+k;g?e[h]||(e[h]=!0,T(b,h,a,(n,p)=>{f(n,p,k+1)},l)):(delete e[h],b.D(h,a,l))}};return(g,h)=>f(g,h,0)}class Fm extends olympe.dc.query.Relation{constructor(a,b,c,d){super(a,b,1!==c||1!==d);this.D=c;this.j=d}ga(){return`${this.X()}, ${this.La()}, ${this.D}, ${this.j}`}}olympe.dc.Z.Ri.za=[olympe.dc.Ba];olympe.dc.Z.nm=class{constructor(a,b,c){this.pb=[];this.F=void 0!==c?c.map(olympe.dc.fa):null;a=Array.isArray(a)?a:[a];for(let d=0,e=a.length;d<e;d++)c=a[d],c instanceof olympe.dc.ba.Ke?this.pb.push(new Hm(c.X(),c.La(),c.F,c.D)):this.pb.push(new Hm(olympe.dc.fa(c),b[d],1,1))}la(){return Q(olympe.dc.Z.nm)}D(){return[this.pb.reduce((a,b)=>a.concat(b),[])]}j(a,b){const c=a.run(()=>mc(olympe.C.cc(Boolean),!1)),d=olympe.dc.ha(),e=olympe.V.oi();let f=(k,l,n)=>{l&&(null===this.F||this.F.includes(n))&&k(1)};
1006
- const g=this.pb;for(let k=g.length-1;0<=k;k--)f=Im(g[k],d,f,e+k);let h=0;Of(d,b,f.bind(null,k=>{c.getContext().jd()||c.getContext().gb()||(h+=k,c.update(0<h))}),e);a.onDestroy(()=>Mf(d,b,e));return c.tb()}ga(){return'{"c":"'+this.la()+'","a":['+JSON.stringify(this.pb.map(a=>a.ga()))+(null!==this.F?',"'+this.F.toString():'')+'"]}'}toString(){return'HasRelatedTree('+(null!==this.F?'#['+this.F.toString()+'], ':'')+this.pb.map(a=>a.ga())+')'}};P('olympe.dc.predicates.HasRelatedTree',olympe.dc.Z.nm);
1006
+ function Gm(a,b,c,d){const e=Object.create(null);d+=olympe.V.oi();const f=(g,h,k)=>{k>=a.D&&c(g,h);if(!(0<=a.j&&k>=a.j)){var l=d+k;g?e[h]||(e[h]=!0,T(b,h,a,(n,p)=>{f(n,p,k+1)},l)):(delete e[h],b.D(h,a,l))}};return(g,h)=>f(g,h,0)}class Fm extends olympe.dc.query.Relation{constructor(a,b,c,d){super(a,b,1!==c||1!==d);this.D=c;this.j=d}ga(){return`${this.X()}, ${this.La()}, ${this.D}, ${this.j}`}}olympe.dc.Z.Ri.za=[olympe.dc.Ba];olympe.dc.Z.om=class{constructor(a,b,c){this.pb=[];this.F=void 0!==c?c.map(olympe.dc.fa):null;a=Array.isArray(a)?a:[a];for(let d=0,e=a.length;d<e;d++)c=a[d],c instanceof olympe.dc.ba.Ke?this.pb.push(new Hm(c.X(),c.La(),c.F,c.D)):this.pb.push(new Hm(olympe.dc.fa(c),b[d],1,1))}la(){return Q(olympe.dc.Z.om)}D(){return[this.pb.reduce((a,b)=>a.concat(b),[])]}j(a,b){const c=a.run(()=>mc(olympe.C.cc(Boolean),!1)),d=olympe.dc.ha(),e=olympe.V.oi();let f=(k,l,n)=>{l&&(null===this.F||this.F.includes(n))&&k(1)};
1007
+ const g=this.pb;for(let k=g.length-1;0<=k;k--)f=Im(g[k],d,f,e+k);let h=0;Of(d,b,f.bind(null,k=>{c.getContext().jd()||c.getContext().gb()||(h+=k,c.update(0<h))}),e);a.onDestroy(()=>Mf(d,b,e));return c.tb()}ga(){return'{"c":"'+this.la()+'","a":['+JSON.stringify(this.pb.map(a=>a.ga()))+(null!==this.F?',"'+this.F.toString():'')+'"]}'}toString(){return'HasRelatedTree('+(null!==this.F?'#['+this.F.toString()+'], ':'')+this.pb.map(a=>a.ga())+')'}};P('olympe.dc.predicates.HasRelatedTree',olympe.dc.Z.om);
1007
1008
  function Im(a,b,c,d){const e=a.F,f=a.N,g=new Set,h=(l,n,p)=>{f.has(n)?f.get(n).set(d+p,l):f.set(n,(new Map).set(d+p,l))},k=(l,n,p,q,r)=>{const t=olympe.V.oi();if(q){const v=p+r,x=y=>{const z=f.get(r);if(g.has(v))throw Error(`Try to use the predicate HasRelatedTree with recursion in a graph cluster containing a loop around instances ${p} and ${r}`);void 0!==z&&null!==z&&(g.add(v),e.set(r,(e.get(r)||0)+y),Array.from(z.values()).forEach(A=>A(y)));g.delete(v)};h(l,r,p);e.has(r)?l(e.get(r)):(n>=a.D&&c(y=>
1008
- {e.set(r,(e.get(r)||0)+y);l(y)},q,r),(0>a.j||n<=a.j)&&r!==p&&T(b,r,a,k.bind(a,x,n+1,r),t))}else l(-e.get(r)),f.get(r).delete(d+p),0===f.get(r).size&&(e.delete(r),f.delete(r),b.D(r,a,t))};return(l,n,p)=>k(l,0,'origin',n,p)}class Hm extends olympe.dc.query.Relation{constructor(a,b,c,d){super(a,b,1!==c||1!==d);this.D=c;this.j=d;this.N=new Map;this.F=new Map}ga(){return`${this.X()}, ${this.La()}, ${this.D}, ${this.j}`}}olympe.dc.Z.nm.za=[olympe.dc.Ba];olympe.dc.Z.Ui=class{constructor(a){this.F=new Set;a instanceof Array?a.forEach(b=>{this.F.add(olympe.dc.fa(b))}):this.F.add(olympe.dc.fa(a))}la(){return Q(olympe.dc.Z.Ui)}D(){return[]}j(a,b){const c=a.run(()=>mc(olympe.C.cc(olympe.C.da),olympe.C.da.j)),d=olympe.dc.ha();let e=[];const f=()=>{e.forEach(h=>{d.D(h.tag,h.relation,h.id)});e=[]},g=(h,k)=>{if(h)if(k===olympe.dc.fa(olympe.dc.CloudObject))c.update(olympe.C.Sb(this.F.has(k))),f();else{for(const l of e)if(l.tag===k)throw Error(`You should never extend a model to itself (${k})`);
1009
+ {e.set(r,(e.get(r)||0)+y);l(y)},q,r),(0>a.j||n<=a.j)&&r!==p&&T(b,r,a,k.bind(a,x,n+1,r),t))}else l(-e.get(r)),f.get(r).delete(d+p),0===f.get(r).size&&(e.delete(r),f.delete(r),b.D(r,a,t))};return(l,n,p)=>k(l,0,'origin',n,p)}class Hm extends olympe.dc.query.Relation{constructor(a,b,c,d){super(a,b,1!==c||1!==d);this.D=c;this.j=d;this.N=new Map;this.F=new Map}ga(){return`${this.X()}, ${this.La()}, ${this.D}, ${this.j}`}}olympe.dc.Z.om.za=[olympe.dc.Ba];olympe.dc.Z.Ui=class{constructor(a){this.F=new Set;a instanceof Array?a.forEach(b=>{this.F.add(olympe.dc.fa(b))}):this.F.add(olympe.dc.fa(a))}la(){return Q(olympe.dc.Z.Ui)}D(){return[]}j(a,b){const c=a.run(()=>mc(olympe.C.cc(olympe.C.da),olympe.C.da.j)),d=olympe.dc.ha();let e=[];const f=()=>{e.forEach(h=>{d.D(h.tag,h.relation,h.id)});e=[]},g=(h,k)=>{if(h)if(k===olympe.dc.fa(olympe.dc.CloudObject))c.update(olympe.C.Sb(this.F.has(k))),f();else{for(const l of e)if(l.tag===k)throw Error(`You should never extend a model to itself (${k})`);
1009
1010
  this.F.has(k)?(c.update(olympe.C.da.D),f()):(h=new Jm(k,olympe.dc.CloudObject.extendRel),e.push(h),T(d,h.tag,h.relation,g,h.id))}};a=new Jm(b,olympe.dc.CloudObject.modelRel);e.push(a);T(d,a.tag,a.relation,g,a.id);c.getContext().onDestroy(f);return c.tb()}ga(){return'{"c":"'+this.la()+'","a":['+JSON.stringify(Array.from(this.F))+']}'}toString(){return'InstanceOf('+Array.from(this.F).join(', ')+')'}};class Jm{constructor(a,b){this.tag=a;this.relation=b;this.id=olympe.V.oi()}}
1010
1011
  P('olympe.dc.predicates.InstanceOf',olympe.dc.Z.Ui);olympe.dc.Z.Ui.za=[olympe.dc.Ba];olympe.dc.Z.je=class{constructor(a){this.F=a}la(){return Q(olympe.dc.Z.je)}D(){return this.F.D()}j(a,b){return a.run(()=>olympe.C.ua([this.F.j(a,b)],c=>olympe.C.Sb(!c.valueOf()),olympe.C.da))}ga(a){return`{"c":"${this.la()}","a":[${this.F.ga(a)}]}`}toString(){return'Not('+this.F.toString()+')'}};P('olympe.dc.predicates.Not',olympe.dc.Z.je);olympe.dc.Z.je.za=[olympe.dc.Ba];olympe.dc.Z.Fe=class{constructor(a){this.Z=[];for(let b=arguments.length,c=0;c<b;c++)Array.isArray(arguments[c])?this.Z=this.Z.concat(arguments[c]):this.Z.push(arguments[c])}la(){return Q(olympe.dc.Z.Fe)}D(){return this.Z.reduce((a,b)=>a.concat(b.D()),[])}j(a,b){return a.run(()=>olympe.C.ua(this.Z.map(c=>c.j(a,b)),(...c)=>olympe.C.Sb(c.some(d=>d.valueOf())),olympe.C.da))}ga(a){const b=this.Z.map(c=>c.ga(a));return'{"c":"'+this.la()+'","a":['+b.join(',')+']}'}toString(){return'Or('+this.Z.map(a=>a.toString()).join(',')+
1011
1012
  ')'}};P('olympe.dc.predicates.Or',olympe.dc.Z.Fe);olympe.dc.Z.Fe.za=[olympe.dc.Ba];olympe.dc.Z.Hf=class{constructor(a,b,c){this.source=a;this.H=b;this.F=void 0===c?!0:c}la(){return Q(olympe.dc.Z.Hf)}D(){return[this.source.j()]}jb(){return this.source}j(a,b){return a.run(()=>olympe.C.ua([this.source.getValue(a,b),this.H,this.F],(c,d,e)=>{c=String(c);d=String(d);e.valueOf()||(c=c.toLowerCase(),d=d.toLowerCase());return olympe.C.Sb((new RegExp(d)).test(c))},olympe.C.da))}ga(a){const b=this.source.ga(a),c=Cm(a,this.H);a=Cm(a,this.F);return'{"c":"'+this.la()+'","a":['+b+','+c+','+a+
1012
1013
  ']}'}toString(){const a=Bm(this.F);return'Regex('+this.source.toString()+','+this.H+','+a+')'}};P('olympe.dc.predicates.Regex',olympe.dc.Z.Hf);olympe.dc.Z.Hf.za=[olympe.dc.Ba];olympe.dc.Z.Rk=class extends olympe.dc.Z.El{constructor(a,b){super(a,b)}la(){return Q(olympe.dc.Z.Rk)}N(a,b){return a<b}};P('olympe.dc.predicates.Smaller',olympe.dc.Z.Rk);olympe.dc.lc={};olympe.dc.lc.Vj=class{constructor(){this.$=this.H=this.R=this.D=null}N(){return null!==this.D}Y(a){if(null!==this.D)throw Error('Manager already activated (depth='+this.D+')');this.D=a;this.F()}j(a,b,c){b=this.H;if(a&&null!==b)throw Error('The AutoManger handles only a single item.');a?(b=new olympe.dc.lc.gk(this),this.R=c,this.H=b):this.H=this.R=null;return b}F(){if(null===this.D)throw Error('Manager not activated, need to set a depth before updating ranks');if(null!==this.$){const a=[];null!==this.H&&
1013
1014
  (0<=this.D?Km(Lm(this.H,this.D),a):a.push(this.R));this.$(a)}}Ag(a){this.$=a}};olympe.dc.lc.Vj.za=[olympe.dc.lc.Ua];function zm(a,b,c,d){b?a.N[d]=c:delete a.N[d];null===a.D&&(a.D=new olympe.dc.lc.gk(a.j,a));return a.D}function Lm(a,b){for(let c=0;c<b;c++)if(null!==a.D)a=a.D;else break;return a}function Km(a,b){a=a.N;if(null!==a)for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(c)}olympe.dc.lc.gk=class{constructor(a,b){this.j=a;this.depth=b?b.depth+1:0;this.N=Object.create(null);this.D=null}re(){return this.j}pg(){this.j.N()?this.j.F():this.j.Y(this.depth-1)}};class Mm extends olympe.dc.lc.gk{constructor(a,b,c){super(a);this.R=b;this.tag=c;this.$=this.Y=this.H=!1;this.F=null}}
1014
1015
  function Nm(a,b,c,d,e){const f=Object.create(null),g=a.ja,h=a.H;let k,l,n;a.ea=!0;l=0;for(n=g.length;l<n;l++)f[g[l]]=null;g.length=0;l=c;for(n=Math.min(b.length,d);l<n;l++)k=b[l],c=h[k],void 0!==c&&(delete f[k],g.push(k),c.H||(c.H=!0,e(!0,c.tag,c.R,c)));for(k in f)Object.prototype.hasOwnProperty.call(f,k)&&(c=h[k],c.H&&(c.H=!1,e(!1,c.tag,c.R,c)),c.Y&&(c.F=null,delete h[k]),delete f[k]);a.ea=!1;null!==a.D&&a.F()}
1015
- olympe.dc.lc.zm=class{constructor(){this.H={};this.ja=[];this.D=null;this.ea=!1;this.R=[];this.$=null}N(){return null!==this.D}Y(a){if(null!==this.D)throw Error('Manager already activated (depth='+this.D+')');this.D=a;this.F()}F(){if(null===this.D)throw Error('Manager not activated, need to set a depth before updating ranks');if(!this.ea){var a=this.ja,b=a.length,c=this.H,d;for(d=this.R.length=0;d<b;d++){var e=c[a[d]];if(0>this.D)this.R.push(e.R);else{if(!e.$){var f=e,g=this.D;f.$=!0;f.F=Lm(f,g)}null!==
1016
- e.F&&Km(e.F,this.R)}}this.$&&this.$(this.R)}}Ag(a){this.$=a}j(a,b,c){let d=this.H[c];a?void 0===d?(d=new Mm(this,c,b),this.H[c]=d):(d.tag=b,d.Y=!1):void 0!==d&&(d.Y=!0);return d}};olympe.dc.lc.zm.za=[olympe.dc.lc.Ua];olympe.dc.lc.Ua=class{constructor(){}j(){}N(){}Y(){}F(){}Ag(){}};function Om(a,b){olympe.C.qf(a.value)?(a.node=olympe.C.Rn(a.value,b),Tb(a.node)||b()):b()}function Pm(a,b){if(olympe.C.qf(a.value)){const c=olympe.C.$a(),d=a.H;olympe.C.Vc([a.value],e=>{d!==e.valueOf()&&(c.run(()=>Om(a,b)),olympe.C.$a().destroy())})}}
1016
+ olympe.dc.lc.Am=class{constructor(){this.H={};this.ja=[];this.D=null;this.ea=!1;this.R=[];this.$=null}N(){return null!==this.D}Y(a){if(null!==this.D)throw Error('Manager already activated (depth='+this.D+')');this.D=a;this.F()}F(){if(null===this.D)throw Error('Manager not activated, need to set a depth before updating ranks');if(!this.ea){var a=this.ja,b=a.length,c=this.H,d;for(d=this.R.length=0;d<b;d++){var e=c[a[d]];if(0>this.D)this.R.push(e.R);else{if(!e.$){var f=e,g=this.D;f.$=!0;f.F=Lm(f,g)}null!==
1017
+ e.F&&Km(e.F,this.R)}}this.$&&this.$(this.R)}}Ag(a){this.$=a}j(a,b,c){let d=this.H[c];a?void 0===d?(d=new Mm(this,c,b),this.H[c]=d):(d.tag=b,d.Y=!1):void 0!==d&&(d.Y=!0);return d}};olympe.dc.lc.Am.za=[olympe.dc.lc.Ua];olympe.dc.lc.Ua=class{constructor(){}j(){}N(){}Y(){}F(){}Ag(){}};function Om(a,b){olympe.C.qf(a.value)?(a.node=olympe.C.Sn(a.value,b),Tb(a.node)||b()):b()}function Pm(a,b){if(olympe.C.qf(a.value)){const c=olympe.C.$a(),d=a.H;olympe.C.Vc([a.value],e=>{d!==e.valueOf()&&(c.run(()=>Om(a,b)),olympe.C.$a().destroy())})}}
1017
1018
  class Qm extends olympe.dc.lc.gk{constructor(a,b,c){super(a);this.Y=b;this.value=c;this.H=this.Qa();this.position=this.node=null;this.R=!1;this.F=null}Qa(){const a=olympe.C.Qa(this.value);return a?a.valueOf():a}destroy(){this.node&&(this.node.destroy(),this.node=null);this.F=this.value=null}gb(){return null===this.value}}
1018
1019
  function Rm(a,b){if(!b.gb()){var c=a.D;var d=a.ja,e=b.Qa(),f=0;let g=c.length,h=0,k;for(null!==b.position&&--g;g>f;){h=Math.floor((f+g)/2);k=d(c[h].H,e);if(0===k||2>g-f){0>k&&null!==b.position&&b.position<=h&&(k=d(c[g].H,e));h=0>k?g:h;break}0>k?f=h:g=h}c=h;b.H=b.Qa();if(c!==b.position){d=a.D;e=d.length;f=b.position;null===f&&(f=e);if(c<f)for(e=f;e>c;e--)d[e]=d[e-1],d[e].position=e;else for(e=f;e<c;e++)d[e]=d[e+1],d[e].position=e;d[c]=b;d[c].position=c;b.R&&a.F()}}}
1019
1020
  function Sm(a){const b=a.ja;a.D.sort((c,d)=>b(c.Qa(),d.Qa()))}
@@ -1025,11 +1026,11 @@ olympe.dc.lc.Vr=class{constructor(a,b){this.db=a;this.G=b||null;this.H=Object.cr
1025
1026
  class Zm{constructor(a,b){this.id=a;this.F=b||null;this.j=this.R=this.H=this.D=null;this.N=!1}T(){return this.id}pg(a){const b=this.R;if(this.N||this.j===a||null===a)b&&b(),!b&&Tm(this)}notify(a){const b=this.H,c=this.D;if(this.N)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.bb={};function cn(a,b,c,d){const e=olympe.dc.ha(),f=new olympe.dc.lc.Vj,g=new olympe.dc.lc.Vr(e);let h=!1;const k=Object.create(null),l=q=>{if(0<q.length)for(const r in k)q[0]===r&&d(k[r])};let n=(q,r,t,v)=>{a.jd()||a.gb()||(h||(xm(g,()=>{v.pg();um(g)}),v.re().Ag(l),h=!0),q?k[t]=r:delete k[t],ym(g,t))};if(null!==c)for(let q=c.length-1;0<=q;q--)n=c[q].j(a,g,n);const p=olympe.V.Kc();Of(e,b,(q,r)=>{g.register(p,null);const t=f.j(q,b,p,null);n(q,r,p,zm(t,q,b,p))},p);a.onDestroy(()=>{Mf(e,b,p)});e.Ja(b)||um(g)}
1026
1027
  function dn(a,b,c){const d=c.getContext(),e=olympe.dc.ha(),f=a.F(),g=gh(e,b,a.H,d.tc(h=>{null!==h&&(h=f(h));null===h?c.clear():c.update(h)}));d.onDestroy(()=>hh(e,b,a.H,g))}
1027
1028
  olympe.dc.bb.Di=class{constructor(a,b,c){this.H=a&&a.X?a.X():a;this.ba=b&&b.filter(d=>d instanceof olympe.dc.ba.af||d instanceof olympe.dc.ba.Ke)||null;this.D=c||null;this.defaultValue=null}la(){}Nb(){}F(){}j(){return(this.ba||[]).reduce((a,b)=>a.concat(olympe.dc.query.Relation.from(b)),[])}xh(a){this.defaultValue=a;return this}qh(){return this.ba}ce(){return this.D}getValue(a,b){const c=a.run(()=>olympe.C.cc(this.Nb()||Object,'AbstractProperty valueType'));null!==this.defaultValue&&mc(c,this.defaultValue);
1028
- b=this.D||b;null!==this.ba?cn(a,b,this.ba,d=>{dn(this,d,c)}):dn(this,b,c);return c.tb()}ga(a){const b=Cm(a,this.H),c=Cm(a,this.D);let d='null';this.ba&&(d=this.ba.map(function(e){return e.ga(a)}).join(','));return`{"c":"${this.la()}","a":["${b}",${d},${c}]}`}toString(){const a=Bm(this.H),b=this.D?','+Bm(this.D):'';let c='';this.ba&&(c=','+this.ba.join(','));return this.la().replace(/^.+\./,'')+'('+a+c+b+')'}};olympe.dc.bb.Di.za=[olympe.dc.Yk];olympe.dc.bb.po=class{constructor(a,b){if(olympe.C.qf(a))throw Error('Dataflows of Property not supported by AnyProperty');const c=a.X();var d=olympe.dc.ha();const e=d.Jb(a,olympe.dm.Property.typeRel);if(!e)throw Error('Type of property '+a+'unavailable locally, cannot proceed with AnyProperty');a=d.oh(e,olympe.dc.CloudObject.extendRel,olympe.dm.Ie);d=null;switch(1<a.length?a[a.length-2]:e){case olympe.dm.String.O.X():d=new olympe.dc.bb.jj(c,b);break;case olympe.dm.Number.O.X():d=new olympe.dc.bb.aj(c,
1029
- b);break;case olympe.dm.Boolean.O.X():d=new olympe.dc.bb.Wj(c,b);break;case olympe.dm.DateTime.O.X():d=new olympe.dc.bb.Ji(c,b)}this.D=d}la(){return this.D.la()}j(){return this.D.j()}getValue(a,b){return this.D.getValue(a,b)}ga(a){return this.D.ga(a)}toString(){return this.D.toString()}};olympe.dc.bb.po.za=[olympe.dc.Yk];olympe.dc.bb.Wj=class extends olympe.dc.bb.Di{constructor(a,b,c){super(a,b,c)}la(){return Q(olympe.dc.bb.Wj)}F(){return olympe.dc.nb.qn}Nb(){return olympe.C.da}};P('olympe.dc.valuedefs.BooleanProperty',olympe.dc.bb.Wj);olympe.dc.bb.Xe=class{constructor(a){this.value=a}la(){return Q(olympe.dc.bb.Xe)}j(){return[]}getValue(){return this.value}ga(a){a=Cm(a,this.value);return`{"c":"${this.la()}","a":[${a}]}`}toString(){return`Constant(${Bm(this.value)})`}};P('olympe.dc.valuedefs.Constant',olympe.dc.bb.Xe);olympe.dc.bb.Xe.za=[olympe.dc.Yk];olympe.dc.bb.Ji=class extends olympe.dc.bb.Di{constructor(a,b,c){super(a,b,c)}la(){return Q(olympe.dc.bb.Ji)}F(){return olympe.dc.nb.rn}Nb(){return olympe.C.eb}};P('olympe.dc.valuedefs.DateTimeProperty',olympe.dc.bb.Ji);olympe.dc.bb.aj=class extends olympe.dc.bb.Di{constructor(a,b,c){super(a,b,c)}la(){return Q(olympe.dc.bb.aj)}F(){return olympe.dc.nb.sn}Nb(){return olympe.C.aa}};P('olympe.dc.valuedefs.NumberProperty',olympe.dc.bb.aj);olympe.dc.bb.jj=class extends olympe.dc.bb.Di{constructor(a,b,c){super(a,b,c)}la(){return Q(olympe.dc.bb.jj)}F(){return olympe.dc.nb.tn}Nb(){return olympe.C.Ta}};P('olympe.dc.valuedefs.StringProperty',olympe.dc.bb.jj);olympe.dc.bb.kj=class{la(){return Q(olympe.dc.bb.kj)}j(){return[]}getValue(a,b){return b}ga(){return'{"c":"'+this.la()+'","a":[]}'}toString(){return'Tag()'}};P('olympe.dc.valuedefs.Tag',olympe.dc.bb.kj);olympe.dc.bb.kj.za=[olympe.dc.Yk];olympe.dc.ba={};olympe.dc.ba.Ki=class{Nb(){return null}la(){return Q(olympe.dc.ba.Ki)}j(a,b,c){const d={};return function(e,f,g,h){e?void 0===d[f]?(d[f]=1,b.j.j!==g||b.D||(b.j.j=f),c(!0,f,f,zm(h,!0,f,f))):(d[f]++,Vm(b,g)):void 0!==d[f]&&0>=--d[f]&&(delete d[f],c(!1,f,f,zm(h,!1,f,f)))}}ga(){return'{"c":"'+this.la()+'"}'}toString(){return'Distinct()'}};P('olympe.dc.transformers.Distinct',olympe.dc.ba.Ki);olympe.dc.ba.Ki.za=[olympe.dc.Kf];olympe.dc.ba.zf=class{constructor(a){this.D=a}Nb(){return null}la(){return Q(olympe.dc.ba.zf)}F(){return this.D.D()}j(a,b,c){function d(f,g,h,k){k=k.valueOf();!1===k&&Vm(b,g);k!==!!e[g]&&(e[g]=k,c(k,f,g,zm(h,k,f,g)))}const e={};return(f,g,h,k)=>{const l='@'+h;if(f){let n=this.D.j(a,g);olympe.C.hb(n)&&(n=n.Ca);olympe.C.Vf(n)?(b.D||void 0!==olympe.C.Qa(n)||Vm(b,h),e[l]=n,a.run(()=>{olympe.C.Vc([n],p=>{d(g,h,k,p)},'filterResultHandler')})):d(g,h,k,n)}else void 0!==e[l]&&(e[l].destroy(),delete e[l]),
1029
+ b=this.D||b;null!==this.ba?cn(a,b,this.ba,d=>{dn(this,d,c)}):dn(this,b,c);return c.tb()}ga(a){const b=Cm(a,this.H),c=Cm(a,this.D);let d='null';this.ba&&(d=this.ba.map(function(e){return e.ga(a)}).join(','));return`{"c":"${this.la()}","a":["${b}",${d},${c}]}`}toString(){const a=Bm(this.H),b=this.D?','+Bm(this.D):'';let c='';this.ba&&(c=','+this.ba.join(','));return this.la().replace(/^.+\./,'')+'('+a+c+b+')'}};olympe.dc.bb.Di.za=[olympe.dc.Yk];olympe.dc.bb.qo=class{constructor(a,b){if(olympe.C.qf(a))throw Error('Dataflows of Property not supported by AnyProperty');const c=a.X();var d=olympe.dc.ha();const e=d.Jb(a,olympe.dm.Property.typeRel);if(!e)throw Error('Type of property '+a+'unavailable locally, cannot proceed with AnyProperty');a=d.oh(e,olympe.dc.CloudObject.extendRel,olympe.dm.Ie);d=null;switch(1<a.length?a[a.length-2]:e){case olympe.dm.String.O.X():d=new olympe.dc.bb.jj(c,b);break;case olympe.dm.Number.O.X():d=new olympe.dc.bb.aj(c,
1030
+ b);break;case olympe.dm.Boolean.O.X():d=new olympe.dc.bb.Wj(c,b);break;case olympe.dm.DateTime.O.X():d=new olympe.dc.bb.Ji(c,b)}this.D=d}la(){return this.D.la()}j(){return this.D.j()}getValue(a,b){return this.D.getValue(a,b)}ga(a){return this.D.ga(a)}toString(){return this.D.toString()}};olympe.dc.bb.qo.za=[olympe.dc.Yk];olympe.dc.bb.Wj=class extends olympe.dc.bb.Di{constructor(a,b,c){super(a,b,c)}la(){return Q(olympe.dc.bb.Wj)}F(){return olympe.dc.nb.rn}Nb(){return olympe.C.da}};P('olympe.dc.valuedefs.BooleanProperty',olympe.dc.bb.Wj);olympe.dc.bb.Xe=class{constructor(a){this.value=a}la(){return Q(olympe.dc.bb.Xe)}j(){return[]}getValue(){return this.value}ga(a){a=Cm(a,this.value);return`{"c":"${this.la()}","a":[${a}]}`}toString(){return`Constant(${Bm(this.value)})`}};P('olympe.dc.valuedefs.Constant',olympe.dc.bb.Xe);olympe.dc.bb.Xe.za=[olympe.dc.Yk];olympe.dc.bb.Ji=class extends olympe.dc.bb.Di{constructor(a,b,c){super(a,b,c)}la(){return Q(olympe.dc.bb.Ji)}F(){return olympe.dc.nb.sn}Nb(){return olympe.C.eb}};P('olympe.dc.valuedefs.DateTimeProperty',olympe.dc.bb.Ji);olympe.dc.bb.aj=class extends olympe.dc.bb.Di{constructor(a,b,c){super(a,b,c)}la(){return Q(olympe.dc.bb.aj)}F(){return olympe.dc.nb.tn}Nb(){return olympe.C.aa}};P('olympe.dc.valuedefs.NumberProperty',olympe.dc.bb.aj);olympe.dc.bb.jj=class extends olympe.dc.bb.Di{constructor(a,b,c){super(a,b,c)}la(){return Q(olympe.dc.bb.jj)}F(){return olympe.dc.nb.un}Nb(){return olympe.C.Ta}};P('olympe.dc.valuedefs.StringProperty',olympe.dc.bb.jj);olympe.dc.bb.kj=class{la(){return Q(olympe.dc.bb.kj)}j(){return[]}getValue(a,b){return b}ga(){return'{"c":"'+this.la()+'","a":[]}'}toString(){return'Tag()'}};P('olympe.dc.valuedefs.Tag',olympe.dc.bb.kj);olympe.dc.bb.kj.za=[olympe.dc.Yk];olympe.dc.ba={};olympe.dc.ba.Ki=class{Nb(){return null}la(){return Q(olympe.dc.ba.Ki)}j(a,b,c){const d={};return function(e,f,g,h){e?void 0===d[f]?(d[f]=1,b.j.j!==g||b.D||(b.j.j=f),c(!0,f,f,zm(h,!0,f,f))):(d[f]++,Vm(b,g)):void 0!==d[f]&&0>=--d[f]&&(delete d[f],c(!1,f,f,zm(h,!1,f,f)))}}ga(){return'{"c":"'+this.la()+'"}'}toString(){return'Distinct()'}};P('olympe.dc.transformers.Distinct',olympe.dc.ba.Ki);olympe.dc.ba.Ki.za=[olympe.dc.Kf];olympe.dc.ba.zf=class{constructor(a){this.D=a}Nb(){return null}la(){return Q(olympe.dc.ba.zf)}F(){return this.D.D()}j(a,b,c){function d(f,g,h,k){k=k.valueOf();!1===k&&Vm(b,g);k!==!!e[g]&&(e[g]=k,c(k,f,g,zm(h,k,f,g)))}const e={};return(f,g,h,k)=>{const l='@'+h;if(f){let n=this.D.j(a,g);olympe.C.hb(n)&&(n=n.Ca);olympe.C.Vf(n)?(b.D||void 0!==olympe.C.Qa(n)||Vm(b,h),e[l]=n,a.run(()=>{olympe.C.Vc([n],p=>{d(g,h,k,p)},'filterResultHandler')})):d(g,h,k,n)}else void 0!==e[l]&&(e[l].destroy(),delete e[l]),
1030
1031
  d(g,h,k,!1),delete e[h]}}ga(a){return'{"c":"'+this.la()+'","a":['+this.D.ga(a)+']}'}toString(){return'Filter('+this.D.toString()+')'}};P('olympe.dc.transformers.Filter',olympe.dc.ba.zf);olympe.dc.ba.zf.za=[olympe.dc.Kf,olympe.dc.gr];olympe.dc.ba.hm=class{constructor(a,b,c,d){this.D=new olympe.dc.Sa.Relation(olympe.dc.fa(a),c||olympe.dc.va.DESTINATION);this.F=new olympe.dc.Sa.Relation(olympe.dc.fa(b),d||olympe.dc.va.DESTINATION)}Nb(){return hg(this.D)}la(){return Q(olympe.dc.ba.hm)}j(a,b,c){const d=olympe.dc.ha(),e={},f=this.D.X(),g=this.D.La(),h=this.F.X(),k=this.F.La();let l=null,n=null;const p=(r,t,v,x,y,z)=>{if(y){if(y=()=>{const A=olympe.V.ub(v+g+(f+'_'+r)+z,20),K=zm(t,!0,z,A);l=r;n=()=>{c(!1,z,A,zm(t,!1,z,A))};b.register(A,
1031
1032
  v,x,f,g);c(!0,z,A,K)},y.Ys=r,e[x]=y,null===l||r<l)n&&n(),y()}else if(l===r){n();e[x]=!0;y=Infinity;let A=null;for(let K=Object.keys(e),Y=K.length,ya=0;ya<Y;ya++){let db=e[K[ya]];db.Ys<y&&(y=db.Ys,A=db)}A&&A()}},q=(r,t,v,x,y)=>{x?e[y]||(e[y]=!0,Wm(b,v,y,f,g),Wm(b,v,y,h,k),T(d,y,this.D,p.bind(this,r,t,v,y),v+'_val'),T(d,y,this.F,q.bind(this,r+1,t,v),v+'_follow')):(d.D(y,this.F,v+'_follow'),d.D(y,this.D,v+'_val'),delete e[y])};return(r,t,v,x)=>q(0,x,v,r,t)}ga(){return'{"c":"'+this.la()+'","a":["'+this.D.toString()+
1032
- '","'+this.F.toString()+'"]}'}toString(){return'FirstRelated('+this.D.toString()+', '+this.F.toString()+')'}};P('olympe.dc.transformers.FirstRelated',olympe.dc.ba.hm);olympe.dc.ba.hm.za=[olympe.dc.Kf];olympe.dc.ba.Nh=class{constructor(a,b){this.start=a;this.D=b}Nb(){return null}la(){return Q(olympe.dc.ba.Nh)}j(a,b,c){const d=new olympe.dc.lc.zm;let e,f,g,h=!1;const k=()=>{if(void 0!==f&&void 0!==g&&void 0!==e){var n=f+g;b.D||(b.j.j=e[0>n-1?0:Math.min(e.length,n)-1]);Nm(d,e,f,n,c)}};a.run(()=>olympe.C.Vc([this.start,this.D],(n,p)=>{f=n.valueOf();g=p.valueOf();k()}));an(b,k);const l=Ym(b);Xm(b,l);return(n,p,q,r)=>{h||(r.re().Ag(t=>{e=t;bn(b,l)}),xm(b,()=>r.pg(),l),h=!0);d.j(n,p,q,null);ym(b,q,l)}}ga(a){return'{"c":"'+
1033
+ '","'+this.F.toString()+'"]}'}toString(){return'FirstRelated('+this.D.toString()+', '+this.F.toString()+')'}};P('olympe.dc.transformers.FirstRelated',olympe.dc.ba.hm);olympe.dc.ba.hm.za=[olympe.dc.Kf];olympe.dc.ba.Nh=class{constructor(a,b){this.start=a;this.D=b}Nb(){return null}la(){return Q(olympe.dc.ba.Nh)}j(a,b,c){const d=new olympe.dc.lc.Am;let e,f,g,h=!1;const k=()=>{if(void 0!==f&&void 0!==g&&void 0!==e){var n=f+g;b.D||(b.j.j=e[0>n-1?0:Math.min(e.length,n)-1]);Nm(d,e,f,n,c)}};a.run(()=>olympe.C.Vc([this.start,this.D],(n,p)=>{f=n.valueOf();g=p.valueOf();k()}));an(b,k);const l=Ym(b);Xm(b,l);return(n,p,q,r)=>{h||(r.re().Ag(t=>{e=t;bn(b,l)}),xm(b,()=>r.pg(),l),h=!0);d.j(n,p,q,null);ym(b,q,l)}}ga(a){return'{"c":"'+
1033
1034
  this.la()+'","a":['+Cm(a,this.start)+','+Cm(a,this.D)+']}'}toString(){return`Limit(${olympe.C.Qa(this.start)},${olympe.C.Qa(this.D)})`}};P('olympe.dc.transformers.Limit',olympe.dc.ba.Nh);olympe.dc.ba.Nh.za=[olympe.dc.Kf];function en(a){return a.pb.map(b=>b.X())}
1034
1035
  olympe.dc.ba.tk=class{constructor(a,b){this.direction=b||olympe.dc.va.DESTINATION;this.pb=a.map(c=>new olympe.dc.Sa.Relation(c,this.direction))}Nb(){return olympe.dc.CloudObject}la(){return Q(olympe.dc.ba.tk)}La(){return this.direction}j(a,b,c){const d=olympe.dc.ha(),e=(f,g,h,k)=>T(d,f,k,(l,n)=>{var p=k.X();p=olympe.V.ub(g+k.La()+p+n,20);const q=zm(h,l,n,p);l&&b.register(p,g,f,k.X(),k.La());c(l,n,p,q)},g);return(f,g,h,k)=>{f?this.pb.forEach(l=>{Wm(b,h,g,l.X(),l.La());e(g,h,k,l)}):this.pb.forEach(l=>
1035
1036
  {d.D(g,l,h)})}}ga(){return'{"c":"'+this.la()+'","a":['+JSON.stringify(en(this))+',"'+this.direction+'"]}'}toString(){return'MultiRelated('+this.La()+'['+en(this).join(',')+'])'}};P('olympe.dc.transformers.MultiRelated',olympe.dc.ba.tk);olympe.dc.ba.tk.za=[olympe.dc.Kf];olympe.dc.ba.Ke=class extends olympe.dc.Sa.Relation{constructor(a,b=olympe.dc.va.DESTINATION,c=1,d=-1){super(a,b);this.F=c;this.D=d}Nb(){return hg(this)}la(){return Q(olympe.dc.ba.Ke)}j(a,b,c){const d=olympe.dc.ha(),e=Object.create(null),f=olympe.dc.va.ORIGIN,g=olympe.dc.va.DESTINATION,h=this.X(),k=this.La(),l=(p,q,r)=>{if(!(0<=this.D&&p>=this.D)){var t=d.cb(r,this);p+=1;for(let v=0,x=t.length;v<x;v++){if(void 0!==e[t[v]]||r===t[v])continue;const y=olympe.V.ub(q+k+(h+'_'+p)+t[v],20);b.register(y,
@@ -1037,7 +1038,7 @@ q,r,h,k||g);null===k&&b.register(y,q,r,h,f)}}},n=(p,q,r,t,v,x)=>{v&&!b.D&&l(p,t,
1037
1038
  P('olympe.dc.transformers.RecursiveRelated',olympe.dc.ba.Ke);olympe.dc.ba.Ke.za=[olympe.dc.Kf];olympe.dc.ba.af=class extends olympe.dc.Sa.Relation{constructor(a,b){super(a,b||olympe.dc.va.DESTINATION)}Nb(){return hg(this)}la(){return Q(olympe.dc.ba.af)}$b(){return new olympe.dc.ba.af(this.tag,this.direction===olympe.dc.va.DESTINATION?olympe.dc.va.ORIGIN:olympe.dc.va.DESTINATION)}j(a,b,c){const d=olympe.dc.ha(),e=this.X(),f=this.La();return(g,h,k,l)=>{Wm(b,k,h,e,f);g?T(d,h,this,(n,p)=>{const q=olympe.V.ub(k+f+e+p,20),r=zm(l,n,p,q);n&&b.register(q,k,h,e,f);c(n,p,q,r)},k):d.D(h,this,k)}}ga(){return'{"c":"'+
1038
1039
  this.la()+'","a":["'+this.X()+'","'+this.La()+'"]}'}toString(){return'Related('+this.La()+this.X()+')'}};P('olympe.dc.transformers.Related',olympe.dc.ba.af);olympe.dc.ba.af.za=[olympe.dc.Kf];olympe.dc.ba.bh=class{constructor(a,b){this.Hb=a;this.D=void 0===b?!0:!!b}Nb(){return null}la(){return Q(olympe.dc.ba.bh)}kh(){return this.Hb}F(){return[this.Hb.H()]}j(a,b,c){const d=new olympe.dc.lc.Tr(a.tc(this.D?this.Hb.compare.bind(this.Hb):(e,f)=>this.Hb.compare(f,e)));return(e,f,g)=>{var h=e?this.Hb.F(a,f):void 0;h=d.j(e,f,g,h);c(e,f,g,h)}}ga(a){return'{"c":"'+this.la()+'","a":['+this.Hb.ga(a)+','+JSON.stringify(this.D)+']}'}toString(){return'Sort('+this.Hb.toString()+','+JSON.stringify(this.D)+
1039
1040
  ')'}};P('olympe.dc.transformers.Sort',olympe.dc.ba.bh);olympe.dc.ba.bh.za=[olympe.dc.Kf,olympe.dc.gr];function fn(a,b,c,d,e,f){function g(n,p){if(l)for(var q=l.length-1;0<=q;q--)f=l[q].j(b,e,f);e.register(h,null);q=d.j(n,p,c,null);f(n,p,h,zm(q,n,p,h))}const h=olympe.V.Kc(),k=olympe.dc.ha(),l=a.ba;b.run(()=>olympe.C.Vc([a.D],n=>{gn(k,n,g,h);void 0===k.model(n)&&um(e)}))}function gn(a,b,c,d){const e=b&&b.valueOf();e&&(Of(a,e,c,d),olympe.C.$a().Yd(()=>Mf(a,e,d)))}
1040
- olympe.dc.ba.Lf=class{constructor(a,b){this.ba=this.D=null;a instanceof olympe.dc.Aa?(this.D=a.ce(),this.ba=a.tm()):(this.D=a,b&&(this.ba=b))}Nb(){return null}la(){return Q(olympe.dc.ba.Lf)||''}qh(){return this.ba}ce(){return this.D}j(a,b,c){const d=new olympe.dc.lc.zm,e=new olympe.dc.lc.Vj;let f=[],g=[],h=!1,k=!1;const l=Ym(b),n=Ym(b);an(b,()=>{const p=f.concat(g);0<p.length?b.D||(b.j.j=p[p.length-1]):bn(b);Nm(d,p,0,p.length,c)});Xm(b,n);fn(this,a,this.D,e,b,(p,q,r,t)=>{const v=olympe.C.$a();v.jd()||
1041
+ olympe.dc.ba.Lf=class{constructor(a,b){this.ba=this.D=null;a instanceof olympe.dc.Aa?(this.D=a.ce(),this.ba=a.um()):(this.D=a,b&&(this.ba=b))}Nb(){return null}la(){return Q(olympe.dc.ba.Lf)||''}qh(){return this.ba}ce(){return this.D}j(a,b,c){const d=new olympe.dc.lc.Am,e=new olympe.dc.lc.Vj;let f=[],g=[],h=!1,k=!1;const l=Ym(b),n=Ym(b);an(b,()=>{const p=f.concat(g);0<p.length?b.D||(b.j.j=p[p.length-1]):bn(b);Nm(d,p,0,p.length,c)});Xm(b,n);fn(this,a,this.D,e,b,(p,q,r,t)=>{const v=olympe.C.$a();v.jd()||
1041
1042
  v.gb()||(k||(t.re().Ag(x=>{g=x;bn(b,n)}),xm(b,()=>t.pg(),n),k=!0),d.j(p,q,r),ym(b,r,n))});Xm(b,l);return(p,q,r,t)=>{h||(t.re().Ag(v=>{f=v;bn(b,l)}),xm(b,()=>t.pg(),l),h=!0);d.j(p,q,r,l);ym(b,r,l)}}ga(a){const b=this.ba?'['+this.ba.map(c=>c.ga(a)).join(',')+']':'null';return'{"c":"'+this.la()+'","a":['+Cm(a,this.D)+','+b+']}'}toString(){const a=olympe.C.hb(this.D)?'N:'+this.D.Ca.T():this.D.valueOf(),b=this.ba?','+this.ba.map(c=>c.toString()).join(','):'';return'Union('+a+b+')'}};
1042
1043
  P('olympe.dc.transformers.Union',olympe.dc.ba.Lf);olympe.dc.ba.Lf.za=[olympe.dc.Kf];olympe.dc.ba.Ar={JB:1,Bu:-1,Au:0};olympe.dc.ba.mD={rA:!0,SA:!1};olympe.dc.kc.P={pq:'dc.legacy.listdefProcessor'};olympe.dc.kc.U={oq:'dc.legacy.listdefsCovered'};olympe.W.config(a=>{E(a,olympe.dc.kc.U.oq,!1);C(a,olympe.dc.kc.P.pq,olympe.dc.kc.uv,olympe.dc.query.P.Da,olympe.dc.P.Dh,olympe.dc.transaction.P.Ea,olympe.dc.query.P.Fk,new olympe.W.pa(olympe.dc.U.Zh),new olympe.W.pa(olympe.dc.kc.U.oq))});olympe.W.run([olympe.dc.kc.P.pq],a=>{olympe.dc.kc.By=()=>a});function hn(a){const b=olympe.dc.ha(),c=new Map;b.Ms(a).forEach(d=>{b.cb(d,olympe.dc.CloudObject.propertyRel).forEach(e=>{const f=b.name(e);c.has(f)||c.set(f,e)})});return c}
1043
1044
  olympe.dc.CloudObject=class{constructor(a,b){this.tag=b;this.db=olympe.dc.ha();Object.defineProperty(this,'db',{enumerable:!1});this.model=null;Object.defineProperties(this,{db:{enumerable:!1}})}static Rc(a,b,c,...d){b=olympe.dc.fa(b);var e=Qf(b);if(e=e&&e.j)return e(a,c,...d);a=a.create(b);void 0!==c&&null!==c&&X(a,olympe.dc.CloudObject.nameProp,c);return a.X()}static get(a){if(a instanceof olympe.dc.CloudObject)var b=a;else{b=olympe.dc.Ps();a=olympe.dc.fa(a);var c=b.db.model(a);c=Pf(b,c);if(null===
@@ -1046,194 +1047,194 @@ return this.get(h)}static nx(){return this.get(this)}static pl(a){return olympe.
1046
1047
  olympe.dc.fa(a));b=b&&b.D;return new olympe.dc.Aa(olympe.dc.fa(a),olympe.dc.CloudObject.instancesRel,b)}X(){return this.tag}name(){return this.db.name(this)}la(){return this.wb(olympe.dc.CloudObject.nameProp)}Vb(){this.model||(this.model=olympe.dc.CloudObject.get(this.db.model(this)));return this.model}query(){return olympe.dc.ma.from(this)}Re(){return this.db.Re(this)}jb(){return this.db.source(this)}yy(){return this.db.wi(this)?olympe.dc.fe().fromModel(this):null}Ls(){return olympe.C.ua([this.la()],
1047
1048
  a=>olympe.C.xb(a),olympe.C.Ta,'getDisplayName',olympe.C.xb('('+this.toString()+')'))}ac(){return this.model?this.model.X():this.db.model(this)}observe(a,b,c=!0){const d='function'===typeof a.Bb?a.Bb():a;return new rxjs.Observable(e=>{const f=olympe.dc.nb.Cc(this.db.Ra(this.tag,b));c||null!==f||e.next(f);const g=gh(this.db,this.tag,b,h=>{e.next(olympe.dc.nb.Cc(h))});d.Yd(()=>{e.complete();hh(this.db,this.tag,b,g)});return()=>hh(this.db,this.tag,b,g)})}Fz(a){const b='function'===typeof a.Bb?a.Bb():
1048
1049
  a;return new rxjs.Observable(c=>{const d=ih(this.db,this.tag,(e,f)=>{null===f||void 0===f?c.next([new olympe.dc.Sa.Property(e),null]):c.next([new olympe.dc.Sa.Property(e),f])});b.Yd(()=>{c.complete();jh(this.db,this.tag,d)});return()=>jh(this.db,this.tag,d)})}Gz(a){return this.observe(olympe.C.$a(),a)}get(a){return olympe.dc.nb.Cc(this.db.Ra(this.tag,a))}Ra(a){return this.get(a)}fb(a){return olympe.dc.ma.from(this).fb(a)}wg(a){return olympe.dc.sd.from(this).fb(a)}Cc(){return this}gy(){return this.Sc(olympe.dc.CloudObject.Ax,
1049
- olympe.dc.CloudObject)}Cn(){return this.cb(olympe.dc.CloudObject.containsRel,olympe.dc.CloudObject)}Tf(a,b,c){const d=olympe.C.cc(c,'Sync valueType'),e=gh(this.db,this.tag,a,olympe.C.$a().tc(f=>{b&&null!==f&&void 0!==f&&(f=b(f));null===f||void 0===f?d.clear():d.update(f)}));d.getContext().onDestroy(()=>hh(this.db,this.tag,a,e));return d.getContext()}wb(a){return M(this.Tf(a,olympe.dc.nb.tn,olympe.C.Ta))}yd(a){return M(this.Tf(a,olympe.dc.nb.sn,olympe.C.aa))}nh(a){return M(this.Tf(a,olympe.dc.nb.qn,
1050
- olympe.C.da))}Dj(a){return M(this.Tf(a,olympe.dc.nb.rn,olympe.C.eb))}Us(){return M(this.Tf(olympe.dm.Color.valueProp,olympe.dc.nb.ys,olympe.C.Color))}Vs(){return M(this.Tf(olympe.sc.workflow.Transition.processRefProp,olympe.dc.nb.zs,olympe.dc.CloudObject))}cb(a,b){a=a instanceof olympe.dc.ba.af?a:new olympe.dc.ba.af(a.X(),a.La());return new olympe.dc.Aa(this.X(),a,b)}Sc(a,b){return this.cb(a,b).Ic()}Is(a,b){const c=this.db,d=olympe.V.Kc(),e=olympe.C.$a(),f=new Map;T(c,this.tag,a,(g,h)=>{if(g)(g=e.run(b,
1050
+ olympe.dc.CloudObject)}Dn(){return this.cb(olympe.dc.CloudObject.containsRel,olympe.dc.CloudObject)}Tf(a,b,c){const d=olympe.C.cc(c,'Sync valueType'),e=gh(this.db,this.tag,a,olympe.C.$a().tc(f=>{b&&null!==f&&void 0!==f&&(f=b(f));null===f||void 0===f?d.clear():d.update(f)}));d.getContext().onDestroy(()=>hh(this.db,this.tag,a,e));return d.getContext()}wb(a){return M(this.Tf(a,olympe.dc.nb.un,olympe.C.Ta))}yd(a){return M(this.Tf(a,olympe.dc.nb.tn,olympe.C.aa))}nh(a){return M(this.Tf(a,olympe.dc.nb.rn,
1051
+ olympe.C.da))}Dj(a){return M(this.Tf(a,olympe.dc.nb.sn,olympe.C.eb))}Us(){return M(this.Tf(olympe.dm.Color.valueProp,olympe.dc.nb.ys,olympe.C.Color))}Vs(){return M(this.Tf(olympe.sc.workflow.Transition.processRefProp,olympe.dc.nb.zs,olympe.dc.CloudObject))}cb(a,b){a=a instanceof olympe.dc.ba.af?a:new olympe.dc.ba.af(a.X(),a.La());return new olympe.dc.Aa(this.X(),a,b)}Sc(a,b){return this.cb(a,b).Ic()}Is(a,b){const c=this.db,d=olympe.V.Kc(),e=olympe.C.$a(),f=new Map;T(c,this.tag,a,(g,h)=>{if(g)(g=e.run(b,
1051
1052
  olympe.dc.CloudObject.get(h)))&&f.set(h,g);else{let k;null==(k=f.get(h))||k();f.delete(h)}},d);e.onDestroy(()=>{c.D(this.tag,a,d)})}jA(){return new olympe.dc.Aa(this.X(),[],fg(this.X()))}transform(...a){return(new olympe.dc.Aa(this.X(),[],this.constructor)).transform(...a)}Wc(){return this.Ls()}toString(){return`CloudObject: ${JSON.stringify(this)}`}toJSON(){return this.db.Ja(this.tag)?Object.assign({'#tag':this.X(),'#type':this.Vb().name()},this.Xc(!0,!0)):{'#tag':this.X(),'#error':'The object does not exist in the local database.'}}Xc(a=
1052
- !1,b=!0){const c={};this.db.Cb(this,b).forEach((d,e)=>{this.db.Ja(e)&&(e=a?this.db.name(e):e,c[e]=olympe.dc.nb.Cc(d))});return c}Fa(a){return a instanceof olympe.dc.CloudObject?this.X()===a.X():'function'===typeof a?olympe.dc.na.ac(a)===this.X():!1}Kd(a){return olympe.C.ua([a],b=>olympe.C.Sb(this.Fa(b)),olympe.C.da)}Hx(a){const b=this.db;let c=!1;if(void 0===a||null===a)a=new olympe.dc.Za,c=!0;const d=olympe.dc.va.ORIGIN;for(const [e,f,g]of th(b,this))f===d?a.ic(e,g,this):e!==olympe.dc.CloudObject.modelRel.X()&&
1053
+ !1,b=!0){const c={};this.db.Cb(this,b).forEach((d,e)=>{this.db.Ja(e)&&(e=a?this.db.name(e):e,c[e]=olympe.dc.nb.Cc(d))});return c}Fa(a){return a instanceof olympe.dc.CloudObject?this.X()===a.X():'function'===typeof a?olympe.dc.oa.ac(a)===this.X():!1}Kd(a){return olympe.C.ua([a],b=>olympe.C.Sb(this.Fa(b)),olympe.C.da)}Hx(a){const b=this.db;let c=!1;if(void 0===a||null===a)a=new olympe.dc.Za,c=!0;const d=olympe.dc.va.ORIGIN;for(const [e,f,g]of th(b,this))f===d?a.ic(e,g,this):e!==olympe.dc.CloudObject.modelRel.X()&&
1053
1054
  a.ic(e,this,g);a.delete(this,olympe.dc.Mb.NONE);c&&a.ob()}};olympe.dc.CloudObject.prototype.equals=olympe.dc.CloudObject.prototype.Fa;olympe.dc.CloudObject.prototype.toObject=olympe.dc.CloudObject.prototype.Xc;olympe.dc.CloudObject.prototype.followSingle=olympe.dc.CloudObject.prototype.wg;olympe.dc.CloudObject.prototype.follow=olympe.dc.CloudObject.prototype.fb;olympe.dc.CloudObject.prototype.getProperty=olympe.dc.CloudObject.prototype.Ra;olympe.dc.CloudObject.prototype.get=olympe.dc.CloudObject.prototype.get;
1054
1055
  olympe.dc.CloudObject.prototype.observeProperty=olympe.dc.CloudObject.prototype.Gz;olympe.dc.CloudObject.prototype.observeProperties=olympe.dc.CloudObject.prototype.Fz;olympe.dc.CloudObject.prototype.observe=olympe.dc.CloudObject.prototype.observe;olympe.dc.CloudObject.prototype.getModelTag=olympe.dc.CloudObject.prototype.ac;olympe.dc.CloudObject.prototype.getSource=olympe.dc.CloudObject.prototype.jb;olympe.dc.CloudObject.prototype.isPersisted=olympe.dc.CloudObject.prototype.Re;
1055
1056
  olympe.dc.CloudObject.prototype.query=olympe.dc.CloudObject.prototype.query;olympe.dc.CloudObject.prototype.getModel=olympe.dc.CloudObject.prototype.Vb;olympe.dc.CloudObject.prototype.name=olympe.dc.CloudObject.prototype.name;olympe.dc.CloudObject.prototype.getTag=olympe.dc.CloudObject.prototype.X;olympe.dc.CloudObject.getInstancesOf=olympe.dc.CloudObject.Qs;olympe.dc.CloudObject.getInstance=olympe.dc.CloudObject.Tc;olympe.dc.CloudObject.getRelations=olympe.dc.CloudObject.Jd;
1056
- olympe.dc.CloudObject.getProperties=olympe.dc.CloudObject.Cb;olympe.dc.CloudObject.instancesOf=olympe.dc.CloudObject.pl;olympe.dc.CloudObject.asInstance=olympe.dc.CloudObject.nx;olympe.dc.CloudObject.createWith=olympe.dc.CloudObject.Ex;olympe.dc.CloudObject.exists=olympe.dc.CloudObject.exists;olympe.dc.CloudObject.get=olympe.dc.CloudObject.get;olympe.dc.CloudObject.O=olympe.dc.na.j('ff021000000000000001',olympe.dc.CloudObject);olympe.dc.CloudObject.zF=olympe.dc.CloudObject.O.ka(olympe.dc.iq.VERSION);
1057
+ olympe.dc.CloudObject.getProperties=olympe.dc.CloudObject.Cb;olympe.dc.CloudObject.instancesOf=olympe.dc.CloudObject.pl;olympe.dc.CloudObject.asInstance=olympe.dc.CloudObject.nx;olympe.dc.CloudObject.createWith=olympe.dc.CloudObject.Ex;olympe.dc.CloudObject.exists=olympe.dc.CloudObject.exists;olympe.dc.CloudObject.get=olympe.dc.CloudObject.get;olympe.dc.CloudObject.O=olympe.dc.oa.j('ff021000000000000001',olympe.dc.CloudObject);olympe.dc.CloudObject.zF=olympe.dc.CloudObject.O.ka(olympe.dc.iq.VERSION);
1057
1058
  olympe.dc.CloudObject.nameProp=olympe.dc.CloudObject.O.ka('ff023000000000000011');w('olympe.dc.CloudObject.nameProp',olympe.dc.CloudObject.nameProp);olympe.dc.CloudObject.jF=olympe.dc.CloudObject.O.ka('ff023000000000000012');olympe.dc.CloudObject.Kj=olympe.dc.CloudObject.O.sa('ff02200000000000000a');olympe.dc.CloudObject.Fs=olympe.dc.CloudObject.O.sa('ff02200000000000000b',olympe.dc.va.ORIGIN);olympe.dc.CloudObject.TE=olympe.dc.CloudObject.O.sa('017e9c4ba4c847d71cbf');olympe.dc.CloudObject.JE=olympe.dc.CloudObject.O.sa('017ea013caf8e89cedb2');
1058
1059
  olympe.dc.CloudObject.propertyRel=olympe.dc.CloudObject.O.sa('ff02200000000000000c');w('olympe.dc.CloudObject.propertyRel',olympe.dc.CloudObject.propertyRel);olympe.dc.CloudObject.typeRel=olympe.dc.CloudObject.O.sa('ff02200000000000000d',olympe.dc.va.ORIGIN);olympe.dc.CloudObject.modelRel=olympe.dc.CloudObject.O.sa(olympe.dc.hc.$c);w('olympe.dc.CloudObject.modelRel',olympe.dc.CloudObject.modelRel);olympe.dc.CloudObject.instancesRel=R(olympe.dc.CloudObject.O,olympe.dc.CloudObject.modelRel);
1059
1060
  w('olympe.dc.CloudObject.instancesRel',olympe.dc.CloudObject.instancesRel);olympe.dc.CloudObject.extendRel=olympe.dc.CloudObject.O.sa(olympe.dc.hc.Li);w('olympe.dc.CloudObject.extendRel',olympe.dc.CloudObject.extendRel);olympe.dc.CloudObject.extendedByRel=R(olympe.dc.CloudObject.O,olympe.dc.CloudObject.extendRel);w('olympe.dc.CloudObject.extendedByRel',olympe.dc.CloudObject.extendedByRel);olympe.dc.CloudObject.containsRel=olympe.dc.CloudObject.O.sa(olympe.dc.hc.Zj);
1060
1061
  w('olympe.dc.CloudObject.containsRel',olympe.dc.CloudObject.containsRel);olympe.dc.CloudObject.Ax=R(olympe.dc.CloudObject.O,olympe.dc.CloudObject.containsRel);olympe.dc.CloudObject.Gx=olympe.dc.CloudObject.O.sa('018282d3ac0a474a0bf4');w('olympe.dc.CloudObject.deleteAlsoRel',olympe.dc.CloudObject.Gx);olympe.dc.oD=olympe.dc.CloudObject;olympe.dc.CloudObject.za=[olympe.dc.Ze];m=olympe.dc.CloudObject.prototype;m.X.K=new olympe.C.J(()=>String,[]);m.name.K=new olympe.C.J(()=>String,[]);m.la.K=olympe.C.J.D;
1061
- m.Vb.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);m.jb.K=new olympe.C.J(()=>String,[]);m.yy.K=new olympe.C.J(()=>String,[]);m.Ls.K=olympe.C.J.D;m.ac.K=new olympe.C.J(()=>String,[]);m.gy.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);m.Cn.K=new olympe.C.J(()=>olympe.dc.Aa,[]);m.Tf.K=new olympe.C.J(()=>olympe.C.Node,[]);m.wb.K=olympe.C.J.D;m.yd.K=olympe.C.J.F;m.nh.K=olympe.C.J.N;m.Dj.K=new olympe.C.J(()=>olympe.C.eb,[]);m.Us.K=new olympe.C.J(()=>olympe.C.Color,[]);
1062
- m.Vs.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);m.cb.K=new olympe.C.J(()=>olympe.dc.Aa,[]);m.Sc.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);m.Is.K=new olympe.C.J(()=>Function,[]);m.jA.K=new olympe.C.J(()=>olympe.dc.Aa,[]);m.transform.K=new olympe.C.J(()=>olympe.dc.Aa,[]);m.Wc.K=olympe.C.J.D;m.toString.K=olympe.C.J.j;m.Fa.K=olympe.C.J.j;m.Kd.K=olympe.C.J.N;m.Hx.K=new olympe.C.J(()=>{},[]);olympe.dc.P={Dh:'dc.DBView',bq:'dc.InstanceManager',Da:'dc.Logger',Hw:'dc.TransactionLogger',hk:'dc.FileServiceManager',Vg:'dc.Router'};olympe.dc.U={Yg:'dc.tag',bg:'dc.debug',Zh:'dc.subscribeAll',$l:'dc.defaultSource',tp:'dc.fileCache',Xo:'dc.dataConsumerOnly',op:'dc.errorOnAbstractInstantiation'};
1063
- olympe.W.config(function(a){const b='object'===typeof window;E(a,olympe.dc.U.bg,!1);E(a,olympe.dc.U.Zh,!1);E(a,olympe.dc.U.$l,olympe.dc.Ia.SERVER);E(a,olympe.dc.U.Xo,b);E(a,olympe.dc.U.tp,b);E(a,olympe.dc.U.op,!0);E(a,olympe.dc.U.Yg,olympe.V.Kc());D(a,olympe.dc.P.Da,[olympe.ia.P.Ea],c=>c.cd('dc'));Xa(a,olympe.dc.P.Hw,olympe.dc.transaction.P.Da);Xa(a,olympe.dc.P.Dh,olympe.dc.db.P.Xl);C(a,olympe.dc.P.hk,olympe.dc.ou,olympe.dc.P.Da,olympe.dc.db.P.Ea,olympe.net.P.Ea,olympe.dc.P.Vg,olympe.V.P.Eg,new olympe.W.pa(olympe.dc.U.tp));
1064
- C(a,olympe.dc.P.Vg,olympe.dc.gw,olympe.dc.P.Da,olympe.dc.sources.P.rr,olympe.dc.sources.P.Jr,olympe.dc.P.Dh,olympe.host.P.Ge,new olympe.W.pa(olympe.dc.U.Yg),new olympe.W.pa(olympe.dc.U.Xo));C(a,olympe.dc.P.bq,olympe.dc.Hu,olympe.dc.db.P.im,olympe.dc.db.P.Ea,olympe.W.P.Fg)},'olympe.dc');
1065
- olympe.W.run([olympe.dc.db.P.Ea,olympe.dc.transaction.P.Ea,olympe.dc.P.bq,olympe.dc.P.hk,new olympe.W.pa(olympe.dc.U.Yg)],(a,b,c,d,e)=>{olympe.dc.ly=()=>a;olympe.dc.Fj=()=>b;olympe.dc.Ps=()=>c;olympe.dc.Ns=()=>d;olympe.dc.Ia.SELF=e},'DC singleton getter initialization');olympe.dm={};olympe.dm.Vd=class extends olympe.dc.CloudObject{la(){return this.wb(olympe.dc.CloudObject.nameProp)}j(){return olympe.C.Ta.EMPTY}D(){return olympe.C.da.j}};olympe.dm.Vd.O=olympe.dc.na.j('ff021000000000000002',olympe.dm.Vd);olympe.dm.Vd.N=olympe.dm.Vd.O.ka('ff023000000000000035');olympe.dm.Vd.j=olympe.dm.Vd.O.sa('ff022000000000000005');olympe.dm.Vd.F=eg('ff011000000000000001','AUTHENTICATED_USERS');olympe.dm.Vd.H=eg('ff011000000000000002','PROJECT_RUNNER_USERS_ROLE');
1066
- olympe.dm.Vd.D=eg('014831d95f83635090ea','ADMIN_USERS_ROLE');olympe.dm.Vd.prototype.la.K=olympe.C.J.D;olympe.dm.Vd.prototype.j.K=olympe.C.J.D;olympe.dm.Vd.prototype.D.K=olympe.C.J.N;olympe.dm.Dl={NONE:0,WA:1,bu:2,XA:4,TA:8,VA:16,UA:31,tC:32,qC:64,uC:128,rC:256,Lv:512,sC:992,KB:1023};olympe.dm.User=class extends olympe.dc.CloudObject{vy(){return this.Gn()}la(){return this.Gn()}Gn(){return this.wb(olympe.dm.User.loginProp)}Wu(){return this.wb(olympe.dm.User.D)}Vu(){return olympe.C.Ta.EMPTY}Qy(){return this.wb(olympe.dm.User.saltProp)}Zy(){return this.wb(olympe.dm.User.verifierProp)}Oy(){return this.cb(olympe.dm.User.F,olympe.dm.Vd)}};olympe.dm.User.O=olympe.dc.na.j('ff021000000000000003',olympe.dm.User);olympe.dm.User.loginProp=olympe.dm.User.O.ka('ff023000000000000001');
1062
+ m.Vb.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);m.jb.K=new olympe.C.J(()=>String,[]);m.yy.K=new olympe.C.J(()=>String,[]);m.Ls.K=olympe.C.J.D;m.ac.K=new olympe.C.J(()=>String,[]);m.gy.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);m.Dn.K=new olympe.C.J(()=>olympe.dc.Aa,[]);m.Tf.K=new olympe.C.J(()=>olympe.C.Node,[]);m.wb.K=olympe.C.J.D;m.yd.K=olympe.C.J.F;m.nh.K=olympe.C.J.N;m.Dj.K=new olympe.C.J(()=>olympe.C.eb,[]);m.Us.K=new olympe.C.J(()=>olympe.C.Color,[]);
1063
+ m.Vs.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);m.cb.K=new olympe.C.J(()=>olympe.dc.Aa,[]);m.Sc.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);m.Is.K=new olympe.C.J(()=>Function,[]);m.jA.K=new olympe.C.J(()=>olympe.dc.Aa,[]);m.transform.K=new olympe.C.J(()=>olympe.dc.Aa,[]);m.Wc.K=olympe.C.J.D;m.toString.K=olympe.C.J.j;m.Fa.K=olympe.C.J.j;m.Kd.K=olympe.C.J.N;m.Hx.K=new olympe.C.J(()=>{},[]);olympe.dc.P={Dh:'dc.DBView',bq:'dc.InstanceManager',Da:'dc.Logger',Hw:'dc.TransactionLogger',hk:'dc.FileServiceManager',Vg:'dc.Router'};olympe.dc.U={Yg:'dc.tag',bg:'dc.debug',Zh:'dc.subscribeAll',$l:'dc.defaultSource',up:'dc.fileCache',Yo:'dc.dataConsumerOnly',pp:'dc.errorOnAbstractInstantiation'};
1064
+ olympe.W.config(function(a){const b='object'===typeof window;E(a,olympe.dc.U.bg,!1);E(a,olympe.dc.U.Zh,!1);E(a,olympe.dc.U.$l,olympe.dc.Ia.SERVER);E(a,olympe.dc.U.Yo,b);E(a,olympe.dc.U.up,b);E(a,olympe.dc.U.pp,!0);E(a,olympe.dc.U.Yg,olympe.V.Kc());D(a,olympe.dc.P.Da,[olympe.ia.P.Ea],c=>c.cd('dc'));Xa(a,olympe.dc.P.Hw,olympe.dc.transaction.P.Da);Xa(a,olympe.dc.P.Dh,olympe.dc.db.P.Xl);C(a,olympe.dc.P.hk,olympe.dc.ou,olympe.dc.P.Da,olympe.dc.db.P.Ea,olympe.net.P.Ea,olympe.dc.P.Vg,olympe.V.P.Eg,new olympe.W.pa(olympe.dc.U.up));
1065
+ C(a,olympe.dc.P.Vg,olympe.dc.gw,olympe.dc.P.Da,olympe.dc.sources.P.rr,olympe.dc.sources.P.Jr,olympe.dc.P.Dh,olympe.host.P.Ge,new olympe.W.pa(olympe.dc.U.Yg),new olympe.W.pa(olympe.dc.U.Yo));C(a,olympe.dc.P.bq,olympe.dc.Hu,olympe.dc.db.P.jm,olympe.dc.db.P.Ea,olympe.W.P.Fg)},'olympe.dc');
1066
+ olympe.W.run([olympe.dc.db.P.Ea,olympe.dc.transaction.P.Ea,olympe.dc.P.bq,olympe.dc.P.hk,new olympe.W.pa(olympe.dc.U.Yg)],(a,b,c,d,e)=>{olympe.dc.ly=()=>a;olympe.dc.Fj=()=>b;olympe.dc.Ps=()=>c;olympe.dc.Ns=()=>d;olympe.dc.Ia.SELF=e},'DC singleton getter initialization');olympe.dm={};olympe.dm.Vd=class extends olympe.dc.CloudObject{la(){return this.wb(olympe.dc.CloudObject.nameProp)}j(){return olympe.C.Ta.EMPTY}D(){return olympe.C.da.j}};olympe.dm.Vd.O=olympe.dc.oa.j('ff021000000000000002',olympe.dm.Vd);olympe.dm.Vd.N=olympe.dm.Vd.O.ka('ff023000000000000035');olympe.dm.Vd.j=olympe.dm.Vd.O.sa('ff022000000000000005');olympe.dm.Vd.F=eg('ff011000000000000001','AUTHENTICATED_USERS');olympe.dm.Vd.H=eg('ff011000000000000002','PROJECT_RUNNER_USERS_ROLE');
1067
+ olympe.dm.Vd.D=eg('014831d95f83635090ea','ADMIN_USERS_ROLE');olympe.dm.Vd.prototype.la.K=olympe.C.J.D;olympe.dm.Vd.prototype.j.K=olympe.C.J.D;olympe.dm.Vd.prototype.D.K=olympe.C.J.N;olympe.dm.Dl={NONE:0,WA:1,bu:2,XA:4,TA:8,VA:16,UA:31,tC:32,qC:64,uC:128,rC:256,Lv:512,sC:992,KB:1023};olympe.dm.User=class extends olympe.dc.CloudObject{vy(){return this.Hn()}la(){return this.Hn()}Hn(){return this.wb(olympe.dm.User.loginProp)}Wu(){return this.wb(olympe.dm.User.D)}Vu(){return olympe.C.Ta.EMPTY}Qy(){return this.wb(olympe.dm.User.saltProp)}Zy(){return this.wb(olympe.dm.User.verifierProp)}Oy(){return this.cb(olympe.dm.User.F,olympe.dm.Vd)}};olympe.dm.User.O=olympe.dc.oa.j('ff021000000000000003',olympe.dm.User);olympe.dm.User.loginProp=olympe.dm.User.O.ka('ff023000000000000001');
1067
1068
  w('olympe.dm.User.loginProp',olympe.dm.User.loginProp);olympe.dm.User.D=olympe.dm.User.O.ka('ff023000000000000002');olympe.dm.User.R=olympe.dm.User.O.ka('ff023000000000000003');olympe.dm.User.saltProp=olympe.dm.User.O.ka('ff023000000000000004');w('olympe.dm.User.saltProp',olympe.dm.User.saltProp);olympe.dm.User.verifierProp=olympe.dm.User.O.ka('ff023000000000000005');w('olympe.dm.User.verifierProp',olympe.dm.User.verifierProp);olympe.dm.User.N=olympe.dm.User.O.ka('ff023000000000000020');
1068
- olympe.dm.User.SAMLnameIdProp=olympe.dm.User.O.ka('ff023000000000000036');w('olympe.dm.User.SAMLnameIdProp',olympe.dm.User.SAMLnameIdProp);olympe.dm.User.F=R(olympe.dm.User.O,olympe.dm.Vd.j);olympe.dm.User.Y=olympe.dm.User.O.sa('ff022000000000000002');olympe.dm.User.j=eg('014831d95fd7d12b8568','ADMIN_USER');olympe.dm.User.H=eg('0163d9653067b6237f62','GUEST_USER');m=olympe.dm.User.prototype;m.vy.K=olympe.C.J.D;m.la.K=olympe.C.J.D;m.Gn.K=olympe.C.J.D;m.Wu.K=olympe.C.J.D;m.Vu.K=olympe.C.J.D;m.Qy.K=olympe.C.J.D;
1069
- m.Zy.K=olympe.C.J.D;m.Oy.K=new olympe.C.J(()=>olympe.dc.Aa,[]);olympe.dm.fg=class extends olympe.dc.CloudObject{Y(){return this.Cn()}Ha(){return this.wb(olympe.dm.fg.ta)}};olympe.dm.fg.O=olympe.dc.na.j('01621fb84e3300000000',olympe.dm.fg);olympe.dm.fg.ta=olympe.dm.fg.O.ka('01609de3f292e3c2c6ff');olympe.dm.fg.prototype.Y.K=new olympe.C.J(()=>olympe.C.vd,[]);olympe.dm.fg.prototype.Ha.K=olympe.C.J.D;olympe.dm.BrickMetadata=class extends olympe.dm.fg{$y(){return this.wb(olympe.dm.BrickMetadata.Gc)}Jc(){return this.wb(olympe.dm.BrickMetadata.ea)}getType(){return this.wb(olympe.dm.BrickMetadata.Yb)}kz(){return this.nh(olympe.dm.BrickMetadata.Eb)}ve(){return null}ay(){return this.cb(olympe.sc.ui.zx.Comment.ME.$b(),olympe.sc.ui.zx.Comment)}kl(){return this.wg(olympe.dm.BrickMetadata.Ha).Hc().kl()}};olympe.dm.BrickMetadata.O=jg(olympe.dc.na.j('01621fb84e3500000000',olympe.dm.BrickMetadata));
1069
+ olympe.dm.User.SAMLnameIdProp=olympe.dm.User.O.ka('ff023000000000000036');w('olympe.dm.User.SAMLnameIdProp',olympe.dm.User.SAMLnameIdProp);olympe.dm.User.F=R(olympe.dm.User.O,olympe.dm.Vd.j);olympe.dm.User.Y=olympe.dm.User.O.sa('ff022000000000000002');olympe.dm.User.j=eg('014831d95fd7d12b8568','ADMIN_USER');olympe.dm.User.H=eg('0163d9653067b6237f62','GUEST_USER');m=olympe.dm.User.prototype;m.vy.K=olympe.C.J.D;m.la.K=olympe.C.J.D;m.Hn.K=olympe.C.J.D;m.Wu.K=olympe.C.J.D;m.Vu.K=olympe.C.J.D;m.Qy.K=olympe.C.J.D;
1070
+ m.Zy.K=olympe.C.J.D;m.Oy.K=new olympe.C.J(()=>olympe.dc.Aa,[]);olympe.dm.fg=class extends olympe.dc.CloudObject{Y(){return this.Dn()}Ha(){return this.wb(olympe.dm.fg.ta)}};olympe.dm.fg.O=olympe.dc.oa.j('01621fb84e3300000000',olympe.dm.fg);olympe.dm.fg.ta=olympe.dm.fg.O.ka('01609de3f292e3c2c6ff');olympe.dm.fg.prototype.Y.K=new olympe.C.J(()=>olympe.C.vd,[]);olympe.dm.fg.prototype.Ha.K=olympe.C.J.D;olympe.dm.BrickMetadata=class extends olympe.dm.fg{$y(){return this.wb(olympe.dm.BrickMetadata.Gc)}Jc(){return this.wb(olympe.dm.BrickMetadata.ea)}getType(){return this.wb(olympe.dm.BrickMetadata.Yb)}kz(){return this.nh(olympe.dm.BrickMetadata.Eb)}ve(){return null}ay(){return this.cb(olympe.sc.ui.zx.Comment.ME.$b(),olympe.sc.ui.zx.Comment)}kl(){return this.wg(olympe.dm.BrickMetadata.Ha).Hc().kl()}};olympe.dm.BrickMetadata.O=jg(olympe.dc.oa.j('01621fb84e3500000000',olympe.dm.BrickMetadata));
1070
1071
  olympe.dm.BrickMetadata.Gc=olympe.dm.BrickMetadata.O.ka('01621fb84e320000f001');olympe.dm.BrickMetadata.ea=olympe.dm.BrickMetadata.O.ka('01703376c4a81c0e9d94');olympe.dm.BrickMetadata.Yb=olympe.dm.BrickMetadata.O.ka('01703376c4a81c0e9d00');olympe.dm.BrickMetadata.Eb=olympe.dm.BrickMetadata.O.ka('01703376c4a81c0eaea5');olympe.dm.BrickMetadata.Ha=olympe.dm.BrickMetadata.O.sa('0161ae97622bb21f335b');olympe.dm.BrickMetadata.le={CC:'private',EC:'public'};
1071
1072
  olympe.dm.BrickMetadata.Ub={dB:'experimental',UC:'stable',RA:'deprecated'};olympe.dm.BrickMetadata.Nd={DA:'business',pD:'technical'};m=olympe.dm.BrickMetadata.prototype;m.$y.K=olympe.C.J.D;m.Jc.K=olympe.C.J.D;m.getType.K=olympe.C.J.D;m.kz.K=olympe.C.J.N;m.ve.K=new olympe.C.J(()=>String,[]);m.ay.K=new olympe.C.J(()=>olympe.dc.Aa,[]);m.kl.K=olympe.C.J.R;function uj(a,b){b=b.startsWith('data.')?b.substring(5):b;let c,d;return null!=(d=null!=(c=olympe.W.getParameter(`${'data.'}${a}.${b}`))?c:olympe.W.getParameter(`${'data.'}${b}`))?d:olympe.W.getParameter(`${olympe.dc.sources.Lh.Sv}${b}`)}
1072
1073
  function Oj(a,b){const c=a.query().fb(olympe.dm.Bd.j.$b()).fb(olympe.dm.Bd.D);a=a.query().fb(olympe.dm.ib.D.$b()).vg(olympe.dm.ib.F,!0).fb(olympe.sc.Ac.j.$b());const d=e=>e.ne().vg(olympe.dc.CloudObject.extendRel,!0).fb(olympe.dc.CloudObject.Kj,!0).fb(olympe.dm.Relation.destinationModelRel).back(2).fb(olympe.dc.CloudObject.propertyRel,!0).fb(olympe.dm.Property.typeRel).observe(b);return rxjs.combineLatest([d(c),d(a)]).pipe(rxjs.operators.map(([e,...f])=>e.concat(...f)))}
1073
1074
  function ok(a,b){return a.observe(b,olympe.dm.DataSource.As).pipe(rxjs.operators.map(()=>a.Pf(olympe.dc.sources.U.We)),rxjs.operators.distinctUntilChanged())}
1074
- olympe.dm.DataSource=class extends olympe.dc.CloudObject{constructor(a,b,c){super(a,b);this.Kb=c;this.Cs=new Map([[olympe.dc.sources.U.Mm,olympe.dm.DataSource.Sz],[olympe.dc.sources.U.We,olympe.dm.DataSource.As],[olympe.dc.sources.U.Tm,olympe.dm.DataSource.Yz]])}T(){return this.tag===olympe.dm.DataSource.SERVER?olympe.dc.Ia.SERVER:this.tag}Pf(a){const b=a.startsWith('data.')?a.split('.')[1]:a,c=`${'data.'}${b}`;let d,e;return null!=(e=null!=(d=olympe.W.getParameter(`${'data.'}${this.name().toLowerCase().replace(/\W/g,
1075
- '_')}.${b}`))?d:uj(this.X(),a))?e:this.Cs.has(c)?this.get(this.Cs.get(c)):null}Jc(){const a=this;return u(function*(){const b=olympe.dm.DataSource.pc.eu,c=olympe.dm.DataSource.pc.zb,d=new olympe.dc.Request(olympe.dc.Request.j.pc,a.T());return a.Kb.request(d).then(e=>{let f;const g=null!=(f=null==e?void 0:e.s)?f:c;(e=null==e?void 0:e.r)&&olympe.ia.Ya('dc').warn(`Source ${a.name()} (${a.T()}) has encountered issues: ${e}`);return g}).catch(e=>e instanceof olympe.error.Vk||e instanceof olympe.error.Dm?
1075
+ olympe.dm.DataSource=class extends olympe.dc.CloudObject{constructor(a,b,c){super(a,b);this.Kb=c;this.Cs=new Map([[olympe.dc.sources.U.Nm,olympe.dm.DataSource.Sz],[olympe.dc.sources.U.We,olympe.dm.DataSource.As],[olympe.dc.sources.U.Um,olympe.dm.DataSource.Yz]])}T(){return this.tag===olympe.dm.DataSource.SERVER?olympe.dc.Ia.SERVER:this.tag}Pf(a){const b=a.startsWith('data.')?a.split('.')[1]:a,c=`${'data.'}${b}`;let d,e;return null!=(e=null!=(d=olympe.W.getParameter(`${'data.'}${this.name().toLowerCase().replace(/\W/g,
1076
+ '_')}.${b}`))?d:uj(this.X(),a))?e:this.Cs.has(c)?this.get(this.Cs.get(c)):null}Jc(){const a=this;return u(function*(){const b=olympe.dm.DataSource.pc.eu,c=olympe.dm.DataSource.pc.zb,d=new olympe.dc.Request(olympe.dc.Request.j.pc,a.T());return a.Kb.request(d).then(e=>{let f;const g=null!=(f=null==e?void 0:e.s)?f:c;(e=null==e?void 0:e.r)&&olympe.ia.Ya('dc').warn(`Source ${a.name()} (${a.T()}) has encountered issues: ${e}`);return g}).catch(e=>e instanceof olympe.error.Vk||e instanceof olympe.error.Em?
1076
1077
  b:c)})}init(){const a=this;return u(function*(){if(a.constructor===olympe.dm.DataSource)throw Error(`Data source ${a.name()} (${a.tag}) has no implementation (is the file missing ?)`);})}destroy(){return u(function*(){})}healthCheck(){return u(function*(){})}executeQuery(a){return u(function*(){return olympe.dc.query.Ed.xj(a)})}applyTransaction(){return u(function*(){})}uploadFileContent(){return u(function*(){throw Error('Should not try to upload files with SELF source');})}downloadFileContent(){return u(function*(){throw Error('Should not try to download files with SELF source');
1077
1078
  })}deleteFileContent(){return u(function*(){})}};olympe.dm.DataSource.prototype.deleteFileContent=olympe.dm.DataSource.prototype.deleteFileContent;olympe.dm.DataSource.prototype.downloadFileContent=olympe.dm.DataSource.prototype.downloadFileContent;olympe.dm.DataSource.prototype.uploadFileContent=olympe.dm.DataSource.prototype.uploadFileContent;olympe.dm.DataSource.prototype.applyTransaction=olympe.dm.DataSource.prototype.applyTransaction;olympe.dm.DataSource.prototype.executeQuery=olympe.dm.DataSource.prototype.executeQuery;
1078
- olympe.dm.DataSource.prototype.healthCheck=olympe.dm.DataSource.prototype.healthCheck;olympe.dm.DataSource.prototype.destroy=olympe.dm.DataSource.prototype.destroy;olympe.dm.DataSource.prototype.init=olympe.dm.DataSource.prototype.init;olympe.dm.DataSource.prototype.getConfig=olympe.dm.DataSource.prototype.Pf;olympe.dm.DataSource.prototype.getId=olympe.dm.DataSource.prototype.T;olympe.dm.DataSource.O=olympe.dc.na.j('ff021000000000000060',olympe.dm.DataSource,olympe.dc.P.Vg);
1079
+ olympe.dm.DataSource.prototype.healthCheck=olympe.dm.DataSource.prototype.healthCheck;olympe.dm.DataSource.prototype.destroy=olympe.dm.DataSource.prototype.destroy;olympe.dm.DataSource.prototype.init=olympe.dm.DataSource.prototype.init;olympe.dm.DataSource.prototype.getConfig=olympe.dm.DataSource.prototype.Pf;olympe.dm.DataSource.prototype.getId=olympe.dm.DataSource.prototype.T;olympe.dm.DataSource.O=olympe.dc.oa.j('ff021000000000000060',olympe.dm.DataSource,olympe.dc.P.Vg);
1079
1080
  olympe.dm.DataSource.hi=olympe.dm.DataSource.O.ka('ff023000000000000060');w('olympe.dm.DataSource.activatedProp',olympe.dm.DataSource.hi);olympe.dm.DataSource.PE=olympe.dm.DataSource.O.ka('ff023000000000000061');olympe.dm.DataSource.Sz=olympe.dm.DataSource.O.ka('ff023000000000000062');olympe.dm.DataSource.As=olympe.dm.DataSource.O.ka('ff023000000000000063');olympe.dm.DataSource.Gs=olympe.dm.DataSource.O.ka('ff023000000000000064');olympe.dm.DataSource.Yz=olympe.dm.DataSource.O.ka('ff023000000000000065');
1080
- olympe.dm.DataSource.Lj=olympe.dm.DataSource.O.sa('ff022000000000000060');olympe.dm.DataSource.SERVER=eg('00000000000000000060','Server source');olympe.dm.DataSource.We={OB:'hybrid',yo:'bus',Qp:'http'};olympe.dm.DataSource.pc={Wh:'ready',zb:'error',eu:'down',Ef:'offline'};olympe.dm.Bd=class extends olympe.dc.CloudObject{};olympe.dm.Bd.O=olympe.dc.na.j('ff021000000000000070',olympe.dm.Bd);olympe.dm.Bd.j=olympe.dm.Bd.O.sa('ff023000000000000071');olympe.dm.Bd.D=olympe.dm.Bd.O.sa('ff023000000000000072');olympe.dm.Bd.F=olympe.dm.Bd.O.sa('ff023000000000000073');olympe.dm.Lb=class extends olympe.dm.BrickMetadata{H(){return new olympe.dc.Aa(this.X(),[new olympe.dc.ba.Ke(olympe.dm.Lb.j.X(),olympe.dc.va.DESTINATION,olympe.dc.ba.Ar.Au,olympe.dc.ba.Ar.Bu),olympe.dm.Lb.H])}ve(){return olympe.sc.xe.Ne.nu}j(){return this.cb(olympe.dm.Lb.j,olympe.dm.Lb)}N(){return this.cb(olympe.dm.Lb.H)}};olympe.dm.Lb.O=olympe.dc.na.j('01612df1db9749227626',olympe.dm.Lb);olympe.dm.Lb.j=olympe.dm.Lb.O.sa('016a697ef00ce7554691');olympe.dm.Lb.ja=R(olympe.dm.Lb.O,olympe.dm.Lb.j);
1081
- olympe.dm.Lb.H=olympe.dm.Lb.O.sa('016a697ef00ce7554692');R(olympe.dc.CloudObject.O,olympe.dm.Lb.H);olympe.dm.Lb.prototype.H.K=new olympe.C.J(()=>olympe.dc.Aa,[]);olympe.dm.Lb.prototype.j.K=new olympe.C.J(()=>olympe.dc.Aa,[]);olympe.dm.Lb.prototype.N.K=new olympe.C.J(()=>olympe.dc.Aa,[]);olympe.dm.Oc=class extends olympe.dm.Lb{j(){return this.X()===olympe.dm.Oc.$?this.cb(olympe.dm.Oc.N,olympe.dm.Lb):this.cb(olympe.dm.Oc.R,olympe.dm.Lb)}};olympe.dm.Oc.O=olympe.dc.na.j('ff021000000000000020',olympe.dm.Oc);olympe.dm.Oc.R=olympe.dm.Oc.O.sa('017e9c34cf48bd6965c1');olympe.dm.Oc.N=olympe.dm.Oc.O.sa('017e9c2e013e06bfffd9');olympe.dm.Oc.ni=olympe.dm.Oc.O.sa('01811f12ad77673770d4');olympe.dm.Oc.$=eg('10000000000000000000','ROOT_OF_ROOTS');olympe.dm.Oc.wd=eg('10000000000000000001','OLYMPE_FOLDER');
1082
- olympe.dm.Oc.Pc=eg('10000000000000000002','INTERNAL_FOLDER');olympe.dm.Oc.prototype.j.K=new olympe.C.J(()=>olympe.dc.Aa,[]);olympe.dm.Module=class extends olympe.dc.CloudObject{uy(){return this.wb(olympe.dm.Module.N)}Fy(){return this.yd(olympe.dm.Module.R)}Xu(){return this.wb(olympe.dm.Module.D)}Jy(){return this.wb(olympe.dm.Module.Y)}by(){return this.wb(olympe.dm.Module.F)}Gy(){return this.cb(olympe.dm.Module.H,olympe.dm.Module)}Ry(){return this.cb(olympe.dm.Module.j,olympe.dm.Qd)}};olympe.dm.Module.O=olympe.dc.na.j('ff021000000000000040',olympe.dm.Module);olympe.dm.Module.N=olympe.dm.Module.O.ka('ff023000000000000042');
1081
+ olympe.dm.DataSource.Lj=olympe.dm.DataSource.O.sa('ff022000000000000060');olympe.dm.DataSource.SERVER=eg('00000000000000000060','Server source');olympe.dm.DataSource.We={OB:'hybrid',zo:'bus',Qp:'http'};olympe.dm.DataSource.pc={Wh:'ready',zb:'error',eu:'down',Ef:'offline'};olympe.dm.Bd=class extends olympe.dc.CloudObject{};olympe.dm.Bd.O=olympe.dc.oa.j('ff021000000000000070',olympe.dm.Bd);olympe.dm.Bd.j=olympe.dm.Bd.O.sa('ff023000000000000071');olympe.dm.Bd.D=olympe.dm.Bd.O.sa('ff023000000000000072');olympe.dm.Bd.F=olympe.dm.Bd.O.sa('ff023000000000000073');olympe.dm.Lb=class extends olympe.dm.BrickMetadata{H(){return new olympe.dc.Aa(this.X(),[new olympe.dc.ba.Ke(olympe.dm.Lb.j.X(),olympe.dc.va.DESTINATION,olympe.dc.ba.Ar.Au,olympe.dc.ba.Ar.Bu),olympe.dm.Lb.H])}ve(){return olympe.sc.xe.Ne.nu}j(){return this.cb(olympe.dm.Lb.j,olympe.dm.Lb)}N(){return this.cb(olympe.dm.Lb.H)}};olympe.dm.Lb.O=olympe.dc.oa.j('01612df1db9749227626',olympe.dm.Lb);olympe.dm.Lb.j=olympe.dm.Lb.O.sa('016a697ef00ce7554691');olympe.dm.Lb.ja=R(olympe.dm.Lb.O,olympe.dm.Lb.j);
1082
+ olympe.dm.Lb.H=olympe.dm.Lb.O.sa('016a697ef00ce7554692');R(olympe.dc.CloudObject.O,olympe.dm.Lb.H);olympe.dm.Lb.prototype.H.K=new olympe.C.J(()=>olympe.dc.Aa,[]);olympe.dm.Lb.prototype.j.K=new olympe.C.J(()=>olympe.dc.Aa,[]);olympe.dm.Lb.prototype.N.K=new olympe.C.J(()=>olympe.dc.Aa,[]);olympe.dm.Oc=class extends olympe.dm.Lb{j(){return this.X()===olympe.dm.Oc.$?this.cb(olympe.dm.Oc.N,olympe.dm.Lb):this.cb(olympe.dm.Oc.R,olympe.dm.Lb)}};olympe.dm.Oc.O=olympe.dc.oa.j('ff021000000000000020',olympe.dm.Oc);olympe.dm.Oc.R=olympe.dm.Oc.O.sa('017e9c34cf48bd6965c1');olympe.dm.Oc.N=olympe.dm.Oc.O.sa('017e9c2e013e06bfffd9');olympe.dm.Oc.ni=olympe.dm.Oc.O.sa('01811f12ad77673770d4');olympe.dm.Oc.$=eg('10000000000000000000','ROOT_OF_ROOTS');olympe.dm.Oc.wd=eg('10000000000000000001','OLYMPE_FOLDER');
1083
+ olympe.dm.Oc.Pc=eg('10000000000000000002','INTERNAL_FOLDER');olympe.dm.Oc.prototype.j.K=new olympe.C.J(()=>olympe.dc.Aa,[]);olympe.dm.Module=class extends olympe.dc.CloudObject{uy(){return this.wb(olympe.dm.Module.N)}Fy(){return this.yd(olympe.dm.Module.R)}Xu(){return this.wb(olympe.dm.Module.D)}Jy(){return this.wb(olympe.dm.Module.Y)}by(){return this.wb(olympe.dm.Module.F)}Gy(){return this.cb(olympe.dm.Module.H,olympe.dm.Module)}Ry(){return this.cb(olympe.dm.Module.j,olympe.dm.Qd)}};olympe.dm.Module.O=olympe.dc.oa.j('ff021000000000000040',olympe.dm.Module);olympe.dm.Module.N=olympe.dm.Module.O.ka('ff023000000000000042');
1083
1084
  olympe.dm.Module.R=olympe.dm.Module.O.ka('ff023000000000000043');olympe.dm.Module.D=olympe.dm.Module.O.ka('ff023000000000000044');olympe.dm.Module.Y=olympe.dm.Module.O.ka('ff023000000000000045');olympe.dm.Module.F=olympe.dm.Module.O.ka('ff023000000000000046');olympe.dm.Module.creationDateProp=olympe.dm.Module.O.ka('ff023000000000000049');olympe.dm.Module.j=olympe.dm.Module.O.sa('ff022000000000000013');olympe.dm.Module.H=olympe.dm.Module.O.sa('ff022000000000000014');
1084
1085
  olympe.dm.Module.$=eg('016a69b9bceabd815b77','OLYMPE_SERVER_MODULE');m=olympe.dm.Module.prototype;m.uy.K=olympe.C.J.D;m.Fy.K=olympe.C.J.F;m.Xu.K=olympe.C.J.D;m.Jy.K=olympe.C.J.D;m.by.K=olympe.C.J.D;m.Gy.K=new olympe.C.J(()=>olympe.dc.Aa,[]);m.Ry.K=new olympe.C.J(()=>olympe.dc.Aa,[]);olympe.dm.File=class extends olympe.dc.CloudObject{static D(a,b,c,d,e,f,g){e=e||'application/data';d=URL.createObjectURL(new Blob([d],{type:e}));g=null!=g?g:olympe.dc.fe().fromModel(a);a=b.create(a,f).zi(g);b=olympe.C.eb.now();X(X(X(X(X(X(a,olympe.dm.File.fileNameProp,null!=c?c:'file'),olympe.dm.File.urlProp,d),olympe.dm.File.creationDateProp,b),olympe.dm.File.modificationDateProp,b),olympe.dm.File.mimeTypeProp,e||'application/data'),olympe.dm.File.j,!1);return a.X()}constructor(a,b,c,d,e){super(a,
1085
- b);this.j=c;this.F=d;this.D=e}Rs(){return this.wb(olympe.dm.File.mimeTypeProp)}gl(a,b){void 0===a&&void 0===b||olympe.ia.Ya('File.getContentAsBinary').warn('"onSuccess" and "onFailure" callbacks are deprecated in favor of the returned promise');const c=a&&olympe.C.$a().tc(a),d=b&&olympe.C.$a().tc(e=>null==b?void 0:b(`${e}`));return this.j.H(this).then(e=>{e=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);null==c||c(e);return e}).catch(e=>{null==d||d(e.message);throw e;})}Bn(a,b){void 0===a&&
1086
+ b);this.j=c;this.F=d;this.D=e}Rs(){return this.wb(olympe.dm.File.mimeTypeProp)}gl(a,b){void 0===a&&void 0===b||olympe.ia.Ya('File.getContentAsBinary').warn('"onSuccess" and "onFailure" callbacks are deprecated in favor of the returned promise');const c=a&&olympe.C.$a().tc(a),d=b&&olympe.C.$a().tc(e=>null==b?void 0:b(`${e}`));return this.j.H(this).then(e=>{e=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);null==c||c(e);return e}).catch(e=>{null==d||d(e.message);throw e;})}Cn(a,b){void 0===a&&
1086
1087
  void 0===b||olympe.ia.Ya('File.getContentAsString').warn('"onSuccess" and "onFailure" callbacks are deprecated in favor of the returned promise');const c=a&&olympe.C.$a().tc(a),d=b&&olympe.C.$a().tc(e=>null==b?void 0:b(`${e}`));return this.gl().then(e=>{e=cb(e);null==c||c(e);return e}).catch(e=>{null==d||d(e.message);throw e;})}hl(a,b){void 0===a&&void 0===b||olympe.ia.Ya('File.getContentUrl').warn('"onSuccess" and "onFailure" callbacks are deprecated in favor of the returned promise');const c=a&&
1087
1088
  olympe.C.$a().tc(a),d=b&&olympe.C.$a().tc(g=>null==b?void 0:b(`${g}`));a=this.get(olympe.dm.File.j);const e=this.get(olympe.dm.File.urlProp),f=this.get(olympe.dm.File.mimeTypeProp);if(a||(null==e?0:e.startsWith('blob:'))||(null==e?0:e.startsWith('stream:')))return this.j.H(this).then(g=>{g=`data:${f};base64,${this.D.j(g)}`;null==c||c(g);return g}).catch(g=>{null==d||d(g.message);throw g;});if('string'===typeof e)return null==c||c(e),Promise.resolve(e);a=`No content nor URL associated to the file ${this.X()}`;
1088
1089
  null==d||d(a);return Promise.reject(Error(a))}rename(a,b){const c=b&&olympe.C.$a().tc(b);olympe.C.jt([a],d=>{const e=new olympe.dc.Za;e.update(this,olympe.dc.CloudObject.nameProp,d);e.update(this,olympe.dm.File.fileNameProp,d);e.ob(f=>{c&&c(f)})})}pt(a){this.get(olympe.dm.File.urlProp).startsWith('stream:')?this.j.Y(this.tag).then(()=>this.pt(a)).catch(b=>this.G.error(`Error while getting the content of a streamed file: ${b}`)):this.F.H(this.get(olympe.dm.File.mimeTypeProp))}lq(){return this.wb(olympe.dm.File.urlProp)}kq(){return this.wb(olympe.dm.File.fileNameProp)}iy(){return this.Dj(olympe.dm.File.creationDateProp)}Ey(){return this.Dj(olympe.dm.File.modificationDateProp)}jz(){return this.nh(olympe.dm.File.j)}};
1089
- olympe.dm.File.prototype.saveAs=olympe.dm.File.prototype.pt;olympe.dm.File.prototype.getContentUrl=olympe.dm.File.prototype.hl;olympe.dm.File.prototype.getContentAsString=olympe.dm.File.prototype.Bn;olympe.dm.File.prototype.getContentAsBinary=olympe.dm.File.prototype.gl;olympe.dm.File.O=olympe.dc.na.j('ff021000000000000030',olympe.dm.File,olympe.dc.P.hk,olympe.net.P.Ea,olympe.V.P.Eg);olympe.dm.File.nameProp=olympe.dm.File.O.ka('ff023000000000000050');w('olympe.dm.File.nameProp',olympe.dm.File.nameProp);
1090
+ olympe.dm.File.prototype.saveAs=olympe.dm.File.prototype.pt;olympe.dm.File.prototype.getContentUrl=olympe.dm.File.prototype.hl;olympe.dm.File.prototype.getContentAsString=olympe.dm.File.prototype.Cn;olympe.dm.File.prototype.getContentAsBinary=olympe.dm.File.prototype.gl;olympe.dm.File.O=olympe.dc.oa.j('ff021000000000000030',olympe.dm.File,olympe.dc.P.hk,olympe.net.P.Ea,olympe.V.P.Eg);olympe.dm.File.nameProp=olympe.dm.File.O.ka('ff023000000000000050');w('olympe.dm.File.nameProp',olympe.dm.File.nameProp);
1090
1091
  olympe.dm.File.fileNameProp=olympe.dm.File.O.ka('ff023000000000000050');w('olympe.dm.File.fileNameProp',olympe.dm.File.fileNameProp);olympe.dm.File.creationDateProp=olympe.dm.File.O.ka('ff023000000000000051');w('olympe.dm.File.creationDateProp',olympe.dm.File.creationDateProp);olympe.dm.File.modificationDateProp=olympe.dm.File.O.ka('ff023000000000000055');w('olympe.dm.File.modificationDateProp',olympe.dm.File.modificationDateProp);olympe.dm.File.mimeTypeProp=olympe.dm.File.O.ka('ff023000000000000052');
1091
- w('olympe.dm.File.mimeTypeProp',olympe.dm.File.mimeTypeProp);olympe.dm.File.urlProp=olympe.dm.File.O.ka('ff023000000000000053');w('olympe.dm.File.urlProp',olympe.dm.File.urlProp);olympe.dm.File.j=olympe.dm.File.O.ka('ff023000000000000054');olympe.dm.File.O.j=olympe.dm.File.D.bind(null,olympe.dm.File);olympe.dm.File.N='application/data';olympe.dm.File.za=[olympe.C.File];m=olympe.dm.File.prototype;m.Rs.K=olympe.C.J.D;m.gl.K=olympe.C.J.j;m.Bn.K=olympe.C.J.j;m.hl.K=olympe.C.J.j;m.rename.K=olympe.C.J.j;
1092
- m.lq.K=olympe.C.J.D;m.kq.K=olympe.C.J.D;m.iy.K=new olympe.C.J(()=>olympe.C.eb,[]);m.Ey.K=new olympe.C.J(()=>olympe.C.eb,[]);m.jz.K=olympe.C.J.N;olympe.dm.Qd=class extends olympe.dc.CloudObject{j(){return this.wb(olympe.dm.Qd.D)}F(){return this.yd(olympe.dm.Qd.F)}D(){return this.cb(olympe.dm.Qd.j,olympe.dm.Module)}};olympe.dm.Qd.O=olympe.dc.na.j('ff021000000000000041',olympe.dm.Qd);olympe.dm.Qd.D=olympe.dm.Qd.O.ka('ff023000000000000047');olympe.dm.Qd.F=olympe.dm.Qd.O.ka('ff023000000000000048');olympe.dm.Qd.j=olympe.dm.Module.j.$b();olympe.dm.Qd.prototype.j.K=olympe.C.J.D;olympe.dm.Qd.prototype.F.K=olympe.C.J.F;
1093
- olympe.dm.Qd.prototype.D.K=new olympe.C.J(()=>olympe.dc.Aa,[]);olympe.dm.ib=class extends olympe.dm.Oc{j(){return this.cb(olympe.dm.Lb.j,olympe.dm.Lb)}F(){return this.wb(olympe.dm.ib.Y)}R(){return this.wb(olympe.dm.ib.mb)}D(){return this.cb(olympe.dm.ib.F,olympe.dm.ib)}};olympe.dm.ib.O=olympe.dc.na.j('0163d9594700fcf61e54',olympe.dm.ib);olympe.dm.ib.Y=olympe.dm.ib.O.ka('017869c7d2833c9492c1');olympe.dm.ib.dt=olympe.dm.ib.O.ka('017869c7d2833c9492c2');olympe.dm.ib.Pe=olympe.dm.ib.O.ka('017869c7d2833c9492c3');olympe.dm.ib.mb=olympe.dm.ib.O.ka('017869c80bb9929c76d0');
1092
+ w('olympe.dm.File.mimeTypeProp',olympe.dm.File.mimeTypeProp);olympe.dm.File.urlProp=olympe.dm.File.O.ka('ff023000000000000053');w('olympe.dm.File.urlProp',olympe.dm.File.urlProp);olympe.dm.File.j=olympe.dm.File.O.ka('ff023000000000000054');olympe.dm.File.O.j=olympe.dm.File.D.bind(null,olympe.dm.File);olympe.dm.File.N='application/data';olympe.dm.File.za=[olympe.C.File];m=olympe.dm.File.prototype;m.Rs.K=olympe.C.J.D;m.gl.K=olympe.C.J.j;m.Cn.K=olympe.C.J.j;m.hl.K=olympe.C.J.j;m.rename.K=olympe.C.J.j;
1093
+ m.lq.K=olympe.C.J.D;m.kq.K=olympe.C.J.D;m.iy.K=new olympe.C.J(()=>olympe.C.eb,[]);m.Ey.K=new olympe.C.J(()=>olympe.C.eb,[]);m.jz.K=olympe.C.J.N;olympe.dm.Qd=class extends olympe.dc.CloudObject{j(){return this.wb(olympe.dm.Qd.D)}F(){return this.yd(olympe.dm.Qd.F)}D(){return this.cb(olympe.dm.Qd.j,olympe.dm.Module)}};olympe.dm.Qd.O=olympe.dc.oa.j('ff021000000000000041',olympe.dm.Qd);olympe.dm.Qd.D=olympe.dm.Qd.O.ka('ff023000000000000047');olympe.dm.Qd.F=olympe.dm.Qd.O.ka('ff023000000000000048');olympe.dm.Qd.j=olympe.dm.Module.j.$b();olympe.dm.Qd.prototype.j.K=olympe.C.J.D;olympe.dm.Qd.prototype.F.K=olympe.C.J.F;
1094
+ olympe.dm.Qd.prototype.D.K=new olympe.C.J(()=>olympe.dc.Aa,[]);olympe.dm.ib=class extends olympe.dm.Oc{j(){return this.cb(olympe.dm.Lb.j,olympe.dm.Lb)}F(){return this.wb(olympe.dm.ib.Y)}R(){return this.wb(olympe.dm.ib.mb)}D(){return this.cb(olympe.dm.ib.F,olympe.dm.ib)}};olympe.dm.ib.O=olympe.dc.oa.j('0163d9594700fcf61e54',olympe.dm.ib);olympe.dm.ib.Y=olympe.dm.ib.O.ka('017869c7d2833c9492c1');olympe.dm.ib.dt=olympe.dm.ib.O.ka('017869c7d2833c9492c2');olympe.dm.ib.Pe=olympe.dm.ib.O.ka('017869c7d2833c9492c3');olympe.dm.ib.mb=olympe.dm.ib.O.ka('017869c80bb9929c76d0');
1094
1095
  olympe.dm.ib.Wa=olympe.dm.ib.O.sa('ff02200000000000002a');olympe.dm.ib.F=olympe.dm.ib.O.sa('ff02200000000000002b');olympe.dm.ib.tg=R(olympe.dm.ib.O,olympe.dm.ib.F);olympe.dm.ib.D=olympe.dm.ib.O.sa('ff02200000000000002c');olympe.dm.ib.ug=olympe.dm.ib.O.sa('017e9c412e2b944bc48f');olympe.dm.ib.ff=olympe.dm.ib.O.sa('017e9c412e2b944bd590');olympe.dm.ib.Zs=olympe.dm.ib.O.sa('017e9c416872a89d3415');olympe.dm.ib.Xs=olympe.dm.ib.O.sa('017ebf8fe5c506662098');R(olympe.dc.CloudObject.O,olympe.dm.ib.Wa);
1095
- olympe.dm.ib.Gd=eg('100000000000000000dd','PRIMORDIAL');olympe.dm.ib.prototype.j.K=new olympe.C.J(()=>olympe.dc.Aa,[]);olympe.dm.ib.prototype.F.K=olympe.C.J.D;olympe.dm.ib.prototype.R.K=olympe.C.J.D;olympe.dm.ib.prototype.D.K=new olympe.C.J(()=>olympe.dc.Aa,[]);olympe.dm.Property=class extends olympe.dc.CloudObject{j(){return this.Sc(olympe.dm.Property.definingModelRel,olympe.dc.CloudObject)}getType(){return this.Sc(olympe.dm.Property.typeRel,olympe.dc.CloudObject)}D(){return this.wg(olympe.dm.Property.typeRel).Hc()}Wc(){return this.j().la().Bs(this.la())}};olympe.dm.Property.O=olympe.dc.na.j('ff021000000000000005',olympe.dm.Property);olympe.dm.Property.definingModelRel=R(olympe.dm.Property.O,olympe.dc.CloudObject.propertyRel);
1096
- w('olympe.dm.Property.definingModelRel',olympe.dm.Property.definingModelRel);olympe.dm.Property.typeRel=R(olympe.dm.Property.O,olympe.dc.CloudObject.typeRel);w('olympe.dm.Property.typeRel',olympe.dm.Property.typeRel);olympe.dm.Property.prototype.j.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);olympe.dm.Property.prototype.getType.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);olympe.dm.Property.prototype.D.K=olympe.C.J.j;olympe.dm.Relation=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}Ay(){return olympe.C.Ta.EMPTY}Yx(){return this.yd(olympe.dm.Relation.D)}Ky(){return this.yd(olympe.dm.Relation.F)}Ks(){return this.cb(olympe.dm.Relation.destinationModelRel,olympe.dc.CloudObject).Ic()}Ts(){return this.cb(olympe.dm.Relation.originModelRel,olympe.dc.CloudObject).Ic()}Wc(){return this.Ts().la().concat(['-',this.la(),'->',this.Ks().la()])}};olympe.dm.Relation.O=olympe.dc.na.j('ff021000000000000006',olympe.dm.Relation);
1097
- olympe.dm.Relation.F=olympe.dm.Relation.O.ka('ff023000000000000030');olympe.dm.Relation.D=olympe.dm.Relation.O.ka('ff023000000000000034');olympe.dm.Relation.ea=olympe.dm.Relation.O.ka(olympe.dc.Mb.fp);olympe.dm.Relation.Y=olympe.dm.Relation.O.ka(olympe.dc.Mb.Dc);olympe.dm.Relation.ja=olympe.dm.Relation.O.ka(olympe.dc.Mb.kg);olympe.dm.Relation.ta=olympe.dm.Relation.O.ka(olympe.dc.Mb.tw);olympe.dm.Relation.$=olympe.dm.Relation.O.ka(olympe.dc.Mb.fu);olympe.dm.Relation.Ha=olympe.dm.Relation.O.ka(olympe.dc.Mb.Qw);
1096
+ olympe.dm.ib.Gd=eg('100000000000000000dd','PRIMORDIAL');olympe.dm.ib.prototype.j.K=new olympe.C.J(()=>olympe.dc.Aa,[]);olympe.dm.ib.prototype.F.K=olympe.C.J.D;olympe.dm.ib.prototype.R.K=olympe.C.J.D;olympe.dm.ib.prototype.D.K=new olympe.C.J(()=>olympe.dc.Aa,[]);olympe.dm.Property=class extends olympe.dc.CloudObject{j(){return this.Sc(olympe.dm.Property.definingModelRel,olympe.dc.CloudObject)}getType(){return this.Sc(olympe.dm.Property.typeRel,olympe.dc.CloudObject)}D(){return this.wg(olympe.dm.Property.typeRel).Hc()}Wc(){return this.j().la().Bs(this.la())}};olympe.dm.Property.O=olympe.dc.oa.j('ff021000000000000005',olympe.dm.Property);olympe.dm.Property.definingModelRel=R(olympe.dm.Property.O,olympe.dc.CloudObject.propertyRel);
1097
+ w('olympe.dm.Property.definingModelRel',olympe.dm.Property.definingModelRel);olympe.dm.Property.typeRel=R(olympe.dm.Property.O,olympe.dc.CloudObject.typeRel);w('olympe.dm.Property.typeRel',olympe.dm.Property.typeRel);olympe.dm.Property.prototype.j.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);olympe.dm.Property.prototype.getType.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);olympe.dm.Property.prototype.D.K=olympe.C.J.j;olympe.dm.Relation=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}Ay(){return olympe.C.Ta.EMPTY}Yx(){return this.yd(olympe.dm.Relation.D)}Ky(){return this.yd(olympe.dm.Relation.F)}Ks(){return this.cb(olympe.dm.Relation.destinationModelRel,olympe.dc.CloudObject).Ic()}Ts(){return this.cb(olympe.dm.Relation.originModelRel,olympe.dc.CloudObject).Ic()}Wc(){return this.Ts().la().concat(['-',this.la(),'->',this.Ks().la()])}};olympe.dm.Relation.O=olympe.dc.oa.j('ff021000000000000006',olympe.dm.Relation);
1098
+ olympe.dm.Relation.F=olympe.dm.Relation.O.ka('ff023000000000000030');olympe.dm.Relation.D=olympe.dm.Relation.O.ka('ff023000000000000034');olympe.dm.Relation.ea=olympe.dm.Relation.O.ka(olympe.dc.Mb.gp);olympe.dm.Relation.Y=olympe.dm.Relation.O.ka(olympe.dc.Mb.Dc);olympe.dm.Relation.ja=olympe.dm.Relation.O.ka(olympe.dc.Mb.kg);olympe.dm.Relation.ta=olympe.dm.Relation.O.ka(olympe.dc.Mb.tw);olympe.dm.Relation.$=olympe.dm.Relation.O.ka(olympe.dc.Mb.fu);olympe.dm.Relation.Ha=olympe.dm.Relation.O.ka(olympe.dc.Mb.Qw);
1098
1099
  olympe.dm.Relation.R=olympe.dm.Relation.O.ka('ff023000000000000031');olympe.dm.Relation.originModelRel=R(olympe.dm.Relation.O,olympe.dc.CloudObject.Kj);w('olympe.dm.Relation.originModelRel',olympe.dm.Relation.originModelRel);olympe.dm.Relation.destinationModelRel=R(olympe.dm.Relation.O,olympe.dc.CloudObject.Fs);w('olympe.dm.Relation.destinationModelRel',olympe.dm.Relation.destinationModelRel);olympe.dm.Relation.j={Wp:0,Kt:5,cw:1,OC:4,bs:2,vr:8,cB:10,LC:6,MC:9,Ye:6,NC:9};
1099
1100
  olympe.dm.Relation.H={pC:3,Jv:4,aC:5,$B:6};olympe.dm.Relation.N=olympe.dm.Dl.Lv+olympe.dm.Dl.bu;m=olympe.dm.Relation.prototype;m.Ay.K=olympe.C.J.D;m.Yx.K=olympe.C.J.F;m.Ky.K=olympe.C.J.F;m.Ks.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);m.Ts.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);function jn(a){a=olympe.dc.fa(a);if(olympe.dc.ha().Uf(a,olympe.dm.String))return olympe.dm.String.valueProp;switch(a){case olympe.dm.Number.O.X():return olympe.dm.Number.valueProp;case olympe.dm.Boolean.O.X():return olympe.dm.Boolean.valueProp;case olympe.dm.DateTime.O.X():return olympe.dm.DateTime.valueProp;case olympe.dm.Color.O.X():return olympe.dm.Color.valueProp;default:throw Error('Unknown primitive model: '+a);}}olympe.dm.Ie=class extends olympe.dc.CloudObject{getValue(){}};
1100
- olympe.dm.Ie.O=olympe.dc.na.j('ff021000000000000019',olympe.dm.Ie);olympe.dm.String=class extends olympe.dm.Ie{getValue(){return this.wb(olympe.dm.String.valueProp)}Cc(){return this.get(olympe.dm.String.valueProp)}toString(){let a;return null!=(a=this.get(olympe.dm.String.valueProp))?a:''}};olympe.dm.String.O=olympe.dc.na.j('ff021000000000000011',olympe.dm.String);olympe.dm.String.valueProp=olympe.dm.String.O.ka('ff023000000000000026');w('olympe.dm.String.valueProp',olympe.dm.String.valueProp);olympe.dm.String.prototype.getValue.K=olympe.C.J.D;
1101
- olympe.dm.String.prototype.toString.K=olympe.C.J.j;olympe.dm.Boolean=class extends olympe.dm.Ie{getValue(){return this.nh(olympe.dm.Boolean.valueProp)}Cc(){return this.get(olympe.dm.Boolean.valueProp)}};olympe.dm.Boolean.O=olympe.dc.na.j('ff021000000000000012',olympe.dm.Boolean);olympe.dm.Boolean.valueProp=olympe.dm.Boolean.O.ka('ff023000000000000027');w('olympe.dm.Boolean.valueProp',olympe.dm.Boolean.valueProp);olympe.dm.Boolean.prototype.getValue.K=olympe.C.J.N;olympe.dm.Color=class extends olympe.dm.Ie{getValue(){return this.Us()}Cc(){return this.get(olympe.dm.Color.valueProp)}};olympe.dm.Color.O=olympe.dc.na.j('ff021000000000000017',olympe.dm.Color);olympe.dm.Color.valueProp=olympe.dm.Color.O.ka('ff023000000000000032');w('olympe.dm.Color.valueProp',olympe.dm.Color.valueProp);olympe.dm.Color.prototype.getValue.K=new olympe.C.J(()=>olympe.C.Color,[]);olympe.dm.DateTime=class extends olympe.dm.Ie{getValue(){return this.Dj(olympe.dm.DateTime.valueProp)}Cc(){return this.get(olympe.dm.DateTime.valueProp)}};olympe.dm.DateTime.O=olympe.dc.na.j('ff021000000000000014',olympe.dm.DateTime);olympe.dm.DateTime.valueProp=olympe.dm.DateTime.O.ka('ff023000000000000029');w('olympe.dm.DateTime.valueProp',olympe.dm.DateTime.valueProp);olympe.dm.DateTime.prototype.getValue.K=new olympe.C.J(()=>olympe.C.eb,[]);olympe.dm.Enum=class extends olympe.dm.String{la(){return olympe.C.ua([super.la(),super.getValue()],(a,b)=>''!==a.valueOf()?a:b,olympe.C.Ta)}Id(){return this.yd(olympe.dm.Enum.rankProp)}};olympe.dm.Enum.O=olympe.dc.na.j('016cdd861b32d56c81f7',olympe.dm.Enum);olympe.dm.Enum.rankProp=olympe.dm.Enum.O.ka('017a7690c915975ea995');olympe.dm.Enum.prototype.Id.K=olympe.C.J.F;olympe.dm.gg=class extends olympe.dm.BrickMetadata{Yy(){return this.fb(olympe.dc.CloudObject.instancesRel).xl(olympe.dm.Enum.rankProp,olympe.dc.query.Bk.ASC).Hc()}static create(a,b){b=a.create(olympe.dm.gg,(new Map).set(olympe.dc.CloudObject.nameProp,b));a.Pa(olympe.dc.CloudObject.extendRel,b,olympe.dm.Enum);return b}};olympe.dm.gg.create=olympe.dm.gg.create;olympe.dm.gg.prototype.getValues=olympe.dm.gg.prototype.Yy;olympe.dm.gg.O=olympe.dc.na.j('017a768f966fc08ebb98',olympe.dm.gg);olympe.dm.Number=class extends olympe.dm.Ie{getValue(){return this.yd(olympe.dm.Number.valueProp)}Cc(){return this.get(olympe.dm.Number.valueProp)}};olympe.dm.Number.O=olympe.dc.na.j('ff021000000000000013',olympe.dm.Number);olympe.dm.Number.valueProp=olympe.dm.Number.O.ka('ff023000000000000028');w('olympe.dm.Number.valueProp',olympe.dm.Number.valueProp);olympe.dm.Number.prototype.getValue.K=olympe.C.J.F;olympe.sc={};olympe.sc.P={Da:'sc.Logger',Kk:'sc.RootContext',Le:'sc.Serializer'};olympe.sc.U={Ve:'sc.app',bg:'sc.debug',jo:'sc.autostartProfiler',bp:'sc.debugger',cu:'sc.disableTheme',PRODUCTION:'sc.production',Kv:'sc.onstartTimeout',qr:'sc.remoteActionTimeout'};
1102
- olympe.W.config(a=>{E(a,olympe.sc.U.Ve,'');E(a,olympe.sc.U.bg,!1);E(a,olympe.sc.U.cu,!0);E(a,olympe.sc.U.PRODUCTION,!1);E(a,olympe.sc.U.Kv,2E4);E(a,olympe.sc.U.qr,3E4);E(a,olympe.sc.U.jo,!1);D(a,olympe.sc.P.Da,[olympe.ia.P.Ea],b=>b.cd('sc'));C(a,olympe.sc.P.Le,olympe.sc.ec,olympe.dc.db.P.Ea);Xa(a,olympe.dc.sources.P.Le,olympe.sc.P.Le);D(a,olympe.sc.P.Kk,[new olympe.W.pa(olympe.sc.U.PRODUCTION)],b=>{const c=new olympe.sc.Gg('root','root',null);olympe.sc.Tn=c;c.set(olympe.sc.ya.j.PRODUCTION,b);return new olympe.sc.ya(c)})},
1103
- 'olympe.sc');olympe.W.run([olympe.sc.P.Kk,new olympe.W.pa(olympe.L.U.Ol)],(a,b)=>{olympe.ee().ctx=a;olympe.ee().oVersion=()=>b});olympe.sc.Nn=()=>null!==olympe.dc.ha().Jb(void 0,olympe.sc.Runnable.j.$b());olympe.sc.NE=(a,b,c,d)=>{c=X(X(a.create(olympe.sc.hd),olympe.sc.hd.j,c||null),olympe.sc.hd.F,d||null);a.Pa(olympe.sc.hd.D,c,b);a.Pa(olympe.dc.CloudObject.containsRel,b,c);return c.X()};olympe.sc.tj=(a,b)=>{a=olympe.dc.nb.Zx(b)(a);return a instanceof olympe.sc.Ud?a.j():a};
1101
+ olympe.dm.Ie.O=olympe.dc.oa.j('ff021000000000000019',olympe.dm.Ie);olympe.dm.String=class extends olympe.dm.Ie{getValue(){return this.wb(olympe.dm.String.valueProp)}Cc(){return this.get(olympe.dm.String.valueProp)}toString(){let a;return null!=(a=this.get(olympe.dm.String.valueProp))?a:''}};olympe.dm.String.O=olympe.dc.oa.j('ff021000000000000011',olympe.dm.String);olympe.dm.String.valueProp=olympe.dm.String.O.ka('ff023000000000000026');w('olympe.dm.String.valueProp',olympe.dm.String.valueProp);olympe.dm.String.prototype.getValue.K=olympe.C.J.D;
1102
+ olympe.dm.String.prototype.toString.K=olympe.C.J.j;olympe.dm.Boolean=class extends olympe.dm.Ie{getValue(){return this.nh(olympe.dm.Boolean.valueProp)}Cc(){return this.get(olympe.dm.Boolean.valueProp)}};olympe.dm.Boolean.O=olympe.dc.oa.j('ff021000000000000012',olympe.dm.Boolean);olympe.dm.Boolean.valueProp=olympe.dm.Boolean.O.ka('ff023000000000000027');w('olympe.dm.Boolean.valueProp',olympe.dm.Boolean.valueProp);olympe.dm.Boolean.prototype.getValue.K=olympe.C.J.N;olympe.dm.Color=class extends olympe.dm.Ie{getValue(){return this.Us()}Cc(){return this.get(olympe.dm.Color.valueProp)}};olympe.dm.Color.O=olympe.dc.oa.j('ff021000000000000017',olympe.dm.Color);olympe.dm.Color.valueProp=olympe.dm.Color.O.ka('ff023000000000000032');w('olympe.dm.Color.valueProp',olympe.dm.Color.valueProp);olympe.dm.Color.prototype.getValue.K=new olympe.C.J(()=>olympe.C.Color,[]);olympe.dm.DateTime=class extends olympe.dm.Ie{getValue(){return this.Dj(olympe.dm.DateTime.valueProp)}Cc(){return this.get(olympe.dm.DateTime.valueProp)}};olympe.dm.DateTime.O=olympe.dc.oa.j('ff021000000000000014',olympe.dm.DateTime);olympe.dm.DateTime.valueProp=olympe.dm.DateTime.O.ka('ff023000000000000029');w('olympe.dm.DateTime.valueProp',olympe.dm.DateTime.valueProp);olympe.dm.DateTime.prototype.getValue.K=new olympe.C.J(()=>olympe.C.eb,[]);olympe.dm.Enum=class extends olympe.dm.String{la(){return olympe.C.ua([super.la(),super.getValue()],(a,b)=>''!==a.valueOf()?a:b,olympe.C.Ta)}Id(){return this.yd(olympe.dm.Enum.rankProp)}};olympe.dm.Enum.O=olympe.dc.oa.j('016cdd861b32d56c81f7',olympe.dm.Enum);olympe.dm.Enum.rankProp=olympe.dm.Enum.O.ka('017a7690c915975ea995');olympe.dm.Enum.prototype.Id.K=olympe.C.J.F;olympe.dm.gg=class extends olympe.dm.BrickMetadata{Yy(){return this.fb(olympe.dc.CloudObject.instancesRel).xl(olympe.dm.Enum.rankProp,olympe.dc.query.Bk.ASC).Hc()}static create(a,b){b=a.create(olympe.dm.gg,(new Map).set(olympe.dc.CloudObject.nameProp,b));a.Pa(olympe.dc.CloudObject.extendRel,b,olympe.dm.Enum);return b}};olympe.dm.gg.create=olympe.dm.gg.create;olympe.dm.gg.prototype.getValues=olympe.dm.gg.prototype.Yy;olympe.dm.gg.O=olympe.dc.oa.j('017a768f966fc08ebb98',olympe.dm.gg);olympe.dm.Number=class extends olympe.dm.Ie{getValue(){return this.yd(olympe.dm.Number.valueProp)}Cc(){return this.get(olympe.dm.Number.valueProp)}};olympe.dm.Number.O=olympe.dc.oa.j('ff021000000000000013',olympe.dm.Number);olympe.dm.Number.valueProp=olympe.dm.Number.O.ka('ff023000000000000028');w('olympe.dm.Number.valueProp',olympe.dm.Number.valueProp);olympe.dm.Number.prototype.getValue.K=olympe.C.J.F;olympe.sc={};olympe.sc.P={Da:'sc.Logger',Kk:'sc.RootContext',Le:'sc.Serializer'};olympe.sc.U={Ve:'sc.app',bg:'sc.debug',ko:'sc.autostartProfiler',cp:'sc.debugger',cu:'sc.disableTheme',PRODUCTION:'sc.production',Kv:'sc.onstartTimeout',qr:'sc.remoteActionTimeout'};
1103
+ olympe.W.config(a=>{E(a,olympe.sc.U.Ve,'');E(a,olympe.sc.U.bg,!1);E(a,olympe.sc.U.cu,!0);E(a,olympe.sc.U.PRODUCTION,!1);E(a,olympe.sc.U.Kv,2E4);E(a,olympe.sc.U.qr,3E4);E(a,olympe.sc.U.ko,!1);D(a,olympe.sc.P.Da,[olympe.ia.P.Ea],b=>b.cd('sc'));C(a,olympe.sc.P.Le,olympe.sc.ec,olympe.dc.db.P.Ea);Xa(a,olympe.dc.sources.P.Le,olympe.sc.P.Le);D(a,olympe.sc.P.Kk,[new olympe.W.pa(olympe.sc.U.PRODUCTION)],b=>{const c=new olympe.sc.Gg('root','root',null);olympe.sc.Un=c;c.set(olympe.sc.ya.j.PRODUCTION,b);return new olympe.sc.ya(c)})},
1104
+ 'olympe.sc');olympe.W.run([olympe.sc.P.Kk,new olympe.W.pa(olympe.L.U.Ol)],(a,b)=>{olympe.ee().ctx=a;olympe.ee().oVersion=()=>b});olympe.sc.On=()=>null!==olympe.dc.ha().Jb(void 0,olympe.sc.Runnable.j.$b());olympe.sc.NE=(a,b,c,d)=>{c=X(X(a.create(olympe.sc.hd),olympe.sc.hd.j,c||null),olympe.sc.hd.F,d||null);a.Pa(olympe.sc.hd.D,c,b);a.Pa(olympe.dc.CloudObject.containsRel,b,c);return c.X()};olympe.sc.tj=(a,b)=>{a=olympe.dc.nb.Zx(b)(a);return a instanceof olympe.sc.Ud?a.j():a};
1104
1105
  olympe.sc.eF=function(a){const b=olympe.dc.CloudObject.containsRel.$b();var c=olympe.dc.fa(a);if(void 0===c)return[];a=olympe.dc.ha();const d=[];let e=[];const f=new Set;for(;!a.Ob(c,olympe.dm.Lb);){f.add(c);const g=a.Jb(c,b);if(null===g)return olympe.ia.Ya('sc').warn(`Object ${c} has no container`),[];a.Ob(c,olympe.sc.logic.qb)||g===a.Jb(c,olympe.sc.Runnable.j.$b())||d.push(c);c=g;if(f.has(c))throw Error(`Instance ${c} (${a.name(c)}) is part of a cyclic contain pattern`);}e.push(c);e=e.concat(a.oh(e[0],
1105
1106
  olympe.dm.Lb.ja));e=e.concat(a.oh(e[e.length-1],olympe.dm.Oc.R.$b()));e=e.concat(a.oh(e[e.length-1],olympe.dm.Oc.N.$b()));return[...d,...e].reverse()};olympe.sc.fF=a=>{a=a&&a.valueOf()||'';return a.startsWith('image/')?olympe.sc.Lg:a.startsWith('video/')?olympe.sc.ci:a.startsWith('font/')||a.startsWith('application/font-woff')?olympe.sc.Mc:olympe.dm.File};
1106
1107
  olympe.sc.dF=a=>a instanceof olympe.sc.Lg?'image/*':a instanceof olympe.sc.ci?'video/*':a instanceof olympe.sc.Mc?'font/*,application/font-woff':null;olympe.sc.ab={};function kn(a,b){var c=olympe.sc.ya,d=a.state;a=a.Bb();b=olympe.dc.fa(b);let e,f=null==(e=d.j)?void 0:e.get(b);if(!f){f=d.ki(a,void 0,b);for(d=f.getParent();d&&d.ja&&!d.id.startsWith('_');)d=d.getParent();let g;null==(g=d)||ln(g,b,f)}return new c(f)}function mn(a,b){let c,d;return(a=null!=(d=null==(c=a.state.j)?void 0:c.get(olympe.dc.fa(b)))?d:null)?new olympe.sc.ya(a):null}function nn(a){let b;return null!=(b=a.Qa(olympe.sc.ya.j.PRODUCTION))?b:!1}
1107
- olympe.sc.ya=class{constructor(a=olympe.sc.Tn){this.state=a;this.G=olympe.ia.Ya('sc');this.j=null}T(){return this.state.T()}getParent(){if(null===this.j){const a=this.state.getParent();this.j=null===a?null:new olympe.sc.ya(a)}return this.j}$x(a){const b=olympe.dc.ha();let c=this.getParent();if(!c)return this;const d=e=>{e=e.lf();if('string'!==typeof e)return!1;const f=b.model(e);return f&&b.Ra(f,olympe.sc.Xa.$)||a.modelTag&&!b.Ob(e,a.modelTag)?!1:!0};for(;c&&!d(c);){const e=c.getParent();if(!e)break;
1108
- c=e}return c}lf(){return this.state.lf()}Bb(){return this.state.Bb()}set(a,b){this.state.set(a,b);return this}co(a){return this.set(a,Date.now())}remove(a){this.set(a,null)}tb(a,b,c=!1){const d=olympe.dc.fa(a),e=olympe.C.cc(null!=b?b:Object,`Get context value flow source of ${d}`);e.getContext().onDestroy(this.on(a,f=>{null===f?e.clear():e.update(f)},c?this.state.T():void 0));return e.tb()}get(a,b=!1){a=this.Qa(a,b);return void 0!==a?a:null}has(a,b=!1){return this.state.has(a,b)}observe(a,b=!0,c=
1108
+ olympe.sc.ya=class{constructor(a=olympe.sc.Un){this.state=a;this.G=olympe.ia.Ya('sc');this.j=null}T(){return this.state.T()}getParent(){if(null===this.j){const a=this.state.getParent();this.j=null===a?null:new olympe.sc.ya(a)}return this.j}$x(a){const b=olympe.dc.ha();let c=this.getParent();if(!c)return this;const d=e=>{e=e.lf();if('string'!==typeof e)return!1;const f=b.model(e);return f&&b.Ra(f,olympe.sc.Xa.$)||a.modelTag&&!b.Ob(e,a.modelTag)?!1:!0};for(;c&&!d(c);){const e=c.getParent();if(!e)break;
1109
+ c=e}return c}lf(){return this.state.lf()}Bb(){return this.state.Bb()}set(a,b){this.state.set(a,b);return this}eo(a){return this.set(a,Date.now())}remove(a){this.set(a,null)}tb(a,b,c=!1){const d=olympe.dc.fa(a),e=olympe.C.cc(null!=b?b:Object,`Get context value flow source of ${d}`);e.getContext().onDestroy(this.on(a,f=>{null===f?e.clear():e.update(f)},c?this.state.T():void 0));return e.tb()}get(a,b=!1){a=this.Qa(a,b);return void 0!==a?a:null}has(a,b=!1){return this.state.has(a,b)}observe(a,b=!0,c=
1109
1110
  !1){return new rxjs.Observable(d=>{const e=this.get(a);b||null!==e||d.next(e);const f=this.on(a,d.next.bind(d),c?void 0:this.state.T(),!1);this.onDestroy(()=>{f();d.complete()});return f})}repeat(a,b){const c=on(this.state,a);a=b.subscribe(d=>{null!==d?this.set(c,d):this.remove(c)});this.wh(a.unsubscribe.bind(a));return this}$z(a){a=a instanceof olympe.sc.Runnable?a:this.get(a);if(!a)return null;const b=this.ki(`Runner ${a.name()}`);a.run(b);return b}zt(a,b=!0,c=!1){return new Promise((d,e)=>{this.observe(a,
1110
1111
  b,c).pipe(rxjs.operators.first()).subscribe(rxjs.Subscriber.create(d,f=>{let g=`An error occurred while calling \`waitFor(${olympe.dc.fa(a)})\``+`on the context ${this.T()}:\nStack: ${this.se()}\n${f}`;f instanceof rxjs.EmptyError&&(g=`The context ${this.T()} has been destroyed while a Promise `+`created from a call to \`waitFor(${olympe.dc.fa(a)})\` `+`has never received any value:\nStack: ${this.se()}`);e(Error(g))}))})}throw(a){var b=a instanceof Error?a.message:String(a);if(a instanceof Error){var c;
1111
1112
  const d=(null==(c=a.se)?void 0:c.call(a))||this.se();let e,f;c=null!=(f=null==(e=a.Aj)?void 0:e.call(a))?f:0;b=pn(b,c,d);b.stack=a.stack}else b=pn(b,0,this.se());qn(this.state,b);return this}aA(a){this.set(olympe.sc.ya.j.Fg,a);return this}Qa(a,b=!0){return this.state.Qa(a,b)}on(a,b,c,d=!0){return this.state.on(a,b,c,d)}ki(a){return new olympe.sc.ya(this.state.ki(this.Bb(),a))}ul(a,b){return this.state.ul(a,c=>{b(new olympe.sc.ya(c))})}Iy(a){a=rn(this.state,a);return a===this.state?this:a&&new olympe.sc.ya(a)}destroy(){this.state.destroy()}wh(a,
1112
1113
  b){return this.state.wh(a,b)}sl(a){this.state.sl(a)}onDestroy(a){return this.gb()?(a(),'noId'):this.Bb().onDestroy(a)}Xf(a){this.gb()||this.Bb().Xf(a)}clear(){this.state.clear()}gb(){return this.Bb().gb()||this.Bb().jd()}Ra(a){a=sn(this.state,a);return null!==a?new olympe.sc.ui.KA(a,this):null}ty(a){a=sn(this.state,a);return null!==a?new olympe.sc.ui.JA(a,this):null}Ez(...a){return rxjs.combineLatest(a.map(b=>{b=sn(this.state,b);return null!==b?this.observe(b):rxjs.of(null)}))}Fa(a){return(null==
1113
- a?void 0:a.constructor)!==this.constructor?!1:this.state===a.state}se(){const a=olympe.dc.ha();let b;try{const c=[this];let d=this.getParent();for(;null!==d&&d.state!==olympe.sc.Tn;)c.push(d),d=d.getParent();b='> '+c.map(e=>{const f=e.lf();return null!==f?(e=a.model(f),`${a.name(f)||e&&a.name(e)||f} (${e})`):e.T()}).join('\n> ')}catch(c){b=`No stack available for context ${this.T()}: ${c}`,this.G.warn(b)}return b}};olympe.sc.ya.prototype.observeMany=olympe.sc.ya.prototype.Ez;
1114
+ a?void 0:a.constructor)!==this.constructor?!1:this.state===a.state}se(){const a=olympe.dc.ha();let b;try{const c=[this];let d=this.getParent();for(;null!==d&&d.state!==olympe.sc.Un;)c.push(d),d=d.getParent();b='> '+c.map(e=>{const f=e.lf();return null!==f?(e=a.model(f),`${a.name(f)||e&&a.name(e)||f} (${e})`):e.T()}).join('\n> ')}catch(c){b=`No stack available for context ${this.T()}: ${c}`,this.G.warn(b)}return b}};olympe.sc.ya.prototype.observeMany=olympe.sc.ya.prototype.Ez;
1114
1115
  olympe.sc.ya.prototype.getEvent=olympe.sc.ya.prototype.ty;olympe.sc.ya.prototype.getProperty=olympe.sc.ya.prototype.Ra;olympe.sc.ya.prototype.isDestroyed=olympe.sc.ya.prototype.gb;olympe.sc.ya.prototype.clear=olympe.sc.ya.prototype.clear;olympe.sc.ya.prototype.offDestroy=olympe.sc.ya.prototype.Xf;olympe.sc.ya.prototype.onDestroy=olympe.sc.ya.prototype.onDestroy;olympe.sc.ya.prototype.offClear=olympe.sc.ya.prototype.sl;olympe.sc.ya.prototype.onClear=olympe.sc.ya.prototype.wh;
1115
1116
  olympe.sc.ya.prototype.destroy=olympe.sc.ya.prototype.destroy;olympe.sc.ya.prototype.getOtherContext=olympe.sc.ya.prototype.Iy;olympe.sc.ya.prototype.onContext=olympe.sc.ya.prototype.ul;olympe.sc.ya.prototype.createChild=olympe.sc.ya.prototype.ki;olympe.sc.ya.prototype.setParentElement=olympe.sc.ya.prototype.aA;olympe.sc.ya.prototype['throw']=olympe.sc.ya.prototype.throw;olympe.sc.ya.prototype.waitFor=olympe.sc.ya.prototype.zt;olympe.sc.ya.prototype.runner=olympe.sc.ya.prototype.$z;
1116
- olympe.sc.ya.prototype.repeat=olympe.sc.ya.prototype.repeat;olympe.sc.ya.prototype.observe=olympe.sc.ya.prototype.observe;olympe.sc.ya.prototype.has=olympe.sc.ya.prototype.has;olympe.sc.ya.prototype.get=olympe.sc.ya.prototype.get;olympe.sc.ya.prototype.remove=olympe.sc.ya.prototype.remove;olympe.sc.ya.prototype.trigger=olympe.sc.ya.prototype.co;olympe.sc.ya.prototype.set=olympe.sc.ya.prototype.set;olympe.sc.ya.prototype.getClosest=olympe.sc.ya.prototype.$x;olympe.sc.ya.prototype.getParent=olympe.sc.ya.prototype.getParent;
1117
- olympe.sc.ya.j={PRODUCTION:'__production',EDITION:'__editionMode',TRANSACTION:'__transaction',REDELIVERED:'__redelivered',Fg:'__htmlContainer',YA:'__dockableElement',ho:'__appHasStarted'};olympe.sc.Uw=class extends olympe.sc.ya{constructor(a){super(a);this.D=new olympe.C.Wb('SC Update Context',super.Bb());const b=a.wh(()=>{b&&a.sl(b);this.D.destroy()})}Bb(){return this.D}wh(a,b){return this.Bb().onDestroy(a,null!=b?b:olympe.V.Kc())}};let tn=0;function on(a,b){b=olympe.dc.fa(b);let c,d,e,f;return null!=(f=null!=(e=null==(c=a.$)?void 0:c.get('I#'+b))?e:null==(d=a.$)?void 0:d.get('IO#'+b))?f:b}function qn(a,b){if(null===a.H)a.G.error(`An error occurred in a brick: ${b.toString()}`);else if(a.ea&&olympe.dc.ha().Ja(a.ea)){var c=un(olympe.dc.CloudObject.get(a.ea));null!==c&&vn(a,c).some(d=>{let e,f;return 0<(null==(e=a.F)?void 0:null==(f=e.get(d))?void 0:f.size)})&&!a.N.has('$'+c)?a.set(c,b):qn(a.H,b)}else qn(a.H,b)}
1117
+ olympe.sc.ya.prototype.repeat=olympe.sc.ya.prototype.repeat;olympe.sc.ya.prototype.observe=olympe.sc.ya.prototype.observe;olympe.sc.ya.prototype.has=olympe.sc.ya.prototype.has;olympe.sc.ya.prototype.get=olympe.sc.ya.prototype.get;olympe.sc.ya.prototype.remove=olympe.sc.ya.prototype.remove;olympe.sc.ya.prototype.trigger=olympe.sc.ya.prototype.eo;olympe.sc.ya.prototype.set=olympe.sc.ya.prototype.set;olympe.sc.ya.prototype.getClosest=olympe.sc.ya.prototype.$x;olympe.sc.ya.prototype.getParent=olympe.sc.ya.prototype.getParent;
1118
+ olympe.sc.ya.j={PRODUCTION:'__production',EDITION:'__editionMode',TRANSACTION:'__transaction',REDELIVERED:'__redelivered',Fg:'__htmlContainer',YA:'__dockableElement',io:'__appHasStarted'};olympe.sc.Uw=class extends olympe.sc.ya{constructor(a){super(a);this.D=new olympe.C.Wb('SC Update Context',super.Bb());const b=a.wh(()=>{b&&a.sl(b);this.D.destroy()})}Bb(){return this.D}wh(a,b){return this.Bb().onDestroy(a,null!=b?b:olympe.V.Kc())}};let tn=0;function on(a,b){b=olympe.dc.fa(b);let c,d,e,f;return null!=(f=null!=(e=null==(c=a.$)?void 0:c.get('I#'+b))?e:null==(d=a.$)?void 0:d.get('IO#'+b))?f:b}function qn(a,b){if(null===a.H)a.G.error(`An error occurred in a brick: ${b.toString()}`);else if(a.ea&&olympe.dc.ha().Ja(a.ea)){var c=un(olympe.dc.CloudObject.get(a.ea));null!==c&&vn(a,c).some(d=>{let e,f;return 0<(null==(e=a.F)?void 0:null==(f=e.get(d))?void 0:f.size)})&&!a.N.has('$'+c)?a.set(c,b):qn(a.H,b)}else qn(a.H,b)}
1118
1119
  function rn(a,b){if(b===a.id||a.R.has(b)||!b)return a;for(a=a.H;a;){if(b===a.T()||a.R.has(b))return a;const c=wn(a.j,b);if(c)return c;a=a.getParent()}return null}function xn(a,b,c=0){null===a.ab&&(a.ab=new Map);a.ab.has(b.T())||(a.ab.set(b.T(),{vl:b,depth:c}),yn(a,d=>{(-1===b.F||c<b.F)&&xn(d,b,c+1)}),a.onDestroy(()=>{zn(a,b.T())}));return b.T()}
1119
1120
  function zn(a,b){if(null===a.ab||!a.ab.has(b))return!1;const {vl:c,depth:d}=a.ab.get(b);yn(a,f=>{zn(f,b)});0===d&&c.D();const e=a.ab.delete(b);0===a.ab.size&&(a.ab=null);return e}function sn(a,b){let c;return(null==(c=a.$)?void 0:c.get('IO#'+b))||null}
1120
1121
  function An(a){a.D.Yd(()=>{yn(a,c=>c.destroy())});a.D.onDestroy(()=>{void 0!==a.Qa(olympe.sc.ya.j.TRANSACTION,!1)&&a.G.warn(`The context ${a.T()} is being destroyed but still has unreleased transactions. You probably forgot to end a transaction.`);a.clear();let c;if(null!=(c=a.H)){let d;null==(d=c.j)||d.delete(a.T());let e;0===(null==(e=c.j)?void 0:e.size)&&(c.j=null)}a.R.clear()});let b;null==(b=a.H)||Bn(b,a)}
1121
- function wn(a,b){if(null===a)return null;if(a.has(b))return a.get(b);for(const c of a.values())if(c.ja&&!c.id.startsWith('_')&&(a=wn(c.j,b)))return a;return null}function Cn(a,b,...c){if(null!==a.ab)for(const {vl:d,depth:e}of a.ab.values())d.process(a,b,e,...c)}function Dn(a,b){a.ea=olympe.dc.fa(b);a.ja=b.xd().Nn();b.H().forEach(c=>{a.id===c||a.R.has(c)||(a.R.add(c),ln(a,c,a))});a.$=b.D();Cn(a,olympe.sc.ab.qc.j.INIT)}function En(a){a.ta=!0;let b;null==(b=a.j)||b.forEach(c=>{En(c)})}
1122
+ function wn(a,b){if(null===a)return null;if(a.has(b))return a.get(b);for(const c of a.values())if(c.ja&&!c.id.startsWith('_')&&(a=wn(c.j,b)))return a;return null}function Cn(a,b,...c){if(null!==a.ab)for(const {vl:d,depth:e}of a.ab.values())d.process(a,b,e,...c)}function Dn(a,b){a.ea=olympe.dc.fa(b);a.ja=b.xd().On();b.H().forEach(c=>{a.id===c||a.R.has(c)||(a.R.add(c),ln(a,c,a))});a.$=b.D();Cn(a,olympe.sc.ab.qc.j.INIT)}function En(a){a.ta=!0;let b;null==(b=a.j)||b.forEach(c=>{En(c)})}
1122
1123
  function Fn(a){a.ta=!1;let b;null==(b=a.j)||b.forEach(c=>{Fn(c)})}function vn(a,b){return['*',a.id,...a.R].map(c=>`${'@'}${c}.${b}`)}function Gn(a,b,c,d){c.forEach(f=>{let g,h;null==(g=a.F)||null==(h=g.get(f))||h.forEach(k=>{k(d)})});let e;null==(e=a.j)||e.forEach(f=>{!f.ta&&f.data.has(b)||Gn(f,b,c,d)})}function Hn(a,b,c){a.F||(a.F=new Map);let d=a.F.get(b);void 0===d&&(d=new Map,a.F.set(b,d));tn++;const e=tn;d.set(e,c);return()=>{const f=a.F.get(b);f&&(f.delete(e),0===f.size&&a.F.delete(b))}}
1123
1124
  function ln(a,b,c){a.N.add(b);let d,e;null==(d=a.F)||null==(e=d.get('&'+b))||e.forEach(f=>{f(c)});yn(a,f=>{f.N.has(b)||ln(f,b,c)});a.N.delete(b)}function yn(a,b){let c;null==(c=a.j)||c.forEach(b)}function In(a,b){a.data.forEach((c,d)=>b(c,d.slice(1)))}function Jn(a){var b=olympe.sc.ab.qc.D.$e;const c=[];if(null!==a.ab)for(const {vl:d}of a.ab.values())d.getType()===b&&(c.push(d.T()),d.D(),zn(a,d.T()))}function Bn(a,b){null===a.j&&(a.j=new Map);a.j.set(b.id,b)}
1124
- olympe.sc.Gg=class{constructor(a,b='no name',c=olympe.sc.Tn){this.id=a;this.ad=b;this.R=new Set;this.H=c;this.D=new olympe.C.Wb('SC Context');this.data=new Map;this.ea=this.Y=this.j=this.F=null;this.ja=!1;this.N=new Set;this.ta=!1;this.$=null;this.G=olympe.ia.Ya('sc');this.ab=null;An(this)}T(){return this.id}getParent(){return this.H}lf(){return this.ea}set(a,b){if(!this.D.jd()&&!this.D.gb()){const g=olympe.dc.fa(a);var c,d;let h,k;a=null!=(k=null!=(h=null==(c=this.$)?void 0:c.get('O#'+g))?h:null==
1125
+ olympe.sc.Gg=class{constructor(a,b='no name',c=olympe.sc.Un){this.id=a;this.ad=b;this.R=new Set;this.H=c;this.D=new olympe.C.Wb('SC Context');this.data=new Map;this.ea=this.Y=this.j=this.F=null;this.ja=!1;this.N=new Set;this.ta=!1;this.$=null;this.G=olympe.ia.Ya('sc');this.ab=null;An(this)}T(){return this.id}getParent(){return this.H}lf(){return this.ea}set(a,b){if(!this.D.jd()&&!this.D.gb()){const g=olympe.dc.fa(a);var c,d;let h,k;a=null!=(k=null!=(h=null==(c=this.$)?void 0:c.get('O#'+g))?h:null==
1125
1126
  (d=this.$)?void 0:d.get('IO#'+g))?k:g;c='$'+a;var e;d=null!=(e=this.data.get(c))?e:null;b=null!=b?b:null;if(e=!this.N.has(c)){a:{if('function'===typeof(null==b?void 0:b.Fa))try{var f=b.Fa(d);break a}catch(l){f=!1;break a}f=b===d}e=!f}e&&(null===b?this.data.delete(c):this.data.set(c,b),null!==this.ab&&0<this.ab.size&&Cn(this,olympe.sc.ab.qc.j.Zg,a,b),f=vn(this,a),this.N.add(c),Gn(this,c,f,b),this.N.delete(c))}}on(a,b,c,d=!0){if(this.D.gb()||this.D.jd())return()=>{};const e=on(this,a),f=c?olympe.dc.fa(c):
1126
1127
  '*';a=Hn(this,'@'+f+'.'+e,b);c=c?(c=rn(this,f))?c.Qa(e,!1):void 0:this.Qa(e);void 0!==c&&b(c);if(d)olympe.C.$a().onDestroy(a);return a}has(a,b=!1){a='$'+on(this,a);let c=this.data.has(a),d=this.getParent();if(b)for(;!c&&d;)c=d.data.has(a),d=d.getParent();return c}ki(a,b,c){const d=null!=c?c:'_'+olympe.V.Kc();if(a.gb()||a.jd())throw Error(`Try to create new child context in a destroyed context ${a.T()}, probably because \`runner()\` is called on a destroyed context`);const e=a.run(()=>new olympe.sc.Gg(d,
1127
1128
  b,this));null!==this.ab&&0<this.ab.size&&this.ab.forEach(({vl:f,depth:g})=>{(-1===f.F||g<f.F)&&xn(e,f,g+1)});return e}ul(a,b){const c=rn(this,a);if(c)return b(c),()=>{};const d=Hn(this,'&'+a,e=>{let f;null==(f=d)||f();b(e)});return d}Qa(a,b=!0){a='$'+on(this,a);let c=this.data.get(a),d=this.getParent();if(b)for(;void 0===c&&null!==d;)c=d.data.get(a),d=d.getParent();return c}destroy(){this.D.jd()||this.D.gb()||(Cn(this,olympe.sc.ab.qc.j.dk),this.D.destroy(),Cn(this,olympe.sc.ab.qc.j.$d))}wh(a,b){if(this.D.gb())a();
1128
- else return tn++,b=null!=b?b:String(tn),null===this.Y&&(this.Y=new Map),this.Y.set(b,a),b;return b||'noId'}sl(a){null!==this.Y&&this.Y.delete(a)}onDestroy(a){return this.gb()?(a(),'noId'):this.D.onDestroy(a)}clear(){if(!this.D.gb()){Cn(this,olympe.sc.ab.qc.j.Xj);let a;null==(a=this.Y)||a.forEach(b=>b());Cn(this,olympe.sc.ab.qc.j.Yj)}}gb(){return this.D.gb()}Bb(){return this.D}};olympe.sc.Gg.prototype.getParent=olympe.sc.Gg.prototype.getParent;olympe.sc.Gg.j={pm:'I#',Hm:'O#',RB:'IO#'};function Kn(a,b,c){return(c=c.lf())?`${a}.${c}.${b}`:`${a}.${b}`}olympe.sc.ab.qc=class{constructor(a=-1){this.id=olympe.V.jf();this.active=!0;this.F=a}D(){this.active=!1}T(){return this.id}getType(){}process(){}};olympe.sc.ab.qc.j={INIT:'INIT',Zg:'SET',Xj:'CLEAR',Yj:'CLEARED',dk:'DESTROY',$d:'DESTROYED'};olympe.sc.ab.qc.D={$e:'REMOTE',nv:'LOCAL',jg:'PROFILER'};olympe.sc.ae=class a{constructor(){this.D=this.H=this.N=null;this.R=new Map;this.F=new Map;this.j=new olympe.V.bn(1E4);hb(this.j,b=>{Jn(b)})}$(b,c,d){const e=b.body(),f=e.c,g=this.R.get(f);switch(e.t){case olympe.sc.ae.j.Pv:c=this.F.get(e.f);b.dd(c).catch(l=>{d.error('Unable to reply with paths: ',l)});break;case olympe.sc.ae.j.Qv:const h=f+c,k=(l,n,p=0)=>{In(l,(q,r)=>{let t;q instanceof olympe.dc.CloudObject?t=a.F(q):t=q;let v;q=null!=(v=l.lf())?v:'';0<q.length&&(q+='.');n.push([`${p}.${q}${r}`,
1129
- t])})};b.Qn(h).then(()=>{const l=[];k(g,l,0);yn(g,p=>{k(p,l,1)});olympe.L.rb.ld(h,{t:olympe.sc.ae.j.Eu,v:l,ts:0}).catch(p=>{d.error('Error publishing on service : ',p)});const n=new olympe.sc.ab.fw(h);xn(g,n);this.j.has(g)?gb(this.j,g):this.j.add(g)}).catch(l=>{d.error('Error notifying on a contextId : ',l)});break;case olympe.sc.ae.j.Rv:void 0!==g&&this.j.has(g)&&gb(this.j,g);break;case olympe.sc.ae.j.Fh:void 0!==g&&(this.j.delete(g),Jn(g))}}ea(b,c,d){this.N=new olympe.L.rb('discovery_debug_id',
1130
- c);this.N.listen().subscribe(e=>{var f=e.body();if(f.t===olympe.sc.ae.j.du){e=f.i;f=f.f;if(!this.F.has(f)){const g=this.Y(f,c,b);if(0!==g.length)this.F.set(f,g);else return}null===this.D&&(this.D=olympe.V.jf(),f=new olympe.C.Wb(this.D,c.Bb()),this.H=new olympe.L.rb(this.D,f),this.H.listen().subscribe(g=>{this.$(g,b,d)}));olympe.L.rb.ld(e,{t:olympe.sc.ae.j.At,n:olympe.W.getParameter(olympe.sc.U.bp)||'no name',a:b,s:this.D}).catch(g=>{d.error('Error publishing on draw service : '+g)})}})}Y(b,c,d){const e=
1129
+ else return tn++,b=null!=b?b:String(tn),null===this.Y&&(this.Y=new Map),this.Y.set(b,a),b;return b||'noId'}sl(a){null!==this.Y&&this.Y.delete(a)}onDestroy(a){return this.gb()?(a(),'noId'):this.D.onDestroy(a)}clear(){if(!this.D.gb()){Cn(this,olympe.sc.ab.qc.j.Xj);let a;null==(a=this.Y)||a.forEach(b=>b());Cn(this,olympe.sc.ab.qc.j.Yj)}}gb(){return this.D.gb()}Bb(){return this.D}};olympe.sc.Gg.prototype.getParent=olympe.sc.Gg.prototype.getParent;olympe.sc.Gg.j={qm:'I#',Im:'O#',RB:'IO#'};function Kn(a,b,c){return(c=c.lf())?`${a}.${c}.${b}`:`${a}.${b}`}olympe.sc.ab.qc=class{constructor(a=-1){this.id=olympe.V.jf();this.active=!0;this.F=a}D(){this.active=!1}T(){return this.id}getType(){}process(){}};olympe.sc.ab.qc.j={INIT:'INIT',Zg:'SET',Xj:'CLEAR',Yj:'CLEARED',dk:'DESTROY',$d:'DESTROYED'};olympe.sc.ab.qc.D={$e:'REMOTE',nv:'LOCAL',jg:'PROFILER'};olympe.sc.ae=class a{constructor(){this.D=this.H=this.N=null;this.R=new Map;this.F=new Map;this.j=new olympe.V.cn(1E4);hb(this.j,b=>{Jn(b)})}$(b,c,d){const e=b.body(),f=e.c,g=this.R.get(f);switch(e.t){case olympe.sc.ae.j.Pv:c=this.F.get(e.f);b.dd(c).catch(l=>{d.error('Unable to reply with paths: ',l)});break;case olympe.sc.ae.j.Qv:const h=f+c,k=(l,n,p=0)=>{In(l,(q,r)=>{let t;q instanceof olympe.dc.CloudObject?t=a.F(q):t=q;let v;q=null!=(v=l.lf())?v:'';0<q.length&&(q+='.');n.push([`${p}.${q}${r}`,
1130
+ t])})};b.Rn(h).then(()=>{const l=[];k(g,l,0);yn(g,p=>{k(p,l,1)});olympe.L.rb.ld(h,{t:olympe.sc.ae.j.Eu,v:l,ts:0}).catch(p=>{d.error('Error publishing on service : ',p)});const n=new olympe.sc.ab.fw(h);xn(g,n);this.j.has(g)?gb(this.j,g):this.j.add(g)}).catch(l=>{d.error('Error notifying on a contextId : ',l)});break;case olympe.sc.ae.j.Rv:void 0!==g&&this.j.has(g)&&gb(this.j,g);break;case olympe.sc.ae.j.Fh:void 0!==g&&(this.j.delete(g),Jn(g))}}ea(b,c,d){this.N=new olympe.L.rb('discovery_debug_id',
1131
+ c);this.N.listen().subscribe(e=>{var f=e.body();if(f.t===olympe.sc.ae.j.du){e=f.i;f=f.f;if(!this.F.has(f)){const g=this.Y(f,c,b);if(0!==g.length)this.F.set(f,g);else return}null===this.D&&(this.D=olympe.V.jf(),f=new olympe.C.Wb(this.D,c.Bb()),this.H=new olympe.L.rb(this.D,f),this.H.listen().subscribe(g=>{this.$(g,b,d)}));olympe.L.rb.ld(e,{t:olympe.sc.ae.j.At,n:olympe.W.getParameter(olympe.sc.U.cp)||'no name',a:b,s:this.D}).catch(g=>{d.error('Error publishing on draw service : '+g)})}})}Y(b,c,d){const e=
1131
1132
  [],f=olympe.dc.ha(),g=(h,k)=>{yn(h,l=>{if(null!==l.lf()){const n=olympe.dc.CloudObject.get(l.lf()).wg(olympe.sc.Runnable.H).Hc();if(null!==n){const p=k+'/'+f.name(n);n.X()===b&&(e.push([p,l.T()]),this.R.set(l.T(),l));g(l,p)}}})};g(c.state,f.name(d));return e}static D(b,c,d){let e=d;d instanceof olympe.dc.CloudObject&&(e=a.F(d));olympe.L.rb.ld(b,{t:olympe.sc.ae.j.Xk,k:c,v:e,ts:Date.now()}).catch(f=>{olympe.ia.Ya('Debugger').error('Error publishing on service : ',f)})}static F(b){if(null===b||void 0===
1132
1133
  b)return'<null>';const c=olympe.dc.ha();if(b instanceof olympe.dc.CloudObject){var d=b.ac();if(!c.Ob(d,olympe.sc.Ac))return b.toString();let f=`${b.Vb().name()} (${b.X()})`;var e=olympe.dc.CloudObject.get(d);d=olympe.dc.ma.from(e).vg(olympe.dc.CloudObject.extendRel,!0).ne().fb(olympe.dc.CloudObject.propertyRel).ne().Hc();e=olympe.dc.ma.from(e).vg(olympe.dc.CloudObject.extendRel,!0).ne().fb(olympe.dc.CloudObject.Kj).ne().Hc();d=d.filter(([g])=>g instanceof olympe.sc.Ac);0!==d.length&&(f+='<br> ',
1133
1134
  f+='Properties:<br>',d.forEach(([,g])=>{f+=' ';f+=' - '+c.name(g)+' : '+c.Ra(b.X(),g)+'<br>'}));d=e.filter(([g])=>g instanceof olympe.sc.Ac);0!==d.length&&(f+=' ',f+='Relations:<br>',d.forEach(([,g])=>{f+=' ';f+=' - '+c.name(g)+'<br>'}));return f}return b.toString()}};olympe.sc.ae.H='discovery_debug_id';olympe.sc.ae.j={du:0,At:1,Pv:2,Qv:3,Eu:4,Xk:5,Rv:6,Fh:7};olympe.sc.ab.ZB=class extends olympe.sc.ab.qc{constructor(a=-1){super(a);this.j=new Map}getType(){return olympe.sc.ab.qc.D.nv}process(a,b,c,...d){if(this.active&&b===olympe.sc.ab.qc.j.Zg){a=Kn(c,on(a,d[0]),a);d=d[1];let e;null==(e=this.j.get(a))||e(d)}}on(a,b){this.j.set(a,b)}};function Ln(a,b,c,d=new Map){for(var e=[];b;){const n=b.lf();if(!n)break;e.push(n);b=b.getParent()}sb(a.j,c,d.set('context',e));var f;let g;for(const n of[...e,null==(f=d)?void 0:f.get('propId'),null==(g=d)?void 0:g.get('type')])if(c=n,'string'===typeof c&&!a.H.has(c)){e=a;f=c;e.ha||(e.ha=olympe.dc.ha());d=e.ha.name(f);e=(f=e.ha.model(f))?e.ha.name(f):'';var [h,k,l]=[d,f,e];d=a.j;e=(new Map).set(c,h).set(k,l);c=(new Map).set(c,k);for(const [p,q]of e.entries())d.N.set(p,q);for(const [p,q]of c.entries())d.H.set(p,
1134
1135
  q)}}
1135
- olympe.sc.ab.Zv=class extends olympe.sc.ab.qc{constructor(a){super();this.j=a;this.ha=olympe.dc.ha();this.H=new Set}getType(){return olympe.sc.ab.qc.D.jg}process(a,b,c,...d){var e=Mn.pm,f=Mn.Hm,g=Mn.Uv;const h=Mn.INIT,k=Mn.Xj,l=Mn.Yj,n=Mn.dk,p=Mn.$d;c=Mn.Mv;if(b===olympe.sc.ab.qc.j.Zg){const [q,r]=d;b=(d=a.lf())?olympe.dc.ha().Ob(d,olympe.sc.logic.Function):!1;d=d?olympe.dc.ha().Ob(d,olympe.sc.ui.QC):!1;b?(g=this.ha.Jb(q,olympe.dm.Property.typeRel),b=this.ha.Ob(q,olympe.sc.logic.vb),d=this.ha.Ob(q,olympe.sc.logic.Gb),
1136
+ olympe.sc.ab.Zv=class extends olympe.sc.ab.qc{constructor(a){super();this.j=a;this.ha=olympe.dc.ha();this.H=new Set}getType(){return olympe.sc.ab.qc.D.jg}process(a,b,c,...d){var e=Mn.qm,f=Mn.Im,g=Mn.Uv;const h=Mn.INIT,k=Mn.Xj,l=Mn.Yj,n=Mn.dk,p=Mn.$d;c=Mn.Mv;if(b===olympe.sc.ab.qc.j.Zg){const [q,r]=d;b=(d=a.lf())?olympe.dc.ha().Ob(d,olympe.sc.logic.Function):!1;d=d?olympe.dc.ha().Ob(d,olympe.sc.ui.QC):!1;b?(g=this.ha.Jb(q,olympe.dm.Property.typeRel),b=this.ha.Ob(q,olympe.sc.logic.vb),d=this.ha.Ob(q,olympe.sc.logic.Gb),
1136
1137
  Ln(this,a,b?e:d?f:c,new Map([['propId',q],['value',r],['type',g]]))):d&&(e=this.ha.Ob(q,olympe.dm.Property),f=this.ha.Jb(q,olympe.dm.Property.typeRel),Ln(this,a,e?g:c,new Map([['propId',q],['value',r],['type',f]])))}else b===olympe.sc.ab.qc.j.INIT?Ln(this,a,h):b===olympe.sc.ab.qc.j.Xj?Ln(this,a,k):b===olympe.sc.ab.qc.j.Yj?Ln(this,a,l):b===olympe.sc.ab.qc.j.dk?Ln(this,a,n):b===olympe.sc.ab.qc.j.$d&&Ln(this,a,p)}};
1137
- const Mn={pm:'input',Hm:'output',Uv:'prop',INIT:'init',Xj:'clear',Yj:'cleared',dk:'destroy',$d:'destroyed',Mv:'other'};olympe.sc.ab.fw=class extends olympe.sc.ab.qc{constructor(a){super(1);this.H=a;this.j=new Map;this.db=olympe.dc.ha()}getType(){return olympe.sc.ab.qc.D.$e}D(){super.D();for(const a of this.j.values())a();this.j.clear()}process(a,b,c,...d){if(this.active&&b===olympe.sc.ab.qc.j.Zg&&void 0!==d[0]&&null!==d[0]){const e=Kn(c,on(a,d[0]),a),f=d[1];let g;null==(g=this.j.get(e))||g();this.j.delete(e);if(f instanceof olympe.dc.CloudObject&&f.Vb()instanceof olympe.sc.Ac){const h=ih(this.db,f,()=>{olympe.sc.ae.D(this.H,
1138
- e,f)});this.j.set(e,()=>{jh(this.db,f,h)})}olympe.sc.ae.D(this.H,e,f)}}};olympe.sc.Metadata=class extends olympe.dc.CloudObject{Yu(){return this.yd(this.In())}Zu(){return this.yd(this.Jn())}kl(){return new olympe.C.Zb(this.yd(this.In()),this.yd(this.Jn()))}In(){}Jn(){}};olympe.sc.Metadata.O=olympe.dc.na.j('0161ae936c62f9fcd131',olympe.sc.Metadata);m=olympe.sc.Metadata.prototype;m.Yu.K=olympe.C.J.F;m.Zu.K=olympe.C.J.F;m.kl.K=olympe.C.J.R;m.In.K=olympe.C.J.j;m.Jn.K=olympe.C.J.j;olympe.sc.hd=class extends olympe.dc.CloudObject{D(){return this.wb(olympe.sc.hd.F)}j(){return this.wb(olympe.sc.hd.j)}};olympe.sc.hd.O=olympe.dc.na.j('01703376c4a81c0e9d90',olympe.sc.hd);olympe.sc.hd.F=olympe.sc.hd.O.ka('01703376c4a81c0e9d91');olympe.sc.hd.j=olympe.sc.hd.O.ka('01703376c4a81c0e9d92');olympe.sc.hd.D=olympe.sc.hd.O.sa('01703376c4a81c0e9d93');R(olympe.dc.CloudObject.O,olympe.sc.hd.D);olympe.sc.hd.prototype.D.K=olympe.C.J.D;olympe.sc.hd.prototype.j.K=olympe.C.J.D;olympe.sc.xe={};olympe.sc.xe.Ne={nu:'folders',jw:'screenflow',Lw:'ui-design',Mr:'software-intelligence',Ch:'data-management',DC:'projects'};olympe.sc.Gf=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}Id(){return this.yd(olympe.sc.Gf.D)}};olympe.sc.Gf.O=olympe.dc.na.j('019131fb930466a1ad79',olympe.sc.Gf);olympe.sc.Gf.D=olympe.sc.Gf.O.ka('016d1bb681929c2cc3f1');olympe.sc.Gf.j=olympe.sc.Gf.O.sa('019131fb930466a1ad7a');R(olympe.dc.CloudObject.O,olympe.sc.Gf.j);olympe.sc.Gf.prototype.Id.K=olympe.C.J.F;olympe.sc.td=class extends olympe.dm.BrickMetadata{ve(){return olympe.sc.xe.Ne.Mr}j(){return this.cb(olympe.sc.td.j,olympe.sc.logic.Vh)}D(){return this.cb(olympe.sc.td.D,olympe.sc.logic.Sg)}};olympe.sc.td.O=olympe.dc.na.j('011100000000000adef0',olympe.sc.td);olympe.sc.td.j=olympe.sc.td.O.sa('016ac4f59a2917fdef01');olympe.sc.td.D=olympe.sc.td.O.sa('016ac4f59a2917fdef02');olympe.sc.td.O.j=(a,b)=>$l(a,b||'New function signature',olympe.sc.td,olympe.sc.logic.Cd).X();
1138
+ const Mn={qm:'input',Im:'output',Uv:'prop',INIT:'init',Xj:'clear',Yj:'cleared',dk:'destroy',$d:'destroyed',Mv:'other'};olympe.sc.ab.fw=class extends olympe.sc.ab.qc{constructor(a){super(1);this.H=a;this.j=new Map;this.db=olympe.dc.ha()}getType(){return olympe.sc.ab.qc.D.$e}D(){super.D();for(const a of this.j.values())a();this.j.clear()}process(a,b,c,...d){if(this.active&&b===olympe.sc.ab.qc.j.Zg&&void 0!==d[0]&&null!==d[0]){const e=Kn(c,on(a,d[0]),a),f=d[1];let g;null==(g=this.j.get(e))||g();this.j.delete(e);if(f instanceof olympe.dc.CloudObject&&f.Vb()instanceof olympe.sc.Ac){const h=ih(this.db,f,()=>{olympe.sc.ae.D(this.H,
1139
+ e,f)});this.j.set(e,()=>{jh(this.db,f,h)})}olympe.sc.ae.D(this.H,e,f)}}};olympe.sc.Metadata=class extends olympe.dc.CloudObject{Yu(){return this.yd(this.Jn())}Zu(){return this.yd(this.Kn())}kl(){return new olympe.C.Zb(this.yd(this.Jn()),this.yd(this.Kn()))}Jn(){}Kn(){}};olympe.sc.Metadata.O=olympe.dc.oa.j('0161ae936c62f9fcd131',olympe.sc.Metadata);m=olympe.sc.Metadata.prototype;m.Yu.K=olympe.C.J.F;m.Zu.K=olympe.C.J.F;m.kl.K=olympe.C.J.R;m.Jn.K=olympe.C.J.j;m.Kn.K=olympe.C.J.j;olympe.sc.hd=class extends olympe.dc.CloudObject{D(){return this.wb(olympe.sc.hd.F)}j(){return this.wb(olympe.sc.hd.j)}};olympe.sc.hd.O=olympe.dc.oa.j('01703376c4a81c0e9d90',olympe.sc.hd);olympe.sc.hd.F=olympe.sc.hd.O.ka('01703376c4a81c0e9d91');olympe.sc.hd.j=olympe.sc.hd.O.ka('01703376c4a81c0e9d92');olympe.sc.hd.D=olympe.sc.hd.O.sa('01703376c4a81c0e9d93');R(olympe.dc.CloudObject.O,olympe.sc.hd.D);olympe.sc.hd.prototype.D.K=olympe.C.J.D;olympe.sc.hd.prototype.j.K=olympe.C.J.D;olympe.sc.xe={};olympe.sc.xe.Ne={nu:'folders',jw:'screenflow',Lw:'ui-design',Mr:'software-intelligence',Ch:'data-management',DC:'projects'};olympe.sc.Gf=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}Id(){return this.yd(olympe.sc.Gf.D)}};olympe.sc.Gf.O=olympe.dc.oa.j('019131fb930466a1ad79',olympe.sc.Gf);olympe.sc.Gf.D=olympe.sc.Gf.O.ka('016d1bb681929c2cc3f1');olympe.sc.Gf.j=olympe.sc.Gf.O.sa('019131fb930466a1ad7a');R(olympe.dc.CloudObject.O,olympe.sc.Gf.j);olympe.sc.Gf.prototype.Id.K=olympe.C.J.F;olympe.sc.td=class extends olympe.dm.BrickMetadata{ve(){return olympe.sc.xe.Ne.Mr}j(){return this.cb(olympe.sc.td.j,olympe.sc.logic.Vh)}D(){return this.cb(olympe.sc.td.D,olympe.sc.logic.Sg)}};olympe.sc.td.O=olympe.dc.oa.j('011100000000000adef0',olympe.sc.td);olympe.sc.td.j=olympe.sc.td.O.sa('016ac4f59a2917fdef01');olympe.sc.td.D=olympe.sc.td.O.sa('016ac4f59a2917fdef02');olympe.sc.td.O.j=(a,b)=>$l(a,b||'New function signature',olympe.sc.td,olympe.sc.logic.Cd).X();
1139
1140
  olympe.sc.td.prototype.j.K=new olympe.C.J(()=>olympe.dc.Aa,[]);olympe.sc.td.prototype.D.K=new olympe.C.J(()=>olympe.dc.Aa,[]);function Nn(a,b){[].forEach(c=>c.call(a,b,(d,e)=>{null===e?b.remove(d):b.set(d,e)}))}function On(a,b){b=b.filter(c=>'string'===typeof c&&a.db.Ob(c,olympe.sc.logic.Tb));b.sort((c,d)=>{let e;c=null!=(e=a.db.Ra(c,olympe.sc.logic.Tb.j,!0))?e:0;let f;d=null!=(f=a.db.Ra(d,olympe.sc.logic.Tb.j,!0))?f:0;return c-d});return b}function Pn(a){return On(a,a.db.cb(a.tag,olympe.sc.Xa.F))}function Qn(a){return On(a,a.db.cb(a.tag,olympe.sc.Xa.D))}
1140
- olympe.sc.Xa=class extends olympe.dm.BrickMetadata{av(a,b,c,d,e=!0){e||olympe.ia.Ya('sc').error('parameter own= false ignored, investigate');return olympe.C.xh(M(this.Tf(a,olympe.dc.nb.tj,c)),d)}H(){return[]}F(){return rxjs.of([])}Py(){return this.cb(olympe.sc.Xa.N,olympe.sc.Runnable)}ey(){return this.cb(olympe.sc.Xa.R,olympe.sc.Runnable)}vi(){return this.db.Ra(this,olympe.sc.Xa.$)}Nn(){return null!==this.db.Jb(this.tag,olympe.sc.Runnable.j.$b())}$u(){return this.cb(olympe.sc.Xa.F,olympe.sc.logic.vb)}mq(){return this.cb(olympe.sc.Xa.D,
1141
- olympe.sc.logic.Gb)}N(){return[olympe.sc.Xa.Wa]}};olympe.sc.Xa.O=olympe.dc.na.j('0112000000000000def0',olympe.sc.Xa);olympe.sc.Xa.$=olympe.sc.Xa.O.ka('01692aa71f3108454479');olympe.sc.Xa.mb=olympe.sc.Xa.O.ka('0166446c1f128ebc903a');olympe.sc.Xa.Wa=olympe.sc.Xa.O.ka('0166446c1f128ebc904e');olympe.sc.Xa.N=olympe.sc.Xa.O.sa('01692a4af82e8984742c');olympe.sc.Xa.R=olympe.sc.Xa.O.sa('01692a4af82e8984742d');olympe.sc.Xa.Y=olympe.sc.Xa.O.sa('01692a4af82e8984742e');olympe.sc.Xa.F=olympe.sc.Xa.O.sa('01621fb84e320000f00a');
1142
- olympe.sc.Xa.D=olympe.sc.Xa.O.sa('01621fb84e320000f00b');olympe.sc.Xa.Gd=olympe.sc.Xa.O.sa('0171838bcfed0000e00e');olympe.sc.Xa.wd=olympe.sc.Xa.O.sa('0171838bcfed0000a00a');m=olympe.sc.Xa.prototype;m.av.K=olympe.C.J.j;m.Py.K=new olympe.C.J(()=>olympe.dc.Aa,[]);m.ey.K=new olympe.C.J(()=>olympe.dc.Aa,[]);m.vi.K=olympe.C.J.j;m.Nn.K=olympe.C.J.j;m.$u.K=new olympe.C.J(()=>olympe.dc.Aa,[]);m.mq.K=new olympe.C.J(()=>olympe.dc.Aa,[]);function un(a){let b;return null!=(b=a.xd().N().map(olympe.dc.fa)[0])?b:null}function Rn(a){const b=new olympe.dc.Za;a=b.create(a);b.persist(a,!1);b.ob((d,e)=>{d||olympe.ia.Ya('sc').error(`Error occurred for transaction executed by createLocalRunnable: ${e}`)});const c=olympe.dc.CloudObject.get(a);olympe.C.$a().onDestroy(()=>{const d=new olympe.dc.Za;d.delete(c);d.ob()});return c}
1141
+ olympe.sc.Xa=class extends olympe.dm.BrickMetadata{av(a,b,c,d,e=!0){e||olympe.ia.Ya('sc').error('parameter own= false ignored, investigate');return olympe.C.xh(M(this.Tf(a,olympe.dc.nb.tj,c)),d)}H(){return[]}F(){return rxjs.of([])}Py(){return this.cb(olympe.sc.Xa.N,olympe.sc.Runnable)}ey(){return this.cb(olympe.sc.Xa.R,olympe.sc.Runnable)}vi(){return this.db.Ra(this,olympe.sc.Xa.$)}On(){return null!==this.db.Jb(this.tag,olympe.sc.Runnable.j.$b())}$u(){return this.cb(olympe.sc.Xa.F,olympe.sc.logic.vb)}mq(){return this.cb(olympe.sc.Xa.D,
1142
+ olympe.sc.logic.Gb)}N(){return[olympe.sc.Xa.Wa]}};olympe.sc.Xa.O=olympe.dc.oa.j('0112000000000000def0',olympe.sc.Xa);olympe.sc.Xa.$=olympe.sc.Xa.O.ka('01692aa71f3108454479');olympe.sc.Xa.mb=olympe.sc.Xa.O.ka('0166446c1f128ebc903a');olympe.sc.Xa.Wa=olympe.sc.Xa.O.ka('0166446c1f128ebc904e');olympe.sc.Xa.N=olympe.sc.Xa.O.sa('01692a4af82e8984742c');olympe.sc.Xa.R=olympe.sc.Xa.O.sa('01692a4af82e8984742d');olympe.sc.Xa.Y=olympe.sc.Xa.O.sa('01692a4af82e8984742e');olympe.sc.Xa.F=olympe.sc.Xa.O.sa('01621fb84e320000f00a');
1143
+ olympe.sc.Xa.D=olympe.sc.Xa.O.sa('01621fb84e320000f00b');olympe.sc.Xa.Gd=olympe.sc.Xa.O.sa('0171838bcfed0000e00e');olympe.sc.Xa.wd=olympe.sc.Xa.O.sa('0171838bcfed0000a00a');m=olympe.sc.Xa.prototype;m.av.K=olympe.C.J.j;m.Py.K=new olympe.C.J(()=>olympe.dc.Aa,[]);m.ey.K=new olympe.C.J(()=>olympe.dc.Aa,[]);m.vi.K=olympe.C.J.j;m.On.K=olympe.C.J.j;m.$u.K=new olympe.C.J(()=>olympe.dc.Aa,[]);m.mq.K=new olympe.C.J(()=>olympe.dc.Aa,[]);function un(a){let b;return null!=(b=a.xd().N().map(olympe.dc.fa)[0])?b:null}function Rn(a){const b=new olympe.dc.Za;a=b.create(a);b.persist(a,!1);b.ob((d,e)=>{d||olympe.ia.Ya('sc').error(`Error occurred for transaction executed by createLocalRunnable: ${e}`)});const c=olympe.dc.CloudObject.get(a);olympe.C.$a().onDestroy(()=>{const d=new olympe.dc.Za;d.delete(c);d.ob()});return c}
1143
1144
  function Sn(a,b){Dn(b.state,a);Nn(a.xd(),b);const c=a.R(),d=Tn(b,c),e=[];c.forEach((f,g)=>{f===a.ea?e[0]=g:f===a.$&&(e[1]=g)});void 0!==e[0]&&void 0!==e[1]&&(Un(a,b,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])})}
1144
1145
  function Vn(a,b){let c,d,e;a.G.j()&&(e=a.db.name(a.ac()),c=`Brick ${e} successfully run`,d=`Brick ${e} successfully cleared`);const f=Wn(a,b),g=a.setupExecution(b).pipe(rxjs.operators.map(h=>{if(!b.gb()&&(b.clear(),null!==h)){const k=Array.isArray(h)?h:[h],l=new olympe.sc.Uw(b.state);l.Bb().run(()=>u(function*(){try{yield a.update(l,k,f)}catch(n){l.throw(n)}}));return!0}return!1})).subscribe(rxjs.Subscriber.create(h=>h?a.G.debug(c):a.G.debug(d),h=>b.throw(h),()=>a.G.debug(`Brick ${e} completed`)));
1145
1146
  b.onDestroy(g.unsubscribe.bind(g))}function Xn(a,b,c,d){let e=[];const f=T(a.db,b,c,(g,h)=>{if(g){const k=kn(d,h),l=olympe.dc.CloudObject.get(h);l instanceof olympe.sc.logic.gd&&null!==e?e.push(()=>l.run(k)):l.run(k)}else{let k;null==(k=mn(d,h))||k.destroy()}});e.forEach(g=>g());e=null;d.Bb().onDestroy(a.db.D.bind(a.db,b,c,f))}function Wn(a,b){return a.xd().H(b)}
1146
1147
  function Tn(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)}})}function Un(a,b,c,d){b=b.Bb();const e=ih(a.db,a.tag,b.tc((f,g,h)=>{const k=h?d:c;null!==k&&(k(f,olympe.dc.nb.Cc(g)),h&&c!==k&&(null==c||c(f,null)))}));b.onDestroy(()=>{jh(a.db,a.tag,e)})}
1147
1148
  olympe.sc.Runnable=class extends olympe.dm.BrickMetadata{constructor(a,b,c){super(a,b);this.G=c}run(a){a.Bb().run(()=>{Sn(this,a);this.init(a);a.wh(this.clear.bind(this,a));a.onDestroy(this.destroy.bind(this,a));Vn(this,a);this.F(a)})}xd(){return this.Vb()}init(a){this.onInit(a)}update(a,b,c){const d=this.xd();if(d.vi())this.onUpdate(a,b,c);else this.G.debug(`Softcoded runnable ${this.db.name(this)} with tag ${this.tag} running in context ${a.T()}`),Xn(this,d,olympe.sc.Xa.N,a),this.ja()&&Xn(this,
1148
- d,olympe.sc.Xa.Y,a)}F(a){a.co(olympe.sc.Xa.mb)}clear(){}destroy(a){this.onDestroy(a)}setupExecution(a){return this.xd().F(a)}onInit(){}onUpdate(){const a=this.ac(),b=this.db.name(a),c=this.db.name(this.db.model(a));this.G.error(`No code was found for ${b} (${c}: ${a})\n\n`+'This is probably because the code has not yet been deployed to the environment, or because the package.json does not import the required dependencies.')}onDestroy(){}getInputs(){return Pn(this.xd())}getOutputs(){return Qn(this.xd())}H(){return[]}D(){return null}ja(){return!1}N(a,
1149
- b,c,d){a=b.tb(a,c,!0);void 0!==d&&olympe.C.xh(a,d);return a}Wa(a,b,c,d,e){olympe.C.Sn([d],f=>{b.set(a,olympe.C.$s(f)?f.valueOf():f)});return this.N(a,b,c,e)}R(){return[this.ea,this.$]}ea(a,b){Un(this,a,b,null)}$(a,b){Un(this,a,null,b)}mb(a,b){const c=this.db,d=olympe.sc.logic.qb.F.$b(),e=olympe.sc.logic.qb.D,f=olympe.sc.logic.qb.j;this.Is(d,g=>{var h=g.X();if(h=c.Jb(h,e)||c.Jb(h,f))return Yn(g,a,b.bind(null,h))})}};olympe.sc.Runnable.O=jg(olympe.dc.na.j('01130000000000ca1100',olympe.sc.Runnable));
1149
+ d,olympe.sc.Xa.Y,a)}F(a){a.eo(olympe.sc.Xa.mb)}clear(){}destroy(a){this.onDestroy(a)}setupExecution(a){return this.xd().F(a)}onInit(){}onUpdate(){const a=this.ac(),b=this.db.name(a),c=this.db.name(this.db.model(a));this.G.error(`No code was found for ${b} (${c}: ${a})\n\n`+'This is probably because the code has not yet been deployed to the environment, or because the package.json does not import the required dependencies.')}onDestroy(){}getInputs(){return Pn(this.xd())}getOutputs(){return Qn(this.xd())}H(){return[]}D(){return null}ja(){return!1}N(a,
1150
+ b,c,d){a=b.tb(a,c,!0);void 0!==d&&olympe.C.xh(a,d);return a}Wa(a,b,c,d,e){olympe.C.Tn([d],f=>{b.set(a,olympe.C.$s(f)?f.valueOf():f)});return this.N(a,b,c,e)}R(){return[this.ea,this.$]}ea(a,b){Un(this,a,b,null)}$(a,b){Un(this,a,null,b)}mb(a,b){const c=this.db,d=olympe.sc.logic.qb.F.$b(),e=olympe.sc.logic.qb.D,f=olympe.sc.logic.qb.j;this.Is(d,g=>{var h=g.X();if(h=c.Jb(h,e)||c.Jb(h,f))return Yn(g,a,b.bind(null,h))})}};olympe.sc.Runnable.O=jg(olympe.dc.oa.j('01130000000000ca1100',olympe.sc.Runnable));
1150
1151
  olympe.sc.Runnable.H=olympe.sc.Runnable.O.sa('01692a4af82e8984742b');olympe.sc.Runnable.j=olympe.sc.Runnable.O.sa('01756a18d4921c103111');olympe.sc.Runnable.N=R(olympe.sc.Runnable.O,olympe.sc.Xa.N);olympe.sc.Runnable.R=R(olympe.sc.Runnable.O,olympe.sc.Xa.R);olympe.sc.Runnable.Y=R(olympe.sc.Runnable.O,olympe.sc.Xa.Y);R(olympe.sc.Xa.O,olympe.sc.Runnable.H);R(olympe.sc.Xa.O,olympe.sc.Runnable.j);olympe.sc.Runnable.prototype.xd.K=new olympe.C.J(()=>olympe.sc.Xa,[]);
1151
- olympe.sc.Runnable.prototype.N.K=new olympe.C.J(()=>Object,[]);olympe.sc.Runnable.prototype.Wa.K=olympe.C.J.j;function Zn(a){if(a){if('string'===typeof a)return a;if(a instanceof olympe.sc.Ud)return(a=a.D())?a.valueOf():null;if('function'===typeof a.X)return a.X()}return null}olympe.sc.Ud=class extends olympe.dc.CloudObject{D(){return this.db.cb(this,olympe.sc.Ud.j)[0]}j(){const a=Zn(this);return olympe.dc.CloudObject.get(a)}Cc(){return this.j().Cc()}toString(){const a=Zn(this);let b;a&&(b=this.db.name(a));return b||super.toString()}};olympe.sc.Ud.O=olympe.dc.na.j('0163c9ae01f2d6e9ca49',olympe.sc.Ud);
1152
- olympe.sc.Ud.j=olympe.sc.Ud.O.sa('0169b5a8a33144fb0b49');R(olympe.dc.CloudObject.O,olympe.sc.Ud.j);olympe.sc.Ud.prototype.D.K=new olympe.C.J(()=>String,[]);olympe.sc.Ud.prototype.j.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);olympe.sc.gp=class extends olympe.dm.Lb{ve(){return olympe.sc.xe.Ne.Ch}};olympe.sc.gp.O=olympe.dc.na.j('0163a68ce44f3d1fa84c',olympe.sc.gp);olympe.sc.Ac=class extends olympe.dm.BrickMetadata{};olympe.sc.Ac.O=olympe.dc.na.j('016324fde11a836f76c2',olympe.sc.Ac);olympe.sc.Ac.j=olympe.sc.Ac.O.sa('016324fde11a836087c2');olympe.sc.Ac.O.j=function(a,b){return $l(a,null!=b?b:'New type',olympe.sc.Ac).X()};let $n=null,ao=null,bo=[];
1153
- function co(a,b){$n=a;const c=olympe.C.$a();return olympe.dc.sd.from(a).fb(olympe.sc.qa.Zc.j).fb(olympe.sc.tf.j.$b()).ob({ji:'__code-as-data__'}).then(d=>{let e;null==(e=bo)||e.forEach(f=>f());bo=null;ao=d;if(null!==d){if(b){const f=olympe.dc.ha();return new Promise(g=>{xi(c,d,h=>{h=f.wi(h)?h:f.model(h);return null!==h&&f.Ob(h,olympe.sc.Ac)},{$n:!0}).subscribe(rxjs.Subscriber.create(()=>{g()},()=>{olympe.ia.Ya('sc').error('Impossible to load the business container for the application',a,'maybe are you offline?');
1154
- g()}))})}olympe.ia.Ya('sc').debug("Found business container but won't load it's content according to configuration.")}else olympe.ia.Ya('sc').info(`No business container for application ${a}. You probably miss permissions.`);return Promise.resolve()}).catch(d=>{bo=null;throw d;})}function Lf(){return null===bo?Promise.resolve():new Promise(a=>{bo.push(()=>a())})}olympe.sc.tf=class extends olympe.dc.CloudObject{};olympe.sc.tf.O=olympe.dc.na.j('017b3aa8fae1e3d044dc',olympe.sc.tf);olympe.sc.tf.j=olympe.sc.tf.O.sa('017b3aa8fd1659291b92');
1155
- olympe.sc.tf.D=olympe.sc.tf.O.sa('017b3aa8fe7ec3fd52f2');olympe.sc.Map=class extends olympe.dc.CloudObject{};olympe.sc.Map.O=olympe.dc.na.j('018119241abce0e5696e',olympe.sc.Map);olympe.sc.Pg=class extends olympe.sc.Map{};olympe.sc.Pg.O=olympe.dc.na.j('01631aacd8276ea98490',olympe.sc.Pg);olympe.sc.File=class extends olympe.dm.File{static Bx(a,b,c,d,e,f){e=a.create(olympe.sc.File,new Map,e,f);olympe.sc.File.rt(a,e,b,c,d);return e}static Cx(a,b,c,d,e,f){e=a.create(olympe.sc.File,new Map,e,f);olympe.sc.File.Zn(a,e,b,c,d);return e}static rt(a,b,c,d,e){e=null!=e?e:'application/data';d=URL.createObjectURL(new Blob([d],{type:e}));olympe.sc.File.Zn(a,b,c,d,e)}static Zn(a,b,c,d,e){const f=olympe.dc.ha(),g=f.Ja(b);var h;const k=null!=(h=a.model(b))?h:olympe.sc.File;if(null===k||!f.Uf(k,olympe.dm.File))throw Error(`Try to set the content of an object which is not a file: ${b}`);
1156
- h=new Date;c=(new Map).set(olympe.dm.File.fileNameProp,null!=c?c:'file').set(olympe.dm.File.urlProp,d).set(olympe.dm.File.modificationDateProp,h).set(olympe.dm.File.mimeTypeProp,null!=e?e:'application/data');g&&null!==f.Ra(b,olympe.dm.File.urlProp)||c.set(olympe.dm.File.creationDateProp,h).set(olympe.dm.File.j,!1);a.ht(b,c)}};olympe.sc.File.setURLContent=olympe.sc.File.Zn;olympe.sc.File.setContent=olympe.sc.File.rt;olympe.sc.File.createFromURL=olympe.sc.File.Cx;olympe.sc.File.createFromContent=olympe.sc.File.Bx;
1152
+ olympe.sc.Runnable.prototype.N.K=new olympe.C.J(()=>Object,[]);olympe.sc.Runnable.prototype.Wa.K=olympe.C.J.j;function Zn(a){if(a){if('string'===typeof a)return a;if(a instanceof olympe.sc.Ud)return(a=a.D())?a.valueOf():null;if('function'===typeof a.X)return a.X()}return null}olympe.sc.Ud=class extends olympe.dc.CloudObject{D(){return this.db.cb(this,olympe.sc.Ud.j)[0]}j(){const a=Zn(this);return olympe.dc.CloudObject.get(a)}Cc(){return this.j().Cc()}toString(){const a=Zn(this);let b;a&&(b=this.db.name(a));return b||super.toString()}};olympe.sc.Ud.O=olympe.dc.oa.j('0163c9ae01f2d6e9ca49',olympe.sc.Ud);
1153
+ olympe.sc.Ud.j=olympe.sc.Ud.O.sa('0169b5a8a33144fb0b49');R(olympe.dc.CloudObject.O,olympe.sc.Ud.j);olympe.sc.Ud.prototype.D.K=new olympe.C.J(()=>String,[]);olympe.sc.Ud.prototype.j.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);olympe.sc.hp=class extends olympe.dm.Lb{ve(){return olympe.sc.xe.Ne.Ch}};olympe.sc.hp.O=olympe.dc.oa.j('0163a68ce44f3d1fa84c',olympe.sc.hp);olympe.sc.Ac=class extends olympe.dm.BrickMetadata{};olympe.sc.Ac.O=olympe.dc.oa.j('016324fde11a836f76c2',olympe.sc.Ac);olympe.sc.Ac.j=olympe.sc.Ac.O.sa('016324fde11a836087c2');olympe.sc.Ac.O.j=function(a,b){return $l(a,null!=b?b:'New type',olympe.sc.Ac).X()};let $n=null,ao=null,bo=[];
1154
+ function co(a,b){$n=a;const c=olympe.C.$a();return olympe.dc.sd.from(a).fb(olympe.sc.qa.Zc.j).fb(olympe.sc.tf.j.$b()).ob({ji:'__code-as-data__'}).then(d=>{let e;null==(e=bo)||e.forEach(f=>f());bo=null;ao=d;if(null!==d){if(b){const f=olympe.dc.ha();return new Promise(g=>{xi(c,d,h=>{h=f.wi(h)?h:f.model(h);return null!==h&&f.Ob(h,olympe.sc.Ac)},{ao:!0}).subscribe(rxjs.Subscriber.create(()=>{g()},()=>{olympe.ia.Ya('sc').error('Impossible to load the business container for the application',a,'maybe are you offline?');
1155
+ g()}))})}olympe.ia.Ya('sc').debug("Found business container but won't load it's content according to configuration.")}else olympe.ia.Ya('sc').info(`No business container for application ${a}. You probably miss permissions.`);return Promise.resolve()}).catch(d=>{bo=null;throw d;})}function Lf(){return null===bo?Promise.resolve():new Promise(a=>{bo.push(()=>a())})}olympe.sc.tf=class extends olympe.dc.CloudObject{};olympe.sc.tf.O=olympe.dc.oa.j('017b3aa8fae1e3d044dc',olympe.sc.tf);olympe.sc.tf.j=olympe.sc.tf.O.sa('017b3aa8fd1659291b92');
1156
+ olympe.sc.tf.D=olympe.sc.tf.O.sa('017b3aa8fe7ec3fd52f2');olympe.sc.Map=class extends olympe.dc.CloudObject{};olympe.sc.Map.O=olympe.dc.oa.j('018119241abce0e5696e',olympe.sc.Map);olympe.sc.Pg=class extends olympe.sc.Map{};olympe.sc.Pg.O=olympe.dc.oa.j('01631aacd8276ea98490',olympe.sc.Pg);olympe.sc.File=class extends olympe.dm.File{static Bx(a,b,c,d,e,f){e=a.create(olympe.sc.File,new Map,e,f);olympe.sc.File.rt(a,e,b,c,d);return e}static Cx(a,b,c,d,e,f){e=a.create(olympe.sc.File,new Map,e,f);olympe.sc.File.$n(a,e,b,c,d);return e}static rt(a,b,c,d,e){e=null!=e?e:'application/data';d=URL.createObjectURL(new Blob([d],{type:e}));olympe.sc.File.$n(a,b,c,d,e)}static $n(a,b,c,d,e){const f=olympe.dc.ha(),g=f.Ja(b);var h;const k=null!=(h=a.model(b))?h:olympe.sc.File;if(null===k||!f.Uf(k,olympe.dm.File))throw Error(`Try to set the content of an object which is not a file: ${b}`);
1157
+ h=new Date;c=(new Map).set(olympe.dm.File.fileNameProp,null!=c?c:'file').set(olympe.dm.File.urlProp,d).set(olympe.dm.File.modificationDateProp,h).set(olympe.dm.File.mimeTypeProp,null!=e?e:'application/data');g&&null!==f.Ra(b,olympe.dm.File.urlProp)||c.set(olympe.dm.File.creationDateProp,h).set(olympe.dm.File.j,!1);a.ht(b,c)}};olympe.sc.File.setURLContent=olympe.sc.File.$n;olympe.sc.File.setContent=olympe.sc.File.rt;olympe.sc.File.createFromURL=olympe.sc.File.Cx;olympe.sc.File.createFromContent=olympe.sc.File.Bx;
1157
1158
  olympe.sc.File.O=dg(olympe.dm.File,'ff021000000000000031',olympe.sc.File);olympe.sc.Lg=class extends olympe.sc.File{H(){const a=olympe.C.cc(olympe.C.Ta);this.hl(b=>{a.update(olympe.C.xb(b))});return a.tb()}};olympe.sc.Lg.O=dg(olympe.sc.File,'01644b6297305d62fca2',olympe.sc.Lg);olympe.sc.Lg.O.j=olympe.sc.File.D.bind(null,olympe.sc.Lg);olympe.sc.Lg.prototype.H.K=olympe.C.J.D;olympe.sc.Mc=class extends olympe.sc.File{H(){return this.wb(olympe.sc.Mc.fontFamilyProp)}N(){return this.wb(olympe.sc.Mc.F)}R(){return this.yd(olympe.sc.Mc.H)}};olympe.sc.Mc.O=dg(olympe.sc.File,'01647e113043c637b541',olympe.sc.Mc);olympe.sc.Mc.fontFamilyProp=olympe.sc.Mc.O.ka('01647e35ecd24ef0b88d');olympe.sc.Mc.F=olympe.sc.Mc.O.ka('01647e677f5d1cfbdf42');olympe.sc.Mc.H=olympe.sc.Mc.O.ka('01647e6780999bf8bd25');
1158
- olympe.sc.Mc.O.j=(a,b,c,d)=>{c=olympe.sc.File.D(olympe.sc.Mc,a,b,c,d);a.update(c,olympe.sc.Mc.fontFamilyProp,b.split('.')[0]);return c};olympe.sc.Mc.prototype.H.K=olympe.C.J.D;olympe.sc.Mc.prototype.N.K=olympe.C.J.D;olympe.sc.Mc.prototype.R.K=olympe.C.J.F;olympe.sc.ci=class extends olympe.sc.File{};olympe.sc.ci.O=dg(olympe.sc.File,'0164643c432146a71d5c',olympe.sc.ci);olympe.sc.ci.O.j=olympe.sc.File.D.bind(null,olympe.sc.ci);olympe.sc.ls=class extends olympe.dc.CloudObject{};olympe.sc.ls.O=olympe.dc.na.j('016421bb3797e22d1c4e',olympe.sc.ls);olympe.sc.logic={};olympe.sc.logic.Mp=(a,b)=>a===b?0:a>b?1:-1;
1159
+ olympe.sc.Mc.O.j=(a,b,c,d)=>{c=olympe.sc.File.D(olympe.sc.Mc,a,b,c,d);a.update(c,olympe.sc.Mc.fontFamilyProp,b.split('.')[0]);return c};olympe.sc.Mc.prototype.H.K=olympe.C.J.D;olympe.sc.Mc.prototype.N.K=olympe.C.J.D;olympe.sc.Mc.prototype.R.K=olympe.C.J.F;olympe.sc.ci=class extends olympe.sc.File{};olympe.sc.ci.O=dg(olympe.sc.File,'0164643c432146a71d5c',olympe.sc.ci);olympe.sc.ci.O.j=olympe.sc.File.D.bind(null,olympe.sc.ci);olympe.sc.ls=class extends olympe.dc.CloudObject{};olympe.sc.ls.O=olympe.dc.oa.j('016421bb3797e22d1c4e',olympe.sc.ls);olympe.sc.logic={};olympe.sc.logic.Mp=(a,b)=>a===b?0:a>b?1:-1;
1159
1160
  olympe.sc.logic.YB=(a,b,c,d,e,f,g)=>{const h=b.X();b=olympe.C.Qa(b.getType().X());let k,l;if(b===olympe.dc.fa(olympe.dm.String))k=c.valueOf().toLowerCase(),l=p=>p.wb(h).toLowerCase();else if(b===olympe.dc.fa(olympe.dm.Number))k=c.valueOf(),l=p=>p.yd(h);else if(b===olympe.dc.fa(olympe.dm.DateTime))k=c.getTime(),l=p=>olympe.C.ua([p.Dj(h)],q=>q.getTime(),Number,'FilterList Date&DateTime TransformFlows');else{c=olympe.dc.ha().name(b);g.warn(`Properties of type ${c} are not supported. List will not be filtered.`);e(a);
1160
1161
  return}let n;if('<'===f)n=(p,q)=>olympe.sc.logic.Mp(q,p);else if('>'===f)n=(p,q)=>olympe.sc.logic.Mp(p,q);else{g.error(`Unknown inequality ${f}. Please use '<' or '>'`);return}e(a.bl().filter(p=>olympe.C.ua([l(p)],q=>{q=n(q.valueOf(),k);return olympe.C.Sb(d.valueOf()?1===q:0<=q)},olympe.C.da,'FilterList ListDefBuilder Filter TransformFlows')).Xi())};
1161
- olympe.sc.logic.LE=(a,b)=>{if(a instanceof olympe.C.aa)return a;if(a instanceof olympe.C.Ta)return a.vt();if(a instanceof olympe.C.da)return a.Ss();if('string'===typeof a||'number'===typeof a)return olympe.C.ra(Number(a));b.error(`Could not parse provided value ${a} into a number`);return olympe.C.aa.yq};olympe.sc.logic.Sa={};function eo(a){ig(a.O,(b,c)=>{b=b.create(a.O.D);X(b,olympe.dc.CloudObject.nameProp,c);return b.X()})}olympe.sc.logic.Sa.Ap=class{constructor(a,b,c){this.O=olympe.dc.na.j(a,b,...c);eo(this)}X(){return this.O.X()}};olympe.sc.logic.Sa.Ap.za=[olympe.dc.Ze];const fo=Object.create(null),go=new Map;function ho(a){if(void 0===fo[a])throw Error(`Tag: ${a} - does not correspond to a registered function`);return fg(a)}function io(a,b,c=olympe.sc.logic.Function){if(go.has(a))throw c=ho(a),Error(`Tag: ${a} - overwriting existing function definition "${c.name}" with "${b.name}"`);const d=olympe.dc.na.j(a,b,...[]);go.set(a,{O:d,bF:b,IE:c});return d}
1162
- olympe.sc.logic.na=class{constructor(){}static j(a,b,...c){if(fo[a])throw c=ho(a),Error(`Tag: ${a} - overwriting already defined function "${c.name}" with "${b.name}"`);b=new olympe.sc.logic.Sa.Ap(a,b,[olympe.sc.P.Da].concat(c));return fo[a]=b}};olympe.sc.logic.NA=class{};olympe.sc.logic.ak=class extends olympe.dc.CloudObject{};olympe.sc.logic.ak.O=olympe.dc.na.j('01621fb84e320000cf00',olympe.sc.logic.ak);function pn(a,b,c){return new olympe.sc.logic.Error(a,b,c)}olympe.sc.logic.Error=class extends Error{constructor(a,b,c){super(a);this.code=b;this.j=null!=c?c:null}static create(a,b){return new olympe.sc.logic.Error(a,b)}Dy(){return this.message}Aj(){return this.code}se(){let a;return null!=(a=this.j)?a:''}toString(){return`${this.message}\nError found in:\n${this.se()}\n\n${this.stack}`}};olympe.sc.logic.Error.prototype.getStack=olympe.sc.logic.Error.prototype.se;
1163
- olympe.sc.logic.Error.prototype.getCode=olympe.sc.logic.Error.prototype.Aj;olympe.sc.logic.Error.prototype.getMessage=olympe.sc.logic.Error.prototype.Dy;olympe.sc.logic.Error.create=olympe.sc.logic.Error.create;olympe.sc.logic.Ni=class extends olympe.sc.logic.ak{};olympe.sc.logic.Ni.O=olympe.dc.na.j('016eeb5ede9f3094d8f0',olympe.sc.logic.Ni);olympe.sc.logic.rd=class extends olympe.dc.CloudObject{j(){return this.Sc(olympe.sc.logic.rd.j,olympe.dc.CloudObject)}};olympe.sc.logic.rd.O=olympe.dc.na.j('016ac4f59ee8ea2081ba',olympe.sc.logic.rd);olympe.sc.logic.rd.D=olympe.sc.logic.rd.O.ka('017bc044aeacce7ffc8f');olympe.sc.logic.rd.j=olympe.sc.logic.rd.O.sa('016ac4f5a0091c4790e2');R(olympe.dc.CloudObject.O,olympe.sc.logic.rd.j);olympe.sc.logic.rd.prototype.j.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);olympe.sc.logic.Vh=class extends olympe.sc.logic.rd{};olympe.sc.logic.Vh.O=olympe.dc.na.j('016ac4f59c592b862457',olympe.sc.logic.Vh);olympe.sc.logic.Vh.F=olympe.sc.td.j.$b();olympe.sc.logic.Vh.O.j=(a,b,c,d,e)=>{b=$l(a,b||'New Predefined Input',olympe.sc.logic.Vh,olympe.sc.logic.vb);X(b,olympe.sc.logic.rd.D,e);a.Pa(olympe.sc.logic.rd.j,b,c);a.Pa(olympe.sc.td.j,d,b);return b.X()};olympe.sc.logic.Sg=class extends olympe.sc.logic.rd{};olympe.sc.logic.Sg.O=olympe.dc.na.j('016ac4f59dd99f5df3e1',olympe.sc.logic.Sg);olympe.sc.logic.Sg.F=R(olympe.sc.logic.Sg.O,olympe.sc.td.D);olympe.sc.logic.Sg.O.j=(a,b,c,d,e)=>{b=$l(a,b||'New Predefined Output',olympe.sc.logic.Sg,olympe.sc.logic.Gb);X(b,olympe.sc.logic.rd.D,e);a.Pa(olympe.sc.logic.rd.j,b,c);a.Pa(olympe.sc.td.D,d,b);return b.X()};olympe.sc.logic.Cd=class extends olympe.sc.Xa{ve(){return olympe.sc.xe.Ne.Mr}Y(){return this.Cn().bl().Ob([olympe.sc.logic.Function]).and().Ad().Ob([olympe.sc.logic.od,olympe.sc.logic.gd]).Xi()}N(){const a=olympe.dc.fa(olympe.sc.logic.Ni);return this.db.cb(this,olympe.sc.logic.Cd.D).filter(b=>this.db.Jb(b,olympe.sc.logic.Tb.typeRel)===a)}j(a){const b=this.db.zn(this,[olympe.sc.Xa.F],c=>this.db.model(c)===olympe.dc.fa(a));return b?olympe.dc.CloudObject.get(b):null}D(a){const b=this.db.zn(this,[olympe.sc.Xa.D],
1164
- c=>this.db.model(c)===olympe.dc.fa(a));return b?olympe.dc.CloudObject.get(b):null}H(a){if(!this.vi())return super.H(a);const b=olympe.dc.fa(olympe.sc.logic.ak),c=olympe.dc.fa(olympe.sc.logic.Ni);return Qn(this).map(d=>{switch(this.db.Jb(d,olympe.sc.logic.Tb.typeRel)){case b:return a.co.bind(a,d);case c:return a.throw.bind(a);default:return a.set.bind(a,d)}})}F(a){if(!this.vi())return super.F(a);const b=Pn(this);return 0<b.length?rxjs.combineLatest(b.map(c=>a.observe(c))).pipe(rxjs.operators.map(c=>
1162
+ olympe.sc.logic.LE=(a,b)=>{if(a instanceof olympe.C.aa)return a;if(a instanceof olympe.C.Ta)return a.vt();if(a instanceof olympe.C.da)return a.Ss();if('string'===typeof a||'number'===typeof a)return olympe.C.ra(Number(a));b.error(`Could not parse provided value ${a} into a number`);return olympe.C.aa.yq};olympe.sc.logic.Sa={};function eo(a){ig(a.O,(b,c)=>{b=b.create(a.O.D);X(b,olympe.dc.CloudObject.nameProp,c);return b.X()})}olympe.sc.logic.Sa.Ap=class{constructor(a,b,c){this.O=olympe.dc.oa.j(a,b,...c);eo(this)}X(){return this.O.X()}};olympe.sc.logic.Sa.Ap.za=[olympe.dc.Ze];const fo=Object.create(null),go=new Map;function ho(a){if(void 0===fo[a])throw Error(`Tag: ${a} - does not correspond to a registered function`);return fg(a)}function io(a,b,c=olympe.sc.logic.Function){if(go.has(a))throw c=ho(a),Error(`Tag: ${a} - overwriting existing function definition "${c.name}" with "${b.name}"`);const d=olympe.dc.oa.j(a,b,...[]);go.set(a,{O:d,bF:b,IE:c});return d}
1163
+ olympe.sc.logic.oa=class{constructor(){}static j(a,b,...c){if(fo[a])throw c=ho(a),Error(`Tag: ${a} - overwriting already defined function "${c.name}" with "${b.name}"`);b=new olympe.sc.logic.Sa.Ap(a,b,[olympe.sc.P.Da].concat(c));return fo[a]=b}};olympe.sc.logic.NA=class{};olympe.sc.logic.ak=class extends olympe.dc.CloudObject{};olympe.sc.logic.ak.O=olympe.dc.oa.j('01621fb84e320000cf00',olympe.sc.logic.ak);function pn(a,b,c){return new olympe.sc.logic.Error(a,b,c)}olympe.sc.logic.Error=class extends Error{constructor(a,b,c){super(a);this.code=b;this.j=null!=c?c:null}static create(a,b){return new olympe.sc.logic.Error(a,b)}Dy(){return this.message}Aj(){return this.code}se(){let a;return null!=(a=this.j)?a:''}toString(){return`${this.message}\nError found in:\n${this.se()}\n\n${this.stack}`}};olympe.sc.logic.Error.prototype.getStack=olympe.sc.logic.Error.prototype.se;
1164
+ olympe.sc.logic.Error.prototype.getCode=olympe.sc.logic.Error.prototype.Aj;olympe.sc.logic.Error.prototype.getMessage=olympe.sc.logic.Error.prototype.Dy;olympe.sc.logic.Error.create=olympe.sc.logic.Error.create;olympe.sc.logic.Ni=class extends olympe.sc.logic.ak{};olympe.sc.logic.Ni.O=olympe.dc.oa.j('016eeb5ede9f3094d8f0',olympe.sc.logic.Ni);olympe.sc.logic.rd=class extends olympe.dc.CloudObject{j(){return this.Sc(olympe.sc.logic.rd.j,olympe.dc.CloudObject)}};olympe.sc.logic.rd.O=olympe.dc.oa.j('016ac4f59ee8ea2081ba',olympe.sc.logic.rd);olympe.sc.logic.rd.D=olympe.sc.logic.rd.O.ka('017bc044aeacce7ffc8f');olympe.sc.logic.rd.j=olympe.sc.logic.rd.O.sa('016ac4f5a0091c4790e2');R(olympe.dc.CloudObject.O,olympe.sc.logic.rd.j);olympe.sc.logic.rd.prototype.j.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);olympe.sc.logic.Vh=class extends olympe.sc.logic.rd{};olympe.sc.logic.Vh.O=olympe.dc.oa.j('016ac4f59c592b862457',olympe.sc.logic.Vh);olympe.sc.logic.Vh.F=olympe.sc.td.j.$b();olympe.sc.logic.Vh.O.j=(a,b,c,d,e)=>{b=$l(a,b||'New Predefined Input',olympe.sc.logic.Vh,olympe.sc.logic.vb);X(b,olympe.sc.logic.rd.D,e);a.Pa(olympe.sc.logic.rd.j,b,c);a.Pa(olympe.sc.td.j,d,b);return b.X()};olympe.sc.logic.Sg=class extends olympe.sc.logic.rd{};olympe.sc.logic.Sg.O=olympe.dc.oa.j('016ac4f59dd99f5df3e1',olympe.sc.logic.Sg);olympe.sc.logic.Sg.F=R(olympe.sc.logic.Sg.O,olympe.sc.td.D);olympe.sc.logic.Sg.O.j=(a,b,c,d,e)=>{b=$l(a,b||'New Predefined Output',olympe.sc.logic.Sg,olympe.sc.logic.Gb);X(b,olympe.sc.logic.rd.D,e);a.Pa(olympe.sc.logic.rd.j,b,c);a.Pa(olympe.sc.td.D,d,b);return b.X()};olympe.sc.logic.Cd=class extends olympe.sc.Xa{ve(){return olympe.sc.xe.Ne.Mr}Y(){return this.Dn().bl().Ob([olympe.sc.logic.Function]).and().Ad().Ob([olympe.sc.logic.od,olympe.sc.logic.gd]).Xi()}N(){const a=olympe.dc.fa(olympe.sc.logic.Ni);return this.db.cb(this,olympe.sc.logic.Cd.D).filter(b=>this.db.Jb(b,olympe.sc.logic.Tb.typeRel)===a)}j(a){const b=this.db.An(this,[olympe.sc.Xa.F],c=>this.db.model(c)===olympe.dc.fa(a));return b?olympe.dc.CloudObject.get(b):null}D(a){const b=this.db.An(this,[olympe.sc.Xa.D],
1165
+ c=>this.db.model(c)===olympe.dc.fa(a));return b?olympe.dc.CloudObject.get(b):null}H(a){if(!this.vi())return super.H(a);const b=olympe.dc.fa(olympe.sc.logic.ak),c=olympe.dc.fa(olympe.sc.logic.Ni);return Qn(this).map(d=>{switch(this.db.Jb(d,olympe.sc.logic.Tb.typeRel)){case b:return a.eo.bind(a,d);case c:return a.throw.bind(a);default:return a.set.bind(a,d)}})}F(a){if(!this.vi())return super.F(a);const b=Pn(this);return 0<b.length?rxjs.combineLatest(b.map(c=>a.observe(c))).pipe(rxjs.operators.map(c=>
1165
1166
  c.includes(null)?null:c)):rxjs.of([])}};olympe.sc.logic.Cd.O=io('01621fb84e320000f000',olympe.sc.logic.Cd,olympe.sc.logic.Function);olympe.sc.logic.Cd.prototype.j.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);olympe.sc.logic.Cd.prototype.D.K=new olympe.C.J(()=>olympe.sc.logic.Gb,[]);let jo=null;function ko(){if(null===jo){let a;jo=null!=(a=olympe.W.getParameter('sc.action.experimental'))?a:!1}return jo}
1166
- olympe.sc.logic.ag=class extends olympe.sc.logic.Cd{R(){return this.j('016ac63229782039429f')}$(){return this.D('016ac6322acf67eebfe7')}ea(){return this.mq().bl().fb(olympe.sc.logic.Tb.typeRel).ol(olympe.sc.logic.Ni).Xi().Cf().On(olympe.C.aa.ZERO)}F(a){if(this.vi()||ko()){const b=this.R().X();return a.observe(b).pipe(rxjs.operators.map(c=>null===c?null:Pn(this).filter(d=>d!==b).map(d=>a.get(d))))}return super.F(a)}};olympe.sc.logic.ag.j='016ac63229782039429f';olympe.sc.logic.ag.H='016ac6322acf67eebfe7';
1167
- olympe.sc.logic.ag.O=io('01621fb84e320000a000',olympe.sc.logic.ag,olympe.sc.logic.Action);olympe.sc.logic.ag.prototype.R.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);olympe.sc.logic.ag.prototype.$.K=new olympe.C.J(()=>olympe.sc.logic.Gb,[]);olympe.sc.logic.ag.prototype.ea.K=olympe.C.J.N;olympe.sc.logic.Ro=class extends olympe.sc.logic.Cd{};olympe.sc.logic.Ro.O=io('01621fb84e320000f011',olympe.sc.logic.Ro);olympe.sc.logic.Qo=class extends olympe.sc.logic.ag{};olympe.sc.logic.Qo.O=io('01621fb84e320000f012',olympe.sc.logic.Qo);olympe.sc.logic.Function=class extends olympe.sc.Runnable{R(){return[this.mb]}D(){if(!this.xd().vi())return super.D();const a=olympe.sc.Gg.j.pm,b=olympe.sc.Gg.j.Hm,c=this.db,d=new Map,e=this.ac();c.cb(e,olympe.sc.Xa.F).forEach(f=>{d.set(a+c.name(f),f)});c.cb(e,olympe.sc.Xa.D).forEach(f=>{d.set(b+c.name(f),f)});return d}};olympe.sc.logic.Function.O=olympe.dc.na.j('0168c6f020f2a96f0000',olympe.sc.logic.Function,olympe.sc.P.Da);olympe.sc.logic.Tb=class extends olympe.dc.CloudObject{getType(){return this.Sc(olympe.sc.logic.Tb.typeRel,olympe.dc.CloudObject)}j(){return this.yd(olympe.sc.logic.Tb.j)}};olympe.sc.logic.Tb.O=olympe.dc.na.j('0168a431d25001540000',olympe.sc.logic.Tb);olympe.sc.logic.Tb.j=olympe.sc.logic.Tb.O.ka('01740c5d4ae4b520dd01');olympe.sc.logic.Tb.typeRel=olympe.sc.logic.Tb.O.sa('0168a431d3b9b7438424');R(olympe.dc.CloudObject.O,olympe.sc.logic.Tb.typeRel);
1168
- olympe.sc.logic.Tb.prototype.getType.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);olympe.sc.logic.Tb.prototype.j.K=olympe.C.J.F;olympe.sc.logic.vb=class extends olympe.sc.logic.Tb{};olympe.sc.logic.vb.O=olympe.dc.na.j('0168a431d25001540001',olympe.sc.logic.vb);olympe.sc.logic.vb.R=olympe.sc.logic.Tb.O.ka('01740c5d4ae4b520dd02');olympe.sc.logic.vb.N=R(olympe.sc.logic.vb.O,olympe.sc.Xa.F);olympe.sc.logic.vb.D=olympe.sc.logic.vb.O.sa('0168a431d91f2578000b',olympe.dc.va.ORIGIN);olympe.sc.logic.vb.F=olympe.sc.logic.vb.O.sa('01621fb84e32000000a1',olympe.dc.va.ORIGIN);
1169
- olympe.sc.logic.vb.H=olympe.sc.logic.vb.O.sa('01621fb84e32000000d1',olympe.dc.va.ORIGIN);olympe.sc.logic.vb.O.j=function(a,b,c,d,e,f=olympe.sc.logic.vb){f=a.create(f);X(f,olympe.dc.CloudObject.nameProp,b||'New input');a.Pa(olympe.sc.logic.Tb.typeRel,f,c);void 0!==e&&X(f,olympe.sc.logic.Tb.j,e);d&&a.Pa(olympe.sc.Xa.F,d,f);return f.X()};olympe.sc.logic.Gb=class extends olympe.sc.logic.Tb{};olympe.sc.logic.Gb.O=olympe.dc.na.j('0168a431d25001540002',olympe.sc.logic.Gb);olympe.sc.logic.Gb.N=R(olympe.sc.logic.Gb.O,olympe.sc.Xa.D);olympe.sc.logic.Gb.D=olympe.sc.logic.Gb.O.sa('0168a431d91f25780003',olympe.dc.va.ORIGIN);olympe.sc.logic.Gb.H=olympe.sc.logic.Gb.O.sa('01621fb84e32000000a2',olympe.dc.va.ORIGIN);olympe.sc.logic.Gb.F=olympe.sc.logic.Gb.O.sa('01621fb84e32000000d2',olympe.dc.va.ORIGIN);
1170
- olympe.sc.logic.Gb.O.j=function(a,b,c,d,e,f=olympe.sc.logic.Gb){f=a.create(f);X(f,olympe.dc.CloudObject.nameProp,b||'New output');a.Pa(olympe.sc.logic.Tb.typeRel,f,c);void 0!==e&&X(f,olympe.sc.logic.Tb.j,e);d&&a.Pa(olympe.sc.Xa.D,d,f);return f.X()};olympe.sc.logic.od=class extends olympe.sc.logic.Function{run(a){Sn(this,a);const b=a.getParent(),c=this.db.Jb(this,olympe.sc.logic.od.F),d=this.db.Jb(this,olympe.sc.logic.od.D);a.on(c,e=>b.set(d,e),this.tag)}j(){return this.wg(olympe.sc.logic.od.F).Hc()}ta(){return this.wg(olympe.sc.logic.od.D).Hc()}};olympe.sc.logic.od.O=olympe.dc.na.j('01621fb84e32000000a0',olympe.sc.logic.od,olympe.sc.P.Da);olympe.sc.logic.od.F=R(olympe.sc.logic.od.O,olympe.sc.logic.vb.F);
1171
- olympe.sc.logic.od.D=R(olympe.sc.logic.od.O,olympe.sc.logic.Gb.H);olympe.sc.logic.od.O.j=function(a,b,c){b=a.create(olympe.sc.logic.od);a.Pa(olympe.sc.logic.od.D,b,c);return b.X()};olympe.sc.logic.od.prototype.j.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);olympe.sc.logic.od.prototype.ta.K=new olympe.C.J(()=>olympe.sc.logic.Gb,[]);olympe.sc.logic.gd=class extends olympe.sc.logic.Function{run(a){const b=a.getParent(),c=this.db.Jb(this,olympe.sc.logic.gd.D),d=this.db.Jb(this,olympe.sc.logic.gd.F);b.on(c,e=>a.set(d,e),b.T())}ta(){return this.wg(olympe.sc.logic.gd.D).Hc()}j(){return this.wg(olympe.sc.logic.gd.F).Hc()}};olympe.sc.logic.gd.O=olympe.dc.na.j('01621fb84e32000000d0',olympe.sc.logic.gd,olympe.sc.P.Da);olympe.sc.logic.gd.D=R(olympe.sc.logic.gd.O,olympe.sc.logic.vb.H);olympe.sc.logic.gd.F=R(olympe.sc.logic.gd.O,olympe.sc.logic.Gb.F);
1167
+ olympe.sc.logic.ag=class extends olympe.sc.logic.Cd{R(){return this.j('016ac63229782039429f')}$(){return this.D('016ac6322acf67eebfe7')}ea(){return this.mq().bl().fb(olympe.sc.logic.Tb.typeRel).ol(olympe.sc.logic.Ni).Xi().Cf().Pn(olympe.C.aa.ZERO)}F(a){if(this.vi()||ko()){const b=this.R().X();return a.observe(b).pipe(rxjs.operators.map(c=>null===c?null:Pn(this).filter(d=>d!==b).map(d=>a.get(d))))}return super.F(a)}};olympe.sc.logic.ag.j='016ac63229782039429f';olympe.sc.logic.ag.H='016ac6322acf67eebfe7';
1168
+ olympe.sc.logic.ag.O=io('01621fb84e320000a000',olympe.sc.logic.ag,olympe.sc.logic.Action);olympe.sc.logic.ag.prototype.R.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);olympe.sc.logic.ag.prototype.$.K=new olympe.C.J(()=>olympe.sc.logic.Gb,[]);olympe.sc.logic.ag.prototype.ea.K=olympe.C.J.N;olympe.sc.logic.So=class extends olympe.sc.logic.Cd{};olympe.sc.logic.So.O=io('01621fb84e320000f011',olympe.sc.logic.So);olympe.sc.logic.Ro=class extends olympe.sc.logic.ag{};olympe.sc.logic.Ro.O=io('01621fb84e320000f012',olympe.sc.logic.Ro);olympe.sc.logic.Function=class extends olympe.sc.Runnable{R(){return[this.mb]}D(){if(!this.xd().vi())return super.D();const a=olympe.sc.Gg.j.qm,b=olympe.sc.Gg.j.Im,c=this.db,d=new Map,e=this.ac();c.cb(e,olympe.sc.Xa.F).forEach(f=>{d.set(a+c.name(f),f)});c.cb(e,olympe.sc.Xa.D).forEach(f=>{d.set(b+c.name(f),f)});return d}};olympe.sc.logic.Function.O=olympe.dc.oa.j('0168c6f020f2a96f0000',olympe.sc.logic.Function,olympe.sc.P.Da);olympe.sc.logic.Tb=class extends olympe.dc.CloudObject{getType(){return this.Sc(olympe.sc.logic.Tb.typeRel,olympe.dc.CloudObject)}j(){return this.yd(olympe.sc.logic.Tb.j)}};olympe.sc.logic.Tb.O=olympe.dc.oa.j('0168a431d25001540000',olympe.sc.logic.Tb);olympe.sc.logic.Tb.j=olympe.sc.logic.Tb.O.ka('01740c5d4ae4b520dd01');olympe.sc.logic.Tb.typeRel=olympe.sc.logic.Tb.O.sa('0168a431d3b9b7438424');R(olympe.dc.CloudObject.O,olympe.sc.logic.Tb.typeRel);
1169
+ olympe.sc.logic.Tb.prototype.getType.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);olympe.sc.logic.Tb.prototype.j.K=olympe.C.J.F;olympe.sc.logic.vb=class extends olympe.sc.logic.Tb{};olympe.sc.logic.vb.O=olympe.dc.oa.j('0168a431d25001540001',olympe.sc.logic.vb);olympe.sc.logic.vb.R=olympe.sc.logic.Tb.O.ka('01740c5d4ae4b520dd02');olympe.sc.logic.vb.N=R(olympe.sc.logic.vb.O,olympe.sc.Xa.F);olympe.sc.logic.vb.D=olympe.sc.logic.vb.O.sa('0168a431d91f2578000b',olympe.dc.va.ORIGIN);olympe.sc.logic.vb.F=olympe.sc.logic.vb.O.sa('01621fb84e32000000a1',olympe.dc.va.ORIGIN);
1170
+ olympe.sc.logic.vb.H=olympe.sc.logic.vb.O.sa('01621fb84e32000000d1',olympe.dc.va.ORIGIN);olympe.sc.logic.vb.O.j=function(a,b,c,d,e,f=olympe.sc.logic.vb){f=a.create(f);X(f,olympe.dc.CloudObject.nameProp,b||'New input');a.Pa(olympe.sc.logic.Tb.typeRel,f,c);void 0!==e&&X(f,olympe.sc.logic.Tb.j,e);d&&a.Pa(olympe.sc.Xa.F,d,f);return f.X()};olympe.sc.logic.Gb=class extends olympe.sc.logic.Tb{};olympe.sc.logic.Gb.O=olympe.dc.oa.j('0168a431d25001540002',olympe.sc.logic.Gb);olympe.sc.logic.Gb.N=R(olympe.sc.logic.Gb.O,olympe.sc.Xa.D);olympe.sc.logic.Gb.D=olympe.sc.logic.Gb.O.sa('0168a431d91f25780003',olympe.dc.va.ORIGIN);olympe.sc.logic.Gb.H=olympe.sc.logic.Gb.O.sa('01621fb84e32000000a2',olympe.dc.va.ORIGIN);olympe.sc.logic.Gb.F=olympe.sc.logic.Gb.O.sa('01621fb84e32000000d2',olympe.dc.va.ORIGIN);
1171
+ olympe.sc.logic.Gb.O.j=function(a,b,c,d,e,f=olympe.sc.logic.Gb){f=a.create(f);X(f,olympe.dc.CloudObject.nameProp,b||'New output');a.Pa(olympe.sc.logic.Tb.typeRel,f,c);void 0!==e&&X(f,olympe.sc.logic.Tb.j,e);d&&a.Pa(olympe.sc.Xa.D,d,f);return f.X()};olympe.sc.logic.od=class extends olympe.sc.logic.Function{run(a){Sn(this,a);const b=a.getParent(),c=this.db.Jb(this,olympe.sc.logic.od.F),d=this.db.Jb(this,olympe.sc.logic.od.D);a.on(c,e=>b.set(d,e),this.tag)}j(){return this.wg(olympe.sc.logic.od.F).Hc()}ta(){return this.wg(olympe.sc.logic.od.D).Hc()}};olympe.sc.logic.od.O=olympe.dc.oa.j('01621fb84e32000000a0',olympe.sc.logic.od,olympe.sc.P.Da);olympe.sc.logic.od.F=R(olympe.sc.logic.od.O,olympe.sc.logic.vb.F);
1172
+ olympe.sc.logic.od.D=R(olympe.sc.logic.od.O,olympe.sc.logic.Gb.H);olympe.sc.logic.od.O.j=function(a,b,c){b=a.create(olympe.sc.logic.od);a.Pa(olympe.sc.logic.od.D,b,c);return b.X()};olympe.sc.logic.od.prototype.j.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);olympe.sc.logic.od.prototype.ta.K=new olympe.C.J(()=>olympe.sc.logic.Gb,[]);olympe.sc.logic.gd=class extends olympe.sc.logic.Function{run(a){const b=a.getParent(),c=this.db.Jb(this,olympe.sc.logic.gd.D),d=this.db.Jb(this,olympe.sc.logic.gd.F);b.on(c,e=>a.set(d,e),b.T())}ta(){return this.wg(olympe.sc.logic.gd.D).Hc()}j(){return this.wg(olympe.sc.logic.gd.F).Hc()}};olympe.sc.logic.gd.O=olympe.dc.oa.j('01621fb84e32000000d0',olympe.sc.logic.gd,olympe.sc.P.Da);olympe.sc.logic.gd.D=R(olympe.sc.logic.gd.O,olympe.sc.logic.vb.H);olympe.sc.logic.gd.F=R(olympe.sc.logic.gd.O,olympe.sc.logic.Gb.F);
1172
1173
  olympe.sc.logic.gd.O.j=function(a,b,c){b=a.create(olympe.sc.logic.gd);a.Pa(olympe.sc.logic.gd.D,b,c);return b.X()};olympe.sc.logic.gd.prototype.ta.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);olympe.sc.logic.gd.prototype.j.K=new olympe.C.J(()=>olympe.sc.logic.Gb,[]);function Yn(a,b,c){var d;const e=null!=(d=a.db.Jb(a,olympe.sc.logic.qb.R))?d:a.db.Jb(a,olympe.sc.logic.qb.H),f=a.db.Jb(a,olympe.sc.logic.qb.N);if(null!==e&&null!==f){d=a.db.Uf(lo(a),olympe.dm.Ie)?new olympe.C.Wb('Pipe Context'):null;const k=a.j.bind(a,c,d);let l;const n=b.ul(f,p=>{let q;null==(q=l)||q();l=p.on(e,k,f)});return()=>{k(null);n();let p;null==(p=l)||p()}}const g=k=>c(olympe.dc.nb.Cc(k)),h=gh(a.db,a,olympe.sc.logic.qb.valueProp,g);return()=>{g(null);hh(a.db,a,olympe.sc.logic.qb.valueProp,
1173
1174
  h)}}function lo(a){let b=null,c=a.db.Jb(a,olympe.sc.logic.qb.D);c?b=a.db.Jb(c,olympe.dm.Property.typeRel):(c=a.db.Jb(a,olympe.sc.logic.qb.j))&&(b=a.db.Jb(c,olympe.sc.logic.Tb.typeRel));return b||olympe.dc.fa(olympe.dc.CloudObject)}
1174
1175
  olympe.sc.logic.qb=class extends olympe.dc.CloudObject{constructor(a,b,c){super(a,b);this.G=c}j(a,b,c){const d=olympe.sc.tj(c);null==b||b.sg();b&&d instanceof olympe.dm.Ie?null==b||b.run(()=>{olympe.C.Vc([d.getValue()],e=>{a(e.valueOf())})}):a(d)}getValue(a){return this.Tf(olympe.sc.logic.qb.valueProp,a||olympe.dc.nb.tj,Object)}getType(){const a=this.transform(olympe.sc.logic.qb.j,olympe.sc.logic.Tb.typeRel);a.Rd(olympe.dc.CloudObject);return a.Ic()}Vy(){return this.Sc(olympe.sc.logic.qb.N,olympe.dc.CloudObject)}Ty(){return this.Sc(olympe.sc.logic.qb.R,
1175
- olympe.sc.logic.Gb)}Uy(){return this.Sc(olympe.sc.logic.qb.H,olympe.dm.Property)}py(){return this.Sc(olympe.sc.logic.qb.F,olympe.dc.CloudObject)}ny(){return this.Sc(olympe.sc.logic.qb.j,olympe.sc.logic.vb)}oy(){return this.Sc(olympe.sc.logic.qb.D,olympe.dm.Property)}};olympe.sc.logic.qb.O=olympe.dc.na.j('0168a431d91f25780000',olympe.sc.logic.qb,olympe.sc.P.Da);olympe.sc.logic.qb.valueProp=olympe.sc.logic.qb.O.ka('0168a431d91f25780001');olympe.sc.logic.qb.N=olympe.sc.logic.qb.O.sa('0168a431d91f25780002');
1176
+ olympe.sc.logic.Gb)}Uy(){return this.Sc(olympe.sc.logic.qb.H,olympe.dm.Property)}py(){return this.Sc(olympe.sc.logic.qb.F,olympe.dc.CloudObject)}ny(){return this.Sc(olympe.sc.logic.qb.j,olympe.sc.logic.vb)}oy(){return this.Sc(olympe.sc.logic.qb.D,olympe.dm.Property)}};olympe.sc.logic.qb.O=olympe.dc.oa.j('0168a431d91f25780000',olympe.sc.logic.qb,olympe.sc.P.Da);olympe.sc.logic.qb.valueProp=olympe.sc.logic.qb.O.ka('0168a431d91f25780001');olympe.sc.logic.qb.N=olympe.sc.logic.qb.O.sa('0168a431d91f25780002');
1176
1177
  olympe.sc.logic.qb.R=R(olympe.sc.logic.qb.O,olympe.sc.logic.Gb.D);olympe.sc.logic.qb.H=olympe.sc.logic.qb.O.sa('0168a431d91f25780004');olympe.sc.logic.qb.F=olympe.sc.logic.qb.O.sa('0168a431d91f2578000a');olympe.sc.logic.qb.j=R(olympe.sc.logic.qb.O,olympe.sc.logic.vb.D);olympe.sc.logic.qb.D=olympe.sc.logic.qb.O.sa('0168a431d91f2578000c');R(olympe.dc.CloudObject.O,olympe.sc.logic.qb.N);R(olympe.dm.Property.O,olympe.sc.logic.qb.H);R(olympe.dc.CloudObject.O,olympe.sc.logic.qb.F);
1177
- R(olympe.dm.Property.O,olympe.sc.logic.qb.D);m=olympe.sc.logic.qb.prototype;m.getType.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);m.Vy.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);m.Ty.K=new olympe.C.J(()=>olympe.sc.logic.Gb,[]);m.Uy.K=new olympe.C.J(()=>olympe.dm.Property,[]);m.py.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);m.ny.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);m.oy.K=new olympe.C.J(()=>olympe.dm.Property,[]);function mo(a,b){const c=a.xd(),d=c.um().X(),e=c.vm().X(),f=c.wm().X();b.on(d,g=>{if(g){g=new Map(a.getInputs().map(k=>[k,b.get(k)]));const h={timeout:a.timeout};olympe.L.rb.get(a.ac(),g,h).then(k=>{for(const [l,n]of k)l!==e&&l!==f&&b.set(l,n);b.set(e,k.get(e));k=k.get(f);k instanceof olympe.sc.logic.Error&&(k=pn(k.message,k.Aj(),k.se()+'\n===== Remote Call =====\n'+b.se()),b.throw(k))}).catch(k=>{k=`RemoteAction "${a.Vb().name()}" (${a.tag}) encountered an error:\n${k}`;a.G.error(k);b.throw(olympe.sc.logic.Error.create(k,
1178
+ R(olympe.dm.Property.O,olympe.sc.logic.qb.D);m=olympe.sc.logic.qb.prototype;m.getType.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);m.Vy.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);m.Ty.K=new olympe.C.J(()=>olympe.sc.logic.Gb,[]);m.Uy.K=new olympe.C.J(()=>olympe.dm.Property,[]);m.py.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);m.ny.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);m.oy.K=new olympe.C.J(()=>olympe.dm.Property,[]);function mo(a,b){const c=a.xd(),d=c.vm().X(),e=c.wm().X(),f=c.xm().X();b.on(d,g=>{if(g){g=new Map(a.getInputs().map(k=>[k,b.get(k)]));const h={timeout:a.timeout};olympe.L.rb.get(a.ac(),g,h).then(k=>{for(const [l,n]of k)l!==e&&l!==f&&b.set(l,n);b.set(e,k.get(e));k=k.get(f);k instanceof olympe.sc.logic.Error&&(k=pn(k.message,k.Aj(),k.se()+'\n===== Remote Call =====\n'+b.se()),b.throw(k))}).catch(k=>{k=`RemoteAction "${a.Vb().name()}" (${a.tag}) encountered an error:\n${k}`;a.G.error(k);b.throw(olympe.sc.logic.Error.create(k,
1178
1179
  400))})}},b.T())}function no(a,b){const c=a.j.ja(()=>new Promise(d=>{b.onDestroy(()=>d())}),void 0,a.timeout);b.onDestroy(()=>a.j.F(c))}
1179
1180
  function oo(a,b,c,d,e,f){const g=n=>u(function*(){if(null!==n){e.cancel();let p;null==(p=k)||p();let q;null==(q=l)||q();try{const r=new Map(a.getOutputs().map(t=>[t,b.get(t)]));yield f.dd(r)}catch(r){const t=Error(`Error while trying to send the response of remote action ${a.Vb().name()} (${a.ac()}): ${r}`);f.mi(t).catch(v=>{a.G.error(`Cannot reply with an error to a remote action call ${a.Vb().name()} (${a.ac()}): ${v}`)})}finally{b.destroy()}}}),h=b.T(),k=b.on(c,g,h),l=b.on(d,g,h)}
1180
- olympe.sc.logic.Yh=class extends olympe.sc.logic.Function{constructor(a,b,c,d,e){super(a,b,c);this.timeout=e;this.j=d}run(a){let b;null!=(b=a.Qa(olympe.sc.ya.j.EDITION))&&b||(this.db.Ra(this,olympe.sc.logic.Yh.D)?(Dn(a.state,this),this.ta(a)):(Sn(this,a),mo(this,a)))}ta(a){const b=this.ac(),c=this.xd(),d=c.nq().X(),e=c.um().X(),f=c.vm().X(),g=c.wm().X(),h=new olympe.L.rb(b,a);this.j.ja(()=>u(function*(){return h.stop()}),`RemoteAction_${this.tag}`);h.listen().subscribe(rxjs.Subscriber.create(k=>{const l=
1181
+ olympe.sc.logic.Yh=class extends olympe.sc.logic.Function{constructor(a,b,c,d,e){super(a,b,c);this.timeout=e;this.j=d}run(a){let b;null!=(b=a.Qa(olympe.sc.ya.j.EDITION))&&b||(this.db.Ra(this,olympe.sc.logic.Yh.D)?(Dn(a.state,this),this.ta(a)):(Sn(this,a),mo(this,a)))}ta(a){const b=this.ac(),c=this.xd(),d=c.nq().X(),e=c.vm().X(),f=c.wm().X(),g=c.xm().X(),h=new olympe.L.rb(b,a);this.j.ja(()=>u(function*(){return h.stop()}),`RemoteAction_${this.tag}`);h.listen().subscribe(rxjs.Subscriber.create(k=>{const l=
1181
1182
  a.ki('remote call'),n=k.body();l.set(olympe.sc.ya.j.REDELIVERED,k.xi());no(this,l);const p=Cc(()=>{k.mi(Error(`Timeout reached on remote action ${this.db.name(this)} (${this.tag})`)).catch();l.destroy()},this.timeout);oo(this,l,f,g,p,k);super.run(l);for(const [q,r]of n)q!==e&&l.set(q,r);k.Bi().then(q=>{var r=l.get(d);null!==r&&olympe.dc.fa(r)!==q&&(r=this.ac(),this.G.warn(`Remote action ${this.db.name(r)} ${r}: try to run it with an input user that is not the real authenticated user.`));l.set(d,q);
1182
- l.set(e,n.get(e))}).catch(q=>{const r=this.ac();this.G.warn(`Remote action ${this.db.name(r)} ${r} Triggered by unrecognized user: ${q}.`);l.set(g,olympe.sc.logic.Error.create('Unrecognized User',1))})},k=>{const l=this.ac();this.G.error(`Error while listening on remote action ${this.db.name(l)} (${l}): ${k.message}`)}))}};olympe.sc.logic.Yh.O=olympe.dc.na.j('017a7b0c5dcbd8964c5d',olympe.sc.logic.Yh,olympe.sc.P.Da,olympe.host.P.Ge,new olympe.W.pa(olympe.sc.U.qr));olympe.sc.logic.Yh.D=olympe.sc.logic.Yh.O.ka('017a7b0c62a02a89444f');olympe.sc.logic.controllers={};olympe.sc.logic.controllers.qm=class{constructor(a){this.db=olympe.dc.ha();this.typeRel=a}};olympe.sc.logic.controllers.qm.j={QA:-1,QB:1};olympe.sc.logic.controllers.IC=class extends olympe.sc.logic.controllers.qm{constructor(){super(olympe.sc.logic.rd.j)}};olympe.sc.logic.controllers.RC=class extends olympe.sc.logic.controllers.qm{constructor(){super(olympe.sc.logic.Tb.typeRel)}};olympe.sc.logic.fl={};olympe.sc.logic.fl.Bw=class extends olympe.sc.logic.Function{update(a,[b],[c]){const d=olympe.dc.fa(b);d?olympe.dc.ma.Pb(a,d,olympe.dc.Mb.kg).subscribe(()=>{c(olympe.dc.CloudObject.get(d))}):this.G.warn('Cannot subscribe to an instance with no tag: '+d)}};olympe.sc.logic.na.j('0174bf4b7e006e4b788a',olympe.sc.logic.fl.Bw);olympe.sc.logic.actions={};olympe.sc.logic.fl.vv=class extends olympe.sc.logic.Function{run(a){Sn(this,a);const [b,c,d]=Wn(this,a);let e,f=null,g=null;const h=a.getParent(),k=()=>{null===g||0===e?(this.G.warn('No list to iter upon'),this.G.info(a.T())):f<e?(b(g.mf(f)),f++,c(Date.now())):(Fn(h.state),d(Date.now()))};this.getInputs().forEach((l,n)=>a.on(l,p=>{if(p)switch(n){case 0:g=p;break;case 1:e=g.xg();f=0;En(h.state);k();break;case 2:k();break;default:this.G.error('Unhandled input')}},this.tag))}};
1183
- olympe.sc.logic.na.j('0171889b060b6cd54300',olympe.sc.logic.fl.vv);olympe.sc.logic.Rb={};olympe.sc.logic.Rb.fm=class extends olympe.sc.logic.Cd{R(){return this.j('016ac638085357047a2d')}};olympe.sc.logic.Rb.fm.O=io('0169b6876a03f14ae61b',olympe.sc.logic.Rb.fm);olympe.sc.logic.Rb.fm.prototype.R.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);let po=null;olympe.sc.logic.Rb.sm=class extends olympe.sc.logic.Cd{R(){return this.j('016ac63808535703691c')}F(a){if(null===po){let b;po=null!=(b=olympe.W.getParameter('sc.event.experimental'))?b:!1}return po?a.observe(Pn(this)[0]):super.F(a)}};olympe.sc.logic.Rb.sm.O=io('0169b6876a03f139d50a',olympe.sc.logic.Rb.sm);olympe.sc.logic.Rb.sm.prototype.R.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);olympe.sc.logic.Rb.Im=class extends olympe.sc.logic.Cd{R(){return this.j('016ac63809a9a8e6db96')}$(){return this.D('016ac6380ab003363b3e')}};io('01646ad602f933b8caaf',olympe.sc.logic.Rb.Im);olympe.sc.logic.Rb.Im.prototype.R.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);olympe.sc.logic.Rb.Im.prototype.$.K=new olympe.C.J(()=>olympe.sc.logic.Gb,[]);olympe.sc.logic.Rb.xk=class extends olympe.sc.logic.Cd{R(){return this.j('016ac6380bd98f1d91a0')}ea(){return this.D('016ac63c589ae38ca3ae')}$(){return this.D('016ac63c5a377fceabaa')}};io('0168ec42fc01747a98b6',olympe.sc.logic.Rb.xk);olympe.sc.logic.Rb.xk.prototype.R.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);olympe.sc.logic.Rb.xk.prototype.ea.K=new olympe.C.J(()=>olympe.sc.logic.Gb,[]);olympe.sc.logic.Rb.xk.prototype.$.K=new olympe.C.J(()=>olympe.sc.logic.Gb,[]);olympe.sc.logic.Rb.Wg=class extends olympe.sc.logic.Cd{um(){return this.j('017a7b07b09e3b22c8b4')}nq(){return this.j('017a7b07ba05807a74b0')}vm(){return this.D('017a7b0818c12388d731')}wm(){return this.D('017a7b085146d5e69aec')}bv(){return olympe.C.da.D}};olympe.sc.logic.Rb.Wg.H='017a7b07b09e3b22c8b4';olympe.sc.logic.Rb.Wg.Pc='017a7b07ba05807a74b0';olympe.sc.logic.Rb.Wg.ja='017a7b0818c12388d731';olympe.sc.logic.Rb.Wg.j='017a7b085146d5e69aec';
1184
- olympe.sc.logic.Rb.Wg.O=io('017a7b07a948e30508fa',olympe.sc.logic.Rb.Wg,olympe.sc.logic.Yh);m=olympe.sc.logic.Rb.Wg.prototype;m.um.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);m.nq.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);m.vm.K=new olympe.C.J(()=>olympe.sc.logic.Gb,[]);m.wm.K=new olympe.C.J(()=>olympe.sc.logic.Gb,[]);m.bv.K=olympe.C.J.N;olympe.sc.logic.Rb.Rr=class extends olympe.sc.logic.Cd{R(){return this.j('016ac63c5b3ed0562740')}};io('016a9766c230916ea5ec',olympe.sc.logic.Rb.Rr);olympe.sc.logic.Rb.Rr.prototype.R.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);olympe.sc.query={};olympe.sc.query.ro=class extends olympe.sc.Pg{};olympe.sc.query.ro.O=olympe.dc.na.j('01631aacd8276ea98491',olympe.sc.query.ro);olympe.sc.query.Xq=class extends olympe.dm.Enum{};olympe.sc.query.Xq.O=olympe.dc.na.j('01631aacd8276ea98495',olympe.sc.query.Xq);olympe.sc.query.hr=class extends olympe.dm.Enum{};olympe.sc.query.hr.O=olympe.dc.na.j('01631aacd8276ea98494',olympe.sc.query.hr);olympe.sc.query.kr=class extends olympe.sc.Pg{};olympe.sc.query.kr.O=olympe.dc.na.j('01631aacd8276ea98492',olympe.sc.query.kr);olympe.sc.query.oc=class extends olympe.dc.CloudObject{};olympe.sc.query.oc.O=olympe.dc.na.j('01631aacd8276ea98493',olympe.sc.query.oc);olympe.sc.Vo=class extends olympe.dc.CloudObject{};olympe.sc.Vo.O=olympe.dc.na.j('018312ceeb3e93618a85',olympe.sc.Vo);olympe.sc.workflow={};olympe.sc.workflow.ObjectState=class extends olympe.dc.CloudObject{};olympe.sc.workflow.ObjectState.O=olympe.dc.na.j('017ffdd8f0b1e31fe138',olympe.sc.workflow.ObjectState);olympe.sc.workflow.ObjectState.workflowProp=olympe.sc.workflow.ObjectState.O.ka('017ffdd8f0b1e31fe13e');olympe.sc.workflow.ObjectState.stateProp=olympe.sc.workflow.ObjectState.O.ka('017ffdd8f0b1e31fe139');olympe.sc.workflow.ObjectState.assigneeProp=olympe.sc.workflow.ObjectState.O.ka('017ffdd8f0b1e31fe13a');
1183
+ l.set(e,n.get(e))}).catch(q=>{const r=this.ac();this.G.warn(`Remote action ${this.db.name(r)} ${r} Triggered by unrecognized user: ${q}.`);l.set(g,olympe.sc.logic.Error.create('Unrecognized User',1))})},k=>{const l=this.ac();this.G.error(`Error while listening on remote action ${this.db.name(l)} (${l}): ${k.message}`)}))}};olympe.sc.logic.Yh.O=olympe.dc.oa.j('017a7b0c5dcbd8964c5d',olympe.sc.logic.Yh,olympe.sc.P.Da,olympe.host.P.Ge,new olympe.W.pa(olympe.sc.U.qr));olympe.sc.logic.Yh.D=olympe.sc.logic.Yh.O.ka('017a7b0c62a02a89444f');olympe.sc.logic.controllers={};olympe.sc.logic.controllers.sm=class{constructor(a){this.db=olympe.dc.ha();this.typeRel=a}};olympe.sc.logic.controllers.sm.j={QA:-1,QB:1};olympe.sc.logic.controllers.IC=class extends olympe.sc.logic.controllers.sm{constructor(){super(olympe.sc.logic.rd.j)}};olympe.sc.logic.controllers.RC=class extends olympe.sc.logic.controllers.sm{constructor(){super(olympe.sc.logic.Tb.typeRel)}};olympe.sc.logic.fl={};olympe.sc.logic.fl.Bw=class extends olympe.sc.logic.Function{update(a,[b],[c]){const d=olympe.dc.fa(b);d?olympe.dc.ma.Pb(a,d,olympe.dc.Mb.kg).subscribe(()=>{c(olympe.dc.CloudObject.get(d))}):this.G.warn('Cannot subscribe to an instance with no tag: '+d)}};olympe.sc.logic.oa.j('0174bf4b7e006e4b788a',olympe.sc.logic.fl.Bw);olympe.sc.logic.actions={};olympe.sc.logic.fl.vv=class extends olympe.sc.logic.Function{run(a){Sn(this,a);const [b,c,d]=Wn(this,a);let e,f=null,g=null;const h=a.getParent(),k=()=>{null===g||0===e?(this.G.warn('No list to iter upon'),this.G.info(a.T())):f<e?(b(g.mf(f)),f++,c(Date.now())):(Fn(h.state),d(Date.now()))};this.getInputs().forEach((l,n)=>a.on(l,p=>{if(p)switch(n){case 0:g=p;break;case 1:e=g.xg();f=0;En(h.state);k();break;case 2:k();break;default:this.G.error('Unhandled input')}},this.tag))}};
1184
+ olympe.sc.logic.oa.j('0171889b060b6cd54300',olympe.sc.logic.fl.vv);olympe.sc.logic.Rb={};olympe.sc.logic.Rb.fm=class extends olympe.sc.logic.Cd{R(){return this.j('016ac638085357047a2d')}};olympe.sc.logic.Rb.fm.O=io('0169b6876a03f14ae61b',olympe.sc.logic.Rb.fm);olympe.sc.logic.Rb.fm.prototype.R.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);let po=null;olympe.sc.logic.Rb.tm=class extends olympe.sc.logic.Cd{R(){return this.j('016ac63808535703691c')}F(a){if(null===po){let b;po=null!=(b=olympe.W.getParameter('sc.event.experimental'))?b:!1}return po?a.observe(Pn(this)[0]):super.F(a)}};olympe.sc.logic.Rb.tm.O=io('0169b6876a03f139d50a',olympe.sc.logic.Rb.tm);olympe.sc.logic.Rb.tm.prototype.R.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);olympe.sc.logic.Rb.Jm=class extends olympe.sc.logic.Cd{R(){return this.j('016ac63809a9a8e6db96')}$(){return this.D('016ac6380ab003363b3e')}};io('01646ad602f933b8caaf',olympe.sc.logic.Rb.Jm);olympe.sc.logic.Rb.Jm.prototype.R.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);olympe.sc.logic.Rb.Jm.prototype.$.K=new olympe.C.J(()=>olympe.sc.logic.Gb,[]);olympe.sc.logic.Rb.xk=class extends olympe.sc.logic.Cd{R(){return this.j('016ac6380bd98f1d91a0')}ea(){return this.D('016ac63c589ae38ca3ae')}$(){return this.D('016ac63c5a377fceabaa')}};io('0168ec42fc01747a98b6',olympe.sc.logic.Rb.xk);olympe.sc.logic.Rb.xk.prototype.R.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);olympe.sc.logic.Rb.xk.prototype.ea.K=new olympe.C.J(()=>olympe.sc.logic.Gb,[]);olympe.sc.logic.Rb.xk.prototype.$.K=new olympe.C.J(()=>olympe.sc.logic.Gb,[]);olympe.sc.logic.Rb.Wg=class extends olympe.sc.logic.Cd{vm(){return this.j('017a7b07b09e3b22c8b4')}nq(){return this.j('017a7b07ba05807a74b0')}wm(){return this.D('017a7b0818c12388d731')}xm(){return this.D('017a7b085146d5e69aec')}bv(){return olympe.C.da.D}};olympe.sc.logic.Rb.Wg.H='017a7b07b09e3b22c8b4';olympe.sc.logic.Rb.Wg.Pc='017a7b07ba05807a74b0';olympe.sc.logic.Rb.Wg.ja='017a7b0818c12388d731';olympe.sc.logic.Rb.Wg.j='017a7b085146d5e69aec';
1185
+ olympe.sc.logic.Rb.Wg.O=io('017a7b07a948e30508fa',olympe.sc.logic.Rb.Wg,olympe.sc.logic.Yh);m=olympe.sc.logic.Rb.Wg.prototype;m.vm.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);m.nq.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);m.wm.K=new olympe.C.J(()=>olympe.sc.logic.Gb,[]);m.xm.K=new olympe.C.J(()=>olympe.sc.logic.Gb,[]);m.bv.K=olympe.C.J.N;olympe.sc.logic.Rb.Rr=class extends olympe.sc.logic.Cd{R(){return this.j('016ac63c5b3ed0562740')}};io('016a9766c230916ea5ec',olympe.sc.logic.Rb.Rr);olympe.sc.logic.Rb.Rr.prototype.R.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);olympe.sc.query={};olympe.sc.query.so=class extends olympe.sc.Pg{};olympe.sc.query.so.O=olympe.dc.oa.j('01631aacd8276ea98491',olympe.sc.query.so);olympe.sc.query.Xq=class extends olympe.dm.Enum{};olympe.sc.query.Xq.O=olympe.dc.oa.j('01631aacd8276ea98495',olympe.sc.query.Xq);olympe.sc.query.hr=class extends olympe.dm.Enum{};olympe.sc.query.hr.O=olympe.dc.oa.j('01631aacd8276ea98494',olympe.sc.query.hr);olympe.sc.query.kr=class extends olympe.sc.Pg{};olympe.sc.query.kr.O=olympe.dc.oa.j('01631aacd8276ea98492',olympe.sc.query.kr);olympe.sc.query.oc=class extends olympe.dc.CloudObject{};olympe.sc.query.oc.O=olympe.dc.oa.j('01631aacd8276ea98493',olympe.sc.query.oc);olympe.sc.Wo=class extends olympe.dc.CloudObject{};olympe.sc.Wo.O=olympe.dc.oa.j('018312ceeb3e93618a85',olympe.sc.Wo);olympe.sc.workflow={};olympe.sc.workflow.ObjectState=class extends olympe.dc.CloudObject{};olympe.sc.workflow.ObjectState.O=olympe.dc.oa.j('017ffdd8f0b1e31fe138',olympe.sc.workflow.ObjectState);olympe.sc.workflow.ObjectState.workflowProp=olympe.sc.workflow.ObjectState.O.ka('017ffdd8f0b1e31fe13e');olympe.sc.workflow.ObjectState.stateProp=olympe.sc.workflow.ObjectState.O.ka('017ffdd8f0b1e31fe139');olympe.sc.workflow.ObjectState.assigneeProp=olympe.sc.workflow.ObjectState.O.ka('017ffdd8f0b1e31fe13a');
1185
1186
  olympe.sc.workflow.ObjectState.dateTimeProp=olympe.sc.workflow.ObjectState.O.ka('017ffdd8f0b1e31fe13b');olympe.sc.workflow.ObjectState.serializedObjectProp=olympe.sc.workflow.ObjectState.O.ka('017ffdd8f0b1e31fe13d');olympe.sc.workflow.ObjectState.objectRel=olympe.sc.workflow.ObjectState.O.sa('017ffdd8f0b1e31fe13c');olympe.sc.workflow.ObjectState.currentObjectRel=olympe.sc.workflow.ObjectState.O.sa('017ffdd8f0b1e31fe13f');olympe.sc.workflow.Ff=class extends olympe.sc.logic.Cd{dv(){return this.j('017ffe02381f9fac5060')}gv(){return this.j('017ffe02381f9fac5061')}hv(){return this.j('017ffe02381f9fac5062')}ky(){return this.j('017ffe02381f9fac5065')}ev(){return this.D('017ffe02381f9fac5063')}fv(){return this.D('017ffe02381f9fac5064')}};olympe.sc.workflow.Ff.O=io('017ffde21f5fe0f704ce',olympe.sc.workflow.Ff);olympe.sc.workflow.Ff.j='017ffe02381f9fac5060';olympe.sc.workflow.Ff.Pe='017ffe02381f9fac5061';
1186
- olympe.sc.workflow.Ff.ff='017ffe02381f9fac5062';olympe.sc.workflow.Ff.ja='017ffe02381f9fac5065';olympe.sc.workflow.Ff.H='017ffe02381f9fac5063';olympe.sc.workflow.Ff.Pc='017ffe02381f9fac5064';m=olympe.sc.workflow.Ff.prototype;m.dv.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);m.gv.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);m.hv.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);m.ky.K=new olympe.C.J(()=>Map,[]);m.ev.K=new olympe.C.J(()=>olympe.sc.logic.Gb,[]);m.fv.K=new olympe.C.J(()=>olympe.sc.logic.Gb,[]);olympe.sc.workflow.df=class extends olympe.dm.BrickMetadata{Wc(){return this.Sc(olympe.sc.workflow.Workflow.statesRel.$b(),olympe.sc.workflow.Workflow).la().concat(['.',this.la()])}};olympe.sc.workflow.df.O=olympe.dc.na.j('017ffdc2dda51d46b430',olympe.sc.workflow.df);olympe.sc.workflow.Transition=class extends olympe.dc.CloudObject{D(){return this.Vs()}j(){return this.Sc(olympe.sc.workflow.Transition.fromStateRel,olympe.sc.workflow.df)}F(){return this.Sc(olympe.sc.workflow.Transition.toStateRel,olympe.sc.workflow.df)}Wc(){const a=this.Sc(olympe.sc.workflow.Transition.fromStateRel,olympe.sc.workflow.df);return a.Sc(olympe.sc.workflow.Workflow.statesRel.$b(),olympe.sc.workflow.Workflow).la().concat(['.',a.la(),'->',this.la()])}};
1187
- olympe.sc.workflow.Transition.O=olympe.dc.na.j('017ffdc633219f16beea',olympe.sc.workflow.Transition);olympe.sc.workflow.Transition.processRefProp=olympe.sc.workflow.Transition.O.ka('017ffdc633219f16beec');olympe.sc.workflow.Transition.fromStateRel=olympe.sc.workflow.Transition.O.sa('017ffdc2dda51d46b431');olympe.sc.workflow.Transition.toStateRel=olympe.sc.workflow.Transition.O.sa('017ffdc633219f16beeb');olympe.sc.workflow.Transition.prototype.D.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);
1188
- olympe.sc.workflow.Transition.prototype.j.K=new olympe.C.J(()=>olympe.sc.workflow.df,[]);olympe.sc.workflow.Transition.prototype.F.K=new olympe.C.J(()=>olympe.sc.workflow.df,[]);olympe.sc.workflow.Workflow=class extends olympe.dm.BrickMetadata{ve(){return olympe.sc.xe.Ne.Ch}F(){return this.nh(olympe.sc.workflow.Workflow.serializationEnabledProp)}j(){return this.Sc(olympe.sc.workflow.Workflow.dataTypeRel,olympe.sc.Ac)}D(){return this.Sc(olympe.sc.workflow.Workflow.initialStateRel,olympe.sc.workflow.df)}};olympe.sc.workflow.Workflow.O=olympe.dc.na.j('017ffdc010e5bcc9c971',olympe.sc.workflow.Workflow);olympe.sc.workflow.Workflow.serializationEnabledProp=olympe.sc.workflow.Workflow.O.ka('017ffdc010e5bcc9c972');
1187
+ olympe.sc.workflow.Ff.ff='017ffe02381f9fac5062';olympe.sc.workflow.Ff.ja='017ffe02381f9fac5065';olympe.sc.workflow.Ff.H='017ffe02381f9fac5063';olympe.sc.workflow.Ff.Pc='017ffe02381f9fac5064';m=olympe.sc.workflow.Ff.prototype;m.dv.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);m.gv.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);m.hv.K=new olympe.C.J(()=>olympe.sc.logic.vb,[]);m.ky.K=new olympe.C.J(()=>Map,[]);m.ev.K=new olympe.C.J(()=>olympe.sc.logic.Gb,[]);m.fv.K=new olympe.C.J(()=>olympe.sc.logic.Gb,[]);olympe.sc.workflow.df=class extends olympe.dm.BrickMetadata{Wc(){return this.Sc(olympe.sc.workflow.Workflow.statesRel.$b(),olympe.sc.workflow.Workflow).la().concat(['.',this.la()])}};olympe.sc.workflow.df.O=olympe.dc.oa.j('017ffdc2dda51d46b430',olympe.sc.workflow.df);olympe.sc.workflow.Transition=class extends olympe.dc.CloudObject{D(){return this.Vs()}j(){return this.Sc(olympe.sc.workflow.Transition.fromStateRel,olympe.sc.workflow.df)}F(){return this.Sc(olympe.sc.workflow.Transition.toStateRel,olympe.sc.workflow.df)}Wc(){const a=this.Sc(olympe.sc.workflow.Transition.fromStateRel,olympe.sc.workflow.df);return a.Sc(olympe.sc.workflow.Workflow.statesRel.$b(),olympe.sc.workflow.Workflow).la().concat(['.',a.la(),'->',this.la()])}};
1188
+ olympe.sc.workflow.Transition.O=olympe.dc.oa.j('017ffdc633219f16beea',olympe.sc.workflow.Transition);olympe.sc.workflow.Transition.processRefProp=olympe.sc.workflow.Transition.O.ka('017ffdc633219f16beec');olympe.sc.workflow.Transition.fromStateRel=olympe.sc.workflow.Transition.O.sa('017ffdc2dda51d46b431');olympe.sc.workflow.Transition.toStateRel=olympe.sc.workflow.Transition.O.sa('017ffdc633219f16beeb');olympe.sc.workflow.Transition.prototype.D.K=new olympe.C.J(()=>olympe.dc.CloudObject,[]);
1189
+ olympe.sc.workflow.Transition.prototype.j.K=new olympe.C.J(()=>olympe.sc.workflow.df,[]);olympe.sc.workflow.Transition.prototype.F.K=new olympe.C.J(()=>olympe.sc.workflow.df,[]);olympe.sc.workflow.Workflow=class extends olympe.dm.BrickMetadata{ve(){return olympe.sc.xe.Ne.Ch}F(){return this.nh(olympe.sc.workflow.Workflow.serializationEnabledProp)}j(){return this.Sc(olympe.sc.workflow.Workflow.dataTypeRel,olympe.sc.Ac)}D(){return this.Sc(olympe.sc.workflow.Workflow.initialStateRel,olympe.sc.workflow.df)}};olympe.sc.workflow.Workflow.O=olympe.dc.oa.j('017ffdc010e5bcc9c971',olympe.sc.workflow.Workflow);olympe.sc.workflow.Workflow.serializationEnabledProp=olympe.sc.workflow.Workflow.O.ka('017ffdc010e5bcc9c972');
1189
1190
  olympe.sc.workflow.Workflow.dataTypeRel=olympe.sc.workflow.Workflow.O.sa('017ffdc010e5bcc9c973');olympe.sc.workflow.Workflow.statesRel=olympe.sc.workflow.Workflow.O.sa('017ffdc010e5bcc9c974');olympe.sc.workflow.Workflow.initialStateRel=olympe.sc.workflow.Workflow.O.sa('017ffdc010e5bcc9c975');olympe.sc.workflow.Workflow.prototype.F.K=olympe.C.J.N;olympe.sc.workflow.Workflow.prototype.j.K=new olympe.C.J(()=>olympe.sc.Ac,[]);
1190
- olympe.sc.workflow.Workflow.prototype.D.K=new olympe.C.J(()=>olympe.sc.workflow.df,[]);olympe.sc.qa={};olympe.sc.qa.Zc=class extends olympe.sc.Xa{ve(){return olympe.sc.xe.Ne.jw}};olympe.sc.qa.Zc.O=olympe.dc.na.j('01120300000000adef00',olympe.sc.qa.Zc);olympe.sc.qa.Zc.j=olympe.sc.qa.Zc.O.sa('0171bc1f15da96dfdb89');olympe.sc.qa.Zc.ja=olympe.sc.qa.Zc.O.sa('0171bc1f15da96dfdb90');R(olympe.dm.Oc.O,olympe.sc.qa.Zc.j);olympe.sc.qa.Ei=class extends olympe.sc.Runnable{H(){return[this.ac()]}j(){return olympe.dc.sd.from(this.ac()).fb(olympe.sc.qa.Zc.j).Hc()}};olympe.sc.qa.Ei.O=jg(olympe.dc.na.j('0113030000000aca1100',olympe.sc.qa.Ei));olympe.sc.qa.Ei.prototype.j.K=new olympe.C.J(()=>olympe.dm.ib,[]);olympe.sc.qa.lb=class extends olympe.dc.CloudObject{kv(){return this.nh(olympe.sc.qa.lb.hi)}yz(){return this.nh(olympe.sc.qa.lb.ja)}Jc(){return this.yd(olympe.sc.qa.lb.j)}sy(){return this.wb(olympe.sc.qa.lb.H)}Ny(){return this.wb(olympe.sc.qa.lb.ea)}My(){return this.wb(olympe.sc.qa.lb.Y)}Pf(){return this.wb(olympe.sc.qa.lb.$)}Cy(){return this.wb(olympe.sc.qa.lb.N)}Xx(){return this.wb(olympe.sc.qa.lb.D)}Ly(){return this.wb(olympe.sc.qa.lb.R)}jv(){return this.wb(olympe.sc.qa.lb.F)}};
1191
- olympe.sc.qa.lb.O=olympe.dc.na.j('011203300000000adef5',olympe.sc.qa.lb);olympe.sc.qa.lb.hi=olympe.sc.qa.lb.O.ka('011203300000000adef6');olympe.sc.qa.lb.ja=olympe.sc.qa.lb.O.ka('011203300000000adef7');olympe.sc.qa.lb.j=olympe.sc.qa.lb.O.ka('011203300000000adef8');olympe.sc.qa.lb.H=olympe.sc.qa.lb.O.ka('011203300000000adef9');olympe.sc.qa.lb.ea=olympe.sc.qa.lb.O.ka('011203300000000adefa');olympe.sc.qa.lb.Y=olympe.sc.qa.lb.O.ka('011203300000000adefb');olympe.sc.qa.lb.D=olympe.sc.qa.lb.O.ka('011203300000000adefc');
1192
- olympe.sc.qa.lb.$=olympe.sc.qa.lb.O.ka('011203300000000adefd');olympe.sc.qa.lb.N=olympe.sc.qa.lb.O.ka('011203300000000adefe');olympe.sc.qa.lb.R=olympe.sc.qa.lb.O.ka('011203300000000adeff');olympe.sc.qa.lb.F=olympe.sc.qa.lb.O.ka('011203300000000adee0');olympe.sc.qa.lb.pc={INIT:0,CA:1,Pk:2,Ok:3,Wm:4,kD:5,zb:9};m=olympe.sc.qa.lb.prototype;m.kv.K=olympe.C.J.N;m.yz.K=olympe.C.J.N;m.Jc.K=olympe.C.J.F;m.sy.K=olympe.C.J.D;m.Ny.K=olympe.C.J.D;m.My.K=olympe.C.J.D;m.Pf.K=olympe.C.J.D;m.Cy.K=olympe.C.J.D;
1193
- m.Xx.K=olympe.C.J.D;m.Ly.K=olympe.C.J.D;m.jv.K=olympe.C.J.D;olympe.sc.qa.om=class extends olympe.sc.qa.Ei{F(a){a.set(olympe.sc.ya.j.ho,!0);super.F(a)}ja(){return!0}};olympe.sc.qa.om.O=olympe.dc.na.j('0113032000000aca1102',olympe.sc.qa.om,olympe.sc.P.Da);olympe.sc.qa.cf=class extends olympe.sc.qa.Zc{j(){return(new olympe.dc.rk(this.X(),olympe.sc.qa.lb)).fb(olympe.sc.qa.cf.H).Xi().Ic()}};olympe.sc.qa.cf.O=olympe.dc.na.j('011203300000000adef3',olympe.sc.qa.cf);olympe.sc.qa.cf.H=olympe.sc.qa.cf.O.sa('011203300000000adef4');R(olympe.sc.qa.lb.O,olympe.sc.qa.cf.H);
1194
- olympe.sc.qa.cf.O.j=(a,b,c)=>{b=$l(a,b||'New Service Application model',olympe.sc.qa.cf,olympe.sc.qa.om);a.Pa(olympe.sc.qa.Zc.j,b,c);c=a.create(olympe.sc.qa.lb).X();a.Pa(olympe.sc.qa.cf.H,b,c);return b.X()};olympe.sc.qa.cf.prototype.j.K=new olympe.C.J(()=>olympe.sc.qa.lb,[]);olympe.sc.dh=class extends olympe.dc.CloudObject{static get(){return olympe.dc.CloudObject.get('011203300000000adf0f')}};olympe.sc.dh.O=olympe.dc.na.j('011203300000000adf00',olympe.sc.dh);olympe.sc.dh.D=olympe.sc.dh.O.ka('011203300000000adf01');olympe.sc.dh.j=olympe.sc.dh.O.ka('011203300000000adf02');olympe.sc.dh.F='011203300000000adf0f';olympe.sc.Bg={};olympe.sc.Bg.mz=a=>{var b=a.j;const c=olympe.dc.ha();var d=null;var e=null===bo;for(const f of b.Uc())if((b=f.Vb())&&f.D()&&f.jb()===olympe.dc.Ia.SERVER&&Z(a,f.tag())&&c.Ob(b,olympe.sc.Ac)){if(!e)throw new olympe.dc.Nq;let g,h;null==d&&(d=null,null!==ao?d=ao:'string'===typeof $n&&(d=olympe.dc.sd.from($n).fb(olympe.sc.qa.Zc.j).fb(olympe.sc.tf.j.$b()).Hc()),d=null==(g=d)?void 0:g.X());d=null!=(h=d)?h:null;if(null===d)throw Error(`No business container for new instance of ${olympe.dc.fa(b)}`);a.Pa(olympe.sc.tf.D.X(),
1191
+ olympe.sc.workflow.Workflow.prototype.D.K=new olympe.C.J(()=>olympe.sc.workflow.df,[]);olympe.sc.qa={};olympe.sc.qa.Zc=class extends olympe.sc.Xa{ve(){return olympe.sc.xe.Ne.jw}};olympe.sc.qa.Zc.O=olympe.dc.oa.j('01120300000000adef00',olympe.sc.qa.Zc);olympe.sc.qa.Zc.j=olympe.sc.qa.Zc.O.sa('0171bc1f15da96dfdb89');olympe.sc.qa.Zc.ja=olympe.sc.qa.Zc.O.sa('0171bc1f15da96dfdb90');R(olympe.dm.Oc.O,olympe.sc.qa.Zc.j);olympe.sc.qa.Ei=class extends olympe.sc.Runnable{H(){return[this.ac()]}j(){return olympe.dc.sd.from(this.ac()).fb(olympe.sc.qa.Zc.j).Hc()}};olympe.sc.qa.Ei.O=jg(olympe.dc.oa.j('0113030000000aca1100',olympe.sc.qa.Ei));olympe.sc.qa.Ei.prototype.j.K=new olympe.C.J(()=>olympe.dm.ib,[]);olympe.sc.qa.lb=class extends olympe.dc.CloudObject{kv(){return this.nh(olympe.sc.qa.lb.hi)}yz(){return this.nh(olympe.sc.qa.lb.ja)}Jc(){return this.yd(olympe.sc.qa.lb.j)}sy(){return this.wb(olympe.sc.qa.lb.H)}Ny(){return this.wb(olympe.sc.qa.lb.ea)}My(){return this.wb(olympe.sc.qa.lb.Y)}Pf(){return this.wb(olympe.sc.qa.lb.$)}Cy(){return this.wb(olympe.sc.qa.lb.N)}Xx(){return this.wb(olympe.sc.qa.lb.D)}Ly(){return this.wb(olympe.sc.qa.lb.R)}jv(){return this.wb(olympe.sc.qa.lb.F)}};
1192
+ olympe.sc.qa.lb.O=olympe.dc.oa.j('011203300000000adef5',olympe.sc.qa.lb);olympe.sc.qa.lb.hi=olympe.sc.qa.lb.O.ka('011203300000000adef6');olympe.sc.qa.lb.ja=olympe.sc.qa.lb.O.ka('011203300000000adef7');olympe.sc.qa.lb.j=olympe.sc.qa.lb.O.ka('011203300000000adef8');olympe.sc.qa.lb.H=olympe.sc.qa.lb.O.ka('011203300000000adef9');olympe.sc.qa.lb.ea=olympe.sc.qa.lb.O.ka('011203300000000adefa');olympe.sc.qa.lb.Y=olympe.sc.qa.lb.O.ka('011203300000000adefb');olympe.sc.qa.lb.D=olympe.sc.qa.lb.O.ka('011203300000000adefc');
1193
+ olympe.sc.qa.lb.$=olympe.sc.qa.lb.O.ka('011203300000000adefd');olympe.sc.qa.lb.N=olympe.sc.qa.lb.O.ka('011203300000000adefe');olympe.sc.qa.lb.R=olympe.sc.qa.lb.O.ka('011203300000000adeff');olympe.sc.qa.lb.F=olympe.sc.qa.lb.O.ka('011203300000000adee0');olympe.sc.qa.lb.pc={INIT:0,CA:1,Pk:2,Ok:3,Xm:4,kD:5,zb:9};m=olympe.sc.qa.lb.prototype;m.kv.K=olympe.C.J.N;m.yz.K=olympe.C.J.N;m.Jc.K=olympe.C.J.F;m.sy.K=olympe.C.J.D;m.Ny.K=olympe.C.J.D;m.My.K=olympe.C.J.D;m.Pf.K=olympe.C.J.D;m.Cy.K=olympe.C.J.D;
1194
+ m.Xx.K=olympe.C.J.D;m.Ly.K=olympe.C.J.D;m.jv.K=olympe.C.J.D;olympe.sc.qa.pm=class extends olympe.sc.qa.Ei{F(a){a.set(olympe.sc.ya.j.io,!0);super.F(a)}ja(){return!0}};olympe.sc.qa.pm.O=olympe.dc.oa.j('0113032000000aca1102',olympe.sc.qa.pm,olympe.sc.P.Da);olympe.sc.qa.cf=class extends olympe.sc.qa.Zc{j(){return(new olympe.dc.rk(this.X(),olympe.sc.qa.lb)).fb(olympe.sc.qa.cf.H).Xi().Ic()}};olympe.sc.qa.cf.O=olympe.dc.oa.j('011203300000000adef3',olympe.sc.qa.cf);olympe.sc.qa.cf.H=olympe.sc.qa.cf.O.sa('011203300000000adef4');R(olympe.sc.qa.lb.O,olympe.sc.qa.cf.H);
1195
+ olympe.sc.qa.cf.O.j=(a,b,c)=>{b=$l(a,b||'New Service Application model',olympe.sc.qa.cf,olympe.sc.qa.pm);a.Pa(olympe.sc.qa.Zc.j,b,c);c=a.create(olympe.sc.qa.lb).X();a.Pa(olympe.sc.qa.cf.H,b,c);return b.X()};olympe.sc.qa.cf.prototype.j.K=new olympe.C.J(()=>olympe.sc.qa.lb,[]);olympe.sc.dh=class extends olympe.dc.CloudObject{static get(){return olympe.dc.CloudObject.get('011203300000000adf0f')}};olympe.sc.dh.O=olympe.dc.oa.j('011203300000000adf00',olympe.sc.dh);olympe.sc.dh.D=olympe.sc.dh.O.ka('011203300000000adf01');olympe.sc.dh.j=olympe.sc.dh.O.ka('011203300000000adf02');olympe.sc.dh.F='011203300000000adf0f';olympe.sc.Bg={};olympe.sc.Bg.mz=a=>{var b=a.j;const c=olympe.dc.ha();var d=null;var e=null===bo;for(const f of b.Uc())if((b=f.Vb())&&f.D()&&f.jb()===olympe.dc.Ia.SERVER&&Z(a,f.tag())&&c.Ob(b,olympe.sc.Ac)){if(!e)throw new olympe.dc.Nq;let g,h;null==d&&(d=null,null!==ao?d=ao:'string'===typeof $n&&(d=olympe.dc.sd.from($n).fb(olympe.sc.qa.Zc.j).fb(olympe.sc.tf.j.$b()).Hc()),d=null==(g=d)?void 0:g.X());d=null!=(h=d)?h:null;if(null===d)throw Error(`No business container for new instance of ${olympe.dc.fa(b)}`);a.Pa(olympe.sc.tf.D.X(),
1195
1196
  d,f.tag())}};
1196
1197
  olympe.sc.Bg.Az=a=>{const b=a.j,c=olympe.dc.ha();for(const d of b.Uc()){const e=d.Vb();e&&!d.zd()&&c.Ob(e,olympe.sc.Ac)&&d.Cb().forEach((f,g)=>{if(f instanceof olympe.dc.wc){const l=b.Tc(f.X());if(null===l)throw Error(`Try to assign an instance as complex property which is not created within the same transaction: ${f.X()}`);var h;f=null!=(h=null==l?void 0:l.Vb())?h:null;h=l.tag();let n;if(f===olympe.dc.fa(olympe.sc.Ud)){h=l.Jb(olympe.sc.Ud.j);if(!h)throw Error('No object reference found for new ObjectRef');var k;
1197
1198
  let p;f=null!=(p=null==(k=b.Tc(h))?void 0:k.Vb())?p:c.model(h)}if(c.Uf(f,olympe.dm.Ie)){k=jn(f);let p;n=null!=(p=l.Ra(k.X()))?p:c.Ra(h,k)}if(void 0===n)throw Error(`Try to set a complex property to an instance of a DataType: ${c.name(e)} (${e})`);a.Yc(d.tag(),new Map([[g,n]]));Ul(a,l.tag(),olympe.dc.Mb.Dc)}})}};
1198
1199
  olympe.sc.Bg.wx=a=>{const b=a.j,c=olympe.dc.ha(),d=new Set;for(var e of b.Ab.values()){a=e.tag();let f;const g=null!=(f=e.Vb())?f:c.model(a);if(null!==g&&e.Gd()&&(d.has(g)||c.Ob(g,olympe.sc.Ac))){d.add(g);const h=Array.from(e.ea()).flatMap(([k,,l,n])=>n&&k!==olympe.dc.hc.$c?[l]:[]).find(k=>{let l,n;const p=null!=(n=null==(l=b.Tc(k))?void 0:l.Vb())?n:c.model(k);return!p||!(d.has(p)||c.Ob(p,olympe.sc.Ac))});if(void 0!==h){let k,l,n;e=null!=(n=null!=(l=null==(k=b.Tc(h))?void 0:k.Vb())?l:c.model(h))?
1199
1200
  n:'unknown';throw Error(`Try to link an instance (${a}) of DataType ${c.name(g)} (${g}) to an instance which is not (${h}) a DataType: ${c.name(e)} (${e})`);}}}};olympe.sc.Bg.Qz=a=>{var b=a.j;const c=olympe.dc.ha();for(const d of b.Uc()){b=d.tag();const e=d.Vb();if(e&&!c.Ob(e,olympe.sc.Ac)&&Z(a,b))throw Error(`You are trying to persist an instance of : ${c.name(e)} (${e}), but only instances of DataType can be persisted`);}};
1200
- olympe.W.run([olympe.dc.transaction.P.Ea],a=>{fm(fm(fm(a,olympe.sc.Bg.wx,'businessDataRelations'),olympe.sc.Bg.mz,'linkBusinessContainer'),olympe.sc.Bg.Az,'noBusinessComplexProperty')});olympe.sc.$j=class extends olympe.dm.BrickMetadata{ve(){return olympe.sc.xe.Ne.Ch}};olympe.sc.$j.O=olympe.dc.na.j('01645fe6873aeea59e64',olympe.sc.$j);olympe.sc.$j.j=olympe.sc.$j.O.sa('017ed8ac775f48d4d589');olympe.sc.So=class extends olympe.dm.Lb{ve(){return olympe.sc.xe.Ne.Ch}};olympe.sc.So.O=olympe.dc.na.j('0163a68ce44f3d1fa95d',olympe.sc.So);olympe.sc.Ah=class extends olympe.dm.BrickMetadata{};olympe.sc.Ah.O=olympe.dc.na.j('016324fde11a836f77d3',olympe.sc.Ah);olympe.sc.Ah.j=olympe.sc.Ac.O.sa('016324fde11a836088d3');olympe.sc.Ah.O.j=(a,b)=>$l(a,null!=b?b:'New config type',olympe.sc.Ah).X();olympe.sc.MA=class{};olympe.sc.ek=class extends olympe.dm.BrickMetadata{ve(){return olympe.sc.xe.Ne.Ch}};olympe.sc.ek.O=olympe.dc.na.j('017dc8d6c8fd8c8bd2ff',olympe.sc.ek);olympe.sc.ek.O.j=(a,b)=>$l(a,null!=b?b:'New data connector',olympe.sc.ek,olympe.dm.DataSource).X();olympe.sc.Ae=class extends olympe.sc.Runnable{ta(){return this.cb(olympe.sc.Ae.F,olympe.sc.Runnable)}j(){return this.cb(olympe.sc.Ae.D,olympe.dm.Property)}};olympe.sc.Ae.O=jg(olympe.dc.na.j('016c2d996d9ca27fa9d8',olympe.sc.Ae));olympe.sc.Ae.F=olympe.sc.Ae.O.sa('016c3cb7742ec9309e0b');olympe.sc.Ae.D=olympe.sc.Ae.O.sa('016c42d3454636f90533');olympe.sc.Ae.prototype.ta.K=new olympe.C.J(()=>olympe.dc.Aa,[]);olympe.sc.Ae.prototype.j.K=new olympe.C.J(()=>olympe.dc.Aa,[]);olympe.sc.qp=class extends olympe.dm.Lb{ve(){return olympe.sc.xe.Ne.Ch}};olympe.sc.qp.O=olympe.dc.na.j('017a7a9ff057958e5678',olympe.sc.qp);olympe.sc.Mi=class extends olympe.dm.Enum{static create(a,b,c,d,e){const f=olympe.dc.ha();e=void 0!==e?e:f.Ja(b)&&f.Uc(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.sc.Mi.create=olympe.sc.Mi.create;olympe.sc.Mi.O=olympe.dc.na.j('016cdd861b32d56c8208',olympe.sc.Mi);olympe.sc.wq=class extends olympe.dm.Lb{ve(){return olympe.sc.xe.Ne.Lw}};olympe.sc.wq.O=olympe.dc.na.j('01644b6d4543b344b857',olympe.sc.wq);olympe.sc.xq=class extends olympe.dc.CloudObject{};olympe.sc.xq.O=olympe.dc.na.j('0162f672366be5ca7a86',olympe.sc.xq);const qo={pp:30};olympe.sc.ec=class extends olympe.dc.sources.ec{D(a){return a instanceof olympe.sc.logic.Error?this.format(qo.pp,{c:a.Aj(),m:a.message,s:a.se()}):super.D(a)}j(a){return(null==a?void 0:a.t)===qo.pp?(a=a.v,pn(a.m,a.c,a.s)):super.j(a)}H(a){super.H(a);if(this.db.model(a)===olympe.sc.Ud.O.X()){const b=olympe.sc.Ud.j;this.F.get(a).r.push({r:b.X(),o:a,d:this.db.Jb(a,b)})}return a}};olympe.sc.Sr=class extends olympe.sc.Ae{};olympe.sc.Sr.O=olympe.dc.na.j('016d3f37610ae4fc3962',olympe.sc.Sr);olympe.sc.Text=class extends olympe.dm.String{};olympe.sc.Text.O=olympe.dc.na.j('016cfca73e63f9ab5ba4',olympe.sc.Text);olympe.sc.Za=class{constructor(a=!0){a=Yl(a);a.N=!0;var b=olympe.sc.Bg.Qz;let c;(null==(c=olympe.W.getParameter(olympe.dc.transaction.U.bm))?0:c.includes('persistenceBusinessDataOnly'))||a.R.push(b);this.j=a;this.D=[];this.source=null}static from(a){const b=olympe.sc.ya.j.TRANSACTION;return a.has(b,!0)?a.get(b,!0):new olympe.sc.Za}static process(a,b){return a.has(olympe.sc.ya.j.TRANSACTION,!0)?Promise.resolve(!1):b.ob().then(()=>!0)}T(){return this.j.T()}create(a,b=new Map,c=this.source,d){c='string'===
1201
- typeof c?c:olympe.dc.fe().fromModel(a);a=this.j.create(a,d).zi(c);for(const [e,f]of b)X(a,e,f);b=a.X();this.D.push(b);return b}update(a,b,c){this.j.update(a,b,c);return this}ht(a,b){a=this.j.update(a);for(const [c,d]of b)b=d,a.Ld.set(olympe.dc.fa(c),b);return this}delete(a){this.j.delete(a);return this}Pa(a,b,c){this.j.Pa(a,b,c);return this}ic(a,b,c){this.j.ic(a,b,c);return this}wn(a,b){this.j.wn(a,b);return this}persist(a,b=!0){this.j.persist(a,b);return this}Pz(a,b=!0){olympe.ia.Ya('dc').warn('Transaction#persistInstance() has been deprecated. Please use Transaction#persist() instead.');
1202
- return this.persist(a,b)}zi(a){this.source=a;return this}model(a){return this.j.model(a)}merge(a){Zl(this.j,a.j);return this}mn(a){this.j.mn(a);return this}ob(){return new Promise((a,b)=>{this.j.ob((c,d)=>{c?a(new olympe.sc.mj(this.D)):b(d)})})}xn(){return new Promise((a,b)=>{this.j.xn((c,d)=>{c?a(new olympe.sc.mj(this.D)):b(d)})})}};olympe.sc.Za.prototype.executeAsLarge=olympe.sc.Za.prototype.xn;olympe.sc.Za.prototype.execute=olympe.sc.Za.prototype.ob;olympe.sc.Za.prototype.afterExecution=olympe.sc.Za.prototype.mn;
1203
- olympe.sc.Za.prototype.merge=olympe.sc.Za.prototype.merge;olympe.sc.Za.prototype.model=olympe.sc.Za.prototype.model;olympe.sc.Za.prototype.setSource=olympe.sc.Za.prototype.zi;olympe.sc.Za.prototype.persistInstance=olympe.sc.Za.prototype.Pz;olympe.sc.Za.prototype.persist=olympe.sc.Za.prototype.persist;olympe.sc.Za.prototype.deleteAllRelations=olympe.sc.Za.prototype.wn;olympe.sc.Za.prototype.deleteRelation=olympe.sc.Za.prototype.ic;olympe.sc.Za.prototype.createRelation=olympe.sc.Za.prototype.Pa;
1201
+ olympe.W.run([olympe.dc.transaction.P.Ea],a=>{fm(fm(fm(a,olympe.sc.Bg.wx,'businessDataRelations'),olympe.sc.Bg.mz,'linkBusinessContainer'),olympe.sc.Bg.Az,'noBusinessComplexProperty')});olympe.sc.$j=class extends olympe.dm.BrickMetadata{ve(){return olympe.sc.xe.Ne.Ch}};olympe.sc.$j.O=olympe.dc.oa.j('01645fe6873aeea59e64',olympe.sc.$j);olympe.sc.$j.j=olympe.sc.$j.O.sa('017ed8ac775f48d4d589');olympe.sc.To=class extends olympe.dm.Lb{ve(){return olympe.sc.xe.Ne.Ch}};olympe.sc.To.O=olympe.dc.oa.j('0163a68ce44f3d1fa95d',olympe.sc.To);olympe.sc.Ah=class extends olympe.dm.BrickMetadata{};olympe.sc.Ah.O=olympe.dc.oa.j('016324fde11a836f77d3',olympe.sc.Ah);olympe.sc.Ah.j=olympe.sc.Ac.O.sa('016324fde11a836088d3');olympe.sc.Ah.O.j=(a,b)=>$l(a,null!=b?b:'New config type',olympe.sc.Ah).X();olympe.sc.MA=class{};olympe.sc.ek=class extends olympe.dm.BrickMetadata{ve(){return olympe.sc.xe.Ne.Ch}};olympe.sc.ek.O=olympe.dc.oa.j('017dc8d6c8fd8c8bd2ff',olympe.sc.ek);olympe.sc.ek.O.j=(a,b)=>$l(a,null!=b?b:'New data connector',olympe.sc.ek,olympe.dm.DataSource).X();olympe.sc.Ae=class extends olympe.sc.Runnable{ta(){return this.cb(olympe.sc.Ae.F,olympe.sc.Runnable)}j(){return this.cb(olympe.sc.Ae.D,olympe.dm.Property)}};olympe.sc.Ae.O=jg(olympe.dc.oa.j('016c2d996d9ca27fa9d8',olympe.sc.Ae));olympe.sc.Ae.F=olympe.sc.Ae.O.sa('016c3cb7742ec9309e0b');olympe.sc.Ae.D=olympe.sc.Ae.O.sa('016c42d3454636f90533');olympe.sc.Ae.prototype.ta.K=new olympe.C.J(()=>olympe.dc.Aa,[]);olympe.sc.Ae.prototype.j.K=new olympe.C.J(()=>olympe.dc.Aa,[]);olympe.sc.rp=class extends olympe.dm.Lb{ve(){return olympe.sc.xe.Ne.Ch}};olympe.sc.rp.O=olympe.dc.oa.j('017a7a9ff057958e5678',olympe.sc.rp);olympe.sc.Mi=class extends olympe.dm.Enum{static create(a,b,c,d,e){const f=olympe.dc.ha();e=void 0!==e?e:f.Ja(b)&&f.Uc(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.sc.Mi.create=olympe.sc.Mi.create;olympe.sc.Mi.O=olympe.dc.oa.j('016cdd861b32d56c8208',olympe.sc.Mi);olympe.sc.wq=class extends olympe.dm.Lb{ve(){return olympe.sc.xe.Ne.Lw}};olympe.sc.wq.O=olympe.dc.oa.j('01644b6d4543b344b857',olympe.sc.wq);olympe.sc.xq=class extends olympe.dc.CloudObject{};olympe.sc.xq.O=olympe.dc.oa.j('0162f672366be5ca7a86',olympe.sc.xq);const qo={qp:30};olympe.sc.ec=class extends olympe.dc.sources.ec{D(a){return a instanceof olympe.sc.logic.Error?this.format(qo.qp,{c:a.Aj(),m:a.message,s:a.se()}):super.D(a)}j(a){return(null==a?void 0:a.t)===qo.qp?(a=a.v,pn(a.m,a.c,a.s)):super.j(a)}H(a){super.H(a);if(this.db.model(a)===olympe.sc.Ud.O.X()){const b=olympe.sc.Ud.j;this.F.get(a).r.push({r:b.X(),o:a,d:this.db.Jb(a,b)})}return a}};olympe.sc.Sr=class extends olympe.sc.Ae{};olympe.sc.Sr.O=olympe.dc.oa.j('016d3f37610ae4fc3962',olympe.sc.Sr);olympe.sc.Text=class extends olympe.dm.String{};olympe.sc.Text.O=olympe.dc.oa.j('016cfca73e63f9ab5ba4',olympe.sc.Text);olympe.sc.Za=class{constructor(a=!0){a=Yl(a);a.N=!0;var b=olympe.sc.Bg.Qz;let c;(null==(c=olympe.W.getParameter(olympe.dc.transaction.U.bm))?0:c.includes('persistenceBusinessDataOnly'))||a.R.push(b);this.j=a;this.D=[];this.source=null}static from(a){const b=olympe.sc.ya.j.TRANSACTION;return a.has(b,!0)?a.get(b,!0):new olympe.sc.Za}static process(a,b){return a.has(olympe.sc.ya.j.TRANSACTION,!0)?Promise.resolve(!1):b.ob().then(()=>!0)}T(){return this.j.T()}create(a,b=new Map,c=this.source,d){c='string'===
1202
+ typeof c?c:olympe.dc.fe().fromModel(a);a=this.j.create(a,d).zi(c);for(const [e,f]of b)X(a,e,f);b=a.X();this.D.push(b);return b}update(a,b,c){this.j.update(a,b,c);return this}ht(a,b){a=this.j.update(a);for(const [c,d]of b)b=d,a.Ld.set(olympe.dc.fa(c),b);return this}delete(a){this.j.delete(a);return this}Pa(a,b,c){this.j.Pa(a,b,c);return this}ic(a,b,c){this.j.ic(a,b,c);return this}xn(a,b){this.j.xn(a,b);return this}persist(a,b=!0){this.j.persist(a,b);return this}Pz(a,b=!0){olympe.ia.Ya('dc').warn('Transaction#persistInstance() has been deprecated. Please use Transaction#persist() instead.');
1203
+ return this.persist(a,b)}zi(a){this.source=a;return this}model(a){return this.j.model(a)}merge(a){Zl(this.j,a.j);return this}nn(a){this.j.nn(a);return this}ob(){return new Promise((a,b)=>{this.j.ob((c,d)=>{c?a(new olympe.sc.mj(this.D)):b(d)})})}yn(){return new Promise((a,b)=>{this.j.yn((c,d)=>{c?a(new olympe.sc.mj(this.D)):b(d)})})}};olympe.sc.Za.prototype.executeAsLarge=olympe.sc.Za.prototype.yn;olympe.sc.Za.prototype.execute=olympe.sc.Za.prototype.ob;olympe.sc.Za.prototype.afterExecution=olympe.sc.Za.prototype.nn;
1204
+ olympe.sc.Za.prototype.merge=olympe.sc.Za.prototype.merge;olympe.sc.Za.prototype.model=olympe.sc.Za.prototype.model;olympe.sc.Za.prototype.setSource=olympe.sc.Za.prototype.zi;olympe.sc.Za.prototype.persistInstance=olympe.sc.Za.prototype.Pz;olympe.sc.Za.prototype.persist=olympe.sc.Za.prototype.persist;olympe.sc.Za.prototype.deleteAllRelations=olympe.sc.Za.prototype.xn;olympe.sc.Za.prototype.deleteRelation=olympe.sc.Za.prototype.ic;olympe.sc.Za.prototype.createRelation=olympe.sc.Za.prototype.Pa;
1204
1205
  olympe.sc.Za.prototype['delete']=olympe.sc.Za.prototype.delete;olympe.sc.Za.prototype.multiUpdate=olympe.sc.Za.prototype.ht;olympe.sc.Za.prototype.update=olympe.sc.Za.prototype.update;olympe.sc.Za.prototype.create=olympe.sc.Za.prototype.create;olympe.sc.Za.prototype.getId=olympe.sc.Za.prototype.T;olympe.sc.Za.process=olympe.sc.Za.process;olympe.sc.Za.from=olympe.sc.Za.from;olympe.sc.mj=class{constructor(a){this.j=a}hy(){return this.j.map(olympe.dc.CloudObject.get)}};olympe.sc.mj.prototype.getCreatedObjects=olympe.sc.mj.prototype.hy;olympe.zc={};olympe.zc.Ht=class{run(){}};function ro(a,b='default'){return a.j===b}
1205
1206
  olympe.zc.Ua=class{constructor(a,b){this.j=a;this.G=b;this.D=null;this.F='';this.G.info('HC Manager will execute application registered as:',this.j)}Mj(a,b,c=''){b||(b='default');b===this.j?(null===this.D?this.G.log('Application',c,'designated to be launched'):this.G.log('OVERRIDE: Application',c,'designated to be launched'),this.D=a,this.F=c):this.G.debug('ignoring application:'+c+' as it is registered under name '+b+' and not '+this.j)}run(){null!==this.D?(this.G.info('Running application:',this.F),
1206
- this.D.run()):this.G.error('No app registered under name: '+this.j)}};olympe.zc.Mj=function(a,b,c='default'){const d=a.Ya();c?d.debug('Pre-registering application '+b+' under name '+c+' (use '+olympe.zc.U.Ve+'='+c+' to start it)'):d.debug('Pre-registering application '+b+' as default one');a.xd(olympe.zc.P.Ea).config(c,[b],(e,f)=>f.Mj(e,c,b),e=>ro(e,c),'olympe.hc.registerApp')};olympe.zc.P={Ea:'hc.Manager',Da:'hc.Logger'};olympe.zc.U={Ve:'hc.app',Ip:'hc.globalToken'};olympe.W.config(function(a){E(a,olympe.zc.U.Ve,'default');E(a,olympe.zc.U.Ip,!1);D(a,olympe.zc.P.Da,[olympe.ia.P.Ea],b=>b.cd('hc'));D(a,olympe.Db.P.ah,[new olympe.W.pa(olympe.zc.U.Ve)],b=>b);D(a,olympe.auth.P.Cl,[olympe.Db.P.ah,new olympe.W.pa(olympe.zc.U.Ip)],(b,c)=>new olympe.auth.qo(c?'':b));C(a,olympe.zc.P.Ea,olympe.zc.Ua,new olympe.W.pa(olympe.zc.U.Ve),olympe.zc.P.Da)},'olympe.hc');
1207
+ this.D.run()):this.G.error('No app registered under name: '+this.j)}};olympe.zc.Mj=function(a,b,c='default'){const d=a.Ya();c?d.debug('Pre-registering application '+b+' under name '+c+' (use '+olympe.zc.U.Ve+'='+c+' to start it)'):d.debug('Pre-registering application '+b+' as default one');a.xd(olympe.zc.P.Ea).config(c,[b],(e,f)=>f.Mj(e,c,b),e=>ro(e,c),'olympe.hc.registerApp')};olympe.zc.P={Ea:'hc.Manager',Da:'hc.Logger'};olympe.zc.U={Ve:'hc.app',Ip:'hc.globalToken'};olympe.W.config(function(a){E(a,olympe.zc.U.Ve,'default');E(a,olympe.zc.U.Ip,!1);D(a,olympe.zc.P.Da,[olympe.ia.P.Ea],b=>b.cd('hc'));D(a,olympe.Db.P.ah,[new olympe.W.pa(olympe.zc.U.Ve)],b=>b);D(a,olympe.auth.P.Cl,[olympe.Db.P.ah,new olympe.W.pa(olympe.zc.U.Ip)],(b,c)=>new olympe.auth.ro(c?'':b));C(a,olympe.zc.P.Ea,olympe.zc.Ua,new olympe.W.pa(olympe.zc.U.Ve),olympe.zc.P.Da)},'olympe.hc');
1207
1208
  olympe.W.run([olympe.zc.P.Ea],a=>a.run(),'olympe.hc');olympe.sc.Ib={};function so(a){a.Y=a.F.H(()=>u(function*(){return to(a)}),'Stop application')}function uo(a){a.R=a.F.j(()=>olympe.C.Qa(a.$)===olympe.C.da.D?Promise.resolve('The application is started'):Promise.reject('The application is not started'),'Application health check',olympe.host.Je.j.READINESS)}
1208
1209
  function vo(a){if(a.ta)return a.G.debug('Sending getContext request'),Ji(a.Ha).then(()=>{a.G.debug('synchronisation request successful');var f=a.j;bo=null;$n=f}).catch(f=>{a.G.error('failed to synchronise (authenticated) with server: '+f.message)});const b=nn(a.D);!b&&jl();a.G.debug((b?'PULLING':'SUBSCRIBING')+' application '+a.j);const c=a.D.Bb(),d=new Promise((f,g)=>{const h=olympe.dc.ha(),k=new olympe.C.Wb('Primordial Subscription Context',c);xi(k,a.j,l=>{l=h.wi(l)?l:h.model(l);return null!==l&&
1209
- h.Ob(l,olympe.sc.Ah)},{md:b?olympe.dc.ma.oc.Rg:olympe.dc.ma.oc.wf,$n:!0,at:!0}).subscribe(rxjs.Subscriber.create(c.tc(()=>{h.Ob(a.j,olympe.sc.qa.Zc)?(a.Wa.Y(a.j,b),f()):Rd(a.N)?g(Error(`The specified application tag (${a.j}) is not an application or does not exist`)):(k.destroy(),a.N.connect().catch(l=>{g(Error(`Failed to load the app while offline, you might want to try again when online: ${l}`))}))}),l=>g(l)))}),e=new Promise(f=>{olympe.C.Vc([a.ja.ue()],g=>{olympe.dc.ma.Qe(g,olympe.dm.User,olympe.dc.Ia.SERVER).observe(c,
1210
+ h.Ob(l,olympe.sc.Ah)},{md:b?olympe.dc.ma.oc.Rg:olympe.dc.ma.oc.wf,ao:!0,at:!0}).subscribe(rxjs.Subscriber.create(c.tc(()=>{h.Ob(a.j,olympe.sc.qa.Zc)?(a.Wa.Y(a.j,b),f()):Rd(a.N)?g(Error(`The specified application tag (${a.j}) is not an application or does not exist`)):(k.destroy(),a.N.connect().catch(l=>{g(Error(`Failed to load the app while offline, you might want to try again when online: ${l}`))}))}),l=>g(l)))}),e=new Promise(f=>{olympe.C.Vc([a.ja.ue()],g=>{olympe.dc.ma.Qe(g,olympe.dm.User,olympe.dc.Ia.SERVER).observe(c,
1210
1211
  {md:olympe.dc.ma.oc.Ck,cl:'__code-as-data__'}).subscribe(()=>f())})});return Promise.all([d,e]).then(()=>{if(a.ea)return wo(a);wo(a).then(()=>{})})}
1211
- function xo(a){a.G.info('Starting application '+a.j);const b=olympe.dc.ha();if(0<a.j.length){const c=Of(b,a.j,a.D.Bb().tc((f,g)=>{if(f)if(f=Rn(g),f instanceof olympe.sc.qa.Ei){a.G.debug('application retrieved: running');g=kn(a.D,f);const h=new olympe.sc.ab.Zv(a.H);pb(a.H,()=>xn(a.D.state,h));qb(a.H,()=>{var k=h.T();return zn(a.D.state,k)});a.mb&&a.H.start();f.run(g);'string'===typeof a.Eb&&(new olympe.sc.ae).ea(f.X(),g,a.G);g.zt(olympe.sc.ya.j.ho).then(()=>{var k;null==(k=d)||k.cancel();a.$.update(olympe.C.da.D);
1212
+ function xo(a){a.G.info('Starting application '+a.j);const b=olympe.dc.ha();if(0<a.j.length){const c=Of(b,a.j,a.D.Bb().tc((f,g)=>{if(f)if(f=Rn(g),f instanceof olympe.sc.qa.Ei){a.G.debug('application retrieved: running');g=kn(a.D,f);const h=new olympe.sc.ab.Zv(a.H);pb(a.H,()=>xn(a.D.state,h));qb(a.H,()=>{var k=h.T();return zn(a.D.state,k)});a.mb&&a.H.start();f.run(g);'string'===typeof a.Eb&&(new olympe.sc.ae).ea(f.X(),g,a.G);g.zt(olympe.sc.ya.j.io).then(()=>{var k;null==(k=d)||k.cancel();a.$.update(olympe.C.da.D);
1212
1213
  a.G.info(`Application ${olympe.dc.ha().name(a.j)} (${a.j}) started`);k=olympe.dc.sources.de();k.Yb=!0;k.Y+=0;k.le.next(0<k.Y);0===k.Y&&k.$&&k.Yb&&(k.G.debug(`Cache: set code-as-data version in local storage: ${k.version}`),k.Wa.set('__code-as-data-version__',k.version),k.Eb||(k.$=!1))})}else a.G.error('application retrieved: not an Application with a run() method');else to(a)}));olympe.C.$a().onDestroy(()=>{Mf(b,a.j,c)});const d=Cc(()=>{a.G.warn(`requested application ${a.j} may not be available (it may not exist or the logged user may not have the correct permissions)`)},
1213
1214
  3E4);let e;null==(e=a.Yb)||e.start()}}function wo(a){return u(function*(){yo(a.j)&&(yield co(a.j,a.ea).catch(b=>{throw Error(`Failed to load the business container for the application ${a.j}: ${b}`);}))})}function to(a){a.G.info('Stop the application');a.D.Bb().sg();a.F.D(a.R);a.F.F(a.Y)}
1214
- olympe.sc.Ib.Um=class{constructor(a,b,c,d,e,f,g,h,k,l){this.G=a;this.ja=b;this.N=c;this.Ha=d;this.F=e;this.Y=this.R='';this.D=f;this.Wa=g;this.H=h;this.Yb=l;this.j=k.get('appTag');this.ta=k.get('getContextMode');let n;this.Eb=null!=(n=k.get('debuggerName'))?n:null;this.mb=k.get('autostartProfiler');this.ea=k.get('requireBusinessContainer');this.$=olympe.C.cc(olympe.C.da).update(olympe.C.da.j)}run(){this.G.debug('runtime starting for app #'+this.j);let a=!1;so(this);uo(this);const b=olympe.L.uc.j.cj,
1215
- c=olympe.L.uc.j.Ef,d=olympe.L.uc.j.vc;olympe.C.Vc([this.N.getState()],e=>{switch(e){case b:case c:this.G.debug('Server session opened or working offline, start the application');a||(a=!0,vo(this).then(olympe.C.$a().tc(()=>xo(this))));break;case d:this.G.debug('Impossible to open a connection to the orchestrator and offline mode is disabled.')}})}};olympe.sc.Ib.Um.j='app_instance';olympe.sc.Ib.Um.za=[olympe.zc.Ht];olympe.sc.Ib.hw=class{constructor(a,b,c,d){this.G=a;this.D=b;this.F=d.get('httpManifestPath');this.j=d.get('manifestCommon');if(!this.j)this.j={};else if('string'===typeof this.j)try{this.j=JSON.parse(this.j)}catch(e){this.G.warn('Invalid manifest common config'),this.j={}}}start(){const a=b=>{this.G.debug('Request URL',b.j());const c=(new URL(b.j())).searchParams.get('origin');if(c)return c;b=b.Cj();this.G.debug('Request headers',b);return b.origin?b.origin:b.Wz?(new URL(b.Wz)).origin:b[olympe.net.wa.Headers.yp]&&
1215
+ olympe.sc.Ib.Vm=class{constructor(a,b,c,d,e,f,g,h,k,l){this.G=a;this.ja=b;this.N=c;this.Ha=d;this.F=e;this.Y=this.R='';this.D=f;this.Wa=g;this.H=h;this.Yb=l;this.j=k.get('appTag');this.ta=k.get('getContextMode');let n;this.Eb=null!=(n=k.get('debuggerName'))?n:null;this.mb=k.get('autostartProfiler');this.ea=k.get('requireBusinessContainer');this.$=olympe.C.cc(olympe.C.da).update(olympe.C.da.j)}run(){this.G.debug('runtime starting for app #'+this.j);let a=!1;so(this);uo(this);const b=olympe.L.uc.j.cj,
1216
+ c=olympe.L.uc.j.Ef,d=olympe.L.uc.j.vc;olympe.C.Vc([this.N.getState()],e=>{switch(e){case b:case c:this.G.debug('Server session opened or working offline, start the application');a||(a=!0,vo(this).then(olympe.C.$a().tc(()=>xo(this))));break;case d:this.G.debug('Impossible to open a connection to the orchestrator and offline mode is disabled.')}})}};olympe.sc.Ib.Vm.j='app_instance';olympe.sc.Ib.Vm.za=[olympe.zc.Ht];olympe.sc.Ib.hw=class{constructor(a,b,c,d){this.G=a;this.D=b;this.F=d.get('httpManifestPath');this.j=d.get('manifestCommon');if(!this.j)this.j={};else if('string'===typeof this.j)try{this.j=JSON.parse(this.j)}catch(e){this.G.warn('Invalid manifest common config'),this.j={}}}start(){const a=b=>{this.G.debug('Request URL',b.j());const c=(new URL(b.j())).searchParams.get('origin');if(c)return c;b=b.Cj();this.G.debug('Request headers',b);return b.origin?b.origin:b.Wz?(new URL(b.Wz)).origin:b[olympe.net.wa.Headers.yp]&&
1216
1217
  b[olympe.net.wa.Headers.zp]?b[olympe.net.wa.Headers.zp]+'://'+b[olympe.net.wa.Headers.yp]:null};this.D.D('manifest',`${this.F}/:${'appTag'}`,[olympe.net.wa.Sd.GET],(b,c)=>{const d=this;return u(function*(){var e=c.get('appTag');d.G.debug('Processing request to serve manifest for app',e);if(20!==e.length)return new olympe.net.qd('Invalid appTag',olympe.net.wa.Ub.Fl);try{var f=yield olympe.dc.ma.Qe(e,olympe.sc.qa.Zc).ob()}catch(h){return new olympe.net.qd(`Something went wrong: ${'string'===typeof h?
1217
1218
  h:h.message}`,olympe.net.wa.Ub.Fl)}if(0===f.size())return new olympe.net.qd('App not found',olympe.net.wa.Ub.Zi);var g=a(b);f=f.Ic();g={name:f.name(),short_name:f.name(),id:e,start_url:g?`${g}?hc.app=sc.runtime&sc.app=${e}`:void 0,display:'standalone',backgroundColor:'#fff',icons:g?[{src:`${g}/images/logo.svg`,sizes:'150x150',type:'image/png'},{src:`${g}/images/logo.png`,sizes:'1024x1024',type:'image/png',purpose:'maskable any'}]:void 0};f=olympe.W.getParameter(`app.manifest.${e}`);if(!f)f={};else if('string'===
1218
1219
  typeof f)try{f=JSON.parse(f)}catch(h){d.G.warn(`Invalid manifest app config for app: ${e}`),f={}}e=Object.assign({},g,d.j,f);return new olympe.net.qd(JSON.stringify(e),olympe.net.wa.Ub.Rh,void 0,{'content-type':'application/json'})})}).catch(()=>this.G.error('Error while starting the RuntimeHTTPService'));this.G.debug('Started RuntimeHTTPService')}};function yo(a){var b=olympe.dm.DataSource.SERVER;const c=olympe.dc.ma.from(a).fb(olympe.sc.qa.Zc.j).fb(olympe.dm.Bd.F.$b()).fb(olympe.dm.Bd.j).Hc();a=olympe.dc.ma.from(a).fb(olympe.sc.qa.Zc.j).fb(olympe.dm.ib.D).Hc();return c.concat(a).has(b)}
1219
1220
  olympe.sc.Ib.Sk=class extends olympe.dc.sources.Sk{R(a){return this.db.Ob(a,olympe.sc.Ac)}Y(a,b){if(!this.H){super.init();var c=olympe.dc.sd.from(a).fb(olympe.sc.qa.Zc.j).Hc();if(!(c instanceof olympe.dm.ib))throw Error(`Impossible to initialize the source solver for the application ${a}: no project is linked to it`);b=b?olympe.dc.ma.oc.Rg:olympe.dc.ma.oc.wf;al(this,c,b);c=new olympe.C.Wb('deployed data sources');olympe.dc.ma.from(a).fb(olympe.sc.qa.Zc.ja).observe(c,{md:b}).subscribe(d=>{const e=
1220
1221
  new olympe.dc.Za;d.yj().forEach(f=>{e.Pa(olympe.dm.DataSource.Lj,this.j,f)});d.Ej().forEach(f=>{e.ic(olympe.dm.DataSource.Lj,this.j,f)});e.ob()})}}};olympe.sc.Ib.P={kg:'sc.runtime.Main',bf:'sc.runtime.SourceSolver',wr:'sc.runtime.appConfig',yr:'sc.runtime.runtimeHTTPServiceConfig',xr:'sc.runtime.RuntimeHTTPService',Pq:'sc.runtime.OfflineAppConfig'};olympe.sc.Ib.U={Tp:'app.httpManifestPath',uq:'app.manifest.common',qq:'sc.loadBusinessContainer'};
1221
- olympe.W.config(function(a){E(a,olympe.sc.Ib.U.Tp,'/runtime/manifest');E(a,olympe.sc.Ib.U.uq,null);E(a,olympe.sc.Ib.U.qq,!1);D(a,olympe.Db.P.ah,[new olympe.W.pa(olympe.zc.U.Ve),new olympe.W.pa(olympe.sc.U.Ve)],(b,c)=>`${b}${c?'-'+c:''}`);D(a,olympe.sc.Ib.P.Pq,[new olympe.W.pa(olympe.sc.U.Ve),new olympe.W.pa(olympe.net.U.bj),new olympe.W.pa(olympe.net.U.Em)],(b,c,d)=>{let e;const f=null!=(e=a.getParameter(`offline.${b}.enabled`))?e:c;let g;b=null!=(g=a.getParameter(`offline.${b}.autoBackOnline`))?
1222
- g:d;return new Map([['offlineEnabled',f],['offlineAutoBackOnline',!f||b]])});Xa(a,olympe.net.P.Fm,olympe.sc.Ib.P.Pq);C(a,olympe.sc.Ib.P.bf,olympe.sc.Ib.Sk,olympe.dc.P.Dh,new olympe.W.pa(olympe.dc.U.Yg),new olympe.W.pa(olympe.dc.U.$l));Xa(a,olympe.dc.sources.P.bf,olympe.sc.Ib.P.bf);D(a,olympe.sc.Ib.P.wr,[new olympe.W.pa(olympe.sc.U.Ve),new olympe.W.pa(olympe.dc.U.Zh),new olympe.W.pa(olympe.sc.U.bp),new olympe.W.pa(olympe.sc.U.jo),new olympe.W.pa(olympe.sc.Ib.U.qq)],(b,c,d,e,f)=>new Map([['appTag',
1223
- b],['getContextMode',c],['debuggerName',d],['autostartProfiler',e],['requireBusinessContainer',f]]));C(a,olympe.sc.Ib.P.kg,olympe.sc.Ib.Um,olympe.sc.P.Da,olympe.auth.P.Ea,olympe.L.P.vf,olympe.dc.query.P.Fk,olympe.host.P.Ge,olympe.sc.P.Kk,olympe.sc.Ib.P.bf,olympe.V.P.jg,olympe.sc.Ib.P.wr,olympe.sc.Ib.P.xr);D(a,olympe.sc.Ib.P.yr,[new olympe.W.pa(olympe.sc.Ib.U.Tp),new olympe.W.pa(olympe.sc.Ib.U.uq)],(b,c)=>new Map([['httpManifestPath',b],['manifestCommon',c]]));C(a,olympe.sc.Ib.P.xr,olympe.sc.Ib.hw,
1222
+ olympe.W.config(function(a){E(a,olympe.sc.Ib.U.Tp,'/runtime/manifest');E(a,olympe.sc.Ib.U.uq,null);E(a,olympe.sc.Ib.U.qq,!1);D(a,olympe.Db.P.ah,[new olympe.W.pa(olympe.zc.U.Ve),new olympe.W.pa(olympe.sc.U.Ve)],(b,c)=>`${b}${c?'-'+c:''}`);D(a,olympe.sc.Ib.P.Pq,[new olympe.W.pa(olympe.sc.U.Ve),new olympe.W.pa(olympe.net.U.bj),new olympe.W.pa(olympe.net.U.Fm)],(b,c,d)=>{let e;const f=null!=(e=a.getParameter(`offline.${b}.enabled`))?e:c;let g;b=null!=(g=a.getParameter(`offline.${b}.autoBackOnline`))?
1223
+ g:d;return new Map([['offlineEnabled',f],['offlineAutoBackOnline',!f||b]])});Xa(a,olympe.net.P.Gm,olympe.sc.Ib.P.Pq);C(a,olympe.sc.Ib.P.bf,olympe.sc.Ib.Sk,olympe.dc.P.Dh,new olympe.W.pa(olympe.dc.U.Yg),new olympe.W.pa(olympe.dc.U.$l));Xa(a,olympe.dc.sources.P.bf,olympe.sc.Ib.P.bf);D(a,olympe.sc.Ib.P.wr,[new olympe.W.pa(olympe.sc.U.Ve),new olympe.W.pa(olympe.dc.U.Zh),new olympe.W.pa(olympe.sc.U.cp),new olympe.W.pa(olympe.sc.U.ko),new olympe.W.pa(olympe.sc.Ib.U.qq)],(b,c,d,e,f)=>new Map([['appTag',
1224
+ b],['getContextMode',c],['debuggerName',d],['autostartProfiler',e],['requireBusinessContainer',f]]));C(a,olympe.sc.Ib.P.kg,olympe.sc.Ib.Vm,olympe.sc.P.Da,olympe.auth.P.Ea,olympe.L.P.vf,olympe.dc.query.P.Fk,olympe.host.P.Ge,olympe.sc.P.Kk,olympe.sc.Ib.P.bf,olympe.V.P.jg,olympe.sc.Ib.P.wr,olympe.sc.Ib.P.xr);D(a,olympe.sc.Ib.P.yr,[new olympe.W.pa(olympe.sc.Ib.U.Tp),new olympe.W.pa(olympe.sc.Ib.U.uq)],(b,c)=>new Map([['httpManifestPath',b],['manifestCommon',c]]));C(a,olympe.sc.Ib.P.xr,olympe.sc.Ib.hw,
1224
1225
  olympe.sc.P.Da,olympe.net.P.nj,olympe.sc.P.Kk,olympe.sc.Ib.P.yr);olympe.zc.Mj(a,olympe.sc.Ib.P.kg,'sc.runtime');olympe.zc.Mj(a,olympe.sc.Ib.P.kg,'sc.headless');olympe.zc.Mj(a,olympe.sc.Ib.P.kg)},'olympe.sc.runtime');olympe.public={};olympe.public.Na=class a{static Vx(b,c){const d=new SRPClient,e=d.generateRandomSalt();return{username:b,login:b,salt:e,verifier:d.generateVerifier(e,b,c)}}static getState(){return rf(olympe.public.Na.get())}static ql(b){return a.D(olympe.public.Na.get().ql(),b).pipe(rxjs.operators.map(c=>c.valueOf()))}static jy(){return olympe.C.Qa(olympe.public.Na.get().ue())}static Jz(b){return a.D(olympe.public.Na.get().ue(),b)}static te(){var b=olympe.C,c=b.Qa;var d=olympe.public.Na.get().ed.tb().Hd();return c.call(b,
1225
1226
  d)}static zg(){return new Promise((b,c)=>{olympe.public.Na.get().zg(d=>d?c(d):b())})}static xy(){return olympe.C.Qa(olympe.public.Na.get().si())||void 0}static Xy(){const b=de(olympe.public.Na.get());return{user:b.yc(),userTag:b.ue(),nonce:b.Hd(),payload:b.Vi(),idpName:b.Df(),protocol:b.Ng()}}static wy(){return Array.from(sf().keys())}static rf(){olympe.public.Na.get().rf()}static rh(b){return new Promise((c,d)=>{olympe.public.Na.get().rh(b,e=>e?d(e):c())})}static pz(b,c){return olympe.public.Na.j((new Map).set('username',
1226
1227
  b).set('password',c),olympe.auth.Ec.j.SRP)}static qz(b){const c=sf();if(0===c.size||b&&!c.has(b)){var d=0===c.size?'There are no available IDPs':`The IDP name ${b} is not valid, the valid names are ${Array.from(c.keys())}`;return Promise.reject(d)}b?(d=b,b=c.get(b)):(b=Array.from(c)[0],d=b[0],b=b[1]);return olympe.public.Na.j((new Map).set('idpName',d),b)}static oz(){return olympe.public.Na.j(new Map,olympe.auth.Ec.j.SAML)}static rz(b,c){return olympe.public.Na.j((new Map).set('username',b).set('nonce',
1227
- c),olympe.auth.Ec.j.Gm)}static nz(){return olympe.public.Na.j(new Map,olympe.auth.Ec.j.OAUTH2)}static Jj(){return olympe.public.Na.get().Jj()}static j(b,c){const d=new olympe.auth.Request;for(const [e,f]of b)d.set(e,f);return new Promise(e=>{qf(olympe.public.Na.get(),d,c,()=>{e()})})}static get(){return olympe.auth.re()}static D(b,c){return b.asObservable('function'===typeof c.Bb?c.Bb():c)}};olympe.public.Na.logout=olympe.public.Na.Jj;olympe.public.Na.loginOpenID=olympe.public.Na.nz;
1228
+ c),olympe.auth.Ec.j.Hm)}static nz(){return olympe.public.Na.j(new Map,olympe.auth.Ec.j.OAUTH2)}static Jj(){return olympe.public.Na.get().Jj()}static j(b,c){const d=new olympe.auth.Request;for(const [e,f]of b)d.set(e,f);return new Promise(e=>{qf(olympe.public.Na.get(),d,c,()=>{e()})})}static get(){return olympe.auth.re()}static D(b,c){return b.asObservable('function'===typeof c.Bb?c.Bb():c)}};olympe.public.Na.logout=olympe.public.Na.Jj;olympe.public.Na.loginOpenID=olympe.public.Na.nz;
1228
1229
  olympe.public.Na.loginToken=olympe.public.Na.rz;olympe.public.Na.loginSAML=olympe.public.Na.oz;olympe.public.Na.loginSSO=olympe.public.Na.qz;olympe.public.Na.loginSRP=olympe.public.Na.pz;olympe.public.Na.getUserFromToken=olympe.public.Na.rh;olympe.public.Na.sendKeepAlive=olympe.public.Na.rf;olympe.public.Na.getIDPNames=olympe.public.Na.wy;olympe.public.Na.getUserToken=olympe.public.Na.Xy;olympe.public.Na.getIDPToken=olympe.public.Na.xy;olympe.public.Na.refreshToken=olympe.public.Na.zg;
1229
1230
  olympe.public.Na.getToken=olympe.public.Na.te;olympe.public.Na.observeUser=olympe.public.Na.Jz;olympe.public.Na.getCurrentUser=olympe.public.Na.jy;olympe.public.Na.isAuthenticated=olympe.public.Na.ql;olympe.public.Na.getState=olympe.public.Na.getState;olympe.public.Na.generateSRPData=olympe.public.Na.Vx;olympe.public.Ba=class{static create(a){return new class extends olympe.dc.Z.Cg{j(b,c){b=a(olympe.dc.CloudObject.get(c));if('boolean'===typeof b)return b;const d=olympe.C.cc(olympe.C.da),e=b.subscribe(f=>d.update(olympe.C.Sb(f)));olympe.C.$a().Yd(()=>e.unsubscribe());return d.tb()}}}};
1230
- olympe.public.xf=class{static create(a){return new class extends olympe.dc.xc.Cg{F(b,c){return olympe.dc.CloudObject.get(c)}compare(b,c){b=a(b,c);if('number'===typeof b)return b;const d=olympe.C.cc(olympe.C.aa),e=b.subscribe(f=>d.update(olympe.C.ra(f)));olympe.C.$a().Yd(()=>e.unsubscribe());return d.tb()}}}};olympe.public.Process=class{static Lz(a,b){if('string'===typeof b)throw Error('When registering a health check, the options parameter should be an object: string is not supported anymore.');const c=olympe.host.ll(),d=c.j(a,void 0,null==b?void 0:b.type);return()=>c.D(d)}static Mz(a,b,c){const d=olympe.host.ll(),e=d.ja(a,b,c);return()=>d.F(e)}static connect(){return olympe.L.An().connect()}static disconnect(){return olympe.L.An().disconnect()}static Wf(a){a='function'===typeof a.Bb?a.Bb():a;return olympe.L.An().Wf().asObservable(a).pipe(rxjs.operators.map(b=>
1231
- b.valueOf()))}};olympe.public.Process.isOnline=olympe.public.Process.Wf;olympe.public.Process.disconnect=olympe.public.Process.disconnect;olympe.public.Process.connect=olympe.public.Process.connect;olympe.public.Process.onShutdown=olympe.public.Process.Mz;olympe.public.Process.onHealthCheck=olympe.public.Process.Lz;'object'===typeof exports&&(exports={CloudObject:olympe.dc.CloudObject,Relation:olympe.dc.Sa.Relation,Direction:olympe.dc.va,generateTag:olympe.V.jf,tagToString:olympe.dc.fa,register:olympe.dc.register,defineProperty:olympe.dc.defineProperty,defineRelation:olympe.dc.Ds,defineInverseRelation:olympe.dc.Fx,BrickContext:olympe.sc.ya,Brick:olympe.sc.logic.Function,ActionBrick:olympe.sc.logic.Function,GlobalProperties:olympe.sc.ya.j,registerBrick:olympe.sc.logic.na.j,FunctionBrick:olympe.sc.logic.Function,
1231
+ olympe.public.xf=class{static create(a){return new class extends olympe.dc.xc.Cg{F(b,c){return olympe.dc.CloudObject.get(c)}compare(b,c){b=a(b,c);if('number'===typeof b)return b;const d=olympe.C.cc(olympe.C.aa),e=b.subscribe(f=>d.update(olympe.C.ra(f)));olympe.C.$a().Yd(()=>e.unsubscribe());return d.tb()}}}};olympe.public.Process=class{static Lz(a,b){if('string'===typeof b)throw Error('When registering a health check, the options parameter should be an object: string is not supported anymore.');const c=olympe.host.ll(),d=c.j(a,void 0,null==b?void 0:b.type);return()=>c.D(d)}static Mz(a,b,c){const d=olympe.host.ll(),e=d.ja(a,b,c);return()=>d.F(e)}static connect(){return olympe.L.Bn().connect()}static disconnect(){return olympe.L.Bn().disconnect()}static Wf(a){a='function'===typeof a.Bb?a.Bb():a;return olympe.L.Bn().Wf().asObservable(a).pipe(rxjs.operators.map(b=>
1232
+ b.valueOf()))}};olympe.public.Process.isOnline=olympe.public.Process.Wf;olympe.public.Process.disconnect=olympe.public.Process.disconnect;olympe.public.Process.connect=olympe.public.Process.connect;olympe.public.Process.onShutdown=olympe.public.Process.Mz;olympe.public.Process.onHealthCheck=olympe.public.Process.Lz;'object'===typeof exports&&(exports={CloudObject:olympe.dc.CloudObject,Relation:olympe.dc.Sa.Relation,Direction:olympe.dc.va,generateTag:olympe.V.jf,tagToString:olympe.dc.fa,register:olympe.dc.register,defineProperty:olympe.dc.defineProperty,defineRelation:olympe.dc.Ds,defineInverseRelation:olympe.dc.Fx,BrickContext:olympe.sc.ya,Brick:olympe.sc.logic.Function,ActionBrick:olympe.sc.logic.Function,GlobalProperties:olympe.sc.ya.j,registerBrick:olympe.sc.logic.oa.j,FunctionBrick:olympe.sc.logic.Function,
1232
1233
  Context:olympe.sc.ya,Entry:olympe.dc.Sa.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.sc.File,User:olympe.dm.User,Enum:olympe.dm.gg,EnumValue:olympe.sc.Mi,DataSource:olympe.dm.DataSource,DataResult:olympe.dc.query.Ed,Workflow:olympe.sc.workflow.Workflow,WorkflowState:olympe.sc.workflow.df,WorkflowTransition:olympe.sc.workflow.Transition,
1233
1234
  WorkflowObjectState:olympe.sc.workflow.ObjectState,Transaction:olympe.sc.Za,BurstTransaction:olympe.dc.Gi,TransactionResult:olympe.sc.mj,PredefinedDataSource:olympe.dc.Ia,QueryResult:olympe.dc.Ka,Query:olympe.dc.ma,QuerySingle:olympe.dc.sd,Predicate:olympe.dc.query.Ba,Order:olympe.dc.query.Bk,Config:class{static getParameter(a){return olympe.W.getParameter(a)}},Process:olympe.public.Process,ProbeType:olympe.host.Je.j,Cache:{getCacheEntries:()=>olympe.dc.sources.de().N,clearCache:a=>ql(olympe.dc.sources.de(),
1234
1235
  a),getProcessingStatus:()=>olympe.dc.sources.de().Jc(),getProcessingErrors:()=>olympe.dc.sources.de().wd.asObservable(),hasPendingChanges:()=>olympe.dc.sources.de().ea.asObservable(),synchroniseChanges:()=>wl(),getPendingChanges:()=>zl(),clearPendingChanges:()=>Dl(),loadPendingChanges:a=>Bl(a)},Color:olympe.C.Color,ErrorFlow:olympe.sc.logic.Error,ServiceRequestType:olympe.L.xa.j,ServiceRequest:olympe.L.Fc,Service:olympe.L.rb,Auth:olympe.public.Na,AuthState:{INIT:olympe.auth.Ua.j.INIT,AUTHENTICATING:olympe.auth.Ua.j.Sj,
1235
1236
  GUEST:olympe.auth.Ua.j.Pi,AUTHENTICATED:olympe.auth.Ua.j.sf,ERROR:olympe.auth.Ua.j.zb},AuthProtocol:olympe.auth.Ec.j,Sync:olympe.dc.CloudObject,BusinessObject:olympe.dc.CloudObject,StringPrimitive:olympe.dm.String,NumberPrimitive:olympe.dm.Number,BooleanPrimitive:olympe.dm.Boolean,DatetimePrimitive:olympe.dm.DateTime,ColorPrimitive:olympe.dm.Color,PropertyPrimitive:olympe.dm.Property,RelationPrimitive:olympe.dm.Relation,DBView:class extends olympe.dc.kb{static get(){return olympe.dc.ha()}},ListDef:olympe.dc.Aa,
1236
- instanceToTag:olympe.dc.fa,registerSync:olympe.dc.na.j,getUniqueTag:olympe.V.jf,onDestroy:a=>olympe.C.$a().onDestroy(a),offDestroy:a=>olympe.C.$a().Xf(a),FollowRules:olympe.dc.Mb,transformers:{Related:olympe.dc.ba.af,RecursiveRelated:olympe.dc.ba.Ke,Distinct:olympe.dc.ba.Ki,Filter:olympe.dc.ba.zf,Limit:olympe.dc.ba.Nh,Sort:olympe.dc.ba.bh,Union:olympe.dc.ba.Lf},ListDefPredicate:olympe.public.Ba,predicates:{And:olympe.dc.Z.Od,Or:olympe.dc.Z.Fe,Not:olympe.dc.Z.je,Equals:olympe.dc.Z.Be,Contains:olympe.dc.Z.yf,
1237
+ instanceToTag:olympe.dc.fa,registerSync:olympe.dc.oa.j,getUniqueTag:olympe.V.jf,onDestroy:a=>olympe.C.$a().onDestroy(a),offDestroy:a=>olympe.C.$a().Xf(a),FollowRules:olympe.dc.Mb,transformers:{Related:olympe.dc.ba.af,RecursiveRelated:olympe.dc.ba.Ke,Distinct:olympe.dc.ba.Ki,Filter:olympe.dc.ba.zf,Limit:olympe.dc.ba.Nh,Sort:olympe.dc.ba.bh,Union:olympe.dc.ba.Lf},ListDefPredicate:olympe.public.Ba,predicates:{And:olympe.dc.Z.Od,Or:olympe.dc.Z.Fe,Not:olympe.dc.Z.je,Equals:olympe.dc.Z.Be,Contains:olympe.dc.Z.yf,
1237
1238
  Greater:olympe.dc.Z.mk,Smaller:olympe.dc.Z.Rk,HasRelated:olympe.dc.Z.Ri,InstanceOf:olympe.dc.Z.Ui,Regex:olympe.dc.Z.Hf},Comparator:olympe.public.xf,comparators:{Number:olympe.dc.xc.Number,String:olympe.dc.xc.String,DateTime:olympe.dc.xc.DateTime},valuedefs:{BooleanProperty:olympe.dc.bb.Wj,StringProperty:olympe.dc.bb.jj,NumberProperty:olympe.dc.bb.aj,DateTimeProperty:olympe.dc.bb.Ji,Constant:olympe.dc.bb.Xe,Tag:olympe.dc.bb.kj}});
1238
1239
 
1239
1240