@qualified-salesforce/web 0.0.1-oidc-bootstrap
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/41842993ec71d6628e4949e9a22b146b.svg +3 -0
- package/7271f3433ed82fc7f56adcd9e30275f4.svg +17 -0
- package/LICENSE.txt +82 -0
- package/components/helpers/entriesStringValidations.js +69 -0
- package/components/helpers/languages.js +32 -0
- package/components/shared/assertUnreachable.js +5 -0
- package/components/shared/controls/imageCropperHelpers.js +43 -0
- package/components/shared/meetingLoadingProgressSpec.js +116 -0
- package/constants.generated.js +9883 -0
- package/css/widget/multimodal_v2/host.split-css.css +162 -0
- package/css/widget/multimodal_v2/index.split-css.panda.css +5240 -0
- package/css/widget/widget.split-css.css +100 -0
- package/fonts/inter/Inter-Black.woff +0 -0
- package/fonts/inter/Inter-Black.woff2 +0 -0
- package/fonts/inter/Inter-BlackItalic.woff +0 -0
- package/fonts/inter/Inter-BlackItalic.woff2 +0 -0
- package/fonts/inter/Inter-Bold.woff +0 -0
- package/fonts/inter/Inter-Bold.woff2 +0 -0
- package/fonts/inter/Inter-BoldItalic.woff +0 -0
- package/fonts/inter/Inter-BoldItalic.woff2 +0 -0
- package/fonts/inter/Inter-ExtraBold.woff +0 -0
- package/fonts/inter/Inter-ExtraBold.woff2 +0 -0
- package/fonts/inter/Inter-ExtraBoldItalic.woff +0 -0
- package/fonts/inter/Inter-ExtraBoldItalic.woff2 +0 -0
- package/fonts/inter/Inter-ExtraLight.woff +0 -0
- package/fonts/inter/Inter-ExtraLight.woff2 +0 -0
- package/fonts/inter/Inter-ExtraLightItalic.woff +0 -0
- package/fonts/inter/Inter-ExtraLightItalic.woff2 +0 -0
- package/fonts/inter/Inter-Italic.woff +0 -0
- package/fonts/inter/Inter-Italic.woff2 +0 -0
- package/fonts/inter/Inter-Light.woff +0 -0
- package/fonts/inter/Inter-Light.woff2 +0 -0
- package/fonts/inter/Inter-LightItalic.woff +0 -0
- package/fonts/inter/Inter-LightItalic.woff2 +0 -0
- package/fonts/inter/Inter-Medium.woff +0 -0
- package/fonts/inter/Inter-Medium.woff2 +0 -0
- package/fonts/inter/Inter-MediumItalic.woff +0 -0
- package/fonts/inter/Inter-MediumItalic.woff2 +0 -0
- package/fonts/inter/Inter-Regular.woff +0 -0
- package/fonts/inter/Inter-Regular.woff2 +0 -0
- package/fonts/inter/Inter-SemiBold.woff +0 -0
- package/fonts/inter/Inter-SemiBold.woff2 +0 -0
- package/fonts/inter/Inter-SemiBoldItalic.woff +0 -0
- package/fonts/inter/Inter-SemiBoldItalic.woff2 +0 -0
- package/fonts/inter/Inter-Thin.woff +0 -0
- package/fonts/inter/Inter-Thin.woff2 +0 -0
- package/fonts/inter/Inter-ThinItalic.woff +0 -0
- package/fonts/inter/Inter-ThinItalic.woff2 +0 -0
- package/fonts/inter/Inter-italic.var.woff2 +0 -0
- package/fonts/inter/Inter-roman.var.woff2 +0 -0
- package/images/close.js +63 -0
- package/images/logo.js +22 -0
- package/js/4101.js +19721 -0
- package/js/daily-esm.js +9948 -0
- package/js/date-fns.js +427 -0
- package/js/multimodal_v2.js +1653 -0
- package/js/runtime.js +109 -0
- package/media/Inter-Black.796be8d8bf.woff2 +0 -0
- package/media/Inter-Black.b254104c56.woff +0 -0
- package/media/Inter-BlackItalic.70306b0eae.woff +0 -0
- package/media/Inter-BlackItalic.752f1e0aaa.woff2 +0 -0
- package/media/Inter-Bold.579e0f95ca.woff2 +0 -0
- package/media/Inter-Bold.b1234477a5.woff +0 -0
- package/media/Inter-BoldItalic.3d0d804323.woff +0 -0
- package/media/Inter-BoldItalic.828a494e04.woff2 +0 -0
- package/media/Inter-ExtraBold.208a9e6c99.woff +0 -0
- package/media/Inter-ExtraBold.d65f028165.woff2 +0 -0
- package/media/Inter-ExtraBoldItalic.30429962ec.woff +0 -0
- package/media/Inter-ExtraBoldItalic.8c7eac5ce3.woff2 +0 -0
- package/media/Inter-ExtraLight.15c082a57d.woff +0 -0
- package/media/Inter-ExtraLight.6824177d1e.woff2 +0 -0
- package/media/Inter-ExtraLightItalic.05138dddf3.woff2 +0 -0
- package/media/Inter-ExtraLightItalic.3beee54f59.woff +0 -0
- package/media/Inter-Italic.9beab78452.woff +0 -0
- package/media/Inter-Italic.d593a8df79.woff2 +0 -0
- package/media/Inter-Light.27083fa637.woff2 +0 -0
- package/media/Inter-Light.91dfddd842.woff +0 -0
- package/media/Inter-LightItalic.0a783b89b3.woff2 +0 -0
- package/media/Inter-LightItalic.f8ccf2813f.woff +0 -0
- package/media/Inter-Medium.dc792b508e.woff2 +0 -0
- package/media/Inter-Medium.ec7dd2d9d8.woff +0 -0
- package/media/Inter-MediumItalic.17301e5b40.woff +0 -0
- package/media/Inter-MediumItalic.84d3493a9f.woff2 +0 -0
- package/media/Inter-Regular.f1f0c35b32.woff2 +0 -0
- package/media/Inter-Regular.f356e84aa0.woff +0 -0
- package/media/Inter-SemiBold.55027e4724.woff +0 -0
- package/media/Inter-SemiBold.fcb100c760.woff2 +0 -0
- package/media/Inter-SemiBoldItalic.ab9105ed3b.woff +0 -0
- package/media/Inter-SemiBoldItalic.d90f295d0c.woff2 +0 -0
- package/media/Inter-Thin.16325d9b0f.woff +0 -0
- package/media/Inter-Thin.dafaa44d99.woff2 +0 -0
- package/media/Inter-ThinItalic.4fc662b3cf.woff2 +0 -0
- package/media/Inter-ThinItalic.d3d8994788.woff +0 -0
- package/media/Inter-italic.var.958a0b9742.woff2 +0 -0
- package/media/Inter-roman.var.b2129c009c.woff2 +0 -0
- package/package.json +20 -0
- package/packs/widget/api/docking/docking_host.js +97 -0
- package/packs/widget/api/docking/index.js +294 -0
- package/packs/widget/api/docking/shared.js +164 -0
- package/packs/widget/api/docking/viewport_lock.js +488 -0
- package/packs/widget/api/docking/viewport_resize.js +1203 -0
- package/packs/widget/esm/fonts/Inter-Black.796be8d8bf.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Black.b254104c56.woff +0 -0
- package/packs/widget/esm/fonts/Inter-BlackItalic.70306b0eae.woff +0 -0
- package/packs/widget/esm/fonts/Inter-BlackItalic.752f1e0aaa.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Bold.579e0f95ca.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Bold.b1234477a5.woff +0 -0
- package/packs/widget/esm/fonts/Inter-BoldItalic.3d0d804323.woff +0 -0
- package/packs/widget/esm/fonts/Inter-BoldItalic.828a494e04.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraBold.208a9e6c99.woff +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraBold.d65f028165.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraBoldItalic.30429962ec.woff +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraBoldItalic.8c7eac5ce3.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraLight.15c082a57d.woff +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraLight.6824177d1e.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraLightItalic.05138dddf3.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraLightItalic.3beee54f59.woff +0 -0
- package/packs/widget/esm/fonts/Inter-Italic.9beab78452.woff +0 -0
- package/packs/widget/esm/fonts/Inter-Italic.d593a8df79.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Light.27083fa637.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Light.91dfddd842.woff +0 -0
- package/packs/widget/esm/fonts/Inter-LightItalic.0a783b89b3.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-LightItalic.f8ccf2813f.woff +0 -0
- package/packs/widget/esm/fonts/Inter-Medium.dc792b508e.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Medium.ec7dd2d9d8.woff +0 -0
- package/packs/widget/esm/fonts/Inter-MediumItalic.17301e5b40.woff +0 -0
- package/packs/widget/esm/fonts/Inter-MediumItalic.84d3493a9f.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Regular.f1f0c35b32.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Regular.f356e84aa0.woff +0 -0
- package/packs/widget/esm/fonts/Inter-SemiBold.55027e4724.woff +0 -0
- package/packs/widget/esm/fonts/Inter-SemiBold.fcb100c760.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-SemiBoldItalic.ab9105ed3b.woff +0 -0
- package/packs/widget/esm/fonts/Inter-SemiBoldItalic.d90f295d0c.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Thin.16325d9b0f.woff +0 -0
- package/packs/widget/esm/fonts/Inter-Thin.dafaa44d99.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ThinItalic.4fc662b3cf.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ThinItalic.d3d8994788.woff +0 -0
- package/packs/widget/esm/fonts/Inter-italic.var.958a0b9742.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-roman.var.b2129c009c.woff2 +0 -0
- package/packs/widget/esm/index.js +183 -0
- package/packs/widget/esm/qualified.css +5502 -0
- package/routes/app/offers/scripts/OfferMainScript.js +154 -0
- package/routes/app/offers/scripts/constants.js +71 -0
- package/routes/app/offers/scripts/main/ButtonManager.js +65 -0
- package/routes/app/offers/scripts/main/FormManager.js +325 -0
- package/routes/app/offers/scripts/main/MainContext.js +19 -0
- package/routes/app/offers/scripts/main/OfferManager.js +91 -0
- package/routes/app/offers/scripts/main/TriggerManager.js +125 -0
- package/routes/app/offers/scripts/rendering/ContentManager.js +53 -0
- package/routes/app/offers/scripts/rendering/LocationManager.js +83 -0
- package/routes/app/offers/scripts/rendering/RenderedOffer.js +188 -0
- package/routes/app/offers/scripts/rendering/Renderer.js +69 -0
- package/routes/app/offers/scripts/rendering/RenderingInitializer.js +62 -0
- package/routes/app/offers/scripts/rendering/animations/AnimationManager.js +31 -0
- package/routes/app/offers/scripts/rendering/animations/AnimationManagerFooter.js +81 -0
- package/routes/app/offers/scripts/rendering/animations/AnimationManagerHeader.js +81 -0
- package/routes/app/offers/scripts/rendering/animations/AnimationManagerModal.js +117 -0
- package/routes/app/offers/scripts/rendering/animations/AnimationManagerSidebar.js +75 -0
- package/routes/app/offers/scripts/rendering/animations/AnimationResult.js +43 -0
- package/routes/app/offers/scripts/rendering/animations/Animator.js +78 -0
- package/routes/app/offers/scripts/rendering/animations/BaseAnimationManager.js +25 -0
- package/routes/app/offers/scripts/rendering/lib/BaseComponent.js +106 -0
- package/routes/app/offers/scripts/rendering/lib/FormComponent.js +134 -0
- package/routes/app/offers/scripts/rendering/lib/OfferComponent.js +144 -0
- package/routes/app/offers/scripts/rendering/lib/ScrollbarWidth.js +27 -0
- package/routes/app/offers/scripts/rendering/lib/decorators.js +20 -0
- package/routes/app/offers/scripts/rendering/locations/CSSVarsManager.js +66 -0
- package/routes/app/offers/scripts/rendering/locations/ElementResizeObserver.js +49 -0
- package/routes/app/offers/scripts/rendering/locations/footer.js +53 -0
- package/routes/app/offers/scripts/rendering/locations/header/AsyncBatchProcessor.js +70 -0
- package/routes/app/offers/scripts/rendering/locations/header/CSSTransitionObserver.js +182 -0
- package/routes/app/offers/scripts/rendering/locations/header/ElementStyleChangeObserver.js +138 -0
- package/routes/app/offers/scripts/rendering/locations/header/ExternalStyleManager.js +110 -0
- package/routes/app/offers/scripts/rendering/locations/header/Header.js +353 -0
- package/routes/app/offers/scripts/rendering/locations/header/InlineStyleManager.js +105 -0
- package/routes/app/offers/scripts/rendering/locations/header/MatchingElementsObserver.js +107 -0
- package/routes/app/offers/scripts/rendering/locations/header/NewElementsObserver.js +129 -0
- package/routes/app/offers/scripts/rendering/locations/header/RuleWrapper.js +46 -0
- package/routes/app/offers/scripts/rendering/locations/header/SelectorObservable.js +23 -0
- package/routes/app/offers/scripts/rendering/locations/header/SelectorObserver.js +61 -0
- package/routes/app/offers/scripts/rendering/locations/header/ShiftedElementsManager.js +45 -0
- package/routes/app/offers/scripts/rendering/locations/header/StyleElementManager.js +37 -0
- package/routes/app/offers/scripts/rendering/locations/header/StyleElementWrapper.js +62 -0
- package/routes/app/offers/scripts/rendering/locations/header/StyleSelectorObserver/ObservedSelectorValue.js +45 -0
- package/routes/app/offers/scripts/rendering/locations/header/StyleSelectorObserver/ObservedSelectors.js +62 -0
- package/routes/app/offers/scripts/rendering/locations/header/StyleSelectorObserver/StyleSelectorObserver.js +294 -0
- package/routes/app/offers/scripts/rendering/locations/header/StyleSelectorObserver/constants.js +21 -0
- package/routes/app/offers/scripts/rendering/locations/header/WindowResizeObserver.js +43 -0
- package/routes/app/offers/scripts/rendering/locations/header/utils.js +25 -0
- package/routes/app/offers/scripts/rendering/locations/popup.js +66 -0
- package/routes/app/offers/scripts/rendering/locations/sidebar.js +21 -0
- package/routes/app/offers/scripts/rendering/variations/ButtonBanner.js +105 -0
- package/routes/app/offers/scripts/rendering/variations/ButtonModal.js +114 -0
- package/routes/app/offers/scripts/rendering/variations/FormBanner.js +214 -0
- package/routes/app/offers/scripts/rendering/variations/FormModal.js +325 -0
- package/routes/app/offers/scripts/rendering/variations/LinkBanner.js +105 -0
- package/routes/app/offers/scripts/rendering/variations/components/Body.js +29 -0
- package/routes/app/offers/scripts/rendering/variations/components/Button.js +128 -0
- package/routes/app/offers/scripts/rendering/variations/components/DismissButton.js +39 -0
- package/routes/app/offers/scripts/rendering/variations/components/ForegroundImageBanner.js +110 -0
- package/routes/app/offers/scripts/rendering/variations/components/ForegroundImageModal.js +128 -0
- package/routes/app/offers/scripts/rendering/variations/components/Headline.js +94 -0
- package/routes/app/offers/scripts/rendering/variations/components/MultiFieldForm.js +302 -0
- package/routes/app/offers/scripts/rendering/variations/components/Tooltip.js +74 -0
- package/routes/app/offers/scripts/rendering/variations/icons.js +15 -0
- package/routes/app/offers/scripts/utils.js +115 -0
- package/routes/app/offers/utils/HTMLUtils.js +10 -0
- package/routes/app/offers/utils/createTypeGuard.js +32 -0
- package/routes/app/offers/utils/promise-utils.js +22 -0
- package/routes/app/websiteBuilder/stores/storeHelpers.js +18 -0
- package/sounds/message-initial.mp3 +0 -0
- package/sounds/message-received.mp3 +0 -0
- package/sounds/message-sent.mp3 +0 -0
- package/src/arrays.js +15 -0
- package/src/audio.js +106 -0
- package/src/bounded-set.js +16 -0
- package/src/bounding_box_observer.js +129 -0
- package/src/decorators.js +29 -0
- package/src/dom.js +128 -0
- package/src/dom_roots.js +26 -0
- package/src/embedded_forms/EmbeddedForm.js +638 -0
- package/src/embedded_forms/QualifiedEmbeddedForm.js +51 -0
- package/src/embedded_forms/QualifiedFormField.js +137 -0
- package/src/embedded_forms/utils.js +17 -0
- package/src/graphql-types.js +1686 -0
- package/src/iframes.js +86 -0
- package/src/localstorage.js +43 -0
- package/src/mirror/Shipper.js +133 -0
- package/src/mirror/constants.generated.js +13 -0
- package/src/mirror/constants.js +238 -0
- package/src/mirror/shipper/ChangeQueue.js +155 -0
- package/src/mirror/shipper/DOMSerializer.js +392 -0
- package/src/mirror/shipper/observers.js +441 -0
- package/src/mirror/shipper/utils.js +98 -0
- package/src/mixins/disposable.js +125 -0
- package/src/mixins/injectable.js +37 -0
- package/src/personalizations/personalization-manager.js +110 -0
- package/src/personalizations/strategies/node-freezing-strategy.js +174 -0
- package/src/personalizations/utils.js +187 -0
- package/src/promises.js +107 -0
- package/src/proxy.js +144 -0
- package/src/qualified_root.js +35 -0
- package/src/query_params.js +55 -0
- package/src/shadow-dom-helper.js +63 -0
- package/src/singleton_host.js +39 -0
- package/src/smart_website/trigger.js +49 -0
- package/src/smart_website/utils.js +149 -0
- package/src/string.js +53 -0
- package/src/timezone.js +57 -0
- package/src/timing.js +49 -0
- package/src/type-utils.js +76 -0
- package/src/url-utils.js +102 -0
- package/src/url.js +50 -0
- package/src/utils.js +72 -0
- package/src/validation.js.js +29 -0
- package/src/validation_ts.js +6 -0
- package/vendor/actioncable/adapters.js +6 -0
- package/vendor/actioncable/connection.js +204 -0
- package/vendor/actioncable/connection_monitor.js +129 -0
- package/vendor/actioncable/consumer.js +91 -0
- package/vendor/actioncable/index.js +34 -0
- package/vendor/actioncable/internal.js +22 -0
- package/vendor/actioncable/logger.js +28 -0
- package/vendor/actioncable/subscription.js +93 -0
- package/vendor/actioncable/subscriptions.js +89 -0
- package/vendor/open-telemetry-idgenerator.js +43 -0
- package/widget/analytics/facebook_tracker.js +8 -0
- package/widget/analytics/google_analytics_tracker.js +83 -0
- package/widget/analytics/google_tag_manager_tracker.js +22 -0
- package/widget/analytics.js +58 -0
- package/widget/api_handler/api_handler.js +730 -0
- package/widget/api_handler/base_api_handler.js +249 -0
- package/widget/booker_intent_tracker.js +391 -0
- package/widget/booker_outcome_tracker.js +329 -0
- package/widget/capture_widget_exceptions.js +150 -0
- package/widget/channel.js +282 -0
- package/widget/composite_experience_adapter.js +101 -0
- package/widget/constants.generated.js +350 -0
- package/widget/constants.js +21 -0
- package/widget/container.js +193 -0
- package/widget/content_activity_emitter.js +36 -0
- package/widget/data360_visitor.js +67 -0
- package/widget/date_provider.js +11 -0
- package/widget/debug_mode_state.js +175 -0
- package/widget/dummy_module.js +9 -0
- package/widget/eloqua_visitor.js +17 -0
- package/widget/form_cta_booker_intent.js +246 -0
- package/widget/hubspot_visitor.js +39 -0
- package/widget/inline_meeting_booker_page.js +90 -0
- package/widget/local_state/abstract_local_state.js +38 -0
- package/widget/local_state/debug_state/abstract_debug_flow.js +29 -0
- package/widget/local_state/debug_state/custom_form_flow.js +14 -0
- package/widget/local_state/debug_state/hubspot_form_flow.js +19 -0
- package/widget/local_state/debug_state/hubspot_v4_form_flow.js +19 -0
- package/widget/local_state/debug_state/marketo_form_flow.js +20 -0
- package/widget/local_state/debug_state/pardot_form_flow.js +18 -0
- package/widget/local_state/debug_state.js +362 -0
- package/widget/local_state/trace_state.js +20 -0
- package/widget/location_provider.js +9 -0
- package/widget/marketo_visitor.js +39 -0
- package/widget/meetings/tracing/buttons_forms_triggering_tracer.js +124 -0
- package/widget/meetings/tracing/spans/button_spans.js +18 -0
- package/widget/meetings/tracing/spans/form_spans.js +11 -0
- package/widget/multimodal_v2/assets_preloader.js +97 -0
- package/widget/multimodal_v2/components/AppLayout.js +93 -0
- package/widget/multimodal_v2/components/CursorOverlay.js +93 -0
- package/widget/multimodal_v2/components/PointerRectOverlay.js +74 -0
- package/widget/multimodal_v2/components/app/Artifact.js +109 -0
- package/widget/multimodal_v2/components/app/Background.js +27 -0
- package/widget/multimodal_v2/components/app/CalendarLoadingContent.js +255 -0
- package/widget/multimodal_v2/components/app/Chat.js +39 -0
- package/widget/multimodal_v2/components/app/CookieConsentModal.js +149 -0
- package/widget/multimodal_v2/components/app/Foreground.js +48 -0
- package/widget/multimodal_v2/components/app/HiddenInput.js +41 -0
- package/widget/multimodal_v2/components/app/Input.js +72 -0
- package/widget/multimodal_v2/components/app/LightboxExperience.js +769 -0
- package/widget/multimodal_v2/components/app/LoadingOverlay.js +97 -0
- package/widget/multimodal_v2/components/app/Main.js +985 -0
- package/widget/multimodal_v2/components/app/MessengerButton.js +160 -0
- package/widget/multimodal_v2/components/app/Multimodal.js +17 -0
- package/widget/multimodal_v2/components/app/OverlayControls.js +79 -0
- package/widget/multimodal_v2/components/app/Preview.js +32 -0
- package/widget/multimodal_v2/components/app/PrivacyDisclosure.js +57 -0
- package/widget/multimodal_v2/components/app/RotateDeviceOverlay.js +70 -0
- package/widget/multimodal_v2/components/app/Toolbar.js +156 -0
- package/widget/multimodal_v2/components/chat/ChatComposer.js +129 -0
- package/widget/multimodal_v2/components/chat/ChatInputForm.js +398 -0
- package/widget/multimodal_v2/components/chat/ColdStartQuestions.js +354 -0
- package/widget/multimodal_v2/components/chat/ComposerErrorBanner.js +62 -0
- package/widget/multimodal_v2/components/chat/PostCallSurvey.js +359 -0
- package/widget/multimodal_v2/components/chat/preview/FieldRequestRenderer.js +41 -0
- package/widget/multimodal_v2/components/chat/preview/PreviewMessageRenderer.js +60 -0
- package/widget/multimodal_v2/components/chat/preview/SharedOfferRenderer.js +143 -0
- package/widget/multimodal_v2/components/chat/preview/TextRenderer.js +27 -0
- package/widget/multimodal_v2/components/chat/preview/TimelinePreview.js +254 -0
- package/widget/multimodal_v2/components/chat/timeline/CalendarEventOfferRenderer.js +103 -0
- package/widget/multimodal_v2/components/chat/timeline/CalendarEventPickRenderer.js +148 -0
- package/widget/multimodal_v2/components/chat/timeline/FieldEntryRenderer.js +84 -0
- package/widget/multimodal_v2/components/chat/timeline/FieldRequestRenderer.js +56 -0
- package/widget/multimodal_v2/components/chat/timeline/InlinePrivacyDisclosure.js +66 -0
- package/widget/multimodal_v2/components/chat/timeline/LinkPreviewCard.js +70 -0
- package/widget/multimodal_v2/components/chat/timeline/MessageEntry.js +88 -0
- package/widget/multimodal_v2/components/chat/timeline/PresentContentRenderer.js +30 -0
- package/widget/multimodal_v2/components/chat/timeline/PresentDeckRenderer.js +279 -0
- package/widget/multimodal_v2/components/chat/timeline/PresentVideoRenderer.js +131 -0
- package/widget/multimodal_v2/components/chat/timeline/ShareContentRenderer.js +59 -0
- package/widget/multimodal_v2/components/chat/timeline/SharedOfferRenderer.js +131 -0
- package/widget/multimodal_v2/components/chat/timeline/SystemRenderer.js +82 -0
- package/widget/multimodal_v2/components/chat/timeline/TextRenderer.js +66 -0
- package/widget/multimodal_v2/components/chat/timeline/Timeline.js +158 -0
- package/widget/multimodal_v2/components/debug/DebugMultimodalPanel.js +327 -0
- package/widget/multimodal_v2/components/decks/index.js +160 -0
- package/widget/multimodal_v2/components/field_request/BooleanField.js +77 -0
- package/widget/multimodal_v2/components/field_request/FieldComponents.js +69 -0
- package/widget/multimodal_v2/components/field_request/Form.js +87 -0
- package/widget/multimodal_v2/components/field_request/MultiPicklistField.js +240 -0
- package/widget/multimodal_v2/components/field_request/PicklistField.js +166 -0
- package/widget/multimodal_v2/components/field_request/SingleLineInputField.js +69 -0
- package/widget/multimodal_v2/components/field_request/TextField.js +37 -0
- package/widget/multimodal_v2/components/field_request/index.js +170 -0
- package/widget/multimodal_v2/components/helpers/AutoScroll.js +37 -0
- package/widget/multimodal_v2/components/helpers/ErrorBoundary.js +53 -0
- package/widget/multimodal_v2/components/helpers/FocusTrapDialog.js +26 -0
- package/widget/multimodal_v2/components/helpers/ImpressionTracker.js +94 -0
- package/widget/multimodal_v2/components/helpers/ListRenderer.js +37 -0
- package/widget/multimodal_v2/components/helpers/Localization.js +76 -0
- package/widget/multimodal_v2/components/helpers/Persisted.js +166 -0
- package/widget/multimodal_v2/components/helpers/RichText.js +358 -0
- package/widget/multimodal_v2/components/helpers/ScreenReaderHeading.js +17 -0
- package/widget/multimodal_v2/components/helpers/Thumbnail.js +190 -0
- package/widget/multimodal_v2/components/helpers/VisuallyHidden.js +41 -0
- package/widget/multimodal_v2/components/helpers/content_click_payloads.js +58 -0
- package/widget/multimodal_v2/components/helpers/useDraggable.js +103 -0
- package/widget/multimodal_v2/components/helpers/useTextOverflow.js +44 -0
- package/widget/multimodal_v2/components/lightbox_gather/index.js +741 -0
- package/widget/multimodal_v2/components/meetings/ArtifactEntryPoint.js +252 -0
- package/widget/multimodal_v2/components/meetings/MeetingAdditionalAttendees.js +325 -0
- package/widget/multimodal_v2/components/meetings/MeetingBookerEntry.js +100 -0
- package/widget/multimodal_v2/components/meetings/MeetingDetailsCard.js +99 -0
- package/widget/multimodal_v2/components/meetings/MeetingErrorBanner.js +62 -0
- package/widget/multimodal_v2/components/meetings/MeetingOfferEmailStep.js +239 -0
- package/widget/multimodal_v2/components/meetings/MeetingOfferFooter.js +104 -0
- package/widget/multimodal_v2/components/meetings/MeetingOfferSelectionStep.js +60 -0
- package/widget/multimodal_v2/components/meetings/MeetingRepHeader.js +222 -0
- package/widget/multimodal_v2/components/meetings/MeetingStepShell.js +92 -0
- package/widget/multimodal_v2/components/meetings/MeetingSummaryRail.js +515 -0
- package/widget/multimodal_v2/components/meetings/MeetingTimeSelector.js +603 -0
- package/widget/multimodal_v2/components/meetings/MonthDatePicker.js +422 -0
- package/widget/multimodal_v2/components/meetings/NavigationButtons.js +76 -0
- package/widget/multimodal_v2/components/meetings/TimeSlotHeader.js +357 -0
- package/widget/multimodal_v2/components/meetings/WeekViewHeader.js +20 -0
- package/widget/multimodal_v2/components/meetings/constants.js +7 -0
- package/widget/multimodal_v2/components/meetings/index.js +47 -0
- package/widget/multimodal_v2/components/meetings/utils.js +328 -0
- package/widget/multimodal_v2/components/multimodal/Audio.js +28 -0
- package/widget/multimodal_v2/components/multimodal/Controls.js +188 -0
- package/widget/multimodal_v2/components/multimodal/LiveVideo.js +63 -0
- package/widget/multimodal_v2/components/multimodal/MultiModalComponent.js +424 -0
- package/widget/multimodal_v2/components/multimodal/MultimodalAvatar.js +36 -0
- package/widget/multimodal_v2/components/multimodal/OrbAvatar.js +326 -0
- package/widget/multimodal_v2/components/multimodal/Status.js +220 -0
- package/widget/multimodal_v2/components/multimodal/VideoAvatar.js +24 -0
- package/widget/multimodal_v2/components/multimodal/VideoPreview.js +114 -0
- package/widget/multimodal_v2/components/multimodal/useAudioLevelMonitoring.js +96 -0
- package/widget/multimodal_v2/components/multimodal/useMultimodal.js +434 -0
- package/widget/multimodal_v2/components/presentations/index.js +372 -0
- package/widget/multimodal_v2/components/shared/Avatar.js +92 -0
- package/widget/multimodal_v2/components/shared/AvatarGroup.js +135 -0
- package/widget/multimodal_v2/components/shared/Button.js +245 -0
- package/widget/multimodal_v2/components/shared/ButtonGroup.js +133 -0
- package/widget/multimodal_v2/components/shared/ComposerForm.js +98 -0
- package/widget/multimodal_v2/components/shared/SpeakingIndicator.js +239 -0
- package/widget/multimodal_v2/components/shared/ThinkingAnimation.js +165 -0
- package/widget/multimodal_v2/components/shared/Tooltip.js +266 -0
- package/widget/multimodal_v2/components/shared/controls/Dropdown.js +79 -0
- package/widget/multimodal_v2/components/shared/controls/PillToggle.js +142 -0
- package/widget/multimodal_v2/components/shared/controls/TextArea.js +114 -0
- package/widget/multimodal_v2/components/shared/toolCallLabels.js +12 -0
- package/widget/multimodal_v2/components/slides/SlidesThumbnail.js +47 -0
- package/widget/multimodal_v2/components/slides/index.js +61 -0
- package/widget/multimodal_v2/constants.js +88 -0
- package/widget/multimodal_v2/host.split-css.js +2 -0
- package/widget/multimodal_v2/host.string.js +96 -0
- package/widget/multimodal_v2/images/icons.js +582 -0
- package/widget/multimodal_v2/images/posters/piper_low_res.jpg +0 -0
- package/widget/multimodal_v2/index.js +23 -0
- package/widget/multimodal_v2/index.panda.js +28 -0
- package/widget/multimodal_v2/index.split-css.panda.js +2 -0
- package/widget/multimodal_v2/inline_meeting_booker.js +182 -0
- package/widget/multimodal_v2/locales/cs.js +196 -0
- package/widget/multimodal_v2/locales/da.js +196 -0
- package/widget/multimodal_v2/locales/de.js +196 -0
- package/widget/multimodal_v2/locales/en.js +196 -0
- package/widget/multimodal_v2/locales/en_AU.js +197 -0
- package/widget/multimodal_v2/locales/en_GB.js +197 -0
- package/widget/multimodal_v2/locales/es.js +197 -0
- package/widget/multimodal_v2/locales/es_LA.js +196 -0
- package/widget/multimodal_v2/locales/fi.js +196 -0
- package/widget/multimodal_v2/locales/fr.js +197 -0
- package/widget/multimodal_v2/locales/fr_CA.js +196 -0
- package/widget/multimodal_v2/locales/id.js +196 -0
- package/widget/multimodal_v2/locales/index.js +48 -0
- package/widget/multimodal_v2/locales/it.js +196 -0
- package/widget/multimodal_v2/locales/ja.js +196 -0
- package/widget/multimodal_v2/locales/ko.js +196 -0
- package/widget/multimodal_v2/locales/nb.js +196 -0
- package/widget/multimodal_v2/locales/nl.js +196 -0
- package/widget/multimodal_v2/locales/pl.js +196 -0
- package/widget/multimodal_v2/locales/pt_BR.js +196 -0
- package/widget/multimodal_v2/locales/ru.js +196 -0
- package/widget/multimodal_v2/locales/sv.js +196 -0
- package/widget/multimodal_v2/locales/th.js +196 -0
- package/widget/multimodal_v2/locales/tr.js +196 -0
- package/widget/multimodal_v2/locales/vi.js +196 -0
- package/widget/multimodal_v2/locales/zh_CN.js +196 -0
- package/widget/multimodal_v2/locales/zh_TW.js +196 -0
- package/widget/multimodal_v2/multimodal.js +633 -0
- package/widget/multimodal_v2/multimodal_channel.js +195 -0
- package/widget/multimodal_v2/signals/active_conversation_signal.js +33 -0
- package/widget/multimodal_v2/signals/allowed_conversation_mode_signal.js +38 -0
- package/widget/multimodal_v2/signals/artifact_signal.js +22 -0
- package/widget/multimodal_v2/signals/layout_signal.js +98 -0
- package/widget/multimodal_v2/signals/messages_signal.js +207 -0
- package/widget/multimodal_v2/signals/ui_state_signal.js +128 -0
- package/widget/multimodal_v2/stable_bundle_src.js +44 -0
- package/widget/multimodal_v2/stores/ai_conversation_store.js +221 -0
- package/widget/multimodal_v2/stores/artifact_store.js +205 -0
- package/widget/multimodal_v2/stores/base_store.js +16 -0
- package/widget/multimodal_v2/stores/call_store.js +770 -0
- package/widget/multimodal_v2/stores/call_ui_adapter.js +225 -0
- package/widget/multimodal_v2/stores/debug_multimodal_scenario_store.js +471 -0
- package/widget/multimodal_v2/stores/decks_store.js +285 -0
- package/widget/multimodal_v2/stores/device_store.js +63 -0
- package/widget/multimodal_v2/stores/docking_store.js +62 -0
- package/widget/multimodal_v2/stores/field_request_store.js +326 -0
- package/widget/multimodal_v2/stores/meeting_store.js +477 -0
- package/widget/multimodal_v2/stores/participant_store.js +73 -0
- package/widget/multimodal_v2/stores/post_call_survey_store.js +160 -0
- package/widget/multimodal_v2/stores/pounce_tracking_store.js +163 -0
- package/widget/multimodal_v2/stores/pounce_tracking_store_v2.js +511 -0
- package/widget/multimodal_v2/stores/presentations_store.js +111 -0
- package/widget/multimodal_v2/stores/root_store.js +1919 -0
- package/widget/multimodal_v2/stores/screen_share_store.js +217 -0
- package/widget/multimodal_v2/stores/slides_store.js +21 -0
- package/widget/multimodal_v2/stores/translation_store.js +185 -0
- package/widget/multimodal_v2/stores/ui_store.js +496 -0
- package/widget/multimodal_v2/stores/waiting_store.js +159 -0
- package/widget/multimodal_v2/stores/website_navigation_store.js +767 -0
- package/widget/multimodal_v2/styled-system/css/conditions.js +34 -0
- package/widget/multimodal_v2/styled-system/css/css.js +48 -0
- package/widget/multimodal_v2/styled-system/css/cva.js +96 -0
- package/widget/multimodal_v2/styled-system/css/cx.js +13 -0
- package/widget/multimodal_v2/styled-system/css/index.js +15 -0
- package/widget/multimodal_v2/styled-system/css/sva.js +69 -0
- package/widget/multimodal_v2/styled-system/helpers.js +384 -0
- package/widget/multimodal_v2/styled-system/jsx/create-style-context.js +96 -0
- package/widget/multimodal_v2/styled-system/jsx/factory-helper.js +19 -0
- package/widget/multimodal_v2/styled-system/jsx/factory.js +111 -0
- package/widget/multimodal_v2/styled-system/jsx/index.js +12 -0
- package/widget/multimodal_v2/styled-system/jsx/is-valid-prop.js +22 -0
- package/widget/multimodal_v2/types.js +105 -0
- package/widget/multimodal_v2/utils/auto_scroller.js +157 -0
- package/widget/multimodal_v2/utils/flip_animation.js +124 -0
- package/widget/multimodal_v2/utils/focus_gate.js +237 -0
- package/widget/multimodal_v2/utils/locale.js +16 -0
- package/widget/multimodal_v2/utils/media_queries.js +30 -0
- package/widget/multimodal_v2/utils/multimodal_cache.js +19 -0
- package/widget/multimodal_v2/utils/mutation_effect.js +14 -0
- package/widget/multimodal_v2/utils/navigation_interceptor.js +205 -0
- package/widget/multimodal_v2/utils/navigation_strategies/dom_swap.js +393 -0
- package/widget/multimodal_v2/utils/navigation_strategies/index.js +12 -0
- package/widget/multimodal_v2/utils/navigation_strategies/lwr.js +61 -0
- package/widget/multimodal_v2/utils/navigation_strategies/navigation_utils.js +46 -0
- package/widget/multimodal_v2/utils/navigation_strategies/next_js.js +24 -0
- package/widget/multimodal_v2/utils/navigation_strategies/wouter_v3.js +15 -0
- package/widget/multimodal_v2/utils/objects_map.js +38 -0
- package/widget/multimodal_v2/utils/perceived_voice_turn_tracker.js +345 -0
- package/widget/multimodal_v2/utils/sanitize_html.js +132 -0
- package/widget/multimodal_v2/utils/signals.js +97 -0
- package/widget/multimodal_v2/utils/slide_zoom.js +114 -0
- package/widget/multimodal_v2/utils/theme_styles.js +137 -0
- package/widget/multimodal_v2/utils/url_observer.js +52 -0
- package/widget/multimodal_v2/utils/voice_onset_detector.js +127 -0
- package/widget/page_mirror.js +89 -0
- package/widget/page_view_activity_emitter.js +71 -0
- package/widget/pardot_visitor.js +137 -0
- package/widget/personalization_observer.js +96 -0
- package/widget/personalizations_config.js +160 -0
- package/widget/qualified_form/constants.js +23 -0
- package/widget/qualified_form/phone_utils.js +38 -0
- package/widget/qualified_form/qualified_form_action.js +91 -0
- package/widget/qualified_form/qualified_form_action_orchestrator.js +21 -0
- package/widget/qualified_form/qualified_form_api.js +471 -0
- package/widget/scroll_disabler.js +109 -0
- package/widget/server-logger.js +156 -0
- package/widget/smart_website_config.js +112 -0
- package/widget/telemetry/context.js +75 -0
- package/widget/telemetry/index.js +16 -0
- package/widget/telemetry/messenger_uptime.js +80 -0
- package/widget/telemetry/metrics.js +120 -0
- package/widget/telemetry/span.js +82 -0
- package/widget/telemetry/telemetry.js +180 -0
- package/widget/telemetry/tracer.js +41 -0
- package/widget/telemetry/tracing_store.js +310 -0
- package/widget/tracker.js +916 -0
- package/widget/utils/native_globals.js +129 -0
- package/widget/v1_adapter.js +50 -0
- package/widget/v2_adapter.js +368 -0
- package/widget/visitor/base_visitor_state.js +11 -0
- package/widget/visitor/cookie_visitor_state.js +128 -0
- package/widget/visitor/in_memory_visitor_state.js +29 -0
- package/widget/visitor/visitor_state.js +384 -0
- package/widget/visitor.js +356 -0
- package/widget/widget/linked_widget_v2.js +227 -0
- package/widget/widget/page_mirror_factory.js +22 -0
- package/widget/widget/sentry.js +130 -0
- package/widget/widget/widget.js +1698 -0
- package/widget/widget.split-css.js +2 -0
- package/widget/widget_bootstrap.js +97 -0
- package/widget/widget_object.js +73 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { __webpack_require__ } from "../js/runtime.js";
|
|
2
|
+
import { default as images_close } from "../images/close.js";
|
|
3
|
+
import { default as logo_logo } from "../images/logo.js";
|
|
4
|
+
import { safeSet, safeGet } from "../src/localstorage.js";
|
|
5
|
+
import "./utils/native_globals.js";
|
|
6
|
+
|
|
7
|
+
/* provided dependency */ var __nativeWindowAddEventListener = __webpack_require__(68034).zh;
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
const MAX_DURATION_THIRTY_MINUTES_MS = 30 * 60 * 1000;
|
|
12
|
+
const LOCAL_KEYS = {
|
|
13
|
+
DEBUG_STORE: "debug_store",
|
|
14
|
+
SUBMITTED: "submitted_store"
|
|
15
|
+
};
|
|
16
|
+
const debugLinkId = "debugLink";
|
|
17
|
+
const SAVE_FORM_DATA_NOT_CALLED_MESSAGE = '[Error] "saveFormData" was not called.';
|
|
18
|
+
const SHOW_FORM_EXPERIENCE_NOT_CALLED_MESSAGE = '[Error] "showFormExperience" was not called.';
|
|
19
|
+
const HEADER = "Results from your form submission\n";
|
|
20
|
+
const SUCCESS_FOOTER = "Congratulations! This form is successfully set up. If the Experience is still not appearing, please ask your Qualified admin to make sure that the Experience is enabled and properly configured.";
|
|
21
|
+
const ERROR_FOOTER = "There are problems with this form setup. Please address the issues above and try again.";
|
|
22
|
+
const ELEMENT_PADDING = "16px";
|
|
23
|
+
const centerBannerCalculationStringify = (maxWidth)=>{
|
|
24
|
+
return "calc(50% - " + maxWidth + "/2 + " + ELEMENT_PADDING + ")";
|
|
25
|
+
};
|
|
26
|
+
const constructDebugMessage = ()=>{
|
|
27
|
+
var _DebugModeState_getApiMessage, _DebugModeState_getApiMessage1;
|
|
28
|
+
const debugMessages = [];
|
|
29
|
+
debugMessages.push(HEADER);
|
|
30
|
+
const saveFormData = (_DebugModeState_getApiMessage = DebugModeState.getApiMessage("saveFormData")) != null ? _DebugModeState_getApiMessage : SAVE_FORM_DATA_NOT_CALLED_MESSAGE;
|
|
31
|
+
debugMessages.push(saveFormData);
|
|
32
|
+
const showFormExperienceLog = (_DebugModeState_getApiMessage1 = DebugModeState.getApiMessage("showFormExperience")) != null ? _DebugModeState_getApiMessage1 : SHOW_FORM_EXPERIENCE_NOT_CALLED_MESSAGE;
|
|
33
|
+
debugMessages.push(showFormExperienceLog);
|
|
34
|
+
debugMessages.push("");
|
|
35
|
+
const errorMessage = saveFormData.includes("[Error]") || showFormExperienceLog.includes("[Error]");
|
|
36
|
+
errorMessage ? debugMessages.push(ERROR_FOOTER) : debugMessages.push(SUCCESS_FOOTER);
|
|
37
|
+
return debugMessages;
|
|
38
|
+
};
|
|
39
|
+
const BANNER_STYLE = {
|
|
40
|
+
padding: ELEMENT_PADDING,
|
|
41
|
+
position: "fixed",
|
|
42
|
+
maxWidth: "400px",
|
|
43
|
+
bottom: "0",
|
|
44
|
+
fontSize: "16px",
|
|
45
|
+
backgroundColor: "#6558FF",
|
|
46
|
+
borderRadius: "8px 8px 0px 0px",
|
|
47
|
+
left: centerBannerCalculationStringify("400px"),
|
|
48
|
+
zIndex: 2147483647 // Max z-index value, debug buttons should be at top layer
|
|
49
|
+
};
|
|
50
|
+
const LABEL_STYLE = {
|
|
51
|
+
paddingLeft: ELEMENT_PADDING,
|
|
52
|
+
paddingRight: ELEMENT_PADDING,
|
|
53
|
+
color: "#FFFFFF",
|
|
54
|
+
fontFamily: "sans-serif",
|
|
55
|
+
lineHeight: "1.5"
|
|
56
|
+
};
|
|
57
|
+
const EXIT_STYLE = {
|
|
58
|
+
height: "12px",
|
|
59
|
+
paddingLeft: ELEMENT_PADDING,
|
|
60
|
+
alignSelf: "center",
|
|
61
|
+
width: "30px"
|
|
62
|
+
};
|
|
63
|
+
const LOGO_STYLE = {
|
|
64
|
+
height: "25px",
|
|
65
|
+
filter: "invert(1)",
|
|
66
|
+
width: "21px"
|
|
67
|
+
};
|
|
68
|
+
const updateFormSubmissionLabel = (label)=>{
|
|
69
|
+
label.innerText = "Form submission detected";
|
|
70
|
+
};
|
|
71
|
+
const updateFormSubmissionBanner = (banner)=>{
|
|
72
|
+
banner.style.maxWidth = "490px";
|
|
73
|
+
banner.style.left = centerBannerCalculationStringify("490px");
|
|
74
|
+
};
|
|
75
|
+
const generateDebugLogLink = ()=>{
|
|
76
|
+
const debugLogLink = document.createElement("div");
|
|
77
|
+
Object.assign(debugLogLink.style, LABEL_STYLE);
|
|
78
|
+
debugLogLink.style.textDecoration = "underline";
|
|
79
|
+
debugLogLink.style.fontWeight = "600";
|
|
80
|
+
debugLogLink.innerText = "View debug report";
|
|
81
|
+
debugLogLink.id = debugLinkId;
|
|
82
|
+
return debugLogLink;
|
|
83
|
+
};
|
|
84
|
+
const createBanner = ()=>{
|
|
85
|
+
const banner = document.createElement("div");
|
|
86
|
+
Object.assign(banner.style, BANNER_STYLE);
|
|
87
|
+
return banner;
|
|
88
|
+
};
|
|
89
|
+
const updateBannerAfterSubmission = (banner, label, exit)=>{
|
|
90
|
+
updateFormSubmissionBanner(banner);
|
|
91
|
+
updateFormSubmissionLabel(label);
|
|
92
|
+
const debugInfoAlreadyExists = document.getElementById(debugLinkId);
|
|
93
|
+
if (!debugInfoAlreadyExists) {
|
|
94
|
+
const debugInfo = generateDebugLogLink();
|
|
95
|
+
debugInfo.addEventListener("click", ()=>{
|
|
96
|
+
const debugMessages = constructDebugMessage();
|
|
97
|
+
alert(debugMessages.join("\n"));
|
|
98
|
+
});
|
|
99
|
+
label.insertAdjacentElement("afterend", debugInfo);
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
const createLabel = ()=>{
|
|
103
|
+
const label = document.createElement("div");
|
|
104
|
+
Object.assign(label.style, LABEL_STYLE);
|
|
105
|
+
label.innerText = "Submit a form to test your experience";
|
|
106
|
+
return label;
|
|
107
|
+
};
|
|
108
|
+
const createLogo = (host)=>{
|
|
109
|
+
const logoImage = document.createElement("img");
|
|
110
|
+
logoImage.src = "" + host + logo_logo;
|
|
111
|
+
Object.assign(logoImage.style, LOGO_STYLE);
|
|
112
|
+
return logoImage;
|
|
113
|
+
};
|
|
114
|
+
const createExit = (host, banner)=>{
|
|
115
|
+
const exitButton = document.createElement("img");
|
|
116
|
+
Object.assign(exitButton.style, EXIT_STYLE);
|
|
117
|
+
exitButton.src = "" + host + images_close;
|
|
118
|
+
exitButton.addEventListener("click", ()=>{
|
|
119
|
+
banner.remove();
|
|
120
|
+
safeSet(LOCAL_KEYS.SUBMITTED, false);
|
|
121
|
+
DebugModeState.exitDebugMode();
|
|
122
|
+
});
|
|
123
|
+
return exitButton;
|
|
124
|
+
};
|
|
125
|
+
const showDebugBanner = (host)=>{
|
|
126
|
+
const logo = createLogo(host);
|
|
127
|
+
const banner = createBanner();
|
|
128
|
+
const exitButton = createExit(host, banner);
|
|
129
|
+
const label = createLabel();
|
|
130
|
+
const parentLabel = document.createElement("div");
|
|
131
|
+
parentLabel.style.display = "flex";
|
|
132
|
+
parentLabel.append(logo);
|
|
133
|
+
parentLabel.append(label);
|
|
134
|
+
parentLabel.append(exitButton);
|
|
135
|
+
banner.append(parentLabel);
|
|
136
|
+
// Changes after submission
|
|
137
|
+
__nativeWindowAddEventListener("submit", ()=>{
|
|
138
|
+
updateBannerAfterSubmission(banner, label, exitButton);
|
|
139
|
+
safeSet(LOCAL_KEYS.SUBMITTED, true);
|
|
140
|
+
});
|
|
141
|
+
if (safeGet(LOCAL_KEYS.SUBMITTED)) {
|
|
142
|
+
updateBannerAfterSubmission(banner, label, exitButton);
|
|
143
|
+
}
|
|
144
|
+
document.body.appendChild(banner);
|
|
145
|
+
};
|
|
146
|
+
class DebugModeState {
|
|
147
|
+
}
|
|
148
|
+
DebugModeState.initializeDebugMode = ()=>{
|
|
149
|
+
safeSet(LOCAL_KEYS.DEBUG_STORE, {
|
|
150
|
+
startTime: Date.now(),
|
|
151
|
+
apiCalls: {}
|
|
152
|
+
});
|
|
153
|
+
};
|
|
154
|
+
DebugModeState.exitDebugMode = ()=>{
|
|
155
|
+
safeSet(LOCAL_KEYS.DEBUG_STORE, undefined);
|
|
156
|
+
};
|
|
157
|
+
DebugModeState.isInDebugMode = ()=>{
|
|
158
|
+
const debugState = safeGet(LOCAL_KEYS.DEBUG_STORE);
|
|
159
|
+
return debugState && Date.now() - debugState.startTime < MAX_DURATION_THIRTY_MINUTES_MS;
|
|
160
|
+
};
|
|
161
|
+
DebugModeState.setApiMessage = (api, status, statement)=>{
|
|
162
|
+
const debugState = safeGet(LOCAL_KEYS.DEBUG_STORE);
|
|
163
|
+
if (!debugState) return;
|
|
164
|
+
debugState.apiCalls[api] = "[" + status + "] " + statement;
|
|
165
|
+
safeSet(LOCAL_KEYS.DEBUG_STORE, debugState);
|
|
166
|
+
};
|
|
167
|
+
DebugModeState.getApiMessage = (api)=>{
|
|
168
|
+
const debugState = safeGet(LOCAL_KEYS.DEBUG_STORE);
|
|
169
|
+
if (!debugState) return null;
|
|
170
|
+
return debugState.apiCalls[api];
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
export { showDebugBanner };
|
|
175
|
+
export default DebugModeState;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { api } from "../js/4101.js";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class EloquaVisitor {
|
|
5
|
+
getToken() {
|
|
6
|
+
const cookie = api.get("ELOQUA");
|
|
7
|
+
let token = cookie == null ? void 0 : cookie.split("GUID=")[1];
|
|
8
|
+
if (token) {
|
|
9
|
+
// e.g. FEF813779AC54D40868E60219D780B39&FPCVISITED=1, we ignore extra params
|
|
10
|
+
token = token.split("&")[0];
|
|
11
|
+
}
|
|
12
|
+
return token;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
/* export default */ const eloqua_visitor = (EloquaVisitor);
|
|
16
|
+
|
|
17
|
+
export default eloqua_visitor;
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { BookerIntentTracker } from "./booker_intent_tracker.js";
|
|
2
|
+
import { BOOKER_PATHWAY_ORIGIN } from "./booker_outcome_tracker.js";
|
|
3
|
+
import { serverLogger } from "./server-logger.js";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
9
|
+
// Form/CTA pre-offer booker SLI (host realm).
|
|
10
|
+
//
|
|
11
|
+
// A visitor submits a smart form or clicks a CTA, watches a spinner, and either
|
|
12
|
+
// gets a booker or doesn't. `booker_outcome` can't see any of that — it arms only
|
|
13
|
+
// once an offer exists — so an abandoned spinner produced no signal at all.
|
|
14
|
+
//
|
|
15
|
+
// Everything here lives in the HOST realm, which turns out to be where the
|
|
16
|
+
// answers are: the trigger fires host-side (`tracker.ts`), and `channel.ts`
|
|
17
|
+
// receives the trigger's response before handing it to either renderer, so the
|
|
18
|
+
// same realm sees whether that response carried an offer, qualification
|
|
19
|
+
// questions, or a dead end. The one thing it cannot see is the booker *painting*
|
|
20
|
+
// — the legacy booker renders inside the messenger iframe — which arrives via the
|
|
21
|
+
// `serverLog` bridge instead (see `observeBookerOutcome`).
|
|
22
|
+
//
|
|
23
|
+
// Deliberately NOT built on ButtonsFormsTriggeringTracer, which already collects
|
|
24
|
+
// similar data and discards it two ways: its root span finishes only when a
|
|
25
|
+
// response arrives (so an abandoning visitor never flushes), and its transport is
|
|
26
|
+
// the sampled OTLP/APM path rather than unsampled flex logs.
|
|
27
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
28
|
+
/**
|
|
29
|
+
* One tracker for the host page. `surface` is omitted: at trigger time nothing has
|
|
30
|
+
* decided whether the booker will render in the legacy iframe or the multimodal
|
|
31
|
+
* lightbox, and guessing would put a wrong value on a failure-localization facet.
|
|
32
|
+
*/ const tracker = new BookerIntentTracker({
|
|
33
|
+
log: (params)=>serverLogger.serverLog(params)
|
|
34
|
+
});
|
|
35
|
+
// A form/CTA trigger always produces an `element` conversation, which the server
|
|
36
|
+
// classifies as `pathway_origin: form`. Passed as literals rather than derived:
|
|
37
|
+
// the usual derivation reads the offer's `source`, and at trigger time there is
|
|
38
|
+
// no offer — it would classify every form/CTA intent as `chat`.
|
|
39
|
+
const FORM_CTA_CONVERSATION_TYPE = "element";
|
|
40
|
+
/**
|
|
41
|
+
* The only events whose payload holds messages belonging to the armed trigger.
|
|
42
|
+
*
|
|
43
|
+
* Mirrors the two message-carrying cases in
|
|
44
|
+
* `ButtonsFormsTriggeringTracer.extractAttributesIfFormsOrButtonsResponse`
|
|
45
|
+
* (`fullscreenMBOrQQ` and `asyncFullscreenMBOrQQ`); its other two cases are
|
|
46
|
+
* message-less and handled by `isTerminalNonMeeting`.
|
|
47
|
+
*/ const TRIGGER_MESSAGE_EVENTS = [
|
|
48
|
+
"initElementConversation",
|
|
49
|
+
// The same initial response, for a `qualified_form?` bot: the server picks the
|
|
50
|
+
// event name off the bot type (`broadcasting.rb:309`), and that payload's
|
|
51
|
+
// allowed messages include `calendar_event_offer`
|
|
52
|
+
// (`qualified_form/constants.ts`). Omitting it dropped those offers entirely,
|
|
53
|
+
// leaving the trigger armed to report `abandoned_pre_offer` for a form that
|
|
54
|
+
// succeeded.
|
|
55
|
+
"initQualifiedFormElementConversation",
|
|
56
|
+
"elementMessage"
|
|
57
|
+
];
|
|
58
|
+
/**
|
|
59
|
+
* The broadcast carries messages in two shapes, and the difference is invisible
|
|
60
|
+
* from the client. `initElementConversation` sends `payload.messages`, but
|
|
61
|
+
* `Message#broadcast_to_visitor` serializes a *single* message and broadcasts it
|
|
62
|
+
* as `elementMessage` with the message itself as the payload — which is the
|
|
63
|
+
* async-after-routing path, and therefore the common one for a routed form.
|
|
64
|
+
* Reading only `payload.messages` missed those offers entirely and let them fall
|
|
65
|
+
* through to `abandoned_pre_offer`.
|
|
66
|
+
*/ function messagesIn(message) {
|
|
67
|
+
// Scoped to the two events that carry a trigger's own messages, the same way
|
|
68
|
+
// `isTerminalNonMeeting` scopes the other two. Without this the bare-payload
|
|
69
|
+
// branch below also matches chat traffic: `Message#broadcast_to_visitor` sends
|
|
70
|
+
// element conversations as `elementMessage` and *everything else* as `message`,
|
|
71
|
+
// with an identically shaped payload — so a rep's offer, or an AI `auto_respond`
|
|
72
|
+
// one, would close a form/CTA intent that never produced it, while the trigger's
|
|
73
|
+
// real offer was still in flight.
|
|
74
|
+
if (!TRIGGER_MESSAGE_EVENTS.includes(message == null ? void 0 : message.event)) return [];
|
|
75
|
+
const payload = message == null ? void 0 : message.payload;
|
|
76
|
+
if (!payload) return [];
|
|
77
|
+
if (Array.isArray(payload.messages)) return payload.messages;
|
|
78
|
+
// A bare serialized message: recognised by carrying its own `type`.
|
|
79
|
+
return payload.type ? [
|
|
80
|
+
payload
|
|
81
|
+
] : [];
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Arms the SLI at a form submit or CTA click.
|
|
85
|
+
*
|
|
86
|
+
* **Last write wins.** This is the only meeting pathway where two intents can
|
|
87
|
+
* overlap on one page — a visitor can submit a form, wait, then click a CTA — and
|
|
88
|
+
* a second trigger replaces the first, which is then dropped without an outcome.
|
|
89
|
+
* Deliberate: a superseded trigger has no honest outcome to report. Calling it
|
|
90
|
+
* `abandoned_pre_offer` would be wrong, because a CTA click that opens a form the
|
|
91
|
+
* visitor then submits is *one* journey with two triggers, and that reading would
|
|
92
|
+
* report a failure for a journey that succeeded. Dropping it undercounts the
|
|
93
|
+
* denominator slightly; inventing an outcome would corrupt the numerator.
|
|
94
|
+
*/ function armFormCtaBookerIntent(intentId, botApiName) {
|
|
95
|
+
tracker.arm({
|
|
96
|
+
intentId,
|
|
97
|
+
pathwayOrigin: BOOKER_PATHWAY_ORIGIN.FORM,
|
|
98
|
+
conversationType: FORM_CTA_CONVERSATION_TYPE,
|
|
99
|
+
botApiName
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Classifies a trigger response, mirroring the conditions
|
|
104
|
+
* `ButtonsFormsTriggeringTracer.extractAttributesIfFormsOrButtonsResponse` uses
|
|
105
|
+
* for `app.experience_result_type` (kept independent of that module rather than
|
|
106
|
+
* widening its private API — see the file header).
|
|
107
|
+
*
|
|
108
|
+
* Called for every inbound channel message and no-ops unless a trigger is armed,
|
|
109
|
+
* so unrelated traffic costs one boolean.
|
|
110
|
+
*/ function resolveFormCtaBookerIntent(message) {
|
|
111
|
+
// Checked before the guard, not inside it: this runs on every inbound message,
|
|
112
|
+
// and nothing is armed for the vast majority of them. `isArmed` reads one field
|
|
113
|
+
// and cannot throw, so the common path costs a comparison rather than a closure
|
|
114
|
+
// plus a try block. Everything that *can* throw — reading the untyped payload —
|
|
115
|
+
// stays inside.
|
|
116
|
+
if (!tracker.isArmed) return;
|
|
117
|
+
safely(()=>{
|
|
118
|
+
// Socket payloads are not typed at runtime, and this runs inside the widget's
|
|
119
|
+
// inbound message loop — a shape we didn't anticipate must cost a datapoint,
|
|
120
|
+
// not the conversation.
|
|
121
|
+
const messages = messagesIn(message);
|
|
122
|
+
const offer = messages.find((entry)=>(entry == null ? void 0 : entry.type) === "calendar_event_offer");
|
|
123
|
+
if (offer) {
|
|
124
|
+
// Branch on the offer's *presence*, not on it having an id. An offer message
|
|
125
|
+
// proves this trigger was not a dead end, so falling through to the terminal
|
|
126
|
+
// check would report `no_offer` for a delivered offer — corrupting the
|
|
127
|
+
// numerator and the denominator at once.
|
|
128
|
+
if (offer.id) {
|
|
129
|
+
var _offer_calendarEventTypeId;
|
|
130
|
+
tracker.markOffered(offer.id, {
|
|
131
|
+
calendarEventTypeId: (_offer_calendarEventTypeId = offer.calendarEventTypeId) == null ? void 0 : _offer_calendarEventTypeId.toString()
|
|
132
|
+
});
|
|
133
|
+
} else {
|
|
134
|
+
// No id means no join key, so there is no datapoint worth keeping — but
|
|
135
|
+
// simply returning would leave the intent armed, and a later `pagehide`
|
|
136
|
+
// would then report `abandoned_pre_offer` for a trigger that demonstrably
|
|
137
|
+
// produced an offer. Dropping it has to be explicit: losing one datapoint
|
|
138
|
+
// beats inventing a failure.
|
|
139
|
+
disposeFormCtaBookerIntent();
|
|
140
|
+
}
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
// Questions are a waypoint, not an outcome — the booker can still arrive in a
|
|
144
|
+
// later broadcast. Record how fast they reached the client and stay armed.
|
|
145
|
+
// This runs from `channel.ts`'s inbound handler, before the payload is emitted
|
|
146
|
+
// to a renderer, so it measures arrival rather than paint — hence `received`.
|
|
147
|
+
if (messages.some((entry)=>(entry == null ? void 0 : entry.type) === "lightbox_gather")) {
|
|
148
|
+
tracker.markQualificationReceived();
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
if (isTerminalNonMeeting(message)) tracker.markNoOffer();
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Resolves the visitor-experienced total by observing `booker_outcome` as it
|
|
156
|
+
* transits the host `serverLog` passthrough.
|
|
157
|
+
*
|
|
158
|
+
* The booker renders in the messenger iframe, and the iframe->host event channel
|
|
159
|
+
* cannot carry an offer id: `MESSENGER_EVENTS` is a closed allowlist and
|
|
160
|
+
* `clientEvent` passes a name with no payload. The `serverLog` bridge already
|
|
161
|
+
* forwards the full payload, so the SLI it emits doubles as the cross-realm
|
|
162
|
+
* signal — no new bridge, no allowlist change. The same call also covers the
|
|
163
|
+
* same-realm multimodal lightbox, whose SLI takes the identical path.
|
|
164
|
+
*/ function observeBookerOutcome(params) {
|
|
165
|
+
// Same reasoning as above: this sits on every `serverLog` call.
|
|
166
|
+
if (!tracker.isArmed) return;
|
|
167
|
+
safely(()=>{
|
|
168
|
+
var _params_extra, _params_extra1;
|
|
169
|
+
// `widget.serverLog` is a public passthrough the iframe bridge forwards
|
|
170
|
+
// arbitrary payloads into, so nothing here can assume a shape.
|
|
171
|
+
if ((params == null ? void 0 : params.message) !== "booker_outcome") return;
|
|
172
|
+
if (((_params_extra = params.extra) == null ? void 0 : _params_extra.outcome) !== "shown") return;
|
|
173
|
+
const offerMessageId = (_params_extra1 = params.extra) == null ? void 0 : _params_extra1.offer_message_id;
|
|
174
|
+
if (typeof offerMessageId === "string") tracker.markShown(offerMessageId);
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Drops any armed intent and releases its `pagehide` / `visibilitychange`
|
|
179
|
+
* listeners.
|
|
180
|
+
*
|
|
181
|
+
* Needed in production, not just tests. This tracker is a module singleton, so
|
|
182
|
+
* unlike the multimodal one — which `RootStore#dispose` tears down — nothing
|
|
183
|
+
* otherwise unhooks it when the widget is destroyed. `Widget#onTeardown` and
|
|
184
|
+
* `onRefresh` both dispose and then restart, so an intent left armed across that
|
|
185
|
+
* boundary would keep its listeners and, on a later `pagehide`, report
|
|
186
|
+
* `abandoned_pre_offer` for a trigger belonging to the previous instance. The log
|
|
187
|
+
* is stamped with whatever session is current at POST time, so that outcome would
|
|
188
|
+
* land on a session that never produced it.
|
|
189
|
+
*
|
|
190
|
+
* Also used as the test seam, since "drop everything" is the same operation.
|
|
191
|
+
*/ function disposeFormCtaBookerIntent() {
|
|
192
|
+
tracker.dispose();
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Terminal results that mean "this trigger will never become a meeting": the
|
|
196
|
+
* widget opened instead (`initState` for a smart_cta/form conversation), or the
|
|
197
|
+
* script dead-ended and fell back to default website behaviour.
|
|
198
|
+
*
|
|
199
|
+
* Deliberately NOT "the response carried content we don't recognise". Broadcasts
|
|
200
|
+
* with unrecognised message types demonstrably occur mid-journey — that is the
|
|
201
|
+
* whole subject of the `triggered_to_no_content` / `no_renderable_content` work —
|
|
202
|
+
* and one arriving between the questions and the offer would resolve `no_offer`
|
|
203
|
+
* and disarm, so the real offer that followed would never be counted. An
|
|
204
|
+
* unrecognised broadcast leaves the tracker armed; if nothing follows, `pagehide`
|
|
205
|
+
* reports it as abandonment. That also matches the ticket's instruction to scope
|
|
206
|
+
* `no_offer` to the unambiguous client-terminal types and treat
|
|
207
|
+
* `abandoned_pre_offer` as an upper bound.
|
|
208
|
+
*/ /**
|
|
209
|
+
* Both exported entry points run in hot shared paths — the widget's inbound
|
|
210
|
+
* message loop and the `serverLog` passthrough — so each is wrapped rather than
|
|
211
|
+
* relying on the tracker's internal guards, which only cover what happens *after*
|
|
212
|
+
* these functions have already read the payload.
|
|
213
|
+
*/ function safely(fn) {
|
|
214
|
+
try {
|
|
215
|
+
fn();
|
|
216
|
+
} catch (unused) {
|
|
217
|
+
// Losing a datapoint is strictly preferable to breaking the conversation.
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
function isTerminalNonMeeting(message) {
|
|
221
|
+
var _ref;
|
|
222
|
+
var _message_payload;
|
|
223
|
+
const conversations = Array.isArray(message == null ? void 0 : (_message_payload = message.payload) == null ? void 0 : _message_payload.conversations) ? message.payload.conversations : [];
|
|
224
|
+
const lastConversation = conversations[conversations.length - 1];
|
|
225
|
+
if (message.event === "initState" && [
|
|
226
|
+
"smart_cta",
|
|
227
|
+
"form"
|
|
228
|
+
].includes((_ref = lastConversation == null ? void 0 : lastConversation.triggeredByBotType) != null ? _ref : "")) {
|
|
229
|
+
return true;
|
|
230
|
+
}
|
|
231
|
+
// Any `closeLightbox` ends the journey, not just the `fallbackToDefault` one.
|
|
232
|
+
// The server broadcasts it from eight places and only one sets that flag
|
|
233
|
+
// (`visitor_types_processing.rb:354`); the other seven are equally dead ends —
|
|
234
|
+
// the experience produced no element conversation (`:350`), a rebroadcast found
|
|
235
|
+
// no element conversation to restore (`:369`, `conversation_task.rb:117`), a
|
|
236
|
+
// non-lightbox bot was triggered on a lightbox team (`:232`), a form or
|
|
237
|
+
// `bot_api_name` matched no bot (`conversation_task.rb:136`, `:145`), or the
|
|
238
|
+
// widget changed page views and closed the lightbox to unblock the page
|
|
239
|
+
// (`widget/lifecycle.rb:280`). Keying on the flag left the intent armed through
|
|
240
|
+
// all of those, so a later `pagehide` reported `abandoned_pre_offer` for a
|
|
241
|
+
// trigger that never had a chance — inverting the metric rather than just
|
|
242
|
+
// missing a datapoint.
|
|
243
|
+
return message.event === "closeLightbox";
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export { armFormCtaBookerIntent, disposeFormCtaBookerIntent, observeBookerOutcome, resolveFormCtaBookerIntent };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __webpack_require__ } from "../js/runtime.js";
|
|
2
|
+
import { api } from "../js/4101.js";
|
|
3
|
+
import "../constants.generated.js";
|
|
4
|
+
import "./utils/native_globals.js";
|
|
5
|
+
|
|
6
|
+
/* provided dependency */ var hubspot_visitor_setInterval = __webpack_require__(68034).LK;
|
|
7
|
+
/* provided dependency */ var hubspot_visitor_clearInterval = __webpack_require__(68034).wm;
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class HubSpotVisitor {
|
|
11
|
+
async getToken(timeout) {
|
|
12
|
+
if (timeout === void 0) timeout = (/* inlined export .DEFAULT_HUBSPOT_TOKEN_RETRIEVAL_TIMEOUT */1000);
|
|
13
|
+
return new Promise((resolve)=>{
|
|
14
|
+
const getCookiedToken = ()=>api.get("__hstc");
|
|
15
|
+
if (getCookiedToken()) {
|
|
16
|
+
// cookie exists already
|
|
17
|
+
resolve(getCookiedToken());
|
|
18
|
+
} else if (window._hsq) {
|
|
19
|
+
// hubspot tracking exists but cookie isn't set yet
|
|
20
|
+
const startTime = Date.now();
|
|
21
|
+
const intervalId = hubspot_visitor_setInterval(()=>{
|
|
22
|
+
if (getCookiedToken()) {
|
|
23
|
+
hubspot_visitor_clearInterval(intervalId);
|
|
24
|
+
resolve(getCookiedToken());
|
|
25
|
+
} else if (Date.now() - startTime > timeout) {
|
|
26
|
+
hubspot_visitor_clearInterval(intervalId);
|
|
27
|
+
resolve(undefined);
|
|
28
|
+
}
|
|
29
|
+
}, 200);
|
|
30
|
+
} else {
|
|
31
|
+
// no cookie or tracking
|
|
32
|
+
resolve(undefined);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/* export default */ const hubspot_visitor = (HubSpotVisitor);
|
|
38
|
+
|
|
39
|
+
export default hubspot_visitor;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Page-container attributes that opt a page into the inline meeting booker.
|
|
3
|
+
*
|
|
4
|
+
* A tagged container looks like:
|
|
5
|
+
* <div data-qualified-meeting-booker-container
|
|
6
|
+
* data-qualified-manual-experience-id="<bot api_name>"></div>
|
|
7
|
+
*
|
|
8
|
+
* The experience id is the manual bot's `api_name`, the same value passed to
|
|
9
|
+
* `tracker.showExperience(...)` when a manual/smart-CTA selector is clicked.
|
|
10
|
+
*/ const MEETING_BOOKER_CONTAINER_ATTR = "data-qualified-meeting-booker-container";
|
|
11
|
+
const MANUAL_EXPERIENCE_ID_ATTR = "data-qualified-manual-experience-id";
|
|
12
|
+
/**
|
|
13
|
+
* Finds the page's tagged inline-meeting-booker container that carries a
|
|
14
|
+
* non-empty manual-experience id, returning the container and its trimmed id (or
|
|
15
|
+
* null when none exists: no tagged container, or only ones with a blank id).
|
|
16
|
+
*
|
|
17
|
+
* Shared by {@link pageOwnsInlineMeetingBooker} and the inline booker's mount
|
|
18
|
+
* path so both agree on what counts as a valid container: a blank/whitespace id
|
|
19
|
+
* must NOT be treated as an owner, otherwise the classic lightbox would be
|
|
20
|
+
* withheld while nothing mounts to render the booker.
|
|
21
|
+
*/ function findInlineMeetingBookerContainer() {
|
|
22
|
+
const containers = document.querySelectorAll("[" + MEETING_BOOKER_CONTAINER_ATTR + "][" + MANUAL_EXPERIENCE_ID_ATTR + "]");
|
|
23
|
+
for (const container of containers){
|
|
24
|
+
var _container_getAttribute;
|
|
25
|
+
const experienceId = (_container_getAttribute = container.getAttribute(MANUAL_EXPERIENCE_ID_ATTR)) == null ? void 0 : _container_getAttribute.trim();
|
|
26
|
+
if (experienceId) return {
|
|
27
|
+
container,
|
|
28
|
+
experienceId
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* True when this page opts into the multimodal_v2 inline meeting booker: the
|
|
35
|
+
* account has the `inline_meeting_booker` flag on, the flags that load
|
|
36
|
+
* multimodal_v2 are on (`widget_allow_messenger_v2_styling` plus
|
|
37
|
+
* `widget_use_code_split_snippet`), and the page has a tagged container.
|
|
38
|
+
*
|
|
39
|
+
* On such a page the inline booker owns meeting-booker rendering, so the classic
|
|
40
|
+
* messenger iframe must never show its full-screen lightbox (loading spinner or
|
|
41
|
+
* booker). It would render a duplicate over the inline booker, and on a page
|
|
42
|
+
* rebroadcast (reload / SPA nav with an existing conversation) the offer that
|
|
43
|
+
* resolves the spinner is withheld from the iframe, leaving it stuck forever.
|
|
44
|
+
*
|
|
45
|
+
* Every input is known at first paint (the container is static page HTML and the
|
|
46
|
+
* flags come from config), so this is race-free. `rootStore.inlineMeetingBookerActive`
|
|
47
|
+
* cannot be used here: it only flips true once multimodal_v2 mounts, which is too
|
|
48
|
+
* late for a rebroadcast `showLightboxLoading` that fires before the chunk loads.
|
|
49
|
+
*
|
|
50
|
+
* Requiring the multimodal-load flags means we only suppress the classic lightbox
|
|
51
|
+
* when multimodal_v2 will actually load to render the inline booker in its place,
|
|
52
|
+
* so a page that cannot load multimodal_v2 keeps its normal lightbox behavior.
|
|
53
|
+
*/ function pageOwnsInlineMeetingBooker(featureFlags) {
|
|
54
|
+
if (!featureFlags.inlineMeetingBooker || !featureFlags.widgetAllowMessengerV2Styling || !featureFlags.widgetUseCodeSplitSnippet) {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
return findInlineMeetingBookerContainer() !== null;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Backend `received` events the classic messenger iframe uses to open a
|
|
61
|
+
* full-screen lightbox meeting booker. On a page that owns the inline booker
|
|
62
|
+
* these must be withheld from the iframe (see {@link shouldWithholdFromClassicIframe}):
|
|
63
|
+
*
|
|
64
|
+
* - `showLightboxLoading` opens the full-screen loading overlay. The server
|
|
65
|
+
* broadcasts it for manual bookers on both live creation and page-reload
|
|
66
|
+
* rebroadcast, and it arrives through the generic received relay (not the
|
|
67
|
+
* client-side IframeManager.showLightboxLoading method). Withholding it is
|
|
68
|
+
* what prevents the stuck full-screen spinner: the resolving offer below is
|
|
69
|
+
* also withheld, so an opened overlay would never clear.
|
|
70
|
+
* - the element-conversation events carry the booker's loading state and offer
|
|
71
|
+
* data; relaying them would render a duplicate booker over the inline one.
|
|
72
|
+
*/ const WITHHELD_IFRAME_EVENTS = new Set([
|
|
73
|
+
"showLightboxLoading",
|
|
74
|
+
"startElementConversationLoadingState",
|
|
75
|
+
"initElementConversation",
|
|
76
|
+
"initQualifiedFormElementConversation"
|
|
77
|
+
]);
|
|
78
|
+
/**
|
|
79
|
+
* True when a backend `received` event must NOT be relayed to the classic
|
|
80
|
+
* messenger iframe because this page owns the inline meeting booker. Keeps the
|
|
81
|
+
* classic iframe from opening a duplicate full-screen booker or a stuck loading
|
|
82
|
+
* spinner over the inline one. Any other event relays normally.
|
|
83
|
+
*/ function shouldWithholdFromClassicIframe(event, featureFlags) {
|
|
84
|
+
return WITHHELD_IFRAME_EVENTS.has(event) && pageOwnsInlineMeetingBooker(featureFlags);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
var inline_meeting_booker_page_MANUAL_EXPERIENCE_ID_ATTR = /* unused export */ undefined;
|
|
88
|
+
var inline_meeting_booker_page_MEETING_BOOKER_CONTAINER_ATTR = /* unused export */ undefined;
|
|
89
|
+
var inline_meeting_booker_page_shouldWithholdFromClassicIframe = /* unused export */ undefined;
|
|
90
|
+
export { findInlineMeetingBookerContainer, inline_meeting_booker_page_MANUAL_EXPERIENCE_ID_ATTR as MANUAL_EXPERIENCE_ID_ATTR, inline_meeting_booker_page_MEETING_BOOKER_CONTAINER_ATTR as MEETING_BOOKER_CONTAINER_ATTR, inline_meeting_booker_page_shouldWithholdFromClassicIframe as shouldWithholdFromClassicIframe, pageOwnsInlineMeetingBooker };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { localStorageGet, localStorageRemove, localStorageSet } from "../../src/localstorage.js";
|
|
2
|
+
import { _extends } from "../../js/4101.js";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class AbstractLocalState {
|
|
7
|
+
// Returns persisted state if it exists and is not expired
|
|
8
|
+
get persistedState() {
|
|
9
|
+
// TODO: Technically there's no guarantee that localStorageGet returns a BasePersistedData<T>
|
|
10
|
+
const data = localStorageGet(this.KEY);
|
|
11
|
+
if (data && data.state && Number.isInteger(data.expiresAt) && data.expiresAt > Date.now()) {
|
|
12
|
+
return data.state;
|
|
13
|
+
} else {
|
|
14
|
+
this.clearPersistedState();
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
setPersistedState(state) {
|
|
19
|
+
localStorageSet(this.KEY, {
|
|
20
|
+
expiresAt: Date.now() + this.TTL,
|
|
21
|
+
state
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
updateStateAtKey(key, value) {
|
|
25
|
+
var _this_persistedState;
|
|
26
|
+
this.setPersistedState(_extends({}, (_this_persistedState = this.persistedState) != null ? _this_persistedState : {}, {
|
|
27
|
+
[key]: value
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
clearPersistedState() {
|
|
31
|
+
localStorageRemove(this.KEY);
|
|
32
|
+
}
|
|
33
|
+
constructor(){
|
|
34
|
+
this.TTL = 10 * 365 * 24 * 60 * 60 * 1000; // milliseconds, default 10 years
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { AbstractLocalState };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { getDefaultDebugMessage } from "../debug_state.js";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const STATUS_TAGS = {
|
|
5
|
+
missing: "[❓ Not Detected]",
|
|
6
|
+
success: "[✅ Success]",
|
|
7
|
+
error: "[❌ Error]"
|
|
8
|
+
};
|
|
9
|
+
class AbstractDebugFlow {
|
|
10
|
+
get textOutput() {
|
|
11
|
+
const lines = [
|
|
12
|
+
this.name
|
|
13
|
+
];
|
|
14
|
+
this.steps.forEach((step)=>{
|
|
15
|
+
const event = this.eventsMap[step];
|
|
16
|
+
if (!event) {
|
|
17
|
+
lines.push(STATUS_TAGS.missing + " " + getDefaultDebugMessage(step, "missing"));
|
|
18
|
+
} else {
|
|
19
|
+
lines.push(STATUS_TAGS[event.status] + " " + (event.message || getDefaultDebugMessage(step, event.status)));
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
return lines.join("\n");
|
|
23
|
+
}
|
|
24
|
+
constructor(eventsMap){
|
|
25
|
+
this.eventsMap = eventsMap;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { AbstractDebugFlow };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AbstractDebugFlow } from "./abstract_debug_flow.js";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class CustomFormFlow extends AbstractDebugFlow {
|
|
5
|
+
constructor(...args){
|
|
6
|
+
super(...args), this.name = "Custom Form Experience", this.steps = [
|
|
7
|
+
"debug:formSubmitCapture",
|
|
8
|
+
"api:saveFormData",
|
|
9
|
+
"api:showFormExperience"
|
|
10
|
+
];
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { CustomFormFlow };
|