1const iubendaSiteId = document.currentScript.dataset.iubendaSiteId; 2const iubendaPolicyId = document.currentScript.dataset.iubendaPolicyId; 3const locale = document.currentScript.dataset.locale; 4 5// Callbacks for iubenda can only be set at initialization time 6// The React application is not yet running at this point and therefore cannot set them 7// Events can also be triggered before the React application, so we need to save the latest events and trigger them later when subscription is created 8 9class IubendaEventEmitter { 10 listeners = new Map(); 11 lastEvents = new Map(); 12 13 on(event, callback) { 14 if (!this.listeners.has(event)) { 15 this.listeners.set(event, new Set()); 16 } 17 18 this.listeners.get(event).add(callback); 19 20 if (this.lastEvents.has(event)) { 21 callback(); 22 } 23 24 return () => { 25 const listeners = this.listeners.get(event); 26 27 if (listeners) { 28 listeners.delete(callback); 29 30 if (listeners.size === 0) { 31 this.listeners.delete(event); 32 } 33 } 34 }; 35 } 36 37 emit(event, data) { 38 this.lastEvents.set(event, data); 39 40 const listeners = this.listeners.get(event); 41 if (listeners) { 42 listeners.forEach((callback) => callback(data)); 43 } 44 } 45} 46 47window._iubEventEmitter = new IubendaEventEmitter(); 48 49window._iub = window._iub || []; 50window._iub.csConfiguration = { 51 siteId: iubendaSiteId, 52 cookiePolicyId: iubendaPolicyId, 53 lang: locale, 54 storage: { 55 type: "local_storage", 56 useSiteId: true, 57 }, 58 logLevel: "error", 59 askConsentAtCookiePolicyUpdate: true, 60 countryDetection: true, 61 enableFadp: true, 62 enableLgpd: true, 63 enableUspr: true, 64 preferenceCookie: { expireAfter: 180 }, 65 usPreferencesWidgetDisplay: "inline-center", 66 whitelabel: false, 67 banner: { 68 acceptButtonCaptionColor: "#FFFFFF", 69 acceptButtonColor: "#0073CE", 70 acceptButtonDisplay: true, 71 backgroundColor: "#FFFFFF", 72 closeButtonDisplay: false, 73 customizeButtonCaptionColor: "#4D4D4D", 74 customizeButtonColor: "#DADADA", 75 customizeButtonDisplay: true, 76 fontSizeBody: "12px", 77 logo: null, 78 position: "float-bottom-right", 79 rejectButtonCaptionColor: "#FFFFFF", 80 rejectButtonColor: "#0073CE", 81 rejectButtonDisplay: true, 82 showTitle: false, 83 showTotalNumberOfProviders: true, 84 textColor: "#000000", 85 }, 86 callback: { 87 onPreferenceExpressed: () => { 88 window._iubEventEmitter.emit("preferenceExpressed"); 89 }, 90 onReady: () => { 91 window._iubEventEmitter.emit("ready"); 92 }, 93 }, 94};
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.