{"version":3,"file":"160.chunk.js","mappings":";;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,2BAA2B,uBAAuB;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA,iEAAiE;AACjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc;AACd,KAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA,IAAI;AACJ,WAAW;AACX,IAAI;AACJ;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,yCAAyC;AACvE;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR,eAAe;AACf,QAAQ;AACR;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;AAED,iEAAe,KAAK,EAAC","sources":["webpack://@pentacode/app/../../node_modules/@lit-labs/virtualizer/polyfills/resize-observer-polyfill/ResizeObserver.js"],"sourcesContent":["/**\n * Detects whether window and document objects are available in current environment.\n */\nvar isBrowser =\n typeof window !== 'undefined' &&\n typeof document !== 'undefined' &&\n window.document === document;\n\n// Returns global object of a current environment.\nvar global$1 = (function () {\n if (typeof global !== 'undefined' && global.Math === Math) {\n return global;\n }\n if (typeof self !== 'undefined' && self.Math === Math) {\n return self;\n }\n if (typeof window !== 'undefined' && window.Math === Math) {\n return window;\n }\n // eslint-disable-next-line no-new-func\n return Function('return this')();\n})();\n\n/**\n * A shim for the requestAnimationFrame which falls back to the setTimeout if\n * first one is not supported.\n *\n * @returns {number} Requests' identifier.\n */\nvar requestAnimationFrame$1 = (function () {\n if (typeof requestAnimationFrame === 'function') {\n // It's required to use a bounded function because IE sometimes throws\n // an \"Invalid calling object\" error if rAF is invoked without the global\n // object on the left hand side.\n return requestAnimationFrame.bind(global$1);\n }\n var result = function (callback) {\n return setTimeout(function () {\n callback(+Date.now());\n }, 1000 / 60);\n };\n return result;\n})();\n\n// Defines minimum timeout before adding a trailing call.\nvar trailingTimeout = 2;\n/**\n * Creates a wrapper function which ensures that provided callback will be\n * invoked only once during the specified delay period.\n *\n * @param callback - Function to be invoked after the delay period.\n * @param delay - Delay after which to invoke callback.\n */\nfunction throttle(callback, delay) {\n var leadingCall = false,\n trailingCall = false,\n lastCallTime = 0;\n /**\n * Invokes the original callback function and schedules new invocation if\n * the \"proxy\" was called during current request.\n */\n function resolvePending() {\n if (leadingCall) {\n leadingCall = false;\n callback();\n }\n if (trailingCall) {\n proxy();\n }\n }\n /**\n * Callback invoked after the specified delay. It will further postpone\n * invocation of the original function delegating it to the\n * requestAnimationFrame.\n *\n * @returns {void}\n */\n function timeoutCallback() {\n requestAnimationFrame$1(resolvePending);\n }\n /**\n * Schedules invocation of the original function.\n */\n function proxy() {\n var timeStamp = Date.now();\n if (leadingCall) {\n // Reject immediately following calls.\n if (timeStamp - lastCallTime < trailingTimeout) {\n return;\n }\n // Schedule new call to be in invoked when the pending one is resolved.\n // This is important for \"transitions\" which never actually start\n // immediately so there is a chance that we might miss one if change\n // happens amids the pending invocation.\n trailingCall = true;\n } else {\n leadingCall = true;\n trailingCall = false;\n setTimeout(timeoutCallback, delay);\n }\n lastCallTime = timeStamp;\n }\n return proxy;\n}\n\n// Minimum delay before invoking the update of observers.\nvar REFRESH_DELAY = 20;\n// A list of substrings of CSS properties used to find transition events that\n// might affect dimensions of observed elements.\nvar transitionKeys = [\n 'top',\n 'right',\n 'bottom',\n 'left',\n 'width',\n 'height',\n 'size',\n 'weight',\n];\n// Check if MutationObserver is available.\nvar mutationObserverSupported = typeof MutationObserver !== 'undefined';\n// Get the native implementation of HTMLElement.attachShadow\nvar origAttachShadow =\n isBrowser &&\n HTMLElement.prototype.attachShadow &&\n HTMLElement.prototype.attachShadow.toString().indexOf('[native code]') !== -1\n ? HTMLElement.prototype.attachShadow\n : null;\n/**\n * Singleton controller class which handles updates of ResizeObserver instances.\n */\nvar ResizeObserverController = /** @class */ (function () {\n /**\n * Creates a new instance of ResizeObserverController.\n */\n function ResizeObserverController() {\n /**\n * Indicates whether DOM listeners have been added.\n */\n this.connected_ = false;\n /**\n * Tells that controller has subscribed for Mutation Events.\n */\n this.mutationEventsAdded_ = false;\n /**\n * Keeps reference to the instance of MutationObserver.\n */\n this.mutationsObserver_ = null;\n /**\n * A list of connected observers.\n */\n this.observers_ = [];\n this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);\n this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);\n }\n /**\n * Adds observer to observers list.\n *\n * @param observer Observer to be added.\n */\n ResizeObserverController.prototype.addObserver = function (observer) {\n if (!~this.observers_.indexOf(observer)) {\n this.observers_.push(observer);\n }\n // Add listeners if they haven't been added yet.\n if (!this.connected_) {\n this.connect_();\n }\n };\n /**\n * Removes observer from observers list.\n *\n * @param observer Observer to be removed.\n */\n ResizeObserverController.prototype.removeObserver = function (observer) {\n var observers = this.observers_;\n var index = observers.indexOf(observer);\n // Remove observer if it's present in registry.\n if (~index) {\n observers.splice(index, 1);\n }\n // Remove listeners if controller has no connected observers.\n if (!observers.length && this.connected_) {\n this.disconnect_();\n }\n };\n /**\n * Invokes the update of observers. It will continue running updates insofar\n * it detects changes.\n */\n ResizeObserverController.prototype.refresh = function () {\n var changesDetected = this.updateObservers_();\n // Continue running updates if changes have been detected as there might\n // be future ones caused by CSS transitions.\n if (changesDetected) {\n this.refresh();\n }\n };\n /**\n * Updates every observer from observers list and notifies them of queued\n * entries.\n *\n * @returns Returns \"true\" if any observer has detected changes in\n * dimensions of it's elements.\n */\n ResizeObserverController.prototype.updateObservers_ = function () {\n // Collect observers that have active observations.\n var activeObservers = this.observers_.filter(function (observer) {\n return observer.gatherActive(), observer.hasActive();\n });\n // Deliver notifications in a separate cycle in order to avoid any\n // collisions between observers, e.g. when multiple instances of\n // ResizeObserver are tracking the same element and the callback of one\n // of them changes content dimensions of the observed target. Sometimes\n // this may result in notifications being blocked for the rest of observers.\n activeObservers.forEach(function (observer) {\n return observer.broadcastActive();\n });\n return activeObservers.length > 0;\n };\n /**\n * Initializes DOM listeners.\n */\n ResizeObserverController.prototype.connect_ = function () {\n // Do nothing if running in a non-browser environment or if listeners\n // have been already added.\n if (!isBrowser || this.connected_) {\n return;\n }\n // Subscription to the \"Transitionend\" event is used as a workaround for\n // delayed transitions. This way it's possible to capture at least the\n // final state of an element.\n document.addEventListener('transitionend', this.onTransitionEnd_);\n window.addEventListener('resize', this.refresh);\n if (mutationObserverSupported) {\n this.mutationsObserver_ = new MutationObserver(this.refresh);\n var options_1 = {\n attributes: true,\n childList: true,\n characterData: true,\n subtree: true,\n };\n this.mutationsObserver_.observe(document, options_1);\n if (origAttachShadow) {\n var controller_1 = this;\n (function observeExistingShadowRoots(node) {\n var shadowRoot = node.shadowRoot;\n if (shadowRoot) {\n controller_1.mutationsObserver_.observe(shadowRoot, options_1);\n observeExistingShadowRoots(shadowRoot);\n }\n var child = node.firstElementChild;\n while (child) {\n observeExistingShadowRoots(child);\n child = child.nextElementSibling;\n }\n })(document);\n HTMLElement.prototype.attachShadow = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var shadowRoot = origAttachShadow.apply(this, args);\n controller_1.mutationsObserver_.observe(shadowRoot, options_1);\n return shadowRoot;\n };\n }\n } else {\n document.addEventListener('DOMSubtreeModified', this.refresh);\n this.mutationEventsAdded_ = true;\n }\n this.connected_ = true;\n };\n /**\n * Removes DOM listeners.\n */\n ResizeObserverController.prototype.disconnect_ = function () {\n // Do nothing if running in a non-browser environment or if listeners\n // have been already removed.\n if (!isBrowser || !this.connected_) {\n return;\n }\n document.removeEventListener('transitionend', this.onTransitionEnd_);\n window.removeEventListener('resize', this.refresh);\n if (this.mutationsObserver_) {\n this.mutationsObserver_.disconnect();\n if (origAttachShadow) {\n HTMLElement.prototype.attachShadow = origAttachShadow;\n }\n }\n if (this.mutationEventsAdded_) {\n document.removeEventListener('DOMSubtreeModified', this.refresh);\n }\n this.mutationsObserver_ = null;\n this.mutationEventsAdded_ = false;\n this.connected_ = false;\n };\n /**\n * \"Transitionend\" event handler.\n */\n ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {\n var _b = _a.propertyName,\n propertyName = _b === void 0 ? '' : _b;\n // Detect whether transition may affect dimensions of an element.\n var isReflowProperty = transitionKeys.some(function (key) {\n return !!~propertyName.indexOf(key);\n });\n if (isReflowProperty) {\n this.refresh();\n }\n };\n /**\n * Returns instance of the ResizeObserverController.\n */\n ResizeObserverController.getInstance = function () {\n if (!ResizeObserverController.instance_) {\n ResizeObserverController.instance_ = new ResizeObserverController();\n }\n return ResizeObserverController.instance_;\n };\n /**\n * Holds reference to the controller's instance.\n */\n ResizeObserverController.instance_ = null;\n return ResizeObserverController;\n})();\n\n/*! *****************************************************************************\n Copyright (c) Microsoft Corporation. All rights reserved.\n Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\n this file except in compliance with the License. You may obtain a copy of the\n License at http://www.apache.org/licenses/LICENSE-2.0\n \n THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\n WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\n MERCHANTABLITY OR NON-INFRINGEMENT.\n \n See the Apache Version 2.0 License for specific language governing permissions\n and limitations under the License.\n ***************************************************************************** */\n\nfunction __values(o) {\n var m = typeof Symbol === 'function' && o[Symbol.iterator],\n i = 0;\n if (m) return m.call(o);\n return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return {value: o && o[i++], done: !o};\n },\n };\n}\n\n/**\n * Defines non-writable/enumerable properties of the provided target object.\n *\n * @param target Object for which to define properties.\n * @param props Properties to be defined.\n * @returns Target object.\n */\nvar defineConfigurable = function (target, props) {\n var e_1, _a;\n try {\n for (\n var _b = __values(Object.keys(props)), _c = _b.next();\n !_c.done;\n _c = _b.next()\n ) {\n var key = _c.value;\n Object.defineProperty(target, key, {\n value: props[key],\n enumerable: false,\n writable: false,\n configurable: true,\n });\n }\n } catch (e_1_1) {\n e_1 = {error: e_1_1};\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n return target;\n};\n\n/**\n * Returns the global object associated with provided element.\n *\n * @param {EventT} target\n * @returns {Object}\n */\nvar getWindowOf = function (target) {\n var _a;\n // Assume that the element is an instance of Node, which means that it\n // has the \"ownerDocument\" property from which we can retrieve a\n // corresponding global object.\n // Return the local global object if it's not possible extract one from\n // provided element.\n return (\n ((_a =\n target === null || target === void 0 ? void 0 : target.ownerDocument) ===\n null || _a === void 0\n ? void 0\n : _a.defaultView) || global$1\n );\n};\n\n// Placeholder of an empty content rectangle.\nvar emptyRect = createRectInit(0, 0, 0, 0);\n/**\n * Converts provided string to a number.\n */\nfunction toFloat(value) {\n if (typeof value === 'number') {\n return value;\n }\n return parseFloat(value) || 0;\n}\n/**\n * Extracts borders size from provided styles.\n */\nfunction getBordersSize(styles) {\n var positions = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n positions[_i - 1] = arguments[_i];\n }\n return positions.reduce(function (size, position) {\n var value = styles['border-' + position + '-width'];\n return size + toFloat(value);\n }, 0);\n}\n/**\n * Extracts paddings sizes from provided styles.\n */\nfunction getPaddings(styles) {\n var st = styles;\n return {\n top: toFloat(st['padding-top']),\n right: toFloat(st['padding-right']),\n bottom: toFloat(st['padding-bottom']),\n left: toFloat(st['padding-left']),\n };\n}\n/**\n * Calculates content rectangle of provided SVG element.\n *\n * @param target Element content rectangle of which needs to be calculated.\n */\nfunction getSVGContentRect(target) {\n var bbox = target.getBBox();\n return createRectInit(0, 0, bbox.width, bbox.height);\n}\n/**\n * Calculates content rectangle of provided HTMLElement.\n *\n * @param target Element for which to calculate the content rectangle.\n */\nfunction getHTMLElementContentRect(target) {\n // Client width & height properties can't be\n // used exclusively as they provide rounded values.\n var clientWidth = target.clientWidth,\n clientHeight = target.clientHeight;\n // By this condition we can catch all non-replaced inline, hidden and\n // detached elements. Though elements with width & height properties less\n // than 0.5 will be discarded as well.\n //\n // Without it we would need to implement separate methods for each of\n // those cases and it's not possible to perform a precise and performance\n // effective test for hidden elements. E.g. even jQuery's ':visible' filter\n // gives wrong results for elements with width & height less than 0.5.\n if (!clientWidth && !clientHeight) {\n return emptyRect;\n }\n var styles = getWindowOf(target).getComputedStyle(target);\n var paddings = getPaddings(styles);\n var horizPad = paddings.left + paddings.right;\n var vertPad = paddings.top + paddings.bottom;\n // Computed styles of width & height are being used because they are the\n // only dimensions available to JS that contain non-rounded values. It could\n // be possible to utilize the getBoundingClientRect if only it's data wasn't\n // affected by CSS transformations let alone paddings, borders and scroll\n // bars.\n var width = toFloat(styles.width),\n height = toFloat(styles.height);\n // Width & height include paddings and borders when the 'border-box' box\n // model is applied (except for IE).\n if (styles.boxSizing === 'border-box') {\n // Following conditions are required to handle Internet Explorer which\n // doesn't include paddings and borders to computed CSS dimensions.\n //\n // We can say that if CSS dimensions + paddings are equal to the \"client\"\n // properties then it's either IE, and thus we don't need to subtract\n // anything, or an element merely doesn't have paddings/borders styles.\n if (Math.round(width + horizPad) !== clientWidth) {\n width -= getBordersSize(styles, 'left', 'right') + horizPad;\n }\n if (Math.round(height + vertPad) !== clientHeight) {\n height -= getBordersSize(styles, 'top', 'bottom') + vertPad;\n }\n }\n // Following steps can't be applied to the document's root element as its\n // client[Width/Height] properties represent viewport area of the window.\n // Besides, it's as well not necessary as the itself neither has\n // rendered scroll bars nor it can be clipped.\n if (!isDocumentElement(target)) {\n // In some browsers (only in Firefox, actually) CSS width & height\n // include scroll bars size which can be removed at this step as scroll\n // bars are the only difference between rounded dimensions + paddings\n // and \"client\" properties, though that is not always true in Chrome.\n var vertScrollbar = Math.round(width + horizPad) - clientWidth;\n var horizScrollbar = Math.round(height + vertPad) - clientHeight;\n // Chrome has a rather weird rounding of \"client\" properties.\n // E.g. for an element with content width of 314.2px it sometimes gives\n // the client width of 315px and for the width of 314.7px it may give\n // 314px. And it doesn't happen all the time. So just ignore this delta\n // as a non-relevant.\n if (Math.abs(vertScrollbar) !== 1) {\n width -= vertScrollbar;\n }\n if (Math.abs(horizScrollbar) !== 1) {\n height -= horizScrollbar;\n }\n }\n return createRectInit(paddings.left, paddings.top, width, height);\n}\n/**\n * Checks whether provided element is an instance of the SVGGraphicsElement.\n *\n * @param target Element to be checked.\n */\nvar isSVGGraphicsElement = (function () {\n // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement\n // interface.\n if (typeof SVGGraphicsElement !== 'undefined') {\n return function (target) {\n return target instanceof getWindowOf(target).SVGGraphicsElement;\n };\n }\n // If it's so, then check that element is at least an instance of the\n // SVGElement and that it has the \"getBBox\" method.\n // eslint-disable-next-line no-extra-parens\n return function (target) {\n return (\n target instanceof getWindowOf(target).SVGElement &&\n typeof target.getBBox === 'function'\n );\n };\n})();\n/**\n * Checks whether provided element is a document element ().\n *\n * @param target Element to be checked.\n */\nfunction isDocumentElement(target) {\n return target === getWindowOf(target).document.documentElement;\n}\n/**\n * Calculates an appropriate content rectangle for provided html or svg element.\n *\n * @param target Element content rectangle of which needs to be calculated.\n */\nfunction getContentRect(target) {\n if (!isBrowser) {\n return emptyRect;\n }\n if (isSVGGraphicsElement(target)) {\n return getSVGContentRect(target);\n }\n return getHTMLElementContentRect(target);\n}\n/**\n * Creates rectangle with an interface of the DOMRectReadOnly.\n * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly\n *\n * @param rectInit Object with rectangle's x/y coordinates and\n * dimensions.\n */\nfunction createReadOnlyRect(_a) {\n var x = _a.x,\n y = _a.y,\n width = _a.width,\n height = _a.height;\n // If DOMRectReadOnly is available use it as a prototype for the rectangle.\n var Constr =\n typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;\n var rect = Object.create(Constr.prototype);\n // Rectangle's properties are not writable and non-enumerable.\n defineConfigurable(rect, {\n x: x,\n y: y,\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: height + y,\n left: x,\n });\n return rect;\n}\n/**\n * Creates DOMRectInit object based on the provided dimensions and the x/y\n * coordinates. Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit\n *\n * @param x X coordinate.\n * @param y Y coordinate.\n * @param width Rectangle's width.\n * @param height Rectangle's height.\n */\nfunction createRectInit(x, y, width, height) {\n return {x: x, y: y, width: width, height: height};\n}\n\n/**\n * Class that is responsible for computations of the content rectangle of\n * provided DOM element and for keeping track of it's changes.\n */\nvar ResizeObservation = /** @class */ (function () {\n /**\n * Creates an instance of ResizeObservation.\n *\n * @param target Element to be observed.\n */\n function ResizeObservation(target) {\n /**\n * Broadcasted width of content rectangle.\n */\n this.broadcastWidth = 0;\n /**\n * Broadcasted height of content rectangle.\n */\n this.broadcastHeight = 0;\n /**\n * Reference to the last observed content rectangle.\n */\n this.contentRect_ = createRectInit(0, 0, 0, 0);\n this.target = target;\n }\n /**\n * Updates content rectangle and tells whether it's width or height properties\n * have changed since the last broadcast.\n */\n ResizeObservation.prototype.isActive = function () {\n var rect = getContentRect(this.target);\n this.contentRect_ = rect;\n return (\n rect.width !== this.broadcastWidth || rect.height !== this.broadcastHeight\n );\n };\n /**\n * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data\n * from the corresponding properties of the last observed content rectangle.\n *\n * @returns Last observed content rectangle.\n */\n ResizeObservation.prototype.broadcastRect = function () {\n var rect = this.contentRect_;\n this.broadcastWidth = rect.width;\n this.broadcastHeight = rect.height;\n return rect;\n };\n return ResizeObservation;\n})();\n\nvar ResizeObserverEntry = /** @class */ (function () {\n /**\n * Creates an instance of ResizeObserverEntry.\n *\n * @param target Element that is being observed.\n * @param rectInit Data of the element's content rectangle.\n */\n function ResizeObserverEntry(target, rectInit) {\n var contentRect = createReadOnlyRect(rectInit);\n // According to the specification following properties are not writable\n // and are also not enumerable in the native implementation.\n //\n // Property accessors are not being used as they'd require to define a\n // private WeakMap storage which may cause memory leaks in browsers that\n // don't support this type of collections.\n defineConfigurable(this, {target: target, contentRect: contentRect});\n }\n return ResizeObserverEntry;\n})();\n\n/**\n * A collection of shims that provide minimal functionality of the ES6\n * collections.\n *\n * These implementations are not meant to be used outside of the ResizeObserver\n * modules as they cover only a limited range of use cases.\n */\n/* eslint-disable require-jsdoc, valid-jsdoc */\nvar MapShim = (function () {\n if (typeof Map !== 'undefined') {\n return Map;\n }\n /**\n * Returns index in provided array that matches the specified key.\n */\n function getIndex(arr, key) {\n var result = -1;\n arr.some(function (entry, index) {\n if (entry[0] === key) {\n result = index;\n return true;\n }\n return false;\n });\n return result;\n }\n return /** @class */ (function () {\n function class_1() {\n this.__entries__ = [];\n }\n Object.defineProperty(class_1.prototype, 'size', {\n get: function () {\n return this.__entries__.length;\n },\n enumerable: true,\n configurable: true,\n });\n class_1.prototype.get = function (key) {\n var _a;\n var index = getIndex(this.__entries__, key);\n return (_a = this.__entries__[index]) === null || _a === void 0\n ? void 0\n : _a[1];\n };\n class_1.prototype.set = function (key, value) {\n var index = getIndex(this.__entries__, key);\n if (~index) {\n this.__entries__[index][1] = value;\n } else {\n this.__entries__.push([key, value]);\n }\n };\n class_1.prototype.delete = function (key) {\n var entries = this.__entries__;\n var index = getIndex(entries, key);\n if (~index) {\n entries.splice(index, 1);\n }\n };\n class_1.prototype.has = function (key) {\n return !!~getIndex(this.__entries__, key);\n };\n class_1.prototype.clear = function () {\n this.__entries__.splice(0);\n };\n class_1.prototype.forEach = function (callback, ctx) {\n var e_1, _a;\n if (ctx === void 0) {\n ctx = null;\n }\n try {\n for (\n var _b = __values(this.__entries__), _c = _b.next();\n !_c.done;\n _c = _b.next()\n ) {\n var entry = _c.value;\n callback.call(ctx, entry[1], entry[0]);\n }\n } catch (e_1_1) {\n e_1 = {error: e_1_1};\n } finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n };\n return class_1;\n })();\n})();\n\nvar ResizeObserverSPI = /** @class */ (function () {\n /**\n * Creates a new instance of ResizeObserver.\n *\n * @param callback Callback function that is invoked when one of the observed\n * elements changes it's content dimensions.\n * @param controller Controller instance which is responsible for the updates\n * of observer.\n * @param callbackCtx Reference to the public ResizeObserver instance which\n * will be passed to callback function.\n */\n function ResizeObserverSPI(callback, controller, callbackCtx) {\n /**\n * Collection of resize observations that have detected changes in dimensions\n * of elements.\n */\n this.activeObservations_ = [];\n /**\n * Registry of the ResizeObservation instances.\n */\n this.observations_ = new MapShim();\n if (typeof callback !== 'function') {\n throw new TypeError(\n 'The callback provided as parameter 1 is not a function.'\n );\n }\n this.callback_ = callback;\n this.controller_ = controller;\n this.callbackCtx_ = callbackCtx;\n }\n /**\n * Starts observing provided element.\n *\n * @param target Element to be observed.\n */\n ResizeObserverSPI.prototype.observe = function (target) {\n if (target === undefined) {\n throw new TypeError('1 argument required, but only 0 present.');\n }\n // Do nothing if current environment doesn't have the Element interface.\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\n return;\n }\n if (!(target instanceof getWindowOf(target).Element)) {\n throw new TypeError('parameter 1 is not of type \"Element\".');\n }\n var observations = this.observations_;\n // Do nothing if element is already being observed.\n if (observations.has(target)) {\n return;\n }\n observations.set(target, new ResizeObservation(target));\n this.controller_.addObserver(this);\n // Force the update of observations.\n this.controller_.refresh();\n };\n /**\n * Stops observing provided element.\n *\n * @param target Element to stop observing.\n */\n ResizeObserverSPI.prototype.unobserve = function (target) {\n if (target === undefined) {\n throw new TypeError('1 argument required, but only 0 present.');\n }\n // Do nothing if current environment doesn't have the Element interface.\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\n return;\n }\n if (!(target instanceof getWindowOf(target).Element)) {\n throw new TypeError('parameter 1 is not of type \"Element\".');\n }\n var observations = this.observations_;\n // Do nothing if element is not being observed.\n if (!observations.has(target)) {\n return;\n }\n observations.delete(target);\n if (!observations.size) {\n this.controller_.removeObserver(this);\n }\n };\n /**\n * Stops observing all elements.\n */\n ResizeObserverSPI.prototype.disconnect = function () {\n this.clearActive();\n this.observations_.clear();\n this.controller_.removeObserver(this);\n };\n /**\n * Collects observation instances the associated element of which has changed\n * it's content rectangle.\n */\n ResizeObserverSPI.prototype.gatherActive = function () {\n var _this = this;\n this.clearActive();\n this.observations_.forEach(function (observation) {\n if (observation.isActive()) {\n _this.activeObservations_.push(observation);\n }\n });\n };\n /**\n * Invokes initial callback function with a list of ResizeObserverEntry\n * instances collected from active resize observations.\n */\n ResizeObserverSPI.prototype.broadcastActive = function () {\n // Do nothing if observer doesn't have active observations.\n if (!this.hasActive()) {\n return;\n }\n var ctx = this.callbackCtx_;\n // Create ResizeObserverEntry instance for every active observation.\n var entries = this.activeObservations_.map(function (observation) {\n return new ResizeObserverEntry(\n observation.target,\n observation.broadcastRect()\n );\n });\n this.callback_.call(ctx, entries, ctx);\n this.clearActive();\n };\n /**\n * Clears the collection of active observations.\n */\n ResizeObserverSPI.prototype.clearActive = function () {\n this.activeObservations_.splice(0);\n };\n /**\n * Tells whether observer has active observations.\n */\n ResizeObserverSPI.prototype.hasActive = function () {\n return this.activeObservations_.length > 0;\n };\n return ResizeObserverSPI;\n})();\n\n/**\n * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation\n * exposing only those methods and properties that are defined in the spec.\n */\nvar ResizeObserver = /** @class */ (function () {\n /**\n * Creates a new instance of ResizeObserver.\n *\n * @param callback Callback that is invoked when dimensions of the observed\n * elements change.\n */\n function ResizeObserver(callback) {\n if (!(this instanceof ResizeObserver)) {\n throw new TypeError('Cannot call a class as a function.');\n }\n if (!arguments.length) {\n throw new TypeError('1 argument required, but only 0 present.');\n }\n var controller = ResizeObserverController.getInstance();\n this.observer_ = new ResizeObserverSPI(callback, controller, this);\n }\n ResizeObserver.prototype.observe = function (target) {\n this.observer_.observe(target);\n };\n ResizeObserver.prototype.unobserve = function (target) {\n this.observer_.unobserve(target);\n };\n ResizeObserver.prototype.disconnect = function () {\n this.observer_.disconnect();\n };\n return ResizeObserver;\n})();\n\nvar index = (function () {\n // Export existing implementation if available.\n if (typeof global$1.ResizeObserver !== 'undefined') {\n return global$1.ResizeObserver;\n }\n return ResizeObserver;\n})();\n\nexport default index;\n"],"names":[],"sourceRoot":""}