@cadenza.io/core 3.15.13 → 3.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -256,12 +256,983 @@ function debounce(func, wait, options) {
256
256
  }
257
257
  var debounce_default = debounce;
258
258
 
259
+ // node_modules/lodash-es/isArray.js
260
+ var isArray = Array.isArray;
261
+ var isArray_default = isArray;
262
+
263
+ // node_modules/lodash-es/identity.js
264
+ function identity(value) {
265
+ return value;
266
+ }
267
+ var identity_default = identity;
268
+
269
+ // node_modules/lodash-es/isFunction.js
270
+ var asyncTag = "[object AsyncFunction]";
271
+ var funcTag = "[object Function]";
272
+ var genTag = "[object GeneratorFunction]";
273
+ var proxyTag = "[object Proxy]";
274
+ function isFunction(value) {
275
+ if (!isObject_default(value)) {
276
+ return false;
277
+ }
278
+ var tag = baseGetTag_default(value);
279
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
280
+ }
281
+ var isFunction_default = isFunction;
282
+
283
+ // node_modules/lodash-es/_coreJsData.js
284
+ var coreJsData = root_default["__core-js_shared__"];
285
+ var coreJsData_default = coreJsData;
286
+
287
+ // node_modules/lodash-es/_isMasked.js
288
+ var maskSrcKey = (function() {
289
+ var uid = /[^.]+$/.exec(coreJsData_default && coreJsData_default.keys && coreJsData_default.keys.IE_PROTO || "");
290
+ return uid ? "Symbol(src)_1." + uid : "";
291
+ })();
292
+ function isMasked(func) {
293
+ return !!maskSrcKey && maskSrcKey in func;
294
+ }
295
+ var isMasked_default = isMasked;
296
+
297
+ // node_modules/lodash-es/_toSource.js
298
+ var funcProto = Function.prototype;
299
+ var funcToString = funcProto.toString;
300
+ function toSource(func) {
301
+ if (func != null) {
302
+ try {
303
+ return funcToString.call(func);
304
+ } catch (e) {
305
+ }
306
+ try {
307
+ return func + "";
308
+ } catch (e) {
309
+ }
310
+ }
311
+ return "";
312
+ }
313
+ var toSource_default = toSource;
314
+
315
+ // node_modules/lodash-es/_baseIsNative.js
316
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
317
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
318
+ var funcProto2 = Function.prototype;
319
+ var objectProto3 = Object.prototype;
320
+ var funcToString2 = funcProto2.toString;
321
+ var hasOwnProperty2 = objectProto3.hasOwnProperty;
322
+ var reIsNative = RegExp(
323
+ "^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
324
+ );
325
+ function baseIsNative(value) {
326
+ if (!isObject_default(value) || isMasked_default(value)) {
327
+ return false;
328
+ }
329
+ var pattern = isFunction_default(value) ? reIsNative : reIsHostCtor;
330
+ return pattern.test(toSource_default(value));
331
+ }
332
+ var baseIsNative_default = baseIsNative;
333
+
334
+ // node_modules/lodash-es/_getValue.js
335
+ function getValue(object, key) {
336
+ return object == null ? void 0 : object[key];
337
+ }
338
+ var getValue_default = getValue;
339
+
340
+ // node_modules/lodash-es/_getNative.js
341
+ function getNative(object, key) {
342
+ var value = getValue_default(object, key);
343
+ return baseIsNative_default(value) ? value : void 0;
344
+ }
345
+ var getNative_default = getNative;
346
+
347
+ // node_modules/lodash-es/_baseCreate.js
348
+ var objectCreate = Object.create;
349
+ var baseCreate = /* @__PURE__ */ (function() {
350
+ function object() {
351
+ }
352
+ return function(proto) {
353
+ if (!isObject_default(proto)) {
354
+ return {};
355
+ }
356
+ if (objectCreate) {
357
+ return objectCreate(proto);
358
+ }
359
+ object.prototype = proto;
360
+ var result = new object();
361
+ object.prototype = void 0;
362
+ return result;
363
+ };
364
+ })();
365
+ var baseCreate_default = baseCreate;
366
+
367
+ // node_modules/lodash-es/_apply.js
368
+ function apply(func, thisArg, args) {
369
+ switch (args.length) {
370
+ case 0:
371
+ return func.call(thisArg);
372
+ case 1:
373
+ return func.call(thisArg, args[0]);
374
+ case 2:
375
+ return func.call(thisArg, args[0], args[1]);
376
+ case 3:
377
+ return func.call(thisArg, args[0], args[1], args[2]);
378
+ }
379
+ return func.apply(thisArg, args);
380
+ }
381
+ var apply_default = apply;
382
+
383
+ // node_modules/lodash-es/_copyArray.js
384
+ function copyArray(source, array) {
385
+ var index = -1, length = source.length;
386
+ array || (array = Array(length));
387
+ while (++index < length) {
388
+ array[index] = source[index];
389
+ }
390
+ return array;
391
+ }
392
+ var copyArray_default = copyArray;
393
+
394
+ // node_modules/lodash-es/_shortOut.js
395
+ var HOT_COUNT = 800;
396
+ var HOT_SPAN = 16;
397
+ var nativeNow = Date.now;
398
+ function shortOut(func) {
399
+ var count = 0, lastCalled = 0;
400
+ return function() {
401
+ var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
402
+ lastCalled = stamp;
403
+ if (remaining > 0) {
404
+ if (++count >= HOT_COUNT) {
405
+ return arguments[0];
406
+ }
407
+ } else {
408
+ count = 0;
409
+ }
410
+ return func.apply(void 0, arguments);
411
+ };
412
+ }
413
+ var shortOut_default = shortOut;
414
+
415
+ // node_modules/lodash-es/constant.js
416
+ function constant(value) {
417
+ return function() {
418
+ return value;
419
+ };
420
+ }
421
+ var constant_default = constant;
422
+
423
+ // node_modules/lodash-es/_defineProperty.js
424
+ var defineProperty = (function() {
425
+ try {
426
+ var func = getNative_default(Object, "defineProperty");
427
+ func({}, "", {});
428
+ return func;
429
+ } catch (e) {
430
+ }
431
+ })();
432
+ var defineProperty_default = defineProperty;
433
+
434
+ // node_modules/lodash-es/_baseSetToString.js
435
+ var baseSetToString = !defineProperty_default ? identity_default : function(func, string) {
436
+ return defineProperty_default(func, "toString", {
437
+ "configurable": true,
438
+ "enumerable": false,
439
+ "value": constant_default(string),
440
+ "writable": true
441
+ });
442
+ };
443
+ var baseSetToString_default = baseSetToString;
444
+
445
+ // node_modules/lodash-es/_setToString.js
446
+ var setToString = shortOut_default(baseSetToString_default);
447
+ var setToString_default = setToString;
448
+
449
+ // node_modules/lodash-es/_isIndex.js
450
+ var MAX_SAFE_INTEGER = 9007199254740991;
451
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
452
+ function isIndex(value, length) {
453
+ var type = typeof value;
454
+ length = length == null ? MAX_SAFE_INTEGER : length;
455
+ return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
456
+ }
457
+ var isIndex_default = isIndex;
458
+
459
+ // node_modules/lodash-es/_baseAssignValue.js
460
+ function baseAssignValue(object, key, value) {
461
+ if (key == "__proto__" && defineProperty_default) {
462
+ defineProperty_default(object, key, {
463
+ "configurable": true,
464
+ "enumerable": true,
465
+ "value": value,
466
+ "writable": true
467
+ });
468
+ } else {
469
+ object[key] = value;
470
+ }
471
+ }
472
+ var baseAssignValue_default = baseAssignValue;
473
+
474
+ // node_modules/lodash-es/eq.js
475
+ function eq(value, other) {
476
+ return value === other || value !== value && other !== other;
477
+ }
478
+ var eq_default = eq;
479
+
480
+ // node_modules/lodash-es/_assignValue.js
481
+ var objectProto4 = Object.prototype;
482
+ var hasOwnProperty3 = objectProto4.hasOwnProperty;
483
+ function assignValue(object, key, value) {
484
+ var objValue = object[key];
485
+ if (!(hasOwnProperty3.call(object, key) && eq_default(objValue, value)) || value === void 0 && !(key in object)) {
486
+ baseAssignValue_default(object, key, value);
487
+ }
488
+ }
489
+ var assignValue_default = assignValue;
490
+
491
+ // node_modules/lodash-es/_copyObject.js
492
+ function copyObject(source, props, object, customizer) {
493
+ var isNew = !object;
494
+ object || (object = {});
495
+ var index = -1, length = props.length;
496
+ while (++index < length) {
497
+ var key = props[index];
498
+ var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0;
499
+ if (newValue === void 0) {
500
+ newValue = source[key];
501
+ }
502
+ if (isNew) {
503
+ baseAssignValue_default(object, key, newValue);
504
+ } else {
505
+ assignValue_default(object, key, newValue);
506
+ }
507
+ }
508
+ return object;
509
+ }
510
+ var copyObject_default = copyObject;
511
+
512
+ // node_modules/lodash-es/_overRest.js
513
+ var nativeMax2 = Math.max;
514
+ function overRest(func, start, transform) {
515
+ start = nativeMax2(start === void 0 ? func.length - 1 : start, 0);
516
+ return function() {
517
+ var args = arguments, index = -1, length = nativeMax2(args.length - start, 0), array = Array(length);
518
+ while (++index < length) {
519
+ array[index] = args[start + index];
520
+ }
521
+ index = -1;
522
+ var otherArgs = Array(start + 1);
523
+ while (++index < start) {
524
+ otherArgs[index] = args[index];
525
+ }
526
+ otherArgs[start] = transform(array);
527
+ return apply_default(func, this, otherArgs);
528
+ };
529
+ }
530
+ var overRest_default = overRest;
531
+
532
+ // node_modules/lodash-es/_baseRest.js
533
+ function baseRest(func, start) {
534
+ return setToString_default(overRest_default(func, start, identity_default), func + "");
535
+ }
536
+ var baseRest_default = baseRest;
537
+
538
+ // node_modules/lodash-es/isLength.js
539
+ var MAX_SAFE_INTEGER2 = 9007199254740991;
540
+ function isLength(value) {
541
+ return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER2;
542
+ }
543
+ var isLength_default = isLength;
544
+
545
+ // node_modules/lodash-es/isArrayLike.js
546
+ function isArrayLike(value) {
547
+ return value != null && isLength_default(value.length) && !isFunction_default(value);
548
+ }
549
+ var isArrayLike_default = isArrayLike;
550
+
551
+ // node_modules/lodash-es/_isIterateeCall.js
552
+ function isIterateeCall(value, index, object) {
553
+ if (!isObject_default(object)) {
554
+ return false;
555
+ }
556
+ var type = typeof index;
557
+ if (type == "number" ? isArrayLike_default(object) && isIndex_default(index, object.length) : type == "string" && index in object) {
558
+ return eq_default(object[index], value);
559
+ }
560
+ return false;
561
+ }
562
+ var isIterateeCall_default = isIterateeCall;
563
+
564
+ // node_modules/lodash-es/_createAssigner.js
565
+ function createAssigner(assigner) {
566
+ return baseRest_default(function(object, sources) {
567
+ var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : void 0, guard = length > 2 ? sources[2] : void 0;
568
+ customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : void 0;
569
+ if (guard && isIterateeCall_default(sources[0], sources[1], guard)) {
570
+ customizer = length < 3 ? void 0 : customizer;
571
+ length = 1;
572
+ }
573
+ object = Object(object);
574
+ while (++index < length) {
575
+ var source = sources[index];
576
+ if (source) {
577
+ assigner(object, source, index, customizer);
578
+ }
579
+ }
580
+ return object;
581
+ });
582
+ }
583
+ var createAssigner_default = createAssigner;
584
+
585
+ // node_modules/lodash-es/_isPrototype.js
586
+ var objectProto5 = Object.prototype;
587
+ function isPrototype(value) {
588
+ var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto5;
589
+ return value === proto;
590
+ }
591
+ var isPrototype_default = isPrototype;
592
+
593
+ // node_modules/lodash-es/_baseTimes.js
594
+ function baseTimes(n, iteratee) {
595
+ var index = -1, result = Array(n);
596
+ while (++index < n) {
597
+ result[index] = iteratee(index);
598
+ }
599
+ return result;
600
+ }
601
+ var baseTimes_default = baseTimes;
602
+
603
+ // node_modules/lodash-es/_baseIsArguments.js
604
+ var argsTag = "[object Arguments]";
605
+ function baseIsArguments(value) {
606
+ return isObjectLike_default(value) && baseGetTag_default(value) == argsTag;
607
+ }
608
+ var baseIsArguments_default = baseIsArguments;
609
+
610
+ // node_modules/lodash-es/isArguments.js
611
+ var objectProto6 = Object.prototype;
612
+ var hasOwnProperty4 = objectProto6.hasOwnProperty;
613
+ var propertyIsEnumerable = objectProto6.propertyIsEnumerable;
614
+ var isArguments = baseIsArguments_default(/* @__PURE__ */ (function() {
615
+ return arguments;
616
+ })()) ? baseIsArguments_default : function(value) {
617
+ return isObjectLike_default(value) && hasOwnProperty4.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
618
+ };
619
+ var isArguments_default = isArguments;
620
+
621
+ // node_modules/lodash-es/stubFalse.js
622
+ function stubFalse() {
623
+ return false;
624
+ }
625
+ var stubFalse_default = stubFalse;
626
+
627
+ // node_modules/lodash-es/isBuffer.js
628
+ var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
629
+ var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
630
+ var moduleExports = freeModule && freeModule.exports === freeExports;
631
+ var Buffer = moduleExports ? root_default.Buffer : void 0;
632
+ var nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0;
633
+ var isBuffer = nativeIsBuffer || stubFalse_default;
634
+ var isBuffer_default = isBuffer;
635
+
636
+ // node_modules/lodash-es/_baseIsTypedArray.js
637
+ var argsTag2 = "[object Arguments]";
638
+ var arrayTag = "[object Array]";
639
+ var boolTag = "[object Boolean]";
640
+ var dateTag = "[object Date]";
641
+ var errorTag = "[object Error]";
642
+ var funcTag2 = "[object Function]";
643
+ var mapTag = "[object Map]";
644
+ var numberTag = "[object Number]";
645
+ var objectTag = "[object Object]";
646
+ var regexpTag = "[object RegExp]";
647
+ var setTag = "[object Set]";
648
+ var stringTag = "[object String]";
649
+ var weakMapTag = "[object WeakMap]";
650
+ var arrayBufferTag = "[object ArrayBuffer]";
651
+ var dataViewTag = "[object DataView]";
652
+ var float32Tag = "[object Float32Array]";
653
+ var float64Tag = "[object Float64Array]";
654
+ var int8Tag = "[object Int8Array]";
655
+ var int16Tag = "[object Int16Array]";
656
+ var int32Tag = "[object Int32Array]";
657
+ var uint8Tag = "[object Uint8Array]";
658
+ var uint8ClampedTag = "[object Uint8ClampedArray]";
659
+ var uint16Tag = "[object Uint16Array]";
660
+ var uint32Tag = "[object Uint32Array]";
661
+ var typedArrayTags = {};
662
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
663
+ typedArrayTags[argsTag2] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag2] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
664
+ function baseIsTypedArray(value) {
665
+ return isObjectLike_default(value) && isLength_default(value.length) && !!typedArrayTags[baseGetTag_default(value)];
666
+ }
667
+ var baseIsTypedArray_default = baseIsTypedArray;
668
+
669
+ // node_modules/lodash-es/_baseUnary.js
670
+ function baseUnary(func) {
671
+ return function(value) {
672
+ return func(value);
673
+ };
674
+ }
675
+ var baseUnary_default = baseUnary;
676
+
677
+ // node_modules/lodash-es/_nodeUtil.js
678
+ var freeExports2 = typeof exports == "object" && exports && !exports.nodeType && exports;
679
+ var freeModule2 = freeExports2 && typeof module == "object" && module && !module.nodeType && module;
680
+ var moduleExports2 = freeModule2 && freeModule2.exports === freeExports2;
681
+ var freeProcess = moduleExports2 && freeGlobal_default.process;
682
+ var nodeUtil = (function() {
683
+ try {
684
+ var types = freeModule2 && freeModule2.require && freeModule2.require("util").types;
685
+ if (types) {
686
+ return types;
687
+ }
688
+ return freeProcess && freeProcess.binding && freeProcess.binding("util");
689
+ } catch (e) {
690
+ }
691
+ })();
692
+ var nodeUtil_default = nodeUtil;
693
+
694
+ // node_modules/lodash-es/isTypedArray.js
695
+ var nodeIsTypedArray = nodeUtil_default && nodeUtil_default.isTypedArray;
696
+ var isTypedArray = nodeIsTypedArray ? baseUnary_default(nodeIsTypedArray) : baseIsTypedArray_default;
697
+ var isTypedArray_default = isTypedArray;
698
+
699
+ // node_modules/lodash-es/_arrayLikeKeys.js
700
+ var objectProto7 = Object.prototype;
701
+ var hasOwnProperty5 = objectProto7.hasOwnProperty;
702
+ function arrayLikeKeys(value, inherited) {
703
+ var isArr = isArray_default(value), isArg = !isArr && isArguments_default(value), isBuff = !isArr && !isArg && isBuffer_default(value), isType = !isArr && !isArg && !isBuff && isTypedArray_default(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes_default(value.length, String) : [], length = result.length;
704
+ for (var key in value) {
705
+ if ((inherited || hasOwnProperty5.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
706
+ (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
707
+ isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
708
+ isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
709
+ isIndex_default(key, length)))) {
710
+ result.push(key);
711
+ }
712
+ }
713
+ return result;
714
+ }
715
+ var arrayLikeKeys_default = arrayLikeKeys;
716
+
717
+ // node_modules/lodash-es/_overArg.js
718
+ function overArg(func, transform) {
719
+ return function(arg) {
720
+ return func(transform(arg));
721
+ };
722
+ }
723
+ var overArg_default = overArg;
724
+
725
+ // node_modules/lodash-es/_nativeKeysIn.js
726
+ function nativeKeysIn(object) {
727
+ var result = [];
728
+ if (object != null) {
729
+ for (var key in Object(object)) {
730
+ result.push(key);
731
+ }
732
+ }
733
+ return result;
734
+ }
735
+ var nativeKeysIn_default = nativeKeysIn;
736
+
737
+ // node_modules/lodash-es/_baseKeysIn.js
738
+ var objectProto8 = Object.prototype;
739
+ var hasOwnProperty6 = objectProto8.hasOwnProperty;
740
+ function baseKeysIn(object) {
741
+ if (!isObject_default(object)) {
742
+ return nativeKeysIn_default(object);
743
+ }
744
+ var isProto = isPrototype_default(object), result = [];
745
+ for (var key in object) {
746
+ if (!(key == "constructor" && (isProto || !hasOwnProperty6.call(object, key)))) {
747
+ result.push(key);
748
+ }
749
+ }
750
+ return result;
751
+ }
752
+ var baseKeysIn_default = baseKeysIn;
753
+
754
+ // node_modules/lodash-es/keysIn.js
755
+ function keysIn(object) {
756
+ return isArrayLike_default(object) ? arrayLikeKeys_default(object, true) : baseKeysIn_default(object);
757
+ }
758
+ var keysIn_default = keysIn;
759
+
760
+ // node_modules/lodash-es/_nativeCreate.js
761
+ var nativeCreate = getNative_default(Object, "create");
762
+ var nativeCreate_default = nativeCreate;
763
+
764
+ // node_modules/lodash-es/_hashClear.js
765
+ function hashClear() {
766
+ this.__data__ = nativeCreate_default ? nativeCreate_default(null) : {};
767
+ this.size = 0;
768
+ }
769
+ var hashClear_default = hashClear;
770
+
771
+ // node_modules/lodash-es/_hashDelete.js
772
+ function hashDelete(key) {
773
+ var result = this.has(key) && delete this.__data__[key];
774
+ this.size -= result ? 1 : 0;
775
+ return result;
776
+ }
777
+ var hashDelete_default = hashDelete;
778
+
779
+ // node_modules/lodash-es/_hashGet.js
780
+ var HASH_UNDEFINED = "__lodash_hash_undefined__";
781
+ var objectProto9 = Object.prototype;
782
+ var hasOwnProperty7 = objectProto9.hasOwnProperty;
783
+ function hashGet(key) {
784
+ var data = this.__data__;
785
+ if (nativeCreate_default) {
786
+ var result = data[key];
787
+ return result === HASH_UNDEFINED ? void 0 : result;
788
+ }
789
+ return hasOwnProperty7.call(data, key) ? data[key] : void 0;
790
+ }
791
+ var hashGet_default = hashGet;
792
+
793
+ // node_modules/lodash-es/_hashHas.js
794
+ var objectProto10 = Object.prototype;
795
+ var hasOwnProperty8 = objectProto10.hasOwnProperty;
796
+ function hashHas(key) {
797
+ var data = this.__data__;
798
+ return nativeCreate_default ? data[key] !== void 0 : hasOwnProperty8.call(data, key);
799
+ }
800
+ var hashHas_default = hashHas;
801
+
802
+ // node_modules/lodash-es/_hashSet.js
803
+ var HASH_UNDEFINED2 = "__lodash_hash_undefined__";
804
+ function hashSet(key, value) {
805
+ var data = this.__data__;
806
+ this.size += this.has(key) ? 0 : 1;
807
+ data[key] = nativeCreate_default && value === void 0 ? HASH_UNDEFINED2 : value;
808
+ return this;
809
+ }
810
+ var hashSet_default = hashSet;
811
+
812
+ // node_modules/lodash-es/_Hash.js
813
+ function Hash(entries) {
814
+ var index = -1, length = entries == null ? 0 : entries.length;
815
+ this.clear();
816
+ while (++index < length) {
817
+ var entry = entries[index];
818
+ this.set(entry[0], entry[1]);
819
+ }
820
+ }
821
+ Hash.prototype.clear = hashClear_default;
822
+ Hash.prototype["delete"] = hashDelete_default;
823
+ Hash.prototype.get = hashGet_default;
824
+ Hash.prototype.has = hashHas_default;
825
+ Hash.prototype.set = hashSet_default;
826
+ var Hash_default = Hash;
827
+
828
+ // node_modules/lodash-es/_listCacheClear.js
829
+ function listCacheClear() {
830
+ this.__data__ = [];
831
+ this.size = 0;
832
+ }
833
+ var listCacheClear_default = listCacheClear;
834
+
835
+ // node_modules/lodash-es/_assocIndexOf.js
836
+ function assocIndexOf(array, key) {
837
+ var length = array.length;
838
+ while (length--) {
839
+ if (eq_default(array[length][0], key)) {
840
+ return length;
841
+ }
842
+ }
843
+ return -1;
844
+ }
845
+ var assocIndexOf_default = assocIndexOf;
846
+
847
+ // node_modules/lodash-es/_listCacheDelete.js
848
+ var arrayProto = Array.prototype;
849
+ var splice = arrayProto.splice;
850
+ function listCacheDelete(key) {
851
+ var data = this.__data__, index = assocIndexOf_default(data, key);
852
+ if (index < 0) {
853
+ return false;
854
+ }
855
+ var lastIndex = data.length - 1;
856
+ if (index == lastIndex) {
857
+ data.pop();
858
+ } else {
859
+ splice.call(data, index, 1);
860
+ }
861
+ --this.size;
862
+ return true;
863
+ }
864
+ var listCacheDelete_default = listCacheDelete;
865
+
866
+ // node_modules/lodash-es/_listCacheGet.js
867
+ function listCacheGet(key) {
868
+ var data = this.__data__, index = assocIndexOf_default(data, key);
869
+ return index < 0 ? void 0 : data[index][1];
870
+ }
871
+ var listCacheGet_default = listCacheGet;
872
+
873
+ // node_modules/lodash-es/_listCacheHas.js
874
+ function listCacheHas(key) {
875
+ return assocIndexOf_default(this.__data__, key) > -1;
876
+ }
877
+ var listCacheHas_default = listCacheHas;
878
+
879
+ // node_modules/lodash-es/_listCacheSet.js
880
+ function listCacheSet(key, value) {
881
+ var data = this.__data__, index = assocIndexOf_default(data, key);
882
+ if (index < 0) {
883
+ ++this.size;
884
+ data.push([key, value]);
885
+ } else {
886
+ data[index][1] = value;
887
+ }
888
+ return this;
889
+ }
890
+ var listCacheSet_default = listCacheSet;
891
+
892
+ // node_modules/lodash-es/_ListCache.js
893
+ function ListCache(entries) {
894
+ var index = -1, length = entries == null ? 0 : entries.length;
895
+ this.clear();
896
+ while (++index < length) {
897
+ var entry = entries[index];
898
+ this.set(entry[0], entry[1]);
899
+ }
900
+ }
901
+ ListCache.prototype.clear = listCacheClear_default;
902
+ ListCache.prototype["delete"] = listCacheDelete_default;
903
+ ListCache.prototype.get = listCacheGet_default;
904
+ ListCache.prototype.has = listCacheHas_default;
905
+ ListCache.prototype.set = listCacheSet_default;
906
+ var ListCache_default = ListCache;
907
+
908
+ // node_modules/lodash-es/_Map.js
909
+ var Map2 = getNative_default(root_default, "Map");
910
+ var Map_default = Map2;
911
+
912
+ // node_modules/lodash-es/_mapCacheClear.js
913
+ function mapCacheClear() {
914
+ this.size = 0;
915
+ this.__data__ = {
916
+ "hash": new Hash_default(),
917
+ "map": new (Map_default || ListCache_default)(),
918
+ "string": new Hash_default()
919
+ };
920
+ }
921
+ var mapCacheClear_default = mapCacheClear;
922
+
923
+ // node_modules/lodash-es/_isKeyable.js
924
+ function isKeyable(value) {
925
+ var type = typeof value;
926
+ return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
927
+ }
928
+ var isKeyable_default = isKeyable;
929
+
930
+ // node_modules/lodash-es/_getMapData.js
931
+ function getMapData(map, key) {
932
+ var data = map.__data__;
933
+ return isKeyable_default(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
934
+ }
935
+ var getMapData_default = getMapData;
936
+
937
+ // node_modules/lodash-es/_mapCacheDelete.js
938
+ function mapCacheDelete(key) {
939
+ var result = getMapData_default(this, key)["delete"](key);
940
+ this.size -= result ? 1 : 0;
941
+ return result;
942
+ }
943
+ var mapCacheDelete_default = mapCacheDelete;
944
+
945
+ // node_modules/lodash-es/_mapCacheGet.js
946
+ function mapCacheGet(key) {
947
+ return getMapData_default(this, key).get(key);
948
+ }
949
+ var mapCacheGet_default = mapCacheGet;
950
+
951
+ // node_modules/lodash-es/_mapCacheHas.js
952
+ function mapCacheHas(key) {
953
+ return getMapData_default(this, key).has(key);
954
+ }
955
+ var mapCacheHas_default = mapCacheHas;
956
+
957
+ // node_modules/lodash-es/_mapCacheSet.js
958
+ function mapCacheSet(key, value) {
959
+ var data = getMapData_default(this, key), size = data.size;
960
+ data.set(key, value);
961
+ this.size += data.size == size ? 0 : 1;
962
+ return this;
963
+ }
964
+ var mapCacheSet_default = mapCacheSet;
965
+
966
+ // node_modules/lodash-es/_MapCache.js
967
+ function MapCache(entries) {
968
+ var index = -1, length = entries == null ? 0 : entries.length;
969
+ this.clear();
970
+ while (++index < length) {
971
+ var entry = entries[index];
972
+ this.set(entry[0], entry[1]);
973
+ }
974
+ }
975
+ MapCache.prototype.clear = mapCacheClear_default;
976
+ MapCache.prototype["delete"] = mapCacheDelete_default;
977
+ MapCache.prototype.get = mapCacheGet_default;
978
+ MapCache.prototype.has = mapCacheHas_default;
979
+ MapCache.prototype.set = mapCacheSet_default;
980
+ var MapCache_default = MapCache;
981
+
982
+ // node_modules/lodash-es/_getPrototype.js
983
+ var getPrototype = overArg_default(Object.getPrototypeOf, Object);
984
+ var getPrototype_default = getPrototype;
985
+
986
+ // node_modules/lodash-es/isPlainObject.js
987
+ var objectTag2 = "[object Object]";
988
+ var funcProto3 = Function.prototype;
989
+ var objectProto11 = Object.prototype;
990
+ var funcToString3 = funcProto3.toString;
991
+ var hasOwnProperty9 = objectProto11.hasOwnProperty;
992
+ var objectCtorString = funcToString3.call(Object);
993
+ function isPlainObject(value) {
994
+ if (!isObjectLike_default(value) || baseGetTag_default(value) != objectTag2) {
995
+ return false;
996
+ }
997
+ var proto = getPrototype_default(value);
998
+ if (proto === null) {
999
+ return true;
1000
+ }
1001
+ var Ctor = hasOwnProperty9.call(proto, "constructor") && proto.constructor;
1002
+ return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString3.call(Ctor) == objectCtorString;
1003
+ }
1004
+ var isPlainObject_default = isPlainObject;
1005
+
1006
+ // node_modules/lodash-es/_stackClear.js
1007
+ function stackClear() {
1008
+ this.__data__ = new ListCache_default();
1009
+ this.size = 0;
1010
+ }
1011
+ var stackClear_default = stackClear;
1012
+
1013
+ // node_modules/lodash-es/_stackDelete.js
1014
+ function stackDelete(key) {
1015
+ var data = this.__data__, result = data["delete"](key);
1016
+ this.size = data.size;
1017
+ return result;
1018
+ }
1019
+ var stackDelete_default = stackDelete;
1020
+
1021
+ // node_modules/lodash-es/_stackGet.js
1022
+ function stackGet(key) {
1023
+ return this.__data__.get(key);
1024
+ }
1025
+ var stackGet_default = stackGet;
1026
+
1027
+ // node_modules/lodash-es/_stackHas.js
1028
+ function stackHas(key) {
1029
+ return this.__data__.has(key);
1030
+ }
1031
+ var stackHas_default = stackHas;
1032
+
1033
+ // node_modules/lodash-es/_stackSet.js
1034
+ var LARGE_ARRAY_SIZE = 200;
1035
+ function stackSet(key, value) {
1036
+ var data = this.__data__;
1037
+ if (data instanceof ListCache_default) {
1038
+ var pairs = data.__data__;
1039
+ if (!Map_default || pairs.length < LARGE_ARRAY_SIZE - 1) {
1040
+ pairs.push([key, value]);
1041
+ this.size = ++data.size;
1042
+ return this;
1043
+ }
1044
+ data = this.__data__ = new MapCache_default(pairs);
1045
+ }
1046
+ data.set(key, value);
1047
+ this.size = data.size;
1048
+ return this;
1049
+ }
1050
+ var stackSet_default = stackSet;
1051
+
1052
+ // node_modules/lodash-es/_Stack.js
1053
+ function Stack(entries) {
1054
+ var data = this.__data__ = new ListCache_default(entries);
1055
+ this.size = data.size;
1056
+ }
1057
+ Stack.prototype.clear = stackClear_default;
1058
+ Stack.prototype["delete"] = stackDelete_default;
1059
+ Stack.prototype.get = stackGet_default;
1060
+ Stack.prototype.has = stackHas_default;
1061
+ Stack.prototype.set = stackSet_default;
1062
+ var Stack_default = Stack;
1063
+
1064
+ // node_modules/lodash-es/_cloneBuffer.js
1065
+ var freeExports3 = typeof exports == "object" && exports && !exports.nodeType && exports;
1066
+ var freeModule3 = freeExports3 && typeof module == "object" && module && !module.nodeType && module;
1067
+ var moduleExports3 = freeModule3 && freeModule3.exports === freeExports3;
1068
+ var Buffer2 = moduleExports3 ? root_default.Buffer : void 0;
1069
+ var allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : void 0;
1070
+ function cloneBuffer(buffer, isDeep) {
1071
+ if (isDeep) {
1072
+ return buffer.slice();
1073
+ }
1074
+ var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
1075
+ buffer.copy(result);
1076
+ return result;
1077
+ }
1078
+ var cloneBuffer_default = cloneBuffer;
1079
+
1080
+ // node_modules/lodash-es/_Uint8Array.js
1081
+ var Uint8Array = root_default.Uint8Array;
1082
+ var Uint8Array_default = Uint8Array;
1083
+
1084
+ // node_modules/lodash-es/_cloneArrayBuffer.js
1085
+ function cloneArrayBuffer(arrayBuffer) {
1086
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
1087
+ new Uint8Array_default(result).set(new Uint8Array_default(arrayBuffer));
1088
+ return result;
1089
+ }
1090
+ var cloneArrayBuffer_default = cloneArrayBuffer;
1091
+
1092
+ // node_modules/lodash-es/_cloneTypedArray.js
1093
+ function cloneTypedArray(typedArray, isDeep) {
1094
+ var buffer = isDeep ? cloneArrayBuffer_default(typedArray.buffer) : typedArray.buffer;
1095
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
1096
+ }
1097
+ var cloneTypedArray_default = cloneTypedArray;
1098
+
1099
+ // node_modules/lodash-es/_initCloneObject.js
1100
+ function initCloneObject(object) {
1101
+ return typeof object.constructor == "function" && !isPrototype_default(object) ? baseCreate_default(getPrototype_default(object)) : {};
1102
+ }
1103
+ var initCloneObject_default = initCloneObject;
1104
+
1105
+ // node_modules/lodash-es/_createBaseFor.js
1106
+ function createBaseFor(fromRight) {
1107
+ return function(object, iteratee, keysFunc) {
1108
+ var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
1109
+ while (length--) {
1110
+ var key = props[fromRight ? length : ++index];
1111
+ if (iteratee(iterable[key], key, iterable) === false) {
1112
+ break;
1113
+ }
1114
+ }
1115
+ return object;
1116
+ };
1117
+ }
1118
+ var createBaseFor_default = createBaseFor;
1119
+
1120
+ // node_modules/lodash-es/_baseFor.js
1121
+ var baseFor = createBaseFor_default();
1122
+ var baseFor_default = baseFor;
1123
+
1124
+ // node_modules/lodash-es/_assignMergeValue.js
1125
+ function assignMergeValue(object, key, value) {
1126
+ if (value !== void 0 && !eq_default(object[key], value) || value === void 0 && !(key in object)) {
1127
+ baseAssignValue_default(object, key, value);
1128
+ }
1129
+ }
1130
+ var assignMergeValue_default = assignMergeValue;
1131
+
1132
+ // node_modules/lodash-es/isArrayLikeObject.js
1133
+ function isArrayLikeObject(value) {
1134
+ return isObjectLike_default(value) && isArrayLike_default(value);
1135
+ }
1136
+ var isArrayLikeObject_default = isArrayLikeObject;
1137
+
1138
+ // node_modules/lodash-es/_safeGet.js
1139
+ function safeGet(object, key) {
1140
+ if (key === "constructor" && typeof object[key] === "function") {
1141
+ return;
1142
+ }
1143
+ if (key == "__proto__") {
1144
+ return;
1145
+ }
1146
+ return object[key];
1147
+ }
1148
+ var safeGet_default = safeGet;
1149
+
1150
+ // node_modules/lodash-es/toPlainObject.js
1151
+ function toPlainObject(value) {
1152
+ return copyObject_default(value, keysIn_default(value));
1153
+ }
1154
+ var toPlainObject_default = toPlainObject;
1155
+
1156
+ // node_modules/lodash-es/_baseMergeDeep.js
1157
+ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
1158
+ var objValue = safeGet_default(object, key), srcValue = safeGet_default(source, key), stacked = stack.get(srcValue);
1159
+ if (stacked) {
1160
+ assignMergeValue_default(object, key, stacked);
1161
+ return;
1162
+ }
1163
+ var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : void 0;
1164
+ var isCommon = newValue === void 0;
1165
+ if (isCommon) {
1166
+ var isArr = isArray_default(srcValue), isBuff = !isArr && isBuffer_default(srcValue), isTyped = !isArr && !isBuff && isTypedArray_default(srcValue);
1167
+ newValue = srcValue;
1168
+ if (isArr || isBuff || isTyped) {
1169
+ if (isArray_default(objValue)) {
1170
+ newValue = objValue;
1171
+ } else if (isArrayLikeObject_default(objValue)) {
1172
+ newValue = copyArray_default(objValue);
1173
+ } else if (isBuff) {
1174
+ isCommon = false;
1175
+ newValue = cloneBuffer_default(srcValue, true);
1176
+ } else if (isTyped) {
1177
+ isCommon = false;
1178
+ newValue = cloneTypedArray_default(srcValue, true);
1179
+ } else {
1180
+ newValue = [];
1181
+ }
1182
+ } else if (isPlainObject_default(srcValue) || isArguments_default(srcValue)) {
1183
+ newValue = objValue;
1184
+ if (isArguments_default(objValue)) {
1185
+ newValue = toPlainObject_default(objValue);
1186
+ } else if (!isObject_default(objValue) || isFunction_default(objValue)) {
1187
+ newValue = initCloneObject_default(srcValue);
1188
+ }
1189
+ } else {
1190
+ isCommon = false;
1191
+ }
1192
+ }
1193
+ if (isCommon) {
1194
+ stack.set(srcValue, newValue);
1195
+ mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
1196
+ stack["delete"](srcValue);
1197
+ }
1198
+ assignMergeValue_default(object, key, newValue);
1199
+ }
1200
+ var baseMergeDeep_default = baseMergeDeep;
1201
+
1202
+ // node_modules/lodash-es/_baseMerge.js
1203
+ function baseMerge(object, source, srcIndex, customizer, stack) {
1204
+ if (object === source) {
1205
+ return;
1206
+ }
1207
+ baseFor_default(source, function(srcValue, key) {
1208
+ stack || (stack = new Stack_default());
1209
+ if (isObject_default(srcValue)) {
1210
+ baseMergeDeep_default(object, source, key, srcIndex, baseMerge, customizer, stack);
1211
+ } else {
1212
+ var newValue = customizer ? customizer(safeGet_default(object, key), srcValue, key + "", object, source, stack) : void 0;
1213
+ if (newValue === void 0) {
1214
+ newValue = srcValue;
1215
+ }
1216
+ assignMergeValue_default(object, key, newValue);
1217
+ }
1218
+ }, keysIn_default);
1219
+ }
1220
+ var baseMerge_default = baseMerge;
1221
+
1222
+ // node_modules/lodash-es/merge.js
1223
+ var merge = createAssigner_default(function(object, source, srcIndex) {
1224
+ baseMerge_default(object, source, srcIndex);
1225
+ });
1226
+ var merge_default = merge;
1227
+
259
1228
  // src/engine/SignalBroker.ts
260
1229
  var SignalBroker = class _SignalBroker {
261
1230
  constructor() {
262
1231
  this.debug = false;
263
1232
  this.verbose = false;
264
1233
  this.debouncedEmitters = /* @__PURE__ */ new Map();
1234
+ this.squashedEmitters = /* @__PURE__ */ new Map();
1235
+ this.squashedContexts = /* @__PURE__ */ new Map();
265
1236
  // TODO: Signals should be a class with a the observers, registered flag and other data.
266
1237
  this.signalObservers = /* @__PURE__ */ new Map();
267
1238
  this.emittedSignalsRegistry = /* @__PURE__ */ new Set();
@@ -345,6 +1316,9 @@ var SignalBroker = class _SignalBroker {
345
1316
  "Register signal",
346
1317
  (ctx) => {
347
1318
  const { signalName } = ctx;
1319
+ if (this.signalObservers.has(signalName)) {
1320
+ this.addSignal(signalName);
1321
+ }
348
1322
  this.signalObservers.get(signalName).registered = true;
349
1323
  }
350
1324
  ).doOn("meta.signal.registered");
@@ -382,16 +1356,15 @@ var SignalBroker = class _SignalBroker {
382
1356
  *
383
1357
  * @param {string} signal - The name of the signal to be emitted.
384
1358
  * @param {AnyObject} context - The context to be passed along with the signal.
385
- * @param {number} [timeoutMs=60000] - The delay in milliseconds before the signal is emitted. Defaults to 60,000 ms.
386
- * @param {Date} [exactDateTime] - An exact date and time at which to emit the signal. If provided, this overrides the `timeoutMs`.
1359
+ * @param options
387
1360
  * @return {AbortController} An AbortController instance that can be used to cancel the scheduled signal emission.
388
1361
  */
389
- schedule(signal, context, timeoutMs = 6e4, exactDateTime) {
390
- let delay = timeoutMs;
391
- if (exactDateTime != null) {
392
- delay = exactDateTime.getTime() - Date.now();
1362
+ schedule(signal, context, options = { delayMs: 6e4 }) {
1363
+ let delay = options.delayMs;
1364
+ if (options.exactDateTime != null) {
1365
+ delay = options.exactDateTime.getTime() - Date.now();
393
1366
  }
394
- delay = Math.max(0, timeoutMs);
1367
+ delay = Math.max(0, delay ?? 0);
395
1368
  const controller = new AbortController();
396
1369
  const { signal: signalController } = controller;
397
1370
  const tick = () => this.emit(signal, context);
@@ -447,29 +1420,76 @@ var SignalBroker = class _SignalBroker {
447
1420
  }
448
1421
  };
449
1422
  }
450
- debounce(signal, context, delayMs = 500) {
1423
+ debounce(signal, context, options = { delayMs: 500 }) {
451
1424
  let debouncedEmitter = this.debouncedEmitters.get(signal);
452
1425
  if (!debouncedEmitter) {
453
1426
  this.debouncedEmitters.set(
454
1427
  signal,
455
1428
  debounce_default((ctx) => {
456
1429
  this.emit(signal, ctx);
457
- }, delayMs)
1430
+ }, options.delayMs ?? 300)
458
1431
  );
459
1432
  debouncedEmitter = this.debouncedEmitters.get(signal);
460
1433
  }
461
1434
  debouncedEmitter(context);
462
1435
  }
1436
+ /**
1437
+ * Aggregates and debounces multiple events with the same identifier to minimize redundant operations.
1438
+ *
1439
+ * @param {string} signal - The identifier for the event being emitted.
1440
+ * @param {AnyObject} context - The context data associated with the event.
1441
+ * @param {Object} [options] - Configuration options for handling the squashed event.
1442
+ * @param {boolean} [options.squash=true] - Whether the event should be squashed.
1443
+ * @param {string|null} [options.squashId=null] - A unique identifier for the squashed group of events. Defaults to the signal if null.
1444
+ * @param {function|null} [options.mergeFunction=null] - A custom merge function that combines old and new contexts. If null, a default merge is used.
1445
+ * @return {void} Does not return a value.
1446
+ */
1447
+ squash(signal, context, options = { squash: true }) {
1448
+ let { squashId, delayMs } = options;
1449
+ if (!squashId) {
1450
+ squashId = signal;
1451
+ }
1452
+ if (!this.squashedEmitters.has(squashId)) {
1453
+ this.squashedEmitters.set(
1454
+ squashId,
1455
+ debounce_default(() => {
1456
+ this.emit(signal, this.squashedContexts.get(squashId));
1457
+ this.squashedEmitters.delete(squashId);
1458
+ this.squashedContexts.delete(squashId);
1459
+ }, delayMs ?? 300)
1460
+ );
1461
+ this.squashedContexts.set(squashId, context);
1462
+ } else {
1463
+ this.squashedContexts.set(
1464
+ squashId,
1465
+ options.mergeFunction ? options.mergeFunction(this.squashedContexts.get(squashId), context) : merge_default(this.squashedContexts.get(squashId), context)
1466
+ );
1467
+ }
1468
+ this.squashedEmitters.get(squashId)();
1469
+ }
463
1470
  /**
464
1471
  * Emits a signal with the specified context, triggering any associated handlers for that signal.
465
1472
  *
466
1473
  * @param {string} signal - The name of the signal to emit.
467
1474
  * @param {AnyObject} [context={}] - An optional context object containing additional information or metadata
468
1475
  * associated with the signal. If the context includes a `__routineExecId`, it will be handled accordingly.
1476
+ * @param options
469
1477
  * @return {void} This method does not return a value.
470
1478
  */
471
- emit(signal, context = {}) {
1479
+ emit(signal, context = {}, options = {}) {
472
1480
  delete context.__routineExecId;
1481
+ if (options.squash) {
1482
+ this.squash(signal, context, options);
1483
+ return;
1484
+ }
1485
+ if (options.debounce) {
1486
+ this.debounce(signal, context);
1487
+ return;
1488
+ }
1489
+ if (options.schedule) {
1490
+ this.schedule(signal, context, options);
1491
+ return;
1492
+ }
473
1493
  this.addSignal(signal);
474
1494
  this.execute(signal, context);
475
1495
  }
@@ -1018,16 +2038,18 @@ var SignalEmitter = class {
1018
2038
  * Emits a signal via the broker.
1019
2039
  * @param signal The signal name.
1020
2040
  * @param data Optional payload (defaults to empty object).
2041
+ * @param options
1021
2042
  */
1022
- emit(signal, data = {}) {
2043
+ emit(signal, data = {}, options = {}) {
1023
2044
  Cadenza.broker.emit(signal, data);
1024
2045
  }
1025
2046
  /**
1026
2047
  * Emits a signal via the broker if not silent.
1027
2048
  * @param signal The signal name.
1028
2049
  * @param data Optional payload (defaults to empty object).
2050
+ * @param options
1029
2051
  */
1030
- emitMetrics(signal, data = {}) {
2052
+ emitMetrics(signal, data = {}, options = {}) {
1031
2053
  if (this.silent) {
1032
2054
  return;
1033
2055
  }
@@ -1189,36 +2211,52 @@ var GraphNode = class _GraphNode extends SignalEmitter {
1189
2211
  context.__signalEmission.consumed = true;
1190
2212
  context.__signalEmission.consumedBy = this.id;
1191
2213
  }
2214
+ const prevNodesIds = this.previousNodes.map((node) => node.id);
2215
+ if (context.__previousTaskExecutionId) {
2216
+ prevNodesIds.push(context.__previousTaskExecutionId);
2217
+ context.__previousTaskExecutionId = null;
2218
+ }
1192
2219
  const scheduledAt = Date.now();
1193
- this.emitMetricsWithMetadata("meta.node.scheduled", {
1194
- data: {
1195
- uuid: this.id,
1196
- routineExecutionId: this.routineExecId,
1197
- executionTraceId: this.executionTraceId,
1198
- context: this.context.getContext(),
1199
- metaContext: this.context.getMetadata(),
1200
- taskName: this.task.name,
1201
- taskVersion: this.task.version,
1202
- isMeta: this.isMeta(),
1203
- isScheduled: true,
1204
- splitGroupId: this.splitGroupId,
1205
- signalEmissionId,
1206
- created: formatTimestamp(scheduledAt)
1207
- }
1208
- });
1209
- this.previousNodes.forEach((node) => {
1210
- this.emitMetricsWithMetadata("meta.node.mapped", {
2220
+ this.emitMetricsWithMetadata(
2221
+ "meta.node.scheduled",
2222
+ {
1211
2223
  data: {
1212
- taskExecutionId: this.id,
1213
- previousTaskExecutionId: node.id
1214
- },
1215
- filter: {
2224
+ uuid: this.id,
2225
+ routineExecutionId: this.routineExecId,
2226
+ executionTraceId: this.executionTraceId,
2227
+ context: this.context.getContext(),
2228
+ metaContext: this.context.getMetadata(),
1216
2229
  taskName: this.task.name,
1217
2230
  taskVersion: this.task.version,
1218
- predecessorTaskName: node.task.name,
1219
- predecessorTaskVersion: node.task.version
2231
+ isMeta: this.isMeta(),
2232
+ isScheduled: true,
2233
+ splitGroupId: this.splitGroupId,
2234
+ signalEmissionId,
2235
+ previousExecutionIds: {
2236
+ ids: prevNodesIds
2237
+ },
2238
+ created: formatTimestamp(scheduledAt)
1220
2239
  }
1221
- });
2240
+ },
2241
+ { squash: true, squashId: this.id }
2242
+ );
2243
+ this.previousNodes.forEach((node) => {
2244
+ this.emitMetricsWithMetadata(
2245
+ "meta.node.mapped",
2246
+ {
2247
+ data: {
2248
+ taskExecutionId: this.id,
2249
+ previousTaskExecutionId: node.id
2250
+ },
2251
+ filter: {
2252
+ taskName: this.task.name,
2253
+ taskVersion: this.task.version,
2254
+ predecessorTaskName: node.task.name,
2255
+ predecessorTaskVersion: node.task.version
2256
+ }
2257
+ },
2258
+ { schedule: true, delayMs: 1e3 }
2259
+ );
1222
2260
  });
1223
2261
  if (!this.silent && context.__previousTaskExecutionId) {
1224
2262
  this.emitMetricsWithMetadata(
@@ -1234,7 +2272,8 @@ var GraphNode = class _GraphNode extends SignalEmitter {
1234
2272
  predecessorTaskName: context.__localTaskName,
1235
2273
  predecessorTaskVersion: context.__localTaskVersion
1236
2274
  }
1237
- }
2275
+ },
2276
+ { schedule: true, delayMs: 1e3 }
1238
2277
  );
1239
2278
  context.__previousTaskExecutionId = null;
1240
2279
  }
@@ -1257,24 +2296,32 @@ var GraphNode = class _GraphNode extends SignalEmitter {
1257
2296
  this.executionStart = Date.now();
1258
2297
  }
1259
2298
  if (this.previousNodes.length === 0) {
1260
- this.emitMetricsWithMetadata("meta.node.started_routine_execution", {
1261
- data: {
1262
- isRunning: true,
1263
- started: formatTimestamp(this.executionStart)
2299
+ this.emitMetricsWithMetadata(
2300
+ "meta.node.started_routine_execution",
2301
+ {
2302
+ data: {
2303
+ isRunning: true,
2304
+ started: formatTimestamp(this.executionStart)
2305
+ },
2306
+ filter: { uuid: this.routineExecId }
1264
2307
  },
1265
- filter: { uuid: this.routineExecId }
1266
- });
2308
+ { squash: true, squashId: this.routineExecId }
2309
+ );
1267
2310
  }
1268
2311
  if (this.debug && !this.task.isSubMeta && !this.context.getMetadata().__isSubMeta || this.verbose) {
1269
2312
  this.log();
1270
2313
  }
1271
- this.emitMetricsWithMetadata("meta.node.started", {
1272
- data: {
1273
- isRunning: true,
1274
- started: formatTimestamp(this.executionStart)
2314
+ this.emitMetricsWithMetadata(
2315
+ "meta.node.started",
2316
+ {
2317
+ data: {
2318
+ isRunning: true,
2319
+ started: formatTimestamp(this.executionStart)
2320
+ },
2321
+ filter: { uuid: this.id }
1275
2322
  },
1276
- filter: { uuid: this.id }
1277
- });
2323
+ { squash: true, squashId: this.id }
2324
+ );
1278
2325
  return this.executionStart;
1279
2326
  }
1280
2327
  /**
@@ -1303,20 +2350,24 @@ var GraphNode = class _GraphNode extends SignalEmitter {
1303
2350
  }
1304
2351
  });
1305
2352
  }
1306
- this.emitMetricsWithMetadata("meta.node.ended", {
1307
- data: {
1308
- isRunning: false,
1309
- isComplete: true,
1310
- resultContext: this.context.getContext(),
1311
- metaResultContext: this.context.getMetadata(),
1312
- errored: this.errored,
1313
- failed: this.failed,
1314
- errorMessage: context.__error,
1315
- progress: 1,
1316
- ended: formatTimestamp(end)
2353
+ this.emitMetricsWithMetadata(
2354
+ "meta.node.ended",
2355
+ {
2356
+ data: {
2357
+ isRunning: false,
2358
+ isComplete: true,
2359
+ resultContext: this.context.getContext(),
2360
+ metaResultContext: this.context.getMetadata(),
2361
+ errored: this.errored,
2362
+ failed: this.failed,
2363
+ errorMessage: context.__error,
2364
+ progress: 1,
2365
+ ended: formatTimestamp(end)
2366
+ },
2367
+ filter: { uuid: this.id }
1317
2368
  },
1318
- filter: { uuid: this.id }
1319
- });
2369
+ { squash: true, squashId: this.id }
2370
+ );
1320
2371
  if (this.graphDone()) {
1321
2372
  const context2 = this.context.getFullContext();
1322
2373
  if (context2.__isDeputy)
@@ -1324,17 +2375,21 @@ var GraphNode = class _GraphNode extends SignalEmitter {
1324
2375
  `meta.node.graph_completed:${this.routineExecId}`,
1325
2376
  context2
1326
2377
  );
1327
- this.emitMetricsWithMetadata("meta.node.ended_routine_execution", {
1328
- data: {
1329
- isRunning: false,
1330
- isComplete: true,
1331
- resultContext: this.context.getContext(),
1332
- metaResultContext: this.context.getMetadata(),
1333
- progress: 1,
1334
- ended: formatTimestamp(end)
2378
+ this.emitMetricsWithMetadata(
2379
+ "meta.node.ended_routine_execution",
2380
+ {
2381
+ data: {
2382
+ isRunning: false,
2383
+ isComplete: true,
2384
+ resultContext: this.context.getContext(),
2385
+ metaResultContext: this.context.getMetadata(),
2386
+ progress: 1,
2387
+ ended: formatTimestamp(end)
2388
+ },
2389
+ filter: { uuid: this.routineExecId }
1335
2390
  },
1336
- filter: { uuid: this.routineExecId }
1337
- });
2391
+ { squash: true, squashId: this.routineExecId }
2392
+ );
1338
2393
  }
1339
2394
  return end;
1340
2395
  }
@@ -1451,9 +2506,10 @@ var GraphNode = class _GraphNode extends SignalEmitter {
1451
2506
  * @param {string} signal - The name of the signal to be emitted.
1452
2507
  * @param {AnyObject} data - The data object to be sent along with the signal. Metadata
1453
2508
  * will be injected into this object before being emitted.
2509
+ * @param options
1454
2510
  * @return {void} No return value.
1455
2511
  */
1456
- emitWithMetadata(signal, data) {
2512
+ emitWithMetadata(signal, data, options = {}) {
1457
2513
  if (!this.task?.isHidden) {
1458
2514
  data.__signalEmission = {
1459
2515
  fullSignalName: signal,
@@ -1470,7 +2526,7 @@ var GraphNode = class _GraphNode extends SignalEmitter {
1470
2526
  __executionTraceId: this.executionTraceId
1471
2527
  };
1472
2528
  }
1473
- this.emit(signal, data);
2529
+ this.emit(signal, data, options);
1474
2530
  if (!this.task.emitsSignals.has(signal)) {
1475
2531
  this.task.emitsSignals.add(signal);
1476
2532
  }
@@ -1480,9 +2536,10 @@ var GraphNode = class _GraphNode extends SignalEmitter {
1480
2536
  *
1481
2537
  * @param {string} signal - The signal name being emitted.
1482
2538
  * @param {AnyObject} data - The data associated with the signal emission, enriched with metadata.
2539
+ * @param options
1483
2540
  * @return {void} Emits the signal with enriched data and does not return a value.
1484
2541
  */
1485
- emitMetricsWithMetadata(signal, data) {
2542
+ emitMetricsWithMetadata(signal, data, options = {}) {
1486
2543
  if (!this.task?.isHidden) {
1487
2544
  data.__signalEmission = {
1488
2545
  taskName: this.task.name,
@@ -1498,7 +2555,7 @@ var GraphNode = class _GraphNode extends SignalEmitter {
1498
2555
  __executionTraceId: this.executionTraceId
1499
2556
  };
1500
2557
  }
1501
- this.emitMetrics(signal, data);
2558
+ this.emitMetrics(signal, data, options);
1502
2559
  if (!this.task.emitsSignals.has(signal)) {
1503
2560
  this.task.emitsSignals.add(signal);
1504
2561
  }
@@ -1511,14 +2568,18 @@ var GraphNode = class _GraphNode extends SignalEmitter {
1511
2568
  */
1512
2569
  onProgress(progress) {
1513
2570
  progress = Math.min(Math.max(0, progress), 1);
1514
- this.emitMetricsWithMetadata("meta.node.progress", {
1515
- data: {
1516
- progress
2571
+ this.emitMetricsWithMetadata(
2572
+ "meta.node.progress",
2573
+ {
2574
+ data: {
2575
+ progress
2576
+ },
2577
+ filter: {
2578
+ uuid: this.id
2579
+ }
1517
2580
  },
1518
- filter: {
1519
- uuid: this.id
1520
- }
1521
- });
2581
+ { debounce: true }
2582
+ );
1522
2583
  this.emitMetricsWithMetadata(
1523
2584
  `meta.node.routine_execution_progress:${this.routineExecId}`,
1524
2585
  {
@@ -1528,7 +2589,8 @@ var GraphNode = class _GraphNode extends SignalEmitter {
1528
2589
  filter: {
1529
2590
  uuid: this.routineExecId
1530
2591
  }
1531
- }
2592
+ },
2593
+ { debounce: true }
1532
2594
  );
1533
2595
  }
1534
2596
  /**
@@ -2189,22 +3251,26 @@ var GraphRunner = class extends SignalEmitter {
2189
3251
  }
2190
3252
  });
2191
3253
  }
2192
- this.emitMetrics("meta.runner.added_tasks", {
2193
- data: {
2194
- uuid: routineExecId,
2195
- name: routineName,
2196
- routineVersion,
2197
- isMeta,
2198
- executionTraceId,
2199
- context: ctx.getContext(),
2200
- metaContext: ctx.getMetadata(),
2201
- previousRoutineExecution: context.__localRoutineExecId ?? context.__metadata?.__routineExecId ?? null,
2202
- created: formatTimestamp(Date.now())
3254
+ this.emitMetrics(
3255
+ "meta.runner.added_tasks",
3256
+ {
3257
+ data: {
3258
+ uuid: routineExecId,
3259
+ name: routineName,
3260
+ routineVersion,
3261
+ isMeta,
3262
+ executionTraceId,
3263
+ context: ctx.getContext(),
3264
+ metaContext: ctx.getMetadata(),
3265
+ previousRoutineExecution: context.__localRoutineExecId ?? context.__metadata?.__routineExecId ?? null,
3266
+ created: formatTimestamp(Date.now())
3267
+ },
3268
+ __metadata: {
3269
+ __executionTraceId: executionTraceId
3270
+ }
2203
3271
  },
2204
- __metadata: {
2205
- __executionTraceId: executionTraceId
2206
- }
2207
- });
3272
+ { squash: true, squashId: routineExecId }
3273
+ );
2208
3274
  }
2209
3275
  allTasks.forEach(
2210
3276
  (task) => this.currentRun.addNode(
@@ -2403,7 +3469,6 @@ var Task = class _Task extends SignalEmitter {
2403
3469
  this.attachSignal(
2404
3470
  "meta.task.created",
2405
3471
  "meta.task.destroyed",
2406
- "meta.task.version_set",
2407
3472
  "meta.task.output_validation_failed",
2408
3473
  "meta.task.input_validation_failed",
2409
3474
  "meta.task.relationship_added",
@@ -4455,6 +5520,7 @@ var Cadenza = class {
4455
5520
  *
4456
5521
  * @param {string} event - The name of the event to emit.
4457
5522
  * @param {AnyObject} [data={}] - The data payload associated with the event.
5523
+ * @param options
4458
5524
  * @return {void} - No return value.
4459
5525
  *
4460
5526
  * @example
@@ -4464,11 +5530,11 @@ var Cadenza = class {
4464
5530
  * Cadenza.emit('main.my_event', { foo: 'bar' });
4465
5531
  * ```
4466
5532
  */
4467
- static emit(event, data = {}) {
4468
- this.broker?.emit(event, data);
5533
+ static emit(event, data = {}, options = {}) {
5534
+ this.broker?.emit(event, data, options);
4469
5535
  }
4470
- static schedule(taskName, context, timeoutMs, exactDateTime) {
4471
- this.broker?.schedule(taskName, context, timeoutMs, exactDateTime);
5536
+ static schedule(taskName, context, delayMs, exactDateTime) {
5537
+ this.broker?.schedule(taskName, context, { delayMs, exactDateTime });
4472
5538
  }
4473
5539
  static interval(taskName, context, intervalMs, leading = false, startDateTime) {
4474
5540
  this.broker?.interval(
@@ -4480,7 +5546,7 @@ var Cadenza = class {
4480
5546
  );
4481
5547
  }
4482
5548
  static debounce(signalName, context, delayMs) {
4483
- this.broker?.debounce(signalName, context, delayMs);
5549
+ this.broker?.debounce(signalName, context, { delayMs });
4484
5550
  }
4485
5551
  static get(taskName) {
4486
5552
  return this.registry?.tasks.get(taskName);
@@ -5048,4 +6114,17 @@ export {
5048
6114
  Task,
5049
6115
  index_default as default
5050
6116
  };
6117
+ /*! Bundled license information:
6118
+
6119
+ lodash-es/lodash.js:
6120
+ (**
6121
+ * @license
6122
+ * Lodash (Custom Build) <https://lodash.com/>
6123
+ * Build: `lodash modularize exports="es" -o ./`
6124
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
6125
+ * Released under MIT license <https://lodash.com/license>
6126
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
6127
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
6128
+ *)
6129
+ */
5051
6130
  //# sourceMappingURL=index.mjs.map