fastman2 3.0.0-alpha.1 → 3.0.0-alpha.2
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/actionsheetman.js +1 -96
- package/alertman.js +1 -79
- package/annotationman.js +17 -2912
- package/baseman.js +1 -115
- package/blankpageman.js +1 -171
- package/cascadepickerman.js +1 -322
- package/confirmman.js +1 -87
- package/coreman.js +3 -2182
- package/cryptoman.js +2 -8931
- package/datetimepickerman.js +1 -181
- package/domman.js +1 -2759
- package/eventemitterman.js +1 -112
- package/fileuploadman.js +1 -2970
- package/formvalidateman.js +1 -335
- package/jsbridgeman.js +1 -992
- package/lazyloadman.js +1 -133
- package/loadingman.js +1 -81
- package/modalman.js +1 -264
- package/mutationobserverman.js +1 -356
- package/package.json +1 -1
- package/passguardman.js +1 -1722
- package/persistman.js +1 -60
- package/pickerman.js +1 -680
- package/popupman.js +1 -61
- package/postman.js +1 -1649
- package/preloadman.js +2 -8760
- package/resultpageman.js +1 -153
- package/routerman.js +1 -1201
- package/scrollman-infiniteRefresh.js +1 -117
- package/scrollman-pullDownRefresh.js +1 -302
- package/scrollman.js +2 -2567
- package/storeman.js +1 -585
- package/swiperman.js +1 -4702
- package/swiperoldman.js +1 -3005
- package/tabman.js +1 -145
- package/tipman.js +1 -110
- package/toastman.js +1 -78
- package/toolman.js +1 -22
- package/whenman.js +1 -774
- package/wsman.js +1 -7624
package/postman.js
CHANGED
|
@@ -1,1649 +1 @@
|
|
|
1
|
-
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
|
-
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
-
module.exports = factory();
|
|
4
|
-
else if(typeof define === 'function' && define.amd)
|
|
5
|
-
define([], factory);
|
|
6
|
-
else if(typeof exports === 'object')
|
|
7
|
-
exports["fastman"] = factory();
|
|
8
|
-
else
|
|
9
|
-
root["fastman"] = factory();
|
|
10
|
-
})(this, function() {
|
|
11
|
-
return webpackJsonpfastman([3],{
|
|
12
|
-
|
|
13
|
-
/***/ 11:
|
|
14
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
15
|
-
|
|
16
|
-
"use strict";
|
|
17
|
-
var __WEBPACK_AMD_DEFINE_RESULT__;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* 文件用途说明 : 为连接器的具体实现添加额外的方法(供实现类继承的基类)
|
|
21
|
-
* 类扩展工具
|
|
22
|
-
*
|
|
23
|
-
* 项目名称 : dfzq-obboot-mobi
|
|
24
|
-
* 作者姓名 : crixusshen
|
|
25
|
-
* 创建日期 : 16/3/9
|
|
26
|
-
* 修改日期 : 16/3/9
|
|
27
|
-
* 版权所有 : 东方证券股份有限公司
|
|
28
|
-
**/
|
|
29
|
-
(function (define) {
|
|
30
|
-
'use strict';
|
|
31
|
-
|
|
32
|
-
// http-client
|
|
33
|
-
|
|
34
|
-
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require) {
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* 为不同的连接器实现类增加通用方法
|
|
38
|
-
*
|
|
39
|
-
* @param {function} 连接器的实现
|
|
40
|
-
* @param {Client} [target] 当包括其他的连接器时使用
|
|
41
|
-
* @returns {Client} 拥有额外方法的连接器
|
|
42
|
-
*/
|
|
43
|
-
return function client(impl, target) {
|
|
44
|
-
|
|
45
|
-
if (target) {
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @returns {Client} 目标连接器
|
|
49
|
-
*/
|
|
50
|
-
impl.skip = function skip() {
|
|
51
|
-
return target;
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* 为连接器增加拦截器的功能
|
|
57
|
-
*
|
|
58
|
-
* @param {Interceptor} 拦截器
|
|
59
|
-
* @param [config] 拦截器相关配置
|
|
60
|
-
* @returns {Client} 新的连接器
|
|
61
|
-
*/
|
|
62
|
-
impl.addInterceptor = function addInterceptor(interceptor, config) {
|
|
63
|
-
// 构造完interceptor对拦截方法进行调用
|
|
64
|
-
return interceptor(impl, config);
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
return impl;
|
|
68
|
-
};
|
|
69
|
-
}.call(exports, __webpack_require__, exports, module),
|
|
70
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
71
|
-
})(__webpack_require__(0)
|
|
72
|
-
// Boilerplate for AMD and Node
|
|
73
|
-
);
|
|
74
|
-
|
|
75
|
-
/***/ }),
|
|
76
|
-
|
|
77
|
-
/***/ 147:
|
|
78
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
79
|
-
|
|
80
|
-
"use strict";
|
|
81
|
-
var __WEBPACK_AMD_DEFINE_RESULT__;
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* 文件用途说明 : XMLHttpRequest具体实现类
|
|
85
|
-
*
|
|
86
|
-
* 项目名称 : dfzq-obboot-mobi
|
|
87
|
-
* 作者姓名 : crixusshen
|
|
88
|
-
* 创建日期 : 16/3/9
|
|
89
|
-
* 修改日期 : 16/3/9
|
|
90
|
-
* 版权所有 : 东方证券股份有限公司
|
|
91
|
-
**/
|
|
92
|
-
(function (define, global) {
|
|
93
|
-
'use strict';
|
|
94
|
-
|
|
95
|
-
// http-xhr
|
|
96
|
-
|
|
97
|
-
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require) {
|
|
98
|
-
|
|
99
|
-
var when, UrlBuilder, normalizeHeaderName, responsePromise, client, headerSplitRE;
|
|
100
|
-
|
|
101
|
-
// when = require('when');
|
|
102
|
-
when = __webpack_require__(6);
|
|
103
|
-
client = __webpack_require__(11);
|
|
104
|
-
UrlBuilder = __webpack_require__(148);
|
|
105
|
-
normalizeHeaderName = __webpack_require__(25);
|
|
106
|
-
responsePromise = __webpack_require__(18);
|
|
107
|
-
|
|
108
|
-
// '\r\n'
|
|
109
|
-
headerSplitRE = /[\r|\n]+/;
|
|
110
|
-
|
|
111
|
-
function parseHeaders(raw) {
|
|
112
|
-
// Set-Cookie将被移除
|
|
113
|
-
var headers = {};
|
|
114
|
-
|
|
115
|
-
if (!raw) {
|
|
116
|
-
return headers;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
raw.trim().split(headerSplitRE).forEach(function (header) {
|
|
120
|
-
var boundary, name, value;
|
|
121
|
-
boundary = header.indexOf(':');
|
|
122
|
-
name = normalizeHeaderName(header.substring(0, boundary).trim());
|
|
123
|
-
value = header.substring(boundary + 1).trim();
|
|
124
|
-
if (headers[name]) {
|
|
125
|
-
if (Array.isArray(headers[name])) {
|
|
126
|
-
headers[name].push(value);
|
|
127
|
-
} else {
|
|
128
|
-
headers[name] = [headers[name], value];
|
|
129
|
-
}
|
|
130
|
-
} else {
|
|
131
|
-
headers[name] = value;
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
return headers;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
function safeMixin(target, source) {
|
|
139
|
-
Object.keys(source || {}).forEach(function (prop) {
|
|
140
|
-
if (source.hasOwnProperty(prop) && prop in target) {
|
|
141
|
-
try {
|
|
142
|
-
target[prop] = source[prop];
|
|
143
|
-
} catch (e) {}
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
return target;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
return client(function xhr(request) {
|
|
151
|
-
return responsePromise.promise(function (resolve, reject) {
|
|
152
|
-
|
|
153
|
-
var client, method, url, headers, entity, headerName, response, XMLHttpRequest;
|
|
154
|
-
|
|
155
|
-
request = typeof request === 'string' ? {
|
|
156
|
-
path: request
|
|
157
|
-
} : request || {};
|
|
158
|
-
response = {
|
|
159
|
-
request: request
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
if (request.canceled) {
|
|
163
|
-
response.error = 'precanceled';
|
|
164
|
-
reject(response);
|
|
165
|
-
return;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
XMLHttpRequest = request.engine || global.XMLHttpRequest;
|
|
169
|
-
if (!XMLHttpRequest) {
|
|
170
|
-
reject({
|
|
171
|
-
request: request,
|
|
172
|
-
error: 'xhr-not-available'
|
|
173
|
-
});
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
entity = request.entity;
|
|
178
|
-
request.method = request.method || (entity ? 'POST' : 'GET');
|
|
179
|
-
method = request.method;
|
|
180
|
-
url = new UrlBuilder(request.path || '', request.params).build();
|
|
181
|
-
|
|
182
|
-
try {
|
|
183
|
-
// CORS supported (XHR)
|
|
184
|
-
// supports cross-domain requests
|
|
185
|
-
client = new XMLHttpRequest();
|
|
186
|
-
if ('withCredentials' in client) {
|
|
187
|
-
response.raw = client;
|
|
188
|
-
safeMixin(client, request.mixin);
|
|
189
|
-
client.open(method, url, true);
|
|
190
|
-
safeMixin(client, request.mixin);
|
|
191
|
-
|
|
192
|
-
// 解决携带跨域cookie
|
|
193
|
-
if (request.xhrFields) {
|
|
194
|
-
if (request.xhrFields.withCredentials) {
|
|
195
|
-
var withCredentials = request.xhrFields.withCredentials;
|
|
196
|
-
if (typeof withCredentials === 'string' && withCredentials.toLowerCase() === 'true') {
|
|
197
|
-
client.withCredentials = true;
|
|
198
|
-
} else if (typeof withCredentials === 'boolean' && withCredentials) {
|
|
199
|
-
client.withCredentials = true;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
headers = request.headers;
|
|
205
|
-
for (headerName in headers) {
|
|
206
|
-
if (headerName === 'Content-Type' && headers[headerName] === 'multipart/form-data') {
|
|
207
|
-
continue;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
client.setRequestHeader(headerName, headers[headerName]);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
request.canceled = false;
|
|
214
|
-
request.cancel = function cancel() {
|
|
215
|
-
request.canceled = true;
|
|
216
|
-
client.abort();
|
|
217
|
-
//reject(response);
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
client.onreadystatechange = function () /* e */{
|
|
221
|
-
if (request.canceled) {
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
|
-
if (client.readyState === (XMLHttpRequest.DONE || 4)) {
|
|
225
|
-
response.status = {
|
|
226
|
-
code: client.status,
|
|
227
|
-
text: client.statusText
|
|
228
|
-
};
|
|
229
|
-
response.headers = parseHeaders(client.getAllResponseHeaders());
|
|
230
|
-
response.entity = client.responseText;
|
|
231
|
-
|
|
232
|
-
if (response.status.code > 0) {
|
|
233
|
-
resolve(response);
|
|
234
|
-
} else {
|
|
235
|
-
setTimeout(function () {
|
|
236
|
-
resolve(response);
|
|
237
|
-
}, 0);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
};
|
|
241
|
-
|
|
242
|
-
try {
|
|
243
|
-
client.onerror = function (e) {
|
|
244
|
-
response.error = 'loaderror';
|
|
245
|
-
reject(response);
|
|
246
|
-
};
|
|
247
|
-
} catch (e) {
|
|
248
|
-
// IE 6不支持onerror,直接跳过
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
client.send(entity);
|
|
252
|
-
}
|
|
253
|
-
// CORS support (XDR)
|
|
254
|
-
// Use IE-specific "CORS" code with XDR
|
|
255
|
-
else if (typeof XDomainRequest !== "undefined") {
|
|
256
|
-
var timeout = 40000; // 网络超时由 promise 拦截器控制,因此这里设置的值比它大即可
|
|
257
|
-
var data = entity;
|
|
258
|
-
if (data instanceof Object) {
|
|
259
|
-
data = JSON.stringify(data);
|
|
260
|
-
}
|
|
261
|
-
var XDR = new XDomainRequest();
|
|
262
|
-
XDR.open(request.method, url);
|
|
263
|
-
XDR.timeout = timeout;
|
|
264
|
-
XDR.onload = function () {
|
|
265
|
-
try {
|
|
266
|
-
var response = {
|
|
267
|
-
request: request,
|
|
268
|
-
status: {
|
|
269
|
-
code: 200,
|
|
270
|
-
text: "OK"
|
|
271
|
-
},
|
|
272
|
-
headers: {
|
|
273
|
-
"Content-Type": XDR.contentType || "application/json" // 必须定义,否则无法进行mime的自动序列转化
|
|
274
|
-
},
|
|
275
|
-
entity: XDR.responseText
|
|
276
|
-
};
|
|
277
|
-
resolve(response);
|
|
278
|
-
} catch (e) {
|
|
279
|
-
var response = {
|
|
280
|
-
errpr: 'loaderror'
|
|
281
|
-
};
|
|
282
|
-
reject(response);
|
|
283
|
-
}
|
|
284
|
-
};
|
|
285
|
-
// fix random aborting: https://cypressnorth.com/programming/internet-explorer-aborting-ajax-requests-fixed/
|
|
286
|
-
XDR.onprogress = function () {};
|
|
287
|
-
XDR.ontimeout = function () {
|
|
288
|
-
// reject('XDomainRequest timeout');
|
|
289
|
-
var response = {
|
|
290
|
-
errpr: 'biztimeouterror'
|
|
291
|
-
};
|
|
292
|
-
reject(response);
|
|
293
|
-
};
|
|
294
|
-
|
|
295
|
-
XDR.onerror = function () {
|
|
296
|
-
// reject('XDomainRequest error');
|
|
297
|
-
var response = {
|
|
298
|
-
errpr: 'loaderror'
|
|
299
|
-
};
|
|
300
|
-
reject(response);
|
|
301
|
-
};
|
|
302
|
-
|
|
303
|
-
// 使用 setTimeout 解决多并发问题
|
|
304
|
-
setTimeout(function () {
|
|
305
|
-
XDR.send(data);
|
|
306
|
-
}, 0);
|
|
307
|
-
}
|
|
308
|
-
// No CORS Support
|
|
309
|
-
else {
|
|
310
|
-
var response = {
|
|
311
|
-
errpr: 'nocors'
|
|
312
|
-
};
|
|
313
|
-
reject(response);
|
|
314
|
-
}
|
|
315
|
-
} catch (e) {
|
|
316
|
-
response.error = 'loaderror';
|
|
317
|
-
reject(response);
|
|
318
|
-
}
|
|
319
|
-
});
|
|
320
|
-
});
|
|
321
|
-
}.call(exports, __webpack_require__, exports, module),
|
|
322
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
323
|
-
})(__webpack_require__(0), typeof window !== 'undefined' ? window : void 0
|
|
324
|
-
// Boilerplate for AMD and Node
|
|
325
|
-
);
|
|
326
|
-
|
|
327
|
-
/***/ }),
|
|
328
|
-
|
|
329
|
-
/***/ 148:
|
|
330
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
331
|
-
|
|
332
|
-
"use strict";
|
|
333
|
-
var __WEBPACK_AMD_DEFINE_RESULT__;
|
|
334
|
-
|
|
335
|
-
/**
|
|
336
|
-
* 文件用途说明 :
|
|
337
|
-
*
|
|
338
|
-
* 项目名称 : dfzq-obboot-mobi
|
|
339
|
-
* 作者姓名 : crixusshen
|
|
340
|
-
* 创建日期 : 16/3/9
|
|
341
|
-
* 修改日期 : 16/3/9
|
|
342
|
-
* 版权所有 : 东方证券股份有限公司
|
|
343
|
-
**/
|
|
344
|
-
(function (define) {
|
|
345
|
-
'use strict';
|
|
346
|
-
|
|
347
|
-
var undef;
|
|
348
|
-
|
|
349
|
-
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require) {
|
|
350
|
-
|
|
351
|
-
var mixin, origin, urlRE, absoluteUrlRE, fullyQualifiedUrlRE;
|
|
352
|
-
|
|
353
|
-
mixin = __webpack_require__(24);
|
|
354
|
-
|
|
355
|
-
urlRE = /([a-z][a-z0-9\+\-\.]*:)\/\/([^@]+@)?(([^:\/]+)(:([0-9]+))?)?(\/[^?#]*)?(\?[^#]*)?(#\S*)?/i;
|
|
356
|
-
absoluteUrlRE = /^([a-z][a-z0-9\-\+\.]*:\/\/|\/)/i;
|
|
357
|
-
fullyQualifiedUrlRE = /([a-z][a-z0-9\+\-\.]*:)\/\/([^@]+@)?(([^:\/]+)(:([0-9]+))?)?\//i;
|
|
358
|
-
|
|
359
|
-
function buildUrl(template, params) {
|
|
360
|
-
// internal builder to convert template with params.
|
|
361
|
-
var url, name, queryStringParams, re;
|
|
362
|
-
|
|
363
|
-
url = template;
|
|
364
|
-
queryStringParams = {};
|
|
365
|
-
|
|
366
|
-
if (params) {
|
|
367
|
-
for (name in params) {
|
|
368
|
-
/*jshint forin:false */
|
|
369
|
-
re = new RegExp('\\{' + name + '\\}');
|
|
370
|
-
if (re.test(url)) {
|
|
371
|
-
url = url.replace(re, encodeURIComponent(params[name]), 'g');
|
|
372
|
-
} else {
|
|
373
|
-
queryStringParams[name] = params[name];
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
for (name in queryStringParams) {
|
|
377
|
-
url += url.indexOf('?') === -1 ? '?' : '&';
|
|
378
|
-
url += encodeURIComponent(name);
|
|
379
|
-
if (queryStringParams[name] !== null && queryStringParams[name] !== undefined) {
|
|
380
|
-
url += '=';
|
|
381
|
-
url += encodeURIComponent(queryStringParams[name]);
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
return url;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
function startsWith(str, test) {
|
|
389
|
-
return str.indexOf(test) === 0;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
function UrlBuilder(template, params) {
|
|
393
|
-
if (!(this instanceof UrlBuilder)) {
|
|
394
|
-
// invoke as a constructor
|
|
395
|
-
return new UrlBuilder(template, params);
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
if (template instanceof UrlBuilder) {
|
|
399
|
-
this._template = template.template;
|
|
400
|
-
this._params = mixin({}, this._params, params);
|
|
401
|
-
} else {
|
|
402
|
-
this._template = (template || '').toString();
|
|
403
|
-
this._params = params || {};
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
UrlBuilder.prototype = {
|
|
408
|
-
|
|
409
|
-
append: function append(template, params) {
|
|
410
|
-
// TODO consider query strings and fragments
|
|
411
|
-
return new UrlBuilder(this._template + template, mixin({}, this._params, params));
|
|
412
|
-
},
|
|
413
|
-
|
|
414
|
-
fullyQualify: function fullyQualify() {
|
|
415
|
-
if (!location) {
|
|
416
|
-
return this;
|
|
417
|
-
}
|
|
418
|
-
if (this.isFullyQualified()) {
|
|
419
|
-
return this;
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
var template = this._template;
|
|
423
|
-
|
|
424
|
-
if (startsWith(template, '//')) {
|
|
425
|
-
template = origin.protocol + template;
|
|
426
|
-
} else if (startsWith(template, '/')) {
|
|
427
|
-
template = origin.origin + template;
|
|
428
|
-
} else if (!this.isAbsolute()) {
|
|
429
|
-
template = origin.origin + origin.pathname.substring(0, origin.pathname.lastIndexOf('/') + 1);
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
if (template.indexOf('/', 8) === -1) {
|
|
433
|
-
// default the pathname to '/'
|
|
434
|
-
template = template + '/';
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
return new UrlBuilder(template, this._params);
|
|
438
|
-
},
|
|
439
|
-
|
|
440
|
-
isAbsolute: function isAbsolute() {
|
|
441
|
-
return absoluteUrlRE.test(this.build());
|
|
442
|
-
},
|
|
443
|
-
|
|
444
|
-
isFullyQualified: function isFullyQualified() {
|
|
445
|
-
return fullyQualifiedUrlRE.test(this.build());
|
|
446
|
-
},
|
|
447
|
-
|
|
448
|
-
isCrossOrigin: function isCrossOrigin() {
|
|
449
|
-
if (!origin) {
|
|
450
|
-
return true;
|
|
451
|
-
}
|
|
452
|
-
var url = this.parts();
|
|
453
|
-
return url.protocol !== origin.protocol || url.hostname !== origin.hostname || url.port !== origin.port;
|
|
454
|
-
},
|
|
455
|
-
|
|
456
|
-
parts: function parts() {
|
|
457
|
-
/*jshint maxcomplexity:20 */
|
|
458
|
-
var url, parts;
|
|
459
|
-
url = this.fullyQualify().build().match(urlRE);
|
|
460
|
-
parts = {
|
|
461
|
-
href: url[0],
|
|
462
|
-
protocol: url[1],
|
|
463
|
-
host: url[3] || '',
|
|
464
|
-
hostname: url[4] || '',
|
|
465
|
-
port: url[6],
|
|
466
|
-
pathname: url[7] || '',
|
|
467
|
-
search: url[8] || '',
|
|
468
|
-
hash: url[9] || ''
|
|
469
|
-
};
|
|
470
|
-
parts.origin = parts.protocol + '//' + parts.host;
|
|
471
|
-
parts.port = parts.port || (parts.protocol === 'https:' ? '443' : parts.protocol === 'http:' ? '80' : '');
|
|
472
|
-
return parts;
|
|
473
|
-
},
|
|
474
|
-
|
|
475
|
-
build: function build(params) {
|
|
476
|
-
return buildUrl(this._template, mixin({}, this._params, params));
|
|
477
|
-
},
|
|
478
|
-
|
|
479
|
-
toString: function toString() {
|
|
480
|
-
return this.build();
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
};
|
|
484
|
-
|
|
485
|
-
origin = location ? new UrlBuilder(location.href).parts() : undef;
|
|
486
|
-
|
|
487
|
-
return UrlBuilder;
|
|
488
|
-
}.call(exports, __webpack_require__, exports, module),
|
|
489
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
490
|
-
})(__webpack_require__(0)
|
|
491
|
-
// Boilerplate for AMD and Node
|
|
492
|
-
);
|
|
493
|
-
|
|
494
|
-
/***/ }),
|
|
495
|
-
|
|
496
|
-
/***/ 17:
|
|
497
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
498
|
-
|
|
499
|
-
"use strict";
|
|
500
|
-
var __WEBPACK_AMD_DEFINE_RESULT__;
|
|
501
|
-
|
|
502
|
-
/**
|
|
503
|
-
* 文件用途说明 : MIME转化基类
|
|
504
|
-
*
|
|
505
|
-
* 项目名称 : dfzq-obboot-mobi
|
|
506
|
-
* 作者姓名 : crixusshen
|
|
507
|
-
* 创建日期 : 16/3/11
|
|
508
|
-
* 修改日期 : 16/3/11
|
|
509
|
-
* 版权所有 : 东方证券股份有限公司
|
|
510
|
-
**/
|
|
511
|
-
(function (define) {
|
|
512
|
-
'use strict';
|
|
513
|
-
|
|
514
|
-
var undef;
|
|
515
|
-
|
|
516
|
-
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require) {
|
|
517
|
-
|
|
518
|
-
/**
|
|
519
|
-
* 对MIME TYPE进行转化
|
|
520
|
-
*
|
|
521
|
-
* @param {string} MIME TYPE
|
|
522
|
-
* @return {{
|
|
523
|
-
* {string} [raw] 原始MIME TYPE
|
|
524
|
-
* {string} [type] 子类型
|
|
525
|
-
* {string} [suffix] MIME前缀
|
|
526
|
-
* {Object} [params] 键值对属性对
|
|
527
|
-
* }}
|
|
528
|
-
*/
|
|
529
|
-
function parse(mime) {
|
|
530
|
-
var params, type;
|
|
531
|
-
|
|
532
|
-
params = mime.split(';');
|
|
533
|
-
type = params[0].trim().split('+');
|
|
534
|
-
|
|
535
|
-
return {
|
|
536
|
-
raw: mime,
|
|
537
|
-
type: type[0],
|
|
538
|
-
suffix: type[1] ? '+' + type[1] : '',
|
|
539
|
-
params: params.slice(1).reduce(function (params, pair) {
|
|
540
|
-
pair = pair.split('=');
|
|
541
|
-
params[pair[0].trim()] = pair[1] ? pair[1].trim() : undef;
|
|
542
|
-
return params;
|
|
543
|
-
}, {})
|
|
544
|
-
};
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
return {
|
|
548
|
-
parse: parse
|
|
549
|
-
};
|
|
550
|
-
}.call(exports, __webpack_require__, exports, module),
|
|
551
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
552
|
-
})(__webpack_require__(0)
|
|
553
|
-
// Boilerplate for AMD and Node
|
|
554
|
-
);
|
|
555
|
-
|
|
556
|
-
/***/ }),
|
|
557
|
-
|
|
558
|
-
/***/ 18:
|
|
559
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
560
|
-
|
|
561
|
-
"use strict";
|
|
562
|
-
var __WEBPACK_AMD_DEFINE_RESULT__;
|
|
563
|
-
|
|
564
|
-
/**
|
|
565
|
-
* 文件用途说明 : Promise构建器,内部resolver是一个异步的方法体
|
|
566
|
-
*
|
|
567
|
-
* 项目名称 : dfzq-obboot-mobi
|
|
568
|
-
* 作者姓名 : crixusshen
|
|
569
|
-
* 创建日期 : 16/3/9
|
|
570
|
-
* 修改日期 : 16/3/9
|
|
571
|
-
* 版权所有 : 东方证券股份有限公司
|
|
572
|
-
**/
|
|
573
|
-
(function (define) {
|
|
574
|
-
'use strict';
|
|
575
|
-
|
|
576
|
-
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require) {
|
|
577
|
-
|
|
578
|
-
var when = __webpack_require__(6),
|
|
579
|
-
normalizeHeaderName = __webpack_require__(25);
|
|
580
|
-
|
|
581
|
-
function property(promise, name) {
|
|
582
|
-
return promise.then(function (value) {
|
|
583
|
-
return value && value[name];
|
|
584
|
-
}, function (value) {
|
|
585
|
-
return when.reject(value && value[name]);
|
|
586
|
-
});
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
function entity() {
|
|
590
|
-
/*jshint validthis:true */
|
|
591
|
-
return property(this, 'entity');
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
function status() {
|
|
595
|
-
/*jshint validthis:true */
|
|
596
|
-
return property(property(this, 'status'), 'code');
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
function headers() {
|
|
600
|
-
/*jshint validthis:true */
|
|
601
|
-
return property(this, 'headers');
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
function header(headerName) {
|
|
605
|
-
/*jshint validthis:true */
|
|
606
|
-
headerName = normalizeHeaderName(headerName);
|
|
607
|
-
return property(this.headers(), headerName);
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
function follow(rels) {
|
|
611
|
-
/*jshint validthis:true */
|
|
612
|
-
rels = [].concat(rels);
|
|
613
|
-
return make(when.reduce(rels, function (response, rel) {
|
|
614
|
-
if (typeof rel === 'string') {
|
|
615
|
-
rel = { rel: rel };
|
|
616
|
-
}
|
|
617
|
-
if (typeof response.entity.clientFor !== 'function') {
|
|
618
|
-
throw new Error('Hypermedia response expected');
|
|
619
|
-
}
|
|
620
|
-
var client = response.entity.clientFor(rel.rel);
|
|
621
|
-
return client({ params: rel.params });
|
|
622
|
-
}, this));
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
function make(promise) {
|
|
626
|
-
promise.status = status;
|
|
627
|
-
promise.headers = headers;
|
|
628
|
-
promise.header = header;
|
|
629
|
-
promise.entity = entity;
|
|
630
|
-
promise.follow = follow;
|
|
631
|
-
return promise;
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
function responsePromise() {
|
|
635
|
-
// 2016-04-03 原来依赖于when.js的语法。目前when由自己来实现
|
|
636
|
-
//return make(when.apply(when, arguments));
|
|
637
|
-
|
|
638
|
-
var args = arguments;
|
|
639
|
-
return when.promise(function (resolved, rejected) {
|
|
640
|
-
try {
|
|
641
|
-
var res = args[0];
|
|
642
|
-
resolved(res);
|
|
643
|
-
} catch (ex) {
|
|
644
|
-
rejected(ex);
|
|
645
|
-
}
|
|
646
|
-
}).then(args[1]).otherwise(args[2]);
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
responsePromise.make = make;
|
|
650
|
-
responsePromise.reject = function (val) {
|
|
651
|
-
return make(when.reject(val));
|
|
652
|
-
};
|
|
653
|
-
responsePromise.promise = function (func) {
|
|
654
|
-
return make(when.promise(func));
|
|
655
|
-
};
|
|
656
|
-
|
|
657
|
-
return responsePromise;
|
|
658
|
-
}.call(exports, __webpack_require__, exports, module),
|
|
659
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
660
|
-
})(__webpack_require__(0)
|
|
661
|
-
// Boilerplate for AMD and Node
|
|
662
|
-
);
|
|
663
|
-
|
|
664
|
-
/***/ }),
|
|
665
|
-
|
|
666
|
-
/***/ 23:
|
|
667
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
668
|
-
|
|
669
|
-
"use strict";
|
|
670
|
-
var __WEBPACK_AMD_DEFINE_RESULT__;
|
|
671
|
-
|
|
672
|
-
/**
|
|
673
|
-
* 文件用途说明 : 连接器的实现抽象层:默认支持XMLHttpRequest
|
|
674
|
-
* 以后还可以扩展不同的实现,例如jsonp、node
|
|
675
|
-
* @Client
|
|
676
|
-
*
|
|
677
|
-
* 项目名称 : dfzq-obboot-mobi
|
|
678
|
-
* 作者姓名 : crixusshen
|
|
679
|
-
* 创建日期 : 16/3/9
|
|
680
|
-
* 修改日期 : 16/3/9
|
|
681
|
-
* 版权所有 : 东方证券股份有限公司
|
|
682
|
-
**/
|
|
683
|
-
(function (define) {
|
|
684
|
-
'use strict';
|
|
685
|
-
|
|
686
|
-
var undef;
|
|
687
|
-
|
|
688
|
-
// http-default
|
|
689
|
-
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require) {
|
|
690
|
-
|
|
691
|
-
/**
|
|
692
|
-
* HTTP request
|
|
693
|
-
*
|
|
694
|
-
* @field {string} [method='GET'] HTTP method, commonly GET, POST, PUT, DELETE or HEAD
|
|
695
|
-
* @field {string|UrlBuilder} [path=''] path template with optional path variables
|
|
696
|
-
* @field {Object} [params] parameters for the path template and query string
|
|
697
|
-
* @field {Object} [headers] custom HTTP headers to send, in addition to the clients default headers
|
|
698
|
-
* @field [entity] the HTTP entity, common for POST or PUT requests
|
|
699
|
-
* @field {boolean} [canceled] true if the request has been canceled, set by the client
|
|
700
|
-
* @field {Function} [cancel] cancels the request if invoked, provided by the client
|
|
701
|
-
* @field {Client} [originator] the client that first handled this request, provided by the interceptor
|
|
702
|
-
*
|
|
703
|
-
* @class Request
|
|
704
|
-
*/
|
|
705
|
-
|
|
706
|
-
/**
|
|
707
|
-
* HTTP response
|
|
708
|
-
*
|
|
709
|
-
* @field {Object} [request] the request object as received by the root client
|
|
710
|
-
* @field {Object} [raw] the underlying request object, like XmlHttpRequest in a browser
|
|
711
|
-
* @field {number} [status.code] status code of the response (i.e. 200, 404)
|
|
712
|
-
* @field {string} [status.text] status phrase of the response
|
|
713
|
-
* @field {Object] [headers] response headers hash of normalized name, value pairs
|
|
714
|
-
* @field [entity] the response body
|
|
715
|
-
*
|
|
716
|
-
* @class Response
|
|
717
|
-
*/
|
|
718
|
-
|
|
719
|
-
/**
|
|
720
|
-
* HTTP client
|
|
721
|
-
*
|
|
722
|
-
* @field {function} 为默认连接器的function添加拦截器
|
|
723
|
-
*
|
|
724
|
-
* @param {Request} HTTP请求
|
|
725
|
-
* @returns {ResponsePromise<Response>} 一个promise处理HTTP响应
|
|
726
|
-
*
|
|
727
|
-
* @class Client
|
|
728
|
-
*/
|
|
729
|
-
|
|
730
|
-
/**
|
|
731
|
-
* 对请求器进行promise,使逻辑异步
|
|
732
|
-
* Extended when.js
|
|
733
|
-
*
|
|
734
|
-
* @method entity promise for the HTTP entity
|
|
735
|
-
* @method status promise for the HTTP status code
|
|
736
|
-
* @method headers promise for the HTTP response headers
|
|
737
|
-
* @method header promise for a specific HTTP response header
|
|
738
|
-
*
|
|
739
|
-
* @class ResponsePromise
|
|
740
|
-
* @extends Promise
|
|
741
|
-
*/
|
|
742
|
-
|
|
743
|
-
var client, target, platformDefault;
|
|
744
|
-
|
|
745
|
-
// 所有连接器的基类
|
|
746
|
-
client = __webpack_require__(11);
|
|
747
|
-
|
|
748
|
-
/**
|
|
749
|
-
* 做一次默认连接器的请求
|
|
750
|
-
* @param {Request} HTTP请求
|
|
751
|
-
* @returns {Promise<Response>} 一个promise处理HTTP响应
|
|
752
|
-
*/
|
|
753
|
-
function defaultClient() {
|
|
754
|
-
// target是一个默认连接器的实现类
|
|
755
|
-
return target.apply(undef, arguments);
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
/**
|
|
759
|
-
* 改变默认连接器
|
|
760
|
-
* @param {Client} 新的默认连接器
|
|
761
|
-
*/
|
|
762
|
-
defaultClient.setDefaultClient = function setDefaultClient(client) {
|
|
763
|
-
target = client;
|
|
764
|
-
};
|
|
765
|
-
|
|
766
|
-
/**
|
|
767
|
-
* 获取当前默认连接器的引用
|
|
768
|
-
* @returns {Client} 默认连接器
|
|
769
|
-
*/
|
|
770
|
-
defaultClient.getDefaultClient = function getDefaultClient() {
|
|
771
|
-
return target;
|
|
772
|
-
};
|
|
773
|
-
|
|
774
|
-
/**
|
|
775
|
-
* 重置默认连接器
|
|
776
|
-
*/
|
|
777
|
-
defaultClient.resetDefaultClient = function resetDefaultClient() {
|
|
778
|
-
target = platformDefault;
|
|
779
|
-
};
|
|
780
|
-
|
|
781
|
-
/**
|
|
782
|
-
* 设置当前平台的默认连接器
|
|
783
|
-
*/
|
|
784
|
-
defaultClient.setPlatformDefaultClient = function setPlatformDefaultClient(client) {
|
|
785
|
-
if (platformDefault) {
|
|
786
|
-
throw new Error('Unable to redefine platformDefaultClient');
|
|
787
|
-
}
|
|
788
|
-
target = platformDefault = client;
|
|
789
|
-
};
|
|
790
|
-
|
|
791
|
-
return client(defaultClient);
|
|
792
|
-
}.call(exports, __webpack_require__, exports, module),
|
|
793
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
794
|
-
})(__webpack_require__(0)
|
|
795
|
-
// Boilerplate for AMD and Node
|
|
796
|
-
);
|
|
797
|
-
|
|
798
|
-
/***/ }),
|
|
799
|
-
|
|
800
|
-
/***/ 230:
|
|
801
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
802
|
-
|
|
803
|
-
module.exports = __webpack_require__(95);
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
/***/ }),
|
|
807
|
-
|
|
808
|
-
/***/ 24:
|
|
809
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
810
|
-
|
|
811
|
-
"use strict";
|
|
812
|
-
var __WEBPACK_AMD_DEFINE_RESULT__;
|
|
813
|
-
|
|
814
|
-
/**
|
|
815
|
-
* 文件用途说明 :
|
|
816
|
-
*
|
|
817
|
-
* 项目名称 : dfzq-obboot-mobi
|
|
818
|
-
* 作者姓名 : crixusshen
|
|
819
|
-
* 创建日期 : 16/3/9
|
|
820
|
-
* 修改日期 : 16/3/9
|
|
821
|
-
* 版权所有 : 东方证券股份有限公司
|
|
822
|
-
**/
|
|
823
|
-
(function (define) {
|
|
824
|
-
'use strict';
|
|
825
|
-
|
|
826
|
-
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require) {
|
|
827
|
-
|
|
828
|
-
var empty = {};
|
|
829
|
-
|
|
830
|
-
function mixin(dest /*, sources... */) {
|
|
831
|
-
var i, l, source, name;
|
|
832
|
-
|
|
833
|
-
if (!dest) {
|
|
834
|
-
dest = {};
|
|
835
|
-
}
|
|
836
|
-
for (i = 1, l = arguments.length; i < l; i += 1) {
|
|
837
|
-
source = arguments[i];
|
|
838
|
-
for (name in source) {
|
|
839
|
-
if (!(name in dest) || dest[name] !== source[name] && (!(name in empty) || empty[name] !== source[name])) {
|
|
840
|
-
dest[name] = source[name];
|
|
841
|
-
}
|
|
842
|
-
}
|
|
843
|
-
}
|
|
844
|
-
|
|
845
|
-
return dest; // Object
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
return mixin;
|
|
849
|
-
}.call(exports, __webpack_require__, exports, module),
|
|
850
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
851
|
-
})(__webpack_require__(0)
|
|
852
|
-
// Boilerplate for AMD and Node
|
|
853
|
-
);
|
|
854
|
-
|
|
855
|
-
/***/ }),
|
|
856
|
-
|
|
857
|
-
/***/ 25:
|
|
858
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
859
|
-
|
|
860
|
-
"use strict";
|
|
861
|
-
var __WEBPACK_AMD_DEFINE_RESULT__;
|
|
862
|
-
|
|
863
|
-
/**
|
|
864
|
-
* 文件用途说明 :
|
|
865
|
-
*
|
|
866
|
-
* 项目名称 : dfzq-obboot-mobi
|
|
867
|
-
* 作者姓名 : crixusshen
|
|
868
|
-
* 创建日期 : 16/3/9
|
|
869
|
-
* 修改日期 : 16/3/9
|
|
870
|
-
* 版权所有 : 东方证券股份有限公司
|
|
871
|
-
**/
|
|
872
|
-
(function (define) {
|
|
873
|
-
'use strict';
|
|
874
|
-
|
|
875
|
-
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require) {
|
|
876
|
-
|
|
877
|
-
function normalizeHeaderName(name) {
|
|
878
|
-
return name.toLowerCase().split('-').map(function (chunk) {
|
|
879
|
-
return chunk.charAt(0).toUpperCase() + chunk.slice(1);
|
|
880
|
-
}).join('-');
|
|
881
|
-
}
|
|
882
|
-
|
|
883
|
-
return normalizeHeaderName;
|
|
884
|
-
}.call(exports, __webpack_require__, exports, module),
|
|
885
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
886
|
-
})(__webpack_require__(0)
|
|
887
|
-
// Boilerplate for AMD and Node
|
|
888
|
-
);
|
|
889
|
-
|
|
890
|
-
/***/ }),
|
|
891
|
-
|
|
892
|
-
/***/ 34:
|
|
893
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
894
|
-
|
|
895
|
-
"use strict";
|
|
896
|
-
var __WEBPACK_AMD_DEFINE_RESULT__;
|
|
897
|
-
/**
|
|
898
|
-
* 文件用途说明 : HTTP错误码抛出异常模块
|
|
899
|
-
*
|
|
900
|
-
* 项目名称 : dfzq-obboot-mobi
|
|
901
|
-
* 作者姓名 : crixusshen
|
|
902
|
-
* 创建日期 : 16/4/8
|
|
903
|
-
* 修改日期 : 16/4/8
|
|
904
|
-
* 版权所有 : 东方证券股份有限公司
|
|
905
|
-
**/
|
|
906
|
-
|
|
907
|
-
(function (define) {
|
|
908
|
-
|
|
909
|
-
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require) {
|
|
910
|
-
|
|
911
|
-
var interceptor, when;
|
|
912
|
-
|
|
913
|
-
interceptor = __webpack_require__(9);
|
|
914
|
-
when = __webpack_require__(6);
|
|
915
|
-
|
|
916
|
-
return interceptor({
|
|
917
|
-
init: function init(config) {
|
|
918
|
-
config.code = config.code || 400;
|
|
919
|
-
return config;
|
|
920
|
-
},
|
|
921
|
-
response: function response(_response, config) {
|
|
922
|
-
//interceptor.check(response);
|
|
923
|
-
if (_response.status && _response.status.code >= config.code) {
|
|
924
|
-
return when.reject({ response: _response, error: 'httperror' });
|
|
925
|
-
}
|
|
926
|
-
return _response;
|
|
927
|
-
}
|
|
928
|
-
});
|
|
929
|
-
}.call(exports, __webpack_require__, exports, module),
|
|
930
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
931
|
-
})(__webpack_require__(0)
|
|
932
|
-
// Boilerplate for AMD and Node
|
|
933
|
-
);
|
|
934
|
-
|
|
935
|
-
/***/ }),
|
|
936
|
-
|
|
937
|
-
/***/ 35:
|
|
938
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
939
|
-
|
|
940
|
-
"use strict";
|
|
941
|
-
var __WEBPACK_AMD_DEFINE_RESULT__;
|
|
942
|
-
|
|
943
|
-
/**
|
|
944
|
-
* 文件用途说明 : mime处理器,通过不同的mime进行格式转换
|
|
945
|
-
*
|
|
946
|
-
* 项目名称 : dfzq-obboot-mobi
|
|
947
|
-
* 作者姓名 : crixusshen
|
|
948
|
-
* 创建日期 : 16/3/10
|
|
949
|
-
* 修改日期 : 16/3/10
|
|
950
|
-
* 版权所有 : 东方证券股份有限公司
|
|
951
|
-
**/
|
|
952
|
-
(function (define) {
|
|
953
|
-
'use strict';
|
|
954
|
-
|
|
955
|
-
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require) {
|
|
956
|
-
|
|
957
|
-
var interceptor, mime, registry, noopConverter, when;
|
|
958
|
-
|
|
959
|
-
interceptor = __webpack_require__(9);
|
|
960
|
-
mime = __webpack_require__(17);
|
|
961
|
-
registry = __webpack_require__(37);
|
|
962
|
-
when = __webpack_require__(6);
|
|
963
|
-
|
|
964
|
-
noopConverter = {
|
|
965
|
-
read: function read(obj) {
|
|
966
|
-
return obj;
|
|
967
|
-
},
|
|
968
|
-
write: function write(obj) {
|
|
969
|
-
return obj;
|
|
970
|
-
}
|
|
971
|
-
};
|
|
972
|
-
|
|
973
|
-
return interceptor({
|
|
974
|
-
init: function init(config) {
|
|
975
|
-
config.registry = config.registry || registry;
|
|
976
|
-
return config;
|
|
977
|
-
},
|
|
978
|
-
request: function request(_request, config) {
|
|
979
|
-
var type, headers;
|
|
980
|
-
|
|
981
|
-
headers = _request.headers || (_request.headers = {});
|
|
982
|
-
type = mime.parse(headers['Content-Type'] = headers['Content-Type'] || config.mime || 'text/plain');
|
|
983
|
-
headers.Accept = headers.Accept || config.accept || type.raw + ', application/json;q=0.8, text/plain;q=0.5, */*;q=0.2';
|
|
984
|
-
|
|
985
|
-
if (!('entity' in _request)) {
|
|
986
|
-
return _request;
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
return config.registry.lookup(type).otherwise(function () {
|
|
990
|
-
// 转化器失败
|
|
991
|
-
if (config.permissive) {
|
|
992
|
-
return noopConverter;
|
|
993
|
-
}
|
|
994
|
-
throw 'mime-unknown';
|
|
995
|
-
}).then(function (converter) {
|
|
996
|
-
var client = config.client || _request.originator;
|
|
997
|
-
|
|
998
|
-
return when.attempt(converter.write, _request.entity, { client: client, request: _request, mime: type, registry: config.registry }).otherwise(function () {
|
|
999
|
-
throw 'mime-serialization';
|
|
1000
|
-
}).then(function (entity) {
|
|
1001
|
-
_request.entity = entity;
|
|
1002
|
-
return _request;
|
|
1003
|
-
});
|
|
1004
|
-
});
|
|
1005
|
-
},
|
|
1006
|
-
response: function response(_response, config) {
|
|
1007
|
-
if (!(_response.headers && _response.headers['Content-Type'] && _response.entity)) {
|
|
1008
|
-
return _response;
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
var type = mime.parse(_response.headers['Content-Type']);
|
|
1012
|
-
|
|
1013
|
-
return config.registry.lookup(type).otherwise(function () {
|
|
1014
|
-
return noopConverter;
|
|
1015
|
-
}).then(function (converter) {
|
|
1016
|
-
var client = config.client || _response.request && _response.request.originator;
|
|
1017
|
-
|
|
1018
|
-
return when.attempt(converter.read, _response.entity, { client: client, response: _response, mime: type, registry: config.registry }).otherwise(function (e) {
|
|
1019
|
-
_response.error = 'mime-deserialization';
|
|
1020
|
-
_response.cause = e;
|
|
1021
|
-
throw _response;
|
|
1022
|
-
}).then(function (entity) {
|
|
1023
|
-
_response.entity = entity;
|
|
1024
|
-
return _response;
|
|
1025
|
-
});
|
|
1026
|
-
});
|
|
1027
|
-
}
|
|
1028
|
-
});
|
|
1029
|
-
}.call(exports, __webpack_require__, exports, module),
|
|
1030
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
1031
|
-
})(__webpack_require__(0)
|
|
1032
|
-
// Boilerplate for AMD and Node
|
|
1033
|
-
);
|
|
1034
|
-
|
|
1035
|
-
/***/ }),
|
|
1036
|
-
|
|
1037
|
-
/***/ 36:
|
|
1038
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1039
|
-
|
|
1040
|
-
"use strict";
|
|
1041
|
-
var __WEBPACK_AMD_DEFINE_RESULT__;
|
|
1042
|
-
/**
|
|
1043
|
-
* 文件用途说明 : 超时模块
|
|
1044
|
-
*
|
|
1045
|
-
* 项目名称 : dfzq-obboot-mobi
|
|
1046
|
-
* 作者姓名 : crixusshen
|
|
1047
|
-
* 创建日期 : 16/4/8
|
|
1048
|
-
* 修改日期 : 16/4/8
|
|
1049
|
-
* 版权所有 : 东方证券股份有限公司
|
|
1050
|
-
**/
|
|
1051
|
-
|
|
1052
|
-
(function (define) {
|
|
1053
|
-
|
|
1054
|
-
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require) {
|
|
1055
|
-
|
|
1056
|
-
var interceptor = __webpack_require__(9);
|
|
1057
|
-
var when = __webpack_require__(6);
|
|
1058
|
-
|
|
1059
|
-
return interceptor({
|
|
1060
|
-
init: function init(config) {
|
|
1061
|
-
// 默认超时模式没有设置为0
|
|
1062
|
-
config.timeout = config.timeout || 0;
|
|
1063
|
-
// 默认短暂链接为false
|
|
1064
|
-
config.transient = !!config.transient;
|
|
1065
|
-
return config;
|
|
1066
|
-
},
|
|
1067
|
-
request: function request(_request, config) {
|
|
1068
|
-
// 构建timeout, transient和abortTrigger属性,其中abortTrigger是一个可能被放弃执行的xhr钩子
|
|
1069
|
-
var timeout, abortTrigger, transient;
|
|
1070
|
-
timeout = 'timeout' in _request ? _request.timeout : config.timeout;
|
|
1071
|
-
transient = 'transient' in _request ? _request.transient : config.transient;
|
|
1072
|
-
// 如果超时属性设置为负整数,则直接返回request
|
|
1073
|
-
if (timeout <= 0) {
|
|
1074
|
-
return _request;
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
|
-
// 构建超时(允许放弃请求)xhr钩子延时对象
|
|
1078
|
-
var self = this;
|
|
1079
|
-
abortTrigger = when.promise(function (resolve, reject) {
|
|
1080
|
-
self.timeout = setTimeout(function () {
|
|
1081
|
-
// 一旦xhr超时则将request返回给reject并标识是一个超时原因
|
|
1082
|
-
reject({ request: _request, error: 'timeout' });
|
|
1083
|
-
// 断开连接
|
|
1084
|
-
if (_request.cancel) {
|
|
1085
|
-
_request.cancel();
|
|
1086
|
-
if (transient) {
|
|
1087
|
-
_request.canceled = false;
|
|
1088
|
-
}
|
|
1089
|
-
} else if (!transient) {
|
|
1090
|
-
_request.canceled = true;
|
|
1091
|
-
}
|
|
1092
|
-
}, timeout);
|
|
1093
|
-
});
|
|
1094
|
-
|
|
1095
|
-
return new interceptor.ComplexRequest({ request: _request, abort: abortTrigger });
|
|
1096
|
-
},
|
|
1097
|
-
response: function response(_response) {
|
|
1098
|
-
// 一旦有服务端响应,清除包装类中已定义的超时器
|
|
1099
|
-
if (this.timeout) {
|
|
1100
|
-
clearTimeout(this.timeout);
|
|
1101
|
-
delete this.timeout;
|
|
1102
|
-
}
|
|
1103
|
-
return _response;
|
|
1104
|
-
}
|
|
1105
|
-
});
|
|
1106
|
-
}.call(exports, __webpack_require__, exports, module),
|
|
1107
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
1108
|
-
})(__webpack_require__(0)
|
|
1109
|
-
// Boilerplate for AMD and Node
|
|
1110
|
-
);
|
|
1111
|
-
|
|
1112
|
-
/***/ }),
|
|
1113
|
-
|
|
1114
|
-
/***/ 37:
|
|
1115
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1116
|
-
|
|
1117
|
-
"use strict";
|
|
1118
|
-
var __WEBPACK_AMD_DEFINE_RESULT__;
|
|
1119
|
-
|
|
1120
|
-
/**
|
|
1121
|
-
* 文件用途说明 : MIME发现者,设计源自于dubbo中的服务发现者
|
|
1122
|
-
*
|
|
1123
|
-
* 项目名称 : dfzq-obboot-mobi
|
|
1124
|
-
* 作者姓名 : crixusshen
|
|
1125
|
-
* 创建日期 : 16/3/11
|
|
1126
|
-
* 修改日期 : 16/3/11
|
|
1127
|
-
* 版权所有 : 东方证券股份有限公司
|
|
1128
|
-
**/
|
|
1129
|
-
(function (define) {
|
|
1130
|
-
'use strict';
|
|
1131
|
-
|
|
1132
|
-
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require) {
|
|
1133
|
-
|
|
1134
|
-
var mime, when, registry;
|
|
1135
|
-
|
|
1136
|
-
mime = __webpack_require__(17);
|
|
1137
|
-
when = __webpack_require__(6);
|
|
1138
|
-
|
|
1139
|
-
function Registry(mimes) {
|
|
1140
|
-
|
|
1141
|
-
/**
|
|
1142
|
-
* 从MIME TYPE中查找转换器
|
|
1143
|
-
*
|
|
1144
|
-
* @param {string} MIME TYPE
|
|
1145
|
-
* @return 一个promise类型的转化器
|
|
1146
|
-
*/
|
|
1147
|
-
this.lookup = function (type) {
|
|
1148
|
-
var parsed;
|
|
1149
|
-
|
|
1150
|
-
parsed = typeof type === 'string' ? mime.parse(type) : type;
|
|
1151
|
-
|
|
1152
|
-
if (mimes[parsed.raw]) {
|
|
1153
|
-
return mimes[parsed.raw];
|
|
1154
|
-
}
|
|
1155
|
-
if (mimes[parsed.type + parsed.suffix]) {
|
|
1156
|
-
return mimes[parsed.type + parsed.suffix];
|
|
1157
|
-
}
|
|
1158
|
-
if (mimes[parsed.type]) {
|
|
1159
|
-
return mimes[parsed.type];
|
|
1160
|
-
}
|
|
1161
|
-
if (mimes[parsed.suffix]) {
|
|
1162
|
-
return mimes[parsed.suffix];
|
|
1163
|
-
}
|
|
1164
|
-
|
|
1165
|
-
// MIME类型解析失败才会执行reject
|
|
1166
|
-
return when.reject(new Error('Unable to locate converter for mime "' + parsed.raw + '"'));
|
|
1167
|
-
};
|
|
1168
|
-
|
|
1169
|
-
/**
|
|
1170
|
-
* 针对MIME TYPE注册一个自定义转化器,并@extends Promise
|
|
1171
|
-
*
|
|
1172
|
-
* @param {string} MIME TYPE
|
|
1173
|
-
* @param [Converter] 转化器实例
|
|
1174
|
-
* @return 返回一个promise类型的Converter实例
|
|
1175
|
-
*
|
|
1176
|
-
*/
|
|
1177
|
-
this.register = function (type, converter) {
|
|
1178
|
-
// 2016-04-03 原来使用when.js的写法,目前自己来实现
|
|
1179
|
-
//mimes[type] = when(converter);
|
|
1180
|
-
mimes[type] = when.resolve(converter);
|
|
1181
|
-
return mimes[type];
|
|
1182
|
-
};
|
|
1183
|
-
}
|
|
1184
|
-
|
|
1185
|
-
registry = new Registry({});
|
|
1186
|
-
|
|
1187
|
-
// serializers
|
|
1188
|
-
registry.register('application/json', __webpack_require__(38));
|
|
1189
|
-
registry.register('application/x-www-form-urlencoded', __webpack_require__(39));
|
|
1190
|
-
registry.register('multipart/form-data', __webpack_require__(40));
|
|
1191
|
-
|
|
1192
|
-
return registry;
|
|
1193
|
-
}.call(exports, __webpack_require__, exports, module),
|
|
1194
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
1195
|
-
})(__webpack_require__(0)
|
|
1196
|
-
// Boilerplate for AMD and Node
|
|
1197
|
-
);
|
|
1198
|
-
|
|
1199
|
-
/***/ }),
|
|
1200
|
-
|
|
1201
|
-
/***/ 38:
|
|
1202
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1203
|
-
|
|
1204
|
-
"use strict";
|
|
1205
|
-
var __WEBPACK_AMD_DEFINE_RESULT__;
|
|
1206
|
-
|
|
1207
|
-
/**
|
|
1208
|
-
* 文件用途说明 : JSON转化器/序列化和反序列化
|
|
1209
|
-
*
|
|
1210
|
-
* 项目名称 : dfzq-obboot-mobi
|
|
1211
|
-
* 作者姓名 : crixusshen
|
|
1212
|
-
* 创建日期 : 16/3/11
|
|
1213
|
-
* 修改日期 : 16/3/11
|
|
1214
|
-
* 版权所有 : 东方证券股份有限公司
|
|
1215
|
-
**/
|
|
1216
|
-
(function (define) {
|
|
1217
|
-
'use strict';
|
|
1218
|
-
|
|
1219
|
-
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require) {
|
|
1220
|
-
|
|
1221
|
-
/**
|
|
1222
|
-
* JSON转化器
|
|
1223
|
-
*
|
|
1224
|
-
* @param {function} [reviver=undefined] 自定义JSON.parse
|
|
1225
|
-
* @param {function|Array} [replacer=undefined] 自定义JSON.stringify
|
|
1226
|
-
*/
|
|
1227
|
-
function createConverter(reviver, replacer) {
|
|
1228
|
-
return {
|
|
1229
|
-
|
|
1230
|
-
read: function read(str) {
|
|
1231
|
-
return JSON.parse(str, reviver);
|
|
1232
|
-
},
|
|
1233
|
-
|
|
1234
|
-
write: function write(obj) {
|
|
1235
|
-
return JSON.stringify(obj, replacer);
|
|
1236
|
-
},
|
|
1237
|
-
|
|
1238
|
-
extend: createConverter
|
|
1239
|
-
|
|
1240
|
-
};
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
|
-
return createConverter();
|
|
1244
|
-
}.call(exports, __webpack_require__, exports, module),
|
|
1245
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
1246
|
-
})(__webpack_require__(0)
|
|
1247
|
-
// Boilerplate for AMD and Node
|
|
1248
|
-
);
|
|
1249
|
-
|
|
1250
|
-
/***/ }),
|
|
1251
|
-
|
|
1252
|
-
/***/ 39:
|
|
1253
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1254
|
-
|
|
1255
|
-
"use strict";
|
|
1256
|
-
var __WEBPACK_AMD_DEFINE_RESULT__;
|
|
1257
|
-
|
|
1258
|
-
/**
|
|
1259
|
-
* 文件用途说明 : application/x-www-form-urlencoded转化器/序列化和反序列化
|
|
1260
|
-
*
|
|
1261
|
-
* 项目名称 : dfzq-obboot-mobi
|
|
1262
|
-
* 作者姓名 : crixusshen
|
|
1263
|
-
* 创建日期 : 16/3/11
|
|
1264
|
-
* 修改日期 : 16/3/11
|
|
1265
|
-
* 版权所有 : 东方证券股份有限公司
|
|
1266
|
-
**/
|
|
1267
|
-
(function (define) {
|
|
1268
|
-
'use strict';
|
|
1269
|
-
|
|
1270
|
-
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require) {
|
|
1271
|
-
|
|
1272
|
-
var encodedSpaceRE, urlEncodedSpaceRE;
|
|
1273
|
-
|
|
1274
|
-
encodedSpaceRE = /%20/g;
|
|
1275
|
-
urlEncodedSpaceRE = /\+/g;
|
|
1276
|
-
|
|
1277
|
-
function urlEncode(str) {
|
|
1278
|
-
str = encodeURIComponent(str);
|
|
1279
|
-
// spec says space should be encoded as '+'
|
|
1280
|
-
return str.replace(encodedSpaceRE, '+');
|
|
1281
|
-
}
|
|
1282
|
-
|
|
1283
|
-
function urlDecode(str) {
|
|
1284
|
-
// spec says space should be encoded as '+'
|
|
1285
|
-
str = str.replace(urlEncodedSpaceRE, ' ');
|
|
1286
|
-
return decodeURIComponent(str);
|
|
1287
|
-
}
|
|
1288
|
-
|
|
1289
|
-
function append(str, name, value) {
|
|
1290
|
-
if (Array.isArray(value)) {
|
|
1291
|
-
value.forEach(function (value) {
|
|
1292
|
-
str = append(str, name, value);
|
|
1293
|
-
});
|
|
1294
|
-
} else {
|
|
1295
|
-
if (str.length > 0) {
|
|
1296
|
-
str += '&';
|
|
1297
|
-
}
|
|
1298
|
-
str += urlEncode(name);
|
|
1299
|
-
if (value !== undefined && value !== null) {
|
|
1300
|
-
str += '=' + urlEncode(value);
|
|
1301
|
-
}
|
|
1302
|
-
}
|
|
1303
|
-
return str;
|
|
1304
|
-
}
|
|
1305
|
-
|
|
1306
|
-
return {
|
|
1307
|
-
|
|
1308
|
-
read: function read(str) {
|
|
1309
|
-
var obj = {};
|
|
1310
|
-
str.split('&').forEach(function (entry) {
|
|
1311
|
-
var pair, name, value;
|
|
1312
|
-
pair = entry.split('=');
|
|
1313
|
-
name = urlDecode(pair[0]);
|
|
1314
|
-
if (pair.length === 2) {
|
|
1315
|
-
value = urlDecode(pair[1]);
|
|
1316
|
-
} else {
|
|
1317
|
-
value = null;
|
|
1318
|
-
}
|
|
1319
|
-
if (name in obj) {
|
|
1320
|
-
if (!Array.isArray(obj[name])) {
|
|
1321
|
-
// convert to an array, perserving currnent value
|
|
1322
|
-
obj[name] = [obj[name]];
|
|
1323
|
-
}
|
|
1324
|
-
obj[name].push(value);
|
|
1325
|
-
} else {
|
|
1326
|
-
obj[name] = value;
|
|
1327
|
-
}
|
|
1328
|
-
});
|
|
1329
|
-
return obj;
|
|
1330
|
-
},
|
|
1331
|
-
|
|
1332
|
-
write: function write(obj) {
|
|
1333
|
-
var str = '';
|
|
1334
|
-
Object.keys(obj).forEach(function (name) {
|
|
1335
|
-
str = append(str, name, obj[name]);
|
|
1336
|
-
});
|
|
1337
|
-
return str;
|
|
1338
|
-
}
|
|
1339
|
-
|
|
1340
|
-
};
|
|
1341
|
-
}.call(exports, __webpack_require__, exports, module),
|
|
1342
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
1343
|
-
})(__webpack_require__(0)
|
|
1344
|
-
// Boilerplate for AMD and Node
|
|
1345
|
-
);
|
|
1346
|
-
|
|
1347
|
-
/***/ }),
|
|
1348
|
-
|
|
1349
|
-
/***/ 40:
|
|
1350
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1351
|
-
|
|
1352
|
-
"use strict";
|
|
1353
|
-
var __WEBPACK_AMD_DEFINE_RESULT__;
|
|
1354
|
-
|
|
1355
|
-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
|
1356
|
-
|
|
1357
|
-
/**
|
|
1358
|
-
* 文件用途说明 : application/x-www-form-urlencoded转化器/序列化和反序列化
|
|
1359
|
-
*
|
|
1360
|
-
* 项目名称 : dfzq-obboot-mobi
|
|
1361
|
-
* 作者姓名 : crixusshen
|
|
1362
|
-
* 创建日期 : 16/3/11
|
|
1363
|
-
* 修改日期 : 16/3/11
|
|
1364
|
-
* 版权所有 : 东方证券股份有限公司
|
|
1365
|
-
**/
|
|
1366
|
-
(function (define) {
|
|
1367
|
-
'use strict';
|
|
1368
|
-
|
|
1369
|
-
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require) {
|
|
1370
|
-
|
|
1371
|
-
function isFormElement(object) {
|
|
1372
|
-
return object && object.nodeType === 1 && // Node.ELEMENT_NODE
|
|
1373
|
-
object.tagName === 'FORM';
|
|
1374
|
-
}
|
|
1375
|
-
|
|
1376
|
-
function createFormDataFromObject(object) {
|
|
1377
|
-
var formData = new FormData();
|
|
1378
|
-
|
|
1379
|
-
var value;
|
|
1380
|
-
for (var property in object) {
|
|
1381
|
-
if (object.hasOwnProperty(property)) {
|
|
1382
|
-
value = object[property];
|
|
1383
|
-
|
|
1384
|
-
if (value instanceof File) {
|
|
1385
|
-
formData.append(property, value, value.name);
|
|
1386
|
-
} else if (value instanceof Blob) {
|
|
1387
|
-
formData.append(property, value);
|
|
1388
|
-
} else {
|
|
1389
|
-
formData.append(property, String(value));
|
|
1390
|
-
}
|
|
1391
|
-
}
|
|
1392
|
-
}
|
|
1393
|
-
|
|
1394
|
-
return formData;
|
|
1395
|
-
};
|
|
1396
|
-
|
|
1397
|
-
return {
|
|
1398
|
-
|
|
1399
|
-
write: function write(object) {
|
|
1400
|
-
if (typeof FormData === 'undefined') {
|
|
1401
|
-
throw new Error('The multipart/form-data mime serializer requires FormData support');
|
|
1402
|
-
}
|
|
1403
|
-
|
|
1404
|
-
// Support FormData directly.
|
|
1405
|
-
if (object instanceof FormData) {
|
|
1406
|
-
return object;
|
|
1407
|
-
}
|
|
1408
|
-
|
|
1409
|
-
// Support <form> elements.
|
|
1410
|
-
if (isFormElement(object)) {
|
|
1411
|
-
return new FormData(object);
|
|
1412
|
-
}
|
|
1413
|
-
|
|
1414
|
-
// Support plain objects, may contain File/Blob as value.
|
|
1415
|
-
if ((typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && object !== null) {
|
|
1416
|
-
return createFormDataFromObject(object);
|
|
1417
|
-
}
|
|
1418
|
-
|
|
1419
|
-
throw new Error('Unable to create FormData from object ' + object);
|
|
1420
|
-
}
|
|
1421
|
-
|
|
1422
|
-
};
|
|
1423
|
-
}.call(exports, __webpack_require__, exports, module),
|
|
1424
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
1425
|
-
})(__webpack_require__(0)
|
|
1426
|
-
// Boilerplate for AMD and Node
|
|
1427
|
-
);
|
|
1428
|
-
|
|
1429
|
-
/***/ }),
|
|
1430
|
-
|
|
1431
|
-
/***/ 9:
|
|
1432
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1433
|
-
|
|
1434
|
-
"use strict";
|
|
1435
|
-
var __WEBPACK_AMD_DEFINE_RESULT__;
|
|
1436
|
-
|
|
1437
|
-
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
|
1438
|
-
|
|
1439
|
-
/**
|
|
1440
|
-
* 文件用途说明 : 拦截器基类
|
|
1441
|
-
*
|
|
1442
|
-
* 项目名称 : dfzq-obboot-mobi
|
|
1443
|
-
* 作者姓名 : crixusshen
|
|
1444
|
-
* 创建日期 : 16/3/10
|
|
1445
|
-
* 修改日期 : 16/3/10
|
|
1446
|
-
* 版权所有 : 东方证券股份有限公司
|
|
1447
|
-
**/
|
|
1448
|
-
(function (define) {
|
|
1449
|
-
'use strict';
|
|
1450
|
-
|
|
1451
|
-
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require) {
|
|
1452
|
-
|
|
1453
|
-
var defaultClient, responsePromise, client, when, mixin;
|
|
1454
|
-
|
|
1455
|
-
defaultClient = __webpack_require__(23);
|
|
1456
|
-
responsePromise = __webpack_require__(18);
|
|
1457
|
-
client = __webpack_require__(11);
|
|
1458
|
-
when = __webpack_require__(6);
|
|
1459
|
-
mixin = __webpack_require__(24);
|
|
1460
|
-
|
|
1461
|
-
/**
|
|
1462
|
-
* 增加拦截器特性的连接器
|
|
1463
|
-
*
|
|
1464
|
-
* @param {Client} [target] 连接器实例
|
|
1465
|
-
* @param {Object} [config] 连接器的配置
|
|
1466
|
-
* @returns {Client} 具有拦截器功能的连接器实例
|
|
1467
|
-
*
|
|
1468
|
-
* @class Interceptor
|
|
1469
|
-
*/
|
|
1470
|
-
|
|
1471
|
-
function defaultInitHandler(config) {
|
|
1472
|
-
return config;
|
|
1473
|
-
}
|
|
1474
|
-
|
|
1475
|
-
function defaultRequestHandler(request /*, config, meta */) {
|
|
1476
|
-
return request;
|
|
1477
|
-
}
|
|
1478
|
-
|
|
1479
|
-
function defaultResponseHandler(response /*, config, meta */) {
|
|
1480
|
-
return response;
|
|
1481
|
-
}
|
|
1482
|
-
|
|
1483
|
-
//function race(promisesOrValues) {
|
|
1484
|
-
// return when.promise(function (resolve, reject) {
|
|
1485
|
-
// promisesOrValues.forEach(function (promiseOrValue) {
|
|
1486
|
-
// when(promiseOrValue, resolve, reject);
|
|
1487
|
-
// });
|
|
1488
|
-
// });
|
|
1489
|
-
//}
|
|
1490
|
-
|
|
1491
|
-
/**
|
|
1492
|
-
* 深复制
|
|
1493
|
-
* @param properties 需要复制的属性
|
|
1494
|
-
* @returns {ComplexRequest}
|
|
1495
|
-
* @constructor
|
|
1496
|
-
*/
|
|
1497
|
-
function ComplexRequest(properties) {
|
|
1498
|
-
if (!(this instanceof ComplexRequest)) {
|
|
1499
|
-
return new ComplexRequest(properties);
|
|
1500
|
-
}
|
|
1501
|
-
mixin(this, properties);
|
|
1502
|
-
}
|
|
1503
|
-
|
|
1504
|
-
/**
|
|
1505
|
-
* 拦截器基类
|
|
1506
|
-
*
|
|
1507
|
-
* @param {Function} [handlers.init] 初始化
|
|
1508
|
-
* @param {Function} [handlers.request] 请求前
|
|
1509
|
-
* @param {Function} [handlers.response] 响应前
|
|
1510
|
-
* @param {Function} [handlers.success] 成功响应
|
|
1511
|
-
* @param {Function} [handlers.error] 发生异常时
|
|
1512
|
-
* @param {Function} [handlers.client] 连接器
|
|
1513
|
-
*
|
|
1514
|
-
* @returns {Interceptor}
|
|
1515
|
-
*/
|
|
1516
|
-
function interceptor(handlers) {
|
|
1517
|
-
|
|
1518
|
-
var initHandler, requestHandler, successResponseHandler, errorResponseHandler;
|
|
1519
|
-
|
|
1520
|
-
handlers = handlers || {};
|
|
1521
|
-
|
|
1522
|
-
// 为每一分拦截器副本wrap对应的触发方法,如果没有则采用默认方法
|
|
1523
|
-
initHandler = handlers.init || defaultInitHandler;
|
|
1524
|
-
requestHandler = handlers.request || defaultRequestHandler;
|
|
1525
|
-
successResponseHandler = handlers.success || handlers.response || defaultResponseHandler;
|
|
1526
|
-
errorResponseHandler = handlers.error || function () {
|
|
1527
|
-
// 2016-04-03 去除when.js的实现,替换成自己实现的方式
|
|
1528
|
-
//return when((handlers.response || defaultResponseHandler).apply(this, arguments), when.reject, when.reject);
|
|
1529
|
-
return when.reject((handlers.response || defaultResponseHandler).apply(this, arguments));
|
|
1530
|
-
};
|
|
1531
|
-
|
|
1532
|
-
// 拦截器构造函数
|
|
1533
|
-
return function (target, config) {
|
|
1534
|
-
|
|
1535
|
-
// 拦截器处理代码块
|
|
1536
|
-
if ((typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object') {
|
|
1537
|
-
config = target;
|
|
1538
|
-
}
|
|
1539
|
-
if (typeof target !== 'function') {
|
|
1540
|
-
target = handlers.client || defaultClient;
|
|
1541
|
-
}
|
|
1542
|
-
|
|
1543
|
-
// 拦截器初始化方法调用
|
|
1544
|
-
config = initHandler(config || {});
|
|
1545
|
-
|
|
1546
|
-
// 拦截器interceptor构造器:开始递归执行所分配的拦截器,执行顺序与声明顺序相反,即后声明先拦截
|
|
1547
|
-
function interceptedClient(request) {
|
|
1548
|
-
var context, meta;
|
|
1549
|
-
context = {};
|
|
1550
|
-
meta = { 'arguments': Array.prototype.slice.call(arguments), client: interceptedClient };
|
|
1551
|
-
request = typeof request === 'string' ? { path: request } : request || {};
|
|
1552
|
-
request.originator = request.originator || interceptedClient;
|
|
1553
|
-
return responsePromise(requestHandler.call(context, request, config, meta), function (request) {
|
|
1554
|
-
var response, abort, next;
|
|
1555
|
-
next = target;
|
|
1556
|
-
// 如果是复杂类型请求则需要开展竞争模式
|
|
1557
|
-
if (request instanceof ComplexRequest) {
|
|
1558
|
-
// 一个被延时的超时defer
|
|
1559
|
-
abort = request.abort;
|
|
1560
|
-
next = request.client || next;
|
|
1561
|
-
response = request.response;
|
|
1562
|
-
request = request.request;
|
|
1563
|
-
}
|
|
1564
|
-
|
|
1565
|
-
response = response || when.resolve(request).then(function (request) {
|
|
1566
|
-
return when.resolve(next(request)).then(function (response) {
|
|
1567
|
-
return successResponseHandler.call(context, response, config, meta);
|
|
1568
|
-
}, function (response) {
|
|
1569
|
-
return errorResponseHandler.call(context, response, config, meta);
|
|
1570
|
-
});
|
|
1571
|
-
});
|
|
1572
|
-
return abort ? when.race([response, abort]) : response;
|
|
1573
|
-
}, function (error) {
|
|
1574
|
-
//return when.reject({ request: request, error: error });
|
|
1575
|
-
return when.reject(error);
|
|
1576
|
-
});
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
return client(interceptedClient, target);
|
|
1580
|
-
};
|
|
1581
|
-
}
|
|
1582
|
-
|
|
1583
|
-
interceptor.ComplexRequest = ComplexRequest;
|
|
1584
|
-
|
|
1585
|
-
interceptor.check = function (response) {
|
|
1586
|
-
if (response.error) {
|
|
1587
|
-
return when.reject(response);
|
|
1588
|
-
}
|
|
1589
|
-
};
|
|
1590
|
-
|
|
1591
|
-
return interceptor;
|
|
1592
|
-
}.call(exports, __webpack_require__, exports, module),
|
|
1593
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
1594
|
-
})(__webpack_require__(0)
|
|
1595
|
-
// Boilerplate for AMD and Node
|
|
1596
|
-
);
|
|
1597
|
-
|
|
1598
|
-
/***/ }),
|
|
1599
|
-
|
|
1600
|
-
/***/ 95:
|
|
1601
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
1602
|
-
|
|
1603
|
-
"use strict";
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
Object.defineProperty(exports, "__esModule", {
|
|
1607
|
-
value: true
|
|
1608
|
-
});
|
|
1609
|
-
exports.interceptor = exports.timeoutHandler = exports.errorcodeHandler = exports.mimeHandler = exports.httpClient = undefined;
|
|
1610
|
-
|
|
1611
|
-
var _default = __webpack_require__(23);
|
|
1612
|
-
|
|
1613
|
-
var _default2 = _interopRequireDefault(_default);
|
|
1614
|
-
|
|
1615
|
-
var _xhr = __webpack_require__(147);
|
|
1616
|
-
|
|
1617
|
-
var _xhr2 = _interopRequireDefault(_xhr);
|
|
1618
|
-
|
|
1619
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1620
|
-
|
|
1621
|
-
// /**
|
|
1622
|
-
// * 文件用途说明 : HTTP入口文件,默认设置了HTTP连接器实例
|
|
1623
|
-
// *
|
|
1624
|
-
// * 项目名称 : dfzq-obboot-mobi
|
|
1625
|
-
// * 作者姓名 : crixusshen
|
|
1626
|
-
// * 创建日期 : 16/3/9
|
|
1627
|
-
// * 修改日期 : 16/3/9
|
|
1628
|
-
// * 版权所有 : 东方证券股份有限公司
|
|
1629
|
-
// **/
|
|
1630
|
-
var mimeHandler = __webpack_require__(35);
|
|
1631
|
-
var errorcodeHandler = __webpack_require__(34);
|
|
1632
|
-
var timeoutHandler = __webpack_require__(36);
|
|
1633
|
-
var interceptor = __webpack_require__(9);
|
|
1634
|
-
|
|
1635
|
-
var httpClient = function httpClient(_) {
|
|
1636
|
-
_default2.default.setPlatformDefaultClient(_xhr2.default);
|
|
1637
|
-
return _default2.default;
|
|
1638
|
-
};
|
|
1639
|
-
|
|
1640
|
-
exports.httpClient = httpClient;
|
|
1641
|
-
exports.mimeHandler = mimeHandler;
|
|
1642
|
-
exports.errorcodeHandler = errorcodeHandler;
|
|
1643
|
-
exports.timeoutHandler = timeoutHandler;
|
|
1644
|
-
exports.interceptor = interceptor;
|
|
1645
|
-
|
|
1646
|
-
/***/ })
|
|
1647
|
-
|
|
1648
|
-
},[230]);
|
|
1649
|
-
});
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.fastman=e():t.fastman=e()}(this,function(){return webpackJsonpfastman([3],{11:function(t,e,n){"use strict";var r;!function(o){void 0!==(r=function(t){return function(t,e){return e&&(t.skip=function(){return e}),t.addInterceptor=function(e,n){return e(t,n)},t}}.call(e,n,e,t))&&(t.exports=r)}(n(0))},147:function(t,e,n){"use strict";var r;!function(o,i){void 0!==(r=function(t){function e(t){var e={};return t?(t.trim().split(s).forEach(function(t){var n,r,o;n=t.indexOf(":"),r=u(t.substring(0,n).trim()),o=t.substring(n+1).trim(),e[r]?Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]:e[r]=o}),e):e}function r(t,e){return Object.keys(e||{}).forEach(function(n){if(e.hasOwnProperty(n)&&n in t)try{t[n]=e[n]}catch(t){}}),t}var o,u,c,a,s;return n(6),a=n(11),o=n(148),u=n(25),c=n(18),s=/[\r|\n]+/,a(function(t){return c.promise(function(n,u){var c,a,s,f,l,p,d,m;if(t="string"==typeof t?{path:t}:t||{},d={request:t},t.canceled)return d.error="precanceled",void u(d);if(!(m=t.engine||i.XMLHttpRequest))return void u({request:t,error:"xhr-not-available"});l=t.entity,t.method=t.method||(l?"POST":"GET"),a=t.method,s=new o(t.path||"",t.params).build();try{if("withCredentials"in(c=new m)){if(d.raw=c,r(c,t.mixin),c.open(a,s,!0),r(c,t.mixin),t.xhrFields&&t.xhrFields.withCredentials){var h=t.xhrFields.withCredentials;"string"==typeof h&&"true"===h.toLowerCase()?c.withCredentials=!0:"boolean"==typeof h&&h&&(c.withCredentials=!0)}f=t.headers;for(p in f)"Content-Type"===p&&"multipart/form-data"===f[p]||c.setRequestHeader(p,f[p]);t.canceled=!1,t.cancel=function(){t.canceled=!0,c.abort()},c.onreadystatechange=function(){t.canceled||c.readyState===(m.DONE||4)&&(d.status={code:c.status,text:c.statusText},d.headers=e(c.getAllResponseHeaders()),d.entity=c.responseText,d.status.code>0?n(d):setTimeout(function(){n(d)},0))};try{c.onerror=function(t){d.error="loaderror",u(d)}}catch(t){}c.send(l)}else if("undefined"!=typeof XDomainRequest){var y=l;y instanceof Object&&(y=JSON.stringify(y));var v=new XDomainRequest;v.open(t.method,s),v.timeout=4e4,v.onload=function(){try{var e={request:t,status:{code:200,text:"OK"},headers:{"Content-Type":v.contentType||"application/json"},entity:v.responseText};n(e)}catch(t){var e={errpr:"loaderror"};u(e)}},v.onprogress=function(){},v.ontimeout=function(){u({errpr:"biztimeouterror"})},v.onerror=function(){u({errpr:"loaderror"})},setTimeout(function(){v.send(y)},0)}else{var d={errpr:"nocors"};u(d)}}catch(t){d.error="loaderror",u(d)}})})}.call(e,n,e,t))&&(t.exports=r)}(n(0),"undefined"!=typeof window?window:void 0)},148:function(t,e,n){"use strict";var r;!function(o){void 0!==(r=function(t){function e(t,e){var n,r,o,i;if(n=t,o={},e){for(r in e)i=new RegExp("\\{"+r+"\\}"),i.test(n)?n=n.replace(i,encodeURIComponent(e[r]),"g"):o[r]=e[r];for(r in o)n+=-1===n.indexOf("?")?"?":"&",n+=encodeURIComponent(r),null!==o[r]&&void 0!==o[r]&&(n+="=",n+=encodeURIComponent(o[r]))}return n}function r(t,e){return 0===t.indexOf(e)}function o(t,e){if(!(this instanceof o))return new o(t,e);t instanceof o?(this._template=t.template,this._params=i({},this._params,e)):(this._template=(t||"").toString(),this._params=e||{})}var i,u,c,a,s;return i=n(24),c=/([a-z][a-z0-9\+\-\.]*:)\/\/([^@]+@)?(([^:\/]+)(:([0-9]+))?)?(\/[^?#]*)?(\?[^#]*)?(#\S*)?/i,a=/^([a-z][a-z0-9\-\+\.]*:\/\/|\/)/i,s=/([a-z][a-z0-9\+\-\.]*:)\/\/([^@]+@)?(([^:\/]+)(:([0-9]+))?)?\//i,o.prototype={append:function(t,e){return new o(this._template+t,i({},this._params,e))},fullyQualify:function(){if(!location)return this;if(this.isFullyQualified())return this;var t=this._template;return r(t,"//")?t=u.protocol+t:r(t,"/")?t=u.origin+t:this.isAbsolute()||(t=u.origin+u.pathname.substring(0,u.pathname.lastIndexOf("/")+1)),-1===t.indexOf("/",8)&&(t+="/"),new o(t,this._params)},isAbsolute:function(){return a.test(this.build())},isFullyQualified:function(){return s.test(this.build())},isCrossOrigin:function(){if(!u)return!0;var t=this.parts();return t.protocol!==u.protocol||t.hostname!==u.hostname||t.port!==u.port},parts:function(){var t,e;return t=this.fullyQualify().build().match(c),e={href:t[0],protocol:t[1],host:t[3]||"",hostname:t[4]||"",port:t[6],pathname:t[7]||"",search:t[8]||"",hash:t[9]||""},e.origin=e.protocol+"//"+e.host,e.port=e.port||("https:"===e.protocol?"443":"http:"===e.protocol?"80":""),e},build:function(t){return e(this._template,i({},this._params,t))},toString:function(){return this.build()}},u=location?new o(location.href).parts():void 0,o}.call(e,n,e,t))&&(t.exports=r)}(n(0))},17:function(t,e,n){"use strict";var r;!function(o){var i;void 0!==(r=function(t){function e(t){var e,n;return e=t.split(";"),n=e[0].trim().split("+"),{raw:t,type:n[0],suffix:n[1]?"+"+n[1]:"",params:e.slice(1).reduce(function(t,e){return e=e.split("="),t[e[0].trim()]=e[1]?e[1].trim():i,t},{})}}return{parse:e}}.call(e,n,e,t))&&(t.exports=r)}(n(0))},18:function(t,e,n){"use strict";var r;!function(o){void 0!==(r=function(t){function e(t,e){return t.then(function(t){return t&&t[e]},function(t){return f.reject(t&&t[e])})}function r(){return e(this,"entity")}function o(){return e(e(this,"status"),"code")}function i(){return e(this,"headers")}function u(t){return t=l(t),e(this.headers(),t)}function c(t){return t=[].concat(t),a(f.reduce(t,function(t,e){if("string"==typeof e&&(e={rel:e}),"function"!=typeof t.entity.clientFor)throw new Error("Hypermedia response expected");return t.entity.clientFor(e.rel)({params:e.params})},this))}function a(t){return t.status=o,t.headers=i,t.header=u,t.entity=r,t.follow=c,t}function s(){var t=arguments;return f.promise(function(e,n){try{e(t[0])}catch(t){n(t)}}).then(t[1]).otherwise(t[2])}var f=n(6),l=n(25);return s.make=a,s.reject=function(t){return a(f.reject(t))},s.promise=function(t){return a(f.promise(t))},s}.call(e,n,e,t))&&(t.exports=r)}(n(0))},23:function(t,e,n){"use strict";var r;!function(o){var i;void 0!==(r=function(t){function e(){return o.apply(i,arguments)}var r,o,u;return r=n(11),e.setDefaultClient=function(t){o=t},e.getDefaultClient=function(){return o},e.resetDefaultClient=function(){o=u},e.setPlatformDefaultClient=function(t){if(u)throw new Error("Unable to redefine platformDefaultClient");o=u=t},r(e)}.call(e,n,e,t))&&(t.exports=r)}(n(0))},230:function(t,e,n){t.exports=n(95)},24:function(t,e,n){"use strict";var r;!function(o){void 0!==(r=function(t){function e(t){var e,r,o,i;for(t||(t={}),e=1,r=arguments.length;e<r;e+=1){o=arguments[e];for(i in o)i in t&&(t[i]===o[i]||i in n&&n[i]===o[i])||(t[i]=o[i])}return t}var n={};return e}.call(e,n,e,t))&&(t.exports=r)}(n(0))},25:function(t,e,n){"use strict";var r;!function(o){void 0!==(r=function(t){function e(t){return t.toLowerCase().split("-").map(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}).join("-")}return e}.call(e,n,e,t))&&(t.exports=r)}(n(0))},34:function(t,e,n){"use strict";var r;!function(o){void 0!==(r=function(t){var e,r;return e=n(9),r=n(6),e({init:function(t){return t.code=t.code||400,t},response:function(t,e){return t.status&&t.status.code>=e.code?r.reject({response:t,error:"httperror"}):t}})}.call(e,n,e,t))&&(t.exports=r)}(n(0))},35:function(t,e,n){"use strict";var r;!function(o){void 0!==(r=function(t){var e,r,o,i,u;return e=n(9),r=n(17),o=n(37),u=n(6),i={read:function(t){return t},write:function(t){return t}},e({init:function(t){return t.registry=t.registry||o,t},request:function(t,e){var n,o;return o=t.headers||(t.headers={}),n=r.parse(o["Content-Type"]=o["Content-Type"]||e.mime||"text/plain"),o.Accept=o.Accept||e.accept||n.raw+", application/json;q=0.8, text/plain;q=0.5, */*;q=0.2","entity"in t?e.registry.lookup(n).otherwise(function(){if(e.permissive)return i;throw"mime-unknown"}).then(function(r){var o=e.client||t.originator;return u.attempt(r.write,t.entity,{client:o,request:t,mime:n,registry:e.registry}).otherwise(function(){throw"mime-serialization"}).then(function(e){return t.entity=e,t})}):t},response:function(t,e){if(!(t.headers&&t.headers["Content-Type"]&&t.entity))return t;var n=r.parse(t.headers["Content-Type"]);return e.registry.lookup(n).otherwise(function(){return i}).then(function(r){var o=e.client||t.request&&t.request.originator;return u.attempt(r.read,t.entity,{client:o,response:t,mime:n,registry:e.registry}).otherwise(function(e){throw t.error="mime-deserialization",t.cause=e,t}).then(function(e){return t.entity=e,t})})}})}.call(e,n,e,t))&&(t.exports=r)}(n(0))},36:function(t,e,n){"use strict";var r;!function(o){void 0!==(r=function(t){var e=n(9),r=n(6);return e({init:function(t){return t.timeout=t.timeout||0,t.transient=!!t.transient,t},request:function(t,n){var o,i,u;if(o="timeout"in t?t.timeout:n.timeout,u="transient"in t?t.transient:n.transient,o<=0)return t;var c=this;return i=r.promise(function(e,n){c.timeout=setTimeout(function(){n({request:t,error:"timeout"}),t.cancel?(t.cancel(),u&&(t.canceled=!1)):u||(t.canceled=!0)},o)}),new e.ComplexRequest({request:t,abort:i})},response:function(t){return this.timeout&&(clearTimeout(this.timeout),delete this.timeout),t}})}.call(e,n,e,t))&&(t.exports=r)}(n(0))},37:function(t,e,n){"use strict";var r;!function(o){void 0!==(r=function(t){function e(t){this.lookup=function(e){var n;return n="string"==typeof e?r.parse(e):e,t[n.raw]?t[n.raw]:t[n.type+n.suffix]?t[n.type+n.suffix]:t[n.type]?t[n.type]:t[n.suffix]?t[n.suffix]:o.reject(new Error('Unable to locate converter for mime "'+n.raw+'"'))},this.register=function(e,n){return t[e]=o.resolve(n),t[e]}}var r,o,i;return r=n(17),o=n(6),i=new e({}),i.register("application/json",n(38)),i.register("application/x-www-form-urlencoded",n(39)),i.register("multipart/form-data",n(40)),i}.call(e,n,e,t))&&(t.exports=r)}(n(0))},38:function(t,e,n){"use strict";var r;!function(o){void 0!==(r=function(t){function e(t,n){return{read:function(e){return JSON.parse(e,t)},write:function(t){return JSON.stringify(t,n)},extend:e}}return e()}.call(e,n,e,t))&&(t.exports=r)}(n(0))},39:function(t,e,n){"use strict";var r;!function(o){void 0!==(r=function(t){function e(t){return t=encodeURIComponent(t),t.replace(o,"+")}function n(t){return t=t.replace(i," "),decodeURIComponent(t)}function r(t,n,o){return Array.isArray(o)?o.forEach(function(e){t=r(t,n,e)}):(t.length>0&&(t+="&"),t+=e(n),void 0!==o&&null!==o&&(t+="="+e(o))),t}var o,i;return o=/%20/g,i=/\+/g,{read:function(t){var e={};return t.split("&").forEach(function(t){var r,o,i;r=t.split("="),o=n(r[0]),i=2===r.length?n(r[1]):null,o in e?(Array.isArray(e[o])||(e[o]=[e[o]]),e[o].push(i)):e[o]=i}),e},write:function(t){var e="";return Object.keys(t).forEach(function(n){e=r(e,n,t[n])}),e}}}.call(e,n,e,t))&&(t.exports=r)}(n(0))},40:function(t,e,n){"use strict";var r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(i){void 0!==(r=function(t){function e(t){return t&&1===t.nodeType&&"FORM"===t.tagName}function n(t){var e,n=new FormData;for(var r in t)t.hasOwnProperty(r)&&(e=t[r],e instanceof File?n.append(r,e,e.name):e instanceof Blob?n.append(r,e):n.append(r,String(e)));return n}return{write:function(t){if("undefined"==typeof FormData)throw new Error("The multipart/form-data mime serializer requires FormData support");if(t instanceof FormData)return t;if(e(t))return new FormData(t);if("object"===(void 0===t?"undefined":o(t))&&null!==t)return n(t);throw new Error("Unable to create FormData from object "+t)}}}.call(e,n,e,t))&&(t.exports=r)}(n(0))},9:function(t,e,n){"use strict";var r,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(i){void 0!==(r=function(t){function e(t){return t}function r(t){return t}function i(t){return t}function u(t){if(!(this instanceof u))return new u(t);p(this,t)}function c(t){var n,c,p,d;return t=t||{},n=t.init||e,c=t.request||r,p=t.success||t.response||i,d=t.error||function(){return l.reject((t.response||i).apply(this,arguments))},function(e,r){function i(t){var n,o;return n={},o={arguments:Array.prototype.slice.call(arguments),client:i},t="string"==typeof t?{path:t}:t||{},t.originator=t.originator||i,s(c.call(n,t,r,o),function(t){var i,c,a;return a=e,t instanceof u&&(c=t.abort,a=t.client||a,i=t.response,t=t.request),i=i||l.resolve(t).then(function(t){return l.resolve(a(t)).then(function(t){return p.call(n,t,r,o)},function(t){return d.call(n,t,r,o)})}),c?l.race([i,c]):i},function(t){return l.reject(t)})}return"object"===(void 0===e?"undefined":o(e))&&(r=e),"function"!=typeof e&&(e=t.client||a),r=n(r||{}),f(i,e)}}var a,s,f,l,p;return a=n(23),s=n(18),f=n(11),l=n(6),p=n(24),c.ComplexRequest=u,c.check=function(t){if(t.error)return l.reject(t)},c}.call(e,n,e,t))&&(t.exports=r)}(n(0))},95:function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.interceptor=e.timeoutHandler=e.errorcodeHandler=e.mimeHandler=e.httpClient=void 0;var o=n(23),i=r(o),u=n(147),c=r(u),a=n(35),s=n(34),f=n(36),l=n(9),p=function(t){return i.default.setPlatformDefaultClient(c.default),i.default};e.httpClient=p,e.mimeHandler=a,e.errorcodeHandler=s,e.timeoutHandler=f,e.interceptor=l}},[230])});
|