1!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.FFBPLibrary=t():e.FFBPLibrary=t()}(self,(()=>(()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}e.r(t),e.d(t,{enableFBPixel:()=>a});var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),$("#fabfacebookpixel_script").length&&(this.jsonEvents=JSON.parse($("#fabfacebookpixel_script").text()),this.facebookPixelId=this.jsonEvents.facebookPixelId,this.pixelDelay=1e3*this.jsonEvents.pixelDelay,this.isExportCombinations=this.jsonEvents.isExportCombinations,this.isPixelEnabled=this.jsonEvents.isPixelEnabled,this.moduleVersion=this.jsonEvents.moduleVersion,this.isDebug=this.jsonEvents.isDebug,this.iubendaIntegration=this.jsonEvents.iubendaIntegration,this.executorUrl=this.jsonEvents.fabFacebookPixelExecutorUrl,this.addToCartUrl=this.jsonEvents.fabFacebookPixelAddToCartUrl,this.canonicalUrl=this.jsonEvents.canonicalUrl,this.customerGroups=this.jsonEvents.customerGroups,this.defaultCustomerGroup=this.jsonEvents.defaultCustomerGroup,this.actualCartProducts=this.jsonEvents.cartProducts,this.token="")}var t,o;return t=e,o=[{key:"submitEvent",value:function(e){var t=this;$.post(this.executorUrl,e).then((function(n){var o=n.eventId,i=t.decodeEvents(e.params);delete i.description,delete i.product_price,delete i.id_product;var a=t;setTimeout((function(){switch(a.callFBQInitialization(),e.type){case"ViewCategory":null!=o?fbq("trackCustom","ViewCategory",i,{eventID:o}):fbq("trackCustom","ViewCategory",i);break;case"PageView":null!=o?fbq("track","PageView",i,{eventID:o}):fbq("track","PageView",i);break;case"Search":null!=o?fbq("track","Search",i,{eventID:o}):fbq("track","Search",i);break;case"AddToCart":null!=i.eventID?fbq("track","AddToCart",i,{eventID:i.eventID}):fbq("track","AddToCart",i);break;case"InitiateCheckout":null!=o?fbq("track","InitiateCheckout",i,{eventID:o}):fbq("track","InitiateCheckout",i);break;case"ViewContent":null!=o?fbq("track","ViewContent",i,{eventID:o}):fbq("track","ViewContent",i);break;case"Purchase":null!=i.eventID?fbq("track","Purchase",i,{eventID:i.eventID}):fbq("track","Purchase",i);break;case"CompleteRegistration":null!=i.eventID?fbq("track","CompleteRegistration",i,{eventID:i.eventID}):fbq("track","CompleteRegistration",i)}}),t.pixelDelay)}))}},{key:"decodeEvents",value:function(e){for(var t in e)if(!Array.isArray(e[t])&&!Number.isInteger(e[t])){var n=document.createElement("textarea");n.innerHTML=e[t],e[t]=n.value}return e}},{key:"collectEventsFromPage",value:function(e,t){var n=this.jsonEvents.events;for(var o in n){var i=n[o];i.params=this.filterAndSubstituteParams(i.params,e),i.canonicalUrl=this.canonicalUrl,void 0!==t&&(i.canonicalUrl=t),this.submitEvent(i)}}},{key:"filterAndSubstituteParams",value:function(e,t){for(var n in t)for(var o in e)n==o&&(e[o]=t[n]);return e}},{key:"callFBQInitialization",value:function(){var e,t,n,o,i,a;e=window,t=document,n="script",e.fbq||(o=e.fbq=function(){o.callMethod?o.callMethod.apply(o,arguments):o.queue.push(arguments)},e._fbq||(e._fbq=o),o.push=o,o.loaded=!0,o.version="2.0",o.queue=[],(i=t.createElement(n)).async=!0,i.src="https://connect.facebook.net/en_US/fbevents.js",(a=t.getElementsByTagName(n)[0]).parentNode.insertBefore(i,a)),fbq("consent",window.doNotConsentToPixel?"revoke":"grant"),fbq("init",this.facebookPixelId)}}],o&&n(t.prototype,o),Object.defineProperty(t,"prototype",{writable:!1}),e}(),i=0;function a(){var e=new o,t=1e3*e.pixelDelay,n=!!window.doNotConsentToPixel;
1if(i=e.isDebug,r("Version :"+e.moduleVersion),r(!!window.doNotConsentToPixel),r("Pixel is configured with a delay of :"+t+"ms"),e.isPixelEnabled&&null!=e.facebookPixelId&&!n)if(r("Facebook Pixel enabled and FBD not null"),"1"===e.iubendaIntegration){r("Iubenda integration is active");var a=function(e){var t=function(){for(var e=document.cookie.split(";"),t={},n=0;n<e.length;n++){var o=e[n],i=o.indexOf("="),a=unescape(o.slice(0,i)).trim(),r=unescape(o.slice(i+1));t[":"+a]=r}return t}();for(name in t){var n=t[name];if(0==name.indexOf(":_iub_cs")&&-1==name.indexOf("granular"))return n}}();if(void 0!==a&&null!=a){r("Iubenda cookie value exists and not null");var s=JSON.parse(a);void 0!==s.purposes&&(r("Cookie Content: "+JSON.stringify(s)),r("Purposes in cookie are found"),void 0!==s.purposes[4]&&!1!==s.purposes[4]&&(r('Purposes["4"] is'+s.purposes[4]),e.collectEventsFromPage()))}}else r("Iubenda integration is not active."),e.collectEventsFromPage();else r("Facebook pixel null, disabled or disabled by third party modules.")}function r(e){if(1==i){var t="Facebook Pixel Module - ";t=t+new Date+": "+e,console.log(t)}}return $(document).ready((function(){a()})),t})()));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.