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AMC,GAAG,YAAY,EAAI,IAC7G,CAAC,EAEErjD,CACT,CAEA,OAAe,CACb,UAAAsvB,EACA,SAAAgwB,EACA,OAAAC,EACA,WAAA13C,EACA,QAAA23C,EACA,aAAAG,EACA,kBAAAQ,GACA,UAAAE,EACA,kBAAAC,EACA,WAAAE,GACA,UAAA/tB,EACA,YAAAS,EACA,gBAAA0tB,GACA,aAAAE,GACA,SAAAC,GACA,OAAAC,GACA,SAAAC,GACA,eAAAC,GACA,cAAA36D,GACA,QAAA86D,GACA,iBAAAC,GACA,iBAAAM,GACA,cAAAC,GACA,qBAAAC,GACA,aAAAI,GACA,gBAAAE,EACA,uBAAAC,EACA,uBAAAE,GACA,sBAAAC,EACA,wBAAAC,EACA,mBAAAM,GACA,iCAAAE,EACF,C","sources":["webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/display.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/catchUserErrors.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/monitor.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/utils/polyfills.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/boot/init.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/getGlobalObject.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/utils/byteUtils.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/getZoneJsOriginalValue.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/timer.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/utils/functionUtils.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/utils/typeUtils.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/mergeInto.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/serialisation/jsonStringify.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/serialisation/sanitize.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/observable.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/context/heavyCustomerDataWarning.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/context/contextManager.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/boundedBuffer.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/transport/eventBridge.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/browser/addEventListener.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/context/storedContextManager.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/user/user.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/experimentalFeatures.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/utils/numberUtils.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/utils/objectUtils.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/utils/stringUtils.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/session/sessionConstants.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/utils/browserDetection.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/browser/cookie.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/session/storeStrategies/sessionStoreStrategy.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/session/sessionState.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/session/oldCookiesMigration.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/session/storeStrategies/sessionInCookie.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/session/storeStrategies/sessionInLocalStorage.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/session/sessionStoreOperations.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/session/sessionStore.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/utils/urlPolyfill.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/configuration/intakeSites.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/configuration/endpointBuilder.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/configuration/tags.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/configuration/transportConfiguration.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/configuration/configuration.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/tracekit/computeStackTrace.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/error/error.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/report/reportObservable.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/utils/arrayUtils.js","webpack://dot-com/./node_modules/@datadog/browser-logs/esm/domain/configuration.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/error/error.types.js","webpack://dot-com/./node_modules/@datadog/browser-logs/esm/domain/logger.js","webpack://dot-com/./node_modules/@datadog/browser-logs/esm/boot/logsPublicApi.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/sendToExtension.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/telemetry/rawTelemetryEvent.types.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/telemetry/telemetry.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/browser/pageExitObservable.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/synthetics/syntheticsWorkerValues.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/transport/batch.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/utils/responseUtils.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/transport/sendWithRetryStrategy.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/transport/httpRequest.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/transport/flushController.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/transport/startBatchWithReplica.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/valueHistory.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/session/sessionManager.js","webpack://dot-com/./node_modules/@datadog/browser-logs/esm/domain/logsSessionManager.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/eventRateLimiter/createEventRateLimiter.js","webpack://dot-com/./node_modules/@datadog/browser-logs/esm/domain/logger/loggerCollection.js","webpack://dot-com/./node_modules/@datadog/browser-logs/esm/domain/assembly.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/console/consoleObservable.js","webpack://dot-com/./node_modules/@datadog/browser-logs/esm/domain/console/consoleCollection.js","webpack://dot-com/./node_modules/@datadog/browser-logs/esm/domain/report/reportCollection.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/instrumentMethod.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/browser/xhrObservable.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/browser/fetchObservable.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/readBytesFromStream.js","webpack://dot-com/./node_modules/@datadog/browser-logs/esm/domain/networkError/networkErrorCollection.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/tracekit/tracekit.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/domain/error/trackRuntimeError.js","webpack://dot-com/./node_modules/@datadog/browser-logs/esm/domain/runtimeError/runtimeErrorCollection.js","webpack://dot-com/./node_modules/@datadog/browser-core/esm/tools/abstractLifeCycle.js","webpack://dot-com/./node_modules/@datadog/browser-logs/esm/domain/lifeCycle.js","webpack://dot-com/./node_modules/@datadog/browser-logs/esm/transport/startLogsBatch.js","webpack://dot-com/./node_modules/@datadog/browser-logs/esm/transport/startLogsBridge.js","webpack://dot-com/./node_modules/@datadog/browser-logs/esm/domain/internalContext.js","webpack://dot-com/./node_modules/@datadog/browser-logs/esm/boot/startLogs.js","webpack://dot-com/./node_modules/@datadog/browser-logs/esm/entries/main.js","webpack://dot-com/./node_modules/@stimulus/webpack-helpers/dist/index.js","webpack://dot-com/./node_modules/activestorage/app/assets/javascripts/activestorage.js","webpack://dot-com/./node_modules/confetti-js/dist/index.js","webpack://dot-com/./node_modules/date-fns/esm/_lib/requiredArgs/index.js","webpack://dot-com/./node_modules/date-fns/esm/isAfter/index.js","webpack://dot-com/./node_modules/date-fns/esm/isEqual/index.js","webpack://dot-com/./node_modules/date-fns/esm/toDate/index.js","webpack://dot-com/./node_modules/lodash.debounce/index.js","webpack://dot-com/./node_modules/rails-ujs/lib/assets/compiled/rails-ujs.js","webpack://dot-com/./node_modules/@stimulus/core/dist/src/event_listener.js","webpack://dot-com/./node_modules/@stimulus/core/dist/src/dispatcher.js","webpack://dot-com/./node_modules/@stimulus/core/dist/src/action_descriptor.js","webpack://dot-com/./node_modules/@stimulus/core/dist/src/action.js","webpack://dot-com/./node_modules/@stimulus/core/dist/src/binding.js","webpack://dot-com/./node_modules/@stimulus/mutation-observers/dist/src/element_observer.js","webpack://dot-com/./node_modules/@stimulus/mutation-observers/dist/src/attribute_observer.js","webpack://dot-com/./node_modules/@stimulus/multimap/dist/src/set_operations.js","webpack://dot-com/./node_modules/@stimulus/multimap/dist/src/multimap.js","webpack://dot-com/./node_modules/@stimulus/multimap/dist/src/indexed_multimap.js","webpack://dot-com/./node_modules/@stimulus/mutation-observers/dist/src/token_list_observer.js","webpack://dot-com/./node_modules/@stimulus/mutation-observers/dist/src/value_list_observer.js","webpack://dot-com/./node_modules/@stimulus/core/dist/src/binding_observer.js","webpack://dot-com/./node_modules/@stimulus/core/dist/src/context.js","webpack://dot-com/./node_modules/@stimulus/core/dist/src/definition.js","webpack://dot-com/./node_modules/@stimulus/core/dist/src/module.js","webpack://dot-com/./node_modules/@stimulus/core/dist/src/data_map.js","webpack://dot-com/./node_modules/@stimulus/core/dist/src/selectors.js","webpack://dot-com/./node_modules/@stimulus/core/dist/src/target_set.js","webpack://dot-com/./node_modules/@stimulus/core/dist/src/scope.js","webpack://dot-com/./node_modules/@stimulus/core/dist/src/scope_observer.js","webpack://dot-com/./node_modules/@stimulus/core/dist/src/router.js","webpack://dot-com/./node_modules/@stimulus/core/dist/src/schema.js","webpack://dot-com/./node_modules/@stimulus/core/dist/src/application.js","webpack://dot-com/./node_modules/@stimulus/core/dist/src/target_properties.js","webpack://dot-com/./node_modules/@stimulus/core/dist/src/controller.js","webpack://dot-com/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://dot-com/./node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","webpack://dot-com/./node_modules/@floating-ui/core/dist/floating-ui.core.mjs","webpack://dot-com/./node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","webpack://dot-com/./node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-address-autocomplete/services/smarty-service/utils/handle-http-error.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-address-autocomplete/services/smarty-service/smarty-service.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-address-autocomplete/utils/debounce.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-address-autocomplete/utils/text-area-resizer.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-address-autocomplete/utils/is-online.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/styles/base.styles.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-address-autocomplete/kin-address-autocomplete.css.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-validation-spinner/kin-validation-spinner.css.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-validation-spinner/kin-validation-spinner.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-address-autocomplete/kin-address-autocomplete.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-dialog/kin-dialog.css.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-dialog/kin-dialog.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-tabs/kin-tabs.css.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-tabs/kin-tab.css.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-tabs/kin-tab.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-tabs/kin-tab-panel.css.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-tabs/kin-tab-panel.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-tabs/kin-tabs.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-accordion/kin-accordion.css.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-accordion/kin-accordion.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-accordion-group/kin-accordion-group.css.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-accordion-group/kin-accordion-group.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-accordion-step/kin-accordion-step.css.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-accordion-step/kin-accordion-step.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-pill/kin-pill.css.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-pill/kin-pill.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-tooltip/kin-tooltip.css.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-tooltip/kin-tooltip.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-button/kin-button.css.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-button/kin-button.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-dropdown/kin-dropdown.css.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-dropdown/kin-dropdown-item.css.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-dropdown/kin-dropdown-item.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-dropdown/kin-dropdown.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-alert/kin-alert.css.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-alert/kin-alert-icons.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-alert/kin-alert.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-file-uploader/kin-file-uploader.css.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-file-uploader/svg-srcs.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-file-uploader/process-file.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-file-uploader/support-file-types.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-file-uploader/kin-file-uploader.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-query-builder/kin-query-builder.css.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-query-builder/kin-query-builder.utils.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-query-builder/kin-query-builder.model.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-query-builder/kin-query-builder.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-pagination/kin-pagination.css.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-pagination/kin-pagination.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-toast/kin-toast.css.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-toast/kin-toast-icons.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-toast/kin-toast.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-toast-group/kin-toast-group.css.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-toast-group/kin-toast-group.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-non-prod-banner/kin-non-prod-banner.css.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-non-prod-banner/kin-non-prod-banner.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-drawer/kin-drawer.css.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-drawer/kin-drawer.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-loading-indicator/kin-loading-indicator.css.js","webpack://dot-com/./node_modules/@kin/web-components/dist/external/kin-loading-indicator/kin-loading-indicator.js","webpack://dot-com/./node_modules/@lit/reactive-element/decorators/query-all.js","webpack://dot-com/./node_modules/@lit/reactive-element/decorators/query-assigned-elements.js","webpack://dot-com/./node_modules/lit-html/directives/if-defined.js","webpack://dot-com/./node_modules/lit-html/directives/style-map.js","webpack://dot-com/./node_modules/@lit/reactive-element/decorators/base.js","webpack://dot-com/./node_modules/@lit/reactive-element/decorators/custom-element.js","webpack://dot-com/./node_modules/@lit/reactive-element/decorators/property.js","webpack://dot-com/./node_modules/@lit/reactive-element/decorators/query.js","webpack://dot-com/./node_modules/@lit/reactive-element/decorators/state.js","webpack://dot-com/./node_modules/@lit/reactive-element/css-tag.js","webpack://dot-com/./node_modules/@lit/reactive-element/reactive-element.js","webpack://dot-com/./node_modules/@vaadin/component-base/src/async.js","webpack://dot-com/./node_modules/@vaadin/component-base/src/debounce.js","webpack://dot-com/./node_modules/@vaadin/a11y-base/src/announce.js","webpack://dot-com/./node_modules/@vaadin/component-base/src/gestures.js","webpack://dot-com/./node_modules/@polymer/polymer/lib/utils/boot.js","webpack://dot-com/./node_modules/@polymer/polymer/lib/utils/mixin.js","webpack://dot-com/./node_modules/@vaadin/a11y-base/src/disabled-mixin.js","webpack://dot-com/./node_modules/@vaadin/a11y-base/src/keyboard-mixin.js","webpack://dot-com/./node_modules/@vaadin/a11y-base/src/active-mixin.js","webpack://dot-com/./node_modules/@vaadin/a11y-base/src/focus-utils.js","webpack://dot-com/./node_modules/@vaadin/a11y-base/src/focus-mixin.js","webpack://dot-com/./node_modules/@vaadin/a11y-base/src/tabindex-mixin.js","webpack://dot-com/./node_modules/@vaadin/a11y-base/src/delegate-focus-mixin.js","webpack://dot-com/./node_modules/@vaadin/a11y-base/src/aria-id-reference.js","webpack://dot-com/./node_modules/@vaadin/a11y-base/src/field-aria-controller.js","webpack://dot-com/./node_modules/@vaadin/a11y-base/src/focus-trap-controller.js","webpack://dot-com/./node_modules/@vaadin/a11y-base/src/focus-restoration-controller.js","webpack://dot-com/./node_modules/@vaadin/a11y-base/src/keyboard-direction-mixin.js","webpack://dot-com/./node_modules/@vaadin/a11y-base/src/list-mixin.js","webpack://dot-com/./node_modules/lit-element/lit-element.js","webpack://dot-com/./node_modules/lit-html/directive.js","webpack://dot-com/./node_modules/lit-html/directives/class-map.js","webpack://dot-com/./node_modules/lit-html/lit-html.js","webpack://dot-com/./node_modules/tslib/tslib.es6.mjs"],"sourcesContent":["/* eslint-disable local-rules/disallow-side-effects */\n/**\n * Keep references on console methods to avoid triggering patched behaviors\n *\n * NB: in some setup, console could already be patched by another SDK.\n * In this case, some display messages can be sent by the other SDK\n * but we should be safe from infinite loop nonetheless.\n */\nexport var ConsoleApiName = {\n log: 'log',\n debug: 'debug',\n info: 'info',\n warn: 'warn',\n error: 'error',\n};\nexport var display = function (api) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (!Object.prototype.hasOwnProperty.call(ConsoleApiName, api)) {\n api = ConsoleApiName.log;\n }\n display[api].apply(display, args);\n};\n/**\n * When building JS bundles, some users might use a plugin[1] or configuration[2] to remove\n * \"console.*\" references. This causes some issue as we expect `console.*` to be defined.\n * As a workaround, let's use a variable alias, so those expressions won't be taken into account by\n * simple static analysis.\n *\n * [1]: https://babeljs.io/docs/babel-plugin-transform-remove-console/\n * [2]: https://github.com/terser/terser#compress-options (look for drop_console)\n */\nexport var globalConsole = console;\nvar PREFIX = 'Datadog Browser SDK:';\ndisplay.debug = globalConsole.debug.bind(globalConsole, PREFIX);\ndisplay.log = globalConsole.log.bind(globalConsole, PREFIX);\ndisplay.info = globalConsole.info.bind(globalConsole, PREFIX);\ndisplay.warn = globalConsole.warn.bind(globalConsole, PREFIX);\ndisplay.error = globalConsole.error.bind(globalConsole, PREFIX);\n//# sourceMappingURL=display.js.map","import { display } from './display';\nexport function catchUserErrors(fn, errorMsg) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n try {\n return fn.apply(void 0, args);\n }\n catch (err) {\n display.error(errorMsg, err);\n }\n };\n}\n//# sourceMappingURL=catchUserErrors.js.map","var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { ConsoleApiName, display } from './display';\nvar onMonitorErrorCollected;\nvar debugMode = false;\nexport function startMonitorErrorCollection(newOnMonitorErrorCollected) {\n onMonitorErrorCollected = newOnMonitorErrorCollected;\n}\nexport function setDebugMode(newDebugMode) {\n debugMode = newDebugMode;\n}\nexport function resetMonitor() {\n onMonitorErrorCollected = undefined;\n debugMode = false;\n}\nexport function monitored(_, __, descriptor) {\n var originalMethod = descriptor.value;\n descriptor.value = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var decorated = onMonitorErrorCollected ? monitor(originalMethod) : originalMethod;\n return decorated.apply(this, args);\n };\n}\nexport function monitor(fn) {\n return function () {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return callMonitored(fn, this, arguments);\n }; // consider output type has input type\n}\nexport function callMonitored(fn, context, args) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return fn.apply(context, args);\n }\n catch (e) {\n displayIfDebugEnabled(ConsoleApiName.error, e);\n if (onMonitorErrorCollected) {\n try {\n onMonitorErrorCollected(e);\n }\n catch (e) {\n displayIfDebugEnabled(ConsoleApiName.error, e);\n }\n }\n }\n}\nexport function displayIfDebugEnabled(api) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (debugMode) {\n display.apply(void 0, __spreadArray([api, '[MONITOR]'], args, false));\n }\n}\n//# sourceMappingURL=monitor.js.map","export function includes(candidate, search) {\n return candidate.indexOf(search) !== -1;\n}\nexport function arrayFrom(arrayLike) {\n if (Array.from) {\n return Array.from(arrayLike);\n }\n var array = [];\n if (arrayLike instanceof Set) {\n arrayLike.forEach(function (item) { return array.push(item); });\n }\n else {\n for (var i = 0; i < arrayLike.length; i++) {\n array.push(arrayLike[i]);\n }\n }\n return array;\n}\nexport function find(array, predicate) {\n for (var i = 0; i < array.length; i += 1) {\n var item = array[i];\n if (predicate(item, i)) {\n return item;\n }\n }\n return undefined;\n}\nexport function findLast(array, predicate) {\n for (var i = array.length - 1; i >= 0; i -= 1) {\n var item = array[i];\n if (predicate(item, i, array)) {\n return item;\n }\n }\n return undefined;\n}\nexport function forEach(list, callback) {\n Array.prototype.forEach.call(list, callback);\n}\nexport function objectValues(object) {\n return Object.keys(object).map(function (key) { return object[key]; });\n}\nexport function objectEntries(object) {\n return Object.keys(object).map(function (key) { return [key, object[key]]; });\n}\nexport function startsWith(candidate, search) {\n return candidate.slice(0, search.length) === search;\n}\nexport function endsWith(candidate, search) {\n return candidate.slice(-search.length) === search;\n}\nexport function elementMatches(element, selector) {\n if (element.matches) {\n return element.matches(selector);\n }\n // IE11 support\n if (element.msMatchesSelector) {\n return element.msMatchesSelector(selector);\n }\n return false;\n}\n// https://github.com/jquery/jquery/blob/a684e6ba836f7c553968d7d026ed7941e1a612d8/src/selector/escapeSelector.js\nexport function cssEscape(str) {\n if (window.CSS && window.CSS.escape) {\n return window.CSS.escape(str);\n }\n // eslint-disable-next-line no-control-regex\n return str.replace(/([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\x80-\\uFFFF\\w-]/g, function (ch, asCodePoint) {\n if (asCodePoint) {\n // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n if (ch === '\\0') {\n return '\\uFFFD';\n }\n // Control characters and (dependent upon position) numbers get escaped as code points\n return \"\".concat(ch.slice(0, -1), \"\\\\\").concat(ch.charCodeAt(ch.length - 1).toString(16), \" \");\n }\n // Other potentially-special ASCII characters get backslash-escaped\n return \"\\\\\".concat(ch);\n });\n}\nexport function assign(target) {\n var toAssign = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n toAssign[_i - 1] = arguments[_i];\n }\n toAssign.forEach(function (source) {\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n });\n return target;\n}\n//# sourceMappingURL=polyfills.js.map","import { catchUserErrors } from '../tools/catchUserErrors';\nimport { setDebugMode } from '../tools/monitor';\nimport { assign } from '../tools/utils/polyfills';\nexport function makePublicApi(stub) {\n var publicApi = assign({\n version: \"4.50.0\",\n // This API method is intentionally not monitored, since the only thing executed is the\n // user-provided 'callback'. All SDK usages executed in the callback should be monitored, and\n // we don't want to interfere with the user uncaught exceptions.\n onReady: function (callback) {\n callback();\n },\n }, stub);\n // Add a \"hidden\" property to set debug mode. We define it that way to hide it\n // as much as possible but of course it's not a real protection.\n Object.defineProperty(publicApi, '_setDebug', {\n get: function () {\n return setDebugMode;\n },\n enumerable: false,\n });\n return publicApi;\n}\nexport function defineGlobal(global, name, api) {\n var existingGlobalVariable = global[name];\n global[name] = api;\n if (existingGlobalVariable && existingGlobalVariable.q) {\n existingGlobalVariable.q.forEach(function (fn) { return catchUserErrors(fn, 'onReady callback threw an error:')(); });\n }\n}\n//# sourceMappingURL=init.js.map","/**\n * inspired by https://mathiasbynens.be/notes/globalthis\n */\nexport function getGlobalObject() {\n if (typeof globalThis === 'object') {\n return globalThis;\n }\n Object.defineProperty(Object.prototype, '_dd_temp_', {\n get: function () {\n return this;\n },\n configurable: true,\n });\n // @ts-ignore _dd_temp is defined using defineProperty\n var globalObject = _dd_temp_;\n // @ts-ignore _dd_temp is defined using defineProperty\n delete Object.prototype._dd_temp_;\n if (typeof globalObject !== 'object') {\n // on safari _dd_temp_ is available on window but not globally\n // fallback on other browser globals check\n if (typeof self === 'object') {\n globalObject = self;\n }\n else if (typeof window === 'object') {\n globalObject = window;\n }\n else {\n globalObject = {};\n }\n }\n return globalObject;\n}\n//# sourceMappingURL=getGlobalObject.js.map","export var ONE_KIBI_BYTE = 1024;\nexport var ONE_MEBI_BYTE = 1024 * ONE_KIBI_BYTE;\n// eslint-disable-next-line no-control-regex\nvar HAS_MULTI_BYTES_CHARACTERS = /[^\\u0000-\\u007F]/;\nexport function computeBytesCount(candidate) {\n // Accurate bytes count computations can degrade performances when there is a lot of events to process\n if (!HAS_MULTI_BYTES_CHARACTERS.test(candidate)) {\n return candidate.length;\n }\n if (window.TextEncoder !== undefined) {\n return new TextEncoder().encode(candidate).length;\n }\n return new Blob([candidate]).size;\n}\nexport function concatBuffers(buffers) {\n var length = buffers.reduce(function (total, buffer) { return total + buffer.length; }, 0);\n var result = new Uint8Array(length);\n var offset = 0;\n for (var _i = 0, buffers_1 = buffers; _i < buffers_1.length; _i++) {\n var buffer = buffers_1[_i];\n result.set(buffer, offset);\n offset += buffer.length;\n }\n return result;\n}\n//# sourceMappingURL=byteUtils.js.map","import { getGlobalObject } from './getGlobalObject';\n/**\n * Gets the original value for a DOM API that was potentially patched by Zone.js.\n *\n * Zone.js[1] is a library that patches a bunch of JS and DOM APIs. It usually stores the original\n * value of the patched functions/constructors/methods in a hidden property prefixed by\n * __zone_symbol__.\n *\n * In multiple occasions, we observed that Zone.js is the culprit of important issues leading to\n * browser resource exhaustion (memory leak, high CPU usage). This method is used as a workaround to\n * use the original DOM API instead of the one patched by Zone.js.\n *\n * [1]: https://github.com/angular/angular/tree/main/packages/zone.js\n */\nexport function getZoneJsOriginalValue(target, name) {\n var browserWindow = getGlobalObject();\n var original;\n if (browserWindow.Zone && typeof browserWindow.Zone.__symbol__ === 'function') {\n original = target[browserWindow.Zone.__symbol__(name)];\n }\n if (!original) {\n original = target[name];\n }\n return original;\n}\n//# sourceMappingURL=getZoneJsOriginalValue.js.map","import { getZoneJsOriginalValue } from './getZoneJsOriginalValue';\nimport { monitor } from './monitor';\nimport { getGlobalObject } from './getGlobalObject';\nexport function setTimeout(callback, delay) {\n return getZoneJsOriginalValue(getGlobalObject(), 'setTimeout')(monitor(callback), delay);\n}\nexport function clearTimeout(timeoutId) {\n getZoneJsOriginalValue(getGlobalObject(), 'clearTimeout')(timeoutId);\n}\nexport function setInterval(callback, delay) {\n return getZoneJsOriginalValue(getGlobalObject(), 'setInterval')(monitor(callback), delay);\n}\nexport function clearInterval(timeoutId) {\n getZoneJsOriginalValue(getGlobalObject(), 'clearInterval')(timeoutId);\n}\n//# sourceMappingURL=timer.js.map","import { setTimeout, clearTimeout } from '../timer';\n// use lodash API\nexport function throttle(fn, wait, options) {\n var needLeadingExecution = options && options.leading !== undefined ? options.leading : true;\n var needTrailingExecution = options && options.trailing !== undefined ? options.trailing : true;\n var inWaitPeriod = false;\n var pendingExecutionWithParameters;\n var pendingTimeoutId;\n return {\n throttled: function () {\n var parameters = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n parameters[_i] = arguments[_i];\n }\n if (inWaitPeriod) {\n pendingExecutionWithParameters = parameters;\n return;\n }\n if (needLeadingExecution) {\n fn.apply(void 0, parameters);\n }\n else {\n pendingExecutionWithParameters = parameters;\n }\n inWaitPeriod = true;\n pendingTimeoutId = setTimeout(function () {\n if (needTrailingExecution && pendingExecutionWithParameters) {\n fn.apply(void 0, pendingExecutionWithParameters);\n }\n inWaitPeriod = false;\n pendingExecutionWithParameters = undefined;\n }, wait);\n },\n cancel: function () {\n clearTimeout(pendingTimeoutId);\n inWaitPeriod = false;\n pendingExecutionWithParameters = undefined;\n },\n };\n}\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nexport function noop() { }\n//# sourceMappingURL=functionUtils.js.map","/**\n * Similar to `typeof`, but distinguish plain objects from `null` and arrays\n */\nexport function getType(value) {\n if (value === null) {\n return 'null';\n }\n if (Array.isArray(value)) {\n return 'array';\n }\n return typeof value;\n}\n//# sourceMappingURL=typeUtils.js.map","import { getType } from './utils/typeUtils';\n/**\n * Iterate over source and affect its sub values into destination, recursively.\n * If the source and destination can't be merged, return source.\n */\nexport function mergeInto(destination, source, circularReferenceChecker) {\n if (circularReferenceChecker === void 0) { circularReferenceChecker = createCircularReferenceChecker(); }\n // ignore the source if it is undefined\n if (source === undefined) {\n return destination;\n }\n if (typeof source !== 'object' || source === null) {\n // primitive values - just return source\n return source;\n }\n else if (source instanceof Date) {\n return new Date(source.getTime());\n }\n else if (source instanceof RegExp) {\n var flags = source.flags ||\n // old browsers compatibility\n [\n source.global ? 'g' : '',\n source.ignoreCase ? 'i' : '',\n source.multiline ? 'm' : '',\n source.sticky ? 'y' : '',\n source.unicode ? 'u' : '',\n ].join('');\n return new RegExp(source.source, flags);\n }\n if (circularReferenceChecker.hasAlreadyBeenSeen(source)) {\n // remove circular references\n return undefined;\n }\n else if (Array.isArray(source)) {\n var merged_1 = Array.isArray(destination) ? destination : [];\n for (var i = 0; i < source.length; ++i) {\n merged_1[i] = mergeInto(merged_1[i], source[i], circularReferenceChecker);\n }\n return merged_1;\n }\n var merged = getType(destination) === 'object' ? destination : {};\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n merged[key] = mergeInto(merged[key], source[key], circularReferenceChecker);\n }\n }\n return merged;\n}\n/**\n * A simplistic implementation of a deep clone algorithm.\n * Caveats:\n * - It doesn't maintain prototype chains - don't use with instances of custom classes.\n * - It doesn't handle Map and Set\n */\nexport function deepClone(value) {\n return mergeInto(undefined, value);\n}\nexport function combine() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n var destination;\n for (var _a = 0, sources_1 = sources; _a < sources_1.length; _a++) {\n var source = sources_1[_a];\n // Ignore any undefined or null sources.\n if (source === undefined || source === null) {\n continue;\n }\n destination = mergeInto(destination, source);\n }\n return destination;\n}\nfunction createCircularReferenceChecker() {\n if (typeof WeakSet !== 'undefined') {\n var set_1 = new WeakSet();\n return {\n hasAlreadyBeenSeen: function (value) {\n var has = set_1.has(value);\n if (!has) {\n set_1.add(value);\n }\n return has;\n },\n };\n }\n var array = [];\n return {\n hasAlreadyBeenSeen: function (value) {\n var has = array.indexOf(value) >= 0;\n if (!has) {\n array.push(value);\n }\n return has;\n },\n };\n}\n//# sourceMappingURL=mergeInto.js.map","import { noop } from '../utils/functionUtils';\n/**\n * Custom implementation of JSON.stringify that ignores some toJSON methods. We need to do that\n * because some sites badly override toJSON on certain objects. Removing all toJSON methods from\n * nested values would be too costly, so we just detach them from the root value, and native classes\n * used to build JSON values (Array and Object).\n *\n * Note: this still assumes that JSON.stringify is correct.\n */\nexport function jsonStringify(value, replacer, space) {\n if (typeof value !== 'object' || value === null) {\n return JSON.stringify(value);\n }\n // Note: The order matter here. We need to detach toJSON methods on parent classes before their\n // subclasses.\n var restoreObjectPrototypeToJson = detachToJsonMethod(Object.prototype);\n var restoreArrayPrototypeToJson = detachToJsonMethod(Array.prototype);\n var restoreValuePrototypeToJson = detachToJsonMethod(Object.getPrototypeOf(value));\n var restoreValueToJson = detachToJsonMethod(value);\n try {\n return JSON.stringify(value, replacer, space);\n }\n catch (_a) {\n return '';\n }\n finally {\n restoreObjectPrototypeToJson();\n restoreArrayPrototypeToJson();\n restoreValuePrototypeToJson();\n restoreValueToJson();\n }\n}\nexport function detachToJsonMethod(value) {\n var object = value;\n var objectToJson = object.toJSON;\n if (objectToJson) {\n delete object.toJSON;\n return function () {\n object.toJSON = objectToJson;\n };\n }\n return noop;\n}\n//# sourceMappingURL=jsonStringify.js.map","import { display } from '../display';\nimport { ONE_KIBI_BYTE } from '../utils/byteUtils';\nimport { detachToJsonMethod } from './jsonStringify';\n// The maximum size of a single event is 256KiB. By default, we ensure that user-provided data\n// going through sanitize fits inside our events, while leaving room for other contexts, metadata, ...\nvar SANITIZE_DEFAULT_MAX_CHARACTER_COUNT = 220 * ONE_KIBI_BYTE;\n// Symbol for the root element of the JSONPath used for visited objects\nvar JSON_PATH_ROOT_ELEMENT = '$';\n// When serializing (using JSON.stringify) a key of an object, { key: 42 } gets wrapped in quotes as \"key\".\n// With the separator (:), we need to add 3 characters to the count.\nvar KEY_DECORATION_LENGTH = 3;\nexport function sanitize(source, maxCharacterCount) {\n var _a;\n if (maxCharacterCount === void 0) { maxCharacterCount = SANITIZE_DEFAULT_MAX_CHARACTER_COUNT; }\n // Unbind any toJSON function we may have on [] or {} prototypes\n var restoreObjectPrototypeToJson = detachToJsonMethod(Object.prototype);\n var restoreArrayPrototypeToJson = detachToJsonMethod(Array.prototype);\n // Initial call to sanitizeProcessor - will populate containerQueue if source is an Array or a plain Object\n var containerQueue = [];\n var visitedObjectsWithPath = new WeakMap();\n var sanitizedData = sanitizeProcessor(source, JSON_PATH_ROOT_ELEMENT, undefined, containerQueue, visitedObjectsWithPath);\n var accumulatedCharacterCount = ((_a = JSON.stringify(sanitizedData)) === null || _a === void 0 ? void 0 : _a.length) || 0;\n if (accumulatedCharacterCount > maxCharacterCount) {\n warnOverCharacterLimit(maxCharacterCount, 'discarded', source);\n return undefined;\n }\n while (containerQueue.length > 0 && accumulatedCharacterCount < maxCharacterCount) {\n var containerToProcess = containerQueue.shift();\n var separatorLength = 0; // 0 for the first element, 1 for subsequent elements\n // Arrays and Objects have to be handled distinctly to ensure\n // we do not pick up non-numerical properties from Arrays\n if (Array.isArray(containerToProcess.source)) {\n for (var key = 0; key < containerToProcess.source.length; key++) {\n var targetData = sanitizeProcessor(containerToProcess.source[key], containerToProcess.path, key, containerQueue, visitedObjectsWithPath);\n if (targetData !== undefined) {\n accumulatedCharacterCount += JSON.stringify(targetData).length;\n }\n else {\n // When an element of an Array (targetData) is undefined, it is serialized as null:\n // JSON.stringify([undefined]) => '[null]' - This accounts for 4 characters\n accumulatedCharacterCount += 4;\n }\n accumulatedCharacterCount += separatorLength;\n separatorLength = 1;\n if (accumulatedCharacterCount > maxCharacterCount) {\n warnOverCharacterLimit(maxCharacterCount, 'truncated', source);\n break;\n }\n ;\n containerToProcess.target[key] = targetData;\n }\n }\n else {\n for (var key in containerToProcess.source) {\n if (Object.prototype.hasOwnProperty.call(containerToProcess.source, key)) {\n var targetData = sanitizeProcessor(containerToProcess.source[key], containerToProcess.path, key, containerQueue, visitedObjectsWithPath);\n // When a property of an object has an undefined value, it will be dropped during serialization:\n // JSON.stringify({a:undefined}) => '{}'\n if (targetData !== undefined) {\n accumulatedCharacterCount +=\n JSON.stringify(targetData).length + separatorLength + key.length + KEY_DECORATION_LENGTH;\n separatorLength = 1;\n }\n if (accumulatedCharacterCount > maxCharacterCount) {\n warnOverCharacterLimit(maxCharacterCount, 'truncated', source);\n break;\n }\n ;\n containerToProcess.target[key] = targetData;\n }\n }\n }\n }\n // Rebind detached toJSON functions\n restoreObjectPrototypeToJson();\n restoreArrayPrototypeToJson();\n return sanitizedData;\n}\n/**\n * Internal function to factorize the process common to the\n * initial call to sanitize, and iterations for Arrays and Objects\n *\n */\nfunction sanitizeProcessor(source, parentPath, key, queue, visitedObjectsWithPath) {\n // Start by handling toJSON, as we want to sanitize its output\n var sourceToSanitize = tryToApplyToJSON(source);\n if (!sourceToSanitize || typeof sourceToSanitize !== 'object') {\n return sanitizePrimitivesAndFunctions(sourceToSanitize);\n }\n var sanitizedSource = sanitizeObjects(sourceToSanitize);\n if (sanitizedSource !== '[Object]' && sanitizedSource !== '[Array]' && sanitizedSource !== '[Error]') {\n return sanitizedSource;\n }\n // Handle potential cyclic references\n // We need to use source as sourceToSanitize could be a reference to a new object\n // At this stage, we know the source is an object type\n var sourceAsObject = source;\n if (visitedObjectsWithPath.has(sourceAsObject)) {\n return \"[Reference seen at \".concat(visitedObjectsWithPath.get(sourceAsObject), \"]\");\n }\n // Add processed source to queue\n var currentPath = key !== undefined ? \"\".concat(parentPath, \".\").concat(key) : parentPath;\n var target = Array.isArray(sourceToSanitize) ? [] : {};\n visitedObjectsWithPath.set(sourceAsObject, currentPath);\n queue.push({ source: sourceToSanitize, target: target, path: currentPath });\n return target;\n}\n/**\n * Handles sanitization of simple, non-object types\n *\n */\nfunction sanitizePrimitivesAndFunctions(value) {\n // BigInt cannot be serialized by JSON.stringify(), convert it to a string representation\n if (typeof value === 'bigint') {\n return \"[BigInt] \".concat(value.toString());\n }\n // Functions cannot be serialized by JSON.stringify(). Moreover, if a faulty toJSON is present, it needs to be converted\n // so it won't prevent stringify from serializing later\n if (typeof value === 'function') {\n return \"[Function] \".concat(value.name || 'unknown');\n }\n // JSON.stringify() does not serialize symbols.\n if (typeof value === 'symbol') {\n return \"[Symbol] \".concat(value.description || value.toString());\n }\n return value;\n}\n/**\n * Handles sanitization of object types\n *\n * LIMITATIONS\n * - If a class defines a toStringTag Symbol, it will fall in the catch-all method and prevent enumeration of properties.\n * To avoid this, a toJSON method can be defined.\n * - IE11 does not return a distinct type for objects such as Map, WeakMap, ... These objects will pass through and their\n * properties enumerated if any.\n *\n */\nfunction sanitizeObjects(value) {\n try {\n // Handle events - Keep a simple implementation to avoid breaking changes\n if (value instanceof Event) {\n return {\n isTrusted: value.isTrusted,\n };\n }\n // Handle all remaining object types in a generic way\n var result = Object.prototype.toString.call(value);\n var match = result.match(/\\[object (.*)\\]/);\n if (match && match[1]) {\n return \"[\".concat(match[1], \"]\");\n }\n }\n catch (_a) {\n // If the previous serialization attempts failed, and we cannot convert using\n // Object.prototype.toString, declare the value unserializable\n }\n return '[Unserializable]';\n}\n/**\n * Checks if a toJSON function exists and tries to execute it\n *\n */\nfunction tryToApplyToJSON(value) {\n var object = value;\n if (object && typeof object.toJSON === 'function') {\n try {\n return object.toJSON();\n }\n catch (_a) {\n // If toJSON fails, we continue by trying to serialize the value manually\n }\n }\n return value;\n}\n/**\n * Helper function to display the warning when the accumulated character count is over the limit\n */\nfunction warnOverCharacterLimit(maxCharacterCount, changeType, source) {\n display.warn(\"The data provided has been \".concat(changeType, \" as it is over the limit of \").concat(maxCharacterCount, \" characters:\"), source);\n}\n//# sourceMappingURL=sanitize.js.map","var Observable = /** @class */ (function () {\n function Observable(onFirstSubscribe) {\n this.onFirstSubscribe = onFirstSubscribe;\n this.observers = [];\n }\n Observable.prototype.subscribe = function (f) {\n var _this = this;\n if (!this.observers.length && this.onFirstSubscribe) {\n this.onLastUnsubscribe = this.onFirstSubscribe() || undefined;\n }\n this.observers.push(f);\n return {\n unsubscribe: function () {\n _this.observers = _this.observers.filter(function (other) { return f !== other; });\n if (!_this.observers.length && _this.onLastUnsubscribe) {\n _this.onLastUnsubscribe();\n }\n },\n };\n };\n Observable.prototype.notify = function (data) {\n this.observers.forEach(function (observer) { return observer(data); });\n };\n return Observable;\n}());\nexport { Observable };\nexport function mergeObservables() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n var globalObservable = new Observable(function () {\n var subscriptions = observables.map(function (observable) {\n return observable.subscribe(function (data) { return globalObservable.notify(data); });\n });\n return function () { return subscriptions.forEach(function (subscription) { return subscription.unsubscribe(); }); };\n });\n return globalObservable;\n}\n//# sourceMappingURL=observable.js.map","var _a;\nimport { ONE_KIBI_BYTE } from '../../tools/utils/byteUtils';\nimport { display } from '../../tools/display';\n// RUM and logs batch bytes limit is 16KB\n// ensure that we leave room for other event attributes and maintain a decent amount of event per batch\n// (3KB (customer data) + 1KB (other attributes)) * 4 (events per batch) = 16KB\nexport var CUSTOMER_DATA_BYTES_LIMIT = 3 * ONE_KIBI_BYTE;\nvar CustomerDataLabel = (_a = {},\n _a[0 /* CustomerDataType.FeatureFlag */] = 'feature flag evaluation',\n _a[1 /* CustomerDataType.User */] = 'user',\n _a[2 /* CustomerDataType.GlobalContext */] = 'global context',\n _a[3 /* CustomerDataType.LoggerContext */] = 'logger context',\n _a);\nexport function warnIfCustomerDataLimitReached(bytesCount, customerDataType) {\n if (bytesCount > CUSTOMER_DATA_BYTES_LIMIT) {\n display.warn(\"The \".concat(CustomerDataLabel[customerDataType], \" data exceeds the recommended \").concat(CUSTOMER_DATA_BYTES_LIMIT / ONE_KIBI_BYTE, \"KiB threshold. More details: https://docs.datadoghq.com/real_user_monitoring/browser/troubleshooting/#customer-data-exceeds-the-recommended-3kib-warning\"));\n return true;\n }\n return false;\n}\n//# sourceMappingURL=heavyCustomerDataWarning.js.map","import { computeBytesCount } from '../../tools/utils/byteUtils';\nimport { throttle } from '../../tools/utils/functionUtils';\nimport { deepClone } from '../../tools/mergeInto';\nimport { getType } from '../../tools/utils/typeUtils';\nimport { jsonStringify } from '../../tools/serialisation/jsonStringify';\nimport { sanitize } from '../../tools/serialisation/sanitize';\nimport { Observable } from '../../tools/observable';\nimport { warnIfCustomerDataLimitReached } from './heavyCustomerDataWarning';\nexport var BYTES_COMPUTATION_THROTTLING_DELAY = 200;\nexport function createContextManager(customerDataType, computeBytesCountImpl) {\n if (computeBytesCountImpl === void 0) { computeBytesCountImpl = computeBytesCount; }\n var context = {};\n var bytesCountCache;\n var alreadyWarned = false;\n var changeObservable = new Observable();\n // Throttle the bytes computation to minimize the impact on performance.\n // Especially useful if the user call context APIs synchronously multiple times in a row\n var computeBytesCountThrottled = throttle(function (context) {\n bytesCountCache = computeBytesCountImpl(jsonStringify(context));\n if (!alreadyWarned) {\n alreadyWarned = warnIfCustomerDataLimitReached(bytesCountCache, customerDataType);\n }\n }, BYTES_COMPUTATION_THROTTLING_DELAY).throttled;\n var contextManager = {\n getBytesCount: function () { return bytesCountCache; },\n /** @deprecated use getContext instead */\n get: function () { return context; },\n /** @deprecated use setContextProperty instead */\n add: function (key, value) {\n context[key] = value;\n computeBytesCountThrottled(context);\n changeObservable.notify();\n },\n /** @deprecated renamed to removeContextProperty */\n remove: function (key) {\n delete context[key];\n computeBytesCountThrottled(context);\n changeObservable.notify();\n },\n /** @deprecated use setContext instead */\n set: function (newContext) {\n context = newContext;\n computeBytesCountThrottled(context);\n changeObservable.notify();\n },\n getContext: function () { return deepClone(context); },\n setContext: function (newContext) {\n if (getType(newContext) === 'object') {\n context = sanitize(newContext);\n computeBytesCountThrottled(context);\n }\n else {\n contextManager.clearContext();\n }\n changeObservable.notify();\n },\n setContextProperty: function (key, property) {\n context[key] = sanitize(property);\n computeBytesCountThrottled(context);\n changeObservable.notify();\n },\n removeContextProperty: function (key) {\n delete context[key];\n computeBytesCountThrottled(context);\n changeObservable.notify();\n },\n clearContext: function () {\n context = {};\n bytesCountCache = 0;\n changeObservable.notify();\n },\n changeObservable: changeObservable,\n };\n return contextManager;\n}\n//# sourceMappingURL=contextManager.js.map","var BUFFER_LIMIT = 500;\nvar BoundedBuffer = /** @class */ (function () {\n function BoundedBuffer() {\n this.buffer = [];\n }\n BoundedBuffer.prototype.add = function (callback) {\n var length = this.buffer.push(callback);\n if (length > BUFFER_LIMIT) {\n this.buffer.splice(0, 1);\n }\n };\n BoundedBuffer.prototype.drain = function () {\n this.buffer.forEach(function (callback) { return callback(); });\n this.buffer.length = 0;\n };\n return BoundedBuffer;\n}());\nexport { BoundedBuffer };\n//# sourceMappingURL=boundedBuffer.js.map","import { isNumber, round } from './numberUtils';\nexport var ONE_SECOND = 1000;\nexport var ONE_MINUTE = 60 * ONE_SECOND;\nexport var ONE_HOUR = 60 * ONE_MINUTE;\nexport var ONE_DAY = 24 * ONE_HOUR;\nexport var ONE_YEAR = 365 * ONE_DAY;\nexport function relativeToClocks(relative) {\n return { relative: relative, timeStamp: getCorrectedTimeStamp(relative) };\n}\nfunction getCorrectedTimeStamp(relativeTime) {\n var correctedOrigin = (dateNow() - performance.now());\n // apply correction only for positive drift\n if (correctedOrigin > getNavigationStart()) {\n return Math.round(addDuration(correctedOrigin, relativeTime));\n }\n return getTimeStamp(relativeTime);\n}\nexport function currentDrift() {\n return Math.round(dateNow() - addDuration(getNavigationStart(), performance.now()));\n}\nexport function toServerDuration(duration) {\n if (!isNumber(duration)) {\n return duration;\n }\n return round(duration * 1e6, 0);\n}\nexport function dateNow() {\n // Do not use `Date.now` because sometimes websites are wrongly \"polyfilling\" it. For example, we\n // had some users using a very old version of `datejs`, which patched `Date.now` to return a Date\n // instance instead of a timestamp[1]. Those users are unlikely to fix this, so let's handle this\n // case ourselves.\n // [1]: https://github.com/datejs/Datejs/blob/97f5c7c58c5bc5accdab8aa7602b6ac56462d778/src/core-debug.js#L14-L16\n return new Date().getTime();\n}\nexport function timeStampNow() {\n return dateNow();\n}\nexport function relativeNow() {\n return performance.now();\n}\nexport function clocksNow() {\n return { relative: relativeNow(), timeStamp: timeStampNow() };\n}\nexport function clocksOrigin() {\n return { relative: 0, timeStamp: getNavigationStart() };\n}\nexport function elapsed(start, end) {\n return (end - start);\n}\nexport function addDuration(a, b) {\n return a + b;\n}\n/**\n * Get the time since the navigation was started.\n *\n * Note: this does not use `performance.timeOrigin` because it doesn't seem to reflect the actual\n * time on which the navigation has started: it may be much farther in the past, at least in Firefox 71.\n * Related issue in Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1429926\n */\nexport function getRelativeTime(timestamp) {\n return (timestamp - getNavigationStart());\n}\nexport function getTimeStamp(relativeTime) {\n return Math.round(addDuration(getNavigationStart(), relativeTime));\n}\nexport function looksLikeRelativeTime(time) {\n return time < ONE_YEAR;\n}\n/**\n * Navigation start slightly change on some rare cases\n */\nvar navigationStart;\nfunction getNavigationStart() {\n if (navigationStart === undefined) {\n navigationStart = performance.timing.navigationStart;\n }\n return navigationStart;\n}\nexport function resetNavigationStart() {\n navigationStart = undefined;\n}\n//# sourceMappingURL=timeUtils.js.map","import { endsWith } from '../tools/utils/polyfills';\nimport { getGlobalObject } from '../tools/getGlobalObject';\nexport function getEventBridge() {\n var eventBridgeGlobal = getEventBridgeGlobal();\n if (!eventBridgeGlobal) {\n return;\n }\n return {\n getAllowedWebViewHosts: function () {\n return JSON.parse(eventBridgeGlobal.getAllowedWebViewHosts());\n },\n send: function (eventType, event) {\n eventBridgeGlobal.send(JSON.stringify({ eventType: eventType, event: event }));\n },\n };\n}\nexport function canUseEventBridge(currentHost) {\n var _a;\n if (currentHost === void 0) { currentHost = (_a = getGlobalObject().location) === null || _a === void 0 ? void 0 : _a.hostname; }\n var bridge = getEventBridge();\n return (!!bridge &&\n bridge\n .getAllowedWebViewHosts()\n .some(function (allowedHost) { return currentHost === allowedHost || endsWith(currentHost, \".\".concat(allowedHost)); }));\n}\nfunction getEventBridgeGlobal() {\n return getGlobalObject().DatadogEventBridge;\n}\n//# sourceMappingURL=eventBridge.js.map","import { monitor } from '../tools/monitor';\nimport { getZoneJsOriginalValue } from '../tools/getZoneJsOriginalValue';\n/**\n * Add an event listener to an event target object (Window, Element, mock object...). This provides\n * a few conveniences compared to using `element.addEventListener` directly:\n *\n * * supports IE11 by: using an option object only if needed and emulating the `once` option\n *\n * * wraps the listener with a `monitor` function\n *\n * * returns a `stop` function to remove the listener\n */\nexport function addEventListener(configuration, eventTarget, eventName, listener, options) {\n return addEventListeners(configuration, eventTarget, [eventName], listener, options);\n}\n/**\n * Add event listeners to an event target object (Window, Element, mock object...). This provides\n * a few conveniences compared to using `element.addEventListener` directly:\n *\n * * supports IE11 by: using an option object only if needed and emulating the `once` option\n *\n * * wraps the listener with a `monitor` function\n *\n * * returns a `stop` function to remove the listener\n *\n * * with `once: true`, the listener will be called at most once, even if different events are listened\n */\nexport function addEventListeners(_, eventTarget, eventNames, listener, _a) {\n var _b = _a === void 0 ? {} : _a, once = _b.once, capture = _b.capture, passive = _b.passive;\n var listenerWithMonitor = monitor(once\n ? function (event) {\n stop();\n listener(event);\n }\n : listener);\n var options = passive ? { capture: capture, passive: passive } : capture;\n var add = getZoneJsOriginalValue(eventTarget, 'addEventListener');\n eventNames.forEach(function (eventName) { return add.call(eventTarget, eventName, listenerWithMonitor, options); });\n function stop() {\n var remove = getZoneJsOriginalValue(eventTarget, 'removeEventListener');\n eventNames.forEach(function (eventName) { return remove.call(eventTarget, eventName, listenerWithMonitor, options); });\n }\n return {\n stop: stop,\n };\n}\n//# sourceMappingURL=addEventListener.js.map","import { computeBytesCount } from '../../tools/utils/byteUtils';\nimport { addEventListener } from '../../browser/addEventListener';\nimport { createContextManager } from './contextManager';\nvar CONTEXT_STORE_KEY_PREFIX = '_dd_c';\nvar storageListeners = [];\nexport function createStoredContextManager(configuration, productKey, customerDataType, computeBytesCountImpl) {\n if (computeBytesCountImpl === void 0) { computeBytesCountImpl = computeBytesCount; }\n var storageKey = buildStorageKey(productKey, customerDataType);\n var contextManager = createContextManager(customerDataType, computeBytesCountImpl);\n synchronizeWithStorage();\n storageListeners.push(addEventListener(configuration, window, \"storage\" /* DOM_EVENT.STORAGE */, function (_a) {\n var key = _a.key;\n if (storageKey === key) {\n synchronizeWithStorage();\n }\n }));\n contextManager.changeObservable.subscribe(dumpToStorage);\n return contextManager;\n function synchronizeWithStorage() {\n var rawContext = localStorage.getItem(storageKey);\n var context = rawContext !== null ? JSON.parse(rawContext) : {};\n contextManager.setContext(context);\n }\n function dumpToStorage() {\n localStorage.setItem(storageKey, JSON.stringify(contextManager.getContext()));\n }\n}\nexport function buildStorageKey(productKey, customerDataType) {\n return \"\".concat(CONTEXT_STORE_KEY_PREFIX, \"_\").concat(productKey, \"_\").concat(customerDataType);\n}\nexport function removeStorageListeners() {\n storageListeners.map(function (listener) { return listener.stop(); });\n}\n//# sourceMappingURL=storedContextManager.js.map","import { display } from '../../tools/display';\nimport { getType } from '../../tools/utils/typeUtils';\nimport { assign } from '../../tools/utils/polyfills';\n/**\n * Clone input data and ensure known user properties (id, name, email)\n * are strings, as defined here:\n * https://docs.datadoghq.com/logs/log_configuration/attributes_naming_convention/#user-related-attributes\n */\nexport function sanitizeUser(newUser) {\n // We shallow clone only to prevent mutation of user data.\n var user = assign({}, newUser);\n var keys = ['id', 'name', 'email'];\n keys.forEach(function (key) {\n if (key in user) {\n user[key] = String(user[key]);\n }\n });\n return user;\n}\n/**\n * Simple check to ensure user is valid\n */\nexport function checkUser(newUser) {\n var isValid = getType(newUser) === 'object';\n if (!isValid) {\n display.error('Unsupported user:', newUser);\n }\n return isValid;\n}\n//# sourceMappingURL=user.js.map","/**\n * LIMITATION:\n * For NPM setup, this feature flag singleton is shared between RUM and Logs product.\n * This means that an experimental flag set on the RUM product will be set on the Logs product.\n * So keep in mind that in certain configurations, your experimental feature flag may affect other products.\n *\n * FORMAT:\n * All feature flags should be snake_cased\n */\n// We want to use a real enum (i.e. not a const enum) here, to be able to check whether an arbitrary\n// string is an expected feature flag\n// eslint-disable-next-line no-restricted-syntax\nexport var ExperimentalFeature;\n(function (ExperimentalFeature) {\n ExperimentalFeature[\"PAGEHIDE\"] = \"pagehide\";\n ExperimentalFeature[\"FEATURE_FLAGS\"] = \"feature_flags\";\n ExperimentalFeature[\"RESOURCE_PAGE_STATES\"] = \"resource_page_states\";\n ExperimentalFeature[\"PAGE_STATES\"] = \"page_states\";\n ExperimentalFeature[\"COLLECT_FLUSH_REASON\"] = \"collect_flush_reason\";\n ExperimentalFeature[\"NO_RESOURCE_DURATION_FROZEN_STATE\"] = \"no_resource_duration_frozen_state\";\n ExperimentalFeature[\"SCROLLMAP\"] = \"scrollmap\";\n ExperimentalFeature[\"INTERACTION_TO_NEXT_PAINT\"] = \"interaction_to_next_paint\";\n ExperimentalFeature[\"WEB_VITALS_ATTRIBUTION\"] = \"web_vitals_attribution\";\n ExperimentalFeature[\"DISABLE_REPLAY_INLINE_CSS\"] = \"disable_replay_inline_css\";\n})(ExperimentalFeature || (ExperimentalFeature = {}));\nvar enabledExperimentalFeatures = new Set();\nexport function addExperimentalFeatures(enabledFeatures) {\n enabledFeatures.forEach(function (flag) {\n enabledExperimentalFeatures.add(flag);\n });\n}\nexport function isExperimentalFeatureEnabled(featureName) {\n return enabledExperimentalFeatures.has(featureName);\n}\nexport function resetExperimentalFeatures() {\n enabledExperimentalFeatures.clear();\n}\nexport function getExperimentalFeatures() {\n return enabledExperimentalFeatures;\n}\n//# sourceMappingURL=experimentalFeatures.js.map","/**\n * Return true if the draw is successful\n * @param threshold between 0 and 100\n */\nexport function performDraw(threshold) {\n return threshold !== 0 && Math.random() * 100 <= threshold;\n}\nexport function round(num, decimals) {\n return +num.toFixed(decimals);\n}\nexport function isPercentage(value) {\n return isNumber(value) && value >= 0 && value <= 100;\n}\nexport function isNumber(value) {\n return typeof value === 'number';\n}\n//# sourceMappingURL=numberUtils.js.map","import { assign } from './polyfills';\nexport function shallowClone(object) {\n return assign({}, object);\n}\nexport function objectHasValue(object, value) {\n return Object.keys(object).some(function (key) { return object[key] === value; });\n}\nexport function isEmptyObject(object) {\n return Object.keys(object).length === 0;\n}\nexport function mapValues(object, fn) {\n var newObject = {};\n for (var _i = 0, _a = Object.keys(object); _i < _a.length; _i++) {\n var key = _a[_i];\n newObject[key] = fn(object[key]);\n }\n return newObject;\n}\n//# sourceMappingURL=objectUtils.js.map","/**\n * UUID v4\n * from https://gist.github.com/jed/982883\n */\nexport function generateUUID(placeholder) {\n return placeholder\n ? // eslint-disable-next-line no-bitwise\n (parseInt(placeholder, 10) ^ ((Math.random() * 16) >> (parseInt(placeholder, 10) / 4))).toString(16)\n : \"\".concat(1e7, \"-\").concat(1e3, \"-\").concat(4e3, \"-\").concat(8e3, \"-\").concat(1e11).replace(/[018]/g, generateUUID);\n}\nexport function findCommaSeparatedValue(rawString, name) {\n var regex = new RegExp(\"(?:^|;)\\\\s*\".concat(name, \"\\\\s*=\\\\s*([^;]+)\"));\n var matches = regex.exec(rawString);\n return matches ? matches[1] : undefined;\n}\nexport function safeTruncate(candidate, length, suffix) {\n if (suffix === void 0) { suffix = ''; }\n var lastChar = candidate.charCodeAt(length - 1);\n var isLastCharSurrogatePair = lastChar >= 0xd800 && lastChar <= 0xdbff;\n var correctedLength = isLastCharSurrogatePair ? length + 1 : length;\n if (candidate.length <= correctedLength) {\n return candidate;\n }\n return \"\".concat(candidate.slice(0, correctedLength)).concat(suffix);\n}\n//# sourceMappingURL=stringUtils.js.map","import { ONE_HOUR, ONE_MINUTE } from '../../tools/utils/timeUtils';\nexport var SESSION_TIME_OUT_DELAY = 4 * ONE_HOUR;\nexport var SESSION_EXPIRATION_DELAY = 15 * ONE_MINUTE;\n//# sourceMappingURL=sessionConstants.js.map","export function isIE() {\n return Boolean(document.documentMode);\n}\nexport function isChromium() {\n return !!window.chrome || /HeadlessChrome/.test(window.navigator.userAgent);\n}\n//# sourceMappingURL=browserDetection.js.map","import { display } from '../tools/display';\nimport { ONE_MINUTE, ONE_SECOND } from '../tools/utils/timeUtils';\nimport { findCommaSeparatedValue, generateUUID } from '../tools/utils/stringUtils';\nexport function setCookie(name, value, expireDelay, options) {\n var date = new Date();\n date.setTime(date.getTime() + expireDelay);\n var expires = \"expires=\".concat(date.toUTCString());\n var sameSite = options && options.crossSite ? 'none' : 'strict';\n var domain = options && options.domain ? \";domain=\".concat(options.domain) : '';\n var secure = options && options.secure ? ';secure' : '';\n document.cookie = \"\".concat(name, \"=\").concat(value, \";\").concat(expires, \";path=/;samesite=\").concat(sameSite).concat(domain).concat(secure);\n}\nexport function getCookie(name) {\n return findCommaSeparatedValue(document.cookie, name);\n}\nexport function deleteCookie(name, options) {\n setCookie(name, '', 0, options);\n}\nexport function areCookiesAuthorized(options) {\n if (document.cookie === undefined || document.cookie === null) {\n return false;\n }\n try {\n // Use a unique cookie name to avoid issues when the SDK is initialized multiple times during\n // the test cookie lifetime\n var testCookieName = \"dd_cookie_test_\".concat(generateUUID());\n var testCookieValue = 'test';\n setCookie(testCookieName, testCookieValue, ONE_MINUTE, options);\n var isCookieCorrectlySet = getCookie(testCookieName) === testCookieValue;\n deleteCookie(testCookieName, options);\n return isCookieCorrectlySet;\n }\n catch (error) {\n display.error(error);\n return false;\n }\n}\n/**\n * No API to retrieve it, number of levels for subdomain and suffix are unknown\n * strategy: find the minimal domain on which cookies are allowed to be set\n * https://web.dev/same-site-same-origin/#site\n */\nvar getCurrentSiteCache;\nexport function getCurrentSite() {\n if (getCurrentSiteCache === undefined) {\n // Use a unique cookie name to avoid issues when the SDK is initialized multiple times during\n // the test cookie lifetime\n var testCookieName = \"dd_site_test_\".concat(generateUUID());\n var testCookieValue = 'test';\n var domainLevels = window.location.hostname.split('.');\n var candidateDomain = domainLevels.pop();\n while (domainLevels.length && !getCookie(testCookieName)) {\n candidateDomain = \"\".concat(domainLevels.pop(), \".\").concat(candidateDomain);\n setCookie(testCookieName, testCookieValue, ONE_SECOND, { domain: candidateDomain });\n }\n deleteCookie(testCookieName, { domain: candidateDomain });\n getCurrentSiteCache = candidateDomain;\n }\n return getCurrentSiteCache;\n}\n//# sourceMappingURL=cookie.js.map","export var SESSION_STORE_KEY = '_dd_s';\n//# sourceMappingURL=sessionStoreStrategy.js.map","import { isEmptyObject } from '../../tools/utils/objectUtils';\nimport { objectEntries } from '../../tools/utils/polyfills';\nimport { dateNow } from '../../tools/utils/timeUtils';\nimport { SESSION_EXPIRATION_DELAY } from './sessionConstants';\nvar SESSION_ENTRY_REGEXP = /^([a-z]+)=([a-z0-9-]+)$/;\nvar SESSION_ENTRY_SEPARATOR = '&';\nexport function isSessionInExpiredState(session) {\n return isEmptyObject(session);\n}\nexport function expandSessionState(session) {\n session.expire = String(dateNow() + SESSION_EXPIRATION_DELAY);\n}\nexport function toSessionString(session) {\n return objectEntries(session)\n .map(function (_a) {\n var key = _a[0], value = _a[1];\n return \"\".concat(key, \"=\").concat(value);\n })\n .join(SESSION_ENTRY_SEPARATOR);\n}\nexport function toSessionState(sessionString) {\n var session = {};\n if (isValidSessionString(sessionString)) {\n sessionString.split(SESSION_ENTRY_SEPARATOR).forEach(function (entry) {\n var matches = SESSION_ENTRY_REGEXP.exec(entry);\n if (matches !== null) {\n var key = matches[1], value = matches[2];\n session[key] = value;\n }\n });\n }\n return session;\n}\nfunction isValidSessionString(sessionString) {\n return (!!sessionString &&\n (sessionString.indexOf(SESSION_ENTRY_SEPARATOR) !== -1 || SESSION_ENTRY_REGEXP.test(sessionString)));\n}\n//# sourceMappingURL=sessionState.js.map","import { getCookie } from '../../browser/cookie';\nimport { SESSION_STORE_KEY } from './storeStrategies/sessionStoreStrategy';\nimport { expandSessionState, isSessionInExpiredState } from './sessionState';\nexport var OLD_SESSION_COOKIE_NAME = '_dd';\nexport var OLD_RUM_COOKIE_NAME = '_dd_r';\nexport var OLD_LOGS_COOKIE_NAME = '_dd_l';\n// duplicate values to avoid dependency issues\nexport var RUM_SESSION_KEY = 'rum';\nexport var LOGS_SESSION_KEY = 'logs';\n/**\n * This migration should remain in the codebase as long as older versions are available/live\n * to allow older sdk versions to be upgraded to newer versions without compatibility issues.\n */\nexport function tryOldCookiesMigration(cookieStoreStrategy) {\n var sessionString = getCookie(SESSION_STORE_KEY);\n if (!sessionString) {\n var oldSessionId = getCookie(OLD_SESSION_COOKIE_NAME);\n var oldRumType = getCookie(OLD_RUM_COOKIE_NAME);\n var oldLogsType = getCookie(OLD_LOGS_COOKIE_NAME);\n var session = {};\n if (oldSessionId) {\n session.id = oldSessionId;\n }\n if (oldLogsType && /^[01]$/.test(oldLogsType)) {\n session[LOGS_SESSION_KEY] = oldLogsType;\n }\n if (oldRumType && /^[012]$/.test(oldRumType)) {\n session[RUM_SESSION_KEY] = oldRumType;\n }\n if (!isSessionInExpiredState(session)) {\n expandSessionState(session);\n cookieStoreStrategy.persistSession(session);\n }\n }\n}\n//# sourceMappingURL=oldCookiesMigration.js.map","import { isChromium } from '../../../tools/utils/browserDetection';\nimport { getCurrentSite, areCookiesAuthorized, deleteCookie, getCookie, setCookie } from '../../../browser/cookie';\nimport { tryOldCookiesMigration } from '../oldCookiesMigration';\nimport { SESSION_EXPIRATION_DELAY } from '../sessionConstants';\nimport { toSessionString, toSessionState } from '../sessionState';\nimport { SESSION_STORE_KEY } from './sessionStoreStrategy';\nexport function selectCookieStrategy(initConfiguration) {\n var cookieOptions = buildCookieOptions(initConfiguration);\n return areCookiesAuthorized(cookieOptions) ? { type: 'Cookie', cookieOptions: cookieOptions } : undefined;\n}\nexport function initCookieStrategy(cookieOptions) {\n var cookieStore = {\n /**\n * Lock strategy allows mitigating issues due to concurrent access to cookie.\n * This issue concerns only chromium browsers and enabling this on firefox increases cookie write failures.\n */\n isLockEnabled: isChromium(),\n persistSession: persistSessionCookie(cookieOptions),\n retrieveSession: retrieveSessionCookie,\n clearSession: deleteSessionCookie(cookieOptions),\n };\n tryOldCookiesMigration(cookieStore);\n return cookieStore;\n}\nfunction persistSessionCookie(options) {\n return function (session) {\n setCookie(SESSION_STORE_KEY, toSessionString(session), SESSION_EXPIRATION_DELAY, options);\n };\n}\nfunction retrieveSessionCookie() {\n var sessionString = getCookie(SESSION_STORE_KEY);\n return toSessionState(sessionString);\n}\nfunction deleteSessionCookie(options) {\n return function () {\n deleteCookie(SESSION_STORE_KEY, options);\n };\n}\nexport function buildCookieOptions(initConfiguration) {\n var cookieOptions = {};\n cookieOptions.secure = !!initConfiguration.useSecureSessionCookie || !!initConfiguration.useCrossSiteSessionCookie;\n cookieOptions.crossSite = !!initConfiguration.useCrossSiteSessionCookie;\n if (initConfiguration.trackSessionAcrossSubdomains) {\n cookieOptions.domain = getCurrentSite();\n }\n return cookieOptions;\n}\n//# sourceMappingURL=sessionInCookie.js.map","import { generateUUID } from '../../../tools/utils/stringUtils';\nimport { toSessionString, toSessionState } from '../sessionState';\nimport { SESSION_STORE_KEY } from './sessionStoreStrategy';\nvar LOCAL_STORAGE_TEST_KEY = '_dd_test_';\nexport function selectLocalStorageStrategy() {\n try {\n var id = generateUUID();\n var testKey = \"\".concat(LOCAL_STORAGE_TEST_KEY).concat(id);\n localStorage.setItem(testKey, id);\n var retrievedId = localStorage.getItem(testKey);\n localStorage.removeItem(testKey);\n return id === retrievedId ? { type: 'LocalStorage' } : undefined;\n }\n catch (e) {\n return undefined;\n }\n}\nexport function initLocalStorageStrategy() {\n return {\n isLockEnabled: false,\n persistSession: persistInLocalStorage,\n retrieveSession: retrieveSessionFromLocalStorage,\n clearSession: clearSessionFromLocalStorage,\n };\n}\nfunction persistInLocalStorage(sessionState) {\n localStorage.setItem(SESSION_STORE_KEY, toSessionString(sessionState));\n}\nfunction retrieveSessionFromLocalStorage() {\n var sessionString = localStorage.getItem(SESSION_STORE_KEY);\n return toSessionState(sessionString);\n}\nfunction clearSessionFromLocalStorage() {\n localStorage.removeItem(SESSION_STORE_KEY);\n}\n//# sourceMappingURL=sessionInLocalStorage.js.map","import { setTimeout } from '../../tools/timer';\nimport { generateUUID } from '../../tools/utils/stringUtils';\nimport { expandSessionState, isSessionInExpiredState } from './sessionState';\nexport var LOCK_RETRY_DELAY = 10;\nexport var LOCK_MAX_TRIES = 100;\nvar bufferedOperations = [];\nvar ongoingOperations;\nexport function processSessionStoreOperations(operations, sessionStoreStrategy, numberOfRetries) {\n var _a;\n if (numberOfRetries === void 0) { numberOfRetries = 0; }\n var isLockEnabled = sessionStoreStrategy.isLockEnabled, retrieveSession = sessionStoreStrategy.retrieveSession, persistSession = sessionStoreStrategy.persistSession, clearSession = sessionStoreStrategy.clearSession;\n if (!ongoingOperations) {\n ongoingOperations = operations;\n }\n if (operations !== ongoingOperations) {\n bufferedOperations.push(operations);\n return;\n }\n if (isLockEnabled && numberOfRetries >= LOCK_MAX_TRIES) {\n next(sessionStoreStrategy);\n return;\n }\n var currentLock;\n var currentSession = retrieveSession();\n if (isLockEnabled) {\n // if someone has lock, retry later\n if (currentSession.lock) {\n retryLater(operations, sessionStoreStrategy, numberOfRetries);\n return;\n }\n // acquire lock\n currentLock = generateUUID();\n currentSession.lock = currentLock;\n persistSession(currentSession);\n // if lock is not acquired, retry later\n currentSession = retrieveSession();\n if (currentSession.lock !== currentLock) {\n retryLater(operations, sessionStoreStrategy, numberOfRetries);\n return;\n }\n }\n var processedSession = operations.process(currentSession);\n if (isLockEnabled) {\n // if lock corrupted after process, retry later\n currentSession = retrieveSession();\n if (currentSession.lock !== currentLock) {\n retryLater(operations, sessionStoreStrategy, numberOfRetries);\n return;\n }\n }\n if (processedSession) {\n if (isSessionInExpiredState(processedSession)) {\n clearSession();\n }\n else {\n expandSessionState(processedSession);\n persistSession(processedSession);\n }\n }\n if (isLockEnabled) {\n // correctly handle lock around expiration would require to handle this case properly at several levels\n // since we don't have evidence of lock issues around expiration, let's just not do the corruption check for it\n if (!(processedSession && isSessionInExpiredState(processedSession))) {\n // if lock corrupted after persist, retry later\n currentSession = retrieveSession();\n if (currentSession.lock !== currentLock) {\n retryLater(operations, sessionStoreStrategy, numberOfRetries);\n return;\n }\n delete currentSession.lock;\n persistSession(currentSession);\n processedSession = currentSession;\n }\n }\n // call after even if session is not persisted in order to perform operations on\n // up-to-date session state value => the value could have been modified by another tab\n (_a = operations.after) === null || _a === void 0 ? void 0 : _a.call(operations, processedSession || currentSession);\n next(sessionStoreStrategy);\n}\nfunction retryLater(operations, sessionStore, currentNumberOfRetries) {\n setTimeout(function () {\n processSessionStoreOperations(operations, sessionStore, currentNumberOfRetries + 1);\n }, LOCK_RETRY_DELAY);\n}\nfunction next(sessionStore) {\n ongoingOperations = undefined;\n var nextOperations = bufferedOperations.shift();\n if (nextOperations) {\n processSessionStoreOperations(nextOperations, sessionStore);\n }\n}\n//# sourceMappingURL=sessionStoreOperations.js.map","import { clearInterval, setInterval } from '../../tools/timer';\nimport { Observable } from '../../tools/observable';\nimport { ONE_SECOND, dateNow } from '../../tools/utils/timeUtils';\nimport { throttle } from '../../tools/utils/functionUtils';\nimport { generateUUID } from '../../tools/utils/stringUtils';\nimport { SESSION_TIME_OUT_DELAY } from './sessionConstants';\nimport { selectCookieStrategy, initCookieStrategy } from './storeStrategies/sessionInCookie';\nimport { initLocalStorageStrategy, selectLocalStorageStrategy } from './storeStrategies/sessionInLocalStorage';\nimport { processSessionStoreOperations } from './sessionStoreOperations';\n/**\n * Every second, the storage will be polled to check for any change that can occur\n * to the session state in another browser tab, or another window.\n * This value has been determined from our previous cookie-only implementation.\n */\nexport var STORAGE_POLL_DELAY = ONE_SECOND;\n/**\n * Checks if cookies are available as the preferred storage\n * Else, checks if LocalStorage is allowed and available\n */\nexport function selectSessionStoreStrategyType(initConfiguration) {\n var sessionStoreStrategyType = selectCookieStrategy(initConfiguration);\n if (!sessionStoreStrategyType && initConfiguration.allowFallbackToLocalStorage) {\n sessionStoreStrategyType = selectLocalStorageStrategy();\n }\n return sessionStoreStrategyType;\n}\n/**\n * Different session concepts:\n * - tracked, the session has an id and is updated along the user navigation\n * - not tracked, the session does not have an id but it is updated along the user navigation\n * - inactive, no session in store or session expired, waiting for a renew session\n */\nexport function startSessionStore(sessionStoreStrategyType, productKey, computeSessionState) {\n var renewObservable = new Observable();\n var expireObservable = new Observable();\n var sessionStoreStrategy = sessionStoreStrategyType.type === 'Cookie'\n ? initCookieStrategy(sessionStoreStrategyType.cookieOptions)\n : initLocalStorageStrategy();\n var clearSession = sessionStoreStrategy.clearSession, retrieveSession = sessionStoreStrategy.retrieveSession;\n var watchSessionTimeoutId = setInterval(watchSession, STORAGE_POLL_DELAY);\n var sessionCache = retrieveActiveSession();\n function expandOrRenewSession() {\n var isTracked;\n processSessionStoreOperations({\n process: function (sessionState) {\n var synchronizedSession = synchronizeSession(sessionState);\n isTracked = expandOrRenewSessionState(synchronizedSession);\n return synchronizedSession;\n },\n after: function (sessionState) {\n if (isTracked && !hasSessionInCache()) {\n renewSessionInCache(sessionState);\n }\n sessionCache = sessionState;\n },\n }, sessionStoreStrategy);\n }\n function expandSession() {\n processSessionStoreOperations({\n process: function (sessionState) { return (hasSessionInCache() ? synchronizeSession(sessionState) : undefined); },\n }, sessionStoreStrategy);\n }\n /**\n * allows two behaviors:\n * - if the session is active, synchronize the session cache without updating the session store\n * - if the session is not active, clear the session store and expire the session cache\n */\n function watchSession() {\n processSessionStoreOperations({\n process: function (sessionState) { return (!isActiveSession(sessionState) ? {} : undefined); },\n after: synchronizeSession,\n }, sessionStoreStrategy);\n }\n function synchronizeSession(sessionState) {\n if (!isActiveSession(sessionState)) {\n sessionState = {};\n }\n if (hasSessionInCache()) {\n if (isSessionInCacheOutdated(sessionState)) {\n expireSessionInCache();\n }\n else {\n sessionCache = sessionState;\n }\n }\n return sessionState;\n }\n function expandOrRenewSessionState(sessionState) {\n var _a = computeSessionState(sessionState[productKey]), trackingType = _a.trackingType, isTracked = _a.isTracked;\n sessionState[productKey] = trackingType;\n if (isTracked && !sessionState.id) {\n sessionState.id = generateUUID();\n sessionState.created = String(dateNow());\n }\n return isTracked;\n }\n function hasSessionInCache() {\n return sessionCache[productKey] !== undefined;\n }\n function isSessionInCacheOutdated(sessionState) {\n return sessionCache.id !== sessionState.id || sessionCache[productKey] !== sessionState[productKey];\n }\n function expireSessionInCache() {\n sessionCache = {};\n expireObservable.notify();\n }\n function renewSessionInCache(sessionState) {\n sessionCache = sessionState;\n renewObservable.notify();\n }\n function retrieveActiveSession() {\n var session = retrieveSession();\n if (isActiveSession(session)) {\n return session;\n }\n return {};\n }\n function isActiveSession(sessionState) {\n // created and expire can be undefined for versions which was not storing them\n // these checks could be removed when older versions will not be available/live anymore\n return ((sessionState.created === undefined || dateNow() - Number(sessionState.created) < SESSION_TIME_OUT_DELAY) &&\n (sessionState.expire === undefined || dateNow() < Number(sessionState.expire)));\n }\n return {\n expandOrRenewSession: throttle(expandOrRenewSession, STORAGE_POLL_DELAY).throttled,\n expandSession: expandSession,\n getSession: function () { return sessionCache; },\n renewObservable: renewObservable,\n expireObservable: expireObservable,\n expire: function () {\n clearSession();\n synchronizeSession({});\n },\n stop: function () {\n clearInterval(watchSessionTimeoutId);\n },\n };\n}\n//# sourceMappingURL=sessionStore.js.map","import { jsonStringify } from '../serialisation/jsonStringify';\nexport function normalizeUrl(url) {\n return buildUrl(url, getLocationOrigin()).href;\n}\nexport function isValidUrl(url) {\n try {\n return !!buildUrl(url);\n }\n catch (_a) {\n return false;\n }\n}\nexport function getOrigin(url) {\n return getLinkElementOrigin(buildUrl(url));\n}\nexport function getPathName(url) {\n var pathname = buildUrl(url).pathname;\n return pathname[0] === '/' ? pathname : \"/\".concat(pathname);\n}\nexport function getSearch(url) {\n return buildUrl(url).search;\n}\nexport function getHash(url) {\n return buildUrl(url).hash;\n}\nexport function buildUrl(url, base) {\n var supportedURL = getSupportedUrl();\n if (supportedURL) {\n try {\n return base !== undefined ? new supportedURL(url, base) : new supportedURL(url);\n }\n catch (error) {\n throw new Error(\"Failed to construct URL: \".concat(String(error), \" \").concat(jsonStringify({ url: url, base: base })));\n }\n }\n if (base === undefined && !/:/.test(url)) {\n throw new Error(\"Invalid URL: '\".concat(url, \"'\"));\n }\n var doc = document;\n var anchorElement = doc.createElement('a');\n if (base !== undefined) {\n doc = document.implementation.createHTMLDocument('');\n var baseElement = doc.createElement('base');\n baseElement.href = base;\n doc.head.appendChild(baseElement);\n doc.body.appendChild(anchorElement);\n }\n anchorElement.href = url;\n return anchorElement;\n}\nvar originalURL = URL;\nvar isURLSupported;\nfunction getSupportedUrl() {\n if (isURLSupported === undefined) {\n try {\n var url = new originalURL('http://test/path');\n isURLSupported = url.href === 'http://test/path';\n }\n catch (_a) {\n isURLSupported = false;\n }\n }\n return isURLSupported ? originalURL : undefined;\n}\nexport function getLocationOrigin() {\n return getLinkElementOrigin(window.location);\n}\n/**\n * Fallback\n * On IE HTMLAnchorElement origin is not supported: https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/origin\n * On Firefox window.location.origin is \"null\" for file: URIs: https://bugzilla.mozilla.org/show_bug.cgi?id=878297\n */\nexport function getLinkElementOrigin(element) {\n if (element.origin && element.origin !== 'null') {\n return element.origin;\n }\n var sanitizedHost = element.host.replace(/(:80|:443)$/, '');\n return \"\".concat(element.protocol, \"//\").concat(sanitizedHost);\n}\n//# sourceMappingURL=urlPolyfill.js.map","export var INTAKE_SITE_STAGING = 'datad0g.com';\nexport var INTAKE_SITE_US1 = 'datadoghq.com';\nexport var INTAKE_SITE_EU1 = 'datadoghq.eu';\nexport var INTAKE_SITE_AP1 = 'ap1.datadoghq.com';\nexport var INTAKE_SITE_US1_FED = 'ddog-gov.com';\n//# sourceMappingURL=intakeSites.js.map","import { timeStampNow } from '../../tools/utils/timeUtils';\nimport { normalizeUrl } from '../../tools/utils/urlPolyfill';\nimport { ExperimentalFeature, isExperimentalFeatureEnabled } from '../../tools/experimentalFeatures';\nimport { generateUUID } from '../../tools/utils/stringUtils';\nimport { INTAKE_SITE_AP1, INTAKE_SITE_US1 } from './intakeSites';\nexport var ENDPOINTS = {\n logs: 'logs',\n rum: 'rum',\n sessionReplay: 'session-replay',\n};\nvar INTAKE_TRACKS = {\n logs: 'logs',\n rum: 'rum',\n sessionReplay: 'replay',\n};\nexport function createEndpointBuilder(initConfiguration, endpointType, configurationTags) {\n var buildUrlWithParameters = createEndpointUrlWithParametersBuilder(initConfiguration, endpointType);\n return {\n build: function (api, payload) {\n var parameters = buildEndpointParameters(initConfiguration, endpointType, configurationTags, api, payload);\n return buildUrlWithParameters(parameters);\n },\n urlPrefix: buildUrlWithParameters(''),\n endpointType: endpointType,\n };\n}\n/**\n * Create a function used to build a full endpoint url from provided parameters. The goal of this\n * function is to pre-compute some parts of the URL to avoid re-computing everything on every\n * request, as only parameters are changing.\n */\nfunction createEndpointUrlWithParametersBuilder(initConfiguration, endpointType) {\n var path = \"/api/v2/\".concat(INTAKE_TRACKS[endpointType]);\n var proxy = initConfiguration.proxy, proxyUrl = initConfiguration.proxyUrl;\n if (proxy) {\n var normalizedProxyUrl_1 = normalizeUrl(proxy);\n return function (parameters) { return \"\".concat(normalizedProxyUrl_1, \"?ddforward=\").concat(encodeURIComponent(\"\".concat(path, \"?\").concat(parameters))); };\n }\n var host = buildEndpointHost(initConfiguration, endpointType);\n if (proxy === undefined && proxyUrl) {\n // TODO: remove this in a future major.\n var normalizedProxyUrl_2 = normalizeUrl(proxyUrl);\n return function (parameters) {\n return \"\".concat(normalizedProxyUrl_2, \"?ddforward=\").concat(encodeURIComponent(\"https://\".concat(host).concat(path, \"?\").concat(parameters)));\n };\n }\n return function (parameters) { return \"https://\".concat(host).concat(path, \"?\").concat(parameters); };\n}\nfunction buildEndpointHost(initConfiguration, endpointType) {\n var _a = initConfiguration.site, site = _a === void 0 ? INTAKE_SITE_US1 : _a, internalAnalyticsSubdomain = initConfiguration.internalAnalyticsSubdomain;\n if (internalAnalyticsSubdomain && site === INTAKE_SITE_US1) {\n return \"\".concat(internalAnalyticsSubdomain, \".\").concat(INTAKE_SITE_US1);\n }\n var domainParts = site.split('.');\n var extension = domainParts.pop();\n var subdomain = site !== INTAKE_SITE_AP1 ? \"\".concat(ENDPOINTS[endpointType], \".\") : '';\n return \"\".concat(subdomain, \"browser-intake-\").concat(domainParts.join('-'), \".\").concat(extension);\n}\n/**\n * Build parameters to be used for an intake request. Parameters should be re-built for each\n * request, as they change randomly.\n */\nfunction buildEndpointParameters(_a, endpointType, configurationTags, api, _b) {\n var clientToken = _a.clientToken, internalAnalyticsSubdomain = _a.internalAnalyticsSubdomain;\n var retry = _b.retry, flushReason = _b.flushReason, encoding = _b.encoding;\n var tags = [\"sdk_version:\".concat(\"4.50.0\"), \"api:\".concat(api)].concat(configurationTags);\n if (flushReason && isExperimentalFeatureEnabled(ExperimentalFeature.COLLECT_FLUSH_REASON)) {\n tags.push(\"flush_reason:\".concat(flushReason));\n }\n if (retry) {\n tags.push(\"retry_count:\".concat(retry.count), \"retry_after:\".concat(retry.lastFailureStatus));\n }\n var parameters = [\n 'ddsource=browser',\n \"ddtags=\".concat(encodeURIComponent(tags.join(','))),\n \"dd-api-key=\".concat(clientToken),\n \"dd-evp-origin-version=\".concat(encodeURIComponent(\"4.50.0\")),\n 'dd-evp-origin=browser',\n \"dd-request-id=\".concat(generateUUID()),\n ];\n if (encoding) {\n parameters.push(\"dd-evp-encoding=\".concat(encoding));\n }\n if (endpointType === 'rum') {\n parameters.push(\"batch_time=\".concat(timeStampNow()));\n }\n if (internalAnalyticsSubdomain) {\n parameters.reverse();\n }\n return parameters.join('&');\n}\n//# sourceMappingURL=endpointBuilder.js.map","import { display } from '../../tools/display';\nexport var TAG_SIZE_LIMIT = 200;\nexport function buildTags(configuration) {\n var env = configuration.env, service = configuration.service, version = configuration.version, datacenter = configuration.datacenter;\n var tags = [];\n if (env) {\n tags.push(buildTag('env', env));\n }\n if (service) {\n tags.push(buildTag('service', service));\n }\n if (version) {\n tags.push(buildTag('version', version));\n }\n if (datacenter) {\n tags.push(buildTag('datacenter', datacenter));\n }\n return tags;\n}\nvar FORBIDDEN_CHARACTERS = /[^a-z0-9_:./-]/;\nexport function buildTag(key, rawValue) {\n // See https://docs.datadoghq.com/getting_started/tagging/#defining-tags for tags syntax. Note\n // that the backend may not follow the exact same rules, so we only want to display an informal\n // warning.\n var valueSizeLimit = TAG_SIZE_LIMIT - key.length - 1;\n if (rawValue.length > valueSizeLimit || FORBIDDEN_CHARACTERS.test(rawValue)) {\n display.warn(\"\".concat(key, \" value doesn't meet tag requirements and will be sanitized\"));\n }\n // Let the backend do most of the sanitization, but still make sure multiple tags can't be crafted\n // by forging a value containing commas.\n var sanitizedValue = rawValue.replace(/,/g, '_');\n return \"\".concat(key, \":\").concat(sanitizedValue);\n}\n//# sourceMappingURL=tags.js.map","import { objectValues, assign } from '../../tools/utils/polyfills';\nimport { createEndpointBuilder } from './endpointBuilder';\nimport { buildTags } from './tags';\nimport { INTAKE_SITE_US1 } from './intakeSites';\nexport function computeTransportConfiguration(initConfiguration) {\n var tags = buildTags(initConfiguration);\n var endpointBuilders = computeEndpointBuilders(initConfiguration, tags);\n var intakeUrlPrefixes = objectValues(endpointBuilders).map(function (builder) { return builder.urlPrefix; });\n var replicaConfiguration = computeReplicaConfiguration(initConfiguration, intakeUrlPrefixes, tags);\n return assign({\n isIntakeUrl: function (url) { return intakeUrlPrefixes.some(function (intakeEndpoint) { return url.indexOf(intakeEndpoint) === 0; }); },\n replica: replicaConfiguration,\n site: initConfiguration.site || INTAKE_SITE_US1,\n }, endpointBuilders);\n}\nfunction computeEndpointBuilders(initConfiguration, tags) {\n return {\n logsEndpointBuilder: createEndpointBuilder(initConfiguration, 'logs', tags),\n rumEndpointBuilder: createEndpointBuilder(initConfiguration, 'rum', tags),\n sessionReplayEndpointBuilder: createEndpointBuilder(initConfiguration, 'sessionReplay', tags),\n };\n}\nfunction computeReplicaConfiguration(initConfiguration, intakeUrlPrefixes, tags) {\n if (!initConfiguration.replica) {\n return;\n }\n var replicaConfiguration = assign({}, initConfiguration, {\n site: INTAKE_SITE_US1,\n clientToken: initConfiguration.replica.clientToken,\n });\n var replicaEndpointBuilders = {\n logsEndpointBuilder: createEndpointBuilder(replicaConfiguration, 'logs', tags),\n rumEndpointBuilder: createEndpointBuilder(replicaConfiguration, 'rum', tags),\n };\n intakeUrlPrefixes.push.apply(intakeUrlPrefixes, objectValues(replicaEndpointBuilders).map(function (builder) { return builder.urlPrefix; }));\n return assign({ applicationId: initConfiguration.replica.applicationId }, replicaEndpointBuilders);\n}\n//# sourceMappingURL=transportConfiguration.js.map","import { catchUserErrors } from '../../tools/catchUserErrors';\nimport { display } from '../../tools/display';\nimport { ExperimentalFeature, addExperimentalFeatures } from '../../tools/experimentalFeatures';\nimport { ONE_SECOND } from '../../tools/utils/timeUtils';\nimport { isPercentage } from '../../tools/utils/numberUtils';\nimport { ONE_KIBI_BYTE } from '../../tools/utils/byteUtils';\nimport { objectHasValue } from '../../tools/utils/objectUtils';\nimport { assign } from '../../tools/utils/polyfills';\nimport { selectSessionStoreStrategyType } from '../session/sessionStore';\nimport { computeTransportConfiguration } from './transportConfiguration';\nexport var DefaultPrivacyLevel = {\n ALLOW: 'allow',\n MASK: 'mask',\n MASK_USER_INPUT: 'mask-user-input',\n};\nexport function validateAndBuildConfiguration(initConfiguration) {\n var _a, _b, _c;\n if (!initConfiguration || !initConfiguration.clientToken) {\n display.error('Client Token is not configured, we will not send any data.');\n return;\n }\n var sessionSampleRate = (_a = initConfiguration.sessionSampleRate) !== null && _a !== void 0 ? _a : initConfiguration.sampleRate;\n if (sessionSampleRate !== undefined && !isPercentage(sessionSampleRate)) {\n display.error('Session Sample Rate should be a number between 0 and 100');\n return;\n }\n if (initConfiguration.telemetrySampleRate !== undefined && !isPercentage(initConfiguration.telemetrySampleRate)) {\n display.error('Telemetry Sample Rate should be a number between 0 and 100');\n return;\n }\n if (initConfiguration.telemetryConfigurationSampleRate !== undefined &&\n !isPercentage(initConfiguration.telemetryConfigurationSampleRate)) {\n display.error('Telemetry Configuration Sample Rate should be a number between 0 and 100');\n return;\n }\n // Set the experimental feature flags as early as possible, so we can use them in most places\n if (Array.isArray(initConfiguration.enableExperimentalFeatures)) {\n addExperimentalFeatures(initConfiguration.enableExperimentalFeatures.filter(function (flag) {\n return objectHasValue(ExperimentalFeature, flag);\n }));\n }\n return assign({\n beforeSend: initConfiguration.beforeSend && catchUserErrors(initConfiguration.beforeSend, 'beforeSend threw an error:'),\n sessionStoreStrategyType: selectSessionStoreStrategyType(initConfiguration),\n sessionSampleRate: sessionSampleRate !== null && sessionSampleRate !== void 0 ? sessionSampleRate : 100,\n telemetrySampleRate: (_b = initConfiguration.telemetrySampleRate) !== null && _b !== void 0 ? _b : 20,\n telemetryConfigurationSampleRate: (_c = initConfiguration.telemetryConfigurationSampleRate) !== null && _c !== void 0 ? _c : 5,\n service: initConfiguration.service,\n silentMultipleInit: !!initConfiguration.silentMultipleInit,\n /**\n * beacon payload max queue size implementation is 64kb\n * ensure that we leave room for logs, rum and potential other users\n */\n batchBytesLimit: 16 * ONE_KIBI_BYTE,\n eventRateLimiterThreshold: 3000,\n maxTelemetryEventsPerPage: 15,\n /**\n * flush automatically, aim to be lower than ALB connection timeout\n * to maximize connection reuse.\n */\n flushTimeout: (30 * ONE_SECOND),\n /**\n * Logs intake limit\n */\n batchMessagesLimit: 50,\n messageBytesLimit: 256 * ONE_KIBI_BYTE,\n }, computeTransportConfiguration(initConfiguration));\n}\nexport function serializeConfiguration(initConfiguration) {\n var _a, _b;\n var proxy = (_a = initConfiguration.proxy) !== null && _a !== void 0 ? _a : initConfiguration.proxyUrl;\n return {\n session_sample_rate: (_b = initConfiguration.sessionSampleRate) !== null && _b !== void 0 ? _b : initConfiguration.sampleRate,\n telemetry_sample_rate: initConfiguration.telemetrySampleRate,\n telemetry_configuration_sample_rate: initConfiguration.telemetryConfigurationSampleRate,\n use_before_send: !!initConfiguration.beforeSend,\n use_cross_site_session_cookie: initConfiguration.useCrossSiteSessionCookie,\n use_secure_session_cookie: initConfiguration.useSecureSessionCookie,\n use_proxy: proxy !== undefined ? !!proxy : undefined,\n silent_multiple_init: initConfiguration.silentMultipleInit,\n track_session_across_subdomains: initConfiguration.trackSessionAcrossSubdomains,\n track_resources: initConfiguration.trackResources,\n track_long_task: initConfiguration.trackLongTasks,\n allow_fallback_to_local_storage: !!initConfiguration.allowFallbackToLocalStorage,\n store_contexts_across_pages: !!initConfiguration.storeContextsAcrossPages,\n };\n}\n//# sourceMappingURL=configuration.js.map","import { startsWith } from '../../tools/utils/polyfills';\nvar UNKNOWN_FUNCTION = '?';\n/**\n * Computes a stack trace for an exception.\n */\nexport function computeStackTrace(ex) {\n var stack = [];\n var stackProperty = tryToGetString(ex, 'stack');\n var exString = String(ex);\n if (stackProperty && startsWith(stackProperty, exString)) {\n stackProperty = stackProperty.slice(exString.length);\n }\n if (stackProperty) {\n stackProperty.split('\\n').forEach(function (line) {\n var stackFrame = parseChromeLine(line) || parseChromeAnonymousLine(line) || parseWinLine(line) || parseGeckoLine(line);\n if (stackFrame) {\n if (!stackFrame.func && stackFrame.line) {\n stackFrame.func = UNKNOWN_FUNCTION;\n }\n stack.push(stackFrame);\n }\n });\n }\n return {\n message: tryToGetString(ex, 'message'),\n name: tryToGetString(ex, 'name'),\n stack: stack,\n };\n}\nvar fileUrl = '((?:file|https?|blob|chrome-extension|native|eval|webpack|snippet||\\\\w+\\\\.|\\\\/).*?)';\nvar filePosition = '(?::(\\\\d+))';\nvar CHROME_LINE_RE = new RegExp(\"^\\\\s*at (.*?) ?\\\\(\".concat(fileUrl).concat(filePosition, \"?\").concat(filePosition, \"?\\\\)?\\\\s*$\"), 'i');\nvar CHROME_EVAL_RE = new RegExp(\"\\\\((\\\\S*)\".concat(filePosition).concat(filePosition, \"\\\\)\"));\nfunction parseChromeLine(line) {\n var parts = CHROME_LINE_RE.exec(line);\n if (!parts) {\n return;\n }\n var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n var submatch = CHROME_EVAL_RE.exec(parts[2]);\n if (isEval && submatch) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = submatch[1]; // url\n parts[3] = submatch[2]; // line\n parts[4] = submatch[3]; // column\n }\n return {\n args: isNative ? [parts[2]] : [],\n column: parts[4] ? +parts[4] : undefined,\n func: parts[1] || UNKNOWN_FUNCTION,\n line: parts[3] ? +parts[3] : undefined,\n url: !isNative ? parts[2] : undefined,\n };\n}\nvar CHROME_ANONYMOUS_FUNCTION_RE = new RegExp(\"^\\\\s*at ?\".concat(fileUrl).concat(filePosition, \"?\").concat(filePosition, \"??\\\\s*$\"), 'i');\nfunction parseChromeAnonymousLine(line) {\n var parts = CHROME_ANONYMOUS_FUNCTION_RE.exec(line);\n if (!parts) {\n return;\n }\n return {\n args: [],\n column: parts[3] ? +parts[3] : undefined,\n func: UNKNOWN_FUNCTION,\n line: parts[2] ? +parts[2] : undefined,\n url: parts[1],\n };\n}\nvar WINJS_LINE_RE = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nfunction parseWinLine(line) {\n var parts = WINJS_LINE_RE.exec(line);\n if (!parts) {\n return;\n }\n return {\n args: [],\n column: parts[4] ? +parts[4] : undefined,\n func: parts[1] || UNKNOWN_FUNCTION,\n line: +parts[3],\n url: parts[2],\n };\n}\nvar GECKO_LINE_RE = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\\[native).*?|[^@]*bundle)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nvar GECKO_EVAL_RE = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nfunction parseGeckoLine(line) {\n var parts = GECKO_LINE_RE.exec(line);\n if (!parts) {\n return;\n }\n var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n var submatch = GECKO_EVAL_RE.exec(parts[3]);\n if (isEval && submatch) {\n // throw out eval line/column and use top-most line number\n parts[3] = submatch[1];\n parts[4] = submatch[2];\n parts[5] = undefined; // no column when eval\n }\n return {\n args: parts[2] ? parts[2].split(',') : [],\n column: parts[5] ? +parts[5] : undefined,\n func: parts[1] || UNKNOWN_FUNCTION,\n line: parts[4] ? +parts[4] : undefined,\n url: parts[3],\n };\n}\nfunction tryToGetString(candidate, property) {\n if (typeof candidate !== 'object' || !candidate || !(property in candidate)) {\n return undefined;\n }\n var value = candidate[property];\n return typeof value === 'string' ? value : undefined;\n}\n//# sourceMappingURL=computeStackTrace.js.map","import { computeStackTrace } from '../tracekit';\nimport { callMonitored } from '../../tools/monitor';\nimport { sanitize } from '../../tools/serialisation/sanitize';\nimport { noop } from '../../tools/utils/functionUtils';\nimport { jsonStringify } from '../../tools/serialisation/jsonStringify';\nexport var NO_ERROR_STACK_PRESENT_MESSAGE = 'No stack, consider using an instance of Error';\nexport function computeRawError(_a) {\n var stackTrace = _a.stackTrace, originalError = _a.originalError, handlingStack = _a.handlingStack, startClocks = _a.startClocks, nonErrorPrefix = _a.nonErrorPrefix, source = _a.source, handling = _a.handling;\n var isErrorInstance = originalError instanceof Error;\n var message = computeMessage(stackTrace, isErrorInstance, nonErrorPrefix, originalError);\n var stack = hasUsableStack(isErrorInstance, stackTrace)\n ? toStackTraceString(stackTrace)\n : NO_ERROR_STACK_PRESENT_MESSAGE;\n var causes = isErrorInstance ? flattenErrorCauses(originalError, source) : undefined;\n var type = stackTrace === null || stackTrace === void 0 ? void 0 : stackTrace.name;\n var fingerprint = tryToGetFingerprint(originalError);\n return {\n startClocks: startClocks,\n source: source,\n handling: handling,\n handlingStack: handlingStack,\n originalError: originalError,\n type: type,\n message: message,\n stack: stack,\n causes: causes,\n fingerprint: fingerprint,\n };\n}\nfunction computeMessage(stackTrace, isErrorInstance, nonErrorPrefix, originalError) {\n // Favor stackTrace message only if tracekit has really been able to extract something meaningful (message + name)\n // TODO rework tracekit integration to avoid scattering error building logic\n return (stackTrace === null || stackTrace === void 0 ? void 0 : stackTrace.message) && (stackTrace === null || stackTrace === void 0 ? void 0 : stackTrace.name)\n ? stackTrace.message\n : !isErrorInstance\n ? \"\".concat(nonErrorPrefix, \" \").concat(jsonStringify(sanitize(originalError)))\n : 'Empty message';\n}\nfunction hasUsableStack(isErrorInstance, stackTrace) {\n if (stackTrace === undefined) {\n return false;\n }\n if (isErrorInstance) {\n return true;\n }\n // handle cases where tracekit return stack = [] or stack = [{url: undefined, line: undefined, column: undefined}]\n // TODO rework tracekit integration to avoid generating those unusable stack\n return stackTrace.stack.length > 0 && (stackTrace.stack.length > 1 || stackTrace.stack[0].url !== undefined);\n}\nexport function tryToGetFingerprint(originalError) {\n return originalError instanceof Error && 'dd_fingerprint' in originalError\n ? String(originalError.dd_fingerprint)\n : undefined;\n}\nexport function toStackTraceString(stack) {\n var result = formatErrorMessage(stack);\n stack.stack.forEach(function (frame) {\n var func = frame.func === '?' ? '' : frame.func;\n var args = frame.args && frame.args.length > 0 ? \"(\".concat(frame.args.join(', '), \")\") : '';\n var line = frame.line ? \":\".concat(frame.line) : '';\n var column = frame.line && frame.column ? \":\".concat(frame.column) : '';\n result += \"\\n at \".concat(func).concat(args, \" @ \").concat(frame.url).concat(line).concat(column);\n });\n return result;\n}\nexport function getFileFromStackTraceString(stack) {\n var _a;\n return (_a = /@ (.+)/.exec(stack)) === null || _a === void 0 ? void 0 : _a[1];\n}\nexport function formatErrorMessage(stack) {\n return \"\".concat(stack.name || 'Error', \": \").concat(stack.message);\n}\n/**\n Creates a stacktrace without SDK internal frames.\n \n Constraints:\n - Has to be called at the utmost position of the call stack.\n - No monitored function should encapsulate it, that is why we need to use callMonitored inside it.\n */\nexport function createHandlingStack() {\n /**\n * Skip the two internal frames:\n * - SDK API (console.error, ...)\n * - this function\n * in order to keep only the user calls\n */\n var internalFramesToSkip = 2;\n var error = new Error();\n var formattedStack;\n // IE needs to throw the error to fill in the stack trace\n if (!error.stack) {\n try {\n throw error;\n }\n catch (e) {\n noop();\n }\n }\n callMonitored(function () {\n var stackTrace = computeStackTrace(error);\n stackTrace.stack = stackTrace.stack.slice(internalFramesToSkip);\n formattedStack = toStackTraceString(stackTrace);\n });\n return formattedStack;\n}\nexport function flattenErrorCauses(error, parentSource) {\n var currentError = error;\n var causes = [];\n while ((currentError === null || currentError === void 0 ? void 0 : currentError.cause) instanceof Error && causes.length < 10) {\n var stackTrace = computeStackTrace(currentError.cause);\n causes.push({\n message: currentError.cause.message,\n source: parentSource,\n type: stackTrace === null || stackTrace === void 0 ? void 0 : stackTrace.name,\n stack: stackTrace && toStackTraceString(stackTrace),\n });\n currentError = currentError.cause;\n }\n return causes.length ? causes : undefined;\n}\n//# sourceMappingURL=error.js.map","import { toStackTraceString } from '../error/error';\nimport { monitor } from '../../tools/monitor';\nimport { mergeObservables, Observable } from '../../tools/observable';\nimport { addEventListener } from '../../browser/addEventListener';\nimport { includes } from '../../tools/utils/polyfills';\nimport { safeTruncate } from '../../tools/utils/stringUtils';\nexport var RawReportType = {\n intervention: 'intervention',\n deprecation: 'deprecation',\n cspViolation: 'csp_violation',\n};\nexport function initReportObservable(configuration, apis) {\n var observables = [];\n if (includes(apis, RawReportType.cspViolation)) {\n observables.push(createCspViolationReportObservable(configuration));\n }\n var reportTypes = apis.filter(function (api) { return api !== RawReportType.cspViolation; });\n if (reportTypes.length) {\n observables.push(createReportObservable(reportTypes));\n }\n return mergeObservables.apply(void 0, observables);\n}\nfunction createReportObservable(reportTypes) {\n var observable = new Observable(function () {\n if (!window.ReportingObserver) {\n return;\n }\n var handleReports = monitor(function (reports, _) {\n return reports.forEach(function (report) {\n observable.notify(buildRawReportFromReport(report));\n });\n });\n var observer = new window.ReportingObserver(handleReports, {\n types: reportTypes,\n buffered: true,\n });\n observer.observe();\n return function () {\n observer.disconnect();\n };\n });\n return observable;\n}\nfunction createCspViolationReportObservable(configuration) {\n var observable = new Observable(function () {\n var stop = addEventListener(configuration, document, \"securitypolicyviolation\" /* DOM_EVENT.SECURITY_POLICY_VIOLATION */, function (event) {\n observable.notify(buildRawReportFromCspViolation(event));\n }).stop;\n return stop;\n });\n return observable;\n}\nfunction buildRawReportFromReport(_a) {\n var type = _a.type, body = _a.body;\n return {\n type: type,\n subtype: body.id,\n message: \"\".concat(type, \": \").concat(body.message),\n stack: buildStack(body.id, body.message, body.sourceFile, body.lineNumber, body.columnNumber),\n };\n}\nfunction buildRawReportFromCspViolation(event) {\n var type = RawReportType.cspViolation;\n var message = \"'\".concat(event.blockedURI, \"' blocked by '\").concat(event.effectiveDirective, \"' directive\");\n return {\n type: RawReportType.cspViolation,\n subtype: event.effectiveDirective,\n message: \"\".concat(type, \": \").concat(message),\n stack: buildStack(event.effectiveDirective, event.originalPolicy\n ? \"\".concat(message, \" of the policy \\\"\").concat(safeTruncate(event.originalPolicy, 100, '...'), \"\\\"\")\n : 'no policy', event.sourceFile, event.lineNumber, event.columnNumber),\n };\n}\nfunction buildStack(name, message, sourceFile, lineNumber, columnNumber) {\n return sourceFile\n ? toStackTraceString({\n name: name,\n message: message,\n stack: [\n {\n func: '?',\n url: sourceFile,\n line: lineNumber !== null && lineNumber !== void 0 ? lineNumber : undefined,\n column: columnNumber !== null && columnNumber !== void 0 ? columnNumber : undefined,\n },\n ],\n })\n : undefined;\n}\n//# sourceMappingURL=reportObservable.js.map","import { arrayFrom } from './polyfills';\nexport function removeDuplicates(array) {\n var set = new Set();\n array.forEach(function (item) { return set.add(item); });\n return arrayFrom(set);\n}\n//# sourceMappingURL=arrayUtils.js.map","import { serializeConfiguration, assign, ONE_KIBI_BYTE, validateAndBuildConfiguration, display, removeDuplicates, ConsoleApiName, RawReportType, includes, objectValues, } from '@datadog/browser-core';\n/**\n * arbitrary value, byte precision not needed\n */\nexport var DEFAULT_REQUEST_ERROR_RESPONSE_LENGTH_LIMIT = 32 * ONE_KIBI_BYTE;\nexport function validateAndBuildLogsConfiguration(initConfiguration) {\n var baseConfiguration = validateAndBuildConfiguration(initConfiguration);\n var forwardConsoleLogs = validateAndBuildForwardOption(initConfiguration.forwardConsoleLogs, objectValues(ConsoleApiName), 'Forward Console Logs');\n var forwardReports = validateAndBuildForwardOption(initConfiguration.forwardReports, objectValues(RawReportType), 'Forward Reports');\n if (!baseConfiguration || !forwardConsoleLogs || !forwardReports) {\n return;\n }\n if (initConfiguration.forwardErrorsToLogs && !includes(forwardConsoleLogs, ConsoleApiName.error)) {\n forwardConsoleLogs.push(ConsoleApiName.error);\n }\n return assign({\n forwardErrorsToLogs: initConfiguration.forwardErrorsToLogs !== false,\n forwardConsoleLogs: forwardConsoleLogs,\n forwardReports: forwardReports,\n requestErrorResponseLengthLimit: DEFAULT_REQUEST_ERROR_RESPONSE_LENGTH_LIMIT,\n }, baseConfiguration);\n}\nexport function validateAndBuildForwardOption(option, allowedValues, label) {\n if (option === undefined) {\n return [];\n }\n if (!(option === 'all' || (Array.isArray(option) && option.every(function (api) { return includes(allowedValues, api); })))) {\n display.error(\"\".concat(label, \" should be \\\"all\\\" or an array with allowed values \\\"\").concat(allowedValues.join('\", \"'), \"\\\"\"));\n return;\n }\n return option === 'all' ? allowedValues : removeDuplicates(option);\n}\nexport function serializeLogsConfiguration(configuration) {\n var baseSerializedInitConfiguration = serializeConfiguration(configuration);\n return assign({\n forward_errors_to_logs: configuration.forwardErrorsToLogs,\n forward_console_logs: configuration.forwardConsoleLogs,\n forward_reports: configuration.forwardReports,\n }, baseSerializedInitConfiguration);\n}\n//# sourceMappingURL=configuration.js.map","export var ErrorSource = {\n AGENT: 'agent',\n CONSOLE: 'console',\n CUSTOM: 'custom',\n LOGGER: 'logger',\n NETWORK: 'network',\n SOURCE: 'source',\n REPORT: 'report',\n};\n//# sourceMappingURL=error.types.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { clocksNow, computeRawError, computeStackTrace, assign, combine, createContextManager, ErrorSource, monitored, sanitize, } from '@datadog/browser-core';\nexport var StatusType = {\n debug: 'debug',\n error: 'error',\n info: 'info',\n warn: 'warn',\n};\nexport var HandlerType = {\n console: 'console',\n http: 'http',\n silent: 'silent',\n};\nexport var STATUSES = Object.keys(StatusType);\nvar Logger = /** @class */ (function () {\n function Logger(handleLogStrategy, name, handlerType, level, loggerContext) {\n if (handlerType === void 0) { handlerType = HandlerType.http; }\n if (level === void 0) { level = StatusType.debug; }\n if (loggerContext === void 0) { loggerContext = {}; }\n this.handleLogStrategy = handleLogStrategy;\n this.handlerType = handlerType;\n this.level = level;\n this.contextManager = createContextManager(3 /* CustomerDataType.LoggerContext */);\n this.contextManager.set(assign({}, loggerContext, name ? { logger: { name: name } } : undefined));\n }\n Logger.prototype.log = function (message, messageContext, status, error) {\n if (status === void 0) { status = StatusType.info; }\n var errorContext;\n if (status === StatusType.error) {\n // Always add origin if status is error (backward compatibility - Remove in next major)\n errorContext = { origin: ErrorSource.LOGGER };\n }\n if (error !== undefined && error !== null) {\n var stackTrace = error instanceof Error ? computeStackTrace(error) : undefined;\n var rawError = computeRawError({\n stackTrace: stackTrace,\n originalError: error,\n nonErrorPrefix: \"Provided\" /* NonErrorPrefix.PROVIDED */,\n source: ErrorSource.LOGGER,\n handling: \"handled\" /* ErrorHandling.HANDLED */,\n startClocks: clocksNow(),\n });\n errorContext = {\n origin: ErrorSource.LOGGER,\n stack: rawError.stack,\n kind: rawError.type,\n message: rawError.message,\n };\n }\n var sanitizedMessageContext = sanitize(messageContext);\n var context = errorContext\n ? combine({ error: errorContext }, sanitizedMessageContext)\n : sanitizedMessageContext;\n this.handleLogStrategy({\n message: sanitize(message),\n context: context,\n status: status,\n }, this);\n };\n Logger.prototype.debug = function (message, messageContext, error) {\n this.log(message, messageContext, StatusType.debug, error);\n };\n Logger.prototype.info = function (message, messageContext, error) {\n this.log(message, messageContext, StatusType.info, error);\n };\n Logger.prototype.warn = function (message, messageContext, error) {\n this.log(message, messageContext, StatusType.warn, error);\n };\n Logger.prototype.error = function (message, messageContext, error) {\n this.log(message, messageContext, StatusType.error, error);\n };\n Logger.prototype.setContext = function (context) {\n this.contextManager.set(context);\n };\n Logger.prototype.getContext = function () {\n return this.contextManager.get();\n };\n Logger.prototype.addContext = function (key, value) {\n this.contextManager.add(key, value);\n };\n Logger.prototype.removeContext = function (key) {\n this.contextManager.remove(key);\n };\n Logger.prototype.setHandler = function (handler) {\n this.handlerType = handler;\n };\n Logger.prototype.getHandler = function () {\n return this.handlerType;\n };\n Logger.prototype.setLevel = function (level) {\n this.level = level;\n };\n Logger.prototype.getLevel = function () {\n return this.level;\n };\n __decorate([\n monitored\n ], Logger.prototype, \"log\", null);\n return Logger;\n}());\nexport { Logger };\n//# sourceMappingURL=logger.js.map","import { assign, BoundedBuffer, createContextManager, makePublicApi, monitor, display, deepClone, canUseEventBridge, timeStampNow, checkUser, sanitizeUser, sanitize, createStoredContextManager, combine, } from '@datadog/browser-core';\nimport { validateAndBuildLogsConfiguration } from '../domain/configuration';\nimport { Logger } from '../domain/logger';\nvar LOGS_STORAGE_KEY = 'logs';\nexport function makeLogsPublicApi(startLogsImpl) {\n var isAlreadyInitialized = false;\n var globalContextManager = createContextManager(2 /* CustomerDataType.GlobalContext */);\n var userContextManager = createContextManager(1 /* CustomerDataType.User */);\n var customLoggers = {};\n var getInternalContextStrategy = function () { return undefined; };\n var beforeInitLoggerLog = new BoundedBuffer();\n var handleLogStrategy = function (logsMessage, logger, savedCommonContext, date) {\n if (savedCommonContext === void 0) { savedCommonContext = deepClone(buildCommonContext()); }\n if (date === void 0) { date = timeStampNow(); }\n beforeInitLoggerLog.add(function () { return handleLogStrategy(logsMessage, logger, savedCommonContext, date); });\n };\n var getInitConfigurationStrategy = function () { return undefined; };\n var mainLogger = new Logger(function () {\n var params = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n params[_i] = arguments[_i];\n }\n return handleLogStrategy.apply(void 0, params);\n });\n function buildCommonContext() {\n return {\n view: {\n referrer: document.referrer,\n url: window.location.href,\n },\n context: globalContextManager.getContext(),\n user: userContextManager.getContext(),\n };\n }\n return makePublicApi({\n logger: mainLogger,\n init: monitor(function (initConfiguration) {\n var _a;\n if (!initConfiguration) {\n display.error('Missing configuration');\n return;\n }\n // This function should be available, regardless of initialization success.\n getInitConfigurationStrategy = function () { return deepClone(initConfiguration); };\n if (canUseEventBridge()) {\n initConfiguration = overrideInitConfigurationForBridge(initConfiguration);\n }\n if (!canInitLogs(initConfiguration)) {\n return;\n }\n var configuration = validateAndBuildLogsConfiguration(initConfiguration);\n if (!configuration) {\n return;\n }\n if (initConfiguration.storeContextsAcrossPages) {\n var beforeInitGlobalContext = globalContextManager.getContext();\n globalContextManager = createStoredContextManager(configuration, LOGS_STORAGE_KEY, 2 /* CustomerDataType.GlobalContext */);\n globalContextManager.setContext(combine(globalContextManager.getContext(), beforeInitGlobalContext));\n var beforeInitUserContext = userContextManager.getContext();\n userContextManager = createStoredContextManager(configuration, LOGS_STORAGE_KEY, 1 /* CustomerDataType.User */);\n userContextManager.setContext(combine(userContextManager.getContext(), beforeInitUserContext));\n }\n ;\n (_a = startLogsImpl(initConfiguration, configuration, buildCommonContext, mainLogger), handleLogStrategy = _a.handleLog, getInternalContextStrategy = _a.getInternalContext);\n beforeInitLoggerLog.drain();\n isAlreadyInitialized = true;\n }),\n /** @deprecated: use getGlobalContext instead */\n getLoggerGlobalContext: monitor(function () { return globalContextManager.get(); }),\n getGlobalContext: monitor(function () { return globalContextManager.getContext(); }),\n /** @deprecated: use setGlobalContext instead */\n setLoggerGlobalContext: monitor(function (context) { return globalContextManager.set(context); }),\n setGlobalContext: monitor(function (context) { return globalContextManager.setContext(context); }),\n /** @deprecated: use setGlobalContextProperty instead */\n addLoggerGlobalContext: monitor(function (key, value) { return globalContextManager.add(key, value); }),\n setGlobalContextProperty: monitor(function (key, value) { return globalContextManager.setContextProperty(key, value); }),\n /** @deprecated: use removeGlobalContextProperty instead */\n removeLoggerGlobalContext: monitor(function (key) { return globalContextManager.remove(key); }),\n removeGlobalContextProperty: monitor(function (key) { return globalContextManager.removeContextProperty(key); }),\n clearGlobalContext: monitor(function () { return globalContextManager.clearContext(); }),\n createLogger: monitor(function (name, conf) {\n if (conf === void 0) { conf = {}; }\n customLoggers[name] = new Logger(function () {\n var params = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n params[_i] = arguments[_i];\n }\n return handleLogStrategy.apply(void 0, params);\n }, sanitize(name), conf.handler, conf.level, sanitize(conf.context));\n return customLoggers[name];\n }),\n getLogger: monitor(function (name) { return customLoggers[name]; }),\n getInitConfiguration: monitor(function () { return getInitConfigurationStrategy(); }),\n getInternalContext: monitor(function (startTime) { return getInternalContextStrategy(startTime); }),\n setUser: monitor(function (newUser) {\n if (checkUser(newUser)) {\n userContextManager.setContext(sanitizeUser(newUser));\n }\n }),\n getUser: monitor(function () { return userContextManager.getContext(); }),\n setUserProperty: monitor(function (key, property) {\n var _a;\n var sanitizedProperty = sanitizeUser((_a = {}, _a[key] = property, _a))[key];\n userContextManager.setContextProperty(key, sanitizedProperty);\n }),\n removeUserProperty: monitor(function (key) { return userContextManager.removeContextProperty(key); }),\n clearUser: monitor(function () { return userContextManager.clearContext(); }),\n });\n function overrideInitConfigurationForBridge(initConfiguration) {\n return assign({}, initConfiguration, { clientToken: 'empty' });\n }\n function canInitLogs(initConfiguration) {\n if (isAlreadyInitialized) {\n if (!initConfiguration.silentMultipleInit) {\n display.error('DD_LOGS is already initialized.');\n }\n return false;\n }\n return true;\n }\n}\n//# sourceMappingURL=logsPublicApi.js.map","export function sendToExtension(type, payload) {\n var callback = window.__ddBrowserSdkExtensionCallback;\n if (callback) {\n callback({ type: type, payload: payload });\n }\n}\n//# sourceMappingURL=sendToExtension.js.map","export var TelemetryType = {\n log: 'log',\n configuration: 'configuration',\n};\n//# sourceMappingURL=rawTelemetryEvent.types.js.map","import { ConsoleApiName } from '../../tools/display';\nimport { toStackTraceString, NO_ERROR_STACK_PRESENT_MESSAGE } from '../error/error';\nimport { getExperimentalFeatures } from '../../tools/experimentalFeatures';\nimport { INTAKE_SITE_STAGING, INTAKE_SITE_US1_FED } from '../configuration';\nimport { computeStackTrace } from '../tracekit';\nimport { Observable } from '../../tools/observable';\nimport { timeStampNow } from '../../tools/utils/timeUtils';\nimport { displayIfDebugEnabled, startMonitorErrorCollection } from '../../tools/monitor';\nimport { sendToExtension } from '../../tools/sendToExtension';\nimport { startsWith, arrayFrom, includes, assign } from '../../tools/utils/polyfills';\nimport { performDraw } from '../../tools/utils/numberUtils';\nimport { jsonStringify } from '../../tools/serialisation/jsonStringify';\nimport { combine } from '../../tools/mergeInto';\nimport { TelemetryType } from './rawTelemetryEvent.types';\nvar ALLOWED_FRAME_URLS = [\n 'https://www.datadoghq-browser-agent.com',\n 'https://www.datad0g-browser-agent.com',\n 'https://d3uc069fcn7uxw.cloudfront.net',\n 'https://d20xtzwzcl0ceb.cloudfront.net',\n 'http://localhost',\n '',\n];\nvar TELEMETRY_EXCLUDED_SITES = [INTAKE_SITE_US1_FED];\nvar telemetryConfiguration = { maxEventsPerPage: 0, sentEventCount: 0, telemetryEnabled: false, telemetryConfigurationEnabled: false };\nvar onRawTelemetryEventCollected;\nexport function startTelemetry(telemetryService, configuration) {\n var contextProvider;\n var observable = new Observable();\n telemetryConfiguration.telemetryEnabled =\n !includes(TELEMETRY_EXCLUDED_SITES, configuration.site) && performDraw(configuration.telemetrySampleRate);\n telemetryConfiguration.telemetryConfigurationEnabled =\n telemetryConfiguration.telemetryEnabled && performDraw(configuration.telemetryConfigurationSampleRate);\n var runtimeEnvInfo = getRuntimeEnvInfo();\n onRawTelemetryEventCollected = function (rawEvent) {\n if (telemetryConfiguration.telemetryEnabled) {\n var event_1 = toTelemetryEvent(telemetryService, rawEvent, runtimeEnvInfo);\n observable.notify(event_1);\n sendToExtension('telemetry', event_1);\n }\n };\n startMonitorErrorCollection(addTelemetryError);\n assign(telemetryConfiguration, {\n maxEventsPerPage: configuration.maxTelemetryEventsPerPage,\n sentEventCount: 0,\n });\n function toTelemetryEvent(telemetryService, event, runtimeEnvInfo) {\n return combine({\n type: 'telemetry',\n date: timeStampNow(),\n service: telemetryService,\n version: \"4.50.0\",\n source: 'browser',\n _dd: {\n format_version: 2,\n },\n telemetry: combine(event, {\n runtime_env: runtimeEnvInfo,\n }),\n experimental_features: arrayFrom(getExperimentalFeatures()),\n }, contextProvider !== undefined ? contextProvider() : {});\n }\n return {\n setContextProvider: function (provider) {\n contextProvider = provider;\n },\n observable: observable,\n enabled: telemetryConfiguration.telemetryEnabled,\n };\n}\nfunction getRuntimeEnvInfo() {\n return {\n is_local_file: window.location.protocol === 'file:',\n is_worker: 'WorkerGlobalScope' in self,\n };\n}\nexport function startFakeTelemetry() {\n var events = [];\n assign(telemetryConfiguration, {\n maxEventsPerPage: Infinity,\n sentEventCount: 0,\n });\n onRawTelemetryEventCollected = function (event) {\n events.push(event);\n };\n return events;\n}\nexport function resetTelemetry() {\n onRawTelemetryEventCollected = undefined;\n}\n/**\n * Avoid mixing telemetry events from different data centers\n * but keep replicating staging events for reliability\n */\nexport function isTelemetryReplicationAllowed(configuration) {\n return configuration.site === INTAKE_SITE_STAGING;\n}\nexport function addTelemetryDebug(message, context) {\n displayIfDebugEnabled(ConsoleApiName.debug, message, context);\n addTelemetry(assign({\n type: TelemetryType.log,\n message: message,\n status: \"debug\" /* StatusType.debug */,\n }, context));\n}\nexport function addTelemetryError(e, context) {\n addTelemetry(assign({\n type: TelemetryType.log,\n status: \"error\" /* StatusType.error */,\n }, formatError(e), context));\n}\nexport function addTelemetryConfiguration(configuration) {\n if (telemetryConfiguration.telemetryConfigurationEnabled) {\n addTelemetry({\n type: TelemetryType.configuration,\n configuration: configuration,\n });\n }\n}\nfunction addTelemetry(event) {\n if (onRawTelemetryEventCollected && telemetryConfiguration.sentEventCount < telemetryConfiguration.maxEventsPerPage) {\n telemetryConfiguration.sentEventCount += 1;\n onRawTelemetryEventCollected(event);\n }\n}\nexport function formatError(e) {\n if (e instanceof Error) {\n var stackTrace = computeStackTrace(e);\n return {\n error: {\n kind: stackTrace.name,\n stack: toStackTraceString(scrubCustomerFrames(stackTrace)),\n },\n message: stackTrace.message,\n };\n }\n return {\n error: {\n stack: NO_ERROR_STACK_PRESENT_MESSAGE,\n },\n message: \"\".concat(\"Uncaught\" /* NonErrorPrefix.UNCAUGHT */, \" \").concat(jsonStringify(e)),\n };\n}\nexport function scrubCustomerFrames(stackTrace) {\n stackTrace.stack = stackTrace.stack.filter(function (frame) { return !frame.url || ALLOWED_FRAME_URLS.some(function (allowedFrameUrl) { return startsWith(frame.url, allowedFrameUrl); }); });\n return stackTrace;\n}\n//# sourceMappingURL=telemetry.js.map","import { isExperimentalFeatureEnabled, ExperimentalFeature } from '../tools/experimentalFeatures';\nimport { Observable } from '../tools/observable';\nimport { objectValues, includes } from '../tools/utils/polyfills';\nimport { noop } from '../tools/utils/functionUtils';\nimport { addEventListeners, addEventListener } from './addEventListener';\nexport var PageExitReason = {\n HIDDEN: 'visibility_hidden',\n UNLOADING: 'before_unload',\n PAGEHIDE: 'page_hide',\n FROZEN: 'page_frozen',\n};\nexport function createPageExitObservable(configuration) {\n var observable = new Observable(function () {\n var pagehideEnabled = isExperimentalFeatureEnabled(ExperimentalFeature.PAGEHIDE);\n var stopListeners = addEventListeners(configuration, window, [\"visibilitychange\" /* DOM_EVENT.VISIBILITY_CHANGE */, \"freeze\" /* DOM_EVENT.FREEZE */, \"pagehide\" /* DOM_EVENT.PAGE_HIDE */], function (event) {\n if (event.type === \"pagehide\" /* DOM_EVENT.PAGE_HIDE */ && pagehideEnabled) {\n /**\n * Only event that detect page unload events while being compatible with the back/forward cache (bfcache)\n */\n observable.notify({ reason: PageExitReason.PAGEHIDE });\n }\n else if (event.type === \"visibilitychange\" /* DOM_EVENT.VISIBILITY_CHANGE */ && document.visibilityState === 'hidden') {\n /**\n * Only event that guarantee to fire on mobile devices when the page transitions to background state\n * (e.g. when user switches to a different application, goes to homescreen, etc), or is being unloaded.\n */\n observable.notify({ reason: PageExitReason.HIDDEN });\n }\n else if (event.type === \"freeze\" /* DOM_EVENT.FREEZE */) {\n /**\n * After transitioning in background a tab can be freezed to preserve resources. (cf: https://developer.chrome.com/blog/page-lifecycle-api)\n * Allow to collect events happening between hidden and frozen state.\n */\n observable.notify({ reason: PageExitReason.FROZEN });\n }\n }, { capture: true }).stop;\n var stopBeforeUnloadListener = noop;\n if (!pagehideEnabled) {\n stopBeforeUnloadListener = addEventListener(configuration, window, \"beforeunload\" /* DOM_EVENT.BEFORE_UNLOAD */, function () {\n observable.notify({ reason: PageExitReason.UNLOADING });\n }).stop;\n }\n return function () {\n stopListeners();\n stopBeforeUnloadListener();\n };\n });\n return observable;\n}\nexport function isPageExitReason(reason) {\n return includes(objectValues(PageExitReason), reason);\n}\n//# sourceMappingURL=pageExitObservable.js.map","import { getCookie } from '../../browser/cookie';\nexport var SYNTHETICS_TEST_ID_COOKIE_NAME = 'datadog-synthetics-public-id';\nexport var SYNTHETICS_RESULT_ID_COOKIE_NAME = 'datadog-synthetics-result-id';\nexport var SYNTHETICS_INJECTS_RUM_COOKIE_NAME = 'datadog-synthetics-injects-rum';\nexport function willSyntheticsInjectRum() {\n return Boolean(window._DATADOG_SYNTHETICS_INJECTS_RUM || getCookie(SYNTHETICS_INJECTS_RUM_COOKIE_NAME));\n}\nexport function getSyntheticsTestId() {\n var value = window._DATADOG_SYNTHETICS_PUBLIC_ID || getCookie(SYNTHETICS_TEST_ID_COOKIE_NAME);\n return typeof value === 'string' ? value : undefined;\n}\nexport function getSyntheticsResultId() {\n var value = window._DATADOG_SYNTHETICS_RESULT_ID || getCookie(SYNTHETICS_RESULT_ID_COOKIE_NAME);\n return typeof value === 'string' ? value : undefined;\n}\n//# sourceMappingURL=syntheticsWorkerValues.js.map","import { display } from '../tools/display';\nimport { objectValues } from '../tools/utils/polyfills';\nimport { isPageExitReason } from '../browser/pageExitObservable';\nimport { computeBytesCount } from '../tools/utils/byteUtils';\nimport { jsonStringify } from '../tools/serialisation/jsonStringify';\nvar Batch = /** @class */ (function () {\n function Batch(request, flushController, messageBytesLimit) {\n var _this = this;\n this.request = request;\n this.flushController = flushController;\n this.messageBytesLimit = messageBytesLimit;\n this.pushOnlyBuffer = [];\n this.upsertBuffer = {};\n this.flushSubscription = this.flushController.flushObservable.subscribe(function (event) { return _this.flush(event); });\n }\n Batch.prototype.add = function (message) {\n this.addOrUpdate(message);\n };\n Batch.prototype.upsert = function (message, key) {\n this.addOrUpdate(message, key);\n };\n Batch.prototype.stop = function () {\n this.flushSubscription.unsubscribe();\n };\n Batch.prototype.flush = function (event) {\n var messages = this.pushOnlyBuffer.concat(objectValues(this.upsertBuffer));\n this.pushOnlyBuffer = [];\n this.upsertBuffer = {};\n var payload = { data: messages.join('\\n'), bytesCount: event.bytesCount, flushReason: event.reason };\n if (isPageExitReason(event.reason)) {\n this.request.sendOnExit(payload);\n }\n else {\n this.request.send(payload);\n }\n };\n Batch.prototype.addOrUpdate = function (message, key) {\n var _a = this.process(message), processedMessage = _a.processedMessage, messageBytesCount = _a.messageBytesCount;\n if (messageBytesCount >= this.messageBytesLimit) {\n display.warn(\"Discarded a message whose size was bigger than the maximum allowed size \".concat(this.messageBytesLimit, \"KB.\"));\n return;\n }\n if (this.hasMessageFor(key)) {\n this.remove(key);\n }\n this.push(processedMessage, messageBytesCount, key);\n };\n Batch.prototype.process = function (message) {\n var processedMessage = jsonStringify(message);\n var messageBytesCount = computeBytesCount(processedMessage);\n return { processedMessage: processedMessage, messageBytesCount: messageBytesCount };\n };\n Batch.prototype.push = function (processedMessage, messageBytesCount, key) {\n // If there are other messages, a '\\n' will be added at serialization\n var separatorBytesCount = this.flushController.messagesCount > 0 ? 1 : 0;\n this.flushController.notifyBeforeAddMessage(messageBytesCount + separatorBytesCount);\n if (key !== undefined) {\n this.upsertBuffer[key] = processedMessage;\n }\n else {\n this.pushOnlyBuffer.push(processedMessage);\n }\n this.flushController.notifyAfterAddMessage();\n };\n Batch.prototype.remove = function (key) {\n var removedMessage = this.upsertBuffer[key];\n delete this.upsertBuffer[key];\n var messageBytesCount = computeBytesCount(removedMessage);\n // If there are other messages, a '\\n' will be added at serialization\n var separatorBytesCount = this.flushController.messagesCount > 1 ? 1 : 0;\n this.flushController.notifyAfterRemoveMessage(messageBytesCount + separatorBytesCount);\n };\n Batch.prototype.hasMessageFor = function (key) {\n return key !== undefined && this.upsertBuffer[key] !== undefined;\n };\n return Batch;\n}());\nexport { Batch };\n//# sourceMappingURL=batch.js.map","export function isServerError(status) {\n return status >= 500;\n}\nexport function tryToClone(response) {\n try {\n return response.clone();\n }\n catch (e) {\n // clone can throw if the response has already been used by another instrumentation or is disturbed\n return;\n }\n}\n//# sourceMappingURL=responseUtils.js.map","import { setTimeout } from '../tools/timer';\nimport { clocksNow, ONE_MINUTE, ONE_SECOND } from '../tools/utils/timeUtils';\nimport { ONE_MEBI_BYTE, ONE_KIBI_BYTE } from '../tools/utils/byteUtils';\nimport { isServerError } from '../tools/utils/responseUtils';\nimport { ErrorSource } from '../domain/error/error.types';\nexport var MAX_ONGOING_BYTES_COUNT = 80 * ONE_KIBI_BYTE;\nexport var MAX_ONGOING_REQUESTS = 32;\nexport var MAX_QUEUE_BYTES_COUNT = 3 * ONE_MEBI_BYTE;\nexport var MAX_BACKOFF_TIME = ONE_MINUTE;\nexport var INITIAL_BACKOFF_TIME = ONE_SECOND;\nexport function sendWithRetryStrategy(payload, state, sendStrategy, endpointType, reportError) {\n if (state.transportStatus === 0 /* TransportStatus.UP */ &&\n state.queuedPayloads.size() === 0 &&\n state.bandwidthMonitor.canHandle(payload)) {\n send(payload, state, sendStrategy, {\n onSuccess: function () { return retryQueuedPayloads(0 /* RetryReason.AFTER_SUCCESS */, state, sendStrategy, endpointType, reportError); },\n onFailure: function () {\n state.queuedPayloads.enqueue(payload);\n scheduleRetry(state, sendStrategy, endpointType, reportError);\n },\n });\n }\n else {\n state.queuedPayloads.enqueue(payload);\n }\n}\nfunction scheduleRetry(state, sendStrategy, endpointType, reportError) {\n if (state.transportStatus !== 2 /* TransportStatus.DOWN */) {\n return;\n }\n setTimeout(function () {\n var payload = state.queuedPayloads.first();\n send(payload, state, sendStrategy, {\n onSuccess: function () {\n state.queuedPayloads.dequeue();\n state.currentBackoffTime = INITIAL_BACKOFF_TIME;\n retryQueuedPayloads(1 /* RetryReason.AFTER_RESUME */, state, sendStrategy, endpointType, reportError);\n },\n onFailure: function () {\n state.currentBackoffTime = Math.min(MAX_BACKOFF_TIME, state.currentBackoffTime * 2);\n scheduleRetry(state, sendStrategy, endpointType, reportError);\n },\n });\n }, state.currentBackoffTime);\n}\nfunction send(payload, state, sendStrategy, _a) {\n var onSuccess = _a.onSuccess, onFailure = _a.onFailure;\n state.bandwidthMonitor.add(payload);\n sendStrategy(payload, function (response) {\n state.bandwidthMonitor.remove(payload);\n if (!shouldRetryRequest(response)) {\n state.transportStatus = 0 /* TransportStatus.UP */;\n onSuccess();\n }\n else {\n // do not consider transport down if another ongoing request could succeed\n state.transportStatus =\n state.bandwidthMonitor.ongoingRequestCount > 0 ? 1 /* TransportStatus.FAILURE_DETECTED */ : 2 /* TransportStatus.DOWN */;\n payload.retry = {\n count: payload.retry ? payload.retry.count + 1 : 1,\n lastFailureStatus: response.status,\n };\n onFailure();\n }\n });\n}\nfunction retryQueuedPayloads(reason, state, sendStrategy, endpointType, reportError) {\n if (reason === 0 /* RetryReason.AFTER_SUCCESS */ && state.queuedPayloads.isFull() && !state.queueFullReported) {\n reportError({\n message: \"Reached max \".concat(endpointType, \" events size queued for upload: \").concat(MAX_QUEUE_BYTES_COUNT / ONE_MEBI_BYTE, \"MiB\"),\n source: ErrorSource.AGENT,\n startClocks: clocksNow(),\n });\n state.queueFullReported = true;\n }\n var previousQueue = state.queuedPayloads;\n state.queuedPayloads = newPayloadQueue();\n while (previousQueue.size() > 0) {\n sendWithRetryStrategy(previousQueue.dequeue(), state, sendStrategy, endpointType, reportError);\n }\n}\nfunction shouldRetryRequest(response) {\n return (response.type !== 'opaque' &&\n ((response.status === 0 && !navigator.onLine) ||\n response.status === 408 ||\n response.status === 429 ||\n isServerError(response.status)));\n}\nexport function newRetryState() {\n return {\n transportStatus: 0 /* TransportStatus.UP */,\n currentBackoffTime: INITIAL_BACKOFF_TIME,\n bandwidthMonitor: newBandwidthMonitor(),\n queuedPayloads: newPayloadQueue(),\n queueFullReported: false,\n };\n}\nfunction newPayloadQueue() {\n var queue = [];\n return {\n bytesCount: 0,\n enqueue: function (payload) {\n if (this.isFull()) {\n return;\n }\n queue.push(payload);\n this.bytesCount += payload.bytesCount;\n },\n first: function () {\n return queue[0];\n },\n dequeue: function () {\n var payload = queue.shift();\n if (payload) {\n this.bytesCount -= payload.bytesCount;\n }\n return payload;\n },\n size: function () {\n return queue.length;\n },\n isFull: function () {\n return this.bytesCount >= MAX_QUEUE_BYTES_COUNT;\n },\n };\n}\nfunction newBandwidthMonitor() {\n return {\n ongoingRequestCount: 0,\n ongoingByteCount: 0,\n canHandle: function (payload) {\n return (this.ongoingRequestCount === 0 ||\n (this.ongoingByteCount + payload.bytesCount <= MAX_ONGOING_BYTES_COUNT &&\n this.ongoingRequestCount < MAX_ONGOING_REQUESTS));\n },\n add: function (payload) {\n this.ongoingRequestCount += 1;\n this.ongoingByteCount += payload.bytesCount;\n },\n remove: function (payload) {\n this.ongoingRequestCount -= 1;\n this.ongoingByteCount -= payload.bytesCount;\n },\n };\n}\n//# sourceMappingURL=sendWithRetryStrategy.js.map","import { addTelemetryError } from '../domain/telemetry';\nimport { monitor } from '../tools/monitor';\nimport { addEventListener } from '../browser/addEventListener';\nimport { newRetryState, sendWithRetryStrategy } from './sendWithRetryStrategy';\nexport function createHttpRequest(configuration, endpointBuilder, bytesLimit, reportError) {\n var retryState = newRetryState();\n var sendStrategyForRetry = function (payload, onResponse) {\n return fetchKeepAliveStrategy(configuration, endpointBuilder, bytesLimit, payload, onResponse);\n };\n return {\n send: function (payload) {\n sendWithRetryStrategy(payload, retryState, sendStrategyForRetry, endpointBuilder.endpointType, reportError);\n },\n /**\n * Since fetch keepalive behaves like regular fetch on Firefox,\n * keep using sendBeaconStrategy on exit\n */\n sendOnExit: function (payload) {\n sendBeaconStrategy(configuration, endpointBuilder, bytesLimit, payload);\n },\n };\n}\nfunction sendBeaconStrategy(configuration, endpointBuilder, bytesLimit, payload) {\n var canUseBeacon = !!navigator.sendBeacon && payload.bytesCount < bytesLimit;\n if (canUseBeacon) {\n try {\n var beaconUrl = endpointBuilder.build('beacon', payload);\n var isQueued = navigator.sendBeacon(beaconUrl, payload.data);\n if (isQueued) {\n return;\n }\n }\n catch (e) {\n reportBeaconError(e);\n }\n }\n var xhrUrl = endpointBuilder.build('xhr', payload);\n sendXHR(configuration, xhrUrl, payload.data);\n}\nvar hasReportedBeaconError = false;\nfunction reportBeaconError(e) {\n if (!hasReportedBeaconError) {\n hasReportedBeaconError = true;\n addTelemetryError(e);\n }\n}\nexport function fetchKeepAliveStrategy(configuration, endpointBuilder, bytesLimit, payload, onResponse) {\n var canUseKeepAlive = isKeepAliveSupported() && payload.bytesCount < bytesLimit;\n if (canUseKeepAlive) {\n var fetchUrl = endpointBuilder.build('fetch', payload);\n fetch(fetchUrl, { method: 'POST', body: payload.data, keepalive: true, mode: 'cors' }).then(monitor(function (response) { return onResponse === null || onResponse === void 0 ? void 0 : onResponse({ status: response.status, type: response.type }); }), monitor(function () {\n var xhrUrl = endpointBuilder.build('xhr', payload);\n // failed to queue the request\n sendXHR(configuration, xhrUrl, payload.data, onResponse);\n }));\n }\n else {\n var xhrUrl = endpointBuilder.build('xhr', payload);\n sendXHR(configuration, xhrUrl, payload.data, onResponse);\n }\n}\nfunction isKeepAliveSupported() {\n // Request can throw, cf https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#errors\n try {\n return window.Request && 'keepalive' in new Request('http://a');\n }\n catch (_a) {\n return false;\n }\n}\nexport function sendXHR(configuration, url, data, onResponse) {\n var request = new XMLHttpRequest();\n request.open('POST', url, true);\n addEventListener(configuration, request, 'loadend', function () {\n onResponse === null || onResponse === void 0 ? void 0 : onResponse({ status: request.status });\n }, {\n // prevent multiple onResponse callbacks\n // if the xhr instance is reused by a third party\n once: true,\n });\n request.send(data);\n}\n//# sourceMappingURL=httpRequest.js.map","import { Observable } from '../tools/observable';\nimport { clearTimeout, setTimeout } from '../tools/timer';\n/**\n * Returns a \"flush controller\", responsible of notifying when flushing a pool of pending data needs\n * to happen. The implementation is designed to support both synchronous and asynchronous usages,\n * but relies on invariants described in each method documentation to keep a coherent state.\n */\nexport function createFlushController(_a) {\n var messagesLimit = _a.messagesLimit, bytesLimit = _a.bytesLimit, durationLimit = _a.durationLimit, pageExitObservable = _a.pageExitObservable, sessionExpireObservable = _a.sessionExpireObservable;\n var pageExitSubscription = pageExitObservable.subscribe(function (event) { return flush(event.reason); });\n var sessionExpireSubscription = sessionExpireObservable.subscribe(function () { return flush('session_expire'); });\n var flushObservable = new Observable(function () { return function () {\n pageExitSubscription.unsubscribe();\n sessionExpireSubscription.unsubscribe();\n }; });\n var currentBytesCount = 0;\n var currentMessagesCount = 0;\n function flush(flushReason) {\n if (currentMessagesCount === 0) {\n return;\n }\n var messagesCount = currentMessagesCount;\n var bytesCount = currentBytesCount;\n currentMessagesCount = 0;\n currentBytesCount = 0;\n cancelDurationLimitTimeout();\n flushObservable.notify({\n reason: flushReason,\n messagesCount: messagesCount,\n bytesCount: bytesCount,\n });\n }\n var durationLimitTimeoutId;\n function scheduleDurationLimitTimeout() {\n if (durationLimitTimeoutId === undefined) {\n durationLimitTimeoutId = setTimeout(function () {\n flush('duration_limit');\n }, durationLimit);\n }\n }\n function cancelDurationLimitTimeout() {\n clearTimeout(durationLimitTimeoutId);\n durationLimitTimeoutId = undefined;\n }\n return {\n flushObservable: flushObservable,\n get messagesCount() {\n return currentMessagesCount;\n },\n /**\n * Notifies that a message will be added to a pool of pending messages waiting to be flushed.\n *\n * This function needs to be called synchronously, right before adding the message, so no flush\n * event can happen after `notifyBeforeAddMessage` and before adding the message.\n */\n notifyBeforeAddMessage: function (messageBytesCount) {\n if (currentBytesCount + messageBytesCount >= bytesLimit) {\n flush('bytes_limit');\n }\n // Consider the message to be added now rather than in `notifyAfterAddMessage`, because if no\n // message was added yet and `notifyAfterAddMessage` is called asynchronously, we still want\n // to notify when a flush is needed (for example on page exit).\n currentMessagesCount += 1;\n currentBytesCount += messageBytesCount;\n scheduleDurationLimitTimeout();\n },\n /**\n * Notifies that a message *was* added to a pool of pending messages waiting to be flushed.\n *\n * This function can be called asynchronously after the message was added, but in this case it\n * should not be called if a flush event occurred in between.\n */\n notifyAfterAddMessage: function () {\n if (currentMessagesCount >= messagesLimit) {\n flush('messages_limit');\n }\n else if (currentBytesCount >= bytesLimit) {\n flush('bytes_limit');\n }\n },\n /**\n * Notifies that a message was removed from a pool of pending messages waiting to be flushed.\n *\n * This function needs to be called synchronously, right after removing the message, so no flush\n * event can happen after removing the message and before `notifyAfterRemoveMessage`.\n */\n notifyAfterRemoveMessage: function (messageBytesCount) {\n currentBytesCount -= messageBytesCount;\n currentMessagesCount -= 1;\n if (currentMessagesCount === 0) {\n cancelDurationLimitTimeout();\n }\n },\n };\n}\n//# sourceMappingURL=flushController.js.map","import { Batch } from './batch';\nimport { createHttpRequest } from './httpRequest';\nimport { createFlushController } from './flushController';\nexport function startBatchWithReplica(configuration, primary, replica, reportError, pageExitObservable, sessionExpireObservable) {\n var primaryBatch = createBatch(configuration, primary.endpoint);\n var replicaBatch = replica && createBatch(configuration, replica.endpoint);\n function createBatch(configuration, endpointBuilder) {\n return new Batch(createHttpRequest(configuration, endpointBuilder, configuration.batchBytesLimit, reportError), createFlushController({\n messagesLimit: configuration.batchMessagesLimit,\n bytesLimit: configuration.batchBytesLimit,\n durationLimit: configuration.flushTimeout,\n pageExitObservable: pageExitObservable,\n sessionExpireObservable: sessionExpireObservable,\n }), configuration.messageBytesLimit);\n }\n return {\n flushObservable: primaryBatch.flushController.flushObservable,\n add: function (message, replicated) {\n if (replicated === void 0) { replicated = true; }\n primaryBatch.add(message);\n if (replicaBatch && replicated) {\n replicaBatch.add(replica.transformMessage ? replica.transformMessage(message) : message);\n }\n },\n upsert: function (message, key) {\n primaryBatch.upsert(message, key);\n if (replicaBatch) {\n replicaBatch.upsert(replica.transformMessage ? replica.transformMessage(message) : message, key);\n }\n },\n stop: function () {\n primaryBatch.stop();\n replicaBatch === null || replicaBatch === void 0 ? void 0 : replicaBatch.stop();\n },\n };\n}\n//# sourceMappingURL=startBatchWithReplica.js.map","import { setInterval, clearInterval } from './timer';\nimport { addDuration, relativeNow, ONE_MINUTE } from './utils/timeUtils';\nvar END_OF_TIMES = Infinity;\nexport var CLEAR_OLD_VALUES_INTERVAL = ONE_MINUTE;\n/**\n * Store and keep track of values spans. This whole class assumes that values are added in\n * chronological order (i.e. all entries have an increasing start time).\n */\nvar ValueHistory = /** @class */ (function () {\n function ValueHistory(expireDelay, maxEntries) {\n var _this = this;\n this.expireDelay = expireDelay;\n this.maxEntries = maxEntries;\n this.entries = [];\n this.clearOldValuesInterval = setInterval(function () { return _this.clearOldValues(); }, CLEAR_OLD_VALUES_INTERVAL);\n }\n /**\n * Add a value to the history associated with a start time. Returns a reference to this newly\n * added entry that can be removed or closed.\n */\n ValueHistory.prototype.add = function (value, startTime) {\n var _this = this;\n var entry = {\n value: value,\n startTime: startTime,\n endTime: END_OF_TIMES,\n remove: function () {\n var index = _this.entries.indexOf(entry);\n if (index >= 0) {\n _this.entries.splice(index, 1);\n }\n },\n close: function (endTime) {\n entry.endTime = endTime;\n },\n };\n if (this.maxEntries && this.entries.length >= this.maxEntries) {\n this.entries.pop();\n }\n this.entries.unshift(entry);\n return entry;\n };\n /**\n * Return the latest value that was active during `startTime`, or the currently active value\n * if no `startTime` is provided. This method assumes that entries are not overlapping.\n */\n ValueHistory.prototype.find = function (startTime) {\n if (startTime === void 0) { startTime = END_OF_TIMES; }\n for (var _i = 0, _a = this.entries; _i < _a.length; _i++) {\n var entry = _a[_i];\n if (entry.startTime <= startTime) {\n if (startTime <= entry.endTime) {\n return entry.value;\n }\n break;\n }\n }\n };\n /**\n * Helper function to close the currently active value, if any. This method assumes that entries\n * are not overlapping.\n */\n ValueHistory.prototype.closeActive = function (endTime) {\n var latestEntry = this.entries[0];\n if (latestEntry && latestEntry.endTime === END_OF_TIMES) {\n latestEntry.close(endTime);\n }\n };\n /**\n * Return all values with an active period overlapping with the duration,\n * or all values that were active during `startTime` if no duration is provided,\n * or all currently active values if no `startTime` is provided.\n */\n ValueHistory.prototype.findAll = function (startTime, duration) {\n if (startTime === void 0) { startTime = END_OF_TIMES; }\n if (duration === void 0) { duration = 0; }\n var endTime = addDuration(startTime, duration);\n return this.entries\n .filter(function (entry) { return entry.startTime <= endTime && startTime <= entry.endTime; })\n .map(function (entry) { return entry.value; });\n };\n /**\n * Remove all entries from this collection.\n */\n ValueHistory.prototype.reset = function () {\n this.entries = [];\n };\n /**\n * Stop internal garbage collection of past entries.\n */\n ValueHistory.prototype.stop = function () {\n clearInterval(this.clearOldValuesInterval);\n };\n ValueHistory.prototype.clearOldValues = function () {\n var oldTimeThreshold = relativeNow() - this.expireDelay;\n while (this.entries.length > 0 && this.entries[this.entries.length - 1].endTime < oldTimeThreshold) {\n this.entries.pop();\n }\n };\n return ValueHistory;\n}());\nexport { ValueHistory };\n//# sourceMappingURL=valueHistory.js.map","import { ValueHistory } from '../../tools/valueHistory';\nimport { relativeNow, clocksOrigin, ONE_MINUTE } from '../../tools/utils/timeUtils';\nimport { addEventListener, addEventListeners } from '../../browser/addEventListener';\nimport { clearInterval, setInterval } from '../../tools/timer';\nimport { SESSION_TIME_OUT_DELAY } from './sessionConstants';\nimport { startSessionStore } from './sessionStore';\nexport var VISIBILITY_CHECK_DELAY = ONE_MINUTE;\nvar SESSION_CONTEXT_TIMEOUT_DELAY = SESSION_TIME_OUT_DELAY;\nvar stopCallbacks = [];\nexport function startSessionManager(configuration, productKey, computeSessionState) {\n // TODO - Improve configuration type and remove assertion\n var sessionStore = startSessionStore(configuration.sessionStoreStrategyType, productKey, computeSessionState);\n stopCallbacks.push(function () { return sessionStore.stop(); });\n var sessionContextHistory = new ValueHistory(SESSION_CONTEXT_TIMEOUT_DELAY);\n stopCallbacks.push(function () { return sessionContextHistory.stop(); });\n sessionStore.renewObservable.subscribe(function () {\n sessionContextHistory.add(buildSessionContext(), relativeNow());\n });\n sessionStore.expireObservable.subscribe(function () {\n sessionContextHistory.closeActive(relativeNow());\n });\n sessionStore.expandOrRenewSession();\n sessionContextHistory.add(buildSessionContext(), clocksOrigin().relative);\n trackActivity(configuration, function () { return sessionStore.expandOrRenewSession(); });\n trackVisibility(configuration, function () { return sessionStore.expandSession(); });\n function buildSessionContext() {\n return {\n id: sessionStore.getSession().id,\n trackingType: sessionStore.getSession()[productKey],\n };\n }\n return {\n findActiveSession: function (startTime) { return sessionContextHistory.find(startTime); },\n renewObservable: sessionStore.renewObservable,\n expireObservable: sessionStore.expireObservable,\n expire: sessionStore.expire,\n };\n}\nexport function stopSessionManager() {\n stopCallbacks.forEach(function (e) { return e(); });\n stopCallbacks = [];\n}\nfunction trackActivity(configuration, expandOrRenewSession) {\n var stop = addEventListeners(configuration, window, [\"click\" /* DOM_EVENT.CLICK */, \"touchstart\" /* DOM_EVENT.TOUCH_START */, \"keydown\" /* DOM_EVENT.KEY_DOWN */, \"scroll\" /* DOM_EVENT.SCROLL */], expandOrRenewSession, { capture: true, passive: true }).stop;\n stopCallbacks.push(stop);\n}\nfunction trackVisibility(configuration, expandSession) {\n var expandSessionWhenVisible = function () {\n if (document.visibilityState === 'visible') {\n expandSession();\n }\n };\n var stop = addEventListener(configuration, document, \"visibilitychange\" /* DOM_EVENT.VISIBILITY_CHANGE */, expandSessionWhenVisible).stop;\n stopCallbacks.push(stop);\n var visibilityCheckInterval = setInterval(expandSessionWhenVisible, VISIBILITY_CHECK_DELAY);\n stopCallbacks.push(function () {\n clearInterval(visibilityCheckInterval);\n });\n}\n//# sourceMappingURL=sessionManager.js.map","import { Observable, performDraw, startSessionManager } from '@datadog/browser-core';\nexport var LOGS_SESSION_KEY = 'logs';\nexport function startLogsSessionManager(configuration) {\n var sessionManager = startSessionManager(configuration, LOGS_SESSION_KEY, function (rawTrackingType) {\n return computeSessionState(configuration, rawTrackingType);\n });\n return {\n findTrackedSession: function (startTime) {\n var session = sessionManager.findActiveSession(startTime);\n return session && session.trackingType === \"1\" /* LoggerTrackingType.TRACKED */\n ? {\n id: session.id,\n }\n : undefined;\n },\n expireObservable: sessionManager.expireObservable,\n };\n}\nexport function startLogsSessionManagerStub(configuration) {\n var isTracked = computeTrackingType(configuration) === \"1\" /* LoggerTrackingType.TRACKED */;\n var session = isTracked ? {} : undefined;\n return {\n findTrackedSession: function () { return session; },\n expireObservable: new Observable(),\n };\n}\nfunction computeTrackingType(configuration) {\n if (!performDraw(configuration.sessionSampleRate)) {\n return \"0\" /* LoggerTrackingType.NOT_TRACKED */;\n }\n return \"1\" /* LoggerTrackingType.TRACKED */;\n}\nfunction computeSessionState(configuration, rawSessionType) {\n var trackingType = hasValidLoggerSession(rawSessionType) ? rawSessionType : computeTrackingType(configuration);\n return {\n trackingType: trackingType,\n isTracked: trackingType === \"1\" /* LoggerTrackingType.TRACKED */,\n };\n}\nfunction hasValidLoggerSession(trackingType) {\n return trackingType === \"0\" /* LoggerTrackingType.NOT_TRACKED */ || trackingType === \"1\" /* LoggerTrackingType.TRACKED */;\n}\n//# sourceMappingURL=logsSessionManager.js.map","import { setTimeout } from '../../tools/timer';\nimport { clocksNow, ONE_MINUTE } from '../../tools/utils/timeUtils';\nimport { ErrorSource } from '../error/error.types';\nexport function createEventRateLimiter(eventType, limit, onLimitReached) {\n var eventCount = 0;\n var allowNextEvent = false;\n return {\n isLimitReached: function () {\n if (eventCount === 0) {\n setTimeout(function () {\n eventCount = 0;\n }, ONE_MINUTE);\n }\n eventCount += 1;\n if (eventCount <= limit || allowNextEvent) {\n allowNextEvent = false;\n return false;\n }\n if (eventCount === limit + 1) {\n allowNextEvent = true;\n try {\n onLimitReached({\n message: \"Reached max number of \".concat(eventType, \"s by minute: \").concat(limit),\n source: ErrorSource.AGENT,\n startClocks: clocksNow(),\n });\n }\n finally {\n allowNextEvent = false;\n }\n }\n return true;\n },\n };\n}\n//# sourceMappingURL=createEventRateLimiter.js.map","var _a;\nimport { includes, display, combine, ErrorSource, timeStampNow } from '@datadog/browser-core';\nimport { StatusType, HandlerType } from '../logger';\nexport var STATUS_PRIORITIES = (_a = {},\n _a[StatusType.debug] = 0,\n _a[StatusType.info] = 1,\n _a[StatusType.warn] = 2,\n _a[StatusType.error] = 3,\n _a);\nexport function startLoggerCollection(lifeCycle) {\n function handleLog(logsMessage, logger, savedCommonContext, savedDate) {\n var messageContext = logsMessage.context;\n if (isAuthorized(logsMessage.status, HandlerType.console, logger)) {\n display(logsMessage.status, logsMessage.message, combine(logger.getContext(), messageContext));\n }\n lifeCycle.notify(0 /* LifeCycleEventType.RAW_LOG_COLLECTED */, {\n rawLogsEvent: {\n date: savedDate || timeStampNow(),\n message: logsMessage.message,\n status: logsMessage.status,\n origin: ErrorSource.LOGGER,\n },\n messageContext: messageContext,\n savedCommonContext: savedCommonContext,\n logger: logger,\n });\n }\n return {\n handleLog: handleLog,\n };\n}\nexport function isAuthorized(status, handlerType, logger) {\n var loggerHandler = logger.getHandler();\n var sanitizedHandlerType = Array.isArray(loggerHandler) ? loggerHandler : [loggerHandler];\n return (STATUS_PRIORITIES[status] >= STATUS_PRIORITIES[logger.getLevel()] && includes(sanitizedHandlerType, handlerType));\n}\n//# sourceMappingURL=loggerCollection.js.map","import { getSyntheticsResultId, getSyntheticsTestId, addTelemetryDebug, willSyntheticsInjectRum, ErrorSource, combine, createEventRateLimiter, getRelativeTime, isEmptyObject, } from '@datadog/browser-core';\nimport { STATUSES, HandlerType } from './logger';\nimport { isAuthorized } from './logger/loggerCollection';\nexport function startLogsAssembly(sessionManager, configuration, lifeCycle, buildCommonContext, mainLogger, // Todo: [RUMF-1230] Remove this parameter in the next major release\nreportError) {\n var statusWithCustom = STATUSES.concat(['custom']);\n var logRateLimiters = {};\n statusWithCustom.forEach(function (status) {\n logRateLimiters[status] = createEventRateLimiter(status, configuration.eventRateLimiterThreshold, reportError);\n });\n lifeCycle.subscribe(0 /* LifeCycleEventType.RAW_LOG_COLLECTED */, function (_a) {\n var _b, _c, _d;\n var rawLogsEvent = _a.rawLogsEvent, _e = _a.messageContext, messageContext = _e === void 0 ? undefined : _e, _f = _a.savedCommonContext, savedCommonContext = _f === void 0 ? undefined : _f, _g = _a.logger, logger = _g === void 0 ? mainLogger : _g;\n var startTime = getRelativeTime(rawLogsEvent.date);\n var session = sessionManager.findTrackedSession(startTime);\n if (!session) {\n return;\n }\n var commonContext = savedCommonContext || buildCommonContext();\n var log = combine({\n service: configuration.service,\n session_id: session.id,\n // Insert user first to allow overrides from global context\n usr: !isEmptyObject(commonContext.user) ? commonContext.user : undefined,\n view: commonContext.view,\n }, commonContext.context, getRUMInternalContext(startTime), rawLogsEvent, logger.getContext(), messageContext);\n if (\n // Todo: [RUMF-1230] Move this check to the logger collection in the next major release\n !isAuthorized(rawLogsEvent.status, HandlerType.http, logger) ||\n ((_b = configuration.beforeSend) === null || _b === void 0 ? void 0 : _b.call(configuration, log)) === false ||\n (((_c = log.error) === null || _c === void 0 ? void 0 : _c.origin) !== ErrorSource.AGENT &&\n ((_d = logRateLimiters[log.status]) !== null && _d !== void 0 ? _d : logRateLimiters['custom']).isLimitReached())) {\n return;\n }\n lifeCycle.notify(1 /* LifeCycleEventType.LOG_COLLECTED */, log);\n });\n}\nvar logsSentBeforeRumInjectionTelemetryAdded = false;\nexport function getRUMInternalContext(startTime) {\n var browserWindow = window;\n if (willSyntheticsInjectRum()) {\n var context = getInternalContextFromRumGlobal(browserWindow.DD_RUM_SYNTHETICS);\n if (!context && !logsSentBeforeRumInjectionTelemetryAdded) {\n logsSentBeforeRumInjectionTelemetryAdded = true;\n addTelemetryDebug('Logs sent before RUM is injected by the synthetics worker', {\n testId: getSyntheticsTestId(),\n resultId: getSyntheticsResultId(),\n });\n }\n return context;\n }\n return getInternalContextFromRumGlobal(browserWindow.DD_RUM);\n function getInternalContextFromRumGlobal(rumGlobal) {\n if (rumGlobal && rumGlobal.getInternalContext) {\n return rumGlobal.getInternalContext(startTime);\n }\n }\n}\nexport function resetRUMInternalContext() {\n logsSentBeforeRumInjectionTelemetryAdded = false;\n}\n//# sourceMappingURL=assembly.js.map","import { computeStackTrace } from '../tracekit';\nimport { createHandlingStack, formatErrorMessage, toStackTraceString, tryToGetFingerprint } from '../error/error';\nimport { mergeObservables, Observable } from '../../tools/observable';\nimport { ConsoleApiName, globalConsole } from '../../tools/display';\nimport { callMonitored } from '../../tools/monitor';\nimport { sanitize } from '../../tools/serialisation/sanitize';\nimport { find } from '../../tools/utils/polyfills';\nimport { jsonStringify } from '../../tools/serialisation/jsonStringify';\nvar consoleObservablesByApi = {};\nexport function initConsoleObservable(apis) {\n var consoleObservables = apis.map(function (api) {\n if (!consoleObservablesByApi[api]) {\n consoleObservablesByApi[api] = createConsoleObservable(api);\n }\n return consoleObservablesByApi[api];\n });\n return mergeObservables.apply(void 0, consoleObservables);\n}\nexport function resetConsoleObservable() {\n consoleObservablesByApi = {};\n}\nfunction createConsoleObservable(api) {\n var observable = new Observable(function () {\n var originalConsoleApi = globalConsole[api];\n globalConsole[api] = function () {\n var params = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n params[_i] = arguments[_i];\n }\n originalConsoleApi.apply(console, params);\n var handlingStack = createHandlingStack();\n callMonitored(function () {\n observable.notify(buildConsoleLog(params, api, handlingStack));\n });\n };\n return function () {\n globalConsole[api] = originalConsoleApi;\n };\n });\n return observable;\n}\nfunction buildConsoleLog(params, api, handlingStack) {\n // Todo: remove console error prefix in the next major version\n var message = params.map(function (param) { return formatConsoleParameters(param); }).join(' ');\n var stack;\n var fingerprint;\n if (api === ConsoleApiName.error) {\n var firstErrorParam = find(params, function (param) { return param instanceof Error; });\n stack = firstErrorParam ? toStackTraceString(computeStackTrace(firstErrorParam)) : undefined;\n fingerprint = tryToGetFingerprint(firstErrorParam);\n message = \"console error: \".concat(message);\n }\n return {\n api: api,\n message: message,\n stack: stack,\n handlingStack: handlingStack,\n fingerprint: fingerprint,\n };\n}\nfunction formatConsoleParameters(param) {\n if (typeof param === 'string') {\n return sanitize(param);\n }\n if (param instanceof Error) {\n return formatErrorMessage(computeStackTrace(param));\n }\n return jsonStringify(sanitize(param), undefined, 2);\n}\n//# sourceMappingURL=consoleObservable.js.map","var _a;\nimport { timeStampNow, ConsoleApiName, ErrorSource, initConsoleObservable } from '@datadog/browser-core';\nimport { StatusType } from '../logger';\nvar LogStatusForApi = (_a = {},\n _a[ConsoleApiName.log] = StatusType.info,\n _a[ConsoleApiName.debug] = StatusType.debug,\n _a[ConsoleApiName.info] = StatusType.info,\n _a[ConsoleApiName.warn] = StatusType.warn,\n _a[ConsoleApiName.error] = StatusType.error,\n _a);\nexport function startConsoleCollection(configuration, lifeCycle) {\n var consoleSubscription = initConsoleObservable(configuration.forwardConsoleLogs).subscribe(function (log) {\n lifeCycle.notify(0 /* LifeCycleEventType.RAW_LOG_COLLECTED */, {\n rawLogsEvent: {\n date: timeStampNow(),\n message: log.message,\n origin: ErrorSource.CONSOLE,\n error: log.api === ConsoleApiName.error\n ? {\n origin: ErrorSource.CONSOLE,\n stack: log.stack,\n fingerprint: log.fingerprint,\n }\n : undefined,\n status: LogStatusForApi[log.api],\n },\n });\n });\n return {\n stop: function () {\n consoleSubscription.unsubscribe();\n },\n };\n}\n//# sourceMappingURL=consoleCollection.js.map","var _a;\nimport { timeStampNow, ErrorSource, RawReportType, getFileFromStackTraceString, initReportObservable, } from '@datadog/browser-core';\nimport { StatusType } from '../logger';\nvar LogStatusForReport = (_a = {},\n _a[RawReportType.cspViolation] = StatusType.error,\n _a[RawReportType.intervention] = StatusType.error,\n _a[RawReportType.deprecation] = StatusType.warn,\n _a);\nexport function startReportCollection(configuration, lifeCycle) {\n var reportSubscription = initReportObservable(configuration, configuration.forwardReports).subscribe(function (report) {\n var message = report.message;\n var status = LogStatusForReport[report.type];\n var error;\n if (status === StatusType.error) {\n error = {\n kind: report.subtype,\n origin: ErrorSource.REPORT,\n stack: report.stack,\n };\n }\n else if (report.stack) {\n message += \" Found in \".concat(getFileFromStackTraceString(report.stack));\n }\n lifeCycle.notify(0 /* LifeCycleEventType.RAW_LOG_COLLECTED */, {\n rawLogsEvent: {\n date: timeStampNow(),\n message: message,\n origin: ErrorSource.REPORT,\n error: error,\n status: status,\n },\n });\n });\n return {\n stop: function () {\n reportSubscription.unsubscribe();\n },\n };\n}\n//# sourceMappingURL=reportCollection.js.map","import { setTimeout } from './timer';\nimport { callMonitored } from './monitor';\nimport { noop } from './utils/functionUtils';\nexport function instrumentMethod(object, method, instrumentationFactory) {\n var original = object[method];\n var instrumentation = instrumentationFactory(original);\n var instrumentationWrapper = function () {\n if (typeof instrumentation !== 'function') {\n return undefined;\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return instrumentation.apply(this, arguments);\n };\n object[method] = instrumentationWrapper;\n return {\n stop: function () {\n if (object[method] === instrumentationWrapper) {\n object[method] = original;\n }\n else {\n instrumentation = original;\n }\n },\n };\n}\nexport function instrumentMethodAndCallOriginal(object, method, _a) {\n var before = _a.before, after = _a.after;\n return instrumentMethod(object, method, function (original) {\n return function () {\n var args = arguments;\n var result;\n if (before) {\n callMonitored(before, this, args);\n }\n if (typeof original === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n result = original.apply(this, args);\n }\n if (after) {\n callMonitored(after, this, args);\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return result;\n };\n });\n}\nexport function instrumentSetter(object, property, after) {\n var originalDescriptor = Object.getOwnPropertyDescriptor(object, property);\n if (!originalDescriptor || !originalDescriptor.set || !originalDescriptor.configurable) {\n return { stop: noop };\n }\n var instrumentation = function (thisObject, value) {\n // put hooked setter into event loop to avoid of set latency\n setTimeout(function () {\n after(thisObject, value);\n }, 0);\n };\n var instrumentationWrapper = function (value) {\n originalDescriptor.set.call(this, value);\n instrumentation(this, value);\n };\n Object.defineProperty(object, property, {\n set: instrumentationWrapper,\n });\n return {\n stop: function () {\n var _a;\n if (((_a = Object.getOwnPropertyDescriptor(object, property)) === null || _a === void 0 ? void 0 : _a.set) === instrumentationWrapper) {\n Object.defineProperty(object, property, originalDescriptor);\n }\n else {\n instrumentation = noop;\n }\n },\n };\n}\n//# sourceMappingURL=instrumentMethod.js.map","import { instrumentMethodAndCallOriginal } from '../tools/instrumentMethod';\nimport { Observable } from '../tools/observable';\nimport { elapsed, relativeNow, clocksNow, timeStampNow } from '../tools/utils/timeUtils';\nimport { normalizeUrl } from '../tools/utils/urlPolyfill';\nimport { shallowClone } from '../tools/utils/objectUtils';\nimport { addEventListener } from './addEventListener';\nvar xhrObservable;\nvar xhrContexts = new WeakMap();\nexport function initXhrObservable(configuration) {\n if (!xhrObservable) {\n xhrObservable = createXhrObservable(configuration);\n }\n return xhrObservable;\n}\nfunction createXhrObservable(configuration) {\n var observable = new Observable(function () {\n var stopInstrumentingStart = instrumentMethodAndCallOriginal(XMLHttpRequest.prototype, 'open', {\n before: openXhr,\n }).stop;\n var stopInstrumentingSend = instrumentMethodAndCallOriginal(XMLHttpRequest.prototype, 'send', {\n before: function () {\n sendXhr.call(this, configuration, observable);\n },\n }).stop;\n var stopInstrumentingAbort = instrumentMethodAndCallOriginal(XMLHttpRequest.prototype, 'abort', {\n before: abortXhr,\n }).stop;\n return function () {\n stopInstrumentingStart();\n stopInstrumentingSend();\n stopInstrumentingAbort();\n };\n });\n return observable;\n}\nfunction openXhr(method, url) {\n xhrContexts.set(this, {\n state: 'open',\n method: method,\n url: normalizeUrl(String(url)),\n });\n}\nfunction sendXhr(configuration, observable) {\n var _this = this;\n var context = xhrContexts.get(this);\n if (!context) {\n return;\n }\n var startContext = context;\n startContext.state = 'start';\n startContext.startTime = relativeNow();\n startContext.startClocks = clocksNow();\n startContext.isAborted = false;\n startContext.xhr = this;\n var hasBeenReported = false;\n var stopInstrumentingOnReadyStateChange = instrumentMethodAndCallOriginal(this, 'onreadystatechange', {\n before: function () {\n if (this.readyState === XMLHttpRequest.DONE) {\n // Try to report the XHR as soon as possible, because the XHR may be mutated by the\n // application during a future event. For example, Angular is calling .abort() on\n // completed requests during a onreadystatechange event, so the status becomes '0'\n // before the request is collected.\n onEnd();\n }\n },\n }).stop;\n var onEnd = function () {\n unsubscribeLoadEndListener();\n stopInstrumentingOnReadyStateChange();\n if (hasBeenReported) {\n return;\n }\n hasBeenReported = true;\n var completeContext = context;\n completeContext.state = 'complete';\n completeContext.duration = elapsed(startContext.startClocks.timeStamp, timeStampNow());\n completeContext.status = _this.status;\n observable.notify(shallowClone(completeContext));\n };\n var unsubscribeLoadEndListener = addEventListener(configuration, this, 'loadend', onEnd).stop;\n observable.notify(startContext);\n}\nfunction abortXhr() {\n var context = xhrContexts.get(this);\n if (context) {\n context.isAborted = true;\n }\n}\n//# sourceMappingURL=xhrObservable.js.map","import { instrumentMethod } from '../tools/instrumentMethod';\nimport { callMonitored, monitor } from '../tools/monitor';\nimport { Observable } from '../tools/observable';\nimport { clocksNow } from '../tools/utils/timeUtils';\nimport { normalizeUrl } from '../tools/utils/urlPolyfill';\nvar fetchObservable;\nexport function initFetchObservable() {\n if (!fetchObservable) {\n fetchObservable = createFetchObservable();\n }\n return fetchObservable;\n}\nfunction createFetchObservable() {\n var observable = new Observable(function () {\n if (!window.fetch) {\n return;\n }\n var stop = instrumentMethod(window, 'fetch', function (originalFetch) {\n return function (input, init) {\n var responsePromise;\n var context = callMonitored(beforeSend, null, [observable, input, init]);\n if (context) {\n responsePromise = originalFetch.call(this, context.input, context.init);\n callMonitored(afterSend, null, [observable, responsePromise, context]);\n }\n else {\n responsePromise = originalFetch.call(this, input, init);\n }\n return responsePromise;\n };\n }).stop;\n return stop;\n });\n return observable;\n}\nfunction beforeSend(observable, input, init) {\n var method = (init && init.method) || (input instanceof Request && input.method) || 'GET';\n var url = input instanceof Request ? input.url : normalizeUrl(String(input));\n var startClocks = clocksNow();\n var context = {\n state: 'start',\n init: init,\n input: input,\n method: method,\n startClocks: startClocks,\n url: url,\n };\n observable.notify(context);\n return context;\n}\nfunction afterSend(observable, responsePromise, startContext) {\n var reportFetch = function (response) {\n var context = startContext;\n context.state = 'resolve';\n if ('stack' in response || response instanceof Error) {\n context.status = 0;\n context.isAborted = response instanceof DOMException && response.code === DOMException.ABORT_ERR;\n context.error = response;\n }\n else if ('status' in response) {\n context.response = response;\n context.responseType = response.type;\n context.status = response.status;\n context.isAborted = false;\n }\n observable.notify(context);\n };\n responsePromise.then(monitor(reportFetch), monitor(reportFetch));\n}\n//# sourceMappingURL=fetchObservable.js.map","import { monitor } from './monitor';\nimport { noop } from './utils/functionUtils';\n/**\n * Read bytes from a ReadableStream until at least `limit` bytes have been read (or until the end of\n * the stream). The callback is invoked with the at most `limit` bytes, and indicates that the limit\n * has been exceeded if more bytes were available.\n */\nexport function readBytesFromStream(stream, callback, options) {\n var reader = stream.getReader();\n var chunks = [];\n var readBytesCount = 0;\n readMore();\n function readMore() {\n reader.read().then(monitor(function (result) {\n if (result.done) {\n onDone();\n return;\n }\n if (options.collectStreamBody) {\n chunks.push(result.value);\n }\n readBytesCount += result.value.length;\n if (readBytesCount > options.bytesLimit) {\n onDone();\n }\n else {\n readMore();\n }\n }), monitor(function (error) { return callback(error); }));\n }\n function onDone() {\n reader.cancel().catch(\n // we don't care if cancel fails, but we still need to catch the error to avoid reporting it\n // as an unhandled rejection\n noop);\n var bytes;\n var limitExceeded;\n if (options.collectStreamBody) {\n var completeBuffer_1;\n if (chunks.length === 1) {\n // optimization: if the response is small enough to fit in a single buffer (provided by the browser), just\n // use it directly.\n completeBuffer_1 = chunks[0];\n }\n else {\n // else, we need to copy buffers into a larger buffer to concatenate them.\n completeBuffer_1 = new Uint8Array(readBytesCount);\n var offset_1 = 0;\n chunks.forEach(function (chunk) {\n completeBuffer_1.set(chunk, offset_1);\n offset_1 += chunk.length;\n });\n }\n bytes = completeBuffer_1.slice(0, options.bytesLimit);\n limitExceeded = completeBuffer_1.length > options.bytesLimit;\n }\n callback(undefined, bytes, limitExceeded);\n }\n}\n//# sourceMappingURL=readBytesFromStream.js.map","import { ErrorSource, initXhrObservable, initFetchObservable, computeStackTrace, toStackTraceString, monitor, noop, readBytesFromStream, tryToClone, isServerError, } from '@datadog/browser-core';\nimport { StatusType } from '../logger';\nexport function startNetworkErrorCollection(configuration, lifeCycle) {\n if (!configuration.forwardErrorsToLogs) {\n return { stop: noop };\n }\n var xhrSubscription = initXhrObservable(configuration).subscribe(function (context) {\n if (context.state === 'complete') {\n handleResponse(\"xhr\" /* RequestType.XHR */, context);\n }\n });\n var fetchSubscription = initFetchObservable().subscribe(function (context) {\n if (context.state === 'resolve') {\n handleResponse(\"fetch\" /* RequestType.FETCH */, context);\n }\n });\n function handleResponse(type, request) {\n if (!configuration.isIntakeUrl(request.url) && (isRejected(request) || isServerError(request.status))) {\n if ('xhr' in request) {\n computeXhrResponseData(request.xhr, configuration, onResponseDataAvailable);\n }\n else if (request.response) {\n computeFetchResponseText(request.response, configuration, onResponseDataAvailable);\n }\n else if (request.error) {\n computeFetchErrorText(request.error, configuration, onResponseDataAvailable);\n }\n }\n function onResponseDataAvailable(responseData) {\n lifeCycle.notify(0 /* LifeCycleEventType.RAW_LOG_COLLECTED */, {\n rawLogsEvent: {\n message: \"\".concat(format(type), \" error \").concat(request.method, \" \").concat(request.url),\n date: request.startClocks.timeStamp,\n error: {\n origin: ErrorSource.NETWORK,\n stack: responseData || 'Failed to load',\n },\n http: {\n method: request.method,\n status_code: request.status,\n url: request.url,\n },\n status: StatusType.error,\n origin: ErrorSource.NETWORK,\n },\n });\n }\n }\n return {\n stop: function () {\n xhrSubscription.unsubscribe();\n fetchSubscription.unsubscribe();\n },\n };\n}\n// TODO: ideally, computeXhrResponseData should always call the callback with a string instead of\n// `unknown`. But to keep backward compatibility, in the case of XHR with a `responseType` different\n// than \"text\", the response data should be whatever `xhr.response` is. This is a bit confusing as\n// Logs event 'stack' is expected to be a string. This should be changed in a future major version\n// as it could be a breaking change.\nexport function computeXhrResponseData(xhr, configuration, callback) {\n if (typeof xhr.response === 'string') {\n callback(truncateResponseText(xhr.response, configuration));\n }\n else {\n callback(xhr.response);\n }\n}\nexport function computeFetchErrorText(error, configuration, callback) {\n callback(truncateResponseText(toStackTraceString(computeStackTrace(error)), configuration));\n}\nexport function computeFetchResponseText(response, configuration, callback) {\n var clonedResponse = tryToClone(response);\n if (!clonedResponse || !clonedResponse.body) {\n // if the clone failed or if the body is null, let's not try to read it.\n callback();\n }\n else if (!window.TextDecoder) {\n // If the browser doesn't support TextDecoder, let's read the whole response then truncate it.\n //\n // This should only be the case on early versions of Edge (before they migrated to Chromium).\n // Even if it could be possible to implement a workaround for the missing TextDecoder API (using\n // a Blob and FileReader), we found another issue preventing us from reading only the first\n // bytes from the response: contrary to other browsers, when reading from the cloned response,\n // if the original response gets canceled, the cloned response is also canceled and we can't\n // know about it. In the following illustration, the promise returned by `reader.read()` may\n // never be fulfilled:\n //\n // fetch('/').then((response) => {\n // const reader = response.clone().body.getReader()\n // readMore()\n // function readMore() {\n // reader.read().then(\n // (result) => {\n // if (result.done) {\n // console.log('done')\n // } else {\n // readMore()\n // }\n // },\n // () => console.log('error')\n // )\n // }\n // response.body.getReader().cancel()\n // })\n clonedResponse.text().then(monitor(function (text) { return callback(truncateResponseText(text, configuration)); }), monitor(function (error) { return callback(\"Unable to retrieve response: \".concat(error)); }));\n }\n else {\n truncateResponseStream(clonedResponse.body, configuration.requestErrorResponseLengthLimit, function (error, responseText) {\n if (error) {\n callback(\"Unable to retrieve response: \".concat(error));\n }\n else {\n callback(responseText);\n }\n });\n }\n}\nfunction isRejected(request) {\n return request.status === 0 && request.responseType !== 'opaque';\n}\nfunction truncateResponseText(responseText, configuration) {\n if (responseText.length > configuration.requestErrorResponseLengthLimit) {\n return \"\".concat(responseText.substring(0, configuration.requestErrorResponseLengthLimit), \"...\");\n }\n return responseText;\n}\nfunction format(type) {\n if (\"xhr\" /* RequestType.XHR */ === type) {\n return 'XHR';\n }\n return 'Fetch';\n}\nfunction truncateResponseStream(stream, bytesLimit, callback) {\n readBytesFromStream(stream, function (error, bytes, limitExceeded) {\n if (error) {\n callback(error);\n }\n else {\n var responseText = new TextDecoder().decode(bytes);\n if (limitExceeded) {\n responseText += '...';\n }\n callback(undefined, responseText);\n }\n }, {\n bytesLimit: bytesLimit,\n collectStreamBody: true,\n });\n}\n//# sourceMappingURL=networkErrorCollection.js.map","import { instrumentMethodAndCallOriginal } from '../../tools/instrumentMethod';\nimport { computeStackTrace } from './computeStackTrace';\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types\nvar ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\\s\\S]*)$/;\n/**\n * Cross-browser collection of unhandled errors\n *\n * Supports:\n * - Firefox: full stack trace with line numbers, plus column number\n * on top frame; column number is not guaranteed\n * - Opera: full stack trace with line and column numbers\n * - Chrome: full stack trace with line and column numbers\n * - Safari: line and column number for the top frame only; some frames\n * may be missing, and column number is not guaranteed\n * - IE: line and column number for the top frame only; some frames\n * may be missing, and column number is not guaranteed\n *\n * In theory, TraceKit should work on all of the following versions:\n * - IE5.5+ (only 8.0 tested)\n * - Firefox 0.9+ (only 3.5+ tested)\n * - Opera 7+ (only 10.50 tested; versions 9 and earlier may require\n * Exceptions Have Stacktrace to be enabled in opera:config)\n * - Safari 3+ (only 4+ tested)\n * - Chrome 1+ (only 5+ tested)\n * - Konqueror 3.5+ (untested)\n *\n * Tries to catch all unhandled errors and report them to the\n * callback.\n *\n * Callbacks receive a StackTrace object as described in the\n * computeStackTrace docs.\n *\n * @memberof TraceKit\n * @namespace\n */\nexport function startUnhandledErrorCollection(callback) {\n var stopInstrumentingOnError = instrumentOnError(callback).stop;\n var stopInstrumentingOnUnhandledRejection = instrumentUnhandledRejection(callback).stop;\n return {\n stop: function () {\n stopInstrumentingOnError();\n stopInstrumentingOnUnhandledRejection();\n },\n };\n}\n/**\n * Install a global onerror handler\n */\nfunction instrumentOnError(callback) {\n return instrumentMethodAndCallOriginal(window, 'onerror', {\n before: function (messageObj, url, line, column, errorObj) {\n var stackTrace;\n if (errorObj instanceof Error) {\n stackTrace = computeStackTrace(errorObj);\n }\n else {\n var stack = [{ url: url, column: column, line: line }];\n var _a = tryToParseMessage(messageObj), name_1 = _a.name, message = _a.message;\n stackTrace = {\n name: name_1,\n message: message,\n stack: stack,\n };\n }\n callback(stackTrace, errorObj !== null && errorObj !== void 0 ? errorObj : messageObj);\n },\n });\n}\nfunction tryToParseMessage(messageObj) {\n var _a;\n var name;\n var message;\n if ({}.toString.call(messageObj) === '[object String]') {\n ;\n _a = ERROR_TYPES_RE.exec(messageObj), name = _a[1], message = _a[2];\n }\n return { name: name, message: message };\n}\n/**\n * Install a global onunhandledrejection handler\n */\nfunction instrumentUnhandledRejection(callback) {\n return instrumentMethodAndCallOriginal(window, 'onunhandledrejection', {\n before: function (e) {\n var reason = e.reason || 'Empty reason';\n var stack = computeStackTrace(reason);\n callback(stack, reason);\n },\n });\n}\n//# sourceMappingURL=tracekit.js.map","import { clocksNow } from '../../tools/utils/timeUtils';\nimport { startUnhandledErrorCollection } from '../tracekit';\nimport { computeRawError } from './error';\nimport { ErrorSource } from './error.types';\nexport function trackRuntimeError(errorObservable) {\n return startUnhandledErrorCollection(function (stackTrace, originalError) {\n errorObservable.notify(computeRawError({\n stackTrace: stackTrace,\n originalError: originalError,\n startClocks: clocksNow(),\n nonErrorPrefix: \"Uncaught\" /* NonErrorPrefix.UNCAUGHT */,\n source: ErrorSource.SOURCE,\n handling: \"unhandled\" /* ErrorHandling.UNHANDLED */,\n }));\n });\n}\n//# sourceMappingURL=trackRuntimeError.js.map","import { noop, ErrorSource, trackRuntimeError, Observable } from '@datadog/browser-core';\nimport { StatusType } from '../logger';\nexport function startRuntimeErrorCollection(configuration, lifeCycle) {\n if (!configuration.forwardErrorsToLogs) {\n return { stop: noop };\n }\n var rawErrorObservable = new Observable();\n var stopRuntimeErrorTracking = trackRuntimeError(rawErrorObservable).stop;\n var rawErrorSubscription = rawErrorObservable.subscribe(function (rawError) {\n lifeCycle.notify(0 /* LifeCycleEventType.RAW_LOG_COLLECTED */, {\n rawLogsEvent: {\n message: rawError.message,\n date: rawError.startClocks.timeStamp,\n error: {\n kind: rawError.type,\n origin: ErrorSource.SOURCE,\n stack: rawError.stack,\n },\n origin: ErrorSource.SOURCE,\n status: StatusType.error,\n },\n });\n });\n return {\n stop: function () {\n stopRuntimeErrorTracking();\n rawErrorSubscription.unsubscribe();\n },\n };\n}\n//# sourceMappingURL=runtimeErrorCollection.js.map","var AbstractLifeCycle = /** @class */ (function () {\n function AbstractLifeCycle() {\n this.callbacks = {};\n }\n AbstractLifeCycle.prototype.notify = function (eventType, data) {\n var eventCallbacks = this.callbacks[eventType];\n if (eventCallbacks) {\n eventCallbacks.forEach(function (callback) { return callback(data); });\n }\n };\n AbstractLifeCycle.prototype.subscribe = function (eventType, callback) {\n var _this = this;\n if (!this.callbacks[eventType]) {\n this.callbacks[eventType] = [];\n }\n this.callbacks[eventType].push(callback);\n return {\n unsubscribe: function () {\n _this.callbacks[eventType] = _this.callbacks[eventType].filter(function (other) { return callback !== other; });\n },\n };\n };\n return AbstractLifeCycle;\n}());\nexport { AbstractLifeCycle };\n//# sourceMappingURL=abstractLifeCycle.js.map","import { AbstractLifeCycle } from '@datadog/browser-core';\nexport var LifeCycle = (AbstractLifeCycle);\n//# sourceMappingURL=lifeCycle.js.map","import { startBatchWithReplica } from '@datadog/browser-core';\nexport function startLogsBatch(configuration, lifeCycle, reportError, pageExitObservable, sessionExpireObservable) {\n var batch = startBatchWithReplica(configuration, {\n endpoint: configuration.logsEndpointBuilder,\n }, configuration.replica && {\n endpoint: configuration.replica.logsEndpointBuilder,\n }, reportError, pageExitObservable, sessionExpireObservable);\n lifeCycle.subscribe(1 /* LifeCycleEventType.LOG_COLLECTED */, function (serverLogsEvent) {\n batch.add(serverLogsEvent);\n });\n return batch;\n}\n//# sourceMappingURL=startLogsBatch.js.map","import { getEventBridge } from '@datadog/browser-core';\nexport function startLogsBridge(lifeCycle) {\n var bridge = getEventBridge();\n lifeCycle.subscribe(1 /* LifeCycleEventType.LOG_COLLECTED */, function (serverLogsEvent) {\n bridge.send('log', serverLogsEvent);\n });\n}\n//# sourceMappingURL=startLogsBridge.js.map","export function startInternalContext(sessionManager) {\n return {\n get: function (startTime) {\n var trackedSession = sessionManager.findTrackedSession(startTime);\n if (trackedSession) {\n return {\n session_id: trackedSession.id,\n };\n }\n },\n };\n}\n//# sourceMappingURL=internalContext.js.map","import { sendToExtension, createPageExitObservable, willSyntheticsInjectRum, canUseEventBridge, getEventBridge, startTelemetry, startBatchWithReplica, isTelemetryReplicationAllowed, ErrorSource, addTelemetryConfiguration, addTelemetryDebug, } from '@datadog/browser-core';\nimport { startLogsSessionManager, startLogsSessionManagerStub } from '../domain/logsSessionManager';\nimport { serializeLogsConfiguration } from '../domain/configuration';\nimport { startLogsAssembly, getRUMInternalContext } from '../domain/assembly';\nimport { startConsoleCollection } from '../domain/console/consoleCollection';\nimport { startReportCollection } from '../domain/report/reportCollection';\nimport { startNetworkErrorCollection } from '../domain/networkError/networkErrorCollection';\nimport { startRuntimeErrorCollection } from '../domain/runtimeError/runtimeErrorCollection';\nimport { LifeCycle } from '../domain/lifeCycle';\nimport { startLoggerCollection } from '../domain/logger/loggerCollection';\nimport { startLogsBatch } from '../transport/startLogsBatch';\nimport { startLogsBridge } from '../transport/startLogsBridge';\nimport { StatusType } from '../domain/logger';\nimport { startInternalContext } from '../domain/internalContext';\nexport function startLogs(initConfiguration, configuration, buildCommonContext, mainLogger) {\n var lifeCycle = new LifeCycle();\n var cleanupTasks = [];\n lifeCycle.subscribe(1 /* LifeCycleEventType.LOG_COLLECTED */, function (log) { return sendToExtension('logs', log); });\n var reportError = function (error) {\n lifeCycle.notify(0 /* LifeCycleEventType.RAW_LOG_COLLECTED */, {\n rawLogsEvent: {\n message: error.message,\n date: error.startClocks.timeStamp,\n error: {\n origin: ErrorSource.AGENT, // Todo: Remove in the next major release\n },\n origin: ErrorSource.AGENT,\n status: StatusType.error,\n },\n });\n addTelemetryDebug('Error reported to customer', { 'error.message': error.message });\n };\n var pageExitObservable = createPageExitObservable(configuration);\n var session = configuration.sessionStoreStrategyType && !canUseEventBridge() && !willSyntheticsInjectRum()\n ? startLogsSessionManager(configuration)\n : startLogsSessionManagerStub(configuration);\n var _a = startLogsTelemetry(configuration, reportError, pageExitObservable, session.expireObservable), telemetry = _a.telemetry, stopLogsTelemetry = _a.stop;\n cleanupTasks.push(function () { return stopLogsTelemetry(); });\n telemetry.setContextProvider(function () {\n var _a, _b, _c, _d, _e, _f;\n return ({\n application: {\n id: (_a = getRUMInternalContext()) === null || _a === void 0 ? void 0 : _a.application_id,\n },\n session: {\n id: (_b = session.findTrackedSession()) === null || _b === void 0 ? void 0 : _b.id,\n },\n view: {\n id: (_d = (_c = getRUMInternalContext()) === null || _c === void 0 ? void 0 : _c.view) === null || _d === void 0 ? void 0 : _d.id,\n },\n action: {\n id: (_f = (_e = getRUMInternalContext()) === null || _e === void 0 ? void 0 : _e.user_action) === null || _f === void 0 ? void 0 : _f.id,\n },\n });\n });\n startNetworkErrorCollection(configuration, lifeCycle);\n startRuntimeErrorCollection(configuration, lifeCycle);\n startConsoleCollection(configuration, lifeCycle);\n startReportCollection(configuration, lifeCycle);\n var handleLog = startLoggerCollection(lifeCycle).handleLog;\n startLogsAssembly(session, configuration, lifeCycle, buildCommonContext, mainLogger, reportError);\n if (!canUseEventBridge()) {\n var stopLogsBatch_1 = startLogsBatch(configuration, lifeCycle, reportError, pageExitObservable, session.expireObservable).stop;\n cleanupTasks.push(function () { return stopLogsBatch_1(); });\n }\n else {\n startLogsBridge(lifeCycle);\n }\n addTelemetryConfiguration(serializeLogsConfiguration(initConfiguration));\n var internalContext = startInternalContext(session);\n return {\n handleLog: handleLog,\n getInternalContext: internalContext.get,\n stop: function () {\n cleanupTasks.forEach(function (task) { return task(); });\n },\n };\n}\nfunction startLogsTelemetry(configuration, reportError, pageExitObservable, sessionExpireObservable) {\n var telemetry = startTelemetry(\"browser-logs-sdk\" /* TelemetryService.LOGS */, configuration);\n var cleanupTasks = [];\n if (canUseEventBridge()) {\n var bridge_1 = getEventBridge();\n var telemetrySubscription_1 = telemetry.observable.subscribe(function (event) { return bridge_1.send('internal_telemetry', event); });\n cleanupTasks.push(function () { return telemetrySubscription_1.unsubscribe(); });\n }\n else {\n var telemetryBatch_1 = startBatchWithReplica(configuration, {\n endpoint: configuration.rumEndpointBuilder,\n }, configuration.replica && {\n endpoint: configuration.replica.rumEndpointBuilder,\n }, reportError, pageExitObservable, sessionExpireObservable);\n cleanupTasks.push(function () { return telemetryBatch_1.stop(); });\n var telemetrySubscription_2 = telemetry.observable.subscribe(function (event) {\n return telemetryBatch_1.add(event, isTelemetryReplicationAllowed(configuration));\n });\n cleanupTasks.push(function () { return telemetrySubscription_2.unsubscribe(); });\n }\n return {\n telemetry: telemetry,\n stop: function () {\n cleanupTasks.forEach(function (task) { return task(); });\n },\n };\n}\n//# sourceMappingURL=startLogs.js.map","import { defineGlobal, getGlobalObject } from '@datadog/browser-core';\nimport { makeLogsPublicApi } from '../boot/logsPublicApi';\nimport { startLogs } from '../boot/startLogs';\nexport { Logger, StatusType, HandlerType } from '../domain/logger';\nexport var datadogLogs = makeLogsPublicApi(startLogs);\ndefineGlobal(getGlobalObject(), 'DD_LOGS', datadogLogs);\n//# sourceMappingURL=main.js.map","export function definitionsFromContext(context) {\n return context.keys()\n .map(function (key) { return definitionForModuleWithContextAndKey(context, key); })\n .filter(function (value) { return value; });\n}\nfunction definitionForModuleWithContextAndKey(context, key) {\n var identifier = identifierForContextKey(key);\n if (identifier) {\n return definitionForModuleAndIdentifier(context(key), identifier);\n }\n}\nfunction definitionForModuleAndIdentifier(module, identifier) {\n var controllerConstructor = module.default;\n if (typeof controllerConstructor == \"function\") {\n return { identifier: identifier, controllerConstructor: controllerConstructor };\n }\n}\nexport function identifierForContextKey(key) {\n var logicalName = (key.match(/^(?:\\.\\/)?(.+)(?:[_-]controller\\..+?)$/) || [])[1];\n if (logicalName) {\n return logicalName.replace(/_/g, \"-\").replace(/\\//g, \"--\");\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPQSxNQUFNLGlDQUFpQyxPQUEwQztJQUMvRSxPQUFPLE9BQU8sQ0FBQyxJQUFJLEVBQUU7U0FDbEIsR0FBRyxDQUFDLFVBQUEsR0FBRyxJQUFJLE9BQUEsb0NBQW9DLENBQUMsT0FBTyxFQUFFLEdBQUcsQ0FBQyxFQUFsRCxDQUFrRCxDQUFDO1NBQzlELE1BQU0sQ0FBQyxVQUFBLEtBQUssSUFBSSxPQUFBLEtBQUssRUFBTCxDQUFLLENBQWlCLENBQUE7QUFDM0MsQ0FBQztBQUVELDhDQUE4QyxPQUEwQyxFQUFFLEdBQVc7SUFDbkcsSUFBTSxVQUFVLEdBQUcsdUJBQXVCLENBQUMsR0FBRyxDQUFDLENBQUE7SUFDL0MsSUFBSSxVQUFVLEVBQUU7UUFDZCxPQUFPLGdDQUFnQyxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsRUFBRSxVQUFVLENBQUMsQ0FBQTtLQUNsRTtBQUNILENBQUM7QUFFRCwwQ0FBMEMsTUFBd0IsRUFBRSxVQUFrQjtJQUNwRixJQUFNLHFCQUFxQixHQUFHLE1BQU0sQ0FBQyxPQUFPLENBQUE7SUFDNUMsSUFBSSxPQUFPLHFCQUFxQixJQUFJLFVBQVUsRUFBRTtRQUM5QyxPQUFPLEVBQUUsVUFBVSxZQUFBLEVBQUUscUJBQXFCLHVCQUFBLEVBQUUsQ0FBQTtLQUM3QztBQUNILENBQUM7QUFFRCxNQUFNLGtDQUFrQyxHQUFXO0lBQ2pELElBQU0sV0FBVyxHQUFHLENBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyx3Q0FBd0MsQ0FBQyxJQUFJLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFBO0lBQ2xGLElBQUksV0FBVyxFQUFFO1FBQ2YsT0FBTyxXQUFXLENBQUMsT0FBTyxDQUFDLElBQUksRUFBRSxHQUFHLENBQUMsQ0FBQyxPQUFPLENBQUMsS0FBSyxFQUFFLElBQUksQ0FBQyxDQUFBO0tBQzNEO0FBQ0gsQ0FBQyJ9","(function(global, factory) {\n typeof exports === \"object\" && typeof module !== \"undefined\" ? factory(exports) : typeof define === \"function\" && define.amd ? define([ \"exports\" ], factory) : factory(global.ActiveStorage = {});\n})(this, function(exports) {\n \"use strict\";\n function createCommonjsModule(fn, module) {\n return module = {\n exports: {}\n }, fn(module, module.exports), module.exports;\n }\n var sparkMd5 = createCommonjsModule(function(module, exports) {\n (function(factory) {\n {\n module.exports = factory();\n }\n })(function(undefined) {\n var hex_chr = [ \"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\" ];\n function md5cycle(x, k) {\n var a = x[0], b = x[1], c = x[2], d = x[3];\n a += (b & c | ~b & d) + k[0] - 680876936 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[1] - 389564586 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[2] + 606105819 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[3] - 1044525330 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[4] - 176418897 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[5] + 1200080426 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[6] - 1473231341 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[7] - 45705983 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[8] + 1770035416 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[9] - 1958414417 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[10] - 42063 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[11] - 1990404162 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & c | ~b & d) + k[12] + 1804603682 | 0;\n a = (a << 7 | a >>> 25) + b | 0;\n d += (a & b | ~a & c) + k[13] - 40341101 | 0;\n d = (d << 12 | d >>> 20) + a | 0;\n c += (d & a | ~d & b) + k[14] - 1502002290 | 0;\n c = (c << 17 | c >>> 15) + d | 0;\n b += (c & d | ~c & a) + k[15] + 1236535329 | 0;\n b = (b << 22 | b >>> 10) + c | 0;\n a += (b & d | c & ~d) + k[1] - 165796510 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[6] - 1069501632 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[11] + 643717713 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[0] - 373897302 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[5] - 701558691 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[10] + 38016083 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[15] - 660478335 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[4] - 405537848 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[9] + 568446438 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[14] - 1019803690 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[3] - 187363961 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[8] + 1163531501 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b & d | c & ~d) + k[13] - 1444681467 | 0;\n a = (a << 5 | a >>> 27) + b | 0;\n d += (a & c | b & ~c) + k[2] - 51403784 | 0;\n d = (d << 9 | d >>> 23) + a | 0;\n c += (d & b | a & ~b) + k[7] + 1735328473 | 0;\n c = (c << 14 | c >>> 18) + d | 0;\n b += (c & a | d & ~a) + k[12] - 1926607734 | 0;\n b = (b << 20 | b >>> 12) + c | 0;\n a += (b ^ c ^ d) + k[5] - 378558 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[8] - 2022574463 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[11] + 1839030562 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[14] - 35309556 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[1] - 1530992060 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[4] + 1272893353 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[7] - 155497632 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[10] - 1094730640 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[13] + 681279174 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[0] - 358537222 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[3] - 722521979 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[6] + 76029189 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (b ^ c ^ d) + k[9] - 640364487 | 0;\n a = (a << 4 | a >>> 28) + b | 0;\n d += (a ^ b ^ c) + k[12] - 421815835 | 0;\n d = (d << 11 | d >>> 21) + a | 0;\n c += (d ^ a ^ b) + k[15] + 530742520 | 0;\n c = (c << 16 | c >>> 16) + d | 0;\n b += (c ^ d ^ a) + k[2] - 995338651 | 0;\n b = (b << 23 | b >>> 9) + c | 0;\n a += (c ^ (b | ~d)) + k[0] - 198630844 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[7] + 1126891415 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[14] - 1416354905 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[5] - 57434055 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[12] + 1700485571 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[3] - 1894986606 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[10] - 1051523 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[1] - 2054922799 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[8] + 1873313359 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[15] - 30611744 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[6] - 1560198380 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[13] + 1309151649 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n a += (c ^ (b | ~d)) + k[4] - 145523070 | 0;\n a = (a << 6 | a >>> 26) + b | 0;\n d += (b ^ (a | ~c)) + k[11] - 1120210379 | 0;\n d = (d << 10 | d >>> 22) + a | 0;\n c += (a ^ (d | ~b)) + k[2] + 718787259 | 0;\n c = (c << 15 | c >>> 17) + d | 0;\n b += (d ^ (c | ~a)) + k[9] - 343485551 | 0;\n b = (b << 21 | b >>> 11) + c | 0;\n x[0] = a + x[0] | 0;\n x[1] = b + x[1] | 0;\n x[2] = c + x[2] | 0;\n x[3] = d + x[3] | 0;\n }\n function md5blk(s) {\n var md5blks = [], i;\n for (i = 0; i < 64; i += 4) {\n md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);\n }\n return md5blks;\n }\n function md5blk_array(a) {\n var md5blks = [], i;\n for (i = 0; i < 64; i += 4) {\n md5blks[i >> 2] = a[i] + (a[i + 1] << 8) + (a[i + 2] << 16) + (a[i + 3] << 24);\n }\n return md5blks;\n }\n function md51(s) {\n var n = s.length, state = [ 1732584193, -271733879, -1732584194, 271733878 ], i, length, tail, tmp, lo, hi;\n for (i = 64; i <= n; i += 64) {\n md5cycle(state, md5blk(s.substring(i - 64, i)));\n }\n s = s.substring(i - 64);\n length = s.length;\n tail = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];\n for (i = 0; i < length; i += 1) {\n tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);\n }\n tail[i >> 2] |= 128 << (i % 4 << 3);\n if (i > 55) {\n md5cycle(state, tail);\n for (i = 0; i < 16; i += 1) {\n tail[i] = 0;\n }\n }\n tmp = n * 8;\n tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n lo = parseInt(tmp[2], 16);\n hi = parseInt(tmp[1], 16) || 0;\n tail[14] = lo;\n tail[15] = hi;\n md5cycle(state, tail);\n return state;\n }\n function md51_array(a) {\n var n = a.length, state = [ 1732584193, -271733879, -1732584194, 271733878 ], i, length, tail, tmp, lo, hi;\n for (i = 64; i <= n; i += 64) {\n md5cycle(state, md5blk_array(a.subarray(i - 64, i)));\n }\n a = i - 64 < n ? a.subarray(i - 64) : new Uint8Array(0);\n length = a.length;\n tail = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];\n for (i = 0; i < length; i += 1) {\n tail[i >> 2] |= a[i] << (i % 4 << 3);\n }\n tail[i >> 2] |= 128 << (i % 4 << 3);\n if (i > 55) {\n md5cycle(state, tail);\n for (i = 0; i < 16; i += 1) {\n tail[i] = 0;\n }\n }\n tmp = n * 8;\n tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n lo = parseInt(tmp[2], 16);\n hi = parseInt(tmp[1], 16) || 0;\n tail[14] = lo;\n tail[15] = hi;\n md5cycle(state, tail);\n return state;\n }\n function rhex(n) {\n var s = \"\", j;\n for (j = 0; j < 4; j += 1) {\n s += hex_chr[n >> j * 8 + 4 & 15] + hex_chr[n >> j * 8 & 15];\n }\n return s;\n }\n function hex(x) {\n var i;\n for (i = 0; i < x.length; i += 1) {\n x[i] = rhex(x[i]);\n }\n return x.join(\"\");\n }\n if (hex(md51(\"hello\")) !== \"5d41402abc4b2a76b9719d911017c592\") ;\n if (typeof ArrayBuffer !== \"undefined\" && !ArrayBuffer.prototype.slice) {\n (function() {\n function clamp(val, length) {\n val = val | 0 || 0;\n if (val < 0) {\n return Math.max(val + length, 0);\n }\n return Math.min(val, length);\n }\n ArrayBuffer.prototype.slice = function(from, to) {\n var length = this.byteLength, begin = clamp(from, length), end = length, num, target, targetArray, sourceArray;\n if (to !== undefined) {\n end = clamp(to, length);\n }\n if (begin > end) {\n return new ArrayBuffer(0);\n }\n num = end - begin;\n target = new ArrayBuffer(num);\n targetArray = new Uint8Array(target);\n sourceArray = new Uint8Array(this, begin, num);\n targetArray.set(sourceArray);\n return target;\n };\n })();\n }\n function toUtf8(str) {\n if (/[\\u0080-\\uFFFF]/.test(str)) {\n str = unescape(encodeURIComponent(str));\n }\n return str;\n }\n function utf8Str2ArrayBuffer(str, returnUInt8Array) {\n var length = str.length, buff = new ArrayBuffer(length), arr = new Uint8Array(buff), i;\n for (i = 0; i < length; i += 1) {\n arr[i] = str.charCodeAt(i);\n }\n return returnUInt8Array ? arr : buff;\n }\n function arrayBuffer2Utf8Str(buff) {\n return String.fromCharCode.apply(null, new Uint8Array(buff));\n }\n function concatenateArrayBuffers(first, second, returnUInt8Array) {\n var result = new Uint8Array(first.byteLength + second.byteLength);\n result.set(new Uint8Array(first));\n result.set(new Uint8Array(second), first.byteLength);\n return returnUInt8Array ? result : result.buffer;\n }\n function hexToBinaryString(hex) {\n var bytes = [], length = hex.length, x;\n for (x = 0; x < length - 1; x += 2) {\n bytes.push(parseInt(hex.substr(x, 2), 16));\n }\n return String.fromCharCode.apply(String, bytes);\n }\n function SparkMD5() {\n this.reset();\n }\n SparkMD5.prototype.append = function(str) {\n this.appendBinary(toUtf8(str));\n return this;\n };\n SparkMD5.prototype.appendBinary = function(contents) {\n this._buff += contents;\n this._length += contents.length;\n var length = this._buff.length, i;\n for (i = 64; i <= length; i += 64) {\n md5cycle(this._hash, md5blk(this._buff.substring(i - 64, i)));\n }\n this._buff = this._buff.substring(i - 64);\n return this;\n };\n SparkMD5.prototype.end = function(raw) {\n var buff = this._buff, length = buff.length, i, tail = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], ret;\n for (i = 0; i < length; i += 1) {\n tail[i >> 2] |= buff.charCodeAt(i) << (i % 4 << 3);\n }\n this._finish(tail, length);\n ret = hex(this._hash);\n if (raw) {\n ret = hexToBinaryString(ret);\n }\n this.reset();\n return ret;\n };\n SparkMD5.prototype.reset = function() {\n this._buff = \"\";\n this._length = 0;\n this._hash = [ 1732584193, -271733879, -1732584194, 271733878 ];\n return this;\n };\n SparkMD5.prototype.getState = function() {\n return {\n buff: this._buff,\n length: this._length,\n hash: this._hash\n };\n };\n SparkMD5.prototype.setState = function(state) {\n this._buff = state.buff;\n this._length = state.length;\n this._hash = state.hash;\n return this;\n };\n SparkMD5.prototype.destroy = function() {\n delete this._hash;\n delete this._buff;\n delete this._length;\n };\n SparkMD5.prototype._finish = function(tail, length) {\n var i = length, tmp, lo, hi;\n tail[i >> 2] |= 128 << (i % 4 << 3);\n if (i > 55) {\n md5cycle(this._hash, tail);\n for (i = 0; i < 16; i += 1) {\n tail[i] = 0;\n }\n }\n tmp = this._length * 8;\n tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);\n lo = parseInt(tmp[2], 16);\n hi = parseInt(tmp[1], 16) || 0;\n tail[14] = lo;\n tail[15] = hi;\n md5cycle(this._hash, tail);\n };\n SparkMD5.hash = function(str, raw) {\n return SparkMD5.hashBinary(toUtf8(str), raw);\n };\n SparkMD5.hashBinary = function(content, raw) {\n var hash = md51(content), ret = hex(hash);\n return raw ? hexToBinaryString(ret) : ret;\n };\n SparkMD5.ArrayBuffer = function() {\n this.reset();\n };\n SparkMD5.ArrayBuffer.prototype.append = function(arr) {\n var buff = concatenateArrayBuffers(this._buff.buffer, arr, true), length = buff.length, i;\n this._length += arr.byteLength;\n for (i = 64; i <= length; i += 64) {\n md5cycle(this._hash, md5blk_array(buff.subarray(i - 64, i)));\n }\n this._buff = i - 64 < length ? new Uint8Array(buff.buffer.slice(i - 64)) : new Uint8Array(0);\n return this;\n };\n SparkMD5.ArrayBuffer.prototype.end = function(raw) {\n var buff = this._buff, length = buff.length, tail = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], i, ret;\n for (i = 0; i < length; i += 1) {\n tail[i >> 2] |= buff[i] << (i % 4 << 3);\n }\n this._finish(tail, length);\n ret = hex(this._hash);\n if (raw) {\n ret = hexToBinaryString(ret);\n }\n this.reset();\n return ret;\n };\n SparkMD5.ArrayBuffer.prototype.reset = function() {\n this._buff = new Uint8Array(0);\n this._length = 0;\n this._hash = [ 1732584193, -271733879, -1732584194, 271733878 ];\n return this;\n };\n SparkMD5.ArrayBuffer.prototype.getState = function() {\n var state = SparkMD5.prototype.getState.call(this);\n state.buff = arrayBuffer2Utf8Str(state.buff);\n return state;\n };\n SparkMD5.ArrayBuffer.prototype.setState = function(state) {\n state.buff = utf8Str2ArrayBuffer(state.buff, true);\n return SparkMD5.prototype.setState.call(this, state);\n };\n SparkMD5.ArrayBuffer.prototype.destroy = SparkMD5.prototype.destroy;\n SparkMD5.ArrayBuffer.prototype._finish = SparkMD5.prototype._finish;\n SparkMD5.ArrayBuffer.hash = function(arr, raw) {\n var hash = md51_array(new Uint8Array(arr)), ret = hex(hash);\n return raw ? hexToBinaryString(ret) : ret;\n };\n return SparkMD5;\n });\n });\n var classCallCheck = function(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n };\n var createClass = function() {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n return function(Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n }();\n var fileSlice = File.prototype.slice || File.prototype.mozSlice || File.prototype.webkitSlice;\n var FileChecksum = function() {\n createClass(FileChecksum, null, [ {\n key: \"create\",\n value: function create(file, callback) {\n var instance = new FileChecksum(file);\n instance.create(callback);\n }\n } ]);\n function FileChecksum(file) {\n classCallCheck(this, FileChecksum);\n this.file = file;\n this.chunkSize = 2097152;\n this.chunkCount = Math.ceil(this.file.size / this.chunkSize);\n this.chunkIndex = 0;\n }\n createClass(FileChecksum, [ {\n key: \"create\",\n value: function create(callback) {\n var _this = this;\n this.callback = callback;\n this.md5Buffer = new sparkMd5.ArrayBuffer();\n this.fileReader = new FileReader();\n this.fileReader.addEventListener(\"load\", function(event) {\n return _this.fileReaderDidLoad(event);\n });\n this.fileReader.addEventListener(\"error\", function(event) {\n return _this.fileReaderDidError(event);\n });\n this.readNextChunk();\n }\n }, {\n key: \"fileReaderDidLoad\",\n value: function fileReaderDidLoad(event) {\n this.md5Buffer.append(event.target.result);\n if (!this.readNextChunk()) {\n var binaryDigest = this.md5Buffer.end(true);\n var base64digest = btoa(binaryDigest);\n this.callback(null, base64digest);\n }\n }\n }, {\n key: \"fileReaderDidError\",\n value: function fileReaderDidError(event) {\n this.callback(\"Error reading \" + this.file.name);\n }\n }, {\n key: \"readNextChunk\",\n value: function readNextChunk() {\n if (this.chunkIndex < this.chunkCount || this.chunkIndex == 0 && this.chunkCount == 0) {\n var start = this.chunkIndex * this.chunkSize;\n var end = Math.min(start + this.chunkSize, this.file.size);\n var bytes = fileSlice.call(this.file, start, end);\n this.fileReader.readAsArrayBuffer(bytes);\n this.chunkIndex++;\n return true;\n } else {\n return false;\n }\n }\n } ]);\n return FileChecksum;\n }();\n function getMetaValue(name) {\n var element = findElement(document.head, 'meta[name=\"' + name + '\"]');\n if (element) {\n return element.getAttribute(\"content\");\n }\n }\n function findElements(root, selector) {\n if (typeof root == \"string\") {\n selector = root;\n root = document;\n }\n var elements = root.querySelectorAll(selector);\n return toArray$1(elements);\n }\n function findElement(root, selector) {\n if (typeof root == \"string\") {\n selector = root;\n root = document;\n }\n return root.querySelector(selector);\n }\n function dispatchEvent(element, type) {\n var eventInit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var disabled = element.disabled;\n var bubbles = eventInit.bubbles, cancelable = eventInit.cancelable, detail = eventInit.detail;\n var event = document.createEvent(\"Event\");\n event.initEvent(type, bubbles || true, cancelable || true);\n event.detail = detail || {};\n try {\n element.disabled = false;\n element.dispatchEvent(event);\n } finally {\n element.disabled = disabled;\n }\n return event;\n }\n function toArray$1(value) {\n if (Array.isArray(value)) {\n return value;\n } else if (Array.from) {\n return Array.from(value);\n } else {\n return [].slice.call(value);\n }\n }\n var BlobRecord = function() {\n function BlobRecord(file, checksum, url) {\n var _this = this;\n classCallCheck(this, BlobRecord);\n this.file = file;\n this.attributes = {\n filename: file.name,\n content_type: file.type,\n byte_size: file.size,\n checksum: checksum\n };\n this.xhr = new XMLHttpRequest();\n this.xhr.open(\"POST\", url, true);\n this.xhr.responseType = \"json\";\n this.xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n this.xhr.setRequestHeader(\"Accept\", \"application/json\");\n this.xhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\n this.xhr.setRequestHeader(\"X-CSRF-Token\", getMetaValue(\"csrf-token\"));\n this.xhr.addEventListener(\"load\", function(event) {\n return _this.requestDidLoad(event);\n });\n this.xhr.addEventListener(\"error\", function(event) {\n return _this.requestDidError(event);\n });\n }\n createClass(BlobRecord, [ {\n key: \"create\",\n value: function create(callback) {\n this.callback = callback;\n this.xhr.send(JSON.stringify({\n blob: this.attributes\n }));\n }\n }, {\n key: \"requestDidLoad\",\n value: function requestDidLoad(event) {\n if (this.status >= 200 && this.status < 300) {\n var response = this.response;\n var direct_upload = response.direct_upload;\n delete response.direct_upload;\n this.attributes = response;\n this.directUploadData = direct_upload;\n this.callback(null, this.toJSON());\n } else {\n this.requestDidError(event);\n }\n }\n }, {\n key: \"requestDidError\",\n value: function requestDidError(event) {\n this.callback('Error creating Blob for \"' + this.file.name + '\". Status: ' + this.status);\n }\n }, {\n key: \"toJSON\",\n value: function toJSON() {\n var result = {};\n for (var key in this.attributes) {\n result[key] = this.attributes[key];\n }\n return result;\n }\n }, {\n key: \"status\",\n get: function get$$1() {\n return this.xhr.status;\n }\n }, {\n key: \"response\",\n get: function get$$1() {\n var _xhr = this.xhr, responseType = _xhr.responseType, response = _xhr.response;\n if (responseType == \"json\") {\n return response;\n } else {\n return JSON.parse(response);\n }\n }\n } ]);\n return BlobRecord;\n }();\n var BlobUpload = function() {\n function BlobUpload(blob) {\n var _this = this;\n classCallCheck(this, BlobUpload);\n this.blob = blob;\n this.file = blob.file;\n var _blob$directUploadDat = blob.directUploadData, url = _blob$directUploadDat.url, headers = _blob$directUploadDat.headers;\n this.xhr = new XMLHttpRequest();\n this.xhr.open(\"PUT\", url, true);\n this.xhr.responseType = \"text\";\n for (var key in headers) {\n this.xhr.setRequestHeader(key, headers[key]);\n }\n this.xhr.addEventListener(\"load\", function(event) {\n return _this.requestDidLoad(event);\n });\n this.xhr.addEventListener(\"error\", function(event) {\n return _this.requestDidError(event);\n });\n }\n createClass(BlobUpload, [ {\n key: \"create\",\n value: function create(callback) {\n this.callback = callback;\n this.xhr.send(this.file.slice());\n }\n }, {\n key: \"requestDidLoad\",\n value: function requestDidLoad(event) {\n var _xhr = this.xhr, status = _xhr.status, response = _xhr.response;\n if (status >= 200 && status < 300) {\n this.callback(null, response);\n } else {\n this.requestDidError(event);\n }\n }\n }, {\n key: \"requestDidError\",\n value: function requestDidError(event) {\n this.callback('Error storing \"' + this.file.name + '\". Status: ' + this.xhr.status);\n }\n } ]);\n return BlobUpload;\n }();\n var id = 0;\n var DirectUpload = function() {\n function DirectUpload(file, url, delegate) {\n classCallCheck(this, DirectUpload);\n this.id = ++id;\n this.file = file;\n this.url = url;\n this.delegate = delegate;\n }\n createClass(DirectUpload, [ {\n key: \"create\",\n value: function create(callback) {\n var _this = this;\n FileChecksum.create(this.file, function(error, checksum) {\n if (error) {\n callback(error);\n return;\n }\n var blob = new BlobRecord(_this.file, checksum, _this.url);\n notify(_this.delegate, \"directUploadWillCreateBlobWithXHR\", blob.xhr);\n blob.create(function(error) {\n if (error) {\n callback(error);\n } else {\n var upload = new BlobUpload(blob);\n notify(_this.delegate, \"directUploadWillStoreFileWithXHR\", upload.xhr);\n upload.create(function(error) {\n if (error) {\n callback(error);\n } else {\n callback(null, blob.toJSON());\n }\n });\n }\n });\n });\n }\n } ]);\n return DirectUpload;\n }();\n function notify(object, methodName) {\n if (object && typeof object[methodName] == \"function\") {\n for (var _len = arguments.length, messages = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n messages[_key - 2] = arguments[_key];\n }\n return object[methodName].apply(object, messages);\n }\n }\n var DirectUploadController = function() {\n function DirectUploadController(input, file) {\n classCallCheck(this, DirectUploadController);\n this.input = input;\n this.file = file;\n this.directUpload = new DirectUpload(this.file, this.url, this);\n this.dispatch(\"initialize\");\n }\n createClass(DirectUploadController, [ {\n key: \"start\",\n value: function start(callback) {\n var _this = this;\n var hiddenInput = document.createElement(\"input\");\n hiddenInput.type = \"hidden\";\n hiddenInput.name = this.input.name;\n this.input.insertAdjacentElement(\"beforebegin\", hiddenInput);\n this.dispatch(\"start\");\n this.directUpload.create(function(error, attributes) {\n if (error) {\n hiddenInput.parentNode.removeChild(hiddenInput);\n _this.dispatchError(error);\n } else {\n hiddenInput.value = attributes.signed_id;\n }\n _this.dispatch(\"end\");\n callback(error);\n });\n }\n }, {\n key: \"uploadRequestDidProgress\",\n value: function uploadRequestDidProgress(event) {\n var progress = event.loaded / event.total * 100;\n if (progress) {\n this.dispatch(\"progress\", {\n progress: progress\n });\n }\n }\n }, {\n key: \"dispatch\",\n value: function dispatch(name) {\n var detail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n detail.file = this.file;\n detail.id = this.directUpload.id;\n return dispatchEvent(this.input, \"direct-upload:\" + name, {\n detail: detail\n });\n }\n }, {\n key: \"dispatchError\",\n value: function dispatchError(error) {\n var event = this.dispatch(\"error\", {\n error: error\n });\n if (!event.defaultPrevented) {\n alert(error);\n }\n }\n }, {\n key: \"directUploadWillCreateBlobWithXHR\",\n value: function directUploadWillCreateBlobWithXHR(xhr) {\n this.dispatch(\"before-blob-request\", {\n xhr: xhr\n });\n }\n }, {\n key: \"directUploadWillStoreFileWithXHR\",\n value: function directUploadWillStoreFileWithXHR(xhr) {\n var _this2 = this;\n this.dispatch(\"before-storage-request\", {\n xhr: xhr\n });\n xhr.upload.addEventListener(\"progress\", function(event) {\n return _this2.uploadRequestDidProgress(event);\n });\n }\n }, {\n key: \"url\",\n get: function get$$1() {\n return this.input.getAttribute(\"data-direct-upload-url\");\n }\n } ]);\n return DirectUploadController;\n }();\n var inputSelector = \"input[type=file][data-direct-upload-url]:not([disabled])\";\n var DirectUploadsController = function() {\n function DirectUploadsController(form) {\n classCallCheck(this, DirectUploadsController);\n this.form = form;\n this.inputs = findElements(form, inputSelector).filter(function(input) {\n return input.files.length;\n });\n }\n createClass(DirectUploadsController, [ {\n key: \"start\",\n value: function start(callback) {\n var _this = this;\n var controllers = this.createDirectUploadControllers();\n var startNextController = function startNextController() {\n var controller = controllers.shift();\n if (controller) {\n controller.start(function(error) {\n if (error) {\n callback(error);\n _this.dispatch(\"end\");\n } else {\n startNextController();\n }\n });\n } else {\n callback();\n _this.dispatch(\"end\");\n }\n };\n this.dispatch(\"start\");\n startNextController();\n }\n }, {\n key: \"createDirectUploadControllers\",\n value: function createDirectUploadControllers() {\n var controllers = [];\n this.inputs.forEach(function(input) {\n toArray$1(input.files).forEach(function(file) {\n var controller = new DirectUploadController(input, file);\n controllers.push(controller);\n });\n });\n return controllers;\n }\n }, {\n key: \"dispatch\",\n value: function dispatch(name) {\n var detail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return dispatchEvent(this.form, \"direct-uploads:\" + name, {\n detail: detail\n });\n }\n } ]);\n return DirectUploadsController;\n }();\n var processingAttribute = \"data-direct-uploads-processing\";\n var submitButtonsByForm = new WeakMap();\n var started = false;\n function start() {\n if (!started) {\n started = true;\n document.addEventListener(\"click\", didClick, true);\n document.addEventListener(\"submit\", didSubmitForm);\n document.addEventListener(\"ajax:before\", didSubmitRemoteElement);\n }\n }\n function didClick(event) {\n var target = event.target;\n if ((target.tagName == \"INPUT\" || target.tagName == \"BUTTON\") && target.type == \"submit\" && target.form) {\n submitButtonsByForm.set(target.form, target);\n }\n }\n function didSubmitForm(event) {\n handleFormSubmissionEvent(event);\n }\n function didSubmitRemoteElement(event) {\n if (event.target.tagName == \"FORM\") {\n handleFormSubmissionEvent(event);\n }\n }\n function handleFormSubmissionEvent(event) {\n var form = event.target;\n if (form.hasAttribute(processingAttribute)) {\n event.preventDefault();\n return;\n }\n var controller = new DirectUploadsController(form);\n var inputs = controller.inputs;\n if (inputs.length) {\n event.preventDefault();\n form.setAttribute(processingAttribute, \"\");\n inputs.forEach(disable);\n controller.start(function(error) {\n form.removeAttribute(processingAttribute);\n if (error) {\n inputs.forEach(enable);\n } else {\n submitForm(form);\n }\n });\n }\n }\n function submitForm(form) {\n var button = submitButtonsByForm.get(form) || findElement(form, \"input[type=submit], button[type=submit]\");\n if (button) {\n var _button = button, disabled = _button.disabled;\n button.disabled = false;\n button.focus();\n button.click();\n button.disabled = disabled;\n } else {\n button = document.createElement(\"input\");\n button.type = \"submit\";\n button.style.display = \"none\";\n form.appendChild(button);\n button.click();\n form.removeChild(button);\n }\n submitButtonsByForm.delete(form);\n }\n function disable(input) {\n input.disabled = true;\n }\n function enable(input) {\n input.disabled = false;\n }\n function autostart() {\n if (window.ActiveStorage) {\n start();\n }\n }\n setTimeout(autostart, 1);\n exports.start = start;\n exports.DirectUpload = DirectUpload;\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n});\n","window.ConfettiGenerator = function(params) {\r\n //////////////\r\n // Defaults\r\n var appstate = {\r\n target: 'confetti-holder', // Id of the canvas\r\n max: 80, // Max itens to render\r\n size: 1, // prop size\r\n animate: true, // Should aniamte?\r\n props: ['circle', 'square', 'triangle', 'line'], // Types of confetti\r\n colors: [[165,104,246],[230,61,135],[0,199,228],[253,214,126]], // Colors to render confetti\r\n clock: 25, // Speed of confetti fall\r\n interval: null, // Draw interval holder\r\n rotate: false, // Whenever to rotate a prop\r\n width: window.innerWidth, // canvas width (as int, in px)\r\n height: window.innerHeight // canvas height (as int, in px)\r\n };\r\n\r\n //////////////\r\n // Setting parameters if received\r\n if(params) {\r\n if(params.target)\r\n appstate.target = params.target;\r\n if(params.max)\r\n appstate.max = params.max;\r\n if(params.size)\r\n appstate.size = params.size;\r\n if(params.animate !== undefined && params.animate !== null)\r\n appstate.animate = params.animate;\r\n if(params.props)\r\n appstate.props = params.props;\r\n if(params.colors)\r\n appstate.colors = params.colors;\r\n if(params.clock)\r\n appstate.clock = params.clock;\r\n if(params.width)\r\n appstate.width = params.width;\r\n if(params.height)\r\n appstate.height = params.height;\r\n if(params.rotate !== undefined && params.rotate !== null)\r\n appstate.rotate = params.rotate;\r\n }\r\n\r\n //////////////\r\n // Properties\r\n var cv = document.getElementById(appstate.target);\r\n var ctx = cv.getContext(\"2d\");\r\n var particles = [];\r\n\r\n //////////////\r\n // Random helper (to minimize typing)\r\n function rand(limit, floor) {\r\n if(!limit) limit = 1;\r\n var rand = Math.random() * limit;\r\n return !floor ? rand : Math.floor(rand);\r\n }\r\n\r\n var totalWeight = appstate.props.reduce(function(weight, prop) {\r\n return weight + (prop.weight || 1);\r\n }, 0);\r\n function selectProp() {\r\n var rand = Math.random() * totalWeight;\r\n for (var i = 0; i < appstate.props.length; ++i) {\r\n var weight = appstate.props[i].weight || 1;\r\n if (rand < weight) return i;\r\n rand -= weight;\r\n }\r\n }\r\n\r\n //////////////\r\n // Confetti particle generator\r\n function particleFactory() {\r\n var prop = appstate.props[selectProp()];\r\n var p = {\r\n prop: prop.type ? prop.type : prop, //prop type\r\n x: rand(appstate.width), //x-coordinate\r\n y: rand(appstate.height), //y-coordinate\r\n src: prop.src,\r\n radius: rand(4) + 1, //radius\r\n size: prop.size,\r\n rotate: appstate.rotate,\r\n line: Math.floor(rand(65) - 30), // line angle\r\n angles: [rand(10, true) + 2, rand(10, true) + 2, rand(10, true) + 2, rand(10, true) + 2], // triangle drawing angles\r\n color: appstate.colors[rand(appstate.colors.length, true)], // color\r\n rotation: rand(360, true) * Math.PI/180,\r\n speed: rand(appstate.clock / 7) + (appstate.clock / 30)\r\n };\r\n\r\n return p;\r\n }\r\n\r\n //////////////\r\n // Confetti drawing on canvas\r\n function particleDraw(p) {\r\n var op = (p.radius <= 3) ? 0.4 : 0.8;\r\n\r\n ctx.fillStyle = ctx.strokeStyle = \"rgba(\" + p.color + \", \"+ op +\")\";\r\n ctx.beginPath();\r\n\r\n switch(p.prop) {\r\n case 'circle':{\r\n ctx.moveTo(p.x, p.y);\r\n ctx.arc(p.x, p.y, p.radius * appstate.size, 0, Math.PI * 2, true);\r\n ctx.fill();\r\n break; \r\n }\r\n case 'triangle': {\r\n ctx.moveTo(p.x, p.y);\r\n ctx.lineTo(p.x + (p.angles[0] * appstate.size), p.y + (p.angles[1] * appstate.size));\r\n ctx.lineTo(p.x + (p.angles[2] * appstate.size), p.y + (p.angles[3] * appstate.size));\r\n ctx.closePath();\r\n ctx.fill();\r\n break;\r\n }\r\n case 'line':{\r\n ctx.moveTo(p.x, p.y);\r\n ctx.lineTo(p.x + (p.line * appstate.size), p.y + (p.radius * 5));\r\n ctx.lineWidth = 2 * appstate.size;\r\n ctx.stroke();\r\n break;\r\n }\r\n case 'square': {\r\n ctx.save();\r\n ctx.translate(p.x+15, p.y+5);\r\n ctx.rotate(p.rotation);\r\n ctx.fillRect(-15 * appstate.size,-5 * appstate.size,15 * appstate.size,5 * appstate.size);\r\n ctx.restore();\r\n break;\r\n }\r\n case 'svg': {\r\n ctx.save();\r\n var image = new Image();\r\n image.src = p.src;\r\n var size = p.size || 15;\r\n ctx.translate(p.x + size / 2, p.y + size / 2);\r\n if(p.rotate)\r\n ctx.rotate(p.rotation);\r\n ctx.drawImage(image, -(size/2) * appstate.size, -(size/2) * appstate.size, size * appstate.size, size * appstate.size);\r\n ctx.restore();\r\n break;\r\n }\r\n }\r\n }\r\n \r\n //////////////\r\n // Public itens\r\n //////////////\r\n\r\n //////////////\r\n // Clean actual state\r\n var _clear = function() {\r\n appstate.animate = false;\r\n clearInterval(appstate.interval);\r\n \r\n requestAnimationFrame(function() {\r\n \tctx.clearRect(0, 0, cv.width, cv.height);\r\n var w = cv.width;\r\n cv.width = 1;\r\n cv.width = w;\r\n });\r\n }\r\n\r\n //////////////\r\n // Render confetti on canvas\r\n var _render = function() {\r\n //canvas dimensions\r\n cv.width = appstate.width;\r\n cv.height = appstate.height;\r\n particles = [];\r\n\r\n for(var i = 0; i < appstate.max; i ++)\r\n particles.push(particleFactory());\r\n \r\n function draw(){\r\n ctx.clearRect(0, 0, appstate.width, appstate.height);\r\n\r\n for(var i in particles)\r\n particleDraw(particles[i]);\r\n \r\n update();\r\n\r\n //animation loop\r\n if(appstate.animate) requestAnimationFrame(draw);\r\n }\r\n\r\n function update() {\r\n\r\n for (var i = 0; i < appstate.max; i++) {\r\n var p = particles[i];\r\n if(appstate.animate)\r\n p.y += p.speed;\r\n\r\n if (p.rotate)\r\n p.rotation += p.speed / 35;\r\n \r\n if ((p.speed >= 0 && p.y > appstate.height) || (p.speed < 0 && p.y < 0)) {\r\n particles[i] = p; \r\n particles[i].x = rand(appstate.width, true);\r\n particles[i].y = p.speed >= 0 ? -10 : parseFloat(appstate.height);\r\n }\r\n }\r\n }\r\n\r\n return requestAnimationFrame(draw);\r\n };\r\n\r\n return {\r\n render: _render,\r\n clear: _clear\r\n }\r\n}\r\n","export default function requiredArgs(required, args) {\n if (args.length < required) {\n throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');\n }\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isAfter\n * @category Common Helpers\n * @summary Is the first date after the second one?\n *\n * @description\n * Is the first date after the second one?\n *\n * @param {Date|Number} date - the date that should be after the other one to return true\n * @param {Date|Number} dateToCompare - the date to compare with\n * @returns {Boolean} the first date is after the second date\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Is 10 July 1989 after 11 February 1987?\n * const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))\n * //=> true\n */\nexport default function isAfter(dirtyDate, dirtyDateToCompare) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dateToCompare = toDate(dirtyDateToCompare);\n return date.getTime() > dateToCompare.getTime();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isEqual\n * @category Common Helpers\n * @summary Are the given dates equal?\n *\n * @description\n * Are the given dates equal?\n *\n * @param {Date|Number} dateLeft - the first date to compare\n * @param {Date|Number} dateRight - the second date to compare\n * @returns {Boolean} the dates are equal\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 July 2014 06:30:45.000 and 2 July 2014 06:30:45.500 equal?\n * const result = isEqual(\n * new Date(2014, 6, 2, 6, 30, 45, 0),\n * new Date(2014, 6, 2, 6, 30, 45, 500)\n * )\n * //=> false\n */\nexport default function isEqual(dirtyLeftDate, dirtyRightDate) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyLeftDate);\n var dateRight = toDate(dirtyRightDate);\n return dateLeft.getTime() === dateRight.getTime();\n}","import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @param {Date|Number} argument - the value to convert\n * @returns {Date} the parsed date in the local time zone\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport default function toDate(argument) {\n requiredArgs(1, arguments);\n var argStr = Object.prototype.toString.call(argument);\n\n // Clone the date\n if (argument instanceof Date || _typeof(argument) === 'object' && argStr === '[object Date]') {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new Date(argument.getTime());\n } else if (typeof argument === 'number' || argStr === '[object Number]') {\n return new Date(argument);\n } else {\n if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {\n // eslint-disable-next-line no-console\n console.warn(\"Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments\");\n // eslint-disable-next-line no-console\n console.warn(new Error().stack);\n }\n return new Date(NaN);\n }\n}","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = debounce;\n","/*\nUnobtrusive JavaScript\nhttps://github.com/rails/rails/blob/master/actionview/app/assets/javascripts\nReleased under the MIT license\n */;\n\n(function() {\n var context = this;\n\n (function() {\n (function() {\n this.Rails = {\n linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]',\n buttonClickSelector: {\n selector: 'button[data-remote]:not([form]), button[data-confirm]:not([form])',\n exclude: 'form button'\n },\n inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',\n formSubmitSelector: 'form',\n formInputClickSelector: 'form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])',\n formDisableSelector: 'input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled',\n formEnableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled',\n fileInputSelector: 'input[name][type=file]:not([disabled])',\n linkDisableSelector: 'a[data-disable-with], a[data-disable]',\n buttonDisableSelector: 'button[data-remote][data-disable-with], button[data-remote][data-disable]'\n };\n\n }).call(this);\n }).call(context);\n\n var Rails = context.Rails;\n\n (function() {\n (function() {\n var nonce;\n\n nonce = null;\n\n Rails.loadCSPNonce = function() {\n var ref;\n return nonce = (ref = document.querySelector(\"meta[name=csp-nonce]\")) != null ? ref.content : void 0;\n };\n\n Rails.cspNonce = function() {\n return nonce != null ? nonce : Rails.loadCSPNonce();\n };\n\n }).call(this);\n (function() {\n var expando, m;\n\n m = Element.prototype.matches || Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector;\n\n Rails.matches = function(element, selector) {\n if (selector.exclude != null) {\n return m.call(element, selector.selector) && !m.call(element, selector.exclude);\n } else {\n return m.call(element, selector);\n }\n };\n\n expando = '_ujsData';\n\n Rails.getData = function(element, key) {\n var ref;\n return (ref = element[expando]) != null ? ref[key] : void 0;\n };\n\n Rails.setData = function(element, key, value) {\n if (element[expando] == null) {\n element[expando] = {};\n }\n return element[expando][key] = value;\n };\n\n Rails.$ = function(selector) {\n return Array.prototype.slice.call(document.querySelectorAll(selector));\n };\n\n }).call(this);\n (function() {\n var $, csrfParam, csrfToken;\n\n $ = Rails.$;\n\n csrfToken = Rails.csrfToken = function() {\n var meta;\n meta = document.querySelector('meta[name=csrf-token]');\n return meta && meta.content;\n };\n\n csrfParam = Rails.csrfParam = function() {\n var meta;\n meta = document.querySelector('meta[name=csrf-param]');\n return meta && meta.content;\n };\n\n Rails.CSRFProtection = function(xhr) {\n var token;\n token = csrfToken();\n if (token != null) {\n return xhr.setRequestHeader('X-CSRF-Token', token);\n }\n };\n\n Rails.refreshCSRFTokens = function() {\n var param, token;\n token = csrfToken();\n param = csrfParam();\n if ((token != null) && (param != null)) {\n return $('form input[name=\"' + param + '\"]').forEach(function(input) {\n return input.value = token;\n });\n }\n };\n\n }).call(this);\n (function() {\n var CustomEvent, fire, matches, preventDefault;\n\n matches = Rails.matches;\n\n CustomEvent = window.CustomEvent;\n\n if (typeof CustomEvent !== 'function') {\n CustomEvent = function(event, params) {\n var evt;\n evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n };\n CustomEvent.prototype = window.Event.prototype;\n preventDefault = CustomEvent.prototype.preventDefault;\n CustomEvent.prototype.preventDefault = function() {\n var result;\n result = preventDefault.call(this);\n if (this.cancelable && !this.defaultPrevented) {\n Object.defineProperty(this, 'defaultPrevented', {\n get: function() {\n return true;\n }\n });\n }\n return result;\n };\n }\n\n fire = Rails.fire = function(obj, name, data) {\n var event;\n event = new CustomEvent(name, {\n bubbles: true,\n cancelable: true,\n detail: data\n });\n obj.dispatchEvent(event);\n return !event.defaultPrevented;\n };\n\n Rails.stopEverything = function(e) {\n fire(e.target, 'ujs:everythingStopped');\n e.preventDefault();\n e.stopPropagation();\n return e.stopImmediatePropagation();\n };\n\n Rails.delegate = function(element, selector, eventType, handler) {\n return element.addEventListener(eventType, function(e) {\n var target;\n target = e.target;\n while (!(!(target instanceof Element) || matches(target, selector))) {\n target = target.parentNode;\n }\n if (target instanceof Element && handler.call(target, e) === false) {\n e.preventDefault();\n return e.stopPropagation();\n }\n });\n };\n\n }).call(this);\n (function() {\n var AcceptHeaders, CSRFProtection, createXHR, cspNonce, fire, prepareOptions, processResponse;\n\n cspNonce = Rails.cspNonce, CSRFProtection = Rails.CSRFProtection, fire = Rails.fire;\n\n AcceptHeaders = {\n '*': '*/*',\n text: 'text/plain',\n html: 'text/html',\n xml: 'application/xml, text/xml',\n json: 'application/json, text/javascript',\n script: 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript'\n };\n\n Rails.ajax = function(options) {\n var xhr;\n options = prepareOptions(options);\n xhr = createXHR(options, function() {\n var ref, response;\n response = processResponse((ref = xhr.response) != null ? ref : xhr.responseText, xhr.getResponseHeader('Content-Type'));\n if (Math.floor(xhr.status / 100) === 2) {\n if (typeof options.success === \"function\") {\n options.success(response, xhr.statusText, xhr);\n }\n } else {\n if (typeof options.error === \"function\") {\n options.error(response, xhr.statusText, xhr);\n }\n }\n return typeof options.complete === \"function\" ? options.complete(xhr, xhr.statusText) : void 0;\n });\n if ((options.beforeSend != null) && !options.beforeSend(xhr, options)) {\n return false;\n }\n if (xhr.readyState === XMLHttpRequest.OPENED) {\n return xhr.send(options.data);\n }\n };\n\n prepareOptions = function(options) {\n options.url = options.url || location.href;\n options.type = options.type.toUpperCase();\n if (options.type === 'GET' && options.data) {\n if (options.url.indexOf('?') < 0) {\n options.url += '?' + options.data;\n } else {\n options.url += '&' + options.data;\n }\n }\n if (AcceptHeaders[options.dataType] == null) {\n options.dataType = '*';\n }\n options.accept = AcceptHeaders[options.dataType];\n if (options.dataType !== '*') {\n options.accept += ', */*; q=0.01';\n }\n return options;\n };\n\n createXHR = function(options, done) {\n var xhr;\n xhr = new XMLHttpRequest();\n xhr.open(options.type, options.url, true);\n xhr.setRequestHeader('Accept', options.accept);\n if (typeof options.data === 'string') {\n xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');\n }\n if (!options.crossDomain) {\n xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\n CSRFProtection(xhr);\n }\n xhr.withCredentials = !!options.withCredentials;\n xhr.onreadystatechange = function() {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n return done(xhr);\n }\n };\n return xhr;\n };\n\n processResponse = function(response, type) {\n var parser, script;\n if (typeof response === 'string' && typeof type === 'string') {\n if (type.match(/\\bjson\\b/)) {\n try {\n response = JSON.parse(response);\n } catch (error) {}\n } else if (type.match(/\\b(?:java|ecma)script\\b/)) {\n script = document.createElement('script');\n script.setAttribute('nonce', cspNonce());\n script.text = response;\n document.head.appendChild(script).parentNode.removeChild(script);\n } else if (type.match(/\\b(xml|html|svg)\\b/)) {\n parser = new DOMParser();\n type = type.replace(/;.+/, '');\n try {\n response = parser.parseFromString(response, type);\n } catch (error) {}\n }\n }\n return response;\n };\n\n Rails.href = function(element) {\n return element.href;\n };\n\n Rails.isCrossDomain = function(url) {\n var e, originAnchor, urlAnchor;\n originAnchor = document.createElement('a');\n originAnchor.href = location.href;\n urlAnchor = document.createElement('a');\n try {\n urlAnchor.href = url;\n return !(((!urlAnchor.protocol || urlAnchor.protocol === ':') && !urlAnchor.host) || (originAnchor.protocol + '//' + originAnchor.host === urlAnchor.protocol + '//' + urlAnchor.host));\n } catch (error) {\n e = error;\n return true;\n }\n };\n\n }).call(this);\n (function() {\n var matches, toArray;\n\n matches = Rails.matches;\n\n toArray = function(e) {\n return Array.prototype.slice.call(e);\n };\n\n Rails.serializeElement = function(element, additionalParam) {\n var inputs, params;\n inputs = [element];\n if (matches(element, 'form')) {\n inputs = toArray(element.elements);\n }\n params = [];\n inputs.forEach(function(input) {\n if (!input.name || input.disabled) {\n return;\n }\n if (matches(input, 'select')) {\n return toArray(input.options).forEach(function(option) {\n if (option.selected) {\n return params.push({\n name: input.name,\n value: option.value\n });\n }\n });\n } else if (input.checked || ['radio', 'checkbox', 'submit'].indexOf(input.type) === -1) {\n return params.push({\n name: input.name,\n value: input.value\n });\n }\n });\n if (additionalParam) {\n params.push(additionalParam);\n }\n return params.map(function(param) {\n if (param.name != null) {\n return (encodeURIComponent(param.name)) + \"=\" + (encodeURIComponent(param.value));\n } else {\n return param;\n }\n }).join('&');\n };\n\n Rails.formElements = function(form, selector) {\n if (matches(form, 'form')) {\n return toArray(form.elements).filter(function(el) {\n return matches(el, selector);\n });\n } else {\n return toArray(form.querySelectorAll(selector));\n }\n };\n\n }).call(this);\n (function() {\n var allowAction, fire, stopEverything;\n\n fire = Rails.fire, stopEverything = Rails.stopEverything;\n\n Rails.handleConfirm = function(e) {\n if (!allowAction(this)) {\n return stopEverything(e);\n }\n };\n\n allowAction = function(element) {\n var answer, callback, message;\n message = element.getAttribute('data-confirm');\n if (!message) {\n return true;\n }\n answer = false;\n if (fire(element, 'confirm')) {\n try {\n answer = confirm(message);\n } catch (error) {}\n callback = fire(element, 'confirm:complete', [answer]);\n }\n return answer && callback;\n };\n\n }).call(this);\n (function() {\n var disableFormElement, disableFormElements, disableLinkElement, enableFormElement, enableFormElements, enableLinkElement, formElements, getData, matches, setData, stopEverything;\n\n matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, stopEverything = Rails.stopEverything, formElements = Rails.formElements;\n\n Rails.handleDisabledElement = function(e) {\n var element;\n element = this;\n if (element.disabled) {\n return stopEverything(e);\n }\n };\n\n Rails.enableElement = function(e) {\n var element;\n element = e instanceof Event ? e.target : e;\n if (matches(element, Rails.linkDisableSelector)) {\n return enableLinkElement(element);\n } else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formEnableSelector)) {\n return enableFormElement(element);\n } else if (matches(element, Rails.formSubmitSelector)) {\n return enableFormElements(element);\n }\n };\n\n Rails.disableElement = function(e) {\n var element;\n element = e instanceof Event ? e.target : e;\n if (matches(element, Rails.linkDisableSelector)) {\n return disableLinkElement(element);\n } else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formDisableSelector)) {\n return disableFormElement(element);\n } else if (matches(element, Rails.formSubmitSelector)) {\n return disableFormElements(element);\n }\n };\n\n disableLinkElement = function(element) {\n var replacement;\n replacement = element.getAttribute('data-disable-with');\n if (replacement != null) {\n setData(element, 'ujs:enable-with', element.innerHTML);\n element.innerHTML = replacement;\n }\n element.addEventListener('click', stopEverything);\n return setData(element, 'ujs:disabled', true);\n };\n\n enableLinkElement = function(element) {\n var originalText;\n originalText = getData(element, 'ujs:enable-with');\n if (originalText != null) {\n element.innerHTML = originalText;\n setData(element, 'ujs:enable-with', null);\n }\n element.removeEventListener('click', stopEverything);\n return setData(element, 'ujs:disabled', null);\n };\n\n disableFormElements = function(form) {\n return formElements(form, Rails.formDisableSelector).forEach(disableFormElement);\n };\n\n disableFormElement = function(element) {\n var replacement;\n replacement = element.getAttribute('data-disable-with');\n if (replacement != null) {\n if (matches(element, 'button')) {\n setData(element, 'ujs:enable-with', element.innerHTML);\n element.innerHTML = replacement;\n } else {\n setData(element, 'ujs:enable-with', element.value);\n element.value = replacement;\n }\n }\n element.disabled = true;\n return setData(element, 'ujs:disabled', true);\n };\n\n enableFormElements = function(form) {\n return formElements(form, Rails.formEnableSelector).forEach(enableFormElement);\n };\n\n enableFormElement = function(element) {\n var originalText;\n originalText = getData(element, 'ujs:enable-with');\n if (originalText != null) {\n if (matches(element, 'button')) {\n element.innerHTML = originalText;\n } else {\n element.value = originalText;\n }\n setData(element, 'ujs:enable-with', null);\n }\n element.disabled = false;\n return setData(element, 'ujs:disabled', null);\n };\n\n }).call(this);\n (function() {\n var stopEverything;\n\n stopEverything = Rails.stopEverything;\n\n Rails.handleMethod = function(e) {\n var csrfParam, csrfToken, form, formContent, href, link, method;\n link = this;\n method = link.getAttribute('data-method');\n if (!method) {\n return;\n }\n href = Rails.href(link);\n csrfToken = Rails.csrfToken();\n csrfParam = Rails.csrfParam();\n form = document.createElement('form');\n formContent = \"\";\n if ((csrfParam != null) && (csrfToken != null) && !Rails.isCrossDomain(href)) {\n formContent += \"\";\n }\n formContent += '';\n form.method = 'post';\n form.action = href;\n form.target = link.target;\n form.innerHTML = formContent;\n form.style.display = 'none';\n document.body.appendChild(form);\n form.querySelector('[type=\"submit\"]').click();\n return stopEverything(e);\n };\n\n }).call(this);\n (function() {\n var ajax, fire, getData, isCrossDomain, isRemote, matches, serializeElement, setData, stopEverything,\n slice = [].slice;\n\n matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, fire = Rails.fire, stopEverything = Rails.stopEverything, ajax = Rails.ajax, isCrossDomain = Rails.isCrossDomain, serializeElement = Rails.serializeElement;\n\n isRemote = function(element) {\n var value;\n value = element.getAttribute('data-remote');\n return (value != null) && value !== 'false';\n };\n\n Rails.handleRemote = function(e) {\n var button, data, dataType, element, method, url, withCredentials;\n element = this;\n if (!isRemote(element)) {\n return true;\n }\n if (!fire(element, 'ajax:before')) {\n fire(element, 'ajax:stopped');\n return false;\n }\n withCredentials = element.getAttribute('data-with-credentials');\n dataType = element.getAttribute('data-type') || 'script';\n if (matches(element, Rails.formSubmitSelector)) {\n button = getData(element, 'ujs:submit-button');\n method = getData(element, 'ujs:submit-button-formmethod') || element.method;\n url = getData(element, 'ujs:submit-button-formaction') || element.getAttribute('action') || location.href;\n if (method.toUpperCase() === 'GET') {\n url = url.replace(/\\?.*$/, '');\n }\n if (element.enctype === 'multipart/form-data') {\n data = new FormData(element);\n if (button != null) {\n data.append(button.name, button.value);\n }\n } else {\n data = serializeElement(element, button);\n }\n setData(element, 'ujs:submit-button', null);\n setData(element, 'ujs:submit-button-formmethod', null);\n setData(element, 'ujs:submit-button-formaction', null);\n } else if (matches(element, Rails.buttonClickSelector) || matches(element, Rails.inputChangeSelector)) {\n method = element.getAttribute('data-method');\n url = element.getAttribute('data-url');\n data = serializeElement(element, element.getAttribute('data-params'));\n } else {\n method = element.getAttribute('data-method');\n url = Rails.href(element);\n data = element.getAttribute('data-params');\n }\n ajax({\n type: method || 'GET',\n url: url,\n data: data,\n dataType: dataType,\n beforeSend: function(xhr, options) {\n if (fire(element, 'ajax:beforeSend', [xhr, options])) {\n return fire(element, 'ajax:send', [xhr]);\n } else {\n fire(element, 'ajax:stopped');\n return false;\n }\n },\n success: function() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:success', args);\n },\n error: function() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:error', args);\n },\n complete: function() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:complete', args);\n },\n crossDomain: isCrossDomain(url),\n withCredentials: (withCredentials != null) && withCredentials !== 'false'\n });\n return stopEverything(e);\n };\n\n Rails.formSubmitButtonClick = function(e) {\n var button, form;\n button = this;\n form = button.form;\n if (!form) {\n return;\n }\n if (button.name) {\n setData(form, 'ujs:submit-button', {\n name: button.name,\n value: button.value\n });\n }\n setData(form, 'ujs:formnovalidate-button', button.formNoValidate);\n setData(form, 'ujs:submit-button-formaction', button.getAttribute('formaction'));\n return setData(form, 'ujs:submit-button-formmethod', button.getAttribute('formmethod'));\n };\n\n Rails.preventInsignificantClick = function(e) {\n var data, insignificantMetaClick, link, metaClick, method, nonPrimaryMouseClick;\n link = this;\n method = (link.getAttribute('data-method') || 'GET').toUpperCase();\n data = link.getAttribute('data-params');\n metaClick = e.metaKey || e.ctrlKey;\n insignificantMetaClick = metaClick && method === 'GET' && !data;\n nonPrimaryMouseClick = (e.button != null) && e.button !== 0;\n if (nonPrimaryMouseClick || insignificantMetaClick) {\n return e.stopImmediatePropagation();\n }\n };\n\n }).call(this);\n (function() {\n var $, CSRFProtection, delegate, disableElement, enableElement, fire, formSubmitButtonClick, getData, handleConfirm, handleDisabledElement, handleMethod, handleRemote, loadCSPNonce, preventInsignificantClick, refreshCSRFTokens;\n\n fire = Rails.fire, delegate = Rails.delegate, getData = Rails.getData, $ = Rails.$, refreshCSRFTokens = Rails.refreshCSRFTokens, CSRFProtection = Rails.CSRFProtection, loadCSPNonce = Rails.loadCSPNonce, enableElement = Rails.enableElement, disableElement = Rails.disableElement, handleDisabledElement = Rails.handleDisabledElement, handleConfirm = Rails.handleConfirm, preventInsignificantClick = Rails.preventInsignificantClick, handleRemote = Rails.handleRemote, formSubmitButtonClick = Rails.formSubmitButtonClick, handleMethod = Rails.handleMethod;\n\n if ((typeof jQuery !== \"undefined\" && jQuery !== null) && (jQuery.ajax != null)) {\n if (jQuery.rails) {\n throw new Error('If you load both jquery_ujs and rails-ujs, use rails-ujs only.');\n }\n jQuery.rails = Rails;\n jQuery.ajaxPrefilter(function(options, originalOptions, xhr) {\n if (!options.crossDomain) {\n return CSRFProtection(xhr);\n }\n });\n }\n\n Rails.start = function() {\n if (window._rails_loaded) {\n throw new Error('rails-ujs has already been loaded!');\n }\n window.addEventListener('pageshow', function() {\n $(Rails.formEnableSelector).forEach(function(el) {\n if (getData(el, 'ujs:disabled')) {\n return enableElement(el);\n }\n });\n return $(Rails.linkDisableSelector).forEach(function(el) {\n if (getData(el, 'ujs:disabled')) {\n return enableElement(el);\n }\n });\n });\n delegate(document, Rails.linkDisableSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.linkDisableSelector, 'ajax:stopped', enableElement);\n delegate(document, Rails.buttonDisableSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.buttonDisableSelector, 'ajax:stopped', enableElement);\n delegate(document, Rails.linkClickSelector, 'click', preventInsignificantClick);\n delegate(document, Rails.linkClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.linkClickSelector, 'click', handleConfirm);\n delegate(document, Rails.linkClickSelector, 'click', disableElement);\n delegate(document, Rails.linkClickSelector, 'click', handleRemote);\n delegate(document, Rails.linkClickSelector, 'click', handleMethod);\n delegate(document, Rails.buttonClickSelector, 'click', preventInsignificantClick);\n delegate(document, Rails.buttonClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.buttonClickSelector, 'click', handleConfirm);\n delegate(document, Rails.buttonClickSelector, 'click', disableElement);\n delegate(document, Rails.buttonClickSelector, 'click', handleRemote);\n delegate(document, Rails.inputChangeSelector, 'change', handleDisabledElement);\n delegate(document, Rails.inputChangeSelector, 'change', handleConfirm);\n delegate(document, Rails.inputChangeSelector, 'change', handleRemote);\n delegate(document, Rails.formSubmitSelector, 'submit', handleDisabledElement);\n delegate(document, Rails.formSubmitSelector, 'submit', handleConfirm);\n delegate(document, Rails.formSubmitSelector, 'submit', handleRemote);\n delegate(document, Rails.formSubmitSelector, 'submit', function(e) {\n return setTimeout((function() {\n return disableElement(e);\n }), 13);\n });\n delegate(document, Rails.formSubmitSelector, 'ajax:send', disableElement);\n delegate(document, Rails.formSubmitSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.formInputClickSelector, 'click', preventInsignificantClick);\n delegate(document, Rails.formInputClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.formInputClickSelector, 'click', handleConfirm);\n delegate(document, Rails.formInputClickSelector, 'click', formSubmitButtonClick);\n document.addEventListener('DOMContentLoaded', refreshCSRFTokens);\n document.addEventListener('DOMContentLoaded', loadCSPNonce);\n return window._rails_loaded = true;\n };\n\n if (window.Rails === Rails && fire(document, 'rails:attachBindings')) {\n Rails.start();\n }\n\n }).call(this);\n }).call(this);\n\n if (typeof module === \"object\" && module.exports) {\n module.exports = Rails;\n } else if (typeof define === \"function\" && define.amd) {\n define(Rails);\n }\n}).call(this);\n","var EventListener = /** @class */ (function () {\n function EventListener(eventTarget, eventName) {\n this.eventTarget = eventTarget;\n this.eventName = eventName;\n this.unorderedBindings = new Set;\n }\n EventListener.prototype.connect = function () {\n this.eventTarget.addEventListener(this.eventName, this, false);\n };\n EventListener.prototype.disconnect = function () {\n this.eventTarget.removeEventListener(this.eventName, this, false);\n };\n // Binding observer delegate\n /** @hidden */\n EventListener.prototype.bindingConnected = function (binding) {\n this.unorderedBindings.add(binding);\n };\n /** @hidden */\n EventListener.prototype.bindingDisconnected = function (binding) {\n this.unorderedBindings.delete(binding);\n };\n EventListener.prototype.handleEvent = function (event) {\n var extendedEvent = extendEvent(event);\n for (var _i = 0, _a = this.bindings; _i < _a.length; _i++) {\n var binding = _a[_i];\n if (extendedEvent.immediatePropagationStopped) {\n break;\n }\n else {\n binding.handleEvent(extendedEvent);\n }\n }\n };\n Object.defineProperty(EventListener.prototype, \"bindings\", {\n get: function () {\n return Array.from(this.unorderedBindings).sort(function (left, right) {\n var leftIndex = left.index, rightIndex = right.index;\n return leftIndex < rightIndex ? -1 : leftIndex > rightIndex ? 1 : 0;\n });\n },\n enumerable: true,\n configurable: true\n });\n return EventListener;\n}());\nexport { EventListener };\nfunction extendEvent(event) {\n if (\"immediatePropagationStopped\" in event) {\n return event;\n }\n else {\n var stopImmediatePropagation_1 = event.stopImmediatePropagation;\n return Object.assign(event, {\n immediatePropagationStopped: false,\n stopImmediatePropagation: function () {\n this.immediatePropagationStopped = true;\n stopImmediatePropagation_1.call(this);\n }\n });\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnRfbGlzdGVuZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZXZlbnRfbGlzdGVuZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUE7SUFLRSx1QkFBWSxXQUF3QixFQUFFLFNBQWlCO1FBQ3JELElBQUksQ0FBQyxXQUFXLEdBQUcsV0FBVyxDQUFBO1FBQzlCLElBQUksQ0FBQyxTQUFTLEdBQUcsU0FBUyxDQUFBO1FBQzFCLElBQUksQ0FBQyxpQkFBaUIsR0FBRyxJQUFJLEdBQUcsQ0FBQTtJQUNsQyxDQUFDO0lBRUQsK0JBQU8sR0FBUDtRQUNFLElBQUksQ0FBQyxXQUFXLENBQUMsZ0JBQWdCLENBQUMsSUFBSSxDQUFDLFNBQVMsRUFBRSxJQUFJLEVBQUUsS0FBSyxDQUFDLENBQ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S0FBSyxDQUFDLEtBQUssQ0FBQTtnQkFDdEQsT0FBTyxTQUFTLEdBQUcsVUFBVSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsU0FBUyxHQUFHLFVBQVUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUE7WUFDckUsQ0FBQyxDQUFDLENBQUE7UUFDSixDQUFDOzs7T0FBQTtJQUNILG9CQUFDO0FBQUQsQ0FBQyxBQWhERCxJQWdEQzs7QUFFRCxxQkFBcUIsS0FBWTtJQUMvQixJQUFJLDZCQUE2QixJQUFJLEtBQUssRUFBRTtRQUMxQyxPQUFPLEtBQUssQ0FBQTtLQUNiO1NBQU07UUFDRyxJQUFBLDJEQUF3QixDQUFVO1FBQzFDLE9BQU8sTUFBTSxDQUFDLE1BQU0sQ0FBQyxLQUFLLEVBQUU7WUFDMUIsMkJBQTJCLEVBQUUsS0FBSztZQUNsQyx3QkFBd0I7Z0JBQ3RCLElBQUksQ0FBQywyQkFBMkIsR0FBRyxJQUFJLENBQUE7Z0JBQ3ZDLDBCQUF3QixDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQTtZQUNyQyxDQUFDO1NBQ0YsQ0FBQyxDQUFBO0tBQ0g7QUFDSCxDQUFDIn0=","import { EventListener } from \"./event_listener\";\nvar Dispatcher = /** @class */ (function () {\n function Dispatcher(application) {\n this.application = application;\n this.eventListenerMaps = new Map;\n this.started = false;\n }\n Dispatcher.prototype.start = function () {\n if (!this.started) {\n this.started = true;\n this.eventListeners.forEach(function (eventListener) { return eventListener.connect(); });\n }\n };\n Dispatcher.prototype.stop = function () {\n if (this.started) {\n this.started = false;\n this.eventListeners.forEach(function (eventListener) { return eventListener.disconnect(); });\n }\n };\n Object.defineProperty(Dispatcher.prototype, \"eventListeners\", {\n get: function () {\n return Array.from(this.eventListenerMaps.values())\n .reduce(function (listeners, map) { return listeners.concat(Array.from(map.values())); }, []);\n },\n enumerable: true,\n configurable: true\n });\n // Binding observer delegate\n /** @hidden */\n Dispatcher.prototype.bindingConnected = function (binding) {\n this.fetchEventListenerForBinding(binding).bindingConnected(binding);\n };\n /** @hidden */\n Dispatcher.prototype.bindingDisconnected = function (binding) {\n this.fetchEventListenerForBinding(binding).bindingDisconnected(binding);\n };\n // Error handling\n Dispatcher.prototype.handleError = function (error, message, detail) {\n if (detail === void 0) { detail = {}; }\n this.application.handleError(error, \"Error \" + message, detail);\n };\n Dispatcher.prototype.fetchEventListenerForBinding = function (binding) {\n var eventTarget = binding.eventTarget, eventName = binding.eventName;\n return this.fetchEventListener(eventTarget, eventName);\n };\n Dispatcher.prototype.fetchEventListener = function (eventTarget, eventName) {\n var eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);\n var eventListener = eventListenerMap.get(eventName);\n if (!eventListener) {\n eventListener = this.createEventListener(eventTarget, eventName);\n eventListenerMap.set(eventName, eventListener);\n }\n return eventListener;\n };\n Dispatcher.prototype.createEventListener = function (eventTarget, eventName) {\n var eventListener = new EventListener(eventTarget, eventName);\n if (this.started) {\n eventListener.connect();\n }\n return eventListener;\n };\n Dispatcher.prototype.fetchEventListenerMapForEventTarget = function (eventTarget) {\n var eventListenerMap = this.eventListenerMaps.get(eventTarget);\n if (!eventListenerMap) {\n eventListenerMap = new Map;\n this.eventListenerMaps.set(eventTarget, eventListenerMap);\n }\n return eventListenerMap;\n };\n return Dispatcher;\n}());\nexport { Dispatcher };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGlzcGF0Y2hlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kaXNwYXRjaGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdBLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUVoRDtJQUtFLG9CQUFZLFdBQ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QUFXLEVBQUUsU0FBUyxDQUFDLENBQUE7WUFDaEUsZ0JBQWdCLENBQUMsR0FBRyxDQUFDLFNBQVMsRUFBRSxhQUFhLENBQUMsQ0FBQTtTQUMvQztRQUNELE9BQU8sYUFBYSxDQUFBO0lBQ3RCLENBQUM7SUFFTyx3Q0FBbUIsR0FBM0IsVUFBNEIsV0FBd0IsRUFBRSxTQUFpQjtRQUNyRSxJQUFNLGFBQWEsR0FBRyxJQUFJLGFBQWEsQ0FBQyxXQUFXLEVBQUUsU0FBUyxDQUFDLENBQUE7UUFDL0QsSUFBSSxJQUFJLENBQUMsT0FBTyxFQUFFO1lBQ2hCLGFBQWEsQ0FBQyxPQUFPLEVBQUUsQ0FBQTtTQUN4QjtRQUNELE9BQU8sYUFBYSxDQUFBO0lBQ3RCLENBQUM7SUFFTyx3REFBbUMsR0FBM0MsVUFBNEMsV0FBd0I7UUFDbEUsSUFBSSxnQkFBZ0IsR0FBRyxJQUFJLENBQUMsaUJBQWlCLENBQUMsR0FBRyxDQUFDLFdBQVcsQ0FBQyxDQUFBO1FBQzlELElBQUksQ0FBQyxnQkFBZ0IsRUFBRTtZQUNyQixnQkFBZ0IsR0FBRyxJQUFJLEdBQUcsQ0FBQTtZQUMxQixJQUFJLENBQUMsaUJBQWlCLENBQUMsR0FBRyxDQUFDLFdBQVcsRUFBRSxnQkFBZ0IsQ0FBQyxDQUFBO1NBQzFEO1FBQ0QsT0FBTyxnQkFBZ0IsQ0FBQTtJQUN6QixDQUFDO0lBQ0gsaUJBQUM7QUFBRCxDQUFDLEFBL0VELElBK0VDIn0=","// capture nos.: 12 23 4 43 1 5 56 7 76\nvar descriptorPattern = /^((.+?)(@(window|document))?->)?(.+?)(#(.+))?$/;\nexport function parseDescriptorString(descriptorString) {\n var source = descriptorString.trim();\n var matches = source.match(descriptorPattern) || [];\n return {\n eventTarget: parseEventTarget(matches[4]),\n eventName: matches[2],\n identifier: matches[5],\n methodName: matches[7]\n };\n}\nfunction parseEventTarget(eventTargetName) {\n if (eventTargetName == \"window\") {\n return window;\n }\n else if (eventTargetName == \"document\") {\n return document;\n }\n}\nexport function stringifyEventTarget(eventTarget) {\n if (eventTarget == window) {\n return \"window\";\n }\n else if (eventTarget == document) {\n return \"document\";\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0aW9uX2Rlc2NyaXB0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYWN0aW9uX2Rlc2NyaXB0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBT0EsdUVBQXVFO0FBQ3ZFLElBQU0saUJBQWlCLEdBQUcsZ0RBQWdELENBQUE7QUFFMUUsTUFBTSxnQ0FBZ0MsZ0JBQXdCO0lBQzVELElBQU0sTUFBTSxHQUFHLGdCQUFnQixDQUFDLElBQUksRUFBRSxDQUFBO0lBQ3RDLElBQU0sT0FBTyxHQUFHLE1BQU0sQ0FBQyxLQUFLLENBQUMsaUJBQWlCLENBQUMsSUFBSSxFQUFFLENBQUE7SUFDckQsT0FBTztRQUNMLFdBQVcsRUFBRSxnQkFBZ0IsQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUM7UUFDekMsU0FBUyxFQUFJLE9BQU8sQ0FBQyxDQUFDLENBQUM7UUFDdkIsVUFBVSxFQUFHLE9BQU8sQ0FBQyxDQUFDLENBQUM7UUFDdkIsVUFBVSxFQUFHLE9BQU8sQ0FBQyxDQUFDLENBQUM7S0FDeEIsQ0FBQTtBQUNILENBQUM7QUFFRCwwQkFBMEIsZUFBdUI7SUFDL0MsSUFBSSxlQUFlLElBQUksUUFBUSxFQUFFO1FBQy9CLE9BQU8sTUFBTSxDQUFBO0tBQ2Q7U0FBTSxJQUFJLGVBQWUsSUFBSSxVQUFVLEVBQUU7UUFDeEMsT0FBTyxRQUFRLENBQUE7S0FDaEI7QUFDSCxDQUFDO0FBRUQsTUFBTSwrQkFBK0IsV0FBd0I7SUFDM0QsSUFBSSxXQUFXLElBQUksTUFBTSxFQUFFO1FBQ3pCLE9BQU8sUUFBUSxDQUFBO0tBQ2hCO1NBQU0sSUFBSSxXQUFXLElBQUksUUFBUSxFQUFFO1FBQ2xDLE9BQU8sVUFBVSxDQUFBO0tBQ2xCO0FBQ0gsQ0FBQyJ9","import { parseDescriptorString, stringifyEventTarget } from \"./action_descriptor\";\nvar Action = /** @class */ (function () {\n function Action(element, index, descriptor) {\n this.element = element;\n this.index = index;\n this.eventTarget = descriptor.eventTarget || element;\n this.eventName = descriptor.eventName || getDefaultEventNameForElement(element) || error(\"missing event name\");\n this.identifier = descriptor.identifier || error(\"missing identifier\");\n this.methodName = descriptor.methodName || error(\"missing method name\");\n }\n Action.forToken = function (token) {\n return new this(token.element, token.index, parseDescriptorString(token.content));\n };\n Action.prototype.toString = function () {\n var eventNameSuffix = this.eventTargetName ? \"@\" + this.eventTargetName : \"\";\n return \"\" + this.eventName + eventNameSuffix + \"->\" + this.identifier + \"#\" + this.methodName;\n };\n Object.defineProperty(Action.prototype, \"eventTargetName\", {\n get: function () {\n return stringifyEventTarget(this.eventTarget);\n },\n enumerable: true,\n configurable: true\n });\n return Action;\n}());\nexport { Action };\nvar defaultEventNames = {\n \"a\": function (e) { return \"click\"; },\n \"button\": function (e) { return \"click\"; },\n \"form\": function (e) { return \"submit\"; },\n \"input\": function (e) { return e.getAttribute(\"type\") == \"submit\" ? \"click\" : \"change\"; },\n \"select\": function (e) { return \"change\"; },\n \"textarea\": function (e) { return \"change\"; }\n};\nexport function getDefaultEventNameForElement(element) {\n var tagName = element.tagName.toLowerCase();\n if (tagName in defaultEventNames) {\n return defaultEventNames[tagName](element);\n }\n}\nfunction error(message) {\n throw new Error(message);\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2F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QU8sQ0FBQyxDQUFBO0tBQzNDO0FBQ0gsQ0FBQztBQUVELGVBQWUsT0FBZTtJQUM1QixNQUFNLElBQUksS0FBSyxDQUFDLE9BQU8sQ0FBQyxDQUFBO0FBQzFCLENBQUMifQ==","var Binding = /** @class */ (function () {\n function Binding(context, action) {\n this.context = context;\n this.action = action;\n }\n Object.defineProperty(Binding.prototype, \"index\", {\n get: function () {\n return this.action.index;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"eventTarget\", {\n get: function () {\n return this.action.eventTarget;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"identifier\", {\n get: function () {\n return this.context.identifier;\n },\n enumerable: true,\n configurable: true\n });\n Binding.prototype.handleEvent = function (event) {\n if (this.willBeInvokedByEvent(event)) {\n this.invokeWithEvent(event);\n }\n };\n Object.defineProperty(Binding.prototype, \"eventName\", {\n get: function () {\n return this.action.eventName;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"method\", {\n get: function () {\n var method = this.controller[this.methodName];\n if (typeof method == \"function\") {\n return method;\n }\n throw new Error(\"Action \\\"\" + this.action + \"\\\" references undefined method \\\"\" + this.methodName + \"\\\"\");\n },\n enumerable: true,\n configurable: true\n });\n Binding.prototype.invokeWithEvent = function (event) {\n try {\n this.method.call(this.controller, event);\n }\n catch (error) {\n var _a = this, identifier = _a.identifier, controller = _a.controller, element = _a.element, index = _a.index;\n var detail = { identifier: identifier, controller: controller, element: element, index: index, event: event };\n this.context.handleError(error, \"invoking action \\\"\" + this.action + \"\\\"\", detail);\n }\n };\n Binding.prototype.willBeInvokedByEvent = function (event) {\n var eventTarget = event.target;\n if (this.element === eventTarget) {\n return true;\n }\n else if (eventTarget instanceof Element && this.element.contains(eventTarget)) {\n return this.scope.containsElement(eventTarget);\n }\n else {\n return true;\n }\n };\n Object.defineProperty(Binding.prototype, \"controller\", {\n get: function () {\n return this.context.controller;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"methodName\", {\n get: function () {\n return this.action.methodName;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"element\", {\n get: function () {\n return this.scope.element;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Binding.prototype, \"scope\", {\n get: function () {\n return this.context.scope;\n },\n enumerable: true,\n configurable: true\n });\n return Binding;\n}());\nexport { Binding };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmluZGluZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9iaW5kaW5nLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUtBO0lBSUUsaUJBQVksT0FBZ0IsRUFBRSxNQUFjO1FBQzFDLElBQUksQ0FBQyxPQUFPLEdBQUcsT0FBTyxDQUFBO1FBQ3RCLElBQUksQ0FBQyxNQUFNLEdBQUcsTUFBTSxDQUFBO0lBQ3RCLENBQUM7SUFFRCxzQkFBSSwwQkFBSzthQUFUO1lBQ0UsT0FBTyxJQUFJLENBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQTtRQUMxQixDQUFDOzs7T0FBQTtJQUVELHNCQUFJLGdDQUFXO2FBQWY7WUFDRSxPQUFPLElBQUksQ0FBQyxNQUFNLENBQUMsV0FBVyxDQUFBO1FBQ2hDLENBQUM7OztPQUFBO0lBRUQsc0JBQUksK0JBQVU7YUFBZDtZQUNFLE9BQU8sSUFBSSxDQUFDLE9BQU8sQ0FBQyxVQUFVLENBQUE7UUFDaEMsQ0FBQzs7O09BQUE7SUFFRCw2QkFBVyxHQUFYLFVBQVksS0FBWTtRQUN0QixJQUFJLElBQUksQ0FBQyxvQkFBb0IsQ0FBQyxLQUFLLENBQUMsRUFBRTtZQUNwQyxJQUFJLENBQUMsZUFBZSxDQUFDLEtBQUssQ0FBQyxDQUFBO1NBQzVCO0lBQ0gsQ0FBQztJQUVEL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VyxHQUFHLEtBQUssQ0FBQyxNQUFNLENBQUE7UUFDaEMsSUFBSSxJQUFJLENBQUMsT0FBTyxLQUFLLFdBQVcsRUFBRTtZQUNoQyxPQUFPLElBQUksQ0FBQTtTQUNaO2FBQU0sSUFBSSxXQUFXLFlBQVksT0FBTyxJQUFJLElBQUksQ0FBQyxPQUFPLENBQUMsUUFBUSxDQUFDLFdBQVcsQ0FBQyxFQUFFO1lBQy9FLE9BQU8sSUFBSSxDQUFDLEtBQUssQ0FBQyxlQUFlLENBQUMsV0FBVyxDQUFDLENBQUE7U0FDL0M7YUFBTTtZQUNMLE9BQU8sSUFBSSxDQUFBO1NBQ1o7SUFDSCxDQUFDO0lBRUQsc0JBQVksK0JBQVU7YUFBdEI7WUFDRSxPQUFPLElBQUksQ0FBQyxPQUFPLENBQUMsVUFBVSxDQUFBO1FBQ2hDLENBQUM7OztPQUFBO0lBRUQsc0JBQVksK0JBQVU7YUFBdEI7WUFDRSxPQUFPLElBQUksQ0FBQyxNQUFNLENBQUMsVUFBVSxDQUFBO1FBQy9CLENBQUM7OztPQUFBO0lBRUQsc0JBQVksNEJBQU87YUFBbkI7WUFDRSxPQUFPLElBQUksQ0FBQyxLQUFLLENBQUMsT0FBTyxDQUFBO1FBQzNCLENBQUM7OztPQUFBO0lBRUQsc0JBQVksMEJBQUs7YUFBakI7WUFDRSxPQUFPLElBQUksQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFBO1FBQzNCLENBQUM7OztPQUFBO0lBQ0gsY0FBQztBQUFELENBQUMsQUEzRUQsSUEyRUMifQ==","var ElementObserver = /** @class */ (function () {\n function ElementObserver(element, delegate) {\n var _this = this;\n this.element = element;\n this.started = false;\n this.delegate = delegate;\n this.elements = new Set;\n this.mutationObserver = new MutationObserver(function (mutations) { return _this.processMutations(mutations); });\n }\n ElementObserver.prototype.start = function () {\n if (!this.started) {\n this.started = true;\n this.mutationObserver.observe(this.element, { attributes: true, childList: true, subtree: true });\n this.refresh();\n }\n };\n ElementObserver.prototype.stop = function () {\n if (this.started) {\n this.mutationObserver.takeRecords();\n this.mutationObserver.disconnect();\n this.started = false;\n }\n };\n ElementObserver.prototype.refresh = function () {\n if (this.started) {\n var matches = new Set(this.matchElementsInTree());\n for (var _i = 0, _a = Array.from(this.elements); _i < _a.length; _i++) {\n var element = _a[_i];\n if (!matches.has(element)) {\n this.removeElement(element);\n }\n }\n for (var _b = 0, _c = Array.from(matches); _b < _c.length; _b++) {\n var element = _c[_b];\n this.addElement(element);\n }\n }\n };\n // Mutation record processing\n ElementObserver.prototype.processMutations = function (mutations) {\n if (this.started) {\n for (var _i = 0, mutations_1 = mutations; _i < mutations_1.length; _i++) {\n var mutation = mutations_1[_i];\n this.processMutation(mutation);\n }\n }\n };\n ElementObserver.prototype.processMutation = function (mutation) {\n if (mutation.type == \"attributes\") {\n this.processAttributeChange(mutation.target, mutation.attributeName);\n }\n else if (mutation.type == \"childList\") {\n this.processRemovedNodes(mutation.removedNodes);\n this.processAddedNodes(mutation.addedNodes);\n }\n };\n ElementObserver.prototype.processAttributeChange = function (node, attributeName) {\n var element = node;\n if (this.elements.has(element)) {\n if (this.delegate.elementAttributeChanged && this.matchElement(element)) {\n this.delegate.elementAttributeChanged(element, attributeName);\n }\n else {\n this.removeElement(element);\n }\n }\n else if (this.matchElement(element)) {\n this.addElement(element);\n }\n };\n ElementObserver.prototype.processRemovedNodes = function (nodes) {\n for (var _i = 0, _a = Array.from(nodes); _i < _a.length; _i++) {\n var node = _a[_i];\n var element = this.elementFromNode(node);\n if (element) {\n this.processTree(element, this.removeElement);\n }\n }\n };\n ElementObserver.prototype.processAddedNodes = function (nodes) {\n for (var _i = 0, _a = Array.from(nodes); _i < _a.length; _i++) {\n var node = _a[_i];\n var element = this.elementFromNode(node);\n if (element && this.elementIsActive(element)) {\n this.processTree(element, this.addElement);\n }\n }\n };\n // Element matching\n ElementObserver.prototype.matchElement = function (element) {\n return this.delegate.matchElement(element);\n };\n ElementObserver.prototype.matchElementsInTree = function (tree) {\n if (tree === void 0) { tree = this.element; }\n return this.delegate.matchElementsInTree(tree);\n };\n ElementObserver.prototype.processTree = function (tree, processor) {\n for (var _i = 0, _a = this.matchElementsInTree(tree); _i < _a.length; _i++) {\n var element = _a[_i];\n processor.call(this, element);\n }\n };\n ElementObserver.prototype.elementFromNode = function (node) {\n if (node.nodeType == Node.ELEMENT_NODE) {\n return node;\n }\n };\n ElementObserver.prototype.elementIsActive = function (element) {\n if (element.isConnected != this.element.isConnected) {\n return false;\n }\n else {\n return this.element.contains(element);\n }\n };\n // Element tracking\n ElementObserver.prototype.addElement = function (element) {\n if (!this.elements.has(element)) {\n if (this.elementIsActive(element)) {\n this.elements.add(element);\n if (this.delegate.elementMatched) {\n this.delegate.elementMatched(element);\n }\n }\n }\n };\n ElementObserver.prototype.removeElement = function (element) {\n if (this.elements.has(element)) {\n this.elements.delete(element);\n if (this.delegate.elementUnmatched) {\n this.delegate.elementUnmatched(element);\n }\n }\n };\n return ElementObserver;\n}());\nexport { ElementObserver };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWxlbWVudF9vYnNlcnZlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9lbGVtZW50X29ic2VydmVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVNBO0lBUUUseUJBQVksT0FBZ0IsRUFBRSxRQUFpQztRQUEvRCxpQkFPQztRQU5DLElBQUksQ0FBQyxPQUFPLEdBQUcsT0FBTyxDQUFBO1FBQ3RCLElBQUksQ0FBQyxPQUFPLEdBQUcsS0FBSyxDQUFBO1FBQ3BCLElBQUksQ0FBQyxRQUFRLEdBQUcsUUFBUSxDQUFBO1FBRXhCLElBQUksQ0FBQyxRQUFRLEdBQUcsSUFBSSxHQUFHLENBQUE7UUFDdkIsSUFBSSxDQUFDLGdCQUFnQixHQUFHLElBQUksZ0JBQWdCLENBQUMsVUFBQyxT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yxnQkFBZ0IsQ0FBQyxPQUFPLENBQUMsQ0FBQTthQUN4QztTQUNGO0lBQ0gsQ0FBQztJQUNILHNCQUFDO0FBQUQsQ0FBQyxBQXRKRCxJQXNKQyJ9","import { ElementObserver } from \"./element_observer\";\nvar AttributeObserver = /** @class */ (function () {\n function AttributeObserver(element, attributeName, delegate) {\n this.attributeName = attributeName;\n this.delegate = delegate;\n this.elementObserver = new ElementObserver(element, this);\n }\n Object.defineProperty(AttributeObserver.prototype, \"element\", {\n get: function () {\n return this.elementObserver.element;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(AttributeObserver.prototype, \"selector\", {\n get: function () {\n return \"[\" + this.attributeName + \"]\";\n },\n enumerable: true,\n configurable: true\n });\n AttributeObserver.prototype.start = function () {\n this.elementObserver.start();\n };\n AttributeObserver.prototype.stop = function () {\n this.elementObserver.stop();\n };\n AttributeObserver.prototype.refresh = function () {\n this.elementObserver.refresh();\n };\n Object.defineProperty(AttributeObserver.prototype, \"started\", {\n get: function () {\n return this.elementObserver.started;\n },\n enumerable: true,\n configurable: true\n });\n // Element observer delegate\n AttributeObserver.prototype.matchElement = function (element) {\n return element.hasAttribute(this.attributeName);\n };\n AttributeObserver.prototype.matchElementsInTree = function (tree) {\n var match = this.matchElement(tree) ? [tree] : [];\n var matches = Array.from(tree.querySelectorAll(this.selector));\n return match.concat(matches);\n };\n AttributeObserver.prototype.elementMatched = function (element) {\n if (this.delegate.elementMatchedAttribute) {\n this.delegate.elementMatchedAttribute(element, this.attributeName);\n }\n };\n AttributeObserver.prototype.elementUnmatched = function (element) {\n if (this.delegate.elementUnmatchedAttribute) {\n this.delegate.elementUnmatchedAttribute(element, this.attributeName);\n }\n };\n AttributeObserver.prototype.elementAttributeChanged = function (element, attributeName) {\n if (this.delegate.elementAttributeValueChanged && this.attributeName == attributeName) {\n this.delegate.elementAttributeValueChanged(element, attributeName);\n }\n };\n return AttributeObserver;\n}());\nexport { AttributeObserver };\n//# sourceMappingURL=data:application/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SUFBSSxDQUFDLFFBQVEsQ0FBQyw0QkFBNEIsSUFBSSxJQUFJLENBQUMsYUFBYSxJQUFJLGFBQWEsRUFBRTtZQUNyRixJQUFJLENBQUMsUUFBUSxDQUFDLDRCQUE0QixDQUFDLE9BQU8sRUFBRSxhQUFhLENBQUMsQ0FBQTtTQUNuRTtJQUNILENBQUM7SUFDSCx3QkFBQztBQUFELENBQUMsQUFsRUQsSUFrRUMifQ==","export function add(map, key, value) {\n fetch(map, key).add(value);\n}\nexport function del(map, key, value) {\n fetch(map, key).delete(value);\n prune(map, key);\n}\nexport function fetch(map, key) {\n var values = map.get(key);\n if (!values) {\n values = new Set();\n map.set(key, values);\n }\n return values;\n}\nexport function prune(map, key) {\n var values = map.get(key);\n if (values != null && values.size == 0) {\n map.delete(key);\n }\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2V0X29wZXJhdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2V0X29wZXJhdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxjQUFvQixHQUFtQixFQUFFLEdBQU0sRUFBRSxLQUFRO0lBQzdELEtBQUssQ0FBQyxHQUFHLEVBQUUsR0FBRyxDQUFDLENBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyxDQUFBO0FBQzVCLENBQUM7QUFFRCxNQUFNLGNBQW9CLEdBQW1CLEVBQUUsR0FBTSxFQUFFLEtBQVE7SUFDN0QsS0FBSyxDQUFDLEdBQUcsRUFBRSxHQUFHLENBQUMsQ0FBQyxNQUFNLENBQUMsS0FBSyxDQUFDLENBQUE7SUFDN0IsS0FBSyxDQUFDLEdBQUcsRUFBRSxHQUFHLENBQUMsQ0FBQTtBQUNqQixDQUFDO0FBRUQsTUFBTSxnQkFBc0IsR0FBbUIsRUFBRSxHQUFNO0lBQ3JELElBQUksTUFBTSxHQUFHLEdBQUcsQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUE7SUFDekIsSUFBSSxDQUFDLE1BQU0sRUFBRTtRQUNYLE1BQU0sR0FBRyxJQUFJLEdBQUcsRUFBRSxDQUFBO1FBQ2xCLEdBQUcsQ0FBQyxHQUFHLENBQUMsR0FBRyxFQUFFLE1BQU0sQ0FBQyxDQUFBO0tBQ3JCO0lBQ0QsT0FBTyxNQUFNLENBQUE7QUFDZixDQUFDO0FBRUQsTUFBTSxnQkFBc0IsR0FBbUIsRUFBRSxHQUFNO0lBQ3JELElBQU0sTUFBTSxHQUFHLEdBQUcsQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUE7SUFDM0IsSUFBSSxNQUFNLElBQUksSUFBSSxJQUFJLE1BQU0sQ0FBQyxJQUFJLElBQUksQ0FBQyxFQUFFO1FBQ3RDLEdBQUcsQ0FBQyxNQUFNLENBQUMsR0FBRyxDQUFDLENBQUE7S0FDaEI7QUFDSCxDQUFDIn0=","import { add, del } from \"./set_operations\";\nvar Multimap = /** @class */ (function () {\n function Multimap() {\n this.valuesByKey = new Map();\n }\n Object.defineProperty(Multimap.prototype, \"values\", {\n get: function () {\n var sets = Array.from(this.valuesByKey.values());\n return sets.reduce(function (values, set) { return values.concat(Array.from(set)); }, []);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Multimap.prototype, \"size\", {\n get: function () {\n var sets = Array.from(this.valuesByKey.values());\n return sets.reduce(function (size, set) { return size + set.size; }, 0);\n },\n enumerable: true,\n configurable: true\n });\n Multimap.prototype.add = function (key, value) {\n add(this.valuesByKey, key, value);\n };\n Multimap.prototype.delete = function (key, value) {\n del(this.valuesByKey, key, value);\n };\n Multimap.prototype.has = function (key, value) {\n var values = this.valuesByKey.get(key);\n return values != null && values.has(value);\n };\n Multimap.prototype.hasKey = function (key) {\n return this.valuesByKey.has(key);\n };\n Multimap.prototype.hasValue = function (value) {\n var sets = Array.from(this.valuesByKey.values());\n return sets.some(function (set) { return set.has(value); });\n };\n Multimap.prototype.getValuesForKey = function (key) {\n var values = this.valuesByKey.get(key);\n return values ? Array.from(values) : [];\n };\n Multimap.prototype.getKeysForValue = function (value) {\n return Array.from(this.valuesByKey)\n .filter(function (_a) {\n var key = _a[0], values = _a[1];\n return values.has(value);\n })\n .map(function (_a) {\n var key = _a[0], values = _a[1];\n return key;\n });\n };\n return Multimap;\n}());\nexport { Multimap };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibXVsdGltYXAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvbXVsdGltYXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLEdBQUcsRUFBRSxHQUFHLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQTtBQUUzQztJQUdFO1FBQ0UsSUFBSSxDQUFDLFdBQVcsR0FBRyxJQUFJLEdBQUcsRUFBYSxDQUFBO0lBQ3pDLENBQUM7SUFFRCxzQkFBSSw0QkFBTTthQUFWO1lBQ0UsSUFBTSxJQUFJLEdBQUcsS0FBSyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDLE1BQU0sRUFBRSxDQUFDLENBQUE7WUFDbEQsT0FBTyxJQUFJLENBQUMsTUFBTSxDQUFDLFVBQUMsTUFBTSxFQUFFLEdBQUcsSUFBSyxPQUFBLE1BQU0sQ0FBQyxNQUFNLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQyxFQUE5QixDQUE4QixFQUFRLEVBQUUsQ0FBQyxDQUFBO1FBQy9FLENBQUM7OztPQUFBO0lBRUQsc0JBQUksMEJBQUk7YUFBUjtZQUNFLElBQU0sSUFBSSxHQUFHLEtBQUssQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxDQUFBO1lBQ2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FDLEtBQUssQ0FBQyxFQUFkLENBQWMsQ0FBQyxDQUFBO0lBQ3pDLENBQUM7SUFFRCxrQ0FBZSxHQUFmLFVBQWdCLEdBQU07UUFDcEIsSUFBTSxNQUFNLEdBQUcsSUFBSSxDQUFDLFdBQVcsQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUE7UUFDeEMsT0FBTyxNQUFNLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQTtJQUN6QyxDQUFDO0lBRUQsa0NBQWUsR0FBZixVQUFnQixLQUFRO1FBQ3RCLE9BQU8sS0FBSyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDO2FBQ2hDLE1BQU0sQ0FBQyxVQUFDLEVBQWE7Z0JBQVosV0FBRyxFQUFFLGNBQU07WUFBTSxPQUFBLE1BQU0sQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDO1FBQWpCLENBQWlCLENBQUM7YUFDNUMsR0FBRyxDQUFDLFVBQUMsRUFBYTtnQkFBWixXQUFHLEVBQUUsY0FBTTtZQUFNLE9BQUEsR0FBRztRQUFILENBQUcsQ0FBQyxDQUFBO0lBQ2hDLENBQUM7SUFDSCxlQUFDO0FBQUQsQ0FBQyxBQWpERCxJQWlEQyJ9","var __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { Multimap } from \"./multimap\";\nimport { add, del } from \"./set_operations\";\nvar IndexedMultimap = /** @class */ (function (_super) {\n __extends(IndexedMultimap, _super);\n function IndexedMultimap() {\n var _this = _super.call(this) || this;\n _this.keysByValue = new Map;\n return _this;\n }\n Object.defineProperty(IndexedMultimap.prototype, \"values\", {\n get: function () {\n return Array.from(this.keysByValue.keys());\n },\n enumerable: true,\n configurable: true\n });\n IndexedMultimap.prototype.add = function (key, value) {\n _super.prototype.add.call(this, key, value);\n add(this.keysByValue, value, key);\n };\n IndexedMultimap.prototype.delete = function (key, value) {\n _super.prototype.delete.call(this, key, value);\n del(this.keysByValue, value, key);\n };\n IndexedMultimap.prototype.hasValue = function (value) {\n return this.keysByValue.has(value);\n };\n IndexedMultimap.prototype.getKeysForValue = function (value) {\n var set = this.keysByValue.get(value);\n return set ? Array.from(set) : [];\n };\n return IndexedMultimap;\n}(Multimap));\nexport { IndexedMultimap };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXhlZF9tdWx0aW1hcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9pbmRleGVkX211bHRpbWFwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sWUFBWSxDQUFBO0FBQ3JDLE9BQU8sRUFBRSxHQUFHLEVBQUUsR0FBRyxFQUFFLE1BQU0sa0JBQWtCLENBQUE7QUFFM0M7SUFBMkMsbUNBQWM7SUFHdkQ7UUFBQSxZQUNFLGlCQUFPLFNBRVI7UUFEQyxLQUFJLENBQUMsV0FBVyxHQUFHLElBQUksR0FBRyxDQUFBOztJQUM1QixDQUFDO0lBRUQsc0JBQUksbUNBQU07YUFBVjtZQUNFLE9BQU8sS0FBSyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxDQUFDLElBQUksRUFBRSxDQUFDLENBQUE7UUFDNUMsQ0FBQzs7O09BQUE7SUFFRCw2QkFBRyxHQUFILFVBQUksR0FBTSxFQUFFLEtBQVE7UUFDbEIsaUJBQU0sR0FBRyxZQUFDLEdBQUcsRUFBRSxLQUFLLENBQUMsQ0FBQTtRQUNyQixHQUFHLENBQUMsSUFBSSxDQUFDLFdBQVcsRUFBRSxLQUFLLEVBQUUsR0FBRyxDQUFDLENBQUE7SUFDbkMsQ0FBQztJQUVELGdDQUFNLEdBQU4sVUFBTyxHQUFNLEVBQUUsS0FBUTtRQUNyQixpQkFBTSxNQUFNLFlBQUMsR0FBRyxFQUFFLEtBQUssQ0FBQyxDQUFBO1FBQ3hCLEdBQUcsQ0FBQyxJQUFJLENBQUMsV0FBVyxFQUFFLEtBQUssRUFBRSxHQUFHLENBQUMsQ0FBQTtJQUNuQyxDQUFDO0lBRUQsa0NBQVEsR0FBUixVQUFTLEtBQVE7UUFDZixPQUFPLElBQUksQ0FBQyxXQUFXLENBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyxDQUFBO0lBQ3BDLENBQUM7SUFFRCx5Q0FBZSxHQUFmLFVBQWdCLEtBQVE7UUFDdEIsSUFBTSxHQUFHLEdBQUcsSUFBSSxDQUFDLFdBQVcsQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLENBQUE7UUFDdkMsT0FBTyxHQUFHLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQTtJQUNuQyxDQUFDO0lBQ0gsc0JBQUM7QUFBRCxDQUFDLEFBOUJELENBQTJDLFFBQVEsR0E4QmxEIn0=","import { AttributeObserver } from \"./attribute_observer\";\nimport { Multimap } from \"@stimulus/multimap\";\nvar TokenListObserver = /** @class */ (function () {\n function TokenListObserver(element, attributeName, delegate) {\n this.attributeObserver = new AttributeObserver(element, attributeName, this);\n this.delegate = delegate;\n this.tokensByElement = new Multimap;\n }\n Object.defineProperty(TokenListObserver.prototype, \"started\", {\n get: function () {\n return this.attributeObserver.started;\n },\n enumerable: true,\n configurable: true\n });\n TokenListObserver.prototype.start = function () {\n this.attributeObserver.start();\n };\n TokenListObserver.prototype.stop = function () {\n this.attributeObserver.stop();\n };\n TokenListObserver.prototype.refresh = function () {\n this.attributeObserver.refresh();\n };\n Object.defineProperty(TokenListObserver.prototype, \"element\", {\n get: function () {\n return this.attributeObserver.element;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TokenListObserver.prototype, \"attributeName\", {\n get: function () {\n return this.attributeObserver.attributeName;\n },\n enumerable: true,\n configurable: true\n });\n // Attribute observer delegate\n TokenListObserver.prototype.elementMatchedAttribute = function (element) {\n this.tokensMatched(this.readTokensForElement(element));\n };\n TokenListObserver.prototype.elementAttributeValueChanged = function (element) {\n var _a = this.refreshTokensForElement(element), unmatchedTokens = _a[0], matchedTokens = _a[1];\n this.tokensUnmatched(unmatchedTokens);\n this.tokensMatched(matchedTokens);\n };\n TokenListObserver.prototype.elementUnmatchedAttribute = function (element) {\n this.tokensUnmatched(this.tokensByElement.getValuesForKey(element));\n };\n TokenListObserver.prototype.tokensMatched = function (tokens) {\n var _this = this;\n tokens.forEach(function (token) { return _this.tokenMatched(token); });\n };\n TokenListObserver.prototype.tokensUnmatched = function (tokens) {\n var _this = this;\n tokens.forEach(function (token) { return _this.tokenUnmatched(token); });\n };\n TokenListObserver.prototype.tokenMatched = function (token) {\n this.delegate.tokenMatched(token);\n this.tokensByElement.add(token.element, token);\n };\n TokenListObserver.prototype.tokenUnmatched = function (token) {\n this.delegate.tokenUnmatched(token);\n this.tokensByElement.delete(token.element, token);\n };\n TokenListObserver.prototype.refreshTokensForElement = function (element) {\n var previousTokens = this.tokensByElement.getValuesForKey(element);\n var currentTokens = this.readTokensForElement(element);\n var firstDifferingIndex = zip(previousTokens, currentTokens)\n .findIndex(function (_a) {\n var previousToken = _a[0], currentToken = _a[1];\n return !tokensAreEqual(previousToken, currentToken);\n });\n if (firstDifferingIndex == -1) {\n return [[], []];\n }\n else {\n return [previousTokens.slice(firstDifferingIndex), currentTokens.slice(firstDifferingIndex)];\n }\n };\n TokenListObserver.prototype.readTokensForElement = function (element) {\n var attributeName = this.attributeName;\n var tokenString = element.getAttribute(attributeName) || \"\";\n return parseTokenString(tokenString, element, attributeName);\n };\n return TokenListObserver;\n}());\nexport { TokenListObserver };\nfunction parseTokenString(tokenString, element, attributeName) {\n return tokenString.trim().split(/\\s+/).filter(function (content) { return content.length; })\n .map(function (content, index) { return ({ element: element, attributeName: attributeName, content: content, index: index }); });\n}\nfunction zip(left, right) {\n var length = Math.max(left.length, right.length);\n return Array.from({ length: length }, function (_, index) { return [left[index], right[index]]; });\n}\nfunction tokensAreEqual(left, right) {\n return left && right && left.index == right.index && left.content == right.content;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9rZW5fbGlzdF9vYnNlcnZlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90b2tlbl9saXN0X29ic2VydmVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxpQkFBaUIsRUFBNkIsTUFBTSxzQkFBc0IsQ0FBQTtBQUNuRixPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sb0JBQW9CLENBQUE7QUFjN0M7SUFLRSwyQkFBWSxPQUFnQixFQUFFLGFBQXFCLEVBQUUsUUFBbUM7UUFDdEYsSUFBSSxDQUFDLGlCQUFpQixHQUFHLElBQUksaUJBQWlCLENBQUMsT0FBTyxFQUFFLGFBQWEsRUFBRSxJQUFJLENBQUMsQ0FBQTtRQUM1RSxJQUFJLENBQUMsUUFBUSxHQUFHLFFBQVEsQ0FBQTtRQUN4QixJQUFJLENBQUMsZUFBZSxHQUFHLElBQUksUUFBUSxDQUFBO0lBQ3JDLENBQUM7SUFFRCxzQkFBSSxzQ0FBTzthQUFYO1lBQ0UsT0FBTyxJQUFJLENBQUMsaUJBQWlCLENBQUMsT0FBTyxDQUFBO1FBQ3ZDLENBQUM7OztP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LE9BQU8sRUFBRSxLQUFLLElBQUssT0FBQSxDQUFDLEVBQUUsT0FBTyxTQUFBLEVBQUUsYUFBYSxlQUFBLEVBQUUsT0FBTyxTQUFBLEVBQUUsS0FBSyxPQUFBLEVBQUUsQ0FBQyxFQUE1QyxDQUE0QyxDQUFDLENBQUE7QUFDMUUsQ0FBQztBQUVELGFBQW1CLElBQVMsRUFBRSxLQUFVO0lBQ3RDLElBQU0sTUFBTSxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxLQUFLLENBQUMsTUFBTSxDQUFDLENBQUE7SUFDbEQsT0FBTyxLQUFLLENBQUMsSUFBSSxDQUFDLEVBQUUsTUFBTSxRQUFBLEVBQUUsRUFBRSxVQUFDLENBQUMsRUFBRSxLQUFLLElBQUssT0FBQSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsRUFBRSxLQUFLLENBQUMsS0FBSyxDQUFDLENBQVcsRUFBckMsQ0FBcUMsQ0FBQyxDQUFBO0FBQ3BGLENBQUM7QUFFRCx3QkFBd0IsSUFBWSxFQUFFLEtBQWE7SUFDakQsT0FBTyxJQUFJLElBQUksS0FBSyxJQUFJLElBQUksQ0FBQyxLQUFLLElBQUksS0FBSyxDQUFDLEtBQUssSUFBSSxJQUFJLENBQUMsT0FBTyxJQUFJLEtBQUssQ0FBQyxPQUFPLENBQUE7QUFDcEYsQ0FBQyJ9","import { TokenListObserver } from \"./token_list_observer\";\nvar ValueListObserver = /** @class */ (function () {\n function ValueListObserver(element, attributeName, delegate) {\n this.tokenListObserver = new TokenListObserver(element, attributeName, this);\n this.delegate = delegate;\n this.parseResultsByToken = new WeakMap;\n this.valuesByTokenByElement = new WeakMap;\n }\n Object.defineProperty(ValueListObserver.prototype, \"started\", {\n get: function () {\n return this.tokenListObserver.started;\n },\n enumerable: true,\n configurable: true\n });\n ValueListObserver.prototype.start = function () {\n this.tokenListObserver.start();\n };\n ValueListObserver.prototype.stop = function () {\n this.tokenListObserver.stop();\n };\n ValueListObserver.prototype.refresh = function () {\n this.tokenListObserver.refresh();\n };\n Object.defineProperty(ValueListObserver.prototype, \"element\", {\n get: function () {\n return this.tokenListObserver.element;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(ValueListObserver.prototype, \"attributeName\", {\n get: function () {\n return this.tokenListObserver.attributeName;\n },\n enumerable: true,\n configurable: true\n });\n ValueListObserver.prototype.tokenMatched = function (token) {\n var element = token.element;\n var value = this.fetchParseResultForToken(token).value;\n if (value) {\n this.fetchValuesByTokenForElement(element).set(token, value);\n this.delegate.elementMatchedValue(element, value);\n }\n };\n ValueListObserver.prototype.tokenUnmatched = function (token) {\n var element = token.element;\n var value = this.fetchParseResultForToken(token).value;\n if (value) {\n this.fetchValuesByTokenForElement(element).delete(token);\n this.delegate.elementUnmatchedValue(element, value);\n }\n };\n ValueListObserver.prototype.fetchParseResultForToken = function (token) {\n var parseResult = this.parseResultsByToken.get(token);\n if (!parseResult) {\n parseResult = this.parseToken(token);\n this.parseResultsByToken.set(token, parseResult);\n }\n return parseResult;\n };\n ValueListObserver.prototype.fetchValuesByTokenForElement = function (element) {\n var valuesByToken = this.valuesByTokenByElement.get(element);\n if (!valuesByToken) {\n valuesByToken = new Map;\n this.valuesByTokenByElement.set(element, valuesByToken);\n }\n return valuesByToken;\n };\n ValueListObserver.prototype.parseToken = function (token) {\n try {\n var value = this.delegate.parseValueForToken(token);\n return { value: value };\n }\n catch (error) {\n return { error: error };\n }\n };\n return ValueListObserver;\n}());\nexport { ValueListObserver };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsdWVfbGlzdF9vYnNlcnZlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy92YWx1ZV9saXN0X29ic2VydmVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBUyxpQkFBaUIsRUFBN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DQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsQ0FBQTtRQUM1RCxJQUFJLENBQUMsYUFBYSxFQUFFO1lBQ2xCLGFBQWEsR0FBRyxJQUFJLEdBQUcsQ0FBQTtZQUN2QixJQUFJLENBQUMsc0JBQXNCLENBQUMsR0FBRyxDQUFDLE9BQU8sRUFBRSxhQUFhLENBQUMsQ0FBQTtTQUN4RDtRQUNELE9BQU8sYUFBYSxDQUFBO0lBQ3RCLENBQUM7SUFFTyxzQ0FBVSxHQUFsQixVQUFtQixLQUFZO1FBQzdCLElBQUk7WUFDRixJQUFNLEtBQUssR0FBRyxJQUFJLENBQUMsUUFBUSxDQUFDLGtCQUFrQixDQUFDLEtBQUssQ0FBQyxDQUFBO1lBQ3JELE9BQU8sRUFBRSxLQUFLLE9BQUEsRUFBRSxDQUFBO1NBQ2pCO1FBQUMsT0FBTyxLQUFLLEVBQUU7WUFDZCxPQUFPLEVBQUUsS0FBSyxPQUFBLEVBQUUsQ0FBQTtTQUNqQjtJQUNILENBQUM7SUFDSCx3QkFBQztBQUFELENBQUMsQUFqRkQsSUFpRkMifQ==","import { Action } from \"./action\";\nimport { Binding } from \"./binding\";\nimport { ValueListObserver } from \"@stimulus/mutation-observers\";\nvar BindingObserver = /** @class */ (function () {\n function BindingObserver(context, delegate) {\n this.context = context;\n this.delegate = delegate;\n this.bindingsByAction = new Map;\n }\n BindingObserver.prototype.start = function () {\n if (!this.valueListObserver) {\n this.valueListObserver = new ValueListObserver(this.element, this.actionAttribute, this);\n this.valueListObserver.start();\n }\n };\n BindingObserver.prototype.stop = function () {\n if (this.valueListObserver) {\n this.valueListObserver.stop();\n delete this.valueListObserver;\n this.disconnectAllActions();\n }\n };\n Object.defineProperty(BindingObserver.prototype, \"element\", {\n get: function () {\n return this.context.element;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BindingObserver.prototype, \"identifier\", {\n get: function () {\n return this.context.identifier;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BindingObserver.prototype, \"actionAttribute\", {\n get: function () {\n return this.schema.actionAttribute;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BindingObserver.prototype, \"schema\", {\n get: function () {\n return this.context.schema;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(BindingObserver.prototype, \"bindings\", {\n get: function () {\n return Array.from(this.bindingsByAction.values());\n },\n enumerable: true,\n configurable: true\n });\n BindingObserver.prototype.connectAction = function (action) {\n var binding = new Binding(this.context, action);\n this.bindingsByAction.set(action, binding);\n this.delegate.bindingConnected(binding);\n };\n BindingObserver.prototype.disconnectAction = function (action) {\n var binding = this.bindingsByAction.get(action);\n if (binding) {\n this.bindingsByAction.delete(action);\n this.delegate.bindingDisconnected(binding);\n }\n };\n BindingObserver.prototype.disconnectAllActions = function () {\n var _this = this;\n this.bindings.forEach(function (binding) { return _this.delegate.bindingDisconnected(binding); });\n this.bindingsByAction.clear();\n };\n // Value observer delegate\n BindingObserver.prototype.parseValueForToken = function (token) {\n var action = Action.forToken(token);\n if (action.identifier == this.identifier) {\n return action;\n }\n };\n BindingObserver.prototype.elementMatchedValue = function (element, action) {\n this.connectAction(action);\n };\n BindingObserver.prototype.elementUnmatchedValue = function (element, action) {\n this.disconnectAction(action);\n };\n return BindingObserver;\n}());\nexport { BindingObserver };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmluZGluZ19vYnNlcnZlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9iaW5kaW5nX29ic2VydmVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxVQUFVLENBQUE7QUFDakMsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLFdBQVcsQ0FBQTtBQUluQyxPQUFPLEVBQVMsaUJBQWlCLEVBQTZCLE1BQU0sOEJBQThCLENBQUE7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QUFPLENBQUMsRUFBMUMsQ0FBMEMsQ0FBQyxDQUFBO1FBQzVFLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxLQUFLLEVBQUUsQ0FBQTtJQUMvQixDQUFDO0lBRUQsMEJBQTBCO0lBRTFCLDRDQUFrQixHQUFsQixVQUFtQixLQUFZO1FBQzdCLElBQU0sTUFBTSxHQUFHLE1BQU0sQ0FBQyxRQUFRLENBQUMsS0FBSyxDQUFDLENBQUE7UUFDckMsSUFBSSxNQUFNLENBQUMsVUFBVSxJQUFJLElBQUksQ0FBQyxVQUFVLEVBQUU7WUFDeEMsT0FBTyxNQUFNLENBQUE7U0FDZDtJQUNILENBQUM7SUFFRCw2Q0FBbUIsR0FBbkIsVUFBb0IsT0FBZ0IsRUFBRSxNQUFjO1FBQ2xELElBQUksQ0FBQyxhQUFhLENBQUMsTUFBTSxDQUFDLENBQUE7SUFDNUIsQ0FBQztJQUVELCtDQUFxQixHQUFyQixVQUFzQixPQUFnQixFQUFFLE1BQWM7UUFDcEQsSUFBSSxDQUFDLGdCQUFnQixDQUFDLE1BQU0sQ0FBQyxDQUFBO0lBQy9CLENBQUM7SUFDSCxzQkFBQztBQUFELENBQUMsQUFsRkQsSUFrRkMifQ==","import { BindingObserver } from \"./binding_observer\";\nvar Context = /** @class */ (function () {\n function Context(module, scope) {\n this.module = module;\n this.scope = scope;\n this.controller = new module.controllerConstructor(this);\n this.bindingObserver = new BindingObserver(this, this.dispatcher);\n try {\n this.controller.initialize();\n }\n catch (error) {\n this.handleError(error, \"initializing controller\");\n }\n }\n Context.prototype.connect = function () {\n this.bindingObserver.start();\n try {\n this.controller.connect();\n }\n catch (error) {\n this.handleError(error, \"connecting controller\");\n }\n };\n Context.prototype.disconnect = function () {\n try {\n this.controller.disconnect();\n }\n catch (error) {\n this.handleError(error, \"disconnecting controller\");\n }\n this.bindingObserver.stop();\n };\n Object.defineProperty(Context.prototype, \"application\", {\n get: function () {\n return this.module.application;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Context.prototype, \"identifier\", {\n get: function () {\n return this.module.identifier;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Context.prototype, \"schema\", {\n get: function () {\n return this.application.schema;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Context.prototype, \"dispatcher\", {\n get: function () {\n return this.application.dispatcher;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Context.prototype, \"element\", {\n get: function () {\n return this.scope.element;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Context.prototype, \"parentElement\", {\n get: function () {\n return this.element.parentElement;\n },\n enumerable: true,\n configurable: true\n });\n // Error handling\n Context.prototype.handleError = function (error, message, detail) {\n if (detail === void 0) { detail = {}; }\n var _a = this, identifier = _a.identifier, controller = _a.controller, element = _a.element;\n detail = Object.assign({ identifier: identifier, controller: controller, element: element }, detail);\n this.application.handleError(error, \"Error \" + message, detail);\n };\n return Context;\n}());\nexport { Context };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGV4dC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb250ZXh0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQTtBQVFwRDtJQU1FLGlCQUFZLE1BQWMsRUFBRSxLQUFZO1FBQ3RDLElBQUksQ0FBQyxNQUFNLEdBQUcsTUFBTSxDQUFBO1FBQ3BCLElBQUksQ0FBQyxLQUFLLEdBQUcsS0FBSyxDQUFBO1FBQ2xCLElBQUksQ0FBQyxVQUFVLEdBQUcsSUFBSSxNQUFNLENBQUMscUJBQXFCLENBQUMsSUFBSSxDQUFDLENBQUE7UUFDeEQsSUFBSSxDQUFDLGVBQWUsR0FBRyxJQUFJLGVBQWUsQ0FBQyxJQUFJLEVBQUUsSUFBSSxDQUFDL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0sQ0FBQTtRQUNoQyxDQUFDOzs7T0FBQTtJQUVELHNCQUFJLCtCQUFVO2FBQWQ7WUFDRSxPQUFPLElBQUksQ0FBQyxXQUFXLENBQUMsVUFBVSxDQUFBO1FBQ3BDLENBQUM7OztPQUFBO0lBRUQsc0JBQUksNEJBQU87YUFBWDtZQUNFLE9BQU8sSUFBSSxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQUE7UUFDM0IsQ0FBQzs7O09BQUE7SUFFRCxzQkFBSSxrQ0FBYTthQUFqQjtZQUNFLE9BQU8sSUFBSSxDQUFDLE9BQU8sQ0FBQyxhQUFhLENBQUE7UUFDbkMsQ0FBQzs7O09BQUE7SUFFRCxpQkFBaUI7SUFFakIsNkJBQVcsR0FBWCxVQUFZLEtBQVksRUFBRSxPQUFlLEVBQUUsTUFBbUI7UUFBbkIsdUJBQUEsRUFBQSxXQUFtQjtRQUN0RCxJQUFBLFNBQTBDLEVBQXhDLDBCQUFVLEVBQUUsMEJBQVUsRUFBRSxvQkFBTyxDQUFTO1FBQ2hELE1BQU0sR0FBRyxNQUFNLENBQUMsTUFBTSxDQUFDLEVBQUUsVUFBVSxZQUFBLEVBQUUsVUFBVSxZQUFBLEVBQUUsT0FBTyxTQUFBLEVBQUUsRUFBRSxNQUFNLENBQUMsQ0FBQTtRQUNuRSxJQUFJLENBQUMsV0FBVyxDQUFDLFdBQVcsQ0FBQyxLQUFLLEVBQUUsV0FBUyxPQUFTLEVBQUUsTUFBTSxDQUFDLENBQUE7SUFDakUsQ0FBQztJQUNILGNBQUM7QUFBRCxDQUFDLEFBdEVELElBc0VDIn0=","var __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/** @hidden */\nexport function blessDefinition(definition) {\n return {\n identifier: definition.identifier,\n controllerConstructor: blessControllerConstructor(definition.controllerConstructor)\n };\n}\nfunction blessControllerConstructor(controllerConstructor) {\n var constructor = extend(controllerConstructor);\n constructor.bless();\n return constructor;\n}\nvar extend = (function () {\n function extendWithReflect(constructor) {\n function Controller() {\n var _newTarget = this && this instanceof Controller ? this.constructor : void 0;\n return Reflect.construct(constructor, arguments, _newTarget);\n }\n Controller.prototype = Object.create(constructor.prototype, {\n constructor: { value: Controller }\n });\n Reflect.setPrototypeOf(Controller, constructor);\n return Controller;\n }\n function testReflectExtension() {\n var a = function () { this.a.call(this); };\n var b = extendWithReflect(a);\n b.prototype.a = function () { };\n return new b;\n }\n try {\n testReflectExtension();\n return extendWithReflect;\n }\n catch (error) {\n return function (constructor) { return /** @class */ (function (_super) {\n __extends(Controller, _super);\n function Controller() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return Controller;\n }(constructor)); };\n }\n})();\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmaW5pdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kZWZpbml0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFPQSxjQUFjO0FBQ2QsTUFBTSwwQkFBMEIsVUFBc0I7SUFDcEQsT0FBTztRQUNMLFVBQVUsRUFBRSxVQUFVLENBQUMsVUFBVTtRQUNqQyxxQkFBcUIsRUFBRSwwQkFBMEIsQ0FBQyxVQUFVLENBQUMscUJBQXFCLENBQUM7S0FDcEYsQ0FBQTtBQUNILENBQUM7QUFFRCxvQ0FBb0MscUJBQTRDO0lBQzlFLElBQU0sV0FBVyxHQUFHLE1BQU0sQ0FBQyxxQkFBcUIsQ0FBQyxDQUFBO0lBQ2pELFdBQVcsQ0FBQyxLQUFLLEVBQUUs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lGO0FBQ0gsQ0FBQyxDQUFDLEVBQUUsQ0FBQSJ9","import { Context } from \"./context\";\nimport { blessDefinition } from \"./definition\";\nvar Module = /** @class */ (function () {\n function Module(application, definition) {\n this.application = application;\n this.definition = blessDefinition(definition);\n this.contextsByScope = new WeakMap;\n this.connectedContexts = new Set;\n }\n Object.defineProperty(Module.prototype, \"identifier\", {\n get: function () {\n return this.definition.identifier;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Module.prototype, \"controllerConstructor\", {\n get: function () {\n return this.definition.controllerConstructor;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Module.prototype, \"contexts\", {\n get: function () {\n return Array.from(this.connectedContexts);\n },\n enumerable: true,\n configurable: true\n });\n Module.prototype.connectContextForScope = function (scope) {\n var context = this.fetchContextForScope(scope);\n this.connectedContexts.add(context);\n context.connect();\n };\n Module.prototype.disconnectContextForScope = function (scope) {\n var context = this.contextsByScope.get(scope);\n if (context) {\n this.connectedContexts.delete(context);\n context.disconnect();\n }\n };\n Module.prototype.fetchContextForScope = function (scope) {\n var context = this.contextsByScope.get(scope);\n if (!context) {\n context = new Context(this, scope);\n this.contextsByScope.set(scope, context);\n }\n return context;\n };\n return Module;\n}());\nexport { Module };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL21vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sV0FBVyxDQUFBO0FBRW5DLE9BQU8sRUFBYyxlQUFlLEVBQUUsTUFBTSxjQUFjLENBQUE7QUFHMUQ7SUFNRSxnQkFBWSxXQUF3QixFQUFFLFVBQXNCO1FBQzFELElBQUksQ0FBQyxXQUFXLEdBQUcsV0FBVyxDQUFBO1FBQzlCLElBQUksQ0FBQyxVQUFVLEdBQU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UNBQW9CLEdBQTVCLFVBQTZCLEtBQVk7UUFDdkMsSUFBSSxPQUFPLEdBQUcsSUFBSSxDQUFDLGVBQWUsQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLENBQUE7UUFDN0MsSUFBSSxDQUFDLE9BQU8sRUFBRTtZQUNaLE9BQU8sR0FBRyxJQUFJLE9BQU8sQ0FBQyxJQUFJLEVBQUUsS0FBSyxDQUFDLENBQUE7WUFDbEMsSUFBSSxDQUFDLGVBQWUsQ0FBQyxHQUFHLENBQUMsS0FBSyxFQUFFLE9BQU8sQ0FBQyxDQUFBO1NBQ3pDO1FBQ0QsT0FBTyxPQUFPLENBQUE7SUFDaEIsQ0FBQztJQUNILGFBQUM7QUFBRCxDQUFDLEFBL0NELElBK0NDIn0=","var DataMap = /** @class */ (function () {\n function DataMap(scope) {\n this.scope = scope;\n }\n Object.defineProperty(DataMap.prototype, \"element\", {\n get: function () {\n return this.scope.element;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(DataMap.prototype, \"identifier\", {\n get: function () {\n return this.scope.identifier;\n },\n enumerable: true,\n configurable: true\n });\n DataMap.prototype.get = function (key) {\n key = this.getFormattedKey(key);\n return this.element.getAttribute(key);\n };\n DataMap.prototype.set = function (key, value) {\n key = this.getFormattedKey(key);\n this.element.setAttribute(key, value);\n return this.get(key);\n };\n DataMap.prototype.has = function (key) {\n key = this.getFormattedKey(key);\n return this.element.hasAttribute(key);\n };\n DataMap.prototype.delete = function (key) {\n if (this.has(key)) {\n key = this.getFormattedKey(key);\n this.element.removeAttribute(key);\n return true;\n }\n else {\n return false;\n }\n };\n DataMap.prototype.getFormattedKey = function (key) {\n return \"data-\" + this.identifier + \"-\" + dasherize(key);\n };\n return DataMap;\n}());\nexport { DataMap };\nfunction dasherize(value) {\n return value.replace(/([A-Z])/g, function (_, char) { return \"-\" + char.toLowerCase(); });\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0Y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QyxDQUFBO0lBQ3ZDLENBQUM7SUFFRCx3QkFBTSxHQUFOLFVBQU8sR0FBVztRQUNoQixJQUFJLElBQUksQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLEVBQUU7WUFDakIsR0FBRyxHQUFHLElBQUksQ0FBQyxlQUFlLENBQUMsR0FBRyxDQUFDLENBQUE7WUFDL0IsSUFBSSxDQUFDLE9BQU8sQ0FBQyxlQUFlLENBQUMsR0FBRyxDQUFDLENBQUE7WUFDakMsT0FBTyxJQUFJLENBQUE7U0FDWjthQUFNO1lBQ0wsT0FBTyxLQUFLLENBQUE7U0FDYjtJQUNILENBQUM7SUFFTyxpQ0FBZSxHQUF2QixVQUF3QixHQUFXO1FBQ2pDLE9BQU8sVUFBUSxJQUFJLENBQUMsVUFBVSxTQUFJLFNBQVMsQ0FBQyxHQUFHLENBQUcsQ0FBQTtJQUNwRCxDQUFDO0lBQ0gsY0FBQztBQUFELENBQUMsQUE1Q0QsSUE0Q0M7O0FBRUQsbUJBQW1CLEtBQWE7SUFDOUIsT0FBTyxLQUFLLENBQUMsT0FBTyxDQUFDLFVBQVUsRUFBRSxVQUFDLENBQUMsRUFBRSxJQUFJLElBQUssT0FBQSxNQUFJLElBQUksQ0FBQyxXQUFXLEVBQUksRUFBeEIsQ0FBd0IsQ0FBQyxDQUFBO0FBQ3pFLENBQUMifQ==","/** @hidden */\nexport function attributeValueContainsToken(attributeName, token) {\n return \"[\" + attributeName + \"~=\\\"\" + token + \"\\\"]\";\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VsZWN0b3JzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3NlbGVjdG9ycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjO0FBQ2QsTUFBTSxzQ0FBc0MsYUFBcUIsRUFBRSxLQUFhO0lBQzlFLE9BQU8sTUFBSSxhQUFhLFlBQU0sS0FBSyxRQUFJLENBQUE7QUFDekMsQ0FBQyJ9","import { attributeValueContainsToken } from \"./selectors\";\nvar TargetSet = /** @class */ (function () {\n function TargetSet(scope) {\n this.scope = scope;\n }\n Object.defineProperty(TargetSet.prototype, \"element\", {\n get: function () {\n return this.scope.element;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TargetSet.prototype, \"identifier\", {\n get: function () {\n return this.scope.identifier;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(TargetSet.prototype, \"schema\", {\n get: function () {\n return this.scope.schema;\n },\n enumerable: true,\n configurable: true\n });\n TargetSet.prototype.has = function (targetName) {\n return this.find(targetName) != null;\n };\n TargetSet.prototype.find = function () {\n var targetNames = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n targetNames[_i] = arguments[_i];\n }\n var selector = this.getSelectorForTargetNames(targetNames);\n return this.scope.findElement(selector);\n };\n TargetSet.prototype.findAll = function () {\n var targetNames = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n targetNames[_i] = arguments[_i];\n }\n var selector = this.getSelectorForTargetNames(targetNames);\n return this.scope.findAllElements(selector);\n };\n TargetSet.prototype.getSelectorForTargetNames = function (targetNames) {\n var _this = this;\n return targetNames.map(function (targetName) { return _this.getSelectorForTargetName(targetName); }).join(\", \");\n };\n TargetSet.prototype.getSelectorForTargetName = function (targetName) {\n var targetDescriptor = this.identifier + \".\" + targetName;\n return attributeValueContainsToken(this.schema.targetAttribute, targetDescriptor);\n };\n return TargetSet;\n}());\nexport { TargetSet };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFyZ2V0X3NldC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90YXJnZXRfc2V0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sRUFBRSwyQkFBMkIsRUFBRSxNQUFNLGFBQWEsQ0FBQTtBQU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0FBQyxDQUFBO0lBQzdDLENBQUM7SUFFTyw2Q0FBeUIsR0FBakMsVUFBa0MsV0FBcUI7UUFBdkQsaUJBRUM7UUFEQyxPQUFPLFdBQVcsQ0FBQyxHQUFHLENBQUMsVUFBQSxVQUFVLElBQUksT0FBQSxLQUFJLENBQUMsd0JBQXdCLENBQUMsVUFBVSxDQUFDLEVBQXpDLENBQXlDLENBQUMsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUE7SUFDNUYsQ0FBQztJQUVPLDRDQUF3QixHQUFoQyxVQUFpQyxVQUFrQjtRQUNqRCxJQUFNLGdCQUFnQixHQUFNLElBQUksQ0FBQyxVQUFVLFNBQUksVUFBWSxDQUFBO1FBQzNELE9BQU8sMkJBQTJCLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxlQUFlLEVBQUUsZ0JBQWdCLENBQUMsQ0FBQTtJQUNuRixDQUFDO0lBQ0gsZ0JBQUM7QUFBRCxDQUFDLEFBekNELElBeUNDIn0=","import { DataMap } from \"./data_map\";\nimport { TargetSet } from \"./target_set\";\nimport { attributeValueContainsToken } from \"./selectors\";\nvar Scope = /** @class */ (function () {\n function Scope(schema, identifier, element) {\n this.schema = schema;\n this.identifier = identifier;\n this.element = element;\n this.targets = new TargetSet(this);\n this.data = new DataMap(this);\n }\n Scope.prototype.findElement = function (selector) {\n return this.findAllElements(selector)[0];\n };\n Scope.prototype.findAllElements = function (selector) {\n var head = this.element.matches(selector) ? [this.element] : [];\n var tail = this.filterElements(Array.from(this.element.querySelectorAll(selector)));\n return head.concat(tail);\n };\n Scope.prototype.filterElements = function (elements) {\n var _this = this;\n return elements.filter(function (element) { return _this.containsElement(element); });\n };\n Scope.prototype.containsElement = function (element) {\n return element.closest(this.controllerSelector) === this.element;\n };\n Object.defineProperty(Scope.prototype, \"controllerSelector\", {\n get: function () {\n return attributeValueContainsToken(this.schema.controllerAttribute, this.identifier);\n },\n enumerable: true,\n configurable: true\n });\n return Scope;\n}());\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LElBQU0sSUFBSSxHQUFHLElBQUksQ0FBQyxjQUFjLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLGdCQUFnQixDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsQ0FBQTtRQUNyRixPQUFPLElBQUksQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLENBQUE7SUFDMUIsQ0FBQztJQUVELDhCQUFjLEdBQWQsVUFBZSxRQUFtQjtRQUFsQyxpQkFFQztRQURDLE9BQU8sUUFBUSxDQUFDLE1BQU0sQ0FBQyxVQUFBLE9BQU8sSUFBSSxPQUFBLEtBQUksQ0FBQyxlQUFlLENBQUMsT0FBTyxDQUFDLEVBQTdCLENBQTZCLENBQUMsQ0FBQTtJQUNsRSxDQUFDO0lBRUQsK0JBQWUsR0FBZixVQUFnQixPQUFnQjtRQUM5QixPQUFPLE9BQU8sQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLGtCQUFrQixDQUFDLEtBQUssSUFBSSxDQUFDLE9BQU8sQ0FBQTtJQUNsRSxDQUFDO0lBRUQsc0JBQVkscUNBQWtCO2FBQTlCO1lBQ0UsT0FBTywyQkFBMkIsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLG1CQUFtQixFQUFFLElBQUksQ0FBQyxVQUFVLENBQUMsQ0FBQTtRQUN0RixDQUFDOzs7T0FBQTtJQUNILFlBQUM7QUFBRCxDQUFDLEFBcENELElBb0NDIn0=","import { Scope } from \"./scope\";\nimport { ValueListObserver } from \"@stimulus/mutation-observers\";\nvar ScopeObserver = /** @class */ (function () {\n function ScopeObserver(element, schema, delegate) {\n this.element = element;\n this.schema = schema;\n this.delegate = delegate;\n this.valueListObserver = new ValueListObserver(this.element, this.controllerAttribute, this);\n this.scopesByIdentifierByElement = new WeakMap;\n this.scopeReferenceCounts = new WeakMap;\n }\n ScopeObserver.prototype.start = function () {\n this.valueListObserver.start();\n };\n ScopeObserver.prototype.stop = function () {\n this.valueListObserver.stop();\n };\n Object.defineProperty(ScopeObserver.prototype, \"controllerAttribute\", {\n get: function () {\n return this.schema.controllerAttribute;\n },\n enumerable: true,\n configurable: true\n });\n // Value observer delegate\n /** @hidden */\n ScopeObserver.prototype.parseValueForToken = function (token) {\n var element = token.element, identifier = token.content;\n var scopesByIdentifier = this.fetchScopesByIdentifierForElement(element);\n var scope = scopesByIdentifier.get(identifier);\n if (!scope) {\n scope = new Scope(this.schema, identifier, element);\n scopesByIdentifier.set(identifier, scope);\n }\n return scope;\n };\n /** @hidden */\n ScopeObserver.prototype.elementMatchedValue = function (element, value) {\n var referenceCount = (this.scopeReferenceCounts.get(value) || 0) + 1;\n this.scopeReferenceCounts.set(value, referenceCount);\n if (referenceCount == 1) {\n this.delegate.scopeConnected(value);\n }\n };\n /** @hidden */\n ScopeObserver.prototype.elementUnmatchedValue = function (element, value) {\n var referenceCount = this.scopeReferenceCounts.get(value);\n if (referenceCount) {\n this.scopeReferenceCounts.set(value, referenceCount - 1);\n if (referenceCount == 1) {\n this.delegate.scopeDisconnected(value);\n }\n }\n };\n ScopeObserver.prototype.fetchScopesByIdentifierForElement = function (element) {\n var scopesByIdentifier = this.scopesByIdentifierByElement.get(element);\n if (!scopesByIdentifier) {\n scopesByIdentifier = new Map;\n this.scopesByIdentifierByElement.set(element, scopesByIdentifier);\n }\n return scopesByIdentifier;\n };\n return ScopeObserver;\n}());\nexport { ScopeObserver };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NvcGVfb2JzZXJ2ZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2NvcGVfb2JzZXJ2ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLFNBQVMsQ0FBQTtBQUMvQixPQUFPLEVBQVMsaUJBQWlCLEVBQTZCLE1BQU0sOEJBQThCL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UFBO2FBQ3ZDO1NBQ0Y7SUFDSCxDQUFDO0lBRU8seURBQWlDLEdBQXpDLFVBQTBDLE9BQWdCO1FBQ3hELElBQUksa0JBQWtCLEdBQUcsSUFBSSxDQUFDLDJCQUEyQixDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsQ0FBQTtRQUN0RSxJQUFJLENBQUMsa0JBQWtCLEVBQUU7WUFDdkIsa0JBQWtCLEdBQUcsSUFBSSxHQUFHLENBQUE7WUFDNUIsSUFBSSxDQUFDLDJCQUEyQixDQUFDLEdBQUcsQ0FBQyxPQUFPLEVBQUUsa0JBQWtCLENBQUMsQ0FBQTtTQUNsRTtRQUNELE9BQU8sa0JBQWtCLENBQUE7SUFDM0IsQ0FBQztJQUNILG9CQUFDO0FBQUQsQ0FBQyxBQXpFRCxJQXlFQyJ9","import { Module } from \"./module\";\nimport { Multimap } from \"@stimulus/multimap\";\nimport { ScopeObserver } from \"./scope_observer\";\nvar Router = /** @class */ (function () {\n function Router(application) {\n this.application = application;\n this.scopeObserver = new ScopeObserver(this.element, this.schema, this);\n this.scopesByIdentifier = new Multimap;\n this.modulesByIdentifier = new Map;\n }\n Object.defineProperty(Router.prototype, \"element\", {\n get: function () {\n return this.application.element;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Router.prototype, \"schema\", {\n get: function () {\n return this.application.schema;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Router.prototype, \"controllerAttribute\", {\n get: function () {\n return this.schema.controllerAttribute;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Router.prototype, \"modules\", {\n get: function () {\n return Array.from(this.modulesByIdentifier.values());\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Router.prototype, \"contexts\", {\n get: function () {\n return this.modules.reduce(function (contexts, module) { return contexts.concat(module.contexts); }, []);\n },\n enumerable: true,\n configurable: true\n });\n Router.prototype.start = function () {\n this.scopeObserver.start();\n };\n Router.prototype.stop = function () {\n this.scopeObserver.stop();\n };\n Router.prototype.loadDefinition = function (definition) {\n this.unloadIdentifier(definition.identifier);\n var module = new Module(this.application, definition);\n this.connectModule(module);\n };\n Router.prototype.unloadIdentifier = function (identifier) {\n var module = this.modulesByIdentifier.get(identifier);\n if (module) {\n this.disconnectModule(module);\n }\n };\n Router.prototype.getContextForElementAndIdentifier = function (element, identifier) {\n var module = this.modulesByIdentifier.get(identifier);\n if (module) {\n return module.contexts.find(function (context) { return context.element == element; });\n }\n };\n // Error handler delegate\n /** @hidden */\n Router.prototype.handleError = function (error, message, detail) {\n this.application.handleError(error, message, detail);\n };\n // Scope observer delegate\n /** @hidden */\n Router.prototype.scopeConnected = function (scope) {\n this.scopesByIdentifier.add(scope.identifier, scope);\n var module = this.modulesByIdentifier.get(scope.identifier);\n if (module) {\n module.connectContextForScope(scope);\n }\n };\n /** @hidden */\n Router.prototype.scopeDisconnected = function (scope) {\n this.scopesByIdentifier.delete(scope.identifier, scope);\n var module = this.modulesByIdentifier.get(scope.identifier);\n if (module) {\n module.disconnectContextForScope(scope);\n }\n };\n // Modules\n Router.prototype.connectModule = function (module) {\n this.modulesByIdentifier.set(module.identifier, module);\n var scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n scopes.forEach(function (scope) { return module.connectContextForScope(scope); });\n };\n Router.prototype.disconnectModule = function (module) {\n this.modulesByIdentifier.delete(module.identifier);\n var scopes = this.scopesByIdentifier.getValuesForKey(module.identifier);\n scopes.forEach(function (scope) { return module.disconnectContextForScope(scope); });\n };\n return Router;\n}());\nexport { Router };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3JvdXRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHQSxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0sVUFBVSxDQUFBO0FBQ2pDLE9BQU8sRUFBRSxRQUFR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hLEdBQXJCLFVBQXNCLE1BQWM7UUFDbEMsSUFBSSxDQUFDLG1CQUFtQixDQUFDLEdBQUcsQ0FBQyxNQUFNLENBQUMsVUFBVSxFQUFFLE1BQU0sQ0FBQyxDQUFBO1FBQ3ZELElBQU0sTUFBTSxHQUFHLElBQUksQ0FBQyxrQkFBa0IsQ0FBQyxlQUFlLENBQUMsTUFBTSxDQUFDLFVBQVUsQ0FBQyxDQUFBO1FBQ3pFLE1BQU0sQ0FBQyxPQUFPLENBQUMsVUFBQSxLQUFLLElBQUksT0FBQSxNQUFNLENBQUMsc0JBQXNCLENBQUMsS0FBSyxDQUFDLEVBQXBDLENBQW9DLENBQUMsQ0FBQTtJQUMvRCxDQUFDO0lBRU8saUNBQWdCLEdBQXhCLFVBQXlCLE1BQWM7UUFDckMsSUFBSSxDQUFDLG1CQUFtQixDQUFDLE1BQU0sQ0FBQyxNQUFNLENBQUMsVUFBVSxDQUFDLENBQUE7UUFDbEQsSUFBTSxNQUFNLEdBQUcsSUFBSSxDQUFDLGtCQUFrQixDQUFDLGVBQWUsQ0FBQyxNQUFNLENBQUMsVUFBVSxDQUFDLENBQUE7UUFDekUsTUFBTSxDQUFDLE9BQU8sQ0FBQyxVQUFBLEtBQUssSUFBSSxPQUFBLE1BQU0sQ0FBQyx5QkFBeUIsQ0FBQyxLQUFLLENBQUMsRUFBdkMsQ0FBdUMsQ0FBQyxDQUFBO0lBQ2xFLENBQUM7SUFDSCxhQUFDO0FBQUQsQ0FBQyxBQXJHRCxJQXFHQyJ9","export var defaultSchema = {\n controllerAttribute: \"data-controller\",\n actionAttribute: \"data-action\",\n targetAttribute: \"data-target\"\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NoZW1hLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3NjaGVtYS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNQSxNQUFNLENBQUMsSUFBTSxhQUFhLEdBQVc7SUFDbkMsbUJBQW1CLEVBQUUsaUJBQWlCO0lBQ3RDLGVBQWUsRUFBRSxhQUFhO0lBQzlCLGVBQWUsRUFBRSxhQUFhO0NBQy9CLENBQUEifQ==","var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [0, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nimport { Dispatcher } from \"./dispatcher\";\nimport { Router } from \"./router\";\nimport { defaultSchema } from \"./schema\";\nvar Application = /** @class */ (function () {\n function Application(element, schema) {\n if (element === void 0) { element = document.documentElement; }\n if (schema === void 0) { schema = defaultSchema; }\n this.element = element;\n this.schema = schema;\n this.dispatcher = new Dispatcher(this);\n this.router = new Router(this);\n }\n Application.start = function (element, schema) {\n var application = new Application(element, schema);\n application.start();\n return application;\n };\n Application.prototype.start = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, domReady()];\n case 1:\n _a.sent();\n this.router.start();\n this.dispatcher.start();\n return [2 /*return*/];\n }\n });\n });\n };\n Application.prototype.stop = function () {\n this.router.stop();\n this.dispatcher.stop();\n };\n Application.prototype.register = function (identifier, controllerConstructor) {\n this.load({ identifier: identifier, controllerConstructor: controllerConstructor });\n };\n Application.prototype.load = function (head) {\n var _this = this;\n var rest = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n rest[_i - 1] = arguments[_i];\n }\n var definitions = Array.isArray(head) ? head : [head].concat(rest);\n definitions.forEach(function (definition) { return _this.router.loadDefinition(definition); });\n };\n Application.prototype.unload = function (head) {\n var _this = this;\n var rest = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n rest[_i - 1] = arguments[_i];\n }\n var identifiers = Array.isArray(head) ? head : [head].concat(rest);\n identifiers.forEach(function (identifier) { return _this.router.unloadIdentifier(identifier); });\n };\n Object.defineProperty(Application.prototype, \"controllers\", {\n // Controllers\n get: function () {\n return this.router.contexts.map(function (context) { return context.controller; });\n },\n enumerable: true,\n configurable: true\n });\n Application.prototype.getControllerForElementAndIdentifier = function (element, identifier) {\n var context = this.router.getContextForElementAndIdentifier(element, identifier);\n return context ? context.controller : null;\n };\n // Error handling\n Application.prototype.handleError = function (error, message, detail) {\n console.error(\"%s\\n\\n%o\\n\\n%o\", message, error, detail);\n };\n return Application;\n}());\nexport { Application };\nfunction domReady() {\n return new Promise(function (resolve) {\n if (document.readyState == \"loading\") {\n document.addEventListener(\"DOMContentLoaded\", resolve);\n }\n else {\n resolve();\n }\n });\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwbGljYXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvYXBwbGljYXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFFQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sY0FBYyxDQUFBO0FBRXpDLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxVQUFVLENBQUE7QUFDakMsT0FBTyxFQUFVLGFBQWEsRUFBRSxNQUFNLFVBQVUsQ0FBQTtBQUVoRDtJQVlFLHFCQUFZLE9BQTJDLEVBQUUsTUFBOEI7UUFBM0Usd0JBQUEsRUFBQSxVQUFtQixRQUFRLENBQUMsZUFBZTtRQUFFLHVCQUFBLEVBQUEsc0JBQThCO1FBQ3JGLElBQUksQ0FBQyxPQUFPLEdBQUcsT0FBTyxDQUFBO1FBQ3RCLElBQUksQ0FBQyxNQUFNLEdBQUcsTUFBTSxDQUFBO1FBQ3BCLElBQUksQ0FBQyxVQUFVLEdBQUcsSUFBSSxVQUFVLENBQUMsSUFBSSxDQUFDLENBQUE7UUFDdEMsSUFBSSxDQUFDLE1BQU0sR0FBRyxJQUFJLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQTtJQUNoQyxDQUFDO0lBWE0saUJBQUssR0FBWixVQUFhLE9BQWlCLEVBQUUsTUFBZTtRQUM3QyxJQUFNLFdBQVcsR0FBRyxJQUFJLF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FLE9BQWUsRUFBRSxNQUFjO1FBQ3ZELE9BQU8sQ0FBQyxLQUFLLENBQUMsZ0JBQWdCLEVBQUUsT0FBTyxFQUFFLEtBQUssRUFBRSxNQUFNLENBQUMsQ0FBQTtJQUN6RCxDQUFDO0lBQ0gsa0JBQUM7QUFBRCxDQUFDLEFBaEVELElBZ0VDOztBQUVEO0lBQ0UsT0FBTyxJQUFJLE9BQU8sQ0FBQyxVQUFBLE9BQU87UUFDeEIsSUFBSSxRQUFRLENBQUMsVUFBVSxJQUFJLFNBQVMsRUFBRTtZQUNwQyxRQUFRLENBQUMsZ0JBQWdCLENBQUMsa0JBQWtCLEVBQUUsT0FBTyxDQUFDLENBQUE7U0FDdkQ7YUFBTTtZQUNMLE9BQU8sRUFBRSxDQUFBO1NBQ1Y7SUFDSCxDQUFDLENBQUMsQ0FBQTtBQUNKLENBQUMifQ==","/** @hidden */\nexport function defineTargetProperties(constructor) {\n var prototype = constructor.prototype;\n var targetNames = getTargetNamesForConstructor(constructor);\n targetNames.forEach(function (name) {\n var _a;\n return defineLinkedProperties(prototype, (_a = {},\n _a[name + \"Target\"] = {\n get: function () {\n var target = this.targets.find(name);\n if (target) {\n return target;\n }\n else {\n throw new Error(\"Missing target element \\\"\" + this.identifier + \".\" + name + \"\\\"\");\n }\n }\n },\n _a[name + \"Targets\"] = {\n get: function () {\n return this.targets.findAll(name);\n }\n },\n _a[\"has\" + capitalize(name) + \"Target\"] = {\n get: function () {\n return this.targets.has(name);\n }\n },\n _a));\n });\n}\nfunction getTargetNamesForConstructor(constructor) {\n var ancestors = getAncestorsForConstructor(constructor);\n return Array.from(ancestors.reduce(function (targetNames, constructor) {\n getOwnTargetNamesForConstructor(constructor).forEach(function (name) { return targetNames.add(name); });\n return targetNames;\n }, new Set));\n}\nfunction getAncestorsForConstructor(constructor) {\n var ancestors = [];\n while (constructor) {\n ancestors.push(constructor);\n constructor = Object.getPrototypeOf(constructor);\n }\n return ancestors;\n}\nfunction getOwnTargetNamesForConstructor(constructor) {\n var definition = constructor[\"targets\"];\n return Array.isArray(definition) ? definition : [];\n}\nfunction defineLinkedProperties(object, properties) {\n Object.keys(properties).forEach(function (name) {\n if (!(name in object)) {\n var descriptor = properties[name];\n Object.defineProperty(object, name, descriptor);\n }\n });\n}\nfunction capitalize(name) {\n return name.charAt(0).toUpperCase() + name.slice(1);\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFyZ2V0X3Byb3BlcnRpZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdGFyZ2V0X3Byb3BlcnRpZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUEsY0FBYztBQUNkLE1BQU0saUNBQWlDLFdBQXFCO0lBQzFELElBQU0sU0FBUyxHQUFHLFdBQVcsQ0FBQyxTQUFTLENBQUE7SUFDdkMsSUFBTSxXQUFXLEdBQUcsNEJBQTRCLENBQUMsV0FBVyxDQUFDLENBQUE7SUFDN0QsV0FBVyxDQUFDLE9BQU8sQ0FBQyxVQUFBLElBQUk7O1FBQUksT0FBQSxzQkFBc0IsQ0FBQyxTQUFTO1lBQzFELEdBQUksSUFBSSxXQUFRLElBQUc7Z0JBQ2pCLEdBQUc7b0JBQ0QsSUFBTSxNQUFNLEdBQUcsSUFBSSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLENBQUE7b0JBQ3RDLElBQUksTUFBTSxFQUFFO3dCQUNWLE9BQU8sTUFBTSxDQUFBO3FCQUNkO3lCQUFNO3dCQUNMLE1BQU0sSUFBSSxLQUFLLENBQUMsOEJBQTJCLElBQUksQ0FBQyxVQUFVLFNBQUksSUFBSSxPQUFHLENBQUMsQ0FBQTtxQkFDdkU7Z0JBQ0gsQ0FBQzthQUNGO1lBQ0QsR0FBSSxJQUFJLFlBQVMsSUFBRztnQkFDbEIsR0FBRztvQkFDRCxPQUFPLElBQUksQ0FBQy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UFNLFVBQVUsR0FBSSxXQUFtQixDQUFDLFNBQVMsQ0FBQyxDQUFBO0lBQ2xELE9BQU8sS0FBSyxDQUFDLE9BQU8sQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUE7QUFDcEQsQ0FBQztBQUVELGdDQUFnQyxNQUFXLEVBQUUsVUFBaUM7SUFDNUUsTUFBTSxDQUFDLElBQUksQ0FBQyxVQUFVLENBQUMsQ0FBQyxPQUFPLENBQUMsVUFBQyxJQUFJO1FBQ25DLElBQUksQ0FBQyxDQUFDLElBQUksSUFBSSxNQUFNLENBQUMsRUFBRTtZQUNyQixJQUFNLFVBQVUsR0FBRyxVQUFVLENBQUMsSUFBSSxDQUFDLENBQUE7WUFDbkMsTUFBTSxDQUFDLGNBQWMsQ0FBQyxNQUFNLEVBQUUsSUFBSSxFQUFFLFVBQVUsQ0FBQyxDQUFBO1NBQ2hEO0lBQ0gsQ0FBQyxDQUFDLENBQUE7QUFDSixDQUFDO0FBRUQsb0JBQW9CLElBQVk7SUFDOUIsT0FBTyxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDLFdBQVcsRUFBRSxHQUFHLElBQUksQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLENBQUE7QUFDckQsQ0FBQyJ9","import { defineTargetProperties } from \"./target_properties\";\nvar Controller = /** @class */ (function () {\n function Controller(context) {\n this.context = context;\n }\n Controller.bless = function () {\n defineTargetProperties(this);\n };\n Object.defineProperty(Controller.prototype, \"application\", {\n get: function () {\n return this.context.application;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Controller.prototype, \"scope\", {\n get: function () {\n return this.context.scope;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Controller.prototype, \"element\", {\n get: function () {\n return this.scope.element;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Controller.prototype, \"identifier\", {\n get: function () {\n return this.scope.identifier;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Controller.prototype, \"targets\", {\n get: function () {\n return this.scope.targets;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Controller.prototype, \"data\", {\n get: function () {\n return this.scope.data;\n },\n enumerable: true,\n configurable: true\n });\n Controller.prototype.initialize = function () {\n // Override in your subclass to set up initial controller state\n };\n Controller.prototype.connect = function () {\n // Override in your subclass to respond when the controller is connected to the DOM\n };\n Controller.prototype.disconnect = function () {\n // Override in your subclass to respond when the controller is disconnected from the DOM\n };\n Controller.targets = [];\n return Controller;\n}());\nexport { Controller };\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJvbGxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb250cm9sbGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUtBLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLHFCQUFxQixDQUFBO0FBTzVEO0lBU0Usb0JBQVksT0FBZ0I7UUFDMUIsSUFBSSxDQUFDLE9BQU8sR0FBRyxPQUFPLENBQUE7SUFDeEIsQ0FBQztJQU5NLGdCQUFLLEdBQVo7UUFDRSxzQkFBc0IsQ0FBQyxJQUFJLENBQUMsQ0FBQTtJQUM5QixDQUFDO0lBTUQsc0JBQUksbUNBQVc7YUFBZjtZQUNFLE9BQU8sSUFBSSxDQUFDLE9BQU8sQ0FBQyxXQUFXLENBQUE7UUFDakMsQ0FBQzs7O09BQUE7SUFFRCxzQkFBSSw2QkFBSzthQUFUO1lBQ0UsT0FBTyxJQUFJLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQTtRQUMzQixDQUFDOzs7T0FBQTtJQUVELHNCQUFJLCtCQUFPO2FBQVg7WUFDRSxPQUFPLElBQUksQ0FBQyxLQUFLLENBQUMsT0FBTyxDQUFBO1FBQzNCLENBQUM7OztPQUFBO0lBRUQsc0JBQUksa0NBQVU7YUFBZDtZQUNFLE9BQU8sSUFBSSxDQUFDLEtBQUssQ0FBQyxVQUFVLENBQUE7UUFDOUIsQ0FBQzs7O09BQUE7SUFFRCxzQkFBSSwrQkFBTzthQUFYO1lBQ0UsT0FBTyxJQUFJLENBQUMsS0FBSyxDQUFDLE9BQU8sQ0FBQTtRQUMzQixDQUFDOzs7T0FBQTtJQUVELHNCQUFJLDRCQUFJO2FBQVI7WUFDRSxPQUFPLElBQUksQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFBO1FBQ3hCLENBQUM7OztPQUFBO0lBRUQsK0JBQVUsR0FBVjtRQUNFLCtEQUErRDtJQUNqRSxDQUFDO0lBRUQsNEJBQU8sR0FBUDtRQUNFLG1GQUFtRjtJQUNyRixDQUFDO0lBRUQsK0JBQVUsR0FBVjtRQUNFLHdGQUF3RjtJQUMxRixDQUFDO0lBOUNNLGtCQUFPLEdBQWEsRUFBRSxDQUFBO0lBK0MvQixpQkFBQztDQUFBLEFBaERELElBZ0RDO1NBaERZLFVBQVUifQ==","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nfunction getSideList(side, isStart, rtl) {\n const lr = ['left', 'right'];\n const rl = ['right', 'left'];\n const tb = ['top', 'bottom'];\n const bt = ['bottom', 'top'];\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rl : lr;\n return isStart ? lr : rl;\n case 'left':\n case 'right':\n return isStart ? tb : bt;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const validMiddleware = middleware.filter(Boolean);\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let middlewareData = {};\n let resetCount = 0;\n for (let i = 0; i < validMiddleware.length; i++) {\n const {\n name,\n fn\n } = validMiddleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = {\n ...middlewareData,\n [name]: {\n ...middlewareData[name],\n ...data\n }\n };\n if (reset && resetCount <= 50) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n x,\n y,\n width: rects.floating.width,\n height: rects.floating.height\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const initialSideAxis = getSideAxis(initialPlacement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$filter2;\n const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n if (hasFallbackAxisSideDirection) {\n const currentSideAxis = getSideAxis(d.placement);\n return currentSideAxis === initialSideAxis ||\n // Create a bias to the `y` side axis due to horizontal\n // reading directions favoring greater width.\n currentSideAxis === 'y';\n }\n return true;\n }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n\n // eslint-disable-next-line prefer-const\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: rawValue.mainAxis || 0,\n crossAxis: rawValue.crossAxis || 0,\n alignmentAxis: rawValue.alignmentAxis\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y,\n enabled: {\n [mainAxis]: checkMainAxis,\n [crossAxis]: checkCrossAxis\n }\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = ['top', 'left'].includes(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n var _state$middlewareData, _state$middlewareData2;\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n const maximumClippingWidth = width - overflow.left - overflow.right;\n const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {\n availableWidth = maximumClippingWidth;\n }\n if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {\n availableHeight = maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);\n}\nfunction isTableElement(element) {\n return ['table', 'td', 'th'].includes(getNodeName(element));\n}\nfunction isTopLayer(element) {\n return [':popover-open', ':modal'].some(selector => {\n try {\n return element.matches(selector);\n } catch (e) {\n return false;\n }\n });\n}\nfunction isContainingBlock(elementOrCss) {\n const webkit = isWebKit();\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nfunction isLastTraversableNode(node) {\n return ['html', 'body', '#document'].includes(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","import { rectToClientRect, detectOverflow as detectOverflow$1, offset as offset$1, autoPlacement as autoPlacement$1, shift as shift$1, flip as flip$1, size as size$1, hide as hide$1, arrow as arrow$1, inline as inline$1, limitShift as limitShift$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = getFrameElement(currentWin);\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = getFrameElement(currentWin);\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\n// If has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n const leftScroll = getNodeScroll(element).scrollLeft;\n if (!rect) {\n return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n }\n return rect.left + leftScroll;\n}\n\nfunction getHTMLOffset(documentElement, scroll, ignoreScrollbarX) {\n if (ignoreScrollbarX === void 0) {\n ignoreScrollbarX = false;\n }\n const htmlRect = documentElement.getBoundingClientRect();\n const x = htmlRect.left + scroll.scrollLeft - (ignoreScrollbarX ? 0 :\n // RTL scrollbar.\n getWindowScrollBarX(documentElement, htmlRect));\n const y = htmlRect.top + scroll.scrollTop;\n return {\n x,\n y\n };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll, true) : createCoords(0);\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y,\n width: clippingAncestor.width,\n height: clippingAncestor.height\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n // If the scrollbar appears on the left (e.g. RTL systems). Use\n // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction isStaticPositioned(element) {\n return getComputedStyle(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n let rawOffsetParent = element.offsetParent;\n\n // Firefox returns the element as the offsetParent if it's non-static,\n // while Chrome and Safari return the element. The element must\n // be used to perform the correct calculations even if the element is\n // non-static.\n if (getDocumentElement(element) === rawOffsetParent) {\n rawOffsetParent = rawOffsetParent.ownerDocument.body;\n }\n return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const win = getWindow(element);\n if (isTopLayer(element)) {\n return win;\n }\n if (!isHTMLElement(element)) {\n let svgOffsetParent = getParentNode(element);\n while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n return svgOffsetParent;\n }\n svgOffsetParent = getParentNode(svgOffsetParent);\n }\n return win;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n return win;\n }\n return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n const floatingDimensions = await getDimensionsFn(data.floating);\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n width: floatingDimensions.width,\n height: floatingDimensions.height\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const {\n left,\n top,\n width,\n height\n } = element.getBoundingClientRect();\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n // If the reference is clipped, the ratio is 0. Throttle the refresh\n // to prevent an infinite loop of updates.\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle