@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
package/dist/autoconsent.cjs.js
CHANGED
|
@@ -340,6 +340,13 @@ var snippets = {
|
|
|
340
340
|
EVAL_ADULTFRIENDFINDER_TEST: () => !!localStorage.getItem("cookieConsent"),
|
|
341
341
|
EVAL_AYLO_COOKIE_MANAGER_READY: () => !!(window.wl_cookie_consent_manager || window._Cookie_Consent_Manager_brand),
|
|
342
342
|
EVAL_BAHN_TEST: () => utag.gdpr.getSelectedCategories().length === 1,
|
|
343
|
+
// the close handler listens for mouseup, which element.click() does not dispatch
|
|
344
|
+
EVAL_BING_NOTICE_CLOSE: () => {
|
|
345
|
+
const close = document.querySelector("#bnp_ttc_close");
|
|
346
|
+
close.dispatchEvent(new MouseEvent("mouseup", { bubbles: true, cancelable: true, view: window }));
|
|
347
|
+
close.click();
|
|
348
|
+
return true;
|
|
349
|
+
},
|
|
343
350
|
EVAL_BIGCOMMERCE_CONSENT_MANAGER_DETECT: () => !!(window.consentManager && window.consentManager.version),
|
|
344
351
|
EVAL_BORLABS_0: () => !JSON.parse(
|
|
345
352
|
decodeURIComponent(
|
|
@@ -469,6 +476,8 @@ var snippets = {
|
|
|
469
476
|
EVAL_TEALIUM_2: () => utag.gdpr.setConsentValue(true) || true,
|
|
470
477
|
EVAL_TEALIUM_3: () => utag.gdpr.getConsentState() !== 1,
|
|
471
478
|
EVAL_TEALIUM_DONOTSELL_CHECK: () => utag.gdpr.dns?.getDnsState() !== 1,
|
|
479
|
+
// 0 means no stored decision; otherwise the user reopened the prompt themselves
|
|
480
|
+
EVAL_TEALIUM_NO_DECISION: () => utag.gdpr.getConsentState() === 0,
|
|
472
481
|
EVAL_TESTCMP_STEP: () => !!document.querySelector("#reject-all"),
|
|
473
482
|
EVAL_TESTCMP_0: () => window.results.results[0] === "button_clicked",
|
|
474
483
|
EVAL_TESTCMP_COSMETIC_0: () => window.results.results[0] === "banner_hidden",
|
|
@@ -491,18 +500,27 @@ function getFunctionBody(snippetFunc) {
|
|
|
491
500
|
}
|
|
492
501
|
|
|
493
502
|
// lib/heuristic-patterns.ts
|
|
503
|
+
var patternOf = (p) => p instanceof RegExp ? p : p.pattern;
|
|
504
|
+
var BY_CONTINUING_PRIVACY = /(?:by continuing.{0,100}privacy)|(?:privacy.{0,100}by continuing)/gi;
|
|
505
|
+
var ACCEPT_ALL = /accept all/gi;
|
|
506
|
+
var USE_OF_COOKIES = /use of cookies/gi;
|
|
507
|
+
var UTILISATION_DES_COOKIES = /utilisation.{0,100}des.{0,100}cookies/gi;
|
|
508
|
+
var ACCEPTEZ_UTILISATION = /acceptez.{0,100}l.{0,100}utilisation/gi;
|
|
509
|
+
var VERWENDUNG_VON_COOKIES = /verwendung.{0,100}von.{0,100}cookies/gi;
|
|
510
|
+
var DE_COOKIE_VERB = /\b(?:nutzen|nutzt|verwenden|verwendet|setzen|setzt|benutzen|benutzt|speichert|platzieren)\b(?: \S+){0,4} cookies\b/gi;
|
|
511
|
+
var GEBRUIK_VAN_COOKIES = /gebruik.{0,100}van.{0,100}cookies/gi;
|
|
494
512
|
var DETECT_PATTERNS = [
|
|
495
513
|
/accept cookies/gi,
|
|
496
|
-
|
|
514
|
+
ACCEPT_ALL,
|
|
497
515
|
/reject all/gi,
|
|
498
516
|
/only necessary cookies/gi,
|
|
499
517
|
// "only necessary" is probably too broad
|
|
500
518
|
/(?:by continuing.{0,100}cookie)|(?:cookie.{0,100}by continuing)/gi,
|
|
501
|
-
|
|
519
|
+
BY_CONTINUING_PRIVACY,
|
|
502
520
|
// up to two qualifiers are common: "optional", "essential", "analytics", "google analytics", "third party", ...
|
|
503
521
|
/we (?:use|serve)(?: \w+){0,2} cookies/gi,
|
|
504
522
|
/we are using cookies/gi,
|
|
505
|
-
|
|
523
|
+
USE_OF_COOKIES,
|
|
506
524
|
/website uses cookies to enhance your browsing experience/gi,
|
|
507
525
|
/(?:this|our) (?:web)?site.{0,100}cookies/gi,
|
|
508
526
|
/cookies (?:and|or) .{0,100} technologies/gi,
|
|
@@ -513,6 +531,33 @@ var DETECT_PATTERNS = [
|
|
|
513
531
|
/we.{0,100}store.{0,100}information.{0,100}such as.{0,100}cookies/gi,
|
|
514
532
|
/store and\/or access information.{0,100}on a device/gi,
|
|
515
533
|
/personalised ads and content, ad and content measurement/gi,
|
|
534
|
+
// TCF wording: "store and/or access information", "and our partners ask for your consent", "we and our N partners"
|
|
535
|
+
/\b(?:store|stores|storing) and\/or access(?:ing)? information\b/gi,
|
|
536
|
+
/\band our partners ask for your consent\b/gi,
|
|
537
|
+
/\bwe and (?:our|up to) (?:\d+ )?(?:partners|vendors)\b/gi,
|
|
538
|
+
// a partner count, in each language: "our 186 partners", "unseren 107 Partnern", "nuestros 1064 socios"
|
|
539
|
+
/\b(?:our|unseren|onze|nos|nuestros|i nostri) \d{2,4} (?:partners|partnern|partner|partenaires|socios|vendors|fornitori)\b/gi,
|
|
540
|
+
/\b\d{2,4} iab[- ]partner/gi,
|
|
541
|
+
// "technologies like cookies", in each language
|
|
542
|
+
/\btechnolog(?:ies|ien|ieën|ías|ie) (?:like|such as|wie|zoals|como(?: las)?|telles que(?: les)?|come(?: i)?) cookies?\b/gi,
|
|
543
|
+
/\buses (?:\S+ ){0,2}cookies\b/gi,
|
|
544
|
+
/\b(?:like|want) to (?:use|set) (?:\S+ ){0,2}cookies\b/gi,
|
|
545
|
+
/\b(?:optional|additional|non-essential) cookies\b/gi,
|
|
546
|
+
/\bstoring of cookies\b|\bplaced cookies\b/gi,
|
|
547
|
+
/\b(?:store|stores) and access (?:data|information) on your device\b|\baccess and store (?:data|information) on your device\b/gi,
|
|
548
|
+
/\bwe use (?:\S+ ){1,4}cookies\b/gi,
|
|
549
|
+
// US privacy notices: opt-out sentences, not the footer link labels
|
|
550
|
+
/\byou (?:can|may) opt[- ]out of (?:the |this )?(?:sale|sharing|use|selling)\b/gi,
|
|
551
|
+
/\b(?:if you wish to|to) opt[- ]out of the sale\b/gi,
|
|
552
|
+
/\bthis website or its third[- ]party tools (?:process|use)\b/gi,
|
|
553
|
+
/["“]?(?:share|sell)["”]? or ["“]?(?:sell|share)["”]? (?:your )?(?:personal )?information\b/gi,
|
|
554
|
+
/\bresidents have (?:certain )?rights with regard to the sale\b/gi,
|
|
555
|
+
/\bwe use technologies (?:on this website )?(?:that may )?(?:to )?collect\b/gi,
|
|
556
|
+
// pay-or-consent walls
|
|
557
|
+
/\bcontinue reading with advertising\b|\b(?:with|mit) (?:advertising|werbung) (?:and|und) tracking\b/gi,
|
|
558
|
+
/\bconsent and continue\b/gi,
|
|
559
|
+
// preference centres are often in the page but hidden, so popup text only
|
|
560
|
+
{ pattern: /\bstore or retrieve information on your browser\b|\bstockées dans votre navigateur ou récupérées\b/gi, input: "popup" },
|
|
516
561
|
// it might be tempting to add the patterns below, but they cause too many false positives. Don't do it :)
|
|
517
562
|
// /cookies? settings/i,
|
|
518
563
|
// /cookies? preferences/i,
|
|
@@ -528,26 +573,32 @@ var DETECT_PATTERNS = [
|
|
|
528
573
|
/consentement.{0,100}à.{0,100}tout.{0,100}moment/gi,
|
|
529
574
|
/votre.{0,100}consentement/gi,
|
|
530
575
|
/accepter.{0,100}tout/gi,
|
|
531
|
-
|
|
576
|
+
UTILISATION_DES_COOKIES,
|
|
532
577
|
/cookies.{0,100}ou.{0,100}technologies/gi,
|
|
533
|
-
|
|
578
|
+
ACCEPTEZ_UTILISATION,
|
|
534
579
|
/continuer sans accepter/gi,
|
|
535
580
|
/tout refuser/gi,
|
|
536
581
|
/(?:refuser|rejeter) tous les cookies/gi,
|
|
537
|
-
|
|
582
|
+
// not "je refuse d'…" in a headline
|
|
583
|
+
/je refuse(?! d['’e])/gi,
|
|
538
584
|
/refuser et continuer/gi,
|
|
539
585
|
/refuser les cookies/gi,
|
|
540
586
|
/seulement nécessaires/gi,
|
|
541
587
|
/je désactive les finalités non essentielles/gi,
|
|
542
588
|
/cookies essentiels uniquement/gi,
|
|
543
589
|
/nécessaires uniquement/gi,
|
|
590
|
+
/\b(?:stocker|stockons) et\/ou (?:accéder|accédons)\b/gi,
|
|
591
|
+
/\bnos partenaires demandent votre consentement\b/gi,
|
|
592
|
+
/\bconsentez à l.utilisation (?:de |des )?cookies\b|\bdépôt (?:de|des) cookies\b/gi,
|
|
593
|
+
/\bles cookies nous permettent\b|\bnos partenaires et nous(?:-mêmes)?\b/gi,
|
|
594
|
+
/\baccepter (?:&|et) fermer\b/gi,
|
|
544
595
|
// DE
|
|
545
596
|
/wir.{0,100}verwenden.{0,100}cookies/gi,
|
|
546
597
|
/wir.{0,100}und.{0,100}unsere.{0,100}partner/gi,
|
|
547
|
-
/zugriff
|
|
598
|
+
/zugriff auf informationen auf/gi,
|
|
548
599
|
/inhalte.{0,100}messung.{0,100}von.{0,100}werbeleistung.{0,100}und/gi,
|
|
549
600
|
/cookies.{0,100}und.{0,100}andere/gi,
|
|
550
|
-
|
|
601
|
+
VERWENDUNG_VON_COOKIES,
|
|
551
602
|
/wir.{0,100}nutzen.{0,100}cookies/gi,
|
|
552
603
|
/verwendet.{0,100}cookies/gi,
|
|
553
604
|
/sie.{0,100}können.{0,100}ihre.{0,100}auswahl/gi,
|
|
@@ -560,8 +611,20 @@ var DETECT_PATTERNS = [
|
|
|
560
611
|
/nur funktionale cookies akzeptieren/gi,
|
|
561
612
|
/optionale ablehnen/gi,
|
|
562
613
|
/zustimmung verweigern/gi,
|
|
614
|
+
/\bspeichern und\/oder (?:zugreifen|abrufen)\b/gi,
|
|
615
|
+
/\bunsere partner bitten um ihre zustimmung\b/gi,
|
|
616
|
+
DE_COOKIE_VERB,
|
|
617
|
+
/\b(?:werden|wird) (?:\S+ ){0,3}cookies (?:verwendet|eingesetzt|gesetzt|genutzt)\b/gi,
|
|
618
|
+
/\bcookies? zum einsatz\b|\beinsatz von cookies\b/gi,
|
|
619
|
+
/\beinverstanden\b.{0,60}\bcookies\b|\bcookies\b.{0,80}\beinverstanden\b/gi,
|
|
620
|
+
/\b(?:alle|alles) (?:cookies |optionalen \S+ )?(?:akzeptieren|zulassen|erlauben|zustimmen)\b/gi,
|
|
621
|
+
/\bzustimmen und weiter\b|\bweiter,? ohne zu (?:akzeptieren|zustimmen)\b/gi,
|
|
622
|
+
/\b(?:einwilligung|zustimmung) (?:zu|zur|in die) (?:\S+ )?cookies\b|\bcookie-(?:zustimmung|einwilligung)\b/gi,
|
|
623
|
+
/\btracking-technologien\b/gi,
|
|
624
|
+
/\bakzeptier\w* (?:du |sie )?(?:die )?verwendung (?:\S+ )?cookies\b/gi,
|
|
625
|
+
/\bmit werbetracking weiterlesen\b|\bweiter mit werbung\b|\bcon tracking e annunci\b/gi,
|
|
563
626
|
// NL
|
|
564
|
-
|
|
627
|
+
GEBRUIK_VAN_COOKIES,
|
|
565
628
|
/(?:we|wij).{0,100}gebruiken.{0,100}cookies.{0,100}om/gi,
|
|
566
629
|
/cookies.{0,100}en.{0,100}vergelijkbare/gi,
|
|
567
630
|
/(?:alles|cookies).{0,100}(?:afwijzen|weigeren|verwerpen)/gi,
|
|
@@ -571,6 +634,13 @@ var DETECT_PATTERNS = [
|
|
|
571
634
|
/doorgaan zonder (?:te accepteren|akkoord te gaan)/gi,
|
|
572
635
|
/alleen.{0,100}(?:optionele|functionele|functioneel|noodzakelijke|essentiële).{0,100}cookies/gi,
|
|
573
636
|
/wijs alles af/gi,
|
|
637
|
+
/\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,
|
|
638
|
+
/\bonze partners vragen om (?:jouw|uw|je) toestemming\b/gi,
|
|
639
|
+
/\bwij en onze (?:\d+ )?partners\b/gi,
|
|
640
|
+
/\b(?:gebruiken|gebruikt|plaatsen|plaatst)\b(?: \S+){0,3} cookies\b/gi,
|
|
641
|
+
/\baccepteer (?:alles|alle cookies)\b/gi,
|
|
642
|
+
// Dutch words only: "tracking cookies" and "marketing cookies" are also English prose and footer links
|
|
643
|
+
/\b(?:analytische|functionele|essentiële|noodzakelijke) cookies\b/gi,
|
|
574
644
|
// Spanish (ES)
|
|
575
645
|
/(si|al) contin[úu]a[sr]?( navegando)?.{0,100} cookie/gi,
|
|
576
646
|
/(usamos|utilizar?|utilizamos)( (tanto|las))?.{0,20}cookie/gi,
|
|
@@ -587,6 +657,15 @@ var DETECT_PATTERNS = [
|
|
|
587
657
|
/nosotros y nuestros( \d+)? (socios|proveedores).{0,180} cookies/gi,
|
|
588
658
|
/recopilamos y almacenamos datos de usted y de su dispositivo/gi,
|
|
589
659
|
/utilizamos tecnolog[ií]as como las cookies/gi,
|
|
660
|
+
/\b(?:almacenar|almacenamos) y\/o (?:acceder|accedemos)\b/gi,
|
|
661
|
+
/\bnuestros socios solicitan su consentimiento\b/gi,
|
|
662
|
+
/\b(?:tanto nosotros como|nosotros y) nuestros (?:\d+ )?socios\b/gi,
|
|
663
|
+
/\b(?:aceptar|rechazar) todas\b|\bcontinuar sin aceptar\b|\bsolo las necesarias\b/gi,
|
|
664
|
+
/\bacept\w* (?:\S+ ){0,3}uso de (?:las )?cookies\b/gi,
|
|
665
|
+
/\bcookies (?:técnicas|analíticas|propias|de terceros|opcionales|necesarias)\b/gi,
|
|
666
|
+
/\blas cookies nos (?:ayudan|permiten)\b/gi,
|
|
667
|
+
/\b(?:instalamos|empleamos)\b(?: \S+){0,4} cookies\b/gi,
|
|
668
|
+
/\bacept(?:a|ar|as)? (?:el uso de |las )?(?:\S+ )?cookies\b|\bnecesitamos usar cookies\b/gi,
|
|
590
669
|
// Polish (PL)
|
|
591
670
|
// examples:
|
|
592
671
|
// wykorzystuje pliki cookie (uses cookies)
|
|
@@ -615,10 +694,11 @@ var DETECT_PATTERNS = [
|
|
|
615
694
|
// Catalan (CA)
|
|
616
695
|
/cookies pròpies i de tercers/gi,
|
|
617
696
|
/utilitzem galetes/gi,
|
|
618
|
-
|
|
697
|
+
/únicament utilitza galetes pròpies amb finalitat tècnica\b/gi,
|
|
619
698
|
/este lloc web utilitza només cookies tècniques necessàries per al seu funcionament/gi,
|
|
620
699
|
/utilitza cookies tècniques,\s*de personalització i anàlisi/gi,
|
|
621
700
|
/utilitzem cookies i altres tecnologies/gi,
|
|
701
|
+
/\b(?:utilitz\w*|fa servir|fem servir|usem)\b(?: \S+){0,3} (?:cookies|galetes)\b/gi,
|
|
622
702
|
// Basque (EU)
|
|
623
703
|
/cookie propio eta hirugarrenenak helburu teknikoarekin erabiltzen ditu/gi,
|
|
624
704
|
/cookie propioak eta hirugarrenen cookieak erabiltzen ditugu/gi,
|
|
@@ -648,7 +728,18 @@ var DETECT_PATTERNS = [
|
|
|
648
728
|
/(?:usiamo|utilizziamo).{0,20}cookie/gi,
|
|
649
729
|
/sito.{0,50}(?:usa|utilizza).{0,20}cookie/gi,
|
|
650
730
|
/noi e i nostri.{0,20}partner.{0,100}cookie/gi,
|
|
651
|
-
|
|
731
|
+
/\b(?:utilizziamo|usiamo|impieghiamo|installiamo)\b(?: \S+){0,3} cookies?\b/gi,
|
|
732
|
+
/\b(?:utilizza|utilizzano|usa|usano|impiega|installa|fa uso di)\b(?: \S+){0,3} cookies?\b/gi,
|
|
733
|
+
/\bcookies? (?:tecnici|di profilazione|di terze parti|analitici|statistici|di marketing)\b/gi,
|
|
734
|
+
/\b(?:acconsent|accett)\w*\b.{0,40}\b(?:uso|utilizzo|installazione)\b.{0,15}\bcookies?\b/gi,
|
|
735
|
+
/\b(?:continuando|proseguendo)(?: la| nella)? navigazione\b.{0,80}\b(?:accett|acconsent)\w*/gi,
|
|
736
|
+
/\b(?:accetta|accetto|accettare|rifiuta|rifiuto|rifiutare)(?: tutti| tutto)\b/gi,
|
|
737
|
+
/\b(?:continua|prosegui|chiudi) senza accettare\b/gi,
|
|
738
|
+
/\brifiuta e abbonati\b/gi,
|
|
739
|
+
/\bconsenso (?:all.(?:uso|utilizzo) (?:dei |di )?)?cookies?\b/gi,
|
|
740
|
+
/\b(?:insieme ai|con i) nostri (?:\d+ )?partner\b/gi,
|
|
741
|
+
/\bterze parti selezionate\b/gi,
|
|
742
|
+
/\b(?:archiviare|archiviamo|memorizzare|memorizziamo) e\/o (?:accedere|accediamo)\b/gi,
|
|
652
743
|
// Swedish (SV)
|
|
653
744
|
// e.g. "vi använder cookies", "vi använder spårningstekniker såsom cookies", "webbplatsen använder kakor"
|
|
654
745
|
/(?:vi|webbplatsen|webbplats|sajten|sidan)\s+använder.{0,60}(?:cookies|kakor)/gi,
|
|
@@ -903,26 +994,12 @@ var BUTTON_NEVER_MATCH_PATTERNS = [
|
|
|
903
994
|
// Russian (RU): paywall/subscription wording, e.g. "отказаться от подписки", "оплатить"
|
|
904
995
|
/подписатьс|подписк|оплатит|оплачива/is
|
|
905
996
|
];
|
|
906
|
-
var DETECT_NEVER_MATCH_PATTERNS = [
|
|
907
|
-
// e.g. "age verification", "age confirmation", "age check", "age gate", "age restriction"
|
|
908
|
-
/age\s+(?:verification|confirmation|check|gate|restriction)/i,
|
|
909
|
-
// e.g. "over 18 years", "at least 21 years", "older than 21", "18+"
|
|
910
|
-
/(?:over|above|at\s*least|minimum|older\s+than)\s*(?:18|21)\s*(?:years|yo|y\.?o\.?|\+)?/i,
|
|
911
|
-
// e.g. "18 years of age", "18+ years old", "21 years or older"
|
|
912
|
-
/(?:18|21)\s*(?:\+|years?)\s*(?:of\s*age|or\s*older|or\s*above)/i,
|
|
913
|
-
// e.g. "I am 18+", "I am over 18", "I'm 21 or older"
|
|
914
|
-
/(?:i'?m|i\s*am)\s*(?:over|above|at\s*least)?\s*(?:18|21)(?:\+|\s*(?:or\s*older|years))?/i,
|
|
915
|
-
// e.g. "you must be 18", "users must be at least 21", "visitors must be over 18"
|
|
916
|
-
/(?:you|users?|visitors?)\s+must\s+be\s+(?:over|above|at\s*least)?\s*(?:18|21)/i,
|
|
917
|
-
// e.g. "adult oriented material", "adult content", "adult-only website"
|
|
918
|
-
/adult[\s-]+(?:oriented|only|content|material|websites?)/i
|
|
919
|
-
];
|
|
920
997
|
var SETTINGS_PATTERNS = [
|
|
921
998
|
// Multilingual "open customization" patterns: a customization verb next to a
|
|
922
999
|
// cookie/preference/settings/options/details/purposes noun (both word orders).
|
|
923
1000
|
// The negative lookahead avoids policy links and save/confirm/accept phrases (those are accept/acknowledge/other).
|
|
924
|
-
/^(?!.*\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)
|
|
925
|
-
/^(?!.*\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)
|
|
1001
|
+
/^(?!.*\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,
|
|
1002
|
+
/^(?!.*\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,
|
|
926
1003
|
// settings noun + cookies, e.g. "paramètres des cookies", "ajustes de cookies", "instellingen voor cookies en diensten"
|
|
927
1004
|
/^(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,
|
|
928
1005
|
"settings",
|
|
@@ -1278,41 +1355,518 @@ var ACKNOWLEDGE_PATTERNS = [
|
|
|
1278
1355
|
"\u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C"
|
|
1279
1356
|
];
|
|
1280
1357
|
|
|
1281
|
-
// lib/heuristic-
|
|
1358
|
+
// lib/heuristic-negatives.ts
|
|
1359
|
+
var COOKIE_CHOICE = [
|
|
1360
|
+
"\\b(?:accept|reject|decline|refuse|deny|allow|manage|customi[sz]e)\\b[^\\n]{0,25}\\bcookies?\\b",
|
|
1361
|
+
"\\b(?:reject|decline|deny|refuse) all\\b",
|
|
1362
|
+
"\\b(?:essential|necessary|required) (?:cookies )?only\\b|\\bonly (?:essential|necessary|required)\\b",
|
|
1363
|
+
"\\bcookies? (?:notice|settings|preferences|banner)\\b",
|
|
1364
|
+
"\\b(?:alle )?(?:cookies )?ablehnen\\b",
|
|
1365
|
+
"\\b(?:alles |alle cookies )?(?:weigeren|weiger|afwijzen)\\b",
|
|
1366
|
+
"\\b(?:tout )?refuser\\b",
|
|
1367
|
+
"\\brechazar(?: todas?)?\\b",
|
|
1368
|
+
"\\brifiuta(?: tutti)?\\b",
|
|
1369
|
+
// purposes and vendors as a button or heading line: some consent dialogs ask "under 18?"
|
|
1370
|
+
"^[^\\n]{0,40}\\b(?:purposes|finalit\xE9s|prop\xF3sitos|zwecke|doeleinden|finalit\xE0|vendors|fournisseurs|proveedores|leveranciers|fornitori)(?!\\w)[^\\n]{0,10}$",
|
|
1371
|
+
"\\b(?:legitimate (?:business )?interest|int\xE9r\xEAt l\xE9gitime|inter\xE9s leg\xEDtimo|berechtigtes interesse|gerechtvaardigd belang|legittimo interesse)\\b",
|
|
1372
|
+
"\\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"
|
|
1373
|
+
].join("|");
|
|
1374
|
+
var BARE_ACCEPT = [
|
|
1375
|
+
"\\b(?:accept|allow) all\\b",
|
|
1376
|
+
"\\b(?:alle )?(?:cookies )?(?:akzeptieren|erlauben|zulassen)\\b",
|
|
1377
|
+
"\\b(?:alles |alle cookies )?(?:accepteren|accepteer|toestaan)\\b",
|
|
1378
|
+
"\\b(?:tout )?accepter\\b",
|
|
1379
|
+
"\\baceptar(?: todas?)?\\b",
|
|
1380
|
+
"\\baccetta(?: tutti)?\\b"
|
|
1381
|
+
].join("|");
|
|
1382
|
+
var COOKIE_CHOICE_RE = new RegExp(COOKIE_CHOICE, "im");
|
|
1383
|
+
var CONSENT_CHOICE = new RegExp(`${COOKIE_CHOICE}|${BARE_ACCEPT}`, "im");
|
|
1384
|
+
var AGE_WORDING = new RegExp(
|
|
1385
|
+
[
|
|
1386
|
+
"\\b(?:over|above|at least|older than|minimum(?: age of)?)\\s*(?:18|21|eighteen)\\b",
|
|
1387
|
+
// "18+" only with age words after it: a bare "18+" also appears in cookie banners on adult sites
|
|
1388
|
+
"\\b(?:18|21)\\+?\\s*(?:years?(?: of age| old)?|yo|or older|or over)\\b",
|
|
1389
|
+
"\\b(?:you|users?|visitors?) must be (?:over |above |at least )?(?:18|21)\\b",
|
|
1390
|
+
"\\b(?:i'?m|i am) (?:over |at least )?(?:18|21)\\b",
|
|
1391
|
+
"\\bage (?:verification|confirmation|check|gate|restriction)\\b",
|
|
1392
|
+
"\\b(?:adults? only|adult[\\s-](?:oriented|content|material|website)|legal age|age of majority|not a minor|minors)\\b",
|
|
1393
|
+
"\\b(?:18|21) jahre\\b",
|
|
1394
|
+
"\\balters(?:beschr\xE4nkung|best\xE4tigung|verifikation|pr\xFCfung|kontrolle)",
|
|
1395
|
+
"\\b(?:vollj\xE4hrig|f\xFCr erwachsene|minderj\xE4hrige)\\b",
|
|
1396
|
+
"\\b(?:18|21) jaar\\b",
|
|
1397
|
+
"\\b(?:volwassenen|meerderjarig|minderjarigen|leeftijdsverificatie)\\b",
|
|
1398
|
+
"\\b(?:18|21) ans\\b",
|
|
1399
|
+
// no \\b before an accented letter: without the u flag it is not a word character
|
|
1400
|
+
"\\b(?:pour adultes|v\xE9rification de l.\xE2ge|mineurs)\\b|\xE2ge l\xE9gal\\b",
|
|
1401
|
+
"\\b(?:18|21) a\xF1os\\b",
|
|
1402
|
+
"\\b(?:mayor(?:es)? de edad|menores de edad|para adultos|verificaci\xF3n de edad)\\b",
|
|
1403
|
+
"\\b(?:18|21) anni\\b",
|
|
1404
|
+
"\\b(?:maggiorenne|minorenni|per adulti)\\b|\\bverifica dell.et\xE0(?!\\w)"
|
|
1405
|
+
].join("|"),
|
|
1406
|
+
"i"
|
|
1407
|
+
);
|
|
1408
|
+
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;
|
|
1409
|
+
var DISMISS_END = /[.!?]\s+(?:ok(?:ay)?|got it|i agree|accept)\s*!?\s*$|\[\s*[x×]\s*\]|^\s*[x×✕]\s*$/im;
|
|
1410
|
+
var NOTICE_CONTROL = new RegExp(`${CONSENT_CHOICE.source}|${DISMISS_LINE.source}|${DISMISS_END.source}`, "im");
|
|
1411
|
+
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;
|
|
1412
|
+
var NOTICE_OWN_CONTROL = new RegExp(
|
|
1413
|
+
[
|
|
1414
|
+
"\\bcookies? verwalten\\b|\\bcookie-?(?:einstellungen|pr\xE4ferenzen)\\b|\\beinstellungen verwalten\\b",
|
|
1415
|
+
"\\bconfigura(?:r|ci\xF3n de)(?: las)? cookies\\b|\\bgestionar(?: las)? cookies\\b|\\bpersonalizar(?: las)? cookies\\b",
|
|
1416
|
+
"\\bparam[\xE9e]trer(?: les)? cookies\\b|\\bparam[\xE8e]tres(?: des)? cookies\\b|\\bg[\xE9e]rer(?: les)? cookies\\b|\\bpersonnaliser(?: les)? cookies\\b",
|
|
1417
|
+
"\\bgestisci(?: i)? cookie|\\bimpostazioni(?: dei| sui)? cookie|\\bpersonalizza(?: i)? cookie",
|
|
1418
|
+
"\\bcookie-?instellingen\\b|\\bcookies? beheren\\b|\\bvoorkeuren (?:beheren|aanpassen)\\b",
|
|
1419
|
+
"^\\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*$",
|
|
1420
|
+
"^\\s*close (?:this|the) (?:popup|banner|notice|message)\\s*$"
|
|
1421
|
+
].join("|"),
|
|
1422
|
+
"im"
|
|
1423
|
+
);
|
|
1424
|
+
var ageGateUnless = (control) => (text) => !LEAVE_LINE.test(text) && (control.test(text) || NOTICE_OWN_CONTROL.test(text));
|
|
1425
|
+
var CONSENT_WORDS = /cookie|consent|track|partner|personali[sz]|advertis|analytic|privacy (?:options|choices|settings|rights)|do not sell|opt[- ]out/i;
|
|
1426
|
+
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;
|
|
1427
|
+
var DETECT_CONTEXT_NEGATIVES = [
|
|
1428
|
+
// popups with their own age confirmation are age gates, even when they mention cookies; a bare accept doesn't count
|
|
1429
|
+
// as a cookie choice here, since it may confirm the age
|
|
1430
|
+
{ name: "age-gate-popup", pattern: AGE_WORDING, unless: ageGateUnless(COOKIE_CHOICE_RE), whole: true, input: "popup" },
|
|
1431
|
+
// a license or terms agreement may mention cookies, and its decline button must not be clicked as a cookie reject
|
|
1432
|
+
{ name: "legal-agreement", pattern: LEGAL_AGREEMENT, whole: true, input: "popup" },
|
|
1433
|
+
// page text next to an age gate, unless a consent control is there too
|
|
1434
|
+
{ name: "age-gate", pattern: AGE_WORDING, unless: ageGateUnless(NOTICE_CONTROL), lines: [4, 5], input: "page" },
|
|
1435
|
+
// terms of use need cookie or consent wording; a privacy-policy-only notice needs that or a button
|
|
1436
|
+
{
|
|
1437
|
+
name: "terms-without-consent",
|
|
1438
|
+
pattern: /\bterms\b|\bconditions\b/i,
|
|
1439
|
+
unless: CONSENT_WORDS,
|
|
1440
|
+
appliesTo: [BY_CONTINUING_PRIVACY]
|
|
1441
|
+
},
|
|
1442
|
+
{
|
|
1443
|
+
name: "privacy-without-control",
|
|
1444
|
+
unless: new RegExp(`${CONSENT_WORDS.source}|${DISMISS_LINE.source}`, "im"),
|
|
1445
|
+
appliesTo: [BY_CONTINUING_PRIVACY]
|
|
1446
|
+
},
|
|
1447
|
+
// a cookie policy link among short footer link lines
|
|
1448
|
+
{
|
|
1449
|
+
name: "footer-link",
|
|
1450
|
+
pattern: /^[^.!?:\n]{0,60}\n[\s]*\n?[^.!?:\s][^.!?:\n]{0,59}(?:\n|$)/,
|
|
1451
|
+
unless: NOTICE_CONTROL,
|
|
1452
|
+
lines: [0, 2],
|
|
1453
|
+
input: "page",
|
|
1454
|
+
appliesTo: [USE_OF_COOKIES, VERWENDUNG_VON_COOKIES, UTILISATION_DES_COOKIES, GEBRUIK_VAN_COOKIES]
|
|
1455
|
+
},
|
|
1456
|
+
// "accept all" in prose; case-sensitive since button labels run together in innerText
|
|
1457
|
+
{
|
|
1458
|
+
name: "accept-all-prose",
|
|
1459
|
+
pattern: /\baccept all [a-z]|\baccept All[a-z]/,
|
|
1460
|
+
unless: /accept all (?:cookies|and|&)/i,
|
|
1461
|
+
window: 15,
|
|
1462
|
+
appliesTo: [ACCEPT_ALL]
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
name: "acceptez-terms",
|
|
1466
|
+
pattern: /conditions (?:générales )?d.utilisation|\bcgu\b/i,
|
|
1467
|
+
unless: /cookie|témoin|traceur|partenaire/i,
|
|
1468
|
+
appliesTo: [ACCEPTEZ_UTILISATION]
|
|
1469
|
+
},
|
|
1470
|
+
// the same sentence is also a footer line with only a "learn more" link
|
|
1471
|
+
{ name: "de-cookie-verb-needs-control", unless: NOTICE_CONTROL, lines: [1, 6], input: "page", appliesTo: [DE_COOKIE_VERB] }
|
|
1472
|
+
];
|
|
1473
|
+
|
|
1474
|
+
// lib/heuristic-literals.ts
|
|
1475
|
+
var DETECT_PATTERN_LITERALS = [
|
|
1476
|
+
["accept cookies"],
|
|
1477
|
+
["accept all"],
|
|
1478
|
+
["reject all"],
|
|
1479
|
+
["only necessary cookies"],
|
|
1480
|
+
[],
|
|
1481
|
+
[],
|
|
1482
|
+
[" cookies"],
|
|
1483
|
+
["we are using cookies"],
|
|
1484
|
+
["use of cookies"],
|
|
1485
|
+
["website uses cookies to enhance your browsing experience"],
|
|
1486
|
+
["cookies"],
|
|
1487
|
+
[" technologies"],
|
|
1488
|
+
["such as cookies"],
|
|
1489
|
+
["read more about"],
|
|
1490
|
+
["consent to"],
|
|
1491
|
+
["we and our partners"],
|
|
1492
|
+
["information"],
|
|
1493
|
+
["store and/or access information"],
|
|
1494
|
+
["personalised ads and content, ad and content measurement"],
|
|
1495
|
+
[" and/or access"],
|
|
1496
|
+
["and our partners ask for your consent"],
|
|
1497
|
+
["we and "],
|
|
1498
|
+
["partners", "partnern", "partner", "partenaires", "socios", "vendors", "fornitori"],
|
|
1499
|
+
["partner"],
|
|
1500
|
+
["technolog"],
|
|
1501
|
+
["cookies"],
|
|
1502
|
+
["cookies"],
|
|
1503
|
+
["optional", "additional", "non-essential"],
|
|
1504
|
+
["storing of cookies", "placed cookies"],
|
|
1505
|
+
[" on your device", "access and store "],
|
|
1506
|
+
["we use "],
|
|
1507
|
+
["out of "],
|
|
1508
|
+
["out of the sale"],
|
|
1509
|
+
["this website or its third"],
|
|
1510
|
+
["information"],
|
|
1511
|
+
["rights with regard to the sale"],
|
|
1512
|
+
["we use technologies "],
|
|
1513
|
+
["continue reading with advertising", " tracking"],
|
|
1514
|
+
["consent and continue"],
|
|
1515
|
+
["store or retrieve information on your browser", "stock\xE9es dans votre navigateur ou r\xE9cup\xE9r\xE9es"],
|
|
1516
|
+
["utilisons"],
|
|
1517
|
+
["cookies"],
|
|
1518
|
+
["consentement"],
|
|
1519
|
+
["partenaires"],
|
|
1520
|
+
["publicit\xE9s"],
|
|
1521
|
+
["utilise"],
|
|
1522
|
+
["utilisent"],
|
|
1523
|
+
["stocker"],
|
|
1524
|
+
["consentement"],
|
|
1525
|
+
["consentement"],
|
|
1526
|
+
["accepter"],
|
|
1527
|
+
["utilisation"],
|
|
1528
|
+
["technologies"],
|
|
1529
|
+
["utilisation"],
|
|
1530
|
+
["continuer sans accepter"],
|
|
1531
|
+
["tout refuser"],
|
|
1532
|
+
[" tous les cookies"],
|
|
1533
|
+
["je refuse"],
|
|
1534
|
+
["refuser et continuer"],
|
|
1535
|
+
["refuser les cookies"],
|
|
1536
|
+
["seulement n\xE9cessaires"],
|
|
1537
|
+
["je d\xE9sactive les finalit\xE9s non essentielles"],
|
|
1538
|
+
["cookies essentiels uniquement"],
|
|
1539
|
+
["n\xE9cessaires uniquement"],
|
|
1540
|
+
["stocker", "stockons"],
|
|
1541
|
+
["nos partenaires demandent votre consentement"],
|
|
1542
|
+
["consentez \xE0 l", " cookies"],
|
|
1543
|
+
["les cookies nous permettent", "nos partenaires et nous"],
|
|
1544
|
+
["accepter "],
|
|
1545
|
+
["verwenden"],
|
|
1546
|
+
["partner"],
|
|
1547
|
+
["zugriff auf informationen auf"],
|
|
1548
|
+
["werbeleistung"],
|
|
1549
|
+
["cookies"],
|
|
1550
|
+
["verwendung"],
|
|
1551
|
+
["cookies"],
|
|
1552
|
+
["verwendet"],
|
|
1553
|
+
["auswahl"],
|
|
1554
|
+
["technologien"],
|
|
1555
|
+
["verwenden"],
|
|
1556
|
+
["ablehnen"],
|
|
1557
|
+
["zus\xE4tzliche", "essenzielle", "funktionale", "notwendige", "erforderliche"],
|
|
1558
|
+
["einwilligung", "zustimmung", "cookies"],
|
|
1559
|
+
["ablehnen"],
|
|
1560
|
+
["nur funktionale cookies akzeptieren"],
|
|
1561
|
+
["optionale ablehnen"],
|
|
1562
|
+
["zustimmung verweigern"],
|
|
1563
|
+
["speichern und/oder "],
|
|
1564
|
+
["unsere partner bitten um ihre zustimmung"],
|
|
1565
|
+
[" cookies"],
|
|
1566
|
+
["cookies "],
|
|
1567
|
+
[" zum einsatz", "einsatz von cookies"],
|
|
1568
|
+
["einverstanden", "einverstanden"],
|
|
1569
|
+
["akzeptieren", "zulassen", "erlauben", "zustimmen"],
|
|
1570
|
+
["zustimmen und weiter", " ohne zu "],
|
|
1571
|
+
["einwilligung", "zustimmung", "zustimmung", "einwilligung"],
|
|
1572
|
+
["tracking-technologien"],
|
|
1573
|
+
["verwendung "],
|
|
1574
|
+
["mit werbetracking weiterlesen", "weiter mit werbung", "con tracking e annunci"],
|
|
1575
|
+
["gebruik"],
|
|
1576
|
+
["gebruiken"],
|
|
1577
|
+
["vergelijkbare"],
|
|
1578
|
+
["afwijzen", "weigeren", "verwerpen"],
|
|
1579
|
+
["noodzakelijk"],
|
|
1580
|
+
["cookies weigeren"],
|
|
1581
|
+
["weiger"],
|
|
1582
|
+
["doorgaan zonder "],
|
|
1583
|
+
["optionele", "functionele", "functioneel", "noodzakelijke", "essenti\xEBle"],
|
|
1584
|
+
["wijs alles af"],
|
|
1585
|
+
[],
|
|
1586
|
+
["onze partners vragen om "],
|
|
1587
|
+
["wij en onze "],
|
|
1588
|
+
[" cookies"],
|
|
1589
|
+
["accepteer "],
|
|
1590
|
+
["analytische", "functionele", "essenti\xEBle", "noodzakelijke"],
|
|
1591
|
+
[" contin"],
|
|
1592
|
+
["cookie"],
|
|
1593
|
+
[" uso de cookies"],
|
|
1594
|
+
["usa cookies de google"],
|
|
1595
|
+
[" uso de cookies"],
|
|
1596
|
+
["al utilizar nuestro sitio web"],
|
|
1597
|
+
["almacenar la informaci\xF3n en un dispositivo y"],
|
|
1598
|
+
[" utiliza"],
|
|
1599
|
+
["cookies propias y de"],
|
|
1600
|
+
["son necesarias"],
|
|
1601
|
+
[" cookie"],
|
|
1602
|
+
["navegando"],
|
|
1603
|
+
["nosotros y nuestros"],
|
|
1604
|
+
["recopilamos y almacenamos datos de usted y de su dispositivo"],
|
|
1605
|
+
["utilizamos tecnolog"],
|
|
1606
|
+
["almacenar", "almacenamos"],
|
|
1607
|
+
["nuestros socios solicitan su consentimiento"],
|
|
1608
|
+
["tanto nosotros como", "nosotros y"],
|
|
1609
|
+
["aceptar", "rechazar", "continuar sin aceptar", "solo las necesarias"],
|
|
1610
|
+
["uso de "],
|
|
1611
|
+
["cookies "],
|
|
1612
|
+
["las cookies nos "],
|
|
1613
|
+
["instalamos", "empleamos"],
|
|
1614
|
+
["cookies", "necesitamos usar cookies"],
|
|
1615
|
+
[" cookie"],
|
|
1616
|
+
["u\u017Cywa\u0107", "u\u017Cywamy"],
|
|
1617
|
+
["cele przetwarzania twoich danych przez zaufanych partner\xF3w iab"],
|
|
1618
|
+
["dzi\u0119ki "],
|
|
1619
|
+
[" plik\xF3w cookie"],
|
|
1620
|
+
["korzystamy z technologii, takich jak pliki cookie"],
|
|
1621
|
+
["korzystamy"],
|
|
1622
|
+
["niekt\xF3re pliki cookies"],
|
|
1623
|
+
["pliki cookies i pokrewne im technologie umo\u017Cliwiaj\u0105 poprawne dzia\u0142anie strony i pomagaj\u0105 nam dostosowa\u0107 ofert\u0119 do twoich potrzeb"],
|
|
1624
|
+
["przechowywanie informacji na urz\u0105dzeniu lub dost\u0119p do nich"],
|
|
1625
|
+
["przechowywanie plik\xF3w cookie na swoim urz\u0105dzeniu"],
|
|
1626
|
+
["przechowywa\u0107 i uzyskiwa\u0107 dost\u0119p do informacji na twoich urz\u0105dzeniach"],
|
|
1627
|
+
["przetwarzamy"],
|
|
1628
|
+
[" u\u017Cywa "],
|
|
1629
|
+
["ta strona korzysta z ciasteczek"],
|
|
1630
|
+
["uzyskujemy dost\u0119p i przechowujemy informacje na urz\u0105dzeniu"],
|
|
1631
|
+
["u\u017Cywa plik"],
|
|
1632
|
+
["u\u017Cywamy plik\xF3w"],
|
|
1633
|
+
["wykorzystuj\u0105 "],
|
|
1634
|
+
["za pomoc\u0105 plik\xF3w cookies"],
|
|
1635
|
+
["zgod\u0105 my i nasi partnerzy mo\u017Cemy wykorzystywa\u0107 precyzyjne dane geolokalizacyjne i identyfikacj\u0119"],
|
|
1636
|
+
["cookies pr\xF2pies i de tercers"],
|
|
1637
|
+
["utilitzem galetes"],
|
|
1638
|
+
["\xFAnicament utilitza galetes pr\xF2pies amb finalitat t\xE8cnica"],
|
|
1639
|
+
["este lloc web utilitza nom\xE9s cookies t\xE8cniques necess\xE0ries per al seu funcionament"],
|
|
1640
|
+
["de personalitzaci\xF3 i an\xE0lisi"],
|
|
1641
|
+
["utilitzem cookies i altres tecnologies"],
|
|
1642
|
+
["cookies", "galetes"],
|
|
1643
|
+
["cookie propio eta hirugarrenenak helburu teknikoarekin erabiltzen ditu"],
|
|
1644
|
+
["cookie propioak eta hirugarrenen cookieak erabiltzen ditugu"],
|
|
1645
|
+
["cookie propioak eta hirugarrenenak helburu teknikoarekin erabiltzen ditu"],
|
|
1646
|
+
["ak erabiltzen ditu"],
|
|
1647
|
+
["cookieak erabiltzen ditu"],
|
|
1648
|
+
[" bazkideek cookieak eta identifikadoreak erabiltzen ditugu"],
|
|
1649
|
+
["norberaren eta hirugarrenen cookie"],
|
|
1650
|
+
["web orri honek cookieak erabiltzen ditu"],
|
|
1651
|
+
["webgune honek cookie propioak eta hirugarrenen cookie-fitxategiak erabiltzen ditu"],
|
|
1652
|
+
["empregamos cookies propias"],
|
|
1653
|
+
["este portal emprega cookies propias ou de terceiros con fins anal\xEDticos"],
|
|
1654
|
+
["\u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443"],
|
|
1655
|
+
["\u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443"],
|
|
1656
|
+
["cookie", "\u043A\u0443\u043A\u0438"],
|
|
1657
|
+
["\u0442\u0435\u0445\u043D\u043E\u043B\u043E\u0433\u0438"],
|
|
1658
|
+
["cookie", "\u043A\u0443\u043A\u0438"],
|
|
1659
|
+
[],
|
|
1660
|
+
["usiamo", "utilizziamo"],
|
|
1661
|
+
["cookie"],
|
|
1662
|
+
["noi e i nostri"],
|
|
1663
|
+
[" cookie"],
|
|
1664
|
+
[" cookie"],
|
|
1665
|
+
["tecnici", "di profilazione", "di terze parti", "analitici", "statistici", "di marketing"],
|
|
1666
|
+
["acconsent", "accett"],
|
|
1667
|
+
[" navigazione"],
|
|
1668
|
+
["accetta", "accetto", "accettare", "rifiuta", "rifiuto", "rifiutare"],
|
|
1669
|
+
[" senza accettare"],
|
|
1670
|
+
["rifiuta e abbonati"],
|
|
1671
|
+
["consenso "],
|
|
1672
|
+
[" nostri "],
|
|
1673
|
+
["terze parti selezionate"],
|
|
1674
|
+
["archiviare", "archiviamo", "memorizzare", "memorizziamo"],
|
|
1675
|
+
["anv\xE4nder"],
|
|
1676
|
+
["cookie", "\u30AF\u30C3\u30AD\u30FC"],
|
|
1677
|
+
["bruger cookies"],
|
|
1678
|
+
["informasjonskapsler", "cookies"]
|
|
1679
|
+
];
|
|
1680
|
+
|
|
1681
|
+
// lib/heuristic-prefilter.ts
|
|
1682
|
+
function literalIndex(all) {
|
|
1683
|
+
const distinct = [...new Set(all)].sort((a, b) => b.length - a.length);
|
|
1684
|
+
if (distinct.length === 0) {
|
|
1685
|
+
return { present: () => /* @__PURE__ */ new Set() };
|
|
1686
|
+
}
|
|
1687
|
+
const escape = (l) => l.replace(/[.*+?^${}()|[\]\\/]/g, "\\$&");
|
|
1688
|
+
const any = new RegExp(`(?=(${distinct.map(escape).join("|")}))`, "g");
|
|
1689
|
+
const implies = /* @__PURE__ */ new Map();
|
|
1690
|
+
const impliedBy = (m) => {
|
|
1691
|
+
let list = implies.get(m);
|
|
1692
|
+
if (!list) {
|
|
1693
|
+
list = distinct.filter((l) => m.startsWith(l));
|
|
1694
|
+
implies.set(m, list);
|
|
1695
|
+
}
|
|
1696
|
+
return list;
|
|
1697
|
+
};
|
|
1698
|
+
return {
|
|
1699
|
+
present(lower) {
|
|
1700
|
+
const found = /* @__PURE__ */ new Set();
|
|
1701
|
+
for (const m of lower.matchAll(any)) {
|
|
1702
|
+
if (!found.has(m[1])) {
|
|
1703
|
+
impliedBy(m[1]).forEach((l) => found.add(l));
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
return found;
|
|
1707
|
+
}
|
|
1708
|
+
};
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
// lib/heuristic-detect.ts
|
|
1282
1712
|
var TEXT_LIMIT = 1e5;
|
|
1283
|
-
|
|
1284
|
-
|
|
1713
|
+
var DEFAULT_WINDOW = 150;
|
|
1714
|
+
var builtinLiterals;
|
|
1715
|
+
function literalsOf(pattern) {
|
|
1716
|
+
if (!builtinLiterals) {
|
|
1717
|
+
const fresh = DETECT_PATTERN_LITERALS.length === DETECT_PATTERNS.length;
|
|
1718
|
+
builtinLiterals = new Map(fresh ? DETECT_PATTERNS.map((p, i) => [patternOf(p), DETECT_PATTERN_LITERALS[i]]) : []);
|
|
1719
|
+
}
|
|
1720
|
+
return builtinLiterals.get(pattern) ?? [];
|
|
1721
|
+
}
|
|
1722
|
+
var index;
|
|
1723
|
+
var literalsIn = (lower) => (index ??= literalIndex(DETECT_PATTERN_LITERALS.flat())).present(lower);
|
|
1724
|
+
var truncate = (text) => (text || "").slice(0, TEXT_LIMIT);
|
|
1725
|
+
var forInput = (scoped, input) => !scoped.input || scoped.input === input;
|
|
1726
|
+
var stateless = (re) => new RegExp(re.source, re.flags.replace(/[gy]/g, ""));
|
|
1727
|
+
function toPredicate(test) {
|
|
1728
|
+
if (typeof test === "function") {
|
|
1729
|
+
return test;
|
|
1730
|
+
}
|
|
1731
|
+
const re = stateless(test);
|
|
1732
|
+
return (text) => re.test(text);
|
|
1733
|
+
}
|
|
1734
|
+
var compiledPatterns = /* @__PURE__ */ new WeakMap();
|
|
1735
|
+
var compiledNegatives = /* @__PURE__ */ new WeakMap();
|
|
1736
|
+
function compilePatterns(detectPatterns) {
|
|
1737
|
+
let compiled = compiledPatterns.get(detectPatterns);
|
|
1738
|
+
if (!compiled) {
|
|
1739
|
+
compiled = detectPatterns.map((p) => {
|
|
1740
|
+
const pattern = patternOf(p);
|
|
1741
|
+
const input = p instanceof RegExp ? void 0 : p.input;
|
|
1742
|
+
const global = pattern.flags.includes("g") ? pattern : new RegExp(pattern.source, `${pattern.flags}g`);
|
|
1743
|
+
return { id: pattern.toString(), pattern, global, input, literals: literalsOf(pattern) };
|
|
1744
|
+
});
|
|
1745
|
+
compiledPatterns.set(detectPatterns, compiled);
|
|
1746
|
+
}
|
|
1747
|
+
return compiled;
|
|
1748
|
+
}
|
|
1749
|
+
function compileNegatives(negatives) {
|
|
1750
|
+
let compiled = compiledNegatives.get(negatives);
|
|
1751
|
+
if (!compiled) {
|
|
1752
|
+
compiled = negatives.map((n) => {
|
|
1753
|
+
const pattern = n.pattern ? stateless(n.pattern) : null;
|
|
1754
|
+
const unless = n.unless ? toPredicate(n.unless) : null;
|
|
1755
|
+
return {
|
|
1756
|
+
...n,
|
|
1757
|
+
hits: (context) => (!pattern || pattern.test(context)) && !(unless && unless(context)),
|
|
1758
|
+
applies: n.appliesTo ? new Set(n.appliesTo.map(String)) : null
|
|
1759
|
+
};
|
|
1760
|
+
});
|
|
1761
|
+
compiledNegatives.set(negatives, compiled);
|
|
1762
|
+
}
|
|
1763
|
+
return compiled;
|
|
1764
|
+
}
|
|
1765
|
+
function negativeContext(text, start, end, negative) {
|
|
1766
|
+
if (negative.whole) {
|
|
1767
|
+
return text;
|
|
1768
|
+
}
|
|
1769
|
+
if (negative.lines === void 0) {
|
|
1770
|
+
const w = negative.window ?? DEFAULT_WINDOW;
|
|
1771
|
+
return text.slice(Math.max(0, start - w), end + w);
|
|
1772
|
+
}
|
|
1773
|
+
const lineEnd = (i) => {
|
|
1774
|
+
const next = text.indexOf("\n", i);
|
|
1775
|
+
return next === -1 ? text.length : next;
|
|
1776
|
+
};
|
|
1777
|
+
const [before, after] = Array.isArray(negative.lines) ? negative.lines : [negative.lines, negative.lines];
|
|
1778
|
+
let from = start > 0 ? text.lastIndexOf("\n", start - 1) + 1 : 0;
|
|
1779
|
+
let to = lineEnd(end);
|
|
1780
|
+
for (let i = 0; i < before; i++) {
|
|
1781
|
+
from = from >= 2 ? text.lastIndexOf("\n", from - 2) + 1 : 0;
|
|
1782
|
+
}
|
|
1783
|
+
for (let i = 0; i < after; i++) {
|
|
1784
|
+
to = to < text.length ? lineEnd(to + 1) : to;
|
|
1785
|
+
}
|
|
1786
|
+
return text.slice(from, to);
|
|
1787
|
+
}
|
|
1788
|
+
function checkHeuristicPatterns(allText, input, options = {}) {
|
|
1789
|
+
return matchHeuristicPatterns(allText, input, options, false);
|
|
1790
|
+
}
|
|
1791
|
+
function hasHeuristicPatterns(allText, input, options = {}) {
|
|
1792
|
+
return matchHeuristicPatterns(allText, input, options, true).patterns.length > 0;
|
|
1793
|
+
}
|
|
1794
|
+
function matchHeuristicPatterns(allText, input, { patterns: detectPatterns = DETECT_PATTERNS, negatives = DETECT_CONTEXT_NEGATIVES }, firstOnly) {
|
|
1795
|
+
if (input !== void 0 && input !== "popup" && input !== "page") {
|
|
1796
|
+
const got = Array.isArray(input) ? "a pattern list (pass it as the `patterns` option)" : JSON.stringify(input);
|
|
1797
|
+
throw new TypeError(`heuristic input must be 'popup', 'page' or undefined, got ${got}`);
|
|
1798
|
+
}
|
|
1799
|
+
allText = truncate(allText);
|
|
1285
1800
|
const patterns = [];
|
|
1286
1801
|
const snippets2 = [];
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1802
|
+
const suppressed = [];
|
|
1803
|
+
const applicable = compileNegatives(negatives).filter((n) => forInput(n, input));
|
|
1804
|
+
let present;
|
|
1805
|
+
const wholeHits = /* @__PURE__ */ new Map();
|
|
1806
|
+
const hitsAt = (n, start, end) => {
|
|
1807
|
+
if (!n.whole) {
|
|
1808
|
+
return n.hits(negativeContext(allText, start, end, n));
|
|
1809
|
+
}
|
|
1810
|
+
let hit = wholeHits.get(n);
|
|
1811
|
+
if (hit === void 0) {
|
|
1812
|
+
hit = n.hits(allText);
|
|
1813
|
+
wholeHits.set(n, hit);
|
|
1814
|
+
}
|
|
1815
|
+
return hit;
|
|
1816
|
+
};
|
|
1817
|
+
for (const d of compilePatterns(detectPatterns)) {
|
|
1818
|
+
if (!forInput(d, input)) {
|
|
1819
|
+
continue;
|
|
1820
|
+
}
|
|
1821
|
+
if (d.literals.length) {
|
|
1822
|
+
const inText = present ??= literalsIn(allText.toLowerCase());
|
|
1823
|
+
if (!d.literals.some((l) => inText.has(l))) {
|
|
1824
|
+
continue;
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
const own = applicable.filter((n) => !n.applies || n.applies.has(d.id));
|
|
1828
|
+
const matched = [];
|
|
1829
|
+
const dropped = /* @__PURE__ */ new Set();
|
|
1830
|
+
let found = false;
|
|
1831
|
+
let kept = own.length === 0;
|
|
1832
|
+
for (const m of allText.matchAll(d.global)) {
|
|
1833
|
+
found = true;
|
|
1834
|
+
if (!kept) {
|
|
1835
|
+
const start = m.index ?? 0;
|
|
1836
|
+
const hit = own.find((n) => hitsAt(n, start, start + m[0].length));
|
|
1837
|
+
if (hit) {
|
|
1838
|
+
dropped.add(hit.name);
|
|
1839
|
+
} else {
|
|
1840
|
+
kept = true;
|
|
1294
1841
|
}
|
|
1295
1842
|
}
|
|
1843
|
+
if (kept && firstOnly) {
|
|
1844
|
+
break;
|
|
1845
|
+
}
|
|
1846
|
+
matched.push(m[0].substring(0, 200));
|
|
1296
1847
|
}
|
|
1848
|
+
if (!found) {
|
|
1849
|
+
continue;
|
|
1850
|
+
}
|
|
1851
|
+
if (!kept) {
|
|
1852
|
+
dropped.forEach((negative) => suppressed.push({ pattern: d.id, negative }));
|
|
1853
|
+
continue;
|
|
1854
|
+
}
|
|
1855
|
+
patterns.push(d.id);
|
|
1856
|
+
if (firstOnly) {
|
|
1857
|
+
break;
|
|
1858
|
+
}
|
|
1859
|
+
snippets2.push(...matched);
|
|
1297
1860
|
}
|
|
1298
|
-
return { patterns, snippets: snippets2 };
|
|
1299
|
-
}
|
|
1300
|
-
function hasHeuristicPatterns(allText, detectPatterns = DETECT_PATTERNS) {
|
|
1301
|
-
const text = allText.slice(0, TEXT_LIMIT);
|
|
1302
|
-
return detectPatterns.some((p) => text.search(p) !== -1);
|
|
1861
|
+
return { patterns, snippets: snippets2, suppressed };
|
|
1303
1862
|
}
|
|
1863
|
+
|
|
1864
|
+
// lib/heuristic-classify.ts
|
|
1304
1865
|
function classifyButtons(buttons) {
|
|
1305
1866
|
for (const button of buttons) {
|
|
1306
1867
|
button.regexClassification = classifyButtonTextRegex(button.text);
|
|
1307
1868
|
}
|
|
1308
1869
|
}
|
|
1309
|
-
function isExcludedPopup(popupText, excludePatterns = DETECT_NEVER_MATCH_PATTERNS) {
|
|
1310
|
-
if (!popupText) {
|
|
1311
|
-
return false;
|
|
1312
|
-
}
|
|
1313
|
-
const truncated = popupText.slice(0, TEXT_LIMIT);
|
|
1314
|
-
return excludePatterns.some((p) => p.test(truncated));
|
|
1315
|
-
}
|
|
1316
1870
|
function classifyPopup(buttons) {
|
|
1317
1871
|
const { reject, settings, accept, acknowledge } = buttons.reduce(
|
|
1318
1872
|
(acc, button) => {
|
|
@@ -1375,6 +1929,8 @@ function classifyButtonTextRegex(buttonText) {
|
|
|
1375
1929
|
// lib/heuristics.ts
|
|
1376
1930
|
var BUTTON_LIKE_ELEMENT_SELECTOR = 'button, input[type="button"], input[type="submit"], a, [role="button"], [class*="button"]';
|
|
1377
1931
|
var POPUP_SEARCH_MAX_TIME = 100;
|
|
1932
|
+
var FRAGMENT_NEGATIVES = DETECT_CONTEXT_NEGATIVES.filter((n) => !n.whole);
|
|
1933
|
+
var hasFragmentPatterns = (text) => hasHeuristicPatterns(text, "popup", { negatives: FRAGMENT_NEGATIVES });
|
|
1378
1934
|
var ACCEPTED_LEVELS = {
|
|
1379
1935
|
off: [],
|
|
1380
1936
|
reject: ["reject"],
|
|
@@ -1410,7 +1966,7 @@ function isConsentPopup(popup) {
|
|
|
1410
1966
|
let result = consentPopups.get(popup);
|
|
1411
1967
|
if (result === void 0) {
|
|
1412
1968
|
const popupText = popup.text.trim();
|
|
1413
|
-
result = !!popupText &&
|
|
1969
|
+
result = !!popupText && hasHeuristicPatterns(popupText, "popup");
|
|
1414
1970
|
consentPopups.set(popup, result);
|
|
1415
1971
|
}
|
|
1416
1972
|
return result;
|
|
@@ -1547,7 +2103,7 @@ function isOnlyButtonText(text, buttons) {
|
|
|
1547
2103
|
}
|
|
1548
2104
|
function toPopupRoot(el, shadowHosts) {
|
|
1549
2105
|
const text = getElementText(el);
|
|
1550
|
-
if (!text || !
|
|
2106
|
+
if (!text || !hasFragmentPatterns(text)) {
|
|
1551
2107
|
return null;
|
|
1552
2108
|
}
|
|
1553
2109
|
const popup = toPopupData(el, shadowHosts, text);
|
|
@@ -1568,7 +2124,7 @@ function climbToPopup(el, maxDepth, toPopup, shouldStop) {
|
|
|
1568
2124
|
return null;
|
|
1569
2125
|
}
|
|
1570
2126
|
function expandPopupFragment(popup, shadowHosts) {
|
|
1571
|
-
if (
|
|
2127
|
+
if (hasFragmentPatterns(popup.text) && hasPopupButtons(popup.text, popup.buttons)) {
|
|
1572
2128
|
return popup;
|
|
1573
2129
|
}
|
|
1574
2130
|
const parent = getComposedParent(popup.element);
|
|
@@ -2156,6 +2712,7 @@ var shortcutOptIn = "#truste-consent-button";
|
|
|
2156
2712
|
var popupContent = "#truste-consent-content";
|
|
2157
2713
|
var bannerOverlay = "#trustarc-banner-overlay";
|
|
2158
2714
|
var bannerContainer = "#truste-consent-track";
|
|
2715
|
+
var prefCenterDeclineAll = [".truste_popframe.trustarc_newcm_container", 'button[data-button-key="decline_all"]'];
|
|
2159
2716
|
var TrustArcTop = class extends AutoConsentCMPBase {
|
|
2160
2717
|
constructor(autoconsentInstance) {
|
|
2161
2718
|
super(autoconsentInstance);
|
|
@@ -2167,12 +2724,13 @@ var TrustArcTop = class extends AutoConsentCMPBase {
|
|
|
2167
2724
|
};
|
|
2168
2725
|
this._shortcutButton = null;
|
|
2169
2726
|
this._optInDone = false;
|
|
2727
|
+
this._optOutDone = false;
|
|
2170
2728
|
}
|
|
2171
2729
|
get hasSelfTest() {
|
|
2172
2730
|
return true;
|
|
2173
2731
|
}
|
|
2174
2732
|
get isIntermediate() {
|
|
2175
|
-
if (this._optInDone) {
|
|
2733
|
+
if (this._optInDone || this._optOutDone) {
|
|
2176
2734
|
return false;
|
|
2177
2735
|
}
|
|
2178
2736
|
return !this._shortcutButton;
|
|
@@ -2197,6 +2755,10 @@ var TrustArcTop = class extends AutoConsentCMPBase {
|
|
|
2197
2755
|
}
|
|
2198
2756
|
hideElements(getStyleElement(), `.truste_popframe, .truste_overlay, .truste_box_overlay, ${bannerContainer}`);
|
|
2199
2757
|
await this.click(cookieSettingsButton);
|
|
2758
|
+
if (await this.waitForElement(prefCenterDeclineAll, 3e3)) {
|
|
2759
|
+
this._optOutDone = true;
|
|
2760
|
+
await this.click(prefCenterDeclineAll);
|
|
2761
|
+
}
|
|
2200
2762
|
setTimeout(() => {
|
|
2201
2763
|
getStyleElement().remove();
|
|
2202
2764
|
}, 1e4);
|
|
@@ -2875,6 +3437,14 @@ var Admiral = class extends AutoConsentCMPBase {
|
|
|
2875
3437
|
async optOut() {
|
|
2876
3438
|
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')]";
|
|
2877
3439
|
if (await this.waitForElement(rejectAllSelector, 500)) {
|
|
3440
|
+
const rejectButton = this.elementSelector(rejectAllSelector)[0];
|
|
3441
|
+
if (rejectButton.disabled) {
|
|
3442
|
+
const cardBody = rejectButton.closest("div[class*=CardHeader]")?.parentElement?.querySelector("div[class*=CardBody]");
|
|
3443
|
+
if (cardBody) {
|
|
3444
|
+
cardBody.scrollTop = cardBody.scrollHeight;
|
|
3445
|
+
}
|
|
3446
|
+
await waitFor(() => !rejectButton.disabled, 10, 200);
|
|
3447
|
+
}
|
|
2878
3448
|
return await this.click(rejectAllSelector);
|
|
2879
3449
|
}
|
|
2880
3450
|
const vrmCloseButton = this.getVrmCloseButton();
|
|
@@ -3425,19 +3995,19 @@ function shouldRunRuleInContext(rule, mainFrame, url) {
|
|
|
3425
3995
|
return true;
|
|
3426
3996
|
}
|
|
3427
3997
|
function filterCompactRules(rules, context) {
|
|
3428
|
-
const { v, s, r, index } = rules;
|
|
3998
|
+
const { v, s, r, index: index2 } = rules;
|
|
3429
3999
|
const { url, mainFrame } = context;
|
|
3430
4000
|
const shouldRunInContext = (rule) => shouldRunRuleInContext(rule, mainFrame, url);
|
|
3431
4001
|
if (!mainFrame) {
|
|
3432
4002
|
const ruleset = {
|
|
3433
4003
|
v,
|
|
3434
|
-
s: s.slice(0,
|
|
3435
|
-
r: r.slice(
|
|
4004
|
+
s: s.slice(0, index2.frameStringEnd),
|
|
4005
|
+
r: r.slice(index2.frameRuleRange[0], index2.frameRuleRange[1]).filter(shouldRunInContext)
|
|
3436
4006
|
};
|
|
3437
4007
|
return clearUnusedStrings(ruleset);
|
|
3438
4008
|
}
|
|
3439
|
-
const genericRules = r.slice(
|
|
3440
|
-
const specificRules = r.slice(
|
|
4009
|
+
const genericRules = r.slice(index2.genericRuleRange[0], index2.genericRuleRange[1]);
|
|
4010
|
+
const specificRules = r.slice(index2.specificRuleRange[0], index2.specificRuleRange[1]).filter(shouldRunInContext);
|
|
3441
4011
|
if (specificRules.length > 0) {
|
|
3442
4012
|
const ruleset = {
|
|
3443
4013
|
v,
|
|
@@ -3448,7 +4018,7 @@ function filterCompactRules(rules, context) {
|
|
|
3448
4018
|
}
|
|
3449
4019
|
return {
|
|
3450
4020
|
v,
|
|
3451
|
-
s: s.slice(0,
|
|
4021
|
+
s: s.slice(0, index2.genericStringEnd),
|
|
3452
4022
|
r: genericRules
|
|
3453
4023
|
};
|
|
3454
4024
|
}
|
|
@@ -3724,7 +4294,7 @@ var AutoConsent = class {
|
|
|
3724
4294
|
detectHeuristics() {
|
|
3725
4295
|
if (this.config.enableHeuristicDetection) {
|
|
3726
4296
|
this.config.performanceLoggingEnabled && performance.mark("detectHeuristicsStart");
|
|
3727
|
-
const { patterns, snippets: snippets2 } = checkHeuristicPatterns(document.documentElement?.innerText || "");
|
|
4297
|
+
const { patterns, snippets: snippets2 } = checkHeuristicPatterns(document.documentElement?.innerText || "", "page");
|
|
3728
4298
|
if (patterns.length > 0 && (patterns.length !== this.state.heuristicPatterns.length || this.state.heuristicPatterns.some((p, i) => p !== patterns[i]))) {
|
|
3729
4299
|
this.config.logs.lifecycle && console.log("Heuristic patterns found", patterns, snippets2);
|
|
3730
4300
|
this.updateState({ heuristicPatterns: patterns, heuristicSnippets: snippets2 });
|