!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.2180","hs-lodash":"static-4.45","hs-test-utils":"static-1.8609",HubStyleTokens:"static-2.12048","jasmine-runner":"static-1.7023",quartz:"static-1.7812",react:"static-7.207","web-interactives-embed-framework":"static-2.5877","hubspot-url-utils":"static-1.4516",outpost:"static-1.4686","ui-forms-embed-components-performance":"static-1.2236","ui-forms-embed-components-library":"static-1.7550","ui-forms-embed-components-reporting":"static-1.7028","foundations-components":"static-1.8882","framer-motion":"static-1.87","hs-test-utils-bend-plugin":"static-1.3720",msw:"static-1.107","msw-config":"static-1.53","react-dom":"static-7.85","react-redux":"static-7.87",redux:"static-4.88","testing-library":"static-1.168","foundations-theming":"static-1.5074","quartz-config":"static-1.1590",jasmine:"static-4.4867","webpack-env":"static-1.54",csstype:"static-1.50","hs-browser-apis":"static-1.34","quartz-core":"static-1.7031","react-utils":"static-2.5742",enviro:"static-4.544",classnames:"static-2.10","floating-ui":"static-1.71","hs-story-utils":"static-1.9988","react-day-picker":"static-1.19","styled-components":"static-2.107",StyleGuideUI:"static-3.529","bend-plugin-foundations-components":"static-1.5151","foundations-assets":"static-1.5452","foundations-theming-specialty":"static-1.2790",I18n:"static-7.1733","metrics-js":"static-1.10198",moment:"static-3.75","react-aria":"static-1.80","react-create-root-preference":"static-1.131","react-select-plus":"static-1.121","react-virtualized":"static-2.115","tanstack-table":"static-1.69","trellis-assets":"static-1.3325","ui-fonts":"static-1.1310","ui-images":"static-2.1303","bender-build-tools":"static-1.3661","hoist-non-react-statics":"static-3.9","bend-plugin-foundations-theming":"static-1.3557","foundations-theming-base":"static-1.4059",stylex:"static-1.50","opentelemetry-fe-types":"static-1.363","bend-plugin-quartz-core":"static-1.9",dispatcher:"static-1.151","general-store":"static-6.20",HeadJS:"static-2.845","hub-http":"static-1.6766","hub-http-janus":"static-1.929","hubspotter-http":"static-1.5028",icons:"static-2.722","mobile-manifest-mixins":"static-1.629","module-federation":"static-1.42","opentelemetry-fe":"static-1.738",PortalIdParser:"static-2.460","quartz-auth":"static-1.1487","quartz-head":"static-1.1477","quartz-i18n":"static-1.1487","quartz-routing":"static-1.1242","quartz-test":"static-1.1487","quartz-tracking":"static-1.1191","quick-fetch":"static-1.4284",raven:"static-3.6483","raven-hubspot":"static-1.6790","react-rhumb":"static-1.17304","trellis-components":"static-1.3344",UIComponents:"static-3.8994","usage-tracker-container":"static-1.7912","usage-tracker-core":"static-1.7772","i18n-data":"static-1.238","moment-timezone":"static-5.100","beacon-keepalive-queue":"static-1.265","bend-plugin-metrics-js":"static-1.175","react-input-autosize":"static-2.17","stylex-utils":"static-1.200","trellis-theming":"static-1.1619","opentelemetry-web":"static-1.26","hs-locale-management":"static-1.463",sassPrefix:"static-1.450","hub-http-shared-msw-handlers":"static-1.11042","hubspotter-http-shared-msw-handlers":"static-1.11040","hs-promise-rejection-tracking":"static-1.6148","usage-tracker-session-replay":"static-1.5608","web-vitals":"static-1.23","base-ui":"static-1.32","tanstack-virtual":"static-1.46",cssUtils:"static-1.1184","head-dlb":"static-1.5344",HubStyle:"static-2.12355","ts-schema":"static-1.4453","amplitude-session-replay-browser":"static-1.80"},depPathPrefixes:{"ui-forms-embed-components-frame-parent":"/ui-forms-embed-components-frame-parent/static-1.2180","hs-lodash":"/hs-lodash/static-4.45","hs-test-utils":"/hs-test-utils/static-1.8609",HubStyleTokens:"/HubStyleTokens/static-2.12048","jasmine-runner":"/jasmine-runner/static-1.7023",quartz:"/quartz/static-1.7812",react:"/react/static-7.207","web-interactives-embed-framework":"/web-interactives-embed-framework/static-2.5877","hubspot-url-utils":"/hubspot-url-utils/static-1.4516",outpost:"/outpost/static-1.4686","ui-forms-embed-components-performance":"/ui-forms-embed-components-performance/static-1.2236","ui-forms-embed-components-library":"/ui-forms-embed-components-library/static-1.7550","ui-forms-embed-components-reporting":"/ui-forms-embed-components-reporting/static-1.7028","foundations-components":"/foundations-components/static-1.8882","framer-motion":"/framer-motion/static-1.87","hs-test-utils-bend-plugin":"/hs-test-utils-bend-plugin/static-1.3720",msw:"/msw/static-1.107","msw-config":"/msw-config/static-1.53","react-dom":"/react-dom/static-7.85","react-redux":"/react-redux/static-7.87",redux:"/redux/static-4.88","testing-library":"/testing-library/static-1.168","foundations-theming":"/foundations-theming/static-1.5074","quartz-config":"/quartz-config/static-1.1590",jasmine:"/jasmine/static-4.4867","webpack-env":"/webpack-env/static-1.54",csstype:"/csstype/static-1.50","hs-browser-apis":"/hs-browser-apis/static-1.34","quartz-core":"/quartz-core/static-1.7031","react-utils":"/react-utils/static-2.5742",enviro:"/enviro/static-4.544",classnames:"/classnames/static-2.10","floating-ui":"/floating-ui/static-1.71","hs-story-utils":"/hs-story-utils/static-1.9988","react-day-picker":"/react-day-picker/static-1.19","styled-components":"/styled-components/static-2.107",StyleGuideUI:"/StyleGuideUI/static-3.529","bend-plugin-foundations-components":"/bend-plugin-foundations-components/static-1.5151","foundations-assets":"/foundations-assets/static-1.5452","foundations-theming-specialty":"/foundations-theming-specialty/static-1.2790",I18n:"/I18n/static-7.1733","metrics-js":"/metrics-js/static-1.10198",moment:"/moment/static-3.75","react-aria":"/react-aria/static-1.80","react-create-root-preference":"/react-create-root-preference/static-1.131","react-select-plus":"/react-select-plus/static-1.121","react-virtualized":"/react-virtualized/static-2.115","tanstack-table":"/tanstack-table/static-1.69","trellis-assets":"/trellis-assets/static-1.3325","ui-fonts":"/ui-fonts/static-1.1310","ui-images":"/ui-images/static-2.1303","bender-build-tools":"/bender-build-tools/static-1.3661","hoist-non-react-statics":"/hoist-non-react-statics/static-3.9","bend-plugin-foundations-theming":"/bend-plugin-foundations-theming/static-1.3557","foundations-theming-base":"/foundations-theming-base/static-1.4059",stylex:"/stylex/static-1.50","opentelemetry-fe-types":"/opentelemetry-fe-types/static-1.363","bend-plugin-quartz-core":"/bend-plugin-quartz-core/static-1.9",dispatcher:"/dispatcher/static-1.151","general-store":"/general-store/static-6.20",HeadJS:"/HeadJS/static-2.845","hub-http":"/hub-http/static-1.6766","hub-http-janus":"/hub-http-janus/static-1.929","hubspotter-http":"/hubspotter-http/static-1.5028",icons:"/icons/static-2.722","mobile-manifest-mixins":"/mobile-manifest-mixins/static-1.629","module-federation":"/module-federation/static-1.42","opentelemetry-fe":"/opentelemetry-fe/static-1.738",PortalIdParser:"/PortalIdParser/static-2.460","quartz-auth":"/quartz-auth/static-1.1487","quartz-head":"/quartz-head/static-1.1477","quartz-i18n":"/quartz-i18n/static-1.1487","quartz-routing":"/quartz-routing/static-1.1242","quartz-test":"/quartz-test/static-1.1487","quartz-tracking":"/quartz-tracking/static-1.1191","quick-fetch":"/quick-fetch/static-1.4284",raven:"/raven/static-3.6483","raven-hubspot":"/raven-hubspot/static-1.6790","react-rhumb":"/react-rhumb/static-1.17304","trellis-components":"/trellis-components/static-1.3344",UIComponents:"/UIComponents/static-3.8994","usage-tracker-container":"/usage-tracker-container/static-1.7912","usage-tracker-core":"/usage-tracker-core/static-1.7772","i18n-data":"/i18n-data/static-1.238","moment-timezone":"/moment-timezone/static-5.100","beacon-keepalive-queue":"/beacon-keepalive-queue/static-1.265","bend-plugin-metrics-js":"/bend-plugin-metrics-js/static-1.175","react-input-autosize":"/react-input-autosize/static-2.17","stylex-utils":"/stylex-utils/static-1.200","trellis-theming":"/trellis-theming/static-1.1619","opentelemetry-web":"/opentelemetry-web/static-1.26","hs-locale-management":"/hs-locale-management/static-1.463",sassPrefix:"/sassPrefix/static-1.450","hub-http-shared-msw-handlers":"/hub-http-shared-msw-handlers/static-1.11042","hubspotter-http-shared-msw-handlers":"/hubspotter-http-shared-msw-handlers/static-1.11040","hs-promise-rejection-tracking":"/hs-promise-rejection-tracking/static-1.6148","usage-tracker-session-replay":"/usage-tracker-session-replay/static-1.5608","web-vitals":"/web-vitals/static-1.23","base-ui":"/base-ui/static-1.32","tanstack-virtual":"/tanstack-virtual/static-1.46",cssUtils:"/cssUtils/static-1.1184","head-dlb":"/head-dlb/static-1.5344",HubStyle:"/HubStyle/static-2.12355","ts-schema":"/ts-schema/static-1.4453","amplitude-session-replay-browser":"/amplitude-session-replay-browser/static-1.80"},bundlingPackage:"ui-forms-embed-components-frame-parent",bundlingPackageVersion:"static-1.2180",project:"ui-forms-embed-components-frame-parent",staticDomain:"//static.hsappstatic.net",staticDomainPrefix:"//static.hsappstatic.net"}};const a={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 r(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 l(){return new c}const d=(...e)=>{o("[GlobalIframeCommunication]",...e)};class u{constructor(){this.iframeCommunicators=new Map;this.eventEmitter=l();this.reset=()=>{this.eventEmitter.reset();this.iframeCommunicators=new Map}}registerHandler(e,t){this.eventEmitter.on(e,t)}registerHandlers(e){d("Registering handlers",e);Object.keys(e).forEach((t=>{const s=t,n=e[s];n&&this.registerHandler(s,n)}))}registerCommunicator(e,t){d("Registering communicator",t);const s=this.iframeCommunicators.get(t)||[];this.iframeCommunicators.set(t,[...s,e])}removeCommunicator(e){d("Removing Iframe Communicator from GlobalCommunication: ",e);this.iframeCommunicators.delete(e)}emit(e,t){d("Emitting event",{event:e,messagePayload:t});this.eventEmitter.emit(e,t)}broadcast(e,t){const s=this.iframeCommunicators.get(e);if(s){d("Broadcasting",s);s.forEach((e=>{e.sendMessage(t)}))}else d("Cannot find communcators array, not broadcasting",e,t)}broadcastAll(e){d("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=l();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:a.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 g(e,t){p("Creating iframe communication");const s=new f(e,t);h.registerCommunicator(s,t);return s}function E(e){const t=window.location.origin.startsWith("http:")?"http://":"https://";return e.startsWith(t)?e:`${t}${e.replace(/http(s)?:\/\//,"")}`}function _(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])}));_(s);return s}function S(e,t){const s=document.createElement("iframe");s.src=E(e);Object.keys(t).forEach((e=>{s.setAttribute(e,t[e])}));_(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}function y(e){e.startsWith("http")||(e=`https://${e}`);try{return new URL(e).searchParams.has("hs-signature")}catch(e){return!1}}const v=(...e)=>{o("[FrameComponent]",...e)},w=()=>{};class C{constructor({id:e,container:t,iframeSrc:s,resizeHeight:n,onFrameReady:i,useResponsiveStyling:a,extraAttributes:r={},srcdoc:o}){this.onFrameReady=w;this.resizeHeight=!0;this.handleHeightChange=({height:e})=>{if(!this.resizeHeight)return;const t=e+2*parseInt(getComputedStyle(this.iframe).borderTopWidth,10);v("Handle height change",this.id,{adjustedHeight:t,height:e});this.setContainerStyle({height:`${t}px`})};this.id=e;this.resizeHeight=n;if(a&&s&&!y(s)){v("Responsive styling is enabled",e);s=I(s,"enableResponsiveStyles","true")}if(s)this.iframe=S(s,r);else if(o)this.iframe=b(o,r);else{v("No iframeSrc or srcdoc provided, creating empty iframe",e);this.iframe=S("",r)}this.container=t;this.iframeCommunicator=g(this.iframe,e);i&&(this.onFrameReady=i);t.appendChild(this.iframe);this.registerHandlers()}registerHandlers(){this.iframeCommunicator.registerHandlers({[a.STARTED]:this.onFrameReady,[a.NEW_HEIGHT]:this.handleHeightChange})}setStyle(e){v("Set style",this.id,e);r(this.iframe,e)}setShouldResize(e){this.resizeHeight=e}setContainerStyle(e){r(this.container,e)}}function A(e){return new C(e)}class R{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}}const T=Symbol.for("hs-browser-apis.setWindowLocationHrefImplementation"),F=e=>{window.location.href=e};function N(){var e;return null!==(e=window[T])&&void 0!==e?e:F}function O(e){N()(e)}function M(e,t=!1){!window.navigator.userAgent.includes("Firefox")&&t?window.open(e,"_blank","noopener"):O(e)}const D="hubspotutk",x="__hstc",U="__hssc",P=e=>{const t=document.cookie.match(`(^|[^;]+)\\s*${e}\\s*=\\s*([^;]+)`);return t?t.pop():""},V=()=>P(D),k=()=>P(x),H=()=>P(U),L=(...e)=>{o("[models/Analytics]",...e)};class q{constructor(){this._handleFetchSucceded=e=>{this.store.setState((t=>{const s={};s.path=e.path;s.referrerPath=e.referrerPath;s.analyticsPageId=e.pageId;s.hsfp=e._getFingerprint();s.canonicalUrl=e.canonicalUrl;s.contentType=e.contentType;s.pageId=q.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:V(),hssc:H(),hstc:k(),pageId:q.getPageId()};this.store=new R(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){L("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 j=new q;const $=(...e)=>{o("[AnalyticsProxyController]",...e)},z=["trackFormView","trackFormVisible","trackFormInteraction"];class G{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:a.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)||[];$("Adding form view to analytics queue",{id:e,analytics:t});this.viewQueue.set(e,[...n,t])}listenForProxyMessage(){h.registerHandlers({[a.PROXY_ANALYTICS]:({analytics:e,id:t})=>{G.isFormView(e)?this.handleFormView(t,e):this.analyticsStore.track(e)},[a.STARTED]:({id:e})=>{this.analyticsStore.analytics.isLoaded&&h.broadcast(e,{type:a.RECEIVED_ANALYTICS,payload:this.analyticsStore.analytics})}})}static isFormView(e){const[t]=e;return z.includes(t)}}class B{constructor({applicationController:e}){this.applicationController=e;this.listenForNavigation()}listenForNavigation(){h.registerHandlers({[a.NAVIGATE_PAGE]:({url:e,openNewTab:t,id:s})=>{const n=this.applicationController.getNavigationUrl({url:e,openNewTab:t},s);if(t)return;M(n,this.applicationController.getShouldOpenNewTab({url:e,openNewTab:t},s))}})}}class Y{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 Q{constructor(){this.analyticsStore=j;this.analyticsProxyController=new G({analyticsStore:this.analyticsStore,applicationController:this});this.navigationProxyController=new B({applicationController:this});this.styleExtractorController=new Y}getNavigationUrl(e,t){return e.url}getShouldOpenNewTab(e,t){return e.openNewTab}}class X{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 K(e,t){const s=new Map(e);for(const[e,n]of t)s.set(e,n);return s}const Z=["api","local","app","private","platform","tools","meetings","payments","mcp"],ee=["hubspotstarter","hubspotfree","hubspotemail"],te=["growth"],se=["breeze"],ne="hubspotpreview(?:qa|qa2|2qa|2)?-[a-z]+[0-9]\\.com",ie={com:["hubspot","hubteam","grader","getsignals","getsidekick","gettally","hubspotemail","customer-hub","hubspotservicehub","hubspotquote","hubspotdocuments","hubspotrecap","hs-data-privacy"].join("|"),net:ee.join("|"),org:te.join("|"),ai:se.join("|")},ae=function e(t){const s=new RegExp(`^(?!local|test|selenium)(.*\\.)?(${Object.entries(ie).map((([e,t])=>`(?:${t})(qa)?\\.${e}`)).join("|")}|(?:connect)\\.com|(?:connect)(qa)\\.co|wthubspot\\.(com|de|es|fr|jp)|${ne})$`),n=new RegExp("^(?:[^.]+)\\.(?:preview).app(-[a-z]+[0-9])?\\.hubspotqa\\.com"),i=new RegExp("^(?:[^.]+)\\.(?:local)\\.(app|tools|private)(-[a-z]+[0-9])?\\.(hubspot|hubteam)(qa)?\\.com"),a=new RegExp("^(?:[^.]+)\\.local(-[a-z]+[0-9])?\\.(hubspot|hubteam)(qa)?\\.com"),r=s.test(t.hostname),o=i.test(t.hostname)||a.test(t.hostname),c=n.test(t.hostname),l=r&&!o||c,d=new RegExp(`${Object.entries(ie).map((([e,t])=>`(?:${t})qa\\.${e}`)).join("|")}|(?:connect)qa\\.co|wthubspot\\.(com|de|es|fr|jp)|hsqa-sales(?:crm)?-sub\\.com|(?:hubspotstarter|hubspotfree|hubspotemail)(qa)(?:-.*)\\.net|(?:hubspotemail)(qa)(?:-.*)\\.com|hubspotpreview(?:qa2?|2qa)-[a-z]+[0-9]\\.com`),u=[new RegExp(`^(?:${Z.join("|")})-([a-z0-9]+)\\.(?:hubspot|hubteam)(?:qa)?\\.com`),new RegExp("^(.*).(?:hubspotquote)(?:qa)?.com"),new RegExp("^app-(.*).(?:hubspotdocuments)(?:qa)?.com"),new RegExp("^app-(.*).(?:hubspotrecap)(?:qa)?.com"),new RegExp("^artifacts-(.*).(?:breeze)(?:qa)?.ai"),new RegExp("^(?:[0-9]+).(.*).hs(?:qa)?-sales(?:crm)?-sub.com"),new RegExp("^(?:[a-zA-Z0-9-]+)\\.([a-z0-9]+)\\.hs(?:qa)?-sales(?:crm)?-sub\\.com"),new RegExp("^hs-(?:[0-9]+).s.(?:hubspotfree|hubspotstarter|hubspotemail)(?:qa)?-(.*).net"),new RegExp("^hs-(?:[0-9]+).s.(?:hubspotemail)(?:qa)?-(.*).com"),new RegExp("^t.sidekickopen(?:\\d)+-([a-z]+[0-9]).com"),new RegExp("^([a-z]+[0-9]).hs-data-privacy(?:qa)?.com"),new RegExp("^(?:[^.]+)\\.(?:preview|local)\\.app-([a-z]+[0-9])\\.hubspot(qa)?\\.com"),new RegExp("^(?:[^.]+)\\.local-([a-z]+[0-9])\\.(hubspot|hubteam)(qa)?\\.com"),new RegExp("^(?:[^.]+\\.)?hubspotpreview(?:qa|qa2|2qa|2)?-([a-z]+[0-9])\\.com$")],h="ENV",m="Enviro error: the default argument for .get and .getShort is no longer supported",p=e=>{let t=window[e];if(null==t)try{t=window.sessionStorage.getItem(e)}catch(e){}if(null==t)try{t=window.localStorage.getItem(e)}catch(e){}return t},f=()=>{const e=p(h);return e||(d.test(t.host)?"qa":"prod")},g=(e,t)=>{window[e]=t;return t},E={prod:"production",qa:"development"},_=e=>{if("string"==typeof e){const t=e.toLowerCase();return E[t]||t}return e},b=e=>{e="string"==typeof e?e.toLowerCase():void 0;return Object.keys(E).find((t=>e===E[t]))||e},S=(e,t)=>{if(null!=t)throw new Error(m);let s=null;if(e){const t=e.split(".").reverse();for(let e=0;e{if(null!=t)throw new Error(m);return b(S(e))},v=y,w=e=>"prod"===v(e),C=e=>"qa"===v(e),A=()=>{const e=p("HUBLET");if(e)return e;for(const e of u)if(e.test(t.hostname))return e.exec(t.hostname)[1];return"na1"};function R({isNa1:e,isNonNa1:t},s){s||(s=A());return"na1"===s?"function"==typeof e?e(s):void 0:"function"==typeof t?t(s):void 0}return{createEnviro:e,debug:(e,t=!1)=>{let s;"string"==typeof e&&(s=p(`${e.toUpperCase()}_DEBUG`));null==s&&(s=p("DEBUG"));return null==s?t:s},denormalize:b,deployed:e=>{let t;"string"==typeof e&&(t=p(`${e.toUpperCase()}_DEPLOYED`));null==t&&(t=p("DEPLOYED"));return null==t?l:!!t},enabled:(e,t=!1)=>{let s=p(`${e.toUpperCase()}_ENABLED`);null==s&&(s=JSON.stringify(t));return"true"===`${s}`.toLowerCase()},get:S,getHublet:A,getInternal:y,getShort:v,isProd:w,isQa:C,ifHublet:R,normalize:_,set:I,setDebug:(e,t=!0)=>{if("string"==typeof e)try{t?localStorage.setItem(`${e.toUpperCase()}_DEBUG`,JSON.stringify(!0)):localStorage.removeItem(`${e.toUpperCase()}_DEBUG`)}catch(s){g(`${e.toUpperCase()}_DEBUG`,t||void 0)}else{t=null==e||e;try{t?localStorage.setItem("DEBUG",JSON.stringify(t)):localStorage.removeItem("DEBUG")}catch(e){g("DEBUG",t||void 0)}}}}};ae(document.location);const re="hs-form-frame",oe="data-env",ce="data-form-id",le="data-portal-id",de="data-instance-id",ue="data-region",he="data-test-id",me="embedded-form-",pe="title";var fe=()=>Array.from(document.getElementsByClassName(re));const ge="na1",Ee="prod";var _e=()=>"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 be=(e,t)=>e.getAttribute(t)||"";var Se=e=>({formId:be(e,ce),portalId:Number(be(e,le)),region:be(e,ue)||ge,env:be(e,oe)||Ee,instanceId:be(e,de)||_e()});const Ie=/^[{]?[0-9a-fA-F]{8}-?([0-9a-fA-F]{4}-?){3}[0-9a-fA-F]{12}[}]?$/,ye=["qa","prod"];var ve=e=>{const{portalId:t,formId:s,env:n,instanceId:i}=e;return!(t<1)&&(!!Ie.test(s)&&(!!ye.includes(n)&&!!i))};function we(e,t=fe()){const s=new Map,n=new Map;t.forEach((t=>{if(e.embedContextsMap.has(t))return;const i=Se(t);if(!ve(i)){console.error(`${i} has missing or invalid data attributes.`);return}const{formId:a}=i;s.set(a,[...s.get(a)||[],t]);n.set(t,i)}));return{formContainerElementsMap:s,embedContextsMap:n}}function Ce(e,t,s=5){if(!(s<0)&&e.nodeType===Node.ELEMENT_NODE){const n=e;n.classList.contains(re)&&t.push(n);n.childNodes.forEach((e=>{Ce(e,t,s-1)}))}}function Ae(e){const t=new MutationObserver((t=>{const s=[];for(const e of t)if("childList"===e.type)for(const t of e.addedNodes)Ce(t,s);s.length&&e(s)}));t.observe(document.body,{childList:!0,subtree:!0});return()=>{t.disconnect()}}const Re=h;var Te=e=>{const t=new Image;t.alt="";t.src=e};const Fe="https://forms{{region}}.hsforms{{env}}.com/embed/v3",Ne=({env:e,region:t})=>{const s=t?`-${t}`:"",n="qa"===e?"qa":"";return Fe.replace("{{region}}",s).replace("{{env}}",n)};var Oe=(e="",t=1,s={env:"",region:""})=>{Te(`${Ne(s)}/counters.gif?key=${e}&count=${t}`)};var Me={FORM_FRAME_LOAD_SUCCESS:"form-frame-load-success"};const De="?";function xe(){return"undefined"==typeof document||null==document.location?"":document.location.href}function Ue(){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 Pe(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,a=/\((\S*)(?::(\d+))(?::(\d+))\)/,r=e.stack.split("\n"),o=[];let c,l,d;for(let u=0,h=r.length;u eval")>-1&&(c=i.exec(l[3]))){l[3]=c[1];l[4]=c[2];l[5]=null}else 0!==u||l[5]||void 0===e.columnNumber||(o[0].column=e.columnNumber+1);d={filename:l[3],function:l[1]||De,args:l[2]?l[2].split(","):[],lineno:l[4]?+l[4]:null,colno:l[5]?+l[5]:null}}!d.function&&d.line&&(d.function=De);if(d.filename&&"blob:"===d.filename.substr(0,5)){const e=new XMLHttpRequest;e.open("GET",d.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=Ue()+e.slice(1));d.url=e.slice(0,-4)}}}o.push(d)}return o.length?{name:e.name,message:e.message,url:xe(),stack:o}:null}function Ve(e,t,s){const n={filename:t,lineno:s};if(n.filename&&n.lineno){e.incomplete=!1;n.function||(n.function=De);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 ke(e,t){const s=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,n=[],i={};let a,r,o=!1;for(let e=ke.caller;e&&!o;e=e.caller)if(e!==He){r={filename:null,function:De,lineno:null,colno:null};e.name?r.function=e.name:(a=s.exec(e.toString()))&&(r.function=a[1]);if(void 0===r.function)try{r.function=a.input.substring(0,a.input.indexOf("{"))}catch(e){}i[`${e}`]?o=!0:i[`${e}`]=!0;n.push(r)}t&&n.splice(0,t);const c={name:e.name,message:e.message,filename:xe(),stack:n};Ve(c,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description);return c}function He(e,t){if("string"==typeof e)return{name:"Error",message:e,filename:xe()};let s=null;t=null==t?0:+t;try{s=Pe(e);if(s)return s}catch(e){}try{s=ke(e,t+1);if(s)return s}catch(e){}return{name:e.name,message:e.message,filename:xe()}}const Le=[/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'/],qe=[/\/OtAutoBlock\.js/,/\/mootools\.js/],je=[/ui-forms-embed-components/,/embed-default-modules/,/\/?forms\/embed\/(frame(-v2)?|\d+)\.js/,/web-interactives-embed-framework/],$e=(e,t)=>{const s=He(e),n=s.stack?s.stack[0].filename:s.filename;return je.some((t=>t.test(e.stack||"")))&&(!!t||je.some((e=>e.test(n))))};var ze=(e,t=!1)=>{if(!e)return!1;const{message:s="",stack:n=""}=e;return Boolean(s&&n&&$e(e,t)&&!Le.find((e=>e.test(s)))&&!qe.find((e=>e.test(n))))};const Ge={APP:"app",APP_API:"app-api"};function Be(e,t){const s=t&&t.hubletOverride?t.hubletOverride:e,n=t&&!0===t.hubletizeNa1;return s!==ge||n?`-${s}`:""}function Ye(e,t,s){if(s&&s.hubletPostfixLocation&&"domain"===s.hubletPostfixLocation)return t;t===Ge.APP_API&&(t=Ge.APP);return`${t}${Be(e,s)}`}function Qe(e,t,s){return`${We(s)}${Xe(t,s)}${Je(e,s)}`}function Xe(e,t){return"qa"===(t&&t.envOverride?t.envOverride:e)?"qa":""}function We(e){return e&&e.domainOverride?e.domainOverride:"hubspot"}function Je(e,t){return t&&t.hubletPostfixLocation&&"domain"===t.hubletPostfixLocation?Be(e,t):""}function Ke(e){return e&&e.tldOverride?e.tldOverride:"com"}function Ze(e){return e===Ge.APP_API?"/api":""}function et(e,t,s,n){return`https://${Ye(t,e,n)}.${Qe(t,s,n)}.${Ke(n)}${Ze(e)}`}const tt="eeb5bcc1447eba257645d7fee6f7a0b7";var st=({hublet:e=ge,env:t})=>`${et("exceptions",e,"qa"===t?"qa":"prod",{tldOverride:"com"})}/v2/api/store?sentry_key=${tt}`;var nt=()=>"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 it=(e,t,{env:s="prod",url:n="",query:i="",version:a="",hublet:r="",tags:o={},user:c={},extra:l={}})=>{const d=Date.now()/1e3,u=He(t);return{environment:s,tags:Object.assign({region:r},o),logger:"javascript",platform:"javascript",request:{headers:{"User-Agent":navigator.userAgent},url:n||window.location.href,queryString:i.replace(/^\?/,"")},event_id:nt().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:d,version:a,user:c,extra:l}};var at=(e="",t,s={})=>{const n=it(e,t,s);fetch(st(s),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),keepalive:!0})};var rt=(e,t,s)=>{const{env:n,hublet:i,formId:a,portalId:r,pageUrl:o}=e,{renderVersion:c,projectVersion:l,module:d}=t,{key:u,error:h,data:m}=s;if(ze(h)){const e=new URL(o);at("error",h,{type:"Error",env:n,hublet:i,url:e.href,query:e.search,tags:{renderVersion:c,projectVersion:l,key:u,module:d},extra:{key:u,data:JSON.stringify(m),formId:a,portalId:r}})}};var ot=({formId:e="",portalId:t="",hublet:s=ge,isQa:n=!1,key:i,error:a="",data:r={}})=>{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"},l={key:i,error:a,data:r.response&&r.response.data?r.response.data:r};rt(o,c,l)};const ct="FORM_FRAME_RENDER_ERROR";let lt=!1;var dt=({defaultUrl:e,region:t,isQa:s})=>{let n=null;if(!("true"===new URLSearchParams(window.location.search).get("_hsFormsRenderingTestTool_Do_Not_Use"))||lt)return;const i=new URL(e),a=new URL(et("tools",t&&t.length>0?t:ge,s?"qa":"prod",{domainOverride:"hubteam"})),r=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"},a.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===a.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]});lt=!0;window.removeEventListener("message",r);window.removeEventListener("message",o)}};window.addEventListener("message",r);window.addEventListener("message",o)};class ut{constructor({embedContext:e,container:t,iframeSrc:s}){this.handleLoad=()=>{this.frameComponent.setStyle({visibility:""})};this.sendEmbedContextWithInstanceId=e=>{this.frameComponent.iframeCommunicator.sendMessage({type:a.SEND_EMBED_CONTEXT,payload:e})};this.listenForV4FormReadyEvent=()=>{Re.registerHandlers({[a.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=A({iframeSrc:s,container:t,id:e.formId,onFrameReady:this.resolveFrameload,resizeHeight:!0,extraAttributes:{[he]:`${me}${e.formId}`,[pe]:"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();Oe(Me.FORM_FRAME_LOAD_SUCCESS,1,{env:this.embedContext.env,region:this.embedContext.region})})).catch((e=>{ot({formId:this.embedContext.formId,portalId:this.embedContext.portalId.toString(),hublet:this.embedContext.region,isQa:"qa"===this.embedContext.env,key:ct,error:e instanceof Error?e:new Error(String(e))})}))}}function ht({embedContext:e,container:t,iframeSrc:s}){dt({defaultUrl:s,isQa:"qa"===e.env,region:e.region});return new ut({embedContext:e,container:t,iframeSrc:s})}var mt=({subDomainPrefix:e,hublet:t,isQa:s,pathname:n="",pathValues:i={},domainOverride:a,tldOverride:r,query:o})=>{const c=Object.keys(i).reduce(((e,t)=>e.replace(RegExp(`{{${t}}}`,"g"),i[t])),n),l=et(e,t||ge,s?"qa":"prod",{domainOverride:a,tldOverride:r}),d=new URL(c,l);if(o)for(const[e,t]of Object.entries(o))d.searchParams.append(e,t);return d.href};const pt=new Set(["_hsPortalId","_hsFormId","_hsHublet","_hsIsQa","_hsInstanceId","_hsUtk","_hsShareToken","_hsDisableScriptloader","_hsDisableRedirect","_hsDisableSubmit","_hsAllowUnpublished","_hsBufferKey","_hsForceFallback","_hsIsPreview","_hsPageUrl","_hsPageTitle"]),ft=()=>Object.fromEntries([...new URLSearchParams(window.location.search)].filter((([e])=>!pt.has(e))));function gt({portalId:e,formId:t,region:s,env:n,hutk:i,instanceId:a}){const r=ft(),o="true"===r.isLocal,c={hublet:o?ge:s,isQa:!o&&"qa"===n,subDomainPrefix:o?"local":"js",domainOverride:o?"hsappstatic":"hsforms",tldOverride:"net"},l=Object.assign({_hsPortalId:`${e||""}`,_hsFormId:t||"",_hsIsQa:`${"qa"===n}`,_hsHublet:s||ge,_hsDisableScriptloader:"true",_hsDisableRedirect:"true",_hsInstanceId:a},i&&{_hsUtk:i},r);return mt(Object.assign({},c,{pathname:o?"ui-forms-embed-components-app/static/html/frame.html":"ui-forms-embed-components-app/frame.html",query:l}))}const Et=()=>{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 _t{constructor({embeddedContainers:e,handleView:t,analyticsStore:s}){this.elementObserver=W();this.embedComponents=new Map;this.embeddedContainers=e;this.handleView=t;this.analyticsStore=s;this.listenForEmbeddedContainers()}listenForEmbeddedContainers(){this.embeddedContainers.subscribe(((e,t)=>{const s=J(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=ht({embedContext:Object.assign({},e,Et(),s&&{hutk:s}),container:t,iframeSrc:gt({hutk:s,instanceId:e.instanceId,portalId:e.portalId,formId:e.formId,region:e.region,env:e.env})});this.embedComponents.set(t,n)}}}function bt(e){return new _t(e)}class St{constructor(){const e={formContainerElementsMap:new Map,embedContextsMap:new Map};this.store=new R(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:K(t.formContainerElementsMap,e.formContainerElementsMap),embedContextsMap:K(t.embedContextsMap,e.embedContextsMap)})))}}class It{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 R(e)}subscribe(e){this.store.subscribe(e)}hasBeenViewed(e){return this.store.state.viewed.has(e)}get viewed(){return this.store.state.viewed}}function yt(){return new It}const vt=window;class wt{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(){if(!Object.prototype.hasOwnProperty.call(vt,t)){Object.defineProperty(vt,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});vt[s]=vt[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;Re.broadcast(t,{type:a.SEND_FORM_EXTRA_SUBMISSION_METADATA,payload:e})}setFieldValue({baseFormInfo:e,propertyReference:t,value:s}){const{formId:n,instanceId:i}=e;Re.broadcast(n,{type:a.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);Re.broadcast(s,{type:a.GET_FORM_FIELD_VALUES,payload:e});return await n.then((e=>e))}async getFieldValue(e,t){let s;const{formId:n,instanceId:i}=e,r=new Promise((e=>{s=e}));this.listenForSendFieldValue(s);Re.broadcast(n,{type:a.GET_FIELD_VALUE,payload:{instanceId:i,propertyReference:t}});return await r.then((e=>e))}listenForSendFormFieldValues(e){Re.registerHandlers({[a.SEND_FORM_FIELD_VALUES]:({formFieldValues:t})=>{null==e||e(t)}})}listenForSendFieldValue(e){Re.registerHandlers({[a.SEND_FIELD_VALUE]:({fieldValue:t})=>{null==e||e(t)}})}getFormInternalApi(){const e=vt[t];if(e&&e[n])return{clientApi:e,__internalApi:e[n]}}}function Ct(e){return new wt(e)}const At=e=>{if(!e)return;e.getBoundingClientRect().top<0&&e.scrollIntoView({behavior:"smooth",block:"start"})},Rt={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 Tt{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}){Re.registerHandlers({[a.V4_FORM_READY]:t=>{e(t);this.triggerGlobalEvent(Object.assign({},t,{type:Rt.ON_FORM_READY}))}})}listenForSubmissionSuccessEvent(){Re.registerHandlers({[a.SEND_FORM_SUBMISSION_SUCCESS]:({formId:e,instanceId:t})=>{this.triggerGlobalEvent({type:Rt.ON_FORM_SUBMISSION_SUCCESS,instanceId:t,formId:e})}})}listenForFormNavigationEvent(){Re.registerHandlers({[a.SEND_FORM_INTERACTION_NAVIGATE]:e=>{this.triggerGlobalEvent(Object.assign({},e,{type:Rt.ON_FORM_INTERACTION_NAVIGATE}))}})}listenForFormNavigationNextEvent(){Re.registerHandlers({[a.SEND_FORM_INTERACTION_NAVIGATE_NEXT]:e=>{const t=this.embeddedContainers.getFrameContainerFromInstanceId(e.instanceId);t&&At(t);this.triggerGlobalEvent(Object.assign({},e,{type:Rt.ON_FORM_INTERACTION_NAVIGATE_NEXT}))}})}listenForFormNavigationPreviousEvent(){Re.registerHandlers({[a.SEND_FORM_INTERACTION_NAVIGATE_PREVIOUS]:e=>{this.triggerGlobalEvent(Object.assign({},e,{type:Rt.ON_FORM_INTERACTION_NAVIGATE_PREVIOUS}))}})}listenForSubmissionFailedEvent(){Re.registerHandlers({[a.SEND_FORM_SUBMISSION_FAILED]:({formId:e,instanceId:t})=>{this.triggerGlobalEvent({type:Rt.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 Tt(e,t)}class Nt{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 Ot=Nt;const Mt="__INTERNAL_PERFORMANCE__",Dt=(e,t=2)=>Number.isFinite(e)?Math.round(e*10**t)/10**t:e,xt=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:Dt(s.domInteractive),parentPageLoad:Dt(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=Dt(i.startTime));return n},Ut="https://google.com/recaptcha/enterprise.js",Pt="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},kt=({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},Ht=({callbackId:e,locale:t})=>{const s=kt({src:`${Ut}?&onload=${e}&render=explicit&hl=${t}`,onError:()=>{const s=kt({src:`${Pt}?&onload=${e}&render=explicit&hl=${t}`,onError:e=>{throw e}});window.document.head.appendChild(s)}});window.document.head.appendChild(s)},Lt="hs-forms-embed-frame-recaptcha";class qt{constructor(){this.handleRenderRecaptcha=({callbackId:e,UUID:t,sitekey:s,inherit:n,size:i,badge:a,locale:r})=>{const o=()=>{const e=this.createRecaptchaTarget(t),r={target:e},o=Vt();if(o&&e&&r){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:a},n);this.recaptchas.set(t,Object.assign({},r,{widgetId:c}));this.pendingExecutes.delete(t)&&o.execute(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=[]};Ht({callbackId:e,locale:r})}};this.createRecaptchaTarget=e=>{const t=`${Lt}_${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){this.pendingExecutes.add(e);return}const s=t.widgetId,n=Vt();n&&void 0!==s&&n.execute(s)};this.handleResetRecaptcha=e=>{this.pendingExecutes.delete(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:a.V4_RECAPTCHA_SUCCESS,payload:{UUID:t,token:e}})};this.onExpired=e=>{h.broadcastAll({type:a.V4_RECAPTCHA_EXPIRED,payload:{UUID:e}})};this.onError=()=>{h.broadcastAll({type:a.V4_RECAPTCHA_ERROR})};this.recaptchas=new Map;this.pendingExecutes=new Set;this.recaptchaLoadQueued=!1;this.recaptchaLoaded=!1;this.renderQueue=[];this.listenForRecaptchaEvents()}listenForRecaptchaEvents(){h.registerHandlers({[a.V4_RECAPTCHA_RENDER]:e=>{this.handleRenderRecaptcha(e)},[a.V4_RECAPTCHA_EXECUTE]:e=>{this.handleExecuteRecaptcha(e.UUID)},[a.V4_RECAPTCHA_RESET]:e=>{this.handleResetRecaptcha(e.UUID)}})}}function jt(){return new qt}class $t extends Q{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=yt();this.embeddedFormsController=bt({embeddedContainers:this.embededContainers,handleView:this.handleView,analyticsStore:this.analyticsStore});this.formData=new Ot;this.thirdPartyApiController=Ct(this.formData);this.globalEventController=Ft(this.formData,this.embededContainers);this.recaptchaController=jt()}init(){this.globalEventController.init({initialiseThirdPartyApi:this.initialiseThirdPartyApi});this.listenForFormReadyEvent();this.listenForSubmissionSuccessInfo();this.embededContainers.addElements(we(this.embededContainers));this.listenForAddedEmbeddedContainers()}listenForAddedEmbeddedContainers(){Ae((e=>{const t=we(this.embededContainers,e);this.embededContainers.addElements(t)}))}listenForFormReadyEvent(){Re.registerHandlers({[a.V4_FORM_READY]:e=>{const s=vt[t].getFormFromEvent({detail:e}),n=xt(e);null==s||s.setExtraSubmissionMetadata({[Mt]:n})}})}listenForSubmissionSuccessInfo(){Re.registerHandlers({[a.SEND_FORM_SUBMISSION_SUCCESS_INFO]:({instanceId:e,redirectUrl:t,conversionId:s})=>{this.formData.setFormInstanceInfo({instanceId:e,formInfo:{redirectUrl:t,conversionId:s}})}})}}const zt=new $t({embededContainers:new St});var Gt=$t;const Bt=()=>vt[e],Yt=()=>"loading"===document.readyState,Qt=()=>{vt[e]={projectName:`${i.bender.project}`,app:`${i.bender.project}-${i.bender.depVersions[i.bender.project]}`,mountedAt:window.performance.now(),mountedBy:document.currentScript,instance:Gt,numAttemptedScriptInits:1}};(()=>{const e=Bt();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{Qt();if(Yt()){const e=()=>{document.removeEventListener("DOMContentLoaded",e);zt.init()};document.addEventListener("DOMContentLoaded",e)}else zt.init()}})()}();