@customerio/cdp-analytics-browser 0.0.1
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 +21 -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 +310 -0
- package/dist/cjs/browser/index.js.map +1 -0
- package/dist/cjs/browser/standalone-analytics.js +60 -0
- package/dist/cjs/browser/standalone-analytics.js.map +1 -0
- package/dist/cjs/browser/standalone.js +83 -0
- package/dist/cjs/browser/standalone.js.map +1 -0
- package/dist/cjs/core/analytics/index.js +544 -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 +30 -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 +11 -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/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 +79 -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 +97 -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/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 +26 -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/pkg/browser/browser-umd.js +17 -0
- package/dist/pkg/browser/browser-umd.js.map +1 -0
- package/dist/pkg/browser/index.js +306 -0
- package/dist/pkg/browser/index.js.map +1 -0
- package/dist/pkg/browser/standalone-analytics.js +56 -0
- package/dist/pkg/browser/standalone-analytics.js.map +1 -0
- package/dist/pkg/browser/standalone.js +81 -0
- package/dist/pkg/browser/standalone.js.map +1 -0
- package/dist/pkg/core/analytics/index.js +541 -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 +25 -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 +8 -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/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 +72 -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 +93 -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/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 +21 -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/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 +16 -0
- package/dist/types/browser/standalone-analytics.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 +116 -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 +10 -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 +9 -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/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/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/umd/799.bundle.f804d7b881cf284fbd56.js +1 -0
- package/dist/umd/799.bundle.f804d7b881cf284fbd56.js.gz +0 -0
- package/dist/umd/870.bundle.e0b7bfa4797bb87217c9.js +1 -0
- package/dist/umd/870.bundle.e0b7bfa4797bb87217c9.js.gz +0 -0
- package/dist/umd/ajs-destination.bundle.847bf422720e5616c9d5.js +1 -0
- package/dist/umd/ajs-destination.bundle.847bf422720e5616c9d5.js.gz +0 -0
- package/dist/umd/auto-track.bundle.758629f7a47544af2d44.js +1 -0
- package/dist/umd/auto-track.bundle.758629f7a47544af2d44.js.gz +0 -0
- package/dist/umd/index.js +1 -0
- package/dist/umd/index.js.gz +0 -0
- package/dist/umd/legacyVideos.bundle.d7ac356ab28fab36e111.js +1 -0
- package/dist/umd/legacyVideos.bundle.d7ac356ab28fab36e111.js.gz +0 -0
- package/dist/umd/queryString.bundle.913501e40ce64ef92884.js +1 -0
- package/dist/umd/queryString.bundle.913501e40ce64ef92884.js.gz +0 -0
- package/dist/umd/remoteMiddleware.bundle.3bc569811c4c2c93d90c.js +1 -0
- package/dist/umd/remoteMiddleware.bundle.3bc569811c4c2c93d90c.js.gz +0 -0
- package/dist/umd/schemaFilter.bundle.bb8180ae95843c8f138e.js +1 -0
- package/dist/umd/schemaFilter.bundle.bb8180ae95843c8f138e.js.gz +0 -0
- package/dist/umd/standalone.js +1 -0
- package/dist/umd/standalone.js.gz +0 -0
- package/dist/umd/tsub-middleware.bundle.af0f402084ddd2b605cc.js +1 -0
- package/dist/umd/tsub-middleware.bundle.af0f402084ddd2b605cc.js.gz +0 -0
- package/package.json +103 -0
- package/src/browser/browser-umd.ts +19 -0
- package/src/browser/index.ts +397 -0
- package/src/browser/standalone-analytics.ts +74 -0
- package/src/browser/standalone.ts +78 -0
- package/src/core/analytics/index.ts +567 -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 +43 -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 +10 -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/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 +85 -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 +115 -0
- package/src/plugins/customerio/fetch-dispatcher.ts +24 -0
- package/src/plugins/customerio/index.ts +142 -0
- package/src/plugins/customerio/normalize.ts +223 -0
- package/src/plugins/customerio/schedule-flush.ts +58 -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 +37 -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
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type BackoffParams = {
|
|
2
|
+
/** The number of milliseconds before starting the first retry. Default is 500 */
|
|
3
|
+
minTimeout?: number;
|
|
4
|
+
/** The maximum number of milliseconds between two retries. Default is Infinity */
|
|
5
|
+
maxTimeout?: number;
|
|
6
|
+
/** The exponential factor to use. Default is 2. */
|
|
7
|
+
factor?: number;
|
|
8
|
+
/** The current attempt */
|
|
9
|
+
attempt: number;
|
|
10
|
+
};
|
|
11
|
+
export declare function backoff(params: BackoffParams): number;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=backoff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backoff.d.ts","sourceRoot":"","sources":["../../../../src/lib/priority-queue/backoff.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,GAAG;IACnB,iFAAiF;IACjF,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB,kFAAkF;IAClF,UAAU,CAAC,EAAE,MAAM,CAAA;IAEnB,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf,0BAA0B;IAC1B,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,wBAAgB,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CASrD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/priority-queue/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,qBAAqB,EACtB,MAAM,gCAAgC,CAAA;AAEvC,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"persisted.d.ts","sourceRoot":"","sources":["../../../../src/lib/priority-queue/persisted.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,CAAA;AACjC,OAAO,EAAE,OAAO,EAAqB,MAAM,oBAAoB,CAAA;AAsF/D,qBAAa,sBAAuB,SAAQ,aAAa,CAAC,OAAO,CAAC;gBACpD,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;CAsC7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sleep.d.ts","sourceRoot":"","sources":["../../../src/lib/sleep.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,SAAU,MAAM,KAAG,QAAQ,IAAI,CAG7C,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Facade, Options } from '@segment/facade';
|
|
2
|
+
import { CustomerioEvent } from '../core/events';
|
|
3
|
+
export type CustomerioFacade = Facade<CustomerioEvent> & {
|
|
4
|
+
obj: CustomerioEvent;
|
|
5
|
+
};
|
|
6
|
+
export declare function toFacade(evt: CustomerioEvent, options?: Options): CustomerioFacade;
|
|
7
|
+
//# sourceMappingURL=to-facade.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to-facade.d.ts","sourceRoot":"","sources":["../../../src/lib/to-facade.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAGN,OAAO,EAIR,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAEhD,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,eAAe,CAAC,GAAG;IACvD,GAAG,EAAE,eAAe,CAAA;CACrB,CAAA;AAED,wBAAgB,QAAQ,CACtB,GAAG,EAAE,eAAe,EACpB,OAAO,CAAC,EAAE,OAAO,GAChB,gBAAgB,CAiClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAOzC,qBAAa,aAAa;WACX,IAAI,CAAC,QAAQ,EAAE;QAC1B,QAAQ,EAAE,MAAM,CAAA;KACjB,GAAG,OAAO,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;CAwBlC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.browser.d.ts","sourceRoot":"","sources":["../../../src/node/node.browser.ts"],"names":[],"mappings":"AAAA,qBAAa,aAAa;IACxB,MAAM,CAAC,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC;CAK9B"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Integrations, JSONObject } from '../../core/events';
|
|
2
|
+
import { Analytics, InitOptions } from '../../core/analytics';
|
|
3
|
+
import { LegacySettings } from '../../browser';
|
|
4
|
+
import { Context } from '../../core/context';
|
|
5
|
+
import { DestinationPlugin, Plugin } from '../../core/plugin';
|
|
6
|
+
import { PriorityQueue } from '../../lib/priority-queue';
|
|
7
|
+
import { DestinationMiddlewareFunction } from '../middleware';
|
|
8
|
+
import { LegacyIntegration, ClassicIntegrationSource } from './types';
|
|
9
|
+
export type ClassType<T> = new (...args: unknown[]) => T;
|
|
10
|
+
export declare class LegacyDestination implements DestinationPlugin {
|
|
11
|
+
name: string;
|
|
12
|
+
version: string;
|
|
13
|
+
settings: JSONObject;
|
|
14
|
+
options: InitOptions;
|
|
15
|
+
type: Plugin['type'];
|
|
16
|
+
middleware: DestinationMiddlewareFunction[];
|
|
17
|
+
private _ready;
|
|
18
|
+
private _initialized;
|
|
19
|
+
private onReady;
|
|
20
|
+
private onInitialize;
|
|
21
|
+
private disableAutoISOConversion;
|
|
22
|
+
integrationSource?: ClassicIntegrationSource;
|
|
23
|
+
integration: LegacyIntegration | undefined;
|
|
24
|
+
buffer: PriorityQueue<Context>;
|
|
25
|
+
flushing: boolean;
|
|
26
|
+
constructor(name: string, version: string, settings: JSONObject | undefined, options: InitOptions, integrationSource?: ClassicIntegrationSource);
|
|
27
|
+
isLoaded(): boolean;
|
|
28
|
+
ready(): Promise<unknown>;
|
|
29
|
+
load(ctx: Context, analyticsInstance: Analytics): Promise<void>;
|
|
30
|
+
unload(_ctx: Context, _analyticsInstance: Analytics): Promise<void>;
|
|
31
|
+
addMiddleware(...fn: DestinationMiddlewareFunction[]): void;
|
|
32
|
+
shouldBuffer(ctx: Context): boolean;
|
|
33
|
+
private send;
|
|
34
|
+
track(ctx: Context): Promise<Context>;
|
|
35
|
+
page(ctx: Context): Promise<Context>;
|
|
36
|
+
identify(ctx: Context): Promise<Context>;
|
|
37
|
+
alias(ctx: Context): Promise<Context>;
|
|
38
|
+
group(ctx: Context): Promise<Context>;
|
|
39
|
+
private scheduleFlush;
|
|
40
|
+
}
|
|
41
|
+
export declare function ajsDestinations(settings: LegacySettings, globalIntegrations?: Integrations, options?: InitOptions, routingMiddleware?: DestinationMiddlewareFunction, legacyIntegrationSources?: ClassicIntegrationSource[]): LegacyDestination[];
|
|
42
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/ajs-destination/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE5D,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,EAAE,OAAO,EAAsB,MAAM,oBAAoB,CAAA;AAEhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAK7D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAExD,OAAO,EAEL,6BAA6B,EAC9B,MAAM,eAAe,CAAA;AAQtB,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAOrE,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,KAAK,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAA;AAiCxD,qBAAa,iBAAkB,YAAW,iBAAiB;IACzD,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,UAAU,CAAA;IACpB,OAAO,EAAE,WAAW,CAAK;IACzB,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAgB;IACpC,UAAU,EAAE,6BAA6B,EAAE,CAAK;IAEhD,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,YAAY,CAAQ;IAC5B,OAAO,CAAC,OAAO,CAA8B;IAC7C,OAAO,CAAC,YAAY,CAA8B;IAClD,OAAO,CAAC,wBAAwB,CAAS;IAEzC,iBAAiB,CAAC,EAAE,wBAAwB,CAAA;IAC5C,WAAW,EAAE,iBAAiB,GAAG,SAAS,CAAA;IAE1C,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,CAAA;IAC9B,QAAQ,UAAQ;gBAGd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,QAAQ,wBAAiB,EACzB,OAAO,EAAE,WAAW,EACpB,iBAAiB,CAAC,EAAE,wBAAwB;IAsB9C,QAAQ,IAAI,OAAO;IAInB,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC;IAInB,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,iBAAiB,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAuDrE,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,kBAAkB,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;IAInE,aAAa,CAAC,GAAG,EAAE,EAAE,6BAA6B,EAAE,GAAG,IAAI;IAI3D,YAAY,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO;YAQrB,IAAI;IAmFZ,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAIrC,IAAI,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAUpC,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAIxC,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAIrC,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAI3C,OAAO,CAAC,aAAa;CAgBtB;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,cAAc,EACxB,kBAAkB,GAAE,YAAiB,EACrC,OAAO,GAAE,WAAgB,EACzB,iBAAiB,CAAC,EAAE,6BAA6B,EACjD,wBAAwB,CAAC,EAAE,wBAAwB,EAAE,GACpD,iBAAiB,EAAE,CA+DrB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Analytics } from '../../core/analytics';
|
|
2
|
+
import { LegacyIntegrationConfiguration } from '../../browser';
|
|
3
|
+
import { Context } from '../../core/context';
|
|
4
|
+
import { LegacyIntegration, ClassicIntegrationSource } from './types';
|
|
5
|
+
export declare function resolveIntegrationNameFromSource(integrationSource: ClassicIntegrationSource): string;
|
|
6
|
+
export declare function buildIntegration(integrationSource: ClassicIntegrationSource, integrationSettings: {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}, analyticsInstance: Analytics): LegacyIntegration;
|
|
9
|
+
export declare function loadIntegration(ctx: Context, name: string, version: string, obfuscate?: boolean): Promise<ClassicIntegrationSource>;
|
|
10
|
+
export declare function unloadIntegration(name: string, version: string, obfuscate?: boolean): Promise<void>;
|
|
11
|
+
export declare function resolveVersion(settings?: LegacyIntegrationConfiguration): string;
|
|
12
|
+
//# sourceMappingURL=loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../src/plugins/ajs-destination/loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,EAAE,8BAA8B,EAAE,MAAM,eAAe,CAAA;AAE9D,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAG5C,OAAO,EACL,iBAAiB,EAEjB,wBAAwB,EACzB,MAAM,SAAS,CAAA;AAUhB,wBAAgB,gCAAgC,CAC9C,iBAAiB,EAAE,wBAAwB,UAO5C;AAiBD,wBAAgB,gBAAgB,CAC9B,iBAAiB,EAAE,wBAAwB,EAC3C,mBAAmB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAC3C,iBAAiB,EAAE,SAAS,GAC3B,iBAAiB,CAkBnB;AAED,wBAAsB,eAAe,CACnC,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,OAAO,GAClB,OAAO,CAAC,wBAAwB,CAAC,CA2BnC;AAED,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,SAAS,CAAC,EAAE,OAAO,GAClB,OAAO,CAAC,IAAI,CAAC,CASf;AAED,wBAAgB,cAAc,CAC5B,QAAQ,CAAC,EAAE,8BAA8B,GACxC,MAAM,CAMR"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Group, Identify, Track, Page, Alias } from '@segment/facade';
|
|
2
|
+
import { Analytics } from '../../core/analytics';
|
|
3
|
+
import { Emitter } from '@customerio/cdp-analytics-core';
|
|
4
|
+
import { User } from '../../core/user';
|
|
5
|
+
export interface LegacyIntegration extends Emitter {
|
|
6
|
+
name: string;
|
|
7
|
+
analytics?: Analytics;
|
|
8
|
+
initialize: () => void;
|
|
9
|
+
loaded: () => boolean;
|
|
10
|
+
invoke: (method: string, ...args: any[]) => unknown;
|
|
11
|
+
track?: (event: Track) => void | Promise<void>;
|
|
12
|
+
identify?: (event: Identify) => void | Promise<void>;
|
|
13
|
+
page?: (event: Page) => void | Promise<void>;
|
|
14
|
+
alias?: (event: Alias) => void | Promise<void>;
|
|
15
|
+
group?: (event: Group) => void | Promise<void>;
|
|
16
|
+
ontrack?: (event: Track) => void | Promise<void>;
|
|
17
|
+
onidentify?: (event: Identify) => void | Promise<void>;
|
|
18
|
+
onpage?: (event: Page) => void | Promise<void>;
|
|
19
|
+
onalias?: (event: Alias) => void | Promise<void>;
|
|
20
|
+
ongroup?: (event: Group) => void | Promise<void>;
|
|
21
|
+
_assumesPageview?: boolean;
|
|
22
|
+
options?: object;
|
|
23
|
+
}
|
|
24
|
+
export interface ClassicIntegrationBuilder {
|
|
25
|
+
new (options: object): LegacyIntegration;
|
|
26
|
+
prototype: LegacyIntegration;
|
|
27
|
+
}
|
|
28
|
+
export interface ClassicIntegrationGenerator {
|
|
29
|
+
(analytics: {
|
|
30
|
+
user: () => User;
|
|
31
|
+
addIntegration: () => void;
|
|
32
|
+
}): void;
|
|
33
|
+
Integration: ClassicIntegrationBuilder;
|
|
34
|
+
}
|
|
35
|
+
export type ClassicIntegrationSource = ClassicIntegrationGenerator | ClassicIntegrationBuilder;
|
|
36
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/plugins/ajs-destination/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAEtC,MAAM,WAAW,iBAAkB,SAAQ,OAAO;IAChD,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,MAAM,EAAE,MAAM,OAAO,CAAA;IAGrB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAA;IAEnD,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACpD,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5C,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9C,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAG9C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAChD,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACtD,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAChD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAEhD,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAI,OAAO,EAAE,MAAM,GAAG,iBAAiB,CAAA;IACvC,SAAS,EAAE,iBAAiB,CAAA;CAC7B;AAED,MAAM,WAAW,2BAA2B;IAC1C,CAAC,SAAS,EAAE;QAAE,IAAI,EAAE,MAAM,IAAI,CAAC;QAAC,cAAc,EAAE,MAAM,IAAI,CAAA;KAAE,GAAG,IAAI,CAAA;IACnE,WAAW,EAAE,yBAAyB,CAAA;CACvC;AAED,MAAM,MAAM,wBAAwB,GAChC,2BAA2B,GAC3B,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Integrations } from '@customerio/cdp-analytics-core';
|
|
2
|
+
import { LegacyIntegrationConfiguration } from '../..';
|
|
3
|
+
export declare const isInstallableIntegration: (name: string, integrationSettings: LegacyIntegrationConfiguration) => boolean | undefined;
|
|
4
|
+
export declare const isDisabledIntegration: (integrationName: string, globalIntegrations: Integrations) => boolean;
|
|
5
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/plugins/ajs-destination/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAC7D,OAAO,EAAE,8BAA8B,EAAE,MAAM,OAAO,CAAA;AAEtD,eAAO,MAAM,wBAAwB,SAC7B,MAAM,uBACS,8BAA8B,wBAepD,CAAA;AAED,eAAO,MAAM,qBAAqB,oBACf,MAAM,sBACH,YAAY,YASjC,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Plugin } from '../../core/plugin';
|
|
2
|
+
import { CustomerioEvent } from '../../core/events';
|
|
3
|
+
interface AnalyticsNodeSettings {
|
|
4
|
+
writeKey: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: Plugin['type'];
|
|
7
|
+
version: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function post(event: CustomerioEvent, writeKey: string): Promise<CustomerioEvent>;
|
|
10
|
+
export declare function analyticsNode(settings: AnalyticsNodeSettings): Plugin;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/analytics-node/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAInD,UAAU,qBAAqB;IAC7B,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;CAChB;AAID,wBAAsB,IAAI,CACxB,KAAK,EAAE,eAAe,EACtB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,eAAe,CAAC,CAgB1B;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,qBAAqB,GAAG,MAAM,CA2BrE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type BatchingDispatchConfig = {
|
|
2
|
+
size?: number;
|
|
3
|
+
timeout?: number;
|
|
4
|
+
};
|
|
5
|
+
export default function batch(apiHost: string, config?: BatchingDispatchConfig): {
|
|
6
|
+
dispatch: (_url: string, body: object) => Promise<unknown>;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=batched-dispatcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batched-dispatcher.d.ts","sourceRoot":"","sources":["../../../../src/plugins/customerio/batched-dispatcher.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAsCD,MAAM,CAAC,OAAO,UAAU,KAAK,CAC3B,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,sBAAsB;qBAuDD,MAAM,QAAQ,MAAM,KAAG,QAAQ,OAAO,CAAC;EAYtE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type Dispatcher = (url: string, body: object) => Promise<unknown>;
|
|
2
|
+
export type StandardDispatcherConfig = {
|
|
3
|
+
keepalive?: boolean;
|
|
4
|
+
};
|
|
5
|
+
export default function (config?: StandardDispatcherConfig): {
|
|
6
|
+
dispatch: Dispatcher;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=fetch-dispatcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch-dispatcher.d.ts","sourceRoot":"","sources":["../../../../src/plugins/customerio/fetch-dispatcher.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;AAExE,MAAM,MAAM,wBAAwB,GAAG;IACrC,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CAAA;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC,EAAE,wBAAwB,GAAG;IAC3D,QAAQ,EAAE,UAAU,CAAA;CACrB,CAaA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Analytics } from '../../core/analytics';
|
|
2
|
+
import { LegacySettings } from '../../browser';
|
|
3
|
+
import { Plugin } from '../../core/plugin';
|
|
4
|
+
import { BatchingDispatchConfig } from './batched-dispatcher';
|
|
5
|
+
import { StandardDispatcherConfig } from './fetch-dispatcher';
|
|
6
|
+
type DeliveryStrategy = {
|
|
7
|
+
strategy?: 'standard';
|
|
8
|
+
config?: StandardDispatcherConfig;
|
|
9
|
+
} | {
|
|
10
|
+
strategy?: 'batching';
|
|
11
|
+
config?: BatchingDispatchConfig;
|
|
12
|
+
};
|
|
13
|
+
export type CustomerioSettings = {
|
|
14
|
+
apiKey: string;
|
|
15
|
+
apiHost?: string;
|
|
16
|
+
protocol?: 'http' | 'https';
|
|
17
|
+
addBundledMetadata?: boolean;
|
|
18
|
+
unbundledIntegrations?: string[];
|
|
19
|
+
bundledConfigIds?: string[];
|
|
20
|
+
unbundledConfigIds?: string[];
|
|
21
|
+
maybeBundledConfigIds?: Record<string, string[]>;
|
|
22
|
+
deliveryStrategy?: DeliveryStrategy;
|
|
23
|
+
};
|
|
24
|
+
export declare function customerio(analytics: Analytics, settings?: CustomerioSettings, integrations?: LegacySettings['integrations']): Plugin;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/customerio/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAG9C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAI1C,OAAc,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AACpE,OAAiB,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAA;AAIvE,KAAK,gBAAgB,GACjB;IACA,QAAQ,CAAC,EAAE,UAAU,CAAA;IACrB,MAAM,CAAC,EAAE,wBAAwB,CAAA;CAClC,GACC;IACA,QAAQ,CAAC,EAAE,UAAU,CAAA;IACrB,MAAM,CAAC,EAAE,sBAAsB,CAAA;CAChC,CAAA;AAEH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAE3B,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAA;IAChC,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC3B,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;IAE7B,qBAAqB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;IAEhD,gBAAgB,CAAC,EAAE,gBAAgB,CAAA;CACpC,CAAA;AAcD,wBAAgB,UAAU,CACxB,SAAS,EAAE,SAAS,EACpB,QAAQ,CAAC,EAAE,kBAAkB,EAC7B,YAAY,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,GAC5C,MAAM,CAsFR"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Analytics } from '../../core/analytics';
|
|
2
|
+
import { LegacySettings } from '../../browser';
|
|
3
|
+
import { CustomerioFacade } from '../../lib/to-facade';
|
|
4
|
+
import { CustomerioSettings } from './index';
|
|
5
|
+
declare let _version: 'web' | 'npm';
|
|
6
|
+
export declare function setVersionType(version: typeof _version): void;
|
|
7
|
+
export declare function getVersionType(): typeof _version;
|
|
8
|
+
export declare function ampId(): string | undefined;
|
|
9
|
+
export declare function utm(query: string): Record<string, string>;
|
|
10
|
+
export declare function normalize(analytics: Analytics, json: ReturnType<CustomerioFacade['json']>, settings?: CustomerioSettings, integrations?: LegacySettings['integrations']): object;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=normalize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../../src/plugins/customerio/normalize.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAI9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAwB5C,QAAA,IAAI,QAAQ,EAAE,KAAK,GAAG,KAAa,CAAA;AAEnC,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,QAAQ,QAEtD;AAED,wBAAgB,cAAc,IAAI,OAAO,QAAQ,CAEhD;AAID,wBAAgB,KAAK,IAAI,MAAM,GAAG,SAAS,CAK1C;AAED,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAiBzD;AAqDD,wBAAgB,SAAS,CACvB,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,EAC1C,QAAQ,CAAC,EAAE,kBAAkB,EAC7B,YAAY,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,GAC5C,MAAM,CAiGR"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Context } from '../../core/context';
|
|
2
|
+
import { Plugin } from '../../core/plugin';
|
|
3
|
+
import { PriorityQueue } from '../../lib/priority-queue';
|
|
4
|
+
export declare function scheduleFlush(flushing: boolean, buffer: PriorityQueue<Context>, xt: Plugin, scheduleFlush: Function): void;
|
|
5
|
+
//# sourceMappingURL=schedule-flush.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule-flush.d.ts","sourceRoot":"","sources":["../../../../src/plugins/customerio/schedule-flush.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAG1C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AA+BxD,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,OAAO,EACjB,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,EAC9B,EAAE,EAAE,MAAM,EACV,aAAa,EAAE,QAAQ,GACtB,IAAI,CAgBN"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/legacy-video-plugins/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAEhD,wBAAsB,sBAAsB,CAC1C,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC,IAAI,CAAC,CAWf"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CustomerioEvent } from '../../core/events';
|
|
2
|
+
import { Plugin } from '../../core/plugin';
|
|
3
|
+
import { CustomerioFacade } from '../../lib/to-facade';
|
|
4
|
+
export interface MiddlewareParams {
|
|
5
|
+
payload: CustomerioFacade;
|
|
6
|
+
integrations?: CustomerioEvent['integrations'];
|
|
7
|
+
next: (payload: MiddlewareParams['payload'] | null) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface DestinationMiddlewareParams {
|
|
10
|
+
payload: CustomerioFacade;
|
|
11
|
+
integration: string;
|
|
12
|
+
next: (payload: MiddlewareParams['payload'] | null) => void;
|
|
13
|
+
}
|
|
14
|
+
export type MiddlewareFunction = (middleware: MiddlewareParams) => void | Promise<void>;
|
|
15
|
+
export type DestinationMiddlewareFunction = (middleware: DestinationMiddlewareParams) => void | Promise<void>;
|
|
16
|
+
export declare function applyDestinationMiddleware(destination: string, evt: CustomerioEvent, middleware: DestinationMiddlewareFunction[]): Promise<CustomerioEvent | null>;
|
|
17
|
+
export declare function sourceMiddlewarePlugin(fn: MiddlewareFunction, integrations: CustomerioEvent['integrations']): Plugin;
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/middleware/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC1C,OAAO,EAAE,gBAAgB,EAAY,MAAM,qBAAqB,CAAA;AAEhE,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,gBAAgB,CAAA;IAEzB,YAAY,CAAC,EAAE,eAAe,CAAC,cAAc,CAAC,CAAA;IAC9C,IAAI,EAAE,CAAC,OAAO,EAAE,gBAAgB,CAAC,SAAS,CAAC,GAAG,IAAI,KAAK,IAAI,CAAA;CAC5D;AAED,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,gBAAgB,CAAA;IACzB,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,CAAC,OAAO,EAAE,gBAAgB,CAAC,SAAS,CAAC,GAAG,IAAI,KAAK,IAAI,CAAA;CAC5D;AAED,MAAM,MAAM,kBAAkB,GAAG,CAC/B,UAAU,EAAE,gBAAgB,KACzB,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AAEzB,MAAM,MAAM,6BAA6B,GAAG,CAC1C,UAAU,EAAE,2BAA2B,KACpC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AAEzB,wBAAsB,0BAA0B,CAC9C,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,eAAe,EACpB,UAAU,EAAE,6BAA6B,EAAE,GAC1C,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAoDjC;AAED,wBAAgB,sBAAsB,CACpC,EAAE,EAAE,kBAAkB,EACtB,YAAY,EAAE,eAAe,CAAC,cAAc,CAAC,GAC5C,MAAM,CA2CR"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Plugin } from '../../core/plugin';
|
|
2
|
+
interface PageDefault {
|
|
3
|
+
[key: string]: unknown;
|
|
4
|
+
path: string;
|
|
5
|
+
referrer: string;
|
|
6
|
+
search: string;
|
|
7
|
+
title: string;
|
|
8
|
+
url: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Return the canonical URL for the page concat the given `search`
|
|
12
|
+
* and strip the hash.
|
|
13
|
+
*/
|
|
14
|
+
export declare function canonicalUrl(search?: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Return a default `options.context.page` object.
|
|
17
|
+
*/
|
|
18
|
+
export declare function pageDefaults(): PageDefault;
|
|
19
|
+
export declare const pageEnrichment: Plugin;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/page-enrichment/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE/C,UAAU,WAAW;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;CACZ;AAqCD;;;GAGG;AAEH,wBAAgB,YAAY,CAAC,MAAM,SAAK,GAAG,MAAM,CAQhD;AAED;;GAEG;AAEH,wBAAgB,YAAY,IAAI,WAAW,CAQ1C;AA2BD,eAAO,MAAM,cAAc,EAAE,MAyB5B,CAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Integrations } from '../../core/events/interfaces';
|
|
2
|
+
import { LegacySettings } from '../../browser';
|
|
3
|
+
import { JSONObject } from '../../core/events';
|
|
4
|
+
import { DestinationPlugin, Plugin } from '../../core/plugin';
|
|
5
|
+
import { DestinationMiddlewareFunction } from '../middleware';
|
|
6
|
+
import { Context } from '../../core/context';
|
|
7
|
+
import { Analytics } from '../../core/analytics';
|
|
8
|
+
export interface RemotePlugin {
|
|
9
|
+
/** The name of the remote plugin */
|
|
10
|
+
name: string;
|
|
11
|
+
/** The creation name of the remote plugin */
|
|
12
|
+
creationName: string;
|
|
13
|
+
/** The url of the javascript file to load */
|
|
14
|
+
url: string;
|
|
15
|
+
/** The UMD/global name the plugin uses. Plugins are expected to exist here with the `PluginFactory` method signature */
|
|
16
|
+
libraryName: string;
|
|
17
|
+
/** The settings related to this plugin. */
|
|
18
|
+
settings: JSONObject;
|
|
19
|
+
}
|
|
20
|
+
export declare class ActionDestination implements DestinationPlugin {
|
|
21
|
+
name: string;
|
|
22
|
+
version: string;
|
|
23
|
+
type: Plugin['type'];
|
|
24
|
+
alternativeNames: string[];
|
|
25
|
+
middleware: DestinationMiddlewareFunction[];
|
|
26
|
+
action: Plugin;
|
|
27
|
+
constructor(name: string, action: Plugin);
|
|
28
|
+
addMiddleware(...fn: DestinationMiddlewareFunction[]): void;
|
|
29
|
+
private transform;
|
|
30
|
+
private _createMethod;
|
|
31
|
+
alias: (ctx: Context) => Promise<Context>;
|
|
32
|
+
group: (ctx: Context) => Promise<Context>;
|
|
33
|
+
identify: (ctx: Context) => Promise<Context>;
|
|
34
|
+
page: (ctx: Context) => Promise<Context>;
|
|
35
|
+
screen: (ctx: Context) => Promise<Context>;
|
|
36
|
+
track: (ctx: Context) => Promise<Context>;
|
|
37
|
+
isLoaded(): boolean;
|
|
38
|
+
ready(): Promise<unknown>;
|
|
39
|
+
load(ctx: Context, analytics: Analytics): Promise<unknown>;
|
|
40
|
+
unload(ctx: Context, analytics: Analytics): Promise<unknown> | unknown;
|
|
41
|
+
}
|
|
42
|
+
export declare function remoteLoader(settings: LegacySettings, userIntegrations: Integrations, mergedIntegrations: Record<string, JSONObject>, obfuscate?: boolean, routingMiddleware?: DestinationMiddlewareFunction): Promise<Plugin[]>;
|
|
43
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/remote-loader/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAa,MAAM,mBAAmB,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAG7D,OAAO,EAEL,6BAA6B,EAC9B,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,OAAO,EAAsB,MAAM,oBAAoB,CAAA;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAEhD,MAAM,WAAW,YAAY;IAC3B,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,6CAA6C;IAC7C,YAAY,EAAE,MAAM,CAAA;IACpB,6CAA6C;IAC7C,GAAG,EAAE,MAAM,CAAA;IACX,wHAAwH;IACxH,WAAW,EAAE,MAAM,CAAA;IACnB,2CAA2C;IAC3C,QAAQ,EAAE,UAAU,CAAA;CACrB;AAED,qBAAa,iBAAkB,YAAW,iBAAiB;IACzD,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,SAAU;IACjB,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;IAEpB,gBAAgB,EAAE,MAAM,EAAE,CAAK;IAE/B,UAAU,EAAE,6BAA6B,EAAE,CAAK;IAEhD,MAAM,EAAE,MAAM,CAAA;gBAEF,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAOxC,aAAa,CAAC,GAAG,EAAE,EAAE,6BAA6B,EAAE,GAAG,IAAI;YAM7C,SAAS;IAmBvB,OAAO,CAAC,aAAa;IAkBrB,KAAK,QAfgB,OAAO,KAAG,QAAQ,OAAO,CAAC,CAeZ;IACnC,KAAK,QAhBgB,OAAO,KAAG,QAAQ,OAAO,CAAC,CAgBZ;IACnC,QAAQ,QAjBa,OAAO,KAAG,QAAQ,OAAO,CAAC,CAiBN;IACzC,IAAI,QAlBiB,OAAO,KAAG,QAAQ,OAAO,CAAC,CAkBd;IACjC,MAAM,QAnBe,OAAO,KAAG,QAAQ,OAAO,CAAC,CAmBV;IACrC,KAAK,QApBgB,OAAO,KAAG,QAAQ,OAAO,CAAC,CAoBZ;IAGnC,QAAQ,IAAI,OAAO;IAInB,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC;IAIzB,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC;IAI1D,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO;CAGvE;AAkDD,wBAAsB,YAAY,CAChC,QAAQ,EAAE,cAAc,EACxB,gBAAgB,EAAE,YAAY,EAC9B,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,EAC9C,SAAS,CAAC,EAAE,OAAO,EACnB,iBAAiB,CAAC,EAAE,6BAA6B,GAChD,OAAO,CAAC,MAAM,EAAE,CAAC,CAyEnB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { LegacySettings } from '../../browser';
|
|
2
|
+
import { Context } from '../../core/context';
|
|
3
|
+
import { MiddlewareFunction } from '../middleware';
|
|
4
|
+
export declare function remoteMiddlewares(ctx: Context, settings: LegacySettings, obfuscate?: boolean): Promise<MiddlewareFunction[]>;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/remote-middleware/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAI5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAElD,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,OAAO,EACZ,QAAQ,EAAE,cAAc,EACxB,SAAS,CAAC,EAAE,OAAO,GAClB,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAgC/B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Matcher, Rule } from '@segment/tsub/dist/store';
|
|
2
|
+
import { DestinationMiddlewareFunction } from '../middleware';
|
|
3
|
+
type RoutingRuleMatcher = Matcher & {
|
|
4
|
+
config?: {
|
|
5
|
+
expr: string;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export type RoutingRule = Rule & {
|
|
9
|
+
matchers: RoutingRuleMatcher[];
|
|
10
|
+
};
|
|
11
|
+
export declare const tsubMiddleware: (rules: RoutingRule[]) => DestinationMiddlewareFunction;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/routing-middleware/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,6BAA6B,EAAE,MAAM,eAAe,CAAA;AAG7D,KAAK,kBAAkB,GAAG,OAAO,GAAG;IAClC,MAAM,CAAC,EAAE;QACP,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;CACF,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG;IAC/B,QAAQ,EAAE,kBAAkB,EAAE,CAAA;CAC/B,CAAA;AAED,eAAO,MAAM,cAAc,UACjB,WAAW,EAAE,KAAG,6BAoBvB,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { LegacySettings } from '../../browser';
|
|
2
|
+
import { TrackPlan } from '../../core/events/interfaces';
|
|
3
|
+
import { Plugin } from '../../core/plugin';
|
|
4
|
+
export declare function schemaFilter(track: TrackPlan | undefined, settings: LegacySettings): Plugin;
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/schema-filter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,EAAa,SAAS,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AA2C1C,wBAAgB,YAAY,CAC1B,KAAK,EAAE,SAAS,GAAG,SAAS,EAC5B,QAAQ,EAAE,cAAc,GACvB,MAAM,CAwCR"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Plugin } from '../../core/plugin';
|
|
2
|
+
export declare function isString(obj: unknown): obj is string;
|
|
3
|
+
export declare function isNumber(obj: unknown): obj is number;
|
|
4
|
+
export declare function isFunction(obj: unknown): obj is Function;
|
|
5
|
+
export declare function isPlainObject(obj: unknown): obj is Record<string, any>;
|
|
6
|
+
export declare const validation: Plugin;
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/validation/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAI/C,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAEpD;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAEpD;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,QAAQ,CAExD;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAItE;AA6CD,eAAO,MAAM,UAAU,EAAE,MAcxB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_customerio_cdp_analytics_browser=self.webpackChunk_customerio_cdp_analytics_browser||[]).push([[799],{9799: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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_customerio_cdp_analytics_browser=self.webpackChunk_customerio_cdp_analytics_browser||[]).push([[870],{2870:function(t,r,e){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.Store=r.matches=r.transform=void 0;var o=e(4303);Object.defineProperty(r,"transform",{enumerable:!0,get:function(){return n(o).default}});var i=e(2370);Object.defineProperty(r,"matches",{enumerable:!0,get:function(){return n(i).default}});var u=e(1444);Object.defineProperty(r,"Store",{enumerable:!0,get:function(){return n(u).default}})},2370:function(t,r,e){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var o=n(e(7843));function i(t,r){if(!Array.isArray(t))return!0===u(t,r);var e=t[0];switch(e){case"!":return!i(t[1],r);case"or":for(var n=1;n<t.length;n++)if(i(t[n],r))return!0;return!1;case"and":for(n=1;n<t.length;n++)if(!i(t[n],r))return!1;return!0;case"=":case"!=":return function(t,r,e,n){s(t)&&(t=i(t,n));s(r)&&(r=i(r,n));"object"==typeof t&&"object"==typeof r&&(t=JSON.stringify(t),r=JSON.stringify(r));switch(e){case"=":return t===r;case"!=":return t!==r;default:throw new Error("Invalid operator in compareItems: ".concat(e))}}(u(t[1],r),u(t[2],r),e,r);case"<=":case"<":case">":case">=":return function(t,r,e,n){s(t)&&(t=i(t,n));s(r)&&(r=i(r,n));if("number"!=typeof t||"number"!=typeof r)return!1;switch(e){case"<=":return t<=r;case">=":return t>=r;case"<":return t<r;case">":return t>r;default:throw new Error("Invalid operator in compareNumbers: ".concat(e))}}(u(t[1],r),u(t[2],r),e,r);case"in":return function(t,r,e){return void 0!==r.find((function(r){return u(r,e)===t}))}(u(t[1],r),u(t[2],r),r);case"contains":return function(t,r){if("string"!=typeof t||"string"!=typeof r)return!1;return-1!==t.indexOf(r)}(u(t[1],r),u(t[2],r));case"match":return function(t,r){if("string"!=typeof t||"string"!=typeof r)return!1;return function(t,r){var e,n;t:for(;t.length>0;){var o=void 0,i=void 0;if(o=(e=c(t)).star,i=e.chunk,t=e.pattern,o&&""===i)return!0;var u=a(i,r),s=u.t,f=u.ok,p=u.err;if(p)return!1;if(!f||!(0===s.length||t.length>0)){if(o)for(var l=0;l<r.length;l++){if(s=(n=a(i,r.slice(l+1))).t,f=n.ok,p=n.err,f){if(0===t.length&&s.length>0)continue;r=s;continue t}if(p)return!1}return!1}r=s}return 0===r.length}(r,t)}(u(t[1],r),u(t[2],r));case"lowercase":var o=u(t[1],r);return"string"!=typeof o?null:o.toLowerCase();case"typeof":return typeof u(t[1],r);case"length":return function(t){if(null===t)return 0;if(!Array.isArray(t)&&"string"!=typeof t)return NaN;return t.length}(u(t[1],r));default:throw new Error("FQL IR could not evaluate for token: ".concat(e))}}function u(t,r){return Array.isArray(t)?t:"object"==typeof t?t.value:(0,o.default)(r,t)}function s(t){return!!Array.isArray(t)&&(("lowercase"===t[0]||"length"===t[0]||"typeof"===t[0])&&2===t.length||("contains"===t[0]||"match"===t[0])&&3===t.length)}function c(t){for(var r={star:!1,chunk:"",pattern:""};t.length>0&&"*"===t[0];)t=t.slice(1),r.star=!0;var e,n=!1;t:for(e=0;e<t.length;e++)switch(t[e]){case"\\":e+1<t.length&&e++;break;case"[":n=!0;break;case"]":n=!1;break;case"*":if(!n)break t}return r.chunk=t.slice(0,e),r.pattern=t.slice(e),r}function a(t,r){for(var e,n,o={t:"",ok:!1,err:!1};t.length>0;){if(0===r.length)return o;switch(t[0]){case"[":var i=r[0];r=r.slice(1);var u=!0;(t=t.slice(1)).length>0&&"^"===t[0]&&(u=!1,t=t.slice(1));for(var s=!1,c=0;;){if(t.length>0&&"]"===t[0]&&c>0){t=t.slice(1);break}var a,p="";if(a=(e=f(t)).char,t=e.newChunk,e.err)return o;if(p=a,"-"===t[0]&&(p=(n=f(t.slice(1))).char,t=n.newChunk,n.err))return o;a<=i&&i<=p&&(s=!0),c++}if(s!==u)return o;break;case"?":r=r.slice(1),t=t.slice(1);break;case"\\":if(0===(t=t.slice(1)).length)return o.err=!0,o;default:if(t[0]!==r[0])return o;r=r.slice(1),t=t.slice(1)}}return o.t=r,o.ok=!0,o.err=!1,o}function f(t){var r={char:"",newChunk:"",err:!1};return 0===t.length||"-"===t[0]||"]"===t[0]||"\\"===t[0]&&0===(t=t.slice(1)).length?(r.err=!0,r):(r.char=t[0],r.newChunk=t.slice(1),0===r.newChunk.length&&(r.err=!0),r)}r.default=function(t,r){if(!r)throw new Error("No matcher supplied!");switch(r.type){case"all":return!0;case"fql":return function(t,r){if(!t)return!1;try{t=JSON.parse(t)}catch(r){throw new Error('Failed to JSON.parse FQL intermediate representation "'.concat(t,'": ').concat(r))}var e=i(t,r);if("boolean"!=typeof e)return!1;return e}(r.ir,t);default:throw new Error("Matcher of type ".concat(r.type," unsupported."))}}},1444:function(t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var e=function(){function t(t){this.rules=[],this.rules=t||[]}return t.prototype.getRulesByDestinationName=function(t){for(var r=[],e=0,n=this.rules;e<n.length;e++){var o=n[e];o.destinationName!==t&&void 0!==o.destinationName||r.push(o)}return r},t}();r.default=e},4303:function(t,r,e){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var o=n(e(2263)),i=n(e(7843)),u=n(e(5500)),s=e(2341),c=e(4966);function a(t,r){for(var e in r.drop)if(r.drop.hasOwnProperty(e)){var n=""===e?t:(0,i.default)(t,e);if("object"==typeof n&&null!==n)for(var o=0,u=r.drop[e];o<u.length;o++){delete n[u[o]]}}}function f(t,r){for(var e in r.allow)if(r.allow.hasOwnProperty(e)){var n=""===e?t:(0,i.default)(t,e);if("object"==typeof n&&null!==n)for(var o in n)n.hasOwnProperty(o)&&-1===r.allow[e].indexOf(o)&&delete n[o]}}function p(t,r){var e=JSON.parse(JSON.stringify(t));for(var n in r.map)if(r.map.hasOwnProperty(n)){var o=r.map[n],u=n.split("."),a=void 0;if(u.length>1?(u.pop(),a=(0,i.default)(e,u.join("."))):a=t,"object"==typeof a){if(o.copy){var f=(0,i.default)(e,o.copy);void 0!==f&&(0,s.dset)(t,n,f)}else if(o.move){var p=(0,i.default)(e,o.move);void 0!==p&&(0,s.dset)(t,n,p),(0,c.unset)(t,o.move)}else o.hasOwnProperty("set")&&(0,s.dset)(t,n,o.set);if(o.to_string){var l=(0,i.default)(t,n);if("string"==typeof l||"object"==typeof l&&null!==l)continue;void 0!==l?(0,s.dset)(t,n,JSON.stringify(l)):(0,s.dset)(t,n,"undefined")}}}}function l(t,r){return!(r.sample.percent<=0)&&(r.sample.percent>=1||(r.sample.path?function(t,r){var e=(0,i.default)(t,r.sample.path),n=(0,o.default)(JSON.stringify(e)),s=-64,c=[];v(n.slice(0,8),c);for(var a=0,f=0;f<64&&1!==c[f];f++)a++;if(0!==a){var p=[];v(n.slice(9,16),p),s-=a,c.splice(0,a),p.splice(64-a),c=c.concat(p)}return c[63]=0===c[63]?1:0,(0,u.default)(parseInt(c.join(""),2),s)<r.sample.percent}(t,r):(e=r.sample.percent,Math.random()<=e)));var e}function v(t,r){for(var e=0;e<8;e++)for(var n=t[e],o=128;o>=1;o/=2)n-o>=0?(n-=o,r.push(1)):r.push(0)}r.default=function(t,r){for(var e=t,n=0,o=r;n<o.length;n++){var i=o[n];switch(i.type){case"drop":return null;case"drop_properties":a(e,i.config);break;case"allow_properties":f(e,i.config);break;case"sample_event":if(l(e,i.config))break;return null;case"map_properties":p(e,i.config);break;case"hash_properties":break;default:throw new Error('Transformer of type "'.concat(i.type,'" is unsupported.'))}}return e}},4966:function(t,r,e){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.unset=void 0;var o=n(e(7843));r.unset=function(t,r){if((0,o.default)(t,r)){for(var e=r.split("."),n=e.pop();e.length&&"\\"===e[e.length-1].slice(-1);)n=e.pop().slice(0,-1)+"."+n;for(;e.length;)t=t[r=e.shift()];return delete t[n]}return!0}},3304:function(t){"use strict";var r="function"==typeof Float64Array?Float64Array:void 0;t.exports=r},7382:function(t,r,e){"use strict";var n,o=e(5569),i=e(3304),u=e(8482);n=o()?i:u,t.exports=n},8482:function(t){"use strict";t.exports=function(){throw new Error("not implemented")}},6322:function(t,r,e){"use strict";var n,o=e(2508),i=e(5679),u=e(882);n=o()?i:u,t.exports=n},882:function(t){"use strict";t.exports=function(){throw new Error("not implemented")}},5679:function(t){"use strict";var r="function"==typeof Uint16Array?Uint16Array:void 0;t.exports=r},4773:function(t,r,e){"use strict";var n,o=e(9773),i=e(3004),u=e(3078);n=o()?i:u,t.exports=n},3078:function(t){"use strict";t.exports=function(){throw new Error("not implemented")}},3004:function(t){"use strict";var r="function"==typeof Uint32Array?Uint32Array:void 0;t.exports=r},7980:function(t,r,e){"use strict";var n,o=e(8114),i=e(6737),u=e(3357);n=o()?i:u,t.exports=n},3357:function(t){"use strict";t.exports=function(){throw new Error("not implemented")}},6737:function(t){"use strict";var r="function"==typeof Uint8Array?Uint8Array:void 0;t.exports=r},2684:function(t){"use strict";var r="function"==typeof Float64Array?Float64Array:null;t.exports=r},5569:function(t,r,e){"use strict";var n=e(3876);t.exports=n},3876:function(t,r,e){"use strict";var n=e(1448),o=e(2684);t.exports=function(){var t,r;if("function"!=typeof o)return!1;try{r=new o([1,3.14,-3.14,NaN]),t=n(r)&&1===r[0]&&3.14===r[1]&&-3.14===r[2]&&r[3]!=r[3]}catch(r){t=!1}return t}},9048:function(t,r,e){"use strict";var n=e(3763);t.exports=n},3763:function(t){"use strict";var r=Object.prototype.hasOwnProperty;t.exports=function(t,e){return null!=t&&r.call(t,e)}},7009:function(t,r,e){"use strict";var n=e(6784);t.exports=n},6784:function(t){"use strict";t.exports=function(){return"function"==typeof Symbol&&"symbol"==typeof Symbol("foo")}},3123:function(t,r,e){"use strict";var n=e(8481);t.exports=n},8481:function(t,r,e){"use strict";var n=e(7009)();t.exports=function(){return n&&"symbol"==typeof Symbol.toStringTag}},2508:function(t,r,e){"use strict";var n=e(3403);t.exports=n},3403:function(t,r,e){"use strict";var n=e(768),o=e(9668),i=e(187);t.exports=function(){var t,r;if("function"!=typeof i)return!1;try{r=new i(r=[1,3.14,-3.14,o+1,o+2]),t=n(r)&&1===r[0]&&3===r[1]&&r[2]===o-2&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}},187:function(t){"use strict";var r="function"==typeof Uint16Array?Uint16Array:null;t.exports=r},9773:function(t,r,e){"use strict";var n=e(2822);t.exports=n},2822:function(t,r,e){"use strict";var n=e(2744),o=e(3899),i=e(746);t.exports=function(){var t,r;if("function"!=typeof i)return!1;try{r=new i(r=[1,3.14,-3.14,o+1,o+2]),t=n(r)&&1===r[0]&&3===r[1]&&r[2]===o-2&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}},746:function(t){"use strict";var r="function"==typeof Uint32Array?Uint32Array:null;t.exports=r},8114:function(t,r,e){"use strict";var n=e(8066);t.exports=n},8066:function(t,r,e){"use strict";var n=e(8279),o=e(3443),i=e(2731);t.exports=function(){var t,r;if("function"!=typeof i)return!1;try{r=new i(r=[1,3.14,-3.14,o+1,o+2]),t=n(r)&&1===r[0]&&3===r[1]&&r[2]===o-2&&0===r[3]&&1===r[4]}catch(r){t=!1}return t}},2731:function(t){"use strict";var r="function"==typeof Uint8Array?Uint8Array:null;t.exports=r},1448:function(t,r,e){"use strict";var n=e(1453);t.exports=n},1453:function(t,r,e){"use strict";var n=e(6208),o="function"==typeof Float64Array;t.exports=function(t){return o&&t instanceof Float64Array||"[object Float64Array]"===n(t)}},9331:function(t,r,e){"use strict";var n=e(7980),o={uint16:e(6322),uint8:n};t.exports=o},5902:function(t,r,e){"use strict";var n=e(4106);t.exports=n},4106:function(t,r,e){"use strict";var n,o,i=e(9331);(o=new i.uint16(1))[0]=4660,n=52===new i.uint8(o.buffer)[0],t.exports=n},768:function(t,r,e){"use strict";var n=e(3823);t.exports=n},3823:function(t,r,e){"use strict";var n=e(6208),o="function"==typeof Uint16Array;t.exports=function(t){return o&&t instanceof Uint16Array||"[object Uint16Array]"===n(t)}},2744:function(t,r,e){"use strict";var n=e(2326);t.exports=n},2326:function(t,r,e){"use strict";var n=e(6208),o="function"==typeof Uint32Array;t.exports=function(t){return o&&t instanceof Uint32Array||"[object Uint32Array]"===n(t)}},8279:function(t,r,e){"use strict";var n=e(208);t.exports=n},208:function(t,r,e){"use strict";var n=e(6208),o="function"==typeof Uint8Array;t.exports=function(t){return o&&t instanceof Uint8Array||"[object Uint8Array]"===n(t)}},6315:function(t){"use strict";t.exports=1023},3105:function(t){"use strict";t.exports=2146435072},6988:function(t){"use strict";t.exports=-1023},9777:function(t){"use strict";t.exports=1023},3690:function(t){"use strict";t.exports=-1074},2918:function(t,r,e){"use strict";var n=e(4772).NEGATIVE_INFINITY;t.exports=n},4165:function(t){"use strict";var r=Number.POSITIVE_INFINITY;t.exports=r},6488:function(t){"use strict";t.exports=22250738585072014e-324},9668:function(t){"use strict";t.exports=65535},3899:function(t){"use strict";t.exports=4294967295},3443:function(t){"use strict";t.exports=255},7011:function(t,r,e){"use strict";var n=e(812);t.exports=n},812:function(t,r,e){"use strict";var n=e(4165),o=e(2918);t.exports=function(t){return t===n||t===o}},1883:function(t,r,e){"use strict";var n=e(1797);t.exports=n},1797:function(t){"use strict";t.exports=function(t){return t!=t}},513:function(t,r,e){"use strict";var n=e(5760);t.exports=n},5760:function(t){"use strict";t.exports=function(t){return Math.abs(t)}},6871:function(t,r,e){"use strict";var n=e(7838),o=e(1921),i=e(2490),u=[0,0];t.exports=function(t,r){var e,s;return n(u,t),e=u[0],e&=2147483647,s=o(r),i(e|=s&=2147483648,u[1])}},5848:function(t,r,e){"use strict";var n=e(6871);t.exports=n},5500:function(t,r,e){"use strict";var n=e(8397);t.exports=n},8397:function(t,r,e){"use strict";var n=e(4165),o=e(2918),i=e(6315),u=e(9777),s=e(6988),c=e(3690),a=e(1883),f=e(7011),p=e(5848),l=e(4948),v=e(8478),y=e(7838),h=e(2490),d=[0,0],x=[0,0];t.exports=function(t,r){var e,g;return 0===t||a(t)||f(t)?t:(l(d,t),r+=d[1],(r+=v(t=d[0]))<c?p(0,t):r>u?t<0?o:n:(r<=s?(r+=52,g=2220446049250313e-31):g=1,y(x,t),e=x[0],e&=2148532223,g*h(e|=r+i<<20,x[1])))}},4772:function(t,r,e){"use strict";var n=e(7548);t.exports=n},7548:function(t){"use strict";t.exports=Number},8478:function(t,r,e){"use strict";var n=e(4500);t.exports=n},4500:function(t,r,e){"use strict";var n=e(1921),o=e(3105),i=e(6315);t.exports=function(t){var r=n(t);return(r=(r&o)>>>20)-i|0}},2490:function(t,r,e){"use strict";var n=e(9639);t.exports=n},4445:function(t,r,e){"use strict";var n,o,i;!0===e(5902)?(o=1,i=0):(o=0,i=1),n={HIGH:o,LOW:i},t.exports=n},9639:function(t,r,e){"use strict";var n=e(4773),o=e(7382),i=e(4445),u=new o(1),s=new n(u.buffer),c=i.HIGH,a=i.LOW;t.exports=function(t,r){return s[c]=t,s[a]=r,u[0]}},5646:function(t,r,e){"use strict";var n;n=!0===e(5902)?1:0,t.exports=n},1921:function(t,r,e){"use strict";var n=e(6285);t.exports=n},6285:function(t,r,e){"use strict";var n=e(4773),o=e(7382),i=e(5646),u=new o(1),s=new n(u.buffer);t.exports=function(t){return u[0]=t,s[i]}},4948:function(t,r,e){"use strict";var n=e(9422);t.exports=n},9422:function(t,r,e){"use strict";var n=e(8857);t.exports=function(t,r){return 1===arguments.length?n([0,0],t):n(t,r)}},8857:function(t,r,e){"use strict";var n=e(6488),o=e(7011),i=e(1883),u=e(513);t.exports=function(t,r){return i(r)||o(r)?(t[0]=r,t[1]=0,t):0!==r&&u(r)<n?(t[0]=4503599627370496*r,t[1]=-52,t):(t[0]=r,t[1]=0,t)}},7838:function(t,r,e){"use strict";var n=e(4010);t.exports=n},5782:function(t,r,e){"use strict";var n,o,i;!0===e(5902)?(o=1,i=0):(o=0,i=1),n={HIGH:o,LOW:i},t.exports=n},4010:function(t,r,e){"use strict";var n=e(4903);t.exports=function(t,r){return 1===arguments.length?n([0,0],t):n(t,r)}},4903:function(t,r,e){"use strict";var n=e(4773),o=e(7382),i=e(5782),u=new o(1),s=new n(u.buffer),c=i.HIGH,a=i.LOW;t.exports=function(t,r){return u[0]=r,t[0]=s[c],t[1]=s[a],t}},6208:function(t,r,e){"use strict";var n,o=e(3123),i=e(7407),u=e(4210);n=o()?u:i,t.exports=n},7407:function(t,r,e){"use strict";var n=e(173);t.exports=function(t){return n.call(t)}},4210:function(t,r,e){"use strict";var n=e(9048),o=e(1403),i=e(173);t.exports=function(t){var r,e,u;if(null==t)return i.call(t);e=t[o],r=n(t,o);try{t[o]=void 0}catch(r){return i.call(t)}return u=i.call(t),r?t[o]=e:delete t[o],u}},173:function(t){"use strict";var r=Object.prototype.toString;t.exports=r},1403:function(t){"use strict";var r="function"==typeof Symbol?Symbol.toStringTag:"";t.exports=r},7843:function(t){t.exports=function(t,r,e,n,o){for(r=r.split?r.split("."):r,n=0;n<r.length;n++)t=t?t[r[n]]:o;return t===o?e:t}},2341:function(t,r){r.dset=function(t,r,e){r.split&&(r=r.split("."));for(var n,o,i=0,u=r.length,s=t;i<u&&"__proto__"!==(o=r[i++])&&"constructor"!==o&&"prototype"!==o;)s=s[o]=i===u?e:typeof(n=s[o])==typeof r?n:0*r[i]!=0||~(""+r[i]).indexOf(".")?{}:[]}},2263:function(t,r,e){"use strict";e.r(r),e.d(r,{default:function(){return i}});for(var n=[],o=0;o<64;)n[o]=0|4294967296*Math.sin(++o%Math.PI);function i(t){var r,e,i,u=[r=1732584193,e=4023233417,~r,~e],s=[],c=unescape(encodeURI(t))+"",a=c.length;for(t=--a/4+2|15,s[--t]=8*a;~a;)s[a>>2]|=c.charCodeAt(a)<<8*a--;for(o=c=0;o<t;o+=16){for(a=u;c<64;a=[i=a[3],r+((i=a[0]+[r&e|~r&i,i&r|~i&e,r^e^i,e^(r|~i)][a=c>>4]+n[c]+~~s[o|15&[c,5*c+1,3*c+5,7*c][a]])<<(a=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*a+c++%4])|i>>>-a),r,e])r=0|a[1],e=a[2];for(c=4;c;)u[--c]+=a[c]}for(t="";c<32;)t+=(u[c>>3]>>4*(1^c++)&15).toString(16);return t}}}]);
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_customerio_cdp_analytics_browser=self.webpackChunk_customerio_cdp_analytics_browser||[]).push([[464],{9254:function(t,n,i){"use strict";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,{n:function(){return e}})},3162:function(t,n,i){"use strict";i.r(n),i.d(n,{LegacyDestination:function(){return k},ajsDestinations:function(){return G}});var e=i(5163),r=i(4122),o=i(94),s=i(8404),a=i(1494),u=i(204),c=i(6096),l=i(9254),d=i(5944),h=i(8044),f=i(3098),v=i(3061),p=i(6338),g=i(7566),m=i(7070);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.mG)(this,void 0,Promise,(function(){var o,s,a,u,c,l;return(0,e.Jh)(this,(function(d){switch(d.label){case 0:o=y(n),s=w(o,r),a=(0,g.Kg)(),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.v)(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.ev)([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.v)(a+t+".gz")})))];case 5:return d.sent(),window["".concat(o,"Loader")](),[2,window["".concat(o,"Integration")]]}}))}))}var _=i(7595);function P(t,n){return(0,e.mG)(this,void 0,Promise,(function(){var i,r=this;return(0,e.Jh)(this,(function(a){switch(a.label){case 0:return i=[],(0,o.s)()?[2,n]:[4,(0,h.x)((function(){return n.length>0&&(0,o.G)()}),(function(){return(0,e.mG)(r,void 0,void 0,(function(){var r,o;return(0,e.Jh)(this,(function(e){switch(e.label){case 0:return(r=n.pop())?[4,(0,c.a)(r,t)]:[2];case 1:return o=e.sent(),o instanceof s._||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.pi)({},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.Z(4,[]):new v.$(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.mG)(this,void 0,Promise,(function(){var r,o,s=this;return(0,e.Jh)(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.mG)(this,void 0,Promise,(function(){var r,o,s,a;return(0,e.Jh)(this,(function(e){return r=(0,g.Kg)(),o=y(t),s=w(t,i),a="".concat(r,"/").concat(null!=s?s:o,".js?version=").concat(n),[2,(0,m.t)(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.s)()||!1===this._ready||!1===this._initialized)},t.prototype.send=function(t,n,i){var r,o;return(0,e.mG)(this,void 0,Promise,(function(){var s,u,c,d,h,f;return(0,e.Jh)(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.n)(s,c))return t.updateEvent("integrations",(0,e.pi)((0,e.pi)({},t.event.integrations),{All:!1,"Customer.io Data Pipelines":!0})),t.cancel(new a.Y({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.pi)((0,e.pi)({},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.Y({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.mG)(this,void 0,Promise,(function(){return(0,e.Jh)(this,(function(n){return[2,this.send(t,r.Track,"track")]}))}))},t.prototype.page=function(t){var n;return(0,e.mG)(this,void 0,Promise,(function(){var i=this;return(0,e.Jh)(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.mG)(this,void 0,Promise,(function(){return(0,e.Jh)(this,(function(n){return[2,this.send(t,r.Identify,"identify")]}))}))},t.prototype.alias=function(t){return(0,e.mG)(this,void 0,Promise,(function(){return(0,e.Jh)(this,(function(n){return[2,this.send(t,r.Alias,"alias")]}))}))},t.prototype.group=function(t){return(0,e.mG)(this,void 0,Promise,(function(){return(0,e.Jh)(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.mG)(t,void 0,void 0,(function(){var t;return(0,e.Jh)(this,(function(n){switch(n.label){case 0:return this.flushing=!0,t=this,[4,P(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 G(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.o)(t,null!=i?i:{}),v=null==o?void 0:o.reduce((function(t,n){var i;return(0,e.pi)((0,e.pi)({},t),((i={})[function(t){return("Integration"in t?t.Integration:t).prototype.name}(n)]=n,i))}),{}),p=new Set((0,e.ev)((0,e.ev)([],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,_.PO)(l[t])||(0,_.PO)(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}))}},7595:function(t,n,i){"use strict";function e(t){return"object"===Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}i.d(n,{PO:function(){return e}})}}]);
|
|
Binary file
|