@cedarjs/web 6.0.0-canary.2663 → 6.0.0-canary.2665
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.
- package/dist/apollo/ApolloProviderWithFetchConfig.d.ts +1 -1
- package/dist/apollo/ApolloProviderWithFetchConfig.d.ts.map +1 -1
- package/dist/apollo/ApolloProviderWithFetchConfig.js +23 -16
- package/dist/apollo/CedarApolloProvider.js +1 -1
- package/dist/apollo/CedarApolloProvider.test.js +38 -0
- package/dist/apollo/apolloLinkTypes.d.ts +4 -4
- package/dist/apollo/apolloLinkTypes.d.ts.map +1 -1
- package/dist/apollo/fragmentRegistry.d.ts +3 -3
- package/dist/apollo/fragmentRegistry.d.ts.map +1 -1
- package/dist/apollo/fragmentRegistry.js +35 -8
- package/dist/apollo/fragmentRegistry.test.js +67 -0
- package/dist/apollo/links.d.ts +4 -5
- package/dist/apollo/links.d.ts.map +1 -1
- package/dist/apollo/links.js +7 -7
- package/dist/apollo/sseLink.d.ts +5 -8
- package/dist/apollo/sseLink.d.ts.map +1 -1
- package/dist/apollo/sseLink.js +9 -12
- package/dist/apollo/suspense.d.ts +3 -3
- package/dist/apollo/suspense.d.ts.map +1 -1
- package/dist/apollo/suspense.js +1 -1
- package/dist/apollo/useCache.d.ts +4 -6
- package/dist/apollo/useCache.d.ts.map +1 -1
- package/dist/apollo/useCache.js +1 -1
- package/dist/bundled/apollo-upload-client.d.ts +2 -2
- package/dist/bundled/apollo-upload-client.d.ts.map +1 -1
- package/dist/bundled/apollo-upload-client.js +2 -2
- package/dist/cjs/apollo/ApolloProviderWithFetchConfig.d.ts +1 -1
- package/dist/cjs/apollo/ApolloProviderWithFetchConfig.d.ts.map +1 -1
- package/dist/cjs/apollo/ApolloProviderWithFetchConfig.js +26 -21
- package/dist/cjs/apollo/CedarApolloProvider.js +2 -2
- package/dist/cjs/apollo/CedarApolloProvider.test.js +61 -0
- package/dist/cjs/apollo/apolloLinkTypes.d.ts +4 -4
- package/dist/cjs/apollo/apolloLinkTypes.d.ts.map +1 -1
- package/dist/cjs/apollo/fragmentRegistry.d.ts +3 -3
- package/dist/cjs/apollo/fragmentRegistry.d.ts.map +1 -1
- package/dist/cjs/apollo/fragmentRegistry.js +32 -18
- package/dist/cjs/apollo/fragmentRegistry.test.js +90 -0
- package/dist/cjs/apollo/links.d.ts +4 -5
- package/dist/cjs/apollo/links.d.ts.map +1 -1
- package/dist/cjs/apollo/links.js +12 -12
- package/dist/cjs/apollo/sseLink.d.ts +5 -8
- package/dist/cjs/apollo/sseLink.d.ts.map +1 -1
- package/dist/cjs/apollo/sseLink.js +11 -14
- package/dist/cjs/apollo/suspense.d.ts +3 -3
- package/dist/cjs/apollo/suspense.d.ts.map +1 -1
- package/dist/cjs/apollo/suspense.js +2 -2
- package/dist/cjs/apollo/useCache.d.ts +4 -6
- package/dist/cjs/apollo/useCache.d.ts.map +1 -1
- package/dist/cjs/apollo/useCache.js +2 -2
- package/dist/cjs/bundled/apollo-upload-client.d.ts +2 -2
- package/dist/cjs/bundled/apollo-upload-client.d.ts.map +1 -1
- package/dist/cjs/bundled/apollo-upload-client.js +1562 -1734
- package/dist/cjs/components/DevFatalErrorPage.d.ts +3 -3
- package/dist/cjs/components/DevFatalErrorPage.d.ts.map +1 -1
- package/dist/cjs/components/DevFatalErrorPage.js +2 -2
- package/dist/cjs/components/cell/CellErrorBoundary.d.ts +3 -3
- package/dist/cjs/components/cell/CellErrorBoundary.d.ts.map +1 -1
- package/dist/cjs/components/cell/cellTypes.d.ts +6 -5
- package/dist/cjs/components/cell/cellTypes.d.ts.map +1 -1
- package/dist/cjs/components/cell/createCell.d.ts.map +1 -1
- package/dist/cjs/components/cell/createCell.js +5 -4
- package/dist/cjs/components/cell/createCell.test.js +48 -48
- package/dist/cjs/components/cell/createFragmentCell.test.js +27 -30
- package/dist/cjs/components/cell/createSuspendingCell.d.ts.map +1 -1
- package/dist/cjs/components/cell/createSuspendingCell.js +7 -6
- package/dist/cjs/components/cell/createSuspendingCell.test.js +13 -13
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +4 -4
- package/dist/components/DevFatalErrorPage.d.ts +3 -3
- package/dist/components/DevFatalErrorPage.d.ts.map +1 -1
- package/dist/components/DevFatalErrorPage.js +2 -2
- package/dist/components/cell/CellErrorBoundary.d.ts +3 -3
- package/dist/components/cell/CellErrorBoundary.d.ts.map +1 -1
- package/dist/components/cell/cellTypes.d.ts +6 -5
- package/dist/components/cell/cellTypes.d.ts.map +1 -1
- package/dist/components/cell/createCell.d.ts.map +1 -1
- package/dist/components/cell/createCell.js +4 -3
- package/dist/components/cell/createCell.test.js +2 -2
- package/dist/components/cell/createFragmentCell.test.js +4 -7
- package/dist/components/cell/createSuspendingCell.d.ts.map +1 -1
- package/dist/components/cell/createSuspendingCell.js +4 -3
- package/dist/components/cell/createSuspendingCell.test.js +2 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -5
- package/package.json +10 -9
|
@@ -20,7 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/bundled/apollo-upload-client.ts
|
|
21
21
|
var apollo_upload_client_exports = {};
|
|
22
22
|
__export(apollo_upload_client_exports, {
|
|
23
|
-
|
|
23
|
+
UploadHttpLink: () => UploadHttpLink
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(apollo_upload_client_exports);
|
|
26
26
|
|
|
@@ -42,16 +42,34 @@ function __extends(d, b) {
|
|
|
42
42
|
}
|
|
43
43
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
44
44
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
function __values(o) {
|
|
46
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
47
|
+
if (m) return m.call(o);
|
|
48
|
+
if (o && typeof o.length === "number") return {
|
|
49
|
+
next: function() {
|
|
50
|
+
if (o && i >= o.length) o = void 0;
|
|
51
|
+
return { value: o && o[i++], done: !o };
|
|
50
52
|
}
|
|
51
|
-
return t;
|
|
52
53
|
};
|
|
53
|
-
|
|
54
|
-
}
|
|
54
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
55
|
+
}
|
|
56
|
+
function __read(o, n) {
|
|
57
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
58
|
+
if (!m) return o;
|
|
59
|
+
var i = m.call(o), r, ar = [], e;
|
|
60
|
+
try {
|
|
61
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
62
|
+
} catch (error) {
|
|
63
|
+
e = { error };
|
|
64
|
+
} finally {
|
|
65
|
+
try {
|
|
66
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
67
|
+
} finally {
|
|
68
|
+
if (e) throw e.error;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return ar;
|
|
72
|
+
}
|
|
55
73
|
function __spreadArray(to, from, pack) {
|
|
56
74
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
57
75
|
if (ar || !(i in from)) {
|
|
@@ -62,174 +80,552 @@ function __spreadArray(to, from, pack) {
|
|
|
62
80
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
63
81
|
}
|
|
64
82
|
|
|
65
|
-
// ../../node_modules/
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
var setPrototypeOf = _a === void 0 ? function(obj, proto) {
|
|
69
|
-
obj.__proto__ = proto;
|
|
70
|
-
return obj;
|
|
71
|
-
} : _a;
|
|
72
|
-
var InvariantError = (
|
|
73
|
-
/** @class */
|
|
74
|
-
(function(_super) {
|
|
75
|
-
__extends(InvariantError2, _super);
|
|
76
|
-
function InvariantError2(message) {
|
|
77
|
-
if (message === void 0) {
|
|
78
|
-
message = genericMessage;
|
|
79
|
-
}
|
|
80
|
-
var _this = _super.call(this, typeof message === "number" ? genericMessage + ": " + message + " (see https://github.com/apollographql/invariant-packages)" : message) || this;
|
|
81
|
-
_this.framesToPop = 1;
|
|
82
|
-
_this.name = genericMessage;
|
|
83
|
-
setPrototypeOf(_this, InvariantError2.prototype);
|
|
84
|
-
return _this;
|
|
85
|
-
}
|
|
86
|
-
return InvariantError2;
|
|
87
|
-
})(Error)
|
|
88
|
-
);
|
|
89
|
-
function invariant(condition, message) {
|
|
90
|
-
if (!condition) {
|
|
91
|
-
throw new InvariantError(message);
|
|
92
|
-
}
|
|
83
|
+
// ../../node_modules/rxjs/dist/esm5/internal/util/isFunction.js
|
|
84
|
+
function isFunction(value) {
|
|
85
|
+
return typeof value === "function";
|
|
93
86
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
function
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
return method.apply(console, arguments);
|
|
101
|
-
}
|
|
87
|
+
|
|
88
|
+
// ../../node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js
|
|
89
|
+
function createErrorClass(createImpl) {
|
|
90
|
+
var _super = function(instance) {
|
|
91
|
+
Error.call(instance);
|
|
92
|
+
instance.stack = new Error().stack;
|
|
102
93
|
};
|
|
94
|
+
var ctorFunc = createImpl(_super);
|
|
95
|
+
ctorFunc.prototype = Object.create(Error.prototype);
|
|
96
|
+
ctorFunc.prototype.constructor = ctorFunc;
|
|
97
|
+
return ctorFunc;
|
|
103
98
|
}
|
|
104
|
-
(function(invariant4) {
|
|
105
|
-
invariant4.debug = wrapConsoleMethod("debug");
|
|
106
|
-
invariant4.log = wrapConsoleMethod("log");
|
|
107
|
-
invariant4.warn = wrapConsoleMethod("warn");
|
|
108
|
-
invariant4.error = wrapConsoleMethod("error");
|
|
109
|
-
})(invariant || (invariant = {}));
|
|
110
99
|
|
|
111
|
-
// ../../node_modules
|
|
112
|
-
var
|
|
100
|
+
// ../../node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js
|
|
101
|
+
var UnsubscriptionError = createErrorClass(function(_super) {
|
|
102
|
+
return function UnsubscriptionErrorImpl(errors) {
|
|
103
|
+
_super(this);
|
|
104
|
+
this.message = errors ? errors.length + " errors occurred during unsubscription:\n" + errors.map(function(err, i) {
|
|
105
|
+
return i + 1 + ") " + err.toString();
|
|
106
|
+
}).join("\n ") : "";
|
|
107
|
+
this.name = "UnsubscriptionError";
|
|
108
|
+
this.errors = errors;
|
|
109
|
+
};
|
|
110
|
+
});
|
|
113
111
|
|
|
114
|
-
// ../../node_modules
|
|
115
|
-
function
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
112
|
+
// ../../node_modules/rxjs/dist/esm5/internal/util/arrRemove.js
|
|
113
|
+
function arrRemove(arr, item) {
|
|
114
|
+
if (arr) {
|
|
115
|
+
var index = arr.indexOf(item);
|
|
116
|
+
0 <= index && arr.splice(index, 1);
|
|
119
117
|
}
|
|
120
118
|
}
|
|
121
119
|
|
|
122
|
-
// ../../node_modules
|
|
123
|
-
var
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
120
|
+
// ../../node_modules/rxjs/dist/esm5/internal/Subscription.js
|
|
121
|
+
var Subscription = (function() {
|
|
122
|
+
function Subscription2(initialTeardown) {
|
|
123
|
+
this.initialTeardown = initialTeardown;
|
|
124
|
+
this.closed = false;
|
|
125
|
+
this._parentage = null;
|
|
126
|
+
this._finalizers = null;
|
|
127
|
+
}
|
|
128
|
+
Subscription2.prototype.unsubscribe = function() {
|
|
129
|
+
var e_1, _a, e_2, _b;
|
|
130
|
+
var errors;
|
|
131
|
+
if (!this.closed) {
|
|
132
|
+
this.closed = true;
|
|
133
|
+
var _parentage = this._parentage;
|
|
134
|
+
if (_parentage) {
|
|
135
|
+
this._parentage = null;
|
|
136
|
+
if (Array.isArray(_parentage)) {
|
|
137
|
+
try {
|
|
138
|
+
for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {
|
|
139
|
+
var parent_1 = _parentage_1_1.value;
|
|
140
|
+
parent_1.remove(this);
|
|
141
|
+
}
|
|
142
|
+
} catch (e_1_1) {
|
|
143
|
+
e_1 = { error: e_1_1 };
|
|
144
|
+
} finally {
|
|
145
|
+
try {
|
|
146
|
+
if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1);
|
|
147
|
+
} finally {
|
|
148
|
+
if (e_1) throw e_1.error;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
} else {
|
|
152
|
+
_parentage.remove(this);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
var initialFinalizer = this.initialTeardown;
|
|
156
|
+
if (isFunction(initialFinalizer)) {
|
|
157
|
+
try {
|
|
158
|
+
initialFinalizer();
|
|
159
|
+
} catch (e) {
|
|
160
|
+
errors = e instanceof UnsubscriptionError ? e.errors : [e];
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
var _finalizers = this._finalizers;
|
|
164
|
+
if (_finalizers) {
|
|
165
|
+
this._finalizers = null;
|
|
166
|
+
try {
|
|
167
|
+
for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) {
|
|
168
|
+
var finalizer = _finalizers_1_1.value;
|
|
169
|
+
try {
|
|
170
|
+
execFinalizer(finalizer);
|
|
171
|
+
} catch (err) {
|
|
172
|
+
errors = errors !== null && errors !== void 0 ? errors : [];
|
|
173
|
+
if (err instanceof UnsubscriptionError) {
|
|
174
|
+
errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors));
|
|
175
|
+
} else {
|
|
176
|
+
errors.push(err);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
} catch (e_2_1) {
|
|
181
|
+
e_2 = { error: e_2_1 };
|
|
182
|
+
} finally {
|
|
183
|
+
try {
|
|
184
|
+
if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1);
|
|
185
|
+
} finally {
|
|
186
|
+
if (e_2) throw e_2.error;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
if (errors) {
|
|
191
|
+
throw new UnsubscriptionError(errors);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
Subscription2.prototype.add = function(teardown) {
|
|
196
|
+
var _a;
|
|
197
|
+
if (teardown && teardown !== this) {
|
|
198
|
+
if (this.closed) {
|
|
199
|
+
execFinalizer(teardown);
|
|
200
|
+
} else {
|
|
201
|
+
if (teardown instanceof Subscription2) {
|
|
202
|
+
if (teardown.closed || teardown._hasParent(this)) {
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
teardown._addParent(this);
|
|
206
|
+
}
|
|
207
|
+
(this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
Subscription2.prototype._hasParent = function(parent) {
|
|
212
|
+
var _parentage = this._parentage;
|
|
213
|
+
return _parentage === parent || Array.isArray(_parentage) && _parentage.includes(parent);
|
|
214
|
+
};
|
|
215
|
+
Subscription2.prototype._addParent = function(parent) {
|
|
216
|
+
var _parentage = this._parentage;
|
|
217
|
+
this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;
|
|
218
|
+
};
|
|
219
|
+
Subscription2.prototype._removeParent = function(parent) {
|
|
220
|
+
var _parentage = this._parentage;
|
|
221
|
+
if (_parentage === parent) {
|
|
222
|
+
this._parentage = null;
|
|
223
|
+
} else if (Array.isArray(_parentage)) {
|
|
224
|
+
arrRemove(_parentage, parent);
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
Subscription2.prototype.remove = function(teardown) {
|
|
228
|
+
var _finalizers = this._finalizers;
|
|
229
|
+
_finalizers && arrRemove(_finalizers, teardown);
|
|
230
|
+
if (teardown instanceof Subscription2) {
|
|
231
|
+
teardown._removeParent(this);
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
Subscription2.EMPTY = (function() {
|
|
235
|
+
var empty = new Subscription2();
|
|
236
|
+
empty.closed = true;
|
|
237
|
+
return empty;
|
|
238
|
+
})();
|
|
239
|
+
return Subscription2;
|
|
240
|
+
})();
|
|
241
|
+
var EMPTY_SUBSCRIPTION = Subscription.EMPTY;
|
|
242
|
+
function isSubscription(value) {
|
|
243
|
+
return value instanceof Subscription || value && "closed" in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe);
|
|
147
244
|
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
245
|
+
function execFinalizer(finalizer) {
|
|
246
|
+
if (isFunction(finalizer)) {
|
|
247
|
+
finalizer();
|
|
248
|
+
} else {
|
|
249
|
+
finalizer.unsubscribe();
|
|
153
250
|
}
|
|
154
|
-
var undefId = makeUniqueId("stringifyForDisplay");
|
|
155
|
-
return JSON.stringify(value, function(key, value2) {
|
|
156
|
-
return value2 === void 0 ? undefId : value2;
|
|
157
|
-
}, space).split(JSON.stringify(undefId)).join("<undefined>");
|
|
158
251
|
}
|
|
159
252
|
|
|
160
|
-
// ../../node_modules
|
|
161
|
-
|
|
162
|
-
|
|
253
|
+
// ../../node_modules/rxjs/dist/esm5/internal/config.js
|
|
254
|
+
var config = {
|
|
255
|
+
onUnhandledError: null,
|
|
256
|
+
onStoppedNotification: null,
|
|
257
|
+
Promise: void 0,
|
|
258
|
+
useDeprecatedSynchronousErrorHandling: false,
|
|
259
|
+
useDeprecatedNextContext: false
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
// ../../node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js
|
|
263
|
+
var timeoutProvider = {
|
|
264
|
+
setTimeout: function(handler, timeout) {
|
|
163
265
|
var args = [];
|
|
164
|
-
for (var _i =
|
|
165
|
-
args[_i -
|
|
266
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
267
|
+
args[_i - 2] = arguments[_i];
|
|
166
268
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
if (!message) {
|
|
171
|
-
message = getFallbackErrorMsg(arg0, args);
|
|
172
|
-
args = [];
|
|
173
|
-
}
|
|
269
|
+
var delegate = timeoutProvider.delegate;
|
|
270
|
+
if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {
|
|
271
|
+
return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args)));
|
|
174
272
|
}
|
|
175
|
-
|
|
273
|
+
return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args)));
|
|
274
|
+
},
|
|
275
|
+
clearTimeout: function(handle) {
|
|
276
|
+
var delegate = timeoutProvider.delegate;
|
|
277
|
+
return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);
|
|
278
|
+
},
|
|
279
|
+
delegate: void 0
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
// ../../node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js
|
|
283
|
+
function reportUnhandledError(err) {
|
|
284
|
+
timeoutProvider.setTimeout(function() {
|
|
285
|
+
var onUnhandledError = config.onUnhandledError;
|
|
286
|
+
if (onUnhandledError) {
|
|
287
|
+
onUnhandledError(err);
|
|
288
|
+
} else {
|
|
289
|
+
throw err;
|
|
290
|
+
}
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// ../../node_modules/rxjs/dist/esm5/internal/util/noop.js
|
|
295
|
+
function noop() {
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// ../../node_modules/rxjs/dist/esm5/internal/NotificationFactories.js
|
|
299
|
+
var COMPLETE_NOTIFICATION = (function() {
|
|
300
|
+
return createNotification("C", void 0, void 0);
|
|
301
|
+
})();
|
|
302
|
+
function errorNotification(error) {
|
|
303
|
+
return createNotification("E", void 0, error);
|
|
304
|
+
}
|
|
305
|
+
function nextNotification(value) {
|
|
306
|
+
return createNotification("N", value, void 0);
|
|
307
|
+
}
|
|
308
|
+
function createNotification(kind, value, error) {
|
|
309
|
+
return {
|
|
310
|
+
kind,
|
|
311
|
+
value,
|
|
312
|
+
error
|
|
176
313
|
};
|
|
177
314
|
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
315
|
+
|
|
316
|
+
// ../../node_modules/rxjs/dist/esm5/internal/util/errorContext.js
|
|
317
|
+
var context = null;
|
|
318
|
+
function errorContext(cb) {
|
|
319
|
+
if (config.useDeprecatedSynchronousErrorHandling) {
|
|
320
|
+
var isRoot = !context;
|
|
321
|
+
if (isRoot) {
|
|
322
|
+
context = { errorThrown: false, error: null };
|
|
323
|
+
}
|
|
324
|
+
cb();
|
|
325
|
+
if (isRoot) {
|
|
326
|
+
var _a = context, errorThrown = _a.errorThrown, error = _a.error;
|
|
327
|
+
context = null;
|
|
328
|
+
if (errorThrown) {
|
|
329
|
+
throw error;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
} else {
|
|
333
|
+
cb();
|
|
185
334
|
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
});
|
|
192
|
-
function newInvariantError(message) {
|
|
193
|
-
var optionalParams = [];
|
|
194
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
195
|
-
optionalParams[_i - 1] = arguments[_i];
|
|
335
|
+
}
|
|
336
|
+
function captureError(err) {
|
|
337
|
+
if (config.useDeprecatedSynchronousErrorHandling && context) {
|
|
338
|
+
context.errorThrown = true;
|
|
339
|
+
context.error = err;
|
|
196
340
|
}
|
|
197
|
-
return new InvariantError(getHandledErrorMsg(message, optionalParams) || getFallbackErrorMsg(message, optionalParams));
|
|
198
341
|
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
342
|
+
|
|
343
|
+
// ../../node_modules/rxjs/dist/esm5/internal/Subscriber.js
|
|
344
|
+
var Subscriber = (function(_super) {
|
|
345
|
+
__extends(Subscriber2, _super);
|
|
346
|
+
function Subscriber2(destination) {
|
|
347
|
+
var _this = _super.call(this) || this;
|
|
348
|
+
_this.isStopped = false;
|
|
349
|
+
if (destination) {
|
|
350
|
+
_this.destination = destination;
|
|
351
|
+
if (isSubscription(destination)) {
|
|
352
|
+
destination.add(_this);
|
|
353
|
+
}
|
|
354
|
+
} else {
|
|
355
|
+
_this.destination = EMPTY_OBSERVER;
|
|
356
|
+
}
|
|
357
|
+
return _this;
|
|
203
358
|
}
|
|
204
|
-
|
|
205
|
-
return
|
|
206
|
-
}
|
|
207
|
-
|
|
359
|
+
Subscriber2.create = function(next, error, complete) {
|
|
360
|
+
return new SafeSubscriber(next, error, complete);
|
|
361
|
+
};
|
|
362
|
+
Subscriber2.prototype.next = function(value) {
|
|
363
|
+
if (this.isStopped) {
|
|
364
|
+
handleStoppedNotification(nextNotification(value), this);
|
|
365
|
+
} else {
|
|
366
|
+
this._next(value);
|
|
367
|
+
}
|
|
368
|
+
};
|
|
369
|
+
Subscriber2.prototype.error = function(err) {
|
|
370
|
+
if (this.isStopped) {
|
|
371
|
+
handleStoppedNotification(errorNotification(err), this);
|
|
372
|
+
} else {
|
|
373
|
+
this.isStopped = true;
|
|
374
|
+
this._error(err);
|
|
375
|
+
}
|
|
376
|
+
};
|
|
377
|
+
Subscriber2.prototype.complete = function() {
|
|
378
|
+
if (this.isStopped) {
|
|
379
|
+
handleStoppedNotification(COMPLETE_NOTIFICATION, this);
|
|
380
|
+
} else {
|
|
381
|
+
this.isStopped = true;
|
|
382
|
+
this._complete();
|
|
383
|
+
}
|
|
384
|
+
};
|
|
385
|
+
Subscriber2.prototype.unsubscribe = function() {
|
|
386
|
+
if (!this.closed) {
|
|
387
|
+
this.isStopped = true;
|
|
388
|
+
_super.prototype.unsubscribe.call(this);
|
|
389
|
+
this.destination = null;
|
|
390
|
+
}
|
|
391
|
+
};
|
|
392
|
+
Subscriber2.prototype._next = function(value) {
|
|
393
|
+
this.destination.next(value);
|
|
394
|
+
};
|
|
395
|
+
Subscriber2.prototype._error = function(err) {
|
|
396
|
+
try {
|
|
397
|
+
this.destination.error(err);
|
|
398
|
+
} finally {
|
|
399
|
+
this.unsubscribe();
|
|
400
|
+
}
|
|
401
|
+
};
|
|
402
|
+
Subscriber2.prototype._complete = function() {
|
|
403
|
+
try {
|
|
404
|
+
this.destination.complete();
|
|
405
|
+
} finally {
|
|
406
|
+
this.unsubscribe();
|
|
407
|
+
}
|
|
408
|
+
};
|
|
409
|
+
return Subscriber2;
|
|
410
|
+
})(Subscription);
|
|
411
|
+
var _bind = Function.prototype.bind;
|
|
412
|
+
function bind(fn, thisArg) {
|
|
413
|
+
return _bind.call(fn, thisArg);
|
|
414
|
+
}
|
|
415
|
+
var ConsumerObserver = (function() {
|
|
416
|
+
function ConsumerObserver2(partialObserver) {
|
|
417
|
+
this.partialObserver = partialObserver;
|
|
418
|
+
}
|
|
419
|
+
ConsumerObserver2.prototype.next = function(value) {
|
|
420
|
+
var partialObserver = this.partialObserver;
|
|
421
|
+
if (partialObserver.next) {
|
|
422
|
+
try {
|
|
423
|
+
partialObserver.next(value);
|
|
424
|
+
} catch (error) {
|
|
425
|
+
handleUnhandledError(error);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
};
|
|
429
|
+
ConsumerObserver2.prototype.error = function(err) {
|
|
430
|
+
var partialObserver = this.partialObserver;
|
|
431
|
+
if (partialObserver.error) {
|
|
432
|
+
try {
|
|
433
|
+
partialObserver.error(err);
|
|
434
|
+
} catch (error) {
|
|
435
|
+
handleUnhandledError(error);
|
|
436
|
+
}
|
|
437
|
+
} else {
|
|
438
|
+
handleUnhandledError(err);
|
|
439
|
+
}
|
|
440
|
+
};
|
|
441
|
+
ConsumerObserver2.prototype.complete = function() {
|
|
442
|
+
var partialObserver = this.partialObserver;
|
|
443
|
+
if (partialObserver.complete) {
|
|
444
|
+
try {
|
|
445
|
+
partialObserver.complete();
|
|
446
|
+
} catch (error) {
|
|
447
|
+
handleUnhandledError(error);
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
};
|
|
451
|
+
return ConsumerObserver2;
|
|
452
|
+
})();
|
|
453
|
+
var SafeSubscriber = (function(_super) {
|
|
454
|
+
__extends(SafeSubscriber2, _super);
|
|
455
|
+
function SafeSubscriber2(observerOrNext, error, complete) {
|
|
456
|
+
var _this = _super.call(this) || this;
|
|
457
|
+
var partialObserver;
|
|
458
|
+
if (isFunction(observerOrNext) || !observerOrNext) {
|
|
459
|
+
partialObserver = {
|
|
460
|
+
next: observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : void 0,
|
|
461
|
+
error: error !== null && error !== void 0 ? error : void 0,
|
|
462
|
+
complete: complete !== null && complete !== void 0 ? complete : void 0
|
|
463
|
+
};
|
|
464
|
+
} else {
|
|
465
|
+
var context_1;
|
|
466
|
+
if (_this && config.useDeprecatedNextContext) {
|
|
467
|
+
context_1 = Object.create(observerOrNext);
|
|
468
|
+
context_1.unsubscribe = function() {
|
|
469
|
+
return _this.unsubscribe();
|
|
470
|
+
};
|
|
471
|
+
partialObserver = {
|
|
472
|
+
next: observerOrNext.next && bind(observerOrNext.next, context_1),
|
|
473
|
+
error: observerOrNext.error && bind(observerOrNext.error, context_1),
|
|
474
|
+
complete: observerOrNext.complete && bind(observerOrNext.complete, context_1)
|
|
475
|
+
};
|
|
476
|
+
} else {
|
|
477
|
+
partialObserver = observerOrNext;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
_this.destination = new ConsumerObserver(partialObserver);
|
|
481
|
+
return _this;
|
|
208
482
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
483
|
+
return SafeSubscriber2;
|
|
484
|
+
})(Subscriber);
|
|
485
|
+
function handleUnhandledError(error) {
|
|
486
|
+
if (config.useDeprecatedSynchronousErrorHandling) {
|
|
487
|
+
captureError(error);
|
|
488
|
+
} else {
|
|
489
|
+
reportUnhandledError(error);
|
|
213
490
|
}
|
|
214
|
-
if (!message)
|
|
215
|
-
return;
|
|
216
|
-
return global_default[ApolloErrorMessageHandler] && global_default[ApolloErrorMessageHandler](message, messageArgs.map(stringify));
|
|
217
491
|
}
|
|
218
|
-
function
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
492
|
+
function defaultErrorHandler(err) {
|
|
493
|
+
throw err;
|
|
494
|
+
}
|
|
495
|
+
function handleStoppedNotification(notification, subscriber) {
|
|
496
|
+
var onStoppedNotification = config.onStoppedNotification;
|
|
497
|
+
onStoppedNotification && timeoutProvider.setTimeout(function() {
|
|
498
|
+
return onStoppedNotification(notification, subscriber);
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
var EMPTY_OBSERVER = {
|
|
502
|
+
closed: true,
|
|
503
|
+
next: noop,
|
|
504
|
+
error: defaultErrorHandler,
|
|
505
|
+
complete: noop
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
// ../../node_modules/rxjs/dist/esm5/internal/symbol/observable.js
|
|
509
|
+
var observable = (function() {
|
|
510
|
+
return typeof Symbol === "function" && Symbol.observable || "@@observable";
|
|
511
|
+
})();
|
|
512
|
+
|
|
513
|
+
// ../../node_modules/rxjs/dist/esm5/internal/util/identity.js
|
|
514
|
+
function identity(x) {
|
|
515
|
+
return x;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
// ../../node_modules/rxjs/dist/esm5/internal/util/pipe.js
|
|
519
|
+
function pipeFromArray(fns) {
|
|
520
|
+
if (fns.length === 0) {
|
|
521
|
+
return identity;
|
|
522
|
+
}
|
|
523
|
+
if (fns.length === 1) {
|
|
524
|
+
return fns[0];
|
|
525
|
+
}
|
|
526
|
+
return function piped(input) {
|
|
527
|
+
return fns.reduce(function(prev, fn) {
|
|
528
|
+
return fn(prev);
|
|
529
|
+
}, input);
|
|
530
|
+
};
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
// ../../node_modules/rxjs/dist/esm5/internal/Observable.js
|
|
534
|
+
var Observable = (function() {
|
|
535
|
+
function Observable2(subscribe) {
|
|
536
|
+
if (subscribe) {
|
|
537
|
+
this._subscribe = subscribe;
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
Observable2.prototype.lift = function(operator) {
|
|
541
|
+
var observable2 = new Observable2();
|
|
542
|
+
observable2.source = this;
|
|
543
|
+
observable2.operator = operator;
|
|
544
|
+
return observable2;
|
|
545
|
+
};
|
|
546
|
+
Observable2.prototype.subscribe = function(observerOrNext, error, complete) {
|
|
547
|
+
var _this = this;
|
|
548
|
+
var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);
|
|
549
|
+
errorContext(function() {
|
|
550
|
+
var _a = _this, operator = _a.operator, source = _a.source;
|
|
551
|
+
subscriber.add(operator ? operator.call(subscriber, source) : source ? _this._subscribe(subscriber) : _this._trySubscribe(subscriber));
|
|
552
|
+
});
|
|
553
|
+
return subscriber;
|
|
554
|
+
};
|
|
555
|
+
Observable2.prototype._trySubscribe = function(sink) {
|
|
556
|
+
try {
|
|
557
|
+
return this._subscribe(sink);
|
|
558
|
+
} catch (err) {
|
|
559
|
+
sink.error(err);
|
|
560
|
+
}
|
|
561
|
+
};
|
|
562
|
+
Observable2.prototype.forEach = function(next, promiseCtor) {
|
|
563
|
+
var _this = this;
|
|
564
|
+
promiseCtor = getPromiseCtor(promiseCtor);
|
|
565
|
+
return new promiseCtor(function(resolve, reject) {
|
|
566
|
+
var subscriber = new SafeSubscriber({
|
|
567
|
+
next: function(value) {
|
|
568
|
+
try {
|
|
569
|
+
next(value);
|
|
570
|
+
} catch (err) {
|
|
571
|
+
reject(err);
|
|
572
|
+
subscriber.unsubscribe();
|
|
573
|
+
}
|
|
574
|
+
},
|
|
575
|
+
error: reject,
|
|
576
|
+
complete: resolve
|
|
577
|
+
});
|
|
578
|
+
_this.subscribe(subscriber);
|
|
579
|
+
});
|
|
580
|
+
};
|
|
581
|
+
Observable2.prototype._subscribe = function(subscriber) {
|
|
582
|
+
var _a;
|
|
583
|
+
return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);
|
|
584
|
+
};
|
|
585
|
+
Observable2.prototype[observable] = function() {
|
|
586
|
+
return this;
|
|
587
|
+
};
|
|
588
|
+
Observable2.prototype.pipe = function() {
|
|
589
|
+
var operations = [];
|
|
590
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
591
|
+
operations[_i] = arguments[_i];
|
|
592
|
+
}
|
|
593
|
+
return pipeFromArray(operations)(this);
|
|
594
|
+
};
|
|
595
|
+
Observable2.prototype.toPromise = function(promiseCtor) {
|
|
596
|
+
var _this = this;
|
|
597
|
+
promiseCtor = getPromiseCtor(promiseCtor);
|
|
598
|
+
return new promiseCtor(function(resolve, reject) {
|
|
599
|
+
var value;
|
|
600
|
+
_this.subscribe(function(x) {
|
|
601
|
+
return value = x;
|
|
602
|
+
}, function(err) {
|
|
603
|
+
return reject(err);
|
|
604
|
+
}, function() {
|
|
605
|
+
return resolve(value);
|
|
606
|
+
});
|
|
607
|
+
});
|
|
608
|
+
};
|
|
609
|
+
Observable2.create = function(subscribe) {
|
|
610
|
+
return new Observable2(subscribe);
|
|
611
|
+
};
|
|
612
|
+
return Observable2;
|
|
613
|
+
})();
|
|
614
|
+
function getPromiseCtor(promiseCtor) {
|
|
615
|
+
var _a;
|
|
616
|
+
return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;
|
|
617
|
+
}
|
|
618
|
+
function isObserver(value) {
|
|
619
|
+
return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);
|
|
620
|
+
}
|
|
621
|
+
function isSubscriber(value) {
|
|
622
|
+
return value && value instanceof Subscriber || isObserver(value) && isSubscription(value);
|
|
229
623
|
}
|
|
230
624
|
|
|
231
|
-
// ../../node_modules
|
|
232
|
-
var
|
|
625
|
+
// ../../node_modules/rxjs/dist/esm5/internal/observable/empty.js
|
|
626
|
+
var EMPTY = new Observable(function(subscriber) {
|
|
627
|
+
return subscriber.complete();
|
|
628
|
+
});
|
|
233
629
|
|
|
234
630
|
// ../../node_modules/graphql/jsutils/devAssert.mjs
|
|
235
631
|
function devAssert(condition, message) {
|
|
@@ -418,16 +814,16 @@ function printBlockString(value, options) {
|
|
|
418
814
|
const forceTrailingNewline = hasTrailingQuote || hasTrailingSlash;
|
|
419
815
|
const printAsMultipleLines = !(options !== null && options !== void 0 && options.minimize) && // add leading and trailing new lines only if it improves readability
|
|
420
816
|
(!isSingleLine || value.length > 70 || forceTrailingNewline || forceLeadingNewLine || hasTrailingTripleQuotes);
|
|
421
|
-
let
|
|
817
|
+
let result = "";
|
|
422
818
|
const skipLeadingNewLine = isSingleLine && isWhiteSpace(value.charCodeAt(0));
|
|
423
819
|
if (printAsMultipleLines && !skipLeadingNewLine || forceLeadingNewLine) {
|
|
424
|
-
|
|
820
|
+
result += "\n";
|
|
425
821
|
}
|
|
426
|
-
|
|
822
|
+
result += escapedValue;
|
|
427
823
|
if (printAsMultipleLines || forceTrailingNewline) {
|
|
428
|
-
|
|
824
|
+
result += "\n";
|
|
429
825
|
}
|
|
430
|
-
return '"""' +
|
|
826
|
+
return '"""' + result + '"""';
|
|
431
827
|
}
|
|
432
828
|
|
|
433
829
|
// ../../node_modules/graphql/jsutils/inspect.mjs
|
|
@@ -691,17 +1087,17 @@ var escapeSequences = [
|
|
|
691
1087
|
|
|
692
1088
|
// ../../node_modules/graphql/language/visitor.mjs
|
|
693
1089
|
var BREAK = Object.freeze({});
|
|
694
|
-
function visit(
|
|
1090
|
+
function visit(root, visitor, visitorKeys = QueryDocumentKeys) {
|
|
695
1091
|
const enterLeaveMap = /* @__PURE__ */ new Map();
|
|
696
1092
|
for (const kind of Object.values(Kind)) {
|
|
697
1093
|
enterLeaveMap.set(kind, getEnterLeaveForKind(visitor, kind));
|
|
698
1094
|
}
|
|
699
1095
|
let stack = void 0;
|
|
700
|
-
let inArray = Array.isArray(
|
|
701
|
-
let keys = [
|
|
1096
|
+
let inArray = Array.isArray(root);
|
|
1097
|
+
let keys = [root];
|
|
702
1098
|
let index = -1;
|
|
703
1099
|
let edits = [];
|
|
704
|
-
let node =
|
|
1100
|
+
let node = root;
|
|
705
1101
|
let key = void 0;
|
|
706
1102
|
let parent = void 0;
|
|
707
1103
|
const path = [];
|
|
@@ -747,25 +1143,25 @@ function visit(root2, visitor, visitorKeys = QueryDocumentKeys) {
|
|
|
747
1143
|
}
|
|
748
1144
|
path.push(key);
|
|
749
1145
|
}
|
|
750
|
-
let
|
|
1146
|
+
let result;
|
|
751
1147
|
if (!Array.isArray(node)) {
|
|
752
1148
|
var _enterLeaveMap$get, _enterLeaveMap$get2;
|
|
753
1149
|
isNode(node) || devAssert(false, `Invalid AST Node: ${inspect(node)}.`);
|
|
754
1150
|
const visitFn = isLeaving ? (_enterLeaveMap$get = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get === void 0 ? void 0 : _enterLeaveMap$get.leave : (_enterLeaveMap$get2 = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get2 === void 0 ? void 0 : _enterLeaveMap$get2.enter;
|
|
755
|
-
|
|
756
|
-
if (
|
|
1151
|
+
result = visitFn === null || visitFn === void 0 ? void 0 : visitFn.call(visitor, node, key, parent, path, ancestors);
|
|
1152
|
+
if (result === BREAK) {
|
|
757
1153
|
break;
|
|
758
1154
|
}
|
|
759
|
-
if (
|
|
1155
|
+
if (result === false) {
|
|
760
1156
|
if (!isLeaving) {
|
|
761
1157
|
path.pop();
|
|
762
1158
|
continue;
|
|
763
1159
|
}
|
|
764
|
-
} else if (
|
|
765
|
-
edits.push([key,
|
|
1160
|
+
} else if (result !== void 0) {
|
|
1161
|
+
edits.push([key, result]);
|
|
766
1162
|
if (!isLeaving) {
|
|
767
|
-
if (isNode(
|
|
768
|
-
node =
|
|
1163
|
+
if (isNode(result)) {
|
|
1164
|
+
node = result;
|
|
769
1165
|
} else {
|
|
770
1166
|
path.pop();
|
|
771
1167
|
continue;
|
|
@@ -773,7 +1169,7 @@ function visit(root2, visitor, visitorKeys = QueryDocumentKeys) {
|
|
|
773
1169
|
}
|
|
774
1170
|
}
|
|
775
1171
|
}
|
|
776
|
-
if (
|
|
1172
|
+
if (result === void 0 && isEdited) {
|
|
777
1173
|
edits.push([key, node]);
|
|
778
1174
|
}
|
|
779
1175
|
if (isLeaving) {
|
|
@@ -800,7 +1196,7 @@ function visit(root2, visitor, visitorKeys = QueryDocumentKeys) {
|
|
|
800
1196
|
if (edits.length !== 0) {
|
|
801
1197
|
return edits[edits.length - 1][1];
|
|
802
1198
|
}
|
|
803
|
-
return
|
|
1199
|
+
return root;
|
|
804
1200
|
}
|
|
805
1201
|
function getEnterLeaveForKind(visitor, kind) {
|
|
806
1202
|
const kindVisitor = visitor[kind];
|
|
@@ -836,8 +1232,8 @@ var printDocASTReducer = {
|
|
|
836
1232
|
},
|
|
837
1233
|
OperationDefinition: {
|
|
838
1234
|
leave(node) {
|
|
839
|
-
const varDefs = hasMultilineItems(node.variableDefinitions) ?
|
|
840
|
-
const prefix =
|
|
1235
|
+
const varDefs = hasMultilineItems(node.variableDefinitions) ? wrap("(\n", join(node.variableDefinitions, "\n"), "\n)") : wrap("(", join(node.variableDefinitions, ", "), ")");
|
|
1236
|
+
const prefix = wrap("", node.description, "\n") + join(
|
|
841
1237
|
[
|
|
842
1238
|
node.operation,
|
|
843
1239
|
join([node.name, varDefs]),
|
|
@@ -849,17 +1245,17 @@ var printDocASTReducer = {
|
|
|
849
1245
|
}
|
|
850
1246
|
},
|
|
851
1247
|
VariableDefinition: {
|
|
852
|
-
leave: ({ variable, type, defaultValue, directives, description }) =>
|
|
1248
|
+
leave: ({ variable, type, defaultValue, directives, description }) => wrap("", description, "\n") + variable + ": " + type + wrap(" = ", defaultValue) + wrap(" ", join(directives, " "))
|
|
853
1249
|
},
|
|
854
1250
|
SelectionSet: {
|
|
855
1251
|
leave: ({ selections }) => block(selections)
|
|
856
1252
|
},
|
|
857
1253
|
Field: {
|
|
858
1254
|
leave({ alias, name, arguments: args, directives, selectionSet }) {
|
|
859
|
-
const prefix =
|
|
860
|
-
let argsLine = prefix +
|
|
1255
|
+
const prefix = wrap("", alias, ": ") + name;
|
|
1256
|
+
let argsLine = prefix + wrap("(", join(args, ", "), ")");
|
|
861
1257
|
if (argsLine.length > MAX_LINE_LENGTH) {
|
|
862
|
-
argsLine = prefix +
|
|
1258
|
+
argsLine = prefix + wrap("(\n", indent(join(args, "\n")), "\n)");
|
|
863
1259
|
}
|
|
864
1260
|
return join([argsLine, join(directives, " "), selectionSet], " ");
|
|
865
1261
|
}
|
|
@@ -869,13 +1265,13 @@ var printDocASTReducer = {
|
|
|
869
1265
|
},
|
|
870
1266
|
// Fragments
|
|
871
1267
|
FragmentSpread: {
|
|
872
|
-
leave: ({ name, directives }) => "..." + name +
|
|
1268
|
+
leave: ({ name, directives }) => "..." + name + wrap(" ", join(directives, " "))
|
|
873
1269
|
},
|
|
874
1270
|
InlineFragment: {
|
|
875
1271
|
leave: ({ typeCondition, directives, selectionSet }) => join(
|
|
876
1272
|
[
|
|
877
1273
|
"...",
|
|
878
|
-
|
|
1274
|
+
wrap("on ", typeCondition),
|
|
879
1275
|
join(directives, " "),
|
|
880
1276
|
selectionSet
|
|
881
1277
|
],
|
|
@@ -890,9 +1286,9 @@ var printDocASTReducer = {
|
|
|
890
1286
|
directives,
|
|
891
1287
|
selectionSet,
|
|
892
1288
|
description
|
|
893
|
-
}) =>
|
|
1289
|
+
}) => wrap("", description, "\n") + // Note: fragment variable definitions are experimental and may be changed
|
|
894
1290
|
// or removed in the future.
|
|
895
|
-
`fragment ${name}${
|
|
1291
|
+
`fragment ${name}${wrap("(", join(variableDefinitions, ", "), ")")} on ${typeCondition} ${wrap("", join(directives, " "), " ")}` + selectionSet
|
|
896
1292
|
},
|
|
897
1293
|
// Value
|
|
898
1294
|
IntValue: {
|
|
@@ -924,7 +1320,7 @@ var printDocASTReducer = {
|
|
|
924
1320
|
},
|
|
925
1321
|
// Directive
|
|
926
1322
|
Directive: {
|
|
927
|
-
leave: ({ name, arguments: args }) => "@" + name +
|
|
1323
|
+
leave: ({ name, arguments: args }) => "@" + name + wrap("(", join(args, ", "), ")")
|
|
928
1324
|
},
|
|
929
1325
|
// Type
|
|
930
1326
|
NamedType: {
|
|
@@ -938,20 +1334,20 @@ var printDocASTReducer = {
|
|
|
938
1334
|
},
|
|
939
1335
|
// Type System Definitions
|
|
940
1336
|
SchemaDefinition: {
|
|
941
|
-
leave: ({ description, directives, operationTypes }) =>
|
|
1337
|
+
leave: ({ description, directives, operationTypes }) => wrap("", description, "\n") + join(["schema", join(directives, " "), block(operationTypes)], " ")
|
|
942
1338
|
},
|
|
943
1339
|
OperationTypeDefinition: {
|
|
944
1340
|
leave: ({ operation, type }) => operation + ": " + type
|
|
945
1341
|
},
|
|
946
1342
|
ScalarTypeDefinition: {
|
|
947
|
-
leave: ({ description, name, directives }) =>
|
|
1343
|
+
leave: ({ description, name, directives }) => wrap("", description, "\n") + join(["scalar", name, join(directives, " ")], " ")
|
|
948
1344
|
},
|
|
949
1345
|
ObjectTypeDefinition: {
|
|
950
|
-
leave: ({ description, name, interfaces, directives, fields }) =>
|
|
1346
|
+
leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, "\n") + join(
|
|
951
1347
|
[
|
|
952
1348
|
"type",
|
|
953
1349
|
name,
|
|
954
|
-
|
|
1350
|
+
wrap("implements ", join(interfaces, " & ")),
|
|
955
1351
|
join(directives, " "),
|
|
956
1352
|
block(fields)
|
|
957
1353
|
],
|
|
@@ -959,20 +1355,20 @@ var printDocASTReducer = {
|
|
|
959
1355
|
)
|
|
960
1356
|
},
|
|
961
1357
|
FieldDefinition: {
|
|
962
|
-
leave: ({ description, name, arguments: args, type, directives }) =>
|
|
1358
|
+
leave: ({ description, name, arguments: args, type, directives }) => wrap("", description, "\n") + name + (hasMultilineItems(args) ? wrap("(\n", indent(join(args, "\n")), "\n)") : wrap("(", join(args, ", "), ")")) + ": " + type + wrap(" ", join(directives, " "))
|
|
963
1359
|
},
|
|
964
1360
|
InputValueDefinition: {
|
|
965
|
-
leave: ({ description, name, type, defaultValue, directives }) =>
|
|
966
|
-
[name + ": " + type,
|
|
1361
|
+
leave: ({ description, name, type, defaultValue, directives }) => wrap("", description, "\n") + join(
|
|
1362
|
+
[name + ": " + type, wrap("= ", defaultValue), join(directives, " ")],
|
|
967
1363
|
" "
|
|
968
1364
|
)
|
|
969
1365
|
},
|
|
970
1366
|
InterfaceTypeDefinition: {
|
|
971
|
-
leave: ({ description, name, interfaces, directives, fields }) =>
|
|
1367
|
+
leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, "\n") + join(
|
|
972
1368
|
[
|
|
973
1369
|
"interface",
|
|
974
1370
|
name,
|
|
975
|
-
|
|
1371
|
+
wrap("implements ", join(interfaces, " & ")),
|
|
976
1372
|
join(directives, " "),
|
|
977
1373
|
block(fields)
|
|
978
1374
|
],
|
|
@@ -980,19 +1376,19 @@ var printDocASTReducer = {
|
|
|
980
1376
|
)
|
|
981
1377
|
},
|
|
982
1378
|
UnionTypeDefinition: {
|
|
983
|
-
leave: ({ description, name, directives, types }) =>
|
|
984
|
-
["union", name, join(directives, " "),
|
|
1379
|
+
leave: ({ description, name, directives, types }) => wrap("", description, "\n") + join(
|
|
1380
|
+
["union", name, join(directives, " "), wrap("= ", join(types, " | "))],
|
|
985
1381
|
" "
|
|
986
1382
|
)
|
|
987
1383
|
},
|
|
988
1384
|
EnumTypeDefinition: {
|
|
989
|
-
leave: ({ description, name, directives, values }) =>
|
|
1385
|
+
leave: ({ description, name, directives, values }) => wrap("", description, "\n") + join(["enum", name, join(directives, " "), block(values)], " ")
|
|
990
1386
|
},
|
|
991
1387
|
EnumValueDefinition: {
|
|
992
|
-
leave: ({ description, name, directives }) =>
|
|
1388
|
+
leave: ({ description, name, directives }) => wrap("", description, "\n") + join([name, join(directives, " ")], " ")
|
|
993
1389
|
},
|
|
994
1390
|
InputObjectTypeDefinition: {
|
|
995
|
-
leave: ({ description, name, directives, fields }) =>
|
|
1391
|
+
leave: ({ description, name, directives, fields }) => wrap("", description, "\n") + join(["input", name, join(directives, " "), block(fields)], " ")
|
|
996
1392
|
},
|
|
997
1393
|
DirectiveDefinition: {
|
|
998
1394
|
leave: ({
|
|
@@ -1002,7 +1398,7 @@ var printDocASTReducer = {
|
|
|
1002
1398
|
directives,
|
|
1003
1399
|
repeatable,
|
|
1004
1400
|
locations
|
|
1005
|
-
}) =>
|
|
1401
|
+
}) => wrap("", description, "\n") + "directive @" + name + (hasMultilineItems(args) ? wrap("(\n", indent(join(args, "\n")), "\n)") : wrap("(", join(args, ", "), ")")) + wrap(" ", join(directives, " ")) + (repeatable ? " repeatable" : "") + " on " + join(locations, " | ")
|
|
1006
1402
|
},
|
|
1007
1403
|
SchemaExtension: {
|
|
1008
1404
|
leave: ({ directives, operationTypes }) => join(
|
|
@@ -1018,7 +1414,7 @@ var printDocASTReducer = {
|
|
|
1018
1414
|
[
|
|
1019
1415
|
"extend type",
|
|
1020
1416
|
name,
|
|
1021
|
-
|
|
1417
|
+
wrap("implements ", join(interfaces, " & ")),
|
|
1022
1418
|
join(directives, " "),
|
|
1023
1419
|
block(fields)
|
|
1024
1420
|
],
|
|
@@ -1030,7 +1426,7 @@ var printDocASTReducer = {
|
|
|
1030
1426
|
[
|
|
1031
1427
|
"extend interface",
|
|
1032
1428
|
name,
|
|
1033
|
-
|
|
1429
|
+
wrap("implements ", join(interfaces, " & ")),
|
|
1034
1430
|
join(directives, " "),
|
|
1035
1431
|
block(fields)
|
|
1036
1432
|
],
|
|
@@ -1043,7 +1439,7 @@ var printDocASTReducer = {
|
|
|
1043
1439
|
"extend union",
|
|
1044
1440
|
name,
|
|
1045
1441
|
join(directives, " "),
|
|
1046
|
-
|
|
1442
|
+
wrap("= ", join(types, " | "))
|
|
1047
1443
|
],
|
|
1048
1444
|
" "
|
|
1049
1445
|
)
|
|
@@ -1062,16 +1458,16 @@ var printDocASTReducer = {
|
|
|
1062
1458
|
leave: ({ name }) => name
|
|
1063
1459
|
},
|
|
1064
1460
|
MemberCoordinate: {
|
|
1065
|
-
leave: ({ name, memberName }) => join([name,
|
|
1461
|
+
leave: ({ name, memberName }) => join([name, wrap(".", memberName)])
|
|
1066
1462
|
},
|
|
1067
1463
|
ArgumentCoordinate: {
|
|
1068
|
-
leave: ({ name, fieldName, argumentName }) => join([name,
|
|
1464
|
+
leave: ({ name, fieldName, argumentName }) => join([name, wrap(".", fieldName), wrap("(", argumentName, ":)")])
|
|
1069
1465
|
},
|
|
1070
1466
|
DirectiveCoordinate: {
|
|
1071
1467
|
leave: ({ name }) => join(["@", name])
|
|
1072
1468
|
},
|
|
1073
1469
|
DirectiveArgumentCoordinate: {
|
|
1074
|
-
leave: ({ name, argumentName }) => join(["@", name,
|
|
1470
|
+
leave: ({ name, argumentName }) => join(["@", name, wrap("(", argumentName, ":)")])
|
|
1075
1471
|
}
|
|
1076
1472
|
};
|
|
1077
1473
|
function join(maybeArray, separator = "") {
|
|
@@ -1079,44 +1475,236 @@ function join(maybeArray, separator = "") {
|
|
|
1079
1475
|
return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter((x) => x).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : "";
|
|
1080
1476
|
}
|
|
1081
1477
|
function block(array) {
|
|
1082
|
-
return
|
|
1478
|
+
return wrap("{\n", indent(join(array, "\n")), "\n}");
|
|
1083
1479
|
}
|
|
1084
|
-
function
|
|
1480
|
+
function wrap(start, maybeString, end = "") {
|
|
1085
1481
|
return maybeString != null && maybeString !== "" ? start + maybeString + end : "";
|
|
1086
1482
|
}
|
|
1087
1483
|
function indent(str) {
|
|
1088
|
-
return
|
|
1484
|
+
return wrap(" ", str.replace(/\n/g, "\n "));
|
|
1089
1485
|
}
|
|
1090
1486
|
function hasMultilineItems(maybeArray) {
|
|
1091
1487
|
var _maybeArray$some;
|
|
1092
1488
|
return (_maybeArray$some = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.some((str) => str.includes("\n"))) !== null && _maybeArray$some !== void 0 ? _maybeArray$some : false;
|
|
1093
1489
|
}
|
|
1094
1490
|
|
|
1095
|
-
// ../../node_modules/@
|
|
1096
|
-
|
|
1491
|
+
// ../../node_modules/@apollo/client/utilities/environment/index.js
|
|
1492
|
+
var __DEV__ = globalThis.__DEV__ === true;
|
|
1493
|
+
|
|
1494
|
+
// ../../node_modules/@apollo/client/utilities/internal/globals/maybe.js
|
|
1495
|
+
function maybe(thunk) {
|
|
1496
|
+
try {
|
|
1497
|
+
return thunk();
|
|
1498
|
+
} catch {
|
|
1499
|
+
}
|
|
1097
1500
|
}
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1501
|
+
|
|
1502
|
+
// ../../node_modules/@apollo/client/utilities/internal/globals/global.js
|
|
1503
|
+
var global_default = (
|
|
1504
|
+
// We don't expect the Function constructor ever to be invoked at runtime, as
|
|
1505
|
+
// long as at least one of globalThis, window, self, or global is defined, so
|
|
1506
|
+
// we are under no obligation to make it easy for static analysis tools to
|
|
1507
|
+
// detect syntactic usage of the Function constructor. If you think you can
|
|
1508
|
+
maybe(() => globalThis) || maybe(() => window) || maybe(() => self) || maybe(() => global) || // improve your static analysis to detect this obfuscation, think again. This
|
|
1509
|
+
// is an arms race you cannot win, at least not in JavaScript.
|
|
1510
|
+
maybe(function() {
|
|
1511
|
+
return maybe.constructor("return this")();
|
|
1512
|
+
})
|
|
1513
|
+
);
|
|
1514
|
+
|
|
1515
|
+
// ../../node_modules/@apollo/client/version.js
|
|
1516
|
+
var version = "4.2.7";
|
|
1517
|
+
|
|
1518
|
+
// ../../node_modules/@apollo/client/utilities/internal/makeUniqueId.js
|
|
1519
|
+
var prefixCounts = /* @__PURE__ */ new Map();
|
|
1520
|
+
function makeUniqueId(prefix) {
|
|
1521
|
+
const count = prefixCounts.get(prefix) || 1;
|
|
1522
|
+
prefixCounts.set(prefix, count + 1);
|
|
1523
|
+
return `${prefix}:${count}:${Math.random().toString(36).slice(2)}`;
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
// ../../node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js
|
|
1527
|
+
function stringifyForDisplay(value, space = 0) {
|
|
1528
|
+
const undefId = makeUniqueId("stringifyForDisplay");
|
|
1529
|
+
return JSON.stringify(value, (_, value2) => {
|
|
1530
|
+
return value2 === void 0 ? undefId : value2;
|
|
1531
|
+
}, space).split(JSON.stringify(undefId)).join("<undefined>");
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
// ../../node_modules/@apollo/client/utilities/invariant/index.js
|
|
1535
|
+
var genericMessage = "Invariant Violation";
|
|
1536
|
+
var InvariantError = class _InvariantError extends Error {
|
|
1537
|
+
constructor(message = genericMessage) {
|
|
1538
|
+
super(message);
|
|
1539
|
+
this.name = genericMessage;
|
|
1540
|
+
Object.setPrototypeOf(this, _InvariantError.prototype);
|
|
1541
|
+
}
|
|
1101
1542
|
};
|
|
1102
|
-
var
|
|
1103
|
-
var
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1543
|
+
var verbosityLevels = ["debug", "log", "warn", "error", "silent"];
|
|
1544
|
+
var verbosityLevel = verbosityLevels.indexOf(__DEV__ ? "log" : "silent");
|
|
1545
|
+
function invariant(condition, ...args) {
|
|
1546
|
+
if (!condition) {
|
|
1547
|
+
throw newInvariantError(...args);
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
function wrapConsoleMethod(name) {
|
|
1551
|
+
return function(message, ...args) {
|
|
1552
|
+
if (verbosityLevels.indexOf(name) >= verbosityLevel) {
|
|
1553
|
+
const method = console[name] || console.log;
|
|
1554
|
+
if (typeof message === "number") {
|
|
1555
|
+
const arg0 = message;
|
|
1556
|
+
message = getHandledErrorMsg(arg0);
|
|
1557
|
+
if (!message) {
|
|
1558
|
+
message = getFallbackErrorMsg(arg0, args);
|
|
1559
|
+
args = [];
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
method(message, ...args);
|
|
1563
|
+
}
|
|
1107
1564
|
};
|
|
1108
|
-
}
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1565
|
+
}
|
|
1566
|
+
invariant.debug = wrapConsoleMethod("debug");
|
|
1567
|
+
invariant.log = wrapConsoleMethod("log");
|
|
1568
|
+
invariant.warn = wrapConsoleMethod("warn");
|
|
1569
|
+
invariant.error = wrapConsoleMethod("error");
|
|
1570
|
+
function newInvariantError(message, ...optionalParams) {
|
|
1571
|
+
return new InvariantError(getHandledErrorMsg(message, optionalParams) || getFallbackErrorMsg(message, optionalParams));
|
|
1572
|
+
}
|
|
1573
|
+
var ApolloErrorMessageHandler = /* @__PURE__ */ Symbol.for("ApolloErrorMessageHandler_" + version);
|
|
1574
|
+
function stringify(arg) {
|
|
1575
|
+
if (typeof arg == "string") {
|
|
1576
|
+
return arg;
|
|
1577
|
+
}
|
|
1578
|
+
try {
|
|
1579
|
+
return stringifyForDisplay(arg, 2).slice(0, 1e3);
|
|
1580
|
+
} catch {
|
|
1581
|
+
return "<non-serializable>";
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
function getHandledErrorMsg(message, messageArgs = []) {
|
|
1585
|
+
if (!message)
|
|
1586
|
+
return;
|
|
1587
|
+
return global_default[ApolloErrorMessageHandler] && global_default[ApolloErrorMessageHandler](message, messageArgs.map(stringify));
|
|
1588
|
+
}
|
|
1589
|
+
function getFallbackErrorMsg(message, messageArgs = []) {
|
|
1590
|
+
if (!message)
|
|
1591
|
+
return;
|
|
1592
|
+
if (typeof message === "string") {
|
|
1593
|
+
return messageArgs.reduce((msg, arg) => msg.replace(/%[sdfo]/, stringify(arg)), message);
|
|
1594
|
+
}
|
|
1595
|
+
return `An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#${encodeURIComponent(JSON.stringify({
|
|
1596
|
+
version,
|
|
1597
|
+
message,
|
|
1598
|
+
args: messageArgs.map(stringify)
|
|
1599
|
+
}))}`;
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
// ../../node_modules/@apollo/client/utilities/caching/sizes.js
|
|
1603
|
+
var cacheSizeSymbol = /* @__PURE__ */ Symbol.for("apollo.cacheSize");
|
|
1604
|
+
var cacheSizes = { ...global_default[cacheSizeSymbol] };
|
|
1605
|
+
|
|
1606
|
+
// ../../node_modules/@apollo/client/utilities/internal/getOperationName.js
|
|
1607
|
+
function getOperationName(doc, fallback) {
|
|
1608
|
+
return doc.definitions.find((definition) => definition.kind === "OperationDefinition" && !!definition.name)?.name.value ?? fallback;
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1611
|
+
// ../../node_modules/@wry/trie/lib/index.js
|
|
1612
|
+
var defaultMakeData = () => /* @__PURE__ */ Object.create(null);
|
|
1613
|
+
var { forEach, slice } = Array.prototype;
|
|
1614
|
+
var { hasOwnProperty } = Object.prototype;
|
|
1615
|
+
var Trie = class _Trie {
|
|
1616
|
+
constructor(weakness = true, makeData = defaultMakeData) {
|
|
1617
|
+
this.weakness = weakness;
|
|
1618
|
+
this.makeData = makeData;
|
|
1619
|
+
}
|
|
1620
|
+
lookup() {
|
|
1621
|
+
return this.lookupArray(arguments);
|
|
1622
|
+
}
|
|
1623
|
+
lookupArray(array) {
|
|
1624
|
+
let node = this;
|
|
1625
|
+
forEach.call(array, (key) => node = node.getChildTrie(key));
|
|
1626
|
+
return hasOwnProperty.call(node, "data") ? node.data : node.data = this.makeData(slice.call(array));
|
|
1627
|
+
}
|
|
1628
|
+
peek() {
|
|
1629
|
+
return this.peekArray(arguments);
|
|
1630
|
+
}
|
|
1631
|
+
peekArray(array) {
|
|
1632
|
+
let node = this;
|
|
1633
|
+
for (let i = 0, len = array.length; node && i < len; ++i) {
|
|
1634
|
+
const map = node.mapFor(array[i], false);
|
|
1635
|
+
node = map && map.get(array[i]);
|
|
1636
|
+
}
|
|
1637
|
+
return node && node.data;
|
|
1638
|
+
}
|
|
1639
|
+
remove() {
|
|
1640
|
+
return this.removeArray(arguments);
|
|
1641
|
+
}
|
|
1642
|
+
removeArray(array) {
|
|
1643
|
+
let data;
|
|
1644
|
+
if (array.length) {
|
|
1645
|
+
const head = array[0];
|
|
1646
|
+
const map = this.mapFor(head, false);
|
|
1647
|
+
const child = map && map.get(head);
|
|
1648
|
+
if (child) {
|
|
1649
|
+
data = child.removeArray(slice.call(array, 1));
|
|
1650
|
+
if (!child.data && !child.weak && !(child.strong && child.strong.size)) {
|
|
1651
|
+
map.delete(head);
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
} else {
|
|
1655
|
+
data = this.data;
|
|
1656
|
+
delete this.data;
|
|
1657
|
+
}
|
|
1658
|
+
return data;
|
|
1659
|
+
}
|
|
1660
|
+
getChildTrie(key) {
|
|
1661
|
+
const map = this.mapFor(key, true);
|
|
1662
|
+
let child = map.get(key);
|
|
1663
|
+
if (!child)
|
|
1664
|
+
map.set(key, child = new _Trie(this.weakness, this.makeData));
|
|
1665
|
+
return child;
|
|
1666
|
+
}
|
|
1667
|
+
mapFor(key, create) {
|
|
1668
|
+
return this.weakness && isObjRef(key) ? this.weak || (create ? this.weak = /* @__PURE__ */ new WeakMap() : void 0) : this.strong || (create ? this.strong = /* @__PURE__ */ new Map() : void 0);
|
|
1669
|
+
}
|
|
1670
|
+
};
|
|
1671
|
+
function isObjRef(value) {
|
|
1672
|
+
switch (typeof value) {
|
|
1673
|
+
case "object":
|
|
1674
|
+
if (value === null)
|
|
1675
|
+
break;
|
|
1676
|
+
// Fall through to return true...
|
|
1677
|
+
case "function":
|
|
1678
|
+
return true;
|
|
1679
|
+
}
|
|
1680
|
+
return false;
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
// ../../node_modules/@wry/caches/lib/weak.js
|
|
1684
|
+
function noop2() {
|
|
1685
|
+
}
|
|
1686
|
+
var defaultDispose = noop2;
|
|
1687
|
+
var _WeakRef = typeof WeakRef !== "undefined" ? WeakRef : function(value) {
|
|
1688
|
+
return { deref: () => value };
|
|
1689
|
+
};
|
|
1690
|
+
var _WeakMap = typeof WeakMap !== "undefined" ? WeakMap : Map;
|
|
1691
|
+
var _FinalizationRegistry = typeof FinalizationRegistry !== "undefined" ? FinalizationRegistry : function() {
|
|
1692
|
+
return {
|
|
1693
|
+
register: noop2,
|
|
1694
|
+
unregister: noop2
|
|
1695
|
+
};
|
|
1696
|
+
};
|
|
1697
|
+
var finalizationBatchSize = 10024;
|
|
1698
|
+
var WeakCache = class {
|
|
1699
|
+
constructor(max = Infinity, dispose = defaultDispose) {
|
|
1700
|
+
this.max = max;
|
|
1701
|
+
this.dispose = dispose;
|
|
1702
|
+
this.map = new _WeakMap();
|
|
1703
|
+
this.newest = null;
|
|
1704
|
+
this.oldest = null;
|
|
1705
|
+
this.unfinalizedNodes = /* @__PURE__ */ new Set();
|
|
1706
|
+
this.finalizationScheduled = false;
|
|
1707
|
+
this.size = 0;
|
|
1120
1708
|
this.finalize = () => {
|
|
1121
1709
|
const iterator = this.unfinalizedNodes.values();
|
|
1122
1710
|
for (let i = 0; i < finalizationBatchSize; i++) {
|
|
@@ -1211,1170 +1799,149 @@ var WeakCache = class {
|
|
|
1211
1799
|
} else {
|
|
1212
1800
|
this.registry.unregister(node);
|
|
1213
1801
|
}
|
|
1214
|
-
if (key)
|
|
1215
|
-
this.map.delete(key);
|
|
1216
|
-
}
|
|
1217
|
-
delete(key) {
|
|
1218
|
-
const node = this.map.get(key);
|
|
1219
|
-
if (node) {
|
|
1220
|
-
this.deleteNode(node);
|
|
1221
|
-
return true;
|
|
1222
|
-
}
|
|
1223
|
-
return false;
|
|
1224
|
-
}
|
|
1225
|
-
scheduleFinalization(node) {
|
|
1226
|
-
this.unfinalizedNodes.add(node);
|
|
1227
|
-
if (!this.finalizationScheduled) {
|
|
1228
|
-
this.finalizationScheduled = true;
|
|
1229
|
-
queueMicrotask(this.finalize);
|
|
1230
|
-
}
|
|
1231
|
-
}
|
|
1232
|
-
};
|
|
1233
|
-
|
|
1234
|
-
// ../../node_modules/@apollo/client/utilities/caching/caches.js
|
|
1235
|
-
var scheduledCleanup = /* @__PURE__ */ new WeakSet();
|
|
1236
|
-
function schedule(cache) {
|
|
1237
|
-
if (cache.size <= (cache.max || -1)) {
|
|
1238
|
-
return;
|
|
1239
|
-
}
|
|
1240
|
-
if (!scheduledCleanup.has(cache)) {
|
|
1241
|
-
scheduledCleanup.add(cache);
|
|
1242
|
-
setTimeout(function() {
|
|
1243
|
-
cache.clean();
|
|
1244
|
-
scheduledCleanup.delete(cache);
|
|
1245
|
-
}, 100);
|
|
1246
|
-
}
|
|
1247
|
-
}
|
|
1248
|
-
var AutoCleanedWeakCache = function(max, dispose) {
|
|
1249
|
-
var cache = new WeakCache(max, dispose);
|
|
1250
|
-
cache.set = function(key, value) {
|
|
1251
|
-
var ret = WeakCache.prototype.set.call(this, key, value);
|
|
1252
|
-
schedule(this);
|
|
1253
|
-
return ret;
|
|
1254
|
-
};
|
|
1255
|
-
return cache;
|
|
1256
|
-
};
|
|
1257
|
-
|
|
1258
|
-
// ../../node_modules/@apollo/client/utilities/caching/sizes.js
|
|
1259
|
-
var cacheSizeSymbol = /* @__PURE__ */ Symbol.for("apollo.cacheSize");
|
|
1260
|
-
var cacheSizes = __assign({}, global_default[cacheSizeSymbol]);
|
|
1261
|
-
|
|
1262
|
-
// ../../node_modules/@apollo/client/utilities/caching/getMemoryInternals.js
|
|
1263
|
-
var globalCaches = {};
|
|
1264
|
-
function registerGlobalCache(name, getSize) {
|
|
1265
|
-
globalCaches[name] = getSize;
|
|
1266
|
-
}
|
|
1267
|
-
var getApolloClientMemoryInternals = globalThis.__DEV__ !== false ? _getApolloClientMemoryInternals : void 0;
|
|
1268
|
-
var getInMemoryCacheMemoryInternals = globalThis.__DEV__ !== false ? _getInMemoryCacheMemoryInternals : void 0;
|
|
1269
|
-
var getApolloCacheMemoryInternals = globalThis.__DEV__ !== false ? _getApolloCacheMemoryInternals : void 0;
|
|
1270
|
-
function getCurrentCacheSizes() {
|
|
1271
|
-
var defaults = {
|
|
1272
|
-
parser: 1e3,
|
|
1273
|
-
canonicalStringify: 1e3,
|
|
1274
|
-
print: 2e3,
|
|
1275
|
-
"documentTransform.cache": 2e3,
|
|
1276
|
-
"queryManager.getDocumentInfo": 2e3,
|
|
1277
|
-
"PersistedQueryLink.persistedQueryHashes": 2e3,
|
|
1278
|
-
"fragmentRegistry.transform": 2e3,
|
|
1279
|
-
"fragmentRegistry.lookup": 1e3,
|
|
1280
|
-
"fragmentRegistry.findFragmentSpreads": 4e3,
|
|
1281
|
-
"cache.fragmentQueryDocuments": 1e3,
|
|
1282
|
-
"removeTypenameFromVariables.getVariableDefinitions": 2e3,
|
|
1283
|
-
"inMemoryCache.maybeBroadcastWatch": 5e3,
|
|
1284
|
-
"inMemoryCache.executeSelectionSet": 5e4,
|
|
1285
|
-
"inMemoryCache.executeSubSelectedArray": 1e4
|
|
1286
|
-
};
|
|
1287
|
-
return Object.fromEntries(Object.entries(defaults).map(function(_a3) {
|
|
1288
|
-
var k = _a3[0], v = _a3[1];
|
|
1289
|
-
return [
|
|
1290
|
-
k,
|
|
1291
|
-
cacheSizes[k] || v
|
|
1292
|
-
];
|
|
1293
|
-
}));
|
|
1294
|
-
}
|
|
1295
|
-
function _getApolloClientMemoryInternals() {
|
|
1296
|
-
var _a3, _b, _c, _d, _e;
|
|
1297
|
-
if (!(globalThis.__DEV__ !== false))
|
|
1298
|
-
throw new Error("only supported in development mode");
|
|
1299
|
-
return {
|
|
1300
|
-
limits: getCurrentCacheSizes(),
|
|
1301
|
-
sizes: __assign({ print: (_a3 = globalCaches.print) === null || _a3 === void 0 ? void 0 : _a3.call(globalCaches), parser: (_b = globalCaches.parser) === null || _b === void 0 ? void 0 : _b.call(globalCaches), canonicalStringify: (_c = globalCaches.canonicalStringify) === null || _c === void 0 ? void 0 : _c.call(globalCaches), links: linkInfo(this.link), queryManager: {
|
|
1302
|
-
getDocumentInfo: this["queryManager"]["transformCache"].size,
|
|
1303
|
-
documentTransforms: transformInfo(this["queryManager"].documentTransform)
|
|
1304
|
-
} }, (_e = (_d = this.cache).getMemoryInternals) === null || _e === void 0 ? void 0 : _e.call(_d))
|
|
1305
|
-
};
|
|
1306
|
-
}
|
|
1307
|
-
function _getApolloCacheMemoryInternals() {
|
|
1308
|
-
return {
|
|
1309
|
-
cache: {
|
|
1310
|
-
fragmentQueryDocuments: getWrapperInformation(this["getFragmentDoc"])
|
|
1311
|
-
}
|
|
1312
|
-
};
|
|
1313
|
-
}
|
|
1314
|
-
function _getInMemoryCacheMemoryInternals() {
|
|
1315
|
-
var fragments = this.config.fragments;
|
|
1316
|
-
return __assign(__assign({}, _getApolloCacheMemoryInternals.apply(this)), { addTypenameDocumentTransform: transformInfo(this["addTypenameTransform"]), inMemoryCache: {
|
|
1317
|
-
executeSelectionSet: getWrapperInformation(this["storeReader"]["executeSelectionSet"]),
|
|
1318
|
-
executeSubSelectedArray: getWrapperInformation(this["storeReader"]["executeSubSelectedArray"]),
|
|
1319
|
-
maybeBroadcastWatch: getWrapperInformation(this["maybeBroadcastWatch"])
|
|
1320
|
-
}, fragmentRegistry: {
|
|
1321
|
-
findFragmentSpreads: getWrapperInformation(fragments === null || fragments === void 0 ? void 0 : fragments.findFragmentSpreads),
|
|
1322
|
-
lookup: getWrapperInformation(fragments === null || fragments === void 0 ? void 0 : fragments.lookup),
|
|
1323
|
-
transform: getWrapperInformation(fragments === null || fragments === void 0 ? void 0 : fragments.transform)
|
|
1324
|
-
} });
|
|
1325
|
-
}
|
|
1326
|
-
function isWrapper(f) {
|
|
1327
|
-
return !!f && "dirtyKey" in f;
|
|
1328
|
-
}
|
|
1329
|
-
function getWrapperInformation(f) {
|
|
1330
|
-
return isWrapper(f) ? f.size : void 0;
|
|
1331
|
-
}
|
|
1332
|
-
function isDefined(value) {
|
|
1333
|
-
return value != null;
|
|
1334
|
-
}
|
|
1335
|
-
function transformInfo(transform) {
|
|
1336
|
-
return recurseTransformInfo(transform).map(function(cache) {
|
|
1337
|
-
return { cache };
|
|
1338
|
-
});
|
|
1339
|
-
}
|
|
1340
|
-
function recurseTransformInfo(transform) {
|
|
1341
|
-
return transform ? __spreadArray(__spreadArray([
|
|
1342
|
-
getWrapperInformation(transform === null || transform === void 0 ? void 0 : transform["performWork"])
|
|
1343
|
-
], recurseTransformInfo(transform === null || transform === void 0 ? void 0 : transform["left"]), true), recurseTransformInfo(transform === null || transform === void 0 ? void 0 : transform["right"]), true).filter(isDefined) : [];
|
|
1344
|
-
}
|
|
1345
|
-
function linkInfo(link) {
|
|
1346
|
-
var _a3;
|
|
1347
|
-
return link ? __spreadArray(__spreadArray([
|
|
1348
|
-
(_a3 = link === null || link === void 0 ? void 0 : link.getMemoryInternals) === null || _a3 === void 0 ? void 0 : _a3.call(link)
|
|
1349
|
-
], linkInfo(link === null || link === void 0 ? void 0 : link.left), true), linkInfo(link === null || link === void 0 ? void 0 : link.right), true).filter(isDefined) : [];
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
|
-
// ../../node_modules/@apollo/client/utilities/graphql/getFromAST.js
|
|
1353
|
-
function getOperationName(doc) {
|
|
1354
|
-
return doc.definitions.filter(function(definition) {
|
|
1355
|
-
return definition.kind === "OperationDefinition" && !!definition.name;
|
|
1356
|
-
}).map(function(x) {
|
|
1357
|
-
return x.name.value;
|
|
1358
|
-
})[0] || null;
|
|
1359
|
-
}
|
|
1360
|
-
|
|
1361
|
-
// ../../node_modules/optimism/node_modules/@wry/trie/lib/index.js
|
|
1362
|
-
var { forEach, slice } = Array.prototype;
|
|
1363
|
-
var { hasOwnProperty } = Object.prototype;
|
|
1364
|
-
|
|
1365
|
-
// ../../node_modules/@wry/context/lib/slot.js
|
|
1366
|
-
var currentContext = null;
|
|
1367
|
-
var MISSING_VALUE = {};
|
|
1368
|
-
var idCounter = 1;
|
|
1369
|
-
var makeSlotClass = () => class Slot {
|
|
1370
|
-
constructor() {
|
|
1371
|
-
this.id = [
|
|
1372
|
-
"slot",
|
|
1373
|
-
idCounter++,
|
|
1374
|
-
Date.now(),
|
|
1375
|
-
Math.random().toString(36).slice(2)
|
|
1376
|
-
].join(":");
|
|
1377
|
-
}
|
|
1378
|
-
hasValue() {
|
|
1379
|
-
for (let context = currentContext; context; context = context.parent) {
|
|
1380
|
-
if (this.id in context.slots) {
|
|
1381
|
-
const value = context.slots[this.id];
|
|
1382
|
-
if (value === MISSING_VALUE)
|
|
1383
|
-
break;
|
|
1384
|
-
if (context !== currentContext) {
|
|
1385
|
-
currentContext.slots[this.id] = value;
|
|
1386
|
-
}
|
|
1387
|
-
return true;
|
|
1388
|
-
}
|
|
1389
|
-
}
|
|
1390
|
-
if (currentContext) {
|
|
1391
|
-
currentContext.slots[this.id] = MISSING_VALUE;
|
|
1392
|
-
}
|
|
1393
|
-
return false;
|
|
1394
|
-
}
|
|
1395
|
-
getValue() {
|
|
1396
|
-
if (this.hasValue()) {
|
|
1397
|
-
return currentContext.slots[this.id];
|
|
1398
|
-
}
|
|
1399
|
-
}
|
|
1400
|
-
withValue(value, callback, args, thisArg) {
|
|
1401
|
-
const slots = {
|
|
1402
|
-
__proto__: null,
|
|
1403
|
-
[this.id]: value
|
|
1404
|
-
};
|
|
1405
|
-
const parent = currentContext;
|
|
1406
|
-
currentContext = { parent, slots };
|
|
1407
|
-
try {
|
|
1408
|
-
return callback.apply(thisArg, args);
|
|
1409
|
-
} finally {
|
|
1410
|
-
currentContext = parent;
|
|
1411
|
-
}
|
|
1412
|
-
}
|
|
1413
|
-
// Capture the current context and wrap a callback function so that it
|
|
1414
|
-
// reestablishes the captured context when called.
|
|
1415
|
-
static bind(callback) {
|
|
1416
|
-
const context = currentContext;
|
|
1417
|
-
return function() {
|
|
1418
|
-
const saved = currentContext;
|
|
1419
|
-
try {
|
|
1420
|
-
currentContext = context;
|
|
1421
|
-
return callback.apply(this, arguments);
|
|
1422
|
-
} finally {
|
|
1423
|
-
currentContext = saved;
|
|
1424
|
-
}
|
|
1425
|
-
};
|
|
1426
|
-
}
|
|
1427
|
-
// Immediately run a callback function without any captured context.
|
|
1428
|
-
static noContext(callback, args, thisArg) {
|
|
1429
|
-
if (currentContext) {
|
|
1430
|
-
const saved = currentContext;
|
|
1431
|
-
try {
|
|
1432
|
-
currentContext = null;
|
|
1433
|
-
return callback.apply(thisArg, args);
|
|
1434
|
-
} finally {
|
|
1435
|
-
currentContext = saved;
|
|
1436
|
-
}
|
|
1437
|
-
} else {
|
|
1438
|
-
return callback.apply(thisArg, args);
|
|
1439
|
-
}
|
|
1440
|
-
}
|
|
1441
|
-
};
|
|
1442
|
-
function maybe2(fn) {
|
|
1443
|
-
try {
|
|
1444
|
-
return fn();
|
|
1445
|
-
} catch (ignored) {
|
|
1446
|
-
}
|
|
1447
|
-
}
|
|
1448
|
-
var globalKey = "@wry/context:Slot";
|
|
1449
|
-
var host = (
|
|
1450
|
-
// Prefer globalThis when available.
|
|
1451
|
-
// https://github.com/benjamn/wryware/issues/347
|
|
1452
|
-
maybe2(() => globalThis) || // Fall back to global, which works in Node.js and may be converted by some
|
|
1453
|
-
// bundlers to the appropriate identifier (window, self, ...) depending on the
|
|
1454
|
-
// bundling target. https://github.com/endojs/endo/issues/576#issuecomment-1178515224
|
|
1455
|
-
maybe2(() => global) || // Otherwise, use a dummy host that's local to this module. We used to fall
|
|
1456
|
-
// back to using the Array constructor as a namespace, but that was flagged in
|
|
1457
|
-
// https://github.com/benjamn/wryware/issues/347, and can be avoided.
|
|
1458
|
-
/* @__PURE__ */ Object.create(null)
|
|
1459
|
-
);
|
|
1460
|
-
var globalHost = host;
|
|
1461
|
-
var Slot = globalHost[globalKey] || // Earlier versions of this package stored the globalKey property on the Array
|
|
1462
|
-
// constructor, so we check there as well, to prevent Slot class duplication.
|
|
1463
|
-
Array[globalKey] || (function(Slot2) {
|
|
1464
|
-
try {
|
|
1465
|
-
Object.defineProperty(globalHost, globalKey, {
|
|
1466
|
-
value: Slot2,
|
|
1467
|
-
enumerable: false,
|
|
1468
|
-
writable: false,
|
|
1469
|
-
// When it was possible for globalHost to be the Array constructor (a
|
|
1470
|
-
// legacy Slot dedup strategy), it was important for the property to be
|
|
1471
|
-
// configurable:true so it could be deleted. That does not seem to be as
|
|
1472
|
-
// important when globalHost is the global object, but I don't want to
|
|
1473
|
-
// cause similar problems again, and configurable:true seems safest.
|
|
1474
|
-
// https://github.com/endojs/endo/issues/576#issuecomment-1178274008
|
|
1475
|
-
configurable: true
|
|
1476
|
-
});
|
|
1477
|
-
} finally {
|
|
1478
|
-
return Slot2;
|
|
1479
|
-
}
|
|
1480
|
-
})(makeSlotClass());
|
|
1481
|
-
|
|
1482
|
-
// ../../node_modules/@wry/context/lib/index.js
|
|
1483
|
-
var { bind, noContext } = Slot;
|
|
1484
|
-
|
|
1485
|
-
// ../../node_modules/optimism/lib/context.js
|
|
1486
|
-
var parentEntrySlot = new Slot();
|
|
1487
|
-
|
|
1488
|
-
// ../../node_modules/optimism/lib/helpers.js
|
|
1489
|
-
var { hasOwnProperty: hasOwnProperty2 } = Object.prototype;
|
|
1490
|
-
var arrayFromSet = Array.from || function(set) {
|
|
1491
|
-
const array = [];
|
|
1492
|
-
set.forEach((item) => array.push(item));
|
|
1493
|
-
return array;
|
|
1494
|
-
};
|
|
1495
|
-
function maybeUnsubscribe(entryOrDep) {
|
|
1496
|
-
const { unsubscribe } = entryOrDep;
|
|
1497
|
-
if (typeof unsubscribe === "function") {
|
|
1498
|
-
entryOrDep.unsubscribe = void 0;
|
|
1499
|
-
unsubscribe();
|
|
1500
|
-
}
|
|
1501
|
-
}
|
|
1502
|
-
|
|
1503
|
-
// ../../node_modules/optimism/lib/entry.js
|
|
1504
|
-
var emptySetPool = [];
|
|
1505
|
-
var POOL_TARGET_SIZE = 100;
|
|
1506
|
-
function assert(condition, optionalMessage) {
|
|
1507
|
-
if (!condition) {
|
|
1508
|
-
throw new Error(optionalMessage || "assertion failure");
|
|
1509
|
-
}
|
|
1510
|
-
}
|
|
1511
|
-
function valueIs(a, b) {
|
|
1512
|
-
const len = a.length;
|
|
1513
|
-
return (
|
|
1514
|
-
// Unknown values are not equal to each other.
|
|
1515
|
-
len > 0 && // Both values must be ordinary (or both exceptional) to be equal.
|
|
1516
|
-
len === b.length && // The underlying value or exception must be the same.
|
|
1517
|
-
a[len - 1] === b[len - 1]
|
|
1518
|
-
);
|
|
1519
|
-
}
|
|
1520
|
-
function valueGet(value) {
|
|
1521
|
-
switch (value.length) {
|
|
1522
|
-
case 0:
|
|
1523
|
-
throw new Error("unknown value");
|
|
1524
|
-
case 1:
|
|
1525
|
-
return value[0];
|
|
1526
|
-
case 2:
|
|
1527
|
-
throw value[1];
|
|
1528
|
-
}
|
|
1529
|
-
}
|
|
1530
|
-
function valueCopy(value) {
|
|
1531
|
-
return value.slice(0);
|
|
1532
|
-
}
|
|
1533
|
-
var Entry = class _Entry {
|
|
1534
|
-
constructor(fn) {
|
|
1535
|
-
this.fn = fn;
|
|
1536
|
-
this.parents = /* @__PURE__ */ new Set();
|
|
1537
|
-
this.childValues = /* @__PURE__ */ new Map();
|
|
1538
|
-
this.dirtyChildren = null;
|
|
1539
|
-
this.dirty = true;
|
|
1540
|
-
this.recomputing = false;
|
|
1541
|
-
this.value = [];
|
|
1542
|
-
this.deps = null;
|
|
1543
|
-
++_Entry.count;
|
|
1544
|
-
}
|
|
1545
|
-
peek() {
|
|
1546
|
-
if (this.value.length === 1 && !mightBeDirty(this)) {
|
|
1547
|
-
rememberParent(this);
|
|
1548
|
-
return this.value[0];
|
|
1549
|
-
}
|
|
1550
|
-
}
|
|
1551
|
-
// This is the most important method of the Entry API, because it
|
|
1552
|
-
// determines whether the cached this.value can be returned immediately,
|
|
1553
|
-
// or must be recomputed. The overall performance of the caching system
|
|
1554
|
-
// depends on the truth of the following observations: (1) this.dirty is
|
|
1555
|
-
// usually false, (2) this.dirtyChildren is usually null/empty, and thus
|
|
1556
|
-
// (3) valueGet(this.value) is usually returned without recomputation.
|
|
1557
|
-
recompute(args) {
|
|
1558
|
-
assert(!this.recomputing, "already recomputing");
|
|
1559
|
-
rememberParent(this);
|
|
1560
|
-
return mightBeDirty(this) ? reallyRecompute(this, args) : valueGet(this.value);
|
|
1561
|
-
}
|
|
1562
|
-
setDirty() {
|
|
1563
|
-
if (this.dirty)
|
|
1564
|
-
return;
|
|
1565
|
-
this.dirty = true;
|
|
1566
|
-
reportDirty(this);
|
|
1567
|
-
maybeUnsubscribe(this);
|
|
1568
|
-
}
|
|
1569
|
-
dispose() {
|
|
1570
|
-
this.setDirty();
|
|
1571
|
-
forgetChildren(this);
|
|
1572
|
-
eachParent(this, (parent, child) => {
|
|
1573
|
-
parent.setDirty();
|
|
1574
|
-
forgetChild(parent, this);
|
|
1575
|
-
});
|
|
1576
|
-
}
|
|
1577
|
-
forget() {
|
|
1578
|
-
this.dispose();
|
|
1579
|
-
}
|
|
1580
|
-
dependOn(dep2) {
|
|
1581
|
-
dep2.add(this);
|
|
1582
|
-
if (!this.deps) {
|
|
1583
|
-
this.deps = emptySetPool.pop() || /* @__PURE__ */ new Set();
|
|
1584
|
-
}
|
|
1585
|
-
this.deps.add(dep2);
|
|
1586
|
-
}
|
|
1587
|
-
forgetDeps() {
|
|
1588
|
-
if (this.deps) {
|
|
1589
|
-
arrayFromSet(this.deps).forEach((dep2) => dep2.delete(this));
|
|
1590
|
-
this.deps.clear();
|
|
1591
|
-
emptySetPool.push(this.deps);
|
|
1592
|
-
this.deps = null;
|
|
1593
|
-
}
|
|
1594
|
-
}
|
|
1595
|
-
};
|
|
1596
|
-
Entry.count = 0;
|
|
1597
|
-
function rememberParent(child) {
|
|
1598
|
-
const parent = parentEntrySlot.getValue();
|
|
1599
|
-
if (parent) {
|
|
1600
|
-
child.parents.add(parent);
|
|
1601
|
-
if (!parent.childValues.has(child)) {
|
|
1602
|
-
parent.childValues.set(child, []);
|
|
1603
|
-
}
|
|
1604
|
-
if (mightBeDirty(child)) {
|
|
1605
|
-
reportDirtyChild(parent, child);
|
|
1606
|
-
} else {
|
|
1607
|
-
reportCleanChild(parent, child);
|
|
1608
|
-
}
|
|
1609
|
-
return parent;
|
|
1610
|
-
}
|
|
1611
|
-
}
|
|
1612
|
-
function reallyRecompute(entry, args) {
|
|
1613
|
-
forgetChildren(entry);
|
|
1614
|
-
parentEntrySlot.withValue(entry, recomputeNewValue, [entry, args]);
|
|
1615
|
-
if (maybeSubscribe(entry, args)) {
|
|
1616
|
-
setClean(entry);
|
|
1617
|
-
}
|
|
1618
|
-
return valueGet(entry.value);
|
|
1619
|
-
}
|
|
1620
|
-
function recomputeNewValue(entry, args) {
|
|
1621
|
-
entry.recomputing = true;
|
|
1622
|
-
const { normalizeResult } = entry;
|
|
1623
|
-
let oldValueCopy;
|
|
1624
|
-
if (normalizeResult && entry.value.length === 1) {
|
|
1625
|
-
oldValueCopy = valueCopy(entry.value);
|
|
1626
|
-
}
|
|
1627
|
-
entry.value.length = 0;
|
|
1628
|
-
try {
|
|
1629
|
-
entry.value[0] = entry.fn.apply(null, args);
|
|
1630
|
-
if (normalizeResult && oldValueCopy && !valueIs(oldValueCopy, entry.value)) {
|
|
1631
|
-
try {
|
|
1632
|
-
entry.value[0] = normalizeResult(entry.value[0], oldValueCopy[0]);
|
|
1633
|
-
} catch (_a3) {
|
|
1634
|
-
}
|
|
1635
|
-
}
|
|
1636
|
-
} catch (e) {
|
|
1637
|
-
entry.value[1] = e;
|
|
1638
|
-
}
|
|
1639
|
-
entry.recomputing = false;
|
|
1640
|
-
}
|
|
1641
|
-
function mightBeDirty(entry) {
|
|
1642
|
-
return entry.dirty || !!(entry.dirtyChildren && entry.dirtyChildren.size);
|
|
1643
|
-
}
|
|
1644
|
-
function setClean(entry) {
|
|
1645
|
-
entry.dirty = false;
|
|
1646
|
-
if (mightBeDirty(entry)) {
|
|
1647
|
-
return;
|
|
1648
|
-
}
|
|
1649
|
-
reportClean(entry);
|
|
1650
|
-
}
|
|
1651
|
-
function reportDirty(child) {
|
|
1652
|
-
eachParent(child, reportDirtyChild);
|
|
1653
|
-
}
|
|
1654
|
-
function reportClean(child) {
|
|
1655
|
-
eachParent(child, reportCleanChild);
|
|
1656
|
-
}
|
|
1657
|
-
function eachParent(child, callback) {
|
|
1658
|
-
const parentCount = child.parents.size;
|
|
1659
|
-
if (parentCount) {
|
|
1660
|
-
const parents = arrayFromSet(child.parents);
|
|
1661
|
-
for (let i = 0; i < parentCount; ++i) {
|
|
1662
|
-
callback(parents[i], child);
|
|
1663
|
-
}
|
|
1664
|
-
}
|
|
1665
|
-
}
|
|
1666
|
-
function reportDirtyChild(parent, child) {
|
|
1667
|
-
assert(parent.childValues.has(child));
|
|
1668
|
-
assert(mightBeDirty(child));
|
|
1669
|
-
const parentWasClean = !mightBeDirty(parent);
|
|
1670
|
-
if (!parent.dirtyChildren) {
|
|
1671
|
-
parent.dirtyChildren = emptySetPool.pop() || /* @__PURE__ */ new Set();
|
|
1672
|
-
} else if (parent.dirtyChildren.has(child)) {
|
|
1673
|
-
return;
|
|
1674
|
-
}
|
|
1675
|
-
parent.dirtyChildren.add(child);
|
|
1676
|
-
if (parentWasClean) {
|
|
1677
|
-
reportDirty(parent);
|
|
1678
|
-
}
|
|
1679
|
-
}
|
|
1680
|
-
function reportCleanChild(parent, child) {
|
|
1681
|
-
assert(parent.childValues.has(child));
|
|
1682
|
-
assert(!mightBeDirty(child));
|
|
1683
|
-
const childValue = parent.childValues.get(child);
|
|
1684
|
-
if (childValue.length === 0) {
|
|
1685
|
-
parent.childValues.set(child, valueCopy(child.value));
|
|
1686
|
-
} else if (!valueIs(childValue, child.value)) {
|
|
1687
|
-
parent.setDirty();
|
|
1688
|
-
}
|
|
1689
|
-
removeDirtyChild(parent, child);
|
|
1690
|
-
if (mightBeDirty(parent)) {
|
|
1691
|
-
return;
|
|
1692
|
-
}
|
|
1693
|
-
reportClean(parent);
|
|
1694
|
-
}
|
|
1695
|
-
function removeDirtyChild(parent, child) {
|
|
1696
|
-
const dc = parent.dirtyChildren;
|
|
1697
|
-
if (dc) {
|
|
1698
|
-
dc.delete(child);
|
|
1699
|
-
if (dc.size === 0) {
|
|
1700
|
-
if (emptySetPool.length < POOL_TARGET_SIZE) {
|
|
1701
|
-
emptySetPool.push(dc);
|
|
1702
|
-
}
|
|
1703
|
-
parent.dirtyChildren = null;
|
|
1704
|
-
}
|
|
1705
|
-
}
|
|
1706
|
-
}
|
|
1707
|
-
function forgetChildren(parent) {
|
|
1708
|
-
if (parent.childValues.size > 0) {
|
|
1709
|
-
parent.childValues.forEach((_value, child) => {
|
|
1710
|
-
forgetChild(parent, child);
|
|
1711
|
-
});
|
|
1712
|
-
}
|
|
1713
|
-
parent.forgetDeps();
|
|
1714
|
-
assert(parent.dirtyChildren === null);
|
|
1715
|
-
}
|
|
1716
|
-
function forgetChild(parent, child) {
|
|
1717
|
-
child.parents.delete(parent);
|
|
1718
|
-
parent.childValues.delete(child);
|
|
1719
|
-
removeDirtyChild(parent, child);
|
|
1720
|
-
}
|
|
1721
|
-
function maybeSubscribe(entry, args) {
|
|
1722
|
-
if (typeof entry.subscribe === "function") {
|
|
1723
|
-
try {
|
|
1724
|
-
maybeUnsubscribe(entry);
|
|
1725
|
-
entry.unsubscribe = entry.subscribe.apply(null, args);
|
|
1726
|
-
} catch (e) {
|
|
1727
|
-
entry.setDirty();
|
|
1728
|
-
return false;
|
|
1729
|
-
}
|
|
1730
|
-
}
|
|
1731
|
-
return true;
|
|
1732
|
-
}
|
|
1733
|
-
|
|
1734
|
-
// ../../node_modules/@apollo/client/utilities/graphql/print.js
|
|
1735
|
-
var printCache;
|
|
1736
|
-
var print2 = Object.assign(function(ast) {
|
|
1737
|
-
var result2 = printCache.get(ast);
|
|
1738
|
-
if (!result2) {
|
|
1739
|
-
result2 = print(ast);
|
|
1740
|
-
printCache.set(ast, result2);
|
|
1741
|
-
}
|
|
1742
|
-
return result2;
|
|
1743
|
-
}, {
|
|
1744
|
-
reset: function() {
|
|
1745
|
-
printCache = new AutoCleanedWeakCache(
|
|
1746
|
-
cacheSizes.print || 2e3
|
|
1747
|
-
/* defaultCacheSizes.print */
|
|
1748
|
-
);
|
|
1749
|
-
}
|
|
1750
|
-
});
|
|
1751
|
-
print2.reset();
|
|
1752
|
-
if (globalThis.__DEV__ !== false) {
|
|
1753
|
-
registerGlobalCache("print", function() {
|
|
1754
|
-
return printCache ? printCache.size : 0;
|
|
1755
|
-
});
|
|
1756
|
-
}
|
|
1757
|
-
|
|
1758
|
-
// ../../node_modules/zen-observable-ts/module.js
|
|
1759
|
-
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
|
1760
|
-
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
|
1761
|
-
if (it) return (it = it.call(o)).next.bind(it);
|
|
1762
|
-
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
|
1763
|
-
if (it) o = it;
|
|
1764
|
-
var i = 0;
|
|
1765
|
-
return function() {
|
|
1766
|
-
if (i >= o.length) return { done: true };
|
|
1767
|
-
return { done: false, value: o[i++] };
|
|
1768
|
-
};
|
|
1769
|
-
}
|
|
1770
|
-
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1771
|
-
}
|
|
1772
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
1773
|
-
if (!o) return;
|
|
1774
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
1775
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1776
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1777
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
1778
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
1779
|
-
}
|
|
1780
|
-
function _arrayLikeToArray(arr, len) {
|
|
1781
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
1782
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
1783
|
-
arr2[i] = arr[i];
|
|
1784
|
-
}
|
|
1785
|
-
return arr2;
|
|
1786
|
-
}
|
|
1787
|
-
function _defineProperties(target, props) {
|
|
1788
|
-
for (var i = 0; i < props.length; i++) {
|
|
1789
|
-
var descriptor = props[i];
|
|
1790
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
1791
|
-
descriptor.configurable = true;
|
|
1792
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
1793
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
1794
|
-
}
|
|
1795
|
-
}
|
|
1796
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
1797
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
1798
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
1799
|
-
Object.defineProperty(Constructor, "prototype", { writable: false });
|
|
1800
|
-
return Constructor;
|
|
1801
|
-
}
|
|
1802
|
-
var hasSymbols = function() {
|
|
1803
|
-
return typeof Symbol === "function";
|
|
1804
|
-
};
|
|
1805
|
-
var hasSymbol = function(name) {
|
|
1806
|
-
return hasSymbols() && Boolean(Symbol[name]);
|
|
1807
|
-
};
|
|
1808
|
-
var getSymbol = function(name) {
|
|
1809
|
-
return hasSymbol(name) ? Symbol[name] : "@@" + name;
|
|
1810
|
-
};
|
|
1811
|
-
if (hasSymbols() && !hasSymbol("observable")) {
|
|
1812
|
-
Symbol.observable = /* @__PURE__ */ Symbol("observable");
|
|
1813
|
-
}
|
|
1814
|
-
var SymbolIterator = getSymbol("iterator");
|
|
1815
|
-
var SymbolObservable = getSymbol("observable");
|
|
1816
|
-
var SymbolSpecies = getSymbol("species");
|
|
1817
|
-
function getMethod(obj, key) {
|
|
1818
|
-
var value = obj[key];
|
|
1819
|
-
if (value == null) return void 0;
|
|
1820
|
-
if (typeof value !== "function") throw new TypeError(value + " is not a function");
|
|
1821
|
-
return value;
|
|
1822
|
-
}
|
|
1823
|
-
function getSpecies(obj) {
|
|
1824
|
-
var ctor = obj.constructor;
|
|
1825
|
-
if (ctor !== void 0) {
|
|
1826
|
-
ctor = ctor[SymbolSpecies];
|
|
1827
|
-
if (ctor === null) {
|
|
1828
|
-
ctor = void 0;
|
|
1829
|
-
}
|
|
1830
|
-
}
|
|
1831
|
-
return ctor !== void 0 ? ctor : Observable;
|
|
1832
|
-
}
|
|
1833
|
-
function isObservable(x) {
|
|
1834
|
-
return x instanceof Observable;
|
|
1835
|
-
}
|
|
1836
|
-
function hostReportError(e) {
|
|
1837
|
-
if (hostReportError.log) {
|
|
1838
|
-
hostReportError.log(e);
|
|
1839
|
-
} else {
|
|
1840
|
-
setTimeout(function() {
|
|
1841
|
-
throw e;
|
|
1842
|
-
});
|
|
1843
|
-
}
|
|
1844
|
-
}
|
|
1845
|
-
function enqueue(fn) {
|
|
1846
|
-
Promise.resolve().then(function() {
|
|
1847
|
-
try {
|
|
1848
|
-
fn();
|
|
1849
|
-
} catch (e) {
|
|
1850
|
-
hostReportError(e);
|
|
1851
|
-
}
|
|
1852
|
-
});
|
|
1853
|
-
}
|
|
1854
|
-
function cleanupSubscription(subscription) {
|
|
1855
|
-
var cleanup = subscription._cleanup;
|
|
1856
|
-
if (cleanup === void 0) return;
|
|
1857
|
-
subscription._cleanup = void 0;
|
|
1858
|
-
if (!cleanup) {
|
|
1859
|
-
return;
|
|
1860
|
-
}
|
|
1861
|
-
try {
|
|
1862
|
-
if (typeof cleanup === "function") {
|
|
1863
|
-
cleanup();
|
|
1864
|
-
} else {
|
|
1865
|
-
var unsubscribe = getMethod(cleanup, "unsubscribe");
|
|
1866
|
-
if (unsubscribe) {
|
|
1867
|
-
unsubscribe.call(cleanup);
|
|
1868
|
-
}
|
|
1869
|
-
}
|
|
1870
|
-
} catch (e) {
|
|
1871
|
-
hostReportError(e);
|
|
1872
|
-
}
|
|
1873
|
-
}
|
|
1874
|
-
function closeSubscription(subscription) {
|
|
1875
|
-
subscription._observer = void 0;
|
|
1876
|
-
subscription._queue = void 0;
|
|
1877
|
-
subscription._state = "closed";
|
|
1878
|
-
}
|
|
1879
|
-
function flushSubscription(subscription) {
|
|
1880
|
-
var queue = subscription._queue;
|
|
1881
|
-
if (!queue) {
|
|
1882
|
-
return;
|
|
1883
|
-
}
|
|
1884
|
-
subscription._queue = void 0;
|
|
1885
|
-
subscription._state = "ready";
|
|
1886
|
-
for (var i = 0; i < queue.length; ++i) {
|
|
1887
|
-
notifySubscription(subscription, queue[i].type, queue[i].value);
|
|
1888
|
-
if (subscription._state === "closed") break;
|
|
1889
|
-
}
|
|
1890
|
-
}
|
|
1891
|
-
function notifySubscription(subscription, type, value) {
|
|
1892
|
-
subscription._state = "running";
|
|
1893
|
-
var observer = subscription._observer;
|
|
1894
|
-
try {
|
|
1895
|
-
var m = getMethod(observer, type);
|
|
1896
|
-
switch (type) {
|
|
1897
|
-
case "next":
|
|
1898
|
-
if (m) m.call(observer, value);
|
|
1899
|
-
break;
|
|
1900
|
-
case "error":
|
|
1901
|
-
closeSubscription(subscription);
|
|
1902
|
-
if (m) m.call(observer, value);
|
|
1903
|
-
else throw value;
|
|
1904
|
-
break;
|
|
1905
|
-
case "complete":
|
|
1906
|
-
closeSubscription(subscription);
|
|
1907
|
-
if (m) m.call(observer);
|
|
1908
|
-
break;
|
|
1909
|
-
}
|
|
1910
|
-
} catch (e) {
|
|
1911
|
-
hostReportError(e);
|
|
1912
|
-
}
|
|
1913
|
-
if (subscription._state === "closed") cleanupSubscription(subscription);
|
|
1914
|
-
else if (subscription._state === "running") subscription._state = "ready";
|
|
1915
|
-
}
|
|
1916
|
-
function onNotify(subscription, type, value) {
|
|
1917
|
-
if (subscription._state === "closed") return;
|
|
1918
|
-
if (subscription._state === "buffering") {
|
|
1919
|
-
subscription._queue.push({
|
|
1920
|
-
type,
|
|
1921
|
-
value
|
|
1922
|
-
});
|
|
1923
|
-
return;
|
|
1924
|
-
}
|
|
1925
|
-
if (subscription._state !== "ready") {
|
|
1926
|
-
subscription._state = "buffering";
|
|
1927
|
-
subscription._queue = [{
|
|
1928
|
-
type,
|
|
1929
|
-
value
|
|
1930
|
-
}];
|
|
1931
|
-
enqueue(function() {
|
|
1932
|
-
return flushSubscription(subscription);
|
|
1933
|
-
});
|
|
1934
|
-
return;
|
|
1935
|
-
}
|
|
1936
|
-
notifySubscription(subscription, type, value);
|
|
1937
|
-
}
|
|
1938
|
-
var Subscription = /* @__PURE__ */ (function() {
|
|
1939
|
-
function Subscription2(observer, subscriber) {
|
|
1940
|
-
this._cleanup = void 0;
|
|
1941
|
-
this._observer = observer;
|
|
1942
|
-
this._queue = void 0;
|
|
1943
|
-
this._state = "initializing";
|
|
1944
|
-
var subscriptionObserver = new SubscriptionObserver(this);
|
|
1945
|
-
try {
|
|
1946
|
-
this._cleanup = subscriber.call(void 0, subscriptionObserver);
|
|
1947
|
-
} catch (e) {
|
|
1948
|
-
subscriptionObserver.error(e);
|
|
1949
|
-
}
|
|
1950
|
-
if (this._state === "initializing") this._state = "ready";
|
|
1951
|
-
}
|
|
1952
|
-
var _proto = Subscription2.prototype;
|
|
1953
|
-
_proto.unsubscribe = function unsubscribe() {
|
|
1954
|
-
if (this._state !== "closed") {
|
|
1955
|
-
closeSubscription(this);
|
|
1956
|
-
cleanupSubscription(this);
|
|
1957
|
-
}
|
|
1958
|
-
};
|
|
1959
|
-
_createClass(Subscription2, [{
|
|
1960
|
-
key: "closed",
|
|
1961
|
-
get: function() {
|
|
1962
|
-
return this._state === "closed";
|
|
1963
|
-
}
|
|
1964
|
-
}]);
|
|
1965
|
-
return Subscription2;
|
|
1966
|
-
})();
|
|
1967
|
-
var SubscriptionObserver = /* @__PURE__ */ (function() {
|
|
1968
|
-
function SubscriptionObserver2(subscription) {
|
|
1969
|
-
this._subscription = subscription;
|
|
1970
|
-
}
|
|
1971
|
-
var _proto2 = SubscriptionObserver2.prototype;
|
|
1972
|
-
_proto2.next = function next(value) {
|
|
1973
|
-
onNotify(this._subscription, "next", value);
|
|
1974
|
-
};
|
|
1975
|
-
_proto2.error = function error(value) {
|
|
1976
|
-
onNotify(this._subscription, "error", value);
|
|
1977
|
-
};
|
|
1978
|
-
_proto2.complete = function complete() {
|
|
1979
|
-
onNotify(this._subscription, "complete");
|
|
1980
|
-
};
|
|
1981
|
-
_createClass(SubscriptionObserver2, [{
|
|
1982
|
-
key: "closed",
|
|
1983
|
-
get: function() {
|
|
1984
|
-
return this._subscription._state === "closed";
|
|
1985
|
-
}
|
|
1986
|
-
}]);
|
|
1987
|
-
return SubscriptionObserver2;
|
|
1988
|
-
})();
|
|
1989
|
-
var Observable = /* @__PURE__ */ (function() {
|
|
1990
|
-
function Observable2(subscriber) {
|
|
1991
|
-
if (!(this instanceof Observable2)) throw new TypeError("Observable cannot be called as a function");
|
|
1992
|
-
if (typeof subscriber !== "function") throw new TypeError("Observable initializer must be a function");
|
|
1993
|
-
this._subscriber = subscriber;
|
|
1994
|
-
}
|
|
1995
|
-
var _proto3 = Observable2.prototype;
|
|
1996
|
-
_proto3.subscribe = function subscribe(observer) {
|
|
1997
|
-
if (typeof observer !== "object" || observer === null) {
|
|
1998
|
-
observer = {
|
|
1999
|
-
next: observer,
|
|
2000
|
-
error: arguments[1],
|
|
2001
|
-
complete: arguments[2]
|
|
2002
|
-
};
|
|
2003
|
-
}
|
|
2004
|
-
return new Subscription(observer, this._subscriber);
|
|
2005
|
-
};
|
|
2006
|
-
_proto3.forEach = function forEach2(fn) {
|
|
2007
|
-
var _this = this;
|
|
2008
|
-
return new Promise(function(resolve, reject) {
|
|
2009
|
-
if (typeof fn !== "function") {
|
|
2010
|
-
reject(new TypeError(fn + " is not a function"));
|
|
2011
|
-
return;
|
|
2012
|
-
}
|
|
2013
|
-
function done() {
|
|
2014
|
-
subscription.unsubscribe();
|
|
2015
|
-
resolve();
|
|
2016
|
-
}
|
|
2017
|
-
var subscription = _this.subscribe({
|
|
2018
|
-
next: function(value) {
|
|
2019
|
-
try {
|
|
2020
|
-
fn(value, done);
|
|
2021
|
-
} catch (e) {
|
|
2022
|
-
reject(e);
|
|
2023
|
-
subscription.unsubscribe();
|
|
2024
|
-
}
|
|
2025
|
-
},
|
|
2026
|
-
error: reject,
|
|
2027
|
-
complete: resolve
|
|
2028
|
-
});
|
|
2029
|
-
});
|
|
2030
|
-
};
|
|
2031
|
-
_proto3.map = function map(fn) {
|
|
2032
|
-
var _this2 = this;
|
|
2033
|
-
if (typeof fn !== "function") throw new TypeError(fn + " is not a function");
|
|
2034
|
-
var C = getSpecies(this);
|
|
2035
|
-
return new C(function(observer) {
|
|
2036
|
-
return _this2.subscribe({
|
|
2037
|
-
next: function(value) {
|
|
2038
|
-
try {
|
|
2039
|
-
value = fn(value);
|
|
2040
|
-
} catch (e) {
|
|
2041
|
-
return observer.error(e);
|
|
2042
|
-
}
|
|
2043
|
-
observer.next(value);
|
|
2044
|
-
},
|
|
2045
|
-
error: function(e) {
|
|
2046
|
-
observer.error(e);
|
|
2047
|
-
},
|
|
2048
|
-
complete: function() {
|
|
2049
|
-
observer.complete();
|
|
2050
|
-
}
|
|
2051
|
-
});
|
|
2052
|
-
});
|
|
2053
|
-
};
|
|
2054
|
-
_proto3.filter = function filter(fn) {
|
|
2055
|
-
var _this3 = this;
|
|
2056
|
-
if (typeof fn !== "function") throw new TypeError(fn + " is not a function");
|
|
2057
|
-
var C = getSpecies(this);
|
|
2058
|
-
return new C(function(observer) {
|
|
2059
|
-
return _this3.subscribe({
|
|
2060
|
-
next: function(value) {
|
|
2061
|
-
try {
|
|
2062
|
-
if (!fn(value)) return;
|
|
2063
|
-
} catch (e) {
|
|
2064
|
-
return observer.error(e);
|
|
2065
|
-
}
|
|
2066
|
-
observer.next(value);
|
|
2067
|
-
},
|
|
2068
|
-
error: function(e) {
|
|
2069
|
-
observer.error(e);
|
|
2070
|
-
},
|
|
2071
|
-
complete: function() {
|
|
2072
|
-
observer.complete();
|
|
2073
|
-
}
|
|
2074
|
-
});
|
|
2075
|
-
});
|
|
2076
|
-
};
|
|
2077
|
-
_proto3.reduce = function reduce(fn) {
|
|
2078
|
-
var _this4 = this;
|
|
2079
|
-
if (typeof fn !== "function") throw new TypeError(fn + " is not a function");
|
|
2080
|
-
var C = getSpecies(this);
|
|
2081
|
-
var hasSeed = arguments.length > 1;
|
|
2082
|
-
var hasValue = false;
|
|
2083
|
-
var seed = arguments[1];
|
|
2084
|
-
var acc = seed;
|
|
2085
|
-
return new C(function(observer) {
|
|
2086
|
-
return _this4.subscribe({
|
|
2087
|
-
next: function(value) {
|
|
2088
|
-
var first = !hasValue;
|
|
2089
|
-
hasValue = true;
|
|
2090
|
-
if (!first || hasSeed) {
|
|
2091
|
-
try {
|
|
2092
|
-
acc = fn(acc, value);
|
|
2093
|
-
} catch (e) {
|
|
2094
|
-
return observer.error(e);
|
|
2095
|
-
}
|
|
2096
|
-
} else {
|
|
2097
|
-
acc = value;
|
|
2098
|
-
}
|
|
2099
|
-
},
|
|
2100
|
-
error: function(e) {
|
|
2101
|
-
observer.error(e);
|
|
2102
|
-
},
|
|
2103
|
-
complete: function() {
|
|
2104
|
-
if (!hasValue && !hasSeed) return observer.error(new TypeError("Cannot reduce an empty sequence"));
|
|
2105
|
-
observer.next(acc);
|
|
2106
|
-
observer.complete();
|
|
2107
|
-
}
|
|
2108
|
-
});
|
|
2109
|
-
});
|
|
2110
|
-
};
|
|
2111
|
-
_proto3.concat = function concat() {
|
|
2112
|
-
var _this5 = this;
|
|
2113
|
-
for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
2114
|
-
sources[_key] = arguments[_key];
|
|
2115
|
-
}
|
|
2116
|
-
var C = getSpecies(this);
|
|
2117
|
-
return new C(function(observer) {
|
|
2118
|
-
var subscription;
|
|
2119
|
-
var index = 0;
|
|
2120
|
-
function startNext(next) {
|
|
2121
|
-
subscription = next.subscribe({
|
|
2122
|
-
next: function(v) {
|
|
2123
|
-
observer.next(v);
|
|
2124
|
-
},
|
|
2125
|
-
error: function(e) {
|
|
2126
|
-
observer.error(e);
|
|
2127
|
-
},
|
|
2128
|
-
complete: function() {
|
|
2129
|
-
if (index === sources.length) {
|
|
2130
|
-
subscription = void 0;
|
|
2131
|
-
observer.complete();
|
|
2132
|
-
} else {
|
|
2133
|
-
startNext(C.from(sources[index++]));
|
|
2134
|
-
}
|
|
2135
|
-
}
|
|
2136
|
-
});
|
|
2137
|
-
}
|
|
2138
|
-
startNext(_this5);
|
|
2139
|
-
return function() {
|
|
2140
|
-
if (subscription) {
|
|
2141
|
-
subscription.unsubscribe();
|
|
2142
|
-
subscription = void 0;
|
|
2143
|
-
}
|
|
2144
|
-
};
|
|
2145
|
-
});
|
|
2146
|
-
};
|
|
2147
|
-
_proto3.flatMap = function flatMap(fn) {
|
|
2148
|
-
var _this6 = this;
|
|
2149
|
-
if (typeof fn !== "function") throw new TypeError(fn + " is not a function");
|
|
2150
|
-
var C = getSpecies(this);
|
|
2151
|
-
return new C(function(observer) {
|
|
2152
|
-
var subscriptions = [];
|
|
2153
|
-
var outer = _this6.subscribe({
|
|
2154
|
-
next: function(value) {
|
|
2155
|
-
if (fn) {
|
|
2156
|
-
try {
|
|
2157
|
-
value = fn(value);
|
|
2158
|
-
} catch (e) {
|
|
2159
|
-
return observer.error(e);
|
|
2160
|
-
}
|
|
2161
|
-
}
|
|
2162
|
-
var inner = C.from(value).subscribe({
|
|
2163
|
-
next: function(value2) {
|
|
2164
|
-
observer.next(value2);
|
|
2165
|
-
},
|
|
2166
|
-
error: function(e) {
|
|
2167
|
-
observer.error(e);
|
|
2168
|
-
},
|
|
2169
|
-
complete: function() {
|
|
2170
|
-
var i = subscriptions.indexOf(inner);
|
|
2171
|
-
if (i >= 0) subscriptions.splice(i, 1);
|
|
2172
|
-
completeIfDone();
|
|
2173
|
-
}
|
|
2174
|
-
});
|
|
2175
|
-
subscriptions.push(inner);
|
|
2176
|
-
},
|
|
2177
|
-
error: function(e) {
|
|
2178
|
-
observer.error(e);
|
|
2179
|
-
},
|
|
2180
|
-
complete: function() {
|
|
2181
|
-
completeIfDone();
|
|
2182
|
-
}
|
|
2183
|
-
});
|
|
2184
|
-
function completeIfDone() {
|
|
2185
|
-
if (outer.closed && subscriptions.length === 0) observer.complete();
|
|
2186
|
-
}
|
|
2187
|
-
return function() {
|
|
2188
|
-
subscriptions.forEach(function(s) {
|
|
2189
|
-
return s.unsubscribe();
|
|
2190
|
-
});
|
|
2191
|
-
outer.unsubscribe();
|
|
2192
|
-
};
|
|
2193
|
-
});
|
|
2194
|
-
};
|
|
2195
|
-
_proto3[SymbolObservable] = function() {
|
|
2196
|
-
return this;
|
|
2197
|
-
};
|
|
2198
|
-
Observable2.from = function from(x) {
|
|
2199
|
-
var C = typeof this === "function" ? this : Observable2;
|
|
2200
|
-
if (x == null) throw new TypeError(x + " is not an object");
|
|
2201
|
-
var method = getMethod(x, SymbolObservable);
|
|
2202
|
-
if (method) {
|
|
2203
|
-
var observable = method.call(x);
|
|
2204
|
-
if (Object(observable) !== observable) throw new TypeError(observable + " is not an object");
|
|
2205
|
-
if (isObservable(observable) && observable.constructor === C) return observable;
|
|
2206
|
-
return new C(function(observer) {
|
|
2207
|
-
return observable.subscribe(observer);
|
|
2208
|
-
});
|
|
2209
|
-
}
|
|
2210
|
-
if (hasSymbol("iterator")) {
|
|
2211
|
-
method = getMethod(x, SymbolIterator);
|
|
2212
|
-
if (method) {
|
|
2213
|
-
return new C(function(observer) {
|
|
2214
|
-
enqueue(function() {
|
|
2215
|
-
if (observer.closed) return;
|
|
2216
|
-
for (var _iterator = _createForOfIteratorHelperLoose(method.call(x)), _step; !(_step = _iterator()).done; ) {
|
|
2217
|
-
var item = _step.value;
|
|
2218
|
-
observer.next(item);
|
|
2219
|
-
if (observer.closed) return;
|
|
2220
|
-
}
|
|
2221
|
-
observer.complete();
|
|
2222
|
-
});
|
|
2223
|
-
});
|
|
2224
|
-
}
|
|
2225
|
-
}
|
|
2226
|
-
if (Array.isArray(x)) {
|
|
2227
|
-
return new C(function(observer) {
|
|
2228
|
-
enqueue(function() {
|
|
2229
|
-
if (observer.closed) return;
|
|
2230
|
-
for (var i = 0; i < x.length; ++i) {
|
|
2231
|
-
observer.next(x[i]);
|
|
2232
|
-
if (observer.closed) return;
|
|
2233
|
-
}
|
|
2234
|
-
observer.complete();
|
|
2235
|
-
});
|
|
2236
|
-
});
|
|
2237
|
-
}
|
|
2238
|
-
throw new TypeError(x + " is not observable");
|
|
2239
|
-
};
|
|
2240
|
-
Observable2.of = function of() {
|
|
2241
|
-
for (var _len2 = arguments.length, items = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
2242
|
-
items[_key2] = arguments[_key2];
|
|
1802
|
+
if (key)
|
|
1803
|
+
this.map.delete(key);
|
|
1804
|
+
}
|
|
1805
|
+
delete(key) {
|
|
1806
|
+
const node = this.map.get(key);
|
|
1807
|
+
if (node) {
|
|
1808
|
+
this.deleteNode(node);
|
|
1809
|
+
return true;
|
|
2243
1810
|
}
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
}
|
|
2252
|
-
observer.complete();
|
|
2253
|
-
});
|
|
2254
|
-
});
|
|
2255
|
-
};
|
|
2256
|
-
_createClass(Observable2, null, [{
|
|
2257
|
-
key: SymbolSpecies,
|
|
2258
|
-
get: function() {
|
|
2259
|
-
return this;
|
|
1811
|
+
return false;
|
|
1812
|
+
}
|
|
1813
|
+
scheduleFinalization(node) {
|
|
1814
|
+
this.unfinalizedNodes.add(node);
|
|
1815
|
+
if (!this.finalizationScheduled) {
|
|
1816
|
+
this.finalizationScheduled = true;
|
|
1817
|
+
queueMicrotask(this.finalize);
|
|
2260
1818
|
}
|
|
2261
|
-
}
|
|
2262
|
-
|
|
2263
|
-
})();
|
|
2264
|
-
if (hasSymbols()) {
|
|
2265
|
-
Object.defineProperty(Observable, /* @__PURE__ */ Symbol("extensions"), {
|
|
2266
|
-
value: {
|
|
2267
|
-
symbol: SymbolObservable,
|
|
2268
|
-
hostReportError
|
|
2269
|
-
},
|
|
2270
|
-
configurable: true
|
|
2271
|
-
});
|
|
2272
|
-
}
|
|
1819
|
+
}
|
|
1820
|
+
};
|
|
2273
1821
|
|
|
2274
|
-
// ../../node_modules/
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
}
|
|
2287
|
-
try {
|
|
2288
|
-
Symbol2.observable = result2;
|
|
2289
|
-
} catch (err) {
|
|
2290
|
-
}
|
|
2291
|
-
}
|
|
2292
|
-
} else {
|
|
2293
|
-
result2 = "@@observable";
|
|
1822
|
+
// ../../node_modules/@apollo/client/utilities/internal/caches.js
|
|
1823
|
+
var scheduledCleanup = /* @__PURE__ */ new WeakSet();
|
|
1824
|
+
function schedule(cache) {
|
|
1825
|
+
if (cache.size <= (cache.max || -1)) {
|
|
1826
|
+
return;
|
|
1827
|
+
}
|
|
1828
|
+
if (!scheduledCleanup.has(cache)) {
|
|
1829
|
+
scheduledCleanup.add(cache);
|
|
1830
|
+
setTimeout(() => {
|
|
1831
|
+
cache.clean();
|
|
1832
|
+
scheduledCleanup.delete(cache);
|
|
1833
|
+
}, 100);
|
|
2294
1834
|
}
|
|
2295
|
-
return result2;
|
|
2296
1835
|
}
|
|
1836
|
+
var AutoCleanedWeakCache = function(max, dispose) {
|
|
1837
|
+
const cache = new WeakCache(max, dispose);
|
|
1838
|
+
cache.set = function(key, value) {
|
|
1839
|
+
const ret = WeakCache.prototype.set.call(this, key, value);
|
|
1840
|
+
schedule(this);
|
|
1841
|
+
return ret;
|
|
1842
|
+
};
|
|
1843
|
+
return cache;
|
|
1844
|
+
};
|
|
2297
1845
|
|
|
2298
|
-
// ../../node_modules/
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
}
|
|
2309
|
-
|
|
2310
|
-
}
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
return this;
|
|
1846
|
+
// ../../node_modules/@apollo/client/utilities/internal/memoize.js
|
|
1847
|
+
function memoize(fn, { max, makeCacheKey = (args) => args }) {
|
|
1848
|
+
const keys = new Trie(true);
|
|
1849
|
+
const cache = new AutoCleanedWeakCache(max);
|
|
1850
|
+
return (...args) => {
|
|
1851
|
+
const cacheKey = keys.lookupArray(makeCacheKey(args));
|
|
1852
|
+
const cached = cache.get(cacheKey);
|
|
1853
|
+
if (cached) {
|
|
1854
|
+
if (cached.error) {
|
|
1855
|
+
throw cached.error;
|
|
1856
|
+
}
|
|
1857
|
+
return cached.result;
|
|
1858
|
+
}
|
|
1859
|
+
const entry = cache.set(cacheKey, {});
|
|
1860
|
+
try {
|
|
1861
|
+
return entry.result = fn(...args);
|
|
1862
|
+
} catch (error) {
|
|
1863
|
+
entry.error = error;
|
|
1864
|
+
throw error;
|
|
1865
|
+
}
|
|
2319
1866
|
};
|
|
2320
1867
|
}
|
|
2321
1868
|
|
|
2322
|
-
// ../../node_modules/@apollo/client/utilities/
|
|
2323
|
-
var
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
}
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
1869
|
+
// ../../node_modules/@apollo/client/utilities/internal/checkDocument.js
|
|
1870
|
+
var checkDocument = memoize((doc, expectedType) => {
|
|
1871
|
+
invariant(doc && doc.kind === "Document", 1);
|
|
1872
|
+
const operations = doc.definitions.filter((d) => d.kind === "OperationDefinition");
|
|
1873
|
+
if (__DEV__) {
|
|
1874
|
+
doc.definitions.forEach((definition) => {
|
|
1875
|
+
if (definition.kind !== "OperationDefinition" && definition.kind !== "FragmentDefinition") {
|
|
1876
|
+
throw newInvariantError(2, definition.kind);
|
|
1877
|
+
}
|
|
1878
|
+
});
|
|
1879
|
+
invariant(operations.length <= 1, 3, operations.length);
|
|
1880
|
+
}
|
|
1881
|
+
if (expectedType) {
|
|
1882
|
+
invariant(
|
|
1883
|
+
operations.length == 1 && operations[0].operation === expectedType,
|
|
1884
|
+
4,
|
|
1885
|
+
expectedType,
|
|
1886
|
+
expectedType,
|
|
1887
|
+
operations[0].operation
|
|
1888
|
+
);
|
|
2334
1889
|
}
|
|
2335
|
-
|
|
1890
|
+
visit(doc, {
|
|
1891
|
+
Field(field, _, __, path) {
|
|
1892
|
+
if (field.alias && (field.alias.value === "__typename" || field.alias.value.startsWith("__ac_")) && field.alias.value !== field.name.value) {
|
|
1893
|
+
let current = doc, fieldPath = [];
|
|
1894
|
+
for (const key of path) {
|
|
1895
|
+
current = current[key];
|
|
1896
|
+
if (current.kind === Kind.FIELD) {
|
|
1897
|
+
fieldPath.push(current.alias?.value || current.name.value);
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
fieldPath.splice(-1, 1, field.name.value);
|
|
1901
|
+
throw newInvariantError(
|
|
1902
|
+
5,
|
|
1903
|
+
field.alias.value,
|
|
1904
|
+
fieldPath.join("."),
|
|
1905
|
+
operations[0].operation,
|
|
1906
|
+
getOperationName(doc, "(anonymous)")
|
|
1907
|
+
);
|
|
1908
|
+
}
|
|
1909
|
+
}
|
|
1910
|
+
});
|
|
1911
|
+
}, {
|
|
1912
|
+
max: cacheSizes["checkDocument"] || 2e3
|
|
1913
|
+
});
|
|
2336
1914
|
|
|
2337
|
-
// ../../node_modules/@apollo/client/
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
error.statusCode = response.status;
|
|
2343
|
-
error.result = result2;
|
|
2344
|
-
throw error;
|
|
2345
|
-
};
|
|
1915
|
+
// ../../node_modules/@apollo/client/utilities/internal/getOperationDefinition.js
|
|
1916
|
+
function getOperationDefinition(doc) {
|
|
1917
|
+
checkDocument(doc);
|
|
1918
|
+
return doc.definitions.filter((definition) => definition.kind === "OperationDefinition")[0];
|
|
1919
|
+
}
|
|
2346
1920
|
|
|
2347
|
-
// ../../node_modules/@apollo/client/
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
"operationName",
|
|
2352
|
-
"variables",
|
|
2353
|
-
"extensions",
|
|
2354
|
-
"context"
|
|
2355
|
-
];
|
|
2356
|
-
for (var _i = 0, _a3 = Object.keys(operation); _i < _a3.length; _i++) {
|
|
2357
|
-
var key = _a3[_i];
|
|
2358
|
-
if (OPERATION_FIELDS.indexOf(key) < 0) {
|
|
2359
|
-
throw newInvariantError(58, key);
|
|
2360
|
-
}
|
|
2361
|
-
}
|
|
2362
|
-
return operation;
|
|
1921
|
+
// ../../node_modules/@apollo/client/utilities/internal/getMemoryInternals.js
|
|
1922
|
+
var globalCaches = {};
|
|
1923
|
+
function registerGlobalCache(name, getSize) {
|
|
1924
|
+
globalCaches[name] = getSize;
|
|
2363
1925
|
}
|
|
2364
1926
|
|
|
2365
1927
|
// ../../node_modules/@apollo/client/link/utils/createOperation.js
|
|
2366
|
-
function createOperation(
|
|
2367
|
-
|
|
2368
|
-
|
|
1928
|
+
function createOperation(request, { client }) {
|
|
1929
|
+
const operation = {
|
|
1930
|
+
query: request.query,
|
|
1931
|
+
variables: request.variables || {},
|
|
1932
|
+
extensions: request.extensions || {},
|
|
1933
|
+
operationName: getOperationName(request.query),
|
|
1934
|
+
operationType: getOperationDefinition(request.query).operation
|
|
1935
|
+
};
|
|
1936
|
+
let context2 = { ...request.context };
|
|
1937
|
+
const setContext = (next) => {
|
|
2369
1938
|
if (typeof next === "function") {
|
|
2370
|
-
|
|
1939
|
+
context2 = { ...context2, ...next(getContext()) };
|
|
2371
1940
|
} else {
|
|
2372
|
-
|
|
1941
|
+
context2 = { ...context2, ...next };
|
|
2373
1942
|
}
|
|
2374
1943
|
};
|
|
2375
|
-
|
|
2376
|
-
return __assign({}, context);
|
|
2377
|
-
};
|
|
1944
|
+
const getContext = () => Object.freeze({ ...context2 });
|
|
2378
1945
|
Object.defineProperty(operation, "setContext", {
|
|
2379
1946
|
enumerable: false,
|
|
2380
1947
|
value: setContext
|
|
@@ -2383,236 +1950,428 @@ function createOperation(starting, operation) {
|
|
|
2383
1950
|
enumerable: false,
|
|
2384
1951
|
value: getContext
|
|
2385
1952
|
});
|
|
1953
|
+
Object.defineProperty(operation, "client", {
|
|
1954
|
+
enumerable: false,
|
|
1955
|
+
value: client
|
|
1956
|
+
});
|
|
2386
1957
|
return operation;
|
|
2387
1958
|
}
|
|
2388
1959
|
|
|
2389
|
-
// ../../node_modules/@apollo/client/link/utils/
|
|
2390
|
-
function
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
}
|
|
2400
|
-
|
|
1960
|
+
// ../../node_modules/@apollo/client/link/utils/filterOperationVariables.js
|
|
1961
|
+
function filterOperationVariables(variables, query) {
|
|
1962
|
+
const result = { ...variables };
|
|
1963
|
+
const unusedNames = new Set(Object.keys(variables));
|
|
1964
|
+
visit(query, {
|
|
1965
|
+
Variable(node, _key, parent) {
|
|
1966
|
+
if (parent && parent.kind !== "VariableDefinition") {
|
|
1967
|
+
unusedNames.delete(node.name.value);
|
|
1968
|
+
}
|
|
1969
|
+
}
|
|
1970
|
+
});
|
|
1971
|
+
unusedNames.forEach((name) => {
|
|
1972
|
+
delete result[name];
|
|
1973
|
+
});
|
|
1974
|
+
return result;
|
|
2401
1975
|
}
|
|
2402
1976
|
|
|
2403
1977
|
// ../../node_modules/@apollo/client/link/core/ApolloLink.js
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
return ApolloLink2.concat(this, next);
|
|
2478
|
-
};
|
|
2479
|
-
ApolloLink2.prototype.request = function(operation, forward) {
|
|
2480
|
-
throw newInvariantError(48);
|
|
2481
|
-
};
|
|
2482
|
-
ApolloLink2.prototype.onError = function(error, observer) {
|
|
2483
|
-
if (globalThis.__DEV__ !== false) {
|
|
2484
|
-
warnDeprecated("onError", function() {
|
|
2485
|
-
globalThis.__DEV__ !== false && invariant2.warn(49);
|
|
2486
|
-
});
|
|
2487
|
-
}
|
|
2488
|
-
if (observer && observer.error) {
|
|
2489
|
-
observer.error(error);
|
|
2490
|
-
return false;
|
|
1978
|
+
var ApolloLink = class _ApolloLink {
|
|
1979
|
+
/**
|
|
1980
|
+
* Creates a link that completes immediately and does not emit a result.
|
|
1981
|
+
*
|
|
1982
|
+
* @example
|
|
1983
|
+
*
|
|
1984
|
+
* ```ts
|
|
1985
|
+
* const link = ApolloLink.empty();
|
|
1986
|
+
* ```
|
|
1987
|
+
*/
|
|
1988
|
+
static empty() {
|
|
1989
|
+
return new _ApolloLink(() => EMPTY);
|
|
1990
|
+
}
|
|
1991
|
+
/**
|
|
1992
|
+
* Composes multiple links into a single composed link that executes each
|
|
1993
|
+
* provided link in serial order.
|
|
1994
|
+
*
|
|
1995
|
+
* @example
|
|
1996
|
+
*
|
|
1997
|
+
* ```ts
|
|
1998
|
+
* import { from, HttpLink, ApolloLink } from "@apollo/client";
|
|
1999
|
+
* import { RetryLink } from "@apollo/client/link/retry";
|
|
2000
|
+
* import MyAuthLink from "../auth";
|
|
2001
|
+
*
|
|
2002
|
+
* const link = ApolloLink.from([
|
|
2003
|
+
* new RetryLink(),
|
|
2004
|
+
* new MyAuthLink(),
|
|
2005
|
+
* new HttpLink({ uri: "http://localhost:4000/graphql" }),
|
|
2006
|
+
* ]);
|
|
2007
|
+
* ```
|
|
2008
|
+
*
|
|
2009
|
+
* @param links - An array of `ApolloLink` instances or request handlers that
|
|
2010
|
+
* are executed in serial order.
|
|
2011
|
+
*/
|
|
2012
|
+
static from(links) {
|
|
2013
|
+
if (links.length === 0)
|
|
2014
|
+
return _ApolloLink.empty();
|
|
2015
|
+
const [first, ...rest] = links;
|
|
2016
|
+
return first.concat(...rest);
|
|
2017
|
+
}
|
|
2018
|
+
/**
|
|
2019
|
+
* Creates a link that conditionally routes a request to different links.
|
|
2020
|
+
*
|
|
2021
|
+
* @example
|
|
2022
|
+
*
|
|
2023
|
+
* ```ts
|
|
2024
|
+
* import { ApolloLink, HttpLink } from "@apollo/client";
|
|
2025
|
+
*
|
|
2026
|
+
* const link = ApolloLink.split(
|
|
2027
|
+
* (operation) => operation.getContext().version === 1,
|
|
2028
|
+
* new HttpLink({ uri: "http://localhost:4000/v1/graphql" }),
|
|
2029
|
+
* new HttpLink({ uri: "http://localhost:4000/v2/graphql" })
|
|
2030
|
+
* );
|
|
2031
|
+
* ```
|
|
2032
|
+
*
|
|
2033
|
+
* @param test - A predicate function that receives the current `operation`
|
|
2034
|
+
* and returns a boolean indicating which link to execute. Returning `true`
|
|
2035
|
+
* executes the `left` link. Returning `false` executes the `right` link.
|
|
2036
|
+
*
|
|
2037
|
+
* @param left - The link that executes when the `test` function returns
|
|
2038
|
+
* `true`.
|
|
2039
|
+
*
|
|
2040
|
+
* @param right - The link that executes when the `test` function returns
|
|
2041
|
+
* `false`. If the `right` link is not provided, the request is forwarded to
|
|
2042
|
+
* the next link in the chain.
|
|
2043
|
+
*/
|
|
2044
|
+
static split(test, left, right = new _ApolloLink((op, forward) => forward(op))) {
|
|
2045
|
+
const link = new _ApolloLink((operation, forward) => {
|
|
2046
|
+
const result = test(operation);
|
|
2047
|
+
if (__DEV__) {
|
|
2048
|
+
if (typeof result !== "boolean") {
|
|
2049
|
+
__DEV__ && invariant.warn(63, result);
|
|
2050
|
+
}
|
|
2491
2051
|
}
|
|
2492
|
-
|
|
2493
|
-
};
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2052
|
+
return result ? left.request(operation, forward) : right.request(operation, forward);
|
|
2053
|
+
});
|
|
2054
|
+
return Object.assign(link, { left, right });
|
|
2055
|
+
}
|
|
2056
|
+
/**
|
|
2057
|
+
* Executes a GraphQL request against a link. The `execute` function begins
|
|
2058
|
+
* the request by calling the request handler of the link.
|
|
2059
|
+
*
|
|
2060
|
+
* @example
|
|
2061
|
+
*
|
|
2062
|
+
* ```ts
|
|
2063
|
+
* const observable = ApolloLink.execute(link, { query, variables }, { client });
|
|
2064
|
+
*
|
|
2065
|
+
* observable.subscribe({
|
|
2066
|
+
* next(value) {
|
|
2067
|
+
* console.log("Received", value);
|
|
2068
|
+
* },
|
|
2069
|
+
* error(error) {
|
|
2070
|
+
* console.error("Oops got error", error);
|
|
2071
|
+
* },
|
|
2072
|
+
* complete() {
|
|
2073
|
+
* console.log("Request complete");
|
|
2074
|
+
* },
|
|
2075
|
+
* });
|
|
2076
|
+
* ```
|
|
2077
|
+
*
|
|
2078
|
+
* @param link - The `ApolloLink` instance to execute the request.
|
|
2079
|
+
*
|
|
2080
|
+
* @param request - The GraphQL request details, such as the `query` and
|
|
2081
|
+
* `variables`.
|
|
2082
|
+
*
|
|
2083
|
+
* @param context - The execution context for the request, such as the
|
|
2084
|
+
* `client` making the request.
|
|
2085
|
+
*/
|
|
2086
|
+
static execute(link, request, context2) {
|
|
2087
|
+
return link.request(createOperation(request, context2), () => {
|
|
2088
|
+
if (__DEV__) {
|
|
2089
|
+
__DEV__ && invariant.warn(64);
|
|
2497
2090
|
}
|
|
2498
|
-
|
|
2091
|
+
return EMPTY;
|
|
2092
|
+
});
|
|
2093
|
+
}
|
|
2094
|
+
/**
|
|
2095
|
+
* Combines multiple links into a single composed link.
|
|
2096
|
+
*
|
|
2097
|
+
* @example
|
|
2098
|
+
*
|
|
2099
|
+
* ```ts
|
|
2100
|
+
* const link = ApolloLink.concat(firstLink, secondLink, thirdLink);
|
|
2101
|
+
* ```
|
|
2102
|
+
*
|
|
2103
|
+
* @param links - The links to concatenate into a single link. Each link will
|
|
2104
|
+
* execute in serial order.
|
|
2105
|
+
*
|
|
2106
|
+
* @deprecated Use `ApolloLink.from` instead. `ApolloLink.concat` will be
|
|
2107
|
+
* removed in a future major version.
|
|
2108
|
+
*/
|
|
2109
|
+
static concat(...links) {
|
|
2110
|
+
return _ApolloLink.from(links);
|
|
2111
|
+
}
|
|
2112
|
+
constructor(request) {
|
|
2113
|
+
if (request)
|
|
2114
|
+
this.request = request;
|
|
2115
|
+
}
|
|
2116
|
+
/**
|
|
2117
|
+
* Concatenates a link that conditionally routes a request to different links.
|
|
2118
|
+
*
|
|
2119
|
+
* @example
|
|
2120
|
+
*
|
|
2121
|
+
* ```ts
|
|
2122
|
+
* import { ApolloLink, HttpLink } from "@apollo/client";
|
|
2123
|
+
*
|
|
2124
|
+
* const previousLink = new ApolloLink((operation, forward) => {
|
|
2125
|
+
* // Handle the request
|
|
2126
|
+
*
|
|
2127
|
+
* return forward(operation);
|
|
2128
|
+
* });
|
|
2129
|
+
*
|
|
2130
|
+
* const link = previousLink.split(
|
|
2131
|
+
* (operation) => operation.getContext().version === 1,
|
|
2132
|
+
* new HttpLink({ uri: "http://localhost:4000/v1/graphql" }),
|
|
2133
|
+
* new HttpLink({ uri: "http://localhost:4000/v2/graphql" })
|
|
2134
|
+
* );
|
|
2135
|
+
* ```
|
|
2136
|
+
*
|
|
2137
|
+
* @param test - A predicate function that receives the current `operation`
|
|
2138
|
+
* and returns a boolean indicating which link to execute. Returning `true`
|
|
2139
|
+
* executes the `left` link. Returning `false` executes the `right` link.
|
|
2140
|
+
*
|
|
2141
|
+
* @param left - The link that executes when the `test` function returns
|
|
2142
|
+
* `true`.
|
|
2143
|
+
*
|
|
2144
|
+
* @param right - The link that executes when the `test` function returns
|
|
2145
|
+
* `false`. If the `right` link is not provided, the request is forwarded to
|
|
2146
|
+
* the next link in the chain.
|
|
2147
|
+
*/
|
|
2148
|
+
split(test, left, right) {
|
|
2149
|
+
return this.concat(_ApolloLink.split(test, left, right));
|
|
2150
|
+
}
|
|
2151
|
+
/**
|
|
2152
|
+
* Combines the link with other links into a single composed link.
|
|
2153
|
+
*
|
|
2154
|
+
* @example
|
|
2155
|
+
*
|
|
2156
|
+
* ```ts
|
|
2157
|
+
* import { ApolloLink, HttpLink } from "@apollo/client";
|
|
2158
|
+
*
|
|
2159
|
+
* const previousLink = new ApolloLink((operation, forward) => {
|
|
2160
|
+
* // Handle the request
|
|
2161
|
+
*
|
|
2162
|
+
* return forward(operation);
|
|
2163
|
+
* });
|
|
2164
|
+
*
|
|
2165
|
+
* const link = previousLink.concat(
|
|
2166
|
+
* link1,
|
|
2167
|
+
* link2,
|
|
2168
|
+
* new HttpLink({ uri: "http://localhost:4000/graphql" })
|
|
2169
|
+
* );
|
|
2170
|
+
* ```
|
|
2171
|
+
*/
|
|
2172
|
+
concat(...links) {
|
|
2173
|
+
if (links.length === 0) {
|
|
2499
2174
|
return this;
|
|
2500
|
-
}
|
|
2501
|
-
return
|
|
2502
|
-
}
|
|
2503
|
-
)
|
|
2175
|
+
}
|
|
2176
|
+
return links.reduce(this.combine.bind(this), this);
|
|
2177
|
+
}
|
|
2178
|
+
combine(left, right) {
|
|
2179
|
+
const link = new _ApolloLink((operation, forward) => {
|
|
2180
|
+
return left.request(operation, (op) => right.request(op, forward));
|
|
2181
|
+
});
|
|
2182
|
+
return Object.assign(link, { left, right });
|
|
2183
|
+
}
|
|
2184
|
+
/**
|
|
2185
|
+
* Runs the request handler for the provided operation.
|
|
2186
|
+
*
|
|
2187
|
+
* > [!NOTE]
|
|
2188
|
+
* > This is called by the `ApolloLink.execute` function for you and should
|
|
2189
|
+
* > not be called directly. Prefer using `ApolloLink.execute` to make the
|
|
2190
|
+
* > request instead.
|
|
2191
|
+
*/
|
|
2192
|
+
request(operation, forward) {
|
|
2193
|
+
throw newInvariantError(65);
|
|
2194
|
+
}
|
|
2195
|
+
/**
|
|
2196
|
+
* @internal
|
|
2197
|
+
* Used to iterate through all links that are concatenations or `split` links.
|
|
2198
|
+
*
|
|
2199
|
+
* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.
|
|
2200
|
+
*/
|
|
2201
|
+
left;
|
|
2202
|
+
/**
|
|
2203
|
+
* @internal
|
|
2204
|
+
* Used to iterate through all links that are concatenations or `split` links.
|
|
2205
|
+
*
|
|
2206
|
+
* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.
|
|
2207
|
+
*/
|
|
2208
|
+
right;
|
|
2209
|
+
};
|
|
2210
|
+
|
|
2211
|
+
// ../../node_modules/@apollo/client/errors/utils.js
|
|
2212
|
+
function isBranded(error, name) {
|
|
2213
|
+
return typeof error === "object" && error !== null && error[/* @__PURE__ */ Symbol.for("apollo.error")] === name;
|
|
2214
|
+
}
|
|
2215
|
+
function brand(error) {
|
|
2216
|
+
Object.defineProperty(error, /* @__PURE__ */ Symbol.for("apollo.error"), {
|
|
2217
|
+
value: error.name,
|
|
2218
|
+
enumerable: false,
|
|
2219
|
+
writable: false,
|
|
2220
|
+
configurable: false
|
|
2221
|
+
});
|
|
2222
|
+
}
|
|
2223
|
+
|
|
2224
|
+
// ../../node_modules/@apollo/client/errors/ServerError.js
|
|
2225
|
+
var ServerError = class _ServerError extends Error {
|
|
2226
|
+
/**
|
|
2227
|
+
* A method that determines whether an error is a `ServerError` object. This
|
|
2228
|
+
* method enables TypeScript to narrow the error type.
|
|
2229
|
+
*
|
|
2230
|
+
* @example
|
|
2231
|
+
*
|
|
2232
|
+
* ```ts
|
|
2233
|
+
* if (ServerError.is(error)) {
|
|
2234
|
+
* // TypeScript now knows `error` is a ServerError object
|
|
2235
|
+
* console.log(error.errors);
|
|
2236
|
+
* }
|
|
2237
|
+
* ```
|
|
2238
|
+
*/
|
|
2239
|
+
static is(error) {
|
|
2240
|
+
return isBranded(error, "ServerError");
|
|
2241
|
+
}
|
|
2242
|
+
/**
|
|
2243
|
+
* The raw [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) object provided by the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).
|
|
2244
|
+
*/
|
|
2245
|
+
response;
|
|
2246
|
+
/**
|
|
2247
|
+
* The status code returned by the server in the response. This is provided as
|
|
2248
|
+
* a shortcut for `response.status`.
|
|
2249
|
+
*/
|
|
2250
|
+
statusCode;
|
|
2251
|
+
/**
|
|
2252
|
+
* The raw response body text.
|
|
2253
|
+
*/
|
|
2254
|
+
bodyText;
|
|
2255
|
+
constructor(message, options) {
|
|
2256
|
+
super(message);
|
|
2257
|
+
this.name = "ServerError";
|
|
2258
|
+
this.response = options.response;
|
|
2259
|
+
this.statusCode = options.response.status;
|
|
2260
|
+
this.bodyText = options.bodyText;
|
|
2261
|
+
brand(this);
|
|
2262
|
+
Object.setPrototypeOf(this, _ServerError.prototype);
|
|
2263
|
+
}
|
|
2264
|
+
};
|
|
2504
2265
|
|
|
2505
|
-
// ../../node_modules/@apollo/client/
|
|
2506
|
-
var
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2266
|
+
// ../../node_modules/@apollo/client/errors/ServerParseError.js
|
|
2267
|
+
var ServerParseError = class _ServerParseError extends Error {
|
|
2268
|
+
/**
|
|
2269
|
+
* A method that determines whether an error is a `ServerParseError`
|
|
2270
|
+
* object. This method enables TypeScript to narrow the error type.
|
|
2271
|
+
*
|
|
2272
|
+
* @example
|
|
2273
|
+
*
|
|
2274
|
+
* ```ts
|
|
2275
|
+
* if (ServerParseError.is(error)) {
|
|
2276
|
+
* // TypeScript now knows `error` is a ServerParseError object
|
|
2277
|
+
* console.log(error.statusCode);
|
|
2278
|
+
* }
|
|
2279
|
+
* ```
|
|
2280
|
+
*/
|
|
2281
|
+
static is(error) {
|
|
2282
|
+
return isBranded(error, "ServerParseError");
|
|
2283
|
+
}
|
|
2284
|
+
/**
|
|
2285
|
+
* The raw [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) object provided by the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).
|
|
2286
|
+
*/
|
|
2287
|
+
response;
|
|
2288
|
+
/**
|
|
2289
|
+
* The status code returned by the server in the response. This is provided
|
|
2290
|
+
* as a shortcut for `response.status`.
|
|
2291
|
+
*/
|
|
2292
|
+
statusCode;
|
|
2293
|
+
/**
|
|
2294
|
+
* The raw response body text.
|
|
2295
|
+
*/
|
|
2296
|
+
bodyText;
|
|
2297
|
+
constructor(originalParseError, options) {
|
|
2298
|
+
super(originalParseError instanceof Error ? originalParseError.message : "Could not parse server response", { cause: originalParseError });
|
|
2299
|
+
this.name = "ServerParseError";
|
|
2300
|
+
this.response = options.response;
|
|
2301
|
+
this.statusCode = options.response.status;
|
|
2302
|
+
this.bodyText = options.bodyText;
|
|
2303
|
+
brand(this);
|
|
2304
|
+
Object.setPrototypeOf(this, _ServerParseError.prototype);
|
|
2305
|
+
}
|
|
2512
2306
|
};
|
|
2513
2307
|
|
|
2514
2308
|
// ../../node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js
|
|
2515
|
-
var
|
|
2516
|
-
function
|
|
2309
|
+
var { hasOwnProperty: hasOwnProperty2 } = Object.prototype;
|
|
2310
|
+
function parseJsonEncoding(response, bodyText) {
|
|
2517
2311
|
if (response.status >= 300) {
|
|
2518
|
-
|
|
2519
|
-
try {
|
|
2520
|
-
return JSON.parse(bodyText);
|
|
2521
|
-
} catch (err) {
|
|
2522
|
-
return bodyText;
|
|
2523
|
-
}
|
|
2524
|
-
};
|
|
2525
|
-
throwServerError(response, getResult(), "Response not successful: Received status code ".concat(response.status));
|
|
2312
|
+
throw new ServerError(`Response not successful: Received status code ${response.status}`, { response, bodyText });
|
|
2526
2313
|
}
|
|
2527
2314
|
try {
|
|
2528
2315
|
return JSON.parse(bodyText);
|
|
2529
2316
|
} catch (err) {
|
|
2530
|
-
|
|
2531
|
-
parseError.name = "ServerParseError";
|
|
2532
|
-
parseError.response = response;
|
|
2533
|
-
parseError.statusCode = response.status;
|
|
2534
|
-
parseError.bodyText = bodyText;
|
|
2535
|
-
throw parseError;
|
|
2317
|
+
throw new ServerParseError(err, { response, bodyText });
|
|
2536
2318
|
}
|
|
2537
2319
|
}
|
|
2538
|
-
function
|
|
2539
|
-
return function(response) {
|
|
2540
|
-
return response.text().then(function(bodyText) {
|
|
2541
|
-
return parseJsonBody(response, bodyText);
|
|
2542
|
-
}).then(function(result2) {
|
|
2543
|
-
if (!Array.isArray(result2) && !hasOwnProperty3.call(result2, "data") && !hasOwnProperty3.call(result2, "errors")) {
|
|
2544
|
-
throwServerError(response, result2, "Server response was missing for query '".concat(Array.isArray(operations) ? operations.map(function(op) {
|
|
2545
|
-
return op.operationName;
|
|
2546
|
-
}) : operations.operationName, "'."));
|
|
2547
|
-
}
|
|
2548
|
-
return result2;
|
|
2549
|
-
});
|
|
2550
|
-
};
|
|
2551
|
-
}
|
|
2552
|
-
|
|
2553
|
-
// ../../node_modules/@apollo/client/link/http/serializeFetchParameter.js
|
|
2554
|
-
var serializeFetchParameter = function(p, label) {
|
|
2555
|
-
var serialized;
|
|
2320
|
+
function parseGraphQLResponseJsonEncoding(response, bodyText) {
|
|
2556
2321
|
try {
|
|
2557
|
-
|
|
2558
|
-
} catch (
|
|
2559
|
-
|
|
2560
|
-
parseError.parseError = e;
|
|
2561
|
-
throw parseError;
|
|
2562
|
-
}
|
|
2563
|
-
return serialized;
|
|
2564
|
-
};
|
|
2565
|
-
|
|
2566
|
-
// ../../node_modules/@apollo/client/link/http/rewriteURIForGET.js
|
|
2567
|
-
function rewriteURIForGET(chosenURI, body) {
|
|
2568
|
-
var queryParams = [];
|
|
2569
|
-
var addQueryParam = function(key, value) {
|
|
2570
|
-
queryParams.push("".concat(key, "=").concat(encodeURIComponent(value)));
|
|
2571
|
-
};
|
|
2572
|
-
if ("query" in body) {
|
|
2573
|
-
addQueryParam("query", body.query);
|
|
2574
|
-
}
|
|
2575
|
-
if (body.operationName) {
|
|
2576
|
-
addQueryParam("operationName", body.operationName);
|
|
2322
|
+
return JSON.parse(bodyText);
|
|
2323
|
+
} catch (err) {
|
|
2324
|
+
throw new ServerParseError(err, { response, bodyText });
|
|
2577
2325
|
}
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
return { parseError };
|
|
2584
|
-
}
|
|
2585
|
-
addQueryParam("variables", serializedVariables);
|
|
2326
|
+
}
|
|
2327
|
+
function parseResponse(response, bodyText) {
|
|
2328
|
+
const contentType = response.headers.get("content-type");
|
|
2329
|
+
if (contentType?.includes("application/graphql-response+json")) {
|
|
2330
|
+
return parseGraphQLResponseJsonEncoding(response, bodyText);
|
|
2586
2331
|
}
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2332
|
+
return parseJsonEncoding(response, bodyText);
|
|
2333
|
+
}
|
|
2334
|
+
function parseAndCheckHttpResponse(operations) {
|
|
2335
|
+
return (response) => response.text().then((bodyText) => {
|
|
2336
|
+
const result = parseResponse(response, bodyText);
|
|
2337
|
+
if (!Array.isArray(result) && !hasOwnProperty2.call(result, "data") && !hasOwnProperty2.call(result, "errors")) {
|
|
2338
|
+
throw new ServerError(`Server response was malformed for query '${Array.isArray(operations) ? operations.map((op) => op.operationName) : operations.operationName}'.`, { response, bodyText });
|
|
2593
2339
|
}
|
|
2594
|
-
|
|
2340
|
+
return result;
|
|
2341
|
+
});
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
// ../../node_modules/@apollo/client/utilities/graphql/print.js
|
|
2345
|
+
var printCache;
|
|
2346
|
+
var print2 = Object.assign((ast) => {
|
|
2347
|
+
let result = printCache.get(ast);
|
|
2348
|
+
if (!result) {
|
|
2349
|
+
result = print(ast);
|
|
2350
|
+
printCache.set(ast, result);
|
|
2595
2351
|
}
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2352
|
+
return result;
|
|
2353
|
+
}, {
|
|
2354
|
+
reset() {
|
|
2355
|
+
printCache = new AutoCleanedWeakCache(
|
|
2356
|
+
cacheSizes.print || 2e3
|
|
2357
|
+
/* defaultCacheSizes.print */
|
|
2358
|
+
);
|
|
2601
2359
|
}
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2360
|
+
});
|
|
2361
|
+
print2.reset();
|
|
2362
|
+
if (__DEV__) {
|
|
2363
|
+
registerGlobalCache("print", () => printCache ? printCache.size : 0);
|
|
2605
2364
|
}
|
|
2606
2365
|
|
|
2607
2366
|
// ../../node_modules/@apollo/client/link/http/selectHttpOptionsAndBody.js
|
|
2608
2367
|
var defaultHttpOptions = {
|
|
2609
2368
|
includeQuery: true,
|
|
2610
|
-
includeExtensions:
|
|
2369
|
+
includeExtensions: true,
|
|
2611
2370
|
preserveHeaderCase: false
|
|
2612
2371
|
};
|
|
2613
2372
|
var defaultHeaders = {
|
|
2614
2373
|
// headers are case insensitive (https://stackoverflow.com/a/5259004)
|
|
2615
|
-
accept: "
|
|
2374
|
+
accept: "application/graphql-response+json,application/json;q=0.9",
|
|
2616
2375
|
// The content-type header describes the type of the body of the request, and
|
|
2617
2376
|
// so it typically only is sent with requests that actually have bodies. One
|
|
2618
2377
|
// could imagine that Apollo Client would remove this header when constructing
|
|
@@ -2635,29 +2394,32 @@ var fallbackHttpConfig = {
|
|
|
2635
2394
|
headers: defaultHeaders,
|
|
2636
2395
|
options: defaultOptions
|
|
2637
2396
|
};
|
|
2638
|
-
var defaultPrinter =
|
|
2639
|
-
|
|
2640
|
-
};
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2397
|
+
var defaultPrinter = (ast, printer) => printer(ast);
|
|
2398
|
+
function selectHttpOptionsAndBodyInternal(operation, printer, ...configs) {
|
|
2399
|
+
let options = {};
|
|
2400
|
+
let http = {};
|
|
2401
|
+
configs.forEach((config2) => {
|
|
2402
|
+
options = {
|
|
2403
|
+
...options,
|
|
2404
|
+
...config2.options,
|
|
2405
|
+
headers: {
|
|
2406
|
+
...options.headers,
|
|
2407
|
+
...config2.headers
|
|
2408
|
+
}
|
|
2409
|
+
};
|
|
2410
|
+
if (config2.credentials) {
|
|
2411
|
+
options.credentials = config2.credentials;
|
|
2652
2412
|
}
|
|
2653
|
-
|
|
2413
|
+
options.headers.accept = (config2.http?.accept || []).concat(options.headers.accept).join(",");
|
|
2414
|
+
http = {
|
|
2415
|
+
...http,
|
|
2416
|
+
...config2.http
|
|
2417
|
+
};
|
|
2654
2418
|
});
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
}
|
|
2658
|
-
|
|
2659
|
-
var body = { operationName, variables };
|
|
2660
|
-
if (http.includeExtensions)
|
|
2419
|
+
options.headers = removeDuplicateHeaders(options.headers, http.preserveHeaderCase);
|
|
2420
|
+
const { operationName, extensions, variables, query } = operation;
|
|
2421
|
+
const body = { operationName, variables };
|
|
2422
|
+
if (http.includeExtensions && Object.keys(extensions || {}).length)
|
|
2661
2423
|
body.extensions = extensions;
|
|
2662
2424
|
if (http.includeQuery)
|
|
2663
2425
|
body.query = printer(query, print2);
|
|
@@ -2668,30 +2430,30 @@ function selectHttpOptionsAndBodyInternal(operation, printer) {
|
|
|
2668
2430
|
}
|
|
2669
2431
|
function removeDuplicateHeaders(headers, preserveHeaderCase) {
|
|
2670
2432
|
if (!preserveHeaderCase) {
|
|
2671
|
-
|
|
2672
|
-
Object.keys(Object(headers)).forEach(
|
|
2673
|
-
|
|
2433
|
+
const normalizedHeaders2 = {};
|
|
2434
|
+
Object.keys(Object(headers)).forEach((name) => {
|
|
2435
|
+
normalizedHeaders2[name.toLowerCase()] = headers[name];
|
|
2674
2436
|
});
|
|
2675
|
-
return
|
|
2437
|
+
return normalizedHeaders2;
|
|
2676
2438
|
}
|
|
2677
|
-
|
|
2678
|
-
Object.keys(Object(headers)).forEach(
|
|
2439
|
+
const headerData = {};
|
|
2440
|
+
Object.keys(Object(headers)).forEach((name) => {
|
|
2679
2441
|
headerData[name.toLowerCase()] = {
|
|
2680
2442
|
originalName: name,
|
|
2681
2443
|
value: headers[name]
|
|
2682
2444
|
};
|
|
2683
2445
|
});
|
|
2684
|
-
|
|
2685
|
-
Object.keys(headerData).forEach(
|
|
2446
|
+
const normalizedHeaders = {};
|
|
2447
|
+
Object.keys(headerData).forEach((name) => {
|
|
2686
2448
|
normalizedHeaders[headerData[name].originalName] = headerData[name].value;
|
|
2687
2449
|
});
|
|
2688
2450
|
return normalizedHeaders;
|
|
2689
2451
|
}
|
|
2690
2452
|
|
|
2691
2453
|
// ../../node_modules/@apollo/client/link/http/selectURI.js
|
|
2692
|
-
var selectURI =
|
|
2693
|
-
|
|
2694
|
-
|
|
2454
|
+
var selectURI = (operation, fallbackURI) => {
|
|
2455
|
+
const context2 = operation.getContext();
|
|
2456
|
+
const contextURI = context2.uri;
|
|
2695
2457
|
if (contextURI) {
|
|
2696
2458
|
return contextURI;
|
|
2697
2459
|
} else if (typeof fallbackURI === "function") {
|
|
@@ -2701,13 +2463,54 @@ var selectURI = function(operation, fallbackURI) {
|
|
|
2701
2463
|
}
|
|
2702
2464
|
};
|
|
2703
2465
|
|
|
2466
|
+
// ../../node_modules/@apollo/client/link/http/rewriteURIForGET.js
|
|
2467
|
+
function rewriteURIForGET(chosenURI, body) {
|
|
2468
|
+
const queryParams = [];
|
|
2469
|
+
const addQueryParam = (key, value) => {
|
|
2470
|
+
queryParams.push(`${key}=${encodeURIComponent(value)}`);
|
|
2471
|
+
};
|
|
2472
|
+
if ("query" in body) {
|
|
2473
|
+
addQueryParam("query", body.query);
|
|
2474
|
+
}
|
|
2475
|
+
if (body.operationName) {
|
|
2476
|
+
addQueryParam("operationName", body.operationName);
|
|
2477
|
+
}
|
|
2478
|
+
if (body.variables) {
|
|
2479
|
+
let serializedVariables;
|
|
2480
|
+
try {
|
|
2481
|
+
serializedVariables = JSON.stringify(body.variables);
|
|
2482
|
+
} catch (parseError) {
|
|
2483
|
+
return { parseError };
|
|
2484
|
+
}
|
|
2485
|
+
addQueryParam("variables", serializedVariables);
|
|
2486
|
+
}
|
|
2487
|
+
if (body.extensions) {
|
|
2488
|
+
let serializedExtensions;
|
|
2489
|
+
try {
|
|
2490
|
+
serializedExtensions = JSON.stringify(body.extensions);
|
|
2491
|
+
} catch (parseError) {
|
|
2492
|
+
return { parseError };
|
|
2493
|
+
}
|
|
2494
|
+
addQueryParam("extensions", serializedExtensions);
|
|
2495
|
+
}
|
|
2496
|
+
let fragment = "", preFragment = chosenURI;
|
|
2497
|
+
const fragmentStart = chosenURI.indexOf("#");
|
|
2498
|
+
if (fragmentStart !== -1) {
|
|
2499
|
+
fragment = chosenURI.substr(fragmentStart);
|
|
2500
|
+
preFragment = chosenURI.substr(0, fragmentStart);
|
|
2501
|
+
}
|
|
2502
|
+
const queryParamsPrefix = preFragment.indexOf("?") === -1 ? "?" : "&";
|
|
2503
|
+
const newURI = preFragment + queryParamsPrefix + queryParams.join("&") + fragment;
|
|
2504
|
+
return { newURI };
|
|
2505
|
+
}
|
|
2506
|
+
|
|
2704
2507
|
// ../../node_modules/is-plain-obj/index.js
|
|
2705
2508
|
function isPlainObject(value) {
|
|
2706
2509
|
if (typeof value !== "object" || value === null) {
|
|
2707
2510
|
return false;
|
|
2708
2511
|
}
|
|
2709
|
-
const
|
|
2710
|
-
return (
|
|
2512
|
+
const prototype = Object.getPrototypeOf(value);
|
|
2513
|
+
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
|
|
2711
2514
|
}
|
|
2712
2515
|
|
|
2713
2516
|
// ../../node_modules/extract-files/extractFiles.mjs
|
|
@@ -2786,140 +2589,165 @@ function isExtractableFile(value) {
|
|
|
2786
2589
|
return typeof File !== "undefined" && value instanceof File || typeof Blob !== "undefined" && value instanceof Blob;
|
|
2787
2590
|
}
|
|
2788
2591
|
|
|
2789
|
-
// ../../node_modules/apollo-upload-client/
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2592
|
+
// ../../node_modules/apollo-upload-client/UploadHttpLink.mjs
|
|
2593
|
+
var UploadHttpLink = class extends ApolloLink {
|
|
2594
|
+
/**
|
|
2595
|
+
* @param {object} options Options.
|
|
2596
|
+
* @param {Parameters<typeof selectURI>[1]} [options.uri] GraphQL endpoint
|
|
2597
|
+
* URI. Defaults to `"/graphql"`.
|
|
2598
|
+
* @param {boolean} [options.useGETForQueries] Should GET be used to fetch
|
|
2599
|
+
* queries, if there are no files to upload.
|
|
2600
|
+
* @param {ExtractableFileMatcher} [options.isExtractableFile] Matches
|
|
2601
|
+
* extractable files in the GraphQL operation. Defaults to
|
|
2602
|
+
* {@linkcode isExtractableFile}.
|
|
2603
|
+
* @param {typeof FormData} [options.FormData]
|
|
2604
|
+
* [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData)
|
|
2605
|
+
* class. Defaults to the {@linkcode FormData} global.
|
|
2606
|
+
* @param {FormDataFileAppender} [options.formDataAppendFile]
|
|
2607
|
+
* Customizes how extracted files are appended to the
|
|
2608
|
+
* [`FormData`](https://developer.mozilla.org/en-US/docs/Web/API/FormData)
|
|
2609
|
+
* instance. Defaults to {@linkcode formDataAppendFile}.
|
|
2610
|
+
* @param {BaseHttpLink.Printer} [options.print] Prints the GraphQL query or
|
|
2611
|
+
* mutation AST to a string for transport. Defaults to
|
|
2612
|
+
* {@linkcode defaultPrinter}.
|
|
2613
|
+
* @param {typeof fetch} [options.fetch]
|
|
2614
|
+
* [`fetch`](https://fetch.spec.whatwg.org) implementation. Defaults to the
|
|
2615
|
+
* {@linkcode fetch} global.
|
|
2616
|
+
* @param {RequestInit} [options.fetchOptions] `fetch` options; overridden by
|
|
2617
|
+
* upload requirements.
|
|
2618
|
+
* @param {string} [options.credentials] Overrides
|
|
2619
|
+
* {@linkcode RequestInit.credentials credentials} in
|
|
2620
|
+
* {@linkcode fetchOptions}.
|
|
2621
|
+
* @param {{ [headerName: string]: string }} [options.headers] Merges with and
|
|
2622
|
+
* overrides {@linkcode RequestInit.headers headers} in
|
|
2623
|
+
* {@linkcode fetchOptions}.
|
|
2624
|
+
* @param {boolean} [options.includeExtensions] Toggles sending `extensions`
|
|
2625
|
+
* fields to the GraphQL server. Defaults to `false`.
|
|
2626
|
+
* @param {boolean} [options.includeUnusedVariables] Toggles including unused
|
|
2627
|
+
* GraphQL variables in the request. Defaults to `false`.
|
|
2628
|
+
*/
|
|
2629
|
+
constructor({
|
|
2630
|
+
uri: fetchUri = "/graphql",
|
|
2631
|
+
useGETForQueries,
|
|
2632
|
+
isExtractableFile: customIsExtractableFile = isExtractableFile,
|
|
2633
|
+
FormData: CustomFormData,
|
|
2634
|
+
formDataAppendFile: customFormDataAppendFile = formDataAppendFile,
|
|
2635
|
+
print: print3 = defaultPrinter,
|
|
2636
|
+
fetch: customFetch,
|
|
2637
|
+
fetchOptions,
|
|
2806
2638
|
credentials,
|
|
2807
|
-
headers
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
const {
|
|
2822
|
-
// Apollo Studio client awareness `name` and `version` can be configured
|
|
2823
|
-
// via `ApolloClient` constructor options:
|
|
2824
|
-
// https://www.apollographql.com/docs/graphos/metrics/client-awareness/#setup
|
|
2825
|
-
clientAwareness: { name, version: version2 } = {},
|
|
2826
|
-
headers: headers2
|
|
2827
|
-
} = context;
|
|
2828
|
-
const contextConfig = {
|
|
2829
|
-
http: context.http,
|
|
2830
|
-
options: context.fetchOptions,
|
|
2831
|
-
credentials: context.credentials,
|
|
2832
|
-
headers: {
|
|
2833
|
-
// Client awareness headers can be overridden by context `headers`.
|
|
2834
|
-
...name && { "apollographql-client-name": name },
|
|
2835
|
-
...version2 && { "apollographql-client-version": version2 },
|
|
2836
|
-
...headers2
|
|
2837
|
-
}
|
|
2838
|
-
};
|
|
2839
|
-
const { options, body } = selectHttpOptionsAndBodyInternal(
|
|
2840
|
-
operation,
|
|
2841
|
-
print3,
|
|
2842
|
-
fallbackHttpConfig,
|
|
2843
|
-
linkConfig,
|
|
2844
|
-
contextConfig
|
|
2845
|
-
);
|
|
2846
|
-
const { clone, files } = extractFiles(body, customIsExtractableFile, "");
|
|
2847
|
-
let uri = selectURI(operation, fetchUri);
|
|
2848
|
-
if (files.size) {
|
|
2849
|
-
if (options.headers)
|
|
2850
|
-
delete options.headers["content-type"];
|
|
2851
|
-
const RuntimeFormData = CustomFormData || FormData;
|
|
2852
|
-
const form = new RuntimeFormData();
|
|
2853
|
-
form.append("operations", serializeFetchParameter(clone, "Payload"));
|
|
2854
|
-
const map = {};
|
|
2855
|
-
let i = 0;
|
|
2856
|
-
files.forEach((paths) => {
|
|
2857
|
-
map[++i] = paths;
|
|
2858
|
-
});
|
|
2859
|
-
form.append("map", JSON.stringify(map));
|
|
2860
|
-
i = 0;
|
|
2861
|
-
files.forEach((_paths, file) => {
|
|
2862
|
-
customFormDataAppendFile(form, String(++i), file);
|
|
2863
|
-
});
|
|
2864
|
-
options.body = form;
|
|
2865
|
-
} else {
|
|
2866
|
-
if (useGETForQueries && // If the operation contains some mutations GET shouldn’t be used.
|
|
2867
|
-
!operation.query.definitions.some(
|
|
2868
|
-
(definition) => definition.kind === "OperationDefinition" && definition.operation === "mutation"
|
|
2869
|
-
))
|
|
2870
|
-
options.method = "GET";
|
|
2871
|
-
if (options.method === "GET") {
|
|
2872
|
-
const { newURI, parseError } = rewriteURIForGET(uri, body);
|
|
2873
|
-
if (parseError)
|
|
2874
|
-
return new Observable((observer) => {
|
|
2875
|
-
observer.error(parseError);
|
|
2876
|
-
});
|
|
2877
|
-
uri = newURI;
|
|
2878
|
-
} else options.body = serializeFetchParameter(clone, "Payload");
|
|
2879
|
-
}
|
|
2880
|
-
const { controller } = createSignalIfSupported();
|
|
2881
|
-
if (typeof controller !== "boolean") {
|
|
2882
|
-
if (options.signal)
|
|
2883
|
-
options.signal.aborted ? (
|
|
2884
|
-
// Signal already aborted, so immediately abort.
|
|
2885
|
-
controller.abort()
|
|
2886
|
-
) : (
|
|
2887
|
-
// Signal not already aborted, so setup a listener to abort when it
|
|
2888
|
-
// does.
|
|
2889
|
-
options.signal.addEventListener(
|
|
2890
|
-
"abort",
|
|
2891
|
-
() => {
|
|
2892
|
-
controller.abort();
|
|
2639
|
+
headers,
|
|
2640
|
+
includeExtensions,
|
|
2641
|
+
includeUnusedVariables = false
|
|
2642
|
+
} = {}) {
|
|
2643
|
+
super(
|
|
2644
|
+
(operation) => new Observable((observer) => {
|
|
2645
|
+
const context2 = operation.getContext();
|
|
2646
|
+
const { options, body } = selectHttpOptionsAndBodyInternal(
|
|
2647
|
+
operation,
|
|
2648
|
+
print3,
|
|
2649
|
+
fallbackHttpConfig,
|
|
2650
|
+
{
|
|
2651
|
+
http: {
|
|
2652
|
+
includeExtensions
|
|
2893
2653
|
},
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2654
|
+
options: fetchOptions,
|
|
2655
|
+
credentials,
|
|
2656
|
+
headers
|
|
2657
|
+
},
|
|
2658
|
+
{
|
|
2659
|
+
http: context2.http,
|
|
2660
|
+
options: context2.fetchOptions,
|
|
2661
|
+
credentials: context2.credentials,
|
|
2662
|
+
headers: context2.headers
|
|
2663
|
+
}
|
|
2900
2664
|
);
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2665
|
+
if (body.variables && !includeUnusedVariables)
|
|
2666
|
+
body.variables = filterOperationVariables(
|
|
2667
|
+
body.variables,
|
|
2668
|
+
operation.query
|
|
2669
|
+
);
|
|
2670
|
+
const { clone, files } = extractFiles(
|
|
2671
|
+
body,
|
|
2672
|
+
customIsExtractableFile,
|
|
2673
|
+
""
|
|
2674
|
+
);
|
|
2675
|
+
let uri = selectURI(operation, fetchUri);
|
|
2676
|
+
if (files.size) {
|
|
2677
|
+
if (options.headers)
|
|
2678
|
+
delete options.headers["content-type"];
|
|
2679
|
+
const RuntimeFormData = CustomFormData || FormData;
|
|
2680
|
+
const form = new RuntimeFormData();
|
|
2681
|
+
form.append("operations", JSON.stringify(clone));
|
|
2682
|
+
const map = {};
|
|
2683
|
+
let i = 0;
|
|
2684
|
+
files.forEach((paths) => {
|
|
2685
|
+
map[++i] = paths;
|
|
2686
|
+
});
|
|
2687
|
+
form.append("map", JSON.stringify(map));
|
|
2688
|
+
i = 0;
|
|
2689
|
+
files.forEach((_paths, file) => {
|
|
2690
|
+
customFormDataAppendFile(form, String(++i), file);
|
|
2691
|
+
});
|
|
2692
|
+
options.body = form;
|
|
2693
|
+
} else {
|
|
2694
|
+
if (useGETForQueries && // If the operation contains some mutations GET shouldn’t be used.
|
|
2695
|
+
!operation.query.definitions.some(
|
|
2696
|
+
(definition) => definition.kind === "OperationDefinition" && definition.operation === "mutation"
|
|
2697
|
+
))
|
|
2698
|
+
options.method = "GET";
|
|
2699
|
+
if (options.method === "GET") {
|
|
2700
|
+
const result = (
|
|
2701
|
+
/** @type {{ newURI: string } | { parseError: unknown }} */
|
|
2702
|
+
// The return type is incorrect; `newURI` and `parseError`
|
|
2703
|
+
// will never both be present.
|
|
2704
|
+
rewriteURIForGET(uri, body)
|
|
2705
|
+
);
|
|
2706
|
+
if ("parseError" in result) throw result.parseError;
|
|
2707
|
+
uri = result.newURI;
|
|
2708
|
+
} else options.body = JSON.stringify(clone);
|
|
2917
2709
|
}
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2710
|
+
let controller;
|
|
2711
|
+
if (typeof AbortController !== "undefined") {
|
|
2712
|
+
controller = new AbortController();
|
|
2713
|
+
if (options.signal)
|
|
2714
|
+
options.signal.aborted ? (
|
|
2715
|
+
// Signal already aborted, so immediately abort.
|
|
2716
|
+
controller.abort()
|
|
2717
|
+
) : (
|
|
2718
|
+
// Signal not already aborted, so setup a listener to abort
|
|
2719
|
+
// when it does.
|
|
2720
|
+
options.signal.addEventListener(
|
|
2721
|
+
"abort",
|
|
2722
|
+
() => {
|
|
2723
|
+
controller.abort();
|
|
2724
|
+
},
|
|
2725
|
+
{
|
|
2726
|
+
// Prevent a memory leak if the user configured abort
|
|
2727
|
+
// controller is long lasting, or controls multiple
|
|
2728
|
+
// things.
|
|
2729
|
+
once: true
|
|
2730
|
+
}
|
|
2731
|
+
)
|
|
2732
|
+
);
|
|
2733
|
+
options.signal = controller.signal;
|
|
2734
|
+
}
|
|
2735
|
+
const runtimeFetch = customFetch || fetch;
|
|
2736
|
+
let cleaningUp;
|
|
2737
|
+
runtimeFetch(uri, options).then((response) => {
|
|
2738
|
+
operation.setContext({ response });
|
|
2739
|
+
return response;
|
|
2740
|
+
}).then(parseAndCheckHttpResponse(operation)).then((result) => {
|
|
2741
|
+
observer.next(result);
|
|
2742
|
+
observer.complete();
|
|
2743
|
+
}).catch((error) => {
|
|
2744
|
+
if (!cleaningUp) observer.error(error);
|
|
2745
|
+
});
|
|
2746
|
+
return () => {
|
|
2747
|
+
cleaningUp = true;
|
|
2748
|
+
if (controller) controller.abort();
|
|
2749
|
+
};
|
|
2750
|
+
})
|
|
2751
|
+
);
|
|
2752
|
+
}
|
|
2753
|
+
};
|