anncic-api 1.0.0
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/config/config.default.d.ts +15 -0
- package/dist/config/config.default.js +1 -0
- package/dist/config/config.production.d.ts +7 -0
- package/dist/config/config.production.js +1 -0
- package/dist/configuration.d.ts +14 -0
- package/dist/configuration.js +1 -0
- package/dist/decorator/Action.d.ts +9 -0
- package/dist/decorator/Action.js +1 -0
- package/dist/decorator/ActionApi.d.ts +2 -0
- package/dist/decorator/ActionApi.js +1 -0
- package/dist/decorator/ActionApitest.d.ts +2 -0
- package/dist/decorator/ActionApitest.js +1 -0
- package/dist/decorator/Controller.d.ts +0 -0
- package/dist/decorator/Controller.js +0 -0
- package/dist/exception/ApiError.d.ts +7 -0
- package/dist/exception/ApiError.js +1 -0
- package/dist/helper/getRoutes.d.ts +8 -0
- package/dist/helper/getRoutes.js +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +1 -0
- package/dist/service/ApiService.d.ts +12 -0
- package/dist/service/ApiService.js +1 -0
- package/dist/service/ApitestService.d.ts +17 -0
- package/dist/service/ApitestService.js +1 -0
- package/dist/service/ExcelService.d.ts +20 -0
- package/dist/service/ExcelService.js +1 -0
- package/dist/types/action.d.ts +23 -0
- package/dist/types/action.js +1 -0
- package/dist/types/common.d.ts +14 -0
- package/dist/types/common.js +1 -0
- package/index.d.ts +16 -0
- package/package.json +45 -0
- package/public/apitest.js +941 -0
- package/public/config.js +95 -0
- package/public/index.html +118 -0
- package/public/style/apitest.css +128 -0
- package/public/style/bootstrap/bootstrap.css +6799 -0
- package/public/style/bootstrap/bootstrap.js +2363 -0
- package/public/style/bootstrap.css +6799 -0
- package/public/style/bootstrap.css.map +1 -0
- package/public/style/jquery/jquery.min.js +6 -0
- package/public/style/md5/md5.js +1 -0
- package/public/style/pinyin.js +45 -0
- package/public/style/pretty-json/backbone-min.js +2 -0
- package/public/style/pretty-json/pretty-json-min.js +334 -0
- package/public/style/pretty-json/pretty-json.css +48 -0
- package/public/style/pretty-json/underscore-min.js +6 -0
- package/public/style/pretty-json.css +48 -0
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
/*
|
|
2
|
+
License here,
|
|
3
|
+
I dont think too much about licence
|
|
4
|
+
just feel free to do anything you want... :-)
|
|
5
|
+
*/
|
|
6
|
+
var PrettyJSON = {
|
|
7
|
+
view: {},
|
|
8
|
+
tpl: {}
|
|
9
|
+
};
|
|
10
|
+
PrettyJSON.util = {
|
|
11
|
+
isObject: function(v) {
|
|
12
|
+
return Object.prototype.toString.call(v) === '[object Object]';
|
|
13
|
+
},
|
|
14
|
+
pad: function(str, length) {
|
|
15
|
+
str = String(str);
|
|
16
|
+
while (str.length < length) str = '0' + str;
|
|
17
|
+
return str;
|
|
18
|
+
},
|
|
19
|
+
dateFormat: function(date, f) {
|
|
20
|
+
f = f.replace('YYYY', date.getFullYear());
|
|
21
|
+
f = f.replace('YY', String(date.getFullYear()).slice( - 2));
|
|
22
|
+
f = f.replace('MM', PrettyJSON.util.pad(date.getMonth() + 1, 2));
|
|
23
|
+
f = f.replace('DD', PrettyJSON.util.pad(date.getDate(), 2));
|
|
24
|
+
f = f.replace('HH24', PrettyJSON.util.pad(date.getHours(), 2));
|
|
25
|
+
f = f.replace('HH', PrettyJSON.util.pad((date.getHours() % 12), 2));
|
|
26
|
+
f = f.replace('MI', PrettyJSON.util.pad(date.getMinutes(), 2));
|
|
27
|
+
f = f.replace('SS', PrettyJSON.util.pad(date.getSeconds(), 2));
|
|
28
|
+
return f;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
PrettyJSON.tpl.Node = '' + '<span class="node-container">' + '<span class="node-top node-bracket" />' + '<span class="node-content-wrapper">' + '<ul class="node-body" />' + '</span>' + '<span class="node-down node-bracket" />' + '</span>';
|
|
33
|
+
PrettyJSON.tpl.Leaf = '' + '<span class="leaf-container">' + '<span class="<%= type %>" ondblclick="selectPrettySpan(this,event);"><%=data%></span><span><%= coma %></span>' + '</span>';//asinw edit
|
|
34
|
+
PrettyJSON.view.Node = Backbone.View.extend({
|
|
35
|
+
tagName: 'span',
|
|
36
|
+
data: null,
|
|
37
|
+
level: 1,
|
|
38
|
+
path: '',
|
|
39
|
+
type: '',
|
|
40
|
+
size: 0,
|
|
41
|
+
isLast: true,
|
|
42
|
+
rendered: false,
|
|
43
|
+
events: {
|
|
44
|
+
'click .node-bracket': 'collapse',
|
|
45
|
+
'mouseover .node-container': 'mouseover',
|
|
46
|
+
'mouseout .node-container': 'mouseout'
|
|
47
|
+
},
|
|
48
|
+
initialize: function(opt) {
|
|
49
|
+
this.options = opt;
|
|
50
|
+
this.data = this.options.data;
|
|
51
|
+
this.level = this.options.level || this.level;
|
|
52
|
+
this.path = this.options.path;
|
|
53
|
+
this.isLast = _.isUndefined(this.options.isLast) ? this.isLast: this.options.isLast;
|
|
54
|
+
this.dateFormat = this.options.dateFormat;
|
|
55
|
+
var m = this.getMeta();
|
|
56
|
+
this.type = m.type;
|
|
57
|
+
this.size = m.size;
|
|
58
|
+
this.childs = [];
|
|
59
|
+
this.render();
|
|
60
|
+
if (this.level == 1)
|
|
61
|
+
this.show();
|
|
62
|
+
},
|
|
63
|
+
getMeta: function() {
|
|
64
|
+
var val = {
|
|
65
|
+
size: _.size(this.data),
|
|
66
|
+
type: _.isArray(this.data) ? 'array': 'object',
|
|
67
|
+
|
|
68
|
+
};
|
|
69
|
+
return val;
|
|
70
|
+
},
|
|
71
|
+
elements: function() {
|
|
72
|
+
this.els = {
|
|
73
|
+
container: $(this.el).find('.node-container'),
|
|
74
|
+
contentWrapper: $(this.el).find('.node-content-wrapper'),
|
|
75
|
+
top: $(this.el).find('.node-top'),
|
|
76
|
+
ul: $(this.el).find('.node-body'),
|
|
77
|
+
down: $(this.el).find('.node-down')
|
|
78
|
+
};
|
|
79
|
+
},
|
|
80
|
+
render: function() {
|
|
81
|
+
this.tpl = _.template(PrettyJSON.tpl.Node);
|
|
82
|
+
$(this.el).html(this.tpl);
|
|
83
|
+
this.elements();
|
|
84
|
+
var b = this.getBrackets();
|
|
85
|
+
this.els.top.html(b.top);
|
|
86
|
+
this.els.down.html(b.bottom);
|
|
87
|
+
this.hide();
|
|
88
|
+
return this;
|
|
89
|
+
},
|
|
90
|
+
renderChilds: function() {
|
|
91
|
+
var keyDescList = {};//axing add
|
|
92
|
+
if (this.data['modelType'] && getDescriptionsInModel)
|
|
93
|
+
{
|
|
94
|
+
keyDescList = getDescriptionsInModel(this.data['modelType']);
|
|
95
|
+
}
|
|
96
|
+
var count = 1;
|
|
97
|
+
|
|
98
|
+
if( this.data ){
|
|
99
|
+
for(var key in this.data){
|
|
100
|
+
var val = this.data[key];
|
|
101
|
+
var isLast = (count == this.size);
|
|
102
|
+
count = count + 1;
|
|
103
|
+
var path = (this.type == 'array') ? this.path + '[' + key + ']': this.path + '.' + key;
|
|
104
|
+
var opt = {
|
|
105
|
+
key: key,
|
|
106
|
+
data: val,
|
|
107
|
+
parent: this,
|
|
108
|
+
path: path,
|
|
109
|
+
level: this.level + 1,
|
|
110
|
+
dateFormat: this.dateFormat,
|
|
111
|
+
isLast: isLast
|
|
112
|
+
};
|
|
113
|
+
var child = (PrettyJSON.util.isObject(val) || _.isArray(val)) ? new PrettyJSON.view.Node(opt) : new PrettyJSON.view.Leaf(opt);
|
|
114
|
+
child.on('mouseover',
|
|
115
|
+
function(e, path) {
|
|
116
|
+
this.trigger("mouseover", e, path);
|
|
117
|
+
},
|
|
118
|
+
this);
|
|
119
|
+
child.on('mouseout',
|
|
120
|
+
function(e) {
|
|
121
|
+
this.trigger("mouseout", e);
|
|
122
|
+
},
|
|
123
|
+
this);
|
|
124
|
+
var li = $('<li/>');
|
|
125
|
+
if (keyDescList[key])//axing add
|
|
126
|
+
{
|
|
127
|
+
li.attr('title',keyDescList[key]);
|
|
128
|
+
li.tooltip({'placement':'left','delay': { "show": 0, "hide": 0 }});
|
|
129
|
+
}
|
|
130
|
+
var colom = ' : ';
|
|
131
|
+
var left = $('<span' + ( typeof(val) == 'string' ? ' ondblclick="previewThisData(this,event);" el-string="'+encodeURIComponent(val)+'"':'')+ '/>');
|
|
132
|
+
var right = $('<span />').append(child.el); (this.type == 'array') ? left.html('') : left.html(key + colom);
|
|
133
|
+
left.append(right);
|
|
134
|
+
li.append(left);
|
|
135
|
+
this.els.ul.append(li);
|
|
136
|
+
child.parent = this;
|
|
137
|
+
this.childs.push(child);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
isVisible: function() {
|
|
142
|
+
return this.els.contentWrapper.is(":visible");
|
|
143
|
+
},
|
|
144
|
+
collapse: function(e) {
|
|
145
|
+
e.stopPropagation();
|
|
146
|
+
this.isVisible() ? this.hide() : this.show();
|
|
147
|
+
this.trigger("collapse", e);
|
|
148
|
+
},
|
|
149
|
+
show: function() {
|
|
150
|
+
if (!this.rendered) {
|
|
151
|
+
this.renderChilds();
|
|
152
|
+
this.rendered = true;
|
|
153
|
+
}
|
|
154
|
+
this.els.top.html(this.getBrackets().top);
|
|
155
|
+
this.els.contentWrapper.show();
|
|
156
|
+
this.els.down.show();
|
|
157
|
+
},
|
|
158
|
+
hide: function() {
|
|
159
|
+
var b = this.getBrackets();
|
|
160
|
+
this.els.top.html(b.close);
|
|
161
|
+
this.els.contentWrapper.hide();
|
|
162
|
+
this.els.down.hide();
|
|
163
|
+
},
|
|
164
|
+
getBrackets: function() {
|
|
165
|
+
var v = {
|
|
166
|
+
top: '{',
|
|
167
|
+
bottom: '}',
|
|
168
|
+
close: '{ ... }'
|
|
169
|
+
};
|
|
170
|
+
if (this.type == 'array') {
|
|
171
|
+
v = {
|
|
172
|
+
top: '[',
|
|
173
|
+
bottom: ']',
|
|
174
|
+
close: '[ ... ]'
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
v.bottom = (this.isLast) ? v.bottom: v.bottom + ',';
|
|
178
|
+
v.close = (this.isLast) ? v.close: v.close + ',';
|
|
179
|
+
return v;
|
|
180
|
+
},
|
|
181
|
+
mouseover: function(e) {
|
|
182
|
+
e.stopPropagation();
|
|
183
|
+
this.trigger("mouseover", e, this.path);
|
|
184
|
+
},
|
|
185
|
+
mouseout: function(e) {
|
|
186
|
+
e.stopPropagation();
|
|
187
|
+
this.trigger("mouseout", e);
|
|
188
|
+
},
|
|
189
|
+
expandAll: function() {
|
|
190
|
+
_.each(this.childs,
|
|
191
|
+
function(child) {
|
|
192
|
+
if (child instanceof PrettyJSON.view.Node) {
|
|
193
|
+
child.show();
|
|
194
|
+
child.expandAll();
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
this);
|
|
198
|
+
this.show();
|
|
199
|
+
},
|
|
200
|
+
collapseAll: function() {
|
|
201
|
+
_.each(this.childs,
|
|
202
|
+
function(child) {
|
|
203
|
+
if (child instanceof PrettyJSON.view.Node) {
|
|
204
|
+
child.hide();
|
|
205
|
+
child.collapseAll();
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
this);
|
|
209
|
+
if (this.level != 1)
|
|
210
|
+
this.hide();
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
selectPrettySpan = function(_this,e){//asinw add
|
|
214
|
+
var range, selection;
|
|
215
|
+
if (window.getSelection && document.createRange) {
|
|
216
|
+
selection = window.getSelection();
|
|
217
|
+
range = document.createRange();
|
|
218
|
+
range.selectNodeContents(_this);
|
|
219
|
+
selection.removeAllRanges();
|
|
220
|
+
selection.addRange(range);
|
|
221
|
+
} else if (document.selection && document.body.createTextRange) {
|
|
222
|
+
range = document.body.createTextRange();
|
|
223
|
+
range.moveToElementText(_this);
|
|
224
|
+
range.select();
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
hidePrettyImg = function(_this,e){//asinw add
|
|
228
|
+
var imgDiv = document.getElementById('pretty_img_div');
|
|
229
|
+
if (imgDiv)
|
|
230
|
+
{
|
|
231
|
+
imgDiv.style.display='none';
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
showPrettyImg = function(_this,e){//asinw add
|
|
235
|
+
var link = _this.innerHTML;
|
|
236
|
+
if (link.match(/(image|jpg|jpeg|png|gif)/g))
|
|
237
|
+
{
|
|
238
|
+
var imgDiv = document.getElementById('pretty_img_div');
|
|
239
|
+
if (!imgDiv)
|
|
240
|
+
{
|
|
241
|
+
imgDiv = document.createElement('div');
|
|
242
|
+
imgDiv.setAttribute('id','pretty_img_div');
|
|
243
|
+
imgDiv.style.cssText = 'position:absolute;border:1px solid #333;background:#f7f5d1;padding:1px;color:#333;display:none;z-index:9999;';
|
|
244
|
+
document.body.appendChild(imgDiv);
|
|
245
|
+
}
|
|
246
|
+
imgDiv.style.top = (e.pageY+20) + "px";
|
|
247
|
+
imgDiv.style.right = (document.body.clientWidth - e.pageX + 20) + "px";
|
|
248
|
+
imgDiv.innerHTML = '<img src="'+link+'"/>';
|
|
249
|
+
imgDiv.style.display = 'block';
|
|
250
|
+
}
|
|
251
|
+
return false;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
previewThisData = function(_this,e){
|
|
255
|
+
var eTarget = (e.target)?e.target:e.srcElement;
|
|
256
|
+
if (eTarget == _this)
|
|
257
|
+
{
|
|
258
|
+
var s = decodeURIComponent(_this.getAttribute ('el-string'));
|
|
259
|
+
if (s.match(/^<.*?>[\s\S]*<.*?>$/g))
|
|
260
|
+
{
|
|
261
|
+
OpenWindow = window.open("", "newwin", "height=220,width=470,toolbar=no,scrollbars=" + scroll + ",menubar=no");;
|
|
262
|
+
OpenWindow.document.write(s) ;
|
|
263
|
+
OpenWindow.document.close() ;
|
|
264
|
+
self.name = "main";
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
PrettyJSON.view.Leaf = Backbone.View.extend({
|
|
270
|
+
tagName: 'span',
|
|
271
|
+
data: null,
|
|
272
|
+
level: 0,
|
|
273
|
+
path: '',
|
|
274
|
+
type: 'string',
|
|
275
|
+
isLast: true,
|
|
276
|
+
events: {
|
|
277
|
+
"mouseover .leaf-container": "mouseover",
|
|
278
|
+
"mouseout .leaf-container": "mouseout"
|
|
279
|
+
},
|
|
280
|
+
initialize: function(opt) {
|
|
281
|
+
this.options = opt;
|
|
282
|
+
this.data = this.options.data;
|
|
283
|
+
this.level = this.options.level;
|
|
284
|
+
this.path = this.options.path;
|
|
285
|
+
this.type = this.getType();
|
|
286
|
+
this.dateFormat = this.options.dateFormat;
|
|
287
|
+
this.isLast = _.isUndefined(this.options.isLast) ? this.isLast: this.options.isLast;
|
|
288
|
+
this.render();
|
|
289
|
+
},
|
|
290
|
+
getType: function() {
|
|
291
|
+
var m = 'string';
|
|
292
|
+
var d = this.data;
|
|
293
|
+
if (_.isNumber(d)) m = 'number';
|
|
294
|
+
else if (_.isBoolean(d)) m = 'boolean';
|
|
295
|
+
else if (_.isDate(d)) m = 'date';
|
|
296
|
+
return m;
|
|
297
|
+
},
|
|
298
|
+
getState: function() {
|
|
299
|
+
var coma = this.isLast ? '': ',';
|
|
300
|
+
var state = {
|
|
301
|
+
data: this.data,
|
|
302
|
+
level: this.level,
|
|
303
|
+
path: this.path,
|
|
304
|
+
type: this.type,
|
|
305
|
+
coma: coma
|
|
306
|
+
};
|
|
307
|
+
return state;
|
|
308
|
+
},
|
|
309
|
+
render: function() {
|
|
310
|
+
var state = this.getState();
|
|
311
|
+
if (state.type == "date" && this.dateFormat) {
|
|
312
|
+
state.data = PrettyJSON.util.dateFormat(this.data, this.dateFormat);
|
|
313
|
+
}
|
|
314
|
+
else if (typeof(state.data) == "string" )//asinw add
|
|
315
|
+
{
|
|
316
|
+
state.data = state.data.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');//转义使html代码无效
|
|
317
|
+
state.data = state.data.replace(/((http[^ ,"']+|data:image[^ "']+))/g,function(link){
|
|
318
|
+
return '<a target=_blank '+(link.match(/(image|jpg|jpeg|png|gif)/g)?'onmouseover="showPrettyImg(this,event)" onmouseout="hidePrettyImg(this,event)" style="color:gray;"':'')+' href="'+link+'" >'+link+'</a>';
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
this.tpl = _.template(PrettyJSON.tpl.Leaf, state);
|
|
322
|
+
$(this.el).html(this.tpl);
|
|
323
|
+
return this;
|
|
324
|
+
},
|
|
325
|
+
mouseover: function(e) {
|
|
326
|
+
e.stopPropagation();
|
|
327
|
+
var path = this.path + ' : <span class="' + this.type + '"><b>' + this.data + '</b></span>';
|
|
328
|
+
this.trigger("mouseover", e, path);
|
|
329
|
+
},
|
|
330
|
+
mouseout: function(e) {
|
|
331
|
+
e.stopPropagation();
|
|
332
|
+
this.trigger("mouseout", e);
|
|
333
|
+
}
|
|
334
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* common */
|
|
2
|
+
.mark-water{
|
|
3
|
+
color:#bbb;
|
|
4
|
+
}
|
|
5
|
+
/* eof common */
|
|
6
|
+
|
|
7
|
+
/* node */
|
|
8
|
+
.node-content-wrapper{
|
|
9
|
+
font-family: 'Quicksand', sans-serif;
|
|
10
|
+
background-color:#fff;
|
|
11
|
+
}
|
|
12
|
+
.node-content-wrapper ul{
|
|
13
|
+
border-left:1px dotted #ccc;
|
|
14
|
+
list-style:none;
|
|
15
|
+
padding-left:25px;
|
|
16
|
+
margin:0px;
|
|
17
|
+
}
|
|
18
|
+
.node-content-wrapper ul li{
|
|
19
|
+
list-style:none;
|
|
20
|
+
border-bottom:0;
|
|
21
|
+
padding-bottom:0
|
|
22
|
+
}
|
|
23
|
+
.node-hgl-path{
|
|
24
|
+
background-color:#fefbdf;
|
|
25
|
+
}
|
|
26
|
+
.node-bracket{
|
|
27
|
+
font-weight:bold;
|
|
28
|
+
display:inline-block;
|
|
29
|
+
cursor:pointer;
|
|
30
|
+
}
|
|
31
|
+
.node-bracket:hover{
|
|
32
|
+
color:#999;
|
|
33
|
+
}
|
|
34
|
+
/* eof node */
|
|
35
|
+
|
|
36
|
+
/* leaf */
|
|
37
|
+
.leaft-container{
|
|
38
|
+
width:100%;
|
|
39
|
+
max-width:300px;
|
|
40
|
+
height:100%;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.title{ color:#ccc;}
|
|
44
|
+
.string{ color:#080;}
|
|
45
|
+
.number{ color:#ccaa00;}
|
|
46
|
+
.boolean{ color:#1979d3;}
|
|
47
|
+
.date{ color:#aa6655;}
|
|
48
|
+
/* eof leaf */
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Underscore.js 1.6.0
|
|
2
|
+
// http://underscorejs.org
|
|
3
|
+
// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
4
|
+
// Underscore may be freely distributed under the MIT license.
|
|
5
|
+
(function(){var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,h=e.reduce,v=e.reduceRight,g=e.filter,d=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Array.isArray,w=Object.keys,_=i.bind,j=function(n){return n instanceof j?n:this instanceof j?void(this._wrapped=n):new j(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=j),exports._=j):n._=j,j.VERSION="1.6.0";var A=j.each=j.forEach=function(n,t,e){if(null==n)return n;if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length){for(var u=0,i=n.length;i>u;u++)if(t.call(e,n[u],u,n)===r)return}else for(var a=j.keys(n),u=0,i=a.length;i>u;u++)if(t.call(e,n[a[u]],a[u],n)===r)return;return n};j.map=j.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,u,i){e.push(t.call(r,n,u,i))}),e)};var O="Reduce of empty array with no initial value";j.reduce=j.foldl=j.inject=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduce===h)return e&&(t=j.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(A(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(O);return r},j.reduceRight=j.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),v&&n.reduceRight===v)return e&&(t=j.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(i!==+i){var a=j.keys(n);i=a.length}if(A(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(O);return r},j.find=j.detect=function(n,t,r){var e;return k(n,function(n,u,i){return t.call(r,n,u,i)?(e=n,!0):void 0}),e},j.filter=j.select=function(n,t,r){var e=[];return null==n?e:g&&n.filter===g?n.filter(t,r):(A(n,function(n,u,i){t.call(r,n,u,i)&&e.push(n)}),e)},j.reject=function(n,t,r){return j.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},j.every=j.all=function(n,t,e){t||(t=j.identity);var u=!0;return null==n?u:d&&n.every===d?n.every(t,e):(A(n,function(n,i,a){return(u=u&&t.call(e,n,i,a))?void 0:r}),!!u)};var k=j.some=j.any=function(n,t,e){t||(t=j.identity);var u=!1;return null==n?u:m&&n.some===m?n.some(t,e):(A(n,function(n,i,a){return u||(u=t.call(e,n,i,a))?r:void 0}),!!u)};j.contains=j.include=function(n,t){return null==n?!1:y&&n.indexOf===y?n.indexOf(t)!=-1:k(n,function(n){return n===t})},j.invoke=function(n,t){var r=o.call(arguments,2),e=j.isFunction(t);return j.map(n,function(n){return(e?t:n[t]).apply(n,r)})},j.pluck=function(n,t){return j.map(n,j.property(t))},j.where=function(n,t){return j.filter(n,j.matches(t))},j.findWhere=function(n,t){return j.find(n,j.matches(t))},j.max=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.max.apply(Math,n);var e=-1/0,u=-1/0;return A(n,function(n,i,a){var o=t?t.call(r,n,i,a):n;o>u&&(e=n,u=o)}),e},j.min=function(n,t,r){if(!t&&j.isArray(n)&&n[0]===+n[0]&&n.length<65535)return Math.min.apply(Math,n);var e=1/0,u=1/0;return A(n,function(n,i,a){var o=t?t.call(r,n,i,a):n;u>o&&(e=n,u=o)}),e},j.shuffle=function(n){var t,r=0,e=[];return A(n,function(n){t=j.random(r++),e[r-1]=e[t],e[t]=n}),e},j.sample=function(n,t,r){return null==t||r?(n.length!==+n.length&&(n=j.values(n)),n[j.random(n.length-1)]):j.shuffle(n).slice(0,Math.max(0,t))};var E=function(n){return null==n?j.identity:j.isFunction(n)?n:j.property(n)};j.sortBy=function(n,t,r){return t=E(t),j.pluck(j.map(n,function(n,e,u){return{value:n,index:e,criteria:t.call(r,n,e,u)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var F=function(n){return function(t,r,e){var u={};return r=E(r),A(t,function(i,a){var o=r.call(e,i,a,t);n(u,o,i)}),u}};j.groupBy=F(function(n,t,r){j.has(n,t)?n[t].push(r):n[t]=[r]}),j.indexBy=F(function(n,t,r){n[t]=r}),j.countBy=F(function(n,t){j.has(n,t)?n[t]++:n[t]=1}),j.sortedIndex=function(n,t,r,e){r=E(r);for(var u=r.call(e,t),i=0,a=n.length;a>i;){var o=i+a>>>1;r.call(e,n[o])<u?i=o+1:a=o}return i},j.toArray=function(n){return n?j.isArray(n)?o.call(n):n.length===+n.length?j.map(n,j.identity):j.values(n):[]},j.size=function(n){return null==n?0:n.length===+n.length?n.length:j.keys(n).length},j.first=j.head=j.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:0>t?[]:o.call(n,0,t)},j.initial=function(n,t,r){return o.call(n,0,n.length-(null==t||r?1:t))},j.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:o.call(n,Math.max(n.length-t,0))},j.rest=j.tail=j.drop=function(n,t,r){return o.call(n,null==t||r?1:t)},j.compact=function(n){return j.filter(n,j.identity)};var M=function(n,t,r){return t&&j.every(n,j.isArray)?c.apply(r,n):(A(n,function(n){j.isArray(n)||j.isArguments(n)?t?a.apply(r,n):M(n,t,r):r.push(n)}),r)};j.flatten=function(n,t){return M(n,t,[])},j.without=function(n){return j.difference(n,o.call(arguments,1))},j.partition=function(n,t){var r=[],e=[];return A(n,function(n){(t(n)?r:e).push(n)}),[r,e]},j.uniq=j.unique=function(n,t,r,e){j.isFunction(t)&&(e=r,r=t,t=!1);var u=r?j.map(n,r,e):n,i=[],a=[];return A(u,function(r,e){(t?e&&a[a.length-1]===r:j.contains(a,r))||(a.push(r),i.push(n[e]))}),i},j.union=function(){return j.uniq(j.flatten(arguments,!0))},j.intersection=function(n){var t=o.call(arguments,1);return j.filter(j.uniq(n),function(n){return j.every(t,function(t){return j.contains(t,n)})})},j.difference=function(n){var t=c.apply(e,o.call(arguments,1));return j.filter(n,function(n){return!j.contains(t,n)})},j.zip=function(){for(var n=j.max(j.pluck(arguments,"length").concat(0)),t=new Array(n),r=0;n>r;r++)t[r]=j.pluck(arguments,""+r);return t},j.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},j.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=j.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}if(y&&n.indexOf===y)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},j.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},j.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=new Array(e);e>u;)i[u++]=n,n+=r;return i};var R=function(){};j.bind=function(n,t){var r,e;if(_&&n.bind===_)return _.apply(n,o.call(arguments,1));if(!j.isFunction(n))throw new TypeError;return r=o.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(o.call(arguments)));R.prototype=n.prototype;var u=new R;R.prototype=null;var i=n.apply(u,r.concat(o.call(arguments)));return Object(i)===i?i:u}},j.partial=function(n){var t=o.call(arguments,1);return function(){for(var r=0,e=t.slice(),u=0,i=e.length;i>u;u++)e[u]===j&&(e[u]=arguments[r++]);for(;r<arguments.length;)e.push(arguments[r++]);return n.apply(this,e)}},j.bindAll=function(n){var t=o.call(arguments,1);if(0===t.length)throw new Error("bindAll must be passed function names");return A(t,function(t){n[t]=j.bind(n[t],n)}),n},j.memoize=function(n,t){var r={};return t||(t=j.identity),function(){var e=t.apply(this,arguments);return j.has(r,e)?r[e]:r[e]=n.apply(this,arguments)}},j.delay=function(n,t){var r=o.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},j.defer=function(n){return j.delay.apply(j,[n,1].concat(o.call(arguments,1)))},j.throttle=function(n,t,r){var e,u,i,a=null,o=0;r||(r={});var c=function(){o=r.leading===!1?0:j.now(),a=null,i=n.apply(e,u),e=u=null};return function(){var l=j.now();o||r.leading!==!1||(o=l);var f=t-(l-o);return e=this,u=arguments,0>=f?(clearTimeout(a),a=null,o=l,i=n.apply(e,u),e=u=null):a||r.trailing===!1||(a=setTimeout(c,f)),i}},j.debounce=function(n,t,r){var e,u,i,a,o,c=function(){var l=j.now()-a;t>l?e=setTimeout(c,t-l):(e=null,r||(o=n.apply(i,u),i=u=null))};return function(){i=this,u=arguments,a=j.now();var l=r&&!e;return e||(e=setTimeout(c,t)),l&&(o=n.apply(i,u),i=u=null),o}},j.once=function(n){var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},j.wrap=function(n,t){return j.partial(t,n)},j.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},j.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},j.keys=function(n){if(!j.isObject(n))return[];if(w)return w(n);var t=[];for(var r in n)j.has(n,r)&&t.push(r);return t},j.values=function(n){for(var t=j.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},j.pairs=function(n){for(var t=j.keys(n),r=t.length,e=new Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},j.invert=function(n){for(var t={},r=j.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},j.functions=j.methods=function(n){var t=[];for(var r in n)j.isFunction(n[r])&&t.push(r);return t.sort()},j.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},j.pick=function(n){var t={},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},j.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var u in n)j.contains(r,u)||(t[u]=n[u]);return t},j.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]===void 0&&(n[r]=t[r])}),n},j.clone=function(n){return j.isObject(n)?j.isArray(n)?n.slice():j.extend({},n):n},j.tap=function(n,t){return t(n),n};var S=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;n instanceof j&&(n=n._wrapped),t instanceof j&&(t=t._wrapped);var u=l.call(n);if(u!=l.call(t))return!1;switch(u){case"[object String]":return n==String(t);case"[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]==n)return e[i]==t;var a=n.constructor,o=t.constructor;if(a!==o&&!(j.isFunction(a)&&a instanceof a&&j.isFunction(o)&&o instanceof o)&&"constructor"in n&&"constructor"in t)return!1;r.push(n),e.push(t);var c=0,f=!0;if("[object Array]"==u){if(c=n.length,f=c==t.length)for(;c--&&(f=S(n[c],t[c],r,e)););}else{for(var s in n)if(j.has(n,s)&&(c++,!(f=j.has(t,s)&&S(n[s],t[s],r,e))))break;if(f){for(s in t)if(j.has(t,s)&&!c--)break;f=!c}}return r.pop(),e.pop(),f};j.isEqual=function(n,t){return S(n,t,[],[])},j.isEmpty=function(n){if(null==n)return!0;if(j.isArray(n)||j.isString(n))return 0===n.length;for(var t in n)if(j.has(n,t))return!1;return!0},j.isElement=function(n){return!(!n||1!==n.nodeType)},j.isArray=x||function(n){return"[object Array]"==l.call(n)},j.isObject=function(n){return n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],function(n){j["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),j.isArguments(arguments)||(j.isArguments=function(n){return!(!n||!j.has(n,"callee"))}),"function"!=typeof/./&&(j.isFunction=function(n){return"function"==typeof n}),j.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},j.isNaN=function(n){return j.isNumber(n)&&n!=+n},j.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==l.call(n)},j.isNull=function(n){return null===n},j.isUndefined=function(n){return n===void 0},j.has=function(n,t){return f.call(n,t)},j.noConflict=function(){return n._=t,this},j.identity=function(n){return n},j.constant=function(n){return function(){return n}},j.property=function(n){return function(t){return t[n]}},j.matches=function(n){return function(t){if(t===n)return!0;for(var r in n)if(n[r]!==t[r])return!1;return!0}},j.times=function(n,t,r){for(var e=Array(Math.max(0,n)),u=0;n>u;u++)e[u]=t.call(r,u);return e},j.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},j.now=Date.now||function(){return(new Date).getTime()};var T={escape:{"&":"&","<":"<",">":">",'"':""","'":"'"}};T.unescape=j.invert(T.escape);var I={escape:new RegExp("["+j.keys(T.escape).join("")+"]","g"),unescape:new RegExp("("+j.keys(T.unescape).join("|")+")","g")};j.each(["escape","unescape"],function(n){j[n]=function(t){return null==t?"":(""+t).replace(I[n],function(t){return T[n][t]})}}),j.result=function(n,t){if(null==n)return void 0;var r=n[t];return j.isFunction(r)?r.call(n):r},j.mixin=function(n){A(j.functions(n),function(t){var r=j[t]=n[t];j.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),z.call(this,r.apply(j,n))}})};var N=0;j.uniqueId=function(n){var t=++N+"";return n?n+t:t},j.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\t|\u2028|\u2029/g;j.template=function(n,t,r){var e;r=j.defaults({},r,j.templateSettings);var u=new RegExp([(r.escape||q).source,(r.interpolate||q).source,(r.evaluate||q).source].join("|")+"|$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return a+=n.slice(i,o).replace(D,function(n){return"\\"+B[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),u&&(a+="';\n"+u+"\n__p+='"),i=o+t.length,t}),a+="';\n",r.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=new Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o}if(t)return e(t,j);var c=function(n){return e.call(this,n,j)};return c.source="function("+(r.variable||"obj")+"){\n"+a+"}",c},j.chain=function(n){return j(n).chain()};var z=function(n){return this._chain?j(n).chain():n};j.mixin(j),A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];j.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],z.call(this,r)}}),A(["concat","join","slice"],function(n){var t=e[n];j.prototype[n]=function(){return z.call(this,t.apply(this._wrapped,arguments))}}),j.extend(j.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}}),"function"==typeof define&&define.amd&&define("underscore",[],function(){return j})}).call(this);
|
|
6
|
+
//# sourceMappingURL=underscore-min.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* common */
|
|
2
|
+
.mark-water{
|
|
3
|
+
color:#bbb;
|
|
4
|
+
}
|
|
5
|
+
/* eof common */
|
|
6
|
+
|
|
7
|
+
/* node */
|
|
8
|
+
.node-content-wrapper{
|
|
9
|
+
font-family: 'Quicksand', sans-serif;
|
|
10
|
+
background-color:#fff;
|
|
11
|
+
}
|
|
12
|
+
.node-content-wrapper ul{
|
|
13
|
+
border-left:1px dotted #ccc;
|
|
14
|
+
list-style:none;
|
|
15
|
+
padding-left:25px;
|
|
16
|
+
margin:0px;
|
|
17
|
+
}
|
|
18
|
+
.node-content-wrapper ul li{
|
|
19
|
+
list-style:none;
|
|
20
|
+
border-bottom:0;
|
|
21
|
+
padding-bottom:0
|
|
22
|
+
}
|
|
23
|
+
.node-hgl-path{
|
|
24
|
+
background-color:#fefbdf;
|
|
25
|
+
}
|
|
26
|
+
.node-bracket{
|
|
27
|
+
font-weight:bold;
|
|
28
|
+
display:inline-block;
|
|
29
|
+
cursor:pointer;
|
|
30
|
+
}
|
|
31
|
+
.node-bracket:hover{
|
|
32
|
+
color:#999;
|
|
33
|
+
}
|
|
34
|
+
/* eof node */
|
|
35
|
+
|
|
36
|
+
/* leaf */
|
|
37
|
+
.leaft-container{
|
|
38
|
+
width:100%;
|
|
39
|
+
max-width:300px;
|
|
40
|
+
height:100%;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.title{ color:#ccc;}
|
|
44
|
+
.string{ color:#080;}
|
|
45
|
+
.number{ color:#ccaa00;}
|
|
46
|
+
.boolean{ color:#1979d3;}
|
|
47
|
+
.date{ color:#aa6655;}
|
|
48
|
+
/* eof leaf */
|