"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const resizeObservers = require("../utils/resizeObservers.js");
const calculateDepthForNode = require("./calculateDepthForNode.js");
var gatherActiveObservationsAtDepth = function(depth) {
  resizeObservers.resizeObservers.forEach(function processObserver(ro) {
    ro.activeTargets.splice(0, ro.activeTargets.length);
    ro.skippedTargets.splice(0, ro.skippedTargets.length);
    ro.observationTargets.forEach(function processTarget(ot) {
      if (ot.isActive()) {
        if (calculateDepthForNode.calculateDepthForNode(ot.target) > depth) {
          ro.activeTargets.push(ot);
        } else {
          ro.skippedTargets.push(ot);
        }
      }
    });
  });
};
exports.gatherActiveObservationsAtDepth = gatherActiveObservationsAtDepth;
