!function(){"use strict";const e="__HS__FORMS__EMBED__",t="HubSpotFormsV4",s="HubspotFormsV4",n="__SECRET_INTERNAL_DO_NOT_USE";var i={mode:"compressed",staticDomainPrefix:"//static.hsappstatic.net",bender:{depVersions:{"ui-forms-embed-components-frame-parent":"static-1.1438","hs-lodash":"static-4.45","hs-test-utils":"static-1.7915",HubStyleTokens:"static-2.11358","jasmine-runner":"static-1.6371",quartz:"static-1.6872",react:"static-7.184","web-interactives-embed-framework":"static-2.5262","hubspot-url-utils":"static-1.4053",outpost:"static-1.4097","ui-forms-embed-components-performance":"static-1.1494","ui-forms-embed-components-library":"static-1.6808","ui-forms-embed-components-reporting":"static-1.6286","bend-plugin-trellis-migration":"static-1.3328","foundations-components":"static-1.7726","framer-motion":"static-1.70","hs-test-utils-bend-plugin":"static-1.3026",msw:"static-1.39","react-dom":"static-7.85","react-redux":"static-7.70",redux:"static-4.16","testing-library":"static-1.150","foundations-theming":"static-1.4316","quartz-config":"static-1.650",jasmine:"static-4.4227","webpack-env":"static-1.54",csstype:"static-1.50","quartz-core":"static-1.6091",enviro:"static-4.428",classnames:"static-2.10","hs-story-utils":"static-1.9333","styled-components":"static-2.88",StyleGuideUI:"static-3.485","bender-build-tools":"static-1.3063","bend-plugin-foundations-components":"static-1.3995","floating-ui":"static-1.54","foundations-assets":"static-1.4751","foundations-theming-specialty":"static-1.2032",I18n:"static-7.1603","metrics-js":"static-1.9545",moment:"static-3.26","react-aria":"static-1.64","react-select-plus":"static-1.65","react-utils":"static-2.5270","react-virtualized":"static-2.97","tanstack-table":"static-1.53","trellis-assets":"static-1.1539","ui-fonts":"static-1.620","ui-images":"static-2.1130","hoist-non-react-statics":"static-3.9","bend-plugin-foundations-theming":"static-1.2799","foundations-theming-base":"static-1.3301",stylex:"static-1.30",dispatcher:"static-1.134","general-store":"static-6.20",HeadJS:"static-2.735","hub-http":"static-1.6122","hub-http-janus":"static-1.819","hubspotter-http":"static-1.4574",icons:"static-2.639","mobile-manifest-mixins":"static-1.508","module-federation":"static-1.21",PortalIdParser:"static-2.388","quartz-auth":"static-1.547","quartz-head":"static-1.537","quartz-i18n":"static-1.547","quartz-routing":"static-1.302","quartz-test":"static-1.547","quartz-tracking":"static-1.251","quick-fetch":"static-1.3838",raven:"static-3.5832","raven-hubspot":"static-1.6139","react-rhumb":"static-1.16559",UIComponents:"static-3.8305","usage-tracker-container":"static-1.7228","usage-tracker-core":"static-1.7088","i18n-data":"static-1.219","moment-timezone":"static-5.81","react-input-autosize":"static-2.17",sassPrefix:"static-1.154","hub-http-shared-msw-handlers":"static-1.9736","hubspotter-http-shared-msw-handlers":"static-1.9734","hs-promise-rejection-tracking":"static-1.5492",history:"static-4.47","react-router-dom":"static-5.26","usage-tracker-session-replay":"static-1.4924",cssUtils:"static-1.770","head-dlb":"static-1.4938",HubStyle:"static-2.11666","ts-schema":"static-1.3999","amplitude-session-replay-browser":"static-1.58"},depPathPrefixes:{"ui-forms-embed-components-frame-parent":"/ui-forms-embed-components-frame-parent/static-1.1438","hs-lodash":"/hs-lodash/static-4.45","hs-test-utils":"/hs-test-utils/static-1.7915",HubStyleTokens:"/HubStyleTokens/static-2.11358","jasmine-runner":"/jasmine-runner/static-1.6371",quartz:"/quartz/static-1.6872",react:"/react/static-7.184","web-interactives-embed-framework":"/web-interactives-embed-framework/static-2.5262","hubspot-url-utils":"/hubspot-url-utils/static-1.4053",outpost:"/outpost/static-1.4097","ui-forms-embed-components-performance":"/ui-forms-embed-components-performance/static-1.1494","ui-forms-embed-components-library":"/ui-forms-embed-components-library/static-1.6808","ui-forms-embed-components-reporting":"/ui-forms-embed-components-reporting/static-1.6286","bend-plugin-trellis-migration":"/bend-plugin-trellis-migration/static-1.3328","foundations-components":"/foundations-components/static-1.7726","framer-motion":"/framer-motion/static-1.70","hs-test-utils-bend-plugin":"/hs-test-utils-bend-plugin/static-1.3026",msw:"/msw/static-1.39","react-dom":"/react-dom/static-7.85","react-redux":"/react-redux/static-7.70",redux:"/redux/static-4.16","testing-library":"/testing-library/static-1.150","foundations-theming":"/foundations-theming/static-1.4316","quartz-config":"/quartz-config/static-1.650",jasmine:"/jasmine/static-4.4227","webpack-env":"/webpack-env/static-1.54",csstype:"/csstype/static-1.50","quartz-core":"/quartz-core/static-1.6091",enviro:"/enviro/static-4.428",classnames:"/classnames/static-2.10","hs-story-utils":"/hs-story-utils/static-1.9333","styled-components":"/styled-components/static-2.88",StyleGuideUI:"/StyleGuideUI/static-3.485","bender-build-tools":"/bender-build-tools/static-1.3063","bend-plugin-foundations-components":"/bend-plugin-foundations-components/static-1.3995","floating-ui":"/floating-ui/static-1.54","foundations-assets":"/foundations-assets/static-1.4751","foundations-theming-specialty":"/foundations-theming-specialty/static-1.2032",I18n:"/I18n/static-7.1603","metrics-js":"/metrics-js/static-1.9545",moment:"/moment/static-3.26","react-aria":"/react-aria/static-1.64","react-select-plus":"/react-select-plus/static-1.65","react-utils":"/react-utils/static-2.5270","react-virtualized":"/react-virtualized/static-2.97","tanstack-table":"/tanstack-table/static-1.53","trellis-assets":"/trellis-assets/static-1.1539","ui-fonts":"/ui-fonts/static-1.620","ui-images":"/ui-images/static-2.1130","hoist-non-react-statics":"/hoist-non-react-statics/static-3.9","bend-plugin-foundations-theming":"/bend-plugin-foundations-theming/static-1.2799","foundations-theming-base":"/foundations-theming-base/static-1.3301",stylex:"/stylex/static-1.30",dispatcher:"/dispatcher/static-1.134","general-store":"/general-store/static-6.20",HeadJS:"/HeadJS/static-2.735","hub-http":"/hub-http/static-1.6122","hub-http-janus":"/hub-http-janus/static-1.819","hubspotter-http":"/hubspotter-http/static-1.4574",icons:"/icons/static-2.639","mobile-manifest-mixins":"/mobile-manifest-mixins/static-1.508","module-federation":"/module-federation/static-1.21",PortalIdParser:"/PortalIdParser/static-2.388","quartz-auth":"/quartz-auth/static-1.547","quartz-head":"/quartz-head/static-1.537","quartz-i18n":"/quartz-i18n/static-1.547","quartz-routing":"/quartz-routing/static-1.302","quartz-test":"/quartz-test/static-1.547","quartz-tracking":"/quartz-tracking/static-1.251","quick-fetch":"/quick-fetch/static-1.3838",raven:"/raven/static-3.5832","raven-hubspot":"/raven-hubspot/static-1.6139","react-rhumb":"/react-rhumb/static-1.16559",UIComponents:"/UIComponents/static-3.8305","usage-tracker-container":"/usage-tracker-container/static-1.7228","usage-tracker-core":"/usage-tracker-core/static-1.7088","i18n-data":"/i18n-data/static-1.219","moment-timezone":"/moment-timezone/static-5.81","react-input-autosize":"/react-input-autosize/static-2.17",sassPrefix:"/sassPrefix/static-1.154","hub-http-shared-msw-handlers":"/hub-http-shared-msw-handlers/static-1.9736","hubspotter-http-shared-msw-handlers":"/hubspotter-http-shared-msw-handlers/static-1.9734","hs-promise-rejection-tracking":"/hs-promise-rejection-tracking/static-1.5492",history:"/history/static-4.47","react-router-dom":"/react-router-dom/static-5.26","usage-tracker-session-replay":"/usage-tracker-session-replay/static-1.4924",cssUtils:"/cssUtils/static-1.770","head-dlb":"/head-dlb/static-1.4938",HubStyle:"/HubStyle/static-2.11666","ts-schema":"/ts-schema/static-1.3999","amplitude-session-replay-browser":"/amplitude-session-replay-browser/static-1.58"},bundlingPackage:"ui-forms-embed-components-frame-parent",bundlingPackageVersion:"static-1.1438",project:"ui-forms-embed-components-frame-parent",staticDomain:"//static.hsappstatic.net",staticDomainPrefix:"//static.hsappstatic.net"}};const r={RECEIVED_ANALYTICS:"HS_CTA_PARENT_RECEIVED_ANALYTICS",DEVICE_TYPE:"HS_CTA_PARENT_DEVICE_TYPE",PROXY_ANALYTICS_FN_CALLBACK:"HS_CTA_PARENT_PROXY_ANALYTICS_FN",INIT:"HS_CTA_PARENT_INIT",SHOWING_CTA:"HS_CTA_SHOWING_CTA",SEND_EXTRACTED_STYLES:"HS_SEND_EXTRACTED_STYLES",STARTED:"HS_CTA_STARTED",NAVIGATE_PAGE:"HS_CTA_NAVIGATE_PAGE",CLICK_EVENT:"HS_CTA_CLICK_EVENT",CLOSE_INTERACTIVE:"HS_CTA_CLOSE_INTERACTIVE",HAS_CLOSED:"HS_CTA_HAS_CLOSED",NEW_HEIGHT:"HS_CTA_NEW_HEIGHT",DISPLAY_CALL_TO_ACTION:"HS_DISPLAY_CALL_TO_ACTION",PROXY_ANALYTICS:"HS_CTA_PROXY_ANALYTICS",PROXY_ANALYTICS_FN:"HS_CTA_PROXY_ANALYTICS_FN",SEND_FORM_DEFINITION:"HS_SEND_FORM_DEFINITION",SEND_CTA_CONFIG:"HS_SEND_CTA_CONFIG",SEND_EMBED_CONTEXT:"HS_SEND_EMBED_CONTEXT",RECEIVE_FILTERED_STYLESHEETS:"RECEIVE_FILTERED_STYLESHEETS",SEND_STYLESHEETS:"SEND_STYLESHEETS",TRIGGER_CTA:"HS_CTA_TRIGGER_CTA",CTA_FORM_SUBMITTED:"HS_CTA_FORM_SUBMITTED",V4_FORM_READY:"HS_V4_FORM_READY",V4_RECAPTCHA_RENDER:"HS_V4_RECAPTCHA_RENDER",V4_RECAPTCHA_EXECUTE:"HS_V4_RECAPTCHA_EXECUTE",V4_RECAPTCHA_RESET:"HS_V4_RECAPTCHA_RESET",V4_RECAPTCHA_SUCCESS:"HS_V4_RECAPTCHA_SUCCESS",V4_RECAPTCHA_EXPIRED:"HS_V4_RECAPTCHA_EXPIRED",V4_RECAPTCHA_ERROR:"HS_V4_RECAPTCHA_ERROR",SEND_FORM_EXTRA_SUBMISSION_METADATA:"HS_SEND_FORM_EXTRA_SUBMISSION_METADATA",SEND_FORM_SUBMISSION_SUCCESS_INFO:"HS_SEND_FORM_SUBMISSION_SUCCESS_INFO",SEND_FORM_SUBMISSION_SUCCESS:"HS_SEND_FORM_SUBMISSION_SUCCESS",SEND_FORM_SUBMISSION_FAILED:"HS_SEND_FORM_SUBMISSION_FAILED",SEND_FORM_INTERACTION_NAVIGATE:"HS_SEND_FORM_INTERACTION_NAVIGATE",SEND_FORM_INTERACTION_NAVIGATE_NEXT:"HS_SEND_FORM_INTERACTION_NAVIGATE_NEXT",SEND_FORM_INTERACTION_NAVIGATE_PREVIOUS:"HS_SEND_FORM_INTERACTION_NAVIGATE_PREVIOUS",GET_FORM_FIELD_VALUES:"HS_GET_FORM_FIELD_VALUES",SEND_FORM_FIELD_VALUES:"HS_SEND_FORM_FIELD_VALUES",GET_FORM_SUBMISSION_METADATA:"HS_GET_FORM_SUBMISSION_METADATA",SEND_FORM_SUBMISSION_METADATA:"HS_SEND_FORM_SUBMISSION_METADATA",GET_FIELD_VALUE:"HS_GET_FIELD_VALUE",SET_FIELD_VALUE:"HS_SET_FIELD_VALUE",SEND_FIELD_VALUE:"HS_SEND_FIELD_VALUE",MEETINGS_BOOKING_SUCCESS:"HS_CTA_MEETINGS_BOOKING_SUCCESS"};function a(e,t={}){for(const s in t)Object.hasOwnProperty.call(t,s)&&(e.style[s]=t[s])}function o(...e){if(window.location.search.indexOf("hs_debug_interactive")>-1||window.location.host.includes("local.hsappstatic")){console.log("[web-interactives-embed]",...e);window.location.search.indexOf("hs_is_selenium")>-1&&console.log(...[...e].map((e=>JSON.stringify(e))))}}class c{constructor(){this.listeners=new Map}on(e,t){if(!this.listeners.has(e)){this.listeners.set(e,[t]);return}const s=this.listeners.get(e);this.listeners.set(e,[...s,t])}off(e){this.listeners.delete(e)}emit(e,t){const s=this.listeners.get(e);s&&s.length&&s.forEach((e=>e(t)))}reset(){this.listeners=new Map}}function d(){return new c}const l=(...e)=>{o("[GlobalIframeCommunication]",...e)};class u{constructor(){this.iframeCommunicators=new Map;this.eventEmitter=d();this.reset=()=>{this.eventEmitter.reset();this.iframeCommunicators=new Map}}registerHandler(e,t){this.eventEmitter.on(e,t)}registerHandlers(e){l("Registering handlers",e);Object.keys(e).forEach((t=>{const s=t,n=e[s];n&&this.registerHandler(s,n)}))}registerCommunicator(e,t){l("Registering communicator",t);const s=this.iframeCommunicators.get(t)||[];this.iframeCommunicators.set(t,[...s,e])}removeCommunicator(e){l("Removing Iframe Communicator from GlobalCommunication: ",e);this.iframeCommunicators.delete(e)}emit(e,t){l("Emitting event",{event:e,messagePayload:t});this.eventEmitter.emit(e,t)}broadcast(e,t){const s=this.iframeCommunicators.get(e);if(s){l("Broadcasting",s);s.forEach((e=>{e.sendMessage(t)}))}else l("Cannot find communcators array, not broadcasting",e,t)}broadcastAll(e){l("Broadcasting",e,"to all",this.iframeCommunicators);for(const[t,s]of this.iframeCommunicators)this.broadcast(t,e)}}var h=new u;function m(){return new MessageChannel}const p=(...e)=>{o("[iframeCommunication]",...e)};class f{constructor(e,t){this.queue=[];this.initialised=!1;this.events=new Map;this.eventEmitter=d();this.handleMessage=e=>{if(!e.data||!e.data.type)return;const{type:t,payload:s}=e.data;p("Handling message",{type:t,payload:s});this.eventEmitter.emit(t,s);h.emit(t,Object.assign({},s,{id:this.id}))};this.handleFrameLoaded=()=>{if(this.iframe.contentWindow){p("Iframe loaded",this.iframe);this.iframe.contentWindow.postMessage({type:r.INIT},"*",[this.channel.port2]);this.initialised=!0;this.flushQueue()}else p("Content window not there, not loading")};this.iframe=e;this.id=t;this.channel=m();this.channel.port1.onmessage=this.handleMessage;this.iframe.addEventListener("load",this.handleFrameLoaded);p("Iframe communication set up",t,e)}sendMessage({type:e,payload:t}){if(this.initialised){p("Posting message",{type:e,payload:t});try{this.channel.port1.postMessage({type:e,payload:t})}catch(s){p("Dropping non-serializable message",{type:e,payload:t},s)}}else{p("Queueing message",{type:e,payload:t});this.queue.push({type:e,payload:t})}}registerHandler(e,t){this.eventEmitter.on(e,t)}registerHandlers(e){p("Registering handlers in IframeCommunication",e);Object.keys(e).forEach((t=>{const s=t,n=e[s];n&&this.registerHandler(s,n)}))}removeHandler(e){p("Removing handler",e);this.eventEmitter.off(e)}remove(){p("Removing frame communicator:",this.id);this.channel.port1.close();h.removeCommunicator(this.id)}flushQueue(){if(this.initialised){p("Flushing queue",this.queue);this.queue.forEach((e=>{this.sendMessage(e)}))}else p("Not flushing queue, not initialised")}}function E(e,t){p("Creating iframe communication");const s=new f(e,t);h.registerCommunicator(s,t);return s}function _(e){const t=window.location.origin.startsWith("http:")?"http://":"https://";return e.startsWith(t)?e:`${t}${e.replace(/http(s)?:\/\//,"")}`}function g(e){e.style.border="none";e.style.height="100%";e.style.width="100%";e.style.visibility="hidden"}function b(e,t){const s=document.createElement("iframe");s.srcdoc=e;Object.keys(t).forEach((e=>{s.setAttribute(e,t[e])}));g(s);return s}function S(e,t){const s=document.createElement("iframe");s.src=_(e);Object.keys(t).forEach((e=>{s.setAttribute(e,t[e])}));g(s);return s}function I(e,t,s){e.startsWith("http")||(e=`https://${e}`);const n=new URL(e);n.searchParams.set(t,s);return n.href}const C=(...e)=>{o("[FrameComponent]",...e)},v=()=>{};class A{constructor({id:e,container:t,iframeSrc:s,resizeHeight:n,onFrameReady:i,useResponsiveStyling:r,extraAttributes:a={},srcdoc:o}){this.onFrameReady=v;this.resizeHeight=!0;this.handleHeightChange=({height:e})=>{if(!this.resizeHeight)return;const t=e+2*parseInt(getComputedStyle(this.iframe).borderTopWidth,10);C("Handle height change",this.id,{adjustedHeight:t,height:e});this.setContainerStyle({height:`${t}px`})};this.id=e;this.resizeHeight=n;if(r&&s){C("Responsive styling is enabled",e);s=I(s,"enableResponsiveStyles","true")}if(s)this.iframe=S(s,a);else if(o)this.iframe=b(o,a);else{C("No iframeSrc or srcdoc provided, creating empty iframe",e);this.iframe=S("",a)}this.container=t;this.iframeCommunicator=E(this.iframe,e);i&&(this.onFrameReady=i);t.appendChild(this.iframe);this.registerHandlers()}registerHandlers(){this.iframeCommunicator.registerHandlers({[r.STARTED]:this.onFrameReady,[r.NEW_HEIGHT]:this.handleHeightChange})}setStyle(e){C("Set style",this.id,e);a(this.iframe,e)}setShouldResize(e){this.resizeHeight=e}setContainerStyle(e){a(this.container,e)}}function y(e){return new A(e)}class w{constructor(e,t){this.listeners=new Set;this.batching=!1;this.queue=[];this.subscribe=e=>{this.listeners.add(e);let t=()=>{};this.options&&this.options.onSubscribe&&(t=this.options.onSubscribe(e,this));return()=>{this.listeners.delete(e);t()}};this.setState=e=>{const t=this.state;this.options&&this.options.updateFn?this.state=this.options.updateFn(t)(e):this.state=e(t);if(this.state!==t){this.queue.push((()=>{this.listeners.forEach((e=>e(this.state,t)));this.options&&this.options.onUpdate&&this.options.onUpdate(this.state,t)}));this._flush()}};this._flush=()=>{if(!this.batching){this.queue.forEach((e=>e()));this.queue=[]}};this.batch=e=>{this.batching=!0;e();this.batching=!1;this._flush()};this.state=e;this.options=t}}function T(e,t=!1){!window.navigator.userAgent.includes("Firefox")&&t?window.open(e,"_blank","noopener"):window.location.assign(e)}const F="hubspotutk",R="__hstc",N="__hssc",O=e=>{const t=document.cookie.match(`(^|[^;]+)\\s*${e}\\s*=\\s*([^;]+)`);return t?t.pop():""},M=()=>O(F),D=()=>O(R),V=()=>O(N),P=(...e)=>{o("[models/Analytics]",...e)};class H{constructor(){this._handleFetchSucceded=e=>{this.store.setState((t=>{const s={};s.path=e.path;s.referrerPath=e.referrerPath;s.referrer="";s.analyticsPageId=e.pageId;s.hsfp=e._getFingerprint();s.canonicalUrl=e.canonicalUrl;s.contentType=e.contentType;s.pageId=H.getPageId()||e.pageId;e.session&&(s.hssc=e.session.get());if(e.utk){s.hstc=e.utk.get();s.hutk=e.utk.visitor}return Object.assign({},t,s,{isLoaded:!0})}))};window._hsq=window._hsq||[];const e={isLoaded:!1,pageUrl:window.location.href,pageTitle:window.document.title,referrer:window.document.referrer,userAgent:window.navigator.userAgent,hutk:M(),hssc:V(),hstc:D(),pageId:H.getPageId()};this.store=new w(e);this.fetchAnalytics()}fetchAnalytics(){this._analyticsQueue.push(this._handleFetchSucceded)}refresh(){const e=new Promise((e=>{this._analyticsQueue.push((t=>{this._handleFetchSucceded(t);e()}))})),t=new Promise((e=>setTimeout(e,100)));return Promise.race([e,t])}subscribe(e){return this.store.subscribe(e)}get analytics(){return this.store.state}track(e){P("Tracking analytics",e);this._analyticsQueue.push(e)}get _analyticsQueue(){return window._hsq}static getPageId(){const e=window.hsVars;return e&&e.analytics_page_id?e.analytics_page_id:e&&e.page_id?e.page_id:null}static getLanguage(){const e=window.hsVars;return e&&e.language?e.language:null}}var U=new H;const x=(...e)=>{o("[AnalyticsProxyController]",...e)},L=["trackFormView","trackFormVisible","trackFormInteraction"];class k{constructor({applicationController:e,analyticsStore:t}){this.viewQueue=new Map;this.applicationController=e;this.analyticsStore=t;this.listenForAnalyticsUpdate();this.listenForProxyMessage()}listenForAnalyticsUpdate(){this.analyticsStore.subscribe(((e,t)=>{!t.isLoaded&&e.isLoaded&&h.broadcastAll({type:r.RECEIVED_ANALYTICS,payload:e})}))}flushViewQueue(e){const t=this.viewQueue.get(e)||[];for(const e of t)this.analyticsStore.track(e);this.viewQueue.delete(e)}handleFormView(e,t){const s=this.applicationController.viewedStore;if(s&&s.hasBeenViewed(e)){this.analyticsStore.track(t);return}const n=this.viewQueue.get(e)||[];x("Adding form view to analytics queue",{id:e,analytics:t});this.viewQueue.set(e,[...n,t])}listenForProxyMessage(){h.registerHandlers({[r.PROXY_ANALYTICS]:({analytics:e,id:t})=>{k.isFormView(e)?this.handleFormView(t,e):this.analyticsStore.track(e)}})}static isFormView(e){const[t]=e;return L.includes(t)}}class q{constructor({applicationController:e}){this.applicationController=e;this.listenForNavigation()}listenForNavigation(){h.registerHandlers({[r.NAVIGATE_PAGE]:({url:e,openNewTab:t,id:s})=>{const n=this.applicationController.getNavigationUrl({url:e,openNewTab:t},s);if(t)return;T(n,this.applicationController.getShouldOpenNewTab({url:e,openNewTab:t},s))}})}}class j{constructor(){this.extractedStyles={rules:{},keyframes:{}};this.crossOriginStyleSheets=new Set}extractStyles(){const e={rules:{},keyframes:{}};for(const t of document.styleSheets)if(!this.crossOriginStyleSheets.has(t))try{const s=t.cssRules||t.rules;for(const t of s)t instanceof CSSStyleRule?e.rules[t.selectorText]=this.extractProperties(t.style):t instanceof CSSKeyframesRule&&(e.keyframes[t.name]=this.extractKeyframes(t))}catch(e){this.crossOriginStyleSheets.add(t)}this.extractedStyles=e}extractProperties(e){const t={};for(const s of Array.from(e))t[s]=e.getPropertyValue(s);return t}extractKeyframes(e){const t=[];for(const s of e.cssRules){if(!(s instanceof CSSKeyframeRule))continue;const e=this.extractProperties(s.style);t.push({keyText:s.keyText,style:e})}return t}}class G{constructor(){this.analyticsStore=U;this.analyticsProxyController=new k({analyticsStore:this.analyticsStore,applicationController:this});this.navigationProxyController=new q({applicationController:this});this.styleExtractorController=new j}getNavigationUrl(e,t){return e.url}getShouldOpenNewTab(e,t){return e.openNewTab}}class ${constructor(){this.handleIntersection=e=>{e.forEach((e=>{if(e.isIntersecting){const t=e.target;this.onElementAppear(t);this.observedElements.delete(t);this.observer.unobserve(t)}}))};this.observer=new IntersectionObserver(this.handleIntersection,{threshold:.5});this.observedElements=new Map}onElementAppear(e){const t=this.observedElements.get(e);t&&t(e)}observe(e,t){if((()=>{const t=e.getBoundingClientRect(),s=window.innerHeight;return t.bottom>=0&&t.top!s.has(e))))}function Y(e,t){const s=new Map(e);for(const[e,n]of t)s.set(e,n);return s}const Q="hs-form-frame",X="data-env",W="data-form-id",K="data-portal-id",J="data-instance-id",Z="data-region",ee="data-test-id",te="embedded-form-",se="title";var ne=()=>Array.from(document.getElementsByClassName(Q));const ie="na1",re="prod";var ae=()=>"randomUUID"in crypto?crypto.randomUUID():([1e7]+-1e3+-4e3+8e3+-1e11).replace(/[018]/g,(e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)));const oe=(e,t)=>e.getAttribute(t)||"";var ce=e=>({formId:oe(e,W),portalId:Number(oe(e,K)),region:oe(e,Z)||ie,env:oe(e,X)||re,instanceId:oe(e,J)||ae()});const de=/^[{]?[0-9a-fA-F]{8}-?([0-9a-fA-F]{4}-?){3}[0-9a-fA-F]{12}[}]?$/,le=["qa","prod"];var ue=e=>{const{portalId:t,formId:s,env:n,instanceId:i}=e;return!(t<1)&&(!!de.test(s)&&(!!le.includes(n)&&!!i))};function he(e,t=ne()){const s=new Map,n=new Map;t.forEach((t=>{if(e.embedContextsMap.has(t))return;const i=ce(t);if(!ue(i)){console.error(`${i} has missing or invalid data attributes.`);return}const{formId:r}=i;s.set(r,[...s.get(r)||[],t]);n.set(t,i)}));return{formContainerElementsMap:s,embedContextsMap:n}}function me(e,t,s=5){if(!(s<0)&&e.nodeType===Node.ELEMENT_NODE){const n=e;n.classList.contains(Q)&&t.push(n);n.childNodes.forEach((e=>{me(e,t,s-1)}))}}function pe(e){const t=new MutationObserver((t=>{const s=[];for(const e of t)if("childList"===e.type)for(const t of e.addedNodes)me(t,s);s.length&&e(s)}));t.observe(document.body,{childList:!0,subtree:!0});return()=>{t.disconnect()}}const fe=h;var Ee=e=>{(new Image).src=e};const _e="https://forms{{region}}.hsforms{{env}}.com/embed/v3",ge=({env:e,region:t})=>{const s=t?`-${t}`:"",n="qa"===e?"qa":"";return _e.replace("{{region}}",s).replace("{{env}}",n)};var be=(e="",t=1,s={env:"",region:""})=>{Ee(`${ge(s)}/counters.gif?key=${e}&count=${t}`)};var Se={FORM_FRAME_LOAD_SUCCESS:"form-frame-load-success"};const Ie="?";function Ce(){return"undefined"==typeof document||null==document.location?"":document.location.href}function ve(){return"undefined"==typeof document||null==document.location?"":document.location.origin?document.location.origin:`${document.location.protocol}//${document.location.hostname}${document.location.port?`:${document.location.port}`:""}`}function Ae(e){if(void 0===e.stack||!e.stack)return null;const t=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|native|eval|webpack||[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,s=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx(?:-web)|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,n=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,i=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,r=/\((\S*)(?::(\d+))(?::(\d+))\)/,a=e.stack.split("\n"),o=[];let c,d,l;for(let u=0,h=a.length;u eval")>-1&&(c=i.exec(d[3]))){d[3]=c[1];d[4]=c[2];d[5]=null}else 0!==u||d[5]||void 0===e.columnNumber||(o[0].column=e.columnNumber+1);l={filename:d[3],function:d[1]||Ie,args:d[2]?d[2].split(","):[],lineno:d[4]?+d[4]:null,colno:d[5]?+d[5]:null}}!l.function&&l.line&&(l.function=Ie);if(l.filename&&"blob:"===l.filename.substr(0,5)){const e=new XMLHttpRequest;e.open("GET",l.filename,!1);e.send(null);if(200===e.status){let t=e.responseText||"";t=t.slice(-300);const s=t.match(/\/\/# sourceMappingURL=(.*)$/);if(s){let e=s[1];"~"===e.charAt(0)&&(e=ve()+e.slice(1));l.url=e.slice(0,-4)}}}o.push(l)}return o.length?{name:e.name,message:e.message,url:Ce(),stack:o}:null}function ye(e,t,s){const n={filename:t,lineno:s};if(n.filename&&n.lineno){e.incomplete=!1;n.function||(n.function=Ie);if(e.stack.length>0&&e.stack[0].filename===n.filename){if(e.stack[0].lineno===n.lineno)return!1;if(!e.stack[0].lineno&&e.stack[0].function===n.function){e.stack[0].lineno=n.lineno;return!1}}e.stack.unshift(n);e.partial=!0;return!0}e.incomplete=!0;return!1}function we(e,t){const s=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,n=[],i={};let r,a,o=!1;for(let e=we.caller;e&&!o;e=e.caller)if(e!==Te){a={filename:null,function:Ie,lineno:null,colno:null};e.name?a.function=e.name:(r=s.exec(e.toString()))&&(a.function=r[1]);if(void 0===a.function)try{a.function=r.input.substring(0,r.input.indexOf("{"))}catch(e){}i[`${e}`]?o=!0:i[`${e}`]=!0;n.push(a)}t&&n.splice(0,t);const c={name:e.name,message:e.message,filename:Ce(),stack:n};ye(c,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description);return c}function Te(e,t){if("string"==typeof e)return{name:"Error",message:e,filename:Ce()};let s=null;t=null==t?0:+t;try{s=Ae(e);if(s)return s}catch(e){}try{s=we(e,t+1);if(s)return s}catch(e){}return{name:e.name,message:e.message,filename:Ce()}}const Fe=[/timeout exceeded/,/Request aborted/,/Network Error/,/Failed to execute 'send' on 'XMLHttpRequest'/,/Unexpected end of JSON input/,/Unexpected token/,/IP_ADDRESS_IS_PROBABLY_A_BOT/,/SUBMISSION_PERIOD_ENDED/,/RATE_LIMIT_EXCEEDED/,/Failed to execute 'removeChild' on 'Node'/,/Failed to execute 'insertBefore' on 'Node'/],Re=[/\/OtAutoBlock\.js/,/\/mootools\.js/],Ne=[/ui-forms-embed-components/,/embed-default-modules/,/\/?forms\/embed\/(frame(-v2)?|\d+)\.js/,/web-interactives-embed-framework/],Oe=(e,t)=>{const s=Te(e),n=s.stack?s.stack[0].filename:s.filename;return Ne.some((t=>t.test(e.stack||"")))&&(!!t||Ne.some((e=>e.test(n))))};var Me=(e,t=!1)=>{if(!e)return!1;const{message:s="",stack:n=""}=e;return Boolean(s&&n&&Oe(e,t)&&!Fe.find((e=>e.test(s)))&&!Re.find((e=>e.test(n))))};const De={APP:"app",APP_API:"app-api"};function Ve(e,t){const s=t&&t.hubletOverride?t.hubletOverride:e,n=t&&!0===t.hubletizeNa1;return s!==ie||n?`-${s}`:""}function Pe(e,t,s){if(s&&s.hubletPostfixLocation&&"domain"===s.hubletPostfixLocation)return t;t===De.APP_API&&(t=De.APP);return`${t}${Ve(e,s)}`}function He(e,t,s){return`${xe(s)}${Ue(t,s)}${Le(e,s)}`}function Ue(e,t){return"qa"===(t&&t.envOverride?t.envOverride:e)?"qa":""}function xe(e){return e&&e.domainOverride?e.domainOverride:"hubspot"}function Le(e,t){return t&&t.hubletPostfixLocation&&"domain"===t.hubletPostfixLocation?Ve(e,t):""}function ke(e){return e&&e.tldOverride?e.tldOverride:"com"}function qe(e){return e===De.APP_API?"/api":""}function je(e,t,s,n){return`https://${Pe(t,e,n)}.${He(t,s,n)}.${ke(n)}${qe(e)}`}const Ge="eeb5bcc1447eba257645d7fee6f7a0b7";var $e=({hublet:e=ie,env:t})=>`${je("exceptions",e,"qa"===t?"qa":"prod",{tldOverride:"com"})}/v2/api/store?sentry_key=${Ge}`;var ze=()=>"randomUUID"in crypto?crypto.randomUUID():([1e7]+-1e3+-4e3+8e3+-1e11).replace(/[018]/g,(e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)));var Be=(e,t,{env:s="prod",url:n="",query:i="",version:r="",hublet:a="",tags:o={},user:c={},extra:d={}})=>{const l=Date.now()/1e3,u=Te(t);return{environment:s,tags:Object.assign({region:a},o),logger:"javascript",platform:"javascript",request:{headers:{"User-Agent":navigator.userAgent},url:n||window.location.href,queryString:i.replace(/^\?/,"")},event_id:ze().replace(/-/g,""),transaction:u.stack?u.stack[0].filename:u.filename,level:e,exception:{values:[{mechanism:{handled:!0,type:"generic"},type:u.name,value:u.message,stacktrace:{frames:u.stack?u.stack.reverse():[]}}]},timestamp:l,version:r,user:c,extra:d}};var Ye=(e="",t,s={})=>{const n=Be(e,t,s);fetch($e(s),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),keepalive:!0})};var Qe=(e,t,s)=>{const{env:n,hublet:i,formId:r,portalId:a,pageUrl:o}=e,{renderVersion:c,projectVersion:d,module:l}=t,{key:u,error:h,data:m}=s;if(Me(h)){const e=new URL(o);Ye("error",h,{type:"Error",env:n,hublet:i,url:e.href,query:e.search,tags:{renderVersion:c,projectVersion:d,key:u,module:l},extra:{key:u,data:JSON.stringify(m),formId:r,portalId:a}})}};var Xe=({formId:e="",portalId:t="",hublet:s=ie,isQa:n=!1,key:i,error:r="",data:a={}})=>{const o={formId:e,portalId:t,env:n?"qa":"prod",hublet:s,pageUrl:window.location.href},c={renderVersion:"1",projectVersion:"1",module:"ui-forms-embed-components-frame-parent"},d={key:i,error:r,data:a.response&&a.response.data?a.response.data:a};Qe(o,c,d)};const We="FORM_FRAME_RENDER_ERROR";let Ke=!1;var Je=({defaultUrl:e,region:t,isQa:s})=>{let n=null;if(!("true"===new URLSearchParams(window.location.search).get("_hsFormsRenderingTestTool_Do_Not_Use"))||Ke)return;const i=new URL(e),r=new URL(je("tools",t&&t.length>0?t:ie,s?"qa":"prod",{domainOverride:"hubteam"})),a=e=>{var t;if("hs-forms:render-tool:iframe-ready"===(null===(t=e.data)||void 0===t?void 0:t.type)&&e.origin===i.origin){n=e.source;window.parent.postMessage({type:"hs-forms:render-tool:iframe-ready"},r.href)}},o=e=>{var t;if("hs-forms:render-tool:init-log-channel"===(null===(t=e.data)||void 0===t?void 0:t.type)&&e.ports[0]&&e.origin===r.origin){const t=new MessageChannel;t.port1.onmessage=t=>{e.ports[0].postMessage(t.data)};if(!n)return;n.postMessage({type:"hs-forms:render-tool:init-log-channel"},{targetOrigin:i.origin,transfer:[t.port2]});Ke=!0;window.removeEventListener("message",a);window.removeEventListener("message",o)}};window.addEventListener("message",a);window.addEventListener("message",o)};class Ze{constructor({embedContext:e,container:t,iframeSrc:s}){this.handleLoad=()=>{this.frameComponent.setStyle({visibility:""})};this.sendEmbedContextWithInstanceId=e=>{this.frameComponent.iframeCommunicator.sendMessage({type:r.SEND_EMBED_CONTEXT,payload:e})};this.listenForV4FormReadyEvent=()=>{fe.registerHandlers({[r.V4_FORM_READY]:({instanceId:e})=>{this.sendEmbedContextWithInstanceId(Object.assign({},this.embedContext,{instanceId:e}))}})};this.listenForLoad();this.container=t;this.initContainer();this.embedContext=e;this.frameComponent=y({iframeSrc:s,container:t,id:e.formId,onFrameReady:this.resolveFrameload,resizeHeight:!0,extraAttributes:{[ee]:`${te}${e.formId}`,[se]:"Form",scrolling:"no"}});this.listenForV4FormReadyEvent()}initContainer(){this.container.style.height="0";this.container.replaceChildren()}listenForLoad(){const e=new Promise((e=>{this.resolveFrameload=e}));Promise.all([e]).then((()=>{this.handleLoad();be(Se.FORM_FRAME_LOAD_SUCCESS,1,{env:this.embedContext.env,region:this.embedContext.region})})).catch((e=>{Xe({formId:this.embedContext.formId,portalId:this.embedContext.portalId.toString(),hublet:this.embedContext.region,isQa:"qa"===this.embedContext.env,key:We,error:e instanceof Error?e:new Error(String(e))})}))}}function et({embedContext:e,container:t,iframeSrc:s}){Je({defaultUrl:s,isQa:"qa"===e.env,region:e.region});return new Ze({embedContext:e,container:t,iframeSrc:s})}var tt=({subDomainPrefix:e,hublet:t,isQa:s,pathname:n="",pathValues:i={},domainOverride:r,tldOverride:a,query:o})=>{const c=Object.keys(i).reduce(((e,t)=>e.replace(RegExp(`{{${t}}}`,"g"),i[t])),n),d=je(e,t||ie,s?"qa":"prod",{domainOverride:r,tldOverride:a}),l=new URL(c,d);if(o)for(const[e,t]of Object.entries(o))l.searchParams.append(e,t);return l.href};function st({portalId:e,formId:t,region:s,env:n,hutk:i,instanceId:r}){const a=Object.assign({},Object.fromEntries(new URLSearchParams(window.location.search))),o="true"===a.isLocal,c={hublet:o?ie:s,isQa:!o&&"qa"===n,subDomainPrefix:o?"local":"js",domainOverride:o?"hsappstatic":"hsforms",tldOverride:"net"},d=Object.assign({_hsPortalId:`${e||""}`,_hsFormId:t||"",_hsIsQa:`${"qa"===n}`,_hsHublet:s||ie,_hsDisableScriptloader:"true",_hsDisableRedirect:"true",_hsInstanceId:r},i&&{_hsUtk:i},a);return tt(Object.assign({},c,{pathname:o?"ui-forms-embed-components-app/static/html/frame.html":"ui-forms-embed-components-app/frame.html",query:d}))}const nt=()=>{var e,t;return{pageUrl:window.location.href,pageTitle:window.document.title,referrer:window.document.referrer,pageId:(null===(e=window.hsVars)||void 0===e?void 0:e.analytics_page_id)||(null===(t=window.hsVars)||void 0===t?void 0:t.page_id)||null,isHubSpotCmsGeneratedPage:Boolean(window.document.querySelector('meta[name="generator"][content="HubSpot"]'))}};class it{constructor({embeddedContainers:e,handleView:t,analyticsStore:s}){this.elementObserver=z();this.embedComponents=new Map;this.embeddedContainers=e;this.handleView=t;this.analyticsStore=s;this.listenForEmbeddedContainers()}listenForEmbeddedContainers(){this.embeddedContainers.subscribe(((e,t)=>{const s=B(t.embedContextsMap,e.embedContextsMap);this.createViews([...s]);this.listenForElementViews([...s])}))}listenForElementViews(e){for(const t of e){const e=this.embeddedContainers.embedContextsMap.get(t);if(!e)return;this.elementObserver.observe(t,(()=>this.handleView(e.formId)))}}createViews(e){for(const t of e){const e=this.embeddedContainers.embedContextsMap.get(t);if(!e)continue;if(this.embedComponents.has(t))continue;const s=this.analyticsStore.analytics.hutk,n=et({embedContext:Object.assign({},e,nt(),s&&{hutk:s}),container:t,iframeSrc:st({hutk:s,instanceId:e.instanceId,portalId:e.portalId,formId:e.formId,region:e.region,env:e.env})});this.embedComponents.set(t,n)}}}function rt(e){return new it(e)}class at{constructor(){const e={formContainerElementsMap:new Map,embedContextsMap:new Map};this.store=new w(e)}subscribe(e){return this.store.subscribe(e)}get formContainerElements(){return this.store.state.formContainerElementsMap}get embedContextsMap(){return this.store.state.embedContextsMap}getFrameContainerFromInstanceId(e){const t=Array.from(this.store.state.embedContextsMap.entries()).find((([,t])=>t.instanceId===e));if(!t)throw new Error(`No embed context found for instanceId: ${e}`);return t[0]}addElements(e){this.store.setState((t=>({formContainerElementsMap:Y(t.formContainerElementsMap,e.formContainerElementsMap),embedContextsMap:Y(t.embedContextsMap,e.embedContextsMap)})))}}class ot{constructor(){this.markAsViewed=e=>{this.store.setState((t=>Object.assign({},t,{viewed:new Set([...t.viewed,e])})))};const e={viewed:new Set};this.store=new w(e)}subscribe(e){this.store.subscribe(e)}hasBeenViewed(e){return this.store.state.viewed.has(e)}get viewed(){return this.store.state.viewed}}function ct(){return new ot}const dt=window;class lt{constructor(e){this.formData=e;this.attachToWindow()}init(e){const{instanceId:t,formId:s}=e;this.createFormInstanceMethods(e);this.formData.setFormInstanceInfo({instanceId:t,formInfo:{formId:s}})}attachToWindow(){Object.prototype.hasOwnProperty.call(dt,t)||Object.defineProperty(dt,t,{value:{[n]:{_forms:new Map,_setFormInstanceMethods({instanceId:e,instanceMethods:t}){const s=this[n],i=s._forms.get(e);s._forms.set(e,Object.assign({},i,{instanceMethods:t}))},_setFormGlobalVisibleEvent({instanceId:e,eventDetails:t}){const s=this[n],i=s._forms.get(e);s._forms.set(e,Object.assign({},i,{globalVisibleEvent:{eventDetails:t}}))},_getFormInstanceMethodsByInstanceId(e){var t;return null===(t=this[n]._forms.get(e))||void 0===t?void 0:t.instanceMethods}},getForms(){return Array.from(this[n]._forms.values()).map((e=>e.instanceMethods)).filter((e=>void 0!==e))},getFormFromEvent({detail:{instanceId:e}}){return this[n]._getFormInstanceMethodsByInstanceId.call(this,e)}},writable:!1,configurable:!0});dt[s]=dt[t]}createFormInstanceMethods(e){const{instanceId:t,formId:s}=e,{clientApi:n,__internalApi:i}=this.getFormInternalApi()||{};n&&i&&!i._getFormInstanceMethodsByInstanceId.call(n,t)&&i._setFormInstanceMethods.call(n,{instanceId:t,instanceMethods:{getFieldValue:t=>this.getFieldValue(e,t),getFormId:()=>s,getInstanceId:()=>t,getRedirectUrl:()=>this.formData.getRedirectUrl(t),getConversionId:()=>this.formData.getConversionId(t),getFormFieldValues:()=>this.getFormFieldValues(e),setFieldValue:(t,s)=>this.setFieldValue({baseFormInfo:e,propertyReference:t,value:s}),setExtraSubmissionMetadata:e=>this.sendExtraSubmissionMetadata({formId:s,instanceId:t,metadata:e})}})}sendExtraSubmissionMetadata(e){const{formId:t}=e;fe.broadcast(t,{type:r.SEND_FORM_EXTRA_SUBMISSION_METADATA,payload:e})}setFieldValue({baseFormInfo:e,propertyReference:t,value:s}){const{formId:n,instanceId:i}=e;fe.broadcast(n,{type:r.SET_FIELD_VALUE,payload:{instanceId:i,propertyReference:t,value:s}})}async getFormFieldValues(e){let t;const{formId:s}=e,n=new Promise((e=>{t=e}));this.listenForSendFormFieldValues(t);fe.broadcast(s,{type:r.GET_FORM_FIELD_VALUES,payload:e});return await n.then((e=>e))}async getFieldValue(e,t){let s;const{formId:n,instanceId:i}=e,a=new Promise((e=>{s=e}));this.listenForSendFieldValue(s);fe.broadcast(n,{type:r.GET_FIELD_VALUE,payload:{instanceId:i,propertyReference:t}});return await a.then((e=>e))}listenForSendFormFieldValues(e){fe.registerHandlers({[r.SEND_FORM_FIELD_VALUES]:({formFieldValues:t})=>{null==e||e(t)}})}listenForSendFieldValue(e){fe.registerHandlers({[r.SEND_FIELD_VALUE]:({fieldValue:t})=>{null==e||e(t)}})}getFormInternalApi(){const e=dt[t];if(e&&e[n])return{clientApi:e,__internalApi:e[n]}}}function ut(e){return new lt(e)}const ht=e=>{if(!e)return;e.getBoundingClientRect().top<0&&e.scrollIntoView({behavior:"smooth",block:"start"})},mt={ON_FORM_READY:"hs-form-event:on-ready",ON_FORM_SUBMISSION_SUCCESS:"hs-form-event:on-submission:success",ON_FORM_SUBMISSION_FAILED:"hs-form-event:on-submission:failed",ON_FORM_INTERACTION_NAVIGATE:"hs-form-event:on-interaction:navigate",ON_FORM_INTERACTION_NAVIGATE_NEXT:"hs-form-event:on-interaction:navigate:next",ON_FORM_INTERACTION_NAVIGATE_PREVIOUS:"hs-form-event:on-interaction:navigate:previous"};class pt{constructor(e,t){this.formData=e;this.embeddedContainers=t}init({initialiseThirdPartyApi:e}){this.listenForFormReadyEvent({initialiseThirdPartyApi:e});this.listenForFormNavigationEvent();this.listenForFormNavigationNextEvent();this.listenForFormNavigationPreviousEvent();this.listenForSubmissionSuccessEvent();this.listenForSubmissionFailedEvent()}listenForFormReadyEvent({initialiseThirdPartyApi:e}){fe.registerHandlers({[r.V4_FORM_READY]:t=>{e(t);this.triggerGlobalEvent(Object.assign({},t,{type:mt.ON_FORM_READY}))}})}listenForSubmissionSuccessEvent(){fe.registerHandlers({[r.SEND_FORM_SUBMISSION_SUCCESS]:({formId:e,instanceId:t})=>{this.triggerGlobalEvent({type:mt.ON_FORM_SUBMISSION_SUCCESS,instanceId:t,formId:e})}})}listenForFormNavigationEvent(){fe.registerHandlers({[r.SEND_FORM_INTERACTION_NAVIGATE]:e=>{this.triggerGlobalEvent(Object.assign({},e,{type:mt.ON_FORM_INTERACTION_NAVIGATE}))}})}listenForFormNavigationNextEvent(){fe.registerHandlers({[r.SEND_FORM_INTERACTION_NAVIGATE_NEXT]:e=>{const t=this.embeddedContainers.getFrameContainerFromInstanceId(e.instanceId);t&&ht(t);this.triggerGlobalEvent(Object.assign({},e,{type:mt.ON_FORM_INTERACTION_NAVIGATE_NEXT}))}})}listenForFormNavigationPreviousEvent(){fe.registerHandlers({[r.SEND_FORM_INTERACTION_NAVIGATE_PREVIOUS]:e=>{this.triggerGlobalEvent(Object.assign({},e,{type:mt.ON_FORM_INTERACTION_NAVIGATE_PREVIOUS}))}})}listenForSubmissionFailedEvent(){fe.registerHandlers({[r.SEND_FORM_SUBMISSION_FAILED]:({formId:e,instanceId:t})=>{this.triggerGlobalEvent({type:mt.ON_FORM_SUBMISSION_FAILED,instanceId:t,formId:e})}})}triggerGlobalEvent({type:e,instanceId:t,formId:s}){if(document&&void 0!==typeof window&&window&&window.CustomEvent){const n=this.embeddedContainers.getFrameContainerFromInstanceId(t)||document,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:{formId:s,instanceId:t}});n.dispatchEvent(i)}}}function ft(e,t){return new pt(e,t)}class Et{constructor(){this.formDataMap=new Map}setFormInstanceInfo({instanceId:e,formInfo:t}){const s=this.formDataMap.get(e)||{};this.formDataMap.set(e,Object.assign({},s,t))}getRedirectUrl(e){var t;return(null===(t=this.formDataMap.get(e))||void 0===t?void 0:t.redirectUrl)||""}getConversionId(e){var t;return(null===(t=this.formDataMap.get(e))||void 0===t?void 0:t.conversionId)||""}}var _t=Et;const gt="__INTERNAL_PERFORMANCE__",bt=(e,t=2)=>Number.isFinite(e)?Math.round(e*10**t)/10**t:e,St=e=>{if(!window.performance||"function"!=typeof window.performance.getEntriesByType)return{};const t=performance.getEntriesByType("navigation");if(!t||0===t.length)return{};const s=t[0],n={parentDomInteractive:bt(s.domInteractive),parentPageLoad:bt(s.loadEventEnd)},i=performance.getEntriesByType("resource").find((t=>"iframe"===t.initiatorType&&t.name.includes(`_hsInstanceId=${e.instanceId}`)&&t.name.includes(`_hsFormId=${e.formId}`)));i&&(n.parentFrameMounted=bt(i.startTime));return n},It="https://google.com/recaptcha/enterprise.js",Ct="https://recaptcha.net/recaptcha/enterprise.js",vt=()=>{var e;return window&&window.grecaptcha&&(null===(e=window.grecaptcha)||void 0===e?void 0:e.enterprise)||void 0},At=({src:e,onError:t})=>{const s=window.document.createElement("script");s.async=!0;s.defer=!0;s.type="text/javascript";s.onerror=t;s.src=e;return s},yt=({callbackId:e,locale:t})=>{const s=At({src:`${It}?&onload=${e}&render=explicit&hl=${t}`,onError:()=>{const s=At({src:`${Ct}?&onload=${e}&render=explicit&hl=${t}`,onError:e=>{throw e}});window.document.head.appendChild(s)}});window.document.head.appendChild(s)},wt="hs-forms-embed-frame-recaptcha";class Tt{constructor(){this.handleRenderRecaptcha=({callbackId:e,UUID:t,sitekey:s,inherit:n,size:i,badge:r,locale:a})=>{const o=()=>{const e=this.createRecaptchaTarget(t),a={target:e},o=vt();if(o&&e&&a){const c=o.render(e,{sitekey:s,callback:e=>{this.onSuccess(e,t)},"expired-callback":()=>{this.onExpired(t)},"error-callback":()=>{this.onError()},size:i,badge:r},n);this.recaptchas.set(t,Object.assign({},a,{widgetId:c}))}};if(this.recaptchaLoaded)o();else if(this.recaptchaLoadQueued)this.renderQueue.push(o);else{this.recaptchaLoadQueued=!0;this.renderQueue.push(o);window[e]=()=>{this.recaptchaLoaded=!0;this.renderQueue.forEach((e=>e()));this.renderQueue=[]};yt({callbackId:e,locale:a})}};this.createRecaptchaTarget=e=>{const t=`${wt}_${e}`,s=document.createElement("div");s.setAttribute("id",t);s.style.setProperty("display","none");s.style.setProperty("width","0px");s.style.setProperty("height","0px");document.body.appendChild(s);return s};this.handleExecuteRecaptcha=e=>{const t=this.recaptchas.get(e);if(t){const e=t.widgetId,s=vt();s&&void 0!==e&&s.execute(e)}};this.handleResetRecaptcha=e=>{const t=this.recaptchas.get(e);if(t){const e=t.widgetId,s=vt();s&&void 0!==e&&s.reset(e)}};this.onSuccess=(e,t)=>{h.broadcastAll({type:r.V4_RECAPTCHA_SUCCESS,payload:{UUID:t,token:e}})};this.onExpired=e=>{h.broadcastAll({type:r.V4_RECAPTCHA_EXPIRED,payload:{UUID:e}})};this.onError=()=>{h.broadcastAll({type:r.V4_RECAPTCHA_ERROR})};this.recaptchas=new Map;this.recaptchaLoadQueued=!1;this.recaptchaLoaded=!1;this.renderQueue=[];this.listenForRecaptchaEvents()}listenForRecaptchaEvents(){h.registerHandlers({[r.V4_RECAPTCHA_RENDER]:e=>{this.handleRenderRecaptcha(e)},[r.V4_RECAPTCHA_EXECUTE]:e=>{this.handleExecuteRecaptcha(e.UUID)},[r.V4_RECAPTCHA_RESET]:e=>{this.handleResetRecaptcha(e.UUID)}})}}function Ft(){return new Tt}class Rt extends G{constructor({embededContainers:e}){super();this.handleView=e=>{this.viewedStore.markAsViewed(e);this.analyticsProxyController.flushViewQueue(e)};this.initialiseThirdPartyApi=e=>{this.thirdPartyApiController.init(e)};this.embededContainers=e;this.viewedStore=ct();this.embeddedFormsController=rt({embeddedContainers:this.embededContainers,handleView:this.handleView,analyticsStore:this.analyticsStore});this.formData=new _t;this.thirdPartyApiController=ut(this.formData);this.globalEventController=ft(this.formData,this.embededContainers);this.recaptchaController=Ft()}init(){this.globalEventController.init({initialiseThirdPartyApi:this.initialiseThirdPartyApi});this.listenForFormReadyEvent();this.listenForSubmissionSuccessInfo();this.embededContainers.addElements(he(this.embededContainers));this.listenForAddedEmbeddedContainers()}listenForAddedEmbeddedContainers(){pe((e=>{const t=he(this.embededContainers,e);this.embededContainers.addElements(t)}))}listenForFormReadyEvent(){fe.registerHandlers({[r.V4_FORM_READY]:e=>{const s=dt[t].getFormFromEvent({detail:e}),n=St(e);null==s||s.setExtraSubmissionMetadata({[gt]:n})}})}listenForSubmissionSuccessInfo(){fe.registerHandlers({[r.SEND_FORM_SUBMISSION_SUCCESS_INFO]:({instanceId:e,redirectUrl:t,conversionId:s})=>{this.formData.setFormInstanceInfo({instanceId:e,formInfo:{redirectUrl:t,conversionId:s}})}})}}const Nt=new Rt({embededContainers:new at});var Ot=Rt;const Mt=()=>dt[e],Dt=()=>"loading"===document.readyState,Vt=()=>{dt[e]={projectName:`${i.bender.project}`,app:`${i.bender.project}-${i.bender.depVersions[i.bender.project]}`,mountedAt:window.performance.now(),mountedBy:document.currentScript,instance:Ot,numAttemptedScriptInits:1}};(()=>{const e=Mt();if(e){1===e.numAttemptedScriptInits&&document.currentScript&&console.warn(`The script ${document.currentScript.getAttribute("src")} only needs to be included once on the page`);e.numAttemptedScriptInits++}else{Vt();if(Dt()){const e=()=>{document.removeEventListener("DOMContentLoaded",e);Nt.init()};document.addEventListener("DOMContentLoaded",e)}else Nt.init()}})()}();