summaryrefslogtreecommitdiff
path: root/raveos-app-installer/data/configs/vivaldi/Default/Extensions/bgnkhhnnamicmpeenaelnjfhikgbkllg/5.5.2.40_0/vendors/dnr-converter.js
blob: 6dd68eea1f748bc1bca70f693c4437205cfe4362 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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
110
111
112
113
114
115
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
157
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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
"use strict";
(self["webpackChunkbrowser_extension"] = self["webpackChunkbrowser_extension"] || []).push([["471"], {
64413(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
__webpack_require__.d(__webpack_exports__, {
  _: () => (ModifyHeaderInfoValidator)
});
/* import */ var valibot__rspack_import_1 = __webpack_require__(71299);
/* import */ var _utils_valibot_js__rspack_import_0 = __webpack_require__(71745);



/**
 * Enum that represents the possible operations for a header modification.
 *
 * @see {@link https://developer.chrome.com/docs/extensions/reference/declarativeNetRequest/#type-HeaderOperation}
 *
 * @since Chrome 86
 */ var HeaderOperation = /*#__PURE__*/ function(HeaderOperation) {
    /**
     * Adds a new entry for the specified header.
     * This operation is not supported for request headers.
     */ HeaderOperation["Append"] = "append";
    /**
     * Sets a new value for the specified header, removing any existing headers with the same name.
     */ HeaderOperation["Set"] = "set";
    /**
     * Removes all entries for the specified header.
     */ HeaderOperation["Remove"] = "remove";
    return HeaderOperation;
}({});
/**
 * Validator for {@link ModifyHeaderInfo}.
 */ const ModifyHeaderInfoValidator = (0,_utils_valibot_js__rspack_import_0/* .strictObjectByType */.A)({
    header: valibot__rspack_import_1/* .string */.YjP(),
    operation: valibot__rspack_import_1/* ["enum"] */.k5n(HeaderOperation),
    value: valibot__rspack_import_1/* .optional */.lqM(valibot__rspack_import_1/* .string */.YjP())
});




},
34086(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
__webpack_require__.d(__webpack_exports__, {
  V: () => (QueryKeyValueValidator)
});
/* import */ var valibot__rspack_import_1 = __webpack_require__(71299);
/* import */ var _utils_valibot_js__rspack_import_0 = __webpack_require__(71745);



/**
 * Validator for {@link QueryKeyValue}.
 */ const QueryKeyValueValidator = (0,_utils_valibot_js__rspack_import_0/* .strictObjectByType */.A)({
    key: valibot__rspack_import_1/* .string */.YjP(),
    replaceOnly: valibot__rspack_import_1/* .optional */.lqM(valibot__rspack_import_1/* .boolean */.zMY()),
    value: valibot__rspack_import_1/* .string */.YjP()
});




},
10197(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
__webpack_require__.d(__webpack_exports__, {
  T: () => (QueryTransformValidator)
});
/* import */ var valibot__rspack_import_1 = __webpack_require__(71299);
/* import */ var _utils_valibot_js__rspack_import_0 = __webpack_require__(71745);
/* import */ var _query_key_value_js__rspack_import_2 = __webpack_require__(34086);




/**
 * Validator for {@link QueryTransform}.
 */ const QueryTransformValidator = (0,_utils_valibot_js__rspack_import_0/* .strictObjectByType */.A)({
    addOrReplaceParams: valibot__rspack_import_1/* .optional */.lqM(valibot__rspack_import_1/* .array */.YOg(_query_key_value_js__rspack_import_2/* .QueryKeyValueValidator */.V)),
    removeParams: valibot__rspack_import_1/* .optional */.lqM(valibot__rspack_import_1/* .array */.YOg(valibot__rspack_import_1/* .string */.YjP()))
});




},
42002(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
__webpack_require__.d(__webpack_exports__, {
  T: () => (RedirectValidator)
});
/* import */ var valibot__rspack_import_1 = __webpack_require__(71299);
/* import */ var _utils_valibot_js__rspack_import_0 = __webpack_require__(71745);
/* import */ var _url_transform_js__rspack_import_2 = __webpack_require__(56348);




/**
 * Validator for {@link Redirect}.
 */ const RedirectValidator = (0,_utils_valibot_js__rspack_import_0/* .strictObjectByType */.A)({
    extensionPath: valibot__rspack_import_1/* .optional */.lqM(valibot__rspack_import_1/* .string */.YjP()),
    regexSubstitution: valibot__rspack_import_1/* .optional */.lqM(valibot__rspack_import_1/* .string */.YjP()),
    transform: valibot__rspack_import_1/* .optional */.lqM(_url_transform_js__rspack_import_2/* .URLTransformValidator */.W),
    url: valibot__rspack_import_1/* .optional */.lqM(valibot__rspack_import_1/* .string */.YjP())
});




},
2767(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
__webpack_require__.d(__webpack_exports__, {
  J: () => (RuleActionType)
});
/* import */ var valibot__rspack_import_1 = __webpack_require__(71299);
/* import */ var _utils_valibot_js__rspack_import_0 = __webpack_require__(71745);
/* import */ var _modify_header_info_js__rspack_import_3 = __webpack_require__(64413);
/* import */ var _redirect_js__rspack_import_2 = __webpack_require__(42002);





/**
 * Enum that represents the kind of action to take if a given condition matches.
 *
 * @see {@link https://developer.chrome.com/docs/extensions/reference/declarativeNetRequest/#type-RuleActionType}
 */ var RuleActionType = /*#__PURE__*/ function(RuleActionType) {
    /**
     * Block the network request.
     */ RuleActionType["Block"] = "block";
    /**
     * Redirect the network request.
     */ RuleActionType["Redirect"] = "redirect";
    /**
     * Allow the network request.
     *
     * The request won't be intercepted if there is an allow rule which matches it.
     */ RuleActionType["Allow"] = "allow";
    /**
     * Upgrade the network request url's scheme to `https` if the request is `http` or `ftp`.
     */ RuleActionType["UpgradeScheme"] = "upgradeScheme";
    /**
     * Modify request/response headers from the network request.
     *
     * @since Chrome 86
     */ RuleActionType["ModifyHeaders"] = "modifyHeaders";
    /**
     * Allow all requests within a frame hierarchy, including the frame request itself.
     */ RuleActionType["AllowAllRequests"] = "allowAllRequests";
    return RuleActionType;
}({});
/**
 * Validator for {@link RuleAction}.
 */ const RuleActionValidator = (0,_utils_valibot_js__rspack_import_0/* .strictObjectByType */.A)({
    redirect: valibot__rspack_import_1/* .optional */.lqM(_redirect_js__rspack_import_2/* .RedirectValidator */.T),
    requestHeaders: valibot__rspack_import_1/* .optional */.lqM(valibot__rspack_import_1/* .array */.YOg(_modify_header_info_js__rspack_import_3/* .ModifyHeaderInfoValidator */._)),
    responseHeaders: valibot__rspack_import_1/* .optional */.lqM(valibot__rspack_import_1/* .array */.YOg(_modify_header_info_js__rspack_import_3/* .ModifyHeaderInfoValidator */._)),
    type: valibot__rspack_import_1/* ["enum"] */.k5n(RuleActionType)
});




},
56348(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
__webpack_require__.d(__webpack_exports__, {
  W: () => (URLTransformValidator)
});
/* import */ var valibot__rspack_import_1 = __webpack_require__(71299);
/* import */ var _utils_valibot_js__rspack_import_0 = __webpack_require__(71745);
/* import */ var _query_transform_js__rspack_import_2 = __webpack_require__(10197);




/**
 * Enum that represents URL transformation schemes.
 *
 * @see {@link https://developer.chrome.com/docs/extensions/reference/declarativeNetRequest/#type-URLTransform}
 */ var URLTransformScheme = /*#__PURE__*/ function(URLTransformScheme) {
    URLTransformScheme["Http"] = "http";
    URLTransformScheme["Https"] = "https";
    URLTransformScheme["Ftp"] = "ftp";
    URLTransformScheme["ChromeExtension"] = "chrome-extension";
    return URLTransformScheme;
}({});
/**
 * Validator for {@link URLTransform}.
 */ const URLTransformValidator = (0,_utils_valibot_js__rspack_import_0/* .strictObjectByType */.A)({
    fragment: valibot__rspack_import_1/* .optional */.lqM(valibot__rspack_import_1/* .string */.YjP()),
    host: valibot__rspack_import_1/* .optional */.lqM(valibot__rspack_import_1/* .string */.YjP()),
    password: valibot__rspack_import_1/* .optional */.lqM(valibot__rspack_import_1/* .string */.YjP()),
    path: valibot__rspack_import_1/* .optional */.lqM(valibot__rspack_import_1/* .string */.YjP()),
    port: valibot__rspack_import_1/* .optional */.lqM(valibot__rspack_import_1/* .string */.YjP()),
    query: valibot__rspack_import_1/* .optional */.lqM(valibot__rspack_import_1/* .string */.YjP()),
    queryTransform: valibot__rspack_import_1/* .optional */.lqM(_query_transform_js__rspack_import_2/* .QueryTransformValidator */.T),
    scheme: valibot__rspack_import_1/* .optional */.lqM(valibot__rspack_import_1/* ["enum"] */.k5n(URLTransformScheme)),
    username: valibot__rspack_import_1/* .optional */.lqM(valibot__rspack_import_1/* .string */.YjP())
});




},
10540() {
































},
71745(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
__webpack_require__.d(__webpack_exports__, {
  A: () => (strictObjectByType)
});
/* import */ var valibot__rspack_import_0 = __webpack_require__(71299);


/**
 * Creates a strict object schema by validating the entries against the expected type.
 *
 * @template TExpected The expected type for the object schema.
 * @template TEntries The entries of the object schema.
 *
 * @see {@link strictObject}
 *
 * @param entries The entries schema.
 *
 * @returns A strict object schema.
 *
 * @example
 * ```ts
 * // Valid case
 * interface ValidExample {
 *     foo: string;
 * }
 *
 * const ValidExampleValidator = strictObjectByType<ValidExample>({
 *     foo: v.string(),
 * });
 *
 * // Invalid case
 * interface InvalidExample {
 *     foo: string;
 *     bar: number;
 * }
 *
 * const InvalidExampleValidator = strictObjectByType<InvalidExample>({
 *     foo: v.string(),
 *     baz: v.boolean(), // Error: Does not match the expected type
 *     // Error: Property 'bar' is missing
 * });
 * ```
 */ function strictObjectByType(entries) {
    return (0,valibot__rspack_import_0/* .strictObject */.rej)(entries);
}
/**
 * Recursively extracts message from Valibot issue.
 *
 * @param issue Valibot's {@link BaseIssue}.
 * @param nesting Nesting level prefix (e.g. `'1'`, `'1.1'`).
 *
 * @returns Message extracted from the issue and its sub-issues.
 */ function extractMessageFromValiIssue(issue, nesting) {
    const type = `Type: "${issue.type}"`;
    const message = `Message: "${issue.message}"`;
    const path = `Path: "${getDotPath(issue)}"`;
    const messages = [
        `${nesting}. ${type} | ${message} | ${path}`
    ];
    if (issue.issues && issue.issues.length > 0) {
        const nestedMessages = issue.issues.map((subIssue, i)=>extractMessageFromValiIssue(subIssue, `${nesting}.${i + 1}`));
        messages.push(...nestedMessages);
    }
    return messages.join('\n');
}
/**
 * Extracts message from Valibot error.
 *
 * @param error Valibot's {@link ValiError}.
 *
 * @returns Message extracted from the error issues and its sub-issues.
 */ function extractMessageFromValiError(error) {
    if (error.issues.length === 0) {
        return error.message;
    }
    return error.issues.map((issue, i)=>extractMessageFromValiIssue(issue, `${i + 1}`)).join('\n');
}




},

},function(__webpack_require__) {
var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId) }
__webpack_require__.O(0, ["272","733",], function() {
        return __webpack_exec__(10540);
      });
var __webpack_exports__ = __webpack_require__.O();

}
]);