header-generator 2.0.0-dev.1 → 2.0.0-dev.4

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/constants.d.ts ADDED
@@ -0,0 +1,21 @@
1
+ export declare const SUPPORTED_BROWSERS: readonly ["chrome", "firefox", "safari", "edge"];
2
+ export declare const SUPPORTED_OPERATING_SYSTEMS: readonly ["windows", "macos", "linux", "android", "ios"];
3
+ export declare const SUPPORTED_DEVICES: readonly ["desktop", "mobile"];
4
+ export declare const SUPPORTED_HTTP_VERSIONS: readonly ["1", "2"];
5
+ export declare const BROWSER_HTTP_NODE_NAME: "*BROWSER_HTTP";
6
+ export declare const OPERATING_SYSTEM_NODE_NAME: "*OPERATING_SYSTEM";
7
+ export declare const DEVICE_NODE_NAME: "*DEVICE";
8
+ export declare const MISSING_VALUE_DATASET_TOKEN: "*MISSING_VALUE*";
9
+ export declare const HTTP1_SEC_FETCH_ATTRIBUTES: {
10
+ readonly mode: "Sec-Fetch-Mode";
11
+ readonly dest: "Sec-Fetch-Dest";
12
+ readonly site: "Sec-Fetch-Site";
13
+ readonly user: "Sec-Fetch-User";
14
+ };
15
+ export declare const HTTP2_SEC_FETCH_ATTRIBUTES: {
16
+ readonly mode: "sec-fetch-mode";
17
+ readonly dest: "sec-fetch-dest";
18
+ readonly site: "sec-fetch-site";
19
+ readonly user: "sec-fetch-user";
20
+ };
21
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,kDAKrB,CAAC;AACX,eAAO,MAAM,2BAA2B,0DAA2D,CAAC;AACpG,eAAO,MAAM,iBAAiB,gCAAiC,CAAC;AAChE,eAAO,MAAM,uBAAuB,qBAAsB,CAAC;AAE3D,eAAO,MAAM,sBAAsB,iBAA2B,CAAC;AAC/D,eAAO,MAAM,0BAA0B,qBAA+B,CAAC;AACvE,eAAO,MAAM,gBAAgB,WAAqB,CAAC;AACnD,eAAO,MAAM,2BAA2B,mBAA6B,CAAC;AAEtE,eAAO,MAAM,0BAA0B;;;;;CAK7B,CAAC;AAEX,eAAO,MAAM,0BAA0B;;;;;CAK7B,CAAC"}
package/constants.js ADDED
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HTTP2_SEC_FETCH_ATTRIBUTES = exports.HTTP1_SEC_FETCH_ATTRIBUTES = exports.MISSING_VALUE_DATASET_TOKEN = exports.DEVICE_NODE_NAME = exports.OPERATING_SYSTEM_NODE_NAME = exports.BROWSER_HTTP_NODE_NAME = exports.SUPPORTED_HTTP_VERSIONS = exports.SUPPORTED_DEVICES = exports.SUPPORTED_OPERATING_SYSTEMS = exports.SUPPORTED_BROWSERS = void 0;
4
+ exports.SUPPORTED_BROWSERS = [
5
+ 'chrome',
6
+ 'firefox',
7
+ 'safari',
8
+ 'edge',
9
+ ];
10
+ exports.SUPPORTED_OPERATING_SYSTEMS = ['windows', 'macos', 'linux', 'android', 'ios'];
11
+ exports.SUPPORTED_DEVICES = ['desktop', 'mobile'];
12
+ exports.SUPPORTED_HTTP_VERSIONS = ['1', '2'];
13
+ exports.BROWSER_HTTP_NODE_NAME = '*BROWSER_HTTP';
14
+ exports.OPERATING_SYSTEM_NODE_NAME = '*OPERATING_SYSTEM';
15
+ exports.DEVICE_NODE_NAME = '*DEVICE';
16
+ exports.MISSING_VALUE_DATASET_TOKEN = '*MISSING_VALUE*';
17
+ exports.HTTP1_SEC_FETCH_ATTRIBUTES = {
18
+ mode: 'Sec-Fetch-Mode',
19
+ dest: 'Sec-Fetch-Dest',
20
+ site: 'Sec-Fetch-Site',
21
+ user: 'Sec-Fetch-User',
22
+ };
23
+ exports.HTTP2_SEC_FETCH_ATTRIBUTES = {
24
+ mode: 'sec-fetch-mode',
25
+ dest: 'sec-fetch-dest',
26
+ site: 'sec-fetch-site',
27
+ user: 'sec-fetch-user',
28
+ };
29
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG;IAC9B,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,MAAM;CACA,CAAC;AACE,QAAA,2BAA2B,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,CAAU,CAAC;AACvF,QAAA,iBAAiB,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAU,CAAC;AACnD,QAAA,uBAAuB,GAAG,CAAC,GAAG,EAAE,GAAG,CAAU,CAAC;AAE9C,QAAA,sBAAsB,GAAG,eAAwB,CAAC;AAClD,QAAA,0BAA0B,GAAG,mBAA4B,CAAC;AAC1D,QAAA,gBAAgB,GAAG,SAAkB,CAAC;AACtC,QAAA,2BAA2B,GAAG,iBAA0B,CAAC;AAEzD,QAAA,0BAA0B,GAAG;IACtC,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,gBAAgB;CAChB,CAAC;AAEE,QAAA,0BAA0B,GAAG;IACtC,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,gBAAgB;CAChB,CAAC"}
@@ -0,0 +1 @@
1
+ ["chrome/102.0.0.0|2","chrome/103.0.0.0|2","firefox/101.0|2","edge/101.0.1210.47|2","safari/605.1.15|2","chrome/103.0.0.0|1","chrome/101.0.4951.54|2","chrome/102.0.0.0|1","chrome/101.0.4951.67|2","chrome/86.0.4240.198|2","chrome/101.0.0.0|2","chrome/102.0.5005.125|2","chrome/101.0.4951.64|2","edge/102.0.1245.44|2","*MISSING_VALUE*|2","firefox/91.0|2","firefox/99.0|2","safari/604.1|2","chrome/100.0.4896.127|2","firefox/90.0|2","chrome/86.0.4240.111|2","firefox/102.0|2","chrome/102.0.5005.61|2","chrome/95.0.4638.69|2","chrome/101.0.0.0|1","chrome/99.0.4844.84|2","chrome/102.0.5005.115|2","edge/96.0.1054.62|2","chrome/103.0.5060.53|2","edge/101.0.1210.53|2","edge/102.0.1245.39|2","chrome/75.0.3770.142|2","chrome/97.0.4692.71|2","chrome/100.0.4896.160|2","chrome/90.0.4430.212|2","chrome/86.0.4240.75|2","chrome/87.0.4280.67|2","firefox/74.0|2","firefox/78.0|2","edge/102.0.1245.41|2","chrome/87.0.4280.88|1","chrome/100.0.4896.60|2","edge/102.0.1245.44|1","chrome/92.0.4515.107|2","chrome/102.0.5005.63|2","chrome/76.0.3809.71|2","chrome/102.0.5005.62|2","safari/602.1|2","chrome/97.0.4691.0|2","chrome/97.0.4692.99|2","chrome/92.0.4515.166|2","chrome/99.0.4844.51|2","chrome/89.0.4389.90|2","chrome/70.0.3538.102|2","chrome/71.0.3578.98|2","firefox/103.0|2","chrome/98.0.4758.102|2","chrome/87.0.4280.141|2","chrome/99.0.4844.0|2","firefox/88.0|2","chrome/99.0.4844.73|2","chrome/92.0.4515.131|2","chrome/84.0.4147.125|2","chrome/78.0.3904.108|2","chrome/73.0.3683.75|2","chrome/100.0.4896.88|2","chrome/100.0.4896.58|1","edge/101.0.1210.32|2","edge/102.0.1245.33|2","chrome/102.0.4993.0|2","chrome/88.0.4324.104|2","firefox/68.0|2","chrome/100.0.4896.75|2","chrome/75.0.3770.100|2","chrome/98.0.4758.82|2","chrome/96.0.4664.104|2","chrome/100.0.4896.127|1","chrome/83.0.4103.97|2","firefox/101.0|1","chrome/104.0.0.0|2","firefox/56.0|2","chrome/98.0.4758.80|2","chrome/90.0.4430.93|2","chrome/97.0.4692.98|2","chrome/89.0.4389.114|2","chrome/74.0.3729.136|2","chrome/89.0.4389.116|2","safari/605.1.15|1","chrome/70.0.3538.110|2","chrome/97.0.4692.102|2","chrome/98.0.4751.0|2","chrome/62.0.3202.84|2","chrome/94.0.4606.71|2","chrome/99.0.4844.51|1","chrome/102.0.5005.124|2","chrome/91.0.4472.106|2","firefox/83.0|2","chrome/104.0.5105.0|2","chrome/102.0.5005.115|1","chrome/101.0.4951.41|2","chrome/99.0.4844.74|2","chrome/100.0.4896.75|1","edge/101.0.1210.39|2","firefox/96.0|2","chrome/74.0.3729.112|2","chrome/91.0.4472.77|2","chrome/93.0.4577.62|2","chrome/96.0.4664.45|2","chrome/80.0.3987.132|2","chrome/101.0.4951.48|2","chrome/79.0.3945.136|2","chrome/99.0.4844.82|2","chrome/91.0.4472.164|2","chrome/101.0.4951.41|1","chrome/74.0.3729.169|2","chrome/99.102.0.0|1","firefox/100.0|2","chrome/102.0.5005.40|2","chrome/99.0.4844.83|2","firefox/95.0|2","chrome/91.0.4472.124|2","chrome/100.0.4896.151|2","chrome/91.0.4472.101|2","firefox/82.0|2","safari/604.1|1","edge/101.0.1210.39|1","chrome/100.0.4896.79|2","chrome/98.0.4758.132|2","chrome/93.0.4577.52|2","chrome/75.0.3770.90|2","edge/102.0.1245.41|1","chrome/98.0.4758.87|2","chrome/79.0.3945.79|2","chrome/69.0.3497.100|2","chrome/33.0.1750.517|2","chrome/102.0.5005.78|2","chrome/80.0.3987.163|2","chrome/92.0.4515.159|2","chrome/61.0.3163.128|2","chrome/76.0.3809.132|2","chrome/87.0.4280.101|2","chrome/86.0.4240.99|2","chrome/79.0.3945.116|1","chrome/86.0.4240.183|2","chrome/94.0.4606.85|2","chrome/23.0.1271.64|1","chrome/28.0.1464.0|2","firefox/92.0|2","chrome/92.0.4515.166|1","chrome/88.0.4324.96|2","chrome/98.0.4758.109|2","chrome/101.0.4951.61|2","chrome/81.0.4044.117|2","chrome/101.0.4951.40|2","chrome/101.0.4951.72|2","firefox/93.0|2","firefox/97.0|2","firefox/98.0|2","chrome/90.0.4430.82|2","chrome/94.0.4606.61|2","chrome/83.0.0.0|2","chrome/92.0.4515.115|2","chrome/89.0.4389.82|2","chrome/102.0.4972.0|2","firefox/94.0|2","chrome/96.0.4664.110|2","chrome/102.0.5005.63|1","chrome/85.0.4183.83|1","firefox/91.0|1","chrome/99.0.4844.58|2","chrome/99.0.4844.82|1","chrome/104.0.5110.0|2","chrome/91.0.4472.114|2","chrome/74.0.3729.131|2","chrome/95.0.4638.54|2","chrome/100.0.4896.162|2","chrome/105.0.0.0|2","chrome/102.0.5005.72|2","edge/102.0.1245.33|1","chrome/96.0.4664.92|2","chrome/102.0.5005.99|2","edge/100.0.1185.50|2","edge/102.0.1245.30|2","chrome/90.0.4430.72|2","chrome/98.0.4758.141|2","edge/102.0.1245.39|1","chrome/94.0.4606.81|2","chrome/84.0.4137.0|2","chrome/102.0.5005.61|1","firefox/75.0|2","chrome/96.0.4664.93|2","chrome/87.0.4280.88|2","edge/97.0.1072.55|2","firefox/85.0|2","chrome/85.0.4183.121|2","chrome/91.0.4450.0|2","chrome/93.0.4577.107|2","firefox/87.0|2","chrome/101.0.4951.15|2","chrome/79.0.3945.116|2","chrome/102.0.4999.199|2","chrome/89.0.4389.128|2","chrome/92.0.4515.126|2","chrome/101.0.4951.67|1","chrome/88.0.4324.150|2","edge/97.0.1072.62|2","chrome/81.0.4044.138|2","chrome/102.0.5005.108|2","chrome/102.0.5005.75|2","chrome/95.0.4638.74|2","chrome/89.0.4389.105|2"]
@@ -0,0 +1,122 @@
1
+ {
2
+ "safari": [
3
+ "cookie",
4
+ "Cookie",
5
+ "Connection",
6
+ "sec-ch-ua",
7
+ "sec-ch-ua-mobile",
8
+ "upgrade-insecure-requests",
9
+ "Upgrade-Insecure-Requests",
10
+ "accept",
11
+ "Accept",
12
+ "accept-encoding",
13
+ "Accept-Encoding",
14
+ "user-agent",
15
+ "User-Agent",
16
+ "accept-language",
17
+ "Accept-Language",
18
+ "referer",
19
+ "Referer",
20
+ "sec-fetch-site",
21
+ "sec-fetch-mode",
22
+ "sec-fetch-user",
23
+ "sec-fetch-dest",
24
+ "Sec-Fetch-Mode",
25
+ "Sec-Fetch-Dest",
26
+ "Sec-Fetch-Site",
27
+ "Sec-Fetch-User",
28
+ "dnt",
29
+ "DNT",
30
+ "te"
31
+ ],
32
+ "chrome": [
33
+ "Connection",
34
+ "sec-ch-ua",
35
+ "sec-ch-ua-mobile",
36
+ "upgrade-insecure-requests",
37
+ "Upgrade-Insecure-Requests",
38
+ "dnt",
39
+ "DNT",
40
+ "user-agent",
41
+ "User-Agent",
42
+ "accept",
43
+ "Accept",
44
+ "sec-fetch-site",
45
+ "sec-fetch-mode",
46
+ "sec-fetch-user",
47
+ "sec-fetch-dest",
48
+ "Sec-Fetch-Mode",
49
+ "Sec-Fetch-Dest",
50
+ "Sec-Fetch-Site",
51
+ "Sec-Fetch-User",
52
+ "referer",
53
+ "Referer",
54
+ "accept-encoding",
55
+ "Accept-Encoding",
56
+ "accept-language",
57
+ "Accept-Language",
58
+ "te",
59
+ "cookie",
60
+ "Cookie"
61
+ ],
62
+ "firefox": [
63
+ "sec-ch-ua",
64
+ "sec-ch-ua-mobile",
65
+ "user-agent",
66
+ "User-Agent",
67
+ "accept",
68
+ "Accept",
69
+ "accept-language",
70
+ "Accept-Language",
71
+ "accept-encoding",
72
+ "Accept-Encoding",
73
+ "dnt",
74
+ "DNT",
75
+ "referer",
76
+ "Referer",
77
+ "cookie",
78
+ "Cookie",
79
+ "Connection",
80
+ "upgrade-insecure-requests",
81
+ "Upgrade-Insecure-Requests",
82
+ "te",
83
+ "sec-fetch-site",
84
+ "sec-fetch-mode",
85
+ "sec-fetch-user",
86
+ "sec-fetch-dest",
87
+ "Sec-Fetch-Mode",
88
+ "Sec-Fetch-Dest",
89
+ "Sec-Fetch-Site",
90
+ "Sec-Fetch-User"
91
+ ],
92
+ "edge": [
93
+ "Connection",
94
+ "sec-ch-ua",
95
+ "sec-ch-ua-mobile",
96
+ "upgrade-insecure-requests",
97
+ "Upgrade-Insecure-Requests",
98
+ "dnt",
99
+ "DNT",
100
+ "user-agent",
101
+ "User-Agent",
102
+ "accept",
103
+ "Accept",
104
+ "sec-fetch-site",
105
+ "sec-fetch-mode",
106
+ "sec-fetch-user",
107
+ "sec-fetch-dest",
108
+ "Sec-Fetch-Mode",
109
+ "Sec-Fetch-Dest",
110
+ "Sec-Fetch-Site",
111
+ "Sec-Fetch-User",
112
+ "referer",
113
+ "Referer",
114
+ "accept-encoding",
115
+ "Accept-Encoding",
116
+ "accept-language",
117
+ "Accept-Language",
118
+ "cookie",
119
+ "Cookie",
120
+ "te"
121
+ ]
122
+ }
@@ -0,0 +1,156 @@
1
+ import { SUPPORTED_BROWSERS, MISSING_VALUE_DATASET_TOKEN, SUPPORTED_OPERATING_SYSTEMS, SUPPORTED_DEVICES, SUPPORTED_HTTP_VERSIONS } from './constants';
2
+ export declare const headerGeneratorOptionsShape: {
3
+ browsers: import("ow").ArrayPredicate<string | {
4
+ name: string;
5
+ minVersion: number | undefined;
6
+ maxVersion: number | undefined;
7
+ httpVersion: string | undefined;
8
+ }>;
9
+ operatingSystems: import("ow").ArrayPredicate<string>;
10
+ devices: import("ow").ArrayPredicate<string>;
11
+ locales: import("ow").ArrayPredicate<string>;
12
+ httpVersion: import("ow").StringPredicate & import("ow").BasePredicate<string | undefined>;
13
+ browserListQuery: import("ow").StringPredicate & import("ow").BasePredicate<string | undefined>;
14
+ };
15
+ /**
16
+ * String specifying the HTTP version to use.
17
+ */
18
+ export declare type HttpVersion = typeof SUPPORTED_HTTP_VERSIONS[number];
19
+ /**
20
+ * String specifying the device type to use.
21
+ */
22
+ export declare type Device = typeof SUPPORTED_DEVICES[number];
23
+ /**
24
+ * String specifying the operating system to use.
25
+ */
26
+ export declare type OperatingSystem = typeof SUPPORTED_OPERATING_SYSTEMS[number];
27
+ /**
28
+ * String specifying the browser to use.
29
+ */
30
+ export declare type BrowserName = typeof SUPPORTED_BROWSERS[number];
31
+ export interface BrowserSpecification {
32
+ /**
33
+ * String representing the browser name.
34
+ */
35
+ name: BrowserName;
36
+ /**
37
+ * Minimum version of browser used.
38
+ */
39
+ minVersion?: number;
40
+ /**
41
+ * Maximum version of browser used.
42
+ */
43
+ maxVersion?: number;
44
+ /**
45
+ * HTTP version to be used for header generation (the headers differ depending on the version).
46
+ * If not specified, the `httpVersion` specified in `HeaderGeneratorOptions` is used.
47
+ */
48
+ httpVersion?: HttpVersion;
49
+ }
50
+ export declare type BrowsersType = BrowserSpecification[] | BrowserName[];
51
+ /**
52
+ * Options for the `HeaderGenerator` class constructor.
53
+ */
54
+ export interface HeaderGeneratorOptions {
55
+ /**
56
+ * List of BrowserSpecifications to generate the headers for,
57
+ * or one of `chrome`, `edge`, `firefox` and `safari`.
58
+ */
59
+ browsers: BrowsersType;
60
+ /**
61
+ * Browser generation query based on the real world data.
62
+ * For more info see the [query docs](https://github.com/browserslist/browserslist#full-list).
63
+ * If `browserListQuery` is passed the `browsers` array is ignored.
64
+ */
65
+ browserListQuery: string;
66
+ /**
67
+ * List of operating systems to generate the headers for.
68
+ */
69
+ operatingSystems: OperatingSystem[];
70
+ /**
71
+ * List of devices to generate the headers for.
72
+ */
73
+ devices: Device[];
74
+ /**
75
+ * List of at most 10 languages to include in the
76
+ * [Accept-Language](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language) request header
77
+ * in the language format accepted by that header, for example `en`, `en-US` or `de`.
78
+ */
79
+ locales: string[];
80
+ /**
81
+ * Http version to be used to generate headers (the headers differ depending on the version).
82
+ * Can be either 1 or 2. Default value is 2.
83
+ */
84
+ httpVersion: HttpVersion;
85
+ }
86
+ /**
87
+ * Structured information about a browser and HTTP version used.
88
+ */
89
+ export interface HttpBrowserObject {
90
+ /**
91
+ * Name of the browser used.
92
+ */
93
+ name: BrowserName | typeof MISSING_VALUE_DATASET_TOKEN;
94
+ /**
95
+ * Browser version split into parts of the semantic version number.
96
+ */
97
+ version: number[];
98
+ /**
99
+ * String containing the browser name, browser version and HTTP version (e.g. `chrome/88.0.4324.182|2`).
100
+ */
101
+ completeString: string;
102
+ /**
103
+ * HTTP version as a string ("1" or "2").
104
+ */
105
+ httpVersion: HttpVersion;
106
+ }
107
+ export declare type Headers = Record<string, string>;
108
+ /**
109
+ * Randomly generates realistic HTTP headers based on specified options.
110
+ */
111
+ export declare class HeaderGenerator {
112
+ globalOptions: HeaderGeneratorOptions;
113
+ browserListQuery: string | undefined;
114
+ private inputGeneratorNetwork;
115
+ private headerGeneratorNetwork;
116
+ private uniqueBrowsers;
117
+ /**
118
+ * @param options Default header generation options used - unless overridden.
119
+ */
120
+ constructor(options?: Partial<HeaderGeneratorOptions>);
121
+ /**
122
+ * Generates a single set of ordered headers using a combination of the default options specified in the constructor
123
+ * and their possible overrides provided here.
124
+ * @param options Specifies options that should be overridden for this one call.
125
+ * @param requestDependentHeaders Specifies known values of headers dependent on the particular request.
126
+ */
127
+ getHeaders(options?: Partial<HeaderGeneratorOptions>, requestDependentHeaders?: Headers): Headers;
128
+ /**
129
+ * Returns a new object that contains ordered headers.
130
+ * @param headers Specifies known values of headers dependent on the particular request.
131
+ * @param order An array of ordered header names, optional (will be deducted from `user-agent`).
132
+ */
133
+ orderHeaders(headers: Headers, order?: string[]): Headers;
134
+ private _prepareBrowsersConfig;
135
+ private _getBrowserHttpOptions;
136
+ private _getPossibleAttributeValues;
137
+ private _getAcceptLanguageField;
138
+ /**
139
+ * Extract structured information about a browser and http version in the form of an object from httpBrowserString.
140
+ * @param httpBrowserString A string containing the browser name, version and http version, such as `chrome/88.0.4324.182|2`.
141
+ */
142
+ private prepareHttpBrowserObject;
143
+ /**
144
+ * Extract structured information about a browser in the form of an object from browserString.
145
+ * @param browserString A string containing the browser name and version, e.g. `chrome/88.0.4324.182`.
146
+ */
147
+ private prepareBrowserObject;
148
+ /**
149
+ * Returns a new object containing header names ordered by their appearance in the given browser.
150
+ * @param headers Non-normalized request headers
151
+ * @returns Correct header order for the given browser.
152
+ */
153
+ private getOrderFromUserAgent;
154
+ private _browserVersionIsLesserOrEquals;
155
+ }
156
+ //# sourceMappingURL=header-generator.d.ts.map
@@ -0,0 +1 @@
1
+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AG,OAAO,2BAA2B,CAAC;IACvD;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,WAAW,EAAE,WAAW,CAAC;CAC5B;AAED,oBAAY,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE7C;;EAEE;AACF,qBAAa,eAAe;IACxB,aAAa,EAAE,sBAAsB,CAAC;IAEtC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IAErC,OAAO,CAAC,qBAAqB,CAAM;IAEnC,OAAO,CAAC,sBAAsB,CAAM;IAEpC,OAAO,CAAC,cAAc,CAAsB;IAE5C;;MAEE;gBACU,OAAO,GAAE,OAAO,CAAC,sBAAsB,CAAM;IAgCzD;;;;;MAKE;IACF,UAAU,CAAC,OAAO,GAAE,OAAO,CAAC,sBAAsB,CAAM,EAAE,uBAAuB,GAAE,OAAY,GAAG,OAAO;IAqDzG;;;;MAIE;IACF,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,WAAsC,GAAG,OAAO;IAkBpF,OAAO,CAAC,sBAAsB;IAqB9B,OAAO,CAAC,sBAAsB;IAiB9B,OAAO,CAAC,2BAA2B;IAmBnC,OAAO,CAAC,uBAAuB;IA4C/B;;;MAGE;IACF,OAAO,CAAC,wBAAwB;IAiBhC;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAe5B;;;;OAIG;IACH,OAAO,CAAC,qBAAqB;IAW7B,OAAO,CAAC,+BAA+B;CAG1C"}
@@ -0,0 +1,286 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HeaderGenerator = exports.headerGeneratorOptionsShape = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const generative_bayesian_network_1 = require("generative-bayesian-network");
6
+ const ow_1 = tslib_1.__importDefault(require("ow"));
7
+ const utils_1 = require("./utils");
8
+ const constants_1 = require("./constants");
9
+ const headers_order_json_1 = tslib_1.__importDefault(require("./data_files/headers-order.json"));
10
+ const browser_helper_file_json_1 = tslib_1.__importDefault(require("./data_files/browser-helper-file.json"));
11
+ const browserSpecificationShape = {
12
+ name: ow_1.default.string,
13
+ minVersion: ow_1.default.optional.number,
14
+ maxVersion: ow_1.default.optional.number,
15
+ httpVersion: ow_1.default.optional.string,
16
+ };
17
+ exports.headerGeneratorOptionsShape = {
18
+ browsers: ow_1.default.optional.array.ofType(ow_1.default.any(ow_1.default.object.exactShape(browserSpecificationShape), ow_1.default.string)),
19
+ operatingSystems: ow_1.default.optional.array.ofType(ow_1.default.string),
20
+ devices: ow_1.default.optional.array.ofType(ow_1.default.string),
21
+ locales: ow_1.default.optional.array.ofType(ow_1.default.string),
22
+ httpVersion: ow_1.default.optional.string,
23
+ browserListQuery: ow_1.default.optional.string,
24
+ };
25
+ ;
26
+ /**
27
+ * Randomly generates realistic HTTP headers based on specified options.
28
+ */
29
+ class HeaderGenerator {
30
+ /**
31
+ * @param options Default header generation options used - unless overridden.
32
+ */
33
+ constructor(options = {}) {
34
+ Object.defineProperty(this, "globalOptions", {
35
+ enumerable: true,
36
+ configurable: true,
37
+ writable: true,
38
+ value: void 0
39
+ });
40
+ Object.defineProperty(this, "browserListQuery", {
41
+ enumerable: true,
42
+ configurable: true,
43
+ writable: true,
44
+ value: void 0
45
+ });
46
+ Object.defineProperty(this, "inputGeneratorNetwork", {
47
+ enumerable: true,
48
+ configurable: true,
49
+ writable: true,
50
+ value: void 0
51
+ });
52
+ Object.defineProperty(this, "headerGeneratorNetwork", {
53
+ enumerable: true,
54
+ configurable: true,
55
+ writable: true,
56
+ value: void 0
57
+ });
58
+ Object.defineProperty(this, "uniqueBrowsers", {
59
+ enumerable: true,
60
+ configurable: true,
61
+ writable: true,
62
+ value: void 0
63
+ });
64
+ (0, ow_1.default)(options, 'HeaderGeneratorOptions', ow_1.default.object.exactShape(exports.headerGeneratorOptionsShape));
65
+ // Use a default setup when the necessary values are not provided
66
+ const { browsers = constants_1.SUPPORTED_BROWSERS, operatingSystems = constants_1.SUPPORTED_OPERATING_SYSTEMS, devices = [constants_1.SUPPORTED_DEVICES[0]], locales = ['en-US'], httpVersion = '2', browserListQuery = '', } = options;
67
+ this.globalOptions = {
68
+ browsers: this._prepareBrowsersConfig(browsers, browserListQuery, httpVersion),
69
+ operatingSystems,
70
+ devices,
71
+ locales,
72
+ httpVersion,
73
+ browserListQuery,
74
+ };
75
+ this.uniqueBrowsers = [];
76
+ for (const browserString of browser_helper_file_json_1.default) {
77
+ // There are headers without user agents in the datasets we used to configure the generator. They should be disregarded.
78
+ if (browserString !== constants_1.MISSING_VALUE_DATASET_TOKEN) {
79
+ this.uniqueBrowsers.push(this.prepareHttpBrowserObject(browserString));
80
+ }
81
+ }
82
+ this.inputGeneratorNetwork = new generative_bayesian_network_1.BayesianNetwork({ path: `${__dirname}/data_files/input-network-definition.zip` });
83
+ this.headerGeneratorNetwork = new generative_bayesian_network_1.BayesianNetwork({ path: `${__dirname}/data_files/header-network-definition.zip` });
84
+ }
85
+ /**
86
+ * Generates a single set of ordered headers using a combination of the default options specified in the constructor
87
+ * and their possible overrides provided here.
88
+ * @param options Specifies options that should be overridden for this one call.
89
+ * @param requestDependentHeaders Specifies known values of headers dependent on the particular request.
90
+ */
91
+ getHeaders(options = {}, requestDependentHeaders = {}) {
92
+ (0, ow_1.default)(options, 'HeaderGeneratorOptions', ow_1.default.object.exactShape(exports.headerGeneratorOptionsShape));
93
+ const headerOptions = { ...this.globalOptions, ...options };
94
+ const possibleAttributeValues = this._getPossibleAttributeValues(headerOptions);
95
+ // Generate a sample of input attributes consistent with the data used to create the definition files if possible.
96
+ const inputSample = this.inputGeneratorNetwork.generateConsistentSampleWhenPossible(possibleAttributeValues);
97
+ if (Object.keys(inputSample).length === 0) {
98
+ throw new Error('No headers based on this input can be generated. Please relax or change some of the requirements you specified.');
99
+ }
100
+ // Generate the actual headers
101
+ const generatedSample = this.headerGeneratorNetwork.generateSample(inputSample);
102
+ // Manually fill the accept-language header with random ordering of the locales from input
103
+ const generatedHttpAndBrowser = this.prepareHttpBrowserObject(generatedSample[constants_1.BROWSER_HTTP_NODE_NAME]);
104
+ let secFetchAttributeNames = constants_1.HTTP2_SEC_FETCH_ATTRIBUTES;
105
+ let acceptLanguageFieldName = 'accept-language';
106
+ if (generatedHttpAndBrowser.httpVersion !== '2') {
107
+ acceptLanguageFieldName = 'Accept-Language';
108
+ secFetchAttributeNames = constants_1.HTTP1_SEC_FETCH_ATTRIBUTES;
109
+ }
110
+ generatedSample[acceptLanguageFieldName] = this._getAcceptLanguageField(headerOptions.locales);
111
+ const isChrome = generatedHttpAndBrowser.name === 'chrome';
112
+ const isFirefox = generatedHttpAndBrowser.name === 'firefox';
113
+ const isEdge = generatedHttpAndBrowser.name === 'edge';
114
+ const hasSecFetch = (isChrome && generatedHttpAndBrowser.version[0] >= 76)
115
+ || (isFirefox && generatedHttpAndBrowser.version[0] >= 90)
116
+ || (isEdge && generatedHttpAndBrowser.version[0] >= 79);
117
+ // Add fixed headers if needed
118
+ if (hasSecFetch) {
119
+ generatedSample[secFetchAttributeNames.site] = 'same-site';
120
+ generatedSample[secFetchAttributeNames.mode] = 'navigate';
121
+ generatedSample[secFetchAttributeNames.user] = '?1';
122
+ generatedSample[secFetchAttributeNames.dest] = 'document';
123
+ }
124
+ for (const attribute of Object.keys(generatedSample)) {
125
+ if (attribute.startsWith('*') || generatedSample[attribute] === constants_1.MISSING_VALUE_DATASET_TOKEN)
126
+ delete generatedSample[attribute];
127
+ }
128
+ // Order the headers in an order depending on the browser
129
+ return this.orderHeaders({
130
+ ...generatedSample,
131
+ ...requestDependentHeaders,
132
+ }, headers_order_json_1.default[generatedHttpAndBrowser.name]);
133
+ }
134
+ /**
135
+ * Returns a new object that contains ordered headers.
136
+ * @param headers Specifies known values of headers dependent on the particular request.
137
+ * @param order An array of ordered header names, optional (will be deducted from `user-agent`).
138
+ */
139
+ orderHeaders(headers, order = this.getOrderFromUserAgent(headers)) {
140
+ const orderedSample = {};
141
+ for (const attribute of order) {
142
+ if (attribute in headers) {
143
+ orderedSample[attribute] = headers[attribute];
144
+ }
145
+ }
146
+ for (const attribute of Object.keys(headers)) {
147
+ if (!order.includes(attribute)) {
148
+ orderedSample[attribute] = headers[attribute];
149
+ }
150
+ }
151
+ return orderedSample;
152
+ }
153
+ _prepareBrowsersConfig(browsers, browserListQuery, httpVersion) {
154
+ let finalBrowsers = browsers;
155
+ if (browserListQuery) {
156
+ finalBrowsers = (0, utils_1.getBrowsersFromQuery)(browserListQuery);
157
+ }
158
+ return finalBrowsers.map((browser) => {
159
+ if (typeof browser === 'string') {
160
+ return { name: browser, httpVersion };
161
+ }
162
+ browser.httpVersion = httpVersion;
163
+ return browser;
164
+ });
165
+ }
166
+ _getBrowserHttpOptions(browsers) {
167
+ const browserHttpOptions = [];
168
+ for (const browser of browsers) {
169
+ for (const browserOption of this.uniqueBrowsers) {
170
+ if (browser.name === browserOption.name) {
171
+ if ((!browser.minVersion || this._browserVersionIsLesserOrEquals([browser.minVersion], browserOption.version))
172
+ && (!browser.maxVersion || this._browserVersionIsLesserOrEquals(browserOption.version, [browser.maxVersion]))
173
+ && browser.httpVersion === browserOption.httpVersion) {
174
+ browserHttpOptions.push(browserOption.completeString);
175
+ }
176
+ }
177
+ }
178
+ }
179
+ return browserHttpOptions;
180
+ }
181
+ _getPossibleAttributeValues(headerOptions) {
182
+ const { browsers: optionsBrowser, browserListQuery, httpVersion, operatingSystems } = headerOptions;
183
+ const browsers = this._prepareBrowsersConfig(optionsBrowser, browserListQuery, httpVersion);
184
+ // Find known browsers compatible with the input
185
+ const browserHttpOptions = this._getBrowserHttpOptions(browsers);
186
+ const possibleAttributeValues = {};
187
+ possibleAttributeValues[constants_1.BROWSER_HTTP_NODE_NAME] = browserHttpOptions;
188
+ possibleAttributeValues[constants_1.OPERATING_SYSTEM_NODE_NAME] = operatingSystems;
189
+ if (headerOptions.devices) {
190
+ possibleAttributeValues[constants_1.DEVICE_NODE_NAME] = headerOptions.devices;
191
+ }
192
+ return possibleAttributeValues;
193
+ }
194
+ _getAcceptLanguageField(localesFromOptions) {
195
+ let locales = localesFromOptions;
196
+ let highLevelLocales = [];
197
+ for (const locale of locales) {
198
+ if (!locale.includes('-')) {
199
+ highLevelLocales.push(locale);
200
+ }
201
+ }
202
+ for (const locale of locales) {
203
+ if (!highLevelLocales.includes(locale)) {
204
+ let highLevelEquivalentPresent = false;
205
+ for (const highLevelLocale of highLevelLocales) {
206
+ if (locale.includes(highLevelLocale)) {
207
+ highLevelEquivalentPresent = true;
208
+ break;
209
+ }
210
+ }
211
+ if (!highLevelEquivalentPresent)
212
+ highLevelLocales.push(locale);
213
+ }
214
+ }
215
+ highLevelLocales = (0, utils_1.shuffleArray)(highLevelLocales);
216
+ locales = (0, utils_1.shuffleArray)(locales);
217
+ const localesInAddingOrder = [];
218
+ for (const highLevelLocale of highLevelLocales) {
219
+ for (const locale of locales) {
220
+ if (locale.includes(highLevelLocale) && !highLevelLocales.includes(locale)) {
221
+ localesInAddingOrder.push(locale);
222
+ }
223
+ }
224
+ localesInAddingOrder.push(highLevelLocale);
225
+ }
226
+ let acceptLanguageFieldValue = localesInAddingOrder[0];
227
+ for (let x = 1; x < localesInAddingOrder.length; x++) {
228
+ acceptLanguageFieldValue += `,${localesInAddingOrder[x]};q=${1 - x * 0.1}`;
229
+ }
230
+ return acceptLanguageFieldValue;
231
+ }
232
+ /**
233
+ * Extract structured information about a browser and http version in the form of an object from httpBrowserString.
234
+ * @param httpBrowserString A string containing the browser name, version and http version, such as `chrome/88.0.4324.182|2`.
235
+ */
236
+ prepareHttpBrowserObject(httpBrowserString) {
237
+ const [browserString, httpVersion] = httpBrowserString.split('|');
238
+ let browserObject;
239
+ if (browserString === constants_1.MISSING_VALUE_DATASET_TOKEN) {
240
+ browserObject = { name: constants_1.MISSING_VALUE_DATASET_TOKEN };
241
+ }
242
+ else {
243
+ browserObject = this.prepareBrowserObject(browserString);
244
+ }
245
+ return {
246
+ ...browserObject,
247
+ httpVersion: httpVersion,
248
+ completeString: httpBrowserString,
249
+ };
250
+ }
251
+ /**
252
+ * Extract structured information about a browser in the form of an object from browserString.
253
+ * @param browserString A string containing the browser name and version, e.g. `chrome/88.0.4324.182`.
254
+ */
255
+ prepareBrowserObject(browserString) {
256
+ const nameVersionSplit = browserString.split('/');
257
+ const versionSplit = nameVersionSplit[1].split('.');
258
+ const preparedVersion = [];
259
+ for (const versionPart of versionSplit) {
260
+ preparedVersion.push(parseInt(versionPart, 10));
261
+ }
262
+ return {
263
+ name: nameVersionSplit[0],
264
+ version: preparedVersion,
265
+ completeString: browserString,
266
+ };
267
+ }
268
+ /**
269
+ * Returns a new object containing header names ordered by their appearance in the given browser.
270
+ * @param headers Non-normalized request headers
271
+ * @returns Correct header order for the given browser.
272
+ */
273
+ getOrderFromUserAgent(headers) {
274
+ const userAgent = (0, utils_1.getUserAgent)(headers);
275
+ const browser = (0, utils_1.getBrowser)(userAgent);
276
+ if (!browser) {
277
+ return [];
278
+ }
279
+ return headers_order_json_1.default[browser];
280
+ }
281
+ _browserVersionIsLesserOrEquals(browserVersionL, browserVersionR) {
282
+ return browserVersionL[0] <= browserVersionR[0];
283
+ }
284
+ }
285
+ exports.HeaderGenerator = HeaderGenerator;
286
+ //# sourceMappingURL=header-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header-generator.js","sourceRoot":"","sources":["../src/header-generator.ts"],"names":[],"mappings":";;;;AAAA,6EAA8D;AAE9D,oDAAoB;AACpB,mCAKiB;AAEjB,2CAWqB;AAErB,iGAA2D;AAC3D,6GAAyE;AAEzE,MAAM,yBAAyB,GAAG;IAC9B,IAAI,EAAE,YAAE,CAAC,MAAM;IACf,UAAU,EAAE,YAAE,CAAC,QAAQ,CAAC,MAAM;IAC9B,UAAU,EAAE,YAAE,CAAC,QAAQ,CAAC,MAAM;IAC9B,WAAW,EAAE,YAAE,CAAC,QAAQ,CAAC,MAAM;CAClC,CAAC;A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AC,CAAC,CAAC;YACzB,OAAO,EAAE,eAAe;YACxB,cAAc,EAAE,aAAa;SACX,CAAC;IAC3B,CAAC;IAED;;;;OAIG;IACK,qBAAqB,CAAC,OAA+B;QACzD,MAAM,SAAS,GAAG,IAAA,oBAAY,EAAC,OAAO,CAAC,CAAC;QACxC,MAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,SAAS,CAAC,CAAC;QAEtC,IAAI,CAAC,OAAO,EAAE;YACV,OAAO,EAAE,CAAC;SACb;QAED,OAAQ,4BAAoC,CAAC,OAAO,CAAC,CAAC;IAC1D,CAAC;IAEO,+BAA+B,CAAC,eAAyB,EAAE,eAAyB;QACxF,OAAO,eAAe,CAAC,CAAC,CAAC,IAAI,eAAe,CAAC,CAAC,CAAC,CAAC;IACpD,CAAC;CACJ;AAhSD,0CAgSC"}
package/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from './header-generator';
2
+ export * as PRESETS from './presets';
3
+ //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC"}
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,6DAAmC;AACnC,6DAAqC"}
package/index.mjs ADDED
@@ -0,0 +1,6 @@
1
+ import mod from "./index.js";
2
+
3
+ export default mod;
4
+ export const HeaderGenerator = mod.HeaderGenerator;
5
+ export const PRESETS = mod.PRESETS;
6
+ export const headerGeneratorOptionsShape = mod.headerGeneratorOptionsShape;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "header-generator",
3
- "version": "2.0.0-dev.1",
3
+ "version": "2.0.0-dev.4",
4
4
  "description": "NodeJs package for generating browser-like headers.",
5
5
  "author": {
6
6
  "name": "Apify",
@@ -12,21 +12,19 @@
12
12
  "engines": {
13
13
  "node": ">=16.0.0"
14
14
  },
15
- "files": [
16
- "dist"
17
- ],
18
15
  "main": "index.js",
19
16
  "module": "index.mjs",
20
17
  "types": "index.d.ts",
21
18
  "exports": {
22
19
  ".": {
23
20
  "import": "./index.mjs",
24
- "require": "./index.js"
21
+ "require": "./index.js",
22
+ "types": "./index.d.ts"
25
23
  }
26
24
  },
27
25
  "dependencies": {
28
26
  "browserslist": "^4.19.1",
29
- "generative-bayesian-network": "^2.0.0-dev.1",
27
+ "generative-bayesian-network": "^2.0.0-dev.4",
30
28
  "ow": "^0.28.1"
31
29
  },
32
30
  "scripts": {
@@ -43,5 +41,5 @@
43
41
  "type": "git",
44
42
  "url": "git+https://github.com/apify/header-generator.git"
45
43
  },
46
- "gitHead": "d6169bf8279ee467aa99d4fbd49cc7ecbf38a534"
44
+ "gitHead": "74409fdc7e0adff436485357cab9c055b77577c6"
47
45
  }
package/presets.d.ts ADDED
@@ -0,0 +1,49 @@
1
+ export declare const MODERN_DESKTOP: {
2
+ browserListQuery: string;
3
+ };
4
+ export declare const MODERN_MOBILE: {
5
+ devices: string[];
6
+ browserListQuery: string;
7
+ };
8
+ export declare const MODERN_LINUX: {
9
+ operatingSystems: string[];
10
+ browserListQuery: string;
11
+ };
12
+ export declare const MODERN_LINUX_FIREFOX: {
13
+ browserListQuery: string;
14
+ operatingSystems: string[];
15
+ };
16
+ export declare const MODERN_LINUX_CHROME: {
17
+ browserListQuery: string;
18
+ operatingSystems: string[];
19
+ };
20
+ export declare const MODERN_WINDOWS: {
21
+ operatingSystems: string[];
22
+ browserListQuery: string;
23
+ };
24
+ export declare const MODERN_WINDOWS_FIREFOX: {
25
+ browserListQuery: string;
26
+ operatingSystems: string[];
27
+ };
28
+ export declare const MODERN_WINDOWS_CHROME: {
29
+ browserListQuery: string;
30
+ operatingSystems: string[];
31
+ };
32
+ export declare const MODERN_MACOS: {
33
+ operatingSystems: string[];
34
+ browserListQuery: string;
35
+ };
36
+ export declare const MODERN_MACOS_FIREFOX: {
37
+ browserListQuery: string;
38
+ operatingSystems: string[];
39
+ };
40
+ export declare const MODERN_MACOS_CHROME: {
41
+ browserListQuery: string;
42
+ operatingSystems: string[];
43
+ };
44
+ export declare const MODERN_ANDROID: {
45
+ operatingSystems: string[];
46
+ devices: string[];
47
+ browserListQuery: string;
48
+ };
49
+ //# sourceMappingURL=presets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../src/presets.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;CAE1B,CAAC;AAEF,eAAO,MAAM,aAAa;;;CAGzB,CAAC;AAEF,eAAO,MAAM,YAAY;;;CAGxB,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;CAGhC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;CAG/B,CAAC;AAEF,eAAO,MAAM,cAAc;;;CAG1B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;CAGlC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;CAGjC,CAAC;AAEF,eAAO,MAAM,YAAY;;;CAGxB,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;CAGhC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;CAG/B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;CAI1B,CAAC"}
package/presets.js ADDED
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MODERN_ANDROID = exports.MODERN_MACOS_CHROME = exports.MODERN_MACOS_FIREFOX = exports.MODERN_MACOS = exports.MODERN_WINDOWS_CHROME = exports.MODERN_WINDOWS_FIREFOX = exports.MODERN_WINDOWS = exports.MODERN_LINUX_CHROME = exports.MODERN_LINUX_FIREFOX = exports.MODERN_LINUX = exports.MODERN_MOBILE = exports.MODERN_DESKTOP = void 0;
4
+ exports.MODERN_DESKTOP = {
5
+ browserListQuery: 'last 5 versions',
6
+ };
7
+ exports.MODERN_MOBILE = {
8
+ ...exports.MODERN_DESKTOP,
9
+ devices: ['mobile'],
10
+ };
11
+ exports.MODERN_LINUX = {
12
+ ...exports.MODERN_DESKTOP,
13
+ operatingSystems: ['linux'],
14
+ };
15
+ exports.MODERN_LINUX_FIREFOX = {
16
+ browserListQuery: 'last 5 firefox versions',
17
+ operatingSystems: ['linux'],
18
+ };
19
+ exports.MODERN_LINUX_CHROME = {
20
+ browserListQuery: 'last 5 chrome versions',
21
+ operatingSystems: ['linux'],
22
+ };
23
+ exports.MODERN_WINDOWS = {
24
+ ...exports.MODERN_DESKTOP,
25
+ operatingSystems: ['windows'],
26
+ };
27
+ exports.MODERN_WINDOWS_FIREFOX = {
28
+ browserListQuery: 'last 5 firefox versions',
29
+ operatingSystems: ['windows'],
30
+ };
31
+ exports.MODERN_WINDOWS_CHROME = {
32
+ browserListQuery: 'last 5 chrome versions',
33
+ operatingSystems: ['windows'],
34
+ };
35
+ exports.MODERN_MACOS = {
36
+ ...exports.MODERN_DESKTOP,
37
+ operatingSystems: ['macos'],
38
+ };
39
+ exports.MODERN_MACOS_FIREFOX = {
40
+ browserListQuery: 'last 5 firefox versions',
41
+ operatingSystems: ['macos'],
42
+ };
43
+ exports.MODERN_MACOS_CHROME = {
44
+ browserListQuery: 'last 5 chrome versions',
45
+ operatingSystems: ['macos'],
46
+ };
47
+ exports.MODERN_ANDROID = {
48
+ ...exports.MODERN_MOBILE,
49
+ operatingSystems: ['android'],
50
+ };
51
+ //# sourceMappingURL=presets.js.map
package/presets.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presets.js","sourceRoot":"","sources":["../src/presets.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG;IAC1B,gBAAgB,EAAE,iBAAiB;CACtC,CAAC;AAEW,QAAA,aAAa,GAAG;IACzB,GAAG,sBAAc;IACjB,OAAO,EAAE,CAAC,QAAQ,CAAC;CACtB,CAAC;AAEW,QAAA,YAAY,GAAG;IACxB,GAAG,sBAAc;IACjB,gBAAgB,EAAE,CAAC,OAAO,CAAC;CAC9B,CAAC;AAEW,QAAA,oBAAoB,GAAG;IAChC,gBAAgB,EAAE,yBAAyB;IAC3C,gBAAgB,EAAE,CAAC,OAAO,CAAC;CAC9B,CAAC;AAEW,QAAA,mBAAmB,GAAG;IAC/B,gBAAgB,EAAE,wBAAwB;IAC1C,gBAAgB,EAAE,CAAC,OAAO,CAAC;CAC9B,CAAC;AAEW,QAAA,cAAc,GAAG;IAC1B,GAAG,sBAAc;IACjB,gBAAgB,EAAE,CAAC,SAAS,CAAC;CAChC,CAAC;AAEW,QAAA,sBAAsB,GAAG;IAClC,gBAAgB,EAAE,yBAAyB;IAC3C,gBAAgB,EAAE,CAAC,SAAS,CAAC;CAChC,CAAC;AAEW,QAAA,qBAAqB,GAAG;IACjC,gBAAgB,EAAE,wBAAwB;IAC1C,gBAAgB,EAAE,CAAC,SAAS,CAAC;CAChC,CAAC;AAEW,QAAA,YAAY,GAAG;IACxB,GAAG,sBAAc;IACjB,gBAAgB,EAAE,CAAC,OAAO,CAAC;CAC9B,CAAC;AAEW,QAAA,oBAAoB,GAAG;IAChC,gBAAgB,EAAE,yBAAyB;IAC3C,gBAAgB,EAAE,CAAC,OAAO,CAAC;CAC9B,CAAC;AAEW,QAAA,mBAAmB,GAAG;IAC/B,gBAAgB,EAAE,wBAAwB;IAC1C,gBAAgB,EAAE,CAAC,OAAO,CAAC;CAC9B,CAAC;AAEW,QAAA,cAAc,GAAG;IAC1B,GAAG,qBAAa;IAChB,gBAAgB,EAAE,CAAC,SAAS,CAAC;CAEhC,CAAC"}
@@ -0,0 +1 @@
1
+ {"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/typescript/lib/lib.esnext.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/tslib/tslib.d.ts","../src/constants.ts","../../generative-bayesian-network/dist/bayesian-network.d.ts","../../generative-bayesian-network/dist/index.d.ts","../../../node_modules/ow/dist/predicates/base-predicate.d.ts","../../../node_modules/ow/dist/predicates/predicate.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/ow/node_modules/type-fest/source/primitive.d.ts","../../../node_modules/ow/node_modules/type-fest/source/typed-array.d.ts","../../../node_modules/ow/node_modules/type-fest/source/basic.d.ts","../../../node_modules/ow/node_modules/type-fest/source/observable-like.d.ts","../../../node_modules/ow/node_modules/type-fest/source/internal.d.ts","../../../node_modules/ow/node_modules/type-fest/source/except.d.ts","../../../node_modules/ow/node_modules/type-fest/source/simplify.d.ts","../../../node_modules/ow/node_modules/type-fest/source/writable.d.ts","../../../node_modules/ow/node_modules/type-fest/source/mutable.d.ts","../../../node_modules/ow/node_modules/type-fest/source/merge.d.ts","../../../node_modules/ow/node_modules/type-fest/source/merge-exclusive.d.ts","../../../node_modules/ow/node_modules/type-fest/source/require-at-least-one.d.ts","../../../node_modules/ow/node_modules/type-fest/source/require-exactly-one.d.ts","../../../node_modules/ow/node_modules/type-fest/source/require-all-or-none.d.ts","../../../node_modules/ow/node_modules/type-fest/source/remove-index-signature.d.ts","../../../node_modules/ow/node_modules/type-fest/source/partial-deep.d.ts","../../../node_modules/ow/node_modules/type-fest/source/readonly-deep.d.ts","../../../node_modules/ow/node_modules/type-fest/source/literal-union.d.ts","../../../node_modules/ow/node_modules/type-fest/source/promisable.d.ts","../../../node_modules/ow/node_modules/type-fest/source/opaque.d.ts","../../../node_modules/ow/node_modules/type-fest/source/invariant-of.d.ts","../../../node_modules/ow/node_modules/type-fest/source/set-optional.d.ts","../../../node_modules/ow/node_modules/type-fest/source/set-required.d.ts","../../../node_modules/ow/node_modules/type-fest/source/value-of.d.ts","../../../node_modules/ow/node_modules/type-fest/source/promise-value.d.ts","../../../node_modules/ow/node_modules/type-fest/source/async-return-type.d.ts","../../../node_modules/ow/node_modules/type-fest/source/conditional-keys.d.ts","../../../node_modules/ow/node_modules/type-fest/source/conditional-except.d.ts","../../../node_modules/ow/node_modules/type-fest/source/conditional-pick.d.ts","../../../node_modules/ow/node_modules/type-fest/source/union-to-intersection.d.ts","../../../node_modules/ow/node_modules/type-fest/source/stringified.d.ts","../../../node_modules/ow/node_modules/type-fest/source/fixed-length-array.d.ts","../../../node_modules/ow/node_modules/type-fest/source/multidimensional-array.d.ts","../../../node_modules/ow/node_modules/type-fest/source/multidimensional-readonly-array.d.ts","../../../node_modules/ow/node_modules/type-fest/source/iterable-element.d.ts","../../../node_modules/ow/node_modules/type-fest/source/entry.d.ts","../../../node_modules/ow/node_modules/type-fest/source/entries.d.ts","../../../node_modules/ow/node_modules/type-fest/source/set-return-type.d.ts","../../../node_modules/ow/node_modules/type-fest/source/asyncify.d.ts","../../../node_modules/ow/node_modules/type-fest/source/jsonify.d.ts","../../../node_modules/ow/node_modules/type-fest/source/schema.d.ts","../../../node_modules/ow/node_modules/type-fest/source/literal-to-primitive.d.ts","../../../node_modules/ow/node_modules/type-fest/source/numeric.d.ts","../../../node_modules/ow/node_modules/type-fest/source/string-key-of.d.ts","../../../node_modules/ow/node_modules/type-fest/source/exact.d.ts","../../../node_modules/ow/node_modules/type-fest/source/readonly-tuple.d.ts","../../../node_modules/ow/node_modules/type-fest/source/utilities.d.ts","../../../node_modules/ow/node_modules/type-fest/source/split.d.ts","../../../node_modules/ow/node_modules/type-fest/source/camel-case.d.ts","../../../node_modules/ow/node_modules/type-fest/source/camel-cased-properties.d.ts","../../../node_modules/ow/node_modules/type-fest/source/camel-cased-properties-deep.d.ts","../../../node_modules/ow/node_modules/type-fest/source/delimiter-case.d.ts","../../../node_modules/ow/node_modules/type-fest/source/kebab-case.d.ts","../../../node_modules/ow/node_modules/type-fest/source/delimiter-cased-properties.d.ts","../../../node_modules/ow/node_modules/type-fest/source/kebab-cased-properties.d.ts","../../../node_modules/ow/node_modules/type-fest/source/delimiter-cased-properties-deep.d.ts","../../../node_modules/ow/node_modules/type-fest/source/kebab-cased-properties-deep.d.ts","../../../node_modules/ow/node_modules/type-fest/source/pascal-case.d.ts","../../../node_modules/ow/node_modules/type-fest/source/pascal-cased-properties.d.ts","../../../node_modules/ow/node_modules/type-fest/source/pascal-cased-properties-deep.d.ts","../../../node_modules/ow/node_modules/type-fest/source/snake-case.d.ts","../../../node_modules/ow/node_modules/type-fest/source/snake-cased-properties.d.ts","../../../node_modules/ow/node_modules/type-fest/source/snake-cased-properties-deep.d.ts","../../../node_modules/ow/node_modules/type-fest/source/includes.d.ts","../../../node_modules/ow/node_modules/type-fest/source/screaming-snake-case.d.ts","../../../node_modules/ow/node_modules/type-fest/source/join.d.ts","../../../node_modules/ow/node_modules/type-fest/source/trim.d.ts","../../../node_modules/ow/node_modules/type-fest/source/replace.d.ts","../../../node_modules/ow/node_modules/type-fest/source/get.d.ts","../../../node_modules/ow/node_modules/type-fest/source/last-array-element.d.ts","../../../node_modules/ow/node_modules/type-fest/source/package-json.d.ts","../../../node_modules/ow/node_modules/type-fest/source/tsconfig-json.d.ts","../../../node_modules/ow/node_modules/type-fest/index.d.ts","../../../node_modules/ow/dist/predicates/string.d.ts","../../../node_modules/ow/dist/predicates/number.d.ts","../../../node_modules/ow/dist/predicates/bigint.d.ts","../../../node_modules/ow/dist/predicates/boolean.d.ts","../../../node_modules/ow/dist/predicates/array.d.ts","../../../node_modules/ow/dist/utils/match-shape.d.ts","../../../node_modules/ow/dist/predicates/object.d.ts","../../../node_modules/ow/dist/predicates/date.d.ts","../../../node_modules/ow/dist/predicates/error.d.ts","../../../node_modules/ow/dist/predicates/map.d.ts","../../../node_modules/ow/dist/predicates/weak-map.d.ts","../../../node_modules/ow/dist/predicates/set.d.ts","../../../node_modules/ow/dist/predicates/weak-set.d.ts","../../../node_modules/ow/dist/predicates/typed-array.d.ts","../../../node_modules/ow/dist/predicates/array-buffer.d.ts","../../../node_modules/ow/dist/predicates/data-view.d.ts","../../../node_modules/ow/dist/predicates/any.d.ts","../../../node_modules/ow/dist/predicates.d.ts","../../../node_modules/ow/dist/modifiers.d.ts","../../../node_modules/ow/dist/argument-error.d.ts","../../../node_modules/ow/dist/index.d.ts","../../../node_modules/browserslist/index.d.ts","../src/utils.ts","../src/data_files/headers-order.json","../src/data_files/browser-helper-file.json","../src/header-generator.ts","../src/presets.ts","../src/index.ts","../../../node_modules/@types/adm-zip/util.d.ts","../../../node_modules/@types/adm-zip/index.d.ts","../../../node_modules/@babel/types/lib/index.d.ts","../../../node_modules/@types/babel__generator/index.d.ts","../../../node_modules/@babel/parser/typings/babel-parser.d.ts","../../../node_modules/@types/babel__template/index.d.ts","../../../node_modules/@types/babel__traverse/index.d.ts","../../../node_modules/@types/babel__core/index.d.ts","../../../node_modules/@types/graceful-fs/index.d.ts","../../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../../node_modules/@types/istanbul-lib-report/index.d.ts","../../../node_modules/@types/istanbul-reports/index.d.ts","../../../node_modules/chalk/index.d.ts","../../../node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../node_modules/pretty-format/build/types.d.ts","../../../node_modules/pretty-format/build/index.d.ts","../../../node_modules/jest-diff/build/types.d.ts","../../../node_modules/jest-diff/build/diffLines.d.ts","../../../node_modules/jest-diff/build/printDiffs.d.ts","../../../node_modules/jest-diff/build/index.d.ts","../../../node_modules/jest-matcher-utils/build/index.d.ts","../../../node_modules/@types/jest/index.d.ts","../../../node_modules/@types/json-schema/index.d.ts","../../../node_modules/@types/json5/index.d.ts","../../../node_modules/@types/minimatch/index.d.ts","../../../node_modules/@types/minimist/index.d.ts","../../../node_modules/form-data/index.d.ts","../../../node_modules/@types/node-fetch/externals.d.ts","../../../node_modules/@types/node-fetch/index.d.ts","../../../node_modules/@types/normalize-package-data/index.d.ts","../../../node_modules/@types/parse-json/index.d.ts","../../../node_modules/@types/prettier/index.d.ts","../../../node_modules/@types/puppeteer/index.d.ts","../../../node_modules/@types/stack-utils/index.d.ts","../../../node_modules/@types/useragent/index.d.ts","../../../node_modules/@types/yargs-parser/index.d.ts","../../../node_modules/@types/yargs/index.d.ts","../../../node_modules/@types/yauzl/index.d.ts"],"fileInfos":[{"version":"f5c28122bee592cfaf5c72ed7bcc47f453b79778ffa6e301f45d21a0970719d4","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9","746d62152361558ea6d6115cf0da4dd10ede041d14882ede3568bce5dc4b4f1f","3eb679a56cab01203a1ba7edeade937f6a2a4c718513b2cd930b579807fa9359","aea179452def8a6152f98f63b191b84e7cbd69b0e248c91e61fb2e52328abe8c",{"version":"3f149f903dd20dfeb7c80e228b659f0e436532de772469980dbd00702cc05cc1","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"cd483c056da900716879771893a3c9772b66c3c88f8943b4205aec738a94b1d0","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"6c55633c733c8378db65ac3da7a767c3cf2cf3057f0565a9124a16a3a2019e87","affectsGlobalScope":true},{"version":"fb4416144c1bf0323ccbc9afb0ab289c07312214e8820ad17d709498c865a3fe","affectsGlobalScope":true},{"version":"5b0ca94ec819d68d33da516306c15297acec88efeb0ae9e2b39f71dbd9685ef7","affectsGlobalScope":true},{"version":"ff667ee99e5a28c3dc5063a3cfd4d3436699e3fb035d4451037da7f567da542a","affectsGlobalScope":true},{"version":"34478567f8a80171f88f2f30808beb7da15eac0538ae91282dd33dce928d98ed","affectsGlobalScope":true},{"version":"6ea9ab679ea030cf46c16a711a316078e9e02619ebaf07a7fcd16964aba88f2d","affectsGlobalScope":true},{"version":"6bda95ea27a59a276e46043b7065b55bd4b316c25e70e29b572958fa77565d43","affectsGlobalScope":true},{"version":"aedb8de1abb2ff1095c153854a6df7deae4a5709c37297f9d6e9948b6806fa66","affectsGlobalScope":true},{"version":"11ffe3c281f375fff9ffdde8bbec7669b4dd671905509079f866f2354a788064","affectsGlobalScope":true},{"version":"c37f8a49593a0030eecb51bbfa270e709bec9d79a6cc3bb851ef348d4e6b26f8","affectsGlobalScope":true},"4576b4e61049f5ffd7c9e935cf88832e089265bdb15ffc35077310042cbbbeea",{"version":"5fc457c26e06846ba2378f52c9e2ef2999f624c56359019dabf6ba4b32b12497","signature":"f2bd2ac923e340878bbaf38d32e41be19dcfcf723c667933d67c31b4057128a8"},"b1fd20006d1149ccae6b50e07e2c4acca11534552619c5315320aa057cfa6bc6","8e6143cca56cbbf10eaa6de429433eac9e505f31c6400d60334a8a6371bbf451","7664bc39c9085e161f5f6f8f647ceffe26418a98a3f2a4c381fdc755be4b9e64","2cfbeb3885b75d97160fee31a23f4e5d1508cb2af1ce34ad98741b38a4b253b9","0cba3a5d7b81356222594442753cf90dd2892e5ccfe1d262aaca6896ba6c1380","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"77f0b5c6a193a699c9f7d7fb0578e64e562d271afa740783665d2a827104a873","affectsGlobalScope":true},"e5979905796fe2740d85fbaf4f11f42b7ee1851421afe750823220813421b1af",{"version":"fcdcb42da18dd98dc286b1876dd425791772036012ae61263c011a76b13a190f","affectsGlobalScope":true},"1dab5ab6bcf11de47ab9db295df8c4f1d92ffa750e8f095e88c71ce4c3299628","f71f46ccd5a90566f0a37b25b23bc4684381ab2180bdf6733f4e6624474e1894",{"version":"54e65985a3ee3cec182e6a555e20974ea936fc8b8d1738c14e8ed8a42bd921d4","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","5b30f550565fd0a7524282c81c27fe8534099e2cd26170ca80852308f07ae68d","34e5de87d983bc6aefef8b17658556e3157003e8d9555d3cb098c6bef0b5fbc8","d97cd8a4a42f557fc62271369ed0461c8e50d47b7f9c8ad0b5462f53306f6060","f27371653aded82b2b160f7a7033fb4a5b1534b6f6081ef7be1468f0f15327d3","c762cd6754b13a461c54b59d0ae0ab7aeef3c292c6cf889873f786ee4d8e75c9","f4ea7d5df644785bd9fbf419930cbaec118f0d8b4160037d2339b8e23c059e79",{"version":"bfea28e6162ed21a0aeed181b623dcf250aa79abf49e24a6b7e012655af36d81","affectsGlobalScope":true},"b8aca9d0c81abb02bec9b7621983ae65bde71da6727580070602bd2500a9ce2a","ae97e20f2e10dbeec193d6a2f9cd9a367a1e293e7d6b33b68bacea166afd7792","10d4796a130577d57003a77b95d8723530bbec84718e364aa2129fa8ffba0378","063f53ff674228c190efa19dd9448bcbd540acdbb48a928f4cf3a1b9f9478e43","bf73c576885408d4a176f44a9035d798827cc5020d58284cb18d7573430d9022","7ae078ca42a670445ae0c6a97c029cb83d143d62abd1730efb33f68f0b2c0e82",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"963fe86b2ebd07a34b92b52c6532ab45ec5ccda218a6c477de354fcad2aae0cb","12eea70b5e11e924bb0543aea5eadc16ced318aa26001b453b0d561c2fd0bd1e","08777cd9318d294646b121838574e1dd7acbb22c21a03df84e1f2c87b1ad47f2","08a90bcdc717df3d50a2ce178d966a8c353fd23e5c392fd3594a6e39d9bb6304",{"version":"9f8dd3922db205bc8a362a6b18078708fd699185b11648522159cbf3743561b5","affectsGlobalScope":true},"2a12d2da5ac4c4979401a3f6eaafa874747a37c365e4bc18aa2b171ae134d21b","002b837927b53f3714308ecd96f72ee8a053b8aeb28213d8ec6de23ed1608b66","1dc9c847473bb47279e398b22c740c83ea37a5c88bf66629666e3cf4c5b9f99c","a9e4a5a24bf2c44de4c98274975a1a705a0abbaad04df3557c2d3cd8b1727949","821dcb2b571bf698841d8ec25fde9d5f615ef3958957227962602f9dbfa8d800","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff",{"version":"806ef4cac3b3d9fa4a48d849c8e084d7c72fcd7b16d76e06049a9ed742ff79c0","affectsGlobalScope":true},"44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","5f0ed51db151c2cdc4fa3bb0f44ce6066912ad001b607a34e65a96c52eb76248",{"version":"af9771b066ec35ffa1c7db391b018d2469d55e51b98ae95e62b6cbef1b0169ca","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","103d70bfbeb3cd3a3f26d1705bf986322d8738c2c143f38ebb743b1e228d7444","f52fbf64c7e480271a9096763c4882d356b05cab05bf56a64e68a95313cd2ce2","59bdb65f28d7ce52ccfc906e9aaf422f8b8534b2d21c32a27d7819be5ad81df7",{"version":"3a2da34079a2567161c1359316a32e712404b56566c45332ac9dcee015ecce9f","affectsGlobalScope":true},"28a2e7383fd898c386ffdcacedf0ec0845e5d1a86b5a43f25b86bc315f556b79","3aff9c8c36192e46a84afe7b926136d520487155154ab9ba982a8b544ea8fc95","a880cf8d85af2e4189c709b0fea613741649c0e40fffb4360ec70762563d5de0","85bbf436a15bbeda4db888be3062d47f99c66fd05d7c50f0f6473a9151b6a070","9f9c49c95ecd25e0cb2587751925976cf64fd184714cb11e213749c80cf0f927","f0c75c08a71f9212c93a719a25fb0320d53f2e50ca89a812640e08f8ad8c408c",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"aee3379fb20741a337a779530cc3e608aba5f34776511033d1d2db7ca45c4193","cd51ceafea7762ad639afb3ca5b68e1e4ffeaacaa402d7ef2cae17016e29e098","1b8357b3fef5be61b5de6d6a4805a534d68fe3e040c11f1944e27d4aec85936a","4a15fc59b27b65b9894952048be2afc561865ec37606cd0f5e929ee4a102233b",{"version":"744e7c636288493667d553c8f8ebd666ccbc0e715df445a4a7c4a48812f20544","affectsGlobalScope":true},"3136f3ea13c4d50fe71327d2e1f71545828e653acf6939d00a7da4c9d9ed44b1","326da4aebf555d54b995854ff8f3432f63ba067be354fa16c6e1f50daa0667de","cb26f195564ee703a68161f88e57e33e6e76e630b999e582d0a4328435d7f84e","76e3f3a30c533bf20840d4185ce2d143dc18ca955b64400ac09670a89d388198","144dfcee38ebc38aae93a85bc47211c9268d529b099127b74d61242ec5c17f35","2cf38989b23031694f04308b6797877534a49818b2f5257f4a5d824e7ea82a5a","f981ffdbd651f67db134479a5352dac96648ca195f981284e79dc0a1dbc53fd5","e4ace1cf5316aa7720e58c8dd511ba86bab1c981336996fb694fa64b8231d5f0","a1c85a61ff2b66291676ab84ae03c1b1ff7139ffde1942173f6aee8dc4ee357b","f35a727758da36dd885a70dd13a74d9167691aaff662d50eaaf66ed591957702","116205156fb819f2afe33f9c6378ea11b6123fa3090f858211c23f667fff75da","38d2ea936e6601a39eea93af012ce880acd2a9a0e8e2fb8e1ee7c60c7cca92ce","cc28c8b188905e790de427f3cd00b96734c9c662fb849d68ff9d5f0327165c0d","da2aa652d2bf03cc042e2ff31e4194f4f18f042b8344dcb2568f761daaf7869f","03ed68319c97cd4ce8f1c4ded110d9b40b8a283c3242b9fe934ccfa834e45572","9ec251cf4cc7c319facc5ef96f0a0c2c530311a7267af598b0ee2364c0ff095d","eec9e706eef30b4f1c6ff674738d3fca572829b7fa1715f37742863dabb3d2f2","cec67731fce8577b0a90aa67ef0522ddb9f1fd681bece50cdcb80a833b4ed06f","a14679c24962a81ef24b6f4e95bbc31601551f150d91af2dc0bce51f7961f223","18b86125c67d99150f54225df07349ddd07acde086b55f3eeac1c34c81e424d8","d5a5025f04e7a3264ecfa3030ca9a3cb0353450f1915a26d5b84f596240a11cd","03f4449c691dd9c51e42efd51155b63c8b89a5f56b5cf3015062e2f818be8959","23b213ec3af677b3d33ec17d9526a88d5f226506e1b50e28ce4090fb7e4050a8","f0abf96437a6e57b9751a792ba2ebb765729a40d0d573f7f6800b305691b1afb","7d30aee3d35e64b4f49c235d17a09e7a7ce2961bebb3996ee1db5aa192f3feba","eb1625bab70cfed00931a1e09ecb7834b61a666b0011913b0ec24a8e219023ef","1a923815c127b27f7f375c143bb0d9313ccf3c66478d5d2965375eeb7da72a4c","4f92df9d64e5413d4b34020ae6b382edda84347daec97099e7c008a9d5c0910b","fcc438e50c00c9e865d9c1777627d3fdc1e13a4078c996fb4b04e67e462648c8","d0f07efa072420758194c452edb3f04f8eabc01cd4b3884a23e7274d4e2a7b69","7086cca41a87b3bf52c6abfc37cda0a0ec86bb7e8e5ef166b07976abec73fa5e","4571a6886b4414403eacdd1b4cdbd854453626900ece196a173e15fb2b795155","c122227064c2ebf6a5bd2800383181395b56bb71fd6683d5e92add550302e45f","60f476f1c4de44a08d6a566c6f1e1b7de6cbe53d9153c9cc2284ca0022e21fba","84315d5153613eeb4b34990fb3bc3a1261879a06812ee7ae481141e30876d8dc","52de3fa0599f7b1624f25dc44df8ec4c438865d35a7ff0039e949bd5faaaa1ea","8be5c5be3dbf0003a628f99ad870e31bebc2364c28ea3b96231089a94e09f7a6","6626bbc69c25a92f6d32e6d2f25038f156b4c2380cbf29a420f7084fb1d2f7d7","c2b41ce4b8d50afe70f271879dcd6d3d2a5cc765bfe6d00b9431b52ccc7482dd","f351eaa598ba2046e3078e5480a7533be7051e4db9212bb40f4eeb84279aa24d","0f4d6ae9424ada149aefa9211f11097a450f335a0f34e23baebb3501ae34dfc2","4ce53edb8fb1d2f8b2f6814084b773cdf5846f49bf5a426fbe4029327bda95bf","679a500b60fdb879af3ff20dab0bc5937098dd1ea5b75f786c672fde09faaeef","bb30fb0534dceb2e41a884c1e4e2bb7a0c668dadd148092bba9ff15aafb94790","6b62b35656dedc3551659c23c8bf6b027fac3e086622d29381d59b6a7ed961ec","8f313aa8055158f08bd75e3a57161fa473a50884c20142f3318f89f19bfc0373","e789eb929b46299187312a01ff71905222f67907e546e491952c384b6f956a63","313e85b41910a87c763fd77b3c2aa56a6fe7b745b6fffff8da6e4f0e2941cd6f","a86492d82baf906c071536e8de073e601eaa5deed138c2d9c42d471d72395d7e","6b1071c06abcbe1c9f60638d570fdbfe944b6768f95d9f28ebc06c7eec9b4087","92eb8a98444729aa61be5e6e489602363d763da27d1bcfdf89356c1d360484da","1285ddb279c6d0bc5fe46162a893855078ae5b708d804cd93bfc4a23d1e903d9","d729b8b400507b9b51ff40d11e012379dbf0acd6e2f66bf596a3bc59444d9bf1","fc3ee92b81a6188a545cba5c15dc7c5d38ee0aaca3d8adc29af419d9bdb1fdb9","a14371dc39f95c27264f8eb02ce2f80fd84ac693a2750983ac422877f0ae586d","755bcc456b4dd032244b51a8b4fe68ee3b2d2e463cf795f3fde970bb3f269fb1","c00b402135ef36fb09d59519e34d03445fd6541c09e68b189abb64151f211b12","e08e58ac493a27b29ceee80da90bb31ec64341b520907d480df6244cdbec01f8","c0fe2b1135ca803efa203408c953e1e12645b8065e1a4c1336ad8bb11ea1101b","938ae6ca9eadc567365e4418660ed160242818095fec7380b4aeff54253fa6bf","25b1108faedaf2043a97a76218240b1b537459bbca5ae9e2207c236c40dcfdef","a1d1e49ccd2ac07ed8a49a3f98dfd2f7357cf03649b9e348b58b97bb75116f18","7ad042f7d744ccfbcf6398216203c7712f01359d6fd4348c8bd8df8164e98096","e3593178ce6c6818e92b8a2e8379e47732b0f9db032bc12dc79ddac86374ae84","1c8230e0768a205636bf90508dd1448ec78df582daf52a19f33d9f211efced71","189dedb255e41c8556d0d61d7f1c18506501896354d0925cbd47060bcddccab1","06d0ce0f7f8a558d2c123f2a7f27c33f5b900e04ce7ede32615f6f0ccc8d3b07","845cb741418b229d6ff309a95b0f5af969a798c40fbc71467b8fca9ed5fbee7c","d51fa88d98cb30c2d0b9a6967215a9d09393a0458ad057663d40247d864fe085","acf43834501c92da619d35679372c53d08a135fce5de10cc04e2f54c07134ae1","bc8f5e3c72bcb2e68e2feb272c8312b81fd0ba7417e2993eb569aa9aba05661d","ef275855066eb67627a2e8e388226fd510824d27d2a8f5555251fe096a9def3e","3b8ab6d861339b4c45682219429441534c00abd7f23fc0714e9326213669d35a","74ff64ddbb6c72565b2ffc98652f78c3895cc40c8264ed0881ec1221e759de18","83cf78cb96cbe2cf84d7acbb777345919e79d1357bf051bd5c1da1e7d85b755a","40c1a3ed908790d2d173914c88721ea4182cac8a6b1e5e13ef268a82404828c4","8b27c6ae71f8849874f800e49d14a98c92bb0ae54e0a79d6ae617063ba2a6e5c","ce6fbdceac62521a6f474355eb2a0b85446f7dd7437ce59eed9ac9ced059d4a0","466e0434af11422a1621060ca2745a4b94067076065b6e0c0aeb874c6eaa9a63","2b1177d4681eade2485edf0433bcd0037fbd2a7e6851c9fa7d3285056d30193e","323c2d2acc276d554fff791a55433159d117aa9662ac861090a2426fa1d01ab2","ecb626a33e299fc633fdab872d726f7de7abe01e7dade946a7d0b2572854aa0a","b66bda369763090577e770ab5ba3adbaba74f25b2560d5131b4448a03e004f89","9de2b351d62216e6b894c2e8ccb9b1a44ba320afca185d071ae1e63e608b8d8d","6a1a11860069ab718960e14c936567b39e4c66d8e650e94ba4d8da60415f0a33","84f576c5d9942a70efa2b4d14c8a805134f0bb3364535964b6d9eddf94219408","84d0c690923e92fa502a2463c099f3a6a272d2f3ba3e6dedab82aa30c3d069d0","cf49d08267c66f93e5e86e2e0137f85220e525f57fa93da5b3510dae11e6ba6d","0f988bd62f9188817239c3f2793995f642aa24f6e676296777e817fae7e8a5e3","6e2ea43283fbf89bc6c98a3171a817f3163b9fb77ef16411c7f44b72e25e3bfe",{"version":"d3b4dd0e6b31c235dc28bf9ee98c59002cff56c7183dc1262da0b32c8f87c14d","affectsGlobalScope":true},{"version":"e4982797f54beb9680b644655c6dd4c4a48688dffb634970209f6b10072418c0","signature":"f34255c43f2fd558c090437165dd8dabfab9ac5aeb7d4cf8f1d1a040c421221a"},"d63e226ed2d1b669e78126b7b236c4e0a24b60c6b107d1f5f0cb9890093c8bc9","2bfe41d8d4b29793fdf1cd2958ac545d114f52c7ec8020b2bbcfd4089eda297f",{"version":"fcea8f6593b05297d5b3bd216eb65da189f4b57e0869862782698cab1d46f299","signature":"1c1fe706b86b1a79795828930611cd58301a60118058a7b6d51f7b8134a78f72"},{"version":"9b059a32ce37dbec06cd81c1e4499eb604b55624d39a83455e76cb59c39005a9","signature":"e15bb1842f43487e53a7fa286108062683b79605a8598de32cb1932484d92aa8"},"5425d93619916e17da6fd90ecddb6eecee916eba9d2f4aed281b2e874a3c119e","0e0b0baaf6e3845418c2741c9b47478cf6fc086ef8dd5ad4b9ab91499e51de28","ca6e8a62a3e4f5cc3fea6ab45c2e5e128db4d90d81d70547a65047e3f13996f1","e432b56911b58550616fc4d54c1606f65fe98c74875b81d74601f5f965767c60","cc957354aa3c94c9961ebf46282cfde1e81d107fc5785a61f62c67f1dd3ac2eb","a46a2e69d12afe63876ec1e58d70e5dbee6d3e74132f4468f570c3d69f809f1c","93de1c6dab503f053efe8d304cb522bb3a89feab8c98f307a674a4fae04773e9","fc72135da24040641388fb5f2c2a7a99aa5b962c0fa125bd96fabeec63dd2e63","5426e62886b7be7806312d31a00e8f7dccd6fe63ba9bbefe99ee2eab29cc48a3","3ebae8c00411116a66fca65b08228ea0cf0b72724701f9b854442100aab55aba","8b06ac3faeacb8484d84ddb44571d8f410697f98d7bfa86c0fda60373a9f5215","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322","462bccdf75fcafc1ae8c30400c9425e1a4681db5d605d1a0edb4f990a54d8094","5923d8facbac6ecf7c84739a5c701a57af94a6f6648d6229a6c768cf28f0f8cb","7adecb2c3238794c378d336a8182d4c3dd2c4fa6fa1785e2797a3db550edea62","dc12dc0e5aa06f4e1a7692149b78f89116af823b9e1f1e4eae140cd3e0e674e6","1bfc6565b90c8771615cd8cfcf9b36efc0275e5e83ac7d9181307e96eb495161","8a8a96898906f065f296665e411f51010b51372fa260d5373bf9f64356703190","7f82ef88bdb67d9a850dd1c7cd2d690f33e0f0acd208e3c9eba086f3670d4f73",{"version":"4564f780fd20582c57ae218a4cd017717181ab0e228639d905ef054288655b5e","affectsGlobalScope":true},"f3e604694b624fa3f83f6684185452992088f5efb2cf136b62474aa106d6f1b6","96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05","736097ddbb2903bef918bb3b5811ef1c9c5656f2a73bd39b22a91b9cc2525e50","208bb742e0f201470da121bc73847c74b62cff4172f38ae5949ae77d6c9c6b71","3663d1b50f356656a314e5df169bb51cb9d5fd75905fa703f75db6bb32030568","6fa0008bf91a4cc9c8963bace4bba0bd6865cbfa29c3e3ccc461155660fb113a","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","f1d8b21cdf08726021c8cce0cd6159486236cf1d633eeabbc435b5b2e5869c2e","dd432baba70577d8ef35db945b4e5e536013d73e3e8595683aafc277bf226f75","b0d10e46cfe3f6c476b69af02eaa38e4ccc7430221ce3109ae84bb9fb8282298","48220b3395376205a0938f3f23c363a1084e86534caaec82b885efb1e0407408","70e9a18da08294f75bf23e46c7d69e67634c0765d355887b9b41f0d959e1426e","105b9a2234dcb06ae922f2cd8297201136d416503ff7d16c72bfc8791e9895c1","65dfa4bc49ccd1355789abb6ae215b302a5b050fdee9651124fe7e826f33113c"],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"declarationMap":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"importsNotUsedAsValues":0,"module":1,"newLine":1,"noEmitHelpers":true,"noFallthroughCasesInSwitch":true,"noImplicitOverride":true,"noImplicitReturns":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","preserveConstEnums":true,"removeComments":false,"skipLibCheck":true,"sourceMap":true,"strict":true,"target":7,"useDefineForClassFields":true},"fileIdsList":[[103,214],[103],[76,103,110,212],[103,214,215,216,217,218],[103,214,216],[76,103,110],[103,221],[103,222],[103,227,232],[78,102,103,110,238,239],[60,103],[63,103],[64,69,103],[65,75,76,83,92,102,103],[65,66,75,83,103],[67,103],[68,69,76,84,103],[69,92,99,103],[70,72,75,83,103],[71,103],[72,73,103],[74,75,103],[75,103],[75,76,77,92,102,103],[75,76,77,92,103],[103,107],[78,83,92,102,103],[75,76,78,79,83,92,99,102,103],[78,80,92,99,102,103],[60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109],[75,81,103],[82,102,103],[72,75,83,92,103],[84,103],[85,103],[63,86,103],[87,101,103,107],[88,103],[89,103],[75,90,103],[90,91,103,105],[75,92,93,94,103],[92,94,103],[92,93,103],[95,103],[96,103],[75,97,98,103],[97,98,103],[69,83,92,99,103],[100,103],[83,101,103],[64,78,89,102,103],[69,103],[92,103,104],[103,105],[103,106],[64,69,75,77,86,92,102,103,105,107],[92,103,108],[65,103,110],[103,247],[75,92,103,110],[78,92,103,110],[103,225,228],[103,225,228,229,230],[103,227],[103,224,231],[58,59,103,201,202,203],[103,201,204],[58,59,103,110,183,184,185,186,187,188,190,191,192,193,194,195,196,197,198,199,200],[58,59,103,204],[59,103],[58,59,103],[103,204],[58,59,103,189],[58,103,204],[59,103,183],[103,111,112,113,114,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182],[103,135],[103,135,148],[103,157,158],[103,159],[103,116,137],[103,137],[103,157],[103,162],[103,146],[103,111,115],[103,115],[103,154,157,158],[103,111],[103,130],[103,113],[103,166],[103,164],[103,116,117],[103,118],[103,128],[103,168],[103,116],[103,162,171,174],[103,226],[56,103],[54,103],[54,55,57,103,204,206,207,208],[54,103,209,210],[54,55,103,205,209],[55,204],[209]],"referencedMap":[[216,1],[214,2],[213,3],[212,2],[219,4],[215,1],[217,5],[218,1],[220,6],[221,2],[222,7],[223,8],[233,9],[234,2],[235,2],[236,2],[237,2],[239,2],[240,10],[60,11],[61,11],[63,12],[64,13],[65,14],[66,15],[67,16],[68,17],[69,18],[70,19],[71,20],[72,21],[73,21],[74,22],[75,23],[76,24],[77,25],[62,26],[109,2],[78,27],[79,28],[80,29],[110,30],[81,31],[82,32],[83,33],[84,34],[85,35],[86,36],[87,37],[88,38],[89,39],[90,40],[91,41],[92,42],[94,43],[93,44],[95,45],[96,46],[97,47],[98,48],[99,49],[100,50],[101,51],[102,52],[103,53],[104,54],[105,55],[106,56],[107,57],[108,58],[241,2],[242,2],[243,2],[244,59],[245,2],[246,2],[247,2],[248,60],[249,61],[205,2],[224,2],[238,62],[225,2],[229,63],[231,64],[230,63],[228,65],[232,66],[203,2],[204,67],[202,68],[201,69],[200,70],[198,71],[188,72],[58,73],[186,71],[187,71],[199,71],[191,71],[192,71],[193,71],[185,71],[190,74],[59,75],[195,71],[184,71],[197,76],[194,71],[196,71],[189,73],[183,77],[136,78],[149,79],[113,2],[159,80],[161,81],[160,81],[138,82],[137,2],[139,83],[162,84],[166,85],[164,85],[147,86],[146,2],[155,87],[116,88],[142,2],[179,89],[174,88],[115,90],[131,91],[145,2],[176,2],[150,92],[163,85],[167,93],[165,94],[180,2],[152,2],[128,90],[121,2],[120,95],[143,88],[144,88],[119,96],[153,2],[114,2],[130,2],[181,97],[126,88],[168,81],[170,98],[169,98],[111,2],[129,2],[135,2],[127,88],[156,2],[125,2],[178,2],[124,2],[122,99],[123,2],[151,2],[175,100],[132,95],[133,95],[148,2],[117,2],[171,85],[173,93],[172,94],[158,2],[154,2],[141,2],[177,2],[182,2],[112,2],[140,2],[157,2],[134,2],[118,95],[227,101],[226,2],[54,2],[11,2],[13,2],[12,2],[2,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[20,2],[21,2],[3,2],[4,2],[25,2],[22,2],[23,2],[24,2],[26,2],[27,2],[28,2],[5,2],[29,2],[30,2],[31,2],[32,2],[6,2],[33,2],[34,2],[35,2],[36,2],[7,2],[37,2],[42,2],[43,2],[38,2],[39,2],[40,2],[41,2],[8,2],[47,2],[44,2],[45,2],[46,2],[48,2],[9,2],[49,2],[50,2],[51,2],[52,2],[1,2],[10,2],[53,2],[56,2],[57,102],[55,103],[208,2],[207,2],[209,104],[211,105],[210,103],[206,106]],"exportedModulesMap":[[216,1],[214,2],[213,3],[212,2],[219,4],[215,1],[217,5],[218,1],[220,6],[221,2],[222,7],[223,8],[233,9],[234,2],[235,2],[236,2],[237,2],[239,2],[240,10],[60,11],[61,11],[63,12],[64,13],[65,14],[66,15],[67,16],[68,17],[69,18],[70,19],[71,20],[72,21],[73,21],[74,22],[75,23],[76,24],[77,25],[62,26],[109,2],[78,27],[79,28],[80,29],[110,30],[81,31],[82,32],[83,33],[84,34],[85,35],[86,36],[87,37],[88,38],[89,39],[90,40],[91,41],[92,42],[94,43],[93,44],[95,45],[96,46],[97,47],[98,48],[99,49],[100,50],[101,51],[102,52],[103,53],[104,54],[105,55],[106,56],[107,57],[108,58],[241,2],[242,2],[243,2],[244,59],[245,2],[246,2],[247,2],[248,60],[249,61],[205,2],[224,2],[238,62],[225,2],[229,63],[231,64],[230,63],[228,65],[232,66],[203,2],[204,67],[202,68],[201,69],[200,70],[198,71],[188,72],[58,73],[186,71],[187,71],[199,71],[191,71],[192,71],[193,71],[185,71],[190,74],[59,75],[195,71],[184,71],[197,76],[194,71],[196,71],[189,73],[183,77],[136,78],[149,79],[113,2],[159,80],[161,81],[160,81],[138,82],[137,2],[139,83],[162,84],[166,85],[164,85],[147,86],[146,2],[155,87],[116,88],[142,2],[179,89],[174,88],[115,90],[131,91],[145,2],[176,2],[150,92],[163,85],[167,93],[165,94],[180,2],[152,2],[128,90],[121,2],[120,95],[143,88],[144,88],[119,96],[153,2],[114,2],[130,2],[181,97],[126,88],[168,81],[170,98],[169,98],[111,2],[129,2],[135,2],[127,88],[156,2],[125,2],[178,2],[124,2],[122,99],[123,2],[151,2],[175,100],[132,95],[133,95],[148,2],[117,2],[171,85],[173,93],[172,94],[158,2],[154,2],[141,2],[177,2],[182,2],[112,2],[140,2],[157,2],[134,2],[118,95],[227,101],[226,2],[54,2],[11,2],[13,2],[12,2],[2,2],[14,2],[15,2],[16,2],[17,2],[18,2],[19,2],[20,2],[21,2],[3,2],[4,2],[25,2],[22,2],[23,2],[24,2],[26,2],[27,2],[28,2],[5,2],[29,2],[30,2],[31,2],[32,2],[6,2],[33,2],[34,2],[35,2],[36,2],[7,2],[37,2],[42,2],[43,2],[38,2],[39,2],[40,2],[41,2],[8,2],[47,2],[44,2],[45,2],[46,2],[48,2],[9,2],[49,2],[50,2],[51,2],[52,2],[1,2],[10,2],[53,2],[56,2],[57,102],[208,2],[207,2],[209,107],[211,105],[206,108]],"semanticDiagnosticsPerFile":[216,214,213,212,219,215,217,218,220,221,222,223,233,234,235,236,237,239,240,60,61,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,62,109,78,79,80,110,81,82,83,84,85,86,87,88,89,90,91,92,94,93,95,96,97,98,99,100,101,102,103,104,105,106,107,108,241,242,243,244,245,246,247,248,249,205,224,238,225,229,231,230,228,232,203,204,202,201,200,198,188,58,186,187,199,191,192,193,185,190,59,195,184,197,194,196,189,183,136,149,113,159,161,160,138,137,139,162,166,164,147,146,155,116,142,179,174,115,131,145,176,150,163,167,165,180,152,128,121,120,143,144,119,153,114,130,181,126,168,170,169,111,129,135,127,156,125,178,124,122,123,151,175,132,133,148,117,171,173,172,158,154,141,177,182,112,140,157,134,118,227,226,54,11,13,12,2,14,15,16,17,18,19,20,21,3,4,25,22,23,24,26,27,28,5,29,30,31,32,6,33,34,35,36,7,37,42,43,38,39,40,41,8,47,44,45,46,48,9,49,50,51,52,1,10,53,56,57,55,208,207,209,211,210,206]},"version":"4.7.2"}
package/utils.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ import { BrowserName, BrowserSpecification } from './header-generator';
2
+ export declare const getUserAgent: (headers: Record<string, string>) => string | undefined;
3
+ export declare const getBrowser: (userAgent?: string) => BrowserName | undefined;
4
+ export declare const getBrowsersFromQuery: (browserListQuery: string) => BrowserSpecification[];
5
+ export declare const shuffleArray: (array: any[]) => any[];
6
+ //# sourceMappingURL=utils.d.ts.map
package/utils.d.ts.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAEvE,eAAO,MAAM,YAAY,YAAa,OAAO,MAAM,EAAE,MAAM,CAAC,KAAG,MAAM,GAAG,SAOvE,CAAC;AAEF,eAAO,MAAM,UAAU,eAAgB,MAAM,KAAG,WAAW,GAAG,SAe7D,CAAC;AAiDF,eAAO,MAAM,oBAAoB,qBAAsB,MAAM,KAAG,oBAAoB,EAInF,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,GAAG,EAAE,KAAG,GAAG,EAO9C,CAAC"}
package/utils.js ADDED
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.shuffleArray = exports.getBrowsersFromQuery = exports.getBrowser = exports.getUserAgent = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const browserslist_1 = tslib_1.__importDefault(require("browserslist"));
6
+ const constants_1 = require("./constants");
7
+ const getUserAgent = (headers) => {
8
+ for (const [header, value] of Object.entries(headers)) {
9
+ if (header.toLowerCase() === 'user-agent') {
10
+ return value;
11
+ }
12
+ }
13
+ return undefined;
14
+ };
15
+ exports.getUserAgent = getUserAgent;
16
+ const getBrowser = (userAgent) => {
17
+ if (!userAgent) {
18
+ return undefined;
19
+ }
20
+ let browser;
21
+ if (userAgent.includes('Firefox')) {
22
+ browser = 'firefox';
23
+ }
24
+ else if (userAgent.includes('Chrome')) {
25
+ browser = 'chrome';
26
+ }
27
+ else {
28
+ browser = 'safari';
29
+ }
30
+ return browser;
31
+ };
32
+ exports.getBrowser = getBrowser;
33
+ const getBrowsersWithVersions = (browserList) => {
34
+ const browsersWithVersions = {};
35
+ for (const browserDefinition of browserList) {
36
+ const [browserSplit, versionString] = browserDefinition.split(' ');
37
+ const browser = browserSplit;
38
+ const version = parseInt(versionString, 10);
39
+ if (!constants_1.SUPPORTED_BROWSERS.includes(browser)) {
40
+ // eslint-disable-next-line no-continue
41
+ continue;
42
+ }
43
+ if (browsersWithVersions[browser]) {
44
+ browsersWithVersions[browser].push(version);
45
+ }
46
+ else {
47
+ browsersWithVersions[browser] = [version];
48
+ }
49
+ }
50
+ return browsersWithVersions;
51
+ };
52
+ const getOptimizedVersionDistribution = (browsersWithVersions) => {
53
+ const finalOptimizedBrowsers = [];
54
+ Object.entries(browsersWithVersions).forEach(([browser, versions]) => {
55
+ const sortedVersions = versions.sort((a, b) => a - b);
56
+ let lowestVersionSoFar = sortedVersions[0];
57
+ sortedVersions.forEach((version, index) => {
58
+ const nextVersion = sortedVersions[index + 1];
59
+ const isLast = index === sortedVersions.length - 1;
60
+ const isNextVersionGap = nextVersion - version > 1;
61
+ if (isNextVersionGap || isLast) {
62
+ finalOptimizedBrowsers.push({
63
+ name: browser,
64
+ minVersion: lowestVersionSoFar,
65
+ maxVersion: version,
66
+ });
67
+ lowestVersionSoFar = nextVersion;
68
+ }
69
+ });
70
+ });
71
+ return finalOptimizedBrowsers;
72
+ };
73
+ const getBrowsersFromQuery = (browserListQuery) => {
74
+ const browserList = (0, browserslist_1.default)(browserListQuery);
75
+ const browsersWithVersions = getBrowsersWithVersions(browserList);
76
+ return getOptimizedVersionDistribution(browsersWithVersions);
77
+ };
78
+ exports.getBrowsersFromQuery = getBrowsersFromQuery;
79
+ const shuffleArray = (array) => {
80
+ for (let i = array.length - 1; i > 0; i--) {
81
+ const j = Math.floor(Math.random() * (i + 1));
82
+ [array[i], array[j]] = [array[j], array[i]];
83
+ }
84
+ return array;
85
+ };
86
+ exports.shuffleArray = shuffleArray;
87
+ //# sourceMappingURL=utils.js.map
package/utils.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;;AAAA,wEAAwC;AACxC,2CAAiD;AAG1C,MAAM,YAAY,GAAG,CAAC,OAA+B,EAAsB,EAAE;IAChF,KAAK,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QACnD,IAAI,MAAM,CAAC,WAAW,EAAE,KAAK,YAAY,EAAE;YACvC,OAAO,KAAK,CAAC;SAChB;KACJ;IACD,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC;AAPW,QAAA,YAAY,gBAOvB;AAEK,MAAM,UAAU,GAAG,CAAC,SAAkB,EAA2B,EAAE;IACtE,IAAI,CAAC,SAAS,EAAE;QACZ,OAAO,SAAS,CAAC;KACpB;IAED,IAAI,OAAO,CAAC;IACZ,IAAI,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,EAA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