runtime.js 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723
  1. /**
  2. * Copyright (c) 2014-present, Facebook, Inc.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. !(function (global) {
  8. // "use strict";
  9. //123
  10. var Op = Object.prototype;
  11. var hasOwn = Op.hasOwnProperty;
  12. var undefined; // More compressible than void 0.
  13. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  14. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  15. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  16. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  17. var inModule = typeof module === "object";
  18. var runtime = global.regeneratorRuntime;
  19. if (runtime) {
  20. if (inModule) {
  21. // If regeneratorRuntime is defined globally and we're in a module,
  22. // make the exports object identical to regeneratorRuntime.
  23. module.exports = runtime;
  24. }
  25. // Don't bother evaluating the rest of this file if the runtime was
  26. // already defined globally.
  27. return;
  28. }
  29. // Define the runtime globally (as expected by generated code) as either
  30. // module.exports (if we're in a module) or a new, empty object.
  31. runtime = global.regeneratorRuntime = inModule ? module.exports : {};
  32. function wrap(innerFn, outerFn, self, tryLocsList) {
  33. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  34. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  35. var generator = Object.create(protoGenerator.prototype);
  36. var context = new Context(tryLocsList || []);
  37. // The ._invoke method unifies the implementations of the .next,
  38. // .throw, and .return methods.
  39. generator._invoke = makeInvokeMethod(innerFn, self, context);
  40. return generator;
  41. }
  42. runtime.wrap = wrap;
  43. // Try/catch helper to minimize deoptimizations. Returns a completion
  44. // record like context.tryEntries[i].completion. This interface could
  45. // have been (and was previously) designed to take a closure to be
  46. // invoked without arguments, but in all the cases we care about we
  47. // already have an existing method we want to call, so there's no need
  48. // to create a new function object. We can even get away with assuming
  49. // the method takes exactly one argument, since that happens to be true
  50. // in every case, so we don't have to touch the arguments object. The
  51. // only additional allocation required is the completion record, which
  52. // has a stable shape and so hopefully should be cheap to allocate.
  53. function tryCatch(fn, obj, arg) {
  54. try {
  55. return { type: "normal", arg: fn.call(obj, arg) };
  56. } catch (err) {
  57. return { type: "throw", arg: err };
  58. }
  59. }
  60. var GenStateSuspendedStart = "suspendedStart";
  61. var GenStateSuspendedYield = "suspendedYield";
  62. var GenStateExecuting = "executing";
  63. var GenStateCompleted = "completed";
  64. // Returning this object from the innerFn has the same effect as
  65. // breaking out of the dispatch switch statement.
  66. var ContinueSentinel = {};
  67. // Dummy constructor functions that we use as the .constructor and
  68. // .constructor.prototype properties for functions that return Generator
  69. // objects. For full spec compliance, you may wish to configure your
  70. // minifier not to mangle the names of these two functions.
  71. function Generator() { }
  72. function GeneratorFunction() { }
  73. function GeneratorFunctionPrototype() { }
  74. // This is a polyfill for %IteratorPrototype% for environments that
  75. // don't natively support it.
  76. var IteratorPrototype = {};
  77. IteratorPrototype[iteratorSymbol] = function () {
  78. return this;
  79. };
  80. var getProto = Object.getPrototypeOf;
  81. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  82. if (NativeIteratorPrototype &&
  83. NativeIteratorPrototype !== Op &&
  84. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  85. // This environment has a native %IteratorPrototype%; use it instead
  86. // of the polyfill.
  87. IteratorPrototype = NativeIteratorPrototype;
  88. }
  89. var Gp = GeneratorFunctionPrototype.prototype =
  90. Generator.prototype = Object.create(IteratorPrototype);
  91. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  92. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  93. GeneratorFunctionPrototype[toStringTagSymbol] =
  94. GeneratorFunction.displayName = "GeneratorFunction";
  95. // Helper for defining the .next, .throw, and .return methods of the
  96. // Iterator interface in terms of a single ._invoke method.
  97. function defineIteratorMethods(prototype) {
  98. ["next", "throw", "return"].forEach(function (method) {
  99. prototype[method] = function (arg) {
  100. return this._invoke(method, arg);
  101. };
  102. });
  103. }
  104. runtime.isGeneratorFunction = function (genFun) {
  105. var ctor = typeof genFun === "function" && genFun.constructor;
  106. return ctor
  107. ? ctor === GeneratorFunction ||
  108. // For the native GeneratorFunction constructor, the best we can
  109. // do is to check its .name property.
  110. (ctor.displayName || ctor.name) === "GeneratorFunction"
  111. : false;
  112. };
  113. runtime.mark = function (genFun) {
  114. if (Object.setPrototypeOf) {
  115. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  116. } else {
  117. genFun.__proto__ = GeneratorFunctionPrototype;
  118. if (!(toStringTagSymbol in genFun)) {
  119. genFun[toStringTagSymbol] = "GeneratorFunction";
  120. }
  121. }
  122. genFun.prototype = Object.create(Gp);
  123. return genFun;
  124. };
  125. // Within the body of any async function, `await x` is transformed to
  126. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  127. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  128. // meant to be awaited.
  129. runtime.awrap = function (arg) {
  130. return { __await: arg };
  131. };
  132. function AsyncIterator(generator) {
  133. function invoke(method, arg, resolve, reject) {
  134. var record = tryCatch(generator[method], generator, arg);
  135. if (record.type === "throw") {
  136. reject(record.arg);
  137. } else {
  138. var result = record.arg;
  139. var value = result.value;
  140. if (value &&
  141. typeof value === "object" &&
  142. hasOwn.call(value, "__await")) {
  143. return Promise.resolve(value.__await).then(function (value) {
  144. invoke("next", value, resolve, reject);
  145. }, function (err) {
  146. invoke("throw", err, resolve, reject);
  147. });
  148. }
  149. return Promise.resolve(value).then(function (unwrapped) {
  150. // When a yielded Promise is resolved, its final value becomes
  151. // the .value of the Promise<{value,done}> result for the
  152. // current iteration.
  153. result.value = unwrapped;
  154. resolve(result);
  155. }, function (error) {
  156. // If a rejected Promise was yielded, throw the rejection back
  157. // into the async generator function so it can be handled there.
  158. return invoke("throw", error, resolve, reject);
  159. });
  160. }
  161. }
  162. var previousPromise;
  163. function enqueue(method, arg) {
  164. function callInvokeWithMethodAndArg() {
  165. return new Promise(function (resolve, reject) {
  166. invoke(method, arg, resolve, reject);
  167. });
  168. }
  169. return previousPromise =
  170. // If enqueue has been called before, then we want to wait until
  171. // all previous Promises have been resolved before calling invoke,
  172. // so that results are always delivered in the correct order. If
  173. // enqueue has not been called before, then it is important to
  174. // call invoke immediately, without waiting on a callback to fire,
  175. // so that the async generator function has the opportunity to do
  176. // any necessary setup in a predictable way. This predictability
  177. // is why the Promise constructor synchronously invokes its
  178. // executor callback, and why async functions synchronously
  179. // execute code before the first await. Since we implement simple
  180. // async functions in terms of async generators, it is especially
  181. // important to get this right, even though it requires care.
  182. previousPromise ? previousPromise.then(
  183. callInvokeWithMethodAndArg,
  184. // Avoid propagating failures to Promises returned by later
  185. // invocations of the iterator.
  186. callInvokeWithMethodAndArg
  187. ) : callInvokeWithMethodAndArg();
  188. }
  189. // Define the unified helper method that is used to implement .next,
  190. // .throw, and .return (see defineIteratorMethods).
  191. this._invoke = enqueue;
  192. }
  193. defineIteratorMethods(AsyncIterator.prototype);
  194. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  195. return this;
  196. };
  197. runtime.AsyncIterator = AsyncIterator;
  198. // Note that simple async functions are implemented on top of
  199. // AsyncIterator objects; they just return a Promise for the value of
  200. // the final result produced by the iterator.
  201. runtime.async = function (innerFn, outerFn, self, tryLocsList) {
  202. var iter = new AsyncIterator(
  203. wrap(innerFn, outerFn, self, tryLocsList)
  204. );
  205. return runtime.isGeneratorFunction(outerFn)
  206. ? iter // If outerFn is a generator, return the full iterator.
  207. : iter.next().then(function (result) {
  208. return result.done ? result.value : iter.next();
  209. });
  210. };
  211. function makeInvokeMethod(innerFn, self, context) {
  212. var state = GenStateSuspendedStart;
  213. return function invoke(method, arg) {
  214. if (state === GenStateExecuting) {
  215. throw new Error("Generator is already running");
  216. }
  217. if (state === GenStateCompleted) {
  218. if (method === "throw") {
  219. throw arg;
  220. }
  221. // Be forgiving, per 25.3.3.3.3 of the spec:
  222. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  223. return doneResult();
  224. }
  225. context.method = method;
  226. context.arg = arg;
  227. while (true) {
  228. var delegate = context.delegate;
  229. if (delegate) {
  230. var delegateResult = maybeInvokeDelegate(delegate, context);
  231. if (delegateResult) {
  232. if (delegateResult === ContinueSentinel) continue;
  233. return delegateResult;
  234. }
  235. }
  236. if (context.method === "next") {
  237. // Setting context._sent for legacy support of Babel's
  238. // function.sent implementation.
  239. context.sent = context._sent = context.arg;
  240. } else if (context.method === "throw") {
  241. if (state === GenStateSuspendedStart) {
  242. state = GenStateCompleted;
  243. throw context.arg;
  244. }
  245. context.dispatchException(context.arg);
  246. } else if (context.method === "return") {
  247. context.abrupt("return", context.arg);
  248. }
  249. state = GenStateExecuting;
  250. var record = tryCatch(innerFn, self, context);
  251. if (record.type === "normal") {
  252. // If an exception is thrown from innerFn, we leave state ===
  253. // GenStateExecuting and loop back for another invocation.
  254. state = context.done
  255. ? GenStateCompleted
  256. : GenStateSuspendedYield;
  257. if (record.arg === ContinueSentinel) {
  258. continue;
  259. }
  260. return {
  261. value: record.arg,
  262. done: context.done
  263. };
  264. } else if (record.type === "throw") {
  265. state = GenStateCompleted;
  266. // Dispatch the exception by looping back around to the
  267. // context.dispatchException(context.arg) call above.
  268. context.method = "throw";
  269. context.arg = record.arg;
  270. }
  271. }
  272. };
  273. }
  274. // Call delegate.iterator[context.method](context.arg) and handle the
  275. // result, either by returning a { value, done } result from the
  276. // delegate iterator, or by modifying context.method and context.arg,
  277. // setting context.delegate to null, and returning the ContinueSentinel.
  278. function maybeInvokeDelegate(delegate, context) {
  279. var method = delegate.iterator[context.method];
  280. if (method === undefined) {
  281. // A .throw or .return when the delegate iterator has no .throw
  282. // method always terminates the yield* loop.
  283. context.delegate = null;
  284. if (context.method === "throw") {
  285. if (delegate.iterator.return) {
  286. // If the delegate iterator has a return method, give it a
  287. // chance to clean up.
  288. context.method = "return";
  289. context.arg = undefined;
  290. maybeInvokeDelegate(delegate, context);
  291. if (context.method === "throw") {
  292. // If maybeInvokeDelegate(context) changed context.method from
  293. // "return" to "throw", let that override the TypeError below.
  294. return ContinueSentinel;
  295. }
  296. }
  297. context.method = "throw";
  298. context.arg = new TypeError(
  299. "The iterator does not provide a 'throw' method");
  300. }
  301. return ContinueSentinel;
  302. }
  303. var record = tryCatch(method, delegate.iterator, context.arg);
  304. if (record.type === "throw") {
  305. context.method = "throw";
  306. context.arg = record.arg;
  307. context.delegate = null;
  308. return ContinueSentinel;
  309. }
  310. var info = record.arg;
  311. if (!info) {
  312. context.method = "throw";
  313. context.arg = new TypeError("iterator result is not an object");
  314. context.delegate = null;
  315. return ContinueSentinel;
  316. }
  317. if (info.done) {
  318. // Assign the result of the finished delegate to the temporary
  319. // variable specified by delegate.resultName (see delegateYield).
  320. context[delegate.resultName] = info.value;
  321. // Resume execution at the desired location (see delegateYield).
  322. context.next = delegate.nextLoc;
  323. // If context.method was "throw" but the delegate handled the
  324. // exception, let the outer generator proceed normally. If
  325. // context.method was "next", forget context.arg since it has been
  326. // "consumed" by the delegate iterator. If context.method was
  327. // "return", allow the original .return call to continue in the
  328. // outer generator.
  329. if (context.method !== "return") {
  330. context.method = "next";
  331. context.arg = undefined;
  332. }
  333. } else {
  334. // Re-yield the result returned by the delegate method.
  335. return info;
  336. }
  337. // The delegate iterator is finished, so forget it and continue with
  338. // the outer generator.
  339. context.delegate = null;
  340. return ContinueSentinel;
  341. }
  342. // Define Generator.prototype.{next,throw,return} in terms of the
  343. // unified ._invoke helper method.
  344. defineIteratorMethods(Gp);
  345. Gp[toStringTagSymbol] = "Generator";
  346. // A Generator should always return itself as the iterator object when the
  347. // @@iterator function is called on it. Some browsers' implementations of the
  348. // iterator prototype chain incorrectly implement this, causing the Generator
  349. // object to not be returned from this call. This ensures that doesn't happen.
  350. // See https://github.com/facebook/regenerator/issues/274 for more details.
  351. Gp[iteratorSymbol] = function () {
  352. return this;
  353. };
  354. Gp.toString = function () {
  355. return "[object Generator]";
  356. };
  357. function pushTryEntry(locs) {
  358. var entry = { tryLoc: locs[0] };
  359. if (1 in locs) {
  360. entry.catchLoc = locs[1];
  361. }
  362. if (2 in locs) {
  363. entry.finallyLoc = locs[2];
  364. entry.afterLoc = locs[3];
  365. }
  366. this.tryEntries.push(entry);
  367. }
  368. function resetTryEntry(entry) {
  369. var record = entry.completion || {};
  370. record.type = "normal";
  371. delete record.arg;
  372. entry.completion = record;
  373. }
  374. function Context(tryLocsList) {
  375. // The root entry object (effectively a try statement without a catch
  376. // or a finally block) gives us a place to store values thrown from
  377. // locations where there is no enclosing try statement.
  378. this.tryEntries = [{ tryLoc: "root" }];
  379. tryLocsList.forEach(pushTryEntry, this);
  380. this.reset(true);
  381. }
  382. runtime.keys = function (object) {
  383. var keys = [];
  384. for (var key in object) {
  385. keys.push(key);
  386. }
  387. keys.reverse();
  388. // Rather than returning an object with a next method, we keep
  389. // things simple and return the next function itself.
  390. return function next() {
  391. while (keys.length) {
  392. var key = keys.pop();
  393. if (key in object) {
  394. next.value = key;
  395. next.done = false;
  396. return next;
  397. }
  398. }
  399. // To avoid creating an additional object, we just hang the .value
  400. // and .done properties off the next function object itself. This
  401. // also ensures that the minifier will not anonymize the function.
  402. next.done = true;
  403. return next;
  404. };
  405. };
  406. function values(iterable) {
  407. if (iterable) {
  408. var iteratorMethod = iterable[iteratorSymbol];
  409. if (iteratorMethod) {
  410. return iteratorMethod.call(iterable);
  411. }
  412. if (typeof iterable.next === "function") {
  413. return iterable;
  414. }
  415. if (!isNaN(iterable.length)) {
  416. var i = -1, next = function next() {
  417. while (++i < iterable.length) {
  418. if (hasOwn.call(iterable, i)) {
  419. next.value = iterable[i];
  420. next.done = false;
  421. return next;
  422. }
  423. }
  424. next.value = undefined;
  425. next.done = true;
  426. return next;
  427. };
  428. return next.next = next;
  429. }
  430. }
  431. // Return an iterator with no values.
  432. return { next: doneResult };
  433. }
  434. runtime.values = values;
  435. function doneResult() {
  436. return { value: undefined, done: true };
  437. }
  438. Context.prototype = {
  439. constructor: Context,
  440. reset: function (skipTempReset) {
  441. this.prev = 0;
  442. this.next = 0;
  443. // Resetting context._sent for legacy support of Babel's
  444. // function.sent implementation.
  445. this.sent = this._sent = undefined;
  446. this.done = false;
  447. this.delegate = null;
  448. this.method = "next";
  449. this.arg = undefined;
  450. this.tryEntries.forEach(resetTryEntry);
  451. if (!skipTempReset) {
  452. for (var name in this) {
  453. // Not sure about the optimal order of these conditions:
  454. if (name.charAt(0) === "t" &&
  455. hasOwn.call(this, name) &&
  456. !isNaN(+name.slice(1))) {
  457. this[name] = undefined;
  458. }
  459. }
  460. }
  461. },
  462. stop: function () {
  463. this.done = true;
  464. var rootEntry = this.tryEntries[0];
  465. var rootRecord = rootEntry.completion;
  466. if (rootRecord.type === "throw") {
  467. throw rootRecord.arg;
  468. }
  469. return this.rval;
  470. },
  471. dispatchException: function (exception) {
  472. if (this.done) {
  473. throw exception;
  474. }
  475. var context = this;
  476. function handle(loc, caught) {
  477. record.type = "throw";
  478. record.arg = exception;
  479. context.next = loc;
  480. if (caught) {
  481. // If the dispatched exception was caught by a catch block,
  482. // then let that catch block handle the exception normally.
  483. context.method = "next";
  484. context.arg = undefined;
  485. }
  486. return !!caught;
  487. }
  488. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  489. var entry = this.tryEntries[i];
  490. var record = entry.completion;
  491. if (entry.tryLoc === "root") {
  492. // Exception thrown outside of any try block that could handle
  493. // it, so set the completion value of the entire function to
  494. // throw the exception.
  495. return handle("end");
  496. }
  497. if (entry.tryLoc <= this.prev) {
  498. var hasCatch = hasOwn.call(entry, "catchLoc");
  499. var hasFinally = hasOwn.call(entry, "finallyLoc");
  500. if (hasCatch && hasFinally) {
  501. if (this.prev < entry.catchLoc) {
  502. return handle(entry.catchLoc, true);
  503. } else if (this.prev < entry.finallyLoc) {
  504. return handle(entry.finallyLoc);
  505. }
  506. } else if (hasCatch) {
  507. if (this.prev < entry.catchLoc) {
  508. return handle(entry.catchLoc, true);
  509. }
  510. } else if (hasFinally) {
  511. if (this.prev < entry.finallyLoc) {
  512. return handle(entry.finallyLoc);
  513. }
  514. } else {
  515. throw new Error("try statement without catch or finally");
  516. }
  517. }
  518. }
  519. },
  520. abrupt: function (type, arg) {
  521. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  522. var entry = this.tryEntries[i];
  523. if (entry.tryLoc <= this.prev &&
  524. hasOwn.call(entry, "finallyLoc") &&
  525. this.prev < entry.finallyLoc) {
  526. var finallyEntry = entry;
  527. break;
  528. }
  529. }
  530. if (finallyEntry &&
  531. (type === "break" ||
  532. type === "continue") &&
  533. finallyEntry.tryLoc <= arg &&
  534. arg <= finallyEntry.finallyLoc) {
  535. // Ignore the finally entry if control is not jumping to a
  536. // location outside the try/catch block.
  537. finallyEntry = null;
  538. }
  539. var record = finallyEntry ? finallyEntry.completion : {};
  540. record.type = type;
  541. record.arg = arg;
  542. if (finallyEntry) {
  543. this.method = "next";
  544. this.next = finallyEntry.finallyLoc;
  545. return ContinueSentinel;
  546. }
  547. return this.complete(record);
  548. },
  549. complete: function (record, afterLoc) {
  550. if (record.type === "throw") {
  551. throw record.arg;
  552. }
  553. if (record.type === "break" ||
  554. record.type === "continue") {
  555. this.next = record.arg;
  556. } else if (record.type === "return") {
  557. this.rval = this.arg = record.arg;
  558. this.method = "return";
  559. this.next = "end";
  560. } else if (record.type === "normal" && afterLoc) {
  561. this.next = afterLoc;
  562. }
  563. return ContinueSentinel;
  564. },
  565. finish: function (finallyLoc) {
  566. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  567. var entry = this.tryEntries[i];
  568. if (entry.finallyLoc === finallyLoc) {
  569. this.complete(entry.completion, entry.afterLoc);
  570. resetTryEntry(entry);
  571. return ContinueSentinel;
  572. }
  573. }
  574. },
  575. "catch": function (tryLoc) {
  576. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  577. var entry = this.tryEntries[i];
  578. if (entry.tryLoc === tryLoc) {
  579. var record = entry.completion;
  580. if (record.type === "throw") {
  581. var thrown = record.arg;
  582. resetTryEntry(entry);
  583. }
  584. return thrown;
  585. }
  586. }
  587. // The context.catch method must only be called with a location
  588. // argument that corresponds to a known catch block.
  589. throw new Error("illegal catch attempt");
  590. },
  591. delegateYield: function (iterable, resultName, nextLoc) {
  592. this.delegate = {
  593. iterator: values(iterable),
  594. resultName: resultName,
  595. nextLoc: nextLoc
  596. };
  597. if (this.method === "next") {
  598. // Deliberately forget the last sent value so that we don't
  599. // accidentally pass it on to the delegate.
  600. this.arg = undefined;
  601. }
  602. return ContinueSentinel;
  603. }
  604. };
  605. })(
  606. // In sloppy mode, unbound `this` refers to the global object, fallback to
  607. // Function constructor if we're in global strict mode. That is sadly a form
  608. // of indirect eval which violates Content Security Policy.
  609. (function () { return this })() || Function("return this")()
  610. );