@ohif/app 3.11.0-beta.21 → 3.11.0-beta.23

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.
Files changed (27) hide show
  1. package/dist/{4991.bundle.f72a01fd158167a94ae8.js → 2974.bundle.74e19f0960e9cf7f82b6.js} +552 -1
  2. package/dist/{7241.bundle.3eb11e9c932a99887004.js → 7241.bundle.64c1167e145939213ce2.js} +7 -20
  3. package/dist/{7622.bundle.d0ff9b68945e250ef0ab.js → 7622.bundle.be6a55fa9d660c2e3fa5.js} +8 -8
  4. package/dist/{7639.bundle.7d4bb3fe6e2299e26e59.js → 7639.bundle.a4f2d7d120a97ab594dd.js} +267 -0
  5. package/dist/{9026.bundle.6050b21f338702c1f67d.js → 9026.bundle.670b227e106315c86f74.js} +16 -13
  6. package/dist/{app.bundle.787973116890a41a141c.js → app.bundle.f7d8872ee7c0288210d5.js} +9 -843
  7. package/dist/index.html +1 -1
  8. package/dist/sw.js +1 -1
  9. package/package.json +18 -18
  10. /package/dist/{1459.bundle.133e4804c5244c95c496.js → 1459.bundle.23b249da047ea0faeaaf.js} +0 -0
  11. /package/dist/{1807.bundle.718e91ce3516a38a1cab.js → 1807.bundle.22700a2b2079b6b3649d.js} +0 -0
  12. /package/dist/{1919.bundle.88a4aac1269ef3890612.js → 1919.bundle.d2954f00d323e6c1e1fb.js} +0 -0
  13. /package/dist/{20.bundle.9361791ea9b018634897.js → 20.bundle.70a6bcc3589c07dd091b.js} +0 -0
  14. /package/dist/{213.bundle.33637bd68866dc323e15.js → 213.bundle.ca296f8ae8171800c01e.js} +0 -0
  15. /package/dist/{2424.bundle.e972096a6e4767f5655d.js → 2424.bundle.979d2161dde26266bc15.js} +0 -0
  16. /package/dist/{2932.bundle.8b32d8160eb0cc63a404.js → 2932.bundle.76f2feaad3693c27e2b2.js} +0 -0
  17. /package/dist/{3658.bundle.ef127c2c2028039031fa.js → 3658.bundle.3d19871fb3c62c2807f4.js} +0 -0
  18. /package/dist/{4113.bundle.cce110d072e17a9bbf11.js → 4113.bundle.a0bbde24cd7a97a14d6d.js} +0 -0
  19. /package/dist/{6027.bundle.9fb3f23012c2e7a0d774.js → 6027.bundle.4485070adae1872765a6.js} +0 -0
  20. /package/dist/{6201.bundle.f505138d43aa2e6df51a.js → 6201.bundle.066d2e43de27476f4069.js} +0 -0
  21. /package/dist/{7197.bundle.d70078aac11506d68aa4.js → 7197.bundle.36691530b428478d4ac3.js} +0 -0
  22. /package/dist/{810.bundle.c5b2aeb667facc4e4ebf.js → 810.bundle.2add2bf685fbd594c3f2.js} +0 -0
  23. /package/dist/{85.bundle.d337cbb91cbb956c8865.js → 85.bundle.fda13446ceeefd92d6e9.js} +0 -0
  24. /package/dist/{8558.bundle.9242754b3dd777752b81.js → 8558.bundle.9b174abec3603fedf3ef.js} +0 -0
  25. /package/dist/{8815.bundle.33b4113a8834138c7df8.js → 8815.bundle.60a02dfadf29a06fba39.js} +0 -0
  26. /package/dist/{934.bundle.47dfe2e18d9462b1095d.js → 934.bundle.d63d1753529c6007f1a3.js} +0 -0
  27. /package/dist/{963.bundle.8493c57a04421ae5db21.js → 963.bundle.8135e71e03110f3fd351.js} +0 -0
@@ -1,4 +1,4 @@
1
- (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[4991],{
1
+ (globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[2974],{
2
2
 
3
3
  /***/ 75183:
4
4
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
@@ -421,6 +421,557 @@ module.exports = function naturalSort (a, b) {
421
421
  };
422
422
 
423
423
 
424
+ /***/ }),
425
+
426
+ /***/ 67066:
427
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
428
+
429
+ var trimmedEndIndex = __webpack_require__(91158);
430
+
431
+ /** Used to match leading whitespace. */
432
+ var reTrimStart = /^\s+/;
433
+
434
+ /**
435
+ * The base implementation of `_.trim`.
436
+ *
437
+ * @private
438
+ * @param {string} string The string to trim.
439
+ * @returns {string} Returns the trimmed string.
440
+ */
441
+ function baseTrim(string) {
442
+ return string
443
+ ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
444
+ : string;
445
+ }
446
+
447
+ module.exports = baseTrim;
448
+
449
+
450
+ /***/ }),
451
+
452
+ /***/ 91158:
453
+ /***/ ((module) => {
454
+
455
+ /** Used to match a single whitespace character. */
456
+ var reWhitespace = /\s/;
457
+
458
+ /**
459
+ * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
460
+ * character of `string`.
461
+ *
462
+ * @private
463
+ * @param {string} string The string to inspect.
464
+ * @returns {number} Returns the index of the last non-whitespace character.
465
+ */
466
+ function trimmedEndIndex(string) {
467
+ var index = string.length;
468
+
469
+ while (index-- && reWhitespace.test(string.charAt(index))) {}
470
+ return index;
471
+ }
472
+
473
+ module.exports = trimmedEndIndex;
474
+
475
+
476
+ /***/ }),
477
+
478
+ /***/ 3803:
479
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
480
+
481
+ var isObject = __webpack_require__(46015),
482
+ now = __webpack_require__(26642),
483
+ toNumber = __webpack_require__(83572);
484
+
485
+ /** Error message constants. */
486
+ var FUNC_ERROR_TEXT = 'Expected a function';
487
+
488
+ /* Built-in method references for those with the same name as other `lodash` methods. */
489
+ var nativeMax = Math.max,
490
+ nativeMin = Math.min;
491
+
492
+ /**
493
+ * Creates a debounced function that delays invoking `func` until after `wait`
494
+ * milliseconds have elapsed since the last time the debounced function was
495
+ * invoked. The debounced function comes with a `cancel` method to cancel
496
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
497
+ * Provide `options` to indicate whether `func` should be invoked on the
498
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
499
+ * with the last arguments provided to the debounced function. Subsequent
500
+ * calls to the debounced function return the result of the last `func`
501
+ * invocation.
502
+ *
503
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
504
+ * invoked on the trailing edge of the timeout only if the debounced function
505
+ * is invoked more than once during the `wait` timeout.
506
+ *
507
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
508
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
509
+ *
510
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
511
+ * for details over the differences between `_.debounce` and `_.throttle`.
512
+ *
513
+ * @static
514
+ * @memberOf _
515
+ * @since 0.1.0
516
+ * @category Function
517
+ * @param {Function} func The function to debounce.
518
+ * @param {number} [wait=0] The number of milliseconds to delay.
519
+ * @param {Object} [options={}] The options object.
520
+ * @param {boolean} [options.leading=false]
521
+ * Specify invoking on the leading edge of the timeout.
522
+ * @param {number} [options.maxWait]
523
+ * The maximum time `func` is allowed to be delayed before it's invoked.
524
+ * @param {boolean} [options.trailing=true]
525
+ * Specify invoking on the trailing edge of the timeout.
526
+ * @returns {Function} Returns the new debounced function.
527
+ * @example
528
+ *
529
+ * // Avoid costly calculations while the window size is in flux.
530
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
531
+ *
532
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
533
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
534
+ * 'leading': true,
535
+ * 'trailing': false
536
+ * }));
537
+ *
538
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
539
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
540
+ * var source = new EventSource('/stream');
541
+ * jQuery(source).on('message', debounced);
542
+ *
543
+ * // Cancel the trailing debounced invocation.
544
+ * jQuery(window).on('popstate', debounced.cancel);
545
+ */
546
+ function debounce(func, wait, options) {
547
+ var lastArgs,
548
+ lastThis,
549
+ maxWait,
550
+ result,
551
+ timerId,
552
+ lastCallTime,
553
+ lastInvokeTime = 0,
554
+ leading = false,
555
+ maxing = false,
556
+ trailing = true;
557
+
558
+ if (typeof func != 'function') {
559
+ throw new TypeError(FUNC_ERROR_TEXT);
560
+ }
561
+ wait = toNumber(wait) || 0;
562
+ if (isObject(options)) {
563
+ leading = !!options.leading;
564
+ maxing = 'maxWait' in options;
565
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
566
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
567
+ }
568
+
569
+ function invokeFunc(time) {
570
+ var args = lastArgs,
571
+ thisArg = lastThis;
572
+
573
+ lastArgs = lastThis = undefined;
574
+ lastInvokeTime = time;
575
+ result = func.apply(thisArg, args);
576
+ return result;
577
+ }
578
+
579
+ function leadingEdge(time) {
580
+ // Reset any `maxWait` timer.
581
+ lastInvokeTime = time;
582
+ // Start the timer for the trailing edge.
583
+ timerId = setTimeout(timerExpired, wait);
584
+ // Invoke the leading edge.
585
+ return leading ? invokeFunc(time) : result;
586
+ }
587
+
588
+ function remainingWait(time) {
589
+ var timeSinceLastCall = time - lastCallTime,
590
+ timeSinceLastInvoke = time - lastInvokeTime,
591
+ timeWaiting = wait - timeSinceLastCall;
592
+
593
+ return maxing
594
+ ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
595
+ : timeWaiting;
596
+ }
597
+
598
+ function shouldInvoke(time) {
599
+ var timeSinceLastCall = time - lastCallTime,
600
+ timeSinceLastInvoke = time - lastInvokeTime;
601
+
602
+ // Either this is the first call, activity has stopped and we're at the
603
+ // trailing edge, the system time has gone backwards and we're treating
604
+ // it as the trailing edge, or we've hit the `maxWait` limit.
605
+ return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
606
+ (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
607
+ }
608
+
609
+ function timerExpired() {
610
+ var time = now();
611
+ if (shouldInvoke(time)) {
612
+ return trailingEdge(time);
613
+ }
614
+ // Restart the timer.
615
+ timerId = setTimeout(timerExpired, remainingWait(time));
616
+ }
617
+
618
+ function trailingEdge(time) {
619
+ timerId = undefined;
620
+
621
+ // Only invoke if we have `lastArgs` which means `func` has been
622
+ // debounced at least once.
623
+ if (trailing && lastArgs) {
624
+ return invokeFunc(time);
625
+ }
626
+ lastArgs = lastThis = undefined;
627
+ return result;
628
+ }
629
+
630
+ function cancel() {
631
+ if (timerId !== undefined) {
632
+ clearTimeout(timerId);
633
+ }
634
+ lastInvokeTime = 0;
635
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
636
+ }
637
+
638
+ function flush() {
639
+ return timerId === undefined ? result : trailingEdge(now());
640
+ }
641
+
642
+ function debounced() {
643
+ var time = now(),
644
+ isInvoking = shouldInvoke(time);
645
+
646
+ lastArgs = arguments;
647
+ lastThis = this;
648
+ lastCallTime = time;
649
+
650
+ if (isInvoking) {
651
+ if (timerId === undefined) {
652
+ return leadingEdge(lastCallTime);
653
+ }
654
+ if (maxing) {
655
+ // Handle invocations in a tight loop.
656
+ clearTimeout(timerId);
657
+ timerId = setTimeout(timerExpired, wait);
658
+ return invokeFunc(lastCallTime);
659
+ }
660
+ }
661
+ if (timerId === undefined) {
662
+ timerId = setTimeout(timerExpired, wait);
663
+ }
664
+ return result;
665
+ }
666
+ debounced.cancel = cancel;
667
+ debounced.flush = flush;
668
+ return debounced;
669
+ }
670
+
671
+ module.exports = debounce;
672
+
673
+
674
+ /***/ }),
675
+
676
+ /***/ 26642:
677
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
678
+
679
+ var root = __webpack_require__(37183);
680
+
681
+ /**
682
+ * Gets the timestamp of the number of milliseconds that have elapsed since
683
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
684
+ *
685
+ * @static
686
+ * @memberOf _
687
+ * @since 2.4.0
688
+ * @category Date
689
+ * @returns {number} Returns the timestamp.
690
+ * @example
691
+ *
692
+ * _.defer(function(stamp) {
693
+ * console.log(_.now() - stamp);
694
+ * }, _.now());
695
+ * // => Logs the number of milliseconds it took for the deferred invocation.
696
+ */
697
+ var now = function() {
698
+ return root.Date.now();
699
+ };
700
+
701
+ module.exports = now;
702
+
703
+
704
+ /***/ }),
705
+
706
+ /***/ 51444:
707
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
708
+
709
+ var debounce = __webpack_require__(3803),
710
+ isObject = __webpack_require__(46015);
711
+
712
+ /** Error message constants. */
713
+ var FUNC_ERROR_TEXT = 'Expected a function';
714
+
715
+ /**
716
+ * Creates a throttled function that only invokes `func` at most once per
717
+ * every `wait` milliseconds. The throttled function comes with a `cancel`
718
+ * method to cancel delayed `func` invocations and a `flush` method to
719
+ * immediately invoke them. Provide `options` to indicate whether `func`
720
+ * should be invoked on the leading and/or trailing edge of the `wait`
721
+ * timeout. The `func` is invoked with the last arguments provided to the
722
+ * throttled function. Subsequent calls to the throttled function return the
723
+ * result of the last `func` invocation.
724
+ *
725
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
726
+ * invoked on the trailing edge of the timeout only if the throttled function
727
+ * is invoked more than once during the `wait` timeout.
728
+ *
729
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
730
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
731
+ *
732
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
733
+ * for details over the differences between `_.throttle` and `_.debounce`.
734
+ *
735
+ * @static
736
+ * @memberOf _
737
+ * @since 0.1.0
738
+ * @category Function
739
+ * @param {Function} func The function to throttle.
740
+ * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
741
+ * @param {Object} [options={}] The options object.
742
+ * @param {boolean} [options.leading=true]
743
+ * Specify invoking on the leading edge of the timeout.
744
+ * @param {boolean} [options.trailing=true]
745
+ * Specify invoking on the trailing edge of the timeout.
746
+ * @returns {Function} Returns the new throttled function.
747
+ * @example
748
+ *
749
+ * // Avoid excessively updating the position while scrolling.
750
+ * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
751
+ *
752
+ * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
753
+ * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
754
+ * jQuery(element).on('click', throttled);
755
+ *
756
+ * // Cancel the trailing throttled invocation.
757
+ * jQuery(window).on('popstate', throttled.cancel);
758
+ */
759
+ function throttle(func, wait, options) {
760
+ var leading = true,
761
+ trailing = true;
762
+
763
+ if (typeof func != 'function') {
764
+ throw new TypeError(FUNC_ERROR_TEXT);
765
+ }
766
+ if (isObject(options)) {
767
+ leading = 'leading' in options ? !!options.leading : leading;
768
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
769
+ }
770
+ return debounce(func, wait, {
771
+ 'leading': leading,
772
+ 'maxWait': wait,
773
+ 'trailing': trailing
774
+ });
775
+ }
776
+
777
+ module.exports = throttle;
778
+
779
+
780
+ /***/ }),
781
+
782
+ /***/ 83572:
783
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
784
+
785
+ var baseTrim = __webpack_require__(67066),
786
+ isObject = __webpack_require__(46015),
787
+ isSymbol = __webpack_require__(63536);
788
+
789
+ /** Used as references for various `Number` constants. */
790
+ var NAN = 0 / 0;
791
+
792
+ /** Used to detect bad signed hexadecimal string values. */
793
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
794
+
795
+ /** Used to detect binary string values. */
796
+ var reIsBinary = /^0b[01]+$/i;
797
+
798
+ /** Used to detect octal string values. */
799
+ var reIsOctal = /^0o[0-7]+$/i;
800
+
801
+ /** Built-in method references without a dependency on `root`. */
802
+ var freeParseInt = parseInt;
803
+
804
+ /**
805
+ * Converts `value` to a number.
806
+ *
807
+ * @static
808
+ * @memberOf _
809
+ * @since 4.0.0
810
+ * @category Lang
811
+ * @param {*} value The value to process.
812
+ * @returns {number} Returns the number.
813
+ * @example
814
+ *
815
+ * _.toNumber(3.2);
816
+ * // => 3.2
817
+ *
818
+ * _.toNumber(Number.MIN_VALUE);
819
+ * // => 5e-324
820
+ *
821
+ * _.toNumber(Infinity);
822
+ * // => Infinity
823
+ *
824
+ * _.toNumber('3.2');
825
+ * // => 3.2
826
+ */
827
+ function toNumber(value) {
828
+ if (typeof value == 'number') {
829
+ return value;
830
+ }
831
+ if (isSymbol(value)) {
832
+ return NAN;
833
+ }
834
+ if (isObject(value)) {
835
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
836
+ value = isObject(other) ? (other + '') : other;
837
+ }
838
+ if (typeof value != 'string') {
839
+ return value === 0 ? value : +value;
840
+ }
841
+ value = baseTrim(value);
842
+ var isBinary = reIsBinary.test(value);
843
+ return (isBinary || reIsOctal.test(value))
844
+ ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
845
+ : (reIsBadHex.test(value) ? NAN : +value);
846
+ }
847
+
848
+ module.exports = toNumber;
849
+
850
+
851
+ /***/ }),
852
+
853
+ /***/ 81980:
854
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
855
+
856
+ "use strict";
857
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
858
+ /* harmony export */ u: () => (/* binding */ useResizeDetector)
859
+ /* harmony export */ });
860
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(86326);
861
+ /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3803);
862
+ /* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_1__);
863
+ /* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(51444);
864
+ /* harmony import */ var lodash_throttle__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_throttle__WEBPACK_IMPORTED_MODULE_2__);
865
+ const patchResizeCallback = (resizeCallback, refreshMode, refreshRate, refreshOptions) => {
866
+ switch (refreshMode) {
867
+ case 'debounce':
868
+ return lodash_debounce__WEBPACK_IMPORTED_MODULE_1___default()(resizeCallback, refreshRate, refreshOptions);
869
+ case 'throttle':
870
+ return lodash_throttle__WEBPACK_IMPORTED_MODULE_2___default()(resizeCallback, refreshRate, refreshOptions);
871
+ default:
872
+ return resizeCallback;
873
+ }
874
+ };function useResizeDetector({ skipOnMount = false, refreshMode, refreshRate = 1000, refreshOptions, handleWidth = true, handleHeight = true, targetRef, observerOptions, onResize } = {}) {
875
+ const skipResize = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(skipOnMount);
876
+ const [size, setSize] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({
877
+ width: undefined,
878
+ height: undefined
879
+ });
880
+ // we are going to use this ref to store the last element that was passed to the hook
881
+ const [refElement, setRefElement] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)((targetRef === null || targetRef === void 0 ? void 0 : targetRef.current) || null);
882
+ // if targetRef is passed, we need to update the refElement
883
+ // we have to use setTimeout because ref get assigned after the hook is called
884
+ // in the future releases we are going to remove targetRef and force users to use ref returned by the hook
885
+ if (targetRef) {
886
+ setTimeout(() => {
887
+ if (targetRef.current !== refElement) {
888
+ setRefElement(targetRef.current);
889
+ }
890
+ }, 0);
891
+ }
892
+ // this is a memo that will be called every time the ref is changed
893
+ // This proxy will properly call setState either when the ref is called as a function or when `.current` is set
894
+ // we call setState inside to trigger rerender
895
+ const refProxy = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => new Proxy(node => {
896
+ if (node !== refElement) {
897
+ setRefElement(node);
898
+ }
899
+ }, {
900
+ get(target, prop) {
901
+ if (prop === 'current') {
902
+ return refElement;
903
+ }
904
+ return target[prop];
905
+ },
906
+ set(target, prop, value) {
907
+ if (prop === 'current') {
908
+ setRefElement(value);
909
+ }
910
+ else {
911
+ target[prop] = value;
912
+ }
913
+ return true;
914
+ }
915
+ }), [refElement]);
916
+ const shouldSetSize = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((prevSize, nextSize) => {
917
+ if (prevSize.width === nextSize.width && prevSize.height === nextSize.height) {
918
+ // skip if dimensions haven't changed
919
+ return false;
920
+ }
921
+ if ((prevSize.width === nextSize.width && !handleHeight) ||
922
+ (prevSize.height === nextSize.height && !handleWidth)) {
923
+ // process `handleHeight/handleWidth` props
924
+ return false;
925
+ }
926
+ return true;
927
+ }, [handleWidth, handleHeight]);
928
+ const resizeCallback = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((entries) => {
929
+ if (!handleWidth && !handleHeight)
930
+ return;
931
+ if (skipResize.current) {
932
+ skipResize.current = false;
933
+ return;
934
+ }
935
+ entries.forEach(entry => {
936
+ const { width, height } = (entry === null || entry === void 0 ? void 0 : entry.contentRect) || {};
937
+ setSize(prevSize => {
938
+ if (!shouldSetSize(prevSize, { width, height }))
939
+ return prevSize;
940
+ return { width, height };
941
+ });
942
+ });
943
+ }, [handleWidth, handleHeight, skipResize, shouldSetSize]);
944
+ const resizeHandler = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(patchResizeCallback(resizeCallback, refreshMode, refreshRate, refreshOptions), [
945
+ resizeCallback,
946
+ refreshMode,
947
+ refreshRate,
948
+ refreshOptions
949
+ ]);
950
+ // on refElement change
951
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
952
+ let resizeObserver;
953
+ if (refElement) {
954
+ resizeObserver = new window.ResizeObserver(resizeHandler);
955
+ resizeObserver.observe(refElement, observerOptions);
956
+ }
957
+ else {
958
+ if (size.width || size.height) {
959
+ setSize({ width: undefined, height: undefined });
960
+ }
961
+ }
962
+ return () => {
963
+ var _a, _b, _c;
964
+ (_a = resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect) === null || _a === void 0 ? void 0 : _a.call(resizeObserver);
965
+ (_c = (_b = resizeHandler).cancel) === null || _c === void 0 ? void 0 : _c.call(_b);
966
+ };
967
+ }, [resizeHandler, refElement]);
968
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
969
+ onResize === null || onResize === void 0 ? void 0 : onResize(size.width, size.height);
970
+ }, [size]);
971
+ return Object.assign({ ref: refProxy }, size);
972
+ }//# sourceMappingURL=index.esm.js.map
973
+
974
+
424
975
  /***/ }),
425
976
 
426
977
  /***/ 45422:
@@ -6587,16 +6587,6 @@ async function init({
6587
6587
  cornerstoneViewportService.setVolumesForViewport(viewport, volumeInputArray, presentations);
6588
6588
  }
6589
6589
  });
6590
-
6591
- // resize the cornerstone viewport service when the grid size changes
6592
- // IMPORTANT: this should happen outside of the OHIFCornerstoneViewport
6593
- // since it will trigger a rerender of each viewport and each resizing
6594
- // the offscreen canvas which would result in a performance hit, this should
6595
- // done only once per grid resize here. Doing it once here, allows us to reduce
6596
- // the refreshRage(in ms) to 10 from 50. I tried with even 1 or 5 ms it worked fine
6597
- viewportGridService.subscribe(viewportGridService.EVENTS.GRID_SIZE_CHANGED, () => {
6598
- cornerstoneViewportService.resize(true);
6599
- });
6600
6590
  src_initContextMenu({
6601
6591
  cornerstoneViewportService,
6602
6592
  customizationService,
@@ -18929,6 +18919,8 @@ const EVENTS = {
18929
18919
  VIEWPORT_DATA_CHANGED: 'event::cornerstoneViewportService:viewportDataChanged',
18930
18920
  VIEWPORT_VOLUMES_CHANGED: 'event::cornerstoneViewportService:viewportVolumesChanged'
18931
18921
  };
18922
+ const MIN_STACK_VIEWPORTS_TO_ENQUEUE_RESIZE = 12;
18923
+ const MIN_VOLUME_VIEWPORTS_TO_ENQUEUE_RESIZE = 6;
18932
18924
  const WITH_NAVIGATION = {
18933
18925
  withNavigation: true,
18934
18926
  withOrientation: false
@@ -18947,9 +18939,6 @@ class CornerstoneViewportService extends src/* PubSubService */.Rc {
18947
18939
  this.viewportsDisplaySets = new Map();
18948
18940
  this.beforeResizePositionPresentations = new Map();
18949
18941
  // Some configs
18950
- this.enableResizeDetector = void 0;
18951
- this.resizeRefreshRateMs = void 0;
18952
- this.resizeRefreshMode = void 0;
18953
18942
  this.servicesManager = null;
18954
18943
  this.resizeQueue = [];
18955
18944
  this.viewportResizeTimer = null;
@@ -19001,13 +18990,8 @@ class CornerstoneViewportService extends src/* PubSubService */.Rc {
19001
18990
  /**
19002
18991
  * It triggers the resize on the rendering engine, and renders the viewports
19003
18992
  *
19004
- * @param isGridResize - if the resize is triggered by a grid resize
19005
- * this is used to avoid double resize of the viewports since if the
19006
- * grid is resized, all viewports will be resized so there is no need
19007
- * to resize them individually which will get triggered by their
19008
- * individual resize observers
19009
18993
  */
19010
- resize(isGridResize = false) {
18994
+ resize() {
19011
18995
  // https://stackoverflow.com/a/26279685
19012
18996
  // This resize() call, among other things, rerenders the viewports. But when the entire viewer is
19013
18997
  // display: none'd, it makes the size of all hidden elements 0, including the viewport canvas and its containers.
@@ -19021,13 +19005,16 @@ class CornerstoneViewportService extends src/* PubSubService */.Rc {
19021
19005
  console.warn('Ignoring resize when viewports have size 0');
19022
19006
  return;
19023
19007
  }
19008
+ const numStackViewportsInViewportGrid = Array.from(this.viewportsById.values()).filter(viewportInfo => viewportInfo.getViewportType() === esm.Enums.ViewportType.STACK).length;
19009
+ const numVolumeViewportsInViewportGrid = Array.from(this.viewportsById.values()).filter(viewportInfo => viewportInfo.getViewportType() === esm.Enums.ViewportType.ORTHOGRAPHIC).length;
19010
+ const isEasyResize = numStackViewportsInViewportGrid <= MIN_STACK_VIEWPORTS_TO_ENQUEUE_RESIZE && numVolumeViewportsInViewportGrid <= MIN_VOLUME_VIEWPORTS_TO_ENQUEUE_RESIZE;
19024
19011
 
19025
19012
  // if there is a grid resize happening, it means the viewport grid
19026
19013
  // has been manipulated (e.g., panels closed, added, etc.) and we need
19027
19014
  // to resize all viewports, so we will add a timeout here to make sure
19028
19015
  // we don't double resize the viewports when viewports in the grid are
19029
19016
  // resized individually
19030
- if (isGridResize) {
19017
+ if (isEasyResize) {
19031
19018
  this.performResize();
19032
19019
  this.resetGridResizeTimeout();
19033
19020
  this.resizeQueue = [];
@@ -3731,20 +3731,20 @@ function ViewerHeader({
3731
3731
  const AboutModal = customizationService.getCustomization('ohif.aboutModal');
3732
3732
  const UserPreferencesModal = customizationService.getCustomization('ohif.userPreferencesModal');
3733
3733
  const menuOptions = [{
3734
- title: t('Header:About'),
3734
+ title: AboutModal?.menuTitle ?? t('Header:About'),
3735
3735
  icon: 'info',
3736
3736
  onClick: () => show({
3737
3737
  content: AboutModal,
3738
- title: t('AboutModal:About OHIF Viewer'),
3739
- containerClassName: 'max-w-md'
3738
+ title: AboutModal?.title ?? t('AboutModal:About OHIF Viewer'),
3739
+ containerClassName: AboutModal?.containerClassName ?? 'max-w-md'
3740
3740
  })
3741
3741
  }, {
3742
- title: t('Header:Preferences'),
3742
+ title: UserPreferencesModal.menuTitle ?? t('Header:Preferences'),
3743
3743
  icon: 'settings',
3744
3744
  onClick: () => show({
3745
3745
  content: UserPreferencesModal,
3746
- title: t('UserPreferencesModal:User preferences'),
3747
- containerClassName: 'flex max-w-4xl p-6 flex-col'
3746
+ title: UserPreferencesModal.title ?? t('UserPreferencesModal:User preferences'),
3747
+ containerClassName: UserPreferencesModal?.containerClassName ?? 'flex max-w-4xl p-6 flex-col'
3748
3748
  })
3749
3749
  }];
3750
3750
  if (appConfig.oidc) {
@@ -10131,8 +10131,8 @@ function AboutModalDefault() {
10131
10131
  name
10132
10132
  } = (0,browser_detect_es5/* default */.A)();
10133
10133
  const browser = `${name[0].toUpperCase()}${name.substr(1)} ${version}`;
10134
- const versionNumber = "3.11.0-beta.21";
10135
- const commitHash = "4be84953359bba2b846c62ec8f323a8f290b2eb6";
10134
+ const versionNumber = "3.11.0-beta.23";
10135
+ const commitHash = "383f45823c58149baf162a2de7bad2240ba0b030";
10136
10136
  const [main, beta] = versionNumber.split('-');
10137
10137
  return /*#__PURE__*/react.createElement(ui_next_src/* AboutModal */.VTU, {
10138
10138
  className: "w-[400px]"