@adguard/dnr-converter 1.0.0-alpha.2 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.cjs CHANGED
@@ -30,7 +30,7 @@ function _interopNamespaceDefault(e) {
30
30
 
31
31
  var v__namespace = /*#__PURE__*/_interopNamespaceDefault(v);
32
32
 
33
- var version = "1.0.0-alpha.2";
33
+ var version = "1.1.1";
34
34
 
35
35
  /**
36
36
  * Version of the `@adguard/dnr-converter` package.
@@ -624,6 +624,7 @@ var version = "1.0.0-alpha.2";
624
624
  MEDIA: 'media',
625
625
  FONT: 'font',
626
626
  WEBSOCKET: 'websocket',
627
+ WEBRTC: 'webrtc',
627
628
  OTHER: 'other',
628
629
  PING: 'ping',
629
630
  BADFILTER: 'badfilter',
@@ -635,6 +636,7 @@ var version = "1.0.0-alpha.2";
635
636
  REMOVEPARAM: 'removeparam',
636
637
  REMOVEHEADER: 'removeheader',
637
638
  JSONPRUNE: 'jsonprune',
639
+ XMLPRUNE: 'xmlprune',
638
640
  HLS: 'hls',
639
641
  REFERRERPOLICY: 'referrerpolicy',
640
642
  APP: 'app',
@@ -654,7 +656,7 @@ var version = "1.0.0-alpha.2";
654
656
  });
655
657
 
656
658
  /*
657
- * AGTree v4.1.1 (build date: Tue, 14 Jul 2026 18:56:22 GMT)
659
+ * AGTree v4.2.1 (build date: Mon, 24 Aug 2026 11:14:07 GMT)
658
660
  * (c) 2026 Adguard Software Ltd.
659
661
  * Released under the MIT license
660
662
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -680,7 +682,7 @@ var version = "1.0.0-alpha.2";
680
682
  }
681
683
 
682
684
  /*
683
- * AGTree v4.1.1 (build date: Tue, 14 Jul 2026 18:56:22 GMT)
685
+ * AGTree v4.2.1 (build date: Mon, 24 Aug 2026 11:14:07 GMT)
684
686
  * (c) 2026 Adguard Software Ltd.
685
687
  * Released under the MIT license
686
688
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -802,7 +804,7 @@ var version = "1.0.0-alpha.2";
802
804
  };
803
805
 
804
806
  /*
805
- * AGTree v4.1.1 (build date: Tue, 14 Jul 2026 18:56:22 GMT)
807
+ * AGTree v4.2.1 (build date: Mon, 24 Aug 2026 11:14:07 GMT)
806
808
  * (c) 2026 Adguard Software Ltd.
807
809
  * Released under the MIT license
808
810
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -872,7 +874,7 @@ var version = "1.0.0-alpha.2";
872
874
  };
873
875
 
874
876
  /*
875
- * AGTree v4.1.1 (build date: Tue, 14 Jul 2026 18:56:22 GMT)
877
+ * AGTree v4.2.1 (build date: Mon, 24 Aug 2026 11:14:07 GMT)
876
878
  * (c) 2026 Adguard Software Ltd.
877
879
  * Released under the MIT license
878
880
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -914,7 +916,7 @@ const BASE_MESSAGE = 'Not implemented';
914
916
  }
915
917
 
916
918
  /*
917
- * AGTree v4.1.1 (build date: Tue, 14 Jul 2026 18:56:22 GMT)
919
+ * AGTree v4.2.1 (build date: Mon, 24 Aug 2026 11:14:07 GMT)
918
920
  * (c) 2026 Adguard Software Ltd.
919
921
  * Released under the MIT license
920
922
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -934,7 +936,7 @@ const BASE_MESSAGE = 'Not implemented';
934
936
  });
935
937
 
936
938
  /*
937
- * AGTree v4.1.1 (build date: Tue, 14 Jul 2026 18:56:22 GMT)
939
+ * AGTree v4.2.1 (build date: Mon, 24 Aug 2026 11:14:07 GMT)
938
940
  * (c) 2026 Adguard Software Ltd.
939
941
  * Released under the MIT license
940
942
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -949,7 +951,7 @@ const SPACE = ' ';
949
951
  const TAB$1 = '\t';
950
952
  const COLON = ':';
951
953
  const COMMA = ',';
952
- const DOT = '.';
954
+ const DOT$1 = '.';
953
955
  const SEMICOLON = ';';
954
956
  const AMPERSAND = '&';
955
957
  const ASTERISK = '*';
@@ -1729,7 +1731,7 @@ const DOUBLE_QUOTE_MARKER = '"';
1729
1731
  }
1730
1732
 
1731
1733
  /*
1732
- * AGTree v4.1.1 (build date: Tue, 14 Jul 2026 18:56:22 GMT)
1734
+ * AGTree v4.2.1 (build date: Mon, 24 Aug 2026 11:14:07 GMT)
1733
1735
  * (c) 2026 Adguard Software Ltd.
1734
1736
  * Released under the MIT license
1735
1737
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -4477,7 +4479,7 @@ function requireSprintf () {
4477
4479
  var sprintfExports = requireSprintf();
4478
4480
 
4479
4481
  /*
4480
- * CSSTokenizer v1.2.0 (build date: Tue, 14 Jul 2026 18:55:51 GMT)
4482
+ * CSSTokenizer v1.2.0 (build date: Mon, 24 Aug 2026 11:13:45 GMT)
4481
4483
  * (c) 2026 Adguard Software Ltd.
4482
4484
  * Released under the MIT license
4483
4485
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/css-tokenizer#readme
@@ -6074,7 +6076,7 @@ const XPATH_HASH = 196571984; // getStringHash('xpath')
6074
6076
  };
6075
6077
 
6076
6078
  /*
6077
- * AGTree v4.1.1 (build date: Tue, 14 Jul 2026 18:56:22 GMT)
6079
+ * AGTree v4.2.1 (build date: Mon, 24 Aug 2026 11:14:07 GMT)
6078
6080
  * (c) 2026 Adguard Software Ltd.
6079
6081
  * Released under the MIT license
6080
6082
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -6088,7 +6090,7 @@ const XPATH_HASH = 196571984; // getStringHash('xpath')
6088
6090
  };
6089
6091
 
6090
6092
  /*
6091
- * AGTree v4.1.1 (build date: Tue, 14 Jul 2026 18:56:22 GMT)
6093
+ * AGTree v4.2.1 (build date: Mon, 24 Aug 2026 11:14:07 GMT)
6092
6094
  * (c) 2026 Adguard Software Ltd.
6093
6095
  * Released under the MIT license
6094
6096
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -6179,7 +6181,7 @@ const XPATH_HASH = 196571984; // getStringHash('xpath')
6179
6181
  */ const REMOVE_VALUE = 'true';
6180
6182
 
6181
6183
  /*
6182
- * AGTree v4.1.1 (build date: Tue, 14 Jul 2026 18:56:22 GMT)
6184
+ * AGTree v4.2.1 (build date: Mon, 24 Aug 2026 11:14:07 GMT)
6183
6185
  * (c) 2026 Adguard Software Ltd.
6184
6186
  * Released under the MIT license
6185
6187
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -8221,7 +8223,7 @@ const ERROR_MESSAGES$6 = {
8221
8223
  }
8222
8224
 
8223
8225
  /*
8224
- * AGTree v4.1.1 (build date: Tue, 14 Jul 2026 18:56:22 GMT)
8226
+ * AGTree v4.2.1 (build date: Mon, 24 Aug 2026 11:14:07 GMT)
8225
8227
  * (c) 2026 Adguard Software Ltd.
8226
8228
  * Released under the MIT license
8227
8229
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -8519,7 +8521,7 @@ const ERROR_MESSAGES$6 = {
8519
8521
  break;
8520
8522
  }
8521
8523
  // Class selector ('.)
8522
- case DOT:
8524
+ case DOT$1:
8523
8525
  {
8524
8526
  ClassSelectorHandler.handle(context);
8525
8527
  break;
@@ -8830,7 +8832,7 @@ const ERROR_MESSAGES$6 = {
8830
8832
  }
8831
8833
 
8832
8834
  /*
8833
- * AGTree v4.1.1 (build date: Tue, 14 Jul 2026 18:56:22 GMT)
8835
+ * AGTree v4.2.1 (build date: Mon, 24 Aug 2026 11:14:07 GMT)
8834
8836
  * (c) 2026 Adguard Software Ltd.
8835
8837
  * Released under the MIT license
8836
8838
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -23078,7 +23080,7 @@ function getDomain(url, options = {}) {
23078
23080
  *
23079
23081
  * @returns String representation of the class selector.
23080
23082
  */ static generate(node) {
23081
- return DOT + node.value;
23083
+ return DOT$1 + node.value;
23082
23084
  }
23083
23085
  }
23084
23086
 
@@ -23866,7 +23868,7 @@ function getDomain(url, options = {}) {
23866
23868
  }
23867
23869
 
23868
23870
  /*
23869
- * AGTree v4.1.1 (build date: Tue, 14 Jul 2026 18:56:22 GMT)
23871
+ * AGTree v4.2.1 (build date: Mon, 24 Aug 2026 11:14:07 GMT)
23870
23872
  * (c) 2026 Adguard Software Ltd.
23871
23873
  * Released under the MIT license
23872
23874
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -23887,7 +23889,7 @@ function getDomain(url, options = {}) {
23887
23889
  }
23888
23890
 
23889
23891
  /*
23890
- * AGTree v4.1.1 (build date: Tue, 14 Jul 2026 18:56:22 GMT)
23892
+ * AGTree v4.2.1 (build date: Mon, 24 Aug 2026 11:14:07 GMT)
23891
23893
  * (c) 2026 Adguard Software Ltd.
23892
23894
  * Released under the MIT license
23893
23895
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -23935,7 +23937,7 @@ function getDomain(url, options = {}) {
23935
23937
  };
23936
23938
 
23937
23939
  /*
23938
- * AGTree v4.1.1 (build date: Tue, 14 Jul 2026 18:56:22 GMT)
23940
+ * AGTree v4.2.1 (build date: Mon, 24 Aug 2026 11:14:07 GMT)
23939
23941
  * (c) 2026 Adguard Software Ltd.
23940
23942
  * Released under the MIT license
23941
23943
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -24318,7 +24320,7 @@ const GenericPlatform = {
24318
24320
  }
24319
24321
 
24320
24322
  /*
24321
- * AGTree v4.1.1 (build date: Tue, 14 Jul 2026 18:56:22 GMT)
24323
+ * AGTree v4.2.1 (build date: Mon, 24 Aug 2026 11:14:07 GMT)
24322
24324
  * (c) 2026 Adguard Software Ltd.
24323
24325
  * Released under the MIT license
24324
24326
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -24344,6 +24346,7 @@ const GenericPlatform = {
24344
24346
  blockOnly: true,
24345
24347
  exceptionOnly: false,
24346
24348
  valueOptional: false,
24349
+ valueOptionalExceptionOnly: false,
24347
24350
  valueFormat: null,
24348
24351
  valueFormatFlags: null
24349
24352
  },
@@ -24365,6 +24368,7 @@ const GenericPlatform = {
24365
24368
  blockOnly: false,
24366
24369
  exceptionOnly: false,
24367
24370
  valueOptional: false,
24371
+ valueOptionalExceptionOnly: false,
24368
24372
  valueFormat: null,
24369
24373
  valueFormatFlags: null
24370
24374
  }
@@ -24405,6 +24409,7 @@ const GenericPlatform = {
24405
24409
  blockOnly: false,
24406
24410
  exceptionOnly: false,
24407
24411
  valueOptional: false,
24412
+ valueOptionalExceptionOnly: false,
24408
24413
  valueFormat: 'pipe_separated_apps',
24409
24414
  valueFormatFlags: null
24410
24415
  }
@@ -24435,6 +24440,7 @@ const GenericPlatform = {
24435
24440
  blockOnly: false,
24436
24441
  exceptionOnly: false,
24437
24442
  valueOptional: false,
24443
+ valueOptionalExceptionOnly: false,
24438
24444
  valueFormat: null,
24439
24445
  valueFormatFlags: null
24440
24446
  },
@@ -24456,6 +24462,7 @@ const GenericPlatform = {
24456
24462
  blockOnly: false,
24457
24463
  exceptionOnly: false,
24458
24464
  valueOptional: false,
24465
+ valueOptionalExceptionOnly: false,
24459
24466
  valueFormat: null,
24460
24467
  valueFormatFlags: null
24461
24468
  }
@@ -24496,6 +24503,7 @@ const GenericPlatform = {
24496
24503
  blockOnly: false,
24497
24504
  exceptionOnly: true,
24498
24505
  valueOptional: false,
24506
+ valueOptionalExceptionOnly: false,
24499
24507
  valueFormat: null,
24500
24508
  valueFormatFlags: null
24501
24509
  }
@@ -24527,6 +24535,7 @@ const GenericPlatform = {
24527
24535
  blockOnly: false,
24528
24536
  exceptionOnly: true,
24529
24537
  valueOptional: false,
24538
+ valueOptionalExceptionOnly: false,
24530
24539
  valueFormat: null,
24531
24540
  valueFormatFlags: null
24532
24541
  }
@@ -24557,6 +24566,7 @@ const GenericPlatform = {
24557
24566
  blockOnly: false,
24558
24567
  exceptionOnly: false,
24559
24568
  valueOptional: true,
24569
+ valueOptionalExceptionOnly: false,
24560
24570
  valueFormat: '^([^;=\\s]*?)((?:;(maxAge=\\d+;?)?|(sameSite=(lax|none|strict);?)?){1,3})(?<!;)$',
24561
24571
  valueFormatFlags: null
24562
24572
  }
@@ -24596,6 +24606,7 @@ const GenericPlatform = {
24596
24606
  blockOnly: false,
24597
24607
  exceptionOnly: false,
24598
24608
  valueOptional: true,
24609
+ valueOptionalExceptionOnly: true,
24599
24610
  valueFormat: 'csp_value',
24600
24611
  valueFormatFlags: null
24601
24612
  },
@@ -24622,6 +24633,7 @@ const GenericPlatform = {
24622
24633
  blockOnly: false,
24623
24634
  exceptionOnly: false,
24624
24635
  valueOptional: true,
24636
+ valueOptionalExceptionOnly: false,
24625
24637
  valueFormat: 'csp_value',
24626
24638
  valueFormatFlags: null
24627
24639
  },
@@ -24646,6 +24658,7 @@ const GenericPlatform = {
24646
24658
  blockOnly: false,
24647
24659
  exceptionOnly: false,
24648
24660
  valueOptional: true,
24661
+ valueOptionalExceptionOnly: false,
24649
24662
  valueFormat: 'csp_value',
24650
24663
  valueFormatFlags: null
24651
24664
  }
@@ -24690,6 +24703,7 @@ const GenericPlatform = {
24690
24703
  blockOnly: false,
24691
24704
  exceptionOnly: false,
24692
24705
  valueOptional: false,
24706
+ valueOptionalExceptionOnly: false,
24693
24707
  valueFormat: 'pipe_separated_denyallow_domains',
24694
24708
  valueFormatFlags: null
24695
24709
  },
@@ -24713,6 +24727,7 @@ const GenericPlatform = {
24713
24727
  blockOnly: false,
24714
24728
  exceptionOnly: false,
24715
24729
  valueOptional: false,
24730
+ valueOptionalExceptionOnly: false,
24716
24731
  valueFormat: 'pipe_separated_denyallow_domains',
24717
24732
  valueFormatFlags: null
24718
24733
  }
@@ -24753,6 +24768,7 @@ const GenericPlatform = {
24753
24768
  blockOnly: false,
24754
24769
  exceptionOnly: false,
24755
24770
  valueOptional: false,
24771
+ valueOptionalExceptionOnly: false,
24756
24772
  valueFormat: null,
24757
24773
  valueFormatFlags: null
24758
24774
  },
@@ -24774,6 +24790,7 @@ const GenericPlatform = {
24774
24790
  blockOnly: false,
24775
24791
  exceptionOnly: false,
24776
24792
  valueOptional: false,
24793
+ valueOptionalExceptionOnly: false,
24777
24794
  valueFormat: null,
24778
24795
  valueFormatFlags: null
24779
24796
  },
@@ -24795,6 +24812,7 @@ const GenericPlatform = {
24795
24812
  blockOnly: false,
24796
24813
  exceptionOnly: false,
24797
24814
  valueOptional: false,
24815
+ valueOptionalExceptionOnly: false,
24798
24816
  valueFormat: null,
24799
24817
  valueFormatFlags: null
24800
24818
  },
@@ -24816,6 +24834,7 @@ const GenericPlatform = {
24816
24834
  blockOnly: false,
24817
24835
  exceptionOnly: false,
24818
24836
  valueOptional: false,
24837
+ valueOptionalExceptionOnly: false,
24819
24838
  valueFormat: null,
24820
24839
  valueFormatFlags: null
24821
24840
  },
@@ -24839,6 +24858,7 @@ const GenericPlatform = {
24839
24858
  blockOnly: false,
24840
24859
  exceptionOnly: false,
24841
24860
  valueOptional: false,
24861
+ valueOptionalExceptionOnly: false,
24842
24862
  valueFormat: null,
24843
24863
  valueFormatFlags: null
24844
24864
  },
@@ -24860,6 +24880,7 @@ const GenericPlatform = {
24860
24880
  blockOnly: false,
24861
24881
  exceptionOnly: false,
24862
24882
  valueOptional: false,
24883
+ valueOptionalExceptionOnly: false,
24863
24884
  valueFormat: null,
24864
24885
  valueFormatFlags: null
24865
24886
  }
@@ -24906,6 +24927,7 @@ const GenericPlatform = {
24906
24927
  blockOnly: false,
24907
24928
  exceptionOnly: false,
24908
24929
  valueOptional: false,
24930
+ valueOptionalExceptionOnly: false,
24909
24931
  valueFormat: 'pipe_separated_domains',
24910
24932
  valueFormatFlags: null
24911
24933
  },
@@ -24929,6 +24951,7 @@ const GenericPlatform = {
24929
24951
  blockOnly: false,
24930
24952
  exceptionOnly: false,
24931
24953
  valueOptional: false,
24954
+ valueOptionalExceptionOnly: false,
24932
24955
  valueFormat: 'pipe_separated_domains',
24933
24956
  valueFormatFlags: null
24934
24957
  },
@@ -24950,6 +24973,7 @@ const GenericPlatform = {
24950
24973
  blockOnly: false,
24951
24974
  exceptionOnly: false,
24952
24975
  valueOptional: false,
24976
+ valueOptionalExceptionOnly: false,
24953
24977
  valueFormat: 'pipe_separated_domains',
24954
24978
  valueFormatFlags: null
24955
24979
  }
@@ -24997,6 +25021,7 @@ const GenericPlatform = {
24997
25021
  blockOnly: false,
24998
25022
  exceptionOnly: true,
24999
25023
  valueOptional: false,
25024
+ valueOptionalExceptionOnly: false,
25000
25025
  valueFormat: null,
25001
25026
  valueFormatFlags: null
25002
25027
  },
@@ -25020,6 +25045,7 @@ const GenericPlatform = {
25020
25045
  blockOnly: false,
25021
25046
  exceptionOnly: true,
25022
25047
  valueOptional: false,
25048
+ valueOptionalExceptionOnly: false,
25023
25049
  valueFormat: null,
25024
25050
  valueFormatFlags: null
25025
25051
  },
@@ -25043,6 +25069,7 @@ const GenericPlatform = {
25043
25069
  blockOnly: false,
25044
25070
  exceptionOnly: true,
25045
25071
  valueOptional: false,
25072
+ valueOptionalExceptionOnly: false,
25046
25073
  valueFormat: null,
25047
25074
  valueFormatFlags: null
25048
25075
  }
@@ -25088,6 +25115,7 @@ const GenericPlatform = {
25088
25115
  blockOnly: false,
25089
25116
  exceptionOnly: false,
25090
25117
  valueOptional: false,
25118
+ valueOptionalExceptionOnly: false,
25091
25119
  valueFormat: null,
25092
25120
  valueFormatFlags: null
25093
25121
  },
@@ -25109,6 +25137,7 @@ const GenericPlatform = {
25109
25137
  blockOnly: false,
25110
25138
  exceptionOnly: false,
25111
25139
  valueOptional: false,
25140
+ valueOptionalExceptionOnly: false,
25112
25141
  valueFormat: null,
25113
25142
  valueFormatFlags: null
25114
25143
  },
@@ -25130,6 +25159,7 @@ const GenericPlatform = {
25130
25159
  blockOnly: false,
25131
25160
  exceptionOnly: false,
25132
25161
  valueOptional: false,
25162
+ valueOptionalExceptionOnly: false,
25133
25163
  valueFormat: null,
25134
25164
  valueFormatFlags: null
25135
25165
  }
@@ -25179,6 +25209,7 @@ const GenericPlatform = {
25179
25209
  blockOnly: false,
25180
25210
  exceptionOnly: true,
25181
25211
  valueOptional: false,
25212
+ valueOptionalExceptionOnly: false,
25182
25213
  valueFormat: null,
25183
25214
  valueFormatFlags: null
25184
25215
  }
@@ -25212,6 +25243,7 @@ const GenericPlatform = {
25212
25243
  blockOnly: false,
25213
25244
  exceptionOnly: false,
25214
25245
  valueOptional: false,
25246
+ valueOptionalExceptionOnly: false,
25215
25247
  valueFormat: null,
25216
25248
  valueFormatFlags: null
25217
25249
  },
@@ -25236,6 +25268,7 @@ const GenericPlatform = {
25236
25268
  blockOnly: false,
25237
25269
  exceptionOnly: false,
25238
25270
  valueOptional: false,
25271
+ valueOptionalExceptionOnly: false,
25239
25272
  valueFormat: null,
25240
25273
  valueFormatFlags: null
25241
25274
  }
@@ -25277,6 +25310,7 @@ const GenericPlatform = {
25277
25310
  blockOnly: false,
25278
25311
  exceptionOnly: false,
25279
25312
  valueOptional: false,
25313
+ valueOptionalExceptionOnly: false,
25280
25314
  valueFormat: null,
25281
25315
  valueFormatFlags: null
25282
25316
  },
@@ -25298,6 +25332,7 @@ const GenericPlatform = {
25298
25332
  blockOnly: false,
25299
25333
  exceptionOnly: false,
25300
25334
  valueOptional: false,
25335
+ valueOptionalExceptionOnly: false,
25301
25336
  valueFormat: null,
25302
25337
  valueFormatFlags: null
25303
25338
  },
@@ -25319,6 +25354,7 @@ const GenericPlatform = {
25319
25354
  blockOnly: false,
25320
25355
  exceptionOnly: false,
25321
25356
  valueOptional: false,
25357
+ valueOptionalExceptionOnly: false,
25322
25358
  valueFormat: null,
25323
25359
  valueFormatFlags: null
25324
25360
  }
@@ -25373,6 +25409,7 @@ const GenericPlatform = {
25373
25409
  blockOnly: false,
25374
25410
  exceptionOnly: true,
25375
25411
  valueOptional: false,
25412
+ valueOptionalExceptionOnly: false,
25376
25413
  valueFormat: null,
25377
25414
  valueFormatFlags: null
25378
25415
  },
@@ -25401,6 +25438,7 @@ const GenericPlatform = {
25401
25438
  blockOnly: false,
25402
25439
  exceptionOnly: true,
25403
25440
  valueOptional: false,
25441
+ valueOptionalExceptionOnly: false,
25404
25442
  valueFormat: null,
25405
25443
  valueFormatFlags: null
25406
25444
  },
@@ -25429,6 +25467,7 @@ const GenericPlatform = {
25429
25467
  blockOnly: false,
25430
25468
  exceptionOnly: true,
25431
25469
  valueOptional: false,
25470
+ valueOptionalExceptionOnly: false,
25432
25471
  valueFormat: null,
25433
25472
  valueFormatFlags: null
25434
25473
  },
@@ -25457,6 +25496,7 @@ const GenericPlatform = {
25457
25496
  blockOnly: false,
25458
25497
  exceptionOnly: true,
25459
25498
  valueOptional: false,
25499
+ valueOptionalExceptionOnly: false,
25460
25500
  valueFormat: null,
25461
25501
  valueFormatFlags: null
25462
25502
  },
@@ -25478,6 +25518,7 @@ const GenericPlatform = {
25478
25518
  blockOnly: false,
25479
25519
  exceptionOnly: true,
25480
25520
  valueOptional: false,
25521
+ valueOptionalExceptionOnly: false,
25481
25522
  valueFormat: null,
25482
25523
  valueFormatFlags: null
25483
25524
  }
@@ -25529,6 +25570,7 @@ const GenericPlatform = {
25529
25570
  blockOnly: false,
25530
25571
  exceptionOnly: true,
25531
25572
  valueOptional: false,
25573
+ valueOptionalExceptionOnly: false,
25532
25574
  valueFormat: null,
25533
25575
  valueFormatFlags: null
25534
25576
  },
@@ -25555,6 +25597,7 @@ const GenericPlatform = {
25555
25597
  blockOnly: false,
25556
25598
  exceptionOnly: true,
25557
25599
  valueOptional: false,
25600
+ valueOptionalExceptionOnly: false,
25558
25601
  valueFormat: null,
25559
25602
  valueFormatFlags: null
25560
25603
  },
@@ -25578,6 +25621,7 @@ const GenericPlatform = {
25578
25621
  blockOnly: false,
25579
25622
  exceptionOnly: true,
25580
25623
  valueOptional: false,
25624
+ valueOptionalExceptionOnly: false,
25581
25625
  valueFormat: null,
25582
25626
  valueFormatFlags: null
25583
25627
  }
@@ -25623,6 +25667,7 @@ const GenericPlatform = {
25623
25667
  blockOnly: false,
25624
25668
  exceptionOnly: false,
25625
25669
  valueOptional: false,
25670
+ valueOptionalExceptionOnly: false,
25626
25671
  valueFormat: '^(?:)[\\w-]+(:(?:)(\\w+|\\/.+\\/))?',
25627
25672
  valueFormatFlags: 'i'
25628
25673
  },
@@ -25644,6 +25689,7 @@ const GenericPlatform = {
25644
25689
  blockOnly: false,
25645
25690
  exceptionOnly: false,
25646
25691
  valueOptional: false,
25692
+ valueOptionalExceptionOnly: false,
25647
25693
  valueFormat: '^(?:)[\\w-]+(:(?:)(\\w+|\\/.+\\/))?',
25648
25694
  valueFormatFlags: 'i'
25649
25695
  },
@@ -25665,6 +25711,7 @@ const GenericPlatform = {
25665
25711
  blockOnly: false,
25666
25712
  exceptionOnly: false,
25667
25713
  valueOptional: false,
25714
+ valueOptionalExceptionOnly: false,
25668
25715
  valueFormat: '^(?:)[\\w-]+(:(?:)(\\w+|\\/.+\\/))?',
25669
25716
  valueFormatFlags: 'i'
25670
25717
  }
@@ -25710,6 +25757,7 @@ const GenericPlatform = {
25710
25757
  blockOnly: false,
25711
25758
  exceptionOnly: false,
25712
25759
  valueOptional: true,
25760
+ valueOptionalExceptionOnly: false,
25713
25761
  valueFormat: '((?:)\\w+(?:)|(?:)\\/.+\\/(?:)([ti]*)?)',
25714
25762
  valueFormatFlags: 'i'
25715
25763
  }
@@ -25740,6 +25788,7 @@ const GenericPlatform = {
25740
25788
  blockOnly: false,
25741
25789
  exceptionOnly: false,
25742
25790
  valueOptional: false,
25791
+ valueOptionalExceptionOnly: false,
25743
25792
  valueFormat: null,
25744
25793
  valueFormatFlags: null
25745
25794
  },
@@ -25761,6 +25810,7 @@ const GenericPlatform = {
25761
25810
  blockOnly: false,
25762
25811
  exceptionOnly: false,
25763
25812
  valueOptional: false,
25813
+ valueOptionalExceptionOnly: false,
25764
25814
  valueFormat: null,
25765
25815
  valueFormatFlags: null
25766
25816
  },
@@ -25782,6 +25832,7 @@ const GenericPlatform = {
25782
25832
  blockOnly: false,
25783
25833
  exceptionOnly: false,
25784
25834
  valueOptional: false,
25835
+ valueOptionalExceptionOnly: false,
25785
25836
  valueFormat: null,
25786
25837
  valueFormatFlags: null
25787
25838
  }
@@ -25827,6 +25878,7 @@ const GenericPlatform = {
25827
25878
  blockOnly: false,
25828
25879
  exceptionOnly: false,
25829
25880
  valueOptional: false,
25881
+ valueOptionalExceptionOnly: false,
25830
25882
  valueFormat: null,
25831
25883
  valueFormatFlags: null
25832
25884
  },
@@ -25848,6 +25900,7 @@ const GenericPlatform = {
25848
25900
  blockOnly: false,
25849
25901
  exceptionOnly: false,
25850
25902
  valueOptional: false,
25903
+ valueOptionalExceptionOnly: false,
25851
25904
  valueFormat: null,
25852
25905
  valueFormatFlags: null
25853
25906
  }
@@ -25889,6 +25942,7 @@ const GenericPlatform = {
25889
25942
  blockOnly: false,
25890
25943
  exceptionOnly: false,
25891
25944
  valueOptional: false,
25945
+ valueOptionalExceptionOnly: false,
25892
25946
  valueFormat: null,
25893
25947
  valueFormatFlags: null
25894
25948
  },
@@ -25910,6 +25964,7 @@ const GenericPlatform = {
25910
25964
  blockOnly: false,
25911
25965
  exceptionOnly: false,
25912
25966
  valueOptional: false,
25967
+ valueOptionalExceptionOnly: false,
25913
25968
  valueFormat: null,
25914
25969
  valueFormatFlags: null
25915
25970
  },
@@ -25931,6 +25986,7 @@ const GenericPlatform = {
25931
25986
  blockOnly: false,
25932
25987
  exceptionOnly: false,
25933
25988
  valueOptional: false,
25989
+ valueOptionalExceptionOnly: false,
25934
25990
  valueFormat: null,
25935
25991
  valueFormatFlags: null
25936
25992
  }
@@ -25969,6 +26025,7 @@ const GenericPlatform = {
25969
26025
  blockOnly: false,
25970
26026
  exceptionOnly: false,
25971
26027
  valueOptional: false,
26028
+ valueOptionalExceptionOnly: false,
25972
26029
  valueFormat: null,
25973
26030
  valueFormatFlags: null
25974
26031
  },
@@ -25990,6 +26047,7 @@ const GenericPlatform = {
25990
26047
  blockOnly: false,
25991
26048
  exceptionOnly: false,
25992
26049
  valueOptional: false,
26050
+ valueOptionalExceptionOnly: false,
25993
26051
  valueFormat: null,
25994
26052
  valueFormatFlags: null
25995
26053
  },
@@ -26011,6 +26069,7 @@ const GenericPlatform = {
26011
26069
  blockOnly: false,
26012
26070
  exceptionOnly: false,
26013
26071
  valueOptional: false,
26072
+ valueOptionalExceptionOnly: false,
26014
26073
  valueFormat: null,
26015
26074
  valueFormatFlags: null
26016
26075
  }
@@ -26060,6 +26119,7 @@ const GenericPlatform = {
26060
26119
  blockOnly: false,
26061
26120
  exceptionOnly: true,
26062
26121
  valueOptional: false,
26122
+ valueOptionalExceptionOnly: false,
26063
26123
  valueFormat: null,
26064
26124
  valueFormatFlags: null
26065
26125
  },
@@ -26090,6 +26150,7 @@ const GenericPlatform = {
26090
26150
  blockOnly: false,
26091
26151
  exceptionOnly: true,
26092
26152
  valueOptional: false,
26153
+ valueOptionalExceptionOnly: false,
26093
26154
  valueFormat: null,
26094
26155
  valueFormatFlags: null
26095
26156
  },
@@ -26120,6 +26181,7 @@ const GenericPlatform = {
26120
26181
  blockOnly: false,
26121
26182
  exceptionOnly: true,
26122
26183
  valueOptional: false,
26184
+ valueOptionalExceptionOnly: false,
26123
26185
  valueFormat: null,
26124
26186
  valueFormatFlags: null
26125
26187
  },
@@ -26150,6 +26212,7 @@ const GenericPlatform = {
26150
26212
  blockOnly: false,
26151
26213
  exceptionOnly: true,
26152
26214
  valueOptional: false,
26215
+ valueOptionalExceptionOnly: false,
26153
26216
  valueFormat: null,
26154
26217
  valueFormatFlags: null
26155
26218
  }
@@ -26186,6 +26249,7 @@ const GenericPlatform = {
26186
26249
  blockOnly: false,
26187
26250
  exceptionOnly: false,
26188
26251
  valueOptional: true,
26252
+ valueOptionalExceptionOnly: false,
26189
26253
  valueFormat: '^(?:)\\\\(?:)\\$(?:)\\.?(?:).+(?:)$',
26190
26254
  valueFormatFlags: 'i'
26191
26255
  }
@@ -26216,6 +26280,7 @@ const GenericPlatform = {
26216
26280
  blockOnly: false,
26217
26281
  exceptionOnly: false,
26218
26282
  valueOptional: false,
26283
+ valueOptionalExceptionOnly: false,
26219
26284
  valueFormat: null,
26220
26285
  valueFormatFlags: null
26221
26286
  },
@@ -26237,6 +26302,7 @@ const GenericPlatform = {
26237
26302
  blockOnly: false,
26238
26303
  exceptionOnly: false,
26239
26304
  valueOptional: false,
26305
+ valueOptionalExceptionOnly: false,
26240
26306
  valueFormat: null,
26241
26307
  valueFormatFlags: null
26242
26308
  },
@@ -26258,6 +26324,7 @@ const GenericPlatform = {
26258
26324
  blockOnly: false,
26259
26325
  exceptionOnly: false,
26260
26326
  valueOptional: false,
26327
+ valueOptionalExceptionOnly: false,
26261
26328
  valueFormat: null,
26262
26329
  valueFormatFlags: null
26263
26330
  }
@@ -26303,6 +26370,7 @@ const GenericPlatform = {
26303
26370
  blockOnly: false,
26304
26371
  exceptionOnly: false,
26305
26372
  valueOptional: false,
26373
+ valueOptionalExceptionOnly: false,
26306
26374
  valueFormat: null,
26307
26375
  valueFormatFlags: null
26308
26376
  },
@@ -26324,6 +26392,7 @@ const GenericPlatform = {
26324
26392
  blockOnly: false,
26325
26393
  exceptionOnly: false,
26326
26394
  valueOptional: false,
26395
+ valueOptionalExceptionOnly: false,
26327
26396
  valueFormat: null,
26328
26397
  valueFormatFlags: null
26329
26398
  },
@@ -26345,6 +26414,7 @@ const GenericPlatform = {
26345
26414
  blockOnly: false,
26346
26415
  exceptionOnly: false,
26347
26416
  valueOptional: false,
26417
+ valueOptionalExceptionOnly: false,
26348
26418
  valueFormat: null,
26349
26419
  valueFormatFlags: null
26350
26420
  }
@@ -26390,6 +26460,7 @@ const GenericPlatform = {
26390
26460
  blockOnly: false,
26391
26461
  exceptionOnly: false,
26392
26462
  valueOptional: false,
26463
+ valueOptionalExceptionOnly: false,
26393
26464
  valueFormat: 'pipe_separated_methods',
26394
26465
  valueFormatFlags: null
26395
26466
  },
@@ -26411,6 +26482,7 @@ const GenericPlatform = {
26411
26482
  blockOnly: false,
26412
26483
  exceptionOnly: false,
26413
26484
  valueOptional: false,
26485
+ valueOptionalExceptionOnly: false,
26414
26486
  valueFormat: 'pipe_separated_methods',
26415
26487
  valueFormatFlags: null
26416
26488
  },
@@ -26432,6 +26504,7 @@ const GenericPlatform = {
26432
26504
  blockOnly: false,
26433
26505
  exceptionOnly: false,
26434
26506
  valueOptional: false,
26507
+ valueOptionalExceptionOnly: false,
26435
26508
  valueFormat: 'pipe_separated_methods',
26436
26509
  valueFormatFlags: null
26437
26510
  }
@@ -26470,6 +26543,7 @@ const GenericPlatform = {
26470
26543
  blockOnly: false,
26471
26544
  exceptionOnly: false,
26472
26545
  valueOptional: false,
26546
+ valueOptionalExceptionOnly: false,
26473
26547
  valueFormat: null,
26474
26548
  valueFormatFlags: null
26475
26549
  },
@@ -26491,6 +26565,7 @@ const GenericPlatform = {
26491
26565
  blockOnly: false,
26492
26566
  exceptionOnly: false,
26493
26567
  valueOptional: false,
26568
+ valueOptionalExceptionOnly: false,
26494
26569
  valueFormat: null,
26495
26570
  valueFormatFlags: null
26496
26571
  },
@@ -26512,6 +26587,7 @@ const GenericPlatform = {
26512
26587
  blockOnly: false,
26513
26588
  exceptionOnly: false,
26514
26589
  valueOptional: false,
26590
+ valueOptionalExceptionOnly: false,
26515
26591
  valueFormat: null,
26516
26592
  valueFormatFlags: null
26517
26593
  }
@@ -26553,6 +26629,7 @@ const GenericPlatform = {
26553
26629
  blockOnly: false,
26554
26630
  exceptionOnly: false,
26555
26631
  valueOptional: false,
26632
+ valueOptionalExceptionOnly: false,
26556
26633
  valueFormat: null,
26557
26634
  valueFormatFlags: null
26558
26635
  }
@@ -26583,6 +26660,7 @@ const GenericPlatform = {
26583
26660
  blockOnly: false,
26584
26661
  exceptionOnly: false,
26585
26662
  valueOptional: false,
26663
+ valueOptionalExceptionOnly: false,
26586
26664
  valueFormat: null,
26587
26665
  valueFormatFlags: null
26588
26666
  },
@@ -26604,6 +26682,7 @@ const GenericPlatform = {
26604
26682
  blockOnly: false,
26605
26683
  exceptionOnly: false,
26606
26684
  valueOptional: false,
26685
+ valueOptionalExceptionOnly: false,
26607
26686
  valueFormat: null,
26608
26687
  valueFormatFlags: null
26609
26688
  },
@@ -26625,6 +26704,7 @@ const GenericPlatform = {
26625
26704
  blockOnly: false,
26626
26705
  exceptionOnly: false,
26627
26706
  valueOptional: false,
26707
+ valueOptionalExceptionOnly: false,
26628
26708
  valueFormat: null,
26629
26709
  valueFormatFlags: null
26630
26710
  },
@@ -26646,6 +26726,7 @@ const GenericPlatform = {
26646
26726
  blockOnly: false,
26647
26727
  exceptionOnly: false,
26648
26728
  valueOptional: false,
26729
+ valueOptionalExceptionOnly: false,
26649
26730
  valueFormat: null,
26650
26731
  valueFormatFlags: null
26651
26732
  },
@@ -26667,6 +26748,7 @@ const GenericPlatform = {
26667
26748
  blockOnly: false,
26668
26749
  exceptionOnly: false,
26669
26750
  valueOptional: false,
26751
+ valueOptionalExceptionOnly: false,
26670
26752
  valueFormat: null,
26671
26753
  valueFormatFlags: null
26672
26754
  }
@@ -26707,6 +26789,7 @@ const GenericPlatform = {
26707
26789
  blockOnly: false,
26708
26790
  exceptionOnly: false,
26709
26791
  valueOptional: false,
26792
+ valueOptionalExceptionOnly: false,
26710
26793
  valueFormat: null,
26711
26794
  valueFormatFlags: null
26712
26795
  }
@@ -26744,6 +26827,7 @@ const GenericPlatform = {
26744
26827
  blockOnly: false,
26745
26828
  exceptionOnly: false,
26746
26829
  valueOptional: false,
26830
+ valueOptionalExceptionOnly: false,
26747
26831
  valueFormat: null,
26748
26832
  valueFormatFlags: null
26749
26833
  },
@@ -26765,6 +26849,7 @@ const GenericPlatform = {
26765
26849
  blockOnly: false,
26766
26850
  exceptionOnly: false,
26767
26851
  valueOptional: false,
26852
+ valueOptionalExceptionOnly: false,
26768
26853
  valueFormat: null,
26769
26854
  valueFormatFlags: null
26770
26855
  },
@@ -26786,6 +26871,7 @@ const GenericPlatform = {
26786
26871
  blockOnly: false,
26787
26872
  exceptionOnly: false,
26788
26873
  valueOptional: false,
26874
+ valueOptionalExceptionOnly: false,
26789
26875
  valueFormat: null,
26790
26876
  valueFormatFlags: null
26791
26877
  }
@@ -26831,6 +26917,7 @@ const GenericPlatform = {
26831
26917
  blockOnly: false,
26832
26918
  exceptionOnly: false,
26833
26919
  valueOptional: false,
26920
+ valueOptionalExceptionOnly: false,
26834
26921
  valueFormat: null,
26835
26922
  valueFormatFlags: null
26836
26923
  },
@@ -26852,6 +26939,7 @@ const GenericPlatform = {
26852
26939
  blockOnly: false,
26853
26940
  exceptionOnly: false,
26854
26941
  valueOptional: false,
26942
+ valueOptionalExceptionOnly: false,
26855
26943
  valueFormat: null,
26856
26944
  valueFormatFlags: null
26857
26945
  },
@@ -26873,6 +26961,7 @@ const GenericPlatform = {
26873
26961
  blockOnly: false,
26874
26962
  exceptionOnly: false,
26875
26963
  valueOptional: false,
26964
+ valueOptionalExceptionOnly: false,
26876
26965
  valueFormat: null,
26877
26966
  valueFormatFlags: null
26878
26967
  }
@@ -26922,6 +27011,7 @@ const GenericPlatform = {
26922
27011
  blockOnly: false,
26923
27012
  exceptionOnly: false,
26924
27013
  valueOptional: true,
27014
+ valueOptionalExceptionOnly: true,
26925
27015
  valueFormat: 'permissions_value',
26926
27016
  valueFormatFlags: null
26927
27017
  }
@@ -26952,6 +27042,7 @@ const GenericPlatform = {
26952
27042
  blockOnly: false,
26953
27043
  exceptionOnly: false,
26954
27044
  valueOptional: false,
27045
+ valueOptionalExceptionOnly: false,
26955
27046
  valueFormat: null,
26956
27047
  valueFormatFlags: null
26957
27048
  },
@@ -26973,6 +27064,7 @@ const GenericPlatform = {
26973
27064
  blockOnly: false,
26974
27065
  exceptionOnly: false,
26975
27066
  valueOptional: false,
27067
+ valueOptionalExceptionOnly: false,
26976
27068
  valueFormat: null,
26977
27069
  valueFormatFlags: null
26978
27070
  },
@@ -26994,6 +27086,7 @@ const GenericPlatform = {
26994
27086
  blockOnly: false,
26995
27087
  exceptionOnly: false,
26996
27088
  valueOptional: false,
27089
+ valueOptionalExceptionOnly: false,
26997
27090
  valueFormat: null,
26998
27091
  valueFormatFlags: null
26999
27092
  }
@@ -27039,6 +27132,7 @@ const GenericPlatform = {
27039
27132
  blockOnly: true,
27040
27133
  exceptionOnly: false,
27041
27134
  valueOptional: false,
27135
+ valueOptionalExceptionOnly: false,
27042
27136
  valueFormat: null,
27043
27137
  valueFormatFlags: null
27044
27138
  }
@@ -27070,6 +27164,7 @@ const GenericPlatform = {
27070
27164
  blockOnly: false,
27071
27165
  exceptionOnly: false,
27072
27166
  valueOptional: false,
27167
+ valueOptionalExceptionOnly: false,
27073
27168
  valueFormat: null,
27074
27169
  valueFormatFlags: null
27075
27170
  },
@@ -27091,6 +27186,7 @@ const GenericPlatform = {
27091
27186
  blockOnly: false,
27092
27187
  exceptionOnly: false,
27093
27188
  valueOptional: false,
27189
+ valueOptionalExceptionOnly: false,
27094
27190
  valueFormat: null,
27095
27191
  valueFormatFlags: null
27096
27192
  },
@@ -27112,6 +27208,7 @@ const GenericPlatform = {
27112
27208
  blockOnly: false,
27113
27209
  exceptionOnly: false,
27114
27210
  valueOptional: false,
27211
+ valueOptionalExceptionOnly: false,
27115
27212
  valueFormat: null,
27116
27213
  valueFormatFlags: null
27117
27214
  }
@@ -27181,7 +27278,8 @@ const GenericPlatform = {
27181
27278
  blockOnly: false,
27182
27279
  exceptionOnly: false,
27183
27280
  valueOptional: true,
27184
- valueFormat: '^(1x1-transparent\\.gif|2x2-transparent\\.png|3x2-transparent\\.png|32x32-transparent\\.png|noopframe|noopcss|noopjs|noopjson|nooptext|empty|noopvmap-1\\.0|noopvast-2\\.0|noopvast-3\\.0|noopvast-4\\.0|noopmp3-0\\.1s|noopmp4-1s|amazon-apstag|ati-smarttag|didomi-loader|fingerprintjs2|fingerprintjs3|gemius|google-analytics-ga|google-analytics|google-ima3|googlesyndication-adsbygoogle|googletagservices-gpt|matomo|metrika-yandex-tag|metrika-yandex-watch|naver-wcslog|noeval|pardot-1\\.0|prebid-ads|prebid|prevent-bab|prevent-bab2|prevent-fab-3\\.2\\.0|prevent-popads-net|scorecardresearch-beacon|set-popads-dummy|click2load\\.html|)?$',
27281
+ valueOptionalExceptionOnly: true,
27282
+ valueFormat: '^(1x1-transparent\\.gif|2x2-transparent\\.png|3x2-transparent\\.png|32x32-transparent\\.png|noopframe|noopcss|noopjs|noopjson|nooptext|empty|noopvmap-1\\.0|noopvast-2\\.0|noopvast-3\\.0|noopvast-4\\.0|noopmp3-0\\.1s|noopmp4-1s|amazon-apstag|ati-smarttag|didomi-loader|fingerprintjs2|fingerprintjs3|gemius|google-analytics-ga|google-analytics|googletagmanager-gtm|google-ima3|googlesyndication-adsbygoogle|googletagservices-gpt|matomo|metrika-yandex-tag|metrika-yandex-watch|naver-wcslog|noeval|pardot-1\\.0|prebid-ads|prebid|prevent-bab|prevent-bab2|prevent-fab-3\\.2\\.0|prevent-popads-net|scorecardresearch-beacon|set-popads-dummy|click2load\\.html|)?$',
27185
27283
  valueFormatFlags: null
27186
27284
  },
27187
27285
  {
@@ -27225,7 +27323,8 @@ const GenericPlatform = {
27225
27323
  blockOnly: false,
27226
27324
  exceptionOnly: false,
27227
27325
  valueOptional: true,
27228
- valueFormat: '^(1x1-transparent\\.gif|2x2-transparent\\.png|3x2-transparent\\.png|32x32-transparent\\.png|noopframe|noopcss|noopjs|noopjson|nooptext|empty|noopvmap-1\\.0|noopvast-2\\.0|noopvast-3\\.0|noopvast-4\\.0|noopmp3-0\\.1s|noopmp4-1s|amazon-apstag|ati-smarttag|didomi-loader|fingerprintjs2|fingerprintjs3|gemius|google-analytics-ga|google-analytics|google-ima3|googlesyndication-adsbygoogle|googletagservices-gpt|matomo|metrika-yandex-tag|metrika-yandex-watch|naver-wcslog|noeval|pardot-1\\.0|prebid-ads|prebid|prevent-bab|prevent-bab2|prevent-fab-3\\.2\\.0|prevent-popads-net|scorecardresearch-beacon|set-popads-dummy|click2load\\.html|)?$',
27326
+ valueOptionalExceptionOnly: true,
27327
+ valueFormat: '^(1x1-transparent\\.gif|2x2-transparent\\.png|3x2-transparent\\.png|32x32-transparent\\.png|noopframe|noopcss|noopjs|noopjson|nooptext|empty|noopvmap-1\\.0|noopvast-2\\.0|noopvast-3\\.0|noopvast-4\\.0|noopmp3-0\\.1s|noopmp4-1s|amazon-apstag|ati-smarttag|didomi-loader|fingerprintjs2|fingerprintjs3|gemius|google-analytics-ga|google-analytics|googletagmanager-gtm|google-ima3|googlesyndication-adsbygoogle|googletagservices-gpt|matomo|metrika-yandex-tag|metrika-yandex-watch|naver-wcslog|noeval|pardot-1\\.0|prebid-ads|prebid|prevent-bab|prevent-bab2|prevent-fab-3\\.2\\.0|prevent-popads-net|scorecardresearch-beacon|set-popads-dummy|click2load\\.html|)?$',
27229
27328
  valueFormatFlags: null
27230
27329
  },
27231
27330
  {
@@ -27269,6 +27368,7 @@ const GenericPlatform = {
27269
27368
  blockOnly: false,
27270
27369
  exceptionOnly: false,
27271
27370
  valueOptional: false,
27371
+ valueOptionalExceptionOnly: false,
27272
27372
  valueFormat: '^(1x1\\.gif|2x2\\.png|3x2\\.png|32x32\\.png|noop\\.css|noop\\.html|noopframe|noop\\.js|noop\\.txt|noop-0\\.1s\\.mp3|noop-0\\.5s\\.mp3|noop-1s\\.mp4|none|click2load\\.html|addthis_widget\\.js|amazon_ads\\.js|amazon_apstag\\.js|monkeybroker\\.js|doubleclick_instream_ad_status|google-analytics_ga\\.js|google-analytics_analytics\\.js|google-analytics_inpage_linkid\\.js|google-analytics_cx_api\\.js|google-ima\\.js|googletagservices_gpt\\.js|googletagmanager_gtm\\.js|googlesyndication_adsbygoogle\\.js|scorecardresearch_beacon\\.js|outbrain-widget\\.js|hd-main\\.js)(:[0-9]+)?$',
27273
27373
  valueFormatFlags: null
27274
27374
  }
@@ -27307,6 +27407,7 @@ const GenericPlatform = {
27307
27407
  blockOnly: false,
27308
27408
  exceptionOnly: false,
27309
27409
  valueOptional: true,
27410
+ valueOptionalExceptionOnly: true,
27310
27411
  valueFormat: '^(1x1-transparent\\.gif|2x2-transparent\\.png|3x2-transparent\\.png|32x32-transparent\\.png|noopframe|noopcss|noopjs|noopjson|nooptext|empty|noopvmap-1\\.0|noopvast-2\\.0|noopvast-3\\.0|noopvast-4\\.0|noopmp3-0\\.1s|noopmp4-1s|amazon-apstag|ati-smarttag|didomi-loader|fingerprintjs2|fingerprintjs3|gemius|google-analytics-ga|google-analytics|googletagmanager-gtm|google-ima3|googlesyndication-adsbygoogle|googletagservices-gpt|matomo|metrika-yandex-tag|metrika-yandex-watch|naver-wcslog|noeval|pardot-1\\.0|prebid-ads|prebid|prevent-bab|prevent-bab2|prevent-fab-3\\.2\\.0|prevent-popads-net|scorecardresearch-beacon|set-popads-dummy|click2load\\.html)?$',
27311
27412
  valueFormatFlags: null
27312
27413
  },
@@ -27328,6 +27429,7 @@ const GenericPlatform = {
27328
27429
  blockOnly: false,
27329
27430
  exceptionOnly: false,
27330
27431
  valueOptional: true,
27432
+ valueOptionalExceptionOnly: true,
27331
27433
  valueFormat: '^(1x1-transparent\\.gif|2x2-transparent\\.png|3x2-transparent\\.png|32x32-transparent\\.png|noopframe|noopcss|noopjs|noopjson|nooptext|empty|noopvmap-1\\.0|noopvast-2\\.0|noopvast-3\\.0|noopvast-4\\.0|noopmp3-0\\.1s|noopmp4-1s|amazon-apstag|ati-smarttag|didomi-loader|fingerprintjs2|fingerprintjs3|gemius|google-analytics-ga|google-analytics|googletagmanager-gtm|google-ima3|googlesyndication-adsbygoogle|googletagservices-gpt|matomo|metrika-yandex-tag|metrika-yandex-watch|naver-wcslog|noeval|pardot-1\\.0|prebid-ads|prebid|prevent-bab|prevent-bab2|prevent-fab-3\\.2\\.0|prevent-popads-net|scorecardresearch-beacon|set-popads-dummy|click2load\\.html)?$',
27332
27434
  valueFormatFlags: null
27333
27435
  },
@@ -27349,6 +27451,7 @@ const GenericPlatform = {
27349
27451
  blockOnly: false,
27350
27452
  exceptionOnly: false,
27351
27453
  valueOptional: true,
27454
+ valueOptionalExceptionOnly: false,
27352
27455
  valueFormat: '^(1x1\\.gif|2x2\\.png|3x2\\.png|32x32\\.png|noop\\.css|noop\\.html|noopframe|noop\\.js|noop\\.txt|noop-0\\.1s\\.mp3|noop-0\\.5s\\.mp3|noop-1s\\.mp4|none|click2load\\.html|addthis_widget\\.js|amazon_ads\\.js|amazon_apstag\\.js|monkeybroker\\.js|doubleclick_instream_ad_status|google-analytics_ga\\.js|google-analytics_analytics\\.js|google-analytics_inpage_linkid\\.js|google-analytics_cx_api\\.js|google-ima\\.js|googletagservices_gpt\\.js|googletagmanager_gtm\\.js|googlesyndication_adsbygoogle\\.js|scorecardresearch_beacon\\.js|outbrain-widget\\.js|hd-main\\.js)(:[0-9]+)?$',
27353
27456
  valueFormatFlags: null
27354
27457
  },
@@ -27370,6 +27473,7 @@ const GenericPlatform = {
27370
27473
  blockOnly: false,
27371
27474
  exceptionOnly: false,
27372
27475
  valueOptional: false,
27476
+ valueOptionalExceptionOnly: false,
27373
27477
  valueFormat: '(?:)^abp-resource:(?:)(blank-text|blank-css|blank-js|blank-html|blank-mp3|1x1-transparent-gif|2x2-transparent-png|3x2-transparent-png|32x32-transparent-png)$',
27374
27478
  valueFormatFlags: null
27375
27479
  }
@@ -27415,6 +27519,7 @@ const GenericPlatform = {
27415
27519
  blockOnly: false,
27416
27520
  exceptionOnly: false,
27417
27521
  valueOptional: true,
27522
+ valueOptionalExceptionOnly: false,
27418
27523
  valueFormat: 'referrerpolicy_value',
27419
27524
  valueFormatFlags: null
27420
27525
  }
@@ -27465,6 +27570,7 @@ const GenericPlatform = {
27465
27570
  blockOnly: false,
27466
27571
  exceptionOnly: false,
27467
27572
  valueOptional: true,
27573
+ valueOptionalExceptionOnly: true,
27468
27574
  valueFormat: '^(?:)(request:)?(?:)(?!(access-control-allow-origin|access-control-allow-credentials|access-control-allow-headers|access-control-allow-methods|access-control-expose-headers|access-control-max-age|access-control-request-headers|access-control-request-method|origin|timing-allow-origin|allow|cross-origin-embedder-policy|cross-origin-opener-policy|cross-origin-resource-policy|content-security-policy|content-security-policy-report-only|expect-ct|feature-policy|origin-isolation|strict-transport-security|upgrade-insecure-requests|x-content-type-options|x-download-options|x-frame-options|x-permitted-cross-domain-policies|x-powered-by|x-xss-protection|public-key-pins|public-key-pins-report-only|sec-websocket-key|sec-websocket-extensions|sec-websocket-accept|sec-websocket-protocol|sec-websocket-version|p3p|sec-fetch-mode|sec-fetch-dest|sec-fetch-site|sec-fetch-user|referrer-policy|content-type|content-length|accept|accept-encoding|host|connection|transfer-encoding|upgrade)$)(?:)[A-z0-9-]+(?:)$',
27469
27575
  valueFormatFlags: 'i'
27470
27576
  },
@@ -27506,6 +27612,7 @@ const GenericPlatform = {
27506
27612
  blockOnly: false,
27507
27613
  exceptionOnly: false,
27508
27614
  valueOptional: true,
27615
+ valueOptionalExceptionOnly: true,
27509
27616
  valueFormat: '^(?:)(request:)?(?:)(?!(access-control-allow-origin|access-control-allow-credentials|access-control-allow-headers|access-control-allow-methods|access-control-expose-headers|access-control-max-age|access-control-request-headers|access-control-request-method|origin|timing-allow-origin|allow|cross-origin-embedder-policy|cross-origin-opener-policy|cross-origin-resource-policy|content-security-policy|content-security-policy-report-only|expect-ct|feature-policy|origin-isolation|strict-transport-security|upgrade-insecure-requests|x-content-type-options|x-download-options|x-frame-options|x-permitted-cross-domain-policies|x-powered-by|x-xss-protection|public-key-pins|public-key-pins-report-only|sec-websocket-key|sec-websocket-extensions|sec-websocket-accept|sec-websocket-protocol|sec-websocket-version|p3p|sec-fetch-mode|sec-fetch-dest|sec-fetch-site|sec-fetch-user|referrer-policy|content-type|content-length|accept|accept-encoding|host|connection|transfer-encoding|upgrade)$)(?:)[A-z0-9-]+(?:)$',
27510
27617
  valueFormatFlags: 'i'
27511
27618
  }
@@ -27540,6 +27647,7 @@ const GenericPlatform = {
27540
27647
  blockOnly: false,
27541
27648
  exceptionOnly: false,
27542
27649
  valueOptional: true,
27650
+ valueOptionalExceptionOnly: false,
27543
27651
  valueFormat: '((?:)\\w+(?:)|\\/.+\\/(?:)([gimuy]+)?)',
27544
27652
  valueFormatFlags: 'i'
27545
27653
  },
@@ -27561,6 +27669,7 @@ const GenericPlatform = {
27561
27669
  blockOnly: false,
27562
27670
  exceptionOnly: false,
27563
27671
  valueOptional: true,
27672
+ valueOptionalExceptionOnly: false,
27564
27673
  valueFormat: '((?:)\\w+(?:)|\\/.+\\/(?:)([gimuy]+)?)',
27565
27674
  valueFormatFlags: 'i'
27566
27675
  },
@@ -27582,6 +27691,7 @@ const GenericPlatform = {
27582
27691
  blockOnly: false,
27583
27692
  exceptionOnly: false,
27584
27693
  valueOptional: false,
27694
+ valueOptionalExceptionOnly: false,
27585
27695
  valueFormat: '((?:)\\w+(?:)|\\/.+\\/(?:)([gimuy]+)?)',
27586
27696
  valueFormatFlags: 'i'
27587
27697
  }
@@ -27632,7 +27742,8 @@ const GenericPlatform = {
27632
27742
  negatable: false,
27633
27743
  blockOnly: false,
27634
27744
  exceptionOnly: false,
27635
- valueOptional: false,
27745
+ valueOptional: true,
27746
+ valueOptionalExceptionOnly: true,
27636
27747
  valueFormat: '^(?:)\\/(?:)(.+)(?:)\\/(?:)(.+)?(?:)\\/(?:)([gimuy]*)?(?:)$',
27637
27748
  valueFormatFlags: 'i'
27638
27749
  },
@@ -27666,7 +27777,8 @@ const GenericPlatform = {
27666
27777
  negatable: false,
27667
27778
  blockOnly: false,
27668
27779
  exceptionOnly: false,
27669
- valueOptional: false,
27780
+ valueOptional: true,
27781
+ valueOptionalExceptionOnly: true,
27670
27782
  valueFormat: '^(?:)\\/(?:)(.+)(?:)\\/(?:)(.+)?(?:)\\/(?:)([gimuy]*)?(?:)$',
27671
27783
  valueFormatFlags: 'i'
27672
27784
  },
@@ -27701,6 +27813,7 @@ const GenericPlatform = {
27701
27813
  blockOnly: false,
27702
27814
  exceptionOnly: false,
27703
27815
  valueOptional: false,
27816
+ valueOptionalExceptionOnly: false,
27704
27817
  valueFormat: '^(?:)\\/(?:)(.+)(?:)\\/(?:)(.+)?(?:)\\/(?:)([gimuy]*)?(?:)$',
27705
27818
  valueFormatFlags: 'i'
27706
27819
  }
@@ -27733,6 +27846,7 @@ const GenericPlatform = {
27733
27846
  blockOnly: false,
27734
27847
  exceptionOnly: false,
27735
27848
  valueOptional: false,
27849
+ valueOptionalExceptionOnly: false,
27736
27850
  valueFormat: null,
27737
27851
  valueFormatFlags: null
27738
27852
  },
@@ -27754,6 +27868,7 @@ const GenericPlatform = {
27754
27868
  blockOnly: false,
27755
27869
  exceptionOnly: false,
27756
27870
  valueOptional: false,
27871
+ valueOptionalExceptionOnly: false,
27757
27872
  valueFormat: null,
27758
27873
  valueFormatFlags: null
27759
27874
  },
@@ -27775,6 +27890,7 @@ const GenericPlatform = {
27775
27890
  blockOnly: false,
27776
27891
  exceptionOnly: false,
27777
27892
  valueOptional: false,
27893
+ valueOptionalExceptionOnly: false,
27778
27894
  valueFormat: null,
27779
27895
  valueFormatFlags: null
27780
27896
  }
@@ -27831,6 +27947,7 @@ const GenericPlatform = {
27831
27947
  blockOnly: false,
27832
27948
  exceptionOnly: true,
27833
27949
  valueOptional: false,
27950
+ valueOptionalExceptionOnly: false,
27834
27951
  valueFormat: null,
27835
27952
  valueFormatFlags: null
27836
27953
  },
@@ -27857,6 +27974,7 @@ const GenericPlatform = {
27857
27974
  blockOnly: false,
27858
27975
  exceptionOnly: true,
27859
27976
  valueOptional: false,
27977
+ valueOptionalExceptionOnly: false,
27860
27978
  valueFormat: null,
27861
27979
  valueFormatFlags: null
27862
27980
  }
@@ -27898,6 +28016,7 @@ const GenericPlatform = {
27898
28016
  blockOnly: false,
27899
28017
  exceptionOnly: true,
27900
28018
  valueOptional: true,
28019
+ valueOptionalExceptionOnly: false,
27901
28020
  valueFormat: 'pipe_separated_stealth_options',
27902
28021
  valueFormatFlags: null
27903
28022
  },
@@ -27919,6 +28038,7 @@ const GenericPlatform = {
27919
28038
  blockOnly: false,
27920
28039
  exceptionOnly: true,
27921
28040
  valueOptional: true,
28041
+ valueOptionalExceptionOnly: false,
27922
28042
  valueFormat: 'pipe_separated_stealth_options',
27923
28043
  valueFormatFlags: null
27924
28044
  },
@@ -27940,6 +28060,7 @@ const GenericPlatform = {
27940
28060
  blockOnly: false,
27941
28061
  exceptionOnly: true,
27942
28062
  valueOptional: true,
28063
+ valueOptionalExceptionOnly: false,
27943
28064
  valueFormat: 'pipe_separated_stealth_options',
27944
28065
  valueFormatFlags: null
27945
28066
  },
@@ -27961,6 +28082,7 @@ const GenericPlatform = {
27961
28082
  blockOnly: false,
27962
28083
  exceptionOnly: true,
27963
28084
  valueOptional: true,
28085
+ valueOptionalExceptionOnly: false,
27964
28086
  valueFormat: 'pipe_separated_stealth_options',
27965
28087
  valueFormatFlags: null
27966
28088
  },
@@ -27982,6 +28104,7 @@ const GenericPlatform = {
27982
28104
  blockOnly: false,
27983
28105
  exceptionOnly: true,
27984
28106
  valueOptional: true,
28107
+ valueOptionalExceptionOnly: false,
27985
28108
  valueFormat: 'pipe_separated_stealth_options',
27986
28109
  valueFormatFlags: null
27987
28110
  }
@@ -28016,6 +28139,7 @@ const GenericPlatform = {
28016
28139
  blockOnly: false,
28017
28140
  exceptionOnly: false,
28018
28141
  valueOptional: false,
28142
+ valueOptionalExceptionOnly: false,
28019
28143
  valueFormat: null,
28020
28144
  valueFormatFlags: null
28021
28145
  }
@@ -28047,6 +28171,7 @@ const GenericPlatform = {
28047
28171
  blockOnly: false,
28048
28172
  exceptionOnly: false,
28049
28173
  valueOptional: false,
28174
+ valueOptionalExceptionOnly: false,
28050
28175
  valueFormat: null,
28051
28176
  valueFormatFlags: null
28052
28177
  }
@@ -28078,6 +28203,7 @@ const GenericPlatform = {
28078
28203
  blockOnly: false,
28079
28204
  exceptionOnly: false,
28080
28205
  valueOptional: false,
28206
+ valueOptionalExceptionOnly: false,
28081
28207
  valueFormat: null,
28082
28208
  valueFormatFlags: null
28083
28209
  },
@@ -28101,6 +28227,7 @@ const GenericPlatform = {
28101
28227
  blockOnly: false,
28102
28228
  exceptionOnly: false,
28103
28229
  valueOptional: false,
28230
+ valueOptionalExceptionOnly: false,
28104
28231
  valueFormat: null,
28105
28232
  valueFormatFlags: null
28106
28233
  },
@@ -28122,6 +28249,7 @@ const GenericPlatform = {
28122
28249
  blockOnly: false,
28123
28250
  exceptionOnly: false,
28124
28251
  valueOptional: false,
28252
+ valueOptionalExceptionOnly: false,
28125
28253
  valueFormat: null,
28126
28254
  valueFormatFlags: null
28127
28255
  }
@@ -28167,6 +28295,7 @@ const GenericPlatform = {
28167
28295
  blockOnly: false,
28168
28296
  exceptionOnly: false,
28169
28297
  valueOptional: false,
28298
+ valueOptionalExceptionOnly: false,
28170
28299
  valueFormat: null,
28171
28300
  valueFormatFlags: null
28172
28301
  },
@@ -28190,6 +28319,7 @@ const GenericPlatform = {
28190
28319
  blockOnly: false,
28191
28320
  exceptionOnly: false,
28192
28321
  valueOptional: false,
28322
+ valueOptionalExceptionOnly: false,
28193
28323
  valueFormat: null,
28194
28324
  valueFormatFlags: null
28195
28325
  },
@@ -28211,6 +28341,7 @@ const GenericPlatform = {
28211
28341
  blockOnly: false,
28212
28342
  exceptionOnly: false,
28213
28343
  valueOptional: false,
28344
+ valueOptionalExceptionOnly: false,
28214
28345
  valueFormat: null,
28215
28346
  valueFormatFlags: null
28216
28347
  }
@@ -28258,6 +28389,7 @@ const GenericPlatform = {
28258
28389
  blockOnly: false,
28259
28390
  exceptionOnly: false,
28260
28391
  valueOptional: false,
28392
+ valueOptionalExceptionOnly: false,
28261
28393
  valueFormat: null,
28262
28394
  valueFormatFlags: null
28263
28395
  },
@@ -28281,6 +28413,7 @@ const GenericPlatform = {
28281
28413
  blockOnly: false,
28282
28414
  exceptionOnly: false,
28283
28415
  valueOptional: false,
28416
+ valueOptionalExceptionOnly: false,
28284
28417
  valueFormat: null,
28285
28418
  valueFormatFlags: null
28286
28419
  },
@@ -28302,6 +28435,7 @@ const GenericPlatform = {
28302
28435
  blockOnly: false,
28303
28436
  exceptionOnly: false,
28304
28437
  valueOptional: false,
28438
+ valueOptionalExceptionOnly: false,
28305
28439
  valueFormat: null,
28306
28440
  valueFormatFlags: null
28307
28441
  }
@@ -28349,6 +28483,7 @@ const GenericPlatform = {
28349
28483
  blockOnly: false,
28350
28484
  exceptionOnly: false,
28351
28485
  valueOptional: false,
28486
+ valueOptionalExceptionOnly: false,
28352
28487
  valueFormat: 'pipe_separated_domains',
28353
28488
  valueFormatFlags: null
28354
28489
  },
@@ -28372,6 +28507,7 @@ const GenericPlatform = {
28372
28507
  blockOnly: false,
28373
28508
  exceptionOnly: false,
28374
28509
  valueOptional: false,
28510
+ valueOptionalExceptionOnly: false,
28375
28511
  valueFormat: 'pipe_separated_domains',
28376
28512
  valueFormatFlags: null
28377
28513
  },
@@ -28395,6 +28531,7 @@ const GenericPlatform = {
28395
28531
  blockOnly: false,
28396
28532
  exceptionOnly: false,
28397
28533
  valueOptional: false,
28534
+ valueOptionalExceptionOnly: false,
28398
28535
  valueFormat: 'pipe_separated_domains',
28399
28536
  valueFormatFlags: null
28400
28537
  }
@@ -28442,6 +28579,7 @@ const GenericPlatform = {
28442
28579
  blockOnly: false,
28443
28580
  exceptionOnly: true,
28444
28581
  valueOptional: false,
28582
+ valueOptionalExceptionOnly: false,
28445
28583
  valueFormat: null,
28446
28584
  valueFormatFlags: null
28447
28585
  }
@@ -28479,6 +28617,7 @@ const GenericPlatform = {
28479
28617
  blockOnly: false,
28480
28618
  exceptionOnly: false,
28481
28619
  valueOptional: true,
28620
+ valueOptionalExceptionOnly: true,
28482
28621
  valueFormat: '^(?:)\\/(?:)(.+)(?:)\\/(?:)(.*)?(?:)\\/(?:)([gimuy]*)?(?:)$',
28483
28622
  valueFormatFlags: 'i'
28484
28623
  },
@@ -28500,6 +28639,7 @@ const GenericPlatform = {
28500
28639
  blockOnly: false,
28501
28640
  exceptionOnly: false,
28502
28641
  valueOptional: true,
28642
+ valueOptionalExceptionOnly: true,
28503
28643
  valueFormat: '^(?:)\\/(?:)(.+)(?:)\\/(?:)(.*)?(?:)\\/(?:)([gimuy]*)?(?:)$',
28504
28644
  valueFormatFlags: 'i'
28505
28645
  }
@@ -28534,6 +28674,7 @@ const GenericPlatform = {
28534
28674
  blockOnly: false,
28535
28675
  exceptionOnly: false,
28536
28676
  valueOptional: false,
28677
+ valueOptionalExceptionOnly: false,
28537
28678
  valueFormat: null,
28538
28679
  valueFormatFlags: null
28539
28680
  },
@@ -28555,6 +28696,7 @@ const GenericPlatform = {
28555
28696
  blockOnly: false,
28556
28697
  exceptionOnly: false,
28557
28698
  valueOptional: false,
28699
+ valueOptionalExceptionOnly: false,
28558
28700
  valueFormat: null,
28559
28701
  valueFormatFlags: null
28560
28702
  },
@@ -28576,6 +28718,7 @@ const GenericPlatform = {
28576
28718
  blockOnly: false,
28577
28719
  exceptionOnly: false,
28578
28720
  valueOptional: false,
28721
+ valueOptionalExceptionOnly: false,
28579
28722
  valueFormat: null,
28580
28723
  valueFormatFlags: null
28581
28724
  }
@@ -28621,6 +28764,7 @@ const GenericPlatform = {
28621
28764
  blockOnly: false,
28622
28765
  exceptionOnly: false,
28623
28766
  valueOptional: false,
28767
+ valueOptionalExceptionOnly: false,
28624
28768
  valueFormat: null,
28625
28769
  valueFormatFlags: null
28626
28770
  },
@@ -28642,6 +28786,7 @@ const GenericPlatform = {
28642
28786
  blockOnly: false,
28643
28787
  exceptionOnly: false,
28644
28788
  valueOptional: false,
28789
+ valueOptionalExceptionOnly: false,
28645
28790
  valueFormat: null,
28646
28791
  valueFormatFlags: null
28647
28792
  },
@@ -28663,6 +28808,7 @@ const GenericPlatform = {
28663
28808
  blockOnly: false,
28664
28809
  exceptionOnly: false,
28665
28810
  valueOptional: false,
28811
+ valueOptionalExceptionOnly: false,
28666
28812
  valueFormat: null,
28667
28813
  valueFormatFlags: null
28668
28814
  },
@@ -28684,6 +28830,7 @@ const GenericPlatform = {
28684
28830
  blockOnly: false,
28685
28831
  exceptionOnly: false,
28686
28832
  valueOptional: false,
28833
+ valueOptionalExceptionOnly: false,
28687
28834
  valueFormat: null,
28688
28835
  valueFormatFlags: null
28689
28836
  },
@@ -28705,6 +28852,7 @@ const GenericPlatform = {
28705
28852
  blockOnly: false,
28706
28853
  exceptionOnly: false,
28707
28854
  valueOptional: false,
28855
+ valueOptionalExceptionOnly: false,
28708
28856
  valueFormat: null,
28709
28857
  valueFormatFlags: null
28710
28858
  },
@@ -28726,6 +28874,7 @@ const GenericPlatform = {
28726
28874
  blockOnly: false,
28727
28875
  exceptionOnly: false,
28728
28876
  valueOptional: false,
28877
+ valueOptionalExceptionOnly: false,
28729
28878
  valueFormat: null,
28730
28879
  valueFormatFlags: null
28731
28880
  }
@@ -28772,6 +28921,7 @@ const GenericPlatform = {
28772
28921
  blockOnly: false,
28773
28922
  exceptionOnly: false,
28774
28923
  valueOptional: false,
28924
+ valueOptionalExceptionOnly: false,
28775
28925
  valueFormat: null,
28776
28926
  valueFormatFlags: null
28777
28927
  },
@@ -28795,6 +28945,7 @@ const GenericPlatform = {
28795
28945
  blockOnly: false,
28796
28946
  exceptionOnly: false,
28797
28947
  valueOptional: false,
28948
+ valueOptionalExceptionOnly: false,
28798
28949
  valueFormat: null,
28799
28950
  valueFormatFlags: null
28800
28951
  },
@@ -28816,6 +28967,7 @@ const GenericPlatform = {
28816
28967
  blockOnly: false,
28817
28968
  exceptionOnly: false,
28818
28969
  valueOptional: false,
28970
+ valueOptionalExceptionOnly: false,
28819
28971
  valueFormat: null,
28820
28972
  valueFormatFlags: null
28821
28973
  }
@@ -41954,6 +42106,357 @@ const ABP_RESOURCE_PREFIX_LENGTH = ABP_RESOURCE_PREFIX.length;
41954
42106
  * Compatibility table instance for scriptlets.
41955
42107
  */ const scriptletsCompatibilityTable = new ScriptletsCompatibilityTable(scriptletsCompatibilityTableData);
41956
42108
 
42109
+ var globToRegexp;
42110
+ var hasRequiredGlobToRegexp;
42111
+
42112
+ function requireGlobToRegexp () {
42113
+ if (hasRequiredGlobToRegexp) return globToRegexp;
42114
+ hasRequiredGlobToRegexp = 1;
42115
+ globToRegexp = function(glob, opts) {
42116
+ if (typeof glob !== 'string') {
42117
+ throw new TypeError('Expected a string');
42118
+ }
42119
+ var str = String(glob);
42120
+ // The regexp we are building, as a string.
42121
+ var reStr = "";
42122
+ // Whether we are matching so called "extended" globs (like bash) and should
42123
+ // support single character matching, matching ranges of characters, group
42124
+ // matching, etc.
42125
+ var extended = opts ? !!opts.extended : false;
42126
+ // When globstar is _false_ (default), '/foo/*' is translated a regexp like
42127
+ // '^\/foo\/.*$' which will match any string beginning with '/foo/'
42128
+ // When globstar is _true_, '/foo/*' is translated to regexp like
42129
+ // '^\/foo\/[^/]*$' which will match any string beginning with '/foo/' BUT
42130
+ // which does not have a '/' to the right of it.
42131
+ // E.g. with '/foo/*' these will match: '/foo/bar', '/foo/bar.txt' but
42132
+ // these will not '/foo/bar/baz', '/foo/bar/baz.txt'
42133
+ // Lastely, when globstar is _true_, '/foo/**' is equivelant to '/foo/*' when
42134
+ // globstar is _false_
42135
+ var globstar = opts ? !!opts.globstar : false;
42136
+ // If we are doing extended matching, this boolean is true when we are inside
42137
+ // a group (eg {*.html,*.js}), and false otherwise.
42138
+ var inGroup = false;
42139
+ // RegExp flags (eg "i" ) to pass in to RegExp constructor.
42140
+ var flags = opts && typeof opts.flags === "string" ? opts.flags : "";
42141
+ var c;
42142
+ for(var i = 0, len = str.length; i < len; i++){
42143
+ c = str[i];
42144
+ switch(c){
42145
+ case "/":
42146
+ case "$":
42147
+ case "^":
42148
+ case "+":
42149
+ case ".":
42150
+ case "(":
42151
+ case ")":
42152
+ case "=":
42153
+ case "!":
42154
+ case "|":
42155
+ reStr += "\\" + c;
42156
+ break;
42157
+ case "?":
42158
+ if (extended) {
42159
+ reStr += ".";
42160
+ break;
42161
+ }
42162
+ case "[":
42163
+ case "]":
42164
+ if (extended) {
42165
+ reStr += c;
42166
+ break;
42167
+ }
42168
+ case "{":
42169
+ if (extended) {
42170
+ inGroup = true;
42171
+ reStr += "(";
42172
+ break;
42173
+ }
42174
+ case "}":
42175
+ if (extended) {
42176
+ inGroup = false;
42177
+ reStr += ")";
42178
+ break;
42179
+ }
42180
+ case ",":
42181
+ if (inGroup) {
42182
+ reStr += "|";
42183
+ break;
42184
+ }
42185
+ reStr += "\\" + c;
42186
+ break;
42187
+ case "*":
42188
+ // Move over all consecutive "*"'s.
42189
+ // Also store the previous and next characters
42190
+ var prevChar = str[i - 1];
42191
+ var starCount = 1;
42192
+ while(str[i + 1] === "*"){
42193
+ starCount++;
42194
+ i++;
42195
+ }
42196
+ var nextChar = str[i + 1];
42197
+ if (!globstar) {
42198
+ // globstar is disabled, so treat any number of "*" as one
42199
+ reStr += ".*";
42200
+ } else {
42201
+ // globstar is enabled, so determine if this is a globstar segment
42202
+ var isGlobstar = starCount > 1 // multiple "*"'s
42203
+ && (prevChar === "/" || prevChar === undefined // from the start of the segment
42204
+ ) && (nextChar === "/" || nextChar === undefined // to the end of the segment
42205
+ );
42206
+ if (isGlobstar) {
42207
+ // it's a globstar, so match zero or more path segments
42208
+ reStr += "((?:[^/]*(?:\/|$))*)";
42209
+ i++; // move over the "/"
42210
+ } else {
42211
+ // it's not a globstar, so only match one path segment
42212
+ reStr += "([^/]*)";
42213
+ }
42214
+ }
42215
+ break;
42216
+ default:
42217
+ reStr += c;
42218
+ }
42219
+ }
42220
+ // When regexp 'g' flag is specified don't
42221
+ // constrain the regular expression with ^ & $
42222
+ if (!flags || !~flags.indexOf('g')) {
42223
+ reStr = "^" + reStr + "$";
42224
+ }
42225
+ return new RegExp(reStr, flags);
42226
+ };
42227
+ return globToRegexp;
42228
+ }
42229
+
42230
+ var globToRegexpExports = requireGlobToRegexp();
42231
+ var GlobToRegExp = /*@__PURE__*/getDefaultExportFromCjs(globToRegexpExports);
42232
+
42233
+ /**
42234
+ * @file Regular expression utilities.
42235
+ */ // Special RegExp constants
42236
+ const REGEX_START = CARET; // '^'
42237
+ const REGEX_END = DOLLAR_SIGN; // '$'
42238
+ const REGEX_ANY_CHARACTERS = DOT$1 + ASTERISK; // '.*'
42239
+ // Special adblock pattern symbols and their RegExp equivalents
42240
+ const ADBLOCK_URL_START = PIPE + PIPE; // '||'
42241
+ const ADBLOCK_URL_START_REGEX = '^(http|https|ws|wss)://([a-z0-9-_.]+\\.)?';
42242
+ const ADBLOCK_URL_SEPARATOR = CARET; // '^'
42243
+ const ADBLOCK_URL_SEPARATOR_REGEX = '([^ a-zA-Z0-9.%_-]|$)';
42244
+ const ADBLOCK_WILDCARD = ASTERISK; // '*'
42245
+ const ADBLOCK_WILDCARD_REGEX = REGEX_ANY_CHARACTERS;
42246
+ // Negation wrapper for RegExp patterns
42247
+ const REGEX_NEGATION_PREFIX = '^((?!';
42248
+ const REGEX_NEGATION_SUFFIX = ').)*$';
42249
+ /**
42250
+ * Special RegExp symbols.
42251
+ *
42252
+ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#special-escape
42253
+ */ const SPECIAL_REGEX_SYMBOLS = new Set([
42254
+ ASTERISK,
42255
+ CARET,
42256
+ CLOSE_CURLY_BRACKET,
42257
+ CLOSE_PARENTHESIS,
42258
+ CLOSE_SQUARE_BRACKET,
42259
+ DOLLAR_SIGN,
42260
+ DOT$1,
42261
+ ESCAPE_CHARACTER,
42262
+ OPEN_CURLY_BRACKET,
42263
+ OPEN_PARENTHESIS,
42264
+ OPEN_SQUARE_BRACKET,
42265
+ PIPE,
42266
+ PLUS,
42267
+ QUESTION_MARK,
42268
+ SLASH
42269
+ ]);
42270
+ /**
42271
+ * Utility functions for working with RegExp patterns.
42272
+ */ class RegExpUtils {
42273
+ /**
42274
+ * Checks whether a string possibly is a RegExp pattern.
42275
+ * Flags are not supported.
42276
+ *
42277
+ * Note: it does not perform a full validation of the pattern,
42278
+ * it just checks if the string starts and ends with a slash.
42279
+ *
42280
+ * @param pattern Pattern to check.
42281
+ *
42282
+ * @returns `true` if the string is a RegExp pattern, `false` otherwise.
42283
+ */ static isRegexPattern(pattern) {
42284
+ const trimmedPattern = pattern.trim();
42285
+ // Avoid false positives
42286
+ return trimmedPattern.length > REGEX_MARKER.length * 2 && trimmedPattern.startsWith(REGEX_MARKER) && trimmedPattern.endsWith(REGEX_MARKER) && trimmedPattern[REGEX_MARKER.length - 2] !== ESCAPE_CHARACTER;
42287
+ }
42288
+ /**
42289
+ * Checks whether a string is a negated RegExp pattern.
42290
+ *
42291
+ * @param pattern Pattern to check.
42292
+ *
42293
+ * @returns `true` if the string is a negated RegExp pattern, `false` otherwise.
42294
+ */ static isNegatedRegexPattern(pattern) {
42295
+ if (pattern.startsWith(REGEX_MARKER) && pattern.endsWith(REGEX_MARKER)) {
42296
+ const innerPattern = pattern.slice(REGEX_MARKER.length, pattern.length - REGEX_MARKER.length);
42297
+ return innerPattern.startsWith(REGEX_NEGATION_PREFIX) && innerPattern.endsWith(REGEX_NEGATION_SUFFIX);
42298
+ }
42299
+ return pattern.startsWith(REGEX_NEGATION_PREFIX) && pattern.endsWith(REGEX_NEGATION_SUFFIX);
42300
+ }
42301
+ /**
42302
+ * Removes negation from a RegExp pattern.
42303
+ *
42304
+ * @param pattern RegExp pattern to remove negation from.
42305
+ *
42306
+ * @returns RegExp pattern without negation.
42307
+ */ static removeNegationFromRegexPattern(pattern) {
42308
+ let result = pattern.trim();
42309
+ const slashes = RegExpUtils.isRegexPattern(result);
42310
+ if (slashes) {
42311
+ result = result.substring(REGEX_MARKER.length, result.length - REGEX_MARKER.length);
42312
+ }
42313
+ if (result.startsWith(REGEX_NEGATION_PREFIX) && result.endsWith(REGEX_NEGATION_SUFFIX)) {
42314
+ result = result.substring(REGEX_NEGATION_PREFIX.length, result.length - REGEX_NEGATION_SUFFIX.length);
42315
+ }
42316
+ return slashes ? `${REGEX_MARKER}${result}${REGEX_MARKER}` : result;
42317
+ }
42318
+ /**
42319
+ * Negates a RegExp pattern. Technically, this method wraps the pattern in `^((?!` and `).)*$`.
42320
+ *
42321
+ * RegExp modifiers are not supported.
42322
+ *
42323
+ * @param pattern Pattern to negate (can be wrapped in slashes or not).
42324
+ *
42325
+ * @returns Negated RegExp pattern.
42326
+ */ static negateRegexPattern(pattern) {
42327
+ let result = pattern.trim();
42328
+ let slashes = false;
42329
+ // Remove the leading and trailing slashes (/)
42330
+ if (RegExpUtils.isRegexPattern(result)) {
42331
+ result = result.substring(REGEX_MARKER.length, result.length - REGEX_MARKER.length);
42332
+ slashes = true;
42333
+ }
42334
+ // Only negate the pattern if it's not already negated
42335
+ if (!(result.startsWith(REGEX_NEGATION_PREFIX) && result.endsWith(REGEX_NEGATION_SUFFIX))) {
42336
+ // Remove leading caret (^)
42337
+ if (result.startsWith(REGEX_START)) {
42338
+ result = result.substring(REGEX_START.length);
42339
+ }
42340
+ // Remove trailing dollar sign ($)
42341
+ if (result.endsWith(REGEX_END)) {
42342
+ result = result.substring(0, result.length - REGEX_END.length);
42343
+ }
42344
+ // Wrap the pattern in the negation
42345
+ result = `${REGEX_NEGATION_PREFIX}${result}${REGEX_NEGATION_SUFFIX}`;
42346
+ }
42347
+ // Add the leading and trailing slashes back if they were there
42348
+ if (slashes) {
42349
+ result = `${REGEX_MARKER}${result}${REGEX_MARKER}`;
42350
+ }
42351
+ return result;
42352
+ }
42353
+ /**
42354
+ * Ensures that a pattern is wrapped in slashes.
42355
+ *
42356
+ * @param pattern Pattern to ensure slashes for.
42357
+ *
42358
+ * @returns Pattern with slashes.
42359
+ */ static ensureSlashes(pattern) {
42360
+ let result = pattern;
42361
+ if (!result.startsWith(REGEX_MARKER)) {
42362
+ result = `${REGEX_MARKER}${result}`;
42363
+ }
42364
+ if (!result.endsWith(REGEX_MARKER)) {
42365
+ result += REGEX_MARKER;
42366
+ }
42367
+ return result;
42368
+ }
42369
+ /**
42370
+ * Converts a basic adblock rule pattern to a RegExp pattern. Based on
42371
+ * https://github.com/AdguardTeam/tsurlfilter/blob/9b26e0b4a0e30b87690bc60f7cf377d112c3085c/packages/tsurlfilter/src/rules/simple-regex.ts#L219.
42372
+ *
42373
+ * @see {@link https://kb.adguard.com/en/general/how-to-create-your-own-ad-filters#basic-rules}
42374
+ *
42375
+ * @param pattern Pattern to convert.
42376
+ *
42377
+ * @returns RegExp equivalent of the pattern.
42378
+ */ static patternToRegexp(pattern) {
42379
+ const trimmed = pattern.trim();
42380
+ // Return regex for any character sequence if the pattern is just |, ||, * or empty
42381
+ if (trimmed === ADBLOCK_URL_START || trimmed === PIPE || trimmed === ADBLOCK_WILDCARD || trimmed === EMPTY) {
42382
+ return REGEX_ANY_CHARACTERS;
42383
+ }
42384
+ // If the pattern is already a RegExp, just return it, but remove the leading and trailing slashes
42385
+ if (RegExpUtils.isRegexPattern(pattern)) {
42386
+ return pattern.substring(REGEX_MARKER.length, pattern.length - REGEX_MARKER.length);
42387
+ }
42388
+ let result = EMPTY;
42389
+ let offset = 0;
42390
+ let len = trimmed.length;
42391
+ // Handle leading pipes
42392
+ if (trimmed[0] === PIPE) {
42393
+ if (trimmed[1] === PIPE) {
42394
+ // Replace adblock url start (||) with its RegExp equivalent
42395
+ result += ADBLOCK_URL_START_REGEX;
42396
+ offset = ADBLOCK_URL_START.length;
42397
+ } else {
42398
+ // Replace single pipe (|) with the RegExp start symbol (^)
42399
+ result += REGEX_START;
42400
+ offset = REGEX_START.length;
42401
+ }
42402
+ }
42403
+ // Handle trailing pipes
42404
+ let trailingPipe = false;
42405
+ if (trimmed.endsWith(PIPE)) {
42406
+ trailingPipe = true;
42407
+ len -= PIPE.length;
42408
+ }
42409
+ // Handle the rest of the pattern, if any
42410
+ for(; offset < len; offset += 1){
42411
+ if (trimmed[offset] === ADBLOCK_WILDCARD) {
42412
+ // Replace adblock wildcard (*) with its RegExp equivalent
42413
+ result += ADBLOCK_WILDCARD_REGEX;
42414
+ } else if (trimmed[offset] === ADBLOCK_URL_SEPARATOR) {
42415
+ // Replace adblock url separator (^) with its RegExp equivalent
42416
+ result += ADBLOCK_URL_SEPARATOR_REGEX;
42417
+ } else if (SPECIAL_REGEX_SYMBOLS.has(trimmed[offset])) {
42418
+ // Escape special RegExp symbols (we handled pipe (|) and asterisk (*) already)
42419
+ result += ESCAPE_CHARACTER + trimmed[offset];
42420
+ } else {
42421
+ // Just add any other character
42422
+ result += trimmed[offset];
42423
+ }
42424
+ }
42425
+ // Handle trailing pipes
42426
+ if (trailingPipe) {
42427
+ // Replace trailing pipe (|) with the RegExp end symbol ($)
42428
+ result += REGEX_END;
42429
+ }
42430
+ return result;
42431
+ }
42432
+ /**
42433
+ * Creates a length-matching regular expression string: /^(?=.{min,max}$).*\/s
42434
+ * Where:
42435
+ * - (?=.{min,max}$) is a lookahead that ensures the string length is between min and max
42436
+ * - .* matches any character (including newlines, due to the 's' flag).
42437
+ *
42438
+ * @param min Minimum length or `null` for no minimum (default to `0`).
42439
+ * @param max Maximum length or `null` for no maximum (default to no maximum).
42440
+ *
42441
+ * @returns Length-matching regular expression string.
42442
+ */ static getLengthRegexp(min, max) {
42443
+ return `/^(?=.{${min ?? 0},${max ?? ''}}$).*/s`;
42444
+ }
42445
+ /**
42446
+ * Converts a glob pattern to a RegExp string with slashes and 's' flag.
42447
+ *
42448
+ * @param glob Glob pattern to convert.
42449
+ *
42450
+ * @returns RegExp string.
42451
+ *
42452
+ * @example
42453
+ * // Returns '/^foo.*bar$/s'
42454
+ * RegExpUtils.globToRegExp('foo*bar');
42455
+ */ static globToRegExp(glob) {
42456
+ return `${REGEX_MARKER + GlobToRegExp(glob).source + REGEX_MARKER}s`;
42457
+ }
42458
+ }
42459
+
41957
42460
  var kindOf;
41958
42461
  var hasRequiredKindOf;
41959
42462
 
@@ -42362,7 +42865,7 @@ var cloneDeep = /*@__PURE__*/getDefaultExportFromCjs(cloneDeepExports);
42362
42865
  }
42363
42866
 
42364
42867
  /*
42365
- * AGTree v4.1.1 (build date: Tue, 14 Jul 2026 18:56:22 GMT)
42868
+ * AGTree v4.2.1 (build date: Mon, 24 Aug 2026 11:14:07 GMT)
42366
42869
  * (c) 2026 Adguard Software Ltd.
42367
42870
  * Released under the MIT license
42368
42871
  * https://github.com/AdguardTeam/tsurlfilter/tree/master/packages/agtree#readme
@@ -42827,357 +43330,6 @@ const PSEUDO_ELEMENT_NAMES = new Set([
42827
43330
  return result;
42828
43331
  }
42829
43332
 
42830
- var globToRegexp;
42831
- var hasRequiredGlobToRegexp;
42832
-
42833
- function requireGlobToRegexp () {
42834
- if (hasRequiredGlobToRegexp) return globToRegexp;
42835
- hasRequiredGlobToRegexp = 1;
42836
- globToRegexp = function(glob, opts) {
42837
- if (typeof glob !== 'string') {
42838
- throw new TypeError('Expected a string');
42839
- }
42840
- var str = String(glob);
42841
- // The regexp we are building, as a string.
42842
- var reStr = "";
42843
- // Whether we are matching so called "extended" globs (like bash) and should
42844
- // support single character matching, matching ranges of characters, group
42845
- // matching, etc.
42846
- var extended = opts ? !!opts.extended : false;
42847
- // When globstar is _false_ (default), '/foo/*' is translated a regexp like
42848
- // '^\/foo\/.*$' which will match any string beginning with '/foo/'
42849
- // When globstar is _true_, '/foo/*' is translated to regexp like
42850
- // '^\/foo\/[^/]*$' which will match any string beginning with '/foo/' BUT
42851
- // which does not have a '/' to the right of it.
42852
- // E.g. with '/foo/*' these will match: '/foo/bar', '/foo/bar.txt' but
42853
- // these will not '/foo/bar/baz', '/foo/bar/baz.txt'
42854
- // Lastely, when globstar is _true_, '/foo/**' is equivelant to '/foo/*' when
42855
- // globstar is _false_
42856
- var globstar = opts ? !!opts.globstar : false;
42857
- // If we are doing extended matching, this boolean is true when we are inside
42858
- // a group (eg {*.html,*.js}), and false otherwise.
42859
- var inGroup = false;
42860
- // RegExp flags (eg "i" ) to pass in to RegExp constructor.
42861
- var flags = opts && typeof opts.flags === "string" ? opts.flags : "";
42862
- var c;
42863
- for(var i = 0, len = str.length; i < len; i++){
42864
- c = str[i];
42865
- switch(c){
42866
- case "/":
42867
- case "$":
42868
- case "^":
42869
- case "+":
42870
- case ".":
42871
- case "(":
42872
- case ")":
42873
- case "=":
42874
- case "!":
42875
- case "|":
42876
- reStr += "\\" + c;
42877
- break;
42878
- case "?":
42879
- if (extended) {
42880
- reStr += ".";
42881
- break;
42882
- }
42883
- case "[":
42884
- case "]":
42885
- if (extended) {
42886
- reStr += c;
42887
- break;
42888
- }
42889
- case "{":
42890
- if (extended) {
42891
- inGroup = true;
42892
- reStr += "(";
42893
- break;
42894
- }
42895
- case "}":
42896
- if (extended) {
42897
- inGroup = false;
42898
- reStr += ")";
42899
- break;
42900
- }
42901
- case ",":
42902
- if (inGroup) {
42903
- reStr += "|";
42904
- break;
42905
- }
42906
- reStr += "\\" + c;
42907
- break;
42908
- case "*":
42909
- // Move over all consecutive "*"'s.
42910
- // Also store the previous and next characters
42911
- var prevChar = str[i - 1];
42912
- var starCount = 1;
42913
- while(str[i + 1] === "*"){
42914
- starCount++;
42915
- i++;
42916
- }
42917
- var nextChar = str[i + 1];
42918
- if (!globstar) {
42919
- // globstar is disabled, so treat any number of "*" as one
42920
- reStr += ".*";
42921
- } else {
42922
- // globstar is enabled, so determine if this is a globstar segment
42923
- var isGlobstar = starCount > 1 // multiple "*"'s
42924
- && (prevChar === "/" || prevChar === undefined // from the start of the segment
42925
- ) && (nextChar === "/" || nextChar === undefined // to the end of the segment
42926
- );
42927
- if (isGlobstar) {
42928
- // it's a globstar, so match zero or more path segments
42929
- reStr += "((?:[^/]*(?:\/|$))*)";
42930
- i++; // move over the "/"
42931
- } else {
42932
- // it's not a globstar, so only match one path segment
42933
- reStr += "([^/]*)";
42934
- }
42935
- }
42936
- break;
42937
- default:
42938
- reStr += c;
42939
- }
42940
- }
42941
- // When regexp 'g' flag is specified don't
42942
- // constrain the regular expression with ^ & $
42943
- if (!flags || !~flags.indexOf('g')) {
42944
- reStr = "^" + reStr + "$";
42945
- }
42946
- return new RegExp(reStr, flags);
42947
- };
42948
- return globToRegexp;
42949
- }
42950
-
42951
- var globToRegexpExports = requireGlobToRegexp();
42952
- var GlobToRegExp = /*@__PURE__*/getDefaultExportFromCjs(globToRegexpExports);
42953
-
42954
- /**
42955
- * @file Regular expression utilities.
42956
- */ // Special RegExp constants
42957
- const REGEX_START = CARET; // '^'
42958
- const REGEX_END = DOLLAR_SIGN; // '$'
42959
- const REGEX_ANY_CHARACTERS = DOT + ASTERISK; // '.*'
42960
- // Special adblock pattern symbols and their RegExp equivalents
42961
- const ADBLOCK_URL_START = PIPE + PIPE; // '||'
42962
- const ADBLOCK_URL_START_REGEX = '^(http|https|ws|wss)://([a-z0-9-_.]+\\.)?';
42963
- const ADBLOCK_URL_SEPARATOR = CARET; // '^'
42964
- const ADBLOCK_URL_SEPARATOR_REGEX = '([^ a-zA-Z0-9.%_-]|$)';
42965
- const ADBLOCK_WILDCARD = ASTERISK; // '*'
42966
- const ADBLOCK_WILDCARD_REGEX = REGEX_ANY_CHARACTERS;
42967
- // Negation wrapper for RegExp patterns
42968
- const REGEX_NEGATION_PREFIX = '^((?!';
42969
- const REGEX_NEGATION_SUFFIX = ').)*$';
42970
- /**
42971
- * Special RegExp symbols.
42972
- *
42973
- * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#special-escape
42974
- */ const SPECIAL_REGEX_SYMBOLS = new Set([
42975
- ASTERISK,
42976
- CARET,
42977
- CLOSE_CURLY_BRACKET,
42978
- CLOSE_PARENTHESIS,
42979
- CLOSE_SQUARE_BRACKET,
42980
- DOLLAR_SIGN,
42981
- DOT,
42982
- ESCAPE_CHARACTER,
42983
- OPEN_CURLY_BRACKET,
42984
- OPEN_PARENTHESIS,
42985
- OPEN_SQUARE_BRACKET,
42986
- PIPE,
42987
- PLUS,
42988
- QUESTION_MARK,
42989
- SLASH
42990
- ]);
42991
- /**
42992
- * Utility functions for working with RegExp patterns.
42993
- */ class RegExpUtils {
42994
- /**
42995
- * Checks whether a string possibly is a RegExp pattern.
42996
- * Flags are not supported.
42997
- *
42998
- * Note: it does not perform a full validation of the pattern,
42999
- * it just checks if the string starts and ends with a slash.
43000
- *
43001
- * @param pattern Pattern to check.
43002
- *
43003
- * @returns `true` if the string is a RegExp pattern, `false` otherwise.
43004
- */ static isRegexPattern(pattern) {
43005
- const trimmedPattern = pattern.trim();
43006
- // Avoid false positives
43007
- return trimmedPattern.length > REGEX_MARKER.length * 2 && trimmedPattern.startsWith(REGEX_MARKER) && trimmedPattern.endsWith(REGEX_MARKER) && trimmedPattern[REGEX_MARKER.length - 2] !== ESCAPE_CHARACTER;
43008
- }
43009
- /**
43010
- * Checks whether a string is a negated RegExp pattern.
43011
- *
43012
- * @param pattern Pattern to check.
43013
- *
43014
- * @returns `true` if the string is a negated RegExp pattern, `false` otherwise.
43015
- */ static isNegatedRegexPattern(pattern) {
43016
- if (pattern.startsWith(REGEX_MARKER) && pattern.endsWith(REGEX_MARKER)) {
43017
- const innerPattern = pattern.slice(REGEX_MARKER.length, pattern.length - REGEX_MARKER.length);
43018
- return innerPattern.startsWith(REGEX_NEGATION_PREFIX) && innerPattern.endsWith(REGEX_NEGATION_SUFFIX);
43019
- }
43020
- return pattern.startsWith(REGEX_NEGATION_PREFIX) && pattern.endsWith(REGEX_NEGATION_SUFFIX);
43021
- }
43022
- /**
43023
- * Removes negation from a RegExp pattern.
43024
- *
43025
- * @param pattern RegExp pattern to remove negation from.
43026
- *
43027
- * @returns RegExp pattern without negation.
43028
- */ static removeNegationFromRegexPattern(pattern) {
43029
- let result = pattern.trim();
43030
- const slashes = RegExpUtils.isRegexPattern(result);
43031
- if (slashes) {
43032
- result = result.substring(REGEX_MARKER.length, result.length - REGEX_MARKER.length);
43033
- }
43034
- if (result.startsWith(REGEX_NEGATION_PREFIX) && result.endsWith(REGEX_NEGATION_SUFFIX)) {
43035
- result = result.substring(REGEX_NEGATION_PREFIX.length, result.length - REGEX_NEGATION_SUFFIX.length);
43036
- }
43037
- return slashes ? `${REGEX_MARKER}${result}${REGEX_MARKER}` : result;
43038
- }
43039
- /**
43040
- * Negates a RegExp pattern. Technically, this method wraps the pattern in `^((?!` and `).)*$`.
43041
- *
43042
- * RegExp modifiers are not supported.
43043
- *
43044
- * @param pattern Pattern to negate (can be wrapped in slashes or not).
43045
- *
43046
- * @returns Negated RegExp pattern.
43047
- */ static negateRegexPattern(pattern) {
43048
- let result = pattern.trim();
43049
- let slashes = false;
43050
- // Remove the leading and trailing slashes (/)
43051
- if (RegExpUtils.isRegexPattern(result)) {
43052
- result = result.substring(REGEX_MARKER.length, result.length - REGEX_MARKER.length);
43053
- slashes = true;
43054
- }
43055
- // Only negate the pattern if it's not already negated
43056
- if (!(result.startsWith(REGEX_NEGATION_PREFIX) && result.endsWith(REGEX_NEGATION_SUFFIX))) {
43057
- // Remove leading caret (^)
43058
- if (result.startsWith(REGEX_START)) {
43059
- result = result.substring(REGEX_START.length);
43060
- }
43061
- // Remove trailing dollar sign ($)
43062
- if (result.endsWith(REGEX_END)) {
43063
- result = result.substring(0, result.length - REGEX_END.length);
43064
- }
43065
- // Wrap the pattern in the negation
43066
- result = `${REGEX_NEGATION_PREFIX}${result}${REGEX_NEGATION_SUFFIX}`;
43067
- }
43068
- // Add the leading and trailing slashes back if they were there
43069
- if (slashes) {
43070
- result = `${REGEX_MARKER}${result}${REGEX_MARKER}`;
43071
- }
43072
- return result;
43073
- }
43074
- /**
43075
- * Ensures that a pattern is wrapped in slashes.
43076
- *
43077
- * @param pattern Pattern to ensure slashes for.
43078
- *
43079
- * @returns Pattern with slashes.
43080
- */ static ensureSlashes(pattern) {
43081
- let result = pattern;
43082
- if (!result.startsWith(REGEX_MARKER)) {
43083
- result = `${REGEX_MARKER}${result}`;
43084
- }
43085
- if (!result.endsWith(REGEX_MARKER)) {
43086
- result += REGEX_MARKER;
43087
- }
43088
- return result;
43089
- }
43090
- /**
43091
- * Converts a basic adblock rule pattern to a RegExp pattern. Based on
43092
- * https://github.com/AdguardTeam/tsurlfilter/blob/9b26e0b4a0e30b87690bc60f7cf377d112c3085c/packages/tsurlfilter/src/rules/simple-regex.ts#L219.
43093
- *
43094
- * @see {@link https://kb.adguard.com/en/general/how-to-create-your-own-ad-filters#basic-rules}
43095
- *
43096
- * @param pattern Pattern to convert.
43097
- *
43098
- * @returns RegExp equivalent of the pattern.
43099
- */ static patternToRegexp(pattern) {
43100
- const trimmed = pattern.trim();
43101
- // Return regex for any character sequence if the pattern is just |, ||, * or empty
43102
- if (trimmed === ADBLOCK_URL_START || trimmed === PIPE || trimmed === ADBLOCK_WILDCARD || trimmed === EMPTY) {
43103
- return REGEX_ANY_CHARACTERS;
43104
- }
43105
- // If the pattern is already a RegExp, just return it, but remove the leading and trailing slashes
43106
- if (RegExpUtils.isRegexPattern(pattern)) {
43107
- return pattern.substring(REGEX_MARKER.length, pattern.length - REGEX_MARKER.length);
43108
- }
43109
- let result = EMPTY;
43110
- let offset = 0;
43111
- let len = trimmed.length;
43112
- // Handle leading pipes
43113
- if (trimmed[0] === PIPE) {
43114
- if (trimmed[1] === PIPE) {
43115
- // Replace adblock url start (||) with its RegExp equivalent
43116
- result += ADBLOCK_URL_START_REGEX;
43117
- offset = ADBLOCK_URL_START.length;
43118
- } else {
43119
- // Replace single pipe (|) with the RegExp start symbol (^)
43120
- result += REGEX_START;
43121
- offset = REGEX_START.length;
43122
- }
43123
- }
43124
- // Handle trailing pipes
43125
- let trailingPipe = false;
43126
- if (trimmed.endsWith(PIPE)) {
43127
- trailingPipe = true;
43128
- len -= PIPE.length;
43129
- }
43130
- // Handle the rest of the pattern, if any
43131
- for(; offset < len; offset += 1){
43132
- if (trimmed[offset] === ADBLOCK_WILDCARD) {
43133
- // Replace adblock wildcard (*) with its RegExp equivalent
43134
- result += ADBLOCK_WILDCARD_REGEX;
43135
- } else if (trimmed[offset] === ADBLOCK_URL_SEPARATOR) {
43136
- // Replace adblock url separator (^) with its RegExp equivalent
43137
- result += ADBLOCK_URL_SEPARATOR_REGEX;
43138
- } else if (SPECIAL_REGEX_SYMBOLS.has(trimmed[offset])) {
43139
- // Escape special RegExp symbols (we handled pipe (|) and asterisk (*) already)
43140
- result += ESCAPE_CHARACTER + trimmed[offset];
43141
- } else {
43142
- // Just add any other character
43143
- result += trimmed[offset];
43144
- }
43145
- }
43146
- // Handle trailing pipes
43147
- if (trailingPipe) {
43148
- // Replace trailing pipe (|) with the RegExp end symbol ($)
43149
- result += REGEX_END;
43150
- }
43151
- return result;
43152
- }
43153
- /**
43154
- * Creates a length-matching regular expression string: /^(?=.{min,max}$).*\/s
43155
- * Where:
43156
- * - (?=.{min,max}$) is a lookahead that ensures the string length is between min and max
43157
- * - .* matches any character (including newlines, due to the 's' flag).
43158
- *
43159
- * @param min Minimum length or `null` for no minimum (default to `0`).
43160
- * @param max Maximum length or `null` for no maximum (default to no maximum).
43161
- *
43162
- * @returns Length-matching regular expression string.
43163
- */ static getLengthRegexp(min, max) {
43164
- return `/^(?=.{${min ?? 0},${max ?? ''}}$).*/s`;
43165
- }
43166
- /**
43167
- * Converts a glob pattern to a RegExp string with slashes and 's' flag.
43168
- *
43169
- * @param glob Glob pattern to convert.
43170
- *
43171
- * @returns RegExp string.
43172
- *
43173
- * @example
43174
- * // Returns '/^foo.*bar$/s'
43175
- * RegExpUtils.globToRegExp('foo*bar');
43176
- */ static globToRegExp(glob) {
43177
- return `${REGEX_MARKER + GlobToRegExp(glob).source + REGEX_MARKER}s`;
43178
- }
43179
- }
43180
-
43181
43333
  /**
43182
43334
  * @file Converter for request header removal rules.
43183
43335
  */ const ADG_REMOVEHEADER_MODIFIER = 'removeheader';
@@ -44549,6 +44701,12 @@ const ADG_PREVENT_FETCH_WILDCARD = '*';
44549
44701
  const UBO_NO_FETCH_IF_WILDCARD = '/^/';
44550
44702
  const UBO_REMOVE_CLASS_NAME = 'remove-class.js';
44551
44703
  const UBO_REMOVE_ATTR_NAME = 'remove-attr.js';
44704
+ const UBO_JSON_PRUNE_FETCH_RESPONSE_NAME = 'json-prune-fetch-response.js';
44705
+ const UBO_JSON_PRUNE_XHR_RESPONSE_NAME = 'json-prune-xhr-response.js';
44706
+ const UBO_PRUNE_RESPONSE_PROPS_TO_MATCH_KEY = 'propsToMatch';
44707
+ const UBO_PRUNE_RESPONSE_STACK_TO_MATCH_KEY = 'stackToMatch';
44708
+ const ADG_PRUNE_FETCH_RESPONSE_NAME = UBO_JSON_PRUNE_FETCH_RESPONSE_NAME.slice(0, -UBO_SCRIPTLET_JS_SUFFIX_LENGTH);
44709
+ const ADG_PRUNE_XHR_RESPONSE_NAME = UBO_JSON_PRUNE_XHR_RESPONSE_NAME.slice(0, -UBO_SCRIPTLET_JS_SUFFIX_LENGTH);
44552
44710
  const setConstantAdgToUboMap = {
44553
44711
  [ADG_SET_CONSTANT_EMPTY_STRING]: UBO_SET_CONSTANT_EMPTY_STRING,
44554
44712
  [ADG_SET_CONSTANT_EMPTY_ARRAY]: UBO_SET_CONSTANT_EMPTY_ARRAY,
@@ -44663,6 +44821,11 @@ const REMOVE_ATTR_CLASS_APPLYING = new Set([
44663
44821
  });
44664
44822
  }
44665
44823
  }
44824
+ // Remap uBO prune-response scriptlet key/value args into ADG positional slots.
44825
+ // https://github.com/AdguardTeam/FiltersCompiler/issues/250
44826
+ if (scriptletData) {
44827
+ ScriptletRuleConverter.remapUboPruneResponseArgs(scriptletClone, scriptletData);
44828
+ }
44666
44829
  }
44667
44830
  // ADG scriptlet parameters should be quoted, and single quoted are preferred
44668
44831
  setScriptletQuoteType(scriptletClone, QuoteType.Single);
@@ -44695,9 +44858,181 @@ const REMOVE_ATTR_CLASS_APPLYING = new Set([
44695
44858
  const res = {
44696
44859
  category: rule.category,
44697
44860
  type: rule.type,
44698
- syntax: AdblockSyntax.Adg,
44861
+ syntax: AdblockSyntax.Adg,
44862
+ exception: rule.exception,
44863
+ domains: cloneDomainListNode(rule.domains),
44864
+ separator: {
44865
+ type: 'Value',
44866
+ value: convertedSeparator
44867
+ },
44868
+ body: {
44869
+ type: rule.body.type,
44870
+ children: [
44871
+ scriptlet
44872
+ ]
44873
+ }
44874
+ };
44875
+ if (rule.modifiers) {
44876
+ res.modifiers = cloneModifierListNode(rule.modifiers);
44877
+ }
44878
+ return res;
44879
+ }), true);
44880
+ }
44881
+ /**
44882
+ * Converts a scriptlet injection rule to uBlock format, if possible.
44883
+ *
44884
+ * @param rule Rule node to convert.
44885
+ *
44886
+ * @returns An object which follows the {@link NodeConversionResult} interface. Its `result` property contains
44887
+ * the array of converted rule nodes, and its `isConverted` flag indicates whether the original rule was converted.
44888
+ * If the rule was not converted, the result array will contain the original node with the same object reference.
44889
+ *
44890
+ * @throws If the rule is invalid or cannot be converted.
44891
+ */ static convertToUbo(rule) {
44892
+ // Ignore uBlock rules
44893
+ if (rule.syntax === AdblockSyntax.Ubo) {
44894
+ return createNodeConversionResult([
44895
+ rule
44896
+ ], false);
44897
+ }
44898
+ let ruleDomainsList = cloneDomainListNode(rule.domains);
44899
+ if (rule.syntax === AdblockSyntax.Adg && rule.modifiers?.children.length) {
44900
+ const { modifiers } = rule;
44901
+ // Validate modifiers structure
44902
+ if (!modifiers || !modifiers.children || modifiers.children.length === 0) {
44903
+ throw new RuleConversionError('Invalid modifiers in AdGuard rule.');
44904
+ }
44905
+ // Check for single domain modifier
44906
+ const [domainModifier] = modifiers.children;
44907
+ const hasSingleDomainModifier = modifiers.children.length === 1 && domainModifier.name?.value === ADG_DOMAINS_MODIFIER && domainModifier.value?.value;
44908
+ if (!hasSingleDomainModifier) {
44909
+ throw new RuleConversionError('uBlock Origin scriptlet injection rules do not support cosmetic rule modifiers.');
44910
+ }
44911
+ // Validate domain modifier
44912
+ if (!domainModifier.value?.value) {
44913
+ throw new RuleConversionError('Invalid domain modifier in AdGuard rule.');
44914
+ }
44915
+ // Parse domain list
44916
+ const parsedDomainList = DomainListParser.parse(domainModifier.value.value, {}, domainModifier.start, PIPE_MODIFIER_SEPARATOR);
44917
+ // Merge domain lists
44918
+ if (ruleDomainsList) {
44919
+ ruleDomainsList.children.push(...parsedDomainList.children);
44920
+ } else {
44921
+ ruleDomainsList = parsedDomainList;
44922
+ }
44923
+ }
44924
+ const separator = rule.separator.value;
44925
+ let convertedSeparator = separator;
44926
+ convertedSeparator = rule.exception ? CosmeticRuleSeparator.ElementHidingException : CosmeticRuleSeparator.ElementHiding;
44927
+ const convertedScriptlets = [];
44928
+ for (const scriptlet of rule.body.children){
44929
+ // Clone the node to avoid any side effects
44930
+ const scriptletClone = cloneScriptletRuleNode(scriptlet);
44931
+ // Remove possible quotes just to make it easier to work with the scriptlet name
44932
+ const scriptletName = QuoteUtils.setStringQuoteType(getScriptletName(scriptletClone), QuoteType.None);
44933
+ let uboScriptletName;
44934
+ if (rule.syntax === AdblockSyntax.Adg && scriptletName.startsWith(UBO_SCRIPTLET_PREFIX)) {
44935
+ // Special case: AdGuard syntax 'preserves' the original scriptlet name,
44936
+ // so we need to convert it back by removing the uBO prefix
44937
+ uboScriptletName = scriptletName.slice(UBO_SCRIPTLET_PREFIX_LENGTH);
44938
+ } else {
44939
+ // Otherwise, try to find the corresponding uBO scriptlet name, or use the original one if not found
44940
+ const uboScriptlet = scriptletsCompatibilityTable.getFirst(scriptletName, GenericPlatform.UboAny);
44941
+ if (!uboScriptlet) {
44942
+ throw new RuleConversionError(`Scriptlet "${scriptletName}" is not supported in uBlock Origin.`);
44943
+ }
44944
+ uboScriptletName = uboScriptlet.name;
44945
+ }
44946
+ // Remove the '.js' suffix if it's there - its presence is not mandatory
44947
+ if (uboScriptletName.endsWith(UBO_SCRIPTLET_JS_SUFFIX)) {
44948
+ uboScriptletName = uboScriptletName.slice(0, -UBO_SCRIPTLET_JS_SUFFIX_LENGTH);
44949
+ }
44950
+ setScriptletName(scriptletClone, uboScriptletName);
44951
+ setScriptletQuoteType(scriptletClone, QuoteType.None);
44952
+ // Escape unescaped commas in parameters, because uBlock Origin uses them as separators.
44953
+ // For example, the following AdGuard rule:
44954
+ //
44955
+ // example.com#%#//scriptlet('spoof-css', '.adsbygoogle, #ads', 'visibility', 'visible')
44956
+ //
44957
+ // ↓↓ should be converted to ↓↓
44958
+ //
44959
+ // example.com##+js(spoof-css.js, .adsbygoogle\, #ads, visibility, visible)
44960
+ // ------------ ------------------- ---------- -------
44961
+ // arg 0 arg 1 arg 2 arg 3
44962
+ //
44963
+ // and we need to escape the comma in the second argument to prevent it from being treated
44964
+ // as two separate arguments.
44965
+ transformAllScriptletArguments(scriptletClone, (value)=>{
44966
+ if (!isNull(value)) {
44967
+ return QuoteUtils.escapeUnescapedOccurrences(value, COMMA_SEPARATOR);
44968
+ }
44969
+ return value;
44970
+ });
44971
+ // Unescape spaces in parameters, because uBlock Origin doesn't treat them as separators.
44972
+ if (rule.syntax === AdblockSyntax.Abp) {
44973
+ transformAllScriptletArguments(scriptletClone, (value)=>{
44974
+ if (!isNull(value)) {
44975
+ return QuoteUtils.unescapeSingleEscapedOccurrences(value, SPACE);
44976
+ }
44977
+ return value;
44978
+ });
44979
+ }
44980
+ // Some scriptlets have special values that need to be converted
44981
+ switch(scriptletName){
44982
+ case ADG_SET_CONSTANT_NAME:
44983
+ transformNthScriptletArgument(scriptletClone, 2, (value)=>{
44984
+ if (!isNull(value)) {
44985
+ return setConstantAdgToUboMap[value] ?? value;
44986
+ }
44987
+ return value;
44988
+ });
44989
+ break;
44990
+ case ADG_PREVENT_FETCH_NAME:
44991
+ transformNthScriptletArgument(scriptletClone, 1, (value)=>{
44992
+ if (value === ADG_PREVENT_FETCH_EMPTY_STRING || value === ADG_PREVENT_FETCH_WILDCARD) {
44993
+ return UBO_NO_FETCH_IF_WILDCARD;
44994
+ }
44995
+ return value;
44996
+ });
44997
+ break;
44998
+ case ADG_PRUNE_FETCH_RESPONSE_NAME:
44999
+ case ADG_PRUNE_XHR_RESPONSE_NAME:
45000
+ ScriptletRuleConverter.remapAdgToUboPruneResponseArgs(scriptletClone);
45001
+ break;
45002
+ }
45003
+ convertedScriptlets.push(scriptletClone);
45004
+ }
45005
+ // TODO: Refactor redundant code
45006
+ if (rule.body.children.length === 0) {
45007
+ const convertedScriptletNode = {
45008
+ category: rule.category,
45009
+ type: rule.type,
45010
+ syntax: AdblockSyntax.Ubo,
45011
+ exception: rule.exception,
45012
+ domains: cloneDomainListNode(rule.domains),
45013
+ separator: {
45014
+ type: 'Value',
45015
+ value: convertedSeparator
45016
+ },
45017
+ body: {
45018
+ type: rule.body.type,
45019
+ children: []
45020
+ }
45021
+ };
45022
+ if (rule.modifiers) {
45023
+ convertedScriptletNode.modifiers = cloneModifierListNode(rule.modifiers);
45024
+ }
45025
+ return createNodeConversionResult([
45026
+ convertedScriptletNode
45027
+ ], true);
45028
+ }
45029
+ return createNodeConversionResult(convertedScriptlets.map((scriptlet)=>{
45030
+ const res = {
45031
+ category: rule.category,
45032
+ type: rule.type,
45033
+ syntax: AdblockSyntax.Ubo,
44699
45034
  exception: rule.exception,
44700
- domains: cloneDomainListNode(rule.domains),
45035
+ domains: ruleDomainsList,
44701
45036
  separator: {
44702
45037
  type: 'Value',
44703
45038
  value: convertedSeparator
@@ -44709,176 +45044,140 @@ const REMOVE_ATTR_CLASS_APPLYING = new Set([
44709
45044
  ]
44710
45045
  }
44711
45046
  };
44712
- if (rule.modifiers) {
44713
- res.modifiers = cloneModifierListNode(rule.modifiers);
44714
- }
44715
45047
  return res;
44716
45048
  }), true);
44717
45049
  }
44718
45050
  /**
44719
- * Converts a scriptlet injection rule to uBlock format, if possible.
45051
+ * Remaps uBO key/value args of `json-prune-fetch-response` and
45052
+ * `json-prune-xhr-response` into AdGuard positional argument slots.
44720
45053
  *
44721
- * @param rule Rule node to convert.
45054
+ * These uBO variants accept only two positional args (`propsToRemove`,
45055
+ * `obligatoryProps`); args 3+ are key/value pairs parsed by uBO's
45056
+ * `getExtraArgs` (even index = key, odd index = value). Recognized keys:
45057
+ * `propsToMatch`, `stackToMatch`. ADG's equivalents use positional
45058
+ * `propsToMatch` (arg 3) and `stack` (arg 4), so the pairs are remapped into
45059
+ * positional slots. Unknown keys are dropped, because uBO ignores keys it
45060
+ * does not read and they cannot be mapped to an ADG positional slot. When a
45061
+ * recognized key repeats, the last value wins.
44722
45062
  *
44723
- * @returns An object which follows the {@link NodeConversionResult} interface. Its `result` property contains
44724
- * the array of converted rule nodes, and its `isConverted` flag indicates whether the original rule was converted.
44725
- * If the rule was not converted, the result array will contain the original node with the same object reference.
45063
+ * Besides remapping arguments, this method also sets the scriptlet node's
45064
+ * name to the AdGuard native name (the uBO canonical name without the
45065
+ * `.js` suffix). This overrides the `ubo-` prefix that `convertToAdg`
45066
+ * adds earlier in its main flow for these two scriptlets, so the final
45067
+ * output uses the native AdGuard name with positional argument semantics.
44726
45068
  *
44727
- * @throws If the rule is invalid or cannot be converted.
44728
- */ static convertToUbo(rule) {
44729
- // Ignore uBlock rules
44730
- if (rule.syntax === AdblockSyntax.Ubo) {
44731
- return createNodeConversionResult([
44732
- rule
44733
- ], false);
45069
+ * @see https://github.com/AdguardTeam/FiltersCompiler/issues/250
45070
+ *
45071
+ * @param scriptletClone Cloned scriptlet node to remap in place.
45072
+ * @param scriptletData Compatibility data for the matched uBO scriptlet.
45073
+ */ static remapUboPruneResponseArgs(scriptletClone, scriptletData) {
45074
+ // Only the two prune-response scriptlets need key/value → positional remapping.
45075
+ if (scriptletData.name !== UBO_JSON_PRUNE_FETCH_RESPONSE_NAME && scriptletData.name !== UBO_JSON_PRUNE_XHR_RESPONSE_NAME) {
45076
+ return;
44734
45077
  }
44735
- let ruleDomainsList = cloneDomainListNode(rule.domains);
44736
- if (rule.syntax === AdblockSyntax.Adg && rule.modifiers?.children.length) {
44737
- const { modifiers } = rule;
44738
- // Validate modifiers structure
44739
- if (!modifiers || !modifiers.children || modifiers.children.length === 0) {
44740
- throw new RuleConversionError('Invalid modifiers in AdGuard rule.');
44741
- }
44742
- // Check for single domain modifier
44743
- const [domainModifier] = modifiers.children;
44744
- const hasSingleDomainModifier = modifiers.children.length === 1 && domainModifier.name?.value === ADG_DOMAINS_MODIFIER && domainModifier.value?.value;
44745
- if (!hasSingleDomainModifier) {
44746
- throw new RuleConversionError('uBlock Origin scriptlet injection rules do not support cosmetic rule modifiers.');
44747
- }
44748
- // Validate domain modifier
44749
- if (!domainModifier.value?.value) {
44750
- throw new RuleConversionError('Invalid domain modifier in AdGuard rule.');
44751
- }
44752
- // Parse domain list
44753
- const parsedDomainList = DomainListParser.parse(domainModifier.value.value, {}, domainModifier.start, PIPE_MODIFIER_SEPARATOR);
44754
- // Merge domain lists
44755
- if (ruleDomainsList) {
44756
- ruleDomainsList.children.push(...parsedDomainList.children);
44757
- } else {
44758
- ruleDomainsList = parsedDomainList;
45078
+ const propsToRemove = scriptletClone.children[1]?.value ?? EMPTY;
45079
+ const obligatoryProps = scriptletClone.children[2]?.value ?? EMPTY;
45080
+ // Whether the source had an explicit 2nd positional arg (children[2]).
45081
+ const hadObligatoryProps = scriptletClone.children.length > 2;
45082
+ let propsToMatch = EMPTY;
45083
+ let stack = EMPTY;
45084
+ const unknownKeys = [];
45085
+ // Varargs start at index 3 (children[0] is the scriptlet name).
45086
+ for(let i = 3; i < scriptletClone.children.length; i += 2){
45087
+ const key = scriptletClone.children[i]?.value ?? EMPTY;
45088
+ const val = scriptletClone.children[i + 1]?.value ?? EMPTY;
45089
+ if (key === UBO_PRUNE_RESPONSE_PROPS_TO_MATCH_KEY) {
45090
+ propsToMatch = val;
45091
+ } else if (key === UBO_PRUNE_RESPONSE_STACK_TO_MATCH_KEY) {
45092
+ stack = val;
45093
+ } else if (key !== EMPTY) {
45094
+ // Unknown keys are dropped: uBO ignores keys it does not read,
45095
+ // and they cannot be mapped to an ADG positional slot.
45096
+ unknownKeys.push(key);
45097
+ }
45098
+ }
45099
+ if (unknownKeys.length > 0) {
45100
+ // eslint-disable-next-line no-console
45101
+ console.warn(`[agtree] Dropped unknown extra args for ${scriptletData.name}: ${unknownKeys.join(', ')}`);
45102
+ }
45103
+ // Translate to the ADG native name (uBO canonical name without the
45104
+ // `.js` suffix): the arguments are now in ADG positional semantics.
45105
+ const adgName = scriptletData.name.slice(0, -UBO_SCRIPTLET_JS_SUFFIX_LENGTH);
45106
+ setScriptletName(scriptletClone, adgName);
45107
+ // Rebuild children: name, propsToRemove, then the obligatoryProps,
45108
+ // propsToMatch and stack slots. `obligatoryProps` is emitted only when
45109
+ // it was present in the source or when a positional propsToMatch/stack
45110
+ // slot follows, so the output never gains a trailing empty arg the
45111
+ // source never had.
45112
+ // eslint-disable-next-line no-param-reassign
45113
+ scriptletClone.children = [
45114
+ scriptletClone.children[0],
45115
+ {
45116
+ type: 'Value',
45117
+ value: propsToRemove
44759
45118
  }
45119
+ ];
45120
+ if (hadObligatoryProps || propsToMatch !== EMPTY || stack !== EMPTY) {
45121
+ scriptletClone.children.push({
45122
+ type: 'Value',
45123
+ value: obligatoryProps
45124
+ });
44760
45125
  }
44761
- const separator = rule.separator.value;
44762
- let convertedSeparator = separator;
44763
- convertedSeparator = rule.exception ? CosmeticRuleSeparator.ElementHidingException : CosmeticRuleSeparator.ElementHiding;
44764
- const convertedScriptlets = [];
44765
- for (const scriptlet of rule.body.children){
44766
- // Clone the node to avoid any side effects
44767
- const scriptletClone = cloneScriptletRuleNode(scriptlet);
44768
- // Remove possible quotes just to make it easier to work with the scriptlet name
44769
- const scriptletName = QuoteUtils.setStringQuoteType(getScriptletName(scriptletClone), QuoteType.None);
44770
- let uboScriptletName;
44771
- if (rule.syntax === AdblockSyntax.Adg && scriptletName.startsWith(UBO_SCRIPTLET_PREFIX)) {
44772
- // Special case: AdGuard syntax 'preserves' the original scriptlet name,
44773
- // so we need to convert it back by removing the uBO prefix
44774
- uboScriptletName = scriptletName.slice(UBO_SCRIPTLET_PREFIX_LENGTH);
44775
- } else {
44776
- // Otherwise, try to find the corresponding uBO scriptlet name, or use the original one if not found
44777
- const uboScriptlet = scriptletsCompatibilityTable.getFirst(scriptletName, GenericPlatform.UboAny);
44778
- if (!uboScriptlet) {
44779
- throw new RuleConversionError(`Scriptlet "${scriptletName}" is not supported in uBlock Origin.`);
44780
- }
44781
- uboScriptletName = uboScriptlet.name;
44782
- }
44783
- // Remove the '.js' suffix if it's there - its presence is not mandatory
44784
- if (uboScriptletName.endsWith(UBO_SCRIPTLET_JS_SUFFIX)) {
44785
- uboScriptletName = uboScriptletName.slice(0, -UBO_SCRIPTLET_JS_SUFFIX_LENGTH);
44786
- }
44787
- setScriptletName(scriptletClone, uboScriptletName);
44788
- setScriptletQuoteType(scriptletClone, QuoteType.None);
44789
- // Escape unescaped commas in parameters, because uBlock Origin uses them as separators.
44790
- // For example, the following AdGuard rule:
44791
- //
44792
- // example.com#%#//scriptlet('spoof-css', '.adsbygoogle, #ads', 'visibility', 'visible')
44793
- //
44794
- // ↓↓ should be converted to ↓↓
44795
- //
44796
- // example.com##+js(spoof-css.js, .adsbygoogle\, #ads, visibility, visible)
44797
- // ------------ ------------------- ---------- -------
44798
- // arg 0 arg 1 arg 2 arg 3
44799
- //
44800
- // and we need to escape the comma in the second argument to prevent it from being treated
44801
- // as two separate arguments.
44802
- transformAllScriptletArguments(scriptletClone, (value)=>{
44803
- if (!isNull(value)) {
44804
- return QuoteUtils.escapeUnescapedOccurrences(value, COMMA_SEPARATOR);
44805
- }
44806
- return value;
45126
+ if (propsToMatch !== EMPTY || stack !== EMPTY) {
45127
+ scriptletClone.children.push({
45128
+ type: 'Value',
45129
+ value: propsToMatch
44807
45130
  });
44808
- // Unescape spaces in parameters, because uBlock Origin doesn't treat them as separators.
44809
- if (rule.syntax === AdblockSyntax.Abp) {
44810
- transformAllScriptletArguments(scriptletClone, (value)=>{
44811
- if (!isNull(value)) {
44812
- return QuoteUtils.unescapeSingleEscapedOccurrences(value, SPACE);
44813
- }
44814
- return value;
44815
- });
44816
- }
44817
- // Some scriptlets have special values that need to be converted
44818
- switch(scriptletName){
44819
- case ADG_SET_CONSTANT_NAME:
44820
- transformNthScriptletArgument(scriptletClone, 2, (value)=>{
44821
- if (!isNull(value)) {
44822
- return setConstantAdgToUboMap[value] ?? value;
44823
- }
44824
- return value;
44825
- });
44826
- break;
44827
- case ADG_PREVENT_FETCH_NAME:
44828
- transformNthScriptletArgument(scriptletClone, 1, (value)=>{
44829
- if (value === ADG_PREVENT_FETCH_EMPTY_STRING || value === ADG_PREVENT_FETCH_WILDCARD) {
44830
- return UBO_NO_FETCH_IF_WILDCARD;
44831
- }
44832
- return value;
44833
- });
44834
- break;
44835
- }
44836
- convertedScriptlets.push(scriptletClone);
44837
45131
  }
44838
- // TODO: Refactor redundant code
44839
- if (rule.body.children.length === 0) {
44840
- const convertedScriptletNode = {
44841
- category: rule.category,
44842
- type: rule.type,
44843
- syntax: AdblockSyntax.Ubo,
44844
- exception: rule.exception,
44845
- domains: cloneDomainListNode(rule.domains),
44846
- separator: {
44847
- type: 'Value',
44848
- value: convertedSeparator
44849
- },
44850
- body: {
44851
- type: rule.body.type,
44852
- children: []
44853
- }
44854
- };
44855
- if (rule.modifiers) {
44856
- convertedScriptletNode.modifiers = cloneModifierListNode(rule.modifiers);
44857
- }
44858
- return createNodeConversionResult([
44859
- convertedScriptletNode
44860
- ], true);
45132
+ if (stack !== EMPTY) {
45133
+ scriptletClone.children.push({
45134
+ type: 'Value',
45135
+ value: stack
45136
+ });
45137
+ }
45138
+ }
45139
+ /**
45140
+ * Inverse of {@link ScriptletRuleConverter.remapUboPruneResponseArgs}:
45141
+ * remaps AdGuard positional `propsToMatch`/`stack` args of
45142
+ * `json-prune-fetch-response` / `json-prune-xhr-response` back into uBO
45143
+ * key/value pairs (`propsToMatch`, `stackToMatch`).
45144
+ *
45145
+ * `children` layout (AdGuard, before this method): `[name, propsToRemove,
45146
+ * obligatoryProps, propsToMatch, stack]`. `propsToMatch` and `stack` are
45147
+ * optional; empty values are not re-emitted, so the output never has
45148
+ * trailing empty key/value pairs. ADG rules that already use the
45149
+ * `ubo-`-prefixed name keep key/value args and are not handled here (they
45150
+ * take the `ubo-` prefix branch in `convertToUbo`, not this `switch`).
45151
+ *
45152
+ * @param scriptletClone Cloned scriptlet node to remap in place.
45153
+ */ static remapAdgToUboPruneResponseArgs(scriptletClone) {
45154
+ // Read the positional propsToMatch/stack before truncating children.
45155
+ const propsToMatchVal = scriptletClone.children[3]?.value;
45156
+ const stackVal = scriptletClone.children[4]?.value;
45157
+ // Keep the name and the two positional args; drop the positional
45158
+ // propsToMatch/stack slots — they are re-emitted as uBO key/value pairs.
45159
+ // eslint-disable-next-line no-param-reassign
45160
+ scriptletClone.children = scriptletClone.children.slice(0, Math.min(3, scriptletClone.children.length));
45161
+ if (propsToMatchVal && propsToMatchVal !== EMPTY) {
45162
+ scriptletClone.children.push({
45163
+ type: 'Value',
45164
+ value: UBO_PRUNE_RESPONSE_PROPS_TO_MATCH_KEY
45165
+ });
45166
+ scriptletClone.children.push({
45167
+ type: 'Value',
45168
+ value: propsToMatchVal
45169
+ });
45170
+ }
45171
+ if (stackVal && stackVal !== EMPTY) {
45172
+ scriptletClone.children.push({
45173
+ type: 'Value',
45174
+ value: UBO_PRUNE_RESPONSE_STACK_TO_MATCH_KEY
45175
+ });
45176
+ scriptletClone.children.push({
45177
+ type: 'Value',
45178
+ value: stackVal
45179
+ });
44861
45180
  }
44862
- return createNodeConversionResult(convertedScriptlets.map((scriptlet)=>{
44863
- const res = {
44864
- category: rule.category,
44865
- type: rule.type,
44866
- syntax: AdblockSyntax.Ubo,
44867
- exception: rule.exception,
44868
- domains: ruleDomainsList,
44869
- separator: {
44870
- type: 'Value',
44871
- value: convertedSeparator
44872
- },
44873
- body: {
44874
- type: rule.body.type,
44875
- children: [
44876
- scriptlet
44877
- ]
44878
- }
44879
- };
44880
- return res;
44881
- }), true);
44882
45181
  }
44883
45182
  }
44884
45183
 
@@ -45604,6 +45903,9 @@ const CSP_SEPARATOR = SEMICOLON + SPACE;
45604
45903
  * This is a wildcard character. It is used to represent "any set of characters".
45605
45904
  * This can also be an empty string or a string of any length.
45606
45905
  */ const MASK_ANY_CHARACTER = '*';
45906
+ /**
45907
+ * Dot character, used as a domain label separator.
45908
+ */ const DOT = '.';
45607
45909
  /**
45608
45910
  * Space character.
45609
45911
  */ const SPACE_CHARACTER = ' ';
@@ -46105,6 +46407,9 @@ const CSP_SEPARATOR = SEMICOLON + SPACE;
46105
46407
  * Weight for `$important` modifier (Category 7).
46106
46408
  */ RulePriority.CATEGORY_SEVEN_WEIGHT = 1000000;
46107
46409
 
46410
+ /**
46411
+ * Separator used in network-rule modifier domain lists (`$domain=a|b`).
46412
+ */ const DOMAIN_LIST_PIPE_SEPARATOR = '|';
46108
46413
  /**
46109
46414
  * Maps canonical content-type modifier names to their DNR `ResourceType`
46110
46415
  * equivalents. Only modifier names that correspond to adblock filter syntax
@@ -46411,6 +46716,32 @@ const CSP_SEPARATOR = SEMICOLON + SPACE;
46411
46716
  isRequest
46412
46717
  };
46413
46718
  }
46719
+ /**
46720
+ * Parses a pipe-separated domain list, keeping `/regex/` tokens intact
46721
+ * (so `|` inside a regexp is not treated as a domain separator).
46722
+ *
46723
+ * @param value Raw `$domain` / `$to` / `$denyallow` modifier value.
46724
+ *
46725
+ * @returns Permitted and restricted domain lists.
46726
+ */ static parseDomainList(value) {
46727
+ const permitted = [];
46728
+ const restricted = [];
46729
+ const node = DomainListParser.parse(value, undefined, 0, DOMAIN_LIST_PIPE_SEPARATOR);
46730
+ for (const { exception, value: domain } of node.children){
46731
+ if (!domain) {
46732
+ continue;
46733
+ }
46734
+ if (exception) {
46735
+ restricted.push(domain);
46736
+ } else {
46737
+ permitted.push(domain);
46738
+ }
46739
+ }
46740
+ return {
46741
+ permitted,
46742
+ restricted
46743
+ };
46744
+ }
46414
46745
  /**
46415
46746
  * Parses the `$header` modifier value into an {@link HttpHeaderMatcher}.
46416
46747
  *
@@ -46592,6 +46923,11 @@ const CSP_SEPARATOR = SEMICOLON + SPACE;
46592
46923
  */ this.advancedModifierName = null;
46593
46924
  /**
46594
46925
  * Raw string value of the advanced modifier.
46926
+ *
46927
+ * `null` when the modifier has no value. The only exception is
46928
+ * `$removeparam`: a value-less `$removeparam` is stored as `''`, because
46929
+ * it carries a meaning of its own ("remove all query parameters") that
46930
+ * must be distinguishable from "no value".
46595
46931
  */ this.advancedModifierValue = null;
46596
46932
  /**
46597
46933
  * Parsed data for the `$header` modifier.
@@ -46634,6 +46970,10 @@ const CSP_SEPARATOR = SEMICOLON + SPACE;
46634
46970
  const exception = modifier.exception ?? false;
46635
46971
  const value = modifier.value?.value ?? '';
46636
46972
  const name = rawName;
46973
+ // A noop modifier consists only of underscores and does not affect the rule.
46974
+ if (name.startsWith(OPTION_NAMES.NOOP) && !name.split(OPTION_NAMES.NOOP).some((part)=>!!part)) {
46975
+ continue;
46976
+ }
46637
46977
  if (exception && !NEGATABLE_MODIFIERS.has(name)) {
46638
46978
  throw new SyntaxError(`Modifier $${name} cannot be negated`);
46639
46979
  }
@@ -46758,16 +47098,7 @@ const CSP_SEPARATOR = SEMICOLON + SPACE;
46758
47098
  }
46759
47099
  case OPTION_NAMES.DOMAIN:
46760
47100
  {
46761
- const parts = value.split('|').filter(Boolean);
46762
- const permitted = [];
46763
- const restricted = [];
46764
- for (const part of parts){
46765
- if (part.startsWith('~')) {
46766
- restricted.push(part.slice(1));
46767
- } else {
46768
- permitted.push(part);
46769
- }
46770
- }
47101
+ const { permitted, restricted } = Rule.parseDomainList(value);
46771
47102
  if (permitted.length > 0) {
46772
47103
  this.permittedDomains = permitted;
46773
47104
  meta.permittedDomainCount = permitted.length;
@@ -46780,33 +47111,24 @@ const CSP_SEPARATOR = SEMICOLON + SPACE;
46780
47111
  }
46781
47112
  case OPTION_NAMES.DENYALLOW:
46782
47113
  {
46783
- const parts = value.split('|').filter(Boolean);
46784
- if (parts.some((p)=>p.startsWith('~'))) {
46785
- throw new SyntaxError('Modifier $denyallow domains cannot be negated');
47114
+ const { permitted, restricted } = Rule.parseDomainList(value);
47115
+ if (restricted.length > 0) {
47116
+ throw new SyntaxError('modifier $denyallow domains cannot be negated');
46786
47117
  }
46787
- if (parts.length > 0) {
46788
- this.denyAllowDomains = parts;
47118
+ if (permitted.length > 0) {
47119
+ this.denyAllowDomains = permitted;
46789
47120
  meta.baseModifierCount += 1;
46790
47121
  }
46791
47122
  break;
46792
47123
  }
46793
47124
  case OPTION_NAMES.TO:
46794
47125
  {
46795
- const parts = value.split('|').filter(Boolean);
46796
- const toPermitted = [];
46797
- const toRestricted = [];
46798
- for (const part of parts){
46799
- if (part.startsWith('~')) {
46800
- toRestricted.push(part.slice(1));
46801
- } else {
46802
- toPermitted.push(part);
46803
- }
46804
- }
46805
- if (toPermitted.length > 0) {
46806
- this.permittedToDomains = toPermitted;
47126
+ const { permitted, restricted } = Rule.parseDomainList(value);
47127
+ if (permitted.length > 0) {
47128
+ this.permittedToDomains = permitted;
46807
47129
  }
46808
- if (toRestricted.length > 0) {
46809
- this.restrictedToDomains = toRestricted;
47130
+ if (restricted.length > 0) {
47131
+ this.restrictedToDomains = restricted;
46810
47132
  }
46811
47133
  meta.baseModifierCount += 1;
46812
47134
  break;
@@ -46842,14 +47164,26 @@ const CSP_SEPARATOR = SEMICOLON + SPACE;
46842
47164
  this.headerMatcher = Rule.parseHeaderModifier(value);
46843
47165
  meta.hasHeader = true;
46844
47166
  break;
46845
- case OPTION_NAMES.CSP:
46846
47167
  case OPTION_NAMES.REMOVEPARAM:
47168
+ this.enabledModifiers.add(name);
47169
+ this.advancedModifierName = rawName;
47170
+ // Keep an empty value as `''` instead of collapsing it to
47171
+ // `null`: a value-less `$removeparam` means "remove all
47172
+ // query parameters", and the converter relies on this
47173
+ // distinction — otherwise such a rule silently degrades
47174
+ // into a plain blocking rule.
47175
+ // See https://github.com/AdguardTeam/AdguardBrowserExtension/issues/3602.
47176
+ this.advancedModifierValue = value;
47177
+ break;
47178
+ case OPTION_NAMES.CSP:
46847
47179
  case OPTION_NAMES.COOKIE:
46848
47180
  case OPTION_NAMES.REPLACE:
46849
47181
  case OPTION_NAMES.JSONPRUNE:
47182
+ case OPTION_NAMES.XMLPRUNE:
46850
47183
  case OPTION_NAMES.HLS:
46851
47184
  case OPTION_NAMES.REFERRERPOLICY:
46852
47185
  case OPTION_NAMES.PERMISSIONS:
47186
+ case OPTION_NAMES.URLTRANSFORM:
46853
47187
  this.enabledModifiers.add(name);
46854
47188
  this.advancedModifierName = rawName;
46855
47189
  this.advancedModifierValue = value || null;
@@ -46878,8 +47212,9 @@ const CSP_SEPARATOR = SEMICOLON + SPACE;
46878
47212
  this.advancedModifierValue = value || null;
46879
47213
  meta.baseModifierCount += 1;
46880
47214
  break;
46881
- // DNS/network-level modifiers — no DNR equivalent.
47215
+ // Known unsupported modifiers — no DNR equivalent.
46882
47216
  // Still added to enabledModifiers so the validator can reject them.
47217
+ case OPTION_NAMES.WEBRTC:
46883
47218
  case OPTION_NAMES.DNSTYPE:
46884
47219
  case OPTION_NAMES.CTAG:
46885
47220
  case OPTION_NAMES.CLIENT:
@@ -46896,6 +47231,16 @@ const CSP_SEPARATOR = SEMICOLON + SPACE;
46896
47231
  }
46897
47232
  this.enabledModifiers.add(OPTION_NAMES.POPUP);
46898
47233
  break;
47234
+ default:
47235
+ {
47236
+ const modifierView = [
47237
+ rawName,
47238
+ value
47239
+ ].filter((part)=>part).join('=');
47240
+ // Unknown modifiers must invalidate the entire rule.
47241
+ // RulesScanner catches this error and records it in the conversion result.
47242
+ throw new SyntaxError(`Unknown modifier: ${modifierView}`);
47243
+ }
46899
47244
  }
46900
47245
  }
46901
47246
  if (this.denyAllowDomains !== null && this.permittedToDomains !== null) {
@@ -47362,10 +47707,18 @@ name)=>{
47362
47707
  name: '$jsonprune',
47363
47708
  notSupported: true
47364
47709
  },
47710
+ [OPTION_NAMES.XMLPRUNE]: {
47711
+ name: '$xmlprune',
47712
+ notSupported: true
47713
+ },
47365
47714
  [OPTION_NAMES.HLS]: {
47366
47715
  name: '$hls',
47367
47716
  notSupported: true
47368
47717
  },
47718
+ [OPTION_NAMES.WEBRTC]: {
47719
+ name: '$webrtc',
47720
+ notSupported: true
47721
+ },
47369
47722
  // DNS modifiers.
47370
47723
  [OPTION_NAMES.CLIENT]: {
47371
47724
  name: '$client',
@@ -50570,7 +50923,7 @@ var redirectsMap = {
50570
50923
  "googletagmanager-gtm": "google-analytics.js",
50571
50924
  "ubo-googletagmanager_gtm.js": "google-analytics.js",
50572
50925
  "googletagmanager_gtm.js": "google-analytics.js",
50573
- "google-ima3-dai": "google-ima3-dai.ts",
50926
+ "google-ima3-dai": "google-ima3-dai.js",
50574
50927
  "google-ima3": "google-ima3.js",
50575
50928
  "ubo-google-ima.js": "google-ima3.js",
50576
50929
  "google-ima.js": "google-ima3.js",
@@ -50597,12 +50950,6 @@ var redirectsMap = {
50597
50950
  "prebid-ads.js": "prebid-ads.js",
50598
50951
  prebid: "prebid.js",
50599
50952
  "prevent-bab": "prevent-bab.js",
50600
- "nobab.js": "prevent-bab.js",
50601
- "ubo-nobab.js": "prevent-bab.js",
50602
- "bab-defuser.js": "prevent-bab.js",
50603
- "ubo-bab-defuser.js": "prevent-bab.js",
50604
- "ubo-nobab": "prevent-bab.js",
50605
- "ubo-bab-defuser": "prevent-bab.js",
50606
50953
  "prevent-bab2": "prevent-bab2.js",
50607
50954
  "nobab2.js": "prevent-bab2.js",
50608
50955
  "prevent-fab-3.2.0": "prevent-fab-3.2.0.js",
@@ -50627,6 +50974,195 @@ var getRedirectFilename = function getRedirectFilename(name) {
50627
50974
  return redirectsMap[name];
50628
50975
  };
50629
50976
 
50977
+ /**
50978
+ * Popular TLD suffixes used to expand wildcard TLD domains for DNR.
50979
+ *
50980
+ * Source: manually curated from the IANA Root Zone Database
50981
+ * (https://www.iana.org/domains/root/db). "Popular" means broad practical
50982
+ * coverage for filter rules: common generic TLDs, commonly registered ccTLDs,
50983
+ * common new gTLDs, and TLDs observed in AdGuard filter domain modifiers. This
50984
+ * is not a ranked list or a full public suffix list; update it manually when
50985
+ * wildcard TLD coverage needs to change.
50986
+ *
50987
+ * Keep values lowercase, ASCII, and without a leading dot.
50988
+ */ const POPULAR_TLDS = [
50989
+ 'ac',
50990
+ 'ae',
50991
+ 'agency',
50992
+ 'ai',
50993
+ 'am',
50994
+ 'app',
50995
+ 'ar',
50996
+ 'art',
50997
+ 'at',
50998
+ 'au',
50999
+ 'az',
51000
+ 'bd',
51001
+ 'be',
51002
+ 'bg',
51003
+ 'biz',
51004
+ 'blog',
51005
+ 'br',
51006
+ 'by',
51007
+ 'ca',
51008
+ 'cam',
51009
+ 'cc',
51010
+ 'center',
51011
+ 'cfd',
51012
+ 'ch',
51013
+ 'cl',
51014
+ 'click',
51015
+ 'cloud',
51016
+ 'club',
51017
+ 'cn',
51018
+ 'co',
51019
+ 'co.in',
51020
+ 'co.jp',
51021
+ 'co.kr',
51022
+ 'co.nz',
51023
+ 'co.uk',
51024
+ 'com',
51025
+ 'com.au',
51026
+ 'com.br',
51027
+ 'com.cn',
51028
+ 'com.mx',
51029
+ 'com.pl',
51030
+ 'com.tr',
51031
+ 'com.ua',
51032
+ 'company',
51033
+ 'cz',
51034
+ 'de',
51035
+ 'dev',
51036
+ 'digital',
51037
+ 'dk',
51038
+ 'edu',
51039
+ 'ee',
51040
+ 'eg',
51041
+ 'email',
51042
+ 'es',
51043
+ 'eu',
51044
+ 'fi',
51045
+ 'fm',
51046
+ 'fr',
51047
+ 'fun',
51048
+ 'ge',
51049
+ 'gg',
51050
+ 'gov',
51051
+ 'gr',
51052
+ 'group',
51053
+ 'hk',
51054
+ 'hr',
51055
+ 'hu',
51056
+ 'icu',
51057
+ 'id',
51058
+ 'ie',
51059
+ 'il',
51060
+ 'im',
51061
+ 'in',
51062
+ 'info',
51063
+ 'ink',
51064
+ 'int',
51065
+ 'io',
51066
+ 'ir',
51067
+ 'is',
51068
+ 'it',
51069
+ 'jobs',
51070
+ 'jp',
51071
+ 'ke',
51072
+ 'kr',
51073
+ 'kz',
51074
+ 'la',
51075
+ 'li',
51076
+ 'life',
51077
+ 'link',
51078
+ 'live',
51079
+ 'lk',
51080
+ 'lol',
51081
+ 'lt',
51082
+ 'lu',
51083
+ 'lv',
51084
+ 'ma',
51085
+ 'md',
51086
+ 'me',
51087
+ 'media',
51088
+ 'mil',
51089
+ 'mobi',
51090
+ 'mx',
51091
+ 'my',
51092
+ 'name',
51093
+ 'net',
51094
+ 'net.au',
51095
+ 'network',
51096
+ 'news',
51097
+ 'ng',
51098
+ 'nl',
51099
+ 'no',
51100
+ 'np',
51101
+ 'nu',
51102
+ 'nz',
51103
+ 'one',
51104
+ 'onion',
51105
+ 'online',
51106
+ 'org',
51107
+ 'org.uk',
51108
+ 'pe',
51109
+ 'ph',
51110
+ 'pk',
51111
+ 'pl',
51112
+ 'plus',
51113
+ 'porn',
51114
+ 'pro',
51115
+ 'pt',
51116
+ 'pub',
51117
+ 'pw',
51118
+ 'ro',
51119
+ 'rs',
51120
+ 'ru',
51121
+ 'sa',
51122
+ 'sbs',
51123
+ 'se',
51124
+ 'sg',
51125
+ 'shop',
51126
+ 'si',
51127
+ 'site',
51128
+ 'sk',
51129
+ 'software',
51130
+ 'solutions',
51131
+ 'space',
51132
+ 'store',
51133
+ 'su',
51134
+ 'sx',
51135
+ 'systems',
51136
+ 'tech',
51137
+ 'th',
51138
+ 'to',
51139
+ 'today',
51140
+ 'tokyo',
51141
+ 'top',
51142
+ 'tr',
51143
+ 'travel',
51144
+ 'tube',
51145
+ 'tv',
51146
+ 'tw',
51147
+ 'ua',
51148
+ 'uk',
51149
+ 'us',
51150
+ 'video',
51151
+ 'vip',
51152
+ 'vn',
51153
+ 'website',
51154
+ 'wiki',
51155
+ 'win',
51156
+ 'work',
51157
+ 'world',
51158
+ 'ws',
51159
+ 'xn--p1ai',
51160
+ 'xxx',
51161
+ 'xyz',
51162
+ 'za',
51163
+ 'zone'
51164
+ ];
51165
+
50630
51166
  /**
50631
51167
  * Options for {@link chrome.declarativeNetRequest.isRegexSupported}.
50632
51168
  */ /**
@@ -50702,6 +51238,54 @@ var getRedirectFilename = function getRedirectFilename(name) {
50702
51238
  * {@link RegularRuleConverter.convertRule} and {@link RegularRuleConverter.groupConvertedRules}
50703
51239
  * methods, which contains the general logic of transformation and grouping of rules.
50704
51240
  */ class RegularRuleConverter {
51241
+ /**
51242
+ * Checks whether a domain uses wildcard TLD syntax.
51243
+ *
51244
+ * @param domain Domain to check.
51245
+ *
51246
+ * @returns True when domain ends with `.*` and has a non-empty prefix.
51247
+ */ static isWildcardTldDomain(domain) {
51248
+ return domain.length > RegularRuleConverter.WILDCARD_TLD.length && domain.endsWith(RegularRuleConverter.WILDCARD_TLD);
51249
+ }
51250
+ /**
51251
+ * Expands wildcard TLD domain into concrete popular TLD domains.
51252
+ *
51253
+ * @param domain Wildcard TLD domain.
51254
+ *
51255
+ * @returns Expanded domain list.
51256
+ */ static expandWildcardTldDomain(domain) {
51257
+ const domainPrefix = domain.slice(0, -RegularRuleConverter.WILDCARD_TLD.length);
51258
+ return POPULAR_TLDS.map((tld)=>`${domainPrefix}.${tld}`);
51259
+ }
51260
+ /**
51261
+ * Prepares domains for DNR condition arrays.
51262
+ *
51263
+ * Regex and non-TLD wildcard domains are not representable in DNR and are
51264
+ * dropped; wildcard TLD domains (e.g. `example.*`) are expanded to the
51265
+ * popular TLD list.
51266
+ *
51267
+ * @param domains Domains from network rule modifier.
51268
+ *
51269
+ * @returns ASCII-only unique domains supported by DNR.
51270
+ */ static prepareDeclarativeDomains(domains) {
51271
+ const expandedDomains = domains?.flatMap((domain)=>{
51272
+ if (isRegexPattern(domain)) {
51273
+ return [];
51274
+ }
51275
+ if (RegularRuleConverter.isWildcardTldDomain(domain)) {
51276
+ return RegularRuleConverter.expandWildcardTldDomain(domain);
51277
+ }
51278
+ if (domain.includes(MASK_ANY_CHARACTER)) {
51279
+ return [];
51280
+ }
51281
+ return [
51282
+ domain
51283
+ ];
51284
+ }) ?? [];
51285
+ return [
51286
+ ...new Set(toASCII(expandedDomains))
51287
+ ];
51288
+ }
50705
51289
  /**
50706
51290
  * Checks if {@link Rule} can be converted to {@link RuleActionType.AllowAllRequests}.
50707
51291
  *
@@ -50744,6 +51328,9 @@ var getRedirectFilename = function getRedirectFilename(name) {
50744
51328
  /**
50745
51329
  * Returns a redirect action for a `$removeparam` rule.
50746
51330
  *
51331
+ * A value-less `$removeparam` (e.g. `||example.org^$removeparam`) removes
51332
+ * the whole query string via `transform.query: ''`.
51333
+ *
50747
51334
  * Pipe-separated values (e.g. `utm_source|utm_medium`) are
50748
51335
  * split into individual `removeParams` entries.
50749
51336
  *
@@ -50753,17 +51340,20 @@ var getRedirectFilename = function getRedirectFilename(name) {
50753
51340
  * @param rule {@link Rule} to get action for.
50754
51341
  *
50755
51342
  * @returns Redirect action, or `null` if the rule does not have a
50756
- * `$removeparam` modifier, its value is `null`, or a param value cannot be
50757
- * URI-decoded (in which case augmentation is skipped).
51343
+ * `$removeparam` modifier.
51344
+ *
51345
+ * @throws {UnsupportedModifierError} If a param value cannot be URI-decoded.
50758
51346
  */ static getRemoveParamRedirectAction(rule) {
50759
51347
  if (!rule.isModifierEnabled(OPTION_NAMES.REMOVEPARAM)) {
50760
51348
  return null;
50761
51349
  }
50762
51350
  const value = rule.advancedModifierValue;
50763
- if (value === null) {
50764
- return null;
50765
- }
50766
- if (value === '') {
51351
+ // Value-less `$removeparam` — remove all query parameters.
51352
+ // `Rule` stores such a value as `''`; `null` is not expected here,
51353
+ // but is handled the same way defensively: a `$removeparam` rule must
51354
+ // never silently degrade into a plain blocking rule.
51355
+ // See https://github.com/AdguardTeam/AdguardBrowserExtension/issues/3602.
51356
+ if (!value) {
50767
51357
  return {
50768
51358
  transform: {
50769
51359
  query: ''
@@ -50772,12 +51362,13 @@ var getRedirectFilename = function getRedirectFilename(name) {
50772
51362
  }
50773
51363
  // Split on pipe to support multiple param names in a single rule.
50774
51364
  // If any segment contains invalid percent-encoding, decoding throws;
50775
- // skip augmentation by returning null, consistent with getRemoveParamToken().
51365
+ // report it as a conversion error so that the rule is skipped instead
51366
+ // of being converted into a blocking rule.
50776
51367
  let removeParams;
50777
51368
  try {
50778
51369
  removeParams = value.split(RegularRuleConverter.PIPE_SEPARATOR).map((p)=>decodeURIComponent(p));
50779
51370
  } catch {
50780
- return null;
51371
+ throw new UnsupportedModifierError('Network rule with $removeparam modifier contains value that cannot be decoded', rule);
50781
51372
  }
50782
51373
  return {
50783
51374
  transform: {
@@ -50937,6 +51528,7 @@ var getRedirectFilename = function getRedirectFilename(name) {
50937
51528
  * @returns The action of a rule that describes what should be done with the request.
50938
51529
  *
50939
51530
  * @throws Error {@link ResourcesPathError} when specified an empty path to the web accessible resources.
51531
+ * @throws Error {@link UnsupportedModifierError} when a `$removeparam` value cannot be URI-decoded.
50940
51532
  */ getAction(rule) {
50941
51533
  if (rule.allowlist) {
50942
51534
  if (rule.isFilteringDisabled() && RegularRuleConverter.isCompatibleWithAllowAllRequests(rule)) {
@@ -51059,28 +51651,28 @@ var getRedirectFilename = function getRedirectFilename(name) {
51059
51651
  condition.domainType = DomainType.FirstParty;
51060
51652
  }
51061
51653
  // set `initiatorDomains`
51062
- const permittedDomains = rule.permittedDomains?.filter((domain)=>!domain.includes(MASK_ANY_CHARACTER) && !isRegexPattern(domain));
51063
- if (permittedDomains && permittedDomains.length > 0) {
51064
- condition.initiatorDomains = toASCII(permittedDomains);
51654
+ const permittedDomains = RegularRuleConverter.prepareDeclarativeDomains(rule.permittedDomains);
51655
+ if (permittedDomains.length > 0) {
51656
+ condition.initiatorDomains = permittedDomains;
51065
51657
  }
51066
51658
  // set `excludedInitiatorDomains`
51067
- const excludedDomains = rule.restrictedDomains;
51068
- if (excludedDomains && excludedDomains.length > 0) {
51069
- condition.excludedInitiatorDomains = toASCII(excludedDomains);
51659
+ const excludedDomains = RegularRuleConverter.prepareDeclarativeDomains(rule.restrictedDomains);
51660
+ if (excludedDomains.length > 0) {
51661
+ condition.excludedInitiatorDomains = excludedDomains;
51070
51662
  }
51071
51663
  // set `requestDomains`
51072
- const { permittedToDomains } = rule;
51073
- if (permittedToDomains && permittedToDomains.length > 0) {
51074
- condition.requestDomains = toASCII(permittedToDomains);
51664
+ const permittedToDomains = RegularRuleConverter.prepareDeclarativeDomains(rule.permittedToDomains);
51665
+ if (permittedToDomains.length > 0) {
51666
+ condition.requestDomains = permittedToDomains;
51075
51667
  }
51076
51668
  // Can be specified `$to` or `$denyallow`, but not together.
51077
- const { denyAllowDomains } = rule;
51078
- const { restrictedToDomains } = rule;
51669
+ const denyAllowDomains = RegularRuleConverter.prepareDeclarativeDomains(rule.denyAllowDomains);
51670
+ const restrictedToDomains = RegularRuleConverter.prepareDeclarativeDomains(rule.restrictedToDomains);
51079
51671
  // set `excludedRequestDomains`
51080
- if (denyAllowDomains && denyAllowDomains.length !== 0) {
51081
- condition.excludedRequestDomains = toASCII(denyAllowDomains);
51082
- } else if (restrictedToDomains && restrictedToDomains.length !== 0) {
51083
- condition.excludedRequestDomains = toASCII(restrictedToDomains);
51672
+ if (denyAllowDomains.length !== 0) {
51673
+ condition.excludedRequestDomains = denyAllowDomains;
51674
+ } else if (restrictedToDomains.length !== 0) {
51675
+ condition.excludedRequestDomains = restrictedToDomains;
51084
51676
  }
51085
51677
  // set `excludedResourceTypes`
51086
51678
  const { restrictedResourceTypes } = rule;
@@ -51137,7 +51729,7 @@ var getRedirectFilename = function getRedirectFilename(name) {
51137
51729
  * And if we specify {@link ResourceType.MainFrame}, then we also need to specify all
51138
51730
  * other types, so that it works not only for document requests, but
51139
51731
  * also for all other types of requests.
51140
- */ const shouldMatchAllResourcesTypes = rule.isModifierEnabled(OPTION_NAMES.REMOVEHEADER) || rule.isModifierEnabled(OPTION_NAMES.CSP) || rule.isModifierEnabled(OPTION_NAMES.COOKIE) || rule.isModifierEnabled(OPTION_NAMES.TO) || rule.isModifierEnabled(OPTION_NAMES.METHOD);
51732
+ */ const shouldMatchAllResourcesTypes = rule.isModifierEnabled(OPTION_NAMES.REMOVEHEADER) || rule.isModifierEnabled(OPTION_NAMES.CSP) || rule.isModifierEnabled(OPTION_NAMES.COOKIE) || rule.isModifierEnabled(OPTION_NAMES.TO) || rule.isModifierEnabled(OPTION_NAMES.METHOD) || rule.isModifierEnabled(OPTION_NAMES.URLTRANSFORM);
51141
51733
  /**
51142
51734
  * `$permissions` and `$removeparam` modifiers must be applied only to `document` content-type
51143
51735
  * ({@link ResourceType.MainFrame} and {@link ResourceType.SubFrame}) if they don't have resource types.
@@ -51460,6 +52052,9 @@ var getRedirectFilename = function getRedirectFilename(name) {
51460
52052
  * Pipe character used as a separator in $removeparam multi-value rules,
51461
52053
  * e.g. `$removeparam=utm_source|utm_medium`.
51462
52054
  */ RegularRuleConverter.PIPE_SEPARATOR = '|';
52055
+ /**
52056
+ * Wildcard TLD suffix (`.*`) used in domain modifiers, e.g. `example.*`.
52057
+ */ RegularRuleConverter.WILDCARD_TLD = `${DOT}${MASK_ANY_CHARACTER}`;
51463
52058
 
51464
52059
  /**
51465
52060
  * Keyword for Base64 decode transform.
@@ -51536,9 +52131,9 @@ var getRedirectFilename = function getRedirectFilename(name) {
51536
52131
  * Origin-capturing prefix for path-only transforms.
51537
52132
  */ const ORIGIN_PREFIX = '^(https?://[^/]+)';
51538
52133
  /**
51539
- * Prefix for patterns that can match anywhere in the path.
52134
+ * Prefix for patterns that can match anywhere in the path and query.
51540
52135
  * Uses a non-greedy match to capture everything before the pattern.
51541
- */ const FLOATING_PREFIX = '^(https?://[^?#]*?)';
52136
+ */ const FLOATING_PREFIX = '^(https?://[^/]+/[^#]*?)';
51542
52137
  /**
51543
52138
  * Origin-capturing prefix for query-targeting transforms.
51544
52139
  */ const ORIGIN_PREFIX_QUERY = '^(https?://[^?]+)';
@@ -51629,13 +52224,20 @@ var getRedirectFilename = function getRedirectFilename(name) {
51629
52224
  if (workPattern.startsWith('^')) {
51630
52225
  workPattern = workPattern.substring(1);
51631
52226
  }
51632
- // Check for end-of-string anchor (\$ in filter syntax, which
51633
- // becomes $ in regex). When present, we must NOT append the
51634
- // remainder-capturing group (.*) after the pattern.
52227
+ // Check for end-of-string anchor. It may be written either as `\$`
52228
+ // (escaped, because `$` is the modifier separator in AdGuard syntax)
52229
+ // or as a bare `$` when the modifier value is the last one in the rule.
52230
+ // Both forms mean the same regex end-of-string anchor. When present,
52231
+ // we must NOT append the remainder-capturing group `(.*)` after the
52232
+ // pattern — otherwise the anchor would end up in the middle of the
52233
+ // resulting regex, producing a rule that never matches.
51635
52234
  let hasEndAnchor = false;
51636
52235
  if (workPattern.endsWith('\\$')) {
51637
52236
  hasEndAnchor = true;
51638
52237
  workPattern = workPattern.substring(0, workPattern.length - 2);
52238
+ } else if (workPattern.endsWith('$')) {
52239
+ hasEndAnchor = true;
52240
+ workPattern = workPattern.substring(0, workPattern.length - 1);
51639
52241
  }
51640
52242
  const userGroupCount = countCaptureGroups(workPattern);
51641
52243
  // Determine if this is a query-targeting pattern
@@ -51649,7 +52251,7 @@ var getRedirectFilename = function getRedirectFilename(name) {
51649
52251
  } else if (isPathAnchored) {
51650
52252
  prefix = ORIGIN_PREFIX;
51651
52253
  } else {
51652
- // Pattern can match anywhere in the path (floating match)
52254
+ // Pattern can match anywhere in the path and query (floating match)
51653
52255
  prefix = FLOATING_PREFIX;
51654
52256
  }
51655
52257
  // Remove leading escaped slash from path pattern for joining