docurium 0.6.0 → 0.7.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.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +42 -0
- data/Gemfile +4 -2
- data/bin/cm +14 -0
- data/docurium.gemspec +3 -2
- data/lib/docurium/cli.rb +6 -1
- data/lib/docurium/debug.rb +41 -0
- data/lib/docurium/docparser.rb +94 -26
- data/lib/docurium/layout.rb +0 -3
- data/lib/docurium/version.rb +1 -1
- data/lib/docurium.rb +235 -96
- data/site/css/style.css +17 -11
- data/site/index.html +123 -114
- data/site/js/backbone.js +1 -1
- data/site/js/docurium.js +151 -157
- data/site/js/underscore.js +5 -5
- data/test/docurium_test.rb +52 -15
- data/test/fixtures/git2/cherrypick.h +2 -0
- data/test/fixtures/git2/common.h +1 -6
- data/test/fixtures/git2/repository.h +39 -0
- data/test/fixtures/git2/types.h +2 -0
- data/test/parser_test.rb +8 -4
- metadata +26 -12
- data/.travis.yml +0 -14
data/site/js/docurium.js
CHANGED
@@ -12,52 +12,52 @@ $(function() {
|
|
12
12
|
|
13
13
|
// Function groups
|
14
14
|
var funs = _.map(data['groups'], function(group, i) {
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
var name = group[0]
|
16
|
+
var link = groupLink(name, version)
|
17
|
+
return {name: name, link: link, num: group[1].length}
|
18
18
|
})
|
19
19
|
|
20
20
|
// Callbacks
|
21
21
|
var callbacks = _.map(_.keys(data['callbacks']), function(name) {
|
22
|
-
|
23
|
-
|
22
|
+
var link = functionLink('callback', name, version)
|
23
|
+
return {name: name, link: link}
|
24
24
|
})
|
25
25
|
|
26
26
|
// Types
|
27
27
|
var getName = function(type) {
|
28
|
-
|
29
|
-
|
30
|
-
|
28
|
+
var name = type[0];
|
29
|
+
var link = typeLink(name, version);
|
30
|
+
return {link: link, name: name};
|
31
31
|
}
|
32
32
|
|
33
33
|
var enums = _.filter(data['types'], function(type) {
|
34
|
-
|
34
|
+
return type[1]['block'] && type[1]['type'] == 'enum';
|
35
35
|
}).map(getName)
|
36
36
|
|
37
37
|
var structs = _.filter(data['types'], function(type) {
|
38
|
-
|
38
|
+
return type[1]['block'] && type[1]['type'] != 'enum'
|
39
39
|
}).map(getName)
|
40
40
|
|
41
41
|
var opaques = _.filter(data['types'], function(type) {
|
42
|
-
|
42
|
+
return !type[1]['block']
|
43
43
|
}).map(getName)
|
44
44
|
|
45
45
|
// File Listing
|
46
46
|
var files = _.map(data['files'], function(file) {
|
47
|
-
|
48
|
-
|
47
|
+
var url = this.github_file(file['file'])
|
48
|
+
return {url: url, name: file['file']}
|
49
49
|
}, docurium)
|
50
50
|
|
51
51
|
// Examples List
|
52
52
|
var examples = []
|
53
53
|
if(data['examples'] && (data['examples'].length > 0)) {
|
54
|
-
|
55
|
-
|
56
|
-
|
54
|
+
examples = _.map(data['examples'], function(file) {
|
55
|
+
return {name: file[0], path: file[1]}
|
56
|
+
})
|
57
57
|
}
|
58
58
|
|
59
59
|
this.set('data', {funs: funs, callbacks: callbacks, enums: enums, structs: structs,
|
60
|
-
|
60
|
+
opaques: opaques, files: files, examples: examples})
|
61
61
|
},
|
62
62
|
})
|
63
63
|
|
@@ -187,34 +187,34 @@ $(function() {
|
|
187
187
|
|
188
188
|
// figure out the adds, deletes and changes
|
189
189
|
_.forEach(sigHist, function(func, fname) {
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
190
|
+
var lastv = _.last(func.exists)
|
191
|
+
var firstv = _.first(func.exists)
|
192
|
+
changelog[firstv]['adds'].push(fname)
|
193
|
+
|
194
|
+
// figure out where it was deleted or changed
|
195
|
+
if (lastv && (lastv != lastVer)) {
|
196
|
+
var vi = _.indexOf(versions,lastv)
|
197
|
+
var delv = versions[vi-1]
|
198
|
+
changelog[delv]['deletes'].push(fname)
|
199
|
+
|
200
|
+
_.forEach(func.changes, function(_, v) {
|
201
|
+
changelog[v]['changes'].push(fname)
|
202
|
+
})
|
203
|
+
}
|
204
204
|
})
|
205
205
|
|
206
206
|
var vers = _.map(versions, function(version) {
|
207
|
-
|
208
|
-
|
207
|
+
var deletes = changelog[version]['deletes']
|
208
|
+
deletes.sort()
|
209
209
|
|
210
|
-
|
211
|
-
|
212
|
-
|
210
|
+
var additions = changelog[version]['adds']
|
211
|
+
additions.sort()
|
212
|
+
var adds = _.map(additions, function(add) {
|
213
213
|
var gname = this.model.groupOf(add)
|
214
|
-
|
215
|
-
|
214
|
+
return {link: functionLink(gname, add, version), text: add}
|
215
|
+
}, this)
|
216
216
|
|
217
|
-
|
217
|
+
return {title: version, listing: this.itemTemplate({dels: deletes, adds: adds})}
|
218
218
|
}, this)
|
219
219
|
|
220
220
|
this.el = this.template({versions: vers})
|
@@ -238,15 +238,15 @@ $(function() {
|
|
238
238
|
|
239
239
|
var ldata = fdata
|
240
240
|
if (isCallback) {
|
241
|
-
|
242
|
-
|
241
|
+
var cdata = docurium.get('data')['callbacks']
|
242
|
+
ldata = cdata
|
243
243
|
} else {
|
244
|
-
|
244
|
+
var functions = _.filter(group[1], function(f){ return f != fname})
|
245
245
|
}
|
246
246
|
|
247
247
|
// Function Arguments
|
248
248
|
var args = _.map(ldata[fname]['args'], function(arg) {
|
249
|
-
|
249
|
+
return {link: this.hotLink(arg.type), name: arg.name, comment: arg.comment}
|
250
250
|
}, docurium)
|
251
251
|
|
252
252
|
var data = ldata[fname]
|
@@ -257,32 +257,32 @@ $(function() {
|
|
257
257
|
var sig = docurium.hotLink(ret.type) + ' ' + fname + '(' + data['argline'] + ');'
|
258
258
|
// version history
|
259
259
|
if (!isCallback) {
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
260
|
+
var sigHist = docurium.get('signatures')[fname]
|
261
|
+
var version = docurium.get('version')
|
262
|
+
var sigs = _.map(sigHist.exists, function(ver) {
|
263
|
+
var klass = []
|
264
|
+
if (sigHist.changes[ver])
|
265
|
+
klass.push('changed')
|
266
|
+
if (ver == version)
|
267
|
+
klass.push('current')
|
268
|
+
|
269
|
+
return {url: '#' + functionLink(gname, fname, ver), name: ver, klass: klass.join(' ')}
|
270
|
+
})
|
271
271
|
}
|
272
272
|
// GitHub link
|
273
273
|
var fileLink = docurium.github_file(data.file, data.line, data.lineto)
|
274
274
|
// link to the group
|
275
275
|
if (!isCallback) {
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
276
|
+
var version = docurium.get('version')
|
277
|
+
var alsoGroup = '#' + groupLink(group[0], version)
|
278
|
+
var alsoLinks = _.map(functions, function(f) {
|
279
|
+
return {url: '#' + functionLink(gname, f, version), name: f}
|
280
|
+
})
|
281
281
|
}
|
282
282
|
|
283
283
|
this.set('data', {name: fname, data: data, args: args, returns: returns, sig: sig,
|
284
|
-
|
285
|
-
|
284
|
+
sigs: sigs, fileLink: fileLink, groupName: gname,
|
285
|
+
alsoGroup: alsoGroup, alsoLinks: alsoLinks})
|
286
286
|
}
|
287
287
|
})
|
288
288
|
|
@@ -313,18 +313,18 @@ $(function() {
|
|
313
313
|
var version = this.docurium.get('version')
|
314
314
|
|
315
315
|
var groups = _.map(data.groups, function(group) {
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
316
|
+
var gname = group[0]
|
317
|
+
var funs = _.map(group[1], function(fun) {
|
318
|
+
var klass = ''
|
319
|
+
if (sigHist[fun].changes[version])
|
320
|
+
klass = 'changed'
|
321
|
+
|
322
|
+
if (version == _.first(sigHist[fun].exists))
|
323
|
+
klass = 'introd'
|
324
|
+
|
325
|
+
return {name: fun, url: '#' + functionLink(gname, fun, version), klass: klass}
|
326
|
+
})
|
327
|
+
return {name: gname, funs: funs}
|
328
328
|
})
|
329
329
|
|
330
330
|
this.reset(groups)
|
@@ -347,38 +347,33 @@ $(function() {
|
|
347
347
|
var version = docurium.get('version')
|
348
348
|
var types = docurium.get('data')['types']
|
349
349
|
var tdata = _.find(types, function(g) {
|
350
|
-
|
350
|
+
return g[0] == typename
|
351
351
|
})
|
352
352
|
var tname = tdata[0]
|
353
353
|
var data = tdata[1]
|
354
354
|
|
355
|
-
var
|
356
|
-
|
357
|
-
|
358
|
-
|
355
|
+
var toFuncPair = function(fun) {
|
356
|
+
var gname = this.groupOf(fun)
|
357
|
+
var url = '#' + functionLink(gname, fun, version)
|
358
|
+
return {name: fun, url: url}
|
359
|
+
}
|
360
|
+
|
361
|
+
var toTypePair = function(type) {
|
362
|
+
var url = '#' + typeLink(type, version)
|
363
|
+
return {name: type, url: url}
|
359
364
|
}
|
360
365
|
|
361
|
-
var returns = _.map(data.used.returns,
|
362
|
-
var needs = _.map(data.used.needs,
|
366
|
+
var returns = _.map(data.used.returns, toFuncPair, docurium)
|
367
|
+
var needs = _.map(data.used.needs, toFuncPair, docurium)
|
368
|
+
var fields = _.map(data.used.fields, toTypePair, docurium)
|
363
369
|
var fileLink = {name: data.file, url: docurium.github_file(data.file, data.line, data.lineto)}
|
364
370
|
|
365
|
-
//
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
var tmp = []
|
370
|
-
_.each(data.fields, function(f) {
|
371
|
-
if (had_comment) {
|
372
|
-
blocks.push(tmp)
|
373
|
-
tmp = []
|
374
|
-
}
|
375
|
-
|
376
|
-
tmp.push(f)
|
377
|
-
had_comment = f.comments
|
378
|
-
})
|
379
|
-
blocks.push(tmp)
|
371
|
+
// Hot link our field types
|
372
|
+
data.fields = _.map(data.fields, function(field) {
|
373
|
+
return {type: this.hotLink(field.type), name: field.name, comments: field.comments}
|
374
|
+
}, docurium)
|
380
375
|
|
381
|
-
this.set('data', {tname: tname, data: data,
|
376
|
+
this.set('data', {tname: tname, data: data, returns: returns, needs: needs, fields: fields, fileLink: fileLink})
|
382
377
|
}
|
383
378
|
})
|
384
379
|
|
@@ -411,10 +406,10 @@ $(function() {
|
|
411
406
|
|
412
407
|
this.gname = gname.charAt(0).toUpperCase() + gname.substring(1).toLowerCase()
|
413
408
|
this.functions = _.map(group[1], function(name) {
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
409
|
+
var url = '#' + functionLink(gname, name, version)
|
410
|
+
var d = fdata[name]
|
411
|
+
return {name: name, url: url, returns: d['return']['type'], argline: d['argline'],
|
412
|
+
description: d['description'], comments: d['comments'], args: d['args']}
|
418
413
|
})
|
419
414
|
},
|
420
415
|
|
@@ -433,9 +428,9 @@ $(function() {
|
|
433
428
|
|
434
429
|
events: {
|
435
430
|
'keyup': function() {
|
436
|
-
|
437
|
-
|
438
|
-
|
431
|
+
this.trigger('keyup')
|
432
|
+
if (this.$el.val() == '')
|
433
|
+
this.trigger('empty')
|
439
434
|
}
|
440
435
|
},
|
441
436
|
})
|
@@ -455,7 +450,7 @@ $(function() {
|
|
455
450
|
keyup: function() {
|
456
451
|
var newValue = this.field.$el.val()
|
457
452
|
if (this.value == newValue || newValue.length < 3)
|
458
|
-
|
453
|
+
return
|
459
454
|
|
460
455
|
this.value = newValue
|
461
456
|
this.refreshSearch()
|
@@ -471,19 +466,19 @@ $(function() {
|
|
471
466
|
var version = docurium.get('version')
|
472
467
|
// look for functions (name, comment, argline)
|
473
468
|
_.forEach(data.functions, function(f, name) {
|
474
|
-
|
475
|
-
|
469
|
+
var gname = docurium.groupOf(name)
|
470
|
+
// look in the function name first
|
476
471
|
if (name.search(value) > -1) {
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
472
|
+
var gl = functionLink(gname, name, version)
|
473
|
+
var url = '#' + gl
|
474
|
+
searchResults.push({url: url, name: name, match: 'function', navigate: gl})
|
475
|
+
return
|
481
476
|
}
|
482
477
|
|
483
|
-
|
478
|
+
// if we didn't find it there, let's look in the argline
|
484
479
|
if (f.argline && f.argline.search(value) > -1) {
|
485
|
-
|
486
|
-
|
480
|
+
var gl = functionLink(gname, name, version)
|
481
|
+
var url = '#' + gl
|
487
482
|
searchResults.push({url: url, name: name, match: f.argline, navigate: gl})
|
488
483
|
}
|
489
484
|
})
|
@@ -491,8 +486,8 @@ $(function() {
|
|
491
486
|
// look for types
|
492
487
|
data.types.forEach(function(type) {
|
493
488
|
var name = type[0]
|
494
|
-
|
495
|
-
|
489
|
+
var tl = typeLink(name, version)
|
490
|
+
var url = '#' + tl
|
496
491
|
if (name.search(value) > -1) {
|
497
492
|
searchResults.push({url: url, name: name, match: type[1].type, navigate: tl})
|
498
493
|
}
|
@@ -500,12 +495,12 @@ $(function() {
|
|
500
495
|
|
501
496
|
// look for callbacks
|
502
497
|
_.each(data.callbacks, function(f, name) {
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
498
|
+
if (name.search(value) > -1) {
|
499
|
+
var gl = functionLink('callback', name, version)
|
500
|
+
var url = '#' + gl
|
501
|
+
searchResults.push({url: url, name: name, match: 'callback', navigate: gl})
|
502
|
+
return
|
503
|
+
}
|
509
504
|
})
|
510
505
|
|
511
506
|
this.reset(searchResults)
|
@@ -532,8 +527,8 @@ $(function() {
|
|
532
527
|
view.render()
|
533
528
|
|
534
529
|
if (this.activeView) {
|
535
|
-
|
536
|
-
|
530
|
+
this.stopListening()
|
531
|
+
this.activeView.remove()
|
537
532
|
}
|
538
533
|
|
539
534
|
this.activeView = view
|
@@ -575,15 +570,15 @@ $(function() {
|
|
575
570
|
|
576
571
|
current = docurium.get('version')
|
577
572
|
if (current == version) {
|
578
|
-
|
579
|
-
|
580
|
-
|
573
|
+
if (success)
|
574
|
+
success();
|
575
|
+
return;
|
581
576
|
}
|
582
577
|
|
583
578
|
docurium.set({version: version})
|
584
579
|
p = this.loadDoc()
|
585
580
|
if (success)
|
586
|
-
|
581
|
+
p.then(success)
|
587
582
|
},
|
588
583
|
|
589
584
|
loadDoc: function() {
|
@@ -596,7 +591,7 @@ $(function() {
|
|
596
591
|
getGroup: function(gname) {
|
597
592
|
var groups = docurium.get('data')['groups']
|
598
593
|
return _.find(groups, function(g) {
|
599
|
-
|
594
|
+
return g[0] == gname
|
600
595
|
})
|
601
596
|
},
|
602
597
|
|
@@ -605,18 +600,17 @@ $(function() {
|
|
605
600
|
types = this.get('data')['types']
|
606
601
|
var version = this.get('version')
|
607
602
|
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
re = new RegExp(typeName + '\\s', 'gi');
|
603
|
+
_.each(types, function(type) {
|
604
|
+
var typeName = type[0];
|
605
|
+
var typeData = type[1];
|
606
|
+
var re = new RegExp('\\b' + typeName + '\\b', 'gi');
|
613
607
|
var link = $('<a>').attr('href', '#' + typeLink(typeName, version)).append(typeName)[0]
|
614
608
|
text = text.replace(re, link.outerHTML + ' ')
|
615
|
-
}
|
609
|
+
});
|
616
610
|
|
617
611
|
var callbacks = this.get('data')['callbacks']
|
618
612
|
_.each(callbacks, function(cb, typeName) {
|
619
|
-
re = new RegExp(typeName + '$', 'gi');
|
613
|
+
var re = new RegExp(typeName + '$', 'gi');
|
620
614
|
var link = $('<a>').attr('href', '#' + functionLink('callback', typeName, version)).append(typeName)[0]
|
621
615
|
text = text.replace(re, link.outerHTML + ' ')
|
622
616
|
});
|
@@ -634,11 +628,11 @@ $(function() {
|
|
634
628
|
github_file: function(file, line, lineto) {
|
635
629
|
var data = this.get('data')
|
636
630
|
url = ['https://github.com', docurium.get('github'),
|
637
|
-
|
631
|
+
'blob', docurium.get('version'), data.prefix, file].join('/')
|
638
632
|
if(line) {
|
639
633
|
url += '#L' + line.toString()
|
640
634
|
if(lineto) {
|
641
|
-
url += '-' + lineto.toString()
|
635
|
+
url += '-L' + lineto.toString()
|
642
636
|
}
|
643
637
|
} else {
|
644
638
|
url += '#files'
|
@@ -677,47 +671,47 @@ $(function() {
|
|
677
671
|
main: function(version) {
|
678
672
|
var self = this
|
679
673
|
this.doc.setVersion(version, function() {
|
680
|
-
|
681
|
-
|
674
|
+
var view = new MainListView({collection: self.groups})
|
675
|
+
self.mainView.setActive(view)
|
682
676
|
})
|
683
677
|
},
|
684
678
|
|
685
679
|
group: function(version, gname) {
|
686
680
|
var self = this
|
687
681
|
this.doc.setVersion(version, function() {
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
682
|
+
var group = self.doc.getGroup(gname)
|
683
|
+
var fdata = self.doc.get('data')['functions']
|
684
|
+
var cdata = self.doc.get('data')['callbacks']
|
685
|
+
var version = self.doc.get('version')
|
686
|
+
var view = new GroupView({group: group, functions: fdata, callbacks: cdata, version: version})
|
687
|
+
self.mainView.setActive(view)
|
694
688
|
});
|
695
689
|
},
|
696
690
|
|
697
691
|
groupFun: function(version, gname, fname) {
|
698
692
|
var self = this
|
699
693
|
this.doc.setVersion(version, function() {
|
700
|
-
|
701
|
-
|
702
|
-
|
694
|
+
var model = new FunctionModel({docurium: self.doc, gname: gname, fname: fname})
|
695
|
+
var view = new FunctionView({model: model})
|
696
|
+
self.mainView.setActive(view)
|
703
697
|
})
|
704
698
|
},
|
705
699
|
|
706
700
|
showtype: function(version, tname) {
|
707
701
|
var self = this
|
708
702
|
this.doc.setVersion(version, function() {
|
709
|
-
|
710
|
-
|
711
|
-
|
703
|
+
var model = new TypeModel({docurium: self.doc, typename: tname})
|
704
|
+
var view = new TypeView({model: model})
|
705
|
+
self.mainView.setActive(view)
|
712
706
|
})
|
713
707
|
},
|
714
708
|
|
715
709
|
search: function(version, query) {
|
716
710
|
var self = this
|
717
711
|
this.doc.setVersion(version, function() {
|
718
|
-
|
719
|
-
|
720
|
-
|
712
|
+
var view = new SearchView({collection: self.search})
|
713
|
+
$('#search-field').val(query).keyup()
|
714
|
+
self.mainView.setActive(view)
|
721
715
|
})
|
722
716
|
},
|
723
717
|
|
@@ -725,10 +719,10 @@ $(function() {
|
|
725
719
|
// let's wait to process it until it's asked, and let's only do
|
726
720
|
// it once
|
727
721
|
if (this.changelogView == undefined) {
|
728
|
-
|
722
|
+
this.changelogView = new ChangelogView({model: this.doc})
|
729
723
|
}
|
730
724
|
this.doc.setVersion(undefined, function() {
|
731
|
-
|
725
|
+
this.mainView.setActive(this.changelogView)
|
732
726
|
})
|
733
727
|
},
|
734
728
|
});
|
@@ -760,7 +754,7 @@ $(function() {
|
|
760
754
|
var mainView = new MainView()
|
761
755
|
|
762
756
|
var router = new Workspace({docurium: docurium, search: searchCol, mainView: mainView,
|
763
|
-
|
757
|
+
groups: groupCol})
|
764
758
|
|
765
759
|
searchField.on('empty', function() {
|
766
760
|
router.navigate(docurium.get('version'), {trigger: true})
|
data/site/js/underscore.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
|
2
|
-
//
|
3
|
-
//
|
1
|
+
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define("underscore",r):(n="undefined"!=typeof globalThis?globalThis:n||self,function(){var t=n._,e=n._=r();e.noConflict=function(){return n._=t,e}}())}(this,(function(){
|
2
|
+
// Underscore.js 1.13.1
|
3
|
+
// https://underscorejs.org
|
4
|
+
// (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
|
4
5
|
// Underscore may be freely distributed under the MIT license.
|
5
|
-
(function(){var n=this,t=n._,r=Array.prototype,e=Object.prototype,u=Function.prototype,i=r.push,a=r.slice,o=r.concat,l=e.toString,c=e.hasOwnProperty,f=Array.isArray,s=Object.keys,p=u.bind,h=function(n){return n instanceof h?n:this instanceof h?void(this._wrapped=n):new h(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=h),exports._=h):n._=h,h.VERSION="1.7.0";var g=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}};h.iteratee=function(n,t,r){return null==n?h.identity:h.isFunction(n)?g(n,t,r):h.isObject(n)?h.matches(n):h.property(n)},h.each=h.forEach=function(n,t,r){if(null==n)return n;t=g(t,r);var e,u=n.length;if(u===+u)for(e=0;u>e;e++)t(n[e],e,n);else{var i=h.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},h.map=h.collect=function(n,t,r){if(null==n)return[];t=h.iteratee(t,r);for(var e,u=n.length!==+n.length&&h.keys(n),i=(u||n).length,a=Array(i),o=0;i>o;o++)e=u?u[o]:o,a[o]=t(n[e],e,n);return a};var v="Reduce of empty array with no initial value";h.reduce=h.foldl=h.inject=function(n,t,r,e){null==n&&(n=[]),t=g(t,e,4);var u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length,o=0;if(arguments.length<3){if(!a)throw new TypeError(v);r=n[i?i[o++]:o++]}for(;a>o;o++)u=i?i[o]:o,r=t(r,n[u],u,n);return r},h.reduceRight=h.foldr=function(n,t,r,e){null==n&&(n=[]),t=g(t,e,4);var u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;if(arguments.length<3){if(!a)throw new TypeError(v);r=n[i?i[--a]:--a]}for(;a--;)u=i?i[a]:a,r=t(r,n[u],u,n);return r},h.find=h.detect=function(n,t,r){var e;return t=h.iteratee(t,r),h.some(n,function(n,r,u){return t(n,r,u)?(e=n,!0):void 0}),e},h.filter=h.select=function(n,t,r){var e=[];return null==n?e:(t=h.iteratee(t,r),h.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e)},h.reject=function(n,t,r){return h.filter(n,h.negate(h.iteratee(t)),r)},h.every=h.all=function(n,t,r){if(null==n)return!0;t=h.iteratee(t,r);var e,u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;for(e=0;a>e;e++)if(u=i?i[e]:e,!t(n[u],u,n))return!1;return!0},h.some=h.any=function(n,t,r){if(null==n)return!1;t=h.iteratee(t,r);var e,u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;for(e=0;a>e;e++)if(u=i?i[e]:e,t(n[u],u,n))return!0;return!1},h.contains=h.include=function(n,t){return null==n?!1:(n.length!==+n.length&&(n=h.values(n)),h.indexOf(n,t)>=0)},h.invoke=function(n,t){var r=a.call(arguments,2),e=h.isFunction(t);return h.map(n,function(n){return(e?t:n[t]).apply(n,r)})},h.pluck=function(n,t){return h.map(n,h.property(t))},h.where=function(n,t){return h.filter(n,h.matches(t))},h.findWhere=function(n,t){return h.find(n,h.matches(t))},h.max=function(n,t,r){var e,u,i=-1/0,a=-1/0;if(null==t&&null!=n){n=n.length===+n.length?n:h.values(n);for(var o=0,l=n.length;l>o;o++)e=n[o],e>i&&(i=e)}else t=h.iteratee(t,r),h.each(n,function(n,r,e){u=t(n,r,e),(u>a||u===-1/0&&i===-1/0)&&(i=n,a=u)});return i},h.min=function(n,t,r){var e,u,i=1/0,a=1/0;if(null==t&&null!=n){n=n.length===+n.length?n:h.values(n);for(var o=0,l=n.length;l>o;o++)e=n[o],i>e&&(i=e)}else t=h.iteratee(t,r),h.each(n,function(n,r,e){u=t(n,r,e),(a>u||1/0===u&&1/0===i)&&(i=n,a=u)});return i},h.shuffle=function(n){for(var t,r=n&&n.length===+n.length?n:h.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=h.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},h.sample=function(n,t,r){return null==t||r?(n.length!==+n.length&&(n=h.values(n)),n[h.random(n.length-1)]):h.shuffle(n).slice(0,Math.max(0,t))},h.sortBy=function(n,t,r){return t=h.iteratee(t,r),h.pluck(h.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).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 m=function(n){return function(t,r,e){var u={};return r=h.iteratee(r,e),h.each(t,function(e,i){var a=r(e,i,t);n(u,e,a)}),u}};h.groupBy=m(function(n,t,r){h.has(n,r)?n[r].push(t):n[r]=[t]}),h.indexBy=m(function(n,t,r){n[r]=t}),h.countBy=m(function(n,t,r){h.has(n,r)?n[r]++:n[r]=1}),h.sortedIndex=function(n,t,r,e){r=h.iteratee(r,e,1);for(var u=r(t),i=0,a=n.length;a>i;){var o=i+a>>>1;r(n[o])<u?i=o+1:a=o}return i},h.toArray=function(n){return n?h.isArray(n)?a.call(n):n.length===+n.length?h.map(n,h.identity):h.values(n):[]},h.size=function(n){return null==n?0:n.length===+n.length?n.length:h.keys(n).length},h.partition=function(n,t,r){t=h.iteratee(t,r);var e=[],u=[];return h.each(n,function(n,r,i){(t(n,r,i)?e:u).push(n)}),[e,u]},h.first=h.head=h.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:0>t?[]:a.call(n,0,t)},h.initial=function(n,t,r){return a.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},h.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:a.call(n,Math.max(n.length-t,0))},h.rest=h.tail=h.drop=function(n,t,r){return a.call(n,null==t||r?1:t)},h.compact=function(n){return h.filter(n,h.identity)};var y=function(n,t,r,e){if(t&&h.every(n,h.isArray))return o.apply(e,n);for(var u=0,a=n.length;a>u;u++){var l=n[u];h.isArray(l)||h.isArguments(l)?t?i.apply(e,l):y(l,t,r,e):r||e.push(l)}return e};h.flatten=function(n,t){return y(n,t,!1,[])},h.without=function(n){return h.difference(n,a.call(arguments,1))},h.uniq=h.unique=function(n,t,r,e){if(null==n)return[];h.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=h.iteratee(r,e));for(var u=[],i=[],a=0,o=n.length;o>a;a++){var l=n[a];if(t)a&&i===l||u.push(l),i=l;else if(r){var c=r(l,a,n);h.indexOf(i,c)<0&&(i.push(c),u.push(l))}else h.indexOf(u,l)<0&&u.push(l)}return u},h.union=function(){return h.uniq(y(arguments,!0,!0,[]))},h.intersection=function(n){if(null==n)return[];for(var t=[],r=arguments.length,e=0,u=n.length;u>e;e++){var i=n[e];if(!h.contains(t,i)){for(var a=1;r>a&&h.contains(arguments[a],i);a++);a===r&&t.push(i)}}return t},h.difference=function(n){var t=y(a.call(arguments,1),!0,!0,[]);return h.filter(n,function(n){return!h.contains(t,n)})},h.zip=function(n){if(null==n)return[];for(var t=h.max(arguments,"length").length,r=Array(t),e=0;t>e;e++)r[e]=h.pluck(arguments,e);return r},h.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},h.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=h.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}for(;u>e;e++)if(n[e]===t)return e;return-1},h.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=n.length;for("number"==typeof r&&(e=0>r?e+r+1:Math.min(e,r+1));--e>=0;)if(n[e]===t)return e;return-1},h.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=r||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=Array(e),i=0;e>i;i++,n+=r)u[i]=n;return u};var d=function(){};h.bind=function(n,t){var r,e;if(p&&n.bind===p)return p.apply(n,a.call(arguments,1));if(!h.isFunction(n))throw new TypeError("Bind must be called on a function");return r=a.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(a.call(arguments)));d.prototype=n.prototype;var u=new d;d.prototype=null;var i=n.apply(u,r.concat(a.call(arguments)));return h.isObject(i)?i:u}},h.partial=function(n){var t=a.call(arguments,1);return function(){for(var r=0,e=t.slice(),u=0,i=e.length;i>u;u++)e[u]===h&&(e[u]=arguments[r++]);for(;r<arguments.length;)e.push(arguments[r++]);return n.apply(this,e)}},h.bindAll=function(n){var t,r,e=arguments.length;if(1>=e)throw new Error("bindAll must be passed function names");for(t=1;e>t;t++)r=arguments[t],n[r]=h.bind(n[r],n);return n},h.memoize=function(n,t){var r=function(e){var u=r.cache,i=t?t.apply(this,arguments):e;return h.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},h.delay=function(n,t){var r=a.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},h.defer=function(n){return h.delay.apply(h,[n,1].concat(a.call(arguments,1)))},h.throttle=function(n,t,r){var e,u,i,a=null,o=0;r||(r={});var l=function(){o=r.leading===!1?0:h.now(),a=null,i=n.apply(e,u),a||(e=u=null)};return function(){var c=h.now();o||r.leading!==!1||(o=c);var f=t-(c-o);return e=this,u=arguments,0>=f||f>t?(clearTimeout(a),a=null,o=c,i=n.apply(e,u),a||(e=u=null)):a||r.trailing===!1||(a=setTimeout(l,f)),i}},h.debounce=function(n,t,r){var e,u,i,a,o,l=function(){var c=h.now()-a;t>c&&c>0?e=setTimeout(l,t-c):(e=null,r||(o=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,a=h.now();var c=r&&!e;return e||(e=setTimeout(l,t)),c&&(o=n.apply(i,u),i=u=null),o}},h.wrap=function(n,t){return h.partial(t,n)},h.negate=function(n){return function(){return!n.apply(this,arguments)}},h.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},h.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},h.before=function(n,t){var r;return function(){return--n>0?r=t.apply(this,arguments):t=null,r}},h.once=h.partial(h.before,2),h.keys=function(n){if(!h.isObject(n))return[];if(s)return s(n);var t=[];for(var r in n)h.has(n,r)&&t.push(r);return t},h.values=function(n){for(var t=h.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},h.pairs=function(n){for(var t=h.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},h.invert=function(n){for(var t={},r=h.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},h.functions=h.methods=function(n){var t=[];for(var r in n)h.isFunction(n[r])&&t.push(r);return t.sort()},h.extend=function(n){if(!h.isObject(n))return n;for(var t,r,e=1,u=arguments.length;u>e;e++){t=arguments[e];for(r in t)c.call(t,r)&&(n[r]=t[r])}return n},h.pick=function(n,t,r){var e,u={};if(null==n)return u;if(h.isFunction(t)){t=g(t,r);for(e in n){var i=n[e];t(i,e,n)&&(u[e]=i)}}else{var l=o.apply([],a.call(arguments,1));n=new Object(n);for(var c=0,f=l.length;f>c;c++)e=l[c],e in n&&(u[e]=n[e])}return u},h.omit=function(n,t,r){if(h.isFunction(t))t=h.negate(t);else{var e=h.map(o.apply([],a.call(arguments,1)),String);t=function(n,t){return!h.contains(e,t)}}return h.pick(n,t,r)},h.defaults=function(n){if(!h.isObject(n))return n;for(var t=1,r=arguments.length;r>t;t++){var e=arguments[t];for(var u in e)n[u]===void 0&&(n[u]=e[u])}return n},h.clone=function(n){return h.isObject(n)?h.isArray(n)?n.slice():h.extend({},n):n},h.tap=function(n,t){return t(n),n};var b=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 h&&(n=n._wrapped),t instanceof h&&(t=t._wrapped);var u=l.call(n);if(u!==l.call(t))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+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}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&&"constructor"in n&&"constructor"in t&&!(h.isFunction(a)&&a instanceof a&&h.isFunction(o)&&o instanceof o))return!1;r.push(n),e.push(t);var c,f;if("[object Array]"===u){if(c=n.length,f=c===t.length)for(;c--&&(f=b(n[c],t[c],r,e)););}else{var s,p=h.keys(n);if(c=p.length,f=h.keys(t).length===c)for(;c--&&(s=p[c],f=h.has(t,s)&&b(n[s],t[s],r,e)););}return r.pop(),e.pop(),f};h.isEqual=function(n,t){return b(n,t,[],[])},h.isEmpty=function(n){if(null==n)return!0;if(h.isArray(n)||h.isString(n)||h.isArguments(n))return 0===n.length;for(var t in n)if(h.has(n,t))return!1;return!0},h.isElement=function(n){return!(!n||1!==n.nodeType)},h.isArray=f||function(n){return"[object Array]"===l.call(n)},h.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},h.each(["Arguments","Function","String","Number","Date","RegExp"],function(n){h["is"+n]=function(t){return l.call(t)==="[object "+n+"]"}}),h.isArguments(arguments)||(h.isArguments=function(n){return h.has(n,"callee")}),"function"!=typeof/./&&(h.isFunction=function(n){return"function"==typeof n||!1}),h.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},h.isNaN=function(n){return h.isNumber(n)&&n!==+n},h.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"===l.call(n)},h.isNull=function(n){return null===n},h.isUndefined=function(n){return n===void 0},h.has=function(n,t){return null!=n&&c.call(n,t)},h.noConflict=function(){return n._=t,this},h.identity=function(n){return n},h.constant=function(n){return function(){return n}},h.noop=function(){},h.property=function(n){return function(t){return t[n]}},h.matches=function(n){var t=h.pairs(n),r=t.length;return function(n){if(null==n)return!r;n=new Object(n);for(var e=0;r>e;e++){var u=t[e],i=u[0];if(u[1]!==n[i]||!(i in n))return!1}return!0}},h.times=function(n,t,r){var e=Array(Math.max(0,n));t=g(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},h.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},h.now=Date.now||function(){return(new Date).getTime()};var _={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},w=h.invert(_),j=function(n){var t=function(t){return n[t]},r="(?:"+h.keys(n).join("|")+")",e=RegExp(r),u=RegExp(r,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};h.escape=j(_),h.unescape=j(w),h.result=function(n,t){if(null==n)return void 0;var r=n[t];return h.isFunction(r)?n[t]():r};var x=0;h.uniqueId=function(n){var t=++x+"";return n?n+t:t},h.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var A=/(.)^/,k={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},O=/\\|'|\r|\n|\u2028|\u2029/g,F=function(n){return"\\"+k[n]};h.template=function(n,t,r){!t&&r&&(t=r),t=h.defaults({},t,h.templateSettings);var e=RegExp([(t.escape||A).source,(t.interpolate||A).source,(t.evaluate||A).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,function(t,r,e,a,o){return i+=n.slice(u,o).replace(O,F),u=o+t.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":a&&(i+="';\n"+a+"\n__p+='"),t}),i+="';\n",t.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var a=new Function(t.variable||"obj","_",i)}catch(o){throw o.source=i,o}var l=function(n){return a.call(this,n,h)},c=t.variable||"obj";return l.source="function("+c+"){\n"+i+"}",l},h.chain=function(n){var t=h(n);return t._chain=!0,t};var E=function(n){return this._chain?h(n).chain():n};h.mixin=function(n){h.each(h.functions(n),function(t){var r=h[t]=n[t];h.prototype[t]=function(){var n=[this._wrapped];return i.apply(n,arguments),E.call(this,r.apply(h,n))}})},h.mixin(h),h.each(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=r[n];h.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==n&&"splice"!==n||0!==r.length||delete r[0],E.call(this,r)}}),h.each(["concat","join","slice"],function(n){var t=r[n];h.prototype[n]=function(){return E.call(this,t.apply(this._wrapped,arguments))}}),h.prototype.value=function(){return this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return h})}).call(this);
|
6
|
-
//# sourceMappingURL=underscore-min.map
|
6
|
+
var n="1.13.1",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},t=Array.prototype,e=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,o=t.push,i=t.slice,a=e.toString,f=e.hasOwnProperty,c="undefined"!=typeof ArrayBuffer,l="undefined"!=typeof DataView,s=Array.isArray,p=Object.keys,v=Object.create,h=c&&ArrayBuffer.isView,y=isNaN,d=isFinite,g=!{toString:null}.propertyIsEnumerable("toString"),b=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],m=Math.pow(2,53)-1;function j(n,r){return r=null==r?n.length-1:+r,function(){for(var t=Math.max(arguments.length-r,0),e=Array(t),u=0;u<t;u++)e[u]=arguments[u+r];switch(r){case 0:return n.call(this,e);case 1:return n.call(this,arguments[0],e);case 2:return n.call(this,arguments[0],arguments[1],e)}var o=Array(r+1);for(u=0;u<r;u++)o[u]=arguments[u];return o[r]=e,n.apply(this,o)}}function _(n){var r=typeof n;return"function"===r||"object"===r&&!!n}function w(n){return void 0===n}function A(n){return!0===n||!1===n||"[object Boolean]"===a.call(n)}function x(n){var r="[object "+n+"]";return function(n){return a.call(n)===r}}var S=x("String"),O=x("Number"),M=x("Date"),E=x("RegExp"),B=x("Error"),N=x("Symbol"),I=x("ArrayBuffer"),T=x("Function"),k=r.document&&r.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof k&&(T=function(n){return"function"==typeof n||!1});var D=T,R=x("Object"),F=l&&R(new DataView(new ArrayBuffer(8))),V="undefined"!=typeof Map&&R(new Map),P=x("DataView");var q=F?function(n){return null!=n&&D(n.getInt8)&&I(n.buffer)}:P,U=s||x("Array");function W(n,r){return null!=n&&f.call(n,r)}var z=x("Arguments");!function(){z(arguments)||(z=function(n){return W(n,"callee")})}();var L=z;function $(n){return O(n)&&y(n)}function C(n){return function(){return n}}function K(n){return function(r){var t=n(r);return"number"==typeof t&&t>=0&&t<=m}}function J(n){return function(r){return null==r?void 0:r[n]}}var G=J("byteLength"),H=K(G),Q=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var X=c?function(n){return h?h(n)&&!q(n):H(n)&&Q.test(a.call(n))}:C(!1),Y=J("length");function Z(n,r){r=function(n){for(var r={},t=n.length,e=0;e<t;++e)r[n[e]]=!0;return{contains:function(n){return r[n]},push:function(t){return r[t]=!0,n.push(t)}}}(r);var t=b.length,u=n.constructor,o=D(u)&&u.prototype||e,i="constructor";for(W(n,i)&&!r.contains(i)&&r.push(i);t--;)(i=b[t])in n&&n[i]!==o[i]&&!r.contains(i)&&r.push(i)}function nn(n){if(!_(n))return[];if(p)return p(n);var r=[];for(var t in n)W(n,t)&&r.push(t);return g&&Z(n,r),r}function rn(n,r){var t=nn(r),e=t.length;if(null==n)return!e;for(var u=Object(n),o=0;o<e;o++){var i=t[o];if(r[i]!==u[i]||!(i in u))return!1}return!0}function tn(n){return n instanceof tn?n:this instanceof tn?void(this._wrapped=n):new tn(n)}function en(n){return new Uint8Array(n.buffer||n,n.byteOffset||0,G(n))}tn.VERSION=n,tn.prototype.value=function(){return this._wrapped},tn.prototype.valueOf=tn.prototype.toJSON=tn.prototype.value,tn.prototype.toString=function(){return String(this._wrapped)};var un="[object DataView]";function on(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;if(null==n||null==r)return!1;if(n!=n)return r!=r;var o=typeof n;return("function"===o||"object"===o||"object"==typeof r)&&function n(r,t,e,o){r instanceof tn&&(r=r._wrapped);t instanceof tn&&(t=t._wrapped);var i=a.call(r);if(i!==a.call(t))return!1;if(F&&"[object Object]"==i&&q(r)){if(!q(t))return!1;i=un}switch(i){case"[object RegExp]":case"[object String]":return""+r==""+t;case"[object Number]":return+r!=+r?+t!=+t:0==+r?1/+r==1/t:+r==+t;case"[object Date]":case"[object Boolean]":return+r==+t;case"[object Symbol]":return u.valueOf.call(r)===u.valueOf.call(t);case"[object ArrayBuffer]":case un:return n(en(r),en(t),e,o)}var f="[object Array]"===i;if(!f&&X(r)){if(G(r)!==G(t))return!1;if(r.buffer===t.buffer&&r.byteOffset===t.byteOffset)return!0;f=!0}if(!f){if("object"!=typeof r||"object"!=typeof t)return!1;var c=r.constructor,l=t.constructor;if(c!==l&&!(D(c)&&c instanceof c&&D(l)&&l instanceof l)&&"constructor"in r&&"constructor"in t)return!1}o=o||[];var s=(e=e||[]).length;for(;s--;)if(e[s]===r)return o[s]===t;if(e.push(r),o.push(t),f){if((s=r.length)!==t.length)return!1;for(;s--;)if(!on(r[s],t[s],e,o))return!1}else{var p,v=nn(r);if(s=v.length,nn(t).length!==s)return!1;for(;s--;)if(p=v[s],!W(t,p)||!on(r[p],t[p],e,o))return!1}return e.pop(),o.pop(),!0}(n,r,t,e)}function an(n){if(!_(n))return[];var r=[];for(var t in n)r.push(t);return g&&Z(n,r),r}function fn(n){var r=Y(n);return function(t){if(null==t)return!1;var e=an(t);if(Y(e))return!1;for(var u=0;u<r;u++)if(!D(t[n[u]]))return!1;return n!==hn||!D(t[cn])}}var cn="forEach",ln="has",sn=["clear","delete"],pn=["get",ln,"set"],vn=sn.concat(cn,pn),hn=sn.concat(pn),yn=["add"].concat(sn,cn,ln),dn=V?fn(vn):x("Map"),gn=V?fn(hn):x("WeakMap"),bn=V?fn(yn):x("Set"),mn=x("WeakSet");function jn(n){for(var r=nn(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=n[r[u]];return e}function _n(n){for(var r={},t=nn(n),e=0,u=t.length;e<u;e++)r[n[t[e]]]=t[e];return r}function wn(n){var r=[];for(var t in n)D(n[t])&&r.push(t);return r.sort()}function An(n,r){return function(t){var e=arguments.length;if(r&&(t=Object(t)),e<2||null==t)return t;for(var u=1;u<e;u++)for(var o=arguments[u],i=n(o),a=i.length,f=0;f<a;f++){var c=i[f];r&&void 0!==t[c]||(t[c]=o[c])}return t}}var xn=An(an),Sn=An(nn),On=An(an,!0);function Mn(n){if(!_(n))return{};if(v)return v(n);var r=function(){};r.prototype=n;var t=new r;return r.prototype=null,t}function En(n){return _(n)?U(n)?n.slice():xn({},n):n}function Bn(n){return U(n)?n:[n]}function Nn(n){return tn.toPath(n)}function In(n,r){for(var t=r.length,e=0;e<t;e++){if(null==n)return;n=n[r[e]]}return t?n:void 0}function Tn(n,r,t){var e=In(n,Nn(r));return w(e)?t:e}function kn(n){return n}function Dn(n){return n=Sn({},n),function(r){return rn(r,n)}}function Rn(n){return n=Nn(n),function(r){return In(r,n)}}function Fn(n,r,t){if(void 0===r)return n;switch(null==t?3:t){case 1:return function(t){return n.call(r,t)};case 3:return function(t,e,u){return n.call(r,t,e,u)};case 4:return function(t,e,u,o){return n.call(r,t,e,u,o)}}return function(){return n.apply(r,arguments)}}function Vn(n,r,t){return null==n?kn:D(n)?Fn(n,r,t):_(n)&&!U(n)?Dn(n):Rn(n)}function Pn(n,r){return Vn(n,r,1/0)}function qn(n,r,t){return tn.iteratee!==Pn?tn.iteratee(n,r):Vn(n,r,t)}function Un(){}function Wn(n,r){return null==r&&(r=n,n=0),n+Math.floor(Math.random()*(r-n+1))}tn.toPath=Bn,tn.iteratee=Pn;var zn=Date.now||function(){return(new Date).getTime()};function Ln(n){var r=function(r){return n[r]},t="(?:"+nn(n).join("|")+")",e=RegExp(t),u=RegExp(t,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,r):n}}var $n={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Cn=Ln($n),Kn=Ln(_n($n)),Jn=tn.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Gn=/(.)^/,Hn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Qn=/\\|'|\r|\n|\u2028|\u2029/g;function Xn(n){return"\\"+Hn[n]}var Yn=/^\s*(\w|\$)+\s*$/;var Zn=0;function nr(n,r,t,e,u){if(!(e instanceof r))return n.apply(t,u);var o=Mn(n.prototype),i=n.apply(o,u);return _(i)?i:o}var rr=j((function(n,r){var t=rr.placeholder,e=function(){for(var u=0,o=r.length,i=Array(o),a=0;a<o;a++)i[a]=r[a]===t?arguments[u++]:r[a];for(;u<arguments.length;)i.push(arguments[u++]);return nr(n,e,this,this,i)};return e}));rr.placeholder=tn;var tr=j((function(n,r,t){if(!D(n))throw new TypeError("Bind must be called on a function");var e=j((function(u){return nr(n,e,r,this,t.concat(u))}));return e})),er=K(Y);function ur(n,r,t,e){if(e=e||[],r||0===r){if(r<=0)return e.concat(n)}else r=1/0;for(var u=e.length,o=0,i=Y(n);o<i;o++){var a=n[o];if(er(a)&&(U(a)||L(a)))if(r>1)ur(a,r-1,t,e),u=e.length;else for(var f=0,c=a.length;f<c;)e[u++]=a[f++];else t||(e[u++]=a)}return e}var or=j((function(n,r){var t=(r=ur(r,!1,!1)).length;if(t<1)throw new Error("bindAll must be passed function names");for(;t--;){var e=r[t];n[e]=tr(n[e],n)}return n}));var ir=j((function(n,r,t){return setTimeout((function(){return n.apply(null,t)}),r)})),ar=rr(ir,tn,1);function fr(n){return function(){return!n.apply(this,arguments)}}function cr(n,r){var t;return function(){return--n>0&&(t=r.apply(this,arguments)),n<=1&&(r=null),t}}var lr=rr(cr,2);function sr(n,r,t){r=qn(r,t);for(var e,u=nn(n),o=0,i=u.length;o<i;o++)if(r(n[e=u[o]],e,n))return e}function pr(n){return function(r,t,e){t=qn(t,e);for(var u=Y(r),o=n>0?0:u-1;o>=0&&o<u;o+=n)if(t(r[o],o,r))return o;return-1}}var vr=pr(1),hr=pr(-1);function yr(n,r,t,e){for(var u=(t=qn(t,e,1))(r),o=0,i=Y(n);o<i;){var a=Math.floor((o+i)/2);t(n[a])<u?o=a+1:i=a}return o}function dr(n,r,t){return function(e,u,o){var a=0,f=Y(e);if("number"==typeof o)n>0?a=o>=0?o:Math.max(o+f,a):f=o>=0?Math.min(o+1,f):o+f+1;else if(t&&o&&f)return e[o=t(e,u)]===u?o:-1;if(u!=u)return(o=r(i.call(e,a,f),$))>=0?o+a:-1;for(o=n>0?a:f-1;o>=0&&o<f;o+=n)if(e[o]===u)return o;return-1}}var gr=dr(1,vr,yr),br=dr(-1,hr);function mr(n,r,t){var e=(er(n)?vr:sr)(n,r,t);if(void 0!==e&&-1!==e)return n[e]}function jr(n,r,t){var e,u;if(r=Fn(r,t),er(n))for(e=0,u=n.length;e<u;e++)r(n[e],e,n);else{var o=nn(n);for(e=0,u=o.length;e<u;e++)r(n[o[e]],o[e],n)}return n}function _r(n,r,t){r=qn(r,t);for(var e=!er(n)&&nn(n),u=(e||n).length,o=Array(u),i=0;i<u;i++){var a=e?e[i]:i;o[i]=r(n[a],a,n)}return o}function wr(n){var r=function(r,t,e,u){var o=!er(r)&&nn(r),i=(o||r).length,a=n>0?0:i-1;for(u||(e=r[o?o[a]:a],a+=n);a>=0&&a<i;a+=n){var f=o?o[a]:a;e=t(e,r[f],f,r)}return e};return function(n,t,e,u){var o=arguments.length>=3;return r(n,Fn(t,u,4),e,o)}}var Ar=wr(1),xr=wr(-1);function Sr(n,r,t){var e=[];return r=qn(r,t),jr(n,(function(n,t,u){r(n,t,u)&&e.push(n)})),e}function Or(n,r,t){r=qn(r,t);for(var e=!er(n)&&nn(n),u=(e||n).length,o=0;o<u;o++){var i=e?e[o]:o;if(!r(n[i],i,n))return!1}return!0}function Mr(n,r,t){r=qn(r,t);for(var e=!er(n)&&nn(n),u=(e||n).length,o=0;o<u;o++){var i=e?e[o]:o;if(r(n[i],i,n))return!0}return!1}function Er(n,r,t,e){return er(n)||(n=jn(n)),("number"!=typeof t||e)&&(t=0),gr(n,r,t)>=0}var Br=j((function(n,r,t){var e,u;return D(r)?u=r:(r=Nn(r),e=r.slice(0,-1),r=r[r.length-1]),_r(n,(function(n){var o=u;if(!o){if(e&&e.length&&(n=In(n,e)),null==n)return;o=n[r]}return null==o?o:o.apply(n,t)}))}));function Nr(n,r){return _r(n,Rn(r))}function Ir(n,r,t){var e,u,o=-1/0,i=-1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=er(n)?n:jn(n)).length;a<f;a++)null!=(e=n[a])&&e>o&&(o=e);else r=qn(r,t),jr(n,(function(n,t,e){((u=r(n,t,e))>i||u===-1/0&&o===-1/0)&&(o=n,i=u)}));return o}function Tr(n,r,t){if(null==r||t)return er(n)||(n=jn(n)),n[Wn(n.length-1)];var e=er(n)?En(n):jn(n),u=Y(e);r=Math.max(Math.min(r,u),0);for(var o=u-1,i=0;i<r;i++){var a=Wn(i,o),f=e[i];e[i]=e[a],e[a]=f}return e.slice(0,r)}function kr(n,r){return function(t,e,u){var o=r?[[],[]]:{};return e=qn(e,u),jr(t,(function(r,u){var i=e(r,u,t);n(o,r,i)})),o}}var Dr=kr((function(n,r,t){W(n,t)?n[t].push(r):n[t]=[r]})),Rr=kr((function(n,r,t){n[t]=r})),Fr=kr((function(n,r,t){W(n,t)?n[t]++:n[t]=1})),Vr=kr((function(n,r,t){n[t?0:1].push(r)}),!0),Pr=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function qr(n,r,t){return r in t}var Ur=j((function(n,r){var t={},e=r[0];if(null==n)return t;D(e)?(r.length>1&&(e=Fn(e,r[1])),r=an(n)):(e=qr,r=ur(r,!1,!1),n=Object(n));for(var u=0,o=r.length;u<o;u++){var i=r[u],a=n[i];e(a,i,n)&&(t[i]=a)}return t})),Wr=j((function(n,r){var t,e=r[0];return D(e)?(e=fr(e),r.length>1&&(t=r[1])):(r=_r(ur(r,!1,!1),String),e=function(n,t){return!Er(r,t)}),Ur(n,e,t)}));function zr(n,r,t){return i.call(n,0,Math.max(0,n.length-(null==r||t?1:r)))}function Lr(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[0]:zr(n,n.length-r)}function $r(n,r,t){return i.call(n,null==r||t?1:r)}var Cr=j((function(n,r){return r=ur(r,!0,!0),Sr(n,(function(n){return!Er(r,n)}))})),Kr=j((function(n,r){return Cr(n,r)}));function Jr(n,r,t,e){A(r)||(e=t,t=r,r=!1),null!=t&&(t=qn(t,e));for(var u=[],o=[],i=0,a=Y(n);i<a;i++){var f=n[i],c=t?t(f,i,n):f;r&&!t?(i&&o===c||u.push(f),o=c):t?Er(o,c)||(o.push(c),u.push(f)):Er(u,f)||u.push(f)}return u}var Gr=j((function(n){return Jr(ur(n,!0,!0))}));function Hr(n){for(var r=n&&Ir(n,Y).length||0,t=Array(r),e=0;e<r;e++)t[e]=Nr(n,e);return t}var Qr=j(Hr);function Xr(n,r){return n._chain?tn(r).chain():r}function Yr(n){return jr(wn(n),(function(r){var t=tn[r]=n[r];tn.prototype[r]=function(){var n=[this._wrapped];return o.apply(n,arguments),Xr(this,t.apply(tn,n))}})),tn}jr(["pop","push","reverse","shift","sort","splice","unshift"],(function(n){var r=t[n];tn.prototype[n]=function(){var t=this._wrapped;return null!=t&&(r.apply(t,arguments),"shift"!==n&&"splice"!==n||0!==t.length||delete t[0]),Xr(this,t)}})),jr(["concat","join","slice"],(function(n){var r=t[n];tn.prototype[n]=function(){var n=this._wrapped;return null!=n&&(n=r.apply(n,arguments)),Xr(this,n)}}));var Zr=Yr({__proto__:null,VERSION:n,restArguments:j,isObject:_,isNull:function(n){return null===n},isUndefined:w,isBoolean:A,isElement:function(n){return!(!n||1!==n.nodeType)},isString:S,isNumber:O,isDate:M,isRegExp:E,isError:B,isSymbol:N,isArrayBuffer:I,isDataView:q,isArray:U,isFunction:D,isArguments:L,isFinite:function(n){return!N(n)&&d(n)&&!isNaN(parseFloat(n))},isNaN:$,isTypedArray:X,isEmpty:function(n){if(null==n)return!0;var r=Y(n);return"number"==typeof r&&(U(n)||S(n)||L(n))?0===r:0===Y(nn(n))},isMatch:rn,isEqual:function(n,r){return on(n,r)},isMap:dn,isWeakMap:gn,isSet:bn,isWeakSet:mn,keys:nn,allKeys:an,values:jn,pairs:function(n){for(var r=nn(n),t=r.length,e=Array(t),u=0;u<t;u++)e[u]=[r[u],n[r[u]]];return e},invert:_n,functions:wn,methods:wn,extend:xn,extendOwn:Sn,assign:Sn,defaults:On,create:function(n,r){var t=Mn(n);return r&&Sn(t,r),t},clone:En,tap:function(n,r){return r(n),n},get:Tn,has:function(n,r){for(var t=(r=Nn(r)).length,e=0;e<t;e++){var u=r[e];if(!W(n,u))return!1;n=n[u]}return!!t},mapObject:function(n,r,t){r=qn(r,t);for(var e=nn(n),u=e.length,o={},i=0;i<u;i++){var a=e[i];o[a]=r(n[a],a,n)}return o},identity:kn,constant:C,noop:Un,toPath:Bn,property:Rn,propertyOf:function(n){return null==n?Un:function(r){return Tn(n,r)}},matcher:Dn,matches:Dn,times:function(n,r,t){var e=Array(Math.max(0,n));r=Fn(r,t,1);for(var u=0;u<n;u++)e[u]=r(u);return e},random:Wn,now:zn,escape:Cn,unescape:Kn,templateSettings:Jn,template:function(n,r,t){!r&&t&&(r=t),r=On({},r,tn.templateSettings);var e=RegExp([(r.escape||Gn).source,(r.interpolate||Gn).source,(r.evaluate||Gn).source].join("|")+"|$","g"),u=0,o="__p+='";n.replace(e,(function(r,t,e,i,a){return o+=n.slice(u,a).replace(Qn,Xn),u=a+r.length,t?o+="'+\n((__t=("+t+"))==null?'':_.escape(__t))+\n'":e?o+="'+\n((__t=("+e+"))==null?'':__t)+\n'":i&&(o+="';\n"+i+"\n__p+='"),r})),o+="';\n";var i,a=r.variable;if(a){if(!Yn.test(a))throw new Error("variable is not a bare identifier: "+a)}else o="with(obj||{}){\n"+o+"}\n",a="obj";o="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{i=new Function(a,"_",o)}catch(n){throw n.source=o,n}var f=function(n){return i.call(this,n,tn)};return f.source="function("+a+"){\n"+o+"}",f},result:function(n,r,t){var e=(r=Nn(r)).length;if(!e)return D(t)?t.call(n):t;for(var u=0;u<e;u++){var o=null==n?void 0:n[r[u]];void 0===o&&(o=t,u=e),n=D(o)?o.call(n):o}return n},uniqueId:function(n){var r=++Zn+"";return n?n+r:r},chain:function(n){var r=tn(n);return r._chain=!0,r},iteratee:Pn,partial:rr,bind:tr,bindAll:or,memoize:function(n,r){var t=function(e){var u=t.cache,o=""+(r?r.apply(this,arguments):e);return W(u,o)||(u[o]=n.apply(this,arguments)),u[o]};return t.cache={},t},delay:ir,defer:ar,throttle:function(n,r,t){var e,u,o,i,a=0;t||(t={});var f=function(){a=!1===t.leading?0:zn(),e=null,i=n.apply(u,o),e||(u=o=null)},c=function(){var c=zn();a||!1!==t.leading||(a=c);var l=r-(c-a);return u=this,o=arguments,l<=0||l>r?(e&&(clearTimeout(e),e=null),a=c,i=n.apply(u,o),e||(u=o=null)):e||!1===t.trailing||(e=setTimeout(f,l)),i};return c.cancel=function(){clearTimeout(e),a=0,e=u=o=null},c},debounce:function(n,r,t){var e,u,o,i,a,f=function(){var c=zn()-u;r>c?e=setTimeout(f,r-c):(e=null,t||(i=n.apply(a,o)),e||(o=a=null))},c=j((function(c){return a=this,o=c,u=zn(),e||(e=setTimeout(f,r),t&&(i=n.apply(a,o))),i}));return c.cancel=function(){clearTimeout(e),e=o=a=null},c},wrap:function(n,r){return rr(r,n)},negate:fr,compose:function(){var n=arguments,r=n.length-1;return function(){for(var t=r,e=n[r].apply(this,arguments);t--;)e=n[t].call(this,e);return e}},after:function(n,r){return function(){if(--n<1)return r.apply(this,arguments)}},before:cr,once:lr,findKey:sr,findIndex:vr,findLastIndex:hr,sortedIndex:yr,indexOf:gr,lastIndexOf:br,find:mr,detect:mr,findWhere:function(n,r){return mr(n,Dn(r))},each:jr,forEach:jr,map:_r,collect:_r,reduce:Ar,foldl:Ar,inject:Ar,reduceRight:xr,foldr:xr,filter:Sr,select:Sr,reject:function(n,r,t){return Sr(n,fr(qn(r)),t)},every:Or,all:Or,some:Mr,any:Mr,contains:Er,includes:Er,include:Er,invoke:Br,pluck:Nr,where:function(n,r){return Sr(n,Dn(r))},max:Ir,min:function(n,r,t){var e,u,o=1/0,i=1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=er(n)?n:jn(n)).length;a<f;a++)null!=(e=n[a])&&e<o&&(o=e);else r=qn(r,t),jr(n,(function(n,t,e){((u=r(n,t,e))<i||u===1/0&&o===1/0)&&(o=n,i=u)}));return o},shuffle:function(n){return Tr(n,1/0)},sample:Tr,sortBy:function(n,r,t){var e=0;return r=qn(r,t),Nr(_r(n,(function(n,t,u){return{value:n,index:e++,criteria:r(n,t,u)}})).sort((function(n,r){var t=n.criteria,e=r.criteria;if(t!==e){if(t>e||void 0===t)return 1;if(t<e||void 0===e)return-1}return n.index-r.index})),"value")},groupBy:Dr,indexBy:Rr,countBy:Fr,partition:Vr,toArray:function(n){return n?U(n)?i.call(n):S(n)?n.match(Pr):er(n)?_r(n,kn):jn(n):[]},size:function(n){return null==n?0:er(n)?n.length:nn(n).length},pick:Ur,omit:Wr,first:Lr,head:Lr,take:Lr,initial:zr,last:function(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[n.length-1]:$r(n,Math.max(0,n.length-r))},rest:$r,tail:$r,drop:$r,compact:function(n){return Sr(n,Boolean)},flatten:function(n,r){return ur(n,r,!1)},without:Kr,uniq:Jr,unique:Jr,union:Gr,intersection:function(n){for(var r=[],t=arguments.length,e=0,u=Y(n);e<u;e++){var o=n[e];if(!Er(r,o)){var i;for(i=1;i<t&&Er(arguments[i],o);i++);i===t&&r.push(o)}}return r},difference:Cr,unzip:Hr,transpose:Hr,zip:Qr,object:function(n,r){for(var t={},e=0,u=Y(n);e<u;e++)r?t[n[e]]=r[e]:t[n[e][0]]=n[e][1];return t},range:function(n,r,t){null==r&&(r=n||0,n=0),t||(t=r<n?-1:1);for(var e=Math.max(Math.ceil((r-n)/t),0),u=Array(e),o=0;o<e;o++,n+=t)u[o]=n;return u},chunk:function(n,r){if(null==r||r<1)return[];for(var t=[],e=0,u=n.length;e<u;)t.push(i.call(n,e,e+=r));return t},mixin:Yr,default:tn});return Zr._=Zr,Zr}));
|