@financial-times/cmp-client 6.1.0 → 6.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +5 -29
- package/dist/index.js +5 -29
- package/dist/scripts/cmp-static.js +2 -2
- package/dist/src/consent-parsers/__fixtures__/gpp.d.ts +0 -2
- package/dist/src/consent-parsers/__fixtures__/gpp.d.ts.map +1 -1
- package/dist/src/consent-parsers/tcfv2/index.d.ts.map +1 -1
- package/dist/src/consent-ready/utils/get-consent-payload.d.ts.map +1 -1
- package/dist/src/lib/constants.d.ts +0 -6
- package/dist/src/lib/constants.d.ts.map +1 -1
- package/package.json +1 -1
- package/typings/types.d.ts +0 -6
package/dist/index.cjs
CHANGED
|
@@ -498,12 +498,6 @@ const iabCustomCategories = {
|
|
|
498
498
|
iabVendors: [],
|
|
499
499
|
customVendors: [],
|
|
500
500
|
specialFeatures: []
|
|
501
|
-
},
|
|
502
|
-
cookies: {
|
|
503
|
-
purposes: [1, 2, 3, 4, 7, 8, 9, 10],
|
|
504
|
-
iabVendors: [],
|
|
505
|
-
customVendors: [],
|
|
506
|
-
specialFeatures: []
|
|
507
501
|
}
|
|
508
502
|
};
|
|
509
503
|
const iabCategoryNames = Object.keys(iabCustomCategories);
|
|
@@ -564,14 +558,6 @@ function getConsentPayload(parsedConsent, updateConsentStore, isUserInitiated, {
|
|
|
564
558
|
fow: formOfWordsId
|
|
565
559
|
}
|
|
566
560
|
};
|
|
567
|
-
if (categoryName === "cookies") {
|
|
568
|
-
payload.cookies.userAccept = {
|
|
569
|
-
status: parsedConsent[categoryName],
|
|
570
|
-
lbi: false,
|
|
571
|
-
source: SOURCEPOINT_CONSENT_SOURCE,
|
|
572
|
-
fow: formOfWordsId
|
|
573
|
-
};
|
|
574
|
-
}
|
|
575
561
|
return payload;
|
|
576
562
|
},
|
|
577
563
|
{}
|
|
@@ -680,27 +666,17 @@ async function parseGPPConsent() {
|
|
|
680
666
|
const parsedConsent = parseSection(sectionData);
|
|
681
667
|
return parsedConsent;
|
|
682
668
|
}
|
|
683
|
-
function checkConsentFor(categoryName, { purpose, vendor, specialFeatureOptins
|
|
669
|
+
function checkConsentFor(categoryName, { purpose, vendor, specialFeatureOptins }) {
|
|
684
670
|
const customCategory = iabCustomCategories[categoryName];
|
|
685
|
-
const consents = (purpose == null ? void 0 : purpose.consents) || {};
|
|
686
|
-
const legits = (purpose == null ? void 0 : purpose.legitimateInterests) || {};
|
|
687
|
-
const vendorConsents = (vendor == null ? void 0 : vendor.consents) || {};
|
|
688
|
-
const vendorLegits = (vendor == null ? void 0 : vendor.legitimateInterests) || {};
|
|
689
671
|
const requiredPurposesConsented = customCategory.purposes.every(
|
|
690
|
-
(requiredPurpose) => consents[requiredPurpose] ||
|
|
672
|
+
(requiredPurpose) => (purpose == null ? void 0 : purpose.consents[requiredPurpose]) || (purpose == null ? void 0 : purpose.legitimateInterests[requiredPurpose])
|
|
691
673
|
);
|
|
692
674
|
const requiredIabVendorsConsented = customCategory.iabVendors.every(
|
|
693
|
-
(requiredVendor) =>
|
|
675
|
+
(requiredVendor) => (vendor == null ? void 0 : vendor.consents[requiredVendor]) || (vendor == null ? void 0 : vendor.legitimateInterests[requiredVendor])
|
|
694
676
|
);
|
|
695
677
|
const requiredSpecialFeaturesConsented = customCategory.specialFeatures.every(
|
|
696
|
-
(requiredFeature) => specialFeatureOptins[requiredFeature] === true
|
|
678
|
+
(requiredFeature) => (specialFeatureOptins == null ? void 0 : specialFeatureOptins[requiredFeature]) === true
|
|
697
679
|
);
|
|
698
|
-
const requireAllUserConsents = customCategory.purposes.every(
|
|
699
|
-
(requiredPurpose) => consents[requiredPurpose] === true
|
|
700
|
-
);
|
|
701
|
-
if (categoryName === "cookies") {
|
|
702
|
-
return requireAllUserConsents && requiredIabVendorsConsented && requiredSpecialFeaturesConsented;
|
|
703
|
-
}
|
|
704
680
|
return requiredPurposesConsented && requiredIabVendorsConsented && requiredSpecialFeaturesConsented;
|
|
705
681
|
}
|
|
706
682
|
async function getTcData() {
|
|
@@ -1026,7 +1002,7 @@ function setupPmTracking(trackingProps, cmpBaseEndpoint) {
|
|
|
1026
1002
|
false
|
|
1027
1003
|
);
|
|
1028
1004
|
}
|
|
1029
|
-
const version = "6.1.
|
|
1005
|
+
const version = "6.1.1";
|
|
1030
1006
|
async function initSourcepointCmp(options) {
|
|
1031
1007
|
const {
|
|
1032
1008
|
useFTSession = true,
|
package/dist/index.js
CHANGED
|
@@ -496,12 +496,6 @@ const iabCustomCategories = {
|
|
|
496
496
|
iabVendors: [],
|
|
497
497
|
customVendors: [],
|
|
498
498
|
specialFeatures: []
|
|
499
|
-
},
|
|
500
|
-
cookies: {
|
|
501
|
-
purposes: [1, 2, 3, 4, 7, 8, 9, 10],
|
|
502
|
-
iabVendors: [],
|
|
503
|
-
customVendors: [],
|
|
504
|
-
specialFeatures: []
|
|
505
499
|
}
|
|
506
500
|
};
|
|
507
501
|
const iabCategoryNames = Object.keys(iabCustomCategories);
|
|
@@ -562,14 +556,6 @@ function getConsentPayload(parsedConsent, updateConsentStore, isUserInitiated, {
|
|
|
562
556
|
fow: formOfWordsId
|
|
563
557
|
}
|
|
564
558
|
};
|
|
565
|
-
if (categoryName === "cookies") {
|
|
566
|
-
payload.cookies.userAccept = {
|
|
567
|
-
status: parsedConsent[categoryName],
|
|
568
|
-
lbi: false,
|
|
569
|
-
source: SOURCEPOINT_CONSENT_SOURCE,
|
|
570
|
-
fow: formOfWordsId
|
|
571
|
-
};
|
|
572
|
-
}
|
|
573
559
|
return payload;
|
|
574
560
|
},
|
|
575
561
|
{}
|
|
@@ -678,27 +664,17 @@ async function parseGPPConsent() {
|
|
|
678
664
|
const parsedConsent = parseSection(sectionData);
|
|
679
665
|
return parsedConsent;
|
|
680
666
|
}
|
|
681
|
-
function checkConsentFor(categoryName, { purpose, vendor, specialFeatureOptins
|
|
667
|
+
function checkConsentFor(categoryName, { purpose, vendor, specialFeatureOptins }) {
|
|
682
668
|
const customCategory = iabCustomCategories[categoryName];
|
|
683
|
-
const consents = (purpose == null ? void 0 : purpose.consents) || {};
|
|
684
|
-
const legits = (purpose == null ? void 0 : purpose.legitimateInterests) || {};
|
|
685
|
-
const vendorConsents = (vendor == null ? void 0 : vendor.consents) || {};
|
|
686
|
-
const vendorLegits = (vendor == null ? void 0 : vendor.legitimateInterests) || {};
|
|
687
669
|
const requiredPurposesConsented = customCategory.purposes.every(
|
|
688
|
-
(requiredPurpose) => consents[requiredPurpose] ||
|
|
670
|
+
(requiredPurpose) => (purpose == null ? void 0 : purpose.consents[requiredPurpose]) || (purpose == null ? void 0 : purpose.legitimateInterests[requiredPurpose])
|
|
689
671
|
);
|
|
690
672
|
const requiredIabVendorsConsented = customCategory.iabVendors.every(
|
|
691
|
-
(requiredVendor) =>
|
|
673
|
+
(requiredVendor) => (vendor == null ? void 0 : vendor.consents[requiredVendor]) || (vendor == null ? void 0 : vendor.legitimateInterests[requiredVendor])
|
|
692
674
|
);
|
|
693
675
|
const requiredSpecialFeaturesConsented = customCategory.specialFeatures.every(
|
|
694
|
-
(requiredFeature) => specialFeatureOptins[requiredFeature] === true
|
|
676
|
+
(requiredFeature) => (specialFeatureOptins == null ? void 0 : specialFeatureOptins[requiredFeature]) === true
|
|
695
677
|
);
|
|
696
|
-
const requireAllUserConsents = customCategory.purposes.every(
|
|
697
|
-
(requiredPurpose) => consents[requiredPurpose] === true
|
|
698
|
-
);
|
|
699
|
-
if (categoryName === "cookies") {
|
|
700
|
-
return requireAllUserConsents && requiredIabVendorsConsented && requiredSpecialFeaturesConsented;
|
|
701
|
-
}
|
|
702
678
|
return requiredPurposesConsented && requiredIabVendorsConsented && requiredSpecialFeaturesConsented;
|
|
703
679
|
}
|
|
704
680
|
async function getTcData() {
|
|
@@ -1024,7 +1000,7 @@ function setupPmTracking(trackingProps, cmpBaseEndpoint) {
|
|
|
1024
1000
|
false
|
|
1025
1001
|
);
|
|
1026
1002
|
}
|
|
1027
|
-
const version = "6.1.
|
|
1003
|
+
const version = "6.1.1";
|
|
1028
1004
|
async function initSourcepointCmp(options) {
|
|
1029
1005
|
const {
|
|
1030
1006
|
useFTSession = true,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){"use strict";const U=(t,{credentials:e="omit"}={})=>fetch(`https://session-next.ft.com${t}`,{credentials:e,useCorsProxy:!0}).then(n=>n.ok?n.json():n.text().then(o=>{throw new Error(`Next session responded with "${o}" (${n.status})`)})).catch(n=>{document.body.dispatchEvent(new CustomEvent("oErrors.log",{bubbles:!0,detail:{error:n,info:{component:"next-session-client"}}}))});let I={};const S=(t,e)=>{if(typeof t=="object"){I=t;return}if(typeof t=="string"&&typeof e=="string"){I[t]=e;return}if(typeof t=="string"&&typeof e>"u")return I[t]||null;if(typeof t>"u"&&typeof e>"u")return I;throw new Error("Invalid arguments")};S.clear=()=>{I={}};const y={},x=()=>{const[,t]=/FTSession_s=([^;]+)/.exec(document.cookie)||[];return t},j=()=>{const t=S("uuid");if(t)return Promise.resolve({uuid:t});const e=x();return e?(y.uuid||(y.uuid=U(`/sessions/s/${e}`).then(({uuid:n}={})=>(delete y.uuid,n&&S("uuid",n),{uuid:n}))),y.uuid):Promise.resolve({uuid:void 0})},O="sourcepoint-cmp",H="FTPINK",G="FTConsent",q="sourcepointCmp/VngD.XycZut.595cp9fWdp5XYP9vlFvk",B=".ft.com",W="https://consent.ft.com",N={permutiveAds:{purposes:[2,4,8,9],iabVendors:[361],customVendors:[],specialFeatures:[]},demographicAds:{purposes:[7,9,10],iabVendors:[],customVendors:[],specialFeatures:[]},behaviouralAds:{purposes:[2,4,8,9],iabVendors:[],customVendors:[],specialFeatures:[]},programmaticAds:{purposes:[2],iabVendors:[],customVendors:[],specialFeatures:[]},personalisedMarketing:{purposes:[2,7,8,9,10],iabVendors:[],customVendors:[],specialFeatures:[]},cookies:{purposes:[1,2,3,4,7,8,9,10],iabVendors:[],customVendors:[],specialFeatures:[]}},v=Object.keys(N),u={joinHref:!0,gdpr:{}},T={...u,accountId:1906,baseEndpoint:"https://consent-manager.ft.com",propertyHref:"https://local.ft.com",_clientOptions:{privacyManagerId:827767,manageCookiesLinkOverride:"ft.com/preferences/manage-cookies",rootDomain:"ft.com",includeUsNat:!0}},b={...u,accountId:1906,baseEndpoint:"https://consent-manager.ft.com",propertyId:31642,_clientOptions:{privacyManagerId:827767,usnatPrivacyManagerId:1143274,ccpaPrivacyManagerId:944882,manageCookiesLinkOverride:"ft.com/preferences/manage-cookies",rootDomain:"ft.com",includeUsNat:!0}},$={...u,accountId:1906,baseEndpoint:"https://consent-manager.pwmnet.com",propertyId:33414,_clientOptions:{rootDomain:"pwmnet.com"}},K={...u,accountId:1906,baseEndpoint:"https://consent-manager.fdiintelligence.com",propertyId:34061,_clientOptions:{rootDomain:"fdiintelligence.com"}},J={...u,accountId:1906,baseEndpoint:"https://consent-manager.thebanker.com",propertyId:34060,_clientOptions:{rootDomain:"thebanker.com"}},X={...u,accountId:1906,baseEndpoint:"https://consent-manager.bankingriskandregulation.com",propertyId:34059,_clientOptions:{rootDomain:"bankingriskandregulation.com"}},Y={...u,accountId:1906,baseEndpoint:"https://consent-manager.sustainableviews.com",propertyId:34058,_clientOptions:{rootDomain:"sustainableviews.com"}},z={...u,accountId:1906,baseEndpoint:"https://consent-manager.ftadviser.com",propertyId:33416,_clientOptions:{rootDomain:"ftadviser.com"}},Z={...u,accountId:1906,baseEndpoint:"https://consent-manager.investorschronicle.co.uk",propertyId:33415,_clientOptions:{rootDomain:"investorschronicle.co.uk"}},Q={...u,accountId:1906,baseEndpoint:"https://cdn.privacy-mgmt.com",propertyId:33947,_clientOptions:{rootDomain:"ignitesasia.com"}},tt={...u,accountId:1906,baseEndpoint:"https://cdn.privacy-mgmt.com",propertyId:33946,_clientOptions:{rootDomain:"igniteseurope.com"}},et={...u,accountId:1906,baseEndpoint:"https://consent-manager.mandatewire.com",propertyId:35490,_clientOptions:{rootDomain:"mandatewire.com"}},nt={...u,accountId:1906,baseEndpoint:"https://consent-manager.ftlocations.com",propertyId:37407,_clientOptions:{rootDomain:"ftlocations.com",cookieDomain:".ftlocations.com",consentProxyHost:"https://consent.ftlocations.com"}},ot={...u,accountId:1906,baseEndpoint:"https://consent-manager.financialadviserserviceawards.com",propertyId:38297,_clientOptions:{rootDomain:"financialadviserserviceawards.com"}},st={...u,accountId:1906,baseEndpoint:"https://consent-manager.celebrationofinvestment.co.uk",propertyId:38296,_clientOptions:{rootDomain:"celebrationofinvestment.co.uk"}},at={...u,accountId:1906,baseEndpoint:"https://consent-manager.globalprivatebankingawards.com",propertyId:38295,_clientOptions:{rootDomain:"globalprivatebankingawards.com"}},it={...u,accountId:1906,baseEndpoint:"https://consent-manager.thenextweb.com",propertyId:37672,_clientOptions:{rootDomain:"thenextweb.com"}},rt={...u,accountId:1906,baseEndpoint:"https://consent-manager.invisso.org",propertyId:38851,_clientOptions:{rootDomain:"invisso.org"}},ct={...u,accountId:1906,baseEndpoint:"https://consent-manager.abseast.com",propertyId:38888,_clientOptions:{rootDomain:"abseast.com"}},pt={...u,accountId:1906,baseEndpoint:"https://consent-manager.absasia.org",propertyId:38887,_clientOptions:{rootDomain:"absasia.org"}},ut={...u,accountId:1906,baseEndpoint:"https://consent-manager.globalcoveredbonds.com",propertyId:38886,_clientOptions:{rootDomain:"globalcoveredbonds.com"}},dt={...u,accountId:1906,baseEndpoint:"https://consent-manager.globalborrowers.com",propertyId:38885,_clientOptions:{rootDomain:"globalborrowers.com"}},lt={...u,accountId:1906,baseEndpoint:"https://consent-manager.globalabs.org",propertyId:38884,_clientOptions:{rootDomain:"globalabs.org"}},ft={...u,accountId:1906,baseEndpoint:"https://consent-manager.creditrisk-transfer.com",propertyId:38883,_clientOptions:{rootDomain:"creditrisk-transfer.com"}},gt={...u,accountId:1906,baseEndpoint:"https://consent-manager.significantrisktransfer.com",propertyId:38882,_clientOptions:{rootDomain:"significantrisktransfer.com"}},mt={...u,accountId:1906,baseEndpoint:"https://consent-manager.theceeforum.com",propertyId:38882,_clientOptions:{rootDomain:"theceeforum.com"}},_t=Object.freeze(Object.defineProperty({__proto__:null,FT_DOTCOM_PROD:b,FT_DOTCOM_TEST:T,INVISSO:rt,INV_ABSASIA:pt,INV_ABSEAST:ct,INV_CEE_FORUM:mt,INV_CREDITRISK_TRANSFER:ft,INV_GLOBAL_ABS:lt,INV_GLOBAL_BORROWERS:dt,INV_GLOBAL_COVERED_BONDS:ut,MM_IGNITES_ASIA:Q,MM_IGNITES_EUROPE:tt,SIGRISK_TRANSFER:gt,SP_BANKING_RR:X,SP_CELEBRATION_OF_INVESTMENT:st,SP_FDI_INTELLIGENCE:K,SP_FTA_SERVICE_AWARDS:ot,SP_FT_ADVISER:z,SP_FT_LOCATIONS:nt,SP_GLOBAL_PRIVATE_BANKING_AWARDS:at,SP_INVESTORS_CHRONICLE:Z,SP_MANDATE_WIRE:et,SP_PWMNET:$,SP_SUSTAINABLE_VIEWS:Y,SP_THE_BANKER:J,TNW:it},Symbol.toStringTag,{value:"Module"}));function A(t,e){const n=document.createElement("script");return n.dataset.cmpScript=t,n.innerHTML=e,n}function It(t){const e=document.createElement("script");return e.src=t,e}const yt={cmpFrames:"https://consent-manager.ft.com/unified/wrapperMessagingWithoutDetection.js"},P={tcfStub:'"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(){var t=function(){var t,e,o=[],n=window,r=n;for(;r;){try{if(r.frames.__tcfapiLocator){t=r;break}}catch(t){}if(r===n.top)break;r=r.parent}t||(!function t(){var e=n.document,o=!!n.frames.__tcfapiLocator;if(!o)if(e.body){var r=e.createElement("iframe");r.style.cssText="display:none",r.name="__tcfapiLocator",r.title = "__tcfapiLocator",e.body.appendChild(r)}else setTimeout(t,5);return!o}(),n.__tcfapi=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return o;"setGdprApplies"===n[0]?n.length>3&&2===parseInt(n[1],10)&&"boolean"==typeof n[3]&&(e=n[3],"function"==typeof n[2]&&n[2]("set",!0)):"ping"===n[0]?"function"==typeof n[2]&&n[2]({gdprApplies:e,cmpLoaded:!1,cmpStatus:"stub"}):o.push(n)},n.addEventListener("message",(function(t){var e="string"==typeof t.data,o={};if(e)try{o=JSON.parse(t.data)}catch(t){}else o=t.data;var n="object"===_typeof(o)&&null!==o?o.__tcfapiCall:null;n&&window.__tcfapi(n.command,n.version,(function(o,r){var a={__tcfapiReturn:{returnValue:o,success:r,callId:n.callId}};t&&t.source&&t.source.postMessage&&t.source.postMessage(e?JSON.stringify(a):a,"*")}),n.parameter)}),!1))};"undefined"!=typeof module?module.exports=t:t()}();',gppStub:`window.__gpp_addFrame=function(e){if(!window.frames[e])if(document.body){var t=document.createElement("iframe");t.style.cssText="display:none",t.name=e,document.body.appendChild(t)}else window.setTimeout(window.__gpp_addFrame,10,e)},window.__gpp_stub=function(){var e=arguments;if(__gpp.queue=__gpp.queue||[],__gpp.events=__gpp.events||[],!e.length||1==e.length&&"queue"==e[0])return __gpp.queue;if(1==e.length&&"events"==e[0])return __gpp.events;var t=e[0],p=e.length>1?e[1]:null,s=e.length>2?e[2]:null;if("ping"===t)p({gppVersion:"1.1",cmpStatus:"stub",cmpDisplayStatus:"hidden",signalStatus:"not ready",supportedAPIs:["2:tcfeuv2","5:tcfcav1","6:uspv1","7:usnat","8:uscav1","9:usvav1","10:uscov1","11:usutv1","12:usctv1"],cmpId:0,sectionList:[],applicableSections:[],gppString:"",parsedSections:{}},!0);else if("addEventListener"===t){"lastId"in __gpp||(__gpp.lastId=0),__gpp.lastId++;var n=__gpp.lastId;__gpp.events.push({id:n,callback:p,parameter:s}),p({eventName:"listenerRegistered",listenerId:n,data:!0,pingData:{gppVersion:"1.1",cmpStatus:"stub",cmpDisplayStatus:"hidden",signalStatus:"not ready",supportedAPIs:["2:tcfeuv2","5:tcfcav1","6:uspv1","7:usnat","8:uscav1","9:usvav1","10:uscov1","11:usutv1","12:usctv1"],cmpId:0,sectionList:[],applicableSections:[],gppString:"",parsedSections:{}}},!0)}else if("removeEventListener"===t){for(var a=!1,i=0;i<__gpp.events.length;i++)if(__gpp.events[i].id==s){__gpp.events.splice(i,1),a=!0;break}p({eventName:"listenerRemoved",listenerId:s,data:a,pingData:{gppVersion:"1.1",cmpStatus:"stub",cmpDisplayStatus:"hidden",signalStatus:"not ready",supportedAPIs:["2:tcfeuv2","5:tcfcav1","6:uspv1","7:usnat","8:uscav1","9:usvav1","10:uscov1","11:usutv1","12:usctv1"],cmpId:0,sectionList:[],applicableSections:[],gppString:"",parsedSections:{}}},!0)}else"hasSection"===t?p(!1,!0):"getSection"===t||"getField"===t?p(null,!0):__gpp.queue.push([].slice.apply(e))},window.__gpp_msghandler=function(e){var t="string"==typeof e.data;try{var p=t?JSON.parse(e.data):e.data}catch(e){p=null}if("object"==typeof p&&null!==p&&"__gppCall"in p){var s=p.__gppCall;window.__gpp(s.command,(function(p,n){var a={__gppReturn:{returnValue:p,success:n,callId:s.callId}};e.source.postMessage(t?JSON.stringify(a):a,"*")}),"parameter"in s?s.parameter:null,"version"in s?s.version:"1.1")}},"__gpp"in window&&"function"==typeof window.__gpp||(window.__gpp=window.__gpp_stub,window.addEventListener("message",window.__gpp_msghandler,!1),window.__gpp_addFrame("__gppLocator"));
|
|
2
|
-
`};function vt(t){const e=document.createDocumentFragment();return e.appendChild(A("tcf",P.tcfStub)),t.includeUsNat&&e.appendChild(A("gpp",P.gppStub)),e.appendChild(It(yt.cmpFrames)),e}function bt(t,e){const{userId:n,includeUsNat:o}=e;return n&&(t.authId=n),o&&(t.usnat=t.usnat||{}),t}function wt(t,e){const{_clientOptions:n,...o}=t,s=bt(o,e);window._sp_={config:s},window._sp_queue??(window._sp_queue=[]),document.head.appendChild(vt(e))}function St(t,e,n,{formOfWordsId:o,cookieDomain:s}){const i=Object.keys(t).reduce((c,r)=>(c[r]={onsite:{status:t[r],lbi:!1,source:O,fow:o}},r==="cookies"&&(c.cookies.userAccept={status:t[r],lbi:!1,source:O,fow:o}),c),{});return e?{setConsentCookie:!0,formOfWordsId:o,consentSource:O,cookieDomain:s,skipDuplicateUpdates:!n,data:i}:{data:i,cookieDomain:s}}const _={CALIFORNIA:"uscav1",US_NATIONAL:"usnat"},D={[_.CALIFORNIA]:{excludedCategories:{personalisedMarketing:!0}},[_.US_NATIONAL]:{excludedCategories:{personalisedMarketing:!0}}};function Ot(t){const{applicableSections:e,supportedAPIs:n}=t,o=e[0];if(o===-1||typeof o>"u")return;const s=n.find(i=>i.startsWith(`${o}:`));return s==null?void 0:s.split(":")[1]}function ht(t){const{SaleOptOut:e,SharingOptOut:n,Gpc:o}=t,{excludedCategories:s}=D[_.CALIFORNIA],a=e!==1&&n!==1&&!o,i={};for(const c of v){if(c in s){i[c]=!0;continue}i[c]=a}return i}function Ct(t){const{SaleOptOut:e,SharingOptOut:n,TargetedAdvertisingOptOut:o}=t,{excludedCategories:s}=D[_.US_NATIONAL],a=JSON.parse(localStorage.getItem("ft_sp_marketing_optout")||"{}"),i=e!==1&&n!==1&&o!==1,c={};for(const r of v){if(r in s){c[r]=!0;continue}c[r]=i}if(a.usnat)for(const r of v)c[r]=!1;return c}const Et={[_.CALIFORNIA]:ht,[_.US_NATIONAL]:Ct};async function L(){return new Promise((t,e)=>{try{window.__gpp?window.__gpp("ping",t):e(new Error("GPP API is not available on page"))}catch(n){e(n)}})}async function kt(){const t=await L(),{parsedSections:e}=t,n=Ot(t);if(!n||!e[n])throw new Error("GPP parser was called without an applicable section");const o=e[n],s=Et[n];if(!s||typeof s!="function")throw new Error(`No parser found for applicable GPP section: ${n}`);return s(o)}function Nt(t,{purpose:e,vendor:n,specialFeatureOptins:o={}}){const s=N[t],a=(e==null?void 0:e.consents)||{},i=(e==null?void 0:e.legitimateInterests)||{},c=(n==null?void 0:n.consents)||{},r=(n==null?void 0:n.legitimateInterests)||{},p=s.purposes.every(l=>a[l]||i[l]),f=s.iabVendors.every(l=>c[l]||r[l]),d=s.specialFeatures.every(l=>o[l]===!0),m=s.purposes.every(l=>a[l]===!0);return t==="cookies"?m&&f&&d:p&&f&&d}async function M(){return new Promise((t,e)=>{try{window.__tcfapi?window.__tcfapi("addEventListener",2,t):e(new Error("TCF API is not available on page"))}catch(n){e(n)}})}async function Tt(){const t=await M(),e={};for(const n of v)e[n]=Nt(n,t);return e}async function At(t){const n={gdpr:Tt,usnat:kt}[t];if(!n)throw new Error("Unable to update user consent. Unsupported consent legislation.");return n()}function Pt(){const e=Object.fromEntries(document.cookie.split("; ").map(o=>o.split("=")))[G];if(!e)return{};const n=decodeURIComponent(e);return Object.fromEntries(n.split(",").map(o=>{const[s,a]=o.split(":");return[s,a==="on"]}))}function Dt(t,e){return Object.keys(t).some(o=>{const s=`${o.toLowerCase()}Onsite`;return t[o]!==e[s]})}function Lt({userId:t,useConsentStore:e}){return!!t&&e===!0}function Mt(t,e){return t?`${e.consentProxyHost}/__consent/consent-record/${H}/${e.userId}?updateFtConsentCookie=true`:`${e.consentProxyHost}/__consent/consent-record-cookie?cookieDomain=${e.cookieDomain}`}const R={gdpr:!1,usnat:!1},h=Object.assign({},R);function F(t){h[t]=!0}function Rt(t){return h[t]}function Ft(){Object.assign(h,R)}async function Vt(t){return Rt(t)?t==="gdpr"?(await M()).eventStatus==="useractioncomplete":t==="usnat"?(await L()).cmpDisplayStatus==="hidden":!1:!1}function Ut(){window.__tcfapi&&window.__tcfapi("addEventListener",2,t=>{t.eventStatus==="cmpuishown"&&F("gdpr")}),window.__gpp&&window.__gpp("addEventListener",({pingData:t})=>{t.cmpDisplayStatus==="visible"&&F("usnat")})}async function xt(t,e){try{const n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),credentials:"include"});n.ok||console.error("Unable to save consent preferences",n.status)}catch(n){console.error("An error occurred while saving consent",n)}}const jt=()=>{document.dispatchEvent(new CustomEvent("onCmpConsentReady",{bubbles:!0}))};function Ht(t){return async function(n,o,s,a){if(jt(),t.disableFTCookies||!t.includeUsNat&&n==="usnat")return;const i=a.applies?n:"gdpr";if(i!==n||!s)return;let c;try{c=await At(i)}catch(l){console.error(l)}if(!c||!Dt(c,Pt()))return;const p=await Vt(i),f=Lt(t),d=Mt(f,t),m=St(c,f,p,t);await xt(d,m),p&&Ft(),document.dispatchEvent(new CustomEvent("oCookieMessage.act",{bubbles:!0}))}}const C="cookie-message",Gt="manage-cookies";let E=Object.freeze({activeComponent:C,messageId:0,privacyManagerId:0});function qt(t){return typeof t=="object"&&t!==null&&t.constructor===Object&&Object.prototype.toString.call(t)==="[object Object]"}const Bt=()=>({...E}),k=t=>{if(!qt(t)){console.error("Invalid state changes");return}E={...E,...t}},Wt=["adsDisableInternalCMP","pwm.cmp","messageSlotBottom"];function $t(t,e){const n=Kt(t.flags);window._sp_queue=window._sp_queue??[],window._sp_queue.push(()=>{var o,s;for(const[a,i]of Object.entries(Xt))(s=(o=window._sp_).addEventListener)==null||s.call(o,a,i({...t,flags:n}))}),Yt({...t,flags:n},e)}function Kt(t){const e={};return typeof t=="object"&&Wt.forEach(n=>{Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}),e}function Jt(t){if(!t)return;const e=document.body,n=new CustomEvent("oTracking.event",{bubbles:!0,cancelable:!0,detail:t.detail});e.dispatchEvent(n)}function w({trackingProps:t,action:e,triggerAction:n}){let o;const s=Bt(),{product:a,app:i,flags:c}=t;s.activeComponent===C?o=s.messageId:o=s.privacyManagerId;const r={detail:{component:{id:o,name:s.activeComponent,type:"overlay",subtype:"cmp"},category:"component",action:e,...n&&{trigger_action:n},...a&&{product:a},...i&&{app:i},custom:[{cookie_toggle_flag:c}],url:window.document.location.href||null}};Jt(r)}const Xt={onMessageChoiceSelect:t=>(e,n,o)=>{const a={11:"accept_all",12:"manage_cookies",13:"reject_all"}[o];a&&w({trackingProps:t,action:"click",triggerAction:a})},onMessageReady:t=>()=>{w({trackingProps:t,action:"view"})},onMessageReceiveData:()=>(t,e)=>{const{messageId:n}=e;n&&k({messageId:n})},onError:t=>(e,n)=>{w({trackingProps:t,action:"error",triggerAction:n})},onPMCancel:()=>()=>{k({activeComponent:C})}};function Yt(t,e){window.addEventListener("message",function(n){if(n.origin!==e)return;const o={1:"save_and_close",11:"accept_all",13:"reject_all"},{data:{fromPM:s,actionType:a,messageId:i="0"}={}}=n;s&&(+i&&k({activeComponent:Gt,privacyManagerId:+i}),!(!a||!o[a])&&w({trackingProps:t,action:"click",triggerAction:o[a]}))},!1)}const zt="6.1.0";async function Zt(t){const{useFTSession:e=!0,consentProxyHost:n=W,cookieDomain:o=B,formOfWordsId:s=q,useConsentStore:a=!0,trackingContext:i={},disableFTCookies:c=!1,includeUsNat:r=!1}=t||{};let{propertyConfig:p=b,userId:f}=t||{};if(typeof window>"u"){console.error("The CMP client can only be initialised in a browser context");return}if(window.FT_CMP_CLIENT_VERSION=zt,!f&&e)try{const d=await j();f=d==null?void 0:d.uuid}catch(d){console.error(d)}p=Qt(p),wt(p,{userId:f,includeUsNat:r}),Ut(),window._sp_queue.push(()=>{var d,m;(m=(d=window._sp_)==null?void 0:d.addEventListener)==null||m.call(d,"onConsentReady",Ht({userId:f,consentProxyHost:n,cookieDomain:o,formOfWordsId:s,useConsentStore:a,disableFTCookies:c,includeUsNat:r}))}),$t(i,p.baseEndpoint)}function Qt(t){if(!(t!=null&&t.accountId))throw new Error("Please pass a valid property config");return t.events&&(console.warn("[cmp-client] Passing an events map in the config is not supported and will be ignored. Please use window._sp_.addEventListener() to listen for events"),delete t.events),t}function V(t,e,n,o,s,a){const{text:i,onClick:c}=o[e],r=document.querySelectorAll(`a[href*="${a}"]`);for(const p of r)(n||t)&&(s.has(p)&&p.removeEventListener("click",s.get(p)),p.innerText=i,p.addEventListener("click",c),s.set(p,c))}function te({_clientOptions:t}=b){const{privacyManagerId:e,ccpaPrivacyManagerId:n,usnatPrivacyManagerId:o,manageCookiesLinkOverride:s}=t??b._clientOptions,a={usnat:{text:"Do Not Sell My Personal Information",onClick:r=>{var p;r.preventDefault(),(p=window._sp_.usnat)==null||p.loadPrivacyManagerModal(o)}},ccpa:{text:"Do Not Sell My Personal Information",onClick:r=>{var p;r.preventDefault(),(p=window._sp_.ccpa)==null||p.loadPrivacyManagerModal(n)}},gdpr:{text:"Manage Cookies",onClick:r=>{var p;r.preventDefault(),(p=window._sp_.gdpr)==null||p.loadPrivacyManagerModal(e)}}},i=new Map,c=function(r,p,f,d){V(!1,r,d.applies,a,i,s),d.applies&&window._sp_queue.push(()=>{var m,l;(l=(m=window._sp_).removeEventListener)==null||l.call(m,"onConsentReady",c)})};V(!0,"gdpr",!1,a,i,s),window._sp_queue??(window._sp_queue=[]),window._sp_queue.push(()=>{var r,p;(p=(r=window._sp_).addEventListener)==null||p.call(r,"onConsentReady",c)})}function ee(t){return t._clientOptions??{}}const ne={"ft.com":ee};function oe(t){return new Promise((e,n)=>{const{rootDomain:o}=t._clientOptions||{};if(!o)return e({});const s=ne[o];if(!s||typeof s!="function")return e({...t._clientOptions});const a=()=>{try{e(s(t))}catch(i){n(i)}};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",a):a()})}function se(t,e){if(!e||Number.isFinite(parseFloat(e))||!t.endsWith(e))return!1;const n=t.indexOf(e),o=t[n-1];return o==="."||o===void 0}function ae(t){if(!t)throw new Error("Invalid hostname provided");let n=Object.values(_t).find(o=>{var a;if(o.propertyHref)return!1;const s=(a=o._clientOptions)==null?void 0:a.rootDomain;return s&&se(t,s)});return n??(n=T),n}const ie=new URL(window.location.href).hostname,g=ae(ie);(async()=>{var t,e;try{const n=await oe(g);Zt({propertyConfig:g,...n}),(t=g==null?void 0:g._clientOptions)!=null&&t.privacyManagerId&&((e=g==null?void 0:g._clientOptions)!=null&&e.manageCookiesLinkOverride)&&te(g)}catch(n){console.error("Error: CMP package configure + initialise Sourcepoint failed.",n)}})()})();
|
|
1
|
+
(function(){"use strict";const U=(t,{credentials:e="omit"}={})=>fetch(`https://session-next.ft.com${t}`,{credentials:e,useCorsProxy:!0}).then(n=>n.ok?n.json():n.text().then(o=>{throw new Error(`Next session responded with "${o}" (${n.status})`)})).catch(n=>{document.body.dispatchEvent(new CustomEvent("oErrors.log",{bubbles:!0,detail:{error:n,info:{component:"next-session-client"}}}))});let _={};const S=(t,e)=>{if(typeof t=="object"){_=t;return}if(typeof t=="string"&&typeof e=="string"){_[t]=e;return}if(typeof t=="string"&&typeof e>"u")return _[t]||null;if(typeof t>"u"&&typeof e>"u")return _;throw new Error("Invalid arguments")};S.clear=()=>{_={}};const I={},x=()=>{const[,t]=/FTSession_s=([^;]+)/.exec(document.cookie)||[];return t},j=()=>{const t=S("uuid");if(t)return Promise.resolve({uuid:t});const e=x();return e?(I.uuid||(I.uuid=U(`/sessions/s/${e}`).then(({uuid:n}={})=>(delete I.uuid,n&&S("uuid",n),{uuid:n}))),I.uuid):Promise.resolve({uuid:void 0})},N="sourcepoint-cmp",H="FTPINK",G="FTConsent",q="sourcepointCmp/VngD.XycZut.595cp9fWdp5XYP9vlFvk",W=".ft.com",B="https://consent.ft.com",T={permutiveAds:{purposes:[2,4,8,9],iabVendors:[361],customVendors:[],specialFeatures:[]},demographicAds:{purposes:[7,9,10],iabVendors:[],customVendors:[],specialFeatures:[]},behaviouralAds:{purposes:[2,4,8,9],iabVendors:[],customVendors:[],specialFeatures:[]},programmaticAds:{purposes:[2],iabVendors:[],customVendors:[],specialFeatures:[]},personalisedMarketing:{purposes:[2,7,8,9,10],iabVendors:[],customVendors:[],specialFeatures:[]}},y=Object.keys(T),u={joinHref:!0,gdpr:{}},k={...u,accountId:1906,baseEndpoint:"https://consent-manager.ft.com",propertyHref:"https://local.ft.com",_clientOptions:{privacyManagerId:827767,manageCookiesLinkOverride:"ft.com/preferences/manage-cookies",rootDomain:"ft.com",includeUsNat:!0}},v={...u,accountId:1906,baseEndpoint:"https://consent-manager.ft.com",propertyId:31642,_clientOptions:{privacyManagerId:827767,usnatPrivacyManagerId:1143274,ccpaPrivacyManagerId:944882,manageCookiesLinkOverride:"ft.com/preferences/manage-cookies",rootDomain:"ft.com",includeUsNat:!0}},$={...u,accountId:1906,baseEndpoint:"https://consent-manager.pwmnet.com",propertyId:33414,_clientOptions:{rootDomain:"pwmnet.com"}},K={...u,accountId:1906,baseEndpoint:"https://consent-manager.fdiintelligence.com",propertyId:34061,_clientOptions:{rootDomain:"fdiintelligence.com"}},J={...u,accountId:1906,baseEndpoint:"https://consent-manager.thebanker.com",propertyId:34060,_clientOptions:{rootDomain:"thebanker.com"}},X={...u,accountId:1906,baseEndpoint:"https://consent-manager.bankingriskandregulation.com",propertyId:34059,_clientOptions:{rootDomain:"bankingriskandregulation.com"}},Y={...u,accountId:1906,baseEndpoint:"https://consent-manager.sustainableviews.com",propertyId:34058,_clientOptions:{rootDomain:"sustainableviews.com"}},z={...u,accountId:1906,baseEndpoint:"https://consent-manager.ftadviser.com",propertyId:33416,_clientOptions:{rootDomain:"ftadviser.com"}},Z={...u,accountId:1906,baseEndpoint:"https://consent-manager.investorschronicle.co.uk",propertyId:33415,_clientOptions:{rootDomain:"investorschronicle.co.uk"}},Q={...u,accountId:1906,baseEndpoint:"https://cdn.privacy-mgmt.com",propertyId:33947,_clientOptions:{rootDomain:"ignitesasia.com"}},tt={...u,accountId:1906,baseEndpoint:"https://cdn.privacy-mgmt.com",propertyId:33946,_clientOptions:{rootDomain:"igniteseurope.com"}},et={...u,accountId:1906,baseEndpoint:"https://consent-manager.mandatewire.com",propertyId:35490,_clientOptions:{rootDomain:"mandatewire.com"}},nt={...u,accountId:1906,baseEndpoint:"https://consent-manager.ftlocations.com",propertyId:37407,_clientOptions:{rootDomain:"ftlocations.com",cookieDomain:".ftlocations.com",consentProxyHost:"https://consent.ftlocations.com"}},ot={...u,accountId:1906,baseEndpoint:"https://consent-manager.financialadviserserviceawards.com",propertyId:38297,_clientOptions:{rootDomain:"financialadviserserviceawards.com"}},st={...u,accountId:1906,baseEndpoint:"https://consent-manager.celebrationofinvestment.co.uk",propertyId:38296,_clientOptions:{rootDomain:"celebrationofinvestment.co.uk"}},at={...u,accountId:1906,baseEndpoint:"https://consent-manager.globalprivatebankingawards.com",propertyId:38295,_clientOptions:{rootDomain:"globalprivatebankingawards.com"}},it={...u,accountId:1906,baseEndpoint:"https://consent-manager.thenextweb.com",propertyId:37672,_clientOptions:{rootDomain:"thenextweb.com"}},rt={...u,accountId:1906,baseEndpoint:"https://consent-manager.invisso.org",propertyId:38851,_clientOptions:{rootDomain:"invisso.org"}},ct={...u,accountId:1906,baseEndpoint:"https://consent-manager.abseast.com",propertyId:38888,_clientOptions:{rootDomain:"abseast.com"}},pt={...u,accountId:1906,baseEndpoint:"https://consent-manager.absasia.org",propertyId:38887,_clientOptions:{rootDomain:"absasia.org"}},ut={...u,accountId:1906,baseEndpoint:"https://consent-manager.globalcoveredbonds.com",propertyId:38886,_clientOptions:{rootDomain:"globalcoveredbonds.com"}},dt={...u,accountId:1906,baseEndpoint:"https://consent-manager.globalborrowers.com",propertyId:38885,_clientOptions:{rootDomain:"globalborrowers.com"}},lt={...u,accountId:1906,baseEndpoint:"https://consent-manager.globalabs.org",propertyId:38884,_clientOptions:{rootDomain:"globalabs.org"}},ft={...u,accountId:1906,baseEndpoint:"https://consent-manager.creditrisk-transfer.com",propertyId:38883,_clientOptions:{rootDomain:"creditrisk-transfer.com"}},gt={...u,accountId:1906,baseEndpoint:"https://consent-manager.significantrisktransfer.com",propertyId:38882,_clientOptions:{rootDomain:"significantrisktransfer.com"}},mt={...u,accountId:1906,baseEndpoint:"https://consent-manager.theceeforum.com",propertyId:38882,_clientOptions:{rootDomain:"theceeforum.com"}},_t=Object.freeze(Object.defineProperty({__proto__:null,FT_DOTCOM_PROD:v,FT_DOTCOM_TEST:k,INVISSO:rt,INV_ABSASIA:pt,INV_ABSEAST:ct,INV_CEE_FORUM:mt,INV_CREDITRISK_TRANSFER:ft,INV_GLOBAL_ABS:lt,INV_GLOBAL_BORROWERS:dt,INV_GLOBAL_COVERED_BONDS:ut,MM_IGNITES_ASIA:Q,MM_IGNITES_EUROPE:tt,SIGRISK_TRANSFER:gt,SP_BANKING_RR:X,SP_CELEBRATION_OF_INVESTMENT:st,SP_FDI_INTELLIGENCE:K,SP_FTA_SERVICE_AWARDS:ot,SP_FT_ADVISER:z,SP_FT_LOCATIONS:nt,SP_GLOBAL_PRIVATE_BANKING_AWARDS:at,SP_INVESTORS_CHRONICLE:Z,SP_MANDATE_WIRE:et,SP_PWMNET:$,SP_SUSTAINABLE_VIEWS:Y,SP_THE_BANKER:J,TNW:it},Symbol.toStringTag,{value:"Module"}));function A(t,e){const n=document.createElement("script");return n.dataset.cmpScript=t,n.innerHTML=e,n}function It(t){const e=document.createElement("script");return e.src=t,e}const yt={cmpFrames:"https://consent-manager.ft.com/unified/wrapperMessagingWithoutDetection.js"},P={tcfStub:'"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(){var t=function(){var t,e,o=[],n=window,r=n;for(;r;){try{if(r.frames.__tcfapiLocator){t=r;break}}catch(t){}if(r===n.top)break;r=r.parent}t||(!function t(){var e=n.document,o=!!n.frames.__tcfapiLocator;if(!o)if(e.body){var r=e.createElement("iframe");r.style.cssText="display:none",r.name="__tcfapiLocator",r.title = "__tcfapiLocator",e.body.appendChild(r)}else setTimeout(t,5);return!o}(),n.__tcfapi=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return o;"setGdprApplies"===n[0]?n.length>3&&2===parseInt(n[1],10)&&"boolean"==typeof n[3]&&(e=n[3],"function"==typeof n[2]&&n[2]("set",!0)):"ping"===n[0]?"function"==typeof n[2]&&n[2]({gdprApplies:e,cmpLoaded:!1,cmpStatus:"stub"}):o.push(n)},n.addEventListener("message",(function(t){var e="string"==typeof t.data,o={};if(e)try{o=JSON.parse(t.data)}catch(t){}else o=t.data;var n="object"===_typeof(o)&&null!==o?o.__tcfapiCall:null;n&&window.__tcfapi(n.command,n.version,(function(o,r){var a={__tcfapiReturn:{returnValue:o,success:r,callId:n.callId}};t&&t.source&&t.source.postMessage&&t.source.postMessage(e?JSON.stringify(a):a,"*")}),n.parameter)}),!1))};"undefined"!=typeof module?module.exports=t:t()}();',gppStub:`window.__gpp_addFrame=function(e){if(!window.frames[e])if(document.body){var t=document.createElement("iframe");t.style.cssText="display:none",t.name=e,document.body.appendChild(t)}else window.setTimeout(window.__gpp_addFrame,10,e)},window.__gpp_stub=function(){var e=arguments;if(__gpp.queue=__gpp.queue||[],__gpp.events=__gpp.events||[],!e.length||1==e.length&&"queue"==e[0])return __gpp.queue;if(1==e.length&&"events"==e[0])return __gpp.events;var t=e[0],p=e.length>1?e[1]:null,s=e.length>2?e[2]:null;if("ping"===t)p({gppVersion:"1.1",cmpStatus:"stub",cmpDisplayStatus:"hidden",signalStatus:"not ready",supportedAPIs:["2:tcfeuv2","5:tcfcav1","6:uspv1","7:usnat","8:uscav1","9:usvav1","10:uscov1","11:usutv1","12:usctv1"],cmpId:0,sectionList:[],applicableSections:[],gppString:"",parsedSections:{}},!0);else if("addEventListener"===t){"lastId"in __gpp||(__gpp.lastId=0),__gpp.lastId++;var n=__gpp.lastId;__gpp.events.push({id:n,callback:p,parameter:s}),p({eventName:"listenerRegistered",listenerId:n,data:!0,pingData:{gppVersion:"1.1",cmpStatus:"stub",cmpDisplayStatus:"hidden",signalStatus:"not ready",supportedAPIs:["2:tcfeuv2","5:tcfcav1","6:uspv1","7:usnat","8:uscav1","9:usvav1","10:uscov1","11:usutv1","12:usctv1"],cmpId:0,sectionList:[],applicableSections:[],gppString:"",parsedSections:{}}},!0)}else if("removeEventListener"===t){for(var a=!1,i=0;i<__gpp.events.length;i++)if(__gpp.events[i].id==s){__gpp.events.splice(i,1),a=!0;break}p({eventName:"listenerRemoved",listenerId:s,data:a,pingData:{gppVersion:"1.1",cmpStatus:"stub",cmpDisplayStatus:"hidden",signalStatus:"not ready",supportedAPIs:["2:tcfeuv2","5:tcfcav1","6:uspv1","7:usnat","8:uscav1","9:usvav1","10:uscov1","11:usutv1","12:usctv1"],cmpId:0,sectionList:[],applicableSections:[],gppString:"",parsedSections:{}}},!0)}else"hasSection"===t?p(!1,!0):"getSection"===t||"getField"===t?p(null,!0):__gpp.queue.push([].slice.apply(e))},window.__gpp_msghandler=function(e){var t="string"==typeof e.data;try{var p=t?JSON.parse(e.data):e.data}catch(e){p=null}if("object"==typeof p&&null!==p&&"__gppCall"in p){var s=p.__gppCall;window.__gpp(s.command,(function(p,n){var a={__gppReturn:{returnValue:p,success:n,callId:s.callId}};e.source.postMessage(t?JSON.stringify(a):a,"*")}),"parameter"in s?s.parameter:null,"version"in s?s.version:"1.1")}},"__gpp"in window&&"function"==typeof window.__gpp||(window.__gpp=window.__gpp_stub,window.addEventListener("message",window.__gpp_msghandler,!1),window.__gpp_addFrame("__gppLocator"));
|
|
2
|
+
`};function vt(t){const e=document.createDocumentFragment();return e.appendChild(A("tcf",P.tcfStub)),t.includeUsNat&&e.appendChild(A("gpp",P.gppStub)),e.appendChild(It(yt.cmpFrames)),e}function bt(t,e){const{userId:n,includeUsNat:o}=e;return n&&(t.authId=n),o&&(t.usnat=t.usnat||{}),t}function wt(t,e){const{_clientOptions:n,...o}=t,s=bt(o,e);window._sp_={config:s},window._sp_queue??(window._sp_queue=[]),document.head.appendChild(vt(e))}function St(t,e,n,{formOfWordsId:o,cookieDomain:s}){const r=Object.keys(t).reduce((c,i)=>(c[i]={onsite:{status:t[i],lbi:!1,source:N,fow:o}},c),{});return e?{setConsentCookie:!0,formOfWordsId:o,consentSource:N,cookieDomain:s,skipDuplicateUpdates:!n,data:r}:{data:r,cookieDomain:s}}const m={CALIFORNIA:"uscav1",US_NATIONAL:"usnat"},D={[m.CALIFORNIA]:{excludedCategories:{personalisedMarketing:!0}},[m.US_NATIONAL]:{excludedCategories:{personalisedMarketing:!0}}};function ht(t){const{applicableSections:e,supportedAPIs:n}=t,o=e[0];if(o===-1||typeof o>"u")return;const s=n.find(r=>r.startsWith(`${o}:`));return s==null?void 0:s.split(":")[1]}function Ot(t){const{SaleOptOut:e,SharingOptOut:n,Gpc:o}=t,{excludedCategories:s}=D[m.CALIFORNIA],a=e!==1&&n!==1&&!o,r={};for(const c of y){if(c in s){r[c]=!0;continue}r[c]=a}return r}function Ct(t){const{SaleOptOut:e,SharingOptOut:n,TargetedAdvertisingOptOut:o}=t,{excludedCategories:s}=D[m.US_NATIONAL],a=JSON.parse(localStorage.getItem("ft_sp_marketing_optout")||"{}"),r=e!==1&&n!==1&&o!==1,c={};for(const i of y){if(i in s){c[i]=!0;continue}c[i]=r}if(a.usnat)for(const i of y)c[i]=!1;return c}const Et={[m.CALIFORNIA]:Ot,[m.US_NATIONAL]:Ct};async function L(){return new Promise((t,e)=>{try{window.__gpp?window.__gpp("ping",t):e(new Error("GPP API is not available on page"))}catch(n){e(n)}})}async function Nt(){const t=await L(),{parsedSections:e}=t,n=ht(t);if(!n||!e[n])throw new Error("GPP parser was called without an applicable section");const o=e[n],s=Et[n];if(!s||typeof s!="function")throw new Error(`No parser found for applicable GPP section: ${n}`);return s(o)}function Tt(t,{purpose:e,vendor:n,specialFeatureOptins:o}){const s=T[t],a=s.purposes.every(i=>(e==null?void 0:e.consents[i])||(e==null?void 0:e.legitimateInterests[i])),r=s.iabVendors.every(i=>(n==null?void 0:n.consents[i])||(n==null?void 0:n.legitimateInterests[i])),c=s.specialFeatures.every(i=>(o==null?void 0:o[i])===!0);return a&&r&&c}async function M(){return new Promise((t,e)=>{try{window.__tcfapi?window.__tcfapi("addEventListener",2,t):e(new Error("TCF API is not available on page"))}catch(n){e(n)}})}async function kt(){const t=await M(),e={};for(const n of y)e[n]=Tt(n,t);return e}async function At(t){const n={gdpr:kt,usnat:Nt}[t];if(!n)throw new Error("Unable to update user consent. Unsupported consent legislation.");return n()}function Pt(){const e=Object.fromEntries(document.cookie.split("; ").map(o=>o.split("=")))[G];if(!e)return{};const n=decodeURIComponent(e);return Object.fromEntries(n.split(",").map(o=>{const[s,a]=o.split(":");return[s,a==="on"]}))}function Dt(t,e){return Object.keys(t).some(o=>{const s=`${o.toLowerCase()}Onsite`;return t[o]!==e[s]})}function Lt({userId:t,useConsentStore:e}){return!!t&&e===!0}function Mt(t,e){return t?`${e.consentProxyHost}/__consent/consent-record/${H}/${e.userId}?updateFtConsentCookie=true`:`${e.consentProxyHost}/__consent/consent-record-cookie?cookieDomain=${e.cookieDomain}`}const R={gdpr:!1,usnat:!1},h=Object.assign({},R);function F(t){h[t]=!0}function Rt(t){return h[t]}function Ft(){Object.assign(h,R)}async function Vt(t){return Rt(t)?t==="gdpr"?(await M()).eventStatus==="useractioncomplete":t==="usnat"?(await L()).cmpDisplayStatus==="hidden":!1:!1}function Ut(){window.__tcfapi&&window.__tcfapi("addEventListener",2,t=>{t.eventStatus==="cmpuishown"&&F("gdpr")}),window.__gpp&&window.__gpp("addEventListener",({pingData:t})=>{t.cmpDisplayStatus==="visible"&&F("usnat")})}async function xt(t,e){try{const n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),credentials:"include"});n.ok||console.error("Unable to save consent preferences",n.status)}catch(n){console.error("An error occurred while saving consent",n)}}const jt=()=>{document.dispatchEvent(new CustomEvent("onCmpConsentReady",{bubbles:!0}))};function Ht(t){return async function(n,o,s,a){if(jt(),t.disableFTCookies||!t.includeUsNat&&n==="usnat")return;const r=a.applies?n:"gdpr";if(r!==n||!s)return;let c;try{c=await At(r)}catch(w){console.error(w)}if(!c||!Dt(c,Pt()))return;const p=await Vt(r),f=Lt(t),d=Mt(f,t),g=St(c,f,p,t);await xt(d,g),p&&Ft(),document.dispatchEvent(new CustomEvent("oCookieMessage.act",{bubbles:!0}))}}const O="cookie-message",Gt="manage-cookies";let C=Object.freeze({activeComponent:O,messageId:0,privacyManagerId:0});function qt(t){return typeof t=="object"&&t!==null&&t.constructor===Object&&Object.prototype.toString.call(t)==="[object Object]"}const Wt=()=>({...C}),E=t=>{if(!qt(t)){console.error("Invalid state changes");return}C={...C,...t}},Bt=["adsDisableInternalCMP","pwm.cmp","messageSlotBottom"];function $t(t,e){const n=Kt(t.flags);window._sp_queue=window._sp_queue??[],window._sp_queue.push(()=>{var o,s;for(const[a,r]of Object.entries(Xt))(s=(o=window._sp_).addEventListener)==null||s.call(o,a,r({...t,flags:n}))}),Yt({...t,flags:n},e)}function Kt(t){const e={};return typeof t=="object"&&Bt.forEach(n=>{Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}),e}function Jt(t){if(!t)return;const e=document.body,n=new CustomEvent("oTracking.event",{bubbles:!0,cancelable:!0,detail:t.detail});e.dispatchEvent(n)}function b({trackingProps:t,action:e,triggerAction:n}){let o;const s=Wt(),{product:a,app:r,flags:c}=t;s.activeComponent===O?o=s.messageId:o=s.privacyManagerId;const i={detail:{component:{id:o,name:s.activeComponent,type:"overlay",subtype:"cmp"},category:"component",action:e,...n&&{trigger_action:n},...a&&{product:a},...r&&{app:r},custom:[{cookie_toggle_flag:c}],url:window.document.location.href||null}};Jt(i)}const Xt={onMessageChoiceSelect:t=>(e,n,o)=>{const a={11:"accept_all",12:"manage_cookies",13:"reject_all"}[o];a&&b({trackingProps:t,action:"click",triggerAction:a})},onMessageReady:t=>()=>{b({trackingProps:t,action:"view"})},onMessageReceiveData:()=>(t,e)=>{const{messageId:n}=e;n&&E({messageId:n})},onError:t=>(e,n)=>{b({trackingProps:t,action:"error",triggerAction:n})},onPMCancel:()=>()=>{E({activeComponent:O})}};function Yt(t,e){window.addEventListener("message",function(n){if(n.origin!==e)return;const o={1:"save_and_close",11:"accept_all",13:"reject_all"},{data:{fromPM:s,actionType:a,messageId:r="0"}={}}=n;s&&(+r&&E({activeComponent:Gt,privacyManagerId:+r}),!(!a||!o[a])&&b({trackingProps:t,action:"click",triggerAction:o[a]}))},!1)}const zt="6.1.1";async function Zt(t){const{useFTSession:e=!0,consentProxyHost:n=B,cookieDomain:o=W,formOfWordsId:s=q,useConsentStore:a=!0,trackingContext:r={},disableFTCookies:c=!1,includeUsNat:i=!1}=t||{};let{propertyConfig:p=v,userId:f}=t||{};if(typeof window>"u"){console.error("The CMP client can only be initialised in a browser context");return}if(window.FT_CMP_CLIENT_VERSION=zt,!f&&e)try{const d=await j();f=d==null?void 0:d.uuid}catch(d){console.error(d)}p=Qt(p),wt(p,{userId:f,includeUsNat:i}),Ut(),window._sp_queue.push(()=>{var d,g;(g=(d=window._sp_)==null?void 0:d.addEventListener)==null||g.call(d,"onConsentReady",Ht({userId:f,consentProxyHost:n,cookieDomain:o,formOfWordsId:s,useConsentStore:a,disableFTCookies:c,includeUsNat:i}))}),$t(r,p.baseEndpoint)}function Qt(t){if(!(t!=null&&t.accountId))throw new Error("Please pass a valid property config");return t.events&&(console.warn("[cmp-client] Passing an events map in the config is not supported and will be ignored. Please use window._sp_.addEventListener() to listen for events"),delete t.events),t}function V(t,e,n,o,s,a){const{text:r,onClick:c}=o[e],i=document.querySelectorAll(`a[href*="${a}"]`);for(const p of i)(n||t)&&(s.has(p)&&p.removeEventListener("click",s.get(p)),p.innerText=r,p.addEventListener("click",c),s.set(p,c))}function te({_clientOptions:t}=v){const{privacyManagerId:e,ccpaPrivacyManagerId:n,usnatPrivacyManagerId:o,manageCookiesLinkOverride:s}=t??v._clientOptions,a={usnat:{text:"Do Not Sell My Personal Information",onClick:i=>{var p;i.preventDefault(),(p=window._sp_.usnat)==null||p.loadPrivacyManagerModal(o)}},ccpa:{text:"Do Not Sell My Personal Information",onClick:i=>{var p;i.preventDefault(),(p=window._sp_.ccpa)==null||p.loadPrivacyManagerModal(n)}},gdpr:{text:"Manage Cookies",onClick:i=>{var p;i.preventDefault(),(p=window._sp_.gdpr)==null||p.loadPrivacyManagerModal(e)}}},r=new Map,c=function(i,p,f,d){V(!1,i,d.applies,a,r,s),d.applies&&window._sp_queue.push(()=>{var g,w;(w=(g=window._sp_).removeEventListener)==null||w.call(g,"onConsentReady",c)})};V(!0,"gdpr",!1,a,r,s),window._sp_queue??(window._sp_queue=[]),window._sp_queue.push(()=>{var i,p;(p=(i=window._sp_).addEventListener)==null||p.call(i,"onConsentReady",c)})}function ee(t){return t._clientOptions??{}}const ne={"ft.com":ee};function oe(t){return new Promise((e,n)=>{const{rootDomain:o}=t._clientOptions||{};if(!o)return e({});const s=ne[o];if(!s||typeof s!="function")return e({...t._clientOptions});const a=()=>{try{e(s(t))}catch(r){n(r)}};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",a):a()})}function se(t,e){if(!e||Number.isFinite(parseFloat(e))||!t.endsWith(e))return!1;const n=t.indexOf(e),o=t[n-1];return o==="."||o===void 0}function ae(t){if(!t)throw new Error("Invalid hostname provided");let n=Object.values(_t).find(o=>{var a;if(o.propertyHref)return!1;const s=(a=o._clientOptions)==null?void 0:a.rootDomain;return s&&se(t,s)});return n??(n=k),n}const ie=new URL(window.location.href).hostname,l=ae(ie);(async()=>{var t,e;try{const n=await oe(l);Zt({propertyConfig:l,...n}),(t=l==null?void 0:l._clientOptions)!=null&&t.privacyManagerId&&((e=l==null?void 0:l._clientOptions)!=null&&e.manageCookiesLinkOverride)&&te(l)}catch(n){console.error("Error: CMP package configure + initialise Sourcepoint failed.",n)}})()})();
|
|
@@ -9,7 +9,6 @@ export declare const OPT_IN_CONSENT: {
|
|
|
9
9
|
behaviouralAds: boolean;
|
|
10
10
|
programmaticAds: boolean;
|
|
11
11
|
personalisedMarketing: boolean;
|
|
12
|
-
cookies: boolean;
|
|
13
12
|
};
|
|
14
13
|
export declare const OPT_OUT_CONSENT: {
|
|
15
14
|
permutiveAds: boolean;
|
|
@@ -17,6 +16,5 @@ export declare const OPT_OUT_CONSENT: {
|
|
|
17
16
|
behaviouralAds: boolean;
|
|
18
17
|
programmaticAds: boolean;
|
|
19
18
|
personalisedMarketing: boolean;
|
|
20
|
-
cookies: boolean;
|
|
21
19
|
};
|
|
22
20
|
//# sourceMappingURL=gpp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gpp.d.ts","sourceRoot":"","sources":["../../../../src/consent-parsers/__fixtures__/gpp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAkD/D,wBAAgB,eAAe,CAAC,gBAAgB,EAAE,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,QAkB1E;AAED,wBAAgB,6BAA6B,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,QAetF;AAED,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,QAe5E;AAED,wBAAgB,mBAAmB,SAIlC;AACD,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"gpp.d.ts","sourceRoot":"","sources":["../../../../src/consent-parsers/__fixtures__/gpp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAkD/D,wBAAgB,eAAe,CAAC,gBAAgB,EAAE,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,QAkB1E;AAED,wBAAgB,6BAA6B,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,QAetF;AAED,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,QAe5E;AAED,wBAAgB,mBAAmB,SAIlC;AACD,eAAO,MAAM,cAAc;;;;;;CAM1B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;CAM3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/consent-parsers/tcfv2/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAGhG;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,qBAAqB,EACnC,EAAE,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/consent-parsers/tcfv2/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAGhG;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,qBAAqB,EACnC,EAAE,OAAO,EAAE,MAAM,EAAE,oBAAoB,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,GACzD,OAAO,CAmBT;AAED,wBAAsB,SAAS,oBAc9B;AAED,wBAAsB,gBAAgB,gCASrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-consent-payload.d.ts","sourceRoot":"","sources":["../../../../src/consent-ready/utils/get-consent-payload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EAEvB,MAAM,wBAAwB,CAAC;AAIhC;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,kBAAkB,EACjC,kBAAkB,EAAE,OAAO,EAC3B,eAAe,EAAE,OAAO,EACxB,EAAE,aAAa,EAAE,YAAY,EAAE,EAAE,OAAO,CAAC,qBAAqB,CAAC;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get-consent-payload.d.ts","sourceRoot":"","sources":["../../../../src/consent-ready/utils/get-consent-payload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EAEvB,MAAM,wBAAwB,CAAC;AAIhC;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,kBAAkB,EACjC,kBAAkB,EAAE,OAAO,EAC3B,eAAe,EAAE,OAAO,EACxB,EAAE,aAAa,EAAE,YAAY,EAAE,EAAE,OAAO,CAAC,qBAAqB,CAAC;;;;;;;;;;;;;;EA8BhE"}
|
|
@@ -36,12 +36,6 @@ export declare const iabCustomCategories: {
|
|
|
36
36
|
readonly customVendors: readonly [];
|
|
37
37
|
readonly specialFeatures: readonly [];
|
|
38
38
|
};
|
|
39
|
-
readonly cookies: {
|
|
40
|
-
readonly purposes: readonly [1, 2, 3, 4, 7, 8, 9, 10];
|
|
41
|
-
readonly iabVendors: readonly [];
|
|
42
|
-
readonly customVendors: readonly [];
|
|
43
|
-
readonly specialFeatures: readonly [];
|
|
44
|
-
};
|
|
45
39
|
};
|
|
46
40
|
export declare const iabCategoryNames: IabCustomCategoryName[];
|
|
47
41
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/lib/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEtE,eAAO,MAAM,0BAA0B,oBAAoB,CAAC;AAC5D,eAAO,MAAM,qBAAqB,WAAW,CAAC;AAC9C,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAE/C,eAAO,MAAM,kBAAkB,oDAAoD,CAAC;AACpF,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,eAAO,MAAM,qBAAqB,2BAA2B,CAAC;AAE9D,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/lib/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEtE,eAAO,MAAM,0BAA0B,oBAAoB,CAAC;AAC5D,eAAO,MAAM,qBAAqB,WAAW,CAAC;AAC9C,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAE/C,eAAO,MAAM,kBAAkB,oDAAoD,CAAC;AACpF,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,eAAO,MAAM,qBAAqB,2BAA2B,CAAC;AAE9D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BtB,CAAC;AAEX,eAAO,MAAM,gBAAgB,EAAuC,qBAAqB,EAAE,CAAC"}
|
package/package.json
CHANGED
package/typings/types.d.ts
CHANGED