vviinn-widgets 2.4.2 → 2.4.3

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.
Files changed (93) hide show
  1. package/dist/cjs/Handler-d1a8a86a.js +329 -0
  2. package/dist/cjs/{app-globals-d999d944.js → app-globals-474864e0.js} +1 -1
  3. package/dist/cjs/cropper-handler.cjs.entry.js +27 -0
  4. package/dist/cjs/{customized-slots-90e8e849.js → customized-slots-0aa6c3d6.js} +1 -1
  5. package/dist/cjs/{cropper-handler_27.cjs.entry.js → highlight-box_22.cjs.entry.js} +85 -469
  6. package/dist/cjs/{index-c0d08aca.js → imageSearch.store-076370bf.js} +10575 -14822
  7. package/dist/cjs/index-34d20028.js +3222 -0
  8. package/dist/cjs/{index-e8cf5dc5.js → index-61403ab1.js} +1 -1
  9. package/dist/cjs/{index-53400160.js → index-a87f1a44.js} +1 -1
  10. package/dist/cjs/loader.cjs.js +3 -3
  11. package/dist/cjs/{vviinn-carousel_2.cjs.entry.js → vviinn-carousel_3.cjs.entry.js} +212 -25
  12. package/dist/cjs/vviinn-error.cjs.entry.js +19 -0
  13. package/dist/cjs/vviinn-preloader.cjs.entry.js +26 -0
  14. package/dist/cjs/vviinn-recommendations-sidebar.cjs.entry.js +2 -2
  15. package/dist/cjs/vviinn-vpr-button.cjs.entry.js +2 -2
  16. package/dist/cjs/vviinn-vps-button.cjs.entry.js +3 -3
  17. package/dist/cjs/vviinn-vps-widget.cjs.entry.js +162 -0
  18. package/dist/cjs/vviinn-widgets.cjs.js +3 -3
  19. package/dist/collection/components/image-search/search-filters/search-filters.js +1 -1
  20. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +3 -0
  21. package/dist/collection/openApi/index.js +1 -1
  22. package/dist/esm/Handler-639a4cb3.js +308 -0
  23. package/dist/esm/{app-globals-f91c6f94.js → app-globals-3888cd41.js} +1 -1
  24. package/dist/esm/cropper-handler.entry.js +23 -0
  25. package/dist/esm/{customized-slots-7be7f3b8.js → customized-slots-863113e2.js} +1 -1
  26. package/dist/esm/{cropper-handler_27.entry.js → highlight-box_22.entry.js} +21 -400
  27. package/dist/esm/{index-840ec915.js → imageSearch.store-b516d12e.js} +10749 -14986
  28. package/dist/esm/index-2f8fb0fe.js +3213 -0
  29. package/dist/esm/{index-00c7b7c2.js → index-36978848.js} +2 -2
  30. package/dist/esm/{index-d7147986.js → index-56c062df.js} +1 -1
  31. package/dist/esm/loader.js +3 -3
  32. package/dist/esm/{vviinn-carousel_2.entry.js → vviinn-carousel_3.entry.js} +190 -4
  33. package/dist/esm/vviinn-error.entry.js +15 -0
  34. package/dist/esm/vviinn-preloader.entry.js +22 -0
  35. package/dist/esm/vviinn-recommendations-sidebar.entry.js +2 -2
  36. package/dist/esm/vviinn-vpr-button.entry.js +2 -2
  37. package/dist/esm/vviinn-vps-button.entry.js +3 -3
  38. package/dist/esm/vviinn-vps-widget.entry.js +158 -0
  39. package/dist/esm/vviinn-widgets.js +3 -3
  40. package/dist/types/components/image-search/search-filters/search-filters.d.ts +1 -1
  41. package/dist/types/components/vviinn-vpr-widget/vviinn-vpr-vidget.d.ts +1 -1
  42. package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +2 -1
  43. package/dist/types/components.d.ts +1 -1
  44. package/dist/types/openApi/index.d.ts +2 -2
  45. package/dist/types/tracking/event.d.ts +1 -1
  46. package/dist/types/tracking/index.d.ts +8 -8
  47. package/dist/types/tracking/models.d.ts +1 -1
  48. package/dist/vviinn-widgets/{p-2d4cb17f.entry.js → p-0a9cee09.entry.js} +1 -1
  49. package/dist/vviinn-widgets/p-28678772.js +1 -0
  50. package/dist/vviinn-widgets/{p-07d8ba79.entry.js → p-2e6ecda7.entry.js} +1 -1
  51. package/dist/vviinn-widgets/{p-dc2da207.js → p-47183c9a.js} +1 -1
  52. package/dist/vviinn-widgets/p-535611cd.entry.js +1 -0
  53. package/dist/vviinn-widgets/p-606ff863.js +1 -0
  54. package/dist/vviinn-widgets/p-9cc6f0dd.entry.js +1 -0
  55. package/{www/build/p-ce96f232.js → dist/vviinn-widgets/p-ac0a2989.js} +1 -1
  56. package/dist/vviinn-widgets/p-ad29e9c5.entry.js +1 -0
  57. package/{www/build/p-a66512b2.js → dist/vviinn-widgets/p-b4caf042.js} +1 -1
  58. package/dist/vviinn-widgets/p-b547a6d0.entry.js +1 -0
  59. package/dist/vviinn-widgets/{p-7d5af04d.js → p-c853cba8.js} +1 -1
  60. package/dist/vviinn-widgets/p-d2097302.entry.js +1 -0
  61. package/dist/vviinn-widgets/p-d8d49616.entry.js +1 -0
  62. package/dist/vviinn-widgets/p-f582db5c.js +1 -0
  63. package/dist/vviinn-widgets/{p-9c7297c8.entry.js → p-f9410382.entry.js} +1 -1
  64. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  65. package/package.json +3 -3
  66. package/www/build/{p-2d4cb17f.entry.js → p-0a9cee09.entry.js} +1 -1
  67. package/www/build/p-28678772.js +1 -0
  68. package/www/build/{p-07d8ba79.entry.js → p-2e6ecda7.entry.js} +1 -1
  69. package/www/build/{p-dc2da207.js → p-47183c9a.js} +1 -1
  70. package/www/build/p-535611cd.entry.js +1 -0
  71. package/www/build/p-606ff863.js +1 -0
  72. package/www/build/p-7c313f33.js +125 -0
  73. package/www/build/p-9cc6f0dd.entry.js +1 -0
  74. package/{dist/vviinn-widgets/p-ce96f232.js → www/build/p-ac0a2989.js} +1 -1
  75. package/www/build/p-ad29e9c5.entry.js +1 -0
  76. package/{dist/vviinn-widgets/p-a66512b2.js → www/build/p-b4caf042.js} +1 -1
  77. package/www/build/p-b547a6d0.entry.js +1 -0
  78. package/www/build/{p-7d5af04d.js → p-c853cba8.js} +1 -1
  79. package/www/build/p-d2097302.entry.js +1 -0
  80. package/www/build/p-d8d49616.entry.js +1 -0
  81. package/www/build/p-e0153ae2.css +6 -0
  82. package/www/build/p-f582db5c.js +1 -0
  83. package/www/build/{p-9c7297c8.entry.js → p-f9410382.entry.js} +1 -1
  84. package/www/build/vviinn-widgets.esm.js +1 -1
  85. package/www/index.html +1 -1
  86. package/dist/vviinn-widgets/p-196479f9.js +0 -1
  87. package/dist/vviinn-widgets/p-ae524f97.entry.js +0 -1
  88. package/dist/vviinn-widgets/p-fce4183d.entry.js +0 -1
  89. package/www/build/p-196479f9.js +0 -1
  90. package/www/build/p-32bb0615.js +0 -1
  91. package/www/build/p-a67898be.css +0 -1
  92. package/www/build/p-ae524f97.entry.js +0 -1
  93. package/www/build/p-fce4183d.entry.js +0 -1
@@ -0,0 +1,3222 @@
1
+ 'use strict';
2
+
3
+ const imageSearch_store = require('./imageSearch.store-076370bf.js');
4
+
5
+ // Unique ID creation requires a high quality random # generator. In the browser we therefore
6
+ // require the crypto API and do not support built-in fallback to lower quality random number
7
+ // generators (like Math.random()).
8
+ var getRandomValues;
9
+ var rnds8 = new Uint8Array(16);
10
+ function rng() {
11
+ // lazy load so that environments that need to polyfill have a chance to do so
12
+ if (!getRandomValues) {
13
+ // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
14
+ // find the complete implementation of crypto (msCrypto) on IE11.
15
+ getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
16
+
17
+ if (!getRandomValues) {
18
+ throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
19
+ }
20
+ }
21
+
22
+ return getRandomValues(rnds8);
23
+ }
24
+
25
+ const REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
26
+
27
+ function validate(uuid) {
28
+ return typeof uuid === 'string' && REGEX.test(uuid);
29
+ }
30
+
31
+ /**
32
+ * Convert array of 16 byte values to UUID string format of the form:
33
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
34
+ */
35
+
36
+ var byteToHex = [];
37
+
38
+ for (var i = 0; i < 256; ++i) {
39
+ byteToHex.push((i + 0x100).toString(16).substr(1));
40
+ }
41
+
42
+ function stringify$1(arr) {
43
+ var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
44
+ // Note: Be careful editing this code! It's been tuned for performance
45
+ // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
46
+ var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
47
+ // of the following:
48
+ // - One or more input array values don't map to a hex octet (leading to
49
+ // "undefined" in the uuid)
50
+ // - Invalid input values for the RFC `version` or `variant` fields
51
+
52
+ if (!validate(uuid)) {
53
+ throw TypeError('Stringified UUID is invalid');
54
+ }
55
+
56
+ return uuid;
57
+ }
58
+
59
+ function v4(options, buf, offset) {
60
+ options = options || {};
61
+ var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
62
+
63
+ rnds[6] = rnds[6] & 0x0f | 0x40;
64
+ rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
65
+
66
+ if (buf) {
67
+ offset = offset || 0;
68
+
69
+ for (var i = 0; i < 16; ++i) {
70
+ buf[offset + i] = rnds[i];
71
+ }
72
+
73
+ return buf;
74
+ }
75
+
76
+ return stringify$1(rnds);
77
+ }
78
+
79
+ /**
80
+ * Check if we're required to add a port number.
81
+ *
82
+ * @see https://url.spec.whatwg.org/#default-port
83
+ * @param {Number|String} port Port number we need to check
84
+ * @param {String} protocol Protocol we need to check against.
85
+ * @returns {Boolean} Is it a default port for the given protocol
86
+ * @api private
87
+ */
88
+ var requiresPort = function required(port, protocol) {
89
+ protocol = protocol.split(':')[0];
90
+ port = +port;
91
+
92
+ if (!port) return false;
93
+
94
+ switch (protocol) {
95
+ case 'http':
96
+ case 'ws':
97
+ return port !== 80;
98
+
99
+ case 'https':
100
+ case 'wss':
101
+ return port !== 443;
102
+
103
+ case 'ftp':
104
+ return port !== 21;
105
+
106
+ case 'gopher':
107
+ return port !== 70;
108
+
109
+ case 'file':
110
+ return false;
111
+ }
112
+
113
+ return port !== 0;
114
+ };
115
+
116
+ var has = Object.prototype.hasOwnProperty
117
+ , undef;
118
+
119
+ /**
120
+ * Decode a URI encoded string.
121
+ *
122
+ * @param {String} input The URI encoded string.
123
+ * @returns {String|Null} The decoded string.
124
+ * @api private
125
+ */
126
+ function decode$1(input) {
127
+ try {
128
+ return decodeURIComponent(input.replace(/\+/g, ' '));
129
+ } catch (e) {
130
+ return null;
131
+ }
132
+ }
133
+
134
+ /**
135
+ * Attempts to encode a given input.
136
+ *
137
+ * @param {String} input The string that needs to be encoded.
138
+ * @returns {String|Null} The encoded string.
139
+ * @api private
140
+ */
141
+ function encode(input) {
142
+ try {
143
+ return encodeURIComponent(input);
144
+ } catch (e) {
145
+ return null;
146
+ }
147
+ }
148
+
149
+ /**
150
+ * Simple query string parser.
151
+ *
152
+ * @param {String} query The query string that needs to be parsed.
153
+ * @returns {Object}
154
+ * @api public
155
+ */
156
+ function querystring(query) {
157
+ var parser = /([^=?#&]+)=?([^&]*)/g
158
+ , result = {}
159
+ , part;
160
+
161
+ while (part = parser.exec(query)) {
162
+ var key = decode$1(part[1])
163
+ , value = decode$1(part[2]);
164
+
165
+ //
166
+ // Prevent overriding of existing properties. This ensures that build-in
167
+ // methods like `toString` or __proto__ are not overriden by malicious
168
+ // querystrings.
169
+ //
170
+ // In the case if failed decoding, we want to omit the key/value pairs
171
+ // from the result.
172
+ //
173
+ if (key === null || value === null || key in result) continue;
174
+ result[key] = value;
175
+ }
176
+
177
+ return result;
178
+ }
179
+
180
+ /**
181
+ * Transform a query string to an object.
182
+ *
183
+ * @param {Object} obj Object that should be transformed.
184
+ * @param {String} prefix Optional prefix.
185
+ * @returns {String}
186
+ * @api public
187
+ */
188
+ function querystringify(obj, prefix) {
189
+ prefix = prefix || '';
190
+
191
+ var pairs = []
192
+ , value
193
+ , key;
194
+
195
+ //
196
+ // Optionally prefix with a '?' if needed
197
+ //
198
+ if ('string' !== typeof prefix) prefix = '?';
199
+
200
+ for (key in obj) {
201
+ if (has.call(obj, key)) {
202
+ value = obj[key];
203
+
204
+ //
205
+ // Edge cases where we actually want to encode the value to an empty
206
+ // string instead of the stringified value.
207
+ //
208
+ if (!value && (value === null || value === undef || isNaN(value))) {
209
+ value = '';
210
+ }
211
+
212
+ key = encode(key);
213
+ value = encode(value);
214
+
215
+ //
216
+ // If we failed to encode the strings, we should bail out as we don't
217
+ // want to add invalid strings to the query.
218
+ //
219
+ if (key === null || value === null) continue;
220
+ pairs.push(key +'='+ value);
221
+ }
222
+ }
223
+
224
+ return pairs.length ? prefix + pairs.join('&') : '';
225
+ }
226
+
227
+ //
228
+ // Expose the module.
229
+ //
230
+ var stringify = querystringify;
231
+ var parse = querystring;
232
+
233
+ var querystringify_1 = {
234
+ stringify: stringify,
235
+ parse: parse
236
+ };
237
+
238
+ var controlOrWhitespace = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/
239
+ , CRHTLF = /[\n\r\t]/g
240
+ , slashes = /^[A-Za-z][A-Za-z0-9+-.]*:\/\//
241
+ , port = /:\d+$/
242
+ , protocolre = /^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i
243
+ , windowsDriveLetter = /^[a-zA-Z]:/;
244
+
245
+ /**
246
+ * Remove control characters and whitespace from the beginning of a string.
247
+ *
248
+ * @param {Object|String} str String to trim.
249
+ * @returns {String} A new string representing `str` stripped of control
250
+ * characters and whitespace from its beginning.
251
+ * @public
252
+ */
253
+ function trimLeft(str) {
254
+ return (str ? str : '').toString().replace(controlOrWhitespace, '');
255
+ }
256
+
257
+ /**
258
+ * These are the parse rules for the URL parser, it informs the parser
259
+ * about:
260
+ *
261
+ * 0. The char it Needs to parse, if it's a string it should be done using
262
+ * indexOf, RegExp using exec and NaN means set as current value.
263
+ * 1. The property we should set when parsing this value.
264
+ * 2. Indication if it's backwards or forward parsing, when set as number it's
265
+ * the value of extra chars that should be split off.
266
+ * 3. Inherit from location if non existing in the parser.
267
+ * 4. `toLowerCase` the resulting value.
268
+ */
269
+ var rules = [
270
+ ['#', 'hash'], // Extract from the back.
271
+ ['?', 'query'], // Extract from the back.
272
+ function sanitize(address, url) { // Sanitize what is left of the address
273
+ return isSpecial(url.protocol) ? address.replace(/\\/g, '/') : address;
274
+ },
275
+ ['/', 'pathname'], // Extract from the back.
276
+ ['@', 'auth', 1], // Extract from the front.
277
+ [NaN, 'host', undefined, 1, 1], // Set left over value.
278
+ [/:(\d*)$/, 'port', undefined, 1], // RegExp the back.
279
+ [NaN, 'hostname', undefined, 1, 1] // Set left over.
280
+ ];
281
+
282
+ /**
283
+ * These properties should not be copied or inherited from. This is only needed
284
+ * for all non blob URL's as a blob URL does not include a hash, only the
285
+ * origin.
286
+ *
287
+ * @type {Object}
288
+ * @private
289
+ */
290
+ var ignore = { hash: 1, query: 1 };
291
+
292
+ /**
293
+ * The location object differs when your code is loaded through a normal page,
294
+ * Worker or through a worker using a blob. And with the blobble begins the
295
+ * trouble as the location object will contain the URL of the blob, not the
296
+ * location of the page where our code is loaded in. The actual origin is
297
+ * encoded in the `pathname` so we can thankfully generate a good "default"
298
+ * location from it so we can generate proper relative URL's again.
299
+ *
300
+ * @param {Object|String} loc Optional default location object.
301
+ * @returns {Object} lolcation object.
302
+ * @public
303
+ */
304
+ function lolcation(loc) {
305
+ var globalVar;
306
+
307
+ if (typeof window !== 'undefined') globalVar = window;
308
+ else if (typeof imageSearch_store.commonjsGlobal !== 'undefined') globalVar = imageSearch_store.commonjsGlobal;
309
+ else if (typeof self !== 'undefined') globalVar = self;
310
+ else globalVar = {};
311
+
312
+ var location = globalVar.location || {};
313
+ loc = loc || location;
314
+
315
+ var finaldestination = {}
316
+ , type = typeof loc
317
+ , key;
318
+
319
+ if ('blob:' === loc.protocol) {
320
+ finaldestination = new Url(unescape(loc.pathname), {});
321
+ } else if ('string' === type) {
322
+ finaldestination = new Url(loc, {});
323
+ for (key in ignore) delete finaldestination[key];
324
+ } else if ('object' === type) {
325
+ for (key in loc) {
326
+ if (key in ignore) continue;
327
+ finaldestination[key] = loc[key];
328
+ }
329
+
330
+ if (finaldestination.slashes === undefined) {
331
+ finaldestination.slashes = slashes.test(loc.href);
332
+ }
333
+ }
334
+
335
+ return finaldestination;
336
+ }
337
+
338
+ /**
339
+ * Check whether a protocol scheme is special.
340
+ *
341
+ * @param {String} The protocol scheme of the URL
342
+ * @return {Boolean} `true` if the protocol scheme is special, else `false`
343
+ * @private
344
+ */
345
+ function isSpecial(scheme) {
346
+ return (
347
+ scheme === 'file:' ||
348
+ scheme === 'ftp:' ||
349
+ scheme === 'http:' ||
350
+ scheme === 'https:' ||
351
+ scheme === 'ws:' ||
352
+ scheme === 'wss:'
353
+ );
354
+ }
355
+
356
+ /**
357
+ * @typedef ProtocolExtract
358
+ * @type Object
359
+ * @property {String} protocol Protocol matched in the URL, in lowercase.
360
+ * @property {Boolean} slashes `true` if protocol is followed by "//", else `false`.
361
+ * @property {String} rest Rest of the URL that is not part of the protocol.
362
+ */
363
+
364
+ /**
365
+ * Extract protocol information from a URL with/without double slash ("//").
366
+ *
367
+ * @param {String} address URL we want to extract from.
368
+ * @param {Object} location
369
+ * @return {ProtocolExtract} Extracted information.
370
+ * @private
371
+ */
372
+ function extractProtocol(address, location) {
373
+ address = trimLeft(address);
374
+ address = address.replace(CRHTLF, '');
375
+ location = location || {};
376
+
377
+ var match = protocolre.exec(address);
378
+ var protocol = match[1] ? match[1].toLowerCase() : '';
379
+ var forwardSlashes = !!match[2];
380
+ var otherSlashes = !!match[3];
381
+ var slashesCount = 0;
382
+ var rest;
383
+
384
+ if (forwardSlashes) {
385
+ if (otherSlashes) {
386
+ rest = match[2] + match[3] + match[4];
387
+ slashesCount = match[2].length + match[3].length;
388
+ } else {
389
+ rest = match[2] + match[4];
390
+ slashesCount = match[2].length;
391
+ }
392
+ } else {
393
+ if (otherSlashes) {
394
+ rest = match[3] + match[4];
395
+ slashesCount = match[3].length;
396
+ } else {
397
+ rest = match[4];
398
+ }
399
+ }
400
+
401
+ if (protocol === 'file:') {
402
+ if (slashesCount >= 2) {
403
+ rest = rest.slice(2);
404
+ }
405
+ } else if (isSpecial(protocol)) {
406
+ rest = match[4];
407
+ } else if (protocol) {
408
+ if (forwardSlashes) {
409
+ rest = rest.slice(2);
410
+ }
411
+ } else if (slashesCount >= 2 && isSpecial(location.protocol)) {
412
+ rest = match[4];
413
+ }
414
+
415
+ return {
416
+ protocol: protocol,
417
+ slashes: forwardSlashes || isSpecial(protocol),
418
+ slashesCount: slashesCount,
419
+ rest: rest
420
+ };
421
+ }
422
+
423
+ /**
424
+ * Resolve a relative URL pathname against a base URL pathname.
425
+ *
426
+ * @param {String} relative Pathname of the relative URL.
427
+ * @param {String} base Pathname of the base URL.
428
+ * @return {String} Resolved pathname.
429
+ * @private
430
+ */
431
+ function resolve(relative, base) {
432
+ if (relative === '') return base;
433
+
434
+ var path = (base || '/').split('/').slice(0, -1).concat(relative.split('/'))
435
+ , i = path.length
436
+ , last = path[i - 1]
437
+ , unshift = false
438
+ , up = 0;
439
+
440
+ while (i--) {
441
+ if (path[i] === '.') {
442
+ path.splice(i, 1);
443
+ } else if (path[i] === '..') {
444
+ path.splice(i, 1);
445
+ up++;
446
+ } else if (up) {
447
+ if (i === 0) unshift = true;
448
+ path.splice(i, 1);
449
+ up--;
450
+ }
451
+ }
452
+
453
+ if (unshift) path.unshift('');
454
+ if (last === '.' || last === '..') path.push('');
455
+
456
+ return path.join('/');
457
+ }
458
+
459
+ /**
460
+ * The actual URL instance. Instead of returning an object we've opted-in to
461
+ * create an actual constructor as it's much more memory efficient and
462
+ * faster and it pleases my OCD.
463
+ *
464
+ * It is worth noting that we should not use `URL` as class name to prevent
465
+ * clashes with the global URL instance that got introduced in browsers.
466
+ *
467
+ * @constructor
468
+ * @param {String} address URL we want to parse.
469
+ * @param {Object|String} [location] Location defaults for relative paths.
470
+ * @param {Boolean|Function} [parser] Parser for the query string.
471
+ * @private
472
+ */
473
+ function Url(address, location, parser) {
474
+ address = trimLeft(address);
475
+ address = address.replace(CRHTLF, '');
476
+
477
+ if (!(this instanceof Url)) {
478
+ return new Url(address, location, parser);
479
+ }
480
+
481
+ var relative, extracted, parse, instruction, index, key
482
+ , instructions = rules.slice()
483
+ , type = typeof location
484
+ , url = this
485
+ , i = 0;
486
+
487
+ //
488
+ // The following if statements allows this module two have compatibility with
489
+ // 2 different API:
490
+ //
491
+ // 1. Node.js's `url.parse` api which accepts a URL, boolean as arguments
492
+ // where the boolean indicates that the query string should also be parsed.
493
+ //
494
+ // 2. The `URL` interface of the browser which accepts a URL, object as
495
+ // arguments. The supplied object will be used as default values / fall-back
496
+ // for relative paths.
497
+ //
498
+ if ('object' !== type && 'string' !== type) {
499
+ parser = location;
500
+ location = null;
501
+ }
502
+
503
+ if (parser && 'function' !== typeof parser) parser = querystringify_1.parse;
504
+
505
+ location = lolcation(location);
506
+
507
+ //
508
+ // Extract protocol information before running the instructions.
509
+ //
510
+ extracted = extractProtocol(address || '', location);
511
+ relative = !extracted.protocol && !extracted.slashes;
512
+ url.slashes = extracted.slashes || relative && location.slashes;
513
+ url.protocol = extracted.protocol || location.protocol || '';
514
+ address = extracted.rest;
515
+
516
+ //
517
+ // When the authority component is absent the URL starts with a path
518
+ // component.
519
+ //
520
+ if (
521
+ extracted.protocol === 'file:' && (
522
+ extracted.slashesCount !== 2 || windowsDriveLetter.test(address)) ||
523
+ (!extracted.slashes &&
524
+ (extracted.protocol ||
525
+ extracted.slashesCount < 2 ||
526
+ !isSpecial(url.protocol)))
527
+ ) {
528
+ instructions[3] = [/(.*)/, 'pathname'];
529
+ }
530
+
531
+ for (; i < instructions.length; i++) {
532
+ instruction = instructions[i];
533
+
534
+ if (typeof instruction === 'function') {
535
+ address = instruction(address, url);
536
+ continue;
537
+ }
538
+
539
+ parse = instruction[0];
540
+ key = instruction[1];
541
+
542
+ if (parse !== parse) {
543
+ url[key] = address;
544
+ } else if ('string' === typeof parse) {
545
+ index = parse === '@'
546
+ ? address.lastIndexOf(parse)
547
+ : address.indexOf(parse);
548
+
549
+ if (~index) {
550
+ if ('number' === typeof instruction[2]) {
551
+ url[key] = address.slice(0, index);
552
+ address = address.slice(index + instruction[2]);
553
+ } else {
554
+ url[key] = address.slice(index);
555
+ address = address.slice(0, index);
556
+ }
557
+ }
558
+ } else if ((index = parse.exec(address))) {
559
+ url[key] = index[1];
560
+ address = address.slice(0, index.index);
561
+ }
562
+
563
+ url[key] = url[key] || (
564
+ relative && instruction[3] ? location[key] || '' : ''
565
+ );
566
+
567
+ //
568
+ // Hostname, host and protocol should be lowercased so they can be used to
569
+ // create a proper `origin`.
570
+ //
571
+ if (instruction[4]) url[key] = url[key].toLowerCase();
572
+ }
573
+
574
+ //
575
+ // Also parse the supplied query string in to an object. If we're supplied
576
+ // with a custom parser as function use that instead of the default build-in
577
+ // parser.
578
+ //
579
+ if (parser) url.query = parser(url.query);
580
+
581
+ //
582
+ // If the URL is relative, resolve the pathname against the base URL.
583
+ //
584
+ if (
585
+ relative
586
+ && location.slashes
587
+ && url.pathname.charAt(0) !== '/'
588
+ && (url.pathname !== '' || location.pathname !== '')
589
+ ) {
590
+ url.pathname = resolve(url.pathname, location.pathname);
591
+ }
592
+
593
+ //
594
+ // Default to a / for pathname if none exists. This normalizes the URL
595
+ // to always have a /
596
+ //
597
+ if (url.pathname.charAt(0) !== '/' && isSpecial(url.protocol)) {
598
+ url.pathname = '/' + url.pathname;
599
+ }
600
+
601
+ //
602
+ // We should not add port numbers if they are already the default port number
603
+ // for a given protocol. As the host also contains the port number we're going
604
+ // override it with the hostname which contains no port number.
605
+ //
606
+ if (!requiresPort(url.port, url.protocol)) {
607
+ url.host = url.hostname;
608
+ url.port = '';
609
+ }
610
+
611
+ //
612
+ // Parse down the `auth` for the username and password.
613
+ //
614
+ url.username = url.password = '';
615
+
616
+ if (url.auth) {
617
+ index = url.auth.indexOf(':');
618
+
619
+ if (~index) {
620
+ url.username = url.auth.slice(0, index);
621
+ url.username = encodeURIComponent(decodeURIComponent(url.username));
622
+
623
+ url.password = url.auth.slice(index + 1);
624
+ url.password = encodeURIComponent(decodeURIComponent(url.password));
625
+ } else {
626
+ url.username = encodeURIComponent(decodeURIComponent(url.auth));
627
+ }
628
+
629
+ url.auth = url.password ? url.username +':'+ url.password : url.username;
630
+ }
631
+
632
+ url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host
633
+ ? url.protocol +'//'+ url.host
634
+ : 'null';
635
+
636
+ //
637
+ // The href is just the compiled result.
638
+ //
639
+ url.href = url.toString();
640
+ }
641
+
642
+ /**
643
+ * This is convenience method for changing properties in the URL instance to
644
+ * insure that they all propagate correctly.
645
+ *
646
+ * @param {String} part Property we need to adjust.
647
+ * @param {Mixed} value The newly assigned value.
648
+ * @param {Boolean|Function} fn When setting the query, it will be the function
649
+ * used to parse the query.
650
+ * When setting the protocol, double slash will be
651
+ * removed from the final url if it is true.
652
+ * @returns {URL} URL instance for chaining.
653
+ * @public
654
+ */
655
+ function set(part, value, fn) {
656
+ var url = this;
657
+
658
+ switch (part) {
659
+ case 'query':
660
+ if ('string' === typeof value && value.length) {
661
+ value = (fn || querystringify_1.parse)(value);
662
+ }
663
+
664
+ url[part] = value;
665
+ break;
666
+
667
+ case 'port':
668
+ url[part] = value;
669
+
670
+ if (!requiresPort(value, url.protocol)) {
671
+ url.host = url.hostname;
672
+ url[part] = '';
673
+ } else if (value) {
674
+ url.host = url.hostname +':'+ value;
675
+ }
676
+
677
+ break;
678
+
679
+ case 'hostname':
680
+ url[part] = value;
681
+
682
+ if (url.port) value += ':'+ url.port;
683
+ url.host = value;
684
+ break;
685
+
686
+ case 'host':
687
+ url[part] = value;
688
+
689
+ if (port.test(value)) {
690
+ value = value.split(':');
691
+ url.port = value.pop();
692
+ url.hostname = value.join(':');
693
+ } else {
694
+ url.hostname = value;
695
+ url.port = '';
696
+ }
697
+
698
+ break;
699
+
700
+ case 'protocol':
701
+ url.protocol = value.toLowerCase();
702
+ url.slashes = !fn;
703
+ break;
704
+
705
+ case 'pathname':
706
+ case 'hash':
707
+ if (value) {
708
+ var char = part === 'pathname' ? '/' : '#';
709
+ url[part] = value.charAt(0) !== char ? char + value : value;
710
+ } else {
711
+ url[part] = value;
712
+ }
713
+ break;
714
+
715
+ case 'username':
716
+ case 'password':
717
+ url[part] = encodeURIComponent(value);
718
+ break;
719
+
720
+ case 'auth':
721
+ var index = value.indexOf(':');
722
+
723
+ if (~index) {
724
+ url.username = value.slice(0, index);
725
+ url.username = encodeURIComponent(decodeURIComponent(url.username));
726
+
727
+ url.password = value.slice(index + 1);
728
+ url.password = encodeURIComponent(decodeURIComponent(url.password));
729
+ } else {
730
+ url.username = encodeURIComponent(decodeURIComponent(value));
731
+ }
732
+ }
733
+
734
+ for (var i = 0; i < rules.length; i++) {
735
+ var ins = rules[i];
736
+
737
+ if (ins[4]) url[ins[1]] = url[ins[1]].toLowerCase();
738
+ }
739
+
740
+ url.auth = url.password ? url.username +':'+ url.password : url.username;
741
+
742
+ url.origin = url.protocol !== 'file:' && isSpecial(url.protocol) && url.host
743
+ ? url.protocol +'//'+ url.host
744
+ : 'null';
745
+
746
+ url.href = url.toString();
747
+
748
+ return url;
749
+ }
750
+
751
+ /**
752
+ * Transform the properties back in to a valid and full URL string.
753
+ *
754
+ * @param {Function} stringify Optional query stringify function.
755
+ * @returns {String} Compiled version of the URL.
756
+ * @public
757
+ */
758
+ function toString(stringify) {
759
+ if (!stringify || 'function' !== typeof stringify) stringify = querystringify_1.stringify;
760
+
761
+ var query
762
+ , url = this
763
+ , host = url.host
764
+ , protocol = url.protocol;
765
+
766
+ if (protocol && protocol.charAt(protocol.length - 1) !== ':') protocol += ':';
767
+
768
+ var result =
769
+ protocol +
770
+ ((url.protocol && url.slashes) || isSpecial(url.protocol) ? '//' : '');
771
+
772
+ if (url.username) {
773
+ result += url.username;
774
+ if (url.password) result += ':'+ url.password;
775
+ result += '@';
776
+ } else if (url.password) {
777
+ result += ':'+ url.password;
778
+ result += '@';
779
+ } else if (
780
+ url.protocol !== 'file:' &&
781
+ isSpecial(url.protocol) &&
782
+ !host &&
783
+ url.pathname !== '/'
784
+ ) {
785
+ //
786
+ // Add back the empty userinfo, otherwise the original invalid URL
787
+ // might be transformed into a valid one with `url.pathname` as host.
788
+ //
789
+ result += '@';
790
+ }
791
+
792
+ //
793
+ // Trailing colon is removed from `url.host` when it is parsed. If it still
794
+ // ends with a colon, then add back the trailing colon that was removed. This
795
+ // prevents an invalid URL from being transformed into a valid one.
796
+ //
797
+ if (host[host.length - 1] === ':' || (port.test(url.hostname) && !url.port)) {
798
+ host += ':';
799
+ }
800
+
801
+ result += host + url.pathname;
802
+
803
+ query = 'object' === typeof url.query ? stringify(url.query) : url.query;
804
+ if (query) result += '?' !== query.charAt(0) ? '?'+ query : query;
805
+
806
+ if (url.hash) result += url.hash;
807
+
808
+ return result;
809
+ }
810
+
811
+ Url.prototype = { set: set, toString: toString };
812
+
813
+ //
814
+ // Expose the URL parser and some additional properties that might be useful for
815
+ // others or testing.
816
+ //
817
+ Url.extractProtocol = extractProtocol;
818
+ Url.location = lolcation;
819
+ Url.trimLeft = trimLeft;
820
+ Url.qs = querystringify_1;
821
+
822
+ var urlParse = Url;
823
+
824
+ var rxjsStub = imageSearch_store.createCommonjsModule(function (module, exports) {
825
+ Object.defineProperty(exports, "__esModule", { value: true });
826
+ exports.map = exports.mergeMap = exports.of = exports.from = exports.Observable = void 0;
827
+ var Observable = (function () {
828
+ function Observable(promise) {
829
+ this.promise = promise;
830
+ }
831
+ Observable.prototype.toPromise = function () {
832
+ return this.promise;
833
+ };
834
+ Observable.prototype.pipe = function (callback) {
835
+ return new Observable(this.promise.then(callback));
836
+ };
837
+ return Observable;
838
+ }());
839
+ exports.Observable = Observable;
840
+ function from(promise) {
841
+ return new Observable(promise);
842
+ }
843
+ exports.from = from;
844
+ function of(value) {
845
+ return new Observable(Promise.resolve(value));
846
+ }
847
+ exports.of = of;
848
+ function mergeMap(callback) {
849
+ return function (value) { return callback(value).toPromise(); };
850
+ }
851
+ exports.mergeMap = mergeMap;
852
+ function map(callback) {
853
+ return callback;
854
+ }
855
+ exports.map = map;
856
+ //# sourceMappingURL=rxjsStub.js.map
857
+ });
858
+
859
+ var global =
860
+ (typeof globalThis !== 'undefined' && globalThis) ||
861
+ (typeof self !== 'undefined' && self) ||
862
+ (typeof global !== 'undefined' && global);
863
+
864
+ var support = {
865
+ searchParams: 'URLSearchParams' in global,
866
+ iterable: 'Symbol' in global && 'iterator' in Symbol,
867
+ blob:
868
+ 'FileReader' in global &&
869
+ 'Blob' in global &&
870
+ (function() {
871
+ try {
872
+ new Blob();
873
+ return true
874
+ } catch (e) {
875
+ return false
876
+ }
877
+ })(),
878
+ formData: 'FormData' in global,
879
+ arrayBuffer: 'ArrayBuffer' in global
880
+ };
881
+
882
+ function isDataView(obj) {
883
+ return obj && DataView.prototype.isPrototypeOf(obj)
884
+ }
885
+
886
+ if (support.arrayBuffer) {
887
+ var viewClasses = [
888
+ '[object Int8Array]',
889
+ '[object Uint8Array]',
890
+ '[object Uint8ClampedArray]',
891
+ '[object Int16Array]',
892
+ '[object Uint16Array]',
893
+ '[object Int32Array]',
894
+ '[object Uint32Array]',
895
+ '[object Float32Array]',
896
+ '[object Float64Array]'
897
+ ];
898
+
899
+ var isArrayBufferView =
900
+ ArrayBuffer.isView ||
901
+ function(obj) {
902
+ return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
903
+ };
904
+ }
905
+
906
+ function normalizeName(name) {
907
+ if (typeof name !== 'string') {
908
+ name = String(name);
909
+ }
910
+ if (/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(name) || name === '') {
911
+ throw new TypeError('Invalid character in header field name: "' + name + '"')
912
+ }
913
+ return name.toLowerCase()
914
+ }
915
+
916
+ function normalizeValue(value) {
917
+ if (typeof value !== 'string') {
918
+ value = String(value);
919
+ }
920
+ return value
921
+ }
922
+
923
+ // Build a destructive iterator for the value list
924
+ function iteratorFor(items) {
925
+ var iterator = {
926
+ next: function() {
927
+ var value = items.shift();
928
+ return {done: value === undefined, value: value}
929
+ }
930
+ };
931
+
932
+ if (support.iterable) {
933
+ iterator[Symbol.iterator] = function() {
934
+ return iterator
935
+ };
936
+ }
937
+
938
+ return iterator
939
+ }
940
+
941
+ function Headers(headers) {
942
+ this.map = {};
943
+
944
+ if (headers instanceof Headers) {
945
+ headers.forEach(function(value, name) {
946
+ this.append(name, value);
947
+ }, this);
948
+ } else if (Array.isArray(headers)) {
949
+ headers.forEach(function(header) {
950
+ this.append(header[0], header[1]);
951
+ }, this);
952
+ } else if (headers) {
953
+ Object.getOwnPropertyNames(headers).forEach(function(name) {
954
+ this.append(name, headers[name]);
955
+ }, this);
956
+ }
957
+ }
958
+
959
+ Headers.prototype.append = function(name, value) {
960
+ name = normalizeName(name);
961
+ value = normalizeValue(value);
962
+ var oldValue = this.map[name];
963
+ this.map[name] = oldValue ? oldValue + ', ' + value : value;
964
+ };
965
+
966
+ Headers.prototype['delete'] = function(name) {
967
+ delete this.map[normalizeName(name)];
968
+ };
969
+
970
+ Headers.prototype.get = function(name) {
971
+ name = normalizeName(name);
972
+ return this.has(name) ? this.map[name] : null
973
+ };
974
+
975
+ Headers.prototype.has = function(name) {
976
+ return this.map.hasOwnProperty(normalizeName(name))
977
+ };
978
+
979
+ Headers.prototype.set = function(name, value) {
980
+ this.map[normalizeName(name)] = normalizeValue(value);
981
+ };
982
+
983
+ Headers.prototype.forEach = function(callback, thisArg) {
984
+ for (var name in this.map) {
985
+ if (this.map.hasOwnProperty(name)) {
986
+ callback.call(thisArg, this.map[name], name, this);
987
+ }
988
+ }
989
+ };
990
+
991
+ Headers.prototype.keys = function() {
992
+ var items = [];
993
+ this.forEach(function(value, name) {
994
+ items.push(name);
995
+ });
996
+ return iteratorFor(items)
997
+ };
998
+
999
+ Headers.prototype.values = function() {
1000
+ var items = [];
1001
+ this.forEach(function(value) {
1002
+ items.push(value);
1003
+ });
1004
+ return iteratorFor(items)
1005
+ };
1006
+
1007
+ Headers.prototype.entries = function() {
1008
+ var items = [];
1009
+ this.forEach(function(value, name) {
1010
+ items.push([name, value]);
1011
+ });
1012
+ return iteratorFor(items)
1013
+ };
1014
+
1015
+ if (support.iterable) {
1016
+ Headers.prototype[Symbol.iterator] = Headers.prototype.entries;
1017
+ }
1018
+
1019
+ function consumed(body) {
1020
+ if (body.bodyUsed) {
1021
+ return Promise.reject(new TypeError('Already read'))
1022
+ }
1023
+ body.bodyUsed = true;
1024
+ }
1025
+
1026
+ function fileReaderReady(reader) {
1027
+ return new Promise(function(resolve, reject) {
1028
+ reader.onload = function() {
1029
+ resolve(reader.result);
1030
+ };
1031
+ reader.onerror = function() {
1032
+ reject(reader.error);
1033
+ };
1034
+ })
1035
+ }
1036
+
1037
+ function readBlobAsArrayBuffer(blob) {
1038
+ var reader = new FileReader();
1039
+ var promise = fileReaderReady(reader);
1040
+ reader.readAsArrayBuffer(blob);
1041
+ return promise
1042
+ }
1043
+
1044
+ function readBlobAsText(blob) {
1045
+ var reader = new FileReader();
1046
+ var promise = fileReaderReady(reader);
1047
+ reader.readAsText(blob);
1048
+ return promise
1049
+ }
1050
+
1051
+ function readArrayBufferAsText(buf) {
1052
+ var view = new Uint8Array(buf);
1053
+ var chars = new Array(view.length);
1054
+
1055
+ for (var i = 0; i < view.length; i++) {
1056
+ chars[i] = String.fromCharCode(view[i]);
1057
+ }
1058
+ return chars.join('')
1059
+ }
1060
+
1061
+ function bufferClone(buf) {
1062
+ if (buf.slice) {
1063
+ return buf.slice(0)
1064
+ } else {
1065
+ var view = new Uint8Array(buf.byteLength);
1066
+ view.set(new Uint8Array(buf));
1067
+ return view.buffer
1068
+ }
1069
+ }
1070
+
1071
+ function Body() {
1072
+ this.bodyUsed = false;
1073
+
1074
+ this._initBody = function(body) {
1075
+ /*
1076
+ fetch-mock wraps the Response object in an ES6 Proxy to
1077
+ provide useful test harness features such as flush. However, on
1078
+ ES5 browsers without fetch or Proxy support pollyfills must be used;
1079
+ the proxy-pollyfill is unable to proxy an attribute unless it exists
1080
+ on the object before the Proxy is created. This change ensures
1081
+ Response.bodyUsed exists on the instance, while maintaining the
1082
+ semantic of setting Request.bodyUsed in the constructor before
1083
+ _initBody is called.
1084
+ */
1085
+ this.bodyUsed = this.bodyUsed;
1086
+ this._bodyInit = body;
1087
+ if (!body) {
1088
+ this._bodyText = '';
1089
+ } else if (typeof body === 'string') {
1090
+ this._bodyText = body;
1091
+ } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
1092
+ this._bodyBlob = body;
1093
+ } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
1094
+ this._bodyFormData = body;
1095
+ } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
1096
+ this._bodyText = body.toString();
1097
+ } else if (support.arrayBuffer && support.blob && isDataView(body)) {
1098
+ this._bodyArrayBuffer = bufferClone(body.buffer);
1099
+ // IE 10-11 can't handle a DataView body.
1100
+ this._bodyInit = new Blob([this._bodyArrayBuffer]);
1101
+ } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
1102
+ this._bodyArrayBuffer = bufferClone(body);
1103
+ } else {
1104
+ this._bodyText = body = Object.prototype.toString.call(body);
1105
+ }
1106
+
1107
+ if (!this.headers.get('content-type')) {
1108
+ if (typeof body === 'string') {
1109
+ this.headers.set('content-type', 'text/plain;charset=UTF-8');
1110
+ } else if (this._bodyBlob && this._bodyBlob.type) {
1111
+ this.headers.set('content-type', this._bodyBlob.type);
1112
+ } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
1113
+ this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
1114
+ }
1115
+ }
1116
+ };
1117
+
1118
+ if (support.blob) {
1119
+ this.blob = function() {
1120
+ var rejected = consumed(this);
1121
+ if (rejected) {
1122
+ return rejected
1123
+ }
1124
+
1125
+ if (this._bodyBlob) {
1126
+ return Promise.resolve(this._bodyBlob)
1127
+ } else if (this._bodyArrayBuffer) {
1128
+ return Promise.resolve(new Blob([this._bodyArrayBuffer]))
1129
+ } else if (this._bodyFormData) {
1130
+ throw new Error('could not read FormData body as blob')
1131
+ } else {
1132
+ return Promise.resolve(new Blob([this._bodyText]))
1133
+ }
1134
+ };
1135
+
1136
+ this.arrayBuffer = function() {
1137
+ if (this._bodyArrayBuffer) {
1138
+ var isConsumed = consumed(this);
1139
+ if (isConsumed) {
1140
+ return isConsumed
1141
+ }
1142
+ if (ArrayBuffer.isView(this._bodyArrayBuffer)) {
1143
+ return Promise.resolve(
1144
+ this._bodyArrayBuffer.buffer.slice(
1145
+ this._bodyArrayBuffer.byteOffset,
1146
+ this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
1147
+ )
1148
+ )
1149
+ } else {
1150
+ return Promise.resolve(this._bodyArrayBuffer)
1151
+ }
1152
+ } else {
1153
+ return this.blob().then(readBlobAsArrayBuffer)
1154
+ }
1155
+ };
1156
+ }
1157
+
1158
+ this.text = function() {
1159
+ var rejected = consumed(this);
1160
+ if (rejected) {
1161
+ return rejected
1162
+ }
1163
+
1164
+ if (this._bodyBlob) {
1165
+ return readBlobAsText(this._bodyBlob)
1166
+ } else if (this._bodyArrayBuffer) {
1167
+ return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))
1168
+ } else if (this._bodyFormData) {
1169
+ throw new Error('could not read FormData body as text')
1170
+ } else {
1171
+ return Promise.resolve(this._bodyText)
1172
+ }
1173
+ };
1174
+
1175
+ if (support.formData) {
1176
+ this.formData = function() {
1177
+ return this.text().then(decode)
1178
+ };
1179
+ }
1180
+
1181
+ this.json = function() {
1182
+ return this.text().then(JSON.parse)
1183
+ };
1184
+
1185
+ return this
1186
+ }
1187
+
1188
+ // HTTP methods whose capitalization should be normalized
1189
+ var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];
1190
+
1191
+ function normalizeMethod(method) {
1192
+ var upcased = method.toUpperCase();
1193
+ return methods.indexOf(upcased) > -1 ? upcased : method
1194
+ }
1195
+
1196
+ function Request(input, options) {
1197
+ if (!(this instanceof Request)) {
1198
+ throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
1199
+ }
1200
+
1201
+ options = options || {};
1202
+ var body = options.body;
1203
+
1204
+ if (input instanceof Request) {
1205
+ if (input.bodyUsed) {
1206
+ throw new TypeError('Already read')
1207
+ }
1208
+ this.url = input.url;
1209
+ this.credentials = input.credentials;
1210
+ if (!options.headers) {
1211
+ this.headers = new Headers(input.headers);
1212
+ }
1213
+ this.method = input.method;
1214
+ this.mode = input.mode;
1215
+ this.signal = input.signal;
1216
+ if (!body && input._bodyInit != null) {
1217
+ body = input._bodyInit;
1218
+ input.bodyUsed = true;
1219
+ }
1220
+ } else {
1221
+ this.url = String(input);
1222
+ }
1223
+
1224
+ this.credentials = options.credentials || this.credentials || 'same-origin';
1225
+ if (options.headers || !this.headers) {
1226
+ this.headers = new Headers(options.headers);
1227
+ }
1228
+ this.method = normalizeMethod(options.method || this.method || 'GET');
1229
+ this.mode = options.mode || this.mode || null;
1230
+ this.signal = options.signal || this.signal;
1231
+ this.referrer = null;
1232
+
1233
+ if ((this.method === 'GET' || this.method === 'HEAD') && body) {
1234
+ throw new TypeError('Body not allowed for GET or HEAD requests')
1235
+ }
1236
+ this._initBody(body);
1237
+
1238
+ if (this.method === 'GET' || this.method === 'HEAD') {
1239
+ if (options.cache === 'no-store' || options.cache === 'no-cache') {
1240
+ // Search for a '_' parameter in the query string
1241
+ var reParamSearch = /([?&])_=[^&]*/;
1242
+ if (reParamSearch.test(this.url)) {
1243
+ // If it already exists then set the value with the current time
1244
+ this.url = this.url.replace(reParamSearch, '$1_=' + new Date().getTime());
1245
+ } else {
1246
+ // Otherwise add a new '_' parameter to the end with the current time
1247
+ var reQueryString = /\?/;
1248
+ this.url += (reQueryString.test(this.url) ? '&' : '?') + '_=' + new Date().getTime();
1249
+ }
1250
+ }
1251
+ }
1252
+ }
1253
+
1254
+ Request.prototype.clone = function() {
1255
+ return new Request(this, {body: this._bodyInit})
1256
+ };
1257
+
1258
+ function decode(body) {
1259
+ var form = new FormData();
1260
+ body
1261
+ .trim()
1262
+ .split('&')
1263
+ .forEach(function(bytes) {
1264
+ if (bytes) {
1265
+ var split = bytes.split('=');
1266
+ var name = split.shift().replace(/\+/g, ' ');
1267
+ var value = split.join('=').replace(/\+/g, ' ');
1268
+ form.append(decodeURIComponent(name), decodeURIComponent(value));
1269
+ }
1270
+ });
1271
+ return form
1272
+ }
1273
+
1274
+ function parseHeaders(rawHeaders) {
1275
+ var headers = new Headers();
1276
+ // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space
1277
+ // https://tools.ietf.org/html/rfc7230#section-3.2
1278
+ var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ');
1279
+ // Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill
1280
+ // https://github.com/github/fetch/issues/748
1281
+ // https://github.com/zloirock/core-js/issues/751
1282
+ preProcessedHeaders
1283
+ .split('\r')
1284
+ .map(function(header) {
1285
+ return header.indexOf('\n') === 0 ? header.substr(1, header.length) : header
1286
+ })
1287
+ .forEach(function(line) {
1288
+ var parts = line.split(':');
1289
+ var key = parts.shift().trim();
1290
+ if (key) {
1291
+ var value = parts.join(':').trim();
1292
+ headers.append(key, value);
1293
+ }
1294
+ });
1295
+ return headers
1296
+ }
1297
+
1298
+ Body.call(Request.prototype);
1299
+
1300
+ function Response(bodyInit, options) {
1301
+ if (!(this instanceof Response)) {
1302
+ throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
1303
+ }
1304
+ if (!options) {
1305
+ options = {};
1306
+ }
1307
+
1308
+ this.type = 'default';
1309
+ this.status = options.status === undefined ? 200 : options.status;
1310
+ this.ok = this.status >= 200 && this.status < 300;
1311
+ this.statusText = options.statusText === undefined ? '' : '' + options.statusText;
1312
+ this.headers = new Headers(options.headers);
1313
+ this.url = options.url || '';
1314
+ this._initBody(bodyInit);
1315
+ }
1316
+
1317
+ Body.call(Response.prototype);
1318
+
1319
+ Response.prototype.clone = function() {
1320
+ return new Response(this._bodyInit, {
1321
+ status: this.status,
1322
+ statusText: this.statusText,
1323
+ headers: new Headers(this.headers),
1324
+ url: this.url
1325
+ })
1326
+ };
1327
+
1328
+ Response.error = function() {
1329
+ var response = new Response(null, {status: 0, statusText: ''});
1330
+ response.type = 'error';
1331
+ return response
1332
+ };
1333
+
1334
+ var redirectStatuses = [301, 302, 303, 307, 308];
1335
+
1336
+ Response.redirect = function(url, status) {
1337
+ if (redirectStatuses.indexOf(status) === -1) {
1338
+ throw new RangeError('Invalid status code')
1339
+ }
1340
+
1341
+ return new Response(null, {status: status, headers: {location: url}})
1342
+ };
1343
+
1344
+ var DOMException = global.DOMException;
1345
+ try {
1346
+ new DOMException();
1347
+ } catch (err) {
1348
+ DOMException = function(message, name) {
1349
+ this.message = message;
1350
+ this.name = name;
1351
+ var error = Error(message);
1352
+ this.stack = error.stack;
1353
+ };
1354
+ DOMException.prototype = Object.create(Error.prototype);
1355
+ DOMException.prototype.constructor = DOMException;
1356
+ }
1357
+
1358
+ function fetch$1(input, init) {
1359
+ return new Promise(function(resolve, reject) {
1360
+ var request = new Request(input, init);
1361
+
1362
+ if (request.signal && request.signal.aborted) {
1363
+ return reject(new DOMException('Aborted', 'AbortError'))
1364
+ }
1365
+
1366
+ var xhr = new XMLHttpRequest();
1367
+
1368
+ function abortXhr() {
1369
+ xhr.abort();
1370
+ }
1371
+
1372
+ xhr.onload = function() {
1373
+ var options = {
1374
+ status: xhr.status,
1375
+ statusText: xhr.statusText,
1376
+ headers: parseHeaders(xhr.getAllResponseHeaders() || '')
1377
+ };
1378
+ options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');
1379
+ var body = 'response' in xhr ? xhr.response : xhr.responseText;
1380
+ setTimeout(function() {
1381
+ resolve(new Response(body, options));
1382
+ }, 0);
1383
+ };
1384
+
1385
+ xhr.onerror = function() {
1386
+ setTimeout(function() {
1387
+ reject(new TypeError('Network request failed'));
1388
+ }, 0);
1389
+ };
1390
+
1391
+ xhr.ontimeout = function() {
1392
+ setTimeout(function() {
1393
+ reject(new TypeError('Network request failed'));
1394
+ }, 0);
1395
+ };
1396
+
1397
+ xhr.onabort = function() {
1398
+ setTimeout(function() {
1399
+ reject(new DOMException('Aborted', 'AbortError'));
1400
+ }, 0);
1401
+ };
1402
+
1403
+ function fixUrl(url) {
1404
+ try {
1405
+ return url === '' && global.location.href ? global.location.href : url
1406
+ } catch (e) {
1407
+ return url
1408
+ }
1409
+ }
1410
+
1411
+ xhr.open(request.method, fixUrl(request.url), true);
1412
+
1413
+ if (request.credentials === 'include') {
1414
+ xhr.withCredentials = true;
1415
+ } else if (request.credentials === 'omit') {
1416
+ xhr.withCredentials = false;
1417
+ }
1418
+
1419
+ if ('responseType' in xhr) {
1420
+ if (support.blob) {
1421
+ xhr.responseType = 'blob';
1422
+ } else if (
1423
+ support.arrayBuffer &&
1424
+ request.headers.get('Content-Type') &&
1425
+ request.headers.get('Content-Type').indexOf('application/octet-stream') !== -1
1426
+ ) {
1427
+ xhr.responseType = 'arraybuffer';
1428
+ }
1429
+ }
1430
+
1431
+ if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers)) {
1432
+ Object.getOwnPropertyNames(init.headers).forEach(function(name) {
1433
+ xhr.setRequestHeader(name, normalizeValue(init.headers[name]));
1434
+ });
1435
+ } else {
1436
+ request.headers.forEach(function(value, name) {
1437
+ xhr.setRequestHeader(name, value);
1438
+ });
1439
+ }
1440
+
1441
+ if (request.signal) {
1442
+ request.signal.addEventListener('abort', abortXhr);
1443
+
1444
+ xhr.onreadystatechange = function() {
1445
+ // DONE (success or failure)
1446
+ if (xhr.readyState === 4) {
1447
+ request.signal.removeEventListener('abort', abortXhr);
1448
+ }
1449
+ };
1450
+ }
1451
+
1452
+ xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);
1453
+ })
1454
+ }
1455
+
1456
+ fetch$1.polyfill = true;
1457
+
1458
+ if (!global.fetch) {
1459
+ global.fetch = fetch$1;
1460
+ global.Headers = Headers;
1461
+ global.Request = Request;
1462
+ global.Response = Response;
1463
+ }
1464
+
1465
+ var isomorphicFetch = imageSearch_store.createCommonjsModule(function (module, exports) {
1466
+ Object.defineProperty(exports, "__esModule", { value: true });
1467
+ exports.IsomorphicFetchHttpLibrary = void 0;
1468
+
1469
+
1470
+
1471
+ var IsomorphicFetchHttpLibrary = (function () {
1472
+ function IsomorphicFetchHttpLibrary() {
1473
+ }
1474
+ IsomorphicFetchHttpLibrary.prototype.send = function (request) {
1475
+ var method = request.getHttpMethod().toString();
1476
+ var body = request.getBody();
1477
+ var resultPromise = fetch(request.getUrl(), {
1478
+ method: method,
1479
+ body: body,
1480
+ headers: request.getHeaders(),
1481
+ credentials: "same-origin"
1482
+ }).then(function (resp) {
1483
+ var headers = {};
1484
+ resp.headers.forEach(function (value, name) {
1485
+ headers[name] = value;
1486
+ });
1487
+ var body = {
1488
+ text: function () { return resp.text(); },
1489
+ binary: function () { return resp.blob(); }
1490
+ };
1491
+ return new http.ResponseContext(resp.status, headers, body);
1492
+ });
1493
+ return (0, rxjsStub.from)(resultPromise);
1494
+ };
1495
+ return IsomorphicFetchHttpLibrary;
1496
+ }());
1497
+ exports.IsomorphicFetchHttpLibrary = IsomorphicFetchHttpLibrary;
1498
+ //# sourceMappingURL=isomorphic-fetch.js.map
1499
+ });
1500
+
1501
+ var http = imageSearch_store.createCommonjsModule(function (module, exports) {
1502
+ var __extends = (imageSearch_store.commonjsGlobal && imageSearch_store.commonjsGlobal.__extends) || (function () {
1503
+ var extendStatics = function (d, b) {
1504
+ extendStatics = Object.setPrototypeOf ||
1505
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
1506
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
1507
+ return extendStatics(d, b);
1508
+ };
1509
+ return function (d, b) {
1510
+ if (typeof b !== "function" && b !== null)
1511
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1512
+ extendStatics(d, b);
1513
+ function __() { this.constructor = d; }
1514
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1515
+ };
1516
+ })();
1517
+ var __createBinding = (imageSearch_store.commonjsGlobal && imageSearch_store.commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
1518
+ if (k2 === undefined) k2 = k;
1519
+ var desc = Object.getOwnPropertyDescriptor(m, k);
1520
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
1521
+ desc = { enumerable: true, get: function() { return m[k]; } };
1522
+ }
1523
+ Object.defineProperty(o, k2, desc);
1524
+ }) : (function(o, m, k, k2) {
1525
+ if (k2 === undefined) k2 = k;
1526
+ o[k2] = m[k];
1527
+ }));
1528
+ var __exportStar = (imageSearch_store.commonjsGlobal && imageSearch_store.commonjsGlobal.__exportStar) || function(m, exports) {
1529
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
1530
+ };
1531
+ var __awaiter = (imageSearch_store.commonjsGlobal && imageSearch_store.commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) {
1532
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1533
+ return new (P || (P = Promise))(function (resolve, reject) {
1534
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
1535
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
1536
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
1537
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
1538
+ });
1539
+ };
1540
+ var __generator = (imageSearch_store.commonjsGlobal && imageSearch_store.commonjsGlobal.__generator) || function (thisArg, body) {
1541
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
1542
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
1543
+ function verb(n) { return function (v) { return step([n, v]); }; }
1544
+ function step(op) {
1545
+ if (f) throw new TypeError("Generator is already executing.");
1546
+ while (_) try {
1547
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
1548
+ if (y = 0, t) op = [op[0] & 2, t.value];
1549
+ switch (op[0]) {
1550
+ case 0: case 1: t = op; break;
1551
+ case 4: _.label++; return { value: op[1], done: false };
1552
+ case 5: _.label++; y = op[1]; op = [0]; continue;
1553
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
1554
+ default:
1555
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
1556
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
1557
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
1558
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
1559
+ if (t[2]) _.ops.pop();
1560
+ _.trys.pop(); continue;
1561
+ }
1562
+ op = body.call(thisArg, _);
1563
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
1564
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
1565
+ }
1566
+ };
1567
+ Object.defineProperty(exports, "__esModule", { value: true });
1568
+ exports.wrapHttpLibrary = exports.ResponseContext = exports.SelfDecodingBody = exports.RequestContext = exports.HttpException = exports.HttpMethod = void 0;
1569
+
1570
+
1571
+ __exportStar(isomorphicFetch, exports);
1572
+ (function (HttpMethod) {
1573
+ HttpMethod["GET"] = "GET";
1574
+ HttpMethod["HEAD"] = "HEAD";
1575
+ HttpMethod["POST"] = "POST";
1576
+ HttpMethod["PUT"] = "PUT";
1577
+ HttpMethod["DELETE"] = "DELETE";
1578
+ HttpMethod["CONNECT"] = "CONNECT";
1579
+ HttpMethod["OPTIONS"] = "OPTIONS";
1580
+ HttpMethod["TRACE"] = "TRACE";
1581
+ HttpMethod["PATCH"] = "PATCH";
1582
+ })(exports.HttpMethod || (exports.HttpMethod = {}));
1583
+ var HttpException = (function (_super) {
1584
+ __extends(HttpException, _super);
1585
+ function HttpException(msg) {
1586
+ return _super.call(this, msg) || this;
1587
+ }
1588
+ return HttpException;
1589
+ }(Error));
1590
+ exports.HttpException = HttpException;
1591
+ var RequestContext = (function () {
1592
+ function RequestContext(url, httpMethod) {
1593
+ this.httpMethod = httpMethod;
1594
+ this.headers = {};
1595
+ this.body = undefined;
1596
+ this.url = new urlParse(url, true);
1597
+ }
1598
+ RequestContext.prototype.getUrl = function () {
1599
+ return this.url.toString();
1600
+ };
1601
+ RequestContext.prototype.setUrl = function (url) {
1602
+ this.url = new urlParse(url, true);
1603
+ };
1604
+ RequestContext.prototype.setBody = function (body) {
1605
+ this.body = body;
1606
+ };
1607
+ RequestContext.prototype.getHttpMethod = function () {
1608
+ return this.httpMethod;
1609
+ };
1610
+ RequestContext.prototype.getHeaders = function () {
1611
+ return this.headers;
1612
+ };
1613
+ RequestContext.prototype.getBody = function () {
1614
+ return this.body;
1615
+ };
1616
+ RequestContext.prototype.setQueryParam = function (name, value) {
1617
+ var queryObj = this.url.query;
1618
+ queryObj[name] = value;
1619
+ this.url.set("query", queryObj);
1620
+ };
1621
+ RequestContext.prototype.addCookie = function (name, value) {
1622
+ if (!this.headers["Cookie"]) {
1623
+ this.headers["Cookie"] = "";
1624
+ }
1625
+ this.headers["Cookie"] += name + "=" + value + "; ";
1626
+ };
1627
+ RequestContext.prototype.setHeaderParam = function (key, value) {
1628
+ this.headers[key] = value;
1629
+ };
1630
+ return RequestContext;
1631
+ }());
1632
+ exports.RequestContext = RequestContext;
1633
+ var SelfDecodingBody = (function () {
1634
+ function SelfDecodingBody(dataSource) {
1635
+ this.dataSource = dataSource;
1636
+ }
1637
+ SelfDecodingBody.prototype.binary = function () {
1638
+ return this.dataSource;
1639
+ };
1640
+ SelfDecodingBody.prototype.text = function () {
1641
+ return __awaiter(this, void 0, void 0, function () {
1642
+ var data;
1643
+ return __generator(this, function (_a) {
1644
+ switch (_a.label) {
1645
+ case 0: return [4, this.dataSource];
1646
+ case 1:
1647
+ data = _a.sent();
1648
+ if (data.text) {
1649
+ return [2, data.text()];
1650
+ }
1651
+ return [2, new Promise(function (resolve, reject) {
1652
+ var reader = new FileReader();
1653
+ reader.addEventListener("load", function () { return resolve(reader.result); });
1654
+ reader.addEventListener("error", function () { return reject(reader.error); });
1655
+ reader.readAsText(data);
1656
+ })];
1657
+ }
1658
+ });
1659
+ });
1660
+ };
1661
+ return SelfDecodingBody;
1662
+ }());
1663
+ exports.SelfDecodingBody = SelfDecodingBody;
1664
+ var ResponseContext = (function () {
1665
+ function ResponseContext(httpStatusCode, headers, body) {
1666
+ this.httpStatusCode = httpStatusCode;
1667
+ this.headers = headers;
1668
+ this.body = body;
1669
+ }
1670
+ ResponseContext.prototype.getParsedHeader = function (headerName) {
1671
+ var result = {};
1672
+ if (!this.headers[headerName]) {
1673
+ return result;
1674
+ }
1675
+ var parameters = this.headers[headerName].split(";");
1676
+ for (var _i = 0, parameters_1 = parameters; _i < parameters_1.length; _i++) {
1677
+ var parameter = parameters_1[_i];
1678
+ var _a = parameter.split("=", 2), key = _a[0], value = _a[1];
1679
+ key = key.toLowerCase().trim();
1680
+ if (value === undefined) {
1681
+ result[""] = key;
1682
+ }
1683
+ else {
1684
+ value = value.trim();
1685
+ if (value.startsWith('"') && value.endsWith('"')) {
1686
+ value = value.substring(1, value.length - 1);
1687
+ }
1688
+ result[key] = value;
1689
+ }
1690
+ }
1691
+ return result;
1692
+ };
1693
+ ResponseContext.prototype.getBodyAsFile = function () {
1694
+ return __awaiter(this, void 0, void 0, function () {
1695
+ var data, fileName, contentType;
1696
+ return __generator(this, function (_a) {
1697
+ switch (_a.label) {
1698
+ case 0: return [4, this.body.binary()];
1699
+ case 1:
1700
+ data = _a.sent();
1701
+ fileName = this.getParsedHeader("content-disposition")["filename"] || "";
1702
+ contentType = this.headers["content-type"] || "";
1703
+ try {
1704
+ return [2, new File([data], fileName, { type: contentType })];
1705
+ }
1706
+ catch (error) {
1707
+ return [2, Object.assign(data, {
1708
+ name: fileName,
1709
+ type: contentType
1710
+ })];
1711
+ }
1712
+ return [2];
1713
+ }
1714
+ });
1715
+ });
1716
+ };
1717
+ ResponseContext.prototype.getBodyAsAny = function () {
1718
+ try {
1719
+ return this.body.text();
1720
+ }
1721
+ catch (_a) { }
1722
+ try {
1723
+ return this.body.binary();
1724
+ }
1725
+ catch (_b) { }
1726
+ return Promise.resolve(undefined);
1727
+ };
1728
+ return ResponseContext;
1729
+ }());
1730
+ exports.ResponseContext = ResponseContext;
1731
+ function wrapHttpLibrary(promiseHttpLibrary) {
1732
+ return {
1733
+ send: function (request) {
1734
+ return (0, rxjsStub.from)(promiseHttpLibrary.send(request));
1735
+ }
1736
+ };
1737
+ }
1738
+ exports.wrapHttpLibrary = wrapHttpLibrary;
1739
+ //# sourceMappingURL=http.js.map
1740
+ });
1741
+
1742
+ var auth = imageSearch_store.createCommonjsModule(function (module, exports) {
1743
+ var __awaiter = (imageSearch_store.commonjsGlobal && imageSearch_store.commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) {
1744
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1745
+ return new (P || (P = Promise))(function (resolve, reject) {
1746
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
1747
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
1748
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
1749
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
1750
+ });
1751
+ };
1752
+ var __generator = (imageSearch_store.commonjsGlobal && imageSearch_store.commonjsGlobal.__generator) || function (thisArg, body) {
1753
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
1754
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
1755
+ function verb(n) { return function (v) { return step([n, v]); }; }
1756
+ function step(op) {
1757
+ if (f) throw new TypeError("Generator is already executing.");
1758
+ while (_) try {
1759
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
1760
+ if (y = 0, t) op = [op[0] & 2, t.value];
1761
+ switch (op[0]) {
1762
+ case 0: case 1: t = op; break;
1763
+ case 4: _.label++; return { value: op[1], done: false };
1764
+ case 5: _.label++; y = op[1]; op = [0]; continue;
1765
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
1766
+ default:
1767
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
1768
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
1769
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
1770
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
1771
+ if (t[2]) _.ops.pop();
1772
+ _.trys.pop(); continue;
1773
+ }
1774
+ op = body.call(thisArg, _);
1775
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
1776
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
1777
+ }
1778
+ };
1779
+ Object.defineProperty(exports, "__esModule", { value: true });
1780
+ exports.configureAuthMethods = exports.BearerAuthAuthentication = void 0;
1781
+ var BearerAuthAuthentication = (function () {
1782
+ function BearerAuthAuthentication(tokenProvider) {
1783
+ this.tokenProvider = tokenProvider;
1784
+ }
1785
+ BearerAuthAuthentication.prototype.getName = function () {
1786
+ return "bearerAuth";
1787
+ };
1788
+ BearerAuthAuthentication.prototype.applySecurityAuthentication = function (context) {
1789
+ return __awaiter(this, void 0, void 0, function () {
1790
+ var _a, _b, _c, _d;
1791
+ return __generator(this, function (_e) {
1792
+ switch (_e.label) {
1793
+ case 0:
1794
+ _b = (_a = context).setHeaderParam;
1795
+ _c = ["Authorization"];
1796
+ _d = "Bearer ";
1797
+ return [4, this.tokenProvider.getToken()];
1798
+ case 1:
1799
+ _b.apply(_a, _c.concat([_d + (_e.sent())]));
1800
+ return [2];
1801
+ }
1802
+ });
1803
+ });
1804
+ };
1805
+ return BearerAuthAuthentication;
1806
+ }());
1807
+ exports.BearerAuthAuthentication = BearerAuthAuthentication;
1808
+ function configureAuthMethods(config) {
1809
+ var authMethods = {};
1810
+ if (!config) {
1811
+ return authMethods;
1812
+ }
1813
+ authMethods["default"] = config["default"];
1814
+ if (config["bearerAuth"]) {
1815
+ authMethods["bearerAuth"] = new BearerAuthAuthentication(config["bearerAuth"]["tokenProvider"]);
1816
+ }
1817
+ return authMethods;
1818
+ }
1819
+ exports.configureAuthMethods = configureAuthMethods;
1820
+ //# sourceMappingURL=auth.js.map
1821
+ });
1822
+
1823
+ var ErrorObject_1 = imageSearch_store.createCommonjsModule(function (module, exports) {
1824
+ Object.defineProperty(exports, "__esModule", { value: true });
1825
+ exports.ErrorObject = void 0;
1826
+ var ErrorObject = (function () {
1827
+ function ErrorObject() {
1828
+ }
1829
+ ErrorObject.getAttributeTypeMap = function () {
1830
+ return ErrorObject.attributeTypeMap;
1831
+ };
1832
+ ErrorObject.discriminator = undefined;
1833
+ ErrorObject.attributeTypeMap = [
1834
+ {
1835
+ "name": "domain",
1836
+ "baseName": "domain",
1837
+ "type": "string",
1838
+ "format": ""
1839
+ },
1840
+ {
1841
+ "name": "reason",
1842
+ "baseName": "reason",
1843
+ "type": "string",
1844
+ "format": ""
1845
+ },
1846
+ {
1847
+ "name": "message",
1848
+ "baseName": "message",
1849
+ "type": "string",
1850
+ "format": ""
1851
+ },
1852
+ {
1853
+ "name": "location",
1854
+ "baseName": "location",
1855
+ "type": "string",
1856
+ "format": ""
1857
+ },
1858
+ {
1859
+ "name": "location_type",
1860
+ "baseName": "location_type",
1861
+ "type": "string",
1862
+ "format": ""
1863
+ },
1864
+ {
1865
+ "name": "extended_help",
1866
+ "baseName": "extended_help",
1867
+ "type": "string",
1868
+ "format": ""
1869
+ },
1870
+ {
1871
+ "name": "send_report",
1872
+ "baseName": "send_report",
1873
+ "type": "string",
1874
+ "format": ""
1875
+ }
1876
+ ];
1877
+ return ErrorObject;
1878
+ }());
1879
+ exports.ErrorObject = ErrorObject;
1880
+ //# sourceMappingURL=ErrorObject.js.map
1881
+ });
1882
+
1883
+ var ErrorResponse_1 = imageSearch_store.createCommonjsModule(function (module, exports) {
1884
+ Object.defineProperty(exports, "__esModule", { value: true });
1885
+ exports.ErrorResponse = void 0;
1886
+ var ErrorResponse = (function () {
1887
+ function ErrorResponse() {
1888
+ }
1889
+ ErrorResponse.getAttributeTypeMap = function () {
1890
+ return ErrorResponse.attributeTypeMap;
1891
+ };
1892
+ ErrorResponse.discriminator = undefined;
1893
+ ErrorResponse.attributeTypeMap = [
1894
+ {
1895
+ "name": "code",
1896
+ "baseName": "code",
1897
+ "type": "number",
1898
+ "format": ""
1899
+ },
1900
+ {
1901
+ "name": "message",
1902
+ "baseName": "message",
1903
+ "type": "string",
1904
+ "format": ""
1905
+ },
1906
+ {
1907
+ "name": "errors",
1908
+ "baseName": "errors",
1909
+ "type": "Array<ErrorObject>",
1910
+ "format": ""
1911
+ }
1912
+ ];
1913
+ return ErrorResponse;
1914
+ }());
1915
+ exports.ErrorResponse = ErrorResponse;
1916
+ //# sourceMappingURL=ErrorResponse.js.map
1917
+ });
1918
+
1919
+ var Event_1 = imageSearch_store.createCommonjsModule(function (module, exports) {
1920
+ Object.defineProperty(exports, "__esModule", { value: true });
1921
+ exports.Event = void 0;
1922
+ var Event = (function () {
1923
+ function Event() {
1924
+ this.typ = "Event";
1925
+ }
1926
+ Event.getAttributeTypeMap = function () {
1927
+ return Event.attributeTypeMap;
1928
+ };
1929
+ Event.discriminator = "typ";
1930
+ Event.attributeTypeMap = [
1931
+ {
1932
+ "name": "session_id",
1933
+ "baseName": "session_id",
1934
+ "type": "string",
1935
+ "format": ""
1936
+ },
1937
+ {
1938
+ "name": "typ",
1939
+ "baseName": "typ",
1940
+ "type": "string",
1941
+ "format": ""
1942
+ }
1943
+ ];
1944
+ return Event;
1945
+ }());
1946
+ exports.Event = Event;
1947
+ //# sourceMappingURL=Event.js.map
1948
+ });
1949
+
1950
+ var EventConfirmation_1 = imageSearch_store.createCommonjsModule(function (module, exports) {
1951
+ Object.defineProperty(exports, "__esModule", { value: true });
1952
+ exports.EventConfirmation = void 0;
1953
+ var EventConfirmation = (function () {
1954
+ function EventConfirmation() {
1955
+ }
1956
+ EventConfirmation.getAttributeTypeMap = function () {
1957
+ return EventConfirmation.attributeTypeMap;
1958
+ };
1959
+ EventConfirmation.discriminator = undefined;
1960
+ EventConfirmation.attributeTypeMap = [
1961
+ {
1962
+ "name": "status",
1963
+ "baseName": "status",
1964
+ "type": "EventConfirmationStatusEnum",
1965
+ "format": ""
1966
+ }
1967
+ ];
1968
+ return EventConfirmation;
1969
+ }());
1970
+ exports.EventConfirmation = EventConfirmation;
1971
+ //# sourceMappingURL=EventConfirmation.js.map
1972
+ });
1973
+
1974
+ var FilterAction = imageSearch_store.createCommonjsModule(function (module, exports) {
1975
+ Object.defineProperty(exports, "__esModule", { value: true });
1976
+ //# sourceMappingURL=FilterAction.js.map
1977
+ });
1978
+
1979
+ var FilterEvent_1 = imageSearch_store.createCommonjsModule(function (module, exports) {
1980
+ var __extends = (imageSearch_store.commonjsGlobal && imageSearch_store.commonjsGlobal.__extends) || (function () {
1981
+ var extendStatics = function (d, b) {
1982
+ extendStatics = Object.setPrototypeOf ||
1983
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
1984
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
1985
+ return extendStatics(d, b);
1986
+ };
1987
+ return function (d, b) {
1988
+ if (typeof b !== "function" && b !== null)
1989
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
1990
+ extendStatics(d, b);
1991
+ function __() { this.constructor = d; }
1992
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1993
+ };
1994
+ })();
1995
+ Object.defineProperty(exports, "__esModule", { value: true });
1996
+ exports.FilterEvent = void 0;
1997
+
1998
+ var FilterEvent = (function (_super) {
1999
+ __extends(FilterEvent, _super);
2000
+ function FilterEvent() {
2001
+ var _this = _super.call(this) || this;
2002
+ _this.typ = "FilterEvent";
2003
+ return _this;
2004
+ }
2005
+ FilterEvent.getAttributeTypeMap = function () {
2006
+ return _super.getAttributeTypeMap.call(this).concat(FilterEvent.attributeTypeMap);
2007
+ };
2008
+ FilterEvent.discriminator = undefined;
2009
+ FilterEvent.attributeTypeMap = [
2010
+ {
2011
+ "name": "widget",
2012
+ "baseName": "widget",
2013
+ "type": "Widget",
2014
+ "format": ""
2015
+ },
2016
+ {
2017
+ "name": "action",
2018
+ "baseName": "action",
2019
+ "type": "FilterAction",
2020
+ "format": ""
2021
+ },
2022
+ {
2023
+ "name": "kind",
2024
+ "baseName": "kind",
2025
+ "type": "FilterKind",
2026
+ "format": ""
2027
+ }
2028
+ ];
2029
+ return FilterEvent;
2030
+ }(Event_1.Event));
2031
+ exports.FilterEvent = FilterEvent;
2032
+ //# sourceMappingURL=FilterEvent.js.map
2033
+ });
2034
+
2035
+ var FilterEventAllOf_1 = imageSearch_store.createCommonjsModule(function (module, exports) {
2036
+ Object.defineProperty(exports, "__esModule", { value: true });
2037
+ exports.FilterEventAllOf = void 0;
2038
+ var FilterEventAllOf = (function () {
2039
+ function FilterEventAllOf() {
2040
+ }
2041
+ FilterEventAllOf.getAttributeTypeMap = function () {
2042
+ return FilterEventAllOf.attributeTypeMap;
2043
+ };
2044
+ FilterEventAllOf.discriminator = undefined;
2045
+ FilterEventAllOf.attributeTypeMap = [
2046
+ {
2047
+ "name": "widget",
2048
+ "baseName": "widget",
2049
+ "type": "Widget",
2050
+ "format": ""
2051
+ },
2052
+ {
2053
+ "name": "action",
2054
+ "baseName": "action",
2055
+ "type": "FilterAction",
2056
+ "format": ""
2057
+ },
2058
+ {
2059
+ "name": "kind",
2060
+ "baseName": "kind",
2061
+ "type": "FilterKind",
2062
+ "format": ""
2063
+ }
2064
+ ];
2065
+ return FilterEventAllOf;
2066
+ }());
2067
+ exports.FilterEventAllOf = FilterEventAllOf;
2068
+ //# sourceMappingURL=FilterEventAllOf.js.map
2069
+ });
2070
+
2071
+ var FilterKind = imageSearch_store.createCommonjsModule(function (module, exports) {
2072
+ Object.defineProperty(exports, "__esModule", { value: true });
2073
+ //# sourceMappingURL=FilterKind.js.map
2074
+ });
2075
+
2076
+ var ProductClickEvent_1 = imageSearch_store.createCommonjsModule(function (module, exports) {
2077
+ var __extends = (imageSearch_store.commonjsGlobal && imageSearch_store.commonjsGlobal.__extends) || (function () {
2078
+ var extendStatics = function (d, b) {
2079
+ extendStatics = Object.setPrototypeOf ||
2080
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2081
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2082
+ return extendStatics(d, b);
2083
+ };
2084
+ return function (d, b) {
2085
+ if (typeof b !== "function" && b !== null)
2086
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2087
+ extendStatics(d, b);
2088
+ function __() { this.constructor = d; }
2089
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2090
+ };
2091
+ })();
2092
+ Object.defineProperty(exports, "__esModule", { value: true });
2093
+ exports.ProductClickEvent = void 0;
2094
+
2095
+ var ProductClickEvent = (function (_super) {
2096
+ __extends(ProductClickEvent, _super);
2097
+ function ProductClickEvent() {
2098
+ var _this = _super.call(this) || this;
2099
+ _this.typ = "ProductClickEvent";
2100
+ return _this;
2101
+ }
2102
+ ProductClickEvent.getAttributeTypeMap = function () {
2103
+ return _super.getAttributeTypeMap.call(this).concat(ProductClickEvent.attributeTypeMap);
2104
+ };
2105
+ ProductClickEvent.discriminator = undefined;
2106
+ ProductClickEvent.attributeTypeMap = [
2107
+ {
2108
+ "name": "widget",
2109
+ "baseName": "widget",
2110
+ "type": "Widget",
2111
+ "format": ""
2112
+ },
2113
+ {
2114
+ "name": "product",
2115
+ "baseName": "product",
2116
+ "type": "string",
2117
+ "format": ""
2118
+ },
2119
+ {
2120
+ "name": "rank",
2121
+ "baseName": "rank",
2122
+ "type": "number",
2123
+ "format": ""
2124
+ }
2125
+ ];
2126
+ return ProductClickEvent;
2127
+ }(Event_1.Event));
2128
+ exports.ProductClickEvent = ProductClickEvent;
2129
+ //# sourceMappingURL=ProductClickEvent.js.map
2130
+ });
2131
+
2132
+ var ProductViewEvent_1 = imageSearch_store.createCommonjsModule(function (module, exports) {
2133
+ var __extends = (imageSearch_store.commonjsGlobal && imageSearch_store.commonjsGlobal.__extends) || (function () {
2134
+ var extendStatics = function (d, b) {
2135
+ extendStatics = Object.setPrototypeOf ||
2136
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2137
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2138
+ return extendStatics(d, b);
2139
+ };
2140
+ return function (d, b) {
2141
+ if (typeof b !== "function" && b !== null)
2142
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2143
+ extendStatics(d, b);
2144
+ function __() { this.constructor = d; }
2145
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2146
+ };
2147
+ })();
2148
+ Object.defineProperty(exports, "__esModule", { value: true });
2149
+ exports.ProductViewEvent = void 0;
2150
+
2151
+ var ProductViewEvent = (function (_super) {
2152
+ __extends(ProductViewEvent, _super);
2153
+ function ProductViewEvent() {
2154
+ var _this = _super.call(this) || this;
2155
+ _this.typ = "ProductViewEvent";
2156
+ return _this;
2157
+ }
2158
+ ProductViewEvent.getAttributeTypeMap = function () {
2159
+ return _super.getAttributeTypeMap.call(this).concat(ProductViewEvent.attributeTypeMap);
2160
+ };
2161
+ ProductViewEvent.discriminator = undefined;
2162
+ ProductViewEvent.attributeTypeMap = [
2163
+ {
2164
+ "name": "widget",
2165
+ "baseName": "widget",
2166
+ "type": "Widget",
2167
+ "format": ""
2168
+ },
2169
+ {
2170
+ "name": "product",
2171
+ "baseName": "product",
2172
+ "type": "string",
2173
+ "format": ""
2174
+ },
2175
+ {
2176
+ "name": "rank",
2177
+ "baseName": "rank",
2178
+ "type": "number",
2179
+ "format": ""
2180
+ }
2181
+ ];
2182
+ return ProductViewEvent;
2183
+ }(Event_1.Event));
2184
+ exports.ProductViewEvent = ProductViewEvent;
2185
+ //# sourceMappingURL=ProductViewEvent.js.map
2186
+ });
2187
+
2188
+ var ProductViewEventAllOf_1 = imageSearch_store.createCommonjsModule(function (module, exports) {
2189
+ Object.defineProperty(exports, "__esModule", { value: true });
2190
+ exports.ProductViewEventAllOf = void 0;
2191
+ var ProductViewEventAllOf = (function () {
2192
+ function ProductViewEventAllOf() {
2193
+ }
2194
+ ProductViewEventAllOf.getAttributeTypeMap = function () {
2195
+ return ProductViewEventAllOf.attributeTypeMap;
2196
+ };
2197
+ ProductViewEventAllOf.discriminator = undefined;
2198
+ ProductViewEventAllOf.attributeTypeMap = [
2199
+ {
2200
+ "name": "widget",
2201
+ "baseName": "widget",
2202
+ "type": "Widget",
2203
+ "format": ""
2204
+ },
2205
+ {
2206
+ "name": "product",
2207
+ "baseName": "product",
2208
+ "type": "string",
2209
+ "format": ""
2210
+ },
2211
+ {
2212
+ "name": "rank",
2213
+ "baseName": "rank",
2214
+ "type": "number",
2215
+ "format": ""
2216
+ }
2217
+ ];
2218
+ return ProductViewEventAllOf;
2219
+ }());
2220
+ exports.ProductViewEventAllOf = ProductViewEventAllOf;
2221
+ //# sourceMappingURL=ProductViewEventAllOf.js.map
2222
+ });
2223
+
2224
+ var SearchArea = imageSearch_store.createCommonjsModule(function (module, exports) {
2225
+ Object.defineProperty(exports, "__esModule", { value: true });
2226
+ //# sourceMappingURL=SearchArea.js.map
2227
+ });
2228
+
2229
+ var SearchEvent_1 = imageSearch_store.createCommonjsModule(function (module, exports) {
2230
+ var __extends = (imageSearch_store.commonjsGlobal && imageSearch_store.commonjsGlobal.__extends) || (function () {
2231
+ var extendStatics = function (d, b) {
2232
+ extendStatics = Object.setPrototypeOf ||
2233
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2234
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2235
+ return extendStatics(d, b);
2236
+ };
2237
+ return function (d, b) {
2238
+ if (typeof b !== "function" && b !== null)
2239
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2240
+ extendStatics(d, b);
2241
+ function __() { this.constructor = d; }
2242
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2243
+ };
2244
+ })();
2245
+ Object.defineProperty(exports, "__esModule", { value: true });
2246
+ exports.SearchEvent = void 0;
2247
+
2248
+ var SearchEvent = (function (_super) {
2249
+ __extends(SearchEvent, _super);
2250
+ function SearchEvent() {
2251
+ var _this = _super.call(this) || this;
2252
+ _this.typ = "SearchEvent";
2253
+ return _this;
2254
+ }
2255
+ SearchEvent.getAttributeTypeMap = function () {
2256
+ return _super.getAttributeTypeMap.call(this).concat(SearchEvent.attributeTypeMap);
2257
+ };
2258
+ SearchEvent.discriminator = undefined;
2259
+ SearchEvent.attributeTypeMap = [
2260
+ {
2261
+ "name": "widget",
2262
+ "baseName": "widget",
2263
+ "type": "Widget",
2264
+ "format": ""
2265
+ },
2266
+ {
2267
+ "name": "source",
2268
+ "baseName": "source",
2269
+ "type": "SearchImageSource",
2270
+ "format": ""
2271
+ },
2272
+ {
2273
+ "name": "search_area",
2274
+ "baseName": "search_area",
2275
+ "type": "SearchArea",
2276
+ "format": ""
2277
+ }
2278
+ ];
2279
+ return SearchEvent;
2280
+ }(Event_1.Event));
2281
+ exports.SearchEvent = SearchEvent;
2282
+ //# sourceMappingURL=SearchEvent.js.map
2283
+ });
2284
+
2285
+ var SearchEventAllOf_1 = imageSearch_store.createCommonjsModule(function (module, exports) {
2286
+ Object.defineProperty(exports, "__esModule", { value: true });
2287
+ exports.SearchEventAllOf = void 0;
2288
+ var SearchEventAllOf = (function () {
2289
+ function SearchEventAllOf() {
2290
+ }
2291
+ SearchEventAllOf.getAttributeTypeMap = function () {
2292
+ return SearchEventAllOf.attributeTypeMap;
2293
+ };
2294
+ SearchEventAllOf.discriminator = undefined;
2295
+ SearchEventAllOf.attributeTypeMap = [
2296
+ {
2297
+ "name": "widget",
2298
+ "baseName": "widget",
2299
+ "type": "Widget",
2300
+ "format": ""
2301
+ },
2302
+ {
2303
+ "name": "source",
2304
+ "baseName": "source",
2305
+ "type": "SearchImageSource",
2306
+ "format": ""
2307
+ },
2308
+ {
2309
+ "name": "search_area",
2310
+ "baseName": "search_area",
2311
+ "type": "SearchArea",
2312
+ "format": ""
2313
+ }
2314
+ ];
2315
+ return SearchEventAllOf;
2316
+ }());
2317
+ exports.SearchEventAllOf = SearchEventAllOf;
2318
+ //# sourceMappingURL=SearchEventAllOf.js.map
2319
+ });
2320
+
2321
+ var SearchImageSource = imageSearch_store.createCommonjsModule(function (module, exports) {
2322
+ Object.defineProperty(exports, "__esModule", { value: true });
2323
+ //# sourceMappingURL=SearchImageSource.js.map
2324
+ });
2325
+
2326
+ var Widget = imageSearch_store.createCommonjsModule(function (module, exports) {
2327
+ Object.defineProperty(exports, "__esModule", { value: true });
2328
+ //# sourceMappingURL=Widget.js.map
2329
+ });
2330
+
2331
+ var WidgetAction = imageSearch_store.createCommonjsModule(function (module, exports) {
2332
+ Object.defineProperty(exports, "__esModule", { value: true });
2333
+ //# sourceMappingURL=WidgetAction.js.map
2334
+ });
2335
+
2336
+ var WidgetEvent_1 = imageSearch_store.createCommonjsModule(function (module, exports) {
2337
+ var __extends = (imageSearch_store.commonjsGlobal && imageSearch_store.commonjsGlobal.__extends) || (function () {
2338
+ var extendStatics = function (d, b) {
2339
+ extendStatics = Object.setPrototypeOf ||
2340
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2341
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2342
+ return extendStatics(d, b);
2343
+ };
2344
+ return function (d, b) {
2345
+ if (typeof b !== "function" && b !== null)
2346
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2347
+ extendStatics(d, b);
2348
+ function __() { this.constructor = d; }
2349
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2350
+ };
2351
+ })();
2352
+ Object.defineProperty(exports, "__esModule", { value: true });
2353
+ exports.WidgetEvent = void 0;
2354
+
2355
+ var WidgetEvent = (function (_super) {
2356
+ __extends(WidgetEvent, _super);
2357
+ function WidgetEvent() {
2358
+ var _this = _super.call(this) || this;
2359
+ _this.typ = "WidgetEvent";
2360
+ return _this;
2361
+ }
2362
+ WidgetEvent.getAttributeTypeMap = function () {
2363
+ return _super.getAttributeTypeMap.call(this).concat(WidgetEvent.attributeTypeMap);
2364
+ };
2365
+ WidgetEvent.discriminator = undefined;
2366
+ WidgetEvent.attributeTypeMap = [
2367
+ {
2368
+ "name": "widget",
2369
+ "baseName": "widget",
2370
+ "type": "Widget",
2371
+ "format": ""
2372
+ },
2373
+ {
2374
+ "name": "action",
2375
+ "baseName": "action",
2376
+ "type": "WidgetAction",
2377
+ "format": ""
2378
+ }
2379
+ ];
2380
+ return WidgetEvent;
2381
+ }(Event_1.Event));
2382
+ exports.WidgetEvent = WidgetEvent;
2383
+ //# sourceMappingURL=WidgetEvent.js.map
2384
+ });
2385
+
2386
+ var WidgetEventAllOf_1 = imageSearch_store.createCommonjsModule(function (module, exports) {
2387
+ Object.defineProperty(exports, "__esModule", { value: true });
2388
+ exports.WidgetEventAllOf = void 0;
2389
+ var WidgetEventAllOf = (function () {
2390
+ function WidgetEventAllOf() {
2391
+ }
2392
+ WidgetEventAllOf.getAttributeTypeMap = function () {
2393
+ return WidgetEventAllOf.attributeTypeMap;
2394
+ };
2395
+ WidgetEventAllOf.discriminator = undefined;
2396
+ WidgetEventAllOf.attributeTypeMap = [
2397
+ {
2398
+ "name": "widget",
2399
+ "baseName": "widget",
2400
+ "type": "Widget",
2401
+ "format": ""
2402
+ },
2403
+ {
2404
+ "name": "action",
2405
+ "baseName": "action",
2406
+ "type": "WidgetAction",
2407
+ "format": ""
2408
+ }
2409
+ ];
2410
+ return WidgetEventAllOf;
2411
+ }());
2412
+ exports.WidgetEventAllOf = WidgetEventAllOf;
2413
+ //# sourceMappingURL=WidgetEventAllOf.js.map
2414
+ });
2415
+
2416
+ var all = imageSearch_store.createCommonjsModule(function (module, exports) {
2417
+ var __createBinding = (imageSearch_store.commonjsGlobal && imageSearch_store.commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2418
+ if (k2 === undefined) k2 = k;
2419
+ var desc = Object.getOwnPropertyDescriptor(m, k);
2420
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
2421
+ desc = { enumerable: true, get: function() { return m[k]; } };
2422
+ }
2423
+ Object.defineProperty(o, k2, desc);
2424
+ }) : (function(o, m, k, k2) {
2425
+ if (k2 === undefined) k2 = k;
2426
+ o[k2] = m[k];
2427
+ }));
2428
+ var __exportStar = (imageSearch_store.commonjsGlobal && imageSearch_store.commonjsGlobal.__exportStar) || function(m, exports) {
2429
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2430
+ };
2431
+ Object.defineProperty(exports, "__esModule", { value: true });
2432
+ __exportStar(ErrorObject_1, exports);
2433
+ __exportStar(ErrorResponse_1, exports);
2434
+ __exportStar(Event_1, exports);
2435
+ __exportStar(EventConfirmation_1, exports);
2436
+ __exportStar(FilterAction, exports);
2437
+ __exportStar(FilterEvent_1, exports);
2438
+ __exportStar(FilterEventAllOf_1, exports);
2439
+ __exportStar(FilterKind, exports);
2440
+ __exportStar(ProductClickEvent_1, exports);
2441
+ __exportStar(ProductViewEvent_1, exports);
2442
+ __exportStar(ProductViewEventAllOf_1, exports);
2443
+ __exportStar(SearchArea, exports);
2444
+ __exportStar(SearchEvent_1, exports);
2445
+ __exportStar(SearchEventAllOf_1, exports);
2446
+ __exportStar(SearchImageSource, exports);
2447
+ __exportStar(Widget, exports);
2448
+ __exportStar(WidgetAction, exports);
2449
+ __exportStar(WidgetEvent_1, exports);
2450
+ __exportStar(WidgetEventAllOf_1, exports);
2451
+ //# sourceMappingURL=all.js.map
2452
+ });
2453
+
2454
+ var middleware = imageSearch_store.createCommonjsModule(function (module, exports) {
2455
+ Object.defineProperty(exports, "__esModule", { value: true });
2456
+ exports.PromiseMiddlewareWrapper = void 0;
2457
+
2458
+ var PromiseMiddlewareWrapper = (function () {
2459
+ function PromiseMiddlewareWrapper(middleware) {
2460
+ this.middleware = middleware;
2461
+ }
2462
+ PromiseMiddlewareWrapper.prototype.pre = function (context) {
2463
+ return (0, rxjsStub.from)(this.middleware.pre(context));
2464
+ };
2465
+ PromiseMiddlewareWrapper.prototype.post = function (context) {
2466
+ return (0, rxjsStub.from)(this.middleware.post(context));
2467
+ };
2468
+ return PromiseMiddlewareWrapper;
2469
+ }());
2470
+ exports.PromiseMiddlewareWrapper = PromiseMiddlewareWrapper;
2471
+ //# sourceMappingURL=middleware.js.map
2472
+ });
2473
+
2474
+ var servers = imageSearch_store.createCommonjsModule(function (module, exports) {
2475
+ Object.defineProperty(exports, "__esModule", { value: true });
2476
+ exports.servers = exports.server2 = exports.server1 = exports.ServerConfiguration = void 0;
2477
+
2478
+ var ServerConfiguration = (function () {
2479
+ function ServerConfiguration(url, variableConfiguration) {
2480
+ this.url = url;
2481
+ this.variableConfiguration = variableConfiguration;
2482
+ }
2483
+ ServerConfiguration.prototype.setVariables = function (variableConfiguration) {
2484
+ Object.assign(this.variableConfiguration, variableConfiguration);
2485
+ };
2486
+ ServerConfiguration.prototype.getConfiguration = function () {
2487
+ return this.variableConfiguration;
2488
+ };
2489
+ ServerConfiguration.prototype.getUrl = function () {
2490
+ var replacedUrl = this.url;
2491
+ for (var key in this.variableConfiguration) {
2492
+ var re = new RegExp("{" + key + "}", "g");
2493
+ replacedUrl = replacedUrl.replace(re, this.variableConfiguration[key]);
2494
+ }
2495
+ return replacedUrl;
2496
+ };
2497
+ ServerConfiguration.prototype.makeRequestContext = function (endpoint, httpMethod) {
2498
+ return new http.RequestContext(this.getUrl() + endpoint, httpMethod);
2499
+ };
2500
+ return ServerConfiguration;
2501
+ }());
2502
+ exports.ServerConfiguration = ServerConfiguration;
2503
+ exports.server1 = new ServerConfiguration("https://tracking.vviinn.com", {});
2504
+ exports.server2 = new ServerConfiguration("https://tracking.stage.vviinn.com", {});
2505
+ exports.servers = [exports.server1, exports.server2];
2506
+ //# sourceMappingURL=servers.js.map
2507
+ });
2508
+
2509
+ var configuration = imageSearch_store.createCommonjsModule(function (module, exports) {
2510
+ Object.defineProperty(exports, "__esModule", { value: true });
2511
+ exports.createConfiguration = void 0;
2512
+
2513
+
2514
+
2515
+
2516
+ function createConfiguration(conf) {
2517
+ if (conf === void 0) { conf = {}; }
2518
+ var configuration = {
2519
+ baseServer: conf.baseServer !== undefined ? conf.baseServer : servers.server1,
2520
+ httpApi: conf.httpApi || new isomorphicFetch.IsomorphicFetchHttpLibrary(),
2521
+ middleware: conf.middleware || [],
2522
+ authMethods: (0, auth.configureAuthMethods)(conf.authMethods)
2523
+ };
2524
+ if (conf.promiseMiddleware) {
2525
+ conf.promiseMiddleware.forEach(function (m) { return configuration.middleware.push(new middleware.PromiseMiddlewareWrapper(m)); });
2526
+ }
2527
+ return configuration;
2528
+ }
2529
+ exports.createConfiguration = createConfiguration;
2530
+ //# sourceMappingURL=configuration.js.map
2531
+ });
2532
+
2533
+ var exception = imageSearch_store.createCommonjsModule(function (module, exports) {
2534
+ var __extends = (imageSearch_store.commonjsGlobal && imageSearch_store.commonjsGlobal.__extends) || (function () {
2535
+ var extendStatics = function (d, b) {
2536
+ extendStatics = Object.setPrototypeOf ||
2537
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2538
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2539
+ return extendStatics(d, b);
2540
+ };
2541
+ return function (d, b) {
2542
+ if (typeof b !== "function" && b !== null)
2543
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2544
+ extendStatics(d, b);
2545
+ function __() { this.constructor = d; }
2546
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2547
+ };
2548
+ })();
2549
+ Object.defineProperty(exports, "__esModule", { value: true });
2550
+ exports.ApiException = void 0;
2551
+ var ApiException = (function (_super) {
2552
+ __extends(ApiException, _super);
2553
+ function ApiException(code, message, body, headers) {
2554
+ var _this = _super.call(this, "HTTP-Code: " + code + "\nMessage: " + message + "\nBody: " + JSON.stringify(body) + "\nHeaders: " +
2555
+ JSON.stringify(headers)) || this;
2556
+ _this.code = code;
2557
+ _this.body = body;
2558
+ _this.headers = headers;
2559
+ return _this;
2560
+ }
2561
+ return ApiException;
2562
+ }(Error));
2563
+ exports.ApiException = ApiException;
2564
+ //# sourceMappingURL=exception.js.map
2565
+ });
2566
+
2567
+ var baseapi = imageSearch_store.createCommonjsModule(function (module, exports) {
2568
+ var __extends = (imageSearch_store.commonjsGlobal && imageSearch_store.commonjsGlobal.__extends) || (function () {
2569
+ var extendStatics = function (d, b) {
2570
+ extendStatics = Object.setPrototypeOf ||
2571
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2572
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2573
+ return extendStatics(d, b);
2574
+ };
2575
+ return function (d, b) {
2576
+ if (typeof b !== "function" && b !== null)
2577
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2578
+ extendStatics(d, b);
2579
+ function __() { this.constructor = d; }
2580
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2581
+ };
2582
+ })();
2583
+ Object.defineProperty(exports, "__esModule", { value: true });
2584
+ exports.RequiredError = exports.BaseAPIRequestFactory = exports.COLLECTION_FORMATS = void 0;
2585
+ exports.COLLECTION_FORMATS = {
2586
+ csv: ",",
2587
+ ssv: " ",
2588
+ tsv: "\t",
2589
+ pipes: "|",
2590
+ };
2591
+ var BaseAPIRequestFactory = (function () {
2592
+ function BaseAPIRequestFactory(configuration) {
2593
+ this.configuration = configuration;
2594
+ }
2595
+ return BaseAPIRequestFactory;
2596
+ }());
2597
+ exports.BaseAPIRequestFactory = BaseAPIRequestFactory;
2598
+ var RequiredError = (function (_super) {
2599
+ __extends(RequiredError, _super);
2600
+ function RequiredError(api, method, field) {
2601
+ var _this = _super.call(this, "Required parameter " + field + " was null or undefined when calling " + api + "." + method + ".") || this;
2602
+ _this.api = api;
2603
+ _this.method = method;
2604
+ _this.field = field;
2605
+ _this.name = "RequiredError";
2606
+ return _this;
2607
+ }
2608
+ return RequiredError;
2609
+ }(Error));
2610
+ exports.RequiredError = RequiredError;
2611
+ //# sourceMappingURL=baseapi.js.map
2612
+ });
2613
+
2614
+ var ObjectSerializer_1 = imageSearch_store.createCommonjsModule(function (module, exports) {
2615
+ var __createBinding = (imageSearch_store.commonjsGlobal && imageSearch_store.commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2616
+ if (k2 === undefined) k2 = k;
2617
+ var desc = Object.getOwnPropertyDescriptor(m, k);
2618
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
2619
+ desc = { enumerable: true, get: function() { return m[k]; } };
2620
+ }
2621
+ Object.defineProperty(o, k2, desc);
2622
+ }) : (function(o, m, k, k2) {
2623
+ if (k2 === undefined) k2 = k;
2624
+ o[k2] = m[k];
2625
+ }));
2626
+ var __exportStar = (imageSearch_store.commonjsGlobal && imageSearch_store.commonjsGlobal.__exportStar) || function(m, exports) {
2627
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2628
+ };
2629
+ Object.defineProperty(exports, "__esModule", { value: true });
2630
+ exports.ObjectSerializer = void 0;
2631
+ __exportStar(ErrorObject_1, exports);
2632
+ __exportStar(ErrorResponse_1, exports);
2633
+ __exportStar(Event_1, exports);
2634
+ __exportStar(EventConfirmation_1, exports);
2635
+ __exportStar(FilterAction, exports);
2636
+ __exportStar(FilterEvent_1, exports);
2637
+ __exportStar(FilterEventAllOf_1, exports);
2638
+ __exportStar(FilterKind, exports);
2639
+ __exportStar(ProductClickEvent_1, exports);
2640
+ __exportStar(ProductViewEvent_1, exports);
2641
+ __exportStar(ProductViewEventAllOf_1, exports);
2642
+ __exportStar(SearchArea, exports);
2643
+ __exportStar(SearchEvent_1, exports);
2644
+ __exportStar(SearchEventAllOf_1, exports);
2645
+ __exportStar(SearchImageSource, exports);
2646
+ __exportStar(Widget, exports);
2647
+ __exportStar(WidgetAction, exports);
2648
+ __exportStar(WidgetEvent_1, exports);
2649
+ __exportStar(WidgetEventAllOf_1, exports);
2650
+ var ErrorObject_1$1 = ErrorObject_1;
2651
+ var ErrorResponse_1$1 = ErrorResponse_1;
2652
+ var Event_1$1 = Event_1;
2653
+ var EventConfirmation_1$1 = EventConfirmation_1;
2654
+ var FilterEvent_1$1 = FilterEvent_1;
2655
+ var FilterEventAllOf_1$1 = FilterEventAllOf_1;
2656
+ var ProductClickEvent_1$1 = ProductClickEvent_1;
2657
+ var ProductViewEvent_1$1 = ProductViewEvent_1;
2658
+ var ProductViewEventAllOf_1$1 = ProductViewEventAllOf_1;
2659
+ var SearchEvent_1$1 = SearchEvent_1;
2660
+ var SearchEventAllOf_1$1 = SearchEventAllOf_1;
2661
+ var WidgetEvent_1$1 = WidgetEvent_1;
2662
+ var WidgetEventAllOf_1$1 = WidgetEventAllOf_1;
2663
+ var primitives = [
2664
+ "string",
2665
+ "boolean",
2666
+ "double",
2667
+ "integer",
2668
+ "long",
2669
+ "float",
2670
+ "number",
2671
+ "any"
2672
+ ];
2673
+ var supportedMediaTypes = {
2674
+ "application/json": Infinity,
2675
+ "application/octet-stream": 0,
2676
+ "application/x-www-form-urlencoded": 0
2677
+ };
2678
+ var enumsMap = new Set([
2679
+ "EventConfirmationStatusEnum",
2680
+ "FilterAction",
2681
+ "FilterKind",
2682
+ "SearchArea",
2683
+ "SearchImageSource",
2684
+ "Widget",
2685
+ "WidgetAction",
2686
+ ]);
2687
+ var typeMap = {
2688
+ "ErrorObject": ErrorObject_1$1.ErrorObject,
2689
+ "ErrorResponse": ErrorResponse_1$1.ErrorResponse,
2690
+ "Event": Event_1$1.Event,
2691
+ "EventConfirmation": EventConfirmation_1$1.EventConfirmation,
2692
+ "FilterEvent": FilterEvent_1$1.FilterEvent,
2693
+ "FilterEventAllOf": FilterEventAllOf_1$1.FilterEventAllOf,
2694
+ "ProductClickEvent": ProductClickEvent_1$1.ProductClickEvent,
2695
+ "ProductViewEvent": ProductViewEvent_1$1.ProductViewEvent,
2696
+ "ProductViewEventAllOf": ProductViewEventAllOf_1$1.ProductViewEventAllOf,
2697
+ "SearchEvent": SearchEvent_1$1.SearchEvent,
2698
+ "SearchEventAllOf": SearchEventAllOf_1$1.SearchEventAllOf,
2699
+ "WidgetEvent": WidgetEvent_1$1.WidgetEvent,
2700
+ "WidgetEventAllOf": WidgetEventAllOf_1$1.WidgetEventAllOf,
2701
+ };
2702
+ var ObjectSerializer = (function () {
2703
+ function ObjectSerializer() {
2704
+ }
2705
+ ObjectSerializer.findCorrectType = function (data, expectedType) {
2706
+ if (data == undefined) {
2707
+ return expectedType;
2708
+ }
2709
+ else if (primitives.indexOf(expectedType.toLowerCase()) !== -1) {
2710
+ return expectedType;
2711
+ }
2712
+ else if (expectedType === "Date") {
2713
+ return expectedType;
2714
+ }
2715
+ else {
2716
+ if (enumsMap.has(expectedType)) {
2717
+ return expectedType;
2718
+ }
2719
+ if (!typeMap[expectedType]) {
2720
+ return expectedType;
2721
+ }
2722
+ var discriminatorProperty = typeMap[expectedType].discriminator;
2723
+ if (discriminatorProperty == null) {
2724
+ return expectedType;
2725
+ }
2726
+ else {
2727
+ if (data[discriminatorProperty]) {
2728
+ var discriminatorType = data[discriminatorProperty];
2729
+ if (typeMap[discriminatorType]) {
2730
+ return discriminatorType;
2731
+ }
2732
+ else {
2733
+ return expectedType;
2734
+ }
2735
+ }
2736
+ else {
2737
+ return expectedType;
2738
+ }
2739
+ }
2740
+ }
2741
+ };
2742
+ ObjectSerializer.serialize = function (data, type, format) {
2743
+ if (data == undefined) {
2744
+ return data;
2745
+ }
2746
+ else if (primitives.indexOf(type.toLowerCase()) !== -1) {
2747
+ return data;
2748
+ }
2749
+ else if (type.lastIndexOf("Array<", 0) === 0) {
2750
+ var subType = type.replace("Array<", "");
2751
+ subType = subType.substring(0, subType.length - 1);
2752
+ var transformedData = [];
2753
+ for (var index in data) {
2754
+ var date = data[index];
2755
+ transformedData.push(ObjectSerializer.serialize(date, subType, format));
2756
+ }
2757
+ return transformedData;
2758
+ }
2759
+ else if (type === "Date") {
2760
+ if (format == "date") {
2761
+ var month = data.getMonth() + 1;
2762
+ month = month < 10 ? "0" + month.toString() : month.toString();
2763
+ var day = data.getDate();
2764
+ day = day < 10 ? "0" + day.toString() : day.toString();
2765
+ return data.getFullYear() + "-" + month + "-" + day;
2766
+ }
2767
+ else {
2768
+ return data.toISOString();
2769
+ }
2770
+ }
2771
+ else {
2772
+ if (enumsMap.has(type)) {
2773
+ return data;
2774
+ }
2775
+ if (!typeMap[type]) {
2776
+ return data;
2777
+ }
2778
+ type = this.findCorrectType(data, type);
2779
+ var attributeTypes = typeMap[type].getAttributeTypeMap();
2780
+ var instance = {};
2781
+ for (var index in attributeTypes) {
2782
+ var attributeType = attributeTypes[index];
2783
+ instance[attributeType.baseName] = ObjectSerializer.serialize(data[attributeType.name], attributeType.type, attributeType.format);
2784
+ }
2785
+ return instance;
2786
+ }
2787
+ };
2788
+ ObjectSerializer.deserialize = function (data, type, format) {
2789
+ type = ObjectSerializer.findCorrectType(data, type);
2790
+ if (data == undefined) {
2791
+ return data;
2792
+ }
2793
+ else if (primitives.indexOf(type.toLowerCase()) !== -1) {
2794
+ return data;
2795
+ }
2796
+ else if (type.lastIndexOf("Array<", 0) === 0) {
2797
+ var subType = type.replace("Array<", "");
2798
+ subType = subType.substring(0, subType.length - 1);
2799
+ var transformedData = [];
2800
+ for (var index in data) {
2801
+ var date = data[index];
2802
+ transformedData.push(ObjectSerializer.deserialize(date, subType, format));
2803
+ }
2804
+ return transformedData;
2805
+ }
2806
+ else if (type === "Date") {
2807
+ return new Date(data);
2808
+ }
2809
+ else {
2810
+ if (enumsMap.has(type)) {
2811
+ return data;
2812
+ }
2813
+ if (!typeMap[type]) {
2814
+ return data;
2815
+ }
2816
+ var instance = new typeMap[type]();
2817
+ var attributeTypes = typeMap[type].getAttributeTypeMap();
2818
+ for (var index in attributeTypes) {
2819
+ var attributeType = attributeTypes[index];
2820
+ instance[attributeType.name] = ObjectSerializer.deserialize(data[attributeType.baseName], attributeType.type, attributeType.format);
2821
+ }
2822
+ return instance;
2823
+ }
2824
+ };
2825
+ ObjectSerializer.normalizeMediaType = function (mediaType) {
2826
+ if (mediaType === undefined) {
2827
+ return undefined;
2828
+ }
2829
+ return mediaType.split(";")[0].trim().toLowerCase();
2830
+ };
2831
+ ObjectSerializer.getPreferredMediaType = function (mediaTypes) {
2832
+ if (!mediaTypes) {
2833
+ return "application/json";
2834
+ }
2835
+ var normalMediaTypes = mediaTypes.map(this.normalizeMediaType);
2836
+ var selectedMediaType = undefined;
2837
+ var selectedRank = -Infinity;
2838
+ for (var _i = 0, normalMediaTypes_1 = normalMediaTypes; _i < normalMediaTypes_1.length; _i++) {
2839
+ var mediaType = normalMediaTypes_1[_i];
2840
+ if (supportedMediaTypes[mediaType] > selectedRank) {
2841
+ selectedMediaType = mediaType;
2842
+ selectedRank = supportedMediaTypes[mediaType];
2843
+ }
2844
+ }
2845
+ if (selectedMediaType === undefined) {
2846
+ throw new Error("None of the given media types are supported: " + mediaTypes.join(", "));
2847
+ }
2848
+ return selectedMediaType;
2849
+ };
2850
+ ObjectSerializer.stringify = function (data, mediaType) {
2851
+ if (mediaType === "application/json") {
2852
+ return JSON.stringify(data);
2853
+ }
2854
+ throw new Error("The mediaType " + mediaType + " is not supported by ObjectSerializer.stringify.");
2855
+ };
2856
+ ObjectSerializer.parse = function (rawData, mediaType) {
2857
+ if (mediaType === undefined) {
2858
+ throw new Error("Cannot parse content. No Content-Type defined.");
2859
+ }
2860
+ if (mediaType === "application/json") {
2861
+ return JSON.parse(rawData);
2862
+ }
2863
+ throw new Error("The mediaType " + mediaType + " is not supported by ObjectSerializer.parse.");
2864
+ };
2865
+ return ObjectSerializer;
2866
+ }());
2867
+ exports.ObjectSerializer = ObjectSerializer;
2868
+ //# sourceMappingURL=ObjectSerializer.js.map
2869
+ });
2870
+
2871
+ var util = imageSearch_store.createCommonjsModule(function (module, exports) {
2872
+ Object.defineProperty(exports, "__esModule", { value: true });
2873
+ exports.canConsumeForm = exports.isCodeInRange = void 0;
2874
+ function isCodeInRange(codeRange, code) {
2875
+ if (codeRange === "0") {
2876
+ return true;
2877
+ }
2878
+ if (codeRange == code.toString()) {
2879
+ return true;
2880
+ }
2881
+ else {
2882
+ var codeString = code.toString();
2883
+ if (codeString.length != codeRange.length) {
2884
+ return false;
2885
+ }
2886
+ for (var i = 0; i < codeString.length; i++) {
2887
+ if (codeRange.charAt(i) != "X" && codeRange.charAt(i) != codeString.charAt(i)) {
2888
+ return false;
2889
+ }
2890
+ }
2891
+ return true;
2892
+ }
2893
+ }
2894
+ exports.isCodeInRange = isCodeInRange;
2895
+ function canConsumeForm(contentTypes) {
2896
+ return contentTypes.indexOf('multipart/form-data') !== -1;
2897
+ }
2898
+ exports.canConsumeForm = canConsumeForm;
2899
+ //# sourceMappingURL=util.js.map
2900
+ });
2901
+
2902
+ var DefaultApi = imageSearch_store.createCommonjsModule(function (module, exports) {
2903
+ var __extends = (imageSearch_store.commonjsGlobal && imageSearch_store.commonjsGlobal.__extends) || (function () {
2904
+ var extendStatics = function (d, b) {
2905
+ extendStatics = Object.setPrototypeOf ||
2906
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2907
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
2908
+ return extendStatics(d, b);
2909
+ };
2910
+ return function (d, b) {
2911
+ if (typeof b !== "function" && b !== null)
2912
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2913
+ extendStatics(d, b);
2914
+ function __() { this.constructor = d; }
2915
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2916
+ };
2917
+ })();
2918
+ var __awaiter = (imageSearch_store.commonjsGlobal && imageSearch_store.commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) {
2919
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
2920
+ return new (P || (P = Promise))(function (resolve, reject) {
2921
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
2922
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
2923
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
2924
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
2925
+ });
2926
+ };
2927
+ var __generator = (imageSearch_store.commonjsGlobal && imageSearch_store.commonjsGlobal.__generator) || function (thisArg, body) {
2928
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
2929
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
2930
+ function verb(n) { return function (v) { return step([n, v]); }; }
2931
+ function step(op) {
2932
+ if (f) throw new TypeError("Generator is already executing.");
2933
+ while (_) try {
2934
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
2935
+ if (y = 0, t) op = [op[0] & 2, t.value];
2936
+ switch (op[0]) {
2937
+ case 0: case 1: t = op; break;
2938
+ case 4: _.label++; return { value: op[1], done: false };
2939
+ case 5: _.label++; y = op[1]; op = [0]; continue;
2940
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
2941
+ default:
2942
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
2943
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
2944
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
2945
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
2946
+ if (t[2]) _.ops.pop();
2947
+ _.trys.pop(); continue;
2948
+ }
2949
+ op = body.call(thisArg, _);
2950
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
2951
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
2952
+ }
2953
+ };
2954
+ Object.defineProperty(exports, "__esModule", { value: true });
2955
+ exports.DefaultApiResponseProcessor = exports.DefaultApiRequestFactory = void 0;
2956
+
2957
+
2958
+
2959
+
2960
+
2961
+ var DefaultApiRequestFactory = (function (_super) {
2962
+ __extends(DefaultApiRequestFactory, _super);
2963
+ function DefaultApiRequestFactory() {
2964
+ return _super !== null && _super.apply(this, arguments) || this;
2965
+ }
2966
+ DefaultApiRequestFactory.prototype.trackEvent = function (product_view_event___product_click_event___widget_event___filter_event___search_event, _options) {
2967
+ var _a, _b, _c;
2968
+ return __awaiter(this, void 0, void 0, function () {
2969
+ var _config, localVarPath, requestContext, contentType, serializedBody, authMethod, defaultAuth;
2970
+ return __generator(this, function (_d) {
2971
+ switch (_d.label) {
2972
+ case 0:
2973
+ _config = _options || this.configuration;
2974
+ localVarPath = '/event';
2975
+ requestContext = _config.baseServer.makeRequestContext(localVarPath, http.HttpMethod.POST);
2976
+ requestContext.setHeaderParam("Accept", "application/json, */*;q=0.8");
2977
+ contentType = ObjectSerializer_1.ObjectSerializer.getPreferredMediaType([
2978
+ "application/json"
2979
+ ]);
2980
+ requestContext.setHeaderParam("Content-Type", contentType);
2981
+ serializedBody = ObjectSerializer_1.ObjectSerializer.stringify(ObjectSerializer_1.ObjectSerializer.serialize(product_view_event___product_click_event___widget_event___filter_event___search_event, "ProductViewEvent | ProductClickEvent | WidgetEvent | FilterEvent | SearchEvent", ""), contentType);
2982
+ requestContext.setBody(serializedBody);
2983
+ authMethod = _config.authMethods["bearerAuth"];
2984
+ if (!(authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication)) return [3, 2];
2985
+ return [4, (authMethod === null || authMethod === void 0 ? void 0 : authMethod.applySecurityAuthentication(requestContext))];
2986
+ case 1:
2987
+ _d.sent();
2988
+ _d.label = 2;
2989
+ case 2:
2990
+ defaultAuth = ((_a = _options === null || _options === void 0 ? void 0 : _options.authMethods) === null || _a === void 0 ? void 0 : _a.default) || ((_c = (_b = this.configuration) === null || _b === void 0 ? void 0 : _b.authMethods) === null || _c === void 0 ? void 0 : _c.default);
2991
+ if (!(defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication)) return [3, 4];
2992
+ return [4, (defaultAuth === null || defaultAuth === void 0 ? void 0 : defaultAuth.applySecurityAuthentication(requestContext))];
2993
+ case 3:
2994
+ _d.sent();
2995
+ _d.label = 4;
2996
+ case 4: return [2, requestContext];
2997
+ }
2998
+ });
2999
+ });
3000
+ };
3001
+ return DefaultApiRequestFactory;
3002
+ }(baseapi.BaseAPIRequestFactory));
3003
+ exports.DefaultApiRequestFactory = DefaultApiRequestFactory;
3004
+ var DefaultApiResponseProcessor = (function () {
3005
+ function DefaultApiResponseProcessor() {
3006
+ }
3007
+ DefaultApiResponseProcessor.prototype.trackEvent = function (response) {
3008
+ return __awaiter(this, void 0, void 0, function () {
3009
+ var contentType, body, _a, _b, _c, _d, body, _e, _f, _g, _h, body, _j, _k, _l, _m, _o, _p;
3010
+ return __generator(this, function (_q) {
3011
+ switch (_q.label) {
3012
+ case 0:
3013
+ contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
3014
+ if (!(0, util.isCodeInRange)("200", response.httpStatusCode)) return [3, 2];
3015
+ _b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
3016
+ _d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
3017
+ return [4, response.body.text()];
3018
+ case 1:
3019
+ body = _b.apply(_a, [_d.apply(_c, [_q.sent(), contentType]),
3020
+ "EventConfirmation", ""]);
3021
+ return [2, body];
3022
+ case 2:
3023
+ if (!(0, util.isCodeInRange)("502", response.httpStatusCode)) return [3, 4];
3024
+ _f = (_e = ObjectSerializer_1.ObjectSerializer).deserialize;
3025
+ _h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
3026
+ return [4, response.body.text()];
3027
+ case 3:
3028
+ body = _f.apply(_e, [_h.apply(_g, [_q.sent(), contentType]),
3029
+ "ErrorResponse", ""]);
3030
+ throw new exception.ApiException(502, "an error occurred", body, response.headers);
3031
+ case 4:
3032
+ if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3, 6];
3033
+ _k = (_j = ObjectSerializer_1.ObjectSerializer).deserialize;
3034
+ _m = (_l = ObjectSerializer_1.ObjectSerializer).parse;
3035
+ return [4, response.body.text()];
3036
+ case 5:
3037
+ body = _k.apply(_j, [_m.apply(_l, [_q.sent(), contentType]),
3038
+ "EventConfirmation", ""]);
3039
+ return [2, body];
3040
+ case 6:
3041
+ _o = exception.ApiException.bind;
3042
+ _p = [void 0, response.httpStatusCode, "Unknown API Status Code!"];
3043
+ return [4, response.getBodyAsAny()];
3044
+ case 7: throw new (_o.apply(exception.ApiException, _p.concat([_q.sent(), response.headers])))();
3045
+ }
3046
+ });
3047
+ });
3048
+ };
3049
+ return DefaultApiResponseProcessor;
3050
+ }());
3051
+ exports.DefaultApiResponseProcessor = DefaultApiResponseProcessor;
3052
+ //# sourceMappingURL=DefaultApi.js.map
3053
+ });
3054
+
3055
+ var ObservableAPI = imageSearch_store.createCommonjsModule(function (module, exports) {
3056
+ Object.defineProperty(exports, "__esModule", { value: true });
3057
+ exports.ObservableDefaultApi = void 0;
3058
+
3059
+ var rxjsStub_2 = rxjsStub;
3060
+
3061
+ var ObservableDefaultApi = (function () {
3062
+ function ObservableDefaultApi(configuration, requestFactory, responseProcessor) {
3063
+ this.configuration = configuration;
3064
+ this.requestFactory = requestFactory || new DefaultApi.DefaultApiRequestFactory(configuration);
3065
+ this.responseProcessor = responseProcessor || new DefaultApi.DefaultApiResponseProcessor();
3066
+ }
3067
+ ObservableDefaultApi.prototype.trackEvent = function (product_view_event___product_click_event___widget_event___filter_event___search_event, _options) {
3068
+ var _this = this;
3069
+ var requestContextPromise = this.requestFactory.trackEvent(product_view_event___product_click_event___widget_event___filter_event___search_event, _options);
3070
+ var middlewarePreObservable = (0, rxjsStub.from)(requestContextPromise);
3071
+ var _loop_1 = function (middleware) {
3072
+ middlewarePreObservable = middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)(function (ctx) { return middleware.pre(ctx); }));
3073
+ };
3074
+ for (var _i = 0, _a = this.configuration.middleware; _i < _a.length; _i++) {
3075
+ var middleware = _a[_i];
3076
+ _loop_1(middleware);
3077
+ }
3078
+ return middlewarePreObservable.pipe((0, rxjsStub_2.mergeMap)(function (ctx) { return _this.configuration.httpApi.send(ctx); })).
3079
+ pipe((0, rxjsStub_2.mergeMap)(function (response) {
3080
+ var middlewarePostObservable = (0, rxjsStub.of)(response);
3081
+ var _loop_2 = function (middleware) {
3082
+ middlewarePostObservable = middlewarePostObservable.pipe((0, rxjsStub_2.mergeMap)(function (rsp) { return middleware.post(rsp); }));
3083
+ };
3084
+ for (var _i = 0, _a = _this.configuration.middleware; _i < _a.length; _i++) {
3085
+ var middleware = _a[_i];
3086
+ _loop_2(middleware);
3087
+ }
3088
+ return middlewarePostObservable.pipe((0, rxjsStub_2.map)(function (rsp) { return _this.responseProcessor.trackEvent(rsp); }));
3089
+ }));
3090
+ };
3091
+ return ObservableDefaultApi;
3092
+ }());
3093
+ exports.ObservableDefaultApi = ObservableDefaultApi;
3094
+ //# sourceMappingURL=ObservableAPI.js.map
3095
+ });
3096
+
3097
+ var PromiseAPI = imageSearch_store.createCommonjsModule(function (module, exports) {
3098
+ Object.defineProperty(exports, "__esModule", { value: true });
3099
+ exports.PromiseDefaultApi = void 0;
3100
+
3101
+ var PromiseDefaultApi = (function () {
3102
+ function PromiseDefaultApi(configuration, requestFactory, responseProcessor) {
3103
+ this.api = new ObservableAPI.ObservableDefaultApi(configuration, requestFactory, responseProcessor);
3104
+ }
3105
+ PromiseDefaultApi.prototype.trackEvent = function (product_view_event___product_click_event___widget_event___filter_event___search_event, _options) {
3106
+ var result = this.api.trackEvent(product_view_event___product_click_event___widget_event___filter_event___search_event, _options);
3107
+ return result.toPromise();
3108
+ };
3109
+ return PromiseDefaultApi;
3110
+ }());
3111
+ exports.PromiseDefaultApi = PromiseDefaultApi;
3112
+ //# sourceMappingURL=PromiseAPI.js.map
3113
+ });
3114
+
3115
+ var dist = imageSearch_store.createCommonjsModule(function (module, exports) {
3116
+ var __createBinding = (imageSearch_store.commonjsGlobal && imageSearch_store.commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3117
+ if (k2 === undefined) k2 = k;
3118
+ var desc = Object.getOwnPropertyDescriptor(m, k);
3119
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
3120
+ desc = { enumerable: true, get: function() { return m[k]; } };
3121
+ }
3122
+ Object.defineProperty(o, k2, desc);
3123
+ }) : (function(o, m, k, k2) {
3124
+ if (k2 === undefined) k2 = k;
3125
+ o[k2] = m[k];
3126
+ }));
3127
+ var __exportStar = (imageSearch_store.commonjsGlobal && imageSearch_store.commonjsGlobal.__exportStar) || function(m, exports) {
3128
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
3129
+ };
3130
+ Object.defineProperty(exports, "__esModule", { value: true });
3131
+ exports.DefaultApi = exports.createConfiguration = void 0;
3132
+ __exportStar(http, exports);
3133
+ __exportStar(auth, exports);
3134
+ __exportStar(all, exports);
3135
+
3136
+ Object.defineProperty(exports, "createConfiguration", { enumerable: true, get: function () { return configuration.createConfiguration; } });
3137
+ __exportStar(exception, exports);
3138
+ __exportStar(servers, exports);
3139
+
3140
+ Object.defineProperty(exports, "DefaultApi", { enumerable: true, get: function () { return PromiseAPI.PromiseDefaultApi; } });
3141
+ //# sourceMappingURL=index.js.map
3142
+ });
3143
+
3144
+ const STAGE_SERVER_IDENTIFIER = "stage";
3145
+ const getTrackingServerByApiPath = (apiPath) => isProductionPath(apiPath) ? dist.servers[0] : dist.servers[1];
3146
+ const isProductionPath = (apiPath) => !apiPath.includes(STAGE_SERVER_IDENTIFIER);
3147
+ // TODO find way to utilize this function when we will use several openApi clients
3148
+ const createBearerAuth = (token) => {
3149
+ const provider = {
3150
+ getToken: () => {
3151
+ return new Promise((resolve) => resolve(token));
3152
+ },
3153
+ };
3154
+ const bearerConf = {
3155
+ tokenProvider: provider,
3156
+ };
3157
+ return {
3158
+ bearerAuth: bearerConf,
3159
+ };
3160
+ };
3161
+ const createTrackingApi = (apiPath, token) => {
3162
+ const baseServer = getTrackingServerByApiPath(apiPath);
3163
+ const authMethods = createBearerAuth(token);
3164
+ const configuration = {
3165
+ baseServer,
3166
+ authMethods,
3167
+ };
3168
+ return new dist.DefaultApi(dist.createConfiguration(configuration));
3169
+ };
3170
+
3171
+ const createTrackingEvent = (widget) => (eventData) => {
3172
+ return Object.assign(Object.assign({}, eventData), widget);
3173
+ };
3174
+
3175
+ const PRODUCT_VIEW_EVENT_TYPE = "product_view_event";
3176
+ const FILTER_EVENT_EVENT_TYPE = "filter_event";
3177
+ const SEARCH_EVENT_EVENT_TYPE = "search_event";
3178
+ const WIDGET_EVENT_EVENT_TYPE = "widget_event";
3179
+
3180
+ const filterEvent = {
3181
+ widget: "VPS",
3182
+ typ: FILTER_EVENT_EVENT_TYPE,
3183
+ };
3184
+
3185
+ const vprProductView = {
3186
+ widget: "VPR",
3187
+ typ: PRODUCT_VIEW_EVENT_TYPE,
3188
+ };
3189
+ const vpsProductView = {
3190
+ widget: "VPS",
3191
+ typ: PRODUCT_VIEW_EVENT_TYPE,
3192
+ };
3193
+
3194
+ const searchEvent = {
3195
+ widget: "VPS",
3196
+ typ: SEARCH_EVENT_EVENT_TYPE,
3197
+ };
3198
+
3199
+ const vprWidget = {
3200
+ widget: "VPR",
3201
+ typ: WIDGET_EVENT_EVENT_TYPE,
3202
+ };
3203
+ const vpsWidget = {
3204
+ widget: "VPS",
3205
+ typ: WIDGET_EVENT_EVENT_TYPE,
3206
+ };
3207
+
3208
+ const createProductViewVprEvent = createTrackingEvent(vprProductView);
3209
+ const createProductViewVpsEvent = createTrackingEvent(vpsProductView);
3210
+ const createWidgetVprEvent = createTrackingEvent(vprWidget);
3211
+ const createWidgetVpsEvent = createTrackingEvent(vpsWidget);
3212
+ const createSearchEvent = createTrackingEvent(searchEvent);
3213
+ const createFilterEvent = createTrackingEvent(filterEvent);
3214
+
3215
+ exports.createFilterEvent = createFilterEvent;
3216
+ exports.createProductViewVprEvent = createProductViewVprEvent;
3217
+ exports.createProductViewVpsEvent = createProductViewVpsEvent;
3218
+ exports.createSearchEvent = createSearchEvent;
3219
+ exports.createTrackingApi = createTrackingApi;
3220
+ exports.createWidgetVprEvent = createWidgetVprEvent;
3221
+ exports.createWidgetVpsEvent = createWidgetVpsEvent;
3222
+ exports.v4 = v4;