@plasmicpkgs/plasmic-query 0.0.2 → 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.
@@ -1,6 +1,6 @@
1
1
  import registerComponent from '@plasmicapp/host/registerComponent';
2
2
  import { usePlasmicQueryData } from '@plasmicapp/query';
3
- import { DataProvider } from '@plasmicpkgs/plasmic-basic-components';
3
+ import { DataProvider } from '@plasmicapp/host';
4
4
  import React from 'react';
5
5
 
6
6
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
@@ -58,200 +58,198 @@ function createCommonjsModule(fn, module) {
58
58
  return module = { exports: {} }, fn(module, module.exports), module.exports;
59
59
  }
60
60
 
61
- var runtime_1 = createCommonjsModule(function (module) {
62
- /**
63
- * Copyright (c) 2014-present, Facebook, Inc.
64
- *
65
- * This source code is licensed under the MIT license found in the
66
- * LICENSE file in the root directory of this source tree.
67
- */
68
-
69
- var runtime = (function (exports) {
70
-
71
- var Op = Object.prototype;
72
- var hasOwn = Op.hasOwnProperty;
73
- var undefined$1; // More compressible than void 0.
74
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
75
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
76
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
77
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
78
-
79
- function define(obj, key, value) {
80
- Object.defineProperty(obj, key, {
81
- value: value,
82
- enumerable: true,
83
- configurable: true,
84
- writable: true
85
- });
86
- return obj[key];
87
- }
88
- try {
89
- // IE 8 has a broken Object.defineProperty that only works on DOM objects.
90
- define({}, "");
91
- } catch (err) {
92
- define = function(obj, key, value) {
93
- return obj[key] = value;
94
- };
95
- }
96
-
97
- function wrap(innerFn, outerFn, self, tryLocsList) {
98
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
99
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
100
- var generator = Object.create(protoGenerator.prototype);
101
- var context = new Context(tryLocsList || []);
102
-
103
- // The ._invoke method unifies the implementations of the .next,
104
- // .throw, and .return methods.
105
- generator._invoke = makeInvokeMethod(innerFn, self, context);
61
+ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
62
+ /**
63
+ * Copyright (c) 2014-present, Facebook, Inc.
64
+ *
65
+ * This source code is licensed under the MIT license found in the
66
+ * LICENSE file in the root directory of this source tree.
67
+ */
68
+ var runtime = function (exports) {
69
+
70
+ var Op = Object.prototype;
71
+ var hasOwn = Op.hasOwnProperty;
72
+ var undefined$1; // More compressible than void 0.
73
+
74
+ var $Symbol = typeof Symbol === "function" ? Symbol : {};
75
+ var iteratorSymbol = $Symbol.iterator || "@@iterator";
76
+ var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
77
+ var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
78
+
79
+ function define(obj, key, value) {
80
+ Object.defineProperty(obj, key, {
81
+ value: value,
82
+ enumerable: true,
83
+ configurable: true,
84
+ writable: true
85
+ });
86
+ return obj[key];
87
+ }
106
88
 
107
- return generator;
108
- }
109
- exports.wrap = wrap;
110
-
111
- // Try/catch helper to minimize deoptimizations. Returns a completion
112
- // record like context.tryEntries[i].completion. This interface could
113
- // have been (and was previously) designed to take a closure to be
114
- // invoked without arguments, but in all the cases we care about we
115
- // already have an existing method we want to call, so there's no need
116
- // to create a new function object. We can even get away with assuming
117
- // the method takes exactly one argument, since that happens to be true
118
- // in every case, so we don't have to touch the arguments object. The
119
- // only additional allocation required is the completion record, which
120
- // has a stable shape and so hopefully should be cheap to allocate.
121
- function tryCatch(fn, obj, arg) {
122
89
  try {
123
- return { type: "normal", arg: fn.call(obj, arg) };
90
+ // IE 8 has a broken Object.defineProperty that only works on DOM objects.
91
+ define({}, "");
124
92
  } catch (err) {
125
- return { type: "throw", arg: err };
93
+ define = function define(obj, key, value) {
94
+ return obj[key] = value;
95
+ };
126
96
  }
127
- }
128
97
 
129
- var GenStateSuspendedStart = "suspendedStart";
130
- var GenStateSuspendedYield = "suspendedYield";
131
- var GenStateExecuting = "executing";
132
- var GenStateCompleted = "completed";
133
-
134
- // Returning this object from the innerFn has the same effect as
135
- // breaking out of the dispatch switch statement.
136
- var ContinueSentinel = {};
137
-
138
- // Dummy constructor functions that we use as the .constructor and
139
- // .constructor.prototype properties for functions that return Generator
140
- // objects. For full spec compliance, you may wish to configure your
141
- // minifier not to mangle the names of these two functions.
142
- function Generator() {}
143
- function GeneratorFunction() {}
144
- function GeneratorFunctionPrototype() {}
145
-
146
- // This is a polyfill for %IteratorPrototype% for environments that
147
- // don't natively support it.
148
- var IteratorPrototype = {};
149
- IteratorPrototype[iteratorSymbol] = function () {
150
- return this;
151
- };
98
+ function wrap(innerFn, outerFn, self, tryLocsList) {
99
+ // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
100
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
101
+ var generator = Object.create(protoGenerator.prototype);
102
+ var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next,
103
+ // .throw, and .return methods.
152
104
 
153
- var getProto = Object.getPrototypeOf;
154
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
155
- if (NativeIteratorPrototype &&
156
- NativeIteratorPrototype !== Op &&
157
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
158
- // This environment has a native %IteratorPrototype%; use it instead
159
- // of the polyfill.
160
- IteratorPrototype = NativeIteratorPrototype;
161
- }
105
+ generator._invoke = makeInvokeMethod(innerFn, self, context);
106
+ return generator;
107
+ }
162
108
 
163
- var Gp = GeneratorFunctionPrototype.prototype =
164
- Generator.prototype = Object.create(IteratorPrototype);
165
- GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
166
- GeneratorFunctionPrototype.constructor = GeneratorFunction;
167
- GeneratorFunction.displayName = define(
168
- GeneratorFunctionPrototype,
169
- toStringTagSymbol,
170
- "GeneratorFunction"
171
- );
172
-
173
- // Helper for defining the .next, .throw, and .return methods of the
174
- // Iterator interface in terms of a single ._invoke method.
175
- function defineIteratorMethods(prototype) {
176
- ["next", "throw", "return"].forEach(function(method) {
177
- define(prototype, method, function(arg) {
178
- return this._invoke(method, arg);
179
- });
180
- });
181
- }
109
+ exports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion
110
+ // record like context.tryEntries[i].completion. This interface could
111
+ // have been (and was previously) designed to take a closure to be
112
+ // invoked without arguments, but in all the cases we care about we
113
+ // already have an existing method we want to call, so there's no need
114
+ // to create a new function object. We can even get away with assuming
115
+ // the method takes exactly one argument, since that happens to be true
116
+ // in every case, so we don't have to touch the arguments object. The
117
+ // only additional allocation required is the completion record, which
118
+ // has a stable shape and so hopefully should be cheap to allocate.
119
+
120
+ function tryCatch(fn, obj, arg) {
121
+ try {
122
+ return {
123
+ type: "normal",
124
+ arg: fn.call(obj, arg)
125
+ };
126
+ } catch (err) {
127
+ return {
128
+ type: "throw",
129
+ arg: err
130
+ };
131
+ }
132
+ }
133
+
134
+ var GenStateSuspendedStart = "suspendedStart";
135
+ var GenStateSuspendedYield = "suspendedYield";
136
+ var GenStateExecuting = "executing";
137
+ var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as
138
+ // breaking out of the dispatch switch statement.
139
+
140
+ var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and
141
+ // .constructor.prototype properties for functions that return Generator
142
+ // objects. For full spec compliance, you may wish to configure your
143
+ // minifier not to mangle the names of these two functions.
144
+
145
+ function Generator() {}
146
+
147
+ function GeneratorFunction() {}
148
+
149
+ function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that
150
+ // don't natively support it.
182
151
 
183
- exports.isGeneratorFunction = function(genFun) {
184
- var ctor = typeof genFun === "function" && genFun.constructor;
185
- return ctor
186
- ? ctor === GeneratorFunction ||
187
- // For the native GeneratorFunction constructor, the best we can
188
- // do is to check its .name property.
189
- (ctor.displayName || ctor.name) === "GeneratorFunction"
190
- : false;
191
- };
192
152
 
193
- exports.mark = function(genFun) {
194
- if (Object.setPrototypeOf) {
195
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
196
- } else {
197
- genFun.__proto__ = GeneratorFunctionPrototype;
198
- define(genFun, toStringTagSymbol, "GeneratorFunction");
153
+ var IteratorPrototype = {};
154
+
155
+ IteratorPrototype[iteratorSymbol] = function () {
156
+ return this;
157
+ };
158
+
159
+ var getProto = Object.getPrototypeOf;
160
+ var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
161
+
162
+ if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
163
+ // This environment has a native %IteratorPrototype%; use it instead
164
+ // of the polyfill.
165
+ IteratorPrototype = NativeIteratorPrototype;
199
166
  }
200
- genFun.prototype = Object.create(Gp);
201
- return genFun;
202
- };
203
167
 
204
- // Within the body of any async function, `await x` is transformed to
205
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
206
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
207
- // meant to be awaited.
208
- exports.awrap = function(arg) {
209
- return { __await: arg };
210
- };
168
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
169
+ GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
170
+ GeneratorFunctionPrototype.constructor = GeneratorFunction;
171
+ GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"); // Helper for defining the .next, .throw, and .return methods of the
172
+ // Iterator interface in terms of a single ._invoke method.
211
173
 
212
- function AsyncIterator(generator, PromiseImpl) {
213
- function invoke(method, arg, resolve, reject) {
214
- var record = tryCatch(generator[method], generator, arg);
215
- if (record.type === "throw") {
216
- reject(record.arg);
174
+ function defineIteratorMethods(prototype) {
175
+ ["next", "throw", "return"].forEach(function (method) {
176
+ define(prototype, method, function (arg) {
177
+ return this._invoke(method, arg);
178
+ });
179
+ });
180
+ }
181
+
182
+ exports.isGeneratorFunction = function (genFun) {
183
+ var ctor = typeof genFun === "function" && genFun.constructor;
184
+ return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can
185
+ // do is to check its .name property.
186
+ (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
187
+ };
188
+
189
+ exports.mark = function (genFun) {
190
+ if (Object.setPrototypeOf) {
191
+ Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
217
192
  } else {
218
- var result = record.arg;
219
- var value = result.value;
220
- if (value &&
221
- typeof value === "object" &&
222
- hasOwn.call(value, "__await")) {
223
- return PromiseImpl.resolve(value.__await).then(function(value) {
224
- invoke("next", value, resolve, reject);
225
- }, function(err) {
226
- invoke("throw", err, resolve, reject);
193
+ genFun.__proto__ = GeneratorFunctionPrototype;
194
+ define(genFun, toStringTagSymbol, "GeneratorFunction");
195
+ }
196
+
197
+ genFun.prototype = Object.create(Gp);
198
+ return genFun;
199
+ }; // Within the body of any async function, `await x` is transformed to
200
+ // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
201
+ // `hasOwn.call(value, "__await")` to determine if the yielded value is
202
+ // meant to be awaited.
203
+
204
+
205
+ exports.awrap = function (arg) {
206
+ return {
207
+ __await: arg
208
+ };
209
+ };
210
+
211
+ function AsyncIterator(generator, PromiseImpl) {
212
+ function invoke(method, arg, resolve, reject) {
213
+ var record = tryCatch(generator[method], generator, arg);
214
+
215
+ if (record.type === "throw") {
216
+ reject(record.arg);
217
+ } else {
218
+ var result = record.arg;
219
+ var value = result.value;
220
+
221
+ if (value && typeof value === "object" && hasOwn.call(value, "__await")) {
222
+ return PromiseImpl.resolve(value.__await).then(function (value) {
223
+ invoke("next", value, resolve, reject);
224
+ }, function (err) {
225
+ invoke("throw", err, resolve, reject);
226
+ });
227
+ }
228
+
229
+ return PromiseImpl.resolve(value).then(function (unwrapped) {
230
+ // When a yielded Promise is resolved, its final value becomes
231
+ // the .value of the Promise<{value,done}> result for the
232
+ // current iteration.
233
+ result.value = unwrapped;
234
+ resolve(result);
235
+ }, function (error) {
236
+ // If a rejected Promise was yielded, throw the rejection back
237
+ // into the async generator function so it can be handled there.
238
+ return invoke("throw", error, resolve, reject);
227
239
  });
228
240
  }
229
-
230
- return PromiseImpl.resolve(value).then(function(unwrapped) {
231
- // When a yielded Promise is resolved, its final value becomes
232
- // the .value of the Promise<{value,done}> result for the
233
- // current iteration.
234
- result.value = unwrapped;
235
- resolve(result);
236
- }, function(error) {
237
- // If a rejected Promise was yielded, throw the rejection back
238
- // into the async generator function so it can be handled there.
239
- return invoke("throw", error, resolve, reject);
240
- });
241
241
  }
242
- }
243
242
 
244
- var previousPromise;
243
+ var previousPromise;
245
244
 
246
- function enqueue(method, arg) {
247
- function callInvokeWithMethodAndArg() {
248
- return new PromiseImpl(function(resolve, reject) {
249
- invoke(method, arg, resolve, reject);
250
- });
251
- }
245
+ function enqueue(method, arg) {
246
+ function callInvokeWithMethodAndArg() {
247
+ return new PromiseImpl(function (resolve, reject) {
248
+ invoke(method, arg, resolve, reject);
249
+ });
250
+ }
252
251
 
253
- return previousPromise =
254
- // If enqueue has been called before, then we want to wait until
252
+ return previousPromise = // If enqueue has been called before, then we want to wait until
255
253
  // all previous Promises have been resolved before calling invoke,
256
254
  // so that results are always delivered in the correct order. If
257
255
  // enqueue has not been called before, then it is important to
@@ -263,551 +261,529 @@ var runtime = (function (exports) {
263
261
  // execute code before the first await. Since we implement simple
264
262
  // async functions in terms of async generators, it is especially
265
263
  // important to get this right, even though it requires care.
266
- previousPromise ? previousPromise.then(
267
- callInvokeWithMethodAndArg,
268
- // Avoid propagating failures to Promises returned by later
269
- // invocations of the iterator.
270
- callInvokeWithMethodAndArg
271
- ) : callInvokeWithMethodAndArg();
264
+ previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later
265
+ // invocations of the iterator.
266
+ callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
267
+ } // Define the unified helper method that is used to implement .next,
268
+ // .throw, and .return (see defineIteratorMethods).
269
+
270
+
271
+ this._invoke = enqueue;
272
272
  }
273
273
 
274
- // Define the unified helper method that is used to implement .next,
275
- // .throw, and .return (see defineIteratorMethods).
276
- this._invoke = enqueue;
277
- }
274
+ defineIteratorMethods(AsyncIterator.prototype);
278
275
 
279
- defineIteratorMethods(AsyncIterator.prototype);
280
- AsyncIterator.prototype[asyncIteratorSymbol] = function () {
281
- return this;
282
- };
283
- exports.AsyncIterator = AsyncIterator;
284
-
285
- // Note that simple async functions are implemented on top of
286
- // AsyncIterator objects; they just return a Promise for the value of
287
- // the final result produced by the iterator.
288
- exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
289
- if (PromiseImpl === void 0) PromiseImpl = Promise;
290
-
291
- var iter = new AsyncIterator(
292
- wrap(innerFn, outerFn, self, tryLocsList),
293
- PromiseImpl
294
- );
295
-
296
- return exports.isGeneratorFunction(outerFn)
297
- ? iter // If outerFn is a generator, return the full iterator.
298
- : iter.next().then(function(result) {
299
- return result.done ? result.value : iter.next();
300
- });
301
- };
276
+ AsyncIterator.prototype[asyncIteratorSymbol] = function () {
277
+ return this;
278
+ };
302
279
 
303
- function makeInvokeMethod(innerFn, self, context) {
304
- var state = GenStateSuspendedStart;
280
+ exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
281
+ // AsyncIterator objects; they just return a Promise for the value of
282
+ // the final result produced by the iterator.
305
283
 
306
- return function invoke(method, arg) {
307
- if (state === GenStateExecuting) {
308
- throw new Error("Generator is already running");
309
- }
284
+ exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
285
+ if (PromiseImpl === void 0) PromiseImpl = Promise;
286
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
287
+ return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
288
+ : iter.next().then(function (result) {
289
+ return result.done ? result.value : iter.next();
290
+ });
291
+ };
310
292
 
311
- if (state === GenStateCompleted) {
312
- if (method === "throw") {
313
- throw arg;
293
+ function makeInvokeMethod(innerFn, self, context) {
294
+ var state = GenStateSuspendedStart;
295
+ return function invoke(method, arg) {
296
+ if (state === GenStateExecuting) {
297
+ throw new Error("Generator is already running");
314
298
  }
315
299
 
316
- // Be forgiving, per 25.3.3.3.3 of the spec:
317
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
318
- return doneResult();
319
- }
300
+ if (state === GenStateCompleted) {
301
+ if (method === "throw") {
302
+ throw arg;
303
+ } // Be forgiving, per 25.3.3.3.3 of the spec:
304
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
320
305
 
321
- context.method = method;
322
- context.arg = arg;
323
306
 
324
- while (true) {
325
- var delegate = context.delegate;
326
- if (delegate) {
327
- var delegateResult = maybeInvokeDelegate(delegate, context);
328
- if (delegateResult) {
329
- if (delegateResult === ContinueSentinel) continue;
330
- return delegateResult;
331
- }
307
+ return doneResult();
332
308
  }
333
309
 
334
- if (context.method === "next") {
335
- // Setting context._sent for legacy support of Babel's
336
- // function.sent implementation.
337
- context.sent = context._sent = context.arg;
310
+ context.method = method;
311
+ context.arg = arg;
338
312
 
339
- } else if (context.method === "throw") {
340
- if (state === GenStateSuspendedStart) {
341
- state = GenStateCompleted;
342
- throw context.arg;
313
+ while (true) {
314
+ var delegate = context.delegate;
315
+
316
+ if (delegate) {
317
+ var delegateResult = maybeInvokeDelegate(delegate, context);
318
+
319
+ if (delegateResult) {
320
+ if (delegateResult === ContinueSentinel) continue;
321
+ return delegateResult;
322
+ }
343
323
  }
344
324
 
345
- context.dispatchException(context.arg);
325
+ if (context.method === "next") {
326
+ // Setting context._sent for legacy support of Babel's
327
+ // function.sent implementation.
328
+ context.sent = context._sent = context.arg;
329
+ } else if (context.method === "throw") {
330
+ if (state === GenStateSuspendedStart) {
331
+ state = GenStateCompleted;
332
+ throw context.arg;
333
+ }
346
334
 
347
- } else if (context.method === "return") {
348
- context.abrupt("return", context.arg);
349
- }
335
+ context.dispatchException(context.arg);
336
+ } else if (context.method === "return") {
337
+ context.abrupt("return", context.arg);
338
+ }
350
339
 
351
- state = GenStateExecuting;
340
+ state = GenStateExecuting;
341
+ var record = tryCatch(innerFn, self, context);
352
342
 
353
- var record = tryCatch(innerFn, self, context);
354
- if (record.type === "normal") {
355
- // If an exception is thrown from innerFn, we leave state ===
356
- // GenStateExecuting and loop back for another invocation.
357
- state = context.done
358
- ? GenStateCompleted
359
- : GenStateSuspendedYield;
343
+ if (record.type === "normal") {
344
+ // If an exception is thrown from innerFn, we leave state ===
345
+ // GenStateExecuting and loop back for another invocation.
346
+ state = context.done ? GenStateCompleted : GenStateSuspendedYield;
360
347
 
361
- if (record.arg === ContinueSentinel) {
362
- continue;
363
- }
348
+ if (record.arg === ContinueSentinel) {
349
+ continue;
350
+ }
364
351
 
365
- return {
366
- value: record.arg,
367
- done: context.done
368
- };
352
+ return {
353
+ value: record.arg,
354
+ done: context.done
355
+ };
356
+ } else if (record.type === "throw") {
357
+ state = GenStateCompleted; // Dispatch the exception by looping back around to the
358
+ // context.dispatchException(context.arg) call above.
359
+
360
+ context.method = "throw";
361
+ context.arg = record.arg;
362
+ }
363
+ }
364
+ };
365
+ } // Call delegate.iterator[context.method](context.arg) and handle the
366
+ // result, either by returning a { value, done } result from the
367
+ // delegate iterator, or by modifying context.method and context.arg,
368
+ // setting context.delegate to null, and returning the ContinueSentinel.
369
+
370
+
371
+ function maybeInvokeDelegate(delegate, context) {
372
+ var method = delegate.iterator[context.method];
373
+
374
+ if (method === undefined$1) {
375
+ // A .throw or .return when the delegate iterator has no .throw
376
+ // method always terminates the yield* loop.
377
+ context.delegate = null;
378
+
379
+ if (context.method === "throw") {
380
+ // Note: ["return"] must be used for ES3 parsing compatibility.
381
+ if (delegate.iterator["return"]) {
382
+ // If the delegate iterator has a return method, give it a
383
+ // chance to clean up.
384
+ context.method = "return";
385
+ context.arg = undefined$1;
386
+ maybeInvokeDelegate(delegate, context);
387
+
388
+ if (context.method === "throw") {
389
+ // If maybeInvokeDelegate(context) changed context.method from
390
+ // "return" to "throw", let that override the TypeError below.
391
+ return ContinueSentinel;
392
+ }
393
+ }
369
394
 
370
- } else if (record.type === "throw") {
371
- state = GenStateCompleted;
372
- // Dispatch the exception by looping back around to the
373
- // context.dispatchException(context.arg) call above.
374
395
  context.method = "throw";
375
- context.arg = record.arg;
396
+ context.arg = new TypeError("The iterator does not provide a 'throw' method");
376
397
  }
398
+
399
+ return ContinueSentinel;
377
400
  }
378
- };
379
- }
380
401
 
381
- // Call delegate.iterator[context.method](context.arg) and handle the
382
- // result, either by returning a { value, done } result from the
383
- // delegate iterator, or by modifying context.method and context.arg,
384
- // setting context.delegate to null, and returning the ContinueSentinel.
385
- function maybeInvokeDelegate(delegate, context) {
386
- var method = delegate.iterator[context.method];
387
- if (method === undefined$1) {
388
- // A .throw or .return when the delegate iterator has no .throw
389
- // method always terminates the yield* loop.
390
- context.delegate = null;
402
+ var record = tryCatch(method, delegate.iterator, context.arg);
391
403
 
392
- if (context.method === "throw") {
393
- // Note: ["return"] must be used for ES3 parsing compatibility.
394
- if (delegate.iterator["return"]) {
395
- // If the delegate iterator has a return method, give it a
396
- // chance to clean up.
397
- context.method = "return";
398
- context.arg = undefined$1;
399
- maybeInvokeDelegate(delegate, context);
404
+ if (record.type === "throw") {
405
+ context.method = "throw";
406
+ context.arg = record.arg;
407
+ context.delegate = null;
408
+ return ContinueSentinel;
409
+ }
400
410
 
401
- if (context.method === "throw") {
402
- // If maybeInvokeDelegate(context) changed context.method from
403
- // "return" to "throw", let that override the TypeError below.
404
- return ContinueSentinel;
405
- }
406
- }
411
+ var info = record.arg;
407
412
 
413
+ if (!info) {
408
414
  context.method = "throw";
409
- context.arg = new TypeError(
410
- "The iterator does not provide a 'throw' method");
415
+ context.arg = new TypeError("iterator result is not an object");
416
+ context.delegate = null;
417
+ return ContinueSentinel;
411
418
  }
412
419
 
413
- return ContinueSentinel;
414
- }
420
+ if (info.done) {
421
+ // Assign the result of the finished delegate to the temporary
422
+ // variable specified by delegate.resultName (see delegateYield).
423
+ context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield).
415
424
 
416
- var record = tryCatch(method, delegate.iterator, context.arg);
425
+ context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the
426
+ // exception, let the outer generator proceed normally. If
427
+ // context.method was "next", forget context.arg since it has been
428
+ // "consumed" by the delegate iterator. If context.method was
429
+ // "return", allow the original .return call to continue in the
430
+ // outer generator.
417
431
 
418
- if (record.type === "throw") {
419
- context.method = "throw";
420
- context.arg = record.arg;
421
- context.delegate = null;
422
- return ContinueSentinel;
423
- }
432
+ if (context.method !== "return") {
433
+ context.method = "next";
434
+ context.arg = undefined$1;
435
+ }
436
+ } else {
437
+ // Re-yield the result returned by the delegate method.
438
+ return info;
439
+ } // The delegate iterator is finished, so forget it and continue with
440
+ // the outer generator.
424
441
 
425
- var info = record.arg;
426
442
 
427
- if (! info) {
428
- context.method = "throw";
429
- context.arg = new TypeError("iterator result is not an object");
430
443
  context.delegate = null;
431
444
  return ContinueSentinel;
432
- }
445
+ } // Define Generator.prototype.{next,throw,return} in terms of the
446
+ // unified ._invoke helper method.
433
447
 
434
- if (info.done) {
435
- // Assign the result of the finished delegate to the temporary
436
- // variable specified by delegate.resultName (see delegateYield).
437
- context[delegate.resultName] = info.value;
438
-
439
- // Resume execution at the desired location (see delegateYield).
440
- context.next = delegate.nextLoc;
441
-
442
- // If context.method was "throw" but the delegate handled the
443
- // exception, let the outer generator proceed normally. If
444
- // context.method was "next", forget context.arg since it has been
445
- // "consumed" by the delegate iterator. If context.method was
446
- // "return", allow the original .return call to continue in the
447
- // outer generator.
448
- if (context.method !== "return") {
449
- context.method = "next";
450
- context.arg = undefined$1;
451
- }
452
448
 
453
- } else {
454
- // Re-yield the result returned by the delegate method.
455
- return info;
456
- }
449
+ defineIteratorMethods(Gp);
450
+ define(Gp, toStringTagSymbol, "Generator"); // A Generator should always return itself as the iterator object when the
451
+ // @@iterator function is called on it. Some browsers' implementations of the
452
+ // iterator prototype chain incorrectly implement this, causing the Generator
453
+ // object to not be returned from this call. This ensures that doesn't happen.
454
+ // See https://github.com/facebook/regenerator/issues/274 for more details.
457
455
 
458
- // The delegate iterator is finished, so forget it and continue with
459
- // the outer generator.
460
- context.delegate = null;
461
- return ContinueSentinel;
462
- }
463
-
464
- // Define Generator.prototype.{next,throw,return} in terms of the
465
- // unified ._invoke helper method.
466
- defineIteratorMethods(Gp);
456
+ Gp[iteratorSymbol] = function () {
457
+ return this;
458
+ };
467
459
 
468
- define(Gp, toStringTagSymbol, "Generator");
460
+ Gp.toString = function () {
461
+ return "[object Generator]";
462
+ };
469
463
 
470
- // A Generator should always return itself as the iterator object when the
471
- // @@iterator function is called on it. Some browsers' implementations of the
472
- // iterator prototype chain incorrectly implement this, causing the Generator
473
- // object to not be returned from this call. This ensures that doesn't happen.
474
- // See https://github.com/facebook/regenerator/issues/274 for more details.
475
- Gp[iteratorSymbol] = function() {
476
- return this;
477
- };
464
+ function pushTryEntry(locs) {
465
+ var entry = {
466
+ tryLoc: locs[0]
467
+ };
478
468
 
479
- Gp.toString = function() {
480
- return "[object Generator]";
481
- };
469
+ if (1 in locs) {
470
+ entry.catchLoc = locs[1];
471
+ }
482
472
 
483
- function pushTryEntry(locs) {
484
- var entry = { tryLoc: locs[0] };
473
+ if (2 in locs) {
474
+ entry.finallyLoc = locs[2];
475
+ entry.afterLoc = locs[3];
476
+ }
485
477
 
486
- if (1 in locs) {
487
- entry.catchLoc = locs[1];
478
+ this.tryEntries.push(entry);
488
479
  }
489
480
 
490
- if (2 in locs) {
491
- entry.finallyLoc = locs[2];
492
- entry.afterLoc = locs[3];
481
+ function resetTryEntry(entry) {
482
+ var record = entry.completion || {};
483
+ record.type = "normal";
484
+ delete record.arg;
485
+ entry.completion = record;
493
486
  }
494
487
 
495
- this.tryEntries.push(entry);
496
- }
497
-
498
- function resetTryEntry(entry) {
499
- var record = entry.completion || {};
500
- record.type = "normal";
501
- delete record.arg;
502
- entry.completion = record;
503
- }
504
-
505
- function Context(tryLocsList) {
506
- // The root entry object (effectively a try statement without a catch
507
- // or a finally block) gives us a place to store values thrown from
508
- // locations where there is no enclosing try statement.
509
- this.tryEntries = [{ tryLoc: "root" }];
510
- tryLocsList.forEach(pushTryEntry, this);
511
- this.reset(true);
512
- }
513
-
514
- exports.keys = function(object) {
515
- var keys = [];
516
- for (var key in object) {
517
- keys.push(key);
488
+ function Context(tryLocsList) {
489
+ // The root entry object (effectively a try statement without a catch
490
+ // or a finally block) gives us a place to store values thrown from
491
+ // locations where there is no enclosing try statement.
492
+ this.tryEntries = [{
493
+ tryLoc: "root"
494
+ }];
495
+ tryLocsList.forEach(pushTryEntry, this);
496
+ this.reset(true);
518
497
  }
519
- keys.reverse();
520
-
521
- // Rather than returning an object with a next method, we keep
522
- // things simple and return the next function itself.
523
- return function next() {
524
- while (keys.length) {
525
- var key = keys.pop();
526
- if (key in object) {
527
- next.value = key;
528
- next.done = false;
529
- return next;
530
- }
531
- }
532
498
 
533
- // To avoid creating an additional object, we just hang the .value
534
- // and .done properties off the next function object itself. This
535
- // also ensures that the minifier will not anonymize the function.
536
- next.done = true;
537
- return next;
538
- };
539
- };
499
+ exports.keys = function (object) {
500
+ var keys = [];
540
501
 
541
- function values(iterable) {
542
- if (iterable) {
543
- var iteratorMethod = iterable[iteratorSymbol];
544
- if (iteratorMethod) {
545
- return iteratorMethod.call(iterable);
502
+ for (var key in object) {
503
+ keys.push(key);
546
504
  }
547
505
 
548
- if (typeof iterable.next === "function") {
549
- return iterable;
550
- }
551
-
552
- if (!isNaN(iterable.length)) {
553
- var i = -1, next = function next() {
554
- while (++i < iterable.length) {
555
- if (hasOwn.call(iterable, i)) {
556
- next.value = iterable[i];
557
- next.done = false;
558
- return next;
559
- }
560
- }
506
+ keys.reverse(); // Rather than returning an object with a next method, we keep
507
+ // things simple and return the next function itself.
561
508
 
562
- next.value = undefined$1;
563
- next.done = true;
509
+ return function next() {
510
+ while (keys.length) {
511
+ var key = keys.pop();
564
512
 
565
- return next;
566
- };
513
+ if (key in object) {
514
+ next.value = key;
515
+ next.done = false;
516
+ return next;
517
+ }
518
+ } // To avoid creating an additional object, we just hang the .value
519
+ // and .done properties off the next function object itself. This
520
+ // also ensures that the minifier will not anonymize the function.
567
521
 
568
- return next.next = next;
569
- }
570
- }
571
522
 
572
- // Return an iterator with no values.
573
- return { next: doneResult };
574
- }
575
- exports.values = values;
523
+ next.done = true;
524
+ return next;
525
+ };
526
+ };
576
527
 
577
- function doneResult() {
578
- return { value: undefined$1, done: true };
579
- }
528
+ function values(iterable) {
529
+ if (iterable) {
530
+ var iteratorMethod = iterable[iteratorSymbol];
580
531
 
581
- Context.prototype = {
582
- constructor: Context,
583
-
584
- reset: function(skipTempReset) {
585
- this.prev = 0;
586
- this.next = 0;
587
- // Resetting context._sent for legacy support of Babel's
588
- // function.sent implementation.
589
- this.sent = this._sent = undefined$1;
590
- this.done = false;
591
- this.delegate = null;
592
-
593
- this.method = "next";
594
- this.arg = undefined$1;
595
-
596
- this.tryEntries.forEach(resetTryEntry);
597
-
598
- if (!skipTempReset) {
599
- for (var name in this) {
600
- // Not sure about the optimal order of these conditions:
601
- if (name.charAt(0) === "t" &&
602
- hasOwn.call(this, name) &&
603
- !isNaN(+name.slice(1))) {
604
- this[name] = undefined$1;
605
- }
532
+ if (iteratorMethod) {
533
+ return iteratorMethod.call(iterable);
606
534
  }
607
- }
608
- },
609
-
610
- stop: function() {
611
- this.done = true;
612
-
613
- var rootEntry = this.tryEntries[0];
614
- var rootRecord = rootEntry.completion;
615
- if (rootRecord.type === "throw") {
616
- throw rootRecord.arg;
617
- }
618
535
 
619
- return this.rval;
620
- },
536
+ if (typeof iterable.next === "function") {
537
+ return iterable;
538
+ }
621
539
 
622
- dispatchException: function(exception) {
623
- if (this.done) {
624
- throw exception;
625
- }
540
+ if (!isNaN(iterable.length)) {
541
+ var i = -1,
542
+ next = function next() {
543
+ while (++i < iterable.length) {
544
+ if (hasOwn.call(iterable, i)) {
545
+ next.value = iterable[i];
546
+ next.done = false;
547
+ return next;
548
+ }
549
+ }
626
550
 
627
- var context = this;
628
- function handle(loc, caught) {
629
- record.type = "throw";
630
- record.arg = exception;
631
- context.next = loc;
551
+ next.value = undefined$1;
552
+ next.done = true;
553
+ return next;
554
+ };
632
555
 
633
- if (caught) {
634
- // If the dispatched exception was caught by a catch block,
635
- // then let that catch block handle the exception normally.
636
- context.method = "next";
637
- context.arg = undefined$1;
556
+ return next.next = next;
638
557
  }
558
+ } // Return an iterator with no values.
639
559
 
640
- return !! caught;
641
- }
642
560
 
643
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
644
- var entry = this.tryEntries[i];
645
- var record = entry.completion;
561
+ return {
562
+ next: doneResult
563
+ };
564
+ }
646
565
 
647
- if (entry.tryLoc === "root") {
648
- // Exception thrown outside of any try block that could handle
649
- // it, so set the completion value of the entire function to
650
- // throw the exception.
651
- return handle("end");
652
- }
566
+ exports.values = values;
653
567
 
654
- if (entry.tryLoc <= this.prev) {
655
- var hasCatch = hasOwn.call(entry, "catchLoc");
656
- var hasFinally = hasOwn.call(entry, "finallyLoc");
568
+ function doneResult() {
569
+ return {
570
+ value: undefined$1,
571
+ done: true
572
+ };
573
+ }
657
574
 
658
- if (hasCatch && hasFinally) {
659
- if (this.prev < entry.catchLoc) {
660
- return handle(entry.catchLoc, true);
661
- } else if (this.prev < entry.finallyLoc) {
662
- return handle(entry.finallyLoc);
663
- }
575
+ Context.prototype = {
576
+ constructor: Context,
577
+ reset: function reset(skipTempReset) {
578
+ this.prev = 0;
579
+ this.next = 0; // Resetting context._sent for legacy support of Babel's
580
+ // function.sent implementation.
664
581
 
665
- } else if (hasCatch) {
666
- if (this.prev < entry.catchLoc) {
667
- return handle(entry.catchLoc, true);
668
- }
582
+ this.sent = this._sent = undefined$1;
583
+ this.done = false;
584
+ this.delegate = null;
585
+ this.method = "next";
586
+ this.arg = undefined$1;
587
+ this.tryEntries.forEach(resetTryEntry);
669
588
 
670
- } else if (hasFinally) {
671
- if (this.prev < entry.finallyLoc) {
672
- return handle(entry.finallyLoc);
589
+ if (!skipTempReset) {
590
+ for (var name in this) {
591
+ // Not sure about the optimal order of these conditions:
592
+ if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) {
593
+ this[name] = undefined$1;
673
594
  }
674
-
675
- } else {
676
- throw new Error("try statement without catch or finally");
677
595
  }
678
596
  }
679
- }
680
- },
597
+ },
598
+ stop: function stop() {
599
+ this.done = true;
600
+ var rootEntry = this.tryEntries[0];
601
+ var rootRecord = rootEntry.completion;
602
+
603
+ if (rootRecord.type === "throw") {
604
+ throw rootRecord.arg;
605
+ }
681
606
 
682
- abrupt: function(type, arg) {
683
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
684
- var entry = this.tryEntries[i];
685
- if (entry.tryLoc <= this.prev &&
686
- hasOwn.call(entry, "finallyLoc") &&
687
- this.prev < entry.finallyLoc) {
688
- var finallyEntry = entry;
689
- break;
607
+ return this.rval;
608
+ },
609
+ dispatchException: function dispatchException(exception) {
610
+ if (this.done) {
611
+ throw exception;
690
612
  }
691
- }
692
613
 
693
- if (finallyEntry &&
694
- (type === "break" ||
695
- type === "continue") &&
696
- finallyEntry.tryLoc <= arg &&
697
- arg <= finallyEntry.finallyLoc) {
698
- // Ignore the finally entry if control is not jumping to a
699
- // location outside the try/catch block.
700
- finallyEntry = null;
701
- }
614
+ var context = this;
702
615
 
703
- var record = finallyEntry ? finallyEntry.completion : {};
704
- record.type = type;
705
- record.arg = arg;
616
+ function handle(loc, caught) {
617
+ record.type = "throw";
618
+ record.arg = exception;
619
+ context.next = loc;
706
620
 
707
- if (finallyEntry) {
708
- this.method = "next";
709
- this.next = finallyEntry.finallyLoc;
710
- return ContinueSentinel;
711
- }
621
+ if (caught) {
622
+ // If the dispatched exception was caught by a catch block,
623
+ // then let that catch block handle the exception normally.
624
+ context.method = "next";
625
+ context.arg = undefined$1;
626
+ }
712
627
 
713
- return this.complete(record);
714
- },
628
+ return !!caught;
629
+ }
715
630
 
716
- complete: function(record, afterLoc) {
717
- if (record.type === "throw") {
718
- throw record.arg;
719
- }
631
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
632
+ var entry = this.tryEntries[i];
633
+ var record = entry.completion;
720
634
 
721
- if (record.type === "break" ||
722
- record.type === "continue") {
723
- this.next = record.arg;
724
- } else if (record.type === "return") {
725
- this.rval = this.arg = record.arg;
726
- this.method = "return";
727
- this.next = "end";
728
- } else if (record.type === "normal" && afterLoc) {
729
- this.next = afterLoc;
730
- }
635
+ if (entry.tryLoc === "root") {
636
+ // Exception thrown outside of any try block that could handle
637
+ // it, so set the completion value of the entire function to
638
+ // throw the exception.
639
+ return handle("end");
640
+ }
731
641
 
732
- return ContinueSentinel;
733
- },
642
+ if (entry.tryLoc <= this.prev) {
643
+ var hasCatch = hasOwn.call(entry, "catchLoc");
644
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
645
+
646
+ if (hasCatch && hasFinally) {
647
+ if (this.prev < entry.catchLoc) {
648
+ return handle(entry.catchLoc, true);
649
+ } else if (this.prev < entry.finallyLoc) {
650
+ return handle(entry.finallyLoc);
651
+ }
652
+ } else if (hasCatch) {
653
+ if (this.prev < entry.catchLoc) {
654
+ return handle(entry.catchLoc, true);
655
+ }
656
+ } else if (hasFinally) {
657
+ if (this.prev < entry.finallyLoc) {
658
+ return handle(entry.finallyLoc);
659
+ }
660
+ } else {
661
+ throw new Error("try statement without catch or finally");
662
+ }
663
+ }
664
+ }
665
+ },
666
+ abrupt: function abrupt(type, arg) {
667
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
668
+ var entry = this.tryEntries[i];
669
+
670
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
671
+ var finallyEntry = entry;
672
+ break;
673
+ }
674
+ }
734
675
 
735
- finish: function(finallyLoc) {
736
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
737
- var entry = this.tryEntries[i];
738
- if (entry.finallyLoc === finallyLoc) {
739
- this.complete(entry.completion, entry.afterLoc);
740
- resetTryEntry(entry);
676
+ if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
677
+ // Ignore the finally entry if control is not jumping to a
678
+ // location outside the try/catch block.
679
+ finallyEntry = null;
680
+ }
681
+
682
+ var record = finallyEntry ? finallyEntry.completion : {};
683
+ record.type = type;
684
+ record.arg = arg;
685
+
686
+ if (finallyEntry) {
687
+ this.method = "next";
688
+ this.next = finallyEntry.finallyLoc;
741
689
  return ContinueSentinel;
742
690
  }
743
- }
744
- },
745
691
 
746
- "catch": function(tryLoc) {
747
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
748
- var entry = this.tryEntries[i];
749
- if (entry.tryLoc === tryLoc) {
750
- var record = entry.completion;
751
- if (record.type === "throw") {
752
- var thrown = record.arg;
692
+ return this.complete(record);
693
+ },
694
+ complete: function complete(record, afterLoc) {
695
+ if (record.type === "throw") {
696
+ throw record.arg;
697
+ }
698
+
699
+ if (record.type === "break" || record.type === "continue") {
700
+ this.next = record.arg;
701
+ } else if (record.type === "return") {
702
+ this.rval = this.arg = record.arg;
703
+ this.method = "return";
704
+ this.next = "end";
705
+ } else if (record.type === "normal" && afterLoc) {
706
+ this.next = afterLoc;
707
+ }
708
+
709
+ return ContinueSentinel;
710
+ },
711
+ finish: function finish(finallyLoc) {
712
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
713
+ var entry = this.tryEntries[i];
714
+
715
+ if (entry.finallyLoc === finallyLoc) {
716
+ this.complete(entry.completion, entry.afterLoc);
753
717
  resetTryEntry(entry);
718
+ return ContinueSentinel;
754
719
  }
755
- return thrown;
756
720
  }
757
- }
721
+ },
722
+ "catch": function _catch(tryLoc) {
723
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
724
+ var entry = this.tryEntries[i];
758
725
 
759
- // The context.catch method must only be called with a location
760
- // argument that corresponds to a known catch block.
761
- throw new Error("illegal catch attempt");
762
- },
726
+ if (entry.tryLoc === tryLoc) {
727
+ var record = entry.completion;
763
728
 
764
- delegateYield: function(iterable, resultName, nextLoc) {
765
- this.delegate = {
766
- iterator: values(iterable),
767
- resultName: resultName,
768
- nextLoc: nextLoc
769
- };
729
+ if (record.type === "throw") {
730
+ var thrown = record.arg;
731
+ resetTryEntry(entry);
732
+ }
770
733
 
771
- if (this.method === "next") {
772
- // Deliberately forget the last sent value so that we don't
773
- // accidentally pass it on to the delegate.
774
- this.arg = undefined$1;
775
- }
734
+ return thrown;
735
+ }
736
+ } // The context.catch method must only be called with a location
737
+ // argument that corresponds to a known catch block.
776
738
 
777
- return ContinueSentinel;
778
- }
779
- };
780
739
 
781
- // Regardless of whether this script is executing as a CommonJS module
782
- // or not, return the runtime object so that we can declare the variable
783
- // regeneratorRuntime in the outer scope, which allows this module to be
784
- // injected easily by `bin/regenerator --include-runtime script.js`.
785
- return exports;
740
+ throw new Error("illegal catch attempt");
741
+ },
742
+ delegateYield: function delegateYield(iterable, resultName, nextLoc) {
743
+ this.delegate = {
744
+ iterator: values(iterable),
745
+ resultName: resultName,
746
+ nextLoc: nextLoc
747
+ };
786
748
 
787
- }(
788
- // If this script is executing as a CommonJS module, use module.exports
749
+ if (this.method === "next") {
750
+ // Deliberately forget the last sent value so that we don't
751
+ // accidentally pass it on to the delegate.
752
+ this.arg = undefined$1;
753
+ }
754
+
755
+ return ContinueSentinel;
756
+ }
757
+ }; // Regardless of whether this script is executing as a CommonJS module
758
+ // or not, return the runtime object so that we can declare the variable
759
+ // regeneratorRuntime in the outer scope, which allows this module to be
760
+ // injected easily by `bin/regenerator --include-runtime script.js`.
761
+
762
+ return exports;
763
+ }( // If this script is executing as a CommonJS module, use module.exports
789
764
  // as the regeneratorRuntime namespace. Otherwise create a new empty
790
765
  // object. Either way, the resulting object will be used to initialize
791
766
  // the regeneratorRuntime variable at the top of this file.
792
- module.exports
793
- ));
794
-
795
- try {
796
- regeneratorRuntime = runtime;
797
- } catch (accidentalStrictMode) {
798
- // This module should not be running in strict mode, so the above
799
- // assignment should always work unless something is misconfigured. Just
800
- // in case runtime.js accidentally runs in strict mode, we can escape
801
- // strict mode using a global Function call. This could conceivably fail
802
- // if a Content Security Policy forbids using Function, but in that case
803
- // the proper solution is to fix the accidental strict mode problem. If
804
- // you've misconfigured your bundler to force strict mode and applied a
805
- // CSP to forbid Function, and you're not willing to fix either of those
806
- // problems, please detail your unique predicament in a GitHub issue.
807
- Function("r", "regeneratorRuntime = r")(runtime);
808
- }
767
+ module.exports );
768
+
769
+ try {
770
+ regeneratorRuntime = runtime;
771
+ } catch (accidentalStrictMode) {
772
+ // This module should not be running in strict mode, so the above
773
+ // assignment should always work unless something is misconfigured. Just
774
+ // in case runtime.js accidentally runs in strict mode, we can escape
775
+ // strict mode using a global Function call. This could conceivably fail
776
+ // if a Content Security Policy forbids using Function, but in that case
777
+ // the proper solution is to fix the accidental strict mode problem. If
778
+ // you've misconfigured your bundler to force strict mode and applied a
779
+ // CSP to forbid Function, and you're not willing to fix either of those
780
+ // problems, please detail your unique predicament in a GitHub issue.
781
+ Function("r", "regeneratorRuntime = r")(runtime);
782
+ }
809
783
  });
810
784
 
785
+ var _excluded = ["queryKey", "children", "spinner", "previewSpinner", "errorDisplay", "previewErrorDisplay", "dataName"];
786
+
811
787
  function performFetch(_x) {
812
788
  return _performFetch.apply(this, arguments);
813
789
  }
@@ -869,7 +845,7 @@ function DataFetcher(_ref2) {
869
845
  spinner = _ref2.spinner,
870
846
  errorDisplay = _ref2.errorDisplay,
871
847
  dataName = _ref2.dataName,
872
- fetchProps = _objectWithoutPropertiesLoose(_ref2, ["queryKey", "children", "spinner", "previewSpinner", "errorDisplay", "previewErrorDisplay", "dataName"]);
848
+ fetchProps = _objectWithoutPropertiesLoose(_ref2, _excluded);
873
849
 
874
850
  var query = usePlasmicQueryData(queryKey != null ? queryKey : JSON.stringify(fetchProps), function () {
875
851
  return performFetch(fetchProps);