1!function(e){var n;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var t=window.Cookies,o=window.Cookies=e();o.noConflict=function(){return window.Cookies=t,o}}}(function(){function e(){for(var e=0,n={};e<arguments.length;e++){var t=arguments[e];for(var o in t)n[o]=t[o]}return n}function n(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function t(o){function r(){}function i(n,t,i){if("undefined"!=typeof document){"number"==typeof(i=e({path:"/"},r.defaults,i)).expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var c=JSON.stringify(t);/^[\{\[]/.test(c)&&(t=c)}catch(e){}t=o.write?o.write(t,n):encodeURIComponent(String(t)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=encodeURIComponent(String(n)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var f="";for(var u in i)i[u]&&(f+="; "+u,!0!==i[u]&&(f+="="+i[u].split(";")[0]));return document.cookie=n+"="+t+f}}function c(e,t){if("undefined"!=typeof document){for(var r={},i=document.cookie?document.cookie.split("; "):[],c=0;c<i.length;c++){var f=i[c].split("="),u=f.slice(1).join("=");t||'"'!==u.charAt(0)||(u=u.slice(1,-1));try{var a=n(f[0]);if(u=(o.read||o)(u,a)||n(u),t)try{u=JSON.parse(u)}catch(e){}if(r[a]=u,e===a)break}catch(e){}}return e?r[e]:r}}return r.set=i,r.get=function(e){return c(e,!1)},r.getJSON=function(e){return c(e,!0)},r.remove=function(n,t){i(n,"",e(t,{expires:-1}))},r.defaults={},r.withConverter=t,r}(function(){})}); 2function getCookie(e){for(var t=e+"=",o=decodeURIComponent(document.cookie).split(";"),r=0;r<o.length;r++){for(var n=o[r];n.startsWith(" ");)n=n.substring(1);if(0===n.indexOf(t))return n.substring(t.length,n.length)}return""}class PardotUTMTags{LOCALSTORAGE_KEY="__gtm_campaign_url";REFERRER_KEY="__gtm_referrer";INNER_REFERRER_PAGE="ev_referral_page";UTM_TAGS=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","utm_id","gclid","clclid"];utmParams=void 0;urlUtmParams=void 0;areCookiesEnabled(){return isTargetingAccepted()}urlToSearchParamsObject(e){if(e)return Object.fromEntries(new URLSearchParams(new URL(e).search).entries())}getReferrer(){if(document.referrer&&""!==document.referrer&&new URL(document.referrer).host!==document.location.host)return document.referrer}setInnerReferrerPage(){return document.referrer&&new URL(document.referrer).host===document.location.host&&new URL(document.referrer).pathname!==document.location.pathname&&localStorage.setItem(this.INNER_REFERRER_PAGE,new URL(document.referrer).pathname),this}updateGTMLocalStorage(){const e=document.location.toString(),t=this.urlToSearchParamsObject(e),o=t?Object.keys(t):[],r=o.length>0&&this.UTM_TAGS.some(e=>o.includes(e)),n=this.getReferrer();n&&this.areCookiesEnabled()&&Cookies.set(this.REFERRER_KEY,n,{expires:365});const s=()=>{const e=Cookies.get(this.LOCALSTORAGE_KEY);let t;try{t=JSON.parse(e)||void 0}catch{t=void 0}return{cookies:t}};let i="",a=s();return a.cookies?.first_gclid&&(i=a.cookies.first_gclid),r&&(t&&!i&&"gclid"in t&&(i=t.gclid),this.urlUtmParams=t,this.areCookiesEnabled()&&Cookies.set(this.LOCALSTORAGE_KEY,JSON.stringify({first_gclid:i||void 0,...t}),{expires:365})),a=s(),a.cookies&&(this.utmParams=a.cookies),this}getUrlWithGTMParams(e){if(!e)return"";if(!this.isValidURL(e))return e;const t=new URL(e),o=new URLSearchParams(t.search),r=Object.fromEntries([...o.entries()]),n=this.utmParams||this.urlUtmParams||{},s=localStorage.getItem(this.INNER_REFERRER_PAGE),i={...r,...n,...s?{[this.INNER_REFERRER_PAGE]:s}:{}},a=new URLSearchParams(Object.entries(i)).toString();return a?t.origin+t.pathname+"?"+a:e}isValidURL(e){try{const t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch(e){return!1}}updateIframes(){const e=document.querySelectorAll('button[data-toggle="modal"][data-form]');for(const t of[...e])t.dataset.form=this.getUrlWithGTMParams(t.dataset.form);const t=document.querySelectorAll('iframe[src^="https://www2.ecovadis.com/"]');for(const e of[...t])e.src=this.getUrlWithGTMParams(e.src);return this}}function getPardotUTMTags(){return window.pardotUTMTags=window.pardotUTMTags||new PardotUTMTags,window.pardotUTMTags}function OptanonWrapper(){let e,t;function o(){const e=OnetrustActiveGroups.includes("C0001")&&OnetrustActiveGroups.includes("C0003");window._wq=window._wq||[],window._wq.push(function(t){t.consent(e)})}function r(){const t=e?.split(",")?.filter(e=>Boolean(e));t.includes("C0002")&&t.includes("C0003")&&t.includes("C0004")||OneTrust.BlockGoogleAnalytics("G-KDH6MH4V4F","C0002")}function n(){var e=["C0002"];window.addEventListener("OneTrustGroupsUpdated",function(){var t=(window.OnetrustActiveGroups||"").split(","),o=e.every(e=>t.includes(e)),r=!!(o||window.OneTrust&&window.OneTrust.IsAlertBoxClosedAndValid&&window.OneTrust.IsAlertBoxClosedAndValid())?o?1:3:2;window.VWO.init(r)})}function s(){t="",e=OnetrustActiveGroups}function i(){const t=JSON.parse(JSON.stringify(Optanon.GetDomainData().Groups)),o=function(e,t){const o=e?.split(",")?.filter(Boolean)??[],r=t?.split(",")?.filter(Boolean)??[];return o.filter(e=>!r.includes(e))}(e,OnetrustActiveGroups);if(0!==o.length&&0!==t.length)for(const e of t){if(""!==e.CustomGroupId&&o.includes(e.CustomGroupId))for(const t of e.Cookies){const e=a(t.Name);for(const t of e)Cookies.remove(t,{path:"/",domain:"ecovadis.com"}),Cookies.remove(t)}if(0!==e.Hosts.length){const t=e.Hosts;for(const e of t){const t=e.Cookies;if(o.includes(e.HostId)&&0!==t.length)for(const e of t){const t=a(e.Name);for(const e of t)Cookies.remove(e,{path:"/",domain:"ecovadis.com"}),Cookies.remove(e)}}}}s()}function a(e){if(!e)return[];const t=decodeURIComponent(document.cookie).split(";");let o=e;return o=o.trimStart(),o=o.replace(/[xX]+$/gm,""),o?t.filter(e=>e.trimStart().startsWith(o)).map(e=>
2e.trimStart().split("=")?.[0]??"").filter(Boolean):[]}void 0===t&&s(),o(),getPardotUTMTags().setInnerReferrerPage().updateGTMLocalStorage().updateIframes(),r(),n(),i(),OneTrust.OnConsentChanged(function(){o(),getPardotUTMTags().updateGTMLocalStorage().updateIframes(),r(),n(),i();const t=e?.split(",")?.filter(e=>Boolean(e)&&"C0001"!==e);t&&t.length>0&&(console.log("OptanonWrapper - consent changed, reloading page"),window.location.reload())})}function isTargetingAccepted(){if(getCookie("OptanonConsent")){const e=new URLSearchParams(Cookies.get("OptanonConsent"));if(e.get("groups")&&e.get("groups").includes("C0004:1"))return!0}return document.location.href.includes("ecovadis-www.flyhigh.pro")} 3async function updateHubspotGeolocation(o){const e=o[0],n=e?.querySelector('input[name="form_conversion_region"]'),i=o=>{if(!n)throw new Error("no region input");if(!o)throw new Error("no value");n.value=o},t="cn"===document.documentElement.lang?"China":"France";try{let o;const e=Cookies.get("visitor-country");if(e)o=JSON.parse(e);else{const e=await fetch("/wp-json/wp_bootstrap_gulp/v1/get_geodata",{method:"POST",headers:{"Content-Type":"application/json"}});if(!e.ok)throw new Error("Geodata request is not ok.");o=await e.json()}if(!o)throw new Error("geolocation is empty");if(!o.country_name||!o.country_iso_code||"GLOBAL"===o.country_iso_code)return void i(t);i(o.country_name||t)}catch(o){console.log("Error:",o.message)}}function handleHubspotZoomInfo(o){if(window.ZOOMINFO_CHECK)for(const e of o)e.querySelector("[type='submit']").addEventListener("click",function(o){const n=e.id;if(n&&(window.invalid_hs_forms=window.invalid_hs_forms||new Map,window.invalid_hs_forms.has(n))){o.preventDefault();const[,e]=window.invalid_hs_forms.get(n);if(e){e.classList.add("invalid","error");const o=e.closest("div.input");if(o){const e=document.createElement("li");if(e.className="zi-error",e.innerHTML='<label class="hs-error-msg hs-main-font-element">Please provide a valid email.</label>',o.nextElementSibling){const n=o.nextElementSibling;n.querySelector("li.zi-error")||n.append(e)}else{const n=document.createElement("ul");n.className="no-list hs-error-msgs inputs-list",n.setAttribute("role","alert"),n.append(e),o.after(n)}}}}},!1)}function blockHSForm(o,e){if(!window.ZOOMINFO_CHECK)return;const n=o.id;n&&(window.invalid_hs_forms=window.invalid_hs_forms||new Map,window.invalid_hs_forms.has(n)||window.invalid_hs_forms.set(n,[o,e]))}function unblockHSForm(o,e){if(!window.ZOOMINFO_CHECK)return;const n=o.id;n&&(window.invalid_hs_forms=window.invalid_hs_forms||new Map,window.invalid_hs_forms.has(n)&&(window.invalid_hs_forms.delete(n),e&&(e.closest("div.input")?.nextElementSibling?.querySelector("li.zi-error")?.remove(),e.classList.remove("invalid","error"))))}//# sourceMappingURL=startup-scripts.min.js.map
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.