@financial-times/cmp-client 5.5.3 → 5.7.0
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/README.md +8 -0
- package/dist/index.cjs +74 -7
- package/dist/index.js +74 -7
- package/dist/scripts/cmp-static.js +2 -2
- package/dist/src/client.d.ts.map +1 -1
- package/dist/src/consent-parsers/gpp/index.d.ts +2 -1
- package/dist/src/consent-parsers/gpp/index.d.ts.map +1 -1
- package/dist/src/consent-parsers/tcfv2/index.d.ts +1 -0
- package/dist/src/consent-parsers/tcfv2/index.d.ts.map +1 -1
- package/dist/src/consent-ready/index.d.ts.map +1 -1
- package/dist/src/consent-ready/utils/get-consent-payload.d.ts +3 -1
- package/dist/src/consent-ready/utils/get-consent-payload.d.ts.map +1 -1
- package/dist/src/consent-validate/cmp-user-state.d.ts +5 -0
- package/dist/src/consent-validate/cmp-user-state.d.ts.map +1 -0
- package/dist/src/consent-validate/index.d.ts +4 -0
- package/dist/src/consent-validate/index.d.ts.map +1 -0
- package/dist/src/lib/configurators/index.d.ts +2 -2
- package/dist/src/lib/configurators/index.d.ts.map +1 -1
- package/dist/src/lib/properties.d.ts +11 -0
- package/dist/src/lib/properties.d.ts.map +1 -1
- package/dist/src/utils/url.d.ts +10 -0
- package/dist/src/utils/url.d.ts.map +1 -1
- package/package.json +1 -1
- package/typings/globals.d.ts +4 -1
- package/typings/types.d.ts +1 -2
package/README.md
CHANGED
|
@@ -211,6 +211,14 @@ if (flagsClient.get("adsDisableInternalCMP")) {
|
|
|
211
211
|
<td><code>MM_IGNITES_EUROPE</code></td>
|
|
212
212
|
<td>Configuration preset for properties on igniteseurope.com domain</td>
|
|
213
213
|
</tr>
|
|
214
|
+
<tr>
|
|
215
|
+
<td><code>SP_MANDATE_WIRE</code></td>
|
|
216
|
+
<td>Configuration preset for properties on mandatewire.com domain</td>
|
|
217
|
+
</tr>
|
|
218
|
+
<tr>
|
|
219
|
+
<td><code>SP_FT_LOCATIONS</code></td>
|
|
220
|
+
<td>Configuration preset for properties on ftlocations.com domain</td>
|
|
221
|
+
</tr>
|
|
214
222
|
</tbody>
|
|
215
223
|
<table/>
|
|
216
224
|
|
package/dist/index.cjs
CHANGED
|
@@ -162,6 +162,16 @@ const SP_MANDATE_WIRE = {
|
|
|
162
162
|
rootDomain: "mandatewire.com"
|
|
163
163
|
}
|
|
164
164
|
};
|
|
165
|
+
const SP_FT_LOCATIONS = {
|
|
166
|
+
...defaults,
|
|
167
|
+
accountId: 1906,
|
|
168
|
+
baseEndpoint: "https://consent-manager.ftlocations.com",
|
|
169
|
+
propertyId: 37407,
|
|
170
|
+
_clientOptions: {
|
|
171
|
+
rootDomain: "ftlocations.com",
|
|
172
|
+
cookieDomain: ".ftlocations.com"
|
|
173
|
+
}
|
|
174
|
+
};
|
|
165
175
|
const properties = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
166
176
|
__proto__: null,
|
|
167
177
|
FT_DOTCOM_PROD,
|
|
@@ -171,6 +181,7 @@ const properties = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
171
181
|
SP_BANKING_RR,
|
|
172
182
|
SP_FDI_INTELLIGENCE,
|
|
173
183
|
SP_FT_ADVISER,
|
|
184
|
+
SP_FT_LOCATIONS,
|
|
174
185
|
SP_INVESTORS_CHRONICLE,
|
|
175
186
|
SP_MANDATE_WIRE,
|
|
176
187
|
SP_PWMNET,
|
|
@@ -402,7 +413,7 @@ function bootstrapCmp(config, options) {
|
|
|
402
413
|
window._sp_queue ?? (window._sp_queue = []);
|
|
403
414
|
document.head.appendChild(getCmpScripts(options));
|
|
404
415
|
}
|
|
405
|
-
function getConsentPayload(parsedConsent, updateConsentStore, { formOfWordsId, cookieDomain }) {
|
|
416
|
+
function getConsentPayload(parsedConsent, updateConsentStore, isUserInitiated, { formOfWordsId, cookieDomain }) {
|
|
406
417
|
const categoryNames = Object.keys(parsedConsent);
|
|
407
418
|
const data = categoryNames.reduce(
|
|
408
419
|
(payload, categoryName) => {
|
|
@@ -424,6 +435,7 @@ function getConsentPayload(parsedConsent, updateConsentStore, { formOfWordsId, c
|
|
|
424
435
|
formOfWordsId,
|
|
425
436
|
consentSource: SOURCEPOINT_CONSENT_SOURCE,
|
|
426
437
|
cookieDomain,
|
|
438
|
+
skipDuplicateUpdates: !isUserInitiated,
|
|
427
439
|
data
|
|
428
440
|
};
|
|
429
441
|
}
|
|
@@ -493,8 +505,8 @@ const sectionParsers = {
|
|
|
493
505
|
[sections.CALIFORNIA]: parseCaliforniaSection,
|
|
494
506
|
[sections.US_NATIONAL]: parseUsNationalSection
|
|
495
507
|
};
|
|
496
|
-
async function
|
|
497
|
-
|
|
508
|
+
async function getGPPData() {
|
|
509
|
+
return new Promise((resolve, reject) => {
|
|
498
510
|
try {
|
|
499
511
|
if (window.__gpp) {
|
|
500
512
|
window.__gpp("ping", resolve);
|
|
@@ -505,6 +517,9 @@ async function parseGPPConsent() {
|
|
|
505
517
|
reject(error);
|
|
506
518
|
}
|
|
507
519
|
});
|
|
520
|
+
}
|
|
521
|
+
async function parseGPPConsent() {
|
|
522
|
+
const gppData = await getGPPData();
|
|
508
523
|
const { parsedSections } = gppData;
|
|
509
524
|
const applicableSection = getApplicableSection(gppData);
|
|
510
525
|
if (!applicableSection || !parsedSections[applicableSection]) {
|
|
@@ -531,8 +546,8 @@ function checkConsentFor(categoryName, { purpose, vendor, specialFeatureOptins }
|
|
|
531
546
|
);
|
|
532
547
|
return requiredPurposesConsented && requiredIabVendorsConsented && requiredSpecialFeaturesConsented;
|
|
533
548
|
}
|
|
534
|
-
async function
|
|
535
|
-
|
|
549
|
+
async function getTcData() {
|
|
550
|
+
return new Promise((resolve, reject) => {
|
|
536
551
|
try {
|
|
537
552
|
if (window.__tcfapi) {
|
|
538
553
|
window.__tcfapi("addEventListener", 2, resolve);
|
|
@@ -543,6 +558,9 @@ async function parseGDPRConsent() {
|
|
|
543
558
|
reject(error);
|
|
544
559
|
}
|
|
545
560
|
});
|
|
561
|
+
}
|
|
562
|
+
async function parseGDPRConsent() {
|
|
563
|
+
const tcData = await getTcData();
|
|
546
564
|
const parsedConsent = {};
|
|
547
565
|
for (const categoryName of iabCategoryNames) {
|
|
548
566
|
parsedConsent[categoryName] = checkConsentFor(categoryName, tcData);
|
|
@@ -592,6 +610,50 @@ function getConsentEndpoint(updateConsentStore, props) {
|
|
|
592
610
|
}
|
|
593
611
|
return `${props.consentProxyHost}/__consent/consent-record-cookie?cookieDomain=${props.cookieDomain}`;
|
|
594
612
|
}
|
|
613
|
+
const INITIAL_STATE$1 = {
|
|
614
|
+
gdpr: false,
|
|
615
|
+
usnat: false
|
|
616
|
+
};
|
|
617
|
+
const isWaitingForUserAction = Object.assign({}, INITIAL_STATE$1);
|
|
618
|
+
function setWaitingForUser(legislation) {
|
|
619
|
+
isWaitingForUserAction[legislation] = true;
|
|
620
|
+
}
|
|
621
|
+
function isWaitingForUser(legislation) {
|
|
622
|
+
return isWaitingForUserAction[legislation];
|
|
623
|
+
}
|
|
624
|
+
function completeWaitingForUser() {
|
|
625
|
+
Object.assign(isWaitingForUserAction, INITIAL_STATE$1);
|
|
626
|
+
}
|
|
627
|
+
async function isUserInitiatedUpdate(activeLegislation) {
|
|
628
|
+
if (!isWaitingForUser(activeLegislation)) {
|
|
629
|
+
return false;
|
|
630
|
+
}
|
|
631
|
+
if (activeLegislation === "gdpr") {
|
|
632
|
+
const tcData = await getTcData();
|
|
633
|
+
return tcData.eventStatus === "useractioncomplete";
|
|
634
|
+
}
|
|
635
|
+
if (activeLegislation === "usnat") {
|
|
636
|
+
const gppData = await getGPPData();
|
|
637
|
+
return gppData.cmpDisplayStatus === "hidden";
|
|
638
|
+
}
|
|
639
|
+
return false;
|
|
640
|
+
}
|
|
641
|
+
function initConsentSyncValidation() {
|
|
642
|
+
if (window.__tcfapi) {
|
|
643
|
+
window.__tcfapi("addEventListener", 2, (data) => {
|
|
644
|
+
if (data.eventStatus === "cmpuishown") {
|
|
645
|
+
setWaitingForUser("gdpr");
|
|
646
|
+
}
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
if (window.__gpp) {
|
|
650
|
+
window.__gpp("addEventListener", ({ pingData }) => {
|
|
651
|
+
if (pingData.cmpDisplayStatus === "visible") {
|
|
652
|
+
setWaitingForUser("usnat");
|
|
653
|
+
}
|
|
654
|
+
});
|
|
655
|
+
}
|
|
656
|
+
}
|
|
595
657
|
async function saveConsent(consentEndpoint, payload) {
|
|
596
658
|
try {
|
|
597
659
|
const response = await fetch(consentEndpoint, {
|
|
@@ -638,10 +700,14 @@ function consentReadyHandlerFn(props) {
|
|
|
638
700
|
if (!consentHasChanged) {
|
|
639
701
|
return;
|
|
640
702
|
}
|
|
703
|
+
const isUserInitiated = await isUserInitiatedUpdate(activeLegislation);
|
|
641
704
|
const updateConsentStore = shouldUpdateConsentStore(props);
|
|
642
705
|
const consentEndpoint = getConsentEndpoint(updateConsentStore, props);
|
|
643
|
-
const payload = getConsentPayload(parsedConsent, updateConsentStore, props);
|
|
706
|
+
const payload = getConsentPayload(parsedConsent, updateConsentStore, isUserInitiated, props);
|
|
644
707
|
await saveConsent(consentEndpoint, payload);
|
|
708
|
+
if (isUserInitiated) {
|
|
709
|
+
completeWaitingForUser();
|
|
710
|
+
}
|
|
645
711
|
document.dispatchEvent(new CustomEvent("oCookieMessage.act", { bubbles: true }));
|
|
646
712
|
};
|
|
647
713
|
}
|
|
@@ -808,7 +874,7 @@ function setupPmTracking(trackingProps, cmpBaseEndpoint) {
|
|
|
808
874
|
false
|
|
809
875
|
);
|
|
810
876
|
}
|
|
811
|
-
const version = "5.
|
|
877
|
+
const version = "5.7.0";
|
|
812
878
|
async function initSourcepointCmp(options) {
|
|
813
879
|
const {
|
|
814
880
|
useFTSession = true,
|
|
@@ -836,6 +902,7 @@ async function initSourcepointCmp(options) {
|
|
|
836
902
|
}
|
|
837
903
|
propertyConfig = validateAndCleanConfig(propertyConfig);
|
|
838
904
|
bootstrapCmp(propertyConfig, { userId, includeUsNat });
|
|
905
|
+
initConsentSyncValidation();
|
|
839
906
|
window._sp_queue.push(() => {
|
|
840
907
|
var _a, _b;
|
|
841
908
|
(_b = (_a = window._sp_) == null ? void 0 : _a.addEventListener) == null ? void 0 : _b.call(
|
package/dist/index.js
CHANGED
|
@@ -160,6 +160,16 @@ const SP_MANDATE_WIRE = {
|
|
|
160
160
|
rootDomain: "mandatewire.com"
|
|
161
161
|
}
|
|
162
162
|
};
|
|
163
|
+
const SP_FT_LOCATIONS = {
|
|
164
|
+
...defaults,
|
|
165
|
+
accountId: 1906,
|
|
166
|
+
baseEndpoint: "https://consent-manager.ftlocations.com",
|
|
167
|
+
propertyId: 37407,
|
|
168
|
+
_clientOptions: {
|
|
169
|
+
rootDomain: "ftlocations.com",
|
|
170
|
+
cookieDomain: ".ftlocations.com"
|
|
171
|
+
}
|
|
172
|
+
};
|
|
163
173
|
const properties = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
164
174
|
__proto__: null,
|
|
165
175
|
FT_DOTCOM_PROD,
|
|
@@ -169,6 +179,7 @@ const properties = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
|
|
|
169
179
|
SP_BANKING_RR,
|
|
170
180
|
SP_FDI_INTELLIGENCE,
|
|
171
181
|
SP_FT_ADVISER,
|
|
182
|
+
SP_FT_LOCATIONS,
|
|
172
183
|
SP_INVESTORS_CHRONICLE,
|
|
173
184
|
SP_MANDATE_WIRE,
|
|
174
185
|
SP_PWMNET,
|
|
@@ -400,7 +411,7 @@ function bootstrapCmp(config, options) {
|
|
|
400
411
|
window._sp_queue ?? (window._sp_queue = []);
|
|
401
412
|
document.head.appendChild(getCmpScripts(options));
|
|
402
413
|
}
|
|
403
|
-
function getConsentPayload(parsedConsent, updateConsentStore, { formOfWordsId, cookieDomain }) {
|
|
414
|
+
function getConsentPayload(parsedConsent, updateConsentStore, isUserInitiated, { formOfWordsId, cookieDomain }) {
|
|
404
415
|
const categoryNames = Object.keys(parsedConsent);
|
|
405
416
|
const data = categoryNames.reduce(
|
|
406
417
|
(payload, categoryName) => {
|
|
@@ -422,6 +433,7 @@ function getConsentPayload(parsedConsent, updateConsentStore, { formOfWordsId, c
|
|
|
422
433
|
formOfWordsId,
|
|
423
434
|
consentSource: SOURCEPOINT_CONSENT_SOURCE,
|
|
424
435
|
cookieDomain,
|
|
436
|
+
skipDuplicateUpdates: !isUserInitiated,
|
|
425
437
|
data
|
|
426
438
|
};
|
|
427
439
|
}
|
|
@@ -491,8 +503,8 @@ const sectionParsers = {
|
|
|
491
503
|
[sections.CALIFORNIA]: parseCaliforniaSection,
|
|
492
504
|
[sections.US_NATIONAL]: parseUsNationalSection
|
|
493
505
|
};
|
|
494
|
-
async function
|
|
495
|
-
|
|
506
|
+
async function getGPPData() {
|
|
507
|
+
return new Promise((resolve, reject) => {
|
|
496
508
|
try {
|
|
497
509
|
if (window.__gpp) {
|
|
498
510
|
window.__gpp("ping", resolve);
|
|
@@ -503,6 +515,9 @@ async function parseGPPConsent() {
|
|
|
503
515
|
reject(error);
|
|
504
516
|
}
|
|
505
517
|
});
|
|
518
|
+
}
|
|
519
|
+
async function parseGPPConsent() {
|
|
520
|
+
const gppData = await getGPPData();
|
|
506
521
|
const { parsedSections } = gppData;
|
|
507
522
|
const applicableSection = getApplicableSection(gppData);
|
|
508
523
|
if (!applicableSection || !parsedSections[applicableSection]) {
|
|
@@ -529,8 +544,8 @@ function checkConsentFor(categoryName, { purpose, vendor, specialFeatureOptins }
|
|
|
529
544
|
);
|
|
530
545
|
return requiredPurposesConsented && requiredIabVendorsConsented && requiredSpecialFeaturesConsented;
|
|
531
546
|
}
|
|
532
|
-
async function
|
|
533
|
-
|
|
547
|
+
async function getTcData() {
|
|
548
|
+
return new Promise((resolve, reject) => {
|
|
534
549
|
try {
|
|
535
550
|
if (window.__tcfapi) {
|
|
536
551
|
window.__tcfapi("addEventListener", 2, resolve);
|
|
@@ -541,6 +556,9 @@ async function parseGDPRConsent() {
|
|
|
541
556
|
reject(error);
|
|
542
557
|
}
|
|
543
558
|
});
|
|
559
|
+
}
|
|
560
|
+
async function parseGDPRConsent() {
|
|
561
|
+
const tcData = await getTcData();
|
|
544
562
|
const parsedConsent = {};
|
|
545
563
|
for (const categoryName of iabCategoryNames) {
|
|
546
564
|
parsedConsent[categoryName] = checkConsentFor(categoryName, tcData);
|
|
@@ -590,6 +608,50 @@ function getConsentEndpoint(updateConsentStore, props) {
|
|
|
590
608
|
}
|
|
591
609
|
return `${props.consentProxyHost}/__consent/consent-record-cookie?cookieDomain=${props.cookieDomain}`;
|
|
592
610
|
}
|
|
611
|
+
const INITIAL_STATE$1 = {
|
|
612
|
+
gdpr: false,
|
|
613
|
+
usnat: false
|
|
614
|
+
};
|
|
615
|
+
const isWaitingForUserAction = Object.assign({}, INITIAL_STATE$1);
|
|
616
|
+
function setWaitingForUser(legislation) {
|
|
617
|
+
isWaitingForUserAction[legislation] = true;
|
|
618
|
+
}
|
|
619
|
+
function isWaitingForUser(legislation) {
|
|
620
|
+
return isWaitingForUserAction[legislation];
|
|
621
|
+
}
|
|
622
|
+
function completeWaitingForUser() {
|
|
623
|
+
Object.assign(isWaitingForUserAction, INITIAL_STATE$1);
|
|
624
|
+
}
|
|
625
|
+
async function isUserInitiatedUpdate(activeLegislation) {
|
|
626
|
+
if (!isWaitingForUser(activeLegislation)) {
|
|
627
|
+
return false;
|
|
628
|
+
}
|
|
629
|
+
if (activeLegislation === "gdpr") {
|
|
630
|
+
const tcData = await getTcData();
|
|
631
|
+
return tcData.eventStatus === "useractioncomplete";
|
|
632
|
+
}
|
|
633
|
+
if (activeLegislation === "usnat") {
|
|
634
|
+
const gppData = await getGPPData();
|
|
635
|
+
return gppData.cmpDisplayStatus === "hidden";
|
|
636
|
+
}
|
|
637
|
+
return false;
|
|
638
|
+
}
|
|
639
|
+
function initConsentSyncValidation() {
|
|
640
|
+
if (window.__tcfapi) {
|
|
641
|
+
window.__tcfapi("addEventListener", 2, (data) => {
|
|
642
|
+
if (data.eventStatus === "cmpuishown") {
|
|
643
|
+
setWaitingForUser("gdpr");
|
|
644
|
+
}
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
if (window.__gpp) {
|
|
648
|
+
window.__gpp("addEventListener", ({ pingData }) => {
|
|
649
|
+
if (pingData.cmpDisplayStatus === "visible") {
|
|
650
|
+
setWaitingForUser("usnat");
|
|
651
|
+
}
|
|
652
|
+
});
|
|
653
|
+
}
|
|
654
|
+
}
|
|
593
655
|
async function saveConsent(consentEndpoint, payload) {
|
|
594
656
|
try {
|
|
595
657
|
const response = await fetch(consentEndpoint, {
|
|
@@ -636,10 +698,14 @@ function consentReadyHandlerFn(props) {
|
|
|
636
698
|
if (!consentHasChanged) {
|
|
637
699
|
return;
|
|
638
700
|
}
|
|
701
|
+
const isUserInitiated = await isUserInitiatedUpdate(activeLegislation);
|
|
639
702
|
const updateConsentStore = shouldUpdateConsentStore(props);
|
|
640
703
|
const consentEndpoint = getConsentEndpoint(updateConsentStore, props);
|
|
641
|
-
const payload = getConsentPayload(parsedConsent, updateConsentStore, props);
|
|
704
|
+
const payload = getConsentPayload(parsedConsent, updateConsentStore, isUserInitiated, props);
|
|
642
705
|
await saveConsent(consentEndpoint, payload);
|
|
706
|
+
if (isUserInitiated) {
|
|
707
|
+
completeWaitingForUser();
|
|
708
|
+
}
|
|
643
709
|
document.dispatchEvent(new CustomEvent("oCookieMessage.act", { bubbles: true }));
|
|
644
710
|
};
|
|
645
711
|
}
|
|
@@ -806,7 +872,7 @@ function setupPmTracking(trackingProps, cmpBaseEndpoint) {
|
|
|
806
872
|
false
|
|
807
873
|
);
|
|
808
874
|
}
|
|
809
|
-
const version = "5.
|
|
875
|
+
const version = "5.7.0";
|
|
810
876
|
async function initSourcepointCmp(options) {
|
|
811
877
|
const {
|
|
812
878
|
useFTSession = true,
|
|
@@ -834,6 +900,7 @@ async function initSourcepointCmp(options) {
|
|
|
834
900
|
}
|
|
835
901
|
propertyConfig = validateAndCleanConfig(propertyConfig);
|
|
836
902
|
bootstrapCmp(propertyConfig, { userId, includeUsNat });
|
|
903
|
+
initConsentSyncValidation();
|
|
837
904
|
window._sp_queue.push(() => {
|
|
838
905
|
var _a, _b;
|
|
839
906
|
(_b = (_a = window._sp_) == null ? void 0 : _a.addEventListener) == null ? void 0 : _b.call(
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){"use strict";const
|
|
2
|
-
`};function ee(e){const n=document.createDocumentFragment();return n.appendChild(N("tcf",P.tcfStub)),e.includeUsNat&&n.appendChild(N("gpp",P.gppStub)),n.appendChild(Z(Q.cmpFrames)),n}function te(e,n){const{userId:t,includeUsNat:o}=n;return t&&(e.authId=t),o&&(e.usnat=e.usnat||{}),e}function ne(e,n){const{_clientOptions:t,...o}=e,s=te(o,n);window._sp_={config:s},window._sp_queue??(window._sp_queue=[]),document.head.appendChild(ee(n))}function oe(e,n,{formOfWordsId:t,cookieDomain:o}){const r=Object.keys(e).reduce((a,c)=>(a[c]={onsite:{status:e[c],lbi:!1,source:O,fow:t}},a),{});return n?{setConsentCookie:!0,formOfWordsId:t,consentSource:O,cookieDomain:o,data:r}:{data:r,cookieDomain:o}}const m={CALIFORNIA:"uscav1",US_NATIONAL:"usnatv1"},T={[m.CALIFORNIA]:{excludedCategories:{personalisedMarketing:!0}},[m.US_NATIONAL]:{excludedCategories:{personalisedMarketing:!0}}};function se(e){const{applicableSections:n,supportedAPIs:t}=e,o=n[0];if(o===-1||typeof o>"u")return;const s=t.find(a=>a.startsWith(`${o}:`));return s==null?void 0:s.split(":")[1]}function re(e){const{SaleOptOut:n,SharingOptOut:t,Gpc:o}=e,{excludedCategories:s}=T[m.CALIFORNIA],r=n!==1&&t!==1&&!o,a={};for(const c of v){if(c in s){a[c]=!0;continue}a[c]=r}return a}function ae(e){const{SaleOptOut:n,SharingOptOut:t,TargetedAdvertisingOptOut:o}=e,{excludedCategories:s}=T[m.US_NATIONAL],r=JSON.parse(localStorage.getItem("ft_sp_marketing_optout")||"{}"),a=n!==1&&t!==1&&o!==1,c={};for(const i of v){if(i in s){c[i]=!0;continue}c[i]=a}if(r.usnat)for(const i of v)c[i]=!1;return c}const ie={[m.CALIFORNIA]:re,[m.US_NATIONAL]:ae};async function ce(){const e=await new Promise((a,c)=>{try{window.__gpp?window.__gpp("ping",a):c(new Error("GPP API is not available on page"))}catch(i){c(i)}}),{parsedSections:n}=e,t=se(e);if(!t||!n[t])throw new Error("GPP parser was called without an applicable section");const o=n[t],s=ie[t];if(!s||typeof s!="function")throw new Error(`No parser found for applicable GPP section: ${t}`);return s(o)}function pe(e,{purpose:n,vendor:t,specialFeatureOptins:o}){const s=E[e],r=s.purposes.every(i=>(n==null?void 0:n.consents[i])||(n==null?void 0:n.legitimateInterests[i])),a=s.iabVendors.every(i=>(t==null?void 0:t.consents[i])||(t==null?void 0:t.legitimateInterests[i])),c=s.specialFeatures.every(i=>(o==null?void 0:o[i])===!0);return r&&a&&c}async function ue(){const e=await new Promise((t,o)=>{try{window.__tcfapi?window.__tcfapi("addEventListener",2,t):o(new Error("TCF API is not available on page"))}catch(s){o(s)}}),n={};for(const t of v)n[t]=pe(t,e);return n}async function de(e){const t={gdpr:ue,usnat:ce}[e];if(!t)throw new Error("Unable to update user consent. Unsupported consent legislation.");return t()}function le(){const n=Object.fromEntries(document.cookie.split("; ").map(o=>o.split("=")))[U];if(!n)return{};const t=decodeURIComponent(n);return Object.fromEntries(t.split(",").map(o=>{const[s,r]=o.split(":");return[s,r==="on"]}))}function fe(e,n){return Object.keys(e).some(o=>{const s=`${o.toLowerCase()}Onsite`;return e[o]!==n[s]})}function ge({userId:e,useConsentStore:n}){return!!e&&n===!0}function me(e,n){return e?`${n.consentProxyHost}/__consent/consent-record/${F}/${n.userId}?updateFtConsentCookie=true`:`${n.consentProxyHost}/__consent/consent-record-cookie?cookieDomain=${n.cookieDomain}`}async function _e(e,n){try{const t=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),credentials:"include"});t.ok||console.error("Unable to save consent preferences",t.status)}catch(t){console.error("An error occurred while saving consent",t)}}const ye=()=>{document.dispatchEvent(new CustomEvent("onCmpConsentReady",{bubbles:!0}))};function ve(e){return async function(t,o,s,r){if(ye(),e.disableFTCookies||!e.includeUsNat&&t==="usnat")return;const a=r.applies?t:"gdpr";if(a!==t||!s)return;let c;try{c=await de(a)}catch(g){console.error(g)}if(!c||!fe(c,le()))return;const p=ge(e),f=me(p,e),u=oe(c,p,e);await _e(f,u),document.dispatchEvent(new CustomEvent("oCookieMessage.act",{bubbles:!0}))}}const b="cookie-message",we="manage-cookies";let S=Object.freeze({activeComponent:b,messageId:0,privacyManagerId:0});function Ce(e){return typeof e=="object"&&e!==null&&e.constructor===Object&&Object.prototype.toString.call(e)==="[object Object]"}const Ie=()=>({...S}),h=e=>{if(!Ce(e)){console.error("Invalid state changes");return}S={...S,...e}},be=["adsDisableInternalCMP","pwm.cmp","messageSlotBottom"];function Se(e,n){const t=he(e.flags);window._sp_queue=window._sp_queue??[],window._sp_queue.push(()=>{var o,s;for(const[r,a]of Object.entries(Ee))(s=(o=window._sp_).addEventListener)==null||s.call(o,r,a({...e,flags:t}))}),ke({...e,flags:t},n)}function he(e){const n={};return typeof e=="object"&&be.forEach(t=>{Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}),n}function Oe(e){if(!e)return;const n=document.body,t=new CustomEvent("oTracking.event",{bubbles:!0,cancelable:!0,detail:e.detail});n.dispatchEvent(t)}function C({trackingProps:e,action:n,triggerAction:t}){let o;const s=Ie(),{product:r,app:a,flags:c}=e;s.activeComponent===b?o=s.messageId:o=s.privacyManagerId;const i={detail:{component:{id:o,name:s.activeComponent,type:"overlay",subtype:"cmp"},category:"component",action:n,...t&&{trigger_action:t},...r&&{product:r},...a&&{app:a},custom:[{cookie_toggle_flag:c}],url:window.document.location.href||null}};Oe(i)}const Ee={onMessageChoiceSelect:e=>(n,t,o)=>{const r={11:"accept_all",12:"manage_cookies",13:"reject_all"}[o];r&&C({trackingProps:e,action:"click",triggerAction:r})},onMessageReady:e=>()=>{C({trackingProps:e,action:"view"})},onMessageReceiveData:()=>(e,n)=>{const{messageId:t}=n;t&&h({messageId:t})},onError:e=>(n,t)=>{C({trackingProps:e,action:"error",triggerAction:t})},onPMCancel:()=>()=>{h({activeComponent:b})}};function ke(e,n){window.addEventListener("message",function(t){if(t.origin!==n)return;const o={1:"save_and_close",11:"accept_all",13:"reject_all"},{data:{fromPM:s,actionType:r,messageId:a="0"}={}}=t;s&&(+a&&h({activeComponent:we,privacyManagerId:+a}),!(!r||!o[r])&&C({trackingProps:e,action:"click",triggerAction:o[r]}))},!1)}const Ne="5.5.3";async function Pe(e){const{useFTSession:n=!0,consentProxyHost:t=j,cookieDomain:o=x,formOfWordsId:s=V,useConsentStore:r=!0,trackingContext:a={},disableFTCookies:c=!1,includeUsNat:i=!1}=e||{};let{propertyConfig:p=w,userId:f}=e||{};if(typeof window>"u"){console.error("The CMP client can only be initialised in a browser context");return}if(window.FT_CMP_CLIENT_VERSION=Ne,!f&&n)try{const u=await R();f=u==null?void 0:u.uuid}catch(u){console.error(u)}p=Te(p),ne(p,{userId:f,includeUsNat:i}),window._sp_queue.push(()=>{var u,g;(g=(u=window._sp_)==null?void 0:u.addEventListener)==null||g.call(u,"onConsentReady",ve({userId:f,consentProxyHost:t,cookieDomain:o,formOfWordsId:s,useConsentStore:r,disableFTCookies:c,includeUsNat:i}))}),Se(a,p.baseEndpoint)}function Te(e){if(!(e!=null&&e.accountId))throw new Error("Please pass a valid property config");return e.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 e.events),e}function M(e,n,t,o,s,r){const{text:a,onClick:c}=o[n],i=document.querySelectorAll(`a[href*="${r}"]`);for(const p of i)(t||e)&&(s.has(p)&&p.removeEventListener("click",s.get(p)),p.innerText=a,p.addEventListener("click",c),s.set(p,c))}function Me({_clientOptions:e}=w){const{privacyManagerId:n,ccpaPrivacyManagerId:t,usnatPrivacyManagerId:o,manageCookiesLinkOverride:s}=e??w._clientOptions,r={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(t)}},gdpr:{text:"Manage Cookies",onClick:i=>{var p;i.preventDefault(),(p=window._sp_.gdpr)==null||p.loadPrivacyManagerModal(n)}}},a=new Map,c=function(i,p,f,u){M(!1,i,u.applies,r,a,s),u.applies&&window._sp_queue.push(()=>{var g,A;(A=(g=window._sp_).removeEventListener)==null||A.call(g,"onConsentReady",c)})};M(!0,"gdpr",!1,r,a,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 Ae(e){const n=document.querySelector(e);return n?JSON.parse(n.textContent||"{}"):{}}function Le(){return{flags:Ae("script#page-kit-flags-embed")}}function De(e){const{includeUsNat:n}=e._clientOptions||{},{flags:t}=Le();return t!=null&&t.adsEnableGpp||n?{includeUsNat:!0}:{}}const Re={"ft.com":De};function Fe(e){return new Promise((n,t)=>{const{rootDomain:o}=e._clientOptions||{};if(!o){n({});return}const s=Re[o];if(!s||typeof s!="function"){n({});return}const r=()=>{try{n(s(e))}catch(a){t(a)}};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",r):r()})}function Ue(e,n){if(!n||Number.isFinite(parseFloat(n))||!e.endsWith(n))return!1;const t=e.indexOf(n),o=e[t-1];return o==="."||o===void 0}function Ve(e){if(!e)throw new Error("Invalid hostname provided");let t=Object.values(z).find(o=>{var r;if(o.propertyHref)return!1;const s=(r=o._clientOptions)==null?void 0:r.rootDomain;return s&&Ue(e,s)});return t??(t=k),t}const xe=new URL(window.location.href).hostname,l=Ve(xe);(async()=>{var e,n;try{const t=await Fe(l);Pe({propertyConfig:l,...t}),(e=l==null?void 0:l._clientOptions)!=null&&e.privacyManagerId&&((n=l==null?void 0:l._clientOptions)!=null&&n.manageCookiesLinkOverride)&&Me(l)}catch(t){console.error("Error: CMP package configure + initialise Sourcepoint failed.",t)}})()})();
|
|
1
|
+
(function(){"use strict";const V=(e,{credentials:t="omit"}={})=>fetch(`https://session-next.ft.com${e}`,{credentials:t,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=(e,t)=>{if(typeof e=="object"){_=e;return}if(typeof e=="string"&&typeof t=="string"){_[e]=t;return}if(typeof e=="string"&&typeof t>"u")return _[e]||null;if(typeof e>"u"&&typeof t>"u")return _;throw new Error("Invalid arguments")};S.clear=()=>{_={}};const y={},x=()=>{const[,e]=/FTSession_s=([^;]+)/.exec(document.cookie)||[];return e},j=()=>{const e=S("uuid");if(e)return Promise.resolve({uuid:e});const t=x();return t?(y.uuid||(y.uuid=V(`/sessions/s/${t}`).then(({uuid:n}={})=>(delete y.uuid,n&&S("uuid",n),{uuid:n}))),y.uuid):Promise.resolve({uuid:void 0})},T="sourcepoint-cmp",H="FTPINK",q="FTConsent",G="sourcepointCmp/VngD.XycZut.595cp9fWdp5XYP9vlFvk",$=".ft.com",W="https://consent.ft.com",k={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:[]}},v=Object.keys(k),d={joinHref:!0,gdpr:{}},N={...d,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"}},w={...d,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"}},J={...d,accountId:1906,baseEndpoint:"https://consent-manager.pwmnet.com",propertyId:33414,_clientOptions:{rootDomain:"pwmnet.com"}},K={...d,accountId:1906,baseEndpoint:"https://consent-manager.fdiintelligence.com",propertyId:34061,_clientOptions:{rootDomain:"fdiintelligence.com"}},B={...d,accountId:1906,baseEndpoint:"https://consent-manager.thebanker.com",propertyId:34060,_clientOptions:{rootDomain:"thebanker.com"}},X={...d,accountId:1906,baseEndpoint:"https://consent-manager.bankingriskandregulation.com",propertyId:34059,_clientOptions:{rootDomain:"bankingriskandregulation.com"}},Y={...d,accountId:1906,baseEndpoint:"https://consent-manager.sustainableviews.com",propertyId:34058,_clientOptions:{rootDomain:"sustainableviews.com"}},z={...d,accountId:1906,baseEndpoint:"https://consent-manager.ftadviser.com",propertyId:33416,_clientOptions:{rootDomain:"ftadviser.com"}},Z={...d,accountId:1906,baseEndpoint:"https://consent-manager.investorschronicle.co.uk",propertyId:33415,_clientOptions:{rootDomain:"investorschronicle.co.uk"}},Q={...d,accountId:1906,baseEndpoint:"https://cdn.privacy-mgmt.com",propertyId:33947,_clientOptions:{rootDomain:"ignitesasia.com"}},ee={...d,accountId:1906,baseEndpoint:"https://cdn.privacy-mgmt.com",propertyId:33946,_clientOptions:{rootDomain:"igniteseurope.com"}},te={...d,accountId:1906,baseEndpoint:"https://consent-manager.mandatewire.com",propertyId:35490,_clientOptions:{rootDomain:"mandatewire.com"}},ne={...d,accountId:1906,baseEndpoint:"https://consent-manager.ftlocations.com",propertyId:37407,_clientOptions:{rootDomain:"ftlocations.com",cookieDomain:".ftlocations.com"}},oe=Object.freeze(Object.defineProperty({__proto__:null,FT_DOTCOM_PROD:w,FT_DOTCOM_TEST:N,MM_IGNITES_ASIA:Q,MM_IGNITES_EUROPE:ee,SP_BANKING_RR:X,SP_FDI_INTELLIGENCE:K,SP_FT_ADVISER:z,SP_FT_LOCATIONS:ne,SP_INVESTORS_CHRONICLE:Z,SP_MANDATE_WIRE:te,SP_PWMNET:J,SP_SUSTAINABLE_VIEWS:Y,SP_THE_BANKER:B},Symbol.toStringTag,{value:"Module"}));function P(e,t){const n=document.createElement("script");return n.dataset.cmpScript=e,n.innerHTML=t,n}function se(e){const t=document.createElement("script");return t.src=e,t}const ie={cmpFrames:"https://consent-manager.ft.com/unified/wrapperMessagingWithoutDetection.js"},A={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:usnatv1","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:usnatv1","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:usnatv1","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 ae(e){const t=document.createDocumentFragment();return t.appendChild(P("tcf",A.tcfStub)),e.includeUsNat&&t.appendChild(P("gpp",A.gppStub)),t.appendChild(se(ie.cmpFrames)),t}function re(e,t){const{userId:n,includeUsNat:o}=t;return n&&(e.authId=n),o&&(e.usnat=e.usnat||{}),e}function ce(e,t){const{_clientOptions:n,...o}=e,s=re(o,t);window._sp_={config:s},window._sp_queue??(window._sp_queue=[]),document.head.appendChild(ae(t))}function pe(e,t,n,{formOfWordsId:o,cookieDomain:s}){const r=Object.keys(e).reduce((c,a)=>(c[a]={onsite:{status:e[a],lbi:!1,source:T,fow:o}},c),{});return t?{setConsentCookie:!0,formOfWordsId:o,consentSource:T,cookieDomain:s,skipDuplicateUpdates:!n,data:r}:{data:r,cookieDomain:s}}const m={CALIFORNIA:"uscav1",US_NATIONAL:"usnatv1"},D={[m.CALIFORNIA]:{excludedCategories:{personalisedMarketing:!0}},[m.US_NATIONAL]:{excludedCategories:{personalisedMarketing:!0}}};function ue(e){const{applicableSections:t,supportedAPIs:n}=e,o=t[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 de(e){const{SaleOptOut:t,SharingOptOut:n,Gpc:o}=e,{excludedCategories:s}=D[m.CALIFORNIA],i=t!==1&&n!==1&&!o,r={};for(const c of v){if(c in s){r[c]=!0;continue}r[c]=i}return r}function le(e){const{SaleOptOut:t,SharingOptOut:n,TargetedAdvertisingOptOut:o}=e,{excludedCategories:s}=D[m.US_NATIONAL],i=JSON.parse(localStorage.getItem("ft_sp_marketing_optout")||"{}"),r=t!==1&&n!==1&&o!==1,c={};for(const a of v){if(a in s){c[a]=!0;continue}c[a]=r}if(i.usnat)for(const a of v)c[a]=!1;return c}const fe={[m.CALIFORNIA]:de,[m.US_NATIONAL]:le};async function M(){return new Promise((e,t)=>{try{window.__gpp?window.__gpp("ping",e):t(new Error("GPP API is not available on page"))}catch(n){t(n)}})}async function ge(){const e=await M(),{parsedSections:t}=e,n=ue(e);if(!n||!t[n])throw new Error("GPP parser was called without an applicable section");const o=t[n],s=fe[n];if(!s||typeof s!="function")throw new Error(`No parser found for applicable GPP section: ${n}`);return s(o)}function me(e,{purpose:t,vendor:n,specialFeatureOptins:o}){const s=k[e],i=s.purposes.every(a=>(t==null?void 0:t.consents[a])||(t==null?void 0:t.legitimateInterests[a])),r=s.iabVendors.every(a=>(n==null?void 0:n.consents[a])||(n==null?void 0:n.legitimateInterests[a])),c=s.specialFeatures.every(a=>(o==null?void 0:o[a])===!0);return i&&r&&c}async function L(){return new Promise((e,t)=>{try{window.__tcfapi?window.__tcfapi("addEventListener",2,e):t(new Error("TCF API is not available on page"))}catch(n){t(n)}})}async function _e(){const e=await L(),t={};for(const n of v)t[n]=me(n,e);return t}async function ye(e){const n={gdpr:_e,usnat:ge}[e];if(!n)throw new Error("Unable to update user consent. Unsupported consent legislation.");return n()}function ve(){const t=Object.fromEntries(document.cookie.split("; ").map(o=>o.split("=")))[q];if(!t)return{};const n=decodeURIComponent(t);return Object.fromEntries(n.split(",").map(o=>{const[s,i]=o.split(":");return[s,i==="on"]}))}function we(e,t){return Object.keys(e).some(o=>{const s=`${o.toLowerCase()}Onsite`;return e[o]!==t[s]})}function Ie({userId:e,useConsentStore:t}){return!!e&&t===!0}function Ce(e,t){return e?`${t.consentProxyHost}/__consent/consent-record/${H}/${t.userId}?updateFtConsentCookie=true`:`${t.consentProxyHost}/__consent/consent-record-cookie?cookieDomain=${t.cookieDomain}`}const F={gdpr:!1,usnat:!1},b=Object.assign({},F);function R(e){b[e]=!0}function Se(e){return b[e]}function be(){Object.assign(b,F)}async function he(e){return Se(e)?e==="gdpr"?(await L()).eventStatus==="useractioncomplete":e==="usnat"?(await M()).cmpDisplayStatus==="hidden":!1:!1}function Oe(){window.__tcfapi&&window.__tcfapi("addEventListener",2,e=>{e.eventStatus==="cmpuishown"&&R("gdpr")}),window.__gpp&&window.__gpp("addEventListener",({pingData:e})=>{e.cmpDisplayStatus==="visible"&&R("usnat")})}async function Ee(e,t){try{const n=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),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 Te=()=>{document.dispatchEvent(new CustomEvent("onCmpConsentReady",{bubbles:!0}))};function ke(e){return async function(n,o,s,i){if(Te(),e.disableFTCookies||!e.includeUsNat&&n==="usnat")return;const r=i.applies?n:"gdpr";if(r!==n||!s)return;let c;try{c=await ye(r)}catch(C){console.error(C)}if(!c||!we(c,ve()))return;const p=await he(r),f=Ie(e),u=Ce(f,e),g=pe(c,f,p,e);await Ee(u,g),p&&be(),document.dispatchEvent(new CustomEvent("oCookieMessage.act",{bubbles:!0}))}}const h="cookie-message",Ne="manage-cookies";let O=Object.freeze({activeComponent:h,messageId:0,privacyManagerId:0});function Pe(e){return typeof e=="object"&&e!==null&&e.constructor===Object&&Object.prototype.toString.call(e)==="[object Object]"}const Ae=()=>({...O}),E=e=>{if(!Pe(e)){console.error("Invalid state changes");return}O={...O,...e}},De=["adsDisableInternalCMP","pwm.cmp","messageSlotBottom"];function Me(e,t){const n=Le(e.flags);window._sp_queue=window._sp_queue??[],window._sp_queue.push(()=>{var o,s;for(const[i,r]of Object.entries(Re))(s=(o=window._sp_).addEventListener)==null||s.call(o,i,r({...e,flags:n}))}),Ue({...e,flags:n},t)}function Le(e){const t={};return typeof e=="object"&&De.forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}),t}function Fe(e){if(!e)return;const t=document.body,n=new CustomEvent("oTracking.event",{bubbles:!0,cancelable:!0,detail:e.detail});t.dispatchEvent(n)}function I({trackingProps:e,action:t,triggerAction:n}){let o;const s=Ae(),{product:i,app:r,flags:c}=e;s.activeComponent===h?o=s.messageId:o=s.privacyManagerId;const a={detail:{component:{id:o,name:s.activeComponent,type:"overlay",subtype:"cmp"},category:"component",action:t,...n&&{trigger_action:n},...i&&{product:i},...r&&{app:r},custom:[{cookie_toggle_flag:c}],url:window.document.location.href||null}};Fe(a)}const Re={onMessageChoiceSelect:e=>(t,n,o)=>{const i={11:"accept_all",12:"manage_cookies",13:"reject_all"}[o];i&&I({trackingProps:e,action:"click",triggerAction:i})},onMessageReady:e=>()=>{I({trackingProps:e,action:"view"})},onMessageReceiveData:()=>(e,t)=>{const{messageId:n}=t;n&&E({messageId:n})},onError:e=>(t,n)=>{I({trackingProps:e,action:"error",triggerAction:n})},onPMCancel:()=>()=>{E({activeComponent:h})}};function Ue(e,t){window.addEventListener("message",function(n){if(n.origin!==t)return;const o={1:"save_and_close",11:"accept_all",13:"reject_all"},{data:{fromPM:s,actionType:i,messageId:r="0"}={}}=n;s&&(+r&&E({activeComponent:Ne,privacyManagerId:+r}),!(!i||!o[i])&&I({trackingProps:e,action:"click",triggerAction:o[i]}))},!1)}const Ve="5.7.0";async function xe(e){const{useFTSession:t=!0,consentProxyHost:n=W,cookieDomain:o=$,formOfWordsId:s=G,useConsentStore:i=!0,trackingContext:r={},disableFTCookies:c=!1,includeUsNat:a=!1}=e||{};let{propertyConfig:p=w,userId:f}=e||{};if(typeof window>"u"){console.error("The CMP client can only be initialised in a browser context");return}if(window.FT_CMP_CLIENT_VERSION=Ve,!f&&t)try{const u=await j();f=u==null?void 0:u.uuid}catch(u){console.error(u)}p=je(p),ce(p,{userId:f,includeUsNat:a}),Oe(),window._sp_queue.push(()=>{var u,g;(g=(u=window._sp_)==null?void 0:u.addEventListener)==null||g.call(u,"onConsentReady",ke({userId:f,consentProxyHost:n,cookieDomain:o,formOfWordsId:s,useConsentStore:i,disableFTCookies:c,includeUsNat:a}))}),Me(r,p.baseEndpoint)}function je(e){if(!(e!=null&&e.accountId))throw new Error("Please pass a valid property config");return e.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 e.events),e}function U(e,t,n,o,s,i){const{text:r,onClick:c}=o[t],a=document.querySelectorAll(`a[href*="${i}"]`);for(const p of a)(n||e)&&(s.has(p)&&p.removeEventListener("click",s.get(p)),p.innerText=r,p.addEventListener("click",c),s.set(p,c))}function He({_clientOptions:e}=w){const{privacyManagerId:t,ccpaPrivacyManagerId:n,usnatPrivacyManagerId:o,manageCookiesLinkOverride:s}=e??w._clientOptions,i={usnat:{text:"Do Not Sell My Personal Information",onClick:a=>{var p;a.preventDefault(),(p=window._sp_.usnat)==null||p.loadPrivacyManagerModal(o)}},ccpa:{text:"Do Not Sell My Personal Information",onClick:a=>{var p;a.preventDefault(),(p=window._sp_.ccpa)==null||p.loadPrivacyManagerModal(n)}},gdpr:{text:"Manage Cookies",onClick:a=>{var p;a.preventDefault(),(p=window._sp_.gdpr)==null||p.loadPrivacyManagerModal(t)}}},r=new Map,c=function(a,p,f,u){U(!1,a,u.applies,i,r,s),u.applies&&window._sp_queue.push(()=>{var g,C;(C=(g=window._sp_).removeEventListener)==null||C.call(g,"onConsentReady",c)})};U(!0,"gdpr",!1,i,r,s),window._sp_queue??(window._sp_queue=[]),window._sp_queue.push(()=>{var a,p;(p=(a=window._sp_).addEventListener)==null||p.call(a,"onConsentReady",c)})}function qe(e){const t=document.querySelector(e);return t?JSON.parse(t.textContent||"{}"):{}}function Ge(){return{flags:qe("script#page-kit-flags-embed")}}function $e(e){const{includeUsNat:t}=e._clientOptions||{},{flags:n}=Ge();return n!=null&&n.adsEnableGpp||t?{includeUsNat:!0}:{}}const We={"ft.com":$e};function Je(e){return new Promise((t,n)=>{const{rootDomain:o}=e._clientOptions||{};if(!o)return t({});const s=We[o];if(!s||typeof s!="function")return t({...e._clientOptions});const i=()=>{try{t(s(e))}catch(r){n(r)}};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",i):i()})}function Ke(e,t){if(!t||Number.isFinite(parseFloat(t))||!e.endsWith(t))return!1;const n=e.indexOf(t),o=e[n-1];return o==="."||o===void 0}function Be(e){if(!e)throw new Error("Invalid hostname provided");let n=Object.values(oe).find(o=>{var i;if(o.propertyHref)return!1;const s=(i=o._clientOptions)==null?void 0:i.rootDomain;return s&&Ke(e,s)});return n??(n=N),n}const Xe=new URL(window.location.href).hostname,l=Be(Xe);(async()=>{var e,t;try{const n=await Je(l);xe({propertyConfig:l,...n}),(e=l==null?void 0:l._clientOptions)!=null&&e.privacyManagerId&&((t=l==null?void 0:l._clientOptions)!=null&&t.manageCookiesLinkOverride)&&He(l)}catch(n){console.error("Error: CMP package configure + initialise Sourcepoint failed.",n)}})()})();
|
package/dist/src/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAY,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAY,MAAM,uBAAuB,CAAC;AAYtE,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,cAAc,iBAkD/D"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import type { ParsedConsentState } from "../../../typings/types";
|
|
1
|
+
import type { GPP, ParsedConsentState } from "../../../typings/types";
|
|
2
|
+
export declare function getGPPData(): Promise<GPP.PingData>;
|
|
2
3
|
export declare function parseGPPConsent(): Promise<ParsedConsentState>;
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/consent-parsers/gpp/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/consent-parsers/gpp/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAsFtE,wBAAsB,UAAU,0BAY/B;AAED,wBAAsB,eAAe,gCAkBpC"}
|
|
@@ -6,5 +6,6 @@ import type { IabCustomCategoryName, ParsedConsentState, TCData } from "../../..
|
|
|
6
6
|
* @returns {boolean} - Returns true if consent is granted, otherwise false.
|
|
7
7
|
*/
|
|
8
8
|
export declare function checkConsentFor(categoryName: IabCustomCategoryName, { purpose, vendor, specialFeatureOptins }: Partial<TCData>): boolean;
|
|
9
|
+
export declare function getTcData(): Promise<TCData>;
|
|
9
10
|
export declare function parseGDPRConsent(): Promise<ParsedConsentState>;
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -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,oBAAoB,EAAE,EAAE,OAAO,CAAC,MAAM,CAAC,GACzD,OAAO,CAmBT;AAED,wBAAsB,gBAAgB,
|
|
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":"index.d.ts","sourceRoot":"","sources":["../../../src/consent-ready/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/consent-ready/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAoC/E,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,iBAAiB,iBAE7C,MAAM,gBACL,MAAM,iBACL,MAAM,eACR;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,mBA8CrC"}
|
|
@@ -2,11 +2,12 @@ import type { ParsedConsentState, ConsentPayloadOptions, ConsentCategoryPayload
|
|
|
2
2
|
/**
|
|
3
3
|
* Build payload for updating user's consent
|
|
4
4
|
*/
|
|
5
|
-
export declare function getConsentPayload(parsedConsent: ParsedConsentState, updateConsentStore: boolean, { formOfWordsId, cookieDomain }: Partial<ConsentPayloadOptions>): {
|
|
5
|
+
export declare function getConsentPayload(parsedConsent: ParsedConsentState, updateConsentStore: boolean, isUserInitiated: boolean, { formOfWordsId, cookieDomain }: Partial<ConsentPayloadOptions>): {
|
|
6
6
|
setConsentCookie: boolean;
|
|
7
7
|
formOfWordsId: string | undefined;
|
|
8
8
|
consentSource: string;
|
|
9
9
|
cookieDomain: string | undefined;
|
|
10
|
+
skipDuplicateUpdates: boolean;
|
|
10
11
|
data: Record<string, ConsentCategoryPayload>;
|
|
11
12
|
} | {
|
|
12
13
|
data: Record<string, ConsentCategoryPayload>;
|
|
@@ -14,5 +15,6 @@ export declare function getConsentPayload(parsedConsent: ParsedConsentState, upd
|
|
|
14
15
|
setConsentCookie?: undefined;
|
|
15
16
|
formOfWordsId?: undefined;
|
|
16
17
|
consentSource?: undefined;
|
|
18
|
+
skipDuplicateUpdates?: undefined;
|
|
17
19
|
};
|
|
18
20
|
//# sourceMappingURL=get-consent-payload.d.ts.map
|
|
@@ -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,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"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Legislation } from "../../typings/types";
|
|
2
|
+
export declare function setWaitingForUser(legislation: Legislation): void;
|
|
3
|
+
export declare function isWaitingForUser(legislation: Legislation): boolean;
|
|
4
|
+
export declare function completeWaitingForUser(): void;
|
|
5
|
+
//# sourceMappingURL=cmp-user-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cmp-user-state.d.ts","sourceRoot":"","sources":["../../../src/consent-validate/cmp-user-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AASlD,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,WAAW,QAEzD;AAED,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,WAAW,WAExD;AAED,wBAAgB,sBAAsB,SAErC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/consent-validate/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAU,MAAM,qBAAqB,CAAC;AAK1D,wBAAsB,qBAAqB,CAAC,iBAAiB,EAAE,WAAW,oBAgBzE;AAED,wBAAgB,yBAAyB,SAgBxC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { SPConfig } from "../../../typings/types";
|
|
2
|
-
export declare function getRuntimeOptions(activeProperty: SPConfig): Promise<
|
|
1
|
+
import { CMPInitOptions, SPConfig } from "../../../typings/types";
|
|
2
|
+
export declare function getRuntimeOptions(activeProperty: SPConfig): Promise<CMPInitOptions>;
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/configurators/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/configurators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAWlE,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,QAAQ,GAAG,OAAO,CAAC,cAAc,CAAC,CA2BnF"}
|
|
@@ -129,4 +129,15 @@ export declare const SP_MANDATE_WIRE: {
|
|
|
129
129
|
joinHref: boolean;
|
|
130
130
|
gdpr: {};
|
|
131
131
|
};
|
|
132
|
+
export declare const SP_FT_LOCATIONS: {
|
|
133
|
+
accountId: number;
|
|
134
|
+
baseEndpoint: string;
|
|
135
|
+
propertyId: number;
|
|
136
|
+
_clientOptions: {
|
|
137
|
+
rootDomain: string;
|
|
138
|
+
cookieDomain: string;
|
|
139
|
+
};
|
|
140
|
+
joinHref: boolean;
|
|
141
|
+
gdpr: {};
|
|
142
|
+
};
|
|
132
143
|
//# sourceMappingURL=properties.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"properties.d.ts","sourceRoot":"","sources":["../../../src/lib/properties.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;CAU1B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;;CAY1B,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;CAQrB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;CAQ/B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;CAQzB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;CAQzB,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;CAQhC,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;CAQzB,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;CAQlC,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;CAQ3B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;CAQ7B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;CAQ3B,CAAC"}
|
|
1
|
+
{"version":3,"file":"properties.d.ts","sourceRoot":"","sources":["../../../src/lib/properties.ts"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;CAU1B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;;CAY1B,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;CAQrB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;;;;CAQ/B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;CAQzB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;CAQzB,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;CAQhC,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;CAQzB,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;CAQlC,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;CAQ3B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;CAQ7B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;CAQ3B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;CAS3B,CAAC"}
|
package/dist/src/utils/url.d.ts
CHANGED
|
@@ -123,5 +123,15 @@ export declare function getPropertyConfigByHostname(hostname: string): {
|
|
|
123
123
|
};
|
|
124
124
|
joinHref: boolean;
|
|
125
125
|
gdpr: {};
|
|
126
|
+
} | {
|
|
127
|
+
accountId: number;
|
|
128
|
+
baseEndpoint: string;
|
|
129
|
+
propertyId: number;
|
|
130
|
+
_clientOptions: {
|
|
131
|
+
rootDomain: string;
|
|
132
|
+
cookieDomain: string;
|
|
133
|
+
};
|
|
134
|
+
joinHref: boolean;
|
|
135
|
+
gdpr: {};
|
|
126
136
|
};
|
|
127
137
|
//# sourceMappingURL=url.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../src/utils/url.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAWtE;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../src/utils/url.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAWtE;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiB3D"}
|
package/package.json
CHANGED
package/typings/globals.d.ts
CHANGED
|
@@ -15,6 +15,9 @@ declare global {
|
|
|
15
15
|
};
|
|
16
16
|
_sp_queue: (() => void)[];
|
|
17
17
|
__tcfapi: (key: string, n: number, callback: (resp: TCData) => void) => void;
|
|
18
|
-
__gpp:
|
|
18
|
+
__gpp: {
|
|
19
|
+
(command: "ping", callback: (resp: GPP.PingData) => void): void;
|
|
20
|
+
(command: "addEventListener", callback: (resp: { pingData: GPP.PingData }) => void): void;
|
|
21
|
+
};
|
|
19
22
|
}
|
|
20
23
|
}
|
package/typings/types.d.ts
CHANGED
|
@@ -6,13 +6,12 @@ export type SPLifecycleEvents = Partial<typeof events>;
|
|
|
6
6
|
|
|
7
7
|
export type SPEventId = keyof SPLifecycleEvents;
|
|
8
8
|
|
|
9
|
-
export type SPConfigClientOptions = {
|
|
9
|
+
export type SPConfigClientOptions = CMPInitOptions & {
|
|
10
10
|
privacyManagerId?: number;
|
|
11
11
|
usnatPrivacyManagerId?: number;
|
|
12
12
|
ccpaPrivacyManagerId?: number;
|
|
13
13
|
manageCookiesLinkOverride?: string;
|
|
14
14
|
rootDomain?: string;
|
|
15
|
-
includeUsNat?: boolean;
|
|
16
15
|
};
|
|
17
16
|
|
|
18
17
|
export interface SPConfig {
|