source: trip-planner-front/node_modules/zone.js/bundles/zone-patch-fetch.umd.min.js@ 76712b2

Last change on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.7 KB
Line 
1"use strict";
2/**
3 * @license Angular v12.0.0-next.0
4 * (c) 2010-2020 Google LLC. https://angular.io/
5 * License: MIT
6 */!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){
7/**
8 * @license
9 * Copyright Google LLC All Rights Reserved.
10 *
11 * Use of this source code is governed by an MIT-style license that can be
12 * found in the LICENSE file at https://angular.io/license
13 */
14Zone.__load_patch("fetch",(function(t,n,o){var e=t.fetch;if("function"==typeof e){var r=t[o.symbol("fetch")];r&&(e=r);var c=t.Promise,l=o.symbol("thenPatched"),a=o.symbol("fetchTaskScheduling"),f=o.symbol("fetchTaskAborting"),i=t.AbortController,u="function"==typeof i,s=null;u&&(t.AbortController=function(){var t=new i;return t.signal.abortController=t,t},s=o.patchMethod(i.prototype,"abort",(function(t){return function(n,o){return n.task?n.task.zone.cancelTask(n.task):t.apply(n,o)}})));var h=function(){};t.fetch=function(){var t=this,r=Array.prototype.slice.call(arguments),i=r.length>1?r[1]:null,b=i&&i.signal;return new Promise((function(i,d){var p=n.current.scheduleMacroTask("fetch",h,{fetchArgs:r},(function(){var f,u=n.current;try{u[a]=!0,f=e.apply(t,r)}catch(t){return void d(t)}finally{u[a]=!1}if(!(f instanceof c)){var s=f.constructor;s[l]||o.patchThen(s)}f.then((function(t){"notScheduled"!==p.state&&p.invoke(),i(t)}),(function(t){"notScheduled"!==p.state&&p.invoke(),d(t)}))}),(function(){if(u)if(b&&b.abortController&&!b.aborted&&"function"==typeof b.abortController.abort&&s)try{n.current[f]=!0,s.call(b.abortController)}finally{n.current[f]=!1}else d("cancel fetch need a AbortController.signal");else d("No AbortController supported, can not cancel fetch")}));b&&b.abortController&&(b.abortController.task=p)}))}}}))}));
Note: See TracBrowser for help on using the repository browser.