@plasmicpkgs/commerce 0.0.5 → 0.0.6

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.
@@ -176,201 +176,198 @@ function createCommonjsModule(fn, module) {
176
176
  return module = { exports: {} }, fn(module, module.exports), module.exports;
177
177
  }
178
178
 
179
- var runtime_1 = createCommonjsModule(function (module) {
180
- /**
181
- * Copyright (c) 2014-present, Facebook, Inc.
182
- *
183
- * This source code is licensed under the MIT license found in the
184
- * LICENSE file in the root directory of this source tree.
185
- */
186
-
187
- var runtime = (function (exports) {
188
-
189
- var Op = Object.prototype;
190
- var hasOwn = Op.hasOwnProperty;
191
- var undefined$1; // More compressible than void 0.
192
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
193
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
194
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
195
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
196
-
197
- function define(obj, key, value) {
198
- Object.defineProperty(obj, key, {
199
- value: value,
200
- enumerable: true,
201
- configurable: true,
202
- writable: true
203
- });
204
- return obj[key];
205
- }
206
- try {
207
- // IE 8 has a broken Object.defineProperty that only works on DOM objects.
208
- define({}, "");
209
- } catch (err) {
210
- define = function(obj, key, value) {
211
- return obj[key] = value;
212
- };
213
- }
214
-
215
- function wrap(innerFn, outerFn, self, tryLocsList) {
216
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
217
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
218
- var generator = Object.create(protoGenerator.prototype);
219
- var context = new Context(tryLocsList || []);
220
-
221
- // The ._invoke method unifies the implementations of the .next,
222
- // .throw, and .return methods.
223
- generator._invoke = makeInvokeMethod(innerFn, self, context);
179
+ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
180
+ /**
181
+ * Copyright (c) 2014-present, Facebook, Inc.
182
+ *
183
+ * This source code is licensed under the MIT license found in the
184
+ * LICENSE file in the root directory of this source tree.
185
+ */
186
+ var runtime = function (exports) {
187
+
188
+ var Op = Object.prototype;
189
+ var hasOwn = Op.hasOwnProperty;
190
+ var undefined$1; // More compressible than void 0.
191
+
192
+ var $Symbol = typeof Symbol === "function" ? Symbol : {};
193
+ var iteratorSymbol = $Symbol.iterator || "@@iterator";
194
+ var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
195
+ var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
196
+
197
+ function define(obj, key, value) {
198
+ Object.defineProperty(obj, key, {
199
+ value: value,
200
+ enumerable: true,
201
+ configurable: true,
202
+ writable: true
203
+ });
204
+ return obj[key];
205
+ }
224
206
 
225
- return generator;
226
- }
227
- exports.wrap = wrap;
228
-
229
- // Try/catch helper to minimize deoptimizations. Returns a completion
230
- // record like context.tryEntries[i].completion. This interface could
231
- // have been (and was previously) designed to take a closure to be
232
- // invoked without arguments, but in all the cases we care about we
233
- // already have an existing method we want to call, so there's no need
234
- // to create a new function object. We can even get away with assuming
235
- // the method takes exactly one argument, since that happens to be true
236
- // in every case, so we don't have to touch the arguments object. The
237
- // only additional allocation required is the completion record, which
238
- // has a stable shape and so hopefully should be cheap to allocate.
239
- function tryCatch(fn, obj, arg) {
240
207
  try {
241
- return { type: "normal", arg: fn.call(obj, arg) };
208
+ // IE 8 has a broken Object.defineProperty that only works on DOM objects.
209
+ define({}, "");
242
210
  } catch (err) {
243
- return { type: "throw", arg: err };
211
+ define = function define(obj, key, value) {
212
+ return obj[key] = value;
213
+ };
244
214
  }
245
- }
246
215
 
247
- var GenStateSuspendedStart = "suspendedStart";
248
- var GenStateSuspendedYield = "suspendedYield";
249
- var GenStateExecuting = "executing";
250
- var GenStateCompleted = "completed";
251
-
252
- // Returning this object from the innerFn has the same effect as
253
- // breaking out of the dispatch switch statement.
254
- var ContinueSentinel = {};
255
-
256
- // Dummy constructor functions that we use as the .constructor and
257
- // .constructor.prototype properties for functions that return Generator
258
- // objects. For full spec compliance, you may wish to configure your
259
- // minifier not to mangle the names of these two functions.
260
- function Generator() {}
261
- function GeneratorFunction() {}
262
- function GeneratorFunctionPrototype() {}
263
-
264
- // This is a polyfill for %IteratorPrototype% for environments that
265
- // don't natively support it.
266
- var IteratorPrototype = {};
267
- define(IteratorPrototype, iteratorSymbol, function () {
268
- return this;
269
- });
216
+ function wrap(innerFn, outerFn, self, tryLocsList) {
217
+ // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
218
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
219
+ var generator = Object.create(protoGenerator.prototype);
220
+ var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next,
221
+ // .throw, and .return methods.
270
222
 
271
- var getProto = Object.getPrototypeOf;
272
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
273
- if (NativeIteratorPrototype &&
274
- NativeIteratorPrototype !== Op &&
275
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
276
- // This environment has a native %IteratorPrototype%; use it instead
277
- // of the polyfill.
278
- IteratorPrototype = NativeIteratorPrototype;
279
- }
223
+ generator._invoke = makeInvokeMethod(innerFn, self, context);
224
+ return generator;
225
+ }
280
226
 
281
- var Gp = GeneratorFunctionPrototype.prototype =
282
- Generator.prototype = Object.create(IteratorPrototype);
283
- GeneratorFunction.prototype = GeneratorFunctionPrototype;
284
- define(Gp, "constructor", GeneratorFunctionPrototype);
285
- define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
286
- GeneratorFunction.displayName = define(
287
- GeneratorFunctionPrototype,
288
- toStringTagSymbol,
289
- "GeneratorFunction"
290
- );
291
-
292
- // Helper for defining the .next, .throw, and .return methods of the
293
- // Iterator interface in terms of a single ._invoke method.
294
- function defineIteratorMethods(prototype) {
295
- ["next", "throw", "return"].forEach(function(method) {
296
- define(prototype, method, function(arg) {
297
- return this._invoke(method, arg);
298
- });
299
- });
300
- }
227
+ exports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion
228
+ // record like context.tryEntries[i].completion. This interface could
229
+ // have been (and was previously) designed to take a closure to be
230
+ // invoked without arguments, but in all the cases we care about we
231
+ // already have an existing method we want to call, so there's no need
232
+ // to create a new function object. We can even get away with assuming
233
+ // the method takes exactly one argument, since that happens to be true
234
+ // in every case, so we don't have to touch the arguments object. The
235
+ // only additional allocation required is the completion record, which
236
+ // has a stable shape and so hopefully should be cheap to allocate.
237
+
238
+ function tryCatch(fn, obj, arg) {
239
+ try {
240
+ return {
241
+ type: "normal",
242
+ arg: fn.call(obj, arg)
243
+ };
244
+ } catch (err) {
245
+ return {
246
+ type: "throw",
247
+ arg: err
248
+ };
249
+ }
250
+ }
301
251
 
302
- exports.isGeneratorFunction = function(genFun) {
303
- var ctor = typeof genFun === "function" && genFun.constructor;
304
- return ctor
305
- ? ctor === GeneratorFunction ||
306
- // For the native GeneratorFunction constructor, the best we can
307
- // do is to check its .name property.
308
- (ctor.displayName || ctor.name) === "GeneratorFunction"
309
- : false;
310
- };
252
+ var GenStateSuspendedStart = "suspendedStart";
253
+ var GenStateSuspendedYield = "suspendedYield";
254
+ var GenStateExecuting = "executing";
255
+ var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as
256
+ // breaking out of the dispatch switch statement.
257
+
258
+ var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and
259
+ // .constructor.prototype properties for functions that return Generator
260
+ // objects. For full spec compliance, you may wish to configure your
261
+ // minifier not to mangle the names of these two functions.
262
+
263
+ function Generator() {}
264
+
265
+ function GeneratorFunction() {}
266
+
267
+ function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that
268
+ // don't natively support it.
269
+
270
+
271
+ var IteratorPrototype = {};
272
+
273
+ IteratorPrototype[iteratorSymbol] = function () {
274
+ return this;
275
+ };
276
+
277
+ var getProto = Object.getPrototypeOf;
278
+ var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
311
279
 
312
- exports.mark = function(genFun) {
313
- if (Object.setPrototypeOf) {
314
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
315
- } else {
316
- genFun.__proto__ = GeneratorFunctionPrototype;
317
- define(genFun, toStringTagSymbol, "GeneratorFunction");
280
+ if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
281
+ // This environment has a native %IteratorPrototype%; use it instead
282
+ // of the polyfill.
283
+ IteratorPrototype = NativeIteratorPrototype;
318
284
  }
319
- genFun.prototype = Object.create(Gp);
320
- return genFun;
321
- };
322
285
 
323
- // Within the body of any async function, `await x` is transformed to
324
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
325
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
326
- // meant to be awaited.
327
- exports.awrap = function(arg) {
328
- return { __await: arg };
329
- };
286
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
287
+ GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
288
+ GeneratorFunctionPrototype.constructor = GeneratorFunction;
289
+ GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"); // Helper for defining the .next, .throw, and .return methods of the
290
+ // Iterator interface in terms of a single ._invoke method.
330
291
 
331
- function AsyncIterator(generator, PromiseImpl) {
332
- function invoke(method, arg, resolve, reject) {
333
- var record = tryCatch(generator[method], generator, arg);
334
- if (record.type === "throw") {
335
- reject(record.arg);
292
+ function defineIteratorMethods(prototype) {
293
+ ["next", "throw", "return"].forEach(function (method) {
294
+ define(prototype, method, function (arg) {
295
+ return this._invoke(method, arg);
296
+ });
297
+ });
298
+ }
299
+
300
+ exports.isGeneratorFunction = function (genFun) {
301
+ var ctor = typeof genFun === "function" && genFun.constructor;
302
+ return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can
303
+ // do is to check its .name property.
304
+ (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
305
+ };
306
+
307
+ exports.mark = function (genFun) {
308
+ if (Object.setPrototypeOf) {
309
+ Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
336
310
  } else {
337
- var result = record.arg;
338
- var value = result.value;
339
- if (value &&
340
- typeof value === "object" &&
341
- hasOwn.call(value, "__await")) {
342
- return PromiseImpl.resolve(value.__await).then(function(value) {
343
- invoke("next", value, resolve, reject);
344
- }, function(err) {
345
- invoke("throw", err, resolve, reject);
311
+ genFun.__proto__ = GeneratorFunctionPrototype;
312
+ define(genFun, toStringTagSymbol, "GeneratorFunction");
313
+ }
314
+
315
+ genFun.prototype = Object.create(Gp);
316
+ return genFun;
317
+ }; // Within the body of any async function, `await x` is transformed to
318
+ // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
319
+ // `hasOwn.call(value, "__await")` to determine if the yielded value is
320
+ // meant to be awaited.
321
+
322
+
323
+ exports.awrap = function (arg) {
324
+ return {
325
+ __await: arg
326
+ };
327
+ };
328
+
329
+ function AsyncIterator(generator, PromiseImpl) {
330
+ function invoke(method, arg, resolve, reject) {
331
+ var record = tryCatch(generator[method], generator, arg);
332
+
333
+ if (record.type === "throw") {
334
+ reject(record.arg);
335
+ } else {
336
+ var result = record.arg;
337
+ var value = result.value;
338
+
339
+ if (value && typeof value === "object" && hasOwn.call(value, "__await")) {
340
+ return PromiseImpl.resolve(value.__await).then(function (value) {
341
+ invoke("next", value, resolve, reject);
342
+ }, function (err) {
343
+ invoke("throw", err, resolve, reject);
344
+ });
345
+ }
346
+
347
+ return PromiseImpl.resolve(value).then(function (unwrapped) {
348
+ // When a yielded Promise is resolved, its final value becomes
349
+ // the .value of the Promise<{value,done}> result for the
350
+ // current iteration.
351
+ result.value = unwrapped;
352
+ resolve(result);
353
+ }, function (error) {
354
+ // If a rejected Promise was yielded, throw the rejection back
355
+ // into the async generator function so it can be handled there.
356
+ return invoke("throw", error, resolve, reject);
346
357
  });
347
358
  }
348
-
349
- return PromiseImpl.resolve(value).then(function(unwrapped) {
350
- // When a yielded Promise is resolved, its final value becomes
351
- // the .value of the Promise<{value,done}> result for the
352
- // current iteration.
353
- result.value = unwrapped;
354
- resolve(result);
355
- }, function(error) {
356
- // If a rejected Promise was yielded, throw the rejection back
357
- // into the async generator function so it can be handled there.
358
- return invoke("throw", error, resolve, reject);
359
- });
360
359
  }
361
- }
362
360
 
363
- var previousPromise;
361
+ var previousPromise;
364
362
 
365
- function enqueue(method, arg) {
366
- function callInvokeWithMethodAndArg() {
367
- return new PromiseImpl(function(resolve, reject) {
368
- invoke(method, arg, resolve, reject);
369
- });
370
- }
363
+ function enqueue(method, arg) {
364
+ function callInvokeWithMethodAndArg() {
365
+ return new PromiseImpl(function (resolve, reject) {
366
+ invoke(method, arg, resolve, reject);
367
+ });
368
+ }
371
369
 
372
- return previousPromise =
373
- // If enqueue has been called before, then we want to wait until
370
+ return previousPromise = // If enqueue has been called before, then we want to wait until
374
371
  // all previous Promises have been resolved before calling invoke,
375
372
  // so that results are always delivered in the correct order. If
376
373
  // enqueue has not been called before, then it is important to
@@ -382,554 +379,525 @@ var runtime = (function (exports) {
382
379
  // execute code before the first await. Since we implement simple
383
380
  // async functions in terms of async generators, it is especially
384
381
  // important to get this right, even though it requires care.
385
- previousPromise ? previousPromise.then(
386
- callInvokeWithMethodAndArg,
387
- // Avoid propagating failures to Promises returned by later
388
- // invocations of the iterator.
389
- callInvokeWithMethodAndArg
390
- ) : callInvokeWithMethodAndArg();
382
+ previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later
383
+ // invocations of the iterator.
384
+ callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
385
+ } // Define the unified helper method that is used to implement .next,
386
+ // .throw, and .return (see defineIteratorMethods).
387
+
388
+
389
+ this._invoke = enqueue;
391
390
  }
392
391
 
393
- // Define the unified helper method that is used to implement .next,
394
- // .throw, and .return (see defineIteratorMethods).
395
- this._invoke = enqueue;
396
- }
392
+ defineIteratorMethods(AsyncIterator.prototype);
397
393
 
398
- defineIteratorMethods(AsyncIterator.prototype);
399
- define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
400
- return this;
401
- });
402
- exports.AsyncIterator = AsyncIterator;
403
-
404
- // Note that simple async functions are implemented on top of
405
- // AsyncIterator objects; they just return a Promise for the value of
406
- // the final result produced by the iterator.
407
- exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
408
- if (PromiseImpl === void 0) PromiseImpl = Promise;
409
-
410
- var iter = new AsyncIterator(
411
- wrap(innerFn, outerFn, self, tryLocsList),
412
- PromiseImpl
413
- );
414
-
415
- return exports.isGeneratorFunction(outerFn)
416
- ? iter // If outerFn is a generator, return the full iterator.
417
- : iter.next().then(function(result) {
418
- return result.done ? result.value : iter.next();
419
- });
420
- };
394
+ AsyncIterator.prototype[asyncIteratorSymbol] = function () {
395
+ return this;
396
+ };
421
397
 
422
- function makeInvokeMethod(innerFn, self, context) {
423
- var state = GenStateSuspendedStart;
398
+ exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
399
+ // AsyncIterator objects; they just return a Promise for the value of
400
+ // the final result produced by the iterator.
424
401
 
425
- return function invoke(method, arg) {
426
- if (state === GenStateExecuting) {
427
- throw new Error("Generator is already running");
428
- }
402
+ exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
403
+ if (PromiseImpl === void 0) PromiseImpl = Promise;
404
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
405
+ return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
406
+ : iter.next().then(function (result) {
407
+ return result.done ? result.value : iter.next();
408
+ });
409
+ };
429
410
 
430
- if (state === GenStateCompleted) {
431
- if (method === "throw") {
432
- throw arg;
411
+ function makeInvokeMethod(innerFn, self, context) {
412
+ var state = GenStateSuspendedStart;
413
+ return function invoke(method, arg) {
414
+ if (state === GenStateExecuting) {
415
+ throw new Error("Generator is already running");
433
416
  }
434
417
 
435
- // Be forgiving, per 25.3.3.3.3 of the spec:
436
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
437
- return doneResult();
438
- }
418
+ if (state === GenStateCompleted) {
419
+ if (method === "throw") {
420
+ throw arg;
421
+ } // Be forgiving, per 25.3.3.3.3 of the spec:
422
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
439
423
 
440
- context.method = method;
441
- context.arg = arg;
442
424
 
443
- while (true) {
444
- var delegate = context.delegate;
445
- if (delegate) {
446
- var delegateResult = maybeInvokeDelegate(delegate, context);
447
- if (delegateResult) {
448
- if (delegateResult === ContinueSentinel) continue;
449
- return delegateResult;
450
- }
425
+ return doneResult();
451
426
  }
452
427
 
453
- if (context.method === "next") {
454
- // Setting context._sent for legacy support of Babel's
455
- // function.sent implementation.
456
- context.sent = context._sent = context.arg;
428
+ context.method = method;
429
+ context.arg = arg;
430
+
431
+ while (true) {
432
+ var delegate = context.delegate;
457
433
 
458
- } else if (context.method === "throw") {
459
- if (state === GenStateSuspendedStart) {
460
- state = GenStateCompleted;
461
- throw context.arg;
434
+ if (delegate) {
435
+ var delegateResult = maybeInvokeDelegate(delegate, context);
436
+
437
+ if (delegateResult) {
438
+ if (delegateResult === ContinueSentinel) continue;
439
+ return delegateResult;
440
+ }
462
441
  }
463
442
 
464
- context.dispatchException(context.arg);
443
+ if (context.method === "next") {
444
+ // Setting context._sent for legacy support of Babel's
445
+ // function.sent implementation.
446
+ context.sent = context._sent = context.arg;
447
+ } else if (context.method === "throw") {
448
+ if (state === GenStateSuspendedStart) {
449
+ state = GenStateCompleted;
450
+ throw context.arg;
451
+ }
465
452
 
466
- } else if (context.method === "return") {
467
- context.abrupt("return", context.arg);
468
- }
453
+ context.dispatchException(context.arg);
454
+ } else if (context.method === "return") {
455
+ context.abrupt("return", context.arg);
456
+ }
469
457
 
470
- state = GenStateExecuting;
458
+ state = GenStateExecuting;
459
+ var record = tryCatch(innerFn, self, context);
471
460
 
472
- var record = tryCatch(innerFn, self, context);
473
- if (record.type === "normal") {
474
- // If an exception is thrown from innerFn, we leave state ===
475
- // GenStateExecuting and loop back for another invocation.
476
- state = context.done
477
- ? GenStateCompleted
478
- : GenStateSuspendedYield;
461
+ if (record.type === "normal") {
462
+ // If an exception is thrown from innerFn, we leave state ===
463
+ // GenStateExecuting and loop back for another invocation.
464
+ state = context.done ? GenStateCompleted : GenStateSuspendedYield;
479
465
 
480
- if (record.arg === ContinueSentinel) {
481
- continue;
482
- }
466
+ if (record.arg === ContinueSentinel) {
467
+ continue;
468
+ }
483
469
 
484
- return {
485
- value: record.arg,
486
- done: context.done
487
- };
470
+ return {
471
+ value: record.arg,
472
+ done: context.done
473
+ };
474
+ } else if (record.type === "throw") {
475
+ state = GenStateCompleted; // Dispatch the exception by looping back around to the
476
+ // context.dispatchException(context.arg) call above.
477
+
478
+ context.method = "throw";
479
+ context.arg = record.arg;
480
+ }
481
+ }
482
+ };
483
+ } // Call delegate.iterator[context.method](context.arg) and handle the
484
+ // result, either by returning a { value, done } result from the
485
+ // delegate iterator, or by modifying context.method and context.arg,
486
+ // setting context.delegate to null, and returning the ContinueSentinel.
487
+
488
+
489
+ function maybeInvokeDelegate(delegate, context) {
490
+ var method = delegate.iterator[context.method];
491
+
492
+ if (method === undefined$1) {
493
+ // A .throw or .return when the delegate iterator has no .throw
494
+ // method always terminates the yield* loop.
495
+ context.delegate = null;
496
+
497
+ if (context.method === "throw") {
498
+ // Note: ["return"] must be used for ES3 parsing compatibility.
499
+ if (delegate.iterator["return"]) {
500
+ // If the delegate iterator has a return method, give it a
501
+ // chance to clean up.
502
+ context.method = "return";
503
+ context.arg = undefined$1;
504
+ maybeInvokeDelegate(delegate, context);
505
+
506
+ if (context.method === "throw") {
507
+ // If maybeInvokeDelegate(context) changed context.method from
508
+ // "return" to "throw", let that override the TypeError below.
509
+ return ContinueSentinel;
510
+ }
511
+ }
488
512
 
489
- } else if (record.type === "throw") {
490
- state = GenStateCompleted;
491
- // Dispatch the exception by looping back around to the
492
- // context.dispatchException(context.arg) call above.
493
513
  context.method = "throw";
494
- context.arg = record.arg;
514
+ context.arg = new TypeError("The iterator does not provide a 'throw' method");
495
515
  }
516
+
517
+ return ContinueSentinel;
496
518
  }
497
- };
498
- }
499
519
 
500
- // Call delegate.iterator[context.method](context.arg) and handle the
501
- // result, either by returning a { value, done } result from the
502
- // delegate iterator, or by modifying context.method and context.arg,
503
- // setting context.delegate to null, and returning the ContinueSentinel.
504
- function maybeInvokeDelegate(delegate, context) {
505
- var method = delegate.iterator[context.method];
506
- if (method === undefined$1) {
507
- // A .throw or .return when the delegate iterator has no .throw
508
- // method always terminates the yield* loop.
509
- context.delegate = null;
520
+ var record = tryCatch(method, delegate.iterator, context.arg);
510
521
 
511
- if (context.method === "throw") {
512
- // Note: ["return"] must be used for ES3 parsing compatibility.
513
- if (delegate.iterator["return"]) {
514
- // If the delegate iterator has a return method, give it a
515
- // chance to clean up.
516
- context.method = "return";
517
- context.arg = undefined$1;
518
- maybeInvokeDelegate(delegate, context);
522
+ if (record.type === "throw") {
523
+ context.method = "throw";
524
+ context.arg = record.arg;
525
+ context.delegate = null;
526
+ return ContinueSentinel;
527
+ }
519
528
 
520
- if (context.method === "throw") {
521
- // If maybeInvokeDelegate(context) changed context.method from
522
- // "return" to "throw", let that override the TypeError below.
523
- return ContinueSentinel;
524
- }
525
- }
529
+ var info = record.arg;
526
530
 
531
+ if (!info) {
527
532
  context.method = "throw";
528
- context.arg = new TypeError(
529
- "The iterator does not provide a 'throw' method");
533
+ context.arg = new TypeError("iterator result is not an object");
534
+ context.delegate = null;
535
+ return ContinueSentinel;
530
536
  }
531
537
 
532
- return ContinueSentinel;
533
- }
538
+ if (info.done) {
539
+ // Assign the result of the finished delegate to the temporary
540
+ // variable specified by delegate.resultName (see delegateYield).
541
+ context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).
534
542
 
535
- var record = tryCatch(method, delegate.iterator, context.arg);
543
+ context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the
544
+ // exception, let the outer generator proceed normally. If
545
+ // context.method was "next", forget context.arg since it has been
546
+ // "consumed" by the delegate iterator. If context.method was
547
+ // "return", allow the original .return call to continue in the
548
+ // outer generator.
536
549
 
537
- if (record.type === "throw") {
538
- context.method = "throw";
539
- context.arg = record.arg;
540
- context.delegate = null;
541
- return ContinueSentinel;
542
- }
550
+ if (context.method !== "return") {
551
+ context.method = "next";
552
+ context.arg = undefined$1;
553
+ }
554
+ } else {
555
+ // Re-yield the result returned by the delegate method.
556
+ return info;
557
+ } // The delegate iterator is finished, so forget it and continue with
558
+ // the outer generator.
543
559
 
544
- var info = record.arg;
545
560
 
546
- if (! info) {
547
- context.method = "throw";
548
- context.arg = new TypeError("iterator result is not an object");
549
561
  context.delegate = null;
550
562
  return ContinueSentinel;
551
- }
563
+ } // Define Generator.prototype.{next,throw,return} in terms of the
564
+ // unified ._invoke helper method.
552
565
 
553
- if (info.done) {
554
- // Assign the result of the finished delegate to the temporary
555
- // variable specified by delegate.resultName (see delegateYield).
556
- context[delegate.resultName] = info.value;
557
-
558
- // Resume execution at the desired location (see delegateYield).
559
- context.next = delegate.nextLoc;
560
-
561
- // If context.method was "throw" but the delegate handled the
562
- // exception, let the outer generator proceed normally. If
563
- // context.method was "next", forget context.arg since it has been
564
- // "consumed" by the delegate iterator. If context.method was
565
- // "return", allow the original .return call to continue in the
566
- // outer generator.
567
- if (context.method !== "return") {
568
- context.method = "next";
569
- context.arg = undefined$1;
570
- }
571
-
572
- } else {
573
- // Re-yield the result returned by the delegate method.
574
- return info;
575
- }
576
566
 
577
- // The delegate iterator is finished, so forget it and continue with
578
- // the outer generator.
579
- context.delegate = null;
580
- return ContinueSentinel;
581
- }
567
+ defineIteratorMethods(Gp);
568
+ define(Gp, toStringTagSymbol, "Generator"); // A Generator should always return itself as the iterator object when the
569
+ // @@iterator function is called on it. Some browsers' implementations of the
570
+ // iterator prototype chain incorrectly implement this, causing the Generator
571
+ // object to not be returned from this call. This ensures that doesn't happen.
572
+ // See https://github.com/facebook/regenerator/issues/274 for more details.
582
573
 
583
- // Define Generator.prototype.{next,throw,return} in terms of the
584
- // unified ._invoke helper method.
585
- defineIteratorMethods(Gp);
574
+ Gp[iteratorSymbol] = function () {
575
+ return this;
576
+ };
586
577
 
587
- define(Gp, toStringTagSymbol, "Generator");
578
+ Gp.toString = function () {
579
+ return "[object Generator]";
580
+ };
588
581
 
589
- // A Generator should always return itself as the iterator object when the
590
- // @@iterator function is called on it. Some browsers' implementations of the
591
- // iterator prototype chain incorrectly implement this, causing the Generator
592
- // object to not be returned from this call. This ensures that doesn't happen.
593
- // See https://github.com/facebook/regenerator/issues/274 for more details.
594
- define(Gp, iteratorSymbol, function() {
595
- return this;
596
- });
582
+ function pushTryEntry(locs) {
583
+ var entry = {
584
+ tryLoc: locs[0]
585
+ };
597
586
 
598
- define(Gp, "toString", function() {
599
- return "[object Generator]";
600
- });
587
+ if (1 in locs) {
588
+ entry.catchLoc = locs[1];
589
+ }
601
590
 
602
- function pushTryEntry(locs) {
603
- var entry = { tryLoc: locs[0] };
591
+ if (2 in locs) {
592
+ entry.finallyLoc = locs[2];
593
+ entry.afterLoc = locs[3];
594
+ }
604
595
 
605
- if (1 in locs) {
606
- entry.catchLoc = locs[1];
596
+ this.tryEntries.push(entry);
607
597
  }
608
598
 
609
- if (2 in locs) {
610
- entry.finallyLoc = locs[2];
611
- entry.afterLoc = locs[3];
599
+ function resetTryEntry(entry) {
600
+ var record = entry.completion || {};
601
+ record.type = "normal";
602
+ delete record.arg;
603
+ entry.completion = record;
612
604
  }
613
605
 
614
- this.tryEntries.push(entry);
615
- }
616
-
617
- function resetTryEntry(entry) {
618
- var record = entry.completion || {};
619
- record.type = "normal";
620
- delete record.arg;
621
- entry.completion = record;
622
- }
623
-
624
- function Context(tryLocsList) {
625
- // The root entry object (effectively a try statement without a catch
626
- // or a finally block) gives us a place to store values thrown from
627
- // locations where there is no enclosing try statement.
628
- this.tryEntries = [{ tryLoc: "root" }];
629
- tryLocsList.forEach(pushTryEntry, this);
630
- this.reset(true);
631
- }
632
-
633
- exports.keys = function(object) {
634
- var keys = [];
635
- for (var key in object) {
636
- keys.push(key);
606
+ function Context(tryLocsList) {
607
+ // The root entry object (effectively a try statement without a catch
608
+ // or a finally block) gives us a place to store values thrown from
609
+ // locations where there is no enclosing try statement.
610
+ this.tryEntries = [{
611
+ tryLoc: "root"
612
+ }];
613
+ tryLocsList.forEach(pushTryEntry, this);
614
+ this.reset(true);
637
615
  }
638
- keys.reverse();
639
-
640
- // Rather than returning an object with a next method, we keep
641
- // things simple and return the next function itself.
642
- return function next() {
643
- while (keys.length) {
644
- var key = keys.pop();
645
- if (key in object) {
646
- next.value = key;
647
- next.done = false;
648
- return next;
649
- }
650
- }
651
616
 
652
- // To avoid creating an additional object, we just hang the .value
653
- // and .done properties off the next function object itself. This
654
- // also ensures that the minifier will not anonymize the function.
655
- next.done = true;
656
- return next;
657
- };
658
- };
617
+ exports.keys = function (object) {
618
+ var keys = [];
659
619
 
660
- function values(iterable) {
661
- if (iterable) {
662
- var iteratorMethod = iterable[iteratorSymbol];
663
- if (iteratorMethod) {
664
- return iteratorMethod.call(iterable);
620
+ for (var key in object) {
621
+ keys.push(key);
665
622
  }
666
623
 
667
- if (typeof iterable.next === "function") {
668
- return iterable;
669
- }
624
+ keys.reverse(); // Rather than returning an object with a next method, we keep
625
+ // things simple and return the next function itself.
670
626
 
671
- if (!isNaN(iterable.length)) {
672
- var i = -1, next = function next() {
673
- while (++i < iterable.length) {
674
- if (hasOwn.call(iterable, i)) {
675
- next.value = iterable[i];
676
- next.done = false;
677
- return next;
678
- }
679
- }
627
+ return function next() {
628
+ while (keys.length) {
629
+ var key = keys.pop();
680
630
 
681
- next.value = undefined$1;
682
- next.done = true;
631
+ if (key in object) {
632
+ next.value = key;
633
+ next.done = false;
634
+ return next;
635
+ }
636
+ } // To avoid creating an additional object, we just hang the .value
637
+ // and .done properties off the next function object itself. This
638
+ // also ensures that the minifier will not anonymize the function.
683
639
 
684
- return next;
685
- };
686
640
 
687
- return next.next = next;
688
- }
689
- }
641
+ next.done = true;
642
+ return next;
643
+ };
644
+ };
690
645
 
691
- // Return an iterator with no values.
692
- return { next: doneResult };
693
- }
694
- exports.values = values;
646
+ function values(iterable) {
647
+ if (iterable) {
648
+ var iteratorMethod = iterable[iteratorSymbol];
695
649
 
696
- function doneResult() {
697
- return { value: undefined$1, done: true };
698
- }
650
+ if (iteratorMethod) {
651
+ return iteratorMethod.call(iterable);
652
+ }
699
653
 
700
- Context.prototype = {
701
- constructor: Context,
702
-
703
- reset: function(skipTempReset) {
704
- this.prev = 0;
705
- this.next = 0;
706
- // Resetting context._sent for legacy support of Babel's
707
- // function.sent implementation.
708
- this.sent = this._sent = undefined$1;
709
- this.done = false;
710
- this.delegate = null;
711
-
712
- this.method = "next";
713
- this.arg = undefined$1;
714
-
715
- this.tryEntries.forEach(resetTryEntry);
716
-
717
- if (!skipTempReset) {
718
- for (var name in this) {
719
- // Not sure about the optimal order of these conditions:
720
- if (name.charAt(0) === "t" &&
721
- hasOwn.call(this, name) &&
722
- !isNaN(+name.slice(1))) {
723
- this[name] = undefined$1;
724
- }
654
+ if (typeof iterable.next === "function") {
655
+ return iterable;
725
656
  }
726
- }
727
- },
728
657
 
729
- stop: function() {
730
- this.done = true;
658
+ if (!isNaN(iterable.length)) {
659
+ var i = -1,
660
+ next = function next() {
661
+ while (++i < iterable.length) {
662
+ if (hasOwn.call(iterable, i)) {
663
+ next.value = iterable[i];
664
+ next.done = false;
665
+ return next;
666
+ }
667
+ }
731
668
 
732
- var rootEntry = this.tryEntries[0];
733
- var rootRecord = rootEntry.completion;
734
- if (rootRecord.type === "throw") {
735
- throw rootRecord.arg;
736
- }
669
+ next.value = undefined$1;
670
+ next.done = true;
671
+ return next;
672
+ };
737
673
 
738
- return this.rval;
739
- },
674
+ return next.next = next;
675
+ }
676
+ } // Return an iterator with no values.
740
677
 
741
- dispatchException: function(exception) {
742
- if (this.done) {
743
- throw exception;
744
- }
745
678
 
746
- var context = this;
747
- function handle(loc, caught) {
748
- record.type = "throw";
749
- record.arg = exception;
750
- context.next = loc;
679
+ return {
680
+ next: doneResult
681
+ };
682
+ }
751
683
 
752
- if (caught) {
753
- // If the dispatched exception was caught by a catch block,
754
- // then let that catch block handle the exception normally.
755
- context.method = "next";
756
- context.arg = undefined$1;
757
- }
684
+ exports.values = values;
758
685
 
759
- return !! caught;
760
- }
686
+ function doneResult() {
687
+ return {
688
+ value: undefined$1,
689
+ done: true
690
+ };
691
+ }
761
692
 
762
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
763
- var entry = this.tryEntries[i];
764
- var record = entry.completion;
693
+ Context.prototype = {
694
+ constructor: Context,
695
+ reset: function reset(skipTempReset) {
696
+ this.prev = 0;
697
+ this.next = 0; // Resetting context._sent for legacy support of Babel's
698
+ // function.sent implementation.
765
699
 
766
- if (entry.tryLoc === "root") {
767
- // Exception thrown outside of any try block that could handle
768
- // it, so set the completion value of the entire function to
769
- // throw the exception.
770
- return handle("end");
700
+ this.sent = this._sent = undefined$1;
701
+ this.done = false;
702
+ this.delegate = null;
703
+ this.method = "next";
704
+ this.arg = undefined$1;
705
+ this.tryEntries.forEach(resetTryEntry);
706
+
707
+ if (!skipTempReset) {
708
+ for (var name in this) {
709
+ // Not sure about the optimal order of these conditions:
710
+ if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
711
+ this[name] = undefined$1;
712
+ }
713
+ }
771
714
  }
715
+ },
716
+ stop: function stop() {
717
+ this.done = true;
718
+ var rootEntry = this.tryEntries[0];
719
+ var rootRecord = rootEntry.completion;
772
720
 
773
- if (entry.tryLoc <= this.prev) {
774
- var hasCatch = hasOwn.call(entry, "catchLoc");
775
- var hasFinally = hasOwn.call(entry, "finallyLoc");
721
+ if (rootRecord.type === "throw") {
722
+ throw rootRecord.arg;
723
+ }
776
724
 
777
- if (hasCatch && hasFinally) {
778
- if (this.prev < entry.catchLoc) {
779
- return handle(entry.catchLoc, true);
780
- } else if (this.prev < entry.finallyLoc) {
781
- return handle(entry.finallyLoc);
782
- }
725
+ return this.rval;
726
+ },
727
+ dispatchException: function dispatchException(exception) {
728
+ if (this.done) {
729
+ throw exception;
730
+ }
783
731
 
784
- } else if (hasCatch) {
785
- if (this.prev < entry.catchLoc) {
786
- return handle(entry.catchLoc, true);
787
- }
732
+ var context = this;
788
733
 
789
- } else if (hasFinally) {
790
- if (this.prev < entry.finallyLoc) {
791
- return handle(entry.finallyLoc);
792
- }
734
+ function handle(loc, caught) {
735
+ record.type = "throw";
736
+ record.arg = exception;
737
+ context.next = loc;
793
738
 
794
- } else {
795
- throw new Error("try statement without catch or finally");
739
+ if (caught) {
740
+ // If the dispatched exception was caught by a catch block,
741
+ // then let that catch block handle the exception normally.
742
+ context.method = "next";
743
+ context.arg = undefined$1;
796
744
  }
797
- }
798
- }
799
- },
800
745
 
801
- abrupt: function(type, arg) {
802
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
803
- var entry = this.tryEntries[i];
804
- if (entry.tryLoc <= this.prev &&
805
- hasOwn.call(entry, "finallyLoc") &&
806
- this.prev < entry.finallyLoc) {
807
- var finallyEntry = entry;
808
- break;
746
+ return !!caught;
809
747
  }
810
- }
811
748
 
812
- if (finallyEntry &&
813
- (type === "break" ||
814
- type === "continue") &&
815
- finallyEntry.tryLoc <= arg &&
816
- arg <= finallyEntry.finallyLoc) {
817
- // Ignore the finally entry if control is not jumping to a
818
- // location outside the try/catch block.
819
- finallyEntry = null;
820
- }
749
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
750
+ var entry = this.tryEntries[i];
751
+ var record = entry.completion;
821
752
 
822
- var record = finallyEntry ? finallyEntry.completion : {};
823
- record.type = type;
824
- record.arg = arg;
753
+ if (entry.tryLoc === "root") {
754
+ // Exception thrown outside of any try block that could handle
755
+ // it, so set the completion value of the entire function to
756
+ // throw the exception.
757
+ return handle("end");
758
+ }
825
759
 
826
- if (finallyEntry) {
827
- this.method = "next";
828
- this.next = finallyEntry.finallyLoc;
829
- return ContinueSentinel;
830
- }
760
+ if (entry.tryLoc <= this.prev) {
761
+ var hasCatch = hasOwn.call(entry, "catchLoc");
762
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
831
763
 
832
- return this.complete(record);
833
- },
764
+ if (hasCatch && hasFinally) {
765
+ if (this.prev < entry.catchLoc) {
766
+ return handle(entry.catchLoc, true);
767
+ } else if (this.prev < entry.finallyLoc) {
768
+ return handle(entry.finallyLoc);
769
+ }
770
+ } else if (hasCatch) {
771
+ if (this.prev < entry.catchLoc) {
772
+ return handle(entry.catchLoc, true);
773
+ }
774
+ } else if (hasFinally) {
775
+ if (this.prev < entry.finallyLoc) {
776
+ return handle(entry.finallyLoc);
777
+ }
778
+ } else {
779
+ throw new Error("try statement without catch or finally");
780
+ }
781
+ }
782
+ }
783
+ },
784
+ abrupt: function abrupt(type, arg) {
785
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
786
+ var entry = this.tryEntries[i];
834
787
 
835
- complete: function(record, afterLoc) {
836
- if (record.type === "throw") {
837
- throw record.arg;
838
- }
788
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
789
+ var finallyEntry = entry;
790
+ break;
791
+ }
792
+ }
839
793
 
840
- if (record.type === "break" ||
841
- record.type === "continue") {
842
- this.next = record.arg;
843
- } else if (record.type === "return") {
844
- this.rval = this.arg = record.arg;
845
- this.method = "return";
846
- this.next = "end";
847
- } else if (record.type === "normal" && afterLoc) {
848
- this.next = afterLoc;
849
- }
794
+ if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
795
+ // Ignore the finally entry if control is not jumping to a
796
+ // location outside the try/catch block.
797
+ finallyEntry = null;
798
+ }
850
799
 
851
- return ContinueSentinel;
852
- },
800
+ var record = finallyEntry ? finallyEntry.completion : {};
801
+ record.type = type;
802
+ record.arg = arg;
853
803
 
854
- finish: function(finallyLoc) {
855
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
856
- var entry = this.tryEntries[i];
857
- if (entry.finallyLoc === finallyLoc) {
858
- this.complete(entry.completion, entry.afterLoc);
859
- resetTryEntry(entry);
804
+ if (finallyEntry) {
805
+ this.method = "next";
806
+ this.next = finallyEntry.finallyLoc;
860
807
  return ContinueSentinel;
861
808
  }
862
- }
863
- },
864
809
 
865
- "catch": function(tryLoc) {
866
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
867
- var entry = this.tryEntries[i];
868
- if (entry.tryLoc === tryLoc) {
869
- var record = entry.completion;
870
- if (record.type === "throw") {
871
- var thrown = record.arg;
810
+ return this.complete(record);
811
+ },
812
+ complete: function complete(record, afterLoc) {
813
+ if (record.type === "throw") {
814
+ throw record.arg;
815
+ }
816
+
817
+ if (record.type === "break" || record.type === "continue") {
818
+ this.next = record.arg;
819
+ } else if (record.type === "return") {
820
+ this.rval = this.arg = record.arg;
821
+ this.method = "return";
822
+ this.next = "end";
823
+ } else if (record.type === "normal" && afterLoc) {
824
+ this.next = afterLoc;
825
+ }
826
+
827
+ return ContinueSentinel;
828
+ },
829
+ finish: function finish(finallyLoc) {
830
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
831
+ var entry = this.tryEntries[i];
832
+
833
+ if (entry.finallyLoc === finallyLoc) {
834
+ this.complete(entry.completion, entry.afterLoc);
872
835
  resetTryEntry(entry);
836
+ return ContinueSentinel;
873
837
  }
874
- return thrown;
875
838
  }
876
- }
839
+ },
840
+ "catch": function _catch(tryLoc) {
841
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
842
+ var entry = this.tryEntries[i];
877
843
 
878
- // The context.catch method must only be called with a location
879
- // argument that corresponds to a known catch block.
880
- throw new Error("illegal catch attempt");
881
- },
844
+ if (entry.tryLoc === tryLoc) {
845
+ var record = entry.completion;
882
846
 
883
- delegateYield: function(iterable, resultName, nextLoc) {
884
- this.delegate = {
885
- iterator: values(iterable),
886
- resultName: resultName,
887
- nextLoc: nextLoc
888
- };
847
+ if (record.type === "throw") {
848
+ var thrown = record.arg;
849
+ resetTryEntry(entry);
850
+ }
889
851
 
890
- if (this.method === "next") {
891
- // Deliberately forget the last sent value so that we don't
892
- // accidentally pass it on to the delegate.
893
- this.arg = undefined$1;
894
- }
852
+ return thrown;
853
+ }
854
+ } // The context.catch method must only be called with a location
855
+ // argument that corresponds to a known catch block.
895
856
 
896
- return ContinueSentinel;
897
- }
898
- };
899
857
 
900
- // Regardless of whether this script is executing as a CommonJS module
901
- // or not, return the runtime object so that we can declare the variable
902
- // regeneratorRuntime in the outer scope, which allows this module to be
903
- // injected easily by `bin/regenerator --include-runtime script.js`.
904
- return exports;
858
+ throw new Error("illegal catch attempt");
859
+ },
860
+ delegateYield: function delegateYield(iterable, resultName, nextLoc) {
861
+ this.delegate = {
862
+ iterator: values(iterable),
863
+ resultName: resultName,
864
+ nextLoc: nextLoc
865
+ };
866
+
867
+ if (this.method === "next") {
868
+ // Deliberately forget the last sent value so that we don't
869
+ // accidentally pass it on to the delegate.
870
+ this.arg = undefined$1;
871
+ }
872
+
873
+ return ContinueSentinel;
874
+ }
875
+ }; // Regardless of whether this script is executing as a CommonJS module
876
+ // or not, return the runtime object so that we can declare the variable
877
+ // regeneratorRuntime in the outer scope, which allows this module to be
878
+ // injected easily by `bin/regenerator --include-runtime script.js`.
905
879
 
906
- }(
907
- // If this script is executing as a CommonJS module, use module.exports
880
+ return exports;
881
+ }( // If this script is executing as a CommonJS module, use module.exports
908
882
  // as the regeneratorRuntime namespace. Otherwise create a new empty
909
883
  // object. Either way, the resulting object will be used to initialize
910
884
  // the regeneratorRuntime variable at the top of this file.
911
- module.exports
912
- ));
913
-
914
- try {
915
- regeneratorRuntime = runtime;
916
- } catch (accidentalStrictMode) {
917
- // This module should not be running in strict mode, so the above
918
- // assignment should always work unless something is misconfigured. Just
919
- // in case runtime.js accidentally runs in strict mode, in modern engines
920
- // we can explicitly access globalThis. In older engines we can escape
921
- // strict mode using a global Function call. This could conceivably fail
922
- // if a Content Security Policy forbids using Function, but in that case
923
- // the proper solution is to fix the accidental strict mode problem. If
924
- // you've misconfigured your bundler to force strict mode and applied a
925
- // CSP to forbid Function, and you're not willing to fix either of those
926
- // problems, please detail your unique predicament in a GitHub issue.
927
- if (typeof globalThis === "object") {
928
- globalThis.regeneratorRuntime = runtime;
929
- } else {
885
+ module.exports );
886
+
887
+ try {
888
+ regeneratorRuntime = runtime;
889
+ } catch (accidentalStrictMode) {
890
+ // This module should not be running in strict mode, so the above
891
+ // assignment should always work unless something is misconfigured. Just
892
+ // in case runtime.js accidentally runs in strict mode, we can escape
893
+ // strict mode using a global Function call. This could conceivably fail
894
+ // if a Content Security Policy forbids using Function, but in that case
895
+ // the proper solution is to fix the accidental strict mode problem. If
896
+ // you've misconfigured your bundler to force strict mode and applied a
897
+ // CSP to forbid Function, and you're not willing to fix either of those
898
+ // problems, please detail your unique predicament in a GitHub issue.
930
899
  Function("r", "regeneratorRuntime = r")(runtime);
931
900
  }
932
- }
933
901
  });
934
902
 
935
903
  var ProductContext = /*#__PURE__*/React__default.createContext(undefined);
@@ -1356,7 +1324,8 @@ var productCollectionMeta = {
1356
1324
  };
1357
1325
  })) != null ? _ctx$brands$map : [];
1358
1326
  }
1359
- }
1327
+ },
1328
+ noLayout: "boolean"
1360
1329
  },
1361
1330
  defaultStyles: {
1362
1331
  display: "grid",
@@ -1376,6 +1345,7 @@ function ProductCollection(props) {
1376
1345
  count = props.count,
1377
1346
  category = props.category,
1378
1347
  brand = props.brand,
1348
+ noLayout = props.noLayout,
1379
1349
  setControlContextData = props.setControlContextData;
1380
1350
 
1381
1351
  var _useSearch = useSearch({
@@ -1398,14 +1368,15 @@ function ProductCollection(props) {
1398
1368
  });
1399
1369
  }
1400
1370
 
1401
- return React__default.createElement("div", {
1402
- className: className
1403
- }, data == null ? void 0 : data.products.map(function (product, i) {
1371
+ var renderedData = data == null ? void 0 : data.products.map(function (product, i) {
1404
1372
  return React__default.createElement(ProductProvider, {
1405
1373
  product: product,
1406
1374
  key: product.id
1407
1375
  }, host.repeatedElement(i === 0, children));
1408
- }));
1376
+ });
1377
+ return noLayout ? React__default.createElement(React__default.Fragment, null, renderedData) : React__default.createElement("div", {
1378
+ className: className
1379
+ }, renderedData);
1409
1380
  }
1410
1381
 
1411
1382
  function registerProductCollection(loader, customProductCollectionMeta) {