@duckduckgo/autoconsent 17.3.0 → 18.0.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/.prettierignore +1 -0
- package/AGENTS.md +2 -0
- package/CHANGELOG.md +90 -0
- package/dist/addon-firefox/background.bundle.js +28 -7
- package/dist/addon-firefox/compact-rules.json +1 -1
- package/dist/addon-firefox/content.bundle.js +624 -54
- package/dist/addon-firefox/manifest.json +1 -1
- package/dist/addon-firefox/popup.bundle.js +19 -7
- package/dist/addon-firefox/rule-index.json +1 -1
- package/dist/addon-firefox/rules.json +1 -1
- package/dist/addon-mv3/background.bundle.js +28 -7
- package/dist/addon-mv3/compact-rules.json +1 -1
- package/dist/addon-mv3/content.bundle.js +624 -54
- package/dist/addon-mv3/manifest.json +1 -1
- package/dist/addon-mv3/popup.bundle.js +19 -7
- package/dist/addon-mv3/rule-index.json +1 -1
- package/dist/addon-mv3/rules.json +1 -1
- package/dist/autoconsent.cjs.js +630 -60
- package/dist/autoconsent.esm.js +630 -60
- package/dist/autoconsent.playwright.js +624 -54
- package/dist/autoconsent.standalone.js +631 -61
- package/dist/heuristics.cjs.js +621 -52
- package/dist/heuristics.mjs +609 -50
- package/dist/types/cmps/trustarc-top.d.ts +1 -0
- package/dist/types/eval-snippets.d.ts +2 -0
- package/dist/types/heuristic-classify.d.ts +2 -6
- package/dist/types/heuristic-detect.d.ts +32 -0
- package/dist/types/heuristic-literals.d.ts +1 -0
- package/dist/types/heuristic-negatives.d.ts +25 -0
- package/dist/types/heuristic-patterns.d.ts +18 -2
- package/dist/types/heuristic-prefilter.d.ts +13 -0
- package/docs/heuristic-detection.md +78 -0
- package/docs/heuristic-prefilter.md +62 -0
- package/eslint.config.mjs +16 -1
- package/lib/cmps/admiral.ts +10 -0
- package/lib/cmps/trustarc-top.ts +10 -1
- package/lib/eval-snippets.ts +9 -0
- package/lib/heuristic-classify.ts +4 -39
- package/lib/heuristic-detect.ts +209 -0
- package/lib/heuristic-literals.ts +207 -0
- package/lib/heuristic-negatives.ts +173 -0
- package/lib/heuristic-patterns.ts +104 -31
- package/lib/heuristic-prefilter.ts +40 -0
- package/lib/heuristics.ts +8 -4
- package/lib/web.ts +1 -1
- package/package.json +2 -1
- package/rules/autoconsent/adblockplus.json +94 -0
- package/rules/autoconsent/alertamodal-cookies.json +29 -0
- package/rules/autoconsent/altamar-cookieconsent.json +45 -0
- package/rules/autoconsent/autohero.json +49 -0
- package/rules/autoconsent/bing.com-notice-cosmetic.json +28 -0
- package/rules/autoconsent/bing.com-notice.json +13 -0
- package/rules/autoconsent/binogi.json +32 -0
- package/rules/autoconsent/bokio.json +32 -0
- package/rules/autoconsent/botble-cookie-consent.json +16 -0
- package/rules/autoconsent/bsgdprcookies.json +16 -0
- package/rules/autoconsent/calcolo-tools.json +23 -0
- package/rules/autoconsent/casasrurales.json +15 -0
- package/rules/autoconsent/ccoo.json +40 -0
- package/rules/autoconsent/cdu-edu-au.json +29 -0
- package/rules/autoconsent/cnmc-gob-es.json +14 -0
- package/rules/autoconsent/comparandonos.json +66 -0
- package/rules/autoconsent/consent-backdrop.json +34 -0
- package/rules/autoconsent/consilium-europa-eu.json +35 -0
- package/rules/autoconsent/cookie-accordion-settings.json +56 -0
- package/rules/autoconsent/cookies-tip-v1.json +9 -0
- package/rules/autoconsent/cookiesplus.json +20 -0
- package/rules/autoconsent/crtm.json +36 -0
- package/rules/autoconsent/dtu-findit.json +47 -0
- package/rules/autoconsent/edebe.json +22 -0
- package/rules/autoconsent/eduardolosilla.json +12 -0
- package/rules/autoconsent/educastur-alojaweb.json +13 -0
- package/rules/autoconsent/flatsome-cookies.json +25 -0
- package/rules/autoconsent/gameforge.json +42 -0
- package/rules/autoconsent/gamefound-com.json +12 -0
- package/rules/autoconsent/generalitat-catalunya.json +15 -0
- package/rules/autoconsent/hikvision.com.json +18 -0
- package/rules/autoconsent/hurra-consent.json +16 -0
- package/rules/autoconsent/ihavecookies.json +5 -1
- package/rules/autoconsent/imarina.json +25 -0
- package/rules/autoconsent/isidewith.com.json +38 -0
- package/rules/autoconsent/jobtoday.json +18 -0
- package/rules/autoconsent/kaggle.json +21 -0
- package/rules/autoconsent/landgate.json +10 -0
- package/rules/autoconsent/mblock.json +28 -0
- package/rules/autoconsent/mirasvit-gdpr.json +18 -7
- package/rules/autoconsent/mites.gob.es.json +18 -0
- package/rules/autoconsent/pakamera.json +19 -0
- package/rules/autoconsent/purecookie-cosmetic.json +13 -0
- package/rules/autoconsent/random-org.json +41 -0
- package/rules/autoconsent/react-cookie-consent-cosmetic.json +40 -0
- package/rules/autoconsent/supercontable.json +19 -0
- package/rules/autoconsent/tallink.json +13 -0
- package/rules/autoconsent/tealium.json +4 -1
- package/rules/autoconsent/tusclasesparticulares.com.json +14 -0
- package/rules/autoconsent/typo3-cookieconsent.json +9 -0
- package/rules/autoconsent/udg.edu.json +47 -0
- package/rules/autoconsent/uned-barbastro.json +58 -0
- package/rules/autoconsent/uregina.json +35 -0
- package/rules/autoconsent/vinnies-org-au.json +29 -0
- package/rules/autoconsent/vrg-bottom-cookies.json +52 -0
- package/rules/autoconsent/wiki.gg.json +1 -1
- package/rules/compact-rules.json +1 -1
- package/rules/rule-index.json +1 -1
- package/rules/rules.json +1 -1
- package/scripts/build-heuristic-literals.ts +24 -0
- package/scripts/required-literals.ts +177 -0
- package/tests/adblockplus.spec.ts +7 -0
- package/tests/admiral.spec.ts +5 -4
- package/tests/alertamodal-cookies.spec.ts +8 -0
- package/tests/altamar-cookieconsent.spec.ts +6 -0
- package/tests/autohero.spec.ts +3 -0
- package/tests/bing.com-notice-cosmetic.spec.ts +5 -0
- package/tests/bing.com-notice.spec.ts +6 -0
- package/tests/binogi.spec.ts +3 -0
- package/tests/bokio.spec.ts +6 -0
- package/tests/botble-cookie-consent.spec.ts +11 -0
- package/tests/bsgdprcookies.spec.ts +6 -0
- package/tests/calcolo-tools.spec.ts +3 -0
- package/tests/casasrurales.spec.ts +3 -0
- package/tests/ccoo.spec.ts +5 -0
- package/tests/cdu-edu-au.spec.ts +3 -0
- package/tests/cnmc-gob-es.spec.ts +3 -0
- package/tests/comparandonos.spec.ts +3 -0
- package/tests/consent-backdrop.spec.ts +9 -0
- package/tests/consilium-europa-eu.spec.ts +3 -0
- package/tests/cookie-accordion-settings.spec.ts +5 -0
- package/tests/cookies-tip-v1.spec.ts +3 -0
- package/tests/cookiesplus.spec.ts +6 -0
- package/tests/crtm.spec.ts +3 -0
- package/tests/dtu-findit.spec.ts +3 -0
- package/tests/edebe.spec.ts +3 -0
- package/tests/eduardolosilla.spec.ts +3 -0
- package/tests/educastur-alojaweb.spec.ts +6 -0
- package/tests/flatsome-cookies.spec.ts +3 -0
- package/tests/gameforge.spec.ts +8 -0
- package/tests/gamefound-com.spec.ts +3 -0
- package/tests/generalitat-catalunya.spec.ts +3 -0
- package/tests/hikvision.com.spec.ts +3 -0
- package/tests/hurra-consent.spec.ts +8 -0
- package/tests/ihavecookies.spec.ts +7 -1
- package/tests/imarina.spec.ts +8 -0
- package/tests/isidewith.com.spec.ts +3 -0
- package/tests/jobtoday.spec.ts +5 -0
- package/tests/kaggle.spec.ts +3 -0
- package/tests/landgate.spec.ts +3 -0
- package/tests/mblock.spec.ts +3 -0
- package/tests/mirasvit-gdpr.spec.ts +5 -0
- package/tests/mites.gob.es.spec.ts +3 -0
- package/tests/pakamera.spec.ts +5 -0
- package/tests/purecookie-cosmetic.spec.ts +8 -0
- package/tests/random-org.spec.ts +3 -0
- package/tests/react-cookie-consent-cosmetic.spec.ts +9 -0
- package/tests/supercontable.spec.ts +3 -0
- package/tests/tallink.spec.ts +3 -0
- package/tests/trustarc.spec.ts +7 -0
- package/tests/tusclasesparticulares.com.spec.ts +3 -0
- package/tests/typo3-cookieconsent.spec.ts +10 -0
- package/tests/udg.edu.spec.ts +3 -0
- package/tests/uned-barbastro.spec.ts +3 -0
- package/tests/uregina.spec.ts +3 -0
- package/tests/vinnies-org-au.spec.ts +3 -0
- package/tests/vrg-bottom-cookies.spec.ts +3 -0
- package/tests-wtr/heuristics/heuristics-utils.test.ts +222 -8
- package/tests-wtr/heuristics/regex-syntax.test.ts +81 -0
- package/rules/generated/auto_CA_promessedefleurs.com_noy.json +0 -40
- package/rules/generated/auto_FR_ludum.fr_gl5.json +0 -40
- package/rules/generated/auto_FR_meillandrichardier.com_c2f.json +0 -40
- package/rules/generated/auto_NL_bonprix.nl_ovi.json +0 -40
- package/tests/generated/auto_CA_promessedefleurs.com_noy.spec.ts +0 -6
- package/tests/generated/auto_FR_ludum.fr_gl5.spec.ts +0 -2
- package/tests/generated/auto_FR_meillandrichardier.com_c2f.spec.ts +0 -6
- package/tests/generated/auto_NL_bonprix.nl_ovi.spec.ts +0 -2
|
@@ -312,6 +312,13 @@
|
|
|
312
312
|
EVAL_ADULTFRIENDFINDER_TEST: () => !!localStorage.getItem("cookieConsent"),
|
|
313
313
|
EVAL_AYLO_COOKIE_MANAGER_READY: () => !!(window.wl_cookie_consent_manager || window._Cookie_Consent_Manager_brand),
|
|
314
314
|
EVAL_BAHN_TEST: () => utag.gdpr.getSelectedCategories().length === 1,
|
|
315
|
+
// the close handler listens for mouseup, which element.click() does not dispatch
|
|
316
|
+
EVAL_BING_NOTICE_CLOSE: () => {
|
|
317
|
+
const close = document.querySelector("#bnp_ttc_close");
|
|
318
|
+
close.dispatchEvent(new MouseEvent("mouseup", { bubbles: true, cancelable: true, view: window }));
|
|
319
|
+
close.click();
|
|
320
|
+
return true;
|
|
321
|
+
},
|
|
315
322
|
EVAL_BIGCOMMERCE_CONSENT_MANAGER_DETECT: () => !!(window.consentManager && window.consentManager.version),
|
|
316
323
|
EVAL_BORLABS_0: () => !JSON.parse(
|
|
317
324
|
decodeURIComponent(
|
|
@@ -441,6 +448,8 @@
|
|
|
441
448
|
EVAL_TEALIUM_2: () => utag.gdpr.setConsentValue(true) || true,
|
|
442
449
|
EVAL_TEALIUM_3: () => utag.gdpr.getConsentState() !== 1,
|
|
443
450
|
EVAL_TEALIUM_DONOTSELL_CHECK: () => utag.gdpr.dns?.getDnsState() !== 1,
|
|
451
|
+
// 0 means no stored decision; otherwise the user reopened the prompt themselves
|
|
452
|
+
EVAL_TEALIUM_NO_DECISION: () => utag.gdpr.getConsentState() === 0,
|
|
444
453
|
EVAL_TESTCMP_STEP: () => !!document.querySelector("#reject-all"),
|
|
445
454
|
EVAL_TESTCMP_0: () => window.results.results[0] === "button_clicked",
|
|
446
455
|
EVAL_TESTCMP_COSMETIC_0: () => window.results.results[0] === "banner_hidden",
|
|
@@ -463,18 +472,27 @@
|
|
|
463
472
|
}
|
|
464
473
|
|
|
465
474
|
// lib/heuristic-patterns.ts
|
|
475
|
+
var patternOf = (p) => p instanceof RegExp ? p : p.pattern;
|
|
476
|
+
var BY_CONTINUING_PRIVACY = /(?:by continuing.{0,100}privacy)|(?:privacy.{0,100}by continuing)/gi;
|
|
477
|
+
var ACCEPT_ALL = /accept all/gi;
|
|
478
|
+
var USE_OF_COOKIES = /use of cookies/gi;
|
|
479
|
+
var UTILISATION_DES_COOKIES = /utilisation.{0,100}des.{0,100}cookies/gi;
|
|
480
|
+
var ACCEPTEZ_UTILISATION = /acceptez.{0,100}l.{0,100}utilisation/gi;
|
|
481
|
+
var VERWENDUNG_VON_COOKIES = /verwendung.{0,100}von.{0,100}cookies/gi;
|
|
482
|
+
var DE_COOKIE_VERB = /\b(?:nutzen|nutzt|verwenden|verwendet|setzen|setzt|benutzen|benutzt|speichert|platzieren)\b(?: \S+){0,4} cookies\b/gi;
|
|
483
|
+
var GEBRUIK_VAN_COOKIES = /gebruik.{0,100}van.{0,100}cookies/gi;
|
|
466
484
|
var DETECT_PATTERNS = [
|
|
467
485
|
/accept cookies/gi,
|
|
468
|
-
|
|
486
|
+
ACCEPT_ALL,
|
|
469
487
|
/reject all/gi,
|
|
470
488
|
/only necessary cookies/gi,
|
|
471
489
|
// "only necessary" is probably too broad
|
|
472
490
|
/(?:by continuing.{0,100}cookie)|(?:cookie.{0,100}by continuing)/gi,
|
|
473
|
-
|
|
491
|
+
BY_CONTINUING_PRIVACY,
|
|
474
492
|
// up to two qualifiers are common: "optional", "essential", "analytics", "google analytics", "third party", ...
|
|
475
493
|
/we (?:use|serve)(?: \w+){0,2} cookies/gi,
|
|
476
494
|
/we are using cookies/gi,
|
|
477
|
-
|
|
495
|
+
USE_OF_COOKIES,
|
|
478
496
|
/website uses cookies to enhance your browsing experience/gi,
|
|
479
497
|
/(?:this|our) (?:web)?site.{0,100}cookies/gi,
|
|
480
498
|
/cookies (?:and|or) .{0,100} technologies/gi,
|
|
@@ -485,6 +503,33 @@
|
|
|
485
503
|
/we.{0,100}store.{0,100}information.{0,100}such as.{0,100}cookies/gi,
|
|
486
504
|
/store and\/or access information.{0,100}on a device/gi,
|
|
487
505
|
/personalised ads and content, ad and content measurement/gi,
|
|
506
|
+
// TCF wording: "store and/or access information", "and our partners ask for your consent", "we and our N partners"
|
|
507
|
+
/\b(?:store|stores|storing) and\/or access(?:ing)? information\b/gi,
|
|
508
|
+
/\band our partners ask for your consent\b/gi,
|
|
509
|
+
/\bwe and (?:our|up to) (?:\d+ )?(?:partners|vendors)\b/gi,
|
|
510
|
+
// a partner count, in each language: "our 186 partners", "unseren 107 Partnern", "nuestros 1064 socios"
|
|
511
|
+
/\b(?:our|unseren|onze|nos|nuestros|i nostri) \d{2,4} (?:partners|partnern|partner|partenaires|socios|vendors|fornitori)\b/gi,
|
|
512
|
+
/\b\d{2,4} iab[- ]partner/gi,
|
|
513
|
+
// "technologies like cookies", in each language
|
|
514
|
+
/\btechnolog(?:ies|ien|ieën|ías|ie) (?:like|such as|wie|zoals|como(?: las)?|telles que(?: les)?|come(?: i)?) cookies?\b/gi,
|
|
515
|
+
/\buses (?:\S+ ){0,2}cookies\b/gi,
|
|
516
|
+
/\b(?:like|want) to (?:use|set) (?:\S+ ){0,2}cookies\b/gi,
|
|
517
|
+
/\b(?:optional|additional|non-essential) cookies\b/gi,
|
|
518
|
+
/\bstoring of cookies\b|\bplaced cookies\b/gi,
|
|
519
|
+
/\b(?:store|stores) and access (?:data|information) on your device\b|\baccess and store (?:data|information) on your device\b/gi,
|
|
520
|
+
/\bwe use (?:\S+ ){1,4}cookies\b/gi,
|
|
521
|
+
// US privacy notices: opt-out sentences, not the footer link labels
|
|
522
|
+
/\byou (?:can|may) opt[- ]out of (?:the |this )?(?:sale|sharing|use|selling)\b/gi,
|
|
523
|
+
/\b(?:if you wish to|to) opt[- ]out of the sale\b/gi,
|
|
524
|
+
/\bthis website or its third[- ]party tools (?:process|use)\b/gi,
|
|
525
|
+
/["“]?(?:share|sell)["”]? or ["“]?(?:sell|share)["”]? (?:your )?(?:personal )?information\b/gi,
|
|
526
|
+
/\bresidents have (?:certain )?rights with regard to the sale\b/gi,
|
|
527
|
+
/\bwe use technologies (?:on this website )?(?:that may )?(?:to )?collect\b/gi,
|
|
528
|
+
// pay-or-consent walls
|
|
529
|
+
/\bcontinue reading with advertising\b|\b(?:with|mit) (?:advertising|werbung) (?:and|und) tracking\b/gi,
|
|
530
|
+
/\bconsent and continue\b/gi,
|
|
531
|
+
// preference centres are often in the page but hidden, so popup text only
|
|
532
|
+
{ pattern: /\bstore or retrieve information on your browser\b|\bstockées dans votre navigateur ou récupérées\b/gi, input: "popup" },
|
|
488
533
|
// it might be tempting to add the patterns below, but they cause too many false positives. Don't do it :)
|
|
489
534
|
// /cookies? settings/i,
|
|
490
535
|
// /cookies? preferences/i,
|
|
@@ -500,26 +545,32 @@
|
|
|
500
545
|
/consentement.{0,100}à.{0,100}tout.{0,100}moment/gi,
|
|
501
546
|
/votre.{0,100}consentement/gi,
|
|
502
547
|
/accepter.{0,100}tout/gi,
|
|
503
|
-
|
|
548
|
+
UTILISATION_DES_COOKIES,
|
|
504
549
|
/cookies.{0,100}ou.{0,100}technologies/gi,
|
|
505
|
-
|
|
550
|
+
ACCEPTEZ_UTILISATION,
|
|
506
551
|
/continuer sans accepter/gi,
|
|
507
552
|
/tout refuser/gi,
|
|
508
553
|
/(?:refuser|rejeter) tous les cookies/gi,
|
|
509
|
-
|
|
554
|
+
// not "je refuse d'…" in a headline
|
|
555
|
+
/je refuse(?! d['’e])/gi,
|
|
510
556
|
/refuser et continuer/gi,
|
|
511
557
|
/refuser les cookies/gi,
|
|
512
558
|
/seulement nécessaires/gi,
|
|
513
559
|
/je désactive les finalités non essentielles/gi,
|
|
514
560
|
/cookies essentiels uniquement/gi,
|
|
515
561
|
/nécessaires uniquement/gi,
|
|
562
|
+
/\b(?:stocker|stockons) et\/ou (?:accéder|accédons)\b/gi,
|
|
563
|
+
/\bnos partenaires demandent votre consentement\b/gi,
|
|
564
|
+
/\bconsentez à l.utilisation (?:de |des )?cookies\b|\bdépôt (?:de|des) cookies\b/gi,
|
|
565
|
+
/\bles cookies nous permettent\b|\bnos partenaires et nous(?:-mêmes)?\b/gi,
|
|
566
|
+
/\baccepter (?:&|et) fermer\b/gi,
|
|
516
567
|
// DE
|
|
517
568
|
/wir.{0,100}verwenden.{0,100}cookies/gi,
|
|
518
569
|
/wir.{0,100}und.{0,100}unsere.{0,100}partner/gi,
|
|
519
|
-
/zugriff
|
|
570
|
+
/zugriff auf informationen auf/gi,
|
|
520
571
|
/inhalte.{0,100}messung.{0,100}von.{0,100}werbeleistung.{0,100}und/gi,
|
|
521
572
|
/cookies.{0,100}und.{0,100}andere/gi,
|
|
522
|
-
|
|
573
|
+
VERWENDUNG_VON_COOKIES,
|
|
523
574
|
/wir.{0,100}nutzen.{0,100}cookies/gi,
|
|
524
575
|
/verwendet.{0,100}cookies/gi,
|
|
525
576
|
/sie.{0,100}können.{0,100}ihre.{0,100}auswahl/gi,
|
|
@@ -532,8 +583,20 @@
|
|
|
532
583
|
/nur funktionale cookies akzeptieren/gi,
|
|
533
584
|
/optionale ablehnen/gi,
|
|
534
585
|
/zustimmung verweigern/gi,
|
|
586
|
+
/\bspeichern und\/oder (?:zugreifen|abrufen)\b/gi,
|
|
587
|
+
/\bunsere partner bitten um ihre zustimmung\b/gi,
|
|
588
|
+
DE_COOKIE_VERB,
|
|
589
|
+
/\b(?:werden|wird) (?:\S+ ){0,3}cookies (?:verwendet|eingesetzt|gesetzt|genutzt)\b/gi,
|
|
590
|
+
/\bcookies? zum einsatz\b|\beinsatz von cookies\b/gi,
|
|
591
|
+
/\beinverstanden\b.{0,60}\bcookies\b|\bcookies\b.{0,80}\beinverstanden\b/gi,
|
|
592
|
+
/\b(?:alle|alles) (?:cookies |optionalen \S+ )?(?:akzeptieren|zulassen|erlauben|zustimmen)\b/gi,
|
|
593
|
+
/\bzustimmen und weiter\b|\bweiter,? ohne zu (?:akzeptieren|zustimmen)\b/gi,
|
|
594
|
+
/\b(?:einwilligung|zustimmung) (?:zu|zur|in die) (?:\S+ )?cookies\b|\bcookie-(?:zustimmung|einwilligung)\b/gi,
|
|
595
|
+
/\btracking-technologien\b/gi,
|
|
596
|
+
/\bakzeptier\w* (?:du |sie )?(?:die )?verwendung (?:\S+ )?cookies\b/gi,
|
|
597
|
+
/\bmit werbetracking weiterlesen\b|\bweiter mit werbung\b|\bcon tracking e annunci\b/gi,
|
|
535
598
|
// NL
|
|
536
|
-
|
|
599
|
+
GEBRUIK_VAN_COOKIES,
|
|
537
600
|
/(?:we|wij).{0,100}gebruiken.{0,100}cookies.{0,100}om/gi,
|
|
538
601
|
/cookies.{0,100}en.{0,100}vergelijkbare/gi,
|
|
539
602
|
/(?:alles|cookies).{0,100}(?:afwijzen|weigeren|verwerpen)/gi,
|
|
@@ -543,6 +606,13 @@
|
|
|
543
606
|
/doorgaan zonder (?:te accepteren|akkoord te gaan)/gi,
|
|
544
607
|
/alleen.{0,100}(?:optionele|functionele|functioneel|noodzakelijke|essentiële).{0,100}cookies/gi,
|
|
545
608
|
/wijs alles af/gi,
|
|
609
|
+
/\b(?:op te slaan en\/of te (?:raadplegen|openen|lezen)|opslaan en\/of (?:openen|raadplegen|lezen)|slaan informatie\b.{0,60}\bop en\/of)\b/gi,
|
|
610
|
+
/\bonze partners vragen om (?:jouw|uw|je) toestemming\b/gi,
|
|
611
|
+
/\bwij en onze (?:\d+ )?partners\b/gi,
|
|
612
|
+
/\b(?:gebruiken|gebruikt|plaatsen|plaatst)\b(?: \S+){0,3} cookies\b/gi,
|
|
613
|
+
/\baccepteer (?:alles|alle cookies)\b/gi,
|
|
614
|
+
// Dutch words only: "tracking cookies" and "marketing cookies" are also English prose and footer links
|
|
615
|
+
/\b(?:analytische|functionele|essentiële|noodzakelijke) cookies\b/gi,
|
|
546
616
|
// Spanish (ES)
|
|
547
617
|
/(si|al) contin[úu]a[sr]?( navegando)?.{0,100} cookie/gi,
|
|
548
618
|
/(usamos|utilizar?|utilizamos)( (tanto|las))?.{0,20}cookie/gi,
|
|
@@ -559,6 +629,15 @@
|
|
|
559
629
|
/nosotros y nuestros( \d+)? (socios|proveedores).{0,180} cookies/gi,
|
|
560
630
|
/recopilamos y almacenamos datos de usted y de su dispositivo/gi,
|
|
561
631
|
/utilizamos tecnolog[ií]as como las cookies/gi,
|
|
632
|
+
/\b(?:almacenar|almacenamos) y\/o (?:acceder|accedemos)\b/gi,
|
|
633
|
+
/\bnuestros socios solicitan su consentimiento\b/gi,
|
|
634
|
+
/\b(?:tanto nosotros como|nosotros y) nuestros (?:\d+ )?socios\b/gi,
|
|
635
|
+
/\b(?:aceptar|rechazar) todas\b|\bcontinuar sin aceptar\b|\bsolo las necesarias\b/gi,
|
|
636
|
+
/\bacept\w* (?:\S+ ){0,3}uso de (?:las )?cookies\b/gi,
|
|
637
|
+
/\bcookies (?:técnicas|analíticas|propias|de terceros|opcionales|necesarias)\b/gi,
|
|
638
|
+
/\blas cookies nos (?:ayudan|permiten)\b/gi,
|
|
639
|
+
/\b(?:instalamos|empleamos)\b(?: \S+){0,4} cookies\b/gi,
|
|
640
|
+
/\bacept(?:a|ar|as)? (?:el uso de |las )?(?:\S+ )?cookies\b|\bnecesitamos usar cookies\b/gi,
|
|
562
641
|
// Polish (PL)
|
|
563
642
|
// examples:
|
|
564
643
|
// wykorzystuje pliki cookie (uses cookies)
|
|
@@ -587,10 +666,11 @@
|
|
|
587
666
|
// Catalan (CA)
|
|
588
667
|
/cookies pròpies i de tercers/gi,
|
|
589
668
|
/utilitzem galetes/gi,
|
|
590
|
-
|
|
669
|
+
/únicament utilitza galetes pròpies amb finalitat tècnica\b/gi,
|
|
591
670
|
/este lloc web utilitza només cookies tècniques necessàries per al seu funcionament/gi,
|
|
592
671
|
/utilitza cookies tècniques,\s*de personalització i anàlisi/gi,
|
|
593
672
|
/utilitzem cookies i altres tecnologies/gi,
|
|
673
|
+
/\b(?:utilitz\w*|fa servir|fem servir|usem)\b(?: \S+){0,3} (?:cookies|galetes)\b/gi,
|
|
594
674
|
// Basque (EU)
|
|
595
675
|
/cookie propio eta hirugarrenenak helburu teknikoarekin erabiltzen ditu/gi,
|
|
596
676
|
/cookie propioak eta hirugarrenen cookieak erabiltzen ditugu/gi,
|
|
@@ -620,7 +700,18 @@
|
|
|
620
700
|
/(?:usiamo|utilizziamo).{0,20}cookie/gi,
|
|
621
701
|
/sito.{0,50}(?:usa|utilizza).{0,20}cookie/gi,
|
|
622
702
|
/noi e i nostri.{0,20}partner.{0,100}cookie/gi,
|
|
623
|
-
|
|
703
|
+
/\b(?:utilizziamo|usiamo|impieghiamo|installiamo)\b(?: \S+){0,3} cookies?\b/gi,
|
|
704
|
+
/\b(?:utilizza|utilizzano|usa|usano|impiega|installa|fa uso di)\b(?: \S+){0,3} cookies?\b/gi,
|
|
705
|
+
/\bcookies? (?:tecnici|di profilazione|di terze parti|analitici|statistici|di marketing)\b/gi,
|
|
706
|
+
/\b(?:acconsent|accett)\w*\b.{0,40}\b(?:uso|utilizzo|installazione)\b.{0,15}\bcookies?\b/gi,
|
|
707
|
+
/\b(?:continuando|proseguendo)(?: la| nella)? navigazione\b.{0,80}\b(?:accett|acconsent)\w*/gi,
|
|
708
|
+
/\b(?:accetta|accetto|accettare|rifiuta|rifiuto|rifiutare)(?: tutti| tutto)\b/gi,
|
|
709
|
+
/\b(?:continua|prosegui|chiudi) senza accettare\b/gi,
|
|
710
|
+
/\brifiuta e abbonati\b/gi,
|
|
711
|
+
/\bconsenso (?:all.(?:uso|utilizzo) (?:dei |di )?)?cookies?\b/gi,
|
|
712
|
+
/\b(?:insieme ai|con i) nostri (?:\d+ )?partner\b/gi,
|
|
713
|
+
/\bterze parti selezionate\b/gi,
|
|
714
|
+
/\b(?:archiviare|archiviamo|memorizzare|memorizziamo) e\/o (?:accedere|accediamo)\b/gi,
|
|
624
715
|
// Swedish (SV)
|
|
625
716
|
// e.g. "vi använder cookies", "vi använder spårningstekniker såsom cookies", "webbplatsen använder kakor"
|
|
626
717
|
/(?:vi|webbplatsen|webbplats|sajten|sidan)\s+använder.{0,60}(?:cookies|kakor)/gi,
|
|
@@ -875,26 +966,12 @@
|
|
|
875
966
|
// Russian (RU): paywall/subscription wording, e.g. "отказаться от подписки", "оплатить"
|
|
876
967
|
/подписатьс|подписк|оплатит|оплачива/is
|
|
877
968
|
];
|
|
878
|
-
var DETECT_NEVER_MATCH_PATTERNS = [
|
|
879
|
-
// e.g. "age verification", "age confirmation", "age check", "age gate", "age restriction"
|
|
880
|
-
/age\s+(?:verification|confirmation|check|gate|restriction)/i,
|
|
881
|
-
// e.g. "over 18 years", "at least 21 years", "older than 21", "18+"
|
|
882
|
-
/(?:over|above|at\s*least|minimum|older\s+than)\s*(?:18|21)\s*(?:years|yo|y\.?o\.?|\+)?/i,
|
|
883
|
-
// e.g. "18 years of age", "18+ years old", "21 years or older"
|
|
884
|
-
/(?:18|21)\s*(?:\+|years?)\s*(?:of\s*age|or\s*older|or\s*above)/i,
|
|
885
|
-
// e.g. "I am 18+", "I am over 18", "I'm 21 or older"
|
|
886
|
-
/(?:i'?m|i\s*am)\s*(?:over|above|at\s*least)?\s*(?:18|21)(?:\+|\s*(?:or\s*older|years))?/i,
|
|
887
|
-
// e.g. "you must be 18", "users must be at least 21", "visitors must be over 18"
|
|
888
|
-
/(?:you|users?|visitors?)\s+must\s+be\s+(?:over|above|at\s*least)?\s*(?:18|21)/i,
|
|
889
|
-
// e.g. "adult oriented material", "adult content", "adult-only website"
|
|
890
|
-
/adult[\s-]+(?:oriented|only|content|material|websites?)/i
|
|
891
|
-
];
|
|
892
969
|
var SETTINGS_PATTERNS = [
|
|
893
970
|
// Multilingual "open customization" patterns: a customization verb next to a
|
|
894
971
|
// cookie/preference/settings/options/details/purposes noun (both word orders).
|
|
895
972
|
// The negative lookahead avoids policy links and save/confirm/accept phrases (those are accept/acknowledge/other).
|
|
896
|
-
/^(?!.*\b(policy|policies|notice|statement|impressum|\w*richtlinie\w*|\w*erklärung|page|beschrijving|privacy$|beleid|politique|política|polityk|speichern|guardar|opslaan|zapisz|enregistrer|sauvegarder|bevestig|bestätig|confirm|save|submit|akzeptier|accept|zaakcept)\b)(customi[sz]e|manage|adjust|configure|personali[sz]e|let me choose|edit|change|set|select|view|see|review|update|open|show|choose|anpassen|verwalten|konfigurieren|bearbeiten|öffnen|anzeigen|einblenden|einstellen|festlegen|auswählen|wählen|aanpassen|beheren|instellen|wijzig\w*|personaliseren|personaliseer|kies|bekijk|toon|personnaliser|paramétrer|gérer|configurer|choisir|afficher|définir|modifier|configurar|personalizar|gestionar|administrar|ajustar|seleccionar|modificar|establecer|dostosuj|zarządzaj|personalizuj|ustaw\w*|zmień|pokaż|wybierz)
|
|
897
|
-
/^(?!.*\b(policy|policies|notice|statement|impressum|\w*richtlinie\w*|\w*erklärung|page|beschrijving|privacy$|beleid|politique|política|polityk|speichern|guardar|opslaan|zapisz|enregistrer|sauvegarder|bevestig|bestätig|confirm|save|submit|akzeptier|accept|zaakcept)\b)(cookies?|preferences?|settings?|options?|choices?|controls?|details?|purposes?|services?|consent|einstellung\w*|optionen|präferenzen|einzelheiten|zwecke|dienste|datenschutz\w*|auswahl|voorkeur\w*|instelling\w*|opties|diensten|préférences|paramètres|réglages|choix|détails|finalités|témoins|preferencia\w*|opciones|ajustes|configuraci\w*|detalles|servicios|elección|preferencj\w*|ustawie\w*|opcje|szczegół\w*|cele|galetes)\b(.{0,14}\W)?(customi[sz]e|manage|adjust|configure|personali[sz]e|let me choose|edit|change|set|select|view|see|review|update|open|show|choose|anpassen|verwalten|konfigurieren|bearbeiten|öffnen|anzeigen|einblenden|einstellen|festlegen|auswählen|wählen|aanpassen|beheren|instellen|wijzig\w*|personaliseren|personaliseer|kies|bekijk|toon|personnaliser|paramétrer|gérer|configurer|choisir|afficher|définir|modifier|configurar|personalizar|gestionar|administrar|ajustar|seleccionar|modificar|establecer|dostosuj|zarządzaj|personalizuj|ustaw\w*|zmień|pokaż|wybierz)
|
|
973
|
+
/^(?!.*\b(policy|policies|notice|statement|impressum|\w*richtlinie\w*|\w*erklärung|page|beschrijving|privacy$|beleid|politique|política|polityk|speichern|guardar|opslaan|zapisz|enregistrer|sauvegarder|bevestig|bestätig|confirm|save|submit|akzeptier|accept|zaakcept)\b)(customi[sz]e|manage|adjust|configure|personali[sz]e|let me choose|edit|change|set|select|view|see|review|update|open|show|choose|anpassen|verwalten|konfigurieren|bearbeiten|öffnen|anzeigen|einblenden|einstellen|festlegen|auswählen|wählen|aanpassen|beheren|instellen|wijzig\w*|personaliseren|personaliseer|kies|bekijk|toon|personnaliser|paramétrer|gérer|configurer|choisir|afficher|définir|modifier|configurar|personalizar|gestionar|administrar|ajustar|seleccionar|modificar|establecer|dostosuj|zarządzaj|personalizuj|ustaw\w*|zmień|pokaż|wybierz)(?!\w).{0,20}(cookies?|preferences?|settings?|options?|choices?|controls?|details?|purposes?|services?|consent|einstellung\w*|optionen|präferenzen|einzelheiten|zwecke|dienste|datenschutz\w*|auswahl|voorkeur\w*|instelling\w*|opties|diensten|préférences|paramètres|réglages|choix|détails|finalités|témoins|preferencia\w*|opciones|ajustes|configuraci\w*|detalles|servicios|elección|preferencj\w*|ustawie\w*|opcje|szczegół\w*|cele|galetes)\b/is,
|
|
974
|
+
/^(?!.*\b(policy|policies|notice|statement|impressum|\w*richtlinie\w*|\w*erklärung|page|beschrijving|privacy$|beleid|politique|política|polityk|speichern|guardar|opslaan|zapisz|enregistrer|sauvegarder|bevestig|bestätig|confirm|save|submit|akzeptier|accept|zaakcept)\b)(cookies?|preferences?|settings?|options?|choices?|controls?|details?|purposes?|services?|consent|einstellung\w*|optionen|präferenzen|einzelheiten|zwecke|dienste|datenschutz\w*|auswahl|voorkeur\w*|instelling\w*|opties|diensten|préférences|paramètres|réglages|choix|détails|finalités|témoins|preferencia\w*|opciones|ajustes|configuraci\w*|detalles|servicios|elección|preferencj\w*|ustawie\w*|opcje|szczegół\w*|cele|galetes)\b(.{0,14}\W)?(customi[sz]e|manage|adjust|configure|personali[sz]e|let me choose|edit|change|set|select|view|see|review|update|open|show|choose|anpassen|verwalten|konfigurieren|bearbeiten|öffnen|anzeigen|einblenden|einstellen|festlegen|auswählen|wählen|aanpassen|beheren|instellen|wijzig\w*|personaliseren|personaliseer|kies|bekijk|toon|personnaliser|paramétrer|gérer|configurer|choisir|afficher|définir|modifier|configurar|personalizar|gestionar|administrar|ajustar|seleccionar|modificar|establecer|dostosuj|zarządzaj|personalizuj|ustaw\w*|zmień|pokaż|wybierz)(?!\w)/is,
|
|
898
975
|
// settings noun + cookies, e.g. "paramètres des cookies", "ajustes de cookies", "instellingen voor cookies en diensten"
|
|
899
976
|
/^(paramètres|préférences|réglages|ajustes|opciones|elección|preferencias|instellingen)( (de|des|les|voor|van))? cookies( (et des|en|y) (services|diensten|servicios))?$/is,
|
|
900
977
|
"settings",
|
|
@@ -1250,41 +1327,518 @@
|
|
|
1250
1327
|
"\u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C"
|
|
1251
1328
|
];
|
|
1252
1329
|
|
|
1253
|
-
// lib/heuristic-
|
|
1330
|
+
// lib/heuristic-negatives.ts
|
|
1331
|
+
var COOKIE_CHOICE = [
|
|
1332
|
+
"\\b(?:accept|reject|decline|refuse|deny|allow|manage|customi[sz]e)\\b[^\\n]{0,25}\\bcookies?\\b",
|
|
1333
|
+
"\\b(?:reject|decline|deny|refuse) all\\b",
|
|
1334
|
+
"\\b(?:essential|necessary|required) (?:cookies )?only\\b|\\bonly (?:essential|necessary|required)\\b",
|
|
1335
|
+
"\\bcookies? (?:notice|settings|preferences|banner)\\b",
|
|
1336
|
+
"\\b(?:alle )?(?:cookies )?ablehnen\\b",
|
|
1337
|
+
"\\b(?:alles |alle cookies )?(?:weigeren|weiger|afwijzen)\\b",
|
|
1338
|
+
"\\b(?:tout )?refuser\\b",
|
|
1339
|
+
"\\brechazar(?: todas?)?\\b",
|
|
1340
|
+
"\\brifiuta(?: tutti)?\\b",
|
|
1341
|
+
// purposes and vendors as a button or heading line: some consent dialogs ask "under 18?"
|
|
1342
|
+
"^[^\\n]{0,40}\\b(?:purposes|finalit\xE9s|prop\xF3sitos|zwecke|doeleinden|finalit\xE0|vendors|fournisseurs|proveedores|leveranciers|fornitori)(?!\\w)[^\\n]{0,10}$",
|
|
1343
|
+
"\\b(?:legitimate (?:business )?interest|int\xE9r\xEAt l\xE9gitime|inter\xE9s leg\xEDtimo|berechtigtes interesse|gerechtvaardigd belang|legittimo interesse)\\b",
|
|
1344
|
+
"\\b(?:we|nous|wir|wij|noi|nosotros) (?:and|et|und|en|e|y) (?:our|nos|unsere|onze|i nostri|nuestros) (?:\\d+ )?(?:partners|partenaires|partner|socios)\\b"
|
|
1345
|
+
].join("|");
|
|
1346
|
+
var BARE_ACCEPT = [
|
|
1347
|
+
"\\b(?:accept|allow) all\\b",
|
|
1348
|
+
"\\b(?:alle )?(?:cookies )?(?:akzeptieren|erlauben|zulassen)\\b",
|
|
1349
|
+
"\\b(?:alles |alle cookies )?(?:accepteren|accepteer|toestaan)\\b",
|
|
1350
|
+
"\\b(?:tout )?accepter\\b",
|
|
1351
|
+
"\\baceptar(?: todas?)?\\b",
|
|
1352
|
+
"\\baccetta(?: tutti)?\\b"
|
|
1353
|
+
].join("|");
|
|
1354
|
+
var COOKIE_CHOICE_RE = new RegExp(COOKIE_CHOICE, "im");
|
|
1355
|
+
var CONSENT_CHOICE = new RegExp(`${COOKIE_CHOICE}|${BARE_ACCEPT}`, "im");
|
|
1356
|
+
var AGE_WORDING = new RegExp(
|
|
1357
|
+
[
|
|
1358
|
+
"\\b(?:over|above|at least|older than|minimum(?: age of)?)\\s*(?:18|21|eighteen)\\b",
|
|
1359
|
+
// "18+" only with age words after it: a bare "18+" also appears in cookie banners on adult sites
|
|
1360
|
+
"\\b(?:18|21)\\+?\\s*(?:years?(?: of age| old)?|yo|or older|or over)\\b",
|
|
1361
|
+
"\\b(?:you|users?|visitors?) must be (?:over |above |at least )?(?:18|21)\\b",
|
|
1362
|
+
"\\b(?:i'?m|i am) (?:over |at least )?(?:18|21)\\b",
|
|
1363
|
+
"\\bage (?:verification|confirmation|check|gate|restriction)\\b",
|
|
1364
|
+
"\\b(?:adults? only|adult[\\s-](?:oriented|content|material|website)|legal age|age of majority|not a minor|minors)\\b",
|
|
1365
|
+
"\\b(?:18|21) jahre\\b",
|
|
1366
|
+
"\\balters(?:beschr\xE4nkung|best\xE4tigung|verifikation|pr\xFCfung|kontrolle)",
|
|
1367
|
+
"\\b(?:vollj\xE4hrig|f\xFCr erwachsene|minderj\xE4hrige)\\b",
|
|
1368
|
+
"\\b(?:18|21) jaar\\b",
|
|
1369
|
+
"\\b(?:volwassenen|meerderjarig|minderjarigen|leeftijdsverificatie)\\b",
|
|
1370
|
+
"\\b(?:18|21) ans\\b",
|
|
1371
|
+
// no \\b before an accented letter: without the u flag it is not a word character
|
|
1372
|
+
"\\b(?:pour adultes|v\xE9rification de l.\xE2ge|mineurs)\\b|\xE2ge l\xE9gal\\b",
|
|
1373
|
+
"\\b(?:18|21) a\xF1os\\b",
|
|
1374
|
+
"\\b(?:mayor(?:es)? de edad|menores de edad|para adultos|verificaci\xF3n de edad)\\b",
|
|
1375
|
+
"\\b(?:18|21) anni\\b",
|
|
1376
|
+
"\\b(?:maggiorenne|minorenni|per adulti)\\b|\\bverifica dell.et\xE0(?!\\w)"
|
|
1377
|
+
].join("|"),
|
|
1378
|
+
"i"
|
|
1379
|
+
);
|
|
1380
|
+
var DISMISS_LINE = /^\s*(?:(?:yes,? )?(?:i )?(?:ok(?:ay)?|accept|agree|allow|decline|deny|reject|refuse|understand|acknowledge(?: the use of cookies)?|got it|understood)(?: all)?(?:,? (?:and|&) (?:continue|close))?(?: non-essential)?|close|dismiss|akzeptieren|zustimmen|verstanden|einverstanden|ablehnen|accepteren|akkoord|weigeren|accepter|j.accepte|d.accord|refuser|fermer|aceptar|acepto|rechazar|entendido|accetto|accetta|rifiuta|ho capito|chiudi)\s*[!.]?\s*$/im;
|
|
1381
|
+
var DISMISS_END = /[.!?]\s+(?:ok(?:ay)?|got it|i agree|accept)\s*!?\s*$|\[\s*[x×]\s*\]|^\s*[x×✕]\s*$/im;
|
|
1382
|
+
var NOTICE_CONTROL = new RegExp(`${CONSENT_CHOICE.source}|${DISMISS_LINE.source}|${DISMISS_END.source}`, "im");
|
|
1383
|
+
var LEAVE_LINE = /^\s*(?:(?:no,? )?(?:i )?(?:want to )?(?:leave|exit|verlassen|quitter|sortir|salir|abandonar|esci|uscire|verlaten)\b[^\n]{0,30}|no,? take me away|(?:seite|hier) verlassen|(?:i am|i'm|ich bin|ik ben|je suis|soy|sono) (?:under|unter|onder|jonger dan|menor de(?: edad)?|minorenne|mineur)\b[^\n]{0,10})\s*[!.]?\s*$/im;
|
|
1384
|
+
var NOTICE_OWN_CONTROL = new RegExp(
|
|
1385
|
+
[
|
|
1386
|
+
"\\bcookies? verwalten\\b|\\bcookie-?(?:einstellungen|pr\xE4ferenzen)\\b|\\beinstellungen verwalten\\b",
|
|
1387
|
+
"\\bconfigura(?:r|ci\xF3n de)(?: las)? cookies\\b|\\bgestionar(?: las)? cookies\\b|\\bpersonalizar(?: las)? cookies\\b",
|
|
1388
|
+
"\\bparam[\xE9e]trer(?: les)? cookies\\b|\\bparam[\xE8e]tres(?: des)? cookies\\b|\\bg[\xE9e]rer(?: les)? cookies\\b|\\bpersonnaliser(?: les)? cookies\\b",
|
|
1389
|
+
"\\bgestisci(?: i)? cookie|\\bimpostazioni(?: dei| sui)? cookie|\\bpersonalizza(?: i)? cookie",
|
|
1390
|
+
"\\bcookie-?instellingen\\b|\\bcookies? beheren\\b|\\bvoorkeuren (?:beheren|aanpassen)\\b",
|
|
1391
|
+
"^\\s*(?:customi[sz]e|personnaliser|param\xE9trer|personalizar|configurar|personalizza|anpassen|aanpassen|meer opties|more options|weitere optionen|plus d.options|m\xE1s opciones|altre opzioni|manage (?:options|preferences|choices))\\s*$",
|
|
1392
|
+
"^\\s*close (?:this|the) (?:popup|banner|notice|message)\\s*$"
|
|
1393
|
+
].join("|"),
|
|
1394
|
+
"im"
|
|
1395
|
+
);
|
|
1396
|
+
var ageGateUnless = (control) => (text) => !LEAVE_LINE.test(text) && (control.test(text) || NOTICE_OWN_CONTROL.test(text));
|
|
1397
|
+
var CONSENT_WORDS = /cookie|consent|track|partner|personali[sz]|advertis|analytic|privacy (?:options|choices|settings|rights)|do not sell|opt[- ]out/i;
|
|
1398
|
+
var LEGAL_AGREEMENT = /\b(?:end[- ]user licen[cs]e agreement|licen[cs]e agreement|limitation of liability|governing law|indemnif\w*|hereunder|disclaimers? of warrant\w*|warrant(?:y|ies) of merchantability)\b/i;
|
|
1399
|
+
var DETECT_CONTEXT_NEGATIVES = [
|
|
1400
|
+
// popups with their own age confirmation are age gates, even when they mention cookies; a bare accept doesn't count
|
|
1401
|
+
// as a cookie choice here, since it may confirm the age
|
|
1402
|
+
{ name: "age-gate-popup", pattern: AGE_WORDING, unless: ageGateUnless(COOKIE_CHOICE_RE), whole: true, input: "popup" },
|
|
1403
|
+
// a license or terms agreement may mention cookies, and its decline button must not be clicked as a cookie reject
|
|
1404
|
+
{ name: "legal-agreement", pattern: LEGAL_AGREEMENT, whole: true, input: "popup" },
|
|
1405
|
+
// page text next to an age gate, unless a consent control is there too
|
|
1406
|
+
{ name: "age-gate", pattern: AGE_WORDING, unless: ageGateUnless(NOTICE_CONTROL), lines: [4, 5], input: "page" },
|
|
1407
|
+
// terms of use need cookie or consent wording; a privacy-policy-only notice needs that or a button
|
|
1408
|
+
{
|
|
1409
|
+
name: "terms-without-consent",
|
|
1410
|
+
pattern: /\bterms\b|\bconditions\b/i,
|
|
1411
|
+
unless: CONSENT_WORDS,
|
|
1412
|
+
appliesTo: [BY_CONTINUING_PRIVACY]
|
|
1413
|
+
},
|
|
1414
|
+
{
|
|
1415
|
+
name: "privacy-without-control",
|
|
1416
|
+
unless: new RegExp(`${CONSENT_WORDS.source}|${DISMISS_LINE.source}`, "im"),
|
|
1417
|
+
appliesTo: [BY_CONTINUING_PRIVACY]
|
|
1418
|
+
},
|
|
1419
|
+
// a cookie policy link among short footer link lines
|
|
1420
|
+
{
|
|
1421
|
+
name: "footer-link",
|
|
1422
|
+
pattern: /^[^.!?:\n]{0,60}\n[\s]*\n?[^.!?:\s][^.!?:\n]{0,59}(?:\n|$)/,
|
|
1423
|
+
unless: NOTICE_CONTROL,
|
|
1424
|
+
lines: [0, 2],
|
|
1425
|
+
input: "page",
|
|
1426
|
+
appliesTo: [USE_OF_COOKIES, VERWENDUNG_VON_COOKIES, UTILISATION_DES_COOKIES, GEBRUIK_VAN_COOKIES]
|
|
1427
|
+
},
|
|
1428
|
+
// "accept all" in prose; case-sensitive since button labels run together in innerText
|
|
1429
|
+
{
|
|
1430
|
+
name: "accept-all-prose",
|
|
1431
|
+
pattern: /\baccept all [a-z]|\baccept All[a-z]/,
|
|
1432
|
+
unless: /accept all (?:cookies|and|&)/i,
|
|
1433
|
+
window: 15,
|
|
1434
|
+
appliesTo: [ACCEPT_ALL]
|
|
1435
|
+
},
|
|
1436
|
+
{
|
|
1437
|
+
name: "acceptez-terms",
|
|
1438
|
+
pattern: /conditions (?:générales )?d.utilisation|\bcgu\b/i,
|
|
1439
|
+
unless: /cookie|témoin|traceur|partenaire/i,
|
|
1440
|
+
appliesTo: [ACCEPTEZ_UTILISATION]
|
|
1441
|
+
},
|
|
1442
|
+
// the same sentence is also a footer line with only a "learn more" link
|
|
1443
|
+
{ name: "de-cookie-verb-needs-control", unless: NOTICE_CONTROL, lines: [1, 6], input: "page", appliesTo: [DE_COOKIE_VERB] }
|
|
1444
|
+
];
|
|
1445
|
+
|
|
1446
|
+
// lib/heuristic-literals.ts
|
|
1447
|
+
var DETECT_PATTERN_LITERALS = [
|
|
1448
|
+
["accept cookies"],
|
|
1449
|
+
["accept all"],
|
|
1450
|
+
["reject all"],
|
|
1451
|
+
["only necessary cookies"],
|
|
1452
|
+
[],
|
|
1453
|
+
[],
|
|
1454
|
+
[" cookies"],
|
|
1455
|
+
["we are using cookies"],
|
|
1456
|
+
["use of cookies"],
|
|
1457
|
+
["website uses cookies to enhance your browsing experience"],
|
|
1458
|
+
["cookies"],
|
|
1459
|
+
[" technologies"],
|
|
1460
|
+
["such as cookies"],
|
|
1461
|
+
["read more about"],
|
|
1462
|
+
["consent to"],
|
|
1463
|
+
["we and our partners"],
|
|
1464
|
+
["information"],
|
|
1465
|
+
["store and/or access information"],
|
|
1466
|
+
["personalised ads and content, ad and content measurement"],
|
|
1467
|
+
[" and/or access"],
|
|
1468
|
+
["and our partners ask for your consent"],
|
|
1469
|
+
["we and "],
|
|
1470
|
+
["partners", "partnern", "partner", "partenaires", "socios", "vendors", "fornitori"],
|
|
1471
|
+
["partner"],
|
|
1472
|
+
["technolog"],
|
|
1473
|
+
["cookies"],
|
|
1474
|
+
["cookies"],
|
|
1475
|
+
["optional", "additional", "non-essential"],
|
|
1476
|
+
["storing of cookies", "placed cookies"],
|
|
1477
|
+
[" on your device", "access and store "],
|
|
1478
|
+
["we use "],
|
|
1479
|
+
["out of "],
|
|
1480
|
+
["out of the sale"],
|
|
1481
|
+
["this website or its third"],
|
|
1482
|
+
["information"],
|
|
1483
|
+
["rights with regard to the sale"],
|
|
1484
|
+
["we use technologies "],
|
|
1485
|
+
["continue reading with advertising", " tracking"],
|
|
1486
|
+
["consent and continue"],
|
|
1487
|
+
["store or retrieve information on your browser", "stock\xE9es dans votre navigateur ou r\xE9cup\xE9r\xE9es"],
|
|
1488
|
+
["utilisons"],
|
|
1489
|
+
["cookies"],
|
|
1490
|
+
["consentement"],
|
|
1491
|
+
["partenaires"],
|
|
1492
|
+
["publicit\xE9s"],
|
|
1493
|
+
["utilise"],
|
|
1494
|
+
["utilisent"],
|
|
1495
|
+
["stocker"],
|
|
1496
|
+
["consentement"],
|
|
1497
|
+
["consentement"],
|
|
1498
|
+
["accepter"],
|
|
1499
|
+
["utilisation"],
|
|
1500
|
+
["technologies"],
|
|
1501
|
+
["utilisation"],
|
|
1502
|
+
["continuer sans accepter"],
|
|
1503
|
+
["tout refuser"],
|
|
1504
|
+
[" tous les cookies"],
|
|
1505
|
+
["je refuse"],
|
|
1506
|
+
["refuser et continuer"],
|
|
1507
|
+
["refuser les cookies"],
|
|
1508
|
+
["seulement n\xE9cessaires"],
|
|
1509
|
+
["je d\xE9sactive les finalit\xE9s non essentielles"],
|
|
1510
|
+
["cookies essentiels uniquement"],
|
|
1511
|
+
["n\xE9cessaires uniquement"],
|
|
1512
|
+
["stocker", "stockons"],
|
|
1513
|
+
["nos partenaires demandent votre consentement"],
|
|
1514
|
+
["consentez \xE0 l", " cookies"],
|
|
1515
|
+
["les cookies nous permettent", "nos partenaires et nous"],
|
|
1516
|
+
["accepter "],
|
|
1517
|
+
["verwenden"],
|
|
1518
|
+
["partner"],
|
|
1519
|
+
["zugriff auf informationen auf"],
|
|
1520
|
+
["werbeleistung"],
|
|
1521
|
+
["cookies"],
|
|
1522
|
+
["verwendung"],
|
|
1523
|
+
["cookies"],
|
|
1524
|
+
["verwendet"],
|
|
1525
|
+
["auswahl"],
|
|
1526
|
+
["technologien"],
|
|
1527
|
+
["verwenden"],
|
|
1528
|
+
["ablehnen"],
|
|
1529
|
+
["zus\xE4tzliche", "essenzielle", "funktionale", "notwendige", "erforderliche"],
|
|
1530
|
+
["einwilligung", "zustimmung", "cookies"],
|
|
1531
|
+
["ablehnen"],
|
|
1532
|
+
["nur funktionale cookies akzeptieren"],
|
|
1533
|
+
["optionale ablehnen"],
|
|
1534
|
+
["zustimmung verweigern"],
|
|
1535
|
+
["speichern und/oder "],
|
|
1536
|
+
["unsere partner bitten um ihre zustimmung"],
|
|
1537
|
+
[" cookies"],
|
|
1538
|
+
["cookies "],
|
|
1539
|
+
[" zum einsatz", "einsatz von cookies"],
|
|
1540
|
+
["einverstanden", "einverstanden"],
|
|
1541
|
+
["akzeptieren", "zulassen", "erlauben", "zustimmen"],
|
|
1542
|
+
["zustimmen und weiter", " ohne zu "],
|
|
1543
|
+
["einwilligung", "zustimmung", "zustimmung", "einwilligung"],
|
|
1544
|
+
["tracking-technologien"],
|
|
1545
|
+
["verwendung "],
|
|
1546
|
+
["mit werbetracking weiterlesen", "weiter mit werbung", "con tracking e annunci"],
|
|
1547
|
+
["gebruik"],
|
|
1548
|
+
["gebruiken"],
|
|
1549
|
+
["vergelijkbare"],
|
|
1550
|
+
["afwijzen", "weigeren", "verwerpen"],
|
|
1551
|
+
["noodzakelijk"],
|
|
1552
|
+
["cookies weigeren"],
|
|
1553
|
+
["weiger"],
|
|
1554
|
+
["doorgaan zonder "],
|
|
1555
|
+
["optionele", "functionele", "functioneel", "noodzakelijke", "essenti\xEBle"],
|
|
1556
|
+
["wijs alles af"],
|
|
1557
|
+
[],
|
|
1558
|
+
["onze partners vragen om "],
|
|
1559
|
+
["wij en onze "],
|
|
1560
|
+
[" cookies"],
|
|
1561
|
+
["accepteer "],
|
|
1562
|
+
["analytische", "functionele", "essenti\xEBle", "noodzakelijke"],
|
|
1563
|
+
[" contin"],
|
|
1564
|
+
["cookie"],
|
|
1565
|
+
[" uso de cookies"],
|
|
1566
|
+
["usa cookies de google"],
|
|
1567
|
+
[" uso de cookies"],
|
|
1568
|
+
["al utilizar nuestro sitio web"],
|
|
1569
|
+
["almacenar la informaci\xF3n en un dispositivo y"],
|
|
1570
|
+
[" utiliza"],
|
|
1571
|
+
["cookies propias y de"],
|
|
1572
|
+
["son necesarias"],
|
|
1573
|
+
[" cookie"],
|
|
1574
|
+
["navegando"],
|
|
1575
|
+
["nosotros y nuestros"],
|
|
1576
|
+
["recopilamos y almacenamos datos de usted y de su dispositivo"],
|
|
1577
|
+
["utilizamos tecnolog"],
|
|
1578
|
+
["almacenar", "almacenamos"],
|
|
1579
|
+
["nuestros socios solicitan su consentimiento"],
|
|
1580
|
+
["tanto nosotros como", "nosotros y"],
|
|
1581
|
+
["aceptar", "rechazar", "continuar sin aceptar", "solo las necesarias"],
|
|
1582
|
+
["uso de "],
|
|
1583
|
+
["cookies "],
|
|
1584
|
+
["las cookies nos "],
|
|
1585
|
+
["instalamos", "empleamos"],
|
|
1586
|
+
["cookies", "necesitamos usar cookies"],
|
|
1587
|
+
[" cookie"],
|
|
1588
|
+
["u\u017Cywa\u0107", "u\u017Cywamy"],
|
|
1589
|
+
["cele przetwarzania twoich danych przez zaufanych partner\xF3w iab"],
|
|
1590
|
+
["dzi\u0119ki "],
|
|
1591
|
+
[" plik\xF3w cookie"],
|
|
1592
|
+
["korzystamy z technologii, takich jak pliki cookie"],
|
|
1593
|
+
["korzystamy"],
|
|
1594
|
+
["niekt\xF3re pliki cookies"],
|
|
1595
|
+
["pliki cookies i pokrewne im technologie umo\u017Cliwiaj\u0105 poprawne dzia\u0142anie strony i pomagaj\u0105 nam dostosowa\u0107 ofert\u0119 do twoich potrzeb"],
|
|
1596
|
+
["przechowywanie informacji na urz\u0105dzeniu lub dost\u0119p do nich"],
|
|
1597
|
+
["przechowywanie plik\xF3w cookie na swoim urz\u0105dzeniu"],
|
|
1598
|
+
["przechowywa\u0107 i uzyskiwa\u0107 dost\u0119p do informacji na twoich urz\u0105dzeniach"],
|
|
1599
|
+
["przetwarzamy"],
|
|
1600
|
+
[" u\u017Cywa "],
|
|
1601
|
+
["ta strona korzysta z ciasteczek"],
|
|
1602
|
+
["uzyskujemy dost\u0119p i przechowujemy informacje na urz\u0105dzeniu"],
|
|
1603
|
+
["u\u017Cywa plik"],
|
|
1604
|
+
["u\u017Cywamy plik\xF3w"],
|
|
1605
|
+
["wykorzystuj\u0105 "],
|
|
1606
|
+
["za pomoc\u0105 plik\xF3w cookies"],
|
|
1607
|
+
["zgod\u0105 my i nasi partnerzy mo\u017Cemy wykorzystywa\u0107 precyzyjne dane geolokalizacyjne i identyfikacj\u0119"],
|
|
1608
|
+
["cookies pr\xF2pies i de tercers"],
|
|
1609
|
+
["utilitzem galetes"],
|
|
1610
|
+
["\xFAnicament utilitza galetes pr\xF2pies amb finalitat t\xE8cnica"],
|
|
1611
|
+
["este lloc web utilitza nom\xE9s cookies t\xE8cniques necess\xE0ries per al seu funcionament"],
|
|
1612
|
+
["de personalitzaci\xF3 i an\xE0lisi"],
|
|
1613
|
+
["utilitzem cookies i altres tecnologies"],
|
|
1614
|
+
["cookies", "galetes"],
|
|
1615
|
+
["cookie propio eta hirugarrenenak helburu teknikoarekin erabiltzen ditu"],
|
|
1616
|
+
["cookie propioak eta hirugarrenen cookieak erabiltzen ditugu"],
|
|
1617
|
+
["cookie propioak eta hirugarrenenak helburu teknikoarekin erabiltzen ditu"],
|
|
1618
|
+
["ak erabiltzen ditu"],
|
|
1619
|
+
["cookieak erabiltzen ditu"],
|
|
1620
|
+
[" bazkideek cookieak eta identifikadoreak erabiltzen ditugu"],
|
|
1621
|
+
["norberaren eta hirugarrenen cookie"],
|
|
1622
|
+
["web orri honek cookieak erabiltzen ditu"],
|
|
1623
|
+
["webgune honek cookie propioak eta hirugarrenen cookie-fitxategiak erabiltzen ditu"],
|
|
1624
|
+
["empregamos cookies propias"],
|
|
1625
|
+
["este portal emprega cookies propias ou de terceiros con fins anal\xEDticos"],
|
|
1626
|
+
["\u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443"],
|
|
1627
|
+
["\u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443"],
|
|
1628
|
+
["cookie", "\u043A\u0443\u043A\u0438"],
|
|
1629
|
+
["\u0442\u0435\u0445\u043D\u043E\u043B\u043E\u0433\u0438"],
|
|
1630
|
+
["cookie", "\u043A\u0443\u043A\u0438"],
|
|
1631
|
+
[],
|
|
1632
|
+
["usiamo", "utilizziamo"],
|
|
1633
|
+
["cookie"],
|
|
1634
|
+
["noi e i nostri"],
|
|
1635
|
+
[" cookie"],
|
|
1636
|
+
[" cookie"],
|
|
1637
|
+
["tecnici", "di profilazione", "di terze parti", "analitici", "statistici", "di marketing"],
|
|
1638
|
+
["acconsent", "accett"],
|
|
1639
|
+
[" navigazione"],
|
|
1640
|
+
["accetta", "accetto", "accettare", "rifiuta", "rifiuto", "rifiutare"],
|
|
1641
|
+
[" senza accettare"],
|
|
1642
|
+
["rifiuta e abbonati"],
|
|
1643
|
+
["consenso "],
|
|
1644
|
+
[" nostri "],
|
|
1645
|
+
["terze parti selezionate"],
|
|
1646
|
+
["archiviare", "archiviamo", "memorizzare", "memorizziamo"],
|
|
1647
|
+
["anv\xE4nder"],
|
|
1648
|
+
["cookie", "\u30AF\u30C3\u30AD\u30FC"],
|
|
1649
|
+
["bruger cookies"],
|
|
1650
|
+
["informasjonskapsler", "cookies"]
|
|
1651
|
+
];
|
|
1652
|
+
|
|
1653
|
+
// lib/heuristic-prefilter.ts
|
|
1654
|
+
function literalIndex(all) {
|
|
1655
|
+
const distinct = [...new Set(all)].sort((a, b) => b.length - a.length);
|
|
1656
|
+
if (distinct.length === 0) {
|
|
1657
|
+
return { present: () => /* @__PURE__ */ new Set() };
|
|
1658
|
+
}
|
|
1659
|
+
const escape = (l) => l.replace(/[.*+?^${}()|[\]\\/]/g, "\\$&");
|
|
1660
|
+
const any = new RegExp(`(?=(${distinct.map(escape).join("|")}))`, "g");
|
|
1661
|
+
const implies = /* @__PURE__ */ new Map();
|
|
1662
|
+
const impliedBy = (m) => {
|
|
1663
|
+
let list = implies.get(m);
|
|
1664
|
+
if (!list) {
|
|
1665
|
+
list = distinct.filter((l) => m.startsWith(l));
|
|
1666
|
+
implies.set(m, list);
|
|
1667
|
+
}
|
|
1668
|
+
return list;
|
|
1669
|
+
};
|
|
1670
|
+
return {
|
|
1671
|
+
present(lower) {
|
|
1672
|
+
const found = /* @__PURE__ */ new Set();
|
|
1673
|
+
for (const m of lower.matchAll(any)) {
|
|
1674
|
+
if (!found.has(m[1])) {
|
|
1675
|
+
impliedBy(m[1]).forEach((l) => found.add(l));
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1678
|
+
return found;
|
|
1679
|
+
}
|
|
1680
|
+
};
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
// lib/heuristic-detect.ts
|
|
1254
1684
|
var TEXT_LIMIT = 1e5;
|
|
1255
|
-
|
|
1256
|
-
|
|
1685
|
+
var DEFAULT_WINDOW = 150;
|
|
1686
|
+
var builtinLiterals;
|
|
1687
|
+
function literalsOf(pattern) {
|
|
1688
|
+
if (!builtinLiterals) {
|
|
1689
|
+
const fresh = DETECT_PATTERN_LITERALS.length === DETECT_PATTERNS.length;
|
|
1690
|
+
builtinLiterals = new Map(fresh ? DETECT_PATTERNS.map((p, i) => [patternOf(p), DETECT_PATTERN_LITERALS[i]]) : []);
|
|
1691
|
+
}
|
|
1692
|
+
return builtinLiterals.get(pattern) ?? [];
|
|
1693
|
+
}
|
|
1694
|
+
var index;
|
|
1695
|
+
var literalsIn = (lower) => (index ??= literalIndex(DETECT_PATTERN_LITERALS.flat())).present(lower);
|
|
1696
|
+
var truncate = (text) => (text || "").slice(0, TEXT_LIMIT);
|
|
1697
|
+
var forInput = (scoped, input) => !scoped.input || scoped.input === input;
|
|
1698
|
+
var stateless = (re) => new RegExp(re.source, re.flags.replace(/[gy]/g, ""));
|
|
1699
|
+
function toPredicate(test) {
|
|
1700
|
+
if (typeof test === "function") {
|
|
1701
|
+
return test;
|
|
1702
|
+
}
|
|
1703
|
+
const re = stateless(test);
|
|
1704
|
+
return (text) => re.test(text);
|
|
1705
|
+
}
|
|
1706
|
+
var compiledPatterns = /* @__PURE__ */ new WeakMap();
|
|
1707
|
+
var compiledNegatives = /* @__PURE__ */ new WeakMap();
|
|
1708
|
+
function compilePatterns(detectPatterns) {
|
|
1709
|
+
let compiled = compiledPatterns.get(detectPatterns);
|
|
1710
|
+
if (!compiled) {
|
|
1711
|
+
compiled = detectPatterns.map((p) => {
|
|
1712
|
+
const pattern = patternOf(p);
|
|
1713
|
+
const input = p instanceof RegExp ? void 0 : p.input;
|
|
1714
|
+
const global = pattern.flags.includes("g") ? pattern : new RegExp(pattern.source, `${pattern.flags}g`);
|
|
1715
|
+
return { id: pattern.toString(), pattern, global, input, literals: literalsOf(pattern) };
|
|
1716
|
+
});
|
|
1717
|
+
compiledPatterns.set(detectPatterns, compiled);
|
|
1718
|
+
}
|
|
1719
|
+
return compiled;
|
|
1720
|
+
}
|
|
1721
|
+
function compileNegatives(negatives) {
|
|
1722
|
+
let compiled = compiledNegatives.get(negatives);
|
|
1723
|
+
if (!compiled) {
|
|
1724
|
+
compiled = negatives.map((n) => {
|
|
1725
|
+
const pattern = n.pattern ? stateless(n.pattern) : null;
|
|
1726
|
+
const unless = n.unless ? toPredicate(n.unless) : null;
|
|
1727
|
+
return {
|
|
1728
|
+
...n,
|
|
1729
|
+
hits: (context) => (!pattern || pattern.test(context)) && !(unless && unless(context)),
|
|
1730
|
+
applies: n.appliesTo ? new Set(n.appliesTo.map(String)) : null
|
|
1731
|
+
};
|
|
1732
|
+
});
|
|
1733
|
+
compiledNegatives.set(negatives, compiled);
|
|
1734
|
+
}
|
|
1735
|
+
return compiled;
|
|
1736
|
+
}
|
|
1737
|
+
function negativeContext(text, start, end, negative) {
|
|
1738
|
+
if (negative.whole) {
|
|
1739
|
+
return text;
|
|
1740
|
+
}
|
|
1741
|
+
if (negative.lines === void 0) {
|
|
1742
|
+
const w = negative.window ?? DEFAULT_WINDOW;
|
|
1743
|
+
return text.slice(Math.max(0, start - w), end + w);
|
|
1744
|
+
}
|
|
1745
|
+
const lineEnd = (i) => {
|
|
1746
|
+
const next = text.indexOf("\n", i);
|
|
1747
|
+
return next === -1 ? text.length : next;
|
|
1748
|
+
};
|
|
1749
|
+
const [before, after] = Array.isArray(negative.lines) ? negative.lines : [negative.lines, negative.lines];
|
|
1750
|
+
let from = start > 0 ? text.lastIndexOf("\n", start - 1) + 1 : 0;
|
|
1751
|
+
let to = lineEnd(end);
|
|
1752
|
+
for (let i = 0; i < before; i++) {
|
|
1753
|
+
from = from >= 2 ? text.lastIndexOf("\n", from - 2) + 1 : 0;
|
|
1754
|
+
}
|
|
1755
|
+
for (let i = 0; i < after; i++) {
|
|
1756
|
+
to = to < text.length ? lineEnd(to + 1) : to;
|
|
1757
|
+
}
|
|
1758
|
+
return text.slice(from, to);
|
|
1759
|
+
}
|
|
1760
|
+
function checkHeuristicPatterns(allText, input, options = {}) {
|
|
1761
|
+
return matchHeuristicPatterns(allText, input, options, false);
|
|
1762
|
+
}
|
|
1763
|
+
function hasHeuristicPatterns(allText, input, options = {}) {
|
|
1764
|
+
return matchHeuristicPatterns(allText, input, options, true).patterns.length > 0;
|
|
1765
|
+
}
|
|
1766
|
+
function matchHeuristicPatterns(allText, input, { patterns: detectPatterns = DETECT_PATTERNS, negatives = DETECT_CONTEXT_NEGATIVES }, firstOnly) {
|
|
1767
|
+
if (input !== void 0 && input !== "popup" && input !== "page") {
|
|
1768
|
+
const got = Array.isArray(input) ? "a pattern list (pass it as the `patterns` option)" : JSON.stringify(input);
|
|
1769
|
+
throw new TypeError(`heuristic input must be 'popup', 'page' or undefined, got ${got}`);
|
|
1770
|
+
}
|
|
1771
|
+
allText = truncate(allText);
|
|
1257
1772
|
const patterns = [];
|
|
1258
1773
|
const snippets2 = [];
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1774
|
+
const suppressed = [];
|
|
1775
|
+
const applicable = compileNegatives(negatives).filter((n) => forInput(n, input));
|
|
1776
|
+
let present;
|
|
1777
|
+
const wholeHits = /* @__PURE__ */ new Map();
|
|
1778
|
+
const hitsAt = (n, start, end) => {
|
|
1779
|
+
if (!n.whole) {
|
|
1780
|
+
return n.hits(negativeContext(allText, start, end, n));
|
|
1781
|
+
}
|
|
1782
|
+
let hit = wholeHits.get(n);
|
|
1783
|
+
if (hit === void 0) {
|
|
1784
|
+
hit = n.hits(allText);
|
|
1785
|
+
wholeHits.set(n, hit);
|
|
1786
|
+
}
|
|
1787
|
+
return hit;
|
|
1788
|
+
};
|
|
1789
|
+
for (const d of compilePatterns(detectPatterns)) {
|
|
1790
|
+
if (!forInput(d, input)) {
|
|
1791
|
+
continue;
|
|
1792
|
+
}
|
|
1793
|
+
if (d.literals.length) {
|
|
1794
|
+
const inText = present ??= literalsIn(allText.toLowerCase());
|
|
1795
|
+
if (!d.literals.some((l) => inText.has(l))) {
|
|
1796
|
+
continue;
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1799
|
+
const own = applicable.filter((n) => !n.applies || n.applies.has(d.id));
|
|
1800
|
+
const matched = [];
|
|
1801
|
+
const dropped = /* @__PURE__ */ new Set();
|
|
1802
|
+
let found = false;
|
|
1803
|
+
let kept = own.length === 0;
|
|
1804
|
+
for (const m of allText.matchAll(d.global)) {
|
|
1805
|
+
found = true;
|
|
1806
|
+
if (!kept) {
|
|
1807
|
+
const start = m.index ?? 0;
|
|
1808
|
+
const hit = own.find((n) => hitsAt(n, start, start + m[0].length));
|
|
1809
|
+
if (hit) {
|
|
1810
|
+
dropped.add(hit.name);
|
|
1811
|
+
} else {
|
|
1812
|
+
kept = true;
|
|
1266
1813
|
}
|
|
1267
1814
|
}
|
|
1815
|
+
if (kept && firstOnly) {
|
|
1816
|
+
break;
|
|
1817
|
+
}
|
|
1818
|
+
matched.push(m[0].substring(0, 200));
|
|
1268
1819
|
}
|
|
1820
|
+
if (!found) {
|
|
1821
|
+
continue;
|
|
1822
|
+
}
|
|
1823
|
+
if (!kept) {
|
|
1824
|
+
dropped.forEach((negative) => suppressed.push({ pattern: d.id, negative }));
|
|
1825
|
+
continue;
|
|
1826
|
+
}
|
|
1827
|
+
patterns.push(d.id);
|
|
1828
|
+
if (firstOnly) {
|
|
1829
|
+
break;
|
|
1830
|
+
}
|
|
1831
|
+
snippets2.push(...matched);
|
|
1269
1832
|
}
|
|
1270
|
-
return { patterns, snippets: snippets2 };
|
|
1271
|
-
}
|
|
1272
|
-
function hasHeuristicPatterns(allText, detectPatterns = DETECT_PATTERNS) {
|
|
1273
|
-
const text = allText.slice(0, TEXT_LIMIT);
|
|
1274
|
-
return detectPatterns.some((p) => text.search(p) !== -1);
|
|
1833
|
+
return { patterns, snippets: snippets2, suppressed };
|
|
1275
1834
|
}
|
|
1835
|
+
|
|
1836
|
+
// lib/heuristic-classify.ts
|
|
1276
1837
|
function classifyButtons(buttons) {
|
|
1277
1838
|
for (const button of buttons) {
|
|
1278
1839
|
button.regexClassification = classifyButtonTextRegex(button.text);
|
|
1279
1840
|
}
|
|
1280
1841
|
}
|
|
1281
|
-
function isExcludedPopup(popupText, excludePatterns = DETECT_NEVER_MATCH_PATTERNS) {
|
|
1282
|
-
if (!popupText) {
|
|
1283
|
-
return false;
|
|
1284
|
-
}
|
|
1285
|
-
const truncated = popupText.slice(0, TEXT_LIMIT);
|
|
1286
|
-
return excludePatterns.some((p) => p.test(truncated));
|
|
1287
|
-
}
|
|
1288
1842
|
function classifyPopup(buttons) {
|
|
1289
1843
|
const { reject, settings, accept, acknowledge } = buttons.reduce(
|
|
1290
1844
|
(acc, button) => {
|
|
@@ -1347,6 +1901,8 @@
|
|
|
1347
1901
|
// lib/heuristics.ts
|
|
1348
1902
|
var BUTTON_LIKE_ELEMENT_SELECTOR = 'button, input[type="button"], input[type="submit"], a, [role="button"], [class*="button"]';
|
|
1349
1903
|
var POPUP_SEARCH_MAX_TIME = 100;
|
|
1904
|
+
var FRAGMENT_NEGATIVES = DETECT_CONTEXT_NEGATIVES.filter((n) => !n.whole);
|
|
1905
|
+
var hasFragmentPatterns = (text) => hasHeuristicPatterns(text, "popup", { negatives: FRAGMENT_NEGATIVES });
|
|
1350
1906
|
var ACCEPTED_LEVELS = {
|
|
1351
1907
|
off: [],
|
|
1352
1908
|
reject: ["reject"],
|
|
@@ -1385,7 +1941,7 @@
|
|
|
1385
1941
|
let result = consentPopups.get(popup);
|
|
1386
1942
|
if (result === void 0) {
|
|
1387
1943
|
const popupText = popup.text.trim();
|
|
1388
|
-
result = !!popupText &&
|
|
1944
|
+
result = !!popupText && hasHeuristicPatterns(popupText, "popup");
|
|
1389
1945
|
consentPopups.set(popup, result);
|
|
1390
1946
|
}
|
|
1391
1947
|
return result;
|
|
@@ -1522,7 +2078,7 @@
|
|
|
1522
2078
|
}
|
|
1523
2079
|
function toPopupRoot(el, shadowHosts) {
|
|
1524
2080
|
const text = getElementText(el);
|
|
1525
|
-
if (!text || !
|
|
2081
|
+
if (!text || !hasFragmentPatterns(text)) {
|
|
1526
2082
|
return null;
|
|
1527
2083
|
}
|
|
1528
2084
|
const popup = toPopupData(el, shadowHosts, text);
|
|
@@ -1543,7 +2099,7 @@
|
|
|
1543
2099
|
return null;
|
|
1544
2100
|
}
|
|
1545
2101
|
function expandPopupFragment(popup, shadowHosts) {
|
|
1546
|
-
if (
|
|
2102
|
+
if (hasFragmentPatterns(popup.text) && hasPopupButtons(popup.text, popup.buttons)) {
|
|
1547
2103
|
return popup;
|
|
1548
2104
|
}
|
|
1549
2105
|
const parent = getComposedParent(popup.element);
|
|
@@ -2131,6 +2687,7 @@
|
|
|
2131
2687
|
var popupContent = "#truste-consent-content";
|
|
2132
2688
|
var bannerOverlay = "#trustarc-banner-overlay";
|
|
2133
2689
|
var bannerContainer = "#truste-consent-track";
|
|
2690
|
+
var prefCenterDeclineAll = [".truste_popframe.trustarc_newcm_container", 'button[data-button-key="decline_all"]'];
|
|
2134
2691
|
var TrustArcTop = class extends AutoConsentCMPBase {
|
|
2135
2692
|
constructor(autoconsentInstance) {
|
|
2136
2693
|
super(autoconsentInstance);
|
|
@@ -2142,12 +2699,13 @@
|
|
|
2142
2699
|
};
|
|
2143
2700
|
this._shortcutButton = null;
|
|
2144
2701
|
this._optInDone = false;
|
|
2702
|
+
this._optOutDone = false;
|
|
2145
2703
|
}
|
|
2146
2704
|
get hasSelfTest() {
|
|
2147
2705
|
return true;
|
|
2148
2706
|
}
|
|
2149
2707
|
get isIntermediate() {
|
|
2150
|
-
if (this._optInDone) {
|
|
2708
|
+
if (this._optInDone || this._optOutDone) {
|
|
2151
2709
|
return false;
|
|
2152
2710
|
}
|
|
2153
2711
|
return !this._shortcutButton;
|
|
@@ -2172,6 +2730,10 @@
|
|
|
2172
2730
|
}
|
|
2173
2731
|
hideElements(getStyleElement(), `.truste_popframe, .truste_overlay, .truste_box_overlay, ${bannerContainer}`);
|
|
2174
2732
|
await this.click(cookieSettingsButton);
|
|
2733
|
+
if (await this.waitForElement(prefCenterDeclineAll, 3e3)) {
|
|
2734
|
+
this._optOutDone = true;
|
|
2735
|
+
await this.click(prefCenterDeclineAll);
|
|
2736
|
+
}
|
|
2175
2737
|
setTimeout(() => {
|
|
2176
2738
|
getStyleElement().remove();
|
|
2177
2739
|
}, 1e4);
|
|
@@ -2850,6 +3412,14 @@
|
|
|
2850
3412
|
async optOut() {
|
|
2851
3413
|
const rejectAllSelector = "xpath///button[contains(., 'Afvis alle') or contains(., 'Reject all') or contains(., 'Odbaci sve') or contains(., 'Rechazar todo') or contains(., 'Atmesti visus') or contains(., 'Odm\xEDtnout v\u0161e') or contains(., '\u0391\u03C0\u03CC\u03C1\u03C1\u03B9\u03C8\u03B7 \u03CC\u03BB\u03C9\u03BD') or contains(., 'Rejeitar tudo') or contains(., 'T\xFCm\xFCn\xFC reddet') or contains(., '\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C \u0432\u0441\u0435') or contains(., 'Noraid\u012Bt visu') or contains(., 'Avvisa alla') or contains(., 'Odrzu\u0107 wszystkie') or contains(., 'Alles afwijzen') or contains(., '\u041E\u0442\u0445\u0432\u044A\u0440\u043B\u044F\u043D\u0435 \u043D\u0430 \u0432\u0441\u0438\u0447\u043A\u0438') or contains(., 'Rifiuta tutto') or contains(., 'Zavrni vse') or contains(., 'Az \xF6sszes elutas\xEDt\xE1sa') or contains(., 'Respinge\u021Bi tot') or contains(., 'Alles ablehnen') or contains(., 'Tout rejeter') or contains(., 'Odmietnu\u0165 v\u0161etko') or contains(., 'L\xFCkka k\xF5ik tagasi') or contains(., 'Hylk\xE4\xE4 kaikki')]";
|
|
2852
3414
|
if (await this.waitForElement(rejectAllSelector, 500)) {
|
|
3415
|
+
const rejectButton = this.elementSelector(rejectAllSelector)[0];
|
|
3416
|
+
if (rejectButton.disabled) {
|
|
3417
|
+
const cardBody = rejectButton.closest("div[class*=CardHeader]")?.parentElement?.querySelector("div[class*=CardBody]");
|
|
3418
|
+
if (cardBody) {
|
|
3419
|
+
cardBody.scrollTop = cardBody.scrollHeight;
|
|
3420
|
+
}
|
|
3421
|
+
await waitFor(() => !rejectButton.disabled, 10, 200);
|
|
3422
|
+
}
|
|
2853
3423
|
return await this.click(rejectAllSelector);
|
|
2854
3424
|
}
|
|
2855
3425
|
const vrmCloseButton = this.getVrmCloseButton();
|
|
@@ -3467,7 +4037,7 @@
|
|
|
3467
4037
|
detectHeuristics() {
|
|
3468
4038
|
if (this.config.enableHeuristicDetection) {
|
|
3469
4039
|
this.config.performanceLoggingEnabled && performance.mark("detectHeuristicsStart");
|
|
3470
|
-
const { patterns, snippets: snippets2 } = checkHeuristicPatterns(document.documentElement?.innerText || "");
|
|
4040
|
+
const { patterns, snippets: snippets2 } = checkHeuristicPatterns(document.documentElement?.innerText || "", "page");
|
|
3471
4041
|
if (patterns.length > 0 && (patterns.length !== this.state.heuristicPatterns.length || this.state.heuristicPatterns.some((p, i) => p !== patterns[i]))) {
|
|
3472
4042
|
this.config.logs.lifecycle && console.log("Heuristic patterns found", patterns, snippets2);
|
|
3473
4043
|
this.updateState({ heuristicPatterns: patterns, heuristicSnippets: snippets2 });
|