(function(e,t){for(var n in t)e[n]=t[n]})(this,function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=106)}({1:function(e,t){var n=["log","error","warn","info","debug"],o=["time","timeEnd","table","dir","group","groupEnd"],r=window.performance;e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"[LO]";if(!e)throw new Error("Debug namespace required.");var i=function(n){return"".concat(t,"[").concat(e,"] ").concat(n)},a={createBoilerplate:function(e){a[e]=function(){return a.run.apply(a,[e].concat(Array.prototype.slice.call(arguments)))}},shouldDebug:function(){if(window.localStorage){var t=window.localStorage.getItem("debug");if(t){var n=(t=t.replace(/\s/g,"")).split(",");if(n.indexOf("*")>-1)return!(n.indexOf("!"+e)>-1);if(n.indexOf(e)>-1)return!0}return!1}},run:function(){if(a.shouldDebug()){var t=Array.prototype.slice.call(arguments),o=t.shift();return n.includes(o)&&(t.unshift("color: ".concat("#ff9b38",";")),t.unshift("%c".concat("[LO]","[").concat(e,"]"))),console[o].apply&&console[o].apply(console,t),!0}return!1},mark:function(e){return e=i(e),a.shouldDebug()&&r&&r.mark(e)},measure:function(e,t,n){a.shouldDebug()&&r&&(e=i(e),t=i(t),n=i(n),r.measure(e,t,n),r.clearMarks(t),r.clearMarks(n))}};return n.forEach(a.createBoilerplate),o.forEach(a.createBoilerplate),a}},106:function(e,t,n){e.exports=n(145)},11:function(e,t,n){"use strict";var o=window.localStorage,r=window.sessionStorage,i={get:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{useSessionStorage:!1},n=t.useSessionStorage?r:o;if(n)return JSON.parse(n.getItem(e))},set:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{useSessionStorage:!1},i=n.useSessionStorage?r:o;if(t=JSON.stringify(t),i)return i.setItem(e,t)},remove:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{useSessionStorage:!1},n=t.useSessionStorage?r:o;if(n)return n.removeItem(e)}};t.a=i},14:function(e,t,n){"use strict";var o=n(1),r=new(n.n(o).a)("External Scripts"),i=(Object({NODE_ENV:"production",LO_APP_ENV:"production"}).LO_CDN_PATH,Object({NODE_ENV:"production",LO_APP_ENV:"production"}).LO_CDN_PATH||"https://tools.luckyorange.com"),a="https://storage.googleapis.com/lucky-orange-public/heatmap2/bootstrap.js",c={loaded:{},whitelist:{core:{legacy:"".concat(i,"/core/core.legacy.js"),modern:"".concat(i,"/core/core.js"),module:!1},heatmap:{legacy:"".concat(i,"/heatmaps/bootstrap.js"),module:!1},messenger:{legacy:"".concat(i,"/messenger/bootstrap.js"),module:!1},selector:{legacy:"".concat(i,"/core/selector.js"),module:!1},frame:{legacy:"".concat(i,"/core/frame.js"),module:!1},lo:{legacy:"".concat(i,"/core/lo.legacy.js")}},load:async function(e){var t,n,o,i,u,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!c.whitelist[e])throw new Error("Script [".concat(e,"] was not found in whitelist."));if(!c.loaded[e]||l.allowMultiple){"heatmap"===e&&null!==(t=window)&&void 0!==t&&null!==(n=t.LO)&&void 0!==n&&null!==(o=n.$internal)&&void 0!==o&&null!==(i=o.settings)&&void 0!==i&&null!==(u=i.state)&&void 0!==u&&u.features&&window.LO.$internal.settings.state.features["heatmaps-2"]&&(c.whitelist[e].legacy=a);var s=c.isModern()&&c.whitelist[e].modern?"modern":"legacy",d=null,f=window.localStorage&&window.localStorage.getItem("lo-debug-url:".concat(e)),m=window.localStorage&&window.localStorage.getItem("lo-debug-disable-script");if(m!==e){f?(r.log("Debug URL found for script [".concat(e,"] in localStorage.")),d=f,!1!==c.whitelist[e].module&&(l.module=!0)):d=c.whitelist[e][s],!1!==l.cacheControl&&(d="".concat(d,"?v=").concat("b4b9dfc"));var p=null;l.iframe&&(p=!0!==l.iframe?l.iframe:c.createFrame(e)),await c.waitForFrameLoad(p,(function(){var t=document;p&&(t=p.contentDocument),l.root&&(t=window.parent.document);var n=c.createScript(d,{name:e,doc:t,module:l.module});t&&t.head&&t.head.appendChild(n),r.log("Loading script from ".concat(d," ").concat(p?"in iframe":"")),c.loaded[e]=!0}),10)}else r.warn("Script [".concat(e,"] has been disabled by 'lo-debug-disable-script' in localStorage."))}else r.log("Script [".concat(e,"] has already been loaded."))},loadIntegration:function(e){return c.whitelist[e]={legacy:"".concat(i,"/integrations/integration-").concat(e,"/core/main.js")},c.load(e,{iframe:!1,cacheControl:!1})},loadIntegrationPrivacy:function(e){return c.whitelist["".concat(e,"-privacy")]={legacy:"".concat(i,"/integrations/integration-").concat(e,"/privacy/main.js")},c.load("".concat(e,"-privacy"),{iframe:!1,cacheControl:!1})},createScript:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.doc.createElement("script");return n.async=!0,n.charset="utf-8",n.src=e,n.crossOrigin="anonymous",t.name&&(n.id="lo-script-".concat(t.name)),t.module&&(n.type="module"),n},createFrame:function(e){var t=document.createElement("iframe");return t.id="lo-frame-".concat(e),t.src="about:blank",t.setAttribute("aria-hidden","true"),t.setAttribute("title","Lucky Orange: ".concat(e)),t.style.cssText="display: none !important;",document&&document.body&&document.body.appendChild(t),t},waitForFrameLoad:async function(e,t,n){if(!e||null==e||!e.contentWindow)return t();if(n<1)r.error("Frame never loaded.");else{var o="about:blank"===document.location.href?window.parent:window;await o.requestAnimationFrame((function(){var n=null;e&&e.contentDocument&&(n=e.contentDocument.readyState),"complete"===n||"interactive"===n?t():e&&e.contentWindow?e.contentWindow.addEventListener("load",(function(e){t()})):r.warn("Frame or frame.contentWindow not found.")}))}},isModern:function(){return"noModule"in document.createElement("script")}};t.a=c},145:function(e,t,n){"use strict";n.r(t);var o=n(3),r=n(1),i=n.n(r),a=n(54),c=n(65);var u=function(e,t,n){if(!c(e)||"string"!=typeof t)return void 0===n?e:n;var o=function(e){for(var t=e.split("."),n=[],o=0;o0&&void 0!==arguments[0]?arguments[0]:{};e={contextWindow:window,endpoint:"https://settings.luckyorange.com"};var t=new o.a,n={state:{},serverTime:void 0,localTime:new Date,getSiteId:function(){var t=null,o="not-found";((t=n.get("site.id"))&&(o="settings"),t||(t=window.localStorage&&window.localStorage.getItem("lo-debug-site-id"))&&(o="debug-key"),t)||(t=Array.from(document.querySelectorAll('script[src*="lo.js"]')).map((function(e){return new URL(e.src).searchParams.get("site-id")})).find((function(e){return null!=e})))&&(o="query-param");return t||(t=e.contextWindow.LOSiteId)&&(o="modern-var"),t||(t=e.contextWindow.__lo_site_id||e.contextWindow.__wtw_lucky_site_id)&&(o="legacy-var"),!t&&e.contextWindow.Ecwid&&(t=e.contextWindow.Ecwid.getAppPublicConfig("lucky-orange"))&&(o="ecwid"),s.log("Got Site ID:",t,o),String(t)},getVisitorId:function(){var t=e.contextWindow.document.cookie.indexOf("lo-uid");if(t>-1){var n=e.contextWindow.document.cookie.substring(t+("lo-uid".length+1));return n=n.substring(0,n.indexOf(";"))}},get:function(e){return u(n.state,e)},getCurrentServerTime:function(){return n.serverTime+n.getElapsedTime()},getElapsedTime:function(){return(new Date).getTime()-this.localTime},getTimeData:function(){return{localTime:n.localTime,serverTime:n.serverTime}},updateServerTime:function(e){!isNaN(e)&&e>0?(n.localTime=(new Date).getTime(),n.serverTime=e):s.error("cannot update serverTime. [".concat(e,"] is invalid"))},load:function(t){s.log("Loading settings for site:",t);var o=e.endpoint+"/"+t;return l.a.get("lo-sampling-disabled")&&(o+="?sampling=false"),(e.contextWindow.fetch||a.a)(o,{method:"GET",headers:{"x-lucky-uid":n.getVisitorId(),"x-lucky-referrer":e.contextWindow.document.referrer}}).then((function(e){if(!e.ok)throw new Error("Unable to get settings: "+e.status);return e.json()})).then((function(e){return n.state=e,n.updateServerTime(new Date(n.get("serverTime")).getTime()),e}))}};return n.load(n.getSiteId()).then((function(){return t.$internal.expose("settings",n,{internal:!0}),n}))},f=n(14),m=new i.a("Core"),p=new i.a("lo.js");!function(){p.log("Starting Lucky Orange..."),p.mark("start");var e=document.currentScript?document.currentScript.src:"";if(!f.a.isModern())return f.a.load("lo",{iframe:!1,currentScriptSrc:e});var t=new o.a({context:window,traverse:!1}),n={};(new d).then((function(e){return n.settings=e,t=0,new Promise((function(e,n){var o=window.localStorage&&window.localStorage.getItem("lo-debug-app-id"),r=null;window.parent!==window?r=window.parent:window.opener&&(r=window.opener),o?e(o):r?(window.addEventListener("message",(function(n){var o=n.data;o&&("LO::APPID"===o.type||"getAppId"===o.name&&o.payload)?(clearTimeout(t),e(o.appid||o.payload.appId)):o&&"LO::APPID"===o.type?m.warn("No event data or invalid event data received. Event: ",n):m.log("Message received not from Lucky Orange: ",n)})),t=setTimeout((function(){return e("core")}),2500),r.postMessage({name:"getAppId",type:"LO::APPID"},"*")):e("core")}));var t})).then((function(o){return n.settings.get("error")&&"core"===o?(p.log("Unable to start:",n.settings.get()),t):(f.a.load(o,{iframe:"heatmap"!==o,currentScriptSrc:e}),p.mark("end"),p.measure("Starting","start","end"),t)})).catch(p.error)}()},3:function(e,t,n){"use strict";var o=function(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).slice().map((function(e){e(n)})),(e["*"]||[]).slice().map((function(e){e(t,n)}))}}},r=n(1);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=new(n.n(r).a)("Shared API"),c="API Exposed";function u(){for(var e=arguments[0],t=0;t0&&void 0!==arguments[0]?arguments[0]:{};e=u({context:null,contextKey:"LO",traverse:!0},e);var t={},n=o(),r={on:n.on,emit:n.emit};n.emit=function(e,n){return t[e]=n,r.emit(e,n)},n.on=function(e,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return o.immediate&&t[e]&&n(t[e]),r.on(e,n)};var s={$internal:{expose:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=(n=u({internal:!0},n)).internal?s.$internal:s;if(o[e])throw new Error("Namespace [".concat(e,"] already exposed."));o[e]=t,s.$internal.bus.emit(c,{namespace:e,apiToAdd:t}),a.log("".concat(e," namespace exposed ").concat(n.internal?"internally":"publicly","."))},ready:function(e){return new Promise((function(t,n){var o=s[e]||s.$internal[e];if(o&&"object"===i(o))return t(o);s.$internal.bus.on(c,(function(n){if(n.namespace===e)return t(n.apiToAdd)}))}))},bus:n}};return null===e.context&&e.traverse&&(e.context=l(window,e.contextKey)),e.context[e.contextKey]?e.context[e.contextKey]&&"object"===i(e.context[e.contextKey])&&!e.context[e.contextKey].$internal?(e.context[e.contextKey]=u(s,e.context[e.contextKey]),e.context[e.contextKey]):e.context[e.contextKey]:(e.context[e.contextKey]=s,s)}},54:function(e,t,n){"use strict";t.a=function(e,t){return t=t||{},new Promise((function(n,o){var r=new XMLHttpRequest,i=[],a=[],c={},u=function(){return{ok:2==(r.status/100|0),statusText:r.statusText,status:r.status,url:r.responseURL,text:function(){return Promise.resolve(r.responseText)},json:function(){return Promise.resolve(r.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([r.response]))},clone:u,headers:{keys:function(){return i},entries:function(){return a},get:function(e){return c[e.toLowerCase()]},has:function(e){return e.toLowerCase()in c}}}};for(var l in r.open(t.method||"get",e,!0),r.onload=function(){r.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,(function(e,t,n){i.push(t=t.toLowerCase()),a.push([t,n]),c[t]=c[t]?c[t]+","+n:n})),n(u())},r.onerror=o,r.withCredentials="include"==t.credentials,t.headers)r.setRequestHeader(l,t.headers[l]);r.send(t.body||null)}))}},65:function(e,t,n){"use strict";e.exports=function(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}}}));