@customerio/cdp-analytics-browser 0.0.0-test-oidc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.MD +22 -0
- package/README.md +36 -0
- package/dist/cjs/browser/browser-umd.js +20 -0
- package/dist/cjs/browser/browser-umd.js.map +1 -0
- package/dist/cjs/browser/index.js +334 -0
- package/dist/cjs/browser/index.js.map +1 -0
- package/dist/cjs/browser/standalone-analytics.js +62 -0
- package/dist/cjs/browser/standalone-analytics.js.map +1 -0
- package/dist/cjs/browser/standalone-interface.js +3 -0
- package/dist/cjs/browser/standalone-interface.js.map +1 -0
- package/dist/cjs/browser/standalone.js +90 -0
- package/dist/cjs/browser/standalone.js.map +1 -0
- package/dist/cjs/core/analytics/index.js +545 -0
- package/dist/cjs/core/analytics/index.js.map +1 -0
- package/dist/cjs/core/analytics/interfaces.js +3 -0
- package/dist/cjs/core/analytics/interfaces.js.map +1 -0
- package/dist/cjs/core/arguments-resolver/index.js +106 -0
- package/dist/cjs/core/arguments-resolver/index.js.map +1 -0
- package/dist/cjs/core/auto-track.js +108 -0
- package/dist/cjs/core/auto-track.js.map +1 -0
- package/dist/cjs/core/buffer/index.js +237 -0
- package/dist/cjs/core/buffer/index.js.map +1 -0
- package/dist/cjs/core/buffer/snippet.js +32 -0
- package/dist/cjs/core/buffer/snippet.js.map +1 -0
- package/dist/cjs/core/callback/index.js +7 -0
- package/dist/cjs/core/callback/index.js.map +1 -0
- package/dist/cjs/core/connection/index.js +16 -0
- package/dist/cjs/core/connection/index.js.map +1 -0
- package/dist/cjs/core/context/index.js +19 -0
- package/dist/cjs/core/context/index.js.map +1 -0
- package/dist/cjs/core/environment/index.js +12 -0
- package/dist/cjs/core/environment/index.js.map +1 -0
- package/dist/cjs/core/events/index.js +134 -0
- package/dist/cjs/core/events/index.js.map +1 -0
- package/dist/cjs/core/events/interfaces.js +3 -0
- package/dist/cjs/core/events/interfaces.js.map +1 -0
- package/dist/cjs/core/inspector/index.js +14 -0
- package/dist/cjs/core/inspector/index.js.map +1 -0
- package/dist/cjs/core/plugin/index.js +3 -0
- package/dist/cjs/core/plugin/index.js.map +1 -0
- package/dist/cjs/core/query-string/gracefulDecodeURIComponent.js +20 -0
- package/dist/cjs/core/query-string/gracefulDecodeURIComponent.js.map +1 -0
- package/dist/cjs/core/query-string/index.js +48 -0
- package/dist/cjs/core/query-string/index.js.map +1 -0
- package/dist/cjs/core/query-string/pickPrefix.js +20 -0
- package/dist/cjs/core/query-string/pickPrefix.js.map +1 -0
- package/dist/cjs/core/queue/event-queue.js +15 -0
- package/dist/cjs/core/queue/event-queue.js.map +1 -0
- package/dist/cjs/core/stats/index.js +23 -0
- package/dist/cjs/core/stats/index.js.map +1 -0
- package/dist/cjs/core/stats/remote-metrics.js +107 -0
- package/dist/cjs/core/stats/remote-metrics.js.map +1 -0
- package/dist/cjs/core/user/index.js +422 -0
- package/dist/cjs/core/user/index.js.map +1 -0
- package/dist/cjs/core/user/tld.js +64 -0
- package/dist/cjs/core/user/tld.js.map +1 -0
- package/dist/cjs/generated/version.js +6 -0
- package/dist/cjs/generated/version.js.map +1 -0
- package/dist/cjs/index.js +15 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/lib/bind-all.js +17 -0
- package/dist/cjs/lib/bind-all.js.map +1 -0
- package/dist/cjs/lib/browser-polyfill.js +22 -0
- package/dist/cjs/lib/browser-polyfill.js.map +1 -0
- package/dist/cjs/lib/create-deferred.js +21 -0
- package/dist/cjs/lib/create-deferred.js.map +1 -0
- package/dist/cjs/lib/csp-detection.js +33 -0
- package/dist/cjs/lib/csp-detection.js.map +1 -0
- package/dist/cjs/lib/embedded-write-key.js +22 -0
- package/dist/cjs/lib/embedded-write-key.js.map +1 -0
- package/dist/cjs/lib/fetch.js +19 -0
- package/dist/cjs/lib/fetch.js.map +1 -0
- package/dist/cjs/lib/get-global.js +21 -0
- package/dist/cjs/lib/get-global.js.map +1 -0
- package/dist/cjs/lib/get-process-env.js +15 -0
- package/dist/cjs/lib/get-process-env.js.map +1 -0
- package/dist/cjs/lib/global-analytics-helper.js +34 -0
- package/dist/cjs/lib/global-analytics-helper.js.map +1 -0
- package/dist/cjs/lib/group-by.js +28 -0
- package/dist/cjs/lib/group-by.js.map +1 -0
- package/dist/cjs/lib/is-plan-event-enabled.js +20 -0
- package/dist/cjs/lib/is-plan-event-enabled.js.map +1 -0
- package/dist/cjs/lib/is-thenable.js +15 -0
- package/dist/cjs/lib/is-thenable.js.map +1 -0
- package/dist/cjs/lib/load-script.js +56 -0
- package/dist/cjs/lib/load-script.js.map +1 -0
- package/dist/cjs/lib/merged-options.js +31 -0
- package/dist/cjs/lib/merged-options.js.map +1 -0
- package/dist/cjs/lib/on-page-leave.js +35 -0
- package/dist/cjs/lib/on-page-leave.js.map +1 -0
- package/dist/cjs/lib/p-while.js +25 -0
- package/dist/cjs/lib/p-while.js.map +1 -0
- package/dist/cjs/lib/parse-cdn.js +86 -0
- package/dist/cjs/lib/parse-cdn.js.map +1 -0
- package/dist/cjs/lib/priority-queue/backoff.js +10 -0
- package/dist/cjs/lib/priority-queue/backoff.js.map +1 -0
- package/dist/cjs/lib/priority-queue/index.js +7 -0
- package/dist/cjs/lib/priority-queue/index.js.map +1 -0
- package/dist/cjs/lib/priority-queue/persisted.js +108 -0
- package/dist/cjs/lib/priority-queue/persisted.js.map +1 -0
- package/dist/cjs/lib/sleep.js +10 -0
- package/dist/cjs/lib/sleep.js.map +1 -0
- package/dist/cjs/lib/to-facade.js +32 -0
- package/dist/cjs/lib/to-facade.js.map +1 -0
- package/dist/cjs/node/index.js +43 -0
- package/dist/cjs/node/index.js.map +1 -0
- package/dist/cjs/node/node.browser.js +13 -0
- package/dist/cjs/node/node.browser.js.map +1 -0
- package/dist/cjs/plugins/ajs-destination/index.js +345 -0
- package/dist/cjs/plugins/ajs-destination/index.js.map +1 -0
- package/dist/cjs/plugins/ajs-destination/loader.js +110 -0
- package/dist/cjs/plugins/ajs-destination/loader.js.map +1 -0
- package/dist/cjs/plugins/ajs-destination/types.js +3 -0
- package/dist/cjs/plugins/ajs-destination/types.js.map +1 -0
- package/dist/cjs/plugins/ajs-destination/utils.js +23 -0
- package/dist/cjs/plugins/ajs-destination/utils.js.map +1 -0
- package/dist/cjs/plugins/analytics-node/index.js +65 -0
- package/dist/cjs/plugins/analytics-node/index.js.map +1 -0
- package/dist/cjs/plugins/customerio/batched-dispatcher.js +102 -0
- package/dist/cjs/plugins/customerio/batched-dispatcher.js.map +1 -0
- package/dist/cjs/plugins/customerio/fetch-dispatcher.js +18 -0
- package/dist/cjs/plugins/customerio/fetch-dispatcher.js.map +1 -0
- package/dist/cjs/plugins/customerio/index.js +98 -0
- package/dist/cjs/plugins/customerio/index.js.map +1 -0
- package/dist/cjs/plugins/customerio/normalize.js +176 -0
- package/dist/cjs/plugins/customerio/normalize.js.map +1 -0
- package/dist/cjs/plugins/customerio/schedule-flush.js +76 -0
- package/dist/cjs/plugins/customerio/schedule-flush.js.map +1 -0
- package/dist/cjs/plugins/in-app-plugin/events.js +41 -0
- package/dist/cjs/plugins/in-app-plugin/events.js.map +1 -0
- package/dist/cjs/plugins/in-app-plugin/index.js +237 -0
- package/dist/cjs/plugins/in-app-plugin/index.js.map +1 -0
- package/dist/cjs/plugins/legacy-video-plugins/index.js +25 -0
- package/dist/cjs/plugins/legacy-video-plugins/index.js.map +1 -0
- package/dist/cjs/plugins/middleware/index.js +124 -0
- package/dist/cjs/plugins/middleware/index.js.map +1 -0
- package/dist/cjs/plugins/page-enrichment/index.js +98 -0
- package/dist/cjs/plugins/page-enrichment/index.js.map +1 -0
- package/dist/cjs/plugins/remote-loader/index.js +211 -0
- package/dist/cjs/plugins/remote-loader/index.js.map +1 -0
- package/dist/cjs/plugins/remote-middleware/index.js +70 -0
- package/dist/cjs/plugins/remote-middleware/index.js.map +1 -0
- package/dist/cjs/plugins/routing-middleware/index.js +27 -0
- package/dist/cjs/plugins/routing-middleware/index.js.map +1 -0
- package/dist/cjs/plugins/schema-filter/index.js +67 -0
- package/dist/cjs/plugins/schema-filter/index.js.map +1 -0
- package/dist/cjs/plugins/validation/index.js +70 -0
- package/dist/cjs/plugins/validation/index.js.map +1 -0
- package/dist/cjs/vendor/tsub/tsub.js +645 -0
- package/dist/cjs/vendor/tsub/tsub.js.map +1 -0
- package/dist/cjs/vendor/tsub/types.js +3 -0
- package/dist/cjs/vendor/tsub/types.js.map +1 -0
- package/dist/pkg/browser/browser-umd.js +17 -0
- package/dist/pkg/browser/browser-umd.js.map +1 -0
- package/dist/pkg/browser/index.js +330 -0
- package/dist/pkg/browser/index.js.map +1 -0
- package/dist/pkg/browser/standalone-analytics.js +58 -0
- package/dist/pkg/browser/standalone-analytics.js.map +1 -0
- package/dist/pkg/browser/standalone-interface.js +2 -0
- package/dist/pkg/browser/standalone-interface.js.map +1 -0
- package/dist/pkg/browser/standalone.js +88 -0
- package/dist/pkg/browser/standalone.js.map +1 -0
- package/dist/pkg/core/analytics/index.js +542 -0
- package/dist/pkg/core/analytics/index.js.map +1 -0
- package/dist/pkg/core/analytics/interfaces.js +2 -0
- package/dist/pkg/core/analytics/interfaces.js.map +1 -0
- package/dist/pkg/core/arguments-resolver/index.js +99 -0
- package/dist/pkg/core/arguments-resolver/index.js.map +1 -0
- package/dist/pkg/core/auto-track.js +103 -0
- package/dist/pkg/core/auto-track.js.map +1 -0
- package/dist/pkg/core/buffer/index.js +231 -0
- package/dist/pkg/core/buffer/index.js.map +1 -0
- package/dist/pkg/core/buffer/snippet.js +27 -0
- package/dist/pkg/core/buffer/snippet.js.map +1 -0
- package/dist/pkg/core/callback/index.js +2 -0
- package/dist/pkg/core/callback/index.js.map +1 -0
- package/dist/pkg/core/connection/index.js +11 -0
- package/dist/pkg/core/connection/index.js.map +1 -0
- package/dist/pkg/core/context/index.js +16 -0
- package/dist/pkg/core/context/index.js.map +1 -0
- package/dist/pkg/core/environment/index.js +7 -0
- package/dist/pkg/core/environment/index.js.map +1 -0
- package/dist/pkg/core/events/index.js +131 -0
- package/dist/pkg/core/events/index.js.map +1 -0
- package/dist/pkg/core/events/interfaces.js +2 -0
- package/dist/pkg/core/events/interfaces.js.map +1 -0
- package/dist/pkg/core/inspector/index.js +10 -0
- package/dist/pkg/core/inspector/index.js.map +1 -0
- package/dist/pkg/core/plugin/index.js +2 -0
- package/dist/pkg/core/plugin/index.js.map +1 -0
- package/dist/pkg/core/query-string/gracefulDecodeURIComponent.js +16 -0
- package/dist/pkg/core/query-string/gracefulDecodeURIComponent.js.map +1 -0
- package/dist/pkg/core/query-string/index.js +44 -0
- package/dist/pkg/core/query-string/index.js.map +1 -0
- package/dist/pkg/core/query-string/pickPrefix.js +16 -0
- package/dist/pkg/core/query-string/pickPrefix.js.map +1 -0
- package/dist/pkg/core/queue/event-queue.js +12 -0
- package/dist/pkg/core/queue/event-queue.js.map +1 -0
- package/dist/pkg/core/stats/index.js +20 -0
- package/dist/pkg/core/stats/index.js.map +1 -0
- package/dist/pkg/core/stats/remote-metrics.js +104 -0
- package/dist/pkg/core/stats/remote-metrics.js.map +1 -0
- package/dist/pkg/core/user/index.js +418 -0
- package/dist/pkg/core/user/index.js.map +1 -0
- package/dist/pkg/core/user/tld.js +59 -0
- package/dist/pkg/core/user/tld.js.map +1 -0
- package/dist/pkg/generated/version.js +3 -0
- package/dist/pkg/generated/version.js.map +1 -0
- package/dist/pkg/index.js +10 -0
- package/dist/pkg/index.js.map +1 -0
- package/dist/pkg/lib/bind-all.js +14 -0
- package/dist/pkg/lib/bind-all.js.map +1 -0
- package/dist/pkg/lib/browser-polyfill.js +18 -0
- package/dist/pkg/lib/browser-polyfill.js.map +1 -0
- package/dist/pkg/lib/create-deferred.js +17 -0
- package/dist/pkg/lib/create-deferred.js.map +1 -0
- package/dist/pkg/lib/csp-detection.js +29 -0
- package/dist/pkg/lib/csp-detection.js.map +1 -0
- package/dist/pkg/lib/embedded-write-key.js +18 -0
- package/dist/pkg/lib/embedded-write-key.js.map +1 -0
- package/dist/pkg/lib/fetch.js +14 -0
- package/dist/pkg/lib/fetch.js.map +1 -0
- package/dist/pkg/lib/get-global.js +17 -0
- package/dist/pkg/lib/get-global.js.map +1 -0
- package/dist/pkg/lib/get-process-env.js +11 -0
- package/dist/pkg/lib/get-process-env.js.map +1 -0
- package/dist/pkg/lib/global-analytics-helper.js +28 -0
- package/dist/pkg/lib/global-analytics-helper.js.map +1 -0
- package/dist/pkg/lib/group-by.js +24 -0
- package/dist/pkg/lib/group-by.js.map +1 -0
- package/dist/pkg/lib/is-plan-event-enabled.js +16 -0
- package/dist/pkg/lib/is-plan-event-enabled.js.map +1 -0
- package/dist/pkg/lib/is-thenable.js +11 -0
- package/dist/pkg/lib/is-thenable.js.map +1 -0
- package/dist/pkg/lib/load-script.js +51 -0
- package/dist/pkg/lib/load-script.js.map +1 -0
- package/dist/pkg/lib/merged-options.js +27 -0
- package/dist/pkg/lib/merged-options.js.map +1 -0
- package/dist/pkg/lib/on-page-leave.js +31 -0
- package/dist/pkg/lib/on-page-leave.js.map +1 -0
- package/dist/pkg/lib/p-while.js +21 -0
- package/dist/pkg/lib/p-while.js.map +1 -0
- package/dist/pkg/lib/parse-cdn.js +79 -0
- package/dist/pkg/lib/parse-cdn.js.map +1 -0
- package/dist/pkg/lib/priority-queue/backoff.js +6 -0
- package/dist/pkg/lib/priority-queue/backoff.js.map +1 -0
- package/dist/pkg/lib/priority-queue/index.js +3 -0
- package/dist/pkg/lib/priority-queue/index.js.map +1 -0
- package/dist/pkg/lib/priority-queue/persisted.js +105 -0
- package/dist/pkg/lib/priority-queue/persisted.js.map +1 -0
- package/dist/pkg/lib/sleep.js +6 -0
- package/dist/pkg/lib/sleep.js.map +1 -0
- package/dist/pkg/lib/to-facade.js +28 -0
- package/dist/pkg/lib/to-facade.js.map +1 -0
- package/dist/pkg/node/index.js +40 -0
- package/dist/pkg/node/index.js.map +1 -0
- package/dist/pkg/node/node.browser.js +10 -0
- package/dist/pkg/node/node.browser.js.map +1 -0
- package/dist/pkg/plugins/ajs-destination/index.js +341 -0
- package/dist/pkg/plugins/ajs-destination/index.js.map +1 -0
- package/dist/pkg/plugins/ajs-destination/loader.js +102 -0
- package/dist/pkg/plugins/ajs-destination/loader.js.map +1 -0
- package/dist/pkg/plugins/ajs-destination/types.js +2 -0
- package/dist/pkg/plugins/ajs-destination/types.js.map +1 -0
- package/dist/pkg/plugins/ajs-destination/utils.js +18 -0
- package/dist/pkg/plugins/ajs-destination/utils.js.map +1 -0
- package/dist/pkg/plugins/analytics-node/index.js +60 -0
- package/dist/pkg/plugins/analytics-node/index.js.map +1 -0
- package/dist/pkg/plugins/customerio/batched-dispatcher.js +99 -0
- package/dist/pkg/plugins/customerio/batched-dispatcher.js.map +1 -0
- package/dist/pkg/plugins/customerio/fetch-dispatcher.js +15 -0
- package/dist/pkg/plugins/customerio/fetch-dispatcher.js.map +1 -0
- package/dist/pkg/plugins/customerio/index.js +94 -0
- package/dist/pkg/plugins/customerio/index.js.map +1 -0
- package/dist/pkg/plugins/customerio/normalize.js +168 -0
- package/dist/pkg/plugins/customerio/normalize.js.map +1 -0
- package/dist/pkg/plugins/customerio/schedule-flush.js +72 -0
- package/dist/pkg/plugins/customerio/schedule-flush.js.map +1 -0
- package/dist/pkg/plugins/in-app-plugin/events.js +36 -0
- package/dist/pkg/plugins/in-app-plugin/events.js.map +1 -0
- package/dist/pkg/plugins/in-app-plugin/index.js +233 -0
- package/dist/pkg/plugins/in-app-plugin/index.js.map +1 -0
- package/dist/pkg/plugins/legacy-video-plugins/index.js +25 -0
- package/dist/pkg/plugins/legacy-video-plugins/index.js.map +1 -0
- package/dist/pkg/plugins/middleware/index.js +119 -0
- package/dist/pkg/plugins/middleware/index.js.map +1 -0
- package/dist/pkg/plugins/page-enrichment/index.js +93 -0
- package/dist/pkg/plugins/page-enrichment/index.js.map +1 -0
- package/dist/pkg/plugins/remote-loader/index.js +207 -0
- package/dist/pkg/plugins/remote-loader/index.js.map +1 -0
- package/dist/pkg/plugins/remote-middleware/index.js +66 -0
- package/dist/pkg/plugins/remote-middleware/index.js.map +1 -0
- package/dist/pkg/plugins/routing-middleware/index.js +22 -0
- package/dist/pkg/plugins/routing-middleware/index.js.map +1 -0
- package/dist/pkg/plugins/schema-filter/index.js +63 -0
- package/dist/pkg/plugins/schema-filter/index.js.map +1 -0
- package/dist/pkg/plugins/validation/index.js +63 -0
- package/dist/pkg/plugins/validation/index.js.map +1 -0
- package/dist/pkg/vendor/tsub/tsub.js +645 -0
- package/dist/pkg/vendor/tsub/tsub.js.map +1 -0
- package/dist/pkg/vendor/tsub/types.js +2 -0
- package/dist/pkg/vendor/tsub/types.js.map +1 -0
- package/dist/types/browser/browser-umd.d.ts +2 -0
- package/dist/types/browser/browser-umd.d.ts.map +1 -0
- package/dist/types/browser/index.d.ts +86 -0
- package/dist/types/browser/index.d.ts.map +1 -0
- package/dist/types/browser/standalone-analytics.d.ts +2 -0
- package/dist/types/browser/standalone-analytics.d.ts.map +1 -0
- package/dist/types/browser/standalone-interface.d.ts +10 -0
- package/dist/types/browser/standalone-interface.d.ts.map +1 -0
- package/dist/types/browser/standalone.d.ts +2 -0
- package/dist/types/browser/standalone.d.ts.map +1 -0
- package/dist/types/core/analytics/index.d.ts +121 -0
- package/dist/types/core/analytics/index.d.ts.map +1 -0
- package/dist/types/core/analytics/interfaces.d.ts +77 -0
- package/dist/types/core/analytics/interfaces.d.ts.map +1 -0
- package/dist/types/core/arguments-resolver/index.d.ts +34 -0
- package/dist/types/core/arguments-resolver/index.d.ts.map +1 -0
- package/dist/types/core/auto-track.d.ts +10 -0
- package/dist/types/core/auto-track.d.ts.map +1 -0
- package/dist/types/core/buffer/index.d.ts +86 -0
- package/dist/types/core/buffer/index.d.ts.map +1 -0
- package/dist/types/core/buffer/snippet.d.ts +15 -0
- package/dist/types/core/buffer/snippet.d.ts.map +1 -0
- package/dist/types/core/callback/index.d.ts +2 -0
- package/dist/types/core/callback/index.d.ts.map +1 -0
- package/dist/types/core/connection/index.d.ts +3 -0
- package/dist/types/core/connection/index.d.ts.map +1 -0
- package/dist/types/core/context/index.d.ts +9 -0
- package/dist/types/core/context/index.d.ts.map +1 -0
- package/dist/types/core/environment/index.d.ts +3 -0
- package/dist/types/core/environment/index.d.ts.map +1 -0
- package/dist/types/core/events/index.d.ts +21 -0
- package/dist/types/core/events/index.d.ts.map +1 -0
- package/dist/types/core/events/interfaces.d.ts +9 -0
- package/dist/types/core/events/interfaces.d.ts.map +1 -0
- package/dist/types/core/inspector/index.d.ts +3 -0
- package/dist/types/core/inspector/index.d.ts.map +1 -0
- package/dist/types/core/plugin/index.d.ts +11 -0
- package/dist/types/core/plugin/index.d.ts.map +1 -0
- package/dist/types/core/query-string/gracefulDecodeURIComponent.d.ts +9 -0
- package/dist/types/core/query-string/gracefulDecodeURIComponent.d.ts.map +1 -0
- package/dist/types/core/query-string/index.d.ts +7 -0
- package/dist/types/core/query-string/index.d.ts.map +1 -0
- package/dist/types/core/query-string/pickPrefix.d.ts +9 -0
- package/dist/types/core/query-string/pickPrefix.d.ts.map +1 -0
- package/dist/types/core/queue/event-queue.d.ts +8 -0
- package/dist/types/core/queue/event-queue.d.ts.map +1 -0
- package/dist/types/core/stats/index.d.ts +7 -0
- package/dist/types/core/stats/index.d.ts.map +1 -0
- package/dist/types/core/stats/remote-metrics.d.ts +29 -0
- package/dist/types/core/stats/remote-metrics.d.ts.map +1 -0
- package/dist/types/core/user/index.d.ts +128 -0
- package/dist/types/core/user/index.d.ts.map +1 -0
- package/dist/types/core/user/tld.d.ts +2 -0
- package/dist/types/core/user/tld.d.ts.map +1 -0
- package/dist/types/generated/version.d.ts +2 -0
- package/dist/types/generated/version.d.ts.map +1 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/lib/bind-all.d.ts +4 -0
- package/dist/types/lib/bind-all.d.ts.map +1 -0
- package/dist/types/lib/browser-polyfill.d.ts +2 -0
- package/dist/types/lib/browser-polyfill.d.ts.map +1 -0
- package/dist/types/lib/create-deferred.d.ts +9 -0
- package/dist/types/lib/create-deferred.d.ts.map +1 -0
- package/dist/types/lib/csp-detection.d.ts +4 -0
- package/dist/types/lib/csp-detection.d.ts.map +1 -0
- package/dist/types/lib/embedded-write-key.d.ts +7 -0
- package/dist/types/lib/embedded-write-key.d.ts.map +1 -0
- package/dist/types/lib/fetch.d.ts +5 -0
- package/dist/types/lib/fetch.d.ts.map +1 -0
- package/dist/types/lib/get-global.d.ts +2 -0
- package/dist/types/lib/get-global.d.ts.map +1 -0
- package/dist/types/lib/get-process-env.d.ts +8 -0
- package/dist/types/lib/get-process-env.d.ts.map +1 -0
- package/dist/types/lib/global-analytics-helper.d.ts +18 -0
- package/dist/types/lib/global-analytics-helper.d.ts.map +1 -0
- package/dist/types/lib/group-by.d.ts +4 -0
- package/dist/types/lib/group-by.d.ts.map +1 -0
- package/dist/types/lib/is-plan-event-enabled.d.ts +9 -0
- package/dist/types/lib/is-plan-event-enabled.d.ts.map +1 -0
- package/dist/types/lib/is-thenable.d.ts +6 -0
- package/dist/types/lib/is-thenable.d.ts.map +1 -0
- package/dist/types/lib/load-script.d.ts +3 -0
- package/dist/types/lib/load-script.d.ts.map +1 -0
- package/dist/types/lib/merged-options.d.ts +13 -0
- package/dist/types/lib/merged-options.d.ts.map +1 -0
- package/dist/types/lib/on-page-leave.d.ts +11 -0
- package/dist/types/lib/on-page-leave.d.ts.map +1 -0
- package/dist/types/lib/p-while.d.ts +2 -0
- package/dist/types/lib/p-while.d.ts.map +1 -0
- package/dist/types/lib/parse-cdn.d.ts +10 -0
- package/dist/types/lib/parse-cdn.d.ts.map +1 -0
- package/dist/types/lib/priority-queue/backoff.d.ts +13 -0
- package/dist/types/lib/priority-queue/backoff.d.ts.map +1 -0
- package/dist/types/lib/priority-queue/index.d.ts +3 -0
- package/dist/types/lib/priority-queue/index.d.ts.map +1 -0
- package/dist/types/lib/priority-queue/persisted.d.ts +6 -0
- package/dist/types/lib/priority-queue/persisted.d.ts.map +1 -0
- package/dist/types/lib/sleep.d.ts +2 -0
- package/dist/types/lib/sleep.d.ts.map +1 -0
- package/dist/types/lib/to-facade.d.ts +7 -0
- package/dist/types/lib/to-facade.d.ts.map +1 -0
- package/dist/types/node/index.d.ts +8 -0
- package/dist/types/node/index.d.ts.map +1 -0
- package/dist/types/node/node.browser.d.ts +4 -0
- package/dist/types/node/node.browser.d.ts.map +1 -0
- package/dist/types/plugins/ajs-destination/index.d.ts +42 -0
- package/dist/types/plugins/ajs-destination/index.d.ts.map +1 -0
- package/dist/types/plugins/ajs-destination/loader.d.ts +12 -0
- package/dist/types/plugins/ajs-destination/loader.d.ts.map +1 -0
- package/dist/types/plugins/ajs-destination/types.d.ts +36 -0
- package/dist/types/plugins/ajs-destination/types.d.ts.map +1 -0
- package/dist/types/plugins/ajs-destination/utils.d.ts +5 -0
- package/dist/types/plugins/ajs-destination/utils.d.ts.map +1 -0
- package/dist/types/plugins/analytics-node/index.d.ts +12 -0
- package/dist/types/plugins/analytics-node/index.d.ts.map +1 -0
- package/dist/types/plugins/customerio/batched-dispatcher.d.ts +8 -0
- package/dist/types/plugins/customerio/batched-dispatcher.d.ts.map +1 -0
- package/dist/types/plugins/customerio/fetch-dispatcher.d.ts +8 -0
- package/dist/types/plugins/customerio/fetch-dispatcher.d.ts.map +1 -0
- package/dist/types/plugins/customerio/index.d.ts +26 -0
- package/dist/types/plugins/customerio/index.d.ts.map +1 -0
- package/dist/types/plugins/customerio/normalize.d.ts +12 -0
- package/dist/types/plugins/customerio/normalize.d.ts.map +1 -0
- package/dist/types/plugins/customerio/schedule-flush.d.ts +5 -0
- package/dist/types/plugins/customerio/schedule-flush.d.ts.map +1 -0
- package/dist/types/plugins/in-app-plugin/events.d.ts +19 -0
- package/dist/types/plugins/in-app-plugin/events.d.ts.map +1 -0
- package/dist/types/plugins/in-app-plugin/index.d.ts +12 -0
- package/dist/types/plugins/in-app-plugin/index.d.ts.map +1 -0
- package/dist/types/plugins/legacy-video-plugins/index.d.ts +3 -0
- package/dist/types/plugins/legacy-video-plugins/index.d.ts.map +1 -0
- package/dist/types/plugins/middleware/index.d.ts +18 -0
- package/dist/types/plugins/middleware/index.d.ts.map +1 -0
- package/dist/types/plugins/page-enrichment/index.d.ts +21 -0
- package/dist/types/plugins/page-enrichment/index.d.ts.map +1 -0
- package/dist/types/plugins/remote-loader/index.d.ts +43 -0
- package/dist/types/plugins/remote-loader/index.d.ts.map +1 -0
- package/dist/types/plugins/remote-middleware/index.d.ts +5 -0
- package/dist/types/plugins/remote-middleware/index.d.ts.map +1 -0
- package/dist/types/plugins/routing-middleware/index.d.ts +13 -0
- package/dist/types/plugins/routing-middleware/index.d.ts.map +1 -0
- package/dist/types/plugins/schema-filter/index.d.ts +5 -0
- package/dist/types/plugins/schema-filter/index.d.ts.map +1 -0
- package/dist/types/plugins/validation/index.d.ts +7 -0
- package/dist/types/plugins/validation/index.d.ts.map +1 -0
- package/dist/types/vendor/tsub/tsub.d.ts +1 -0
- package/dist/types/vendor/tsub/tsub.d.ts.map +1 -0
- package/dist/types/vendor/tsub/types.d.ts +20 -0
- package/dist/types/vendor/tsub/types.d.ts.map +1 -0
- package/dist/umd/407.js +1 -0
- package/dist/umd/407.js.gz +0 -0
- package/dist/umd/852.js +1 -0
- package/dist/umd/852.js.gz +0 -0
- package/dist/umd/ajs-destination.js +1 -0
- package/dist/umd/ajs-destination.js.gz +0 -0
- package/dist/umd/auto-track.js +1 -0
- package/dist/umd/auto-track.js.gz +0 -0
- package/dist/umd/inAppPlugin.js +1 -0
- package/dist/umd/inAppPlugin.js.gz +0 -0
- package/dist/umd/index.js +1 -0
- package/dist/umd/index.js.gz +0 -0
- package/dist/umd/legacyVideos.js +1 -0
- package/dist/umd/legacyVideos.js.gz +0 -0
- package/dist/umd/queryString.js +1 -0
- package/dist/umd/queryString.js.gz +0 -0
- package/dist/umd/remoteMiddleware.js +1 -0
- package/dist/umd/remoteMiddleware.js.gz +0 -0
- package/dist/umd/schemaFilter.js +1 -0
- package/dist/umd/schemaFilter.js.gz +0 -0
- package/dist/umd/standalone.js +1 -0
- package/dist/umd/standalone.js.gz +0 -0
- package/dist/umd/tsub-middleware.js +1 -0
- package/dist/umd/tsub-middleware.js.gz +0 -0
- package/package.json +106 -0
- package/src/browser/browser-umd.ts +19 -0
- package/src/browser/index.ts +423 -0
- package/src/browser/standalone-analytics.ts +62 -0
- package/src/browser/standalone-interface.ts +11 -0
- package/src/browser/standalone.ts +90 -0
- package/src/core/analytics/index.ts +573 -0
- package/src/core/analytics/interfaces.ts +100 -0
- package/src/core/arguments-resolver/index.ts +166 -0
- package/src/core/auto-track.ts +152 -0
- package/src/core/buffer/index.ts +289 -0
- package/src/core/buffer/snippet.ts +46 -0
- package/src/core/callback/index.ts +1 -0
- package/src/core/connection/index.ts +13 -0
- package/src/core/context/index.ts +21 -0
- package/src/core/environment/index.ts +7 -0
- package/src/core/events/index.ts +254 -0
- package/src/core/events/interfaces.ts +36 -0
- package/src/core/inspector/index.ts +14 -0
- package/src/core/plugin/index.ts +12 -0
- package/src/core/query-string/gracefulDecodeURIComponent.ts +16 -0
- package/src/core/query-string/index.ts +64 -0
- package/src/core/query-string/pickPrefix.ts +20 -0
- package/src/core/queue/event-queue.ts +11 -0
- package/src/core/stats/index.ts +15 -0
- package/src/core/stats/remote-metrics.ts +137 -0
- package/src/core/user/index.ts +534 -0
- package/src/core/user/tld.ts +65 -0
- package/src/generated/version.ts +2 -0
- package/src/index.ts +12 -0
- package/src/lib/bind-all.ts +19 -0
- package/src/lib/browser-polyfill.ts +23 -0
- package/src/lib/create-deferred.ts +16 -0
- package/src/lib/csp-detection.ts +26 -0
- package/src/lib/embedded-write-key.ts +24 -0
- package/src/lib/fetch.ts +10 -0
- package/src/lib/get-global.ts +16 -0
- package/src/lib/get-process-env.ts +11 -0
- package/src/lib/global-analytics-helper.ts +31 -0
- package/src/lib/group-by.ts +30 -0
- package/src/lib/is-plan-event-enabled.ts +20 -0
- package/src/lib/is-thenable.ts +9 -0
- package/src/lib/load-script.ts +66 -0
- package/src/lib/merged-options.ts +46 -0
- package/src/lib/on-page-leave.ts +29 -0
- package/src/lib/p-while.ts +12 -0
- package/src/lib/parse-cdn.ts +93 -0
- package/src/lib/priority-queue/backoff.ts +24 -0
- package/src/lib/priority-queue/index.ts +6 -0
- package/src/lib/priority-queue/persisted.ts +127 -0
- package/src/lib/sleep.ts +4 -0
- package/src/lib/to-facade.ts +53 -0
- package/src/node/index.ts +36 -0
- package/src/node/node.browser.ts +7 -0
- package/src/plugins/ajs-destination/index.ts +388 -0
- package/src/plugins/ajs-destination/loader.ts +127 -0
- package/src/plugins/ajs-destination/types.ts +44 -0
- package/src/plugins/ajs-destination/utils.ts +34 -0
- package/src/plugins/analytics-node/index.ts +64 -0
- package/src/plugins/customerio/batched-dispatcher.ts +112 -0
- package/src/plugins/customerio/fetch-dispatcher.ts +24 -0
- package/src/plugins/customerio/index.ts +143 -0
- package/src/plugins/customerio/normalize.ts +223 -0
- package/src/plugins/customerio/schedule-flush.ts +58 -0
- package/src/plugins/in-app-plugin/events.ts +38 -0
- package/src/plugins/in-app-plugin/index.ts +241 -0
- package/src/plugins/legacy-video-plugins/index.ts +16 -0
- package/src/plugins/middleware/index.ts +131 -0
- package/src/plugins/page-enrichment/index.ts +127 -0
- package/src/plugins/remote-loader/index.ts +240 -0
- package/src/plugins/remote-middleware/index.ts +44 -0
- package/src/plugins/routing-middleware/index.ts +38 -0
- package/src/plugins/schema-filter/index.ts +90 -0
- package/src/plugins/validation/index.ts +80 -0
- package/src/test-helpers/browser-storage.ts +72 -0
- package/src/test-helpers/factories.ts +18 -0
- package/src/test-helpers/fetch-parse.ts +8 -0
- package/src/test-helpers/fixtures/cdn-settings.ts +299 -0
- package/src/test-helpers/fixtures/classic-destination.ts +25 -0
- package/src/test-helpers/fixtures/create-fetch-method.ts +24 -0
- package/src/test-helpers/test-writekeys.ts +5 -0
- package/src/test-helpers/type-assertions.ts +11 -0
- package/src/vendor/tsub/tsub.js.LICENSE.txt +53 -0
- package/src/vendor/tsub/tsub.ts +7 -0
- package/src/vendor/tsub/types.ts +19 -0
package/dist/umd/407.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_customerio_cdp_analytics_browser=self.webpackChunk_customerio_cdp_analytics_browser||[]).push([[407],{4407:function(e){window,e.exports=function(e){var t={};function a(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,a),i.l=!0,i.exports}return a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)a.d(n,i,function(t){return e[t]}.bind(null,i));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=2)}([function(e,t,a){"use strict";a.r(t);var n="function"==typeof fetch?fetch.bind():function(e,t){return t=t||{},new Promise((function(a,n){var i=new XMLHttpRequest;for(var r in i.open(t.method||"get",e,!0),t.headers)i.setRequestHeader(r,t.headers[r]);function s(){var e,t=[],a=[],n={};return i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(i,r,s){t.push(r=r.toLowerCase()),a.push([r,s]),e=n[r],n[r]=e?e+","+s:s})),{ok:2==(i.status/100|0),status:i.status,statusText:i.statusText,url:i.responseURL,clone:s,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(i.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([i.response]))},headers:{keys:function(){return t},entries:function(){return a},get:function(e){return n[e.toLowerCase()]},has:function(e){return e.toLowerCase()in n}}}}i.withCredentials="include"==t.credentials,i.onload=function(){a(s())},i.onerror=n,i.send(t.body)}))};t.default=n},function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}(),i=function(){function e(t,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.pluginName=t}return n(e,[{key:"track",value:function(e,t){window.analytics.track(e,t,{integration:{name:this.pluginName}})}}]),e}();t.default=i},function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.YouTubeAnalytics=t.VimeoAnalytics=void 0;var n=r(a(3)),i=r(a(4));function r(e){return e&&e.__esModule?e:{default:e}}t.VimeoAnalytics=n.default,t.YouTubeAnalytics=i.default},function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}(),i=r(a(0));function r(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(e,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"VimeoAnalytics"));return n.authToken=a,n.player=e,n.metadata={content:{},playback:{videoPlayer:"Vimeo"}},n.mostRecentHeartbeat=0,n.isPaused=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"initialize",value:function(){var e=this,t={loaded:this.retrieveMetadata,play:this.trackPlay,pause:this.trackPause,ended:this.trackEnded,timeupdate:this.trackHeartbeat};for(var a in t)this.registerHandler(a,t[a]);this.player.getVideoId().then((function(t){e.retrieveMetadata({id:t})})).catch(console.error)}},{key:"registerHandler",value:function(e,t){var a=this;this.player.on(e,(function(e){a.updateMetadata(e),t.call(a,e)}))}},{key:"trackPlay",value:function(){this.isPaused?(this.track("Video Playback Resumed",this.metadata.playback),this.isPaused=!1):(this.track("Video Playback Started",this.metadata.playback),this.track("Video Content Started",this.metadata.content))}},{key:"trackEnded",value:function(){this.track("Video Playback Completed",this.metadata.playback),this.track("Video Content Completed",this.metadata.content)}},{key:"trackHeartbeat",value:function(){var e=this.mostRecentHeartbeat,t=this.metadata.playback.position;t!==e&&t-e>=10&&(this.track("Video Content Playing",this.metadata.content),this.mostRecentHeartbeat=Math.floor(t))}},{key:"trackPause",value:function(){this.isPaused=!0,this.track("Video Playback Paused",this.metadata.playback)}},{key:"retrieveMetadata",value:function(e){var t=this;return new Promise((function(a,n){var r=e.id;(0,i.default)("https://api.vimeo.com/videos/"+r,{headers:{Authorization:"Bearer "+t.authToken}}).then((function(e){return e.ok?e.json():n(e)})).then((function(e){t.metadata.content.title=e.name,t.metadata.content.description=e.description,t.metadata.content.publisher=e.user.name,t.metadata.playback.position=0,t.metadata.playback.totalLength=e.duration})).catch((function(e){return console.error("Request to Vimeo API Failed with: ",e),n(e)}))}))}},{key:"updateMetadata",value:function(e){var t=this;return new Promise((function(a,n){t.player.getVolume().then((function(n){n&&(t.metadata.playback.sound=100*n),t.metadata.playback.position=e.seconds,a()})).catch(n)}))}}]),t}(r(a(1)).default);t.default=s},function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,a,n){return a&&e(t.prototype,a),n&&e(t,n),t}}(),i=r(a(0));function r(e){return e&&e.__esModule?e:{default:e}}var s=function(e){function t(e,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,"YoutubeAnalytics"));return n.player=e,n.apiKey=a,n.playerLoaded=!1,n.playbackStarted=!1,n.contentStarted=!1,n.isPaused=!1,n.isBuffering=!1,n.isSeeking=!1,n.lastRecordedTime={timeReported:Date.now(),timeElapsed:0},n.metadata=[{playback:{video_player:"youtube"},content:{}}],n.playlistIndex=0,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"initialize",value:function(){window.segmentYoutubeOnStateChange=this.onPlayerStateChange.bind(this),window.segmentYoutubeOnReady=this.onPlayerReady.bind(this),this.player.addEventListener("onReady","segmentYoutubeOnReady"),this.player.addEventListener("onStateChange","segmentYoutubeOnStateChange")}},{key:"onPlayerReady",value:function(e){this.retrieveMetadata()}},{key:"onPlayerStateChange",value:function(e){var t=this.player.getCurrentTime();switch(this.metadata[this.playlistIndex]&&(this.metadata[this.playlistIndex].playback.position=this.metadata[this.playlistIndex].content.position=t,this.metadata[this.playlistIndex].playback.quality=this.player.getPlaybackQuality(),this.metadata[this.playlistIndex].playback.sound=this.player.isMuted()?0:this.player.getVolume()),e.data){case-1:if(this.playerLoaded)break;this.retrieveMetadata(),this.playerLoaded=!0;break;case YT.PlayerState.BUFFERING:this.handleBuffer();break;case YT.PlayerState.PLAYING:this.handlePlay();break;case YT.PlayerState.PAUSED:this.handlePause();break;case YT.PlayerState.ENDED:this.handleEnd()}this.lastRecordedTime={timeReported:Date.now(),timeElapsed:1e3*this.player.getCurrentTime()}}},{key:"retrieveMetadata",value:function(){var e=this;return new Promise((function(t,a){var n=e.player.getVideoData(),r=e.player.getPlaylist()||[n.video_id],s=r.join();(0,i.default)("https://www.googleapis.com/youtube/v3/videos?id="+s+"&part=snippet,contentDetails&key="+e.apiKey).then((function(e){if(!e.ok){var t=new Error("Segment request to Youtube API failed (likely due to a bad API Key. Events will still be sent but will not contain video metadata)");throw t.response=e,t}return e.json()})).then((function(a){e.metadata=[];for(var n=0,i=0;i<r.length;i++){var s=a.items[i];e.metadata.push({content:{title:s.snippet.title,description:s.snippet.description,keywords:s.snippet.tags,channel:s.snippet.channelTitle,airdate:s.snippet.publishedAt}}),n+=o(s.contentDetails.duration)}for(i=0;i<r.length;i++)e.metadata[i].playback={total_length:n,video_player:"youtube"};t()})).catch((function(t){e.metadata=r.map((function(e){return{playback:{video_player:"youtube"},content:{}}})),a(t)}))}))}},{key:"handleBuffer",value:function(){var e=this.determineSeek();this.playbackStarted||(this.playbackStarted=!0,this.track("Video Playback Started",this.metadata[this.playlistIndex].playback)),e&&!this.isSeeking&&(this.isSeeking=!0,this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback)),this.isSeeking&&(this.track("Video Playback Seek Completed",this.metadata[this.playlistIndex].playback),this.isSeeking=!1);var t=this.player.getPlaylist();t&&0===this.player.getCurrentTime()&&this.player.getPlaylistIndex()!==this.playlistIndex&&(this.contentStarted=!1,this.playlistIndex===t.length-1&&0===this.player.getPlaylistIndex()&&(this.track("Video Playback Completed",this.metadata[this.player.getPlaylistIndex()].playback),this.track("Video Playback Started",this.metadata[this.player.getPlaylistIndex()].playback))),this.track("Video Playback Buffer Started",this.metadata[this.playlistIndex].playback),this.isBuffering=!0}},{key:"handlePlay",value:function(){this.contentStarted||(this.playlistIndex=this.player.getPlaylistIndex(),-1===this.playlistIndex&&(this.playlistIndex=0),this.track("Video Content Started",this.metadata[this.playlistIndex].content),this.contentStarted=!0),this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused&&(this.track("Video Playback Resumed",this.metadata[this.playlistIndex].playback),this.isPaused=!1)}},{key:"handlePause",value:function(){var e=this.determineSeek();this.isBuffering&&(this.track("Video Playback Buffer Completed",this.metadata[this.playlistIndex].playback),this.isBuffering=!1),this.isPaused||(e?(this.track("Video Playback Seek Started",this.metadata[this.playlistIndex].playback),this.isSeeking=!0):(this.track("Video Playback Paused",this.metadata[this.playlistIndex].playback),this.isPaused=!0))}},{key:"handleEnd",value:function(){this.track("Video Content Completed",this.metadata[this.playlistIndex].content),this.contentStarted=!1;var e=this.player.getPlaylistIndex(),t=this.player.getPlaylist();(t&&e===t.length-1||-1===e)&&(this.track("Video Playback Completed",this.metadata[this.playlistIndex].playback),this.playbackStarted=!1)}},{key:"determineSeek",value:function(){var e=this.isPaused||this.isBuffering?0:Date.now()-this.lastRecordedTime.timeReported,t=1e3*this.player.getCurrentTime()-this.lastRecordedTime.timeElapsed;return Math.abs(e-t)>2e3}}]),t}(r(a(1)).default);function o(e){var t=e.match(/PT(\d+H)?(\d+M)?(\d+S)?/);return t=t.slice(1).map((function(e){if(null!=e)return e.replace(/\D/,"")})),3600*(parseInt(t[0])||0)+60*(parseInt(t[1])||0)+(parseInt(t[2])||0)}t.default=s}])}}]);
|
|
Binary file
|
package/dist/umd/852.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_customerio_cdp_analytics_browser=self.webpackChunk_customerio_cdp_analytics_browser||[]).push([[852],{1990:function(e,t,n){"use strict";n.d(t,{A:function(){return Oe}});class s{on(e,t){var n=this[e];n?n.push(t):this[e]=[t]}dispatch(e,t){var n=this[e];n&&n.forEach((e=>e(t)))}}function i(e){Oe.config&&Oe.config.logging&&console.log(`Gist: ${e}`)}const a="gist.web.isPersistingSession";function o(e,t,n=null){var s=n;s||(s=new Date).setDate(s.getDate()+365);const i={value:t,expiry:s};d().setItem(e,JSON.stringify(i))}function r(e){return g(e)}function c(e){d().removeItem(e)}function u(){const e=sessionStorage.getItem(a);return null===e?(sessionStorage.setItem(a,"true"),!0):"true"===e}function d(){return u()?localStorage:sessionStorage}function g(e){if(!e)return null;try{const t=d().getItem(e);if(!t)return null;const n=JSON.parse(t);if(!n.expiry)return n.value;const s=new Date,i=new Date(n.expiry),a=e.startsWith("gist.web.message.broadcasts")&&!e.endsWith("shouldShow")&&!e.endsWith("numberOfTimesShown")||e.startsWith("gist.web.message.user")&&!e.endsWith("seen"),o=new Date(s.getTime()+366e4);return a&&i.getTime()>o.getTime()||s.getTime()>i.getTime()?(c(e),null):n.value}catch(t){i(`Error checking key ${e} for expiry: ${t}`)}return null}var l,m=new Uint8Array(16);function f(){if(!l&&!(l="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return l(m)}var h=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var p=function(e){return"string"==typeof e&&h.test(e)},w=[],v=0;v<256;++v)w.push((v+256).toString(16).substr(1));var y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(w[e[t+0]]+w[e[t+1]]+w[e[t+2]]+w[e[t+3]]+"-"+w[e[t+4]]+w[e[t+5]]+"-"+w[e[t+6]]+w[e[t+7]]+"-"+w[e[t+8]]+w[e[t+9]]+"-"+w[e[t+10]]+w[e[t+11]]+w[e[t+12]]+w[e[t+13]]+w[e[t+14]]+w[e[t+15]]).toLowerCase();if(!p(n))throw TypeError("Stringified UUID is invalid");return n};var b=function(e,t,n){var s=(e=e||{}).random||(e.rng||f)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=s[i];return t}return y(s)};const S="gist.web.userQueueUseSSE",I="gist.web.activeSSEConnection";let E,$=30;const x={RENDERER_HOST:"https://code.gist.build",ENGINE_API_ENDPOINT:{prod:"https://engine.api.gist.build",dev:"https://engine.api.dev.gist.build",local:"http://engine.api.local.gist.build:82"},GIST_QUEUE_API_ENDPOINT:{prod:"https://consumer.cloud.gist.build",dev:"https://consumer.cloud.dev.gist.build",local:"http://api.local.gist.build:86"},GIST_QUEUE_REALTIME_API_ENDPOINT:{prod:"https://realtime.cloud.gist.build",dev:"https://realtime.cloud.dev.gist.build",local:"http://api.local.gist.build:3000"},GIST_VIEW_ENDPOINT:{prod:"https://renderer.gist.build/3.0",dev:"https://renderer.gist.build/3.0",local:"http://app.local.gist.build:8080/web"},getSdkId:function(){return E||(E=b()),E},useSSE:function(){return r(S)??!1},setUseSSEFlag:function(e){o(S,e,new Date((new Date).getTime()+6e4)),i(`Set user uses SSE to "${e}"`)},removeActiveSSEConnection:function(){c(I)},setActiveSSEConnection:function(){o(I,x.getSdkId(),new Date((new Date).getTime()+x.getSSEHeartbeat()))},hasActiveSSEConnection:function(){return r(I)??!1},isSSEConnectionManagedBySDK:function(){return r(I)===x.getSdkId()},getSSEHeartbeat:function(){return 1e3*($+5)},setSSEHeartbeat:function(e){e&&e>0&&($=e)}};function T(){const e=x.GIST_QUEUE_API_ENDPOINT[Oe.config.env],t={"X-CIO-Site-Id":Oe.config.siteId,"X-CIO-Client-Platform":"web"},n=H();async function s(n,s={}){const i=e+n,a=new AbortController,o=setTimeout((()=>a.abort()),5e3);try{const e=await fetch(i,{method:s.method||"GET",headers:{...t,...s.headers||{}},body:s.method&&"GET"!==s.method.toUpperCase()?s.body:void 0,signal:a.signal});clearTimeout(o);const n=e.headers.get("content-type")?.includes("application/json"),r=n?await e.json():await e.text(),c=Object.fromEntries(e.headers.entries());if(e.status<200||e.status>=400)throw{response:{status:e.status,data:r,headers:c}};return{status:e.status,headers:c,data:r}}catch(e){throw clearTimeout(o),e.response||(e.response={status:0,data:e.message||"Unknown error"}),e}}return null!=n&&(t["X-Gist-Encoded-User-Token"]=n),s.post=(e,t={},n={})=>s(e,{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json",...n.headers||{}}}),s}const k="gist.web.userLocale";var D=600,C=!1;const M="gist.web.userQueueNextPullCheck",R="gist.web.sessionId";async function q(){var e;try{if(!C){C=!0;var t={"X-Gist-User-Anonymous":U(),"Content-Language":null!==r(k)?r(k):navigator.language};e=await T().post(`/api/v3/users?sessionId=${A()}`,{},{headers:t})}}catch(t){t.response?e=t.response:i(`Error getting user queue: ${t}`)}finally{C=!1,function(e){if(e&&e.headers){var t=e.headers["x-gist-queue-polling-interval"];t&&t>0&&(D=t)}var n=new Date((new Date).getTime()+1e3*D);o(M,D,n)}(e),function(e){const t="true"===e?.headers?.["x-cio-use-sse"]?.toLowerCase();x.setUseSSEFlag(t)}(e)}return e}function A(){var e=r(R);return e||(e=b()),o(R,e,new Date((new Date).getTime()+18e5)),e}const L="gist.web.userToken",P="gist.web.usingGuestUserToken",N="gist.web.guestUserToken";function U(){return null!==r(P)}function _(){return r(L)}function W(){if(null===_()){var e=r(N);null==e&&(e=b(),o(N,e),i(`Set guest user token "${e}" with expiry date set to 1 year from today`)),o(L,e),o(P,!0),i(`Using anonymous session with token: "${e}"`)}}async function O(){var e=_();return null===e?null:await async function(e){const t=(new TextEncoder).encode(e),n=await crypto.subtle.digest("SHA-256",t),s=Array.from(new Uint8Array(n));return s.map((e=>e.toString(16).padStart(2,"0"))).join("")}(e)}function H(){var e=_();return null===e?null:btoa(e)}function G(e){const t={isEmbedded:!1,elementId:"",hasRouteRule:!1,routeRule:"",position:"",hasPosition:!1,shouldScale:!1,campaignId:null,messageWidth:414,overlayColor:"#00000033",persistent:!1,exitClick:!1,hasCustomWidth:!1},n=e?.properties?.gist;return n?{isEmbedded:!!n.elementId,elementId:n.elementId||"",hasRouteRule:!!n.routeRuleWeb,routeRule:n.routeRuleWeb||"",position:n.position||"",hasPosition:!!n.position,shouldScale:!!n.scale,campaignId:n.campaignId??null,messageWidth:n.messageWidth>0?n.messageWidth:t.messageWidth,hasCustomWidth:n.messageWidth>0,overlayColor:n.overlayColor||t.overlayColor,persistent:!!n.persistent,exitClick:!!n.exitClick}:t}var V=["x-gist-top","x-gist-floating-top","x-gist-bottom","x-gist-floating-bottom","x-gist-floating-bottom-left","x-gist-floating-bottom-right","x-gist-floating-top-left","x-gist-floating-top-right"];const z=["x-gist-top","x-gist-bottom","x-gist-floating-top","x-gist-floating-bottom"];function j(e,t,n,s){var a=ee(e);if(a){var o=Y(n.instanceId);a.classList.add(o);var r=G(n),c=r.messageWidth+"px";z.includes(e)&&!r.hasCustomWidth&&(c="100%"),V.includes(e)&&(a.style.width=c),F(e)||(a.style.height="0px"),a.innerHTML=function(e,t,n){return function(e,t,n){var s=800;return t.messageWidth>s&&(s=t.messageWidth),`\n <div id="gist-embed">\n <style>\n #x-gist-floating-top, #x-gist-floating-top-left, #x-gist-floating-top-right {\n position: fixed;\n top: 0px;\n z-index: 1000000;\n }\n #x-gist-floating-bottom, #x-gist-floating-bottom-left, #x-gist-floating-bottom-right {\n position: fixed;\n bottom: 0px;\n z-index: 1000000;\n }\n #x-gist-bottom, #x-gist-top, #x-gist-floating-top, #x-gist-floating-bottom {\n left: 50%;\n transform: translate(-50%, 0%);\n }\n #x-gist-floating-top-right, #x-gist-floating-bottom-right {\n right: 0px;\n }\n #gist-embed {\n position: relative;\n height: 100%;\n width: 100%;\n }\n #gist-embed-container {\n position: relative;\n height: 100%;\n width: 100%;\n }\n #gist-embed-container .gist-frame {\n height: 100%;\n width: 100%;\n border: none;\n }\n #x-gist-top.${e},\n #x-gist-bottom.${e},\n #x-gist-floating-top.${e},\n #x-gist-floating-bottom.${e},\n #x-gist-floating-top-left.${e},\n #x-gist-floating-top-right.${e},\n #x-gist-floating-bottom-left.${e},\n #x-gist-floating-bottom-right.${e} {\n transition: height 0.1s ease-in-out;\n }\n @media (max-width: ${s}px) {\n #x-gist-top.${e},\n #x-gist-bottom.${e},\n #x-gist-floating-top.${e},\n #x-gist-floating-bottom.${e},\n #x-gist-floating-top-left.${e},\n #x-gist-floating-top-right.${e},\n #x-gist-floating-bottom-left.${e},\n #x-gist-floating-bottom-right.${e} {\n width: 100% !important;\n }\n }\n </style>\n <div id="gist-embed-container">\n <iframe id="${e}" class="gist-frame" src="${n}"></iframe>\n </div>\n </div>`}(Y(t.instanceId),n,e)}(t,n,r),Q(o,s)}else i(`Message could not be embedded, elementId ${e} not found.`)}function F(e){var t=ee(e);if(t)return t.style&&t.style.height&&"0px"!=t.style.height}function B(e,t,n){document.body.insertAdjacentHTML("afterbegin",function(e,t){var n=G(t);return function(e,t,n){var s=600;return t.messageWidth>s&&(s=t.messageWidth),`\n <div id="gist-embed-message">\n <style>\n #gist-overlay.gist-background {\n position: fixed;\n z-index: 9999999998;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: ${t.overlayColor};\n visibility: hidden;\n }\n #gist-overlay.gist-background.gist-visible {\n visibility: visible;\n }\n .gist-message {\n width: ${t.messageWidth}px;\n position: absolute;\n border: none;\n opacity: 0;\n transition: opacity 0.3s ease-in-out, height 0.1s ease-in-out;\n z-index: 9999999999;\n left: 50%;\n transform: translateX(-50%);\n }\n .gist-message.gist-visible {\n opacity: 1;\n pointer-events: auto;\n }\n .gist-message.gist-center {\n transform: translate(-50%, -50%);\n top: 50%;\n }\n .gist-message.gist-bottom {\n bottom: 0;\n }\n .gist-message.gist-top {\n top: 0;\n }\n @media (max-width: ${s}px) {\n .gist-message {\n width: 100%;\n }\n }\n </style>\n <div id="gist-overlay" class="gist-background">\n <iframe id="${e}" class="gist-message" src="${n}"></iframe>\n </div>\n </div>`}(Y(t.instanceId),n,e)}(e,t)),Q(Y(t.instanceId),n)}function Q(e,t){const n=document.getElementById(e);n&&(n.onload=function(){!function(e,t){const n=document.getElementById(e);n&&n.contentWindow&&n.contentWindow.postMessage({options:t},"*")}(e,t)})}function J(e){var t=G(e),n=document.querySelector("#gist-overlay");if(n){n.classList.add("gist-visible");var s=document.querySelector(".gist-message");e.position?s.classList.add("gist-"+e.position):s.classList.add("gist-center"),setTimeout(Z,100),t.exitClick&&setTimeout((()=>function(e){var t=document.querySelector("#gist-overlay");t&&t.addEventListener("click",(function(){Oe.dismissMessage(e)}))}(e.instanceId)),1e3)}else K()}async function X(){var e,t=document.querySelector(".gist-message");t&&(t.classList.remove("gist-visible"),await(e=300,new Promise((t=>setTimeout(t,e))))),K()}function K(){var e=document.querySelector("#gist-embed-message");e&&e.parentNode.removeChild(e)}function Y(e){return`gist-${e}`}function Z(){var e=document.querySelector(".gist-message");e&&e.classList.add("gist-visible")}function ee(e){try{var t=document.querySelector(`#${e}`);return t||null}catch{return null}}const te="gist.web.customAttributes";let ne=new Map;function se(){const e=Array.from(ne.entries()),t=new Date;t.setDate(t.getDate()+30),o(te,e,t),i(`Saved ${ne.size} custom attributes to storage with TTL of 30 days`)}!function(){const e=r(te);if(e)try{ne=new Map(e)}catch{ne=new Map}else ne=new Map}();async function ie(e){const t=await re();if(!t)return;const n=new Date;n.setMinutes(n.getMinutes()+60);o(t,e.filter(oe),n)}async function ae(e,t){return r(e).find((e=>e.queueId===t))}function oe(e){return e.properties&&e.properties.gist&&e.properties.gist.broadcast}async function re(){const e=await O();return e?`gist.web.message.broadcasts.${e}`:null}function ce(e,t){return`${e}.${t}.numberOfTimesShown`}function ue(e,t){return`${e}.${t}.shouldShow`}async function de(e){const t=await le();if(!t)return;const n=e.filter((e=>!(e.properties&&e.properties.gist&&e.properties.gist.broadcast))),s=new Date;s.setMinutes(s.getMinutes()+60),o(t,n,s)}async function ge(){const e=await le();if(!e)return[];const t=r(e)??[],n=await async function(){const e=await me();return e?r(e)??[]:[]}();return t.filter((e=>!n.includes(e.queueId)))}async function le(){const e=await O();return e?`gist.web.message.user.${e}`:null}async function me(){const e=await O();return e?`gist.web.message.user.${e}.seen`:null}async function fe(e){const t=await O();return t?`gist.web.message.user.${t}.message.${e}.loading`:null}async function he(e){if(Oe.isDocumentVisible){if(Oe.overlayInstanceId)return i(`Message ${Oe.overlayInstanceId} already showing.`),null;var t=G(e);return e.instanceId=b(),e.overlay=!0,e.firstLoad=!0,e.shouldResizeHeight=!0,e.shouldScale=t.shouldScale,e.renderStartTime=(new Date).getTime(),Oe.overlayInstanceId=e.instanceId,Oe.currentMessages.push(e),Se(e)}return i("Document hidden, not showing message now."),null}async function pe(e,t){return Oe.isDocumentVisible?(e.instanceId=b(),e.overlay=!1,e.firstLoad=!0,e.shouldScale=!1,e.elementId=t,e.shouldResizeHeight=!F(t),e.renderStartTime=(new Date).getTime(),Oe.currentMessages.push(e),Se(e,t)):(i("Document hidden, not showing message now."),null)}async function we(e){e?(Oe.messageDismissed(e),e.overlay?await be(!0,e):ye(e)):i(`Message with instance id: ${e.instanceId} not found`)}async function ve(e){var t=G(e);e?t.persistent&&(i("Persistent message dismissed, logging view"),await De(e),await Ie(e)):i(`Message with instance id: ${e.instanceId} not found`)}function ye(e){var t,n;$e(e.instanceId),t=e.elementId,(n=ee(t))&&(n.classList.remove("gist-visible"),n.style.removeProperty("height"),n.innerHTML="")}async function be(e,t){e?await X():K(),0==Oe.currentMessages.length&&(window.removeEventListener("message",ke),window.removeEventListener("touchstart",Te)),$e(t.instanceId),Oe.overlayInstanceId=null}function Se(e,t=null){if(t&&function(e){var t=ee(e);return!(!t||!t.classList.contains("gist-visible"))}(t))return i(`Message ${e.messageId} already showing in element ${t}.`),null;var n={endpoint:x.ENGINE_API_ENDPOINT[Oe.config.env],siteId:Oe.config.siteId,dataCenter:Oe.config.dataCenter,messageId:e.messageId,instanceId:e.instanceId,livePreview:!1,properties:e.properties,customAttributes:Object.fromEntries(new Map(ne))},s=`${x.GIST_VIEW_ENDPOINT[Oe.config.env]}/index.html`;return window.addEventListener("message",ke),window.addEventListener("touchstart",Te),t?(V.includes(t)&&function(e){const t=document.createElement("div");t.id=e,"x-gist-top"===e?document.body.insertBefore(t,document.body.firstChild):document.body.insertAdjacentElement("beforeend",t);i("Top & bottom elements injected into page")}(t),j(t,s,e,n)):B(s,e,n),e}async function Ie(e){i(`Message shown, logging view for: ${e.messageId}`);var t={};null!=e.queueId?(await De(e),t=await async function(e){try{return await T().post(`/api/v1/logs/queue/${e}`)}catch(e){return e.response}}(e.queueId)):t=await async function(e){try{return await T().post(`/api/v1/logs/message/${e}`)}catch(e){return e.response}}(e.messageId),200===t.status?i("Message view logged"):i(`Problem logging message: ${t.status}`)}function Ee(e){return Oe.currentMessages.find((t=>t.instanceId===e))}function $e(e){Oe.currentMessages=Oe.currentMessages.filter((t=>t.instanceId!==e))}function xe(e,t){$e(e),Oe.currentMessages.push(t)}function Te(){}async function ke(e){if(e.data.gist&&e.origin===x.RENDERER_HOST){var t=e.data.gist.instanceId,n=Ee(t);if(!n)return;var s=G(n);switch(e.data.gist.method){case"routeLoaded":var a=.001*((new Date).getTime()-n.renderStartTime);i(`Engine render for message: ${n.messageId} timer elapsed in ${a.toFixed(3)} seconds`),async function(e){const t=await fe(e);if(!t)return!1;c(t)}(n.queueId),n.currentRoute=e.data.gist.parameters.route,n.firstLoad&&(n.overlay?J(n):(l=n.elementId,(m=ee(l))&&m.classList.add("gist-visible")),Oe.messageShown(n),s.persistent?i("Persistent message shown, skipping logging view"):await Ie(n),n.firstLoad=!1),xe(t,n);break;case"tap":var o=e.data.gist.parameters.action,r=e.data.gist.parameters.name;if(Oe.messageAction(n,o,r),e.data.gist.parameters.system&&!s.persistent){await we(n);break}try{var u=new URL(o);if(u&&"gist:"===u.protocol)switch(u.href.replace("gist://","").split("?")[0]){case"close":await we(n),await ve(n),await Ce(n),await Le();break;case"showMessage":var d=u.searchParams.get("messageId"),g=u.searchParams.get("properties");d&&(g&&(g=JSON.parse(atob(g))),await Oe.showMessage({messageId:d,properties:g}));break;case"loadPage":(u=u.href.substring(u.href.indexOf("?url=")+5))&&(u.startsWith("mailto:")||u.startsWith("https://")||u.startsWith("http://")||u.startsWith("/")?window.location.href=u:window.location.href=window.location+u)}}catch{}break;case"routeChanged":n.currentRoute=e.data.gist.parameters.route,n.renderStartTime=(new Date).getTime(),xe(t,n),i(`Route changed to: ${n.currentRoute}`);break;case"sizeChanged":i(`Size Changed Width: ${e.data.gist.parameters.width} - Height: ${e.data.gist.parameters.height}`),n.elementId&&!n.shouldResizeHeight||function(e,t){var n=ee(e.elementId?e.elementId:Y(e.instanceId));if(n){var s=n.style;if(t.height>0)if(t.height>window.innerHeight){var i=1-(t.height/window.innerHeight-1);e.shouldScale&&i>=.4?(s.height=`${t.height}px`,s.transform=`translateX(-50%) translateY(-50%) scale(${i})`):s.height=`${window.innerHeight}px`}else s.height=`${t.height}px`}}(n,e.data.gist.parameters);break;case"titleChanged":i(`Overlay title changed to: ${e.data.gist.parameters.title}`),function(e,t){var n=ee(Y(e));n&&(n.title=t)}(t,e.data.gist.parameters.title);break;case"eventDispatched":Oe.events.dispatch("eventDispatched",{name:e.data.gist.parameters.name,payload:e.data.gist.parameters.payload});break;case"error":case"routeError":Oe.messageError(n),Oe.overlayInstanceId?be(!1,n):ye(n)}}var l,m}async function De(e){i(`Logging user message view locally for: ${e.queueId}`),oe(e)?await async function(e){i(`Marking broadcast ${e} as seen.`);const t=await re();if(!t)return;const n=await ae(t,e);if(!n)return;const{broadcast:s}=n.properties.gist,a=ce(t,e),c=ue(t,e);let u=r(a)||0;if(o(a,u+1),1===s.frequency.count)o(c,!1),i(`Marked broadcast ${e} as seen.`);else{let t=new Date;t.setSeconds(t.getSeconds()+s.frequency.delay),o(c,!1,t),i(`Marked broadcast ${e} as seen, broadcast was seen ${u+1} times, next show date is ${t}.`)}}(e.queueId):await async function(e){const t=await me();if(!t)return;const n=r(t)??[];n.push(e),o(t,n)}(e.queueId)}async function Ce(e){oe(e)&&(i(`Logging broadcast dismissed locally for: ${e.queueId}`),await async function(e){i(`Marking broadcast ${e} as dismissed.`);const t=await re();if(!t)return;const n=await ae(t,e);if(!n)return;const{broadcast:s}=n.properties.gist;if(!0===s.frequency.ignoreDismiss)return void i(`Broadcast ${e} is set to ignore dismiss.`);o(ue(t,e),!1),i(`Marked broadcast ${e} as dismissed and will not show again.`)}(e.queueId))}var Me=(e,t)=>e().then((e=>new Promise((t=>setTimeout(t,e))))(t).then((()=>Me(e,t)))),Re=!1;let qe=null;async function Ae(){Re?await Le():_()?(i("Queue watcher started"),Re=!0,Me((()=>new Promise((()=>async function(){if(x.hasActiveSSEConnection())return!x.isSSEConnectionManagedBySDK()&&qe&&(i("Not the main instance, closing our SSE connection."),Ue()),void await Le();qe&&(i("SSE connection not active, closing it."),Ue());if(x.useSSE()&&!U())return void await async function(){Ue();const e=(t=H(),null===t?(i("No user token available for SSE endpoint."),null):x.GIST_QUEUE_REALTIME_API_ENDPOINT[Oe.config.env]+`/api/v3/sse?userToken=${t}&siteId=${Oe.config.siteId}&sessionId=${A()}`);var t;if(null===e)return i("SSE endpoint not available, falling back to polling."),void await Ne();i(`Starting SSE queue listener on ${e}`),qe=new EventSource(e),x.setActiveSSEConnection(),qe.addEventListener("connected",(async e=>{try{i("SSE connection received:"),x.setUseSSEFlag(!0);var t=JSON.parse(e.data);t.heartbeat&&(x.setSSEHeartbeat(t.heartbeat),i(`SSE heartbeat set to ${t.heartbeat} seconds`)),x.setActiveSSEConnection()}catch(e){i(`Failed to parse SSE settings: ${e}`)}c(M),await Ne()})),qe.addEventListener("messages",(async e=>{try{var t=JSON.parse(e.data);i("SSE message received:"),await de(t),await ie(t),await Le()}catch(e){i("Failed to parse SSE message"),Ue()}})),qe.addEventListener("error",(async e=>{i("SSE error received:"),Ue()})),qe.addEventListener("heartbeat",(async e=>{i("SSE heartbeat received:"),x.setActiveSSEConnection(),x.setUseSSEFlag(!0)}))}();await Ne()}()))),1e3)):i("User token not setup, queue not started.")}async function Le(){var e=await async function(){const e=await re();return e?(r(e)??[]).filter((t=>{const{broadcast:n}=t.properties.gist,s=r(ue(e,t.queueId))??!0,i=r(ce(e,t.queueId))||0,a=0===n.frequency.count;return s&&(a||i<n.frequency.count)})):[]}(),t=await ge(),n=e.concat(t);i(`Messages in local queue: ${n.length}`);var s=n.sort(((e,t)=>e.priority-t.priority));for(const e of s)await Pe(e)}async function Pe(e){var t=G(e);if(t.hasRouteRule){var n=Oe.currentRoute;null==n&&(n=new URL(window.location.href).pathname);var s=t.routeRule;if(i(`Verifying route ${n} against rule: ${s}`),!new RegExp(s).test(n))return i(`Route ${n} does not match rule.`),!1}if(t.hasPosition&&(e.position=t.position),t.persistent||function(e){if(!oe(e))return!1;const{broadcast:t}=e.properties.gist;return 0===t.frequency.delay&&0===t.frequency.count}(e)||!await async function(e){const t=await fe(e);return!!t&&null!==r(t)}(e.queueId)){var a=!1;return(a=t.isEmbedded?await pe(e,t.elementId):await he(e))&&async function(e){const t=await fe(e);if(!t)return!1;o(t,!0,new Date(Date.now()+5e3))}(e.queueId),a}return i(`Not showing message with queueId ${e.queueId} because its already loading.`),!1}async function Ne(){if(_())if(Oe.isDocumentVisible)if(null===r(M)){var e=await q(),t=[];e?(200===e.status||204===e.status?(i("200 response, updating local store."),de(t=e.data),ie(t)):304===e.status&&i("304 response, using local store."),await Le()):i("There was an error while checking message queue.")}else i("Next queue pull scheduled for later.");else i("Document not visible, skipping queue check.");else i("User token reset, skipping queue check.")}function Ue(e=!1){e&&x.removeActiveSSEConnection(),(e||x.isSSEConnectionManagedBySDK())&&x.setUseSSEFlag(!1),qe&&(i("Stopping SSE queue listener..."),qe.close(),qe=null)}const _e="cioPreviewId";function We(){const e=new URLSearchParams(window.location.search).get(_e);var t;return e&&(t=!1,sessionStorage.setItem(a,t),Oe.setUserToken(e),i(`Preview mode enabled with user token: ${e}`)),!u()}var Oe=class{static async setup(e){this.events=new s,this.config={useAnonymousSession:void 0!==e.useAnonymousSession&&e.useAnonymousSession,siteId:e.siteId,dataCenter:e.dataCenter,env:void 0===e.env?"prod":e.env,logging:void 0!==e.logging&&e.logging,experiments:void 0!==e.experiments&&e.experiments},this.currentMessages=[],this.overlayInstanceId=null,this.currentRoute=null,this.isDocumentVisible=!0,this.config.isPreviewSession=We(),function(){const e=d();for(let t=e.length-1;t>=0;t--)g(e.key(t))}(),i(`Setup complete on ${this.config.env} environment.`),!this.config.isPreviewSession&&this.config.useAnonymousSession&&W(),await Ae(),document.addEventListener("visibilitychange",(async()=>{"hidden"===document.visibilityState?this.isDocumentVisible=!1:(this.isDocumentVisible=!0,await Le())}),!1)}static async setCurrentRoute(e){this.currentRoute=e,i(`Current route set to: ${e}`),await Le()}static async setUserToken(e,t){this.config.isPreviewSession||(!function(e,t){void 0===t&&(t=new Date).setDate(t.getDate()+30),o(L,e,t),U()&&(c(M),c(P)),i(`Set user token "${e}" with expiry date set to ${t}`)}(e,t),Ue(!0),await Ae())}static setUserLocale(e){var t;o(k,t=e),i(`Set user locate to "${t}"`)}static setCustomAttribute(e,t){return function(e,t){return e&&"string"==typeof e?(ne.set(e,t),se(),i(`Set custom attribute "${e}" to "${t}"`),!0):(i(`Invalid key for custom attribute: ${e}`),!1)}(e,t)}static clearCustomAttributes(){ne.clear(),c(te),i("Cleared all custom attributes")}static removeCustomAttribute(e){return function(e){if(!e||"string"!=typeof e)return i(`Invalid key for custom attribute: ${e}`),!1;const t=ne.has(e);return ne.delete(e),ne.size>0?se():c(te),i(`Removed custom attribute "${e}"`),t}(e)}static async clearUserToken(){this.config.isPreviewSession||(c(L),i("Cleared user token"),this.config.useAnonymousSession&&W(),Ue(!0),await Ae())}static async dismissMessage(e){var t=Ee(e);await we(t),await ve(t),await Ce(t),await Le()}static async embedMessage(e,t){var n=await pe(e,t);return n?n.instanceId:null}static async showMessage(e){var t=await he(e);return t?t.instanceId:null}static messageShown(e){i(`Message shown: ${e.messageId}`),this.events.dispatch("messageShown",e)}static messageDismissed(e){null!==e&&(i(`Message dismissed: ${e.messageId}`),this.events.dispatch("messageDismissed",e))}static messageError(e){i(`Message error: ${e.messageId}`),this.events.dispatch("messageError",e)}static messageAction(e,t,n){i(`Message action: ${e.currentRoute}, ${t} with name ${n} on ${e.instanceId}`),this.events.dispatch("messageAction",{message:e,action:t,name:n})}}},7852:function(e,t,n){const s=n(1990).A;e.exports=s}}]);
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_customerio_cdp_analytics_browser=self.webpackChunk_customerio_cdp_analytics_browser||[]).push([[50],{441:function(t,n,i){function e(t){return"object"===Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}i.d(n,{Qd:function(){return e}})},1419:function(t,n,i){function e(t,n){var i,e;return"boolean"==typeof(null==n?void 0:n.enabled)?n.enabled:null===(e=null===(i=null==t?void 0:t.__default)||void 0===i?void 0:i.enabled)||void 0===e||e}i.d(n,{j:function(){return e}})},3771:function(t,n,i){i.d(n,{ajsDestinations:function(){return P}});var e=i(5478),r=i(4303),o=i(6789),s=i(8456),a=i(9752),u=i(4082),c=i(2620),l=i(1419),d=i(5835),h=i(7106),f=i(2939),v=i(9732),p=i(1418),g=i(2911),m=i(6238);function y(t){return t.toLowerCase().replace(".","").replace(/\s+/g,"-")}function w(t,n){return void 0===n&&(n=!1),n?btoa(t).replace(/=/g,""):void 0}function b(t,n,i,r){return(0,e.sH)(this,void 0,Promise,(function(){var o,s,a,u,c,l;return(0,e.YH)(this,(function(d){switch(d.label){case 0:o=y(n),s=w(o,r),a=(0,g.YM)(),u="".concat(a,"/").concat(null!=s?s:o,".js?version=").concat(i),d.label=1;case 1:return d.trys.push([1,3,,4]),[4,(0,m.k)(u)];case 2:return d.sent(),function(t,n,i){var r,o;try{var s=(null!==(o=null===(r=null===window||void 0===window?void 0:window.performance)||void 0===r?void 0:r.getEntriesByName(t,"resource"))&&void 0!==o?o:[])[0];s&&n.stats.gauge("legacy_destination_time",Math.round(s.duration),(0,e.fX)([i],s.duration<100?["cached"]:[],!0))}catch(t){}}(u,t,n),[3,4];case 3:throw c=d.sent(),t.stats.gauge("legacy_destination_time",-1,["plugin:".concat(n),"failed"]),c;case 4:return l=window["".concat(o,"Deps")],[4,Promise.all(l.map((function(t){return(0,m.k)(a+t+".gz")})))];case 5:return d.sent(),window["".concat(o,"Loader")](),[2,window["".concat(o,"Integration")]]}}))}))}var _=i(441);function H(t,n){return(0,e.sH)(this,void 0,Promise,(function(){var i,r=this;return(0,e.YH)(this,(function(a){switch(a.label){case 0:return i=[],(0,o.a)()?[2,n]:[4,(0,h._)((function(){return n.length>0&&(0,o.s)()}),(function(){return(0,e.sH)(r,void 0,void 0,(function(){var r,o;return(0,e.YH)(this,(function(e){switch(e.label){case 0:return(r=n.pop())?[4,(0,c.C)(r,t)]:[2];case 1:return o=e.sent(),o instanceof s.o||i.push(r),[2]}}))}))}))];case 1:return a.sent(),i.map((function(t){return n.pushWithBackoff(t)})),[2,n]}}))}))}var k=function(){function t(t,n,i,r,o){void 0===i&&(i={}),this.options={},this.type="destination",this.middleware=[],this._ready=!1,this._initialized=!1,this.flushing=!1,this.name=t,this.version=n,this.settings=(0,e.Cl)({},i),this.disableAutoISOConversion=r.disableAutoISOConversion||!1,this.integrationSource=o,this.settings.type&&"browser"===this.settings.type&&delete this.settings.type,this.options=r,this.buffer=r.disableClientPersistence?new f.M(4,[]):new v.x(4,"dest-".concat(t)),this.scheduleFlush()}return t.prototype.isLoaded=function(){return this._ready},t.prototype.ready=function(){var t;return null!==(t=this.onReady)&&void 0!==t?t:Promise.resolve()},t.prototype.load=function(t,n){var i;return(0,e.sH)(this,void 0,Promise,(function(){var r,o,s=this;return(0,e.YH)(this,(function(e){switch(e.label){case 0:return this._ready||void 0!==this.onReady?[2]:null===(i=this.integrationSource)||void 0===i?[3,1]:(o=i,[3,3]);case 1:return[4,b(t,this.name,this.version,this.options.obfuscate)];case 2:o=e.sent(),e.label=3;case 3:r=o,this.integration=function(t,n,i){var e;"Integration"in t?(t({user:function(){return i.user()},addIntegration:function(){}}),e=t.Integration):e=t;var r=new e(n);return r.analytics=i,r}(r,this.settings,n),this.onReady=new Promise((function(t){s.integration.once("ready",(function(){s._ready=!0,t(!0)}))})),this.onInitialize=new Promise((function(t){s.integration.on("initialize",(function(){s._initialized=!0,t(!0)}))}));try{t.stats.increment("analytics_js.integration.invoke",1,["method:initialize","integration_name:".concat(this.name)]),this.integration.initialize()}catch(n){throw t.stats.increment("analytics_js.integration.invoke.error",1,["method:initialize","integration_name:".concat(this.name)]),n}return[2]}}))}))},t.prototype.unload=function(t,n){return function(t,n,i){return(0,e.sH)(this,void 0,Promise,(function(){var r,o,s,a;return(0,e.YH)(this,(function(e){return r=(0,g.YM)(),o=y(t),s=w(t,i),a="".concat(r,"/").concat(null!=s?s:o,".js?version=").concat(n),[2,(0,m.d)(a)]}))}))}(this.name,this.version,this.options.obfuscate)},t.prototype.addMiddleware=function(){for(var t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];this.middleware=(t=this.middleware).concat.apply(t,n)},t.prototype.shouldBuffer=function(t){return"page"!==t.event.type&&((0,o.a)()||!1===this._ready||!1===this._initialized)},t.prototype.send=function(t,n,i){var r,o;return(0,e.sH)(this,void 0,Promise,(function(){var s,u,c,d,h,f;return(0,e.YH)(this,(function(v){switch(v.label){case 0:if(this.shouldBuffer(t))return this.buffer.push(t),this.scheduleFlush(),[2,t];if(s=null===(o=null===(r=this.options)||void 0===r?void 0:r.plan)||void 0===o?void 0:o.track,u=t.event.event,s&&u&&"Customer.io Data Pipelines"!==this.name){if(c=s[u],!(0,l.j)(s,c))return t.updateEvent("integrations",(0,e.Cl)((0,e.Cl)({},t.event.integrations),{All:!1,"Customer.io Data Pipelines":!0})),t.cancel(new a.d({retry:!1,reason:"Event ".concat(u," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"})),[2,t];if(t.updateEvent("integrations",(0,e.Cl)((0,e.Cl)({},t.event.integrations),null==c?void 0:c.integrations)),(null==c?void 0:c.enabled)&&!1===(null==c?void 0:c.integrations[this.name]))return t.cancel(new a.d({retry:!1,reason:"Event ".concat(u," disabled for integration ").concat(this.name," in tracking plan"),type:"Dropped by plan"})),[2,t]}return[4,(0,p.applyDestinationMiddleware)(this.name,t.event,this.middleware)];case 1:if(null===(d=v.sent()))return[2,t];h=new n(d,{traverse:!this.disableAutoISOConversion}),t.stats.increment("analytics_js.integration.invoke",1,["method:".concat(i),"integration_name:".concat(this.name)]),v.label=2;case 2:return v.trys.push([2,5,,6]),this.integration?[4,this.integration.invoke.call(this.integration,i,h)]:[3,4];case 3:v.sent(),v.label=4;case 4:return[3,6];case 5:throw f=v.sent(),t.stats.increment("analytics_js.integration.invoke.error",1,["method:".concat(i),"integration_name:".concat(this.name)]),f;case 6:return[2,t]}}))}))},t.prototype.track=function(t){return(0,e.sH)(this,void 0,Promise,(function(){return(0,e.YH)(this,(function(n){return[2,this.send(t,r.Track,"track")]}))}))},t.prototype.page=function(t){var n;return(0,e.sH)(this,void 0,Promise,(function(){var i=this;return(0,e.YH)(this,(function(e){return(null===(n=this.integration)||void 0===n?void 0:n._assumesPageview)&&!this._initialized&&this.integration.initialize(),[2,this.onInitialize.then((function(){return i.send(t,r.Page,"page")}))]}))}))},t.prototype.identify=function(t){return(0,e.sH)(this,void 0,Promise,(function(){return(0,e.YH)(this,(function(n){return[2,this.send(t,r.Identify,"identify")]}))}))},t.prototype.alias=function(t){return(0,e.sH)(this,void 0,Promise,(function(){return(0,e.YH)(this,(function(n){return[2,this.send(t,r.Alias,"alias")]}))}))},t.prototype.group=function(t){return(0,e.sH)(this,void 0,Promise,(function(){return(0,e.YH)(this,(function(n){return[2,this.send(t,r.Group,"group")]}))}))},t.prototype.scheduleFlush=function(){var t=this;this.flushing||setTimeout((function(){return(0,e.sH)(t,void 0,void 0,(function(){var t;return(0,e.YH)(this,(function(n){switch(n.label){case 0:return this.flushing=!0,t=this,[4,H(this,this.buffer)];case 1:return t.buffer=n.sent(),this.flushing=!1,this.buffer.todo>0&&this.scheduleFlush(),[2]}}))}))}),5e3*Math.random())},t}();function P(t,n,i,r,o){var s,a;if(void 0===n&&(n={}),void 0===i&&(i={}),(0,u.S)())return[];t.plan&&((i=null!=i?i:{}).plan=t.plan);var c=null!==(a=null===(s=t.middlewareSettings)||void 0===s?void 0:s.routingRules)&&void 0!==a?a:[],l=t.integrations,h=i.integrations,f=(0,d.J)(t,null!=i?i:{}),v=null==o?void 0:o.reduce((function(t,n){var i;return(0,e.Cl)((0,e.Cl)({},t),((i={})[function(t){return("Integration"in t?t.Integration:t).prototype.name}(n)]=n,i))}),{}),p=new Set((0,e.fX)((0,e.fX)([],Object.keys(l).filter((function(t){return function(t,n){var i,e=n.type,r=n.bundlingStatus,o=n.versionSettings,s="unbundled"!==r&&("browser"===e||(null===(i=null==o?void 0:o.componentTypes)||void 0===i?void 0:i.includes("browser")));return"Customer.io Data Pipelines"!==t&&"Iterable"!==t&&s}(t,l[t])})),!0),Object.keys(v||{}).filter((function(t){return(0,_.Qd)(l[t])||(0,_.Qd)(null==h?void 0:h[t])})),!0));return Array.from(p).filter((function(t){return!function(t,n){var i=!1===n.All&&void 0===n[t];return!1===n[t]||i}(t,n)})).map((function(t){var n=function(t){var n,i,e,r;return null!==(r=null!==(i=null===(n=null==t?void 0:t.versionSettings)||void 0===n?void 0:n.override)&&void 0!==i?i:null===(e=null==t?void 0:t.versionSettings)||void 0===e?void 0:e.version)&&void 0!==r?r:"latest"}(l[t]),e=new k(t,n,f[t],i,null==v?void 0:v[t]);return c.filter((function(n){return n.destinationName===t})).length>0&&r&&e.addMiddleware(r),e}))}}}]);
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_customerio_cdp_analytics_browser=self.webpackChunk_customerio_cdp_analytics_browser||[]).push([[248],{4875:function(t,n,e){e.r(n),e.d(n,{form:function(){return i},link:function(){return o}});var r=e(7764);function o(t,n,e,o){var i=this;return t?((t instanceof Element?[t]:"toArray"in t?t.toArray():t).forEach((function(t){t.addEventListener("click",(function(u){var c,a,s=n instanceof Function?n(t):n,f=e instanceof Function?e(t):e,l=t.getAttribute("href")||t.getAttributeNS("http://www.w3.org/1999/xlink","href")||t.getAttribute("xlink:href")||(null===(c=t.getElementsByTagName("a")[0])||void 0===c?void 0:c.getAttribute("href")),h=(0,r.s2)(i.track(s,f,null!=o?o:{}),null!==(a=i.settings.timeout)&&void 0!==a?a:500);(function(t,n){return!("_blank"!==t.target||!n)})(t,l)||function(t){var n=t;return!!(n.ctrlKey||n.shiftKey||n.metaKey||n.button&&1==n.button)}(u)||l&&(u.preventDefault?u.preventDefault():u.returnValue=!1,h.catch(console.error).then((function(){window.location.href=l})).catch(console.error))}),!1)})),this):this}function i(t,n,e,o){var i=this;return t?(t instanceof HTMLFormElement&&(t=[t]),t.forEach((function(t){if(!(t instanceof Element))throw new TypeError("Must pass HTMLElement to trackForm/trackSubmit.");var u=function(u){var c;u.preventDefault?u.preventDefault():u.returnValue=!1;var a=n instanceof Function?n(t):n,s=e instanceof Function?e(t):e;(0,r.s2)(i.track(a,s,null!=o?o:{}),null!==(c=i.settings.timeout)&&void 0!==c?c:500).catch(console.error).then((function(){t.submit()})).catch(console.error)},c=window.jQuery||window.Zepto;c?c(t).submit(u):t.addEventListener("submit",u,!1)})),this):this}}}]);
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_customerio_cdp_analytics_browser=self.webpackChunk_customerio_cdp_analytics_browser||[]).push([[926],{546:function(e,n,i){i.d(n,{InAppPlugin:function(){return u}});var t,s=i(5478);!function(e){e.MessageOpened="in-app:message-opened",e.MessageDismissed="in-app:message-dismissed",e.MessageError="in-app:message-error",e.MessageAction="in-app:message-action"}(t||(t={}));var o,r=Object.values(t);!function(e){e.Metric="Report Delivery Event",e.Content="Report Content Event",e.Opened="opened",e.Clicked="clicked",e.ViewedContent="viewed_content",e.ClickedContent="clicked_content"}(o||(o={}));var a="in_app_content";function d(e,n){return new CustomEvent(e,{detail:n})}var l=i(7852),c=i.n(l);function u(e){var n,i=this,l=!1,u=!1,v=new EventTarget;function p(){return(0,s.sH)(this,void 0,void 0,(function(){var e;return(0,s.YH)(this,(function(i){switch(i.label){case 0:return(e=n.user().anonymousId())?[4,c().setCustomAttribute("cio_anonymous_id",e)]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}}))}))}function m(){l&&!u&&(n.on("reset",g),e.events&&(r.forEach((function(n){v.addEventListener(n,null==e?void 0:e.events)})),["messageDismissed","messageError"].forEach((function(e){c().events.on(e,(function(n){var i,s;v.dispatchEvent(d(function(e){switch(e){case"messageShown":return t.MessageOpened;case"messageDismissed":return t.MessageDismissed;case"messageError":return t.MessageError;case"messageAction":return t.MessageAction;default:return""}}(e),{messageId:n.messageId,deliveryId:null===(s=null===(i=n.properties)||void 0===i?void 0:i.gist)||void 0===s?void 0:s.campaignId}))}))}))),c().events.on("messageShown",(function(i){var s,r,l,u,p,m,g,f,I=null===(r=null===(s=null==i?void 0:i.properties)||void 0===s?void 0:s.gist)||void 0===r?void 0:r.campaignId;if(e.events&&v.dispatchEvent(d(t.MessageOpened,{messageId:null==i?void 0:i.messageId,deliveryId:I,message:{dismiss:function(){c().dismissMessage(null==i?void 0:i.instanceId)}}})),void 0===I||""===I){var h=null===(p=null===(u=null===(l=null==i?void 0:i.properties)||void 0===l?void 0:l.gist)||void 0===u?void 0:u.broadcast)||void 0===p?void 0:p.broadcastIdInt;if(h){var y=null===(f=null===(g=null===(m=null==i?void 0:i.properties)||void 0===m?void 0:m.gist)||void 0===g?void 0:g.broadcast)||void 0===f?void 0:f.templateId;n.track(o.Content,{actionType:o.ViewedContent,contentId:h,templateId:y,contentType:a})}}else n.track(o.Metric,{deliveryId:I,metric:o.Opened})})),c().events.on("messageAction",(function(i){var s,r,l,u,p,m,g,f,I,h,y,C=null===(l=null===(r=null===(s=null==i?void 0:i.message)||void 0===s?void 0:s.properties)||void 0===r?void 0:r.gist)||void 0===l?void 0:l.campaignId;if(e.events&&v.dispatchEvent(d(t.MessageAction,{messageId:i.message.messageId,deliveryId:C,action:i.action,name:i.name,actionName:i.name,actionValue:i.action,message:{dismiss:function(){c().dismissMessage(i.message.instanceId)}}})),"gist://close"!==i.action)if(void 0===C||""===C){var b=null===(g=null===(m=null===(p=null===(u=null==i?void 0:i.message)||void 0===u?void 0:u.properties)||void 0===p?void 0:p.gist)||void 0===m?void 0:m.broadcast)||void 0===g?void 0:g.broadcastIdInt;if(b){var k=null===(y=null===(h=null===(I=null===(f=null==i?void 0:i.message)||void 0===f?void 0:f.properties)||void 0===I?void 0:I.gist)||void 0===h?void 0:h.broadcast)||void 0===y?void 0:y.templateId;n.track(o.Content,{actionType:o.ClickedContent,contentId:b,templateId:k,contentType:a,actionName:i.name,actionValue:i.action})}}else n.track(o.Metric,{deliveryId:C,metric:o.Clicked,actionName:i.name,actionValue:i.action})})),c().events.on("eventDispatched",(function(e){var i,t,s;if("analytics:track"===e.name){var o=null===(i=e.payload)||void 0===i?void 0:i.event;if(void 0===o||""===o)return;n.track(o,null===(t=e.payload)||void 0===t?void 0:t.properties,null===(s=e.payload)||void 0===s?void 0:s.options)}})))}function g(e){return(0,s.sH)(this,void 0,Promise,(function(){return(0,s.YH)(this,(function(n){switch(n.label){case 0:return[4,c().clearUserToken()];case 1:return n.sent(),[4,c().clearCustomAttributes()];case 2:return n.sent(),[4,p()];case 3:return n.sent(),[2,e]}}))}))}function f(e){return(0,s.sH)(this,void 0,Promise,(function(){var i;return(0,s.YH)(this,(function(t){switch(t.label){case 0:return l?"string"==typeof(i=n.user().id())&&i.length>0?[4,c().setUserToken(i)]:[3,2]:[2,e];case 1:return t.sent(),[3,4];case 2:return[4,c().clearUserToken()];case 3:t.sent(),t.label=4;case 4:return[2,e]}}))}))}var I={name:"Customer.io In-App Plugin",type:"before",version:"0.0.1",isLoaded:function(){return u},load:function(t,o){return(0,s.sH)(i,void 0,void 0,(function(){return(0,s.YH)(this,(function(i){switch(i.label){case 0:return n=o,null==e.siteId||""===e.siteId?(s="siteId is required. Can't initialize.",console.error("[Customer.io In-App Plugin] ".concat(s)),[2,t]):[4,p()];case 1:return i.sent(),[4,c().setup({siteId:e.siteId,env:e._env?e._env:"prod",logging:e._logging,useAnonymousSession:e.anonymousInApp})];case 2:return i.sent(),l=!0,[4,f(t)];case 3:return i.sent(),m(),u=!0,[2,Promise.resolve()]}var s}))}))},identify:f,page:function(e){var n,i,t,s,o;if(!u)return e;var r=null!==(t=null===(i=null===(n=e.event)||void 0===n?void 0:n.properties)||void 0===i?void 0:i.name)&&void 0!==t?t:null===(o=null===(s=e.event)||void 0===s?void 0:s.properties)||void 0===o?void 0:o.url;return"string"==typeof r&&r.length>0&&c().setCurrentRoute(r),e},unload:function(){e.events&&r.forEach((function(n){v.removeEventListener(n,null==e?void 0:e.events)}))}};return I}}}]);
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.AnalyticsNext=e():t.AnalyticsNext=e()}(self,(function(){return function(){var t,e,n,r,i={148:function(t,e,n){"use strict";n.d(e,{w:function(){return a}});var r=n(5478),i=n(824),o=n(6452),u=n(9785);function s(t){console.error("Error sending performance metrics",t)}var a=function(){function t(t){var e,n,r,i,o=this;if(this.host=null!==(e=null==t?void 0:t.host)&&void 0!==e?e:"cdp.customer.io/v1",this.sampleRate=null!==(n=null==t?void 0:t.sampleRate)&&void 0!==n?n:1,this.flushTimer=null!==(r=null==t?void 0:t.flushTimer)&&void 0!==r?r:3e4,this.maxQueueSize=null!==(i=null==t?void 0:t.maxQueueSize)&&void 0!==i?i:20,this.queue=[],this.sampleRate>0){var u=!1,a=function(){u||(u=!0,o.flush().catch(s),u=!1,setTimeout(a,o.flushTimer))};a()}}return t.prototype.increment=function(t,e){if(t.includes("analytics_js.")&&0!==e.length&&!(Math.random()>this.sampleRate||this.queue.length>=this.maxQueueSize)){var n=function(t,e,n){var i=e.reduce((function(t,e){var n=e.split(":"),r=n[0],i=n[1];return t[r]=i,t}),{});return{type:"Counter",metric:t,value:1,tags:(0,r.Cl)((0,r.Cl)({},i),{library:"analytics.js",library_version:"web"===n?"next-".concat(o.r):"npm:next-".concat(o.r)})}}(t,e,(0,u.XZ)());this.queue.push(n),t.includes("error")&&this.flush().catch(s)}},t.prototype.flush=function(){return(0,r.sH)(this,void 0,Promise,(function(){var t=this;return(0,r.YH)(this,(function(e){switch(e.label){case 0:return this.queue.length<=0?[2]:[4,this.send().catch((function(e){s(e),t.sampleRate=0}))];case 1:return e.sent(),[2]}}))}))},t.prototype.send=function(){return(0,r.sH)(this,void 0,Promise,(function(){var t,e,n;return(0,r.YH)(this,(function(r){return t={series:this.queue},this.queue=[],e={"Content-Type":"text/plain"},n="https://".concat(this.host,"/m"),[2,(0,i.h)(n,{headers:e,body:JSON.stringify(t),method:"POST"})]}))}))},t}()},518:function(t,e,n){"use strict";var r=n(7237);function i(t,e){return void 0===e&&(e=!0),t&&"object"==typeof t?function(t,e){return Object.keys(t).forEach((function(n){t[n]=i(t[n],e)})),t}(t,e):Array.isArray(t)?function(t,e){return t.forEach((function(n,r){t[r]=i(n,e)})),t}(t,e):r.is(t,e)?r.parse(t):t}t.exports=i},824:function(t,e,n){"use strict";function r(t,e){return e=e||{},new Promise((function(n,r){var i=new XMLHttpRequest,o=[],u=[],s={},a=function(){return{ok:2==(i.status/100|0),statusText:i.statusText,status:i.status,url:i.responseURL,text:function(){return Promise.resolve(i.responseText)},json:function(){return Promise.resolve(JSON.parse(i.responseText))},blob:function(){return Promise.resolve(new Blob([i.response]))},clone:a,headers:{keys:function(){return o},entries:function(){return u},get:function(t){return s[t.toLowerCase()]},has:function(t){return t.toLowerCase()in s}}}};for(var c in i.open(e.method||"get",t,!0),i.onload=function(){i.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(t,e,n){o.push(e=e.toLowerCase()),u.push([e,n]),s[e]=s[e]?s[e]+","+n:n})),n(a())},i.onerror=r,i.withCredentials="include"==e.credentials,e.headers)i.setRequestHeader(c,e.headers[c]);i.send(e.body||null)}))}n.d(e,{h:function(){return o}});var i=n(5120),o=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=(0,i.m)();return(n&&n.fetch||r).apply(void 0,t)}},1418:function(t,e,n){"use strict";n.r(e),n.d(e,{applyDestinationMiddleware:function(){return u},sourceMiddlewarePlugin:function(){return s}});var r=n(5478),i=n(9752),o=n(7536);function u(t,e,n){return(0,r.sH)(this,void 0,Promise,(function(){function i(e,n){return(0,r.sH)(this,void 0,Promise,(function(){var i,u,s;return(0,r.YH)(this,(function(a){switch(a.label){case 0:return i=!1,u=null,[4,n({payload:(0,o.W)(e,{clone:!0,traverse:!1}),integration:t,next:function(t){i=!0,null===t&&(u=null),t&&(u=t.obj)}})];case 1:return a.sent(),i||null===u||(u.integrations=(0,r.Cl)((0,r.Cl)({},e.integrations),((s={})[t]=!1,s))),[2,u]}}))}))}var u,s,a,c,l;return(0,r.YH)(this,(function(t){switch(t.label){case 0:u=(0,o.W)(e,{clone:!0,traverse:!1}).rawEvent(),s=0,a=n,t.label=1;case 1:return s<a.length?(c=a[s],[4,i(u,c)]):[3,4];case 2:if(null===(l=t.sent()))return[2,null];u=l,t.label=3;case 3:return s++,[3,1];case 4:return[2,u]}}))}))}function s(t,e){function n(n){return(0,r.sH)(this,void 0,Promise,(function(){var u;return(0,r.YH)(this,(function(r){switch(r.label){case 0:return u=!1,[4,t({payload:(0,o.W)(n.event,{clone:!0,traverse:!1}),integrations:null!=e?e:{},next:function(t){u=!0,t&&(n.event=t.obj)}})];case 1:if(r.sent(),!u)throw new i.d({retry:!1,type:"middleware_cancellation",reason:"Middleware `next` function skipped"});return[2,n]}}))}))}return{name:"Source Middleware ".concat(t.name),type:"before",version:"0.1.0",isLoaded:function(){return!0},load:function(t){return Promise.resolve(t)},track:n,page:n,identify:n,alias:n,group:n}}},2265:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Facade=void 0;var i=r(n(8971)),o=n(3194),u=r(n(7751)),s=r(n(7639)),a=r(n(8578)),c=r(n(518));function l(t,e){e=e||{},this.raw=o.clone(t),"clone"in e||(e.clone=!0),e.clone&&(t=o.clone(t)),"traverse"in e||(e.traverse=!0),t.timestamp="timestamp"in t?s.default(t.timestamp):new Date,e.traverse&&c.default(t),this.opts=e,this.obj=t}e.Facade=l;var f=l.prototype;function p(t){return o.clone(t)}f.proxy=function(t){var e=t.split("."),n=this[t=e.shift()]||this.field(t);return n?("function"==typeof n&&(n=n.call(this)||{}),0===e.length||(n=a.default(n,e.join("."))),this.opts.clone?p(n):n):n},f.field=function(t){var e=this.obj[t];return this.opts.clone?p(e):e},l.proxy=function(t){return function(){return this.proxy(t)}},l.field=function(t){return function(){return this.field(t)}},l.multi=function(t){return function(){var e=this.proxy(t+"s");if(Array.isArray(e))return e;var n=this.proxy(t);return n&&(n=[this.opts.clone?o.clone(n):n]),n||[]}},l.one=function(t){return function(){var e=this.proxy(t);if(e)return e;var n=this.proxy(t+"s");return Array.isArray(n)?n[0]:void 0}},f.json=function(){var t=this.opts.clone?o.clone(this.obj):this.obj;return this.type&&(t.type=this.type()),t},f.rawEvent=function(){return this.raw},f.options=function(t){var e=this.obj.options||this.obj.context||{},n=this.opts.clone?o.clone(e):e;if(!t)return n;if(this.enabled(t)){var r=this.integrations(),i=r[t]||a.default(r,t);return"object"!=typeof i&&(i=a.default(this.options(),t)),"object"==typeof i?i:{}}},f.context=f.options,f.enabled=function(t){var e=this.proxy("options.providers.all");"boolean"!=typeof e&&(e=this.proxy("options.all")),"boolean"!=typeof e&&(e=this.proxy("integrations.all")),"boolean"!=typeof e&&(e=!0);var n=e&&u.default(t),r=this.integrations();if(r.providers&&r.providers.hasOwnProperty(t)&&(n=r.providers[t]),r.hasOwnProperty(t)){var i=r[t];n="boolean"!=typeof i||i}return!!n},f.integrations=function(){return this.obj.integrations||this.proxy("options.providers")||this.options()},f.active=function(){var t=this.proxy("options.active");return null==t&&(t=!0),t},f.anonymousId=function(){return this.field("anonymousId")||this.field("sessionId")},f.sessionId=f.anonymousId,f.groupId=l.proxy("options.groupId"),f.traits=function(t){var e=this.proxy("options.traits")||{},n=this.userId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("options.traits."+r):this[r]();null!=i&&(e[t[r]]=i,delete e[r])}return e},f.library=function(){var t=this.proxy("options.library");return t?"string"==typeof t?{name:t,version:null}:t:{name:"unknown",version:null}},f.device=function(){var t=this.proxy("context.device");"object"==typeof t&&null!==t||(t={});var e=this.library().name;return t.type||(e.indexOf("ios")>-1&&(t.type="ios"),e.indexOf("android")>-1&&(t.type="android")),t},f.userAgent=l.proxy("context.userAgent"),f.timezone=l.proxy("context.timezone"),f.timestamp=l.field("timestamp"),f.channel=l.field("channel"),f.ip=l.proxy("context.ip"),f.userId=l.field("userId"),i.default(f)},2620:function(t,e,n){"use strict";n.d(e,{C:function(){return o},D:function(){return u}});var r=n(5478),i=n(9752);function o(t,e){t.log("debug","plugin",{plugin:e.name});var n=(new Date).getTime(),o=e[t.event.type];return void 0===o?Promise.resolve(t):function(t){return(0,r.sH)(this,void 0,void 0,(function(){var e;return(0,r.YH)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,t()];case 1:return[2,n.sent()];case 2:return e=n.sent(),[2,Promise.reject(e)];case 3:return[2]}}))}))}((function(){return o.apply(e,[t])})).then((function(t){var r=(new Date).getTime()-n;return t.stats.gauge("plugin_time",r,["plugin:".concat(e.name)]),t})).catch((function(n){if(n instanceof i.d&&"middleware_cancellation"===n.type)throw n;return n instanceof i.d?(t.log("warn",n.type,{plugin:e.name,error:n}),n):(t.log("error","plugin Error",{plugin:e.name,error:n}),t.stats.increment("plugin_error",1,["plugin:".concat(e.name)]),n)}))}function u(t,e){return o(t,e).then((function(e){if(e instanceof i.j)return e;t.log("debug","Context canceled"),t.stats.increment("context_canceled"),t.cancel(e)}))}},2911:function(t,e,n){"use strict";n.d(e,{I2:function(){return s},YM:function(){return a},qQ:function(){return u}});var r,i=n(6091),o=/(https?:\/\/[\w.\-:]+)\/(?:analytics\.js\/v1|v1\/analytics-js\/snippet)\/[\w\-:]+\/(analytics\.(?:min)\.js)/,u=function(t){var e=(0,i.kJ)();e&&(e._cdn=t),r=t},s=function(){var t,e=null!=r?r:null===(t=(0,i.kJ)())||void 0===t?void 0:t._cdn;if(e)return e;var n=function(){for(var t,e,n,r=0,i=Array.prototype.slice.call(document.querySelectorAll("script"));r<i.length;r++){var u=i[r],s=null!==(t=u.getAttribute("src"))&&void 0!==t?t:"",a=o.exec(s);if(a&&a[1]&&(n=a[1]),null!=(null===(e=u.dataset)||void 0===e?void 0:e.globalCustomerioAnalyticsKey))break}return n}();return n||"https://cdp.customer.io"},a=function(){var t=s();return"".concat(t,"/v1/analytics-js/actions")}},2939:function(t,e,n){"use strict";n.d(e,{g:function(){return o},M:function(){return u}});var r=n(5478),i=n(6551);var o="onRemoveFromFuture",u=function(t){function e(e,n,r){var i=t.call(this)||this;return i.future=[],i.maxAttempts=e,i.queue=n,i.seen=null!=r?r:{},i}return(0,r.C6)(e,t),e.prototype.push=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e.map((function(e){return!(t.updateAttempts(e)>t.maxAttempts||t.includes(e))&&(t.queue.push(e),!0)}));return this.queue=this.queue.sort((function(e,n){return t.getAttempts(e)-t.getAttempts(n)})),r},e.prototype.pushWithBackoff=function(t){var e=this;if(0===this.getAttempts(t))return this.push(t)[0];var n=this.updateAttempts(t);if(n>this.maxAttempts||this.includes(t))return!1;var r=function(t){var e=Math.random()+1,n=t.minTimeout,r=void 0===n?500:n,i=t.factor,o=void 0===i?2:i,u=t.attempt,s=t.maxTimeout,a=void 0===s?1/0:s;return Math.min(e*r*Math.pow(o,u),a)}({attempt:n-1});return setTimeout((function(){e.queue.push(t),e.future=e.future.filter((function(e){return e.id!==t.id})),e.emit(o)}),r),this.future.push(t),!0},e.prototype.getAttempts=function(t){var e;return null!==(e=this.seen[t.id])&&void 0!==e?e:0},e.prototype.updateAttempts=function(t){return this.seen[t.id]=this.getAttempts(t)+1,this.getAttempts(t)},e.prototype.includes=function(t){return this.queue.includes(t)||this.future.includes(t)||Boolean(this.queue.find((function(e){return e.id===t.id})))||Boolean(this.future.find((function(e){return e.id===t.id})))},e.prototype.pop=function(){return this.queue.shift()},Object.defineProperty(e.prototype,"length",{get:function(){return this.queue.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"todo",{get:function(){return this.queue.length+this.future.length},enumerable:!1,configurable:!0}),e}(i.v)},3057:function(t,e,n){"use strict";function r(t){for(var e=t.constructor.prototype,n=0,r=Object.getOwnPropertyNames(e);n<r.length;n++){var i=r[n];if("constructor"!==i){var o=Object.getOwnPropertyDescriptor(t.constructor.prototype,i);o&&"function"==typeof o.value&&(t[i]=t[i].bind(t))}}return t}n.d(e,{A:function(){return r}})},3194:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.clone=void 0,e.clone=function t(e){if("[object Object]"===Object.prototype.toString.call(e)){var n={};for(var r in e)n[r]=t(e[r]);return n}return Array.isArray(e)?e.map(t):e}},3398:function(t,e,n){"use strict";n.d(e,{KJ:function(){return v},YJ:function(){return g},lJ:function(){return d},xD:function(){return h}});var r=n(5478),i=n(9659),o=n(3478),u=n(9894),s=n(3057),a={persist:!0,cookie:{key:"ajs_user_id",oldKey:"ajs_user"},localStorage:{key:"ajs_user_traits"}},c=function(){function t(){this.cache={}}return t.prototype.get=function(t){return this.cache[t]},t.prototype.set=function(t,e){this.cache[t]=e},t.prototype.remove=function(t){delete this.cache[t]},Object.defineProperty(t.prototype,"type",{get:function(){return"memory"},enumerable:!1,configurable:!0}),t}(),l=function(t){function e(n){void 0===n&&(n=e.defaults);var i=t.call(this)||this;return i.options=(0,r.Cl)((0,r.Cl)({},e.defaults),n),i}return(0,r.C6)(e,t),e.available=function(){var t=window.navigator.cookieEnabled;return t||(o.A.set("ajs:cookies","test"),t=document.cookie.includes("ajs:cookies"),o.A.remove("ajs:cookies")),t},Object.defineProperty(e,"defaults",{get:function(){return{maxage:365,domain:(0,u.f)(window.location.href),path:"/",sameSite:"Lax"}},enumerable:!1,configurable:!0}),e.prototype.opts=function(){return{sameSite:this.options.sameSite,expires:this.options.maxage,domain:this.options.domain,path:this.options.path,secure:this.options.secure}},e.prototype.get=function(t){try{var e=o.A.get(t);if(!e)return null;try{return JSON.parse(e)}catch(t){return e}}catch(t){return null}},e.prototype.set=function(t,e){"string"==typeof e?o.A.set(t,e,this.opts()):null===e?o.A.remove(t,this.opts()):o.A.set(t,JSON.stringify(e),this.opts())},e.prototype.remove=function(t){return o.A.remove(t,this.opts())},Object.defineProperty(e.prototype,"type",{get:function(){return"cookie"},enumerable:!1,configurable:!0}),e}(c),f=function(t,e){console.warn("Unable to access ".concat(t,", localStorage may be ").concat(e))},p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.C6)(e,t),e.available=function(){var t="test";try{return localStorage.setItem(t,t),localStorage.removeItem(t),!0}catch(t){return!1}},e.prototype.get=function(t){try{var e=localStorage.getItem(t);if(null===e)return null;try{return JSON.parse(e)}catch(t){return e}}catch(e){return f(t,"unavailable"),null}},e.prototype.set=function(t,e){try{localStorage.setItem(t,JSON.stringify(e))}catch(e){f(t,"full")}},e.prototype.remove=function(t){try{return localStorage.removeItem(t)}catch(e){f(t,"unavailable")}},Object.defineProperty(e.prototype,"type",{get:function(){return"localStorage"},enumerable:!1,configurable:!0}),e}(c),d=function(){function t(t,e){this.storageOptions=e,this.enabledStores=t}return t.prototype.getStores=function(t){var e=this,n=[];return this.enabledStores.filter((function(e){return!t||(null==t?void 0:t.includes(e))})).forEach((function(t){var r=e.storageOptions[t];void 0!==r&&n.push(r)})),n},t.prototype.getAndSync=function(t,e){var n=this.get(t,e),r="number"==typeof n?n.toString():n;return this.set(t,r,e),r},t.prototype.get=function(t,e){for(var n=null,r=0,i=this.getStores(e);r<i.length;r++){if(n=i[r].get(t))return n}return null},t.prototype.set=function(t,e,n){for(var r=0,i=this.getStores(n);r<i.length;r++){i[r].set(t,e)}},t.prototype.clear=function(t,e){for(var n=0,r=this.getStores(e);n<r.length;n++){r[n].remove(t)}},t}();function h(t){return{cookie:l.available()?new l(t):void 0,localStorage:p.available()?new p:void 0,memory:new c}}var v=function(){function t(t,e){void 0===t&&(t=a);var n,r,o,u,c=this;this.options={},this.id=function(t){if(c.options.disable)return null;var e=c.identityStore.getAndSync(c.idKey);void 0!==t&&(c.identityStore.set(c.idKey,t),t!==e&&null!==e&&null!==t&&c.anonymousId(null));var n=c.identityStore.getAndSync(c.idKey);if(n)return n;var r=c.legacyUserStore.get(a.cookie.oldKey);return r?"object"==typeof r?r.id:r:null},this.anonymousId=function(t){var e,n;if(c.options.disable)return null;if(void 0===t){var r=null!==(e=c.identityStore.getAndSync(c.anonKey))&&void 0!==e?e:null===(n=c.legacySIO())||void 0===n?void 0:n[0];if(r)return r}return null===t?(c.identityStore.set(c.anonKey,null),c.identityStore.getAndSync(c.anonKey)):(c.identityStore.set(c.anonKey,null!=t?t:(0,i.v4)()),c.identityStore.getAndSync(c.anonKey))},this.traits=function(t){var e;if(!c.options.disable)return null===t&&(t={}),t&&c.traitsStore.set(c.traitsKey,null!=t?t:{}),null!==(e=c.traitsStore.get(c.traitsKey))&&void 0!==e?e:{}},this.options=t,this.cookieOptions=e,this.idKey=null!==(r=null===(n=t.cookie)||void 0===n?void 0:n.key)&&void 0!==r?r:a.cookie.key,this.traitsKey=null!==(u=null===(o=t.localStorage)||void 0===o?void 0:o.key)&&void 0!==u?u:a.localStorage.key,this.anonKey="ajs_anonymous_id";var l=!0===t.disable,f=!1!==t.persist,p=l?[]:f?["localStorage","cookie","memory"]:["memory"],v=h(e);t.localStorageFallbackDisabled&&(p=p.filter((function(t){return"localStorage"!==t}))),this.identityStore=new d(p,v),this.legacyUserStore=new d(p.filter((function(t){return"localStorage"!==t&&"memory"!==t})),v),this.traitsStore=new d(p.filter((function(t){return"cookie"!==t})),v);var y=this.legacyUserStore.get(a.cookie.oldKey);y&&"object"==typeof y&&(y.id&&this.id(y.id),y.traits&&this.traits(y.traits)),(0,s.A)(this)}return t.prototype.legacySIO=function(){var t=this.legacyUserStore.get("_sio");if(!t)return null;var e=t.split("----");return[e[0],e[1]]},t.prototype.identify=function(t,e){if(!this.options.disable){e=null!=e?e:{};var n=this.id();null!==n&&n!==t||(e=(0,r.Cl)((0,r.Cl)({},this.traits()),e)),t&&this.id(t),this.traits(e)}},t.prototype.logout=function(){this.anonymousId(null),this.id(null),this.traits({})},t.prototype.reset=function(){this.logout(),this.identityStore.clear(this.idKey),this.identityStore.clear(this.anonKey),this.traitsStore.clear(this.traitsKey)},t.prototype.load=function(){return new t(this.options,this.cookieOptions)},t.prototype.save=function(){return!0},t.defaults=a,t}(),y={persist:!0,cookie:{key:"ajs_group_id"},localStorage:{key:"ajs_group_properties"}},g=function(t){function e(e,n){void 0===e&&(e=y);var r=t.call(this,e,n)||this;return r.anonymousId=function(t){},(0,s.A)(r),r}return(0,r.C6)(e,t),e}(v)},3435:function(t,e,n){"use strict";function r(t,e,n){e.split&&(e=e.split("."));for(var r,i,o=0,u=e.length,s=t;o<u&&"__proto__"!==(i=e[o++])&&"constructor"!==i&&"prototype"!==i;)s=s[i]=o===u?n:typeof(r=s[i])==typeof e?r:0*e[o]!=0||~(""+e[o]).indexOf(".")?{}:[]}n.d(e,{J:function(){return r}})},3478:function(t,e){"use strict";function n(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var r=function t(e,r){function i(t,i,o){if("undefined"!=typeof document){"number"==typeof(o=n({},r,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var s in o)o[s]&&(u+="; "+s,!0!==o[s]&&(u+="="+o[s].split(";")[0]));return document.cookie=t+"="+e.write(i,t)+u}}return Object.create({set:i,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),u=o.slice(1).join("=");try{var s=decodeURIComponent(o[0]);if(r[s]=e.read(u,s),t===s)break}catch(t){}}return t?r[t]:r}},remove:function(t,e){i(t,"",n({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,n({},this.attributes,e))},withConverter:function(e){return t(n({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(e)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});e.A=r},3644:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Page=void 0;var i=r(n(5615)),o=n(2265),u=n(5616),s=r(n(6362));function a(t,e){o.Facade.call(this,t,e)}e.Page=a,i.default(a,o.Facade);var c=a.prototype;c.action=function(){return"page"},c.type=c.action,c.category=o.Facade.field("category"),c.name=o.Facade.field("name"),c.title=o.Facade.proxy("properties.title"),c.path=o.Facade.proxy("properties.path"),c.url=o.Facade.proxy("properties.url"),c.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},c.properties=function(t){var e=this.field("properties")||{},n=this.category(),r=this.name();for(var i in t=t||{},n&&(e.category=n),r&&(e.name=r),t){var o=null==this[i]?this.proxy("properties."+i):this[i]();null!=o&&(e[t[i]]=o,i!==t[i]&&delete e[i])}return e},c.email=function(){var t=this.proxy("context.traits.email")||this.proxy("properties.email");if(t)return t;var e=this.userId();return s.default(e)?e:void 0},c.fullName=function(){var t=this.category(),e=this.name();return e&&t?t+" "+e:e},c.event=function(t){return t?"Viewed "+t+" Page":"Loaded a Page"},c.track=function(t){var e=this.json();return e.event=this.event(t),e.timestamp=this.timestamp(),e.properties=this.properties(),new u.Track(e,this.opts)}},4034:function(t,e,n){"use strict";n.d(e,{p:function(){return i},r:function(){return o}});var r=n(5478),i=function(){function t(){this.metrics=[]}return t.prototype.increment=function(t,e,n){void 0===e&&(e=1),this.metrics.push({metric:t,value:e,tags:null!=n?n:[],type:"counter",timestamp:Date.now()})},t.prototype.gauge=function(t,e,n){this.metrics.push({metric:t,value:e,tags:null!=n?n:[],type:"gauge",timestamp:Date.now()})},t.prototype.flush=function(){var t=this.metrics.map((function(t){return(0,r.Cl)((0,r.Cl)({},t),{tags:t.tags.join(",")})}));console.table?console.table(t):console.log(t),this.metrics=[]},t.prototype.serialize=function(){return this.metrics.map((function(t){return{m:t.metric,v:t.value,t:t.tags,k:(e=t.type,{gauge:"g",counter:"c"}[e]),e:t.timestamp};var e}))},t}(),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,r.C6)(e,t),e.prototype.gauge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},e.prototype.increment=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},e.prototype.flush=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},e.prototype.serialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return[]},e}(i)},4082:function(t,e,n){"use strict";function r(){return"undefined"!=typeof window}function i(){return!r()}n.d(e,{B:function(){return r},S:function(){return i}})},4303:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.Delete=e.Screen=e.Page=e.Track=e.Identify=e.Group=e.Alias=e.Facade=void 0;var i=n(2265);Object.defineProperty(e,"Facade",{enumerable:!0,get:function(){return i.Facade}});var o=n(7663);Object.defineProperty(e,"Alias",{enumerable:!0,get:function(){return o.Alias}});var u=n(7748);Object.defineProperty(e,"Group",{enumerable:!0,get:function(){return u.Group}});var s=n(5543);Object.defineProperty(e,"Identify",{enumerable:!0,get:function(){return s.Identify}});var a=n(5616);Object.defineProperty(e,"Track",{enumerable:!0,get:function(){return a.Track}});var c=n(3644);Object.defineProperty(e,"Page",{enumerable:!0,get:function(){return c.Page}});var l=n(6871);Object.defineProperty(e,"Screen",{enumerable:!0,get:function(){return l.Screen}});var f=n(7532);Object.defineProperty(e,"Delete",{enumerable:!0,get:function(){return f.Delete}}),e.default=r(r({},i.Facade),{Alias:o.Alias,Group:u.Group,Identify:s.Identify,Track:a.Track,Page:c.Page,Screen:l.Screen,Delete:f.Delete})},4834:function(t,e){"use strict";var n=/\d{10}/;e.is=function(t){return n.test(t)},e.parse=function(t){var e=1e3*parseInt(t,10);return new Date(e)}},5120:function(t,e,n){"use strict";n.d(e,{m:function(){return r}});var r=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:null}},5478:function(t,e,n){"use strict";n.d(e,{C6:function(){return i},Cl:function(){return o},Tt:function(){return u},YH:function(){return a},fX:function(){return c},sH:function(){return s}});var r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},r(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},o.apply(this,arguments)};function u(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function s(t,e,n,r){return new(n||(n=Promise))((function(i,o){function u(t){try{a(r.next(t))}catch(t){o(t)}}function s(t){try{a(r.throw(t))}catch(t){o(t)}}function a(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,s)}a((r=r.apply(t,e||[])).next())}))}function a(t,e){var n,r,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(u=0)),u;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return u.label++,{value:s[1],done:!1};case 5:u.label++,r=s[1],s=[0];continue;case 7:s=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){u=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){u.label=s[1];break}if(6===s[0]&&u.label<i[1]){u.label=i[1],i=s;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(s);break}i[2]&&u.ops.pop(),u.trys.pop();continue}s=e.call(t,u)}catch(t){s=[6,t],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}Object.create;function c(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}Object.create},5543:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Identify=void 0;var i=n(2265),o=r(n(8578)),u=r(n(5615)),s=r(n(6362)),a=r(n(7639)),c=function(t){return t.trim()};function l(t,e){i.Facade.call(this,t,e)}e.Identify=l,u.default(l,i.Facade);var f=l.prototype;f.action=function(){return"identify"},f.type=f.action,f.traits=function(t){var e=this.field("traits")||{},n=this.userId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(e[t[r]]=i,r!==t[r]&&delete e[r])}return e},f.email=function(){var t=this.proxy("traits.email");if(t)return t;var e=this.userId();return s.default(e)?e:void 0},f.created=function(){var t=this.proxy("traits.created")||this.proxy("traits.createdAt");if(t)return a.default(t)},f.companyCreated=function(){var t=this.proxy("traits.company.created")||this.proxy("traits.company.createdAt");if(t)return a.default(t)},f.companyName=function(){return this.proxy("traits.company.name")},f.name=function(){var t=this.proxy("traits.name");if("string"==typeof t)return c(t);var e=this.firstName(),n=this.lastName();return e&&n?c(e+" "+n):void 0},f.firstName=function(){var t=this.proxy("traits.firstName");if("string"==typeof t)return c(t);var e=this.proxy("traits.name");return"string"==typeof e?c(e).split(" ")[0]:void 0},f.lastName=function(){var t=this.proxy("traits.lastName");if("string"==typeof t)return c(t);var e=this.proxy("traits.name");if("string"==typeof e){var n=c(e).indexOf(" ");if(-1!==n)return c(e.substr(n+1))}},f.uid=function(){return this.userId()||this.username()||this.email()},f.description=function(){return this.proxy("traits.description")||this.proxy("traits.background")},f.age=function(){var t=this.birthday(),e=o.default(this.traits(),"age");return null!=e?e:t instanceof Date?(new Date).getFullYear()-t.getFullYear():void 0},f.avatar=function(){var t=this.traits();return o.default(t,"avatar")||o.default(t,"photoUrl")||o.default(t,"avatarUrl")},f.position=function(){var t=this.traits();return o.default(t,"position")||o.default(t,"jobTitle")},f.username=i.Facade.proxy("traits.username"),f.website=i.Facade.one("traits.website"),f.websites=i.Facade.multi("traits.website"),f.phone=i.Facade.one("traits.phone"),f.phones=i.Facade.multi("traits.phone"),f.address=i.Facade.proxy("traits.address"),f.gender=i.Facade.proxy("traits.gender"),f.birthday=i.Facade.proxy("traits.birthday")},5615:function(t){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},5616:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Track=void 0;var i=r(n(5615)),o=n(2265),u=n(5543),s=r(n(6362)),a=r(n(8578));function c(t,e){o.Facade.call(this,t,e)}e.Track=c,i.default(c,o.Facade);var l=c.prototype;l.action=function(){return"track"},l.type=l.action,l.event=o.Facade.field("event"),l.value=o.Facade.proxy("properties.value"),l.category=o.Facade.proxy("properties.category"),l.id=o.Facade.proxy("properties.id"),l.productId=function(){return this.proxy("properties.product_id")||this.proxy("properties.productId")},l.promotionId=function(){return this.proxy("properties.promotion_id")||this.proxy("properties.promotionId")},l.cartId=function(){return this.proxy("properties.cart_id")||this.proxy("properties.cartId")},l.checkoutId=function(){return this.proxy("properties.checkout_id")||this.proxy("properties.checkoutId")},l.paymentId=function(){return this.proxy("properties.payment_id")||this.proxy("properties.paymentId")},l.couponId=function(){return this.proxy("properties.coupon_id")||this.proxy("properties.couponId")},l.wishlistId=function(){return this.proxy("properties.wishlist_id")||this.proxy("properties.wishlistId")},l.reviewId=function(){return this.proxy("properties.review_id")||this.proxy("properties.reviewId")},l.orderId=function(){return this.proxy("properties.id")||this.proxy("properties.order_id")||this.proxy("properties.orderId")},l.sku=o.Facade.proxy("properties.sku"),l.tax=o.Facade.proxy("properties.tax"),l.name=o.Facade.proxy("properties.name"),l.price=o.Facade.proxy("properties.price"),l.total=o.Facade.proxy("properties.total"),l.repeat=o.Facade.proxy("properties.repeat"),l.coupon=o.Facade.proxy("properties.coupon"),l.shipping=o.Facade.proxy("properties.shipping"),l.discount=o.Facade.proxy("properties.discount"),l.shippingMethod=function(){return this.proxy("properties.shipping_method")||this.proxy("properties.shippingMethod")},l.paymentMethod=function(){return this.proxy("properties.payment_method")||this.proxy("properties.paymentMethod")},l.description=o.Facade.proxy("properties.description"),l.plan=o.Facade.proxy("properties.plan"),l.subtotal=function(){var t=a.default(this.properties(),"subtotal"),e=this.total()||this.revenue();if(t)return t;if(!e)return 0;if(this.total()){var n=this.tax();n&&(e-=n),(n=this.shipping())&&(e-=n),(n=this.discount())&&(e+=n)}return e},l.products=function(){var t=this.properties(),e=a.default(t,"products");return Array.isArray(e)?e.filter((function(t){return null!==t})):[]},l.quantity=function(){return(this.obj.properties||{}).quantity||1},l.currency=function(){return(this.obj.properties||{}).currency||"USD"},l.referrer=function(){return this.proxy("context.referrer.url")||this.proxy("context.page.referrer")||this.proxy("properties.referrer")},l.query=o.Facade.proxy("options.query"),l.properties=function(t){var e=this.field("properties")||{};for(var n in t=t||{}){var r=null==this[n]?this.proxy("properties."+n):this[n]();null!=r&&(e[t[n]]=r,delete e[n])}return e},l.username=function(){return this.proxy("traits.username")||this.proxy("properties.username")||this.userId()||this.sessionId()},l.email=function(){var t=this.proxy("traits.email")||this.proxy("properties.email")||this.proxy("options.traits.email");if(t)return t;var e=this.userId();return s.default(e)?e:void 0},l.revenue=function(){var t=this.proxy("properties.revenue"),e=this.event();return!t&&e&&e.match(/^[ _]?completed[ _]?order[ _]?|^[ _]?order[ _]?completed[ _]?$/i)&&(t=this.proxy("properties.total")),function(t){if(!t)return;if("number"==typeof t)return t;if("string"!=typeof t)return;if(t=t.replace(/\$/g,""),t=parseFloat(t),!isNaN(t))return t}(t)},l.cents=function(){var t=this.revenue();return"number"!=typeof t?this.value()||0:100*t},l.identify=function(){var t=this.json();return t.traits=this.traits(),new u.Identify(t,this.opts)}},5835:function(t,e,n){"use strict";n.d(e,{J:function(){return i}});var r=n(5478);function i(t,e){var n,i=Object.entries(null!==(n=e.integrations)&&void 0!==n?n:{}).reduce((function(t,e){var n,i,o=e[0],u=e[1];return"object"==typeof u?(0,r.Cl)((0,r.Cl)({},t),((n={})[o]=u,n)):(0,r.Cl)((0,r.Cl)({},t),((i={})[o]={},i))}),{});return Object.entries(t.integrations).reduce((function(t,e){var n,o=e[0],u=e[1];return(0,r.Cl)((0,r.Cl)({},t),((n={})[o]=(0,r.Cl)((0,r.Cl)({},u),i[o]),n))}),{})}},6091:function(t,e,n){"use strict";n.d(e,{Ud:function(){return u},kJ:function(){return i},rY:function(){return o}});var r="analytics";function i(){return window[r]}function o(t){r=t}function u(t){window[r]=t}},6238:function(t,e,n){"use strict";function r(t){return Array.prototype.slice.call(window.document.querySelectorAll("script")).find((function(e){return e.src===t}))}function i(t,e){var n=r(t);if(void 0!==n){var i=null==n?void 0:n.getAttribute("status");if("loaded"===i)return Promise.resolve(n);if("loading"===i)return new Promise((function(t,e){n.addEventListener("load",(function(){return t(n)})),n.addEventListener("error",(function(t){return e(t)}))}))}return new Promise((function(n,r){var i,o=window.document.createElement("script");o.type="text/javascript",o.src=t,o.async=!0,o.setAttribute("status","loading");for(var u=0,s=Object.entries(null!=e?e:{});u<s.length;u++){var a=s[u],c=a[0],l=a[1];o.setAttribute(c,l)}o.onload=function(){o.onerror=o.onload=null,o.setAttribute("status","loaded"),n(o)},o.onerror=function(){o.onerror=o.onload=null,o.setAttribute("status","error"),r(new Error("Failed to load ".concat(t)))};var f=window.document.getElementsByTagName("script")[0];null===(i=f.parentElement)||void 0===i||i.insertBefore(o,f)}))}function o(t){var e=r(t);return void 0!==e&&e.remove(),Promise.resolve()}n.d(e,{d:function(){return o},k:function(){return i}})},6362:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=/.+\@.+\..+/;e.default=function(t){return n.test(t)}},6452:function(t,e,n){"use strict";n.d(e,{r:function(){return r}});var r="0.0.0-test-oidc"},6551:function(t,e,n){"use strict";n.d(e,{v:function(){return r}});var r=function(){function t(){this.callbacks={}}return t.prototype.on=function(t,e){return this.callbacks[t]?this.callbacks[t].push(e):this.callbacks[t]=[e],this},t.prototype.once=function(t,e){var n=this,r=function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];n.off(t,r),e.apply(n,i)};return this.on(t,r),this},t.prototype.off=function(t,e){var n,r=(null!==(n=this.callbacks[t])&&void 0!==n?n:[]).filter((function(t){return t!==e}));return this.callbacks[t]=r,this},t.prototype.emit=function(t){for(var e,n=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var o=null!==(e=this.callbacks[t])&&void 0!==e?e:[];return o.forEach((function(t){t.apply(n,r)})),this},t}()},6789:function(t,e,n){"use strict";n.d(e,{a:function(){return o},s:function(){return i}});var r=n(4082);function i(){return!(0,r.B)()||window.navigator.onLine}function o(){return!i()}},6871:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Screen=void 0;var i=r(n(5615)),o=n(3644),u=n(5616);function s(t,e){o.Page.call(this,t,e)}e.Screen=s,i.default(s,o.Page),s.prototype.action=function(){return"screen"},s.prototype.type=s.prototype.action,s.prototype.event=function(t){return t?"Viewed "+t+" Screen":"Loaded a Screen"},s.prototype.track=function(t){var e=this.json();return e.event=this.event(t),e.timestamp=this.timestamp(),e.properties=this.properties(),new u.Track(e,this.opts)}},7106:function(t,e,n){"use strict";n.d(e,{_:function(){return i}});var r=n(5478),i=function(t,e){return(0,r.sH)(void 0,void 0,Promise,(function(){var n;return(0,r.YH)(this,(function(i){return n=function(i){return(0,r.sH)(void 0,void 0,Promise,(function(){var o;return(0,r.YH)(this,(function(r){switch(r.label){case 0:return t(i)?(o=n,[4,e()]):[3,2];case 1:return[2,o.apply(void 0,[r.sent()])];case 2:return[2]}}))}))},[2,n(void 0)]}))}))}},7237:function(t,e){"use strict";var n=/^(\d{4})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:([ T])(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;e.parse=function(t){var e=[1,5,6,7,11,12],r=n.exec(t),i=0;if(!r)return new Date(t);for(var o,u=0;o=e[u];u++)r[o]=parseInt(r[o],10)||0;r[2]=parseInt(r[2],10)||1,r[3]=parseInt(r[3],10)||1,r[2]--,r[8]=r[8]?(r[8]+"00").substring(0,3):0," "===r[4]?i=(new Date).getTimezoneOffset():"Z"!==r[9]&&r[10]&&(i=60*r[11]+r[12],"+"===r[10]&&(i=0-i));var s=Date.UTC(r[1],r[2],r[3],r[5],r[6]+i,r[7],r[8]);return new Date(s)},e.is=function(t,e){return"string"==typeof t&&((!e||!1!==/^\d{4}-\d{2}-\d{2}/.test(t))&&n.test(t))}},7532:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Delete=void 0;var i=r(n(5615)),o=n(2265);function u(t,e){o.Facade.call(this,t,e)}e.Delete=u,i.default(u,o.Facade),u.prototype.type=function(){return"delete"}},7536:function(t,e,n){"use strict";n.d(e,{W:function(){return i}});var r=n(4303);function i(t,e){var n=new r.Facade(t,e);return"track"===t.type&&(n=new r.Track(t,e)),"identify"===t.type&&(n=new r.Identify(t,e)),"page"===t.type&&(n=new r.Page(t,e)),"alias"===t.type&&(n=new r.Alias(t,e)),"group"===t.type&&(n=new r.Group(t,e)),"screen"===t.type&&(n=new r.Screen(t,e)),Object.defineProperty(n,"obj",{value:t,writable:!0}),n}},7639:function(t,e,n){"use strict";var r=n(7237),i=n(8101),o=n(4834),u=Object.prototype.toString;t.exports=function(t){return e=t,"[object Date]"===u.call(e)?t:function(t){return"[object Number]"===u.call(t)}(t)?new Date((n=t)<315576e5?1e3*n:n):r.is(t)?r.parse(t):i.is(t)?i.parse(t):o.is(t)?o.parse(t):new Date(t);var e,n}},7663:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Alias=void 0;var i=r(n(5615)),o=n(2265);function u(t,e){o.Facade.call(this,t,e)}e.Alias=u,i.default(u,o.Facade),u.prototype.action=function(){return"alias"},u.prototype.type=u.prototype.action,u.prototype.previousId=function(){return this.field("previousId")||this.field("from")},u.prototype.from=u.prototype.previousId,u.prototype.userId=function(){return this.field("userId")||this.field("to")},u.prototype.to=u.prototype.userId},7748:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Group=void 0;var i=r(n(5615)),o=r(n(6362)),u=r(n(7639)),s=n(2265);function a(t,e){s.Facade.call(this,t,e)}e.Group=a,i.default(a,s.Facade);var c=a.prototype;c.action=function(){return"group"},c.type=c.action,c.groupId=s.Facade.field("groupId"),c.created=function(){var t=this.proxy("traits.createdAt")||this.proxy("traits.created")||this.proxy("properties.createdAt")||this.proxy("properties.created");if(t)return u.default(t)},c.email=function(){var t=this.proxy("traits.email");if(t)return t;var e=this.groupId();return o.default(e)?e:void 0},c.traits=function(t){var e=this.properties(),n=this.groupId();for(var r in t=t||{},n&&(e.id=n),t){var i=null==this[r]?this.proxy("traits."+r):this[r]();null!=i&&(e[t[r]]=i,delete e[r])}return e},c.name=s.Facade.proxy("traits.name"),c.industry=s.Facade.proxy("traits.industry"),c.employees=s.Facade.proxy("traits.employees"),c.properties=function(){return this.field("traits")||this.field("properties")||{}}},7751:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={Salesforce:!0};e.default=function(t){return!n[t]}},7764:function(t,e,n){"use strict";function r(t,e){return new Promise((function(n,r){var i=setTimeout((function(){r(Error("Promise timed out"))}),e);t.then((function(t){return clearTimeout(i),n(t)})).catch(r)}))}function i(t,e,n){var i;return(i=n,new Promise((function(t){return setTimeout(t,i)}))).then((function(){return r(function(){try{return Promise.resolve(e(t))}catch(t){return Promise.reject(t)}}(),1e3)})).catch((function(e){null==t||t.log("warn","Callback Error",{error:e}),null==t||t.stats.increment("callback_error")})).then((function(){return t}))}n.d(e,{s2:function(){return r},w_:function(){return i}})},8101:function(t,e){"use strict";var n=/\d{13}/;e.is=function(t){return n.test(t)},e.parse=function(t){return t=parseInt(t,10),new Date(t)}},8110:function(t){t.exports=function(t){"use strict";var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function n(t,e){var n=t[0],r=t[1],i=t[2],o=t[3];r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[0]-680876936|0)<<7|n>>>25)+r|0)&r|~n&i)+e[1]-389564586|0)<<12|o>>>20)+n|0)&n|~o&r)+e[2]+606105819|0)<<17|i>>>15)+o|0)&o|~i&n)+e[3]-1044525330|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[4]-176418897|0)<<7|n>>>25)+r|0)&r|~n&i)+e[5]+1200080426|0)<<12|o>>>20)+n|0)&n|~o&r)+e[6]-1473231341|0)<<17|i>>>15)+o|0)&o|~i&n)+e[7]-45705983|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[8]+1770035416|0)<<7|n>>>25)+r|0)&r|~n&i)+e[9]-1958414417|0)<<12|o>>>20)+n|0)&n|~o&r)+e[10]-42063|0)<<17|i>>>15)+o|0)&o|~i&n)+e[11]-1990404162|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&i|~r&o)+e[12]+1804603682|0)<<7|n>>>25)+r|0)&r|~n&i)+e[13]-40341101|0)<<12|o>>>20)+n|0)&n|~o&r)+e[14]-1502002290|0)<<17|i>>>15)+o|0)&o|~i&n)+e[15]+1236535329|0)<<22|r>>>10)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[1]-165796510|0)<<5|n>>>27)+r|0)&i|r&~i)+e[6]-1069501632|0)<<9|o>>>23)+n|0)&r|n&~r)+e[11]+643717713|0)<<14|i>>>18)+o|0)&n|o&~n)+e[0]-373897302|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[5]-701558691|0)<<5|n>>>27)+r|0)&i|r&~i)+e[10]+38016083|0)<<9|o>>>23)+n|0)&r|n&~r)+e[15]-660478335|0)<<14|i>>>18)+o|0)&n|o&~n)+e[4]-405537848|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[9]+568446438|0)<<5|n>>>27)+r|0)&i|r&~i)+e[14]-1019803690|0)<<9|o>>>23)+n|0)&r|n&~r)+e[3]-187363961|0)<<14|i>>>18)+o|0)&n|o&~n)+e[8]+1163531501|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r&o|i&~o)+e[13]-1444681467|0)<<5|n>>>27)+r|0)&i|r&~i)+e[2]-51403784|0)<<9|o>>>23)+n|0)&r|n&~r)+e[7]+1735328473|0)<<14|i>>>18)+o|0)&n|o&~n)+e[12]-1926607734|0)<<20|r>>>12)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[5]-378558|0)<<4|n>>>28)+r|0)^r^i)+e[8]-2022574463|0)<<11|o>>>21)+n|0)^n^r)+e[11]+1839030562|0)<<16|i>>>16)+o|0)^o^n)+e[14]-35309556|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[1]-1530992060|0)<<4|n>>>28)+r|0)^r^i)+e[4]+1272893353|0)<<11|o>>>21)+n|0)^n^r)+e[7]-155497632|0)<<16|i>>>16)+o|0)^o^n)+e[10]-1094730640|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[13]+681279174|0)<<4|n>>>28)+r|0)^r^i)+e[0]-358537222|0)<<11|o>>>21)+n|0)^n^r)+e[3]-722521979|0)<<16|i>>>16)+o|0)^o^n)+e[6]+76029189|0)<<23|r>>>9)+i|0,r=((r+=((i=((i+=((o=((o+=((n=((n+=(r^i^o)+e[9]-640364487|0)<<4|n>>>28)+r|0)^r^i)+e[12]-421815835|0)<<11|o>>>21)+n|0)^n^r)+e[15]+530742520|0)<<16|i>>>16)+o|0)^o^n)+e[2]-995338651|0)<<23|r>>>9)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[0]-198630844|0)<<6|n>>>26)+r|0)|~i))+e[7]+1126891415|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[14]-1416354905|0)<<15|i>>>17)+o|0)|~n))+e[5]-57434055|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[12]+1700485571|0)<<6|n>>>26)+r|0)|~i))+e[3]-1894986606|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[10]-1051523|0)<<15|i>>>17)+o|0)|~n))+e[1]-2054922799|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[8]+1873313359|0)<<6|n>>>26)+r|0)|~i))+e[15]-30611744|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[6]-1560198380|0)<<15|i>>>17)+o|0)|~n))+e[13]+1309151649|0)<<21|r>>>11)+i|0,r=((r+=((o=((o+=(r^((n=((n+=(i^(r|~o))+e[4]-145523070|0)<<6|n>>>26)+r|0)|~i))+e[11]-1120210379|0)<<10|o>>>22)+n|0)^((i=((i+=(n^(o|~r))+e[2]+718787259|0)<<15|i>>>17)+o|0)|~n))+e[9]-343485551|0)<<21|r>>>11)+i|0,t[0]=n+t[0]|0,t[1]=r+t[1]|0,t[2]=i+t[2]|0,t[3]=o+t[3]|0}function r(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return n}function i(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t[e]+(t[e+1]<<8)+(t[e+2]<<16)+(t[e+3]<<24);return n}function o(t){var e,i,o,u,s,a,c=t.length,l=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=c;e+=64)n(l,r(t.substring(e-64,e)));for(i=(t=t.substring(e-64)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<i;e+=1)o[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(o[e>>2]|=128<<(e%4<<3),e>55)for(n(l,o),e=0;e<16;e+=1)o[e]=0;return u=(u=8*c).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(u[2],16),a=parseInt(u[1],16)||0,o[14]=s,o[15]=a,n(l,o),l}function u(t){var e,r,o,u,s,a,c=t.length,l=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=c;e+=64)n(l,i(t.subarray(e-64,e)));for(r=(t=e-64<c?t.subarray(e-64):new Uint8Array(0)).length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<r;e+=1)o[e>>2]|=t[e]<<(e%4<<3);if(o[e>>2]|=128<<(e%4<<3),e>55)for(n(l,o),e=0;e<16;e+=1)o[e]=0;return u=(u=8*c).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(u[2],16),a=parseInt(u[1],16)||0,o[14]=s,o[15]=a,n(l,o),l}function s(t){var n,r="";for(n=0;n<4;n+=1)r+=e[t>>8*n+4&15]+e[t>>8*n&15];return r}function a(t){var e;for(e=0;e<t.length;e+=1)t[e]=s(t[e]);return t.join("")}function c(t){return/[\u0080-\uFFFF]/.test(t)&&(t=unescape(encodeURIComponent(t))),t}function l(t,e){var n,r=t.length,i=new ArrayBuffer(r),o=new Uint8Array(i);for(n=0;n<r;n+=1)o[n]=t.charCodeAt(n);return e?o:i}function f(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function p(t,e,n){var r=new Uint8Array(t.byteLength+e.byteLength);return r.set(new Uint8Array(t)),r.set(new Uint8Array(e),t.byteLength),n?r:r.buffer}function d(t){var e,n=[],r=t.length;for(e=0;e<r-1;e+=2)n.push(parseInt(t.substr(e,2),16));return String.fromCharCode.apply(String,n)}function h(){this.reset()}return a(o("hello")),"undefined"==typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function e(t,e){return(t=0|t||0)<0?Math.max(t+e,0):Math.min(t,e)}ArrayBuffer.prototype.slice=function(n,r){var i,o,u,s,a=this.byteLength,c=e(n,a),l=a;return r!==t&&(l=e(r,a)),c>l?new ArrayBuffer(0):(i=l-c,o=new ArrayBuffer(i),u=new Uint8Array(o),s=new Uint8Array(this,c,i),u.set(s),o)}}(),h.prototype.append=function(t){return this.appendBinary(c(t)),this},h.prototype.appendBinary=function(t){this._buff+=t,this._length+=t.length;var e,i=this._buff.length;for(e=64;e<=i;e+=64)n(this._hash,r(this._buff.substring(e-64,e)));return this._buff=this._buff.substring(e-64),this},h.prototype.end=function(t){var e,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<i;e+=1)o[e>>2]|=r.charCodeAt(e)<<(e%4<<3);return this._finish(o,i),n=a(this._hash),t&&(n=d(n)),this.reset(),n},h.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},h.prototype.setState=function(t){return this._buff=t.buff,this._length=t.length,this._hash=t.hash,this},h.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},h.prototype._finish=function(t,e){var r,i,o,u=e;if(t[u>>2]|=128<<(u%4<<3),u>55)for(n(this._hash,t),u=0;u<16;u+=1)t[u]=0;r=(r=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(r[2],16),o=parseInt(r[1],16)||0,t[14]=i,t[15]=o,n(this._hash,t)},h.hash=function(t,e){return h.hashBinary(c(t),e)},h.hashBinary=function(t,e){var n=a(o(t));return e?d(n):n},h.ArrayBuffer=function(){this.reset()},h.ArrayBuffer.prototype.append=function(t){var e,r=p(this._buff.buffer,t,!0),o=r.length;for(this._length+=t.byteLength,e=64;e<=o;e+=64)n(this._hash,i(r.subarray(e-64,e)));return this._buff=e-64<o?new Uint8Array(r.buffer.slice(e-64)):new Uint8Array(0),this},h.ArrayBuffer.prototype.end=function(t){var e,n,r=this._buff,i=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<i;e+=1)o[e>>2]|=r[e]<<(e%4<<3);return this._finish(o,i),n=a(this._hash),t&&(n=d(n)),this.reset(),n},h.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},h.ArrayBuffer.prototype.getState=function(){var t=h.prototype.getState.call(this);return t.buff=f(t.buff),t},h.ArrayBuffer.prototype.setState=function(t){return t.buff=l(t.buff,!0),h.prototype.setState.call(this,t)},h.ArrayBuffer.prototype.destroy=h.prototype.destroy,h.ArrayBuffer.prototype._finish=h.prototype._finish,h.ArrayBuffer.hash=function(t,e){var n=a(u(new Uint8Array(t)));return e?d(n):n},h}()},8456:function(t,e,n){"use strict";n.d(e,{o:function(){return u}});var r=n(5478),i=n(9752),o=n(8900),u=function(t){function e(e,n){return t.call(this,e,n,new o.U)||this}return(0,r.C6)(e,t),e.system=function(){return new this({type:"track",event:"system"})},e}(i.j)},8578:function(t){function e(t){return function(e,n,r,o){var u,s=o&&function(t){return"function"==typeof t}(o.normalizer)?o.normalizer:i;n=s(n);for(var a=!1;!a;)c();function c(){for(u in e){var t=s(u);if(0===n.indexOf(t)){var r=n.substr(t.length);if("."===r.charAt(0)||0===r.length){n=r.substr(1);var i=e[u];return null==i?void(a=!0):n.length?void(e=i):void(a=!0)}}}u=void 0,a=!0}if(u)return null==e?e:t(e,u,r)}}function n(t,e){return t.hasOwnProperty(e)&&delete t[e],t}function r(t,e,n){return t.hasOwnProperty(e)&&(t[e]=n),t}function i(t){return t.replace(/[^a-zA-Z0-9\.]+/g,"").toLowerCase()}t.exports=e((function(t,e){if(t.hasOwnProperty(e))return t[e]})),t.exports.find=t.exports,t.exports.replace=function(t,n,i,o){return e(r).call(this,t,n,i,o),t},t.exports.del=function(t,r,i){return e(n).call(this,t,r,null,i),t}},8900:function(t,e,n){"use strict";n.d(e,{U:function(){return s}});var r,i=n(5478),o=n(4034),u=n(148),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.C6)(e,t),e.initRemoteMetrics=function(t){r=new u.w(t)},e.prototype.increment=function(e,n,i){t.prototype.increment.call(this,e,n,i),null==r||r.increment(e,null!=i?i:[])},e}(o.p)},8971:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=r(n(8578));function o(t,e){return function(){var n=this.traits(),r=this.properties?this.properties():{};return i.default(n,"address."+t)||i.default(n,t)||(e?i.default(n,"address."+e):null)||(e?i.default(n,e):null)||i.default(r,"address."+t)||i.default(r,t)||(e?i.default(r,"address."+e):null)||(e?i.default(r,e):null)}}e.default=function(t){t.zip=o("postalCode","zip"),t.country=o("country"),t.street=o("street"),t.state=o("state"),t.city=o("city"),t.region=o("region")}},9059:function(t,e,n){"use strict";function r(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t}}n.d(e,{p:function(){return r}})},9659:function(t,e,n){"use strict";n.d(e,{v4:function(){return u}});for(var r,i=256,o=[];i--;)o[i]=(i+256).toString(16).substring(1);function u(){var t,e=0,n="";if(!r||i+16>256){for(r=Array(e=256);e--;)r[e]=256*Math.random()|0;e=i=0}for(;e<16;e++)t=r[i+e],n+=6==e?o[15&t|64]:8==e?o[63&t|128]:o[t],1&e&&e>1&&e<11&&(n+="-");return i++,n}},9732:function(t,e,n){"use strict";n.d(e,{x:function(){return p}});var r=n(5478),i=n(2939),o=n(8456),u=n(4082),s={getItem:function(){},setItem:function(){},removeItem:function(){}};try{s=(0,u.B)()&&window.localStorage?window.localStorage:s}catch(t){console.warn("Unable to access localStorage",t)}function a(t){var e=s.getItem(t);return(e?JSON.parse(e):[]).map((function(t){return new o.o(t.event,t.id)}))}function c(t){var e=s.getItem(t);return e?JSON.parse(e):{}}function l(t){s.removeItem(t)}function f(t,e,n){void 0===n&&(n=0);var r="persisted-queue:v1:".concat(t,":lock"),i=s.getItem(r),o=i?JSON.parse(i):null,u=null===o||function(t){return(new Date).getTime()>t}(o);if(u)return s.setItem(r,JSON.stringify((new Date).getTime()+50)),e(),void s.removeItem(r);!u&&n<3?setTimeout((function(){f(t,e,n+1)}),50):console.error("Unable to retrieve lock")}var p=function(t){function e(e,n){var i=t.call(this,e,[])||this,o="persisted-queue:v1:".concat(n,":items"),u="persisted-queue:v1:".concat(n,":seen"),p=[],d={};return f(n,(function(){try{p=a(o),d=c(u),l(o),l(u),i.queue=(0,r.fX)((0,r.fX)([],p,!0),i.queue,!0),i.seen=(0,r.Cl)((0,r.Cl)({},d),i.seen)}catch(t){console.error(t)}})),window.addEventListener("pagehide",(function(){if(i.todo>0){var t=(0,r.fX)((0,r.fX)([],i.queue,!0),i.future,!0);try{f(n,(function(){!function(t,e){var n=a(t),i=(0,r.fX)((0,r.fX)([],e,!0),n,!0).reduce((function(t,e){var n;return(0,r.Cl)((0,r.Cl)({},t),((n={})[e.id]=e,n))}),{});s.setItem(t,JSON.stringify(Object.values(i)))}(o,t),function(t,e){var n=c(t);s.setItem(t,JSON.stringify((0,r.Cl)((0,r.Cl)({},n),e)))}(u,i.seen)}))}catch(t){console.error(t)}}})),i}return(0,r.C6)(e,t),e}(i.M)},9752:function(t,e,n){"use strict";n.d(e,{d:function(){return a},j:function(){return c}});var r=n(9659),i=n(3435),o=n(5478),u=function(){function t(){this._logs=[]}return t.prototype.log=function(t,e,n){var r=new Date;this._logs.push({level:t,message:e,time:r,extras:n})},Object.defineProperty(t.prototype,"logs",{get:function(){return this._logs},enumerable:!1,configurable:!0}),t.prototype.flush=function(){if(this.logs.length>1){var t=this._logs.reduce((function(t,e){var n,r,i,u=(0,o.Cl)((0,o.Cl)({},e),{json:JSON.stringify(e.extras,null," "),extras:e.extras});delete u.time;var s=null!==(i=null===(r=e.time)||void 0===r?void 0:r.toISOString())&&void 0!==i?i:"";return t[s]&&(s="".concat(s,"-").concat(Math.random())),(0,o.Cl)((0,o.Cl)({},t),((n={})[s]=u,n))}),{});console.table?console.table(t):console.log(t)}else this.logs.forEach((function(t){var e=t.level,n=t.message,r=t.extras;"info"===e||"debug"===e?console.log(n,null!=r?r:""):console[e](n,null!=r?r:"")}));this._logs=[]},t}(),s=n(4034),a=function(t){var e,n,r;this.retry=null===(e=t.retry)||void 0===e||e,this.type=null!==(n=t.type)&&void 0!==n?n:"plugin Error",this.reason=null!==(r=t.reason)&&void 0!==r?r:""},c=function(){function t(t,e,n,i){void 0===e&&(e=(0,r.v4)()),void 0===n&&(n=new s.r),void 0===i&&(i=new u),this.attempts=0,this.event=t,this._id=e,this.logger=i,this.stats=n}return t.system=function(){},t.prototype.isSame=function(t){return t.id===this.id},t.prototype.cancel=function(t){if(t)throw t;throw new a({reason:"Context Cancel"})},t.prototype.log=function(t,e,n){this.logger.log(t,e,n)},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),t.prototype.updateEvent=function(t,e){var n;if("integrations"===t.split(".")[0]){var r=t.split(".")[1];if(!1===(null===(n=this.event.integrations)||void 0===n?void 0:n[r]))return this.event}return(0,i.J)(this.event,t,e),this.event},t.prototype.failedDelivery=function(){return this._failedDelivery},t.prototype.setFailedDelivery=function(t){this._failedDelivery=t},t.prototype.logs=function(){return this.logger.logs},t.prototype.flush=function(){this.logger.flush(),this.stats.flush()},t.prototype.toJSON=function(){return{id:this._id,event:this.event,logs:this.logger.logs,metrics:this.stats.metrics}},t}()},9785:function(t,e,n){"use strict";n.d(e,{JA:function(){return f},S8:function(){return h},XZ:function(){return p}});var r,i=n(5478),o=n(3478),u=n(9059),s=n(9894),a=n(6452),c=n(3398);var l="npm";function f(t){l=t}function p(){return l}function d(t,e,n){var o=new c.lJ(n?[]:["cookie"],(0,c.xD)(function(){if(r)return r;var t=(0,s.f)(window.location.href);return r={expires:31536e6,secure:!1,path:"/"},t&&(r.domain=t),r}())),u=o.get("s:context.referrer"),a=function(t){var e={btid:"dataxu",urid:"millennial-media"};t.startsWith("?")&&(t=t.substring(1));for(var n=0,r=(t=t.replace(/\?/g,"&")).split("&");n<r.length;n++){var i=r[n].split("="),o=i[0],u=i[1];if(e[o])return{id:u,type:e[o]}}}(t);(a=null!=a?a:u)&&(e&&(e.referrer=(0,i.Cl)((0,i.Cl)({},e.referrer),a)),o.set("s:context.referrer",a))}function h(t,e,n,r){var s,c,l,f,h=t.user(),v=window.location.search;e.context=null!==(c=null!==(s=e.context)&&void 0!==s?s:e.options)&&void 0!==c?c:{};var y=e.context;delete e.options,e.writeKey=null==n?void 0:n.apiKey,y.userAgent=window.navigator.userAgent;var g=navigator.userLanguage||navigator.language;if(void 0===y.locale&&void 0!==g&&(y.locale=g),!y.library){var m=p();y.library="web"===m?{name:"analytics.js",version:"next-".concat(a.r)}:{name:"analytics.js",version:"npm:next-".concat(a.r)}}v&&!y.campaign&&(y.campaign=function(t){return t.startsWith("?")&&(t=t.substring(1)),(t=t.replace(/\?/g,"&")).split("&").reduce((function(t,e){var n=e.split("="),r=n[0],i=n[1],o=void 0===i?"":i;if(r.includes("utm_")&&r.length>4){var s=r.substr(4);"campaign"===s&&(s="name"),t[s]=(0,u.p)(o)}return t}),{})}(v)),d(v,y,null!==(l=t.options.disableClientPersistence)&&void 0!==l&&l),e.userId=e.userId||h.id(),e.anonymousId=e.anonymousId||h.anonymousId(),e.sentAt=new Date;var b=t.queue.failedInitializations||[];b.length>0&&(e._metadata={failedInitializations:b});var w=[],_=[];for(var x in r){var C=r[x];"Customer.io Data Pipelines"===x&&w.push(x),"bundled"===C.bundlingStatus&&w.push(x),"unbundled"===C.bundlingStatus&&_.push(x)}for(var P=0,S=(null==n?void 0:n.unbundledIntegrations)||[];P<S.length;P++){var I=S[P];_.includes(I)||_.push(I)}var j=null!==(f=null==n?void 0:n.maybeBundledConfigIds)&&void 0!==f?f:{},A=[];w.sort().forEach((function(t){var e;(null!==(e=j[t])&&void 0!==e?e:[]).forEach((function(t){A.push(t)}))})),!1!==(null==n?void 0:n.addBundledMetadata)&&(e._metadata=(0,i.Cl)((0,i.Cl)({},e._metadata),{bundled:w.sort(),unbundled:_.sort(),bundledIds:A}));var k=function(){var t=o.A.get("_ga");if(t&&t.startsWith("amp"))return t}();return k&&(y.amp={id:k}),e}},9894:function(t,e,n){"use strict";n.d(e,{f:function(){return i}});var r=n(3478);function i(t){var e=function(t){try{return new URL(t)}catch(t){return}}(t);if(e)for(var n=function(t){var e=t.hostname.split("."),n=e[e.length-1],r=[];if(4===e.length&&parseInt(n,10)>0)return r;if(e.length<=1)return r;for(var i=e.length-2;i>=0;--i)r.push(e.slice(i).join("."));return r}(e),i=0;i<n.length;++i){var o="__tld__",u=n[i],s={domain:"."+u};try{if(r.A.set(o,"1",s),r.A.get(o))return r.A.remove(o,s),u}catch(t){return}}}}},o={};function u(t){var e=o[t];if(void 0!==e)return e.exports;var n=o[t]={exports:{}};return i[t].call(n.exports,n,n.exports,u),n.exports}u.m=i,u.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return u.d(e,{a:e}),e},e=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__},u.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);u.r(i);var o={};t=t||[null,e({}),e([]),e(e)];for(var s=2&r&&n;("object"==typeof s||"function"==typeof s)&&!~t.indexOf(s);s=e(s))Object.getOwnPropertyNames(s).forEach((function(t){o[t]=function(){return n[t]}}));return o.default=function(){return n},u.d(i,o),i},u.d=function(t,e){for(var n in e)u.o(e,n)&&!u.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},u.f={},u.e=function(t){return Promise.all(Object.keys(u.f).reduce((function(e,n){return u.f[n](t,e),e}),[]))},u.u=function(t){return({10:"tsub-middleware",50:"ajs-destination",104:"schemaFilter",248:"auto-track",521:"remoteMiddleware",538:"queryString",694:"legacyVideos",926:"inAppPlugin"}[t]||t)+".js"},u.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n={},r="@customerio/cdp-analytics-browser:",u.l=function(t,e,i,o){if(n[t])n[t].push(e);else{var s,a;if(void 0!==i)for(var c=document.getElementsByTagName("script"),l=0;l<c.length;l++){var f=c[l];if(f.getAttribute("src")==t||f.getAttribute("data-webpack")==r+i){s=f;break}}s||(a=!0,(s=document.createElement("script")).charset="utf-8",u.nc&&s.setAttribute("nonce",u.nc),s.setAttribute("data-webpack",r+i),s.src=t),n[t]=[e];var p=function(e,r){s.onerror=s.onload=null,clearTimeout(d);var i=n[t];if(delete n[t],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((function(t){return t(r)})),e)return e(r)},d=setTimeout(p.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=p.bind(null,s.onerror),s.onload=p.bind(null,s.onload),a&&document.head.appendChild(s)}},u.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},u.p="",function(){var t={57:0};u.f.j=function(e,n){var r=u.o(t,e)?t[e]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise((function(n,i){r=t[e]=[n,i]}));n.push(r[2]=i);var o=u.p+u.u(e),s=new Error;u.l(o,(function(n){if(u.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;s.message="Loading chunk "+e+" failed.\n("+i+": "+o+")",s.name="ChunkLoadError",s.type=i,s.request=o,r[1](s)}}),"chunk-"+e,e)}};var e=function(e,n){var r,i,o=n[0],s=n[1],a=n[2],c=0;if(o.some((function(e){return 0!==t[e]}))){for(r in s)u.o(s,r)&&(u.m[r]=s[r]);if(a)a(u)}for(e&&e(n);c<o.length;c++)i=o[c],u.o(t,i)&&t[i]&&t[i][0](),t[i]=0},n=self.webpackChunk_customerio_cdp_analytics_browser=self.webpackChunk_customerio_cdp_analytics_browser||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))}();var s={};return function(){"use strict";u.r(s),u.d(s,{AnalyticsBrowser:function(){return jt},loadLegacySettings:function(){return Ct}});var t=u(2911),e=u(9785),n=u(5478);function r(){return"undefined"!=typeof process&&process.env?process.env:{}}var i=u(824);function o(t){return"string"==typeof t}function a(t){return"number"==typeof t}function c(t){return"function"==typeof t}function l(t){return"object"===Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}var f=function(t){function e(e,n){var r=t.call(this,n)||this;return r.field=e,r}return(0,n.C6)(e,t),e}(Error);function p(t){var e,n=t&&t.event&&t.event.type,r=t.event;if(void 0===r)throw new f("event","Event is missing");if(!o(n))throw new f("event","Event is not a string");if("track"===n&&!o(r.event))throw new f("event","Event is not a string");var i=null!==(e=r.properties)&&void 0!==e?e:r.traits;if("alias"!==n&&!l(i))throw new f("properties","properties is not an object");if(!function(t){var e,n,r;return o(null!==(r=null!==(n=null!==(e=t.userId)&&void 0!==e?e:t.anonymousId)&&void 0!==n?n:t.groupId)&&void 0!==r?r:t.previousId)}(r))throw new f("userId","Missing userId or anonymousId");return t}var d={name:"Event Validation",type:"before",version:"1.0.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:p,identify:p,page:p,alias:p,group:p,screen:p};function h(t,e,n,r){var i,u=[t,e,n,r],s=l(t)?t.event:t;if(!s||!o(s))throw new Error("Event missing");var a=l(t)?null!==(i=t.properties)&&void 0!==i?i:{}:l(e)?e:{},f={};return c(n)||(f=null!=n?n:{}),l(t)&&!c(e)&&(f=null!=e?e:{}),[s,a,f,u.find(c)]}function v(t,e,n,r,i){var u,s,a=null,f=null,p=[t,e,n,r,i],d=p.filter(o);void 0!==d[0]&&void 0!==d[1]&&(a=d[0],f=d[1]),1===d.length&&(a=null,f=d[0]);var h=p.find(c),v=p.filter((function(t){return null===f?l(t):l(t)||null===t})),y=null!==(u=v[0])&&void 0!==u?u:{},g=null!==(s=v[1])&&void 0!==s?s:{};return[a,f,y,g,h]}var y=function(t){return function(){for(var e,n,r,i,u,s=[],f=0;f<arguments.length;f++)s[f]=arguments[f];var p=null;p=null!==(r=null!==(e=s.find(o))&&void 0!==e?e:null===(n=s.find(a))||void 0===n?void 0:n.toString())&&void 0!==r?r:t.id();var d=s.filter((function(t){return null===p?l(t):l(t)||null===t})),h=null!==(i=d[0])&&void 0!==i?i:{},v=null!==(u=d[1])&&void 0!==u?u:{},y=s.find(c);return[p,h,v,y]}};function g(t,e,n,r){a(t)&&(t=t.toString()),a(e)&&(e=e.toString());var i=[t,e,n,r],u=i.filter(o),s=u[0],f=void 0===s?t:s,p=u[1],d=void 0===p?null:p,h=i.filter(l)[0];return[f,d,void 0===h?{}:h,i.find(c)]}var m=u(6789),b=u(8456),w=u(7764);function _(t,e,r,i){return(0,n.sH)(this,void 0,void 0,(function(){var o,u;return(0,n.YH)(this,(function(n){switch(n.label){case 0:return r.emit("dispatch_start",t),o=Date.now(),e.isEmpty()?[4,e.dispatchSingle(t)]:[3,2];case 1:return u=n.sent(),[3,4];case 2:return[4,e.dispatch(t)];case 3:u=n.sent(),n.label=4;case 4:return(null==i?void 0:i.callback)?[4,(0,w.w_)(u,i.callback,(s=o,a=i.timeout,c=Date.now()-s,Math.max((null!=a?a:300)-c,0)))]:[3,6];case 5:u=n.sent(),n.label=6;case 6:return(null==i?void 0:i.debug)&&u.flush(),[2,u]}var s,a,c}))}))}var x=u(6551),C=u(9659),P=u(3435),S=u(8110),I=u.n(S),j=function(){function t(t){this.user=t}return t.prototype.track=function(t,e,r,i){return this.normalize((0,n.Cl)((0,n.Cl)({},this.baseEvent()),{event:t,type:"track",properties:e,options:(0,n.Cl)({},r),integrations:(0,n.Cl)({},i)}))},t.prototype.page=function(t,e,r,i,o){var u,s={type:"page",properties:(0,n.Cl)({},r),options:(0,n.Cl)({},i),integrations:(0,n.Cl)({},o)};return null!==t&&(s.category=t,s.properties=null!==(u=s.properties)&&void 0!==u?u:{},s.properties.category=t),null!==e&&(s.name=e),this.normalize((0,n.Cl)((0,n.Cl)({},this.baseEvent()),s))},t.prototype.screen=function(t,e,r,i,o){var u={type:"screen",properties:(0,n.Cl)({},r),options:(0,n.Cl)({},i),integrations:(0,n.Cl)({},o)};return null!==t&&(u.category=t),null!==e&&(u.name=e),this.normalize((0,n.Cl)((0,n.Cl)({},this.baseEvent()),u))},t.prototype.identify=function(t,e,r,i){return this.normalize((0,n.Cl)((0,n.Cl)({},this.baseEvent()),{type:"identify",userId:t,traits:e,options:(0,n.Cl)({},r),integrations:(0,n.Cl)({},i)}))},t.prototype.group=function(t,e,r,i){return this.normalize((0,n.Cl)((0,n.Cl)({},this.baseEvent()),{type:"group",traits:e,options:(0,n.Cl)({},r),integrations:(0,n.Cl)({},i),groupId:t}))},t.prototype.alias=function(t,e,r,i){var o={userId:t,type:"alias",options:(0,n.Cl)({},r),integrations:(0,n.Cl)({},i)};return null!==e&&(o.previousId=e),void 0===t?this.normalize((0,n.Cl)((0,n.Cl)({},o),this.baseEvent())):this.normalize((0,n.Cl)((0,n.Cl)({},this.baseEvent()),o))},t.prototype.baseEvent=function(){var t={integrations:{},options:{}},e=this.user;return e.id()&&(t.userId=e.id()),e.anonymousId()&&(t.anonymousId=e.anonymousId()),t},t.prototype.context=function(t){var e,n,r,i=["integrations","anonymousId","timestamp","userId"],o=null!==(e=t.options)&&void 0!==e?e:{};delete o.integrations;var u=Object.keys(o),s=null!==(r=null===(n=t.options)||void 0===n?void 0:n.context)&&void 0!==r?r:{},a={};return u.forEach((function(t){"context"!==t&&(i.includes(t)?(0,P.J)(a,t,o[t]):(0,P.J)(s,t,o[t]))})),[s,a]},t.prototype.normalize=function(t){var e,r,i;(null===(e=t.options)||void 0===e?void 0:e.anonymousId)&&this.user.anonymousId(t.options.anonymousId);var o=Object.keys(null!==(r=t.integrations)&&void 0!==r?r:{}).reduce((function(e,r){var i,o;return(0,n.Cl)((0,n.Cl)({},e),((i={})[r]=Boolean(null===(o=t.integrations)||void 0===o?void 0:o[r]),i))}),{}),u=(0,n.Cl)((0,n.Cl)({},o),null===(i=t.options)||void 0===i?void 0:i.integrations),s=this.context(t),a=s[0],c=s[1],l=(t.options,(0,n.Tt)(t,["options"])),f=(0,n.Cl)((0,n.Cl)((0,n.Cl)({timestamp:new Date},l),{context:a,integrations:u}),c),p="ajs-next-"+I().hash(JSON.stringify(f)+(0,C.v4)());return(0,n.Cl)((0,n.Cl)({},f),{messageId:p})},t}(),A=u(9732);var k=u(2939),O=u(9752),H=u(2620);function M(){return"undefined"!=typeof window}function E(){return!(!M()||window.navigator.onLine)}var F=function(t){function e(e){var n,r,i,o=t.call(this)||this;return o.criticalTasks=(i=0,{done:function(){return n},run:function(t){var e,o=t();return"object"==typeof(e=o)&&null!==e&&"then"in e&&"function"==typeof e.then&&(1==++i&&(n=new Promise((function(t){return r=t}))),o.finally((function(){return 0==--i&&r()}))),o}}),o.plugins=[],o.failedInitializations=[],o.flushing=!1,o.queue=e,o.queue.on(k.g,(function(){o.scheduleFlush(0)})),o}return(0,n.C6)(e,t),e.prototype.register=function(t,e,r){return(0,n.sH)(this,void 0,void 0,(function(){var i=this;return(0,n.YH)(this,(function(n){switch(n.label){case 0:return[4,Promise.resolve(e.load(t,r)).then((function(){i.plugins.push(e)})).catch((function(n){if("destination"===e.type)return i.failedInitializations.push(e.name),console.warn(e.name,n),void t.log("warn","Failed to load destination",{plugin:e.name,error:n});throw n}))];case 1:return n.sent(),[2]}}))}))},e.prototype.deregister=function(t,e,r){return(0,n.sH)(this,void 0,void 0,(function(){var i;return(0,n.YH)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),e.unload?[4,Promise.resolve(e.unload(t,r))]:[3,2];case 1:n.sent(),n.label=2;case 2:return this.plugins=this.plugins.filter((function(t){return t.name!==e.name})),[3,4];case 3:return i=n.sent(),t.log("warn","Failed to unload destination",{plugin:e.name,error:i}),[3,4];case 4:return[2]}}))}))},e.prototype.dispatch=function(t){return(0,n.sH)(this,void 0,void 0,(function(){var e;return(0,n.YH)(this,(function(n){return t.log("debug","Dispatching"),t.stats.increment("message_dispatched"),this.queue.push(t),e=this.subscribeToDelivery(t),this.scheduleFlush(0),[2,e]}))}))},e.prototype.subscribeToDelivery=function(t){return(0,n.sH)(this,void 0,void 0,(function(){var e=this;return(0,n.YH)(this,(function(n){return[2,new Promise((function(n){var r=function(i,o){i.isSame(t)&&(e.off("flush",r),n(i))};e.on("flush",r)}))]}))}))},e.prototype.dispatchSingle=function(t){return(0,n.sH)(this,void 0,void 0,(function(){var e=this;return(0,n.YH)(this,(function(n){return t.log("debug","Dispatching"),t.stats.increment("message_dispatched"),this.queue.updateAttempts(t),t.attempts=1,[2,this.deliver(t).catch((function(n){return e.enqueuRetry(n,t)?e.subscribeToDelivery(t):(t.setFailedDelivery({reason:n}),t)}))]}))}))},e.prototype.isEmpty=function(){return 0===this.queue.length},e.prototype.scheduleFlush=function(t){var e=this;void 0===t&&(t=500),this.flushing||(this.flushing=!0,setTimeout((function(){e.flush().then((function(){setTimeout((function(){e.flushing=!1,e.queue.length&&e.scheduleFlush(0)}),0)}))}),t))},e.prototype.deliver=function(t){return(0,n.sH)(this,void 0,void 0,(function(){var e,r,i,o;return(0,n.YH)(this,(function(n){switch(n.label){case 0:return[4,this.criticalTasks.done()];case 1:n.sent(),e=Date.now(),n.label=2;case 2:return n.trys.push([2,4,,5]),[4,this.flushOne(t)];case 3:return t=n.sent(),r=Date.now()-e,this.emit("delivery_success",t),t.stats.gauge("delivered",r),t.log("debug","Delivered",t.event),[2,t];case 4:throw i=n.sent(),o=i,t.log("error","Failed to deliver",o),this.emit("delivery_failure",t,o),t.stats.increment("delivery_failed"),i;case 5:return[2]}}))}))},e.prototype.enqueuRetry=function(t,e){return!(t instanceof O.d&&!t.retry)&&this.queue.pushWithBackoff(e)},e.prototype.flush=function(){return(0,n.sH)(this,void 0,void 0,(function(){var t,e;return(0,n.YH)(this,(function(n){switch(n.label){case 0:if(0===this.queue.length||E())return[2,[]];if(!(t=this.queue.pop()))return[2,[]];t.attempts=this.queue.getAttempts(t),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.deliver(t)];case 2:return t=n.sent(),this.emit("flush",t,!0),[3,4];case 3:return e=n.sent(),this.enqueuRetry(e,t)||(t.setFailedDelivery({reason:e}),this.emit("flush",t,!1)),[2,[]];case 4:return[2,[t]]}}))}))},e.prototype.isReady=function(){return!0},e.prototype.availableExtensions=function(t){var e,r,i=this.plugins.filter((function(e){var n,r,i;if("destination"!==e.type&&"Customer.io Data Pipelines"!==e.name)return!0;var o=void 0;return null===(n=e.alternativeNames)||void 0===n||n.forEach((function(e){void 0!==t[e]&&(o=t[e])})),null!==(i=null!==(r=t[e.name])&&void 0!==r?r:o)&&void 0!==i?i:!1!==("Customer.io Data Pipelines"===e.name||t.All)})),o=(e="type",r={},i.forEach((function(t){var i,o=void 0;if("string"==typeof e){var u=t[e];o="string"!=typeof u?JSON.stringify(u):u}else e instanceof Function&&(o=e(t));void 0!==o&&(r[o]=(0,n.fX)((0,n.fX)([],null!==(i=r[o])&&void 0!==i?i:[],!0),[t],!1))})),r),u=o.before,s=void 0===u?[]:u,a=o.enrichment,c=void 0===a?[]:a,l=o.destination,f=void 0===l?[]:l,p=o.after;return{before:s,enrichment:c,destinations:f,after:void 0===p?[]:p}},e.prototype.flushOne=function(t){var e,r;return(0,n.sH)(this,void 0,void 0,(function(){var i,o,u,s,a,c,l,f,p,d,h,v,y,g;return(0,n.YH)(this,(function(n){switch(n.label){case 0:if(!this.isReady())throw new Error("Not ready");t.attempts>1&&this.emit("delivery_retry",t),i=this.availableExtensions(null!==(e=t.event.integrations)&&void 0!==e?e:{}),o=i.before,u=i.enrichment,s=0,a=o,n.label=1;case 1:return s<a.length?(c=a[s],[4,(0,H.D)(t,c)]):[3,4];case 2:(d=n.sent())instanceof O.j&&(t=d),this.emit("message_enriched",t,c),n.label=3;case 3:return s++,[3,1];case 4:l=0,f=u,n.label=5;case 5:return l<f.length?(p=f[l],[4,(0,H.C)(t,p)]):[3,8];case 6:(d=n.sent())instanceof O.j&&(t=d),this.emit("message_enriched",t,p),n.label=7;case 7:return l++,[3,5];case 8:return h=this.availableExtensions(null!==(r=t.event.integrations)&&void 0!==r?r:{}),v=h.destinations,y=h.after,[4,new Promise((function(e,n){setTimeout((function(){var r=v.map((function(e){return(0,H.C)(t,e)}));Promise.all(r).then(e).catch(n)}),0)}))];case 9:return n.sent(),t.stats.increment("message_delivered"),this.emit("message_delivered",t),g=y.map((function(e){return(0,H.C)(t,e)})),[4,Promise.all(g)];case 10:return n.sent(),[2,t]}}))}))},e}(x.v),D=function(t){function e(e){return t.call(this,null!=e?e:new A.x(4,"event-queue"))||this}return(0,n.C6)(e,t),e}(F),q=u(3398),T=u(3057),Y=u(6452),N=u(5120),L=u(6091),B="This is being deprecated and will be not be available in future releases of Analytics JS",U=(0,N.m)(),J=null==U?void 0:U.analytics;function R(){console.warn(B)}var z=function(t){function e(e,r,i,o,u){var s,a,c,l=this;(l=t.call(this)||this)._debug=!1,l.initialized=!1,l.user=function(){return l._user},l.init=l.initialize.bind(l),l.log=R,l.addIntegrationMiddleware=R,l.listeners=R,l.addEventListener=R,l.removeAllListeners=R,l.removeListener=R,l.removeEventListener=R,l.hasListeners=R,l.add=R,l.addIntegration=R;var f=null==r?void 0:r.cookie,p=null!==(s=null==r?void 0:r.disableClientPersistence)&&void 0!==s&&s;return l.settings=e,l.settings.timeout=null!==(a=l.settings.timeout)&&void 0!==a?a:300,l.queue=null!=i?i:function(t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var n=t?4:1,r=e?new k.M(n,[]):new A.x(n,"event-queue");return new D(r)}(null==r?void 0:r.retryQueue,p),l._universalStorage=new q.lJ(p?["memory"]:["localStorage","cookie","memory"],(0,q.xD)(f)),l._user=null!=o?o:new q.KJ(p?(0,n.Cl)((0,n.Cl)({},null==r?void 0:r.user),{persist:!1}):null==r?void 0:r.user,f).load(),l._group=null!=u?u:new q.YJ(p?(0,n.Cl)((0,n.Cl)({},null==r?void 0:r.group),{persist:!1}):null==r?void 0:r.group,f).load(),l.eventFactory=new j(l._user),l.integrations=null!==(c=null==r?void 0:r.integrations)&&void 0!==c?c:{},l.options=null!=r?r:{},(0,T.A)(l),l}return(0,n.C6)(e,t),Object.defineProperty(e.prototype,"storage",{get:function(){return this._universalStorage},enumerable:!1,configurable:!0}),e.prototype.track=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,n.sH)(this,void 0,Promise,(function(){var e,r,i,o,u,s,a=this;return(0,n.YH)(this,(function(n){return e=h.apply(void 0,t),r=e[0],i=e[1],o=e[2],u=e[3],s=this.eventFactory.track(r,i,o,this.integrations),[2,this._dispatch(s,u).then((function(t){return a.emit("track",r,t.event.properties,t.event.options),t}))]}))}))},e.prototype.page=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,n.sH)(this,void 0,Promise,(function(){var e,r,i,o,u,s,a,c=this;return(0,n.YH)(this,(function(n){return e=v.apply(void 0,t),r=e[0],i=e[1],o=e[2],u=e[3],s=e[4],a=this.eventFactory.page(r,i,o,u,this.integrations),[2,this._dispatch(a,s).then((function(t){return c.emit("page",r,i,t.event.properties,t.event.options),t}))]}))}))},e.prototype.identify=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,n.sH)(this,void 0,Promise,(function(){var e,r,i,o,u,s,a=this;return(0,n.YH)(this,(function(n){return e=y(this._user).apply(void 0,t),r=e[0],i=e[1],o=e[2],u=e[3],this._user.identify(r,i),s=this.eventFactory.identify(this._user.id(),this._user.traits(),o,this.integrations),[2,this._dispatch(s,u).then((function(t){return a.emit("identify",t.event.userId,t.event.traits,t.event.options),t}))]}))}))},e.prototype.group=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(0===e.length)return this._group;var r=y(this._group).apply(void 0,e),i=r[0],o=r[1],u=r[2],s=r[3];this._group.identify(i,o);var a=this._group.id(),c=this._group.traits(),l=this.eventFactory.group(a,c,u,this.integrations);return this._dispatch(l,s).then((function(e){return t.emit("group",e.event.groupId,e.event.traits,e.event.options),e}))},e.prototype.alias=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,n.sH)(this,void 0,Promise,(function(){var e,r,i,o,u,s,a=this;return(0,n.YH)(this,(function(n){return e=g.apply(void 0,t),r=e[0],i=e[1],o=e[2],u=e[3],s=this.eventFactory.alias(r,i,o,this.integrations),[2,this._dispatch(s,u).then((function(t){return a.emit("alias",r,i,t.event.options),t}))]}))}))},e.prototype.screen=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,n.sH)(this,void 0,Promise,(function(){var e,r,i,o,u,s,a,c=this;return(0,n.YH)(this,(function(n){return e=v.apply(void 0,t),r=e[0],i=e[1],o=e[2],u=e[3],s=e[4],a=this.eventFactory.screen(r,i,o,u,this.integrations),[2,this._dispatch(a,s).then((function(t){return c.emit("screen",r,i,t.event.properties,t.event.options),t}))]}))}))},e.prototype.trackClick=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,n.sH)(this,void 0,Promise,(function(){var e,r;return(0,n.YH)(this,(function(i){switch(i.label){case 0:return[4,u.e(248).then(u.bind(u,4875))];case 1:return e=i.sent(),[2,(r=e.link).call.apply(r,(0,n.fX)([this],t,!1))]}}))}))},e.prototype.trackLink=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,n.sH)(this,void 0,Promise,(function(){var e,r;return(0,n.YH)(this,(function(i){switch(i.label){case 0:return[4,u.e(248).then(u.bind(u,4875))];case 1:return e=i.sent(),[2,(r=e.link).call.apply(r,(0,n.fX)([this],t,!1))]}}))}))},e.prototype.trackSubmit=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,n.sH)(this,void 0,Promise,(function(){var e,r;return(0,n.YH)(this,(function(i){switch(i.label){case 0:return[4,u.e(248).then(u.bind(u,4875))];case 1:return e=i.sent(),[2,(r=e.form).call.apply(r,(0,n.fX)([this],t,!1))]}}))}))},e.prototype.trackForm=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,n.sH)(this,void 0,Promise,(function(){var e,r;return(0,n.YH)(this,(function(i){switch(i.label){case 0:return[4,u.e(248).then(u.bind(u,4875))];case 1:return e=i.sent(),[2,(r=e.form).call.apply(r,(0,n.fX)([this],t,!1))]}}))}))},e.prototype.register=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,n.sH)(this,void 0,Promise,(function(){var e,r,i=this;return(0,n.YH)(this,(function(n){switch(n.label){case 0:return e=b.o.system(),r=t.map((function(t){return i.queue.register(e,t,i)})),[4,Promise.all(r)];case 1:return n.sent(),[2,e]}}))}))},e.prototype.deregister=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(0,n.sH)(this,void 0,Promise,(function(){var e,r,i=this;return(0,n.YH)(this,(function(n){switch(n.label){case 0:return e=b.o.system(),r=t.map((function(t){var n=i.queue.plugins.find((function(e){return e.name===t}));if(n)return i.queue.deregister(e,n,i);e.log("warn","plugin ".concat(t," not found"))})),[4,Promise.all(r)];case 1:return n.sent(),[2,e]}}))}))},e.prototype.debug=function(t){return!1===t&&localStorage.getItem("debug")&&localStorage.removeItem("debug"),this._debug=t,this},e.prototype.reset=function(){this._user.reset(),this._group.reset(),this.emit("reset")},e.prototype.timeout=function(t){this.settings.timeout=t},e.prototype._dispatch=function(t,e){return(0,n.sH)(this,void 0,Promise,(function(){var r;return(0,n.YH)(this,(function(n){return r=new b.o(t),(0,m.a)()&&!this.options.retryQueue?[2,r]:[2,_(r,this.queue,this,{callback:e,debug:this._debug,timeout:this.settings.timeout})]}))}))},e.prototype.addSourceMiddleware=function(t){return(0,n.sH)(this,void 0,Promise,(function(){var e=this;return(0,n.YH)(this,(function(r){switch(r.label){case 0:return[4,this.queue.criticalTasks.run((function(){return(0,n.sH)(e,void 0,void 0,(function(){var e,r,i;return(0,n.YH)(this,(function(n){switch(n.label){case 0:return[4,Promise.resolve().then(u.bind(u,1418))];case 1:return e=n.sent().sourceMiddlewarePlugin,r={},this.queue.plugins.forEach((function(t){if("destination"===t.type)return r[t.name]=!0})),i=e(t,r),[4,this.register(i)];case 2:return n.sent(),[2]}}))}))}))];case 1:return r.sent(),[2,this]}}))}))},e.prototype.addDestinationMiddleware=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=this.queue.plugins.filter((function(e){return e.name.toLowerCase()===t.toLowerCase()}));return r.forEach((function(t){t.addMiddleware.apply(t,e)})),Promise.resolve(this)},e.prototype.setAnonymousId=function(t){return this._user.anonymousId(t)},e.prototype.queryString=function(t){return(0,n.sH)(this,void 0,Promise,(function(){return(0,n.YH)(this,(function(e){switch(e.label){case 0:return!1===this.options.useQueryString?[2,[]]:[4,u.e(538).then(u.bind(u,6346))];case 1:return[2,(0,e.sent().queryString)(this,t)]}}))}))},e.prototype.use=function(t){return t(this),this},e.prototype.ready=function(t){return void 0===t&&(t=function(t){return t}),(0,n.sH)(this,void 0,Promise,(function(){return(0,n.YH)(this,(function(e){return[2,Promise.all(this.queue.plugins.map((function(t){return t.ready?t.ready():Promise.resolve()}))).then((function(e){return t(e),e}))]}))}))},e.prototype.noConflict=function(){return console.warn(B),(0,L.Ud)(null!=J?J:this),this},e.prototype.normalize=function(t){return console.warn(B),this.eventFactory.normalize(t)},Object.defineProperty(e.prototype,"failedInitializations",{get:function(){return console.warn(B),this.queue.failedInitializations},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"VERSION",{get:function(){return Y.r},enumerable:!1,configurable:!0}),e.prototype.initialize=function(t,e){return(0,n.sH)(this,void 0,Promise,(function(){return(0,n.YH)(this,(function(t){return console.warn(B),[2,Promise.resolve(this)]}))}))},e.prototype.pageview=function(t){return(0,n.sH)(this,void 0,Promise,(function(){return(0,n.YH)(this,(function(e){switch(e.label){case 0:return console.warn(B),[4,this.page({path:t})];case 1:return e.sent(),[2,this]}}))}))},Object.defineProperty(e.prototype,"plugins",{get:function(){var t;return console.warn(B),null!==(t=this._plugins)&&void 0!==t?t:{}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Integrations",{get:function(){return console.warn(B),this.queue.plugins.filter((function(t){return"destination"===t.type})).reduce((function(t,e){var n="".concat(e.name.toLowerCase().replace(".","").split(" ").join("-"),"Integration"),r=window[n];if(!r)return t;var i=r.Integration;return i?(t[e.name]=i,t):(t[e.name]=r,t)}),{})},enumerable:!1,configurable:!0}),e.prototype.push=function(t){var e=t.shift();e&&!this[e]||this[e].apply(this,t)},e}(x.v),K=u(5835);function X(){var t=document.getElementsByTagName("link"),e="";return Array.prototype.slice.call(t).forEach((function(t){"canonical"===t.getAttribute("rel")&&(e=t.getAttribute("href"))})),e}function W(){var t=X();if(!t)return window.location.pathname;var e=document.createElement("a");return e.href=t,e.pathname.startsWith("/")?e.pathname:"/"+e.pathname}function Q(t){void 0===t&&(t="");var e=X();if(e)return e.includes("?")?e:"".concat(e).concat(t);var n=window.location.href,r=n.indexOf("#");return-1===r?n:n.slice(0,r)}function V(){return{path:W(),referrer:document.referrer,search:location.search,title:document.title,url:Q(location.search)}}function G(t){var e,n=t.event;n.context=n.context||{};var r=V(),i=null!==(e=n.properties)&&void 0!==e?e:{};return Object.keys(r).forEach((function(t){i[t]&&(r[t]=i[t])})),n.context.page&&(r=Object.assign({},r,n.context.page)),n.context=Object.assign({},n.context,{page:r}),t.event=n,t}var $={name:"Page Enrichment",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:function(t){return t.event.properties=Object.assign({},V(),t.event.properties),t.event.name&&(t.event.properties.name=t.event.name),G(t)},alias:G,track:G,identify:G,group:G},Z=u(6238),tt=u(1418),et=function(){function t(t,e){this.version="1.0.0",this.alternativeNames=[],this.middleware=[],this.alias=this._createMethod("alias"),this.group=this._createMethod("group"),this.identify=this._createMethod("identify"),this.page=this._createMethod("page"),this.screen=this._createMethod("screen"),this.track=this._createMethod("track"),this.action=e,this.name=t,this.type=e.type,this.alternativeNames.push(e.name)}return t.prototype.addMiddleware=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];"destination"===this.type&&(t=this.middleware).push.apply(t,e)},t.prototype.transform=function(t){return(0,n.sH)(this,void 0,Promise,(function(){var e;return(0,n.YH)(this,(function(n){switch(n.label){case 0:return[4,(0,tt.applyDestinationMiddleware)(this.name,t.event,this.middleware)];case 1:return null===(e=n.sent())&&t.cancel(new O.d({retry:!1,reason:"dropped by destination middleware"})),[2,new b.o(e)]}}))}))},t.prototype._createMethod=function(t){var e=this;return function(r){return(0,n.sH)(e,void 0,Promise,(function(){var e;return(0,n.YH)(this,(function(n){switch(n.label){case 0:return this.action[t]?(e=r,"destination"!==this.type?[3,2]:[4,this.transform(r)]):[2,r];case 1:e=n.sent(),n.label=2;case 2:return[4,this.action[t](e)];case 3:return n.sent(),[2,r]}}))}))}},t.prototype.isLoaded=function(){return this.action.isLoaded()},t.prototype.ready=function(){return this.action.ready?this.action.ready():Promise.resolve()},t.prototype.load=function(t,e){return this.action.load(t,e)},t.prototype.unload=function(t,e){var n,r;return null===(r=(n=this.action).unload)||void 0===r?void 0:r.call(n,t,e)},t}();function nt(e,r,i,o,u){var s,a,c;return(0,n.sH)(this,void 0,Promise,(function(){var l,f,p,d,h=this;return(0,n.YH)(this,(function(v){switch(v.label){case 0:return l=[],f=(0,t.I2)(),p=null!==(a=null===(s=e.middlewareSettings)||void 0===s?void 0:s.routingRules)&&void 0!==a?a:[],d=(null!==(c=e.remotePlugins)&&void 0!==c?c:[]).map((function(t){return(0,n.sH)(h,void 0,void 0,(function(){var e,s,a,c,d,h,v,y,g;return(0,n.YH)(this,(function(m){switch(m.label){case 0:if(function(t,e){var n=t[e.creationName],r=t[e.name];return!1===t.All&&!n&&!r||!1===n||!1===r}(r,t))return[2];m.label=1;case 1:if(m.trys.push([1,12,,13]),e=new RegExp("https://cdp.customer.io"),!o)return[3,7];s=t.url.split("/"),a=s[s.length-2],c=t.url.replace(a,btoa(a).replace(/=/g,"")),m.label=2;case 2:return m.trys.push([2,4,,6]),[4,(0,Z.k)(c.replace(e,f))];case 3:return m.sent(),[3,6];case 4:return m.sent(),[4,(0,Z.k)(t.url.replace(e,f))];case 5:return m.sent(),[3,6];case 6:return[3,9];case 7:return[4,(0,Z.k)(t.url.replace(e,f))];case 8:m.sent(),m.label=9;case 9:return d=t.libraryName,"function"!=typeof window[d]?[3,11]:[4,(0,window[d])((0,n.Cl)((0,n.Cl)({},t.settings),i[t.name]))];case 10:h=m.sent(),function(t){if(!Array.isArray(t))throw new Error("Not a valid list of plugins");var e=["load","isLoaded","name","version","type"];t.forEach((function(t){e.forEach((function(e){var n;if(void 0===t[e])throw new Error("Plugin: ".concat(null!==(n=t.name)&&void 0!==n?n:"unknown"," missing required function ").concat(e))}))}))}(v=Array.isArray(h)?h:[h]),y=p.filter((function(e){return e.destinationName===t.creationName})),v.forEach((function(e){var n=new et(t.creationName,e);y.length&&u&&"destination"===e.type&&n.addMiddleware(u),l.push(n)})),m.label=11;case 11:return[3,13];case 12:return g=m.sent(),console.warn("Failed to load Remote Plugin",g),[3,13];case 13:return[2]}}))}))})),[4,Promise.all(d)];case 1:return v.sent(),[2,l.filter(Boolean)]}}))}))}var rt=u(7536);function it(t){return(encodeURI(JSON.stringify(t)).split(/%..|./).length-1)/1024}function ot(t,e){var r,o,u,s,a,c=[],l=!1,f=null!==(r=null==e?void 0:e.size)&&void 0!==r?r:10,p=null!==(o=null==e?void 0:e.timeout)&&void 0!==o?o:5e3;function d(e){var n;if(0!==e.length){var r=null===(n=e[0])||void 0===n?void 0:n.writeKey;return(0,i.h)("".concat(t,"/b"),{keepalive:l,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify({batch:e,writeKey:r})})}}function h(){return(0,n.sH)(this,void 0,Promise,(function(){var t;return(0,n.YH)(this,(function(e){return c.length?(t=c,c=[],[2,d(t)]):[2]}))}))}return s=function(){if(l=!0,c.length){var t=function(t){var e=[],n=0;return t.forEach((function(t){it(e[n])>=64&&n++,e[n]?e[n].push(t):e[n]=[t]})),e}(c).map(d);Promise.all(t).catch(console.error)}},a=!1,window.addEventListener("pagehide",(function(){a||(a=!0,s())})),document.addEventListener("visibilitychange",(function(){if("hidden"==document.visibilityState){if(a)return;a=!0,s()}else a=!1})),{dispatch:function(t,e){return(0,n.sH)(this,void 0,Promise,(function(){var t;return(0,n.YH)(this,(function(n){return c.push(e),t=c.length>=f||function(t){return it(t)>=450}(c),[2,t||l?h():void(u||(u=setTimeout((function(){u=void 0,h().catch(console.error)}),p)))]}))}))}}}var ut=u(7106);function st(t,e){return(0,n.sH)(this,void 0,Promise,(function(){var r,i=this;return(0,n.YH)(this,(function(o){switch(o.label){case 0:return r=[],(0,m.a)()?[2,e]:[4,(0,ut._)((function(){return e.length>0&&!(0,m.a)()}),(function(){return(0,n.sH)(i,void 0,void 0,(function(){var i,o;return(0,n.YH)(this,(function(n){switch(n.label){case 0:return(i=e.pop())?[4,(0,H.C)(i,t)]:[2];case 1:return o=n.sent(),o instanceof b.o||r.push(i),[2]}}))}))}))];case 1:return o.sent(),r.map((function(t){return e.pushWithBackoff(t)})),[2,e]}}))}))}function at(t,e,r,i){var o=this;t||setTimeout((function(){return(0,n.sH)(o,void 0,void 0,(function(){var t,o;return(0,n.YH)(this,(function(n){switch(n.label){case 0:return t=!0,[4,st(r,e)];case 1:return o=n.sent(),t=!1,e.todo>0&&i(t,o,r,i),[2]}}))}))}),5e3*Math.random())}function ct(t,r,o){var u,s;window.addEventListener("pagehide",(function(){c.push.apply(c,Array.from(l)),l.clear()}));var a,c=t.options.disableClientPersistence?new k.M(t.queue.queue.maxAttempts,[]):new A.x(t.queue.queue.maxAttempts,"dest-Customer.io-Data-Pipelines"),l=new Set,f=!1,p=null!==(u=null==r?void 0:r.apiHost)&&void 0!==u?u:"cdp.customer.io/v1",d=null!==(s=null==r?void 0:r.protocol)&&void 0!==s?s:"https",h="".concat(d,"://").concat(p),v=null==r?void 0:r.deliveryStrategy,y="batching"===(null==v?void 0:v.strategy)?ot(h,v.config):(a=null==v?void 0:v.config,{dispatch:function(t,e){return(0,i.h)(t,{keepalive:null==a?void 0:a.keepalive,headers:{"Content-Type":"text/plain"},method:"post",body:JSON.stringify(e)})}});function g(i){return(0,n.sH)(this,void 0,Promise,(function(){var u,s;return(0,n.YH)(this,(function(n){return(0,m.a)()?(c.push(i),at(f,c,b,at),[2,i]):(l.add(i),u=i.event.type.charAt(0),s=(0,rt.W)(i.event).json(),"track"===i.event.type&&delete s.traits,"alias"===i.event.type&&(s=function(t,e){var n,r,i,o,u=t.user();return e.previousId=null!==(i=null!==(r=null!==(n=e.previousId)&&void 0!==n?n:e.from)&&void 0!==r?r:u.id())&&void 0!==i?i:u.anonymousId(),e.userId=null!==(o=e.userId)&&void 0!==o?o:e.to,delete e.from,delete e.to,e}(t,s)),[2,y.dispatch("".concat(h,"/").concat(u),(0,e.S8)(t,s,r,o)).then((function(){return i})).catch((function(){return c.pushWithBackoff(i),at(f,c,b,at),i})).finally((function(){l.delete(i)}))])}))}))}var b={name:"Customer.io Data Pipelines",type:"after",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},track:g,identify:g,page:g,alias:g,group:g,screen:g};return c.todo&&at(f,c,b,at),b}var lt=function(t,e,n){n.getCalls(t).forEach((function(t){vt(e,t).catch(console.error)}))},ft=function(t,e){return(0,n.sH)(void 0,void 0,void 0,(function(){var r,i,o;return(0,n.YH)(this,(function(n){switch(n.label){case 0:r=0,i=e.getCalls("addSourceMiddleware"),n.label=1;case 1:return r<i.length?(o=i[r],[4,vt(t,o).catch(console.error)]):[3,4];case 2:n.sent(),n.label=3;case 3:return r++,[3,1];case 4:return[2]}}))}))},pt=lt.bind(void 0,"on"),dt=lt.bind(void 0,"setAnonymousId"),ht=function(){function t(){this._value={}}return t.prototype.toArray=function(){var t;return(t=[]).concat.apply(t,Object.values(this._value))},t.prototype.getCalls=function(t){var e;return null!==(e=this._value[t])&&void 0!==e?e:[]},t.prototype.push=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.forEach((function(e){t._value[e.method]?t._value[e.method].push(e):t._value[e.method]=[e]})),this},t.prototype.clear=function(){return this._value={},this},t}();function vt(t,e){return(0,n.sH)(this,void 0,Promise,(function(){var r,i;return(0,n.YH)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),e.called?[2,void 0]:(e.called=!0,r=t[e.method].apply(t,e.args),"object"==typeof(o=r)&&null!==o&&"then"in o&&"function"==typeof o.then?[4,r]:[3,2]);case 1:n.sent(),n.label=2;case 2:return e.resolve(r),[3,4];case 3:return i=n.sent(),e.reject(i),[3,4];case 4:return[2]}var o}))}))}var yt=function(){function t(t){var e=this;this._preInitBuffer=new ht,this.trackSubmit=this._createMethod("trackSubmit"),this.trackClick=this._createMethod("trackClick"),this.trackLink=this._createMethod("trackLink"),this.pageView=this._createMethod("pageview"),this.identify=this._createMethod("identify"),this.reset=this._createMethod("reset"),this.group=this._createMethod("group"),this.track=this._createMethod("track"),this.ready=this._createMethod("ready"),this.alias=this._createMethod("alias"),this.debug=this._createChainableMethod("debug"),this.page=this._createMethod("page"),this.once=this._createChainableMethod("once"),this.off=this._createChainableMethod("off"),this.on=this._createChainableMethod("on"),this.addSourceMiddleware=this._createMethod("addSourceMiddleware"),this.setAnonymousId=this._createMethod("setAnonymousId"),this.addDestinationMiddleware=this._createMethod("addDestinationMiddleware"),this.screen=this._createMethod("screen"),this.register=this._createMethod("register"),this.deregister=this._createMethod("deregister"),this.user=this._createMethod("user"),this.VERSION=Y.r,this._promise=t(this._preInitBuffer),this._promise.then((function(t){var n=t[0],r=t[1];e.instance=n,e.ctx=r})).catch((function(){}))}return t.prototype.then=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).then.apply(t,e)},t.prototype.catch=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).catch.apply(t,e)},t.prototype.finally=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this._promise).finally.apply(t,e)},t.prototype._createMethod=function(t){var e=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(e.instance){var o=(n=e.instance)[t].apply(n,r);return Promise.resolve(o)}return new Promise((function(n,i){e._preInitBuffer.push({method:t,args:r,resolve:n,reject:i,called:!1})}))}},t.prototype._createChainableMethod=function(t){var e=this;return function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return e.instance?((n=e.instance)[t].apply(n,r),e):(e._preInitBuffer.push({method:t,args:r,resolve:function(){},reject:console.error,called:!1}),e)}},t}();function gt(t){var e=t[0],n=t.slice(1);return{method:e,resolve:function(){},reject:console.error,args:n,called:!1}}var mt,bt,wt=function(t){void 0===t&&(t=(0,L.kJ)());var e=t;return Array.isArray(e)?function(t){return t.map(gt)}(e.splice(0,e.length)):[]},_t=null!==(mt=(bt=(0,N.m)()).__INSPECTOR__)&&void 0!==mt?mt:bt.__INSPECTOR__={},xt=u(8900);function Ct(e,n){var r=null!=n?n:(0,t.I2)();return(0,i.h)("".concat(r,"/v1/projects/").concat(e,"/settings")).then((function(t){return t.ok?t.json():t.text().then((function(t){throw new Error(t)}))})).catch((function(t){throw console.error(t.message),t}))}function Pt(t,e){return(0,n.sH)(this,void 0,Promise,(function(){return(0,n.YH)(this,(function(n){switch(n.label){case 0:return e.push.apply(e,wt()),[4,ft(t,e)];case 1:return n.sent(),e.push.apply(e,wt()),function(t,e){e.toArray().forEach((function(e){setTimeout((function(){vt(t,e).catch(console.error)}),0)}))}(t,e),e.clear(),[2]}}))}))}function St(t,e,i,o,s,a){var c,l,f,p;return(0,n.sH)(this,void 0,Promise,(function(){var h,v,y,g,m,b,w,_,x,C,P,S,I,j,A=this;return(0,n.YH)(this,(function(k){switch(k.label){case 0:return function(t){var e,n,i;return"test"!==r().NODE_ENV&&(null!==(i=null===(n=null===(e=t.middlewareSettings)||void 0===e?void 0:e.routingRules)||void 0===n?void 0:n.length)&&void 0!==i?i:0)>0}(t)?[4,u.e(10).then(u.bind(u,31)).then((function(e){return e.tsubMiddleware(t.middlewareSettings.routingRules)}))]:[3,2];case 1:return v=k.sent(),[3,3];case 2:v=void 0,k.label=3;case 3:return h=v,O=t,"test"!==r().NODE_ENV&&Object.keys(O.integrations).length>1||a.length>0?[4,u.e(50).then(u.bind(u,3771)).then((function(n){return n.ajsDestinations(t,e.integrations,i,h,a)}))]:[3,5];case 4:return g=k.sent(),[3,6];case 5:g=[],k.label=6;case 6:return y=g,t.legacyVideoPluginsEnabled?[4,u.e(694).then(u.bind(u,8162)).then((function(t){return t.loadLegacyVideoPlugins(e)}))]:[3,8];case 7:k.sent(),k.label=8;case 8:return(null===(c=i.plan)||void 0===c?void 0:c.track)?[4,u.e(104).then(u.bind(u,3542)).then((function(e){var n;return e.schemaFilter(null===(n=i.plan)||void 0===n?void 0:n.track,t)}))]:[3,10];case 9:return b=k.sent(),[3,11];case 10:b=void 0,k.label=11;case 11:return m=b,w=(0,K.J)(t,o),[4,nt(t,e.integrations,w,o.obfuscate,h).catch((function(){return[]}))];case 12:return _=k.sent(),(C=w[x="Customer.io In-App Plugin"])||(C=null===(l=o.integrations)||void 0===l?void 0:l[x]),C?[4,Promise.all([u.e(852),u.e(926)]).then(u.bind(u,546)).then((function(t){return t.InAppPlugin(C)}))]:[3,14];case 13:return S=k.sent(),[3,15];case 14:S=void 0,k.label=15;case 15:return P=S,I=(0,n.fX)((0,n.fX)((0,n.fX)([d,$],s,!0),y,!0),_,!0),m&&I.push(m),P&&I.push(P),!1===(null===(f=i.integrations)||void 0===f?void 0:f.All)&&!i.integrations["Customer.io Data Pipelines"]||i.integrations&&!1===i.integrations["Customer.io Data Pipelines"]||I.push(ct(e,w["Customer.io Data Pipelines"],t.integrations)),[4,e.register.apply(e,I)];case 16:return j=k.sent(),Object.entries(null!==(p=t.enabledMiddleware)&&void 0!==p?p:{}).some((function(t){return t[1]}))?[4,u.e(521).then(u.bind(u,9231)).then((function(r){var i=r.remoteMiddlewares;return(0,n.sH)(A,void 0,void 0,(function(){var r,u;return(0,n.YH)(this,(function(n){switch(n.label){case 0:return[4,i(j,t,o.obfuscate)];case 1:return r=n.sent(),u=r.map((function(t){return e.addSourceMiddleware(t)})),[2,Promise.all(u)]}}))}))}))]:[3,18];case 17:k.sent(),k.label=18;case 18:return[2,j]}var O}))}))}function It(e,r,i){var o,u,s,a,c,l,f;return void 0===r&&(r={}),(0,n.sH)(this,void 0,Promise,(function(){var p,d,h,v,y,g,m,b,w,_,x;return(0,n.YH)(this,(function(C){switch(C.label){case 0:return r.globalAnalyticsKey&&(0,L.rY)(r.globalAnalyticsKey),e.cdnURL&&(0,t.qQ)(e.cdnURL),null===(o=e.cdnSettings)||void 0===o?[3,1]:(d=o,[3,3]);case 1:return[4,Ct(e.writeKey,e.cdnURL)];case 2:d=C.sent(),C.label=3;case 3:return h=null===(s=null===(u=(p=d).integrations["Customer.io Data Pipelines"])||void 0===u?void 0:u.retryQueue)||void 0===s||s,v=(0,n.Cl)({retryQueue:h},r),function(t){var e;null===(e=_t.attach)||void 0===e||e.call(_t,t)}(y=new z(e,v)),g=null!==(a=e.plugins)&&void 0!==a?a:[],m=null!==(c=e.classicIntegrations)&&void 0!==c?c:[],xt.U.initRemoteMetrics(p.metrics),function(t,e){e.push.apply(e,wt()),dt(t,e),pt(t,e)}(y,i),[4,St(p,y,v,r,g,m)];case 4:return b=C.sent(),w=null!==(l=window.location.search)&&void 0!==l?l:"",_=null!==(f=window.location.hash)&&void 0!==f?f:"",(x=w.length?w:_.replace(/(?=#).*(?=\?)/,"")).includes("ajs_")?[4,y.queryString(x).catch(console.error)]:[3,6];case 5:C.sent(),C.label=6;case 6:return y.initialized=!0,y.emit("initialize",e,r),r.initialPageview&&y.page().catch(console.error),[4,Pt(y,i)];case 7:return C.sent(),[2,[y,b]]}}))}))}var jt=function(t){function e(){var e,n,r,i=this,o=(r=new Promise((function(t,r){e=t,n=r})),{resolve:e,reject:n,promise:r}),u=o.promise,s=o.resolve;return i=t.call(this,(function(t){return u.then((function(e){return It(e[0],e[1],t)}))}))||this,i._resolveLoadStart=function(t,e){return s([t,e])},i}return(0,n.C6)(e,t),e.prototype.load=function(t,e){return void 0===e&&(e={}),this._resolveLoadStart(t,e),this},e.load=function(t,n){return void 0===n&&(n={}),(new e).load(t,n)},e.standalone=function(t,n){return e.load({writeKey:t},n).then((function(t){return t[0]}))},e}(yt),At=(0,t.I2)();(0,t.qQ)(At),u.p=At+"/analytics-next/bundles/",(0,e.JA)("web")}(),s}()}));
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_customerio_cdp_analytics_browser=self.webpackChunk_customerio_cdp_analytics_browser||[]).push([[694],{8162:function(n,e,t){t.d(e,{loadLegacyVideoPlugins:function(){return r}});var s=t(5478);function r(n){return(0,s.sH)(this,void 0,Promise,(function(){var e;return(0,s.YH)(this,(function(s){switch(s.label){case 0:return[4,t.e(407).then(t.t.bind(t,4407,23))];case 1:return e=s.sent(),n._plugins=e,[2]}}))}))}}}]);
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_customerio_cdp_analytics_browser=self.webpackChunk_customerio_cdp_analytics_browser||[]).push([[538],{441:function(r,t,e){function s(r){return"object"===Object.prototype.toString.call(r).slice(8,-1).toLowerCase()}e.d(t,{Qd:function(){return s}})},6346:function(r,t,e){function s(r,t){return Object.keys(t).reduce((function(e,s){s.startsWith(r)&&(e[s.substr(r.length)]=t[s]);return e}),{})}e.r(t),e.d(t,{queryString:function(){return n}});var a=e(9059),i=e(441);function n(r,t){var e=document.createElement("a");e.href=t;var n=e.search.slice(1).split("&").reduce((function(r,t){var e=t.split("="),s=e[0],i=e[1];return r[s]=(0,a.p)(i),r}),{}),u=[],o=n.ajs_uid,c=n.ajs_event,_=n.ajs_aid,d=(0,i.Qd)(r.options.useQueryString)?r.options.useQueryString:{},f=d.aid,j=void 0===f?/.+/:f,p=d.uid,y=void 0===p?/.+/:p;if(_){var l=Array.isArray(n.ajs_aid)?n.ajs_aid[0]:n.ajs_aid;j.test(l)&&r.setAnonymousId(l)}if(o){var v=Array.isArray(n.ajs_uid)?n.ajs_uid[0]:n.ajs_uid;if(y.test(v)){var h=s("ajs_trait_",n);u.push(r.identify(v,h))}}if(c){var b=Array.isArray(n.ajs_event)?n.ajs_event[0]:n.ajs_event,A=s("ajs_prop_",n);u.push(r.track(b,A))}return Promise.all(u)}}}]);
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_customerio_cdp_analytics_browser=self.webpackChunk_customerio_cdp_analytics_browser||[]).push([[521],{9231:function(e,r,t){t.d(r,{remoteMiddlewares:function(){return i}});var n=t(5478),a=t(4082),c=t(6238),s=t(2911);function i(e,r,t){var i;return(0,n.sH)(this,void 0,Promise,(function(){var o,u,l,d,f=this;return(0,n.YH)(this,(function(w){switch(w.label){case 0:return(0,a.S)()?[2,[]]:(o=(0,s.YM)(),u=null!==(i=r.enabledMiddleware)&&void 0!==i?i:{},l=Object.entries(u).filter((function(e){e[0];return e[1]})).map((function(e){return e[0]})),d=l.map((function(r){return(0,n.sH)(f,void 0,void 0,(function(){var a,s,i,u;return(0,n.YH)(this,(function(n){switch(n.label){case 0:a=r.replace("@segment/",""),s=a,t&&(s=btoa(a).replace(/=/g,"")),i="".concat(o,"/middleware/").concat(s,"/latest/").concat(s,".js.gz"),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,(0,c.k)(i)];case 2:return n.sent(),[2,window["".concat(a,"Middleware")]];case 3:return u=n.sent(),e.log("error",u),e.stats.increment("failed_remote_middleware"),[3,4];case 4:return[2]}}))}))})),[4,Promise.all(d)]);case 1:return[2,w.sent().filter(Boolean)]}}))}))}}}]);
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_customerio_cdp_analytics_browser=self.webpackChunk_customerio_cdp_analytics_browser||[]).push([[104],{1419:function(n,e,t){function i(n,e){var t,i;return"boolean"==typeof(null==e?void 0:e.enabled)?e.enabled:null===(i=null===(t=null==n?void 0:n.__default)||void 0===t?void 0:t.enabled)||void 0===i||i}t.d(e,{j:function(){return i}})},3542:function(n,e,t){t.d(e,{schemaFilter:function(){return o}});var i=t(5478),r=t(1419);function o(n,e){function t(t){var o=n,u=t.event.event;if(o&&u){var a=o[u];if(!(0,r.j)(o,a))return t.updateEvent("integrations",(0,i.Cl)((0,i.Cl)({},t.event.integrations),{All:!1,"Customer.io Data Pipelines":!0})),t;var s=function(n,e){var t,i;if(!n||!Object.keys(n))return{};var r=n.integrations?Object.keys(n.integrations).filter((function(e){return!1===n.integrations[e]})):[],o=[];return(null!==(t=e.remotePlugins)&&void 0!==t?t:[]).forEach((function(n){r.forEach((function(e){(n.name.includes(e)||e.includes(n.name))&&o.push(n.name)}))})),(null!==(i=e.remotePlugins)&&void 0!==i?i:[]).reduce((function(n,e){return e.settings.subscriptions&&o.includes(e.name)&&e.settings.subscriptions.forEach((function(t){return n["".concat(e.name," ").concat(t.partnerAction)]=!1})),n}),{})}(a,e);t.updateEvent("integrations",(0,i.Cl)((0,i.Cl)((0,i.Cl)({},t.event.integrations),null==a?void 0:a.integrations),s))}return t}return{name:"Schema Filter",version:"0.1.0",isLoaded:function(){return!0},load:function(){return Promise.resolve()},type:"before",page:t,alias:t,track:t,identify:t,group:t}}}}]);
|
|
Binary file
|