window['facebook-pixelDeps'] = ["/integrations/vendor/commons.a61d7bea37d2de5d4b69.js"];window['facebook-pixelLoader'] = function() { return window["facebook-pixelIntegration"]=function(e){function t(t){for(var i,a,s=t[0],p=t[1],c=t[2],d=0,l=[];d'),l=["checkinDate","checkoutDate","departingArrivalDate","departingDepartureDate","returningArrivalDate","returningDepartureDate","travelEnd","travelStart"],y=["email","firstName","lastName","gender","city","country","phone","state","zip","birthday"];function f(e){return Number(e||0).toFixed(2)}function h(e,t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);for(var r in t)t.hasOwnProperty(r)&&!n.hasOwnProperty(r)&&(n[r]=t[r]);return n}d.prototype.initialize=function(){if(window._fbq=function(){window.fbq.callMethod?window.fbq.callMethod.apply(window.fbq,arguments):window.fbq.queue.push(arguments)},window.fbq=window.fbq||window._fbq,window.fbq.push=window.fbq,window.fbq.loaded=!0,window.fbq.disablePushState=!0,window.fbq.allowDuplicatePageViews=!0,window.fbq.agent=this.options.agent,window.fbq.version="2.0",window.fbq.queue=[],this.load(this.ready),this.options.automaticConfiguration||window.fbq("set","autoConfig",!1,this.options.pixelId),this.options.limitedDataUse?this.validateAndSetDataProcessing(this.options.dataProcessingOptions||[["LDU"],0,0]):window.fbq("dataProcessingOptions",[]),this.options.initWithExistingTraits){var e=this.formatTraits(this.analytics);window.fbq("init",this.options.pixelId,e)}else window.fbq("init",this.options.pixelId)},d.prototype.loaded=function(){return!(!window.fbq||!window.fbq.callMethod)},d.prototype.page=function(e){window.fbq("track","PageView",{},{eventID:e.proxy("messageId")})},d.prototype.track=function(e){var t=this,n=e.event(),i=f(e.revenue()),o=this.buildPayload(e);e.properties().hasOwnProperty("revenue")&&(o.value=f(e.revenue()),delete o.revenue);var a=this.standardEvents(n),s=this.legacyEvents(n);[].concat(a,s).length?(r((function(n){"Purchase"===n&&(o.currency=e.currency()),window.fbq("trackSingle",t.options.pixelId,n,o,{eventID:e.proxy("messageId")})}),a),r((function(n){window.fbq("trackSingle",t.options.pixelId,n,{currency:e.currency(),value:i},{eventID:e.proxy("messageId")})}),s)):window.fbq("trackSingleCustom",this.options.pixelId,n,o,{eventID:e.proxy("messageId")})},d.prototype.productListViewed=function(e){var t,n=this,i=[],o=[],a=e.products(),s=this.buildPayload(e,!0);Array.isArray(a)&&a.forEach((function(e){var t=new c({properties:e}),n=t.proxy("properties.product_id")||t.productId()||t.id();n&&(i.push(n),o.push({id:n,quantity:t.quantity()}))})),i.length?t=["product"]:(i.push(e.category()||""),o.push({id:e.category()||"",quantity:1}),t=["product_group"]),window.fbq("trackSingle",this.options.pixelId,"ViewContent",h({content_ids:i,content_type:this.getContentType(e,t),contents:o},s),{eventID:e.proxy("messageId")}),r((function(t){window.fbq("trackSingle",n.options.pixelId,t,{currency:e.currency(),value:f(e.revenue())},{eventID:e.proxy("messageId")})}),this.legacyEvents(e.event()))},d.prototype.productViewed=function(e){var t=this,n="value"===this.options.valueIdentifier,i=this.buildPayload(e,!0);window.fbq("trackSingle",this.options.pixelId,"ViewContent",h({content_ids:[e.productId()||e.id()||e.sku()||""],content_type:this.getContentType(e,["product"]),content_name:e.name()||"",content_category:e.category()||"",currency:e.currency(),value:f(n?e.value():e.price()),contents:[{id:e.productId()||e.id()||e.sku()||"",quantity:e.quantity(),item_price:e.price()}]},i),{eventID:e.proxy("messageId")}),r((function(i){window.fbq("trackSingle",t.options.pixelId,i,{currency:e.currency(),value:f(n?e.value():e.price())},{eventID:e.proxy("messageId")})}),this.legacyEvents(e.event()))},d.prototype.productAdded=function(e){var t=this,n="value"===this.options.valueIdentifier,i=this.buildPayload(e,!0);window.fbq("trackSingle",this.options.pixelId,"AddToCart",h({content_ids:[e.productId()||e.id()||e.sku()||""],content_type:this.getContentType(e,["product"]),content_name:e.name()||"",content_category:e.category()||"",currency:e.currency(),value:f(n?e.value():e.price()),contents:[{id:e.productId()||e.id()||e.sku()||"",quantity:e.quantity(),item_price:e.price()}]},i),{eventID:e.proxy("messageId")}),r((function(i){window.fbq("trackSingle",t.options.pixelId,i,{currency:e.currency(),value:f(n?e.value():e.price())},{eventID:e.proxy("messageId")})}),this.legacyEvents(e.event()))},d.prototype.orderCompleted=function(e){for(var t=this,n=e.products(),i=this.buildPayload(e,!0),o=f(e.revenue()),a=this.getContentType(e,["product"]),s=[],p=[],u=0;u=0&&s.date(v))d[h]=v.toISOString().split("T")[0];else if(o.hasOwnProperty(h))o[h]&&"string"==typeof v&&(d[h]=u(v));else{var g=y.indexOf(h)>=0,w=n.indexOf(h)>=0;g&&!w||(d[h]=v)}}return d},d.prototype.validateAndSetDataProcessing=function(e){var t=3===e.length,n=Array.isArray(e[0])&&"number"==typeof e[1]&&"number"==typeof e[2];t&&n?window.fbq("dataProcessingOptions",e[0],e[1],e[2]):window.fbq("dataProcessingOptions",["LDU"],0,0)},d.merge=h}}); //# sourceMappingURL=facebook-pixel.js.map };