(()=>{var Ie={398:(w,_,v)=>{"use strict";v.d(_,{load:()=>Ce});function g(e,t,i,n,r){var s,o=r&&r+i;if(n==null)t&&(e[r]=n);else if(typeof n!="object")e[r]=n;else if(Array.isArray(n))for(s=0;se.length)&&(t=e.length);for(var i=0,n=new Array(t);i=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ft=32,Pe=function(){function e(i,n){this.size=void 0,this.field=void 0,this.size=i,this.field=n,this.size=i,this.field=n||[];var r=Math.floor((i-1)/ft+1);if(!n)for(var s=0,o=r-1,a=0<=o;a?s<=o:s>=o;a?s++:s--)this.field[s]=0}var t=e.prototype;return t.add=function(n){return this.set(n,1)},t.remove=function(n){return this.set(n,0)},t.set=function(n,r){if(n>=this.size)throw new Error("BitArray index out of bounds");var s=qt(n),o=Mt(n);return r===1?this.field[s]=H(this.field[s]|o):this.field[s]&o&&(this.field[s]=H(this.field[s]^o)),!0},t.get=function(n){if(n>=this.size)throw new Error("BitArray index out of bounds");var r=qt(n),s=Mt(n);return H(this.field[r]&s)>0?1:0},e}();function qt(e){return Math.floor(e/ft)}function Mt(e){return H(1<>>1:e>>>1;t[i]=e}return t}var Fe=xe(),Nt=function(t){var i=Re(t),n=0,r=0;n=n^-1;for(var s=0,o=i.length;s>>8^Fe[r],s++;return n=n^-1,n<0&&(n+=4294967296),n},Re=function(t){for(var i=[],n=0;n=o;a?s++:s--)r.push(Nt(n+":"+(s+this.options.seed))%this.options.size);return r},e}(),qe=Number.MAX_SAFE_INTEGER-1;function Me(e,t){for(var i=new Array(e),n=0;ne.replace(/\.(\d+)/g,".[]");function Ke(e){return typeof e!="object"?!1:!!(e!=null&&e.hasOwnProperty("event"))}function We(e){return typeof e!="object"?!1:!!(e!=null&&e.hasOwnProperty("page")&&e.page.path)}function Bt(e,t,i){i===void 0&&(i=1),e.counts.add(t.toLowerCase(),i)}function Ut(e,t,i){e.counts.setCount(t.toLowerCase(),i)}function $t(e,t){e.bloom.add(t.toLowerCase())}function zt(e,t,i){const n=He(t);return typeof i=="number"?(Ut(e,n+":"+i,i),Ut(e,n,i)):($t(e,n+":"+i),$t(e,n)),e}function j(e,t){if(Array.isArray(t)){t.forEach(n=>{j(e,n)});return}if(Ke(t)){var i;Bt(e,"events."+t.event),Object.entries(y((i=t.properties)!=null?i:{})).forEach(r=>{let[s,o]=r;zt(e,s,o)});return}if(We(t)){Bt(e,"page_views."+t.page.path);return}if(typeof t=="object"){Object.entries(y(t)).forEach(r=>{let[s,o]=r;zt(e,s,o)});return}}function Ve(e){var t,i,n;const r=new CountMinSketch,s=new JsBloom({size:1e4}),o={counts:r,bloom:s};return(t=e.events)==null||t.forEach(a=>{j(o,a)}),(i=e.pageViews)==null||i.map(a=>{j(o,a)}),j(o,(n=e.traits)!=null?n:{}),j(o,{account_score:e.accountScore}),j(o,{company:e.firmographics}),j(o,{person:e.person}),o}function S(e,t){return{is:i=>e.is(t,i),exists:()=>e.has(t),includesItem:function(){for(var i=arguments.length,n=new Array(i),r=0;r!e.is(t,i),includesItem:function(){for(var i=arguments.length,n=new Array(i),r=0;re.has(t),is:i=>e.is(t,i),greaterThan:i=>e.greaterThan(t,i),greaterThanOrEqual:i=>e.greaterThanOrEqual(t,i),lessThan:i=>e.lessThan(t,i),lessThanOrEqual:i=>e.lessThanOrEqual(t,i),not:{is:i=>!e.is(t,i),greaterThan:i=>!e.greaterThan(t,i),greaterThanOrEqual:i=>!e.greaterThanOrEqual(t,i),lessThan:i=>!e.lessThan(t,i),lessThanOrEqual:i=>!e.lessThanOrEqual(t,i)}}}function Ht(e,t){const i=t.toLowerCase();return!!(e.bloom.test(i)||e.counts.count(i))}function Je(e,t,i){return e.counts.count(t.toLowerCase())>i}function Qe(e,t,i){return e.counts.count(t.toLowerCase())>=i}function Xe(e,t,i){return e.counts.count(t.toLowerCase())K(e,t+"."+s,i[s]))}function mt(e,t,i){return K(e,t,i)||K(e,t+".[]",i)}function Ye(e,t,i){return i.some(n=>mt(e,t,n))}function ti(e,t,i){return i.every(n=>mt(e,t,n))}class W{constructor(t){this.profile=void 0,this.profile=t,this.profile=t}has(t){return Ht(this.profile,t)}greaterThan(t,i){return Je(this.profile,t,i)}greaterThanOrEqual(t,i){return Qe(this.profile,t,i)}lessThan(t,i){return Xe(this.profile,t,i)}lessThanOrEqual(t,i){return Ze(this.profile,t,i)}is(t,i){return K(this.profile,t,i)}matchesObject(t,i){return Kt(this.profile,t,i)}includes(t,i){return mt(this.profile,t,i)}includesAnyOf(t,i){return Ye(this.profile,t,i)}includesAllOf(t,i){return ti(this.profile,t,i)}get not(){return{has:t=>!this.has(t),greaterThan:(t,i)=>!this.greaterThan(t,i),greaterThanOrEqual:(t,i)=>!this.greaterThanOrEqual(t,i),lessThan:(t,i)=>!this.lessThan(t,i),lessThanOrEqual:(t,i)=>!this.lessThanOrEqual(t,i),is:(t,i)=>!this.is(t,i),matchesObject:(t,i)=>!this.matchesObject(t,i),includes:(t,i)=>!this.includes(t,i),includesAnyOf:(t,i)=>!this.includesAnyOf(t,i),includesAllOf:(t,i)=>!this.includesAllOf(t,i)}}}function b(e,t){return{exists:()=>e.has(t),is:i=>e.is(t,i),includesItem:function(){for(var i=arguments.length,n=new Array(i),r=0;re.includes(t,i),includesAnyOf:function(){for(var i=arguments.length,n=new Array(i),r=0;re.has(t),is:i=>e.is(t,i),greaterThan:i=>e.greaterThan(t,i),greaterThanOrEqual:i=>e.greaterThanOrEqual(t,i),lessThan:i=>e.lessThan(t,i),lessThanOrEqual:i=>e.lessThanOrEqual(t,i)}}class ei{constructor(t){this.traits=void 0,this.traits=new W(t)}get name(){return b(this.traits,"company.name")}get domain(){return b(this.traits,"company.domain")}get sector(){return b(this.traits,"company.category.sector")}get type(){return b(this.traits,"company.type")}get industryGroup(){return b(this.traits,"company.category.industryGroup")}get industry(){return b(this.traits,"company.category.industry")}get subIndustry(){return b(this.traits,"company.category.subIndustry")}get foundedYear(){return q(this.traits,"company.foundedYear")}get timezone(){return b(this.traits,"company.timezone")}get city(){return b(this.traits,"company.geo.city")}get state(){return b(this.traits,"company.geo.state")}get stateCode(){return b(this.traits,"company.geo.stateCode")}get country(){return b(this.traits,"company.geo.country")}get countryCode(){return b(this.traits,"company.geo.countryCode")}get employeeCount(){return q(this.traits,"company.metrics.employees")}get employeesRange(){return b(this.traits,"company.metrics.employeesRange")}get marketCap(){return q(this.traits,"company.metrics.marketCap")}get amountRaised(){return q(this.traits,"company.metrics.raised")}get annualRevenue(){return q(this.traits,"company.metrics.annualRevenue")}get estimatedAnnualRevenue(){return b(this.traits,"company.metrics.estimatedAnnualRevenue")}get tech(){return gt(this.traits,"company.tech")}get techCategories(){return gt(this.traits,"company.techCategories")}get tags(){return gt(this.traits,"company.tags")}isB2B(){return this.tags.includesItem("B2B")}isB2C(){return this.tags.includesItem("B2C")}isEnterprise(){return this.tags.includesItem("Enterprise")}isEcommerce(){return this.tags.includesItem("E-commerce")}isSaas(){return this.tags.includesItem("SAAS")}}function Wt(e,t,i){return i===void 0&&(i=1),Vt(e,i,t)}function ii(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;nWt(e,r))}function Vt(e,t,i){return e.counts.count(("events."+i).toLowerCase())>=t}class ni{constructor(t){this.profile=void 0,this.profile=t}performed(t,i){return i===void 0&&(i=1),Wt(this.profile,t,i)}performedAnyOf(){for(var t=arguments.length,i=new Array(t),n=0;n!this.performedAtLeast(i,n)}}}function ri(){for(var e=arguments.length,t=new Array(e),i=0;i{if(await e()){t==null||t(),n();return}const s=()=>setTimeout(async()=>{await e()?(t==null||t(),n()):s()},i);s()})}function Gt(e,t,i){return i===void 0&&(i=1),e.counts.count(("page_views."+t).toLowerCase())>=i}const oi=Gt;function ai(e,t){return window.location.pathname.toLowerCase()===t.toLowerCase()}class ci{constructor(t){this.profile=void 0,this.profile=t,this.profile=t}seen(t,i){return i===void 0&&(i=1),Gt(this.profile,t,i)}viewed(t){return oi(this.profile,t)}viewing(t){return ai(this.profile,t)}get not(){var t=this;return{seen:function(i,n){return n===void 0&&(n=1),!t.seen(i,n)},viewed:i=>!this.viewed(i),viewing:i=>!this.viewing(i)}}}class ui{constructor(t){this.traits=void 0,this.traits=new W(t)}get emailType(){return S(this.traits,"person.email_type")}get identifiedWorkEmail(){return this.emailType.is("work")}get identifiedPersonalEmail(){return this.emailType.is("personal")}get identifiedAcademicEmail(){return this.emailType.is("academic")}get isIdentified(){return this.traits.has("person.email_type")}get timezone(){return S(this.traits,"person.timezone")}get city(){return S(this.traits,"person.geo.city")}get state(){return S(this.traits,"person.geo.state")}get stateCode(){return S(this.traits,"person.geo.stateCode")}get country(){return S(this.traits,"person.geo.country")}get countryCode(){return S(this.traits,"person.geo.countryCode")}get company(){return S(this.traits,"person.employment.name")}get title(){return S(this.traits,"person.employment.title")}get role(){return S(this.traits,"person.employment.role")}get subRole(){return S(this.traits,"person.employment.subRole")}get seniority(){return S(this.traits,"person.employment.seniority")}}class li{constructor(t,i){this.traits=void 0,this.prefix="",this.traits=new W(t),this.prefix=i}get fitGrade(){return Ge(this.traits,this.prefix+".fit_grade")}get fitGradeLetter(){return S(this.traits,this.prefix+".fit_grade_letter")}}function di(e,t){j(e,t)}function pt(e){const t=new De(e.b),n={counts:new ze(e.c),bloom:t};return{traits:new W(n),events:new ni(n),page:new ci(n),company:new ei(n),person:new ui(n),scores:{account:new li(n,"account_score")},inSegment:ri,when:si,raw:n,index:r=>di(n,r)}}function Qr(e){return Ve(e)}const Jt="https://api.getkoala.com";function Qt(e="host"){return typeof globalThis!="undefined"&&globalThis.koalaSettings&&(globalThis.koalaSettings[e]||globalThis.koalaSettings.host)||Jt}const wt=Qt("host"),hi=Qt("wssHost");function Xt(e,t){return fetch(`${wt}${e}`,{method:"POST",body:typeof t=="string"?t:JSON.stringify(t),keepalive:!0,headers:{"Content-Type":"application/json"}})}function fi(e){return fetch(`${wt}${e}`).then(t=>{if(!t.ok)throw new Error(`${t.status} ${t.statusText}`);return t.json()})}const Zt=navigator.sendBeacon&&navigator.sendBeacon.bind(navigator);function mi(e,t){if(Zt)try{return Zt(`${wt}${e}`,t)}catch{}return!1}function M(e,t){const i=JSON.stringify(t);return mi(e,i)||Xt(e,i).then(()=>!0).catch(()=>!1)}async function gi(e,t){return Xt(e,t).then(i=>{if(!i.ok)throw new Error(`${i.status} ${i.statusText}`);const n=i.headers.get("content-type");return n!=null&&n.includes("application/json")?i.json():i.text()})}async function pi(e,t){if(!t.user.id)throw new Error("missing profile id");const i=await gi(`/web/projects/${e}/profiles`,{profile_id:t.user.id,email:t.email,traits:t.traits});return{...i,qualification:i.q}}function wi(e,t,i){return M(`/web/projects/${e}/batch`,{profile_id:t.user.id,email:t.email,traits:t.traits,identifies:[i]})}function vi(e,t,i=[]){if(i.length!==0)return M(`/web/projects/${e}/batch`,{profile_id:t,events:i})}function yi(e,t,i=[]){if(i.length!==0)return M(`/web/projects/${e}/batch`,{profile_id:t,page_views:i})}function bi({project:e,...t}){return M(`/web/projects/${e}/utk`,t)}var V={logger:self.console,WebSocket:self.WebSocket},m={log(...e){this.enabled&&(e.push(Date.now()),V.logger.log("[ActionCable]",...e))}};const N=()=>new Date().getTime(),G=e=>(N()-e)/1e3;class B{constructor(t){this.visibilityDidChange=this.visibilityDidChange.bind(this),this.connection=t,this.reconnectAttempts=0}start(){this.isRunning()||(this.startedAt=N(),delete this.stoppedAt,this.startPolling(),addEventListener("visibilitychange",this.visibilityDidChange),m.log(`ConnectionMonitor started. stale threshold = ${this.constructor.staleThreshold} s`))}stop(){this.isRunning()&&(this.stoppedAt=N(),this.stopPolling(),removeEventListener("visibilitychange",this.visibilityDidChange),m.log("ConnectionMonitor stopped"))}isRunning(){return this.startedAt&&!this.stoppedAt}recordPing(){this.pingedAt=N()}recordConnect(){this.reconnectAttempts=0,this.recordPing(),delete this.disconnectedAt,m.log("ConnectionMonitor recorded connect")}recordDisconnect(){this.disconnectedAt=N(),m.log("ConnectionMonitor recorded disconnect")}startPolling(){this.stopPolling(),this.poll()}stopPolling(){clearTimeout(this.pollTimeout)}poll(){this.pollTimeout=setTimeout(()=>{this.reconnectIfStale(),this.poll()},this.getPollInterval())}getPollInterval(){const{staleThreshold:t,reconnectionBackoffRate:i}=this.constructor,n=Math.pow(1+i,Math.min(this.reconnectAttempts,10)),s=(this.reconnectAttempts===0?1:i)*Math.random();return t*1e3*n*(1+s)}reconnectIfStale(){this.connectionIsStale()&&(m.log(`ConnectionMonitor detected stale connection. reconnectAttempts = ${this.reconnectAttempts}, time stale = ${G(this.refreshedAt)} s, stale threshold = ${this.constructor.staleThreshold} s`),this.reconnectAttempts++,this.disconnectedRecently()?m.log(`ConnectionMonitor skipping reopening recent disconnect. time disconnected = ${G(this.disconnectedAt)} s`):(m.log("ConnectionMonitor reopening"),this.connection.reopen()))}get refreshedAt(){return this.pingedAt?this.pingedAt:this.startedAt}connectionIsStale(){return G(this.refreshedAt)>this.constructor.staleThreshold}disconnectedRecently(){return this.disconnectedAt&&G(this.disconnectedAt){(this.connectionIsStale()||!this.connection.isOpen())&&(m.log(`ConnectionMonitor reopening stale connection on visibilitychange. visibilityState = ${document.visibilityState}`),this.connection.reopen())},200)}}B.staleThreshold=6,B.reconnectionBackoffRate=.15;var Yt={message_types:{welcome:"welcome",disconnect:"disconnect",ping:"ping",confirmation:"confirm_subscription",rejection:"reject_subscription"},disconnect_reasons:{unauthorized:"unauthorized",invalid_request:"invalid_request",server_restart:"server_restart"},default_mount_path:"/cable",protocols:["actioncable-v1-json","actioncable-unsupported"]};const{message_types:U,protocols:J}=Yt,_i=J.slice(0,J.length-1),te=[].indexOf;class vt{constructor(t){this.open=this.open.bind(this),this.consumer=t,this.subscriptions=this.consumer.subscriptions,this.monitor=new B(this),this.disconnected=!0}send(t){return this.isOpen()?(this.webSocket.send(JSON.stringify(t)),!0):!1}open(){return this.isActive()?(m.log(`Attempted to open WebSocket, but existing socket is ${this.getState()}`),!1):(m.log(`Opening WebSocket, current state is ${this.getState()}, subprotocols: ${J}`),this.webSocket&&this.uninstallEventHandlers(),this.webSocket=new V.WebSocket(this.consumer.url,J),this.installEventHandlers(),this.monitor.start(),!0)}close({allowReconnect:t}={allowReconnect:!0}){if(t||this.monitor.stop(),this.isOpen())return this.webSocket.close()}reopen(){if(m.log(`Reopening WebSocket, current state is ${this.getState()}`),this.isActive())try{return this.close()}catch(t){m.log("Failed to reopen WebSocket",t)}finally{m.log(`Reopening WebSocket in ${this.constructor.reopenDelay}ms`),setTimeout(this.open,this.constructor.reopenDelay)}else return this.open()}getProtocol(){if(this.webSocket)return this.webSocket.protocol}isOpen(){return this.isState("open")}isActive(){return this.isState("open","connecting")}isProtocolSupported(){return te.call(_i,this.getProtocol())>=0}isState(...t){return te.call(t,this.getState())>=0}getState(){if(this.webSocket){for(let t in V.WebSocket)if(V.WebSocket[t]===this.webSocket.readyState)return t.toLowerCase()}return null}installEventHandlers(){for(let t in this.events){const i=this.events[t].bind(this);this.webSocket[`on${t}`]=i}}uninstallEventHandlers(){for(let t in this.events)this.webSocket[`on${t}`]=function(){}}}vt.reopenDelay=500,vt.prototype.events={message(e){if(!this.isProtocolSupported())return;const{identifier:t,message:i,reason:n,reconnect:r,type:s}=JSON.parse(e.data);switch(s){case U.welcome:return this.monitor.recordConnect(),this.subscriptions.reload();case U.disconnect:return m.log(`Disconnecting. Reason: ${n}`),this.close({allowReconnect:r});case U.ping:return this.monitor.recordPing();case U.confirmation:return this.subscriptions.confirmSubscription(t),this.subscriptions.notify(t,"connected");case U.rejection:return this.subscriptions.reject(t);default:return this.subscriptions.notify(t,"received",i)}},open(){if(m.log(`WebSocket onopen event, using '${this.getProtocol()}' subprotocol`),this.disconnected=!1,!this.isProtocolSupported())return m.log("Protocol is unsupported. Stopping monitor and disconnecting."),this.close({allowReconnect:!1})},close(e){if(m.log("WebSocket onclose event"),!this.disconnected)return this.disconnected=!0,this.monitor.recordDisconnect(),this.subscriptions.notifyAll("disconnected",{willAttemptReconnect:this.monitor.isRunning()})},error(){m.log("WebSocket onerror event")}};const Ti=function(e,t){if(t!=null)for(let i in t){const n=t[i];e[i]=n}return e};class Si{constructor(t,i={},n){this.consumer=t,this.identifier=JSON.stringify(i),Ti(this,n)}perform(t,i={}){return i.action=t,this.send(i)}send(t){return this.consumer.send({command:"message",identifier:this.identifier,data:JSON.stringify(t)})}unsubscribe(){return this.consumer.subscriptions.remove(this)}}class Ai{constructor(t){this.subscriptions=t,this.pendingSubscriptions=[]}guarantee(t){this.pendingSubscriptions.indexOf(t)==-1?(m.log(`SubscriptionGuarantor guaranteeing ${t.identifier}`),this.pendingSubscriptions.push(t)):m.log(`SubscriptionGuarantor already guaranteeing ${t.identifier}`),this.startGuaranteeing()}forget(t){m.log(`SubscriptionGuarantor forgetting ${t.identifier}`),this.pendingSubscriptions=this.pendingSubscriptions.filter(i=>i!==t)}startGuaranteeing(){this.stopGuaranteeing(),this.retrySubscribing()}stopGuaranteeing(){clearTimeout(this.retryTimeout)}retrySubscribing(){this.retryTimeout=setTimeout(()=>{this.subscriptions&&typeof this.subscriptions.subscribe=="function"&&this.pendingSubscriptions.map(t=>{m.log(`SubscriptionGuarantor resubscribing ${t.identifier}`),this.subscriptions.subscribe(t)})},500)}}class Ei{constructor(t){this.consumer=t,this.guarantor=new Ai(this),this.subscriptions=[]}create(t,i){const n=t,r=typeof n=="object"?n:{channel:n},s=new Si(this.consumer,r,i);return this.add(s)}add(t){return this.subscriptions.push(t),this.consumer.ensureActiveConnection(),this.notify(t,"initialized"),this.subscribe(t),t}remove(t){return this.forget(t),this.findAll(t.identifier).length||this.sendCommand(t,"unsubscribe"),t}reject(t){return this.findAll(t).map(i=>(this.forget(i),this.notify(i,"rejected"),i))}forget(t){return this.guarantor.forget(t),this.subscriptions=this.subscriptions.filter(i=>i!==t),t}findAll(t){return this.subscriptions.filter(i=>i.identifier===t)}reload(){return this.subscriptions.map(t=>this.subscribe(t))}notifyAll(t,...i){return this.subscriptions.map(n=>this.notify(n,t,...i))}notify(t,i,...n){let r;return typeof t=="string"?r=this.findAll(t):r=[t],r.map(s=>typeof s[i]=="function"?s[i](...n):void 0)}subscribe(t){this.sendCommand(t,"subscribe")&&this.guarantor.guarantee(t)}confirmSubscription(t){m.log(`Subscription confirmed ${t}`),this.findAll(t).map(i=>this.guarantor.forget(i))}sendCommand(t,i){const{identifier:n}=t;return this.consumer.send({command:i,identifier:n})}}class Oi{constructor(t){this._url=t,this.subscriptions=new Ei(this),this.connection=new vt(this)}get url(){return ki(this._url)}send(t){return this.connection.send(t)}connect(){return this.connection.open()}disconnect(){return this.connection.close({allowReconnect:!1})}ensureActiveConnection(){if(!this.connection.isActive())return this.connection.open()}}function ki(e){if(typeof e=="function"&&(e=e()),e&&!/^wss?:/i.test(e)){const t=document.createElement("a");return t.href=e,t.href=t.href,t.protocol=t.protocol.replace("http","ws"),t.href}else return e}function Ci(e=ji("url")||Yt.default_mount_path){return new Oi(e)}function ji(e){const t=document.head.querySelector(`meta[name='action-cable-${e}']`);if(t)return t.getAttribute("content")}function yt(e){var t,i;const n=((t=performance==null?void 0:performance.getEntriesByType)==null?void 0:t.call(performance,"navigation"))||[];return e.type==="pageshow"&&(e.persisted||((i=n[0])==null?void 0:i.type)==="back_forward")}let O,ee,ie;B.staleThreshold=10,B.reconnectionBackoffRate=.2;const Li=(e,t)=>{if((ee!==t||ie!==e)&&(O==null||O.disconnect(),O=void 0),!O){const i=`${hi.replace("https","wss")}/cable?profile_id=${e}&project_slug=${t}`;O=Ci(i),ee=t,ie=e}return O};window.addEventListener("pagehide",()=>{var e,t;O&&(O.disconnect(),(t=(e=O.connection)==null?void 0:e.webSocket)==null||t.close())},{capture:!0}),window.addEventListener("pageshow",e=>{O&&yt(e)&&O.connection.reopen()},{capture:!0});function Ii(e,t,i){return e.subscriptions.create({channel:"ProfileChannel",sid:t.session.id},{isConnected:!1,connected(){this.isConnected=!0},disconnected(){this.isConnected=!1},rejected(){this.isConnected=!1},received:i})}const Pi="1.22.1";function bt(e,t){return new Promise(i=>{const n=async()=>{e&&await e(),i()},r=t||document;r.readyState==="complete"||r.readyState==="interactive"?setTimeout(n,0):r.addEventListener("DOMContentLoaded",n)})}function xi(e){return e=e==null?void 0:e.trim(),!e||e.length%4!==0?!1:/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}function P(e,t,i){const n=typeof t=="function"?t:void 0,r=(typeof t=="object"?t:i)||{},{timeout:s=100,retries:o=30,alwaysResolve:a=!1,backoff:c=!0}=r;let u=s;return new Promise((l,h)=>{let d=0;const f=()=>{typeof n=="function"&&n(),l()},A=async()=>{if(d>=o){a&&f();return}d++,c&&d>1&&(u+=s);try{await e()?f():setTimeout(A,u)}catch{setTimeout(A,u)}};A()})}/*! js-cookie v3.0.1 | MIT */function Q(e){for(var t=1;t=0;--s)r.push(i.slice(s).join("."));return r}function Tt(e){const t=Di(e);for(let i=0;iMi}function Bi(e){return new Date().getTime()-e.lastTouched256){for(tt=Array(e=256);e--;)tt[e]=256*Math.random()|0;e=x=0}for(;e<16;e++)t=tt[x+e],e==6?i+=Y[t&15|64]:e==8?i+=Y[t&63|128]:i+=Y[t],e&1&&e>1&&e<11&&(i+="-");return x++,i}const Ki="[object RegExp]",Wi="[object String]",Vi="[object Number]",Gi="[object Boolean]",he="[object Arguments]",Ji="[object Symbol]",Qi="[object Date]",Xi="[object Map]",Zi="[object Set]",Yi="[object Array]",tn="[object Function]",en="[object ArrayBuffer]",Ot="[object Object]",nn="[object Error]",rn="[object DataView]",sn="[object Uint8Array]",on="[object Uint8ClampedArray]",an="[object Uint16Array]",cn="[object Uint32Array]",un="[object BigUint64Array]",ln="[object Int8Array]",dn="[object Int16Array]",hn="[object Int32Array]",fn="[object BigInt64Array]",mn="[object Float32Array]",gn="[object Float64Array]";function fe(e){return Object.getOwnPropertySymbols(e).filter(t=>e.propertyIsEnumerable(t))}function me(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function ge(e){if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(e.toString()!=="[object Object]")return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function pn(e,t){if(typeof e==typeof t)switch(typeof e){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return e===t;case"number":return e===t||Object.is(e,t);case"function":return e===t;case"object":return C(e,t)}return C(e,t)}function C(e,t,i){if(Object.is(e,t))return!0;let n=me(e),r=me(t);if(n===he&&(n=Ot),r===he&&(r=Ot),n!==r)return!1;switch(n){case Wi:return e.toString()===t.toString();case Vi:{const a=e.valueOf(),c=t.valueOf();return a===c||Number.isNaN(a)&&Number.isNaN(c)}case Gi:case Qi:case Ji:return Object.is(e.valueOf(),t.valueOf());case Ki:return e.source===t.source&&e.flags===t.flags;case tn:return e==t}i=i!=null?i:new Map;const s=i.get(e),o=i.get(t);if(s!=null&&o!=null)return s===t;i.set(e,t),i.set(t,e);try{switch(n){case Xi:{if(e.size!==t.size)return!1;for(const[a,c]of e.entries())if(!t.has(a)||!C(c,t.get(a),i))return!1;return!0}case Zi:{if(e.size!==t.size)return!1;const a=Array.from(e.values()),c=Array.from(t.values());for(let u=0;uC(l,d,i));if(h===-1)return!1;c.splice(h,1)}return!0}case Yi:case sn:case on:case an:case cn:case un:case ln:case dn:case hn:case fn:case mn:case gn:{if(typeof Buffer!="undefined"&&Buffer.isBuffer(e)!==Buffer.isBuffer(t)||e.length!==t.length)return!1;for(let a=0;a{pn(i[r],n[r])&&delete n[r]}),n}userInfo(){return{id:this.id(),traits:this.traits()}}reset(){window.localStorage.removeItem(F),window.localStorage.removeItem(kt),Z(F,this.cookieDefaults)}}const jt=e=>{var t;return new Ct({cookies:(t=e==null?void 0:e.sdk_settings)==null?void 0:t.cookie_defaults})};function wn(){const e=window.navigator.userAgent;return/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(e)?"tablet":/Mobile|Android|iP(hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(e)?"mobile":"desktop"}function vn(){try{return Et()}catch{}}function yn(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}class bn{constructor(t){this.current=n=>{const r=n==="page"?void 0:vn(),s=window.ko;return{page:r,userAgent:window.navigator.userAgent,platform:{name:window.navigator.platform,deviceType:wn()},library:{name:"koala",version:s==null?void 0:s.version},session:this.session(),locale:window.navigator.language,timezone:yn()}};var i;this.options=t||{},this.user=new Ct({cookies:(i=this.options.sdk_settings)==null?void 0:i.cookie_defaults})}session(){return At.fetch(this.options.sdk_settings)}}class nt{constructor(){this.callbacks={}}on(t,i){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(i),this}once(t,i){const n=(...r)=>{this.off(t,n),i.apply(this,r)};return this.on(t,n),this}off(t,i){const n=this.callbacks[t];if(n){const r=n.filter(s=>s!==i);this.callbacks[t]=r}return this}emit(t,...i){const n=this.callbacks[t];return n&&n.forEach(r=>r.apply(this,i)),this}removeListeners(){this.callbacks={}}}function _n(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}const rt=_n;var Tn=typeof global=="object"&&global&&global.Object===Object&&global;const Sn=Tn;var An=typeof self=="object"&&self&&self.Object===Object&&self,En=Sn||An||Function("return this")();const we=En;var On=function(){return we.Date.now()};const Lt=On;var kn=/\s/;function Cn(e){for(var t=e.length;t--&&kn.test(e.charAt(t)););return t}const jn=Cn;var Ln=/^\s+/;function In(e){return e&&e.slice(0,jn(e)+1).replace(Ln,"")}const Pn=In;var xn=we.Symbol;const st=xn;var ve=Object.prototype,Fn=ve.hasOwnProperty,Rn=ve.toString,$=st?st.toStringTag:void 0;function Dn(e){var t=Fn.call(e,$),i=e[$];try{e[$]=void 0;var n=!0}catch{}var r=Rn.call(e);return n&&(t?e[$]=i:delete e[$]),r}const qn=Dn;var Mn=Object.prototype,Nn=Mn.toString;function Bn(e){return Nn.call(e)}const Un=Bn;var $n="[object Null]",zn="[object Undefined]",ye=st?st.toStringTag:void 0;function Hn(e){return e==null?e===void 0?zn:$n:ye&&ye in Object(e)?qn(e):Un(e)}const Kn=Hn;function Wn(e){return e!=null&&typeof e=="object"}const Vn=Wn;var Gn="[object Symbol]";function Jn(e){return typeof e=="symbol"||Vn(e)&&Kn(e)==Gn}const Qn=Jn;var be=0/0,Xn=/^[-+]0x[0-9a-f]+$/i,Zn=/^0b[01]+$/i,Yn=/^0o[0-7]+$/i,tr=parseInt;function er(e){if(typeof e=="number")return e;if(Qn(e))return be;if(rt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=rt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Pn(e);var i=Zn.test(e);return i||Yn.test(e)?tr(e.slice(2),i?2:8):Xn.test(e)?be:+e}const _e=er;var ir="Expected a function",nr=Math.max,rr=Math.min;function sr(e,t,i){var n,r,s,o,a,c,u=0,l=!1,h=!1,d=!0;if(typeof e!="function")throw new TypeError(ir);t=_e(t)||0,rt(i)&&(l=!!i.leading,h="maxWait"in i,s=h?nr(_e(i.maxWait)||0,t):s,d="trailing"in i?!!i.trailing:d);function f(p){var I=n,z=r;return n=r=void 0,u=p,o=e.apply(z,I),o}function A(p){return u=p,a=setTimeout(ut,t),l?f(p):o}function T(p){var I=p-c,z=p-u,Le=t-I;return h?rr(Le,s-z):Le}function R(p){var I=p-c,z=p-u;return c===void 0||I>=t||I<0||h&&z>=s}function ut(){var p=Lt();if(R(p))return je(p);a=setTimeout(ut,T(p))}function je(p){return a=void 0,d&&n?f(p):(n=r=void 0,o)}function Gr(){a!==void 0&&clearTimeout(a),u=0,n=c=r=a=void 0}function Jr(){return a===void 0?o:je(Lt())}function Rt(){var p=Lt(),I=R(p);if(n=arguments,r=this,c=p,I){if(a===void 0)return A(c);if(h)return clearTimeout(a),a=setTimeout(ut,t),f(c)}return a===void 0&&(a=setTimeout(ut,t)),o}return Rt.cancel=Gr,Rt.flush=Jr,Rt}const or=sr;var ar="Expected a function";function cr(e,t,i){var n=!0,r=!0;if(typeof e!="function")throw new TypeError(ar);return rt(i)&&(n="leading"in i?!!i.leading:n,r="trailing"in i?!!i.trailing:r),or(e,t,{leading:n,maxWait:t,trailing:r})}const It=cr;function ur(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}class Te extends nt{constructor(t={}){super(),this.flushed=[],this.queue=new Set,this.flushing=!1,t.onSend&&(this.onSend=t.onSend),this.scheduleSend=It(this.send,t.flushInterval||1e4,{leading:!1,trailing:!0})}add(t){this.queue.add(t),this.scheduleSend()}flush(){this.scheduleSend.flush()}get all(){return this.flushed.concat(Array.from(this.queue))}reset(){this.queue.clear(),this.flushed.length=0}onSend(t){return!0}send(t=!1){if(this.flushing&&!t){setTimeout(()=>this.scheduleSend(),0);return}try{if(this.flushing=!0,this.queue.size){const i=Array.from(this.queue),n=this.onSend(i),r=s=>{s!==!1&&(this.flushed.push(...i),this.queue.clear(),this.emit("processed",i))};ur(n)?n.then(r).finally(()=>{this.flushing=!1}):r(n)}}finally{this.flushing=!1}}}class lr extends Te{constructor(t={},i,n){super(t),this.events=[],this.projectSlug=i,this.context=n}track(t,i={},n="track",r={}){const s={context:{...this.context.current("event"),...r},message_id:et(),type:n,event:t,properties:i,sent_at:new Date().toISOString()};this.events.push(s),this.add(s)}reset(){this.queue.clear(),this.flushed.length=0,this.events=[]}onSend(t=[]){const i=this.context.user.id(),n=this.projectSlug;return!n||!i?!1:vi(n,i,t)}}var Xr=v(639);const dr=/[A-Z]?[a-z]+|[0-9]+|[A-Z]+(?![a-z])/g;function Pt(e){var t;return Array.from((t=e.match(dr))!=null?t:[])}const hr=e=>Pt(e).map(i=>i.toLowerCase()).join("_"),Se=e=>Pt(e).map(i=>i.toLowerCase()).join(" "),fr=e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase();function Ae(e){const t=Pt(e);if(t.length===0)return"";const[i,...n]=t;return`${i.toLowerCase()}${n.map(r=>fr(r)).join("")}`}let ot;const xt=["captcha","card","cc","ccn","credit","cvv","password","payable","pin","pw","receivable","routing","secret","security","ssn","token","account"].flatMap(e=>[e.toLowerCase(),hr(e),Se(e)]),mr=["email","name","phone","phoneNumber","firstName","lastName","fullName","title","username","website","domain","company"];function gr(e,t){let i=e;for(;i&&!(t(i)||(i=i.parentElement,!i||i.tagName==="FORM")););return i}function at(e){var t,i;return((t=e==null?void 0:e.innerText)==null?void 0:t.trim())||((i=e==null?void 0:e.textContent)==null?void 0:i.trim())}function pr(e,t){let i;if(e.labels&&e.labels.length){const[n,...r]=Array.from(e.labels);i=at(n)}if(!i){const n=[e.previousElementSibling,e.nextElementSibling].filter(r=>(r==null?void 0:r.tagName)==="LABEL"&&at(r));n.length&&(i=at(n[0]))}if(!i){const n=gr(e,r=>{const s=r.querySelectorAll("label").length>0,o=t.every(a=>a===e||!r.contains(a));return s&&o});n&&n.tagName!=="FORM"&&(i=at(n.querySelector("label")))}return Ae(i||"")}function wr(e,t){const i=e.tagName.toLowerCase(),n=e.type,r=e.id?`#${e.id}`:"",s=e.className?`.${e.className}`:"";return`${i}_${t}_${[n,r,s].filter(Boolean).join("_")}`}function vr(e){const t={},i=Array.from(e.elements);for(const n of i){if(!n.value||!["INPUT","SELECT","TEXTAREA"].includes(n.tagName)||["checkbox","radio"].includes(n.type)&&!n.checked||n.type==="password"||n.type==="hidden"||n.type==="submit"||n.name&&xt.some(a=>n.name.toLowerCase().includes(a))||n.id&&xt.some(a=>n.id.toLowerCase().includes(a)))continue;const r=pr(n,i);if(r&&xt.some(a=>r.toLowerCase().includes(a)))continue;const s=n.id||wr(n,i.indexOf(n)),o=[n.name,r,s].filter(Boolean);for(const a of o)if(!t[a]){t[a]={id:s,label:r,name:n.name,type:n.type,tagName:n.tagName,value:n.value};break}}return t}function yr(e){const t={};for(const[i,n]of Object.entries(e))t[i]=n.value;return t}function ct(e){const t=document.createElement("input");return t.type="email",t.required=!0,t.value=String(e),t.checkValidity()}function br(e){return Object.entries(e).filter(([t,i])=>{var n,r,s,o,a,c;return i.type==="email"||(r=(n=i.name)==null?void 0:n.toLowerCase())!=null&&r.includes("email")||(o=(s=i.label)==null?void 0:s.toLowerCase())!=null&&o.includes("email")||(c=(a=i.id)==null?void 0:a.toLowerCase())!=null&&c.includes("email")?ct(i.value):!1}).map(([t])=>t)}function _r(e){const t={},i=br(e),n=i.length===1;for(const[r,s]of Object.entries(e)){if(n&&i[0]===r){t.email=s.value;continue}const a=[s.name,s.label,s.id].filter(Boolean).map(c=>Ae(Se(c||"").replace(/^(your|work|business|job)(\s+)/i,""))).find(c=>mr.includes(c)&&!t[c]);a&&a!=="email"&&s.value&&(t[a]=s.value)}return t.email||t.firstName&&t.lastName?t:{}}function Tr(e){Ee();const t=async s=>{const o=s instanceof HTMLFormElement,a=s.tagName,c=o||a==="FORM";if(s.getAttribute("data-koala-collect")==="off"||!c)return;const l=Et(),h=vr(s),d=yr(h),f=_r(h),A=s.getAttribute("data-koala-selector")||s.getAttribute("id")||s.className;try{await e({context:{page:l,selector:A},name:s.getAttribute("name")||s.id,method:s.method,action:s.action,formData:d,traits:f})}catch{}},i=async s=>{try{const o=s.target;if(typeof o.requestSubmit=="function"){s.preventDefault(),s.stopPropagation(),await t(o);const a=o.querySelector("button[type=submit], input[type=submit]"),c=s.currentTarget;setTimeout(()=>{a?o.requestSubmit(a):o.requestSubmit(),c==null||c.addEventListener("submit",i,{capture:!0,once:!0})},0)}else{await t(o);const a=s.currentTarget;a==null||a.addEventListener("submit",i,{capture:!0,once:!0})}}catch{}};document.addEventListener("submit",i,{capture:!0,once:!0});const n=document.querySelectorAll("iframe");n.forEach(s=>{const o=s.contentDocument;o&&bt(()=>{o.addEventListener("submit",i,{capture:!0,once:!0})},o)});const r=HTMLFormElement.prototype.submit;return HTMLFormElement.prototype.submit=async function(){try{await t(this)}catch{}r.call(this)},ot=()=>{document.removeEventListener("submit",i,{capture:!0}),n.forEach(s=>{const o=s.contentDocument;o&&bt(()=>{o.removeEventListener("submit",i,{capture:!0})},o)}),HTMLFormElement.prototype.submit=r},ot}function Ee(){ot&&ot()}function Sr({project:e,...t}){return M(`/web/projects/${e}/metrics`,t)}class Ar extends Te{constructor(t={},i,n){super(t),this.projectSlug=i,this.context=n}increment(t,i){this.add({context:this.context.current("metric"),id:et(),name:t,properties:i,sent_at:new Date})}onSend(t=[]){const i=this.context.user.id(),n=this.projectSlug;return!n||!i?!1:Sr({project:n,profile_id:i,metrics:t})}}function Er(e,t){try{return e=new URL(e,window.location.origin),t=new URL(t||window.location.href,window.location.origin),e.hostname===t.hostname&&e.pathname===t.pathname}catch{return!1}}function Or(e){const{top:t,left:i,right:n,bottom:r}=e.getBoundingClientRect(),s=e.offsetWidth,o=e.offsetHeight;return t>=-o&&i>=-s&&n<=(window.innerWidth||document.documentElement.clientWidth)+s&&r<=(window.innerHeight||document.documentElement.clientHeight)+o}class kr extends nt{constructor(t={}){super(),this.isFocused=!1,this.checkIdleIntervalMs=1e3,this.registered=!1,this.interacted=!1,this.startAutocapture=()=>{!document.hidden&&!this.isFocused&&this.startFocus(),this.registerListeners()},this.stopAutocapture=()=>{this.unregisterListeners(),this.endFocus()},this.restart=()=>{this.isFocused&&this.endFocus(),document.hidden||this.startFocus()},this.registerListeners=()=>{this.registered||(this.registered=!0,document.addEventListener("visibilitychange",this.onVisibilityChangeWrapper),window.addEventListener("blur",this.onBlur),window.addEventListener("focus",this.onFocus),window.addEventListener("scroll",this.pulse,{capture:!0,passive:!0}),document.addEventListener("mousedown",this.pulse,{passive:!0}),document.addEventListener("mousemove",this.pulse,{passive:!0}),document.addEventListener("touchstart",this.pulse,{passive:!0}),document.addEventListener("touchmove",this.pulse,{passive:!0}),document.addEventListener("keydown",this.pulse,{passive:!0}),document.addEventListener("keyup",this.pulse,{passive:!0}),document.addEventListener("click",this.pulse,{passive:!0}),document.addEventListener("contextmenu",this.pulse,{passive:!0}),document.addEventListener("play",this.pulse,{capture:!0,passive:!0}),window.addEventListener("pageshow",this.onBfCacheRestore),this.checkMedia(),this.checkIdleTime())},this.unregisterListeners=()=>{this.registered&&(window.clearTimeout(this.idleIntervalCheck),window.clearTimeout(this.idleMediaTimer),window.removeEventListener("blur",this.onBlur),window.removeEventListener("focus",this.onFocus),window.removeEventListener("scroll",this.pulse,{capture:!0}),document.removeEventListener("visibilitychange",this.onVisibilityChangeWrapper),document.removeEventListener("mousedown",this.pulse),document.removeEventListener("mousemove",this.pulse),document.removeEventListener("touchstart",this.pulse),document.removeEventListener("touchmove",this.pulse),document.removeEventListener("keydown",this.pulse),document.removeEventListener("keyup",this.pulse),document.removeEventListener("click",this.pulse),document.removeEventListener("contextmenu",this.pulse),document.removeEventListener("play",this.pulse,{capture:!0}),window.removeEventListener("pageshow",this.onBfCacheRestore),this.registered=!1)},this.onBfCacheRestore=i=>{yt(i)&&document.visibilityState==="visible"&&(this.startFocus(),this.checkMedia(),this.checkIdleTime())},this.startFocus=()=>{const i=performance.now();this.isFocused=!0,this.focusStart=i,this.lastFocusStart=i,this.emit("focus_time.start",this.focusStart)},this.endFocus=()=>{this.pulse.cancel(),this.emit("focus_time.end",this.currentFocusTime),this.isFocused=!1},this.onVisibilityChangeWrapper=()=>this.onVisibilityChange(document.visibilityState),this.checkIdleTime=()=>{window.clearTimeout(this.idleIntervalCheck),this.pulse.flush(),this.idleTime>=this.idleInterval&&this.endFocus(),this.idleIntervalCheck=window.setTimeout(()=>this.checkIdleTime(),this.checkIdleIntervalMs)},this.onBlur=()=>{this.isFocused&&this.endFocus()},this.onFocus=()=>{this.isFocused||this.startFocus()},this.onVisibilityChange=i=>{i==="visible"?this.onFocus():i==="hidden"&&this.onBlur()},this.pulse=It(()=>{this.interacted=!0,this.isFocused?this.lastFocusStart=performance.now():this.startFocus()},500,{leading:!0,trailing:!0}),this.checkMedia=()=>{window.clearTimeout(this.idleMediaTimer);const i=document.querySelectorAll("video");Array.from(i).filter(r=>r.paused||r.loop||r.muted&&!r.controls||r.readyState<2?!1:Or(r)).length>0&&document.visibilityState==="visible"&&this.pulse(),this.idleMediaTimer=window.setTimeout(()=>this.checkMedia(),this.checkIdleIntervalMs)},this.isFocused=!1,this.idleInterval=t.idleInterval||15e3,this.checkIdleIntervalMs=t.checkIdleIntervalMs||1e3,t.start!==!1&&this.startAutocapture()}get idleTime(){return this.isFocused&&typeof this.lastFocusStart=="number"?performance.now()-this.lastFocusStart:0}get currentFocusTime(){return this.interacted&&this.isFocused&&typeof this.focusStart=="number"?performance.now()-this.focusStart:0}clear(){this.restart()}}const Cr=60*60*1e3;function jr(e){const t=history.pushState;history.pushState=(...n)=>{t.apply(history,n),e.emit("page_tracker.push")};const i=history.replaceState;history.replaceState=(...n)=>{i.apply(history,n),e.emit("page_tracker.replace",...n)},window.addEventListener("popstate",()=>{e.emit("page_tracker.pop")})}class Lr extends nt{constructor(t){var i,n,r;super(),this.pages=[],this.collecting=!1,this.collectedSomeFocus=!1,this.autocapture=!0,this.registered=!1,this.startAutocapture=()=>{this.registered||(this.registered=!0,this.on("page_tracker.push",this.collect),this.on("page_tracker.replace",this.onReplaceState),this.on("page_tracker.pop",this.collect),document.addEventListener("visibilitychange",this.onVisibilityChange),window.addEventListener("focus",this.onVisibilityChange),window.addEventListener("pageshow",this.onPageShow),window.addEventListener("pagehide",this.onPageHide,{capture:!0}),this.focusTimer.on("focus_time.end",this.recordFocusTime),this.focusTimer.startAutocapture(),setTimeout(()=>{this.collect()},0))},this.stopAutocapture=()=>{this.registered&&(this.registered=!1,this.off("page_tracker.push",this.collect),this.off("page_tracker.replace",this.onReplaceState),this.off("page_tracker.pop",this.collect),document.removeEventListener("visibilitychange",this.onVisibilityChange),window.removeEventListener("focus",this.onVisibilityChange),window.removeEventListener("pageshow",this.onPageShow),window.removeEventListener("pagehide",this.onPageHide,{capture:!0}),this.focusTimer.off("focus_time.end",this.recordFocusTime),this.focusTimer.stopAutocapture())},this.allPages=()=>this.pages,this.onReplaceState=(s,o,a)=>{var c,u;const l=(u=(c=this.currentPage)==null?void 0:c.page)==null?void 0:u.url,h=a&&!Er(a,l);(!l||h)&&this.collect()},this.onVisibilityChange=()=>{var s,o,a,c,u;if(document.visibilityState==="visible"){const l=this.context.session(),h=(a=(o=(s=this.currentPage)==null?void 0:s.context)==null?void 0:o.session)==null?void 0:a.id,d=new Date().getTime(),f=(u=(c=this.currentPage)==null?void 0:c.visit_start)==null?void 0:u.getTime();h!==l.id?this.collect():(!f||Math.abs(d-f)>=Cr)&&this.collect()}},this.makePage=()=>({context:this.context.current("page"),message_id:et(),page:Et(),visit_start:new Date,focus_intervals:[]}),this.collect=()=>{this.collecting=!0;const s=this.endCurrentPage({emit:!1}),o=this.makePage();this.pages.push(o),this.collectedSomeFocus=!1;const a=[s,o].filter(Boolean);this.emit("page",a),this.collecting=!1},this.endCurrentPage=s=>{const o=this.currentPage;if(o&&(window.clearTimeout(this.collectFocusTimeout),this.collectFocusTimeout=void 0,this.focusTimer.restart(),!o.visit_end))return o.visit_end=new Date,(s==null?void 0:s.emit)!==!1&&this.emit("page",[o]),o},this.onPageShow=s=>{yt(s)&&(this.pages=[],this.collect())},this.onPageHide=()=>{this.collecting=!0,this.endCurrentPage(),this.collecting=!1},this.recordFocusTime=s=>{const o=this.currentPage;if(s=Math.round(s||0),o&&s){if(o.focus_intervals.push(s),this.emit("new_focus_time"),this.collecting||this.collectFocusTimeout)return;const a=o.focus_intervals.reduce((h,d)=>h+d,0),c=!this.collectedSomeFocus&&a>=1e3,u=o.focus_intervals.length%3==0,l=s>=1e4;(c||u||l)&&(this.collectFocusTimeout=window.setTimeout(()=>{this.collectFocusTimeout=void 0,this.collectedSomeFocus=!0,this.emit("page",[o])},2e3))}},this.context=t,this.autocapture=(r=(n=(i=t.options)==null?void 0:i.sdk_settings)==null?void 0:n.autocapture)!=null?r:!0,this.focusTimer=new kr({start:this.autocapture}),jr(this),this.onVisibilityChange=It(this.onVisibilityChange.bind(this),100,{leading:!0,trailing:!1}),this.autocapture&&this.startAutocapture()}get currentPage(){return this.pages[this.pages.length-1]}get currentFocusTime(){var t;return this.focusTimer.currentFocusTime+(((t=this.currentPage)==null?void 0:t.focus_intervals.reduce((i,n)=>i+n,0))||0)}get currentIdleTime(){return this.focusTimer.idleTime||0}get sessionFocusTime(){return this.focusTimer.currentFocusTime+this.pages.reduce((t,i)=>t+i.focus_intervals.reduce((n,r)=>n+r,0),0)}get scheduled(){return!!this.collectFocusTimeout}reset(){this.pages=[],this.focusTimer.clear()}}function Ir(e){window.addEventListener("message",t=>{t.origin==="https://demo.arcade.software"&&e&&t.data&&t.data.eventName&&e.track("Arcade "+t.data.eventName,t.data,{source:"arcade"})},!1)}function Pr(e){const t=()=>typeof window.drift!="undefined"&&typeof window.drift.on=="function",i=(r,s)=>{try{s()}catch(o){e==null||e.trackError(o,`drift.${r}`)}};P(t,()=>{t()&&window.drift.on("ready",()=>{window.drift.on("emailCapture",r=>{i("emailCapture",()=>{e&&!e.email&&r&&r.data&&r.data.email&&(e.identify({email:r.data.email},{source:"drift"}),e.track("Drift Email Captured",r.data,{source:"drift"}))})}),window.drift.on("phoneCapture",r=>{i("phoneCapture",()=>{e&&r&&r.phone&&(e.identify({phone:r.phone},{source:"drift"}),e.track("Drift Phone Captured",r,{source:"drift"}))})}),window.drift.on("startConversation",r=>{i("startConversation",()=>{if(e&&r){const s={};r.endUserEmail&&(s.email=r.endUserEmail),r.endUserId&&(s.drift__contact_id=r.endUserId),e.email||e.identify(s,{source:"drift"}),e.track("Drift Conversation Started",r,{source:"drift"})}})}),window.drift.on("scheduling:meetingBooked",r=>{i("scheduling:meetingBooked",()=>{e&&r&&e.track("Drift Meeting Booked",r,{source:"drift"})})})})},{timeout:500,retries:10})}function xr(e){P(()=>typeof window.FS=="function",()=>{window.FS("observe",{type:"start",callback:()=>{const n=window.FS("getSession",{format:"url"});n&&e.identify({fullstory_session_url:n},{source:"fullstory"})}}),window.addEventListener("fullstory/rageclick",n=>{var r;e.track("Rage Click Detected",{replay_url:(r=n==null?void 0:n.detail)==null?void 0:r.eventReplayUrlAtCurrentTime},{source:"fullstory"})})},{timeout:100,retries:10})}function Fr(e){window.addEventListener("message",t=>{var i,n,r,s,o,a;if(!e||e.email||!t.data)return!1;try{if(t.data.type==="hsFormCallback"&&t.data.eventName==="onFormSubmitted"){const c=(n=(i=t.data.data)==null?void 0:i.submissionValues)==null?void 0:n.email;c&&e.identify({email:c},{source:"hubspot_form"})}else if(t.data.meetingBookSucceeded){const c=((r=t.data.meetingsPayload)==null?void 0:r.bookingResponse)||{},u=(s=c.postResponse)==null?void 0:s.contact,l=u==null?void 0:u.email;l&&e.identify({email:l},{source:"hubspot_meeting"}),e.track("Meeting Booked",{integration:"HubSpot",contact:u,organizer:(o=c.postResponse)==null?void 0:o.organizer,meeting_date:(a=c.event)==null?void 0:a.dateString},{source:"hubspot_meeting"})}}catch(c){e==null||e.trackError(c,"initHubSpot")}})}function Rr(e){P(()=>typeof window.Intercom=="function",()=>{const n=window.Intercom("getVisitorId");e&&n&&e.identify({intercom__visitor_id:n},{source:"intercom"}),window.Intercom("onUserEmailSupplied",()=>{var r;try{const s=(r=document.querySelector(".intercom-messenger-frame"))==null?void 0:r.children[0];s&&e&&!e.email&&setTimeout(()=>{var o;const a=s.contentDocument,c=(o=a==null?void 0:a.body.querySelector('input[type="email"]'))==null?void 0:o.value;c&&e.identify({email:c},{source:"intercom"})},100)}catch(s){e==null||e.trackError(s,"intercom.onUserEmailSupplied")}})},{timeout:100,retries:10})}const Dr={VIEW_STEP:"Step Viewed",START_FLOW:"Flow Started",COMPLETE_FLOW:"Flow Completed",START_CHECKLIST:"Checklist Started",OPEN_CHECKLIST:"Checklist Opened",CLOSE_CHECKLIST:"Checklist Closed",COMPLETE_TASK:"Task Completed",CONVERTED:"User Converted",NAVIGATE:"User Navigated",IDENTIFY_USER:"User Identified",ENGAGE:"User Engaged"};function qr(e){P(()=>typeof window.navattic!="undefined"&&typeof window.navattic.onEvent=="function",()=>{window.navattic.onEvent(n=>{if(e)try{if(n.type==="IDENTIFY_USER"&&n.attributes&&!e.email){const r=n.attributes["user.email"]||n.attributes.email;r&&e.identify({email:r},{source:"navattic"})}n.type&&e.track("Navattic "+(Dr[n.type]||n.type),n,{source:"navattic"})}catch(r){e==null||e.trackError(r,"navattic.onEvent")}})},{timeout:500,retries:20})}function Mr(e){P(()=>typeof window.posthog=="object"&&typeof window.posthog.get_session_replay_url=="function",()=>{const n=window.posthog.get_session_replay_url();n&&e.identify({posthog_session_url:n,posthog_session_id:window.posthog.get_session_id(),posthog_distinct_id:window.posthog.get_distinct_id()},{source:"posthog"})},{timeout:100,retries:10})}function Nr(e){const t=()=>typeof window.qualified=="function";P(t,()=>{t()&&window.qualified("handleEvents",(n,r)=>{try{if(!e)return;if(r&&r.field_values&&!e.email){const s=r.field_values.email;s&&e.identify({email:s},{source:"qualified"})}e.track("Qualified "+n,r,{source:"qualified"})}catch(s){e==null||e.trackError(s,"qualified.handleEvents")}})},{timeout:100,retries:10})}const Oe=window.location.search;let ke=window.location.hostname;try{ke=Tt(new URL(window.location.href))||window.location.hostname}catch{}function Br(e){if(e.length===0)return!0;const t=window.location.host;return e.some(n=>{try{return new RegExp(n).test(t)}catch{return!0}})}const Ft=(e,t)=>(...i)=>t(e,...i);class Ur extends nt{constructor(t){var i,n,r,s,o,a;super(),this.version=Pi,this.initialized=!1,this.subscription=null,this.autocapture=!0,this.referrerAllowed=!0,this.geoAllowed=!0,this.collectForms=()=>{const d=[ke,"hsforms.com","salesforce.com","pardot.com","list-manage.com"];Tr(async f=>{let A=!0;if(f.action){const T=new URL(f.action);T.hostname&&(A=d.some(R=>T.hostname.endsWith(R)))}if(A){Object.keys(f.formData).length>0&&this.track("$submit",f);const T={...f.traits};this.email&&delete T.email,Object.keys(T).length>0&&this.identify(T,{source:"form"})}this.flush()})},this.initPlugins=()=>{var d;const f=((d=this.options)==null?void 0:d.sdk_settings)||{};Fr(this),f.autotrack_arcade&&Ir(this),f.autotrack_drift&&Pr(this),f.autotrack_intercom&&Rr(this),f.autotrack_navattic&&qr(this),f.autotrack_qualified&&Nr(this),f.autotrack_fullstory&&xr(this),f.autotrack_posthog_screen_recording&&Mr(this)},this.trackError=(d,f)=>{d&&this.stats.increment("sdk.error",{method:f||"general",message:d==null?void 0:d.message})},this.options=t,this.referrerAllowed=Br(((i=t.sdk_settings)==null?void 0:i.authorized_referrers)||[]),this.geoAllowed=(r=(n=t.sdk_settings)==null?void 0:n.geo_allowed)!=null?r:!0,this.autocapture=this.referrerAllowed&&this.geoAllowed&&((o=(s=t.sdk_settings)==null?void 0:s.autocapture)!=null?o:!0);const c=this.options.project,u=this.deserialize();this.referrer=u.r||document.referrer,this.user=new Ct({cookies:(a=this.options.sdk_settings)==null?void 0:a.cookie_defaults}),this.context=new bn(this.options),this.qualification=u.q;const l=this.options.a||u.a||{},h=u.rp||{};this.edge=pt(l),h&&(this.edge.rawProfile=h),this.stats=new Ar({flushInterval:1e3},c,this.context),this.eventQueue=new lr({flushInterval:1e3},c,this.context),this.pageTracker=new Lr(this.context),this.pageTracker.on("page",d=>{if(!(d!=null&&d.length)||!this.autocapture||!this.referrerAllowed||!this.geoAllowed)return;const f=d[d.length-1];this.edge.index(f);const A=()=>this.initialized&&Boolean(this.user.id()),T=()=>{const R=this.user.id();yi(c,R,d)};A()?T():this.when(A,T,{retries:10,alwaysResolve:!0})}),document.addEventListener("visibilitychange",()=>{document.hidden&&this.flush()}),t.hookSegment!==!1&&this.detectSegment(),this.detectRudder(),this.detectHubspot(),setTimeout(()=>{this.detectorStats()},5e3),this.once("initialized",d=>{this.initialized=!0,this.bootstrapData=d,this.stats.increment("sdk.loaded",{page:window.location.pathname}),this.referrerAllowed||(console.warn("[KOALA]","Current domain not allowed to load the SDK"),this.stats.increment("sdk.referrer.blocked",{host:window.location.host})),this.geoAllowed||this.stats.increment("sdk.geo.blocked",{host:window.location.host}),this.detectIdLink(),this.autocapture&&this.initPlugins(),d.sdk_settings.querystring_collection!=="off"&&this.detectKoTraits(),this.autocapture&&d.sdk_settings.form_collection!=="off"&&this.collectForms()})}async ready(t){return bt(async()=>this.initialized||this.qualification?(t&&await t(),Promise.resolve(void 0)):new Promise(i=>{this.once("initialized",async()=>{t&&await t(),i(void 0)})}))}cookieDefaults(){var t;return((t=this.options.sdk_settings)==null?void 0:t.cookie_defaults)||{}}detectIdLink(){this.detectUtmId(),this.detectKoEmail()}detectKoTraits(){const t=new URLSearchParams(window.location.search),i=Array.from(t.entries()).filter(([n])=>n.startsWith("ko_trait_")).reduce((n,[r,s])=>{const o=r.replace("ko_trait_","");return n[o]=s,n},{});Object.keys(i).length>0&&this.identify(i,{source:"querystring"})}detectKoEmail(){const t=new URLSearchParams(Oe);let i=t.get("ko_e")||t.get("ko_email");if(i&&!this.email){i=i.trim();try{if(ct(i)){const n=t.get("k_is")||"ko_email";this.identify({email:i},{source:n})}}catch{}}}detectUtmId(){const t=new URLSearchParams(Oe),i=t.get("utm_id");if(i&&xi(i)&&!this.email)try{const n=atob(i.trim());if(ct(n)){const r=t.get("k_is")||"utm_id";this.identify({email:n},{source:r})}}catch{}}detectorStats(){var t,i,n,r,s,o;try{const a=window,c={"6sense":!!localStorage.getItem("_6senseCompanyDetails"),Albacross:!!((t=a.AlbacrossReveal)!=null&&t.company),Clearbit:!!a.reveal,Dealfront:!!((n=(i=a.discover)==null?void 0:i.data)!=null&&n.company),Demandbase:!!((s=(r=a.Demandbase)==null?void 0:r.Segments)!=null&&s.CompanyProfile),Drift:!!a.drift,Intercom:!!a.Intercom,Klaviyo:!!a.klaviyo,Marketo:!!a.MktoForms2,Leadoo:!!a.Leadoo,Pardot:!!a.getPardotUrl,Qualified:!!a.qualified,Rollworks:!!a.__adroll_loaded,Triblio:!!((o=a.Triblio)!=null&&o.getAccountIdentification()),ZoomInfo:!!localStorage.getItem("_ziVisitorInfo")};Object.keys(c).forEach(u=>{c[u]&&this.stats.increment(`sdk.${u}`)})}catch{}}flush(){this.serialize(),this.eventQueue.flush(),this.stats.flush()}stopAutocapture(){this.autocapture&&(this.autocapture=!1,this.pageTracker.stopAutocapture(),this.unsubscribe(),Ee())}startAutocapture(){var t;this.autocapture||(this.autocapture=!0,this.pageTracker.startAutocapture(),this.subscribe(),((t=this.options.sdk_settings)==null?void 0:t.form_collection)!=="off"&&this.collectForms())}get session(){return At.fetch(this.options.sdk_settings)}get email(){return this.user.email()}detectHubspot(){const t=()=>window._hstc_ran&&window._hsq&&window._hsq.push!==Array.prototype.push,i=()=>{try{const n=le("hubspotutk");n&&bi({project:this.options.project,profile_id:this.user.id(),utk:n})}catch(n){console.warn("[KOALA]",n)}!window._hsq||window._ko_hsq||(window._ko_hsq=!0,window._hsq.push=Ft(window._hsq.push,(n,...r)=>{try{const s=r[0];if(Array.isArray(s)){const[o,a]=s;o==="identify"&&this.identify(a,{source:"hubspot_hsq"}),o==="trackCustomBehavioralEvent"&&!window.analytics&&this.track(a.name,a.properties)}return n.apply(window._hsq,r)}catch(s){console.warn("[KOALA] HubSpot wrap error:",s)}}))};this.when(t,i,{timeout:1e3,retries:10})}detectSegment(){const t=()=>typeof window.analytics!="undefined"&&typeof window.analytics.ready=="function",i=()=>{t()&&window.analytics.ready(()=>{const n=window.analytics,r=n.user().traits();this.identify(r,{source:"segment"}),n.on("invoke",()=>{const s=n.user().traits();this.identify(s,{source:"segment"})}),n.on("track",(s,o)=>{var a;((a=this.bootstrapData)==null?void 0:a.sdk_settings.segment_auto_track)!=="off"&&this.track(s,o)}),n.on("identify",(s,o)=>{this.identify(o,{source:"segment"})}),n.on("reset",()=>{this.reset()})})};this.when(t,i,{timeout:100,retries:20,alwaysResolve:!0})}detectRudder(){const t=()=>typeof window.rudderanalytics!="undefined"&&typeof window.rudderanalytics.ready=="function",i=()=>{t()&&window.rudderanalytics.ready(()=>{const n=window.rudderanalytics,r=n.getUserTraits();let s={};if("getGroupTraits"in n&&(s=n.getGroupTraits()||{}),Object.keys(r).length>0){let o=r;Object.keys(s).length>0&&(o={...o,$account:s}),this.identify(o,{source:"rudderstack"})}n.track=Ft(n.track,(o,...a)=>{const c=a[0],u=a[1];return typeof c=="string"&&this.track(c,u||{}).catch(l=>{console.warn("[KOALA]",l)}),o(...a)}),n.identify=Ft(n.identify,(o,...a)=>{const c=a[0],u=a[1]||{};return typeof c=="string"&&typeof u=="object"&&Object.keys(u).length>0&&this.identify(u,{source:"rudderstack"}).catch(l=>{console.warn("[KOALA]",l)}),o(...a)})})};this.when(t,i,{timeout:1e3,retries:10,alwaysResolve:!0})}async track(t,i={},n){if(t=t.trim(),!t||!this.referrerAllowed||!this.geoAllowed)return;const r=t==="$submit"?"submit":"track";this.eventQueue.track(t,i,r,n),this.edge.index({event:t,properties:i}),this.emit("track",t,i)}async identify(...t){if(!this.referrerAllowed||!this.geoAllowed)return;let i={},n={};if(typeof t[0]=="string"?(i={...t[1]||{},email:t[0]},n=t[2]||{}):(i=t[0],n=t[1]||{}),!i||Object.keys(i).length===0)return;const r=[i.email,i.email_address,i.emailAddress].filter(a=>a&&ct(a));r.length>0?i.email=String(r[0]).trim():delete i.email;const s=this.user.netNewTraits(i);if(i.email&&(s.email=i.email),Object.keys(s).length===0)return;this.email&&s.email&&s.email!=this.email&&this.reset(),this.user.upsertTraits(s),this.edge.index(s);const o={context:{...this.context.current("identify"),source:n.source||"identify"},type:"identify",traits:s,sent_at:new Date().toISOString()};wi(this.options.project,this.profile,o),this.emit("identify",this.user.id(),i)}subscribe(){var t,i,n;this.referrerAllowed&&this.geoAllowed&&((i=(t=this.bootstrapData)==null?void 0:t.sdk_settings)==null?void 0:i.websocket_connection)!=="off"&&((n=this.bootstrapData)==null?void 0:n.edge_api)!==!1&&this.when(()=>Boolean(this.user.id())).then(()=>{const r=this.user.id(),s=this.options.project;this.unsubscribe();const o=Li(r,s);this.subscription=Ii(o,this,a=>{a.action==="score"&&this.updateQualification(a.data),a.action==="anonymous_profile"&&this.buildAnonymousProfile(a.data),a.action==="edge_profile"&&(this.edge.rawProfile=a.data)})}).catch(r=>{console.warn("[KOALA]","Error subscribing to profile.",r)})}unsubscribe(){var t;(t=this.subscription)==null||t.unsubscribe(),this.subscription=null}buildAnonymousProfile(t){const i=this.edge.rawProfile;this.edge=pt(t||{}),i&&(this.edge.rawProfile=i),this.emit("profile-update")}updateQualification(t){const{profile_id:i,qualification:n,a:r}=t;this.qualification=n,this.emit("qualification",t),r&&this.buildAnonymousProfile(r),i!==this.user.id()&&(this.user.setId(i),this.emit("profile-id-update",i))}async qualify(t){try{t=t==null?void 0:t.trim(),t&&(this.user.upsertTraits({email:t}),this.edge.index({email:t}));const i=await pi(this.options.project,this.profile);return this.updateQualification(i),i}catch(i){throw this.trackError(i,"qualify"),i}}serialize(){const t={r:this.referrer,q:this.qualification,a:{b:this.edge.raw.bloom.toHash(),c:this.edge.raw.counts.toHash()},rp:this.edge.rawProfile};window.localStorage.setItem("ka",JSON.stringify(t))}deserialize(){const t=window.localStorage.getItem("ka")||"{}";return JSON.parse(t)}get profile(){return{page_views:this.pageTracker.allPages(),user:this.user.userInfo(),referrer:this.referrer,events:this.eventQueue.events,email:this.user.traits().email,traits:this.user.traits(),qualification:this.qualification}}async reset(){this.eventQueue.send(!0),this.eventQueue.reset(),this.stats.send(!0),this.stats.reset(),this.pageTracker.reset(),this.unsubscribe(),this.user.reset(),window.localStorage.removeItem("ka"),this.qualification=void 0,this.edge=pt({}),At.clear(),this.subscribe()}get when(){return P}get e(){return this.edge.events}get p(){return this.edge.traits}get page(){return this.edge.page}mountWidget(){}}async function $r(e,t){let i=`/web/projects/${e}`;return t&&(i+=`?profile_id=${t}`),fi(i)}const zr=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function Hr(e){return typeof e=="string"&&zr.test(e)}function Kr(e){const t=Array.isArray(window.ko)&&window.ko[0]?[...window.ko]:[];for(const[i,...n]of t)typeof e[i]=="function"&&setTimeout(async()=>{try{await e[i].call(e,...n)}catch(r){console.warn(r)}},0)}function Wr(){}async function Vr(e,t){var i;try{const n=await $r(e,t);return n.profile_id?jt(n).setId(n.profile_id):t||jt(n).id(),n.sdk_settings={...n.sdk_settings||{},...((i=window.koalaSettings)==null?void 0:i.sdk_settings)||{}},{...n,project:e}}catch(n){throw console.warn("[KOALA]","Failed to load project settings",n),n}}async function Ce(e){var t;if(window.ko&&!Array.isArray(window.ko))return console.warn("[KOALA]","The Koala SDK is already loaded. Calling `load` again will have no effect."),window.ko;const i=(t=navigator==null?void 0:navigator.userAgent)==null?void 0:t.toLowerCase(),n=["googlebot","google web preview","adsbot","headlesschrome","lighthouse","speedindex","vercelbot","hubspot","yandex","ahrefsbot","ev-crawl","facebookexternalhit","facebookcatalog","sightbulb","slackbot","yahoo","bingbot","applebot","discordbot","baidu","screaming","pingdom","phantomjs"];if(navigator!=null&&navigator.webdriver||n.some(c=>i==null?void 0:i.includes(c)))return window.ko;let r=!1;const s=e.profileId;s&&(delete e.profileId,Hr(s)?jt().setId(s):(r=!0,console.warn("[KOALA]","The profileId provided on initialization is invalid. Please provide a valid UUID.")));const o=await Vr(e.project,pe()),a=new Ur({...e,...o});if(Kr(a),a.emit("initialized",o),a.subscribe(),r){const c=typeof s;a.stats.increment("sdk.error",{method:"load",message:"Invalid profileId provided on initialization",profileId:c==="string"?s:c})}return window.ko=a,a}typeof exports!="undefined"&&typeof window!="undefined"&&typeof window.KoalaSDK=="undefined"&&(window.KoalaSDK={load:Ce,mountWidget:Wr})},639:()=>{(function(w){if(typeof w.requestSubmit=="function")return;w.requestSubmit=function(g){g?(_(g,this),g.click()):(g=document.createElement("input"),g.type="submit",g.hidden=!0,this.appendChild(g),g.click(),this.removeChild(g))};function _(g,y){g instanceof HTMLElement||v(TypeError,"parameter 1 is not of type 'HTMLElement'"),g.type=="submit"||v(TypeError,"The specified element is not a submit button"),g.form==y||v(DOMException,"The specified element is not owned by this form element","NotFoundError")}function v(g,y,E){throw new g("Failed to execute 'requestSubmit' on 'HTMLFormElement': "+y+".",E)}})(HTMLFormElement.prototype)}},Dt={};function k(w){var _=Dt[w];if(_!==void 0)return _.exports;var v=Dt[w]={exports:{}};return Ie[w](v,v.exports,k),v.exports}k.d=(w,_)=>{for(var v in _)k.o(_,v)&&!k.o(w,v)&&Object.defineProperty(w,v,{enumerable:!0,get:_[v]})},k.o=(w,_)=>Object.prototype.hasOwnProperty.call(w,_),k.r=w=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(w,"__esModule",{value:!0})};var lt={};(()=>{"use strict";k.r(lt),k.d(lt,{load:()=>w.load});var w=k(398);function _(){var y,E;let D=(y=document.currentScript)==null?void 0:y.getAttribute("data-project");if(!D){const[dt,ht]=(((E=document.currentScript)==null?void 0:E.getAttribute("src"))||"").split("/").reverse();D=ht}return D}function v(){var y;return(y=window.koalaSettings)==null?void 0:y.profileId}async function g(){const y=_();if(!y){console.error("Koala SDK: Missing required project attribute.");return}try{const E=v();window.ko=await w.load({project:y,profileId:E})}catch(E){console.error("[KOALA]","Failed to load the Koala SDK.",E)}}g()})(),window.KoalaSDK=lt})(); //# sourceMappingURL=sdk.js.map