"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const ResizeObserverBoxOptions = require("./ResizeObserverBoxOptions.js");
const calculateBoxSize = require("./algorithms/calculateBoxSize.js");
const element = require("./utils/element.js");
var skipNotifyOnElement = function(target) {
  return !element.isSVG(target) && !element.isReplacedElement(target) && getComputedStyle(target).display === "inline";
};
var ResizeObservation = function() {
  function ResizeObservation2(target, observedBox) {
    this.target = target;
    this.observedBox = observedBox || ResizeObserverBoxOptions.ResizeObserverBoxOptions.CONTENT_BOX;
    this.lastReportedSize = {
      inlineSize: 0,
      blockSize: 0
    };
  }
  ResizeObservation2.prototype.isActive = function() {
    var size = calculateBoxSize.calculateBoxSize(this.target, this.observedBox, true);
    if (skipNotifyOnElement(this.target)) {
      this.lastReportedSize = size;
    }
    if (this.lastReportedSize.inlineSize !== size.inlineSize || this.lastReportedSize.blockSize !== size.blockSize) {
      return true;
    }
    return false;
  };
  return ResizeObservation2;
}();
exports.ResizeObservation = ResizeObservation;
