"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.rerender$ = exports.resize$ = void 0;
const rxjs_1 = require("rxjs");
const resize$ = (el) => {
    let cnt = 0;
    return new rxjs_1.Observable((subscriber) => {
        const resizeObserver = new ResizeObserver(() => subscriber.next(cnt++));
        resizeObserver.observe(el);
        return () => resizeObserver.disconnect();
    });
};
exports.resize$ = resize$;
const rerender$ = (el) => (0, rxjs_1.defer)(() => (0, rxjs_1.merge)((0, exports.resize$)(el), (0, rxjs_1.fromEvent)(window, 'resize'), (0, rxjs_1.fromEvent)(window, 'scroll'), (0, rxjs_1.fromEvent)(screen.orientation, 'change'))).pipe((0, rxjs_1.map)(() => void 0));
exports.rerender$ = rerender$;
//# sourceMappingURL=rect$.js.map