Merged Pull Request #484
This commit is contained in:
Regular → Executable
Executable
+5
@@ -0,0 +1,5 @@
|
||||
node_modules/*
|
||||
dist/*
|
||||
sample/*
|
||||
src/vendor/*
|
||||
src/app/panels/*/{lib,leaflet}/*
|
||||
@@ -1,40 +1,33 @@
|
||||
{
|
||||
"jquery": true,
|
||||
"browser": true,
|
||||
"browser": true,
|
||||
|
||||
"bitwise":false,
|
||||
"curly": true,
|
||||
"eqnull": true,
|
||||
"globalstrict": true,
|
||||
"devel": true,
|
||||
"eqeqeq": true,
|
||||
"forin": false,
|
||||
"immed": true,
|
||||
"supernew": true,
|
||||
"expr": true,
|
||||
"indent": 2,
|
||||
"latedef": true,
|
||||
"newcap": true,
|
||||
"noarg": true,
|
||||
"noempty": true,
|
||||
"undef": true,
|
||||
"boss": true,
|
||||
"trailing": false,
|
||||
"laxbreak": true,
|
||||
"laxcomma": true,
|
||||
"sub": true,
|
||||
"bitwise":false,
|
||||
"curly": true,
|
||||
"eqnull": true,
|
||||
"globalstrict": true,
|
||||
"devel": true,
|
||||
"eqeqeq": true,
|
||||
"forin": false,
|
||||
"immed": true,
|
||||
"supernew": true,
|
||||
"expr": true,
|
||||
"indent": 2,
|
||||
"latedef": true,
|
||||
"newcap": true,
|
||||
"noarg": true,
|
||||
"noempty": true,
|
||||
"undef": true,
|
||||
"boss": true,
|
||||
"trailing": false,
|
||||
"laxbreak": true,
|
||||
"laxcomma": true,
|
||||
"sub": true,
|
||||
"unused": true,
|
||||
|
||||
"maxlen": 140,
|
||||
"maxlen": 140,
|
||||
|
||||
"globals": {
|
||||
"$LAB": false,
|
||||
"_": false,
|
||||
"$": false,
|
||||
"kbn" : false,
|
||||
"angular" : false,
|
||||
"exports": true,
|
||||
"module": false,
|
||||
"config": false,
|
||||
"moment": false
|
||||
}
|
||||
"globals": {
|
||||
"define": true,
|
||||
"require": true
|
||||
}
|
||||
}
|
||||
Executable
+259
@@ -0,0 +1,259 @@
|
||||
From a428f9e5deb100e0d7a1c6b210cb41127dfd24c8 Mon Sep 17 00:00:00 2001
|
||||
From: Rashid Khan <rashidkpc@gmail.com>
|
||||
Date: Fri, 6 Sep 2013 14:38:01 -0700
|
||||
Subject: [PATCH 1/5] Fix nginx.conf after switching dashboard load to GET
|
||||
|
||||
---
|
||||
sample/nginx.conf | 16 +++++++++++-----
|
||||
1 file changed, 11 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/sample/nginx.conf b/sample/nginx.conf
|
||||
index 50a365a..3af4ea2 100644
|
||||
--- a/sample/nginx.conf
|
||||
+++ b/sample/nginx.conf
|
||||
@@ -38,13 +38,19 @@ server {
|
||||
location ~ ^/kibana-int/dashboard/.*$ {
|
||||
proxy_pass http://127.0.0.1:9200;
|
||||
proxy_read_timeout 90;
|
||||
- auth_basic "Restricted";
|
||||
- auth_basic_user_file /etc/nginx/conf.d/kibana.myhost.org.htpasswd;
|
||||
+ limit_except GET {
|
||||
+ proxy_pass http://127.0.0.1:9200;
|
||||
+ auth_basic "Restricted";
|
||||
+ auth_basic_user_file /etc/nginx/conf.d/kibana.myhost.org.htpasswd;
|
||||
+ }
|
||||
}
|
||||
location ~ ^/kibana-int/temp.*$ {
|
||||
proxy_pass http://127.0.0.1:9200;
|
||||
proxy_read_timeout 90;
|
||||
- auth_basic "Restricted";
|
||||
- auth_basic_user_file /etc/nginx/conf.d/kibana.myhost.org.htpasswd;
|
||||
+ limit_except GET {
|
||||
+ proxy_pass http://127.0.0.1:9200;
|
||||
+ auth_basic "Restricted";
|
||||
+ auth_basic_user_file /etc/nginx/conf.d/kibana.myhost.org.htpasswd;
|
||||
+ }
|
||||
}
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
--
|
||||
1.8.4
|
||||
|
||||
|
||||
From 6a9a2b95b13346c523351175bc5fac5d43b3a674 Mon Sep 17 00:00:00 2001
|
||||
From: Stephen Wood <stephen@moz.com>
|
||||
Date: Fri, 6 Sep 2013 16:23:33 -0700
|
||||
Subject: [PATCH 2/5] Clarify error message.
|
||||
|
||||
Elasticsearch will throw a 404 if there is no indexes added yet, resulting in
|
||||
this unclear message -- even for people that are not using any sort of proxy.
|
||||
|
||||
This message update should make it easier to quickly troubleshoot why the
|
||||
the dialogue is popping up.
|
||||
---
|
||||
js/services.js | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/js/services.js b/js/services.js
|
||||
index 1d309f5..d694062 100644
|
||||
--- a/js/services.js
|
||||
+++ b/js/services.js
|
||||
@@ -89,9 +89,10 @@ angular.module('kibana.services', [])
|
||||
if(status === 0) {
|
||||
alertSrv.set('Error',"Could not contact Elasticsearch at "+config.elasticsearch+
|
||||
". Please ensure that Elasticsearch is reachable from your system." ,'error');
|
||||
- } else {
|
||||
- alertSrv.set('Error',"Could not find "+config.elasticsearch+"/"+indices.join(',')+"/_mapping. If you"+
|
||||
- " are using a proxy, ensure it is configured correctly",'error');
|
||||
+ } else {
|
||||
+ alertSrv.set('Error',"No index found at "+config.elasticsearch+"/" +
|
||||
+ indices.join(',')+"/_mapping. Please create at least one index." +
|
||||
+ "If you're using a proxy ensure it is configured correctly.",'error');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -963,4 +964,4 @@ angular.module('kibana.services', [])
|
||||
return false;
|
||||
});
|
||||
};
|
||||
-});
|
||||
\ No newline at end of file
|
||||
+});
|
||||
--
|
||||
1.8.4
|
||||
|
||||
|
||||
From e071366bbf9139fce45781a503f0f922d4db263d Mon Sep 17 00:00:00 2001
|
||||
From: Rashid Khan <rashidkpc@gmail.com>
|
||||
Date: Tue, 10 Sep 2013 14:34:45 -0700
|
||||
Subject: [PATCH 3/5] fixed unlinted line
|
||||
|
||||
---
|
||||
js/services.js | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/services.js b/js/services.js
|
||||
index d694062..f2c6add 100644
|
||||
--- a/js/services.js
|
||||
+++ b/js/services.js
|
||||
@@ -89,7 +89,7 @@ angular.module('kibana.services', [])
|
||||
if(status === 0) {
|
||||
alertSrv.set('Error',"Could not contact Elasticsearch at "+config.elasticsearch+
|
||||
". Please ensure that Elasticsearch is reachable from your system." ,'error');
|
||||
- } else {
|
||||
+ } else {
|
||||
alertSrv.set('Error',"No index found at "+config.elasticsearch+"/" +
|
||||
indices.join(',')+"/_mapping. Please create at least one index." +
|
||||
"If you're using a proxy ensure it is configured correctly.",'error');
|
||||
--
|
||||
1.8.4
|
||||
|
||||
|
||||
From d72c72b3dfea036cc2238f63a38625f0ac1b40ac Mon Sep 17 00:00:00 2001
|
||||
From: Spencer Alger <spencer@spenceralger.com>
|
||||
Date: Tue, 10 Sep 2013 23:25:09 -0700
|
||||
Subject: [PATCH 4/5] fixing indent issue
|
||||
|
||||
---
|
||||
js/services.js | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/services.js b/js/services.js
|
||||
index d694062..f2c6add 100644
|
||||
--- a/js/services.js
|
||||
+++ b/js/services.js
|
||||
@@ -89,7 +89,7 @@ angular.module('kibana.services', [])
|
||||
if(status === 0) {
|
||||
alertSrv.set('Error',"Could not contact Elasticsearch at "+config.elasticsearch+
|
||||
". Please ensure that Elasticsearch is reachable from your system." ,'error');
|
||||
- } else {
|
||||
+ } else {
|
||||
alertSrv.set('Error',"No index found at "+config.elasticsearch+"/" +
|
||||
indices.join(',')+"/_mapping. Please create at least one index." +
|
||||
"If you're using a proxy ensure it is configured correctly.",'error');
|
||||
--
|
||||
1.8.4
|
||||
|
||||
|
||||
From 7ab2a5349a52a15695d2f8fca541f880f474f4a0 Mon Sep 17 00:00:00 2001
|
||||
From: Rashid Khan <rashidkpc@gmail.com>
|
||||
Date: Wed, 11 Sep 2013 11:14:05 -0700
|
||||
Subject: [PATCH 5/5] Closes #477, closes #464. Also fixes urlLink and noXml
|
||||
filters on array fields
|
||||
|
||||
---
|
||||
js/filters.js | 56 ++++++++++++++++++++++++++++++++----------------
|
||||
panels/table/module.html | 2 +-
|
||||
panels/table/module.js | 1 +
|
||||
3 files changed, 40 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/js/filters.js b/js/filters.js
|
||||
index fb60c24..7f25a12 100644
|
||||
--- a/js/filters.js
|
||||
+++ b/js/filters.js
|
||||
@@ -32,18 +32,23 @@ angular.module('kibana.filters', [])
|
||||
return arr.toString();
|
||||
}
|
||||
};
|
||||
-
|
||||
}).filter('noXml', function() {
|
||||
- return function(text) {
|
||||
- if(!_.isString(text)) {
|
||||
- return text;
|
||||
- }
|
||||
- return text.
|
||||
+ var noXml = function(text) {
|
||||
+ return _.isString(text) ?
|
||||
+ text.
|
||||
replace(/&/g, '&').
|
||||
replace(/</g, '<').
|
||||
replace(/>/g, '>').
|
||||
replace(/'/g, ''').
|
||||
- replace(/"/g, '"');
|
||||
+ replace(/"/g, '"') :
|
||||
+ text;
|
||||
+ };
|
||||
+ return function(text) {
|
||||
+ return _.isArray(text) ?
|
||||
+ _.map(text,function(t) {
|
||||
+ return noXml(t);
|
||||
+ }) :
|
||||
+ noXml(text);
|
||||
};
|
||||
}).filter('urlLink', function() {
|
||||
var //URLs starting with http://, https://, or ftp://
|
||||
@@ -53,20 +58,35 @@ angular.module('kibana.filters', [])
|
||||
//Change email addresses to mailto:: links.
|
||||
r3 = /(\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,6})/gim;
|
||||
|
||||
- return function(text, target, otherProp) {
|
||||
+ var urlLink = function(text) {
|
||||
+ var t1,t2,t3;
|
||||
if(!_.isString(text)) {
|
||||
return text;
|
||||
+ } else {
|
||||
+ var i=1;
|
||||
+ _.each(text.match(r1), function(url) {
|
||||
+ t1 = text.replace(r1, "<a href=\"$1\" target=\"_blank\">$1</a>");
|
||||
+ });
|
||||
+ text = t1 || text;
|
||||
+ _.each(text.match(r2), function(url) {
|
||||
+ t2 = text.replace(r2, "$1<a href=\"http://$2\" target=\"_blank\">$2</a>");
|
||||
+ });
|
||||
+ text = t2 || text;
|
||||
+ _.each(text.match(r3), function(url) {
|
||||
+ t3 = text.replace(r3, "<a href=\"mailto:$1\">$1</a>");
|
||||
+ });
|
||||
+ text = t3 || text;
|
||||
+ return text;
|
||||
}
|
||||
- _.each(text.match(r1), function(url) {
|
||||
- text = text.replace(r1, "<a href=\"$1\" target=\"_blank\">$1</a>");
|
||||
- });
|
||||
- _.each(text.match(r2), function(url) {
|
||||
- text = text.replace(r2, "$1<a href=\"http://$2\" target=\"_blank\">$2</a>");
|
||||
- });
|
||||
- _.each(text.match(r3), function(url) {
|
||||
- text = text.replace(r3, "<a href=\"mailto:$1\">$1</a>");
|
||||
- });
|
||||
- return text;
|
||||
+ };
|
||||
+
|
||||
+ return function(text, target, otherProp) {
|
||||
+
|
||||
+ return _.isArray(text) ?
|
||||
+ _.map(text,function(t) {
|
||||
+ return urlLink(t);
|
||||
+ }) :
|
||||
+ urlLink(text);
|
||||
};
|
||||
}).filter('gistid', function() {
|
||||
var gist_pattern = /(\d{5,})|([a-z0-9]{10,})|(gist.github.com(\/*.*)\/[a-z0-9]{5,}\/*$)/;
|
||||
diff --git a/panels/table/module.html b/panels/table/module.html
|
||||
index c872549..92f3bdc 100644
|
||||
--- a/panels/table/module.html
|
||||
+++ b/panels/table/module.html
|
||||
@@ -75,7 +75,7 @@
|
||||
<i class='icon-ban-circle pointer' ng-click="build_search(key,value,true)"></i>
|
||||
</td>
|
||||
<!-- At some point we need to create a more efficient way of applying the filter pipeline -->
|
||||
- <td style="white-space:pre-wrap" ng-bind-html-unsafe="value|noXml|urlLink"></td>
|
||||
+ <td style="white-space:pre-wrap" ng-bind-html-unsafe="value|noXml|urlLink|stringify"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
diff --git a/panels/table/module.js b/panels/table/module.js
|
||||
index 52c7367..0b2f62b 100644
|
||||
--- a/panels/table/module.js
|
||||
+++ b/panels/table/module.js
|
||||
@@ -267,6 +267,7 @@ angular.module('kibana.table', [])
|
||||
|
||||
|
||||
})
|
||||
+// This also escapes some xml sequences
|
||||
.filter('tableHighlight', function() {
|
||||
return function(text) {
|
||||
if (!_.isUndefined(text) && !_.isNull(text) && text.toString().length > 0) {
|
||||
--
|
||||
1.8.4
|
||||
Executable
+368
@@ -0,0 +1,368 @@
|
||||
From ea62d4aea330fc6cd547b17438755e0f7b571b33 Mon Sep 17 00:00:00 2001
|
||||
From: Rashid Khan <rashidkpc@gmail.com>
|
||||
Date: Wed, 11 Sep 2013 15:42:03 -0700
|
||||
Subject: [PATCH 1/5] Added pointer to chart hovers
|
||||
|
||||
---
|
||||
panels/histogram/module.html | 10 +++++-----
|
||||
panels/pie/module.html | 4 ++--
|
||||
panels/terms/module.html | 12 ++++++------
|
||||
3 files changed, 13 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/panels/histogram/module.html b/panels/histogram/module.html
|
||||
index 5d76715..4ce6b6a 100644
|
||||
--- a/panels/histogram/module.html
|
||||
+++ b/panels/histogram/module.html
|
||||
@@ -8,10 +8,10 @@
|
||||
display:inline-block;
|
||||
height:10px;
|
||||
width:10px;
|
||||
- border-radius:5px;
|
||||
+ border-radius:5px;
|
||||
}
|
||||
.histogram-legend-item {
|
||||
- display:inline-block;
|
||||
+ display:inline-block;
|
||||
}
|
||||
.histogram-chart {
|
||||
position:relative;
|
||||
@@ -23,7 +23,7 @@
|
||||
<div>
|
||||
<span ng-show='panel.zoomlinks && data'>
|
||||
<!--<a class='small' ng-click='zoom(0.5)'><i class='icon-zoom-in'></i> Zoom In</a>-->
|
||||
- <a class='small' ng-click='zoom(2)'><i class='icon-zoom-out'></i> Zoom Out</a> |
|
||||
+ <a class='small' ng-click='zoom(2)'><i class='icon-zoom-out'></i> Zoom Out</a> |
|
||||
</span>
|
||||
<span ng-show="panel.legend" ng-repeat='series in data' class="histogram-legend">
|
||||
<i class='icon-circle' ng-style="{color: series.info.color}"></i>
|
||||
@@ -32,5 +32,5 @@
|
||||
<span ng-show="panel.legend" class="small"><span ng-show="panel.value_field && panel.mode != 'count'">{{panel.value_field}}</span> {{panel.mode}} per <strong>{{panel.interval}}</strong> | (<strong>{{hits}}</strong> hits)</span>
|
||||
</div>
|
||||
<center><img ng-show='panel.loading && _.isUndefined(data)' src="common/img/load_big.gif"></center>
|
||||
- <div histogram-chart class="histogram-chart" params="{{panel}}"></div>
|
||||
-</kibana-panel>
|
||||
\ No newline at end of file
|
||||
+ <div histogram-chart class="pointer histogram-chart" params="{{panel}}"></div>
|
||||
+</kibana-panel>
|
||||
\ No newline at end of file
|
||||
diff --git a/panels/pie/module.html b/panels/pie/module.html
|
||||
index a36cf2c..f089586 100644
|
||||
--- a/panels/pie/module.html
|
||||
+++ b/panels/pie/module.html
|
||||
@@ -8,9 +8,9 @@
|
||||
</div><br>
|
||||
<div style="clear:both"></div>
|
||||
|
||||
- <div pie params="{{panel}}" style="position:relative"></div>
|
||||
+ <div pie class="pointer" params="{{panel}}" style="position:relative"></div>
|
||||
|
||||
<div ng-show="panel.legend == 'below'" ng-repeat="query in legend" style="float:left;padding-left: 10px;">
|
||||
<span ng-show='panel.chart != "none"'><i class="icon-circle" ng-style="{color:query.color}"></i></span><span class="small"> {{query.label}} ({{query.data[0][1]}}) </span></span>
|
||||
</div>
|
||||
-</kibana-panel>
|
||||
\ No newline at end of file
|
||||
+</kibana-panel>
|
||||
\ No newline at end of file
|
||||
diff --git a/panels/terms/module.html b/panels/terms/module.html
|
||||
index 814729c..70b870b 100644
|
||||
--- a/panels/terms/module.html
|
||||
+++ b/panels/terms/module.html
|
||||
@@ -5,7 +5,7 @@
|
||||
<!-- START Pie or bar chart -->
|
||||
<div ng-show="panel.counter_pos == 'above' && (panel.chart == 'bar' || panel.chart == 'pie')" id='{{$id}}-legend'>
|
||||
<!-- vertical legend above -->
|
||||
- <table class="small" ng-show="panel.arrangement == 'vertical'">
|
||||
+ <table class="small" ng-show="panel.arrangement == 'vertical'">
|
||||
<tr ng-repeat="term in legend">
|
||||
<td><i class="icon-circle" ng-style="{color:term.color}"></i></td> <td style="padding-right:10px;padding-left:10px;">{{term.label}}</td><td>{{term.data[0][1]}}</td>
|
||||
</tr>
|
||||
@@ -21,11 +21,11 @@
|
||||
<!-- keep legend from over lapping -->
|
||||
<div style="clear:both"></div>
|
||||
|
||||
- <div ng-show="panel.chart == 'pie' || panel.chart == 'bar'" terms-chart params="{{panel}}" style="position:relative"></div>
|
||||
+ <div ng-show="panel.chart == 'pie' || panel.chart == 'bar'" terms-chart params="{{panel}}" style="position:relative" class="pointer"></div>
|
||||
|
||||
<div ng-show="panel.counter_pos == 'below' && (panel.chart == 'bar' || panel.chart == 'pie')" id='{{$id}}-legend'>
|
||||
<!-- vertical legend below -->
|
||||
- <table class="small" ng-show="panel.arrangement == 'vertical'">
|
||||
+ <table class="small" ng-show="panel.arrangement == 'vertical'">
|
||||
<tr ng-repeat="term in legend">
|
||||
<td><i class="icon-circle" ng-style="{color:term.color}"></i></i></td> <td style="padding-right:10px;padding-left:10px;">{{term.label}}</td><td>{{term.data[0][1]}}</td>
|
||||
</tr>
|
||||
@@ -39,7 +39,7 @@
|
||||
</div>
|
||||
<!-- END Pie or Bar chart -->
|
||||
|
||||
- <table ng-style="panel.style" class="table table-striped table-condensed" ng-show="panel.chart == 'table'">
|
||||
+ <table ng-style="panel.style" class="table table-striped table-condensed" ng-show="panel.chart == 'table'">
|
||||
<thead>
|
||||
<th>Term</th> <th>Count</th> <th>Action</th>
|
||||
</thead>
|
||||
@@ -48,11 +48,11 @@
|
||||
<td>{{term.data[0][1]}}</td>
|
||||
<td>
|
||||
<span ng-hide="term.meta == 'other'">
|
||||
- <i class='icon-search pointer' ng-click="build_search(term)"></i>
|
||||
+ <i class='icon-search pointer' ng-click="build_search(term)"></i>
|
||||
<i class='icon-ban-circle pointer' ng-click="build_search(term,true)"></i>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
-</kibana-panel>
|
||||
\ No newline at end of file
|
||||
+</kibana-panel>
|
||||
\ No newline at end of file
|
||||
--
|
||||
1.8.4
|
||||
|
||||
|
||||
From b63af822c75342a39362e4aef3693ed50cdebe44 Mon Sep 17 00:00:00 2001
|
||||
From: Rashid Khan <rashidkpc@gmail.com>
|
||||
Date: Wed, 11 Sep 2013 15:58:53 -0700
|
||||
Subject: [PATCH 2/5] Cleaned up timepicker layout
|
||||
|
||||
---
|
||||
panels/timepicker/module.html | 43 ++++++++++++++++++++++++-------------------
|
||||
1 file changed, 24 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/panels/timepicker/module.html b/panels/timepicker/module.html
|
||||
index 2c89289..c327b42 100644
|
||||
--- a/panels/timepicker/module.html
|
||||
+++ b/panels/timepicker/module.html
|
||||
@@ -1,36 +1,41 @@
|
||||
<kibana-panel ng-controller='timepicker' ng-init="init()">
|
||||
- <div class="row-fluid" ng-switch="panel.mode" ng-show="filterSrv.idsByType('time').length > 0">
|
||||
- <div ng-switch-when="absolute">
|
||||
- <div class="span5">
|
||||
+ <style>
|
||||
+ .timepicker-block {
|
||||
+ display: inline-block;
|
||||
+ }
|
||||
+ </style>
|
||||
+
|
||||
+ <div class="row-fluid form-horizontal" ng-switch="panel.mode" ng-show="filterSrv.idsByType('time').length > 0">
|
||||
+ <div ng-switch-when="absolute" >
|
||||
+ <div class="timepicker-block">
|
||||
<form class="nomargin">
|
||||
<label><small>From</small></label>
|
||||
- <input type="text" class="input-smaller" ng-change="time_check()" ng-model="timepicker.from.date" data-date-format="mm/dd/yyyy" bs-datepicker>
|
||||
+ <input type="text" class="input-smaller" ng-change="time_check()" ng-model="timepicker.from.date" data-date-format="mm/dd/yyyy" bs-datepicker>
|
||||
<input type="text" class="input-mini" ng-change="time_check()" data-show-meridian="false" data-show-seconds="true" ng-model="timepicker.from.time" bs-timepicker>
|
||||
</form>
|
||||
</div>
|
||||
- <div class="span5" style="margin-left:10px">
|
||||
+ <div class="timepicker-block" style="margin-left:10px">
|
||||
<form class="nomargin">
|
||||
<label style="margin-left:5px"><small>To (<a ng-click="to_now()">now</a>)</small></label>
|
||||
- <input type="text" class="input-smaller" ng-change="time_check()" ng-model="timepicker.to.date" data-date-format="mm/dd/yyyy" bs-datepicker>
|
||||
+ <input type="text" class="input-smaller" ng-change="time_check()" ng-model="timepicker.to.date" data-date-format="mm/dd/yyyy" bs-datepicker>
|
||||
<input type="text" class="input-mini" ng-change="time_check()" data-show-meridian="false" data-show-seconds="true" ng-model="timepicker.to.time" bs-timepicker>
|
||||
</form>
|
||||
</div>
|
||||
- <div class="span1">
|
||||
+ <div class="timepicker-block">
|
||||
<form class="nomargin">
|
||||
- <label><small><br></small></label>
|
||||
- <button class="btn" ng-click="time_apply()" ><i class="icon-ok"></i></button>
|
||||
+ <button class="btn" ng-click="time_apply()"><i class="icon-ok"></i></button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div ng-switch-when="since">
|
||||
- <div class="span5">
|
||||
+ <div class="timepicker-block">
|
||||
<form class="nomargin">
|
||||
<label><small>Since</small></label>
|
||||
- <input type="text" class="input-smaller" ng-change="time_check()" ng-model="timepicker.from.date" data-date-format="mm/dd/yyyy" bs-datepicker>
|
||||
+ <input type="text" class="input-smaller" ng-change="time_check()" ng-model="timepicker.from.date" data-date-format="mm/dd/yyyy" bs-datepicker>
|
||||
<input type="text" class="input-mini" ng-change="time_check()" data-show-meridian="false" data-show-seconds="true" ng-model="timepicker.from.time" bs-timepicker>
|
||||
</form>
|
||||
</div>
|
||||
- <div class="span1" style="margin-left:10px">
|
||||
+ <div class="timepicker-block" style="margin-left:10px">
|
||||
<form class="nomargin">
|
||||
<label><small><br></small></label>
|
||||
<button class="btn" ng-click="time_apply()" ><i class="icon-ok"></i></button>
|
||||
@@ -38,7 +43,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div ng-switch-when="relative">
|
||||
- <div class="span11">
|
||||
+ <div class="timepicker-block">
|
||||
<form class="nomargin input-append">
|
||||
<label><small>The last</small></label>
|
||||
<button class="btn btn" ng-repeat='timespan in panel.time_options' ng-class="{'btn-success': (panel.timespan == timespan)}" ng-click="set_timespan(timespan)">{{timespan}}</button>
|
||||
@@ -56,18 +61,18 @@
|
||||
</div>
|
||||
<div class="row-fluid nomargin">
|
||||
<div class="span12 small" ng-show="filterSrv.idsByType('time').length > 0">
|
||||
- <a ng-click="set_mode('relative')" ng-class="{'strong': (panel.mode == 'relative')}">Relative</a> |
|
||||
- <a ng-click="set_mode('absolute')" ng-class="{'strong': (panel.mode == 'absolute')}">Absolute</a> |
|
||||
- <a ng-click="set_mode('since')" ng-class="{'strong': (panel.mode == 'since')}">Since</a>
|
||||
- <span ng-hide="panel.mode == 'absolute' || panel.mode == 'none'"> |
|
||||
- <input type="checkbox" ng-model="panel.refresh.enable" ng-change='refresh();'> Auto-refresh
|
||||
+ <a class="link" ng-click="set_mode('relative')" ng-class="{'strong': (panel.mode == 'relative')}">Relative</a> |
|
||||
+ <a class="link" ng-click="set_mode('absolute')" ng-class="{'strong': (panel.mode == 'absolute')}">Absolute</a> |
|
||||
+ <a class="link" ng-click="set_mode('since')" ng-class="{'strong': (panel.mode == 'since')}">Since</a>
|
||||
+ <span ng-hide="panel.mode == 'absolute' || panel.mode == 'none'"> |
|
||||
+ <input type="checkbox" ng-model="panel.refresh.enable" ng-change='refresh();'> Auto-refresh
|
||||
<span ng-class="{'ng-cloak': !panel.refresh.enable}">
|
||||
every <a data-title="<small>Auto-refresh Settings</small>" data-placement="bottom" bs-popover="'panels/timepicker/refreshctrl.html'">{{panel.refresh.interval}}s</a>.
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="span12 small" ng-show="filterSrv.idsByType('time').length < 1">
|
||||
- <a class='btn btn-small' ng-click="time_apply()">Create a time filter</a>
|
||||
+ <a class='btn btn-small' ng-click="time_apply()">Create a time filter</a>
|
||||
</div>
|
||||
</div>
|
||||
</kibana-panel>
|
||||
\ No newline at end of file
|
||||
--
|
||||
1.8.4
|
||||
|
||||
|
||||
From 14d525da34e80ed9523fdca87fa12bc63b98733b Mon Sep 17 00:00:00 2001
|
||||
From: Rashid Khan <rashidkpc@gmail.com>
|
||||
Date: Wed, 11 Sep 2013 16:39:17 -0700
|
||||
Subject: [PATCH 3/5] added JSONifying of objects
|
||||
|
||||
---
|
||||
js/filters.js | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/filters.js b/js/filters.js
|
||||
index 7f25a12..c21fa0b 100644
|
||||
--- a/js/filters.js
|
||||
+++ b/js/filters.js
|
||||
@@ -29,7 +29,11 @@ angular.module('kibana.filters', [])
|
||||
}).filter('stringify', function() {
|
||||
return function(arr, start, end) {
|
||||
if(!_.isUndefined(arr)) {
|
||||
- return arr.toString();
|
||||
+ if(_.isObject(arr) && !_.isArray(arr)) {
|
||||
+ return angular.toJson(arr);
|
||||
+ } else {
|
||||
+ return arr.toString();
|
||||
+ }
|
||||
}
|
||||
};
|
||||
}).filter('noXml', function() {
|
||||
--
|
||||
1.8.4
|
||||
|
||||
|
||||
From 8b5ac5e56eaf23111116fb4544bf4ad8a679cfdc Mon Sep 17 00:00:00 2001
|
||||
From: Rashid Khan <rashidkpc@gmail.com>
|
||||
Date: Wed, 11 Sep 2013 16:41:53 -0700
|
||||
Subject: [PATCH 4/5] Show _source by default, sort by _score by default
|
||||
|
||||
---
|
||||
panels/table/module.html | 14 +++++++++-----
|
||||
panels/table/module.js | 4 ++--
|
||||
2 files changed, 11 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/panels/table/module.html b/panels/table/module.html
|
||||
index 92f3bdc..b59af11 100644
|
||||
--- a/panels/table/module.html
|
||||
+++ b/panels/table/module.html
|
||||
@@ -39,10 +39,12 @@
|
||||
<i ng-click="panel.offset = (panel.offset + panel.size)" ng-show="data.length > panel.offset+panel.size" class='icon-arrow-right pointer'></i>
|
||||
</div>
|
||||
</div>
|
||||
- <div class="small" ng-show="panel.fields.length == 0"><center>No columns configured. You may want to select some from the list on the left.</center></div>
|
||||
+
|
||||
<table class="table-hover table table-condensed" ng-style="panel.style">
|
||||
<thead ng-show="panel.header">
|
||||
|
||||
+ <th ng-show="panel.fields.length<1">_source (select columns from the list to the left)</th>
|
||||
+
|
||||
<th style="white-space:nowrap" ng-repeat="field in panel.fields">
|
||||
<i ng-show="!$first" class="pointer link icon-caret-left" ng-click="_.move(panel.fields,$index,$index-1)"></i>
|
||||
|
||||
@@ -58,7 +60,8 @@
|
||||
<tbody ng-repeat="event in data | slice:panel.offset:panel.offset+panel.size" ng-class-odd="'odd'">
|
||||
<tr ng-click="toggle_details(event)" class="pointer">
|
||||
<!--<td ng-repeat="field in panel.fields" ng-bind-html-unsafe="(event.highlight[field]||event._source[field]) | tableFieldFormat:field:event:this |tableHighlight | tableTruncate:panel.trimFactor:panel.fields.length"></td>-->
|
||||
- <td ng-repeat="field in panel.fields" ng-bind-html-unsafe="(event.highlight[field]||event._source[field]) |tableHighlight | tableTruncate:panel.trimFactor:panel.fields.length"></td>
|
||||
+ <td ng-show="panel.fields.length<1">{{event._source|stringify|tableTruncate:panel.trimFactor:1}}</td>
|
||||
+ <td ng-show="panel.fields.length>0" ng-repeat="field in panel.fields" ng-bind-html-unsafe="(event.highlight[field]||event._source[field]) |tableHighlight | tableTruncate:panel.trimFactor:panel.fields.length"></td>
|
||||
</tr>
|
||||
<tr ng-show="event.kibana.details">
|
||||
<td colspan=1000>
|
||||
@@ -70,9 +73,10 @@
|
||||
</thead>
|
||||
<tr ng-repeat="(key,value) in event.kibana.details._source" ng-class-odd="'odd'">
|
||||
<td>{{key}}</td>
|
||||
- <td>
|
||||
- <i class='icon-search pointer' ng-click="build_search(key,value)"></i>
|
||||
- <i class='icon-ban-circle pointer' ng-click="build_search(key,value,true)"></i>
|
||||
+ <td style="white-space:nowrap">
|
||||
+ <i class='icon-search pointer' ng-click="build_search(key,value)" bs-tooltip="'Add filter to match this value'"></i>
|
||||
+ <i class='icon-ban-circle pointer' ng-click="build_search(key,value,true)" bs-tooltip="'Add filter to NOT match this value'"></i>
|
||||
+ <i class="pointer icon-th" ng-click="toggle_field(key)" bs-tooltip="'Toggle table column'"></i>
|
||||
</td>
|
||||
<!-- At some point we need to create a more efficient way of applying the filter pipeline -->
|
||||
<td style="white-space:pre-wrap" ng-bind-html-unsafe="value|noXml|urlLink|stringify"></td>
|
||||
diff --git a/panels/table/module.js b/panels/table/module.js
|
||||
index 0b2f62b..bfac1a3 100644
|
||||
--- a/panels/table/module.js
|
||||
+++ b/panels/table/module.js
|
||||
@@ -45,10 +45,10 @@ angular.module('kibana.table', [])
|
||||
size : 100, // Per page
|
||||
pages : 5, // Pages available
|
||||
offset : 0,
|
||||
- sort : ['@timestamp','desc'],
|
||||
+ sort : ['_score','desc'],
|
||||
group : "default",
|
||||
style : {'font-size': '9pt'},
|
||||
- overflow: 'height',
|
||||
+ overflow: 'min-height',
|
||||
fields : [],
|
||||
highlight : [],
|
||||
sortable: true,
|
||||
--
|
||||
1.8.4
|
||||
|
||||
|
||||
From 4b0678542c9d9bb8ebeed4e92bbe85d30f9e1d6a Mon Sep 17 00:00:00 2001
|
||||
From: Rashid Khan <rashidkpc@gmail.com>
|
||||
Date: Wed, 11 Sep 2013 16:46:15 -0700
|
||||
Subject: [PATCH 5/5] Removed default @message from logstash dashboards
|
||||
|
||||
---
|
||||
dashboards/logstash.js | 2 +-
|
||||
dashboards/logstash.json | 2 --
|
||||
2 files changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dashboards/logstash.js b/dashboards/logstash.js
|
||||
index e67a080..16f6280 100644
|
||||
--- a/dashboards/logstash.js
|
||||
+++ b/dashboards/logstash.js
|
||||
@@ -160,7 +160,7 @@ dashboard.rows[3].panels = [
|
||||
dashboard.rows[4].panels = [
|
||||
{
|
||||
type: 'table',
|
||||
- fields: !_.isUndefined(ARGS.fields) ? ARGS.fields.split(',') : ['@timestamp','@message'],
|
||||
+ fields: !_.isUndefined(ARGS.fields) ? ARGS.fields.split(',') : [],
|
||||
sort: !_.isUndefined(ARGS.sort) ? ARGS.sort.split(',') : [ARGS.timefield||'@timestamp','desc'],
|
||||
overflow: 'expand'
|
||||
}
|
||||
diff --git a/dashboards/logstash.json b/dashboards/logstash.json
|
||||
index 4631e91..fcad036 100644
|
||||
--- a/dashboards/logstash.json
|
||||
+++ b/dashboards/logstash.json
|
||||
@@ -191,8 +191,6 @@
|
||||
},
|
||||
"overflow": "min-height",
|
||||
"fields": [
|
||||
- "@timestamp",
|
||||
- "@message"
|
||||
],
|
||||
"highlight": [],
|
||||
"sortable": true,
|
||||
--
|
||||
1.8.4
|
||||
Regular → Executable
Regular → Executable
+189
-16
@@ -1,12 +1,12 @@
|
||||
/* jshint node:true */
|
||||
'use strict';
|
||||
|
||||
module.exports = function (grunt) {
|
||||
|
||||
var post = ['src/client.js','src/post.js'];
|
||||
|
||||
// Project configuration.
|
||||
grunt.initConfig({
|
||||
var config = {
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
srcDir: 'src',
|
||||
destDir: 'dist',
|
||||
tempDir: 'tmp',
|
||||
meta: {
|
||||
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
|
||||
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
|
||||
@@ -14,33 +14,206 @@ module.exports = function (grunt) {
|
||||
' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
|
||||
' Licensed <%= pkg.license %> */\n\n'
|
||||
},
|
||||
clean: {
|
||||
on_start: ['<%= destDir %>', '<%= tempDir %>'],
|
||||
after_require: ['<%= tempDir %>'],
|
||||
},
|
||||
copy: {
|
||||
everthing_left_in_src: {
|
||||
cwd: '<%= srcDir %>',
|
||||
expand: true,
|
||||
src: [
|
||||
'**/*.js',
|
||||
'**/*.json',
|
||||
'font/**/*',
|
||||
'img/**/*',
|
||||
'panels/bettermap/leaflet/*.png'
|
||||
],
|
||||
dest: '<%= tempDir %>'
|
||||
}//,
|
||||
// dist_to_temp: {
|
||||
// cwd: '<%= destDir %>',
|
||||
// expand: true,
|
||||
// src: '**/*',
|
||||
// dest: '<%= tempDir %>'
|
||||
// }
|
||||
},
|
||||
jshint: {
|
||||
files: ['Gruntfile.js', 'js/*.js', 'panels/*/*.js', 'dashboards/*.js' ],
|
||||
// just lint the source dir
|
||||
source: {
|
||||
files: {
|
||||
src: ['Gruntfile.js', '<%= srcDir %>/app/**/*.js']
|
||||
}
|
||||
},
|
||||
options: {
|
||||
jshintrc: '.jshintrc'
|
||||
}
|
||||
},
|
||||
less: {
|
||||
production: {
|
||||
options: {
|
||||
paths: ["vendor/bootstrap/less"],
|
||||
yuicompress:true
|
||||
dist:{
|
||||
options:{
|
||||
compress: true
|
||||
},
|
||||
files: {
|
||||
"common/css/bootstrap.dark.min.css": "vendor/bootstrap/less/bootstrap.dark.less",
|
||||
"common/css/bootstrap.light.min.css": "vendor/bootstrap/less/bootstrap.light.less"
|
||||
expand: true,
|
||||
cwd:'<%= srcDir %>/vendor/bootstrap/less/',
|
||||
src: ['bootstrap.dark.less', 'bootstrap.light.less'],
|
||||
dest: '<%= tempDir %>/css/',
|
||||
}
|
||||
},
|
||||
cssmin: {
|
||||
dist: {
|
||||
expand: true,
|
||||
cwd: '<%= srcDir %>',
|
||||
src: [
|
||||
'**/*.css'
|
||||
],
|
||||
dest: '<%= tempDir %>'
|
||||
}
|
||||
},
|
||||
htmlmin:{
|
||||
dist: {
|
||||
options:{
|
||||
removeComments: true,
|
||||
collapseWhitespace: true
|
||||
},
|
||||
expand: true,
|
||||
cwd: '<%= srcDir %>',
|
||||
src: [
|
||||
'index.html',
|
||||
'app/panels/**/*.html',
|
||||
'app/partials/**/*.html'
|
||||
],
|
||||
dest: '<%= tempDir %>'
|
||||
}
|
||||
},
|
||||
ngmin: {
|
||||
scripts: {
|
||||
expand:true,
|
||||
cwd:'<%= tempDir %>',
|
||||
src: [
|
||||
'app/controllers/**/*.js',
|
||||
'app/directives/**/*.js',
|
||||
'app/services/**/*.js',
|
||||
'app/filters/**/*.js',
|
||||
'app/panels/**/*.js',
|
||||
'app/app.js',
|
||||
'vendor/angular/**/*.js',
|
||||
'vendor/elasticjs/elastic-angular-client.js'
|
||||
],
|
||||
dest: '<%= tempDir %>'
|
||||
}
|
||||
},
|
||||
requirejs: {
|
||||
compile_temp: {
|
||||
options: {
|
||||
appDir: '<%= tempDir %>',
|
||||
dir: '<%= destDir %>',
|
||||
modules: [], // populated below
|
||||
mainConfigFile: '<%= tempDir %>/app/components/require.config.js',
|
||||
keepBuildDir: true,
|
||||
optimize: 'uglify',
|
||||
optimizeCss: 'none',
|
||||
uglify: {
|
||||
max_line_length: 1000,
|
||||
// beautify: true, // uncomment for easier debugging
|
||||
indent_level: 2,
|
||||
},
|
||||
preserveLicenseComments: false,
|
||||
findNestedDependencies: true,
|
||||
normalizeDirDefines: "none",
|
||||
inlineText: true,
|
||||
skipPragmas: true,
|
||||
// stubModules: ["text"],
|
||||
optimizeAllPluginResources: false,
|
||||
removeCombined: true,
|
||||
fileExclusionRegExp: /^\./,
|
||||
logLevel: 0,
|
||||
skipSemiColonInsertion: true,
|
||||
done: function (done, output) {
|
||||
var duplicates = require('rjs-build-analysis').duplicates(output);
|
||||
|
||||
if (duplicates.length > 0) {
|
||||
grunt.log.subhead('Duplicates found in requirejs build:');
|
||||
grunt.log.warn(duplicates);
|
||||
done(new Error('r.js built duplicate modules, please check the excludes option.'));
|
||||
}
|
||||
|
||||
done();
|
||||
},
|
||||
config: {
|
||||
'tmpl': {
|
||||
registerTemplate: function () {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var fs = require('fs');
|
||||
var requireModules = [
|
||||
{
|
||||
// main/common module
|
||||
name: 'app',
|
||||
include: [
|
||||
'kbn',
|
||||
'jquery',
|
||||
'underscore',
|
||||
'angular',
|
||||
'bootstrap',
|
||||
'modernizr',
|
||||
'jquery',
|
||||
'angular-sanitize',
|
||||
'timepicker',
|
||||
'datepicker',
|
||||
'elasticjs',
|
||||
'angular-strap',
|
||||
'directives/all',
|
||||
'filters/all',
|
||||
'services/all',
|
||||
'jquery.flot',
|
||||
'jquery.flot.pie',
|
||||
'text'
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
// create a module for each directory in src/app/panels/
|
||||
fs.readdirSync(config.srcDir+'/app/panels').forEach(function (panelName) {
|
||||
requireModules.push({
|
||||
name: 'panels/'+panelName+'/module',
|
||||
exclude: ['app']
|
||||
});
|
||||
});
|
||||
|
||||
config.requirejs.compile_temp.options.modules = requireModules;
|
||||
|
||||
// load plugins
|
||||
grunt.loadNpmTasks('grunt-ngmin');
|
||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||
grunt.loadNpmTasks('grunt-contrib-less');
|
||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('assemble-less');
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-cssmin');
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-contrib-htmlmin');
|
||||
grunt.loadNpmTasks('grunt-contrib-requirejs');
|
||||
|
||||
// Project configuration.
|
||||
grunt.initConfig(config);
|
||||
|
||||
// Default task.
|
||||
grunt.registerTask('default', ['jshint','less']);
|
||||
grunt.registerTask('default', ['jshint:source','less']);
|
||||
grunt.registerTask('build', [
|
||||
'jshint:source',
|
||||
'clean:on_start',
|
||||
'htmlmin',
|
||||
'less',
|
||||
'cssmin',
|
||||
'copy:everthing_left_in_src',
|
||||
'ngmin',
|
||||
'requirejs:compile_temp',
|
||||
'clean:after_require'
|
||||
]);
|
||||
|
||||
};
|
||||
Regular → Executable
Vendored
-5
File diff suppressed because one or more lines are too long
Vendored
-13
@@ -1,13 +0,0 @@
|
||||
/*
|
||||
AngularJS v1.1.3
|
||||
(c) 2010-2012 Google, Inc. http://angularjs.org
|
||||
License: MIT
|
||||
*/
|
||||
(function(I,h){'use strict';function i(a){var d={},a=a.split(","),c;for(c=0;c<a.length;c++)d[a[c]]=!0;return d}function z(a,d){function c(a,b,c,f){b=h.lowercase(b);if(m[b])for(;e.last()&&n[e.last()];)g("",e.last());o[b]&&e.last()==b&&g("",b);(f=p[b]||!!f)||e.push(b);var j={};c.replace(A,function(a,b,d,c,g){j[b]=k(d||c||g||"")});d.start&&d.start(b,j,f)}function g(a,b){var c=0,g;if(b=h.lowercase(b))for(c=e.length-1;c>=0;c--)if(e[c]==b)break;if(c>=0){for(g=e.length-1;g>=c;g--)d.end&&d.end(e[g]);e.length=
|
||||
c}}var b,f,e=[],j=a;for(e.last=function(){return e[e.length-1]};a;){f=!0;if(!e.last()||!q[e.last()]){if(a.indexOf("<\!--")===0)b=a.indexOf("--\>"),b>=0&&(d.comment&&d.comment(a.substring(4,b)),a=a.substring(b+3),f=!1);else if(B.test(a)){if(b=a.match(r))a=a.substring(b[0].length),b[0].replace(r,g),f=!1}else if(C.test(a)&&(b=a.match(s)))a=a.substring(b[0].length),b[0].replace(s,c),f=!1;f&&(b=a.indexOf("<"),f=b<0?a:a.substring(0,b),a=b<0?"":a.substring(b),d.chars&&d.chars(k(f)))}else a=a.replace(RegExp("(.*)<\\s*\\/\\s*"+
|
||||
e.last()+"[^>]*>","i"),function(a,b){b=b.replace(D,"$1").replace(E,"$1");d.chars&&d.chars(k(b));return""}),g("",e.last());if(a==j)throw"Parse Error: "+a;j=a}g()}function k(a){l.innerHTML=a.replace(/</g,"<");return l.innerText||l.textContent||""}function t(a){return a.replace(/&/g,"&").replace(F,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}function u(a){var d=!1,c=h.bind(a,a.push);return{start:function(a,b,f){a=h.lowercase(a);!d&&q[a]&&(d=a);!d&&v[a]==
|
||||
!0&&(c("<"),c(a),h.forEach(b,function(a,b){var d=h.lowercase(b);if(G[d]==!0&&(w[d]!==!0||a.match(H)))c(" "),c(b),c('="'),c(t(a)),c('"')}),c(f?"/>":">"))},end:function(a){a=h.lowercase(a);!d&&v[a]==!0&&(c("</"),c(a),c(">"));a==d&&(d=!1)},chars:function(a){d||c(t(a))}}}var s=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,r=/^<\s*\/\s*([\w:-]+)[^>]*>/,A=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,C=/^</,B=/^<\s*\//,D=/<\!--(.*?)--\>/g,
|
||||
E=/<!\[CDATA\[(.*?)]]\>/g,H=/^((ftp|https?):\/\/|mailto:|tel:|#)/,F=/([^\#-~| |!])/g,p=i("area,br,col,hr,img,wbr"),x=i("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),y=i("rp,rt"),o=h.extend({},y,x),m=h.extend({},x,i("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),n=h.extend({},y,i("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),
|
||||
q=i("script,style"),v=h.extend({},p,m,n,o),w=i("background,cite,href,longdesc,src,usemap"),G=h.extend({},w,i("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,span,start,summary,target,title,type,valign,value,vspace,width")),l=document.createElement("pre");h.module("ngSanitize",[]).value("$sanitize",function(a){var d=[];
|
||||
z(a,u(d));return d.join("")});h.module("ngSanitize").directive("ngBindHtml",["$sanitize",function(a){return function(d,c,g){c.addClass("ng-binding").data("$binding",g.ngBindHtml);d.$watch(g.ngBindHtml,function(b){b=a(b);c.html(b||"")})}}]);h.module("ngSanitize").filter("linky",function(){var a=/((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s\.\;\,\(\)\{\}\<\>]/,d=/^mailto:/;return function(c,g){if(!c)return c;var b,f=c,e=[],j=u(e),i,k,l={};if(h.isDefined(g))l.target=g;for(;b=f.match(a);)i=
|
||||
b[0],b[2]==b[3]&&(i="mailto:"+i),k=b.index,j.chars(f.substr(0,k)),l.href=i,j.start("a",l),j.chars(b[0].replace(d,"")),j.end("a"),f=f.substring(k+b[0].length);j.chars(f);return e.join("")}})})(window,window.angular);
|
||||
Vendored
-8
File diff suppressed because one or more lines are too long
Vendored
-163
@@ -1,163 +0,0 @@
|
||||
/*
|
||||
AngularJS v1.0.7
|
||||
(c) 2010-2012 Google, Inc. http://angularjs.org
|
||||
License: MIT
|
||||
*/
|
||||
(function(P,T,q){'use strict';function m(b,a,c){var d;if(b)if(H(b))for(d in b)d!="prototype"&&d!="length"&&d!="name"&&b.hasOwnProperty(d)&&a.call(c,b[d],d);else if(b.forEach&&b.forEach!==m)b.forEach(a,c);else if(!b||typeof b.length!=="number"?0:typeof b.hasOwnProperty!="function"&&typeof b.constructor!="function"||b instanceof K||ca&&b instanceof ca||wa.call(b)!=="[object Object]"||typeof b.callee==="function")for(d=0;d<b.length;d++)a.call(c,b[d],d);else for(d in b)b.hasOwnProperty(d)&&a.call(c,b[d],
|
||||
d);return b}function mb(b){var a=[],c;for(c in b)b.hasOwnProperty(c)&&a.push(c);return a.sort()}function fc(b,a,c){for(var d=mb(b),e=0;e<d.length;e++)a.call(c,b[d[e]],d[e]);return d}function nb(b){return function(a,c){b(c,a)}}function xa(){for(var b=aa.length,a;b;){b--;a=aa[b].charCodeAt(0);if(a==57)return aa[b]="A",aa.join("");if(a==90)aa[b]="0";else return aa[b]=String.fromCharCode(a+1),aa.join("")}aa.unshift("0");return aa.join("")}function ob(b,a){a?b.$$hashKey=a:delete b.$$hashKey}function v(b){var a=
|
||||
b.$$hashKey;m(arguments,function(a){a!==b&&m(a,function(a,c){b[c]=a})});ob(b,a);return b}function G(b){return parseInt(b,10)}function ya(b,a){return v(new (v(function(){},{prototype:b})),a)}function C(){}function ma(b){return b}function I(b){return function(){return b}}function w(b){return typeof b=="undefined"}function y(b){return typeof b!="undefined"}function L(b){return b!=null&&typeof b=="object"}function B(b){return typeof b=="string"}function Qa(b){return typeof b=="number"}function na(b){return wa.apply(b)==
|
||||
"[object Date]"}function E(b){return wa.apply(b)=="[object Array]"}function H(b){return typeof b=="function"}function oa(b){return b&&b.document&&b.location&&b.alert&&b.setInterval}function Q(b){return B(b)?b.replace(/^\s*/,"").replace(/\s*$/,""):b}function gc(b){return b&&(b.nodeName||b.bind&&b.find)}function Ra(b,a,c){var d=[];m(b,function(b,g,h){d.push(a.call(c,b,g,h))});return d}function za(b,a){if(b.indexOf)return b.indexOf(a);for(var c=0;c<b.length;c++)if(a===b[c])return c;return-1}function Sa(b,
|
||||
a){var c=za(b,a);c>=0&&b.splice(c,1);return a}function U(b,a){if(oa(b)||b&&b.$evalAsync&&b.$watch)throw Error("Can't copy Window or Scope");if(a){if(b===a)throw Error("Can't copy equivalent objects or arrays");if(E(b))for(var c=a.length=0;c<b.length;c++)a.push(U(b[c]));else{c=a.$$hashKey;m(a,function(b,c){delete a[c]});for(var d in b)a[d]=U(b[d]);ob(a,c)}}else(a=b)&&(E(b)?a=U(b,[]):na(b)?a=new Date(b.getTime()):L(b)&&(a=U(b,{})));return a}function hc(b,a){var a=a||{},c;for(c in b)b.hasOwnProperty(c)&&
|
||||
c.substr(0,2)!=="$$"&&(a[c]=b[c]);return a}function fa(b,a){if(b===a)return!0;if(b===null||a===null)return!1;if(b!==b&&a!==a)return!0;var c=typeof b,d;if(c==typeof a&&c=="object")if(E(b)){if((c=b.length)==a.length){for(d=0;d<c;d++)if(!fa(b[d],a[d]))return!1;return!0}}else if(na(b))return na(a)&&b.getTime()==a.getTime();else{if(b&&b.$evalAsync&&b.$watch||a&&a.$evalAsync&&a.$watch||oa(b)||oa(a))return!1;c={};for(d in b)if(!(d.charAt(0)==="$"||H(b[d]))){if(!fa(b[d],a[d]))return!1;c[d]=!0}for(d in a)if(!c[d]&&
|
||||
d.charAt(0)!=="$"&&a[d]!==q&&!H(a[d]))return!1;return!0}return!1}function Ta(b,a){var c=arguments.length>2?ha.call(arguments,2):[];return H(a)&&!(a instanceof RegExp)?c.length?function(){return arguments.length?a.apply(b,c.concat(ha.call(arguments,0))):a.apply(b,c)}:function(){return arguments.length?a.apply(b,arguments):a.call(b)}:a}function ic(b,a){var c=a;/^\$+/.test(b)?c=q:oa(a)?c="$WINDOW":a&&T===a?c="$DOCUMENT":a&&a.$evalAsync&&a.$watch&&(c="$SCOPE");return c}function da(b,a){return JSON.stringify(b,
|
||||
ic,a?" ":null)}function pb(b){return B(b)?JSON.parse(b):b}function Ua(b){b&&b.length!==0?(b=z(""+b),b=!(b=="f"||b=="0"||b=="false"||b=="no"||b=="n"||b=="[]")):b=!1;return b}function pa(b){b=u(b).clone();try{b.html("")}catch(a){}var c=u("<div>").append(b).html();try{return b[0].nodeType===3?z(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+z(b)})}catch(d){return z(c)}}function Va(b){var a={},c,d;m((b||"").split("&"),function(b){b&&(c=b.split("="),d=decodeURIComponent(c[0]),
|
||||
a[d]=y(c[1])?decodeURIComponent(c[1]):!0)});return a}function qb(b){var a=[];m(b,function(b,d){a.push(Wa(d,!0)+(b===!0?"":"="+Wa(b,!0)))});return a.length?a.join("&"):""}function Xa(b){return Wa(b,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Wa(b,a){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,a?"%20":"+")}function jc(b,a){function c(a){a&&d.push(a)}var d=[b],e,g,h=["ng:app","ng-app","x-ng-app",
|
||||
"data-ng-app"],f=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;m(h,function(a){h[a]=!0;c(T.getElementById(a));a=a.replace(":","\\:");b.querySelectorAll&&(m(b.querySelectorAll("."+a),c),m(b.querySelectorAll("."+a+"\\:"),c),m(b.querySelectorAll("["+a+"]"),c))});m(d,function(a){if(!e){var b=f.exec(" "+a.className+" ");b?(e=a,g=(b[2]||"").replace(/\s+/g,",")):m(a.attributes,function(b){if(!e&&h[b.name])e=a,g=b.value})}});e&&a(e,g?[g]:[])}function rb(b,a){var c=function(){b=u(b);a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",
|
||||
b)}]);a.unshift("ng");var c=sb(a);c.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},d=/^NG_DEFER_BOOTSTRAP!/;if(P&&!d.test(P.name))return c();P.name=P.name.replace(d,"");Ya.resumeBootstrap=function(b){m(b,function(b){a.push(b)});c()}}function Za(b,a){a=a||"_";return b.replace(kc,function(b,d){return(d?a:"")+b.toLowerCase()})}function $a(b,a,c){if(!b)throw Error("Argument '"+(a||"?")+"' is "+(c||"required"));
|
||||
return b}function qa(b,a,c){c&&E(b)&&(b=b[b.length-1]);$a(H(b),a,"not a function, got "+(b&&typeof b=="object"?b.constructor.name||"Object":typeof b));return b}function lc(b){function a(a,b,e){return a[b]||(a[b]=e())}return a(a(b,"angular",Object),"module",function(){var b={};return function(d,e,g){e&&b.hasOwnProperty(d)&&(b[d]=null);return a(b,d,function(){function a(c,d,e){return function(){b[e||"push"]([c,d,arguments]);return k}}if(!e)throw Error("No module: "+d);var b=[],c=[],j=a("$injector",
|
||||
"invoke"),k={_invokeQueue:b,_runBlocks:c,requires:e,name:d,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),filter:a("$filterProvider","register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:j,run:function(a){c.push(a);return this}};g&&j(g);return k})}})}function tb(b){return b.replace(mc,function(a,b,d,e){return e?d.toUpperCase():
|
||||
d}).replace(nc,"Moz$1")}function ab(b,a){function c(){var e;for(var b=[this],c=a,h,f,i,j,k,l;b.length;){h=b.shift();f=0;for(i=h.length;f<i;f++){j=u(h[f]);c?j.triggerHandler("$destroy"):c=!c;k=0;for(e=(l=j.children()).length,j=e;k<j;k++)b.push(ca(l[k]))}}return d.apply(this,arguments)}var d=ca.fn[b],d=d.$original||d;c.$original=d;ca.fn[b]=c}function K(b){if(b instanceof K)return b;if(!(this instanceof K)){if(B(b)&&b.charAt(0)!="<")throw Error("selectors not implemented");return new K(b)}if(B(b)){var a=
|
||||
T.createElement("div");a.innerHTML="<div> </div>"+b;a.removeChild(a.firstChild);bb(this,a.childNodes);this.remove()}else bb(this,b)}function cb(b){return b.cloneNode(!0)}function ra(b){ub(b);for(var a=0,b=b.childNodes||[];a<b.length;a++)ra(b[a])}function vb(b,a,c){var d=ba(b,"events");ba(b,"handle")&&(w(a)?m(d,function(a,c){db(b,c,a);delete d[c]}):w(c)?(db(b,a,d[a]),delete d[a]):Sa(d[a],c))}function ub(b){var a=b[Aa],c=Ba[a];c&&(c.handle&&(c.events.$destroy&&c.handle({},"$destroy"),vb(b)),delete Ba[a],
|
||||
b[Aa]=q)}function ba(b,a,c){var d=b[Aa],d=Ba[d||-1];if(y(c))d||(b[Aa]=d=++oc,d=Ba[d]={}),d[a]=c;else return d&&d[a]}function wb(b,a,c){var d=ba(b,"data"),e=y(c),g=!e&&y(a),h=g&&!L(a);!d&&!h&&ba(b,"data",d={});if(e)d[a]=c;else if(g)if(h)return d&&d[a];else v(d,a);else return d}function Ca(b,a){return(" "+b.className+" ").replace(/[\n\t]/g," ").indexOf(" "+a+" ")>-1}function xb(b,a){a&&m(a.split(" "),function(a){b.className=Q((" "+b.className+" ").replace(/[\n\t]/g," ").replace(" "+Q(a)+" "," "))})}
|
||||
function yb(b,a){a&&m(a.split(" "),function(a){if(!Ca(b,a))b.className=Q(b.className+" "+Q(a))})}function bb(b,a){if(a)for(var a=!a.nodeName&&y(a.length)&&!oa(a)?a:[a],c=0;c<a.length;c++)b.push(a[c])}function zb(b,a){return Da(b,"$"+(a||"ngController")+"Controller")}function Da(b,a,c){b=u(b);for(b[0].nodeType==9&&(b=b.find("html"));b.length;){if(c=b.data(a))return c;b=b.parent()}}function Ab(b,a){var c=Ea[a.toLowerCase()];return c&&Bb[b.nodeName]&&c}function pc(b,a){var c=function(c,e){if(!c.preventDefault)c.preventDefault=
|
||||
function(){c.returnValue=!1};if(!c.stopPropagation)c.stopPropagation=function(){c.cancelBubble=!0};if(!c.target)c.target=c.srcElement||T;if(w(c.defaultPrevented)){var g=c.preventDefault;c.preventDefault=function(){c.defaultPrevented=!0;g.call(c)};c.defaultPrevented=!1}c.isDefaultPrevented=function(){return c.defaultPrevented};m(a[e||c.type],function(a){a.call(b,c)});Z<=8?(c.preventDefault=null,c.stopPropagation=null,c.isDefaultPrevented=null):(delete c.preventDefault,delete c.stopPropagation,delete c.isDefaultPrevented)};
|
||||
c.elem=b;return c}function ga(b){var a=typeof b,c;if(a=="object"&&b!==null)if(typeof(c=b.$$hashKey)=="function")c=b.$$hashKey();else{if(c===q)c=b.$$hashKey=xa()}else c=b;return a+":"+c}function Fa(b){m(b,this.put,this)}function eb(){}function Cb(b){var a,c;if(typeof b=="function"){if(!(a=b.$inject))a=[],c=b.toString().replace(qc,""),c=c.match(rc),m(c[1].split(sc),function(b){b.replace(tc,function(b,c,d){a.push(d)})}),b.$inject=a}else E(b)?(c=b.length-1,qa(b[c],"fn"),a=b.slice(0,c)):qa(b,"fn",!0);
|
||||
return a}function sb(b){function a(a){return function(b,c){if(L(b))m(b,nb(a));else return a(b,c)}}function c(a,b){if(H(b)||E(b))b=l.instantiate(b);if(!b.$get)throw Error("Provider "+a+" must define $get factory method.");return k[a+f]=b}function d(a,b){return c(a,{$get:b})}function e(a){var b=[];m(a,function(a){if(!j.get(a))if(j.put(a,!0),B(a)){var c=sa(a);b=b.concat(e(c.requires)).concat(c._runBlocks);try{for(var d=c._invokeQueue,c=0,f=d.length;c<f;c++){var g=d[c],h=g[0]=="$injector"?l:l.get(g[0]);
|
||||
h[g[1]].apply(h,g[2])}}catch(p){throw p.message&&(p.message+=" from "+a),p;}}else if(H(a))try{b.push(l.invoke(a))}catch(i){throw i.message&&(i.message+=" from "+a),i;}else if(E(a))try{b.push(l.invoke(a))}catch(o){throw o.message&&(o.message+=" from "+String(a[a.length-1])),o;}else qa(a,"module")});return b}function g(a,b){function c(d){if(typeof d!=="string")throw Error("Service name expected");if(a.hasOwnProperty(d)){if(a[d]===h)throw Error("Circular dependency: "+i.join(" <- "));return a[d]}else try{return i.unshift(d),
|
||||
a[d]=h,a[d]=b(d)}finally{i.shift()}}function d(a,b,e){var f=[],j=Cb(a),g,h,i;h=0;for(g=j.length;h<g;h++)i=j[h],f.push(e&&e.hasOwnProperty(i)?e[i]:c(i));a.$inject||(a=a[g]);switch(b?-1:f.length){case 0:return a();case 1:return a(f[0]);case 2:return a(f[0],f[1]);case 3:return a(f[0],f[1],f[2]);case 4:return a(f[0],f[1],f[2],f[3]);case 5:return a(f[0],f[1],f[2],f[3],f[4]);case 6:return a(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6]);case 8:return a(f[0],f[1],f[2],
|
||||
f[3],f[4],f[5],f[6],f[7]);case 9:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8]);case 10:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9]);default:return a.apply(b,f)}}return{invoke:d,instantiate:function(a,b){var c=function(){},e;c.prototype=(E(a)?a[a.length-1]:a).prototype;c=new c;e=d(a,c,b);return L(e)?e:c},get:c,annotate:Cb}}var h={},f="Provider",i=[],j=new Fa,k={$provide:{provider:a(c),factory:a(d),service:a(function(a,b){return d(a,["$injector",function(a){return a.instantiate(b)}])}),
|
||||
value:a(function(a,b){return d(a,I(b))}),constant:a(function(a,b){k[a]=b;n[a]=b}),decorator:function(a,b){var c=l.get(a+f),d=c.$get;c.$get=function(){var a=o.invoke(d,c);return o.invoke(b,null,{$delegate:a})}}}},l=g(k,function(){throw Error("Unknown provider: "+i.join(" <- "));}),n={},o=n.$injector=g(n,function(a){a=l.get(a+f);return o.invoke(a.$get,a)});m(e(b),function(a){o.invoke(a||C)});return o}function uc(){var b=!0;this.disableAutoScrolling=function(){b=!1};this.$get=["$window","$location",
|
||||
"$rootScope",function(a,c,d){function e(a){var b=null;m(a,function(a){!b&&z(a.nodeName)==="a"&&(b=a)});return b}function g(){var b=c.hash(),d;b?(d=h.getElementById(b))?d.scrollIntoView():(d=e(h.getElementsByName(b)))?d.scrollIntoView():b==="top"&&a.scrollTo(0,0):a.scrollTo(0,0)}var h=a.document;b&&d.$watch(function(){return c.hash()},function(){d.$evalAsync(g)});return g}]}function vc(b,a,c,d){function e(a){try{a.apply(null,ha.call(arguments,1))}finally{if(p--,p===0)for(;s.length;)try{s.pop()()}catch(b){c.error(b)}}}
|
||||
function g(a,b){(function V(){m(t,function(a){a()});x=b(V,a)})()}function h(){M!=f.url()&&(M=f.url(),m(N,function(a){a(f.url())}))}var f=this,i=a[0],j=b.location,k=b.history,l=b.setTimeout,n=b.clearTimeout,o={};f.isMock=!1;var p=0,s=[];f.$$completeOutstandingRequest=e;f.$$incOutstandingRequestCount=function(){p++};f.notifyWhenNoOutstandingRequests=function(a){m(t,function(a){a()});p===0?a():s.push(a)};var t=[],x;f.addPollFn=function(a){w(x)&&g(100,l);t.push(a);return a};var M=j.href,A=a.find("base");
|
||||
f.url=function(a,b){if(a){if(M!=a)return M=a,d.history?b?k.replaceState(null,"",a):(k.pushState(null,"",a),A.attr("href",A.attr("href"))):b?j.replace(a):j.href=a,f}else return j.href.replace(/%27/g,"'")};var N=[],J=!1;f.onUrlChange=function(a){J||(d.history&&u(b).bind("popstate",h),d.hashchange?u(b).bind("hashchange",h):f.addPollFn(h),J=!0);N.push(a);return a};f.baseHref=function(){var a=A.attr("href");return a?a.replace(/^https?\:\/\/[^\/]*/,""):""};var r={},$="",R=f.baseHref();f.cookies=function(a,
|
||||
b){var d,e,f,j;if(a)if(b===q)i.cookie=escape(a)+"=;path="+R+";expires=Thu, 01 Jan 1970 00:00:00 GMT";else{if(B(b))d=(i.cookie=escape(a)+"="+escape(b)+";path="+R).length+1,d>4096&&c.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+d+" > 4096 bytes)!")}else{if(i.cookie!==$){$=i.cookie;d=$.split("; ");r={};for(f=0;f<d.length;f++)e=d[f],j=e.indexOf("="),j>0&&(a=unescape(e.substring(0,j)),r[a]===q&&(r[a]=unescape(e.substring(j+1))))}return r}};f.defer=function(a,b){var c;
|
||||
p++;c=l(function(){delete o[c];e(a)},b||0);o[c]=!0;return c};f.defer.cancel=function(a){return o[a]?(delete o[a],n(a),e(C),!0):!1}}function wc(){this.$get=["$window","$log","$sniffer","$document",function(b,a,c,d){return new vc(b,d,a,c)}]}function xc(){this.$get=function(){function b(b,d){function e(a){if(a!=l){if(n){if(n==a)n=a.n}else n=a;g(a.n,a.p);g(a,l);l=a;l.n=null}}function g(a,b){if(a!=b){if(a)a.p=b;if(b)b.n=a}}if(b in a)throw Error("cacheId "+b+" taken");var h=0,f=v({},d,{id:b}),i={},j=d&&
|
||||
d.capacity||Number.MAX_VALUE,k={},l=null,n=null;return a[b]={put:function(a,b){var c=k[a]||(k[a]={key:a});e(c);w(b)||(a in i||h++,i[a]=b,h>j&&this.remove(n.key))},get:function(a){var b=k[a];if(b)return e(b),i[a]},remove:function(a){var b=k[a];if(b){if(b==l)l=b.p;if(b==n)n=b.n;g(b.n,b.p);delete k[a];delete i[a];h--}},removeAll:function(){i={};h=0;k={};l=n=null},destroy:function(){k=f=i=null;delete a[b]},info:function(){return v({},f,{size:h})}}}var a={};b.info=function(){var b={};m(a,function(a,e){b[e]=
|
||||
a.info()});return b};b.get=function(b){return a[b]};return b}}function yc(){this.$get=["$cacheFactory",function(b){return b("templates")}]}function Db(b){var a={},c="Directive",d=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,e=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,g="Template must have exactly one root element. was: ",h=/^\s*(https?|ftp|mailto|file):/;this.directive=function i(d,e){B(d)?($a(e,"directive"),a.hasOwnProperty(d)||(a[d]=[],b.factory(d+c,["$injector","$exceptionHandler",function(b,c){var e=[];m(a[d],
|
||||
function(a){try{var g=b.invoke(a);if(H(g))g={compile:I(g)};else if(!g.compile&&g.link)g.compile=I(g.link);g.priority=g.priority||0;g.name=g.name||d;g.require=g.require||g.controller&&g.name;g.restrict=g.restrict||"A";e.push(g)}catch(h){c(h)}});return e}])),a[d].push(e)):m(d,nb(i));return this};this.urlSanitizationWhitelist=function(a){return y(a)?(h=a,this):h};this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document",function(b,
|
||||
j,k,l,n,o,p,s,t){function x(a,b,c){a instanceof u||(a=u(a));m(a,function(b,c){b.nodeType==3&&b.nodeValue.match(/\S+/)&&(a[c]=u(b).wrap("<span></span>").parent()[0])});var d=A(a,b,a,c);return function(b,c){$a(b,"scope");for(var e=c?ua.clone.call(a):a,j=0,g=e.length;j<g;j++){var h=e[j];(h.nodeType==1||h.nodeType==9)&&e.eq(j).data("$scope",b)}M(e,"ng-scope");c&&c(e,b);d&&d(b,e,e);return e}}function M(a,b){try{a.addClass(b)}catch(c){}}function A(a,b,c,d){function e(a,c,d,g){var h,i,k,p,o,l,n,t=[];o=0;
|
||||
for(l=c.length;o<l;o++)t.push(c[o]);n=o=0;for(l=j.length;o<l;n++)i=t[n],c=j[o++],h=j[o++],c?(c.scope?(k=a.$new(L(c.scope)),u(i).data("$scope",k)):k=a,(p=c.transclude)||!g&&b?c(h,k,i,d,function(b){return function(c){var d=a.$new();d.$$transcluded=!0;return b(d,c).bind("$destroy",Ta(d,d.$destroy))}}(p||b)):c(h,k,i,q,g)):h&&h(a,i.childNodes,q,g)}for(var j=[],g,h,i,k=0;k<a.length;k++)h=new ia,g=N(a[k],[],h,d),h=(g=g.length?J(g,a[k],h,b,c):null)&&g.terminal||!a[k].childNodes||!a[k].childNodes.length?null:
|
||||
A(a[k].childNodes,g?g.transclude:b),j.push(g),j.push(h),i=i||g||h;return i?e:null}function N(a,b,c,g){var j=c.$attr,h;switch(a.nodeType){case 1:r(b,ea(fb(a).toLowerCase()),"E",g);var i,k,o;h=a.attributes;for(var p=0,l=h&&h.length;p<l;p++)if(i=h[p],i.specified)k=i.name,o=ea(k.toLowerCase()),j[o]=k,c[o]=i=Q(Z&&k=="href"?decodeURIComponent(a.getAttribute(k,2)):i.value),Ab(a,o)&&(c[o]=!0),V(a,b,i,o),r(b,o,"A",g);a=a.className;if(B(a)&&a!=="")for(;h=e.exec(a);)o=ea(h[2]),r(b,o,"C",g)&&(c[o]=Q(h[3])),a=
|
||||
a.substr(h.index+h[0].length);break;case 3:y(b,a.nodeValue);break;case 8:try{if(h=d.exec(a.nodeValue))o=ea(h[1]),r(b,o,"M",g)&&(c[o]=Q(h[2]))}catch(n){}}b.sort(F);return b}function J(a,b,c,d,e){function j(a,b){if(a)a.require=r.require,n.push(a);if(b)b.require=r.require,t.push(b)}function h(a,b){var c,d="data",e=!1;if(B(a)){for(;(c=a.charAt(0))=="^"||c=="?";)a=a.substr(1),c=="^"&&(d="inheritedData"),e=e||c=="?";c=b[d]("$"+a+"Controller");if(!c&&!e)throw Error("No controller: "+a);}else E(a)&&(c=[],
|
||||
m(a,function(a){c.push(h(a,b))}));return c}function i(a,d,e,g,j){var l,s,r,D,M;l=b===e?c:hc(c,new ia(u(e),c.$attr));s=l.$$element;if(J){var zc=/^\s*([@=&])\s*(\w*)\s*$/,x=d.$parent||d;m(J.scope,function(a,b){var c=a.match(zc)||[],e=c[2]||b,c=c[1],g,j,h;d.$$isolateBindings[b]=c+e;switch(c){case "@":l.$observe(e,function(a){d[b]=a});l.$$observers[e].$$scope=x;break;case "=":j=o(l[e]);h=j.assign||function(){g=d[b]=j(x);throw Error(Eb+l[e]+" (directive: "+J.name+")");};g=d[b]=j(x);d.$watch(function(){var a=
|
||||
j(x);a!==d[b]&&(a!==g?g=d[b]=a:h(x,a=g=d[b]));return a});break;case "&":j=o(l[e]);d[b]=function(a){return j(x,a)};break;default:throw Error("Invalid isolate scope definition for directive "+J.name+": "+a);}})}y&&m(y,function(a){var b={$scope:d,$element:s,$attrs:l,$transclude:j};M=a.controller;M=="@"&&(M=l[a.name]);s.data("$"+a.name+"Controller",p(M,b))});g=0;for(r=n.length;g<r;g++)try{D=n[g],D(d,s,l,D.require&&h(D.require,s))}catch(A){k(A,pa(s))}a&&a(d,e.childNodes,q,j);g=0;for(r=t.length;g<r;g++)try{D=
|
||||
t[g],D(d,s,l,D.require&&h(D.require,s))}catch(Ac){k(Ac,pa(s))}}for(var l=-Number.MAX_VALUE,n=[],t=[],s=null,J=null,A=null,D=c.$$element=u(b),r,F,W,ja,V=d,y,w,Y,v=0,z=a.length;v<z;v++){r=a[v];W=q;if(l>r.priority)break;if(Y=r.scope)ta("isolated scope",J,r,D),L(Y)&&(M(D,"ng-isolate-scope"),J=r),M(D,"ng-scope"),s=s||r;F=r.name;if(Y=r.controller)y=y||{},ta("'"+F+"' controller",y[F],r,D),y[F]=r;if(Y=r.transclude)ta("transclusion",ja,r,D),ja=r,l=r.priority,Y=="element"?(W=u(b),D=c.$$element=u(T.createComment(" "+
|
||||
F+": "+c[F]+" ")),b=D[0],C(e,u(W[0]),b),V=x(W,d,l)):(W=u(cb(b)).contents(),D.html(""),V=x(W,d));if(Y=r.template)if(ta("template",A,r,D),A=r,Y=Fb(Y),r.replace){W=u("<div>"+Q(Y)+"</div>").contents();b=W[0];if(W.length!=1||b.nodeType!==1)throw Error(g+Y);C(e,D,b);F={$attr:{}};a=a.concat(N(b,a.splice(v+1,a.length-(v+1)),F));$(c,F);z=a.length}else D.html(Y);if(r.templateUrl)ta("template",A,r,D),A=r,i=R(a.splice(v,a.length-v),i,D,c,e,r.replace,V),z=a.length;else if(r.compile)try{w=r.compile(D,c,V),H(w)?
|
||||
j(null,w):w&&j(w.pre,w.post)}catch(G){k(G,pa(D))}if(r.terminal)i.terminal=!0,l=Math.max(l,r.priority)}i.scope=s&&s.scope;i.transclude=ja&&V;return i}function r(d,e,g,j){var h=!1;if(a.hasOwnProperty(e))for(var o,e=b.get(e+c),l=0,p=e.length;l<p;l++)try{if(o=e[l],(j===q||j>o.priority)&&o.restrict.indexOf(g)!=-1)d.push(o),h=!0}catch(n){k(n)}return h}function $(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;m(a,function(d,e){e.charAt(0)!="$"&&(b[e]&&(d+=(e==="style"?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});m(b,
|
||||
function(b,g){g=="class"?(M(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):g=="style"?e.attr("style",e.attr("style")+";"+b):g.charAt(0)!="$"&&!a.hasOwnProperty(g)&&(a[g]=b,d[g]=c[g])})}function R(a,b,c,d,e,j,h){var i=[],k,o,p=c[0],t=a.shift(),s=v({},t,{controller:null,templateUrl:null,transclude:null,scope:null});c.html("");l.get(t.templateUrl,{cache:n}).success(function(l){var n,t,l=Fb(l);if(j){t=u("<div>"+Q(l)+"</div>").contents();n=t[0];if(t.length!=1||n.nodeType!==1)throw Error(g+l);l={$attr:{}};
|
||||
C(e,c,n);N(n,a,l);$(d,l)}else n=p,c.html(l);a.unshift(s);k=J(a,n,d,h);for(o=A(c[0].childNodes,h);i.length;){var r=i.pop(),l=i.pop();t=i.pop();var ia=i.pop(),D=n;t!==p&&(D=cb(n),C(l,u(t),D));k(function(){b(o,ia,D,e,r)},ia,D,e,r)}i=null}).error(function(a,b,c,d){throw Error("Failed to load template: "+d.url);});return function(a,c,d,e,g){i?(i.push(c),i.push(d),i.push(e),i.push(g)):k(function(){b(o,c,d,e,g)},c,d,e,g)}}function F(a,b){return b.priority-a.priority}function ta(a,b,c,d){if(b)throw Error("Multiple directives ["+
|
||||
b.name+", "+c.name+"] asking for "+a+" on: "+pa(d));}function y(a,b){var c=j(b,!0);c&&a.push({priority:0,compile:I(function(a,b){var d=b.parent(),e=d.data("$binding")||[];e.push(c);M(d.data("$binding",e),"ng-binding");a.$watch(c,function(a){b[0].nodeValue=a})})})}function V(a,b,c,d){var e=j(c,!0);e&&b.push({priority:100,compile:I(function(a,b,c){b=c.$$observers||(c.$$observers={});d==="class"&&(e=j(c[d],!0));c[d]=q;(b[d]||(b[d]=[])).$$inter=!0;(c.$$observers&&c.$$observers[d].$$scope||a).$watch(e,
|
||||
function(a){c.$set(d,a)})})})}function C(a,b,c){var d=b[0],e=d.parentNode,g,j;if(a){g=0;for(j=a.length;g<j;g++)if(a[g]==d){a[g]=c;break}}e&&e.replaceChild(c,d);c[u.expando]=d[u.expando];b[0]=c}var ia=function(a,b){this.$$element=a;this.$attr=b||{}};ia.prototype={$normalize:ea,$set:function(a,b,c,d){var e=Ab(this.$$element[0],a),g=this.$$observers;e&&(this.$$element.prop(a,b),d=e);this[a]=b;d?this.$attr[a]=d:(d=this.$attr[a])||(this.$attr[a]=d=Za(a,"-"));if(fb(this.$$element[0])==="A"&&a==="href")D.setAttribute("href",
|
||||
b),e=D.href,e.match(h)||(this[a]=b="unsafe:"+e);c!==!1&&(b===null||b===q?this.$$element.removeAttr(d):this.$$element.attr(d,b));g&&m(g[a],function(a){try{a(b)}catch(c){k(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers={}),e=d[a]||(d[a]=[]);e.push(b);s.$evalAsync(function(){e.$$inter||b(c[a])});return b}};var D=t[0].createElement("a"),W=j.startSymbol(),ja=j.endSymbol(),Fb=W=="{{"||ja=="}}"?ma:function(a){return a.replace(/\{\{/g,W).replace(/}}/g,ja)};return x}]}function ea(b){return tb(b.replace(Bc,
|
||||
""))}function Cc(){var b={};this.register=function(a,c){L(a)?v(b,a):b[a]=c};this.$get=["$injector","$window",function(a,c){return function(d,e){if(B(d)){var g=d,d=b.hasOwnProperty(g)?b[g]:gb(e.$scope,g,!0)||gb(c,g,!0);qa(d,g,!0)}return a.instantiate(d,e)}}]}function Dc(){this.$get=["$window",function(b){return u(b.document)}]}function Ec(){this.$get=["$log",function(b){return function(a,c){b.error.apply(b,arguments)}}]}function Fc(){var b="{{",a="}}";this.startSymbol=function(a){return a?(b=a,this):
|
||||
b};this.endSymbol=function(b){return b?(a=b,this):a};this.$get=["$parse",function(c){function d(d,f){for(var i,j,k=0,l=[],n=d.length,o=!1,p=[];k<n;)(i=d.indexOf(b,k))!=-1&&(j=d.indexOf(a,i+e))!=-1?(k!=i&&l.push(d.substring(k,i)),l.push(k=c(o=d.substring(i+e,j))),k.exp=o,k=j+g,o=!0):(k!=n&&l.push(d.substring(k)),k=n);if(!(n=l.length))l.push(""),n=1;if(!f||o)return p.length=n,k=function(a){for(var b=0,c=n,d;b<c;b++){if(typeof(d=l[b])=="function")d=d(a),d==null||d==q?d="":typeof d!="string"&&(d=da(d));
|
||||
p[b]=d}return p.join("")},k.exp=d,k.parts=l,k}var e=b.length,g=a.length;d.startSymbol=function(){return b};d.endSymbol=function(){return a};return d}]}function Gb(b){for(var b=b.split("/"),a=b.length;a--;)b[a]=Xa(b[a]);return b.join("/")}function va(b,a){var c=Hb.exec(b),c={protocol:c[1],host:c[3],port:G(c[5])||Ib[c[1]]||null,path:c[6]||"/",search:c[8],hash:c[10]};if(a)a.$$protocol=c.protocol,a.$$host=c.host,a.$$port=c.port;return c}function ka(b,a,c){return b+"://"+a+(c==Ib[b]?"":":"+c)}function Gc(b,
|
||||
a,c){var d=va(b);return decodeURIComponent(d.path)!=a||w(d.hash)||d.hash.indexOf(c)!==0?b:ka(d.protocol,d.host,d.port)+a.substr(0,a.lastIndexOf("/"))+d.hash.substr(c.length)}function Hc(b,a,c){var d=va(b);if(decodeURIComponent(d.path)==a&&!w(d.hash)&&d.hash.indexOf(c)===0)return b;else{var e=d.search&&"?"+d.search||"",g=d.hash&&"#"+d.hash||"",h=a.substr(0,a.lastIndexOf("/")),f=d.path.substr(h.length);if(d.path.indexOf(h)!==0)throw Error('Invalid url "'+b+'", missing path prefix "'+h+'" !');return ka(d.protocol,
|
||||
d.host,d.port)+a+"#"+c+f+e+g}}function hb(b,a,c){a=a||"";this.$$parse=function(b){var c=va(b,this);if(c.path.indexOf(a)!==0)throw Error('Invalid url "'+b+'", missing path prefix "'+a+'" !');this.$$path=decodeURIComponent(c.path.substr(a.length));this.$$search=Va(c.search);this.$$hash=c.hash&&decodeURIComponent(c.hash)||"";this.$$compose()};this.$$compose=function(){var b=qb(this.$$search),c=this.$$hash?"#"+Xa(this.$$hash):"";this.$$url=Gb(this.$$path)+(b?"?"+b:"")+c;this.$$absUrl=ka(this.$$protocol,
|
||||
this.$$host,this.$$port)+a+this.$$url};this.$$rewriteAppUrl=function(a){if(a.indexOf(c)==0)return a};this.$$parse(b)}function Ga(b,a,c){var d;this.$$parse=function(b){var c=va(b,this);if(c.hash&&c.hash.indexOf(a)!==0)throw Error('Invalid url "'+b+'", missing hash prefix "'+a+'" !');d=c.path+(c.search?"?"+c.search:"");c=Ic.exec((c.hash||"").substr(a.length));this.$$path=c[1]?(c[1].charAt(0)=="/"?"":"/")+decodeURIComponent(c[1]):"";this.$$search=Va(c[3]);this.$$hash=c[5]&&decodeURIComponent(c[5])||
|
||||
"";this.$$compose()};this.$$compose=function(){var b=qb(this.$$search),c=this.$$hash?"#"+Xa(this.$$hash):"";this.$$url=Gb(this.$$path)+(b?"?"+b:"")+c;this.$$absUrl=ka(this.$$protocol,this.$$host,this.$$port)+d+(this.$$url?"#"+a+this.$$url:"")};this.$$rewriteAppUrl=function(a){if(a.indexOf(c)==0)return a};this.$$parse(b)}function Jb(b,a,c,d){Ga.apply(this,arguments);this.$$rewriteAppUrl=function(b){if(b.indexOf(c)==0)return c+d+"#"+a+b.substr(c.length)}}function Ha(b){return function(){return this[b]}}
|
||||
function Kb(b,a){return function(c){if(w(c))return this[b];this[b]=a(c);this.$$compose();return this}}function Jc(){var b="",a=!1;this.hashPrefix=function(a){return y(a)?(b=a,this):b};this.html5Mode=function(b){return y(b)?(a=b,this):a};this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(c,d,e,g){function h(a){c.$broadcast("$locationChangeSuccess",f.absUrl(),a)}var f,i,j,k=d.url(),l=va(k);a?(i=d.baseHref()||"/",j=i.substr(0,i.lastIndexOf("/")),l=ka(l.protocol,l.host,l.port)+j+"/",
|
||||
f=e.history?new hb(Gc(k,i,b),j,l):new Jb(Hc(k,i,b),b,l,i.substr(j.length+1))):(l=ka(l.protocol,l.host,l.port)+(l.path||"")+(l.search?"?"+l.search:"")+"#"+b+"/",f=new Ga(k,b,l));g.bind("click",function(a){if(!a.ctrlKey&&!(a.metaKey||a.which==2)){for(var b=u(a.target);z(b[0].nodeName)!=="a";)if(b[0]===g[0]||!(b=b.parent())[0])return;var d=b.prop("href"),e=f.$$rewriteAppUrl(d);d&&!b.attr("target")&&e&&(f.$$parse(e),c.$apply(),a.preventDefault(),P.angular["ff-684208-preventDefault"]=!0)}});f.absUrl()!=
|
||||
k&&d.url(f.absUrl(),!0);d.onUrlChange(function(a){f.absUrl()!=a&&(c.$broadcast("$locationChangeStart",a,f.absUrl()).defaultPrevented?d.url(f.absUrl()):(c.$evalAsync(function(){var b=f.absUrl();f.$$parse(a);h(b)}),c.$$phase||c.$digest()))});var n=0;c.$watch(function(){var a=d.url(),b=f.$$replace;if(!n||a!=f.absUrl())n++,c.$evalAsync(function(){c.$broadcast("$locationChangeStart",f.absUrl(),a).defaultPrevented?f.$$parse(a):(d.url(f.absUrl(),b),h(a))});f.$$replace=!1;return n});return f}]}function Kc(){this.$get=
|
||||
["$window",function(b){function a(a){a instanceof Error&&(a.stack?a=a.message&&a.stack.indexOf(a.message)===-1?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function c(c){var e=b.console||{},g=e[c]||e.log||C;return g.apply?function(){var b=[];m(arguments,function(c){b.push(a(c))});return g.apply(e,b)}:function(a,b){g(a,b)}}return{log:c("log"),warn:c("warn"),info:c("info"),error:c("error")}}]}function Lc(b,a){function c(a){return a.indexOf(t)!=
|
||||
-1}function d(){return p+1<b.length?b.charAt(p+1):!1}function e(a){return"0"<=a&&a<="9"}function g(a){return a==" "||a=="\r"||a=="\t"||a=="\n"||a=="\u000b"||a=="\u00a0"}function h(a){return"a"<=a&&a<="z"||"A"<=a&&a<="Z"||"_"==a||a=="$"}function f(a){return a=="-"||a=="+"||e(a)}function i(a,c,d){d=d||p;throw Error("Lexer Error: "+a+" at column"+(y(c)?"s "+c+"-"+p+" ["+b.substring(c,d)+"]":" "+d)+" in expression ["+b+"].");}function j(){for(var a="",c=p;p<b.length;){var g=z(b.charAt(p));if(g=="."||
|
||||
e(g))a+=g;else{var j=d();if(g=="e"&&f(j))a+=g;else if(f(g)&&j&&e(j)&&a.charAt(a.length-1)=="e")a+=g;else if(f(g)&&(!j||!e(j))&&a.charAt(a.length-1)=="e")i("Invalid exponent");else break}p++}a*=1;n.push({index:c,text:a,json:!0,fn:function(){return a}})}function k(){for(var c="",d=p,f,j,i,k;p<b.length;){k=b.charAt(p);if(k=="."||h(k)||e(k))k=="."&&(f=p),c+=k;else break;p++}if(f)for(j=p;j<b.length;){k=b.charAt(j);if(k=="("){i=c.substr(f-d+1);c=c.substr(0,f-d);p=j;break}if(g(k))j++;else break}d={index:d,
|
||||
text:c};if(Ia.hasOwnProperty(c))d.fn=d.json=Ia[c];else{var l=Lb(c,a);d.fn=v(function(a,b){return l(a,b)},{assign:function(a,b){return Mb(a,c,b)}})}n.push(d);i&&(n.push({index:f,text:".",json:!1}),n.push({index:f+1,text:i,json:!1}))}function l(a){var c=p;p++;for(var d="",e=a,f=!1;p<b.length;){var g=b.charAt(p);e+=g;if(f)g=="u"?(g=b.substring(p+1,p+5),g.match(/[\da-f]{4}/i)||i("Invalid unicode escape [\\u"+g+"]"),p+=4,d+=String.fromCharCode(parseInt(g,16))):(f=Mc[g],d+=f?f:g),f=!1;else if(g=="\\")f=
|
||||
!0;else if(g==a){p++;n.push({index:c,text:e,string:d,json:!0,fn:function(){return d}});return}else d+=g;p++}i("Unterminated quote",c)}for(var n=[],o,p=0,s=[],t,x=":";p<b.length;){t=b.charAt(p);if(c("\"'"))l(t);else if(e(t)||c(".")&&e(d()))j();else if(h(t)){if(k(),"{,".indexOf(x)!=-1&&s[0]=="{"&&(o=n[n.length-1]))o.json=o.text.indexOf(".")==-1}else if(c("(){}[].,;:"))n.push({index:p,text:t,json:":[,".indexOf(x)!=-1&&c("{[")||c("}]:,")}),c("{[")&&s.unshift(t),c("}]")&&s.shift(),p++;else if(g(t)){p++;
|
||||
continue}else{var m=t+d(),A=Ia[t],N=Ia[m];N?(n.push({index:p,text:m,fn:N}),p+=2):A?(n.push({index:p,text:t,fn:A,json:"[,:".indexOf(x)!=-1&&c("+-")}),p+=1):i("Unexpected next character ",p,p+1)}x=t}return n}function Nc(b,a,c,d){function e(a,c){throw Error("Syntax Error: Token '"+c.text+"' "+a+" at column "+(c.index+1)+" of the expression ["+b+"] starting at ["+b.substring(c.index)+"].");}function g(){if(R.length===0)throw Error("Unexpected end of expression: "+b);return R[0]}function h(a,b,c,d){if(R.length>
|
||||
0){var e=R[0],f=e.text;if(f==a||f==b||f==c||f==d||!a&&!b&&!c&&!d)return e}return!1}function f(b,c,d,f){return(b=h(b,c,d,f))?(a&&!b.json&&e("is not valid json",b),R.shift(),b):!1}function i(a){f(a)||e("is unexpected, expecting ["+a+"]",h())}function j(a,b){return function(c,d){return a(c,d,b)}}function k(a,b,c){return function(d,e){return b(d,e,a,c)}}function l(){for(var a=[];;)if(R.length>0&&!h("}",")",";","]")&&a.push(w()),!f(";"))return a.length==1?a[0]:function(b,c){for(var d,e=0;e<a.length;e++){var f=
|
||||
a[e];f&&(d=f(b,c))}return d}}function n(){for(var a=f(),b=c(a.text),d=[];;)if(a=f(":"))d.push(F());else{var e=function(a,c,e){for(var e=[e],f=0;f<d.length;f++)e.push(d[f](a,c));return b.apply(a,e)};return function(){return e}}}function o(){for(var a=p(),b;;)if(b=f("||"))a=k(a,b.fn,p());else return a}function p(){var a=s(),b;if(b=f("&&"))a=k(a,b.fn,p());return a}function s(){var a=t(),b;if(b=f("==","!="))a=k(a,b.fn,s());return a}function t(){var a;a=x();for(var b;b=f("+","-");)a=k(a,b.fn,x());if(b=
|
||||
f("<",">","<=",">="))a=k(a,b.fn,t());return a}function x(){for(var a=m(),b;b=f("*","/","%");)a=k(a,b.fn,m());return a}function m(){var a;return f("+")?A():(a=f("-"))?k(r,a.fn,m()):(a=f("!"))?j(a.fn,m()):A()}function A(){var a;if(f("("))a=w(),i(")");else if(f("["))a=N();else if(f("{"))a=J();else{var b=f();(a=b.fn)||e("not a primary expression",b)}for(var c;b=f("(","[",".");)b.text==="("?(a=y(a,c),c=null):b.text==="["?(c=a,a=V(a)):b.text==="."?(c=a,a=u(a)):e("IMPOSSIBLE");return a}function N(){var a=
|
||||
[];if(g().text!="]"){do a.push(F());while(f(","))}i("]");return function(b,c){for(var d=[],e=0;e<a.length;e++)d.push(a[e](b,c));return d}}function J(){var a=[];if(g().text!="}"){do{var b=f(),b=b.string||b.text;i(":");var c=F();a.push({key:b,value:c})}while(f(","))}i("}");return function(b,c){for(var d={},e=0;e<a.length;e++){var f=a[e];d[f.key]=f.value(b,c)}return d}}var r=I(0),$,R=Lc(b,d),F=function(){var a=o(),c,d;return(d=f("="))?(a.assign||e("implies assignment but ["+b.substring(0,d.index)+"] can not be assigned to",
|
||||
d),c=o(),function(b,d){return a.assign(b,c(b,d),d)}):a},y=function(a,b){var c=[];if(g().text!=")"){do c.push(F());while(f(","))}i(")");return function(d,e){for(var f=[],g=b?b(d,e):d,j=0;j<c.length;j++)f.push(c[j](d,e));j=a(d,e,g)||C;return j.apply?j.apply(g,f):j(f[0],f[1],f[2],f[3],f[4])}},u=function(a){var b=f().text,c=Lb(b,d);return v(function(b,d,e){return c(e||a(b,d),d)},{assign:function(c,d,e){return Mb(a(c,e),b,d)}})},V=function(a){var b=F();i("]");return v(function(c,d){var e=a(c,d),f=b(c,
|
||||
d),g;if(!e)return q;if((e=e[f])&&e.then){g=e;if(!("$$v"in e))g.$$v=q,g.then(function(a){g.$$v=a});e=e.$$v}return e},{assign:function(c,d,e){return a(c,e)[b(c,e)]=d}})},w=function(){for(var a=F(),b;;)if(b=f("|"))a=k(a,b.fn,n());else return a};a?(F=o,y=u=V=w=function(){e("is not valid json",{text:b,index:0})},$=A()):$=l();R.length!==0&&e("is an unexpected token",R[0]);return $}function Mb(b,a,c){for(var a=a.split("."),d=0;a.length>1;d++){var e=a.shift(),g=b[e];g||(g={},b[e]=g);b=g}return b[a.shift()]=
|
||||
c}function gb(b,a,c){if(!a)return b;for(var a=a.split("."),d,e=b,g=a.length,h=0;h<g;h++)d=a[h],b&&(b=(e=b)[d]);return!c&&H(b)?Ta(e,b):b}function Nb(b,a,c,d,e){return function(g,h){var f=h&&h.hasOwnProperty(b)?h:g,i;if(f===null||f===q)return f;if((f=f[b])&&f.then){if(!("$$v"in f))i=f,i.$$v=q,i.then(function(a){i.$$v=a});f=f.$$v}if(!a||f===null||f===q)return f;if((f=f[a])&&f.then){if(!("$$v"in f))i=f,i.$$v=q,i.then(function(a){i.$$v=a});f=f.$$v}if(!c||f===null||f===q)return f;if((f=f[c])&&f.then){if(!("$$v"in
|
||||
f))i=f,i.$$v=q,i.then(function(a){i.$$v=a});f=f.$$v}if(!d||f===null||f===q)return f;if((f=f[d])&&f.then){if(!("$$v"in f))i=f,i.$$v=q,i.then(function(a){i.$$v=a});f=f.$$v}if(!e||f===null||f===q)return f;if((f=f[e])&&f.then){if(!("$$v"in f))i=f,i.$$v=q,i.then(function(a){i.$$v=a});f=f.$$v}return f}}function Lb(b,a){if(ib.hasOwnProperty(b))return ib[b];var c=b.split("."),d=c.length,e;if(a)e=d<6?Nb(c[0],c[1],c[2],c[3],c[4]):function(a,b){var e=0,g;do g=Nb(c[e++],c[e++],c[e++],c[e++],c[e++])(a,b),b=q,
|
||||
a=g;while(e<d);return g};else{var g="var l, fn, p;\n";m(c,function(a,b){g+="if(s === null || s === undefined) return s;\nl=s;\ns="+(b?"s":'((k&&k.hasOwnProperty("'+a+'"))?k:s)')+'["'+a+'"];\nif (s && s.then) {\n if (!("$$v" in s)) {\n p=s;\n p.$$v = undefined;\n p.then(function(v) {p.$$v=v;});\n}\n s=s.$$v\n}\n'});g+="return s;";e=Function("s","k",g);e.toString=function(){return g}}return ib[b]=e}function Oc(){var b={};this.$get=["$filter","$sniffer",function(a,c){return function(d){switch(typeof d){case "string":return b.hasOwnProperty(d)?
|
||||
b[d]:b[d]=Nc(d,!1,a,c.csp);case "function":return d;default:return C}}}]}function Pc(){this.$get=["$rootScope","$exceptionHandler",function(b,a){return Qc(function(a){b.$evalAsync(a)},a)}]}function Qc(b,a){function c(a){return a}function d(a){return h(a)}var e=function(){var f=[],i,j;return j={resolve:function(a){if(f){var c=f;f=q;i=g(a);c.length&&b(function(){for(var a,b=0,d=c.length;b<d;b++)a=c[b],i.then(a[0],a[1])})}},reject:function(a){j.resolve(h(a))},promise:{then:function(b,g){var j=e(),h=
|
||||
function(d){try{j.resolve((b||c)(d))}catch(e){a(e),j.reject(e)}},p=function(b){try{j.resolve((g||d)(b))}catch(c){a(c),j.reject(c)}};f?f.push([h,p]):i.then(h,p);return j.promise}}}},g=function(a){return a&&a.then?a:{then:function(c){var d=e();b(function(){d.resolve(c(a))});return d.promise}}},h=function(a){return{then:function(c,g){var h=e();b(function(){h.resolve((g||d)(a))});return h.promise}}};return{defer:e,reject:h,when:function(f,i,j){var k=e(),l,n=function(b){try{return(i||c)(b)}catch(d){return a(d),
|
||||
h(d)}},o=function(b){try{return(j||d)(b)}catch(c){return a(c),h(c)}};b(function(){g(f).then(function(a){l||(l=!0,k.resolve(g(a).then(n,o)))},function(a){l||(l=!0,k.resolve(o(a)))})});return k.promise},all:function(a){var b=e(),c=a.length,d=[];c?m(a,function(a,e){g(a).then(function(a){e in d||(d[e]=a,--c||b.resolve(d))},function(a){e in d||b.reject(a)})}):b.resolve(d);return b.promise}}}function Rc(){var b={};this.when=function(a,c){b[a]=v({reloadOnSearch:!0},c);if(a){var d=a[a.length-1]=="/"?a.substr(0,
|
||||
a.length-1):a+"/";b[d]={redirectTo:a}}return this};this.otherwise=function(a){this.when(null,a);return this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache",function(a,c,d,e,g,h,f){function i(a,b){for(var b="^"+b.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"$",c="",d=[],e={},f=/:(\w+)/g,g,j=0;(g=f.exec(b))!==null;)c+=b.slice(j,g.index),c+="([^\\/]*)",d.push(g[1]),j=f.lastIndex;c+=b.substr(j);var h=a.match(RegExp(c));h&&m(d,function(a,b){e[a]=h[b+1]});return h?
|
||||
e:null}function j(){var b=k(),j=o.current;if(b&&j&&b.$$route===j.$$route&&fa(b.pathParams,j.pathParams)&&!b.reloadOnSearch&&!n)j.params=b.params,U(j.params,d),a.$broadcast("$routeUpdate",j);else if(b||j)n=!1,a.$broadcast("$routeChangeStart",b,j),(o.current=b)&&b.redirectTo&&(B(b.redirectTo)?c.path(l(b.redirectTo,b.params)).search(b.params).replace():c.url(b.redirectTo(b.pathParams,c.path(),c.search())).replace()),e.when(b).then(function(){if(b){var a=[],c=[],d;m(b.resolve||{},function(b,d){a.push(d);
|
||||
c.push(B(b)?g.get(b):g.invoke(b))});if(!y(d=b.template))if(y(d=b.templateUrl))d=h.get(d,{cache:f}).then(function(a){return a.data});y(d)&&(a.push("$template"),c.push(d));return e.all(c).then(function(b){var c={};m(b,function(b,d){c[a[d]]=b});return c})}}).then(function(c){if(b==o.current){if(b)b.locals=c,U(b.params,d);a.$broadcast("$routeChangeSuccess",b,j)}},function(c){b==o.current&&a.$broadcast("$routeChangeError",b,j,c)})}function k(){var a,d;m(b,function(b,e){if(!d&&(a=i(c.path(),e)))d=ya(b,
|
||||
{params:v({},c.search(),a),pathParams:a}),d.$$route=b});return d||b[null]&&ya(b[null],{params:{},pathParams:{}})}function l(a,b){var c=[];m((a||"").split(":"),function(a,d){if(d==0)c.push(a);else{var e=a.match(/(\w+)(.*)/),f=e[1];c.push(b[f]);c.push(e[2]||"");delete b[f]}});return c.join("")}var n=!1,o={routes:b,reload:function(){n=!0;a.$evalAsync(j)}};a.$on("$locationChangeSuccess",j);return o}]}function Sc(){this.$get=I({})}function Tc(){var b=10;this.digestTtl=function(a){arguments.length&&(b=
|
||||
a);return b};this.$get=["$injector","$exceptionHandler","$parse",function(a,c,d){function e(){this.$id=xa();this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this["this"]=this.$root=this;this.$$destroyed=!1;this.$$asyncQueue=[];this.$$listeners={};this.$$isolateBindings={}}function g(a){if(i.$$phase)throw Error(i.$$phase+" already in progress");i.$$phase=a}function h(a,b){var c=d(a);qa(c,b);return c}function f(){}e.prototype={$new:function(a){if(H(a))throw Error("API-CHANGE: Use $controller to instantiate controllers.");
|
||||
a?(a=new e,a.$root=this.$root):(a=function(){},a.prototype=this,a=new a,a.$id=xa());a["this"]=a;a.$$listeners={};a.$parent=this;a.$$asyncQueue=[];a.$$watchers=a.$$nextSibling=a.$$childHead=a.$$childTail=null;a.$$prevSibling=this.$$childTail;this.$$childHead?this.$$childTail=this.$$childTail.$$nextSibling=a:this.$$childHead=this.$$childTail=a;return a},$watch:function(a,b,c){var d=h(a,"watch"),e=this.$$watchers,g={fn:b,last:f,get:d,exp:a,eq:!!c};if(!H(b)){var i=h(b||C,"listener");g.fn=function(a,b,
|
||||
c){i(c)}}if(!e)e=this.$$watchers=[];e.unshift(g);return function(){Sa(e,g)}},$digest:function(){var a,d,e,h,o,p,m,t=b,x,q=[],A,N;g("$digest");do{m=!1;x=this;do{for(o=x.$$asyncQueue;o.length;)try{x.$eval(o.shift())}catch(J){c(J)}if(h=x.$$watchers)for(p=h.length;p--;)try{if(a=h[p],(d=a.get(x))!==(e=a.last)&&!(a.eq?fa(d,e):typeof d=="number"&&typeof e=="number"&&isNaN(d)&&isNaN(e)))m=!0,a.last=a.eq?U(d):d,a.fn(d,e===f?d:e,x),t<5&&(A=4-t,q[A]||(q[A]=[]),N=H(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):
|
||||
a.exp,N+="; newVal: "+da(d)+"; oldVal: "+da(e),q[A].push(N))}catch(r){c(r)}if(!(h=x.$$childHead||x!==this&&x.$$nextSibling))for(;x!==this&&!(h=x.$$nextSibling);)x=x.$parent}while(x=h);if(m&&!t--)throw i.$$phase=null,Error(b+" $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: "+da(q));}while(m||o.length);i.$$phase=null},$destroy:function(){if(!(i==this||this.$$destroyed)){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;if(a.$$childHead==this)a.$$childHead=
|
||||
this.$$nextSibling;if(a.$$childTail==this)a.$$childTail=this.$$prevSibling;if(this.$$prevSibling)this.$$prevSibling.$$nextSibling=this.$$nextSibling;if(this.$$nextSibling)this.$$nextSibling.$$prevSibling=this.$$prevSibling;this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null}},$eval:function(a,b){return d(a)(this,b)},$evalAsync:function(a){this.$$asyncQueue.push(a)},$apply:function(a){try{return g("$apply"),this.$eval(a)}catch(b){c(b)}finally{i.$$phase=null;try{i.$digest()}catch(d){throw c(d),
|
||||
d;}}},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);return function(){c[za(c,b)]=null}},$emit:function(a,b){var d=[],e,f=this,g=!1,h={name:a,targetScope:f,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},i=[h].concat(ha.call(arguments,1)),m,q;do{e=f.$$listeners[a]||d;h.currentScope=f;m=0;for(q=e.length;m<q;m++)if(e[m])try{if(e[m].apply(null,i),g)return h}catch(A){c(A)}else e.splice(m,1),m--,q--;f=f.$parent}while(f);
|
||||
return h},$broadcast:function(a,b){var d=this,e=this,f={name:a,targetScope:this,preventDefault:function(){f.defaultPrevented=!0},defaultPrevented:!1},g=[f].concat(ha.call(arguments,1)),h,i;do{d=e;f.currentScope=d;e=d.$$listeners[a]||[];h=0;for(i=e.length;h<i;h++)if(e[h])try{e[h].apply(null,g)}catch(m){c(m)}else e.splice(h,1),h--,i--;if(!(e=d.$$childHead||d!==this&&d.$$nextSibling))for(;d!==this&&!(e=d.$$nextSibling);)d=d.$parent}while(d=e);return f}};var i=new e;return i}]}function Uc(){this.$get=
|
||||
["$window",function(b){var a={},c=G((/android (\d+)/.exec(z(b.navigator.userAgent))||[])[1]);return{history:!(!b.history||!b.history.pushState||c<4),hashchange:"onhashchange"in b&&(!b.document.documentMode||b.document.documentMode>7),hasEvent:function(c){if(c=="input"&&Z==9)return!1;if(w(a[c])){var e=b.document.createElement("div");a[c]="on"+c in e}return a[c]},csp:!1}}]}function Vc(){this.$get=I(P)}function Ob(b){var a={},c,d,e;if(!b)return a;m(b.split("\n"),function(b){e=b.indexOf(":");c=z(Q(b.substr(0,
|
||||
e)));d=Q(b.substr(e+1));c&&(a[c]?a[c]+=", "+d:a[c]=d)});return a}function Pb(b){var a=L(b)?b:q;return function(c){a||(a=Ob(b));return c?a[z(c)]||null:a}}function Qb(b,a,c){if(H(c))return c(b,a);m(c,function(c){b=c(b,a)});return b}function Wc(){var b=/^\s*(\[|\{[^\{])/,a=/[\}\]]\s*$/,c=/^\)\]\}',?\n/,d=this.defaults={transformResponse:[function(d){B(d)&&(d=d.replace(c,""),b.test(d)&&a.test(d)&&(d=pb(d,!0)));return d}],transformRequest:[function(a){return L(a)&&wa.apply(a)!=="[object File]"?da(a):a}],
|
||||
headers:{common:{Accept:"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest"},post:{"Content-Type":"application/json;charset=utf-8"},put:{"Content-Type":"application/json;charset=utf-8"}}},e=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,b,c,i,j,k){function l(a){function c(a){var b=v({},a,{data:Qb(a.data,a.headers,f)});return 200<=a.status&&a.status<300?b:j.reject(b)}a.method=la(a.method);var e=a.transformRequest||
|
||||
d.transformRequest,f=a.transformResponse||d.transformResponse,g=d.headers,g=v({"X-XSRF-TOKEN":b.cookies()["XSRF-TOKEN"]},g.common,g[z(a.method)],a.headers),e=Qb(a.data,Pb(g),e),i;w(a.data)&&delete g["Content-Type"];i=n(a,e,g);i=i.then(c,c);m(s,function(a){i=a(i)});i.success=function(b){i.then(function(c){b(c.data,c.status,c.headers,a)});return i};i.error=function(b){i.then(null,function(c){b(c.data,c.status,c.headers,a)});return i};return i}function n(b,c,d){function e(a,b,c){m&&(200<=a&&a<300?m.put(q,
|
||||
[a,b,Ob(c)]):m.remove(q));f(b,a,c);i.$apply()}function f(a,c,d){c=Math.max(c,0);(200<=c&&c<300?k.resolve:k.reject)({data:a,status:c,headers:Pb(d),config:b})}function h(){var a=za(l.pendingRequests,b);a!==-1&&l.pendingRequests.splice(a,1)}var k=j.defer(),n=k.promise,m,s,q=o(b.url,b.params);l.pendingRequests.push(b);n.then(h,h);b.cache&&b.method=="GET"&&(m=L(b.cache)?b.cache:p);if(m)if(s=m.get(q))if(s.then)return s.then(h,h),s;else E(s)?f(s[1],s[0],U(s[2])):f(s,200,{});else m.put(q,n);s||a(b.method,
|
||||
q,c,e,d,b.timeout,b.withCredentials);return n}function o(a,b){if(!b)return a;var c=[];fc(b,function(a,b){a==null||a==q||(L(a)&&(a=da(a)),c.push(encodeURIComponent(b)+"="+encodeURIComponent(a)))});return a+(a.indexOf("?")==-1?"?":"&")+c.join("&")}var p=c("$http"),s=[];m(e,function(a){s.push(B(a)?k.get(a):k.invoke(a))});l.pendingRequests=[];(function(a){m(arguments,function(a){l[a]=function(b,c){return l(v(c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){m(arguments,function(a){l[a]=
|
||||
function(b,c,d){return l(v(d||{},{method:a,url:b,data:c}))}})})("post","put");l.defaults=d;return l}]}function Xc(){this.$get=["$browser","$window","$document",function(b,a,c){return Yc(b,Zc,b.defer,a.angular.callbacks,c[0],a.location.protocol.replace(":",""))}]}function Yc(b,a,c,d,e,g){function h(a,b){var c=e.createElement("script"),d=function(){e.body.removeChild(c);b&&b()};c.type="text/javascript";c.src=a;Z?c.onreadystatechange=function(){/loaded|complete/.test(c.readyState)&&d()}:c.onload=c.onerror=
|
||||
d;e.body.appendChild(c)}return function(e,i,j,k,l,n,o){function p(a,c,d,e){c=(i.match(Hb)||["",g])[1]=="file"?d?200:404:c;a(c==1223?204:c,d,e);b.$$completeOutstandingRequest(C)}b.$$incOutstandingRequestCount();i=i||b.url();if(z(e)=="jsonp"){var s="_"+(d.counter++).toString(36);d[s]=function(a){d[s].data=a};h(i.replace("JSON_CALLBACK","angular.callbacks."+s),function(){d[s].data?p(k,200,d[s].data):p(k,-2);delete d[s]})}else{var t=new a;t.open(e,i,!0);m(l,function(a,b){a&&t.setRequestHeader(b,a)});
|
||||
var q;t.onreadystatechange=function(){if(t.readyState==4){var a=t.getAllResponseHeaders(),b=["Cache-Control","Content-Language","Content-Type","Expires","Last-Modified","Pragma"];a||(a="",m(b,function(b){var c=t.getResponseHeader(b);c&&(a+=b+": "+c+"\n")}));p(k,q||t.status,t.responseText,a)}};if(o)t.withCredentials=!0;t.send(j||"");n>0&&c(function(){q=-1;t.abort()},n)}}}function $c(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,
|
||||
maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"\u00a4",posSuf:"",negPre:"(\u00a4",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),
|
||||
AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(b){return b===1?"one":"other"}}}}function ad(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(b,a,c,d){function e(e,f,i){var j=c.defer(),k=j.promise,l=y(i)&&!i,f=a.defer(function(){try{j.resolve(e())}catch(a){j.reject(a),d(a)}l||b.$apply()},f),i=function(){delete g[k.$$timeoutId]};
|
||||
k.$$timeoutId=f;g[f]=j;k.then(i,i);return k}var g={};e.cancel=function(b){return b&&b.$$timeoutId in g?(g[b.$$timeoutId].reject("canceled"),a.defer.cancel(b.$$timeoutId)):!1};return e}]}function Rb(b){function a(a,e){return b.factory(a+c,e)}var c="Filter";this.register=a;this.$get=["$injector",function(a){return function(b){return a.get(b+c)}}];a("currency",Sb);a("date",Tb);a("filter",bd);a("json",cd);a("limitTo",dd);a("lowercase",ed);a("number",Ub);a("orderBy",Vb);a("uppercase",fd)}function bd(){return function(b,
|
||||
a){if(!E(b))return b;var c=[];c.check=function(a){for(var b=0;b<c.length;b++)if(!c[b](a))return!1;return!0};var d=function(a,b){if(b.charAt(0)==="!")return!d(a,b.substr(1));switch(typeof a){case "boolean":case "number":case "string":return(""+a).toLowerCase().indexOf(b)>-1;case "object":for(var c in a)if(c.charAt(0)!=="$"&&d(a[c],b))return!0;return!1;case "array":for(c=0;c<a.length;c++)if(d(a[c],b))return!0;return!1;default:return!1}};switch(typeof a){case "boolean":case "number":case "string":a=
|
||||
{$:a};case "object":for(var e in a)e=="$"?function(){var b=(""+a[e]).toLowerCase();b&&c.push(function(a){return d(a,b)})}():function(){var b=e,f=(""+a[e]).toLowerCase();f&&c.push(function(a){return d(gb(a,b),f)})}();break;case "function":c.push(a);break;default:return b}for(var g=[],h=0;h<b.length;h++){var f=b[h];c.check(f)&&g.push(f)}return g}}function Sb(b){var a=b.NUMBER_FORMATS;return function(b,d){if(w(d))d=a.CURRENCY_SYM;return Wb(b,a.PATTERNS[1],a.GROUP_SEP,a.DECIMAL_SEP,2).replace(/\u00A4/g,
|
||||
d)}}function Ub(b){var a=b.NUMBER_FORMATS;return function(b,d){return Wb(b,a.PATTERNS[0],a.GROUP_SEP,a.DECIMAL_SEP,d)}}function Wb(b,a,c,d,e){if(isNaN(b)||!isFinite(b))return"";var g=b<0,b=Math.abs(b),h=b+"",f="",i=[],j=!1;if(h.indexOf("e")!==-1){var k=h.match(/([\d\.]+)e(-?)(\d+)/);k&&k[2]=="-"&&k[3]>e+1?h="0":(f=h,j=!0)}if(!j){h=(h.split(Xb)[1]||"").length;w(e)&&(e=Math.min(Math.max(a.minFrac,h),a.maxFrac));var h=Math.pow(10,e),b=Math.round(b*h)/h,b=(""+b).split(Xb),h=b[0],b=b[1]||"",j=0,k=a.lgSize,
|
||||
l=a.gSize;if(h.length>=k+l)for(var j=h.length-k,n=0;n<j;n++)(j-n)%l===0&&n!==0&&(f+=c),f+=h.charAt(n);for(n=j;n<h.length;n++)(h.length-n)%k===0&&n!==0&&(f+=c),f+=h.charAt(n);for(;b.length<e;)b+="0";e&&e!=="0"&&(f+=d+b.substr(0,e))}i.push(g?a.negPre:a.posPre);i.push(f);i.push(g?a.negSuf:a.posSuf);return i.join("")}function jb(b,a,c){var d="";b<0&&(d="-",b=-b);for(b=""+b;b.length<a;)b="0"+b;c&&(b=b.substr(b.length-a));return d+b}function O(b,a,c,d){c=c||0;return function(e){e=e["get"+b]();if(c>0||e>
|
||||
-c)e+=c;e===0&&c==-12&&(e=12);return jb(e,a,d)}}function Ja(b,a){return function(c,d){var e=c["get"+b](),g=la(a?"SHORT"+b:b);return d[g][e]}}function Tb(b){function a(a){var b;if(b=a.match(c)){var a=new Date(0),g=0,h=0;b[9]&&(g=G(b[9]+b[10]),h=G(b[9]+b[11]));a.setUTCFullYear(G(b[1]),G(b[2])-1,G(b[3]));a.setUTCHours(G(b[4]||0)-g,G(b[5]||0)-h,G(b[6]||0),G(b[7]||0))}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,
|
||||
e){var g="",h=[],f,i,e=e||"mediumDate",e=b.DATETIME_FORMATS[e]||e;B(c)&&(c=gd.test(c)?G(c):a(c));Qa(c)&&(c=new Date(c));if(!na(c))return c;for(;e;)(i=hd.exec(e))?(h=h.concat(ha.call(i,1)),e=h.pop()):(h.push(e),e=null);m(h,function(a){f=id[a];g+=f?f(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function cd(){return function(b){return da(b,!0)}}function dd(){return function(b,a){if(!(b instanceof Array))return b;var a=G(a),c=[],d,e;if(!b||!(b instanceof Array))return c;
|
||||
a>b.length?a=b.length:a<-b.length&&(a=-b.length);a>0?(d=0,e=a):(d=b.length+a,e=b.length);for(;d<e;d++)c.push(b[d]);return c}}function Vb(b){return function(a,c,d){function e(a,b){return Ua(b)?function(b,c){return a(c,b)}:a}if(!E(a))return a;if(!c)return a;for(var c=E(c)?c:[c],c=Ra(c,function(a){var c=!1,d=a||ma;if(B(a)){if(a.charAt(0)=="+"||a.charAt(0)=="-")c=a.charAt(0)=="-",a=a.substring(1);d=b(a)}return e(function(a,b){var c;c=d(a);var e=d(b),f=typeof c,g=typeof e;f==g?(f=="string"&&(c=c.toLowerCase()),
|
||||
f=="string"&&(e=e.toLowerCase()),c=c===e?0:c<e?-1:1):c=f<g?-1:1;return c},c)}),g=[],h=0;h<a.length;h++)g.push(a[h]);return g.sort(e(function(a,b){for(var d=0;d<c.length;d++){var e=c[d](a,b);if(e!==0)return e}return 0},d))}}function S(b){H(b)&&(b={link:b});b.restrict=b.restrict||"AC";return I(b)}function Yb(b,a){function c(a,c){c=c?"-"+Za(c,"-"):"";b.removeClass((a?Ka:La)+c).addClass((a?La:Ka)+c)}var d=this,e=b.parent().controller("form")||Ma,g=0,h=d.$error={};d.$name=a.name;d.$dirty=!1;d.$pristine=
|
||||
!0;d.$valid=!0;d.$invalid=!1;e.$addControl(d);b.addClass(Na);c(!0);d.$addControl=function(a){a.$name&&!d.hasOwnProperty(a.$name)&&(d[a.$name]=a)};d.$removeControl=function(a){a.$name&&d[a.$name]===a&&delete d[a.$name];m(h,function(b,c){d.$setValidity(c,!0,a)})};d.$setValidity=function(a,b,j){var k=h[a];if(b){if(k&&(Sa(k,j),!k.length)){g--;if(!g)c(b),d.$valid=!0,d.$invalid=!1;h[a]=!1;c(!0,a);e.$setValidity(a,!0,d)}}else{g||c(b);if(k){if(za(k,j)!=-1)return}else h[a]=k=[],g++,c(!1,a),e.$setValidity(a,
|
||||
!1,d);k.push(j);d.$valid=!1;d.$invalid=!0}};d.$setDirty=function(){b.removeClass(Na).addClass(Zb);d.$dirty=!0;d.$pristine=!1;e.$setDirty()}}function X(b){return w(b)||b===""||b===null||b!==b}function Oa(b,a,c,d,e,g){var h=function(){var c=Q(a.val());d.$viewValue!==c&&b.$apply(function(){d.$setViewValue(c)})};if(e.hasEvent("input"))a.bind("input",h);else{var f,i=function(){f||(f=g.defer(function(){h();f=null}))};a.bind("keydown",function(a){a=a.keyCode;a===91||15<a&&a<19||37<=a&&a<=40||i()});a.bind("change",
|
||||
h);e.hasEvent("paste")&&a.bind("paste cut",i)}d.$render=function(){a.val(X(d.$viewValue)?"":d.$viewValue)};var j=c.ngPattern,k=function(a,b){return X(b)||a.test(b)?(d.$setValidity("pattern",!0),b):(d.$setValidity("pattern",!1),q)};j&&(j.match(/^\/(.*)\/$/)?(j=RegExp(j.substr(1,j.length-2)),e=function(a){return k(j,a)}):e=function(a){var c=b.$eval(j);if(!c||!c.test)throw Error("Expected "+j+" to be a RegExp but was "+c);return k(c,a)},d.$formatters.push(e),d.$parsers.push(e));if(c.ngMinlength){var l=
|
||||
G(c.ngMinlength),e=function(a){return!X(a)&&a.length<l?(d.$setValidity("minlength",!1),q):(d.$setValidity("minlength",!0),a)};d.$parsers.push(e);d.$formatters.push(e)}if(c.ngMaxlength){var n=G(c.ngMaxlength),c=function(a){return!X(a)&&a.length>n?(d.$setValidity("maxlength",!1),q):(d.$setValidity("maxlength",!0),a)};d.$parsers.push(c);d.$formatters.push(c)}}function kb(b,a){b="ngClass"+b;return S(function(c,d,e){function g(b){if(a===!0||c.$index%2===a)i&&!fa(b,i)&&h(i),f(b);i=U(b)}function h(a){L(a)&&
|
||||
!E(a)&&(a=Ra(a,function(a,b){if(a)return b}));d.removeClass(E(a)?a.join(" "):a)}function f(a){L(a)&&!E(a)&&(a=Ra(a,function(a,b){if(a)return b}));a&&d.addClass(E(a)?a.join(" "):a)}var i=q;c.$watch(e[b],g,!0);e.$observe("class",function(){var a=c.$eval(e[b]);g(a,a)});b!=="ngClass"&&c.$watch("$index",function(d,g){var i=d&1;i!==g&1&&(i===a?f(c.$eval(e[b])):h(c.$eval(e[b])))})})}var z=function(b){return B(b)?b.toLowerCase():b},la=function(b){return B(b)?b.toUpperCase():b},Z=G((/msie (\d+)/.exec(z(navigator.userAgent))||
|
||||
[])[1]),u,ca,ha=[].slice,Pa=[].push,wa=Object.prototype.toString,Ya=P.angular||(P.angular={}),sa,fb,aa=["0","0","0"];C.$inject=[];ma.$inject=[];fb=Z<9?function(b){b=b.nodeName?b:b[0];return b.scopeName&&b.scopeName!="HTML"?la(b.scopeName+":"+b.nodeName):b.nodeName}:function(b){return b.nodeName?b.nodeName:b[0].nodeName};var kc=/[A-Z]/g,jd={full:"1.0.7",major:1,minor:0,dot:7,codeName:"monochromatic-rainbow"},Ba=K.cache={},Aa=K.expando="ng-"+(new Date).getTime(),oc=1,$b=P.document.addEventListener?
|
||||
function(b,a,c){b.addEventListener(a,c,!1)}:function(b,a,c){b.attachEvent("on"+a,c)},db=P.document.removeEventListener?function(b,a,c){b.removeEventListener(a,c,!1)}:function(b,a,c){b.detachEvent("on"+a,c)},mc=/([\:\-\_]+(.))/g,nc=/^moz([A-Z])/,ua=K.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;this.bind("DOMContentLoaded",a);K(P).bind("load",a)},toString:function(){var b=[];m(this,function(a){b.push(""+a)});return"["+b.join(", ")+"]"},eq:function(b){return b>=0?u(this[b]):u(this[this.length+
|
||||
b])},length:0,push:Pa,sort:[].sort,splice:[].splice},Ea={};m("multiple,selected,checked,disabled,readOnly,required".split(","),function(b){Ea[z(b)]=b});var Bb={};m("input,select,option,textarea,button,form".split(","),function(b){Bb[la(b)]=!0});m({data:wb,inheritedData:Da,scope:function(b){return Da(b,"$scope")},controller:zb,injector:function(b){return Da(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Ca,css:function(b,a,c){a=tb(a);if(y(c))b.style[a]=c;else{var d;Z<=8&&(d=
|
||||
b.currentStyle&&b.currentStyle[a],d===""&&(d="auto"));d=d||b.style[a];Z<=8&&(d=d===""?q:d);return d}},attr:function(b,a,c){var d=z(a);if(Ea[d])if(y(c))c?(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||C).specified?d:q;else if(y(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,2),b===null?q:b},prop:function(b,a,c){if(y(c))b[a]=c;else return b[a]},text:v(Z<9?function(b,a){if(b.nodeType==1){if(w(a))return b.innerText;
|
||||
b.innerText=a}else{if(w(a))return b.nodeValue;b.nodeValue=a}}:function(b,a){if(w(a))return b.textContent;b.textContent=a},{$dv:""}),val:function(b,a){if(w(a))return b.value;b.value=a},html:function(b,a){if(w(a))return b.innerHTML;for(var c=0,d=b.childNodes;c<d.length;c++)ra(d[c]);b.innerHTML=a}},function(b,a){K.prototype[a]=function(a,d){var e,g;if((b.length==2&&b!==Ca&&b!==zb?a:d)===q)if(L(a)){for(e=0;e<this.length;e++)if(b===wb)b(this[e],a);else for(g in a)b(this[e],g,a[g]);return this}else{if(this.length)return b(this[0],
|
||||
a,d)}else{for(e=0;e<this.length;e++)b(this[e],a,d);return this}return b.$dv}});m({removeData:ub,dealoc:ra,bind:function a(c,d,e){var g=ba(c,"events"),h=ba(c,"handle");g||ba(c,"events",g={});h||ba(c,"handle",h=pc(c,g));m(d.split(" "),function(d){var i=g[d];if(!i){if(d=="mouseenter"||d=="mouseleave"){var j=T.body.contains||T.body.compareDocumentPosition?function(a,c){var d=a.nodeType===9?a.documentElement:a,e=c&&c.parentNode;return a===e||!(!e||!(e.nodeType===1&&(d.contains?d.contains(e):a.compareDocumentPosition&&
|
||||
a.compareDocumentPosition(e)&16)))}:function(a,c){if(c)for(;c=c.parentNode;)if(c===a)return!0;return!1};g[d]=[];a(c,{mouseleave:"mouseout",mouseenter:"mouseover"}[d],function(a){var c=a.relatedTarget;(!c||c!==this&&!j(this,c))&&h(a,d)})}else $b(c,d,h),g[d]=[];i=g[d]}i.push(e)})},unbind:vb,replaceWith:function(a,c){var d,e=a.parentNode;ra(a);m(new K(c),function(c){d?e.insertBefore(c,d.nextSibling):e.replaceChild(c,a);d=c})},children:function(a){var c=[];m(a.childNodes,function(a){a.nodeType===1&&c.push(a)});
|
||||
return c},contents:function(a){return a.childNodes||[]},append:function(a,c){m(new K(c),function(c){a.nodeType===1&&a.appendChild(c)})},prepend:function(a,c){if(a.nodeType===1){var d=a.firstChild;m(new K(c),function(c){d?a.insertBefore(c,d):(a.appendChild(c),d=c)})}},wrap:function(a,c){var c=u(c)[0],d=a.parentNode;d&&d.replaceChild(c,a);c.appendChild(a)},remove:function(a){ra(a);var c=a.parentNode;c&&c.removeChild(a)},after:function(a,c){var d=a,e=a.parentNode;m(new K(c),function(a){e.insertBefore(a,
|
||||
d.nextSibling);d=a})},addClass:yb,removeClass:xb,toggleClass:function(a,c,d){w(d)&&(d=!Ca(a,c));(d?yb:xb)(a,c)},parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},next:function(a){if(a.nextElementSibling)return a.nextElementSibling;for(a=a.nextSibling;a!=null&&a.nodeType!==1;)a=a.nextSibling;return a},find:function(a,c){return a.getElementsByTagName(c)},clone:cb,triggerHandler:function(a,c){var d=(ba(a,"events")||{})[c];m(d,function(c){c.call(a,null)})}},function(a,c){K.prototype[c]=
|
||||
function(c,e){for(var g,h=0;h<this.length;h++)g==q?(g=a(this[h],c,e),g!==q&&(g=u(g))):bb(g,a(this[h],c,e));return g==q?this:g}});Fa.prototype={put:function(a,c){this[ga(a)]=c},get:function(a){return this[ga(a)]},remove:function(a){var c=this[a=ga(a)];delete this[a];return c}};eb.prototype={push:function(a,c){var d=this[a=ga(a)];d?d.push(c):this[a]=[c]},shift:function(a){var c=this[a=ga(a)];if(c)return c.length==1?(delete this[a],c[0]):c.shift()},peek:function(a){if(a=this[ga(a)])return a[0]}};var rc=
|
||||
/^function\s*[^\(]*\(\s*([^\)]*)\)/m,sc=/,/,tc=/^\s*(_?)(\S+?)\1\s*$/,qc=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Eb="Non-assignable model expression: ";Db.$inject=["$provide"];var Bc=/^(x[\:\-_]|data[\:\-_])/i,Hb=/^([^:]+):\/\/(\w+:{0,1}\w*@)?(\{?[\w\.-]*\}?)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,ac=/^([^\?#]*)?(\?([^#]*))?(#(.*))?$/,Ic=ac,Ib={http:80,https:443,ftp:21};hb.prototype={$$replace:!1,absUrl:Ha("$$absUrl"),url:function(a,c){if(w(a))return this.$$url;var d=ac.exec(a);d[1]&&this.path(decodeURIComponent(d[1]));
|
||||
if(d[2]||d[1])this.search(d[3]||"");this.hash(d[5]||"",c);return this},protocol:Ha("$$protocol"),host:Ha("$$host"),port:Ha("$$port"),path:Kb("$$path",function(a){return a.charAt(0)=="/"?a:"/"+a}),search:function(a,c){if(w(a))return this.$$search;y(c)?c===null?delete this.$$search[a]:this.$$search[a]=c:this.$$search=B(a)?Va(a):a;this.$$compose();return this},hash:Kb("$$hash",ma),replace:function(){this.$$replace=!0;return this}};Ga.prototype=ya(hb.prototype);Jb.prototype=ya(Ga.prototype);var Ia={"null":function(){return null},
|
||||
"true":function(){return!0},"false":function(){return!1},undefined:C,"+":function(a,c,d,e){d=d(a,c);e=e(a,c);return y(d)?y(e)?d+e:d:y(e)?e:q},"-":function(a,c,d,e){d=d(a,c);e=e(a,c);return(y(d)?d:0)-(y(e)?e:0)},"*":function(a,c,d,e){return d(a,c)*e(a,c)},"/":function(a,c,d,e){return d(a,c)/e(a,c)},"%":function(a,c,d,e){return d(a,c)%e(a,c)},"^":function(a,c,d,e){return d(a,c)^e(a,c)},"=":C,"==":function(a,c,d,e){return d(a,c)==e(a,c)},"!=":function(a,c,d,e){return d(a,c)!=e(a,c)},"<":function(a,c,
|
||||
d,e){return d(a,c)<e(a,c)},">":function(a,c,d,e){return d(a,c)>e(a,c)},"<=":function(a,c,d,e){return d(a,c)<=e(a,c)},">=":function(a,c,d,e){return d(a,c)>=e(a,c)},"&&":function(a,c,d,e){return d(a,c)&&e(a,c)},"||":function(a,c,d,e){return d(a,c)||e(a,c)},"&":function(a,c,d,e){return d(a,c)&e(a,c)},"|":function(a,c,d,e){return e(a,c)(a,c,d(a,c))},"!":function(a,c,d){return!d(a,c)}},Mc={n:"\n",f:"\u000c",r:"\r",t:"\t",v:"\u000b","'":"'",'"':'"'},ib={},Zc=P.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw Error("This browser does not support XMLHttpRequest.");
|
||||
};Rb.$inject=["$provide"];Sb.$inject=["$locale"];Ub.$inject=["$locale"];var Xb=".",id={yyyy:O("FullYear",4),yy:O("FullYear",2,0,!0),y:O("FullYear",1),MMMM:Ja("Month"),MMM:Ja("Month",!0),MM:O("Month",2,1),M:O("Month",1,1),dd:O("Date",2),d:O("Date",1),HH:O("Hours",2),H:O("Hours",1),hh:O("Hours",2,-12),h:O("Hours",1,-12),mm:O("Minutes",2),m:O("Minutes",1),ss:O("Seconds",2),s:O("Seconds",1),EEEE:Ja("Day"),EEE:Ja("Day",!0),a:function(a,c){return a.getHours()<12?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){var a=
|
||||
-1*a.getTimezoneOffset(),c=a>=0?"+":"";c+=jb(Math[a>0?"floor":"ceil"](a/60),2)+jb(Math.abs(a%60),2);return c}},hd=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,gd=/^\d+$/;Tb.$inject=["$locale"];var ed=I(z),fd=I(la);Vb.$inject=["$parse"];var kd=I({restrict:"E",compile:function(a,c){Z<=8&&(!c.href&&!c.name&&c.$set("href",""),a.append(T.createComment("IE fix")));return function(a,c){c.bind("click",function(a){c.attr("href")||a.preventDefault()})}}}),lb={};m(Ea,function(a,
|
||||
c){var d=ea("ng-"+c);lb[d]=function(){return{priority:100,compile:function(){return function(a,g,h){a.$watch(h[d],function(a){h.$set(c,!!a)})}}}}});m(["src","href"],function(a){var c=ea("ng-"+a);lb[c]=function(){return{priority:99,link:function(d,e,g){g.$observe(c,function(c){c&&(g.$set(a,c),Z&&e.prop(a,g[a]))})}}}});var Ma={$addControl:C,$removeControl:C,$setValidity:C,$setDirty:C};Yb.$inject=["$element","$attrs","$scope"];var Pa=function(a){return["$timeout",function(c){var d={name:"form",restrict:"E",
|
||||
controller:Yb,compile:function(){return{pre:function(a,d,h,f){if(!h.action){var i=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1};$b(d[0],"submit",i);d.bind("$destroy",function(){c(function(){db(d[0],"submit",i)},0,!1)})}var j=d.parent().controller("form"),k=h.name||h.ngForm;k&&(a[k]=f);j&&d.bind("$destroy",function(){j.$removeControl(f);k&&(a[k]=q);v(f,Ma)})}}}};return a?v(U(d),{restrict:"EAC"}):d}]},ld=Pa(),md=Pa(!0),nd=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,
|
||||
od=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/,pd=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,bc={text:Oa,number:function(a,c,d,e,g,h){Oa(a,c,d,e,g,h);e.$parsers.push(function(a){var c=X(a);return c||pd.test(a)?(e.$setValidity("number",!0),a===""?null:c?a:parseFloat(a)):(e.$setValidity("number",!1),q)});e.$formatters.push(function(a){return X(a)?"":""+a});if(d.min){var f=parseFloat(d.min),a=function(a){return!X(a)&&a<f?(e.$setValidity("min",!1),q):(e.$setValidity("min",!0),a)};e.$parsers.push(a);
|
||||
e.$formatters.push(a)}if(d.max){var i=parseFloat(d.max),d=function(a){return!X(a)&&a>i?(e.$setValidity("max",!1),q):(e.$setValidity("max",!0),a)};e.$parsers.push(d);e.$formatters.push(d)}e.$formatters.push(function(a){return X(a)||Qa(a)?(e.$setValidity("number",!0),a):(e.$setValidity("number",!1),q)})},url:function(a,c,d,e,g,h){Oa(a,c,d,e,g,h);a=function(a){return X(a)||nd.test(a)?(e.$setValidity("url",!0),a):(e.$setValidity("url",!1),q)};e.$formatters.push(a);e.$parsers.push(a)},email:function(a,
|
||||
c,d,e,g,h){Oa(a,c,d,e,g,h);a=function(a){return X(a)||od.test(a)?(e.$setValidity("email",!0),a):(e.$setValidity("email",!1),q)};e.$formatters.push(a);e.$parsers.push(a)},radio:function(a,c,d,e){w(d.name)&&c.attr("name",xa());c.bind("click",function(){c[0].checked&&a.$apply(function(){e.$setViewValue(d.value)})});e.$render=function(){c[0].checked=d.value==e.$viewValue};d.$observe("value",e.$render)},checkbox:function(a,c,d,e){var g=d.ngTrueValue,h=d.ngFalseValue;B(g)||(g=!0);B(h)||(h=!1);c.bind("click",
|
||||
function(){a.$apply(function(){e.$setViewValue(c[0].checked)})});e.$render=function(){c[0].checked=e.$viewValue};e.$formatters.push(function(a){return a===g});e.$parsers.push(function(a){return a?g:h})},hidden:C,button:C,submit:C,reset:C},cc=["$browser","$sniffer",function(a,c){return{restrict:"E",require:"?ngModel",link:function(d,e,g,h){h&&(bc[z(g.type)]||bc.text)(d,e,g,h,c,a)}}}],La="ng-valid",Ka="ng-invalid",Na="ng-pristine",Zb="ng-dirty",qd=["$scope","$exceptionHandler","$attrs","$element","$parse",
|
||||
function(a,c,d,e,g){function h(a,c){c=c?"-"+Za(c,"-"):"";e.removeClass((a?Ka:La)+c).addClass((a?La:Ka)+c)}this.$modelValue=this.$viewValue=Number.NaN;this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$name=d.name;var f=g(d.ngModel),i=f.assign;if(!i)throw Error(Eb+d.ngModel+" ("+pa(e)+")");this.$render=C;var j=e.inheritedData("$formController")||Ma,k=0,l=this.$error={};e.addClass(Na);h(!0);this.$setValidity=function(a,
|
||||
c){if(l[a]!==!c){if(c){if(l[a]&&k--,!k)h(!0),this.$valid=!0,this.$invalid=!1}else h(!1),this.$invalid=!0,this.$valid=!1,k++;l[a]=!c;h(c,a);j.$setValidity(a,c,this)}};this.$setViewValue=function(d){this.$viewValue=d;if(this.$pristine)this.$dirty=!0,this.$pristine=!1,e.removeClass(Na).addClass(Zb),j.$setDirty();m(this.$parsers,function(a){d=a(d)});if(this.$modelValue!==d)this.$modelValue=d,i(a,d),m(this.$viewChangeListeners,function(a){try{a()}catch(d){c(d)}})};var n=this;a.$watch(function(){var c=
|
||||
f(a);if(n.$modelValue!==c){var d=n.$formatters,e=d.length;for(n.$modelValue=c;e--;)c=d[e](c);if(n.$viewValue!==c)n.$viewValue=c,n.$render()}})}],rd=function(){return{require:["ngModel","^?form"],controller:qd,link:function(a,c,d,e){var g=e[0],h=e[1]||Ma;h.$addControl(g);c.bind("$destroy",function(){h.$removeControl(g)})}}},sd=I({require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),dc=function(){return{require:"?ngModel",link:function(a,c,d,e){if(e){d.required=
|
||||
!0;var g=function(a){if(d.required&&(X(a)||a===!1))e.$setValidity("required",!1);else return e.$setValidity("required",!0),a};e.$formatters.push(g);e.$parsers.unshift(g);d.$observe("required",function(){g(e.$viewValue)})}}}},td=function(){return{require:"ngModel",link:function(a,c,d,e){var g=(a=/\/(.*)\//.exec(d.ngList))&&RegExp(a[1])||d.ngList||",";e.$parsers.push(function(a){var c=[];a&&m(a.split(g),function(a){a&&c.push(Q(a))});return c});e.$formatters.push(function(a){return E(a)?a.join(", "):
|
||||
q})}}},ud=/^(true|false|\d+)$/,vd=function(){return{priority:100,compile:function(a,c){return ud.test(c.ngValue)?function(a,c,g){g.$set("value",a.$eval(g.ngValue))}:function(a,c,g){a.$watch(g.ngValue,function(a){g.$set("value",a,!1)})}}}},wd=S(function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBind);a.$watch(d.ngBind,function(a){c.text(a==q?"":a)})}),xd=["$interpolate",function(a){return function(c,d,e){c=a(d.attr(e.$attr.ngBindTemplate));d.addClass("ng-binding").data("$binding",c);e.$observe("ngBindTemplate",
|
||||
function(a){d.text(a)})}}],yd=[function(){return function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBindHtmlUnsafe);a.$watch(d.ngBindHtmlUnsafe,function(a){c.html(a||"")})}}],zd=kb("",!0),Ad=kb("Odd",0),Bd=kb("Even",1),Cd=S({compile:function(a,c){c.$set("ngCloak",q);a.removeClass("ng-cloak")}}),Dd=[function(){return{scope:!0,controller:"@"}}],Ed=["$sniffer",function(a){return{priority:1E3,compile:function(){a.csp=!0}}}],ec={};m("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave".split(" "),
|
||||
function(a){var c=ea("ng-"+a);ec[c]=["$parse",function(d){return function(e,g,h){var f=d(h[c]);g.bind(z(a),function(a){e.$apply(function(){f(e,{$event:a})})})}}]});var Fd=S(function(a,c,d){c.bind("submit",function(){a.$apply(d.ngSubmit)})}),Gd=["$http","$templateCache","$anchorScroll","$compile",function(a,c,d,e){return{restrict:"ECA",terminal:!0,compile:function(g,h){var f=h.ngInclude||h.src,i=h.onload||"",j=h.autoscroll;return function(g,h){var n=0,o,p=function(){o&&(o.$destroy(),o=null);h.html("")};
|
||||
g.$watch(f,function(f){var m=++n;f?a.get(f,{cache:c}).success(function(a){m===n&&(o&&o.$destroy(),o=g.$new(),h.html(a),e(h.contents())(o),y(j)&&(!j||g.$eval(j))&&d(),o.$emit("$includeContentLoaded"),g.$eval(i))}).error(function(){m===n&&p()}):p()})}}}}],Hd=S({compile:function(){return{pre:function(a,c,d){a.$eval(d.ngInit)}}}}),Id=S({terminal:!0,priority:1E3}),Jd=["$locale","$interpolate",function(a,c){var d=/{}/g;return{restrict:"EA",link:function(e,g,h){var f=h.count,i=g.attr(h.$attr.when),j=h.offset||
|
||||
0,k=e.$eval(i),l={},n=c.startSymbol(),o=c.endSymbol();m(k,function(a,e){l[e]=c(a.replace(d,n+f+"-"+j+o))});e.$watch(function(){var c=parseFloat(e.$eval(f));return isNaN(c)?"":(c in k||(c=a.pluralCat(c-j)),l[c](e,g,!0))},function(a){g.text(a)})}}}],Kd=S({transclude:"element",priority:1E3,terminal:!0,compile:function(a,c,d){return function(a,c,h){var f=h.ngRepeat,h=f.match(/^\s*(.+)\s+in\s+(.*)\s*$/),i,j,k;if(!h)throw Error("Expected ngRepeat in form of '_item_ in _collection_' but got '"+f+"'.");f=
|
||||
h[1];i=h[2];h=f.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!h)throw Error("'item' in 'item in collection' should be identifier or (key, value) but got '"+f+"'.");j=h[3]||h[1];k=h[2];var l=new eb;a.$watch(function(a){var e,f,h=a.$eval(i),m=c,q=new eb,y,A,u,w,r,v;if(E(h))r=h||[];else{r=[];for(u in h)h.hasOwnProperty(u)&&u.charAt(0)!="$"&&r.push(u);r.sort()}y=r.length-1;e=0;for(f=r.length;e<f;e++){u=h===r?e:r[e];w=h[u];if(v=l.shift(w)){A=v.scope;q.push(w,v);if(e!==v.index)v.index=e,m.after(v.element);
|
||||
m=v.element}else A=a.$new();A[j]=w;k&&(A[k]=u);A.$index=e;A.$first=e===0;A.$last=e===y;A.$middle=!(A.$first||A.$last);v||d(A,function(a){m.after(a);v={scope:A,element:m=a,index:e};q.push(w,v)})}for(u in l)if(l.hasOwnProperty(u))for(r=l[u];r.length;)w=r.pop(),w.element.remove(),w.scope.$destroy();l=q})}}}),Ld=S(function(a,c,d){a.$watch(d.ngShow,function(a){c.css("display",Ua(a)?"":"none")})}),Md=S(function(a,c,d){a.$watch(d.ngHide,function(a){c.css("display",Ua(a)?"none":"")})}),Nd=S(function(a,c,
|
||||
d){a.$watch(d.ngStyle,function(a,d){d&&a!==d&&m(d,function(a,d){c.css(d,"")});a&&c.css(a)},!0)}),Od=I({restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(a,c,d,e){var g,h,f;a.$watch(d.ngSwitch||d.on,function(i){h&&(f.$destroy(),h.remove(),h=f=null);if(g=e.cases["!"+i]||e.cases["?"])a.$eval(d.change),f=a.$new(),g(f,function(a){h=a;c.append(a)})})}}),Pd=S({transclude:"element",priority:500,require:"^ngSwitch",compile:function(a,c,d){return function(a,g,h,
|
||||
f){f.cases["!"+c.ngSwitchWhen]=d}}}),Qd=S({transclude:"element",priority:500,require:"^ngSwitch",compile:function(a,c,d){return function(a,c,h,f){f.cases["?"]=d}}}),Rd=S({controller:["$transclude","$element",function(a,c){a(function(a){c.append(a)})}]}),Sd=["$http","$templateCache","$route","$anchorScroll","$compile","$controller",function(a,c,d,e,g,h){return{restrict:"ECA",terminal:!0,link:function(a,c,j){function k(){var j=d.current&&d.current.locals,k=j&&j.$template;if(k){c.html(k);l&&(l.$destroy(),
|
||||
l=null);var k=g(c.contents()),m=d.current;l=m.scope=a.$new();if(m.controller)j.$scope=l,j=h(m.controller,j),c.children().data("$ngControllerController",j);k(l);l.$emit("$viewContentLoaded");l.$eval(n);e()}else c.html(""),l&&(l.$destroy(),l=null)}var l,n=j.onload||"";a.$on("$routeChangeSuccess",k);k()}}}],Td=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(c,d){d.type=="text/ng-template"&&a.put(d.id,c[0].text)}}}],Ud=I({terminal:!0}),Vd=["$compile","$parse",function(a,
|
||||
c){var d=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*)$/,e={$setViewValue:C};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(a,c,d){var i=this,j={},k=e,l;i.databound=d.ngModel;i.init=function(a,c,d){k=a;l=d};i.addOption=function(c){j[c]=!0;k.$viewValue==c&&(a.val(c),l.parent()&&l.remove())};i.removeOption=function(a){this.hasOption(a)&&(delete j[a],
|
||||
k.$viewValue==a&&this.renderUnknownOption(a))};i.renderUnknownOption=function(c){c="? "+ga(c)+" ?";l.val(c);a.prepend(l);a.val(c);l.prop("selected",!0)};i.hasOption=function(a){return j.hasOwnProperty(a)};c.$on("$destroy",function(){i.renderUnknownOption=C})}],link:function(e,h,f,i){function j(a,c,d,e){d.$render=function(){var a=d.$viewValue;e.hasOption(a)?(z.parent()&&z.remove(),c.val(a),a===""&&v.prop("selected",!0)):w(a)&&v?c.val(""):e.renderUnknownOption(a)};c.bind("change",function(){a.$apply(function(){z.parent()&&
|
||||
z.remove();d.$setViewValue(c.val())})})}function k(a,c,d){var e;d.$render=function(){var a=new Fa(d.$viewValue);m(c.find("option"),function(c){c.selected=y(a.get(c.value))})};a.$watch(function(){fa(e,d.$viewValue)||(e=U(d.$viewValue),d.$render())});c.bind("change",function(){a.$apply(function(){var a=[];m(c.find("option"),function(c){c.selected&&a.push(c.value)});d.$setViewValue(a)})})}function l(e,f,g){function h(){var a={"":[]},c=[""],d,i,s,u,v;s=g.$modelValue;u=o(e)||[];var w=l?mb(u):u,y,x,z;x=
|
||||
{};v=!1;var B,E;p&&(v=new Fa(s));for(z=0;y=w.length,z<y;z++){x[k]=u[l?x[l]=w[z]:z];d=m(e,x)||"";if(!(i=a[d]))i=a[d]=[],c.push(d);p?d=v.remove(n(e,x))!=q:(d=s===n(e,x),v=v||d);B=j(e,x);B=B===q?"":B;i.push({id:l?w[z]:z,label:B,selected:d})}p||(t||s===null?a[""].unshift({id:"",label:"",selected:!v}):v||a[""].unshift({id:"?",label:"",selected:!0}));x=0;for(w=c.length;x<w;x++){d=c[x];i=a[d];if(r.length<=x)s={element:A.clone().attr("label",d),label:i.label},u=[s],r.push(u),f.append(s.element);else if(u=
|
||||
r[x],s=u[0],s.label!=d)s.element.attr("label",s.label=d);B=null;z=0;for(y=i.length;z<y;z++)if(d=i[z],v=u[z+1]){B=v.element;if(v.label!==d.label)B.text(v.label=d.label);if(v.id!==d.id)B.val(v.id=d.id);if(B[0].selected!==d.selected)B.prop("selected",v.selected=d.selected)}else d.id===""&&t?E=t:(E=C.clone()).val(d.id).attr("selected",d.selected).text(d.label),u.push({element:E,label:d.label,id:d.id,selected:d.selected}),B?B.after(E):s.element.append(E),B=E;for(z++;u.length>z;)u.pop().element.remove()}for(;r.length>
|
||||
x;)r.pop()[0].element.remove()}var i;if(!(i=s.match(d)))throw Error("Expected ngOptions in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '"+s+"'.");var j=c(i[2]||i[1]),k=i[4]||i[6],l=i[5],m=c(i[3]||""),n=c(i[2]?i[1]:k),o=c(i[7]),r=[[{element:f,label:""}]];t&&(a(t)(e),t.removeClass("ng-scope"),t.remove());f.html("");f.bind("change",function(){e.$apply(function(){var a,c=o(e)||[],d={},h,i,j,m,s,t;if(p){i=[];m=0;for(t=r.length;m<t;m++){a=r[m];j=1;for(s=a.length;j<s;j++)if((h=
|
||||
a[j].element)[0].selected)h=h.val(),l&&(d[l]=h),d[k]=c[h],i.push(n(e,d))}}else h=f.val(),h=="?"?i=q:h==""?i=null:(d[k]=c[h],l&&(d[l]=h),i=n(e,d));g.$setViewValue(i)})});g.$render=h;e.$watch(h)}if(i[1]){for(var n=i[0],o=i[1],p=f.multiple,s=f.ngOptions,t=!1,v,C=u(T.createElement("option")),A=u(T.createElement("optgroup")),z=C.clone(),i=0,B=h.children(),r=B.length;i<r;i++)if(B[i].value==""){v=t=B.eq(i);break}n.init(o,t,z);if(p&&(f.required||f.ngRequired)){var E=function(a){o.$setValidity("required",
|
||||
!f.required||a&&a.length);return a};o.$parsers.push(E);o.$formatters.unshift(E);f.$observe("required",function(){E(o.$viewValue)})}s?l(e,h,o):p?k(e,h,o):j(e,h,o,n)}}}}],Wd=["$interpolate",function(a){var c={addOption:C,removeOption:C};return{restrict:"E",priority:100,compile:function(d,e){if(w(e.value)){var g=a(d.text(),!0);g||e.$set("value",d.text())}return function(a,d,e){var j=d.parent(),k=j.data("$selectController")||j.parent().data("$selectController");k&&k.databound?d.prop("selected",!1):k=
|
||||
c;g?a.$watch(g,function(a,c){e.$set("value",a);a!==c&&k.removeOption(c);k.addOption(a)}):k.addOption(e.value);d.bind("$destroy",function(){k.removeOption(e.value)})}}}}],Xd=I({restrict:"E",terminal:!0});(ca=P.jQuery)?(u=ca,v(ca.fn,{scope:ua.scope,controller:ua.controller,injector:ua.injector,inheritedData:ua.inheritedData}),ab("remove",!0),ab("empty"),ab("html")):u=K;Ya.element=u;(function(a){v(a,{bootstrap:rb,copy:U,extend:v,equals:fa,element:u,forEach:m,injector:sb,noop:C,bind:Ta,toJson:da,fromJson:pb,
|
||||
identity:ma,isUndefined:w,isDefined:y,isString:B,isFunction:H,isObject:L,isNumber:Qa,isElement:gc,isArray:E,version:jd,isDate:na,lowercase:z,uppercase:la,callbacks:{counter:0}});sa=lc(P);try{sa("ngLocale")}catch(c){sa("ngLocale",[]).provider("$locale",$c)}sa("ng",["ngLocale"],["$provide",function(a){a.provider("$compile",Db).directive({a:kd,input:cc,textarea:cc,form:ld,script:Td,select:Vd,style:Xd,option:Wd,ngBind:wd,ngBindHtmlUnsafe:yd,ngBindTemplate:xd,ngClass:zd,ngClassEven:Bd,ngClassOdd:Ad,ngCsp:Ed,
|
||||
ngCloak:Cd,ngController:Dd,ngForm:md,ngHide:Md,ngInclude:Gd,ngInit:Hd,ngNonBindable:Id,ngPluralize:Jd,ngRepeat:Kd,ngShow:Ld,ngSubmit:Fd,ngStyle:Nd,ngSwitch:Od,ngSwitchWhen:Pd,ngSwitchDefault:Qd,ngOptions:Ud,ngView:Sd,ngTransclude:Rd,ngModel:rd,ngList:td,ngChange:sd,required:dc,ngRequired:dc,ngValue:vd}).directive(lb).directive(ec);a.provider({$anchorScroll:uc,$browser:wc,$cacheFactory:xc,$controller:Cc,$document:Dc,$exceptionHandler:Ec,$filter:Rb,$interpolate:Fc,$http:Wc,$httpBackend:Xc,$location:Jc,
|
||||
$log:Kc,$parse:Oc,$route:Rc,$routeParams:Sc,$rootScope:Tc,$q:Pc,$sniffer:Uc,$templateCache:yc,$timeout:ad,$window:Vc})}])})(Ya);u(T).ready(function(){jc(T,rb)})})(window,document);angular.element(document).find("head").append('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none;}ng\\:form{display:block;}</style>');
|
||||
Vendored
-7
File diff suppressed because one or more lines are too long
Vendored
-4
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
var saveAs=saveAs||(function(h){"use strict";var r=h.document,l=function(){return h.URL||h.webkitURL||h},e=h.URL||h.webkitURL||h,n=r.createElementNS("http://www.w3.org/1999/xhtml","a"),g="download" in n,j=function(t){var s=r.createEvent("MouseEvents");s.initMouseEvent("click",true,false,h,0,0,0,0,0,false,false,false,false,0,null);return t.dispatchEvent(s)},o=h.webkitRequestFileSystem,p=h.requestFileSystem||o||h.mozRequestFileSystem,m=function(s){(h.setImmediate||h.setTimeout)(function(){throw s},0)},c="application/octet-stream",k=0,b=[],i=function(){var t=b.length;while(t--){var s=b[t];if(typeof s==="string"){e.revokeObjectURL(s)}else{s.remove()}}b.length=0},q=function(t,s,w){s=[].concat(s);var v=s.length;while(v--){var x=t["on"+s[v]];if(typeof x==="function"){try{x.call(t,w||t)}catch(u){m(u)}}}},f=function(t,u){var v=this,B=t.type,E=false,x,w,s=function(){var F=l().createObjectURL(t);b.push(F);return F},A=function(){q(v,"writestart progress write writeend".split(" "))},D=function(){if(E||!x){x=s(t)}w.location.href=x;v.readyState=v.DONE;A()},z=function(F){return function(){if(v.readyState!==v.DONE){return F.apply(this,arguments)}}},y={create:true,exclusive:false},C;v.readyState=v.INIT;if(!u){u="download"}if(g){x=s(t);n.href=x;n.download=u;if(j(n)){v.readyState=v.DONE;A();return}}if(h.chrome&&B&&B!==c){C=t.slice||t.webkitSlice;t=C.call(t,0,t.size,c);E=true}if(o&&u!=="download"){u+=".download"}if(B===c||o){w=h}else{w=h.open()}if(!p){D();return}k+=t.size;p(h.TEMPORARY,k,z(function(F){F.root.getDirectory("saved",y,z(function(G){var H=function(){G.getFile(u,y,z(function(I){I.createWriter(z(function(J){J.onwriteend=function(K){w.location.href=I.toURL();b.push(I);v.readyState=v.DONE;q(v,"writeend",K)};J.onerror=function(){var K=J.error;if(K.code!==K.ABORT_ERR){D()}};"writestart progress write abort".split(" ").forEach(function(K){J["on"+K]=v["on"+K]});J.write(t);v.abort=function(){J.abort();v.readyState=v.DONE};v.readyState=v.WRITING}),D)}),D)};G.getFile(u,{create:false},z(function(I){I.remove();H()}),z(function(I){if(I.code===I.NOT_FOUND_ERR){H()}else{D()}}))}),D)}),D)},d=f.prototype,a=function(s,t){return new f(s,t)};d.abort=function(){var s=this;s.readyState=s.DONE;q(s,"abort")};d.readyState=d.INIT=0;d.WRITING=1;d.DONE=2;d.error=d.onwritestart=d.onprogress=d.onwrite=d.onabort=d.onerror=d.onwriteend=null;h.addEventListener("unload",i,false);return a}(self));
|
||||
File diff suppressed because one or more lines are too long
@@ -1,20 +0,0 @@
|
||||
|
||||
// To add a setting, you MUST define a default.
|
||||
// THESE ARE ONLY DEFAULTS. They are overridden by config.js in the root directory
|
||||
var Settings = function (s) {
|
||||
var _d = {
|
||||
elasticsearch : "http://"+window.location.hostname+":9200",
|
||||
modules : [],
|
||||
kibana_index : 'kibana-int'
|
||||
}
|
||||
|
||||
// This initializes a new hash on purpose, to avoid adding parameters to
|
||||
// config.js without providing sane defaults
|
||||
var _s = {};
|
||||
_.each(_d, function(v, k) {
|
||||
_s[k] = typeof s[k] !== 'undefined' ? s[k] : _d[k];
|
||||
});
|
||||
|
||||
return _s;
|
||||
|
||||
};
|
||||
Vendored
-1
File diff suppressed because one or more lines are too long
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
|
||||
elasticsearch: URL to your elasticsearch server. You almost certainly don't
|
||||
want 'http://localhost:9200' here. Even if Kibana and ES are on
|
||||
the same host
|
||||
kibana_index: The default ES index to use for storing Kibana specific object
|
||||
such as stored dashboards
|
||||
modules: Panel modules to load. In the future these will be inferred
|
||||
from your initial dashboard, though if you share dashboards you
|
||||
will probably need to list them all here
|
||||
|
||||
If you need to configure the default dashboard, please see dashboards/default
|
||||
|
||||
*/
|
||||
var config = new Settings(
|
||||
{
|
||||
// By default this will attempt to reach ES at the same host you have
|
||||
// elasticsearch installed on. You probably want to set it to the FQDN of your
|
||||
// elasticsearch host
|
||||
elasticsearch: "http://"+window.location.hostname+":9200",
|
||||
// elasticsearch: 'http://localhost:9200',
|
||||
kibana_index: "kibana-int",
|
||||
modules: ['histogram','map','pie','table','filtering',
|
||||
'timepicker','text','fields','hits','dashcontrol',
|
||||
'column','derivequeries','trends','bettermap','query',
|
||||
'terms'],
|
||||
}
|
||||
);
|
||||
Executable
+2094
File diff suppressed because one or more lines are too long
+483
@@ -0,0 +1,483 @@
|
||||
(function(e,t){function n(e){var t=dt[e]={};return Y.each(e.split(tt),function(e,n){t[n]=!0}),t}function r(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(mt,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:vt.test(r)?Y.parseJSON(r):r}catch(s){}Y.data(e,n,r)}else r=t}return r}function i(e){var t;for(t in e){if(t==="data"&&Y.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function s(){return!1}function o(){return!0}function u(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function a(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function f(e,t,n){t=t||0;if(Y.isFunction(t))return Y.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return Y.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=Y.grep(e,function(e){return e.nodeType===1});if(Bt.test(t))return Y.filter(t,r,!n);t=Y.filter(t,r)}return Y.grep(e,function(e,r){return Y.inArray(e,t)>=0===
|
||||
n})}function l(e){var t=It.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function c(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function h(e,t){if(t.nodeType!==1||!Y.hasData(e))return;var n,r,i,s=Y._data(e),o=Y._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r<i;r++)Y.event.add(t,n,u[n][r])}o.data&&(o.data=Y.extend({},o.data))}function p(e,t){var n;if(t.nodeType!==1)return;t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),n==="object"?(t.parentNode&&(t.outerHTML=e.outerHTML),Y.support.html5Clone&&e.innerHTML&&!Y.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):n==="input"&&Kt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):n==="option"?t.selected=e.defaultSelected:n==="input"||n==="textarea"?t.defaultValue=e.defaultValue:n==="script"&&t.text!==e.text&&
|
||||
(t.text=e.text),t.removeAttribute(Y.expando)}function d(e){return typeof e.getElementsByTagName!="undefined"?e.getElementsByTagName("*"):typeof e.querySelectorAll!="undefined"?e.querySelectorAll("*"):[]}function v(e){Kt.test(e.type)&&(e.defaultChecked=e.checked)}function m(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=gn.length;while(i--){t=gn[i]+n;if(t in e)return t}return r}function g(e,t){return e=t||e,Y.css(e,"display")==="none"||!Y.contains(e.ownerDocument,e)}function y(e,t){var n,r,i=[],s=0,o=e.length;for(;s<o;s++){n=e[s];if(!n.style)continue;i[s]=Y._data(n,"olddisplay"),t?(!i[s]&&n.style.display==="none"&&(n.style.display=""),n.style.display===""&&g(n)&&(i[s]=Y._data(n,"olddisplay",S(n.nodeName)))):(r=nn(n,"display"),!i[s]&&r!=="none"&&Y._data(n,"olddisplay",r))}for(s=0;s<o;s++){n=e[s];if(!n.style)continue;if(!t||n.style.display==="none"||n.style.display==="")n.style.display=t?i[s]||"":"none"}return e}function b(e,t,n){var r=ln.exec(t);return r?Math.max
|
||||
(0,r[1]-(n||0))+(r[2]||"px"):t}function w(e,t,n,r){var i=n===(r?"border":"content")?4:t==="width"?1:0,s=0;for(;i<4;i+=2)n==="margin"&&(s+=Y.css(e,n+mn[i],!0)),r?(n==="content"&&(s-=parseFloat(nn(e,"padding"+mn[i]))||0),n!=="margin"&&(s-=parseFloat(nn(e,"border"+mn[i]+"Width"))||0)):(s+=parseFloat(nn(e,"padding"+mn[i]))||0,n!=="padding"&&(s+=parseFloat(nn(e,"border"+mn[i]+"Width"))||0));return s}function E(e,t,n){var r=t==="width"?e.offsetWidth:e.offsetHeight,i=!0,s=Y.support.boxSizing&&Y.css(e,"boxSizing")==="border-box";if(r<=0){r=nn(e,t);if(r<0||r==null)r=e.style[t];if(cn.test(r))return r;i=s&&(Y.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+w(e,t,n||(s?"border":"content"),i)+"px"}function S(e){if(pn[e])return pn[e];var t=Y("<"+e+">").appendTo(R.body),n=t.css("display");t.remove();if(n==="none"||n===""){rn=R.body.appendChild(rn||Y.extend(R.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!sn||!rn.createElement)sn=(rn.contentWindow||rn.contentDocument
|
||||
).document,sn.write("<!doctype html><html><body>"),sn.close();t=sn.body.appendChild(sn.createElement(e)),n=nn(t,"display"),R.body.removeChild(rn)}return pn[e]=n,n}function x(e,t,n,r){var i;if(Y.isArray(t))Y.each(t,function(t,i){n||wn.test(e)?r(e,i):x(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&Y.type(t)==="object")for(i in t)x(e+"["+i+"]",t[i],n,r);else r(e,t)}function T(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(tt),u=0,a=o.length;if(Y.isFunction(n))for(;u<a;u++)r=o[u],s=/^\+/.test(r),s&&(r=r.substr(1)||"*"),i=e[r]=e[r]||[],i[s?"unshift":"push"](n)}}function N(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;var u,a=e[s],f=0,l=a?a.length:0,c=e===Bn;for(;f<l&&(c||!u);f++)u=a[f](n,r,i),typeof u=="string"&&(!c||o[u]?u=t:(n.dataTypes.unshift(u),u=N(e,n,r,i,u,o)));return(c||!u)&&!o["*"]&&(u=N(e,n,r,i,"*",o)),u}function C(e,n){var r,i,s=Y.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((s[r]?e:i||(i={}))[r]=n[r]);i&&Y.extend(!0,e
|
||||
,i)}function k(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes,l=e.responseFields;for(s in l)s in r&&(n[l[s]]=r[s]);while(f[0]==="*")f.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("content-type"));if(i)for(s in a)if(a[s]&&a[s].test(i)){f.unshift(s);break}if(f[0]in r)o=f[0];else{for(s in r){if(!f[0]||e.converters[s+" "+f[0]]){o=s;break}u||(u=s)}o=o||u}if(o)return o!==f[0]&&f.unshift(o),r[o]}function L(e,t){var n,r,i,s,o=e.dataTypes.slice(),u=o[0],a={},f=0;e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(o[1])for(n in e.converters)a[n.toLowerCase()]=e.converters[n];for(;i=o[++f];)if(i!=="*"){if(u!=="*"&&u!==i){n=a[u+" "+i]||a["* "+i];if(!n)for(r in a){s=r.split(" ");if(s[1]===i){n=a[u+" "+s[0]]||a["* "+s[0]];if(n){n===!0?n=a[r]:a[r]!==!0&&(i=s[0],o.splice(f--,0,i));break}}}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(l){return{state:"parsererror",error:n?l:"No conversion from "+u+" to "+i}}}u=i}return{state:"success",data:t}}function A(){try{return new e.XMLHttpRequest}catch(
|
||||
t){}}function O(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function M(){return setTimeout(function(){$n=t},0),$n=Y.now()}function _(e,t){Y.each(t,function(t,n){var r=(Zn[t]||[]).concat(Zn["*"]),i=0,s=r.length;for(;i<s;i++)if(r[i].call(e,t,n))return})}function D(e,t,n){var r,i=0,s=0,o=Yn.length,u=Y.Deferred().always(function(){delete a.elem}),a=function(){var t=$n||M(),n=Math.max(0,f.startTime+f.duration-t),r=1-(n/f.duration||0),i=0,s=f.tweens.length;for(;i<s;i++)f.tweens[i].run(r);return u.notifyWith(e,[f,r,n]),r<1&&s?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:Y.extend({},t),opts:Y.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:$n||M(),duration:n.duration,tweens:[],createTween:function(t,n,r){var i=Y.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(i),i},stop:function(t){var n=0,r=t?f.tweens.length:0;for(;n<r;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this
|
||||
}}),l=f.props;P(l,f.opts.specialEasing);for(;i<o;i++){r=Yn[i].call(f,e,l,f.opts);if(r)return r}return _(f,l),Y.isFunction(f.opts.start)&&f.opts.start.call(e,f),Y.fx.timer(Y.extend(a,{anim:f,queue:f.opts.queue,elem:e})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function P(e,t){var n,r,i,s,o;for(n in e){r=Y.camelCase(n),i=t[r],s=e[n],Y.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=Y.cssHooks[r];if(o&&"expand"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}}function H(e,t,n){var r,i,s,o,u,a,f,l,c=this,h=e.style,p={},d=[],v=e.nodeType&&g(e);n.queue||(f=Y._queueHooks(e,"fx"),f.unqueued==null&&(f.unqueued=0,l=f.empty.fire,f.empty.fire=function(){f.unqueued||l()}),f.unqueued++,c.always(function(){c.always(function(){f.unqueued--,Y.queue(e,"fx").length||f.empty.fire()})})),e.nodeType===1&&("height"in t||"width"in t)&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],Y.css(e,"display")==="inline"&&
|
||||
Y.css(e,"float")==="none"&&(!Y.support.inlineBlockNeedsLayout||S(e.nodeName)==="inline"?h.display="inline-block":h.zoom=1)),n.overflow&&(h.overflow="hidden",Y.support.shrinkWrapBlocks||c.done(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]}));for(r in t){s=t[r];if(Kn.exec(s)){delete t[r];if(s===(v?"hide":"show"))continue;d.push(r)}}o=d.length;if(o){u=Y._data(e,"fxshow")||Y._data(e,"fxshow",{}),v?Y(e).show():c.done(function(){Y(e).hide()}),c.done(function(){var t;Y.removeData(e,"fxshow",!0);for(t in p)Y.style(e,t,p[t])});for(r=0;r<o;r++)i=d[r],a=c.createTween(i,v?u[i]:0),p[i]=u[i]||Y.style(e,i),i in u||(u[i]=a.start,v&&(a.end=a.start,a.start=i==="width"||i==="height"?1:0))}}function B(e,t,n,r,i){return new B.prototype.init(e,t,n,r,i)}function j(e,t){var n,r={height:e},i=0;for(;i<4;i+=2-t)n=mn[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function F(e){return Y.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var I
|
||||
,q,R=e.document,U=e.location,z=e.navigator,W=e.jQuery,X=e.$,V=Array.prototype.push,$=Array.prototype.slice,J=Array.prototype.indexOf,K=Object.prototype.toString,Q=Object.prototype.hasOwnProperty,G=String.prototype.trim,Y=function(e,t){return new Y.fn.init(e,t,I)},Z=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,et=/\S/,tt=/\s+/,nt=et.test(" ")?/^[\s\xA0]+|[\s\xA0]+$/g:/^\s+|\s+$/g,rt=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,it=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,st=/^[\],:{}\s]*$/,ot=/(?:^|:|,)(?:\s*\[)+/g,ut=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,at=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,ft=/^-ms-/,lt=/-([\da-z])/gi,ct=function(e,t){return(t+"").toUpperCase()},ht=function(){R.addEventListener?(R.removeEventListener("DOMContentLoaded",ht,!1),Y.ready()):R.readyState==="complete"&&(R.detachEvent("onreadystatechange",ht),Y.ready())},pt={};Y.fn=Y.prototype={constructor:Y,init:function(e,n,r){var i,s,o,u;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this
|
||||
.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?i=[null,e,null]:i=rt.exec(e);if(i&&(i[1]||!n)){if(i[1])return n=n instanceof Y?n[0]:n,u=n&&n.nodeType?n.ownerDocument||n:R,e=Y.parseHTML(i[1],u,!0),it.test(i[1])&&Y.isPlainObject(n)&&this.attr.call(e,n,!0),Y.merge(this,e);s=R.getElementById(i[2]);if(s&&s.parentNode){if(s.id!==i[2])return r.find(e);this.length=1,this[0]=s}return this.context=R,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return Y.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),Y.makeArray(e,this))},selector:"",jquery:"1.8.0",length:0,size:function(){return this.length},toArray:function(){return $.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=Y.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" "
|
||||
:"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return Y.each(this,e,t)},ready:function(e){return Y.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack($.apply(this,arguments),"slice",$.call(arguments).join(","))},map:function(e){return this.pushStack(Y.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:V,sort:[].sort,splice:[].splice},Y.fn.init.prototype=Y.fn,Y.extend=Y.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!Y.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a<f;a++)if((e=arguments[a])!=null)for(n in e){r=u[n],i=e[n];if(u===i)continue;l&&i&&(Y.isPlainObject(i)||(s=Y.isArray(i)))?(s?(s=!1,o=r&&Y.isArray(r)?r:[]):o=r&&Y.isPlainObject
|
||||
(r)?r:{},u[n]=Y.extend(l,o,i)):i!==t&&(u[n]=i)}return u},Y.extend({noConflict:function(t){return e.$===Y&&(e.$=X),t&&e.jQuery===Y&&(e.jQuery=W),Y},isReady:!1,readyWait:1,holdReady:function(e){e?Y.readyWait++:Y.ready(!0)},ready:function(e){if(e===!0?--Y.readyWait:Y.isReady)return;if(!R.body)return setTimeout(Y.ready,1);Y.isReady=!0;if(e!==!0&&--Y.readyWait>0)return;q.resolveWith(R,[Y]),Y.fn.trigger&&Y(R).trigger("ready").off("ready")},isFunction:function(e){return Y.type(e)==="function"},isArray:Array.isArray||function(e){return Y.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):pt[K.call(e)]||"object"},isPlainObject:function(e){if(!e||Y.type(e)!=="object"||e.nodeType||Y.isWindow(e))return!1;try{if(e.constructor&&!Q.call(e,"constructor")&&!Q.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||Q.call(e,r)},isEmptyObject
|
||||
:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||R,(r=it.exec(e))?[t.createElement(r[1])]:(r=Y.buildFragment([e],t,n?null:[]),Y.merge([],(r.cacheable?Y.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=Y.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(st.test(t.replace(ut,"@").replace(at,"]").replace(ot,"")))return(new Function("return "+t))();Y.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&Y.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&et.test(t)&&(e.execScript||function(t){e.eval.call
|
||||
(e,t)})(t)},camelCase:function(e){return e.replace(ft,"ms-").replace(lt,ct)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toUpperCase()===t.toUpperCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||Y.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s<o;)if(n.apply(e[s++],r)===!1)break}else if(u){for(i in e)if(n.call(e[i],i,e[i])===!1)break}else for(;s<o;)if(n.call(e[s],s,e[s++])===!1)break;return e},trim:G?function(e){return e==null?"":G.call(e)}:function(e){return e==null?"":e.toString().replace(nt,"")},makeArray:function(e,t){var n,r=t||[];return e!=null&&(n=Y.type(e),e.length==null||n==="string"||n==="function"||n==="regexp"||Y.isWindow(e)?V.call(r,e):Y.merge(r,e)),r},inArray:function(e,t,n){var r;if(t){if(J)return J.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if(typeof r=="number")for(;s<r;s++)e[i++]=n[s];else while(n[s]!==t)e[i++]=
|
||||
n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;n=!!n;for(;s<o;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,n,r){var i,s,o=[],u=0,a=e.length,f=e instanceof Y||a!==t&&typeof a=="number"&&(a>0&&e[0]&&e[a-1]||a===0||Y.isArray(e));if(f)for(;u<a;u++)i=n(e[u],u,r),i!=null&&(o[o.length]=i);else for(s in e)i=n(e[s],s,r),i!=null&&(o[o.length]=i);return o.concat.apply([],o)},guid:1,proxy:function(e,n){var r,i,s;return typeof n=="string"&&(r=e[n],n=e,e=r),Y.isFunction(e)?(i=$.call(arguments,2),s=function(){return e.apply(n,i.concat($.call(arguments)))},s.guid=e.guid=e.guid||s.guid||Y.guid++,s):t},access:function(e,n,r,i,s,o,u){var a,f=r==null,l=0,c=e.length;if(r&&typeof r=="object"){for(l in r)Y.access(e,n,l,r[l],1,o,i);s=1}else if(i!==t){a=u===t&&Y.isFunction(i),f&&(a?(a=n,n=function(e,t,n){return a.call(Y(e),n)}):(n.call(e,i),n=null));if(n)for(;l<c;l++)n(e[l],r,a?i.call(e[l],l,n(e[l],r)):i,u);s=1}return s?e:f?n.call(e):c?n(e[0],r):o},now:function(){return(new
|
||||
Date).getTime()}}),Y.ready.promise=function(t){if(!q){q=Y.Deferred();if(R.readyState==="complete"||R.readyState!=="loading"&&R.addEventListener)setTimeout(Y.ready,1);else if(R.addEventListener)R.addEventListener("DOMContentLoaded",ht,!1),e.addEventListener("load",Y.ready,!1);else{R.attachEvent("onreadystatechange",ht),e.attachEvent("onload",Y.ready);var n=!1;try{n=e.frameElement==null&&R.documentElement}catch(r){}n&&n.doScroll&&function i(){if(!Y.isReady){try{n.doScroll("left")}catch(e){return setTimeout(i,50)}Y.ready()}}()}}return q.promise(t)},Y.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){pt["[object "+t+"]"]=t.toLowerCase()}),I=Y(R);var dt={};Y.Callbacks=function(e){e=typeof e=="string"?dt[e]||n(e):Y.extend({},e);var r,i,s,o,u,a,f=[],l=!e.once&&[],c=function(t){r=e.memory&&t,i=!0,a=o||0,o=0,u=f.length,s=!0;for(;f&&a<u;a++)if(f[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}s=!1,f&&(l?l.length&&c(l.shift()):r?f=[]:h.disable())},h={add:function(
|
||||
){if(f){var t=f.length;(function n(t){Y.each(t,function(t,r){Y.isFunction(r)&&(!e.unique||!h.has(r))?f.push(r):r&&r.length&&n(r)})})(arguments),s?u=f.length:r&&(o=t,c(r))}return this},remove:function(){return f&&Y.each(arguments,function(e,t){var n;while((n=Y.inArray(t,f,n))>-1)f.splice(n,1),s&&(n<=u&&u--,n<=a&&a--)}),this},has:function(e){return Y.inArray(e,f)>-1},empty:function(){return f=[],this},disable:function(){return f=l=r=t,this},disabled:function(){return!f},lock:function(){return l=t,r||h.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],f&&(!i||l)&&(s?l.push(t):c(t)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!i}};return h},Y.extend({Deferred:function(e){var t=[["resolve","done",Y.Callbacks("once memory"),"resolved"],["reject","fail",Y.Callbacks("once memory"),"rejected"],["notify","progress",Y.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){
|
||||
return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return Y.Deferred(function(n){Y.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](Y.isFunction(o)?function(){var e=o.apply(this,arguments);e&&Y.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return typeof e=="object"?Y.extend(e,r):r}},i={};return r.pipe=r.then,Y.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=$.call(arguments),r=n.length,i=r!==1||e&&Y.isFunction(e.promise)?r:0,s=i===1?e:Y.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?$.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t<r;t++)n[t]&&Y.isFunction(n[t].promise
|
||||
)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i}return i||s.resolveWith(f,n),s.promise()}}),Y.support=function(){var t,n,r,i,s,o,u,a,f,l,c,h=R.createElement("div");h.setAttribute("className","t"),h.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=h.getElementsByTagName("*"),r=h.getElementsByTagName("a")[0],r.style.cssText="top:1px;float:left;opacity:.5";if(!n||!n.length||!r)return{};i=R.createElement("select"),s=i.appendChild(R.createElement("option")),o=h.getElementsByTagName("input")[0],t={leadingWhitespace:h.firstChild.nodeType===3,tbody:!h.getElementsByTagName("tbody").length,htmlSerialize:!!h.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:o.value==="on",optSelected:s.selected,getSetAttribute:h.className!=="t",enctype:!!R.createElement("form").enctype,html5Clone:R.createElement("nav"
|
||||
).cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:R.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,i.disabled=!0,t.optDisabled=!s.disabled;try{delete h.test}catch(p){t.deleteExpando=!1}!h.addEventListener&&h.attachEvent&&h.fireEvent&&(h.attachEvent("onclick",c=function(){t.noCloneEvent=!1}),h.cloneNode(!0).fireEvent("onclick"),h.detachEvent("onclick",c)),o=R.createElement("input"),o.value="t",o.setAttribute("type","radio"),t.radioValue=o.value==="t",o.setAttribute("checked","checked"),o.setAttribute("name","t"),h.appendChild(o),u=R.createDocumentFragment(),u.appendChild(h.lastChild),t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=o.checked,u.removeChild(o),u.appendChild(h);if(h.attachEvent)for(f in{submit:!0,change:!0,focusin:!0})a="on"+
|
||||
f,l=a in h,l||(h.setAttribute(a,"return;"),l=typeof h[a]=="function"),t[f+"Bubbles"]=l;return Y(function(){var n,r,i,s,o="padding:0;margin:0;border:0;display:block;overflow:hidden;",u=R.getElementsByTagName("body")[0];if(!u)return;n=R.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",u.insertBefore(n,u.firstChild),r=R.createElement("div"),n.appendChild(r),r.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=r.getElementsByTagName("td"),i[0].style.cssText="padding:0;margin:0;border:0;display:none",l=i[0].offsetHeight===0,i[0].style.display="",i[1].style.display="none",t.reliableHiddenOffsets=l&&i[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=u.offsetTop!==1,e.getComputedStyle&&(
|
||||
t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",s=R.createElement("div"),s.style.cssText=r.style.cssText=o,s.style.marginRight=s.style.width="0",r.style.width="1px",r.appendChild(s),t.reliableMarginRight=!parseFloat((e.getComputedStyle(s,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=o+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="<div></div>",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),u.removeChild(n),n=r=i=s=null}),u.removeChild(h),n=r=i=s=o=u=h=null,t}();var vt=/^(?:\{.*\}|\[.*\])$/,mt=/([A-Z])/g;Y.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(Y.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.
|
||||
nodeType?Y.cache[e[Y.expando]]:e[Y.expando],!!e&&!i(e)},data:function(e,n,r,i){if(!Y.acceptData(e))return;var s,o,u=Y.expando,a=typeof n=="string",f=e.nodeType,l=f?Y.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=Y.deletedIds.pop()||++Y.uuid:c=u),l[c]||(l[c]={},f||(l[c].toJSON=Y.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=Y.extend(l[c],n):l[c].data=Y.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[Y.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[Y.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!Y.acceptData(e))return;var r,s,o,u=e.nodeType,a=u?Y.cache:e,f=u?e[Y.expando]:Y.expando;if(!a[f])return;if(t){r=n?a[f]:a[f].data;if(r){Y.isArray(t)||(t in r?t=[t]:(t=Y.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(s=0,o=t.length;s<o;s++)delete r[t[s]];if(!(n?i:Y.isEmptyObject)(r))return}}if(!n){delete a[f].data;if(!i(a[f]))return}u?Y.cleanData([e],!0):Y.support.deleteExpando||a!=a.window?delete a[f]:a[f]=null},_data
|
||||
:function(e,t,n){return Y.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&Y.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),Y.fn.extend({data:function(e,n){var i,s,o,u,a,f=this[0],l=0,c=null;if(e===t){if(this.length){c=Y.data(f);if(f.nodeType===1&&!Y._data(f,"parsedAttrs")){o=f.attributes;for(a=o.length;l<a;l++)u=o[l].name,u.indexOf("data-")===0&&(u=Y.camelCase(u.substring(5)),r(f,u,c[u]));Y._data(f,"parsedAttrs",!0)}}return c}return typeof e=="object"?this.each(function(){Y.data(this,e)}):(i=e.split(".",2),i[1]=i[1]?"."+i[1]:"",s=i[1]+"!",Y.access(this,function(n){if(n===t)return c=this.triggerHandler("getData"+s,[i[0]]),c===t&&f&&(c=Y.data(f,e),c=r(f,e,c)),c===t&&i[1]?this.data(i[0]):c;i[1]=n,this.each(function(){var t=Y(this);t.triggerHandler("setData"+s,i),Y.data(this,e,n),t.triggerHandler("changeData"+s,i)})},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){Y.removeData(this,e)})}}),Y.extend({queue:
|
||||
function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y._data(e,t),n&&(!r||Y.isArray(n)?r=Y._data(e,t,Y.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=Y.queue(e,t),r=n.shift(),i=Y._queueHooks(e,t),s=function(){Y.dequeue(e,t)};r==="inprogress"&&(r=n.shift()),r&&(t==="fx"&&n.unshift("inprogress"),delete i.stop,r.call(e,s,i)),!n.length&&i&&i.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y._data(e,n)||Y._data(e,n,{empty:Y.Callbacks("once memory").add(function(){Y.removeData(e,t+"queue",!0),Y.removeData(e,n,!0)})})}}),Y.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?Y.queue(this[0],e):n===t?this:this.each(function(){var t=Y.queue(this,e,n);Y._queueHooks(this,e),e==="fx"&&t[0]!=="inprogress"&&Y.dequeue(this,e)})},dequeue:function(e){return this.each(function(){Y.dequeue(this,e)})},delay:function(e,t){return e=Y.fx?Y.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);
|
||||
n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,s=Y.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};typeof e!="string"&&(n=e,e=t),e=e||"fx";while(u--)(r=Y._data(o[u],e+"queueHooks"))&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(n)}});var gt,yt,bt,wt=/[\t\r\n]/g,Et=/\r/g,St=/^(?:button|input)$/i,xt=/^(?:button|input|object|select|textarea)$/i,Tt=/^a(?:rea|)$/i,Nt=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,Ct=Y.support.getSetAttribute;Y.fn.extend({attr:function(e,t){return Y.access(this,Y.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){Y.removeAttr(this,e)})},prop:function(e,t){return Y.access(this,Y.prop,e,t,arguments.length>1)},removeProp:function(e){return e=Y.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r
|
||||
,i,s,o,u;if(Y.isFunction(e))return this.each(function(t){Y(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(tt);for(n=0,r=this.length;n<r;n++){i=this[n];if(i.nodeType===1)if(!i.className&&t.length===1)i.className=e;else{s=" "+i.className+" ";for(o=0,u=t.length;o<u;o++)~s.indexOf(" "+t[o]+" ")||(s+=t[o]+" ");i.className=Y.trim(s)}}}return this},removeClass:function(e){var n,r,i,s,o,u,a;if(Y.isFunction(e))return this.each(function(t){Y(this).removeClass(e.call(this,t,this.className))});if(e&&typeof e=="string"||e===t){n=(e||"").split(tt);for(u=0,a=this.length;u<a;u++){i=this[u];if(i.nodeType===1&&i.className){r=(" "+i.className+" ").replace(wt," ");for(s=0,o=n.length;s<o;s++)while(r.indexOf(" "+n[s]+" ")>-1)r=r.replace(" "+n[s]+" "," ");i.className=e?Y.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return Y.isFunction(e)?this.each(function(n){Y(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(
|
||||
){if(n==="string"){var i,s=0,o=Y(this),u=t,a=e.split(tt);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&Y._data(this,"__className__",this.className),this.className=this.className||e===!1?"":Y._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(wt," ").indexOf(t)>-1)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=Y.valHooks[s.type]||Y.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(Et,""):r==null?"":r);return}return i=Y.isFunction(e),this.each(function(r){var s,o=Y(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":Y.isArray(s)&&(s=Y.map(s,function(e){return e==null?"":e+""})),n=Y.valHooks[this.type]||Y.valHooks[this.nodeName.toLowerCase()];if(!
|
||||
n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),Y.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r,i,s=e.selectedIndex,o=[],u=e.options,a=e.type==="select-one";if(s<0)return null;n=a?s:0,r=a?s+1:u.length;for(;n<r;n++){i=u[n];if(i.selected&&(Y.support.optDisabled?!i.disabled:i.getAttribute("disabled")===null)&&(!i.parentNode.disabled||!Y.nodeName(i.parentNode,"optgroup"))){t=Y(i).val();if(a)return t;o.push(t)}}return a&&!o.length&&u.length?Y(u[s]).val():o},set:function(e,t){var n=Y.makeArray(t);return Y(e).find("option").each(function(){this.selected=Y.inArray(Y(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&Y.isFunction(Y.fn[n]))return Y(e)[n](r);if(typeof e.getAttribute=="undefined")return Y.prop(e,n,r);u=a!==1||!Y.isXMLDoc(e),u&&(n=n.toLowerCase(),o=Y.attrHooks[n]||(Nt.test(n)?yt
|
||||
:gt));if(r!==t){if(r===null){Y.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,""+r),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(tt);for(;o<r.length;o++)i=r[o],i&&(n=Y.propFix[i]||i,s=Nt.test(i),s||Y.attr(e,i,""),e.removeAttribute(Ct?i:n),s&&n in e&&(e[n]=!1))}},attrHooks:{type:{set:function(e,t){if(St.test(e.nodeName)&&e.parentNode)Y.error("type property can't be changed");else if(!Y.support.radioValue&&t==="radio"&&Y.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return gt&&Y.nodeName(e,"button")?gt.get(e,t):t in e?e.value:null},set:function(e,t,n){if(gt&&Y.nodeName(e,"button"))return gt.set(e,t,n);e.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",
|
||||
rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2)return;return o=u!==1||!Y.isXMLDoc(e),o&&(n=Y.propFix[n]||n,s=Y.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&(i=s.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):xt.test(e.nodeName)||Tt.test(e.nodeName)&&e.href?0:t}}}}),yt={get:function(e,n){var r,i=Y.prop(e,n);return i===!0||typeof i!="boolean"&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?Y.removeAttr(e,n):(r=Y.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},Ct||(bt={name:!0,id:!0,coords:!0},gt=Y.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(bt[n]?r.value!=="":r.specified)?r.value:t},set:function(e,t,n){var r=e.getAttributeNode
|
||||
(n);return r||(r=R.createAttribute(n),e.setAttributeNode(r)),r.value=t+""}},Y.each(["width","height"],function(e,t){Y.attrHooks[t]=Y.extend(Y.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})}),Y.attrHooks.contenteditable={get:gt.get,set:function(e,t,n){t===""&&(t="false"),gt.set(e,t,n)}}),Y.support.hrefNormalized||Y.each(["href","src","width","height"],function(e,n){Y.attrHooks[n]=Y.extend(Y.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r===null?t:r}})}),Y.support.style||(Y.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=""+t}}),Y.support.optSelected||(Y.propHooks.selected=Y.extend(Y.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),Y.support.enctype||(Y.propFix.enctype="encoding"),Y.support.checkOn||Y.each(["radio","checkbox"],function(){Y.valHooks[this]={get:function(e){return e.getAttribute
|
||||
("value")===null?"on":e.value}}}),Y.each(["radio","checkbox"],function(){Y.valHooks[this]=Y.extend(Y.valHooks[this],{set:function(e,t){if(Y.isArray(t))return e.checked=Y.inArray(Y(e).val(),t)>=0}})});var kt=/^(?:textarea|input|select)$/i,Lt=/^([^\.]*|)(?:\.(.+)|)$/,At=/(?:^|\s)hover(\.\S+|)\b/,Ot=/^key/,Mt=/^(?:mouse|contextmenu)|click/,_t=/^(?:focusinfocus|focusoutblur)$/,Dt=function(e){return Y.event.special.hover?e:e.replace(At,"mouseenter$1 mouseleave$1")};Y.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,v,m;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=Y._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=Y.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof Y=="undefined"||!!e&&Y.event.triggered===e.type?t:Y.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=Y.trim(Dt(n)).split(" ");for(f=0;f<n.length;f++){l=Lt.exec(n[f])||[],c=l[1],h=(l[2]||"").split(".").sort(),m=Y.event.special[c]||{},c=(s?m.delegateType:m.bindType
|
||||
)||c,m=Y.event.special[c]||{},p=Y.extend({type:c,origType:l[1],data:i,handler:r,guid:r.guid,selector:s,namespace:h.join(".")},d),v=a[c];if(!v){v=a[c]=[],v.delegateCount=0;if(!m.setup||m.setup.call(e,i,h,u)===!1)e.addEventListener?e.addEventListener(c,u,!1):e.attachEvent&&e.attachEvent("on"+c,u)}m.add&&(m.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),s?v.splice(v.delegateCount++,0,p):v.push(p),Y.event.global[c]=!0}e=null},global:{},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,v,m=Y.hasData(e)&&Y._data(e);if(!m||!(h=m.events))return;t=Y.trim(Dt(t||"")).split(" ");for(s=0;s<t.length;s++){o=Lt.exec(t[s])||[],u=a=o[1],f=o[2];if(!u){for(u in h)Y.event.remove(e,u+t[s],n,r,!0);continue}p=Y.event.special[u]||{},u=(r?p.delegateType:p.bindType)||u,d=h[u]||[],l=d.length,f=f?new RegExp("(^|\\.)"+f.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(c=0;c<d.length;c++)v=d[c],(i||a===v.origType)&&(!n||n.guid===v.guid)&&(!f||f.test(v.namespace))&&(!r||r===v.selector||r==="**"&&v.
|
||||
selector)&&(d.splice(c--,1),v.selector&&d.delegateCount--,p.remove&&p.remove.call(e,v));d.length===0&&l!==d.length&&((!p.teardown||p.teardown.call(e,f,m.handle)===!1)&&Y.removeEvent(e,u,m.handle),delete h[u])}Y.isEmptyObject(h)&&(delete m.handle,Y.removeData(e,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,i,s){if(!i||i.nodeType!==3&&i.nodeType!==8){var o,u,a,f,l,c,h,p,d,v,m=n.type||n,g=[];if(_t.test(m+Y.event.triggered))return;m.indexOf("!")>=0&&(m=m.slice(0,-1),u=!0),m.indexOf(".")>=0&&(g=m.split("."),m=g.shift(),g.sort());if((!i||Y.event.customEvent[m])&&!Y.event.global[m])return;n=typeof n=="object"?n[Y.expando]?n:new Y.Event(m,n):new Y.Event(m),n.type=m,n.isTrigger=!0,n.exclusive=u,n.namespace=g.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,c=m.indexOf(":")<0?"on"+m:"";if(!i){o=Y.cache;for(a in o)o[a].events&&o[a].events[m]&&Y.event.trigger(n,r,o[a].handle.elem,!0);return}n.result=t,n.target||
|
||||
(n.target=i),r=r!=null?Y.makeArray(r):[],r.unshift(n),h=Y.event.special[m]||{};if(h.trigger&&h.trigger.apply(i,r)===!1)return;d=[[i,h.bindType||m]];if(!s&&!h.noBubble&&!Y.isWindow(i)){v=h.delegateType||m,f=_t.test(v+m)?i:i.parentNode;for(l=i;f;f=f.parentNode)d.push([f,v]),l=f;l===(i.ownerDocument||R)&&d.push([l.defaultView||l.parentWindow||e,v])}for(a=0;a<d.length&&!n.isPropagationStopped();a++)f=d[a][0],n.type=d[a][1],p=(Y._data(f,"events")||{})[n.type]&&Y._data(f,"handle"),p&&p.apply(f,r),p=c&&f[c],p&&Y.acceptData(f)&&p.apply(f,r)===!1&&n.preventDefault();return n.type=m,!s&&!n.isDefaultPrevented()&&(!h._default||h._default.apply(i.ownerDocument,r)===!1)&&(m!=="click"||!Y.nodeName(i,"a"))&&Y.acceptData(i)&&c&&i[m]&&(m!=="focus"&&m!=="blur"||n.target.offsetWidth!==0)&&!Y.isWindow(i)&&(l=i[c],l&&(i[c]=null),Y.event.triggered=m,i[m](),Y.event.triggered=t,l&&(i[c]=l)),n.result}return},dispatch:function(n){n=Y.event.fix(n||e.event);var r,i,s,o,u,a,f,l,c,h,p,d=(Y._data(this,"events")||{})[n
|
||||
.type]||[],v=d.delegateCount,m=[].slice.call(arguments),g=!n.exclusive&&!n.namespace,y=Y.event.special[n.type]||{},b=[];m[0]=n,n.delegateTarget=this;if(y.preDispatch&&y.preDispatch.call(this,n)===!1)return;if(v&&(!n.button||n.type!=="click")){o=Y(this),o.context=this;for(s=n.target;s!=this;s=s.parentNode||this)if(s.disabled!==!0||n.type!=="click"){a={},l=[],o[0]=s;for(r=0;r<v;r++)c=d[r],h=c.selector,a[h]===t&&(a[h]=o.is(h)),a[h]&&l.push(c);l.length&&b.push({elem:s,matches:l})}}d.length>v&&b.push({elem:this,matches:d.slice(v)});for(r=0;r<b.length&&!n.isPropagationStopped();r++){f=b[r],n.currentTarget=f.elem;for(i=0;i<f.matches.length&&!n.isImmediatePropagationStopped();i++){c=f.matches[i];if(g||!n.namespace&&!c.namespace||n.namespace_re&&n.namespace_re.test(c.namespace))n.data=c.data,n.handleObj=c,u=((Y.event.special[c.origType]||{}).handle||c.handler).apply(f.elem,m),u!==t&&(n.result=u,u===!1&&(n.preventDefault(),n.stopPropagation()))}}return y.postDispatch&&y.postDispatch.call(this,n),
|
||||
n.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,s,o=n.button,u=n.fromElement;return e.pageX==null&&n.clientX!=null&&(r=e.target.ownerDocument||R,i=r.documentElement,s=r.body,e.pageX=n.clientX+(i&&i.scrollLeft||s&&s.scrollLeft||0)-(i&&i.clientLeft||s&&s.clientLeft||0),e.pageY=n.clientY+(i&&i.scrollTop||s&&s.scrollTop||0)-(i&&i.clientTop||s&&s.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),!e.which&&o!==t&&(e.which=o&1?1:o&2?3:o&4?2:0),e}},fix:function(e){if(e[Y.expando])return e;var t,n,r=e,i=Y.event.fixHooks
|
||||
[e.type]||{},s=i.props?this.props.concat(i.props):this.props;e=Y.Event(r);for(t=s.length;t;)n=s[--t],e[n]=r[n];return e.target||(e.target=r.srcElement||R),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,i.filter?i.filter(e,r):e},special:{ready:{setup:Y.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){Y.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=Y.extend(new Y.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?Y.event.trigger(i,null,t):Y.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},Y.event.handle=Y.event.dispatch,Y.removeEvent=R.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]=="undefined"&&(e[r]=null),e.detachEvent(r,n))},Y.Event=function(e,t){if(!(this instanceof
|
||||
Y.Event))return new Y.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?o:s):this.type=e,t&&Y.extend(this,t),this.timeStamp=e&&e.timeStamp||Y.now(),this[Y.expando]=!0},Y.Event.prototype={preventDefault:function(){this.isDefaultPrevented=o;var e=this.originalEvent;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=o;var e=this.originalEvent;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=o,this.stopPropagation()},isDefaultPrevented:s,isPropagationStopped:s,isImmediatePropagationStopped:s},Y.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){Y.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj,o=s.selector;if(!i||i!==r&&!Y.contains(r,i))e.type=
|
||||
s.origType,n=s.handler.apply(this,arguments),e.type=t;return n}}}),Y.support.submitBubbles||(Y.event.special.submit={setup:function(){if(Y.nodeName(this,"form"))return!1;Y.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=Y.nodeName(n,"input")||Y.nodeName(n,"button")?n.form:t;r&&!Y._data(r,"_submit_attached")&&(Y.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),Y._data(r,"_submit_attached",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&Y.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(Y.nodeName(this,"form"))return!1;Y.event.remove(this,"._submit")}}),Y.support.changeBubbles||(Y.event.special.change={setup:function(){if(kt.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")Y.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),Y.event.add(this,"click._change",function(e){this._just_changed&&!
|
||||
e.isTrigger&&(this._just_changed=!1),Y.event.simulate("change",this,e,!0)});return!1}Y.event.add(this,"beforeactivate._change",function(e){var t=e.target;kt.test(t.nodeName)&&!Y._data(t,"_change_attached")&&(Y.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&Y.event.simulate("change",this.parentNode,e,!0)}),Y._data(t,"_change_attached",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return Y.event.remove(this,"._change"),kt.test(this.nodeName)}}),Y.support.focusinBubbles||Y.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){Y.event.simulate(t,e.target,Y.event.fix(e),!0)};Y.event.special[t]={setup:function(){n++===0&&R.addEventListener(e,r,!0)},teardown:function(){--n===0&&R.removeEventListener(e,r,!0)}}}),Y.fn.extend({on:function(e,n,r,i,o){var u,a;if(typeof e=="object"){typeof n!="string"&&
|
||||
(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n=="string"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=s;else if(!i)return this;return o===1&&(u=i,i=function(e){return Y().off(e),u.apply(this,arguments)},i.guid=u.guid||(u.guid=Y.guid++)),this.each(function(){Y.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,Y(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if(typeof e=="object"){for(o in e)this.off(o,n,e[o]);return this}if(n===!1||typeof n=="function")r=n,n=t;return r===!1&&(r=s),this.each(function(){Y.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return Y(this.context).on(e,this.selector,t,n),this},die:function(e,t){return Y(this.context).off(e,this.selector||"**",t),this},delegate
|
||||
:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length==1?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){Y.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return Y.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||Y.guid++,r=0,i=function(n){var i=(Y._data(this,"lastToggle"+e.guid)||0)%r;return Y._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};i.guid=n;while(r<t.length)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),Y.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){Y.fn[t]=function(e,n){return n==null&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},Ot.test(t)&&(Y.event
|
||||
.fixHooks[t]=Y.event.keyHooks),Mt.test(t)&&(Y.event.fixHooks[t]=Y.event.mouseHooks)}),function(e,t){function n(e,t,n,r){var i=0,s=t.length;for(;i<s;i++)st(e,t[i],n,r)}function r(e,t,r,i,s,o){var u,a=ot.setFilters[t.toLowerCase()];return a||st.error(t),(e||!(u=s))&&n(e||"*",i,u=[],s),u.length>0?a(u,r,o):[]}function i(e,i,s,o,u){var a,f,l,c,h,p,d,v,m=0,g=u.length,y=W.POS,b=new RegExp("^"+y.source+"(?!"+T+")","i"),w=function(){var e=1,n=arguments.length-2;for(;e<n;e++)arguments[e]===t&&(a[e]=t)};for(;m<g;m++){y.exec(""),e=u[m],c=[],l=0,h=o;while(a=y.exec(e)){v=y.lastIndex=a.index+a[0].length;if(v>l){d=e.slice(l,a.index),l=v,p=[i],P.test(d)&&(h&&(p=h),h=o);if(f=q.test(d))d=d.slice(0,-5).replace(P,"$&*");a.length>1&&a[0].replace(b,w),h=r(d,a[1],a[2],p,h,f)}}h?(c=c.concat(h),(d=e.slice(l))&&d!==")"?P.test(d)?n(d,c,s,o):st(d,i,s,o?o.concat(h):h):S.apply(s,c)):st(e,i,s,o)}return g===1?s:st.uniqueSort(s)}function s(e,t,n){var r,i,s,o=[],u=0,a=B.exec(e),f=!a.pop()&&!a.pop(),l=f&&e.match(H)||[""],
|
||||
c=ot.preFilter,h=ot.filter,p=!n&&t!==v;for(;(i=l[u])!=null&&f;u++){o.push(r=[]),p&&(i=" "+i);while(i){f=!1;if(a=P.exec(i))i=i.slice(a[0].length),f=r.push({part:a.pop().replace(D," "),captures:a});for(s in h)(a=W[s].exec(i))&&(!c[s]||(a=c[s](a,t,n)))&&(i=i.slice(a.shift().length),f=r.push({part:s,captures:a}));if(!f)break}}return f||st.error(e),o}function o(e,t,n){var r=t.dir,i=w++;return e||(e=function(e){return e===n}),t.first?function(t,n){while(t=t[r])if(t.nodeType===1)return e(t,n)&&t}:function(t,n){var s,o=i+"."+c,u=o+"."+l;while(t=t[r])if(t.nodeType===1){if((s=t[x])===u)return t.sizset;if(typeof s=="string"&&s.indexOf(o)===0){if(t.sizset)return t}else{t[x]=u;if(e(t,n))return t.sizset=!0,t;t.sizset=!1}}}}function u(e,t){return e?function(n,r){var i=t(n,r);return i&&e(i===!0?n:i,r)}:t}function a(e,t,n){var r,i,s=0;for(;r=e[s];s++)ot.relative[r.part]?i=o(i,ot.relative[r.part],t):(r.captures.push(t,n),i=u(i,ot.filter[r.part].apply(null,r.captures)));return i}function f(e){return function(
|
||||
t,n){var r,i=0;for(;r=e[i];i++)if(r(t,n))return!0;return!1}}var l,c,h,p,d,v=e.document,m=v.documentElement,g="undefined",y=!1,b=!0,w=0,E=[].slice,S=[].push,x=("sizcache"+Math.random()).replace(".",""),T="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",C=N.replace("w","w#"),k="([*^$|!~]?=)",L="\\["+T+"*("+N+")"+T+"*(?:"+k+T+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+C+")|)|)"+T+"*\\]",A=":("+N+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)",O=":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)",M=T+"*([\\x20\\t\\r\\n\\f>+~])"+T+"*",_="(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|"+L+"|"+A.replace(2,7)+"|[^\\\\(),])+",D=new RegExp("^"+T+"+|((?:^|[^\\\\])(?:\\\\.)*)"+T+"+$","g"),P=new RegExp("^"+M),H=new RegExp(_+"?(?="+T+"*,|$)","g"),B=new RegExp("^(?:(?!,)(?:(?:^|,)"+T+"*"+_+")*?|"+T+"*(.*?))(\\)|$)"),j=new RegExp(_.slice(19,-6)+"\\x20\\t\\r\\n\\f>+~])+|"+M,"g"),F=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,I=/[\x20\t\r\n\f]*[+~]/
|
||||
,q=/:not\($/,R=/h\d/i,U=/input|select|textarea|button/i,z=/\\(?!\\)/g,W={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),NAME:new RegExp("^\\[name=['\"]?("+N+")['\"]?\\]"),TAG:new RegExp("^("+N.replace("[-","[-\\*")+")"),ATTR:new RegExp("^"+L),PSEUDO:new RegExp("^"+A),CHILD:new RegExp("^:(only|nth|last|first)-child(?:\\("+T+"*(even|odd|(([+-]|)(\\d*)n|)"+T+"*(?:([+-]|)"+T+"*(\\d+)|))"+T+"*\\)|)","i"),POS:new RegExp(O,"ig"),needsContext:new RegExp("^"+T+"*[>+~]|"+O,"i")},X={},V=[],$={},J=[],K=function(e){return e.sizzleFilter=!0,e},Q=function(e){return function(t){return t.nodeName.toLowerCase()==="input"&&t.type===e}},G=function(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}},Z=function(e){var t=!1,n=v.createElement("div");try{t=e(n)}catch(r){}return n=null,t},et=Z(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),tt=Z(function(e){e.id=x+0,e.innerHTML="<a name='"+
|
||||
x+"'></a><div name='"+x+"'></div>",m.insertBefore(e,m.firstChild);var t=v.getElementsByName&&v.getElementsByName(x).length===2+v.getElementsByName(x+0).length;return d=!v.getElementById(x),m.removeChild(e),t}),nt=Z(function(e){return e.appendChild(v.createComment("")),e.getElementsByTagName("*").length===0}),rt=Z(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==g&&e.firstChild.getAttribute("href")==="#"}),it=Z(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!e.getElementsByClassName||e.getElementsByClassName("e").length===0?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length!==1)}),st=function(e,t,n,r){n=n||[],t=t||v;var i,s,o,u,a=t.nodeType;if(a!==1&&a!==9)return[];if(!e||typeof e!="string")return n;o=at(t);if(!o&&!r)if(i=F.exec(e))if(u=i[1]){if(a===9){s=t.getElementById(u);if(!s||!s.parentNode)return n;if(s.id===u)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById
|
||||
(u))&&ft(t,s)&&s.id===u)return n.push(s),n}else{if(i[2])return S.apply(n,E.call(t.getElementsByTagName(e),0)),n;if((u=i[3])&&it&&t.getElementsByClassName)return S.apply(n,E.call(t.getElementsByClassName(u),0)),n}return ht(e,t,n,r,o)},ot=st.selectors={cacheLength:50,match:W,order:["ID","TAG"],attrHandle:{},createPseudo:K,find:{ID:d?function(e,t,n){if(typeof t.getElementById!==g&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==g&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==g&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:nt?function(e,t){if(typeof t.getElementsByTagName!==g)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e
|
||||
){return e[1]=e[1].replace(z,""),e[3]=(e[4]||e[5]||"").replace(z,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||st.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&st.error(e[0]),e},PSEUDO:function(e){var t,n=e[4];return W.CHILD.test(e[0])?null:(n&&(t=B.exec(n))&&t.pop()&&(e[0]=e[0].slice(0,t[0].length-n.length-1),n=t[0].slice(0,-1)),e.splice(2,3,n||e[3]),e)}},filter:{ID:d?function(e){return e=e.replace(z,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace(z,""),function(t){var n=typeof t.getAttributeNode!==g&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace(z,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=X[e];return t||(t=X[e]=new RegExp("(^|"+T+")"+e+"("+T+"|$)"),V.push(e),V.length>ot.cacheLength&&delete
|
||||
X[V.shift()]),function(e){return t.test(e.className||typeof e.getAttribute!==g&&e.getAttribute("class")||"")}},ATTR:function(e,t,n){return t?function(r){var i=st.attr(r,e),s=i+"";if(i==null)return t==="!=";switch(t){case"=":return s===n;case"!=":return s!==n;case"^=":return n&&s.indexOf(n)===0;case"*=":return n&&s.indexOf(n)>-1;case"$=":return n&&s.substr(s.length-n.length)===n;case"~=":return(" "+s+" ").indexOf(n)>-1;case"|=":return s===n||s.substr(0,n.length+1)===n+"-"}}:function(t){return st.attr(t,e)!=null}},CHILD:function(e,t,n,r){if(e==="nth"){var i=w++;return function(e){var t,s,o=0,u=e;if(n===1&&r===0)return!0;t=e.parentNode;if(t&&(t[x]!==i||!e.sizset)){for(u=t.firstChild;u;u=u.nextSibling)if(u.nodeType===1){u.sizset=++o;if(u===e)break}t[x]=i}return s=e.sizset-r,n===0?s===0:s%n===0&&s/n>=0}}return function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1
|
||||
)return!1;return!0}}},PSEUDO:function(e,t,n,r){var i=ot.pseudos[e]||ot.pseudos[e.toLowerCase()];return i||st.error("unsupported pseudo: "+e),i.sizzleFilter?i(t,n,r):i}},pseudos:{not:K(function(e,t,n){var r=ct(e.replace(D,"$1"),t,n);return function(e){return!r(e)}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!ot.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},contains:K(function(e){return function(t){return(t.textContent||t.innerText||lt(t)).indexOf(e)>-1}}),has:K(function(e){return function(t){return st(e,t).length>0}}),header:function(e){return R.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&
|
||||
(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:Q("radio"),checkbox:Q("checkbox"),file:Q("file"),password:Q("password"),image:Q("image"),submit:G("submit"),reset:G("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return U.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&(!!e.type||!!e.href)},active:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(e,t,n){return n?e.slice(1):[e[0]]},last:function(e,t,n){var r=e.pop();return n?e:[r]},even:function(e,t,n){var r=[],i=n?1:0,s=e.length;for(;i<s;i+=2)r.push(e[i]);return r},odd:function(e,t,n){var r=[],i=n?0:1,s=e.length;for(;i<s;i+=2)r.push(e[i]);return r},lt:function(e,t,n){return n?e.slice(+t):e.slice(0,+t)},gt:function(e,t,n){return n?e.slice(0,+t+1):e.slice(+t+1)},eq:function(e,t,n){var r=e.splice(+t,1);return n?e:r}}};ot.setFilters
|
||||
.nth=ot.setFilters.eq,ot.filters=ot.pseudos,rt||(ot.attrHandle={href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}}),tt&&(ot.order.push("NAME"),ot.find.NAME=function(e,t){if(typeof t.getElementsByName!==g)return t.getElementsByName(e)}),it&&(ot.order.splice(1,0,"CLASS"),ot.find.CLASS=function(e,t,n){if(typeof t.getElementsByClassName!==g&&!n)return t.getElementsByClassName(e)});try{E.call(m.childNodes,0)[0].nodeType}catch(ut){E=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}var at=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},ft=st.contains=m.compareDocumentPosition?function(e,t){return!!(e.compareDocumentPosition(t)&16)}:m.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},lt=st.getText=function(e){var t,n="",r=0,i=e.nodeType
|
||||
;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=lt(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=lt(t);return n};st.attr=function(e,t){var n,r=at(e);return r||(t=t.toLowerCase()),ot.attrHandle[t]?ot.attrHandle[t](e):et||r?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},st.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},[0,0].sort(function(){return b=0}),m.compareDocumentPosition?h=function(e,t){return e===t?(y=!0,0):(!e.compareDocumentPosition||!t.compareDocumentPosition?e.compareDocumentPosition:e.compareDocumentPosition(t)&4)?-1:1}:(h=function(e,t){if(e===t)return y=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],s=[],o=e.parentNode,u=t.parentNode,a=o;if(o===u)return p(e,t);if(!o)return-1;if(!u)return 1;while(a)i.unshift(a),a=a.parentNode;a=u;while(a)s.unshift
|
||||
(a),a=a.parentNode;n=i.length,r=s.length;for(var f=0;f<n&&f<r;f++)if(i[f]!==s[f])return p(i[f],s[f]);return f===n?p(e,s[f],-1):p(i[f],t,1)},p=function(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}),st.uniqueSort=function(e){var t,n=1;if(h){y=b,e.sort(h);if(y)for(;t=e[n];n++)t===e[n-1]&&e.splice(n--,1)}return e};var ct=st.compile=function(e,t,n){var r,i,o,u=$[e];if(u&&u.context===t)return u;i=s(e,t,n);for(o=0;r=i[o];o++)i[o]=a(r,t,n);return u=$[e]=f(i),u.context=t,u.runs=u.dirruns=0,J.push(e),J.length>ot.cacheLength&&delete $[J.shift()],u};st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){return st(t,null,null,[e]).length>0};var ht=function(e,t,n,r,s){e=e.replace(D,"$1");var o,u,a,f,h,p,d,v,m,g=e.match(H),y=e.match(j),b=t.nodeType;if(W.POS.test(e))return i(e,t,n,r,g);if(r)o=E.call(r,0);else if(g&&g.length===1){if(y.length>1&&b===9&&!s&&(g=W.ID.exec(y[0]))){t=ot.find.ID(g[1],t,s)[0];if(!t)return n;e=e.slice
|
||||
(y.shift().length)}v=(g=I.exec(y[0]))&&!g.index&&t.parentNode||t,m=y.pop(),p=m.split(":not")[0];for(a=0,f=ot.order.length;a<f;a++){d=ot.order[a];if(g=W[d].exec(p)){o=ot.find[d]((g[1]||"").replace(z,""),v,s);if(o==null)continue;p===m&&(e=e.slice(0,e.length-m.length)+p.replace(W[d],""),e||S.apply(n,E.call(o,0)));break}}}if(e){u=ct(e,t,s),c=u.dirruns++,o==null&&(o=ot.find.TAG("*",I.test(e)&&t.parentNode||t));for(a=0;h=o[a];a++)l=u.runs++,u(h,t)&&n.push(h)}return n};v.querySelectorAll&&function(){var e,t=ht,n=/'|\\/g,r=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,i=[],s=[":active"],o=m.matchesSelector||m.mozMatchesSelector||m.webkitMatchesSelector||m.oMatchesSelector||m.msMatchesSelector;Z(function(e){e.innerHTML="<select><option selected></option></select>",e.querySelectorAll("[selected]").length||i.push("\\["+T+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),Z(function(e){e.innerHTML="<p test=''></p>",e.querySelectorAll
|
||||
("[test^='']").length&&i.push("[*^$]="+T+"*(?:\"\"|'')"),e.innerHTML="<input type='hidden'>",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=i.length&&new RegExp(i.join("|")),ht=function(e,r,s,o,u){if(!o&&!u&&(!i||!i.test(e)))if(r.nodeType===9)try{return S.apply(s,E.call(r.querySelectorAll(e),0)),s}catch(a){}else if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){var f=r.getAttribute("id"),l=f||x,c=I.test(e)&&r.parentNode||r;f?l=l.replace(n,"\\$&"):r.setAttribute("id",l);try{return S.apply(s,E.call(c.querySelectorAll(e.replace(H,"[id='"+l+"'] $&")),0)),s}catch(a){}finally{f||r.removeAttribute("id")}}return t(e,r,s,o,u)},o&&(Z(function(t){e=o.call(t,"div");try{o.call(t,"[test!='']:sizzle"),s.push(ot.match.PSEUDO)}catch(n){}}),s=new RegExp(s.join("|")),st.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!at(t)&&!s.test(n)&&(!i||!i.test(n)))try{var u=o.call(t,n);if(u||e||t.document&&t.document.nodeType!==11)return u}catch(a){}return st(n,null,null,[t]
|
||||
).length>0})}(),st.attr=Y.attr,Y.find=st,Y.expr=st.selectors,Y.expr[":"]=Y.expr.pseudos,Y.unique=st.uniqueSort,Y.text=st.getText,Y.isXMLDoc=st.isXML,Y.contains=st.contains}(e);var Pt=/Until$/,Ht=/^(?:parents|prev(?:Until|All))/,Bt=/^.[^:#\[\.,]*$/,jt=Y.expr.match.needsContext,Ft={children:!0,contents:!0,next:!0,prev:!0};Y.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return Y(e).filter(function(){for(t=0,n=u.length;t<n;t++)if(Y.contains(u[t],this))return!0});o=this.pushStack("","find",e);for(t=0,n=this.length;t<n;t++){r=o.length,Y.find(e,this[t],o);if(t>0)for(i=r;i<o.length;i++)for(s=0;s<r;s++)if(o[s]===o[i]){o.splice(i--,1);break}}return o},has:function(e){var t,n=Y(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(Y.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(f(this,e,!1),"not",e)},filter:function(e){return this.pushStack(f(this,e,!0),"filter",e)},is:function(e){return!!e&&(typeof e=="string"?jt.test(e)?Y(e,this.context
|
||||
).index(this[0])>=0:Y.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=jt.test(e)||typeof e!="string"?Y(e,t||this.context):0;for(;r<i;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&n.nodeType!==11){if(o?o.index(n)>-1:Y.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?Y.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?Y.inArray(this[0],Y(e)):Y.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?Y(e,t):Y.makeArray(e&&e.nodeType?[e]:e),r=Y.merge(this.get(),n);return this.pushStack(u(n[0])||u(r[0])?r:Y.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),Y.fn.andSelf=Y.fn.addBack,Y.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return Y.dir(e,"parentNode")},parentsUntil:function(e,t,n){return Y.dir
|
||||
(e,"parentNode",n)},next:function(e){return a(e,"nextSibling")},prev:function(e){return a(e,"previousSibling")},nextAll:function(e){return Y.dir(e,"nextSibling")},prevAll:function(e){return Y.dir(e,"previousSibling")},nextUntil:function(e,t,n){return Y.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return Y.dir(e,"previousSibling",n)},siblings:function(e){return Y.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return Y.sibling(e.firstChild)},contents:function(e){return Y.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:Y.merge([],e.childNodes)}},function(e,t){Y.fn[e]=function(n,r){var i=Y.map(this,t,n);return Pt.test(e)||(r=n),r&&typeof r=="string"&&(i=Y.filter(r,i)),i=this.length>1&&!Ft[e]?Y.unique(i):i,this.length>1&&Ht.test(e)&&(i=i.reverse()),this.pushStack(i,e,$.call(arguments).join(","))}}),Y.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?Y.find.matchesSelector(t[0],e)?[t[0]]:[]:Y.find.matches(e,t)},dir:function(e,n,r){var i=
|
||||
[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!Y(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var It="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",qt=/ jQuery\d+="(?:null|\d+)"/g,Rt=/^\s+/,Ut=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,zt=/<([\w:]+)/,Wt=/<tbody/i,Xt=/<|&#?\w+;/,Vt=/<(?:script|style|link)/i,$t=/<(?:script|object|embed|option|style)/i,Jt=new RegExp("<(?:"+It+")[\\s/>]","i"),Kt=/^(?:checkbox|radio)$/,Qt=/checked\s*(?:[^=]|=\s*.checked.)/i,Gt=/\/(java|ecma)script/i,Yt=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,Zt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"
|
||||
],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},en=l(R),tn=en.appendChild(R.createElement("div"));Zt.optgroup=Zt.option,Zt.tbody=Zt.tfoot=Zt.colgroup=Zt.caption=Zt.thead,Zt.th=Zt.td,Y.support.htmlSerialize||(Zt._default=[1,"X<div>","</div>"]),Y.fn.extend({text:function(e){return Y.access(this,function(e){return e===t?Y.text(this):this.empty().append((this[0]&&this[0].ownerDocument||R).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(Y.isFunction(e))return this.each(function(t){Y(this).wrapAll(e.call(this,t))});if(this[0]){var t=Y(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return Y.isFunction(e)?this.each(function(t){Y(this).wrapInner(e.call(this,t))}):this.each(function(){var t=Y(this),n=t.contents();n.length?n.wrapAll
|
||||
(e):t.append(e)})},wrap:function(e){var t=Y.isFunction(e);return this.each(function(n){Y(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){Y.nodeName(this,"body")||Y(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!u(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=Y.clean(arguments);return this.pushStack(Y.merge(e,this),"before",this.selector)}},after:function(){if(!u(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=Y.clean(arguments);return this.pushStack(Y.merge(this,e),"after",this.selector)}},remove:function(
|
||||
e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||Y.filter(e,[n]).length)!t&&n.nodeType===1&&(Y.cleanData(n.getElementsByTagName("*")),Y.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&Y.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return Y.clone(this,e,t)})},html:function(e){return Y.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(qt,""):t;if(typeof e=="string"&&!Vt.test(e)&&(Y.support.htmlSerialize||!Jt.test(e))&&(Y.support.leadingWhitespace||!Rt.test(e))&&!Zt[(zt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Ut,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(Y.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith
|
||||
:function(e){return u(this[0])?this.length?this.pushStack(Y(Y.isFunction(e)?e():e),"replaceWith",e):this:Y.isFunction(e)?this.each(function(t){var n=Y(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(typeof e!="string"&&(e=Y(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;Y(this).remove(),t?Y(t).before(e):Y(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=[].concat.apply([],e);var i,s,o,u,a=0,f=e[0],l=[],h=this.length;if(!Y.support.checkClone&&h>1&&typeof f=="string"&&Qt.test(f))return this.each(function(){Y(this).domManip(e,n,r)});if(Y.isFunction(f))return this.each(function(i){var s=Y(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=Y.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&Y.nodeName(s,"tr");for(u=i.cacheable||h-1;a<h;a++)r.call(n&&Y.nodeName(this[a],"table")?c(this[a],"tbody"):this[a],a===u?o:Y.clone(o,!0,!0))}o=s=null,l.length&&Y.each(l
|
||||
,function(e,t){t.src?Y.ajax?Y.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):Y.error("no ajax"):Y.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Yt,"")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),Y.buildFragment=function(e,n,r){var i,s,o,u=e[0];return n=n||R,n=(n[0]||n).ownerDocument||n[0]||n,typeof n.createDocumentFragment=="undefined"&&(n=R),e.length===1&&typeof u=="string"&&u.length<512&&n===R&&u.charAt(0)==="<"&&!$t.test(u)&&(Y.support.checkClone||!Qt.test(u))&&(Y.support.html5Clone||!Jt.test(u))&&(s=!0,i=Y.fragments[u],o=i!==t),i||(i=n.createDocumentFragment(),Y.clean(e,n,i,r),s&&(Y.fragments[u]=o&&i)),{fragment:i,cacheable:s}},Y.fragments={},Y.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){Y.fn[e]=function(n){var r,i=0,s=[],o=Y(n),u=o.length,a=this.length===1&&this[0].parentNode;if((a==null||a&&a.nodeType===11&&a.childNodes.length===1)&&u===1)return o
|
||||
[t](this[0]),this;for(;i<u;i++)r=(i>0?this.clone(!0):this).get(),Y(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),Y.extend({clone:function(e,t,n){var r,i,s,o;Y.support.html5Clone||Y.isXMLDoc(e)||!Jt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(tn.innerHTML=e.outerHTML,tn.removeChild(o=tn.firstChild));if((!Y.support.noCloneEvent||!Y.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!Y.isXMLDoc(e)){p(e,o),r=d(e),i=d(o);for(s=0;r[s];++s)i[s]&&p(r[s],i[s])}if(t){h(e,o);if(n){r=d(e),i=d(o);for(s=0;r[s];++s)h(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var i,s,o,u,a,f,c,h,p,d,m,g,y=0,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=R;for(s=t===R&&en;(o=e[y])!=null;y++){typeof o=="number"&&(o+="");if(!o)continue;if(typeof o=="string")if(!Xt.test(o))o=t.createTextNode(o);else{s=s||l(t),c=c||s.appendChild(t.createElement("div")),o=o.replace(Ut,"<$1></$2>"),u=(zt.exec(o)||["",""])[1].toLowerCase(),a=Zt[u]||Zt._default,f=a[0],c.innerHTML=a[1]+o+a[2
|
||||
];while(f--)c=c.lastChild;if(!Y.support.tbody){h=Wt.test(o),p=u==="table"&&!h?c.firstChild&&c.firstChild.childNodes:a[1]==="<table>"&&!h?c.childNodes:[];for(i=p.length-1;i>=0;--i)Y.nodeName(p[i],"tbody")&&!p[i].childNodes.length&&p[i].parentNode.removeChild(p[i])}!Y.support.leadingWhitespace&&Rt.test(o)&&c.insertBefore(t.createTextNode(Rt.exec(o)[0]),c.firstChild),o=c.childNodes,c=s.lastChild}o.nodeType?b.push(o):b=Y.merge(b,o)}c&&(s.removeChild(c),o=c=s=null);if(!Y.support.appendChecked)for(y=0;(o=b[y])!=null;y++)Y.nodeName(o,"input")?v(o):typeof o.getElementsByTagName!="undefined"&&Y.grep(o.getElementsByTagName("input"),v);if(n){m=function(e){if(!e.type||Gt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(y=0;(o=b[y])!=null;y++)if(!Y.nodeName(o,"script")||!m(o))n.appendChild(o),typeof o.getElementsByTagName!="undefined"&&(g=Y.grep(Y.merge([],o.getElementsByTagName("script")),m),b.splice.apply(b,[y+1,0].concat(g)),y+=g.length)}return b},cleanData
|
||||
:function(e,t){var n,r,i,s,o=0,u=Y.expando,a=Y.cache,f=Y.support.deleteExpando,l=Y.event.special;for(;(i=e[o])!=null;o++)if(t||Y.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?Y.event.remove(i,s):Y.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,Y.deletedIds.push(r))}}}}),function(){var e,t;Y.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=Y.uaMatch(z.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.webkit&&(t.safari=!0),Y.browser=t,Y.sub=function(){function e(t,n){return new e.fn.init(t,n)}Y.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function n(n,r){return r&&r instanceof Y&&!
|
||||
(r instanceof e)&&(r=e(r)),Y.fn.init.call(this,n,r,t)},e.fn.init.prototype=e.fn;var t=e(R);return e}}();var nn,rn,sn,on=/alpha\([^)]*\)/i,un=/opacity=([^)]*)/,an=/^(top|right|bottom|left)$/,fn=/^margin/,ln=new RegExp("^("+Z+")(.*)$","i"),cn=new RegExp("^("+Z+")(?!px)[a-z%]+$","i"),hn=new RegExp("^([-+])=("+Z+")","i"),pn={},dn={position:"absolute",visibility:"hidden",display:"block"},vn={letterSpacing:0,fontWeight:400,lineHeight:1},mn=["Top","Right","Bottom","Left"],gn=["Webkit","O","Moz","ms"],yn=Y.fn.toggle;Y.fn.extend({css:function(e,n){return Y.access(this,function(e,n,r){return r!==t?Y.style(e,n,r):Y.css(e,n)},e,n,arguments.length>1)},show:function(){return y(this,!0)},hide:function(){return y(this)},toggle:function(e,t){var n=typeof e=="boolean";return Y.isFunction(e)&&Y.isFunction(t)?yn.apply(this,arguments):this.each(function(){(n?e:g(this))?Y(this).show():Y(this).hide()})}}),Y.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=nn(e,"opacity");return n===""?"1":n}}}},cssNumber
|
||||
:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":Y.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=Y.camelCase(n),f=e.style;n=Y.cssProps[a]||(Y.cssProps[a]=m(f,a)),u=Y.cssHooks[n]||Y.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=hn.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(Y.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!Y.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=Y.camelCase(n);return n=Y.cssProps[a]||(Y.cssProps[a]=m(e.style,a)),u=Y.cssHooks[n]||Y.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=nn(e,n)),s==="normal"&&n in vn&&(s=vn[n]),r||i!==t?(o=parseFloat(s),r||Y.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call
|
||||
(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?nn=function(e,t){var n,r,i,s,o=getComputedStyle(e,null),u=e.style;return o&&(n=o[t],n===""&&!Y.contains(e.ownerDocument.documentElement,e)&&(n=Y.style(e,t)),cn.test(n)&&fn.test(t)&&(r=u.width,i=u.minWidth,s=u.maxWidth,u.minWidth=u.maxWidth=u.width=n,n=o.width,u.width=r,u.minWidth=i,u.maxWidth=s)),n}:R.documentElement.currentStyle&&(nn=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),cn.test(i)&&!an.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),Y.each(["height","width"],function(e,t){Y.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth!==0||nn(e,"display")!=="none"?E(e,t,r):Y.swap(e,dn,function(){return E(e,t,r)})},set:function(e,n,r){return b(e,n,r?w(e,t,r,Y.support.boxSizing&&Y.css(e,"boxSizing")==="border-box"
|
||||
):0)}}}),Y.support.opacity||(Y.cssHooks.opacity={get:function(e,t){return un.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=Y.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&Y.trim(s.replace(on,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=on.test(s)?s.replace(on,i):s+" "+i}}),Y(function(){Y.support.reliableMarginRight||(Y.cssHooks.marginRight={get:function(e,t){return Y.swap(e,{display:"inline-block"},function(){if(t)return nn(e,"marginRight")})}}),!Y.support.pixelPosition&&Y.fn.position&&Y.each(["top","left"],function(e,t){Y.cssHooks[t]={get:function(e,n){if(n){var r=nn(e,t);return cn.test(r)?Y(e).position()[t]+"px":r}}}})}),Y.expr&&Y.expr.filters&&(Y.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!Y.support.reliableHiddenOffsets&&(e.style&&e.style.display||nn(e,"display"
|
||||
))==="none"},Y.expr.filters.visible=function(e){return!Y.expr.filters.hidden(e)}),Y.each({margin:"",padding:"",border:"Width"},function(e,t){Y.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+mn[r]+t]=i[r]||i[r-2]||i[0];return s}},fn.test(e)||(Y.cssHooks[e+t].set=b)});var bn=/%20/g,wn=/\[\]$/,En=/\r?\n/g,Sn=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,xn=/^(?:select|textarea)/i;Y.fn.extend({serialize:function(){return Y.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?Y.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||xn.test(this.nodeName)||Sn.test(this.type))}).map(function(e,t){var n=Y(this).val();return n==null?null:Y.isArray(n)?Y.map(n,function(e,n){return{name:t.name,value:e.replace(En,"\r\n")}}):{name:t.name,value:n.replace(En,"\r\n")}}).get()}}),Y.param=
|
||||
function(e,n){var r,i=[],s=function(e,t){t=Y.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=Y.ajaxSettings&&Y.ajaxSettings.traditional);if(Y.isArray(e)||e.jquery&&!Y.isPlainObject(e))Y.each(e,function(){s(this.name,this.value)});else for(r in e)x(r,e[r],n,s);return i.join("&").replace(bn,"+")};var Tn,Nn,Cn=/#.*$/,kn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Ln=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,An=/^(?:GET|HEAD)$/,On=/^\/\//,Mn=/\?/,_n=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,Dn=/([?&])_=[^&]*/,Pn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Hn=Y.fn.load,Bn={},jn={},Fn=["*/"]+["*"];try{Tn=U.href}catch(In){Tn=R.createElement("a"),Tn.href="",Tn=Tn.href}Nn=Pn.exec(Tn.toLowerCase())||[],Y.fn.load=function(e,n,r){if(typeof e!="string"&&Hn)return Hn.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),Y.isFunction(n)?(r=n,n=
|
||||
t):typeof n=="object"&&(s="POST"),Y.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?Y("<div>").append(e.replace(_n,"")).find(i):e)}),this},Y.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){Y.fn[t]=function(e){return this.on(t,e)}}),Y.each(["get","post"],function(e,n){Y[n]=function(e,r,i,s){return Y.isFunction(r)&&(s=s||i,i=r,r=t),Y.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),Y.extend({getScript:function(e,n){return Y.get(e,t,n,"script")},getJSON:function(e,t,n){return Y.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?C(e,Y.ajaxSettings):(t=e,e=Y.ajaxSettings),C(e,t),e},ajaxSettings:{url:Tn,isLocal:Ln.test(Nn[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*"
|
||||
:Fn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":Y.parseJSON,"text xml":Y.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:T(Bn),ajaxTransport:T(jn),ajax:function(e,n){function r(e,n,r,o){var f,c,y,b,E,x=n;if(w===2)return;w=2,a&&clearTimeout(a),u=t,s=o||"",S.readyState=e>0?4:0,r&&(b=k(h,S,r));if(e>=200&&e<300||e===304)h.ifModified&&(E=S.getResponseHeader("Last-Modified"),E&&(Y.lastModified[i]=E),E=S.getResponseHeader("Etag"),E&&(Y.etag[i]=E)),e===304?(x="notmodified",f=!0):(f=L(h,b),x=f.state,c=f.data,y=f.error,f=!y);else{y=x;if(!x||e)x="error",e<0&&(e=0)}S.status=e,S.statusText=""+(n||x),f?v.resolveWith(p,[c,x,S]):v.rejectWith(p,[S,x,y]),S.statusCode(g),g=t,l&&d.trigger("ajax"+(f?"Success":"Error"),[S,h,f?c:y]),m.fireWith(p,[S,x]),l&&(d.trigger("ajaxComplete",[S,h]),--Y.active||Y.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var i,s,o,u,a,f,l,c,h=Y
|
||||
.ajaxSetup({},n),p=h.context||h,d=p!==h&&(p.nodeType||p instanceof Y)?Y(p):Y.event,v=Y.Deferred(),m=Y.Callbacks("once memory"),g=h.statusCode||{},y={},b={},w=0,E="canceled",S={readyState:0,setRequestHeader:function(e,t){if(!w){var n=e.toLowerCase();e=b[n]=b[n]||e,y[e]=t}return this},getAllResponseHeaders:function(){return w===2?s:null},getResponseHeader:function(e){var n;if(w===2){if(!o){o={};while(n=kn.exec(s))o[n[1].toLowerCase()]=n[2]}n=o[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return w||(h.mimeType=e),this},abort:function(e){return e=e||E,u&&u.abort(e),r(0,e),this}};v.promise(S),S.success=S.done,S.error=S.fail,S.complete=m.add,S.statusCode=function(e){if(e){var t;if(w<2)for(t in e)g[t]=[g[t],e[t]];else t=e[S.status],S.always(t)}return this},h.url=((e||h.url)+"").replace(Cn,"").replace(On,Nn[1]+"//"),h.dataTypes=Y.trim(h.dataType||"*").toLowerCase().split(tt),h.crossDomain==null&&(f=Pn.exec(h.url.toLowerCase()),h.crossDomain=!(!f||f[1]==Nn[1]&&f[2]==Nn[2]&&
|
||||
(f[3]||(f[1]==="http:"?80:443))==(Nn[3]||(Nn[1]==="http:"?80:443)))),h.data&&h.processData&&typeof h.data!="string"&&(h.data=Y.param(h.data,h.traditional)),N(Bn,h,n,S);if(w===2)return S;l=h.global,h.type=h.type.toUpperCase(),h.hasContent=!An.test(h.type),l&&Y.active++===0&&Y.event.trigger("ajaxStart");if(!h.hasContent){h.data&&(h.url+=(Mn.test(h.url)?"&":"?")+h.data,delete h.data),i=h.url;if(h.cache===!1){var x=Y.now(),T=h.url.replace(Dn,"$1_="+x);h.url=T+(T===h.url?(Mn.test(h.url)?"&":"?")+"_="+x:"")}}(h.data&&h.hasContent&&h.contentType!==!1||n.contentType)&&S.setRequestHeader("Content-Type",h.contentType),h.ifModified&&(i=i||h.url,Y.lastModified[i]&&S.setRequestHeader("If-Modified-Since",Y.lastModified[i]),Y.etag[i]&&S.setRequestHeader("If-None-Match",Y.etag[i])),S.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+(h.dataTypes[0]!=="*"?", "+Fn+"; q=0.01":""):h.accepts["*"]);for(c in h.headers)S.setRequestHeader(c,h.headers[c]);if(!h.beforeSend||
|
||||
h.beforeSend.call(p,S,h)!==!1&&w!==2){E="abort";for(c in{success:1,error:1,complete:1})S[c](h[c]);u=N(jn,h,n,S);if(!u)r(-1,"No Transport");else{S.readyState=1,l&&d.trigger("ajaxSend",[S,h]),h.async&&h.timeout>0&&(a=setTimeout(function(){S.abort("timeout")},h.timeout));try{w=1,u.send(y,r)}catch(C){if(!(w<2))throw C;r(-1,C)}}return S}return S.abort()},active:0,lastModified:{},etag:{}});var qn=[],Rn=/\?/,Un=/(=)\?(?=&|$)|\?\?/,zn=Y.now();Y.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=qn.pop()||Y.expando+"_"+zn++;return this[e]=!0,e}}),Y.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Un.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Un.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=Y.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Un,"$1"+s):h?n.data=a.replace(Un,"$1"+s):l&&(n.url+=(Rn.test(f)?"&":"?")+n.jsonp+"="+s),n.converters
|
||||
["script json"]=function(){return u||Y.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,qn.push(s)),u&&Y.isFunction(o)&&o(u[0]),u=o=t}),"script"}),Y.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return Y.globalEval(e),e}}}),Y.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),Y.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=R.head||R.getElementsByTagName("head")[0]||R.documentElement;return{send:function(i,s){n=R.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild
|
||||
(n),n=t,i||s(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Wn,Xn=e.ActiveXObject?function(){for(var e in Wn)Wn[e](0,1)}:!1,Vn=0;Y.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&A()||O()}:A,function(e){Y.extend(Y.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(Y.ajaxSettings.xhr()),Y.support.ajax&&Y.ajaxTransport(function(n){if(!n.crossDomain||Y.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=Y.noop,Xn&&delete Wn[o]);if(i)a.readyState!==4&&a.abort
|
||||
();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(e){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++Vn,Xn&&(Wn||(Wn={},Y(e).unload(Xn)),Wn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var $n,Jn,Kn=/^(?:toggle|show|hide)$/,Qn=new RegExp("^(?:([-+])=|)("+Z+")([a-z%]*)$","i"),Gn=/queueHooks$/,Yn=[H],Zn={"*":[function(e,t){var n,r,i,s=this.createTween(e,t),o=Qn.exec(t),u=s.cur(),a=+u||0,f=1;if(o){n=+o[2],r=o[3]||(Y.cssNumber[e]?"":"px");if(r!=="px"&&a){a=Y.css(s.elem,e,!0)||n||1;do i=f=f||".5",a/=f,Y.style(s.elem,e,a+r),f=s.cur()/u;while(f!==1&&f!==i)}s.unit=r,s.start=a,s.end=o[1]?a+(o[1]+1)*n:n}return s}]};Y.Animation=Y.extend(D,{tweener:function(e,t){Y.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r<i;r++)n=e[r],Zn[n]=Zn[n]||[],Zn[
|
||||
n].unshift(t)},prefilter:function(e,t){t?Yn.unshift(e):Yn.push(e)}}),Y.Tween=B,B.prototype={constructor:B,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(Y.cssNumber[n]?"":"px")},cur:function(){var e=B.propHooks[this.prop];return e&&e.get?e.get(this):B.propHooks._default.get(this)},run:function(e){var t,n=B.propHooks[this.prop];return this.pos=t=Y.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration),this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):B.propHooks._default.set(this),this}},B.prototype.init.prototype=B.prototype,B.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=Y.css(e.elem,e.prop,!1,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){Y.fx.step[e.prop]?Y.fx.step[e.prop](e):e.elem.style&&(e.elem.style[Y.cssProps
|
||||
[e.prop]]!=null||Y.cssHooks[e.prop])?Y.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},B.propHooks.scrollTop=B.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},Y.each(["toggle","show","hide"],function(e,t){var n=Y.fn[t];Y.fn[t]=function(r,i,s){return r==null||typeof r=="boolean"||!e&&Y.isFunction(r)&&Y.isFunction(i)?n.apply(this,arguments):this.animate(j(t,!0),r,i,s)}}),Y.fn.extend({fadeTo:function(e,t,n,r){return this.filter(g).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=Y.isEmptyObject(e),s=Y.speed(t,n,r),o=function(){var t=D(this,Y.extend({},e),s);i&&t.stop(!0)};return i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=e!=null&&e+"queueHooks",s=Y.timers,o=Y._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(
|
||||
n in o)o[n]&&o[n].stop&&Gn.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem===this&&(e==null||s[n].queue===e)&&(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&Y.dequeue(this,e)})}}),Y.each({slideDown:j("show"),slideUp:j("hide"),slideToggle:j("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){Y.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),Y.speed=function(e,t,n){var r=e&&typeof e=="object"?Y.extend({},e):{complete:n||!n&&t||Y.isFunction(e)&&e,duration:e,easing:n&&t||t&&!Y.isFunction(t)&&t};r.duration=Y.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in Y.fx.speeds?Y.fx.speeds[r.duration]:Y.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(){Y.isFunction(r.old)&&r.old.call(this),r.queue&&Y.dequeue(this,r.queue)},r},Y.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},Y.timers=[],Y.fx=B.prototype.init,Y.fx.tick=function(){var e
|
||||
,t=Y.timers,n=0;for(;n<t.length;n++)e=t[n],!e()&&t[n]===e&&t.splice(n--,1);t.length||Y.fx.stop()},Y.fx.timer=function(e){e()&&Y.timers.push(e)&&!Jn&&(Jn=setInterval(Y.fx.tick,Y.fx.interval))},Y.fx.interval=13,Y.fx.stop=function(){clearInterval(Jn),Jn=null},Y.fx.speeds={slow:600,fast:200,_default:400},Y.fx.step={},Y.expr&&Y.expr.filters&&(Y.expr.filters.animated=function(e){return Y.grep(Y.timers,function(t){return e===t.elem}).length});var er=/^(?:body|html)$/i;Y.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){Y.offset.setOffset(this,e,t)});var n,r,i,s,o,u,a,f,l,c,h=this[0],p=h&&h.ownerDocument;if(!p)return;return(i=p.body)===h?Y.offset.bodyOffset(h):(r=p.documentElement,Y.contains(r,h)?(n=h.getBoundingClientRect(),s=F(p),o=r.clientTop||i.clientTop||0,u=r.clientLeft||i.clientLeft||0,a=s.pageYOffset||r.scrollTop,f=s.pageXOffset||r.scrollLeft,l=n.top+a-o,c=n.left+f-u,{top:l,left:c}):{top:0,left:0})},Y.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft
|
||||
;return Y.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(Y.css(e,"marginTop"))||0,n+=parseFloat(Y.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=Y.css(e,"position");r==="static"&&(e.style.position="relative");var i=Y(e),s=i.offset(),o=Y.css(e,"top"),u=Y.css(e,"left"),a=(r==="absolute"||r==="fixed")&&Y.inArray("auto",[o,u])>-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),Y.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},Y.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(Y.css(e,"marginTop"))||0,n.left-=parseFloat(Y.css(e,"marginLeft"))||0,r.top+=parseFloat(Y.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(Y.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent
|
||||
:function(){return this.map(function(){var e=this.offsetParent||R.body;while(e&&!er.test(e.nodeName)&&Y.css(e,"position")==="static")e=e.offsetParent;return e||R.body})}}),Y.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);Y.fn[e]=function(i){return Y.access(this,function(e,i,s){var o=F(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?Y(o).scrollLeft():s,r?s:Y(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),Y.each({Height:"height",Width:"width"},function(e,n){Y.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){Y.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return Y.access(this,function(n,r,i){var s;return Y.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?Y.css(n,r,i,u):Y.style(n,r,i,u)},n,o?i:t,o)}})}
|
||||
),e.jQuery=e.$=Y,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return Y})})(window),define("jquery-src",function(e){return function(){var t,n;return t||e.jQuery}}(this)),define("jquery",["jquery-src"],function(e){var t=e(window);return e.fn.place_tt=function(){var n={offset:5,css:{position:"absolute",top:-1e3,left:0,color:"#c8c8c8",padding:"10px","font-size":"11pt","font-weight":200,"background-color":"#1f1f1f","border-radius":"5px"}};return function(r,i,s){return s=e.extend(!0,{},n,s),this.each(function(){var n=e(this),o,u;n.css(s.css),e.contains(document.body,n[0])||n.appendTo(document.body),o=n.outerWidth(!0),u=n.outerHeight(!0),n.css("left",r+s.offset+o>t.width()?r-s.offset-o:r+s.offset),n.css("top",i+s.offset+u>t.height()?i-s.offset-u:i+s.offset)})}}(),e}),function(e,t,n){function g(e){return!e||typeof e.length!="number"?!1:typeof e.hasOwnProperty!="function"&&typeof e.constructor!="function"?!0:e instanceof Ht||f&&e instanceof f||h.call(e)!=="[object Object]"||typeof
|
||||
e.callee=="function"}function y(e,t,n){var r;if(e)if(j(e))for(r in e)r!="prototype"&&r!="length"&&r!="name"&&e.hasOwnProperty(r)&&t.call(n,e[r],r);else if(e.forEach&&e.forEach!==y)e.forEach(t,n);else if(g(e))for(r=0;r<e.length;r++)t.call(n,e[r],r);else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r);return e}function b(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t.sort()}function w(e,t,n){var r=b(e);for(var i=0;i<r.length;i++)t.call(n,e[r[i]],r[i]);return r}function E(e){return function(t,n){e(n,t)}}function S(){var e=m.length,t;while(e){e--,t=m[e].charCodeAt(0);if(t==57)return m[e]="A",m.join("");if(t!=90)return m[e]=String.fromCharCode(t+1),m.join("");m[e]="0"}return m.unshift("0"),m.join("")}function x(e,t){t?e.$$hashKey=t:delete e.$$hashKey}function T(e){var t=e.$$hashKey;return y(arguments,function(t){t!==e&&y(t,function(t,n){e[n]=t})}),x(e,t),e}function N(e){return parseInt(e,10)}function C(e,t){return T(new(T(function(){},{prototype:e})),t)}function k(){}function L
|
||||
(e){return e}function A(e){return function(){return e}}function O(e){return typeof e=="undefined"}function M(e){return typeof e!="undefined"}function _(e){return e!=null&&typeof e=="object"}function D(e){return typeof e=="string"}function P(e){return typeof e=="number"}function H(e){return h.apply(e)=="[object Date]"}function B(e){return h.apply(e)=="[object Array]"}function j(e){return typeof e=="function"}function F(e){return h.apply(e)=="[object RegExp]"}function I(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function q(e){return e&&e.$evalAsync&&e.$watch}function R(e){return h.apply(e)==="[object File]"}function U(e){return typeof e=="boolean"}function W(e){return e&&(e.nodeName||e.bind&&e.find)}function X(e){var t={},n=e.split(","),r;for(r=0;r<n.length;r++)t[n[r]]=!0;return t}function V(e,t,n){var r=[];return y(e,function(e,i,s){r.push(t.call(n,e,i,s))}),r}function $(e,t){var n=0,r;if(B(e)||D(e))return e.length;if(_(e))for(r in e)(!t||e.hasOwnProperty(r))&&n++;return n
|
||||
}function J(e,t){return K(e,t)!=-1}function K(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n<e.length;n++)if(t===e[n])return n;return-1}function Q(e,t){var n=K(e,t);return n>=0&&e.splice(n,1),t}function G(e){if(e)switch(e.nodeName){case"OPTION":case"PRE":case"TITLE":return!0}return!1}function Y(e,t){if(I(e)||q(e))throw Error("Can't copy Window or Scope");if(!t)t=e,e&&(B(e)?t=Y(e,[]):H(e)?t=new Date(e.getTime()):F(e)?t=new RegExp(e.source):_(e)&&(t=Y(e,{})));else{if(e===t)throw Error("Can't copy equivalent objects or arrays");if(B(e)){t.length=0;for(var n=0;n<e.length;n++)t.push(Y(e[n]))}else{var r=t.$$hashKey;y(t,function(e,n){delete t[n]});for(var i in e)t[i]=Y(e[i]);x(t,r)}}return t}function Z(e,t){t=t||{};for(var n in e)e.hasOwnProperty(n)&&n.substr(0,2)!=="$$"&&(t[n]=e[n]);return t}function et(e,t){if(e===t)return!0;if(e===null||t===null)return!1;if(e!==e&&t!==t)return!0;var r=typeof e,i=typeof t,s,o,u;if(r==i&&r=="object"){if(!B(e)){if(H(e))return H(t)&&e.getTime()==t.getTime(
|
||||
);if(F(e)&&F(t))return e.toString()==t.toString();if(q(e)||q(t)||I(e)||I(t)||B(t))return!1;u={};for(o in e){if(o.charAt(0)==="$"||j(e[o]))continue;if(!et(e[o],t[o]))return!1;u[o]=!0}for(o in t)if(!u[o]&&o.charAt(0)!=="$"&&t[o]!==n&&!j(t[o]))return!1;return!0}if(!B(t))return!1;if((s=e.length)==t.length){for(o=0;o<s;o++)if(!et(e[o],t[o]))return!1;return!0}}return!1}function tt(e,t,n){return e.concat(l.call(t,n))}function nt(e,t){return l.call(e,t||0)}function rt(e,t){var n=arguments.length>2?nt(arguments,2):[];return!j(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,n.concat(l.call(arguments,0))):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function it(e,r){var i=r;return/^\$+/.test(e)?i=n:I(r)?i="$WINDOW":r&&t===r?i="$DOCUMENT":q(r)&&(i="$SCOPE"),i}function st(e,t){return typeof e=="undefined"?n:JSON.stringify(e,it,t?" ":null)}function ot(e){return D(e)?JSON.parse(e):e}function ut(e){if(e&&e.length!==0){var t=r(""+e);e=
|
||||
t!="f"&&t!="0"&&t!="false"&&t!="no"&&t!="n"&&t!="[]"}else e=!1;return e}function at(e){e=a(e).clone();try{e.html("")}catch(t){}var n=3,i=a("<div>").append(e).html();try{return e[0].nodeType===n?r(i):i.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+r(t)})}catch(t){return r(i)}}function ft(e){try{return decodeURIComponent(e)}catch(t){}}function lt(e){var t={},n,r;return y((e||"").split("&"),function(e){e&&(n=e.split("="),r=ft(n[0]),M(r)&&(t[r]=M(n[1])?ft(n[1]):!0))}),t}function ct(e){var t=[];return y(e,function(e,n){t.push(pt(n,!0)+(e===!0?"":"="+pt(e,!0)))}),t.length?t.join("&"):""}function ht(e){return pt(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function pt(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,t?"%20":"+")}function dt(e,n){function a(e){e&&r.push(e)}var r=[e],i,s,o=["ng:app","ng-app","x-ng-app","data-ng-app"],u=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/
|
||||
;y(o,function(n){o[n]=!0,a(t.getElementById(n)),n=n.replace(":","\\:"),e.querySelectorAll&&(y(e.querySelectorAll("."+n),a),y(e.querySelectorAll("."+n+"\\:"),a),y(e.querySelectorAll("["+n+"]"),a))}),y(r,function(e){if(!i){var t=" "+e.className+" ",n=u.exec(t);n?(i=e,s=(n[2]||"").replace(/\s+/g,",")):y(e.attributes,function(t){!i&&o[t.name]&&(i=e,s=t.value)})}}),i&&n(i,s?[s]:[])}function vt(t,n){var r=function(){t=a(t),n=n||[],n.unshift(["$provide",function(e){e.value("$rootElement",t)}]),n.unshift("ng");var e=an(n);return e.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,r){e.$apply(function(){t.data("$injector",r),n(t)(e)})}]),e},i=/^NG_DEFER_BOOTSTRAP!/;if(e&&!i.test(e.name))return r();e.name=e.name.replace(i,""),p.resumeBootstrap=function(e){y(e,function(e){n.push(e)}),r()}}function gt(e,t){return t=t||"_",e.replace(mt,function(e,n){return(n?t:"")+e.toLowerCase()})}function yt(){f=e.jQuery,f?(a=f,T(f.fn,{scope:Jt.scope,controller:Jt.controller,injector:Jt.injector
|
||||
,inheritedData:Jt.inheritedData}),Pt("remove",!0,!0,!1),Pt("empty",!1,!1,!1),Pt("html",!1,!1,!0)):a=Ht,p.element=a}function bt(e,t,n){if(!e)throw new Error("Argument '"+(t||"?")+"' is "+(n||"required"));return e}function wt(e,t,n){return n&&B(e)&&(e=e[e.length-1]),bt(j(e),t,"not a function, got "+(e&&typeof e=="object"?e.constructor.name||"Object":typeof e)),e}function Et(e,t,n){if(!t)return e;var r=t.split("."),i,s=e,o=r.length;for(var u=0;u<o;u++)i=r[u],e&&(e=(s=e)[i]);return!n&&j(e)?rt(s,e):e}function St(e){function t(e,t,n){return e[t]||(e[t]=n())}return t(t(e,"angular",Object),"module",function(){var e={};return function(r,i,s){return i&&e.hasOwnProperty(r)&&(e[r]=null),t(e,r,function(){function u(t,n,r){return function(){return e[r||"push"]([t,n,arguments]),o}}if(!i)throw Error("No module: "+r);var e=[],t=[],n=u("$injector","invoke"),o={_invokeQueue:e,_runBlocks:t,requires:i,name:r,provider:u("$provide","provider"),factory:u("$provide","factory"),service:u("$provide","service"),value
|
||||
:u("$provide","value"),constant:u("$provide","constant","unshift"),filter:u("$filterProvider","register"),controller:u("$controllerProvider","register"),directive:u("$compileProvider","directive"),config:n,run:function(e){return t.push(e),this}};return s&&n(s),o})}})}function Tt(t){T(t,{bootstrap:vt,copy:Y,extend:T,equals:et,element:a,forEach:y,injector:an,noop:k,bind:rt,toJson:st,fromJson:ot,identity:L,isUndefined:O,isDefined:M,isString:D,isFunction:j,isObject:_,isNumber:P,isElement:W,isArray:B,version:xt,isDate:H,lowercase:r,uppercase:i,callbacks:{counter:0}}),d=St(e);try{d("ngLocale")}catch(n){d("ngLocale",[]).provider("$locale",hr)}d("ng",["ngLocale"],["$provide",function(t){t.provider("$compile",vn).directive({a:Hr,input:Zr,textarea:Zr,form:qr,script:Bi,select:Fi,style:qi,option:Ii,ngBind:ci,ngBindHtmlUnsafe:pi,ngBindTemplate:hi,ngClass:vi,ngClassEven:gi,ngClassOdd:mi,ngCsp:wi,ngCloak:yi,ngController:bi,ngForm:Rr,ngHide:Li,ngInclude:Si,ngInit:xi,ngNonBindable:Ti,ngPluralize:Ni,ngRepeat
|
||||
:Ci,ngShow:ki,ngStyle:Ai,ngSwitch:Mi,ngSwitchWhen:_i,ngSwitchDefault:Di,ngOptions:ji,ngView:Hi,ngTransclude:Pi,ngModel:si,ngList:ai,ngChange:oi,required:ui,ngRequired:ui,ngValue:li}).directive(Br).directive(Ei),t.provider({$anchorScroll:fn,$browser:cn,$cacheFactory:hn,$controller:wn,$document:En,$exceptionHandler:Sn,$filter:dr,$interpolate:xn,$http:ar,$httpBackend:lr,$location:qn,$log:Rn,$parse:Qn,$route:Zn,$routeParams:er,$rootScope:tr,$q:Gn,$sniffer:nr,$templateCache:pn,$timeout:pr,$window:rr})}])}function Ot(){return++kt}function Dt(e){return e.replace(Mt,function(e,t,n,r){return r?n.toUpperCase():n}).replace(_t,"Moz$1")}function Pt(e,t,n,r){function s(e){var s=n&&e?[this.filter(e)]:[this],o=t,u,l,c,h,p,d,v;if(!r||e!=null)while(s.length){u=s.shift();for(l=0,c=u.length;l<c;l++){h=a(u[l]),o?h.triggerHandler("$destroy"):o=!o;for(p=0,d=(v=h.children()).length;p<d;p++)s.push(f(v[p]))}}return i.apply(this,arguments)}var i=f.fn[e];i=i.$original||i,s.$original=i,f.fn[e]=s}function Ht(e){if(e instanceof
|
||||
Ht)return e;if(!(this instanceof Ht)){if(D(e)&&e.charAt(0)!="<")throw Error("selectors not implemented");return new Ht(e)}if(D(e)){var n=t.createElement("div");n.innerHTML="<div> </div>"+e,n.removeChild(n.firstChild),Xt(this,n.childNodes),this.remove()}else Xt(this,e)}function Bt(e){return e.cloneNode(!0)}function jt(e){It(e);for(var t=0,n=e.childNodes||[];t<n.length;t++)jt(n[t])}function Ft(e,t,n){var r=qt(e,"events"),i=qt(e,"handle");if(!i)return;O(t)?y(r,function(t,n){At(e,n,t),delete r[n]}):O(n)?(At(e,t,r[t]),delete r[t]):Q(r[t]||[],n)}function It(e){var t=e[Ct],r=Nt[t];r&&(r.handle&&(r.events.$destroy&&r.handle({},"$destroy"),Ft(e)),delete Nt[t],e[Ct]=n)}function qt(e,t,n){var r=e[Ct],i=Nt[r||-1];if(!M(n))return i&&i[t];i||(e[Ct]=r=Ot(),i=Nt[r]={}),i[t]=n}function Rt(e,t,n){var r=qt(e,"data"),i=M(n),s=!i&&M(t),o=s&&!_(t);!r&&!o&&qt(e,"data",r={});if(i)r[t]=n;else{if(!s)return r;if(o)return r&&r[t];T(r,t)}}function Ut(e,t){return(" "+e.className+" ").replace(/[\n\t]/g," ").indexOf
|
||||
(" "+t+" ")>-1}function zt(e,t){t&&y(t.split(" "),function(t){e.className=z((" "+e.className+" ").replace(/[\n\t]/g," ").replace(" "+z(t)+" "," "))})}function Wt(e,t){t&&y(t.split(" "),function(t){Ut(e,t)||(e.className=z(e.className+" "+z(t)))})}function Xt(e,t){if(t){t=!t.nodeName&&M(t.length)&&!I(t)?t:[t];for(var n=0;n<t.length;n++)e.push(t[n])}}function Vt(e,t){return $t(e,"$"+(t||"ngController")+"Controller")}function $t(e,t,n){e=a(e),e[0].nodeType==9&&(e=e.find("html"));while(e.length){if(n=e.data(t))return n;e=e.parent()}}function Gt(e,t){var n=Kt[t.toLowerCase()];return n&&Qt[e.nodeName]&&n}function Yt(e,n){var r=function(r,i){r.preventDefault||(r.preventDefault=function(){r.returnValue=!1}),r.stopPropagation||(r.stopPropagation=function(){r.cancelBubble=!0}),r.target||(r.target=r.srcElement||t);if(O(r.defaultPrevented)){var s=r.preventDefault;r.preventDefault=function(){r.defaultPrevented=!0,s.call(r)},r.defaultPrevented=!1}r.isDefaultPrevented=function(){return r.defaultPrevented
|
||||
},y(n[i||r.type],function(t){t.call(e,r)}),u<=8?(r.preventDefault=null,r.stopPropagation=null,r.isDefaultPrevented=null):(delete r.preventDefault,delete r.stopPropagation,delete r.isDefaultPrevented)};return r.elem=e,r}function Zt(e){var t=typeof e,r;return t=="object"&&e!==null?typeof (r=e.$$hashKey)=="function"?r=e.$$hashKey():r===n&&(r=e.$$hashKey=S()):r=e,t+":"+r}function en(e){y(e,this.put,this)}function tn(){}function un(e){var t,n,r,i;return typeof e=="function"?(t=e.$inject)||(t=[],n=e.toString().replace(on,""),r=n.match(nn),y(r[1].split(rn),function(e){e.replace(sn,function(e,n,r){t.push(r)})}),e.$inject=t):B(e)?(i=e.length-1,wt(e[i],"fn"),t=e.slice(0,i)):wt(e,"fn",!0),t}function an(e){function f(e){return function(t,n){if(!_(t))return e(t,n);y(t,E(e))}}function l(e,t){if(j(t)||B(t))t=o.instantiate(t);if(!t.$get)throw Error("Provider "+e+" must define $get factory method.");return s[e+n]=t}function c(e,t){return l(e,{$get:t})}function h(e,t){return c(e,["$injector",function(e){
|
||||
return e.instantiate(t)}])}function p(e,t){return c(e,A(t))}function v(e,t){s[e]=t,u[e]=t}function m(e,t){var r=o.get(e+n),i=r.$get;r.$get=function(){var e=a.invoke(i,r);return a.invoke(t,null,{$delegate:e})}}function g(e){var t=[];return y(e,function(e){if(i.get(e))return;i.put(e,!0);if(D(e)){var n=d(e);t=t.concat(g(n.requires)).concat(n._runBlocks);try{for(var r=n._invokeQueue,s=0,u=r.length;s<u;s++){var a=r[s],f=a[0]=="$injector"?o:o.get(a[0]);f[a[1]].apply(f,a[2])}}catch(l){throw l.message&&(l.message+=" from "+e),l}}else if(j(e))try{t.push(o.invoke(e))}catch(l){throw l.message&&(l.message+=" from "+e),l}else if(B(e))try{t.push(o.invoke(e))}catch(l){throw l.message&&(l.message+=" from "+String(e[e.length-1])),l}else wt(e,"module")}),t}function b(e,n){function i(i){if(typeof i!="string")throw Error("Service name expected");if(e.hasOwnProperty(i)){if(e[i]===t)throw Error("Circular dependency: "+r.join(" <- "));return e[i]}try{return r.unshift(i),e[i]=t,e[i]=n(i)}finally{r.shift()}}function s
|
||||
(e,t,n){var r=[],s=un(e),o,u,a;for(u=0,o=s.length;u<o;u++)a=s[u],r.push(n&&n.hasOwnProperty(a)?n[a]:i(a));e.$inject||(e=e[o]);switch(t?-1:r.length){case 0:return e();case 1:return e(r[0]);case 2:return e(r[0],r[1]);case 3:return e(r[0],r[1],r[2]);case 4:return e(r[0],r[1],r[2],r[3]);case 5:return e(r[0],r[1],r[2],r[3],r[4]);case 6:return e(r[0],r[1],r[2],r[3],r[4],r[5]);case 7:return e(r[0],r[1],r[2],r[3],r[4],r[5],r[6]);case 8:return e(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7]);case 9:return e(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8]);case 10:return e(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9]);default:return e.apply(t,r)}}function o(e,t){var n=function(){},r,i;return n.prototype=(B(e)?e[e.length-1]:e).prototype,r=new n,i=s(e,r,t),_(i)?i:r}return{invoke:s,instantiate:o,get:i,annotate:un}}var t={},n="Provider",r=[],i=new en,s={$provide:{provider:f(l),factory:f(c),service:f(h),value:f(p),constant:f(v),decorator:m}},o=b(s,function(){throw Error("Unknown provider: "+r.join(" <- ")
|
||||
)}),u={},a=u.$injector=b(u,function(e){var t=o.get(e+n);return a.invoke(t.$get,t)});return y(g(e),function(e){a.invoke(e||k)}),a}function fn(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,i){function o(e){var t=null;return y(e,function(e){!t&&r(e.nodeName)==="a"&&(t=e)}),t}function u(){var e=n.hash(),r;e?(r=s.getElementById(e))?r.scrollIntoView():(r=o(s.getElementsByName(e)))?r.scrollIntoView():e==="top"&&t.scrollTo(0,0):t.scrollTo(0,0)}var s=t.document;return e&&i.$watch(function(){return n.hash()},function(){i.$evalAsync(u)}),u}]}function ln(e,t,r,i){function v(e){try{e.apply(null,nt(arguments,1))}finally{p--;if(p===0)while(d.length)try{d.pop()()}catch(t){r.error(t)}}}function b(e,t){(function n(){y(m,function(e){e()}),g=t(n,e)})()}function N(){if(w==s.url())return;w=s.url(),y(x,function(e){e(s.url())})}var s=this,o=t[0],u=e.location,f=e.history,l=e.setTimeout,c=e.clearTimeout,h={};s.isMock=!1;var p=0,d=[];s.$$completeOutstandingRequest=
|
||||
v,s.$$incOutstandingRequestCount=function(){p++},s.notifyWhenNoOutstandingRequests=function(e){y(m,function(e){e()}),p===0?e():d.push(e)};var m=[],g;s.addPollFn=function(e){return O(g)&&b(100,l),m.push(e),e};var w=u.href,E=t.find("base"),S=null;s.url=function(e,t){if(e){if(w==e)return;return w=e,i.history?t?f.replaceState(null,"",e):(f.pushState(null,"",e),E.attr("href",E.attr("href"))):t?(u.replace(e),S=e):(u.href=e,S=null),s}return S||u.href.replace(/%27/g,"'")};var x=[],T=!1;s.onUrlChange=function(t){return T||(i.history&&a(e).bind("popstate",N),i.hashchange?a(e).bind("hashchange",N):s.addPollFn(N),T=!0),x.push(t),t},s.baseHref=function(){var e=E.attr("href");return e?e.replace(/^https?\:\/\/[^\/]*/,""):""};var C={},L="",A=s.baseHref();s.cookies=function(e,t){var i,s,u,a,f;if(!e){if(o.cookie!==L){L=o.cookie,s=L.split("; "),C={};for(a=0;a<s.length;a++){u=s[a],f=u.indexOf("=");if(f>0){var e=unescape(u.substring(0,f));C[e]===n&&(C[e]=unescape(u.substring(f+1)))}}}return C}t===n?o.cookie=
|
||||
escape(e)+"=;path="+A+";expires=Thu, 01 Jan 1970 00:00:00 GMT":D(t)&&(i=(o.cookie=escape(e)+"="+escape(t)+";path="+A).length+1,i>4096&&r.warn("Cookie '"+e+"' possibly not set or overflowed because it was too large ("+i+" > 4096 bytes)!"))},s.defer=function(e,t){var n;return p++,n=l(function(){delete h[n],v(e)},t||0),h[n]=!0,n},s.defer.cancel=function(e){return h[e]?(delete h[e],c(e),v(k),!0):!1}}function cn(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new ln(e,r,t,n)}]}function hn(){this.$get=function(){function t(t,n){function l(e){e!=a&&(f?f==e&&(f=e.n):f=e,c(e.n,e.p),c(e,a),a=e,a.n=null)}function c(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(t in e)throw Error("cacheId "+t+" taken");var r=0,i=T({},n,{id:t}),s={},o=n&&n.capacity||Number.MAX_VALUE,u={},a=null,f=null;return e[t]={put:function(e,t){var n=u[e]||(u[e]={key:e});l(n);if(O(t))return;e in s||r++,s[e]=t,r>o&&this.remove(f.key)},get:function(e){var t=u[e];if(!t)return;return l(t),s[e]},remove:function(
|
||||
e){var t=u[e];if(!t)return;t==a&&(a=t.p),t==f&&(f=t.n),c(t.n,t.p),delete u[e],delete s[e],r--},removeAll:function(){s={},r=0,u={},a=f=null},destroy:function(){s=null,i=null,u=null,delete e[t]},info:function(){return T({},i,{size:r})}}}var e={};return t.info=function(){var t={};return y(e,function(e,n){t[n]=e.info()}),t},t.get=function(t){return e[t]},t}}function pn(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function vn(e){var r={},i="Directive",s=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,o=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,f="Template must have exactly one root element. was: ",l=/^\s*(https?|ftp|mailto|file):/;this.directive=function c(t,n){return D(t)?(bt(n,"directive"),r.hasOwnProperty(t)||(r[t]=[],e.factory(t+i,["$injector","$exceptionHandler",function(e,n){var i=[];return y(r[t],function(r){try{var s=e.invoke(r);j(s)?s={compile:A(s)}:!s.compile&&s.link&&(s.compile=A(s.link)),s.priority=s.priority||0,s.name=s.name||t,s.require=s.require||s.controller&&s.name,s.restrict=
|
||||
s.restrict||"A",i.push(s)}catch(o){n(o)}}),i}])),r[t].push(n)):y(t,E(c)),this},this.urlSanitizationWhitelist=function(e){return M(e)?(l=e,this):l},this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document",function(e,c,h,p,d,m,g,b,w){function k(e,t,n){e instanceof a||(e=a(e)),y(e,function(t,n){t.nodeType==3&&t.nodeValue.match(/\S+/)&&(e[n]=a(t).wrap("<span></span>").parent()[0])});var r=P(e,t,e,n);return function(n,i){bt(n,"scope");var s=i?Jt.clone.call(e):e;for(var o=0,u=s.length;o<u;o++){var a=s[o];(a.nodeType==1||a.nodeType==9)&&s.eq(o).data("$scope",n)}return M(s,"ng-scope"),i&&i(s,n),r&&r(n,s,s),s}}function O(e,t){throw Error("Unsupported '"+t+"' for '"+e+"'.")}function M(e,t){try{e.addClass(t)}catch(n){}}function P(e,t,r,i){function p(e,r,i,o){var u,f,l,c,h,p,d,v,m=[];for(p=0,d=r.length;p<d;p++)m.push(r[p]);for(p=0,v=0,d=s.length;p<d;v++)l=m[v],u=s[p++],f=s[p++],u?(u.scope?(c=e.$new(_(u.scope)),a(l).data("$scope"
|
||||
,c)):c=e,h=u.transclude,h||!o&&t?u(f,c,l,i,function(t){return function(n){var r=e.$new();return r.$$transcluded=!0,t(r,n).bind("$destroy",rt(r,r.$destroy))}}(h||t)):u(f,c,l,n,o)):f&&f(e,l.childNodes,n,o)}var s=[],o,u,f,l,c;for(var h=0;h<e.length;h++)l=new E,f=H(e[h],[],l,i),o=f.length?F(f,e[h],l,t,r):null,u=o&&o.terminal||!e[h].childNodes||!e[h].childNodes.length?null:P(e[h].childNodes,o?o.transclude:t),s.push(o),s.push(u),c=c||o||u;return c?p:null}function H(e,t,n,r){var i=e.nodeType,a=n.$attr,f,l;switch(i){case 1:I(t,gn(v(e).toLowerCase()),"E",r);for(var c,h,p,d,m=e.attributes,g=0,y=m&&m.length;g<y;g++){c=m[g];if(!u||u>=8||c.specified)h=c.name,p=gn(h.toLowerCase()),a[p]=h,n[p]=d=z(u&&h=="href"?decodeURIComponent(e.getAttribute(h,2)):c.value),Gt(e,p)&&(n[p]=!0),V(e,t,d,p),I(t,p,"A",r)}l=e.className;if(D(l)&&l!=="")while(f=o.exec(l))p=gn(f[2]),I(t,p,"C",r)&&(n[p]=z(f[3])),l=l.substr(f.index+f[0].length);break;case 3:X(t,e.nodeValue);break;case 8:try{f=s.exec(e.nodeValue),f&&(p=gn(f[1]),
|
||||
I(t,p,"M",r)&&(n[p]=z(f[2])))}catch(b){}}return t.sort(U),t}function F(e,r,i,s,o){function X(e,t){e&&(e.require=w.require,l.push(e)),t&&(t.require=w.require,c.push(t))}function V(e,t){var n,r="data",i=!1;if(D(e)){while((n=e.charAt(0))=="^"||n=="?")e=e.substr(1),n=="^"&&(r="inheritedData"),i=i||n=="?";n=t[r]("$"+e+"Controller");if(!n&&!i)throw Error("No controller: "+e);return n}return B(e)&&(n=[],y(e,function(e){n.push(V(e,t))})),n}function J(e,t,s,o,u){var f,p,v,b,w,S;r===s?f=i:f=Z(i,new E(a(s),i.$attr)),p=f.$$element;if(d){var x=/^\s*([@=&])\s*(\w*)\s*$/,T=t.$parent||t;y(d.scope,function(e,n){var r=e.match(x)||[],i=r[2]||n,s=r[1],o,u,a;t.$$isolateBindings[n]=s+i;switch(s){case"@":f.$observe(i,function(e){t[n]=e}),f.$$observers[i].$$scope=T;break;case"=":u=m(f[i]),a=u.assign||function(){throw o=t[n]=u(T),Error(dn+f[i]+" (directive: "+d.name+")")},o=t[n]=u(T),t.$watch(function(){var r=u(T);return r!==t[n]&&(r!==o?o=t[n]=r:a(T,r=o=t[n])),r});break;case"&":u=m(f[i]),t[n]=function(e){return u
|
||||
(T,e)};break;default:throw Error("Invalid isolate scope definition for directive "+d.name+": "+e)}})}L&&y(L,function(e){var n={$scope:t,$element:p,$attrs:f,$transclude:u};S=e.controller,S=="@"&&(S=f[e.name]),p.data("$"+e.name+"Controller",g(S,n))});for(v=0,b=l.length;v<b;v++)try{w=l[v],w(t,p,f,w.require&&V(w.require,p))}catch(N){h(N,at(p))}e&&e(t,s.childNodes,n,u);for(v=0,b=c.length;v<b;v++)try{w=c[v],w(t,p,f,w.require&&V(w.require,p))}catch(N){h(N,at(p))}}var u=-Number.MAX_VALUE,l=[],c=[],p=null,d=null,v=null,b=i.$$element=a(r),w,S,x,T,N=s,L,A,O;for(var P=0,F=e.length;P<F;P++){w=e[P],x=n;if(u>w.priority)break;if(O=w.scope)W("isolated scope",d,w,b),_(O)&&(M(b,"ng-isolate-scope"),d=w),M(b,"ng-scope"),p=p||w;S=w.name;if(O=w.controller)L=L||{},W("'"+S+"' controller",L[S],w,b),L[S]=w;if(O=w.transclude)W("transclusion",T,w,b),T=w,u=w.priority,O=="element"?(x=a(r),b=i.$$element=a(t.createComment(" "+S+": "+i[S]+" ")),r=b[0],$(o,a(x[0]),r),N=k(x,s,u)):(x=a(Bt(r)).contents(),b.html(""),N=k(x,s)
|
||||
);if(O=w.template){W("template",v,w,b),v=w,O=C(O);if(w.replace){x=a("<div>"+z(O)+"</div>").contents(),r=x[0];if(x.length!=1||r.nodeType!==1)throw new Error(f+O);$(o,b,r);var I={$attr:{}};e=e.concat(H(r,e.splice(P+1,e.length-(P+1)),I)),q(i,I),F=e.length}else b.html(O)}if(w.templateUrl)W("template",v,w,b),v=w,J=R(e.splice(P,e.length-P),J,b,i,o,w.replace,N),F=e.length;else if(w.compile)try{A=w.compile(b,i,N),j(A)?X(null,A):A&&X(A.pre,A.post)}catch(U){h(U,at(b))}w.terminal&&(J.terminal=!0,u=Math.max(u,w.priority))}return J.scope=p&&p.scope,J.transclude=T&&N,J}function I(t,s,o,u){var a=!1;if(r.hasOwnProperty(s))for(var f,l=e.get(s+i),c=0,p=l.length;c<p;c++)try{f=l[c],(u===n||u>f.priority)&&f.restrict.indexOf(o)!=-1&&(t.push(f),a=!0)}catch(d){h(d)}return a}function q(e,t){var n=t.$attr,r=e.$attr,i=e.$$element;y(e,function(r,i){i.charAt(0)!="$"&&(t[i]&&(r+=(i==="style"?";":" ")+t[i]),e.$set(i,r,!0,n[i]))}),y(t,function(t,s){s=="class"?(M(i,t),e["class"]=(e["class"]?e["class"]+" ":"")+t):s=="style"?
|
||||
i.attr("style",i.attr("style")+";"+t):s.charAt(0)!="$"&&!e.hasOwnProperty(s)&&(e[s]=t,r[s]=n[s])})}function R(e,t,n,r,i,s,o){var u=[],l,c,h=n[0],v=e.shift(),m=T({},v,{controller:null,templateUrl:null,transclude:null,scope:null});return n.html(""),p.get(v.templateUrl,{cache:d}).success(function(p){var d,v,g;p=C(p);if(s){g=a("<div>"+z(p)+"</div>").contents(),d=g[0];if(g.length!=1||d.nodeType!==1)throw new Error(f+p);v={$attr:{}},$(i,n,d),H(d,e,v),q(r,v)}else d=h,n.html(p);e.unshift(m),l=F(e,d,r,o),c=P(n[0].childNodes,o);while(u.length){var y=u.pop(),b=u.pop(),w=u.pop(),E=u.pop(),S=d;w!==h&&(S=Bt(d),$(b,a(w),S)),l(function(){t(c,E,S,i,y)},E,S,i,y)}u=null}).error(function(e,t,n,r){throw Error("Failed to load template: "+r.url)}),function(n,r,i,s,o){u?(u.push(r),u.push(i),u.push(s),u.push(o)):l(function(){t(c,r,i,s,o)},r,i,s,o)}}function U(e,t){return t.priority-e.priority}function W(e,t,n,r){if(t)throw Error("Multiple directives ["+t.name+", "+n.name+"] asking for "+e+" on: "+at(r))}function X
|
||||
(e,t){var n=c(t,!0);n&&e.push({priority:0,compile:A(function(t,r){var i=r.parent(),s=i.data("$binding")||[];s.push(n),M(i.data("$binding",s),"ng-binding"),t.$watch(n,function(t){r[0].nodeValue=t})})})}function V(e,t,r,i){var s=c(r,!0);if(!s)return;t.push({priority:100,compile:A(function(t,r,o){var u=o.$$observers||(o.$$observers={});i==="class"&&(s=c(o[i],!0)),o[i]=n,(u[i]||(u[i]=[])).$$inter=!0,(o.$$observers&&o.$$observers[i].$$scope||t).$watch(s,function(t){o.$set(i,t)})})})}function $(e,t,n){var r=t[0],i=r.parentNode,s,o;if(e)for(s=0,o=e.length;s<o;s++)if(e[s]==r){e[s]=n;break}i&&i.replaceChild(n,r),n[a.expando]=r[a.expando],t[0]=n}var E=function(e,t){this.$$element=e,this.$attr=t||{}};E.prototype={$normalize:gn,$set:function(e,t,r,i){var s=Gt(this.$$element[0],e),o=this.$$observers,u;s&&(this.$$element.prop(e,t),i=s),this[e]=t,i?this.$attr[e]=i:(i=this.$attr[e],i||(this.$attr[e]=i=gt(e,"-"))),v(this.$$element[0])==="A"&&e==="href"&&(S.setAttribute("href",t),u=S.href,u!==""&&!u.match
|
||||
(l)&&(this[e]=t="unsafe:"+u)),r!==!1&&(t===null||t===n?this.$$element.removeAttr(i):this.$$element.attr(i,t)),o&&y(o[e],function(e){try{e(t)}catch(n){h(n)}})},$observe:function(e,t){var n=this,r=n.$$observers||(n.$$observers={}),i=r[e]||(r[e]=[]);return i.push(t),b.$evalAsync(function(){i.$$inter||t(n[e])}),t}};var S=w[0].createElement("a"),x=c.startSymbol(),N=c.endSymbol(),C=x=="{{"||N=="}}"?L:function(t){return t.replace(/\{\{/g,x).replace(/}}/g,N)};return k}]}function gn(e){return Dt(e.replace(mn,""))}function yn(e,t,n,r){}function bn(e,t,n,r,i){}function wn(){var e={};this.register=function(t,n){_(t)?T(e,t):e[t]=n},this.$get=["$injector","$window",function(t,n){return function(r,i){if(D(r)){var s=r;r=e.hasOwnProperty(s)?e[s]:Et(i.$scope,s,!0)||Et(n,s,!0),wt(r,s,!0)}return t.instantiate(r,i)}}]}function En(){this.$get=["$window",function(e){return a(e.document)}]}function Sn(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function xn(){var e="{{",t="}}"
|
||||
;this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse",function(r){function o(o,u){var a,f,l=0,c=[],h=o.length,p=!1,d,v,m=[];while(l<h)(a=o.indexOf(e,l))!=-1&&(f=o.indexOf(t,a+i))!=-1?(l!=a&&c.push(o.substring(l,a)),c.push(d=r(v=o.substring(a+i,f))),d.exp=v,l=f+s,p=!0):(l!=h&&c.push(o.substring(l)),l=h);(h=c.length)||(c.push(""),h=1);if(!u||p)return m.length=h,d=function(e){for(var t=0,r=h,i;t<r;t++)typeof (i=c[t])=="function"&&(i=i(e),i==null||i==n?i="":typeof i!="string"&&(i=st(i))),m[t]=i;return m.join("")},d.exp=o,d.parts=c,d}var i=e.length,s=t.length;return o.startSymbol=function(){return e},o.endSymbol=function(){return t},o}]}function Ln(e){var t=e.split("/"),n=t.length;while(n--)t[n]=ht(t[n]);return t.join("/")}function An(e){return e.split("#")[0]}function On(e,t){var n=Tn.exec(e);return n={protocol:n[1],host:n[3],port:N(n[5])||kn[n[1]]||null,path:n[6]||"/",search:n[8],hash:n[10]},t&&(t.$$protocol=n.protocol,t.
|
||||
$$host=n.host,t.$$port=n.port),n}function Mn(e,t,n){return e+"://"+t+(n==kn[e]?"":":"+n)}function _n(e){return e.substr(0,e.lastIndexOf("/"))}function Dn(e,t,n){var r=On(e);return decodeURIComponent(r.path)!=t||O(r.hash)||r.hash.indexOf(n)!==0?e:Mn(r.protocol,r.host,r.port)+_n(t)+r.hash.substr(n.length)}function Pn(e,t,n){var r=On(e);if(decodeURIComponent(r.path)==t&&!O(r.hash)&&r.hash.indexOf(n)===0)return e;var i=r.search&&"?"+r.search||"",s=r.hash&&"#"+r.hash||"",o=_n(t),u=r.path.substr(o.length);if(r.path.indexOf(o)!==0)throw Error('Invalid url "'+e+'", missing path prefix "'+o+'" !');return Mn(r.protocol,r.host,r.port)+t+"#"+n+u+i+s}function Hn(e,t,n){t=t||"",this.$$parse=function(e){var n=On(e,this);if(n.path.indexOf(t)!==0)throw Error('Invalid url "'+e+'", missing path prefix "'+t+'" !');this.$$path=decodeURIComponent(n.path.substr(t.length)),this.$$search=lt(n.search),this.$$hash=n.hash&&decodeURIComponent(n.hash)||"",this.$$compose()},this.$$compose=function(){var e=ct(this.$$search
|
||||
),n=this.$$hash?"#"+ht(this.$$hash):"";this.$$url=Ln(this.$$path)+(e?"?"+e:"")+n,this.$$absUrl=Mn(this.$$protocol,this.$$host,this.$$port)+t+this.$$url},this.$$rewriteAppUrl=function(e){if(e.indexOf(n)==0)return e},this.$$parse(e)}function Bn(e,t,n){var r;this.$$parse=function(e){var n=On(e,this);if(n.hash&&n.hash.indexOf(t)!==0)throw Error('Invalid url "'+e+'", missing hash prefix "'+t+'" !');r=n.path+(n.search?"?"+n.search:""),n=Cn.exec((n.hash||"").substr(t.length)),n[1]?this.$$path=(n[1].charAt(0)=="/"?"":"/")+decodeURIComponent(n[1]):this.$$path="",this.$$search=lt(n[3]),this.$$hash=n[5]&&decodeURIComponent(n[5])||"",this.$$compose()},this.$$compose=function(){var e=ct(this.$$search),n=this.$$hash?"#"+ht(this.$$hash):"";this.$$url=Ln(this.$$path)+(e?"?"+e:"")+n,this.$$absUrl=Mn(this.$$protocol,this.$$host,this.$$port)+r+(this.$$url?"#"+t+this.$$url:"")},this.$$rewriteAppUrl=function(e){if(e.indexOf(n)==0)return e},this.$$parse(e)}function jn(e,t,n,r){Bn.apply(this,arguments),this.$$rewriteAppUrl=
|
||||
function(e){if(e.indexOf(n)==0)return n+r+"#"+t+e.substr(n.length)}}function Fn(e){return function(){return this[e]}}function In(e,t){return function(n){return O(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function qn(){var t="",n=!1;this.hashPrefix=function(e){return M(e)?(t=e,this):t},this.html5Mode=function(e){return M(e)?(n=e,this):n},this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(i,s,o,u){function m(e){i.$broadcast("$locationChangeSuccess",f.absUrl(),e)}var f,l,c,h=s.url(),p=On(h),d;n?(l=s.baseHref()||"/",c=_n(l),d=Mn(p.protocol,p.host,p.port)+c+"/",o.history?f=new Hn(Dn(h,l,t),c,d):f=new jn(Pn(h,l,t),t,d,l.substr(c.length+1))):(d=Mn(p.protocol,p.host,p.port)+(p.path||"")+(p.search?"?"+p.search:"")+"#"+t+"/",f=new Bn(h,t,d)),u.bind("click",function(t){if(t.ctrlKey||t.metaKey||t.which==2)return;var n=a(t.target);while(r(n[0].nodeName)!=="a")if(n[0]===u[0]||!(n=n.parent())[0])return;var s=n.prop("href"),o=f.$$rewriteAppUrl(s);s&&!n.attr("target")&&o&&(f.$$parse
|
||||
(o),i.$apply(),t.preventDefault(),e.angular["ff-684208-preventDefault"]=!0)}),f.absUrl()!=h&&s.url(f.absUrl(),!0),s.onUrlChange(function(e){if(f.absUrl()!=e){if(i.$broadcast("$locationChangeStart",e,f.absUrl()).defaultPrevented){s.url(f.absUrl());return}i.$evalAsync(function(){var t=f.absUrl();f.$$parse(e),m(t)}),i.$$phase||i.$digest()}});var v=0;return i.$watch(function(){var t=s.url(),n=f.$$replace;if(!v||t!=f.absUrl())v++,i.$evalAsync(function(){i.$broadcast("$locationChangeStart",f.absUrl(),t).defaultPrevented?f.$$parse(t):(s.url(f.absUrl(),n),m(t))});return f.$$replace=!1,v}),f}]}function Rn(){this.$get=["$window",function(e){function t(e){return e instanceof Error&&(e.stack?e=e.message&&e.stack.indexOf(e.message)===-1?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function n(n){var r=e.console||{},i=r[n]||r.log||k;return i.apply?function(){var e=[];return y(arguments,function(n){e.push(t(n))}),i.apply(r,e)}:function(e,t){i(e,t)}}
|
||||
return{log:n("log"),warn:n("warn"),info:n("info"),error:n("error")}}]}function Wn(e,t){function h(e){return e.indexOf(u)!=-1}function p(e){return e.indexOf(a)!=-1}function d(){return s+1<e.length?e.charAt(s+1):!1}function v(e){return"0"<=e&&e<="9"}function m(e){return e==" "||e=="\r"||e==" "||e=="\n"||e==""||e==" "}function g(e){return"a"<=e&&e<="z"||"A"<=e&&e<="Z"||"_"==e||e=="$"}function y(e){return e=="-"||e=="+"||v(e)}function b(t,n,r){throw r=r||s,Error("Lexer Error: "+t+" at column"+(M(n)?"s "+n+"-"+s+" ["+e.substring(n,r)+"]":" "+r)+" in expression ["+e+"].")}function w(){var t="",i=s;while(s<e.length){var o=r(e.charAt(s));if(o=="."||v(o))t+=o;else{var u=d();if(o=="e"&&y(u))t+=o;else if(y(o)&&u&&v(u)&&t.charAt(t.length-1)=="e")t+=o;else{if(!y(o)||!!u&&!!v(u)||t.charAt(t.length-1)!="e")break;b("Invalid exponent")}}s++}t=1*t,n.push({index:i,text:t,json:!0,fn:function(){return t}})}function E(){var r="",i=s,o,u,a,f;while(s<e.length){f=e.charAt(s);if(f!="."&&!g(f)&&!v(f))break;f=="."&&
|
||||
(o=s),r+=f,s++}if(o){u=s;while(u<e.length){f=e.charAt(u);if(f=="("){a=r.substr(o-i+1),r=r.substr(0,o-i),s=u;break}if(!m(f))break;u++}}var l={index:i,text:r};if(Un.hasOwnProperty(r))l.fn=l.json=Un[r];else{var c=Kn(r,t);l.fn=T(function(e,t){return c(e,t)},{assign:function(e,t){return Vn(e,r,t)}})}n.push(l),a&&(n.push({index:o,text:".",json:!1}),n.push({index:o+1,text:a,json:!1}))}function S(t){var r=s;s++;var i="",o=t,u=!1;while(s<e.length){var a=e.charAt(s);o+=a;if(u){if(a=="u"){var f=e.substring(s+1,s+5);f.match(/[\da-f]{4}/i)||b("Invalid unicode escape [\\u"+f+"]"),s+=4,i+=String.fromCharCode(parseInt(f,16))}else{var l=zn[a];l?i+=l:i+=a}u=!1}else if(a=="\\")u=!0;else{if(a==t){s++,n.push({index:r,text:o,string:i,json:!0,fn:function(){return i}});return}i+=a}s++}b("Unterminated quote",r)}var n=[],i,s=0,o=[],u,a=":";while(s<e.length){u=e.charAt(s);if(h("\"'"))S(u);else if(v(u)||h(".")&&v(d()))w();else if(g(u))E(),p("{,")&&o[0]=="{"&&(i=n[n.length-1])&&(i.json=i.text.indexOf(".")==-1);else if(
|
||||
h("(){}[].,;:"))n.push({index:s,text:u,json:p(":[,")&&h("{[")||h("}]:,")}),h("{[")&&o.unshift(u),h("}]")&&o.shift(),s++;else{if(m(u)){s++;continue}var f=u+d(),l=Un[u],c=Un[f];c?(n.push({index:s,text:f,fn:c}),s+=2):l?(n.push({index:s,text:u,fn:l,json:p("[,:")&&h("+-")}),s+=1):b("Unexpected next character ",s,s+1)}a=u}return n}function Xn(e,t,r,i){function p(t,n){throw Error("Syntax Error: Token '"+n.text+"' "+t+" at column "+(n.index+1)+" of the expression ["+e+"] starting at ["+e.substring(n.index)+"].")}function d(){if(u.length===0)throw Error("Unexpected end of expression: "+e);return u[0]}function v(e,t,n,r){if(u.length>0){var i=u[0],s=i.text;if(s==e||s==t||s==n||s==r||!e&&!t&&!n&&!r)return i}return!1}function m(e,n,r,i){var s=v(e,n,r,i);return s?(t&&!s.json&&p("is not valid json",s),u.shift(),s):!1}function g(e){m(e)||p("is unexpected, expecting ["+e+"]",v())}function y(e,t){return function(n,r){return e(n,r,t)}}function b(e,t,n){return function(r,i){return t(r,i,e,n)}}function w(){
|
||||
var e=[];for(;;){u.length>0&&!v("}",")",";","]")&&e.push(h());if(!m(";"))return e.length==1?e[0]:function(t,n){var r;for(var i=0;i<e.length;i++){var s=e[i];s&&(r=s(t,n))}return r}}}function E(){var e=x(),t;for(;;){if(!(t=m("|")))return e;e=b(e,t.fn,S())}}function S(){var e=m(),t=r(e.text),n=[];for(;;){if(!(e=m(":"))){var i=function(e,r,i){var s=[i];for(var o=0;o<n.length;o++)s.push(n[o](e,r));return t.apply(e,s)};return function(){return i}}n.push(x())}}function x(){return a()}function N(){var t=C(),n,r;return(r=m("="))?(t.assign||p("implies assignment but ["+e.substring(0,r.index)+"] can not be assigned to",r),n=C(),function(e,r){return t.assign(e,n(e,r),r)}):t}function C(){var e=L(),t;for(;;){if(!(t=m("||")))return e;e=b(e,t.fn,L())}}function L(){var e=O(),t;if(t=m("&&"))e=b(e,t.fn,L());return e}function O(){var e=M(),t;if(t=m("==","!="))e=b(e,t.fn,O());return e}function M(){var e=_(),t;if(t=m("<",">","<=",">="))e=b(e,t.fn,M());return e}function _(){var e=D(),t;while(t=m("+","-"))e=b(
|
||||
e,t.fn,D());return e}function D(){var e=P(),t;while(t=m("*","/","%"))e=b(e,t.fn,P());return e}function P(){var e;return m("+")?H():(e=m("-"))?b(s,e.fn,P()):(e=m("!"))?y(e.fn,P()):H()}function H(){var e;if(m("("))e=h(),g(")");else if(m("["))e=I();else if(m("{"))e=q();else{var t=m();e=t.fn,e||p("not a primary expression",t)}var n,r;while(n=m("(","[","."))n.text==="("?(e=f(e,r),r=null):n.text==="["?(r=e,e=c(e)):n.text==="."?(r=e,e=l(e)):p("IMPOSSIBLE");return e}function B(e){var t=m().text,n=Kn(t,i);return T(function(t,r,i){return n(i||e(t,r),r)},{assign:function(n,r,i){return Vn(e(n,i),t,r)}})}function j(e){var t=x();return g("]"),T(function(r,i){var s=e(r,i),o=t(r,i),u,a;return s?(u=s[o],u&&u.then&&(a=u,"$$v"in u||(a.$$v=n,a.then(function(e){a.$$v=e})),u=u.$$v),u):n},{assign:function(n,r,i){return e(n,i)[t(n,i)]=r}})}function F(e,t){var n=[];if(d().text!=")")do n.push(x());while(m(","));return g(")"),function(r,i){var s=[],o=t?t(r,i):r;for(var u=0;u<n.length;u++)s.push(n[u](r,i));var a=e
|
||||
(r,i,o)||k;return a.apply?a.apply(o,s):a(s[0],s[1],s[2],s[3],s[4])}}function I(){var e=[];if(d().text!="]")do e.push(x());while(m(","));return g("]"),function(t,n){var r=[];for(var i=0;i<e.length;i++)r.push(e[i](t,n));return r}}function q(){var e=[];if(d().text!="}")do{var t=m(),n=t.string||t.text;g(":");var r=x();e.push({key:n,value:r})}while(m(","));return g("}"),function(t,n){var r={};for(var i=0;i<e.length;i++){var s=e[i];r[s.key]=s.value(t,n)}return r}}var s=A(0),o,u=Wn(e,i),a=N,f=F,l=B,c=j,h=E;return t?(a=C,f=l=c=h=function(){p("is not valid json",{text:e,index:0})},o=H()):o=w(),u.length!==0&&p("is an unexpected token",u[0]),o}function Vn(e,t,n){var r=t.split(".");for(var i=0;r.length>1;i++){var s=r.shift(),o=e[s];o||(o={},e[s]=o),e=o}return e[r.shift()]=n,n}function Jn(e,t,r,i,s){return function(o,u){var a=u&&u.hasOwnProperty(e)?u:o,f;return a===null||a===n?a:(a=a[e],a&&a.then&&("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),!t||a===null||a===n?a:(a=a[t],a&&a.then&&
|
||||
("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),!r||a===null||a===n?a:(a=a[r],a&&a.then&&("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),!i||a===null||a===n?a:(a=a[i],a&&a.then&&("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),!s||a===null||a===n?a:(a=a[s],a&&a.then&&("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),a)))))}}function Kn(e,t){if($n.hasOwnProperty(e))return $n[e];var r=e.split("."),i=r.length,s;if(t)s=i<6?Jn(r[0],r[1],r[2],r[3],r[4]):function(e,t){var s=0,o;do o=Jn(r[s++],r[s++],r[s++],r[s++],r[s++])(e,t),t=n,e=o;while(s<i);return o};else{var o="var l, fn, p;\n";y(r,function(e,t){o+="if(s === null || s === undefined) return s;\nl=s;\ns="+(t?"s":'((k&&k.hasOwnProperty("'+e+'"))?k:s)')+'["'+e+'"]'+";\n"+"if (s && s.then) {\n"+' if (!("$$v" in s)) {\n'+" p=s;\n"+" p.$$v = undefined;\n"+" p.then(function(v) {p.$$v=v;});\n"+"}\n"+" s=s.$$v\n"+"}\n"}),o+="return s;",s=Function("s","k",o),s.toString=function(){return o}
|
||||
}return $n[e]=s}function Qn(){var e={};this.$get=["$filter","$sniffer",function(t,n){return function(r){switch(typeof r){case"string":return e.hasOwnProperty(r)?e[r]:e[r]=Xn(r,!1,t,n.csp);case"function":return r;default:return k}}}]}function Gn(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return Yn(function(t){e.$evalAsync(t)},t)}]}function Yn(e,t){function u(e){return e}function a(e){return s(e)}function f(e){var t=r(),n=e.length,s=[];return n?y(e,function(e,r){i(e).then(function(e){if(r in s)return;s[r]=e,--n||t.resolve(s)},function(e){if(r in s)return;t.reject(e)})}):t.resolve(s),t.promise}var r=function(){var o=[],f,l;return l={resolve:function(t){if(o){var r=o;o=n,f=i(t),r.length&&e(function(){var e;for(var t=0,n=r.length;t<n;t++)e=r[t],f.then(e[0],e[1])})}},reject:function(e){l.resolve(s(e))},promise:{then:function(e,n){var i=r(),s=function(n){try{i.resolve((e||u)(n))}catch(r){i.reject(r),t(r)}},l=function(e){try{i.resolve((n||a)(e))}catch(r){i.reject(r),t(r)}};return o?
|
||||
o.push([s,l]):f.then(s,l),i.promise}}},l},i=function(t){return t&&t.then?t:{then:function(n){var i=r();return e(function(){i.resolve(n(t))}),i.promise}}},s=function(t){return{then:function(n,i){var s=r();return e(function(){s.resolve((i||a)(t))}),s.promise}}},o=function(n,o,f){var l=r(),c,h=function(e){try{return(o||u)(e)}catch(n){return t(n),s(n)}},p=function(e){try{return(f||a)(e)}catch(n){return t(n),s(n)}};return e(function(){i(n).then(function(e){if(c)return;c=!0,l.resolve(i(e).then(h,p))},function(e){if(c)return;c=!0,l.resolve(p(e))})}),l.promise};return{defer:r,reject:s,when:o,all:f}}function Zn(){var e={};this.when=function(t,n){e[t]=T({reloadOnSearch:!0},n);if(t){var r=t[t.length-1]=="/"?t.substr(0,t.length-1):t+"/";e[r]={redirectTo:t}}return this},this.otherwise=function(e){return this.when(null,e),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache",function(t,n,r,i,s,o,u){function l(e,t){t="^"+t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"
|
||||
)+"$";var n="",r=[],i={},s=/:(\w+)/g,o,u=0;while((o=s.exec(t))!==null)n+=t.slice(u,o.index),n+="([^\\/]*)",r.push(o[1]),u=s.lastIndex;n+=t.substr(u);var a=e.match(new RegExp(n));return a&&y(r,function(e,t){i[e]=a[t+1]}),a?i:null}function c(){var e=h(),l=f.current;if(e&&l&&e.$$route===l.$$route&&et(e.pathParams,l.pathParams)&&!e.reloadOnSearch&&!a)l.params=e.params,Y(l.params,r),t.$broadcast("$routeUpdate",l);else if(e||l)a=!1,t.$broadcast("$routeChangeStart",e,l),f.current=e,e&&e.redirectTo&&(D(e.redirectTo)?n.path(p(e.redirectTo,e.params)).search(e.params).replace():n.url(e.redirectTo(e.pathParams,n.path(),n.search())).replace()),i.when(e).then(function(){if(e){var t=[],n=[],r;return y(e.resolve||{},function(e,r){t.push(r),n.push(D(e)?s.get(e):s.invoke(e))}),M(r=e.template)||M(r=e.templateUrl)&&(r=o.get(r,{cache:u}).then(function(e){return e.data})),M(r)&&(t.push("$template"),n.push(r)),i.all(n).then(function(e){var n={};return y(e,function(e,r){n[t[r]]=e}),n})}}).then(function(n){e==f
|
||||
.current&&(e&&(e.locals=n,Y(e.params,r)),t.$broadcast("$routeChangeSuccess",e,l))},function(n){e==f.current&&t.$broadcast("$routeChangeError",e,l,n)})}function h(){var t,r;return y(e,function(e,i){!r&&(t=l(n.path(),i))&&(r=C(e,{params:T({},n.search(),t),pathParams:t}),r.$$route=e)}),r||e[null]&&C(e[null],{params:{},pathParams:{}})}function p(e,t){var n=[];return y((e||"").split(":"),function(e,r){if(r==0)n.push(e);else{var i=e.match(/(\w+)(.*)/),s=i[1];n.push(t[s]),n.push(i[2]||""),delete t[s]}}),n.join("")}var a=!1,f={routes:e,reload:function(){a=!0,t.$evalAsync(c)}};return t.$on("$locationChangeSuccess",c),f}]}function er(){this.$get=A({})}function tr(){var e=10;this.digestTtl=function(t){return arguments.length&&(e=t),e},this.$get=["$injector","$exceptionHandler","$parse",function(t,n,r){function i(){this.$id=S(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this["this"]=this.$root=this,this.$$destroyed=!1,this.
|
||||
$$asyncQueue=[],this.$$listeners={},this.$$isolateBindings={}}function o(e){if(s.$$phase)throw Error(s.$$phase+" already in progress");s.$$phase=e}function u(){s.$$phase=null}function a(e,t){var n=r(e);return wt(n,t),n}function f(){}i.prototype={$new:function(e){var t,n;if(j(e))throw Error("API-CHANGE: Use $controller to instantiate controllers.");return e?(n=new i,n.$root=this.$root):(t=function(){},t.prototype=this,n=new t,n.$id=S()),n["this"]=n,n.$$listeners={},n.$parent=this,n.$$asyncQueue=[],n.$$watchers=n.$$nextSibling=n.$$childHead=n.$$childTail=null,n.$$prevSibling=this.$$childTail,this.$$childHead?(this.$$childTail.$$nextSibling=n,this.$$childTail=n):this.$$childHead=this.$$childTail=n,n},$watch:function(e,t,n){var r=this,i=a(e,"watch"),s=r.$$watchers,o={fn:t,last:f,get:i,exp:e,eq:!!n};if(!j(t)){var u=a(t||k,"listener");o.fn=function(e,t,n){u(n)}}return s||(s=r.$$watchers=[]),s.unshift(o),function(){Q(s,o)}},$digest:function(){var t,r,i,s,a,l,c,h=e,p,d,v=this,m=[],g,y;o("$digest"
|
||||
);do{c=!1,d=v;do{a=d.$$asyncQueue;while(a.length)try{d.$eval(a.shift())}catch(b){n(b)}if(s=d.$$watchers){l=s.length;while(l--)try{t=s[l],t&&(r=t.get(d))!==(i=t.last)&&!(t.eq?et(r,i):typeof r=="number"&&typeof i=="number"&&isNaN(r)&&isNaN(i))&&(c=!0,t.last=t.eq?Y(r):r,t.fn(r,i===f?r:i,d),h<5&&(g=4-h,m[g]||(m[g]=[]),y=j(t.exp)?"fn: "+(t.exp.name||t.exp.toString()):t.exp,y+="; newVal: "+st(r)+"; oldVal: "+st(i),m[g].push(y)))}catch(b){n(b)}}if(!(p=d.$$childHead||d!==v&&d.$$nextSibling))while(d!==v&&!(p=d.$$nextSibling))d=d.$parent}while(d=p);if(c&&!(h--))throw u(),Error(e+" $digest() iterations reached. Aborting!\n"+"Watchers fired in the last 5 iterations: "+st(m))}while(c||a.length);u()},$destroy:function(){if(s==this||this.$$destroyed)return;var e=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e.$$childTail==this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling
|
||||
),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null},$eval:function(e,t){return r(e)(this,t)},$evalAsync:function(e){this.$$asyncQueue.push(e)},$apply:function(e){try{return o("$apply"),this.$eval(e)}catch(t){n(t)}finally{u();try{s.$digest()}catch(t){throw n(t),t}}},$on:function(e,t){var n=this.$$listeners[e];return n||(this.$$listeners[e]=n=[]),n.push(t),function(){n[K(n,t)]=null}},$emit:function(e,t){var r=[],i,s=this,o=!1,u={name:e,targetScope:s,stopPropagation:function(){o=!0},preventDefault:function(){u.defaultPrevented=!0},defaultPrevented:!1},a=tt([u],arguments,1),f,l;do{i=s.$$listeners[e]||r,u.currentScope=s;for(f=0,l=i.length;f<l;f++){if(!i[f]){i.splice(f,1),f--,l--;continue}try{i[f].apply(null,a);if(o)return u}catch(c){n(c)}}s=s.$parent}while(s);return u},$broadcast:function(e,t){var r=this,i=r,s=r,o={name:e,targetScope:r,preventDefault:function(){o.defaultPrevented=!0
|
||||
},defaultPrevented:!1},u=tt([o],arguments,1),a,f,l;do{i=s,o.currentScope=i,a=i.$$listeners[e]||[];for(f=0,l=a.length;f<l;f++){if(!a[f]){a.splice(f,1),f--,l--;continue}try{a[f].apply(null,u)}catch(c){n(c)}}if(!(s=i.$$childHead||i!==r&&i.$$nextSibling))while(i!==r&&!(s=i.$$nextSibling))i=i.$parent}while(i=s);return o}};var s=new i;return s}]}function nr(){this.$get=["$window",function(e){var t={},n=N((/android (\d+)/.exec(r(e.navigator.userAgent))||[])[1]);return{history:!(!e.history||!e.history.pushState||n<4),hashchange:"onhashchange"in e&&(!e.document.documentMode||e.document.documentMode>7),hasEvent:function(n){if(n=="input"&&u==9)return!1;if(O(t[n])){var r=e.document.createElement("div");t[n]="on"+n in r}return t[n]},csp:!1}}]}function rr(){this.$get=A(e)}function ir(e){var t={},n,i,s;return e?(y(e.split("\n"),function(e){s=e.indexOf(":"),n=r(z(e.substr(0,s))),i=z(e.substr(s+1)),n&&(t[n]?t[n]+=", "+i:t[n]=i)}),t):t}function sr(e){var t=_(e)?e:n;return function(n){return t||(t=ir(e)),
|
||||
n?t[r(n)]||null:t}}function or(e,t,n){return j(n)?n(e,t):(y(n,function(n){e=n(e,t)}),e)}function ur(e){return 200<=e&&e<300}function ar(){var e=/^\s*(\[|\{[^\{])/,t=/[\}\]]\s*$/,s=/^\)\]\}',?\n/,o=this.defaults={transformResponse:[function(n){return D(n)&&(n=n.replace(s,""),e.test(n)&&t.test(n)&&(n=ot(n,!0))),n}],transformRequest:[function(e){return _(e)&&!R(e)?st(e):e}],headers:{common:{Accept:"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest"},post:{"Content-Type":"application/json;charset=utf-8"},put:{"Content-Type":"application/json;charset=utf-8"}}},u=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(e,t,s,a,f,l){function p(e){function b(e){var t=T({},e,{data:or(e.data,e.headers,s)});return ur(e.status)?t:f.reject(t)}e.method=i(e.method);var n=e.transformRequest||o.transformRequest,s=e.transformResponse||o.transformResponse,u=T({},e.headers),a=T({"X-XSRF-TOKEN":t.cookies()["XSRF-TOKEN"]},o.headers
|
||||
.common,o.headers[r(e.method)]),l,c,p,d,v;e:for(c in a){p=r(c);for(d in e.headers)if(r(d)===p)continue e;u[c]=a[c]}if(O(e.data))for(var g in u)if(r(g)==="content-type"){delete u[g];break}return l=or(e.data,sr(u),n),v=m(e,l,u),v=v.then(b,b),y(h,function(e){v=e(v)}),v.success=function(t){return v.then(function(n){t(n.data,n.status,n.headers,e)}),v},v.error=function(t){return v.then(null,function(n){t(n.data,n.status,n.headers,e)}),v},v}function d(e){y(arguments,function(e){p[e]=function(t,n){return p(T(n||{},{method:e,url:t}))}})}function v(e){y(arguments,function(e){p[e]=function(t,n,r){return p(T(r||{},{method:e,url:t,data:n}))}})}function m(t,n,r){function h(e,t,n){o&&(ur(e)?o.put(l,[e,t,ir(n)]):o.remove(l)),d(t,e,n),a.$apply()}function d(e,n,r){n=Math.max(n,0),(ur(n)?i.resolve:i.reject)({data:e,status:n,headers:sr(r),config:t})}function v(){var e=K(p.pendingRequests,t);e!==-1&&p.pendingRequests.splice(e,1)}var i=f.defer(),s=i.promise,o,u,l=g(t.url,t.params);p.pendingRequests.push(t),s
|
||||
.then(v,v),t.cache&&t.method=="GET"&&(o=_(t.cache)?t.cache:c);if(o){u=o.get(l);if(u){if(u.then)return u.then(v,v),u;B(u)?d(u[1],u[0],Y(u[2])):d(u,200,{})}else o.put(l,s)}return u||e(t.method,l,n,h,r,t.timeout,t.withCredentials),s}function g(e,t){if(!t)return e;var r=[];return w(t,function(e,t){if(e==null||e==n)return;_(e)&&(e=st(e)),r.push(encodeURIComponent(t)+"="+encodeURIComponent(e))}),e+(e.indexOf("?")==-1?"?":"&")+r.join("&")}var c=s("$http"),h=[];return y(u,function(e){h.push(D(e)?l.get(e):l.invoke(e))}),p.pendingRequests=[],d("get","delete","head","jsonp"),v("post","put"),p.defaults=o,p}]}function lr(){this.$get=["$browser","$window","$document",function(e,t,n){return cr(e,fr,e.defer,t.angular.callbacks,n[0],t.location.protocol.replace(":",""))}]}function cr(e,t,n,i,s,o){function a(e,t){var n=s.createElement("script"),r=function(){s.body.removeChild(n),t&&t()};n.type="text/javascript",n.src=e,u?n.onreadystatechange=function(){/loaded|complete/.test(n.readyState)&&r()}:n.onload=n
|
||||
.onerror=r,s.body.appendChild(n)}return function(s,u,f,l,c,h,p){function g(t,n,r,i){var s=(u.match(Tn)||["",o])[1];n=s=="file"?r?200:404:n,n=n==1223?204:n,t(n,r,i),e.$$completeOutstandingRequest(k)}e.$$incOutstandingRequestCount(),u=u||e.url();if(r(s)=="jsonp"){var d="_"+(i.counter++).toString(36);i[d]=function(e){i[d].data=e},a(u.replace("JSON_CALLBACK","angular.callbacks."+d),function(){i[d].data?g(l,200,i[d].data):g(l,-2),delete i[d]})}else{var v=new t;v.open(s,u,!0),y(c,function(e,t){e&&v.setRequestHeader(t,e)});var m;v.onreadystatechange=function(){if(v.readyState==4){var e=v.getAllResponseHeaders(),t,n=["Cache-Control","Content-Language","Content-Type","Expires","Last-Modified","Pragma"];e||(e="",y(n,function(t){var n=v.getResponseHeader(t);n&&(e+=t+": "+n+"\n")})),g(l,m||v.status,v.responseText,e)}},p&&(v.withCredentials=!0),v.send(f||""),h>0&&n(function(){m=-1,v.abort()},h)}}}function hr(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS
|
||||
:[{minInt:1,minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"¤",posSuf:"",negPre:"(¤",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),AMPMS:["AM","PM"],medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(e){return e===1?"one":"other"}}}}function pr(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(e,t,n,r){function s(s,o,u){var a=n.defer(),f=a.promise,l=M(u)&&!u,c,h;return c=t.defer(function(){try{a.resolve(s())}catch(t){a.reject(t),r(t)}
|
||||
finally{delete i[f.$$timeoutId]}l||e.$apply()},o),f.$$timeoutId=c,i[c]=a,f}var i={};return s.cancel=function(e){return e&&e.$$timeoutId in i?(i[e.$$timeoutId].reject("canceled"),delete i[e.$$timeoutId],t.defer.cancel(e.$$timeoutId)):!1},s}]}function dr(e){function n(n,r){return e.factory(n+t,r)}var t="Filter";this.register=n,this.$get=["$injector",function(e){return function(n){return e.get(n+t)}}],n("currency",mr),n("date",Lr),n("filter",vr),n("json",Ar),n("limitTo",_r),n("lowercase",Or),n("number",gr),n("orderBy",Dr),n("uppercase",Mr)}function vr(){return function(e,t){if(!B(e))return e;var n=[];n.check=function(e){for(var t=0;t<n.length;t++)if(!n[t](e))return!1;return!0};var r=function(e,t){if(t.charAt(0)==="!")return!r(e,t.substr(1));switch(typeof e){case"boolean":case"number":case"string":return(""+e).toLowerCase().indexOf(t)>-1;case"object":for(var n in e)if(n.charAt(0)!=="$"&&r(e[n],t))return!0;return!1;case"array":for(var i=0;i<e.length;i++)if(r(e[i],t))return!0;return!1;default:
|
||||
return!1}};switch(typeof t){case"boolean":case"number":case"string":t={$:t};case"object":for(var i in t)i=="$"?function(){var e=(""+t[i]).toLowerCase();if(!e)return;n.push(function(t){return r(t,e)})}():function(){var e=i,s=(""+t[i]).toLowerCase();if(!s)return;n.push(function(t){return r(Et(t,e),s)})}();break;case"function":n.push(t);break;default:return e}var s=[];for(var o=0;o<e.length;o++){var u=e[o];n.check(u)&&s.push(u)}return s}}function mr(e){var t=e.NUMBER_FORMATS;return function(e,n){return O(n)&&(n=t.CURRENCY_SYM),br(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,2).replace(/\u00A4/g,n)}}function gr(e){var t=e.NUMBER_FORMATS;return function(e,n){return br(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function br(e,t,n,r,i){if(isNaN(e)||!isFinite(e))return"";var s=e<0;e=Math.abs(e);var o=e+"",u="",a=[],f=!1;if(o.indexOf("e")!==-1){var l=o.match(/([\d\.]+)e(-?)(\d+)/);l&&l[2]=="-"&&l[3]>i+1?o="0":(u=o,f=!0)}if(!f){var c=(o.split(yr)[1]||"").length;O(i)&&(i=Math.min(Math.max(t.minFrac
|
||||
,c),t.maxFrac));var h=Math.pow(10,i);e=Math.round(e*h)/h;var p=(""+e).split(yr),d=p[0];p=p[1]||"";var v=0,m=t.lgSize,g=t.gSize;if(d.length>=m+g){v=d.length-m;for(var y=0;y<v;y++)(v-y)%g===0&&y!==0&&(u+=n),u+=d.charAt(y)}for(y=v;y<d.length;y++)(d.length-y)%m===0&&y!==0&&(u+=n),u+=d.charAt(y);while(p.length<i)p+="0";i&&i!=="0"&&(u+=r+p.substr(0,i))}else i>0&&e>-1&&e<1&&(u=e.toFixed(i));return a.push(s?t.negPre:t.posPre),a.push(u),a.push(s?t.negSuf:t.posSuf),a.join("")}function wr(e,t,n){var r="";e<0&&(r="-",e=-e),e=""+e;while(e.length<t)e="0"+e;return n&&(e=e.substr(e.length-t)),r+e}function Er(e,t,n,r){return n=n||0,function(i){var s=i["get"+e]();if(n>0||s>-n)s+=n;return s===0&&n==-12&&(s=12),wr(s,t,r)}}function Sr(e,t){return function(n,r){var s=n["get"+e](),o=i(t?"SHORT"+e:e);return r[o][s]}}function xr(e){var t=-1*e.getTimezoneOffset(),n=t>=0?"+":"";return n+=wr(Math[t>0?"floor":"ceil"](t/60),2)+wr(Math.abs(t%60),2),n}function Tr(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function Lr
|
||||
(e){function n(e){var n;if(n=e.match(t)){var r=new Date(0),i=0,s=0;return n[9]&&(i=N(n[9]+n[10]),s=N(n[9]+n[11])),r.setUTCFullYear(N(n[1]),N(n[2])-1,N(n[3])),r.setUTCHours(N(n[4]||0)-i,N(n[5]||0)-s,N(n[6]||0),N(n[7]||0)),r}return e}var t=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(t,r){var i="",s=[],o,u;r=r||"mediumDate",r=e.DATETIME_FORMATS[r]||r,D(t)&&(kr.test(t)?t=N(t):t=n(t)),P(t)&&(t=new Date(t));if(!H(t))return t;while(r)u=Cr.exec(r),u?(s=tt(s,u,1),r=s.pop()):(s.push(r),r=null);return y(s,function(n){o=Nr[n],i+=o?o(t,e.DATETIME_FORMATS):n.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),i}}function Ar(){return function(e){return st(e,!0)}}function _r(){return function(e,t){if(e instanceof Array){t=N(t);var n=[],r,i;if(!!e&&e instanceof Array){t>e.length?t=e.length:t<-e.length&&(t=-e.length),t>0?(r=0,i=t):(r=e.length+t,i=e.length);for(;r<i;r++)n.push(e[r]);return n}return n}return e}}function Dr(e){return function(
|
||||
t,n,r){function o(e,t){for(var r=0;r<n.length;r++){var i=n[r](e,t);if(i!==0)return i}return 0}function u(e,t){return ut(t)?function(t,n){return e(n,t)}:e}function a(e,t){var n=typeof e,r=typeof t;return n==r?(n=="string"&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t?0:e<t?-1:1):n<r?-1:1}if(!B(t))return t;if(!n)return t;n=B(n)?n:[n],n=V(n,function(t){var n=!1,r=t||L;if(D(t)){if(t.charAt(0)=="+"||t.charAt(0)=="-")n=t.charAt(0)=="-",t=t.substring(1);r=e(t)}return u(function(e,t){return a(r(e),r(t))},n)});var i=[];for(var s=0;s<t.length;s++)i.push(t[s]);return i.sort(u(o,r))}}function Pr(e){return j(e)&&(e={link:e}),e.restrict=e.restrict||"AC",A(e)}function Fr(e,t){function o(t,n){n=n?"-"+gt(n,"-"):"",e.removeClass((t?ti:ei)+n).addClass((t?ei:ti)+n)}var n=this,r=e.parent().controller("form")||jr,i=0,s=n.$error={};n.$name=t.name||t.ngForm,n.$dirty=!1,n.$pristine=!0,n.$valid=!0,n.$invalid=!1,r.$addControl(n),e.addClass(ni),o(!0),n.$addControl=function(e){e.$name&&!n.hasOwnProperty(e.$name)&&(n
|
||||
[e.$name]=e)},n.$removeControl=function(e){e.$name&&n[e.$name]===e&&delete n[e.$name],y(s,function(t,r){n.$setValidity(r,!0,e)})},n.$setValidity=function(e,t,u){var a=s[e];if(t)a&&(Q(a,u),a.length||(i--,i||(o(t),n.$valid=!0,n.$invalid=!1),s[e]=!1,o(!0,e),r.$setValidity(e,!0,n)));else{i||o(t);if(a){if(J(a,u))return}else s[e]=a=[],i++,o(!1,e),r.$setValidity(e,!1,n);a.push(u),n.$valid=!1,n.$invalid=!0}},n.$setDirty=function(){e.removeClass(ni).addClass(ri),n.$dirty=!0,n.$pristine=!1,r.$setDirty()}}function Vr(e){return O(e)||e===""||e===null||e!==e}function $r(e,t,r,i,s,o){var u=function(){var n=z(t.val());i.$viewValue!==n&&e.$apply(function(){i.$setViewValue(n)})};if(s.hasEvent("input"))t.bind("input",u);else{var a,f=function(){a||(a=o.defer(function(){u(),a=null}))};t.bind("keydown",function(e){var t=e.keyCode;if(t===91||15<t&&t<19||37<=t&&t<=40)return;f()}),t.bind("change",u),s.hasEvent("paste")&&t.bind("paste cut",f)}i.$render=function(){t.val(Vr(i.$viewValue)?"":i.$viewValue)};var l=r
|
||||
.ngPattern,c,h=function(e,t){return Vr(t)||e.test(t)?(i.$setValidity("pattern",!0),t):(i.$setValidity("pattern",!1),n)};l&&(l.match(/^\/(.*)\/$/)?(l=new RegExp(l.substr(1,l.length-2)),c=function(e){return h(l,e)}):c=function(t){var n=e.$eval(l);if(!n||!n.test)throw new Error("Expected "+l+" to be a RegExp but was "+n);return h(n,t)},i.$formatters.push(c),i.$parsers.push(c));if(r.ngMinlength){var p=N(r.ngMinlength),d=function(e){return!Vr(e)&&e.length<p?(i.$setValidity("minlength",!1),n):(i.$setValidity("minlength",!0),e)};i.$parsers.push(d),i.$formatters.push(d)}if(r.ngMaxlength){var v=N(r.ngMaxlength),m=function(e){return!Vr(e)&&e.length>v?(i.$setValidity("maxlength",!1),n):(i.$setValidity("maxlength",!0),e)};i.$parsers.push(m),i.$formatters.push(m)}}function Jr(e,t,r,i,s,o){$r(e,t,r,i,s,o),i.$parsers.push(function(e){var t=Vr(e);return t||Wr.test(e)?(i.$setValidity("number",!0),e===""?null:t?e:parseFloat(e)):(i.$setValidity("number",!1),n)}),i.$formatters.push(function(e){return Vr(e)?""
|
||||
:""+e});if(r.min){var u=parseFloat(r.min),a=function(e){return!Vr(e)&&e<u?(i.$setValidity("min",!1),n):(i.$setValidity("min",!0),e)};i.$parsers.push(a),i.$formatters.push(a)}if(r.max){var f=parseFloat(r.max),l=function(e){return!Vr(e)&&e>f?(i.$setValidity("max",!1),n):(i.$setValidity("max",!0),e)};i.$parsers.push(l),i.$formatters.push(l)}i.$formatters.push(function(e){return Vr(e)||P(e)?(i.$setValidity("number",!0),e):(i.$setValidity("number",!1),n)})}function Kr(e,t,r,i,s,o){$r(e,t,r,i,s,o);var u=function(e){return Vr(e)||Ur.test(e)?(i.$setValidity("url",!0),e):(i.$setValidity("url",!1),n)};i.$formatters.push(u),i.$parsers.push(u)}function Qr(e,t,r,i,s,o){$r(e,t,r,i,s,o);var u=function(e){return Vr(e)||zr.test(e)?(i.$setValidity("email",!0),e):(i.$setValidity("email",!1),n)};i.$formatters.push(u),i.$parsers.push(u)}function Gr(e,t,n,r){O(n.name)&&t.attr("name",S()),t.bind("click",function(){t[0].checked&&e.$apply(function(){r.$setViewValue(n.value)})}),r.$render=function(){var e=n.value
|
||||
;t[0].checked=e==r.$viewValue},n.$observe("value",r.$render)}function Yr(e,t,n,r){var i=n.ngTrueValue,s=n.ngFalseValue;D(i)||(i=!0),D(s)||(s=!1),t.bind("click",function(){e.$apply(function(){r.$setViewValue(t[0].checked)})}),r.$render=function(){t[0].checked=r.$viewValue},r.$formatters.push(function(e){return e===i}),r.$parsers.push(function(e){return e?i:s})}function di(e,t){return e="ngClass"+e,Pr(function(r,i,s){function u(e){if(t===!0||r.$index%2===t)o&&!et(e,o)&&a(o),f(e);o=Y(e)}function a(e){_(e)&&!B(e)&&(e=V(e,function(e,t){if(e)return t})),i.removeClass(B(e)?e.join(" "):e)}function f(e){_(e)&&!B(e)&&(e=V(e,function(e,t){if(e)return t})),e&&i.addClass(B(e)?e.join(" "):e)}var o=n;r.$watch(s[e],u,!0),s.$observe("class",function(t){var n=r.$eval(s[e]);u(n,n)}),e!=="ngClass"&&r.$watch("$index",function(n,i){var o=n&1;o!==i&1&&(o===t?f(r.$eval(s[e])):a(r.$eval(s[e])))})})}var r=function(e){return D(e)?e.toLowerCase():e},i=function(e){return D(e)?e.toUpperCase():e},s=function(e){return D
|
||||
(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(e.charCodeAt(0)|32)}):e},o=function(e){return D(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(e.charCodeAt(0)&-33)}):e};"i"!=="I".toLowerCase()&&(r=s,i=o);var u=N((/msie (\d+)/.exec(r(navigator.userAgent))||[])[1]),a,f,l=[].slice,c=[].push,h=Object.prototype.toString,p=e.angular||(e.angular={}),d,v,m=["0","0","0"];k.$inject=[],L.$inject=[];var z=function(){return String.prototype.trim?function(e){return D(e)?e.trim():e}:function(e){return D(e)?e.replace(/^\s*/,"").replace(/\s*$/,""):e}}();u<9?v=function(e){return e=e.nodeName?e:e[0],e.scopeName&&e.scopeName!="HTML"?i(e.scopeName+":"+e.nodeName):e.nodeName}:v=function(e){return e.nodeName?e.nodeName:e[0].nodeName};var mt=/[A-Z]/g,xt={full:"1.0.8",major:1,minor:0,dot:8,codeName:"bubble-burst"},Nt=Ht.cache={},Ct=Ht.expando="ng-"+(new Date).getTime(),kt=1,Lt=e.document.addEventListener?function(e,t,n){e.addEventListener(t,n,!1)}:function(e,t,n){e.attachEvent("on"+t
|
||||
,n)},At=e.document.removeEventListener?function(e,t,n){e.removeEventListener(t,n,!1)}:function(e,t,n){e.detachEvent("on"+t,n)},Mt=/([\:\-\_]+(.))/g,_t=/^moz([A-Z])/,Jt=Ht.prototype={ready:function(t){function r(){if(n)return;n=!0,t()}var n=!1;this.bind("DOMContentLoaded",r),Ht(e).bind("load",r)},toString:function(){var e=[];return y(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return e>=0?a(this[e]):a(this[this.length+e])},length:0,push:c,sort:[].sort,splice:[].splice},Kt={};y("multiple,selected,checked,disabled,readOnly,required".split(","),function(e){Kt[r(e)]=e});var Qt={};y("input,select,option,textarea,button,form".split(","),function(e){Qt[i(e)]=!0}),y({data:Rt,inheritedData:$t,scope:function(e){return $t(e,"$scope")},controller:Vt,injector:function(e){return $t(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:Ut,css:function(e,t,r){t=Dt(t);if(!M(r)){var i;return u<=8&&(i=e.currentStyle&&e.currentStyle[t],i===""&&(i="auto")),i=i||e.style
|
||||
[t],u<=8&&(i=i===""?n:i),i}e.style[t]=r},attr:function(e,t,i){var s=r(t);if(Kt[s]){if(!M(i))return e[t]||(e.attributes.getNamedItem(t)||k).specified?s:n;i?(e[t]=!0,e.setAttribute(t,s)):(e[t]=!1,e.removeAttribute(s))}else if(M(i))e.setAttribute(t,i);else if(e.getAttribute){var o=e.getAttribute(t,2);return o===null?n:o}},prop:function(e,t,n){if(!M(n))return e[t];e[t]=n},text:T(u<9?function(e,t){if(e.nodeType==1){if(O(t))return e.innerText;e.innerText=t}else{if(O(t))return e.nodeValue;e.nodeValue=t}}:function(e,t){if(O(t))return e.textContent;e.textContent=t},{$dv:""}),val:function(e,t){if(O(t)){if(v(e)==="SELECT"&&e.multiple){var n=[];return y(e.options,function(e){e.selected&&n.push(e.value||e.text)}),n.length===0?null:n}return e.value}e.value=t},html:function(e,t){if(O(t))return e.innerHTML;for(var n=0,r=e.childNodes;n<r.length;n++)jt(r[n]);e.innerHTML=t}},function(e,t){Ht.prototype[t]=function(t,r){var i,s;if((e.length==2&&e!==Ut&&e!==Vt?t:r)!==n){for(i=0;i<this.length;i++)e(this[i],t,
|
||||
r);return this}if(_(t)){for(i=0;i<this.length;i++)if(e===Rt)e(this[i],t);else for(s in t)e(this[i],s,t[s]);return this}return this.length?e(this[0],t,r):e.$dv}}),y({removeData:It,dealoc:jt,bind:function Ri(e,n,r){var i=qt(e,"events"),s=qt(e,"handle");i||qt(e,"events",i={}),s||qt(e,"handle",s=Yt(e,i)),y(n.split(" "),function(n){var o=i[n];if(!o){if(n=="mouseenter"||n=="mouseleave"){var u=t.body.contains||t.body.compareDocumentPosition?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!r&&r.nodeType===1&&!!(n.contains?n.contains(r):e.compareDocumentPosition&&e.compareDocumentPosition(r)&16)}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1};i[n]=[];var a={mouseleave:"mouseout",mouseenter:"mouseover"};Ri(e,a[n],function(e){var t,r=this,i=e.relatedTarget;(!i||i!==r&&!u(r,i))&&s(e,n)})}else Lt(e,n,s),i[n]=[];o=i[n]}o.push(r)})},unbind:Ft,replaceWith:function(e,t){var n,r=e.parentNode;jt(e),y(new Ht(t),function(t){n?r.insertBefore(t,n.nextSibling
|
||||
):r.replaceChild(t,e),n=t})},children:function(e){var t=[];return y(e.childNodes,function(e){e.nodeType===1&&t.push(e)}),t},contents:function(e){return e.childNodes||[]},append:function(e,t){y(new Ht(t),function(t){e.nodeType===1&&e.appendChild(t)})},prepend:function(e,t){if(e.nodeType===1){var n=e.firstChild;y(new Ht(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){t=a(t)[0];var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)},remove:function(e){jt(e);var t=e.parentNode;t&&t.removeChild(e)},after:function(e,t){var n=e,r=e.parentNode;y(new Ht(t),function(e){r.insertBefore(e,n.nextSibling),n=e})},addClass:Wt,removeClass:zt,toggleClass:function(e,t,n){O(n)&&(n=!Ut(e,t)),(n?Wt:zt)(e,t)},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},next:function(e){if(e.nextElementSibling)return e.nextElementSibling;var t=e.nextSibling;while(t!=null&&t.nodeType!==1)t=t.nextSibling;return t},find:function(e,t){return e.getElementsByTagName(t)},clone:Bt,triggerHandler
|
||||
:function(e,t){var n=(qt(e,"events")||{})[t];y(n,function(t){t.call(e,null)})}},function(e,t){Ht.prototype[t]=function(t,r){var i;for(var s=0;s<this.length;s++)i==n?(i=e(this[s],t,r),i!==n&&(i=a(i))):Xt(i,e(this[s],t,r));return i==n?this:i}}),en.prototype={put:function(e,t){this[Zt(e)]=t},get:function(e){return this[Zt(e)]},remove:function(e){var t=this[e=Zt(e)];return delete this[e],t}},tn.prototype={push:function(e,t){var n=this[e=Zt(e)];n?n.push(t):this[e]=[t]},shift:function(e){var t=this[e=Zt(e)];if(t)return t.length==1?(delete this[e],t[0]):t.shift()},peek:function(e){var t=this[Zt(e)];if(t)return t[0]}};var nn=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,rn=/,/,sn=/^\s*(_?)(\S+?)\1\s*$/,on=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,dn="Non-assignable model expression: ";vn.$inject=["$provide"];var mn=/^(x[\:\-_]|data[\:\-_])/i,Tn=/^([^:]+):\/\/(\w+:{0,1}\w*@)?(\{?[\w\.-]*\}?)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,Nn=/^([^\?#]*)?(\?([^#]*))?(#(.*))?$/,Cn=Nn,kn={http:80,https:443,ftp:21};Hn
|
||||
.prototype={$$replace:!1,absUrl:Fn("$$absUrl"),url:function(e,t){if(O(e))return this.$$url;var n=Nn.exec(e);return n[1]&&this.path(decodeURIComponent(n[1])),(n[2]||n[1])&&this.search(n[3]||""),this.hash(n[5]||"",t),this},protocol:Fn("$$protocol"),host:Fn("$$host"),port:Fn("$$port"),path:In("$$path",function(e){return e.charAt(0)=="/"?e:"/"+e}),search:function(e,t){return O(e)?this.$$search:(M(t)?t===null?delete this.$$search[e]:this.$$search[e]=t:this.$$search=D(e)?lt(e):e,this.$$compose(),this)},hash:In("$$hash",L),replace:function(){return this.$$replace=!0,this}},Bn.prototype=C(Hn.prototype),jn.prototype=C(Bn.prototype);var Un={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},"undefined":k,"+":function(e,t,r,i){return r=r(e,t),i=i(e,t),M(r)?M(i)?r+i:r:M(i)?i:n},"-":function(e,t,n,r){return n=n(e,t),r=r(e,t),(M(n)?n:0)-(M(r)?r:0)},"*":function(e,t,n,r){return n(e,t)*r(e,t)},"/":function(e,t,n,r){return n(e,t)/r(e,t)},"%":function(e,t,n,r){return n
|
||||
(e,t)%r(e,t)},"^":function(e,t,n,r){return n(e,t)^r(e,t)},"=":k,"==":function(e,t,n,r){return n(e,t)==r(e,t)},"!=":function(e,t,n,r){return n(e,t)!=r(e,t)},"<":function(e,t,n,r){return n(e,t)<r(e,t)},">":function(e,t,n,r){return n(e,t)>r(e,t)},"<=":function(e,t,n,r){return n(e,t)<=r(e,t)},">=":function(e,t,n,r){return n(e,t)>=r(e,t)},"&&":function(e,t,n,r){return n(e,t)&&r(e,t)},"||":function(e,t,n,r){return n(e,t)||r(e,t)},"&":function(e,t,n,r){return n(e,t)&r(e,t)},"|":function(e,t,n,r){return r(e,t)(e,t,n(e,t))},"!":function(e,t,n){return!n(e,t)}},zn={n:"\n",f:"\f",r:"\r",t:" ",v:"","'":"'",'"':'"'},$n={},fr=e.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(n){}throw new Error("This browser does not support XMLHttpRequest.")};dr.$inject=["$provide"],mr.$inject=["$locale"],gr.$inject=["$locale"];var yr=".",Nr={yyyy:Er("FullYear",4),
|
||||
yy:Er("FullYear",2,0,!0),y:Er("FullYear",1),MMMM:Sr("Month"),MMM:Sr("Month",!0),MM:Er("Month",2,1),M:Er("Month",1,1),dd:Er("Date",2),d:Er("Date",1),HH:Er("Hours",2),H:Er("Hours",1),hh:Er("Hours",2,-12),h:Er("Hours",1,-12),mm:Er("Minutes",2),m:Er("Minutes",1),ss:Er("Seconds",2),s:Er("Seconds",1),EEEE:Sr("Day"),EEE:Sr("Day",!0),a:Tr,Z:xr},Cr=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,kr=/^\d+$/;Lr.$inject=["$locale"];var Or=A(r),Mr=A(i);Dr.$inject=["$parse"];var Hr=A({restrict:"E",compile:function(e,n){return u<=8&&(!n.href&&!n.name&&n.$set("href",""),e.append(t.createComment("IE fix"))),function(e,t){t.bind("click",function(e){t.attr("href")||e.preventDefault()})}}}),Br={};y(Kt,function(e,t){var n=gn("ng-"+t);Br[n]=function(){return{priority:100,compile:function(){return function(e,r,i){e.$watch(i[n],function(n){i.$set(t,!!n)})}}}}}),y(["src","href"],function(e){var t=gn("ng-"+e);Br[t]=function(){return{priority:99,link:function(n,r,i){i.$observe(t,function(
|
||||
t){if(!t)return;i.$set(e,t),u&&r.prop(e,i[e])})}}}});var jr={$addControl:k,$removeControl:k,$setValidity:k,$setDirty:k};Fr.$inject=["$element","$attrs","$scope"];var Ir=function(e){return["$timeout",function(t){var r={name:"form",restrict:"E",controller:Fr,compile:function(){return{pre:function(e,r,i,s){if(!i.action){var o=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1};Lt(r[0],"submit",o),r.bind("$destroy",function(){t(function(){At(r[0],"submit",o)},0,!1)})}var u=r.parent().controller("form"),a=i.name||i.ngForm;a&&(e[a]=s),u&&r.bind("$destroy",function(){u.$removeControl(s),a&&(e[a]=n),T(s,jr)})}}}};return e?T(Y(r),{restrict:"EAC"}):r}]},qr=Ir(),Rr=Ir(!0),Ur=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,zr=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}$/,Wr=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Xr={text:$r,number:Jr,url:Kr,email:Qr,radio:Gr,checkbox:Yr,hidden:k,button:k,submit:k,reset:k},Zr=["$browser","$sniffer",function(e,t
|
||||
){return{restrict:"E",require:"?ngModel",link:function(n,i,s,o){o&&(Xr[r(s.type)]||Xr.text)(n,i,s,o,t,e)}}}],ei="ng-valid",ti="ng-invalid",ni="ng-pristine",ri="ng-dirty",ii=["$scope","$exceptionHandler","$attrs","$element","$parse",function(e,t,n,r,i){function l(e,t){t=t?"-"+gt(t,"-"):"",r.removeClass((e?ti:ei)+t).addClass((e?ei:ti)+t)}this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$name=n.name;var s=i(n.ngModel),o=s.assign;if(!o)throw Error(dn+n.ngModel+" ("+at(r)+")");this.$render=k;var u=r.inheritedData("$formController")||jr,a=0,f=this.$error={};r.addClass(ni),l(!0),this.$setValidity=function(e,t){if(f[e]===!t)return;t?(f[e]&&a--,a||(l(!0),this.$valid=!0,this.$invalid=!1)):(l(!1),this.$invalid=!0,this.$valid=!1,a++),f[e]=!t,l(t,e),u.$setValidity(e,t,this)},this.$setViewValue=function(n){this.$viewValue=n,this.$pristine&&(this.$dirty=!0,this.
|
||||
$pristine=!1,r.removeClass(ni).addClass(ri),u.$setDirty()),y(this.$parsers,function(e){n=e(n)}),this.$modelValue!==n&&(this.$modelValue=n,o(e,n),y(this.$viewChangeListeners,function(e){try{e()}catch(n){t(n)}}))};var c=this;e.$watch(function(){var n=s(e);if(c.$modelValue!==n){var r=c.$formatters,i=r.length;c.$modelValue=n;while(i--)n=r[i](n);c.$viewValue!==n&&(c.$viewValue=n,c.$render())}})}],si=function(){return{require:["ngModel","^?form"],controller:ii,link:function(e,t,n,r){var i=r[0],s=r[1]||jr;s.$addControl(i),t.bind("$destroy",function(){s.$removeControl(i)})}}},oi=A({require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),ui=function(){return{require:"?ngModel",link:function(e,t,n,r){if(!r)return;n.required=!0;var i=function(e){if(n.required&&(Vr(e)||e===!1)){r.$setValidity("required",!1);return}return r.$setValidity("required",!0),e};r.$formatters.push(i),r.$parsers.unshift(i),n.$observe("required",function(){i(r.$viewValue)})}}},
|
||||
ai=function(){return{require:"ngModel",link:function(e,t,r,i){var s=/\/(.*)\//.exec(r.ngList),o=s&&new RegExp(s[1])||r.ngList||",",u=function(e){var t=[];return e&&y(e.split(o),function(e){e&&t.push(z(e))}),t};i.$parsers.push(u),i.$formatters.push(function(e){return B(e)?e.join(", "):n})}}},fi=/^(true|false|\d+)$/,li=function(){return{priority:100,compile:function(e,t){return fi.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(t){n.$set("value",t)})}}}},ci=Pr(function(e,t,r){t.addClass("ng-binding").data("$binding",r.ngBind),e.$watch(r.ngBind,function(r){t.text(r==n?"":r)})}),hi=["$interpolate",function(e){return function(t,n,r){var i=e(n.attr(r.$attr.ngBindTemplate));n.addClass("ng-binding").data("$binding",i),r.$observe("ngBindTemplate",function(e){n.text(e)})}}],pi=[function(){return function(e,t,n){t.addClass("ng-binding").data("$binding",n.ngBindHtmlUnsafe),e.$watch(n.ngBindHtmlUnsafe,function(n){t.html(n||"")})}}],vi=di
|
||||
("",!0),mi=di("Odd",0),gi=di("Even",1),yi=Pr({compile:function(e,t){t.$set("ngCloak",n),e.removeClass("ng-cloak")}}),bi=[function(){return{scope:!0,controller:"@"}}],wi=["$sniffer",function(e){return{priority:1e3,compile:function(){e.csp=!0}}}],Ei={};y("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave submit".split(" "),function(e){var t=gn("ng-"+e);Ei[t]=["$parse",function(n){return function(i,s,o){var u=n(o[t]);s.bind(r(e),function(e){i.$apply(function(){u(i,{$event:e})})})}}]});var Si=["$http","$templateCache","$anchorScroll","$compile",function(e,t,n,r){return{restrict:"ECA",terminal:!0,compile:function(i,s){var o=s.ngInclude||s.src,u=s.onload||"",a=s.autoscroll;return function(i,s){var f=0,l,c=function(){l&&(l.$destroy(),l=null),s.html("")};i.$watch(o,function(h){var p=++f;h?e.get(h,{cache:t}).success(function(e){if(p!==f)return;l&&l.$destroy(),l=i.$new(),s.html(e),r(s.contents())(l),M(a)&&(!a||i.$eval(a))&&n(),l.$emit("$includeContentLoaded"),i.$eval
|
||||
(u)}).error(function(){p===f&&c()}):c()})}}}}],xi=Pr({compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),Ti=Pr({terminal:!0,priority:1e3}),Ni=["$locale","$interpolate",function(e,t){var n=/{}/g;return{restrict:"EA",link:function(r,i,s){var o=s.count,u=i.attr(s.$attr.when),a=s.offset||0,f=r.$eval(u),l={},c=t.startSymbol(),h=t.endSymbol();y(f,function(e,r){l[r]=t(e.replace(n,c+o+"-"+a+h))}),r.$watch(function(){var n=parseFloat(r.$eval(o));return isNaN(n)?"":(n in f||(n=e.pluralCat(n-a)),l[n](r,i,!0))},function(t){i.text(t)})}}}],Ci=Pr({transclude:"element",priority:1e3,terminal:!0,compile:function(e,t,n){return function(e,t,r){var i=r.ngRepeat,s=i.match(/^\s*(.+)\s+in\s+(.*)\s*$/),o,u,a,f;if(!s)throw Error("Expected ngRepeat in form of '_item_ in _collection_' but got '"+i+"'.");o=s[1],u=s[2],s=o.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!s)throw Error("'item' in 'item in collection' should be identifier or (key, value) but got '"+o+"'.");a=s[3]||s[1],f=s
|
||||
[2];var l=new tn;e.$watch(function(r){var i,s,o=r.$eval(u),c=t,h=new tn,p,d,v,m,g,y;if(!B(o)){g=[];for(v in o)o.hasOwnProperty(v)&&v.charAt(0)!="$"&&g.push(v);g.sort()}else g=o||[];p=g.length-1;for(i=0,s=g.length;i<s;i++)v=o===g?i:g[i],m=o[v],y=l.shift(m),y?(d=y.scope,h.push(m,y),i===y.index?c=y.element:(y.index=i,c.after(y.element),c=y.element)):d=r.$new(),d[a]=m,f&&(d[f]=v),d.$index=i,d.$first=i===0,d.$last=i===p,d.$middle=!d.$first&&!d.$last,y||n(d,function(e){c.after(e),y={scope:d,element:c=e,index:i},h.push(m,y)});for(v in l)if(l.hasOwnProperty(v)){g=l[v];while(g.length)m=g.pop(),m.element.remove(),m.scope.$destroy()}l=h})}}}),ki=Pr(function(e,t,n){e.$watch(n.ngShow,function(n){t.css("display",ut(n)?"":"none")})}),Li=Pr(function(e,t,n){e.$watch(n.ngHide,function(n){t.css("display",ut(n)?"none":"")})}),Ai=Pr(function(e,t,n){e.$watch(n.ngStyle,function(n,r){r&&n!==r&&y(r,function(e,n){t.css(n,"")}),n&&t.css(n)},!0)}),Oi="ng-switch",Mi=A({restrict:"EA",require:"ngSwitch",controller:["$scope"
|
||||
,function(){this.cases={}}],link:function(e,t,n,r){var i=n.ngSwitch||n.on,s,o,u;e.$watch(i,function(a){o&&(u.$destroy(),o.remove(),o=u=null);if(s=r.cases["!"+a]||r.cases["?"])e.$eval(n.change),u=e.$new(),s(u,function(e){o=e,t.append(e)})})}}),_i=Pr({transclude:"element",priority:500,require:"^ngSwitch",compile:function(e,t,n){return function(e,r,i,s){s.cases["!"+t.ngSwitchWhen]=n}}}),Di=Pr({transclude:"element",priority:500,require:"^ngSwitch",compile:function(e,t,n){return function(e,t,r,i){i.cases["?"]=n}}}),Pi=Pr({controller:["$transclude","$element",function(e,t){e(function(e){t.append(e)})}]}),Hi=["$http","$templateCache","$route","$anchorScroll","$compile","$controller",function(e,t,n,r,i,s){return{restrict:"ECA",terminal:!0,link:function(e,t,o){function f(){u&&(u.$destroy(),u=null)}function l(){t.html(""),f()}function c(){var o=n.current&&n.current.locals,c=o&&o.$template;if(c){t.html(c),f();var h=i(t.contents()),p=n.current,d;u=p.scope=e.$new(),p.controller&&(o.$scope=u,d=s(p.controller
|
||||
,o),t.children().data("$ngControllerController",d)),h(u),u.$emit("$viewContentLoaded"),u.$eval(a),r()}else l()}var u,a=o.onload||"";e.$on("$routeChangeSuccess",c),c()}}}],Bi=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){if(n.type=="text/ng-template"){var r=n.id,i=t[0].text;e.put(r,i)}}}}],ji=A({terminal:!0}),Fi=["$compile","$parse",function(e,r){var i=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*)$/,s={$setViewValue:k};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(e,t,n){var r=this,i={},o=s,u,a;r.databound=n.ngModel,r.init=function(e,t,n){o=e,u=t,a=n},r.addOption=function(t){i[t]=!0,o.$viewValue==t&&(e.val(t),a.parent()&&a.remove())},r.removeOption=function(e){this.hasOption(e)&&(delete i[e],o.$viewValue==e&&this.renderUnknownOption(e))},r.renderUnknownOption=function(t){var n="? "+Zt(t)+" ?";
|
||||
a.val(n),e.prepend(a),e.val(n),a.prop("selected",!0)},r.hasOption=function(e){return i.hasOwnProperty(e)},t.$on("$destroy",function(){r.renderUnknownOption=k})}],link:function(s,o,u,f){function N(e,t,n,r){n.$render=function(){var e=n.$viewValue;r.hasOption(e)?(w.parent()&&w.remove(),t.val(e),e===""&&v.prop("selected",!0)):O(e)&&v?t.val(""):r.renderUnknownOption(e)},t.bind("change",function(){e.$apply(function(){w.parent()&&w.remove(),n.$setViewValue(t.val())})})}function C(e,t,n){var r;n.$render=function(){var e=new en(n.$viewValue);y(t.find("option"),function(t){t.selected=M(e.get(t.value))})},e.$watch(function(){et(r,n.$viewValue)||(r=Y(n.$viewValue),n.$render())}),t.bind("change",function(){e.$apply(function(){var e=[];y(t.find("option"),function(t){t.selected&&e.push(t.value)}),n.$setViewValue(e)})})}function k(t,s,o){function E(){var e={"":[]},r=[""],i,u,p,E,S,x,T=o.$modelValue,N=y(t)||[],C=l?b(N):N,k,L,A,O,M={},_,D=!1,P,H,B;h&&(D=new en(T));for(O=0;L=C.length,O<L;O++)M[f]=N[l?M[l]=
|
||||
C[O]:O],i=c(t,M)||"",(u=e[i])||(u=e[i]=[],r.push(i)),h?_=D.remove(v(t,M))!=n:(_=T===v(t,M),D=D||_),B=a(t,M),B=B===n?"":B,u.push({id:l?C[O]:O,label:B,selected:_});h||(d||T===null?e[""].unshift({id:"",label:"",selected:!D}):D||e[""].unshift({id:"?",label:"",selected:!0}));for(A=0,k=r.length;A<k;A++){i=r[A],u=e[i],w.length<=A?(E={element:g.clone().attr("label",i),label:u.label},S=[E],w.push(S),s.append(E.element)):(S=w[A],E=S[0],E.label!=i&&E.element.attr("label",E.label=i)),P=null;for(O=0,L=u.length;O<L;O++)p=u[O],(x=S[O+1])?(P=x.element,x.label!==p.label&&P.text(x.label=p.label),x.id!==p.id&&P.val(x.id=p.id),P[0].selected!==p.selected&&P.prop("selected",x.selected=p.selected)):(p.id===""&&d?H=d:(H=m.clone()).val(p.id).attr("selected",p.selected).text(p.label),S.push(x={element:H,label:p.label,id:p.id,selected:p.selected}),P?P.after(H):E.element.append(H),P=H);O++;while(S.length>O)S.pop().element.remove()}while(w.length>A)w.pop()[0].element.remove()}var u;if(!(u=p.match(i)))throw Error("Expected ngOptions in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '"+
|
||||
p+"'.");var a=r(u[2]||u[1]),f=u[4]||u[6],l=u[5],c=r(u[3]||""),v=r(u[2]?u[1]:f),y=r(u[7]),w=[[{element:s,label:""}]];d&&(e(d)(t),d.removeClass("ng-scope"),d.remove()),s.html(""),s.bind("change",function(){t.$apply(function(){var e,r=y(t)||[],i={},u,a,c,p,d,m,g;if(h){a=[];for(d=0,g=w.length;d<g;d++){e=w[d];for(p=1,m=e.length;p<m;p++)(c=e[p].element)[0].selected&&(u=c.val(),l&&(i[l]=u),i[f]=r[u],a.push(v(t,i)))}}else u=s.val(),u=="?"?a=n:u==""?a=null:(i[f]=r[u],l&&(i[l]=u),a=v(t,i));o.$setViewValue(a)})}),o.$render=E,t.$watch(E)}if(!f[1])return;var l=f[0],c=f[1],h=u.multiple,p=u.ngOptions,d=!1,v,m=a(t.createElement("option")),g=a(t.createElement("optgroup")),w=m.clone();for(var E=0,S=o.children(),x=S.length;E<x;E++)if(S[E].value==""){v=d=S.eq(E);break}l.init(c,d,w);if(h&&(u.required||u.ngRequired)){var T=function(e){return c.$setValidity("required",!u.required||e&&e.length),e};c.$parsers.push(T),c.$formatters.unshift(T),u.$observe("required",function(){T(c.$viewValue)})}p?k(s,o,c):h?C(s,o,
|
||||
c):N(s,o,c,l)}}}],Ii=["$interpolate",function(e){var t={addOption:k,removeOption:k};return{restrict:"E",priority:100,compile:function(n,r){if(O(r.value)){var i=e(n.text(),!0);i||r.$set("value",n.text())}return function(e,n,r){var s="$selectController",o=n.parent(),u=o.data(s)||o.parent().data(s);u&&u.databound?n.prop("selected",!1):u=t,i?e.$watch(i,function(t,n){r.$set("value",t),t!==n&&u.removeOption(n),u.addOption(t)}):u.addOption(r.value),n.bind("$destroy",function(){u.removeOption(r.value)})}}}}],qi=A({restrict:"E",terminal:!0});yt(),Tt(p),a(t).ready(function(){dt(t,vt)})}(window,document),angular.element(document).find("head").append('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none !important;}ng\\:form{display:block;}</style>'),define("angular",["jquery"],function(e){return function(){var t,n;return t||e.angular}}(this)),function(){var e=this,t=e._,n={},r=Array.prototype,i=Object.prototype,s=Function.prototype
|
||||
,o=r.push,u=r.slice,a=r.concat,f=i.toString,l=i.hasOwnProperty,c=r.forEach,h=r.map,p=r.reduce,d=r.reduceRight,v=r.filter,m=r.every,g=r.some,y=r.indexOf,b=r.lastIndexOf,w=Array.isArray,E=Object.keys,S=s.bind,x=function(e){if(e instanceof x)return e;if(!(this instanceof x))return new x(e);this._wrapped=e};typeof exports!="undefined"?(typeof module!="undefined"&&module.exports&&(exports=module.exports=x),exports._=x):e._=x,x.VERSION="1.5.1";var T=x.each=x.forEach=function(e,t,r){if(e==null)return;if(c&&e.forEach===c)e.forEach(t,r);else if(e.length===+e.length){for(var i=0,s=e.length;i<s;i++)if(t.call(r,e[i],i,e)===n)return}else for(var o in e)if(x.has(e,o)&&t.call(r,e[o],o,e)===n)return};x.map=x.collect=function(e,t,n){var r=[];return e==null?r:h&&e.map===h?e.map(t,n):(T(e,function(e,i,s){r.push(t.call(n,e,i,s))}),r)};var N="Reduce of empty array with no initial value";x.reduce=x.foldl=x.inject=function(e,t,n,r){var i=arguments.length>2;e==null&&(e=[]);if(p&&e.reduce===p)return r&&(t=x.bind
|
||||
(t,r)),i?e.reduce(t,n):e.reduce(t);T(e,function(e,s,o){i?n=t.call(r,n,e,s,o):(n=e,i=!0)});if(!i)throw new TypeError(N);return n},x.reduceRight=x.foldr=function(e,t,n,r){var i=arguments.length>2;e==null&&(e=[]);if(d&&e.reduceRight===d)return r&&(t=x.bind(t,r)),i?e.reduceRight(t,n):e.reduceRight(t);var s=e.length;if(s!==+s){var o=x.keys(e);s=o.length}T(e,function(u,a,f){a=o?o[--s]:--s,i?n=t.call(r,n,e[a],a,f):(n=e[a],i=!0)});if(!i)throw new TypeError(N);return n},x.find=x.detect=function(e,t,n){var r;return C(e,function(e,i,s){if(t.call(n,e,i,s))return r=e,!0}),r},x.filter=x.select=function(e,t,n){var r=[];return e==null?r:v&&e.filter===v?e.filter(t,n):(T(e,function(e,i,s){t.call(n,e,i,s)&&r.push(e)}),r)},x.reject=function(e,t,n){return x.filter(e,function(e,r,i){return!t.call(n,e,r,i)},n)},x.every=x.all=function(e,t,r){t||(t=x.identity);var i=!0;return e==null?i:m&&e.every===m?e.every(t,r):(T(e,function(e,s,o){if(!(i=i&&t.call(r,e,s,o)))return n}),!!i)};var C=x.some=x.any=function(e,t,r)
|
||||
{t||(t=x.identity);var i=!1;return e==null?i:g&&e.some===g?e.some(t,r):(T(e,function(e,s,o){if(i||(i=t.call(r,e,s,o)))return n}),!!i)};x.contains=x.include=function(e,t){return e==null?!1:y&&e.indexOf===y?e.indexOf(t)!=-1:C(e,function(e){return e===t})},x.invoke=function(e,t){var n=u.call(arguments,2),r=x.isFunction(t);return x.map(e,function(e){return(r?t:e[t]).apply(e,n)})},x.pluck=function(e,t){return x.map(e,function(e){return e[t]})},x.where=function(e,t,n){return x.isEmpty(t)?n?void 0:[]:x[n?"find":"filter"](e,function(e){for(var n in t)if(t[n]!==e[n])return!1;return!0})},x.findWhere=function(e,t){return x.where(e,t,!0)},x.max=function(e,t,n){if(!t&&x.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.max.apply(Math,e);if(!t&&x.isEmpty(e))return-Infinity;var r={computed:-Infinity,value:-Infinity};return T(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o>r.computed&&(r={value:e,computed:o})}),r.value},x.min=function(e,t,n){if(!t&&x.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math
|
||||
.min.apply(Math,e);if(!t&&x.isEmpty(e))return Infinity;var r={computed:Infinity,value:Infinity};return T(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o<r.computed&&(r={value:e,computed:o})}),r.value},x.shuffle=function(e){var t,n=0,r=[];return T(e,function(e){t=x.random(n++),r[n-1]=r[t],r[t]=e}),r};var k=function(e){return x.isFunction(e)?e:function(t){return t[e]}};x.sortBy=function(e,t,n){var r=k(t);return x.pluck(x.map(e,function(e,t,i){return{value:e,index:t,criteria:r.call(n,e,t,i)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||n===void 0)return 1;if(n<r||r===void 0)return-1}return e.index<t.index?-1:1}),"value")};var L=function(e,t,n,r){var i={},s=k(t==null?x.identity:t);return T(e,function(t,o){var u=s.call(n,t,o,e);r(i,u,t)}),i};x.groupBy=function(e,t,n){return L(e,t,n,function(e,t,n){(x.has(e,t)?e[t]:e[t]=[]).push(n)})},x.countBy=function(e,t,n){return L(e,t,n,function(e,t){x.has(e,t)||(e[t]=0),e[t]++})},x.sortedIndex=function(e,t,n,r){n=n==null?x.identity
|
||||
:k(n);var i=n.call(r,t),s=0,o=e.length;while(s<o){var u=s+o>>>1;n.call(r,e[u])<i?s=u+1:o=u}return s},x.toArray=function(e){return e?x.isArray(e)?u.call(e):e.length===+e.length?x.map(e,x.identity):x.values(e):[]},x.size=function(e){return e==null?0:e.length===+e.length?e.length:x.keys(e).length},x.first=x.head=x.take=function(e,t,n){return e==null?void 0:t!=null&&!n?u.call(e,0,t):e[0]},x.initial=function(e,t,n){return u.call(e,0,e.length-(t==null||n?1:t))},x.last=function(e,t,n){return e==null?void 0:t!=null&&!n?u.call(e,Math.max(e.length-t,0)):e[e.length-1]},x.rest=x.tail=x.drop=function(e,t,n){return u.call(e,t==null||n?1:t)},x.compact=function(e){return x.filter(e,x.identity)};var A=function(e,t,n){return t&&x.every(e,x.isArray)?a.apply(n,e):(T(e,function(e){x.isArray(e)||x.isArguments(e)?t?o.apply(n,e):A(e,t,n):n.push(e)}),n)};x.flatten=function(e,t){return A(e,t,[])},x.without=function(e){return x.difference(e,u.call(arguments,1))},x.uniq=x.unique=function(e,t,n,r){x.isFunction(t)&&
|
||||
(r=n,n=t,t=!1);var i=n?x.map(e,n,r):e,s=[],o=[];return T(i,function(n,r){if(t?!r||o[o.length-1]!==n:!x.contains(o,n))o.push(n),s.push(e[r])}),s},x.union=function(){return x.uniq(x.flatten(arguments,!0))},x.intersection=function(e){var t=u.call(arguments,1);return x.filter(x.uniq(e),function(e){return x.every(t,function(t){return x.indexOf(t,e)>=0})})},x.difference=function(e){var t=a.apply(r,u.call(arguments,1));return x.filter(e,function(e){return!x.contains(t,e)})},x.zip=function(){var e=x.max(x.pluck(arguments,"length").concat(0)),t=new Array(e);for(var n=0;n<e;n++)t[n]=x.pluck(arguments,""+n);return t},x.object=function(e,t){if(e==null)return{};var n={};for(var r=0,i=e.length;r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},x.indexOf=function(e,t,n){if(e==null)return-1;var r=0,i=e.length;if(n){if(typeof n!="number")return r=x.sortedIndex(e,t),e[r]===t?r:-1;r=n<0?Math.max(0,i+n):n}if(y&&e.indexOf===y)return e.indexOf(t,n);for(;r<i;r++)if(e[r]===t)return r;return-1},x.lastIndexOf=function(
|
||||
e,t,n){if(e==null)return-1;var r=n!=null;if(b&&e.lastIndexOf===b)return r?e.lastIndexOf(t,n):e.lastIndexOf(t);var i=r?n:e.length;while(i--)if(e[i]===t)return i;return-1},x.range=function(e,t,n){arguments.length<=1&&(t=e||0,e=0),n=arguments[2]||1;var r=Math.max(Math.ceil((t-e)/n),0),i=0,s=new Array(r);while(i<r)s[i++]=e,e+=n;return s};var O=function(){};x.bind=function(e,t){var n,r;if(S&&e.bind===S)return S.apply(e,u.call(arguments,1));if(!x.isFunction(e))throw new TypeError;return n=u.call(arguments,2),r=function(){if(this instanceof r){O.prototype=e.prototype;var i=new O;O.prototype=null;var s=e.apply(i,n.concat(u.call(arguments)));return Object(s)===s?s:i}return e.apply(t,n.concat(u.call(arguments)))}},x.partial=function(e){var t=u.call(arguments,1);return function(){return e.apply(this,t.concat(u.call(arguments)))}},x.bindAll=function(e){var t=u.call(arguments,1);if(t.length===0)throw new Error("bindAll must be passed function names");return T(t,function(t){e[t]=x.bind(e[t],e)}),e},x
|
||||
.memoize=function(e,t){var n={};return t||(t=x.identity),function(){var r=t.apply(this,arguments);return x.has(n,r)?n[r]:n[r]=e.apply(this,arguments)}},x.delay=function(e,t){var n=u.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},x.defer=function(e){return x.delay.apply(x,[e,1].concat(u.call(arguments,1)))},x.throttle=function(e,t,n){var r,i,s,o=null,u=0;n||(n={});var a=function(){u=n.leading===!1?0:new Date,o=null,s=e.apply(r,i)};return function(){var f=new Date;!u&&n.leading===!1&&(u=f);var l=t-(f-u);return r=this,i=arguments,l<=0?(clearTimeout(o),o=null,u=f,s=e.apply(r,i)):!o&&n.trailing!==!1&&(o=setTimeout(a,l)),s}},x.debounce=function(e,t,n){var r,i=null;return function(){var s=this,o=arguments,u=function(){i=null,n||(r=e.apply(s,o))},a=n&&!i;return clearTimeout(i),i=setTimeout(u,t),a&&(r=e.apply(s,o)),r}},x.once=function(e){var t=!1,n;return function(){return t?n:(t=!0,n=e.apply(this,arguments),e=null,n)}},x.wrap=function(e,t){return function(){var n=[e]
|
||||
;return o.apply(n,arguments),t.apply(this,n)}},x.compose=function(){var e=arguments;return function(){var t=arguments;for(var n=e.length-1;n>=0;n--)t=[e[n].apply(this,t)];return t[0]}},x.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},x.keys=E||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var t=[];for(var n in e)x.has(e,n)&&t.push(n);return t},x.values=function(e){var t=[];for(var n in e)x.has(e,n)&&t.push(e[n]);return t},x.pairs=function(e){var t=[];for(var n in e)x.has(e,n)&&t.push([n,e[n]]);return t},x.invert=function(e){var t={};for(var n in e)x.has(e,n)&&(t[e[n]]=n);return t},x.functions=x.methods=function(e){var t=[];for(var n in e)x.isFunction(e[n])&&t.push(n);return t.sort()},x.extend=function(e){return T(u.call(arguments,1),function(t){if(t)for(var n in t)e[n]=t[n]}),e},x.pick=function(e){var t={},n=a.apply(r,u.call(arguments,1));return T(n,function(n){n in e&&(t[n]=e[n])}),t},x.omit=function(e){var t={},n=a.apply(r,u.call(arguments
|
||||
,1));for(var i in e)x.contains(n,i)||(t[i]=e[i]);return t},x.defaults=function(e){return T(u.call(arguments,1),function(t){if(t)for(var n in t)e[n]===void 0&&(e[n]=t[n])}),e},x.clone=function(e){return x.isObject(e)?x.isArray(e)?e.slice():x.extend({},e):e},x.tap=function(e,t){return t(e),e};var M=function(e,t,n,r){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null)return e===t;e instanceof x&&(e=e._wrapped),t instanceof x&&(t=t._wrapped);var i=f.call(e);if(i!=f.call(t))return!1;switch(i){case"[object String]":return e==String(t);case"[object Number]":return e!=+e?t!=+t:e==0?1/e==1/t:e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}if(typeof e!="object"||typeof t!="object")return!1;var s=n.length;while(s--)if(n[s]==e)return r[s]==t;var o=e.constructor,u=t.constructor;if(o!==u&&!(x.isFunction(o)&&o instanceof o&&x.isFunction(u)&&u instanceof u))return!1;n
|
||||
.push(e),r.push(t);var a=0,l=!0;if(i=="[object Array]"){a=e.length,l=a==t.length;if(l)while(a--)if(!(l=M(e[a],t[a],n,r)))break}else{for(var c in e)if(x.has(e,c)){a++;if(!(l=x.has(t,c)&&M(e[c],t[c],n,r)))break}if(l){for(c in t)if(x.has(t,c)&&!(a--))break;l=!a}}return n.pop(),r.pop(),l};x.isEqual=function(e,t){return M(e,t,[],[])},x.isEmpty=function(e){if(e==null)return!0;if(x.isArray(e)||x.isString(e))return e.length===0;for(var t in e)if(x.has(e,t))return!1;return!0},x.isElement=function(e){return!!e&&e.nodeType===1},x.isArray=w||function(e){return f.call(e)=="[object Array]"},x.isObject=function(e){return e===Object(e)},T(["Arguments","Function","String","Number","Date","RegExp"],function(e){x["is"+e]=function(t){return f.call(t)=="[object "+e+"]"}}),x.isArguments(arguments)||(x.isArguments=function(e){return!!e&&!!x.has(e,"callee")}),typeof /./!="function"&&(x.isFunction=function(e){return typeof e=="function"}),x.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},x.isNaN=
|
||||
function(e){return x.isNumber(e)&&e!=+e},x.isBoolean=function(e){return e===!0||e===!1||f.call(e)=="[object Boolean]"},x.isNull=function(e){return e===null},x.isUndefined=function(e){return e===void 0},x.has=function(e,t){return l.call(e,t)},x.noConflict=function(){return e._=t,this},x.identity=function(e){return e},x.times=function(e,t,n){var r=Array(Math.max(0,e));for(var i=0;i<e;i++)r[i]=t.call(n,i);return r},x.random=function(e,t){return t==null&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))};var _={escape:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"}};_.unescape=x.invert(_.escape);var D={escape:new RegExp("["+x.keys(_.escape).join("")+"]","g"),unescape:new RegExp("("+x.keys(_.unescape).join("|")+")","g")};x.each(["escape","unescape"],function(e){x[e]=function(t){return t==null?"":(""+t).replace(D[e],function(t){return _[e][t]})}}),x.result=function(e,t){if(e==null)return void 0;var n=e[t];return x.isFunction(n)?n.call(e):n},x.mixin=function(e){T(x.functions
|
||||
(e),function(t){var n=x[t]=e[t];x.prototype[t]=function(){var e=[this._wrapped];return o.apply(e,arguments),F.call(this,n.apply(x,e))}})};var P=0;x.uniqueId=function(e){var t=++P+"";return e?e+t:t},x.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var H=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},j=/\\|'|\r|\n|\t|\u2028|\u2029/g;x.template=function(e,t,n){var r;n=x.defaults({},n,x.templateSettings);var i=new RegExp([(n.escape||H).source,(n.interpolate||H).source,(n.evaluate||H).source].join("|")+"|$","g"),s=0,o="__p+='";e.replace(i,function(t,n,r,i,u){return o+=e.slice(s,u).replace(j,function(e){return"\\"+B[e]}),n&&(o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'"),r&&(o+="'+\n((__t=("+r+"))==null?'':__t)+\n'"),i&&(o+="';\n"+i+"\n__p+='"),s=u+t.length,t}),o+="';\n",n.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+
|
||||
o+"return __p;\n";try{r=new Function(n.variable||"obj","_",o)}catch(u){throw u.source=o,u}if(t)return r(t,x);var a=function(e){return r.call(this,e,x)};return a.source="function("+(n.variable||"obj")+"){\n"+o+"}",a},x.chain=function(e){return x(e).chain()};var F=function(e){return this._chain?x(e).chain():e};x.mixin(x),T(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=r[e];x.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),(e=="shift"||e=="splice")&&n.length===0&&delete n[0],F.call(this,n)}}),T(["concat","join","slice"],function(e){var t=r[e];x.prototype[e]=function(){return F.call(this,t.apply(this._wrapped,arguments))}}),x.extend(x.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}.call(this),define("underscore-src",function(){}),define("underscore",["underscore-src"],function(){var e=window._;return e.mixin({move:function(e,t,n){return e.splice(n,0,e.splice(t,1)[0]),e},remove:function(e
|
||||
,t){return e.splice(t,1),e},toggleInOut:function(t,n){return e.contains(t,n)?t=e.without(t,n):t.push(n),t}}),e}),function(){var e=this,t=e&&e.ejs,n=Array.prototype,r=Object.prototype,i=n.slice,s=r.toString,o=r.hasOwnProperty,u=n.forEach,a=Array.isArray,f={},l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A,O;typeof exports!="undefined"?O=exports:O=e.ejs={},l=function(e,t){return o.call(e,t)},c=function(e,t,n){if(e==null)return;if(u&&e.forEach===u)e.forEach(t,n);else if(e.length===+e.length){for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e)===f)return}else for(var s in e)if(l(e,s)&&t.call(n,e[s],s,e)===f)return},h=function(e){return c(i.call(arguments,1),function(t){for(var n in t)e[n]=t[n]}),e},p=a||function(e){return s.call(e)==="[object Array]"},d=function(e){return e===Object(e)},v=function(e){return s.call(e)==="[object String]"},m=function(e){return s.call(e)==="[object Number]"},typeof /./!="function"?g=function(e){return typeof e=="function"}:g=function(e){return s.call(e)==="[object Function]"
|
||||
},y=function(e){return d(e)&&l(e,"_type")&&l(e,"_self")&&l(e,"toString")},b=function(e){return y(e)&&e._type()==="query"},w=function(e){return y(e)&&e._type()==="filter"},E=function(e){return y(e)&&e._type()==="facet"},S=function(e){return y(e)&&e._type()==="script field"},x=function(e){return y(e)&&e._type()==="geo point"},T=function(e){return y(e)&&e._type()==="indexed shape"},N=function(e){return y(e)&&e._type()==="shape"},C=function(e){return y(e)&&e._type()==="sort"},k=function(e){return y(e)&&e._type()==="highlight"},L=function(e){return y(e)&&e._type()==="suggest"},A=function(e){return y(e)&&e._type()==="generator"},O.DateHistogramFacet=function(e){var t={};return t[e]={date_histogram:{}},{field:function(n){return n==null?t[e].date_histogram.field:(t[e].date_histogram.field=n,this)},keyField:function(n){return n==null?t[e].date_histogram.key_field:(t[e].date_histogram.key_field=n,this)},valueField:function(n){return n==null?t[e].date_histogram.value_field:(t[e].date_histogram.value_field=
|
||||
n,this)},interval:function(n){return n==null?t[e].date_histogram.interval:(t[e].date_histogram.interval=n,this)},timeZone:function(n){return n==null?t[e].date_histogram.time_zone:(t[e].date_histogram.time_zone=n,this)},preZone:function(n){return n==null?t[e].date_histogram.pre_zone:(t[e].date_histogram.pre_zone=n,this)},preZoneAdjustLargeInterval:function(n){return n==null?t[e].date_histogram.pre_zone_adjust_large_interval:(t[e].date_histogram.pre_zone_adjust_large_interval=n,this)},postZone:function(n){return n==null?t[e].date_histogram.post_zone:(t[e].date_histogram.post_zone=n,this)},preOffset:function(n){return n==null?t[e].date_histogram.pre_offset:(t[e].date_histogram.pre_offset=n,this)},postOffset:function(n){return n==null?t[e].date_histogram.post_offset:(t[e].date_histogram.post_offset=n,this)},factor:function(n){return n==null?t[e].date_histogram.factor:(t[e].date_histogram.factor=n,this)},valueScript:function(n){return n==null?t[e].date_histogram.value_script:(t[e].date_histogram
|
||||
.value_script=n,this)},order:function(n){if(n==null)return t[e].date_histogram.order;n=n.toLowerCase();if(n==="time"||n==="count"||n==="total")t[e].date_histogram.order=n;return this},lang:function(n){return n==null?t[e].date_histogram.lang:(t[e].date_histogram.lang=n,this)},params:function(n){return n==null?t[e].date_histogram.params:(t[e].date_histogram.params=n,this)},facetFilter:function(n){if(n==null)return t[e].facet_filter;if(!w(n))throw new TypeError("Argument must be a Filter");return t[e].facet_filter=n._self(),this},global:function(n){return n==null?t[e].global:(t[e].global=n,this)},mode:function(n){if(n==null)return t[e].mode;n=n.toLowerCase();if(n==="collector"||n==="post")t[e].mode=n;return this},scope:function(e){return this},cacheFilter:function(n){return n==null?t[e].cache_filter:(t[e].cache_filter=n,this)},nested:function(n){return n==null?t[e].nested:(t[e].nested=n,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"facet"},_self:function(){return t
|
||||
}}},O.FilterFacet=function(e){var t={};return t[e]={},{filter:function(n){if(n==null)return t[e].filter;if(!w(n))throw new TypeError("Argument must be a Filter");return t[e].filter=n._self(),this},facetFilter:function(n){if(n==null)return t[e].facet_filter;if(!w(n))throw new TypeError("Argument must be a Filter");return t[e].facet_filter=n._self(),this},global:function(n){return n==null?t[e].global:(t[e].global=n,this)},mode:function(n){if(n==null)return t[e].mode;n=n.toLowerCase();if(n==="collector"||n==="post")t[e].mode=n;return this},scope:function(e){return this},cacheFilter:function(n){return n==null?t[e].cache_filter:(t[e].cache_filter=n,this)},nested:function(n){return n==null?t[e].nested:(t[e].nested=n,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"facet"},_self:function(){return t}}},O.GeoDistanceFacet=function(e){var t={},n=O.GeoPoint([0,0]),r="location";return t[e]={geo_distance:{location:n._self(),ranges:[]}},{field:function(n){var i=t[e].geo_distance
|
||||
[r];return n==null?r:(delete t[e].geo_distance[r],r=n,t[e].geo_distance[n]=i,this)},point:function(i){if(i==null)return n;if(!x(i))throw new TypeError("Argument must be a GeoPoint");return n=i,t[e].geo_distance[r]=i._self(),this},addRange:function(n,r){return arguments.length===0?t[e].geo_distance.ranges:(t[e].geo_distance.ranges.push({from:n,to:r}),this)},addUnboundedFrom:function(n){return n==null?t[e].geo_distance.ranges:(t[e].geo_distance.ranges.push({from:n}),this)},addUnboundedTo:function(n){return n==null?t[e].geo_distance.ranges:(t[e].geo_distance.ranges.push({to:n}),this)},unit:function(n){if(n==null)return t[e].geo_distance.unit;n=n.toLowerCase();if(n==="mi"||n==="km")t[e].geo_distance.unit=n;return this},distanceType:function(n){if(n==null)return t[e].geo_distance.distance_type;n=n.toLowerCase();if(n==="arc"||n==="plane")t[e].geo_distance.distance_type=n;return this},normalize:function(n){return n==null?t[e].geo_distance.normalize:(t[e].geo_distance.normalize=n,this)},valueField
|
||||
:function(n){return n==null?t[e].geo_distance.value_field:(t[e].geo_distance.value_field=n,this)},valueScript:function(n){return n==null?t[e].geo_distance.value_script:(t[e].geo_distance.value_script=n,this)},lang:function(n){return n==null?t[e].geo_distance.lang:(t[e].geo_distance.lang=n,this)},params:function(n){return n==null?t[e].geo_distance.params:(t[e].geo_distance.params=n,this)},facetFilter:function(n){if(n==null)return t[e].facet_filter;if(!w(n))throw new TypeError("Argument must be a Filter");return t[e].facet_filter=n._self(),this},global:function(n){return n==null?t[e].global:(t[e].global=n,this)},mode:function(n){if(n==null)return t[e].mode;n=n.toLowerCase();if(n==="collector"||n==="post")t[e].mode=n;return this},scope:function(e){return this},cacheFilter:function(n){return n==null?t[e].cache_filter:(t[e].cache_filter=n,this)},nested:function(n){return n==null?t[e].nested:(t[e].nested=n,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"facet"},_self
|
||||
:function(){return t}}},O.HistogramFacet=function(e){var t={};return t[e]={histogram:{}},{field:function(n){return n==null?t[e].histogram.field:(t[e].histogram.field=n,this)},interval:function(n){return n==null?t[e].histogram.interval:(t[e].histogram.interval=n,this)},timeInterval:function(n){return n==null?t[e].histogram.time_interval:(t[e].histogram.time_interval=n,this)},from:function(n){return n==null?t[e].histogram.from:(t[e].histogram.from=n,this)},to:function(n){return n==null?t[e].histogram.to:(t[e].histogram.to=n,this)},valueField:function(n){return n==null?t[e].histogram.value_field:(t[e].histogram.value_field=n,this)},keyField:function(n){return n==null?t[e].histogram.key_field:(t[e].histogram.key_field=n,this)},valueScript:function(n){return n==null?t[e].histogram.value_script:(t[e].histogram.value_script=n,this)},keyScript:function(n){return n==null?t[e].histogram.key_script:(t[e].histogram.key_script=n,this)},lang:function(n){return n==null?t[e].histogram.lang:(t[e].histogram
|
||||
.lang=n,this)},params:function(n){return n==null?t[e].histogram.params:(t[e].histogram.params=n,this)},order:function(n){if(n==null)return t[e].histogram.order;n=n.toLowerCase();if(n==="key"||n==="count"||n==="total")t[e].histogram.order=n;return this},facetFilter:function(n){if(n==null)return t[e].facet_filter;if(!w(n))throw new TypeError("Argument must be a Filter");return t[e].facet_filter=n._self(),this},global:function(n){return n==null?t[e].global:(t[e].global=n,this)},mode:function(n){if(n==null)return t[e].mode;n=n.toLowerCase();if(n==="collector"||n==="post")t[e].mode=n;return this},scope:function(e){return this},cacheFilter:function(n){return n==null?t[e].cache_filter:(t[e].cache_filter=n,this)},nested:function(n){return n==null?t[e].nested:(t[e].nested=n,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"facet"},_self:function(){return t}}},O.QueryFacet=function(e){var t={};return t[e]={},{query:function(n){if(n==null)return t[e].query;if(!b(n))throw new
|
||||
TypeError("Argument must be a Query");return t[e].query=n._self(),this},facetFilter:function(n){if(n==null)return t[e].facet_filter;if(!w(n))throw new TypeError("Argumnet must be a Filter");return t[e].facet_filter=n._self(),this},global:function(n){return n==null?t[e].global:(t[e].global=n,this)},mode:function(n){if(n==null)return t[e].mode;n=n.toLowerCase();if(n==="collector"||n==="post")t[e].mode=n;return this},scope:function(e){return this},cacheFilter:function(n){return n==null?t[e].cache_filter:(t[e].cache_filter=n,this)},nested:function(n){return n==null?t[e].nested:(t[e].nested=n,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"facet"},_self:function(){return t}}},O.RangeFacet=function(e){var t={};return t[e]={range:{ranges:[]}},{field:function(n){return n==null?t[e].range.field:(t[e].range.field=n,this)},keyField:function(n){return n==null?t[e].range.key_field:(t[e].range.key_field=n,this)},valueField:function(n){return n==null?t[e].range.value_field
|
||||
:(t[e].range.value_field=n,this)},valueScript:function(n){return n==null?t[e].range.value_script:(t[e].range.value_script=n,this)},keyScript:function(n){return n==null?t[e].range.key_script:(t[e].range.key_script=n,this)},lang:function(n){return n==null?t[e].range.lang:(t[e].range.lang=n,this)},params:function(n){return n==null?t[e].range.params:(t[e].range.params=n,this)},addRange:function(n,r){return arguments.length===0?t[e].range.ranges:(t[e].range.ranges.push({from:n,to:r}),this)},addUnboundedFrom:function(n){return n==null?t[e].range.ranges:(t[e].range.ranges.push({from:n}),this)},addUnboundedTo:function(n){return n==null?t[e].range.ranges:(t[e].range.ranges.push({to:n}),this)},facetFilter:function(n){if(n==null)return t[e].facet_filter;if(!w(n))throw new TypeError("Argument must be a Filter");return t[e].facet_filter=n._self(),this},global:function(n){return n==null?t[e].global:(t[e].global=n,this)},mode:function(n){if(n==null)return t[e].mode;n=n.toLowerCase();if(n==="collector"||
|
||||
n==="post")t[e].mode=n;return this},scope:function(e){return this},cacheFilter:function(n){return n==null?t[e].cache_filter:(t[e].cache_filter=n,this)},nested:function(n){return n==null?t[e].nested:(t[e].nested=n,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"facet"},_self:function(){return t}}},O.StatisticalFacet=function(e){var t={};return t[e]={statistical:{}},{field:function(n){return n==null?t[e].statistical.field:(t[e].statistical.field=n,this)},fields:function(n){if(n==null)return t[e].statistical.fields;if(!p(n))throw new TypeError("Argument must be an array");return t[e].statistical.fields=n,this},script:function(n){return n==null?t[e].statistical.script:(t[e].statistical.script=n,this)},lang:function(n){return n==null?t[e].statistical.lang:(t[e].statistical.lang=n,this)},params:function(n){return n==null?t[e].statistical.params:(t[e].statistical.params=n,this)},facetFilter:function(n){if(n==null)return t[e].facet_filter;if(!w(n))throw new TypeError
|
||||
("Argument must be a Filter");return t[e].facet_filter=n._self(),this},global:function(n){return n==null?t[e].global:(t[e].global=n,this)},mode:function(n){if(n==null)return t[e].mode;n=n.toLowerCase();if(n==="collector"||n==="post")t[e].mode=n;return this},scope:function(e){return this},cacheFilter:function(n){return n==null?t[e].cache_filter:(t[e].cache_filter=n,this)},nested:function(n){return n==null?t[e].nested:(t[e].nested=n,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"facet"},_self:function(){return t}}},O.TermStatsFacet=function(e){var t={};return t[e]={terms_stats:{}},{valueField:function(n){return n==null?t[e].terms_stats.value_field:(t[e].terms_stats.value_field=n,this)},keyField:function(n){return n==null?t[e].terms_stats.key_field:(t[e].terms_stats.key_field=n,this)},scriptField:function(n){return n==null?t[e].terms_stats.script_field:(t[e].terms_stats.script_field=n,this)},valueScript:function(n){return n==null?t[e].terms_stats.value_script:
|
||||
(t[e].terms_stats.value_script=n,this)},allTerms:function(n){return n==null?t[e].terms_stats.all_terms:(t[e].terms_stats.all_terms=n,this)},lang:function(n){return n==null?t[e].terms_stats.lang:(t[e].terms_stats.lang=n,this)},params:function(n){return n==null?t[e].terms_stats.params:(t[e].terms_stats.params=n,this)},size:function(n){return n==null?t[e].terms_stats.size:(t[e].terms_stats.size=n,this)},order:function(n){if(n==null)return t[e].terms_stats.order;n=n.toLowerCase();if(n==="count"||n==="term"||n==="reverse_count"||n==="reverse_term"||n==="total"||n==="reverse_total"||n==="min"||n==="reverse_min"||n==="max"||n==="reverse_max"||n==="mean"||n==="reverse_mean")t[e].terms_stats.order=n;return this},facetFilter:function(n){if(n==null)return t[e].facet_filter;if(!w(n))throw new TypeError("Argument must be a Filter");return t[e].facet_filter=n._self(),this},global:function(n){return n==null?t[e].global:(t[e].global=n,this)},mode:function(n){if(n==null)return t[e].mode;n=n.toLowerCase(
|
||||
);if(n==="collector"||n==="post")t[e].mode=n;return this},scope:function(e){return this},cacheFilter:function(n){return n==null?t[e].cache_filter:(t[e].cache_filter=n,this)},nested:function(n){return n==null?t[e].nested:(t[e].nested=n,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"facet"},_self:function(){return t}}},O.TermsFacet=function(e){var t={};return t[e]={terms:{}},{field:function(n){return n==null?t[e].terms.field:(t[e].terms.field=n,this)},fields:function(n){if(n==null)return t[e].terms.fields;if(!p(n))throw new TypeError("Argument must be an array");return t[e].terms.fields=n,this},scriptField:function(n){return n==null?t[e].terms.script_field:(t[e].terms.script_field=n,this)},size:function(n){return n==null?t[e].terms.size:(t[e].terms.size=n,this)},order:function(n){if(n==null)return t[e].terms.order;n=n.toLowerCase();if(n==="count"||n==="term"||n==="reverse_count"||n==="reverse_term")t[e].terms.order=n;return this},allTerms:function(n){return n==
|
||||
null?t[e].terms.all_terms:(t[e].terms.all_terms=n,this)},exclude:function(n){t[e].terms.exclude==null&&(t[e].terms.exclude=[]);if(n==null)return t[e].terms.exclude;if(v(n))t[e].terms.exclude.push(n);else{if(!p(n))throw new TypeError("Argument must be string or array");t[e].terms.exclude=n}return this},regex:function(n){return n==null?t[e].terms.regex:(t[e].terms.regex=n,this)},regexFlags:function(n){return n==null?t[e].terms.regex_flags:(t[e].terms.regex_flags=n,this)},script:function(n){return n==null?t[e].terms.script:(t[e].terms.script=n,this)},lang:function(n){return n==null?t[e].terms.lang:(t[e].terms.lang=n,this)},params:function(n){return n==null?t[e].terms.params:(t[e].terms.params=n,this)},executionHint:function(n){return n==null?t[e].terms.execution_hint:(t[e].terms.execution_hint=n,this)},facetFilter:function(n){if(n==null)return t[e].facet_filter;if(!w(n))throw new TypeError("Argument must be a Filter");return t[e].facet_filter=n._self(),this},global:function(n){return n==null?
|
||||
t[e].global:(t[e].global=n,this)},mode:function(n){if(n==null)return t[e].mode;n=n.toLowerCase();if(n==="collector"||n==="post")t[e].mode=n;return this},scope:function(e){return this},cacheFilter:function(n){return n==null?t[e].cache_filter:(t[e].cache_filter=n,this)},nested:function(n){return n==null?t[e].nested:(t[e].nested=n,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"facet"},_self:function(){return t}}},O.AndFilter=function(e){var t,n,r={and:{filters:[]}};if(w(e))r.and.filters.push(e._self());else{if(!p(e))throw new TypeError("Argument must be a Filter or Array of Filters");for(t=0,n=e.length;t<n;t++){if(!w(e[t]))throw new TypeError("Array must contain only Filter objects");r.and.filters.push(e[t]._self())}}return{filters:function(e){var t,n;if(e==null)return r.and.filters;if(w(e))r.and.filters.push(e._self());else{if(!p(e))throw new TypeError("Argument must be a Filter or an Array of Filters");r.and.filters=[];for(t=0,n=e.length;t<n;t++){if(!w(e[t])
|
||||
)throw new TypeError("Array must contain only Filter objects");r.and.filters.push(e[t]._self())}}return this},name:function(e){return e==null?r.and._name:(r.and._name=e,this)},cache:function(e){return e==null?r.and._cache:(r.and._cache=e,this)},cacheKey:function(e){return e==null?r.and._cache_key:(r.and._cache_key=e,this)},toString:function(){return JSON.stringify(r)},_type:function(){return"filter"},_self:function(){return r}}},O.BoolFilter=function(){var e={bool:{}};return{must:function(t){var n,r;e.bool.must==null&&(e.bool.must=[]);if(t==null)return e.bool.must;if(w(t))e.bool.must.push(t._self());else{if(!p(t))throw new TypeError("Argument must be a Filter or array of Filters");e.bool.must=[];for(n=0,r=t.length;n<r;n++){if(!w(t[n]))throw new TypeError("Argument must be an array of Filters");e.bool.must.push(t[n]._self())}}return this},mustNot:function(t){var n,r;e.bool.must_not==null&&(e.bool.must_not=[]);if(t==null)return e.bool.must_not;if(w(t))e.bool.must_not.push(t._self());else{
|
||||
if(!p(t))throw new TypeError("Argument must be a Filter or array of Filters");e.bool.must_not=[];for(n=0,r=t.length;n<r;n++){if(!w(t[n]))throw new TypeError("Argument must be an array of Filters");e.bool.must_not.push(t[n]._self())}}return this},should:function(t){var n,r;e.bool.should==null&&(e.bool.should=[]);if(t==null)return e.bool.should;if(w(t))e.bool.should.push(t._self());else{if(!p(t))throw new TypeError("Argument must be a Filter or array of Filters");e.bool.should=[];for(n=0,r=t.length;n<r;n++){if(!w(t[n]))throw new TypeError("Argument must be an array of Filters");e.bool.should.push(t[n]._self())}}return this},name:function(t){return t==null?e.bool._name:(e.bool._name=t,this)},cache:function(t){return t==null?e.bool._cache:(e.bool._cache=t,this)},cacheKey:function(t){return t==null?e.bool._cache_key:(e.bool._cache_key=t,this)},toString:function(){return JSON.stringify(e)},_type:function(){return"filter"},_self:function(){return e}}},O.ExistsFilter=function(e){var t={exists:{
|
||||
field:e}};return{field:function(e){return e==null?t.exists.field:(t.exists.field=e,this)},name:function(e){return e==null?t.exists._name:(t.exists._name=e,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"filter"},_self:function(){return t}}},O.GeoBboxFilter=function(e){var t={geo_bounding_box:{}};return t.geo_bounding_box[e]={},{field:function(n){var r=t.geo_bounding_box[e];return n==null?e:(delete t.geo_bounding_box[e],e=n,t.geo_bounding_box[n]=r,this)},topLeft:function(n){if(n==null)return t.geo_bounding_box[e].top_left;if(!x(n))throw new TypeError("Argument must be a GeoPoint");return t.geo_bounding_box[e].top_left=n._self(),this},bottomRight:function(n){if(n==null)return t.geo_bounding_box[e].bottom_right;if(!x(n))throw new TypeError("Argument must be a GeoPoint");return t.geo_bounding_box[e].bottom_right=n._self(),this},type:function(e){if(e==null)return t.geo_bounding_box.type;e=e.toLowerCase();if(e==="memory"||e==="indexed")t.geo_bounding_box.type=e;return this
|
||||
},normalize:function(e){return e==null?t.geo_bounding_box.normalize:(t.geo_bounding_box.normalize=e,this)},name:function(e){return e==null?t.geo_bounding_box._name:(t.geo_bounding_box._name=e,this)},cache:function(e){return e==null?t.geo_bounding_box._cache:(t.geo_bounding_box._cache=e,this)},cacheKey:function(e){return e==null?t.geo_bounding_box._cache_key:(t.geo_bounding_box._cache_key=e,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"filter"},_self:function(){return t}}},O.GeoDistanceFilter=function(e){var t={geo_distance:{}};return t.geo_distance[e]=[0,0],{field:function(n){var r=t.geo_distance[e];return n==null?e:(delete t.geo_distance[e],e=n,t.geo_distance[n]=r,this)},distance:function(e){if(e==null)return t.geo_distance.distance;if(!m(e))throw new TypeError("Argument must be a numeric value");return t.geo_distance.distance=e,this},unit:function(e){if(e==null)return t.geo_distance.unit;e=e.toLowerCase();if(e==="mi"||e==="km")t.geo_distance.unit=e;return this
|
||||
},point:function(n){if(n==null)return t.geo_distance[e];if(!x(n))throw new TypeError("Argument must be a GeoPoint");return t.geo_distance[e]=n._self(),this},distanceType:function(e){if(e==null)return t.geo_distance.distance_type;e=e.toLowerCase();if(e==="arc"||e==="plane")t.geo_distance.distance_type=e;return this},normalize:function(e){return e==null?t.geo_distance.normalize:(t.geo_distance.normalize=e,this)},optimizeBbox:function(e){if(e==null)return t.geo_distance.optimize_bbox;e=e.toLowerCase();if(e==="memory"||e==="indexed"||e==="none")t.geo_distance.optimize_bbox=e;return this},name:function(e){return e==null?t.geo_distance._name:(t.geo_distance._name=e,this)},cache:function(e){return e==null?t.geo_distance._cache:(t.geo_distance._cache=e,this)},cacheKey:function(e){return e==null?t.geo_distance._cache_key:(t.geo_distance._cache_key=e,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"filter"},_self:function(){return t}}},O.GeoDistanceRangeFilter=function(
|
||||
e){var t={geo_distance_range:{}};return t.geo_distance_range[e]=[0,0],{field:function(n){var r=t.geo_distance_range[e];return n==null?e:(delete t.geo_distance_range[e],e=n,t.geo_distance_range[n]=r,this)},from:function(e){if(e==null)return t.geo_distance_range.from;if(!m(e))throw new TypeError("Argument must be a numeric value");return t.geo_distance_range.from=e,this},to:function(e){if(e==null)return t.geo_distance_range.to;if(!m(e))throw new TypeError("Argument must be a numeric value");return t.geo_distance_range.to=e,this},includeLower:function(e){return e==null?t.geo_distance_range.include_lower:(t.geo_distance_range.include_lower=e,this)},includeUpper:function(e){return e==null?t.geo_distance_range.include_upper:(t.geo_distance_range.include_upper=e,this)},gt:function(e){if(e==null)return t.geo_distance_range.gt;if(!m(e))throw new TypeError("Argument must be a numeric value");return t.geo_distance_range.gt=e,this},gte:function(e){if(e==null)return t.geo_distance_range.gte;if(!m(e)
|
||||
)throw new TypeError("Argument must be a numeric value");return t.geo_distance_range.gte=e,this},lt:function(e){if(e==null)return t.geo_distance_range.lt;if(!m(e))throw new TypeError("Argument must be a numeric value");return t.geo_distance_range.lt=e,this},lte:function(e){if(e==null)return t.geo_distance_range.lte;if(!m(e))throw new TypeError("Argument must be a numeric value");return t.geo_distance_range.lte=e,this},unit:function(e){if(e==null)return t.geo_distance_range.unit;e=e.toLowerCase();if(e==="mi"||e==="km")t.geo_distance_range.unit=e;return this},point:function(n){if(n==null)return t.geo_distance_range[e];if(!x(n))throw new TypeError("Argument must be a GeoPoint");return t.geo_distance_range[e]=n._self(),this},distanceType:function(e){if(e==null)return t.geo_distance_range.distance_type;e=e.toLowerCase();if(e==="arc"||e==="plane")t.geo_distance_range.distance_type=e;return this},normalize:function(e){return e==null?t.geo_distance_range.normalize:(t.geo_distance_range.normalize=
|
||||
e,this)},optimizeBbox:function(e){if(e==null)return t.geo_distance_range.optimize_bbox;e=e.toLowerCase();if(e==="memory"||e==="indexed"||e==="none")t.geo_distance_range.optimize_bbox=e;return this},name:function(e){return e==null?t.geo_distance_range._name:(t.geo_distance_range._name=e,this)},cache:function(e){return e==null?t.geo_distance_range._cache:(t.geo_distance_range._cache=e,this)},cacheKey:function(e){return e==null?t.geo_distance_range._cache_key:(t.geo_distance_range._cache_key=e,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"filter"},_self:function(){return t}}},O.GeoPolygonFilter=function(e){var t={geo_polygon:{}};return t.geo_polygon[e]={points:[]},{field:function(n){var r=t.geo_polygon[e];return n==null?e:(delete t.geo_polygon[e],e=n,t.geo_polygon[n]=r,this)},points:function(n){var r,i;if(n==null)return t.geo_polygon[e].points;if(x(n))t.geo_polygon[e].points.push(n._self());else{if(!p(n))throw new TypeError("Argument must be a GeoPoint or Array of GeoPoints"
|
||||
);t.geo_polygon[e].points=[];for(r=0,i=n.length;r<i;r++){if(!x(n[r]))throw new TypeError("Argument must be Array of GeoPoints");t.geo_polygon[e].points.push(n[r]._self())}}return this},normalize:function(e){return e==null?t.geo_polygon.normalize:(t.geo_polygon.normalize=e,this)},name:function(e){return e==null?t.geo_polygon._name:(t.geo_polygon._name=e,this)},cache:function(e){return e==null?t.geo_polygon._cache:(t.geo_polygon._cache=e,this)},cacheKey:function(e){return e==null?t.geo_polygon._cache_key:(t.geo_polygon._cache_key=e,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"filter"},_self:function(){return t}}},O.GeoShapeFilter=function(e){var t={geo_shape:{}};return t.geo_shape[e]={},{field:function(n){var r=t.geo_shape[e];return n==null?e:(delete t.geo_shape[e],e=n,t.geo_shape[n]=r,this)},shape:function(n){return n==null?t.geo_shape[e].shape:(t.geo_shape[e].indexed_shape!=null&&delete t.geo_shape[e].indexed_shape,t.geo_shape[e].shape=n._self(),this)},indexedShape
|
||||
:function(n){return n==null?t.geo_shape[e].indexed_shape:(t.geo_shape[e].shape!=null&&delete t.geo_shape[e].shape,t.geo_shape[e].indexed_shape=n._self(),this)},relation:function(n){if(n==null)return t.geo_shape[e].relation;n=n.toLowerCase();if(n==="intersects"||n==="disjoint"||n==="within")t.geo_shape[e].relation=n;return this},strategy:function(n){if(n==null)return t.geo_shape[e].strategy;n=n.toLowerCase();if(n==="recursive"||n==="term")t.geo_shape[e].strategy=n;return this},name:function(e){return e==null?t.geo_shape._name:(t.geo_shape._name=e,this)},cache:function(e){return e==null?t.geo_shape._cache:(t.geo_shape._cache=e,this)},cacheKey:function(e){return e==null?t.geo_shape._cache_key:(t.geo_shape._cache_key=e,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"filter"},_self:function(){return t}}},O.HasChildFilter=function(e,t){if(!b(e))throw new TypeError("No Query object found");var n={has_child:{query:e._self(),type:t}};return{query:function(e){if(e==null
|
||||
)return n.has_child.query;if(!b(e))throw new TypeError("Argument must be a Query object");return n.has_child.query=e._self(),this},filter:function(e){if(e==null)return n.has_child.filter;if(!w(e))throw new TypeError("Argument must be a Filter object");return n.has_child.filter=e._self(),this},type:function(e){return e==null?n.has_child.type:(n.has_child.type=e,this)},scope:function(e){return this},name:function(e){return e==null?n.has_child._name:(n.has_child._name=e,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"filter"},_self:function(){return n}}},O.HasParentFilter=function(e,t){if(!b(e))throw new TypeError("No Query object found");var n={has_parent:{query:e._self(),parent_type:t}};return{query:function(e){if(e==null)return n.has_parent.query;if(!b(e))throw new TypeError("Argument must be a Query object");return n.has_parent.query=e._self(),this},filter:function(e){if(e==null)return n.has_parent.filter;if(!w(e))throw new TypeError("Argument must be a Filter object"
|
||||
);return n.has_parent.filter=e._self(),this},parentType:function(e){return e==null?n.has_parent.parent_type:(n.has_parent.parent_type=e,this)},scope:function(e){return this},name:function(e){return e==null?n.has_parent._name:(n.has_parent._name=e,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"filter"},_self:function(){return n}}},O.IdsFilter=function(e){var t={ids:{}};if(v(e))t.ids.values=[e];else{if(!p(e))throw new TypeError("Argument must be a string or an array");t.ids.values=e}return{values:function(e){if(e==null)return t.ids.values;if(v(e))t.ids.values.push(e);else{if(!p(e))throw new TypeError("Argument must be a string or an array");t.ids.values=e}return this},type:function(e){t.ids.type==null&&(t.ids.type=[]);if(e==null)return t.ids.type;if(v(e))t.ids.type.push(e);else{if(!p(e))throw new TypeError("Argument must be a string or an array");t.ids.type=e}return this},name:function(e){return e==null?t.ids._name:(t.ids._name=e,this)},toString:function(){return JSON
|
||||
.stringify(t)},_type:function(){return"filter"},_self:function(){return t}}},O.IndicesFilter=function(e,t){if(!w(e))throw new TypeError("Argument must be a Filter");var n={indices:{filter:e._self()}};if(v(t))n.indices.indices=[t];else{if(!p(t))throw new TypeError("Argument must be a string or array");n.indices.indices=t}return{indices:function(e){if(e==null)return n.indices.indices;if(v(e))n.indices.indices.push(e);else{if(!p(e))throw new TypeError("Argument must be a string or array");n.indices.indices=e}return this},filter:function(e){if(e==null)return n.indices.filter;if(!w(e))throw new TypeError("Argument must be a Filter");return n.indices.filter=e._self(),this},noMatchFilter:function(e){if(e==null)return n.indices.no_match_filter;if(v(e)){e=e.toLowerCase();if(e==="none"||e==="all")n.indices.no_match_filter=e}else{if(!w(e))throw new TypeError("Argument must be string or Filter");n.indices.no_match_filter=e._self()}return this},toString:function(){return JSON.stringify(n)},_type:function(
|
||||
){return"filter"},_self:function(){return n}}},O.LimitFilter=function(e){var t={limit:{value:e}};return{value:function(e){if(e==null)return t.limit.value;if(!m(e))throw new TypeError("Argument must be a numeric value");return t.limit.value=e,this},toString:function(){return JSON.stringify(t)},_type:function(){return"filter"},_self:function(){return t}}},O.MatchAllFilter=function(){var e={match_all:{}};return{toString:function(){return JSON.stringify(e)},_type:function(){return"filter"},_self:function(){return e}}},O.MissingFilter=function(e){var t={missing:{field:e}};return{field:function(e){return e==null?t.missing.field:(t.missing.field=e,this)},existence:function(e){return e==null?t.missing.existence:(t.missing.existence=e,this)},nullValue:function(e){return e==null?t.missing.null_value:(t.missing.null_value=e,this)},name:function(e){return e==null?t.missing._name:(t.missing._name=e,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"filter"},_self:function()
|
||||
{return t}}},O.NestedFilter=function(e){var t={nested:{path:e}};return{path:function(e){return e==null?t.nested.path:(t.nested.path=e,this)},query:function(e){if(e==null)return t.nested.query;if(!b(e))throw new TypeError("Argument must be a Query object");return t.nested.query=e._self(),this},filter:function(e){if(e==null)return t.nested.filter;if(!w(e))throw new TypeError("Argument must be a Filter object");return t.nested.filter=e._self(),this},boost:function(e){return e==null?t.nested.boost:(t.nested.boost=e,this)},join:function(e){return e==null?t.nested.join:(t.nested.join=e,this)},scope:function(e){return this},name:function(e){return e==null?t.nested._name:(t.nested._name=e,this)},cache:function(e){return e==null?t.nested._cache:(t.nested._cache=e,this)},cacheKey:function(e){return e==null?t.nested._cache_key:(t.nested._cache_key=e,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"filter"},_self:function(){return t}}},O.NotFilter=function(e){if(!w(e))throw new
|
||||
TypeError("Argument must be a Filter");var t={not:e._self()};return{filter:function(e){if(e==null)return t.not;if(!w(e))throw new TypeError("Argument must be a Filter");return t.not=e._self(),this},name:function(e){return e==null?t.not._name:(t.not._name=e,this)},cache:function(e){return e==null?t.not._cache:(t.not._cache=e,this)},cacheKey:function(e){return e==null?t.not._cache_key:(t.not._cache_key=e,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"filter"},_self:function(){return t}}},O.NumericRangeFilter=function(e){var t={numeric_range:{}};return t.numeric_range[e]={},{field:function(n){var r=t.numeric_range[e];return n==null?e:(delete t.numeric_range[e],e=n,t.numeric_range[e]=r,this)},from:function(n){if(n==null)return t.numeric_range[e].from;if(!m(n))throw new TypeError("Argument must be a numeric value");return t.numeric_range[e].from=n,this},to:function(n){if(n==null)return t.numeric_range[e].to;if(!m(n))throw new TypeError("Argument must be a numeric value"
|
||||
);return t.numeric_range[e].to=n,this},includeLower:function(n){return n==null?t.numeric_range[e].include_lower:(t.numeric_range[e].include_lower=n,this)},includeUpper:function(n){return n==null?t.numeric_range[e].include_upper:(t.numeric_range[e].include_upper=n,this)},gt:function(n){if(n==null)return t.numeric_range[e].gt;if(!m(n))throw new TypeError("Argument must be a numeric value");return t.numeric_range[e].gt=n,this},gte:function(n){if(n==null)return t.numeric_range[e].gte;if(!m(n))throw new TypeError("Argument must be a numeric value");return t.numeric_range[e].gte=n,this},lt:function(n){if(n==null)return t.numeric_range[e].lt;if(!m(n))throw new TypeError("Argument must be a numeric value");return t.numeric_range[e].lt=n,this},lte:function(n){if(n==null)return t.numeric_range[e].lte;if(!m(n))throw new TypeError("Argument must be a numeric value");return t.numeric_range[e].lte=n,this},name:function(e){return e==null?t.numeric_range._name:(t.numeric_range._name=e,this)},cache:function(
|
||||
e){return e==null?t.numeric_range._cache:(t.numeric_range._cache=e,this)},cacheKey:function(e){return e==null?t.numeric_range._cache_key:(t.numeric_range._cache_key=e,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"filter"},_self:function(){return t}}},O.OrFilter=function(e){var t,n,r;t={or:{filters:[]}};if(w(e))t.or.filters.push(e._self());else{if(!p(e))throw new TypeError("Argument must be a Filter or array of Filters");for(n=0,r=e.length;n<r;n++){if(!w(e[n]))throw new TypeError("Argument must be array of Filters");t.or.filters.push(e[n]._self())}}return{filters:function(e){var n,r;if(e==null)return t.or.filters;if(w(e))t.or.filters.push(e._self());else{if(!p(e))throw new TypeError("Argument must be a Filter or array of Filters");t.or.filters=[];for(n=0,r=e.length;n<r;n++){if(!w(e[n]))throw new TypeError("Argument must be an array of Filters");t.or.filters.push(e[n]._self())}}return this},name:function(e){return e==null?t.or._name:(t.or._name=e,this)},cache
|
||||
:function(e){return e==null?t.or._cache:(t.or._cache=e,this)},cacheKey:function(e){return e==null?t.or._cache_key:(t.or._cache_key=e,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"filter"},_self:function(){return t}}},O.PrefixFilter=function(e,t){var n={prefix:{}};return n.prefix[e]=t,{field:function(t){var r=n.prefix[e];return t==null?e:(delete n.prefix[e],e=t,n.prefix[e]=r,this)},prefix:function(t){return t==null?n.prefix[e]:(n.prefix[e]=t,this)},name:function(e){return e==null?n.prefix._name:(n.prefix._name=e,this)},cache:function(e){return e==null?n.prefix._cache:(n.prefix._cache=e,this)},cacheKey:function(e){return e==null?n.prefix._cache_key:(n.prefix._cache_key=e,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"filter"},_self:function(){return n}}},O.QueryFilter=function(e){if(!b(e))throw new TypeError("Argument must be a Query");var t={fquery:{query:e._self()}};return{query:function(e){if(e==null)return t.fquery.query;if(!
|
||||
b(e))throw new TypeError("Argument must be a Query");return t.fquery.query=e._self(),this},name:function(e){return e==null?t.fquery._name:(t.fquery._name=e,this)},cache:function(e){return e==null?t.fquery._cache:(t.fquery._cache=e,this)},cacheKey:function(e){return e==null?t.fquery._cache_key:(t.fquery._cache_key=e,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"filter"},_self:function(){return t}}},O.RangeFilter=function(e){var t={range:{}};return t.range[e]={},{field:function(n){var r=t.range[e];return n==null?e:(delete t.range[e],e=n,t.range[n]=r,this)},from:function(n){return n==null?t.range[e].from:(t.range[e].from=n,this)},to:function(n){return n==null?t.range[e].to:(t.range[e].to=n,this)},includeLower:function(n){return n==null?t.range[e].include_lower:(t.range[e].include_lower=n,this)},includeUpper:function(n){return n==null?t.range[e].include_upper:(t.range[e].include_upper=n,this)},gt:function(n){return n==null?t.range[e].gt:(t.range[e].gt=n,this)}
|
||||
,gte:function(n){return n==null?t.range[e].gte:(t.range[e].gte=n,this)},lt:function(n){return n==null?t.range[e].lt:(t.range[e].lt=n,this)},lte:function(n){return n==null?t.range[e].lte:(t.range[e].lte=n,this)},name:function(e){return e==null?t.range._name:(t.range._name=e,this)},cache:function(e){return e==null?t.range._cache:(t.range._cache=e,this)},cacheKey:function(e){return e==null?t.range._cache_key:(t.range._cache_key=e,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"filter"},_self:function(){return t}}},O.RegexpFilter=function(e,t){var n={regexp:{}};return n.regexp[e]={value:t},{field:function(t){var r=n.regexp[e];return t==null?e:(delete n.regexp[e],e=t,n.regexp[t]=r,this)},value:function(t){return t==null?n.regexp[e].value:(n.regexp[e].value=t,this)},flags:function(t){return t==null?n.regexp[e].flags:(n.regexp[e].flags=t,this)},flagsValue:function(t){return t==null?n.regexp[e].flags_value:(n.regexp[e].flags_value=t,this)},name:function(e){return e==
|
||||
null?n.regexp._name:(n.regexp._name=e,this)},cache:function(e){return e==null?n.regexp._cache:(n.regexp._cache=e,this)},cacheKey:function(e){return e==null?n.regexp._cache_key:(n.regexp._cache_key=e,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"filter"},_self:function(){return n}}},O.ScriptFilter=function(e){var t={script:{script:e}};return{script:function(e){return e==null?t.script.script:(t.script.script=e,this)},params:function(e){return e==null?t.script.params:(t.script.params=e,this)},lang:function(e){return e==null?t.script.lang:(t.script.lang=e,this)},name:function(e){return e==null?t.script._name:(t.script._name=e,this)},cache:function(e){return e==null?t.script._cache:(t.script._cache=e,this)},cacheKey:function(e){return e==null?t.script._cache_key:(t.script._cache_key=e,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"filter"},_self:function(){return t}}},O.TermFilter=function(e,t){var n={term:{}};return n.term[e]=t,{field
|
||||
:function(t){var r=n.term[e];return t==null?e:(delete n.term[e],e=t,n.term[e]=r,this)},term:function(t){return t==null?n.term[e]:(n.term[e]=t,this)},name:function(e){return e==null?n.term._name:(n.term._name=e,this)},cache:function(e){return e==null?n.term._cache:(n.term._cache=e,this)},cacheKey:function(e){return e==null?n.term._cache_key:(n.term._cache_key=e,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"filter"},_self:function(){return n}}},O.TermsFilter=function(e,t){var n={terms:{}},r=function(){p(n.terms[e])||(n.terms[e]=[])},i=function(){p(n.terms[e])&&(n.terms[e]={})};return p(t)?n.terms[e]=t:n.terms[e]=[t],{field:function(t){var r=n.terms[e];return t==null?e:(delete n.terms[e],e=t,n.terms[t]=r,this)},terms:function(t){return r(),t==null?n.terms[e]:(p(t)?n.terms[e]=t:n.terms[e].push(t),this)},index:function(t){return i(),t==null?n.terms[e].index:(n.terms[e].index=t,this)},type:function(t){return i(),t==null?n.terms[e].type:(n.terms[e].type=t,this)},
|
||||
id:function(t){return i(),t==null?n.terms[e].id:(n.terms[e].id=t,this)},path:function(t){return i(),t==null?n.terms[e].path:(n.terms[e].path=t,this)},execution:function(e){if(e==null)return n.terms.execution;e=e.toLowerCase();if(e==="plain"||e==="bool"||e==="bool_nocache"||e==="and"||e==="and_nocache"||e==="or"||e==="or_nocache")n.terms.execution=e;return this},name:function(e){return e==null?n.terms._name:(n.terms._name=e,this)},cache:function(e){return e==null?n.terms._cache:(n.terms._cache=e,this)},cacheKey:function(e){return e==null?n.terms._cache_key:(n.terms._cache_key=e,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"filter"},_self:function(){return n}}},O.TypeFilter=function(e){var t={type:{value:e}};return{type:function(e){return e==null?t.type.value:(t.type.value=e,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"filter"},_self:function(){return t}}},O.Document=function(e,t,n){var r={},i=function(){var e=s(),t=[];for(var n in
|
||||
e){if(!l(e,n))continue;t.push(n+"="+encodeURIComponent(e[n]))}return t.join("&")},s=function(){var e={};for(var t in r){if(!l(r,t))continue;if(t==="upsert"||t==="source"||t==="script"||t==="lang"||t==="params")continue;var n=r[t];p(n)&&(n=n.join()),e[t]=n}return e};return{index:function(t){return t==null?e:(e=t,this)},type:function(e){return e==null?t:(t=e,this)},id:function(e){return e==null?n:(n=e,this)},routing:function(e){return e==null?r.routing:(r.routing=e,this)},parent:function(e){return e==null?r.parent:(r.parent=e,this)},timestamp:function(e){return e==null?r.timestamp:(r.timestamp=e,this)},ttl:function(e){return e==null?r.ttl:(r.ttl=e,this)},timeout:function(e){return e==null?r.timeout:(r.timeout=e,this)},refresh:function(e){return e==null?r.refresh:(r.refresh=e,this)},version:function(e){return e==null?r.version:(r.version=e,this)},versionType:function(e){if(e==null)return r.version_type;e=e.toLowerCase();if(e==="internal"||e==="external")r.version_type=e;return this},percolate
|
||||
:function(e){return e==null?r.percolate:(r.percolate=e,this)},opType:function(e){if(e==null)return r.op_type;e=e.toLowerCase();if(e==="index"||e==="create")r.op_type=e;return this},replication:function(e){if(e==null)return r.replication;e=e.toLowerCase();if(e==="async"||e==="sync"||e==="default")r.replication=e;return this},consistency:function(e){if(e==null)return r.consistency;e=e.toLowerCase();if(e==="default"||e==="one"||e==="quorum"||e==="all")r.consistency=e;return this},preference:function(e){return e==null?r.preference:(r.preference=e,this)},realtime:function(e){return e==null?r.realtime:(r.realtime=e,this)},fields:function(e){r.fields==null&&(r.fields=[]);if(e==null)return r.fields;if(v(e))r.fields.push(e);else{if(!p(e))throw new TypeError("Argument must be string or array");r.fields=e}return this},script:function(e){return e==null?r.script:(r.script=e,this)},lang:function(e){return e==null?r.lang:(r.lang=e,this)},params:function(e){if(e==null)return r.params;if(!d(e))throw new
|
||||
TypeError("Argument must be an object");return r.params=e,this},retryOnConflict:function(e){return e==null?r.retry_on_conflict:(r.retry_on_conflict=e,this)},upsert:function(e){if(e==null)return r.upsert;if(!d(e))throw new TypeError("Argument must be an object");return r.upsert=e,this},source:function(e){if(e==null)return r.source;if(!d(e))throw new TypeError("Argument must be an object");return r.source=e,this},toString:function(){return JSON.stringify(r)},_type:function(){return"document"},_self:function(){return r},doGet:function(r,i){if(O.client==null)throw new Error("No Client Set");if(e==null||t==null||n==null)throw new Error("Index, Type, and ID must be set");var o="/"+e+"/"+t+"/"+n;return O.client.get(o,s(),r,i)},doIndex:function(s,o){if(O.client==null)throw new Error("No Client Set");if(e==null||t==null)throw new Error("Index and Type must be set");if(r.source==null)throw new Error("No source document found");var u="/"+e+"/"+t,a=JSON.stringify(r.source),f=i(),l;return n!=null&&(
|
||||
u=u+"/"+n),f!==""&&(u=u+"?"+f),n==null?l=O.client.post(u,a,s,o):l=O.client.put(u,a,s,o),l},doUpdate:function(s,o){if(O.client==null)throw new Error("No Client Set");if(e==null||t==null||n==null)throw new Error("Index, Type, and ID must be set");if(r.script==null&&r.source==null)throw new Error("Update script or document required");var u="/"+e+"/"+t+"/"+n+"/_update",a={},f=i();return f!==""&&(u=u+"?"+f),r.script!=null&&(a.script=r.script),r.lang!=null&&(a.lang=r.lang),r.params!=null&&(a.params=r.params),r.upsert!=null&&(a.upsert=r.upsert),r.source!=null&&(a.doc=r.source),O.client.post(u,JSON.stringify(a),s,o)},doDelete:function(r,s){if(O.client==null)throw new Error("No Client Set");if(e==null||t==null||n==null)throw new Error("Index, Type, and ID must be set");var o="/"+e+"/"+t+"/"+n,u="",a=i();return a!==""&&(o=o+"?"+a),O.client.del(o,u,r,s)}}},O.BoolQuery=function(){var e={bool:{}};return{must:function(t){var n,r;e.bool.must==null&&(e.bool.must=[]);if(t==null)return e.bool.must;if(b(t
|
||||
))e.bool.must.push(t._self());else{if(!p(t))throw new TypeError("Argument must be a Query or array of Queries");e.bool.must=[];for(n=0,r=t.length;n<r;n++){if(!b(t[n]))throw new TypeError("Argument must be an array of Queries");e.bool.must.push(t[n]._self())}}return this},mustNot:function(t){var n,r;e.bool.must_not==null&&(e.bool.must_not=[]);if(t==null)return e.bool.must_not;if(b(t))e.bool.must_not.push(t._self());else{if(!p(t))throw new TypeError("Argument must be a Query or array of Queries");e.bool.must_not=[];for(n=0,r=t.length;n<r;n++){if(!b(t[n]))throw new TypeError("Argument must be an array of Queries");e.bool.must_not.push(t[n]._self())}}return this},should:function(t){var n,r;e.bool.should==null&&(e.bool.should=[]);if(t==null)return e.bool.should;if(b(t))e.bool.should.push(t._self());else{if(!p(t))throw new TypeError("Argument must be a Query or array of Queries");e.bool.should=[];for(n=0,r=t.length;n<r;n++){if(!b(t[n]))throw new TypeError("Argument must be an array of Queries"
|
||||
);e.bool.should.push(t[n]._self())}}return this},boost:function(t){return t==null?e.bool.boost:(e.bool.boost=t,this)},disableCoord:function(t){return t==null?e.bool.disable_coord:(e.bool.disable_coord=t,this)},minimumNumberShouldMatch:function(t){return t==null?e.bool.minimum_number_should_match:(e.bool.minimum_number_should_match=t,this)},toString:function(){return JSON.stringify(e)},_type:function(){return"query"},_self:function(){return e}}},O.BoostingQuery=function(e,t,n){if(!b(e)||!b(t))throw new TypeError("Arguments must be Queries");var r={boosting:{positive:e._self(),negative:t._self(),negative_boost:n}};return{positive:function(e){if(e==null)return r.boosting.positive;if(!b(e))throw new TypeError("Argument must be a Query");return r.boosting.positive=e._self(),this},negative:function(e){if(e==null)return r.boosting.negative;if(!b(e))throw new TypeError("Argument must be a Query");return r.boosting.negative=e._self(),this},negativeBoost:function(e){return e==null?r.boosting.negative_boost
|
||||
:(r.boosting.negative_boost=e,this)},boost:function(e){return e==null?r.boosting.boost:(r.boosting.boost=e,this)},toString:function(){return JSON.stringify(r)},_type:function(){return"query"},_self:function(){return r}}},O.CommonTermsQuery=function(e,t){var n={common:{}};return e==null&&(e="no_field_set"),n.common[e]={},t!=null&&(n.common[e].query=t),{field:function(t){var r=n.common[e];return t==null?e:(delete n.common[e],e=t,n.common[t]=r,this)},query:function(t){return t==null?n.common[e].query:(n.common[e].query=t,this)},analyzer:function(t){return t==null?n.common[e].analyzer:(n.common[e].analyzer=t,this)},disableCoords:function(t){return t==null?n.common[e].disable_coords:(n.common[e].disable_coords=t,this)},cutoffFrequency:function(t){return t==null?n.common[e].cutoff_frequency:(n.common[e].cutoff_frequency=t,this)},highFreqOperator:function(t){if(t==null)return n.common[e].high_freq_operator;t=t.toLowerCase();if(t==="and"||t==="or")n.common[e].high_freq_operator=t;return this},lowFreqOperator
|
||||
:function(t){if(t==null)return n.common[e].low_freq_operator;t=t.toLowerCase();if(t==="and"||t==="or")n.common[e].low_freq_operator=t;return this},minimumShouldMatch:function(t){return t==null?n.common[e].minimum_should_match:(n.common[e].minimum_should_match=t,this)},boost:function(t){return t==null?n.common[e].boost:(n.common[e].boost=t,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"query"},_self:function(){return n}}},O.ConstantScoreQuery=function(){var e={constant_score:{}};return{query:function(t){if(t==null)return e.constant_score.query;if(!b(t))throw new TypeError("Argument must be a Query");return e.constant_score.query=t._self(),this},filter:function(t){if(t==null)return e.constant_score.filter;if(!w(t))throw new TypeError("Argument must be a Filter");return e.constant_score.filter=t._self(),this},cache:function(t){return t==null?e.constant_score._cache:(e.constant_score._cache=t,this)},cacheKey:function(t){return t==null?e.constant_score._cache_key
|
||||
:(e.constant_score._cache_key=t,this)},boost:function(t){return t==null?e.constant_score.boost:(e.constant_score.boost=t,this)},toString:function(){return JSON.stringify(e)},_type:function(){return"query"},_self:function(){return e}}},O.CustomBoostFactorQuery=function(e){if(!b(e))throw new TypeError("Argument must be a Query");var t={custom_boost_factor:{query:e._self()}};return{query:function(e){if(e==null)return t.custom_boost_factor.query;if(!b(e))throw new TypeError("Argument must be a Query");return t.custom_boost_factor.query=e._self(),this},boostFactor:function(e){return e==null?t.custom_boost_factor.boost_factor:(t.custom_boost_factor.boost_factor=e,this)},boost:function(e){return e==null?t.custom_boost_factor.boost:(t.custom_boost_factor.boost=e,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"query"},_self:function(){return t}}},O.CustomFiltersScoreQuery=function(e,t){if(!b(e))throw new TypeError("Argument must be a Query");var n={custom_filters_score
|
||||
:{query:e._self(),filters:[]}},r=function(e){var t=null;return e.filter&&w(e.filter)&&(t={filter:e.filter._self()},e.boost?t.boost=e.boost:e.script?t.script=e.script:t=null),t};return c(p(t)?t:[t],function(e){var t=r(e);t!==null&&n.custom_filters_score.filters.push(t)}),{query:function(e){if(e==null)return n.custom_filters_score.query;if(!b(e))throw new TypeError("Argument must be a Query");return n.custom_filters_score.query=e._self(),this},filters:function(e){return e==null?n.custom_filters_score.filters:(p(e)&&(n.custom_filters_score.filters=[]),c(p(e)?e:[e],function(e){var t=r(e);t!==null&&n.custom_filters_score.filters.push(t)}),this)},scoreMode:function(e){if(e==null)return n.custom_filters_score.score_mode;e=e.toLowerCase();if(e==="first"||e==="min"||e==="max"||e==="total"||e==="avg"||e==="multiply")n.custom_filters_score.score_mode=e;return this},params:function(e){return e==null?n.custom_filters_score.params:(n.custom_filters_score.params=e,this)},lang:function(e){return e==null?
|
||||
n.custom_filters_score.lang:(n.custom_filters_score.lang=e,this)},maxBoost:function(e){return e==null?n.custom_filters_score.max_boost:(n.custom_filters_score.max_boost=e,this)},boost:function(e){return e==null?n.custom_filters_score.boost:(n.custom_filters_score.boost=e,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"query"},_self:function(){return n}}},O.CustomScoreQuery=function(e,t){if(!b(e))throw new TypeError("Argument must be a Query");var n={custom_score:{query:e._self(),script:t}};return{query:function(e){if(e==null)return n.custom_score.query;if(!b(e))throw new TypeError("Argument must be a Query");return n.custom_score.query=e._self(),this},script:function(e){return e==null?n.custom_score.script:(n.custom_score.script=e,this)},params:function(e){return e==null?n.custom_score.params:(n.custom_score.params=e,this)},lang:function(e){return e==null?n.custom_score.lang:(n.custom_score.lang=e,this)},boost:function(e){return e==null?n.custom_score.boost:
|
||||
(n.custom_score.boost=e,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"query"},_self:function(){return n}}},O.DisMaxQuery=function(){var e={dis_max:{}};return{queries:function(t){var n,r;if(t==null)return e.dis_max.queries;e.dis_max.queries==null&&(e.dis_max.queries=[]);if(b(t))e.dis_max.queries.push(t._self());else{if(!p(t))throw new TypeError("Argument must be a Query or array of Queries");e.dis_max.queries=[];for(n=0,r=t.length;n<r;n++){if(!b(t[n]))throw new TypeError("Argument must be array of Queries");e.dis_max.queries.push(t[n]._self())}}return this},boost:function(t){return t==null?e.dis_max.boost:(e.dis_max.boost=t,this)},tieBreaker:function(t){return t==null?e.dis_max.tie_breaker:(e.dis_max.tie_breaker=t,this)},toString:function(){return JSON.stringify(e)},_type:function(){return"query"},_self:function(){return e}}},O.FieldMaskingSpanQuery=function(e,t){if(!b(e))throw new TypeError("Argument must be a SpanQuery");var n={field_masking_span:{query:e
|
||||
._self(),field:t}};return{query:function(e){if(e==null)return n.field_masking_span.query;if(!b(e))throw new TypeError("Argument must be a SpanQuery");return n.field_masking_span.query=e._self(),this},field:function(e){return e==null?n.field_masking_span.field:(n.field_masking_span.field=e,this)},boost:function(e){return e==null?n.field_masking_span.boost:(n.field_masking_span.boost=e,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"query"},_self:function(){return n}}},O.FieldQuery=function(e,t){var n={field:{}};return n.field[e]={query:t},{field:function(t){var r=n.field[e];return t==null?e:(delete n.field[e],e=t,n.field[t]=r,this)},query:function(t){return t==null?n.field[e].query:(n.field[e].query=t,this)},defaultOperator:function(t){if(t==null)return n.field[e].default_operator;t=t.toUpperCase();if(t==="AND"||t==="OR")n.field[e].default_operator=t;return this},analyzer:function(t){return t==null?n.field[e].analyzer:(n.field[e].analyzer=t,this)},quoteAnalyzer
|
||||
:function(t){return t==null?n.field[e].quote_analyzer:(n.field[e].quote_analyzer=t,this)},autoGeneratePhraseQueries:function(t){return t==null?n.field[e].auto_generate_phrase_queries:(n.field[e].auto_generate_phrase_queries=t,this)},allowLeadingWildcard:function(t){return t==null?n.field[e].allow_leading_wildcard:(n.field[e].allow_leading_wildcard=t,this)},lowercaseExpandedTerms:function(t){return t==null?n.field[e].lowercase_expanded_terms:(n.field[e].lowercase_expanded_terms=t,this)},enablePositionIncrements:function(t){return t==null?n.field[e].enable_position_increments:(n.field[e].enable_position_increments=t,this)},fuzzyMinSim:function(t){return t==null?n.field[e].fuzzy_min_sim:(n.field[e].fuzzy_min_sim=t,this)},boost:function(t){return t==null?n.field[e].boost:(n.field[e].boost=t,this)},fuzzyPrefixLength:function(t){return t==null?n.field[e].fuzzy_prefix_length:(n.field[e].fuzzy_prefix_length=t,this)},fuzzyMaxExpansions:function(t){return t==null?n.field[e].fuzzy_max_expansions:(
|
||||
n.field[e].fuzzy_max_expansions=t,this)},fuzzyRewrite:function(t){if(t==null)return n.field[e].fuzzy_rewrite;t=t.toLowerCase();if(t==="constant_score_auto"||t==="scoring_boolean"||t==="constant_score_boolean"||t==="constant_score_filter"||t.indexOf("top_terms_boost_")===0||t.indexOf("top_terms_")===0)n.field[e].fuzzy_rewrite=t;return this},rewrite:function(t){if(t==null)return n.field[e].rewrite;t=t.toLowerCase();if(t==="constant_score_auto"||t==="scoring_boolean"||t==="constant_score_boolean"||t==="constant_score_filter"||t.indexOf("top_terms_boost_")===0||t.indexOf("top_terms_")===0)n.field[e].rewrite=t;return this},quoteFieldSuffix:function(t){return t==null?n.field[e].quote_field_suffix:(n.field[e].quote_field_suffix=t,this)},phraseSlop:function(t){return t==null?n.field[e].phrase_slop:(n.field[e].phrase_slop=t,this)},analyzeWildcard:function(t){return t==null?n.field[e].analyze_wildcard:(n.field[e].analyze_wildcard=t,this)},escape:function(t){return t==null?n.field[e].escape:(n.field
|
||||
[e].escape=t,this)},minimumShouldMatch:function(t){return t==null?n.field[e].minimum_should_match:(n.field[e].minimum_should_match=t,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"query"},_self:function(){return n}}},O.FilteredQuery=function(e,t){if(!b(e))throw new TypeError("Argument must be a Query");if(t!=null&&!w(t))throw new TypeError("Argument must be a Filter");var n={filtered:{query:e._self()}};return t!=null&&(n.filtered.filter=t._self()),{query:function(e){if(e==null)return n.filtered.query;if(!b(e))throw new TypeError("Argument must be a Query");return n.filtered.query=e._self(),this},filter:function(e){if(e==null)return n.filtered.filter;if(!w(e))throw new TypeError("Argument must be a Filter");return n.filtered.filter=e._self(),this},strategy:function(e){if(e==null)return n.filtered.strategy;e=e.toLowerCase();if(e==="query_first"||e==="random_access_always"||e==="leap_frog"||e==="leap_frog_filter_first"||e.indexOf("random_access_")===0)n.filtered
|
||||
.strategy=e;return this},cache:function(e){return e==null?n.filtered._cache:(n.filtered._cache=e,this)},cacheKey:function(e){return e==null?n.filtered._cache_key:(n.filtered._cache_key=e,this)},boost:function(e){return e==null?n.filtered.boost:(n.filtered.boost=e,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"query"},_self:function(){return n}}},O.FuzzyLikeThisFieldQuery=function(e,t){var n={flt_field:{}};return n.flt_field[e]={like_text:t},{field:function(t){var r=n.flt_field[e];return t==null?e:(delete n.flt_field[e],e=t,n.flt_field[t]=r,this)},likeText:function(t){return t==null?n.flt_field[e].like_text:(n.flt_field[e].like_text=t,this)},ignoreTf:function(t){return t==null?n.flt_field[e].ignore_tf:(n.flt_field[e].ignore_tf=t,this)},maxQueryTerms:function(t){return t==null?n.flt_field[e].max_query_terms:(n.flt_field[e].max_query_terms=t,this)},minSimilarity:function(t){return t==null?n.flt_field[e].min_similarity:(n.flt_field[e].min_similarity=t,this)},prefixLength
|
||||
:function(t){return t==null?n.flt_field[e].prefix_length:(n.flt_field[e].prefix_length=t,this)},analyzer:function(t){return t==null?n.flt_field[e].analyzer:(n.flt_field[e].analyzer=t,this)},boost:function(t){return t==null?n.flt_field[e].boost:(n.flt_field[e].boost=t,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"query"},_self:function(){return n}}},O.FuzzyLikeThisQuery=function(e){var t={flt:{like_text:e}};return{fields:function(e){t.flt.fields==null&&(t.flt.fields=[]);if(e==null)return t.flt.fields;if(v(e))t.flt.fields.push(e);else{if(!p(e))throw new TypeError("Argument must be a string or array");t.flt.fields=e}return this},likeText:function(e){return e==null?t.flt.like_text:(t.flt.like_text=e,this)},ignoreTf:function(e){return e==null?t.flt.ignore_tf:(t.flt.ignore_tf=e,this)},maxQueryTerms:function(e){return e==null?t.flt.max_query_terms:(t.flt.max_query_terms=e,this)},minSimilarity:function(e){return e==null?t.flt.min_similarity:(t.flt.min_similarity=e
|
||||
,this)},prefixLength:function(e){return e==null?t.flt.prefix_length:(t.flt.prefix_length=e,this)},analyzer:function(e){return e==null?t.flt.analyzer:(t.flt.analyzer=e,this)},boost:function(e){return e==null?t.flt.boost:(t.flt.boost=e,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"query"},_self:function(){return t}}},O.FuzzyQuery=function(e,t){var n={fuzzy:{}};return n.fuzzy[e]={value:t},{field:function(t){var r=n.fuzzy[e];return t==null?e:(delete n.fuzzy[e],e=t,n.fuzzy[t]=r,this)},value:function(t){return t==null?n.fuzzy[e].value:(n.fuzzy[e].value=t,this)},transpositions:function(t){return t==null?n.fuzzy[e].transpositions:(n.fuzzy[e].transpositions=t,this)},maxExpansions:function(t){return t==null?n.fuzzy[e].max_expansions:(n.fuzzy[e].max_expansions=t,this)},minSimilarity:function(t){return t==null?n.fuzzy[e].min_similarity:(n.fuzzy[e].min_similarity=t,this)},prefixLength:function(t){return t==null?n.fuzzy[e].prefix_length:(n.fuzzy[e].prefix_length=t,this)
|
||||
},rewrite:function(t){if(t==null)return n.fuzzy[e].rewrite;t=t.toLowerCase();if(t==="constant_score_auto"||t==="scoring_boolean"||t==="constant_score_boolean"||t==="constant_score_filter"||t.indexOf("top_terms_boost_")===0||t.indexOf("top_terms_")===0)n.fuzzy[e].rewrite=t;return this},boost:function(t){return t==null?n.fuzzy[e].boost:(n.fuzzy[e].boost=t,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"query"},_self:function(){return n}}},O.GeoShapeQuery=function(e){var t={geo_shape:{}};return t.geo_shape[e]={},{field:function(n){var r=t.geo_shape[e];return n==null?e:(delete t.geo_shape[e],e=n,t.geo_shape[n]=r,this)},shape:function(n){return n==null?t.geo_shape[e].shape:(t.geo_shape[e].indexed_shape!=null&&delete t.geo_shape[e].indexed_shape,t.geo_shape[e].shape=n._self(),this)},indexedShape:function(n){return n==null?t.geo_shape[e].indexed_shape:(t.geo_shape[e].shape!=null&&delete t.geo_shape[e].shape,t.geo_shape[e].indexed_shape=n._self(),this)},relation:function(
|
||||
n){if(n==null)return t.geo_shape[e].relation;n=n.toLowerCase();if(n==="intersects"||n==="disjoint"||n==="within")t.geo_shape[e].relation=n;return this},strategy:function(n){if(n==null)return t.geo_shape[e].strategy;n=n.toLowerCase();if(n==="recursive"||n==="term")t.geo_shape[e].strategy=n;return this},boost:function(n){return n==null?t.geo_shape[e].boost:(t.geo_shape[e].boost=n,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"query"},_self:function(){return t}}},O.HasChildQuery=function(e,t){if(!b(e))throw new TypeError("Argument must be a valid Query");var n={has_child:{query:e._self(),type:t}};return{query:function(e){if(e==null)return n.has_child.query;if(!b(e))throw new TypeError("Argument must be a valid Query");return n.has_child.query=e._self(),this},type:function(e){return e==null?n.has_child.type:(n.has_child.type=e,this)},scope:function(e){return this},scoreType:function(e){if(e==null)return n.has_child.score_type;e=e.toLowerCase();if(e==="none"||e==="max"||
|
||||
e==="sum"||e==="avg")n.has_child.score_type=e;return this},boost:function(e){return e==null?n.has_child.boost:(n.has_child.boost=e,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"query"},_self:function(){return n}}},O.HasParentQuery=function(e,t){if(!b(e))throw new TypeError("Argument must be a Query");var n={has_parent:{query:e._self(),parent_type:t}};return{query:function(e){if(e==null)return n.has_parent.query;if(!b(e))throw new TypeError("Argument must be a Query");return n.has_parent.query=e._self(),this},parentType:function(e){return e==null?n.has_parent.parent_type:(n.has_parent.parent_type=e,this)},scope:function(e){return this},scoreType:function(e){if(e==null)return n.has_parent.score_type;e=e.toLowerCase();if(e==="none"||e==="score")n.has_parent.score_type=e;return this},boost:function(e){return e==null?n.has_parent.boost:(n.has_parent.boost=e,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"query"},_self:function(){return n
|
||||
}}},O.IdsQuery=function(e){var t={ids:{}};if(v(e))t.ids.values=[e];else{if(!p(e))throw new TypeError("Argument must be string or array");t.ids.values=e}return{values:function(e){if(e==null)return t.ids.values;if(v(e))t.ids.values.push(e);else{if(!p(e))throw new TypeError("Argument must be string or array");t.ids.values=e}return this},type:function(e){t.ids.type==null&&(t.ids.type=[]);if(e==null)return t.ids.type;if(v(e))t.ids.type.push(e);else{if(!p(e))throw new TypeError("Argument must be string or array");t.ids.type=e}return this},boost:function(e){return e==null?t.ids.boost:(t.ids.boost=e,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"query"},_self:function(){return t}}},O.IndicesQuery=function(e,t){if(!b(e))throw new TypeError("Argument must be a Query");var n={indices:{query:e._self()}};if(v(t))n.indices.indices=[t];else{if(!p(t))throw new TypeError("Argument must be a string or array");n.indices.indices=t}return{indices:function(e){if(e==null)return n
|
||||
.indices.indices;if(v(e))n.indices.indices.push(e);else{if(!p(e))throw new TypeError("Argument must be a string or array");n.indices.indices=e}return this},query:function(e){if(e==null)return n.indices.query;if(!b(e))throw new TypeError("Argument must be a Query");return n.indices.query=e._self(),this},noMatchQuery:function(e){if(e==null)return n.indices.no_match_query;if(v(e)){e=e.toLowerCase();if(e==="none"||e==="all")n.indices.no_match_query=e}else{if(!b(e))throw new TypeError("Argument must be string or Query");n.indices.no_match_query=e._self()}return this},boost:function(e){return e==null?n.indices.boost:(n.indices.boost=e,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"query"},_self:function(){return n}}},O.MatchAllQuery=function(){var e={match_all:{}};return{boost:function(t){return t==null?e.match_all.boost:(e.match_all.boost=t,this)},toString:function(){return JSON.stringify(e)},_type:function(){return"query"},_self:function(){return e}}},O.MatchQuery=
|
||||
function(e,t){var n={match:{}};return n.match[e]={query:t},{boost:function(t){return t==null?n.match[e].boost:(n.match[e].boost=t,this)},query:function(t){return t==null?n.match[e].query:(n.match[e].query=t,this)},type:function(t){if(t==null)return n.match[e].type;t=t.toLowerCase();if(t==="boolean"||t==="phrase"||t==="phrase_prefix")n.match[e].type=t;return this},fuzziness:function(t){return t==null?n.match[e].fuzziness:(n.match[e].fuzziness=t,this)},cutoffFrequency:function(t){return t==null?n.match[e].cutoff_frequency:(n.match[e].cutoff_frequency=t,this)},prefixLength:function(t){return t==null?n.match[e].prefix_length:(n.match[e].prefix_length=t,this)},maxExpansions:function(t){return t==null?n.match[e].max_expansions:(n.match[e].max_expansions=t,this)},operator:function(t){if(t==null)return n.match[e].operator;t=t.toLowerCase();if(t==="and"||t==="or")n.match[e].operator=t;return this},slop:function(t){return t==null?n.match[e].slop:(n.match[e].slop=t,this)},analyzer:function(t){return t==
|
||||
null?n.match[e].analyzer:(n.match[e].analyzer=t,this)},minimumShouldMatch:function(t){return t==null?n.match[e].minimum_should_match:(n.match[e].minimum_should_match=t,this)},rewrite:function(t){if(t==null)return n.match[e].rewrite;t=t.toLowerCase();if(t==="constant_score_auto"||t==="scoring_boolean"||t==="constant_score_boolean"||t==="constant_score_filter"||t.indexOf("top_terms_boost_")===0||t.indexOf("top_terms_")===0)n.match[e].rewrite=t;return this},fuzzyRewrite:function(t){if(t==null)return n.match[e].fuzzy_rewrite;t=t.toLowerCase();if(t==="constant_score_auto"||t==="scoring_boolean"||t==="constant_score_boolean"||t==="constant_score_filter"||t.indexOf("top_terms_boost_")===0||t.indexOf("top_terms_")===0)n.match[e].fuzzy_rewrite=t;return this},fuzzyTranspositions:function(t){return t==null?n.match[e].fuzzy_transpositions:(n.match[e].fuzzy_transpositions=t,this)},lenient:function(t){return t==null?n.match[e].lenient:(n.match[e].lenient=t,this)},zeroTermsQuery:function(t){if(t==null
|
||||
)return n.match[e].zero_terms_query;t=t.toLowerCase();if(t==="all"||t==="none")n.match[e].zero_terms_query=t;return this},toString:function(){return JSON.stringify(n)},_type:function(){return"query"},_self:function(){return n}}},O.MoreLikeThisFieldQuery=function(e,t){var n={mlt_field:{}};return n.mlt_field[e]={like_text:t},{field:function(t){var r=n.mlt_field[e];return t==null?e:(delete n.mlt_field[e],e=t,n.mlt_field[t]=r,this)},likeText:function(t){return t==null?n.mlt_field[e].like_text:(n.mlt_field[e].like_text=t,this)},percentTermsToMatch:function(t){return t==null?n.mlt_field[e].percent_terms_to_match:(n.mlt_field[e].percent_terms_to_match=t,this)},minTermFreq:function(t){return t==null?n.mlt_field[e].min_term_freq:(n.mlt_field[e].min_term_freq=t,this)},maxQueryTerms:function(t){return t==null?n.mlt_field[e].max_query_terms:(n.mlt_field[e].max_query_terms=t,this)},stopWords:function(t){return t==null?n.mlt_field[e].stop_words:(n.mlt_field[e].stop_words=t,this)},minDocFreq:function(
|
||||
t){return t==null?n.mlt_field[e].min_doc_freq:(n.mlt_field[e].min_doc_freq=t,this)},maxDocFreq:function(t){return t==null?n.mlt_field[e].max_doc_freq:(n.mlt_field[e].max_doc_freq=t,this)},minWordLen:function(t){return t==null?n.mlt_field[e].min_word_len:(n.mlt_field[e].min_word_len=t,this)},maxWordLen:function(t){return t==null?n.mlt_field[e].max_word_len:(n.mlt_field[e].max_word_len=t,this)},analyzer:function(t){return t==null?n.mlt_field[e].analyzer:(n.mlt_field[e].analyzer=t,this)},boostTerms:function(t){return t==null?n.mlt_field[e].boost_terms:(n.mlt_field[e].boost_terms=t,this)},boost:function(t){return t==null?n.mlt_field[e].boost:(n.mlt_field[e].boost=t,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"query"},_self:function(){return n}}},O.MoreLikeThisQuery=function(e,t){var n={mlt:{like_text:t,fields:[]}};if(v(e))n.mlt.fields.push(e);else{if(!p(e))throw new TypeError("Argument must be string or array");n.mlt.fields=e}return{fields:function(e){if(e==null
|
||||
)return n.mlt.fields;if(v(e))n.mlt.fields.push(e);else{if(!p(e))throw new TypeError("Argument must be a string or array");n.mlt.fields=e}return this},likeText:function(e){return e==null?n.mlt.like_text:(n.mlt.like_text=e,this)},percentTermsToMatch:function(e){return e==null?n.mlt.percent_terms_to_match:(n.mlt.percent_terms_to_match=e,this)},minTermFreq:function(e){return e==null?n.mlt.min_term_freq:(n.mlt.min_term_freq=e,this)},maxQueryTerms:function(e){return e==null?n.mlt.max_query_terms:(n.mlt.max_query_terms=e,this)},stopWords:function(e){return e==null?n.mlt.stop_words:(n.mlt.stop_words=e,this)},minDocFreq:function(e){return e==null?n.mlt.min_doc_freq:(n.mlt.min_doc_freq=e,this)},maxDocFreq:function(e){return e==null?n.mlt.max_doc_freq:(n.mlt.max_doc_freq=e,this)},minWordLen:function(e){return e==null?n.mlt.min_word_len:(n.mlt.min_word_len=e,this)},maxWordLen:function(e){return e==null?n.mlt.max_word_len:(n.mlt.max_word_len=e,this)},analyzer:function(e){return e==null?n.mlt.analyzer
|
||||
:(n.mlt.analyzer=e,this)},boostTerms:function(e){return e==null?n.mlt.boost_terms:(n.mlt.boost_terms=e,this)},boost:function(e){return e==null?n.mlt.boost:(n.mlt.boost=e,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"query"},_self:function(){return n}}},O.MultiMatchQuery=function(e,t){var n={multi_match:{query:t,fields:[]}};if(v(e))n.multi_match.fields.push(e);else{if(!p(e))throw new TypeError("Argument must be string or array");n.multi_match.fields=e}return{fields:function(e){if(e==null)return n.multi_match.fields;if(v(e))n.multi_match.fields.push(e);else{if(!p(e))throw new TypeError("Argument must be string or array");n.multi_match.fields=e}return this},useDisMax:function(e){return e==null?n.multi_match.use_dis_max:(n.multi_match.use_dis_max=e,this)},tieBreaker:function(e){return e==null?n.multi_match.tie_breaker:(n.multi_match.tie_breaker=e,this)},cutoffFrequency:function(e){return e==null?n.multi_match.cutoff_frequency:(n.multi_match.cutoff_frequency=e,
|
||||
this)},minimumShouldMatch:function(e){return e==null?n.multi_match.minimum_should_match:(n.multi_match.minimum_should_match=e,this)},rewrite:function(e){if(e==null)return n.multi_match.rewrite;e=e.toLowerCase();if(e==="constant_score_auto"||e==="scoring_boolean"||e==="constant_score_boolean"||e==="constant_score_filter"||e.indexOf("top_terms_boost_")===0||e.indexOf("top_terms_")===0)n.multi_match.rewrite=e;return this},fuzzyRewrite:function(e){if(e==null)return n.multi_match.fuzzy_rewrite;e=e.toLowerCase();if(e==="constant_score_auto"||e==="scoring_boolean"||e==="constant_score_boolean"||e==="constant_score_filter"||e.indexOf("top_terms_boost_")===0||e.indexOf("top_terms_")===0)n.multi_match.fuzzy_rewrite=e;return this},lenient:function(e){return e==null?n.multi_match.lenient:(n.multi_match.lenient=e,this)},boost:function(e){return e==null?n.multi_match.boost:(n.multi_match.boost=e,this)},query:function(e){return e==null?n.multi_match.query:(n.multi_match.query=e,this)},type:function(e)
|
||||
{if(e==null)return n.multi_match.type;e=e.toLowerCase();if(e==="boolean"||e==="phrase"||e==="phrase_prefix")n.multi_match.type=e;return this},fuzziness:function(e){return e==null?n.multi_match.fuzziness:(n.multi_match.fuzziness=e,this)},prefixLength:function(e){return e==null?n.multi_match.prefix_length:(n.multi_match.prefix_length=e,this)},maxExpansions:function(e){return e==null?n.multi_match.max_expansions:(n.multi_match.max_expansions=e,this)},operator:function(e){if(e==null)return n.multi_match.operator;e=e.toLowerCase();if(e==="and"||e==="or")n.multi_match.operator=e;return this},slop:function(e){return e==null?n.multi_match.slop:(n.multi_match.slop=e,this)},analyzer:function(e){return e==null?n.multi_match.analyzer:(n.multi_match.analyzer=e,this)},zeroTermsQuery:function(e){if(e==null)return n.multi_match.zero_terms_query;e=e.toLowerCase();if(e==="all"||e==="none")n.multi_match.zero_terms_query=e;return this},toString:function(){return JSON.stringify(n)},_type:function(){return"query"
|
||||
},_self:function(){return n}}},O.NestedQuery=function(e){var t={nested:{path:e}};return{path:function(e){return e==null?t.nested.path:(t.nested.path=e,this)},query:function(e){if(e==null)return t.nested.query;if(!b(e))throw new TypeError("Argument must be a Query");return t.nested.query=e._self(),this},filter:function(e){if(e==null)return t.nested.filter;if(!w(e))throw new TypeError("Argument must be a Filter");return t.nested.filter=e._self(),this},scoreMode:function(e){if(e==null)return t.nested.score_mode;e=e.toLowerCase();if(e==="avg"||e==="total"||e==="max"||e==="none")t.nested.score_mode=e;return this},scope:function(e){return this},boost:function(e){return e==null?t.nested.boost:(t.nested.boost=e,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"query"},_self:function(){return t}}},O.PrefixQuery=function(e,t){var n={prefix:{}};return n.prefix[e]={value:t},{field:function(t){var r=n.prefix[e];return t==null?e:(delete n.prefix[e],e=t,n.prefix[t]=r,this)},
|
||||
value:function(t){return t==null?n.prefix[e].value:(n.prefix[e].value=t,this)},rewrite:function(t){if(t==null)return n.prefix[e].rewrite;t=t.toLowerCase();if(t==="constant_score_auto"||t==="scoring_boolean"||t==="constant_score_boolean"||t==="constant_score_filter"||t.indexOf("top_terms_boost_")===0||t.indexOf("top_terms_")===0)n.prefix[e].rewrite=t;return this},boost:function(t){return t==null?n.prefix[e].boost:(n.prefix[e].boost=t,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"query"},_self:function(){return n}}},O.QueryStringQuery=function(e){var t={query_string:{}};return t.query_string.query=e,{query:function(e){return e==null?t.query_string.query:(t.query_string.query=e,this)},defaultField:function(e){return e==null?t.query_string.default_field:(t.query_string.default_field=e,this)},fields:function(e){t.query_string.fields==null&&(t.query_string.fields=[]);if(e==null)return t.query_string.fields;if(v(e))t.query_string.fields.push(e);else{if(!p(e))throw new
|
||||
TypeError("Argument must be a string or array");t.query_string.fields=e}return this},useDisMax:function(e){return e==null?t.query_string.use_dis_max:(t.query_string.use_dis_max=e,this)},defaultOperator:function(e){if(e==null)return t.query_string.default_operator;e=e.toUpperCase();if(e==="AND"||e==="OR")t.query_string.default_operator=e;return this},analyzer:function(e){return e==null?t.query_string.analyzer:(t.query_string.analyzer=e,this)},quoteAnalyzer:function(e){return e==null?t.query_string.quote_analyzer:(t.query_string.quote_analyzer=e,this)},allowLeadingWildcard:function(e){return e==null?t.query_string.allow_leading_wildcard:(t.query_string.allow_leading_wildcard=e,this)},lowercaseExpandedTerms:function(e){return e==null?t.query_string.lowercase_expanded_terms:(t.query_string.lowercase_expanded_terms=e,this)},enablePositionIncrements:function(e){return e==null?t.query_string.enable_position_increments:(t.query_string.enable_position_increments=e,this)},fuzzyPrefixLength:function(
|
||||
e){return e==null?t.query_string.fuzzy_prefix_length:(t.query_string.fuzzy_prefix_length=e,this)},fuzzyMinSim:function(e){return e==null?t.query_string.fuzzy_min_sim:(t.query_string.fuzzy_min_sim=e,this)},phraseSlop:function(e){return e==null?t.query_string.phrase_slop:(t.query_string.phrase_slop=e,this)},boost:function(e){return e==null?t.query_string.boost:(t.query_string.boost=e,this)},analyzeWildcard:function(e){return e==null?t.query_string.analyze_wildcard:(t.query_string.analyze_wildcard=e,this)},autoGeneratePhraseQueries:function(e){return e==null?t.query_string.auto_generate_phrase_queries:(t.query_string.auto_generate_phrase_queries=e,this)},minimumShouldMatch:function(e){return e==null?t.query_string.minimum_should_match:(t.query_string.minimum_should_match=e,this)},tieBreaker:function(e){return e==null?t.query_string.tie_breaker:(t.query_string.tie_breaker=e,this)},escape:function(e){return e==null?t.query_string.escape:(t.query_string.escape=e,this)},fuzzyMaxExpansions:function(
|
||||
e){return e==null?t.query_string.fuzzy_max_expansions:(t.query_string.fuzzy_max_expansions=e,this)},fuzzyRewrite:function(e){if(e==null)return t.query_string.fuzzy_rewrite;e=e.toLowerCase();if(e==="constant_score_auto"||e==="scoring_boolean"||e==="constant_score_boolean"||e==="constant_score_filter"||e.indexOf("top_terms_boost_")===0||e.indexOf("top_terms_")===0)t.query_string.fuzzy_rewrite=e;return this},rewrite:function(e){if(e==null)return t.query_string.rewrite;e=e.toLowerCase();if(e==="constant_score_auto"||e==="scoring_boolean"||e==="constant_score_boolean"||e==="constant_score_filter"||e.indexOf("top_terms_boost_")===0||e.indexOf("top_terms_")===0)t.query_string.rewrite=e;return this},quoteFieldSuffix:function(e){return e==null?t.query_string.quote_field_suffix:(t.query_string.quote_field_suffix=e,this)},lenient:function(e){return e==null?t.query_string.lenient:(t.query_string.lenient=e,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"query"},_self:function(
|
||||
){return t}}},O.RangeQuery=function(e){var t={range:{}};return t.range[e]={},{field:function(n){var r=t.range[e];return n==null?e:(delete t.range[e],e=n,t.range[n]=r,this)},from:function(n){return n==null?t.range[e].from:(t.range[e].from=n,this)},to:function(n){return n==null?t.range[e].to:(t.range[e].to=n,this)},includeLower:function(n){return n==null?t.range[e].include_lower:(t.range[e].include_lower=n,this)},includeUpper:function(n){return n==null?t.range[e].include_upper:(t.range[e].include_upper=n,this)},gt:function(n){return n==null?t.range[e].gt:(t.range[e].gt=n,this)},gte:function(n){return n==null?t.range[e].gte:(t.range[e].gte=n,this)},lt:function(n){return n==null?t.range[e].lt:(t.range[e].lt=n,this)},lte:function(n){return n==null?t.range[e].lte:(t.range[e].lte=n,this)},boost:function(n){return n==null?t.range[e].boost:(t.range[e].boost=n,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"query"},_self:function(){return t}}},O.RegexpQuery=function(e
|
||||
,t){var n={regexp:{}};return n.regexp[e]={value:t},{field:function(t){var r=n.regexp[e];return t==null?e:(delete n.regexp[e],e=t,n.regexp[t]=r,this)},value:function(t){return t==null?n.regexp[e].value:(n.regexp[e].value=t,this)},flags:function(t){return t==null?n.regexp[e].flags:(n.regexp[e].flags=t,this)},flagsValue:function(t){return t==null?n.regexp[e].flags_value:(n.regexp[e].flags_value=t,this)},rewrite:function(t){if(t==null)return n.regexp[e].rewrite;t=t.toLowerCase();if(t==="constant_score_auto"||t==="scoring_boolean"||t==="constant_score_boolean"||t==="constant_score_filter"||t.indexOf("top_terms_boost_")===0||t.indexOf("top_terms_")===0)n.regexp[e].rewrite=t;return this},boost:function(t){return t==null?n.regexp[e].boost:(n.regexp[e].boost=t,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"query"},_self:function(){return n}}},O.SpanFirstQuery=function(e,t){if(!b(e))throw new TypeError("Argument must be a SpanQuery");var n={span_first:{match:e._self(
|
||||
),end:t}};return{match:function(e){if(e==null)return n.span_first.match;if(!b(e))throw new TypeError("Argument must be a SpanQuery");return n.span_first.match=e._self(),this},end:function(e){return e==null?n.span_first.end:(n.span_first.end=e,this)},boost:function(e){return e==null?n.span_first.boost:(n.span_first.boost=e,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"query"},_self:function(){return n}}},O.SpanNearQuery=function(e,t){var n,r,i={span_near:{clauses:[],slop:t}};if(b(e))i.span_near.clauses.push(e._self());else{if(!p(e))throw new TypeError("Argument must be SpanQuery or array of SpanQueries");for(n=0,r=e.length;n<r;n++){if(!b(e[n]))throw new TypeError("Argument must be array of SpanQueries");i.span_near.clauses.push(e[n]._self())}}return{clauses:function(e){var t,n;if(e==null)return i.span_near.clauses;if(b(e))i.span_near.clauses.push(e._self());else{if(!p(e))throw new TypeError("Argument must be SpanQuery or array of SpanQueries");i.span_near.clauses=
|
||||
[];for(t=0,n=e.length;t<n;t++){if(!b(e[t]))throw new TypeError("Argument must be array of SpanQueries");i.span_near.clauses.push(e[t]._self())}}return this},slop:function(e){return e==null?i.span_near.slop:(i.span_near.slop=e,this)},inOrder:function(e){return e==null?i.span_near.in_order:(i.span_near.in_order=e,this)},collectPayloads:function(e){return e==null?i.span_near.collect_payloads:(i.span_near.collect_payloads=e,this)},boost:function(e){return e==null?i.span_near.boost:(i.span_near.boost=e,this)},toString:function(){return JSON.stringify(i)},_type:function(){return"query"},_self:function(){return i}}},O.SpanNotQuery=function(e,t){if(!b(e)||!b(t))throw new TypeError("Argument must be a SpanQuery");var n={span_not:{include:e._self(),exclude:t._self()}};return{include:function(e){if(e==null)return n.span_not.include;if(!b(e))throw new TypeError("Argument must be a SpanQuery");return n.span_not.include=e._self(),this},exclude:function(e){if(e==null)return n.span_not.exclude;if(!b(e)
|
||||
)throw new TypeError("Argument must be a SpanQuery");return n.span_not.exclude=e._self(),this},boost:function(e){return e==null?n.span_not.boost:(n.span_not.boost=e,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"query"},_self:function(){return n}}},O.SpanOrQuery=function(e){var t,n,r={span_or:{clauses:[]}};if(b(e))r.span_or.clauses.push(e._self());else{if(!p(e))throw new TypeError("Argument must be SpanQuery or array of SpanQueries");for(t=0,n=e.length;t<n;t++){if(!b(e[t]))throw new TypeError("Argument must be array of SpanQueries");r.span_or.clauses.push(e[t]._self())}}return{clauses:function(e){var t,n;if(e==null)return r.span_or.clauses;if(b(e))r.span_or.clauses.push(e._self());else{if(!p(e))throw new TypeError("Argument must be SpanQuery or array of SpanQueries");r.span_or.clauses=[];for(t=0,n=e.length;t<n;t++){if(!b(e[t]))throw new TypeError("Argument must be array of SpanQueries");r.span_or.clauses.push(e[t]._self())}}return this},boost:function(e){return e==
|
||||
null?r.span_or.boost:(r.span_or.boost=e,this)},toString:function(){return JSON.stringify(r)},_type:function(){return"query"},_self:function(){return r}}},O.SpanTermQuery=function(e,t){var n={span_term:{}};return n.span_term[e]={term:t},{field:function(t){var r=n.span_term[e];return t==null?e:(delete n.span_term[e],e=t,n.span_term[t]=r,this)},term:function(t){return t==null?n.span_term[e].term:(n.span_term[e].term=t,this)},boost:function(t){return t==null?n.span_term[e].boost:(n.span_term[e].boost=t,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"query"},_self:function(){return n}}},O.TermQuery=function(e,t){var n={term:{}};return n.term[e]={term:t},{field:function(t){var r=n.term[e];return t==null?e:(delete n.term[e],e=t,n.term[t]=r,this)},term:function(t){return t==null?n.term[e].term:(n.term[e].term=t,this)},boost:function(t){return t==null?n.term[e].boost:(n.term[e].boost=t,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"query"
|
||||
},_self:function(){return n}}},O.TermsQuery=function(e,t){var n={terms:{}};if(v(t))n.terms[e]=[t];else{if(!p(t))throw new TypeError("Argument must be string or array");n.terms[e]=t}return{field:function(t){var r=n.terms[e];return t==null?e:(delete n.terms[e],e=t,n.terms[t]=r,this)},terms:function(t){if(t==null)return n.terms[e];if(v(t))n.terms[e].push(t);else{if(!p(t))throw new TypeError("Argument must be string or array");n.terms[e]=t}return this},minimumShouldMatch:function(e){return e==null?n.terms.minimum_should_match:(n.terms.minimum_should_match=e,this)},disableCoord:function(e){return e==null?n.terms.disable_coord:(n.terms.disable_coord=e,this)},boost:function(e){return e==null?n.terms.boost:(n.terms.boost=e,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"query"},_self:function(){return n}}},O.TopChildrenQuery=function(e,t){if(!b(e))throw new TypeError("Argument must be a Query");var n={top_children:{query:e._self(),type:t}};return{query:function(e){if(
|
||||
e==null)return n.top_children.query;if(!b(e))throw new TypeError("Argument must be a Query");return n.top_children.query=e._self(),this},type:function(e){return e==null?n.top_children.type:(n.top_children.type=e,this)},scope:function(e){return this},score:function(e){if(e==null)return n.top_children.score;e=e.toLowerCase();if(e==="max"||e==="sum"||e==="avg")n.top_children.score=e;return this},factor:function(e){return e==null?n.top_children.factor:(n.top_children.factor=e,this)},incrementalFactor:function(e){return e==null?n.top_children.incremental_factor:(n.top_children.incremental_factor=e,this)},boost:function(e){return e==null?n.top_children.boost:(n.top_children.boost=e,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"query"},_self:function(){return n}}},O.WildcardQuery=function(e,t){var n={wildcard:{}};return n.wildcard[e]={value:t},{field:function(t){var r=n.wildcard[e];return t==null?e:(delete n.wildcard[e],e=t,n.wildcard[t]=r,this)},value:function(t
|
||||
){return t==null?n.wildcard[e].value:(n.wildcard[e].value=t,this)},rewrite:function(t){if(t==null)return n.wildcard[e].rewrite;t=t.toLowerCase();if(t==="constant_score_auto"||t==="scoring_boolean"||t==="constant_score_boolean"||t==="constant_score_filter"||t.indexOf("top_terms_boost_")===0||t.indexOf("top_terms_")===0)n.wildcard[e].rewrite=t;return this},boost:function(t){return t==null?n.wildcard[e].boost:(n.wildcard[e].boost=t,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"query"},_self:function(){return n}}},O.GeoPoint=function(e){var t=[0,0];return e!=null&&p(e)&&e.length===2&&(t=[e[1],e[0]]),{properties:function(e){return e==null?t:(d(e)&&l(e,"lat")&&l(e,"lon")&&(t={lat:e.lat,lon:e.lon}),this)},string:function(e){return e==null?t:(v(e)&&e.indexOf(",")!==-1&&(t=e),this)},geohash:function(e,n){return n=n!=null&&m(n)?n:12,e==null?t:(v(e)&&e.length===n&&(t=e),this)},array:function(e){return e==null?t:(p(e)&&e.length===2&&(t=[e[1],e[0]]),this)},toString:function(
|
||||
){return JSON.stringify(t)},_type:function(){return"geo point"},_self:function(){return t}}},O.Highlight=function(e){var t={fields:{}},n=function(e,n,r){e==null?t[n]=r:(l(t.fields,e)||(t.fields[e]={}),t.fields[e][n]=r)};return e!=null&&(v(e)?t.fields[e]={}:p(e)&&c(e,function(e){t.fields[e]={}})),{fields:function(e){if(e==null)return t.fields;v(e)?l(t.fields,e)||(t.fields[e]={}):p(e)&&c(e,function(e){l(t.fields,e)||(t.fields[e]={})})},preTags:function(e,r){return e===null&&r!=null?t.fields[r].pre_tags:e==null?t.pre_tags:(v(e)?n(r,"pre_tags",[e]):p(e)&&n(r,"pre_tags",e),this)},postTags:function(e,r){return e===null&&r!=null?t.fields[r].post_tags:e==null?t.post_tags:(v(e)?n(r,"post_tags",[e]):p(e)&&n(r,"post_tags",e),this)},order:function(e,r){return e===null&&r!=null?t.fields[r].order:e==null?t.order:(e=e.toLowerCase(),e==="score"&&n(r,"order",e),this)},tagsSchema:function(e){return e==null?t.tags_schema:(e=e.toLowerCase(),e==="styled"&&(t.tags_schema=e),this)},highlightFilter:function(e,
|
||||
r){return e===null&&r!=null?t.fields[r].highlight_filter:e==null?t.highlight_filter:(n(r,"highlight_filter",e),this)},fragmentSize:function(e,r){return e===null&&r!=null?t.fields[r].fragment_size:e==null?t.fragment_size:(n(r,"fragment_size",e),this)},numberOfFragments:function(e,r){return e===null&&r!=null?t.fields[r].number_of_fragments:e==null?t.number_of_fragments:(n(r,"number_of_fragments",e),this)},encoder:function(e){if(e==null)return t.encoder;e=e.toLowerCase();if(e==="default"||e==="html")t.encoder=e;return this},requireFieldMatch:function(e,r){return e===null&&r!=null?t.fields[r].require_field_match:e==null?t.require_field_match:(n(r,"require_field_match",e),this)},boundaryMaxScan:function(e,r){return e===null&&r!=null?t.fields[r].boundary_max_scan:e==null?t.boundary_max_scan:(n(r,"boundary_max_scan",e),this)},boundaryChars:function(e,r){return e===null&&r!=null?t.fields[r].boundary_chars:e==null?t.boundary_chars:(n(r,"boundary_chars",e),this)},type:function(e,r){return e===null&&
|
||||
r!=null?t.fields[r].type:e==null?t.type:(e=e.toLowerCase(),(e==="fast-vector-highlighter"||e==="highlighter")&&n(r,"type",e),this)},fragmenter:function(e,r){return e===null&&r!=null?t.fields[r].fragmenter:e==null?t.fragmenter:(e=e.toLowerCase(),(e==="simple"||e==="span")&&n(r,"fragmenter",e),this)},toString:function(){return JSON.stringify(t)},_type:function(){return"highlight"},_self:function(){return t}}},O.IndexedShape=function(e,t){var n={type:e,id:t};return{type:function(e){return e==null?n.type:(n.type=e,this)},id:function(e){return e==null?n.id:(n.id=e,this)},index:function(e){return e==null?n.index:(n.index=e,this)},shapeFieldName:function(e){return e==null?n.shape_field_name:(n.shape_field_name=e,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"indexed shape"},_self:function(){return n}}},O.Request=function(e){var t,n,r,i={},s=function(e){var t="",s=[];n.length>0&&(t=t+"/"+n.join()),r.length>0&&(t=t+"/"+r.join()),e.length>0&&e[0]!=="/"&&(t+="/"),t+=e
|
||||
;for(var o in i){if(!l(i,o)||i[o]==="")continue;s.push(o+"="+encodeURIComponent(i[o]))}return s.length>0&&(t=t+"?"+s.join("&")),t};return t={},e=e||{},e.indices==null?n=[]:v(e.indices)?n=[e.indices]:n=e.indices,e.types==null?r=[]:v(e.types)?r=[e.types]:r=e.types,n.length===0&&r.length>0&&(n=["_all"]),e.routing!=null&&(i.routing=e.routing),{sort:function(){var e,n;l(t,"sort")||(t.sort=[]);if(arguments.length===0)return t.sort;if(arguments.length===1){var r=arguments[0];if(v(r))t.sort.push(r);else if(C(r))t.sort.push(r._self());else{if(!p(r))throw new TypeError("Argument must be string, Sort, or array");t.sort=[];for(e=0,n=r.length;e<n;e++)if(v(r[e]))t.sort.push(r[e]);else{if(!C(r[e]))throw new TypeError("Invalid object in array");t.sort.push(r[e]._self())}}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];if(v(i)&&v(s)){s=s.toLowerCase();if(s==="asc"||s==="desc"){var o={};o[i]={order:s},t.sort.push(o)}}}return this},trackScores:function(e){return e==null?t.track_scores:(t.
|
||||
track_scores=e,this)},size:function(e){return e==null?t.size:(t.size=e,this)},timeout:function(e){return e==null?i.timeout:(i.timeout=e,this)},routing:function(e){return e==null?i.routing:(i.routing=e,this)},replication:function(e){if(e==null)return i.replication;e=e.toLowerCase();if(e==="async"||e==="sync"||e==="default")i.replication=e;return this},consistency:function(e){if(e==null)return i.consistency;e=e.toLowerCase();if(e==="default"||e==="one"||e==="quorum"||e==="all")i.consistency=e;return this},searchType:function(e){if(e==null)return i.search_type;e=e.toLowerCase();if(e==="dfs_query_then_fetch"||e==="dfs_query_and_fetch"||e==="query_then_fetch"||e==="query_and_fetch"||e==="scan"||e==="count")i.search_type=e;return this},fields:function(e){if(e==null)return t.fields;t.fields==null&&(t.fields=[]);if(v(e))t.fields.push(e);else{if(!p(e))throw new TypeError("Argument must be string or array");t.fields=e}return this},from:function(e){return e==null?t.from:(t.from=e,this)},query:function(
|
||||
e){if(e==null)return t.query;if(!b(e))throw new TypeError("Argument must be a Query");return t.query=e._self(),this},indices:function(e){if(e==null)return n;if(v(e))n=[e];else{if(!p(e))throw new TypeError("Argument must be a string or array");n=e}return n.length===0&&r.length>0&&(n=["_all"]),this},types:function(e){if(e==null)return r;if(v(e))r=[e];else{if(!p(e))throw new TypeError("Argument must be a string or array");r=e}return n.length===0&&r.length>0&&(n=["_all"]),this},facet:function(e){if(e==null)return t.facets;t.facets==null&&(t.facets={});if(!E(e))throw new TypeError("Argument must be a Facet");return h(t.facets,e._self()),this},filter:function(e){if(e==null)return t.filter;if(!w(e))throw new TypeError("Argument must be a Filter");return t.filter=e._self(),this},highlight:function(e){if(e==null)return t.highlight;if(!k(e))throw new TypeError("Argument must be a Highlight object");return t.highlight=e._self(),this},suggest:function(e){if(e==null)return t.suggest;t.suggest==null&&
|
||||
(t.suggest={});if(v(e))t.suggest.text=e;else{if(!L(e))throw new TypeError("Argument must be a string or Suggest object");h(t.suggest,e._self())}return this},scriptField:function(e){if(e==null)return t.script_fields;t.script_fields==null&&(t.script_fields={});if(!S(e))throw new TypeError("Argument must be a ScriptField");return h(t.script_fields,e._self()),this},preference:function(e){return e==null?i.preference:(i.preference=e,this)},ignoreIndices:function(e){if(e==null)return i.ignore_indices;e=e.toLowerCase();if(e==="none"||e==="missing")i.ignore_indices=e;return this},indexBoost:function(e,n){return t.indices_boost==null&&(t.indices_boost={}),arguments.length===0?t.indices_boost:(t.indices_boost[e]=n,this)},explain:function(e){return e==null?t.explain:(t.explain=e,this)},version:function(e){return e==null?t.version:(t.version=e,this)},minScore:function(e){return e==null?t.min_score:(t.min_score=e,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"request"},_self
|
||||
:function(){return t},doDeleteByQuery:function(e,n){var r=JSON.stringify(t.query);if(O.client==null)throw new Error("No Client Set");return O.client.del(s("_query"),r,e,n)},doCount:function(e,n){var r=JSON.stringify(t.query);if(O.client==null)throw new Error("No Client Set");return O.client.post(s("_count"),r,e,n)},doSearch:function(e,n){var r=JSON.stringify(t);if(O.client==null)throw new Error("No Client Set");return O.client.post(s("_search"),r,e,n)}}},O.ScriptField=function(e){var t={};return t[e]={},{lang:function(n){return n==null?t[e].lang:(t[e].lang=n,this)},script:function(n){return n==null?t[e].script:(t[e].script=n,this)},params:function(n){return n==null?t[e].params:(t[e].params=n,this)},ignoreFailure:function(n){return n==null?t[e].ignore_failure:(t[e].ignore_failure=n,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"script field"},_self:function(){return t}}},O.Shape=function(e,t){var n={},r=function(e){var t=!1;if(e==="point"||e==="linestring"||
|
||||
e==="polygon"||e==="multipoint"||e==="envelope"||e==="multipolygon")t=!0;return t};return e=e.toLowerCase(),r(e)&&(n.type=e,n.coordinates=t),{type:function(e){return e==null?n.type:(e=e.toLowerCase(),r(e)&&(n.type=e),this)},coordinates:function(e){return e==null?n.coordinates:(n.coordinates=e,this)},toString:function(){return JSON.stringify(n)},_type:function(){return"shape"},_self:function(){return n}}},O.Sort=function(e){e==null&&(e="_score");var t={},n=e,r="_geo_distance",i="_script";return t[n]={},{field:function(r){var i=t[n];return r==null?e:(delete t[n],e=r,n=r,t[n]=i,this)},geoDistance:function(i){var s=t[n];if(i==null)return t[n][e];if(!x(i))throw new TypeError("Argument must be a GeoPoint");return delete t[n],n=r,t[n]=s,t[n][e]=i._self(),this},script:function(e){var r=t[n];return e==null?t[n].script:(delete t[n],n=i,t[n]=r,t[n].script=e,this)},order:function(e){if(e==null)return t[n].order;e=e.toLowerCase();if(e==="asc"||e==="desc")t[n].order=e;return this},asc:function(){return t
|
||||
[n].order="asc",this},desc:function(){return t[n].order="desc",this},reverse:function(e){return e==null?t[n].reverse:(t[n].reverse=e,this)},missing:function(e){return e==null?t[n].missing:(t[n].missing=e,this)},ignoreUnmapped:function(e){return e==null?t[n].ignore_unmapped:(t[n].ignore_unmapped=e,this)},unit:function(e){if(e==null)return t[n].unit;e=e.toLowerCase();if(e==="mi"||e==="km")t[n].unit=e;return this},normalize:function(e){return e==null?t[n].normalize:(t[n].normalize=e,this)},distanceType:function(e){if(e==null)return t[n].distance_type;e=e.toLowerCase();if(e==="arc"||e==="plane")t[n].distance_type=e;return this},params:function(e){return e==null?t[n].params:(t[n].params=e,this)},lang:function(e){return e==null?t[n].lang:(t[n].lang=e,this)},type:function(e){if(e==null)return t[n].type;e=e.toLowerCase();if(e==="string"||e==="number")t[n].type=e;return this},mode:function(e){if(e==null)return t[n].mode;e=e.toLowerCase();if(e==="min"||e==="max"||e==="sum"||e==="avg")t[n].mode=e;
|
||||
return this},nestedPath:function(e){return e==null?t[n].nested_path:(t[n].nested_path=e,this)},nestedFilter:function(e){if(e==null)return t[n].nested_filter;if(!w(e))throw new TypeError("Argument must be a Filter");return t[n].nested_filter=e._self(),this},toString:function(){return JSON.stringify(t)},_type:function(){return"sort"},_self:function(){return t}}},O.DirectGenerator=function(){var e=O.DirectSettingsMixin(),t=e._self();return h(e,{preFilter:function(e){return e==null?t.pre_filter:(t.pre_filter=e,this)},postFilter:function(e){return e==null?t.post_filter:(t.post_filter=e,this)},field:function(e){return e==null?t.field:(t.field=e,this)},size:function(e){return e==null?t.size:(t.size=e,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"generator"},_self:function(){return t}})},O.DirectSettingsMixin=function(){var e={};return{accuracy:function(t){return t==null?e.accuracy:(e.accuracy=t,this)},suggestMode:function(t){if(t==null)return e.suggest_mode;t=t.toLowerCase
|
||||
();if(t==="missing"||t==="popular"||t==="always")e.suggest_mode=t;return this},sort:function(t){if(t==null)return e.sort;t=t.toLowerCase();if(t==="score"||t==="frequency")e.sort=t;return this},stringDistance:function(t){if(t==null)return e.string_distance;t=t.toLowerCase();if(t==="internal"||t==="damerau_levenshtein"||t==="levenstein"||t==="jarowinkler"||t==="ngram")e.string_distance=t;return this},maxEdits:function(t){return t==null?e.max_edits:(e.max_edits=t,this)},maxInspections:function(t){return t==null?e.max_inspections:(e.max_inspections=t,this)},maxTermFreq:function(t){return t==null?e.max_term_freq:(e.max_term_freq=t,this)},prefixLength:function(t){return t==null?e.prefix_length:(e.prefix_length=t,this)},minWordLen:function(t){return t==null?e.min_word_len:(e.min_word_len=t,this)},minDocFreq:function(t){return t==null?e.min_doc_freq:(e.min_doc_freq=t,this)},_self:function(){return e}}},O.PhraseSuggester=function(e){var t={};return t[e]={phrase:{}},{text:function(n){return n==null?
|
||||
t[e].text:(t[e].text=n,this)},analyzer:function(n){return n==null?t[e].phrase.analyzer:(t[e].phrase.analyzer=n,this)},field:function(n){return n==null?t[e].phrase.field:(t[e].phrase.field=n,this)},size:function(n){return n==null?t[e].phrase.size:(t[e].phrase.size=n,this)},shardSize:function(n){return n==null?t[e].phrase.shard_size:(t[e].phrase.shard_size=n,this)},realWorldErrorLikelihood:function(n){return n==null?t[e].phrase.real_world_error_likelihood:(t[e].phrase.real_world_error_likelihood=n,this)},confidence:function(n){return n==null?t[e].phrase.confidence:(t[e].phrase.confidence=n,this)},separator:function(n){return n==null?t[e].phrase.separator:(t[e].phrase.separator=n,this)},maxErrors:function(n){return n==null?t[e].phrase.max_errors:(t[e].phrase.max_errors=n,this)},gramSize:function(n){return n==null?t[e].phrase.gram_size:(t[e].phrase.gram_size=n,this)},forceUnigrams:function(n){return n==null?t[e].phrase.force_unigrams:(t[e].phrase.force_unigrams=n,this)},linearSmoothing:function(
|
||||
n,r,i){return arguments.length===0?t[e].phrase.smoothing:(t[e].phrase.smoothing={linear:{trigram_lambda:n,bigram_lambda:r,unigram_lambda:i}},this)},laplaceSmoothing:function(n){return n==null?t[e].phrase.smoothing:(t[e].phrase.smoothing={laplace:{alpha:n}},this)},stupidBackoffSmoothing:function(n){return n==null?t[e].phrase.smoothing:(t[e].phrase.smoothing={stupid_backoff:{discount:n}},this)},directGenerator:function(n){var r,i;t[e].phrase.direct_generator==null&&(t[e].phrase.direct_generator=[]);if(n==null)return t[e].phrase.direct_generator;if(A(n))t[e].phrase.direct_generator.push(n._self());else{if(!p(n))throw new TypeError("Argument must be a Generator or array of Generators");t[e].phrase.direct_generator=[];for(r=0,i=n.length;r<i;r++){if(!A(n[r]))throw new TypeError("Argument must be an array of Generators");t[e].phrase.direct_generator.push(n[r]._self())}}return this},toString:function(){return JSON.stringify(t)},_type:function(){return"suggest"},_self:function(){return t}}},O.TermSuggester=
|
||||
function(e){var t={},n=O.DirectSettingsMixin();return t[e]={term:n._self()},h(n,{text:function(n){return n==null?t[e].text:(t[e].text=n,this)},analyzer:function(n){return n==null?t[e].term.analyzer:(t[e].term.analyzer=n,this)},field:function(n){return n==null?t[e].term.field:(t[e].term.field=n,this)},size:function(n){return n==null?t[e].term.size:(t[e].term.size=n,this)},shardSize:function(n){return n==null?t[e].term.shard_size:(t[e].term.shard_size=n,this)},toString:function(){return JSON.stringify(t)},_type:function(){return"suggest"},_self:function(){return t}})},O.noConflict=function(){return e.ejs=t,this}}.call(this),define("../vendor/elasticjs/elastic",function(){}),angular.module("elasticjs.service",[]).factory("ejsResource",["$http",function(e){return function(t){var n=window.ejs||{},r=function(e,t,n){return e.then(function(e){return(t||angular.noop)(e.data),e.data},function(e){return(n||angular.noop)(e.data),e.data})};return t==null&&(t=""),n.client={server:function(e){return e==
|
||||
null?t:(t=e,this)},post:function(n,i,s,o){return n=t+n,r(e.post(n,i),s,o)},get:function(n,i,s,o){return n=t+n,r(e.get(n,i),s,o)},put:function(n,i,s,o){return n=t+n,r(e.put(n,i),s,o)},del:function(n,i,s,o){return n=t+n,r(e.delete(n,i),s,o)},head:function(n,r,i,s){return n=t+n,e.head(n,r).then(function(e){return(i||angular.noop)(e.headers()),e.headers()},function(e){return(s||angular.noop)(undefined),undefined})}},n}}]),define("elasticjs",function(){}),!function(e){e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"
|
||||
),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr
|
||||
(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1
|
||||
),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var n=this.getActiveIndex(),r=this;if(t>this.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){r.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",e(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval
|
||||
,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0],direction:o});if(i.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")}));if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var n=e.fn
|
||||
.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn.carousel.noConflict=function(){return e.fn.carousel=n,this},e(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=e.extend({},i.data(),n.data()),o;i.carousel(s),(o=n.attr("data-slide-to"))&&i.data("carousel").pause().to(o).cycle(),t.preventDefault()})}(window.jQuery),!function(e){var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:
|
||||
t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning||this.$element.hasClass("in"))return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning||!this.$element.hasClass("in"))return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset
|
||||
(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=e.extend({},e.fn.collapse.defaults,r.data(),typeof n=="object"&&n);i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse
|
||||
(s)})}(window.jQuery),!function(e){function r(){e(".dropdown-backdrop").remove(),e(t).each(function(){i(e(this)).removeClass("open")})}function i(t){var n=t.attr("data-target"),r;n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=n&&e(n);if(!r||!r.length)r=t.parent();return r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||("ontouchstart"in document.documentElement&&e('<div class="dropdown-backdrop"/>').insertBefore(e(this)).on("click",r),s.toggleClass("open")),n.focus(),!1},keydown:function(n){var r,s,o,u,a,f;if(!/(38|40|27)/.test(n.keyCode))return;r=e(this),n.preventDefault(),n.stopPropagation();if(r.is(".disabled, :disabled"))return;u=i(r),a=u.hasClass("open");if(!a||a&&n.keyCode==27)return n
|
||||
.which==27&&u.find(t).focus(),r.click();s=e("[role=menu] li:not(.divider):visible a",u);if(!s.length)return;f=s.index(s.filter(":focus")),n.keyCode==38&&f>0&&f--,n.keyCode==40&&f<s.length-1&&f++,~f||(f=0),s.eq(f).focus()}};var s=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var r=e(this),i=r.data("dropdown");i||r.data("dropdown",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.dropdown.Constructor=n,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=s,this},e(document).on("click.dropdown.data-api",r).on("click.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.dropdown.data-api",t,n.prototype.toggle).on("keydown.dropdown.data-api",t+", [role=menu]",n.prototype.keydown)}(window.jQuery),!function(e){var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};t.prototype={
|
||||
constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n);if(this.isShown||n.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.backdrop(function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.focus().trigger("shown")}):t.$element.focus().trigger("shown")})},hide:function(t){t&&t.preventDefault();var n=this;t=e.Event("hide"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var t=this;e
|
||||
(document).on("focusin.modal",function(e){t.$element[0]!==e.target&&!t.$element.has(e.target).length&&t.$element.focus()})},escape:function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(t){t.which==27&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),t.hideModal()},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),t.hideModal()})},hideModal:function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.$backdrop.click(this.
|
||||
options.backdrop=="static"?e.proxy(this.$element[0].focus,this.$element[0]):e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,t):t()):t&&t()}};var n=e.fn.modal;e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({
|
||||
remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})}(window.jQuery),!function(e){var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s,o,u,a;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,o=this.options.trigger.split(" ");for(a=o.length;a--;)u=o[a],u=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):u!="manual"&&(i=u=="hover"?"mouseenter":"focus",s=u=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this)));this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay})
|
||||
,t},enter:function(t){var n=e.fn[this.type].defaults,r={},i;this._options&&e.each(this._options,function(e,t){n[e]!=t&&(r[e]=t)},this),i=e(t.currentTarget)[this.type](r).data(this.type);if(!i.options.delay||!i.options.delay.show)return i.show();clearTimeout(this.timeout),i.hoverState="in",this.timeout=setTimeout(function(){i.hoverState=="in"&&i.show()},i.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var t,n,r,i,s,o,u=e.Event("show");if(this.hasContent()&&this.enabled){this.$element.trigger(u);if(u.isDefaultPrevented())return;t=this.tip(),this.setContent(),this.options.animation&&t.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,t[0],this.$element[0]):this.options
|
||||
.placement,t.detach().css({top:0,left:0,display:"block"}),this.options.container?t.appendTo(this.options.container):t.insertAfter(this.$element),n=this.getPosition(),r=t[0].offsetWidth,i=t[0].offsetHeight;switch(s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}this.applyPlacement(o,s),this.$element.trigger("shown")}},applyPlacement:function(e,t){var n=this.tip(),r=n[0].offsetWidth,i=n[0].offsetHeight,s,o,u,a;n.offset(e).addClass(t).addClass("in"),s=n[0].offsetWidth,o=n[0].offsetHeight,t=="top"&&o!=i&&(e.top=e.top+i-o,a=!0),t=="bottom"||t=="top"?(u=0,e.left<0&&(u=e.left*-2,e.left=0,n.offset(e),s=n[0].offsetWidth,o=n[0].offsetHeight),this.replaceArrow(u-r+s,s,"left")):this.replaceArrow(o-i,o,"top"),a&&n.offset(e)},replaceArrow:function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},setContent
|
||||
:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function i(){var t=setTimeout(function(){n.off(e.support.transition.end).detach()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.detach()})}var t=this,n=this.tip(),r=e.Event("hide");this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?i():n.detach(),this.$element.trigger("hidden"),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},getTitle:function(
|
||||
){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(t){var n=t?e(t.currentTarget)[this.type](this._options).data(this.type):this;n.tip().hasClass("in")?n.hide():n.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement
|
||||
:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}(window.jQuery),!function(e){var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=(typeof n.content=="function"?n.content.call(t[0]):n.content)||t.attr("data-content"),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this
|
||||
.type).removeData(this.type)}});var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}(window.jQuery),!function(e){function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=
|
||||
e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var n=e(this),r=n.data("target")||n.attr("href"),i=/^#\w/.test(r)&&e(r);return i&&i.length&&[[i.position().top+(!e.isWindow(t.$scrollElement.get(0))&&t.$scrollElement.scrollTop()),r]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown"
|
||||
).addClass("active")),n.trigger("activate")}};var n=e.fn.scrollspy;e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e.fn.scrollspy.noConflict=function(){return e.fn.scrollspy=n,this},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active:last a")[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown"
|
||||
,relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})}(window.jQuery),!function(e){var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||
|
||||
this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=e(this.options.menu),this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:t.top+t.height,left:t.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(n=e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source,n?this.process(n):this)},process:function(t){var n=this;return t=e.grep(t,function(e){return n
|
||||
.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){var t=[],n=[],r=[],i;while(i=e.shift())i.toLowerCase().indexOf(this.query.toLowerCase())?~i.indexOf(this.query)?n.push(i):r.push(i):t.push(i);return t.concat(n,r)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),function(e,t){return"<strong>"+t+"</strong>"})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||
|
||||
(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t=typeof this.$element[e]=="function"),t},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move
|
||||
(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},focus:function(e){this.focused=!0},blur:function(e){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(e){e.stopPropagation(),e.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(t){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")},mouseleave:function(e){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var n=e.fn.typeahead;e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>'
|
||||
,minLength:1},e.fn.typeahead.Constructor=t,e.fn.typeahead.noConflict=function(){return e.fn.typeahead=n,this},e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;n.typeahead(n.data())})}(window.jQuery),!function(e){var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom"
|
||||
:o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery),define("bootstrap",["jquery"],function(){}),function(e,t,n){function x(e){var t={},n=e.split(","),r;for(r=0;r<n.length;r++)t[n[r]]=!0;return t}function T(e,n){function E(e,r,i,s){r=t.lowercase(r);if(g[r])while(d.last()&&y[d.last()])S("",d.last());m[r]&&d.last()==r&&S("",r),s=p[r]||!!s,s||d.push(
|
||||
r);var u={};i.replace(o,function(e,t,n,r,i){var s=n||r||i||"";u[t]=C(s)}),n.start&&n.start(r,u,s)}function S(e,r){var i=0,s;r=t.lowercase(r);if(r)for(i=d.length-1;i>=0;i--)if(d[i]==r)break;if(i>=0){for(s=d.length-1;s>=i;s--)n.end&&n.end(d[s]);d.length=i}}var r,c,h,d=[],v=e;d.last=function(){return d[d.length-1]};while(e){c=!0;if(!d.last()||!b[d.last()]){e.indexOf("<!--")===0?(r=e.indexOf("-->"),r>=0&&(n.comment&&n.comment(e.substring(4,r)),e=e.substring(r+3),c=!1)):a.test(e)?(h=e.match(s),h&&(e=e.substring(h[0].length),h[0].replace(s,S),c=!1)):u.test(e)&&(h=e.match(i),h&&(e=e.substring(h[0].length),h[0].replace(i,E),c=!1));if(c){r=e.indexOf("<");var w=r<0?e:e.substring(0,r);e=r<0?"":e.substring(r),n.chars&&n.chars(C(w))}}else e=e.replace(new RegExp("(.*)<\\s*\\/\\s*"+d.last()+"[^>]*>","i"),function(e,t){return t=t.replace(f,"$1").replace(l,"$1"),n.chars&&n.chars(C(t)),""}),S("",d.last());if(e==v)throw"Parse Error: "+e;v=e}S()}function C(e){return N.innerHTML=e.replace(/</g,"<"),N.innerText||
|
||||
N.textContent||""}function k(e){return e.replace(/&/g,"&").replace(h,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}function L(e){var n=!1,r=t.bind(e,e.push);return{start:function(e,i,s){e=t.lowercase(e),!n&&b[e]&&(n=e),!n&&w[e]==1&&(r("<"),r(e),t.forEach(i,function(e,n){var i=t.lowercase(n);S[i]==1&&(E[i]!==!0||e.match(c))&&(r(" "),r(n),r('="'),r(k(e)),r('"'))}),r(s?"/>":">"))},end:function(e){e=t.lowercase(e),!n&&w[e]==1&&(r("</"),r(e),r(">")),e==n&&(n=!1)},chars:function(e){n||r(k(e))}}}var r=function(e){var t=[];return T(e,L(t)),t.join("")},i=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,s=/^<\s*\/\s*([\w:-]+)[^>]*>/,o=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,u=/^</,a=/^<\s*\//,f=/<!--(.*?)-->/g,l=/<!\[CDATA\[(.*?)]]>/g,c=/^((ftp|https?):\/\/|mailto:|#)/i,h=/([^\#-~| |!])/g,p=x("area,br,col,hr,img,wbr"),d=x("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),v=x("rp,rt"
|
||||
),m=t.extend({},v,d),g=t.extend({},d,x("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),y=t.extend({},v,x("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),b=x("script,style"),w=t.extend({},p,g,y,m),E=x("background,cite,href,longdesc,src,usemap"),S=t.extend({},E,x("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,span,start,summary,target,title,type,valign,value,vspace,width")),N=document.createElement("pre");t.module("ngSanitize",[]).value("$sanitize",r),t.module("ngSanitize").directive("ngBindHtml",["$sanitize",function(e){return function(t,n,r){n.addClass("ng-binding").data("$binding"
|
||||
,r.ngBindHtml),t.$watch(r.ngBindHtml,function(r){r=e(r),n.html(r||"")})}}]),t.module("ngSanitize").filter("linky",function(){var e=/((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s\.\;\,\(\)\{\}\<\>]/,t=/^mailto:/;return function(n){if(!n)return n;var r,i=n,s=[],o=L(s),u,a;while(r=i.match(e))u=r[0],r[2]==r[3]&&(u="mailto:"+u),a=r.index,o.chars(i.substr(0,a)),o.start("a",{href:u}),o.chars(r[0].replace(t,"")),o.end("a"),i=i.substring(a+r[0].length);return o.chars(i),s.join("")}})}(window,window.angular),define("angular-sanitize",function(){}),function(e,t,n,r){var i=function(t,n){this.widget="",this.$element=e(t),this.defaultTime=n.defaultTime,this.disableFocus=n.disableFocus,this.isOpen=n.isOpen,this.minuteStep=n.minuteStep,this.modalBackdrop=n.modalBackdrop,this.secondStep=n.secondStep,this.showInputs=n.showInputs,this.showMeridian=n.showMeridian,this.showSeconds=n.showSeconds,this.template=n.template,this.appendWidgetTo=n.appendWidgetTo,this._init()};i.prototype={constructor:i,_init
|
||||
:function(){var t=this;this.$element.parent().hasClass("input-append")||this.$element.parent().hasClass("input-prepend")?(this.$element.parent(".input-append, .input-prepend").find(".add-on").on({"click.timepicker":e.proxy(this.showWidget,this)}),this.$element.on({"focus.timepicker":e.proxy(this.highlightUnit,this),"click.timepicker":e.proxy(this.highlightUnit,this),"keydown.timepicker":e.proxy(this.elementKeydown,this),"blur.timepicker":e.proxy(this.blurElement,this)})):this.template?this.$element.on({"focus.timepicker":e.proxy(this.showWidget,this),"click.timepicker":e.proxy(this.showWidget,this),"blur.timepicker":e.proxy(this.blurElement,this)}):this.$element.on({"focus.timepicker":e.proxy(this.highlightUnit,this),"click.timepicker":e.proxy(this.highlightUnit,this),"keydown.timepicker":e.proxy(this.elementKeydown,this),"blur.timepicker":e.proxy(this.blurElement,this)}),this.template!==!1?this.$widget=e(this.getTemplate()).prependTo(this.$element.parents(this.appendWidgetTo)).on("click"
|
||||
,e.proxy(this.widgetClick,this)):this.$widget=!1,this.showInputs&&this.$widget!==!1&&this.$widget.find("input").each(function(){e(this).on({"click.timepicker":function(){e(this).select()},"keydown.timepicker":e.proxy(t.widgetKeydown,t)})}),this.setDefaultTime(this.defaultTime)},blurElement:function(){this.highlightedUnit=r,this.updateFromElementVal()},decrementHour:function(){if(this.showMeridian)if(this.hour===1)this.hour=12;else{if(this.hour===12)return this.hour--,this.toggleMeridian();if(this.hour===0)return this.hour=11,this.toggleMeridian();this.hour--}else this.hour===0?this.hour=23:this.hour--;this.update()},decrementMinute:function(e){var t;e?t=this.minute-e:t=this.minute-this.minuteStep,t<0?(this.decrementHour(),this.minute=t+60):this.minute=t,this.update()},decrementSecond:function(){var e=this.second-this.secondStep;e<0?(this.decrementMinute(!0),this.second=e+60):this.second=e,this.update()},elementKeydown:function(e){switch(e.keyCode){case 9:this.updateFromElementVal();switch(
|
||||
this.highlightedUnit){case"hour":e.preventDefault(),this.highlightNextUnit();break;case"minute":if(this.showMeridian||this.showSeconds)e.preventDefault(),this.highlightNextUnit();break;case"second":this.showMeridian&&(e.preventDefault(),this.highlightNextUnit())}break;case 27:this.updateFromElementVal();break;case 37:e.preventDefault(),this.highlightPrevUnit(),this.updateFromElementVal();break;case 38:e.preventDefault();switch(this.highlightedUnit){case"hour":this.incrementHour(),this.highlightHour();break;case"minute":this.incrementMinute(),this.highlightMinute();break;case"second":this.incrementSecond(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}break;case 39:e.preventDefault(),this.updateFromElementVal(),this.highlightNextUnit();break;case 40:e.preventDefault();switch(this.highlightedUnit){case"hour":this.decrementHour(),this.highlightHour();break;case"minute":this.decrementMinute(),this.highlightMinute();break;case"second":this.decrementSecond
|
||||
(),this.highlightSecond();break;case"meridian":this.toggleMeridian(),this.highlightMeridian()}}},formatTime:function(e,t,n,r){return e=e<10?"0"+e:e,t=t<10?"0"+t:t,n=n<10?"0"+n:n,e+":"+t+(this.showSeconds?":"+n:"")+(this.showMeridian?" "+r:"")},getCursorPosition:function(){var e=this.$element.get(0);if("selectionStart"in e)return e.selectionStart;if(n.selection){e.focus();var t=n.selection.createRange(),r=n.selection.createRange().text.length;return t.moveStart("character",-e.value.length),t.text.length-r}},getTemplate:function(){var e,t,n,r,i,s;this.showInputs?(t='<input type="text" name="hour" class="bootstrap-timepicker-hour" maxlength="2"/>',n='<input type="text" name="minute" class="bootstrap-timepicker-minute" maxlength="2"/>',r='<input type="text" name="second" class="bootstrap-timepicker-second" maxlength="2"/>',i='<input type="text" name="meridian" class="bootstrap-timepicker-meridian" maxlength="2"/>'):(t='<span class="bootstrap-timepicker-hour"></span>',n='<span class="bootstrap-timepicker-minute"></span>'
|
||||
,r='<span class="bootstrap-timepicker-second"></span>',i='<span class="bootstrap-timepicker-meridian"></span>'),s='<table><tr><td><a href="#" data-action="incrementHour"><i class="icon-chevron-up"></i></a></td><td class="separator"> </td><td><a href="#" data-action="incrementMinute"><i class="icon-chevron-up"></i></a></td>'+(this.showSeconds?'<td class="separator"> </td><td><a href="#" data-action="incrementSecond"><i class="icon-chevron-up"></i></a></td>':"")+(this.showMeridian?'<td class="separator"> </td><td class="meridian-column"><a href="#" data-action="toggleMeridian"><i class="icon-chevron-up"></i></a></td>':"")+"</tr>"+"<tr>"+"<td>"+t+"</td> "+'<td class="separator">:</td>'+"<td>"+n+"</td> "+(this.showSeconds?'<td class="separator">:</td><td>'+r+"</td>":"")+(this.showMeridian?'<td class="separator"> </td><td>'+i+"</td>":"")+"</tr>"+"<tr>"+'<td><a href="#" data-action="decrementHour"><i class="icon-chevron-down"></i></a></td>'+'<td class="separator"></td>'+'<td><a href="#" data-action="decrementMinute"><i class="icon-chevron-down"></i></a></td>'+
|
||||
(this.showSeconds?'<td class="separator"> </td><td><a href="#" data-action="decrementSecond"><i class="icon-chevron-down"></i></a></td>':"")+(this.showMeridian?'<td class="separator"> </td><td><a href="#" data-action="toggleMeridian"><i class="icon-chevron-down"></i></a></td>':"")+"</tr>"+"</table>";switch(this.template){case"modal":e='<div class="bootstrap-timepicker-widget modal hide fade in" data-backdrop="'+(this.modalBackdrop?"true":"false")+'">'+'<div class="modal-header">'+'<a href="#" class="close" data-dismiss="modal">×</a>'+"<h3>Pick a Time</h3>"+"</div>"+'<div class="modal-content">'+s+"</div>"+'<div class="modal-footer">'+'<a href="#" class="btn btn-primary" data-dismiss="modal">OK</a>'+"</div>"+"</div>";break;case"dropdown":e='<div class="bootstrap-timepicker-widget dropdown-menu">'+s+"</div>"}return e},getTime:function(){return this.formatTime(this.hour,this.minute,this.second,this.meridian)},hideWidget:function(){if(this.isOpen===!1)return;this.showInputs&&this.
|
||||
updateFromWidgetInputs(),this.$element.trigger({type:"hide.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),this.template==="modal"?this.$widget.modal("hide"):this.$widget.removeClass("open"),e(n).off("mousedown.timepicker"),this.isOpen=!1},highlightUnit:function(){this.position=this.getCursorPosition(),this.position>=0&&this.position<=2?this.highlightHour():this.position>=3&&this.position<=5?this.highlightMinute():this.position>=6&&this.position<=8?this.showSeconds?this.highlightSecond():this.highlightMeridian():this.position>=9&&this.position<=11&&this.highlightMeridian()},highlightNextUnit:function(){switch(this.highlightedUnit){case"hour":this.highlightMinute();break;case"minute":this.showSeconds?this.highlightSecond():this.showMeridian?this.highlightMeridian():this.highlightHour();break;case"second":this.showMeridian?this.highlightMeridian():this.highlightHour();break;case"meridian":this.highlightHour()}},highlightPrevUnit
|
||||
:function(){switch(this.highlightedUnit){case"hour":this.highlightMeridian();break;case"minute":this.highlightHour();break;case"second":this.highlightMinute();break;case"meridian":this.showSeconds?this.highlightSecond():this.highlightMinute()}},highlightHour:function(){var e=this.$element.get(0);this.highlightedUnit="hour",e.setSelectionRange&&setTimeout(function(){e.setSelectionRange(0,2)},0)},highlightMinute:function(){var e=this.$element.get(0);this.highlightedUnit="minute",e.setSelectionRange&&setTimeout(function(){e.setSelectionRange(3,5)},0)},highlightSecond:function(){var e=this.$element.get(0);this.highlightedUnit="second",e.setSelectionRange&&setTimeout(function(){e.setSelectionRange(6,8)},0)},highlightMeridian:function(){var e=this.$element.get(0);this.highlightedUnit="meridian",e.setSelectionRange&&(this.showSeconds?setTimeout(function(){e.setSelectionRange(9,11)},0):setTimeout(function(){e.setSelectionRange(6,8)},0))},incrementHour:function(){if(this.showMeridian){if(this.hour===11
|
||||
)return this.hour++,this.toggleMeridian();this.hour===12&&(this.hour=0)}if(this.hour===23){this.hour=0;return}this.hour++,this.update()},incrementMinute:function(e){var t;e?t=this.minute+e:t=this.minute+this.minuteStep-this.minute%this.minuteStep,t>59?(this.incrementHour(),this.minute=t-60):this.minute=t,this.update()},incrementSecond:function(){var e=this.second+this.secondStep-this.second%this.secondStep;e>59?(this.incrementMinute(!0),this.second=e-60):this.second=e,this.update()},remove:function(){e("document").off(".timepicker"),this.$widget&&this.$widget.remove(),delete this.$element.data().timepicker},setDefaultTime:function(e){if(!this.$element.val())if(e==="current"){var t=new Date,n=t.getHours(),r=Math.floor(t.getMinutes()/this.minuteStep)*this.minuteStep,i=Math.floor(t.getSeconds()/this.secondStep)*this.secondStep,s="AM";this.showMeridian&&(n===0?n=12:n>=12?(n>12&&(n-=12),s="PM"):s="AM"),this.hour=n,this.minute=r,this.second=i,this.meridian=s,this.update()}else e===!1?(this.hour=0
|
||||
,this.minute=0,this.second=0,this.meridian="AM"):this.setTime(e);else this.updateFromElementVal()},setTime:function(e){var t,n;this.showMeridian?(t=e.split(" "),n=t[0].split(":"),this.meridian=t[1]):n=e.split(":"),this.hour=parseInt(n[0],10),this.minute=parseInt(n[1],10),this.second=parseInt(n[2],10),isNaN(this.hour)&&(this.hour=0),isNaN(this.minute)&&(this.minute=0);if(this.showMeridian){this.hour>12?this.hour=12:this.hour<1&&(this.hour=12);if(this.meridian==="am"||this.meridian==="a")this.meridian="AM";else if(this.meridian==="pm"||this.meridian==="p")this.meridian="PM";this.meridian!=="AM"&&this.meridian!=="PM"&&(this.meridian="AM")}else this.hour>=24?this.hour=23:this.hour<0&&(this.hour=0);this.minute<0?this.minute=0:this.minute>=60&&(this.minute=59),this.showSeconds&&(isNaN(this.second)?this.second=0:this.second<0?this.second=0:this.second>=60&&(this.second=59)),this.update()},showWidget:function(){if(this.isOpen)return;if(this.$element.is(":disabled"))return;var t=this;e(n).on("mousedown.timepicker"
|
||||
,function(n){e(n.target).closest(".bootstrap-timepicker-widget").length===0&&t.hideWidget()}),this.$element.trigger({type:"show.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),this.disableFocus&&this.$element.blur(),this.updateFromElementVal(),this.template==="modal"?this.$widget.modal("show").on("hidden",e.proxy(this.hideWidget,this)):this.isOpen===!1&&this.$widget.addClass("open"),this.isOpen=!0},toggleMeridian:function(){this.meridian=this.meridian==="AM"?"PM":"AM",this.update()},update:function(){this.$element.trigger({type:"changeTime.timepicker",time:{value:this.getTime(),hours:this.hour,minutes:this.minute,seconds:this.second,meridian:this.meridian}}),this.updateElement(),this.updateWidget()},updateElement:function(){this.$element.val(this.getTime()).change()},updateFromElementVal:function(){var e=this.$element.val();e&&this.setTime(e)},updateWidget:function(){if(this.$widget===!1)return;var e=this.hour<10?"0"+
|
||||
this.hour:this.hour,t=this.minute<10?"0"+this.minute:this.minute,n=this.second<10?"0"+this.second:this.second;this.showInputs?(this.$widget.find("input.bootstrap-timepicker-hour").val(e),this.$widget.find("input.bootstrap-timepicker-minute").val(t),this.showSeconds&&this.$widget.find("input.bootstrap-timepicker-second").val(n),this.showMeridian&&this.$widget.find("input.bootstrap-timepicker-meridian").val(this.meridian)):(this.$widget.find("span.bootstrap-timepicker-hour").text(e),this.$widget.find("span.bootstrap-timepicker-minute").text(t),this.showSeconds&&this.$widget.find("span.bootstrap-timepicker-second").text(n),this.showMeridian&&this.$widget.find("span.bootstrap-timepicker-meridian").text(this.meridian))},updateFromWidgetInputs:function(){if(this.$widget===!1)return;var t=e("input.bootstrap-timepicker-hour",this.$widget).val()+":"+e("input.bootstrap-timepicker-minute",this.$widget).val()+(this.showSeconds?":"+e("input.bootstrap-timepicker-second",this.$widget).val():"")+(this.
|
||||
showMeridian?" "+e("input.bootstrap-timepicker-meridian",this.$widget).val():"");this.setTime(t)},widgetClick:function(t){t.stopPropagation(),t.preventDefault();var n=e(t.target).closest("a").data("action");n&&this[n]()},widgetKeydown:function(t){var n=e(t.target).closest("input"),r=n.attr("name");switch(t.keyCode){case 9:if(this.showMeridian){if(r==="meridian")return this.hideWidget()}else if(this.showSeconds){if(r==="second")return this.hideWidget()}else if(r==="minute")return this.hideWidget();this.updateFromWidgetInputs();break;case 27:this.hideWidget();break;case 38:t.preventDefault();switch(r){case"hour":this.incrementHour();break;case"minute":this.incrementMinute();break;case"second":this.incrementSecond();break;case"meridian":this.toggleMeridian()}break;case 40:t.preventDefault();switch(r){case"hour":this.decrementHour();break;case"minute":this.decrementMinute();break;case"second":this.decrementSecond();break;case"meridian":this.toggleMeridian()}}}},e.fn.timepicker=function(t){var n=
|
||||
Array.apply(null,arguments);return n.shift(),this.each(function(){var r=e(this),s=r.data("timepicker"),o=typeof t=="object"&&t;s||r.data("timepicker",s=new i(this,e.extend({},e.fn.timepicker.defaults,o,e(this).data()))),typeof t=="string"&&s[t].apply(s,n)})},e.fn.timepicker.defaults={defaultTime:"current",disableFocus:!1,isOpen:!1,minuteStep:15,modalBackdrop:!1,secondStep:15,showSeconds:!1,showInputs:!0,showMeridian:!0,template:"dropdown",appendWidgetTo:".bootstrap-timepicker"},e.fn.timepicker.Constructor=i}(jQuery,window,document),define("timepicker",function(){}),!function(e){function t(){return new Date(Date.UTC.apply(Date,arguments))}function n(){var e=new Date;return t(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())}var r=function(t,n){var r=this;this.element=e(t),this.language=n.language||this.element.data("date-language")||"en",this.language=this.language in i?this.language:this.language.split("-")[0],this.language=this.language in i?this.language:"en",this.isRTL=i[this.language
|
||||
].rtl||!1,this.format=s.parseFormat(n.format||this.element.data("date-format")||i[this.language].format||"mm/dd/yyyy"),this.isInline=!1,this.isInput=this.element.is("input"),this.component=this.element.is(".date")?this.element.find(".add-on, .btn"):!1,this.hasInput=this.component&&this.element.find("input").length,this.component&&this.component.length===0&&(this.component=!1),this.forceParse=!0,"forceParse"in n?this.forceParse=n.forceParse:"dateForceParse"in this.element.data()&&(this.forceParse=this.element.data("date-force-parse")),this.picker=e(s.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.isRTL&&(this.picker.addClass("datepicker-rtl"),this.picker.find(".prev i, .next i").toggleClass("icon-arrow-left icon-arrow-right")),this.autoclose=!1,"autoclose"in n?this.autoclose=n.autoclose:"dateAutoclose"in this.element.data()&&(this.autoclose=this
|
||||
.element.data("date-autoclose")),this.keyboardNavigation=!0,"keyboardNavigation"in n?this.keyboardNavigation=n.keyboardNavigation:"dateKeyboardNavigation"in this.element.data()&&(this.keyboardNavigation=this.element.data("date-keyboard-navigation")),this.viewMode=this.startViewMode=0;switch(n.startView||this.element.data("date-start-view")){case 2:case"decade":this.viewMode=this.startViewMode=2;break;case 1:case"year":this.viewMode=this.startViewMode=1}this.minViewMode=n.minViewMode||this.element.data("date-min-view-mode")||0;if(typeof this.minViewMode=="string")switch(this.minViewMode){case"months":this.minViewMode=1;break;case"years":this.minViewMode=2;break;default:this.minViewMode=0}this.viewMode=this.startViewMode=Math.max(this.startViewMode,this.minViewMode),this.todayBtn=n.todayBtn||this.element.data("date-today-btn")||!1,this.todayHighlight=n.todayHighlight||this.element.data("date-today-highlight")||!1,this.calendarWeeks=!1,"calendarWeeks"in n?this.calendarWeeks=n.calendarWeeks
|
||||
:"dateCalendarWeeks"in this.element.data()&&(this.calendarWeeks=this.element.data("date-calendar-weeks")),this.calendarWeeks&&this.picker.find("tfoot th.today").attr("colspan",function(e,t){return parseInt(t)+1}),this._allow_update=!1,this.weekStart=(n.weekStart||this.element.data("date-weekstart")||i[this.language].weekStart||0)%7,this.weekEnd=(this.weekStart+6)%7,this.startDate=-Infinity,this.endDate=Infinity,this.daysOfWeekDisabled=[],this.setStartDate(n.startDate||this.element.data("date-startdate")),this.setEndDate(n.endDate||this.element.data("date-enddate")),this.setDaysOfWeekDisabled(n.daysOfWeekDisabled||this.element.data("date-days-of-week-disabled")),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};r.prototype={constructor:r,_events:[],_secondaryEvents:[],_applyEvents:function(e){for(var t=0,n,r;t<e.length;t++)n=e[t][0],r=e[t][1],n.on(r)},_unapplyEvents:function(e){for(var t=0,n,r;t<e.length;t++)n=e[t][0],r=e[t][1
|
||||
],n.off(r)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:e.proxy(this.show,this),keyup:e.proxy(this.update,this),keydown:e.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:e.proxy(this.show,this),keyup:e.proxy(this.update,this),keydown:e.proxy(this.keydown,this)}],[this.component,{click:e.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:e.proxy(this.show,this)}]],this._secondaryEvents=[[this.picker,{click:e.proxy(this.click,this)}],[e(window),{resize:e.proxy(this.place,this)}],[e(document),{mousedown:e.proxy(function(t){e(t.target).closest(".datepicker.datepicker-inline, .datepicker.datepicker-dropdown").length===0&&this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents
|
||||
(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},show:function(e){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.height=this.component?this.component.outerHeight():this.element.outerHeight(),this.place(),this._attachSecondaryEvents(),e&&e.preventDefault(),this.element.trigger({type:"show",date:this.date})},hide:function(e){if(this.isInline)return;if(!this.picker.is(":visible"))return;this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.startViewMode,this.showMode(),this.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this.element.trigger({type:"hide",date:this.date})},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date},getDate:function(){var e=this.getUTCDate();return new Date(e.getTime()+e.getTimezoneOffset
|
||||
()*6e4)},getUTCDate:function(){return this.date},setDate:function(e){this.setUTCDate(new Date(e.getTime()-e.getTimezoneOffset()*6e4))},setUTCDate:function(e){this.date=e,this.setValue()},setValue:function(){var e=this.getFormattedDate();this.isInput?this.element.val(e):(this.component&&this.element.find("input").val(e),this.element.data("date",e))},getFormattedDate:function(e){return e===undefined&&(e=this.format),s.formatDate(this.date,e,this.language)},setStartDate:function(e){this.startDate=e||-Infinity,this.startDate!==-Infinity&&(this.startDate=s.parseDate(this.startDate,this.format,this.language)),this.update(),this.updateNavArrows()},setEndDate:function(e){this.endDate=e||Infinity,this.endDate!==Infinity&&(this.endDate=s.parseDate(this.endDate,this.format,this.language)),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(t){this.daysOfWeekDisabled=t||[],e.isArray(this.daysOfWeekDisabled)||(this.daysOfWeekDisabled=this.daysOfWeekDisabled.split(/,\s*/)),this.daysOfWeekDisabled=
|
||||
e.map(this.daysOfWeekDisabled,function(e){return parseInt(e,10)}),this.update(),this.updateNavArrows()},place:function(){if(this.isInline)return;var t=parseInt(this.element.parents().filter(function(){return e(this).css("z-index")!="auto"}).first().css("z-index"))+10,n=this.component?this.component.parent().offset():this.element.offset(),r=this.component?this.component.outerHeight(!0):this.element.outerHeight(!0);this.picker.css({top:n.top+r,left:n.left,zIndex:t})},_allow_update:!0,update:function(){if(!this._allow_update)return;var e,t=!1;arguments&&arguments.length&&(typeof arguments[0]=="string"||arguments[0]instanceof Date)?(e=arguments[0],t=!0):e=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),this.date=s.parseDate(e,this.format,this.language),t&&this.setValue(),this.date<this.startDate?this.viewDate=new Date(this.startDate):this.date>this.endDate?this.viewDate=new Date(this.endDate):this.viewDate=new Date(this.date),this.fill()},fillDow:
|
||||
function(){var e=this.weekStart,t="<tr>";if(this.calendarWeeks){var n='<th class="cw"> </th>';t+=n,this.picker.find(".datepicker-days thead tr:first-child").prepend(n)}while(e<this.weekStart+7)t+='<th class="dow">'+i[this.language].daysMin[e++%7]+"</th>";t+="</tr>",this.picker.find(".datepicker-days thead").append(t)},fillMonths:function(){var e="",t=0;while(t<12)e+='<span class="month">'+i[this.language].monthsShort[t++]+"</span>";this.picker.find(".datepicker-months td").html(e)},fill:function(){var n=new Date(this.viewDate),r=n.getUTCFullYear(),o=n.getUTCMonth(),u=this.startDate!==-Infinity?this.startDate.getUTCFullYear():-Infinity,a=this.startDate!==-Infinity?this.startDate.getUTCMonth():-Infinity,f=this.endDate!==Infinity?this.endDate.getUTCFullYear():Infinity,l=this.endDate!==Infinity?this.endDate.getUTCMonth():Infinity,c=this.date&&this.date.valueOf(),h=new Date;this.picker.find(".datepicker-days thead th.switch").text(i[this.language].months[o]+" "+r),this.picker.find("tfoot th.today"
|
||||
).text(i[this.language].today).toggle(this.todayBtn!==!1),this.updateNavArrows(),this.fillMonths();var p=t(r,o-1,28,0,0,0,0),d=s.getDaysInMonth(p.getUTCFullYear(),p.getUTCMonth());p.setUTCDate(d),p.setUTCDate(d-(p.getUTCDay()-this.weekStart+7)%7);var v=new Date(p);v.setUTCDate(v.getUTCDate()+42),v=v.valueOf();var m=[],g;while(p.valueOf()<v){if(p.getUTCDay()==this.weekStart){m.push("<tr>");if(this.calendarWeeks){var y=new Date(+p+(this.weekStart-p.getUTCDay()-7)%7*864e5),b=new Date(+y+(11-y.getUTCDay())%7*864e5),w=new Date(+(w=t(b.getUTCFullYear(),0,1))+(11-w.getUTCDay())%7*864e5),E=(b-w)/864e5/7+1;m.push('<td class="cw">'+E+"</td>")}}g="";if(p.getUTCFullYear()<r||p.getUTCFullYear()==r&&p.getUTCMonth()<o)g+=" old";else if(p.getUTCFullYear()>r||p.getUTCFullYear()==r&&p.getUTCMonth()>o)g+=" new";this.todayHighlight&&p.getUTCFullYear()==h.getFullYear()&&p.getUTCMonth()==h.getMonth()&&p.getUTCDate()==h.getDate()&&(g+=" today"),c&&p.valueOf()==c&&(g+=" active");if(p.valueOf()<this.startDate||
|
||||
p.valueOf()>this.endDate||e.inArray(p.getUTCDay(),this.daysOfWeekDisabled)!==-1)g+=" disabled";m.push('<td class="day'+g+'">'+p.getUTCDate()+"</td>"),p.getUTCDay()==this.weekEnd&&m.push("</tr>"),p.setUTCDate(p.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").empty().append(m.join(""));var S=this.date&&this.date.getUTCFullYear(),x=this.picker.find(".datepicker-months").find("th:eq(1)").text(r).end().find("span").removeClass("active");S&&S==r&&x.eq(this.date.getUTCMonth()).addClass("active"),(r<u||r>f)&&x.addClass("disabled"),r==u&&x.slice(0,a).addClass("disabled"),r==f&&x.slice(l+1).addClass("disabled"),m="",r=parseInt(r/10,10)*10;var T=this.picker.find(".datepicker-years").find("th:eq(1)").text(r+"-"+(r+9)).end().find("td");r-=1;for(var N=-1;N<11;N++)m+='<span class="year'+(N==-1||N==10?" old":"")+(S==r?" active":"")+(r<u||r>f?" disabled":"")+'">'+r+"</span>",r+=1;T.html(m)},updateNavArrows:function(){if(!this._allow_update)return;var e=new Date(this.viewDate),t=e.getUTCFullYear
|
||||
(),n=e.getUTCMonth();switch(this.viewMode){case 0:this.startDate!==-Infinity&&t<=this.startDate.getUTCFullYear()&&n<=this.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==Infinity&&t>=this.endDate.getUTCFullYear()&&n>=this.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.startDate!==-Infinity&&t<=this.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==Infinity&&t>=this.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}},click:function(n){n.preventDefault();var r=e(n.target).closest("span, td, th");if(r.length==1)switch(r[0].nodeName.toLowerCase()){case"th":switch(r[0].className){case"switch":this.showMode(1);break;
|
||||
case"prev":case"next":var i=s.modes[this.viewMode].navStep*(r[0].className=="prev"?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,i);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,i)}this.fill();break;case"today":var o=new Date;o=t(o.getFullYear(),o.getMonth(),o.getDate(),0,0,0),this.showMode(-2);var u=this.todayBtn=="linked"?null:"view";this._setDate(o,u)}break;case"span":if(!r.is(".disabled")){this.viewDate.setUTCDate(1);if(r.is(".month")){var a=1,f=r.parent().find("span").index(r),l=this.viewDate.getUTCFullYear();this.viewDate.setUTCMonth(f),this.element.trigger({type:"changeMonth",date:this.viewDate}),this.minViewMode==1&&this._setDate(t(l,f,a,0,0,0,0))}else{var l=parseInt(r.text(),10)||0,a=1,f=0;this.viewDate.setUTCFullYear(l),this.element.trigger({type:"changeYear",date:this.viewDate}),this.minViewMode==2&&this._setDate(t(l,f,a,0,0,0,0))}this.showMode(-1),this.fill()}break;case"td":if(r.is(".day")&&!r.is(".disabled")){var a=parseInt(r.
|
||||
text(),10)||1,l=this.viewDate.getUTCFullYear(),f=this.viewDate.getUTCMonth();r.is(".old")?f===0?(f=11,l-=1):f-=1:r.is(".new")&&(f==11?(f=0,l+=1):f+=1),this._setDate(t(l,f,a,0,0,0,0))}}},_setDate:function(e,t){if(!t||t=="date")this.date=e;if(!t||t=="view")this.viewDate=e;this.fill(),this.setValue(),this.element.trigger({type:"changeDate",date:this.date});var n;this.isInput?n=this.element:this.component&&(n=this.element.find("input")),n&&(n.change(),this.autoclose&&(!t||t=="date")&&this.hide())},moveMonth:function(e,t){if(!t)return e;var n=new Date(e.valueOf()),r=n.getUTCDate(),i=n.getUTCMonth(),s=Math.abs(t),o,u;t=t>0?1:-1;if(s==1){u=t==-1?function(){return n.getUTCMonth()==i}:function(){return n.getUTCMonth()!=o},o=i+t,n.setUTCMonth(o);if(o<0||o>11)o=(o+12)%12}else{for(var a=0;a<s;a++)n=this.moveMonth(n,t);o=n.getUTCMonth(),n.setUTCDate(r),u=function(){return o!=n.getUTCMonth()}}while(u())n.setUTCDate(--r),n.setUTCMonth(o);return n},moveYear:function(e,t){return this.moveMonth(e,t*12)},
|
||||
dateWithinRange:function(e){return e>=this.startDate&&e<=this.endDate},keydown:function(e){if(this.picker.is(":not(:visible)")){e.keyCode==27&&this.show();return}var t=!1,n,r,i,s,o;switch(e.keyCode){case 27:this.hide(),e.preventDefault();break;case 37:case 39:if(!this.keyboardNavigation)break;n=e.keyCode==37?-1:1,e.ctrlKey?(s=this.moveYear(this.date,n),o=this.moveYear(this.viewDate,n)):e.shiftKey?(s=this.moveMonth(this.date,n),o=this.moveMonth(this.viewDate,n)):(s=new Date(this.date),s.setUTCDate(this.date.getUTCDate()+n),o=new Date(this.viewDate),o.setUTCDate(this.viewDate.getUTCDate()+n)),this.dateWithinRange(s)&&(this.date=s,this.viewDate=o,this.setValue(),this.update(),e.preventDefault(),t=!0);break;case 38:case 40:if(!this.keyboardNavigation)break;n=e.keyCode==38?-1:1,e.ctrlKey?(s=this.moveYear(this.date,n),o=this.moveYear(this.viewDate,n)):e.shiftKey?(s=this.moveMonth(this.date,n),o=this.moveMonth(this.viewDate,n)):(s=new Date(this.date),s.setUTCDate(this.date.getUTCDate()+n*7),o=new
|
||||
Date(this.viewDate),o.setUTCDate(this.viewDate.getUTCDate()+n*7)),this.dateWithinRange(s)&&(this.date=s,this.viewDate=o,this.setValue(),this.update(),e.preventDefault(),t=!0);break;case 13:this.hide(),e.preventDefault();break;case 9:this.hide()}if(t){this.element.trigger({type:"changeDate",date:this.date});var u;this.isInput?u=this.element:this.component&&(u=this.element.find("input")),u&&u.change()}},showMode:function(e){e&&(this.viewMode=Math.max(this.minViewMode,Math.min(2,this.viewMode+e))),this.picker.find(">div").hide().filter(".datepicker-"+s.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}},e.fn.datepicker=function(t){var n=Array.apply(null,arguments);return n.shift(),this.each(function(){var i=e(this),s=i.data("datepicker"),o=typeof t=="object"&&t;s||i.data("datepicker",s=new r(this,e.extend({},e.fn.datepicker.defaults,o))),typeof t=="string"&&typeof s[t]=="function"&&s[t].apply(s,n)})},e.fn.datepicker.defaults={},e.fn.datepicker.Constructor=r;var i=
|
||||
e.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today"}},s={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(e){return e%4===0&&e%100!==0||e%400===0},getDaysInMonth:function(e,t){return[31,s.isLeapYear(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(e){var t=e.replace(this.validParts,"\0").split("\0"),n=e.match(this.validParts);if(!t||!t.length||!n||n.length===0)throw new Error("Invalid date format."
|
||||
);return{separators:t,parts:n}},parseDate:function(n,s,o){if(n instanceof Date)return n;if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(n)){var u=/([\-+]\d+)([dmwy])/,a=n.match(/([\-+]\d+)([dmwy])/g),f,l;n=new Date;for(var c=0;c<a.length;c++){f=u.exec(a[c]),l=parseInt(f[1]);switch(f[2]){case"d":n.setUTCDate(n.getUTCDate()+l);break;case"m":n=r.prototype.moveMonth.call(r.prototype,n,l);break;case"w":n.setUTCDate(n.getUTCDate()+l*7);break;case"y":n=r.prototype.moveYear.call(r.prototype,n,l)}}return t(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),0,0,0)}var a=n&&n.match(this.nonpunctuation)||[],n=new Date,h={},p=["yyyy","yy","M","MM","m","mm","d","dd"],d={yyyy:function(e,t){return e.setUTCFullYear(t)},yy:function(e,t){return e.setUTCFullYear(2e3+t)},m:function(e,t){t-=1;while(t<0)t+=12;t%=12,e.setUTCMonth(t);while(e.getUTCMonth()!=t)e.setUTCDate(e.getUTCDate()-1);return e},d:function(e,t){return e.setUTCDate(t)}},v,m,f;d.M=d.MM=d.mm=d.m,d.dd=d.d,n=t(n.getFullYear(),n.getMonth(),n.getDate
|
||||
(),0,0,0);var g=s.parts.slice();a.length!=g.length&&(g=e(g).filter(function(t,n){return e.inArray(n,p)!==-1}).toArray());if(a.length==g.length){for(var c=0,y=g.length;c<y;c++){v=parseInt(a[c],10),f=g[c];if(isNaN(v))switch(f){case"MM":m=e(i[o].months).filter(function(){var e=this.slice(0,a[c].length),t=a[c].slice(0,e.length);return e==t}),v=e.inArray(m[0],i[o].months)+1;break;case"M":m=e(i[o].monthsShort).filter(function(){var e=this.slice(0,a[c].length),t=a[c].slice(0,e.length);return e==t}),v=e.inArray(m[0],i[o].monthsShort)+1}h[f]=v}for(var c=0,b;c<p.length;c++)b=p[c],b in h&&!isNaN(h[b])&&d[b](n,h[b])}return n},formatDate:function(t,n,r){var s={d:t.getUTCDate(),D:i[r].daysShort[t.getUTCDay()],DD:i[r].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:i[r].monthsShort[t.getUTCMonth()],MM:i[r].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()};s.dd=(s.d<10?"0":"")+s.d,s.mm=(s.m<10?"0":"")+s.m;var t=[],o=e.extend([],n.separators);for(var u=0,a=n.parts.
|
||||
length;u<a;u++)o.length&&t.push(o.shift()),t.push(s[n.parts[u]]);return t.join("")},headTemplate:'<thead><tr><th class="prev"><i class="icon-arrow-left"/></th><th colspan="5" class="switch"></th><th class="next"><i class="icon-arrow-right"/></th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr></tfoot>'};s.template='<div class="datepicker"><div class="datepicker-days"><table class=" table-condensed">'+s.headTemplate+"<tbody></tbody>"+s.footTemplate+"</table>"+"</div>"+'<div class="datepicker-months">'+'<table class="table-condensed">'+s.headTemplate+s.contTemplate+s.footTemplate+"</table>"+"</div>"+'<div class="datepicker-years">'+'<table class="table-condensed">'+s.headTemplate+s.contTemplate+s.footTemplate+"</table>"+"</div>"+"</div>",e.fn.datepicker.DPGlobal=s}(window.jQuery),define("datepicker",function(){}),angular.module("$strap.config",[]).value("$strapConfig",{}),angular.module("$strap.filters"
|
||||
,["$strap.config"]),angular.module("$strap.directives",["$strap.config"]),angular.module("$strap",["$strap.filters","$strap.directives","$strap.config"]),angular.module("$strap.directives").directive("bsAlert",["$parse","$timeout","$compile",function(e,t,n){return{restrict:"A",link:function(i,s,o){var u=e(o.bsAlert),a=u.assign,f=u(i),l=function(n){t(function(){s.alert("close")},n*1)};o.bsAlert?i.$watch(o.bsAlert,function(e,t){f=e,s.html((e.title?"<strong>"+e.title+"</strong> ":"")+e.content||""),!e.closed||s.hide(),n(s.contents())(i);if(e.type||t.type)t.type&&s.removeClass("alert-"+t.type),e.type&&s.addClass("alert-"+e.type);angular.isDefined(e.closeAfter)?l(e.closeAfter):o.closeAfter&&l(o.closeAfter),(angular.isUndefined(o.closeButton)||o.closeButton!=="0"&&o.closeButton!=="false")&&s.prepend('<button type="button" class="close" data-dismiss="alert">×</button>')},!0):((angular.isUndefined(o.closeButton)||o.closeButton!=="0"&&o.closeButton!=="false")&&s.prepend('<button type="button" class="close" data-dismiss="alert">×</button>'
|
||||
),o.closeAfter&&l(o.closeAfter)),s.addClass("alert").alert(),s.hasClass("fade")&&(s.removeClass("in"),setTimeout(function(){s.addClass("in")}));var c=o.ngRepeat&&o.ngRepeat.split(" in ").pop();s.on("close",function(e){var t;c?(e.preventDefault(),s.removeClass("in"),t=function(){s.trigger("closed"),i.$parent&&i.$parent.$apply(function(){var e=c.split("."),t=i.$parent;for(var n=0;n<e.length;++n)t&&(t=t[e[n]]);t&&t.splice(i.$index,1)})},$.support.transition&&s.hasClass("fade")?s.on($.support.transition.end,t):t()):f&&(e.preventDefault(),s.removeClass("in"),t=function(){s.trigger("closed"),i.$apply(function(){f.closed=!0})},$.support.transition&&s.hasClass("fade")?s.on($.support.transition.end,t):t())})}}}]),angular.module("$strap.directives").directive("bsButton",["$parse","$timeout",function(e,t){return{restrict:"A",require:"?ngModel",link:function(n,r,i,s){if(s){r.parent('[data-toggle="buttons-checkbox"], [data-toggle="buttons-radio"]').length||r.attr("data-toggle","button");var o=!!n.$eval
|
||||
(i.ngModel);o&&r.addClass("active"),n.$watch(i.ngModel,function(e,t){var n=!!e,i=!!t;n!==i?$.fn.button.Constructor.prototype.toggle.call(u):n&&!o&&r.addClass("active")})}r.hasClass("btn")||r.on("click.button.data-api",function(e){r.button("toggle")}),r.button();var u=r.data("button");u.toggle=function(){if(!s)return $.fn.button.Constructor.prototype.toggle.call(this);var t=r.parent('[data-toggle="buttons-radio"]');t.length?(r.siblings("[ng-model]").each(function(t,r){e($(r).attr("ng-model")).assign(n,!1)}),n.$digest(),s.$modelValue||(s.$setViewValue(!s.$modelValue),n.$digest())):n.$apply(function(){s.$setViewValue(!s.$modelValue)})}}}}]).directive("bsButtonsCheckbox",["$parse",function(e){return{restrict:"A",require:"?ngModel",compile:function(t,n,r){t.attr("data-toggle","buttons-checkbox").find("a, button").each(function(e,t){$(t).attr("bs-button","")})}}}]).directive("bsButtonsRadio",["$timeout",function(e){return{restrict:"A",require:"?ngModel",compile:function(n,r,i){return n.attr("data-toggle"
|
||||
,"buttons-radio"),r.ngModel||n.find("a, button").each(function(e,t){$(t).attr("bs-button","")}),function(n,r,i,s){s&&(e(function(){r.find("[value]").button().filter('[value="'+s.$viewValue+'"]').addClass("active")}),r.on("click.button.data-api",function(e){n.$apply(function(){s.$setViewValue($(e.target).closest("button").attr("value"))})}),n.$watch(i.ngModel,function(e,t){if(e!==t){var s=r.find('[value="'+n.$eval(i.ngModel)+'"]');s.length&&s.button("toggle")}}))}}}}]),angular.module("$strap.directives").directive("bsButtonSelect",["$parse","$timeout",function(e,t){return{restrict:"A",require:"?ngModel",link:function(n,r,i,s){var o=e(i.bsButtonSelect),u=o.assign;s&&(r.text(n.$eval(i.ngModel)),n.$watch(i.ngModel,function(e,t){r.text(e)}));var a,f,l,c;r.bind("click",function(e){a=o(n),f=s?n.$eval(i.ngModel):r.text(),l=a.indexOf(f),c=l>a.length-2?a[0]:a[l+1],n.$apply(function(){r.text(c),s&&s.$setViewValue(c)})})}}}]),angular.module("$strap.directives").directive("bsDatepicker",["$timeout","$strapConfig"
|
||||
,function(e,t){var n=/(iP(a|o)d|iPhone)/g.test(navigator.userAgent),r=function(t){return t=t||"en",{"/":"[\\/]","-":"[-]",".":"[.]"," ":"[\\s]",dd:"(?:(?:[0-2]?[0-9]{1})|(?:[3][01]{1}))",d:"(?:(?:[0-2]?[0-9]{1})|(?:[3][01]{1}))",mm:"(?:[0]?[1-9]|[1][012])",m:"(?:[0]?[1-9]|[1][012])",DD:"(?:"+$.fn.datepicker.dates[t].days.join("|")+")",D:"(?:"+$.fn.datepicker.dates[t].daysShort.join("|")+")",MM:"(?:"+$.fn.datepicker.dates[t].months.join("|")+")",M:"(?:"+$.fn.datepicker.dates[t].monthsShort.join("|")+")",yyyy:"(?:(?:[1]{1}[0-9]{1}[0-9]{1}[0-9]{1})|(?:[2]{1}[0-9]{3}))(?![[0-9]])",yy:"(?:(?:[0-9]{1}[0-9]{1}))(?![[0-9]])"}},i=function(t,n){var i=t,s=r(n),o;return o=0,angular.forEach(s,function(e,t){i=i.split(t).join("${"+o+"}"),o++}),o=0,angular.forEach(s,function(e,t){i=i.split("${"+o+"}").join(e),o++}),new RegExp("^"+i+"$",["i"])};return{restrict:"A",require:"?ngModel",link:function(r,s,o,u){var a=angular.extend({autoclose:!0},t.datepicker||{}),f=o.dateType||a.type||"date";angular.forEach(
|
||||
["format","weekStart","calendarWeeks","startDate","endDate","daysOfWeekDisabled","autoclose","startView","minViewMode","todayBtn","todayHighlight","keyboardNavigation","language","forceParse"],function(e){angular.isDefined(o[e])&&(a[e]=o[e])});var l=a.language||"en",c=o.dateFormat||a.format||$.fn.datepicker.dates[l]&&$.fn.datepicker.dates[l].format||"mm/dd/yyyy",h=n?"yyyy-mm-dd":c,p=i(h,l);u&&(u.$formatters.unshift(function(e){return f==="date"&&angular.isString(e)&&e?$.fn.datepicker.DPGlobal.parseDate(e,$.fn.datepicker.DPGlobal.parseFormat(c),l):e}),u.$parsers.unshift(function(e){return e?f==="date"&&angular.isDate(e)?(u.$setValidity("date",!0),e):angular.isString(e)&&p.test(e)?(u.$setValidity("date",!0),n?new Date(e):f==="string"?e:$.fn.datepicker.DPGlobal.parseDate(e,$.fn.datepicker.DPGlobal.parseFormat(h),l)):(u.$setValidity("date",!1),undefined):(u.$setValidity("date",!0),null)}),u.$render=function(){if(n){var t=u.$viewValue?$.fn.datepicker.DPGlobal.formatDate(u.$viewValue,$.fn.datepicker
|
||||
.DPGlobal.parseFormat(h),l):"";return s.val(t),t}return u.$viewValue||s.val(""),s.datepicker("update",u.$viewValue)}),n?s.prop("type","date").css("-webkit-appearance","textfield"):(u&&s.on("changeDate",function(e){r.$apply(function(){u.$setViewValue(f==="string"?s.val():e.date)})}),s.datepicker(angular.extend(a,{format:h,language:l})),r.$on("$destroy",function(){var e=s.data("datepicker");e&&(e.picker.remove(),s.data("datepicker",null))}),o.$observe("startDate",function(e){s.datepicker("setStartDate",e)}),o.$observe("endDate",function(e){s.datepicker("setEndDate",e)}));var d=s.siblings('[data-toggle="datepicker"]');d.length&&d.on("click",function(){s.prop("disabled")||s.trigger("focus")})}}}]),angular.module("$strap.directives").directive("bsDropdown",["$parse","$compile","$timeout",function(e,t,n){var r=function(e,t){return t||(t=['<ul class="dropdown-menu" role="menu" aria-labelledby="drop1">',"</ul>"]),angular.forEach(e,function(e,n){if(e.divider)return t.splice(n+1,0,'<li class="divider"></li>'
|
||||
);var i="<li"+(e.submenu&&e.submenu.length?' class="dropdown-submenu"':"")+">"+'<a tabindex="-1" ng-href="'+(e.href||"")+'"'+(e.click?'" ng-click="'+e.click+'"':"")+(e.target?'" target="'+e.target+'"':"")+(e.method?'" data-method="'+e.method+'"':"")+">"+(e.text||"")+"</a>";e.submenu&&e.submenu.length&&(i+=r(e.submenu).join("\n")),i+="</li>",t.splice(n+1,0,i)}),t};return{restrict:"EA",scope:!0,link:function(s,o,u){var a=e(u.bsDropdown),f=a(s);n(function(){!angular.isArray(f);var e=angular.element(r(f).join(""));e.insertAfter(o),t(o.next("ul.dropdown-menu"))(s)}),o.addClass("dropdown-toggle").attr("data-toggle","dropdown")}}}]),angular.module("$strap.directives").factory("$modal",["$rootScope","$compile","$http","$timeout","$q","$templateCache","$strapConfig",function(e,t,n,r,i,s,o){var u=function(a){function f(u){var a=angular.extend({show:!0},o.modal,u),f=a.scope?a.scope:e.$new(),l=a.template;return i.when(s.get(l)||n.get(l,{cache:!0}).then(function(e){return e.data})).then(function(n){
|
||||
var i=l.replace(".html","").replace(/[\/|\.|:]/g,"-")+"-"+f.$id,s=$('<div class="modal hide" tabindex="-1"></div>').attr("id",i).addClass("fade").html(n);return a.modalClass&&s.addClass(a.modalClass),$("body").append(s),r(function(){t(s)(f)}),f.$modal=function(e){s.modal(e)},angular.forEach(["show","hide"],function(e){f[e]=function(){s.modal(e)}}),f.dismiss=f.hide,angular.forEach(["show","shown","hide","hidden"],function(e){s.on(e,function(t){f.$emit("modal-"+e,t)})}),s.on("shown",function(e){$("input[autofocus], textarea[autofocus]",s).first().trigger("focus")}),s.on("hidden",function(e){a.persist||f.$destroy()}),f.$on("$destroy",function(){s.remove()}),s.modal(a),s})}return new f(a)};return u}]).directive("bsModal",["$q","$modal",function(e,t){return{restrict:"A",scope:!0,link:function(r,i,s,o){var u={template:r.$eval(s.bsModal),persist:!0,show:!1,scope:r};angular.forEach(["modalClass","backdrop","keyboard"],function(e){angular.isDefined(s[e])&&(u[e]=s[e])}),e.when(t(u)).then(function(
|
||||
t){i.attr("data-target","#"+t.attr("id")).attr("data-toggle","modal")})}}}]),angular.module("$strap.directives").directive("bsNavbar",["$location",function(e){return{restrict:"A",link:function(n,r,i,s){n.$watch(function(){return e.path()},function(e,t){$("li[data-match-route]",r).each(function(t,n){var r=angular.element(n),i=r.attr("data-match-route"),s=new RegExp("^"+i+"$",["i"]);s.test(e)?r.addClass("active").find(".collapse.in").collapse("hide"):r.removeClass("active")})})}}}]),angular.module("$strap.directives").directive("bsPopover",["$parse","$compile","$http","$timeout","$q","$templateCache",function(e,t,n,r,i,s){return $("body").on("keyup",function(e){e.keyCode===27&&$(".popover.in").each(function(){$(this).popover("hide")})}),{restrict:"A",scope:!0,link:function(u,a,f,l){var c=e(f.bsPopover),h=c.assign,p=c(u),d={};angular.isObject(p)&&(d=p),i.when(d.content||s.get(p)||n.get(p,{cache:!0})).then(function(n){angular.isObject(n)&&(n=n.data),!f.unique||a.on("show",function(e){$(".popover.in"
|
||||
).each(function(){var e=$(this),t=e.data("popover");t&&!t.$element.is(a)&&e.popover("hide")})}),!f.hide||u.$watch(f.hide,function(e,t){e?i.hide():e!==t&&i.show()}),!f.show||u.$watch(f.show,function(e,t){e?r(function(){i.show()}):e!==t&&i.hide()}),a.popover(angular.extend({},d,{content:n,html:!0}));var i=a.data("popover");i.hasContent=function(){return this.getTitle()||n},i.getPosition=function(){var e=$.fn.popover.Constructor.prototype.getPosition.apply(this,arguments);return t(this.$tip)(u),u.$digest(),this.$tip.data("popover",this),e},u.$popover=function(e){i(e)},angular.forEach(["show","hide"],function(e){u[e]=function(){i[e]()}}),u.dismiss=u.hide,angular.forEach(["show","shown","hide","hidden"],function(e){a.on(e,function(t){u.$emit("popover-"+e,t)})})})}}}]),angular.module("$strap.directives").directive("bsSelect",["$timeout",function(e){var t=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*)$/
|
||||
;return{restrict:"A",require:"?ngModel",link:function(n,r,i,s){var o=n.$eval(i.bsSelect)||{};e(function(){r.selectpicker(o),r.next().removeClass("ng-scope")}),s&&n.$watch(i.ngModel,function(e,t){angular.equals(e,t)||r.selectpicker("refresh")})}}}]),angular.module("$strap.directives").directive("bsTabs",["$parse","$compile","$timeout",function(e,t,n){var r='<div class="tabs"><ul class="nav nav-tabs"><li ng-repeat="pane in panes" ng-class="{active:pane.active}"><a data-target="#{{pane.id}}" data-index="{{$index}}" data-toggle="tab">{{pane.title}}</a></li></ul><div class="tab-content" ng-transclude></div>';return{restrict:"A",require:"?ngModel",priority:0,scope:!0,template:r,replace:!0,transclude:!0,compile:function(r,i,s){return function(r,i,s,o){var u=e(s.bsTabs),a=u.assign,f=u(r);r.panes=[];var l=i.find("ul.nav-tabs"),c=i.find("div.tab-content"),h=0,p,d,v;n(function(){c.find("[data-title], [data-tab]").each(function(e){var t=angular.element(this);p="tab-"+r.$id+"-"+e,d=t.data("title")||
|
||||
t.data("tab"),v=!v&&t.hasClass("active"),t.attr("id",p).addClass("tab-pane"),s.fade&&t.addClass("fade"),r.panes.push({id:p,title:d,content:this.innerHTML,active:v})}),r.panes.length&&!v&&(c.find(".tab-pane:first-child").addClass("active"+(s.fade?" in":"")),r.panes[0].active=!0)}),o&&(i.on("show",function(e){var t=$(e.target);r.$apply(function(){o.$setViewValue(t.data("index"))})}),r.$watch(s.ngModel,function(e,t){if(angular.isUndefined(e))return;h=e,setTimeout(function(){var t=$(l[0].querySelectorAll("li")[e*1]);t.hasClass("active")||t.children("a").tab("show")})}))}}}}]),angular.module("$strap.directives").directive("bsTimepicker",["$timeout","$strapConfig",function(e,t){var n="((?:(?:[0-1][0-9])|(?:[2][0-3])|(?:[0-9])):(?:[0-5][0-9])(?::[0-5][0-9])?(?:\\s?(?:am|AM|pm|PM))?)";return{restrict:"A",require:"?ngModel",link:function(i,s,o,u){if(u){s.on("changeTime.timepicker",function(t){e(function(){u.$setViewValue(s.val())})});var a=new RegExp("^"+n+"$",["i"]);u.$parsers.unshift(function(
|
||||
e){if(!e||a.test(e))return u.$setValidity("time",!0),e;u.$setValidity("time",!1);return})}s.attr("data-toggle","timepicker"),s.parent().addClass("bootstrap-timepicker"),s.timepicker(t.timepicker||{});var f=s.data("timepicker"),l=s.siblings('[data-toggle="timepicker"]');l.length&&l.on("click",$.proxy(f.showWidget,f))}}}]),angular.module("$strap.directives").directive("bsTooltip",["$parse","$compile",function(e,t){return{restrict:"A",scope:!0,link:function(n,r,i,s){var o=e(i.bsTooltip),u=o.assign,a=o(n);n.$watch(i.bsTooltip,function(e,t){e!==t&&(a=e)}),!i.unique||r.on("show",function(e){$(".tooltip.in").each(function(){var e=$(this),t=e.data("tooltip");t&&!t.$element.is(r)&&e.tooltip("hide")})}),r.tooltip({title:function(){return angular.isFunction(a)?a.apply(null,arguments):a},html:!0});var f=r.data("tooltip");f.show=function(){var e=$.fn.tooltip.Constructor.prototype.show.apply(this,arguments);return this.tip().data("tooltip",this),e},n._tooltip=function(e){r.tooltip(e)},n.hide=function(
|
||||
){r.tooltip("hide")},n.show=function(){r.tooltip("show")},n.dismiss=n.hide}}}]),angular.module("$strap.directives").directive("bsTypeahead",["$parse",function(e){return{restrict:"A",require:"?ngModel",link:function(n,r,i,s){var o=e(i.bsTypeahead),u=o.assign,a=o(n);n.$watch(i.bsTypeahead,function(e,t){e!==t&&(a=e)}),r.attr("data-provide","typeahead"),r.typeahead({source:function(e){return angular.isFunction(a)?a.apply(null,arguments):a},minLength:i.minLength||1,items:i.items,updater:function(e){return s&&n.$apply(function(){s.$setViewValue(e)}),n.$emit("typeahead-updated",e),e}});var f=r.data("typeahead");f.lookup=function(e){var t;return this.query=this.$element.val()||"",this.query.length<this.options.minLength?this.shown?this.hide():this:(t=$.isFunction(this.source)?this.source(this.query,$.proxy(this.process,this)):this.source,t?this.process(t):this)},!i.matchAll||(f.matcher=function(e){return!0}),i.minLength==="0"&&setTimeout(function(){r.on("focus",function(){r.val().length===0&&setTimeout
|
||||
(r.typeahead.bind(r,"lookup"),200)})})}}}]),define("angular-strap",function(){}),define("settings",["underscore"],function(e){return function(n){var r={elasticsearch:"http://"+window.location.hostname+":9200",panel_names:[],kibana_index:"kibana-int"},i={};return e.each(r,function(e,t){i[t]=typeof n[t]!="undefined"?n[t]:r[t]}),i}}),define("config",["settings"],function(e){return new e({elasticsearch:"http://"+window.location.hostname+":9200",kibana_index:"kibana-int",panel_names:["histogram","map","pie","table","filtering","timepicker","text","fields","hits","dashcontrol","column","derivequeries","trends","bettermap","query","terms"]})}),define("services/alertSrv",["angular","underscore"],function(e,t){var n=e.module("kibana.services");n.service("alertSrv",["$timeout",function(n){var r=this;this.list=[],this.set=function(i,s,o,u){var a={title:i||"",text:s||"",severity:o||"info"},f=e.toJson(a),l=t.map(r.list,function(t){return e.toJson(t)});t.contains(l,f)&&t.remove(r.list,t.indexOf(l,f))
|
||||
,r.list.push(a),u>0&&n(function(){r.list=t.without(r.list,a)},u)},this.clear=function(e){r.list=t.without(r.list,e)},this.clearAll=function(){r.list=[]}}])}),window.Modernizr=function(e,t,n){function r(e){g.cssText=e}function i(e,t){return r(E.join(e+";")+(t||""))}function s(e,t){return typeof e===t}function o(e,t){return!!~(""+e).indexOf(t)}function u(e,t){for(var r in e){var i=e[r];if(!o(i,"-")&&g[i]!==n)return t=="pfx"?i:!0}return!1}function a(e,t,r){for(var i in e){var o=t[e[i]];if(o!==n)return r===!1?e[i]:s(o,"function")?o.bind(r||t):o}return!1}function f(e,t,n){var r=e.charAt(0).toUpperCase()+e.slice(1),i=(e+" "+x.join(r+" ")+r).split(" ");return s(t,"string")||s(t,"undefined")?u(i,t):(i=(e+" "+T.join(r+" ")+r).split(" "),a(i,t,n))}function l(){h.input=function(n){for(var r=0,i=n.length;r<i;r++)L[n[r]]=n[r]in y;return L.list&&(L.list=!!t.createElement("datalist")&&!!e.HTMLDataListElement),L}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "
|
||||
)),h.inputtypes=function(e){for(var r=0,i,s,o,u=e.length;r<u;r++)y.setAttribute("type",s=e[r]),i=y.type!=="text",i&&(y.value=b,y.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(s)&&y.style.WebkitAppearance!==n?(d.appendChild(y),o=t.defaultView,i=o.getComputedStyle&&o.getComputedStyle(y,null).WebkitAppearance!=="textfield"&&y.offsetHeight!==0,d.removeChild(y)):/^(search|tel)$/.test(s)||(/^(url|email)$/.test(s)?i=y.checkValidity&&y.checkValidity()===!1:i=y.value!=b)),k[e[r]]=!!i;return k}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var c="2.6.1",h={},p=!0,d=t.documentElement,v="modernizr",m=t.createElement(v),g=m.style,y=t.createElement("input"),b=":)",w={}.toString,E=" -webkit- -moz- -o- -ms- ".split(" "),S="Webkit Moz O ms",x=S.split(" "),T=S.toLowerCase().split(" "),N={svg:"http://www.w3.org/2000/svg"},C={},k={},L={},A=[],O=A.slice,M,_=function(e,n,r,i){var s,o,u,a=t.createElement("div"),f=t.body,l=f?f:t.createElement
|
||||
("body");if(parseInt(r,10))while(r--)u=t.createElement("div"),u.id=i?i[r]:v+(r+1),a.appendChild(u);return s=["­",'<style id="s',v,'">',e,"</style>"].join(""),a.id=v,(f?a:l).innerHTML+=s,l.appendChild(a),f||(l.style.background="",d.appendChild(l)),o=n(a,e),f?a.parentNode.removeChild(a):l.parentNode.removeChild(l),!!o},D=function(t){var n=e.matchMedia||e.msMatchMedia;if(n)return n(t).matches;var r;return _("@media "+t+" { #"+v+" { position: absolute; } }",function(t){r=(e.getComputedStyle?getComputedStyle(t,null):t.currentStyle)["position"]=="absolute"}),r},P=function(){function e(e,i){i=i||t.createElement(r[e]||"div"),e="on"+e;var o=e in i;return o||(i.setAttribute||(i=t.createElement("div")),i.setAttribute&&i.removeAttribute&&(i.setAttribute(e,""),o=s(i[e],"function"),s(i[e],"undefined")||(i[e]=n),i.removeAttribute(e))),i=null,o}var r={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return e}(),H={}.hasOwnProperty,B;!s(H,"undefined")&&!s
|
||||
(H.call,"undefined")?B=function(e,t){return H.call(e,t)}:B=function(e,t){return t in e&&s(e.constructor.prototype[t],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(typeof t!="function")throw new TypeError;var n=O.call(arguments,1),r=function(){if(this instanceof r){var i=function(){};i.prototype=t.prototype;var s=new i,o=t.apply(s,n.concat(O.call(arguments)));return Object(o)===o?o:s}return t.apply(e,n.concat(O.call(arguments)))};return r}),C.flexbox=function(){return f("flexWrap")},C.canvas=function(){var e=t.createElement("canvas");return!!e.getContext&&!!e.getContext("2d")},C.canvastext=function(){return!!h.canvas&&!!s(t.createElement("canvas").getContext("2d").fillText,"function")},C.webgl=function(){return!!e.WebGLRenderingContext},C.touch=function(){var n;return"ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch?n=!0:_(["@media (",E.join("touch-enabled),("),v,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(e){
|
||||
n=e.offsetTop===9}),n},C.geolocation=function(){return"geolocation"in navigator},C.postmessage=function(){return!!e.postMessage},C.websqldatabase=function(){return!!e.openDatabase},C.indexedDB=function(){return!!f("indexedDB",e)},C.hashchange=function(){return P("hashchange",e)&&(t.documentMode===n||t.documentMode>7)},C.history=function(){return!!e.history&&!!history.pushState},C.draganddrop=function(){var e=t.createElement("div");return"draggable"in e||"ondragstart"in e&&"ondrop"in e},C.websockets=function(){return"WebSocket"in e||"MozWebSocket"in e},C.rgba=function(){return r("background-color:rgba(150,255,150,.5)"),o(g.backgroundColor,"rgba")},C.hsla=function(){return r("background-color:hsla(120,40%,100%,.5)"),o(g.backgroundColor,"rgba")||o(g.backgroundColor,"hsla")},C.multiplebgs=function(){return r("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(g.background)},C.backgroundsize=function(){return f("backgroundSize")},C.borderimage=function(){return f
|
||||
("borderImage")},C.borderradius=function(){return f("borderRadius")},C.boxshadow=function(){return f("boxShadow")},C.textshadow=function(){return t.createElement("div").style.textShadow===""},C.opacity=function(){return i("opacity:.55"),/^0.55$/.test(g.opacity)},C.cssanimations=function(){return f("animationName")},C.csscolumns=function(){return f("columnCount")},C.cssgradients=function(){var e="background-image:",t="gradient(linear,left top,right bottom,from(#9f9),to(white));",n="linear-gradient(left top,#9f9, white);";return r((e+"-webkit- ".split(" ").join(t+e)+E.join(n+e)).slice(0,-e.length)),o(g.backgroundImage,"gradient")},C.cssreflections=function(){return f("boxReflect")},C.csstransforms=function(){return!!f("transform")},C.csstransforms3d=function(){var e=!!f("perspective");return e&&"webkitPerspective"in d.style&&_("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(t,n){e=t.offsetLeft===9&&t.offsetHeight===3}),e},C.csstransitions=
|
||||
function(){return f("transition")},C.fontface=function(){var e;return _('@font-face {font-family:"font";src:url("https://")}',function(n,r){var i=t.getElementById("smodernizr"),s=i.sheet||i.styleSheet,o=s?s.cssRules&&s.cssRules[0]?s.cssRules[0].cssText:s.cssText||"":"";e=/src/i.test(o)&&o.indexOf(r.split(" ")[0])===0}),e},C.generatedcontent=function(){var e;return _(['#modernizr:after{content:"',b,'";visibility:hidden}'].join(""),function(t){e=t.offsetHeight>=1}),e},C.video=function(){var e=t.createElement("video"),n=!1;try{if(n=!!e.canPlayType)n=new Boolean(n),n.ogg=e.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),n.h264=e.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),n.webm=e.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(r){}return n},C.audio=function(){var e=t.createElement("audio"),n=!1;try{if(n=!!e.canPlayType)n=new Boolean(n),n.ogg=e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),n.mp3=e.canPlayType("audio/mpeg;"
|
||||
).replace(/^no$/,""),n.wav=e.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),n.m4a=(e.canPlayType("audio/x-m4a;")||e.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(r){}return n},C.localstorage=function(){try{return localStorage.setItem(v,v),localStorage.removeItem(v),!0}catch(e){return!1}},C.sessionstorage=function(){try{return sessionStorage.setItem(v,v),sessionStorage.removeItem(v),!0}catch(e){return!1}},C.webworkers=function(){return!!e.Worker},C.applicationcache=function(){return!!e.applicationCache},C.svg=function(){return!!t.createElementNS&&!!t.createElementNS(N.svg,"svg").createSVGRect},C.inlinesvg=function(){var e=t.createElement("div");return e.innerHTML="<svg/>",(e.firstChild&&e.firstChild.namespaceURI)==N.svg},C.smil=function(){return!!t.createElementNS&&/SVGAnimate/.test(w.call(t.createElementNS(N.svg,"animate")))},C.svgclippaths=function(){return!!t.createElementNS&&/SVGClipPath/.test(w.call(t.createElementNS(N.svg,"clipPath")))};for(var j in C)B(C,j)&&(M=j.toLowerCase
|
||||
(),h[M]=C[j](),A.push((h[M]?"":"no-")+M));return h.input||l(),h.addTest=function(e,t){if(typeof e=="object")for(var r in e)B(e,r)&&h.addTest(r,e[r]);else{e=e.toLowerCase();if(h[e]!==n)return h;t=typeof t=="function"?t():t,p&&(d.className+=" "+(t?"":"no-")+e),h[e]=t}return h},r(""),m=y=null,function(e,t){function n(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x<style>"+t+"</style>",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=g.elements;return typeof e=="string"?e.split(" "):e}function i(e){var t=v[e[p]];return t||(t={},d++,e[p]=d,v[d]=t),t}function s(e,n,r){n||(n=t);if(m)return n.createElement(e);r||(r=i(n));var s;return r.cache[e]?s=r.cache[e].cloneNode():c.test(e)?s=(r.cache[e]=r.createElem(e)).cloneNode():s=r.createElem(e),s.canHaveChildren&&!l.test(e)?r.frag.appendChild(s):s}function o(e,n){e||(e=t);if(m)return e.createDocumentFragment();n=n||i(e);var s=n.frag.cloneNode(),o=0,u=r(),a=u.length;for(;o<a;o++)s
|
||||
.createElement(u[o]);return s}function u(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return g.shivMethods?s(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/\w+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(g,t.frag)}function a(e){e||(e=t);var r=i(e);return g.shivCSS&&!h&&!r.hasCSS&&(r.hasCSS=!!n(e,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),m||u(e,r),e}var f=e.html5||{},l=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,c=/^<|^(?:a|b|button|code|div|fieldset|form|h1|h2|h3|h4|h5|h6|i|iframe|img|input|label|li|link|ol|option|p|param|q|script|select|span|strong|style|table|tbody|td|textarea|tfoot|th|thead|tr|ul)$/i,h,p="_html5shiv",d=0,v={},m;(function(
|
||||
){try{var e=t.createElement("a");e.innerHTML="<xyz></xyz>",h="hidden"in e,m=e.childNodes.length==1||function(){t.createElement("a");var e=t.createDocumentFragment();return typeof e.cloneNode=="undefined"||typeof e.createDocumentFragment=="undefined"||typeof e.createElement=="undefined"}()}catch(n){h=!0,m=!0}})();var g={elements:f.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:f.shivCSS!==!1,supportsUnknownElements:m,shivMethods:f.shivMethods!==!1,type:"default",shivDocument:a,createElement:s,createDocumentFragment:o};e.html5=g,a(t)}(this,t),h._version=c,h._prefixes=E,h._domPrefixes=T,h._cssomPrefixes=x,h.mq=D,h.hasEvent=P,h.testProp=function(e){return u([e])},h.testAllProps=f,h.testStyles=_,h.prefixed=function(e,t,n){return t?f(e,t,n):f(e,"pfx")},d.className=d.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(p?" js "+A.join(" "):""),h}(this,this.document),function(
|
||||
e,t,n){function r(e){return d.call(e)=="[object Function]"}function i(e){return typeof e=="string"}function s(){}function o(e){return!e||e=="loaded"||e=="complete"||e=="uninitialized"}function u(){var e=v.shift();m=1,e?e.t?h(function(){(e.t=="c"?k.injectCss:k.injectJs)(e.s,0,e.a,e.x,e.e,1)},0):(e(),u()):m=0}function a(e,n,r,i,s,a,f){function l(t){if(!d&&o(c.readyState)&&(w.r=d=1,!m&&u(),c.onload=c.onreadystatechange=null,t)){e!="img"&&h(function(){b.removeChild(c)},50);for(var r in T[n])T[n].hasOwnProperty(r)&&T[n][r].onload()}}var f=f||k.errorTimeout,c={},d=0,g=0,w={t:r,s:n,e:s,a:a,x:f};T[n]===1&&(g=1,T[n]=[],c=t.createElement(e)),e=="object"?c.data=n:(c.src=n,c.type=e),c.width=c.height="0",c.onerror=c.onload=c.onreadystatechange=function(){l.call(this,g)},v.splice(i,0,w),e!="img"&&(g||T[n]===2?(b.insertBefore(c,y?null:p),h(l,f)):T[n].push(c))}function f(e,t,n,r,s){return m=0,t=t||"j",i(e)?a(t=="c"?E:w,e,t,this.i++,n,r,s):(v.splice(this.i++,0,e),v.length==1&&u()),this}function l(){var e=
|
||||
k;return e.loader={load:f,i:0},e}var c=t.documentElement,h=e.setTimeout,p=t.getElementsByTagName("script")[0],d={}.toString,v=[],m=0,g="MozAppearance"in c.style,y=g&&!!t.createRange().compareNode,b=y?c:p.parentNode,c=e.opera&&d.call(e.opera)=="[object Opera]",c=!!t.attachEvent&&!c,w=g?"object":c?"script":"img",E=c?"script":w,S=Array.isArray||function(e){return d.call(e)=="[object Array]"},x=[],T={},N={timeout:function(e,t){return t.length&&(e.timeout=t[0]),e}},C,k;k=function(e){function t(e){var e=e.split("!"),t=x.length,n=e.pop(),r=e.length,n={url:n,origUrl:n,prefixes:e},i,s,o;for(s=0;s<r;s++)o=e[s].split("="),(i=N[o.shift()])&&(n=i(n,o));for(s=0;s<t;s++)n=x[s](n);return n}function o(e,i,s,o,a){var f=t(e),c=f.autoCallback;f.url.split(".").pop().split("?").shift(),f.bypass||(i&&(i=r(i)?i:i[e]||i[o]||i[e.split("/").pop().split("?")[0]]||u),f.instead?f.instead(e,i,s,o,a):(T[f.url]?f.noexec=!0:T[f.url]=1,s.load(f.url,f.forceCSS||!f.forceJS&&"css"==f.url.split(".").pop().split("?").shift()?"c"
|
||||
:n,f.noexec,f.attrs,f.timeout),(r(i)||r(c))&&s.load(function(){l(),i&&i(f.origUrl,a,o),c&&c(f.origUrl,a,o),T[f.url]=2})))}function a(e,t){function n(e,n){if(e){if(i(e))n||(f=function(){var e=[].slice.call(arguments);l.apply(this,e),c()}),o(e,f,t,0,u);else if(Object(e)===e)for(p in h=function(){var t=0,n;for(n in e)e.hasOwnProperty(n)&&t++;return t}(),e)e.hasOwnProperty(p)&&(!n&&!--h&&(r(f)?f=function(){var e=[].slice.call(arguments);l.apply(this,e),c()}:f[p]=function(e){return function(){var t=[].slice.call(arguments);e&&e.apply(this,t),c()}}(l[p])),o(e[p],f,t,p,u))}else!n&&c()}var u=!!e.test,a=e.load||e.both,f=e.callback||s,l=f,c=e.complete||s,h,p;n(u?e.yep:e.nope,!!a),a&&n(a)}var f,c,h=this.yepnope.loader;if(i(e))o(e,0,h,0);else if(S(e))for(f=0;f<e.length;f++)c=e[f],i(c)?o(c,0,h,0):S(c)?k(c):Object(c)===c&&a(c,h);else Object(e)===e&&a(e,h)},k.addPrefix=function(e,t){N[e]=t},k.addFilter=function(e){x.push(e)},k.errorTimeout=1e4,t.readyState==null&&t.addEventListener&&(t.readyState="loading"
|
||||
,t.addEventListener("DOMContentLoaded",C=function(){t.removeEventListener("DOMContentLoaded",C,0),t.readyState="complete"},0)),e.yepnope=l(),e.yepnope.executeStack=u,e.yepnope.injectJs=function(e,n,r,i,a,f){var l=t.createElement("script"),c,d,i=i||k.errorTimeout;l.src=e;for(d in r)l.setAttribute(d,r[d]);n=f?u:n||s,l.onreadystatechange=l.onload=function(){!c&&o(l.readyState)&&(c=1,n(),l.onload=l.onreadystatechange=null)},h(function(){c||(c=1,n(1))},i),a?l.onload():p.parentNode.insertBefore(l,p)},e.yepnope.injectCss=function(e,n,r,i,o,a){var i=t.createElement("link"),f,n=a?u:n||s;i.href=e,i.rel="stylesheet",i.type="text/css";for(f in r)i.setAttribute(f,r[f]);o||(p.parentNode.insertBefore(i,p),h(n,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))},define("modernizr",function(e){return function(){var t,n;return t||e.Modernizr}}(this)),define("services/dashboard",["angular","underscore","config","modernizr"],function(e,t,n,r){var i=e.module("kibana.services"
|
||||
);i.service("dashboard",["$routeParams","$http","$rootScope","$injector","ejsResource","timer","kbnIndex","alertSrv",function(i,s,o,u,a,f,l,c){var h={title:"",style:"dark",editable:!0,failover:!1,rows:[],services:{},loader:{save_gist:!1,save_elasticsearch:!0,save_local:!0,save_default:!0,save_temp:!0,save_temp_ttl_enable:!0,save_temp_ttl:"30d",load_gist:!0,load_elasticsearch:!0,load_elasticsearch_size:20,load_local:!0,hide:!1},index:{interval:"none",pattern:"_all","default":"INDEX_MISSING"}},p=a(n.elasticsearch),d=/(^\d{5,}$)|(^[a-z0-9]{10,}$)|(gist.github.com(\/*.*)\/[a-z0-9]{5,}\/*$)/,v=this,m,g;this.current=t.clone(h),this.last={},o.$on("$routeChangeSuccess",function(){v.current={},v.indices=[],y()});var y=function(){if(!t.isUndefined(i.kbnType)&&!t.isUndefined(i.kbnId)){var e=i.kbnType,n=i.kbnId;switch(e){case"elasticsearch":v.elasticsearch_load("dashboard",n);break;case"temp":v.elasticsearch_load("temp",n);break;case"file":v.file_load(n);break;case"script":v.script_load(n);break;default:
|
||||
v.file_load("default.json")}}else if(r.localstorage&&!t.isUndefined(window.localStorage.dashboard)&&window.localStorage.dashboard!==""){var s=JSON.parse(window.localStorage.dashboard);v.dash_load(s)}else v.file_load("default.json")};this.refresh=function(){if(v.current.index.interval!=="none")if(m.idsByType("time").length>0){var e=m.timeRange("min");l.indices(e.from,e.to,v.current.index.pattern,v.current.index.interval).then(function(e){if(e.length>0)v.indices=e;else{if(!v.current.failover)return!1;v.indices=[v.current.index.default]}o.$broadcast("refresh")})}else v.current.failover?(v.indices=[v.current.index.default],o.$broadcast("refresh")):c.set("No time filter","Timestamped indices are configured without a failover. Waiting for time filter.","info",5e3);else v.indices=[v.current.index.default],o.$broadcast("refresh")};var b=function(e){return t.defaults(e,h),t.defaults(e.index,h.index),t.defaults(e.loader,h.loader),e};this.dash_load=function(e){return f.cancel_all(),e=b(e),e.index.
|
||||
interval==="none"&&(v.indices=[e.index.default]),v.current=t.clone(e),g=u.get("querySrv"),m=u.get("filterSrv"),g.init(),m.init(),e.index.interval!=="none"&&m.idsByType("time").length===0&&v.refresh(),!0},this.gist_id=function(e){if(v.is_gist(e))return e.match(d)[0].replace(/.*\//,"")},this.is_gist=function(e){return!t.isUndefined(e)&&e!==""&&!t.isNull(e.match(d))?e.match(d).length>0?!0:!1:!1},this.to_file=function(){var t=new Blob([e.toJson(v.current,!0)],{type:"application/json;charset=utf-8"});return window.saveAs(t,v.current.title+"-"+(new Date).getTime()),!0},this.set_default=function(t){return r.localstorage?(window.localStorage.dashboard=e.toJson(t||v.current),!0):!1},this.purge_default=function(){return r.localstorage?(window.localStorage.dashboard="",!0):!1},this.share_link=function(e,t,n){return{location:window.location.href.replace(window.location.hash,""),type:t,id:n,link:window.location.href.replace(window.location.hash,"")+"#dashboard/"+t+"/"+n,title:e}};var w=function(n,r)
|
||||
{var i;t.templateSettings={interpolate:/\{\{(.+?)\}\}/g};var s=t.template(n),o=s({ARGS:r});try{i=e.fromJson(o)}catch(u){i=!1}return i};this.file_load=function(e){return s({url:"app/dashboards/"+e,method:"GET",transformResponse:function(e){return w(e,i)}}).then(function(e){return e?(v.dash_load(b(e.data)),!0):!1},function(){return c.set("Error","Could not load <i>dashboards/"+e+"</i>. Please make sure it exists","error"),!1})},this.elasticsearch_load=function(t,r){return s({url:n.elasticsearch+"/"+n.kibana_index+"/"+t+"/"+r,method:"GET",transformResponse:function(t){return w(e.fromJson(t)._source.dashboard,i)}}).error(function(e,t){return t===0?c.set("Error","Could not contact Elasticsearch at "+n.elasticsearch+". Please ensure that Elasticsearch is reachable from your system.","error"):c.set("Error","Could not find "+r+". If you"+" are using a proxy, ensure it is configured correctly","error"),!1}).success(function(e){v.dash_load(e)})},this.script_load=function(e){return s({url:"dashboards/"+
|
||||
e,method:"GET",transformResponse:function(e){var t=new Function("ARGS",e);return t(i)}}).then(function(e){return e?(v.dash_load(b(e.data)),!0):!1},function(){return c.set("Error","Could not load <i>scripts/"+e+"</i>. Please make sure it exists and returns a valid dashboard","error"),!1})},this.elasticsearch_save=function(r,i,s){var o=t.clone(v.current),u;r==="dashboard"&&(u=o.title=t.isUndefined(i)?v.current.title:i);var a=p.Document(n.kibana_index,r,u).source({user:"guest",group:"guest",title:o.title,dashboard:e.toJson(o)});return a=r==="temp"&&s?a.ttl(s):a,a.doIndex(function(e){return e},function(){return!1})},this.elasticsearch_delete=function(e){return p.Document(n.kibana_index,"dashboard",e).doDelete(function(e){return e},function(){return!1})},this.elasticsearch_list=function(e,t){var r=p.Request().indices(n.kibana_index).types("dashboard");return r.query(p.QueryStringQuery(e||"*")).size(t).doSearch(function(e){return e},function(){return!1})},this.save_gist=function(n,r){var i=t.
|
||||
clone(r||v.current);return i.title=n||v.current.title,s({url:"https://api.github.com/gists",method:"POST",data:{description:i.title,"public":!1,files:{"kibana-dashboard.json":{content:e.toJson(i,!0)}}}}).then(function(e){return e.data.html_url},function(){return!1})},this.gist_list=function(e){return s.jsonp("https://api.github.com/gists/"+e+"?callback=JSON_CALLBACK").then(function(e){var n=[];return t.each(e.data.data.files,function(e){try{var t=JSON.parse(e.content);n.push(t)}catch(r){return!1}}),n},function(){return!1})}}])}),define("services/fields",["angular","underscore","config"],function(e,t,n){var r=e.module("kibana.services");r.service("fields",["dashboard","$rootScope","$http","alertSrv",function(e,r,i,s){var o=this;this.list=["_type"],this.mapping={},r.$watch(function(){return e.indices},function(e){if(!t.isUndefined(e)&&e.length){var n=t.difference(e,t.keys(o.mapping));n.length>0?o.map(n).then(function(e){o.mapping=t.extend(o.mapping,e),o.list=u(o.mapping)}):o.list=u(t.pick
|
||||
(o.mapping,e))}});var u=function(e){var n=[];return t.each(e,function(e){t.each(e,function(e){n=t.union(n,t.keys(e))})}),n};this.map=function(e){var r=i({url:n.elasticsearch+"/"+e.join(",")+"/_mapping",method:"GET"}).error(function(t,r){r===0?s.set("Error","Could not contact Elasticsearch at "+n.elasticsearch+". Please ensure that Elasticsearch is reachable from your system.","error"):s.set("Error","No index found at "+n.elasticsearch+"/"+e.join(",")+"/_mapping. Please create at least one index."+"If you're using a proxy ensure it is configured correctly.","error")});return r.then(function(e){var n={};return t.each(e.data,function(e,r){n[r]={},t.each(e,function(e,t){n[r][t]=a(e)})}),n})};var a=function(e,n){var r=n?n:"",i=n?".":"",s={};for(var o in e){if(e[o].type==="multi_field"){s[o]=e[o].fields[o]||e[o];continue}o==="properties"?t.extend(s,a(e[o],r)):typeof e[o]=="object"?t.extend(s,a(e[o],r+i+o)):s[r]=e}return s}}])}),define("services/filterSrv",["angular","underscore","config"],function(
|
||||
e,t,n){var r=e.module("kibana.services");r.service("filterSrv",["dashboard","ejsResource",function(e,r){e.current.services.filter=e.current.services.filter||{};var i={idQueue:[],list:{},ids:[]},s=r(n.elasticsearch),o=e.current.services.filter,u=this;this.init=function(){t.defaults(e.current.services.filter,i),u.list=e.current.services.filter.list,u.ids=e.current.services.filter.ids,o=e.current.services.filter,t.each(u.getByType("time",!0),function(e){u.list[e.id].from=new Date(e.from),u.list[e.id].to=new Date(e.to)})},this.set=function(e,n){t.defaults(e,{mandate:"must"}),e.active=!0;if(!t.isUndefined(n))return t.isUndefined(u.list[n])?!1:(t.extend(u.list[n],e),n);if(t.isUndefined(e.type))return!1;var r=a(),i={alias:"",id:r};return t.defaults(e,i),u.list[r]=e,u.ids.push(r),r},this.getBoolFilter=function(e){var n=s.BoolFilter().must(s.MatchAllFilter()),r=s.BoolFilter().must(s.MatchAllFilter());return t.each(e,function(e){if(u.list[e].active)switch(u.list[e].mandate){case"mustNot":n=n.mustNot
|
||||
(u.getEjsObj(e));break;case"either":r=r.should(u.getEjsObj(e));break;default:n=n.must(u.getEjsObj(e))}}),n.must(r)},this.getEjsObj=function(e){return u.toEjsObj(u.list[e])},this.toEjsObj=function(e){if(!e.active)return!1;switch(e.type){case"time":return s.RangeFilter(e.field).from(e.from.valueOf()).to(e.to.valueOf());case"range":return s.RangeFilter(e.field).from(e.from).to(e.to);case"querystring":return s.QueryFilter(s.QueryStringQuery(e.query)).cache(!0);case"field":return s.QueryFilter(s.FieldQuery(e.field,e.query)).cache(!0);case"terms":return s.TermsFilter(e.field,e.value);case"exists":return s.ExistsFilter(e.field);case"missing":return s.MissingFilter(e.field);default:return!1}},this.getByType=function(e,n){return t.pick(u.list,u.idsByType(e,n))},this.removeByType=function(e){var n=u.idsByType(e);return t.each(n,function(e){u.remove(e)}),n},this.idsByType=function(e,n){var r=n?{type:e}:{type:e,active:!0};return t.pluck(t.where(u.list,r),"id")},this.timeField=function(){return t.pluck
|
||||
(u.getByType("time"),"field")},this.timeRange=function(e){var n=t.where(u.list,{type:"time",active:!0});if(n.length===0)return!1;switch(e){case"min":return{from:new Date(t.max(t.pluck(n,"from"))),to:new Date(t.min(t.pluck(n,"to")))};case"max":return{from:new Date(t.min(t.pluck(n,"from"))),to:new Date(t.max(t.pluck(n,"to")))};default:return!1}},this.remove=function(n){return t.isUndefined(u.list[n])?!1:(delete u.list[n],u.ids=e.current.services.filter.ids=t.without(u.ids,n),o.idQueue.unshift(n),o.idQueue.sort(function(e,t){return e-t}),!0)};var a=function(){return o.idQueue.length>0?o.idQueue.shift():u.ids.length};u.init()}])}),function(e){function M(e,t){return function(n){return F(e.call(this,n),t)}}function _(e,t){return function(n){return this.lang().ordinal(e.call(this,n),t)}}function D(){}function P(e){B(this,e)}function H(e){var t=e.years||e.year||e.y||0,n=e.months||e.month||e.M||0,r=e.weeks||e.week||e.w||0,i=e.days||e.day||e.d||0,s=e.hours||e.hour||e.h||0,o=e.minutes||e.minute||e
|
||||
.m||0,u=e.seconds||e.second||e.s||0,a=e.milliseconds||e.millisecond||e.ms||0;this._input=e,this._milliseconds=a+u*1e3+o*6e4+s*36e5,this._days=i+r*7,this._months=n+t*12,this._data={},this._bubble()}function B(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function j(e){return e<0?Math.ceil(e):Math.floor(e)}function F(e,t){var n=e+"";while(n.length<t)n="0"+n;return n}function I(e,n,r,i){var s=n._milliseconds,o=n._days,u=n._months,a,f,l;s&&e._d.setTime(+e._d+s*r);if(o||u)a=e.minute(),f=e.hour();o&&e.date(e.date()+o*r),u&&e.month(e.month()+u*r),s&&!i&&t.updateOffset(e);if(o||u)e.minute(a),e.hour(f)}function q(e){return Object.prototype.toString.call(e)==="[object Array]"}function R(e,t){var n=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),i=0,s;for(s=0;s<n;s++)~~e[s]!==~~t[s]&&i++;return i+r}function U(e){return e?C[e]||e.toLowerCase().replace(/(.)s$/,"$1"):e}function z(e,t){return t.abbr=e,s[e]||(s[e]=new D),s[e].set(t),s[e]}function W(e){if(!e)return t.fn._lang;if(!
|
||||
s[e]&&o)try{require("./lang/"+e)}catch(n){return t.fn._lang}return s[e]}function X(e){return e.match(/\[.*\]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function V(e){var t=e.match(f),n,r;for(n=0,r=t.length;n<r;n++)O[t[n]]?t[n]=O[t[n]]:t[n]=X(t[n]);return function(i){var s="";for(n=0;n<r;n++)s+=t[n]instanceof Function?t[n].call(i,e):t[n];return s}}function $(e,t){function r(t){return e.lang().longDateFormat(t)||t}var n=5;while(n--&&l.test(t))t=t.replace(l,r);return k[t]||(k[t]=V(t)),k[t](e)}function J(e,t){switch(e){case"DDDD":return p;case"YYYY":return d;case"YYYYY":return v;case"S":case"SS":case"SSS":case"DDD":return h;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return m;case"a":case"A":return W(t._l)._meridiemParse;case"X":return b;case"Z":case"ZZ":return g;case"T":return y;case"MM":case"DD":case"YY":case"HH":case"hh":case"mm":case"ss":case"M":case"D":case"d":case"H":case"h":case"m":case"s":return c;default:return new RegExp(e.replace("\\",""))}}function K(e){var t=(g.exec(
|
||||
e)||[])[0],n=(t+"").match(x)||["-",0,0],r=+(n[1]*60)+~~n[2];return n[0]==="+"?-r:r}function Q(e,t,n){var r,i=n._a;switch(e){case"M":case"MM":i[1]=t==null?0:~~t-1;break;case"MMM":case"MMMM":r=W(n._l).monthsParse(t),r!=null?i[1]=r:n._isValid=!1;break;case"D":case"DD":case"DDD":case"DDDD":t!=null&&(i[2]=~~t);break;case"YY":i[0]=~~t+(~~t>68?1900:2e3);break;case"YYYY":case"YYYYY":i[0]=~~t;break;case"a":case"A":n._isPm=W(n._l).isPM(t);break;case"H":case"HH":case"h":case"hh":i[3]=~~t;break;case"m":case"mm":i[4]=~~t;break;case"s":case"ss":i[5]=~~t;break;case"S":case"SS":case"SSS":i[6]=~~(("0."+t)*1e3);break;case"X":n._d=new Date(parseFloat(t)*1e3);break;case"Z":case"ZZ":n._useUTC=!0,n._tzm=K(t)}t==null&&(n._isValid=!1)}function G(e){var t,n,r=[];if(e._d)return;for(t=0;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];r[3]+=~~((e._tzm||0)/60),r[4]+=~~((e._tzm||0)%60),n=new Date(0),e._useUTC?(n.setUTCFullYear(r[0],r[1],r[2]),n.setUTCHours(r[3],r[4],r[5],r[6])):(n.setFullYear(r[0],r[1],r[2]),n.
|
||||
setHours(r[3],r[4],r[5],r[6])),e._d=n}function Y(e){var t=e._f.match(f),n=e._i,r,i;e._a=[];for(r=0;r<t.length;r++)i=(J(t[r],e).exec(n)||[])[0],i&&(n=n.slice(n.indexOf(i)+i.length)),O[t[r]]&&Q(t[r],i,e);n&&(e._il=n),e._isPm&&e._a[3]<12&&(e._a[3]+=12),e._isPm===!1&&e._a[3]===12&&(e._a[3]=0),G(e)}function Z(e){var t,n,r,i=99,s,o;for(s=0;s<e._f.length;s++)t=B({},e),t._f=e._f[s],Y(t),n=new P(t),o=R(t._a,n.toArray()),n._il&&(o+=n._il.length),o<i&&(i=o,r=n);B(e,r)}function et(e){var t,n=e._i,r=w.exec(n);if(r){e._f="YYYY-MM-DD"+(r[2]||" ");for(t=0;t<4;t++)if(S[t][1].exec(n)){e._f+=S[t][0];break}g.exec(n)&&(e._f+=" Z"),Y(e)}else e._d=new Date(n)}function tt(t){var n=t._i,r=u.exec(n);n===e?t._d=new Date:r?t._d=new Date(+r[1]):typeof n=="string"?et(t):q(n)?(t._a=n.slice(0),G(t)):t._d=n instanceof Date?new Date(+n):new Date(n)}function nt(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function rt(e,t,n){var i=r(Math.abs(e)/1e3),s=r(i/60),o=r(s/60),u=r(o/24),a=r(u/365),f=i<45&&["s",i]||s===1&&["m"]||
|
||||
s<45&&["mm",s]||o===1&&["h"]||o<22&&["hh",o]||u===1&&["d"]||u<=25&&["dd",u]||u<=45&&["M"]||u<345&&["MM",r(u/30)]||a===1&&["y"]||["yy",a];return f[2]=t,f[3]=e>0,f[4]=n,nt.apply({},f)}function it(e,n,r){var i=r-n,s=r-e.day(),o;return s>i&&(s-=7),s<i-7&&(s+=7),o=t(e).add("d",s),{week:Math.ceil(o.dayOfYear()/7),year:o.year()}}function st(e){var n=e._i,r=e._f;return n===null||n===""?null:(typeof n=="string"&&(e._i=n=W().preparse(n)),t.isMoment(n)?(e=B({},n),e._d=new Date(+n._d)):r?q(r)?Z(e):Y(e):tt(e),new P(e))}function ot(e,n){t.fn[e]=t.fn[e+"s"]=function(e){var r=this._isUTC?"UTC":"";return e!=null?(this._d["set"+r+n](e),t.updateOffset(this),this):this._d["get"+r+n]()}}function ut(e){t.duration.fn[e]=function(){return this._data[e]}}function at(e,n){t.duration.fn["as"+e]=function(){return+this/n}}var t,n="2.1.0",r=Math.round,i,s={},o=typeof module!="undefined"&&module.exports,u=/^\/?Date\((\-?\d+)/i,a=/(\-)?(\d*)?\.?(\d+)\:(\d+)\:(\d+)\.?(\d{3})?/,f=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|SS?S?|X|zz?|ZZ?|.)/g
|
||||
,l=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,c=/\d\d?/,h=/\d{1,3}/,p=/\d{3}/,d=/\d{1,4}/,v=/[+\-]?\d{1,6}/,m=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,g=/Z|[\+\-]\d\d:?\d\d/i,y=/T/i,b=/[\+\-]?\d+(\.\d{1,3})?/,w=/^\s*\d{4}-\d\d-\d\d((T| )(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/,E="YYYY-MM-DDTHH:mm:ssZ",S=[["HH:mm:ss.S",/(T| )\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],x=/([\+\-]|\d\d)/gi,T="Date|Hours|Minutes|Seconds|Milliseconds".split("|"),N={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},C={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",w:"week",M:"month",y:"year"},k={},L="DDD w W M D d".split(" "),A="M D H h m s w W".split(" "),O={M:function(){return this.month()+1},MMM:function(e){return this.lang().monthsShort(this,e)},MMMM:function(e){return this.lang().months(this,e)},D:function(
|
||||
){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(e){return this.lang().weekdaysMin(this,e)},ddd:function(e){return this.lang().weekdaysShort(this,e)},dddd:function(e){return this.lang().weekdays(this,e)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return F(this.year()%100,2)},YYYY:function(){return F(this.year(),4)},YYYYY:function(){return F(this.year(),5)},gg:function(){return F(this.weekYear()%100,2)},gggg:function(){return this.weekYear()},ggggg:function(){return F(this.weekYear(),5)},GG:function(){return F(this.isoWeekYear()%100,2)},GGGG:function(){return this.isoWeekYear()},GGGGG:function(){return F(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){
|
||||
return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return~~(this.milliseconds()/100)},SS:function(){return F(~~(this.milliseconds()/10),2)},SSS:function(){return F(this.milliseconds(),3)},Z:function(){var e=-this.zone(),t="+";return e<0&&(e=-e,t="-"),t+F(~~(e/60),2)+":"+F(~~e%60,2)},ZZ:function(){var e=-this.zone(),t="+";return e<0&&(e=-e,t="-"),t+F(~~(10*e/6),4)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()}};while(L.length)i=L.pop(),O[i+"o"]=_(O[i],i);while(A.length)i=A.pop(),O[i+i]=M(O[i],2);O.DDDD=M(O.DDD,3),D.prototype={set:function(e){var t,n;for(n in e)t=e[n],typeof t=="function"?this[n]=t:this["_"+n]=t},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(e){return this._months[e.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(e){return this
|
||||
._monthsShort[e.month()]},monthsParse:function(e){var n,r,i;this._monthsParse||(this._monthsParse=[]);for(n=0;n<12;n++){this._monthsParse[n]||(r=t([2e3,n]),i="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[n]=new RegExp(i.replace(".",""),"i"));if(this._monthsParse[n].test(e))return n}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(e){return this._weekdays[e.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(e){return this._weekdaysShort[e.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(e){return this._weekdaysMin[e.day()]},weekdaysParse:function(e){var n,r,i;this._weekdaysParse||(this._weekdaysParse=[]);for(n=0;n<7;n++){this._weekdaysParse[n]||(r=t([2e3,1]).day(n),i="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[n]=new RegExp(i.replace(".",""),"i"));if(this._weekdaysParse[n].test(e))return n}},_longDateFormat
|
||||
:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(e){var t=this._longDateFormat[e];return!t&&this._longDateFormat[e.toUpperCase()]&&(t=this._longDateFormat[e.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e]=t),t},isPM:function(e){return(e+"").toLowerCase()[0]==="p"},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(e,t){var n=this._calendar[e];return typeof n=="function"?n.apply(t):n},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(e,t,n,r){var i=this._relativeTime[n];return typeof i=="function"?
|
||||
i(e,t,n,r):i.replace(/%d/i,e)},pastFuture:function(e,t){var n=this._relativeTime[e>0?"future":"past"];return typeof n=="function"?n(t):n.replace(/%s/i,t)},ordinal:function(e){return this._ordinal.replace("%d",e)},_ordinal:"%d",preparse:function(e){return e},postformat:function(e){return e},week:function(e){return it(e,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6}},t=function(e,t,n){return st({_i:e,_f:t,_l:n,_isUTC:!1})},t.utc=function(e,t,n){return st({_useUTC:!0,_isUTC:!0,_l:n,_i:e,_f:t})},t.unix=function(e){return t(e*1e3)},t.duration=function(e,n){var r=t.isDuration(e),i=typeof e=="number",s=r?e._input:i?{}:e,o=a.exec(e),u,f;return i?n?s[n]=e:s.milliseconds=e:o&&(u=o[1]==="-"?-1:1,s={y:0,d:~~o[2]*u,h:~~o[3]*u,m:~~o[4]*u,s:~~o[5]*u,ms:~~o[6]*u}),f=new H(s),r&&e.hasOwnProperty("_lang")&&(f._lang=e._lang),f},t.version=n,t.defaultFormat=E,t.updateOffset=function(){},t.lang=function(e,n){if(!e)return t.fn._lang._abbr;n?z(e,n):s[e]||W(e),t.duration.fn._lang=t.fn._lang=W(e)},t.langData=
|
||||
function(e){return e&&e._lang&&e._lang._abbr&&(e=e._lang._abbr),W(e)},t.isMoment=function(e){return e instanceof P},t.isDuration=function(e){return e instanceof H},t.fn=P.prototype={clone:function(){return t(this)},valueOf:function(){return+this._d+(this._offset||0)*6e4},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){return $(t(this).utc(),"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var e=this;return[e.year(),e.month(),e.date(),e.hours(),e.minutes(),e.seconds(),e.milliseconds()]},isValid:function(){return this._isValid==null&&(this._a?this._isValid=!R(this._a,(this._isUTC?t.utc(this._a):t(this._a)).toArray()):this._isValid=!isNaN(this._d.getTime())),!!this._isValid},utc:function(){return this.zone(0)},local:function(){return this.zone(0),this._isUTC=!1,this},format:function(e){var n=$(this,e||t.defaultFormat);return this
|
||||
.lang().postformat(n)},add:function(e,n){var r;return typeof e=="string"?r=t.duration(+n,e):r=t.duration(e,n),I(this,r,1),this},subtract:function(e,n){var r;return typeof e=="string"?r=t.duration(+n,e):r=t.duration(e,n),I(this,r,-1),this},diff:function(e,n,r){var i=this._isUTC?t(e).zone(this._offset||0):t(e).local(),s=(this.zone()-i.zone())*6e4,o,u;return n=U(n),n==="year"||n==="month"?(o=(this.daysInMonth()+i.daysInMonth())*432e5,u=(this.year()-i.year())*12+(this.month()-i.month()),u+=(this-t(this).startOf("month")-(i-t(i).startOf("month")))/o,u-=(this.zone()-t(this).startOf("month").zone()-(i.zone()-t(i).startOf("month").zone()))*6e4/o,n==="year"&&(u/=12)):(o=this-i,u=n==="second"?o/1e3:n==="minute"?o/6e4:n==="hour"?o/36e5:n==="day"?(o-s)/864e5:n==="week"?(o-s)/6048e5:o),r?u:j(u)},from:function(e,n){return t.duration(this.diff(e)).lang(this.lang()._abbr).humanize(!n)},fromNow:function(e){return this.from(t(),e)},calendar:function(){var e=this.diff(t().startOf("day"),"days",!0),n=e<-6?"sameElse"
|
||||
:e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse";return this.format(this.lang().calendar(n,this))},isLeapYear:function(){var e=this.year();return e%4===0&&e%100!==0||e%400===0},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(e){var t=this._isUTC?this._d.getUTCDay():this._d.getDay();if(e!=null){if(typeof e=="string"){e=this.lang().weekdaysParse(e);if(typeof e!="number")return this}return this.add({d:e-t})}return t},month:function(e){var n=this._isUTC?"UTC":"",r,i;if(e!=null){if(typeof e=="string"){e=this.lang().monthsParse(e);if(typeof e!="number")return this}return r=this.date(),this.date(1),this._d["set"+n+"Month"](e),this.date(Math.min(r,this.daysInMonth())),t.updateOffset(this),this}return this._d["get"+n+"Month"]()},startOf:function(e){e=U(e);switch(e){case"year":this.month(0);case"month":this.date(1);case"week":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":
|
||||
this.seconds(0);case"second":this.milliseconds(0)}return e==="week"&&this.weekday(0),this},endOf:function(e){return this.startOf(e).add(e,1).subtract("ms",1)},isAfter:function(e,n){return n=typeof n!="undefined"?n:"millisecond",+this.clone().startOf(n)>+t(e).startOf(n)},isBefore:function(e,n){return n=typeof n!="undefined"?n:"millisecond",+this.clone().startOf(n)<+t(e).startOf(n)},isSame:function(e,n){return n=typeof n!="undefined"?n:"millisecond",+this.clone().startOf(n)===+t(e).startOf(n)},min:function(e){return e=t.apply(null,arguments),e<this?this:e},max:function(e){return e=t.apply(null,arguments),e>this?this:e},zone:function(e){var n=this._offset||0;return e==null?this._isUTC?n:this._d.getTimezoneOffset():(typeof e=="string"&&(e=K(e)),Math.abs(e)<16&&(e*=60),this._offset=e,this._isUTC=!0,n!==e&&I(this,t.duration(n-e,"m"),1,!0),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},daysInMonth:function(){return t
|
||||
.utc([this.year(),this.month()+1,0]).date()},dayOfYear:function(e){var n=r((t(this).startOf("day")-t(this).startOf("year"))/864e5)+1;return e==null?n:this.add("d",e-n)},weekYear:function(e){var t=it(this,this.lang()._week.dow,this.lang()._week.doy).year;return e==null?t:this.add("y",e-t)},isoWeekYear:function(e){var t=it(this,1,4).year;return e==null?t:this.add("y",e-t)},week:function(e){var t=this.lang().week(this);return e==null?t:this.add("d",(e-t)*7)},isoWeek:function(e){var t=it(this,1,4).week;return e==null?t:this.add("d",(e-t)*7)},weekday:function(e){var t=(this._d.getDay()+7-this.lang()._week.dow)%7;return e==null?t:this.add("d",e-t)},isoWeekday:function(e){return e==null?this.day()||7:this.day(this.day()%7?e:e-7)},lang:function(t){return t===e?this._lang:(this._lang=W(t),this)}};for(i=0;i<T.length;i++)ot(T[i].toLowerCase().replace(/s$/,""),T[i]);ot("year","FullYear"),t.fn.days=t.fn.day,t.fn.months=t.fn.month,t.fn.weeks=t.fn.week,t.fn.isoWeeks=t.fn.isoWeek,t.fn.toJSON=t.fn.toISOString
|
||||
,t.duration.fn=H.prototype={_bubble:function(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,s,o,u;r.milliseconds=e%1e3,i=j(e/1e3),r.seconds=i%60,s=j(i/60),r.minutes=s%60,o=j(s/60),r.hours=o%24,t+=j(o/24),r.days=t%30,n+=j(t/30),r.months=n%12,u=j(n/12),r.years=u},weeks:function(){return j(this.days()/7)},valueOf:function(){return this._milliseconds+this._days*864e5+this._months%12*2592e6+~~(this._months/12)*31536e6},humanize:function(e){var t=+this,n=rt(t,!e,this.lang());return e&&(n=this.lang().pastFuture(t,n)),this.lang().postformat(n)},add:function(e,n){var r=t.duration(e,n);return this._milliseconds+=r._milliseconds,this._days+=r._days,this._months+=r._months,this._bubble(),this},subtract:function(e,n){var r=t.duration(e,n);return this._milliseconds-=r._milliseconds,this._days-=r._days,this._months-=r._months,this._bubble(),this},get:function(e){return e=U(e),this[e.toLowerCase()+"s"]()},as:function(e){return e=U(e),this["as"+e.charAt(0).toUpperCase()+e.slice(1)+"s"
|
||||
]()},lang:t.fn.lang};for(i in N)N.hasOwnProperty(i)&&(at(i,N[i]),ut(i.toLowerCase()));at("Weeks",6048e5),t.duration.fn.asMonths=function(){return(+this-this.years()*31536e6)/2592e6+this.years()*12},t.lang("en",{ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}}),o&&(module.exports=t),typeof ender=="undefined"&&(this.moment=t),typeof define=="function"&&define.amd&&define("moment",[],function(){return t})}.call(this),define("services/kbnIndex",["angular","underscore","config","moment"],function(e,t,n,r){var i=e.module("kibana.services");i.service("kbnIndex",["$http","alertSrv",function(e,i){function s(){var r=e({url:n.elasticsearch+"/_aliases",method:"GET"}).error(function(e,t){t===0?i.set("Error","Could not contact Elasticsearch at "+n.elasticsearch+". Please ensure that Elasticsearch is reachable from your system.","error"):i.set("Error","Could not reach "+n.elasticsearch+"/_aliases. If you"+" are using a proxy, ensure it is configured correctly"
|
||||
,"error")});return r.then(function(e){var n=[];return t.each(e.data,function(e,r){n.push(r),t.each(e.aliases,function(e,t){n.push(t)})}),n})}function o(e){return e=r(e).clone().toDate(),r(new Date(e.getTime()+e.getTimezoneOffset()*6e4))}function u(e,n,i){if(t.contains(["hour","day","week","month","year"],i)){var s;e=r(e).clone(),s=[];while(e.isBefore(n)){s.push(e.clone());switch(i){case"hour":e.add("hours",1);break;case"day":e.add("days",1);break;case"week":e.add("weeks",1);break;case"month":e.add("months",1);break;case"year":e.add("years",1)}}return s.push(r(n).clone()),s}return!1}this.indices=function(e,n,r,i){var a=[];return t.each(u(o(e),o(n),i),function(e){a.push(e.format(r))}),s().then(function(e){var n=t.intersection(a,e);return n.reverse(),n})}}])}),define("services/querySrv",["angular","underscore","config"],function(e,t,n){var r=e.module("kibana.services");r.service("querySrv",["dashboard","ejsResource",function(e,r){e.current.services.query=e.current.services.query||{},t.defaults
|
||||
(e.current.services.query,{idQueue:[],list:{},ids:[]});var i={query:"*",alias:"",pin:!1,type:"lucene"},s=r(n.elasticsearch),o=e.current.services.query;this.colors=["#7EB26D","#EAB839","#6ED0E0","#EF843C","#E24D42","#1F78C1","#BA43A9","#705DA0","#508642","#CCA300","#447EBC","#C15C17","#890F02","#0A437C","#6D1F62","#584477","#B7DBAB","#F4D598","#70DBED","#F9BA8F","#F29191","#82B5D8","#E5A8E2","#AEA2E0","#629E51","#E5AC0E","#64B0C8","#E0752D","#BF1B00","#0A50A1","#962D82","#614D93","#9AC48A","#F2C96D","#65C5DB","#F9934E","#EA6460","#5195CE","#D683CE","#806EB7","#3F6833","#967302","#2F575E","#99440A","#58140C","#052B51","#511749","#3F2B5B","#E0F9D7","#FCEACA","#CFFAFF","#F9E2D2","#FCE2DE","#BADFF4","#F9D9F9","#DEDAF7"];var u=this;this.init=function(){o=e.current.services.query,u.list=e.current.services.query.list,u.ids=e.current.services.query.ids,t.each(u.list,function(e,n){t.defaults(e,i),e.color=f(n)}),u.ids.length===0&&u.set({})},this.set=function(e,n){if(!t.isUndefined(n))return t.isUndefined
|
||||
(u.list[n])?!1:(t.extend(u.list[n],e),n);var r=e.id||a();return e.id=r,e.color=e.color||f(r),t.defaults(e,i),u.list[r]=e,u.ids.push(r),r},this.remove=function(n){return t.isUndefined(u.list[n])?!1:(delete u.list[n],u.ids=e.current.services.query.ids=t.without(u.ids,n),o.idQueue.unshift(n),o.idQueue.sort(function(e,t){return e-t}),!0)},this.getEjsObj=function(e){return u.toEjsObj(u.list[e])},this.toEjsObj=function(e){switch(e.type){case"lucene":return s.QueryStringQuery(e.query||"*");default:return t.isUndefined(e.query)?!1:s.QueryStringQuery(e.query||"*")}},this.findQuery=function(e){return t.findWhere(u.list,{query:e})},this.idsByMode=function(e){switch(e.mode){case"all":return u.ids;case"pinned":return t.pluck(t.where(u.list,{pin:!0}),"id");case"unpinned":return t.difference(u.ids,t.pluck(t.where(u.list,{pin:!0}),"id"));case"selected":return t.intersection(u.ids,e.ids);default:return u.ids}};var a=function(){return o.idQueue.length>0?o.idQueue.shift():u.ids.length},f=function(e){return u
|
||||
.colors[e%u.colors.length]};u.init()}])}),define("services/timer",["angular","underscore"],function(e,t){var n=e.module("kibana.services");n.service("timer",["$timeout",function(e){var n=[];this.register=function(e){return n.push(e),e},this.cancel=function(r){n=t.without(n,r),e.cancel(r)},this.cancel_all=function(){t.each(n,function(t){e.cancel(t)}),n=[]}}])}),define("services/all",["./alertSrv","./dashboard","./fields","./filterSrv","./kbnIndex","./querySrv","./timer"],function(){}),define("controllers/dash",["angular","config","underscore","services/all"],function(e,t,n){var r=e.module("kibana.controllers");r.controller("DashCtrl",["$scope","$route","ejsResource","fields","dashboard","alertSrv",function(e,r,i,s,o,u){e.editor={index:0},e.init=function(){e.config=t,e._=n,e.dashboard=o,e.dashAlerts=u,u.clearAll(),e.fields=s,e.reset_row(),e.ejs=i(t.elasticsearch)},e.add_row=function(e,t){e.rows.push(t)},e.reset_row=function(){e.row={title:"",height:"150px",editable:!0}},e.row_style=function(
|
||||
e){return{"min-height":e.collapse?"5px":e.height}},e.edit_path=function(e){return e?"app/panels/"+e+"/editor.html":!1},e.setEditorTabs=function(t){return e.editorTabs=["General","Panel"],n.isUndefined(t.editorTabs)||(e.editorTabs=n.union(e.editorTabs,n.pluck(t.editorTabs,"title"))),e.editorTabs},e.parse_error=function(e){var t=e.match("nested: (.*?);");return n.isNull(t)?e:t[1]},e.init()}])}),define("controllers/dashLoader",["angular","underscore"],function(e,t){var n=e.module("kibana.controllers");n.controller("dashLoader",["$scope","$http","timer","dashboard","alertSrv",function(e,n,r,i,s){e.loader=i.current.loader,e.init=function(){e.gist_pattern=/(^\d{5,}$)|(^[a-z0-9]{10,}$)|(gist.github.com(\/*.*)\/[a-z0-9]{5,}\/*$)/,e.gist=e.gist||{},e.elasticsearch=e.elasticsearch||{}},e.showDropdown=function(t){var n=e.loader;return t==="load"?n.load_elasticsearch||n.load_gist||n.load_local:t==="save"?n.save_elasticsearch||n.save_gist||n.local_local||n.save_default:t==="share"?n.save_temp:!1},e.
|
||||
set_default=function(){i.set_default()?s.set("Local Default Set",i.current.title+" has been set as your local default","success",5e3):s.set("Incompatible Browser","Sorry, your browser is too old for this feature","error",5e3)},e.purge_default=function(){i.purge_default()?s.set("Local Default Clear","Your local default dashboard has been cleared","success",5e3):s.set("Incompatible Browser","Sorry, your browser is too old for this feature","error",5e3)},e.elasticsearch_save=function(n,r){i.elasticsearch_save(n,e.elasticsearch.title||i.current.title,e.loader.save_temp_ttl_enable?r:!1).then(function(r){t.isUndefined(r._id)?s.set("Save failed","Dashboard could not be saved to Elasticsearch","error",5e3):(s.set("Dashboard Saved",'This dashboard has been saved to Elasticsearch as "'+r._id+'"',"success",5e3),n==="temp"&&(e.share=i.share_link(i.current.title,"temp",r._id)))})},e.elasticsearch_delete=function(n){i.elasticsearch_delete(n).then(function(r){if(!t.isUndefined(r))if(r.found){s.set("Dashboard Deleted"
|
||||
,n+" has been deleted","success",5e3);var i=t.where(e.elasticsearch.dashboards,{_id:n})[0];e.elasticsearch.dashboards=t.without(e.elasticsearch.dashboards,i)}else s.set("Dashboard Not Found","Could not find "+n+" in Elasticsearch","warning",5e3);else s.set("Dashboard Not Deleted","An error occurred deleting the dashboard","error",5e3)})},e.elasticsearch_dblist=function(n){i.elasticsearch_list(n,e.loader.load_elasticsearch_size).then(function(n){t.isUndefined(n.hits)||(e.hits=n.hits.total,e.elasticsearch.dashboards=n.hits.hits)})},e.save_gist=function(){i.save_gist(e.gist.title).then(function(n){t.isUndefined(n)?s.set("Save failed","Gist could not be saved","error",5e3):(e.gist.last=n,s.set("Gist saved",'You will be able to access your exported dashboard file at <a href="'+n+'">'+n+"</a> in a moment","success"))})},e.gist_dblist=function(t){i.gist_list(t).then(function(t){t&&t.length>0?e.gist.files=t:s.set("Gist Failed","Could not retrieve dashboard list from gist","error",5e3)})}}])}),define
|
||||
("controllers/row",["angular","app","underscore"],function(e,t,n){var r=e.module("kibana.controllers");r.controller("RowCtrl",["$scope","$rootScope","$timeout","ejsResource","querySrv",function(e,t,r,i,s){var o={title:"Row",height:"150px",collapse:!1,collapsable:!0,editable:!0,panels:[]};n.defaults(e.row,o),e.init=function(){e.querySrv=s,e.reset_panel()},e.toggle_row=function(t){if(!t.collapsable)return;t.collapse=t.collapse?!1:!0,t.collapse||r(function(){e.$broadcast("render")})},e.close_edit=function(){e.$broadcast("render")},e.add_panel=function(t,n){e.row.panels.push(n)},e.reset_panel=function(t){e.panel={error:!1,span:3,editable:!0,type:t}},e.init()}])}),define("controllers/all",["./dash","./dashLoader","./row"],function(){}),define("directives/addPanel",["angular","app","underscore"],function(e,t,n){e.module("kibana.directives").directive("addPanel",["$compile",function(t){return{restrict:"A",link:function(r,i){r.$watch("panel.type",function(){var s=r.panel.type;r.reset_panel(s),n
|
||||
.isUndefined(r.panel.type)||(r.panel.loadingEditor=!0,r.require(["panels/"+r.panel.type+"/module"],function(){var n='<div ng-controller="'+r.panel.type+'" ng-include="\'app/partials/paneladd.html\'"></div>';i.html(t(e.element(n))(r)),r.panel.loadingEditor=!1}))})}}}])}),define("directives/arrayJoin",["angular","app","underscore"],function(e,t,n){e.module("kibana.directives").directive("arrayJoin",function(){return{restrict:"A",require:"ngModel",link:function(e,t,r,i){function s(e){return(e||"").split(",")}function o(e){return n.isArray(e)?(e||"").join(","):e}i.$parsers.push(s),i.$formatters.push(o)}}})}),define("directives/dashUpload",["angular"],function(e){var t=e.module("kibana.directives");t.directive("dashUpload",["timer","dashboard","alertSrv",function(e,t,n){return{restrict:"A",link:function(e){function r(n){var r=n.target.files,i=function(){return function(n){t.dash_load(JSON.parse(n.target.result)),e.$apply()}};for(var s=0,o;o=r[s];s++){var u=new FileReader;u.onload=i(o),u.readAsText
|
||||
(o)}}window.File&&window.FileReader&&window.FileList&&window.Blob?document.getElementById("dashupload").addEventListener("change",r,!1):n.set("Oops","Sorry, the HTML5 File APIs are not fully supported in this browser.","error")}}}])}),define("directives/kibanaPanel",["angular"],function(e){e.module("kibana.directives").directive("kibanaPanel",["$compile",function(e){var t='<i class="icon-spinner small icon-spin icon-large panel-loading"ng-show="panelMeta.loading == true && !panel.title"></i><span class="editlink panelextra pointer" style="right:15px;top:0px"bs-modal="\'app/partials/paneleditor.html\'" ng-show="panel.editable != false"><span class="small">{{panel.type}}</span> <i class="icon-cog pointer"></i></span><h4 ng-show="panel.title">{{panel.title}}<i class="icon-spinner smaller icon-spin icon-large"ng-show="panelMeta.loading == true && panel.title"></i></h4>';return{restrict:"E",link:function(n,r,i){function s(t){t.appendTo(r),e(r.contents())(n),r.removeClass("ng-cloak")}n.$watch
|
||||
(i.type,function(e){r.addClass("ng-cloak"),n.require(["jquery","text!panels/"+e+"/module.html"],function(r,i){var o=r(i),u=o.filter("ngcontroller, [ng-controller], .ng-controller");u=u.add(o.find("ngcontroller, [ng-controller], .ng-controller")),u.length?(u.first().prepend(t),n.require(["panels/"+e+"/module"],function(){s(o)})):s(o)})})}}}])}),define("directives/ngBlur",["angular"],function(e){e.module("kibana.directives").directive("ngBlur",["$parse",function(e){return function(t,n,r){var i=e(r.ngBlur);n.bind("blur",function(e){t.$apply(function(){i(t,{$event:e})})})}}])}),define("directives/ngModelOnBlur",["angular"],function(e){e.module("kibana.directives").directive("ngModelOnblur",function(){return{restrict:"A",require:"ngModel",link:function(e,t,n,r){if(n.type==="radio"||n.type==="checkbox")return;t.unbind("input").unbind("keydown").unbind("change"),t.bind("blur",function(){e.$apply(function(){r.$setViewValue(t.val())})})}}})}),define("kbn",["jquery","underscore"],function(e,t){var n=
|
||||
{};return n.get_object_fields=function(e){var t=[];e=n.flatten_json(e._source);for(var r in e)t.push(r);return t.sort()},n.get_all_fields=function(e){var n=[];return t.each(e,function(e){n=t.uniq(n.concat(t.keys(e)))}),n=t.without(n,"$$hashKey"),n},n.has_field=function(e,r){var i=n.get_object_fields(e);return t.inArray(i,r)<0?!1:!0},n.get_related_fields=function(e,n){var r=[];t.each(e,function(e){var i=t.keys(e);t.contains(i,n)&&(r=r.concat(i))});var i=t.countBy(t.without(r,n),function(e){return e});return i},n.recurse_field_dots=function(e,t){var r=null,i;return typeof e[t]!="undefined"?r=e[t]:(i=t.match(/(.*?)\.(.*)/))&&typeof e[i[1]]!="undefined"&&(r=typeof e[i[1]][i[2]]!="undefined"?e[i[1]][i[2]]:n.recurse_field_dots(e[i[1]],i[2])),r},n.top_field_values=function(e,n,r){var i=t.pluck(e,n),s={};return t.each(i,function(e){var n=t.isUndefined(e)?"":e.toString();t.has(s,n)?s[n][1]++:s[n]=[e,1]}),t.values(s).sort(function(e,t){return e[1]-t[1]}).reverse().slice(0,r)},n.calculate_interval=
|
||||
function(e,r,i,s){return t.isObject(e)&&(e=e.valueOf()),t.isObject(r)&&(r=r.valueOf()),s===0?n.round_interval((r-e)/i):s},n.round_interval=function(e){switch(!0){case e<=500:return 100;case e<=5e3:return 1e3;case e<=7500:return 5e3;case e<=15e3:return 1e4;case e<=45e3:return 3e4;case e<=18e4:return 6e4;case e<=45e4:return 3e5;case e<=12e5:return 6e5;case e<=27e5:return 18e5;case e<=72e5:return 36e5;case e<=216e5:return 108e5;case e<=864e5:return 432e5;case e<=1728e5:return 864e5;case e<=6048e5:return 864e5;case e<=18144e5:return 6048e5;case e<36288e5:return 2592e6;default:return 31536e6}},n.secondsToHms=function(e){var t=Math.floor(e/31536e3);if(t)return t+"y";var n=Math.floor(e%31536e3/86400);if(n)return n+"d";var r=Math.floor(e%31536e3%86400/3600);if(r)return r+"h";var i=Math.floor(e%31536e3%86400%3600/60);if(i)return i+"m";var s=e%31536e3%86400%3600%60;return s?s+"s":"less then a second"},n.to_percent=function(e,t){return Math.floor(e/t*1e4)/100+"%"},n.addslashes=function(e){return e=
|
||||
e.replace(/\\/g,"\\\\"),e=e.replace(/\'/g,"\\'"),e=e.replace(/\"/g,'\\"'),e=e.replace(/\0/g,"\\0"),e},n.interval_to_seconds=function(e){var t=e.match(/(\d+(?:\.\d+)?)([Mwdhmsy])/);switch(t[2]){case"y":return t[1]*31536e3;case"M":return t[1]*2592e3;case"w":return t[1]*604800;case"d":return t[1]*86400;case"h":return t[1]*3600;case"m":return t[1]*60;case"s":return t[1]}},n.time_ago=function(e){return new Date((new Date).getTime()-n.interval_to_seconds(e)*1e3)},n.flatten_json=function(e,r,i){typeof i=="undefined"&&(i={}),typeof r=="undefined"&&(r="");for(var s in e){var o=e[s],u=r.length===0?s:r+"."+s;if(typeof o=="object")if(t.isArray(o))if(o.length>0&&typeof o[0]=="object"){var a="";for(var f=0,l=o.length;f<l;f++)f>0&&(a+=", "),a+=JSON.stringify(o[f]);i[u]=a}else o.length===1&&t.isNumber(o[0])?i[u]=parseFloat(o[0]):i[u]=typeof o=="undefined"?null:o;else n.flatten_json(o,u,i);else i[u]=typeof o=="undefined"?null:o}return n.sortObj(i)},n.xmlEnt=function(e){if(t.isString(e)){var n=e.replace(/</g
|
||||
,"<").replace(/>/g,">").replace(/\r\n/g,"<br/>").replace(/\r/g,"<br/>").replace(/\n/g,"<br/>").replace(/\t/g," ").replace(/ /g," ").replace(/<del>/g,"<del>").replace(/<\/del>/g,"</del>");return n}return e},n.sortObj=function(e){var t=[],n={},r;for(r in e)t.push(r);t.sort();for(r in t)n[t[r]]=e[t[r]];return n},n.query_color_dot=function(e,t){return'<div class="icon-circle" style="'+["display:inline-block","color:"+e,"font-size:"+t+"px"].join(";")+'"></div>'},n}),define("directives/tip",["angular","kbn"],function(e,t){e.module("kibana.directives").directive("tip",["$compile",function(n){return{restrict:"E",link:function(r,i,s){var o='<i class="icon-'+(s.icon||"question-sign")+'" bs-tooltip="\''+t.addslashes(i.text())+"'\"></i>";i.replaceWith(n(e.element(o))(r))}}}])}),define("directives/all",["./addPanel","./arrayJoin","./dashUpload","./kibanaPanel","./ngBlur","./ngModelOnBlur","./tip"],function(){}),define("filters/all",["angular","jquery"
|
||||
,"underscore"],function(e,t,n){var r=e.module("kibana.filters");r.filter("stringSort",function(){return function(e){return e.sort()}}),r.filter("pinnedQuery",["querySrv",function(e){return function(t,r){var i=n.filter(e.ids,function(t){var i=e.list[t];if(!n.isUndefined(i.pin)&&i.pin===!0&&r===!0)return!0;if((n.isUndefined(i.pin)||i.pin===!1)&&r===!1)return!0});return i}}]),r.filter("slice",function(){return function(e,t,r){if(!n.isUndefined(e))return e.slice(t,r)}}),r.filter("stringify",function(){return function(t){return n.isObject(t)&&!n.isArray(t)?e.toJson(t):t.toString()}}),r.filter("noXml",function(){var e=function(e){return n.isString(e)?e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,"""):e};return function(t){return n.isArray(t)?n.map(t,e):e(t)}}),r.filter("urlLink",function(){var e=/(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gim,t=/(^|[^\/])(www\.[\S]+(\b|$))/gim,r=/(\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,6})/gim
|
||||
,i=function(i){var s,o,u;return n.isString(i)?(n.each(i.match(e),function(){s=i.replace(e,'<a href="$1" target="_blank">$1</a>')}),i=s||i,n.each(i.match(t),function(){o=i.replace(t,'$1<a href="http://$2" target="_blank">$2</a>')}),i=o||i,n.each(i.match(r),function(){u=i.replace(r,'<a href="mailto:$1">$1</a>')}),i=u||i,i):i};return function(e){return n.isArray(e)?n.map(e,i):i(e)}}),r.filter("gistid",function(){var e=/(\d{5,})|([a-z0-9]{10,})|(gist.github.com(\/*.*)\/[a-z0-9]{5,}\/*$)/;return function(t){if(!n.isUndefined(t)){var r=t.match(e);if(!n.isNull(r)&&!n.isUndefined(r))return r[0].replace(/.*\//,"")}}})}),define("app",["angular","jquery","underscore","require","elasticjs","bootstrap","angular-sanitize","angular-strap"],function(e,t,n,r){var i=e.module("kibana",[]),s=[],o={};i.useModule=function(e){return s?s.push(e):n.extend(e,o),e},i.safeApply=function(e,t){switch(e.$$phase){case"$apply":e.$eval(t);break;case"$digest":setTimeout(function(){i.safeApply(e,t)},10);break;default:e.$apply
|
||||
(t)}},i.config(["$routeProvider","$controllerProvider","$compileProvider","$filterProvider","$provide",function(e,t,n,r,i){e.when("/dashboard",{templateUrl:"app/partials/dashboard.html"}).when("/dashboard/:kbnType/:kbnId",{templateUrl:"app/partials/dashboard.html"}).when("/dashboard/:kbnType/:kbnId/:params",{templateUrl:"app/partials/dashboard.html"}).otherwise({redirectTo:"dashboard"}),o.controller=t.register,o.directive=n.directive,o.factory=i.factory,o.service=i.service,o.filter=r.register}]);var u=["elasticjs.service","$strap.directives","ngSanitize","kibana"];return n.each("controllers directives factories services filters".split(" "),function(t){var n="kibana."+t;i.useModule(e.module(n,[])),u.push(n)}),i.panel_helpers={partial:function(e){return"app/partials/"+e+".html"}},require(["controllers/all","directives/all","filters/all"],function(){e.element(document).ready(function(){t("body").attr("ng-controller","DashCtrl"),e.bootstrap(document,u).invoke(["$rootScope",function(e){n.each
|
||||
(s,function(e){n.extend(e,o)}),s=!1,e.requireContext=r,e.require=function(e,t){var r=this;r.requireContext(e,function(){var e=n.toArray(arguments);r.$apply(function(){t.apply(r,e)})})}}])})}),i}),function(e){e.color={},e.color.make=function(t,n,r,i){var s={};return s.r=t||0,s.g=n||0,s.b=r||0,s.a=i!=null?i:1,s.add=function(e,t){for(var n=0;n<e.length;++n)s[e.charAt(n)]+=t;return s.normalize()},s.scale=function(e,t){for(var n=0;n<e.length;++n)s[e.charAt(n)]*=t;return s.normalize()},s.toString=function(){return s.a>=1?"rgb("+[s.r,s.g,s.b].join(",")+")":"rgba("+[s.r,s.g,s.b,s.a].join(",")+")"},s.normalize=function(){function e(e,t,n){return t<e?e:t>n?n:t}return s.r=e(0,parseInt(s.r),255),s.g=e(0,parseInt(s.g),255),s.b=e(0,parseInt(s.b),255),s.a=e(0,s.a,1),s},s.clone=function(){return e.color.make(s.r,s.b,s.g,s.a)},s.normalize()},e.color.extract=function(t,n){var r;do{r=t.css(n).toLowerCase();if(r!=""&&r!="transparent")break;t=t.parent()}while(!e.nodeName(t.get(0),"body"));return r=="rgba(0, 0, 0, 0)"&&
|
||||
(r="transparent"),e.color.parse(r)},e.color.parse=function(n){var r,i=e.color.make;if(r=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(n))return i(parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10));if(r=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(n))return i(parseInt(r[1],10),parseInt(r[2],10),parseInt(r[3],10),parseFloat(r[4]));if(r=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(n))return i(parseFloat(r[1])*2.55,parseFloat(r[2])*2.55,parseFloat(r[3])*2.55);if(r=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(n))return i(parseFloat(r[1])*2.55,parseFloat(r[2])*2.55,parseFloat(r[3])*2.55,parseFloat(r[4]));if(r=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(n))return i(parseInt(r[1],16),parseInt(r[2],16),parseInt(r[3],16));if(r=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/
|
||||
.exec(n))return i(parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16),parseInt(r[3]+r[3],16));var s=e.trim(n).toLowerCase();return s=="transparent"?i(255,255,255,0):(r=t[s]||[0,0,0],i(r[0],r[1],r[2]))};var t={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255
|
||||
,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}}(jQuery),function(e){function n(t,n){var r=n.children("."+t)[0];if(r==null){r=document.createElement("canvas"),r.className=t,e(r).css({direction:"ltr",position:"absolute",left:0,top:0}).appendTo(n);if(!r.getContext){if(!window.G_vmlCanvasManager)throw new Error("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.");r=window.G_vmlCanvasManager.initElement(r)}}this.element=r;var i=this.context=r.getContext("2d"),s=window.devicePixelRatio||1,o=i.webkitBackingStorePixelRatio||i.mozBackingStorePixelRatio||i.msBackingStorePixelRatio||i.oBackingStorePixelRatio||i.backingStorePixelRatio||1;this.pixelRatio=s/o,this.resize(n.width(),n.height()),this.textContainer=null,this.text={},this._textCache={}}function r(t,r,s,o){function E(e,t){t=[w].concat(t);for(var n=0;n<e.length;++n)e[n].apply
|
||||
(this,t)}function S(){var t={Canvas:n};for(var r=0;r<o.length;++r){var i=o[r];i.init(w,t),i.options&&e.extend(!0,a,i.options)}}function x(n){e.extend(!0,a,n),n&&n.colors&&(a.colors=n.colors),a.xaxis.color==null&&(a.xaxis.color=e.color.parse(a.grid.color).scale("a",.22).toString()),a.yaxis.color==null&&(a.yaxis.color=e.color.parse(a.grid.color).scale("a",.22).toString()),a.xaxis.tickColor==null&&(a.xaxis.tickColor=a.grid.tickColor||a.xaxis.color),a.yaxis.tickColor==null&&(a.yaxis.tickColor=a.grid.tickColor||a.yaxis.color),a.grid.borderColor==null&&(a.grid.borderColor=a.grid.color),a.grid.tickColor==null&&(a.grid.tickColor=e.color.parse(a.grid.color).scale("a",.22).toString());var r,i,s,o={style:t.css("font-style"),size:Math.round(.8*(+t.css("font-size").replace("px","")||13)),variant:t.css("font-variant"),weight:t.css("font-weight"),family:t.css("font-family")};o.lineHeight=o.size*1.15,s=a.xaxes.length||1;for(r=0;r<s;++r)i=a.xaxes[r],i&&!i.tickColor&&(i.tickColor=i.color),i=e.extend(!0,{
|
||||
},a.xaxis,i),a.xaxes[r]=i,i.font&&(i.font=e.extend({},o,i.font),i.font.color||(i.font.color=i.color));s=a.yaxes.length||1;for(r=0;r<s;++r)i=a.yaxes[r],i&&!i.tickColor&&(i.tickColor=i.color),i=e.extend(!0,{},a.yaxis,i),a.yaxes[r]=i,i.font&&(i.font=e.extend({},o,i.font),i.font.color||(i.font.color=i.color));a.xaxis.noTicks&&a.xaxis.ticks==null&&(a.xaxis.ticks=a.xaxis.noTicks),a.yaxis.noTicks&&a.yaxis.ticks==null&&(a.yaxis.ticks=a.yaxis.noTicks),a.x2axis&&(a.xaxes[1]=e.extend(!0,{},a.xaxis,a.x2axis),a.xaxes[1].position="top"),a.y2axis&&(a.yaxes[1]=e.extend(!0,{},a.yaxis,a.y2axis),a.yaxes[1].position="right"),a.grid.coloredAreas&&(a.grid.markings=a.grid.coloredAreas),a.grid.coloredAreasColor&&(a.grid.markingsColor=a.grid.coloredAreasColor),a.lines&&e.extend(!0,a.series.lines,a.lines),a.points&&e.extend(!0,a.series.points,a.points),a.bars&&e.extend(!0,a.series.bars,a.bars),a.shadowSize!=null&&(a.series.shadowSize=a.shadowSize),a.highlightColor!=null&&(a.series.highlightColor=a.highlightColor
|
||||
);for(r=0;r<a.xaxes.length;++r)O(d,r+1).options=a.xaxes[r];for(r=0;r<a.yaxes.length;++r)O(v,r+1).options=a.yaxes[r];for(var u in b)a.hooks[u]&&a.hooks[u].length&&(b[u]=b[u].concat(a.hooks[u]));E(b.processOptions,[a])}function T(e){u=N(e),M(),_()}function N(t){var n=[];for(var r=0;r<t.length;++r){var i=e.extend(!0,{},a.series);t[r].data!=null?(i.data=t[r].data,delete t[r].data,e.extend(!0,i,t[r]),t[r].data=i.data):i.data=t[r],n.push(i)}return n}function C(e,t){var n=e[t+"axis"];return typeof n=="object"&&(n=n.n),typeof n!="number"&&(n=1),n}function k(){return e.grep(d.concat(v),function(e){return e})}function L(e){var t={},n,r;for(n=0;n<d.length;++n)r=d[n],r&&r.used&&(t["x"+r.n]=r.c2p(e.left));for(n=0;n<v.length;++n)r=v[n],r&&r.used&&(t["y"+r.n]=r.c2p(e.top));return t.x1!==undefined&&(t.x=t.x1),t.y1!==undefined&&(t.y=t.y1),t}function A(e){var t={},n,r,i;for(n=0;n<d.length;++n){r=d[n];if(r&&r.used){i="x"+r.n,e[i]==null&&r.n==1&&(i="x");if(e[i]!=null){t.left=r.p2c(e[i]);break}}}for(n=0;n<v
|
||||
.length;++n){r=v[n];if(r&&r.used){i="y"+r.n,e[i]==null&&r.n==1&&(i="y");if(e[i]!=null){t.top=r.p2c(e[i]);break}}}return t}function O(t,n){return t[n-1]||(t[n-1]={n:n,direction:t==d?"x":"y",options:e.extend(!0,{},t==d?a.xaxis:a.yaxis)}),t[n-1]}function M(){var t=u.length,n=-1,r;for(r=0;r<u.length;++r){var i=u[r].color;i!=null&&(t--,typeof i=="number"&&i>n&&(n=i))}t<=n&&(t=n+1);var s,o=[],f=a.colors,l=f.length,c=0;for(r=0;r<t;r++)s=e.color.parse(f[r%l]||"#666"),r%l==0&&r&&(c>=0?c<.5?c=-c-.2:c=0:c=-c),o[r]=s.scale("rgb",1+c);var h=0,p;for(r=0;r<u.length;++r){p=u[r],p.color==null?(p.color=o[h].toString(),++h):typeof p.color=="number"&&(p.color=o[p.color].toString());if(p.lines.show==null){var m,g=!0;for(m in p)if(p[m]&&p[m].show){g=!1;break}g&&(p.lines.show=!0)}p.lines.zero==null&&(p.lines.zero=!!p.lines.fill),p.xaxis=O(d,C(p,"x")),p.yaxis=O(v,C(p,"y"))}}function _(){function x(e,t,n){t<e.datamin&&t!=-r&&(e.datamin=t),n>e.datamax&&n!=r&&(e.datamax=n)}var t=Number.POSITIVE_INFINITY,n=Number.
|
||||
NEGATIVE_INFINITY,r=Number.MAX_VALUE,i,s,o,a,f,l,c,h,p,d,v,m,g,y,w,S;e.each(k(),function(e,r){r.datamin=t,r.datamax=n,r.used=!1});for(i=0;i<u.length;++i)l=u[i],l.datapoints={points:[]},E(b.processRawData,[l,l.data,l.datapoints]);for(i=0;i<u.length;++i){l=u[i],w=l.data,S=l.datapoints.format;if(!S){S=[],S.push({x:!0,number:!0,required:!0}),S.push({y:!0,number:!0,required:!0});if(l.bars.show||l.lines.show&&l.lines.fill){var T=!!(l.bars.show&&l.bars.zero||l.lines.show&&l.lines.zero);S.push({y:!0,number:!0,required:!1,defaultValue:0,autoscale:T}),l.bars.horizontal&&(delete S[S.length-1].y,S[S.length-1].x=!0)}l.datapoints.format=S}if(l.datapoints.pointsize!=null)continue;l.datapoints.pointsize=S.length,h=l.datapoints.pointsize,c=l.datapoints.points;var N=l.lines.show&&l.lines.steps;l.xaxis.used=l.yaxis.used=!0;for(s=o=0;s<w.length;++s,o+=h){y=w[s];var C=y==null;if(!C)for(a=0;a<h;++a)m=y[a],g=S[a],g&&(g.number&&m!=null&&(m=+m,isNaN(m)?m=null:m==Infinity?m=r:m==-Infinity&&(m=-r)),m==null&&(g.required&&
|
||||
(C=!0),g.defaultValue!=null&&(m=g.defaultValue))),c[o+a]=m;if(C)for(a=0;a<h;++a)m=c[o+a],m!=null&&(g=S[a],g.autoscale&&(g.x&&x(l.xaxis,m,m),g.y&&x(l.yaxis,m,m))),c[o+a]=null;else if(N&&o>0&&c[o-h]!=null&&c[o-h]!=c[o]&&c[o-h+1]!=c[o+1]){for(a=0;a<h;++a)c[o+h+a]=c[o+a];c[o+1]=c[o-h+1],o+=h}}}for(i=0;i<u.length;++i)l=u[i],E(b.processDatapoints,[l,l.datapoints]);for(i=0;i<u.length;++i){l=u[i],c=l.datapoints.points,h=l.datapoints.pointsize,S=l.datapoints.format;var L=t,A=t,O=n,M=n;for(s=0;s<c.length;s+=h){if(c[s]==null)continue;for(a=0;a<h;++a){m=c[s+a],g=S[a];if(!g||g.autoscale===!1||m==r||m==-r)continue;g.x&&(m<L&&(L=m),m>O&&(O=m)),g.y&&(m<A&&(A=m),m>M&&(M=m))}}if(l.bars.show){var _;switch(l.bars.align){case"left":_=0;break;case"right":_=-l.bars.barWidth;break;case"center":_=-l.bars.barWidth/2;break;default:throw new Error("Invalid bar alignment: "+l.bars.align)}l.bars.horizontal?(A+=_,M+=_+l.bars.barWidth):(L+=_,O+=_+l.bars.barWidth)}x(l.xaxis,L,O),x(l.yaxis,A,M)}e.each(k(),function(e,r){
|
||||
r.datamin==t&&(r.datamin=null),r.datamax==n&&(r.datamax=null)})}function D(){t.css("padding",0).children(":not(.flot-base,.flot-overlay)").remove(),t.css("position")=="static"&&t.css("position","relative"),f=new n("flot-base",t),l=new n("flot-overlay",t),h=f.context,p=l.context,c=e(l.element).unbind();var r=t.data("plot");r&&(r.shutdown(),l.clear()),t.data("plot",w)}function P(){a.grid.hoverable&&(c.mousemove(at),c.bind("mouseleave",ft)),a.grid.clickable&&c.click(lt),E(b.bindEvents,[c])}function H(){ot&&clearTimeout(ot),c.unbind("mousemove",at),c.unbind("mouseleave",ft),c.unbind("click",lt),E(b.shutdown,[c])}function B(e){function t(e){return e}var n,r,i=e.options.transform||t,s=e.options.inverseTransform;e.direction=="x"?(n=e.scale=g/Math.abs(i(e.max)-i(e.min)),r=Math.min(i(e.max),i(e.min))):(n=e.scale=y/Math.abs(i(e.max)-i(e.min)),n=-n,r=Math.max(i(e.max),i(e.min))),i==t?e.p2c=function(e){return(e-r)*n}:e.p2c=function(e){return(i(e)-r)*n},s?e.c2p=function(e){return s(r+e/n)}:e.c2p=function(
|
||||
e){return r+e/n}}function j(e){var t=e.options,n=e.ticks||[],r=t.labelWidth||0,i=t.labelHeight||0,s=r||e.direction=="x"?Math.floor(f.width/(n.length||1)):null;legacyStyles=e.direction+"Axis "+e.direction+e.n+"Axis",layer="flot-"+e.direction+"-axis flot-"+e.direction+e.n+"-axis "+legacyStyles,font=t.font||"flot-tick-label tickLabel";for(var o=0;o<n.length;++o){var u=n[o];if(!u.label)continue;var a=f.getTextInfo(layer,u.label,font,null,s);r=Math.max(r,a.width),i=Math.max(i,a.height)}e.labelWidth=t.labelWidth||r,e.labelHeight=t.labelHeight||i}function F(t){var n=t.labelWidth,r=t.labelHeight,i=t.options.position,s=t.options.tickLength,o=a.grid.axisMargin,u=a.grid.labelMargin,l=t.direction=="x"?d:v,c,h,p=e.grep(l,function(e){return e&&e.options.position==i&&e.reserveSpace});e.inArray(t,p)==p.length-1&&(o=0);if(s==null){var g=e.grep(l,function(e){return e&&e.reserveSpace});h=e.inArray(t,g)==0,h?s="full":s=5}isNaN(+s)||(u+=+s),t.direction=="x"?(r+=u,i=="bottom"?(m.bottom+=r+o,t.box={top:f.height-
|
||||
m.bottom,height:r}):(t.box={top:m.top+o,height:r},m.top+=r+o)):(n+=u,i=="left"?(t.box={left:m.left+o,width:n},m.left+=n+o):(m.right+=n+o,t.box={left:f.width-m.right,width:n})),t.position=i,t.tickLength=s,t.box.padding=u,t.innermost=h}function I(e){e.direction=="x"?(e.box.left=m.left-e.labelWidth/2,e.box.width=f.width-m.left-m.right+e.labelWidth):(e.box.top=m.top-e.labelHeight/2,e.box.height=f.height-m.bottom-m.top+e.labelHeight)}function q(){var t=a.grid.minBorderMargin,n={x:0,y:0},r,i;if(t==null){t=0;for(r=0;r<u.length;++r)t=Math.max(t,2*(u[r].points.radius+u[r].points.lineWidth/2))}n.x=n.y=Math.ceil(t),e.each(k(),function(e,t){var r=t.direction;t.reserveSpace&&(n[r]=Math.ceil(Math.max(n[r],(r=="x"?t.labelWidth:t.labelHeight)/2)))}),m.left=Math.max(n.x,m.left),m.right=Math.max(n.x,m.right),m.top=Math.max(n.y,m.top),m.bottom=Math.max(n.y,m.bottom)}function R(){var t,n=k(),r=a.grid.show;for(var i in m){var s=a.grid.margin||0;m[i]=typeof s=="number"?s:s[i]||0}E(b.processOffset,[m]);for(var i in
|
||||
m)typeof a.grid.borderWidth=="object"?m[i]+=r?a.grid.borderWidth[i]:0:m[i]+=r?a.grid.borderWidth:0;e.each(n,function(e,t){t.show=t.options.show,t.show==null&&(t.show=t.used),t.reserveSpace=t.show||t.options.reserveSpace,U(t)});if(r){var o=e.grep(n,function(e){return e.reserveSpace});e.each(o,function(e,t){z(t),W(t),X(t,t.ticks),j(t)});for(t=o.length-1;t>=0;--t)F(o[t]);q(),e.each(o,function(e,t){I(t)})}g=f.width-m.left-m.right,y=f.height-m.bottom-m.top,e.each(n,function(e,t){B(t)}),r&&G(),it()}function U(e){var t=e.options,n=+(t.min!=null?t.min:e.datamin),r=+(t.max!=null?t.max:e.datamax),i=r-n;if(i==0){var s=r==0?1:.01;t.min==null&&(n-=s);if(t.max==null||t.min!=null)r+=s}else{var o=t.autoscaleMargin;o!=null&&(t.min==null&&(n-=i*o,n<0&&e.datamin!=null&&e.datamin>=0&&(n=0)),t.max==null&&(r+=i*o,r>0&&e.datamax!=null&&e.datamax<=0&&(r=0)))}e.min=n,e.max=r}function z(t){var n=t.options,r;typeof n.ticks=="number"&&n.ticks>0?r=n.ticks:r=.3*Math.sqrt(t.direction=="x"?f.width:f.height);var s=(t.max-
|
||||
t.min)/r,o=-Math.floor(Math.log(s)/Math.LN10),u=n.tickDecimals;u!=null&&o>u&&(o=u);var a=Math.pow(10,-o),l=s/a,c;l<1.5?c=1:l<3?(c=2,l>2.25&&(u==null||o+1<=u)&&(c=2.5,++o)):l<7.5?c=5:c=10,c*=a,n.minTickSize!=null&&c<n.minTickSize&&(c=n.minTickSize),t.delta=s,t.tickDecimals=Math.max(0,u!=null?u:o),t.tickSize=n.tickSize||c;if(n.mode=="time"&&!t.tickGenerator)throw new Error("Time mode requires the flot.time plugin.");t.tickGenerator||(t.tickGenerator=function(e){var t=[],n=i(e.min,e.tickSize),r=0,s=Number.NaN,o;do o=s,s=n+r*e.tickSize,t.push(s),++r;while(s<e.max&&s!=o);return t},t.tickFormatter=function(e,t){var n=t.tickDecimals?Math.pow(10,t.tickDecimals):1,r=""+Math.round(e*n)/n;if(t.tickDecimals!=null){var i=r.indexOf("."),s=i==-1?0:r.length-i-1;if(s<t.tickDecimals)return(s?r:r+".")+(""+n).substr(1,t.tickDecimals-s)}return r}),e.isFunction(n.tickFormatter)&&(t.tickFormatter=function(e,t){return""+n.tickFormatter(e,t)});if(n.alignTicksWithAxis!=null){var h=(t.direction=="x"?d:v)[n.alignTicksWithAxis-1
|
||||
];if(h&&h.used&&h!=t){var p=t.tickGenerator(t);p.length>0&&(n.min==null&&(t.min=Math.min(t.min,p[0])),n.max==null&&p.length>1&&(t.max=Math.max(t.max,p[p.length-1]))),t.tickGenerator=function(e){var t=[],n,r;for(r=0;r<h.ticks.length;++r)n=(h.ticks[r].v-h.min)/(h.max-h.min),n=e.min+n*(e.max-e.min),t.push(n);return t};if(!t.mode&&n.tickDecimals==null){var m=Math.max(0,-Math.floor(Math.log(t.delta)/Math.LN10)+1),g=t.tickGenerator(t);g.length>1&&/\..*0$/.test((g[1]-g[0]).toFixed(m))||(t.tickDecimals=m)}}}}function W(t){var n=t.options.ticks,r=[];n==null||typeof n=="number"&&n>0?r=t.tickGenerator(t):n&&(e.isFunction(n)?r=n(t):r=n);var i,s;t.ticks=[];for(i=0;i<r.length;++i){var o=null,u=r[i];typeof u=="object"?(s=+u[0],u.length>1&&(o=u[1])):s=+u,o==null&&(o=t.tickFormatter(s,t)),isNaN(s)||t.ticks.push({v:s,label:o})}}function X(e,t){e.options.autoscaleMargin&&t.length>0&&(e.options.min==null&&(e.min=Math.min(e.min,t[0].v)),e.options.max==null&&t.length>1&&(e.max=Math.max(e.max,t[t.length-1].v)
|
||||
))}function V(){f.clear(),E(b.drawBackground,[h]);var e=a.grid;e.show&&e.backgroundColor&&K(),e.show&&!e.aboveData&&Q();for(var t=0;t<u.length;++t)E(b.drawSeries,[h,u[t]]),Y(u[t]);E(b.draw,[h]),e.show&&e.aboveData&&Q(),f.render(),ht()}function J(e,t){var n,r,i,s,o=k();for(var u=0;u<o.length;++u){n=o[u];if(n.direction==t){s=t+n.n+"axis",!e[s]&&n.n==1&&(s=t+"axis");if(e[s]){r=e[s].from,i=e[s].to;break}}}e[s]||(n=t=="x"?d[0]:v[0],r=e[t+"1"],i=e[t+"2"]);if(r!=null&&i!=null&&r>i){var a=r;r=i,i=a}return{from:r,to:i,axis:n}}function K(){h.save(),h.translate(m.left,m.top),h.fillStyle=bt(a.grid.backgroundColor,y,0,"rgba(255, 255, 255, 0)"),h.fillRect(0,0,g,y),h.restore()}function Q(){var t,n,r,i;h.save(),h.translate(m.left,m.top);var s=a.grid.markings;if(s){e.isFunction(s)&&(n=w.getAxes(),n.xmin=n.xaxis.min,n.xmax=n.xaxis.max,n.ymin=n.yaxis.min,n.ymax=n.yaxis.max,s=s(n));for(t=0;t<s.length;++t){var o=s[t],u=J(o,"x"),f=J(o,"y");u.from==null&&(u.from=u.axis.min),u.to==null&&(u.to=u.axis.max),f.from==
|
||||
null&&(f.from=f.axis.min),f.to==null&&(f.to=f.axis.max);if(u.to<u.axis.min||u.from>u.axis.max||f.to<f.axis.min||f.from>f.axis.max)continue;u.from=Math.max(u.from,u.axis.min),u.to=Math.min(u.to,u.axis.max),f.from=Math.max(f.from,f.axis.min),f.to=Math.min(f.to,f.axis.max);if(u.from==u.to&&f.from==f.to)continue;u.from=u.axis.p2c(u.from),u.to=u.axis.p2c(u.to),f.from=f.axis.p2c(f.from),f.to=f.axis.p2c(f.to),u.from==u.to||f.from==f.to?(h.beginPath(),h.strokeStyle=o.color||a.grid.markingsColor,h.lineWidth=o.lineWidth||a.grid.markingsLineWidth,h.moveTo(u.from,f.from),h.lineTo(u.to,f.to),h.stroke()):(h.fillStyle=o.color||a.grid.markingsColor,h.fillRect(u.from,f.to,u.to-u.from,f.from-f.to))}}n=k(),r=a.grid.borderWidth;for(var l=0;l<n.length;++l){var c=n[l],p=c.box,d=c.tickLength,v,b,E,S;if(!c.show||c.ticks.length==0)continue;h.lineWidth=1,c.direction=="x"?(v=0,d=="full"?b=c.position=="top"?0:y:b=p.top-m.top+(c.position=="top"?p.height:0)):(b=0,d=="full"?v=c.position=="left"?0:g:v=p.left-m.left+(c
|
||||
.position=="left"?p.width:0)),c.innermost||(h.strokeStyle=c.options.color,h.beginPath(),E=S=0,c.direction=="x"?E=g+1:S=y+1,h.lineWidth==1&&(c.direction=="x"?b=Math.floor(b)+.5:v=Math.floor(v)+.5),h.moveTo(v,b),h.lineTo(v+E,b+S),h.stroke()),h.strokeStyle=c.options.tickColor,h.beginPath();for(t=0;t<c.ticks.length;++t){var x=c.ticks[t].v;E=S=0;if(isNaN(x)||x<c.min||x>c.max||d=="full"&&(typeof r=="object"&&r[c.position]>0||r>0)&&(x==c.min||x==c.max))continue;c.direction=="x"?(v=c.p2c(x),S=d=="full"?-y:d,c.position=="top"&&(S=-S)):(b=c.p2c(x),E=d=="full"?-g:d,c.position=="left"&&(E=-E)),h.lineWidth==1&&(c.direction=="x"?v=Math.floor(v)+.5:b=Math.floor(b)+.5),h.moveTo(v,b),h.lineTo(v+E,b+S)}h.stroke()}r&&(i=a.grid.borderColor,typeof r=="object"||typeof i=="object"?(typeof r!="object"&&(r={top:r,right:r,bottom:r,left:r}),typeof i!="object"&&(i={top:i,right:i,bottom:i,left:i}),r.top>0&&(h.strokeStyle=i.top,h.lineWidth=r.top,h.beginPath(),h.moveTo(0-r.left,0-r.top/2),h.lineTo(g,0-r.top/2),h.stroke
|
||||
()),r.right>0&&(h.strokeStyle=i.right,h.lineWidth=r.right,h.beginPath(),h.moveTo(g+r.right/2,0-r.top),h.lineTo(g+r.right/2,y),h.stroke()),r.bottom>0&&(h.strokeStyle=i.bottom,h.lineWidth=r.bottom,h.beginPath(),h.moveTo(g+r.right,y+r.bottom/2),h.lineTo(0,y+r.bottom/2),h.stroke()),r.left>0&&(h.strokeStyle=i.left,h.lineWidth=r.left,h.beginPath(),h.moveTo(0-r.left/2,y+r.bottom),h.lineTo(0-r.left/2,0),h.stroke())):(h.lineWidth=r,h.strokeStyle=a.grid.borderColor,h.strokeRect(-r/2,-r/2,g+r,y+r))),h.restore()}function G(){e.each(k(),function(e,t){if(!t.show||t.ticks.length==0)return;var n=t.box,r=t.direction+"Axis "+t.direction+t.n+"Axis",i="flot-"+t.direction+"-axis flot-"+t.direction+t.n+"-axis "+r,s=t.options.font||"flot-tick-label tickLabel",o,u,a,l,c;f.removeText(i);for(var h=0;h<t.ticks.length;++h){o=t.ticks[h];if(!o.label||o.v<t.min||o.v>t.max)continue;t.direction=="x"?(l="center",u=m.left+t.p2c(o.v),t.position=="bottom"?a=n.top+n.padding:(a=n.top+n.height-n.padding,c="bottom")):(c="middle"
|
||||
,a=m.top+t.p2c(o.v),t.position=="left"?(u=n.left+n.width-n.padding,l="right"):u=n.left+n.padding),f.addText(i,u,a,o.label,s,null,null,l,c)}})}function Y(e){e.lines.show&&Z(e),e.bars.show&&nt(e),e.points.show&&et(e)}function Z(e){function t(e,t,n,r,i){var s=e.points,o=e.pointsize,u=null,a=null;h.beginPath();for(var f=o;f<s.length;f+=o){var l=s[f-o],c=s[f-o+1],p=s[f],d=s[f+1];if(l==null||p==null)continue;if(c<=d&&c<i.min){if(d<i.min)continue;l=(i.min-c)/(d-c)*(p-l)+l,c=i.min}else if(d<=c&&d<i.min){if(c<i.min)continue;p=(i.min-c)/(d-c)*(p-l)+l,d=i.min}if(c>=d&&c>i.max){if(d>i.max)continue;l=(i.max-c)/(d-c)*(p-l)+l,c=i.max}else if(d>=c&&d>i.max){if(c>i.max)continue;p=(i.max-c)/(d-c)*(p-l)+l,d=i.max}if(l<=p&&l<r.min){if(p<r.min)continue;c=(r.min-l)/(p-l)*(d-c)+c,l=r.min}else if(p<=l&&p<r.min){if(l<r.min)continue;d=(r.min-l)/(p-l)*(d-c)+c,p=r.min}if(l>=p&&l>r.max){if(p>r.max)continue;c=(r.max-l)/(p-l)*(d-c)+c,l=r.max}else if(p>=l&&p>r.max){if(l>r.max)continue;d=(r.max-l)/(p-l)*(d-c)+c,p=r.max
|
||||
}(l!=u||c!=a)&&h.moveTo(r.p2c(l)+t,i.p2c(c)+n),u=p,a=d,h.lineTo(r.p2c(p)+t,i.p2c(d)+n)}h.stroke()}function n(e,t,n){var r=e.points,i=e.pointsize,s=Math.min(Math.max(0,n.min),n.max),o=0,u,a=!1,f=1,l=0,c=0;for(;;){if(i>0&&o>r.length+i)break;o+=i;var p=r[o-i],d=r[o-i+f],v=r[o],m=r[o+f];if(a){if(i>0&&p!=null&&v==null){c=o,i=-i,f=2;continue}if(i<0&&o==l+i){h.fill(),a=!1,i=-i,f=1,o=l=c+i;continue}}if(p==null||v==null)continue;if(p<=v&&p<t.min){if(v<t.min)continue;d=(t.min-p)/(v-p)*(m-d)+d,p=t.min}else if(v<=p&&v<t.min){if(p<t.min)continue;m=(t.min-p)/(v-p)*(m-d)+d,v=t.min}if(p>=v&&p>t.max){if(v>t.max)continue;d=(t.max-p)/(v-p)*(m-d)+d,p=t.max}else if(v>=p&&v>t.max){if(p>t.max)continue;m=(t.max-p)/(v-p)*(m-d)+d,v=t.max}a||(h.beginPath(),h.moveTo(t.p2c(p),n.p2c(s)),a=!0);if(d>=n.max&&m>=n.max){h.lineTo(t.p2c(p),n.p2c(n.max)),h.lineTo(t.p2c(v),n.p2c(n.max));continue}if(d<=n.min&&m<=n.min){h.lineTo(t.p2c(p),n.p2c(n.min)),h.lineTo(t.p2c(v),n.p2c(n.min));continue}var g=p,y=v;d<=m&&d<n.min&&m>=n.min?
|
||||
(p=(n.min-d)/(m-d)*(v-p)+p,d=n.min):m<=d&&m<n.min&&d>=n.min&&(v=(n.min-d)/(m-d)*(v-p)+p,m=n.min),d>=m&&d>n.max&&m<=n.max?(p=(n.max-d)/(m-d)*(v-p)+p,d=n.max):m>=d&&m>n.max&&d<=n.max&&(v=(n.max-d)/(m-d)*(v-p)+p,m=n.max),p!=g&&h.lineTo(t.p2c(g),n.p2c(d)),h.lineTo(t.p2c(p),n.p2c(d)),h.lineTo(t.p2c(v),n.p2c(m)),v!=y&&(h.lineTo(t.p2c(v),n.p2c(m)),h.lineTo(t.p2c(y),n.p2c(m)))}}h.save(),h.translate(m.left,m.top),h.lineJoin="round";var r=e.lines.lineWidth,i=e.shadowSize;if(r>0&&i>0){h.lineWidth=i,h.strokeStyle="rgba(0,0,0,0.1)";var s=Math.PI/18;t(e.datapoints,Math.sin(s)*(r/2+i/2),Math.cos(s)*(r/2+i/2),e.xaxis,e.yaxis),h.lineWidth=i/2,t(e.datapoints,Math.sin(s)*(r/2+i/4),Math.cos(s)*(r/2+i/4),e.xaxis,e.yaxis)}h.lineWidth=r,h.strokeStyle=e.color;var o=rt(e.lines,e.color,0,y);o&&(h.fillStyle=o,n(e.datapoints,e.xaxis,e.yaxis)),r>0&&t(e.datapoints,0,0,e.xaxis,e.yaxis),h.restore()}function et(e){function t(e,t,n,r,i,s,o,u){var a=e.points,f=e.pointsize;for(var l=0;l<a.length;l+=f){var c=a[l],p=a[l+1];
|
||||
if(c==null||c<s.min||c>s.max||p<o.min||p>o.max)continue;h.beginPath(),c=s.p2c(c),p=o.p2c(p)+r,u=="circle"?h.arc(c,p,t,0,i?Math.PI:Math.PI*2,!1):u(h,c,p,t,i),h.closePath(),n&&(h.fillStyle=n,h.fill()),h.stroke()}}h.save(),h.translate(m.left,m.top);var n=e.points.lineWidth,r=e.shadowSize,i=e.points.radius,s=e.points.symbol;n==0&&(n=1e-4);if(n>0&&r>0){var o=r/2;h.lineWidth=o,h.strokeStyle="rgba(0,0,0,0.1)",t(e.datapoints,i,null,o+o/2,!0,e.xaxis,e.yaxis,s),h.strokeStyle="rgba(0,0,0,0.2)",t(e.datapoints,i,null,o/2,!0,e.xaxis,e.yaxis,s)}h.lineWidth=n,h.strokeStyle=e.color,t(e.datapoints,i,rt(e.points,e.color),0,!1,e.xaxis,e.yaxis,s),h.restore()}function tt(e,t,n,r,i,s,o,u,a,f,l,c){var h,p,d,v,m,g,y,b,w;l?(b=g=y=!0,m=!1,h=n,p=e,v=t+r,d=t+i,p<h&&(w=p,p=h,h=w,m=!0,g=!1)):(m=g=y=!0,b=!1,h=e+r,p=e+i,d=n,v=t,v<d&&(w=v,v=d,d=w,b=!0,y=!1));if(p<u.min||h>u.max||v<a.min||d>a.max)return;h<u.min&&(h=u.min,m=!1),p>u.max&&(p=u.max,g=!1),d<a.min&&(d=a.min,b=!1),v>a.max&&(v=a.max,y=!1),h=u.p2c(h),d=a.p2c(d),p=
|
||||
u.p2c(p),v=a.p2c(v),o&&(f.beginPath(),f.moveTo(h,d),f.lineTo(h,v),f.lineTo(p,v),f.lineTo(p,d),f.fillStyle=o(d,v),f.fill()),c>0&&(m||g||y||b)&&(f.beginPath(),f.moveTo(h,d+s),m?f.lineTo(h,v+s):f.moveTo(h,v+s),y?f.lineTo(p,v+s):f.moveTo(p,v+s),g?f.lineTo(p,d+s):f.moveTo(p,d+s),b?f.lineTo(h,d+s):f.moveTo(h,d+s),f.stroke())}function nt(e){function t(t,n,r,i,s,o,u){var a=t.points,f=t.pointsize;for(var l=0;l<a.length;l+=f){if(a[l]==null)continue;tt(a[l],a[l+1],a[l+2],n,r,i,s,o,u,h,e.bars.horizontal,e.bars.lineWidth)}}h.save(),h.translate(m.left,m.top),h.lineWidth=e.bars.lineWidth,h.strokeStyle=e.color;var n;switch(e.bars.align){case"left":n=0;break;case"right":n=-e.bars.barWidth;break;case"center":n=-e.bars.barWidth/2;break;default:throw new Error("Invalid bar alignment: "+e.bars.align)}var r=e.bars.fill?function(t,n){return rt(e.bars,e.color,t,n)}:null;t(e.datapoints,n,n+e.bars.barWidth,0,r,e.xaxis,e.yaxis),h.restore()}function rt(t,n,r,i){var s=t.fill;if(!s)return null;if(t.fillColor)return bt
|
||||
(t.fillColor,r,i,n);var o=e.color.parse(n);return o.a=typeof s=="number"?s:.4,o.normalize(),o.toString()}function it(){t.find(".legend").remove();if(!a.legend.show)return;var n=[],r=[],i=!1,s=a.legend.labelFormatter,o,f;for(var l=0;l<u.length;++l)o=u[l],o.label&&(f=s?s(o.label,o):o.label,f&&r.push({label:f,color:o.color}));if(a.legend.sorted)if(e.isFunction(a.legend.sorted))r.sort(a.legend.sorted);else if(a.legend.sorted=="reverse")r.reverse();else{var c=a.legend.sorted!="descending";r.sort(function(e,t){return e.label==t.label?0:e.label<t.label!=c?1:-1})}for(var l=0;l<r.length;++l){var h=r[l];l%a.legend.noColumns==0&&(i&&n.push("</tr>"),n.push("<tr>"),i=!0),n.push('<td class="legendColorBox"><div style="border:1px solid '+a.legend.labelBoxBorderColor+';padding:1px"><div style="width:4px;height:0;border:5px solid '+h.color+';overflow:hidden"></div></div></td>'+'<td class="legendLabel">'+h.label+"</td>")}i&&n.push("</tr>");if(n.length==0)return;var p='<table style="font-size:smaller;color:'+
|
||||
a.grid.color+'">'+n.join("")+"</table>";if(a.legend.container!=null)e(a.legend.container).html(p);else{var d="",v=a.legend.position,g=a.legend.margin;g[0]==null&&(g=[g,g]),v.charAt(0)=="n"?d+="top:"+(g[1]+m.top)+"px;":v.charAt(0)=="s"&&(d+="bottom:"+(g[1]+m.bottom)+"px;"),v.charAt(1)=="e"?d+="right:"+(g[0]+m.right)+"px;":v.charAt(1)=="w"&&(d+="left:"+(g[0]+m.left)+"px;");var y=e('<div class="legend">'+p.replace('style="','style="position:absolute;'+d+";")+"</div>").appendTo(t);if(a.legend.backgroundOpacity!=0){var b=a.legend.backgroundColor;b==null&&(b=a.grid.backgroundColor,b&&typeof b=="string"?b=e.color.parse(b):b=e.color.extract(y,"background-color"),b.a=1,b=b.toString());var w=y.children();e('<div style="position:absolute;width:'+w.width()+"px;height:"+w.height()+"px;"+d+"background-color:"+b+';"> </div>').prependTo(y).css("opacity",a.legend.backgroundOpacity)}}}function ut(e,t,n){var r=a.grid.mouseActiveRadius,i=r*r+1,s=null,o=!1,f,l,c;for(f=u.length-1;f>=0;--f){if(!n(u[f]))continue;
|
||||
var h=u[f],p=h.xaxis,d=h.yaxis,v=h.datapoints.points,m=p.c2p(e),g=d.c2p(t),y=r/p.scale,b=r/d.scale;c=h.datapoints.pointsize,p.options.inverseTransform&&(y=Number.MAX_VALUE),d.options.inverseTransform&&(b=Number.MAX_VALUE);if(h.lines.show||h.points.show)for(l=0;l<v.length;l+=c){var w=v[l],E=v[l+1];if(w==null)continue;if(w-m>y||w-m<-y||E-g>b||E-g<-b)continue;var S=Math.abs(p.p2c(w)-e),x=Math.abs(d.p2c(E)-t),T=S*S+x*x;T<i&&(i=T,s=[f,l/c])}if(h.bars.show&&!s){var N=h.bars.align=="left"?0:-h.bars.barWidth/2,C=N+h.bars.barWidth;for(l=0;l<v.length;l+=c){var w=v[l],E=v[l+1],k=v[l+2];if(w==null)continue;if(u[f].bars.horizontal?m<=Math.max(k,w)&&m>=Math.min(k,w)&&g>=E+N&&g<=E+C:m>=w+N&&m<=w+C&&g>=Math.min(k,E)&&g<=Math.max(k,E))s=[f,l/c]}}}return s?(f=s[0],l=s[1],c=u[f].datapoints.pointsize,{datapoint:u[f].datapoints.points.slice(l*c,(l+1)*c),dataIndex:l,series:u[f],seriesIndex:f}):null}function at(e){a.grid.hoverable&&ct("plothover",e,function(e){return e["hoverable"]!=0})}function ft(e){a.grid.
|
||||
hoverable&&ct("plothover",e,function(e){return!1})}function lt(e){ct("plotclick",e,function(e){return e["clickable"]!=0})}function ct(e,n,r){var i=c.offset(),s=n.pageX-i.left-m.left,o=n.pageY-i.top-m.top,u=L({left:s,top:o});u.pageX=n.pageX,u.pageY=n.pageY;var f=ut(s,o,r);f&&(f.pageX=parseInt(f.series.xaxis.p2c(f.datapoint[0])+i.left+m.left,10),f.pageY=parseInt(f.series.yaxis.p2c(f.datapoint[1])+i.top+m.top,10));if(a.grid.autoHighlight){for(var l=0;l<st.length;++l){var h=st[l];h.auto==e&&(!f||h.series!=f.series||h.point[0]!=f.datapoint[0]||h.point[1]!=f.datapoint[1])&&vt(h.series,h.point)}f&&dt(f.series,f.datapoint,e)}t.trigger(e,[u,f])}function ht(){var e=a.interaction.redrawOverlayInterval;if(e==-1){pt();return}ot||(ot=setTimeout(pt,e))}function pt(){ot=null,p.save(),l.clear(),p.translate(m.left,m.top);var e,t;for(e=0;e<st.length;++e)t=st[e],t.series.bars.show?yt(t.series,t.point):gt(t.series,t.point);p.restore(),E(b.drawOverlay,[p])}function dt(e,t,n){typeof e=="number"&&(e=u[e]);if(typeof
|
||||
t=="number"){var r=e.datapoints.pointsize;t=e.datapoints.points.slice(r*t,r*(t+1))}var i=mt(e,t);i==-1?(st.push({series:e,point:t,auto:n}),ht()):n||(st[i].auto=!1)}function vt(e,t){if(e==null&&t==null){st=[],ht();return}typeof e=="number"&&(e=u[e]);if(typeof t=="number"){var n=e.datapoints.pointsize;t=e.datapoints.points.slice(n*t,n*(t+1))}var r=mt(e,t);r!=-1&&(st.splice(r,1),ht())}function mt(e,t){for(var n=0;n<st.length;++n){var r=st[n];if(r.series==e&&r.point[0]==t[0]&&r.point[1]==t[1])return n}return-1}function gt(t,n){var r=n[0],i=n[1],s=t.xaxis,o=t.yaxis,u=typeof t.highlightColor=="string"?t.highlightColor:e.color.parse(t.color).scale("a",.5).toString();if(r<s.min||r>s.max||i<o.min||i>o.max)return;var a=t.points.radius+t.points.lineWidth/2;p.lineWidth=a,p.strokeStyle=u;var f=1.5*a;r=s.p2c(r),i=o.p2c(i),p.beginPath(),t.points.symbol=="circle"?p.arc(r,i,f,0,2*Math.PI,!1):t.points.symbol(p,r,i,f,!1),p.closePath(),p.stroke()}function yt(t,n){var r=typeof t.highlightColor=="string"?t.highlightColor
|
||||
:e.color.parse(t.color).scale("a",.5).toString(),i=r,s=t.bars.align=="left"?0:-t.bars.barWidth/2;p.lineWidth=t.bars.lineWidth,p.strokeStyle=r,tt(n[0],n[1],n[2]||0,s,s+t.bars.barWidth,0,function(){return i},t.xaxis,t.yaxis,p,t.bars.horizontal,t.bars.lineWidth)}function bt(t,n,r,i){if(typeof t=="string")return t;var s=h.createLinearGradient(0,r,0,n);for(var o=0,u=t.colors.length;o<u;++o){var a=t.colors[o];if(typeof a!="string"){var f=e.color.parse(i);a.brightness!=null&&(f=f.scale("rgb",a.brightness)),a.opacity!=null&&(f.a*=a.opacity),a=f.toString()}s.addColorStop(o/(u-1),a)}return s}var u=[],a={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:!0,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:.85,sorted:null},xaxis:{show:null,position:"bottom",mode:null,font:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter
|
||||
:null,labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null},yaxis:{autoscaleMargin:.02,position:"left"},xaxes:[],yaxes:[],series:{points:{show:!1,radius:3,lineWidth:2,fill:!0,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:2,fill:!1,fillColor:null,steps:!1},bars:{show:!1,lineWidth:2,barWidth:1,fill:!0,fillColor:null,align:"left",horizontal:!1},shadowSize:3,highlightColor:null},grid:{show:!0,aboveData:!1,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,margin:0,labelMargin:5,axisMargin:8,borderWidth:2,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:!1,hoverable:!1,autoHighlight:!0,mouseActiveRadius:10},interaction:{redrawOverlayInterval:1e3/60},hooks:{}},f=null,l=null,c=null,h=null,p=null,d=[],v=[],m={left:0,right:0,top:0,bottom:0},g=0,y=0,b={processOptions:[],processRawData:[],processDatapoints:[],processOffset:[],drawBackground:[],drawSeries
|
||||
:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},w=this;w.setData=T,w.setupGrid=R,w.draw=V,w.getPlaceholder=function(){return t},w.getCanvas=function(){return f.element},w.getPlotOffset=function(){return m},w.width=function(){return g},w.height=function(){return y},w.offset=function(){var e=c.offset();return e.left+=m.left,e.top+=m.top,e},w.getData=function(){return u},w.getAxes=function(){var t={},n;return e.each(d.concat(v),function(e,n){n&&(t[n.direction+(n.n!=1?n.n:"")+"axis"]=n)}),t},w.getXAxes=function(){return d},w.getYAxes=function(){return v},w.c2p=L,w.p2c=A,w.getOptions=function(){return a},w.highlight=dt,w.unhighlight=vt,w.triggerRedrawOverlay=ht,w.pointOffset=function(e){return{left:parseInt(d[C(e,"x")-1].p2c(+e.x)+m.left,10),top:parseInt(v[C(e,"y")-1].p2c(+e.y)+m.top,10)}},w.shutdown=H,w.resize=function(){var e=t.width(),n=t.height();f.resize(e,n),l.resize(e,n)},w.hooks=b,S(w),x(s),D(),T(r),R(),V(),P();var st=[],ot=null}function i(e,t){return t*Math.floor(e/t)}var t=Object
|
||||
.prototype.hasOwnProperty;n.prototype.resize=function(e,t){if(e<=0||t<=0)throw new Error("Invalid dimensions for plot, width = "+e+", height = "+t);var n=this.element,r=this.context,i=this.pixelRatio;this.width!=e&&(n.width=e*i,n.style.width=e+"px",this.width=e),this.height!=t&&(n.height=t*i,n.style.height=t+"px",this.height=t),r.restore(),r.save(),r.scale(i,i)},n.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},n.prototype.render=function(){var e=this._textCache;for(var n in e)if(t.call(e,n)){var r=this.getTextLayer(n),i=e[n];r.hide();for(var s in i)if(t.call(i,s)){var o=i[s];for(var u in o)if(t.call(o,u)){var a=o[u].positions;for(var f=0,l;l=a[f];f++)l.active?l.rendered||(r.append(l.element),l.rendered=!0):(a.splice(f--,1),l.rendered&&l.element.detach());a.length==0&&delete o[u]}}r.show()}},n.prototype.getTextLayer=function(t){var n=this.text[t];return n==null&&(this.textContainer==null&&(this.textContainer=e("<div class='flot-text'></div>").css({position
|
||||
:"absolute",top:0,left:0,bottom:0,right:0,"font-size":"smaller",color:"#545454"}).insertAfter(this.element)),n=this.text[t]=e("<div></div>").addClass(t).css({position:"absolute",top:0,left:0,bottom:0,right:0}).appendTo(this.textContainer)),n},n.prototype.getTextInfo=function(t,n,r,i,s){var o,u,a,f;n=""+n,typeof r=="object"?o=r.style+" "+r.variant+" "+r.weight+" "+r.size+"px/"+r.lineHeight+"px "+r.family:o=r,u=this._textCache[t],u==null&&(u=this._textCache[t]={}),a=u[o],a==null&&(a=u[o]={}),f=a[n];if(f==null){var l=e("<div></div>").html(n).css({position:"absolute","max-width":s,top:-9999}).appendTo(this.getTextLayer(t));typeof r=="object"?l.css({font:o,color:r.color}):typeof r=="string"&&l.addClass(r),f=a[n]={width:l.outerWidth(!0),height:l.outerHeight(!0),element:l,positions:[]},l.detach()}return f},n.prototype.addText=function(e,t,n,r,i,s,o,u,a){var f=this.getTextInfo(e,r,i,s,o),l=f.positions;u=="center"?t-=f.width/2:u=="right"&&(t-=f.width),a=="middle"?n-=f.height/2:a=="bottom"&&(n-=f
|
||||
.height);for(var c=0,h;h=l[c];c++)if(h.x==t&&h.y==n){h.active=!0;return}h={active:!0,rendered:!1,element:l.length?f.element.clone():f.element,x:t,y:n},l.push(h),h.element.css({top:Math.round(n),left:Math.round(t),"text-align":u})},n.prototype.removeText=function(e,n,r,i,s,o){if(i==null){var u=this._textCache[e];if(u!=null)for(var a in u)if(t.call(u,a)){var f=u[a];for(var l in f)if(t.call(f,l)){var c=f[l].positions;for(var h=0,p;p=c[h];h++)p.active=!1}}}else{var c=this.getTextInfo(e,i,s,o).positions;for(var h=0,p;p=c[h];h++)p.x==n&&p.y==r&&(p.active=!1)}},e.plot=function(t,n,i){var s=new r(e(t),n,i,e.plot.plugins);return s},e.plot.version="0.8.1",e.plot.plugins=[],e.fn.plot=function(t,n){return this.each(function(){e.plot(this,t,n)})}}(jQuery),define("jquery.flot",function(){}),function(e){function r(r){function p(t,n,r){l||(l=!0,s=t.getCanvas(),o=e(s).parent(),i=t.getOptions(),t.setData(d(t.getData())))}function d(t){var n=0,r=0,s=0,o=i.series.pie.combine.color,u=[];for(var a=0;a<t.length
|
||||
;++a){var f=t[a].data;e.isArray(f)&&f.length==1&&(f=f[0]),e.isArray(f)?!isNaN(parseFloat(f[1]))&&isFinite(f[1])?f[1]=+f[1]:f[1]=0:!isNaN(parseFloat(f))&&isFinite(f)?f=[1,+f]:f=[1,0],t[a].data=[f]}for(var a=0;a<t.length;++a)n+=t[a].data[0][1];for(var a=0;a<t.length;++a){var f=t[a].data[0][1];f/n<=i.series.pie.combine.threshold&&(r+=f,s++,o||(o=t[a].color))}for(var a=0;a<t.length;++a){var f=t[a].data[0][1];(s<2||f/n>i.series.pie.combine.threshold)&&u.push({data:[[1,f]],color:t[a].color,label:t[a].label,angle:f*Math.PI*2/n,percent:f/(n/100)})}return s>1&&u.push({data:[[1,r]],color:o,label:i.series.pie.combine.label,angle:r*Math.PI*2/n,percent:r/(n/100)}),u}function v(r,s){function y(){c.clearRect(0,0,h,p),o.children().filter(".pieLabel, .pieLabelBackground").remove()}function b(){var e=i.series.pie.shadow.left,t=i.series.pie.shadow.top,n=10,r=i.series.pie.shadow.alpha,s=i.series.pie.radius>1?i.series.pie.radius:u*i.series.pie.radius;if(s>=h/2-e||s*i.series.pie.tilt>=p/2-t||s<=n)return;c.save
|
||||
(),c.translate(e,t),c.globalAlpha=r,c.fillStyle="#000",c.translate(a,f),c.scale(1,i.series.pie.tilt);for(var o=1;o<=n;o++)c.beginPath(),c.arc(0,0,s,0,Math.PI*2,!1),c.fill(),s-=o;c.restore()}function w(){function l(e,t,i){if(e<=0||isNaN(e))return;i?c.fillStyle=t:(c.strokeStyle=t,c.lineJoin="round"),c.beginPath(),Math.abs(e-Math.PI*2)>1e-9&&c.moveTo(0,0),c.arc(0,0,n,r,r+e/2,!1),c.arc(0,0,n,r+e/2,r+e,!1),c.closePath(),r+=e,i?c.fill():c.stroke()}function d(){function l(t,n,s){if(t.data[0][1]==0)return!0;var u=i.legend.labelFormatter,l,c=i.series.pie.label.formatter;u?l=u(t.label,t):l=t.label,c&&(l=c(l,t));var d=(n+t.angle+n)/2,v=a+Math.round(Math.cos(d)*r),m=f+Math.round(Math.sin(d)*r)*i.series.pie.tilt,g="<span class='pieLabel' id='pieLabel"+s+"' style='position:absolute;top:"+m+"px;left:"+v+"px;'>"+l+"</span>";o.append(g);var y=o.children("#pieLabel"+s),b=m-y.height()/2,w=v-y.width()/2;y.css("top",b),y.css("left",w);if(0-b>0||0-w>0||p-(b+y.height())<0||h-(w+y.width())<0)return!1;if(i.series
|
||||
.pie.label.background.opacity!=0){var E=i.series.pie.label.background.color;E==null&&(E=t.color);var S="top:"+b+"px;left:"+w+"px;";e("<div class='pieLabelBackground' style='position:absolute;width:"+y.width()+"px;height:"+y.height()+"px;"+S+"background-color:"+E+";'></div>").css("opacity",i.series.pie.label.background.opacity).insertBefore(y)}return!0}var n=t,r=i.series.pie.label.radius>1?i.series.pie.label.radius:u*i.series.pie.label.radius;for(var s=0;s<v.length;++s){if(v[s].percent>=i.series.pie.label.threshold*100&&!l(v[s],n,s))return!1;n+=v[s].angle}return!0}var t=Math.PI*i.series.pie.startAngle,n=i.series.pie.radius>1?i.series.pie.radius:u*i.series.pie.radius;c.save(),c.translate(a,f),c.scale(1,i.series.pie.tilt),c.save();var r=t;for(var s=0;s<v.length;++s)v[s].startAngle=r,l(v[s].angle,v[s].color,!0);c.restore();if(i.series.pie.stroke.width>0){c.save(),c.lineWidth=i.series.pie.stroke.width,r=t;for(var s=0;s<v.length;++s)l(v[s].angle,i.series.pie.stroke.color,!1);c.restore()}return m
|
||||
(c),c.restore(),i.series.pie.label.show?d():!0}if(!o)return;var h=r.getPlaceholder().width(),p=r.getPlaceholder().height(),d=o.children().filter(".legend").children().width()||0;c=s,l=!1,u=Math.min(h,p/i.series.pie.tilt)/2,f=p/2+i.series.pie.offset.top,a=h/2,i.series.pie.offset.left=="auto"?i.legend.position.match("w")?a+=d/2:a-=d/2:a+=i.series.pie.offset.left,a<u?a=u:a>h-u&&(a=h-u);var v=r.getData(),g=0;do g>0&&(u*=n),g+=1,y(),i.series.pie.tilt<=.8&&b();while(!w()&&g<t);g>=t&&(y(),o.prepend("<div class='error'>Could not draw pie with labels contained inside canvas</div>")),r.setSeries&&r.insertLegend&&(r.setSeries(v),r.insertLegend())}function m(e){if(i.series.pie.innerRadius>0){e.save();var t=i.series.pie.innerRadius>1?i.series.pie.innerRadius:u*i.series.pie.innerRadius;e.globalCompositeOperation="destination-out",e.beginPath(),e.fillStyle=i.series.pie.stroke.color,e.arc(0,0,t,0,Math.PI*2,!1),e.fill(),e.closePath(),e.restore(),e.save(),e.beginPath(),e.strokeStyle=i.series.pie.stroke.color
|
||||
,e.arc(0,0,t,0,Math.PI*2,!1),e.stroke(),e.closePath(),e.restore()}}function g(e,t){for(var n=!1,r=-1,i=e.length,s=i-1;++r<i;s=r)(e[r][1]<=t[1]&&t[1]<e[s][1]||e[s][1]<=t[1]&&t[1]<e[r][1])&&t[0]<(e[s][0]-e[r][0])*(t[1]-e[r][1])/(e[s][1]-e[r][1])+e[r][0]&&(n=!n);return n}function y(e,t){var n=r.getData(),i=r.getOptions(),s=i.series.pie.radius>1?i.series.pie.radius:u*i.series.pie.radius,o,l;for(var h=0;h<n.length;++h){var p=n[h];if(p.pie.show){c.save(),c.beginPath(),c.moveTo(0,0),c.arc(0,0,s,p.startAngle,p.startAngle+p.angle/2,!1),c.arc(0,0,s,p.startAngle+p.angle/2,p.startAngle+p.angle,!1),c.closePath(),o=e-a,l=t-f;if(c.isPointInPath){if(c.isPointInPath(e-a,t-f))return c.restore(),{datapoint:[p.percent,p.data],dataIndex:0,series:p,seriesIndex:h}}else{var d=s*Math.cos(p.startAngle),v=s*Math.sin(p.startAngle),m=s*Math.cos(p.startAngle+p.angle/4),y=s*Math.sin(p.startAngle+p.angle/4),b=s*Math.cos(p.startAngle+p.angle/2),w=s*Math.sin(p.startAngle+p.angle/2),E=s*Math.cos(p.startAngle+p.angle/1.5)
|
||||
,S=s*Math.sin(p.startAngle+p.angle/1.5),x=s*Math.cos(p.startAngle+p.angle),T=s*Math.sin(p.startAngle+p.angle),N=[[0,0],[d,v],[m,y],[b,w],[E,S],[x,T]],C=[o,l];if(g(N,C))return c.restore(),{datapoint:[p.percent,p.data],dataIndex:0,series:p,seriesIndex:h}}c.restore()}}return null}function b(e){E("plothover",e)}function w(e){E("plotclick",e)}function E(e,t){var n=r.offset(),s=parseInt(t.pageX-n.left),u=parseInt(t.pageY-n.top),a=y(s,u);if(i.grid.autoHighlight)for(var f=0;f<h.length;++f){var l=h[f];l.auto==e&&(!a||l.series!=a.series)&&x(l.series)}a&&S(a.series,e);var c={pageX:t.pageX,pageY:t.pageY};o.trigger(e,[c,a])}function S(e,t){var n=T(e);n==-1?(h.push({series:e,auto:t}),r.triggerRedrawOverlay()):t||(h[n].auto=!1)}function x(e){e==null&&(h=[],r.triggerRedrawOverlay());var t=T(e);t!=-1&&(h.splice(t,1),r.triggerRedrawOverlay())}function T(e){for(var t=0;t<h.length;++t){var n=h[t];if(n.series==e)return t}return-1}function N(e,t){function s(e){if(e.angle<=0||isNaN(e.angle))return;t.fillStyle="rgba(255, 255, 255, "+
|
||||
n.series.pie.highlight.opacity+")",t.beginPath(),Math.abs(e.angle-Math.PI*2)>1e-9&&t.moveTo(0,0),t.arc(0,0,r,e.startAngle,e.startAngle+e.angle/2,!1),t.arc(0,0,r,e.startAngle+e.angle/2,e.startAngle+e.angle,!1),t.closePath(),t.fill()}var n=e.getOptions(),r=n.series.pie.radius>1?n.series.pie.radius:u*n.series.pie.radius;t.save(),t.translate(a,f),t.scale(1,n.series.pie.tilt);for(var i=0;i<h.length;++i)s(h[i].series);m(t),t.restore()}var s=null,o=null,u=null,a=null,f=null,l=!1,c=null,h=[];r.hooks.processOptions.push(function(e,t){t.series.pie.show&&(t.grid.show=!1,t.series.pie.label.show=="auto"&&(t.legend.show?t.series.pie.label.show=!1:t.series.pie.label.show=!0),t.series.pie.radius=="auto"&&(t.series.pie.label.show?t.series.pie.radius=.75:t.series.pie.radius=1),t.series.pie.tilt>1?t.series.pie.tilt=1:t.series.pie.tilt<0&&(t.series.pie.tilt=0))}),r.hooks.bindEvents.push(function(e,t){var n=e.getOptions();n.series.pie.show&&(n.grid.hoverable&&t.unbind("mousemove").mousemove(b),n.grid.clickable&&
|
||||
t.unbind("click").click(w))}),r.hooks.processDatapoints.push(function(e,t,n,r){var i=e.getOptions();i.series.pie.show&&p(e,t,n,r)}),r.hooks.drawOverlay.push(function(e,t){var n=e.getOptions();n.series.pie.show&&N(e,t)}),r.hooks.draw.push(function(e,t){var n=e.getOptions();n.series.pie.show&&v(e,t)})}var t=10,n=.95,i={series:{pie:{show:!1,radius:"auto",innerRadius:0,startAngle:1.5,tilt:1,shadow:{left:5,top:15,alpha:.02},offset:{top:0,left:"auto"},stroke:{color:"#fff",width:1},label:{show:"auto",formatter:function(e,t){return"<div style='font-size:x-small;text-align:center;padding:2px;color:"+t.color+";'>"+e+"<br/>"+Math.round(t.percent)+"%</div>"},radius:1,background:{color:null,opacity:0},threshold:0},combine:{threshold:-1,color:null,label:"Other"},highlight:{opacity:.5}}}};e.plot.plugins.push({init:r,options:i,name:"pie",version:"1.1"})}(jQuery),define("jquery.flot.pie",function(){}),define("text",["module"],function(e){var t,n,r,i,s,o=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"
|
||||
],u=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,a=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,f=typeof location!="undefined"&&location.href,l=f&&location.protocol&&location.protocol.replace(/\:/,""),c=f&&location.hostname,h=f&&(location.port||undefined),p={},d=e.config&&e.config()||{};t={version:"2.0.10",strip:function(e){if(e){e=e.replace(u,"");var t=e.match(a);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:d.createXhr||function(){var e,t,n;if(typeof XMLHttpRequest!="undefined")return new XMLHttpRequest;if(typeof ActiveXObject!="undefined")for(t=0;t<3;t+=1){n=o[t];try{e=new ActiveXObject(n)}catch(r){}if(e){o=[n];break}}return e},parseName:function(e){var t,n,r,i=!1,s=e.indexOf("."),o=e.indexOf("./")===0||e.indexOf("../")===0;return s!==-1&&(!o||s>1)?
|
||||
(t=e.substring(0,s),n=e.substring(s+1,e.length)):t=e,r=n||t,s=r.indexOf("!"),s!==-1&&(i=r.substring(s+1)==="strip",r=r.substring(0,s),n?n=r:t=r),{moduleName:t,ext:n,strip:i}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,n,r,i){var s,o,u,a=t.xdRegExp.exec(e);return a?(s=a[2],o=a[3],o=o.split(":"),u=o[1],o=o[0],(!s||s===n)&&(!o||o.toLowerCase()===r.toLowerCase())&&(!u&&!o||u===i)):!0},finishLoad:function(e,n,r,i){r=n?t.strip(r):r,d.isBuild&&(p[e]=r),i(r)},load:function(e,n,r,i){if(i.isBuild&&!i.inlineText){r();return}d.isBuild=i.isBuild;var s=t.parseName(e),o=s.moduleName+(s.ext?"."+s.ext:""),u=n.toUrl(o),a=d.useXhr||t.useXhr;if(u.indexOf("empty:")===0){r();return}!f||a(u,l,c,h)?t.get(u,function(n){t.finishLoad(e,s.strip,n,r)},function(e){r.error&&r.error(e)}):n([o],function(e){t.finishLoad(s.moduleName+"."+s.ext,s.strip,e,r)})},write:function(e,n,r,i){if(p.hasOwnProperty(n)){var s=t.jsEscape(p[n]);r.asModule(e+"!"+n,"define(function () { return '"+s+"';});\n")}},writeFile:function(
|
||||
e,n,r,i,s){var o=t.parseName(n),u=o.ext?"."+o.ext:"",a=o.moduleName+u,f=r.toUrl(o.moduleName+u)+".js";t.load(a,r,function(n){var r=function(e){return i(f,e)};r.asModule=function(e,t){return i.asModule(e,f,t)},t.write(e,a,r,s)},s)}};if(d.env==="node"||!d.env&&typeof process!="undefined"&&process.versions&&!!process.versions.node&&!process.versions["node-webkit"])n=require.nodeRequire("fs"),t.get=function(e,t,r){try{var i=n.readFileSync(e,"utf8");i.indexOf("")===0&&(i=i.substring(1)),t(i)}catch(s){r(s)}};else if(d.env==="xhr"||!d.env&&t.createXhr())t.get=function(e,n,r,i){var s=t.createXhr(),o;s.open("GET",e,!0);if(i)for(o in i)i.hasOwnProperty(o)&&s.setRequestHeader(o.toLowerCase(),i[o]);d.onXhr&&d.onXhr(s,e),s.onreadystatechange=function(t){var i,o;s.readyState===4&&(i=s.status,i>399&&i<600?(o=new Error(e+" HTTP status: "+i),o.xhr=s,r(o)):n(s.responseText),d.onXhrComplete&&d.onXhrComplete(s,e))},s.send(null)};else if(d.env==="rhino"||!d.env&&typeof Packages!="undefined"&&typeof java!="undefined"
|
||||
)t.get=function(e,t){var n,r,i="utf-8",s=new java.io.File(e),o=java.lang.System.getProperty("line.separator"),u=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(s),i)),a="";try{n=new java.lang.StringBuffer,r=u.readLine(),r&&r.length()&&r.charAt(0)===65279&&(r=r.substring(1)),r!==null&&n.append(r);while((r=u.readLine())!==null)n.append(o),n.append(r);a=String(n.toString())}finally{u.close()}t(a)};else if(d.env==="xpconnect"||!d.env&&typeof Components!="undefined"&&Components.classes&&Components.interfaces)r=Components.classes,i=Components.interfaces,Components.utils["import"]("resource://gre/modules/FileUtils.jsm"),s="@mozilla.org/windows-registry-key;1"in r,t.get=function(e,t){var n,o,u,a={};s&&(e=e.replace(/\//g,"\\")),u=new FileUtils.File(e);try{n=r["@mozilla.org/network/file-input-stream;1"].createInstance(i.nsIFileInputStream),n.init(u,1,0,!1),o=r["@mozilla.org/intl/converter-input-stream;1"].createInstance(i.nsIConverterInputStream),o.init(n,"utf-8"
|
||||
,n.available(),i.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER),o.readString(n.available(),a),o.close(),n.close(),t(a.value)}catch(f){throw new Error((u&&u.path||"")+": "+f)}};return t});
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
require.config({baseUrl:"app",paths:{settings:"components/settings",kbn:"components/kbn",css:"../vendor/require/css",text:"../vendor/require/text",moment:"../vendor/moment",filesaver:"../vendor/filesaver",angular:"../vendor/angular/angular","angular-strap":"../vendor/angular/angular-strap","angular-sanitize":"../vendor/angular/angular-sanitize",timepicker:"../vendor/angular/timepicker",datepicker:"../vendor/angular/datepicker",underscore:"components/underscore.extended","underscore-src":"../vendor/underscore",bootstrap:"../vendor/bootstrap/bootstrap",jquery:"components/jquery.extended","jquery-src":"../vendor/jquery/jquery-1.8.0","jquery.flot":"../vendor/jquery/jquery.flot","jquery.flot.pie":"../vendor/jquery/jquery.flot.pie","jquery.flot.selection":"../vendor/jquery/jquery.flot.selection","jquery.flot.stack":"../vendor/jquery/jquery.flot.stack","jquery.flot.time":"../vendor/jquery/jquery.flot.time",modernizr:"../vendor/modernizr-2.6.1",elasticjs:"../vendor/elasticjs/elastic-angular-client"
|
||||
},shim:{underscore:{exports:"_"},angular:{deps:["jquery"],exports:"angular"},bootstrap:{deps:["jquery"]},modernizr:{exports:"Modernizr"},"jquery-src":{exports:"jQuery"},"jquery.flot":["jquery"],"jquery.flot.pie":["jquery","jquery.flot"],"jquery.flot.selection":["jquery","jquery.flot"],"jquery.flot.stack":["jquery","jquery.flot"],"jquery.flot.time":["jquery","jquery.flot"],"angular-sanitize":["angular"],"angular-cookies":["angular"],"angular-loader":["angular"],"angular-mocks":["angular"],"angular-resource":["angular"],"angular-route":["angular"],"angular-touch":["angular"],"angular-strap":["angular","bootstrap","timepicker","datepicker"],timepicker:["jquery","bootstrap"],datepicker:["jquery","bootstrap"],elasticjs:["angular","../vendor/elasticjs/elastic"]}});
|
||||
+1
-1
@@ -59,7 +59,7 @@
|
||||
],
|
||||
"type": "text",
|
||||
"mode": "markdown",
|
||||
"content": " \n\n##### Did you just upgrade? Not expecting this screen?\nIf you were using the old default page you might not be expecting this screen. I understand, change can be awkward. Let me explain. \n\n##### Setting a global default dashboard\nKibana has always shipped with an interface for Logstash, still does! You can access it [here](index.html#dashboard/file/logstash.json). However, if you want to make it your default again, all you you need to do is rename a file!\nIn your Kibana installation directory: \n\nRename *logstash.json* to *default.json* and refresh. Should be all set.\n\n##### But wait, there's more!\nIn fact, you can add any exported dashboard to that directory and access it as *http://YOUR-HOST -HERE/index.html#dashboard/file/YOUR-DASHBOARD.json*. Neat trick eh?",
|
||||
"content": " \n\n##### Did you just upgrade? Not expecting this screen?\nIf you were using the old default page you might not be expecting this screen. I understand, change can be awkward. Let me explain. \n\n##### Setting a global default dashboard\nKibana has always shipped with an interface for Logstash, still does! You can access it [here](index.html#dashboard/file/logstash.json). However, if you want to make it your default again, all you you need to do is rename a file!\nIn your Kibana installation directory: \n\nRename *logstash.json* to *default.json* and refresh. Should be all set.\n\n##### But wait, there's more!\nIn fact, you can add any exported dashboard to that directory and access it as *http://YOUR-HOST -HERE/index.html#dashboard/file/YOUR-DASHBOARD.json*. Neat trick eh?",
|
||||
"style": {},
|
||||
"title": "",
|
||||
"status": "Stable"
|
||||
+172
@@ -0,0 +1,172 @@
|
||||
/* global _, kbn */
|
||||
|
||||
/*
|
||||
* Complex scripted Logstash dashboard
|
||||
* This script generates a dashboard object that Kibana can load. It also takes a number of user
|
||||
* supplied URL parameters, none are required:
|
||||
*
|
||||
* index :: Which index to search? If this is specified, interval is set to 'none'
|
||||
* pattern :: Does nothing if index is specified. Set a timestamped index pattern. Default: [logstash-]YYYY.MM.DD
|
||||
* interval :: Sets the index interval (eg: day,week,month,year), Default: day
|
||||
*
|
||||
* split :: The character to split the queries on Default: ','
|
||||
* query :: By default, a comma seperated list of queries to run. Default: *
|
||||
*
|
||||
* from :: Search this amount of time back, eg 15m, 1h, 2d. Default: 15m
|
||||
* timefield :: The field containing the time to filter on, Default: @timestamp
|
||||
*
|
||||
* fields :: comma seperated list of fields to show in the table
|
||||
* sort :: comma seperated field to sort on, and direction, eg sort=@timestamp,desc
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
// Setup some variables
|
||||
var dashboard, queries, _d_timespan;
|
||||
|
||||
// All url parameters are available via the ARGS object
|
||||
var ARGS;
|
||||
|
||||
// Set a default timespan if one isn't specified
|
||||
_d_timespan = '1h';
|
||||
|
||||
// Intialize a skeleton with nothing but a rows array and service object
|
||||
dashboard = {
|
||||
rows : [],
|
||||
services : {}
|
||||
};
|
||||
|
||||
// Set a title
|
||||
dashboard.title = 'Logstash Search';
|
||||
|
||||
// Allow the user to set the index, if they dont, fall back to logstash.
|
||||
if(!_.isUndefined(ARGS.index)) {
|
||||
dashboard.index = {
|
||||
default: ARGS.index,
|
||||
interval: 'none'
|
||||
};
|
||||
} else {
|
||||
// Don't fail to default
|
||||
dashboard.failover = false;
|
||||
dashboard.index = {
|
||||
default: ARGS.index||'ADD_A_TIME_FILTER',
|
||||
pattern: ARGS.pattern||'[logstash-]YYYY.MM.DD',
|
||||
interval: ARGS.interval||'day'
|
||||
};
|
||||
}
|
||||
|
||||
// In this dashboard we let users pass queries as comma seperated list to the query parameter.
|
||||
// Or they can specify a split character using the split aparameter
|
||||
// If query is defined, split it into a list of query objects
|
||||
// NOTE: ids must be integers, hence the parseInt()s
|
||||
if(!_.isUndefined(ARGS.query)) {
|
||||
queries = _.object(_.map(ARGS.query.split(ARGS.split||','), function(v,k) {
|
||||
return [k,{
|
||||
query: v,
|
||||
id: parseInt(k,10),
|
||||
alias: v
|
||||
}];
|
||||
}));
|
||||
} else {
|
||||
// No queries passed? Initialize a single query to match everything
|
||||
queries = {
|
||||
0: {
|
||||
query: '*',
|
||||
id: 0
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Now populate the query service with our objects
|
||||
dashboard.services.query = {
|
||||
list : queries,
|
||||
ids : _.map(_.keys(queries),function(v){return parseInt(v,10);})
|
||||
};
|
||||
|
||||
// Lets also add a default time filter, the value of which can be specified by the user
|
||||
// This isn't strictly needed, but it gets rid of the info alert about the missing time filter
|
||||
dashboard.services.filter = {
|
||||
list: {
|
||||
0: {
|
||||
from: kbn.time_ago(ARGS.from||_d_timespan),
|
||||
to: new Date(),
|
||||
field: ARGS.timefield||"@timestamp",
|
||||
type: "time",
|
||||
active: true,
|
||||
id: 0
|
||||
}
|
||||
},
|
||||
ids: [0]
|
||||
};
|
||||
|
||||
// Ok, lets make some rows. The Filters row is collapsed by default
|
||||
dashboard.rows = [
|
||||
{
|
||||
title: "Options",
|
||||
height: "30px"
|
||||
},
|
||||
{
|
||||
title: "Query",
|
||||
height: "30px"
|
||||
},
|
||||
{
|
||||
title: "Filters",
|
||||
height: "100px",
|
||||
collapse: true
|
||||
},
|
||||
{
|
||||
title: "Chart",
|
||||
height: "300px"
|
||||
},
|
||||
{
|
||||
title: "Events",
|
||||
height: "400px"
|
||||
}
|
||||
];
|
||||
|
||||
// Setup some panels. A query panel and a filter panel on the same row
|
||||
dashboard.rows[0].panels = [
|
||||
{
|
||||
type: 'timepicker',
|
||||
span: 6,
|
||||
timespan: ARGS.from||_d_timespan
|
||||
}
|
||||
];
|
||||
|
||||
// Add a filtering panel to the 3rd row
|
||||
dashboard.rows[1].panels = [
|
||||
{
|
||||
type: 'Query'
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
// Add a filtering panel to the 3rd row
|
||||
dashboard.rows[2].panels = [
|
||||
{
|
||||
type: 'filtering'
|
||||
}
|
||||
];
|
||||
|
||||
// And a histogram that allows the user to specify the interval and time field
|
||||
dashboard.rows[3].panels = [
|
||||
{
|
||||
type: 'histogram',
|
||||
time_field: ARGS.timefield||"@timestamp",
|
||||
auto_int: true
|
||||
}
|
||||
];
|
||||
|
||||
// And a table row where you can specify field and sort order
|
||||
dashboard.rows[4].panels = [
|
||||
{
|
||||
type: 'table',
|
||||
fields: !_.isUndefined(ARGS.fields) ? ARGS.fields.split(',') : [],
|
||||
sort: !_.isUndefined(ARGS.sort) ? ARGS.sort.split(',') : [ARGS.timefield||'@timestamp','desc'],
|
||||
overflow: 'expand'
|
||||
}
|
||||
];
|
||||
|
||||
// Now return the object and we're good!
|
||||
return dashboard;
|
||||
+2
-3
@@ -190,8 +190,7 @@
|
||||
"font-size": "9pt"
|
||||
},
|
||||
"overflow": "min-height",
|
||||
"fields": [
|
||||
],
|
||||
"fields": [],
|
||||
"highlight": [],
|
||||
"sortable": true,
|
||||
"header": true,
|
||||
@@ -215,4 +214,4 @@
|
||||
"pattern": "[logstash-]YYYY.MM.DD",
|
||||
"default": "NO_TIME_FILTER_OR_INDEX_PATTERN_NOT_MATCHED"
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -175,4 +175,4 @@
|
||||
"pattern": "[logstash-]YYYY.MM.DD",
|
||||
"default": "_all"
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div class="row-fluid"><div class="span4"><form><h6>Coordinate Field<tip>geoJSON array! Long,Lat NOT Lat,Long</tip></h6><input bs-typeahead="fields.list" type="text" class="input-small" ng-model="panel.field"></form></div><div class="span4"><form><h6>Tooltip Field</h6><input bs-typeahead="fields.list" type="text" class="input-small" ng-model="panel.tooltip"></form></div><div class="span2"><h6>Max Points</h6><input type="number" class="input-small" ng-model="panel.size"></div></div>
|
||||
+1
@@ -0,0 +1 @@
|
||||
;
|
||||
+1
File diff suppressed because one or more lines are too long
+1
@@ -0,0 +1 @@
|
||||
.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{display:inline}.leaflet-popup-tip{width:21px;_width:27px;margin:0 auto;_margin-top:-3px;filter:progid:DXImageTransform.Microsoft.Matrix(M11=.70710678, M12=.70710678, M21=-.70710678, M22=.70710678);-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"}.leaflet-popup-tip-container{margin-top:-1px}.leaflet-popup-content-wrapper,.leaflet-popup-tip{border:1px solid #999}.leaflet-popup-content-wrapper{zoom:1}.leaflet-control-zoom,.leaflet-control-layers{border:3px solid #999}.leaflet-control-layers-toggle{}.leaflet-control-attribution,.leaflet-control-layers,.leaflet-control-scale-line{background:#fff}.leaflet-zoom-box{filter:alpha(opacity=50)}.leaflet-control-attribution{border-top:1px solid #bbb;border-left:1px solid #bbb}
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
!function(e,t,n){var r=e.L,i={};i.version="0.6-dev","object"==typeof module&&"object"==typeof module.exports?module.exports=i:"function"==typeof define&&define.amd&&define("leaflet",[],function(){return i}),i.noConflict=function(){return e.L=r,this},e.L=i,i.Util={extend:function(e){var t,n,r,i,s=Array.prototype.slice.call(arguments,1);for(n=0,r=s.length;r>n;n++){i=s[n]||{};for(t in i)i.hasOwnProperty(t)&&(e[t]=i[t])}return e},bind:function(e,t){var n=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return e.apply(t,n||arguments)}},stamp:function(){var e=0,t="_leaflet_id";return function(n){return n[t]=n[t]||++e,n[t]}}(),invokeEach:function(e,t,n){var r,i;if("object"==typeof e){i=Array.prototype.slice.call(arguments,3);for(r in e)t.apply(n,[r,e[r]].concat(i));return!0}return!1},limitExecByInterval:function(e,t,n){var r,i;return function s(){var u=arguments;return r?(i=!0,void 0):(r=!0,setTimeout(function(){r=!1,i&&(s.apply(n,u),i=!1)},t),e.apply(n,u),void 0
|
||||
)}},falseFn:function(){return!1},formatNum:function(e,t){var n=Math.pow(10,t||5);return Math.round(e*n)/n},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},splitWords:function(e){return i.Util.trim(e).split(/\s+/)},setOptions:function(e,t){return e.options=i.extend({},e.options,t),e.options},getParamString:function(e,t,n){var r=[];for(var i in e)r.push(encodeURIComponent(n?i.toUpperCase():i)+"="+encodeURIComponent(e[i]));return(t&&-1!==t.indexOf("?")?"&":"?")+r.join("&")},template:function(e,t){return e.replace(/\{ *([\w_]+) *\}/g,function(e,r){var i=t[r];if(i===n)throw new Error("No value provided for variable "+e);return"function"==typeof i&&(i=i(t)),i})},isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function t(t){var n,r,i=["webkit","moz","o","ms"];for(n=0;n<i.length&&!r;n++)r=e[i[n]+t];return r}function n(t){var n=+(new Date),i=Math.max(0,16-(n-
|
||||
r));return r=n+i,e.setTimeout(t,i)}var r=0,s=e.requestAnimationFrame||t("RequestAnimationFrame")||n,u=e.cancelAnimationFrame||t("CancelAnimationFrame")||t("CancelRequestAnimationFrame")||function(t){e.clearTimeout(t)};i.Util.requestAnimFrame=function(t,r,u,a){return t=i.bind(t,r),u&&s===n?(t(),void 0):s.call(e,t,a)},i.Util.cancelAnimFrame=function(t){t&&u.call(e,t)}}(),i.extend=i.Util.extend,i.bind=i.Util.bind,i.stamp=i.Util.stamp,i.setOptions=i.Util.setOptions,i.Class=function(){},i.Class.extend=function(e){var t=function(){this.initialize&&this.initialize.apply(this,arguments),this._initHooks&&this.callInitHooks()},n=function(){};n.prototype=this.prototype;var r=new n;r.constructor=t,t.prototype=r;for(var s in this)this.hasOwnProperty(s)&&"prototype"!==s&&(t[s]=this[s]);e.statics&&(i.extend(t,e.statics),delete e.statics),e.includes&&(i.Util.extend.apply(null,[r].concat(e.includes)),delete e.includes),e.options&&r.options&&(e.options=i.extend({},r.options,e.options)),i.extend(r,e),r._initHooks=
|
||||
[];var u=this;return t.__super__=u.prototype,r.callInitHooks=function(){if(!this._initHooksCalled){u.prototype.callInitHooks&&u.prototype.callInitHooks.call(this),this._initHooksCalled=!0;for(var e=0,t=r._initHooks.length;t>e;e++)r._initHooks[e].call(this)}},t},i.Class.include=function(e){i.extend(this.prototype,e)},i.Class.mergeOptions=function(e){i.extend(this.prototype.options,e)},i.Class.addInitHook=function(e){var t=Array.prototype.slice.call(arguments,1),n="function"==typeof e?e:function(){this[e].apply(this,t)};this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n)};var s="_leaflet_events";i.Mixin={},i.Mixin.Events={addEventListener:function(e,t,n){if(i.Util.invokeEach(e,this.addEventListener,this,t,n))return this;var r,u,a,f,l,c,h,p=this[s]=this[s]||{},d=n&&i.stamp(n);for(e=i.Util.splitWords(e),r=0,u=e.length;u>r;r++)a={action:t,context:n||this},f=e[r],n?(l=f+"_idx",c=l+"_len",h=p[l]=p[l]||{},h[d]||(h[d]=[],p[c]=(p[c]||0)+1),h[d].push(a)):(p[f]=
|
||||
p[f]||[],p[f].push(a));return this},hasEventListeners:function(e){var t=this[s];return!!t&&(e in t&&t[e].length>0||e+"_idx"in t&&t[e+"_idx_len"]>0)},removeEventListener:function(e,t,n){if(!this[s])return this;if(!e)return this.clearAllEventListeners();if(i.Util.invokeEach(e,this.removeEventListener,this,t,n))return this;var r,u,a,f,l,c,h,p,d,v=this[s],m=n&&i.stamp(n);for(e=i.Util.splitWords(e),r=0,u=e.length;u>r;r++)if(a=e[r],c=a+"_idx",h=c+"_len",p=v[c],t){if(f=n&&p?p[m]:v[a]){for(l=f.length-1;l>=0;l--)f[l].action!==t||n&&f[l].context!==n||(d=f.splice(l,1),d[0].action=i.Util.falseFn);n&&p&&0===f.length&&(delete p[m],v[h]--)}}else delete v[a],delete v[c];return this},clearAllEventListeners:function(){return delete this[s],this},fireEvent:function(e,t){if(!this.hasEventListeners(e))return this;var n,r,u,a,f,l=i.Util.extend({},t,{type:e,target:this}),c=this[s];if(c[e])for(n=c[e].slice(),r=0,u=n.length;u>r;r++)n[r].action.call(n[r].context||this,l);a=c[e+"_idx"];for(f in a)if(n=a[f].slice(
|
||||
))for(r=0,u=n.length;u>r;r++)n[r].action.call(n[r].context||this,l);return this},addOneTimeEventListener:function(e,t,n){if(i.Util.invokeEach(e,this.addOneTimeEventListener,this,t,n))return this;var r=i.bind(function(){this.removeEventListener(e,t,n).removeEventListener(e,r,n)},this);return this.addEventListener(e,t,n).addEventListener(e,r,n)}},i.Mixin.Events.on=i.Mixin.Events.addEventListener,i.Mixin.Events.off=i.Mixin.Events.removeEventListener,i.Mixin.Events.once=i.Mixin.Events.addOneTimeEventListener,i.Mixin.Events.fire=i.Mixin.Events.fireEvent,function(){var r=!!e.ActiveXObject,s=r&&!e.XMLHttpRequest,u=r&&!t.querySelector,a=r&&!t.addEventListener,f=navigator.userAgent.toLowerCase(),l=-1!==f.indexOf("webkit"),c=-1!==f.indexOf("chrome"),h=-1!==f.indexOf("phantom"),p=-1!==f.indexOf("android"),d=-1!==f.search("android [23]"),v=typeof orientation!=n+"",m=e.navigator&&e.navigator.msPointerEnabled&&e.navigator.msMaxTouchPoints,g="devicePixelRatio"in e&&e.devicePixelRatio>1||"matchMedia"in
|
||||
e&&e.matchMedia("(min-resolution:144dpi)")&&e.matchMedia("(min-resolution:144dpi)").matches,y=t.documentElement,b=r&&"transition"in y.style,w="WebKitCSSMatrix"in e&&"m11"in new e.WebKitCSSMatrix,E="MozPerspective"in y.style,S="OTransition"in y.style,x=!e.L_DISABLE_3D&&(b||w||E||S)&&!h,T=!e.L_NO_TOUCH&&!h&&function(){var e="ontouchstart";if(m||e in y)return!0;var n=t.createElement("div"),r=!1;return n.setAttribute?(n.setAttribute(e,"return;"),"function"==typeof n[e]&&(r=!0),n.removeAttribute(e),n=null,r):!1}();i.Browser={ie:r,ie6:s,ie7:u,ielt9:a,webkit:l,android:p,android23:d,chrome:c,ie3d:b,webkit3d:w,gecko3d:E,opera3d:S,any3d:x,mobile:v,mobileWebkit:v&&l,mobileWebkit3d:v&&w,mobileOpera:v&&e.opera,touch:T,msTouch:m,retina:g}}(),i.Point=function(e,t,n){this.x=n?Math.round(e):e,this.y=n?Math.round(t):t},i.Point.prototype={clone:function(){return new i.Point(this.x,this.y)},add:function(e){return this.clone()._add(i.point(e))},_add:function(e){return this.x+=e.x,this.y+=e.y,this},subtract:
|
||||
function(e){return this.clone()._subtract(i.point(e))},_subtract:function(e){return this.x-=e.x,this.y-=e.y,this},divideBy:function(e){return this.clone()._divideBy(e)},_divideBy:function(e){return this.x/=e,this.y/=e,this},multiplyBy:function(e){return this.clone()._multiplyBy(e)},_multiplyBy:function(e){return this.x*=e,this.y*=e,this},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},distanceTo:function(e){e=i.point(e);var t=e.x-this.x,n=e.y-this.y;return Math.sqrt(t*t+n*n)},equals:function(e){return e=i.point(e),e.x===this.x&&e.y===this.y},contains:function(e){return e=i.point(e),Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function(){return"Point("+i.Util.formatNum(this.x)+", "+i.Util.formatNum(this.y)+")"}},i.point=function(e,t,r){return e instanceof
|
||||
i.Point?e:i.Util.isArray(e)?new i.Point(e[0],e[1]):e===n||null===e?e:new i.Point(e,t,r)},i.Bounds=function(e,t){if(e)for(var n=t?[e,t]:e,r=0,i=n.length;i>r;r++)this.extend(n[r])},i.Bounds.prototype={extend:function(e){return e=i.point(e),this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(e.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(e.y,this.max.y)):(this.min=e.clone(),this.max=e.clone()),this},getCenter:function(e){return new i.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function(){return new i.Point(this.min.x,this.max.y)},getTopRight:function(){return new i.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(e){var t,n;return e="number"==typeof e[0]||e instanceof i.Point?i.point(e):i.bounds(e),e instanceof i.Bounds?(t=e.min,n=e.max):t=n=e,t.x>=this.min.x&&n.x<=this.max.x&&t.y>=this.min.y&&n.y<=this.max.y},intersects:function(e){e=i.bounds(e);var t=this
|
||||
.min,n=this.max,r=e.min,s=e.max,u=s.x>=t.x&&r.x<=n.x,a=s.y>=t.y&&r.y<=n.y;return u&&a},isValid:function(){return!!this.min&&!!this.max}},i.bounds=function(e,t){return!e||e instanceof i.Bounds?e:new i.Bounds(e,t)},i.Transformation=function(e,t,n,r){this._a=e,this._b=t,this._c=n,this._d=r},i.Transformation.prototype={transform:function(e,t){return this._transform(e.clone(),t)},_transform:function(e,t){return t=t||1,e.x=t*(this._a*e.x+this._b),e.y=t*(this._c*e.y+this._d),e},untransform:function(e,t){return t=t||1,new i.Point((e.x/t-this._b)/this._a,(e.y/t-this._d)/this._c)}},i.DomUtil={get:function(e){return"string"==typeof e?t.getElementById(e):e},getStyle:function(e,n){var r=e.style[n];if(!r&&e.currentStyle&&(r=e.currentStyle[n]),(!r||"auto"===r)&&t.defaultView){var i=t.defaultView.getComputedStyle(e,null);r=i?i[n]:null}return"auto"===r?null:r},getViewportOffset:function(e){var n,r=0,s=0,u=e,a=t.body,f=t.documentElement,l=i.Browser.ie7;do{if(r+=u.offsetTop||0,s+=u.offsetLeft||0,r+=parseInt
|
||||
(i.DomUtil.getStyle(u,"borderTopWidth"),10)||0,s+=parseInt(i.DomUtil.getStyle(u,"borderLeftWidth"),10)||0,n=i.DomUtil.getStyle(u,"position"),u.offsetParent===a&&"absolute"===n)break;if("fixed"===n){r+=a.scrollTop||f.scrollTop||0,s+=a.scrollLeft||f.scrollLeft||0;break}if("relative"===n&&!u.offsetLeft){var c=i.DomUtil.getStyle(u,"width"),h=i.DomUtil.getStyle(u,"max-width"),p=u.getBoundingClientRect();("none"!==c||"none"!==h)&&(s+=p.left+u.clientLeft),r+=p.top+(a.scrollTop||f.scrollTop||0);break}u=u.offsetParent}while(u);u=e;do{if(u===a)break;r-=u.scrollTop||0,s-=u.scrollLeft||0,i.DomUtil.documentIsLtr()||!i.Browser.webkit&&!l||(s+=u.scrollWidth-u.clientWidth,l&&"hidden"!==i.DomUtil.getStyle(u,"overflow-y")&&"hidden"!==i.DomUtil.getStyle(u,"overflow")&&(s+=17)),u=u.parentNode}while(u);return new i.Point(s,r)},documentIsLtr:function(){return i.DomUtil._docIsLtrCached||(i.DomUtil._docIsLtrCached=!0,i.DomUtil._docIsLtr="ltr"===i.DomUtil.getStyle(t.body,"direction")),i.DomUtil._docIsLtr},create
|
||||
:function(e,n,r){var i=t.createElement(e);return i.className=n,r&&r.appendChild(i),i},disableTextSelection:function(){t.selection&&t.selection.empty&&t.selection.empty(),this._onselectstart||(this._onselectstart=t.onselectstart||null,t.onselectstart=i.Util.falseFn)},enableTextSelection:function(){t.onselectstart===i.Util.falseFn&&(t.onselectstart=this._onselectstart,this._onselectstart=null)},hasClass:function(e,t){return e.className.length>0&&(new RegExp("(^|\\s)"+t+"(\\s|$)")).test(e.className)},addClass:function(e,t){i.DomUtil.hasClass(e,t)||(e.className+=(e.className?" ":"")+t)},removeClass:function(e,t){e.className=i.Util.trim((" "+e.className+" ").replace(" "+t+" "," "))},setOpacity:function(e,t){if("opacity"in e.style)e.style.opacity=t;else if("filter"in e.style){var n=!1,r="DXImageTransform.Microsoft.Alpha";try{n=e.filters.item(r)}catch(i){if(1===t)return}t=Math.round(100*t),n?(n.Enabled=100!==t,n.Opacity=t):e.style.filter+=" progid:"+r+"(opacity="+t+")"}},testProp:function(e){for(
|
||||
var n=t.documentElement.style,r=0;r<e.length;r++)if(e[r]in n)return e[r];return!1},getTranslateString:function(e){var t=i.Browser.webkit3d,n="translate"+(t?"3d":"")+"(",r=(t?",0":"")+")";return n+e.x+"px,"+e.y+"px"+r},getScaleString:function(e,t){var n=i.DomUtil.getTranslateString(t.add(t.multiplyBy(-1*e))),r=" scale("+e+") ";return n+r},setPosition:function(e,t,n){e._leaflet_pos=t,!n&&i.Browser.any3d?(e.style[i.DomUtil.TRANSFORM]=i.DomUtil.getTranslateString(t),i.Browser.mobileWebkit3d&&(e.style.WebkitBackfaceVisibility="hidden")):(e.style.left=t.x+"px",e.style.top=t.y+"px")},getPosition:function(e){return e._leaflet_pos}},i.DomUtil.TRANSFORM=i.DomUtil.testProp(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),i.DomUtil.TRANSITION=i.DomUtil.testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),i.DomUtil.TRANSITION_END="webkitTransition"===i.DomUtil.TRANSITION||"OTransition"===i.DomUtil.TRANSITION?i.DomUtil.TRANSITION+"End":"transitionend"
|
||||
,i.LatLng=function(e,t){var n=parseFloat(e),r=parseFloat(t);if(isNaN(n)||isNaN(r))throw new Error("Invalid LatLng object: ("+e+", "+t+")");this.lat=n,this.lng=r},i.extend(i.LatLng,{DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,MAX_MARGIN:1e-9}),i.LatLng.prototype={equals:function(e){if(!e)return!1;e=i.latLng(e);var t=Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng));return t<=i.LatLng.MAX_MARGIN},toString:function(e){return"LatLng("+i.Util.formatNum(this.lat,e)+", "+i.Util.formatNum(this.lng,e)+")"},distanceTo:function(e){e=i.latLng(e);var t=6378137,n=i.LatLng.DEG_TO_RAD,r=(e.lat-this.lat)*n,s=(e.lng-this.lng)*n,u=this.lat*n,a=e.lat*n,f=Math.sin(r/2),l=Math.sin(s/2),c=f*f+l*l*Math.cos(u)*Math.cos(a);return 2*t*Math.atan2(Math.sqrt(c),Math.sqrt(1-c))},wrap:function(e,t){var n=this.lng;return e=e||-180,t=t||180,n=(n+t)%(t-e)+(e>n||n===t?t:e),new i.LatLng(this.lat,n)}},i.latLng=function(e,t){return e instanceof i.LatLng?e:i.Util.isArray(e)?new i.LatLng(e[0],e[1]):e===n||null===e?
|
||||
e:"object"==typeof e&&"lat"in e?new i.LatLng(e.lat,"lng"in e?e.lng:e.lon):new i.LatLng(e,t)},i.LatLngBounds=function(e,t){if(e)for(var n=t?[e,t]:e,r=0,i=n.length;i>r;r++)this.extend(n[r])},i.LatLngBounds.prototype={extend:function(e){return e?(e="number"==typeof e[0]||"string"==typeof e[0]||e instanceof i.LatLng?i.latLng(e):i.latLngBounds(e),e instanceof i.LatLng?this._southWest||this._northEast?(this._southWest.lat=Math.min(e.lat,this._southWest.lat),this._southWest.lng=Math.min(e.lng,this._southWest.lng),this._northEast.lat=Math.max(e.lat,this._northEast.lat),this._northEast.lng=Math.max(e.lng,this._northEast.lng)):(this._southWest=new i.LatLng(e.lat,e.lng),this._northEast=new i.LatLng(e.lat,e.lng)):e instanceof i.LatLngBounds&&(this.extend(e._southWest),this.extend(e._northEast)),this):this},pad:function(e){var t=this._southWest,n=this._northEast,r=Math.abs(t.lat-n.lat)*e,s=Math.abs(t.lng-n.lng)*e;return new i.LatLngBounds(new i.LatLng(t.lat-r,t.lng-s),new i.LatLng(n.lat+r,n.lng+s))}
|
||||
,getCenter:function(){return new i.LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new i.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new i.LatLng(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(e){e="number"==typeof e[0]||e instanceof i.LatLng?i.latLng(e):i.latLngBounds(e);var t,n,r=this._southWest,s=this._northEast;return e instanceof i.LatLngBounds?(t=e.getSouthWest(),n=e.getNorthEast()):t=n=e,t.lat>=r.lat&&n.lat<=s.lat&&t.lng>=r.lng&&n.lng<=s.lng},intersects:function(e){e=i.latLngBounds(e);var t=this._southWest,n=this._northEast,r=e.getSouthWest(),s=e.getNorthEast(),u=s.lat>=t.lat&&r.lat<=n.lat,
|
||||
a=s.lng>=t.lng&&r.lng<=n.lng;return u&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(e){return e?(e=i.latLngBounds(e),this._southWest.equals(e.getSouthWest())&&this._northEast.equals(e.getNorthEast())):!1},isValid:function(){return!!this._southWest&&!!this._northEast}},i.latLngBounds=function(e,t){return!e||e instanceof i.LatLngBounds?e:new i.LatLngBounds(e,t)},i.Projection={},i.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(e){var t=i.LatLng.DEG_TO_RAD,n=this.MAX_LATITUDE,r=Math.max(Math.min(n,e.lat),-n),s=e.lng*t,u=r*t;return u=Math.log(Math.tan(Math.PI/4+u/2)),new i.Point(s,u)},unproject:function(e){var t=i.LatLng.RAD_TO_DEG,n=e.x*t,r=(2*Math.atan(Math.exp(e.y))-Math.PI/2)*t;return new i.LatLng(r,n)}},i.Projection.LonLat={project:function(e){return new i.Point(e.lng,e.lat)},unproject:function(e){return new i.LatLng(e.y,e.x)}},i.CRS={latLngToPoint:function(e,t){var n=this.projection
|
||||
.project(e),r=this.scale(t);return this.transformation._transform(n,r)},pointToLatLng:function(e,t){var n=this.scale(t),r=this.transformation.untransform(e,n);return this.projection.unproject(r)},project:function(e){return this.projection.project(e)},scale:function(e){return 256*Math.pow(2,e)}},i.CRS.Simple=i.extend({},i.CRS,{projection:i.Projection.LonLat,transformation:new i.Transformation(1,0,-1,0),scale:function(e){return Math.pow(2,e)}}),i.CRS.EPSG3857=i.extend({},i.CRS,{code:"EPSG:3857",projection:i.Projection.SphericalMercator,transformation:new i.Transformation(.5/Math.PI,.5,-0.5/Math.PI,.5),project:function(e){var t=this.projection.project(e),n=6378137;return t.multiplyBy(n)}}),i.CRS.EPSG900913=i.extend({},i.CRS.EPSG3857,{code:"EPSG:900913"}),i.CRS.EPSG4326=i.extend({},i.CRS,{code:"EPSG:4326",projection:i.Projection.LonLat,transformation:new i.Transformation(1/360,.5,-1/360,.5)}),i.Map=i.Class.extend({includes:i.Mixin.Events,options:{crs:i.CRS.EPSG3857,fadeAnimation:i.DomUtil.TRANSITION&&!
|
||||
i.Browser.android23,trackResize:!0,markerZoomAnimation:i.DomUtil.TRANSITION&&i.Browser.any3d},initialize:function(e,t){t=i.setOptions(this,t),this._initContainer(e),this._initLayout(),this._initEvents(),t.maxBounds&&this.setMaxBounds(t.maxBounds),t.center&&t.zoom!==n&&this.setView(i.latLng(t.center),t.zoom,{reset:!0}),this._initLayers(t.layers),this._handlers=[],this.callInitHooks()},setView:function(e,t){return this._resetView(i.latLng(e),this._limitZoom(t)),this},setZoom:function(e,t){return this.setView(this.getCenter(),e,{zoom:t})},zoomIn:function(e,t){return this.setZoom(this._zoom+(e||1),t)},zoomOut:function(e,t){return this.setZoom(this._zoom-(e||1),t)},setZoomAround:function(e,t,n){var r=this.getZoomScale(t),s=this.getSize().divideBy(2),u=e instanceof i.Point?e:this.latLngToContainerPoint(e),a=u.subtract(s).multiplyBy(1-1/r),f=this.containerPointToLatLng(s.add(a));return this.setView(f,t,{zoom:n})},fitBounds:function(e,t){t=t||{},e=e.getBounds?e.getBounds():i.latLngBounds(e);var n=
|
||||
i.point(t.paddingTopLeft||t.padding||[0,0]),r=i.point(t.paddingBottomRight||t.padding||[0,0]),s=this.getBoundsZoom(e,!1,n.add(r)),u=r.subtract(n).divideBy(2),a=this.project(e.getSouthWest(),s),f=this.project(e.getNorthEast(),s),l=this.unproject(a.add(f).divideBy(2).add(u),s);return this.setView(l,s,t)},fitWorld:function(e){return this.fitBounds([[-90,-180],[90,180]],e)},panTo:function(e,t){return this.setView(e,this._zoom,{pan:t})},panBy:function(e){return this.fire("movestart"),this._rawPanBy(i.point(e)),this.fire("move"),this.fire("moveend")},setMaxBounds:function(e){if(e=i.latLngBounds(e),this.options.maxBounds=e,!e)return this._boundsMinZoom=null,this.off("moveend",this._panInsideMaxBounds,this),this;var t=this.getBoundsZoom(e,!0);return this._boundsMinZoom=t,this._loaded&&(this._zoom<t?this.setView(e.getCenter(),t):this.panInsideBounds(e)),this.on("moveend",this._panInsideMaxBounds,this),this},panInsideBounds:function(e){e=i.latLngBounds(e);var t=this.getPixelBounds(),n=t.getBottomLeft
|
||||
(),r=t.getTopRight(),s=this.project(e.getSouthWest()),u=this.project(e.getNorthEast()),a=0,f=0;return r.y<u.y&&(f=Math.ceil(u.y-r.y)),r.x>u.x&&(a=Math.floor(u.x-r.x)),n.y>s.y&&(f=Math.floor(s.y-n.y)),n.x<s.x&&(a=Math.ceil(s.x-n.x)),a||f?this.panBy([a,f]):this},addLayer:function(e){var t=i.stamp(e);return this._layers[t]?this:(this._layers[t]=e,!e.options||isNaN(e.options.maxZoom)&&isNaN(e.options.minZoom)||(this._zoomBoundLayers[t]=e,this._updateZoomLevels()),this.options.zoomAnimation&&i.TileLayer&&e instanceof i.TileLayer&&(this._tileLayersNum++,this._tileLayersToLoad++,e.on("load",this._onTileLayerLoad,this)),this._loaded&&this._layerAdd(e),this)},removeLayer:function(e){var t=i.stamp(e);if(this._layers[t])return this._loaded&&(e.onRemove(this),this.fire("layerremove",{layer:e})),delete this._layers[t],this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels()),this.options.zoomAnimation&&i.TileLayer&&e instanceof i.TileLayer&&(this._tileLayersNum--,this._tileLayersToLoad--
|
||||
,e.off("load",this._onTileLayerLoad,this)),this},hasLayer:function(e){return e?i.stamp(e)in this._layers:!1},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers[n]);return this},invalidateSize:function(e){var t=this.getSize();if(this._sizeChanged=!0,this.options.maxBounds&&this.setMaxBounds(this.options.maxBounds),!this._loaded)return this;var n=this.getSize(),r=t.subtract(n).divideBy(2).round();return(0!==r.x||0!==r.y)&&(e===!0?this.panBy(r):(this._rawPanBy(r),this.fire("move"),clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(i.bind(this.fire,this,"moveend"),200)),this.fire("resize",{oldSize:t,newSize:n})),this},addHandler:function(e,t){if(t){var n=this[e]=new t(this);return this._handlers.push(n),this.options[e]&&n.enable(),this}},remove:function(){return this._loaded&&this.fire("unload"),this._initEvents("off"),delete this._container._leaflet,this._clearPanes(),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this},getCenter:function(){
|
||||
return this._checkIfLoaded(),this._moved()?this.layerPointToLatLng(this._getCenterLayerPoint()):this._initialCenter},getZoom:function(){return this._zoom},getBounds:function(){var e=this.getPixelBounds(),t=this.unproject(e.getBottomLeft()),n=this.unproject(e.getTopRight());return new i.LatLngBounds(t,n)},getMinZoom:function(){var e=this.options.minZoom||0,t=this._layersMinZoom||0,n=this._boundsMinZoom||0;return Math.max(e,t,n)},getMaxZoom:function(){var e=this.options.maxZoom===n?1/0:this.options.maxZoom,t=this._layersMaxZoom===n?1/0:this._layersMaxZoom;return Math.min(e,t)},getBoundsZoom:function(e,t,n){e=i.latLngBounds(e);var r,s=this.getMinZoom()-(t?1:0),u=this.getMaxZoom(),a=this.getSize(),f=e.getNorthWest(),l=e.getSouthEast(),c=!0;n=i.point(n||[0,0]);do s++,r=this.project(l,s).subtract(this.project(f,s)).add(n),c=t?r.x<a.x||r.y<a.y:a.contains(r);while(c&&u>=s);return c&&t?null:t?s:s-1},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new i.Point(this._container
|
||||
.clientWidth,this._container.clientHeight),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(){var e=this._getTopLeftPoint();return new i.Bounds(e,e.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._initialTopLeftPoint},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(e){var t=this.options.crs;return t.scale(e)/t.scale(this._zoom)},getScaleZoom:function(e){return this._zoom+Math.log(e)/Math.LN2},project:function(e,t){return t=t===n?this._zoom:t,this.options.crs.latLngToPoint(i.latLng(e),t)},unproject:function(e,t){return t=t===n?this._zoom:t,this.options.crs.pointToLatLng(i.point(e),t)},layerPointToLatLng:function(e){var t=i.point(e).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(e){var t=this.project(i.latLng(e))._round();return t._subtract(this.getPixelOrigin())},containerPointToLayerPoint:function(e){return i.point(e).subtract(this._getMapPanePos
|
||||
())},layerPointToContainerPoint:function(e){return i.point(e).add(this._getMapPanePos())},containerPointToLatLng:function(e){var t=this.containerPointToLayerPoint(i.point(e));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(i.latLng(e)))},mouseEventToContainerPoint:function(e){return i.DomEvent.getMousePosition(e,this._container)},mouseEventToLayerPoint:function(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function(e){var t=this._container=i.DomUtil.get(e);if(!t)throw new Error("Map container not found.");if(t._leaflet)throw new Error("Map container is already initialized.");t._leaflet=!0},_initLayout:function(){var e=this._container;i.DomUtil.addClass(e,"leaflet-container"+(i.Browser.touch?" leaflet-touch":"")+(i.Browser.retina?" leaflet-retina":"")+(this.options
|
||||
.fadeAnimation?" leaflet-fade-anim":""));var t=i.DomUtil.getStyle(e,"position");"absolute"!==t&&"relative"!==t&&"fixed"!==t&&(e.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var e=this._panes={};this._mapPane=e.mapPane=this._createPane("leaflet-map-pane",this._container),this._tilePane=e.tilePane=this._createPane("leaflet-tile-pane",this._mapPane),e.objectsPane=this._createPane("leaflet-objects-pane",this._mapPane),e.shadowPane=this._createPane("leaflet-shadow-pane"),e.overlayPane=this._createPane("leaflet-overlay-pane"),e.markerPane=this._createPane("leaflet-marker-pane"),e.popupPane=this._createPane("leaflet-popup-pane");var t=" leaflet-zoom-hide";this.options.markerZoomAnimation||(i.DomUtil.addClass(e.markerPane,t),i.DomUtil.addClass(e.shadowPane,t),i.DomUtil.addClass(e.popupPane,t))},_createPane:function(e,t){return i.DomUtil.create("div",e,t||this._panes.objectsPane)},_clearPanes:function(){this._container.removeChild
|
||||
(this._mapPane)},_initLayers:function(e){e=e?i.Util.isArray(e)?e:[e]:[],this._layers={},this._zoomBoundLayers={},this._tileLayersNum=0;var t,n;for(t=0,n=e.length;n>t;t++)this.addLayer(e[t])},_resetView:function(e,t,n,r){var s=this._zoom!==t;r||(this.fire("movestart"),s&&this.fire("zoomstart")),this._zoom=t,this._initialCenter=e,this._initialTopLeftPoint=this._getNewTopLeftPoint(e),n?this._initialTopLeftPoint._add(this._getMapPanePos()):i.DomUtil.setPosition(this._mapPane,new i.Point(0,0)),this._tileLayersToLoad=this._tileLayersNum;var u=!this._loaded;this._loaded=!0,u&&(this.fire("load"),this.eachLayer(this._layerAdd,this)),this.fire("viewreset",{hard:!n}),this.fire("move"),(s||r)&&this.fire("zoomend"),this.fire("moveend",{hard:!n})},_rawPanBy:function(e){i.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_updateZoomLevels:function(){var e,t=1/0,r=-1/0,i=this._getZoomSpan();for(e in this._zoomBoundLayers
|
||||
){var s=this._zoomBoundLayers[e];isNaN(s.options.minZoom)||(t=Math.min(t,s.options.minZoom)),isNaN(s.options.maxZoom)||(r=Math.max(r,s.options.maxZoom))}e===n?this._layersMaxZoom=this._layersMinZoom=n:(this._layersMaxZoom=r,this._layersMinZoom=t),i!==this._getZoomSpan()&&this.fire("zoomlevelschange")},_panInsideMaxBounds:function(){this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){if(i.DomEvent){t=t||"on",i.DomEvent[t](this._container,"click",this._onMouseClick,this);var n,r,s=["dblclick","mousedown","mouseup","mouseenter","mouseleave","mousemove","contextmenu"];for(n=0,r=s.length;r>n;n++)i.DomEvent[t](this._container,s[n],this._fireMouseEvent,this);this.options.trackResize&&i.DomEvent[t](e,"resize",this._onResize,this)}},_onResize:function(){i.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=i.Util.requestAnimFrame(this.invalidateSize,this,!1,this._container)},
|
||||
_onMouseClick:function(e){!this._loaded||this.dragging&&this.dragging.moved()||(this.fire("preclick"),this._fireMouseEvent(e))},_fireMouseEvent:function(e){if(this._loaded){var t=e.type;if(t="mouseenter"===t?"mouseover":"mouseleave"===t?"mouseout":t,this.hasEventListeners(t)){"contextmenu"===t&&i.DomEvent.preventDefault(e);var n=this.mouseEventToContainerPoint(e),r=this.containerPointToLayerPoint(n),s=this.layerPointToLatLng(r);this.fire(t,{latlng:s,layerPoint:r,containerPoint:n,originalEvent:e})}}},_onTileLayerLoad:function(){this._tileLayersToLoad--,this._tileLayersNum&&!this._tileLayersToLoad&&this.fire("tilelayersload")},_clearHandlers:function(){for(var e=0,t=this._handlers.length;t>e;e++)this._handlers[e].disable()},whenReady:function(e,t){return this._loaded?e.call(t||this,this):this.on("load",e,t),this},_layerAdd:function(e){e.onAdd(this),this.fire("layeradd",{layer:e})},_getMapPanePos:function(){return i.DomUtil.getPosition(this._mapPane)},_moved:function(){var e=this._getMapPanePos
|
||||
();return e&&!e.equals([0,0])},_getTopLeftPoint:function(){return this.getPixelOrigin().subtract(this._getMapPanePos())},_getNewTopLeftPoint:function(e,t){var n=this.getSize()._divideBy(2);return this.project(e,t)._subtract(n)._round()},_latLngToNewLayerPoint:function(e,t,n){var r=this._getNewTopLeftPoint(n,t).add(this._getMapPanePos());return this.project(e,t)._subtract(r)},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(e){return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint())},_limitZoom:function(e){var t=this.getMinZoom(),n=this.getMaxZoom();return Math.max(t,Math.min(n,e))}}),i.map=function(e,t){return new i.Map(e,t)},i.Projection.Mercator={MAX_LATITUDE:85.0840591556,R_MINOR:6356752.3142,R_MAJOR:6378137,project:function(e){var t=i.LatLng.DEG_TO_RAD,n=this.MAX_LATITUDE,r=Math.max(Math.min(n,e.lat),-n),s=this.R_MAJOR,u=this.R_MINOR,a=e.lng*t*s,f=r*t,l=u/s,c=Math.sqrt(1-l*l),h=c*Math.sin(f)
|
||||
;h=Math.pow((1-h)/(1+h),.5*c);var p=Math.tan(.5*(.5*Math.PI-f))/h;return f=-u*Math.log(p),new i.Point(a,f)},unproject:function(e){for(var t,n=i.LatLng.RAD_TO_DEG,r=this.R_MAJOR,s=this.R_MINOR,u=e.x*n/r,a=s/r,f=Math.sqrt(1-a*a),l=Math.exp(-e.y/s),c=Math.PI/2-2*Math.atan(l),h=15,p=1e-7,d=h,v=.1;Math.abs(v)>p&&--d>0;)t=f*Math.sin(c),v=Math.PI/2-2*Math.atan(l*Math.pow((1-t)/(1+t),.5*f))-c,c+=v;return new i.LatLng(c*n,u)}},i.CRS.EPSG3395=i.extend({},i.CRS,{code:"EPSG:3395",projection:i.Projection.Mercator,transformation:function(){var e=i.Projection.Mercator,t=e.R_MAJOR,n=e.R_MINOR;return new i.Transformation(.5/(Math.PI*t),.5,-0.5/(Math.PI*n),.5)}()}),i.TileLayer=i.Class.extend({includes:i.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:i.Browser.mobile,updateWhenIdle:i.Browser.mobile},initialize:function(e,t){t=i.setOptions(this,t),t.detectRetina&&i.Browser.retina&&t.maxZoom>0&&(t.tileSize=Math
|
||||
.floor(t.tileSize/2),t.zoomOffset++,t.minZoom>0&&t.minZoom--,this.options.maxZoom--),t.bounds&&(t.bounds=i.latLngBounds(t.bounds)),this._url=e;var n=this.options.subdomains;"string"==typeof n&&(this.options.subdomains=n.split(""))},onAdd:function(e){this._map=e,this._animated=e.options.zoomAnimation&&i.Browser.any3d,this._initContainer(),this._createTileProto(),e.on({viewreset:this._reset,moveend:this._update},this),this._animated&&e.on({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||(this._limitedUpdate=i.Util.limitExecByInterval(this._update,150,this),e.on("move",this._limitedUpdate,this)),this._reset(),this._update()},addTo:function(e){return e.addLayer(this),this},onRemove:function(e){this._container.parentNode.removeChild(this._container),e.off({viewreset:this._reset,moveend:this._update},this),this._animated&&e.off({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||e.off("move",this._limitedUpdate,this
|
||||
),this._container=null,this._map=null},bringToFront:function(){var e=this._map._panes.tilePane;return this._container&&(e.appendChild(this._container),this._setAutoZIndex(e,Math.max)),this},bringToBack:function(){var e=this._map._panes.tilePane;return this._container&&(e.insertBefore(this._container,e.firstChild),this._setAutoZIndex(e,Math.min)),this},getAttribution:function(){return this.options.attribution},getContainer:function(){return this._container},setOpacity:function(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this},setZIndex:function(e){return this.options.zIndex=e,this._updateZIndex(),this},setUrl:function(e,t){return this._url=e,t||this.redraw(),this},redraw:function(){return this._map&&(this._reset({hard:!0}),this._update()),this},_updateZIndex:function(){this._container&&this.options.zIndex!==n&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(e,t){var n,r,i,s=e.children,o=-t(1/0,-1/0);for(r=0,i=s.length;i>r;r++)s[r]!==this.
|
||||
_container&&(n=parseInt(s[r].style.zIndex,10),isNaN(n)||(o=t(o,n)));this.options.zIndex=this._container.style.zIndex=(isFinite(o)?o:0)+t(1,-1)},_updateOpacity:function(){var e,t=this._tiles;if(i.Browser.ielt9)for(e in t)i.DomUtil.setOpacity(t[e],this.options.opacity);else i.DomUtil.setOpacity(this._container,this.options.opacity);if(i.Browser.webkit)for(e in t)t[e].style.webkitTransform+=" translate(0,0)"},_initContainer:function(){var e=this._map._panes.tilePane;if(!this._container){if(this._container=i.DomUtil.create("div","leaflet-layer"),this._updateZIndex(),this._animated){var t="leaflet-tile-container leaflet-zoom-animated";this._bgBuffer=i.DomUtil.create("div",t,this._container),this._bgBuffer.style.zIndex=1,this._tileContainer=i.DomUtil.create("div",t,this._container),this._tileContainer.style.zIndex=2}else this._tileContainer=this._container;e.appendChild(this._container),this.options.opacity<1&&this._updateOpacity()}},_reset:function(e){for(var t in this._tiles)this.fire("tileunload"
|
||||
,{tile:this._tiles[t]});this._tiles={},this._tilesToLoad=0,this.options.reuseTiles&&(this._unusedTiles=[]),this._tileContainer.innerHTML="",this._animated&&e&&e.hard&&this._clearBgBuffer(),this._initContainer()},_update:function(){if(this._map){var e=this._map.getPixelBounds(),t=this._map.getZoom(),n=this.options.tileSize;if(!(t>this.options.maxZoom||t<this.options.minZoom)){var r=i.bounds(e.min.divideBy(n)._floor(),e.max.divideBy(n)._floor());this._addTilesFromCenterOut(r),(this.options.unloadInvisibleTiles||this.options.reuseTiles)&&this._removeOtherTiles(r)}}},_addTilesFromCenterOut:function(e){var n,r,s,u=[],a=e.getCenter();for(n=e.min.y;n<=e.max.y;n++)for(r=e.min.x;r<=e.max.x;r++)s=new i.Point(r,n),this._tileShouldBeLoaded(s)&&u.push(s);var f=u.length;if(0!==f){u.sort(function(e,t){return e.distanceTo(a)-t.distanceTo(a)});var l=t.createDocumentFragment();for(this._tilesToLoad||this.fire("loading"),this._tilesToLoad+=f,r=0;f>r;r++)this._addTile(u[r],l);this._tileContainer.appendChild
|
||||
(l)}},_tileShouldBeLoaded:function(e){if(e.x+":"+e.y in this._tiles)return!1;var t=this.options;if(!t.continuousWorld){var n=this._getWrapTileNum();if(t.noWrap&&(e.x<0||e.x>=n)||e.y<0||e.y>=n)return!1}if(t.bounds){var r=t.tileSize,i=e.multiplyBy(r),s=i.add([r,r]),o=this._map.unproject(i),u=this._map.unproject(s);if(t.continuousWorld||t.noWrap||(o=o.wrap(),u=u.wrap()),!t.bounds.intersects([o,u]))return!1}return!0},_removeOtherTiles:function(e){var t,n,r,i;for(i in this._tiles)t=i.split(":"),n=parseInt(t[0],10),r=parseInt(t[1],10),(n<e.min.x||n>e.max.x||r<e.min.y||r>e.max.y)&&this._removeTile(i)},_removeTile:function(e){var t=this._tiles[e];this.fire("tileunload",{tile:t,url:t.src}),this.options.reuseTiles?(i.DomUtil.removeClass(t,"leaflet-tile-loaded"),this._unusedTiles.push(t)):t.parentNode===this._tileContainer&&this._tileContainer.removeChild(t),i.Browser.android||(t.onload=null,t.src=i.Util.emptyImageUrl),delete this._tiles[e]},_addTile:function(e,t){var n=this._getTilePos(e),r=this.
|
||||
_getTile();i.DomUtil.setPosition(r,n,i.Browser.chrome||i.Browser.android23),this._tiles[e.x+":"+e.y]=r,this._loadTile(r,e),r.parentNode!==this._tileContainer&&t.appendChild(r)},_getZoomForUrl:function(){var e=this.options,t=this._map.getZoom();return e.zoomReverse&&(t=e.maxZoom-t),t+e.zoomOffset},_getTilePos:function(e){var t=this._map.getPixelOrigin(),n=this.options.tileSize;return e.multiplyBy(n).subtract(t)},getTileUrl:function(e){return i.Util.template(this._url,i.extend({s:this._getSubdomain(e),z:e.z,x:e.x,y:e.y},this.options))},_getWrapTileNum:function(){return Math.pow(2,this._getZoomForUrl())},_adjustTilePoint:function(e){var t=this._getWrapTileNum();this.options.continuousWorld||this.options.noWrap||(e.x=(e.x%t+t)%t),this.options.tms&&(e.y=t-e.y-1),e.z=this._getZoomForUrl()},_getSubdomain:function(e){var t=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[t]},_createTileProto:function(){var e=this._tileImg=i.DomUtil.create("img","leaflet-tile");e.style
|
||||
.width=e.style.height=this.options.tileSize+"px",e.galleryimg="no"},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var e=this._unusedTiles.pop();return this._resetTile(e),e}return this._createTile()},_resetTile:function(){},_createTile:function(){var e=this._tileImg.cloneNode(!1);return e.onselectstart=e.onmousemove=i.Util.falseFn,i.Browser.ielt9&&this.options.opacity!==n&&i.DomUtil.setOpacity(e,this.options.opacity),e},_loadTile:function(e,t){e._layer=this,e.onload=this._tileOnLoad,e.onerror=this._tileOnError,this._adjustTilePoint(t),e.src=this.getTileUrl(t)},_tileLoaded:function(){this._tilesToLoad--,this._tilesToLoad||(this.fire("load"),this._animated&&(clearTimeout(this._clearBgBufferTimer),this._clearBgBufferTimer=setTimeout(i.bind(this._clearBgBuffer,this),500)))},_tileOnLoad:function(){var e=this._layer;this.src!==i.Util.emptyImageUrl&&(i.DomUtil.addClass(this,"leaflet-tile-loaded"),e.fire("tileload",{tile:this,url:this.src})),e._tileLoaded()},_tileOnError
|
||||
:function(){var e=this._layer;e.fire("tileerror",{tile:this,url:this.src});var t=e.options.errorTileUrl;t&&(this.src=t),e._tileLoaded()}}),i.tileLayer=function(e,t){return new i.TileLayer(e,t)},i.TileLayer.WMS=i.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},initialize:function(e,t){this._url=e;var n=i.extend({},this.defaultWmsParams),r=t.tileSize||this.options.tileSize;n.width=n.height=t.detectRetina&&i.Browser.retina?2*r:r;for(var s in t)this.options.hasOwnProperty(s)||(n[s]=t[s]);this.wmsParams=n,i.setOptions(this,t)},onAdd:function(e){var t=parseFloat(this.wmsParams.version)>=1.3?"crs":"srs";this.wmsParams[t]=e.options.crs.code,i.TileLayer.prototype.onAdd.call(this,e)},getTileUrl:function(e,t){var n=this._map,r=n.options.crs,s=this.options.tileSize,u=e.multiplyBy(s),a=u.add([s,s]),f=r.project(n.unproject(u,t)),l=r.project(n.unproject(a,t)),c=[f.x,l.y,l.x,f.y].join(","),h=i.Util.template(this.
|
||||
_url,{s:this._getSubdomain(e)});return h+i.Util.getParamString(this.wmsParams,h,!0)+"&BBOX="+c},setParams:function(e,t){return i.extend(this.wmsParams,e),t||this.redraw(),this}}),i.tileLayer.wms=function(e,t){return new i.TileLayer.WMS(e,t)},i.TileLayer.Canvas=i.TileLayer.extend({options:{async:!1},initialize:function(e){i.setOptions(this,e)},redraw:function(){for(var e in this._tiles)this._redrawTile(this._tiles[e]);return this},_redrawTile:function(e){this.drawTile(e,e._tilePoint,this._map._zoom)},_createTileProto:function(){var e=this._canvasProto=i.DomUtil.create("canvas","leaflet-tile");e.width=e.height=this.options.tileSize},_createTile:function(){var e=this._canvasProto.cloneNode(!1);return e.onselectstart=e.onmousemove=i.Util.falseFn,e},_loadTile:function(e,t){e._layer=this,e._tilePoint=t,this._redrawTile(e),this.options.async||this.tileDrawn(e)},drawTile:function(){},tileDrawn:function(e){this._tileOnLoad.call(e)}}),i.tileLayer.canvas=function(e){return new i.TileLayer.Canvas(e
|
||||
)},i.ImageOverlay=i.Class.extend({includes:i.Mixin.Events,options:{opacity:1},initialize:function(e,t,n){this._url=e,this._bounds=i.latLngBounds(t),i.setOptions(this,n)},onAdd:function(e){this._map=e,this._image||this._initImage(),e._panes.overlayPane.appendChild(this._image),e.on("viewreset",this._reset,this),e.options.zoomAnimation&&i.Browser.any3d&&e.on("zoomanim",this._animateZoom,this),this._reset()},onRemove:function(e){e.getPanes().overlayPane.removeChild(this._image),e.off("viewreset",this._reset,this),e.options.zoomAnimation&&e.off("zoomanim",this._animateZoom,this)},addTo:function(e){return e.addLayer(this),this},setOpacity:function(e){return this.options.opacity=e,this._updateOpacity(),this},bringToFront:function(){return this._image&&this._map._panes.overlayPane.appendChild(this._image),this},bringToBack:function(){var e=this._map._panes.overlayPane;return this._image&&e.insertBefore(this._image,e.firstChild),this},_initImage:function(){this._image=i.DomUtil.create("img","leaflet-image-layer"
|
||||
),this._map.options.zoomAnimation&&i.Browser.any3d?i.DomUtil.addClass(this._image,"leaflet-zoom-animated"):i.DomUtil.addClass(this._image,"leaflet-zoom-hide"),this._updateOpacity(),i.extend(this._image,{galleryimg:"no",onselectstart:i.Util.falseFn,onmousemove:i.Util.falseFn,onload:i.bind(this._onImageLoad,this),src:this._url})},_animateZoom:function(e){var t=this._map,n=this._image,r=t.getZoomScale(e.zoom),s=this._bounds.getNorthWest(),u=this._bounds.getSouthEast(),a=t._latLngToNewLayerPoint(s,e.zoom,e.center),f=t._latLngToNewLayerPoint(u,e.zoom,e.center)._subtract(a),l=a._add(f._multiplyBy(.5*(1-1/r)));n.style[i.DomUtil.TRANSFORM]=i.DomUtil.getTranslateString(l)+" scale("+r+") "},_reset:function(){var e=this._image,t=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),n=this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(t);i.DomUtil.setPosition(e,t),e.style.width=n.x+"px",e.style.height=n.y+"px"},_onImageLoad:function(){this.fire("load")},_updateOpacity:function(
|
||||
){i.DomUtil.setOpacity(this._image,this.options.opacity)}}),i.imageOverlay=function(e,t,n){return new i.ImageOverlay(e,t,n)},i.Icon=i.Class.extend({options:{className:""},initialize:function(e){i.setOptions(this,e)},createIcon:function(e){return this._createIcon("icon",e)},createShadow:function(e){return this._createIcon("shadow",e)},_createIcon:function(e,t){var n=this._getIconUrl(e);if(!n){if("icon"===e)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var r;return r=t&&"IMG"===t.tagName?this._createImg(n,t):this._createImg(n),this._setIconStyles(r,e),r},_setIconStyles:function(e,t){var n,r=this.options,s=i.point(r[t+"Size"]);n="shadow"===t?i.point(r.shadowAnchor||r.iconAnchor):i.point(r.iconAnchor),!n&&s&&(n=s.divideBy(2,!0)),e.className="leaflet-marker-"+t+" "+r.className,n&&(e.style.marginLeft=-n.x+"px",e.style.marginTop=-n.y+"px"),s&&(e.style.width=s.x+"px",e.style.height=s.y+"px")},_createImg:function(e,n){return i.Browser.ie6?(n||(n=t.createElement("div"
|
||||
)),n.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+e+'")'):(n||(n=t.createElement("img")),n.src=e),n},_getIconUrl:function(e){return i.Browser.retina&&this.options[e+"RetinaUrl"]?this.options[e+"RetinaUrl"]:this.options[e+"Url"]}}),i.icon=function(e){return new i.Icon(e)},i.Icon.Default=i.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]},_getIconUrl:function(e){var t=e+"Url";if(this.options[t])return this.options[t];i.Browser.retina&&"icon"===e&&(e+="-2x");var n=i.Icon.Default.imagePath;if(!n)throw new Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return n+"/marker-"+e+".png"}}),i.Icon.Default.imagePath=function(){var e,n,r,i,s,o=t.getElementsByTagName("script"),u=/[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/;for(e=0,n=o.length;n>e;e++)if(r=o[e].src,i=r.match(u))return s=r.split(u)[0],(s?s+"/":"")+"images"}(),i.Marker=i.Class.extend({includes:i.Mixin.Events,options:{icon:new i.Icon.Default,title
|
||||
:"",clickable:!0,draggable:!1,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250},initialize:function(e,t){i.setOptions(this,t),this._latlng=i.latLng(e)},onAdd:function(e){this._map=e,e.on("viewreset",this.update,this),this._initIcon(),this.update(),e.options.zoomAnimation&&e.options.markerZoomAnimation&&e.on("zoomanim",this._animateZoom,this)},addTo:function(e){return e.addLayer(this),this},onRemove:function(e){this.dragging&&this.dragging.disable(),this._removeIcon(),this.fire("remove"),e.off({viewreset:this.update,zoomanim:this._animateZoom},this),this._map=null},getLatLng:function(){return this._latlng},setLatLng:function(e){return this._latlng=i.latLng(e),this.update(),this.fire("move",{latlng:this._latlng})},setZIndexOffset:function(e){return this.options.zIndexOffset=e,this.update(),this},setIcon:function(e){return this.options.icon=e,this._map&&(this._initIcon(),this.update()),this},update:function(){if(this._icon){var e=this._map.latLngToLayerPoint(this._latlng).round();this
|
||||
._setPos(e)}return this},_initIcon:function(){var e=this.options,t=this._map,n=t.options.zoomAnimation&&t.options.markerZoomAnimation,r=n?"leaflet-zoom-animated":"leaflet-zoom-hide",s=!1,u=this._icon;if(u){var a=e.icon.createIcon(this._icon);a!==this._icon&&(this._removeIcon(),this._icon=a,u=!1)}else this._icon=e.icon.createIcon();e.title&&(this._icon.title=e.title),this._initInteraction(),s=e.opacity<1,i.DomUtil.addClass(this._icon,r),e.riseOnHover&&i.DomEvent.on(this._icon,"mouseover",this._bringToFront,this).on(this._icon,"mouseout",this._resetZIndex,this);var f=this._shadow;f?this._shadow=e.icon.createShadow(this._shadow):(this._shadow=e.icon.createShadow(),this._shadow&&(i.DomUtil.addClass(this._shadow,r),s=e.opacity<1)),s&&this._updateOpacity();var l=this._map._panes;u||l.markerPane.appendChild(this._icon),this._shadow&&!f&&l.shadowPane.appendChild(this._shadow)},_removeIcon:function(){var e=this._map._panes;this.options.riseOnHover&&i.DomEvent.off(this._icon,"mouseover",this._bringToFront
|
||||
).off(this._icon,"mouseout",this._resetZIndex),e.markerPane.removeChild(this._icon),this._shadow&&e.shadowPane.removeChild(this._shadow),this._icon=this._shadow=null},_setPos:function(e){i.DomUtil.setPosition(this._icon,e),this._shadow&&i.DomUtil.setPosition(this._shadow,e),this._zIndex=e.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(e){this._icon.style.zIndex=this._zIndex+e},_animateZoom:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);this._setPos(t)},_initInteraction:function(){if(this.options.clickable){var e=this._icon,t=["dblclick","mousedown","mouseover","mouseout","contextmenu"];i.DomUtil.addClass(e,"leaflet-clickable"),i.DomEvent.on(e,"click",this._onMouseClick,this);for(var n=0;n<t.length;n++)i.DomEvent.on(e,t[n],this._fireMouseEvent,this);i.Handler.MarkerDrag&&(this.dragging=new i.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_onMouseClick:function(e){var t=this.dragging&&this.dragging.moved
|
||||
();(this.hasEventListeners(e.type)||t)&&i.DomEvent.stopPropagation(e),t||(this.dragging&&this.dragging._enabled||!this._map.dragging||!this._map.dragging.moved())&&this.fire(e.type,{originalEvent:e,latlng:this._latlng})},_fireMouseEvent:function(e){this.fire(e.type,{originalEvent:e,latlng:this._latlng}),"contextmenu"===e.type&&this.hasEventListeners(e.type)&&i.DomEvent.preventDefault(e),"mousedown"!==e.type&&i.DomEvent.stopPropagation(e)},setOpacity:function(e){this.options.opacity=e,this._map&&this._updateOpacity()},_updateOpacity:function(){i.DomUtil.setOpacity(this._icon,this.options.opacity),this._shadow&&i.DomUtil.setOpacity(this._shadow,this.options.opacity)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)}}),i.marker=function(e,t){return new i.Marker(e,t)},i.DivIcon=i.Icon.extend({options:{iconSize:[12,12],className:"leaflet-div-icon",html:!1},createIcon:function(e){var n=e&&"DIV"===e.tagName?e:t.createElement("div"
|
||||
),r=this.options;return n.innerHTML=r.html!==!1?r.html:"",r.bgPos&&(n.style.backgroundPosition=-r.bgPos.x+"px "+ -r.bgPos.y+"px"),this._setIconStyles(n,"icon"),n},createShadow:function(){return null}}),i.divIcon=function(e){return new i.DivIcon(e)},i.Map.mergeOptions({closePopupOnClick:!0}),i.Popup=i.Class.extend({includes:i.Mixin.Events,options:{minWidth:50,maxWidth:300,maxHeight:null,autoPan:!0,closeButton:!0,offset:[0,7],autoPanPadding:[5,5],keepInView:!1,className:"",zoomAnimation:!0},initialize:function(e,t){i.setOptions(this,e),this._source=t,this._animated=i.Browser.any3d&&this.options.zoomAnimation},onAdd:function(e){this._map=e,this._container||this._initLayout(),this._updateContent();var t=e.options.fadeAnimation;t&&i.DomUtil.setOpacity(this._container,0),e._panes.popupPane.appendChild(this._container),e.on(this._getEvents(),this),this._update(),t&&i.DomUtil.setOpacity(this._container,1),this.fire("open"),e.fire("popupopen",{popup:this}),this._source&&this._source.fire("popupopen"
|
||||
,{popup:this})},addTo:function(e){return e.addLayer(this),this},openOn:function(e){return e.openPopup(this),this},onRemove:function(e){e._panes.popupPane.removeChild(this._container),i.Util.falseFn(this._container.offsetWidth),e.off(this._getEvents(),this),e.options.fadeAnimation&&i.DomUtil.setOpacity(this._container,0),this._map=null,this.fire("close"),e.fire("popupclose",{popup:this}),this._source&&this._source.fire("popupclose",{popup:this})},setLatLng:function(e){return this._latlng=i.latLng(e),this._update(),this},setContent:function(e){return this._content=e,this._update(),this},_getEvents:function(){var e={viewreset:this._updatePosition};return this._animated&&(e.zoomanim=this._zoomAnimation),("closeOnClick"in this.options?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(e.preclick=this._close),this.options.keepInView&&(e.moveend=this._adjustPan),e},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var e,t="leaflet-popup",n=t+" "+this
|
||||
.options.className+" leaflet-zoom-"+(this._animated?"animated":"hide"),r=this._container=i.DomUtil.create("div",n);this.options.closeButton&&(e=this._closeButton=i.DomUtil.create("a",t+"-close-button",r),e.href="#close",e.innerHTML="×",i.DomEvent.disableClickPropagation(e),i.DomEvent.on(e,"click",this._onCloseButtonClick,this));var s=this._wrapper=i.DomUtil.create("div",t+"-content-wrapper",r);i.DomEvent.disableClickPropagation(s),this._contentNode=i.DomUtil.create("div",t+"-content",s),i.DomEvent.on(this._contentNode,"mousewheel",i.DomEvent.stopPropagation),i.DomEvent.on(s,"contextmenu",i.DomEvent.stopPropagation),this._tipContainer=i.DomUtil.create("div",t+"-tip-container",r),this._tip=i.DomUtil.create("div",t+"-tip",this._tipContainer)},_update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},_updateContent:function(){if(this._content){if("string"==typeof
|
||||
this._content)this._contentNode.innerHTML=this._content;else{for(;this._contentNode.hasChildNodes();)this._contentNode.removeChild(this._contentNode.firstChild);this._contentNode.appendChild(this._content)}this.fire("contentupdate")}},_updateLayout:function(){var e=this._contentNode,t=e.style;t.width="",t.whiteSpace="nowrap";var n=e.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),t.width=n+1+"px",t.whiteSpace="",t.height="";var r=e.offsetHeight,s=this.options.maxHeight,u="leaflet-popup-scrolled";s&&r>s?(t.height=s+"px",i.DomUtil.addClass(e,u)):i.DomUtil.removeClass(e,u),this._containerWidth=this._container.offsetWidth},_updatePosition:function(){if(this._map){var e=this._map.latLngToLayerPoint(this._latlng),t=this._animated,n=i.point(this.options.offset);t&&i.DomUtil.setPosition(this._container,e),this._containerBottom=-n.y-(t?0:e.y),this._containerLeft=-Math.round(this._containerWidth/2)+n.x+(t?0:e.x),this._container.style.bottom=this._containerBottom+"px"
|
||||
,this._container.style.left=this._containerLeft+"px"}},_zoomAnimation:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);i.DomUtil.setPosition(this._container,t)},_adjustPan:function(){if(this.options.autoPan){var e=this._map,t=this._container.offsetHeight,n=this._containerWidth,r=new i.Point(this._containerLeft,-t-this._containerBottom);this._animated&&r._add(i.DomUtil.getPosition(this._container));var s=e.layerPointToContainerPoint(r),u=i.point(this.options.autoPanPadding),a=e.getSize(),f=0,l=0;s.x+n>a.x&&(f=s.x+n-a.x+u.x),s.x-f<0&&(f=s.x-u.x),s.y+t>a.y&&(l=s.y+t-a.y+u.y),s.y-l<0&&(l=s.y-u.y),(f||l)&&e.fire("autopanstart").panBy([f,l])}},_onCloseButtonClick:function(e){this._close(),i.DomEvent.stop(e)}}),i.popup=function(e,t){return new i.Popup(e,t)},i.Map.include({openPopup:function(e,t,n){if(this.closePopup(),!(e instanceof i.Popup)){var r=e;e=(new i.Popup(n)).setLatLng(t).setContent(r)}return this._popup=e,this.addLayer(e)},closePopup:function(e){return e&&
|
||||
e!==this._popup||(e=this._popup,this._popup=null),e&&this.removeLayer(e),this}}),i.Marker.include({openPopup:function(){return this._popup&&this._map&&!this._map.hasLayer(this._popup)&&(this._popup.setLatLng(this._latlng),this._map.openPopup(this._popup)),this},closePopup:function(){return this._popup&&this._popup._close(),this},bindPopup:function(e,t){var n=i.point(this.options.icon.options.popupAnchor||[0,0]);return n=n.add(i.Popup.prototype.options.offset),t&&t.offset&&(n=n.add(t.offset)),t=i.extend({offset:n},t),this._popup||this.on("click",this.openPopup,this).on("remove",this.closePopup,this).on("move",this._movePopup,this),e instanceof i.Popup?(i.setOptions(e,t),this._popup=e):this._popup=(new i.Popup(t,this)).setContent(e),this},setPopupContent:function(e){return this._popup&&this._popup.setContent(e),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this.openPopup).off("remove",this.closePopup).off("move",this._movePopup)),this},_movePopup:function(
|
||||
e){this._popup.setLatLng(e.latlng)}}),i.LayerGroup=i.Class.extend({initialize:function(e){this._layers={};var t,n;if(e)for(t=0,n=e.length;n>t;t++)this.addLayer(e[t])},addLayer:function(e){var t=this.getLayerId(e);return this._layers[t]=e,this._map&&this._map.addLayer(e),this},removeLayer:function(e){var t=e in this._layers?e:this.getLayerId(e);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this},hasLayer:function(e){return e?e in this._layers||this.getLayerId(e)in this._layers:!1},clearLayers:function(){return this.eachLayer(this.removeLayer,this),this},invoke:function(e){var t,n,r=Array.prototype.slice.call(arguments,1);for(t in this._layers)n=this._layers[t],n[e]&&n[e].apply(n,r);return this},onAdd:function(e){this._map=e,this.eachLayer(e.addLayer,e)},onRemove:function(e){this.eachLayer(e.removeLayer,e),this._map=null},addTo:function(e){return e.addLayer(this),this},eachLayer:function(e,t){for(var n in this._layers)e.call(t,this._layers
|
||||
[n]);return this},getLayer:function(e){return this._layers[e]},getLayers:function(){var e=[];for(var t in this._layers)e.push(this._layers[t]);return e},setZIndex:function(e){return this.invoke("setZIndex",e)},getLayerId:function(e){return i.stamp(e)}}),i.layerGroup=function(e){return new i.LayerGroup(e)},i.FeatureGroup=i.LayerGroup.extend({includes:i.Mixin.Events,statics:{EVENTS:"click dblclick mouseover mouseout mousemove contextmenu"},addLayer:function(e){return this.hasLayer(e)?this:(e.on(i.FeatureGroup.EVENTS,this._propagateEvent,this),i.LayerGroup.prototype.addLayer.call(this,e),this._popupContent&&e.bindPopup&&e.bindPopup(this._popupContent,this._popupOptions),this.fire("layeradd",{layer:e}))},removeLayer:function(e){return e in this._layers&&(e=this._layers[e]),e.off(i.FeatureGroup.EVENTS,this._propagateEvent,this),i.LayerGroup.prototype.removeLayer.call(this,e),this._popupContent&&this.invoke("unbindPopup"),this.fire("layerremove",{layer:e})},bindPopup:function(e,t){return this
|
||||
._popupContent=e,this._popupOptions=t,this.invoke("bindPopup",e,t)},setStyle:function(e){return this.invoke("setStyle",e)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var e=new i.LatLngBounds;return this.eachLayer(function(t){e.extend(t instanceof i.Marker?t.getLatLng():t.getBounds())}),e},_propagateEvent:function(e){e.layer||(e.layer=e.target),e.target=this,this.fire(e.type,e)}}),i.featureGroup=function(e){return new i.FeatureGroup(e)},i.Path=i.Class.extend({includes:[i.Mixin.Events],statics:{CLIP_PADDING:i.Browser.mobile?Math.max(0,Math.min(.5,(1280/Math.max(e.innerWidth,e.innerHeight)-1)/2)):.5},options:{stroke:!0,color:"#0033ff",dashArray:null,weight:5,opacity:.5,fill:!1,fillColor:null,fillOpacity:.2,clickable:!0},initialize:function(e){i.setOptions(this,e)},onAdd:function(e){this._map=e,this._container||(this._initElements(),this._initEvents()),this.projectLatlngs(),this._updatePath(),this
|
||||
._container&&this._map._pathRoot.appendChild(this._container),this.fire("add"),e.on({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},addTo:function(e){return e.addLayer(this),this},onRemove:function(e){e._pathRoot.removeChild(this._container),this.fire("remove"),this._map=null,i.Browser.vml&&(this._container=null,this._stroke=null,this._fill=null),e.off({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},projectLatlngs:function(){},setStyle:function(e){return i.setOptions(this,e),this._container&&this._updateStyle(),this},redraw:function(){return this._map&&(this.projectLatlngs(),this._updatePath()),this}}),i.Map.include({_updatePathViewport:function(){var e=i.Path.CLIP_PADDING,t=this.getSize(),n=i.DomUtil.getPosition(this._mapPane),r=n.multiplyBy(-1)._subtract(t.multiplyBy(e)._round()),s=r.add(t.multiplyBy(1+2*e)._round());this._pathViewport=new i.Bounds(r,s)}}),i.Path.SVG_NS="http://www.w3.org/2000/svg",i.Browser.svg=!!t.createElementNS&&!!t.createElementNS(
|
||||
i.Path.SVG_NS,"svg").createSVGRect,i.Path=i.Path.extend({statics:{SVG:i.Browser.svg},bringToFront:function(){var e=this._map._pathRoot,t=this._container;return t&&e.lastChild!==t&&e.appendChild(t),this},bringToBack:function(){var e=this._map._pathRoot,t=this._container,n=e.firstChild;return t&&n!==t&&e.insertBefore(t,n),this},getPathString:function(){},_createElement:function(e){return t.createElementNS(i.Path.SVG_NS,e)},_initElements:function(){this._map._initPathRoot(),this._initPath(),this._initStyle()},_initPath:function(){this._container=this._createElement("g"),this._path=this._createElement("path"),this._container.appendChild(this._path)},_initStyle:function(){this.options.stroke&&(this._path.setAttribute("stroke-linejoin","round"),this._path.setAttribute("stroke-linecap","round")),this.options.fill&&this._path.setAttribute("fill-rule","evenodd"),this.options.pointerEvents&&this._path.setAttribute("pointer-events",this.options.pointerEvents),this.options.clickable||this.options.pointerEvents||
|
||||
this._path.setAttribute("pointer-events","none"),this._updateStyle()},_updateStyle:function(){this.options.stroke?(this._path.setAttribute("stroke",this.options.color),this._path.setAttribute("stroke-opacity",this.options.opacity),this._path.setAttribute("stroke-width",this.options.weight),this.options.dashArray?this._path.setAttribute("stroke-dasharray",this.options.dashArray):this._path.removeAttribute("stroke-dasharray")):this._path.setAttribute("stroke","none"),this.options.fill?(this._path.setAttribute("fill",this.options.fillColor||this.options.color),this._path.setAttribute("fill-opacity",this.options.fillOpacity)):this._path.setAttribute("fill","none")},_updatePath:function(){var e=this.getPathString();e||(e="M0 0"),this._path.setAttribute("d",e)},_initEvents:function(){if(this.options.clickable){(i.Browser.svg||!i.Browser.vml)&&this._path.setAttribute("class","leaflet-clickable"),i.DomEvent.on(this._container,"click",this._onMouseClick,this);for(var e=["dblclick","mousedown","mouseover"
|
||||
,"mouseout","mousemove","contextmenu"],t=0;t<e.length;t++)i.DomEvent.on(this._container,e[t],this._fireMouseEvent,this)}},_onMouseClick:function(e){this._map.dragging&&this._map.dragging.moved()||this._fireMouseEvent(e)},_fireMouseEvent:function(e){if(this.hasEventListeners(e.type)){var t=this._map,n=t.mouseEventToContainerPoint(e),r=t.containerPointToLayerPoint(n),s=t.layerPointToLatLng(r);this.fire(e.type,{latlng:s,layerPoint:r,containerPoint:n,originalEvent:e}),"contextmenu"===e.type&&i.DomEvent.preventDefault(e),"mousemove"!==e.type&&i.DomEvent.stopPropagation(e)}}}),i.Map.include({_initPathRoot:function(){this._pathRoot||(this._pathRoot=i.Path.prototype._createElement("svg"),this._panes.overlayPane.appendChild(this._pathRoot),this.options.zoomAnimation&&i.Browser.any3d?(this._pathRoot.setAttribute("class"," leaflet-zoom-animated"),this.on({zoomanim:this._animatePathZoom,zoomend:this._endPathZoom})):this._pathRoot.setAttribute("class"," leaflet-zoom-hide"),this.on("moveend",this._updateSvgViewport
|
||||
),this._updateSvgViewport())},_animatePathZoom:function(e){var t=this.getZoomScale(e.zoom),n=this._getCenterOffset(e.center)._multiplyBy(-t)._add(this._pathViewport.min);this._pathRoot.style[i.DomUtil.TRANSFORM]=i.DomUtil.getTranslateString(n)+" scale("+t+") ",this._pathZooming=!0},_endPathZoom:function(){this._pathZooming=!1},_updateSvgViewport:function(){if(!this._pathZooming){this._updatePathViewport();var e=this._pathViewport,t=e.min,n=e.max,r=n.x-t.x,s=n.y-t.y,u=this._pathRoot,a=this._panes.overlayPane;i.Browser.mobileWebkit&&a.removeChild(u),i.DomUtil.setPosition(u,t),u.setAttribute("width",r),u.setAttribute("height",s),u.setAttribute("viewBox",[t.x,t.y,r,s].join(" ")),i.Browser.mobileWebkit&&a.appendChild(u)}}}),i.Path.include({bindPopup:function(e,t){return e instanceof i.Popup?this._popup=e:((!this._popup||t)&&(this._popup=new i.Popup(t,this)),this._popup.setContent(e)),this._popupHandlersAdded||(this.on("click",this._openPopup,this).on("remove",this.closePopup,this),this._popupHandlersAdded=!0
|
||||
),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this._openPopup).off("remove",this.closePopup),this._popupHandlersAdded=!1),this},openPopup:function(e){return this._popup&&(e=e||this._latlng||this._latlngs[Math.floor(this._latlngs.length/2)],this._openPopup({latlng:e})),this},closePopup:function(){return this._popup&&this._popup._close(),this},_openPopup:function(e){this._popup.setLatLng(e.latlng),this._map.openPopup(this._popup)}}),i.Browser.vml=!i.Browser.svg&&function(){try{var e=t.createElement("div");e.innerHTML='<v:shape adj="1"/>';var n=e.firstChild;return n.style.behavior="url(#default#VML)",n&&"object"==typeof n.adj}catch(r){return!1}}(),i.Path=i.Browser.svg||!i.Browser.vml?i.Path:i.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return t.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(e){return t.createElement("<lvml:"+e+' class="lvml">')}}catch(e){return function(e){return t.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">'
|
||||
)}}}(),_initPath:function(){var e=this._container=this._createElement("shape");i.DomUtil.addClass(e,"leaflet-vml-shape"),this.options.clickable&&i.DomUtil.addClass(e,"leaflet-clickable"),e.coordsize="1 1",this._path=this._createElement("path"),e.appendChild(this._path),this._map._pathRoot.appendChild(e)},_initStyle:function(){this._updateStyle()},_updateStyle:function(){var e=this._stroke,t=this._fill,n=this.options,r=this._container;r.stroked=n.stroke,r.filled=n.fill,n.stroke?(e||(e=this._stroke=this._createElement("stroke"),e.endcap="round",r.appendChild(e)),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,e.dashStyle=n.dashArray?n.dashArray instanceof Array?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):""):e&&(r.removeChild(e),this._stroke=null),n.fill?(t||(t=this._fill=this._createElement("fill"),r.appendChild(t)),t.color=n.fillColor||n.color,t.opacity=n.fillOpacity):t&&(r.removeChild(t),this._fill=null)},_updatePath:function(){var e=this._container.style;e.display="none"
|
||||
,this._path.v=this.getPathString()+" ",e.display=""}}),i.Map.include(i.Browser.svg||!i.Browser.vml?{}:{_initPathRoot:function(){if(!this._pathRoot){var e=this._pathRoot=t.createElement("div");e.className="leaflet-vml-container",this._panes.overlayPane.appendChild(e),this.on("moveend",this._updatePathViewport),this._updatePathViewport()}}}),i.Browser.canvas=function(){return!!t.createElement("canvas").getContext}(),i.Path=i.Path.SVG&&!e.L_PREFER_CANVAS||!i.Browser.canvas?i.Path:i.Path.extend({statics:{CANVAS:!0,SVG:!1},redraw:function(){return this._map&&(this.projectLatlngs(),this._requestUpdate()),this},setStyle:function(e){return i.setOptions(this,e),this._map&&(this._updateStyle(),this._requestUpdate()),this},onRemove:function(e){e.off("viewreset",this.projectLatlngs,this).off("moveend",this._updatePath,this),this.options.clickable&&(this._map.off("click",this._onClick,this),this._map.off("mousemove",this._onMouseMove,this)),this._requestUpdate(),this._map=null},_requestUpdate:function(
|
||||
){this._map&&!i.Path._updateRequest&&(i.Path._updateRequest=i.Util.requestAnimFrame(this._fireMapMoveEnd,this._map))},_fireMapMoveEnd:function(){i.Path._updateRequest=null,this.fire("moveend")},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var e=this.options;e.stroke&&(this._ctx.lineWidth=e.weight,this._ctx.strokeStyle=e.color),e.fill&&(this._ctx.fillStyle=e.fillColor||e.color)},_drawPath:function(){var e,t,n,r,s,u;for(this._ctx.beginPath(),e=0,n=this._parts.length;n>e;e++){for(t=0,r=this._parts[e].length;r>t;t++)s=this._parts[e][t],u=(0===t?"move":"line")+"To",this._ctx[u](s.x,s.y);this instanceof i.Polygon&&this._ctx.closePath()}},_checkIfEmpty:function(){return!this._parts.length},_updatePath:function(){if(!this._checkIfEmpty()){var e=this._ctx,t=this.options;this._drawPath(),e.save(),this._updateStyle(),t.fill&&(e.globalAlpha=t.fillOpacity,e.fill()),t.stroke&&(e.globalAlpha=t.opacity,e.stroke()),e.restore()}},_initEvents:function(
|
||||
){this.options.clickable&&(this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onClick,this))},_onClick:function(e){this._containsPoint(e.layerPoint)&&this.fire("click",e)},_onMouseMove:function(e){this._map&&!this._map._animatingZoom&&(this._containsPoint(e.layerPoint)?(this._ctx.canvas.style.cursor="pointer",this._mouseInside=!0,this.fire("mouseover",e)):this._mouseInside&&(this._ctx.canvas.style.cursor="",this._mouseInside=!1,this.fire("mouseout",e)))}}),i.Map.include(i.Path.SVG&&!e.L_PREFER_CANVAS||!i.Browser.canvas?{}:{_initPathRoot:function(){var e,n=this._pathRoot;n||(n=this._pathRoot=t.createElement("canvas"),n.style.position="absolute",e=this._canvasCtx=n.getContext("2d"),e.lineCap="round",e.lineJoin="round",this._panes.overlayPane.appendChild(n),this.options.zoomAnimation&&(this._pathRoot.className="leaflet-zoom-animated",this.on("zoomanim",this._animatePathZoom),this.on("zoomend",this._endPathZoom)),this.on("moveend",this._updateCanvasViewport),this._updateCanvasViewport
|
||||
())},_updateCanvasViewport:function(){if(!this._pathZooming){this._updatePathViewport();var e=this._pathViewport,t=e.min,n=e.max.subtract(t),r=this._pathRoot;i.DomUtil.setPosition(r,t),r.width=n.x,r.height=n.y,r.getContext("2d").translate(-t.x,-t.y)}}}),i.LineUtil={simplify:function(e,t){if(!t||!e.length)return e.slice();var n=t*t;return e=this._reducePoints(e,n),e=this._simplifyDP(e,n)},pointToSegmentDistance:function(e,t,n){return Math.sqrt(this._sqClosestPointOnSegment(e,t,n,!0))},closestPointOnSegment:function(e,t,n){return this._sqClosestPointOnSegment(e,t,n)},_simplifyDP:function(e,t){var r=e.length,i=typeof Uint8Array!=n+""?Uint8Array:Array,s=new i(r);s[0]=s[r-1]=1,this._simplifyDPStep(e,s,t,0,r-1);var o,u=[];for(o=0;r>o;o++)s[o]&&u.push(e[o]);return u},_simplifyDPStep:function(e,t,n,r,i){var s,o,u,a=0;for(o=r+1;i-1>=o;o++)u=this._sqClosestPointOnSegment(e[o],e[r],e[i],!0),u>a&&(s=o,a=u);a>n&&(t[s]=1,this._simplifyDPStep(e,t,n,r,s),this._simplifyDPStep(e,t,n,s,i))},_reducePoints:
|
||||
function(e,t){for(var n=[e[0]],r=1,i=0,s=e.length;s>r;r++)this._sqDist(e[r],e[i])>t&&(n.push(e[r]),i=r);return s-1>i&&n.push(e[s-1]),n},clipSegment:function(e,t,n,r){var i,s,o,u=r?this._lastCode:this._getBitCode(e,n),a=this._getBitCode(t,n);for(this._lastCode=a;;){if(!(u|a))return[e,t];if(u&a)return!1;i=u||a,s=this._getEdgeIntersection(e,t,i,n),o=this._getBitCode(s,n),i===u?(e=s,u=o):(t=s,a=o)}},_getEdgeIntersection:function(e,t,n,r){var s=t.x-e.x,u=t.y-e.y,a=r.min,f=r.max;return 8&n?new i.Point(e.x+s*(f.y-e.y)/u,f.y):4&n?new i.Point(e.x+s*(a.y-e.y)/u,a.y):2&n?new i.Point(f.x,e.y+u*(f.x-e.x)/s):1&n?new i.Point(a.x,e.y+u*(a.x-e.x)/s):void 0},_getBitCode:function(e,t){var n=0;return e.x<t.min.x?n|=1:e.x>t.max.x&&(n|=2),e.y<t.min.y?n|=4:e.y>t.max.y&&(n|=8),n},_sqDist:function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},_sqClosestPointOnSegment:function(e,t,n,r){var s,u=t.x,a=t.y,f=n.x-u,l=n.y-a,c=f*f+l*l;return c>0&&(s=((e.x-u)*f+(e.y-a)*l)/c,s>1?(u=n.x,a=n.y):s>0&&(u+=f*s,a+=l*s)),f=e.x-
|
||||
u,l=e.y-a,r?f*f+l*l:new i.Point(u,a)}},i.Polyline=i.Path.extend({initialize:function(e,t){i.Path.prototype.initialize.call(this,t),this._latlngs=this._convertLatLngs(e)},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var e=0,t=this._latlngs.length;t>e;e++)this._originalPoints[e]=this._map.latLngToLayerPoint(this._latlngs[e])},getPathString:function(){for(var e=0,t=this._parts.length,n="";t>e;e++)n+=this._getPathPartStr(this._parts[e]);return n},getLatLngs:function(){return this._latlngs},setLatLngs:function(e){return this._latlngs=this._convertLatLngs(e),this.redraw()},addLatLng:function(e){return this._latlngs.push(i.latLng(e)),this.redraw()},spliceLatLngs:function(){var e=[].splice.apply(this._latlngs,arguments);return this._convertLatLngs(this._latlngs,!0),this.redraw(),e},closestLayerPoint:function(e){for(var t,n,r=1/0,s=this._parts,u=null,a=0,f=s.length;f>a;a++)for(var l=s[a],c=1,h=l.length;h>c;c++){t=l[c-1],n=l[c];var p=i.LineUtil._sqClosestPointOnSegment
|
||||
(e,t,n,!0);r>p&&(r=p,u=i.LineUtil._sqClosestPointOnSegment(e,t,n))}return u&&(u.distance=Math.sqrt(r)),u},getBounds:function(){return new i.LatLngBounds(this.getLatLngs())},_convertLatLngs:function(e,t){var n,r,s=t?e:[];for(n=0,r=e.length;r>n;n++){if(i.Util.isArray(e[n])&&"number"!=typeof e[n][0])return;s[n]=i.latLng(e[n])}return s},_initEvents:function(){i.Path.prototype._initEvents.call(this)},_getPathPartStr:function(e){for(var t,n=i.Path.VML,r=0,s=e.length,u="";s>r;r++)t=e[r],n&&t._round(),u+=(r?"L":"M")+t.x+" "+t.y;return u},_clipPoints:function(){var e,t,n,r=this._originalPoints,s=r.length;if(this.options.noClip)return this._parts=[r],void 0;this._parts=[];var u=this._parts,a=this._map._pathViewport,f=i.LineUtil;for(e=0,t=0;s-1>e;e++)n=f.clipSegment(r[e],r[e+1],a,e),n&&(u[t]=u[t]||[],u[t].push(n[0]),(n[1]!==r[e+1]||e===s-2)&&(u[t].push(n[1]),t++))},_simplifyPoints:function(){for(var e=this._parts,t=i.LineUtil,n=0,r=e.length;r>n;n++)e[n]=t.simplify(e[n],this.options.smoothFactor)},
|
||||
_updatePath:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),i.Path.prototype._updatePath.call(this))}}),i.polyline=function(e,t){return new i.Polyline(e,t)},i.PolyUtil={},i.PolyUtil.clipPolygon=function(e,t){var n,r,s,u,a,f,l,c,h,p=[1,4,2,8],d=i.LineUtil;for(r=0,l=e.length;l>r;r++)e[r]._code=d._getBitCode(e[r],t);for(u=0;4>u;u++){for(c=p[u],n=[],r=0,l=e.length,s=l-1;l>r;s=r++)a=e[r],f=e[s],a._code&c?f._code&c||(h=d._getEdgeIntersection(f,a,c,t),h._code=d._getBitCode(h,t),n.push(h)):(f._code&c&&(h=d._getEdgeIntersection(f,a,c,t),h._code=d._getBitCode(h,t),n.push(h)),n.push(a));e=n}return e},i.Polygon=i.Polyline.extend({options:{fill:!0},initialize:function(e,t){var n,r,s;if(i.Polyline.prototype.initialize.call(this,e,t),e&&i.Util.isArray(e[0])&&"number"!=typeof e[0][0])for(this._latlngs=this._convertLatLngs(e[0]),this._holes=e.slice(1),n=0,r=this._holes.length;r>n;n++)s=this._holes[n]=this._convertLatLngs(this._holes[n]),s[0].equals(s[s.length-1])&&s.pop();e=this._latlngs
|
||||
,e.length>=2&&e[0].equals(e[e.length-1])&&e.pop()},projectLatlngs:function(){if(i.Polyline.prototype.projectLatlngs.call(this),this._holePoints=[],this._holes){var e,t,n,r;for(e=0,n=this._holes.length;n>e;e++)for(this._holePoints[e]=[],t=0,r=this._holes[e].length;r>t;t++)this._holePoints[e][t]=this._map.latLngToLayerPoint(this._holes[e][t])}},_clipPoints:function(){var e=this._originalPoints,t=[];if(this._parts=[e].concat(this._holePoints),!this.options.noClip){for(var n=0,r=this._parts.length;r>n;n++){var s=i.PolyUtil.clipPolygon(this._parts[n],this._map._pathViewport);s.length&&t.push(s)}this._parts=t}},_getPathPartStr:function(e){var t=i.Polyline.prototype._getPathPartStr.call(this,e);return t+(i.Browser.svg?"z":"x")}}),i.polygon=function(e,t){return new i.Polygon(e,t)},function(){function e(e){return i.FeatureGroup.extend({initialize:function(e,t){this._layers={},this._options=t,this.setLatLngs(e)},setLatLngs:function(t){var n=0,r=t.length;for(this.eachLayer(function(e){r>n?e.setLatLngs
|
||||
(t[n++]):this.removeLayer(e)},this);r>n;)this.addLayer(new e(t[n++],this._options));return this}})}i.MultiPolyline=e(i.Polyline),i.MultiPolygon=e(i.Polygon),i.multiPolyline=function(e,t){return new i.MultiPolyline(e,t)},i.multiPolygon=function(e,t){return new i.MultiPolygon(e,t)}}(),i.Rectangle=i.Polygon.extend({initialize:function(e,t){i.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(e),t)},setBounds:function(e){this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function(e){return e=i.latLngBounds(e),[e.getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}}),i.rectangle=function(e,t){return new i.Rectangle(e,t)},i.Circle=i.Path.extend({initialize:function(e,t,n){i.Path.prototype.initialize.call(this,n),this._latlng=i.latLng(e),this._mRadius=t},options:{fill:!0},setLatLng:function(e){return this._latlng=i.latLng(e),this.redraw()},setRadius:function(e){return this._mRadius=e,this.redraw()},projectLatlngs:function(){var e=this._getLngRadius(),t=this._latlng
|
||||
,n=this._map.latLngToLayerPoint([t.lat,t.lng-e]);this._point=this._map.latLngToLayerPoint(t),this._radius=Math.max(this._point.x-n.x,1)},getBounds:function(){var e=this._getLngRadius(),t=360*(this._mRadius/40075017),n=this._latlng;return new i.LatLngBounds([n.lat-t,n.lng-e],[n.lat+t,n.lng+e])},getLatLng:function(){return this._latlng},getPathString:function(){var e=this._point,t=this._radius;return this._checkIfEmpty()?"":i.Browser.svg?"M"+e.x+","+(e.y-t)+"A"+t+","+t+",0,1,1,"+(e.x-.1)+","+(e.y-t)+" z":(e._round(),t=Math.round(t),"AL "+e.x+","+e.y+" "+t+","+t+" 0,"+23592600)},getRadius:function(){return this._mRadius},_getLatRadius:function(){return 360*(this._mRadius/40075017)},_getLngRadius:function(){return this._getLatRadius()/Math.cos(i.LatLng.DEG_TO_RAD*this._latlng.lat)},_checkIfEmpty:function(){if(!this._map)return!1;var e=this._map._pathViewport,t=this._radius,n=this._point;return n.x-t>e.max.x||n.y-t>e.max.y||n.x+t<e.min.x||n.y+t<e.min.y}}),i.circle=function(e,t,n){return new
|
||||
i.Circle(e,t,n)},i.CircleMarker=i.Circle.extend({options:{radius:10,weight:2},initialize:function(e,t){i.Circle.prototype.initialize.call(this,e,null,t),this._radius=this.options.radius},projectLatlngs:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_updateStyle:function(){i.Circle.prototype._updateStyle.call(this),this.setRadius(this.options.radius)},setRadius:function(e){return this.options.radius=this._radius=e,this.redraw()}}),i.circleMarker=function(e,t){return new i.CircleMarker(e,t)},i.Polyline.include(i.Path.CANVAS?{_containsPoint:function(e,t){var n,r,s,u,a,f,l,c=this.options.weight/2;for(i.Browser.touch&&(c+=10),n=0,u=this._parts.length;u>n;n++)for(l=this._parts[n],r=0,a=l.length,s=a-1;a>r;s=r++)if((t||0!==r)&&(f=i.LineUtil.pointToSegmentDistance(e,l[s],l[r]),c>=f))return!0;return!1}}:{}),i.Polygon.include(i.Path.CANVAS?{_containsPoint:function(e){var t,n,r,s,u,a,f,l,c=!1;if(i.Polyline.prototype._containsPoint.call(this,e,!0))return!0;for(s=0,f=this._parts.length
|
||||
;f>s;s++)for(t=this._parts[s],u=0,l=t.length,a=l-1;l>u;a=u++)n=t[u],r=t[a],n.y>e.y!=r.y>e.y&&e.x<(r.x-n.x)*(e.y-n.y)/(r.y-n.y)+n.x&&(c=!c);return c}}:{}),i.Circle.include(i.Path.CANVAS?{_drawPath:function(){var e=this._point;this._ctx.beginPath(),this._ctx.arc(e.x,e.y,this._radius,0,2*Math.PI,!1)},_containsPoint:function(e){var t=this._point,n=this.options.stroke?this.options.weight/2:0;return e.distanceTo(t)<=this._radius+n}}:{}),i.CircleMarker.include(i.Path.CANVAS?{_updateStyle:function(){i.Path.prototype._updateStyle.call(this)}}:{}),i.GeoJSON=i.FeatureGroup.extend({initialize:function(e,t){i.setOptions(this,t),this._layers={},e&&this.addData(e)},addData:function(e){var t,n,r=i.Util.isArray(e)?e:e.features;if(r){for(t=0,n=r.length;n>t;t++)(r[t].geometries||r[t].geometry||r[t].features)&&this.addData(r[t]);return this}var s=this.options;if(!s.filter||s.filter(e)){var u=i.GeoJSON.geometryToLayer(e,s.pointToLayer,s.coordsToLatLng);return u.feature=e,u.defaultOptions=u.options,this.resetStyle
|
||||
(u),s.onEachFeature&&s.onEachFeature(e,u),this.addLayer(u)}},resetStyle:function(e){var t=this.options.style;t&&(i.Util.extend(e.options,e.defaultOptions),this._setLayerStyle(e,t))},setStyle:function(e){this.eachLayer(function(t){this._setLayerStyle(t,e)},this)},_setLayerStyle:function(e,t){"function"==typeof t&&(t=t(e.feature)),e.setStyle&&e.setStyle(t)}}),i.extend(i.GeoJSON,{geometryToLayer:function(e,t,n){var r,s,u,a,f,l="Feature"===e.type?e.geometry:e,c=l.coordinates,h=[];switch(n=n||this.coordsToLatLng,l.type){case"Point":return r=n(c),t?t(e,r):new i.Marker(r);case"MultiPoint":for(u=0,a=c.length;a>u;u++)r=n(c[u]),f=t?t(e,r):new i.Marker(r),h.push(f);return new i.FeatureGroup(h);case"LineString":return s=this.coordsToLatLngs(c,0,n),new i.Polyline(s);case"Polygon":return s=this.coordsToLatLngs(c,1,n),new i.Polygon(s);case"MultiLineString":return s=this.coordsToLatLngs(c,1,n),new i.MultiPolyline(s);case"MultiPolygon":return s=this.coordsToLatLngs(c,2,n),new i.MultiPolygon(s);case"GeometryCollection"
|
||||
:for(u=0,a=l.geometries.length;a>u;u++)f=this.geometryToLayer({geometry:l.geometries[u],type:"Feature",properties:e.properties},t),h.push(f);return new i.FeatureGroup(h);default:throw new Error("Invalid GeoJSON object.")}},coordsToLatLng:function(e){return new i.LatLng(e[1],e[0])},coordsToLatLngs:function(e,t,n){var r,i,s,o=[];for(i=0,s=e.length;s>i;i++)r=t?this.coordsToLatLngs(e[i],t-1,n):(n||this.coordsToLatLng)(e[i]),o.push(r);return o},latLngToCoords:function(e){return[e.lng,e.lat]},latLngsToCoords:function(e){for(var t=[],n=0,r=e.length;r>n;n++)t.push(i.GeoJSON.latLngToCoords(e[n]));return t}}),i.Marker.include({toGeoJSON:function(){return{type:"Point",coordinates:i.GeoJSON.latLngToCoords(this.getLatLng())}}}),i.Polyline.include({toGeoJSON:function(){return{type:"LineString",coordinates:i.GeoJSON.latLngsToCoords(this.getLatLngs())}}}),i.Polygon.include({toGeoJSON:function(){var e,t,n,r=[i.GeoJSON.latLngsToCoords(this.getLatLngs())];if(r[0].push(r[0][0]),this._holes)for(e=0,t=this._holes
|
||||
.length;t>e;e++)n=i.GeoJSON.latLngsToCoords(this._holes[e]),n.push(n[0]),r.push(n);return{type:"Polygon",coordinates:r}}}),function(){function e(e,t){e.include({toGeoJSON:function(){var e=[];return this.eachLayer(function(t){e.push(t.toGeoJSON().coordinates)}),{type:t,coordinates:e}}})}e(i.MultiPolyline,"MultiLineString"),e(i.MultiPolygon,"MultiPolygon")}(),i.LayerGroup.include({toGeoJSON:function(){var e=[];return this.eachLayer(function(t){t.toGeoJSON&&e.push(t.toGeoJSON())}),{type:"GeometryCollection",geometries:e}}}),i.geoJson=function(e,t){return new i.GeoJSON(e,t)},i.DomEvent={addListener:function(e,t,n,r){var s,u,a,f=i.stamp(n),l="_leaflet_"+t+f;return e[l]?this:(s=function(t){return n.call(r||e,t||i.DomEvent._getEvent())},i.Browser.msTouch&&0===t.indexOf("touch")?this.addMsTouchListener(e,t,s,f):(i.Browser.touch&&"dblclick"===t&&this.addDoubleTapListener&&this.addDoubleTapListener(e,s,f),"addEventListener"in e?"mousewheel"===t?(e.addEventListener("DOMMouseScroll",s,!1),e.addEventListener
|
||||
(t,s,!1)):"mouseenter"===t||"mouseleave"===t?(u=s,a="mouseenter"===t?"mouseover":"mouseout",s=function(t){return i.DomEvent._checkMouse(e,t)?u(t):void 0},e.addEventListener(a,s,!1)):"click"===t&&i.Browser.android?(u=s,s=function(e){return i.DomEvent._filterClick(e,u)},e.addEventListener(t,s,!1)):e.addEventListener(t,s,!1):"attachEvent"in e&&e.attachEvent("on"+t,s),e[l]=s,this))},removeListener:function(e,t,n){var r=i.stamp(n),s="_leaflet_"+t+r,u=e[s];return u?(i.Browser.msTouch&&0===t.indexOf("touch")?this.removeMsTouchListener(e,t,r):i.Browser.touch&&"dblclick"===t&&this.removeDoubleTapListener?this.removeDoubleTapListener(e,r):"removeEventListener"in e?"mousewheel"===t?(e.removeEventListener("DOMMouseScroll",u,!1),e.removeEventListener(t,u,!1)):"mouseenter"===t||"mouseleave"===t?e.removeEventListener("mouseenter"===t?"mouseover":"mouseout",u,!1):e.removeEventListener(t,u,!1):"detachEvent"in e&&e.detachEvent("on"+t,u),e[s]=null,this):this},stopPropagation:function(e){return e.stopPropagation?
|
||||
e.stopPropagation():e.cancelBubble=!0,this},disableClickPropagation:function(e){for(var t=i.DomEvent.stopPropagation,n=i.Draggable.START.length-1;n>=0;n--)i.DomEvent.addListener(e,i.Draggable.START[n],t);return i.DomEvent.addListener(e,"click",t).addListener(e,"dblclick",t)},preventDefault:function(e){return e.preventDefault?e.preventDefault():e.returnValue=!1,this},stop:function(e){return i.DomEvent.preventDefault(e).stopPropagation(e)},getMousePosition:function(e,n){var r=t.body,s=t.documentElement,u=e.pageX?e.pageX:e.clientX+r.scrollLeft+s.scrollLeft,a=e.pageY?e.pageY:e.clientY+r.scrollTop+s.scrollTop,f=new i.Point(u,a);return n?f._subtract(i.DomUtil.getViewportOffset(n)):f},getWheelDelta:function(e){var t=0;return e.wheelDelta&&(t=e.wheelDelta/120),e.detail&&(t=-e.detail/3),t},_checkMouse:function(e,t){var n=t.relatedTarget;if(!n)return!0;try{for(;n&&n!==e;)n=n.parentNode}catch(r){return!1}return n!==e},_getEvent:function(){var t=e.event;if(!t)for(var n=arguments.callee.caller;n&&(t=
|
||||
n.arguments[0],!t||e.Event!==t.constructor);)n=n.caller;return t},_filterClick:function(e,t){var n=e.timeStamp||e.originalEvent.timeStamp,r=i.DomEvent._lastClick&&n-i.DomEvent._lastClick;return r&&r>100&&400>r?(i.DomEvent.stop(e),void 0):(i.DomEvent._lastClick=n,t(e))}},i.DomEvent.on=i.DomEvent.addListener,i.DomEvent.off=i.DomEvent.removeListener,i.Draggable=i.Class.extend({includes:i.Mixin.Events,statics:{START:i.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",MSPointerDown:"touchmove"},TAP_TOLERANCE:15},initialize:function(e,t,n){this._element=e,this._dragStartTarget=t||e,this._longPress=n&&!i.Browser.msTouch},enable:function(){if(!this._enabled){for(var e=i.Draggable.START.length-1;e>=0;e--)i.DomEvent.on(this._dragStartTarget,i.Draggable.START[e],this._onDown,this);this._enabled=!0}},disable:function(){if(this._enabled){for(var e=i.Draggable.START.length-1
|
||||
;e>=0;e--)i.DomEvent.off(this._dragStartTarget,i.Draggable.START[e],this._onDown,this);this._enabled=!1,this._moved=!1}},_onDown:function(e){if(!e.shiftKey&&(1===e.which||1===e.button||e.touches)&&(i.DomEvent.preventDefault(e).stopPropagation(e),!i.Draggable._disabled)){this._simulateClick=!0;var n=e.touches&&e.touches.length||0;if(n>1)return this._simulateClick=!1,clearTimeout(this._longPressTimeout),void 0;var r=1===n?e.touches[0]:e,s=r.target;i.Browser.touch&&"a"===s.tagName.toLowerCase()&&i.DomUtil.addClass(s,"leaflet-active"),this._moved=!1,this._moving||(this._startPoint=new i.Point(r.clientX,r.clientY),this._startPos=this._newPos=i.DomUtil.getPosition(this._element),1===n&&i.Browser.touch&&this._longPress&&(this._longPressTimeout=setTimeout(i.bind(function(){var e=this._newPos&&this._newPos.distanceTo(this._startPos)||0;e<i.Draggable.TAP_TOLERANCE&&(this._simulateClick=!1,this._onUp(),this._simulateEvent("contextmenu",r))},this),1e3)),i.DomEvent.on(t,i.Draggable.MOVE[e.type],this
|
||||
._onMove,this).on(t,i.Draggable.END[e.type],this._onUp,this))}},_onMove:function(e){if(!(e.touches&&e.touches.length>1)){var n=e.touches&&1===e.touches.length?e.touches[0]:e,r=new i.Point(n.clientX,n.clientY),s=r.subtract(this._startPoint);(s.x||s.y)&&(i.DomEvent.preventDefault(e),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=i.DomUtil.getPosition(this._element).subtract(s),i.Browser.touch||(i.DomUtil.disableTextSelection(),i.DomUtil.addClass(t.body,"leaflet-dragging"))),this._newPos=this._startPos.add(s),this._moving=!0,i.Util.cancelAnimFrame(this._animRequest),this._animRequest=i.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget))}},_updatePosition:function(){this.fire("predrag"),i.DomUtil.setPosition(this._element,this._newPos),this.fire("drag")},_onUp:function(e){var n,r,s,u,a;clearTimeout(this._longPressTimeout),this._simulateClick&&e.changedTouches&&(s=this._newPos&&this._newPos.distanceTo(this._startPos)||0,n=e.changedTouches[0],r=n.target
|
||||
,"a"===r.tagName.toLowerCase()&&i.DomUtil.removeClass(r,"leaflet-active"),s<i.Draggable.TAP_TOLERANCE&&(u=!0)),i.Browser.touch||(i.DomUtil.enableTextSelection(),i.DomUtil.removeClass(t.body,"leaflet-dragging"));for(a in i.Draggable.MOVE)i.DomEvent.off(t,i.Draggable.MOVE[a],this._onMove).off(t,i.Draggable.END[a],this._onUp);this._moved&&(i.Util.cancelAnimFrame(this._animRequest),this.fire("dragend")),this._moving=!1,u&&(this._moved=!1,this._simulateEvent("click",n))},_simulateEvent:function(n,r){var i=t.createEvent("MouseEvents");i.initMouseEvent(n,!0,!0,e,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),r.target.dispatchEvent(i)}}),i.Handler=i.Class.extend({initialize:function(e){this._map=e},enable:function(){this._enabled||(this._enabled=!0,this.addHooks())},disable:function(){this._enabled&&(this._enabled=!1,this.removeHooks())},enabled:function(){return!!this._enabled}}),i.Map.mergeOptions({dragging:!0,inertia:!i.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed
|
||||
:1/0,inertiaThreshold:i.Browser.touch?32:18,easeLinearity:.25,longPress:!0,worldCopyJump:!1}),i.Map.Drag=i.Handler.extend({addHooks:function(){if(!this._draggable){var e=this._map;this._draggable=new i.Draggable(e._mapPane,e._container,e.options.longPress),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),e.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDrag,this),e.on("viewreset",this._onViewReset,this))}this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){var e=this._map;e._panAnim&&e._panAnim.stop(),e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(){if(this._map.options.inertia){var e=this._lastTime=+(new Date),t=this._lastPos=this._draggable._newPos;this._positions.push(t),this._times.push(e),e-this._times[0]>200&&(this._positions.shift(),this._times
|
||||
.shift())}this._map.fire("move").fire("drag")},_onViewReset:function(){var e=this._map.getSize()._divideBy(2),t=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=t.subtract(e).x,this._worldWidth=this._map.project([0,180]).x},_onPreDrag:function(){var e=this._worldWidth,t=Math.round(e/2),n=this._initialWorldOffset,r=this._draggable._newPos.x,i=(r-t+n)%e+t-n,s=(r+t+n)%e-t-n,o=Math.abs(i+n)<Math.abs(s+n)?i:s;this._draggable._newPos.x=o},_onDragEnd:function(){var e=this._map,t=e.options,n=+(new Date)-this._lastTime,r=!t.inertia||n>t.inertiaThreshold||!this._positions[0];if(e.fire("dragend"),r)e.fire("moveend");else{var s=this._lastPos.subtract(this._positions[0]),u=(this._lastTime+n-this._times[0])/1e3,a=t.easeLinearity,f=s.multiplyBy(a/u),l=f.distanceTo([0,0]),c=Math.min(t.inertiaMaxSpeed,l),h=f.multiplyBy(c/l),p=c/(t.inertiaDeceleration*a),d=h.multiplyBy(-p/2).round();d.x&&d.y?i.Util.requestAnimFrame(function(){e.panBy(d,{duration:p,easeLinearity:a,noMoveStart:!0})}):e.fire("moveend"
|
||||
)}}}),i.Map.addInitHook("addHandler","dragging",i.Map.Drag),i.Map.mergeOptions({doubleClickZoom:!0}),i.Map.DoubleClickZoom=i.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick)},_onDoubleClick:function(e){this.setZoomAround(e.containerPoint,this._zoom+1)}}),i.Map.addInitHook("addHandler","doubleClickZoom",i.Map.DoubleClickZoom),i.Map.mergeOptions({scrollWheelZoom:!0}),i.Map.ScrollWheelZoom=i.Handler.extend({addHooks:function(){i.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){i.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll)},_onWheelScroll:function(e){var t=i.DomEvent.getWheelDelta(e);this._delta+=t,this._lastMousePos=this._map.mouseEventToContainerPoint(e),this._startTime||(this._startTime=+(new Date));var n=Math.max(40-(+(new Date)-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(i.bind
|
||||
(this._performZoom,this),n),i.DomEvent.preventDefault(e),i.DomEvent.stopPropagation(e)},_performZoom:function(){var e=this._map,t=this._delta,n=e.getZoom();t=t>0?Math.ceil(t):Math.floor(t),t=Math.max(Math.min(t,4),-4),t=e._limitZoom(n+t)-n,this._delta=0,this._startTime=null,t&&e.setZoomAround(this._lastMousePos,n+t)}}),i.Map.addInitHook("addHandler","scrollWheelZoom",i.Map.ScrollWheelZoom),i.extend(i.DomEvent,{_touchstart:i.Browser.msTouch?"MSPointerDown":"touchstart",_touchend:i.Browser.msTouch?"MSPointerUp":"touchend",addDoubleTapListener:function(e,n,r){function s(e){var t;if(i.Browser.msTouch?(v.push(e.pointerId),t=v.length):t=e.touches.length,!(t>1)){var n=Date.now(),r=n-(a||n);f=e.touches?e.touches[0]:e,l=r>0&&c>=r,a=n}}function u(e){if(i.Browser.msTouch){var t=v.indexOf(e.pointerId);if(-1===t)return;v.splice(t,1)}if(l){if(i.Browser.msTouch){var r,s={};for(var u in f)r=f[u],s[u]="function"==typeof r?r.bind(f):r;f=s}f.type="dblclick",n(f),a=null}}var a,f,l=!1,c=250,h="_leaflet_",p=
|
||||
this._touchstart,d=this._touchend,v=[];e[h+p+r]=s,e[h+d+r]=u;var m=i.Browser.msTouch?t.documentElement:e;return e.addEventListener(p,s,!1),m.addEventListener(d,u,!1),i.Browser.msTouch&&m.addEventListener("MSPointerCancel",u,!1),this},removeDoubleTapListener:function(e,n){var r="_leaflet_";return e.removeEventListener(this._touchstart,e[r+this._touchstart+n],!1),(i.Browser.msTouch?t.documentElement:e).removeEventListener(this._touchend,e[r+this._touchend+n],!1),i.Browser.msTouch&&t.documentElement.removeEventListener("MSPointerCancel",e[r+this._touchend+n],!1),this}}),i.extend(i.DomEvent,{_msTouches:[],_msDocumentListener:!1,addMsTouchListener:function(e,t,n,r){switch(t){case"touchstart":return this.addMsTouchListenerStart(e,t,n,r);case"touchend":return this.addMsTouchListenerEnd(e,t,n,r);case"touchmove":return this.addMsTouchListenerMove(e,t,n,r);default:throw"Unknown touch event type"}},addMsTouchListenerStart:function(e,n,r,i){var s="_leaflet_",o=this._msTouches,u=function(e){for(var t=!1
|
||||
,n=0;n<o.length;n++)if(o[n].pointerId===e.pointerId){t=!0;break}t||o.push(e),e.touches=o.slice(),e.changedTouches=[e],r(e)};if(e[s+"touchstart"+i]=u,e.addEventListener("MSPointerDown",u,!1),!this._msDocumentListener){var a=function(e){for(var t=0;t<o.length;t++)if(o[t].pointerId===e.pointerId){o.splice(t,1);break}};t.documentElement.addEventListener("MSPointerUp",a,!1),t.documentElement.addEventListener("MSPointerCancel",a,!1),this._msDocumentListener=!0}return this},addMsTouchListenerMove:function(e,t,n,r){function i(e){if(e.pointerType!==e.MSPOINTER_TYPE_MOUSE||0!==e.buttons){for(var t=0;t<o.length;t++)if(o[t].pointerId===e.pointerId){o[t]=e;break}e.touches=o.slice(),e.changedTouches=[e],n(e)}}var s="_leaflet_",o=this._msTouches;return e[s+"touchmove"+r]=i,e.addEventListener("MSPointerMove",i,!1),this},addMsTouchListenerEnd:function(e,t,n,r){var i="_leaflet_",s=this._msTouches,o=function(e){for(var t=0;t<s.length;t++)if(s[t].pointerId===e.pointerId){s.splice(t,1);break}e.touches=s.slice
|
||||
(),e.changedTouches=[e],n(e)};return e[i+"touchend"+r]=o,e.addEventListener("MSPointerUp",o,!1),e.addEventListener("MSPointerCancel",o,!1),this},removeMsTouchListener:function(e,t,n){var r="_leaflet_",i=e[r+t+n];switch(t){case"touchstart":e.removeEventListener("MSPointerDown",i,!1);break;case"touchmove":e.removeEventListener("MSPointerMove",i,!1);break;case"touchend":e.removeEventListener("MSPointerUp",i,!1),e.removeEventListener("MSPointerCancel",i,!1)}return this}}),i.Map.mergeOptions({touchZoom:i.Browser.touch&&!i.Browser.android23}),i.Map.TouchZoom=i.Handler.extend({addHooks:function(){i.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){i.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(e){var n=this._map;if(e.touches&&2===e.touches.length&&!n._animatingZoom&&!this._zooming){var r=n.mouseEventToLayerPoint(e.touches[0]),s=n.mouseEventToLayerPoint(e.touches[1]),u=n._getCenterLayerPoint();this._startCenter=
|
||||
r.add(s)._divideBy(2),this._startDist=r.distanceTo(s),this._moved=!1,this._zooming=!0,this._centerOffset=u.subtract(this._startCenter),n._panAnim&&n._panAnim.stop(),i.DomEvent.on(t,"touchmove",this._onTouchMove,this).on(t,"touchend",this._onTouchEnd,this),i.DomEvent.preventDefault(e)}},_onTouchMove:function(e){var t=this._map;if(e.touches&&2===e.touches.length&&this._zooming){var n=t.mouseEventToLayerPoint(e.touches[0]),r=t.mouseEventToLayerPoint(e.touches[1]);this._scale=n.distanceTo(r)/this._startDist,this._delta=n._add(r)._divideBy(2)._subtract(this._startCenter),1!==this._scale&&(this._moved||(i.DomUtil.addClass(t._mapPane,"leaflet-touching"),t.fire("movestart").fire("zoomstart"),this._moved=!0),i.Util.cancelAnimFrame(this._animRequest),this._animRequest=i.Util.requestAnimFrame(this._updateOnMove,this,!0,this._map._container),i.DomEvent.preventDefault(e))}},_updateOnMove:function(){var e=this._map,t=this._getScaleOrigin(),n=e.layerPointToLatLng(t),r=e.getScaleZoom(this._scale);e._animateZoom
|
||||
(n,r,this._startCenter,this._scale,this._delta)},_onTouchEnd:function(){if(!this._moved||!this._zooming)return this._zooming=!1,void 0;var e=this._map;this._zooming=!1,i.DomUtil.removeClass(e._mapPane,"leaflet-touching"),i.Util.cancelAnimFrame(this._animRequest),i.DomEvent.off(t,"touchmove",this._onTouchMove).off(t,"touchend",this._onTouchEnd);var n=this._getScaleOrigin(),r=e.layerPointToLatLng(n),s=e.getZoom(),u=e.getScaleZoom(this._scale)-s,a=u>0?Math.ceil(u):Math.floor(u),f=e._limitZoom(s+a),l=e.getZoomScale(f)/this._scale;e._animateZoom(r,f,n,l)},_getScaleOrigin:function(){var e=this._centerOffset.subtract(this._delta).divideBy(this._scale);return this._startCenter.add(e)}}),i.Map.addInitHook("addHandler","touchZoom",i.Map.TouchZoom),i.Map.mergeOptions({boxZoom:!0}),i.Map.BoxZoom=i.Handler.extend({initialize:function(e){this._map=e,this._container=e._container,this._pane=e._panes.overlayPane},addHooks:function(){i.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks
|
||||
:function(){i.DomEvent.off(this._container,"mousedown",this._onMouseDown)},_onMouseDown:function(e){return!e.shiftKey||1!==e.which&&1!==e.button?!1:(i.DomUtil.disableTextSelection(),this._startLayerPoint=this._map.mouseEventToLayerPoint(e),this._box=i.DomUtil.create("div","leaflet-zoom-box",this._pane),i.DomUtil.setPosition(this._box,this._startLayerPoint),this._container.style.cursor="crosshair",i.DomEvent.on(t,"mousemove",this._onMouseMove,this).on(t,"mouseup",this._onMouseUp,this).on(t,"keydown",this._onKeyDown,this).preventDefault(e),this._map.fire("boxzoomstart"),void 0)},_onMouseMove:function(e){var t=this._startLayerPoint,n=this._box,r=this._map.mouseEventToLayerPoint(e),s=r.subtract(t),u=new i.Point(Math.min(r.x,t.x),Math.min(r.y,t.y));i.DomUtil.setPosition(n,u),n.style.width=Math.max(0,Math.abs(s.x)-4)+"px",n.style.height=Math.max(0,Math.abs(s.y)-4)+"px"},_finish:function(){this._pane.removeChild(this._box),this._container.style.cursor="",i.DomUtil.enableTextSelection(),i.DomEvent
|
||||
.off(t,"mousemove",this._onMouseMove).off(t,"mouseup",this._onMouseUp).off(t,"keydown",this._onKeyDown)},_onMouseUp:function(e){this._finish();var t=this._map,n=t.mouseEventToLayerPoint(e);if(!this._startLayerPoint.equals(n)){var r=new i.LatLngBounds(t.layerPointToLatLng(this._startLayerPoint),t.layerPointToLatLng(n));t.fitBounds(r),t.fire("boxzoomend",{boxZoomBounds:r})}},_onKeyDown:function(e){27===e.keyCode&&this._finish()}}),i.Map.addInitHook("addHandler","boxZoom",i.Map.BoxZoom),i.Map.mergeOptions({keyboard:!0,keyboardPanOffset:80,keyboardZoomOffset:1}),i.Map.Keyboard=i.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61],zoomOut:[189,109,173]},initialize:function(e){this._map=e,this._setPanOffset(e.options.keyboardPanOffset),this._setZoomOffset(e.options.keyboardZoomOffset)},addHooks:function(){var e=this._map._container;-1===e.tabIndex&&(e.tabIndex="0"),i.DomEvent.on(e,"focus",this._onFocus,this).on(e,"blur",this._onBlur,this).on(e,"mousedown",this
|
||||
._onMouseDown,this),this._map.on("focus",this._addHooks,this).on("blur",this._removeHooks,this)},removeHooks:function(){this._removeHooks();var e=this._map._container;i.DomEvent.off(e,"focus",this._onFocus,this).off(e,"blur",this._onBlur,this).off(e,"mousedown",this._onMouseDown,this),this._map.off("focus",this._addHooks,this).off("blur",this._removeHooks,this)},_onMouseDown:function(){if(!this._focused){var n=t.body,r=t.documentElement,i=n.scrollTop||r.scrollTop,s=n.scrollTop||r.scrollLeft;this._map._container.focus(),e.scrollTo(s,i)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanOffset:function(e){var t,n,r=this._panKeys={},i=this.keyCodes;for(t=0,n=i.left.length;n>t;t++)r[i.left[t]]=[-1*e,0];for(t=0,n=i.right.length;n>t;t++)r[i.right[t]]=[e,0];for(t=0,n=i.down.length;n>t;t++)r[i.down[t]]=[0,e];for(t=0,n=i.up.length;n>t;t++)r[i.up[t]]=[0,-1*e]},_setZoomOffset:function(e){var t,n,r=this._zoomKeys={},i=this
|
||||
.keyCodes;for(t=0,n=i.zoomIn.length;n>t;t++)r[i.zoomIn[t]]=e;for(t=0,n=i.zoomOut.length;n>t;t++)r[i.zoomOut[t]]=-e},_addHooks:function(){i.DomEvent.on(t,"keydown",this._onKeyDown,this)},_removeHooks:function(){i.DomEvent.off(t,"keydown",this._onKeyDown,this)},_onKeyDown:function(e){var t=e.keyCode,n=this._map;if(t in this._panKeys)n.panBy(this._panKeys[t]),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds);else{if(!(t in this._zoomKeys))return;n.setZoom(n.getZoom()+this._zoomKeys[t])}i.DomEvent.stop(e)}}),i.Map.addInitHook("addHandler","keyboard",i.Map.Keyboard),i.Handler.MarkerDrag=i.Handler.extend({initialize:function(e){this._marker=e},addHooks:function(){var e=this._marker._icon;this._draggable||(this._draggable=new i.Draggable(e,e)),this._draggable.on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this),this._draggable.enable()},removeHooks:function(){this._draggable.off("dragstart",this._onDragStart).off("drag",this._onDrag).
|
||||
off("dragend",this._onDragEnd),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(){var e=this._marker,t=e._shadow,n=i.DomUtil.getPosition(e._icon),r=e._map.layerPointToLatLng(n);t&&i.DomUtil.setPosition(t,n),e._latlng=r,e.fire("move",{latlng:r}).fire("drag")},_onDragEnd:function(){this._marker.fire("moveend").fire("dragend")}}),i.Control=i.Class.extend({options:{position:"topright"},initialize:function(e){i.setOptions(this,e)},getPosition:function(){return this.options.position},setPosition:function(e){var t=this._map;return t&&t.removeControl(this),this.options.position=e,t&&t.addControl(this),this},getContainer:function(){return this._container},addTo:function(e){this._map=e;var t=this._container=this.onAdd(e),n=this.getPosition(),r=e._controlCorners[n];return i.DomUtil.addClass(t,"leaflet-control"),-1!==n.indexOf("bottom")?r.insertBefore(t,
|
||||
r.firstChild):r.appendChild(t),this},removeFrom:function(e){var t=this.getPosition(),n=e._controlCorners[t];return n.removeChild(this._container),this._map=null,this.onRemove&&this.onRemove(e),this}}),i.control=function(e){return new i.Control(e)},i.Map.include({addControl:function(e){return e.addTo(this),this},removeControl:function(e){return e.removeFrom(this),this},_initControlPos:function(){function e(e,s){var u=n+e+" "+n+s;t[e+s]=i.DomUtil.create("div",u,r)}var t=this._controlCorners={},n="leaflet-",r=this._controlContainer=i.DomUtil.create("div",n+"control-container",this._container);e("top","left"),e("top","right"),e("bottom","left"),e("bottom","right")},_clearControlPos:function(){this._container.removeChild(this._controlContainer)}}),i.Control.Zoom=i.Control.extend({options:{position:"topleft"},onAdd:function(e){var t="leaflet-control-zoom",n=i.DomUtil.create("div",t+" leaflet-bar");return this._map=e,this._zoomInButton=this._createButton("+","Zoom in",t+"-in",n,this._zoomIn,this
|
||||
),this._zoomOutButton=this._createButton("-","Zoom out",t+"-out",n,this._zoomOut,this),e.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(e){e.off("zoomend zoomlevelschange",this._updateDisabled,this)},_zoomIn:function(e){this._map.zoomIn(e.shiftKey?3:1)},_zoomOut:function(e){this._map.zoomOut(e.shiftKey?3:1)},_createButton:function(e,t,n,r,s,u){var a=i.DomUtil.create("a",n,r);a.innerHTML=e,a.href="#",a.title=t;var f=i.DomEvent.stopPropagation;return i.DomEvent.on(a,"click",f).on(a,"mousedown",f).on(a,"dblclick",f).on(a,"click",i.DomEvent.preventDefault).on(a,"click",s,u),a},_updateDisabled:function(){var e=this._map,t="leaflet-disabled";i.DomUtil.removeClass(this._zoomInButton,t),i.DomUtil.removeClass(this._zoomOutButton,t),e._zoom===e.getMinZoom()&&i.DomUtil.addClass(this._zoomOutButton,t),e._zoom===e.getMaxZoom()&&i.DomUtil.addClass(this._zoomInButton,t)}}),i.Map.mergeOptions({zoomControl:!0}),i.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new
|
||||
i.Control.Zoom,this.addControl(this.zoomControl))}),i.control.zoom=function(e){return new i.Control.Zoom(e)},i.Control.Attribution=i.Control.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(e){i.setOptions(this,e),this._attributions={}},onAdd:function(e){return this._container=i.DomUtil.create("div","leaflet-control-attribution"),i.DomEvent.disableClickPropagation(this._container),e.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(e){e.off("layeradd",this._onLayerAdd).off("layerremove",this._onLayerRemove)},setPrefix:function(e){return this.options.prefix=e,this._update(),this},addAttribution:function(e){return e?(this._attributions[e]||(this._attributions[e]=0),this._attributions[e]++,this._update(),this):void 0},removeAttribution:function(e){return e?(this._attributions[e]&&(this._attributions[e]--,this
|
||||
._update()),this):void 0},_update:function(){if(this._map){var e=[];for(var t in this._attributions)this._attributions[t]&&e.push(t);var n=[];this.options.prefix&&n.push(this.options.prefix),e.length&&n.push(e.join(", ")),this._container.innerHTML=n.join(" | ")}},_onLayerAdd:function(e){e.layer.getAttribution&&this.addAttribution(e.layer.getAttribution())},_onLayerRemove:function(e){e.layer.getAttribution&&this.removeAttribution(e.layer.getAttribution())}}),i.Map.mergeOptions({attributionControl:!0}),i.Map.addInitHook(function(){this.options.attributionControl&&(this.attributionControl=(new i.Control.Attribution).addTo(this))}),i.control.attribution=function(e){return new i.Control.Attribution(e)},i.Control.Scale=i.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1},onAdd:function(e){this._map=e;var t="leaflet-control-scale",n=i.DomUtil.create("div",t),r=this.options;return this._addScales(r,t,n),e.on(r.updateWhenIdle?"moveend":"move",this
|
||||
._update,this),e.whenReady(this._update,this),n},onRemove:function(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(e,t,n){e.metric&&(this._mScale=i.DomUtil.create("div",t+"-line",n)),e.imperial&&(this._iScale=i.DomUtil.create("div",t+"-line",n))},_update:function(){var e=this._map.getBounds(),t=e.getCenter().lat,n=6378137*Math.PI*Math.cos(t*Math.PI/180),r=n*(e.getNorthEast().lng-e.getSouthWest().lng)/180,i=this._map.getSize(),s=this.options,o=0;i.x>0&&(o=r*(s.maxWidth/i.x)),this._updateScales(s,o)},_updateScales:function(e,t){e.metric&&t&&this._updateMetric(t),e.imperial&&t&&this._updateImperial(t)},_updateMetric:function(e){var t=this._getRoundNum(e);this._mScale.style.width=this._getScaleWidth(t/e)+"px",this._mScale.innerHTML=1e3>t?t+" m":t/1e3+" km"},_updateImperial:function(e){var t,n,r,i=3.2808399*e,s=this._iScale;i>5280?(t=i/5280,n=this._getRoundNum(t),s.style.width=this._getScaleWidth(n/t)+"px",s.innerHTML=n+" mi"):(r=this._getRoundNum
|
||||
(i),s.style.width=this._getScaleWidth(r/i)+"px",s.innerHTML=r+" ft")},_getScaleWidth:function(e){return Math.round(this.options.maxWidth*e)-10},_getRoundNum:function(e){var t=Math.pow(10,(Math.floor(e)+"").length-1),n=e/t;return n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1,t*n}}),i.control.scale=function(e){return new i.Control.Scale(e)},i.Control.Layers=i.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0},initialize:function(e,t,n){i.setOptions(this,n),this._layers={},this._lastZIndex=0,this._handlingClick=!1;for(var r in e)this._addLayer(e[r],r);for(r in t)this._addLayer(t[r],r,!0)},onAdd:function(e){return this._initLayout(),this._update(),e.on("layeradd",this._onLayerChange,this).on("layerremove",this._onLayerChange,this),this._container},onRemove:function(e){e.off("layeradd",this._onLayerChange).off("layerremove",this._onLayerChange)},addBaseLayer:function(e,t){return this._addLayer(e,t),this._update(),this},addOverlay:function(e,t){return this._addLayer(e,t,!0),this._update
|
||||
(),this},removeLayer:function(e){var t=i.stamp(e);return delete this._layers[t],this._update(),this},_initLayout:function(){var e="leaflet-control-layers",t=this._container=i.DomUtil.create("div",e);t.setAttribute("aria-haspopup",!0),i.Browser.touch?i.DomEvent.on(t,"click",i.DomEvent.stopPropagation):(i.DomEvent.disableClickPropagation(t),i.DomEvent.on(t,"mousewheel",i.DomEvent.stopPropagation));var n=this._form=i.DomUtil.create("form",e+"-list");if(this.options.collapsed){i.DomEvent.on(t,"mouseover",this._expand,this).on(t,"mouseout",this._collapse,this);var r=this._layersLink=i.DomUtil.create("a",e+"-toggle",t);r.href="#",r.title="Layers",i.Browser.touch?i.DomEvent.on(r,"click",i.DomEvent.stopPropagation).on(r,"click",i.DomEvent.preventDefault).on(r,"click",this._expand,this):i.DomEvent.on(r,"focus",this._expand,this),this._map.on("movestart",this._collapse,this)}else this._expand();this._baseLayersList=i.DomUtil.create("div",e+"-base",n),this._separator=i.DomUtil.create("div",e+"-separator"
|
||||
,n),this._overlaysList=i.DomUtil.create("div",e+"-overlays",n),t.appendChild(n)},_addLayer:function(e,t,n){var r=i.stamp(e);this._layers[r]={layer:e,name:t,overlay:n},this.options.autoZIndex&&e.setZIndex&&(this._lastZIndex++,e.setZIndex(this._lastZIndex))},_update:function(){if(this._container){this._baseLayersList.innerHTML="",this._overlaysList.innerHTML="";var e,t,n=!1,r=!1;for(e in this._layers)t=this._layers[e],this._addItem(t),r=r||t.overlay,n=n||!t.overlay;this._separator.style.display=r&&n?"":"none"}},_onLayerChange:function(e){var t=i.stamp(e.layer);this._layers[t]&&!this._handlingClick&&this._update()},_createRadioElement:function(e,n){var r='<input type="radio" class="leaflet-control-layers-selector" name="'+e+'"';n&&(r+=' checked="checked"'),r+="/>";var i=t.createElement("div");return i.innerHTML=r,i.firstChild},_addItem:function(e){var n,r=t.createElement("label"),s=this._map.hasLayer(e.layer);e.overlay?(n=t.createElement("input"),n.type="checkbox",n.className="leaflet-control-layers-selector"
|
||||
,n.defaultChecked=s):n=this._createRadioElement("leaflet-base-layers",s),n.layerId=i.stamp(e.layer),i.DomEvent.on(n,"click",this._onInputClick,this);var u=t.createElement("span");u.innerHTML=" "+e.name,r.appendChild(n),r.appendChild(u);var a=e.overlay?this._overlaysList:this._baseLayersList;return a.appendChild(r),r},_onInputClick:function(){var e,t,n,r,i=this._form.getElementsByTagName("input"),s=i.length;for(this._handlingClick=!0,e=0;s>e;e++)t=i[e],n=this._layers[t.layerId],t.checked&&!this._map.hasLayer(n.layer)?(this._map.addLayer(n.layer),n.overlay?this._map.fire("overlayadd",{layer:n}):r=n.layer):!t.checked&&this._map.hasLayer(n.layer)&&(this._map.removeLayer(n.layer),this._map.fire("overlayremove",{layer:n}));r&&(this._map.setZoom(this._map.getZoom()),this._map.fire("baselayerchange",{layer:r})),this._handlingClick=!1},_expand:function(){i.DomUtil.addClass(this._container,"leaflet-control-layers-expanded")},_collapse:function(){this._container.className=this._container.className
|
||||
.replace(" leaflet-control-layers-expanded","")}}),i.control.layers=function(e,t,n){return new i.Control.Layers(e,t,n)},i.PosAnimation=i.Class.extend({includes:i.Mixin.Events,run:function(e,t,n,r){this.stop(),this._el=e,this._inProgress=!0,this._newPos=t,this.fire("start"),e.style[i.DomUtil.TRANSITION]="all "+(n||.25)+"s cubic-bezier(0,0,"+(r||.5)+",1)",i.DomEvent.on(e,i.DomUtil.TRANSITION_END,this._onTransitionEnd,this),i.DomUtil.setPosition(e,t),i.Util.falseFn(e.offsetWidth),this._stepTimer=setInterval(i.bind(this._onStep,this),50)},stop:function(){this._inProgress&&(i.DomUtil.setPosition(this._el,this._getPos()),this._onTransitionEnd(),i.Util.falseFn(this._el.offsetWidth))},_onStep:function(){this._el._leaflet_pos=this._getPos(),this.fire("step")},_transformRe:/([-+]?(?:\d*\.)?\d+)\D*, ([-+]?(?:\d*\.)?\d+)\D*\)/,_getPos:function(){var t,n,r,s=this._el,u=e.getComputedStyle(s);return i.Browser.any3d?(r=u[i.DomUtil.TRANSFORM].match(this._transformRe),t=parseFloat(r[1]),n=parseFloat(r[2]
|
||||
)):(t=parseFloat(u.left),n=parseFloat(u.top)),new i.Point(t,n,!0)},_onTransitionEnd:function(){i.DomEvent.off(this._el,i.DomUtil.TRANSITION_END,this._onTransitionEnd,this),this._inProgress&&(this._inProgress=!1,this._el.style[i.DomUtil.TRANSITION]="",this._el._leaflet_pos=this._newPos,clearInterval(this._stepTimer),this.fire("step").fire("end"))}}),i.Map.include({setView:function(e,t,r){if(t=this._limitZoom(t),e=i.latLng(e),r=r||{},this._panAnim&&this._panAnim.stop(),this._loaded&&!r.reset&&r!==!0){r.animate!==n&&(r.zoom=i.extend({animate:r.animate},r.zoom),r.pan=i.extend({animate:r.animate},r.pan));var s=this._zoom!==t?this._tryAnimatedZoom&&this._tryAnimatedZoom(e,t,r.zoom):this._tryAnimatedPan(e,r.pan);if(s)return clearTimeout(this._sizeTimer),this}return this._resetView(e,t),this},panBy:function(e,t){if(e=i.point(e).round(),t=t||{},!e.x&&!e.y)return this;if(this._panAnim||(this._panAnim=new i.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd}
|
||||
,this)),t.noMoveStart||this.fire("movestart"),t.animate!==!1){i.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(e);this._panAnim.run(this._mapPane,n,t.duration||.25,t.easeLinearity)}else this._rawPanBy(e),this.fire("move").fire("moveend");return this},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){i.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(e,t){var n=this._getCenterOffset(e)._floor();return(t&&t.animate)===!0||this.getSize().contains(n)?(this.panBy(n,t),!0):!1}}),i.PosAnimation=i.DomUtil.TRANSITION?i.PosAnimation:i.PosAnimation.extend({run:function(e,t,n,r){this.stop(),this._el=e,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(r||.5,.2),this._startPos=i.DomUtil.getPosition(e),this._offset=t.subtract(this._startPos),this._startTime=+(new Date),this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(),this.
|
||||
_complete())},_animate:function(){this._animId=i.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(){var e=+(new Date)-this._startTime,t=1e3*this._duration;t>e?this._runFrame(this._easeOut(e/t)):(this._runFrame(1),this._complete())},_runFrame:function(e){var t=this._startPos.add(this._offset.multiplyBy(e));i.DomUtil.setPosition(this._el,t),this.fire("step")},_complete:function(){i.Util.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(e){return 1-Math.pow(1-e,this._easeOutPower)}}),i.Map.mergeOptions({zoomAnimation:!0,zoomAnimationThreshold:4}),i.DomUtil.TRANSITION&&i.Map.addInitHook(function(){i.DomEvent.on(this._mapPane,i.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)}),i.Map.include(i.DomUtil.TRANSITION?{_catchTransitionEnd:function(){this._animatingZoom&&this._onZoomTransitionEnd()},_tryAnimatedZoom:function(e,t,n){if(this._animatingZoom)return!0;if(n=n||{},!this.options.zoomAnimation||n.animate===!1||!i.DomUtil.TRANSITION||
|
||||
i.Browser.android23||i.Browser.mobileOpera||Math.abs(t-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(t),s=this._getCenterOffset(e)._divideBy(1-1/r),u=this._getCenterLayerPoint()._add(s);return n.animate===!0||this.getSize().contains(s)?(this.fire("movestart").fire("zoomstart"),this._animateZoom(e,t,u,r),!0):!1},_animateZoom:function(e,t,n,r,s){this._animatingZoom=!0,i.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim"),this._animateToCenter=e,this._animateToZoom=t,i.Draggable&&(i.Draggable._disabled=!0),this.fire("zoomanim",{center:e,zoom:t,origin:n,scale:r,delta:s})},_onZoomTransitionEnd:function(){this._animatingZoom=!1,i.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),this._resetView(this._animateToCenter,this._animateToZoom,!0,!0),i.Draggable&&(i.Draggable._disabled=!1)}}:{}),i.TileLayer.include({_animateZoom:function(e){var t=!1;this._animating||(this._animating=!0,t=!0),t&&this._prepareBgBuffer();var n=this._bgBuffer;t&&(clearTimeout(this.
|
||||
_clearBgBufferTimer),i.Util.falseFn(n.offsetWidth));var r=i.DomUtil.TRANSFORM,s=e.delta?i.DomUtil.getTranslateString(e.delta):n.style[r];n.style[r]=s+" "+i.DomUtil.getScaleString(e.scale,e.origin)},_endZoomAnim:function(){var e=this._tileContainer,t=this._bgBuffer;e.style.visibility="",e.style.zIndex=2,t.style.zIndex=1,i.Util.falseFn(t.offsetWidth),this._animating=!1},_clearBgBuffer:function(){var e=this._map;!e||e._animatingZoom||e.touchZoom._zooming||(this._bgBuffer.innerHTML="",this._bgBuffer.style[i.DomUtil.TRANSFORM]="")},_prepareBgBuffer:function(){var e=this._tileContainer,t=this._bgBuffer,n=this._getLoadedTilesPercentage(t),r=this._getLoadedTilesPercentage(e);return t&&n>.5&&.5>r?(e.style.visibility="hidden",this._stopLoadingImages(e),void 0):(t.style.visibility="hidden",t.style[i.DomUtil.TRANSFORM]="",this._tileContainer=t,t=this._bgBuffer=e,this._stopLoadingImages(t),void 0)},_getLoadedTilesPercentage:function(e){var t,n,r=e.getElementsByTagName("img"),i=0;for(t=0,n=r.length;n>
|
||||
t;t++)r[t].complete&&i++;return i/n},_stopLoadingImages:function(e){var t,n,r,s=Array.prototype.slice.call(e.getElementsByTagName("img"));for(t=0,n=s.length;n>t;t++)r=s[t],r.complete||(r.onload=i.Util.falseFn,r.onerror=i.Util.falseFn,r.src=i.Util.emptyImageUrl,r.parentNode.removeChild(r))}}),i.Map.include({_defaultLocateOptions:{watch:!1,setView:!1,maxZoom:1/0,timeout:1e4,maximumAge:0,enableHighAccuracy:!1},locate:function(e){if(e=this._locateOptions=i.extend(this._defaultLocateOptions,e),!navigator.geolocation)return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var t=i.bind(this._handleGeolocationResponse,this),n=i.bind(this._handleGeolocationError,this);return e.watch?this._locationWatchId=navigator.geolocation.watchPosition(t,n,e):navigator.geolocation.getCurrentPosition(t,n,e),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this}
|
||||
,_handleGeolocationError:function(e){var t=e.code,n=e.message||(1===t?"permission denied":2===t?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:t,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function(e){var t=e.coords.latitude,n=e.coords.longitude,r=new i.LatLng(t,n),s=180*e.coords.accuracy/40075017,u=s/Math.cos(i.LatLng.DEG_TO_RAD*t),a=i.latLngBounds([t-s,n-u],[t+s,n+u]),f=this._locateOptions;if(f.setView){var l=Math.min(this.getBoundsZoom(a),f.maxZoom);this.setView(r,l)}var c=i.extend({latlng:r,bounds:a},e.coords);this.fire("locationfound",c)}})}(window,document);
|
||||
+1
@@ -0,0 +1 @@
|
||||
.leaflet-cluster-anim .leaflet-marker-icon,.leaflet-cluster-anim .leaflet-marker-shadow{-webkit-transition:-webkit-transform .2s ease-out,opacity .2s ease-in;-moz-transition:-moz-transform .2s ease-out,opacity .2s ease-in;-o-transition:-o-transform .2s ease-out,opacity .2s ease-in;transition:transform .2s ease-out,opacity .2s ease-in}.marker-cluster-small{background-color:rgba(181,226,140,.6)}.marker-cluster-small div{background-color:rgba(110,204,57,.6)}.marker-cluster-medium{background-color:rgba(241,211,87,.6)}.marker-cluster-medium div{background-color:rgba(240,194,12,.6)}.marker-cluster-large{background-color:rgba(253,156,115,.6)}.marker-cluster-large div{background-color:rgba(241,128,23,.6)}.marker-cluster{background-clip:padding-box;border-radius:20px}.marker-cluster div{width:30px;height:30px;margin-left:5px;margin-top:5px;text-align:center;border-radius:15px;font:12px "Helvetica Neue",Arial,Helvetica,sans-serif}.marker-cluster span{line-height:30px}.leaflet-label{background:#1f1f1f;background-clip:padding-box;border-radius:4px;border-style:solid;border-width:0;display:block;font-weight:200;font-size:11pt;padding:5px;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;z-index:99999!important}.leaflet-label:before{border-right:6px solid #000;border-right-color:inherit;border-top:6px solid transparent;border-bottom:6px solid transparent;content:"";position:absolute;top:5px;left:-10px;display:none}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
!function(e,t){L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,polygonOptions:{}},initialize:function(e){L.Util.setOptions(this,e),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),L.FeatureGroup.prototype.initialize.call(this,[]),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null},addLayer:function(e){if(e instanceof L.LayerGroup){var t=[];for(var n in e._layers)t.push(e._layers[n]);return this.addLayers(t)}if(!this._map)return this._needsClustering.push(e),this;if(this.hasLayer(e))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(e,this._maxZoom);var r=e,i=this._map.getZoom();if(e.__parent)for(;r.__parent._zoom>=i;)r=r.__parent;return this
|
||||
._currentShownBounds.contains(r.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(e,r):this._animationAddLayerNonAnimated(e,r)),this},removeLayer:function(e){return this._map?e.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(e)),this._removeLayer(e,!0),(e._icon||e._container)&&(L.FeatureGroup.prototype.removeLayer.call(this,e),e.setOpacity&&e.setOpacity(1)),this):this:(!this._arraySplice(this._needsClustering,e)&&this.hasLayer(e)&&this._needsRemoving.push(e),this)},addLayers:function(e){var t,n,r;if(!this._map)return this._needsClustering=this._needsClustering.concat(e),this;for(t=0,n=e.length;n>t;t++)if(r=e[t],!this.hasLayer(r)&&(this._addLayer(r,this._maxZoom),r.__parent&&2===r.__parent.getChildCount())){var i=r.__parent.getAllChildMarkers(),s=i[0]===r?i[1]:i[0];L.FeatureGroup.prototype.removeLayer.call(this,s)}for(t in this._layers)r=this._layers[t],r instanceof L.MarkerCluster&&r._iconNeedsUpdate&&r._updateIcon();return this._topClusterLevel
|
||||
._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},removeLayers:function(e){var t,n,r;if(!this._map){for(t=0,n=e.length;n>t;t++)this._arraySplice(this._needsClustering,e[t]);return this}for(t=0,n=e.length;n>t;t++)r=e[t],r.__parent&&(this._removeLayer(r,!0,!0),r._icon&&(L.FeatureGroup.prototype.removeLayer.call(this,r),r.setOpacity(1)));this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds);for(t in this._layers)r=this._layers[t],r instanceof L.MarkerCluster&&r._updateIcon();return this},clearLayers:function(){this._map||(this._needsClustering=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy();for(var e in this._layers)L.FeatureGroup.prototype.removeLayer.call(this,this._layers[e]);return this.eachLayer(function(e){delete e.__parent}),this._map&&this._generateInitialClusters(),this},getBounds:function(){var e=new L.LatLngBounds;if(this._topClusterLevel)e.extend
|
||||
(this._topClusterLevel._bounds);else for(var t=this._needsClustering.length-1;t>=0;t--)e.extend(this._needsClustering[t].getLatLng());return e},eachLayer:function(e,t){var n,r=this._needsClustering.slice();for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(r),n=r.length-1;n>=0;n--)e.call(t,r[n])},hasLayer:function(e){if(!e||e._noHas)return!1;var t,n=this._needsClustering;for(t=n.length-1;t>=0;t--)if(n[t]===e)return!0;for(n=this._needsRemoving,t=n.length-1;t>=0;t--)if(n[t]===e)return!1;return!!e.__parent&&e.__parent._group===this},zoomToShowLayer:function(e,t){var n=function(){if((e._icon||e.__parent._icon)&&!this._inZoomAnimation)if(this._map.off("moveend",n,this),this.off("animationend",n,this),e._icon)t();else if(e.__parent._icon){var r=function(){this.off("spiderfied",r,this),t()};this.on("spiderfied",r,this),e.__parent.spiderfy()}};e._icon?t():e.__parent._zoom<this._map.getZoom()?(this._map.on("moveend",n,this),e._icon||this._map.panTo(e.getLatLng())):(this._map.on("moveend"
|
||||
,n,this),this.on("animationend",n,this),this._map.setView(e.getLatLng(),e.__parent._zoom+1),e.__parent.zoomToBounds())},onAdd:function(e){this._map=e;var t,n,r;for(this._gridClusters||this._generateInitialClusters(),t=0,n=this._needsRemoving.length;n>t;t++)r=this._needsRemoving[t],this._removeLayer(r);for(this._needsRemoving=[],t=0,n=this._needsClustering.length;n>t;t++)r=this._needsClustering[t],r.__parent||this._addLayer(r,this._maxZoom);this._needsClustering=[],this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),this._zoom=this._map.getZoom(),this._currentShownBounds=this._getExpandedVisibleBounds(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)},onRemove:function(e){e.off("zoomend",this._zoomEnd,this),e.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim"
|
||||
,""),this._spiderfierOnRemove&&this._spiderfierOnRemove();for(var t in this._layers)L.FeatureGroup.prototype.removeLayer.call(this,this._layers[t]);this._map=null},_arraySplice:function(e,t){for(var n=e.length-1;n>=0;n--)if(e[n]===t)return e.splice(n,1),!0},_removeLayer:function(e,t,n){var r=this._gridClusters,i=this._gridUnclustered,s=this._map;if(t)for(var o=this._maxZoom;o>=0&&i[o].removeObject(e,s.project(e.getLatLng(),o));o--);var u,a=e.__parent,f=a._markers;for(this._arraySplice(f,e);a&&(a._childCount--,!(a._zoom<0));)t&&a._childCount<=1?(u=a._markers[0]===e?a._markers[1]:a._markers[0],r[a._zoom].removeObject(a,s.project(a._cLatLng,a._zoom)),i[a._zoom].addObject(u,s.project(u.getLatLng(),a._zoom)),this._arraySplice(a.__parent._childClusters,a),a.__parent._markers.push(u),u.__parent=a.__parent,a._icon&&(L.FeatureGroup.prototype.removeLayer.call(this,a),n||(u._noHas=!0,L.FeatureGroup.prototype.addLayer.call(this,u),delete u._noHas))):(a._recalculateBounds(),n&&a._icon||a._updateIcon
|
||||
()),a=a.__parent;delete e.__parent},_propagateEvent:function(e){e.target instanceof L.MarkerCluster&&(e.type="cluster"+e.type),L.FeatureGroup.prototype._propagateEvent.call(this,e)},_defaultIconCreateFunction:function(e){var t=e.getChildCount(),n=" marker-cluster-";return n+=10>t?"small":100>t?"medium":"large",new L.DivIcon({html:"<div><span>"+t+"</span></div>",className:"marker-cluster"+n,iconSize:new L.Point(40,40)})},_bindEvents:function(){var e=null,t=this._map,n=this.options.spiderfyOnMaxZoom,r=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick;(n||i)&&this.on("clusterclick",function(e){t.getMaxZoom()===t.getZoom()?n&&e.layer.spiderfy():i&&e.layer.zoomToBounds()},this),r&&(this.on("clustermouseover",function(n){this._inZoomAnimation||(e&&t.removeLayer(e),n.layer.getChildCount()>2&&n.layer!==this._spiderfied&&(e=new L.Polygon(n.layer.getConvexHull(),this.options.polygonOptions),t.addLayer(e)))},this),this.on("clustermouseout",function(){e&&(t.removeLayer(e),e=null)}
|
||||
,this),t.on("zoomend",function(){e&&(t.removeLayer(e),e=null)},this),t.on("layerremove",function(n){e&&n.layer===this&&(t.removeLayer(e),e=null)},this))},_unbindEvents:function(){var e=this.options.spiderfyOnMaxZoom,t=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick,r=this._map;(e||n)&&this.off("clusterclick",null,this),t&&(this.off("clustermouseover",null,this),this.off("clustermouseout",null,this),r.off("zoomend",null,this),r.off("layerremove",null,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=this._map._zoom,this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var e=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,this._zoom,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,e),this._currentShownBounds=e}},_generateInitialClusters:function(){var e=this._map.getMaxZoom(),t=this.options.maxClusterRadius
|
||||
;this.options.disableClusteringAtZoom&&(e=this.options.disableClusteringAtZoom-1),this._maxZoom=e,this._gridClusters={},this._gridUnclustered={};for(var n=e;n>=0;n--)this._gridClusters[n]=new L.DistanceGrid(t),this._gridUnclustered[n]=new L.DistanceGrid(t);this._topClusterLevel=new L.MarkerCluster(this,-1)},_addLayer:function(e,t){var n,r,i=this._gridClusters,s=this._gridUnclustered;for(this.options.singleMarkerMode&&(e.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[e]}}));t>=0;t--){n=this._map.project(e.getLatLng(),t);var o=i[t].getNearObject(n);if(o)return o._addChild(e),e.__parent=o,void 0;if(o=s[t].getNearObject(n)){var u=o.__parent;u&&this._removeLayer(o,!1);var a=new L.MarkerCluster(this,t,o,e);i[t].addObject(a,this._map.project(a._cLatLng,t)),o.__parent=a,e.__parent=a;var f=a;for(r=t-1;r>u._zoom;r--)f=new L.MarkerCluster(this,r,f),i[r].addObject(f,this._map.project(o.getLatLng(),r));for(u._addChild(f),r=t;r>=0&&
|
||||
s[r].removeObject(o,this._map.project(o.getLatLng(),r));r--);return}s[t].addObject(e,n)}this._topClusterLevel._addChild(e),e.__parent=this._topClusterLevel},_mergeSplitClusters:function(){this._zoom<this._map._zoom?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,this._map._zoom)):this._zoom>this._map._zoom?(this._animationStart(),this._animationZoomOut(this._zoom,this._map._zoom)):this._moveEnd()},_getExpandedVisibleBounds:function(){if(!this.options.removeOutsideVisibleBounds)return this.getBounds();var e=this._map,t=e.getBounds(),n=t._southWest,r=t._northEast,i=L.Browser.mobile?0:Math.abs(n.lat-r.lat),s=L.Browser.mobile?0:Math.abs(n.lng-r.lng);return new L.LatLngBounds(new L.LatLng(n.lat-i,n.lng-s,!0),new L.LatLng(r.lat+i,r.lng+s,!0))},_animationAddLayerNonAnimated:function(e,t){if(t===e)e._noHas=!0,L.FeatureGroup.prototype.addLayer.call(this,e),delete
|
||||
e._noHas;else if(2===t._childCount){t._addToMap();var n=t.getAllChildMarkers();L.FeatureGroup.prototype.removeLayer.call(this,n[0]),L.FeatureGroup.prototype.removeLayer.call(this,n[1])}else t._updateIcon()}}),L.MarkerClusterGroup.include(L.DomUtil.TRANSITION?{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_animationZoomIn:function(e,t){var n,r=this,i=this._getExpandedVisibleBounds();this._topClusterLevel._recursively(i,e,0,function(s){var o,u=s._latlng,a=s._markers;for(s._isSingleParent()&&e+1===t?(L.FeatureGroup.prototype.removeLayer.call(r,s),s._recursivelyAddChildrenToMap(null,t,i)):(s.setOpacity(0),s._recursivelyAddChildrenToMap(u,t,i)),n=a.length-1;n>=0;n--)o=a[n],i.contains(o._latlng)||L.FeatureGroup.prototype.removeLayer.call(r,o)}),this._forceLayout
|
||||
();var s,o;r._topClusterLevel._recursivelyBecomeVisible(i,t);for(s in r._layers)o=r._layers[s],o instanceof L.MarkerCluster||!o._icon||o.setOpacity(1);r._topClusterLevel._recursively(i,e,t,function(e){e._recursivelyRestoreChildPositions(t)}),setTimeout(function(){r._topClusterLevel._recursively(i,e,0,function(e){L.FeatureGroup.prototype.removeLayer.call(r,e),e.setOpacity(1)}),r._animationEnd()},200)},_animationZoomOut:function(e,t){this._animationZoomOutSingle(this._topClusterLevel,e-1,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,e,this._getExpandedVisibleBounds())},_animationZoomOutSingle:function(e,t,n){var r=this._getExpandedVisibleBounds();e._recursivelyAnimateChildrenInAndAddSelfToMap(r,t+1,n);var i=this;this._forceLayout(),e._recursivelyBecomeVisible(r,n),setTimeout(function(){if(1===e._childCount){var s=e._markers[0];s.setLatLng(s.getLatLng()),s.setOpacity
|
||||
(1)}else e._recursively(r,n,0,function(e){e._recursivelyRemoveChildrenFromMap(r,t+1)});i._animationEnd()},200)},_animationAddLayer:function(e,t){var n=this;e._noHas=!0,L.FeatureGroup.prototype.addLayer.call(this,e),delete e._noHas,t!==e&&(t._childCount>2?(t._updateIcon(),this._forceLayout(),this._animationStart(),e._setPos(this._map.latLngToLayerPoint(t.getLatLng())),e.setOpacity(0),setTimeout(function(){L.FeatureGroup.prototype.removeLayer.call(n,e),e.setOpacity(1),n._animationEnd()},200)):(this._forceLayout(),n._animationStart(),n._animationZoomOutSingle(t,this._map.getMaxZoom(),this._map.getZoom())))},_forceLayout:function(){L.Util.falseFn(t.body.offsetWidth)}}:{_animationStart:function(){},_animationZoomIn:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds())},_animationZoomOut:function(e,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this
|
||||
._currentShownBounds,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds())},_animationAddLayer:function(e,t){this._animationAddLayerNonAnimated(e,t)}}),L.markerClusterGroup=function(e){return new L.MarkerClusterGroup(e)},L.MarkerCluster=L.Marker.extend({initialize:function(e,t,n,r){L.Marker.prototype.initialize.call(this,n?n._cLatLng||n.getLatLng():new L.LatLng(0,0),{icon:this}),this._group=e,this._zoom=t,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._bounds=new L.LatLngBounds,n&&this._addChild(n),r&&this._addChild(r)},getAllChildMarkers:function(e){e=e||[];for(var t=this._childClusters.length-1;t>=0;t--)this._childClusters[t].getAllChildMarkers(e);for(var n=this._markers.length-1;n>=0;n--)e.push(this._markers[n]);return e},getChildCount:function(){return this._childCount},zoomToBounds:function(){this._group._map.fitBounds(this._bounds)},getBounds:function(){var e=new L.LatLngBounds;return e.extend(this.
|
||||
_bounds),e},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(e,t){this._iconNeedsUpdate=!0,this._expandBounds(e),e instanceof L.MarkerCluster?(t||(this._childClusters.push(e),e.__parent=this),this._childCount+=e._childCount):(t||this._markers.push(e),this._childCount++),this.__parent&&this.__parent._addChild(e,!0)},_expandBounds:function(e){var t,n=e._wLatLng||e._latlng;e instanceof L.MarkerCluster?(this._bounds.extend(e._bounds),t=e._childCount):(this._bounds.extend(n),t=1),this._cLatLng||(this._cLatLng=e._cLatLng||n);var r=this._childCount+t;this._wLatLng?(this._wLatLng.lat=(n.lat*t+this._wLatLng.lat*this._childCount)/r,this._wLatLng.lng=(n.lng*t+this._wLatLng.lng*this._childCount)/r):this._latlng=this._wLatLng=new
|
||||
L.LatLng(n.lat,n.lng)},_addToMap:function(e){e&&(this._backupLatlng=this._latlng,this.setLatLng(e)),this._noHas=!0,L.FeatureGroup.prototype.addLayer.call(this._group,this),delete this._noHas},_recursivelyAnimateChildrenIn:function(e,t,n){this._recursively(e,0,n-1,function(e){var n,r,i=e._markers;for(n=i.length-1;n>=0;n--)r=i[n],r._icon&&(r._setPos(t),r.setOpacity(0))},function(e){var n,r,i=e._childClusters;for(n=i.length-1;n>=0;n--)r=i[n],r._icon&&(r._setPos(t),r.setOpacity(0))})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(e,t,n){this._recursively(e,n,0,function(r){r._recursivelyAnimateChildrenIn(e,r._group._map.latLngToLayerPoint(r.getLatLng()).round(),t),r._isSingleParent()&&t-1===n?(r.setOpacity(1),r._recursivelyRemoveChildrenFromMap(e,t)):r.setOpacity(0),r._addToMap()})},_recursivelyBecomeVisible:function(e,t){this._recursively(e,0,t,null,function(e){e.setOpacity(1)})},_recursivelyAddChildrenToMap:function(e,t,n){this._recursively(n,-1,t,function(r){if(t!==r._zoom)for(var s=
|
||||
r._markers.length-1;s>=0;s--){var o=r._markers[s];n.contains(o._latlng)&&(e&&(o._backupLatlng=o.getLatLng(),o.setLatLng(e),o.setOpacity&&o.setOpacity(0)),o._noHas=!0,L.FeatureGroup.prototype.addLayer.call(r._group,o),delete o._noHas)}},function(t){t._addToMap(e)})},_recursivelyRestoreChildPositions:function(e){for(var t=this._markers.length-1;t>=0;t--){var n=this._markers[t];n._backupLatlng&&(n.setLatLng(n._backupLatlng),delete n._backupLatlng)}if(e-1===this._zoom)for(var r=this._childClusters.length-1;r>=0;r--)this._childClusters[r]._restorePosition();else for(var i=this._childClusters.length-1;i>=0;i--)this._childClusters[i]._recursivelyRestoreChildPositions(e)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(e,t,n){var r,i;this._recursively(e,-1,t-1,function(e){for(i=e._markers.length-1;i>=0;i--)r=e._markers[i],n&&n.contains(r._latlng)||(L.FeatureGroup.prototype.removeLayer.call
|
||||
(e._group,r),r.setOpacity&&r.setOpacity(1))},function(e){for(i=e._childClusters.length-1;i>=0;i--)r=e._childClusters[i],n&&n.contains(r._latlng)||((!L.FeatureGroup.prototype.hasLayer||L.FeatureGroup.prototype.hasLayer.call(e._group,r))&&L.FeatureGroup.prototype.removeLayer.call(e._group,r),r.setOpacity&&r.setOpacity(1))})},_recursively:function(e,t,n,r,i){var s,o,u=this._childClusters,a=this._zoom;if(t>a)for(s=u.length-1;s>=0;s--)o=u[s],e.intersects(o._bounds)&&o._recursively(e,t,n,r,i);else if(r&&r(this),i&&this._zoom===n&&i(this),n>a)for(s=u.length-1;s>=0;s--)o=u[s],e.intersects(o._bounds)&&o._recursively(e,t,n,r,i)},_recalculateBounds:function(){var e,t=this._markers,n=this._childClusters;for(this._bounds=new L.LatLngBounds,delete this._wLatLng,e=t.length-1;e>=0;e--)this._expandBounds(t[e]);for(e=n.length-1;e>=0;e--)this._expandBounds(n[e])},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}}),L.DistanceGrid=function(
|
||||
e){this._cellSize=e,this._sqCellSize=e*e,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(e,t){var n=this._getCoord(t.x),r=this._getCoord(t.y),i=this._grid,s=i[r]=i[r]||{},o=s[n]=s[n]||[],u=L.Util.stamp(e);this._objectPoint[u]=t,o.push(e)},updateObject:function(e,t){this.removeObject(e),this.addObject(e,t)},removeObject:function(e,t){var n,r,i=this._getCoord(t.x),s=this._getCoord(t.y),o=this._grid,u=o[s]=o[s]||{},a=u[i]=u[i]||[];for(delete this._objectPoint[L.Util.stamp(e)],n=0,r=a.length;r>n;n++)if(a[n]===e)return a.splice(n,1),1===r&&delete u[i],!0},eachObject:function(e,t){var n,r,i,s,o,u,a,f=this._grid;for(n in f){o=f[n];for(r in o)for(u=o[r],i=0,s=u.length;s>i;i++)a=e.call(t,u[i]),a&&(i--,s--)}},getNearObject:function(e){var t,n,r,i,s,o,u,a,f=this._getCoord(e.x),l=this._getCoord(e.y),c=this._objectPoint,h=this._sqCellSize,p=null;for(t=l-1;l+1>=t;t++)if(i=this._grid[t])for(n=f-1;f+1>=n;n++)if(s=i[n])for(r=0,o=s.length;o>r;r++)u=s[r],a=this._sqDist(c[L
|
||||
.Util.stamp(u)],e),h>a&&(h=a,p=u);return p},_getCoord:function(e){return Math.floor(e/this._cellSize)},_sqDist:function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r}},function(){L.QuickHull={getDistant:function(e,t){var n=t[1].lat-t[0].lat,r=t[0].lng-t[1].lng;return r*(e.lat-t[0].lat)+n*(e.lng-t[0].lng)},findMostDistantPointFromBaseLine:function(e,t){var n,r,i,s=0,o=null,u=[];for(n=t.length-1;n>=0;n--)r=t[n],i=this.getDistant(r,e),i>0&&(u.push(r),i>s&&(s=i,o=r));return{maxPoint:o,newPoints:u}},buildConvexHull:function(e,t){var n=[],r=this.findMostDistantPointFromBaseLine(e,t);return r.maxPoint?(n=n.concat(this.buildConvexHull([e[0],r.maxPoint],r.newPoints)),n=n.concat(this.buildConvexHull([r.maxPoint,e[1]],r.newPoints))):[e]},getConvexHull:function(e){var t,n=!1,r=!1,i=null,s=null;for(t=e.length-1;t>=0;t--){var o=e[t];(n===!1||o.lat>n)&&(i=o,n=o.lat),(r===!1||o.lat<r)&&(s=o,r=o.lat)}var u=[].concat(this.buildConvexHull([s,i],e),this.buildConvexHull([i,s],e));return u}}}(),L.MarkerCluster
|
||||
.include({getConvexHull:function(){var e,t,n,r=this.getAllChildMarkers(),i=[],s=[];for(n=r.length-1;n>=0;n--)t=r[n].getLatLng(),i.push(t);for(e=L.QuickHull.getConvexHull(i),n=e.length-1;n>=0;n--)s.push(e[n][0]);return s}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:Math.PI/6,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var e,t=this.getAllChildMarkers(),n=this._group,r=n._map,i=r.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,t.length>=this._circleSpiralSwitchover?e=this._generatePointsSpiral(t.length,i):(i.y+=10,e=this._generatePointsCircle(t.length,i)),this._animationSpiderfy(t,e)}},unspiderfy:function(e){this._group._inZoomAnimation||(this._animationUnspiderfy(e),this._group._spiderfied=null)},_generatePointsCircle:function(e,t){var n,r,i=this._group.options.spiderfyDistanceMultiplier*
|
||||
this._circleFootSeparation*(2+e),s=i/this._2PI,o=this._2PI/e,u=[];for(u.length=e,n=e-1;n>=0;n--)r=this._circleStartAngle+n*o,u[n]=(new L.Point(t.x+s*Math.cos(r),t.y+s*Math.sin(r)))._round();return u},_generatePointsSpiral:function(e,t){var n,r=this._group.options.spiderfyDistanceMultiplier*this._spiralLengthStart,i=this._group.options.spiderfyDistanceMultiplier*this._spiralFootSeparation,s=this._group.options.spiderfyDistanceMultiplier*this._spiralLengthFactor,o=0,u=[];for(u.length=e,n=e-1;n>=0;n--)o+=i/r+5e-4*n,u[n]=(new L.Point(t.x+r*Math.cos(o),t.y+r*Math.sin(o)))._round(),r+=this._2PI*s/o;return u},_noanimationUnspiderfy:function(){var e,t,n=this._group,r=n._map,i=this.getAllChildMarkers();for(this.setOpacity(1),t=i.length-1;t>=0;t--)e=i[t],L.FeatureGroup.prototype.removeLayer.call(n,e),e._preSpiderfyLatlng&&(e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng),e.setZIndexOffset(0),e._spiderLeg&&(r.removeLayer(e._spiderLeg),delete e._spiderLeg)}}),L.MarkerCluster.include(L
|
||||
.DomUtil.TRANSITION?{SVG_ANIMATION:function(){return t.createElementNS("http://www.w3.org/2000/svg","animate").toString().indexOf("SVGAnimate")>-1}(),_animationSpiderfy:function(e,n){var r,i,s,o,u=this,a=this._group,f=a._map,l=f.latLngToLayerPoint(this._latlng);for(r=e.length-1;r>=0;r--)i=e[r],i.setZIndexOffset(1e6),i.setOpacity(0),i._noHas=!0,L.FeatureGroup.prototype.addLayer.call(a,i),delete i._noHas,i._setPos(l);a._forceLayout(),a._animationStart();var c=L.Path.SVG?0:.3,h=L.Path.SVG_NS;for(r=e.length-1;r>=0;r--)if(o=f.layerPointToLatLng(n[r]),i=e[r],i._preSpiderfyLatlng=i._latlng,i.setLatLng(o),i.setOpacity(1),s=new L.Polyline([u._latlng,o],{weight:1.5,color:"#222",opacity:c}),f.addLayer(s),i._spiderLeg=s,L.Path.SVG&&this.SVG_ANIMATION){var p=s._path.getTotalLength();s._path.setAttribute("stroke-dasharray",p+","+p);var d=t.createElementNS(h,"animate");d.setAttribute("attributeName","stroke-dashoffset"),d.setAttribute("begin","indefinite"),d.setAttribute("from",p),d.setAttribute("to",0
|
||||
),d.setAttribute("dur",.25),s._path.appendChild(d),d.beginElement(),d=t.createElementNS(h,"animate"),d.setAttribute("attributeName","stroke-opacity"),d.setAttribute("attributeName","stroke-opacity"),d.setAttribute("begin","indefinite"),d.setAttribute("from",0),d.setAttribute("to",.5),d.setAttribute("dur",.25),s._path.appendChild(d),d.beginElement()}if(u.setOpacity(.3),L.Path.SVG)for(this._group._forceLayout(),r=e.length-1;r>=0;r--)i=e[r]._spiderLeg,i.options.opacity=.5,i._path.setAttribute("stroke-opacity",.5);setTimeout(function(){a._animationEnd(),a.fire("spiderfied")},200)},_animationUnspiderfy:function(e){var t,n,r,i=this._group,s=i._map,o=e?s._latLngToNewLayerPoint(this._latlng,e.zoom,e.center):s.latLngToLayerPoint(this._latlng),u=this.getAllChildMarkers(),a=L.Path.SVG&&this.SVG_ANIMATION;for(i._animationStart(),this.setOpacity(1),n=u.length-1;n>=0;n--)t=u[n],t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng,t._setPos(o),t.setOpacity(0),a&&(r=t._spiderLeg
|
||||
._path.childNodes[0],r.setAttribute("to",r.getAttribute("from")),r.setAttribute("from",0),r.beginElement(),r=t._spiderLeg._path.childNodes[1],r.setAttribute("from",.5),r.setAttribute("to",0),r.setAttribute("stroke-opacity",0),r.beginElement(),t._spiderLeg._path.setAttribute("stroke-opacity",0)));setTimeout(function(){var e=0;for(n=u.length-1;n>=0;n--)t=u[n],t._spiderLeg&&e++;for(n=u.length-1;n>=0;n--)t=u[n],t._spiderLeg&&(t.setOpacity(1),t.setZIndexOffset(0),e>1&&L.FeatureGroup.prototype.removeLayer.call(i,t),s.removeLayer(t._spiderLeg),delete t._spiderLeg);i._animationEnd()},200)}}:{_animationSpiderfy:function(e,t){var n,r,i,s,o=this._group,u=o._map;for(n=e.length-1;n>=0;n--)s=u.layerPointToLatLng(t[n]),r=e[n],r._preSpiderfyLatlng=r._latlng,r.setLatLng(s),r.setZIndexOffset(1e6),L.FeatureGroup.prototype.addLayer.call(o,r),i=new L.Polyline([this._latlng,s],{weight:1.5,color:"#222"}),u.addLayer(i),r._spiderLeg=i;this.setOpacity(.3),o.fire("spiderfied")},_animationUnspiderfy:function(){this
|
||||
._noanimationUnspiderfy()}}),L.MarkerClusterGroup.include({_spiderfied:null,_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation?this._map.on("zoomstart",this._unspiderfyZoomStart,this):this._map.on("zoomend",this._unspiderfyWrapper,this),L.Path.SVG&&!L.Browser.touch&&this._map._initPathRoot()},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(e){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(e))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(e){this._spiderfied&&this._spiderfied.unspiderfy(e)},_noanimationUnspiderfy:function(){this
|
||||
._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(e){e._spiderLeg&&(L.FeatureGroup.prototype.removeLayer.call(this,e),e.setOpacity(1),e.setZIndexOffset(0),this._map.removeLayer(e._spiderLeg),delete e._spiderLeg)}})}(window,document),function(){L.labelVersion="0.1.4-dev",L.Label=L.Popup.extend({options:{autoPan:!1,className:"",closePopupOnClick:!1,noHide:!1,offset:new L.Point(12,-15),opacity:1},onAdd:function(e){this._map=e,this._pane=this._source instanceof L.Marker?e._panes.markerPane:e._panes.popupPane,this._container||this._initLayout(),this._updateContent();var t=e.options.fadeAnimation;t&&L.DomUtil.setOpacity(this._container,0),this._pane.appendChild(this._container),e.on("viewreset",this._updatePosition,this),this._animated&&e.on("zoomanim",this._zoomAnimation,this),L.Browser.touch&&!this.options.noHide&&L.DomEvent.on(this._container,"click",this.close,this),this._update(),this.setOpacity(this.options.opacity)},onRemove:function(e){this._pane.removeChild
|
||||
(this._container),L.Util.falseFn(this._container.offsetWidth),e.off({viewreset:this._updatePosition,zoomanim:this._zoomAnimation},this),e.options.fadeAnimation&&L.DomUtil.setOpacity(this._container,0),this._map=null},close:function(){var e=this._map;e&&(L.Browser.touch&&!this.options.noHide&&L.DomEvent.off(this._container,"click",this.close),e._label=null,e.removeLayer(this))},updateZIndex:function(e){this._zIndex=e,this._container&&this._zIndex&&(this._container.style.zIndex=e)},setOpacity:function(e){this.options.opacity=e,this._container&&L.DomUtil.setOpacity(this._container,e)},_initLayout:function(){this._container=L.DomUtil.create("div","leaflet-label "+this.options.className+" leaflet-zoom-animated"),this.updateZIndex(this._zIndex)},_updateContent:function(){this._content&&"string"==typeof this._content&&(this._container.innerHTML=this._content)},_updateLayout:function(){},_updatePosition:function(){var e=this._map.latLngToLayerPoint(this._latlng);this._setPosition(e)},_setPosition
|
||||
:function(e){e=e.add(this.options.offset),L.DomUtil.setPosition(this._container,e)},_zoomAnimation:function(e){var t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);this._setPosition(t)}}),L.Icon.Default.mergeOptions({labelAnchor:new L.Point(9,-20)}),L.Marker.mergeOptions({icon:new L.Icon.Default}),L.Marker.include({showLabel:function(){return this._label&&this._map&&(this._label.setLatLng(this._latlng),this._map.showLabel(this._label)),this},hideLabel:function(){return this._label&&this._label.close(),this},setLabelNoHide:function(e){this._labelNoHide!==e&&(this._labelNoHide=e,e?(this._removeLabelRevealHandlers(),this.showLabel()):(this._addLabelRevealHandlers(),this.hideLabel()))},bindLabel:function(e,t){var n=L.point(this.options.icon.options.labelAnchor)||new L.Point(0,0);return n=n.add(L.Label.prototype.options.offset),t&&t.offset&&(n=n.add(t.offset)),t=L.Util.extend({offset:n},t),this._labelNoHide=t.noHide,this._label||(this._labelNoHide||this._addLabelRevealHandlers
|
||||
(),this.on("remove",this.hideLabel,this).on("move",this._moveLabel,this),this._hasLabelHandlers=!0),this._label=(new L.Label(t,this)).setContent(e),this},unbindLabel:function(){return this._label&&(this.hideLabel(),this._label=null,this._hasLabelHandlers&&(this._labelNoHide||this._removeLabelRevealHandlers(),this.off("remove",this.hideLabel,this).off("move",this._moveLabel,this)),this._hasLabelHandlers=!1),this},updateLabelContent:function(e){this._label&&this._label.setContent(e)},_addLabelRevealHandlers:function(){this.on("mouseover",this.showLabel,this).on("mouseout",this.hideLabel,this),L.Browser.touch&&this.on("click",this.showLabel,this)},_removeLabelRevealHandlers:function(){this.off("mouseover",this.showLabel,this).off("mouseout",this.hideLabel,this).off("remove",this.hideLabel,this).off("move",this._moveLabel,this),L.Browser.touch&&this.off("click",this.showLabel,this)},_moveLabel:function(e){this._label.setLatLng(e.latlng)},_originalUpdateZIndex:L.Marker.prototype._updateZIndex
|
||||
,_updateZIndex:function(e){var t=this._zIndex+e;this._originalUpdateZIndex(e),this._label&&this._label.updateZIndex(t)},_originalSetOpacity:L.Marker.prototype.setOpacity,setOpacity:function(e,t){this.options.labelHasSemiTransparency=t,this._originalSetOpacity(e)},_originalUpdateOpacity:L.Marker.prototype._updateOpacity,_updateOpacity:function(){var e=0===this.options.opacity?0:1;this._originalUpdateOpacity(),this._label&&this._label.setOpacity(this.options.labelHasSemiTransparency?this.options.opacity:e)}}),L.Path.include({bindLabel:function(e,t){return this._label&&this._label.options===t||(this._label=new L.Label(t,this)),this._label.setContent(e),this._showLabelAdded||(this.on("mouseover",this._showLabel,this).on("mousemove",this._moveLabel,this).on("mouseout remove",this._hideLabel,this),L.Browser.touch&&this.on("click",this._showLabel,this),this._showLabelAdded=!0),this},unbindLabel:function(){return this._label&&(this._hideLabel(),this._label=null,this._showLabelAdded=!1,this.off("mouseover"
|
||||
,this._showLabel,this).off("mousemove",this._moveLabel,this).off("mouseout remove",this._hideLabel,this)),this},updateLabelContent:function(e){this._label&&this._label.setContent(e)},_showLabel:function(e){this._label.setLatLng(e.latlng),this._map.showLabel(this._label)},_moveLabel:function(e){this._label.setLatLng(e.latlng)},_hideLabel:function(){this._label.close()}}),L.Map.include({showLabel:function(e){return this._label=e,this.addLayer(e)}}),L.FeatureGroup.include({clearLayers:function(){return this.unbindLabel(),this.eachLayer(this.removeLayer,this),this},bindLabel:function(e,t){return this.invoke("bindLabel",e,t)},unbindLabel:function(){return this.invoke("unbindLabel")},updateLabelContent:function(e){this.invoke("updateLabelContent",e)}})}(this,document);
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div ng-controller="bettermap" ng-init="init()"><span ng-show="panel.spyable" style="position:absolute;right:0px;top:0px" class="panelextra pointer"><i bs-modal="'app/partials/inspector.html'" class="icon-eye-open"></i></span> <div style="padding-right:10px;padding-top:10px;height:{{panel.height|| row.height}};overflow:hidden"><div bettermap="" id="bettermap" params="{{panel}}" style="height:100%"></div></div></div>
|
||||
+123
File diff suppressed because one or more lines are too long
+1
@@ -0,0 +1 @@
|
||||
<div><div class="row-fluid"><h4>Add Panel to Column</h4><select class="input-medium" ng-model="new_panel.type" ng-options="f for f in _.without(config.panel_names,'column')| stringSort" ng-change="reset_panel(new_panel.type);send_render();"></select><small>Select Type</small><div ng-show="!(_.isUndefined(new_panel.type))"><div column-edit="" panel="new_panel" config="config" row="row" dashboards="dashboards" type="new_panel.type"></div><button ng-click="add_panel(new_panel); reset_panel();" class="btn btn-primary">Create Panel</button><br></div></div><div class="row-fluid"><div class="span12"><h4>Panels</h4><table class="table table-condensed table-striped"><thead><th>Title</th><th>Type</th><th>Height</th><th>Delete</th><th>Move</th><th></th><th>Hide</th></thead><tr ng-repeat="app in panel.panels"><td>{{app.title}}</td><td>{{app.type}}</td><td><input type="text" class="input-small" ng-model="app.height"></td><td><i ng-click="panel.panels = _.without(panel.panels,app)" class="pointer icon-remove"></i></td><td><i ng-click="_.move(panel.panels,$index,$index-1)" ng-hide="$first" class="pointer icon-arrow-up"></i></td><td><i ng-click="_.move(panel.panels,$index,$index+1)" ng-hide="$last" class="pointer icon-arrow-down"></i></td><td><input type="checkbox" ng-model="app.hide" ng-checked="app.hide"></td></tr></table></div></div></div>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div ng-controller="column" ng-init="init();"><div ng-repeat="(name, panel) in panel.panels" ng-hide="panel.height == '0px' || panel.hide" class="row-fluid panel" style="min-height:{{panel.height}}; position:relative"><div class="row-fluid"><div class="span12 alert alert-error panel-error" ng-hide="!panel.error"><a class="close" ng-click="panel.error=false">×</a> <i class="icon-exclamation-sign"></i> <strong>Oops!</strong> {{panel.error}}</div></div><div class="row-fluid"><kibana-panel type="panel.type"></kibana-panel></div></div></div>
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
define("panels/column/module",["angular","app","underscore","config"],function(e,t,n,r){var i=e.module("kibana.panels.column",[]);t.useModule(i),i.controller("column",["$scope","$rootScope","$timeout",function(e,t,r){e.panelMeta={status:"Stable",description:"A pseudo panel that lets you add other panels to be arranged in a column withdefined heights."};var i={panels:[]};n.defaults(e.panel,i),e.init=function(){e.reset_panel()},e.toggle_row=function(t){t.collapse=t.collapse?!1:!0,t.collapse||r(function(){e.send_render()})},e.send_render=function(){e.$broadcast("render")},e.add_panel=function(t){e.panel.panels.push(t)},e.reset_panel=function(t){e.new_panel={loading:!1,error:!1,sizeable:!1,span:12,height:"150px",editable:!0,type:t}}}]),i.directive("columnEdit",["$compile","$timeout",function(t,r){return{scope:{new_panel:"=panel",row:"=",config:"=",dashboards:"=",type:"=type"},link:function(i,s){i.$on("render",function(){r(function(){i.panel=i.new_panel;var r="<div ng-include src=\"partial('panelgeneral')\"></div>"
|
||||
;!n.isUndefined(i.type)&&i.type!==""&&(r=r+"<div ng-include src=\"'app/panels/"+i.type+"/editor.html'\"></div>"),s.html(t(e.element(r))(i))})})}}}]),i.filter("withoutColumn",function(){return function(){return n.without(r.panel_names,"column")}})});
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div class="row-fluid"><div class="span4"><label class="small">Title</label><input type="text" class="input-medium" ng-model="panel.title"></div><div class="span2"><label class="small">Height</label><input type="text" class="input-mini" ng-model="panel.height"></div><div class="span1"><label class="small">Editable</label><input type="checkbox" ng-model="panel.editable" ng-checked="panel.editable"></div></div>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div><h5>Allow saving to</h5><div class="row-fluid"><div class="span2"><label class="small">Export</label><input type="checkbox" ng-model="panel.save.local" ng-checked="panel.save.local"></div><div class="span2"><label class="small">Defaults</label><input type="checkbox" ng-model="panel.save.default" ng-checked="panel.save.default"></div><div class="span2"><label class="small">Gist<tip>Requires your domain to be OAUTH registered with Github<tip></tip></tip></label><input type="checkbox" ng-model="panel.save.gist" ng-checked="panel.save.gist"></div><div class="span2"><label class="small">Elasticsearch</label><input type="checkbox" ng-model="panel.save.elasticsearch" ng-checked="panel.save.elasticsearch"></div></div><h5>Allow loading from</h5><div class="row-fluid"><div class="span2"><label class="small">Local file</label><input type="checkbox" ng-model="panel.load.local" ng-checked="panel.load.local"></div><div class="span2"><label class="small">Gist</label><input type="checkbox" ng-model="panel.load.gist" ng-checked="panel.load.gist"></div><div class="span2"><label class="small">Elasticsearch</label><input type="checkbox" ng-model="panel.load.elasticsearch" ng-checked="panel.load.elasticsearch"></div><div class="span3" ng-show="panel.load.elasticsearch"><label class="small">ES list size</label><input class="input-mini" type="number" ng-model="panel.elasticsearch_size"></div></div><h5>Sharing</h5><div class="row-fluid"><div class="span2"><label class="small">Allow Sharing</label><input type="checkbox" ng-model="panel.temp" ng-checked="panel.temp"></div><div class="span2" ng-show="panel.temp"><label class="small">TTL</label><input type="checkbox" ng-model="panel.ttl_enable" ng-checked="panel.temp"></div><div class="span5" ng-show="panel.temp && panel.ttl_enable"><label class="small">TTL Duration <i class="icon-question-sign" bs-tooltip="'Elasticsearch date math, eg: 1m,1d,1w,30d'"></i></label><input class="input-small" type="text" ng-model="panel.temp_ttl"></div></div></div>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div><a class="close" ng-click="dismiss()" href="">×</a><h4>Load</h4><div ng-show="panel.load.local"><h5>Local File</h5><form><input type="file" id="dashupload" dash-upload=""><br></form></div><div ng-show="panel.load.gist"><h5>Gist <small>Enter a gist number or url</small></h5><form><input type="text" ng-model="gist.url"><br><button class="btn" ng-click="gist_dblist(dashboard.gist_id(gist.url))" ng-show="dashboard.is_gist(gist.url)"><i class="icon-github-alt"></i> Get gist:{{gist.url | gistid}}</button><h6 ng-show="gist.files.length">Dashboards in gist:{{gist.url | gistid}} <small>click to load</small></h6><h6 ng-hide="gist.files.length">No gist dashboards found</h6><table class="table table-condensed table-striped"><tr ng-repeat="file in gist.files"><td><a ng-click="dashboard.dash_load(file)">{{file.title}}</a></td></tr></table></form></div><div ng-show="panel.load.elasticsearch"><h5>Elasticsearch</h5><form class="input-append"><input type="text" ng-model="elasticsearch.query"><button ng-click="elasticsearch_dblist(elasticsearch.query)" class="btn"><i class="icon-search"></i></button></form><h6 ng-show="elasticsearch.dashboards.length">Elasticsearch stored dashboards</h6><h6 ng-hide="elasticsearch.dashboards.length">No dashboards matching your query found</h6><table class="table table-condensed table-striped"><tr ng-repeat="row in elasticsearch.dashboards | orderBy:['_id']"><td><a ng-click="elasticsearch_delete(row._id)"><i class="icon-remove"></i></a></td><td><a href="#/dashboard/elasticsearch/{{row._id}}">{{row._id}}</a></td><td><a><i class="icon-share" ng-click="share = dashboard.share_link(row._id,'elasticsearch',row._id)" bs-modal="'app/panels/dashcontrol/share.html'"></i></a></td></tr></table></div></div>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div ng-controller="dashcontrol" ng-init="init()"><label class="small">Dash Control<tip icon="warning-sign">This panel is deprecated! Please remove it from your dashboard</tip></label><button class="btn" ng-show="panel.load.gist || panel.load.elasticsearch || panel.load.local" data-placement="bottom" data-unique="1" ng-click="elasticsearch_dblist(elasticsearch.query)" bs-popover="'app/panels/dashcontrol/load.html'"><i class="icon-folder-open"></i> <i class="icon-caret-down"></i></button> <button class="btn" ng-show="panel.save.gist || panel.save.elasticsearch || panel.save.local || panel.save.default" data-placement="bottom" data-unique="1" bs-popover="'app/panels/dashcontrol/save.html'"><i class="icon-save"></i> <i class="icon-caret-down"></i></button> <button ng-show="panel.temp" class="btn" ng-click="elasticsearch_save('temp',panel.temp_ttl)" bs-modal="'app/panels/dashcontrol/share.html'"><i class="icon-share"></i></button></div>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
define("panels/dashcontrol/module",["angular","app","underscore"],function(e,t,n){var r=e.module("kibana.panels.dashcontrol",[]);t.useModule(r),r.controller("dashcontrol",["$scope","$http","timer","dashboard","alertSrv",function(e,t,r,i,s){e.panelMeta={status:"Deprecated",description:"This panel has been moved to the navigation bar. See the dashboard setting editor to configure it."},e.panel=e.panel||{};var o={save:{gist:!1,elasticsearch:!0,local:!0,"default":!0},load:{gist:!0,elasticsearch:!0,local:!0},hide_control:!1,elasticsearch_size:20,temp:!0,ttl_enable:!0,temp_ttl:"30d"};n.defaults(e.panel,o),e.init=function(){e.gist_pattern=/(^\d{5,}$)|(^[a-z0-9]{10,}$)|(gist.github.com(\/*.*)\/[a-z0-9]{5,}\/*$)/,e.gist={},e.elasticsearch={}},e.set_default=function(){i.set_default()?s.set("Local Default Set",i.current.title+" has been set as your local default","success",5e3):s.set("Incompatible Browser","Sorry, your browser is too old for this feature","error",5e3)},e.purge_default=function(){i
|
||||
.purge_default()?s.set("Local Default Clear","Your local default dashboard has been cleared","success",5e3):s.set("Incompatible Browser","Sorry, your browser is too old for this feature","error",5e3)},e.elasticsearch_save=function(t,r){i.elasticsearch_save(t,e.elasticsearch.title||i.current.title,e.panel.ttl_enable?r:!1).then(function(r){n.isUndefined(r._id)?s.set("Save failed","Dashboard could not be saved to Elasticsearch","error",5e3):(s.set("Dashboard Saved",'This dashboard has been saved to Elasticsearch as "'+r._id+'"',"success",5e3),t==="temp"&&(e.share=i.share_link(i.current.title,"temp",r._id)))})},e.elasticsearch_delete=function(t){i.elasticsearch_delete(t).then(function(r){if(!n.isUndefined(r))if(r.found){s.set("Dashboard Deleted",t+" has been deleted","success",5e3);var i=n.where(e.elasticsearch.dashboards,{_id:t})[0];e.elasticsearch.dashboards=n.without(e.elasticsearch.dashboards,i)}else s.set("Dashboard Not Found","Could not find "+t+" in Elasticsearch","warning",5e3);else s
|
||||
.set("Dashboard Not Deleted","An error occurred deleting the dashboard","error",5e3)})},e.elasticsearch_dblist=function(t){i.elasticsearch_list(t,e.panel.elasticsearch_size).then(function(t){n.isUndefined(t.hits)||(e.panel.error=!1,e.hits=t.hits.total,e.elasticsearch.dashboards=t.hits.hits)})},e.save_gist=function(){i.save_gist(e.gist.title).then(function(t){n.isUndefined(t)?s.set("Save failed","Gist could not be saved","error",5e3):(e.gist.last=t,s.set("Gist saved",'You will be able to access your exported dashboard file at <a href="'+t+'">'+t+"</a> in a moment","success"))})},e.gist_dblist=function(t){i.gist_list(t).then(function(t){t&&t.length>0?e.gist.files=t:s.set("Gist Failed","Could not retrieve dashboard list from gist","error",5e3)})}}]),r.directive("dashUpload",["timer","dashboard","alertSrv",function(e,t,n){return{restrict:"A",link:function(e){function r(n){var r=n.target.files,i=function(){return function(n){t.dash_load(JSON.parse(n.target.result)),e.$apply()}};for(var s=0,o
|
||||
;o=r[s];s++){var u=new FileReader;u.onload=i(o),u.readAsText(o)}}window.File&&window.FileReader&&window.FileList&&window.Blob?document.getElementById("dashupload").addEventListener("change",r,!1):n.set("Oops","Sorry, the HTML5 File APIs are not fully supported in this browser.","error")}}}]),r.filter("gistid",function(){var e=/(\d{5,})|([a-z0-9]{10,})|(gist.github.com(\/*.*)\/[a-z0-9]{5,}\/*$)/;return function(t){if(!n.isUndefined(t)){var r=t.match(e);if(!n.isNull(r)&&!n.isUndefined(r))return r[0].replace(/.*\//,"")}}})});
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div><a class="close" ng-click="dismiss()" href="">×</a><h4>Save</h4><div ng-show="panel.save.default || panel.save.local"><h5>Locally</h5><form><ul class="nav nav-list"><li><a ng-show="panel.save.local" ng-click="dashboard.to_file()"><i class="icon-download"></i> Export to File</a></li><li><a ng-show="panel.save.default" ng-click="set_default()"><i class="icon-bookmark"></i> Set as My Default</a></li><li><a ng-show="panel.save.default" ng-click="purge_default()"><i class="icon-ban-circle"></i> Clear My Default</a></li></ul></form></div><div ng-show="panel.save.gist"><h5>Gist</h5><form class="input-append"><input class="input-medium" placeholder="Title" type="text" ng-model="gist.title"><button class="btn" ng-click="save_gist()"><i class="icon-github-alt"></i></button></form><br><small ng-show="gist.last">Last gist: <a target="_blank" href="{{gist.last}}">{{gist.last}}</a></small></div><div ng-show="panel.save.elasticsearch"><h5>Elasticsearch</h5><form class="input-append"><input class="input-medium" placeholder="Title" type="text" ng-model="elasticsearch.title"><button class="btn" ng-click="elasticsearch_save('dashboard')"><i class="icon-save"></i></button></form></div></div>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h3>{{share.title}} <small>shareable link</small></h3></div><div class="modal-body"><label>Share this dashboard with this URL</label><input ng-model="share.link" type="text" style="width:90%" onclick="this.select()" onfocus="this.select()" ng-change="share = dashboard.share_link(share.title,share.type,share.id)"></div><div class="modal-footer"><button type="button" class="btn btn-success" ng-click="dismiss();$broadcast('render')">Close</button></div>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div><div class="row-fluid"><div class="span1"><label class="small">Length</label><input type="number" style="width:80%" ng-model="panel.size" ng-change="set_refresh(true)"></div><div class="span3"><label class="small">Field</label><input type="text" bs-typeahead="fields.list" style="width:80%" ng-change="set_refresh(true)" ng-model="panel.field"></div><div class="span3"><label class="small">Query Mode</label><select style="width:80%" ng-change="set_refresh(true)" ng-model="panel.mode" ng-options="f for f in ['terms only','AND', 'OR']"></select></div><div class="span4"><label class="small">Exclude Terms(s) (comma seperated)</label><input array-join="" type="text" style="width:90%" ng-change="set_refresh(true)" ng-model="panel.exclude"></div><div class="span1"><label class="small">Rest</label><input type="checkbox" ng-model="panel.rest" ng-checked="panel.rest" ng-change="set_refresh(true)"></div></div></div>
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
<div ng-controller="derivequeries" ng-init="init()"><style>.end-derive {
|
||||
position:absolute;
|
||||
right:15px;
|
||||
top:5px;
|
||||
}
|
||||
.panel-derive-field {
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
.panel-derive {
|
||||
padding-right: 35px !important;
|
||||
height: 31px !important;
|
||||
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
|
||||
-moz-box-sizing: border-box; /* Firefox, other Gecko */
|
||||
box-sizing: border-box; /* Opera/IE 8+ */
|
||||
}</style><span ng-show="panel.spyable" style="position:absolute;right:0px;top:0px" class="panelextra pointer"><i bs-modal="'app/partials/inspector.html'" class="icon-eye-open"></i></span><label class="small">Create new queries from <span class="panel-derive-field" ng-show="!editing" ng-click="editing=true">{{panel.field}}</span><select ng-show="editing && fields.list.length>1" class="input-medium" ng-model="panel.field" ng-options="f for f in fields.list" ng-change="editing=false" ng-blur="editing=false"></select><input ng-show="editing && fields.list.length<2" type="text" ng-model="panel.field" ng-blur="editing=false">({{panel.mode}} mode)</label><div><form class="form-search" style="position:relative" ng-submit="get_data()"><input class="search-query panel-derive input-block-level" bs-typeahead="panel.history" data-min-length="0" data-items="100" type="text" ng-model="panel.query"><span class="end-derive"><i class="icon-search pointer" ng-click="get_data()"></i></span></form></div></div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
define("panels/derivequeries/module",["angular","app","underscore"],function(e,t,n){var r=e.module("kibana.panels.derivequeries",[]);t.useModule(r),r.controller("derivequeries",["$scope","$rootScope","querySrv","fields","dashboard","filterSrv",function(t,r,i,s,o,u){t.panelMeta={status:"Experimental",description:"Creates a new set of queries using the Elasticsearch terms facet. For example, you might want to create 5 queries showing the most frequent HTTP response codes. Be careful not to select a high cardinality field, as Elasticsearch must load all unique values into memory."};var a={loading:!1,label:"Search",query:"*",ids:[],field:"_type",fields:[],spyable:!0,rest:!1,size:5,mode:"terms only",exclude:[],history:[],remember:10};n.defaults(t.panel,a),t.init=function(){t.editing=!1,t.panel.fields=s.list},t.get_data=function(){f(t.panel.query);if(o.indices.length===0)return;t.panelMeta.loading=!0;var e=t.ejs.Request().indices(o.indices);e=e.facet(t.ejs.TermsFacet("query").field(t.panel.field
|
||||
).size(t.panel.size).exclude(t.panel.exclude).facetFilter(t.ejs.QueryFilter(t.ejs.FilteredQuery(t.ejs.QueryStringQuery(t.panel.query||"*"),u.getBoolFilter(u.ids))))).size(0),t.populate_modal(e);var r=e.doSearch();r.then(function(e){t.panelMeta.loading=!1;var r;t.panel.query===""||t.panel.mode==="terms only"?r="":t.panel.mode==="AND"?r=" AND ("+t.panel.query+")":t.panel.mode==="OR"&&(r=" OR ("+t.panel.query+")");var s=[],u=e.facets.query.terms,a=[];n.each(u,function(e){var n=t.panel.field+':"'+e.term+'"'+r,o=i.findQuery(n);o?s.push(o.id):s.push(i.set({alias:e.term,query:n})),a.push("NOT ("+n+")")});if(t.panel.rest){var f=a.join(" AND "),l=i.findQuery(f);l?s.push(l.id):s.push(i.set({alias:"other",query:f}))}n.each(n.difference(t.panel.ids,s),function(e){i.remove(e)}),t.panel.ids=s,o.refresh()})},t.set_refresh=function(e){t.refresh=e},t.close_edit=function(){t.refresh&&t.get_data(),t.refresh=!1},t.populate_modal=function(n){t.inspector=e.toJson(JSON.parse(n.toString()),!0)};var f=function(
|
||||
e){e=n.isArray(e)?e:[e];if(t.panel.remember>0){t.panel.history=n.union(e.reverse(),t.panel.history);var r=t.panel.history.length;r>t.panel.remember&&(t.panel.history=t.panel.history.slice(0,t.panel.remember))}}}])});
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div class="row-fluid"><div class="span3"><h6>Popup Position</h6><select class="input-small" ng-model="panel.micropanel_position" ng-options="f for f in ['top','right','bottom','left']" ng-change="reload_list();"></select></div><div class="span3"><h6>List Arrangement</h6><select class="input-small" ng-model="panel.arrange" ng-options="f for f in ['horizontal','vertical']"></select></div><div class="span3"><h6>Font Size</h6><select class="input-small" ng-model="panel.style['font-size']" ng-options="f for f in ['6pt','7pt','8pt','9pt','10pt','12pt','14pt','16pt','18pt','20pt','24pt','28pt','32pt','36pt','42pt','48pt','52pt','60pt','72pt']"></select></div></div>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<a class="close" ng-click="dismiss()" href="">×</a><h4>Micro Analysis of {{micropanel.field}} <i class="pointer icon-search" ng-click="fieldExists(micropanel.field,'must');dismiss();"></i> <i class="pointer icon-ban-circle" ng-click="fieldExists(micropanel.field,'mustNot');dismiss();"></i><br><small>{{micropanel.count}} events in the table set</small></h4><table style="width:480px" class="table table-bordered table-striped table-condensed"><thead><th>{{micropanel.field}}</th><th>Action</th><th>In set</th></thead><tbody><tr ng-repeat="field in micropanel.values"><td>{{{true: "__blank__",false:field[0]}[field[0] == ""]}}</td><td><i class="pointer icon-search" ng-click="build_search(micropanel.field,field[0],'must');dismiss();"></i> <i class="pointer icon-ban-circle" ng-click="build_search(micropanel.field,field[0],'mustNot');dismiss();"></i></td><td>{{field[1]}}</td></tr></tbody></table><span ng-repeat="(field,count) in micropanel.related"><a ng-click="toggle_field(field)">{{field}}</a> ({{Math.round((count / micropanel.count) * 100)}}%),</span>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div ng-controller="fields" ng-init="init()"><h4>The 'fields' panel is deprecated.</h4>The table panel now integrates a field selector.</div>
|
||||
+1
@@ -0,0 +1 @@
|
||||
define("panels/fields/module",["angular","app","underscore"],function(e,t,n){var r=e.module("kibana.panels.fields",[]);t.useModule(r),r.controller("fields",["$scope",function(e){e.panelMeta={status:"Deprecated",description:"You should not use this table, it does not work anymore. The table panel nowintegrates a field selector. This module will soon be removed."};var t={style:{},arrange:"vertical",micropanel_position:"right"};n.defaults(e.panel,t),e.init=function(){}}])});
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div><div class="row-fluid"><div class="span12">No options here</div></div></div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<div><style>.input-query-alias {
|
||||
margin-bottom: 5px !important;
|
||||
}</style><a class="close" ng-click="render();dismiss();" href="">×</a><h6>Query Alias</h6><form><input class="input-medium input-query-alias" type="text" ng-model="queries.list[id].alias" placeholder="Alias..."><div><i ng-repeat="color in queries.colors" class="pointer" ng-class="{'icon-circle-blank':queries.list[id].color == color,'icon-circle':queries.list[id].color != color}" style="color:{{color}}" ng-click="queries.list[id].color = color;render();"></i></div></form></div>
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
<div ng-controller="filtering" ng-init="init()"><style>.filtering-container {
|
||||
margin-top: 3px;
|
||||
}
|
||||
.filter-panel-filter {
|
||||
display:inline-block;
|
||||
vertical-align: top;
|
||||
margin-left: 10px;
|
||||
width: 220px;
|
||||
padding: 5px 5px 0px 5px;
|
||||
border: #555 1px solid;
|
||||
margin: 0px 5px 5px 0px;
|
||||
}
|
||||
.filter-panel-filter ul {
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
.filter-must {
|
||||
border-bottom: #7EB26D 3px solid;
|
||||
}
|
||||
.filter-mustNot {
|
||||
border-bottom: #E24D42 3px solid;
|
||||
}
|
||||
.filter-deselected {
|
||||
opacity: 0.5;
|
||||
}
|
||||
.filter-either {
|
||||
border-bottom: #EF843C 3px solid;
|
||||
}
|
||||
.filter-action {
|
||||
float:right;
|
||||
margin-bottom: 0px !important;
|
||||
margin-left: 3px;
|
||||
}
|
||||
.filter-mandate {
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
.filter-apply {
|
||||
float:right;
|
||||
margin-bottom: 5px;
|
||||
}</style><div class="filtering-container"><span ng-show="filterSrv.ids.length == 0"><h5>No filters available</h5></span><div ng-repeat="id in filterSrv.ids" class="small filter-panel-filter" ng-class="{'filter-deselected': !filterSrv.list[id].active}"><div class="filter-{{filterSrv.list[id].mandate}}"><strong>{{filterSrv.list[id].type}}</strong> <span ng-show="!filterSrv.list[id].editing" class="filter-mandate" ng-click="filterSrv.list[id].editing = true">{{filterSrv.list[id].mandate}}</span> <span ng-show="filterSrv.list[id].editing"><select class="input-small" ng-model="filterSrv.list[id].mandate" ng-options="f for f in ['must','mustNot','either']"></select></span> <i class="filter-action pointer icon-remove" bs-tooltip="'Remove'" ng-click="remove(id)"></i> <i class="filter-action pointer" ng-class="{'icon-check': filterSrv.list[id].active,'icon-check-empty': !filterSrv.list[id].active}" bs-tooltip="'Toggle'" ng-click="toggle(id)"></i> <i class="filter-action pointer icon-edit" ng-hide="filterSrv.list[id].editing" bs-tooltip="'Edit'" ng-click="filterSrv.list[id].editing = true"></i></div><div ng-hide="filterSrv.list[id].editing && isEditable(filterSrv.list[id])"><ul class="unstyled"><li ng-repeat="(key,value) in filterSrv.list[id]" ng-show="show_key(key)"><strong>{{key}}</strong> : {{value}}</li></ul></div><div ng-show="filterSrv.list[id].editing && isEditable(filterSrv.list[id])"><ul class="unstyled"><li ng-repeat="key in _.keys(filterSrv.list[id])" ng-show="show_key(key)"><strong>{{key}}</strong> :<input type="text" ng-model="filterSrv.list[id][key]"></li></ul></div><div class="filter-apply" ng-show="filterSrv.list[id].editing"><button ng-click="filterSrv.list[id].editing=undefined" class="btn btn-mini" bs-tooltip="'Save without refresh'">Save</button> <button ng-click="filterSrv.list[id].editing=undefined;refresh()" class="btn btn-success btn-mini" bs-tooltip="'Save and refresh'">Apply</button></div></div></div></div>
|
||||
+1
@@ -0,0 +1 @@
|
||||
define("panels/filtering/module",["angular","app","underscore"],function(e,t,n){var r=e.module("kibana.panels.filtering",[]);t.useModule(r),r.controller("filtering",["$scope","filterSrv","$rootScope","dashboard",function(e,t,r,i){e.panelMeta={status:"Beta",description:"A controllable list of all filters currently applied to the dashboard. You almost certainly want one of these on your dashboard somewhere."};var s={};n.defaults(e.panel,s),e.init=function(){e.filterSrv=t},e.remove=function(e){t.remove(e),i.refresh()},e.toggle=function(e){t.list[e].active=!t.list[e].active,i.refresh()},e.refresh=function(){r.$broadcast("refresh")},e.render=function(){r.$broadcast("render")},e.show_key=function(e){return!n.contains(["type","id","alias","mandate","active","editing"],e)},e.isEditable=function(e){var t=["time"];return n.contains(t,e.type)?!1:!0}}])});
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div class="row-fluid"><div class="span2"><label class="small">Mode</label><select ng-change="set_refresh(true)" class="input-small" ng-model="panel.mode" ng-options="f for f in ['count','min','mean','max','total']"></select></div><div class="span2"><label class="small">Time Field</label><input ng-change="set_refresh(true)" placeholder="Start typing" bs-typeahead="fields.list" type="text" class="input-small" ng-model="panel.time_field"></div><div class="span2" ng-show="panel.mode != 'count'"><label class="small">Value Field</label><input ng-change="set_refresh(true)" placeholder="Start typing" bs-typeahead="fields.list" type="text" class="input-small" ng-model="panel.value_field"></div><div class="span3" ng-show="panel.mode != 'count'"><label class="small">Note</label><small>In <strong>{{panel.mode}}</strong> mode the configured field <strong>must</strong> be a numeric type</small></div></div><h5>Chart Settings</h5><div class="row-fluid" style="margin-bottom:10px"><div class="span1"><label class="small">Bars</label><input type="checkbox" ng-model="panel.bars" ng-checked="panel.bars"></div><div class="span1"><label class="small">Lines</label><input type="checkbox" ng-model="panel.lines" ng-checked="panel.lines"></div><div class="span1"><label class="small">Points</label><input type="checkbox" ng-model="panel.points" ng-checked="panel.points"></div><div class="span1"><label class="small">Stack</label><input type="checkbox" ng-model="panel.stack" ng-checked="panel.stack"></div><div class="span1"><label class="small">Legend</label><input type="checkbox" ng-model="panel.legend" ng-checked="panel.legend"></div><div class="span1"><label class="small">xAxis</label><input type="checkbox" ng-model="panel['x-axis']" ng-checked="panel['x-axis']"></div><div class="span1"><label class="small">yAxis</label><input type="checkbox" ng-model="panel['y-axis']" ng-checked="panel['y-axis']"></div><div class="span2" ng-show="panel.lines"><label class="small">Line Fill</label><select class="input-mini" ng-model="panel.fill" ng-options="f for f in [0,1,2,3,4,5,6,7,8,9,10]"></select></div><div class="span2" ng-show="panel.lines"><label class="small">Line Width</label><select class="input-mini" ng-model="panel.linewidth" ng-options="f for f in [0,1,2,3,4,5,6,7,8,9,10]"></select></div></div><div class="row-fluid"><div class="span2"><label class="small">Time correction</label><select ng-model="panel.timezone" class="input-small" ng-options="f for f in ['browser','utc']"></select></div><div class="span1"><label class="small">Selectable</label><input type="checkbox" ng-model="panel.interactive" ng-checked="panel.interactive"></div><div class="span2"><label class="small">Zoom Links</label><input type="checkbox" ng-model="panel.zoomlinks" ng-checked="panel.zoomlinks"></div><div class="span2"><label class="small">Auto-interval</label><input type="checkbox" ng-model="panel.auto_int" ng-checked="panel.auto_int"></div><div class="span2" ng-show="panel.auto_int"><label class="small">Resolution</label><input type="number" class="input-mini" ng-model="panel.resolution" ng-change="set_refresh(true)"></div><div class="span3" ng-show="panel.auto_int"><label class="small">Shoot for this many data points, rounding to sane intervals</label></div><div class="span2" ng-hide="panel.auto_int"><label class="small">Interval</label><input type="text" class="input-mini" ng-model="panel.interval" ng-change="set_refresh(true)"></div><div class="span3" ng-hide="panel.auto_int"><label class="small">Use Elasticsearch date math format (eg 1m, 5m, 1d, 2w, 1y)</label></div></div><h5>Tooltip Settings</h5><div class="row-fluid" style="margin-bottom:10px"><div class="span3"><label class="small">Stacked Values<tip>How should the values in stacked charts to be calculated?</tip></label><select class="input-medium" ng-model="panel.tooltip.value_type" ng-options="f for f in ['cumulative','individual']"></select></div><div class="span3"><label class="small">Display Query<tip>If an alias is set, it will be shown in the tooltip. If not, should it show the query?</tip></label><input type="checkbox" ng-model="panel.tooltip.query_as_alias"></div></div>
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
<div ng-controller="histogram" ng-init="init()" style="height:{{panel.height || row.height}}"><style>.histogram-legend {
|
||||
display:inline-block;
|
||||
padding-right:5px
|
||||
}
|
||||
.histogram-legend-dot {
|
||||
display:inline-block;
|
||||
height:10px;
|
||||
width:10px;
|
||||
border-radius:5px;
|
||||
}
|
||||
.histogram-legend-item {
|
||||
display:inline-block;
|
||||
}
|
||||
.histogram-chart {
|
||||
position:relative;
|
||||
}</style><span ng-show="panel.spyable" class="spy panelextra pointer"><i bs-modal="'app/partials/inspector.html'" class="icon-eye-open"></i></span><div><span ng-show="panel.zoomlinks && data"><a class="small" ng-click="zoom(2)"><i class="icon-zoom-out"></i> Zoom Out</a> |</span> <span ng-show="panel.legend" ng-repeat="series in data" class="histogram-legend"><i class="icon-circle" ng-style="{color: series.info.color}"></i> <span class="small histogram-legend-item">{{series.info.alias}} ({{series.hits}})</span></span> <span ng-show="panel.legend" class="small"><span ng-show="panel.value_field && panel.mode != 'count'">{{panel.value_field}}</span> {{panel.mode}} per <strong>{{panel.interval}}</strong> | (<strong>{{hits}}</strong> hits)</span></div><center><img ng-show="panel.loading && _.isUndefined(data)" src="img/load_big.gif"></center><div histogram-chart="" class="pointer histogram-chart" params="{{panel}}"></div></div>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
define("panels/histogram/timeSeries",["underscore","kbn"],function(e,t){function r(e){return parseInt(e,10)}function i(e){return Math.floor(e.getTime()/1e3)*1e3}var n={};return n.ZeroFilled=function(n){n=e.defaults(n,{interval:"10m",start_date:null,end_date:null,fill_style:"minimal"}),this.interval_ms=r(t.interval_to_seconds(n.interval))*1e3,this._data={},this.start_time=n.start_date&&i(n.start_date),this.end_time=n.end_date&&i(n.end_date),this.opts=n},n.ZeroFilled.prototype.addValue=function(t,n){t instanceof Date?t=i(t):t=r(t),isNaN(t)||(this._data[t]=e.isUndefined(n)?0:n),this._cached_times=null},n.ZeroFilled.prototype.getOrderedTimes=function(t){var n=e.map(e.keys(this._data),r);return e.isArray(t)&&(n=n.concat(t)),e.uniq(n.sort(),!0)},n.ZeroFilled.prototype.getFlotPairs=function(t){var n=this.getOrderedTimes(t),r,i;return this.opts.fill_style==="all"?r=this._getAllFlotPairs:r=this._getMinFlotPairs,i=e.reduce(n,r,[],this),this.start_time&&(i.length===0||i[0][0]>this.start_time)&&i.unshift
|
||||
([this.start_time,null]),this.end_time&&(i.length===0||i[i.length-1][0]<this.end_time)&&i.push([this.end_time,null]),i},n.ZeroFilled.prototype._getMinFlotPairs=function(e,t,n,r){var i,s,o,u;return n>0&&(o=r[n-1],u=t-this.interval_ms,o<u&&e.push([u,0])),e.push([t,this._data[t]||0]),r.length>n&&(i=r[n+1],s=t+this.interval_ms,i>s&&e.push([s,0])),e},n.ZeroFilled.prototype._getAllFlotPairs=function(e,t,n,r){var i,s;e.push([r[n],this._data[r[n]]||0]),i=r[n+1],s=r[n]+this.interval_ms;for(;r.length>n&&i>s;s+=this.interval_ms)e.push([s,0]);return e},n}),function(e){function t(t){function s(e){n.active&&(h(e),t.getPlaceholder().trigger("plotselecting",[a()]))}function o(t){if(t.which!=1)return;document.body.focus(),document.onselectstart!==undefined&&r.onselectstart==null&&(r.onselectstart=document.onselectstart,document.onselectstart=function(){return!1}),document.ondrag!==undefined&&r.ondrag==null&&(r.ondrag=document.ondrag,document.ondrag=function(){return!1}),c(n.first,t),n.active=!0,i=function(
|
||||
e){u(e)},e(document).one("mouseup",i)}function u(e){return i=null,document.onselectstart!==undefined&&(document.onselectstart=r.onselectstart),document.ondrag!==undefined&&(document.ondrag=r.ondrag),n.active=!1,h(e),m()?f():(t.getPlaceholder().trigger("plotunselected",[]),t.getPlaceholder().trigger("plotselecting",[null])),!1}function a(){if(!m())return null;if(!n.show)return null;var r={},i=n.first,s=n.second;return e.each(t.getAxes(),function(e,t){if(t.used){var n=t.c2p(i[t.direction]),o=t.c2p(s[t.direction]);r[e]={from:Math.min(n,o),to:Math.max(n,o)}}}),r}function f(){var e=a();t.getPlaceholder().trigger("plotselected",[e]),e.xaxis&&e.yaxis&&t.getPlaceholder().trigger("selected",[{x1:e.xaxis.from,y1:e.yaxis.from,x2:e.xaxis.to,y2:e.yaxis.to}])}function l(e,t,n){return t<e?e:t>n?n:t}function c(e,r){var i=t.getOptions(),s=t.getPlaceholder().offset(),o=t.getPlotOffset();e.x=l(0,r.pageX-s.left-o.left,t.width()),e.y=l(0,r.pageY-s.top-o.top,t.height()),i.selection.mode=="y"&&(e.x=e==n.first?0
|
||||
:t.width()),i.selection.mode=="x"&&(e.y=e==n.first?0:t.height())}function h(e){if(e.pageX==null)return;c(n.second,e),m()?(n.show=!0,t.triggerRedrawOverlay()):p(!0)}function p(e){n.show&&(n.show=!1,t.triggerRedrawOverlay(),e||t.getPlaceholder().trigger("plotunselected",[]))}function d(e,n){var r,i,s,o,u=t.getAxes();for(var a in u){r=u[a];if(r.direction==n){o=n+r.n+"axis",!e[o]&&r.n==1&&(o=n+"axis");if(e[o]){i=e[o].from,s=e[o].to;break}}}e[o]||(r=n=="x"?t.getXAxes()[0]:t.getYAxes()[0],i=e[n+"1"],s=e[n+"2"]);if(i!=null&&s!=null&&i>s){var f=i;i=s,s=f}return{from:i,to:s,axis:r}}function v(e,r){var i,s,o=t.getOptions();o.selection.mode=="y"?(n.first.x=0,n.second.x=t.width()):(s=d(e,"x"),n.first.x=s.axis.p2c(s.from),n.second.x=s.axis.p2c(s.to)),o.selection.mode=="x"?(n.first.y=0,n.second.y=t.height()):(s=d(e,"y"),n.first.y=s.axis.p2c(s.from),n.second.y=s.axis.p2c(s.to)),n.show=!0,t.triggerRedrawOverlay(),!r&&m()&&f()}function m(){var e=t.getOptions().selection.minSize;return Math.abs(n.second.
|
||||
x-n.first.x)>=e&&Math.abs(n.second.y-n.first.y)>=e}var n={first:{x:-1,y:-1},second:{x:-1,y:-1},show:!1,active:!1},r={},i=null;t.clearSelection=p,t.setSelection=v,t.getSelection=a,t.hooks.bindEvents.push(function(e,t){var n=e.getOptions();n.selection.mode!=null&&(t.mousemove(s),t.mousedown(o))}),t.hooks.drawOverlay.push(function(t,r){if(n.show&&m()){var i=t.getPlotOffset(),s=t.getOptions();r.save(),r.translate(i.left,i.top);var o=e.color.parse(s.selection.color);r.strokeStyle=o.scale("a",.8).toString(),r.lineWidth=1,r.lineJoin=s.selection.shape,r.fillStyle=o.scale("a",.4).toString();var u=Math.min(n.first.x,n.second.x)+.5,a=Math.min(n.first.y,n.second.y)+.5,f=Math.abs(n.second.x-n.first.x)-1,l=Math.abs(n.second.y-n.first.y)-1;r.fillRect(u,a,f,l),r.strokeRect(u,a,f,l),r.restore()}}),t.hooks.shutdown.push(function(t,n){n.unbind("mousemove",s),n.unbind("mousedown",o),i&&e(document).unbind("mouseup",i)})}e.plot.plugins.push({init:t,options:{selection:{mode:null,color:"#e8cfac",shape:"round",
|
||||
minSize:5}},name:"selection",version:"1.1"})}(jQuery),define("jquery.flot.selection",function(){}),function(e){function n(e,t){return t*Math.floor(e/t)}function r(e,t,n,r){if(typeof e.strftime=="function")return e.strftime(t);var i=function(e,t){return e=""+e,t=""+(t==null?"0":t),e.length==1?t+e:e},s=[],o=!1,u=e.getHours(),a=u<12;n==null&&(n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),r==null&&(r=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]);var f;u>12?f=u-12:u==0?f=12:f=u;for(var l=0;l<t.length;++l){var c=t.charAt(l);if(o){switch(c){case"a":c=""+r[e.getDay()];break;case"b":c=""+n[e.getMonth()];break;case"d":c=i(e.getDate());break;case"e":c=i(e.getDate()," ");break;case"h":case"H":c=i(u);break;case"I":c=i(f);break;case"l":c=i(f," ");break;case"m":c=i(e.getMonth()+1);break;case"M":c=i(e.getMinutes());break;case"q":c=""+(Math.floor(e.getMonth()/3)+1);break;case"S":c=i(e.getSeconds());break;case"y":c=i(e.getFullYear()%100);break;case"Y":c=""+e.getFullYear();break;
|
||||
case"p":c=a?"am":"pm";break;case"P":c=a?"AM":"PM";break;case"w":c=""+e.getDay()}s.push(c),o=!1}else c=="%"?o=!0:s.push(c)}return s.join("")}function i(e){function t(e,t,n,r){e[t]=function(){return n[r].apply(n,arguments)}}var n={date:e};e.strftime!=undefined&&t(n,"strftime",e,"strftime"),t(n,"getTime",e,"getTime"),t(n,"setTime",e,"setTime");var r=["Date","Day","FullYear","Hours","Milliseconds","Minutes","Month","Seconds"];for(var i=0;i<r.length;i++)t(n,"get"+r[i],e,"getUTC"+r[i]),t(n,"set"+r[i],e,"setUTC"+r[i]);return n}function s(e,t){if(t.timezone=="browser")return new Date(e);if(!t.timezone||t.timezone=="utc")return i(new Date(e));if(typeof timezoneJS!="undefined"&&typeof timezoneJS.Date!="undefined"){var n=new timezoneJS.Date;return n.setTimezone(t.timezone),n.setTime(e),n}return i(new Date(e))}function l(t){t.hooks.processOptions.push(function(t,i){e.each(t.getAxes(),function(e,t){var i=t.options;i.mode=="time"&&(t.tickGenerator=function(e){var t=[],r=s(e.min,i),u=0,l=i.tickSize&&i
|
||||
.tickSize[1]==="quarter"||i.minTickSize&&i.minTickSize[1]==="quarter"?f:a;i.minTickSize!=null&&(typeof i.tickSize=="number"?u=i.tickSize:u=i.minTickSize[0]*o[i.minTickSize[1]]);for(var c=0;c<l.length-1;++c)if(e.delta<(l[c][0]*o[l[c][1]]+l[c+1][0]*o[l[c+1][1]])/2&&l[c][0]*o[l[c][1]]>=u)break;var h=l[c][0],p=l[c][1];if(p=="year"){if(i.minTickSize!=null&&i.minTickSize[1]=="year")h=Math.floor(i.minTickSize[0]);else{var d=Math.pow(10,Math.floor(Math.log(e.delta/o.year)/Math.LN10)),v=e.delta/o.year/d;v<1.5?h=1:v<3?h=2:v<7.5?h=5:h=10,h*=d}h<1&&(h=1)}e.tickSize=i.tickSize||[h,p];var m=e.tickSize[0];p=e.tickSize[1];var g=m*o[p];p=="second"?r.setSeconds(n(r.getSeconds(),m)):p=="minute"?r.setMinutes(n(r.getMinutes(),m)):p=="hour"?r.setHours(n(r.getHours(),m)):p=="month"?r.setMonth(n(r.getMonth(),m)):p=="quarter"?r.setMonth(3*n(r.getMonth()/3,m)):p=="year"&&r.setFullYear(n(r.getFullYear(),m)),r.setMilliseconds(0),g>=o.minute&&r.setSeconds(0),g>=o.hour&&r.setMinutes(0),g>=o.day&&r.setHours(0),g>=o.day*4&&
|
||||
r.setDate(1),g>=o.month*2&&r.setMonth(n(r.getMonth(),3)),g>=o.quarter*2&&r.setMonth(n(r.getMonth(),6)),g>=o.year&&r.setMonth(0);var y=0,b=Number.NaN,w;do{w=b,b=r.getTime(),t.push(b);if(p=="month"||p=="quarter")if(m<1){r.setDate(1);var E=r.getTime();r.setMonth(r.getMonth()+(p=="quarter"?3:1));var S=r.getTime();r.setTime(b+y*o.hour+(S-E)*m),y=r.getHours(),r.setHours(0)}else r.setMonth(r.getMonth()+m*(p=="quarter"?3:1));else p=="year"?r.setFullYear(r.getFullYear()+m):r.setTime(b+g)}while(b<e.max&&b!=w);return t},t.tickFormatter=function(e,t){var n=s(e,t.options);if(i.timeformat!=null)return r(n,i.timeformat,i.monthNames,i.dayNames);var u=t.options.tickSize&&t.options.tickSize[1]=="quarter"||t.options.minTickSize&&t.options.minTickSize[1]=="quarter",a=t.tickSize[0]*o[t.tickSize[1]],f=t.max-t.min,l=i.twelveHourClock?" %p":"",c=i.twelveHourClock?"%I":"%H",h;a<o.minute?h=c+":%M:%S"+l:a<o.day?f<2*o.day?h=c+":%M"+l:h="%b %d "+c+":%M"+l:a<o.month?h="%b %d":u&&a<o.quarter||!u&&a<o.year?f<o.year?h="%b"
|
||||
:h="%b %Y":u&&a<o.year?f<o.year?h="Q%q":h="Q%q %Y":h="%Y";var p=r(n,h,i.monthNames,i.dayNames);return p})})})}var t={xaxis:{timezone:null,timeformat:null,twelveHourClock:!1,monthNames:null}},o={second:1e3,minute:6e4,hour:36e5,day:864e5,month:2592e6,quarter:7776e6,year:525949.2*60*1e3},u=[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[.25,"month"],[.5,"month"],[1,"month"],[2,"month"]],a=u.concat([[3,"month"],[6,"month"],[1,"year"]]),f=u.concat([[1,"quarter"],[2,"quarter"],[1,"year"]]);e.plot.plugins.push({init:l,options:t,name:"time",version:"1.0"}),e.plot.formatDate=r}(jQuery),define("jquery.flot.time",function(){}),function(e){function n(e){function t(e,t){var n=null;for(var r=0;r<t.length;++r){if(e==t[r])break;t[r].stack==e.stack&&(n=t[r])}return n}function n(e,n,r){if(n.stack==null||n.stack===!1)return;var i=t(n,
|
||||
e.getData());if(!i)return;var s=r.pointsize,o=r.points,u=i.datapoints.pointsize,a=i.datapoints.points,f=[],l,c,h,p,d,v,m=n.lines.show,g=n.bars.horizontal,y=s>2&&(g?r.format[2].x:r.format[2].y),b=m&&n.lines.steps,w=!0,E=g?1:0,S=g?0:1,x=0,T=0,N,C;for(;;){if(x>=o.length)break;N=f.length;if(o[x]==null){for(C=0;C<s;++C)f.push(o[x+C]);x+=s}else if(T>=a.length){if(!m)for(C=0;C<s;++C)f.push(o[x+C]);x+=s}else if(a[T]==null){for(C=0;C<s;++C)f.push(null);w=!0,T+=u}else{l=o[x+E],c=o[x+S],p=a[T+E],d=a[T+S],v=0;if(l==p){for(C=0;C<s;++C)f.push(o[x+C]);f[N+S]+=d,v=d,x+=s,T+=u}else if(l>p){if(m&&x>0&&o[x-s]!=null){h=c+(o[x-s+S]-c)*(p-l)/(o[x-s+E]-l),f.push(p),f.push(h+d);for(C=2;C<s;++C)f.push(o[x+C]);v=d}T+=u}else{if(w&&m){x+=s;continue}for(C=0;C<s;++C)f.push(o[x+C]);m&&T>0&&a[T-u]!=null&&(v=d+(a[T-u+S]-d)*(l-p)/(a[T-u+E]-p)),f[N+S]+=v,x+=s}w=!1,N!=f.length&&y&&(f[N+2]+=v)}if(b&&N!=f.length&&N>0&&f[N]!=null&&f[N]!=f[N-s]&&f[N+1]!=f[N-s+1]){for(C=0;C<s;++C)f[N+s+C]=f[N+C];f[N+1]=f[N-s+1]}}r.points=f}e.hooks
|
||||
.processDatapoints.push(n)}var t={series:{stack:null}};e.plot.plugins.push({init:n,options:t,name:"stack",version:"1.2"})}(jQuery),define("jquery.flot.stack",function(){}),define("panels/histogram/module",["angular","app","jquery","underscore","kbn","moment","./timeSeries","jquery.flot","jquery.flot.pie","jquery.flot.selection","jquery.flot.time","jquery.flot.stack"],function(e,t,n,r,i,s,o){var u=e.module("kibana.panels.histogram",[]);t.useModule(u),u.controller("histogram",["$scope","querySrv","dashboard","filterSrv",function(t,n,u,a){t.panelMeta={editorTabs:[{title:"Queries",src:"app/partials/querySelect.html"}],status:"Stable",description:"A bucketed time series chart of the current query or queries. Uses the Elasticsearch date_histogram facet. If using time stamped indices this panel will query them sequentially to attempt to apply the lighest possible load to your Elasticsearch cluster"};var f={mode:"count",time_field:"@timestamp",queries:{mode:"all",ids:[]},value_field:null,auto_int
|
||||
:!0,resolution:100,interval:"5m",fill:0,linewidth:3,timezone:"browser",spyable:!0,zoomlinks:!0,bars:!0,stack:!0,points:!1,lines:!1,legend:!0,"x-axis":!0,"y-axis":!0,percentage:!1,interactive:!0,tooltip:{value_type:"cumulative",query_as_alias:!1}};r.defaults(t.panel,f),t.init=function(){t.$on("refresh",function(){t.get_data()}),t.get_data()},t.get_time_range=function(){var e=t.range=a.timeRange("min");return e},t.get_interval=function(){var e=t.panel.interval,n;return t.panel.auto_int&&(n=t.get_time_range(),n&&(e=i.secondsToHms(i.calculate_interval(n.from,n.to,t.panel.resolution,0)/1e3))),t.panel.interval=e||"10m",t.panel.interval},t.get_data=function(e,s){r.isUndefined(e)&&(e=0),delete t.panel.error;if(u.indices.length===0)return;var f=t.get_time_range(),l=t.get_interval(f);t.panel.auto_int&&(t.panel.interval=i.secondsToHms(i.calculate_interval(f.from,f.to,t.panel.resolution,0)/1e3)),t.panelMeta.loading=!0;var c=t.ejs.Request().indices(u.indices[e]);t.panel.queries.ids=n.idsByMode(t.panel
|
||||
.queries),r.each(t.panel.queries.ids,function(e){var i=t.ejs.FilteredQuery(n.getEjsObj(e),a.getBoolFilter(a.ids)),s=t.ejs.DateHistogramFacet(e);if(t.panel.mode==="count")s=s.field(t.panel.time_field);else{if(r.isNull(t.panel.value_field)){t.panel.error="In "+t.panel.mode+" mode a field must be specified";return}s=s.keyField(t.panel.time_field).valueField(t.panel.value_field)}s=s.interval(l).facetFilter(t.ejs.QueryFilter(i)),c=c.facet(s).size(0)}),t.populate_modal(c);var h=c.doSearch();h.then(function(i){t.panelMeta.loading=!1,e===0&&(t.hits=0,t.data=[],s=t.query_id=(new Date).getTime());if(!r.isUndefined(i.error)){t.panel.error=t.parse_error(i.error);return}var a=r.map(r.keys(i.facets),function(e){return parseInt(e,10)});if(t.query_id===s&&r.difference(a,t.panel.queries.ids).length===0){var c=0,h,p;r.each(t.panel.queries.ids,function(s){var u=i.facets[s];r.isUndefined(t.data[c])||e===0?(h=new o.ZeroFilled({interval:l,start_date:f&&f.from,end_date:f&&f.to,fill_style:"minimal"}),p=0):(h=t
|
||||
.data[c].time_series,p=t.data[c].hits),r.each(u.entries,function(e){h.addValue(e.time,e[t.panel.mode]),p+=e.count,t.hits+=e.count}),t.data[c]={info:n.list[s],time_series:h,hits:p},c++}),t.$emit("render"),e<u.indices.length-1&&t.get_data(e+1,s)}})},t.zoom=function(e){var n=a.timeRange("min"),r=n.to.valueOf()-n.from.valueOf(),i=n.to.valueOf()-r/2,o=i+r*e/2,f=i-r*e/2;if(o>Date.now()&&n.to<Date.now()){var l=o-Date.now();f-=l,o=Date.now()}e>1&&a.removeByType("time"),a.set({type:"time",from:s.utc(f),to:s.utc(o),field:t.panel.time_field}),u.refresh()},t.populate_modal=function(n){t.inspector=e.toJson(JSON.parse(n.toString()),!0)},t.set_refresh=function(e){t.refresh=e},t.close_edit=function(){t.refresh&&t.get_data(),t.refresh=!1,t.$emit("render")}}]),u.directive("histogramChart",["dashboard","filterSrv",function(t,o){return{restrict:"A",template:"<div></div>",link:function(u,a){function f(){a.css({height:u.panel.height||u.row.height});try{r.each(u.data,function(e){e.label=e.info.alias,e.color=e
|
||||
.info.color})}catch(e){return}var t=i.interval_to_seconds(u.panel.interval)*1e3,s=u.panel.stack?!0:null;try{var o={legend:{show:!1},series:{stack:u.panel.percentage?null:s,lines:{show:u.panel.lines,fill:u.panel.fill/10,lineWidth:u.panel.linewidth,steps:!1},bars:{show:u.panel.bars,fill:1,barWidth:t/1.8,zero:!1,lineWidth:0},points:{show:u.panel.points,fill:1,fillColor:!1,radius:5},shadowSize:1},yaxis:{show:u.panel["y-axis"],min:0,max:u.panel.percentage&&u.panel.stack?100:null},xaxis:{timezone:u.panel.timezone,show:u.panel["x-axis"],mode:"time",min:r.isUndefined(u.range.from)?null:u.range.from.getTime(),max:r.isUndefined(u.range.to)?null:u.range.to.getTime(),timeformat:l(u.panel.interval),label:"Datetime"},grid:{backgroundColor:null,borderWidth:0,hoverable:!0,color:"#c8c8c8"}};u.panel.interactive&&(o.selection={mode:"x",color:"#666"});var f=[];u.data.length>1&&(f=r.uniq(Array.prototype.concat.apply([],r.map(u.data,function(e){return e.time_series.getOrderedTimes()})).sort(),!0));for(var c=0
|
||||
;c<u.data.length;c++)u.data[c].data=u.data[c].time_series.getFlotPairs(f);u.plot=n.plot(a,u.data,o)}catch(e){a.text(e)}}function l(e){var t=i.interval_to_seconds(e);return t>=2628e3?"%m/%y":t>=86400?"%m/%d/%y":t>=60?"%H:%M<br>%m/%d":"%H:%M:%S"}u.$on("render",function(){f()}),e.element(window).bind("resize",function(){f()});var c=n("<div>");a.bind("plothover",function(e,t,n){var r,o;n?(n.series.info.alias||u.panel.tooltip.query_as_alias?r='<small style="font-size:0.9em;"><i class="icon-circle" style="color:'+n.series.color+';"></i>'+" "+(n.series.info.alias||n.series.info.query)+"</small><br>":r=i.query_color_dot(n.series.color,15)+" ",u.panel.stack&&u.panel.tooltip.value_type==="individual"?o=n.datapoint[1]-n.datapoint[2]:o=n.datapoint[1],c.html(r+o+" @ "+s(n.datapoint[0]).format("MM/DD HH:mm:ss")).place_tt(t.pageX,t.pageY)):c.detach()}),a.bind("plotselected",function(e,n){o.set({type:"time",from:s.utc(n.xaxis.from),to:s.utc(n.xaxis.to),field:u.panel.time_field}),t.refresh()})}}}])});
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div><div class="row-fluid"><div class="span3"><label class="small">Style</label><select class="input-small" ng-model="panel.chart" ng-options="f for f in ['bar','pie','list','total']"></select></div><div class="span2" ng-show="panel.chart == 'total' || panel.chart == 'list'"><label class="small">Font Size</label><select class="input-mini" ng-model="panel.style['font-size']" ng-options="f for f in ['7pt','8pt','9pt','10pt','12pt','14pt','16pt','18pt','20pt','24pt','28pt','32pt','36pt','42pt','48pt','52pt','60pt','72pt']"></select></div><div class="span3" ng-show="panel.chart == 'bar' || panel.chart == 'pie'"><label class="small">Legend</label><select class="input-small" ng-model="panel.counter_pos" ng-options="f for f in ['above','below','none']"></select></div><div class="span3" ng-show="panel.chart != 'total' && panel.counter_pos != 'none'"><label class="small">List Format</label><select class="input-small" ng-model="panel.arrangement" ng-options="f for f in ['horizontal','vertical']"></select></div><div class="span1" ng-show="panel.chart == 'pie'"><label class="small">Donut</label><input type="checkbox" ng-model="panel.donut" ng-checked="panel.donut"></div><div class="span1" ng-show="panel.chart == 'pie'"><label class="small">Tilt</label><input type="checkbox" ng-model="panel.tilt" ng-checked="panel.tilt"></div><div class="span1" ng-show="panel.chart == 'pie'"><label class="small">Labels</label><input type="checkbox" ng-model="panel.labels" ng-checked="panel.labels"></div></div></div>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div ng-controller="hits" ng-init="init()"><span ng-show="panel.spyable" class="spy panelextra pointer"><i bs-modal="'app/partials/inspector.html'" class="icon-eye-open"></i></span><div ng-show="panel.counter_pos == 'above' && (panel.chart == 'bar' || panel.chart == 'pie')" id="{{$id}}-legend"><table class="small" ng-show="panel.arrangement == 'vertical'"><tr ng-repeat="query in data"><td><div style="display:inline-block;border-radius:5px;background:{{query.info.color}};height:10px;width:10px"></div></td><td style="padding-right:10px;padding-left:10px">{{query.info.alias}}</td><td>{{query.data[0][1]}}</td></tr></table><div class="small" ng-show="panel.arrangement == 'horizontal'" ng-repeat="query in data" style="float:left;padding-left: 10px"><span><i class="icon-circle" ng-style="{color:query.info.color}"></i> {{query.info.alias}} ({{query.data[0][1]}})</span></div><br></div><div style="clear:both"></div><div ng-show="panel.chart == 'pie' || panel.chart == 'bar'" hits-chart="" params="{{panel}}" style="position:relative"></div><div ng-show="panel.counter_pos == 'below' && (panel.chart == 'bar' || panel.chart == 'pie')" id="{{$id}}-legend"><table class="small" ng-show="panel.arrangement == 'vertical'"><tr ng-repeat="query in data"><td><i class="icon-circle" ng-style="{color:query.info.color}"></i></td><td style="padding-right:10px;padding-left:10px">{{query.info.alias}}</td><td>{{query.data[0][1]}}</td></tr></table><div class="small" ng-show="panel.arrangement == 'horizontal'" ng-repeat="query in data" style="float:left;padding-left: 10px"><span><i class="icon-circle" ng-style="{color:query.info.color}"></i></span> {{query.info.alias}} ({{query.data[0][1]}})</div><br></div><div ng-show="panel.chart == 'total'"><div ng-style="panel.style" style="line-height:{{panel.style['font-size']}}">{{hits}}</div></div><span ng-show="panel.chart == 'list'"><div ng-style="panel.style" style="display:inline-block;line-height:{{panel.style['font-size']}}" ng-repeat="query in data"><i class="icon-circle" style="color:{{query.info.color}}"></i> {{query.info.alias}} ({{query.hits}})</div></span><br ng-show="panel.arrangement == 'vertical' && panel.chart == 'list'"></div>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
define("panels/hits/module",["angular","app","underscore","jquery","kbn","jquery.flot","jquery.flot.pie"],function(e,t,n,r,i){var s=e.module("kibana.panels.hits",[]);t.useModule(s),s.controller("hits",["$scope","querySrv","dashboard","filterSrv",function(t,r,i,s){t.panelMeta={editorTabs:[{title:"Queries",src:"app/partials/querySelect.html"}],status:"Stable",description:"The total hits for a query or set of queries. Can be a pie chart, bar chart, list, or absolute total of all queries combined"};var o={queries:{mode:"all",ids:[]},style:{"font-size":"10pt"},arrangement:"horizontal",chart:"bar",counter_pos:"above",donut:!1,tilt:!1,labels:!0,spyable:!0};n.defaults(t.panel,o),t.init=function(){t.hits=0,t.$on("refresh",function(){t.get_data()}),t.get_data()},t.get_data=function(o,u){delete t.panel.error,t.panelMeta.loading=!0;if(i.indices.length===0)return;var a=n.isUndefined(o)?0:o,f=t.ejs.Request().indices(i.indices[a]);t.panel.queries.ids=r.idsByMode(t.panel.queries),n.each(t.panel.queries
|
||||
.ids,function(e){var n=t.ejs.FilteredQuery(r.getEjsObj(e),s.getBoolFilter(s.ids));f=f.facet(t.ejs.QueryFacet(e).query(n)).size(0)}),t.inspector=e.toJson(JSON.parse(f.toString()),!0);var l=f.doSearch();l.then(function(e){t.panelMeta.loading=!1,a===0&&(t.hits=0,t.data=[],u=t.query_id=(new Date).getTime());if(!n.isUndefined(e.error)){t.panel.error=t.parse_error(e.error);return}var s=n.map(n.keys(e.facets),function(e){return parseInt(e,10)});if(t.query_id===u&&n.intersection(s,t.panel.queries.ids).length===t.panel.queries.ids.length){var o=0;n.each(t.panel.queries.ids,function(i){var s=e.facets[i],u=n.isUndefined(t.data[o])||a===0?s.count:t.data[o].hits+s.count;t.hits+=s.count,t.data[o]={info:r.list[i],id:i,hits:u,data:[[o,u]]},o++}),t.$emit("render"),a<i.indices.length-1&&t.get_data(a+1,u)}})},t.set_refresh=function(e){t.refresh=e},t.close_edit=function(){t.refresh&&t.get_data(),t.refresh=!1,t.$emit("render")}}]),s.directive("hitsChart",["querySrv",function(t){return{restrict:"A",link:function(
|
||||
s,o){function u(){o.css({height:s.panel.height||s.row.height});try{n.each(s.data,function(e){e.label=e.info.alias,e.color=e.info.color})}catch(e){return}try{s.panel.chart==="bar"&&(s.plot=r.plot(o,s.data,{legend:{show:!1},series:{lines:{show:!1},bars:{show:!0,fill:1,barWidth:.8,horizontal:!1},shadowSize:1},yaxis:{show:!0,min:0,color:"#c8c8c8"},xaxis:{show:!1},grid:{borderWidth:0,borderColor:"#eee",color:"#eee",hoverable:!0},colors:t.colors})),s.panel.chart==="pie"&&(s.plot=r.plot(o,s.data,{legend:{show:!1},series:{pie:{innerRadius:s.panel.donut?.4:0,tilt:s.panel.tilt?.45:1,radius:1,show:!0,combine:{color:"#999",label:"The Rest"},stroke:{width:0},label:{show:s.panel.labels,radius:2/3,formatter:function(e,t){return"<div ng-click=\"build_search(panel.query.field,'"+e+"')"+' "style="font-size:8pt;text-align:center;padding:2px;color:white;">'+e+"<br/>"+Math.round(t.percent)+"%</div>"},threshold:.1}}},grid:{hoverable:!0,clickable:!0},colors:t.colors}))}catch(e){o.text(e)}}s.$on("render",function(
|
||||
){u()}),e.element(window).bind("resize",function(){u()});var a=r("<div>");o.bind("plothover",function(e,t,n){if(n){var r=s.panel.chart==="bar"?n.datapoint[1]:n.datapoint[1][0][1];a.html(i.query_color_dot(n.series.color,20)+" "+r.toFixed(0)).place_tt(t.pageX,t.pageY)}else a.remove()})}}}])});
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div class="row-fluid"><div class="span3"><form><h6>Field<tip>2 letter country or state code</tip></h6><h6>Field</h6><input bs-typeahead="fields.list" type="text" class="input-small" ng-model="panel.field"></form></div><div class="span1"><h6>Map</h6><select ng-change="$emit('render')" class="input-small" ng-model="panel.map" ng-options="f for f in ['world','europe','usa']"></select></div></div>
|
||||
+43
File diff suppressed because one or more lines are too long
+38
File diff suppressed because one or more lines are too long
+80
File diff suppressed because one or more lines are too long
+58
@@ -0,0 +1,58 @@
|
||||
<div ng-controller="map" ng-init="init()"><style>.jvectormap-label {
|
||||
position: absolute;
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
border: solid 1px #CDCDCD;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
background: #292929;
|
||||
color: white;
|
||||
font-family: sans-serif, Verdana;
|
||||
font-size: smaller;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.jvectormap-zoomin, .jvectormap-zoomout {
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
background: #292929;
|
||||
padding: 3px;
|
||||
color: white;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
cursor: pointer;
|
||||
line-height: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.jvectormap {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.jvectormap-zoomin {
|
||||
display: none;
|
||||
top: 10px;
|
||||
}
|
||||
|
||||
.jvectormap-zoomout {
|
||||
display: none;
|
||||
top: 30px;
|
||||
}
|
||||
|
||||
.map-legend {
|
||||
color : #c8c8c8;
|
||||
padding : 10px;
|
||||
font-size: 11pt;
|
||||
font-weight: 200;
|
||||
background-color: #1f1f1f;
|
||||
border-radius: 5px;
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
top: 15px;
|
||||
display: none;
|
||||
z-index: 99;
|
||||
}</style><span ng-show="panel.spyable" class="spy panelextra pointer"><i bs-modal="'app/partials/modal.html'" class="icon-eye-open"></i></span><div class="jvectormap" map="" params="{{panel}}" style="height:{{panel.height || row.height}}"></div></div>
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
(function(e){var t={set:{colors:1,values:1,backgroundColor:1,scaleColors:1,normalizeFunction:1,focus:1},get:{selectedRegions:1,selectedMarkers:1,mapObject:1,regionName:1}};e.fn.vectorMap=function(e){var n,r,i,n=this.children(".jvectormap-container").data("mapObject");if(e==="addMap")jvm.WorldMap.maps[arguments[1]]=arguments[2];else{if(!(e!=="set"&&e!=="get"||!t[e][arguments[1]]))return r=arguments[1].charAt(0).toUpperCase()+arguments[1].substr(1),n[e+r].apply(n,Array.prototype.slice.call(arguments,2));e=e||{},e.container=this,n=new jvm.WorldMap(e)}return this}})(jQuery),function(e){function t(t){var n=t||window.event,r=[].slice.call(arguments,1),i=0,s=!0,o=0,u=0;return t=e.event.fix(n),t.type="mousewheel",n.wheelDelta&&(i=n.wheelDelta/120),n.detail&&(i=-n.detail/3),u=i,n.axis!==undefined&&n.axis===n.HORIZONTAL_AXIS&&(u=0,o=-1*i),n.wheelDeltaY!==undefined&&(u=n.wheelDeltaY/120),n.wheelDeltaX!==undefined&&(o=-1*n.wheelDeltaX/120),r.unshift(t,i,o,u),(e.event.dispatch||e.event.handle).apply
|
||||
(this,r)}var n=["DOMMouseScroll","mousewheel"];if(e.event.fixHooks)for(var r=n.length;r;)e.event.fixHooks[n[--r]]=e.event.mouseHooks;e.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var e=n.length;e;)this.addEventListener(n[--e],t,!1);else this.onmousewheel=t},teardown:function(){if(this.removeEventListener)for(var e=n.length;e;)this.removeEventListener(n[--e],t,!1);else this.onmousewheel=null}},e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}(jQuery);var jvm={inherits:function(e,t){function n(){}n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e,e.parentClass=t},mixin:function(e,t){var n;for(n in t.prototype)t.prototype.hasOwnProperty(n)&&(e.prototype[n]=t.prototype[n])},min:function(e){var t=Number.MAX_VALUE,n;if(e instanceof Array)for(n=0;n<e.length;n++)e[n]<t&&(t=e[n]);else for(n in e)e[n]<t&&(t=e[n]);return t},max:function(e){var t=
|
||||
Number.MIN_VALUE,n;if(e instanceof Array)for(n=0;n<e.length;n++)e[n]>t&&(t=e[n]);else for(n in e)e[n]>t&&(t=e[n]);return t},keys:function(e){var t=[],n;for(n in e)t.push(n);return t},values:function(e){var t=[],n,r;for(r=0;r<arguments.length;r++){e=arguments[r];for(n in e)t.push(e[n])}return t}};jvm.$=jQuery,jvm.AbstractElement=function(e,t){this.node=this.createElement(e),this.name=e,this.properties={},t&&this.set(t)},jvm.AbstractElement.prototype.set=function(e,t){var n;if(typeof e=="object")for(n in e)this.properties[n]=e[n],this.applyAttr(n,e[n]);else this.properties[e]=t,this.applyAttr(e,t)},jvm.AbstractElement.prototype.get=function(e){return this.properties[e]},jvm.AbstractElement.prototype.applyAttr=function(e,t){this.node.setAttribute(e,t)},jvm.AbstractElement.prototype.remove=function(){jvm.$(this.node).remove()},jvm.AbstractCanvasElement=function(e,t,n){this.container=e,this.setSize(t,n),this.rootElement=new jvm[this.classPrefix+"GroupElement"],this.node.appendChild(this.rootElement
|
||||
.node),this.container.appendChild(this.node)},jvm.AbstractCanvasElement.prototype.add=function(e,t){t=t||this.rootElement,t.add(e),e.canvas=this},jvm.AbstractCanvasElement.prototype.addPath=function(e,t,n){var r=new jvm[this.classPrefix+"PathElement"](e,t);return this.add(r,n),r},jvm.AbstractCanvasElement.prototype.addCircle=function(e,t,n){var r=new jvm[this.classPrefix+"CircleElement"](e,t);return this.add(r,n),r},jvm.AbstractCanvasElement.prototype.addGroup=function(e){var t=new jvm[this.classPrefix+"GroupElement"];return e?e.node.appendChild(t.node):this.node.appendChild(t.node),t.canvas=this,t},jvm.AbstractShapeElement=function(e,t,n){this.style=n||{},this.style.current={},this.isHovered=!1,this.isSelected=!1,this.updateStyle()},jvm.AbstractShapeElement.prototype.setHovered=function(e){this.isHovered!==e&&(this.isHovered=e,this.updateStyle())},jvm.AbstractShapeElement.prototype.setSelected=function(e){this.isSelected!==e&&(this.isSelected=e,this.updateStyle(),jvm.$(this.node).trigger
|
||||
("selected",[e]))},jvm.AbstractShapeElement.prototype.setStyle=function(e,t){var n={};typeof e=="object"?n=e:n[e]=t,jvm.$.extend(this.style.current,n),this.updateStyle()},jvm.AbstractShapeElement.prototype.updateStyle=function(){var e={};jvm.AbstractShapeElement.mergeStyles(e,this.style.initial),jvm.AbstractShapeElement.mergeStyles(e,this.style.current),this.isHovered&&jvm.AbstractShapeElement.mergeStyles(e,this.style.hover),this.isSelected&&(jvm.AbstractShapeElement.mergeStyles(e,this.style.selected),this.isHovered&&jvm.AbstractShapeElement.mergeStyles(e,this.style.selectedHover)),this.set(e)},jvm.AbstractShapeElement.mergeStyles=function(e,t){var n;t=t||{};for(n in t)t[n]===null?delete e[n]:e[n]=t[n]},jvm.SVGElement=function(e,t){jvm.SVGElement.parentClass.apply(this,arguments)},jvm.inherits(jvm.SVGElement,jvm.AbstractElement),jvm.SVGElement.svgns="http://www.w3.org/2000/svg",jvm.SVGElement.prototype.createElement=function(e){return document.createElementNS(jvm.SVGElement.svgns,e)},jvm
|
||||
.SVGElement.prototype.addClass=function(e){this.node.setAttribute("class",e)},jvm.SVGElement.prototype.getElementCtr=function(e){return jvm["SVG"+e]},jvm.SVGElement.prototype.getBBox=function(){return this.node.getBBox()},jvm.SVGGroupElement=function(){jvm.SVGGroupElement.parentClass.call(this,"g")},jvm.inherits(jvm.SVGGroupElement,jvm.SVGElement),jvm.SVGGroupElement.prototype.add=function(e){this.node.appendChild(e.node)},jvm.SVGCanvasElement=function(e,t,n){this.classPrefix="SVG",jvm.SVGCanvasElement.parentClass.call(this,"svg"),jvm.AbstractCanvasElement.apply(this,arguments)},jvm.inherits(jvm.SVGCanvasElement,jvm.SVGElement),jvm.mixin(jvm.SVGCanvasElement,jvm.AbstractCanvasElement),jvm.SVGCanvasElement.prototype.setSize=function(e,t){this.width=e,this.height=t,this.node.setAttribute("width",e),this.node.setAttribute("height",t)},jvm.SVGCanvasElement.prototype.applyTransformParams=function(e,t,n){this.scale=e,this.transX=t,this.transY=n,this.rootElement.node.setAttribute("transform","scale("+
|
||||
e+") translate("+t+", "+n+")")},jvm.SVGShapeElement=function(e,t,n){jvm.SVGShapeElement.parentClass.call(this,e,t),jvm.AbstractShapeElement.apply(this,arguments)},jvm.inherits(jvm.SVGShapeElement,jvm.SVGElement),jvm.mixin(jvm.SVGShapeElement,jvm.AbstractShapeElement),jvm.SVGPathElement=function(e,t){jvm.SVGPathElement.parentClass.call(this,"path",e,t),this.node.setAttribute("fill-rule","evenodd")},jvm.inherits(jvm.SVGPathElement,jvm.SVGShapeElement),jvm.SVGCircleElement=function(e,t){jvm.SVGCircleElement.parentClass.call(this,"circle",e,t)},jvm.inherits(jvm.SVGCircleElement,jvm.SVGShapeElement),jvm.VMLElement=function(e,t){jvm.VMLElement.VMLInitialized||jvm.VMLElement.initializeVML(),jvm.VMLElement.parentClass.apply(this,arguments)},jvm.inherits(jvm.VMLElement,jvm.AbstractElement),jvm.VMLElement.VMLInitialized=!1,jvm.VMLElement.initializeVML=function(){try{document.namespaces.rvml||document.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),jvm.VMLElement.prototype.createElement=function(
|
||||
e){return document.createElement("<rvml:"+e+' class="rvml">')}}catch(e){jvm.VMLElement.prototype.createElement=function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}document.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)"),jvm.VMLElement.VMLInitialized=!0},jvm.VMLElement.prototype.getElementCtr=function(e){return jvm["VML"+e]},jvm.VMLElement.prototype.addClass=function(e){jvm.$(this.node).addClass(e)},jvm.VMLElement.prototype.applyAttr=function(e,t){this.node[e]=t},jvm.VMLElement.prototype.getBBox=function(){var e=jvm.$(this.node);return{x:e.position().left/this.canvas.scale,y:e.position().top/this.canvas.scale,width:e.width()/this.canvas.scale,height:e.height()/this.canvas.scale}},jvm.VMLGroupElement=function(){jvm.VMLGroupElement.parentClass.call(this,"group"),this.node.style.left="0px",this.node.style.top="0px",this.node.coordorigin="0 0"},jvm.inherits(jvm.VMLGroupElement,jvm.VMLElement),jvm.VMLGroupElement.prototype.
|
||||
add=function(e){this.node.appendChild(e.node)},jvm.VMLCanvasElement=function(e,t,n){this.classPrefix="VML",jvm.VMLCanvasElement.parentClass.call(this,"group"),jvm.AbstractCanvasElement.apply(this,arguments),this.node.style.position="absolute"},jvm.inherits(jvm.VMLCanvasElement,jvm.VMLElement),jvm.mixin(jvm.VMLCanvasElement,jvm.AbstractCanvasElement),jvm.VMLCanvasElement.prototype.setSize=function(e,t){var n,r,i,s;this.width=e,this.height=t,this.node.style.width=e+"px",this.node.style.height=t+"px",this.node.coordsize=e+" "+t,this.node.coordorigin="0 0";if(this.rootElement){n=this.rootElement.node.getElementsByTagName("shape");for(i=0,s=n.length;i<s;i++)n[i].coordsize=e+" "+t,n[i].style.width=e+"px",n[i].style.height=t+"px";r=this.node.getElementsByTagName("group");for(i=0,s=r.length;i<s;i++)r[i].coordsize=e+" "+t,r[i].style.width=e+"px",r[i].style.height=t+"px"}},jvm.VMLCanvasElement.prototype.applyTransformParams=function(e,t,n){this.scale=e,this.transX=t,this.transY=n,this.rootElement
|
||||
.node.coordorigin=this.width-t-this.width/100+","+(this.height-n-this.height/100),this.rootElement.node.coordsize=this.width/e+","+this.height/e},jvm.VMLShapeElement=function(e,t){jvm.VMLShapeElement.parentClass.call(this,e,t),this.fillElement=new jvm.VMLElement("fill"),this.strokeElement=new jvm.VMLElement("stroke"),this.node.appendChild(this.fillElement.node),this.node.appendChild(this.strokeElement.node),this.node.stroked=!1,jvm.AbstractShapeElement.apply(this,arguments)},jvm.inherits(jvm.VMLShapeElement,jvm.VMLElement),jvm.mixin(jvm.VMLShapeElement,jvm.AbstractShapeElement),jvm.VMLShapeElement.prototype.applyAttr=function(e,t){switch(e){case"fill":this.node.fillcolor=t;break;case"fill-opacity":this.fillElement.node.opacity=Math.round(t*100)+"%";break;case"stroke":t==="none"?this.node.stroked=!1:this.node.stroked=!0,this.node.strokecolor=t;break;case"stroke-opacity":this.strokeElement.node.opacity=Math.round(t*100)+"%";break;case"stroke-width":parseInt(t,10)===0?this.node.stroked=!1:
|
||||
this.node.stroked=!0,this.node.strokeweight=t;break;case"d":this.node.path=jvm.VMLPathElement.pathSvgToVml(t);break;default:jvm.VMLShapeElement.parentClass.prototype.applyAttr.apply(this,arguments)}},jvm.VMLPathElement=function(e,t){var n=new jvm.VMLElement("skew");jvm.VMLPathElement.parentClass.call(this,"shape",e,t),this.node.coordorigin="0 0",n.node.on=!0,n.node.matrix="0.01,0,0,0.01,0,0",n.node.offset="0,0",this.node.appendChild(n.node)},jvm.inherits(jvm.VMLPathElement,jvm.VMLShapeElement),jvm.VMLPathElement.prototype.applyAttr=function(e,t){e==="d"?this.node.path=jvm.VMLPathElement.pathSvgToVml(t):jvm.VMLShapeElement.prototype.applyAttr.call(this,e,t)},jvm.VMLPathElement.pathSvgToVml=function(e){var t="",n=0,r=0,i,s;return e=e.replace(/(-?\d+)e(-?\d+)/g,"0"),e.replace(/([MmLlHhVvCcSs])\s*((?:-?\d*(?:\.\d+)?\s*,?\s*)+)/g,function(e,t,o,u){o=o.replace(/(\d)-/g,"$1,-").replace(/^\s+/g,"").replace(/\s+$/g,"").replace(/\s+/g,",").split(","),o[0]||o.shift();for(var a=0,f=o.length;a<f;a++
|
||||
)o[a]=Math.round(100*o[a]);switch(t){case"m":return n+=o[0],r+=o[1],"t"+o.join(",");case"M":return n=o[0],r=o[1],"m"+o.join(",");case"l":return n+=o[0],r+=o[1],"r"+o.join(",");case"L":return n=o[0],r=o[1],"l"+o.join(",");case"h":return n+=o[0],"r"+o[0]+",0";case"H":return n=o[0],"l"+n+","+r;case"v":return r+=o[0],"r0,"+o[0];case"V":return r=o[0],"l"+n+","+r;case"c":return i=n+o[o.length-4],s=r+o[o.length-3],n+=o[o.length-2],r+=o[o.length-1],"v"+o.join(",");case"C":return i=o[o.length-4],s=o[o.length-3],n=o[o.length-2],r=o[o.length-1],"c"+o.join(",");case"s":return o.unshift(r-s),o.unshift(n-i),i=n+o[o.length-4],s=r+o[o.length-3],n+=o[o.length-2],r+=o[o.length-1],"v"+o.join(",");case"S":return o.unshift(r+r-s),o.unshift(n+n-i),i=o[o.length-4],s=o[o.length-3],n=o[o.length-2],r=o[o.length-1],"c"+o.join(",")}return""}).replace(/z/g,"e")},jvm.VMLCircleElement=function(e,t){jvm.VMLCircleElement.parentClass.call(this,"oval",e,t)},jvm.inherits(jvm.VMLCircleElement,jvm.VMLShapeElement),jvm.VMLCircleElement
|
||||
.prototype.applyAttr=function(e,t){switch(e){case"r":this.node.style.width=t*2+"px",this.node.style.height=t*2+"px",this.applyAttr("cx",this.get("cx")||0),this.applyAttr("cy",this.get("cy")||0);break;case"cx":if(!t)return;this.node.style.left=t-(this.get("r")||0)+"px";break;case"cy":if(!t)return;this.node.style.top=t-(this.get("r")||0)+"px";break;default:jvm.VMLCircleElement.parentClass.prototype.applyAttr.call(this,e,t)}},jvm.VectorCanvas=function(e,t,n){return this.mode=window.SVGAngle?"svg":"vml",this.mode=="svg"?this.impl=new jvm.SVGCanvasElement(e,t,n):this.impl=new jvm.VMLCanvasElement(e,t,n),this.impl},jvm.SimpleScale=function(e){this.scale=e},jvm.SimpleScale.prototype.getValue=function(e){return e},jvm.OrdinalScale=function(e){this.scale=e},jvm.OrdinalScale.prototype.getValue=function(e){return this.scale[e]},jvm.NumericScale=function(e,t,n,r){this.scale=[],t=t||"linear",e&&this.setScale(e),t&&this.setNormalizeFunction(t),n&&this.setMin(n),r&&this.setMax(r)},jvm.NumericScale.prototype=
|
||||
{setMin:function(e){this.clearMinValue=e,typeof this.normalize=="function"?this.minValue=this.normalize(e):this.minValue=e},setMax:function(e){this.clearMaxValue=e,typeof this.normalize=="function"?this.maxValue=this.normalize(e):this.maxValue=e},setScale:function(e){var t;for(t=0;t<e.length;t++)this.scale[t]=[e[t]]},setNormalizeFunction:function(e){e==="polynomial"?this.normalize=function(e){return Math.pow(e,.2)}:e==="linear"?delete this.normalize:this.normalize=e,this.setMin(this.clearMinValue),this.setMax(this.clearMaxValue)},getValue:function(e){var t=[],n=0,r,i=0,s;typeof this.normalize=="function"&&(e=this.normalize(e));for(i=0;i<this.scale.length-1;i++)r=this.vectorLength(this.vectorSubtract(this.scale[i+1],this.scale[i])),t.push(r),n+=r;s=(this.maxValue-this.minValue)/n;for(i=0;i<t.length;i++)t[i]*=s;i=0,e-=this.minValue;while(e-t[i]>=0)e-=t[i],i++;return i==this.scale.length-1?e=this.vectorToNum(this.scale[i]):e=this.vectorToNum(this.vectorAdd(this.scale[i],this.vectorMult(this
|
||||
.vectorSubtract(this.scale[i+1],this.scale[i]),e/t[i]))),e},vectorToNum:function(e){var t=0,n;for(n=0;n<e.length;n++)t+=Math.round(e[n])*Math.pow(256,e.length-n-1);return t},vectorSubtract:function(e,t){var n=[],r;for(r=0;r<e.length;r++)n[r]=e[r]-t[r];return n},vectorAdd:function(e,t){var n=[],r;for(r=0;r<e.length;r++)n[r]=e[r]+t[r];return n},vectorMult:function(e,t){var n=[],r;for(r=0;r<e.length;r++)n[r]=e[r]*t;return n},vectorLength:function(e){var t=0,n;for(n=0;n<e.length;n++)t+=e[n]*e[n];return Math.sqrt(t)}},jvm.ColorScale=function(e,t,n,r){jvm.ColorScale.parentClass.apply(this,arguments)},jvm.inherits(jvm.ColorScale,jvm.NumericScale),jvm.ColorScale.prototype.setScale=function(e){var t;for(t=0;t<e.length;t++)this.scale[t]=jvm.ColorScale.rgbToArray(e[t])},jvm.ColorScale.prototype.getValue=function(e){return jvm.ColorScale.numToRgb(jvm.ColorScale.parentClass.prototype.getValue.call(this,e))},jvm.ColorScale.arrayToRgb=function(e){var t="#",n,r;for(r=0;r<e.length;r++)n=e[r].toString(16
|
||||
),t+=n.length==1?"0"+n:n;return t},jvm.ColorScale.numToRgb=function(e){e=e.toString(16);while(e.length<6)e="0"+e;return"#"+e},jvm.ColorScale.rgbToArray=function(e){return e=e.substr(1),[parseInt(e.substr(0,2),16),parseInt(e.substr(2,2),16),parseInt(e.substr(4,2),16)]},jvm.DataSeries=function(e,t){var n;e=e||{},e.attribute=e.attribute||"fill",this.elements=t,this.params=e,e.attributes&&this.setAttributes(e.attributes),jvm.$.isArray(e.scale)?(n=e.attribute==="fill"||e.attribute==="stroke"?jvm.ColorScale:jvm.NumericScale,this.scale=new n(e.scale,e.normalizeFunction,e.min,e.max)):e.scale?this.scale=new jvm.OrdinalScale(e.scale):this.scale=new jvm.SimpleScale(e.scale),this.values=e.values||{},this.setValues(this.values)},jvm.DataSeries.prototype={setAttributes:function(e,t){var n=e,r;if(typeof e=="string")this.elements[e]&&this.elements[e].setStyle(this.params.attribute,t);else for(r in n)this.elements[r]&&this.elements[r].element.setStyle(this.params.attribute,n[r])},setValues:function(e){var t=
|
||||
Number.MIN_VALUE,n=Number.MAX_VALUE,r,i,s={};if(this.scale instanceof jvm.OrdinalScale||this.scale instanceof jvm.SimpleScale)for(i in e)e[i]?s[i]=this.scale.getValue(e[i]):s[i]=this.elements[i].element.style.initial[this.params.attribute];else{if(!this.params.min||!this.params.max){for(i in e)r=parseFloat(e[i]),r>t&&(t=e[i]),r<n&&(n=r);this.params.min||this.scale.setMin(n),this.params.max||this.scale.setMax(t),this.params.min=n,this.params.max=t}for(i in e)r=parseFloat(e[i]),isNaN(r)?s[i]=this.elements[i].element.style.initial[this.params.attribute]:s[i]=this.scale.getValue(r)}this.setAttributes(s),jvm.$.extend(this.values,e)},clear:function(){var e,t={};for(e in this.values)this.elements[e]&&(t[e]=this.elements[e].element.style.initial[this.params.attribute]);this.setAttributes(t),this.values={}},setScale:function(e){this.scale.setScale(e),this.values&&this.setValues(this.values)},setNormalizeFunction:function(e){this.scale.setNormalizeFunction(e),this.values&&this.setValues(this.values
|
||||
)}},jvm.Proj={degRad:180/Math.PI,radDeg:Math.PI/180,radius:6381372,sgn:function(e){return e>0?1:e<0?-1:e},mill:function(e,t,n){return{x:this.radius*(t-n)*this.radDeg,y:-this.radius*Math.log(Math.tan((45+.4*e)*this.radDeg))/.8}},mill_inv:function(e,t,n){return{lat:(2.5*Math.atan(Math.exp(.8*t/this.radius))-5*Math.PI/8)*this.degRad,lng:(n*this.radDeg+e/this.radius)*this.degRad}},merc:function(e,t,n){return{x:this.radius*(t-n)*this.radDeg,y:-this.radius*Math.log(Math.tan(Math.PI/4+e*Math.PI/360))}},merc_inv:function(e,t,n){return{lat:(2*Math.atan(Math.exp(t/this.radius))-Math.PI/2)*this.degRad,lng:(n*this.radDeg+e/this.radius)*this.degRad}},aea:function(e,t,n){var r=0,i=n*this.radDeg,s=29.5*this.radDeg,o=45.5*this.radDeg,u=e*this.radDeg,a=t*this.radDeg,f=(Math.sin(s)+Math.sin(o))/2,l=Math.cos(s)*Math.cos(s)+2*f*Math.sin(s),c=f*(a-i),h=Math.sqrt(l-2*f*Math.sin(u))/f,p=Math.sqrt(l-2*f*Math.sin(r))/f;return{x:h*Math.sin(c)*this.radius,y:-(p-h*Math.cos(c))*this.radius}},aea_inv:function(e,t,n)
|
||||
{var r=e/this.radius,i=t/this.radius,s=0,o=n*this.radDeg,u=29.5*this.radDeg,a=45.5*this.radDeg,f=(Math.sin(u)+Math.sin(a))/2,l=Math.cos(u)*Math.cos(u)+2*f*Math.sin(u),c=Math.sqrt(l-2*f*Math.sin(s))/f,h=Math.sqrt(r*r+(c-i)*(c-i)),p=Math.atan(r/(c-i));return{lat:Math.asin((l-h*h*f*f)/(2*f))*this.degRad,lng:(o+p/f)*this.degRad}},lcc:function(e,t,n){var r=0,i=n*this.radDeg,s=t*this.radDeg,o=33*this.radDeg,u=45*this.radDeg,a=e*this.radDeg,f=Math.log(Math.cos(o)*(1/Math.cos(u)))/Math.log(Math.tan(Math.PI/4+u/2)*(1/Math.tan(Math.PI/4+o/2))),l=Math.cos(o)*Math.pow(Math.tan(Math.PI/4+o/2),f)/f,c=l*Math.pow(1/Math.tan(Math.PI/4+a/2),f),h=l*Math.pow(1/Math.tan(Math.PI/4+r/2),f);return{x:c*Math.sin(f*(s-i))*this.radius,y:-(h-c*Math.cos(f*(s-i)))*this.radius}},lcc_inv:function(e,t,n){var r=e/this.radius,i=t/this.radius,s=0,o=n*this.radDeg,u=33*this.radDeg,a=45*this.radDeg,f=Math.log(Math.cos(u)*(1/Math.cos(a)))/Math.log(Math.tan(Math.PI/4+a/2)*(1/Math.tan(Math.PI/4+u/2))),l=Math.cos(u)*Math.pow(Math
|
||||
.tan(Math.PI/4+u/2),f)/f,c=l*Math.pow(1/Math.tan(Math.PI/4+s/2),f),h=this.sgn(f)*Math.sqrt(r*r+(c-i)*(c-i)),p=Math.atan(r/(c-i));return{lat:(2*Math.atan(Math.pow(l/h,1/f))-Math.PI/2)*this.degRad,lng:(o+p/f)*this.degRad}}},jvm.WorldMap=function(e){var t=this,n;this.params=jvm.$.extend(!0,{},jvm.WorldMap.defaultParams,e);if(!jvm.WorldMap.maps[this.params.map])throw new Error("Attempt to use map which was not loaded: "+this.params.map);this.mapData=jvm.WorldMap.maps[this.params.map],this.markers={},this.regions={},this.regionsColors={},this.regionsData={},this.container=jvm.$("<div>").css({width:"100%",height:"100%"}).addClass("jvectormap-container"),this.params.container.append(this.container),this.container.data("mapObject",this),this.container.css({position:"relative",overflow:"hidden"}),this.defaultWidth=this.mapData.width,this.defaultHeight=this.mapData.height,this.setBackgroundColor(this.params.backgroundColor),this.onResize=function(){t.setSize()},jvm.$(window).resize(this.onResize)
|
||||
;for(n in jvm.WorldMap.apiEvents)this.params[n]&&this.container.bind(jvm.WorldMap.apiEvents[n]+".jvectormap",this.params[n]);this.canvas=new jvm.VectorCanvas(this.container[0],this.width,this.height),"ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch?this.params.bindTouchEvents&&this.bindContainerTouchEvents():this.bindContainerEvents(),this.bindElementEvents(),this.createLabel(),this.params.zoomButtons&&this.bindZoomButtons(),this.createRegions(),this.createMarkers(this.params.markers||{}),this.setSize(),this.params.focusOn&&(typeof this.params.focusOn=="object"?this.setFocus.call(this,this.params.focusOn.scale,this.params.focusOn.x,this.params.focusOn.y):this.setFocus.call(this,this.params.focusOn)),this.params.selectedRegions&&this.setSelectedRegions(this.params.selectedRegions),this.params.selectedMarkers&&this.setSelectedMarkers(this.params.selectedMarkers),this.params.series&&this.createSeries()},jvm.WorldMap.prototype={transX:0,transY:0,scale:1,baseTransX
|
||||
:0,baseTransY:0,baseScale:1,width:0,height:0,setBackgroundColor:function(e){this.container.css("background-color",e)},resize:function(){var e=this.baseScale;this.width/this.height>this.defaultWidth/this.defaultHeight?(this.baseScale=this.height/this.defaultHeight,this.baseTransX=Math.abs(this.width-this.defaultWidth*this.baseScale)/(2*this.baseScale)):(this.baseScale=this.width/this.defaultWidth,this.baseTransY=Math.abs(this.height-this.defaultHeight*this.baseScale)/(2*this.baseScale)),this.scale*=this.baseScale/e,this.transX*=this.baseScale/e,this.transY*=this.baseScale/e},setSize:function(){this.width=this.container.width(),this.height=this.container.height(),this.resize(),this.canvas.setSize(this.width,this.height),this.applyTransform()},reset:function(){var e,t;for(e in this.series)for(t=0;t<this.series[e].length;t++)this.series[e][t].clear();this.scale=this.baseScale,this.transX=this.baseTransX,this.transY=this.baseTransY,this.applyTransform()},applyTransform:function(){var e,t,n,r
|
||||
;this.defaultWidth*this.scale<=this.width?(e=(this.width-this.defaultWidth*this.scale)/(2*this.scale),n=(this.width-this.defaultWidth*this.scale)/(2*this.scale)):(e=0,n=(this.width-this.defaultWidth*this.scale)/this.scale),this.defaultHeight*this.scale<=this.height?(t=(this.height-this.defaultHeight*this.scale)/(2*this.scale),r=(this.height-this.defaultHeight*this.scale)/(2*this.scale)):(t=0,r=(this.height-this.defaultHeight*this.scale)/this.scale),this.transY>t?this.transY=t:this.transY<r&&(this.transY=r),this.transX>e?this.transX=e:this.transX<n&&(this.transX=n),this.canvas.applyTransformParams(this.scale,this.transX,this.transY),this.markers&&this.repositionMarkers(),this.container.trigger("viewportChange",[this.scale/this.baseScale,this.transX,this.transY])},bindContainerEvents:function(){var e=!1,t,n,r=this;this.container.mousemove(function(i){return e&&(r.transX-=(t-i.pageX)/r.scale,r.transY-=(n-i.pageY)/r.scale,r.applyTransform(),t=i.pageX,n=i.pageY),!1}).mousedown(function(r){return e=!0
|
||||
,t=r.pageX,n=r.pageY,!1}),jvm.$("body").mouseup(function(){e=!1}),this.params.zoomOnScroll&&this.container.mousewheel(function(e,t,n,i){var s=jvm.$(r.container).offset(),o=e.pageX-s.left,u=e.pageY-s.top,a=Math.pow(1.3,i);r.label.hide(),r.setScale(r.scale*a,o,u),e.preventDefault()})},bindContainerTouchEvents:function(){var e,t,n=this,r,i,s,o,u,a=function(a){var f=a.originalEvent.touches,l,c,h,p;a.type=="touchstart"&&(u=0),f.length==1?(u==1&&(h=n.transX,p=n.transY,n.transX-=(r-f[0].pageX)/n.scale,n.transY-=(i-f[0].pageY)/n.scale,n.applyTransform(),n.label.hide(),(h!=n.transX||p!=n.transY)&&a.preventDefault()),r=f[0].pageX,i=f[0].pageY):f.length==2&&(u==2?(c=Math.sqrt(Math.pow(f[0].pageX-f[1].pageX,2)+Math.pow(f[0].pageY-f[1].pageY,2))/t,n.setScale(e*c,s,o),n.label.hide(),a.preventDefault()):(l=jvm.$(n.container).offset(),f[0].pageX>f[1].pageX?s=f[1].pageX+(f[0].pageX-f[1].pageX)/2:s=f[0].pageX+(f[1].pageX-f[0].pageX)/2,f[0].pageY>f[1].pageY?o=f[1].pageY+(f[0].pageY-f[1].pageY)/2:o=f[0].pageY+
|
||||
(f[1].pageY-f[0].pageY)/2,s-=l.left,o-=l.top,e=n.scale,t=Math.sqrt(Math.pow(f[0].pageX-f[1].pageX,2)+Math.pow(f[0].pageY-f[1].pageY,2)))),u=f.length};jvm.$(this.container).bind("touchstart",a),jvm.$(this.container).bind("touchmove",a)},bindElementEvents:function(){var e=this,t;this.container.mousemove(function(){t=!0}),this.container.delegate("[class~='jvectormap-element']","mouseover mouseout",function(t){var n=this,r=jvm.$(this).attr("class").baseVal?jvm.$(this).attr("class").baseVal:jvm.$(this).attr("class"),i=r.indexOf("jvectormap-region")===-1?"marker":"region",s=i=="region"?jvm.$(this).attr("data-code"):jvm.$(this).attr("data-index"),o=i=="region"?e.regions[s].element:e.markers[s].element,u=i=="region"?e.mapData.paths[s].name:e.markers[s].config.name||"",a=jvm.$.Event(i+"LabelShow.jvectormap"),f=jvm.$.Event(i+"Over.jvectormap");t.type=="mouseover"?(e.container.trigger(f,[s]),f.isDefaultPrevented()||o.setHovered(!0),e.label.text(u),e.container.trigger(a,[e.label,s]),a.isDefaultPrevented
|
||||
()||(e.label.show(),e.labelWidth=e.label.width(),e.labelHeight=e.label.height())):(o.setHovered(!1),e.label.hide(),e.container.trigger(i+"Out.jvectormap",[s]))}),this.container.delegate("[class~='jvectormap-element']","mousedown",function(e){t=!1}),this.container.delegate("[class~='jvectormap-element']","mouseup",function(n){var r=this,i=jvm.$(this).attr("class").baseVal?jvm.$(this).attr("class").baseVal:jvm.$(this).attr("class"),s=i.indexOf("jvectormap-region")===-1?"marker":"region",o=s=="region"?jvm.$(this).attr("data-code"):jvm.$(this).attr("data-index"),u=jvm.$.Event(s+"Click.jvectormap"),a=s=="region"?e.regions[o].element:e.markers[o].element;if(!t){e.container.trigger(u,[o]);if(s==="region"&&e.params.regionsSelectable||s==="marker"&&e.params.markersSelectable)u.isDefaultPrevented()||(e.params[s+"sSelectableOne"]&&e.clearSelected(s+"s"),a.setSelected(!a.isSelected))}})},bindZoomButtons:function(){var e=this;jvm.$("<div/>").addClass("jvectormap-zoomin").text("+").appendTo(this.container
|
||||
),jvm.$("<div/>").addClass("jvectormap-zoomout").html("−").appendTo(this.container),this.container.find(".jvectormap-zoomin").click(function(){e.setScale(e.scale*e.params.zoomStep,e.width/2,e.height/2)}),this.container.find(".jvectormap-zoomout").click(function(){e.setScale(e.scale/e.params.zoomStep,e.width/2,e.height/2)})},createLabel:function(){var e=this;this.label=jvm.$("<div/>").addClass("jvectormap-label").appendTo(jvm.$("body")),this.container.mousemove(function(t){var n=t.pageX-15-e.labelWidth,r=t.pageY-15-e.labelHeight;n<5&&(n=t.pageX+15),r<5&&(r=t.pageY+15),e.label.is(":visible")&&e.label.css({left:n,top:r})})},setScale:function(e,t,n,r){var i,s=jvm.$.Event("zoom.jvectormap");e>this.params.zoomMax*this.baseScale?e=this.params.zoomMax*this.baseScale:e<this.params.zoomMin*this.baseScale&&(e=this.params.zoomMin*this.baseScale),typeof t!="undefined"&&typeof n!="undefined"&&(i=e/this.scale,r?(this.transX=t+this.defaultWidth*(this.width/(this.defaultWidth*e))/2,this.transY=n+
|
||||
this.defaultHeight*(this.height/(this.defaultHeight*e))/2):(this.transX-=(i-1)/e*t,this.transY-=(i-1)/e*n)),this.scale=e,this.applyTransform(),this.container.trigger(s,[e/this.baseScale])},setFocus:function(e,t,n){var r,i,s,o,u;if(jvm.$.isArray(e)||this.regions[e]){jvm.$.isArray(e)?o=e:o=[e];for(u=0;u<o.length;u++)this.regions[o[u]]&&(i=this.regions[o[u]].element.getBBox(),i&&(typeof r=="undefined"?r=i:(s={x:Math.min(r.x,i.x),y:Math.min(r.y,i.y),width:Math.max(r.x+r.width,i.x+i.width)-Math.min(r.x,i.x),height:Math.max(r.y+r.height,i.y+i.height)-Math.min(r.y,i.y)},r=s)));this.setScale(Math.min(this.width/r.width,this.height/r.height),-(r.x+r.width/2),-(r.y+r.height/2),!0)}else e*=this.baseScale,this.setScale(e,-t*this.defaultWidth,-n*this.defaultHeight,!0)},getSelected:function(e){var t,n=[];for(t in this[e])this[e][t].element.isSelected&&n.push(t);return n},getSelectedRegions:function(){return this.getSelected("regions")},getSelectedMarkers:function(){return this.getSelected("markers")}
|
||||
,setSelected:function(e,t){var n;typeof t!="object"&&(t=[t]);if(jvm.$.isArray(t))for(n=0;n<t.length;n++)this[e][t[n]].element.setSelected(!0);else for(n in t)this[e][n].element.setSelected(!!t[n])},setSelectedRegions:function(e){this.setSelected("regions",e)},setSelectedMarkers:function(e){this.setSelected("markers",e)},clearSelected:function(e){var t={},n=this.getSelected(e),r;for(r=0;r<n.length;r++)t[n[r]]=!1;this.setSelected(e,t)},clearSelectedRegions:function(){this.clearSelected("regions")},clearSelectedMarkers:function(){this.clearSelected("markers")},getMapObject:function(){return this},getRegionName:function(e){return this.mapData.paths[e].name},createRegions:function(){var e,t,n=this;for(e in this.mapData.paths)t=this.canvas.addPath({d:this.mapData.paths[e].path,"data-code":e},jvm.$.extend(!0,{},this.params.regionStyle)),jvm.$(t.node).bind("selected",function(e,t){n.container.trigger("regionSelected.jvectormap",[jvm.$(this).attr("data-code"),t,n.getSelectedRegions()])}),t.addClass
|
||||
("jvectormap-region jvectormap-element"),this.regions[e]={element:t,config:this.mapData.paths[e]}},createMarkers:function(e){var t,n,r,i,s,o=this;this.markersGroup=this.markersGroup||this.canvas.addGroup();if(jvm.$.isArray(e)){s=e.slice(),e={};for(t=0;t<s.length;t++)e[t]=s[t]}for(t in e)i=e[t]instanceof Array?{latLng:e[t]}:e[t],r=this.getMarkerPosition(i),r!==!1&&(n=this.canvas.addCircle({"data-index":t,cx:r.x,cy:r.y},jvm.$.extend(!0,{},this.params.markerStyle,{initial:i.style||{}}),this.markersGroup),n.addClass("jvectormap-marker jvectormap-element"),jvm.$(n.node).bind("selected",function(e,t){o.container.trigger("markerSelected.jvectormap",[jvm.$(this).attr("data-index"),t,o.getSelectedMarkers()])}),this.markers[t]&&this.removeMarkers([t]),this.markers[t]={element:n,config:i})},repositionMarkers:function(){var e,t;for(e in this.markers)t=this.getMarkerPosition(this.markers[e].config),t!==!1&&this.markers[e].element.setStyle({cx:t.x,cy:t.y})},getMarkerPosition:function(e){return jvm.WorldMap
|
||||
.maps[this.params.map].projection?this.latLngToPoint.apply(this,e.latLng||[0,0]):{x:e.coords[0]*this.scale+this.transX*this.scale,y:e.coords[1]*this.scale+this.transY*this.scale}},addMarker:function(e,t,n){var r={},i=[],s,o,n=n||[];r[e]=t;for(o=0;o<n.length;o++)s={},s[e]=n[o],i.push(s);this.addMarkers(r,i)},addMarkers:function(e,t){var n;t=t||[],this.createMarkers(e);for(n=0;n<t.length;n++)this.series.markers[n].setValues(t[n]||{})},removeMarkers:function(e){var t;for(t=0;t<e.length;t++)this.markers[e[t]].element.remove(),delete this.markers[e[t]]},removeAllMarkers:function(){var e,t=[];for(e in this.markers)t.push(e);this.removeMarkers(t)},latLngToPoint:function(e,t){var n,r=jvm.WorldMap.maps[this.params.map].projection,i=r.centralMeridian,s=this.width-this.baseTransX*2*this.baseScale,o=this.height-this.baseTransY*2*this.baseScale,u,a,f=this.scale/this.baseScale;return t<-180+i&&(t+=360),n=jvm.Proj[r.type](e,t,i),u=this.getInsetForPoint(n.x,n.y),u?(a=u.bbox,n.x=(n.x-a[0].x)/(a[1].x-a[0
|
||||
].x)*u.width*this.scale,n.y=(n.y-a[0].y)/(a[1].y-a[0].y)*u.height*this.scale,{x:n.x+this.transX*this.scale+u.left*this.scale,y:n.y+this.transY*this.scale+u.top*this.scale}):!1},pointToLatLng:function(e,t){var n=jvm.WorldMap.maps[this.params.map].projection,r=n.centralMeridian,i=jvm.WorldMap.maps[this.params.map].insets,s,o,u,a,f;for(s=0;s<i.length;s++){o=i[s],u=o.bbox,a=e-(this.transX*this.scale+o.left*this.scale),f=t-(this.transY*this.scale+o.top*this.scale),a=a/(o.width*this.scale)*(u[1].x-u[0].x)+u[0].x,f=f/(o.height*this.scale)*(u[1].y-u[0].y)+u[0].y;if(a>u[0].x&&a<u[1].x&&f>u[0].y&&f<u[1].y)return jvm.Proj[n.type+"_inv"](a,-f,r)}return!1},getInsetForPoint:function(e,t){var n=jvm.WorldMap.maps[this.params.map].insets,r,i;for(r=0;r<n.length;r++){i=n[r].bbox;if(e>i[0].x&&e<i[1].x&&t>i[0].y&&t<i[1].y)return n[r]}},createSeries:function(){var e,t;this.series={markers:[],regions:[]};for(t in this.params.series)for(e=0;e<this.params.series[t].length;e++)this.series[t][e]=new jvm.DataSeries
|
||||
(this.params.series[t][e],this[t])},remove:function(){this.label.remove(),this.container.remove(),jvm.$(window).unbind("resize",this.onResize)}},jvm.WorldMap.maps={},jvm.WorldMap.defaultParams={map:"world_mill_en",backgroundColor:"#505050",zoomButtons:!0,zoomOnScroll:!0,zoomMax:8,zoomMin:1,zoomStep:1.6,regionsSelectable:!1,markersSelectable:!1,bindTouchEvents:!0,regionStyle:{initial:{fill:"white","fill-opacity":1,stroke:"none","stroke-width":0,"stroke-opacity":1},hover:{"fill-opacity":.8},selected:{fill:"yellow"},selectedHover:{}},markerStyle:{initial:{fill:"grey",stroke:"#505050","fill-opacity":1,"stroke-width":1,"stroke-opacity":1,r:5},hover:{stroke:"black","stroke-width":2},selected:{fill:"blue"},selectedHover:{}}},jvm.WorldMap.apiEvents={onRegionLabelShow:"regionLabelShow",onRegionOver:"regionOver",onRegionOut:"regionOut",onRegionClick:"regionClick",onRegionSelected:"regionSelected",onMarkerLabelShow:"markerLabelShow",onMarkerOver:"markerOver",onMarkerOut:"markerOut",onMarkerClick:"markerClick"
|
||||
,onMarkerSelected:"markerSelected",onViewportChange:"viewportChange"},define("panels/map/lib/jquery.jvectormap.min",function(){}),define("panels/map/module",["angular","app","underscore","jquery","config","./lib/jquery.jvectormap.min"],function(e,t,n,r,i){var s=e.module("kibana.panels.map",[]);t.useModule(s),s.controller("map",["$scope","$rootScope","querySrv","dashboard","filterSrv",function(t,r,s,o,u){t.panelMeta={editorTabs:[{title:"Queries",src:"app/partials/querySelect.html"}],status:"Stable",description:"Displays a map of shaded regions using a field containing a 2 letter country , or US state, code. Regions with more hit are shaded darker. Node that this does use the Elasticsearch terms facet, so it is important that you set it to the correct field."};var a={queries:{mode:"all",ids:[]},map:"world",colors:["#A0E2E2","#265656"],size:100,exclude:[],spyable:!0,index_limit:0};n.defaults(t.panel,a),t.init=function(){t.$on("refresh",function(){t.get_data()}),t.get_data()},t.get_data=function(
|
||||
){if(o.indices.length===0)return;t.panelMeta.loading=!0;var e;e=t.ejs.Request().indices(o.indices),t.panel.queries.ids=s.idsByMode(t.panel.queries);var r=t.ejs.BoolQuery();n.each(t.panel.queries.ids,function(e){r=r.should(s.getEjsObj(e))}),e=e.facet(t.ejs.TermsFacet("map").field(t.panel.field).size(t.panel.size).exclude(t.panel.exclude).facetFilter(t.ejs.QueryFilter(t.ejs.FilteredQuery(r,u.getBoolFilter(u.ids))))).size(0),t.populate_modal(e);var i=e.doSearch();i.then(function(e){t.panelMeta.loading=!1,t.hits=e.hits.total,t.data={},n.each(e.facets.map.terms,function(e){t.data[e.term.toUpperCase()]=e.count}),t.$emit("render")})},t.populate_modal=function(n){t.modal={title:"Inspector",body:"<h5>Last Elasticsearch Query</h5><pre>curl -XGET "+i.elasticsearch+"/"+o.indices+"/_search?pretty -d'\n"+e.toJson(JSON.parse(n.toString()),!0)+"'</pre>"}},t.build_search=function(e,t){u.set({type:"querystring",mandate:"must",query:e+":"+t}),o.refresh()}}]),s.directive("map",function(){return{restrict:"A"
|
||||
,link:function(t,i){function s(){i.text(""),r(".jvectormap-zoomin,.jvectormap-zoomout,.jvectormap-label").remove(),require(["./lib/map."+t.panel.map],function(){i.vectorMap({map:t.panel.map,regionStyle:{initial:{fill:"#8c8c8c"}},zoomOnScroll:!1,backgroundColor:null,series:{regions:[{values:t.data,scale:t.panel.colors,normalizeFunction:"polynomial"}]},onRegionLabelShow:function(e,r,s){i.children(".map-legend").show();var o=n.isUndefined(t.data[s])?0:t.data[s];i.children(".map-legend").text(r.text()+": "+o)},onRegionOut:function(){r(".map-legend").hide()},onRegionClick:function(e,r){var i=n.isUndefined(t.data[r])?0:t.data[r];i!==0&&t.build_search(t.panel.field,r)}}),i.prepend('<span class="map-legend"></span>'),r(".map-legend").hide()})}i.html('<center><img src="img/load_big.gif"></center>'),t.$on("render",function(){s()}),e.element(window).bind("resize",function(){s()})}}})});
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div class="row-fluid" ng-switch="panel.mode"><div class="row-fluid"><div class="span2"><label class="small">Mode</label><select class="input-small" ng-change="set_mode(panel.mode);set_refresh(true)" ng-model="panel.mode" ng-options="f for f in ['terms','goal']"></select></div></div><div ng-switch-when="terms"><div class="row-fluid"><div class="span2"><label class="small">Field</label><input type="text" class="input-small" bs-typeahead="fields.list" ng-model="panel.query.field" ng-change="set_refresh(true)"></div><div class="span2"><label class="small">Length</label><input class="input-small" type="number" ng-model="panel.size" ng-change="set_refresh(true)"></div><div class="span6"><label class="small">Exclude Terms(s) (comma seperated)</label><input array-join="" type="text" ng-model="panel.exclude"></div></div></div><div ng-switch-when="goal"><div class="row-fluid"><div class="span2"><form style="margin-bottom: 0px"><label class="small">Goal</label><input type="number" style="width:90%" ng-model="panel.query.goal" ng-change="set_refresh(true)"></form></div></div></div></div><div class="row-fluid"><div class="span1"><label class="small">Donut</label><input type="checkbox" ng-model="panel.donut" ng-checked="panel.donut"></div><div class="span1"><label class="small">Tilt</label><input type="checkbox" ng-model="panel.tilt" ng-checked="panel.tilt"></div><div class="span1"><label class="small">Labels</label><input type="checkbox" ng-model="panel.labels" ng-checked="panel.labels"></div><div class="span3"><label class="small">Legend</label><select class="input-small" ng-model="panel.legend" ng-options="f for f in ['above','below','none']"></select></div></div>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div ng-controller="pie" ng-init="init()"><span ng-show="panel.spyable" style="position:absolute;right:0px;top:0px" class="panelextra pointer"><i bs-modal="'app/partials/modal.html'" class="icon-eye-open"></i></span><div ng-show="panel.legend == 'above'" ng-repeat="query in legend" style="float:left;padding-left: 10px"><span ng-show="panel.chart != \"none\""><i class="icon-circle" ng-style="{color:query.color}"></i></span><span class="small">{{query.label}} ({{query.data[0][1]}})</span></div><br><div style="clear:both"></div><div pie="" class="pointer" params="{{panel}}" style="position:relative"></div><div ng-show="panel.legend == 'below'" ng-repeat="query in legend" style="float:left;padding-left: 10px"><span ng-show="panel.chart != \"none\""><i class="icon-circle" ng-style="{color:query.color}"></i></span><span class="small">{{query.label}} ({{query.data[0][1]}})</span></div></div>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
define("panels/pie/module",["angular","app","underscore","jquery","kbn","config"],function(e,t,n,r,i,s){var o=e.module("kibana.panels.pie",[]);t.useModule(o),o.controller("pie",["$scope","$rootScope","querySrv","dashboard","filterSrv",function(t,r,i,o,u){t.panelMeta={status:"Deprecated",description:"Uses an Elasticsearch terms facet to create a pie chart. You should really only point this at not_analyzed fields for that reason. This panel is going away soon, it has <strong>been replaced by the terms panel</strong>. Please use that one instead."};var a={editorTabs:[{title:"Queries",src:"app/partials/querySelect.html"}],query:{field:"_type",goal:100},queries:{mode:"all",ids:[]},size:10,exclude:[],donut:!1,tilt:!1,legend:"above",labels:!0,mode:"terms",default_field:"DEFAULT",spyable:!0};n.defaults(t.panel,a),t.init=function(){t.$on("refresh",function(){t.get_data()}),t.get_data()},t.set_mode=function(e){switch(e){case"terms":t.panel.query={field:"_all"};break;case"goal":t.panel.query={goal
|
||||
:100}}},t.set_refresh=function(e){t.refresh=e},t.close_edit=function(){t.refresh&&t.get_data(),t.refresh=!1,t.$emit("render")},t.get_data=function(){if(o.indices.length===0)return;t.panelMeta.loading=!0;var e=t.ejs.Request().indices(o.indices);t.panel.queries.ids=i.idsByMode(t.panel.queries);var r=t.ejs.BoolQuery();n.each(t.panel.queries.ids,function(e){r=r.should(i.getEjsObj(e))});var s;t.panel.mode==="terms"?(e=e.facet(t.ejs.TermsFacet("pie").field(t.panel.query.field||t.panel.default_field).size(t.panel.size).exclude(t.panel.exclude).facetFilter(t.ejs.QueryFilter(t.ejs.FilteredQuery(r,u.getBoolFilter(u.ids))))).size(0),t.populate_modal(e),s=e.doSearch(),s.then(function(e){t.panelMeta.loading=!1,t.hits=e.hits.total,t.data=[];var r=0;n.each(e.facets.pie.terms,function(e){var n={label:e.term,data:e.count};t.data.push(),t.data.push(n),r+=1}),t.$emit("render")})):(e=e.query(r).filter(u.getBoolFilter(u.ids)).size(0),t.populate_modal(e),s=e.doSearch(),s.then(function(e){t.panelMeta.loading=!1
|
||||
;var n=e.hits.total,r=t.panel.query.goal-n;t.data=[{label:"Complete",data:n,color:"#BF6730"},{data:r,color:"#e2d0c4"}],t.$emit("render")}))},t.populate_modal=function(n){t.modal={title:"Inspector",body:"<h5>Last Elasticsearch Query</h5><pre>curl -XGET "+s.elasticsearch+"/"+o.indices+"/_search?pretty -d'\n"+e.toJson(JSON.parse(n.toString()),!0)+"'</pre>"}}}]),o.directive("pie",["querySrv","filterSrv","dashboard",function(t,s,o){return{restrict:"A",link:function(u,a){function f(){a.css({height:u.panel.height||u.row.height});var e;u.panel.mode==="goal"?e={show:u.panel.labels,radius:0,formatter:function(e,t){var r=parseInt(u.row.height.replace("px",""),10)/8+String("px");return n.isUndefined(e)?"":'<div style="font-size:'+r+';font-weight:bold;text-align:center;padding:2px;color:#fff;">'+Math.round(t.percent)+"%</div>"}}:e={show:u.panel.labels,radius:2/3,formatter:function(e,t){return'<div "style="font-size:8pt;text-align:center;padding:2px;color:white;">'+e+"<br/>"+Math.round(t.percent)+"%</div>"
|
||||
},threshold:.1};var i={series:{pie:{innerRadius:u.panel.donut?.45:0,tilt:u.panel.tilt?.45:1,radius:1,show:!0,combine:{color:"#999",label:"The Rest"},label:e,stroke:{width:0}}},grid:{backgroundColor:null,hoverable:!0,clickable:!0},legend:{show:!1},colors:t.colors};a.is(":visible")&&require(["vendor/jquery/jquery.flot.pie.js"],function(){u.legend=r.plot(a,u.data,i).getData(),u.$$phase||u.$apply()})}a.html('<center><img src="img/load_big.gif"></center>'),u.$on("render",function(){f()}),e.element(window).bind("resize",function(){f()}),a.bind("plotclick",function(e,t,n){if(!n)return;u.panel.mode==="terms"&&(s.set({type:"terms",field:u.panel.query.field,value:n.series.label}),o.refresh())});var l=r("<div>");a.bind("plothover",function(e,t,n){n?l.html([i.query_color_dot(n.series.color,15),n.series.label||"",parseFloat(n.series.percent).toFixed(1)+"%"].join(" ")).place_tt(t.pageX,t.pageY,{offset:10}):l.remove()})}}}])});
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div><div class="row-fluid"><div class="span12">No options here</div></div></div>
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
<div class="panel-query-meta row-fluid" style="width:170px"><style>.input-query-alias {
|
||||
margin-bottom: 5px !important;
|
||||
}
|
||||
.panel-query-meta .pin {
|
||||
text-decoration: underline;
|
||||
}</style><a class="close" ng-click="render();dismiss();" href="">×</a> <i ng-click="toggle_pin(id);dismiss();" class="small pointer icon-pushpin"></i><label class="strong small">Query Alias</label><form><input class="input-medium input-query-alias" type="text" ng-model="querySrv.list[id].alias" placeholder="Alias..."><div><i ng-repeat="color in querySrv.colors" class="pointer" ng-class="{'icon-circle-blank':querySrv.list[id].color == color,'icon-circle':querySrv.list[id].color != color}" ng-style="{color:color}" ng-click="querySrv.list[id].color = color;render();"></i></div></form></div>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div ng-controller="query" ng-init="init()" class="query-panel"><label class="small">{{panel.label}}</label><div ng-repeat="id in (unPinnedQueries = (querySrv.ids|pinnedQuery:false))" ng-class="{'short-query': unPinnedQueries.length>1}"><form class="form-search" style="position:relative;margin-bottom:5px" ng-submit="refresh()"><span class="begin-query"><i class="icon-circle pointer" data-unique="1" bs-popover="'app/panels/query/meta.html'" data-placement="right" ng-style="{color: querySrv.list[id].color}"></i> <i class="icon-remove-sign pointer remove-query" ng-show="querySrv.ids.length > 1" ng-click="querySrv.remove(id);refresh()"></i></span><input class="search-query panel-query" ng-class="{ 'input-block-level': unPinnedQueries.length==1, 'last-query': $last, 'has-remove': querySrv.ids.length > 1 }" bs-typeahead="panel.history" data-min-length="0" data-items="100" type="text" ng-model="querySrv.list[id].query"><span class="end-query"><i class="icon-search pointer" ng-click="refresh()" ng-show="$last"></i> <i class="icon-plus pointer" ng-click="querySrv.set({})" ng-show="$last"></i></span></form></div><div style="display:inline-block" ng-repeat="id in querySrv.ids|pinnedQuery:true"><span class="pointer" ng-show="$first" ng-click="panel.pinned = !panel.pinned"><small class="pins">Pinned</small> <i ng-class="{'icon-caret-right':panel.pinned,'icon-caret-left':!panel.pinned}"></i></span> <span ng-show="panel.pinned" class="pinned badge"><i class="icon-circle pointer" ng-style="{color: querySrv.list[id].color}" data-unique="1" bs-popover="'app/panels/query/meta.html'"></i><span bs-tooltip="querySrv.list[id].query">{{querySrv.list[id].alias || querySrv.list[id].query}}</span></span></div><span style="display:inline-block" ng-show="unPinnedQueries.length == 0"><i class="icon-search pointer" ng-click="refresh()"></i> <i class="icon-plus pointer" ng-click="querySrv.set({})"></i></span></div>
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
define("css",{load:function(e,t,n,r){function i(e){var t=document.getElementsByTagName("head")[0],n=document.createElement("link");n.href=e,n.rel="stylesheet",n.type="text/css",t.appendChild(n)}i(requirejs.toUrl(e)),n(!0)},pluginBuilder:"../vendor/require/css-build"}),define("css-embed",function(){function e(e){var t=document.getElementsByTagName("head")[0],n=document.createElement("style"),r=document.createTextNode(e);n.type="text/css",n.styleSheet?n.styleSheet.cssText=r.nodeValue:n.appendChild(r),t.appendChild(n)}return e}),define("css!panels/query/query.css",["css-embed"],function(e){return e(".short-query{display:inline-block;margin-right:10px}.begin-query{position:absolute;left:13px;top:5px}.end-query{position:absolute;right:15px;top:5px}.panel-query{padding-left:35px!important;height:31px!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-search:hover .has-remove{padding-left:50px!important}.remove-query{opacity:0}.last-query{padding-right:45px!important}.form-search:hover .remove-query{opacity:1}.query-panel .pins{text-decoration:underline}.query-panel .pinned{margin-right:5px}"
|
||||
),!0}),define("panels/query/module",["angular","app","underscore","css!./query.css"],function(e,t,n){var r=e.module("kibana.panels.query",[]);t.useModule(r),r.controller("query",["$scope","querySrv","$rootScope",function(e,t,r){e.panelMeta={status:"Stable",description:"Manage all of the queries on the dashboard. You almost certainly need one of these somewhere. This panel allows you to add, remove, label, pin and color queries"};var i={label:"Search",query:"*",pinned:!0,history:[],remember:10};n.defaults(e.panel,i),e.querySrv=t,e.init=function(){},e.refresh=function(){s(n.pluck(e.querySrv.list,"query")),r.$broadcast("refresh")},e.render=function(){r.$broadcast("render")},e.toggle_pin=function(e){t.list[e].pin=t.list[e].pin?!1:!0};var s=function(t){if(e.panel.remember>0){e.panel.history=n.union(t.reverse(),e.panel.history);var r=e.panel.history.length;r>e.panel.remember&&(e.panel.history=e.panel.history.slice(0,e.panel.remember))}};e.init()}])});
|
||||
+1
@@ -0,0 +1 @@
|
||||
.short-query{display:inline-block;margin-right:10px}.begin-query{position:absolute;left:13px;top:5px}.end-query{position:absolute;right:15px;top:5px}.panel-query{padding-left:35px!important;height:31px!important;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.form-search:hover .has-remove{padding-left:50px!important}.remove-query{opacity:0}.last-query{padding-right:45px!important}.form-search:hover .remove-query{opacity:1}.query-panel .pins{text-decoration:underline}.query-panel .pinned{margin-right:5px}
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div class="row-fluid"><div class="span4"><form class="input-append"><h6>Add Column</h6><input bs-typeahead="fields.list" type="text" class="input-small" ng-model="newfield"><button class="btn" ng-click="toggle_field(newfield);newfield=''"><i class="icon-plus"></i></button></form></div><div class="span8"><h6>Columns <small>Click to remove</small></h6><span style="margin-left:3px" ng-click="toggle_field(field)" ng-repeat="field in $parent.panel.fields" class="label pointer remove">{{field}}</span></div></div><div class="row-fluid"><div class="span4"><form class="input-append"><h6>Add field</h6><input bs-typeahead="fields.list" type="text" class="input-small" ng-model="newhighlight" ng-change="set_refresh(true)"><button class="btn" ng-click="toggle_highlight(newhighlight);newhighlight=''"><i class="icon-plus"></i></button></form></div><div class="span8"><h6>Highlighted fields <small>Click to remove</small></h6><span style="margin-left:3px" ng-click="toggle_highlight(field);set_refresh(true)" ng-repeat="field in $parent.panel.highlight" class="label remove pointer">{{field}}</span></div></div><h5>Options</h5><div class="row-fluid"><div class="span1"><h6>Header</h6><input type="checkbox" ng-model="panel.header" ng-checked="panel.header"></div><div class="span1"><h6>Sorting</h6><input type="checkbox" ng-model="panel.sortable" ng-checked="panel.sortable"></div><div class="span3" style="white-space:nowrap" ng-show="panel.sortable"><h6>Sort</h6><input ng-show="all_fields.length<=0 || !all_fields" style="width:85%" ng-model="panel.sort[0]" type="text"><select ng-show="all_fields.length>0" style="width:85%" ng-model="panel.sort[0]" ng-options="f for f in all_fields"></select><i ng-click="set_sort(panel.sort[0])" ng-class="{'icon-chevron-up': panel.sort[1] == 'asc','icon-chevron-down': panel.sort[1] == 'desc'}"></i></div><div class="span2"><h6>Font Size</h6><select class="input-small" ng-model="panel.style['font-size']" ng-options="f for f in ['7pt','8pt','9pt','10pt','12pt','14pt','16pt','18pt','20pt','24pt','28pt','32pt','36pt','42pt','48pt','52pt','60pt','72pt']"></select></div><div class="span2"><h6>Trim Factor<tip>Trim fields to this long divided by # of rows</tip></h6><input type="number" class="input-small" ng-model="panel.trimFactor"></div></div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<a class="close" ng-click="dismiss()" href="">×</a><h4>Micro Analysis of {{micropanel.field}} <i class="pointer icon-search" ng-click="fieldExists(micropanel.field,'must');dismiss();"></i> <i class="pointer icon-ban-circle" ng-click="fieldExists(micropanel.field,'mustNot');dismiss();"></i><br><small>{{micropanel.count}} events in the table set</small></h4><table style="width:100%" class="table table-striped table-condensed"><thead><th>{{micropanel.field}}</th><th>Action</th><th style="text-align:right">Count</th></thead><tbody><tr ng-repeat="field in micropanel.values"><td>{{{true: "__blank__", false:field[0] }[field[0] == '' || field[0] == undefined]|tableTruncate:panel.trimFactor:3}}</td><td style="width:40px"><i class="pointer icon-search" ng-click="build_search(micropanel.field,field[0]);dismiss();"></i> <i class="pointer icon-ban-circle" ng-click="build_search(micropanel.field,field[0],true);dismiss();"></i></td><td class="progress" style="width:100px;position:relative"><style scoped="">.progress {
|
||||
overflow: visible;
|
||||
}</style><div bs-tooltip="percent(field[1],data.length)" class="bar" ng-class="micropanelColor($index)" ng-style="{width: percent(field[1],data.length)}"></div><span style="position:absolute;right:20px">{{field[1]}}</span></td></tr></tbody></table><div class="progress"><div ng-repeat="field in micropanel.values" bs-tooltip="field[0]+' ('+percent(field[1],data.length)+')'" class="bar {{micropanelColor($index)}}" ng-style="{width: percent(field[1],data.length)};"></div></div><span ng-repeat="(field,count) in micropanel.related"><a ng-click="toggle_field(field)">{{field}}</a> ({{Math.round((count / micropanel.count) * 100)}}%),</span>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
<div ng-controller="table" ng-init="init()"><style>.table-doc-table {
|
||||
margin-left: 0px !important;
|
||||
overflow-y: auto;
|
||||
overflow-x: scroll;
|
||||
}</style><span ng-show="panel.spyable" style="position:absolute;right:0px;top:0px" class="panelextra pointer"><i bs-modal="'app/partials/inspector.html'" class="icon-eye-open"></i></span><div class="row-fluid"><div ng-class="{'span3':panel.field_list}" ng-show="panel.field_list"><div class="sidebar-nav"><h5>Fields <i class="icon-chevron-sign-left pointer" ng-click="panel.field_list = !panel.field_list" bs-tooltip="'Hide field list'" ng-show="panel.field_list"></i></h5><ul class="unstyled" style="{{panel.overflow}}:{{panel.height || row.height}};overflow-y:auto;overflow-x:hidden"><li ng-style="panel.style" ng-repeat="field in fields.list"><i class="pointer" ng-class="{'icon-check': _.contains(panel.fields,field),'icon-check-empty': !_.contains(panel.fields,field)}" ng-click="toggle_field(field)"></i> <a class="pointer" data-unique="1" bs-popover="'app/panels/table/micropanel.html'" data-placement="right" ng-click="toggle_micropanel(field)" ng-class="{label: _.contains(panel.fields,field)}">{{field}}</a></li></ul></div></div><div style="{{panel.overflow}}:{{panel.height || row.height}}" ng-class="{'span9':panel.field_list,'span12':!panel.field_list}" class="table-doc-table"><i class="pull-left icon-chevron-sign-right pointer" ng-click="panel.field_list = !panel.field_list" bs-tooltip="'Show field list'" ng-show="!panel.field_list"></i><div class="row-fluid" ng-show="panel.paging"><div class="span1 offset1" style="text-align:right"><i ng-click="panel.offset = 0" ng-show="panel.offset > 0" class="icon-circle-arrow-left pointer"></i> <i ng-click="panel.offset = (panel.offset - panel.size)" ng-show="panel.offset > 0" class="icon-arrow-left pointer"></i></div><div class="span8" style="text-align:center"><strong>{{panel.offset}}</strong> to <strong>{{panel.offset + data.slice(panel.offset,panel.offset+panel.size).length}}</strong> <small>of {{data.length}} available for paging</small></div><div class="span1" style="text-align:left"><i ng-click="panel.offset = (panel.offset + panel.size)" ng-show="data.length > panel.offset+panel.size" class="icon-arrow-right pointer"></i></div></div><table class="table-hover table table-condensed" ng-style="panel.style"><thead ng-show="panel.header"><th ng-show="panel.fields.length<1">_source (select columns from the list to the left)</th><th style="white-space:nowrap" ng-repeat="field in panel.fields"><i ng-show="!$first" class="pointer link icon-caret-left" ng-click="_.move(panel.fields,$index,$index-1)"></i> <span class="pointer" ng-click="set_sort(field)" ng-show="panel.sortable">{{field}} <i ng-show="field == panel.sort[0]" class="pointer link" ng-class="{'icon-chevron-up': panel.sort[1] == 'asc','icon-chevron-down': panel.sort[1] == 'desc'}"></i></span> <span ng-show="!panel.sortable">{{field}}</span> <i ng-show="!$last" class="pointer link icon-caret-right" ng-click="_.move(panel.fields,$index,$index+1)"></i></th></thead><tbody ng-repeat="event in data | slice:panel.offset:panel.offset+panel.size" ng-class-odd="'odd'"><tr ng-click="toggle_details(event)" class="pointer"><td ng-show="panel.fields.length<1">{{event._source|stringify|tableTruncate:panel.trimFactor:1}}</td><td ng-show="panel.fields.length>0" ng-repeat="field in panel.fields" ng-bind-html-unsafe="(event.highlight[field]||event._source[field]) |tableHighlight | tableTruncate:panel.trimFactor:panel.fields.length"></td></tr><tr ng-show="event.kibana.details"><td colspan="1000"><table class="table table-bordered table-condensed"><thead><th>Field</th><th>Action</th><th>Value</th></thead><tr ng-repeat="(key,value) in event.kibana.details._source" ng-class-odd="'odd'"><td>{{key}}</td><td style="white-space:nowrap"><i class="icon-search pointer" ng-click="build_search(key,value)" bs-tooltip="'Add filter to match this value'"></i> <i class="icon-ban-circle pointer" ng-click="build_search(key,value,true)" bs-tooltip="'Add filter to NOT match this value'"></i> <i class="pointer icon-th" ng-click="toggle_field(key)" bs-tooltip="'Toggle table column'"></i></td><td style="white-space:pre-wrap" ng-bind-html-unsafe="value|noXml|urlLink|stringify"></td></tr></table></td></tr></tbody></table><div class="row-fluid" ng-show="panel.paging"><div class="span1 offset3" style="text-align:right"><i ng-click="panel.offset = 0" ng-show="panel.offset > 0" class="icon-circle-arrow-left pointer"></i> <i ng-click="panel.offset = (panel.offset - panel.size)" ng-show="panel.offset > 0" class="icon-arrow-left pointer"></i></div><div class="span4" style="text-align:center"><strong>{{panel.offset}}</strong> to <strong>{{panel.offset + data.slice(panel.offset,panel.offset+panel.size).length}}</strong> <small>of {{data.length}} available for paging</small></div><div class="span1" style="text-align:left"><i ng-click="panel.offset = (panel.offset + panel.size)" ng-show="data.length > panel.offset+panel.size" class="icon-arrow-right pointer"></i></div></div></div></div></div>
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
define("panels/table/module",["angular","app","underscore","kbn","moment"],function(e,t,n,r,i){var s=e.module("kibana.panels.table",[]);t.useModule(s),s.controller("table",["$rootScope","$scope","fields","querySrv","dashboard","filterSrv",function(t,i,s,o,u,a){i.panelMeta={editorTabs:[{title:"Paging",src:"app/panels/table/pagination.html"},{title:"Queries",src:"app/partials/querySelect.html"}],status:"Stable",description:"A paginated table of records matching your query or queries. Click on a row to expand it and review all of the fields associated with that document. <p>"};var f={status:"Stable",queries:{mode:"all",ids:[]},size:100,pages:5,offset:0,sort:["_score","desc"],group:"default",style:{"font-size":"9pt"},overflow:"min-height",fields:[],highlight:[],sortable:!0,header:!0,paging:!0,field_list:!0,trimFactor:300,normTimes:!0,spyable:!0};n.defaults(i.panel,f),i.init=function(){i.Math=Math,i.$on("refresh",function(){i.get_data()}),i.fields=s,i.get_data()},i.percent=r.to_percent,i.toggle_micropanel=
|
||||
function(e){var t=n.pluck(i.data,"_source");i.micropanel={field:e,values:r.top_field_values(t,e,10),related:r.get_related_fields(t,e),count:n.countBy(t,function(t){return n.contains(n.keys(t),e)})["true"]}},i.micropanelColor=function(e){var t=["bar-success","bar-warning","bar-danger","bar-info","bar-primary"];return e>t.length?"":t[e]},i.set_sort=function(e){i.panel.sort[0]===e?i.panel.sort[1]=i.panel.sort[1]==="asc"?"desc":"asc":i.panel.sort[0]=e,i.get_data()},i.toggle_field=function(e){n.indexOf(i.panel.fields,e)>-1?i.panel.fields=n.without(i.panel.fields,e):i.panel.fields.push(e)},i.toggle_highlight=function(e){n.indexOf(i.panel.highlight,e)>-1?i.panel.highlight=n.without(i.panel.highlight,e):i.panel.highlight.push(e)},i.toggle_details=function(e){e.kibana=e.kibana||{},e.kibana.details=e.kibana.details?!1:i.without_kibana(e)},i.page=function(e){i.panel.offset=e*i.panel.size,i.get_data()},i.build_search=function(t,r,s){var o;n.isArray(r)?o="("+n.map(r,function(t){return e.toJson(t)}).
|
||||
join(" AND ")+")":n.isUndefined(r)?(o="*",s=!s):o=e.toJson(r),a.set({type:"field",field:t,query:o,mandate:s?"mustNot":"must"}),i.panel.offset=0,u.refresh()},i.fieldExists=function(e,t){a.set({type:"exists",field:e,mandate:t}),u.refresh()},i.get_data=function(e,t){i.panel.error=!1;if(u.indices.length===0)return;i.panelMeta.loading=!0,i.panel.queries.ids=o.idsByMode(i.panel.queries);var s=n.isUndefined(e)?0:e;i.segment=s;var f=i.ejs.Request().indices(u.indices[s]),l=i.ejs.BoolQuery();n.each(i.panel.queries.ids,function(e){l=l.should(o.getEjsObj(e))}),f=f.query(i.ejs.FilteredQuery(l,a.getBoolFilter(a.ids))).highlight(i.ejs.Highlight(i.panel.highlight).fragmentSize(2147483647).preTags("@start-highlight@").postTags("@end-highlight@")).size(i.panel.size*i.panel.pages).sort(i.panel.sort[0],i.panel.sort[1]),i.populate_modal(f);var c=f.doSearch();c.then(function(e){i.panelMeta.loading=!1,s===0&&(i.hits=0,i.data=[],t=i.query_id=(new Date).getTime());if(!n.isUndefined(e.error)){i.panel.error=i.parse_error
|
||||
(e.error);return}if(i.query_id!==t)return;i.data=i.data.concat(n.map(e.hits.hits,function(e){return{_source:r.flatten_json(e._source),highlight:r.flatten_json(e.highlight||{}),_type:e._type,_index:e._index,_id:e._id,_sort:e.sort}})),i.hits+=e.hits.total,i.data=n.sortBy(i.data,function(e){return e._sort[0]}),i.panel.sort[1]==="desc"&&i.data.reverse(),i.data=i.data.slice(0,i.panel.size*i.panel.pages),(i.data.length<i.panel.size*i.panel.pages||!n.contains(a.timeField(),i.panel.sort[0])||i.panel.sort[1]!=="desc")&&s+1<u.indices.length&&i.get_data(s+1,i.query_id)})},i.populate_modal=function(t){i.inspector=e.toJson(JSON.parse(t.toString()),!0)},i.without_kibana=function(e){return{_source:e._source,highlight:e.highlight}},i.set_refresh=function(e){i.refresh=e},i.close_edit=function(){i.refresh&&i.get_data(),i.refresh=!1}}]),s.filter("tableHighlight",function(){return function(e){return!n.isUndefined(e)&&!n.isNull(e)&&e.toString().length>0?e.toString().replace(/&/g,"&").replace(/</g,"<"
|
||||
).replace(/>/g,">").replace(/\r?\n/g,"<br/>").replace(/@start-highlight@/g,'<code class="highlight">').replace(/@end-highlight@/g,"</code>"):""}}),s.filter("tableTruncate",function(){return function(e,t,r){return!n.isUndefined(e)&&!n.isNull(e)&&e.toString().length>0?e.length>t/r?e.substr(0,t/r)+"...":e:""}}),s.filter("tableFieldFormat",["fields",function(e){return function(t,r,s,o){var u;if(!n.isUndefined(e.mapping[s._index])&&!n.isUndefined(e.mapping[s._index][s._type])){u=e.mapping[s._index][s._type][r].type;if(u==="date"&&o.panel.normTimes)return i(t).format("YYYY-MM-DD HH:mm:ss")}return t}}])});
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div class="row-fluid"><div class="span3"><h6>Show Controls</h6><input type="checkbox" ng-model="panel.paging" ng-checked="panel.paging"></div><div class="span2"><h6>Overflow</h6><select class="input-small" ng-model="panel.overflow" ng-options="f.value as f.key for f in [{key:'scroll',value:'height'},{key:'expand',value:'min-height'}]"></select></div></div><div class="row-fluid"><div class="span2"><h6>Per Page</h6><input type="number" class="input-mini" ng-model="panel.size" ng-change="get_data()"></div><div class="span1"><h6> </h6><center><i class="icon-remove"></i><center></center></center></div><div class="span2"><h6>Page limit</h6><input type="number" class="input-mini" ng-model="panel.pages" ng-change="get_data()"></div><div class="span2 large"><h6>Pageable</h6><strong class="large">= {{panel.size * panel.pages}}</strong></div></div>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div class="row-fluid"><div class="span2"><label class="small">Field</label><input type="text" class="input-small" bs-typeahead="fields.list" ng-model="panel.field" ng-change="set_refresh(true)"></div><div class="span2"><label class="small">Length</label><input class="input-small" type="number" ng-model="panel.size" ng-change="set_refresh(true)"></div><div class="span3"><label class="small">Order</label><select class="input-medium" ng-model="panel.order" ng-options="f for f in ['count','term','reverse_count','reverse_term']" ng-change="set_refresh(true)"></select></div><div class="span4"><label class="small">Exclude Terms(s) (comma seperated)</label><input array-join="" type="text" ng-model="panel.exclude"></div></div><div class="row-fluid"><div class="span2"><label class="small">Style</label><select class="input-small" ng-model="panel.chart" ng-options="f for f in ['bar','pie','table']"></select></div><div class="span2" ng-show="panel.chart == 'table'"><label class="small">Font Size</label><select class="input-mini" ng-model="panel.style['font-size']" ng-options="f for f in ['7pt','8pt','9pt','10pt','12pt','14pt','16pt','18pt','20pt','24pt','28pt','32pt','36pt','42pt','48pt','52pt','60pt','72pt']"></select></div><div class="span2" ng-show="panel.chart == 'bar' || panel.chart == 'pie'"><label class="small">Legend</label><select class="input-small" ng-model="panel.counter_pos" ng-options="f for f in ['above','below','none']"></select></div><div class="span3" ng-show="panel.chart != 'table' && panel.counter_pos != 'none'"><label class="small">Legend Format</label><select class="input-small" ng-model="panel.arrangement" ng-options="f for f in ['horizontal','vertical']"></select></div><div class="span1"><label class="small">Missing</label><input type="checkbox" ng-model="panel.missing" ng-checked="panel.missing"></div><div class="span1"><label class="small">Other</label><input type="checkbox" ng-model="panel.other" ng-checked="panel.other"></div><div class="span1" ng-show="panel.chart == 'pie'"><label class="small">Donut</label><input type="checkbox" ng-model="panel.donut" ng-checked="panel.donut"></div><div class="span1" ng-show="panel.chart == 'pie'"><label class="small">Tilt</label><input type="checkbox" ng-model="panel.tilt" ng-checked="panel.tilt"></div><div class="span1" ng-show="panel.chart == 'pie'"><label class="small">Labels</label><input type="checkbox" ng-model="panel.labels" ng-checked="panel.labels"></div></div>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div ng-controller="terms" ng-init="init()"><span ng-show="panel.spyable" class="spy panelextra pointer"><i bs-modal="'app/partials/inspector.html'" class="icon-eye-open"></i></span> <div ng-show="panel.counter_pos == 'above' && (panel.chart == 'bar' || panel.chart == 'pie')" id="{{$id}}-legend"><table class="small" ng-show="panel.arrangement == 'vertical'"><tr ng-repeat="term in legend"><td><i class="icon-circle" ng-style="{color:term.color}"></i></td><td style="padding-right:10px;padding-left:10px">{{term.label}}</td><td>{{term.data[0][1]}}</td></tr></table><div class="small" ng-show="panel.arrangement == 'horizontal'" ng-repeat="term in legend" style="float:left;padding-left: 10px"><span><i class="icon-circle" ng-style="{color:term.color}"></i> {{term.label}} ({{term.data[0][1]}})</span></div><br></div><div style="clear:both"></div><div ng-show="panel.chart == 'pie' || panel.chart == 'bar'" terms-chart="" params="{{panel}}" style="position:relative" class="pointer"></div><div ng-show="panel.counter_pos == 'below' && (panel.chart == 'bar' || panel.chart == 'pie')" id="{{$id}}-legend"><table class="small" ng-show="panel.arrangement == 'vertical'"><tr ng-repeat="term in legend"><td><i class="icon-circle" ng-style="{color:term.color}"></i></td><td style="padding-right:10px;padding-left:10px">{{term.label}}</td><td>{{term.data[0][1]}}</td></tr></table><div class="small" ng-show="panel.arrangement == 'horizontal'" ng-repeat="term in legend" style="float:left;padding-left: 10px"><span><i class="icon-circle" ng-style="{color:term.color}"></i></span> {{term.label}} ({{term.data[0][1]}})</div><br></div><table ng-style="panel.style" class="table table-striped table-condensed" ng-show="panel.chart == 'table'"><thead><th>Term</th><th>Count</th><th>Action</th></thead><tr ng-repeat="term in data" ng-show="showMeta(term)"><td>{{term.label}}</td><td>{{term.data[0][1]}}</td><td><span ng-hide="term.meta == 'other'"><i class="icon-search pointer" ng-click="build_search(term)"></i> <i class="icon-ban-circle pointer" ng-click="build_search(term,true)"></i></span></td></tr></table></div>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
define("panels/terms/module",["angular","app","underscore","jquery","kbn"],function(e,t,n,r,i){var s=e.module("kibana.panels.terms",[]);t.useModule(s),s.controller("terms",["$scope","querySrv","dashboard","filterSrv",function(t,r,i,s){t.panelMeta={editorTabs:[{title:"Queries",src:"app/partials/querySelect.html"}],status:"Beta",description:"Displays the results of an elasticsearch facet as a pie chart, bar chart, or a table"};var o={queries:{mode:"all",ids:[]},field:"_type",exclude:[],missing:!0,other:!0,size:10,order:"count",style:{"font-size":"10pt"},donut:!1,tilt:!1,labels:!0,arrangement:"horizontal",chart:"bar",counter_pos:"above",spyable:!0};n.defaults(t.panel,o),t.init=function(){t.hits=0,t.$on("refresh",function(){t.get_data()}),t.get_data()},t.get_data=function(){if(i.indices.length===0)return;t.panelMeta.loading=!0;var o,u,a;o=t.ejs.Request().indices(i.indices),t.panel.queries.ids=r.idsByMode(t.panel.queries),a=t.ejs.BoolQuery(),n.each(t.panel.queries.ids,function(e){a=a.should(
|
||||
r.getEjsObj(e))}),o=o.facet(t.ejs.TermsFacet("terms").field(t.panel.field).size(t.panel.size).order(t.panel.order).exclude(t.panel.exclude).facetFilter(t.ejs.QueryFilter(t.ejs.FilteredQuery(a,s.getBoolFilter(s.ids))))).size(0),t.inspector=e.toJson(JSON.parse(o.toString()),!0),u=o.doSearch(),u.then(function(e){var r=0;t.panelMeta.loading=!1,t.hits=e.hits.total,t.data=[],n.each(e.facets.terms.terms,function(e){var n={label:e.term,data:[[r,e.count]],actions:!0};t.data.push(n),r+=1}),t.data.push({label:"Missing field",data:[[r,e.facets.terms.missing]],meta:"missing",color:"#aaa",opacity:0}),t.data.push({label:"Other values",data:[[r+1,e.facets.terms.other]],meta:"other",color:"#444"}),t.$emit("render")})},t.build_search=function(e,r){if(n.isUndefined(e.meta))s.set({type:"terms",field:t.panel.field,value:e.label,mandate:r?"mustNot":"must"});else{if(e.meta!=="missing")return;s.set({type:"exists",field:t.panel.field,mandate:r?"must":"mustNot"})}i.refresh()},t.set_refresh=function(e){t.refresh=
|
||||
e},t.close_edit=function(){t.refresh&&t.get_data(),t.refresh=!1,t.$emit("render")},t.showMeta=function(e){return n.isUndefined(e.meta)?!0:e.meta==="other"&&!t.panel.other?!1:e.meta==="missing"&&!t.panel.missing?!1:!0}}]),s.directive("termsChart",["querySrv",function(t){return{restrict:"A",link:function(s,o){function u(){var e,i;o.css({height:s.panel.height||s.row.height}),i=n.clone(s.data),i=s.panel.missing?i:n.without(i,n.findWhere(i,{meta:"missing"})),i=s.panel.other?i:n.without(i,n.findWhere(i,{meta:"other"})),require(["jquery.flot.pie"],function(){try{s.panel.chart==="bar"&&(e=r.plot(o,i,{legend:{show:!1},series:{lines:{show:!1},bars:{show:!0,fill:1,barWidth:.8,horizontal:!1},shadowSize:1},yaxis:{show:!0,min:0,color:"#c8c8c8"},xaxis:{show:!1},grid:{borderWidth:0,borderColor:"#eee",color:"#eee",hoverable:!0,clickable:!0},colors:t.colors}));if(s.panel.chart==="pie"){var n=function(e,t){return"<div ng-click=\"build_search(panel.field,'"+e+"')"+' "style="font-size:8pt;text-align:center;padding:2px;color:white;">'+
|
||||
e+"<br/>"+Math.round(t.percent)+"%</div>"};e=r.plot(o,i,{legend:{show:!1},series:{pie:{innerRadius:s.panel.donut?.4:0,tilt:s.panel.tilt?.45:1,radius:1,show:!0,combine:{color:"#999",label:"The Rest"},stroke:{width:0},label:{show:s.panel.labels,radius:2/3,formatter:n,threshold:.1}}},grid:{hoverable:!0,clickable:!0},colors:t.colors})}o.is(":visible")&&setTimeout(function(){s.legend=e.getData(),s.$$phase||s.$apply()})}catch(u){o.text(u)}})}s.$on("render",function(){u()}),e.element(window).bind("resize",function(){u()}),o.bind("plotclick",function(e,t,n){n&&s.build_search(s.data[n.seriesIndex])});var a=r("<div>");o.bind("plothover",function(e,t,n){if(n){var r=s.panel.chart==="bar"?n.datapoint[1]:n.datapoint[1][0][1];a.html(i.query_color_dot(n.series.color,20)+" "+n.series.label+" ("+r.toFixed(0)+")").place_tt(t.pageX,t.pageY)}else a.remove()})}}}])});
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div><div class="row-fluid"><div class="span4"><label class="small">Mode</label><select class="input-medium" ng-model="panel.mode" ng-options="f for f in ['html','markdown','text']"></select></div><div class="span2" ng-show="panel.mode == 'text'"><label class="small">Font Size</label><select class="input-mini" ng-model="panel.style['font-size']" ng-options="f for f in ['6pt','7pt','8pt','10pt','12pt','14pt','16pt','18pt','20pt','24pt','28pt','32pt','36pt','42pt','48pt','52pt','60pt','72pt']"></select></div></div><label class="small">Content <span ng-show="panel.mode == 'html'">(This area uses HTML sanitized via AngularJS's <a href="http://docs.angularjs.org/api/ngSanitize.$sanitize">$sanitize</a> service)</span> <span ng-show="panel.mode == 'markdown'">(This area uses <a target="_blank" href="http://en.wikipedia.org/wiki/Markdown">Markdown</a>. HTML is not supported)</span></label><textarea ng-model="panel.content" rows="6" style="width:95%"></textarea></div>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div ng-controller="text" ng-init="init()"><markdown ng-show="ready && panel.mode == 'markdown'">{{panel.content}}</markdown><p ng-show="panel.mode == 'text'" ng-style="panel.style" ng-bind-html="panel.content | striphtml | newlines"></p><p ng-show="panel.mode == 'html'" ng-bind-html="panel.content"></p></div>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
var Showdown={extensions:{}},forEach=Showdown.forEach=function(e,t){if(typeof e.forEach=="function")e.forEach(t);else{var n,r=e.length;for(n=0;n<r;n++)t(e[n],n,e)}},stdExtName=function(e){return e.replace(/[_-]||\s/g,"").toLowerCase()};Showdown.converter=function(e){var t,n,r,i=0,s=[],o=[];if(typeof module!="undefind"&&typeof exports!="undefined"&&typeof require!="undefind"){var u=require("fs");if(u){var a=u.readdirSync((__dirname||".")+"/extensions").filter(function(e){return~e.indexOf(".js")}).map(function(e){return e.replace(/\.js$/,"")});Showdown.forEach(a,function(e){var t=stdExtName(e);Showdown.extensions[t]=require("./extensions/"+e)})}}this.makeHtml=function(e){return t={},n={},r=[],e=e.replace(/~/g,"~T"),e=e.replace(/\$/g,"~D"),e=e.replace(/\r\n/g,"\n"),e=e.replace(/\r/g,"\n"),e="\n\n"+e+"\n\n",e=F(e),e=e.replace(/^[ \t]+$/gm,""),Showdown.forEach(s,function(t){e=l(t,e)}),e=N(e),e=h(e),e=c(e),e=d(e),e=B(e),e=e.replace(/~D/g,"$$"),e=e.replace(/~T/g,"~"),Showdown.forEach(o,function(
|
||||
t){e=l(t,e)}),e};if(e&&e.extensions){var f=this;Showdown.forEach(e.extensions,function(e){typeof e=="string"&&(e=Showdown.extensions[stdExtName(e)]);if(typeof e!="function")throw"Extension '"+e+"' could not be loaded. It was either not found or is not a valid extension.";Showdown.forEach(e(f),function(e){e.type?e.type==="language"||e.type==="lang"?s.push(e):(e.type==="output"||e.type==="html")&&o.push(e):o.push(e)})})}var l=function(e,t){if(e.regex){var n=new RegExp(e.regex,"g");return t.replace(n,e.replace)}if(e.filter)return e.filter(t)},c=function(e){return e+="~0",e=e.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|(?=~0))/gm,function(e,r,i,s,o){return r=r.toLowerCase(),t[r]=_(i),s?s+o:(o&&(n[r]=o.replace(/"/g,""")),"")}),e=e.replace(/~0/,""),e},h=function(e){e=e.replace(/\n/g,"\n\n");var t="p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del|style|section|header|footer|nav|article|aside"
|
||||
,n="p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|style|section|header|footer|nav|article|aside";return e=e.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm,p),e=e.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|style|section|header|footer|nav|article|aside)\b[^\r]*?<\/\2>[ \t]*(?=\n+)\n)/gm,p),e=e.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,p),e=e.replace(/(\n\n[ ]{0,3}<!(--[^\r]*?--\s*)+>[ \t]*(?=\n{2,}))/g,p),e=e.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,p),e=e.replace(/\n\n/g,"\n"),e},p=function(e,t){var n=t;return n=n.replace(/\n\n/g,"\n"),n=n.replace(/^\n/,""),n=n.replace(/\n+$/g,""),n="\n\n~K"+(r.push(n)-1)+"K\n\n",n},d=function(e){e=E(e);var t=C("<hr />");return e=e.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,t),e=e.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm
|
||||
,t),e=e.replace(/^[ ]{0,2}([ ]?\_[ ]?){3,}[ \t]*$/gm,t),e=x(e),e=T(e),e=O(e),e=h(e),e=M(e),e},v=function(e){return e=k(e),e=m(e),e=D(e),e=b(e),e=g(e),e=P(e),e=_(e),e=A(e),e=e.replace(/ +\n/g," <br />\n"),e},m=function(e){var t=/(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|<!(--.*?--\s*)+>)/gi;return e=e.replace(t,function(e){var t=e.replace(/(.)<\/?code>(?=.)/g,"$1`");return t=I(t,"\\`*_"),t}),e},g=function(e){return e=e.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,y),e=e.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?(.*?(?:\(.*?\).*?)?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,y),e=e.replace(/(\[([^\[\]]+)\])()()()()()/g,y),e},y=function(e,r,i,s,o,u,a,f){f==undefined&&(f="");var l=r,c=i,h=s.toLowerCase(),p=o,d=f;if(p==""){h==""&&(h=c.toLowerCase().replace(/ ?\n/g," ")),p="#"+h;if(t[h]!=undefined)p=t[h],n[h]!=undefined&&(d=n[h]);else{if(!(l.search(/\(\s*\)$/m)>-1))return l;p=""}}p=I(p,"*_");var v='<a href="'+p+'"';return d!=""&&(d=d.replace(/"/g,"""),d=I(d,"*_"
|
||||
),v+=' title="'+d+'"'),v+=">"+c+"</a>",v},b=function(e){return e=e.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,w),e=e.replace(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,w),e},w=function(e,r,i,s,o,u,a,f){var l=r,c=i,h=s.toLowerCase(),p=o,d=f;d||(d="");if(p==""){h==""&&(h=c.toLowerCase().replace(/ ?\n/g," ")),p="#"+h;if(t[h]==undefined)return l;p=t[h],n[h]!=undefined&&(d=n[h])}c=c.replace(/"/g,"""),p=I(p,"*_");var v='<img src="'+p+'" alt="'+c+'"';return d=d.replace(/"/g,"""),d=I(d,"*_"),v+=' title="'+d+'"',v+=" />",v},E=function(e){function t(e){return e.replace(/[^\w]/g,"").toLowerCase()}return e=e.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm,function(e,n){return C('<h1 id="'+t(n)+'">'+v(n)+"</h1>")}),e=e.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,function(e,n){return C('<h2 id="'+t(n)+'">'+v(n)+"</h2>")}),e=e.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,function(e,n,r){var i=n.length;return C("<h"+i+' id="'+t(r)+'">'+v(r)+"</h"+i+">")}),e},S,x=function(
|
||||
e){e+="~0";var t=/^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;return i?e=e.replace(t,function(e,t,n){var r=t,i=n.search(/[*+-]/g)>-1?"ul":"ol";r=r.replace(/\n{2,}/g,"\n\n\n");var s=S(r);return s=s.replace(/\s+$/,""),s="<"+i+">"+s+"</"+i+">\n",s}):(t=/(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g,e=e.replace(t,function(e,t,n,r){var i=t,s=n,o=r.search(/[*+-]/g)>-1?"ul":"ol",s=s.replace(/\n{2,}/g,"\n\n\n"),u=S(s);return u=i+"<"+o+">\n"+u+"</"+o+">\n",u})),e=e.replace(/~0/,""),e};S=function(e){return i++,e=e.replace(/\n{2,}$/,"\n"),e+="~0",e=e.replace(/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+([^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm,function(e,t,n,r,i){var s=i,o=t,u=n;return o||s.search(/\n{2,}/)>-1?s=d(j(s)):(s=x(j(s)),s=s.replace(/\n$/,""),s=v(s)),"<li>"+s+"</li>\n"}),e=e.replace(/~0/g,""),i--,e};var T=function(e){return e+="~0",e=e.replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g
|
||||
,function(e,t,n){var r=t,i=n;return r=L(j(r)),r=F(r),r=r.replace(/^\n+/g,""),r=r.replace(/\n+$/g,""),r="<pre><code>"+r+"\n</code></pre>",C(r)+i}),e=e.replace(/~0/,""),e},N=function(e){return e+="~0",e=e.replace(/(?:^|\n)```(.*)\n([\s\S]*?)\n```/g,function(e,t,n){var r=t,i=n;return i=L(i),i=F(i),i=i.replace(/^\n+/g,""),i=i.replace(/\n+$/g,""),i="<pre><code"+(r?' class="'+r+'"':"")+">"+i+"\n</code></pre>",C(i)}),e=e.replace(/~0/,""),e},C=function(e){return e=e.replace(/(^\n+|\n+$)/g,""),"\n\n~K"+(r.push(e)-1)+"K\n\n"},k=function(e){return e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(e,t,n,r,i){var s=r;return s=s.replace(/^([ \t]*)/g,""),s=s.replace(/[ \t]*$/g,""),s=L(s),t+"<code>"+s+"</code>"}),e},L=function(e){return e=e.replace(/&/g,"&"),e=e.replace(/</g,"<"),e=e.replace(/>/g,">"),e=I(e,"*_{}[]\\",!1),e},A=function(e){return e=e.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g,"<strong>$2</strong>"),e=e.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g,"<em>$2</em>"),e},O=function(
|
||||
e){return e=e.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(e,t){var n=t;return n=n.replace(/^[ \t]*>[ \t]?/gm,"~0"),n=n.replace(/~0/g,""),n=n.replace(/^[ \t]+$/gm,""),n=d(n),n=n.replace(/(^|\n)/g,"$1 "),n=n.replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,function(e,t){var n=t;return n=n.replace(/^ /gm,"~0"),n=n.replace(/~0/g,""),n}),C("<blockquote>\n"+n+"\n</blockquote>")}),e},M=function(e){e=e.replace(/^\n+/g,""),e=e.replace(/\n+$/g,"");var t=e.split(/\n{2,}/g),n=[],i=t.length;for(var s=0;s<i;s++){var o=t[s];o.search(/~K(\d+)K/g)>=0?n.push(o):o.search(/\S/)>=0&&(o=v(o),o=o.replace(/^([ \t]*)/g,"<p>"),o+="</p>",n.push(o))}i=n.length;for(var s=0;s<i;s++)while(n[s].search(/~K(\d+)K/)>=0){var u=r[RegExp.$1];u=u.replace(/\$/g,"$$$$"),n[s]=n[s].replace(/~K\d+K/,u)}return n.join("\n\n")},_=function(e){return e=e.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&"),e=e.replace(/<(?![a-z\/?\$!])/gi,"<"),e},D=function(e){return e=e.replace(/\\(\\)/g,q),e=e.replace(/\\([`*_{}\[\]()>#+-.!])/g
|
||||
,q),e},P=function(e){return e=e.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi,'<a href="$1">$1</a>'),e=e.replace(/<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,function(e,t){return H(B(t))}),e},H=function(e){var t=[function(e){return"&#"+e.charCodeAt(0)+";"},function(e){return"&#x"+e.charCodeAt(0).toString(16)+";"},function(e){return e}];return e="mailto:"+e,e=e.replace(/./g,function(e){if(e=="@")e=t[Math.floor(Math.random()*2)](e);else if(e!=":"){var n=Math.random();e=n>.9?t[2](e):n>.45?t[1](e):t[0](e)}return e}),e='<a href="'+e+'">'+e+"</a>",e=e.replace(/">.+:/g,'">'),e},B=function(e){return e=e.replace(/~E(\d+)E/g,function(e,t){var n=parseInt(t);return String.fromCharCode(n)}),e},j=function(e){return e=e.replace(/^(\t|[ ]{1,4})/gm,"~0"),e=e.replace(/~0/g,""),e},F=function(e){return e=e.replace(/\t(?=\t)/g," "),e=e.replace(/\t/g,"~A~B"),e=e.replace(/~B(.+?)~A/g,function(e,t,n){var r=t,i=4-r.length%4;for(var s=0;s<i;s++)r+=" ";return r}),e=e.replace(/~A/g," "),e=e.replace
|
||||
(/~B/g,""),e},I=function(e,t,n){var r="(["+t.replace(/([\[\]\\])/g,"\\$1")+"])";n&&(r="\\\\"+r);var i=new RegExp(r,"g");return e=e.replace(i,q),e},q=function(e,t){var n=t.charCodeAt(0);return"~E"+n+"E"}},typeof module!="undefined"&&(module.exports=Showdown),typeof define=="function"&&define.amd&&define("panels/text/lib/showdown",[],function(){return Showdown}),define("panels/text/module",["angular","app","underscore","require"],function(e,t,n,r){var i=e.module("kibana.panels.text",[]);t.useModule(i),i.controller("text",["$scope",function(e){e.panelMeta={status:"Stable",description:"A static text panel that can use plain text, markdown, or (sanitized) HTML"};var t={status:"Stable",mode:"markdown",content:"",style:{}};n.defaults(e.panel,t),e.init=function(){e.ready=!1}}]),i.directive("markdown",function(){return{restrict:"E",link:function(e,t){function n(){r(["./lib/showdown"],function(n){e.ready=!0;var r=new n.converter,i=e.panel.content.replace(/&/g,"&").replace(/>/g,">").replace
|
||||
(/</g,"<"),s=r.makeHtml(i);t.html(s),e.$$phase||e.$apply()})}e.$on("render",function(){n()}),n()}}}),i.filter("newlines",function(){return function(e){return e.replace(/\n/g,"<br/>")}}),i.filter("striphtml",function(){return function(e){return e.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<")}})});
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div class="row-fluid"><div class="span3"><h6>Default Mode</h6><select style="width:85%" ng-model="panel.mode" ng-options="f for f in ['relative','absolute','since']"></select></div><div class="span3"><h6>Time Field</h6><input type="text" class="input-small" ng-model="panel.timefield"></div></div><div class="row-fluid"><h5>Relative mode <small>settings</small></h5><div class="span6"><h6>Relative time options <small>comma seperated</small></h6><input type="text" array-join="" class="input-large" ng-model="panel.time_options"></div><div class="span3"><h6>Default timespan</h6><select class="input-mini" ng-model="panel.timespan" ng-options="f for f in panel.time_options"></select></div><div class="row-fluid"><h5>Auto-refresh <small>settings</small></h5><div class="span1"><label class="small">Enable</label><input type="checkbox" ng-model="panel.refresh.enable" ng-checked="panel.refresh.enable"></div><div class="span2"><label class="small">Interval (seconds)</label><input type="number" class="input-mini" ng-model="panel.refresh.interval"></div><div class="span3"><label class="small">Minimum Interval (seconds)</label><input type="number" class="input-mini" ng-model="panel.refresh.min"></div></div></div>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
<div ng-controller="timepicker" ng-init="init()"><style>.timepicker-block {
|
||||
display: inline-block;
|
||||
}</style><div class="row-fluid form-horizontal" ng-switch="panel.mode" ng-show="filterSrv.idsByType('time').length > 0"><div ng-switch-when="absolute"><div class="timepicker-block"><form class="nomargin"><label><small>From</small></label><input type="text" class="input-smaller" ng-change="time_check()" ng-model="timepicker.from.date" data-date-format="mm/dd/yyyy" bs-datepicker=""><input type="text" class="input-mini" ng-change="time_check()" data-show-meridian="false" data-show-seconds="true" ng-model="timepicker.from.time" bs-timepicker=""></form></div><div class="timepicker-block" style="margin-left:10px"><form class="nomargin"><label style="margin-left:5px"><small>To (<a ng-click="to_now()">now</a>)</small></label><input type="text" class="input-smaller" ng-change="time_check()" ng-model="timepicker.to.date" data-date-format="mm/dd/yyyy" bs-datepicker=""><input type="text" class="input-mini" ng-change="time_check()" data-show-meridian="false" data-show-seconds="true" ng-model="timepicker.to.time" bs-timepicker=""></form></div><div class="timepicker-block"><form class="nomargin"><button class="btn" ng-click="time_apply()"><i class="icon-ok"></i></button></form></div></div><div ng-switch-when="since"><div class="timepicker-block"><form class="nomargin"><label><small>Since</small></label><input type="text" class="input-smaller" ng-change="time_check()" ng-model="timepicker.from.date" data-date-format="mm/dd/yyyy" bs-datepicker=""><input type="text" class="input-mini" ng-change="time_check()" data-show-meridian="false" data-show-seconds="true" ng-model="timepicker.from.time" bs-timepicker=""></form></div><div class="timepicker-block" style="margin-left:10px"><form class="nomargin"><label><small><br></small></label><button class="btn" ng-click="time_apply()"><i class="icon-ok"></i></button></form></div></div><div ng-switch-when="relative"><div class="timepicker-block"><form class="nomargin input-append"><label><small>The last</small></label><button class="btn btn" ng-repeat="timespan in panel.time_options" ng-class="{'btn-success': (panel.timespan == timespan)}" ng-click="set_timespan(timespan)">{{timespan}}</button> </form></div></div></div><div class="row-fluid" ng-show="filterSrv.idsByType('time').length < 1"><div><div class="span11"><h4>No time filter present</h4></div></div></div><div class="row-fluid nomargin"><div class="span12 small" ng-show="filterSrv.idsByType('time').length > 0"><a class="link" ng-click="set_mode('relative')" ng-class="{'strong': (panel.mode == 'relative')}">Relative</a> | <a class="link" ng-click="set_mode('absolute')" ng-class="{'strong': (panel.mode == 'absolute')}">Absolute</a> | <a class="link" ng-click="set_mode('since')" ng-class="{'strong': (panel.mode == 'since')}">Since</a> <span ng-hide="panel.mode == 'absolute' || panel.mode == 'none'">|<input type="checkbox" ng-model="panel.refresh.enable" ng-change="refresh();">Auto-refresh <span ng-class="{'ng-cloak': !panel.refresh.enable}">every <a data-title="<small>Auto-refresh Settings</small>" data-placement="bottom" bs-popover="'app/panels/timepicker/refreshctrl.html'">{{panel.refresh.interval}}s</a>.</span></span></div><div class="span12 small" ng-show="filterSrv.idsByType('time').length < 1"><a class="btn btn-small" ng-click="time_apply()">Create a time filter</a></div></div></div>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
define("panels/timepicker/module",["angular","app","underscore","moment","kbn"],function(e,t,n,r,i){var s=e.module("kibana.panels.timepicker",[]);t.useModule(s),s.controller("timepicker",["$scope","$rootScope","$timeout","timer","$http","dashboard","filterSrv",function(e,t,s,o,u,a,f){function h(t){return t.type="time",f.removeByType("time"),e.panel.filter_id=f.set(p(t)),e.panel.filter_id}function p(e){return e=n.clone(e),e.from=e.from.toDate(),e.to=e.to.toDate(),e}function d(t,n){e.timepicker={from:{time:t.format("HH:mm:ss"),date:t.format("MM/DD/YYYY")},to:{time:n.format("HH:mm:ss"),date:n.format("MM/DD/YYYY")}}}e.panelMeta={status:"Stable",description:"A panel for controlling the time range filters. If you have time based data, or if you're using time stamped indices, you need one of these"};var l={status:"Stable",mode:"relative",time_options:["5m","15m","1h","6h","12h","24h","2d","7d","30d"],timespan:"15m",timefield:"@timestamp",timeformat:"",refresh:{enable:!1,interval:30,min:3}};n.
|
||||
defaults(e.panel,l),e.init=function(){e.refresh_interval=e.panel.refresh.interval,e.filterSrv=f;switch(e.panel.mode){case"absolute":e.time={from:r(e.panel.time.from,"MM/DD/YYYY HH:mm:ss")||r(i.time_ago(e.panel.timespan)),to:r(e.panel.time.to,"MM/DD/YYYY HH:mm:ss")||r()};break;case"since":e.time={from:r(e.panel.time.from,"MM/DD/YYYY HH:mm:ss")||r(i.time_ago(e.panel.timespan)),to:r()};break;case"relative":e.time={from:r(i.time_ago(e.panel.timespan)),to:r()}}e.time.field=e.panel.timefield,d(e.time.from,e.time.to),c(),e.panel.mode!=="absolute"&&h(e.time),a.refresh(),e.panel.refresh.enable&&e.set_interval(e.panel.refresh.interval),e.$on("refresh",function(){if(f.idsByType("time").length>0){var t=f.timeRange("min");if(e.time.from.diff(r.utc(t.from),"seconds")!==0||e.time.to.diff(r.utc(t.to),"seconds")!==0)e.set_mode("absolute"),d(r(t.from),r(t.to)),e.time=e.time_calc(),c()}})},e.set_interval=function(t){e.panel.refresh.interval=t;if(n.isNumber(e.panel.refresh.interval)){if(e.panel.refresh.interval<
|
||||
e.panel.refresh.min){e.panel.refresh.interval=e.panel.refresh.min,o.cancel(e.refresh_timer);return}o.cancel(e.refresh_timer),e.refresh()}else o.cancel(e.refresh_timer)},e.refresh=function(){e.panel.refresh.enable?(o.cancel(e.refresh_timer),e.refresh_timer=o.register(s(function(){e.refresh(),e.time_apply()},e.panel.refresh.interval*1e3))):o.cancel(e.refresh_timer)};var c=function(){e.panel.mode!=="relative"?e.panel.time={from:e.time.from.format("MM/DD/YYYY HH:mm:ss"),to:e.time.to.format("MM/DD/YYYY HH:mm:ss")}:delete e.panel.time};e.set_mode=function(t){e.panel.mode=t,e.panel.refresh.enable=t==="absolute"?!1:e.panel.refresh.enable,c()},e.to_now=function(){e.timepicker.to={time:r().format("HH:mm:ss"),date:r().format("MM/DD/YYYY")}},e.set_timespan=function(t){e.panel.timespan=t,e.timepicker.from={time:r(i.time_ago(t)).format("HH:mm:ss"),date:r(i.time_ago(t)).format("MM/DD/YYYY")},e.time_apply()},e.close_edit=function(){e.time_apply()},e.time_calc=function(){var t,o;return n.isUndefined(e.timepicker
|
||||
)?(t=e.panel.mode==="relative"?r(i.time_ago(e.panel.timespan)):e.time.from,o=e.panel.mode!=="absolute"?r():e.time.to):(t=e.panel.mode==="relative"?r(i.time_ago(e.panel.timespan)):r(r(e.timepicker.from.date).format("MM/DD/YYYY")+" "+e.timepicker.from.time,"MM/DD/YYYY HH:mm:ss"),o=e.panel.mode!=="absolute"?r():r(r(e.timepicker.to.date).format("MM/DD/YYYY")+" "+e.timepicker.to.time,"MM/DD/YYYY HH:mm:ss")),t.valueOf()>=o.valueOf()&&(t=r(o.valueOf()-1e3)),s(function(){d(t,o)}),{from:t,to:o}},e.time_apply=function(){e.panel.error="",f.removeByType("time"),e.time=e.time_calc(),e.time.field=e.panel.timefield,c(),h(e.time),a.refresh()},e.$watch("panel.mode",e.time_apply)}])});
|
||||
+1
@@ -0,0 +1 @@
|
||||
<form name="refreshPopover" class="form-inline input-append" style="margin:0px"><label><small>Interval (seconds)</small></label><br><input type="number" class="input-mini" ng-model="refresh_interval"><button type="button" class="btn" ng-click="set_interval(refresh_interval);dismiss()"><i class="icon-ok"></i></button></form>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div><div class="row-fluid"><div class="span12">The trends panel will give you a percentage representation of how your query has moved in your current timespan compared a specified amount of time ago. For example, if the time is 1:10pm, your time picker was set to "Last 10m", and the "Time Ago" parameter was set to '1h', the panel would show how much the query results have changed since 12:00-12:10pm</div></div><h4>Settings</h4><div class="row-fluid"><div class="span3" ng-hide="panel.auto_int"><label class="small">Use Elasticsearch date math format here (eg 1m, 5m, 1d, 2w, 1y)</label></div><div class="span3"><label class="small">Time Ago</label><input type="text" class="input-small" ng-model="panel.ago" ng-change="set_refresh(true)"></div><div class="span2"><label class="small">Font Size</label><select class="input-small" ng-model="panel.style['font-size']" ng-options="f for f in ['7pt','8pt','9pt','10pt','12pt','14pt','16pt','18pt','20pt','24pt','28pt','32pt','36pt','42pt','48pt','52pt','60pt','72pt']"></select></div><div class="span3"><label class="small">List Format</label><select class="input-small" ng-model="panel.arrangement" ng-options="f for f in ['horizontal','vertical']"></select></div></div></div>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div ng-controller="trends" ng-init="init()"><div ng-style="panel.style" style="line-height:{{panel.style['font-size']}};display:inline-block;padding-right: 5px" ng-repeat="query in trends"><i class="icon-circle" style="color:{{query.info.color}}"></i> <span bs-tooltip="'Then: '+query.hits.old+', Now: '+query.hits.new" ng-class="{'text-success': query.hits.new >= query.hits.old, 'text-error': query.hits.old > query.hits.new}" class="pointer strong"><i class="large" ng-class="{'icon-caret-up': query.hits.new >= query.hits.old, 'icon-caret-down': query.hits.old > query.hits.new}"></i> {{query.percent}}%</span> <span class="tiny light" ng-show="query.info.alias != ''">({{query.info.alias}})</span><br ng-show="panel.arrangement == 'vertical'"></div></div>
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
define("panels/trends/module",["angular","app","underscore","kbn"],function(e,t,n,r){var i=e.module("kibana.panels.trends",[]);t.useModule(i),i.controller("trends",["$scope","kbnIndex","querySrv","dashboard","filterSrv",function(e,t,i,s,o){function f(e,t){return e===0?null:100*(t-e)/e}e.panelMeta={editorTabs:[{title:"Queries",src:"app/partials/querySelect.html"}],status:"Beta",description:'A stock-ticker style representation of how queries are moving over time. For example, if the time is 1:10pm, your time picker was set to "Last 10m", and the "Time Ago" parameter was set to \'1h\', the panel would show how much the query results have changed since 12:00-12:10pm'};var u={queries:{mode:"all",ids:[]},style:{"font-size":"14pt"},ago:"1d",arrangement:"vertical"};n.defaults(e.panel,u),e.init=function(){e.hits=0,e.$on("refresh",function(){e.get_data()}),e.get_data()},e.get_data=function(u,f){delete e.panel.error,e.panelMeta.loading=!0;if(s.indices.length===0)return;e.index=u>0?e.index:s.indices
|
||||
,e.panel.queries.ids=i.idsByMode(e.panel.queries);var l=n.uniq(n.pluck(o.getByType("time"),"field"));if(l.length>1){e.panel.error="Time field must be consistent amongst time filters";return}if(l.length===0){e.panel.error="A time filter must exist for this panel to function";return}l=l[0],e.time=o.timeRange("min"),e.old_time={from:new Date(e.time.from.getTime()-r.interval_to_seconds(e.panel.ago)*1e3),to:new Date(e.time.to.getTime()-r.interval_to_seconds(e.panel.ago)*1e3)};var c=n.isUndefined(u)?0:u,h=e.ejs.Request(),p=n.difference(o.ids,o.idsByType("time"));n.each(e.panel.queries.ids,function(t){var n=e.ejs.FilteredQuery(i.getEjsObj(t),o.getBoolFilter(p).must(e.ejs.RangeFilter(l).from(e.time.from).to(e.time.to)));h=h.facet(e.ejs.QueryFacet(t).query(n)).size(0)}),n.each(e.panel.queries.ids,function(t){var n=e.ejs.FilteredQuery(i.getEjsObj(t),o.getBoolFilter(p).must(e.ejs.RangeFilter(l).from(e.old_time.from).to(e.old_time.to)));h=h.facet(e.ejs.QueryFacet("old_"+t).query(n)).size(0)}),c===0?
|
||||
t.indices(e.old_time.from,e.old_time.to,s.current.index.pattern,s.current.index.interval).then(function(t){e.index=n.union(t,e.index),h=h.indices(e.index[c]),a(h.doSearch(),c,f)}):a(h.indices(e.index[c]).doSearch(),c,f)};var a=function(t,r,s){t.then(function(t){e.panelMeta.loading=!1,r===0&&(e.hits={},e.data=[],s=e.query_id=(new Date).getTime());if(!n.isUndefined(t.error)){e.panel.error=e.parse_error(t.error);return}var o=n.map(n.keys(t.facets),function(e){if(!isNaN(e))return parseInt(e,10)});if(e.query_id===s&&n.intersection(o,e.panel.queries.ids).length===e.panel.queries.ids.length){var u=0;n.each(e.panel.queries.ids,function(s){var o=t.facets[s].count,a=t.facets["old_"+s].count,l={"new":n.isUndefined(e.data[u])||r===0?o:e.data[u].hits.new+o,old:n.isUndefined(e.data[u])||r===0?a:e.data[u].hits.old+a};e.hits.new+=o,e.hits.old+=a;var c=f(l.old,l.new)==null?"?":Math.round(f(l.old,l.new)*100)/100;e.data[u]={info:i.list[s],hits:{"new":l.new,old:l.old},percent:c},u++}),e.$emit("render"),r<e
|
||||
.index.length-1?e.get_data(r+1,s):e.trends=e.data}})};e.set_refresh=function(t){e.refresh=t},e.close_edit=function(){e.refresh&&e.get_data(),e.refresh=!1,e.$emit("render")}}])});
|
||||
+1
@@ -0,0 +1 @@
|
||||
<li class="dropdown" bs-tooltip="'Load'" data-placement="bottom" ng-show="showDropdown('load')"><a href="#" class="dropdown-toggle" data-toggle="dropdown" ng-click="elasticsearch_dblist('*')"><i class="icon-folder-open"></i></a><ul class="dropdown-menu" style="padding:10px"><li ng-show="loader.load_local"><h5>Local File<tip>Load dashboard JSON layout from file</tip></h5><form><input type="file" id="dashupload" dash-upload=""><br></form></li><li ng-show="loader.load_gist"><h5>Gist<tip>Enter a gist number or url</tip></h5><form><input type="text" ng-model="gist.url" placeholder="Gist number or URL"><br><button class="btn" ng-click="gist_dblist(dashboard.gist_id(gist.url))" ng-show="dashboard.is_gist(gist.url)"><i class="icon-github-alt"></i> Get gist:{{gist.url | gistid}}</button><h6 ng-show="gist.files.length">Dashboards in gist:{{gist.url | gistid}} <small>click to load</small></h6><h6 ng-hide="gist.files.length">No gist dashboards found</h6><table class="table table-condensed table-striped"><tr ng-repeat="file in gist.files"><td><a ng-click="dashboard.dash_load(file)">{{file.title}}</a></td></tr></table></form></li><li ng-show="loader.load_elasticsearch"><h5>Elasticsearch</h5><form><input type="text" ng-model="elasticsearch.query" ng-change="elasticsearch_dblist('title:'+elasticsearch.query+'*')" placeholder="Type to filter"></form><h6 ng-show="elasticsearch.dashboards.length">Elasticsearch stored dashboards</h6><h6 ng-hide="elasticsearch.dashboards.length">No dashboards matching your query found</h6><table class="table table-condensed table-striped"><tr ng-repeat="row in elasticsearch.dashboards | orderBy:['_id']"><td><a ng-click="elasticsearch_delete(row._id)"><i class="icon-remove"></i></a></td><td><a href="#/dashboard/elasticsearch/{{row._id}}">{{row._id}}</a></td><td><a><i class="icon-share" ng-click="share = dashboard.share_link(row._id,'elasticsearch',row._id)" bs-modal="'app/panels/dashcontrol/share.html'"></i></a></td></tr></table></li></ul></li><li class="dropdown" bs-tooltip="'Save'" data-placement="bottom" ng-show="showDropdown('save')"><a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-save"></i></a><ul class="dropdown-menu" style="padding:10px"><li ng-show="loader.save_default || loader.save_local"><h5>Locally</h5><ul class="unstyled"><li><a class="link" ng-show="loader.save_local" ng-click="dashboard.to_file()"><i class="icon-download"></i> Export to File</a><tip>Export layout, not data, to file</tip></li><li><a class="link" ng-show="loader.save_default" ng-click="set_default()"><i class="icon-bookmark"></i> Set as Browser Default</a><tip>Store dashboard preference to browser's localStorage</tip></li><li><a class="link" ng-show="loader.save_default" ng-click="purge_default()"><i class="icon-ban-circle"></i> Clear Browser Default</a></li></ul></li><li ng-show="loader.save_gist"><h5>Gist</h5><form class="input-append"><input class="input-medium" placeholder="Title" type="text" ng-model="gist.title"><button class="btn" ng-click="save_gist()"><i class="icon-github-alt"></i></button></form><br><small ng-show="gist.last">Last gist: <a target="_blank" href="{{gist.last}}">{{gist.last}}</a></small></li><li ng-show="loader.save_elasticsearch"><h5>Elasticsearch</h5><form class="input-append"><input class="input-medium" placeholder="Title" type="text" ng-model="elasticsearch.title"><button class="btn" ng-click="elasticsearch_save('dashboard')"><i class="icon-save"></i></button></form></li></ul></li><li ng-show="showDropdown('share')"><a bs-tooltip="'Share'" data-placement="bottom" ng-click="elasticsearch_save('temp',loader.save_temp_ttl)" bs-modal="'app/partials/dashLoaderShare.html'"><i class="icon-share"></i></a></li>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h3>{{share.title}} <small>shareable link</small></h3></div><div class="modal-body"><label>Share this dashboard with this URL</label><input ng-model="share.link" type="text" style="width:90%" onclick="this.select()" onfocus="this.select()" ng-change="share = dashboard.share_link(share.title,share.type,share.id)"></div><div class="modal-footer"><button type="button" class="btn btn-success" ng-click="dismiss();$broadcast('render')">Close</button></div>
|
||||
+1
@@ -0,0 +1 @@
|
||||
<div class="row-fluid container" style="margin-top:10px"><div class="row-fluid kibana-row" ng-controller="RowCtrl" ng-repeat="(row_name, row) in dashboard.current.rows" ng-style="row_style(row)"><div class="row-control"><div class="row-fluid row-header" style="padding:0px;margin:0px;height:0px"><div style="vertical-align:bottom"><div><div ng-class="{'row-open': !row.collapse, 'row-close': row.collapse}" style="position:absolute;margin-left:-60px"><span ng-class="{pointer:row.collapsable}" ng-click="toggle_row(row)">{{row.title}}</span> <i ng-show="row.editable" class="icon-cog pointer editlink" bs-modal="'app/partials/roweditor.html'"></i></div></div></div></div><div class="row-fluid" style="padding-top:0px" ng-hide="row.collapse"><div ng-repeat="(name, panel) in row.panels" ng-hide="panel.span == 0 || panel.hide" class="span{{panel.span}} panel" style="min-height:{{row.height}}; position:relative"><div class="row-fluid"><div class="span12 alert alert-error panel-error" ng-hide="!panel.error"><a class="close" ng-click="panel.error=false">×</a> <i class="icon-exclamation-sign"></i> <strong>Oops!</strong> {{panel.error}}</div></div><div class="row-fluid"><kibana-panel type="panel.type" ng-cloak=""></kibana-panel></div></div></div></div></div></div>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user