@bryntum/engine-thin-trial 7.3.0 → 7.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- (function(a,b){const c=a();function L(a,b){return _enb(b-0x2e8,a);}while(!![]){try{const d=parseInt(L(0x477,0x44b))/0x1*(-parseInt(L(0x444,0x431))/0x2)+parseInt(L(0x3ff,0x3d7))/0x3*(-parseInt(L(0x474,0x447))/0x4)+parseInt(L(0x3b9,0x3ef))/0x5+parseInt(L(0x3f5,0x40e))/0x6*(parseInt(L(0x474,0x448))/0x7)+parseInt(L(0x3f6,0x41d))/0x8+parseInt(L(0x440,0x424))/0x9*(-parseInt(L(0x430,0x428))/0xa)+parseInt(L(0x3ec,0x3f3))/0xb;if(d===b){break;}else{c['push'](c['shift']());}}catch(e){c['push'](c['shift']());}}}(_ena,0x5e5b4));var __decorate=function(a,b,e,f){var g=arguments[M(0x384,0x39c)],h=g<0x3?b:f===null?f=Object[M(0x3e2,0x414)](b,e):f,j;if(typeof Reflect===M(0x3dd,0x3ab)&&typeof Reflect[M(0x401,0x3c8)]===M(0x3f9,0x3d7))h=Reflect[M(0x3c2,0x3c8)](a,b,e,f);else for(var k=a[M(0x368,0x39c)]-0x1;k>=0x0;k--)if(j=a[k])h=(g<0x3?j(h):g>0x3?j(b,e,h):j(b,e))||h;function M(a,b){return _enb(b-0x2a9,a);}return g>0x3&&h&&Object[M(0x41e,0x40b)](b,e,h),h;};import{HasProposedValue,PreviousValueOf,ProposedArgumentsOf,ProposedOrPrevious,ProposedOrPreviousValueOf,ProposedValueOf,WriteSeveral}from'@bryntum/engine-thin/lib/ChronoGraph/chrono/Effect.js';import{TombStone}from'@bryntum/engine-thin/lib/ChronoGraph/chrono/Quark.js';import{Mixin}from'@bryntum/engine-thin/lib/ChronoGraph/class/Mixin.js';import{CycleDescription,CycleResolution,Formula}from'@bryntum/engine-thin/lib/ChronoGraph/cycle_resolver/CycleResolver.js';import{calculate,field,write}from'@bryntum/engine-thin/lib/ChronoGraph/replica/Entity.js';import _enc from'@bryntum/core-thin/lib/helper/DateHelper.js';function _enb(a,b){const c=_ena();_enb=function(d,e){d=d-0xef;let f=c[d];return f;};return _enb(a,b);}import _end from'@bryntum/core-thin/lib/helper/ObjectHelper.js';import{model_field}from'../../../chrono/ModelFieldAtom.js';import{Direction,TimeUnit}from'../../../scheduling/Types.js';import{MAX_DATE}from'../../../util/Constants.js';import{durationFormula,DurationVar,endDateFormula,EndDateVar,startDateFormula,StartDateVar}from'../scheduler_basic/BaseEventDispatcher.js';import{SEDWUDispatcherIdentifier}from'./HasEffortDispatcher.js';import{HasEffortMixin}from'./HasEffortMixin.js';import{HasPercentDoneMixin}from'./HasPercentDoneMixin.js';function _enN(a,b){return _enb(b-0x344,a);}import{SchedulerProEventSegment}from'./SchedulerProEventSegment.js';const SegmentsVar=Symbol(_enN(0x47f,0x44c));const segmentsConverter=(a,b,c)=>c['processSegmentsValue'](a);function _ena(){const av=['segmentIndex','_lastSegmentsSnapshot','4246488dBEwCm','copy','findIndex','lastSegment','10YLKxXN','fieldMap','getTimezoneOffset','add','unlink','cls','None','firstSegment','forEach','2KpCZnS','segmentModelClass','ignoreSegments','isModel','segments','skipNonWorkingTime','processSegmentValue','join','reduce','addProposedValueFlag','meta','splice','processSegmentsValue','endOffset','endBatch','graph','calculateAdjustedSegments','_segmentGeneration','mergeSegments','adjustDurationToDST','convertDurationGen','calculateStartDate','4PfHIrx','70VpRAyz','processData','defineProperty','709691tnhyXn','splitToSegments','prepareDispatcher','prototype','pop','getValue','calculateEndDateBySegments','equality','getOwnPropertyDescriptor','event','run','effectiveCalendarsCombination','isSegmented','generation','commitAsync','isHasSubEventsMixin','getSegmentIndexByDate','calculateStartDateBySegments','calculateDurationProposed','isForward','getTime','startOffset','data','Millisecond','from','has','useEventAvailabilityIterator','1991736wMXwTb','writeSegments','calculateDurationBySegments','resolution','length','ignoreResourceCalendar','endDate','new','map','$name','calculateEndDate','childEvents','calculateProjectedDuration','convert','calculateProjectedXDateWithDuration','skipWorkingTime','shift','normalizeUnit','get','object','setProject','min','forEachAvailabilityInterval','getLatestStableEntryFor','350305zlsdyE','SegmentsVar','_skipSegmentsIsEqual','size','22233893OyJpMS','skipNonWorkingTimeWhenSchedulingManually','previousSegment','write','getFieldDefinition','slice','getSegmentByDate','getCalendarsWorking','doWriteSegments','getProject','segmentsToCleanup','hasIdentifier','modified','formulaId','removeEntities','some','hasSegmentChangesProposed','internalClearChanges','push','duration','decorate','getCalendarsWorkStatus','max','startDate','forceSegmentsMerging','assign','leaveProject','29166SpSalF','isManuallyScheduled','getSegments','Forward','calculateSegments','durationUnit','toJSON','call','function','getSegmentsSnapshot','storeFieldChange','adjustedSegments','dispatcher','skipNonWorkingTimeInDurationWhenSchedulingManually','_processingDataForProject','735880mFVBbe','SplitEventMixin','nextSegment','internalId','rawModifications'];_ena=function(){return av;};return _ena();}const startDateByEndDateAndSegmentsFormula=Formula['new']({'output':StartDateVar,'inputs':new Set([EndDateVar,SegmentsVar])});const endDateByStartDateAndSegmentsFormula=Formula[_enN(0x459,0x43a)]({'output':EndDateVar,'inputs':new Set([StartDateVar,SegmentsVar])});const durationByStartDateAndEndDateAndSegmentsFormula=Formula['new']({'output':DurationVar,'inputs':new Set([StartDateVar,EndDateVar,SegmentsVar])});const SEDSGGraphDescription=CycleDescription[_enN(0x457,0x43a)]({'variables':new Set([StartDateVar,EndDateVar,DurationVar,SegmentsVar]),'formulas':new Set([endDateByStartDateAndSegmentsFormula,startDateByEndDateAndSegmentsFormula,startDateFormula,endDateFormula,durationFormula])});const SEDSGForwardCycleResolution=CycleResolution[_enN(0x476,0x43a)]({'description':SEDSGGraphDescription,'defaultResolutionFormulas':new Set([endDateFormula,endDateByStartDateAndSegmentsFormula])});const SEDSGBackwardCycleResolution=CycleResolution[_enN(0x471,0x43a)]({'description':SEDSGGraphDescription,'defaultResolutionFormulas':new Set([startDateFormula,startDateByEndDateAndSegmentsFormula])});class SEDSGDispatcherIdentifier extends SEDWUDispatcherIdentifier{[_enN(0x4c3,0x4ae)](a,b){const c=a[O(0x51,0x1a)];function O(a,b){return _enN(a,b- -0x41c);}const d=b['resolution'];return super['equality'](a,b)&&c[O(0x9,0x29)](SegmentsVar)===d[O(-0x14,0x29)](SegmentsVar);}}function compareSegmentsArray(c,d){function P(a,b){return _enN(b,a- -0xc7);}if(!c&&!d)return!![];if(this['_skipSegmentsIsEqual'])return![];if(!c&&d||c&&!d)return![];if(c[P(0x370,0x396)]!==d['length'])return![];return c['every']((e,f)=>compareSegments(e,d[f]));}const compareSegments=(c,d)=>{if(c===d)return!![];const e=c[Q(0x453,0x453)]?c:d;const f=e[Q(0x448,0x42c)];const g=c[Q(0x429,0x466)]instanceof Date?c[Q(0x429,0x42f)][Q(0x47e,0x476)]():f[Q(0x429,0x45f)][Q(0x403,0x3c6)](c[Q(0x429,0x401)])?.[Q(0x47e,0x43b)]();const h=d['startDate']instanceof Date?d[Q(0x429,0x41c)]['getTime']():f['startDate'][Q(0x403,0x3fc)](d[Q(0x429,0x40f)])?.['getTime']();const i=c[Q(0x3fc,0x3ff)]instanceof Date?c[Q(0x3fc,0x443)]['getTime']():f[Q(0x3fc,0x3bb)][Q(0x403,0x3f4)](c['endDate'])?.[Q(0x47e,0x49a)]();const j=d[Q(0x3fc,0x3c6)]instanceof Date?d['endDate'][Q(0x47e,0x479)]():f[Q(0x3fc,0x3cc)][Q(0x403,0x406)](d[Q(0x3fc,0x3e5)])?.['getTime']();function Q(a,b){return _enN(b,a- -0x3d);}return g===h&&i===j;};const fillNextPrevious=a=>{a[R(0xcb,0xd0)]((b,c,d)=>{if(b){b[S(0x365,0x341)]=c;}function S(a,b){return R(b-0x290,a);}c[S(0x32f,0x317)]=b;c[S(0x36c,0x344)]=d;return c;},null);function R(a,b){return _enN(b,a- -0x3ca);}if(a[R(0x6d,0x7c)]){a[a['length']-0x1]['nextSegment']=null;}};class SplitEventMixin extends Mixin([HasEffortMixin,HasPercentDoneMixin],a=>{class b extends a{constructor(){super(...arguments);function T(a,b){return _enb(b- -0x63,a);}this[T(0x13e,0xf7)]={};}get[U(0x2d,-0x10)](){let c=super[V(0x4,-0xf)];function V(a,b){return U(b,a-0x14);}if(this[V(0x18,-0x7)]&&(!c||!('segments'in c))){for(const d of this[V(0x18,-0x2a)]){if(d[V(0x4,0x22)]){c=c||{};c[V(0x18,0x37)]=this['getFieldPersistentValue']('segments');break;}}}return c;}['internalClearChanges'](c,d,e,...f){function W(a,b){return U(a,b-0x36b);}for(const g of this[W(0x3a0,0x36f)]||[]){if(g[W(0x390,0x36e)]){g[W(0x365,0x33e)][W(0x32a,0x34f)](g,c,d,null,...f);}}super[W(0x304,0x33e)][W(0x312,0x34f)](this,c,d,e,...f);}*[U(0x2a,0x1c)](c){const d=yield*super['prepareDispatcher'](c);function X(a,b){return U(b,a-0x23f);}if(yield*this[X(0x211,0x210)]()){d[X(0x248,0x211)](SegmentsVar);}return d;}['cycleResolutionContext'](c){function Y(a,b){return U(b,a-0x3a8);}const d=c(this['$']['effectiveDirection']);return d['direction']===Direction[Y(0x388,0x378)]||d['direction']===Direction[Y(0x3a5,0x3be)]?SEDSGForwardCycleResolution:SEDSGBackwardCycleResolution;}*[U(-0x39,-0x2e)](){const c=yield ProposedValueOf(this['$'][Z(0x1ad,0x1eb)]);function Z(a,b){return U(b,a-0x1a9);}let d=![];if(yield HasProposedValue(this['$'][Z(0x1ad,0x1ed)])){d=Boolean(c);}const e=yield ProposedOrPreviousValueOf(this['$'][Z(0x1ad,0x1cb)]);if(!e)return![];for(const f of e){const g=yield HasProposedValue(f['$'][Z(0x182,0x193)]);const h=yield HasProposedValue(f['$']['endDate']);const i=yield HasProposedValue(f['$'][Z(0x17e,0x138)]);if(g||h||i)d=!![];}return d;}[U(-0x9f,-0x59)](c,d,e,f){const g=d[a0(0x43e,0x462)](c)?.[a0(0x4a0,0x491)]();const h=g!==TombStone?g??[]:[];const i=new Set(h);const j=(f??[])[a0(0x42f,0x459)](n=>n[a0(0x484,0x441)]?n:this['processSegmentValue'](n));function a0(a,b){return U(b,a-0x481);}const k=new Set(j);const l=this['project'];const m=l['replica'];for(const n of h){if(!k['has'](n)){l['segmentsToCleanup']['add'](n);n['event']=null;}}fillNextPrevious(j);c['constructor'][a0(0x49e,0x479)][a0(0x446,0x408)][a0(0x465,0x44a)](this,c,d,e,j[a0(0x42b,0x440)]>0x0?j:null);d[a0(0x446,0x455)](this['$'][a0(0x4a7,0x47c)],Boolean(f?.[a0(0x42b,0x431)]));for(const o of j){if(!i[a0(0x4b4,0x48d)](o)&&o[a0(0x490,0x48b)]!==m){o[a0(0x43b,0x42c)](l);o[a0(0x4a4,0x4c6)]=this;m['addEntity'](o);}}}*[U(-0x30,-0x36)](c,d){d=d||[];if(c[a1(0x34a,0x323)]<=0x1){const e=c[a1(0x322,0x323)]?yield*this['convertDurationGen'](c[0x0][a1(0x3c8,0x386)]-c[0x0]['startOffset'],TimeUnit[a1(0x369,0x3aa)],yield this['$'][a1(0x36e,0x35b)]):0x0;d[a1(0x34e,0x34d)]({'identifier':this['$'][a1(0x30e,0x34e)],'proposedArgs':[e,null]});c=null;}d['push']({'identifier':this['$'][a1(0x3ae,0x37d)],'proposedArgs':[c]});function a1(a,b){return U(a,b-0x379);}yield WriteSeveral(d);}*[U(-0x66,-0x1f)](){const c=yield this['$'][a2(0x4b,0xf)];const {graph:d,project:e}=this;const f=e[a2(0x63,0x68)];const g=yield e['$']['autoMergeAdjacentSegments']||this[a2(0x3c,0x37)];const h=yield PreviousValueOf(this['$'][a2(0x66,0xa9)]);let i=yield ProposedOrPrevious;const j=[];let k=![];if(i){const l=new Set();let m=null;let n=![];let o=0x0;const {baseRevision:p}=d['$activeTransaction'];for(const q of i){const r=yield q['$'][a2(0x91,0x67)];const s=yield q['$'][a2(0x6f,0x8b)];const t=yield q['$'][a2(0x37,0x64)];const u=p[a2(0x2f,-0x17)](q['$']['startDate'])&&(yield ProposedArgumentsOf(q['$'][a2(0x3b,0x16)]));const v=p[a2(0x2f,-0x16)](q['$'][a2(0xe,0x3d)])&&(yield ProposedArgumentsOf(q['$'][a2(0xe,0x4e)]));n=n||u?.[0x0]||v?.[0x0];if(r===s){j[a2(0x36,0xb)](q);}else if(g&&m&&r+o<=m['endOffset']){const w=m[a2(0x6f,0xb6)];j[a2(0x36,0x17)](q);if(m[a2(0x71,0x37)]){j[a2(0x36,0x3b)](m);const x=m['startOffset'];const y=n?s+w-r:Math[a2(0x3a,0x42)](s,w);const z=m['cls'];m=f['new']({'event':this,'cls':z,'startOffset':x,'endOffset':y});}else{m['endOffset']=n?s+m[a2(0x6f,0x6e)]-r:Math['max'](s,m['endOffset']);}}else if(!g&&m&&(o||r<m[a2(0x6f,0x2b)])){l['add'](m);j[a2(0x36,0x74)](q);if(r+o<m['endOffset']){o+=m[a2(0x6f,0x50)]-r-o;}m=f['new']({'id':q['id'],'event':this,'cls':m[a2(0x5e,0xa4)],'startOffset':r+o,'endOffset':s+o});}else{if(m){l[a2(0x5c,0x62)](m);}m=q;}}if(m){l[a2(0x5c,0x3f)](m);}if(l['size']===0x1){j[a2(0x36,-0x7)](...l);}k=j['length']>0x0;if(k){i=Array[a2(0x94,0xc7)](l);}fillNextPrevious(i);}else if(h){j[a2(0x36,0x8)](...h);}if(j[a2(0xc,0x2f)]){for(const A of j){A[a2(0x85,0x8a)]=null;e[a2(0x2e,-0x1)][a2(0x5c,0x39)](A);}}if(k){yield*this[a2(0x2c,0x4c)](i);}i=i?.[a2(0xc,-0x1)]>0x1?i:null;function a2(a,b){return U(b,a-0x62);}return i;}*[U(0x36,0x10)](){const c=yield this['$'][a3(0x379,0x37f)];let d=yield this['$']['segments'];const e=yield this['$'][a3(0x369,0x375)];const f=yield this['$'][a3(0x33c,0x35d)];const g=yield this['$'][a3(0x365,0x398)];let h=yield ProposedOrPrevious;function a3(a,b){return U(b,a-0x390);}if(d){const j=this['project'];const k=this[a3(0x39f,0x3c8)];const l=[];const m=[];let n=-0x1;for(let q=d[a3(0x33a,0x309)]-0x1;q>=0x0;q--){const r=d[q];const s=yield r['$'][a3(0x369,0x35e)];const t=yield r['$'][a3(0x33c,0x2f8)];if(s>f){l[a3(0x364,0x3a0)](r);n=q;}else{if(t[a3(0x3be,0x3da)]()!==f[a3(0x3be,0x398)]()){const u=r[a3(0x39d,0x3c2)]+(f[a3(0x3be,0x3c6)]()-t[a3(0x3be,0x38b)]())-r[a3(0x3bf,0x39f)];const v=yield*this[a3(0x3a4,0x3c3)](u,TimeUnit[a3(0x3c1,0x3dc)],yield r['$'][a3(0x372,0x3a6)]);m[a3(0x364,0x338)]({'identifier':r['$'][a3(0x365,0x35e)],'proposedArgs':[v,null]},{'identifier':r['$'][a3(0x33c,0x37e)],'proposedArgs':[f,![]]},{'identifier':r['$'][a3(0x39d,0x3a7)],'proposedArgs':[r[a3(0x39d,0x35d)]+(f[a3(0x3be,0x38c)]()-t[a3(0x3be,0x3da)]())]});}break;}}let o=![];if(n>-0x1){o=!![];d[a3(0x39b,0x382)](n);if(d[a3(0x33a,0x36a)]){d[d[a3(0x33a,0x321)]-0x1][a3(0x37e,0x345)]=null;}for(const w of l){j[a3(0x35c,0x388)][a3(0x38a,0x387)](w);}}let p='';if(d){p=this[a3(0x376,0x37b)](d);}if(p!==this['_lastSegmentsSnapshot']){o=!![];d=d?d[a3(0x357,0x337)]():d;this[a3(0x382,0x33b)]=p;}if(o){yield*this[a3(0x35a,0x373)](d,m);}}return h;}[U(0x2a,-0x1a)](c){c=c||this[a4(0x32a,0x340)];function a4(a,b){return U(a,b-0x33c);}return c?.[a4(0x30b,0x2ea)](d=>''+d[a4(0x361,0x36b)]+'-'+d[a4(0x2f6,0x315)]?.['getTime']()+'-'+d[a4(0x379,0x349)]+'-'+d[a4(0x2e3,0x2e8)]?.[a4(0x33b,0x36a)]())[a4(0x324,0x343)](';');}static[U(-0x2e,0x18)](c,d,e,f,g){if(e){f[a5(0x439,0x40e)]=e['project'];}function a5(a,b){return U(a,b-0x423);}return super['processData'](c,d,e,f,g);}[U(0x1c,0x6)](c){const d=this['project']?.[a6(0x51f,0x554)]||this[a6(0x509,0x510)]?.[a6(0x51f,0x507)];if(!d)return c;const e=c['isModel']?c:d['new'](c);if(!e['event'])e[a6(0x541,0x578)]=this;function a6(a,b){return U(b,a-0x51e);}return e;}[U(0x3b,0xc)](c){if(c===void 0x0)return void 0x0;if(c==null)return null;return c['map'](d=>this['processSegmentValue'](d));}*['calculateStartDate'](){const c=yield this['$'][a7(0x222,0x24f)];const d=c[a7(0x1e2,0x1d7)][a7(0x1f1,0x1fe)](StartDateVar);let e;if(d===startDateByEndDateAndSegmentsFormula[a7(0x208,0x24d)]){e=yield*this['calculateStartDateBySegments']();}else{e=yield*super[a7(0x24e,0x288)]();}function a7(a,b){return U(b,a-0x239);}return e;}*[U(0x42,0x2b)](){const c=yield this['$']['dispatcher'];const d=yield this['$'][a8(0x56,0x85)];const e=yield this['$'][a8(0x34,0x2d)];let f;function a8(a,b){return U(a,b-0x81);}if(d){const g=d[d[a8(-0x14,0x2b)]-0x1];const h=yield g['$'][a8(0x56,0x8e)];const i=yield*this['calculateProjectedXDateWithDuration'](e,![],h,TimeUnit['Millisecond'],{'ignoreSegments':!![]});const j=yield*this['isManuallyScheduled']();f=j&&!this[a8(0x7f,0x4c)]()[a8(0x6b,0x44)]?i:yield*this[a8(0xb9,0x86)](i,!![]);}return f;}*[U(-0xa,0x20)](){const c=yield this['$'][a9(0x34,0x2c)];const d=yield this['$'][a9(0x4f,0x1c)];const e=yield this['$'][a9(0x24,0x67)];let f;if(d){const g=d[d[a9(-0xb,-0x40)]-0x1];const h=yield g['$']['endOffset'];const i=yield*this[a9(-0x1,-0x2)](e,!![],h,TimeUnit['Millisecond'],{'ignoreSegments':!![]});const j=yield*this[a9(0x29,0x4f)]();f=j&&!this['getProject']()[a9(0xe,0xa)]?i:yield*this[a9(0x50,0x59)](i,![]);}function a9(a,b){return U(b,a-0x4b);}return f;}*[U(-0x75,-0x50)](){const c=yield this['$'][aa(0x364,0x351)];function aa(a,b){return U(a,b-0x368);}const d=c[aa(0x34a,0x311)][aa(0x2fb,0x320)](EndDateVar);let e;if(d===endDateByStartDateAndSegmentsFormula[aa(0x31a,0x337)]){e=yield*this[aa(0x39e,0x388)]();}else{e=yield*super['calculateEndDate']();}return e;}*[U(0x24,0x2c)](){let c;if(yield*this[ab(0x293,0x293)]()){c=yield*this[ab(0x28d,0x269)]();}else{c=yield*super['calculateDurationProposed']();}function ab(a,b){return U(a,b-0x2c1);}return c;}*['skipNonWorkingTime'](c,d=!![],e){if(!c)return null;e=Object[ac(0x1ab,0x1cb)]({'ignoreSegments':!![]},e);function ac(a,b){return U(a,b-0x1f0);}return yield*super[ac(0x1f7,0x1f5)](c,d,e);}*['skipWorkingTime'](c,d=!![],e,f,g){function ad(a,b){return U(b,a- -0x1f);}if(!c)return null;g={'ignoreSegments':!![],...g};return yield*super[ad(-0x6a,-0x45)](c,d,e,f,g);}*['calculateDurationBySegments'](){function ae(a,b){return U(a,b-0xe1);}let c;const d=yield this['$'][ae(0xd5,0xca)];const e=yield this['$'][ae(0x7f,0xc3)];const f=yield this['$'][ae(0xb6,0xe5)];if(f){let g=0x0;for(const h of f){g+=h['endOffset']-h['startOffset'];}c=yield*this[ae(0xb4,0xf5)](g,TimeUnit[ae(0x143,0x112)],e);}return c;}*[U(-0x31,-0x44)](c,d){const e=yield this['$'][af(-0x1a,-0x26)];let f=c[af(-0x8,-0x4a)];if(!e||f){return yield*super[af(-0xbc,-0x90)](c,d);}const g=this[af(-0x76,-0x81)]();const h=yield this['$']['effectiveCalendar'];const i=yield this['$']['assignmentsByCalendar'];const j=yield this['$'][af(-0x51,-0x27)];const k=c[af(-0x25,-0x1f)]!==![];const l=(yield this['$'][af(-0x88,-0xa1)])||(yield*this['hasElapsedDuration']())||c[af(-0xb6,-0xa1)]||!i[af(-0x63,-0x8b)];const m=g['maxCalendarRange'];let n=0x1;let o,p,q,r,s;function af(a,b){return U(a,b- -0x4c);}if(!f){r=yield this['$'][af(-0x8a,-0x48)];f=f||!r;if(!f){r=r['slice']();if(k){o=r[af(-0x51,-0x96)]();p=0x0;n=0x1;s=o['nextSegment']?o['endOffset']:MAX_DATE['getTime']();}else{o=r[af(-0xc,-0x2e)]();p=o[af(-0x7f,-0x3f)];n=-0x1;s=o[af(0x7,-0x3f)];}q=s-o[af(0x0,-0x1d)];}}const t=yield*this[af(-0x5d,-0x6e)]();const u=g[af(-0x7d,-0x39)];const v=this['zeroDurationMsThreshold'];return j[af(-0x90,-0x90)](Object['assign']({'maxRange':m},c),(w,x,y)=>{function ag(a,b){return af(b,a- -0x74);}const z=y[ag(-0xe9,-0xca)]();const A=y[ag(-0xf7,-0xc6)]();if(z['get'](h)&&(l||A[ag(-0xef,-0xc2)](B=>i['has'](B))||t&&!g[ag(-0xd6,-0xa0)])){if(f){return d(w,x,y);}else{const B=w[ag(-0x92,-0xda)]();let C=x[ag(-0x92,-0xaf)]()-w[ag(-0x92,-0xb6)]();if(u){const F=w[ag(-0xc7,-0x10b)]()-x[ag(-0xc7,-0xf6)]();C+=F*0x3c*0x3e8;}let D,E;if(k){D=p;E=p+C;}else{D=p-C;E=p;}while(o&&D<=s&&E>o[ag(-0x91,-0x8f)]){const G=Math[ag(-0xe8,-0xef)](D,o[ag(-0x91,-0xd6)]);const H=Math[ag(-0x105,-0xdf)](E,s);const I=new Date(B+G-D);const J=new Date(B+H-D);const K=d(I,J,y);if(K===![])return![];q-=J[ag(-0x92,-0x81)]()-I[ag(-0x92,-0x8e)]();if(q<v){o=k?r['shift']():r['pop']();if(o){s=!k||o[ag(-0xd2,-0xea)]?o[ag(-0xb3,-0xb5)]:MAX_DATE['getTime']();q=s-o['startOffset'];}}else{break;}}p+=n*C;}}});}*['useEventAvailabilityIterator'](){function ah(a,b){return U(b,a- -0x1f2);}const c=yield this['$'][ah(-0x1cc,-0x1bb)];return c||(yield*super[ah(-0x1be,-0x18b)]());}[U(-0x5d,-0x38)](c,d){d=d||this[ai(-0x159,-0x14a)]();function ai(a,b){return U(a,b- -0x129);}if(d){const e=this[ai(-0x119,-0xff)](c,d);return d[e];}}['getSegmentIndexByDate'](c,d){function aj(a,b){return U(a,b-0x179);}d=d||this['getSegments']();return d?d[aj(0x169,0x16e)](e=>c>=e[aj(0x194,0x152)]&&c<e['endDate']):-0x1;}get[U(0x2d,-0x2)](){function ak(a,b){return U(a,b-0x272);}const c=this[ak(0x21a,0x251)]();return c?c[0x0]:null;}get[U(-0x32,-0xa)](){const c=this[al(0x1c9,0x1f4)]();function al(a,b){return U(b,a-0x1ea);}return c?c[c[al(0x194,0x1c0)]-0x1]:null;}['getSegment'](c){function am(a,b){return U(b,a- -0x1ba);}const d=this[am(-0x1db,-0x1af)]();return d?.[c];}async[U(0x53,0x1b)](c,d=0x1,e){const f=this[an(0x238,0x220)]();const g=f['segmentModelClass'];await f[an(0x295,0x286)]();const h=this;if(!c||h[an(0x296,0x255)]&&h[an(0x21e,0x263)]?.[an(0x22e,0x23c)])return;const j=h[an(0x242,0x278)];const k=h[an(0x24f,0x20e)];const m=h['startDate'];const n=h[an(0x219,0x21e)];e=e?_enc[an(0x224,0x20b)](e):k;if(!m||!n||m>=c||c>=n||!j)return;const o=h['isSegmented'];let p=h[an(0x271,0x2a0)]||[];let q,r;if(o){r=h[an(0x297,0x251)](c,p);q=p[r];if(!q)return;}const s=q||h;const t=q?s[an(0x246,0x268)]:m;const u=s['duration'];const v=s[an(0x24f,0x283)];function an(a,b){return U(b,a-0x26d);}const w=s['name'];const x=h['run'](an(0x21f,0x1e9),t,c,v,{'ignoreSegments':!![]});const y=u-x;const z=h[an(0x291,0x2ad)](an(0x281,0x263),d,e,TimeUnit[an(0x29e,0x2b7)]);const A=z+h[an(0x291,0x283)]('calculateProjectedDuration',m,c,TimeUnit['Millisecond'],{'ignoreSegments':!![]});if(q){q['duration']=x;const B=g[an(0x21a,0x201)]({'duration':y,'durationUnit':v,'startOffset':A,'name':w});p=p[an(0x234,0x211)](0x0);p['splice'](r+0x1,0x0,B);h[an(0x271,0x2b4)]=p;h[an(0x242,0x21d)]=j;for(let C=r+0x2,D=p[an(0x217,0x211)];C<D;C++){const E=p[C];if(E){E[an(0x29c,0x28f)]+=z;E[an(0x27a,0x25b)]+=z;}}}else{const F=g[an(0x21a,0x261)]({'duration':x,'durationUnit':v,'startOffset':0x0,'name':w});const G=g[an(0x21a,0x223)]({'duration':j-x,'durationUnit':v,'startOffset':A,'name':w});h[an(0x242,0x255)]=j;h[an(0x271,0x28b)]=[F,G];}return f[an(0x295,0x270)]();}async[U(-0x14,0x12)](c,d){if(!this[ao(-0x251,-0x280)])return;this['forceSegmentsMerging']=!![];c=c||this['firstSegment'];d=d||this[ao(-0x281,-0x242)];if(c['startOffset']>d['startOffset']){let f=d;d=c;c=f;}c[ao(-0x2cb,-0x2e1)]=d[ao(-0x29e,-0x294)];function ao(a,b){return U(b,a- -0x277);}const e=await this['getProject']()[ao(-0x24f,-0x26b)]();this[ao(-0x29d,-0x278)]=![];return e;}[U(-0x61,-0x19)](c,d){function ap(a,b){return U(b,a-0xb9);}if(c==='segments'&&d){const e=[];for(const f of d){if(f instanceof SchedulerProEventSegment){const g=f[ap(0x9c,0x66)]();if(!this[ap(0xca,0xdf)][f[ap(0xa8,0x66)]]||f[ap(0xe0,0x10a)]>this[ap(0xca,0xdc)][f[ap(0xa8,0xe7)]]){Object[ap(0x94,0xc0)](g,f[ap(0xc3,0xc7)][ap(0x87,0x91)]);}e[ap(0x8d,0xc3)](g);this['_segmentGeneration'][f[ap(0xa8,0xc1)]]=f[ap(0xe0,0xf7)];}else{e['push'](f);}}d=e;}super[ap(0xa0,0x98)](c,d);}[U(-0x1a,-0x24)](){const c=this['segments'];if(c){this[aq(0x12e,0x167)]?.[aq(0xe4,0x128)](c);}function aq(a,b){return U(a,b-0x158);}super[aq(0x130,0x134)]();}[U(0x19,0xe)](...c){this['fieldMap'][ar(-0x62,-0x3f)]['_skipSegmentsIsEqual']++;super['endBatch'](...c);function ar(a,b){return U(a,b- -0x43);}this[ar(-0x45,-0x4b)]['segments'][ar(-0x7e,-0x83)]--;}['copy'](c=null,d=null){function as(a,b){return U(b,a- -0x18a);}const e=super[as(-0x196,-0x14e)](c,d);e[as(-0x15a,-0x167)][as(-0x186,-0x15b)]=void 0x0;if(e[as(-0x186,-0x1c2)]){e[as(-0x186,-0x180)]=e[as(-0x186,-0x184)]['map'](f=>Object['assign'](f[as(-0x196,-0x1d5)](),{'event':e}));}return e;}[U(0x15,-0x1d)](){function at(a,b){return U(a,b-0xd3);}const c=super[at(0xb2,0xb6)](),d=this[at(0x62,0x99)](at(0x9e,0xd7)),{persist:e,dataSource:f,complexMapping:g}=d;if(e){let h=_end['getPath'](c,f);if(h){h=h['map'](i=>i[at(0xe2,0xb6)]());_end['setPath'](c,f,h);}}return c;}[U(0x21,-0x5)](...c){function au(a,b){return U(b,a-0x3f6);}const {segments:d}=this;d?.[au(0x3f5,0x415)](e=>e[au(0x3f1,0x40e)](...c));super['unlink'](...c);}}function U(a,b){return _enN(a,b- -0x48d);}b[U(-0x5a,-0x51)]=U(-0x31,-0x13);__decorate([field({'identifierCls':SEDSGDispatcherIdentifier})],b[U(0x49,0x1d)],U(-0x30,-0x17),void 0x0);__decorate([model_field({'type':'array','isEqual':compareSegmentsArray,'convert':segmentsConverter,'_skipSegmentsIsEqual':0x0})],b[U(-0x1,0x1d)],'segments',void 0x0);__decorate([field()],b[U(-0x20,0x1d)],U(-0x25,-0x18),void 0x0);__decorate([field()],b[U(0x2d,0x1d)],'isSegmented',void 0x0);__decorate([write(U(0x30,0x4))],b[U(0xb,0x1d)],'writeSegments',null);__decorate([calculate(U(0x44,0x4))],b[U(0x28,0x1d)],U(0x27,-0x1f),null);__decorate([calculate(U(-0x9,-0x18))],b[U(0x46,0x1d)],U(0x27,0x10),null);return b;}){}export{SEDSGBackwardCycleResolution,SEDSGDispatcherIdentifier,SEDSGForwardCycleResolution,SEDSGGraphDescription,SegmentsVar,SplitEventMixin,compareSegments,compareSegmentsArray,durationByStartDateAndEndDateAndSegmentsFormula,endDateByStartDateAndSegmentsFormula,fillNextPrevious,segmentsConverter,startDateByEndDateAndSegmentsFormula};
1
+ (function(a,b){function L(a,b){return _enb(b- -0x2be,a);}const c=a();while(!![]){try{const d=parseInt(L(-0x1a3,-0x1a4))/0x1+-parseInt(L(-0x152,-0x186))/0x2+-parseInt(L(-0x11c,-0x15a))/0x3+-parseInt(L(-0x1db,-0x18c))/0x4+parseInt(L(-0x16e,-0x16f))/0x5*(-parseInt(L(-0x173,-0x1b8))/0x6)+parseInt(L(-0x1a1,-0x18b))/0x7+parseInt(L(-0x19c,-0x1c0))/0x8*(parseInt(L(-0x147,-0x145))/0x9);if(d===b){break;}else{c['push'](c['shift']());}}catch(e){c['push'](c['shift']());}}}(_ena,0x86aca));var __decorate=function(a,b,e,f){var g=arguments['length'],h=g<0x3?b:f===null?f=Object[M(0x460,0x48b)](b,e):f,j;if(typeof Reflect===M(0x4a1,0x48f)&&typeof Reflect[M(0x50f,0x4cb)]===M(0x484,0x437))h=Reflect['decorate'](a,b,e,f);else for(var k=a['length']-0x1;k>=0x0;k--)if(j=a[k])h=(g<0x3?j(h):g>0x3?j(b,e,h):j(b,e))||h;function M(a,b){return _enb(b-0x356,a);}return g>0x3&&h&&Object[M(0x4b4,0x4a9)](b,e,h),h;};import{HasProposedValue,PreviousValueOf,ProposedArgumentsOf,ProposedOrPrevious,ProposedOrPreviousValueOf,ProposedValueOf,WriteSeveral}from'@bryntum/engine-thin/lib/ChronoGraph/chrono/Effect.js';import{TombStone}from'@bryntum/engine-thin/lib/ChronoGraph/chrono/Quark.js';import{Mixin}from'@bryntum/engine-thin/lib/ChronoGraph/class/Mixin.js';import{CycleDescription,CycleResolution,Formula}from'@bryntum/engine-thin/lib/ChronoGraph/cycle_resolver/CycleResolver.js';import{calculate,field,write}from'@bryntum/engine-thin/lib/ChronoGraph/replica/Entity.js';import _enc from'@bryntum/core-thin/lib/helper/DateHelper.js';import _end from'@bryntum/core-thin/lib/helper/ObjectHelper.js';import{model_field}from'../../../chrono/ModelFieldAtom.js';import{Direction,TimeUnit}from'../../../scheduling/Types.js';import{MAX_DATE}from'../../../util/Constants.js';import{durationFormula,DurationVar,endDateFormula,EndDateVar,startDateFormula,StartDateVar}from'../scheduler_basic/BaseEventDispatcher.js';import{SEDWUDispatcherIdentifier}from'./HasEffortDispatcher.js';import{HasEffortMixin}from'./HasEffortMixin.js';import{HasPercentDoneMixin}from'./HasPercentDoneMixin.js';import{SchedulerProEventSegment}from'./SchedulerProEventSegment.js';const SegmentsVar=Symbol('SegmentsVar');const segmentsConverter=(a,b,c)=>c[_enN(0x490,0x49a)](a);const segmentSerializer=a=>a===null?null:a?.[_enN(0x47c,0x47b)](b=>b[_enN(0x45f,0x4a1)]);function _ena(){const au=['rawModifications','skipNonWorkingTimeInDurationWhenSchedulingManually','calculateAdjustedSegments','toJSON','getSegments','zeroDurationMsThreshold','2263512QTlDMq','6004950wCkfoc','every','getOwnPropertyDescriptor','getSegmentsSnapshot','ignoreSegments','1091248GuUjeb','object','getSegmentIndexByDate','dispatcher','adjustDurationToDST','durationUnit','reduce','getSegmentByDate','replica','equality','event','calculateStartDate','lastSegment','assignmentsByCalendar','formulaId','push','hasElapsedDuration','autoMergeAdjacentSegments','ignoreResourceCalendar','endDate','slice','get','endBatch','29735FGEcmB','cycleResolutionContext','min','some','defineProperty','nextSegment','hasIdentifier','effectiveDirection','$activeTransaction','add','copy','graph','isManuallyScheduled','hasSegmentChangesProposed','calculateDurationBySegments','shift','direction','$originalEvent','leaveProject','name','commitAsync','2191443QwdIwg','_processingDataForProject','forEach','internalClearChanges','isSegmented','getLatestStableEntryFor','prototype','SplitEventMixin','None','segmentModelClass','calculateSegments','forceSegmentsMerging','writeSegments','processSegmentValue','getCalendarsWorkStatus','unlink','getFieldDataSource','decorate','getPath','getProject','_segmentGeneration','12227337rpFGoi','$name','isHasSubEventsMixin','segmentsToCleanup','constructor','isModel','function','call','_skipSegmentsIsEqual','splice','getValue','calculateProjectedXDateWithDuration','startDate','modified','getCalendarsWorking','skipNonWorkingTimeWhenSchedulingManually','new','size','endOffset','calculateDurationProposed','calculateEndDate','segmentsMergeArgs','splitToSegments','Millisecond','assign','_lastSegmentsSnapshot','isForward','forEachAvailabilityInterval','persistableData','adjustedSegments','resolution','calculateProjectedDuration','setProject','duration','$PhantomId','8Clxcma','pop','processData','effectiveCalendarsCombination','convertDurationGen','calculateEndDateBySegments','Forward','startOffset','306CRbgHR','fieldMap','cls','firstSegment','join','skipNonWorkingTime','internalId','convert','run','calculateStartDateBySegments','segmentIndex','has','write','mergeSegments','map','data','max','project','findIndex','generation','480463pdzjpH','addProposedValueFlag','addEntity','removeEntities','meta','array','previousSegment','prepareDispatcher','clearChanges','length','segments','getTimezoneOffset','getTime','doWriteSegments','processSegmentsValue','effectiveCalendar','storeFieldChange','set'];_ena=function(){return au;};return _ena();}const startDateByEndDateAndSegmentsFormula=Formula['new']({'output':StartDateVar,'inputs':new Set([EndDateVar,SegmentsVar])});const endDateByStartDateAndSegmentsFormula=Formula[_enN(0x453,0x48c)]({'output':EndDateVar,'inputs':new Set([StartDateVar,SegmentsVar])});function _enN(a,b){return _enb(a-0x368,b);}function _enb(a,b){const c=_ena();_enb=function(d,e){d=d-0xe1;let f=c[d];return f;};return _enb(a,b);}const durationByStartDateAndEndDateAndSegmentsFormula=Formula[_enN(0x453,0x47e)]({'output':DurationVar,'inputs':new Set([StartDateVar,EndDateVar,SegmentsVar])});const SEDSGGraphDescription=CycleDescription[_enN(0x453,0x471)]({'variables':new Set([StartDateVar,EndDateVar,DurationVar,SegmentsVar]),'formulas':new Set([endDateByStartDateAndSegmentsFormula,startDateByEndDateAndSegmentsFormula,startDateFormula,endDateFormula,durationFormula])});const SEDSGForwardCycleResolution=CycleResolution['new']({'description':SEDSGGraphDescription,'defaultResolutionFormulas':new Set([endDateFormula,endDateByStartDateAndSegmentsFormula])});const SEDSGBackwardCycleResolution=CycleResolution[_enN(0x453,0x41d)]({'description':SEDSGGraphDescription,'defaultResolutionFormulas':new Set([startDateFormula,startDateByEndDateAndSegmentsFormula])});class SEDSGDispatcherIdentifier extends SEDWUDispatcherIdentifier{[_enN(0x4a9,0x4dd)](a,b){function O(a,b){return _enN(a- -0x6ac,b);}const c=a[O(-0x24b,-0x22d)];const d=b[O(-0x24b,-0x215)];return super[O(-0x203,-0x207)](a,b)&&c[O(-0x1f7,-0x1ef)](SegmentsVar)===d[O(-0x1f7,-0x245)](SegmentsVar);}}function compareSegmentsArray(c,d,e){if(!c&&!d)return!![];function P(a,b){return _enN(a- -0x652,b);}if(this['_skipSegmentsIsEqual'])return![];if(!c&&d||c&&!d)return![];if(c[P(-0x1c7,-0x1c4)]!==d['length'])return![];return c[P(-0x1b6,-0x1d9)]((f,g)=>compareSegments(f,d[g],e));}const compareSegments=(c,d,e)=>{if(c===d)return c[Q(0x458,0x494)]?c['rawModifications']==null:!![];const f=c[Q(0x458,0x476)]?c:d[Q(0x458,0x410)]?d:e?.[Q(0x3f1,0x3a2)]?.[Q(0x447,0x40c)]??d;const g=f[Q(0x3e1,0x3e7)];const h=c[Q(0x3c1,0x375)]instanceof Date?c[Q(0x3c1,0x3ea)][Q(0x400,0x429)]():g[Q(0x3c1,0x40e)][Q(0x3e7,0x435)](c[Q(0x3c1,0x3bc)])?.[Q(0x400,0x41c)]();const i=d[Q(0x3c1,0x381)]instanceof Date?d['startDate'][Q(0x400,0x426)]():g['startDate']['convert'](d[Q(0x3c1,0x3ca)])?.[Q(0x400,0x41b)]();function Q(a,b){return _enN(a- -0x8e,b);}const j=c['endDate']instanceof Date?c[Q(0x425,0x3dc)]['getTime']():g[Q(0x425,0x3d8)][Q(0x3e7,0x3f9)](c[Q(0x425,0x3f7)])?.[Q(0x400,0x3db)]();const k=d['endDate']instanceof Date?d[Q(0x425,0x447)][Q(0x400,0x442)]():g[Q(0x425,0x423)][Q(0x3e7,0x3ab)](d[Q(0x425,0x436)])?.[Q(0x400,0x437)]();return h===i&&j===k;};const fillNextPrevious=a=>{a[R(0xe1,0x10b)]((b,c,d)=>{if(b){b[S(-0xc8,-0x10b)]=c;}function S(a,b){return R(b,a- -0x1e9);}c[S(-0xfc,-0x102)]=b;c[S(-0x10c,-0xf0)]=d;return c;},null);function R(a,b){return _enN(b- -0x39b,a);}if(a[R(0x10f,0xf0)]){a[a[R(0x10f,0xf0)]-0x1][R(0x128,0x121)]=null;}};class SplitEventMixin extends Mixin([HasEffortMixin,HasPercentDoneMixin],a=>{class b extends a{constructor(){super(...arguments);function T(a,b){return _enb(b-0x18,a);}this[T(0x1c6,0x190)]={};}get['rawModifications'](){let c=super[U(0x168,0x14b)];function U(a,b){return _enb(a-0x3c,b);}if(this['segments']&&(!c||!('segments'in c))){for(const d of this[U(0x160,0x16a)]){if(d['rawModifications']){c=c||{};c[U(0x160,0x167)]=this['getFieldPersistentValue'](U(0x160,0x1a4));break;}}}else if(!this['segments']&&U(0x160,0x124)in(this[U(0x15a,0x1a3)][U(0x124,0xdf)]||{})&&(!c||!(U(0x160,0x139)in c))){c=c||{};c[U(0x160,0x11b)]=null;}return c;}[V(-0x190,-0x187)](c,d,e,...f){for(const g of this['segments']||[]){if(g[W(0x411,0x3f2)]){g[W(0x3fa,0x3b7)][W(0x375,0x399)](g,c,d,null,...f);}}function W(a,b){return V(a-0x58a,b);}super[W(0x3fa,0x3e9)]['call'](this,c,d,e,...f);}*[V(-0x1d6,-0x212)](c){function X(a,b){return V(a- -0x89,b);}const d=yield*super['prepareDispatcher'](c);if(yield*this[X(-0x224,-0x1de)]()){d[X(-0x265,-0x276)](SegmentsVar);}return d;}[V(-0x1a7,-0x19a)](c){const d=c(this['$'][Y(0x320,0x365)]);function Y(a,b){return V(b-0x506,a);}return d[Y(0x39c,0x36e)]===Direction[Y(0x325,0x313)]||d[Y(0x323,0x36e)]===Direction[Y(0x353,0x37b)]?SEDSGForwardCycleResolution:SEDSGBackwardCycleResolution;}*['hasSegmentChangesProposed'](){function Z(a,b){return V(a-0x3cf,b);}const c=yield ProposedValueOf(this['$'][Z(0x1fc,0x20a)]);let d=![];if(yield HasProposedValue(this['$']['segments'])){d=Boolean(c);}const e=yield ProposedOrPreviousValueOf(this['$'][Z(0x1fc,0x229)]);if(!e)return![];for(const f of e){const g=yield HasProposedValue(f['$']['startDate']);const h=yield HasProposedValue(f['$'][Z(0x223,0x26f)]);const i=yield HasProposedValue(f['$']['duration']);if(g||h||i)d=!![];}return d;}[V(-0x187,-0x1ba)](c,d,e,f){const g=d[a0(-0xf1,-0xf0)](c)?.[a0(-0x1ba,-0x174)]();const h=g!==TombStone?g??[]:[];const i=new Set(h);const j=(f??[])[a0(-0x11c,-0x145)](n=>n[a0(-0xae,-0xdb)]?n:this[a0(-0xf6,-0xe8)](n));const k=new Set(j);const l=this[a0(-0x14a,-0x142)];const m=l[a0(-0x158,-0x119)];for(const n of h){if(!k[a0(-0x15f,-0x148)](n)){l[a0(-0xe6,-0xdd)][a0(-0x122,-0x101)](n);n[a0(-0x140,-0x117)]=null;}}fillNextPrevious(j);function a0(a,b){return V(b-0x9e,a);}c['constructor'][a0(-0xb0,-0xef)][a0(-0x17e,-0x147)]['call'](this,c,d,e,j[a0(-0x103,-0x136)]>0x0?j:null);d[a0(-0x12d,-0x147)](this['$'][a0(-0xf0,-0xf1)],Boolean(f?.[a0(-0x153,-0x136)]));for(const o of j){if(!i[a0(-0x132,-0x148)](o)&&o['graph']!==m){o[a0(-0x164,-0x15e)](l);o[a0(-0xd6,-0x117)]=this;m[a0(-0x111,-0x13d)](o);}}}*['doWriteSegments'](c,d){function a1(a,b){return V(a-0x507,b);}d=d||[];if(c[a1(0x333,0x2fd)]<=0x1){if(this[a1(0x300,0x2dc)]?.[0x0]!==!![]){const e=c[a1(0x333,0x332)]?yield*this[a1(0x312,0x30d)](c[0x0][a1(0x2fd,0x33c)]-c[0x0][a1(0x315,0x342)],TimeUnit[a1(0x302,0x328)],yield this['$'][a1(0x34d,0x33e)]):0x0;d[a1(0x357,0x348)]({'identifier':this['$']['duration'],'proposedArgs':[e,null]});}c=null;}d[a1(0x357,0x35b)]({'identifier':this['$'][a1(0x334,0x383)],'proposedArgs':[c]});yield WriteSeveral(d);}*[V(-0x189,-0x19a)](){const c=yield this['$'][a2(-0x101,-0xf2)];const {graph:d,project:e}=this;const f=e[a2(-0xcf,-0xc6)];const g=yield e['$'][a2(-0xf3,-0xd8)]||this[a2(-0xcd,-0xd1)];const h=yield PreviousValueOf(this['$']['segments']);let i=yield ProposedOrPrevious;const j=[];let k=![];if(i){const l=new Set();let m=null;let n=![];let o=0x0;const {baseRevision:p}=d[a2(-0xe5,-0x11e)];for(const q of i){const r=yield q['$'][a2(-0x137,-0x185)];const s=yield q['$'][a2(-0x14f,-0x118)];const t=yield q['$']['duration'];const u=p['hasIdentifier'](q['$'][a2(-0x155,-0x10b)])&&(yield ProposedArgumentsOf(q['$']['startDate']));const v=p[a2(-0xe7,-0x125)](q['$'][a2(-0xf1,-0x111)])&&(yield ProposedArgumentsOf(q['$'][a2(-0xf1,-0xee)]));n=n||u?.[0x0]||v?.[0x0];if(r===s){j[a2(-0xf5,-0xfb)](q);}else if(g&&m&&r+o<=m[a2(-0x14f,-0x19c)]){const w=m[a2(-0x14f,-0x189)];j['push'](q);if(m['graph']){j[a2(-0xf5,-0x142)](m);const x=m[a2(-0x137,-0xfc)];const y=n?s+w-r:Math[a2(-0x126,-0x111)](s,w);const z=m[a2(-0x134,-0x13f)];m=f[a2(-0x151,-0x18a)]({'event':this,'cls':z,'startOffset':x,'endOffset':y});}else{m['endOffset']=n?s+m[a2(-0x14f,-0x11d)]-r:Math['max'](s,m[a2(-0x14f,-0x13b)]);}}else if(!g&&m&&(o||r<m[a2(-0x14f,-0x12d)])){l[a2(-0xe4,-0xbc)](m);j[a2(-0xf5,-0x141)](q);if(r+o<m[a2(-0x14f,-0x18f)]){o+=m[a2(-0x14f,-0x130)]-r-o;}m=f[a2(-0x151,-0x16c)]({'id':q['id'],'event':this,'cls':m['cls'],'startOffset':r+o,'endOffset':s+o});}else{if(m){l['add'](m);}m=q;}}if(m){l[a2(-0xe4,-0x117)](m);}if(l['size']===0x1){j['push'](...l);}k=j['length']>0x0;if(k){i=Array['from'](l);}fillNextPrevious(i);}else if(h){j[a2(-0xf5,-0xbb)](...h);}if(j[a2(-0x119,-0x157)]){for(const A of j){if(!A['$originalEvent']){A[a2(-0xdc,-0x100)]=A[a2(-0xfa,-0xf0)];}A[a2(-0xfa,-0xe0)]=null;e[a2(-0xc0,-0x95)]['add'](A);}}if(k){yield*this[a2(-0x115,-0x154)](i);}function a2(a,b){return V(a-0xbb,b);}i=i?.['length']>0x1?i:null;return i;}*[V(-0x1c9,-0x1d3)](){const c=yield this['$']['dispatcher'];let d=yield this['$'][a3(0x67,0x31)];const e=yield this['$'][a3(0x2c,-0xc)];const f=yield this['$']['endDate'];const g=yield this['$']['duration'];function a3(a,b){return V(b-0x204,a);}let h=yield ProposedOrPrevious;if(d){const j=this[a3(-0x28,0x24)];const k=this[a3(0xa2,0x67)];const l=[];const m=[];let n=-0x1;for(let q=d[a3(0x62,0x30)]-0x1;q>=0x0;q--){const r=d[q];const s=yield r['$'][a3(0x2b,-0xc)];const t=yield r['$']['endDate'];if(s>f){l[a3(0x11,0x54)](r);n=q;}else{if(t['getTime']()!==f[a3(-0xd,0x33)]()){const u=r[a3(0x1f,-0x6)]+(f['getTime']()-t[a3(0x4,0x33)]())-r['startOffset'];const v=yield*this[a3(0x5d,0xf)](u,TimeUnit[a3(-0x13,-0x1)],yield r['$'][a3(0x85,0x4a)]);m[a3(0x20,0x54)]({'identifier':r['$'][a3(0x3c,0x9)],'proposedArgs':[v,null]},{'identifier':r['$'][a3(0xa,0x58)],'proposedArgs':[f,![]]},{'identifier':r['$'][a3(-0x19,-0x6)],'proposedArgs':[r[a3(0x29,-0x6)]+(f[a3(0x23,0x33)]()-t['getTime']())]});}break;}}let o=![];if(n>-0x1){o=!![];d[a3(-0x17,-0xf)](n);if(d['length']){d[d[a3(0x63,0x30)]-0x1][a3(0x8a,0x61)]=null;}for(const w of l){j[a3(0xd3,0x89)][a3(0x9f,0x65)](w);}}let p='';if(d){p=this['getSegmentsSnapshot'](d);}if(p!==this['_lastSegmentsSnapshot']){o=!![];d=d?d['slice']():d;this[a3(0x10,0x1)]=p;}if(o){yield*this[a3(0x39,0x34)](d,m);}}return h;}[V(-0x1c1,-0x20d)](c){c=c||this[a4(0x42a,0x46c)];function a4(a,b){return V(a-0x5fd,b);}return c?.[a4(0x41a,0x447)](d=>''+d[a4(0x40b,0x3bd)]+'-'+d[a4(0x3ed,0x43a)]?.[a4(0x42c,0x440)]()+'-'+d[a4(0x3f3,0x3fa)]+'-'+d[a4(0x451,0x409)]?.[a4(0x42c,0x429)]())[a4(0x410,0x3c3)](';');}static[V(-0x1f7,-0x1fe)](c,d,e,f,g){if(e){f[a5(0x50d,0x4d3)]=e[a5(0x4bf,0x490)];}function a5(a,b){return V(a-0x69f,b);}const h=f[a5(0x525,0x554)][a5(0x51c,0x4e5)](a5(0x4cc,0x4fb));const i=f['constructor'][a5(0x51c,0x54c)](a5(0x48f,0x495));const j=e?.['project']?.[a5(0x515,0x4cd)]?.[a5(0x51c,0x52b)]('startDate')??a5(0x48f,0x4d4);if(_end['getPath'](c,h)?.[a5(0x4cb,0x4c2)]&&!_end['getPath'](c,i)){const k=_end[a5(0x51e,0x533)](c,h)[0x0];const l=_end['getPath'](k,j);if(l){_end['setPath'](c,i,l);}}return super[a5(0x4a8,0x46d)](c,d,e,f,g);}['processSegmentValue'](c){const d=this[a6(0x4f4,0x4ae)]?.['segmentModelClass']||this[a6(0x4d0,0x4fc)]?.[a6(0x509,0x504)];if(!d)return c;function a6(a,b){return V(b-0x68e,a);}const e=c[a6(0x550,0x515)]?c:d[a6(0x464,0x482)](c,!![]);if(!e[a6(0x4d2,0x4d9)])e['event']=this;return e;}[V(-0x1cf,-0x1b7)](c){function a7(a,b){return V(a-0x45a,b);}if(c===void 0x0)return void 0x0;if(c==null)return null;return c[a7(0x277,0x232)](d=>{function a8(a,b){return a7(b- -0x37a,a);}if(!d['isModel']){if(this[a8(-0x80,-0xaf)]){const e=this[a8(-0x136,-0x100)]?.['phantomIdField']??a8(-0x134,-0x11a);const f=this[a8(-0x105,-0xf3)]['find'](g=>g['id']===d[e]||g['id']===d['id']);if(f){delete d[e];f[a8(-0xb5,-0xec)](d);f[a8(-0x134,-0xf5)](![],!![],d);return f;}}return this[a8(-0xa7,-0xa6)](d);}return this[a8(-0x8b,-0xa6)](d);});}*[V(-0x1b4,-0x1a8)](){const c=yield this['$'][a9(0xff,0x10c)];const d=c[a9(0xbd,0xac)][a9(0x111,0xc5)](StartDateVar);let e;if(d===startDateByEndDateAndSegmentsFormula[a9(0x10a,0x14c)]){e=yield*this[a9(0xd3,0xe0)]();}else{e=yield*super['calculateStartDate']();}function a9(a,b){return V(a-0x2bb,b);}return e;}*[V(-0x1e8,-0x1ac)](){const c=yield this['$'][aa(0x212,0x247)];const d=yield this['$'][aa(0x214,0x230)];const e=yield this['$']['endDate'];let f;if(d){const g=d[d[aa(0x23b,0x22f)]-0x1];const h=yield g['$'][aa(0x1b0,0x1f9)];const i=yield*this[aa(0x1de,0x1f2)](e,![],h,TimeUnit['Millisecond'],{'ignoreSegments':!![]});const j=yield*this[aa(0x288,0x267)]();f=j&&!this['getProject']()[aa(0x1f8,0x1f6)]?i:yield*this[aa(0x205,0x217)](i,!![]);}function aa(a,b){return V(b-0x403,a);}return f;}*[V(-0x1f4,-0x1c6)](){const c=yield this['$'][ab(0x2db,0x2fc)];const d=yield this['$'][ab(0x2d3,0x2e5)];const e=yield this['$'][ab(0x2c5,0x2a8)];let f;if(d){const g=d[d[ab(0x2e5,0x2e4)]-0x1];const h=yield g['$'][ab(0x263,0x2ae)];const i=yield*this[ab(0x260,0x2a7)](e,!![],h,TimeUnit[ab(0x2d9,0x2b3)],{'ignoreSegments':!![]});const j=yield*this[ab(0x30a,0x31c)]();f=j&&!this[ab(0x34c,0x338)]()[ab(0x2c4,0x2ab)]?i:yield*this[ab(0x295,0x2cc)](i,![]);}function ab(a,b){return V(b-0x4b8,a);}return f;}*['calculateEndDate'](){function ac(a,b){return V(a-0x1af,b);}const c=yield this['$']['dispatcher'];const d=c[ac(-0x4f,-0x38)][ac(0x5,-0x1b)](EndDateVar);let e;if(d===endDateByStartDateAndSegmentsFormula[ac(-0x2,0x34)]){e=yield*this[ac(-0x45,-0x28)]();}else{e=yield*super[ac(-0x59,-0x54)]();}return e;}*['calculateDurationProposed'](){let c;function ad(a,b){return V(b-0x87,a);}if(yield*this['hasSegmentChangesProposed']()){c=yield*this[ad(-0x134,-0x113)]();}else{c=yield*super[ad(-0x152,-0x182)]();}return c;}*[V(-0x1ec,-0x1ad)](c,d=!![],e){if(!c)return null;function ae(a,b){return V(b- -0x7d,a);}e=Object['assign']({'ignoreSegments':!![]},e);return yield*super[ae(-0x243,-0x269)](c,d,e);}*['skipWorkingTime'](c,d=!![],e,f,g){if(!c)return null;g={'ignoreSegments':!![],...g};return yield*super['skipWorkingTime'](c,d,e,f,g);}*[V(-0x19a,-0x1e6)](){let c;const d=yield this['$'][af(-0xa6,-0x5d)];function af(a,b){return V(a-0x116,b);}const e=yield this['$'][af(-0xa4,-0x6a)];const f=yield this['$']['segments'];if(f){let g=0x0;for(const h of f){g+=h['endOffset']-h[af(-0xdc,-0xda)];}c=yield*this[af(-0xdf,-0xec)](g,TimeUnit['Millisecond'],e);}return c;}*[V(-0x201,-0x203)](c,d){const e=yield this['$']['isSegmented'];let f=c[ag(0x6a,0x41)];if(!e||f){return yield*super[ag(-0x49,0x0)](c,d);}const g=this[ag(0x99,0x81)]();const h=yield this['$'][ag(0x2d,0x33)];const i=yield this['$'][ag(0x29,0x4f)];const j=yield this['$'][ag(-0x10,0xb)];const k=c[ag(0x10,-0x1)]!==![];const l=(yield this['$'][ag(0x97,0x54)])||(yield*this[ag(0x9,0x52)]())||c[ag(0x22,0x54)]||!i[ag(0x3d,-0xa)];const m=g['maxCalendarRange'];let n=0x1;let o,p,q,r,s;if(!f){r=yield this['$'][ag(0x44,0x2e)];f=f||!r;if(!f){r=r[ag(0x1b,0x56)]();if(k){o=r['shift']();p=0x0;n=0x1;s=o[ag(0x2a,0x5e)]?o['endOffset']:MAX_DATE[ag(0x53,0x30)]();}else{o=r[ag(-0x17,0x9)]();p=o['endOffset'];n=-0x1;s=o['endOffset'];}q=s-o[ag(-0x3b,0xf)];}}function ag(a,b){return V(b-0x201,a);}const t=yield*this[ag(0x27,0x65)]();const u=g[ag(0x1,0x46)];const v=this[ag(-0x5,0x3b)];return j[ag(0x25,0x0)](Object[ag(0x3e,-0x3)]({'maxRange':m},c),(w,x,y)=>{const z=y[ah(0x2cd,0x2e5)]();const A=y[ah(0x244,0x22e)]();function ah(a,b){return ag(b,a-0x251);}if(z[ah(0x2a8,0x2f7)](h)&&(l||A[ah(0x2ad,0x29b)](B=>i[ah(0x26c,0x266)](B))||t&&!g[ah(0x288,0x283)])){if(f){return d(w,x,y);}else{const B=w[ah(0x281,0x29e)]();let C=x[ah(0x281,0x2a9)]()-w['getTime']();if(u){const F=w[ah(0x280,0x25b)]()-x['getTimezoneOffset']();C+=F*0x3c*0x3e8;}let D,E;if(k){D=p;E=p+C;}else{D=p-C;E=p;}while(o&&D<=s&&E>o[ah(0x260,0x24d)]){const G=Math[ah(0x271,0x235)](D,o[ah(0x260,0x2ac)]);const H=Math[ah(0x2ac,0x2f6)](E,s);const I=new Date(B+G-D);const J=new Date(B+H-D);const K=d(I,J,y);if(K===![])return![];q-=J[ah(0x281,0x28d)]()-I[ah(0x281,0x25b)]();if(q<v){o=k?r[ah(0x2b9,0x2e1)]():r[ah(0x25a,0x299)]();if(o){s=!k||o[ah(0x2af,0x285)]?o[ah(0x248,0x201)]:MAX_DATE[ah(0x281,0x27b)]();q=s-o[ah(0x260,0x232)];}}else{break;}}p+=n*C;}}});}*['useEventAvailabilityIterator'](){const c=yield this['$'][ai(0x10f,0x118)];function ai(a,b){return V(a-0x29e,b);}return c||(yield*super['useEventAvailabilityIterator']());}[V(-0x1b8,-0x192)](c,d){function aj(a,b){return V(b-0x3f6,a);}d=d||this[aj(0x262,0x22f)]();if(d){const e=this[aj(0x258,0x239)](c,d);return d[e];}}[V(-0x1bd,-0x179)](c,d){d=d||this[ak(0x311,0x312)]();function ak(a,b){return V(a-0x4d8,b);}return d?d[ak(0x2f9,0x31d)](e=>c>=e['startDate']&&c<e['endDate']):-0x1;}get[V(-0x1ee,-0x1fb)](){const c=this[al(0x300,0x345)]();function al(a,b){return V(a-0x4c7,b);}return c?c[0x0]:null;}get[V(-0x1b3,-0x166)](){function am(a,b){return V(a-0x4bc,b);}const c=this[am(0x2f5,0x2b6)]();return c?c[c[am(0x2e8,0x2ef)]-0x1]:null;}['getSegment'](c){const d=this['getSegments']();return d?.[c];}async[V(-0x206,-0x244)](c,d=0x1,e){const f=this[an(-0x1fd,-0x1cd)]();const g=f[an(-0x207,-0x1c1)];await f[an(-0x211,-0x23a)]();const h=this;if(!c||h[an(-0x1f9,-0x241)]&&h['childEvents']?.[an(-0x288,-0x26f)])return;const j=h[an(-0x278,-0x25d)];const k=h[an(-0x237,-0x23b)];const m=h[an(-0x28d,-0x28b)];const n=h[an(-0x229,-0x1eb)];e=e?_enc['normalizeUnit'](e):k;if(!m||!n||m>=c||c>=n||!j)return;const o=h[an(-0x20c,-0x22b)];let p=h['segments']||[];function an(a,b){return V(a- -0x7d,b);}let q,r;if(o){r=h[an(-0x23a,-0x226)](c,p);q=p[r];if(!q)return;}const s=q||h;const t=q?s[an(-0x28d,-0x26f)]:m;const u=s[an(-0x278,-0x266)];const v=s[an(-0x237,-0x259)];const w=s[an(-0x212,-0x1c5)];const x=h[an(-0x266,-0x244)](an(-0x27a,-0x270),t,c,v,{'ignoreSegments':!![]});const y=u-x;const z=h[an(-0x266,-0x21c)](an(-0x272,-0x242),d,e,TimeUnit[an(-0x282,-0x29f)]);const A=z+h[an(-0x266,-0x285)](an(-0x27a,-0x27b),m,c,TimeUnit[an(-0x282,-0x241)],{'ignoreSegments':!![]});if(q){q[an(-0x278,-0x23d)]=x;const B=g[an(-0x289,-0x258)]({'duration':y,'durationUnit':v,'startOffset':A,'name':w});p=p['slice'](0x0);p[an(-0x290,-0x263)](r+0x1,0x0,B);h['segments']=p;h['duration']=j;for(let C=r+0x2,D=p[an(-0x251,-0x288)];C<D;C++){const E=p[C];if(E){E['startOffset']+=z;E[an(-0x287,-0x26c)]+=z;}}}else{const F=g['new']({'duration':x,'durationUnit':v,'startOffset':0x0,'name':w});const G=g['new']({'duration':j-x,'durationUnit':v,'startOffset':A,'name':w});h['duration']=j;h[an(-0x250,-0x25d)]=[F,G];}return f[an(-0x211,-0x1d5)]();}async[V(-0x1e4,-0x1d2)](c,d,e=![]){if(!this['isSegmented'])return;this[ao(0x352,0x366)]=!![];this[ao(0x2d3,0x321)]=[e];function ao(a,b){return V(a-0x4da,b);}c=c||this[ao(0x2ec,0x2f9)];d=d||this[ao(0x327,0x304)];if(c['startOffset']>d[ao(0x2e8,0x2dd)]){let g=d;d=c;c=g;}if(e){let h=0x0,i=c,j=c[ao(0x2d0,0x313)];while(i=i['nextSegment']){const {startOffset:k,endOffset:l}=i;h+=k-j;j=l;i['startOffset']=k;i['duration']=0x0;if(i===d)break;}c['endOffset']=j-h;c[ao(0x2e8,0x2d9)]=c[ao(0x2e8,0x299)];i=d;while(i=i['nextSegment']){i[ao(0x2e8,0x2f7)]-=h;}}else{c[ao(0x32e,0x36a)]=d[ao(0x2ca,0x282)];}const f=await this[ao(0x35a,0x375)]()[ao(0x346,0x38e)]();this[ao(0x352,0x367)]=![];this[ao(0x2d3,0x2ad)]=null;return f;}[V(-0x1cd,-0x1ac)](c,d){if(c===ap(0x58,0x1e)&&d){const e=[];for(const f of d){if(f instanceof SchedulerProEventSegment){const g=f[ap(0x6e,0x29)]();if(!this['_segmentGeneration'][f[ap(0x53,0x6)]]||f[ap(0x13,0x13)]>this[ap(0x4a,0x72)][f[ap(0x1d,0x6)]]){Object[ap(-0x51,-0x13)](g,f[ap(0x19,0x18)][ap(-0x14,-0x1e)]);}e[ap(0x45,0x41)](g);this[ap(0x6d,0x72)][f['internalId']]=f[ap(0x5,0x13)];}else{e[ap(0x89,0x41)](f);}}d=e;}function ap(a,b){return V(b-0x1f1,a);}super[ap(-0x8,0x24)](c,d);}['leaveProject'](){const c=this[aq(0x2d3,0x300)];if(c){this[aq(0x36d,0x336)]?.[aq(0x334,0x2f9)](c);}function aq(a,b){return V(b-0x4d3,a);}super[aq(0x36e,0x33d)]();}[V(-0x1a9,-0x17e)](...c){function ar(a,b){return V(b-0x257,a);}this[ar(0xaa,0x67)][ar(0x4f,0x84)][ar(0x39,0x43)]++;super[ar(0x7b,0xae)](...c);this[ar(0x77,0x67)]['segments'][ar(0x21,0x43)]--;}['copy'](c=null,d=null){const e=super[as(-0xb5,-0x8b)](c,d);e[as(-0x11a,-0xcf)][as(-0xa2,-0xc0)]=void 0x0;if(e[as(-0xe3,-0xc0)]){e[as(-0x8b,-0xc0)]=e[as(-0xad,-0xc0)][as(-0x10e,-0xd0)](f=>Object[as(-0xd2,-0xf1)](f['copy'](),{'event':e}));}function as(a,b){return V(b-0x113,a);}return e;}[V(-0x184,-0x157)](...c){const {segments:d}=this;function at(a,b){return V(a-0x55c,b);}d?.[at(0x3cb,0x396)](e=>e[at(0x3d8,0x407)](...c));super[at(0x3d8,0x3f6)](...c);}}function V(a,b){return _enN(a- -0x65f,b);}b[V(-0x17d,-0x170)]=V(-0x18c,-0x160);__decorate([field({'identifierCls':SEDSGDispatcherIdentifier})],b[V(-0x18d,-0x1d5)],V(-0x1bc,-0x1e2),void 0x0);__decorate([model_field({'type':V(-0x1d8,-0x1cb),'isEqual':compareSegmentsArray,'convert':segmentsConverter,'serialize':segmentSerializer,'_skipSegmentsIsEqual':0x0})],b['prototype'],V(-0x1d3,-0x1ac),void 0x0);__decorate([field()],b[V(-0x18d,-0x1a6)],'adjustedSegments',void 0x0);__decorate([field()],b['prototype'],V(-0x18f,-0x170),void 0x0);__decorate([write(V(-0x1d3,-0x21b))],b['prototype'],V(-0x187,-0x14f),null);__decorate([calculate(V(-0x1d3,-0x1ad))],b[V(-0x18d,-0x1ac)],V(-0x189,-0x1d2),null);__decorate([calculate(V(-0x1ff,-0x249))],b[V(-0x18d,-0x178)],V(-0x1c9,-0x1d4),null);return b;}){}export{SEDSGBackwardCycleResolution,SEDSGDispatcherIdentifier,SEDSGForwardCycleResolution,SEDSGGraphDescription,SegmentsVar,SplitEventMixin,compareSegments,compareSegmentsArray,durationByStartDateAndEndDateAndSegmentsFormula,endDateByStartDateAndSegmentsFormula,fillNextPrevious,segmentSerializer,segmentsConverter,startDateByEndDateAndSegmentsFormula};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bryntum/engine-thin-trial",
3
- "version": "7.3.0",
3
+ "version": "7.3.1",
4
4
  "description": "Bryntum Engine JavaScript thin trial component package",
5
5
  "keywords": [
6
6
  "bryntum",