Google Analytics - Version 3.2.0

Version Description

  • 5-Mar-2020
  • New : [pro] Added the ability to lock settings for users.
  • New : WooCommerce earnings graph.
  • Fix : Compatibility issues with other plugins, that causes the widget to display a blank page, instead of the main graph.
Download this release

Release Info

Developer amribrahim
Plugin Icon 128x128 Google Analytics
Version 3.2.0
Comparing to
See all releases

Code changes from version 3.1.0 to 3.2.0

core/lrgawidget.class.php CHANGED
@@ -37,7 +37,9 @@ class lrgawidget{
37
  private $currentQueryParams;
38
  private $mdCurrentQueryParams;
39
  private $calculateTotalsFor;
40
-
 
 
41
  function __construct($lrperm){
42
  $this->lrperm = $lrperm;
43
  $this->systemTimeZone = date_default_timezone_get();
@@ -50,6 +52,19 @@ class lrgawidget{
50
  $this->dParams = array( 'metrics' => 'ga:sessions', 'sort' => '-ga:sessions');
51
  $this->settings = $this->store->getSettingsArray();
52
  $this->calculateTotalsFor = "ga:sessions";
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  }
54
 
55
  public function getSessions(){
@@ -102,10 +117,59 @@ class lrgawidget{
102
  $this->store->saveCache($this->cachePrefix, $this->mdCurrentQueryParams."_output", $this->output);
103
  }
104
  }
105
-
106
  $this->jsonOutput();
107
  }
108
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  public function getBrowsers($versions=""){
110
  $this->params = array( 'dimensions' => 'ga:browser');
111
  $this->doCall(true);
@@ -209,12 +273,14 @@ class lrgawidget{
209
  $this->output['all_accounts'] = $this->results['items'];
210
  $this->results = $this->gapi->getProfiles(array('fields' => 'items(id,timezone)'));
211
  $this->output['all_profiles'] = $this->results['items'];
212
- $this->store->saveCache($this->cachePrefix, md5('all_accounts'.$this->getSetting('access_token'))."_output", $this->output);
 
213
 
214
  $this->output['current_selected'] = array("account_id" => $this->getSetting('account_id'),
215
  "property_id" => $this->getSetting('property_id'),
216
  "profile_id" => $this->getSetting('profile_id'),
217
- "profile_timezone" => $this->getSetting('profile_timezone'));
 
218
  $this->jsonOutput();
219
  }
220
 
@@ -246,8 +312,9 @@ class lrgawidget{
246
  }
247
 
248
 
249
- public function setProfileID($account_id, $property_id, $profile_id, $profile_timezone, $enable_universal_tracking){
250
- $data = $this->store->getCache($this->cachePrefix, md5('all_accounts'.$this->getSetting('access_token'))."_output", $this->cacheTime);
 
251
  $selectedProfile = array();
252
 
253
  if (!empty($data['all_accounts']) && is_array($data['all_accounts'])){
@@ -281,24 +348,29 @@ class lrgawidget{
281
  }
282
 
283
 
284
- if(empty($selectedProfile['account_id'])){$this->errors[] = "Invalid account_id";}
285
- if(empty($selectedProfile['property_id'])){$this->errors[] = "Invalid property_id";}
286
- if(empty($selectedProfile['profile_id'])){$this->errors[] = "Invalid profile_id";}
287
- if(empty($selectedProfile['profile_timezone'])){$this->errors[] = "Invalid profile_timezone";}
288
  if (empty($this->errors)){
289
  $this->saveSetting(array('account_id' => $selectedProfile['account_id'],
290
  'property_id' => $selectedProfile['property_id'],
291
  'profile_id' => $selectedProfile['profile_id'],
292
  'profile_timezone' => $selectedProfile['profile_timezone']));
293
-
294
  if($enable_universal_tracking === "on"){
295
  $this->saveSetting(array('enable_universal_tracking' => 'on'));
296
  }else{
297
  $this->saveSetting(array('enable_universal_tracking' => 'off'));
298
  }
 
 
 
 
 
 
 
299
  }
300
-
301
- $this->purgeCache();
302
  $this->jsonOutput();
303
  }
304
 
@@ -363,6 +435,15 @@ class lrgawidget{
363
  $item[1] = $item[2];
364
  unset($item[2]);
365
  $item = array_values($item);
 
 
 
 
 
 
 
 
 
366
  }
367
 
368
  private function convertDate(&$item){
@@ -376,6 +457,8 @@ class lrgawidget{
376
 
377
  private function jsonOutput(){
378
  header('Content-Type: application/json; charset=utf-8');
 
 
379
  if (empty($this->errors)){
380
  if ($this->cached){ $this->output['cached'] = "true";}
381
  if ($this->cachedOutput){ $this->output['cachedOutput'] = "true";}
37
  private $currentQueryParams;
38
  private $mdCurrentQueryParams;
39
  private $calculateTotalsFor;
40
+ private $cacheEarningsOutput;
41
+ private $earningsCacheTime;
42
+
43
  function __construct($lrperm){
44
  $this->lrperm = $lrperm;
45
  $this->systemTimeZone = date_default_timezone_get();
52
  $this->dParams = array( 'metrics' => 'ga:sessions', 'sort' => '-ga:sessions');
53
  $this->settings = $this->store->getSettingsArray();
54
  $this->calculateTotalsFor = "ga:sessions";
55
+ $this->cacheEarningsOutput = true;
56
+ $this->earningsCacheTime = 900;
57
+ }
58
+
59
+ private function getGraphObject(){
60
+ $graphObject = false;
61
+ if (in_array("lrgawidget_perm_ecom_woo", $this->lrperm["permissions"])){
62
+ if (class_exists( 'woocommerce' )){
63
+ require("plugins/lrga_wp_woo_plugin.php");
64
+ $graphObject = new lrga_wp_woo_plugin($this->getSetting('start_date'), $this->getSetting('end_date'));
65
+ }
66
+ }
67
+ return $graphObject;
68
  }
69
 
70
  public function getSessions(){
117
  $this->store->saveCache($this->cachePrefix, $this->mdCurrentQueryParams."_output", $this->output);
118
  }
119
  }
120
+ $this->getEarnings();
121
  $this->jsonOutput();
122
  }
123
 
124
+
125
+ private function getEarnings(){
126
+ if ($this->getSetting('enable_ecommerce_graph') === "on"){
127
+ $graphOutput = array();
128
+ if ($this->cacheEarningsOutput === true){
129
+ $graphOutput = $this->store->getCache($this->cachePrefix,"earnings_seriesData", $this->earningsCacheTime);
130
+ }
131
+ if (empty($graphOutput)){
132
+ $graphObject = $this->getGraphObject();
133
+ if (($graphObject !== false) && (is_object($graphObject))){
134
+ $graphOutput = $graphObject->getGraphOutput();
135
+ if ($this->cacheEarningsOutput === true){
136
+ $this->store->saveCache($this->cachePrefix, "earnings_seriesData", $graphOutput);
137
+ }
138
+ }
139
+ }
140
+
141
+ if (!empty($graphOutput)){
142
+ list($this->output['plotdata']['sales'], $this->output['plotdata']['earnings'],$this->output['graph']['settings']) = $graphOutput;
143
+ }
144
+ }
145
+ }
146
+
147
+ public function getGraphData(){
148
+ if ($this->getSetting('enable_ecommerce_graph') === "on"){
149
+ $graphData = array();
150
+ if ($this->cacheEarningsOutput === true){
151
+ $graphData = $this->store->getCache($this->cachePrefix,"earnings_graphData", $this->earningsCacheTime);
152
+ $cached = true;
153
+ }
154
+
155
+ if (empty($graphData)){
156
+ $cached = false;
157
+ $graphObject = $this->getGraphObject();
158
+ if (($graphObject !== false) && (is_object($graphObject))){
159
+ $graphData = $graphObject->getGraphData();
160
+ $this->store->saveCache($this->cachePrefix, "earnings_graphData", $graphData);
161
+ }
162
+ }
163
+
164
+ if (!empty($graphData)){
165
+ $this->output = $graphData;
166
+ }
167
+ $this->output['gaoptionscached'] = $cached;
168
+ }
169
+ $this->jsonOutput();
170
+ }
171
+
172
+
173
  public function getBrowsers($versions=""){
174
  $this->params = array( 'dimensions' => 'ga:browser');
175
  $this->doCall(true);
273
  $this->output['all_accounts'] = $this->results['items'];
274
  $this->results = $this->gapi->getProfiles(array('fields' => 'items(id,timezone)'));
275
  $this->output['all_profiles'] = $this->results['items'];
276
+
277
+ $this->store->saveCache($this->cachePrefix, md5('all_accounts_and_profiles')."_output", $this->output);
278
 
279
  $this->output['current_selected'] = array("account_id" => $this->getSetting('account_id'),
280
  "property_id" => $this->getSetting('property_id'),
281
  "profile_id" => $this->getSetting('profile_id'),
282
+ "profile_timezone" => $this->getSetting('profile_timezone'),
283
+ "lock_settings" => $this->getSetting('lock_settings'));
284
  $this->jsonOutput();
285
  }
286
 
312
  }
313
 
314
 
315
+ public function setProfileID($account_id, $property_id, $profile_id, $profile_timezone, $enable_universal_tracking, $enable_ecommerce_graph){
316
+
317
+ $data = $this->store->getCache($this->cachePrefix, md5('all_accounts_and_profiles')."_output", $this->cacheTime);
318
  $selectedProfile = array();
319
 
320
  if (!empty($data['all_accounts']) && is_array($data['all_accounts'])){
348
  }
349
 
350
 
351
+ if(empty($selectedProfile['account_id'])){$this->errors[] = "Invalid Account ID";}
352
+ if(empty($selectedProfile['property_id'])){$this->errors[] = "Invalid Property ID";}
353
+ if(empty($selectedProfile['profile_id'])){$this->errors[] = "Invalid Profile ID";}
354
+ if(empty($selectedProfile['profile_timezone'])){$this->errors[] = "Invalid Profile Timezone";}
355
  if (empty($this->errors)){
356
  $this->saveSetting(array('account_id' => $selectedProfile['account_id'],
357
  'property_id' => $selectedProfile['property_id'],
358
  'profile_id' => $selectedProfile['profile_id'],
359
  'profile_timezone' => $selectedProfile['profile_timezone']));
360
+
361
  if($enable_universal_tracking === "on"){
362
  $this->saveSetting(array('enable_universal_tracking' => 'on'));
363
  }else{
364
  $this->saveSetting(array('enable_universal_tracking' => 'off'));
365
  }
366
+
367
+ if($enable_ecommerce_graph === "on"){
368
+ $this->saveSetting(array('enable_ecommerce_graph' => 'on'));
369
+ }else{
370
+ $this->saveSetting(array('enable_ecommerce_graph' => 'off'));
371
+ }
372
+ $this->purgeCache();
373
  }
 
 
374
  $this->jsonOutput();
375
  }
376
 
435
  $item[1] = $item[2];
436
  unset($item[2]);
437
  $item = array_values($item);
438
+ }
439
+
440
+ private function array_find($needle, array $haystack){
441
+ foreach ($haystack as $key => $value) {
442
+ if (false !== stripos($value, $needle)) {
443
+ return true;
444
+ }
445
+ }
446
+ return false;
447
  }
448
 
449
  private function convertDate(&$item){
457
 
458
  private function jsonOutput(){
459
  header('Content-Type: application/json; charset=utf-8');
460
+ @ini_set('precision', 14);
461
+ @ini_set('serialize_precision', 14);
462
  if (empty($this->errors)){
463
  if ($this->cached){ $this->output['cached'] = "true";}
464
  if ($this->cachedOutput){ $this->output['cachedOutput'] = "true";}
core/lrgawidget.handler.php CHANGED
@@ -19,7 +19,7 @@ require_once("exception.class.php");
19
  if (isset($lrdata['action']) && !empty($lrperm)){
20
 
21
  require("callURL.class.php");
22
- require("storage.class.php");
23
  require("GoogleAnalyticsAPI.class.php");
24
  require("lrgawidget.class.php");
25
 
@@ -46,7 +46,7 @@ if (isset($lrdata['action']) && !empty($lrperm)){
46
  else{ Common\ErrorHandler::FatalError(__('You do not have permission to access this tab!', 'lara-google-analytics'));}
47
  break;
48
  case "setProfileID":
49
- if (in_array("lrgawidget_perm_admin", $lrperm["permissions"])){ $call->setProfileID($lrdata['account_id'],$lrdata['property_id'],$lrdata['profile_id'], $lrdata['profile_timezone'], @$lrdata['enable_universal_tracking']);}
50
  else{ Common\ErrorHandler::FatalError(__('You do not have permission to access this tab!', 'lara-google-analytics'));}
51
  break;
52
  case "settingsReset":
@@ -81,6 +81,10 @@ if (isset($lrdata['action']) && !empty($lrperm)){
81
  if (in_array("lrgawidget_perm_screenres", $lrperm["permissions"])){$call->getScreenResolution();}
82
  else{ Common\ErrorHandler::FatalError(__('You do not have permission to access this tab!', 'lara-google-analytics'));}
83
  break;
 
 
 
 
84
  default:
85
  exit;
86
  }
19
  if (isset($lrdata['action']) && !empty($lrperm)){
20
 
21
  require("callURL.class.php");
22
+ require_once("storage.class.php");
23
  require("GoogleAnalyticsAPI.class.php");
24
  require("lrgawidget.class.php");
25
 
46
  else{ Common\ErrorHandler::FatalError(__('You do not have permission to access this tab!', 'lara-google-analytics'));}
47
  break;
48
  case "setProfileID":
49
+ if (in_array("lrgawidget_perm_admin", $lrperm["permissions"])){ $call->setProfileID($lrdata['account_id'],$lrdata['property_id'],$lrdata['profile_id'], $lrdata['profile_timezone'], @$lrdata['enable_universal_tracking'], @$lrdata['enable_ecommerce_graph']);}
50
  else{ Common\ErrorHandler::FatalError(__('You do not have permission to access this tab!', 'lara-google-analytics'));}
51
  break;
52
  case "settingsReset":
81
  if (in_array("lrgawidget_perm_screenres", $lrperm["permissions"])){$call->getScreenResolution();}
82
  else{ Common\ErrorHandler::FatalError(__('You do not have permission to access this tab!', 'lara-google-analytics'));}
83
  break;
84
+ case "getGraphData":
85
+ if (in_array("lrgawidget_perm_graph_options", $lrperm["permissions"])){$call->getGraphData();}
86
+ else{ Common\ErrorHandler::FatalError(__('You do not have permission to access this tab!', 'lara-google-analytics'));}
87
+ break;
88
  default:
89
  exit;
90
  }
core/lrgawidget.permissions.php CHANGED
@@ -25,30 +25,44 @@ class permissions{
25
 
26
  function __construct(){
27
  $this->laraStockPermissions = array(
28
- array( "id" => "permissions",
29
- "name" => __('Permissions', 'lara-google-analytics'),
30
- "icon" => "fa-key",
 
 
31
  "permissions" => array(array("name" => "lrgawidget_perm_perm", "label" => __('Super Administrator [Change Permissions]', 'lara-google-analytics')),
32
  array("name" => "lrgawidget_perm_admin", "label" => __('Administrator [Change Settings]', 'lara-google-analytics'))
33
  )
34
  ),
35
- array( "id" => "tabs",
36
- "name" => __('Tabs', 'lara-google-analytics'),
37
- "icon" => "fa-bar-chart",
38
- "permissions" => array(array("name" => "lrgawidget_perm_daterange","label" => __('Change Date Range', 'lara-google-analytics')),
39
- array("name" => "lrgawidget_perm_sessions", "label" => __('Sessions', 'lara-google-analytics')),
40
- array("name" => "lrgawidget_perm_realtime", "label" => __('Real Time', 'lara-google-analytics')),
41
- array("name" => "lrgawidget_perm_countries","label" => __('Countries', 'lara-google-analytics')),
42
- array("name" => "lrgawidget_perm_browsers", "label" => __('Browsers', 'lara-google-analytics')),
43
- array("name" => "lrgawidget_perm_languages","label" => __('Languages', 'lara-google-analytics')),
44
- array("name" => "lrgawidget_perm_os", "label" => __('Operating Systems', 'lara-google-analytics')),
45
- array("name" => "lrgawidget_perm_devices", "label" => __('Devices', 'lara-google-analytics')),
46
- array("name" => "lrgawidget_perm_screenres","label" => __('Screen Resolutions', 'lara-google-analytics')),
47
- array("name" => "lrgawidget_perm_keywords", "label" => __('Keywords', 'lara-google-analytics')),
48
- array("name" => "lrgawidget_perm_sources", "label" => __('Sources', 'lara-google-analytics')),
49
- array("name" => "lrgawidget_perm_pages", "label" => __('Pages', 'lara-google-analytics'))
 
 
 
50
  )
51
- )
 
 
 
 
 
 
 
 
 
52
  );
53
 
54
  $this->userRoles = array("administrator");
25
 
26
  function __construct(){
27
  $this->laraStockPermissions = array(
28
+ array( "id" => "permissions",
29
+ "name" => __('Permissions', 'lara-google-analytics'),
30
+ "icon" => "fa-key",
31
+ "type" => "checkbox",
32
+ "default" => "",
33
  "permissions" => array(array("name" => "lrgawidget_perm_perm", "label" => __('Super Administrator [Change Permissions]', 'lara-google-analytics')),
34
  array("name" => "lrgawidget_perm_admin", "label" => __('Administrator [Change Settings]', 'lara-google-analytics'))
35
  )
36
  ),
37
+ array( "id" => "tabs",
38
+ "name" => __('Tabs', 'lara-google-analytics'),
39
+ "icon" => "fa-bar-chart",
40
+ "type" => "checkbox",
41
+ "default" => "",
42
+ "permissions" => array(array("name" => "lrgawidget_perm_daterange", "label" => __('Change Date Range', 'lara-google-analytics')),
43
+ array("name" => "lrgawidget_perm_graph_options","label" => __('Edit Graph Options', 'lara-google-analytics')),
44
+ array("name" => "lrgawidget_perm_sessions", "label" => __('Sessions', 'lara-google-analytics')),
45
+ array("name" => "lrgawidget_perm_realtime", "label" => __('Real Time', 'lara-google-analytics')),
46
+ array("name" => "lrgawidget_perm_countries", "label" => __('Countries', 'lara-google-analytics')),
47
+ array("name" => "lrgawidget_perm_browsers", "label" => __('Browsers', 'lara-google-analytics')),
48
+ array("name" => "lrgawidget_perm_languages", "label" => __('Languages', 'lara-google-analytics')),
49
+ array("name" => "lrgawidget_perm_os", "label" => __('Operating Systems', 'lara-google-analytics')),
50
+ array("name" => "lrgawidget_perm_devices", "label" => __('Devices', 'lara-google-analytics')),
51
+ array("name" => "lrgawidget_perm_screenres", "label" => __('Screen Resolutions', 'lara-google-analytics')),
52
+ array("name" => "lrgawidget_perm_keywords", "label" => __('Keywords', 'lara-google-analytics')),
53
+ array("name" => "lrgawidget_perm_sources", "label" => __('Sources', 'lara-google-analytics')),
54
+ array("name" => "lrgawidget_perm_pages", "label" => __('Pages', 'lara-google-analytics'))
55
  )
56
+ ),
57
+ array( "id" => "ecommerce",
58
+ "name" => __('eCommerce Graphs', 'lara-google-analytics'),
59
+ "icon" => "fa-usd",
60
+ "type" => "radio",
61
+ "default" => "lrgawidget_perm_ecom_woo",
62
+ "permissions" => array(array("name" => "lrgawidget_perm_ecom_woo", "label" => __('WooCommerce', 'lara-google-analytics')." [".__('beta', 'lara-google-analytics')."]"),
63
+ array("name" => "lrgawidget_perm_ecom_edd", "label" => __('Easy Digital Downloads', 'lara-google-analytics')." [".__('comming soon', 'lara-google-analytics')."]")
64
+ )
65
+ ),
66
  );
67
 
68
  $this->userRoles = array("administrator");
core/plugins/lrga_earnings_sales.php ADDED
@@ -0,0 +1,230 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Lara\Widgets\GoogleAnalytics;
4
+ use Lara\Utils\Common as Common;
5
+
6
+ /**
7
+ * @package Google Analytics by Lara
8
+ * @author Amr M. Ibrahim <mailamr@gmail.com>
9
+ * @link https://www.xtraorbit.com/
10
+ * @copyright Copyright (c) XtraOrbit Web development SRL 2016 - 2020
11
+ */
12
+
13
+ if (!defined("ABSPATH"))
14
+ die("This file cannot be accessed directly");
15
+
16
+ class lrga_earnings_sales{
17
+
18
+ protected $pluginId;
19
+ protected $graphData = array();
20
+ protected $currentFilter;
21
+ protected $graphItemsIds = array();
22
+ protected $rawData;
23
+ protected $storeCurrencyPrefix = "";
24
+ protected $storeCurrencySuffix = "";
25
+ protected $graphLabel;
26
+ protected $salesLabel;
27
+ protected $earningsLabel;
28
+ protected $defaultSettings;
29
+ protected $defaultFilterID;
30
+ protected $defaultFilters;
31
+ protected $swatches;
32
+ protected $defaultColor;
33
+ protected $startDate;
34
+ protected $endDate;
35
+ protected $periodArray = array();
36
+ protected $filtersData = array();
37
+ private $sales;
38
+ private $earnings;
39
+
40
+ public function __construct($startDate, $endDate){
41
+ $this->rawData = array();
42
+ $this->startDate = new \DateTime($startDate);
43
+ $this->endDate = new \DateTime($endDate);
44
+ $this->swatches = array("#D32F2F", "#C2185B", "#7B1FA2", "#512DA8", "#303F9F", "#1976D2", "#0288D1", "#0097A7", "#00796B", "#388E3C", "#689F38", "#F57C00", "#E64A19", "#5D4037");
45
+ $this->defaultColor = "#E0E0E0";
46
+
47
+ $this->defaultFilterID = "all";
48
+ $this->defaultFilters = array("all" => array( "orders" => array("on","#F8B195")));
49
+
50
+ $this->defaultSettings = array("showempty" => array( "id" => "showempty",
51
+ "name" => __('Empty Series', 'lara-google-analytics'),
52
+ "default" => "off",
53
+ "options" => array('on' => __('Show', 'lara-google-analytics'),
54
+ 'off' => __('Hide', 'lara-google-analytics'))
55
+ ),
56
+ "showtotal" => array( "id" => "showtotal",
57
+ "name" => __('Totals', 'lara-google-analytics'),
58
+ "default" => "on",
59
+ "options" => array('on' => __('Show', 'lara-google-analytics'),
60
+ 'off' => __('Hide', 'lara-google-analytics'))
61
+ ),
62
+ );
63
+ }
64
+
65
+ protected function getSales(){
66
+ if ((!is_array($this->rawData['sales'])) || (empty($this->rawData['sales']))) {
67
+ $this->rawData['sales'] = $this->generateEmptyPeriodArray();
68
+ }
69
+ $this->sales = $this->prepareSeriesData($this->rawData['sales']);
70
+
71
+ }
72
+
73
+ protected function getEarnings(){
74
+ if ((!is_array($this->rawData['earnings'])) || (empty($this->rawData['earnings']))) {
75
+ $this->rawData['earnings'] = $this->generateEmptyPeriodArray();
76
+ }
77
+ $this->earnings = $this->prepareSeriesData($this->rawData['earnings']);
78
+ }
79
+
80
+ private function getMaxAxisValue($arr){
81
+ $maxAxisValue = max($arr) * 1.5;
82
+ return $maxAxisValue;
83
+ }
84
+
85
+ private function getTotals($arr){
86
+ $totals = array_sum($arr);
87
+ return $totals;
88
+ }
89
+
90
+ private function prepareSeriesData($arr){
91
+ $preparedArray = array("config" => array("maxAxisValue" => 0,
92
+ "Total" => 0));
93
+
94
+ foreach ($arr as $series){
95
+ if (is_array($series) && !empty($series)){
96
+ $finalArray = array();
97
+ $finalArrayValues = array();
98
+
99
+ foreach ($series["data"] as $id => $value){
100
+ $finalArray[] = array($id, $value);
101
+ $finalArrayValues[] = $value;
102
+ }
103
+
104
+ @array_walk($finalArray, array($this, 'convertDate'));
105
+ $maxAxisValue = $this->getMaxAxisValue($finalArrayValues);
106
+ $total = $this->getTotals($finalArrayValues);
107
+ $preparedArray['series'][] = array("data" => $finalArray,
108
+ "id" => $series["id"],
109
+ "label" => $series["label"],
110
+ "color" => $series["color"],
111
+ "total" => $total);
112
+ $preparedArray['config']['maxAxisValue'] = $preparedArray['config']['maxAxisValue'] + $maxAxisValue;
113
+ $preparedArray['config']['Total'] = $preparedArray['config']['Total'] + $total;
114
+ }
115
+ }
116
+
117
+ return $preparedArray;
118
+ }
119
+
120
+ private function convertDate(&$item){
121
+ $item[0] = strtotime($item[0]." UTC") * 1000;
122
+ }
123
+
124
+ protected function generateEmptyPeriodArray(){
125
+ $period = new \DatePeriod($this->startDate, new \DateInterval('P1D'), $this->endDate->modify( '+1 day' ));
126
+ $periods = iterator_to_array($period);
127
+ foreach($periods as $date) {
128
+ $array[$date->format('Y-m-d')] = 0;
129
+ }
130
+ return $array;
131
+ }
132
+
133
+ protected function buildTree(&$items) {
134
+ $map = array(0 => array('children' => array()));
135
+
136
+ foreach ($items as &$item) {
137
+ $map[$item['id']] = &$item;
138
+ }
139
+
140
+ foreach ($items as &$item) {
141
+ $map[$item['parent']]['children'][$item['id']] = &$item;
142
+ }
143
+
144
+ return $map[0]['children'];
145
+ }
146
+
147
+ protected function getColor($type, $id){
148
+ if (!empty($this->graphData["filters"][$type][$id][1])){
149
+ $color = $this->graphData["filters"][$type][$id][1];
150
+ }else {$color = $this->defaultColor;}
151
+ return $color;
152
+ }
153
+
154
+ protected function getState($type, $id){
155
+ $state = "off";
156
+ if (!empty($this->graphData["filters"][$type][$id][0])){
157
+ $state = $this->graphData["filters"][$type][$id][0];
158
+ }
159
+ return $state;
160
+ }
161
+
162
+ protected function initializeGraphData(){
163
+ $this->graphData["currentfilter"] = $this->defaultFilterID;
164
+ $this->graphData["filters"] = $this->defaultFilters;
165
+
166
+ $settings = $this->getPluginSettings();
167
+ foreach ($settings as $setting){
168
+ $this->graphData["settings"][$setting["id"]] = $setting["default"];
169
+ }
170
+ $this->currentFilter = $this->graphData["currentfilter"];
171
+ }
172
+
173
+ public function getGraphData(){
174
+ $graphData = array();
175
+ $pluginSettings = $this->getPluginSettings();
176
+ $pluginFilters = $this->getPluginFilters();
177
+ $this->getFiltersData();
178
+
179
+ $settings = array();
180
+ foreach ($pluginSettings as $setting){
181
+ $setting["value"] = $this->graphData["settings"][$setting['id']];
182
+ $settings[$setting['id']] = $setting;
183
+ }
184
+
185
+ $filters = array();
186
+ foreach ($pluginFilters as $filter){
187
+ $filter["data"] = array();
188
+ if (!empty($this->filtersData[$filter['id']])){
189
+ $filter["data"] = $this->filtersData[$filter['id']];
190
+ }
191
+ $filters[$filter['id']] = $filter;
192
+ }
193
+
194
+ $graphData["defaultcolor"] = $this->defaultColor;
195
+ $graphData["swatches"] = $this->swatches;
196
+ $graphData["currentfilter"] = $this->currentFilter;
197
+ $graphData["settings"] = $settings;
198
+ $graphData["filters"] = $filters;
199
+
200
+ return $graphData;
201
+ }
202
+
203
+
204
+ public function getGraphOutput(){
205
+
206
+ $this->getRawSeriesData();
207
+ $this->getSales();
208
+ $this->getEarnings();
209
+
210
+ $sales = array("config" => array("label" => $this->salesLabel,
211
+ "lrbefore"=>"",
212
+ "lrafter"=>"",
213
+ "lrformat"=>"",
214
+ "maxv"=> $this->sales['config']['maxAxisValue'],
215
+ "total"=>$this->sales['config']['Total']),
216
+ "series" => $this->sales["series"]);
217
+
218
+ $earnings = array("config" => array("label" => $this->earningsLabel,
219
+ "lrbefore"=>$this->storeCurrencyPrefix,
220
+ "lrafter"=>$this->storeCurrencySuffix,
221
+ "lrformat"=>"",
222
+ "maxv"=> $this->earnings['config']['maxAxisValue'],
223
+ "total"=>$this->earnings['config']['Total']),
224
+ "series" => $this->earnings["series"]);
225
+
226
+ $this->graphData["settings"]['graphlabel'] = $this->graphLabel;
227
+ return array($sales,$earnings,$this->graphData["settings"]);
228
+ }
229
+ }
230
+ ?>
core/plugins/lrga_wp_woo_plugin.php ADDED
@@ -0,0 +1,273 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace Lara\Widgets\GoogleAnalytics;
4
+ use Lara\Utils\Common as Common;
5
+
6
+ /**
7
+ * @package Google Analytics by Lara
8
+ * @author Amr M. Ibrahim <mailamr@gmail.com>
9
+ * @link https://www.xtraorbit.com/
10
+ * @copyright Copyright (c) XtraOrbit Web development SRL 2016 - 2020
11
+ */
12
+
13
+ require_once("lrga_earnings_sales.php");
14
+
15
+ if (!defined("ABSPATH"))
16
+ die("This file cannot be accessed directly");
17
+
18
+ class lrga_wp_woo_plugin extends lrga_earnings_sales{
19
+
20
+ private $rawSales;
21
+ private $rawEarnings;
22
+
23
+
24
+ public function __construct($startDate, $endDate){
25
+ parent::__construct($startDate, $endDate);
26
+ $this->pluginId = "woocommerce";
27
+ $this->graphLabel = __('WooCommerce', 'lara-google-analytics');
28
+ $this->salesLabel = __('Orders', 'lara-google-analytics');
29
+ $this->earningsLabel = __('Income', 'lara-google-analytics');
30
+ $this->getStoreCurrency();
31
+ $this->initializeGraphData();
32
+ }
33
+
34
+ protected function getStoreCurrency(){
35
+ $this->storeCurrencyPrefix = get_woocommerce_currency_symbol();
36
+ $this->storeCurrencySuffix = "";
37
+ }
38
+
39
+ protected function getPluginSettings(){
40
+ $settings = array("status" => array("id" => "status",
41
+ "name" => __('Order Status', 'lara-google-analytics'),
42
+ "default" => "completed",
43
+ "options" => array('pending' => __('Pending', 'lara-google-analytics'),
44
+ 'processing' => __('Processing', 'lara-google-analytics'),
45
+ 'on-hold' => __('On Hold', 'lara-google-analytics'),
46
+ 'completed' => __('Completed', 'lara-google-analytics'),
47
+ 'refunded' => __('Refunded', 'lara-google-analytics'),
48
+ 'failed' => __('Failed', 'lara-google-analytics'),
49
+ 'cancelled' => __('Cancelled', 'lara-google-analytics'))
50
+ ),
51
+ "date" => array("id" => "date",
52
+ "name" => __('Order Date', 'lara-google-analytics'),
53
+ "default" => "date_paid",
54
+ "options" => array('date_created' => __('Created', 'lara-google-analytics'),
55
+ 'date_modified' => __('Modified', 'lara-google-analytics'),
56
+ 'date_completed' => __('Completed', 'lara-google-analytics'),
57
+ 'date_paid' => __('Paid', 'lara-google-analytics'))
58
+ ),
59
+ );
60
+ $results = array_merge($settings, $this->defaultSettings);
61
+ return $results;
62
+ }
63
+
64
+ protected function getPluginFilters(){
65
+ $filters = array("all" => array( "id" => "all",
66
+ "name" => __('All Orders', 'lara-google-analytics')
67
+ ),
68
+ "categories" => array( "id" => "categories",
69
+ "name" => __('Categories', 'lara-google-analytics')
70
+ ),
71
+ "products" => array( "id" => "products",
72
+ "datasource" => "categories",
73
+ "name" => __('Products', 'lara-google-analytics')
74
+ ),
75
+ "types" => array( "id" => "types",
76
+ "name" => __('Types', 'lara-google-analytics')
77
+ ),
78
+ );
79
+
80
+ return $filters;
81
+ }
82
+
83
+ private function getAllItems($ids = array(), $setFilterData = false){
84
+ $results = array();
85
+ $type = "all";
86
+
87
+ $id = "orders";
88
+ $name = __('All Orders', 'lara-google-analytics');
89
+ $state = $this->getState($type, $id);
90
+ $color = $this->getColor($type, $id);
91
+
92
+ $results['orders'] = array("id" => $id,
93
+ "name" => $name,
94
+ "state" => $state,
95
+ "color" => $color);
96
+
97
+ if($setFilterData === true){
98
+ $this->filtersData['all'] = $results;
99
+ }
100
+
101
+ return $results;
102
+ }
103
+
104
+ private function getProducts($ids = array(), $setFilterData = false){
105
+ $query = new \WC_Product_Query( array(
106
+ 'include' => $ids,
107
+ 'limit' => -1,
108
+ 'orderby' => 'ID',
109
+ 'order' => 'ASC',
110
+ 'return' => 'objects',
111
+ ) );
112
+
113
+ $products = $query->get_products();
114
+
115
+ $results = array();
116
+ $type = "products";
117
+
118
+ foreach ($products as $product){
119
+ $id = $product->get_id();
120
+ $name = $product->get_name();
121
+ $state = $this->getState($type, $id);
122
+ $color = $this->getColor($type, $id);
123
+ $categories = (!empty($product->get_category_ids()) ? $product->get_category_ids() : array(0));
124
+
125
+ $results[$id] = array("id" => $id,
126
+ "name" => $name,
127
+ "state" => $state,
128
+ "color" => $color,
129
+ "type" => $type,
130
+ "categories" => $categories);
131
+
132
+ if($setFilterData === true){
133
+ foreach ($categories as $category){
134
+ $this->filtersData['products'][$category][$id] = $results[$id];
135
+ }
136
+ }
137
+ }
138
+
139
+ if($setFilterData === true){
140
+ ksort($this->filtersData['products']);
141
+ }
142
+
143
+ return $results;
144
+ }
145
+
146
+ private function getCategories($ids = array(), $setFilterData = false){
147
+ $args = array(
148
+ 'include' => $ids,
149
+ 'taxonomy' => 'product_cat',
150
+ 'orderby' => 'term_id',
151
+ 'hide_empty' => true,
152
+ 'hierarchical' => true,
153
+ 'limit' => -1,
154
+ );
155
+
156
+ $categories = get_terms($args);
157
+
158
+ $results = array();
159
+ $type = "categories";
160
+
161
+ foreach($categories as $category){
162
+ $id = $category->term_id;
163
+ $name = $category->name;
164
+ $state = $this->getState($type, $id);
165
+ $color = $this->getColor($type, $id);
166
+ $parent = $category->parent;
167
+
168
+ $results[$id] = array("id" => $id,
169
+ "name" => $name,
170
+ "state" => $state,
171
+ "color" => $color,
172
+ "type" => $type,
173
+ "parent" => $parent);
174
+
175
+ if($setFilterData === true){
176
+ if (!empty($this->filtersData['products'][$id])){
177
+ $results[$id]["products"] = $this->filtersData['products'][$id];
178
+ }
179
+ }
180
+ }
181
+
182
+ if($setFilterData === true){
183
+ $this->filtersData['categories'] = $this->buildTree($results);
184
+ }
185
+
186
+ return $results;
187
+ }
188
+
189
+
190
+ private function getProductTypes($ids = array(), $setFilterData = false){
191
+ $productTypes = wc_get_product_types();
192
+
193
+ $results = array();
194
+ $type = "types";
195
+
196
+ foreach($productTypes as $id => $name){
197
+ if (!empty($ids) && !in_array($id, $ids)){
198
+ continue;
199
+ }else{
200
+ $state = $this->getState($type, $id);
201
+ $color = $this->getColor($type, $id);
202
+
203
+ $results[$id] = array("id" => $id,
204
+ "name" => $name,
205
+ "state" => $state,
206
+ "color" => $color,
207
+ "type" => $type);
208
+ }
209
+ }
210
+
211
+ if($setFilterData === true){
212
+ $this->filtersData['types'] = $results;
213
+ }
214
+ return $results;
215
+ }
216
+
217
+ private function getOrders(){
218
+ $args = array( 'date_paid' => ''.$this->startDate->format('Y-m-d').'...'.$this->endDate->format('Y-m-d').'',
219
+ 'status' => 'completed'
220
+ );
221
+ return wc_get_orders($args);
222
+ }
223
+
224
+
225
+ protected function getFiltersData(){
226
+ $this->getAllItems(array(), true);
227
+ $this->getProducts(array(), true);
228
+ $this->getCategories(array(), true);
229
+ $this->getProductTypes(array(), true);
230
+ unset($this->filtersData['products']);
231
+ }
232
+
233
+
234
+
235
+ private function initializeGraphSeriesArray($items){
236
+ foreach($items as $item){
237
+ $this->rawSales["series_".$item['id']] = array("id" =>$this->currentFilter."_".$item['id'], "label" => $item['name'], "color" => $item['color'], "data" => $this->periodArray);
238
+ $this->rawEarnings["series_".$item['id']] = array("id" =>$this->currentFilter."_".$item['id'], "label" => $item['name'], "color" => $item['color'], "data" => $this->periodArray);
239
+ }
240
+ }
241
+
242
+ private function setGraphSeriesArray(){
243
+ $items = $this->getAllItems();
244
+ $this->initializeGraphSeriesArray($items);
245
+ }
246
+
247
+ private function setRawData($type, $id, $date, $quantity, $total){
248
+ if ((!empty($this->graphData["filters"][$type][$id][0])) && ($this->graphData["filters"][$type][$id][0] === "on") ){
249
+ $this->rawSales["series_".$id]['data'][$date] = $this->rawSales["series_".$id]['data'][$date] + $quantity;
250
+ $this->rawEarnings["series_".$id]['data'][$date] = $this->rawEarnings["series_".$id]['data'][$date] + $total;
251
+ }
252
+ }
253
+
254
+ protected function getRawSeriesData(){
255
+
256
+ $this->periodArray = $this->generateEmptyPeriodArray();
257
+ $this->setGraphSeriesArray();
258
+
259
+ $orders = $this->getOrders();
260
+
261
+ foreach ($orders as $order){
262
+ $order_id = $order->get_id();
263
+ $order_total = $order->get_total();
264
+ $cDate = new \DateTime($order->get_date_paid());
265
+ $cDate = $cDate->format('Y-m-d');
266
+ $this->setRawData("all", "orders", $cDate, 1, $order_total);
267
+ }
268
+
269
+ $this->rawData['sales'] = $this->rawSales;
270
+ $this->rawData['earnings'] = $this->rawEarnings;
271
+ }
272
+ }
273
+ ?>
core/wp.helper.functions.php CHANGED
@@ -41,9 +41,8 @@ class WPHelperFunctions {
41
 
42
  $version = get_network_option(1,lrgawidget_plugin_prefiex.'version', '1.0');
43
  if (version_compare($version, lrgawidget_plugin_version, '<')){
 
44
  if (version_compare($version, '3.0.0', '<')){
45
- global $wpdb;
46
-
47
  $old_settings = array();
48
  $results = $wpdb->get_results ( "SELECT `name`, `value` FROM `".lrgawidget_plugin_table."`", ARRAY_A );
49
  if (!empty($results)){
@@ -73,7 +72,18 @@ class WPHelperFunctions {
73
  }
74
  delete_option('lrgawidget_property_id');
75
  }
76
-
 
 
 
 
 
 
 
 
 
 
 
77
  if (!is_multisite()){
78
  update_option(lrgawidget_plugin_prefiex.'version', lrgawidget_plugin_version, 'yes' );
79
  }else{
@@ -122,6 +132,10 @@ class WPHelperFunctions {
122
  return (bool) preg_match('/^ua-\d{4,20}(-\d{1,10})?$/i', $str);
123
  }
124
 
 
 
 
 
125
  public static function get_ga_code(){
126
  $enable_universal_tracking = self::get_blog_option('enable_universal_tracking');
127
  if ($enable_universal_tracking === "on"){
@@ -142,5 +156,4 @@ class WPHelperFunctions {
142
  }
143
  }
144
  add_action('init', 'Lara\Utils\Common\WPHelperFunctions::initInstance');
145
-
146
  ?>
41
 
42
  $version = get_network_option(1,lrgawidget_plugin_prefiex.'version', '1.0');
43
  if (version_compare($version, lrgawidget_plugin_version, '<')){
44
+ global $wpdb;
45
  if (version_compare($version, '3.0.0', '<')){
 
 
46
  $old_settings = array();
47
  $results = $wpdb->get_results ( "SELECT `name`, `value` FROM `".lrgawidget_plugin_table."`", ARRAY_A );
48
  if (!empty($results)){
72
  }
73
  delete_option('lrgawidget_property_id');
74
  }
75
+ if (version_compare($version, '3.2.0', '<')){
76
+ $results = $wpdb->get_results ( "SELECT `name`, `value` FROM `".lrgawidget_plugin_table."`", ARRAY_A );
77
+ $settings = array();
78
+ if (!empty($results)){
79
+ foreach ($results as $setting) {
80
+ $settings[$setting['name']] = $setting['value'];
81
+ }
82
+ }
83
+ if (empty($settings["enable_ecommerce_graph"])){
84
+ $wpdb->insert( lrgawidget_plugin_table, array( 'name' => 'enable_ecommerce_graph', 'value' => 'on'));
85
+ }
86
+ }
87
  if (!is_multisite()){
88
  update_option(lrgawidget_plugin_prefiex.'version', lrgawidget_plugin_version, 'yes' );
89
  }else{
132
  return (bool) preg_match('/^ua-\d{4,20}(-\d{1,10})?$/i', $str);
133
  }
134
 
135
+ public static function sanitizer(&$value) {
136
+ $value = htmlspecialchars($value, ENT_QUOTES, 'UTF-8');
137
+ }
138
+
139
  public static function get_ga_code(){
140
  $enable_universal_tracking = self::get_blog_option('enable_universal_tracking');
141
  if ($enable_universal_tracking === "on"){
156
  }
157
  }
158
  add_action('init', 'Lara\Utils\Common\WPHelperFunctions::initInstance');
 
159
  ?>
core/wp.review.notice.php CHANGED
@@ -42,7 +42,7 @@ class WPReviewNotice {
42
  self::$difference_in_days = (int)self::$install_date->diff(self::$current_date)->format("%r%a");
43
 
44
  if (isset(self::$difference_in_days) && self::$difference_in_days >= 7) {
45
- add_action('admin_notices','Lara\Utils\Common\WPReviewNotice::review_notice');
46
  }
47
 
48
  }else{
42
  self::$difference_in_days = (int)self::$install_date->diff(self::$current_date)->format("%r%a");
43
 
44
  if (isset(self::$difference_in_days) && self::$difference_in_days >= 7) {
45
+ add_action('in_admin_header','Lara\Utils\Common\WPReviewNotice::review_notice');
46
  }
47
 
48
  }else{
dist/css/lrgalite-main.css CHANGED
@@ -6984,6 +6984,325 @@ div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:fir
6984
  div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:last-child {
6985
  padding-right: 0;
6986
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6987
 
6988
  .lrgawidget {
6989
  font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
@@ -8755,54 +9074,14 @@ div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:las
8755
 
8756
  #lrgawidget_sessions_tab #lrga-legendholder{
8757
  position: absolute;
8758
- top: 10px;
8759
- right: 17px;
8760
  background-color: rgba(248, 248, 248, 0.64);
8761
  opacity: 0.85;
8762
  padding: 8px;
8763
  border: solid 1px #f4f4f4;
8764
  }
8765
 
8766
- #lrghop_button {
8767
- margin-right: 10px;
8768
- background-color: #f5f5f5;
8769
- position: static;
8770
- }
8771
-
8772
- #lrghop_menu {
8773
- left: auto;
8774
- right:23px;
8775
- min-width:650px;
8776
- padding: 15px;
8777
- }
8778
-
8779
- #lrghop_settings {
8780
- background-color: #fbfbfb;
8781
- padding: 5px;
8782
- margin-bottom: 10px;
8783
- }
8784
-
8785
- #lrghop_settings .row{
8786
- margin-bottom: 8px;
8787
- }
8788
-
8789
- #lrghop_groups i{
8790
- margin-right:5px;
8791
- }
8792
-
8793
- #lrghop_groupitems{
8794
- margin: 1px;
8795
- background-color: #f5f5f566;
8796
- padding: 5px;
8797
- }
8798
-
8799
- #lrghop_groupitems .lrghop_groupitems_header{
8800
- background-color: #1F4A70;
8801
- color: #fff;
8802
- padding-left: 5px;
8803
- }
8804
-
8805
-
8806
  #lrgawidget_realtime_activenow {
8807
  text-align: center;
8808
  padding :5px
@@ -8960,10 +9239,6 @@ div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:las
8960
  content:'ON';
8961
  }
8962
 
8963
- .lrga_bs {
8964
- /* direction: ltr; */
8965
- }
8966
-
8967
  .lrga_bs select {
8968
  max-width: initial !important;
8969
  -webkit-appearance: menulist !important;
@@ -8975,23 +9250,142 @@ div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:las
8975
  color: initial !important;
8976
  }
8977
 
8978
- /* RTL Testing; */
8979
- /*
8980
- [dir="rtl"] .lrga_bs .nav-tabs > li {
8981
- float: right;
8982
- margin-bottom: -1px;
 
 
 
 
 
 
 
 
 
 
 
8983
  }
8984
 
8985
- [dir="rtl"] .lrgawidget .box-header > .box-tools {
8986
- float: left !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8987
  position: static;
8988
  }
8989
 
8990
- [dir="rtl"] .lrga_bs .table th {
8991
- text-align: right !important;
 
 
 
 
8992
  }
8993
 
8994
- [dir="rtl"] .lrga_bs .col-md-6 {
8995
- float: right;
 
 
8996
  }
8997
- */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6984
  div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:last-child {
6985
  padding-right: 0;
6986
  }
6987
+ .minicolors {
6988
+ position: relative;
6989
+ }
6990
+
6991
+ .minicolors-sprite {
6992
+ background-image: url(../plugins/minicolors/jquery.minicolors.png);
6993
+ }
6994
+
6995
+ .minicolors-swatch {
6996
+ position: absolute;
6997
+ vertical-align: middle;
6998
+ background-position: -80px 0;
6999
+ border: solid 1px #ccc;
7000
+ cursor: text;
7001
+ padding: 0;
7002
+ margin: 0;
7003
+ display: inline-block;
7004
+ }
7005
+
7006
+ .minicolors-swatch-color {
7007
+ position: absolute;
7008
+ top: 0;
7009
+ left: 0;
7010
+ right: 0;
7011
+ bottom: 0;
7012
+ }
7013
+
7014
+ .minicolors input[type=hidden] + .minicolors-swatch {
7015
+ width: 28px;
7016
+ position: static;
7017
+ cursor: pointer;
7018
+ }
7019
+
7020
+ .minicolors input[type=hidden][disabled] + .minicolors-swatch {
7021
+ cursor: default;
7022
+ }
7023
+
7024
+ /* Panel */
7025
+ .minicolors-panel {
7026
+ position: absolute;
7027
+ width: 173px;
7028
+ background: white;
7029
+ border: solid 1px #CCC;
7030
+ box-shadow: 0 0 20px rgba(0, 0, 0, .2);
7031
+ z-index: 99999;
7032
+ box-sizing: content-box;
7033
+ display: none;
7034
+ }
7035
+
7036
+ .minicolors-panel.minicolors-visible {
7037
+ display: block;
7038
+ }
7039
+
7040
+ /* Panel positioning */
7041
+ .minicolors-position-top .minicolors-panel {
7042
+ top: -154px;
7043
+ }
7044
+
7045
+ .minicolors-position-right .minicolors-panel {
7046
+ right: 0;
7047
+ }
7048
+
7049
+ .minicolors-position-bottom .minicolors-panel {
7050
+ top: auto;
7051
+ }
7052
+
7053
+ .minicolors-position-left .minicolors-panel {
7054
+ left: 0;
7055
+ }
7056
+
7057
+ .minicolors-with-opacity .minicolors-panel {
7058
+ width: 194px;
7059
+ }
7060
+
7061
+ .minicolors .minicolors-grid {
7062
+ position: relative;
7063
+ top: 1px;
7064
+ left: 1px;
7065
+ width: 150px;
7066
+ height: 150px;
7067
+ background-position: -120px 0;
7068
+ cursor: crosshair;
7069
+ }
7070
+
7071
+ .minicolors .minicolors-grid-inner {
7072
+ position: absolute;
7073
+ top: 0;
7074
+ left: 0;
7075
+ width: 150px;
7076
+ height: 150px;
7077
+ }
7078
+
7079
+ .minicolors-slider-saturation .minicolors-grid {
7080
+ background-position: -420px 0;
7081
+ }
7082
+
7083
+ .minicolors-slider-saturation .minicolors-grid-inner {
7084
+ background-position: -270px 0;
7085
+ background-image: inherit;
7086
+ }
7087
+
7088
+ .minicolors-slider-brightness .minicolors-grid {
7089
+ background-position: -570px 0;
7090
+ }
7091
+
7092
+ .minicolors-slider-brightness .minicolors-grid-inner {
7093
+ background-color: black;
7094
+ }
7095
+
7096
+ .minicolors-slider-wheel .minicolors-grid {
7097
+ background-position: -720px 0;
7098
+ }
7099
+
7100
+ .minicolors-slider,
7101
+ .minicolors-opacity-slider {
7102
+ position: absolute;
7103
+ top: 1px;
7104
+ left: 152px;
7105
+ width: 20px;
7106
+ height: 150px;
7107
+ background-color: white;
7108
+ background-position: 0 0;
7109
+ cursor: row-resize;
7110
+ }
7111
+
7112
+ .minicolors-slider-saturation .minicolors-slider {
7113
+ background-position: -60px 0;
7114
+ }
7115
+
7116
+ .minicolors-slider-brightness .minicolors-slider {
7117
+ background-position: -20px 0;
7118
+ }
7119
+
7120
+ .minicolors-slider-wheel .minicolors-slider {
7121
+ background-position: -20px 0;
7122
+ }
7123
+
7124
+ .minicolors-opacity-slider {
7125
+ left: 173px;
7126
+ background-position: -40px 0;
7127
+ display: none;
7128
+ }
7129
+
7130
+ .minicolors-with-opacity .minicolors-opacity-slider {
7131
+ display: block;
7132
+ }
7133
+
7134
+ /* Pickers */
7135
+ .minicolors-grid .minicolors-picker {
7136
+ position: absolute;
7137
+ top: 70px;
7138
+ left: 70px;
7139
+ width: 12px;
7140
+ height: 12px;
7141
+ border: solid 1px black;
7142
+ border-radius: 10px;
7143
+ margin-top: -6px;
7144
+ margin-left: -6px;
7145
+ background: none;
7146
+ }
7147
+
7148
+ .minicolors-grid .minicolors-picker > div {
7149
+ position: absolute;
7150
+ top: 0;
7151
+ left: 0;
7152
+ width: 8px;
7153
+ height: 8px;
7154
+ border-radius: 8px;
7155
+ border: solid 2px white;
7156
+ box-sizing: content-box;
7157
+ }
7158
+
7159
+ .minicolors-picker {
7160
+ position: absolute;
7161
+ top: 0;
7162
+ left: 0;
7163
+ width: 18px;
7164
+ height: 2px;
7165
+ background: white;
7166
+ border: solid 1px black;
7167
+ margin-top: -2px;
7168
+ box-sizing: content-box;
7169
+ }
7170
+
7171
+ /* Swatches */
7172
+ .minicolors-swatches,
7173
+ .minicolors-swatches li {
7174
+ margin: 5px 0 3px 5px;
7175
+ padding: 0;
7176
+ list-style: none;
7177
+ overflow: hidden;
7178
+ }
7179
+
7180
+ .minicolors-swatches .minicolors-swatch {
7181
+ position: relative;
7182
+ float: left;
7183
+ cursor: pointer;
7184
+ margin:0 4px 0 0;
7185
+ }
7186
+
7187
+ .minicolors-with-opacity .minicolors-swatches .minicolors-swatch {
7188
+ margin-right: 7px;
7189
+ }
7190
+
7191
+ .minicolors-swatch.selected {
7192
+ border-color: #000;
7193
+ }
7194
+
7195
+ /* Inline controls */
7196
+ .minicolors-inline {
7197
+ display: inline-block;
7198
+ }
7199
+
7200
+ .minicolors-inline .minicolors-input {
7201
+ display: none !important;
7202
+ }
7203
+
7204
+ .minicolors-inline .minicolors-panel {
7205
+ position: relative;
7206
+ top: auto;
7207
+ left: auto;
7208
+ box-shadow: none;
7209
+ z-index: auto;
7210
+ display: inline-block;
7211
+ }
7212
+
7213
+ /* Default theme */
7214
+ .minicolors-theme-default .minicolors-swatch {
7215
+ top: 5px;
7216
+ left: 5px;
7217
+ width: 18px;
7218
+ height: 18px;
7219
+ }
7220
+ .minicolors-theme-default .minicolors-swatches .minicolors-swatch {
7221
+ margin-bottom: 2px;
7222
+ top: 0;
7223
+ left: 0;
7224
+ width: 18px;
7225
+ height: 18px;
7226
+ }
7227
+ .minicolors-theme-default.minicolors-position-right .minicolors-swatch {
7228
+ left: auto;
7229
+ right: 5px;
7230
+ }
7231
+ .minicolors-theme-default.minicolors {
7232
+ width: auto;
7233
+ display: inline-block;
7234
+ }
7235
+ .minicolors-theme-default .minicolors-input {
7236
+ height: 20px;
7237
+ width: auto;
7238
+ display: inline-block;
7239
+ padding-left: 26px;
7240
+ }
7241
+ .minicolors-theme-default.minicolors-position-right .minicolors-input {
7242
+ padding-right: 26px;
7243
+ padding-left: inherit;
7244
+ }
7245
+
7246
+ /* Bootstrap theme */
7247
+ .minicolors-theme-bootstrap .minicolors-swatch {
7248
+ z-index: 2;
7249
+ top: 3px;
7250
+ left: 3px;
7251
+ width: 28px;
7252
+ height: 28px;
7253
+ border-radius: 3px;
7254
+ }
7255
+ .minicolors-theme-bootstrap .minicolors-swatches .minicolors-swatch {
7256
+ margin-bottom: 2px;
7257
+ top: 0;
7258
+ left: 0;
7259
+ width: 20px;
7260
+ height: 20px;
7261
+ }
7262
+ .minicolors-theme-bootstrap .minicolors-swatch-color {
7263
+ border-radius: inherit;
7264
+ }
7265
+ .minicolors-theme-bootstrap.minicolors-position-right > .minicolors-swatch {
7266
+ left: auto;
7267
+ right: 3px;
7268
+ }
7269
+ .minicolors-theme-bootstrap .minicolors-input {
7270
+ float: none;
7271
+ padding-left: 44px;
7272
+ }
7273
+ .minicolors-theme-bootstrap.minicolors-position-right .minicolors-input {
7274
+ padding-right: 44px;
7275
+ padding-left: 12px;
7276
+ }
7277
+ .minicolors-theme-bootstrap .minicolors-input.input-lg + .minicolors-swatch {
7278
+ top: 4px;
7279
+ left: 4px;
7280
+ width: 37px;
7281
+ height: 37px;
7282
+ border-radius: 5px;
7283
+ }
7284
+ .minicolors-theme-bootstrap .minicolors-input.input-sm + .minicolors-swatch {
7285
+ width: 24px;
7286
+ height: 24px;
7287
+ }
7288
+ .minicolors-theme-bootstrap .minicolors-input.input-xs + .minicolors-swatch {
7289
+ width: 18px;
7290
+ height: 18px;
7291
+ }
7292
+ .input-group .minicolors-theme-bootstrap:not(:first-child) .minicolors-input {
7293
+ border-top-left-radius: 0;
7294
+ border-bottom-left-radius: 0;
7295
+ }
7296
+
7297
+ /* Semantic Ui theme */
7298
+ .minicolors-theme-semanticui .minicolors-swatch {
7299
+ top: 0;
7300
+ left: 0;
7301
+ padding: 18px;
7302
+ }
7303
+ .minicolors-theme-semanticui input {
7304
+ text-indent: 30px;
7305
+ }
7306
 
7307
  .lrgawidget {
7308
  font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
9074
 
9075
  #lrgawidget_sessions_tab #lrga-legendholder{
9076
  position: absolute;
9077
+ top: 8px;
9078
+ right: 15px;
9079
  background-color: rgba(248, 248, 248, 0.64);
9080
  opacity: 0.85;
9081
  padding: 8px;
9082
  border: solid 1px #f4f4f4;
9083
  }
9084
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9085
  #lrgawidget_realtime_activenow {
9086
  text-align: center;
9087
  padding :5px
9239
  content:'ON';
9240
  }
9241
 
 
 
 
 
9242
  .lrga_bs select {
9243
  max-width: initial !important;
9244
  -webkit-appearance: menulist !important;
9250
  color: initial !important;
9251
  }
9252
 
9253
+ .lrghop_colorselector_container{
9254
+ position:fixed;
9255
+ z-index:1000000;
9256
+ }
9257
+
9258
+ .lrghop_colorselector_container .minicolors-swatch,
9259
+ .lrghop_colorselector_container .minicolors-swatches li{
9260
+ margin: 5px 0px 5px 5px;
9261
+ }
9262
+
9263
+ .lrghop_colorselector_item_container label{
9264
+ font-weight: normal;
9265
+
9266
+ }
9267
+ .lrghop_colorselector_item_container label input[type='checkbox']{
9268
+ margin: 0px 5px 0px 5px ;
9269
  }
9270
 
9271
+ .lrghop_colorselector_item_container:hover{
9272
+ background-color: #f4f4f4;
9273
+ }
9274
+
9275
+ .lrghop_colorselector_item_container span:hover{
9276
+ cursor: pointer;
9277
+ }
9278
+
9279
+ .lrghop_colorselector_item {
9280
+ display: inline-block;
9281
+ width: 20px;
9282
+ height: 18px;
9283
+ border-radius: 3px;
9284
+ margin: 0px;
9285
+ vertical-align: middle;
9286
+ }
9287
+
9288
+ #lrghop_button {
9289
+ margin-right: 10px;
9290
+ background-color: #f5f5f5;
9291
  position: static;
9292
  }
9293
 
9294
+ #lrghop_menu {
9295
+ left: auto;
9296
+ right:23px;
9297
+ min-width:650px;
9298
+ padding: 15px;
9299
+ min-height: 500px;
9300
  }
9301
 
9302
+ #lrghop_settings {
9303
+ background-color: #fbfbfb;
9304
+ padding: 5px;
9305
+ margin-bottom: 10px;
9306
  }
9307
+
9308
+ #lrghop_settings .row{
9309
+ margin-bottom: 8px;
9310
+ }
9311
+
9312
+ #lrghop_settings .row:hover{
9313
+ background-color: #f4f4f4;
9314
+ }
9315
+
9316
+
9317
+ #lrghop_buttons i{
9318
+ margin-right:5px;
9319
+ }
9320
+
9321
+ #lrghop_panels{
9322
+ margin: 1px;
9323
+ background-color: #f5f5f566;
9324
+ padding: 5px;
9325
+ }
9326
+
9327
+ #lrghop_panels .lrghop_filter_header{
9328
+ background-color: #1F4A70;
9329
+ color: #fff;
9330
+ padding-left: 5px;
9331
+ }
9332
+
9333
+ #lrghop_panels .lrghop_filter_children{
9334
+ margin-left:15px;
9335
+ }
9336
+
9337
+ .lrga_bs #lrghop_settings .btn-group > .btn {
9338
+ border-radius: 0px;
9339
+ margin-top: 5px;
9340
+ }
9341
+
9342
+
9343
+ .lrgo_filterpanel_head {
9344
+ color:#fff;
9345
+ background-color:#204d74;
9346
+ border-color:#122b40;
9347
+ padding: 5px 0px 5px 10px;
9348
+ margin-bottom: 5px;
9349
+ font-weight: 600;
9350
+ }
9351
+
9352
+ .lrgo_filterpanel_body {
9353
+ margin: 5px;
9354
+ height: 420px;
9355
+ overflow: auto;
9356
+ }
9357
+
9358
+ .lrghop_filter_header{
9359
+ margin: 5px 0px 5px 0px;
9360
+ min-height: 20px;
9361
+ }
9362
+
9363
+ .lrgawidget-settings-checkbox {
9364
+ margin: 10px 0px 10px 0px !important;
9365
+ }
9366
+
9367
+ .lrgawidget-settings-checkbox label {
9368
+ margin: 0px 0px 0px 5px !important;
9369
+ font-weight: normal !important;
9370
+
9371
+ }
9372
+ .lrgawidget-settings-checkbox input {
9373
+ margin: 0px !important;
9374
+ }
9375
+
9376
+ #lrgawidget-save-settings{
9377
+ margin: 10px 0px 10px 0px !important;
9378
+ width: 200px;
9379
+ }
9380
+
9381
+ .lrgawidget-settings-pro {
9382
+ background-color: #EEF7FB;
9383
+ margin: 15px 0px 10px 0px !important;
9384
+ padding: 15px;
9385
+ }
9386
+
9387
+ .lrgawidget_graph_cached {
9388
+ float: right;
9389
+ margin-right: 5px;
9390
+ font-size: 12px;
9391
+ }
dist/css/lrgawidget.css CHANGED
@@ -1769,54 +1769,14 @@
1769
 
1770
  #lrgawidget_sessions_tab #lrga-legendholder{
1771
  position: absolute;
1772
- top: 10px;
1773
- right: 17px;
1774
  background-color: rgba(248, 248, 248, 0.64);
1775
  opacity: 0.85;
1776
  padding: 8px;
1777
  border: solid 1px #f4f4f4;
1778
  }
1779
 
1780
- #lrghop_button {
1781
- margin-right: 10px;
1782
- background-color: #f5f5f5;
1783
- position: static;
1784
- }
1785
-
1786
- #lrghop_menu {
1787
- left: auto;
1788
- right:23px;
1789
- min-width:650px;
1790
- padding: 15px;
1791
- }
1792
-
1793
- #lrghop_settings {
1794
- background-color: #fbfbfb;
1795
- padding: 5px;
1796
- margin-bottom: 10px;
1797
- }
1798
-
1799
- #lrghop_settings .row{
1800
- margin-bottom: 8px;
1801
- }
1802
-
1803
- #lrghop_groups i{
1804
- margin-right:5px;
1805
- }
1806
-
1807
- #lrghop_groupitems{
1808
- margin: 1px;
1809
- background-color: #f5f5f566;
1810
- padding: 5px;
1811
- }
1812
-
1813
- #lrghop_groupitems .lrghop_groupitems_header{
1814
- background-color: #1F4A70;
1815
- color: #fff;
1816
- padding-left: 5px;
1817
- }
1818
-
1819
-
1820
  #lrgawidget_realtime_activenow {
1821
  text-align: center;
1822
  padding :5px
@@ -1974,10 +1934,6 @@
1974
  content:'ON';
1975
  }
1976
 
1977
- .lrga_bs {
1978
- /* direction: ltr; */
1979
- }
1980
-
1981
  .lrga_bs select {
1982
  max-width: initial !important;
1983
  -webkit-appearance: menulist !important;
@@ -1989,23 +1945,142 @@
1989
  color: initial !important;
1990
  }
1991
 
1992
- /* RTL Testing; */
1993
- /*
1994
- [dir="rtl"] .lrga_bs .nav-tabs > li {
1995
- float: right;
1996
- margin-bottom: -1px;
1997
  }
1998
 
1999
- [dir="rtl"] .lrgawidget .box-header > .box-tools {
2000
- float: left !important;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2001
  position: static;
2002
  }
2003
 
2004
- [dir="rtl"] .lrga_bs .table th {
2005
- text-align: right !important;
 
 
 
 
 
 
 
 
 
 
2006
  }
2007
 
2008
- [dir="rtl"] .lrga_bs .col-md-6 {
2009
- float: right;
 
 
 
 
 
 
 
 
 
2010
  }
2011
- */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1769
 
1770
  #lrgawidget_sessions_tab #lrga-legendholder{
1771
  position: absolute;
1772
+ top: 8px;
1773
+ right: 15px;
1774
  background-color: rgba(248, 248, 248, 0.64);
1775
  opacity: 0.85;
1776
  padding: 8px;
1777
  border: solid 1px #f4f4f4;
1778
  }
1779
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1780
  #lrgawidget_realtime_activenow {
1781
  text-align: center;
1782
  padding :5px
1934
  content:'ON';
1935
  }
1936
 
 
 
 
 
1937
  .lrga_bs select {
1938
  max-width: initial !important;
1939
  -webkit-appearance: menulist !important;
1945
  color: initial !important;
1946
  }
1947
 
1948
+ .lrghop_colorselector_container{
1949
+ position:fixed;
1950
+ z-index:1000000;
 
 
1951
  }
1952
 
1953
+ .lrghop_colorselector_container .minicolors-swatch,
1954
+ .lrghop_colorselector_container .minicolors-swatches li{
1955
+ margin: 5px 0px 5px 5px;
1956
+ }
1957
+
1958
+ .lrghop_colorselector_item_container label{
1959
+ font-weight: normal;
1960
+
1961
+ }
1962
+ .lrghop_colorselector_item_container label input[type='checkbox']{
1963
+ margin: 0px 5px 0px 5px ;
1964
+ }
1965
+
1966
+ .lrghop_colorselector_item_container:hover{
1967
+ background-color: #f4f4f4;
1968
+ }
1969
+
1970
+ .lrghop_colorselector_item_container span:hover{
1971
+ cursor: pointer;
1972
+ }
1973
+
1974
+ .lrghop_colorselector_item {
1975
+ display: inline-block;
1976
+ width: 20px;
1977
+ height: 18px;
1978
+ border-radius: 3px;
1979
+ margin: 0px;
1980
+ vertical-align: middle;
1981
+ }
1982
+
1983
+ #lrghop_button {
1984
+ margin-right: 10px;
1985
+ background-color: #f5f5f5;
1986
  position: static;
1987
  }
1988
 
1989
+ #lrghop_menu {
1990
+ left: auto;
1991
+ right:23px;
1992
+ min-width:650px;
1993
+ padding: 15px;
1994
+ min-height: 500px;
1995
+ }
1996
+
1997
+ #lrghop_settings {
1998
+ background-color: #fbfbfb;
1999
+ padding: 5px;
2000
+ margin-bottom: 10px;
2001
  }
2002
 
2003
+ #lrghop_settings .row{
2004
+ margin-bottom: 8px;
2005
+ }
2006
+
2007
+ #lrghop_settings .row:hover{
2008
+ background-color: #f4f4f4;
2009
+ }
2010
+
2011
+
2012
+ #lrghop_buttons i{
2013
+ margin-right:5px;
2014
  }
2015
+
2016
+ #lrghop_panels{
2017
+ margin: 1px;
2018
+ background-color: #f5f5f566;
2019
+ padding: 5px;
2020
+ }
2021
+
2022
+ #lrghop_panels .lrghop_filter_header{
2023
+ background-color: #1F4A70;
2024
+ color: #fff;
2025
+ padding-left: 5px;
2026
+ }
2027
+
2028
+ #lrghop_panels .lrghop_filter_children{
2029
+ margin-left:15px;
2030
+ }
2031
+
2032
+ .lrga_bs #lrghop_settings .btn-group > .btn {
2033
+ border-radius: 0px;
2034
+ margin-top: 5px;
2035
+ }
2036
+
2037
+
2038
+ .lrgo_filterpanel_head {
2039
+ color:#fff;
2040
+ background-color:#204d74;
2041
+ border-color:#122b40;
2042
+ padding: 5px 0px 5px 10px;
2043
+ margin-bottom: 5px;
2044
+ font-weight: 600;
2045
+ }
2046
+
2047
+ .lrgo_filterpanel_body {
2048
+ margin: 5px;
2049
+ height: 420px;
2050
+ overflow: auto;
2051
+ }
2052
+
2053
+ .lrghop_filter_header{
2054
+ margin: 5px 0px 5px 0px;
2055
+ min-height: 20px;
2056
+ }
2057
+
2058
+ .lrgawidget-settings-checkbox {
2059
+ margin: 10px 0px 10px 0px !important;
2060
+ }
2061
+
2062
+ .lrgawidget-settings-checkbox label {
2063
+ margin: 0px 0px 0px 5px !important;
2064
+ font-weight: normal !important;
2065
+
2066
+ }
2067
+ .lrgawidget-settings-checkbox input {
2068
+ margin: 0px !important;
2069
+ }
2070
+
2071
+ #lrgawidget-save-settings{
2072
+ margin: 10px 0px 10px 0px !important;
2073
+ width: 200px;
2074
+ }
2075
+
2076
+ .lrgawidget-settings-pro {
2077
+ background-color: #EEF7FB;
2078
+ margin: 15px 0px 10px 0px !important;
2079
+ padding: 15px;
2080
+ }
2081
+
2082
+ .lrgawidget_graph_cached {
2083
+ float: right;
2084
+ margin-right: 5px;
2085
+ font-size: 12px;
2086
+ }
dist/js/lrgalite-main.js CHANGED
@@ -17,6 +17,8 @@ if (typeof Chart !== 'undefined'){
17
  if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.6",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.6",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.6",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.6",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.6",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.6",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.6",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");
18
  d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.6",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.6",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
19
 
 
 
20
 
21
  /*
22
  * Fuel UX Wizard
@@ -27,8 +29,11 @@ d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active"
27
  */
28
  !function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t(require("jquery")):t(jQuery)}(function(t){var e=t.fn.wizard,i=function(e,i){var s;this.$element=t(e),this.options=t.extend({},t.fn.wizard.defaults,i),this.options.disablePreviousStep="previous"===this.$element.attr("data-restrict")?!0:this.options.disablePreviousStep,this.currentStep=this.options.selectedItem.step,this.numSteps=this.$element.find(".steps li").length,this.$prevBtn=this.$element.find("button.btn-prev"),this.$nextBtn=this.$element.find("button.btn-next"),0===this.$element.children(".steps-container").length&&(this.$element.addClass("no-steps-container"),window&&window.console&&window.console.warn&&window.console.warn('please update your wizard markup to include ".steps-container" as seen in http://getfuelux.com/javascript.html#wizard-usage-markup')),s=this.$nextBtn.children().detach(),this.nextText=t.trim(this.$nextBtn.text()),this.$nextBtn.append(s),this.$prevBtn.on("click.fu.wizard",t.proxy(this.previous,this)),this.$nextBtn.on("click.fu.wizard",t.proxy(this.next,this)),this.$element.on("click.fu.wizard","li.complete",t.proxy(this.stepclicked,this)),this.selectedItem(this.options.selectedItem),this.options.disablePreviousStep&&(this.$prevBtn.attr("disabled",!0),this.$element.find(".steps").addClass("previous-disabled"))};i.prototype={constructor:i,destroy:function(){return this.$element.remove(),this.$element[0].outerHTML},addSteps:function(e){var i,s,n,a,r,d,l=[].slice.call(arguments).slice(1),p=this.$element.find(".steps"),h=this.$element.find(".step-content");for(e=-1===e||e>this.numSteps+1?this.numSteps+1:e,l[0]instanceof Array&&(l=l[0]),r=p.find("li:nth-child("+e+")"),a=h.find(".step-pane:nth-child("+e+")"),r.length<1&&(r=null),i=0,s=l.length;s>i;i++)d=t('<li data-step="'+e+'"><span class="badge badge-info"></span></li>'),d.append(l[i].label||"").append('<span class="chevron"></span>'),d.find(".badge").append(l[i].badge||e),n=t('<div class="step-pane" data-step="'+e+'"></div>'),n.append(l[i].pane||""),r?(r.before(d),a.before(n)):(p.append(d),h.append(n)),e++;this.syncSteps(),this.numSteps=p.find("li").length,this.setState()},removeSteps:function(e,i){var s,n="nextAll",a=0,r=this.$element.find(".steps"),d=this.$element.find(".step-content");i=void 0!==i?i:1,e>r.find("li").length?s=r.find("li:last"):(s=r.find("li:nth-child("+e+")").prev(),s.length<1&&(n="children",s=r)),s[n]().each(function(){var e=t(this),s=e.attr("data-step");return i>a?(e.remove(),d.find('.step-pane[data-step="'+s+'"]:first').remove(),void a++):!1}),this.syncSteps(),this.numSteps=r.find("li").length,this.setState()},setState:function(){var e=this.currentStep>1,i=1===this.currentStep,s=this.currentStep===this.numSteps;this.options.disablePreviousStep||this.$prevBtn.attr("disabled",i===!0||e===!1);var n=this.$nextBtn.attr("data-last");if(n){this.lastText=n;var a=this.nextText;s===!0?(a=this.lastText,this.$element.addClass("complete")):this.$element.removeClass("complete");var r=this.$nextBtn.children().detach();this.$nextBtn.text(a).append(r)}var d=this.$element.find(".steps li");d.removeClass("active").removeClass("complete"),d.find("span.badge").removeClass("badge-info").removeClass("badge-success");var l=".steps li:lt("+(this.currentStep-1)+")",p=this.$element.find(l);p.addClass("complete"),p.find("span.badge").addClass("badge-success");var h=".steps li:eq("+(this.currentStep-1)+")",f=this.$element.find(h);f.addClass("active"),f.find("span.badge").addClass("badge-info");var o=this.$element.find(".step-content"),c=f.attr("data-step");o.find(".step-pane").removeClass("active"),o.find('.step-pane[data-step="'+c+'"]:first').addClass("active"),this.$element.find(".steps").first().attr("style","margin-left: 0");var u=0;this.$element.find(".steps > li").each(function(){u+=t(this).outerWidth()});var m=0;if(m=this.$element.find(".actions").length?this.$element.width()-this.$element.find(".actions").first().outerWidth():this.$element.width(),u>m){var v=u-m;this.$element.find(".steps").first().attr("style","margin-left: -"+v+"px"),this.$element.find("li.active").first().position().left<200&&(v+=this.$element.find("li.active").first().position().left-200,1>v?this.$element.find(".steps").first().attr("style","margin-left: 0"):this.$element.find(".steps").first().attr("style","margin-left: -"+v+"px"))}if("undefined"!=typeof this.initialized){var $=t.Event("changed.fu.wizard");this.$element.trigger($,{step:this.currentStep})}this.initialized=!0},stepclicked:function(e){var i=t(e.currentTarget),s=this.$element.find(".steps li").index(i);if(!(s<this.currentStep&&this.options.disablePreviousStep)){var n=t.Event("stepclicked.fu.wizard");this.$element.trigger(n,{step:s+1}),n.isDefaultPrevented()||(this.currentStep=s+1,this.setState())}},syncSteps:function(){var e=1,i=this.$element.find(".steps"),s=this.$element.find(".step-content");i.children().each(function(){var i=t(this),n=i.find(".badge"),a=i.attr("data-step");isNaN(parseInt(n.html(),10))||n.html(e),i.attr("data-step",e),s.find('.step-pane[data-step="'+a+'"]:last').attr("data-step",e),e++})},previous:function(){if(!this.options.disablePreviousStep&&1!==this.currentStep){var e=t.Event("actionclicked.fu.wizard");if(this.$element.trigger(e,{step:this.currentStep,direction:"previous"}),!e.isDefaultPrevented()&&(this.currentStep-=1,this.setState(),this.$prevBtn.is(":focus"))){var i=this.$element.find(".active").find("input, select, textarea")[0];"undefined"!=typeof i?t(i).focus():0===this.$element.find(".active input:first").length&&this.$prevBtn.is(":disabled")&&this.$nextBtn.focus()}}},next:function(){var e=t.Event("actionclicked.fu.wizard");if(this.$element.trigger(e,{step:this.currentStep,direction:"next"}),!e.isDefaultPrevented()&&(this.currentStep<this.numSteps?(this.currentStep+=1,this.setState()):this.$element.trigger("finished.fu.wizard"),this.$nextBtn.is(":focus"))){var i=this.$element.find(".active").find("input, select, textarea")[0];"undefined"!=typeof i?t(i).focus():0===this.$element.find(".active input:first").length&&this.$nextBtn.is(":disabled")&&this.$prevBtn.focus()}},selectedItem:function(t){var e,i;return t?(i=t.step||-1,i=Number(this.$element.find('.steps li[data-name="'+i+'"]').first().attr("data-step"))||Number(i),i>=1&&i<=this.numSteps?(this.currentStep=i,this.setState()):(i=this.$element.find(".steps li.active:first").attr("data-step"),isNaN(i)||(this.currentStep=parseInt(i,10),this.setState())),e=this):(e={step:this.currentStep},this.$element.find(".steps li.active:first[data-name]").length&&(e.stepname=this.$element.find(".steps li.active:first").attr("data-name"))),e}},t.fn.wizard=function(e){var s,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=t(this),r=a.data("fu.wizard"),d="object"==typeof e&&e;r||a.data("fu.wizard",r=new i(this,d)),"string"==typeof e&&(s=r[e].apply(r,n))});return void 0===s?a:s},t.fn.wizard.defaults={disablePreviousStep:!1,selectedItem:{step:-1}},t.fn.wizard.Constructor=i,t.fn.wizard.noConflict=function(){return t.fn.wizard=e,this},t(document).on("mouseover.fu.wizard.data-api","[data-initialize=wizard]",function(e){var i=t(e.target).closest(".wizard");i.data("fu.wizard")||i.wizard(i.data())}),t(function(){t("[data-initialize=wizard]").each(function(){var e=t(this);e.data("fu.wizard")||e.wizard(e.data())})})});
29
 
 
30
  !function(t){t.color={},t.color.make=function(i,e,o,n){var a={};return a.r=i||0,a.g=e||0,a.b=o||0,a.a=null!=n?n:1,a.add=function(t,i){for(var e=0;e<t.length;++e)a[t.charAt(e)]+=i;return a.normalize()},a.scale=function(t,i){for(var e=0;e<t.length;++e)a[t.charAt(e)]*=i;return a.normalize()},a.toString=function(){return a.a>=1?"rgb("+[a.r,a.g,a.b].join(",")+")":"rgba("+[a.r,a.g,a.b,a.a].join(",")+")"},a.normalize=function(){function t(t,i,e){return t>i?t:i>e?e:i}return a.r=t(0,parseInt(a.r),255),a.g=t(0,parseInt(a.g),255),a.b=t(0,parseInt(a.b),255),a.a=t(0,a.a,1),a},a.clone=function(){return t.color.make(a.r,a.b,a.g,a.a)},a.normalize()},t.color.extract=function(i,e){var o;do{if(o=i.css(e).toLowerCase(),""!=o&&"transparent"!=o)break;i=i.parent()}while(i.length&&!t.nodeName(i.get(0),"body"));return"rgba(0, 0, 0, 0)"==o&&(o="transparent"),t.color.parse(o)},t.color.parse=function(e){var o,n=t.color.make;if(o=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(e))return n(parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10));if(o=/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(e))return n(parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10),parseFloat(o[4]));if(o=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(e))return n(2.55*parseFloat(o[1]),2.55*parseFloat(o[2]),2.55*parseFloat(o[3]));if(o=/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(e))return n(2.55*parseFloat(o[1]),2.55*parseFloat(o[2]),2.55*parseFloat(o[3]),parseFloat(o[4]));if(o=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(e))return n(parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16));if(o=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(e))return n(parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16));var a=t.trim(e).toLowerCase();return"transparent"==a?n(255,255,255,0):(o=i[a]||[0,0,0],n(o[0],o[1],o[2]))};var i={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(t){function i(i,e){var o=e.children("."+i)[0];if(null==o&&(o=document.createElement("canvas"),o.className=i,t(o).css({direction:"ltr",position:"absolute",left:0,top:0}).appendTo(e),!o.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.");o=window.G_vmlCanvasManager.initElement(o)}this.element=o;var n=this.context=o.getContext("2d"),a=window.devicePixelRatio||1,r=n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1;this.pixelRatio=a/r,this.resize(e.width(),e.height()),this.textContainer=null,this.text={},this._textCache={}}function e(e,n,a,r){function l(t,i){i=[xt].concat(i);for(var e=0;e<t.length;++e)t[e].apply(this,i)}function s(){for(var e={Canvas:i},o=0;o<r.length;++o){var n=r[o];n.init(xt,e),n.options&&t.extend(!0,nt,n.options)}}function c(i){t.extend(!0,nt,i),i&&i.colors&&(nt.colors=i.colors),null==nt.xaxis.color&&(nt.xaxis.color=t.color.parse(nt.grid.color).scale("a",.22).toString()),null==nt.yaxis.color&&(nt.yaxis.color=t.color.parse(nt.grid.color).scale("a",.22).toString()),null==nt.xaxis.tickColor&&(nt.xaxis.tickColor=nt.grid.tickColor||nt.xaxis.color),null==nt.yaxis.tickColor&&(nt.yaxis.tickColor=nt.grid.tickColor||nt.yaxis.color),null==nt.grid.borderColor&&(nt.grid.borderColor=nt.grid.color),null==nt.grid.tickColor&&(nt.grid.tickColor=t.color.parse(nt.grid.color).scale("a",.22).toString());var o,n,a,r=e.css("font-size"),s=r?+r.replace("px",""):13,c={style:e.css("font-style"),size:Math.round(.8*s),variant:e.css("font-variant"),weight:e.css("font-weight"),family:e.css("font-family")};for(a=nt.xaxes.length||1,o=0;a>o;++o)n=nt.xaxes[o],n&&!n.tickColor&&(n.tickColor=n.color),n=t.extend(!0,{},nt.xaxis,n),nt.xaxes[o]=n,n.font&&(n.font=t.extend({},c,n.font),n.font.color||(n.font.color=n.color),n.font.lineHeight||(n.font.lineHeight=Math.round(1.15*n.font.size)));for(a=nt.yaxes.length||1,o=0;a>o;++o)n=nt.yaxes[o],n&&!n.tickColor&&(n.tickColor=n.color),n=t.extend(!0,{},nt.yaxis,n),nt.yaxes[o]=n,n.font&&(n.font=t.extend({},c,n.font),n.font.color||(n.font.color=n.color),n.font.lineHeight||(n.font.lineHeight=Math.round(1.15*n.font.size)));for(nt.xaxis.noTicks&&null==nt.xaxis.ticks&&(nt.xaxis.ticks=nt.xaxis.noTicks),nt.yaxis.noTicks&&null==nt.yaxis.ticks&&(nt.yaxis.ticks=nt.yaxis.noTicks),nt.x2axis&&(nt.xaxes[1]=t.extend(!0,{},nt.xaxis,nt.x2axis),nt.xaxes[1].position="top",null==nt.x2axis.min&&(nt.xaxes[1].min=null),null==nt.x2axis.max&&(nt.xaxes[1].max=null)),nt.y2axis&&(nt.yaxes[1]=t.extend(!0,{},nt.yaxis,nt.y2axis),nt.yaxes[1].position="right",null==nt.y2axis.min&&(nt.yaxes[1].min=null),null==nt.y2axis.max&&(nt.yaxes[1].max=null)),nt.grid.coloredAreas&&(nt.grid.markings=nt.grid.coloredAreas),nt.grid.coloredAreasColor&&(nt.grid.markingsColor=nt.grid.coloredAreasColor),nt.lines&&t.extend(!0,nt.series.lines,nt.lines),nt.points&&t.extend(!0,nt.series.points,nt.points),nt.bars&&t.extend(!0,nt.series.bars,nt.bars),null!=nt.shadowSize&&(nt.series.shadowSize=nt.shadowSize),null!=nt.highlightColor&&(nt.series.highlightColor=nt.highlightColor),o=0;o<nt.xaxes.length;++o)x(ht,o+1).options=nt.xaxes[o];for(o=0;o<nt.yaxes.length;++o)x(ft,o+1).options=nt.yaxes[o];for(var h in mt)nt.hooks[h]&&nt.hooks[h].length&&(mt[h]=mt[h].concat(nt.hooks[h]));l(mt.processOptions,[nt])}function h(t){ot=f(t),g(),b()}function f(i){for(var e=[],o=0;o<i.length;++o){var n=t.extend(!0,{},nt.series);null!=i[o].data?(n.data=i[o].data,delete i[o].data,t.extend(!0,n,i[o]),i[o].data=n.data):n.data=i[o],e.push(n)}return e}function u(t,i){var e=t[i+"axis"];return"object"==typeof e&&(e=e.n),"number"!=typeof e&&(e=1),e}function d(){return t.grep(ht.concat(ft),function(t){return t})}function p(t){var i,e,o={};for(i=0;i<ht.length;++i)e=ht[i],e&&e.used&&(o["x"+e.n]=e.c2p(t.left));for(i=0;i<ft.length;++i)e=ft[i],e&&e.used&&(o["y"+e.n]=e.c2p(t.top));return void 0!==o.x1&&(o.x=o.x1),void 0!==o.y1&&(o.y=o.y1),o}function m(t){var i,e,o,n={};for(i=0;i<ht.length;++i)if(e=ht[i],e&&e.used&&(o="x"+e.n,null==t[o]&&1==e.n&&(o="x"),null!=t[o])){n.left=e.p2c(t[o]);break}for(i=0;i<ft.length;++i)if(e=ft[i],e&&e.used&&(o="y"+e.n,null==t[o]&&1==e.n&&(o="y"),null!=t[o])){n.top=e.p2c(t[o]);break}return n}function x(i,e){return i[e-1]||(i[e-1]={n:e,direction:i==ht?"x":"y",options:t.extend(!0,{},i==ht?nt.xaxis:nt.yaxis)}),i[e-1]}function g(){var i,e=ot.length,o=-1;for(i=0;i<ot.length;++i){var n=ot[i].color;null!=n&&(e--,"number"==typeof n&&n>o&&(o=n))}o>=e&&(e=o+1);var a,r=[],l=nt.colors,s=l.length,c=0;for(i=0;e>i;i++)a=t.color.parse(l[i%s]||"#666"),i%s==0&&i&&(c=c>=0?.5>c?-c-.2:0:-c),r[i]=a.scale("rgb",1+c);var h,f=0;for(i=0;i<ot.length;++i){if(h=ot[i],null==h.color?(h.color=r[f].toString(),++f):"number"==typeof h.color&&(h.color=r[h.color].toString()),null==h.lines.show){var d,p=!0;for(d in h)if(h[d]&&h[d].show){p=!1;break}p&&(h.lines.show=!0)}null==h.lines.zero&&(h.lines.zero=!!h.lines.fill),h.xaxis=x(ht,u(h,"x")),h.yaxis=x(ft,u(h,"y"))}}function b(){function i(t,i,e){i<t.datamin&&i!=-b&&(t.datamin=i),e>t.datamax&&e!=b&&(t.datamax=e)}var e,o,n,a,r,s,c,h,f,u,p,m,x=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,b=Number.MAX_VALUE;for(t.each(d(),function(t,i){i.datamin=x,i.datamax=g,i.used=!1}),e=0;e<ot.length;++e)r=ot[e],r.datapoints={points:[]},l(mt.processRawData,[r,r.data,r.datapoints]);for(e=0;e<ot.length;++e){if(r=ot[e],p=r.data,m=r.datapoints.format,!m){if(m=[],m.push({x:!0,number:!0,required:!0}),m.push({y:!0,number:!0,required:!0}),r.bars.show||r.lines.show&&r.lines.fill){var v=!!(r.bars.show&&r.bars.zero||r.lines.show&&r.lines.zero);m.push({y:!0,number:!0,required:!1,defaultValue:0,autoscale:v}),r.bars.horizontal&&(delete m[m.length-1].y,m[m.length-1].x=!0)}r.datapoints.format=m}if(null==r.datapoints.pointsize){r.datapoints.pointsize=m.length,c=r.datapoints.pointsize,s=r.datapoints.points;var k=r.lines.show&&r.lines.steps;for(r.xaxis.used=r.yaxis.used=!0,o=n=0;o<p.length;++o,n+=c){u=p[o];var y=null==u;if(!y)for(a=0;c>a;++a)h=u[a],f=m[a],f&&(f.number&&null!=h&&(h=+h,isNaN(h)?h=null:h==1/0?h=b:h==-(1/0)&&(h=-b)),null==h&&(f.required&&(y=!0),null!=f.defaultValue&&(h=f.defaultValue))),s[n+a]=h;if(y)for(a=0;c>a;++a)h=s[n+a],null!=h&&(f=m[a],f.autoscale!==!1&&(f.x&&i(r.xaxis,h,h),f.y&&i(r.yaxis,h,h))),s[n+a]=null;else if(k&&n>0&&null!=s[n-c]&&s[n-c]!=s[n]&&s[n-c+1]!=s[n+1]){for(a=0;c>a;++a)s[n+c+a]=s[n+a];s[n+1]=s[n-c+1],n+=c}}}}for(e=0;e<ot.length;++e)r=ot[e],l(mt.processDatapoints,[r,r.datapoints]);for(e=0;e<ot.length;++e){r=ot[e],s=r.datapoints.points,c=r.datapoints.pointsize,m=r.datapoints.format;var w=x,M=x,T=g,C=g;for(o=0;o<s.length;o+=c)if(null!=s[o])for(a=0;c>a;++a)h=s[o+a],f=m[a],f&&f.autoscale!==!1&&h!=b&&h!=-b&&(f.x&&(w>h&&(w=h),h>T&&(T=h)),f.y&&(M>h&&(M=h),h>C&&(C=h)));if(r.bars.show){var S;switch(r.bars.align){case"left":S=0;break;case"right":S=-r.bars.barWidth;break;default:S=-r.bars.barWidth/2}r.bars.horizontal?(M+=S,C+=S+r.bars.barWidth):(w+=S,T+=S+r.bars.barWidth)}i(r.xaxis,w,T),i(r.yaxis,M,C)}t.each(d(),function(t,i){i.datamin==x&&(i.datamin=null),i.datamax==g&&(i.datamax=null)})}function v(){e.css("padding",0).children().filter(function(){return!t(this).hasClass("flot-overlay")&&!t(this).hasClass("flot-base")}).remove(),"static"==e.css("position")&&e.css("position","relative"),at=new i("flot-base",e),rt=new i("flot-overlay",e),st=at.context,ct=rt.context,lt=t(rt.element).unbind();var o=e.data("plot");o&&(o.shutdown(),rt.clear()),e.data("plot",xt)}function k(){nt.grid.hoverable&&(lt.mousemove(X),lt.bind("mouseleave",Y)),nt.grid.clickable&&lt.click(q),l(mt.bindEvents,[lt])}function y(){bt&&clearTimeout(bt),lt.unbind("mousemove",X),lt.unbind("mouseleave",Y),lt.unbind("click",q),l(mt.shutdown,[lt])}function w(t){function i(t){return t}var e,o,n=t.options.transform||i,a=t.options.inverseTransform;"x"==t.direction?(e=t.scale=dt/Math.abs(n(t.max)-n(t.min)),o=Math.min(n(t.max),n(t.min))):(e=t.scale=pt/Math.abs(n(t.max)-n(t.min)),e=-e,o=Math.max(n(t.max),n(t.min))),n==i?t.p2c=function(t){return(t-o)*e}:t.p2c=function(t){return(n(t)-o)*e},a?t.c2p=function(t){return a(o+t/e)}:t.c2p=function(t){return o+t/e}}function M(t){for(var i=t.options,e=t.ticks||[],o=i.labelWidth||0,n=i.labelHeight||0,a=o||("x"==t.direction?Math.floor(at.width/(e.length||1)):null),r=t.direction+"Axis "+t.direction+t.n+"Axis",l="flot-"+t.direction+"-axis flot-"+t.direction+t.n+"-axis "+r,s=i.font||"flot-tick-label tickLabel",c=0;c<e.length;++c){var h=e[c];if(h.label){var f=at.getTextInfo(l,h.label,s,null,a);o=Math.max(o,f.width),n=Math.max(n,f.height)}}t.labelWidth=i.labelWidth||o,t.labelHeight=i.labelHeight||n}function T(i){var e=i.labelWidth,o=i.labelHeight,n=i.options.position,a="x"===i.direction,r=i.options.tickLength,l=nt.grid.axisMargin,s=nt.grid.labelMargin,c=!0,h=!0,f=!0,u=!1;t.each(a?ht:ft,function(t,e){e&&(e.show||e.reserveSpace)&&(e===i?u=!0:e.options.position===n&&(u?h=!1:c=!1),u||(f=!1))}),h&&(l=0),null==r&&(r=f?"full":5),isNaN(+r)||(s+=+r),a?(o+=s,"bottom"==n?(ut.bottom+=o+l,i.box={top:at.height-ut.bottom,height:o}):(i.box={top:ut.top+l,height:o},ut.top+=o+l)):(e+=s,"left"==n?(i.box={left:ut.left+l,width:e},ut.left+=e+l):(ut.right+=e+l,i.box={left:at.width-ut.right,width:e})),i.position=n,i.tickLength=r,i.box.padding=s,i.innermost=c}function C(t){"x"==t.direction?(t.box.left=ut.left-t.labelWidth/2,t.box.width=at.width-ut.left-ut.right+t.labelWidth):(t.box.top=ut.top-t.labelHeight/2,t.box.height=at.height-ut.bottom-ut.top+t.labelHeight)}function S(){var i,e=nt.grid.minBorderMargin;if(null==e)for(e=0,i=0;i<ot.length;++i)e=Math.max(e,2*(ot[i].points.radius+ot[i].points.lineWidth/2));var o={left:e,right:e,top:e,bottom:e};t.each(d(),function(t,i){i.reserveSpace&&i.ticks&&i.ticks.length&&("x"===i.direction?(o.left=Math.max(o.left,i.labelWidth/2),o.right=Math.max(o.right,i.labelWidth/2)):(o.bottom=Math.max(o.bottom,i.labelHeight/2),o.top=Math.max(o.top,i.labelHeight/2)))}),ut.left=Math.ceil(Math.max(o.left,ut.left)),ut.right=Math.ceil(Math.max(o.right,ut.right)),ut.top=Math.ceil(Math.max(o.top,ut.top)),ut.bottom=Math.ceil(Math.max(o.bottom,ut.bottom))}function W(){var i,e=d(),o=nt.grid.show;for(var n in ut){var a=nt.grid.margin||0;ut[n]="number"==typeof a?a:a[n]||0}l(mt.processOffset,[ut]);for(var n in ut)"object"==typeof nt.grid.borderWidth?ut[n]+=o?nt.grid.borderWidth[n]:0:ut[n]+=o?nt.grid.borderWidth:0;if(t.each(e,function(t,i){var e=i.options;i.show=null==e.show?i.used:e.show,i.reserveSpace=null==e.reserveSpace?i.show:e.reserveSpace,z(i)}),o){var r=t.grep(e,function(t){return t.show||t.reserveSpace});for(t.each(r,function(t,i){I(i),A(i),F(i,i.ticks),M(i)}),i=r.length-1;i>=0;--i)T(r[i]);S(),t.each(r,function(t,i){C(i)})}dt=at.width-ut.left-ut.right,pt=at.height-ut.bottom-ut.top,t.each(e,function(t,i){w(i)}),o&&O(),_()}function z(t){var i=t.options,e=+(null!=i.min?i.min:t.datamin),o=+(null!=i.max?i.max:t.datamax),n=o-e;if(0==n){var a=0==o?1:.01;null==i.min&&(e-=a),(null==i.max||null!=i.min)&&(o+=a)}else{var r=i.autoscaleMargin;null!=r&&(null==i.min&&(e-=n*r,0>e&&null!=t.datamin&&t.datamin>=0&&(e=0)),null==i.max&&(o+=n*r,o>0&&null!=t.datamax&&t.datamax<=0&&(o=0)))}t.min=e,t.max=o}function I(i){var e,n=i.options;e="number"==typeof n.ticks&&n.ticks>0?n.ticks:.3*Math.sqrt("x"==i.direction?at.width:at.height);var a=(i.max-i.min)/e,r=-Math.floor(Math.log(a)/Math.LN10),l=n.tickDecimals;null!=l&&r>l&&(r=l);var s,c=Math.pow(10,-r),h=a/c;if(1.5>h?s=1:3>h?(s=2,h>2.25&&(null==l||l>=r+1)&&(s=2.5,++r)):s=7.5>h?5:10,s*=c,null!=n.minTickSize&&s<n.minTickSize&&(s=n.minTickSize),i.delta=a,i.tickDecimals=Math.max(0,null!=l?l:r),i.tickSize=n.tickSize||s,"time"==n.mode&&!i.tickGenerator)throw new Error("Time mode requires the flot.time plugin.");if(i.tickGenerator||(i.tickGenerator=function(t){var i,e=[],n=o(t.min,t.tickSize),a=0,r=Number.NaN;do i=r,r=n+a*t.tickSize,e.push(r),++a;while(r<t.max&&r!=i);return e},i.tickFormatter=function(t,i){var e=i.tickDecimals?Math.pow(10,i.tickDecimals):1,o=""+Math.round(t*e)/e;if(null!=i.tickDecimals){var n=o.indexOf("."),a=-1==n?0:o.length-n-1;if(a<i.tickDecimals)return(a?o:o+".")+(""+e).substr(1,i.tickDecimals-a)}return o}),t.isFunction(n.tickFormatter)&&(i.tickFormatter=function(t,i){return""+n.tickFormatter(t,i)}),null!=n.alignTicksWithAxis){var f=("x"==i.direction?ht:ft)[n.alignTicksWithAxis-1];if(f&&f.used&&f!=i){var u=i.tickGenerator(i);if(u.length>0&&(null==n.min&&(i.min=Math.min(i.min,u[0])),null==n.max&&u.length>1&&(i.max=Math.max(i.max,u[u.length-1]))),i.tickGenerator=function(t){var i,e,o=[];for(e=0;e<f.ticks.length;++e)i=(f.ticks[e].v-f.min)/(f.max-f.min),i=t.min+i*(t.max-t.min),o.push(i);return o},!i.mode&&null==n.tickDecimals){var d=Math.max(0,-Math.floor(Math.log(i.delta)/Math.LN10)+1),p=i.tickGenerator(i);p.length>1&&/\..*0$/.test((p[1]-p[0]).toFixed(d))||(i.tickDecimals=d)}}}}function A(i){var e=i.options.ticks,o=[];null==e||"number"==typeof e&&e>0?o=i.tickGenerator(i):e&&(o=t.isFunction(e)?e(i):e);var n,a;for(i.ticks=[],n=0;n<o.length;++n){var r=null,l=o[n];"object"==typeof l?(a=+l[0],l.length>1&&(r=l[1])):a=+l,null==r&&(r=i.tickFormatter(a,i)),isNaN(a)||i.ticks.push({v:a,label:r})}}function F(t,i){t.options.autoscaleMargin&&i.length>0&&(null==t.options.min&&(t.min=Math.min(t.min,i[0].v)),null==t.options.max&&i.length>1&&(t.max=Math.max(t.max,i[i.length-1].v)))}function P(){at.clear(),l(mt.drawBackground,[st]);var t=nt.grid;t.show&&t.backgroundColor&&D(),t.show&&!t.aboveData&&L();for(var i=0;i<ot.length;++i)l(mt.drawSeries,[st,ot[i]]),R(ot[i]);l(mt.draw,[st]),t.show&&t.aboveData&&L(),at.render(),U()}function N(t,i){for(var e,o,n,a,r=d(),l=0;l<r.length;++l)if(e=r[l],e.direction==i&&(a=i+e.n+"axis",t[a]||1!=e.n||(a=i+"axis"),t[a])){o=t[a].from,n=t[a].to;break}if(t[a]||(e="x"==i?ht[0]:ft[0],o=t[i+"1"],n=t[i+"2"]),null!=o&&null!=n&&o>n){var s=o;o=n,n=s}return{from:o,to:n,axis:e}}function D(){st.save(),st.translate(ut.left,ut.top),st.fillStyle=et(nt.grid.backgroundColor,pt,0,"rgba(255, 255, 255, 0)"),st.fillRect(0,0,dt,pt),st.restore()}function L(){var i,e,o,n;st.save(),st.translate(ut.left,ut.top);var a=nt.grid.markings;if(a)for(t.isFunction(a)&&(e=xt.getAxes(),e.xmin=e.xaxis.min,e.xmax=e.xaxis.max,e.ymin=e.yaxis.min,e.ymax=e.yaxis.max,a=a(e)),i=0;i<a.length;++i){var r=a[i],l=N(r,"x"),s=N(r,"y");if(null==l.from&&(l.from=l.axis.min),null==l.to&&(l.to=l.axis.max),null==s.from&&(s.from=s.axis.min),null==s.to&&(s.to=s.axis.max),!(l.to<l.axis.min||l.from>l.axis.max||s.to<s.axis.min||s.from>s.axis.max)){l.from=Math.max(l.from,l.axis.min),l.to=Math.min(l.to,l.axis.max),s.from=Math.max(s.from,s.axis.min),s.to=Math.min(s.to,s.axis.max);var c=l.from===l.to,h=s.from===s.to;if(!c||!h)if(l.from=Math.floor(l.axis.p2c(l.from)),l.to=Math.floor(l.axis.p2c(l.to)),s.from=Math.floor(s.axis.p2c(s.from)),s.to=Math.floor(s.axis.p2c(s.to)),c||h){var f=r.lineWidth||nt.grid.markingsLineWidth,u=f%2?.5:0;st.beginPath(),st.strokeStyle=r.color||nt.grid.markingsColor,st.lineWidth=f,c?(st.moveTo(l.to+u,s.from),st.lineTo(l.to+u,s.to)):(st.moveTo(l.from,s.to+u),st.lineTo(l.to,s.to+u)),st.stroke()}else st.fillStyle=r.color||nt.grid.markingsColor,st.fillRect(l.from,s.to,l.to-l.from,s.from-s.to)}}e=d(),o=nt.grid.borderWidth;for(var p=0;p<e.length;++p){var m,x,g,b,v=e[p],k=v.box,y=v.tickLength;if(v.show&&0!=v.ticks.length){for(st.lineWidth=1,"x"==v.direction?(m=0,x="full"==y?"top"==v.position?0:pt:k.top-ut.top+("top"==v.position?k.height:0)):(x=0,m="full"==y?"left"==v.position?0:dt:k.left-ut.left+("left"==v.position?k.width:0)),v.innermost||(st.strokeStyle=v.options.color,st.beginPath(),g=b=0,"x"==v.direction?g=dt+1:b=pt+1,1==st.lineWidth&&("x"==v.direction?x=Math.floor(x)+.5:m=Math.floor(m)+.5),st.moveTo(m,x),st.lineTo(m+g,x+b),st.stroke()),st.strokeStyle=v.options.tickColor,st.beginPath(),i=0;i<v.ticks.length;++i){var w=v.ticks[i].v;g=b=0,isNaN(w)||w<v.min||w>v.max||"full"==y&&("object"==typeof o&&o[v.position]>0||o>0)&&(w==v.min||w==v.max)||("x"==v.direction?(m=v.p2c(w),b="full"==y?-pt:y,"top"==v.position&&(b=-b)):(x=v.p2c(w),g="full"==y?-dt:y,"left"==v.position&&(g=-g)),1==st.lineWidth&&("x"==v.direction?m=Math.floor(m)+.5:x=Math.floor(x)+.5),st.moveTo(m,x),st.lineTo(m+g,x+b))}st.stroke()}}o&&(n=nt.grid.borderColor,"object"==typeof o||"object"==typeof n?("object"!=typeof o&&(o={top:o,right:o,bottom:o,left:o}),"object"!=typeof n&&(n={top:n,right:n,bottom:n,left:n}),o.top>0&&(st.strokeStyle=n.top,st.lineWidth=o.top,st.beginPath(),st.moveTo(0-o.left,0-o.top/2),st.lineTo(dt,0-o.top/2),st.stroke()),o.right>0&&(st.strokeStyle=n.right,st.lineWidth=o.right,st.beginPath(),st.moveTo(dt+o.right/2,0-o.top),st.lineTo(dt+o.right/2,pt),st.stroke()),o.bottom>0&&(st.strokeStyle=n.bottom,st.lineWidth=o.bottom,st.beginPath(),st.moveTo(dt+o.right,pt+o.bottom/2),st.lineTo(0,pt+o.bottom/2),st.stroke()),o.left>0&&(st.strokeStyle=n.left,st.lineWidth=o.left,st.beginPath(),st.moveTo(0-o.left/2,pt+o.bottom),st.lineTo(0-o.left/2,0),st.stroke())):(st.lineWidth=o,st.strokeStyle=nt.grid.borderColor,st.strokeRect(-o/2,-o/2,dt+o,pt+o))),st.restore()}function O(){t.each(d(),function(t,i){var e,o,n,a,r,l=i.box,s=i.direction+"Axis "+i.direction+i.n+"Axis",c="flot-"+i.direction+"-axis flot-"+i.direction+i.n+"-axis "+s,h=i.options.font||"flot-tick-label tickLabel";if(at.removeText(c),i.show&&0!=i.ticks.length)for(var f=0;f<i.ticks.length;++f)e=i.ticks[f],!e.label||e.v<i.min||e.v>i.max||("x"==i.direction?(a="center",o=ut.left+i.p2c(e.v),"bottom"==i.position?n=l.top+l.padding:(n=l.top+l.height-l.padding,r="bottom")):(r="middle",n=ut.top+i.p2c(e.v),"left"==i.position?(o=l.left+l.width-l.padding,a="right"):o=l.left+l.padding),at.addText(c,o,n,e.label,h,null,null,a,r))})}function R(t){t.lines.show&&H(t),t.bars.show&&B(t),t.points.show&&j(t)}function H(t){function i(t,i,e,o,n){var a=t.points,r=t.pointsize,l=null,s=null;st.beginPath();for(var c=r;c<a.length;c+=r){var h=a[c-r],f=a[c-r+1],u=a[c],d=a[c+1];if(null!=h&&null!=u){if(d>=f&&f<n.min){if(d<n.min)continue;h=(n.min-f)/(d-f)*(u-h)+h,f=n.min}else if(f>=d&&d<n.min){if(f<n.min)continue;u=(n.min-f)/(d-f)*(u-h)+h,d=n.min}if(f>=d&&f>n.max){if(d>n.max)continue;h=(n.max-f)/(d-f)*(u-h)+h,f=n.max}else if(d>=f&&d>n.max){if(f>n.max)continue;u=(n.max-f)/(d-f)*(u-h)+h,d=n.max}if(u>=h&&h<o.min){if(u<o.min)continue;f=(o.min-h)/(u-h)*(d-f)+f,h=o.min}else if(h>=u&&u<o.min){if(h<o.min)continue;d=(o.min-h)/(u-h)*(d-f)+f,u=o.min}if(h>=u&&h>o.max){if(u>o.max)continue;f=(o.max-h)/(u-h)*(d-f)+f,h=o.max}else if(u>=h&&u>o.max){if(h>o.max)continue;d=(o.max-h)/(u-h)*(d-f)+f,u=o.max}(h!=l||f!=s)&&st.moveTo(o.p2c(h)+i,n.p2c(f)+e),l=u,s=d,st.lineTo(o.p2c(u)+i,n.p2c(d)+e)}}st.stroke()}function e(t,i,e){for(var o=t.points,n=t.pointsize,a=Math.min(Math.max(0,e.min),e.max),r=0,l=!1,s=1,c=0,h=0;;){if(n>0&&r>o.length+n)break;r+=n;var f=o[r-n],u=o[r-n+s],d=o[r],p=o[r+s];if(l){if(n>0&&null!=f&&null==d){h=r,n=-n,s=2;continue}if(0>n&&r==c+n){st.fill(),l=!1,n=-n,s=1,r=c=h+n;continue}}if(null!=f&&null!=d){if(d>=f&&f<i.min){if(d<i.min)continue;u=(i.min-f)/(d-f)*(p-u)+u,f=i.min}else if(f>=d&&d<i.min){if(f<i.min)continue;p=(i.min-f)/(d-f)*(p-u)+u,d=i.min}if(f>=d&&f>i.max){if(d>i.max)continue;u=(i.max-f)/(d-f)*(p-u)+u,f=i.max}else if(d>=f&&d>i.max){if(f>i.max)continue;p=(i.max-f)/(d-f)*(p-u)+u,d=i.max}if(l||(st.beginPath(),st.moveTo(i.p2c(f),e.p2c(a)),l=!0),u>=e.max&&p>=e.max)st.lineTo(i.p2c(f),e.p2c(e.max)),st.lineTo(i.p2c(d),e.p2c(e.max));else if(u<=e.min&&p<=e.min)st.lineTo(i.p2c(f),e.p2c(e.min)),st.lineTo(i.p2c(d),e.p2c(e.min));else{var m=f,x=d;p>=u&&u<e.min&&p>=e.min?(f=(e.min-u)/(p-u)*(d-f)+f,u=e.min):u>=p&&p<e.min&&u>=e.min&&(d=(e.min-u)/(p-u)*(d-f)+f,p=e.min),u>=p&&u>e.max&&p<=e.max?(f=(e.max-u)/(p-u)*(d-f)+f,u=e.max):p>=u&&p>e.max&&u<=e.max&&(d=(e.max-u)/(p-u)*(d-f)+f,p=e.max),f!=m&&st.lineTo(i.p2c(m),e.p2c(u)),st.lineTo(i.p2c(f),e.p2c(u)),st.lineTo(i.p2c(d),e.p2c(p)),d!=x&&(st.lineTo(i.p2c(d),e.p2c(p)),st.lineTo(i.p2c(x),e.p2c(p)))}}}}st.save(),st.translate(ut.left,ut.top),st.lineJoin="round";var o=t.lines.lineWidth,n=t.shadowSize;if(o>0&&n>0){st.lineWidth=n,st.strokeStyle="rgba(0,0,0,0.1)";var a=Math.PI/18;i(t.datapoints,Math.sin(a)*(o/2+n/2),Math.cos(a)*(o/2+n/2),t.xaxis,t.yaxis),st.lineWidth=n/2,i(t.datapoints,Math.sin(a)*(o/2+n/4),Math.cos(a)*(o/2+n/4),t.xaxis,t.yaxis)}st.lineWidth=o,st.strokeStyle=t.color;var r=G(t.lines,t.color,0,pt);r&&(st.fillStyle=r,e(t.datapoints,t.xaxis,t.yaxis)),o>0&&i(t.datapoints,0,0,t.xaxis,t.yaxis),st.restore()}function j(t){function i(t,i,e,o,n,a,r,l){for(var s=t.points,c=t.pointsize,h=0;h<s.length;h+=c){var f=s[h],u=s[h+1];null==f||f<a.min||f>a.max||u<r.min||u>r.max||(st.beginPath(),f=a.p2c(f),u=r.p2c(u)+o,"circle"==l?st.arc(f,u,i,0,n?Math.PI:2*Math.PI,!1):l(st,f,u,i,n),st.closePath(),e&&(st.fillStyle=e,st.fill()),st.stroke())}}st.save(),st.translate(ut.left,ut.top);var e=t.points.lineWidth,o=t.shadowSize,n=t.points.radius,a=t.points.symbol;if(0==e&&(e=1e-4),e>0&&o>0){var r=o/2;st.lineWidth=r,st.strokeStyle="rgba(0,0,0,0.1)",i(t.datapoints,n,null,r+r/2,!0,t.xaxis,t.yaxis,a),st.strokeStyle="rgba(0,0,0,0.2)",i(t.datapoints,n,null,r/2,!0,t.xaxis,t.yaxis,a)}st.lineWidth=e,st.strokeStyle=t.color,i(t.datapoints,n,G(t.points,t.color),0,!1,t.xaxis,t.yaxis,a),st.restore()}function E(t,i,e,o,n,a,r,l,s,c,h){var f,u,d,p,m,x,g,b,v;c?(b=x=g=!0,m=!1,f=e,u=t,p=i+o,d=i+n,f>u&&(v=u,u=f,f=v,m=!0,x=!1)):(m=x=g=!0,b=!1,f=t+o,u=t+n,d=e,p=i,d>p&&(v=p,p=d,d=v,b=!0,g=!1)),u<r.min||f>r.max||p<l.min||d>l.max||(f<r.min&&(f=r.min,m=!1),u>r.max&&(u=r.max,x=!1),d<l.min&&(d=l.min,b=!1),p>l.max&&(p=l.max,g=!1),f=r.p2c(f),d=l.p2c(d),u=r.p2c(u),p=l.p2c(p),a&&(s.fillStyle=a(d,p),s.fillRect(f,p,u-f,d-p)),h>0&&(m||x||g||b)&&(s.beginPath(),s.moveTo(f,d),m?s.lineTo(f,p):s.moveTo(f,p),g?s.lineTo(u,p):s.moveTo(u,p),x?s.lineTo(u,d):s.moveTo(u,d),b?s.lineTo(f,d):s.moveTo(f,d),s.stroke()))}function B(t){function i(i,e,o,n,a,r){for(var l=i.points,s=i.pointsize,c=0;c<l.length;c+=s)null!=l[c]&&E(l[c],l[c+1],l[c+2],e,o,n,a,r,st,t.bars.horizontal,t.bars.lineWidth)}st.save(),st.translate(ut.left,ut.top),st.lineWidth=t.bars.lineWidth,st.strokeStyle=t.color;var e;switch(t.bars.align){case"left":e=0;break;case"right":e=-t.bars.barWidth;break;default:e=-t.bars.barWidth/2}var o=t.bars.fill?function(i,e){return G(t.bars,t.color,i,e)}:null;i(t.datapoints,e,e+t.bars.barWidth,o,t.xaxis,t.yaxis),st.restore()}function G(i,e,o,n){var a=i.fill;if(!a)return null;if(i.fillColor)return et(i.fillColor,o,n,e);var r=t.color.parse(e);return r.a="number"==typeof a?a:.4,r.normalize(),r.toString()}function _(){if(null!=nt.legend.container?t(nt.legend.container).html(""):e.find(".legend").remove(),nt.legend.show){for(var i,o,n=[],a=[],r=!1,l=nt.legend.labelFormatter,s=0;s<ot.length;++s)i=ot[s],i.label&&(o=l?l(i.label,i):i.label,o&&a.push({label:o,color:i.color}));if(nt.legend.sorted)if(t.isFunction(nt.legend.sorted))a.sort(nt.legend.sorted);else if("reverse"==nt.legend.sorted)a.reverse();else{var c="descending"!=nt.legend.sorted;a.sort(function(t,i){return t.label==i.label?0:t.label<i.label!=c?1:-1})}for(var s=0;s<a.length;++s){var h=a[s];s%nt.legend.noColumns==0&&(r&&n.push("</tr>"),n.push("<tr>"),r=!0),n.push('<td class="legendColorBox"><div style="border:1px solid '+nt.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>")}if(r&&n.push("</tr>"),0!=n.length){var f='<table style="font-size:smaller;color:'+nt.grid.color+'">'+n.join("")+"</table>";if(null!=nt.legend.container)t(nt.legend.container).html(f);else{var u="",d=nt.legend.position,p=nt.legend.margin;null==p[0]&&(p=[p,p]),"n"==d.charAt(0)?u+="top:"+(p[1]+ut.top)+"px;":"s"==d.charAt(0)&&(u+="bottom:"+(p[1]+ut.bottom)+"px;"),"e"==d.charAt(1)?u+="right:"+(p[0]+ut.right)+"px;":"w"==d.charAt(1)&&(u+="left:"+(p[0]+ut.left)+"px;");var m=t('<div class="legend">'+f.replace('style="','style="position:absolute;'+u+";")+"</div>").appendTo(e);if(0!=nt.legend.backgroundOpacity){var x=nt.legend.backgroundColor;null==x&&(x=nt.grid.backgroundColor,x=x&&"string"==typeof x?t.color.parse(x):t.color.extract(m,"background-color"),x.a=1,x=x.toString());var g=m.children();t('<div style="position:absolute;width:'+g.width()+"px;height:"+g.height()+"px;"+u+"background-color:"+x+';"> </div>').prependTo(m).css("opacity",nt.legend.backgroundOpacity)}}}}}function V(t,i,e){var o,n,a,r=nt.grid.mouseActiveRadius,l=r*r+1,s=null;for(o=ot.length-1;o>=0;--o)if(e(ot[o])){var c=ot[o],h=c.xaxis,f=c.yaxis,u=c.datapoints.points,d=h.c2p(t),p=f.c2p(i),m=r/h.scale,x=r/f.scale;if(a=c.datapoints.pointsize,h.options.inverseTransform&&(m=Number.MAX_VALUE),f.options.inverseTransform&&(x=Number.MAX_VALUE),c.lines.show||c.points.show)for(n=0;n<u.length;n+=a){var g=u[n],b=f.datamin;if(null!=g&&!(g-d>m||-m>g-d||b-p>x||-x>b-p)){var v=Math.abs(h.p2c(g)-t),k=Math.abs(f.p2c(b)-i),y=v*v+k*k;l>y&&(l=y,s=[o,n/a])}}if(c.bars.show&&!s){var w,M;switch(c.bars.align){case"left":w=0;break;case"right":w=-c.bars.barWidth;break;default:w=-c.bars.barWidth/2}for(M=w+c.bars.barWidth,n=0;n<u.length;n+=a){var g=u[n],b=u[n+1],T=u[n+2];null!=g&&(ot[o].bars.horizontal?d<=Math.max(T,g)&&d>=Math.min(T,g)&&p>=b+w&&b+M>=p:d>=g+w&&g+M>=d&&p>=Math.min(T,b)&&p<=Math.max(T,b))&&(s=[o,n/a])}}}return s?(o=s[0],n=s[1],a=ot[o].datapoints.pointsize,{datapoint:ot[o].datapoints.points.slice(n*a,(n+1)*a),dataIndex:n,series:ot[o],seriesIndex:o}):null}function X(t){nt.grid.hoverable&&Q("plothover",t,function(t){return 0!=t.hoverable})}function Y(t){nt.grid.hoverable&&Q("plothover",t,function(t){return!1})}function q(t){Q("plotclick",t,function(t){return 0!=t.clickable})}function Q(t,i,o){var n=lt.offset(),a=i.pageX-n.left-ut.left,r=i.pageY-n.top-ut.top,l=p({left:a,top:r});l.pageX=i.pageX,l.pageY=i.pageY;var s=V(a,r,o);if(s&&(s.pageX=parseInt(s.series.xaxis.p2c(s.datapoint[0])+n.left+ut.left,10),s.pageY=parseInt(s.series.yaxis.p2c(s.datapoint[1])+n.top+ut.top,10)),nt.grid.autoHighlight){for(var c=0;c<gt.length;++c){var h=gt[c];h.auto!=t||s&&h.series==s.series&&h.point[0]==s.datapoint[0]&&h.point[1]==s.datapoint[1]||K(h.series,h.point)}s&&$(s.series,s.datapoint,t)}e.trigger(t,[l,s])}function U(){var t=nt.interaction.redrawOverlayInterval;return-1==t?void J():void(bt||(bt=setTimeout(J,t)))}function J(){bt=null,ct.save(),rt.clear(),ct.translate(ut.left,ut.top);var t,i;for(t=0;t<gt.length;++t)i=gt[t],i.series.bars.show?it(i.series,i.point):tt(i.series,i.point);ct.restore(),l(mt.drawOverlay,[ct])}function $(t,i,e){if("number"==typeof t&&(t=ot[t]),"number"==typeof i){var o=t.datapoints.pointsize;i=t.datapoints.points.slice(o*i,o*(i+1))}var n=Z(t,i);-1==n?(gt.push({series:t,point:i,auto:e}),U()):e||(gt[n].auto=!1)}function K(t,i){if(null==t&&null==i)return gt=[],void U();if("number"==typeof t&&(t=ot[t]),"number"==typeof i){var e=t.datapoints.pointsize;i=t.datapoints.points.slice(e*i,e*(i+1))}var o=Z(t,i);-1!=o&&(gt.splice(o,1),U())}function Z(t,i){for(var e=0;e<gt.length;++e){var o=gt[e];if(o.series==t&&o.point[0]==i[0]&&o.point[1]==i[1])return e}return-1}function tt(i,e){var o=e[0],n=e[1],a=i.xaxis,r=i.yaxis,l="string"==typeof i.highlightColor?i.highlightColor:t.color.parse(i.color).scale("a",.5).toString();if(!(o<a.min||o>a.max||n<r.min||n>r.max)){var s=i.points.radius+i.points.lineWidth/2;ct.lineWidth=s,ct.strokeStyle=l;var c=1.5*s;o=a.p2c(o),n=r.p2c(n),ct.beginPath(),"circle"==i.points.symbol?ct.arc(o,n,c,0,2*Math.PI,!1):i.points.symbol(ct,o,n,c,!1),ct.closePath(),ct.stroke()}}function it(i,e){var o,n="string"==typeof i.highlightColor?i.highlightColor:t.color.parse(i.color).scale("a",.5).toString(),a=n;switch(i.bars.align){case"left":o=0;break;case"right":o=-i.bars.barWidth;break;default:o=-i.bars.barWidth/2}ct.lineWidth=i.bars.lineWidth,ct.strokeStyle=n,E(e[0],e[1],e[2]||0,o,o+i.bars.barWidth,function(){return a},i.xaxis,i.yaxis,ct,i.bars.horizontal,i.bars.lineWidth)}function et(i,e,o,n){if("string"==typeof i)return i;for(var a=st.createLinearGradient(0,o,0,e),r=0,l=i.colors.length;l>r;++r){var s=i.colors[r];if("string"!=typeof s){var c=t.color.parse(n);null!=s.brightness&&(c=c.scale("rgb",s.brightness)),null!=s.opacity&&(c.a*=s.opacity),s=c.toString()}a.addColorStop(r/(l-1),s)}return a}var ot=[],nt={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,
31
  fill:!0,fillColor:null,align:"left",horizontal:!1,zero:!0},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:{}},at=null,rt=null,lt=null,st=null,ct=null,ht=[],ft=[],ut={left:0,right:0,top:0,bottom:0},dt=0,pt=0,mt={processOptions:[],processRawData:[],processDatapoints:[],processOffset:[],drawBackground:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},xt=this;xt.setData=h,xt.setupGrid=W,xt.draw=P,xt.getPlaceholder=function(){return e},xt.getCanvas=function(){return at.element},xt.getPlotOffset=function(){return ut},xt.width=function(){return dt},xt.height=function(){return pt},xt.offset=function(){var t=lt.offset();return t.left+=ut.left,t.top+=ut.top,t},xt.getData=function(){return ot},xt.getAxes=function(){var i={};return t.each(ht.concat(ft),function(t,e){e&&(i[e.direction+(1!=e.n?e.n:"")+"axis"]=e)}),i},xt.getXAxes=function(){return ht},xt.getYAxes=function(){return ft},xt.c2p=p,xt.p2c=m,xt.getOptions=function(){return nt},xt.highlight=$,xt.unhighlight=K,xt.triggerRedrawOverlay=U,xt.pointOffset=function(t){return{left:parseInt(ht[u(t,"x")-1].p2c(+t.x)+ut.left,10),top:parseInt(ft[u(t,"y")-1].p2c(+t.y)+ut.top,10)}},xt.shutdown=y,xt.destroy=function(){y(),e.removeData("plot").empty(),ot=[],nt=null,at=null,rt=null,lt=null,st=null,ct=null,ht=[],ft=[],mt=null,gt=[],xt=null},xt.resize=function(){var t=e.width(),i=e.height();at.resize(t,i),rt.resize(t,i)},xt.hooks=mt,s(xt),c(a),v(),h(n),W(),P(),k();var gt=[],bt=null}function o(t,i){return i*Math.floor(t/i)}var n=Object.prototype.hasOwnProperty;t.fn.detach||(t.fn.detach=function(){return this.each(function(){this.parentNode&&this.parentNode.removeChild(this)})}),i.prototype.resize=function(t,i){if(0>=t||0>=i)throw new Error("Invalid dimensions for plot, width = "+t+", height = "+i);var e=this.element,o=this.context,n=this.pixelRatio;this.width!=t&&(e.width=t*n,e.style.width=t+"px",this.width=t),this.height!=i&&(e.height=i*n,e.style.height=i+"px",this.height=i),o.restore(),o.save(),o.scale(n,n)},i.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},i.prototype.render=function(){var t=this._textCache;for(var i in t)if(n.call(t,i)){var e=this.getTextLayer(i),o=t[i];e.hide();for(var a in o)if(n.call(o,a)){var r=o[a];for(var l in r)if(n.call(r,l)){for(var s,c=r[l].positions,h=0;s=c[h];h++)s.active?s.rendered||(e.append(s.element),s.rendered=!0):(c.splice(h--,1),s.rendered&&s.element.detach());0==c.length&&delete r[l]}}e.show()}},i.prototype.getTextLayer=function(i){var e=this.text[i];return null==e&&(null==this.textContainer&&(this.textContainer=t("<div class='flot-text'></div>").css({position:"absolute",top:0,left:0,bottom:0,right:0,"font-size":"smaller",color:"#545454"}).insertAfter(this.element)),e=this.text[i]=t("<div></div>").addClass(i).css({position:"absolute",top:0,left:0,bottom:0,right:0}).appendTo(this.textContainer)),e},i.prototype.getTextInfo=function(i,e,o,n,a){var r,l,s,c;if(e=""+e,r="object"==typeof o?o.style+" "+o.variant+" "+o.weight+" "+o.size+"px/"+o.lineHeight+"px "+o.family:o,l=this._textCache[i],null==l&&(l=this._textCache[i]={}),s=l[r],null==s&&(s=l[r]={}),c=s[e],null==c){var h=t("<div></div>").html(e).css({position:"absolute","max-width":a,top:-9999}).appendTo(this.getTextLayer(i));"object"==typeof o?h.css({font:r,color:o.color}):"string"==typeof o&&h.addClass(o),c=s[e]={width:h.outerWidth(!0),height:h.outerHeight(!0),element:h,positions:[]},h.detach()}return c},i.prototype.addText=function(t,i,e,o,n,a,r,l,s){var c=this.getTextInfo(t,o,n,a,r),h=c.positions;"center"==l?i-=c.width/2:"right"==l&&(i-=c.width),"middle"==s?e-=c.height/2:"bottom"==s&&(e-=c.height);for(var f,u=0;f=h[u];u++)if(f.x==i&&f.y==e)return void(f.active=!0);f={active:!0,rendered:!1,element:h.length?c.element.clone():c.element,x:i,y:e},h.push(f),f.element.css({top:Math.round(e),left:Math.round(i),"text-align":l})},i.prototype.removeText=function(t,i,e,o,a,r){if(null==o){var l=this._textCache[t];if(null!=l)for(var s in l)if(n.call(l,s)){var c=l[s];for(var h in c)if(n.call(c,h))for(var f,u=c[h].positions,d=0;f=u[d];d++)f.active=!1}}else for(var f,u=this.getTextInfo(t,o,a,r).positions,d=0;f=u[d];d++)f.x==i&&f.y==e&&(f.active=!1)},t.plot=function(i,o,n){var a=new e(t(i),o,n,t.plot.plugins);return a},t.plot.version="0.8.3",t.plot.plugins=[],t.fn.plot=function(i,e){return this.each(function(){t.plot(this,i,e)})}}(jQuery);
 
 
32
  //axisLabels 2.0
33
  !function(t){function i(){return!!document.createElement("canvas").getContext}function e(){if(!i())return!1;var t=document.createElement("canvas"),e=t.getContext("2d");return"function"==typeof e.fillText}function s(){var t=document.createElement("div");return"undefined"!=typeof t.style.MozTransition||"undefined"!=typeof t.style.OTransition||"undefined"!=typeof t.style.webkitTransition||"undefined"!=typeof t.style.transition}function o(t,i,e,s,o){this.axisName=t,this.position=i,this.padding=e,this.plot=s,this.opts=o,this.width=0,this.height=0}function a(t,i,e,s,a){o.prototype.constructor.call(this,t,i,e,s,a)}function l(t,i,e,s,a){o.prototype.constructor.call(this,t,i,e,s,a),this.elem=null}function h(t,i,e,s,o){l.prototype.constructor.call(this,t,i,e,s,o)}function n(t,i,e,s,o){h.prototype.constructor.call(this,t,i,e,s,o),this.requiresResize=!1}function r(i){i.hooks.processOptions.push(function(i,o){if(o.axisLabels.show){var r=!1,p={},d=2;i.hooks.draw.push(function(i,o){var f=!1;r?(r=!1,t.each(i.getAxes(),function(t,e){var s=e.options||i.getOptions()[t];s&&s.axisLabel&&e.show&&p[t].draw(e.box)})):(t.each(i.getAxes(),function(t,o){var r=o.options||i.getOptions()[t];if(t in p&&(o.labelHeight=o.labelHeight-p[t].height,o.labelWidth=o.labelWidth-p[t].width,r.labelHeight=o.labelHeight,r.labelWidth=o.labelWidth,p[t].cleanup(),delete p[t]),r&&r.axisLabel&&o.show){f=!0;var c=null;if(r.axisLabelUseHtml||"Microsoft Internet Explorer"!=navigator.appName)c=r.axisLabelUseHtml||!s()&&!e()&&!r.axisLabelUseCanvas?l:r.axisLabelUseCanvas||!s()?a:h;else{var b=navigator.userAgent,x=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");null!=x.exec(b)&&(rv=parseFloat(RegExp.$1)),c=rv>=9&&!r.axisLabelUseCanvas&&!r.axisLabelUseHtml?h:r.axisLabelUseCanvas||r.axisLabelUseHtml?r.axisLabelUseCanvas?a:l:n}var g=void 0===r.axisLabelPadding?d:r.axisLabelPadding;p[t]=new c(t,o.position,g,i,r),p[t].calculateSize(),r.labelHeight=o.labelHeight+p[t].height,r.labelWidth=o.labelWidth+p[t].width}}),f&&(r=!0,i.setupGrid(),i.draw()))})}})}var p={axisLabels:{show:!0}};o.prototype.cleanup=function(){},a.prototype=new o,a.prototype.constructor=a,a.prototype.calculateSize=function(){this.opts.axisLabelFontSizePixels||(this.opts.axisLabelFontSizePixels=14),this.opts.axisLabelFontFamily||(this.opts.axisLabelFontFamily="sans-serif");this.opts.axisLabelFontSizePixels+this.padding,this.opts.axisLabelFontSizePixels+this.padding;"left"==this.position||"right"==this.position?(this.width=this.opts.axisLabelFontSizePixels+this.padding,this.height=0):(this.width=0,this.height=this.opts.axisLabelFontSizePixels+this.padding)},a.prototype.draw=function(t){this.opts.axisLabelColour||(this.opts.axisLabelColour="black");var i=this.plot.getCanvas().getContext("2d");i.save(),i.font=this.opts.axisLabelFontSizePixels+"px "+this.opts.axisLabelFontFamily,i.fillStyle=this.opts.axisLabelColour;var e,s,o=i.measureText(this.opts.axisLabel).width,a=this.opts.axisLabelFontSizePixels,l=0;"top"==this.position?(e=t.left+t.width/2-o/2,s=t.top+.72*a):"bottom"==this.position?(e=t.left+t.width/2-o/2,s=t.top+t.height-.72*a):"left"==this.position?(e=t.left+.72*a,s=t.height/2+t.top+o/2,l=-Math.PI/2):"right"==this.position&&(e=t.left+t.width-.72*a,s=t.height/2+t.top-o/2,l=Math.PI/2),i.translate(e,s),i.rotate(l),i.fillText(this.opts.axisLabel,0,0),i.restore()},l.prototype=new o,l.prototype.constructor=l,l.prototype.calculateSize=function(){var i=t('<div class="axisLabels" style="position:absolute;">'+this.opts.axisLabel+"</div>");this.plot.getPlaceholder().append(i),this.labelWidth=i.outerWidth(!0),this.labelHeight=i.outerHeight(!0),i.remove(),this.width=this.height=0,"left"==this.position||"right"==this.position?this.width=this.labelWidth+this.padding:this.height=this.labelHeight+this.padding},l.prototype.cleanup=function(){this.elem&&this.elem.remove()},l.prototype.draw=function(i){this.plot.getPlaceholder().find("#"+this.axisName+"Label").remove(),this.elem=t('<div id="'+this.axisName+'Label" " class="axisLabels" style="position:absolute;">'+this.opts.axisLabel+"</div>"),this.plot.getPlaceholder().append(this.elem),"top"==this.position?(this.elem.css("left",i.left+i.width/2-this.labelWidth/2+"px"),this.elem.css("top",i.top+"px")):"bottom"==this.position?(this.elem.css("left",i.left+i.width/2-this.labelWidth/2+"px"),this.elem.css("top",i.top+i.height-this.labelHeight+"px")):"left"==this.position?(this.elem.css("top",i.top+i.height/2-this.labelHeight/2+"px"),this.elem.css("left",i.left+"px")):"right"==this.position&&(this.elem.css("top",i.top+i.height/2-this.labelHeight/2+"px"),this.elem.css("left",i.left+i.width-this.labelWidth+"px"))},h.prototype=new l,h.prototype.constructor=h,h.prototype.calculateSize=function(){l.prototype.calculateSize.call(this),this.width=this.height=0,"left"==this.position||"right"==this.position?this.width=this.labelHeight+this.padding:this.height=this.labelHeight+this.padding},h.prototype.transforms=function(t,i,e){var s={"-moz-transform":"","-webkit-transform":"","-o-transform":"","-ms-transform":""};if(0!=i||0!=e){var o=" translate("+i+"px, "+e+"px)";s["-moz-transform"]+=o,s["-webkit-transform"]+=o,s["-o-transform"]+=o,s["-ms-transform"]+=o}if(0!=t){var a=" rotate("+t+"deg)";s["-moz-transform"]+=a,s["-webkit-transform"]+=a,s["-o-transform"]+=a,s["-ms-transform"]+=a}var l="top: 0; left: 0; ";for(var h in s)s[h]&&(l+=h+":"+s[h]+";");return l+=";"},h.prototype.calculateOffsets=function(t){var i={x:0,y:0,degrees:0};return"bottom"==this.position?(i.x=t.left+t.width/2-this.labelWidth/2,i.y=t.top+t.height-this.labelHeight):"top"==this.position?(i.x=t.left+t.width/2-this.labelWidth/2,i.y=t.top):"left"==this.position?(i.degrees=-90,i.x=t.left-this.labelWidth/2+this.labelHeight/2,i.y=t.height/2+t.top):"right"==this.position&&(i.degrees=90,i.x=t.left+t.width-this.labelWidth/2-this.labelHeight/2,i.y=t.height/2+t.top),i.x=Math.round(i.x),i.y=Math.round(i.y),i},h.prototype.draw=function(i){this.plot.getPlaceholder().find("."+this.axisName+"Label").remove();var e=this.calculateOffsets(i);this.elem=t('<div class="axisLabels '+this.axisName+'Label" style="position:absolute; '+this.transforms(e.degrees,e.x,e.y)+'">'+this.opts.axisLabel+"</div>"),this.plot.getPlaceholder().append(this.elem)},n.prototype=new h,n.prototype.constructor=n,n.prototype.transforms=function(t,i,e){var s="";if(0!=t){for(var o=t/90;0>o;)o+=4;s+=" filter: progid:DXImageTransform.Microsoft.BasicImage(rotation="+o+"); ",this.requiresResize="right"==this.position}return 0!=i&&(s+="left: "+i+"px; "),0!=e&&(s+="top: "+e+"px; "),s},n.prototype.calculateOffsets=function(t){var i=h.prototype.calculateOffsets.call(this,t);return"top"==this.position?i.y=t.top+1:"left"==this.position?(i.x=t.left,i.y=t.height/2+t.top-this.labelWidth/2):"right"==this.position&&(i.x=t.left+t.width-this.labelHeight,i.y=t.height/2+t.top-this.labelWidth/2),i},n.prototype.draw=function(t){h.prototype.draw.call(this,t),this.requiresResize&&(this.elem=this.plot.getPlaceholder().find("."+this.axisName+"Label"),this.elem.css("width",this.labelWidth),this.elem.css("height",this.labelHeight))},t.plot.plugins.push({init:r,options:p,name:"axisLabels",version:"2.0"})}(jQuery);
34
  //improved orderBars 0.2 - github.com/emmerich
@@ -39,6 +44,8 @@ fill:!0,fillColor:null,align:"left",horizontal:!1,zero:!0},shadowSize:3,highligh
39
  (function($){var options={xaxis:{timezone:null,timeformat:null,twelveHourClock:false,monthNames:null}};function floorInBase(n,base){return base*Math.floor(n/base)}function formatDate(d,fmt,monthNames,dayNames){if(typeof d.strftime=="function"){return d.strftime(fmt)}var leftPad=function(n,pad){n=""+n;pad=""+(pad==null?"0":pad);return n.length==1?pad+n:n};var r=[];var escape=false;var hours=d.getHours();var isAM=hours<12;if(monthNames==null){monthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}if(dayNames==null){dayNames=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]}var hours12;if(hours>12){hours12=hours-12}else if(hours==0){hours12=12}else{hours12=hours}for(var i=0;i<fmt.length;++i){var c=fmt.charAt(i);if(escape){switch(c){case"a":c=""+dayNames[d.getDay()];break;case"b":c=""+monthNames[d.getMonth()];break;case"d":c=leftPad(d.getDate());break;case"e":c=leftPad(d.getDate()," ");break;case"h":case"H":c=leftPad(hours);break;case"I":c=leftPad(hours12);break;case"l":c=leftPad(hours12," ");break;case"m":c=leftPad(d.getMonth()+1);break;case"M":c=leftPad(d.getMinutes());break;case"q":c=""+(Math.floor(d.getMonth()/3)+1);break;case"S":c=leftPad(d.getSeconds());break;case"y":c=leftPad(d.getFullYear()%100);break;case"Y":c=""+d.getFullYear();break;case"p":c=isAM?""+"am":""+"pm";break;case"P":c=isAM?""+"AM":""+"PM";break;case"w":c=""+d.getDay();break}r.push(c);escape=false}else{if(c=="%"){escape=true}else{r.push(c)}}}return r.join("")}function makeUtcWrapper(d){function addProxyMethod(sourceObj,sourceMethod,targetObj,targetMethod){sourceObj[sourceMethod]=function(){return targetObj[targetMethod].apply(targetObj,arguments)}}var utc={date:d};if(d.strftime!=undefined){addProxyMethod(utc,"strftime",d,"strftime")}addProxyMethod(utc,"getTime",d,"getTime");addProxyMethod(utc,"setTime",d,"setTime");var props=["Date","Day","FullYear","Hours","Milliseconds","Minutes","Month","Seconds"];for(var p=0;p<props.length;p++){addProxyMethod(utc,"get"+props[p],d,"getUTC"+props[p]);addProxyMethod(utc,"set"+props[p],d,"setUTC"+props[p])}return utc}function dateGenerator(ts,opts){if(opts.timezone=="browser"){return new Date(ts)}else if(!opts.timezone||opts.timezone=="utc"){return makeUtcWrapper(new Date(ts))}else if(typeof timezoneJS!="undefined"&&typeof timezoneJS.Date!="undefined"){var d=new timezoneJS.Date;d.setTimezone(opts.timezone);d.setTime(ts);return d}else{return makeUtcWrapper(new Date(ts))}}var timeUnitSize={second:1e3,minute:60*1e3,hour:60*60*1e3,day:24*60*60*1e3,month:30*24*60*60*1e3,quarter:3*30*24*60*60*1e3,year:365.2425*24*60*60*1e3};var baseSpec=[[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"]];var specMonths=baseSpec.concat([[3,"month"],[6,"month"],[1,"year"]]);var specQuarters=baseSpec.concat([[1,"quarter"],[2,"quarter"],[1,"year"]]);function init(plot){plot.hooks.processOptions.push(function(plot,options){$.each(plot.getAxes(),function(axisName,axis){var opts=axis.options;if(opts.mode=="time"){axis.tickGenerator=function(axis){var ticks=[];var d=dateGenerator(axis.min,opts);var minSize=0;var spec=opts.tickSize&&opts.tickSize[1]==="quarter"||opts.minTickSize&&opts.minTickSize[1]==="quarter"?specQuarters:specMonths;if(opts.minTickSize!=null){if(typeof opts.tickSize=="number"){minSize=opts.tickSize}else{minSize=opts.minTickSize[0]*timeUnitSize[opts.minTickSize[1]]}}for(var i=0;i<spec.length-1;++i){if(axis.delta<(spec[i][0]*timeUnitSize[spec[i][1]]+spec[i+1][0]*timeUnitSize[spec[i+1][1]])/2&&spec[i][0]*timeUnitSize[spec[i][1]]>=minSize){break}}var size=spec[i][0];var unit=spec[i][1];if(unit=="year"){if(opts.minTickSize!=null&&opts.minTickSize[1]=="year"){size=Math.floor(opts.minTickSize[0])}else{var magn=Math.pow(10,Math.floor(Math.log(axis.delta/timeUnitSize.year)/Math.LN10));var norm=axis.delta/timeUnitSize.year/magn;if(norm<1.5){size=1}else if(norm<3){size=2}else if(norm<7.5){size=5}else{size=10}size*=magn}if(size<1){size=1}}axis.tickSize=opts.tickSize||[size,unit];var tickSize=axis.tickSize[0];unit=axis.tickSize[1];var step=tickSize*timeUnitSize[unit];if(unit=="second"){d.setSeconds(floorInBase(d.getSeconds(),tickSize))}else if(unit=="minute"){d.setMinutes(floorInBase(d.getMinutes(),tickSize))}else if(unit=="hour"){d.setHours(floorInBase(d.getHours(),tickSize))}else if(unit=="month"){d.setMonth(floorInBase(d.getMonth(),tickSize))}else if(unit=="quarter"){d.setMonth(3*floorInBase(d.getMonth()/3,tickSize))}else if(unit=="year"){d.setFullYear(floorInBase(d.getFullYear(),tickSize))}d.setMilliseconds(0);if(step>=timeUnitSize.minute){d.setSeconds(0)}if(step>=timeUnitSize.hour){d.setMinutes(0)}if(step>=timeUnitSize.day){d.setHours(0)}if(step>=timeUnitSize.day*4){d.setDate(1)}if(step>=timeUnitSize.month*2){d.setMonth(floorInBase(d.getMonth(),3))}if(step>=timeUnitSize.quarter*2){d.setMonth(floorInBase(d.getMonth(),6))}if(step>=timeUnitSize.year){d.setMonth(0)}var carry=0;var v=Number.NaN;var prev;do{prev=v;v=d.getTime();ticks.push(v);if(unit=="month"||unit=="quarter"){if(tickSize<1){d.setDate(1);var start=d.getTime();d.setMonth(d.getMonth()+(unit=="quarter"?3:1));var end=d.getTime();d.setTime(v+carry*timeUnitSize.hour+(end-start)*tickSize);carry=d.getHours();d.setHours(0)}else{d.setMonth(d.getMonth()+tickSize*(unit=="quarter"?3:1))}}else if(unit=="year"){d.setFullYear(d.getFullYear()+tickSize)}else{d.setTime(v+step)}}while(v<axis.max&&v!=prev);return ticks};axis.tickFormatter=function(v,axis){var d=dateGenerator(v,axis.options);if(opts.timeformat!=null){return formatDate(d,opts.timeformat,opts.monthNames,opts.dayNames)}var useQuarters=axis.options.tickSize&&axis.options.tickSize[1]=="quarter"||axis.options.minTickSize&&axis.options.minTickSize[1]=="quarter";var t=axis.tickSize[0]*timeUnitSize[axis.tickSize[1]];var span=axis.max-axis.min;var suffix=opts.twelveHourClock?" %p":"";var hourCode=opts.twelveHourClock?"%I":"%H";var fmt;if(t<timeUnitSize.minute){fmt=hourCode+":%M:%S"+suffix}else if(t<timeUnitSize.day){if(span<2*timeUnitSize.day){fmt=hourCode+":%M"+suffix}else{fmt="%b %d "+hourCode+":%M"+suffix}}else if(t<timeUnitSize.month){fmt="%b %d"}else if(useQuarters&&t<timeUnitSize.quarter||!useQuarters&&t<timeUnitSize.year){if(span<timeUnitSize.year){fmt="%b"}else{fmt="%b %Y"}}else if(useQuarters&&t<timeUnitSize.year){if(span<timeUnitSize.year){fmt="Q%q"}else{fmt="Q%q %Y"}}else{fmt="%Y"}var rt=formatDate(d,fmt,opts.monthNames,opts.dayNames);return rt}}})})}$.plot.plugins.push({init:init,options:options,name:"time",version:"1.0"});$.plot.formatDate=formatDate})(jQuery);
40
  //resize",version:"1.0"
41
  (function($,e,t){"$:nomunge";var i=[],n=$.resize=$.extend($.resize,{}),a,r=false,s="setTimeout",u="resize",m=u+"-special-event",o="pendingDelay",l="activeDelay",f="throttleWindow";n[o]=200;n[l]=20;n[f]=true;$.event.special[u]={setup:function(){if(!n[f]&&this[s]){return false}var e=$(this);i.push(this);e.data(m,{w:e.width(),h:e.height()});if(i.length===1){a=t;h()}},teardown:function(){if(!n[f]&&this[s]){return false}var e=$(this);for(var t=i.length-1;t>=0;t--){if(i[t]==this){i.splice(t,1);break}}e.removeData(m);if(!i.length){if(r){cancelAnimationFrame(a)}else{clearTimeout(a)}a=null}},add:function(e){if(!n[f]&&this[s]){return false}var i;function a(e,n,a){var r=$(this),s=r.data(m)||{};s.w=n!==t?n:r.width();s.h=a!==t?a:r.height();i.apply(this,arguments)}if($.isFunction(e)){i=e;return a}else{i=e.handler;e.handler=a}}};function h(t){if(r===true){r=t||1}for(var s=i.length-1;s>=0;s--){var l=$(i[s]);if(l[0]==e||l.is(":visible")){var f=l.width(),c=l.height(),d=l.data(m);if(d&&(f!==d.w||c!==d.h)){l.trigger(u,[d.w=f,d.h=c]);r=t||true}}else{d=l.data(m);d.w=0;d.h=0}}if(a!==null){if(r&&(t==null||t-r<1e3)){a=e.requestAnimationFrame(h)}else{a=setTimeout(h,n[o]);r=false}}}if(!e.requestAnimationFrame){e.requestAnimationFrame=function(){return e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t,i){return e.setTimeout(function(){t((new Date).getTime())},n[l])}}()}if(!e.cancelAnimationFrame){e.cancelAnimationFrame=function(){return e.webkitCancelRequestAnimationFrame||e.mozCancelRequestAnimationFrame||e.oCancelRequestAnimationFrame||e.msCancelRequestAnimationFrame||clearTimeout}()}})(jQuery,this);(function($){var options={};function init(plot){function onResize(){var placeholder=plot.getPlaceholder();if(placeholder.width()==0||placeholder.height()==0)return;plot.resize();plot.setupGrid();plot.draw()}function bindEvents(plot,eventHolder){plot.getPlaceholder().resize(onResize)}function shutdown(plot,eventHolder){plot.getPlaceholder().unbind("resize",onResize)}plot.hooks.bindEvents.push(bindEvents);plot.hooks.shutdown.push(shutdown)}$.plot.plugins.push({init:init,options:options,name:"resize",version:"1.0"})})(jQuery);
 
 
42
 
43
  /* jquery.sparkline 2.1.2 - http://omnipotent.net/jquery.sparkline/
44
 
@@ -417,7 +424,13 @@ var lrgaaccountID;
417
  var webPropertyID;
418
  var profileID;
419
  var webPropertyUrl;
 
420
 
 
 
 
 
 
421
 
422
  function getProfileDetails(id){
423
  var cProfile = {};
@@ -517,16 +530,18 @@ $(document).ready(function(){
517
 
518
  $("#lrgawidget-setProfileID").submit(function(e) {
519
  e.preventDefault();
 
520
  lrWidgetSettings($("#lrgawidget-setProfileID").serializeArray()).done(function (data, textStatus, jqXHR) {
521
  if (data.status == "done"){
522
  $("#lrgawidget a[data-target^='#lrgawidget_']:eq(0)").click();
 
523
  }
524
  })
525
  });
526
 
527
  $('#lrga-wizard').on('changed.fu.wizard', function (evt, data) {
528
- $("#lrgawidget-save-settings").prop('disabled',true);
529
  if ($("[data-step="+data.step+"]").attr("data-name") == "lrga-profile"){
 
530
  lrWidgetSettings({action: "getProfiles"}).done(function (data, textStatus, jqXHR) {
531
  if (data.status == "done"){
532
  lrgaaccountID = data.current_selected.account_id;
@@ -534,8 +549,15 @@ $(document).ready(function(){
534
  profileID = data.current_selected.profile_id;
535
  lrgaAccounts = data.all_accounts;
536
  lrgaProfiles = data.all_profiles;
 
 
 
 
 
 
 
 
537
  populateViews();
538
- $("#lrgawidget-save-settings").prop('disabled',false);
539
  setup = false;
540
  }
541
  })
@@ -585,6 +607,16 @@ $(document).ready(function(){
585
  $("[data-reload='lrgawidget_go_express']").hide();
586
  $('#lrga-wizard').wizard('selectedItem', {step: 1});
587
  $("#lrgawidget_express_setup").show();
 
 
 
 
 
 
 
 
 
 
588
  });
589
 
590
  });
@@ -805,6 +837,12 @@ function lrLegendFormatter(label, series){
805
  }
806
 
807
  function drawGraph(data,name){
 
 
 
 
 
 
808
  var settings = mainChartDefaults;
809
  var totalSales = 0;
810
  var totalEarnings = 0;
@@ -820,14 +858,41 @@ function drawGraph(data,name){
820
  currentPlotData = {};
821
  }
822
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
823
  mainChart = $.plot($("#lrgawidget_sessions_chartDiv"), gData, settings);
824
  currentPlotData = mainChart.getData();
825
 
826
  if( $('#lrga-legendholder').is(':empty')) {$("#lrga-legendholder").hide();} else{$("#lrga-legendholder").show();}
827
 
828
- if ((totalSales > 0 || totalEarnings > 0) && (graphData.settings.showtotal == "on") ){
829
- $("#lrga-legendholder table tr:last").after('<tr class="legendTotals"><td class="legendColorBox"></td><td class="legendLabel">Total</td><td class="legendEarnings">'+plotData["earnings"]["config"]["lrbefore"]+totalEarnings.toFixed(2)+plotData["earnings"]["config"]["lrafter"]+'</td><td>|</td><td class="legendSales">'+totalSales+'</td></tr>');
830
- }
 
 
 
831
 
832
  $('<div class="tooltip-inner" id="lrgawidget_sessions_chart_tooltip"></div>').css({
833
  "text-align": "left",
@@ -911,6 +976,8 @@ function drawSparkline(id, data, color){
911
  var plotData = {};
912
  var plotTotalData = {};
913
  var selectedPname = "";
 
 
914
 
915
  function drawMainGraphWidgets(data, selected){
916
  if ($('#lrgawidget_sb-main').is(":visible")){
@@ -928,6 +995,12 @@ function drawMainGraphWidgets(data, selected){
928
  function drawMainGraph(){
929
  lrWidgetSettings({action : "getSessions"}).done(function (data, textStatus, jqXHR) {
930
  if (data.status == "done" && data.setup !== 1){
 
 
 
 
 
 
931
  plotData = data.plotdata;
932
  plotTotalData = data.totalsForAllResults;
933
  if (!selectedPname){selectedPname = "sessions";}
@@ -938,11 +1011,194 @@ function drawMainGraph(){
938
  });
939
  }
940
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
941
 
942
  function setOptionsGrid(){
943
  $('.lroptions-checkbox-grid[data-lr-roleid="administrator"][data-lr-groupid="permissions"]').find('input:checkbox').prop('checked',true).prop("disabled", true);
944
  $('.lrgawidget_permissions_switch[data-lr-roleid="administrator"][data-lr-groupid="permissions"]').prop('checked',true).prop("disabled", true);
945
  $('.lrgawidget_permissions_switch[data-lr-roleid="administrator"][data-lr-groupid="tabs"]').prop('checked',true).change();
 
946
  }
947
 
948
  function getPermissions(){
@@ -955,13 +1211,13 @@ function getPermissions(){
955
  rolesHTML += '<li><a href="#lrrole_'+role.id+'" data-toggle="pill"><i class="fa fa-users fa-fw"></i>'+role.name+'</a></li>';
956
  permissionsHTML += '<div class="tab-pane" id="lrrole_'+role.id+'">';
957
  $.each(data.group_permissions, function( y, group ){
958
- permissionsHTML += '<div class="box box-primary"> <div class="box-header with-border"> <h3 class="box-title"><i class="fa '+group.icon+'"></i> '+group.name+'</h3> <input type="hidden" name="lrperms['+role.id+'][]" value="'+group.id+'"> <span class="pull-right"> <label class="switch"> <input type="checkbox" class="lrgawidget_permissions_switch" data-lr-roleid="'+role.id+'" data-lr-groupid="'+group.id+'"> <div class="slider "></div> </label> </span> </div> <div class="box-body lroptions-checkbox-grid" data-lr-roleid="'+role.id+'" data-lr-groupid="'+group.id+'">';
959
  $.each(group.permissions, function( x, permission ){
960
  var checked = "";
961
  if($.inArray(permission.name, data.role_permissions[role.id] ) !== -1){
962
  checked = "checked";
963
  }
964
- permissionsHTML += ' <div> <label><input '+checked+' name="lrperms['+role.id+'][]" type="checkbox" value="'+permission.name+'"> '+permission.label+'</label> </div>';
965
  });
966
 
967
  permissionsHTML += ' </div> </div>';
@@ -973,7 +1229,15 @@ function getPermissions(){
973
  $("#lrgawidget_permissions_list").html(permissionsHTML);
974
  $('#lrgawidget_permissions_roles a:first').tab('show');
975
  $(".lrgawidget_permissions_switch").change(function(){
976
- $('.lroptions-checkbox-grid[data-lr-roleid="'+$(this).data("lr-roleid")+'"][data-lr-groupid="'+$(this).data("lr-groupid")+'"]').find('input:checkbox').prop('checked',this.checked).prop("disabled", !this.checked);
 
 
 
 
 
 
 
 
977
  });
978
  setOptionsGrid();
979
  }
@@ -1007,7 +1271,11 @@ $(document).ready(function(){
1007
  });
1008
 
1009
  $("#lrgawidget_main a[data-toggle='tab']").on('shown.bs.tab', function (e) {
1010
-
 
 
 
 
1011
  $("#lrgawidget_sessions_chart_tooltip").remove();
1012
 
1013
  if (this.hash == "#lrgawidget_settings_tab"){
@@ -1090,6 +1358,31 @@ $(document).ready(function(){
1090
  $("#lrgawidget a[data-target='#"+actLrgaTabs+"']").tab('show');
1091
  }
1092
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1093
  $(".lrgawidget_view_demo").colorbox({iframe:true, innerWidth:"80%", innerHeight:575, scrolling: false});
1094
  });
1095
 
17
  if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.6",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.6",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.6",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.6",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.6",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.6",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.6",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");
18
  d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.6",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.6",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
19
 
20
+ // jQuery MiniColors v2.2.6 : A tiny color picker built on jQuery - Developed by Cory LaViska for A Beautiful Site, LLC
21
+ !function(i){"function"==typeof define&&define.amd?define(["jquery"],i):"object"==typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";function t(t,o){var s,a,n,e,r,l=i('<div class="minicolors" />'),h=i.minicolors.defaults;if(!t.data("minicolors-initialized")){if(o=i.extend(!0,{},h,o),l.addClass("minicolors-theme-"+o.theme).toggleClass("minicolors-with-opacity",o.opacity),void 0!==o.position&&i.each(o.position.split(" "),function(){l.addClass("minicolors-position-"+this)}),s="rgb"===o.format?o.opacity?"25":"20":o.keywords?"11":"7",t.addClass("minicolors-input").data("minicolors-initialized",!1).data("minicolors-settings",o).prop("size",s).wrap(l).after('<div class="minicolors-panel minicolors-slider-'+o.control+'"><div class="minicolors-slider minicolors-sprite"><div class="minicolors-picker"></div></div><div class="minicolors-opacity-slider minicolors-sprite"><div class="minicolors-picker"></div></div><div class="minicolors-grid minicolors-sprite"><div class="minicolors-grid-inner"></div><div class="minicolors-picker"><div></div></div></div></div>'),o.inline||(t.after('<span class="minicolors-swatch minicolors-sprite minicolors-input-swatch"><span class="minicolors-swatch-color"></span></span>'),t.next(".minicolors-input-swatch").on("click",function(i){i.preventDefault(),t.focus()})),e=t.parent().find(".minicolors-panel"),e.on("selectstart",function(){return!1}).end(),o.swatches&&0!==o.swatches.length)for(e.addClass("minicolors-with-swatches"),a=i('<ul class="minicolors-swatches"></ul>').appendTo(e),r=0;r<o.swatches.length;++r)n=o.swatches[r],n=v(n)?g(n,!0):I(u(n,!0)),i('<li class="minicolors-swatch minicolors-sprite"><span class="minicolors-swatch-color"></span></li>').appendTo(a).data("swatch-color",o.swatches[r]).find(".minicolors-swatch-color").css({backgroundColor:C(n),opacity:n.a}),o.swatches[r]=n;o.inline&&t.parent().addClass("minicolors-inline"),c(t,!1),t.data("minicolors-initialized",!0)}}function o(i){var t=i.parent();i.removeData("minicolors-initialized").removeData("minicolors-settings").removeProp("size").removeClass("minicolors-input"),t.before(i).remove()}function s(i){var t=i.parent(),o=t.find(".minicolors-panel"),s=i.data("minicolors-settings");!i.data("minicolors-initialized")||i.prop("disabled")||t.hasClass("minicolors-inline")||t.hasClass("minicolors-focus")||(a(),t.addClass("minicolors-focus"),o.stop(!0,!0).fadeIn(s.showSpeed,function(){s.show&&s.show.call(i.get(0))}))}function a(){i(".minicolors-focus").each(function(){var t=i(this),o=t.find(".minicolors-input"),s=t.find(".minicolors-panel"),a=o.data("minicolors-settings");s.fadeOut(a.hideSpeed,function(){a.hide&&a.hide.call(o.get(0)),t.removeClass("minicolors-focus")})})}function n(i,t,o){var s,a,n,r,c=i.parents(".minicolors").find(".minicolors-input"),l=c.data("minicolors-settings"),h=i.find("[class$=-picker]"),d=i.offset().left,p=i.offset().top,u=Math.round(t.pageX-d),g=Math.round(t.pageY-p),m=o?l.animationSpeed:0;t.originalEvent.changedTouches&&(u=t.originalEvent.changedTouches[0].pageX-d,g=t.originalEvent.changedTouches[0].pageY-p),u<0&&(u=0),g<0&&(g=0),u>i.width()&&(u=i.width()),g>i.height()&&(g=i.height()),i.parent().is(".minicolors-slider-wheel")&&h.parent().is(".minicolors-grid")&&(s=75-u,a=75-g,n=Math.sqrt(s*s+a*a),r=Math.atan2(a,s),r<0&&(r+=2*Math.PI),n>75&&(n=75,u=75-75*Math.cos(r),g=75-75*Math.sin(r)),u=Math.round(u),g=Math.round(g)),i.is(".minicolors-grid")?h.stop(!0).animate({top:g+"px",left:u+"px"},m,l.animationEasing,function(){e(c,i)}):h.stop(!0).animate({top:g+"px"},m,l.animationEasing,function(){e(c,i)})}function e(i,t){function o(i,t){var o,s;return i.length&&t?(o=i.offset().left,s=i.offset().top,{x:o-t.offset().left+i.outerWidth()/2,y:s-t.offset().top+i.outerHeight()/2}):null}var s,a,n,e,c,h,d,p=i.val(),u=i.attr("data-opacity"),g=i.parent(),m=i.data("minicolors-settings"),v=g.find(".minicolors-input-swatch"),b=g.find(".minicolors-grid"),w=g.find(".minicolors-slider"),y=g.find(".minicolors-opacity-slider"),C=b.find("[class$=-picker]"),M=w.find("[class$=-picker]"),x=y.find("[class$=-picker]"),I=o(C,b),S=o(M,w),z=o(x,y);if(t.is(".minicolors-grid, .minicolors-slider, .minicolors-opacity-slider")){switch(m.control){case"wheel":e=b.width()/2-I.x,c=b.height()/2-I.y,h=Math.sqrt(e*e+c*c),d=Math.atan2(c,e),d<0&&(d+=2*Math.PI),h>75&&(h=75,I.x=69-75*Math.cos(d),I.y=69-75*Math.sin(d)),a=f(h/.75,0,100),s=f(180*d/Math.PI,0,360),n=f(100-Math.floor(S.y*(100/w.height())),0,100),p=k({h:s,s:a,b:n}),w.css("backgroundColor",k({h:s,s:a,b:100}));break;case"saturation":s=f(parseInt(I.x*(360/b.width()),10),0,360),a=f(100-Math.floor(S.y*(100/w.height())),0,100),n=f(100-Math.floor(I.y*(100/b.height())),0,100),p=k({h:s,s:a,b:n}),w.css("backgroundColor",k({h:s,s:100,b:n})),g.find(".minicolors-grid-inner").css("opacity",a/100);break;case"brightness":s=f(parseInt(I.x*(360/b.width()),10),0,360),a=f(100-Math.floor(I.y*(100/b.height())),0,100),n=f(100-Math.floor(S.y*(100/w.height())),0,100),p=k({h:s,s:a,b:n}),w.css("backgroundColor",k({h:s,s:a,b:100})),g.find(".minicolors-grid-inner").css("opacity",1-n/100);break;default:s=f(360-parseInt(S.y*(360/w.height()),10),0,360),a=f(Math.floor(I.x*(100/b.width())),0,100),n=f(100-Math.floor(I.y*(100/b.height())),0,100),p=k({h:s,s:a,b:n}),b.css("backgroundColor",k({h:s,s:100,b:100}))}u=m.opacity?parseFloat(1-z.y/y.height()).toFixed(2):1,r(i,p,u)}else v.find("span").css({backgroundColor:p,opacity:u}),l(i,p,u)}function r(i,t,o){var s,a=i.parent(),n=i.data("minicolors-settings"),e=a.find(".minicolors-input-swatch");n.opacity&&i.attr("data-opacity",o),"rgb"===n.format?(s=v(t)?g(t,!0):I(u(t,!0)),o=""===i.attr("data-opacity")?1:f(parseFloat(i.attr("data-opacity")).toFixed(2),0,1),!isNaN(o)&&n.opacity||(o=1),t=i.minicolors("rgbObject").a<=1&&s&&n.opacity?"rgba("+s.r+", "+s.g+", "+s.b+", "+parseFloat(o)+")":"rgb("+s.r+", "+s.g+", "+s.b+")"):(v(t)&&(t=y(t)),t=p(t,n.letterCase)),i.val(t),e.find("span").css({backgroundColor:t,opacity:o}),l(i,t,o)}function c(t,o){var s,a,n,e,r,c,h,d,w,C,x=t.parent(),I=t.data("minicolors-settings"),S=x.find(".minicolors-input-swatch"),z=x.find(".minicolors-grid"),F=x.find(".minicolors-slider"),T=x.find(".minicolors-opacity-slider"),D=z.find("[class$=-picker]"),j=F.find("[class$=-picker]"),q=T.find("[class$=-picker]");switch(v(t.val())?(s=y(t.val()),r=f(parseFloat(b(t.val())).toFixed(2),0,1),r&&t.attr("data-opacity",r)):s=p(u(t.val(),!0),I.letterCase),s||(s=p(m(I.defaultValue,!0),I.letterCase)),a=M(s),e=I.keywords?i.map(I.keywords.split(","),function(t){return i.trim(t.toLowerCase())}):[],c=""!==t.val()&&i.inArray(t.val().toLowerCase(),e)>-1?p(t.val()):v(t.val())?g(t.val()):s,o||t.val(c),I.opacity&&(n=""===t.attr("data-opacity")?1:f(parseFloat(t.attr("data-opacity")).toFixed(2),0,1),isNaN(n)&&(n=1),t.attr("data-opacity",n),S.find("span").css("opacity",n),d=f(T.height()-T.height()*n,0,T.height()),q.css("top",d+"px")),"transparent"===t.val().toLowerCase()&&S.find("span").css("opacity",0),S.find("span").css("backgroundColor",s),I.control){case"wheel":w=f(Math.ceil(.75*a.s),0,z.height()/2),C=a.h*Math.PI/180,h=f(75-Math.cos(C)*w,0,z.width()),d=f(75-Math.sin(C)*w,0,z.height()),D.css({top:d+"px",left:h+"px"}),d=150-a.b/(100/z.height()),""===s&&(d=0),j.css("top",d+"px"),F.css("backgroundColor",k({h:a.h,s:a.s,b:100}));break;case"saturation":h=f(5*a.h/12,0,150),d=f(z.height()-Math.ceil(a.b/(100/z.height())),0,z.height()),D.css({top:d+"px",left:h+"px"}),d=f(F.height()-a.s*(F.height()/100),0,F.height()),j.css("top",d+"px"),F.css("backgroundColor",k({h:a.h,s:100,b:a.b})),x.find(".minicolors-grid-inner").css("opacity",a.s/100);break;case"brightness":h=f(5*a.h/12,0,150),d=f(z.height()-Math.ceil(a.s/(100/z.height())),0,z.height()),D.css({top:d+"px",left:h+"px"}),d=f(F.height()-a.b*(F.height()/100),0,F.height()),j.css("top",d+"px"),F.css("backgroundColor",k({h:a.h,s:a.s,b:100})),x.find(".minicolors-grid-inner").css("opacity",1-a.b/100);break;default:h=f(Math.ceil(a.s/(100/z.width())),0,z.width()),d=f(z.height()-Math.ceil(a.b/(100/z.height())),0,z.height()),D.css({top:d+"px",left:h+"px"}),d=f(F.height()-a.h/(360/F.height()),0,F.height()),j.css("top",d+"px"),z.css("backgroundColor",k({h:a.h,s:100,b:100}))}t.data("minicolors-initialized")&&l(t,c,n)}function l(i,t,o){var s,a,n,e=i.data("minicolors-settings"),r=i.data("minicolors-lastChange");if(!r||r.value!==t||r.opacity!==o){if(i.data("minicolors-lastChange",{value:t,opacity:o}),e.swatches&&0!==e.swatches.length){for(s=v(t)?g(t,!0):I(t),a=-1,n=0;n<e.swatches.length;++n)if(s.r===e.swatches[n].r&&s.g===e.swatches[n].g&&s.b===e.swatches[n].b&&s.a===e.swatches[n].a){a=n;break}i.parent().find(".minicolors-swatches .minicolors-swatch").removeClass("selected"),a!==-1&&i.parent().find(".minicolors-swatches .minicolors-swatch").eq(n).addClass("selected")}e.change&&(e.changeDelay?(clearTimeout(i.data("minicolors-changeTimeout")),i.data("minicolors-changeTimeout",setTimeout(function(){e.change.call(i.get(0),t,o)},e.changeDelay))):e.change.call(i.get(0),t,o)),i.trigger("change").trigger("input")}}function h(t){var o,s=i(t).attr("data-opacity");if(v(i(t).val()))o=g(i(t).val(),!0);else{var a=u(i(t).val(),!0);o=I(a)}return o?(void 0!==s&&i.extend(o,{a:parseFloat(s)}),o):null}function d(t,o){var s,a=i(t).attr("data-opacity");if(v(i(t).val()))s=g(i(t).val(),!0);else{var n=u(i(t).val(),!0);s=I(n)}return s?(void 0===a&&(a=1),o?"rgba("+s.r+", "+s.g+", "+s.b+", "+parseFloat(a)+")":"rgb("+s.r+", "+s.g+", "+s.b+")"):null}function p(i,t){return"uppercase"===t?i.toUpperCase():i.toLowerCase()}function u(i,t){return i=i.replace(/^#/g,""),i.match(/^[A-F0-9]{3,6}/gi)?3!==i.length&&6!==i.length?"":(3===i.length&&t&&(i=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]),"#"+i):""}function g(i,t){var o=i.replace(/[^\d,.]/g,""),s=o.split(",");return s[0]=f(parseInt(s[0],10),0,255),s[1]=f(parseInt(s[1],10),0,255),s[2]=f(parseInt(s[2],10),0,255),s[3]&&(s[3]=f(parseFloat(s[3],10),0,1)),t?s[3]?{r:s[0],g:s[1],b:s[2],a:s[3]}:{r:s[0],g:s[1],b:s[2]}:"undefined"!=typeof s[3]&&s[3]<=1?"rgba("+s[0]+", "+s[1]+", "+s[2]+", "+s[3]+")":"rgb("+s[0]+", "+s[1]+", "+s[2]+")"}function m(i,t){return v(i)?g(i):u(i,t)}function f(i,t,o){return i<t&&(i=t),i>o&&(i=o),i}function v(i){var t=i.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return!(!t||4!==t.length)}function b(i){return i=i.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+(\.\d{1,2})?|\.\d{1,2})[\s+]?/i),i&&6===i.length?i[4]:"1"}function w(i){var t={},o=Math.round(i.h),s=Math.round(255*i.s/100),a=Math.round(255*i.b/100);if(0===s)t.r=t.g=t.b=a;else{var n=a,e=(255-s)*a/255,r=(n-e)*(o%60)/60;360===o&&(o=0),o<60?(t.r=n,t.b=e,t.g=e+r):o<120?(t.g=n,t.b=e,t.r=n-r):o<180?(t.g=n,t.r=e,t.b=e+r):o<240?(t.b=n,t.r=e,t.g=n-r):o<300?(t.b=n,t.g=e,t.r=e+r):o<360?(t.r=n,t.g=e,t.b=n-r):(t.r=0,t.g=0,t.b=0)}return{r:Math.round(t.r),g:Math.round(t.g),b:Math.round(t.b)}}function y(i){return i=i.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i),i&&4===i.length?"#"+("0"+parseInt(i[1],10).toString(16)).slice(-2)+("0"+parseInt(i[2],10).toString(16)).slice(-2)+("0"+parseInt(i[3],10).toString(16)).slice(-2):""}function C(t){var o=[t.r.toString(16),t.g.toString(16),t.b.toString(16)];return i.each(o,function(i,t){1===t.length&&(o[i]="0"+t)}),"#"+o.join("")}function k(i){return C(w(i))}function M(i){var t=x(I(i));return 0===t.s&&(t.h=360),t}function x(i){var t={h:0,s:0,b:0},o=Math.min(i.r,i.g,i.b),s=Math.max(i.r,i.g,i.b),a=s-o;return t.b=s,t.s=0!==s?255*a/s:0,0!==t.s?i.r===s?t.h=(i.g-i.b)/a:i.g===s?t.h=2+(i.b-i.r)/a:t.h=4+(i.r-i.g)/a:t.h=-1,t.h*=60,t.h<0&&(t.h+=360),t.s*=100/255,t.b*=100/255,t}function I(i){return i=parseInt(i.indexOf("#")>-1?i.substring(1):i,16),{r:i>>16,g:(65280&i)>>8,b:255&i}}i.minicolors={defaults:{animationSpeed:50,animationEasing:"swing",change:null,changeDelay:0,control:"hue",defaultValue:"",format:"hex",hide:null,hideSpeed:100,inline:!1,keywords:"",letterCase:"lowercase",opacity:!1,position:"bottom left",show:null,showSpeed:100,theme:"default",swatches:[]}},i.extend(i.fn,{minicolors:function(n,e){switch(n){case"destroy":return i(this).each(function(){o(i(this))}),i(this);case"hide":return a(),i(this);case"opacity":return void 0===e?i(this).attr("data-opacity"):(i(this).each(function(){c(i(this).attr("data-opacity",e))}),i(this));case"rgbObject":return h(i(this),"rgbaObject"===n);case"rgbString":case"rgbaString":return d(i(this),"rgbaString"===n);case"settings":return void 0===e?i(this).data("minicolors-settings"):(i(this).each(function(){var t=i(this).data("minicolors-settings")||{};o(i(this)),i(this).minicolors(i.extend(!0,t,e))}),i(this));case"show":return s(i(this).eq(0)),i(this);case"value":return void 0===e?i(this).val():(i(this).each(function(){"object"==typeof e&&"null"!==e?(e.opacity&&i(this).attr("data-opacity",f(e.opacity,0,1)),e.color&&i(this).val(e.color)):i(this).val(e),c(i(this))}),i(this));default:return"create"!==n&&(e=n),i(this).each(function(){t(i(this),e)}),i(this)}}}),i([document,top.document]).on("mousedown.minicolors touchstart.minicolors",function(t){i(t.target).parents().add(t.target).hasClass("minicolors")||a()}).on("mousedown.minicolors touchstart.minicolors",".minicolors-grid, .minicolors-slider, .minicolors-opacity-slider",function(t){var o=i(this);t.preventDefault(),i(t.delegateTarget).data("minicolors-target",o),n(o,t,!0)}).on("mousemove.minicolors touchmove.minicolors",function(t){var o=i(t.delegateTarget).data("minicolors-target");o&&n(o,t)}).on("mouseup.minicolors touchend.minicolors",function(){i(this).removeData("minicolors-target")}).on("click.minicolors",".minicolors-swatches li",function(t){t.preventDefault();var o=i(this),s=o.parents(".minicolors").find(".minicolors-input"),a=o.data("swatch-color");r(s,a,b(a)),c(s)}).on("mousedown.minicolors touchstart.minicolors",".minicolors-input-swatch",function(t){var o=i(this).parent().find(".minicolors-input");t.preventDefault(),s(o)}).on("focus.minicolors",".minicolors-input",function(){var t=i(this);t.data("minicolors-initialized")&&s(t)}).on("blur.minicolors",".minicolors-input",function(){var t,o,s,a,n,e=i(this),r=e.data("minicolors-settings");e.data("minicolors-initialized")&&(t=r.keywords?i.map(r.keywords.split(","),function(t){return i.trim(t.toLowerCase())}):[],""!==e.val()&&i.inArray(e.val().toLowerCase(),t)>-1?n=e.val():(v(e.val())?s=g(e.val(),!0):(o=u(e.val(),!0),s=o?I(o):null),n=null===s?r.defaultValue:"rgb"===r.format?g(r.opacity?"rgba("+s.r+","+s.g+","+s.b+","+e.attr("data-opacity")+")":"rgb("+s.r+","+s.g+","+s.b+")"):C(s)),a=r.opacity?e.attr("data-opacity"):1,"transparent"===n.toLowerCase()&&(a=0),e.closest(".minicolors").find(".minicolors-input-swatch > span").css("opacity",a),e.val(n),""===e.val()&&e.val(m(r.defaultValue,!0)),e.val(p(e.val(),r.letterCase)))}).on("keydown.minicolors",".minicolors-input",function(t){var o=i(this);if(o.data("minicolors-initialized"))switch(t.keyCode){case 9:a();break;case 13:case 27:a(),o.blur()}}).on("keyup.minicolors",".minicolors-input",function(){var t=i(this);t.data("minicolors-initialized")&&c(t,!0)}).on("paste.minicolors",".minicolors-input",function(){var t=i(this);t.data("minicolors-initialized")&&setTimeout(function(){c(t,!0)},1)})});
22
 
23
  /*
24
  * Fuel UX Wizard
29
  */
30
  !function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t(require("jquery")):t(jQuery)}(function(t){var e=t.fn.wizard,i=function(e,i){var s;this.$element=t(e),this.options=t.extend({},t.fn.wizard.defaults,i),this.options.disablePreviousStep="previous"===this.$element.attr("data-restrict")?!0:this.options.disablePreviousStep,this.currentStep=this.options.selectedItem.step,this.numSteps=this.$element.find(".steps li").length,this.$prevBtn=this.$element.find("button.btn-prev"),this.$nextBtn=this.$element.find("button.btn-next"),0===this.$element.children(".steps-container").length&&(this.$element.addClass("no-steps-container"),window&&window.console&&window.console.warn&&window.console.warn('please update your wizard markup to include ".steps-container" as seen in http://getfuelux.com/javascript.html#wizard-usage-markup')),s=this.$nextBtn.children().detach(),this.nextText=t.trim(this.$nextBtn.text()),this.$nextBtn.append(s),this.$prevBtn.on("click.fu.wizard",t.proxy(this.previous,this)),this.$nextBtn.on("click.fu.wizard",t.proxy(this.next,this)),this.$element.on("click.fu.wizard","li.complete",t.proxy(this.stepclicked,this)),this.selectedItem(this.options.selectedItem),this.options.disablePreviousStep&&(this.$prevBtn.attr("disabled",!0),this.$element.find(".steps").addClass("previous-disabled"))};i.prototype={constructor:i,destroy:function(){return this.$element.remove(),this.$element[0].outerHTML},addSteps:function(e){var i,s,n,a,r,d,l=[].slice.call(arguments).slice(1),p=this.$element.find(".steps"),h=this.$element.find(".step-content");for(e=-1===e||e>this.numSteps+1?this.numSteps+1:e,l[0]instanceof Array&&(l=l[0]),r=p.find("li:nth-child("+e+")"),a=h.find(".step-pane:nth-child("+e+")"),r.length<1&&(r=null),i=0,s=l.length;s>i;i++)d=t('<li data-step="'+e+'"><span class="badge badge-info"></span></li>'),d.append(l[i].label||"").append('<span class="chevron"></span>'),d.find(".badge").append(l[i].badge||e),n=t('<div class="step-pane" data-step="'+e+'"></div>'),n.append(l[i].pane||""),r?(r.before(d),a.before(n)):(p.append(d),h.append(n)),e++;this.syncSteps(),this.numSteps=p.find("li").length,this.setState()},removeSteps:function(e,i){var s,n="nextAll",a=0,r=this.$element.find(".steps"),d=this.$element.find(".step-content");i=void 0!==i?i:1,e>r.find("li").length?s=r.find("li:last"):(s=r.find("li:nth-child("+e+")").prev(),s.length<1&&(n="children",s=r)),s[n]().each(function(){var e=t(this),s=e.attr("data-step");return i>a?(e.remove(),d.find('.step-pane[data-step="'+s+'"]:first').remove(),void a++):!1}),this.syncSteps(),this.numSteps=r.find("li").length,this.setState()},setState:function(){var e=this.currentStep>1,i=1===this.currentStep,s=this.currentStep===this.numSteps;this.options.disablePreviousStep||this.$prevBtn.attr("disabled",i===!0||e===!1);var n=this.$nextBtn.attr("data-last");if(n){this.lastText=n;var a=this.nextText;s===!0?(a=this.lastText,this.$element.addClass("complete")):this.$element.removeClass("complete");var r=this.$nextBtn.children().detach();this.$nextBtn.text(a).append(r)}var d=this.$element.find(".steps li");d.removeClass("active").removeClass("complete"),d.find("span.badge").removeClass("badge-info").removeClass("badge-success");var l=".steps li:lt("+(this.currentStep-1)+")",p=this.$element.find(l);p.addClass("complete"),p.find("span.badge").addClass("badge-success");var h=".steps li:eq("+(this.currentStep-1)+")",f=this.$element.find(h);f.addClass("active"),f.find("span.badge").addClass("badge-info");var o=this.$element.find(".step-content"),c=f.attr("data-step");o.find(".step-pane").removeClass("active"),o.find('.step-pane[data-step="'+c+'"]:first').addClass("active"),this.$element.find(".steps").first().attr("style","margin-left: 0");var u=0;this.$element.find(".steps > li").each(function(){u+=t(this).outerWidth()});var m=0;if(m=this.$element.find(".actions").length?this.$element.width()-this.$element.find(".actions").first().outerWidth():this.$element.width(),u>m){var v=u-m;this.$element.find(".steps").first().attr("style","margin-left: -"+v+"px"),this.$element.find("li.active").first().position().left<200&&(v+=this.$element.find("li.active").first().position().left-200,1>v?this.$element.find(".steps").first().attr("style","margin-left: 0"):this.$element.find(".steps").first().attr("style","margin-left: -"+v+"px"))}if("undefined"!=typeof this.initialized){var $=t.Event("changed.fu.wizard");this.$element.trigger($,{step:this.currentStep})}this.initialized=!0},stepclicked:function(e){var i=t(e.currentTarget),s=this.$element.find(".steps li").index(i);if(!(s<this.currentStep&&this.options.disablePreviousStep)){var n=t.Event("stepclicked.fu.wizard");this.$element.trigger(n,{step:s+1}),n.isDefaultPrevented()||(this.currentStep=s+1,this.setState())}},syncSteps:function(){var e=1,i=this.$element.find(".steps"),s=this.$element.find(".step-content");i.children().each(function(){var i=t(this),n=i.find(".badge"),a=i.attr("data-step");isNaN(parseInt(n.html(),10))||n.html(e),i.attr("data-step",e),s.find('.step-pane[data-step="'+a+'"]:last').attr("data-step",e),e++})},previous:function(){if(!this.options.disablePreviousStep&&1!==this.currentStep){var e=t.Event("actionclicked.fu.wizard");if(this.$element.trigger(e,{step:this.currentStep,direction:"previous"}),!e.isDefaultPrevented()&&(this.currentStep-=1,this.setState(),this.$prevBtn.is(":focus"))){var i=this.$element.find(".active").find("input, select, textarea")[0];"undefined"!=typeof i?t(i).focus():0===this.$element.find(".active input:first").length&&this.$prevBtn.is(":disabled")&&this.$nextBtn.focus()}}},next:function(){var e=t.Event("actionclicked.fu.wizard");if(this.$element.trigger(e,{step:this.currentStep,direction:"next"}),!e.isDefaultPrevented()&&(this.currentStep<this.numSteps?(this.currentStep+=1,this.setState()):this.$element.trigger("finished.fu.wizard"),this.$nextBtn.is(":focus"))){var i=this.$element.find(".active").find("input, select, textarea")[0];"undefined"!=typeof i?t(i).focus():0===this.$element.find(".active input:first").length&&this.$nextBtn.is(":disabled")&&this.$prevBtn.focus()}},selectedItem:function(t){var e,i;return t?(i=t.step||-1,i=Number(this.$element.find('.steps li[data-name="'+i+'"]').first().attr("data-step"))||Number(i),i>=1&&i<=this.numSteps?(this.currentStep=i,this.setState()):(i=this.$element.find(".steps li.active:first").attr("data-step"),isNaN(i)||(this.currentStep=parseInt(i,10),this.setState())),e=this):(e={step:this.currentStep},this.$element.find(".steps li.active:first[data-name]").length&&(e.stepname=this.$element.find(".steps li.active:first").attr("data-name"))),e}},t.fn.wizard=function(e){var s,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=t(this),r=a.data("fu.wizard"),d="object"==typeof e&&e;r||a.data("fu.wizard",r=new i(this,d)),"string"==typeof e&&(s=r[e].apply(r,n))});return void 0===s?a:s},t.fn.wizard.defaults={disablePreviousStep:!1,selectedItem:{step:-1}},t.fn.wizard.Constructor=i,t.fn.wizard.noConflict=function(){return t.fn.wizard=e,this},t(document).on("mouseover.fu.wizard.data-api","[data-initialize=wizard]",function(e){var i=t(e.target).closest(".wizard");i.data("fu.wizard")||i.wizard(i.data())}),t(function(){t("[data-initialize=wizard]").each(function(){var e=t(this);e.data("fu.wizard")||e.wizard(e.data())})})});
31
 
32
+ $.plot = null;
33
  !function(t){t.color={},t.color.make=function(i,e,o,n){var a={};return a.r=i||0,a.g=e||0,a.b=o||0,a.a=null!=n?n:1,a.add=function(t,i){for(var e=0;e<t.length;++e)a[t.charAt(e)]+=i;return a.normalize()},a.scale=function(t,i){for(var e=0;e<t.length;++e)a[t.charAt(e)]*=i;return a.normalize()},a.toString=function(){return a.a>=1?"rgb("+[a.r,a.g,a.b].join(",")+")":"rgba("+[a.r,a.g,a.b,a.a].join(",")+")"},a.normalize=function(){function t(t,i,e){return t>i?t:i>e?e:i}return a.r=t(0,parseInt(a.r),255),a.g=t(0,parseInt(a.g),255),a.b=t(0,parseInt(a.b),255),a.a=t(0,a.a,1),a},a.clone=function(){return t.color.make(a.r,a.b,a.g,a.a)},a.normalize()},t.color.extract=function(i,e){var o;do{if(o=i.css(e).toLowerCase(),""!=o&&"transparent"!=o)break;i=i.parent()}while(i.length&&!t.nodeName(i.get(0),"body"));return"rgba(0, 0, 0, 0)"==o&&(o="transparent"),t.color.parse(o)},t.color.parse=function(e){var o,n=t.color.make;if(o=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(e))return n(parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10));if(o=/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(e))return n(parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10),parseFloat(o[4]));if(o=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(e))return n(2.55*parseFloat(o[1]),2.55*parseFloat(o[2]),2.55*parseFloat(o[3]));if(o=/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(e))return n(2.55*parseFloat(o[1]),2.55*parseFloat(o[2]),2.55*parseFloat(o[3]),parseFloat(o[4]));if(o=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(e))return n(parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16));if(o=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(e))return n(parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16));var a=t.trim(e).toLowerCase();return"transparent"==a?n(255,255,255,0):(o=i[a]||[0,0,0],n(o[0],o[1],o[2]))};var i={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(t){function i(i,e){var o=e.children("."+i)[0];if(null==o&&(o=document.createElement("canvas"),o.className=i,t(o).css({direction:"ltr",position:"absolute",left:0,top:0}).appendTo(e),!o.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.");o=window.G_vmlCanvasManager.initElement(o)}this.element=o;var n=this.context=o.getContext("2d"),a=window.devicePixelRatio||1,r=n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1;this.pixelRatio=a/r,this.resize(e.width(),e.height()),this.textContainer=null,this.text={},this._textCache={}}function e(e,n,a,r){function l(t,i){i=[xt].concat(i);for(var e=0;e<t.length;++e)t[e].apply(this,i)}function s(){for(var e={Canvas:i},o=0;o<r.length;++o){var n=r[o];n.init(xt,e),n.options&&t.extend(!0,nt,n.options)}}function c(i){t.extend(!0,nt,i),i&&i.colors&&(nt.colors=i.colors),null==nt.xaxis.color&&(nt.xaxis.color=t.color.parse(nt.grid.color).scale("a",.22).toString()),null==nt.yaxis.color&&(nt.yaxis.color=t.color.parse(nt.grid.color).scale("a",.22).toString()),null==nt.xaxis.tickColor&&(nt.xaxis.tickColor=nt.grid.tickColor||nt.xaxis.color),null==nt.yaxis.tickColor&&(nt.yaxis.tickColor=nt.grid.tickColor||nt.yaxis.color),null==nt.grid.borderColor&&(nt.grid.borderColor=nt.grid.color),null==nt.grid.tickColor&&(nt.grid.tickColor=t.color.parse(nt.grid.color).scale("a",.22).toString());var o,n,a,r=e.css("font-size"),s=r?+r.replace("px",""):13,c={style:e.css("font-style"),size:Math.round(.8*s),variant:e.css("font-variant"),weight:e.css("font-weight"),family:e.css("font-family")};for(a=nt.xaxes.length||1,o=0;a>o;++o)n=nt.xaxes[o],n&&!n.tickColor&&(n.tickColor=n.color),n=t.extend(!0,{},nt.xaxis,n),nt.xaxes[o]=n,n.font&&(n.font=t.extend({},c,n.font),n.font.color||(n.font.color=n.color),n.font.lineHeight||(n.font.lineHeight=Math.round(1.15*n.font.size)));for(a=nt.yaxes.length||1,o=0;a>o;++o)n=nt.yaxes[o],n&&!n.tickColor&&(n.tickColor=n.color),n=t.extend(!0,{},nt.yaxis,n),nt.yaxes[o]=n,n.font&&(n.font=t.extend({},c,n.font),n.font.color||(n.font.color=n.color),n.font.lineHeight||(n.font.lineHeight=Math.round(1.15*n.font.size)));for(nt.xaxis.noTicks&&null==nt.xaxis.ticks&&(nt.xaxis.ticks=nt.xaxis.noTicks),nt.yaxis.noTicks&&null==nt.yaxis.ticks&&(nt.yaxis.ticks=nt.yaxis.noTicks),nt.x2axis&&(nt.xaxes[1]=t.extend(!0,{},nt.xaxis,nt.x2axis),nt.xaxes[1].position="top",null==nt.x2axis.min&&(nt.xaxes[1].min=null),null==nt.x2axis.max&&(nt.xaxes[1].max=null)),nt.y2axis&&(nt.yaxes[1]=t.extend(!0,{},nt.yaxis,nt.y2axis),nt.yaxes[1].position="right",null==nt.y2axis.min&&(nt.yaxes[1].min=null),null==nt.y2axis.max&&(nt.yaxes[1].max=null)),nt.grid.coloredAreas&&(nt.grid.markings=nt.grid.coloredAreas),nt.grid.coloredAreasColor&&(nt.grid.markingsColor=nt.grid.coloredAreasColor),nt.lines&&t.extend(!0,nt.series.lines,nt.lines),nt.points&&t.extend(!0,nt.series.points,nt.points),nt.bars&&t.extend(!0,nt.series.bars,nt.bars),null!=nt.shadowSize&&(nt.series.shadowSize=nt.shadowSize),null!=nt.highlightColor&&(nt.series.highlightColor=nt.highlightColor),o=0;o<nt.xaxes.length;++o)x(ht,o+1).options=nt.xaxes[o];for(o=0;o<nt.yaxes.length;++o)x(ft,o+1).options=nt.yaxes[o];for(var h in mt)nt.hooks[h]&&nt.hooks[h].length&&(mt[h]=mt[h].concat(nt.hooks[h]));l(mt.processOptions,[nt])}function h(t){ot=f(t),g(),b()}function f(i){for(var e=[],o=0;o<i.length;++o){var n=t.extend(!0,{},nt.series);null!=i[o].data?(n.data=i[o].data,delete i[o].data,t.extend(!0,n,i[o]),i[o].data=n.data):n.data=i[o],e.push(n)}return e}function u(t,i){var e=t[i+"axis"];return"object"==typeof e&&(e=e.n),"number"!=typeof e&&(e=1),e}function d(){return t.grep(ht.concat(ft),function(t){return t})}function p(t){var i,e,o={};for(i=0;i<ht.length;++i)e=ht[i],e&&e.used&&(o["x"+e.n]=e.c2p(t.left));for(i=0;i<ft.length;++i)e=ft[i],e&&e.used&&(o["y"+e.n]=e.c2p(t.top));return void 0!==o.x1&&(o.x=o.x1),void 0!==o.y1&&(o.y=o.y1),o}function m(t){var i,e,o,n={};for(i=0;i<ht.length;++i)if(e=ht[i],e&&e.used&&(o="x"+e.n,null==t[o]&&1==e.n&&(o="x"),null!=t[o])){n.left=e.p2c(t[o]);break}for(i=0;i<ft.length;++i)if(e=ft[i],e&&e.used&&(o="y"+e.n,null==t[o]&&1==e.n&&(o="y"),null!=t[o])){n.top=e.p2c(t[o]);break}return n}function x(i,e){return i[e-1]||(i[e-1]={n:e,direction:i==ht?"x":"y",options:t.extend(!0,{},i==ht?nt.xaxis:nt.yaxis)}),i[e-1]}function g(){var i,e=ot.length,o=-1;for(i=0;i<ot.length;++i){var n=ot[i].color;null!=n&&(e--,"number"==typeof n&&n>o&&(o=n))}o>=e&&(e=o+1);var a,r=[],l=nt.colors,s=l.length,c=0;for(i=0;e>i;i++)a=t.color.parse(l[i%s]||"#666"),i%s==0&&i&&(c=c>=0?.5>c?-c-.2:0:-c),r[i]=a.scale("rgb",1+c);var h,f=0;for(i=0;i<ot.length;++i){if(h=ot[i],null==h.color?(h.color=r[f].toString(),++f):"number"==typeof h.color&&(h.color=r[h.color].toString()),null==h.lines.show){var d,p=!0;for(d in h)if(h[d]&&h[d].show){p=!1;break}p&&(h.lines.show=!0)}null==h.lines.zero&&(h.lines.zero=!!h.lines.fill),h.xaxis=x(ht,u(h,"x")),h.yaxis=x(ft,u(h,"y"))}}function b(){function i(t,i,e){i<t.datamin&&i!=-b&&(t.datamin=i),e>t.datamax&&e!=b&&(t.datamax=e)}var e,o,n,a,r,s,c,h,f,u,p,m,x=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,b=Number.MAX_VALUE;for(t.each(d(),function(t,i){i.datamin=x,i.datamax=g,i.used=!1}),e=0;e<ot.length;++e)r=ot[e],r.datapoints={points:[]},l(mt.processRawData,[r,r.data,r.datapoints]);for(e=0;e<ot.length;++e){if(r=ot[e],p=r.data,m=r.datapoints.format,!m){if(m=[],m.push({x:!0,number:!0,required:!0}),m.push({y:!0,number:!0,required:!0}),r.bars.show||r.lines.show&&r.lines.fill){var v=!!(r.bars.show&&r.bars.zero||r.lines.show&&r.lines.zero);m.push({y:!0,number:!0,required:!1,defaultValue:0,autoscale:v}),r.bars.horizontal&&(delete m[m.length-1].y,m[m.length-1].x=!0)}r.datapoints.format=m}if(null==r.datapoints.pointsize){r.datapoints.pointsize=m.length,c=r.datapoints.pointsize,s=r.datapoints.points;var k=r.lines.show&&r.lines.steps;for(r.xaxis.used=r.yaxis.used=!0,o=n=0;o<p.length;++o,n+=c){u=p[o];var y=null==u;if(!y)for(a=0;c>a;++a)h=u[a],f=m[a],f&&(f.number&&null!=h&&(h=+h,isNaN(h)?h=null:h==1/0?h=b:h==-(1/0)&&(h=-b)),null==h&&(f.required&&(y=!0),null!=f.defaultValue&&(h=f.defaultValue))),s[n+a]=h;if(y)for(a=0;c>a;++a)h=s[n+a],null!=h&&(f=m[a],f.autoscale!==!1&&(f.x&&i(r.xaxis,h,h),f.y&&i(r.yaxis,h,h))),s[n+a]=null;else if(k&&n>0&&null!=s[n-c]&&s[n-c]!=s[n]&&s[n-c+1]!=s[n+1]){for(a=0;c>a;++a)s[n+c+a]=s[n+a];s[n+1]=s[n-c+1],n+=c}}}}for(e=0;e<ot.length;++e)r=ot[e],l(mt.processDatapoints,[r,r.datapoints]);for(e=0;e<ot.length;++e){r=ot[e],s=r.datapoints.points,c=r.datapoints.pointsize,m=r.datapoints.format;var w=x,M=x,T=g,C=g;for(o=0;o<s.length;o+=c)if(null!=s[o])for(a=0;c>a;++a)h=s[o+a],f=m[a],f&&f.autoscale!==!1&&h!=b&&h!=-b&&(f.x&&(w>h&&(w=h),h>T&&(T=h)),f.y&&(M>h&&(M=h),h>C&&(C=h)));if(r.bars.show){var S;switch(r.bars.align){case"left":S=0;break;case"right":S=-r.bars.barWidth;break;default:S=-r.bars.barWidth/2}r.bars.horizontal?(M+=S,C+=S+r.bars.barWidth):(w+=S,T+=S+r.bars.barWidth)}i(r.xaxis,w,T),i(r.yaxis,M,C)}t.each(d(),function(t,i){i.datamin==x&&(i.datamin=null),i.datamax==g&&(i.datamax=null)})}function v(){e.css("padding",0).children().filter(function(){return!t(this).hasClass("flot-overlay")&&!t(this).hasClass("flot-base")}).remove(),"static"==e.css("position")&&e.css("position","relative"),at=new i("flot-base",e),rt=new i("flot-overlay",e),st=at.context,ct=rt.context,lt=t(rt.element).unbind();var o=e.data("plot");o&&(o.shutdown(),rt.clear()),e.data("plot",xt)}function k(){nt.grid.hoverable&&(lt.mousemove(X),lt.bind("mouseleave",Y)),nt.grid.clickable&&lt.click(q),l(mt.bindEvents,[lt])}function y(){bt&&clearTimeout(bt),lt.unbind("mousemove",X),lt.unbind("mouseleave",Y),lt.unbind("click",q),l(mt.shutdown,[lt])}function w(t){function i(t){return t}var e,o,n=t.options.transform||i,a=t.options.inverseTransform;"x"==t.direction?(e=t.scale=dt/Math.abs(n(t.max)-n(t.min)),o=Math.min(n(t.max),n(t.min))):(e=t.scale=pt/Math.abs(n(t.max)-n(t.min)),e=-e,o=Math.max(n(t.max),n(t.min))),n==i?t.p2c=function(t){return(t-o)*e}:t.p2c=function(t){return(n(t)-o)*e},a?t.c2p=function(t){return a(o+t/e)}:t.c2p=function(t){return o+t/e}}function M(t){for(var i=t.options,e=t.ticks||[],o=i.labelWidth||0,n=i.labelHeight||0,a=o||("x"==t.direction?Math.floor(at.width/(e.length||1)):null),r=t.direction+"Axis "+t.direction+t.n+"Axis",l="flot-"+t.direction+"-axis flot-"+t.direction+t.n+"-axis "+r,s=i.font||"flot-tick-label tickLabel",c=0;c<e.length;++c){var h=e[c];if(h.label){var f=at.getTextInfo(l,h.label,s,null,a);o=Math.max(o,f.width),n=Math.max(n,f.height)}}t.labelWidth=i.labelWidth||o,t.labelHeight=i.labelHeight||n}function T(i){var e=i.labelWidth,o=i.labelHeight,n=i.options.position,a="x"===i.direction,r=i.options.tickLength,l=nt.grid.axisMargin,s=nt.grid.labelMargin,c=!0,h=!0,f=!0,u=!1;t.each(a?ht:ft,function(t,e){e&&(e.show||e.reserveSpace)&&(e===i?u=!0:e.options.position===n&&(u?h=!1:c=!1),u||(f=!1))}),h&&(l=0),null==r&&(r=f?"full":5),isNaN(+r)||(s+=+r),a?(o+=s,"bottom"==n?(ut.bottom+=o+l,i.box={top:at.height-ut.bottom,height:o}):(i.box={top:ut.top+l,height:o},ut.top+=o+l)):(e+=s,"left"==n?(i.box={left:ut.left+l,width:e},ut.left+=e+l):(ut.right+=e+l,i.box={left:at.width-ut.right,width:e})),i.position=n,i.tickLength=r,i.box.padding=s,i.innermost=c}function C(t){"x"==t.direction?(t.box.left=ut.left-t.labelWidth/2,t.box.width=at.width-ut.left-ut.right+t.labelWidth):(t.box.top=ut.top-t.labelHeight/2,t.box.height=at.height-ut.bottom-ut.top+t.labelHeight)}function S(){var i,e=nt.grid.minBorderMargin;if(null==e)for(e=0,i=0;i<ot.length;++i)e=Math.max(e,2*(ot[i].points.radius+ot[i].points.lineWidth/2));var o={left:e,right:e,top:e,bottom:e};t.each(d(),function(t,i){i.reserveSpace&&i.ticks&&i.ticks.length&&("x"===i.direction?(o.left=Math.max(o.left,i.labelWidth/2),o.right=Math.max(o.right,i.labelWidth/2)):(o.bottom=Math.max(o.bottom,i.labelHeight/2),o.top=Math.max(o.top,i.labelHeight/2)))}),ut.left=Math.ceil(Math.max(o.left,ut.left)),ut.right=Math.ceil(Math.max(o.right,ut.right)),ut.top=Math.ceil(Math.max(o.top,ut.top)),ut.bottom=Math.ceil(Math.max(o.bottom,ut.bottom))}function W(){var i,e=d(),o=nt.grid.show;for(var n in ut){var a=nt.grid.margin||0;ut[n]="number"==typeof a?a:a[n]||0}l(mt.processOffset,[ut]);for(var n in ut)"object"==typeof nt.grid.borderWidth?ut[n]+=o?nt.grid.borderWidth[n]:0:ut[n]+=o?nt.grid.borderWidth:0;if(t.each(e,function(t,i){var e=i.options;i.show=null==e.show?i.used:e.show,i.reserveSpace=null==e.reserveSpace?i.show:e.reserveSpace,z(i)}),o){var r=t.grep(e,function(t){return t.show||t.reserveSpace});for(t.each(r,function(t,i){I(i),A(i),F(i,i.ticks),M(i)}),i=r.length-1;i>=0;--i)T(r[i]);S(),t.each(r,function(t,i){C(i)})}dt=at.width-ut.left-ut.right,pt=at.height-ut.bottom-ut.top,t.each(e,function(t,i){w(i)}),o&&O(),_()}function z(t){var i=t.options,e=+(null!=i.min?i.min:t.datamin),o=+(null!=i.max?i.max:t.datamax),n=o-e;if(0==n){var a=0==o?1:.01;null==i.min&&(e-=a),(null==i.max||null!=i.min)&&(o+=a)}else{var r=i.autoscaleMargin;null!=r&&(null==i.min&&(e-=n*r,0>e&&null!=t.datamin&&t.datamin>=0&&(e=0)),null==i.max&&(o+=n*r,o>0&&null!=t.datamax&&t.datamax<=0&&(o=0)))}t.min=e,t.max=o}function I(i){var e,n=i.options;e="number"==typeof n.ticks&&n.ticks>0?n.ticks:.3*Math.sqrt("x"==i.direction?at.width:at.height);var a=(i.max-i.min)/e,r=-Math.floor(Math.log(a)/Math.LN10),l=n.tickDecimals;null!=l&&r>l&&(r=l);var s,c=Math.pow(10,-r),h=a/c;if(1.5>h?s=1:3>h?(s=2,h>2.25&&(null==l||l>=r+1)&&(s=2.5,++r)):s=7.5>h?5:10,s*=c,null!=n.minTickSize&&s<n.minTickSize&&(s=n.minTickSize),i.delta=a,i.tickDecimals=Math.max(0,null!=l?l:r),i.tickSize=n.tickSize||s,"time"==n.mode&&!i.tickGenerator)throw new Error("Time mode requires the flot.time plugin.");if(i.tickGenerator||(i.tickGenerator=function(t){var i,e=[],n=o(t.min,t.tickSize),a=0,r=Number.NaN;do i=r,r=n+a*t.tickSize,e.push(r),++a;while(r<t.max&&r!=i);return e},i.tickFormatter=function(t,i){var e=i.tickDecimals?Math.pow(10,i.tickDecimals):1,o=""+Math.round(t*e)/e;if(null!=i.tickDecimals){var n=o.indexOf("."),a=-1==n?0:o.length-n-1;if(a<i.tickDecimals)return(a?o:o+".")+(""+e).substr(1,i.tickDecimals-a)}return o}),t.isFunction(n.tickFormatter)&&(i.tickFormatter=function(t,i){return""+n.tickFormatter(t,i)}),null!=n.alignTicksWithAxis){var f=("x"==i.direction?ht:ft)[n.alignTicksWithAxis-1];if(f&&f.used&&f!=i){var u=i.tickGenerator(i);if(u.length>0&&(null==n.min&&(i.min=Math.min(i.min,u[0])),null==n.max&&u.length>1&&(i.max=Math.max(i.max,u[u.length-1]))),i.tickGenerator=function(t){var i,e,o=[];for(e=0;e<f.ticks.length;++e)i=(f.ticks[e].v-f.min)/(f.max-f.min),i=t.min+i*(t.max-t.min),o.push(i);return o},!i.mode&&null==n.tickDecimals){var d=Math.max(0,-Math.floor(Math.log(i.delta)/Math.LN10)+1),p=i.tickGenerator(i);p.length>1&&/\..*0$/.test((p[1]-p[0]).toFixed(d))||(i.tickDecimals=d)}}}}function A(i){var e=i.options.ticks,o=[];null==e||"number"==typeof e&&e>0?o=i.tickGenerator(i):e&&(o=t.isFunction(e)?e(i):e);var n,a;for(i.ticks=[],n=0;n<o.length;++n){var r=null,l=o[n];"object"==typeof l?(a=+l[0],l.length>1&&(r=l[1])):a=+l,null==r&&(r=i.tickFormatter(a,i)),isNaN(a)||i.ticks.push({v:a,label:r})}}function F(t,i){t.options.autoscaleMargin&&i.length>0&&(null==t.options.min&&(t.min=Math.min(t.min,i[0].v)),null==t.options.max&&i.length>1&&(t.max=Math.max(t.max,i[i.length-1].v)))}function P(){at.clear(),l(mt.drawBackground,[st]);var t=nt.grid;t.show&&t.backgroundColor&&D(),t.show&&!t.aboveData&&L();for(var i=0;i<ot.length;++i)l(mt.drawSeries,[st,ot[i]]),R(ot[i]);l(mt.draw,[st]),t.show&&t.aboveData&&L(),at.render(),U()}function N(t,i){for(var e,o,n,a,r=d(),l=0;l<r.length;++l)if(e=r[l],e.direction==i&&(a=i+e.n+"axis",t[a]||1!=e.n||(a=i+"axis"),t[a])){o=t[a].from,n=t[a].to;break}if(t[a]||(e="x"==i?ht[0]:ft[0],o=t[i+"1"],n=t[i+"2"]),null!=o&&null!=n&&o>n){var s=o;o=n,n=s}return{from:o,to:n,axis:e}}function D(){st.save(),st.translate(ut.left,ut.top),st.fillStyle=et(nt.grid.backgroundColor,pt,0,"rgba(255, 255, 255, 0)"),st.fillRect(0,0,dt,pt),st.restore()}function L(){var i,e,o,n;st.save(),st.translate(ut.left,ut.top);var a=nt.grid.markings;if(a)for(t.isFunction(a)&&(e=xt.getAxes(),e.xmin=e.xaxis.min,e.xmax=e.xaxis.max,e.ymin=e.yaxis.min,e.ymax=e.yaxis.max,a=a(e)),i=0;i<a.length;++i){var r=a[i],l=N(r,"x"),s=N(r,"y");if(null==l.from&&(l.from=l.axis.min),null==l.to&&(l.to=l.axis.max),null==s.from&&(s.from=s.axis.min),null==s.to&&(s.to=s.axis.max),!(l.to<l.axis.min||l.from>l.axis.max||s.to<s.axis.min||s.from>s.axis.max)){l.from=Math.max(l.from,l.axis.min),l.to=Math.min(l.to,l.axis.max),s.from=Math.max(s.from,s.axis.min),s.to=Math.min(s.to,s.axis.max);var c=l.from===l.to,h=s.from===s.to;if(!c||!h)if(l.from=Math.floor(l.axis.p2c(l.from)),l.to=Math.floor(l.axis.p2c(l.to)),s.from=Math.floor(s.axis.p2c(s.from)),s.to=Math.floor(s.axis.p2c(s.to)),c||h){var f=r.lineWidth||nt.grid.markingsLineWidth,u=f%2?.5:0;st.beginPath(),st.strokeStyle=r.color||nt.grid.markingsColor,st.lineWidth=f,c?(st.moveTo(l.to+u,s.from),st.lineTo(l.to+u,s.to)):(st.moveTo(l.from,s.to+u),st.lineTo(l.to,s.to+u)),st.stroke()}else st.fillStyle=r.color||nt.grid.markingsColor,st.fillRect(l.from,s.to,l.to-l.from,s.from-s.to)}}e=d(),o=nt.grid.borderWidth;for(var p=0;p<e.length;++p){var m,x,g,b,v=e[p],k=v.box,y=v.tickLength;if(v.show&&0!=v.ticks.length){for(st.lineWidth=1,"x"==v.direction?(m=0,x="full"==y?"top"==v.position?0:pt:k.top-ut.top+("top"==v.position?k.height:0)):(x=0,m="full"==y?"left"==v.position?0:dt:k.left-ut.left+("left"==v.position?k.width:0)),v.innermost||(st.strokeStyle=v.options.color,st.beginPath(),g=b=0,"x"==v.direction?g=dt+1:b=pt+1,1==st.lineWidth&&("x"==v.direction?x=Math.floor(x)+.5:m=Math.floor(m)+.5),st.moveTo(m,x),st.lineTo(m+g,x+b),st.stroke()),st.strokeStyle=v.options.tickColor,st.beginPath(),i=0;i<v.ticks.length;++i){var w=v.ticks[i].v;g=b=0,isNaN(w)||w<v.min||w>v.max||"full"==y&&("object"==typeof o&&o[v.position]>0||o>0)&&(w==v.min||w==v.max)||("x"==v.direction?(m=v.p2c(w),b="full"==y?-pt:y,"top"==v.position&&(b=-b)):(x=v.p2c(w),g="full"==y?-dt:y,"left"==v.position&&(g=-g)),1==st.lineWidth&&("x"==v.direction?m=Math.floor(m)+.5:x=Math.floor(x)+.5),st.moveTo(m,x),st.lineTo(m+g,x+b))}st.stroke()}}o&&(n=nt.grid.borderColor,"object"==typeof o||"object"==typeof n?("object"!=typeof o&&(o={top:o,right:o,bottom:o,left:o}),"object"!=typeof n&&(n={top:n,right:n,bottom:n,left:n}),o.top>0&&(st.strokeStyle=n.top,st.lineWidth=o.top,st.beginPath(),st.moveTo(0-o.left,0-o.top/2),st.lineTo(dt,0-o.top/2),st.stroke()),o.right>0&&(st.strokeStyle=n.right,st.lineWidth=o.right,st.beginPath(),st.moveTo(dt+o.right/2,0-o.top),st.lineTo(dt+o.right/2,pt),st.stroke()),o.bottom>0&&(st.strokeStyle=n.bottom,st.lineWidth=o.bottom,st.beginPath(),st.moveTo(dt+o.right,pt+o.bottom/2),st.lineTo(0,pt+o.bottom/2),st.stroke()),o.left>0&&(st.strokeStyle=n.left,st.lineWidth=o.left,st.beginPath(),st.moveTo(0-o.left/2,pt+o.bottom),st.lineTo(0-o.left/2,0),st.stroke())):(st.lineWidth=o,st.strokeStyle=nt.grid.borderColor,st.strokeRect(-o/2,-o/2,dt+o,pt+o))),st.restore()}function O(){t.each(d(),function(t,i){var e,o,n,a,r,l=i.box,s=i.direction+"Axis "+i.direction+i.n+"Axis",c="flot-"+i.direction+"-axis flot-"+i.direction+i.n+"-axis "+s,h=i.options.font||"flot-tick-label tickLabel";if(at.removeText(c),i.show&&0!=i.ticks.length)for(var f=0;f<i.ticks.length;++f)e=i.ticks[f],!e.label||e.v<i.min||e.v>i.max||("x"==i.direction?(a="center",o=ut.left+i.p2c(e.v),"bottom"==i.position?n=l.top+l.padding:(n=l.top+l.height-l.padding,r="bottom")):(r="middle",n=ut.top+i.p2c(e.v),"left"==i.position?(o=l.left+l.width-l.padding,a="right"):o=l.left+l.padding),at.addText(c,o,n,e.label,h,null,null,a,r))})}function R(t){t.lines.show&&H(t),t.bars.show&&B(t),t.points.show&&j(t)}function H(t){function i(t,i,e,o,n){var a=t.points,r=t.pointsize,l=null,s=null;st.beginPath();for(var c=r;c<a.length;c+=r){var h=a[c-r],f=a[c-r+1],u=a[c],d=a[c+1];if(null!=h&&null!=u){if(d>=f&&f<n.min){if(d<n.min)continue;h=(n.min-f)/(d-f)*(u-h)+h,f=n.min}else if(f>=d&&d<n.min){if(f<n.min)continue;u=(n.min-f)/(d-f)*(u-h)+h,d=n.min}if(f>=d&&f>n.max){if(d>n.max)continue;h=(n.max-f)/(d-f)*(u-h)+h,f=n.max}else if(d>=f&&d>n.max){if(f>n.max)continue;u=(n.max-f)/(d-f)*(u-h)+h,d=n.max}if(u>=h&&h<o.min){if(u<o.min)continue;f=(o.min-h)/(u-h)*(d-f)+f,h=o.min}else if(h>=u&&u<o.min){if(h<o.min)continue;d=(o.min-h)/(u-h)*(d-f)+f,u=o.min}if(h>=u&&h>o.max){if(u>o.max)continue;f=(o.max-h)/(u-h)*(d-f)+f,h=o.max}else if(u>=h&&u>o.max){if(h>o.max)continue;d=(o.max-h)/(u-h)*(d-f)+f,u=o.max}(h!=l||f!=s)&&st.moveTo(o.p2c(h)+i,n.p2c(f)+e),l=u,s=d,st.lineTo(o.p2c(u)+i,n.p2c(d)+e)}}st.stroke()}function e(t,i,e){for(var o=t.points,n=t.pointsize,a=Math.min(Math.max(0,e.min),e.max),r=0,l=!1,s=1,c=0,h=0;;){if(n>0&&r>o.length+n)break;r+=n;var f=o[r-n],u=o[r-n+s],d=o[r],p=o[r+s];if(l){if(n>0&&null!=f&&null==d){h=r,n=-n,s=2;continue}if(0>n&&r==c+n){st.fill(),l=!1,n=-n,s=1,r=c=h+n;continue}}if(null!=f&&null!=d){if(d>=f&&f<i.min){if(d<i.min)continue;u=(i.min-f)/(d-f)*(p-u)+u,f=i.min}else if(f>=d&&d<i.min){if(f<i.min)continue;p=(i.min-f)/(d-f)*(p-u)+u,d=i.min}if(f>=d&&f>i.max){if(d>i.max)continue;u=(i.max-f)/(d-f)*(p-u)+u,f=i.max}else if(d>=f&&d>i.max){if(f>i.max)continue;p=(i.max-f)/(d-f)*(p-u)+u,d=i.max}if(l||(st.beginPath(),st.moveTo(i.p2c(f),e.p2c(a)),l=!0),u>=e.max&&p>=e.max)st.lineTo(i.p2c(f),e.p2c(e.max)),st.lineTo(i.p2c(d),e.p2c(e.max));else if(u<=e.min&&p<=e.min)st.lineTo(i.p2c(f),e.p2c(e.min)),st.lineTo(i.p2c(d),e.p2c(e.min));else{var m=f,x=d;p>=u&&u<e.min&&p>=e.min?(f=(e.min-u)/(p-u)*(d-f)+f,u=e.min):u>=p&&p<e.min&&u>=e.min&&(d=(e.min-u)/(p-u)*(d-f)+f,p=e.min),u>=p&&u>e.max&&p<=e.max?(f=(e.max-u)/(p-u)*(d-f)+f,u=e.max):p>=u&&p>e.max&&u<=e.max&&(d=(e.max-u)/(p-u)*(d-f)+f,p=e.max),f!=m&&st.lineTo(i.p2c(m),e.p2c(u)),st.lineTo(i.p2c(f),e.p2c(u)),st.lineTo(i.p2c(d),e.p2c(p)),d!=x&&(st.lineTo(i.p2c(d),e.p2c(p)),st.lineTo(i.p2c(x),e.p2c(p)))}}}}st.save(),st.translate(ut.left,ut.top),st.lineJoin="round";var o=t.lines.lineWidth,n=t.shadowSize;if(o>0&&n>0){st.lineWidth=n,st.strokeStyle="rgba(0,0,0,0.1)";var a=Math.PI/18;i(t.datapoints,Math.sin(a)*(o/2+n/2),Math.cos(a)*(o/2+n/2),t.xaxis,t.yaxis),st.lineWidth=n/2,i(t.datapoints,Math.sin(a)*(o/2+n/4),Math.cos(a)*(o/2+n/4),t.xaxis,t.yaxis)}st.lineWidth=o,st.strokeStyle=t.color;var r=G(t.lines,t.color,0,pt);r&&(st.fillStyle=r,e(t.datapoints,t.xaxis,t.yaxis)),o>0&&i(t.datapoints,0,0,t.xaxis,t.yaxis),st.restore()}function j(t){function i(t,i,e,o,n,a,r,l){for(var s=t.points,c=t.pointsize,h=0;h<s.length;h+=c){var f=s[h],u=s[h+1];null==f||f<a.min||f>a.max||u<r.min||u>r.max||(st.beginPath(),f=a.p2c(f),u=r.p2c(u)+o,"circle"==l?st.arc(f,u,i,0,n?Math.PI:2*Math.PI,!1):l(st,f,u,i,n),st.closePath(),e&&(st.fillStyle=e,st.fill()),st.stroke())}}st.save(),st.translate(ut.left,ut.top);var e=t.points.lineWidth,o=t.shadowSize,n=t.points.radius,a=t.points.symbol;if(0==e&&(e=1e-4),e>0&&o>0){var r=o/2;st.lineWidth=r,st.strokeStyle="rgba(0,0,0,0.1)",i(t.datapoints,n,null,r+r/2,!0,t.xaxis,t.yaxis,a),st.strokeStyle="rgba(0,0,0,0.2)",i(t.datapoints,n,null,r/2,!0,t.xaxis,t.yaxis,a)}st.lineWidth=e,st.strokeStyle=t.color,i(t.datapoints,n,G(t.points,t.color),0,!1,t.xaxis,t.yaxis,a),st.restore()}function E(t,i,e,o,n,a,r,l,s,c,h){var f,u,d,p,m,x,g,b,v;c?(b=x=g=!0,m=!1,f=e,u=t,p=i+o,d=i+n,f>u&&(v=u,u=f,f=v,m=!0,x=!1)):(m=x=g=!0,b=!1,f=t+o,u=t+n,d=e,p=i,d>p&&(v=p,p=d,d=v,b=!0,g=!1)),u<r.min||f>r.max||p<l.min||d>l.max||(f<r.min&&(f=r.min,m=!1),u>r.max&&(u=r.max,x=!1),d<l.min&&(d=l.min,b=!1),p>l.max&&(p=l.max,g=!1),f=r.p2c(f),d=l.p2c(d),u=r.p2c(u),p=l.p2c(p),a&&(s.fillStyle=a(d,p),s.fillRect(f,p,u-f,d-p)),h>0&&(m||x||g||b)&&(s.beginPath(),s.moveTo(f,d),m?s.lineTo(f,p):s.moveTo(f,p),g?s.lineTo(u,p):s.moveTo(u,p),x?s.lineTo(u,d):s.moveTo(u,d),b?s.lineTo(f,d):s.moveTo(f,d),s.stroke()))}function B(t){function i(i,e,o,n,a,r){for(var l=i.points,s=i.pointsize,c=0;c<l.length;c+=s)null!=l[c]&&E(l[c],l[c+1],l[c+2],e,o,n,a,r,st,t.bars.horizontal,t.bars.lineWidth)}st.save(),st.translate(ut.left,ut.top),st.lineWidth=t.bars.lineWidth,st.strokeStyle=t.color;var e;switch(t.bars.align){case"left":e=0;break;case"right":e=-t.bars.barWidth;break;default:e=-t.bars.barWidth/2}var o=t.bars.fill?function(i,e){return G(t.bars,t.color,i,e)}:null;i(t.datapoints,e,e+t.bars.barWidth,o,t.xaxis,t.yaxis),st.restore()}function G(i,e,o,n){var a=i.fill;if(!a)return null;if(i.fillColor)return et(i.fillColor,o,n,e);var r=t.color.parse(e);return r.a="number"==typeof a?a:.4,r.normalize(),r.toString()}function _(){if(null!=nt.legend.container?t(nt.legend.container).html(""):e.find(".legend").remove(),nt.legend.show){for(var i,o,n=[],a=[],r=!1,l=nt.legend.labelFormatter,s=0;s<ot.length;++s)i=ot[s],i.label&&(o=l?l(i.label,i):i.label,o&&a.push({label:o,color:i.color}));if(nt.legend.sorted)if(t.isFunction(nt.legend.sorted))a.sort(nt.legend.sorted);else if("reverse"==nt.legend.sorted)a.reverse();else{var c="descending"!=nt.legend.sorted;a.sort(function(t,i){return t.label==i.label?0:t.label<i.label!=c?1:-1})}for(var s=0;s<a.length;++s){var h=a[s];s%nt.legend.noColumns==0&&(r&&n.push("</tr>"),n.push("<tr>"),r=!0),n.push('<td class="legendColorBox"><div style="border:1px solid '+nt.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>")}if(r&&n.push("</tr>"),0!=n.length){var f='<table style="font-size:smaller;color:'+nt.grid.color+'">'+n.join("")+"</table>";if(null!=nt.legend.container)t(nt.legend.container).html(f);else{var u="",d=nt.legend.position,p=nt.legend.margin;null==p[0]&&(p=[p,p]),"n"==d.charAt(0)?u+="top:"+(p[1]+ut.top)+"px;":"s"==d.charAt(0)&&(u+="bottom:"+(p[1]+ut.bottom)+"px;"),"e"==d.charAt(1)?u+="right:"+(p[0]+ut.right)+"px;":"w"==d.charAt(1)&&(u+="left:"+(p[0]+ut.left)+"px;");var m=t('<div class="legend">'+f.replace('style="','style="position:absolute;'+u+";")+"</div>").appendTo(e);if(0!=nt.legend.backgroundOpacity){var x=nt.legend.backgroundColor;null==x&&(x=nt.grid.backgroundColor,x=x&&"string"==typeof x?t.color.parse(x):t.color.extract(m,"background-color"),x.a=1,x=x.toString());var g=m.children();t('<div style="position:absolute;width:'+g.width()+"px;height:"+g.height()+"px;"+u+"background-color:"+x+';"> </div>').prependTo(m).css("opacity",nt.legend.backgroundOpacity)}}}}}function V(t,i,e){var o,n,a,r=nt.grid.mouseActiveRadius,l=r*r+1,s=null;for(o=ot.length-1;o>=0;--o)if(e(ot[o])){var c=ot[o],h=c.xaxis,f=c.yaxis,u=c.datapoints.points,d=h.c2p(t),p=f.c2p(i),m=r/h.scale,x=r/f.scale;if(a=c.datapoints.pointsize,h.options.inverseTransform&&(m=Number.MAX_VALUE),f.options.inverseTransform&&(x=Number.MAX_VALUE),c.lines.show||c.points.show)for(n=0;n<u.length;n+=a){var g=u[n],b=f.datamin;if(null!=g&&!(g-d>m||-m>g-d||b-p>x||-x>b-p)){var v=Math.abs(h.p2c(g)-t),k=Math.abs(f.p2c(b)-i),y=v*v+k*k;l>y&&(l=y,s=[o,n/a])}}if(c.bars.show&&!s){var w,M;switch(c.bars.align){case"left":w=0;break;case"right":w=-c.bars.barWidth;break;default:w=-c.bars.barWidth/2}for(M=w+c.bars.barWidth,n=0;n<u.length;n+=a){var g=u[n],b=u[n+1],T=u[n+2];null!=g&&(ot[o].bars.horizontal?d<=Math.max(T,g)&&d>=Math.min(T,g)&&p>=b+w&&b+M>=p:d>=g+w&&g+M>=d&&p>=Math.min(T,b)&&p<=Math.max(T,b))&&(s=[o,n/a])}}}return s?(o=s[0],n=s[1],a=ot[o].datapoints.pointsize,{datapoint:ot[o].datapoints.points.slice(n*a,(n+1)*a),dataIndex:n,series:ot[o],seriesIndex:o}):null}function X(t){nt.grid.hoverable&&Q("plothover",t,function(t){return 0!=t.hoverable})}function Y(t){nt.grid.hoverable&&Q("plothover",t,function(t){return!1})}function q(t){Q("plotclick",t,function(t){return 0!=t.clickable})}function Q(t,i,o){var n=lt.offset(),a=i.pageX-n.left-ut.left,r=i.pageY-n.top-ut.top,l=p({left:a,top:r});l.pageX=i.pageX,l.pageY=i.pageY;var s=V(a,r,o);if(s&&(s.pageX=parseInt(s.series.xaxis.p2c(s.datapoint[0])+n.left+ut.left,10),s.pageY=parseInt(s.series.yaxis.p2c(s.datapoint[1])+n.top+ut.top,10)),nt.grid.autoHighlight){for(var c=0;c<gt.length;++c){var h=gt[c];h.auto!=t||s&&h.series==s.series&&h.point[0]==s.datapoint[0]&&h.point[1]==s.datapoint[1]||K(h.series,h.point)}s&&$(s.series,s.datapoint,t)}e.trigger(t,[l,s])}function U(){var t=nt.interaction.redrawOverlayInterval;return-1==t?void J():void(bt||(bt=setTimeout(J,t)))}function J(){bt=null,ct.save(),rt.clear(),ct.translate(ut.left,ut.top);var t,i;for(t=0;t<gt.length;++t)i=gt[t],i.series.bars.show?it(i.series,i.point):tt(i.series,i.point);ct.restore(),l(mt.drawOverlay,[ct])}function $(t,i,e){if("number"==typeof t&&(t=ot[t]),"number"==typeof i){var o=t.datapoints.pointsize;i=t.datapoints.points.slice(o*i,o*(i+1))}var n=Z(t,i);-1==n?(gt.push({series:t,point:i,auto:e}),U()):e||(gt[n].auto=!1)}function K(t,i){if(null==t&&null==i)return gt=[],void U();if("number"==typeof t&&(t=ot[t]),"number"==typeof i){var e=t.datapoints.pointsize;i=t.datapoints.points.slice(e*i,e*(i+1))}var o=Z(t,i);-1!=o&&(gt.splice(o,1),U())}function Z(t,i){for(var e=0;e<gt.length;++e){var o=gt[e];if(o.series==t&&o.point[0]==i[0]&&o.point[1]==i[1])return e}return-1}function tt(i,e){var o=e[0],n=e[1],a=i.xaxis,r=i.yaxis,l="string"==typeof i.highlightColor?i.highlightColor:t.color.parse(i.color).scale("a",.5).toString();if(!(o<a.min||o>a.max||n<r.min||n>r.max)){var s=i.points.radius+i.points.lineWidth/2;ct.lineWidth=s,ct.strokeStyle=l;var c=1.5*s;o=a.p2c(o),n=r.p2c(n),ct.beginPath(),"circle"==i.points.symbol?ct.arc(o,n,c,0,2*Math.PI,!1):i.points.symbol(ct,o,n,c,!1),ct.closePath(),ct.stroke()}}function it(i,e){var o,n="string"==typeof i.highlightColor?i.highlightColor:t.color.parse(i.color).scale("a",.5).toString(),a=n;switch(i.bars.align){case"left":o=0;break;case"right":o=-i.bars.barWidth;break;default:o=-i.bars.barWidth/2}ct.lineWidth=i.bars.lineWidth,ct.strokeStyle=n,E(e[0],e[1],e[2]||0,o,o+i.bars.barWidth,function(){return a},i.xaxis,i.yaxis,ct,i.bars.horizontal,i.bars.lineWidth)}function et(i,e,o,n){if("string"==typeof i)return i;for(var a=st.createLinearGradient(0,o,0,e),r=0,l=i.colors.length;l>r;++r){var s=i.colors[r];if("string"!=typeof s){var c=t.color.parse(n);null!=s.brightness&&(c=c.scale("rgb",s.brightness)),null!=s.opacity&&(c.a*=s.opacity),s=c.toString()}a.addColorStop(r/(l-1),s)}return a}var ot=[],nt={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,
34
  fill:!0,fillColor:null,align:"left",horizontal:!1,zero:!0},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:{}},at=null,rt=null,lt=null,st=null,ct=null,ht=[],ft=[],ut={left:0,right:0,top:0,bottom:0},dt=0,pt=0,mt={processOptions:[],processRawData:[],processDatapoints:[],processOffset:[],drawBackground:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},xt=this;xt.setData=h,xt.setupGrid=W,xt.draw=P,xt.getPlaceholder=function(){return e},xt.getCanvas=function(){return at.element},xt.getPlotOffset=function(){return ut},xt.width=function(){return dt},xt.height=function(){return pt},xt.offset=function(){var t=lt.offset();return t.left+=ut.left,t.top+=ut.top,t},xt.getData=function(){return ot},xt.getAxes=function(){var i={};return t.each(ht.concat(ft),function(t,e){e&&(i[e.direction+(1!=e.n?e.n:"")+"axis"]=e)}),i},xt.getXAxes=function(){return ht},xt.getYAxes=function(){return ft},xt.c2p=p,xt.p2c=m,xt.getOptions=function(){return nt},xt.highlight=$,xt.unhighlight=K,xt.triggerRedrawOverlay=U,xt.pointOffset=function(t){return{left:parseInt(ht[u(t,"x")-1].p2c(+t.x)+ut.left,10),top:parseInt(ft[u(t,"y")-1].p2c(+t.y)+ut.top,10)}},xt.shutdown=y,xt.destroy=function(){y(),e.removeData("plot").empty(),ot=[],nt=null,at=null,rt=null,lt=null,st=null,ct=null,ht=[],ft=[],mt=null,gt=[],xt=null},xt.resize=function(){var t=e.width(),i=e.height();at.resize(t,i),rt.resize(t,i)},xt.hooks=mt,s(xt),c(a),v(),h(n),W(),P(),k();var gt=[],bt=null}function o(t,i){return i*Math.floor(t/i)}var n=Object.prototype.hasOwnProperty;t.fn.detach||(t.fn.detach=function(){return this.each(function(){this.parentNode&&this.parentNode.removeChild(this)})}),i.prototype.resize=function(t,i){if(0>=t||0>=i)throw new Error("Invalid dimensions for plot, width = "+t+", height = "+i);var e=this.element,o=this.context,n=this.pixelRatio;this.width!=t&&(e.width=t*n,e.style.width=t+"px",this.width=t),this.height!=i&&(e.height=i*n,e.style.height=i+"px",this.height=i),o.restore(),o.save(),o.scale(n,n)},i.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},i.prototype.render=function(){var t=this._textCache;for(var i in t)if(n.call(t,i)){var e=this.getTextLayer(i),o=t[i];e.hide();for(var a in o)if(n.call(o,a)){var r=o[a];for(var l in r)if(n.call(r,l)){for(var s,c=r[l].positions,h=0;s=c[h];h++)s.active?s.rendered||(e.append(s.element),s.rendered=!0):(c.splice(h--,1),s.rendered&&s.element.detach());0==c.length&&delete r[l]}}e.show()}},i.prototype.getTextLayer=function(i){var e=this.text[i];return null==e&&(null==this.textContainer&&(this.textContainer=t("<div class='flot-text'></div>").css({position:"absolute",top:0,left:0,bottom:0,right:0,"font-size":"smaller",color:"#545454"}).insertAfter(this.element)),e=this.text[i]=t("<div></div>").addClass(i).css({position:"absolute",top:0,left:0,bottom:0,right:0}).appendTo(this.textContainer)),e},i.prototype.getTextInfo=function(i,e,o,n,a){var r,l,s,c;if(e=""+e,r="object"==typeof o?o.style+" "+o.variant+" "+o.weight+" "+o.size+"px/"+o.lineHeight+"px "+o.family:o,l=this._textCache[i],null==l&&(l=this._textCache[i]={}),s=l[r],null==s&&(s=l[r]={}),c=s[e],null==c){var h=t("<div></div>").html(e).css({position:"absolute","max-width":a,top:-9999}).appendTo(this.getTextLayer(i));"object"==typeof o?h.css({font:r,color:o.color}):"string"==typeof o&&h.addClass(o),c=s[e]={width:h.outerWidth(!0),height:h.outerHeight(!0),element:h,positions:[]},h.detach()}return c},i.prototype.addText=function(t,i,e,o,n,a,r,l,s){var c=this.getTextInfo(t,o,n,a,r),h=c.positions;"center"==l?i-=c.width/2:"right"==l&&(i-=c.width),"middle"==s?e-=c.height/2:"bottom"==s&&(e-=c.height);for(var f,u=0;f=h[u];u++)if(f.x==i&&f.y==e)return void(f.active=!0);f={active:!0,rendered:!1,element:h.length?c.element.clone():c.element,x:i,y:e},h.push(f),f.element.css({top:Math.round(e),left:Math.round(i),"text-align":l})},i.prototype.removeText=function(t,i,e,o,a,r){if(null==o){var l=this._textCache[t];if(null!=l)for(var s in l)if(n.call(l,s)){var c=l[s];for(var h in c)if(n.call(c,h))for(var f,u=c[h].positions,d=0;f=u[d];d++)f.active=!1}}else for(var f,u=this.getTextInfo(t,o,a,r).positions,d=0;f=u[d];d++)f.x==i&&f.y==e&&(f.active=!1)},t.plot=function(i,o,n){var a=new e(t(i),o,n,t.plot.plugins);return a},t.plot.version="0.8.3",t.plot.plugins=[],t.fn.plot=function(i,e){return this.each(function(){t.plot(this,i,e)})}}(jQuery);
35
+ $.plot.version = "lara-0.8.3";
36
+ $.plot.plugins = [];
37
  //axisLabels 2.0
38
  !function(t){function i(){return!!document.createElement("canvas").getContext}function e(){if(!i())return!1;var t=document.createElement("canvas"),e=t.getContext("2d");return"function"==typeof e.fillText}function s(){var t=document.createElement("div");return"undefined"!=typeof t.style.MozTransition||"undefined"!=typeof t.style.OTransition||"undefined"!=typeof t.style.webkitTransition||"undefined"!=typeof t.style.transition}function o(t,i,e,s,o){this.axisName=t,this.position=i,this.padding=e,this.plot=s,this.opts=o,this.width=0,this.height=0}function a(t,i,e,s,a){o.prototype.constructor.call(this,t,i,e,s,a)}function l(t,i,e,s,a){o.prototype.constructor.call(this,t,i,e,s,a),this.elem=null}function h(t,i,e,s,o){l.prototype.constructor.call(this,t,i,e,s,o)}function n(t,i,e,s,o){h.prototype.constructor.call(this,t,i,e,s,o),this.requiresResize=!1}function r(i){i.hooks.processOptions.push(function(i,o){if(o.axisLabels.show){var r=!1,p={},d=2;i.hooks.draw.push(function(i,o){var f=!1;r?(r=!1,t.each(i.getAxes(),function(t,e){var s=e.options||i.getOptions()[t];s&&s.axisLabel&&e.show&&p[t].draw(e.box)})):(t.each(i.getAxes(),function(t,o){var r=o.options||i.getOptions()[t];if(t in p&&(o.labelHeight=o.labelHeight-p[t].height,o.labelWidth=o.labelWidth-p[t].width,r.labelHeight=o.labelHeight,r.labelWidth=o.labelWidth,p[t].cleanup(),delete p[t]),r&&r.axisLabel&&o.show){f=!0;var c=null;if(r.axisLabelUseHtml||"Microsoft Internet Explorer"!=navigator.appName)c=r.axisLabelUseHtml||!s()&&!e()&&!r.axisLabelUseCanvas?l:r.axisLabelUseCanvas||!s()?a:h;else{var b=navigator.userAgent,x=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");null!=x.exec(b)&&(rv=parseFloat(RegExp.$1)),c=rv>=9&&!r.axisLabelUseCanvas&&!r.axisLabelUseHtml?h:r.axisLabelUseCanvas||r.axisLabelUseHtml?r.axisLabelUseCanvas?a:l:n}var g=void 0===r.axisLabelPadding?d:r.axisLabelPadding;p[t]=new c(t,o.position,g,i,r),p[t].calculateSize(),r.labelHeight=o.labelHeight+p[t].height,r.labelWidth=o.labelWidth+p[t].width}}),f&&(r=!0,i.setupGrid(),i.draw()))})}})}var p={axisLabels:{show:!0}};o.prototype.cleanup=function(){},a.prototype=new o,a.prototype.constructor=a,a.prototype.calculateSize=function(){this.opts.axisLabelFontSizePixels||(this.opts.axisLabelFontSizePixels=14),this.opts.axisLabelFontFamily||(this.opts.axisLabelFontFamily="sans-serif");this.opts.axisLabelFontSizePixels+this.padding,this.opts.axisLabelFontSizePixels+this.padding;"left"==this.position||"right"==this.position?(this.width=this.opts.axisLabelFontSizePixels+this.padding,this.height=0):(this.width=0,this.height=this.opts.axisLabelFontSizePixels+this.padding)},a.prototype.draw=function(t){this.opts.axisLabelColour||(this.opts.axisLabelColour="black");var i=this.plot.getCanvas().getContext("2d");i.save(),i.font=this.opts.axisLabelFontSizePixels+"px "+this.opts.axisLabelFontFamily,i.fillStyle=this.opts.axisLabelColour;var e,s,o=i.measureText(this.opts.axisLabel).width,a=this.opts.axisLabelFontSizePixels,l=0;"top"==this.position?(e=t.left+t.width/2-o/2,s=t.top+.72*a):"bottom"==this.position?(e=t.left+t.width/2-o/2,s=t.top+t.height-.72*a):"left"==this.position?(e=t.left+.72*a,s=t.height/2+t.top+o/2,l=-Math.PI/2):"right"==this.position&&(e=t.left+t.width-.72*a,s=t.height/2+t.top-o/2,l=Math.PI/2),i.translate(e,s),i.rotate(l),i.fillText(this.opts.axisLabel,0,0),i.restore()},l.prototype=new o,l.prototype.constructor=l,l.prototype.calculateSize=function(){var i=t('<div class="axisLabels" style="position:absolute;">'+this.opts.axisLabel+"</div>");this.plot.getPlaceholder().append(i),this.labelWidth=i.outerWidth(!0),this.labelHeight=i.outerHeight(!0),i.remove(),this.width=this.height=0,"left"==this.position||"right"==this.position?this.width=this.labelWidth+this.padding:this.height=this.labelHeight+this.padding},l.prototype.cleanup=function(){this.elem&&this.elem.remove()},l.prototype.draw=function(i){this.plot.getPlaceholder().find("#"+this.axisName+"Label").remove(),this.elem=t('<div id="'+this.axisName+'Label" " class="axisLabels" style="position:absolute;">'+this.opts.axisLabel+"</div>"),this.plot.getPlaceholder().append(this.elem),"top"==this.position?(this.elem.css("left",i.left+i.width/2-this.labelWidth/2+"px"),this.elem.css("top",i.top+"px")):"bottom"==this.position?(this.elem.css("left",i.left+i.width/2-this.labelWidth/2+"px"),this.elem.css("top",i.top+i.height-this.labelHeight+"px")):"left"==this.position?(this.elem.css("top",i.top+i.height/2-this.labelHeight/2+"px"),this.elem.css("left",i.left+"px")):"right"==this.position&&(this.elem.css("top",i.top+i.height/2-this.labelHeight/2+"px"),this.elem.css("left",i.left+i.width-this.labelWidth+"px"))},h.prototype=new l,h.prototype.constructor=h,h.prototype.calculateSize=function(){l.prototype.calculateSize.call(this),this.width=this.height=0,"left"==this.position||"right"==this.position?this.width=this.labelHeight+this.padding:this.height=this.labelHeight+this.padding},h.prototype.transforms=function(t,i,e){var s={"-moz-transform":"","-webkit-transform":"","-o-transform":"","-ms-transform":""};if(0!=i||0!=e){var o=" translate("+i+"px, "+e+"px)";s["-moz-transform"]+=o,s["-webkit-transform"]+=o,s["-o-transform"]+=o,s["-ms-transform"]+=o}if(0!=t){var a=" rotate("+t+"deg)";s["-moz-transform"]+=a,s["-webkit-transform"]+=a,s["-o-transform"]+=a,s["-ms-transform"]+=a}var l="top: 0; left: 0; ";for(var h in s)s[h]&&(l+=h+":"+s[h]+";");return l+=";"},h.prototype.calculateOffsets=function(t){var i={x:0,y:0,degrees:0};return"bottom"==this.position?(i.x=t.left+t.width/2-this.labelWidth/2,i.y=t.top+t.height-this.labelHeight):"top"==this.position?(i.x=t.left+t.width/2-this.labelWidth/2,i.y=t.top):"left"==this.position?(i.degrees=-90,i.x=t.left-this.labelWidth/2+this.labelHeight/2,i.y=t.height/2+t.top):"right"==this.position&&(i.degrees=90,i.x=t.left+t.width-this.labelWidth/2-this.labelHeight/2,i.y=t.height/2+t.top),i.x=Math.round(i.x),i.y=Math.round(i.y),i},h.prototype.draw=function(i){this.plot.getPlaceholder().find("."+this.axisName+"Label").remove();var e=this.calculateOffsets(i);this.elem=t('<div class="axisLabels '+this.axisName+'Label" style="position:absolute; '+this.transforms(e.degrees,e.x,e.y)+'">'+this.opts.axisLabel+"</div>"),this.plot.getPlaceholder().append(this.elem)},n.prototype=new h,n.prototype.constructor=n,n.prototype.transforms=function(t,i,e){var s="";if(0!=t){for(var o=t/90;0>o;)o+=4;s+=" filter: progid:DXImageTransform.Microsoft.BasicImage(rotation="+o+"); ",this.requiresResize="right"==this.position}return 0!=i&&(s+="left: "+i+"px; "),0!=e&&(s+="top: "+e+"px; "),s},n.prototype.calculateOffsets=function(t){var i=h.prototype.calculateOffsets.call(this,t);return"top"==this.position?i.y=t.top+1:"left"==this.position?(i.x=t.left,i.y=t.height/2+t.top-this.labelWidth/2):"right"==this.position&&(i.x=t.left+t.width-this.labelHeight,i.y=t.height/2+t.top-this.labelWidth/2),i},n.prototype.draw=function(t){h.prototype.draw.call(this,t),this.requiresResize&&(this.elem=this.plot.getPlaceholder().find("."+this.axisName+"Label"),this.elem.css("width",this.labelWidth),this.elem.css("height",this.labelHeight))},t.plot.plugins.push({init:r,options:p,name:"axisLabels",version:"2.0"})}(jQuery);
39
  //improved orderBars 0.2 - github.com/emmerich
44
  (function($){var options={xaxis:{timezone:null,timeformat:null,twelveHourClock:false,monthNames:null}};function floorInBase(n,base){return base*Math.floor(n/base)}function formatDate(d,fmt,monthNames,dayNames){if(typeof d.strftime=="function"){return d.strftime(fmt)}var leftPad=function(n,pad){n=""+n;pad=""+(pad==null?"0":pad);return n.length==1?pad+n:n};var r=[];var escape=false;var hours=d.getHours();var isAM=hours<12;if(monthNames==null){monthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}if(dayNames==null){dayNames=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]}var hours12;if(hours>12){hours12=hours-12}else if(hours==0){hours12=12}else{hours12=hours}for(var i=0;i<fmt.length;++i){var c=fmt.charAt(i);if(escape){switch(c){case"a":c=""+dayNames[d.getDay()];break;case"b":c=""+monthNames[d.getMonth()];break;case"d":c=leftPad(d.getDate());break;case"e":c=leftPad(d.getDate()," ");break;case"h":case"H":c=leftPad(hours);break;case"I":c=leftPad(hours12);break;case"l":c=leftPad(hours12," ");break;case"m":c=leftPad(d.getMonth()+1);break;case"M":c=leftPad(d.getMinutes());break;case"q":c=""+(Math.floor(d.getMonth()/3)+1);break;case"S":c=leftPad(d.getSeconds());break;case"y":c=leftPad(d.getFullYear()%100);break;case"Y":c=""+d.getFullYear();break;case"p":c=isAM?""+"am":""+"pm";break;case"P":c=isAM?""+"AM":""+"PM";break;case"w":c=""+d.getDay();break}r.push(c);escape=false}else{if(c=="%"){escape=true}else{r.push(c)}}}return r.join("")}function makeUtcWrapper(d){function addProxyMethod(sourceObj,sourceMethod,targetObj,targetMethod){sourceObj[sourceMethod]=function(){return targetObj[targetMethod].apply(targetObj,arguments)}}var utc={date:d};if(d.strftime!=undefined){addProxyMethod(utc,"strftime",d,"strftime")}addProxyMethod(utc,"getTime",d,"getTime");addProxyMethod(utc,"setTime",d,"setTime");var props=["Date","Day","FullYear","Hours","Milliseconds","Minutes","Month","Seconds"];for(var p=0;p<props.length;p++){addProxyMethod(utc,"get"+props[p],d,"getUTC"+props[p]);addProxyMethod(utc,"set"+props[p],d,"setUTC"+props[p])}return utc}function dateGenerator(ts,opts){if(opts.timezone=="browser"){return new Date(ts)}else if(!opts.timezone||opts.timezone=="utc"){return makeUtcWrapper(new Date(ts))}else if(typeof timezoneJS!="undefined"&&typeof timezoneJS.Date!="undefined"){var d=new timezoneJS.Date;d.setTimezone(opts.timezone);d.setTime(ts);return d}else{return makeUtcWrapper(new Date(ts))}}var timeUnitSize={second:1e3,minute:60*1e3,hour:60*60*1e3,day:24*60*60*1e3,month:30*24*60*60*1e3,quarter:3*30*24*60*60*1e3,year:365.2425*24*60*60*1e3};var baseSpec=[[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"]];var specMonths=baseSpec.concat([[3,"month"],[6,"month"],[1,"year"]]);var specQuarters=baseSpec.concat([[1,"quarter"],[2,"quarter"],[1,"year"]]);function init(plot){plot.hooks.processOptions.push(function(plot,options){$.each(plot.getAxes(),function(axisName,axis){var opts=axis.options;if(opts.mode=="time"){axis.tickGenerator=function(axis){var ticks=[];var d=dateGenerator(axis.min,opts);var minSize=0;var spec=opts.tickSize&&opts.tickSize[1]==="quarter"||opts.minTickSize&&opts.minTickSize[1]==="quarter"?specQuarters:specMonths;if(opts.minTickSize!=null){if(typeof opts.tickSize=="number"){minSize=opts.tickSize}else{minSize=opts.minTickSize[0]*timeUnitSize[opts.minTickSize[1]]}}for(var i=0;i<spec.length-1;++i){if(axis.delta<(spec[i][0]*timeUnitSize[spec[i][1]]+spec[i+1][0]*timeUnitSize[spec[i+1][1]])/2&&spec[i][0]*timeUnitSize[spec[i][1]]>=minSize){break}}var size=spec[i][0];var unit=spec[i][1];if(unit=="year"){if(opts.minTickSize!=null&&opts.minTickSize[1]=="year"){size=Math.floor(opts.minTickSize[0])}else{var magn=Math.pow(10,Math.floor(Math.log(axis.delta/timeUnitSize.year)/Math.LN10));var norm=axis.delta/timeUnitSize.year/magn;if(norm<1.5){size=1}else if(norm<3){size=2}else if(norm<7.5){size=5}else{size=10}size*=magn}if(size<1){size=1}}axis.tickSize=opts.tickSize||[size,unit];var tickSize=axis.tickSize[0];unit=axis.tickSize[1];var step=tickSize*timeUnitSize[unit];if(unit=="second"){d.setSeconds(floorInBase(d.getSeconds(),tickSize))}else if(unit=="minute"){d.setMinutes(floorInBase(d.getMinutes(),tickSize))}else if(unit=="hour"){d.setHours(floorInBase(d.getHours(),tickSize))}else if(unit=="month"){d.setMonth(floorInBase(d.getMonth(),tickSize))}else if(unit=="quarter"){d.setMonth(3*floorInBase(d.getMonth()/3,tickSize))}else if(unit=="year"){d.setFullYear(floorInBase(d.getFullYear(),tickSize))}d.setMilliseconds(0);if(step>=timeUnitSize.minute){d.setSeconds(0)}if(step>=timeUnitSize.hour){d.setMinutes(0)}if(step>=timeUnitSize.day){d.setHours(0)}if(step>=timeUnitSize.day*4){d.setDate(1)}if(step>=timeUnitSize.month*2){d.setMonth(floorInBase(d.getMonth(),3))}if(step>=timeUnitSize.quarter*2){d.setMonth(floorInBase(d.getMonth(),6))}if(step>=timeUnitSize.year){d.setMonth(0)}var carry=0;var v=Number.NaN;var prev;do{prev=v;v=d.getTime();ticks.push(v);if(unit=="month"||unit=="quarter"){if(tickSize<1){d.setDate(1);var start=d.getTime();d.setMonth(d.getMonth()+(unit=="quarter"?3:1));var end=d.getTime();d.setTime(v+carry*timeUnitSize.hour+(end-start)*tickSize);carry=d.getHours();d.setHours(0)}else{d.setMonth(d.getMonth()+tickSize*(unit=="quarter"?3:1))}}else if(unit=="year"){d.setFullYear(d.getFullYear()+tickSize)}else{d.setTime(v+step)}}while(v<axis.max&&v!=prev);return ticks};axis.tickFormatter=function(v,axis){var d=dateGenerator(v,axis.options);if(opts.timeformat!=null){return formatDate(d,opts.timeformat,opts.monthNames,opts.dayNames)}var useQuarters=axis.options.tickSize&&axis.options.tickSize[1]=="quarter"||axis.options.minTickSize&&axis.options.minTickSize[1]=="quarter";var t=axis.tickSize[0]*timeUnitSize[axis.tickSize[1]];var span=axis.max-axis.min;var suffix=opts.twelveHourClock?" %p":"";var hourCode=opts.twelveHourClock?"%I":"%H";var fmt;if(t<timeUnitSize.minute){fmt=hourCode+":%M:%S"+suffix}else if(t<timeUnitSize.day){if(span<2*timeUnitSize.day){fmt=hourCode+":%M"+suffix}else{fmt="%b %d "+hourCode+":%M"+suffix}}else if(t<timeUnitSize.month){fmt="%b %d"}else if(useQuarters&&t<timeUnitSize.quarter||!useQuarters&&t<timeUnitSize.year){if(span<timeUnitSize.year){fmt="%b"}else{fmt="%b %Y"}}else if(useQuarters&&t<timeUnitSize.year){if(span<timeUnitSize.year){fmt="Q%q"}else{fmt="Q%q %Y"}}else{fmt="%Y"}var rt=formatDate(d,fmt,opts.monthNames,opts.dayNames);return rt}}})})}$.plot.plugins.push({init:init,options:options,name:"time",version:"1.0"});$.plot.formatDate=formatDate})(jQuery);
45
  //resize",version:"1.0"
46
  (function($,e,t){"$:nomunge";var i=[],n=$.resize=$.extend($.resize,{}),a,r=false,s="setTimeout",u="resize",m=u+"-special-event",o="pendingDelay",l="activeDelay",f="throttleWindow";n[o]=200;n[l]=20;n[f]=true;$.event.special[u]={setup:function(){if(!n[f]&&this[s]){return false}var e=$(this);i.push(this);e.data(m,{w:e.width(),h:e.height()});if(i.length===1){a=t;h()}},teardown:function(){if(!n[f]&&this[s]){return false}var e=$(this);for(var t=i.length-1;t>=0;t--){if(i[t]==this){i.splice(t,1);break}}e.removeData(m);if(!i.length){if(r){cancelAnimationFrame(a)}else{clearTimeout(a)}a=null}},add:function(e){if(!n[f]&&this[s]){return false}var i;function a(e,n,a){var r=$(this),s=r.data(m)||{};s.w=n!==t?n:r.width();s.h=a!==t?a:r.height();i.apply(this,arguments)}if($.isFunction(e)){i=e;return a}else{i=e.handler;e.handler=a}}};function h(t){if(r===true){r=t||1}for(var s=i.length-1;s>=0;s--){var l=$(i[s]);if(l[0]==e||l.is(":visible")){var f=l.width(),c=l.height(),d=l.data(m);if(d&&(f!==d.w||c!==d.h)){l.trigger(u,[d.w=f,d.h=c]);r=t||true}}else{d=l.data(m);d.w=0;d.h=0}}if(a!==null){if(r&&(t==null||t-r<1e3)){a=e.requestAnimationFrame(h)}else{a=setTimeout(h,n[o]);r=false}}}if(!e.requestAnimationFrame){e.requestAnimationFrame=function(){return e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t,i){return e.setTimeout(function(){t((new Date).getTime())},n[l])}}()}if(!e.cancelAnimationFrame){e.cancelAnimationFrame=function(){return e.webkitCancelRequestAnimationFrame||e.mozCancelRequestAnimationFrame||e.oCancelRequestAnimationFrame||e.msCancelRequestAnimationFrame||clearTimeout}()}})(jQuery,this);(function($){var options={};function init(plot){function onResize(){var placeholder=plot.getPlaceholder();if(placeholder.width()==0||placeholder.height()==0)return;plot.resize();plot.setupGrid();plot.draw()}function bindEvents(plot,eventHolder){plot.getPlaceholder().resize(onResize)}function shutdown(plot,eventHolder){plot.getPlaceholder().unbind("resize",onResize)}plot.hooks.bindEvents.push(bindEvents);plot.hooks.shutdown.push(shutdown)}$.plot.plugins.push({init:init,options:options,name:"resize",version:"1.0"})})(jQuery);
47
+ //custom version
48
+ var laraFlotv083 = $.plot;
49
 
50
  /* jquery.sparkline 2.1.2 - http://omnipotent.net/jquery.sparkline/
51
 
424
  var webPropertyID;
425
  var profileID;
426
  var webPropertyUrl;
427
+ var lrgaLockSettings;
428
 
429
+ function enableSettingsInput(mode){
430
+ $("#lrgawidget-save-settings").prop('disabled',!mode);
431
+ $('#lrgawidget-setProfileID input').prop('disabled', !mode);
432
+ $('#lrgawidget-setProfileID select').prop('disabled', !mode);
433
+ }
434
 
435
  function getProfileDetails(id){
436
  var cProfile = {};
530
 
531
  $("#lrgawidget-setProfileID").submit(function(e) {
532
  e.preventDefault();
533
+ enableSettingsInput(true);
534
  lrWidgetSettings($("#lrgawidget-setProfileID").serializeArray()).done(function (data, textStatus, jqXHR) {
535
  if (data.status == "done"){
536
  $("#lrgawidget a[data-target^='#lrgawidget_']:eq(0)").click();
537
+ graphOptions = {};
538
  }
539
  })
540
  });
541
 
542
  $('#lrga-wizard').on('changed.fu.wizard', function (evt, data) {
 
543
  if ($("[data-step="+data.step+"]").attr("data-name") == "lrga-profile"){
544
+ enableSettingsInput(false);
545
  lrWidgetSettings({action: "getProfiles"}).done(function (data, textStatus, jqXHR) {
546
  if (data.status == "done"){
547
  lrgaaccountID = data.current_selected.account_id;
549
  profileID = data.current_selected.profile_id;
550
  lrgaAccounts = data.all_accounts;
551
  lrgaProfiles = data.all_profiles;
552
+ lrgaLockSettings = data.current_selected.lock_settings;
553
+ if(lrgaLockSettings !== "on"){
554
+ enableSettingsInput(true);
555
+ $('.lrgawidget-lock-settings input[type=checkbox]').prop("checked", false);
556
+ }else{
557
+ $('.lrgawidget-lock-settings input[type=checkbox]').prop("checked", true);
558
+ }
559
+
560
  populateViews();
 
561
  setup = false;
562
  }
563
  })
607
  $("[data-reload='lrgawidget_go_express']").hide();
608
  $('#lrga-wizard').wizard('selectedItem', {step: 1});
609
  $("#lrgawidget_express_setup").show();
610
+ });
611
+
612
+ $('.lrgawidget-lock-settings input[type=checkbox]').click(function(){
613
+ if($(this).is(":checked")){
614
+ enableSettingsInput(false);
615
+ }else if($(this).is(":not(:checked)")){
616
+ enableSettingsInput(true);
617
+ }
618
+ $(this).prop('disabled', false);
619
+ $("#lrgawidget-save-settings").prop('disabled',false);
620
  });
621
 
622
  });
837
  }
838
 
839
  function drawGraph(data,name){
840
+
841
+ if ( ($.plot == null) || ($.plot.version !== "lara-0.8.3")){
842
+ $.plot = laraFlotv083;
843
+ if (debug){console.log("restoring flot 0.8.3")};
844
+ }
845
+
846
  var settings = mainChartDefaults;
847
  var totalSales = 0;
848
  var totalEarnings = 0;
858
  currentPlotData = {};
859
  }
860
 
861
+ if (isObject(plotData.sales) && isObject(plotData.earnings)){
862
+ var seData = [];
863
+ var clineWidth = 0.5;
864
+ var cbarWidth = 3600000 * 6;
865
+ var options = {"yaxes": [{min: 0 },
866
+ {min: 0, max:plotData["sales"]["config"]["maxv"], show: true, position: "right", color: "#7EAAC5", tickDecimals: 0, axisLabel: plotData["sales"]["config"]["label"], axisLabelUseCanvas: true, axisLabelFontSizePixels: 12, axisLabelFontFamily: 'Verdana, Arial', axisLabelPadding: 3,lrcustom: {before: plotData["sales"]["config"]["lrbefore"], after: plotData["sales"]["config"]["lrafter"], format: plotData["sales"]["config"]["lrformat"]}},
867
+ {min: 0, max:plotData["earnings"]["config"]["maxv"], show: true, position: "right", color: "#87C1E3", tickFormatter: lrTickFormatter, tickColor: "#87C1E3", axisLabel: plotData["earnings"]["config"]["label"], axisLabelUseCanvas: true, axisLabelFontSizePixels: 12, axisLabelFontFamily: 'Verdana, Arial', axisLabelPadding: 3, lrcustom: {before: plotData["earnings"]["config"]["lrbefore"], after: plotData["earnings"]["config"]["lrafter"], format: plotData["earnings"]["config"]["lrformat"]}}],
868
+ "legend": {show: true, container:'#lrga-legendholder', labelFormatter: lrLegendFormatter}};
869
+
870
+ $.each( plotData["earnings"]["series"], function( i, series ) {
871
+ var salesSeries = plotData["sales"]["series"][i];
872
+ if ((graphData.settings.showempty == "off") && (series.total == 0 && salesSeries.total == 0)){ return true;}
873
+ totalSales = totalSales + salesSeries.total;
874
+ totalEarnings = totalEarnings + series.total;
875
+ seData.push({data:salesSeries.data, sid:series.id, color: salesSeries.color, bars: { show: true, lineWidth: clineWidth, fill: true, barWidth: cbarWidth, order: 2 }, yaxis: 2, stack: 2 });
876
+ seData.push({data:series.data, sid:series.id, color: series.color, label:series.label, lrcustom: {total: series.total, totalorders: salesSeries.total, before: plotData["earnings"]["config"]["lrbefore"], after: plotData["earnings"]["config"]["lrafter"], format: plotData["earnings"]["config"]["lrformat"]}, bars: { show: true, lineWidth: clineWidth, fill: true, barWidth: cbarWidth, order: 1 }, yaxis: 3, stack: 1 });
877
+ });
878
+
879
+ gData = gData.concat(seData);
880
+ settings = $.extend({}, settings, options);
881
+ $("#lrga-legendholder").css({"right":"105px"});
882
+ $("#lrga-xologoholder").css({"right":"115px"});
883
+ }
884
+
885
  mainChart = $.plot($("#lrgawidget_sessions_chartDiv"), gData, settings);
886
  currentPlotData = mainChart.getData();
887
 
888
  if( $('#lrga-legendholder').is(':empty')) {$("#lrga-legendholder").hide();} else{$("#lrga-legendholder").show();}
889
 
890
+ if (isObject(plotData.sales) && isObject(plotData.earnings)){
891
+ $("#lrga-legendholder table tr:first").before('<tr class="legendTotals"><td class="legendColorBox"></td><td class="legendLabel">'+graphData.settings.graphlabel+'</td><td class="legendEarnings"></td><td></td><td class="legendSales"></td></tr>');
892
+ if ((totalSales > 0 || totalEarnings > 0) && (graphData.settings.showtotal == "on") ){
893
+ $("#lrga-legendholder table tr:last").after('<tr class="legendTotals"><td class="legendColorBox"></td><td class="legendLabel">'+lrwidgetenLang.total+'</td><td class="legendEarnings">'+plotData["earnings"]["config"]["lrbefore"]+totalEarnings.toFixed(2)+plotData["earnings"]["config"]["lrafter"]+'</td><td>|</td><td class="legendSales">'+totalSales+'</td></tr>');
894
+ }
895
+ }
896
 
897
  $('<div class="tooltip-inner" id="lrgawidget_sessions_chart_tooltip"></div>').css({
898
  "text-align": "left",
976
  var plotData = {};
977
  var plotTotalData = {};
978
  var selectedPname = "";
979
+ var graphOptions = {};
980
+ var graphData = {};
981
 
982
  function drawMainGraphWidgets(data, selected){
983
  if ($('#lrgawidget_sb-main').is(":visible")){
995
  function drawMainGraph(){
996
  lrWidgetSettings({action : "getSessions"}).done(function (data, textStatus, jqXHR) {
997
  if (data.status == "done" && data.setup !== 1){
998
+
999
+ if (isObject(data.graph)){
1000
+ graphData = data.graph;
1001
+ $("#lrghop_button").show();
1002
+ }
1003
+
1004
  plotData = data.plotdata;
1005
  plotTotalData = data.totalsForAllResults;
1006
  if (!selectedPname){selectedPname = "sessions";}
1011
  });
1012
  }
1013
 
1014
+ function populateSettings(){
1015
+ let settings = graphOptions.settings;
1016
+ let settingsOutput = "" ;
1017
+ $("#lrghop_settings").html("");
1018
+
1019
+ $.each(settings, function( sId, sObj){
1020
+ settingsOutput += '<div class="row"> <div class="col-sm-4">'+sObj.name+'</div> <div class="col-sm-8 btn-group btn-toggle" data-toggle="buttons">';
1021
+
1022
+ $.each(sObj.options, function( oId, oName){
1023
+ var is_active = "";
1024
+ var is_checked = "";
1025
+ if (oId == sObj.value){
1026
+ is_active = 'active';
1027
+ is_checked = 'checked="checked"';
1028
+ }
1029
+ settingsOutput +='<label class="btn btn-xs btn-primary '+is_active+'"><input name="settings['+sObj.id+']" value="'+oId+'" type="radio" '+is_checked+' >'+oName+'</label>';
1030
+ });
1031
+
1032
+ settingsOutput += ' </div> </div>';
1033
+ });
1034
+
1035
+ $("#lrghop_settings").html(settingsOutput);
1036
+
1037
+ }
1038
+
1039
+ var filterPanelsOutput = "";
1040
+ function populateFilters(){
1041
+ let filters = graphOptions.filters;
1042
+ let filtersButtons = "";
1043
+ let filterPanels = "";
1044
+ $("#lrgfilters_buttons").html("");
1045
+ $.each(filters, function( id, filter){
1046
+ filtersButtons += '<button class="btn btn-primary btn-sm btn-block" data-lrghop-button="'+filter.id+'" type="button">'+filter.name+'</button>';
1047
+ filterPanels +='<div data-lrgh-panel="'+filter.id+'"> <div class="lrgo_filterpanel_head">'+filter.name+'<span class="lrgawidget_graph_cached" style="display:none;">['+lrwidgetenLang.cached+']</span></div> <div class="lrgo_filterpanel_body" id="lrgh_'+filter.id+'"> <ul>';
1048
+
1049
+ filterPanelsOutput = '';
1050
+
1051
+ let filterData = filter.data;
1052
+ if (typeof filter.datasource !== 'undefined') {
1053
+ filterData = graphOptions.filters[filter.datasource].data;
1054
+ }
1055
+
1056
+ populateFilterPanel(filter.id, filterData);
1057
+ filterPanels += filterPanelsOutput;
1058
+
1059
+ filterPanels +=' </ul> </div> </div>';
1060
+ });
1061
+
1062
+ filterPanelsOutput = '';
1063
+ $("#lrgfilters_buttons").html(filtersButtons);
1064
+ $("#lrgfilters_panels").html(filterPanels);
1065
+
1066
+ $("[data-lrghop-button]").on('click', function (e) {
1067
+ showOptionsGroup($(this).data('lrghop-button'));
1068
+ });
1069
+
1070
+ }
1071
+
1072
+ function populateFilterPanel(filterId, items){
1073
+
1074
+ $.each(items, function( id, item ){
1075
+ let checked = "";
1076
+ if (filterId == "products" && item.type == "categories"){
1077
+ if (typeof item.products !== 'undefined'){
1078
+ filterPanelsOutput += '<ul class="lrghop_filter_children" >';
1079
+ filterPanelsOutput += '<div class="lrghop_filter_header">'+item.name+'</div>';
1080
+ populateFilterPanel(filterId, item.products);
1081
+ filterPanelsOutput += '</ul>';
1082
+ }else{
1083
+ filterPanelsOutput += '<div class="lrghop_filter_header">'+item.name+'</div>';
1084
+ }
1085
+ }else{
1086
+ if (item.state == "on"){checked = "checked";}
1087
+ filterPanelsOutput += '<li> <div class="lrghop_colorselector_item_container"> <span style="background-color: '+item.color+';" class="lrghop_colorselector_item"> <input type="hidden" data-lrgo-itemcolor="'+filterId+'_'+item.id+'" name="filters['+filterId+']['+item.id+'][color]" id="hidden-input" value="'+item.color+'"> </span> <label><input data-lrgo-itembox="'+filterId+'_'+item.id+'" type="checkbox" name="filters['+filterId+']['+item.id+'][status]" value="on" '+checked+'>'+item.name+'</label> </div> </li>';
1088
+ }
1089
+
1090
+ if (typeof item.children !== 'undefined'){
1091
+ filterPanelsOutput += '<ul class="lrghop_filter_children" >';
1092
+ populateFilterPanel(filterId, item.children);
1093
+ filterPanelsOutput += '</ul>';
1094
+ }
1095
+ });
1096
+ }
1097
+
1098
+ var currenSelectedColorBox = "";
1099
+ function showGraphOptions(){
1100
+ if (typeof graphOptions.status == 'undefined'){
1101
+ lrWidgetSettings({action : "getGraphData"}).done(function (data, textStatus, jqXHR) {
1102
+ if (data.status == "done" && data.setup !== 1){
1103
+ graphOptions = data;
1104
+ populateSettings();
1105
+ populateFilters();
1106
+
1107
+ if (data.gaoptionscached){ $(".lrgawidget_graph_cached").show();}
1108
+
1109
+ $('.lrghop_colorselector' ).off('change');
1110
+
1111
+ $('.lrghop_colorselector').each( function() {
1112
+ $(this).minicolors({
1113
+ control: 'hue',
1114
+ defaultValue: '',
1115
+ format: 'hex',
1116
+ swatches: data.swatches,
1117
+ inline: true,
1118
+ });
1119
+
1120
+ });
1121
+
1122
+ $(document).mouseup(function(e){
1123
+ if ($(".lrghop_colorselector_container").is(":visible")){
1124
+ if (!$(".lrghop_colorselector_container").is(e.target) && $(".lrghop_colorselector_container").has(e.target).length === 0){
1125
+ $(".lrghop_colorselector_container").hide();
1126
+ }
1127
+ }
1128
+ });
1129
+
1130
+ $(".lrgo_filterpanel_body").scroll(function() {
1131
+ if ($(".lrghop_colorselector_container").is(":visible")){
1132
+ $(".lrghop_colorselector_container").hide();
1133
+ }
1134
+ });
1135
+
1136
+ $(window).scroll(function() {
1137
+ if ($(".lrghop_colorselector_container").is(":visible")){
1138
+ $(".lrghop_colorselector_container").hide();
1139
+ }
1140
+ });
1141
+
1142
+ $('.lrghop_colorselector_item' ).on('click', function(e) {
1143
+ var sid = $(this).find(':first-child').data("lrgo-itemcolor");
1144
+ var sColor = $(this).find(':first-child').val();
1145
+
1146
+ $("[data-lrgo-itembox='" + sid +"']").prop("checked", true);
1147
+ currenSelectedColorBox = sid;
1148
+
1149
+ $('.lrghop_colorselector').minicolors('value', {color: sColor});
1150
+ $('.lrghop_colorselector_container').css({ left: ($(this).offset().left ) + "px", top: ($(this).offset().top - $(window).scrollTop() + 20) + "px" });
1151
+ $('.lrghop_colorselector_container').show();
1152
+
1153
+
1154
+ });
1155
+
1156
+ $('.lrghop_colorselector' ).on('change', function(e) {
1157
+ var colorChanged = false;
1158
+ var graphData = mainChart.getData();
1159
+ var sid = currenSelectedColorBox;
1160
+ var sColor = $(this).val();
1161
+
1162
+ $("[data-lrgo-itemcolor='" + sid +"']").parent(".lrghop_colorselector_item").css({'background-color': sColor});
1163
+ $("[data-lrgo-itemcolor='" + sid +"']").attr("value", sColor);
1164
+
1165
+ $.each(graphData, function( i, data){
1166
+ if ((typeof data.sid !== 'undefined') && (data.sid == sid)){
1167
+ graphData[i].color = sColor;
1168
+ colorChanged = true;
1169
+ }
1170
+ });
1171
+
1172
+ if (colorChanged === true){
1173
+ mainChart.setData(graphData);
1174
+ mainChart.draw();
1175
+ if (debug){ console.log("Graph Color Changed"); }
1176
+ }
1177
+ });
1178
+ showOptionsGroup(data.currentfilter);
1179
+ }
1180
+ });
1181
+ }
1182
+
1183
+ }
1184
+
1185
+ function showOptionsGroup(groupID){
1186
+ $("[data-lrgh-panel]").hide();
1187
+ $("[data-lrgh-panel="+groupID+"]").show();
1188
+
1189
+ if (groupID != "settings"){
1190
+ $("[data-lrghop-button]").removeClass("active");
1191
+ $("[data-lrghop-button="+groupID+"]").addClass("active");
1192
+ $('[name="currentfilter"]').val(groupID);
1193
+ }
1194
+ }
1195
+
1196
 
1197
  function setOptionsGrid(){
1198
  $('.lroptions-checkbox-grid[data-lr-roleid="administrator"][data-lr-groupid="permissions"]').find('input:checkbox').prop('checked',true).prop("disabled", true);
1199
  $('.lrgawidget_permissions_switch[data-lr-roleid="administrator"][data-lr-groupid="permissions"]').prop('checked',true).prop("disabled", true);
1200
  $('.lrgawidget_permissions_switch[data-lr-roleid="administrator"][data-lr-groupid="tabs"]').prop('checked',true).change();
1201
+ $('.lrgawidget_permissions_switch[data-lr-roleid="administrator"][data-lr-groupid="ecommerce"]').prop('checked',true).change();
1202
  }
1203
 
1204
  function getPermissions(){
1211
  rolesHTML += '<li><a href="#lrrole_'+role.id+'" data-toggle="pill"><i class="fa fa-users fa-fw"></i>'+role.name+'</a></li>';
1212
  permissionsHTML += '<div class="tab-pane" id="lrrole_'+role.id+'">';
1213
  $.each(data.group_permissions, function( y, group ){
1214
+ permissionsHTML += '<div class="box box-primary"> <div class="box-header with-border"> <h3 class="box-title"><i class="fa '+group.icon+'"></i> '+group.name+'</h3> <input type="hidden" name="lrperms['+role.id+'][]" value="'+group.id+'"> <span class="pull-right"> <label class="switch"> <input type="checkbox" class="lrgawidget_permissions_switch" data-lr-roleid="'+role.id+'" data-lr-groupid="'+group.id+'" data-lr-grouptype="'+group.type+'" data-lr-groupdefault="'+group.default+'"> <div class="slider "></div> </label> </span> </div> <div class="box-body lroptions-checkbox-grid" data-lr-roleid="'+role.id+'" data-lr-groupid="'+group.id+'">';
1215
  $.each(group.permissions, function( x, permission ){
1216
  var checked = "";
1217
  if($.inArray(permission.name, data.role_permissions[role.id] ) !== -1){
1218
  checked = "checked";
1219
  }
1220
+ permissionsHTML += ' <div> <label><input '+checked+' name="lrperms['+role.id+'][]" type="'+group.type+'" value="'+permission.name+'"> '+permission.label+'</label> </div>';
1221
  });
1222
 
1223
  permissionsHTML += ' </div> </div>';
1229
  $("#lrgawidget_permissions_list").html(permissionsHTML);
1230
  $('#lrgawidget_permissions_roles a:first').tab('show');
1231
  $(".lrgawidget_permissions_switch").change(function(){
1232
+ var groupType = $(this).data("lr-grouptype");
1233
+ if (groupType == "checkbox"){
1234
+ $('.lroptions-checkbox-grid[data-lr-roleid="'+$(this).data("lr-roleid")+'"][data-lr-groupid="'+$(this).data("lr-groupid")+'"]').find('input:checkbox').prop('checked',this.checked).prop("disabled", !this.checked);
1235
+ }else{
1236
+ $('.lroptions-checkbox-grid[data-lr-roleid="'+$(this).data("lr-roleid")+'"][data-lr-groupid="'+$(this).data("lr-groupid")+'"]').find('input:radio').prop('checked',this.checked).prop("disabled", !this.checked);
1237
+ if ($(this).is(':checked')){
1238
+ $('.lroptions-checkbox-grid[data-lr-roleid="'+$(this).data("lr-roleid")+'"][data-lr-groupid="'+$(this).data("lr-groupid")+'"] input[type=radio][value="'+ $(this).data("lr-groupdefault") +'"]').prop('checked',this.checked);
1239
+ }
1240
+ }
1241
  });
1242
  setOptionsGrid();
1243
  }
1271
  });
1272
 
1273
  $("#lrgawidget_main a[data-toggle='tab']").on('shown.bs.tab', function (e) {
1274
+
1275
+ if (this.hash !== "#lrgawidget_sessions_tab"){
1276
+ $("#lrghop_button").hide();
1277
+ }
1278
+
1279
  $("#lrgawidget_sessions_chart_tooltip").remove();
1280
 
1281
  if (this.hash == "#lrgawidget_settings_tab"){
1358
  $("#lrgawidget a[data-target='#"+actLrgaTabs+"']").tab('show');
1359
  }
1360
 
1361
+ $("#lrghop_button").on('click', function (e) {
1362
+ $("#lrghop_menu").show();
1363
+ showGraphOptions();
1364
+ });
1365
+
1366
+ $("#lrghop_cancel").on('click', function (e) {
1367
+ $("#lrghop_menu").hide();
1368
+ });
1369
+
1370
+ $("#lrghop_form").submit(function(e) {
1371
+ e.preventDefault();
1372
+ $("#lrghop_menu").hide();
1373
+ $('#lrgawidget a[data-target="#lrgawidget_gopro_tab"]').tab('show');
1374
+ });
1375
+
1376
+
1377
+ $(document).mouseup(function(e){
1378
+ if ($("#lrghop_menu").is(":visible")){
1379
+ var container = $("#lrghop_menu");
1380
+ if (!container.is(e.target) && container.has(e.target).length === 0){
1381
+ container.hide();
1382
+ }
1383
+ }
1384
+ });
1385
+
1386
  $(".lrgawidget_view_demo").colorbox({iframe:true, innerWidth:"80%", innerHeight:575, scrolling: false});
1387
  });
1388
 
dist/js/lrgawidget.js CHANGED
@@ -137,7 +137,13 @@ var lrgaaccountID;
137
  var webPropertyID;
138
  var profileID;
139
  var webPropertyUrl;
 
140
 
 
 
 
 
 
141
 
142
  function getProfileDetails(id){
143
  var cProfile = {};
@@ -237,16 +243,18 @@ $(document).ready(function(){
237
 
238
  $("#lrgawidget-setProfileID").submit(function(e) {
239
  e.preventDefault();
 
240
  lrWidgetSettings($("#lrgawidget-setProfileID").serializeArray()).done(function (data, textStatus, jqXHR) {
241
  if (data.status == "done"){
242
  $("#lrgawidget a[data-target^='#lrgawidget_']:eq(0)").click();
 
243
  }
244
  })
245
  });
246
 
247
  $('#lrga-wizard').on('changed.fu.wizard', function (evt, data) {
248
- $("#lrgawidget-save-settings").prop('disabled',true);
249
  if ($("[data-step="+data.step+"]").attr("data-name") == "lrga-profile"){
 
250
  lrWidgetSettings({action: "getProfiles"}).done(function (data, textStatus, jqXHR) {
251
  if (data.status == "done"){
252
  lrgaaccountID = data.current_selected.account_id;
@@ -254,8 +262,15 @@ $(document).ready(function(){
254
  profileID = data.current_selected.profile_id;
255
  lrgaAccounts = data.all_accounts;
256
  lrgaProfiles = data.all_profiles;
 
 
 
 
 
 
 
 
257
  populateViews();
258
- $("#lrgawidget-save-settings").prop('disabled',false);
259
  setup = false;
260
  }
261
  })
@@ -305,6 +320,16 @@ $(document).ready(function(){
305
  $("[data-reload='lrgawidget_go_express']").hide();
306
  $('#lrga-wizard').wizard('selectedItem', {step: 1});
307
  $("#lrgawidget_express_setup").show();
 
 
 
 
 
 
 
 
 
 
308
  });
309
 
310
  });
@@ -525,6 +550,12 @@ function lrLegendFormatter(label, series){
525
  }
526
 
527
  function drawGraph(data,name){
 
 
 
 
 
 
528
  var settings = mainChartDefaults;
529
  var totalSales = 0;
530
  var totalEarnings = 0;
@@ -540,14 +571,41 @@ function drawGraph(data,name){
540
  currentPlotData = {};
541
  }
542
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
543
  mainChart = $.plot($("#lrgawidget_sessions_chartDiv"), gData, settings);
544
  currentPlotData = mainChart.getData();
545
 
546
  if( $('#lrga-legendholder').is(':empty')) {$("#lrga-legendholder").hide();} else{$("#lrga-legendholder").show();}
547
 
548
- if ((totalSales > 0 || totalEarnings > 0) && (graphData.settings.showtotal == "on") ){
549
- $("#lrga-legendholder table tr:last").after('<tr class="legendTotals"><td class="legendColorBox"></td><td class="legendLabel">Total</td><td class="legendEarnings">'+plotData["earnings"]["config"]["lrbefore"]+totalEarnings.toFixed(2)+plotData["earnings"]["config"]["lrafter"]+'</td><td>|</td><td class="legendSales">'+totalSales+'</td></tr>');
550
- }
 
 
 
551
 
552
  $('<div class="tooltip-inner" id="lrgawidget_sessions_chart_tooltip"></div>').css({
553
  "text-align": "left",
@@ -631,6 +689,8 @@ function drawSparkline(id, data, color){
631
  var plotData = {};
632
  var plotTotalData = {};
633
  var selectedPname = "";
 
 
634
 
635
  function drawMainGraphWidgets(data, selected){
636
  if ($('#lrgawidget_sb-main').is(":visible")){
@@ -648,6 +708,12 @@ function drawMainGraphWidgets(data, selected){
648
  function drawMainGraph(){
649
  lrWidgetSettings({action : "getSessions"}).done(function (data, textStatus, jqXHR) {
650
  if (data.status == "done" && data.setup !== 1){
 
 
 
 
 
 
651
  plotData = data.plotdata;
652
  plotTotalData = data.totalsForAllResults;
653
  if (!selectedPname){selectedPname = "sessions";}
@@ -658,11 +724,194 @@ function drawMainGraph(){
658
  });
659
  }
660
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
661
 
662
  function setOptionsGrid(){
663
  $('.lroptions-checkbox-grid[data-lr-roleid="administrator"][data-lr-groupid="permissions"]').find('input:checkbox').prop('checked',true).prop("disabled", true);
664
  $('.lrgawidget_permissions_switch[data-lr-roleid="administrator"][data-lr-groupid="permissions"]').prop('checked',true).prop("disabled", true);
665
  $('.lrgawidget_permissions_switch[data-lr-roleid="administrator"][data-lr-groupid="tabs"]').prop('checked',true).change();
 
666
  }
667
 
668
  function getPermissions(){
@@ -675,13 +924,13 @@ function getPermissions(){
675
  rolesHTML += '<li><a href="#lrrole_'+role.id+'" data-toggle="pill"><i class="fa fa-users fa-fw"></i>'+role.name+'</a></li>';
676
  permissionsHTML += '<div class="tab-pane" id="lrrole_'+role.id+'">';
677
  $.each(data.group_permissions, function( y, group ){
678
- permissionsHTML += '<div class="box box-primary"> <div class="box-header with-border"> <h3 class="box-title"><i class="fa '+group.icon+'"></i> '+group.name+'</h3> <input type="hidden" name="lrperms['+role.id+'][]" value="'+group.id+'"> <span class="pull-right"> <label class="switch"> <input type="checkbox" class="lrgawidget_permissions_switch" data-lr-roleid="'+role.id+'" data-lr-groupid="'+group.id+'"> <div class="slider "></div> </label> </span> </div> <div class="box-body lroptions-checkbox-grid" data-lr-roleid="'+role.id+'" data-lr-groupid="'+group.id+'">';
679
  $.each(group.permissions, function( x, permission ){
680
  var checked = "";
681
  if($.inArray(permission.name, data.role_permissions[role.id] ) !== -1){
682
  checked = "checked";
683
  }
684
- permissionsHTML += ' <div> <label><input '+checked+' name="lrperms['+role.id+'][]" type="checkbox" value="'+permission.name+'"> '+permission.label+'</label> </div>';
685
  });
686
 
687
  permissionsHTML += ' </div> </div>';
@@ -693,7 +942,15 @@ function getPermissions(){
693
  $("#lrgawidget_permissions_list").html(permissionsHTML);
694
  $('#lrgawidget_permissions_roles a:first').tab('show');
695
  $(".lrgawidget_permissions_switch").change(function(){
696
- $('.lroptions-checkbox-grid[data-lr-roleid="'+$(this).data("lr-roleid")+'"][data-lr-groupid="'+$(this).data("lr-groupid")+'"]').find('input:checkbox').prop('checked',this.checked).prop("disabled", !this.checked);
 
 
 
 
 
 
 
 
697
  });
698
  setOptionsGrid();
699
  }
@@ -727,7 +984,11 @@ $(document).ready(function(){
727
  });
728
 
729
  $("#lrgawidget_main a[data-toggle='tab']").on('shown.bs.tab', function (e) {
730
-
 
 
 
 
731
  $("#lrgawidget_sessions_chart_tooltip").remove();
732
 
733
  if (this.hash == "#lrgawidget_settings_tab"){
@@ -810,6 +1071,31 @@ $(document).ready(function(){
810
  $("#lrgawidget a[data-target='#"+actLrgaTabs+"']").tab('show');
811
  }
812
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
813
  $(".lrgawidget_view_demo").colorbox({iframe:true, innerWidth:"80%", innerHeight:575, scrolling: false});
814
  });
815
 
137
  var webPropertyID;
138
  var profileID;
139
  var webPropertyUrl;
140
+ var lrgaLockSettings;
141
 
142
+ function enableSettingsInput(mode){
143
+ $("#lrgawidget-save-settings").prop('disabled',!mode);
144
+ $('#lrgawidget-setProfileID input').prop('disabled', !mode);
145
+ $('#lrgawidget-setProfileID select').prop('disabled', !mode);
146
+ }
147
 
148
  function getProfileDetails(id){
149
  var cProfile = {};
243
 
244
  $("#lrgawidget-setProfileID").submit(function(e) {
245
  e.preventDefault();
246
+ enableSettingsInput(true);
247
  lrWidgetSettings($("#lrgawidget-setProfileID").serializeArray()).done(function (data, textStatus, jqXHR) {
248
  if (data.status == "done"){
249
  $("#lrgawidget a[data-target^='#lrgawidget_']:eq(0)").click();
250
+ graphOptions = {};
251
  }
252
  })
253
  });
254
 
255
  $('#lrga-wizard').on('changed.fu.wizard', function (evt, data) {
 
256
  if ($("[data-step="+data.step+"]").attr("data-name") == "lrga-profile"){
257
+ enableSettingsInput(false);
258
  lrWidgetSettings({action: "getProfiles"}).done(function (data, textStatus, jqXHR) {
259
  if (data.status == "done"){
260
  lrgaaccountID = data.current_selected.account_id;
262
  profileID = data.current_selected.profile_id;
263
  lrgaAccounts = data.all_accounts;
264
  lrgaProfiles = data.all_profiles;
265
+ lrgaLockSettings = data.current_selected.lock_settings;
266
+ if(lrgaLockSettings !== "on"){
267
+ enableSettingsInput(true);
268
+ $('.lrgawidget-lock-settings input[type=checkbox]').prop("checked", false);
269
+ }else{
270
+ $('.lrgawidget-lock-settings input[type=checkbox]').prop("checked", true);
271
+ }
272
+
273
  populateViews();
 
274
  setup = false;
275
  }
276
  })
320
  $("[data-reload='lrgawidget_go_express']").hide();
321
  $('#lrga-wizard').wizard('selectedItem', {step: 1});
322
  $("#lrgawidget_express_setup").show();
323
+ });
324
+
325
+ $('.lrgawidget-lock-settings input[type=checkbox]').click(function(){
326
+ if($(this).is(":checked")){
327
+ enableSettingsInput(false);
328
+ }else if($(this).is(":not(:checked)")){
329
+ enableSettingsInput(true);
330
+ }
331
+ $(this).prop('disabled', false);
332
+ $("#lrgawidget-save-settings").prop('disabled',false);
333
  });
334
 
335
  });
550
  }
551
 
552
  function drawGraph(data,name){
553
+
554
+ if ( ($.plot == null) || ($.plot.version !== "lara-0.8.3")){
555
+ $.plot = laraFlotv083;
556
+ if (debug){console.log("restoring flot 0.8.3")};
557
+ }
558
+
559
  var settings = mainChartDefaults;
560
  var totalSales = 0;
561
  var totalEarnings = 0;
571
  currentPlotData = {};
572
  }
573
 
574
+ if (isObject(plotData.sales) && isObject(plotData.earnings)){
575
+ var seData = [];
576
+ var clineWidth = 0.5;
577
+ var cbarWidth = 3600000 * 6;
578
+ var options = {"yaxes": [{min: 0 },
579
+ {min: 0, max:plotData["sales"]["config"]["maxv"], show: true, position: "right", color: "#7EAAC5", tickDecimals: 0, axisLabel: plotData["sales"]["config"]["label"], axisLabelUseCanvas: true, axisLabelFontSizePixels: 12, axisLabelFontFamily: 'Verdana, Arial', axisLabelPadding: 3,lrcustom: {before: plotData["sales"]["config"]["lrbefore"], after: plotData["sales"]["config"]["lrafter"], format: plotData["sales"]["config"]["lrformat"]}},
580
+ {min: 0, max:plotData["earnings"]["config"]["maxv"], show: true, position: "right", color: "#87C1E3", tickFormatter: lrTickFormatter, tickColor: "#87C1E3", axisLabel: plotData["earnings"]["config"]["label"], axisLabelUseCanvas: true, axisLabelFontSizePixels: 12, axisLabelFontFamily: 'Verdana, Arial', axisLabelPadding: 3, lrcustom: {before: plotData["earnings"]["config"]["lrbefore"], after: plotData["earnings"]["config"]["lrafter"], format: plotData["earnings"]["config"]["lrformat"]}}],
581
+ "legend": {show: true, container:'#lrga-legendholder', labelFormatter: lrLegendFormatter}};
582
+
583
+ $.each( plotData["earnings"]["series"], function( i, series ) {
584
+ var salesSeries = plotData["sales"]["series"][i];
585
+ if ((graphData.settings.showempty == "off") && (series.total == 0 && salesSeries.total == 0)){ return true;}
586
+ totalSales = totalSales + salesSeries.total;
587
+ totalEarnings = totalEarnings + series.total;
588
+ seData.push({data:salesSeries.data, sid:series.id, color: salesSeries.color, bars: { show: true, lineWidth: clineWidth, fill: true, barWidth: cbarWidth, order: 2 }, yaxis: 2, stack: 2 });
589
+ seData.push({data:series.data, sid:series.id, color: series.color, label:series.label, lrcustom: {total: series.total, totalorders: salesSeries.total, before: plotData["earnings"]["config"]["lrbefore"], after: plotData["earnings"]["config"]["lrafter"], format: plotData["earnings"]["config"]["lrformat"]}, bars: { show: true, lineWidth: clineWidth, fill: true, barWidth: cbarWidth, order: 1 }, yaxis: 3, stack: 1 });
590
+ });
591
+
592
+ gData = gData.concat(seData);
593
+ settings = $.extend({}, settings, options);
594
+ $("#lrga-legendholder").css({"right":"105px"});
595
+ $("#lrga-xologoholder").css({"right":"115px"});
596
+ }
597
+
598
  mainChart = $.plot($("#lrgawidget_sessions_chartDiv"), gData, settings);
599
  currentPlotData = mainChart.getData();
600
 
601
  if( $('#lrga-legendholder').is(':empty')) {$("#lrga-legendholder").hide();} else{$("#lrga-legendholder").show();}
602
 
603
+ if (isObject(plotData.sales) && isObject(plotData.earnings)){
604
+ $("#lrga-legendholder table tr:first").before('<tr class="legendTotals"><td class="legendColorBox"></td><td class="legendLabel">'+graphData.settings.graphlabel+'</td><td class="legendEarnings"></td><td></td><td class="legendSales"></td></tr>');
605
+ if ((totalSales > 0 || totalEarnings > 0) && (graphData.settings.showtotal == "on") ){
606
+ $("#lrga-legendholder table tr:last").after('<tr class="legendTotals"><td class="legendColorBox"></td><td class="legendLabel">'+lrwidgetenLang.total+'</td><td class="legendEarnings">'+plotData["earnings"]["config"]["lrbefore"]+totalEarnings.toFixed(2)+plotData["earnings"]["config"]["lrafter"]+'</td><td>|</td><td class="legendSales">'+totalSales+'</td></tr>');
607
+ }
608
+ }
609
 
610
  $('<div class="tooltip-inner" id="lrgawidget_sessions_chart_tooltip"></div>').css({
611
  "text-align": "left",
689
  var plotData = {};
690
  var plotTotalData = {};
691
  var selectedPname = "";
692
+ var graphOptions = {};
693
+ var graphData = {};
694
 
695
  function drawMainGraphWidgets(data, selected){
696
  if ($('#lrgawidget_sb-main').is(":visible")){
708
  function drawMainGraph(){
709
  lrWidgetSettings({action : "getSessions"}).done(function (data, textStatus, jqXHR) {
710
  if (data.status == "done" && data.setup !== 1){
711
+
712
+ if (isObject(data.graph)){
713
+ graphData = data.graph;
714
+ $("#lrghop_button").show();
715
+ }
716
+
717
  plotData = data.plotdata;
718
  plotTotalData = data.totalsForAllResults;
719
  if (!selectedPname){selectedPname = "sessions";}
724
  });
725
  }
726
 
727
+ function populateSettings(){
728
+ let settings = graphOptions.settings;
729
+ let settingsOutput = "" ;
730
+ $("#lrghop_settings").html("");
731
+
732
+ $.each(settings, function( sId, sObj){
733
+ settingsOutput += '<div class="row"> <div class="col-sm-4">'+sObj.name+'</div> <div class="col-sm-8 btn-group btn-toggle" data-toggle="buttons">';
734
+
735
+ $.each(sObj.options, function( oId, oName){
736
+ var is_active = "";
737
+ var is_checked = "";
738
+ if (oId == sObj.value){
739
+ is_active = 'active';
740
+ is_checked = 'checked="checked"';
741
+ }
742
+ settingsOutput +='<label class="btn btn-xs btn-primary '+is_active+'"><input name="settings['+sObj.id+']" value="'+oId+'" type="radio" '+is_checked+' >'+oName+'</label>';
743
+ });
744
+
745
+ settingsOutput += ' </div> </div>';
746
+ });
747
+
748
+ $("#lrghop_settings").html(settingsOutput);
749
+
750
+ }
751
+
752
+ var filterPanelsOutput = "";
753
+ function populateFilters(){
754
+ let filters = graphOptions.filters;
755
+ let filtersButtons = "";
756
+ let filterPanels = "";
757
+ $("#lrgfilters_buttons").html("");
758
+ $.each(filters, function( id, filter){
759
+ filtersButtons += '<button class="btn btn-primary btn-sm btn-block" data-lrghop-button="'+filter.id+'" type="button">'+filter.name+'</button>';
760
+ filterPanels +='<div data-lrgh-panel="'+filter.id+'"> <div class="lrgo_filterpanel_head">'+filter.name+'<span class="lrgawidget_graph_cached" style="display:none;">['+lrwidgetenLang.cached+']</span></div> <div class="lrgo_filterpanel_body" id="lrgh_'+filter.id+'"> <ul>';
761
+
762
+ filterPanelsOutput = '';
763
+
764
+ let filterData = filter.data;
765
+ if (typeof filter.datasource !== 'undefined') {
766
+ filterData = graphOptions.filters[filter.datasource].data;
767
+ }
768
+
769
+ populateFilterPanel(filter.id, filterData);
770
+ filterPanels += filterPanelsOutput;
771
+
772
+ filterPanels +=' </ul> </div> </div>';
773
+ });
774
+
775
+ filterPanelsOutput = '';
776
+ $("#lrgfilters_buttons").html(filtersButtons);
777
+ $("#lrgfilters_panels").html(filterPanels);
778
+
779
+ $("[data-lrghop-button]").on('click', function (e) {
780
+ showOptionsGroup($(this).data('lrghop-button'));
781
+ });
782
+
783
+ }
784
+
785
+ function populateFilterPanel(filterId, items){
786
+
787
+ $.each(items, function( id, item ){
788
+ let checked = "";
789
+ if (filterId == "products" && item.type == "categories"){
790
+ if (typeof item.products !== 'undefined'){
791
+ filterPanelsOutput += '<ul class="lrghop_filter_children" >';
792
+ filterPanelsOutput += '<div class="lrghop_filter_header">'+item.name+'</div>';
793
+ populateFilterPanel(filterId, item.products);
794
+ filterPanelsOutput += '</ul>';
795
+ }else{
796
+ filterPanelsOutput += '<div class="lrghop_filter_header">'+item.name+'</div>';
797
+ }
798
+ }else{
799
+ if (item.state == "on"){checked = "checked";}
800
+ filterPanelsOutput += '<li> <div class="lrghop_colorselector_item_container"> <span style="background-color: '+item.color+';" class="lrghop_colorselector_item"> <input type="hidden" data-lrgo-itemcolor="'+filterId+'_'+item.id+'" name="filters['+filterId+']['+item.id+'][color]" id="hidden-input" value="'+item.color+'"> </span> <label><input data-lrgo-itembox="'+filterId+'_'+item.id+'" type="checkbox" name="filters['+filterId+']['+item.id+'][status]" value="on" '+checked+'>'+item.name+'</label> </div> </li>';
801
+ }
802
+
803
+ if (typeof item.children !== 'undefined'){
804
+ filterPanelsOutput += '<ul class="lrghop_filter_children" >';
805
+ populateFilterPanel(filterId, item.children);
806
+ filterPanelsOutput += '</ul>';
807
+ }
808
+ });
809
+ }
810
+
811
+ var currenSelectedColorBox = "";
812
+ function showGraphOptions(){
813
+ if (typeof graphOptions.status == 'undefined'){
814
+ lrWidgetSettings({action : "getGraphData"}).done(function (data, textStatus, jqXHR) {
815
+ if (data.status == "done" && data.setup !== 1){
816
+ graphOptions = data;
817
+ populateSettings();
818
+ populateFilters();
819
+
820
+ if (data.gaoptionscached){ $(".lrgawidget_graph_cached").show();}
821
+
822
+ $('.lrghop_colorselector' ).off('change');
823
+
824
+ $('.lrghop_colorselector').each( function() {
825
+ $(this).minicolors({
826
+ control: 'hue',
827
+ defaultValue: '',
828
+ format: 'hex',
829
+ swatches: data.swatches,
830
+ inline: true,
831
+ });
832
+
833
+ });
834
+
835
+ $(document).mouseup(function(e){
836
+ if ($(".lrghop_colorselector_container").is(":visible")){
837
+ if (!$(".lrghop_colorselector_container").is(e.target) && $(".lrghop_colorselector_container").has(e.target).length === 0){
838
+ $(".lrghop_colorselector_container").hide();
839
+ }
840
+ }
841
+ });
842
+
843
+ $(".lrgo_filterpanel_body").scroll(function() {
844
+ if ($(".lrghop_colorselector_container").is(":visible")){
845
+ $(".lrghop_colorselector_container").hide();
846
+ }
847
+ });
848
+
849
+ $(window).scroll(function() {
850
+ if ($(".lrghop_colorselector_container").is(":visible")){
851
+ $(".lrghop_colorselector_container").hide();
852
+ }
853
+ });
854
+
855
+ $('.lrghop_colorselector_item' ).on('click', function(e) {
856
+ var sid = $(this).find(':first-child').data("lrgo-itemcolor");
857
+ var sColor = $(this).find(':first-child').val();
858
+
859
+ $("[data-lrgo-itembox='" + sid +"']").prop("checked", true);
860
+ currenSelectedColorBox = sid;
861
+
862
+ $('.lrghop_colorselector').minicolors('value', {color: sColor});
863
+ $('.lrghop_colorselector_container').css({ left: ($(this).offset().left ) + "px", top: ($(this).offset().top - $(window).scrollTop() + 20) + "px" });
864
+ $('.lrghop_colorselector_container').show();
865
+
866
+
867
+ });
868
+
869
+ $('.lrghop_colorselector' ).on('change', function(e) {
870
+ var colorChanged = false;
871
+ var graphData = mainChart.getData();
872
+ var sid = currenSelectedColorBox;
873
+ var sColor = $(this).val();
874
+
875
+ $("[data-lrgo-itemcolor='" + sid +"']").parent(".lrghop_colorselector_item").css({'background-color': sColor});
876
+ $("[data-lrgo-itemcolor='" + sid +"']").attr("value", sColor);
877
+
878
+ $.each(graphData, function( i, data){
879
+ if ((typeof data.sid !== 'undefined') && (data.sid == sid)){
880
+ graphData[i].color = sColor;
881
+ colorChanged = true;
882
+ }
883
+ });
884
+
885
+ if (colorChanged === true){
886
+ mainChart.setData(graphData);
887
+ mainChart.draw();
888
+ if (debug){ console.log("Graph Color Changed"); }
889
+ }
890
+ });
891
+ showOptionsGroup(data.currentfilter);
892
+ }
893
+ });
894
+ }
895
+
896
+ }
897
+
898
+ function showOptionsGroup(groupID){
899
+ $("[data-lrgh-panel]").hide();
900
+ $("[data-lrgh-panel="+groupID+"]").show();
901
+
902
+ if (groupID != "settings"){
903
+ $("[data-lrghop-button]").removeClass("active");
904
+ $("[data-lrghop-button="+groupID+"]").addClass("active");
905
+ $('[name="currentfilter"]').val(groupID);
906
+ }
907
+ }
908
+
909
 
910
  function setOptionsGrid(){
911
  $('.lroptions-checkbox-grid[data-lr-roleid="administrator"][data-lr-groupid="permissions"]').find('input:checkbox').prop('checked',true).prop("disabled", true);
912
  $('.lrgawidget_permissions_switch[data-lr-roleid="administrator"][data-lr-groupid="permissions"]').prop('checked',true).prop("disabled", true);
913
  $('.lrgawidget_permissions_switch[data-lr-roleid="administrator"][data-lr-groupid="tabs"]').prop('checked',true).change();
914
+ $('.lrgawidget_permissions_switch[data-lr-roleid="administrator"][data-lr-groupid="ecommerce"]').prop('checked',true).change();
915
  }
916
 
917
  function getPermissions(){
924
  rolesHTML += '<li><a href="#lrrole_'+role.id+'" data-toggle="pill"><i class="fa fa-users fa-fw"></i>'+role.name+'</a></li>';
925
  permissionsHTML += '<div class="tab-pane" id="lrrole_'+role.id+'">';
926
  $.each(data.group_permissions, function( y, group ){
927
+ permissionsHTML += '<div class="box box-primary"> <div class="box-header with-border"> <h3 class="box-title"><i class="fa '+group.icon+'"></i> '+group.name+'</h3> <input type="hidden" name="lrperms['+role.id+'][]" value="'+group.id+'"> <span class="pull-right"> <label class="switch"> <input type="checkbox" class="lrgawidget_permissions_switch" data-lr-roleid="'+role.id+'" data-lr-groupid="'+group.id+'" data-lr-grouptype="'+group.type+'" data-lr-groupdefault="'+group.default+'"> <div class="slider "></div> </label> </span> </div> <div class="box-body lroptions-checkbox-grid" data-lr-roleid="'+role.id+'" data-lr-groupid="'+group.id+'">';
928
  $.each(group.permissions, function( x, permission ){
929
  var checked = "";
930
  if($.inArray(permission.name, data.role_permissions[role.id] ) !== -1){
931
  checked = "checked";
932
  }
933
+ permissionsHTML += ' <div> <label><input '+checked+' name="lrperms['+role.id+'][]" type="'+group.type+'" value="'+permission.name+'"> '+permission.label+'</label> </div>';
934
  });
935
 
936
  permissionsHTML += ' </div> </div>';
942
  $("#lrgawidget_permissions_list").html(permissionsHTML);
943
  $('#lrgawidget_permissions_roles a:first').tab('show');
944
  $(".lrgawidget_permissions_switch").change(function(){
945
+ var groupType = $(this).data("lr-grouptype");
946
+ if (groupType == "checkbox"){
947
+ $('.lroptions-checkbox-grid[data-lr-roleid="'+$(this).data("lr-roleid")+'"][data-lr-groupid="'+$(this).data("lr-groupid")+'"]').find('input:checkbox').prop('checked',this.checked).prop("disabled", !this.checked);
948
+ }else{
949
+ $('.lroptions-checkbox-grid[data-lr-roleid="'+$(this).data("lr-roleid")+'"][data-lr-groupid="'+$(this).data("lr-groupid")+'"]').find('input:radio').prop('checked',this.checked).prop("disabled", !this.checked);
950
+ if ($(this).is(':checked')){
951
+ $('.lroptions-checkbox-grid[data-lr-roleid="'+$(this).data("lr-roleid")+'"][data-lr-groupid="'+$(this).data("lr-groupid")+'"] input[type=radio][value="'+ $(this).data("lr-groupdefault") +'"]').prop('checked',this.checked);
952
+ }
953
+ }
954
  });
955
  setOptionsGrid();
956
  }
984
  });
985
 
986
  $("#lrgawidget_main a[data-toggle='tab']").on('shown.bs.tab', function (e) {
987
+
988
+ if (this.hash !== "#lrgawidget_sessions_tab"){
989
+ $("#lrghop_button").hide();
990
+ }
991
+
992
  $("#lrgawidget_sessions_chart_tooltip").remove();
993
 
994
  if (this.hash == "#lrgawidget_settings_tab"){
1071
  $("#lrgawidget a[data-target='#"+actLrgaTabs+"']").tab('show');
1072
  }
1073
 
1074
+ $("#lrghop_button").on('click', function (e) {
1075
+ $("#lrghop_menu").show();
1076
+ showGraphOptions();
1077
+ });
1078
+
1079
+ $("#lrghop_cancel").on('click', function (e) {
1080
+ $("#lrghop_menu").hide();
1081
+ });
1082
+
1083
+ $("#lrghop_form").submit(function(e) {
1084
+ e.preventDefault();
1085
+ $("#lrghop_menu").hide();
1086
+ $('#lrgawidget a[data-target="#lrgawidget_gopro_tab"]').tab('show');
1087
+ });
1088
+
1089
+
1090
+ $(document).mouseup(function(e){
1091
+ if ($("#lrghop_menu").is(":visible")){
1092
+ var container = $("#lrghop_menu");
1093
+ if (!container.is(e.target) && container.has(e.target).length === 0){
1094
+ container.hide();
1095
+ }
1096
+ }
1097
+ });
1098
+
1099
  $(".lrgawidget_view_demo").colorbox({iframe:true, innerWidth:"80%", innerHeight:575, scrolling: false});
1100
  });
1101
 
dist/plugins/flot/jquery.flot.min.js CHANGED
@@ -1,5 +1,8 @@
 
1
  !function(t){t.color={},t.color.make=function(i,e,o,n){var a={};return a.r=i||0,a.g=e||0,a.b=o||0,a.a=null!=n?n:1,a.add=function(t,i){for(var e=0;e<t.length;++e)a[t.charAt(e)]+=i;return a.normalize()},a.scale=function(t,i){for(var e=0;e<t.length;++e)a[t.charAt(e)]*=i;return a.normalize()},a.toString=function(){return a.a>=1?"rgb("+[a.r,a.g,a.b].join(",")+")":"rgba("+[a.r,a.g,a.b,a.a].join(",")+")"},a.normalize=function(){function t(t,i,e){return t>i?t:i>e?e:i}return a.r=t(0,parseInt(a.r),255),a.g=t(0,parseInt(a.g),255),a.b=t(0,parseInt(a.b),255),a.a=t(0,a.a,1),a},a.clone=function(){return t.color.make(a.r,a.b,a.g,a.a)},a.normalize()},t.color.extract=function(i,e){var o;do{if(o=i.css(e).toLowerCase(),""!=o&&"transparent"!=o)break;i=i.parent()}while(i.length&&!t.nodeName(i.get(0),"body"));return"rgba(0, 0, 0, 0)"==o&&(o="transparent"),t.color.parse(o)},t.color.parse=function(e){var o,n=t.color.make;if(o=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(e))return n(parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10));if(o=/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(e))return n(parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10),parseFloat(o[4]));if(o=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(e))return n(2.55*parseFloat(o[1]),2.55*parseFloat(o[2]),2.55*parseFloat(o[3]));if(o=/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(e))return n(2.55*parseFloat(o[1]),2.55*parseFloat(o[2]),2.55*parseFloat(o[3]),parseFloat(o[4]));if(o=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(e))return n(parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16));if(o=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(e))return n(parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16));var a=t.trim(e).toLowerCase();return"transparent"==a?n(255,255,255,0):(o=i[a]||[0,0,0],n(o[0],o[1],o[2]))};var i={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(t){function i(i,e){var o=e.children("."+i)[0];if(null==o&&(o=document.createElement("canvas"),o.className=i,t(o).css({direction:"ltr",position:"absolute",left:0,top:0}).appendTo(e),!o.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.");o=window.G_vmlCanvasManager.initElement(o)}this.element=o;var n=this.context=o.getContext("2d"),a=window.devicePixelRatio||1,r=n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1;this.pixelRatio=a/r,this.resize(e.width(),e.height()),this.textContainer=null,this.text={},this._textCache={}}function e(e,n,a,r){function l(t,i){i=[xt].concat(i);for(var e=0;e<t.length;++e)t[e].apply(this,i)}function s(){for(var e={Canvas:i},o=0;o<r.length;++o){var n=r[o];n.init(xt,e),n.options&&t.extend(!0,nt,n.options)}}function c(i){t.extend(!0,nt,i),i&&i.colors&&(nt.colors=i.colors),null==nt.xaxis.color&&(nt.xaxis.color=t.color.parse(nt.grid.color).scale("a",.22).toString()),null==nt.yaxis.color&&(nt.yaxis.color=t.color.parse(nt.grid.color).scale("a",.22).toString()),null==nt.xaxis.tickColor&&(nt.xaxis.tickColor=nt.grid.tickColor||nt.xaxis.color),null==nt.yaxis.tickColor&&(nt.yaxis.tickColor=nt.grid.tickColor||nt.yaxis.color),null==nt.grid.borderColor&&(nt.grid.borderColor=nt.grid.color),null==nt.grid.tickColor&&(nt.grid.tickColor=t.color.parse(nt.grid.color).scale("a",.22).toString());var o,n,a,r=e.css("font-size"),s=r?+r.replace("px",""):13,c={style:e.css("font-style"),size:Math.round(.8*s),variant:e.css("font-variant"),weight:e.css("font-weight"),family:e.css("font-family")};for(a=nt.xaxes.length||1,o=0;a>o;++o)n=nt.xaxes[o],n&&!n.tickColor&&(n.tickColor=n.color),n=t.extend(!0,{},nt.xaxis,n),nt.xaxes[o]=n,n.font&&(n.font=t.extend({},c,n.font),n.font.color||(n.font.color=n.color),n.font.lineHeight||(n.font.lineHeight=Math.round(1.15*n.font.size)));for(a=nt.yaxes.length||1,o=0;a>o;++o)n=nt.yaxes[o],n&&!n.tickColor&&(n.tickColor=n.color),n=t.extend(!0,{},nt.yaxis,n),nt.yaxes[o]=n,n.font&&(n.font=t.extend({},c,n.font),n.font.color||(n.font.color=n.color),n.font.lineHeight||(n.font.lineHeight=Math.round(1.15*n.font.size)));for(nt.xaxis.noTicks&&null==nt.xaxis.ticks&&(nt.xaxis.ticks=nt.xaxis.noTicks),nt.yaxis.noTicks&&null==nt.yaxis.ticks&&(nt.yaxis.ticks=nt.yaxis.noTicks),nt.x2axis&&(nt.xaxes[1]=t.extend(!0,{},nt.xaxis,nt.x2axis),nt.xaxes[1].position="top",null==nt.x2axis.min&&(nt.xaxes[1].min=null),null==nt.x2axis.max&&(nt.xaxes[1].max=null)),nt.y2axis&&(nt.yaxes[1]=t.extend(!0,{},nt.yaxis,nt.y2axis),nt.yaxes[1].position="right",null==nt.y2axis.min&&(nt.yaxes[1].min=null),null==nt.y2axis.max&&(nt.yaxes[1].max=null)),nt.grid.coloredAreas&&(nt.grid.markings=nt.grid.coloredAreas),nt.grid.coloredAreasColor&&(nt.grid.markingsColor=nt.grid.coloredAreasColor),nt.lines&&t.extend(!0,nt.series.lines,nt.lines),nt.points&&t.extend(!0,nt.series.points,nt.points),nt.bars&&t.extend(!0,nt.series.bars,nt.bars),null!=nt.shadowSize&&(nt.series.shadowSize=nt.shadowSize),null!=nt.highlightColor&&(nt.series.highlightColor=nt.highlightColor),o=0;o<nt.xaxes.length;++o)x(ht,o+1).options=nt.xaxes[o];for(o=0;o<nt.yaxes.length;++o)x(ft,o+1).options=nt.yaxes[o];for(var h in mt)nt.hooks[h]&&nt.hooks[h].length&&(mt[h]=mt[h].concat(nt.hooks[h]));l(mt.processOptions,[nt])}function h(t){ot=f(t),g(),b()}function f(i){for(var e=[],o=0;o<i.length;++o){var n=t.extend(!0,{},nt.series);null!=i[o].data?(n.data=i[o].data,delete i[o].data,t.extend(!0,n,i[o]),i[o].data=n.data):n.data=i[o],e.push(n)}return e}function u(t,i){var e=t[i+"axis"];return"object"==typeof e&&(e=e.n),"number"!=typeof e&&(e=1),e}function d(){return t.grep(ht.concat(ft),function(t){return t})}function p(t){var i,e,o={};for(i=0;i<ht.length;++i)e=ht[i],e&&e.used&&(o["x"+e.n]=e.c2p(t.left));for(i=0;i<ft.length;++i)e=ft[i],e&&e.used&&(o["y"+e.n]=e.c2p(t.top));return void 0!==o.x1&&(o.x=o.x1),void 0!==o.y1&&(o.y=o.y1),o}function m(t){var i,e,o,n={};for(i=0;i<ht.length;++i)if(e=ht[i],e&&e.used&&(o="x"+e.n,null==t[o]&&1==e.n&&(o="x"),null!=t[o])){n.left=e.p2c(t[o]);break}for(i=0;i<ft.length;++i)if(e=ft[i],e&&e.used&&(o="y"+e.n,null==t[o]&&1==e.n&&(o="y"),null!=t[o])){n.top=e.p2c(t[o]);break}return n}function x(i,e){return i[e-1]||(i[e-1]={n:e,direction:i==ht?"x":"y",options:t.extend(!0,{},i==ht?nt.xaxis:nt.yaxis)}),i[e-1]}function g(){var i,e=ot.length,o=-1;for(i=0;i<ot.length;++i){var n=ot[i].color;null!=n&&(e--,"number"==typeof n&&n>o&&(o=n))}o>=e&&(e=o+1);var a,r=[],l=nt.colors,s=l.length,c=0;for(i=0;e>i;i++)a=t.color.parse(l[i%s]||"#666"),i%s==0&&i&&(c=c>=0?.5>c?-c-.2:0:-c),r[i]=a.scale("rgb",1+c);var h,f=0;for(i=0;i<ot.length;++i){if(h=ot[i],null==h.color?(h.color=r[f].toString(),++f):"number"==typeof h.color&&(h.color=r[h.color].toString()),null==h.lines.show){var d,p=!0;for(d in h)if(h[d]&&h[d].show){p=!1;break}p&&(h.lines.show=!0)}null==h.lines.zero&&(h.lines.zero=!!h.lines.fill),h.xaxis=x(ht,u(h,"x")),h.yaxis=x(ft,u(h,"y"))}}function b(){function i(t,i,e){i<t.datamin&&i!=-b&&(t.datamin=i),e>t.datamax&&e!=b&&(t.datamax=e)}var e,o,n,a,r,s,c,h,f,u,p,m,x=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,b=Number.MAX_VALUE;for(t.each(d(),function(t,i){i.datamin=x,i.datamax=g,i.used=!1}),e=0;e<ot.length;++e)r=ot[e],r.datapoints={points:[]},l(mt.processRawData,[r,r.data,r.datapoints]);for(e=0;e<ot.length;++e){if(r=ot[e],p=r.data,m=r.datapoints.format,!m){if(m=[],m.push({x:!0,number:!0,required:!0}),m.push({y:!0,number:!0,required:!0}),r.bars.show||r.lines.show&&r.lines.fill){var v=!!(r.bars.show&&r.bars.zero||r.lines.show&&r.lines.zero);m.push({y:!0,number:!0,required:!1,defaultValue:0,autoscale:v}),r.bars.horizontal&&(delete m[m.length-1].y,m[m.length-1].x=!0)}r.datapoints.format=m}if(null==r.datapoints.pointsize){r.datapoints.pointsize=m.length,c=r.datapoints.pointsize,s=r.datapoints.points;var k=r.lines.show&&r.lines.steps;for(r.xaxis.used=r.yaxis.used=!0,o=n=0;o<p.length;++o,n+=c){u=p[o];var y=null==u;if(!y)for(a=0;c>a;++a)h=u[a],f=m[a],f&&(f.number&&null!=h&&(h=+h,isNaN(h)?h=null:h==1/0?h=b:h==-(1/0)&&(h=-b)),null==h&&(f.required&&(y=!0),null!=f.defaultValue&&(h=f.defaultValue))),s[n+a]=h;if(y)for(a=0;c>a;++a)h=s[n+a],null!=h&&(f=m[a],f.autoscale!==!1&&(f.x&&i(r.xaxis,h,h),f.y&&i(r.yaxis,h,h))),s[n+a]=null;else if(k&&n>0&&null!=s[n-c]&&s[n-c]!=s[n]&&s[n-c+1]!=s[n+1]){for(a=0;c>a;++a)s[n+c+a]=s[n+a];s[n+1]=s[n-c+1],n+=c}}}}for(e=0;e<ot.length;++e)r=ot[e],l(mt.processDatapoints,[r,r.datapoints]);for(e=0;e<ot.length;++e){r=ot[e],s=r.datapoints.points,c=r.datapoints.pointsize,m=r.datapoints.format;var w=x,M=x,T=g,C=g;for(o=0;o<s.length;o+=c)if(null!=s[o])for(a=0;c>a;++a)h=s[o+a],f=m[a],f&&f.autoscale!==!1&&h!=b&&h!=-b&&(f.x&&(w>h&&(w=h),h>T&&(T=h)),f.y&&(M>h&&(M=h),h>C&&(C=h)));if(r.bars.show){var S;switch(r.bars.align){case"left":S=0;break;case"right":S=-r.bars.barWidth;break;default:S=-r.bars.barWidth/2}r.bars.horizontal?(M+=S,C+=S+r.bars.barWidth):(w+=S,T+=S+r.bars.barWidth)}i(r.xaxis,w,T),i(r.yaxis,M,C)}t.each(d(),function(t,i){i.datamin==x&&(i.datamin=null),i.datamax==g&&(i.datamax=null)})}function v(){e.css("padding",0).children().filter(function(){return!t(this).hasClass("flot-overlay")&&!t(this).hasClass("flot-base")}).remove(),"static"==e.css("position")&&e.css("position","relative"),at=new i("flot-base",e),rt=new i("flot-overlay",e),st=at.context,ct=rt.context,lt=t(rt.element).unbind();var o=e.data("plot");o&&(o.shutdown(),rt.clear()),e.data("plot",xt)}function k(){nt.grid.hoverable&&(lt.mousemove(X),lt.bind("mouseleave",Y)),nt.grid.clickable&&lt.click(q),l(mt.bindEvents,[lt])}function y(){bt&&clearTimeout(bt),lt.unbind("mousemove",X),lt.unbind("mouseleave",Y),lt.unbind("click",q),l(mt.shutdown,[lt])}function w(t){function i(t){return t}var e,o,n=t.options.transform||i,a=t.options.inverseTransform;"x"==t.direction?(e=t.scale=dt/Math.abs(n(t.max)-n(t.min)),o=Math.min(n(t.max),n(t.min))):(e=t.scale=pt/Math.abs(n(t.max)-n(t.min)),e=-e,o=Math.max(n(t.max),n(t.min))),n==i?t.p2c=function(t){return(t-o)*e}:t.p2c=function(t){return(n(t)-o)*e},a?t.c2p=function(t){return a(o+t/e)}:t.c2p=function(t){return o+t/e}}function M(t){for(var i=t.options,e=t.ticks||[],o=i.labelWidth||0,n=i.labelHeight||0,a=o||("x"==t.direction?Math.floor(at.width/(e.length||1)):null),r=t.direction+"Axis "+t.direction+t.n+"Axis",l="flot-"+t.direction+"-axis flot-"+t.direction+t.n+"-axis "+r,s=i.font||"flot-tick-label tickLabel",c=0;c<e.length;++c){var h=e[c];if(h.label){var f=at.getTextInfo(l,h.label,s,null,a);o=Math.max(o,f.width),n=Math.max(n,f.height)}}t.labelWidth=i.labelWidth||o,t.labelHeight=i.labelHeight||n}function T(i){var e=i.labelWidth,o=i.labelHeight,n=i.options.position,a="x"===i.direction,r=i.options.tickLength,l=nt.grid.axisMargin,s=nt.grid.labelMargin,c=!0,h=!0,f=!0,u=!1;t.each(a?ht:ft,function(t,e){e&&(e.show||e.reserveSpace)&&(e===i?u=!0:e.options.position===n&&(u?h=!1:c=!1),u||(f=!1))}),h&&(l=0),null==r&&(r=f?"full":5),isNaN(+r)||(s+=+r),a?(o+=s,"bottom"==n?(ut.bottom+=o+l,i.box={top:at.height-ut.bottom,height:o}):(i.box={top:ut.top+l,height:o},ut.top+=o+l)):(e+=s,"left"==n?(i.box={left:ut.left+l,width:e},ut.left+=e+l):(ut.right+=e+l,i.box={left:at.width-ut.right,width:e})),i.position=n,i.tickLength=r,i.box.padding=s,i.innermost=c}function C(t){"x"==t.direction?(t.box.left=ut.left-t.labelWidth/2,t.box.width=at.width-ut.left-ut.right+t.labelWidth):(t.box.top=ut.top-t.labelHeight/2,t.box.height=at.height-ut.bottom-ut.top+t.labelHeight)}function S(){var i,e=nt.grid.minBorderMargin;if(null==e)for(e=0,i=0;i<ot.length;++i)e=Math.max(e,2*(ot[i].points.radius+ot[i].points.lineWidth/2));var o={left:e,right:e,top:e,bottom:e};t.each(d(),function(t,i){i.reserveSpace&&i.ticks&&i.ticks.length&&("x"===i.direction?(o.left=Math.max(o.left,i.labelWidth/2),o.right=Math.max(o.right,i.labelWidth/2)):(o.bottom=Math.max(o.bottom,i.labelHeight/2),o.top=Math.max(o.top,i.labelHeight/2)))}),ut.left=Math.ceil(Math.max(o.left,ut.left)),ut.right=Math.ceil(Math.max(o.right,ut.right)),ut.top=Math.ceil(Math.max(o.top,ut.top)),ut.bottom=Math.ceil(Math.max(o.bottom,ut.bottom))}function W(){var i,e=d(),o=nt.grid.show;for(var n in ut){var a=nt.grid.margin||0;ut[n]="number"==typeof a?a:a[n]||0}l(mt.processOffset,[ut]);for(var n in ut)"object"==typeof nt.grid.borderWidth?ut[n]+=o?nt.grid.borderWidth[n]:0:ut[n]+=o?nt.grid.borderWidth:0;if(t.each(e,function(t,i){var e=i.options;i.show=null==e.show?i.used:e.show,i.reserveSpace=null==e.reserveSpace?i.show:e.reserveSpace,z(i)}),o){var r=t.grep(e,function(t){return t.show||t.reserveSpace});for(t.each(r,function(t,i){I(i),A(i),F(i,i.ticks),M(i)}),i=r.length-1;i>=0;--i)T(r[i]);S(),t.each(r,function(t,i){C(i)})}dt=at.width-ut.left-ut.right,pt=at.height-ut.bottom-ut.top,t.each(e,function(t,i){w(i)}),o&&O(),_()}function z(t){var i=t.options,e=+(null!=i.min?i.min:t.datamin),o=+(null!=i.max?i.max:t.datamax),n=o-e;if(0==n){var a=0==o?1:.01;null==i.min&&(e-=a),(null==i.max||null!=i.min)&&(o+=a)}else{var r=i.autoscaleMargin;null!=r&&(null==i.min&&(e-=n*r,0>e&&null!=t.datamin&&t.datamin>=0&&(e=0)),null==i.max&&(o+=n*r,o>0&&null!=t.datamax&&t.datamax<=0&&(o=0)))}t.min=e,t.max=o}function I(i){var e,n=i.options;e="number"==typeof n.ticks&&n.ticks>0?n.ticks:.3*Math.sqrt("x"==i.direction?at.width:at.height);var a=(i.max-i.min)/e,r=-Math.floor(Math.log(a)/Math.LN10),l=n.tickDecimals;null!=l&&r>l&&(r=l);var s,c=Math.pow(10,-r),h=a/c;if(1.5>h?s=1:3>h?(s=2,h>2.25&&(null==l||l>=r+1)&&(s=2.5,++r)):s=7.5>h?5:10,s*=c,null!=n.minTickSize&&s<n.minTickSize&&(s=n.minTickSize),i.delta=a,i.tickDecimals=Math.max(0,null!=l?l:r),i.tickSize=n.tickSize||s,"time"==n.mode&&!i.tickGenerator)throw new Error("Time mode requires the flot.time plugin.");if(i.tickGenerator||(i.tickGenerator=function(t){var i,e=[],n=o(t.min,t.tickSize),a=0,r=Number.NaN;do i=r,r=n+a*t.tickSize,e.push(r),++a;while(r<t.max&&r!=i);return e},i.tickFormatter=function(t,i){var e=i.tickDecimals?Math.pow(10,i.tickDecimals):1,o=""+Math.round(t*e)/e;if(null!=i.tickDecimals){var n=o.indexOf("."),a=-1==n?0:o.length-n-1;if(a<i.tickDecimals)return(a?o:o+".")+(""+e).substr(1,i.tickDecimals-a)}return o}),t.isFunction(n.tickFormatter)&&(i.tickFormatter=function(t,i){return""+n.tickFormatter(t,i)}),null!=n.alignTicksWithAxis){var f=("x"==i.direction?ht:ft)[n.alignTicksWithAxis-1];if(f&&f.used&&f!=i){var u=i.tickGenerator(i);if(u.length>0&&(null==n.min&&(i.min=Math.min(i.min,u[0])),null==n.max&&u.length>1&&(i.max=Math.max(i.max,u[u.length-1]))),i.tickGenerator=function(t){var i,e,o=[];for(e=0;e<f.ticks.length;++e)i=(f.ticks[e].v-f.min)/(f.max-f.min),i=t.min+i*(t.max-t.min),o.push(i);return o},!i.mode&&null==n.tickDecimals){var d=Math.max(0,-Math.floor(Math.log(i.delta)/Math.LN10)+1),p=i.tickGenerator(i);p.length>1&&/\..*0$/.test((p[1]-p[0]).toFixed(d))||(i.tickDecimals=d)}}}}function A(i){var e=i.options.ticks,o=[];null==e||"number"==typeof e&&e>0?o=i.tickGenerator(i):e&&(o=t.isFunction(e)?e(i):e);var n,a;for(i.ticks=[],n=0;n<o.length;++n){var r=null,l=o[n];"object"==typeof l?(a=+l[0],l.length>1&&(r=l[1])):a=+l,null==r&&(r=i.tickFormatter(a,i)),isNaN(a)||i.ticks.push({v:a,label:r})}}function F(t,i){t.options.autoscaleMargin&&i.length>0&&(null==t.options.min&&(t.min=Math.min(t.min,i[0].v)),null==t.options.max&&i.length>1&&(t.max=Math.max(t.max,i[i.length-1].v)))}function P(){at.clear(),l(mt.drawBackground,[st]);var t=nt.grid;t.show&&t.backgroundColor&&D(),t.show&&!t.aboveData&&L();for(var i=0;i<ot.length;++i)l(mt.drawSeries,[st,ot[i]]),R(ot[i]);l(mt.draw,[st]),t.show&&t.aboveData&&L(),at.render(),U()}function N(t,i){for(var e,o,n,a,r=d(),l=0;l<r.length;++l)if(e=r[l],e.direction==i&&(a=i+e.n+"axis",t[a]||1!=e.n||(a=i+"axis"),t[a])){o=t[a].from,n=t[a].to;break}if(t[a]||(e="x"==i?ht[0]:ft[0],o=t[i+"1"],n=t[i+"2"]),null!=o&&null!=n&&o>n){var s=o;o=n,n=s}return{from:o,to:n,axis:e}}function D(){st.save(),st.translate(ut.left,ut.top),st.fillStyle=et(nt.grid.backgroundColor,pt,0,"rgba(255, 255, 255, 0)"),st.fillRect(0,0,dt,pt),st.restore()}function L(){var i,e,o,n;st.save(),st.translate(ut.left,ut.top);var a=nt.grid.markings;if(a)for(t.isFunction(a)&&(e=xt.getAxes(),e.xmin=e.xaxis.min,e.xmax=e.xaxis.max,e.ymin=e.yaxis.min,e.ymax=e.yaxis.max,a=a(e)),i=0;i<a.length;++i){var r=a[i],l=N(r,"x"),s=N(r,"y");if(null==l.from&&(l.from=l.axis.min),null==l.to&&(l.to=l.axis.max),null==s.from&&(s.from=s.axis.min),null==s.to&&(s.to=s.axis.max),!(l.to<l.axis.min||l.from>l.axis.max||s.to<s.axis.min||s.from>s.axis.max)){l.from=Math.max(l.from,l.axis.min),l.to=Math.min(l.to,l.axis.max),s.from=Math.max(s.from,s.axis.min),s.to=Math.min(s.to,s.axis.max);var c=l.from===l.to,h=s.from===s.to;if(!c||!h)if(l.from=Math.floor(l.axis.p2c(l.from)),l.to=Math.floor(l.axis.p2c(l.to)),s.from=Math.floor(s.axis.p2c(s.from)),s.to=Math.floor(s.axis.p2c(s.to)),c||h){var f=r.lineWidth||nt.grid.markingsLineWidth,u=f%2?.5:0;st.beginPath(),st.strokeStyle=r.color||nt.grid.markingsColor,st.lineWidth=f,c?(st.moveTo(l.to+u,s.from),st.lineTo(l.to+u,s.to)):(st.moveTo(l.from,s.to+u),st.lineTo(l.to,s.to+u)),st.stroke()}else st.fillStyle=r.color||nt.grid.markingsColor,st.fillRect(l.from,s.to,l.to-l.from,s.from-s.to)}}e=d(),o=nt.grid.borderWidth;for(var p=0;p<e.length;++p){var m,x,g,b,v=e[p],k=v.box,y=v.tickLength;if(v.show&&0!=v.ticks.length){for(st.lineWidth=1,"x"==v.direction?(m=0,x="full"==y?"top"==v.position?0:pt:k.top-ut.top+("top"==v.position?k.height:0)):(x=0,m="full"==y?"left"==v.position?0:dt:k.left-ut.left+("left"==v.position?k.width:0)),v.innermost||(st.strokeStyle=v.options.color,st.beginPath(),g=b=0,"x"==v.direction?g=dt+1:b=pt+1,1==st.lineWidth&&("x"==v.direction?x=Math.floor(x)+.5:m=Math.floor(m)+.5),st.moveTo(m,x),st.lineTo(m+g,x+b),st.stroke()),st.strokeStyle=v.options.tickColor,st.beginPath(),i=0;i<v.ticks.length;++i){var w=v.ticks[i].v;g=b=0,isNaN(w)||w<v.min||w>v.max||"full"==y&&("object"==typeof o&&o[v.position]>0||o>0)&&(w==v.min||w==v.max)||("x"==v.direction?(m=v.p2c(w),b="full"==y?-pt:y,"top"==v.position&&(b=-b)):(x=v.p2c(w),g="full"==y?-dt:y,"left"==v.position&&(g=-g)),1==st.lineWidth&&("x"==v.direction?m=Math.floor(m)+.5:x=Math.floor(x)+.5),st.moveTo(m,x),st.lineTo(m+g,x+b))}st.stroke()}}o&&(n=nt.grid.borderColor,"object"==typeof o||"object"==typeof n?("object"!=typeof o&&(o={top:o,right:o,bottom:o,left:o}),"object"!=typeof n&&(n={top:n,right:n,bottom:n,left:n}),o.top>0&&(st.strokeStyle=n.top,st.lineWidth=o.top,st.beginPath(),st.moveTo(0-o.left,0-o.top/2),st.lineTo(dt,0-o.top/2),st.stroke()),o.right>0&&(st.strokeStyle=n.right,st.lineWidth=o.right,st.beginPath(),st.moveTo(dt+o.right/2,0-o.top),st.lineTo(dt+o.right/2,pt),st.stroke()),o.bottom>0&&(st.strokeStyle=n.bottom,st.lineWidth=o.bottom,st.beginPath(),st.moveTo(dt+o.right,pt+o.bottom/2),st.lineTo(0,pt+o.bottom/2),st.stroke()),o.left>0&&(st.strokeStyle=n.left,st.lineWidth=o.left,st.beginPath(),st.moveTo(0-o.left/2,pt+o.bottom),st.lineTo(0-o.left/2,0),st.stroke())):(st.lineWidth=o,st.strokeStyle=nt.grid.borderColor,st.strokeRect(-o/2,-o/2,dt+o,pt+o))),st.restore()}function O(){t.each(d(),function(t,i){var e,o,n,a,r,l=i.box,s=i.direction+"Axis "+i.direction+i.n+"Axis",c="flot-"+i.direction+"-axis flot-"+i.direction+i.n+"-axis "+s,h=i.options.font||"flot-tick-label tickLabel";if(at.removeText(c),i.show&&0!=i.ticks.length)for(var f=0;f<i.ticks.length;++f)e=i.ticks[f],!e.label||e.v<i.min||e.v>i.max||("x"==i.direction?(a="center",o=ut.left+i.p2c(e.v),"bottom"==i.position?n=l.top+l.padding:(n=l.top+l.height-l.padding,r="bottom")):(r="middle",n=ut.top+i.p2c(e.v),"left"==i.position?(o=l.left+l.width-l.padding,a="right"):o=l.left+l.padding),at.addText(c,o,n,e.label,h,null,null,a,r))})}function R(t){t.lines.show&&H(t),t.bars.show&&B(t),t.points.show&&j(t)}function H(t){function i(t,i,e,o,n){var a=t.points,r=t.pointsize,l=null,s=null;st.beginPath();for(var c=r;c<a.length;c+=r){var h=a[c-r],f=a[c-r+1],u=a[c],d=a[c+1];if(null!=h&&null!=u){if(d>=f&&f<n.min){if(d<n.min)continue;h=(n.min-f)/(d-f)*(u-h)+h,f=n.min}else if(f>=d&&d<n.min){if(f<n.min)continue;u=(n.min-f)/(d-f)*(u-h)+h,d=n.min}if(f>=d&&f>n.max){if(d>n.max)continue;h=(n.max-f)/(d-f)*(u-h)+h,f=n.max}else if(d>=f&&d>n.max){if(f>n.max)continue;u=(n.max-f)/(d-f)*(u-h)+h,d=n.max}if(u>=h&&h<o.min){if(u<o.min)continue;f=(o.min-h)/(u-h)*(d-f)+f,h=o.min}else if(h>=u&&u<o.min){if(h<o.min)continue;d=(o.min-h)/(u-h)*(d-f)+f,u=o.min}if(h>=u&&h>o.max){if(u>o.max)continue;f=(o.max-h)/(u-h)*(d-f)+f,h=o.max}else if(u>=h&&u>o.max){if(h>o.max)continue;d=(o.max-h)/(u-h)*(d-f)+f,u=o.max}(h!=l||f!=s)&&st.moveTo(o.p2c(h)+i,n.p2c(f)+e),l=u,s=d,st.lineTo(o.p2c(u)+i,n.p2c(d)+e)}}st.stroke()}function e(t,i,e){for(var o=t.points,n=t.pointsize,a=Math.min(Math.max(0,e.min),e.max),r=0,l=!1,s=1,c=0,h=0;;){if(n>0&&r>o.length+n)break;r+=n;var f=o[r-n],u=o[r-n+s],d=o[r],p=o[r+s];if(l){if(n>0&&null!=f&&null==d){h=r,n=-n,s=2;continue}if(0>n&&r==c+n){st.fill(),l=!1,n=-n,s=1,r=c=h+n;continue}}if(null!=f&&null!=d){if(d>=f&&f<i.min){if(d<i.min)continue;u=(i.min-f)/(d-f)*(p-u)+u,f=i.min}else if(f>=d&&d<i.min){if(f<i.min)continue;p=(i.min-f)/(d-f)*(p-u)+u,d=i.min}if(f>=d&&f>i.max){if(d>i.max)continue;u=(i.max-f)/(d-f)*(p-u)+u,f=i.max}else if(d>=f&&d>i.max){if(f>i.max)continue;p=(i.max-f)/(d-f)*(p-u)+u,d=i.max}if(l||(st.beginPath(),st.moveTo(i.p2c(f),e.p2c(a)),l=!0),u>=e.max&&p>=e.max)st.lineTo(i.p2c(f),e.p2c(e.max)),st.lineTo(i.p2c(d),e.p2c(e.max));else if(u<=e.min&&p<=e.min)st.lineTo(i.p2c(f),e.p2c(e.min)),st.lineTo(i.p2c(d),e.p2c(e.min));else{var m=f,x=d;p>=u&&u<e.min&&p>=e.min?(f=(e.min-u)/(p-u)*(d-f)+f,u=e.min):u>=p&&p<e.min&&u>=e.min&&(d=(e.min-u)/(p-u)*(d-f)+f,p=e.min),u>=p&&u>e.max&&p<=e.max?(f=(e.max-u)/(p-u)*(d-f)+f,u=e.max):p>=u&&p>e.max&&u<=e.max&&(d=(e.max-u)/(p-u)*(d-f)+f,p=e.max),f!=m&&st.lineTo(i.p2c(m),e.p2c(u)),st.lineTo(i.p2c(f),e.p2c(u)),st.lineTo(i.p2c(d),e.p2c(p)),d!=x&&(st.lineTo(i.p2c(d),e.p2c(p)),st.lineTo(i.p2c(x),e.p2c(p)))}}}}st.save(),st.translate(ut.left,ut.top),st.lineJoin="round";var o=t.lines.lineWidth,n=t.shadowSize;if(o>0&&n>0){st.lineWidth=n,st.strokeStyle="rgba(0,0,0,0.1)";var a=Math.PI/18;i(t.datapoints,Math.sin(a)*(o/2+n/2),Math.cos(a)*(o/2+n/2),t.xaxis,t.yaxis),st.lineWidth=n/2,i(t.datapoints,Math.sin(a)*(o/2+n/4),Math.cos(a)*(o/2+n/4),t.xaxis,t.yaxis)}st.lineWidth=o,st.strokeStyle=t.color;var r=G(t.lines,t.color,0,pt);r&&(st.fillStyle=r,e(t.datapoints,t.xaxis,t.yaxis)),o>0&&i(t.datapoints,0,0,t.xaxis,t.yaxis),st.restore()}function j(t){function i(t,i,e,o,n,a,r,l){for(var s=t.points,c=t.pointsize,h=0;h<s.length;h+=c){var f=s[h],u=s[h+1];null==f||f<a.min||f>a.max||u<r.min||u>r.max||(st.beginPath(),f=a.p2c(f),u=r.p2c(u)+o,"circle"==l?st.arc(f,u,i,0,n?Math.PI:2*Math.PI,!1):l(st,f,u,i,n),st.closePath(),e&&(st.fillStyle=e,st.fill()),st.stroke())}}st.save(),st.translate(ut.left,ut.top);var e=t.points.lineWidth,o=t.shadowSize,n=t.points.radius,a=t.points.symbol;if(0==e&&(e=1e-4),e>0&&o>0){var r=o/2;st.lineWidth=r,st.strokeStyle="rgba(0,0,0,0.1)",i(t.datapoints,n,null,r+r/2,!0,t.xaxis,t.yaxis,a),st.strokeStyle="rgba(0,0,0,0.2)",i(t.datapoints,n,null,r/2,!0,t.xaxis,t.yaxis,a)}st.lineWidth=e,st.strokeStyle=t.color,i(t.datapoints,n,G(t.points,t.color),0,!1,t.xaxis,t.yaxis,a),st.restore()}function E(t,i,e,o,n,a,r,l,s,c,h){var f,u,d,p,m,x,g,b,v;c?(b=x=g=!0,m=!1,f=e,u=t,p=i+o,d=i+n,f>u&&(v=u,u=f,f=v,m=!0,x=!1)):(m=x=g=!0,b=!1,f=t+o,u=t+n,d=e,p=i,d>p&&(v=p,p=d,d=v,b=!0,g=!1)),u<r.min||f>r.max||p<l.min||d>l.max||(f<r.min&&(f=r.min,m=!1),u>r.max&&(u=r.max,x=!1),d<l.min&&(d=l.min,b=!1),p>l.max&&(p=l.max,g=!1),f=r.p2c(f),d=l.p2c(d),u=r.p2c(u),p=l.p2c(p),a&&(s.fillStyle=a(d,p),s.fillRect(f,p,u-f,d-p)),h>0&&(m||x||g||b)&&(s.beginPath(),s.moveTo(f,d),m?s.lineTo(f,p):s.moveTo(f,p),g?s.lineTo(u,p):s.moveTo(u,p),x?s.lineTo(u,d):s.moveTo(u,d),b?s.lineTo(f,d):s.moveTo(f,d),s.stroke()))}function B(t){function i(i,e,o,n,a,r){for(var l=i.points,s=i.pointsize,c=0;c<l.length;c+=s)null!=l[c]&&E(l[c],l[c+1],l[c+2],e,o,n,a,r,st,t.bars.horizontal,t.bars.lineWidth)}st.save(),st.translate(ut.left,ut.top),st.lineWidth=t.bars.lineWidth,st.strokeStyle=t.color;var e;switch(t.bars.align){case"left":e=0;break;case"right":e=-t.bars.barWidth;break;default:e=-t.bars.barWidth/2}var o=t.bars.fill?function(i,e){return G(t.bars,t.color,i,e)}:null;i(t.datapoints,e,e+t.bars.barWidth,o,t.xaxis,t.yaxis),st.restore()}function G(i,e,o,n){var a=i.fill;if(!a)return null;if(i.fillColor)return et(i.fillColor,o,n,e);var r=t.color.parse(e);return r.a="number"==typeof a?a:.4,r.normalize(),r.toString()}function _(){if(null!=nt.legend.container?t(nt.legend.container).html(""):e.find(".legend").remove(),nt.legend.show){for(var i,o,n=[],a=[],r=!1,l=nt.legend.labelFormatter,s=0;s<ot.length;++s)i=ot[s],i.label&&(o=l?l(i.label,i):i.label,o&&a.push({label:o,color:i.color}));if(nt.legend.sorted)if(t.isFunction(nt.legend.sorted))a.sort(nt.legend.sorted);else if("reverse"==nt.legend.sorted)a.reverse();else{var c="descending"!=nt.legend.sorted;a.sort(function(t,i){return t.label==i.label?0:t.label<i.label!=c?1:-1})}for(var s=0;s<a.length;++s){var h=a[s];s%nt.legend.noColumns==0&&(r&&n.push("</tr>"),n.push("<tr>"),r=!0),n.push('<td class="legendColorBox"><div style="border:1px solid '+nt.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>")}if(r&&n.push("</tr>"),0!=n.length){var f='<table style="font-size:smaller;color:'+nt.grid.color+'">'+n.join("")+"</table>";if(null!=nt.legend.container)t(nt.legend.container).html(f);else{var u="",d=nt.legend.position,p=nt.legend.margin;null==p[0]&&(p=[p,p]),"n"==d.charAt(0)?u+="top:"+(p[1]+ut.top)+"px;":"s"==d.charAt(0)&&(u+="bottom:"+(p[1]+ut.bottom)+"px;"),"e"==d.charAt(1)?u+="right:"+(p[0]+ut.right)+"px;":"w"==d.charAt(1)&&(u+="left:"+(p[0]+ut.left)+"px;");var m=t('<div class="legend">'+f.replace('style="','style="position:absolute;'+u+";")+"</div>").appendTo(e);if(0!=nt.legend.backgroundOpacity){var x=nt.legend.backgroundColor;null==x&&(x=nt.grid.backgroundColor,x=x&&"string"==typeof x?t.color.parse(x):t.color.extract(m,"background-color"),x.a=1,x=x.toString());var g=m.children();t('<div style="position:absolute;width:'+g.width()+"px;height:"+g.height()+"px;"+u+"background-color:"+x+';"> </div>').prependTo(m).css("opacity",nt.legend.backgroundOpacity)}}}}}function V(t,i,e){var o,n,a,r=nt.grid.mouseActiveRadius,l=r*r+1,s=null;for(o=ot.length-1;o>=0;--o)if(e(ot[o])){var c=ot[o],h=c.xaxis,f=c.yaxis,u=c.datapoints.points,d=h.c2p(t),p=f.c2p(i),m=r/h.scale,x=r/f.scale;if(a=c.datapoints.pointsize,h.options.inverseTransform&&(m=Number.MAX_VALUE),f.options.inverseTransform&&(x=Number.MAX_VALUE),c.lines.show||c.points.show)for(n=0;n<u.length;n+=a){var g=u[n],b=f.datamin;if(null!=g&&!(g-d>m||-m>g-d||b-p>x||-x>b-p)){var v=Math.abs(h.p2c(g)-t),k=Math.abs(f.p2c(b)-i),y=v*v+k*k;l>y&&(l=y,s=[o,n/a])}}if(c.bars.show&&!s){var w,M;switch(c.bars.align){case"left":w=0;break;case"right":w=-c.bars.barWidth;break;default:w=-c.bars.barWidth/2}for(M=w+c.bars.barWidth,n=0;n<u.length;n+=a){var g=u[n],b=u[n+1],T=u[n+2];null!=g&&(ot[o].bars.horizontal?d<=Math.max(T,g)&&d>=Math.min(T,g)&&p>=b+w&&b+M>=p:d>=g+w&&g+M>=d&&p>=Math.min(T,b)&&p<=Math.max(T,b))&&(s=[o,n/a])}}}return s?(o=s[0],n=s[1],a=ot[o].datapoints.pointsize,{datapoint:ot[o].datapoints.points.slice(n*a,(n+1)*a),dataIndex:n,series:ot[o],seriesIndex:o}):null}function X(t){nt.grid.hoverable&&Q("plothover",t,function(t){return 0!=t.hoverable})}function Y(t){nt.grid.hoverable&&Q("plothover",t,function(t){return!1})}function q(t){Q("plotclick",t,function(t){return 0!=t.clickable})}function Q(t,i,o){var n=lt.offset(),a=i.pageX-n.left-ut.left,r=i.pageY-n.top-ut.top,l=p({left:a,top:r});l.pageX=i.pageX,l.pageY=i.pageY;var s=V(a,r,o);if(s&&(s.pageX=parseInt(s.series.xaxis.p2c(s.datapoint[0])+n.left+ut.left,10),s.pageY=parseInt(s.series.yaxis.p2c(s.datapoint[1])+n.top+ut.top,10)),nt.grid.autoHighlight){for(var c=0;c<gt.length;++c){var h=gt[c];h.auto!=t||s&&h.series==s.series&&h.point[0]==s.datapoint[0]&&h.point[1]==s.datapoint[1]||K(h.series,h.point)}s&&$(s.series,s.datapoint,t)}e.trigger(t,[l,s])}function U(){var t=nt.interaction.redrawOverlayInterval;return-1==t?void J():void(bt||(bt=setTimeout(J,t)))}function J(){bt=null,ct.save(),rt.clear(),ct.translate(ut.left,ut.top);var t,i;for(t=0;t<gt.length;++t)i=gt[t],i.series.bars.show?it(i.series,i.point):tt(i.series,i.point);ct.restore(),l(mt.drawOverlay,[ct])}function $(t,i,e){if("number"==typeof t&&(t=ot[t]),"number"==typeof i){var o=t.datapoints.pointsize;i=t.datapoints.points.slice(o*i,o*(i+1))}var n=Z(t,i);-1==n?(gt.push({series:t,point:i,auto:e}),U()):e||(gt[n].auto=!1)}function K(t,i){if(null==t&&null==i)return gt=[],void U();if("number"==typeof t&&(t=ot[t]),"number"==typeof i){var e=t.datapoints.pointsize;i=t.datapoints.points.slice(e*i,e*(i+1))}var o=Z(t,i);-1!=o&&(gt.splice(o,1),U())}function Z(t,i){for(var e=0;e<gt.length;++e){var o=gt[e];if(o.series==t&&o.point[0]==i[0]&&o.point[1]==i[1])return e}return-1}function tt(i,e){var o=e[0],n=e[1],a=i.xaxis,r=i.yaxis,l="string"==typeof i.highlightColor?i.highlightColor:t.color.parse(i.color).scale("a",.5).toString();if(!(o<a.min||o>a.max||n<r.min||n>r.max)){var s=i.points.radius+i.points.lineWidth/2;ct.lineWidth=s,ct.strokeStyle=l;var c=1.5*s;o=a.p2c(o),n=r.p2c(n),ct.beginPath(),"circle"==i.points.symbol?ct.arc(o,n,c,0,2*Math.PI,!1):i.points.symbol(ct,o,n,c,!1),ct.closePath(),ct.stroke()}}function it(i,e){var o,n="string"==typeof i.highlightColor?i.highlightColor:t.color.parse(i.color).scale("a",.5).toString(),a=n;switch(i.bars.align){case"left":o=0;break;case"right":o=-i.bars.barWidth;break;default:o=-i.bars.barWidth/2}ct.lineWidth=i.bars.lineWidth,ct.strokeStyle=n,E(e[0],e[1],e[2]||0,o,o+i.bars.barWidth,function(){return a},i.xaxis,i.yaxis,ct,i.bars.horizontal,i.bars.lineWidth)}function et(i,e,o,n){if("string"==typeof i)return i;for(var a=st.createLinearGradient(0,o,0,e),r=0,l=i.colors.length;l>r;++r){var s=i.colors[r];if("string"!=typeof s){var c=t.color.parse(n);null!=s.brightness&&(c=c.scale("rgb",s.brightness)),null!=s.opacity&&(c.a*=s.opacity),s=c.toString()}a.addColorStop(r/(l-1),s)}return a}var ot=[],nt={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,
2
  fill:!0,fillColor:null,align:"left",horizontal:!1,zero:!0},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:{}},at=null,rt=null,lt=null,st=null,ct=null,ht=[],ft=[],ut={left:0,right:0,top:0,bottom:0},dt=0,pt=0,mt={processOptions:[],processRawData:[],processDatapoints:[],processOffset:[],drawBackground:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},xt=this;xt.setData=h,xt.setupGrid=W,xt.draw=P,xt.getPlaceholder=function(){return e},xt.getCanvas=function(){return at.element},xt.getPlotOffset=function(){return ut},xt.width=function(){return dt},xt.height=function(){return pt},xt.offset=function(){var t=lt.offset();return t.left+=ut.left,t.top+=ut.top,t},xt.getData=function(){return ot},xt.getAxes=function(){var i={};return t.each(ht.concat(ft),function(t,e){e&&(i[e.direction+(1!=e.n?e.n:"")+"axis"]=e)}),i},xt.getXAxes=function(){return ht},xt.getYAxes=function(){return ft},xt.c2p=p,xt.p2c=m,xt.getOptions=function(){return nt},xt.highlight=$,xt.unhighlight=K,xt.triggerRedrawOverlay=U,xt.pointOffset=function(t){return{left:parseInt(ht[u(t,"x")-1].p2c(+t.x)+ut.left,10),top:parseInt(ft[u(t,"y")-1].p2c(+t.y)+ut.top,10)}},xt.shutdown=y,xt.destroy=function(){y(),e.removeData("plot").empty(),ot=[],nt=null,at=null,rt=null,lt=null,st=null,ct=null,ht=[],ft=[],mt=null,gt=[],xt=null},xt.resize=function(){var t=e.width(),i=e.height();at.resize(t,i),rt.resize(t,i)},xt.hooks=mt,s(xt),c(a),v(),h(n),W(),P(),k();var gt=[],bt=null}function o(t,i){return i*Math.floor(t/i)}var n=Object.prototype.hasOwnProperty;t.fn.detach||(t.fn.detach=function(){return this.each(function(){this.parentNode&&this.parentNode.removeChild(this)})}),i.prototype.resize=function(t,i){if(0>=t||0>=i)throw new Error("Invalid dimensions for plot, width = "+t+", height = "+i);var e=this.element,o=this.context,n=this.pixelRatio;this.width!=t&&(e.width=t*n,e.style.width=t+"px",this.width=t),this.height!=i&&(e.height=i*n,e.style.height=i+"px",this.height=i),o.restore(),o.save(),o.scale(n,n)},i.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},i.prototype.render=function(){var t=this._textCache;for(var i in t)if(n.call(t,i)){var e=this.getTextLayer(i),o=t[i];e.hide();for(var a in o)if(n.call(o,a)){var r=o[a];for(var l in r)if(n.call(r,l)){for(var s,c=r[l].positions,h=0;s=c[h];h++)s.active?s.rendered||(e.append(s.element),s.rendered=!0):(c.splice(h--,1),s.rendered&&s.element.detach());0==c.length&&delete r[l]}}e.show()}},i.prototype.getTextLayer=function(i){var e=this.text[i];return null==e&&(null==this.textContainer&&(this.textContainer=t("<div class='flot-text'></div>").css({position:"absolute",top:0,left:0,bottom:0,right:0,"font-size":"smaller",color:"#545454"}).insertAfter(this.element)),e=this.text[i]=t("<div></div>").addClass(i).css({position:"absolute",top:0,left:0,bottom:0,right:0}).appendTo(this.textContainer)),e},i.prototype.getTextInfo=function(i,e,o,n,a){var r,l,s,c;if(e=""+e,r="object"==typeof o?o.style+" "+o.variant+" "+o.weight+" "+o.size+"px/"+o.lineHeight+"px "+o.family:o,l=this._textCache[i],null==l&&(l=this._textCache[i]={}),s=l[r],null==s&&(s=l[r]={}),c=s[e],null==c){var h=t("<div></div>").html(e).css({position:"absolute","max-width":a,top:-9999}).appendTo(this.getTextLayer(i));"object"==typeof o?h.css({font:r,color:o.color}):"string"==typeof o&&h.addClass(o),c=s[e]={width:h.outerWidth(!0),height:h.outerHeight(!0),element:h,positions:[]},h.detach()}return c},i.prototype.addText=function(t,i,e,o,n,a,r,l,s){var c=this.getTextInfo(t,o,n,a,r),h=c.positions;"center"==l?i-=c.width/2:"right"==l&&(i-=c.width),"middle"==s?e-=c.height/2:"bottom"==s&&(e-=c.height);for(var f,u=0;f=h[u];u++)if(f.x==i&&f.y==e)return void(f.active=!0);f={active:!0,rendered:!1,element:h.length?c.element.clone():c.element,x:i,y:e},h.push(f),f.element.css({top:Math.round(e),left:Math.round(i),"text-align":l})},i.prototype.removeText=function(t,i,e,o,a,r){if(null==o){var l=this._textCache[t];if(null!=l)for(var s in l)if(n.call(l,s)){var c=l[s];for(var h in c)if(n.call(c,h))for(var f,u=c[h].positions,d=0;f=u[d];d++)f.active=!1}}else for(var f,u=this.getTextInfo(t,o,a,r).positions,d=0;f=u[d];d++)f.x==i&&f.y==e&&(f.active=!1)},t.plot=function(i,o,n){var a=new e(t(i),o,n,t.plot.plugins);return a},t.plot.version="0.8.3",t.plot.plugins=[],t.fn.plot=function(i,e){return this.each(function(){t.plot(this,i,e)})}}(jQuery);
 
 
3
  //axisLabels 2.0
4
  !function(t){function i(){return!!document.createElement("canvas").getContext}function e(){if(!i())return!1;var t=document.createElement("canvas"),e=t.getContext("2d");return"function"==typeof e.fillText}function s(){var t=document.createElement("div");return"undefined"!=typeof t.style.MozTransition||"undefined"!=typeof t.style.OTransition||"undefined"!=typeof t.style.webkitTransition||"undefined"!=typeof t.style.transition}function o(t,i,e,s,o){this.axisName=t,this.position=i,this.padding=e,this.plot=s,this.opts=o,this.width=0,this.height=0}function a(t,i,e,s,a){o.prototype.constructor.call(this,t,i,e,s,a)}function l(t,i,e,s,a){o.prototype.constructor.call(this,t,i,e,s,a),this.elem=null}function h(t,i,e,s,o){l.prototype.constructor.call(this,t,i,e,s,o)}function n(t,i,e,s,o){h.prototype.constructor.call(this,t,i,e,s,o),this.requiresResize=!1}function r(i){i.hooks.processOptions.push(function(i,o){if(o.axisLabels.show){var r=!1,p={},d=2;i.hooks.draw.push(function(i,o){var f=!1;r?(r=!1,t.each(i.getAxes(),function(t,e){var s=e.options||i.getOptions()[t];s&&s.axisLabel&&e.show&&p[t].draw(e.box)})):(t.each(i.getAxes(),function(t,o){var r=o.options||i.getOptions()[t];if(t in p&&(o.labelHeight=o.labelHeight-p[t].height,o.labelWidth=o.labelWidth-p[t].width,r.labelHeight=o.labelHeight,r.labelWidth=o.labelWidth,p[t].cleanup(),delete p[t]),r&&r.axisLabel&&o.show){f=!0;var c=null;if(r.axisLabelUseHtml||"Microsoft Internet Explorer"!=navigator.appName)c=r.axisLabelUseHtml||!s()&&!e()&&!r.axisLabelUseCanvas?l:r.axisLabelUseCanvas||!s()?a:h;else{var b=navigator.userAgent,x=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");null!=x.exec(b)&&(rv=parseFloat(RegExp.$1)),c=rv>=9&&!r.axisLabelUseCanvas&&!r.axisLabelUseHtml?h:r.axisLabelUseCanvas||r.axisLabelUseHtml?r.axisLabelUseCanvas?a:l:n}var g=void 0===r.axisLabelPadding?d:r.axisLabelPadding;p[t]=new c(t,o.position,g,i,r),p[t].calculateSize(),r.labelHeight=o.labelHeight+p[t].height,r.labelWidth=o.labelWidth+p[t].width}}),f&&(r=!0,i.setupGrid(),i.draw()))})}})}var p={axisLabels:{show:!0}};o.prototype.cleanup=function(){},a.prototype=new o,a.prototype.constructor=a,a.prototype.calculateSize=function(){this.opts.axisLabelFontSizePixels||(this.opts.axisLabelFontSizePixels=14),this.opts.axisLabelFontFamily||(this.opts.axisLabelFontFamily="sans-serif");this.opts.axisLabelFontSizePixels+this.padding,this.opts.axisLabelFontSizePixels+this.padding;"left"==this.position||"right"==this.position?(this.width=this.opts.axisLabelFontSizePixels+this.padding,this.height=0):(this.width=0,this.height=this.opts.axisLabelFontSizePixels+this.padding)},a.prototype.draw=function(t){this.opts.axisLabelColour||(this.opts.axisLabelColour="black");var i=this.plot.getCanvas().getContext("2d");i.save(),i.font=this.opts.axisLabelFontSizePixels+"px "+this.opts.axisLabelFontFamily,i.fillStyle=this.opts.axisLabelColour;var e,s,o=i.measureText(this.opts.axisLabel).width,a=this.opts.axisLabelFontSizePixels,l=0;"top"==this.position?(e=t.left+t.width/2-o/2,s=t.top+.72*a):"bottom"==this.position?(e=t.left+t.width/2-o/2,s=t.top+t.height-.72*a):"left"==this.position?(e=t.left+.72*a,s=t.height/2+t.top+o/2,l=-Math.PI/2):"right"==this.position&&(e=t.left+t.width-.72*a,s=t.height/2+t.top-o/2,l=Math.PI/2),i.translate(e,s),i.rotate(l),i.fillText(this.opts.axisLabel,0,0),i.restore()},l.prototype=new o,l.prototype.constructor=l,l.prototype.calculateSize=function(){var i=t('<div class="axisLabels" style="position:absolute;">'+this.opts.axisLabel+"</div>");this.plot.getPlaceholder().append(i),this.labelWidth=i.outerWidth(!0),this.labelHeight=i.outerHeight(!0),i.remove(),this.width=this.height=0,"left"==this.position||"right"==this.position?this.width=this.labelWidth+this.padding:this.height=this.labelHeight+this.padding},l.prototype.cleanup=function(){this.elem&&this.elem.remove()},l.prototype.draw=function(i){this.plot.getPlaceholder().find("#"+this.axisName+"Label").remove(),this.elem=t('<div id="'+this.axisName+'Label" " class="axisLabels" style="position:absolute;">'+this.opts.axisLabel+"</div>"),this.plot.getPlaceholder().append(this.elem),"top"==this.position?(this.elem.css("left",i.left+i.width/2-this.labelWidth/2+"px"),this.elem.css("top",i.top+"px")):"bottom"==this.position?(this.elem.css("left",i.left+i.width/2-this.labelWidth/2+"px"),this.elem.css("top",i.top+i.height-this.labelHeight+"px")):"left"==this.position?(this.elem.css("top",i.top+i.height/2-this.labelHeight/2+"px"),this.elem.css("left",i.left+"px")):"right"==this.position&&(this.elem.css("top",i.top+i.height/2-this.labelHeight/2+"px"),this.elem.css("left",i.left+i.width-this.labelWidth+"px"))},h.prototype=new l,h.prototype.constructor=h,h.prototype.calculateSize=function(){l.prototype.calculateSize.call(this),this.width=this.height=0,"left"==this.position||"right"==this.position?this.width=this.labelHeight+this.padding:this.height=this.labelHeight+this.padding},h.prototype.transforms=function(t,i,e){var s={"-moz-transform":"","-webkit-transform":"","-o-transform":"","-ms-transform":""};if(0!=i||0!=e){var o=" translate("+i+"px, "+e+"px)";s["-moz-transform"]+=o,s["-webkit-transform"]+=o,s["-o-transform"]+=o,s["-ms-transform"]+=o}if(0!=t){var a=" rotate("+t+"deg)";s["-moz-transform"]+=a,s["-webkit-transform"]+=a,s["-o-transform"]+=a,s["-ms-transform"]+=a}var l="top: 0; left: 0; ";for(var h in s)s[h]&&(l+=h+":"+s[h]+";");return l+=";"},h.prototype.calculateOffsets=function(t){var i={x:0,y:0,degrees:0};return"bottom"==this.position?(i.x=t.left+t.width/2-this.labelWidth/2,i.y=t.top+t.height-this.labelHeight):"top"==this.position?(i.x=t.left+t.width/2-this.labelWidth/2,i.y=t.top):"left"==this.position?(i.degrees=-90,i.x=t.left-this.labelWidth/2+this.labelHeight/2,i.y=t.height/2+t.top):"right"==this.position&&(i.degrees=90,i.x=t.left+t.width-this.labelWidth/2-this.labelHeight/2,i.y=t.height/2+t.top),i.x=Math.round(i.x),i.y=Math.round(i.y),i},h.prototype.draw=function(i){this.plot.getPlaceholder().find("."+this.axisName+"Label").remove();var e=this.calculateOffsets(i);this.elem=t('<div class="axisLabels '+this.axisName+'Label" style="position:absolute; '+this.transforms(e.degrees,e.x,e.y)+'">'+this.opts.axisLabel+"</div>"),this.plot.getPlaceholder().append(this.elem)},n.prototype=new h,n.prototype.constructor=n,n.prototype.transforms=function(t,i,e){var s="";if(0!=t){for(var o=t/90;0>o;)o+=4;s+=" filter: progid:DXImageTransform.Microsoft.BasicImage(rotation="+o+"); ",this.requiresResize="right"==this.position}return 0!=i&&(s+="left: "+i+"px; "),0!=e&&(s+="top: "+e+"px; "),s},n.prototype.calculateOffsets=function(t){var i=h.prototype.calculateOffsets.call(this,t);return"top"==this.position?i.y=t.top+1:"left"==this.position?(i.x=t.left,i.y=t.height/2+t.top-this.labelWidth/2):"right"==this.position&&(i.x=t.left+t.width-this.labelHeight,i.y=t.height/2+t.top-this.labelWidth/2),i},n.prototype.draw=function(t){h.prototype.draw.call(this,t),this.requiresResize&&(this.elem=this.plot.getPlaceholder().find("."+this.axisName+"Label"),this.elem.css("width",this.labelWidth),this.elem.css("height",this.labelHeight))},t.plot.plugins.push({init:r,options:p,name:"axisLabels",version:"2.0"})}(jQuery);
5
  //improved orderBars 0.2 - github.com/emmerich
@@ -10,3 +13,5 @@ fill:!0,fillColor:null,align:"left",horizontal:!1,zero:!0},shadowSize:3,highligh
10
  (function($){var options={xaxis:{timezone:null,timeformat:null,twelveHourClock:false,monthNames:null}};function floorInBase(n,base){return base*Math.floor(n/base)}function formatDate(d,fmt,monthNames,dayNames){if(typeof d.strftime=="function"){return d.strftime(fmt)}var leftPad=function(n,pad){n=""+n;pad=""+(pad==null?"0":pad);return n.length==1?pad+n:n};var r=[];var escape=false;var hours=d.getHours();var isAM=hours<12;if(monthNames==null){monthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}if(dayNames==null){dayNames=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]}var hours12;if(hours>12){hours12=hours-12}else if(hours==0){hours12=12}else{hours12=hours}for(var i=0;i<fmt.length;++i){var c=fmt.charAt(i);if(escape){switch(c){case"a":c=""+dayNames[d.getDay()];break;case"b":c=""+monthNames[d.getMonth()];break;case"d":c=leftPad(d.getDate());break;case"e":c=leftPad(d.getDate()," ");break;case"h":case"H":c=leftPad(hours);break;case"I":c=leftPad(hours12);break;case"l":c=leftPad(hours12," ");break;case"m":c=leftPad(d.getMonth()+1);break;case"M":c=leftPad(d.getMinutes());break;case"q":c=""+(Math.floor(d.getMonth()/3)+1);break;case"S":c=leftPad(d.getSeconds());break;case"y":c=leftPad(d.getFullYear()%100);break;case"Y":c=""+d.getFullYear();break;case"p":c=isAM?""+"am":""+"pm";break;case"P":c=isAM?""+"AM":""+"PM";break;case"w":c=""+d.getDay();break}r.push(c);escape=false}else{if(c=="%"){escape=true}else{r.push(c)}}}return r.join("")}function makeUtcWrapper(d){function addProxyMethod(sourceObj,sourceMethod,targetObj,targetMethod){sourceObj[sourceMethod]=function(){return targetObj[targetMethod].apply(targetObj,arguments)}}var utc={date:d};if(d.strftime!=undefined){addProxyMethod(utc,"strftime",d,"strftime")}addProxyMethod(utc,"getTime",d,"getTime");addProxyMethod(utc,"setTime",d,"setTime");var props=["Date","Day","FullYear","Hours","Milliseconds","Minutes","Month","Seconds"];for(var p=0;p<props.length;p++){addProxyMethod(utc,"get"+props[p],d,"getUTC"+props[p]);addProxyMethod(utc,"set"+props[p],d,"setUTC"+props[p])}return utc}function dateGenerator(ts,opts){if(opts.timezone=="browser"){return new Date(ts)}else if(!opts.timezone||opts.timezone=="utc"){return makeUtcWrapper(new Date(ts))}else if(typeof timezoneJS!="undefined"&&typeof timezoneJS.Date!="undefined"){var d=new timezoneJS.Date;d.setTimezone(opts.timezone);d.setTime(ts);return d}else{return makeUtcWrapper(new Date(ts))}}var timeUnitSize={second:1e3,minute:60*1e3,hour:60*60*1e3,day:24*60*60*1e3,month:30*24*60*60*1e3,quarter:3*30*24*60*60*1e3,year:365.2425*24*60*60*1e3};var baseSpec=[[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"]];var specMonths=baseSpec.concat([[3,"month"],[6,"month"],[1,"year"]]);var specQuarters=baseSpec.concat([[1,"quarter"],[2,"quarter"],[1,"year"]]);function init(plot){plot.hooks.processOptions.push(function(plot,options){$.each(plot.getAxes(),function(axisName,axis){var opts=axis.options;if(opts.mode=="time"){axis.tickGenerator=function(axis){var ticks=[];var d=dateGenerator(axis.min,opts);var minSize=0;var spec=opts.tickSize&&opts.tickSize[1]==="quarter"||opts.minTickSize&&opts.minTickSize[1]==="quarter"?specQuarters:specMonths;if(opts.minTickSize!=null){if(typeof opts.tickSize=="number"){minSize=opts.tickSize}else{minSize=opts.minTickSize[0]*timeUnitSize[opts.minTickSize[1]]}}for(var i=0;i<spec.length-1;++i){if(axis.delta<(spec[i][0]*timeUnitSize[spec[i][1]]+spec[i+1][0]*timeUnitSize[spec[i+1][1]])/2&&spec[i][0]*timeUnitSize[spec[i][1]]>=minSize){break}}var size=spec[i][0];var unit=spec[i][1];if(unit=="year"){if(opts.minTickSize!=null&&opts.minTickSize[1]=="year"){size=Math.floor(opts.minTickSize[0])}else{var magn=Math.pow(10,Math.floor(Math.log(axis.delta/timeUnitSize.year)/Math.LN10));var norm=axis.delta/timeUnitSize.year/magn;if(norm<1.5){size=1}else if(norm<3){size=2}else if(norm<7.5){size=5}else{size=10}size*=magn}if(size<1){size=1}}axis.tickSize=opts.tickSize||[size,unit];var tickSize=axis.tickSize[0];unit=axis.tickSize[1];var step=tickSize*timeUnitSize[unit];if(unit=="second"){d.setSeconds(floorInBase(d.getSeconds(),tickSize))}else if(unit=="minute"){d.setMinutes(floorInBase(d.getMinutes(),tickSize))}else if(unit=="hour"){d.setHours(floorInBase(d.getHours(),tickSize))}else if(unit=="month"){d.setMonth(floorInBase(d.getMonth(),tickSize))}else if(unit=="quarter"){d.setMonth(3*floorInBase(d.getMonth()/3,tickSize))}else if(unit=="year"){d.setFullYear(floorInBase(d.getFullYear(),tickSize))}d.setMilliseconds(0);if(step>=timeUnitSize.minute){d.setSeconds(0)}if(step>=timeUnitSize.hour){d.setMinutes(0)}if(step>=timeUnitSize.day){d.setHours(0)}if(step>=timeUnitSize.day*4){d.setDate(1)}if(step>=timeUnitSize.month*2){d.setMonth(floorInBase(d.getMonth(),3))}if(step>=timeUnitSize.quarter*2){d.setMonth(floorInBase(d.getMonth(),6))}if(step>=timeUnitSize.year){d.setMonth(0)}var carry=0;var v=Number.NaN;var prev;do{prev=v;v=d.getTime();ticks.push(v);if(unit=="month"||unit=="quarter"){if(tickSize<1){d.setDate(1);var start=d.getTime();d.setMonth(d.getMonth()+(unit=="quarter"?3:1));var end=d.getTime();d.setTime(v+carry*timeUnitSize.hour+(end-start)*tickSize);carry=d.getHours();d.setHours(0)}else{d.setMonth(d.getMonth()+tickSize*(unit=="quarter"?3:1))}}else if(unit=="year"){d.setFullYear(d.getFullYear()+tickSize)}else{d.setTime(v+step)}}while(v<axis.max&&v!=prev);return ticks};axis.tickFormatter=function(v,axis){var d=dateGenerator(v,axis.options);if(opts.timeformat!=null){return formatDate(d,opts.timeformat,opts.monthNames,opts.dayNames)}var useQuarters=axis.options.tickSize&&axis.options.tickSize[1]=="quarter"||axis.options.minTickSize&&axis.options.minTickSize[1]=="quarter";var t=axis.tickSize[0]*timeUnitSize[axis.tickSize[1]];var span=axis.max-axis.min;var suffix=opts.twelveHourClock?" %p":"";var hourCode=opts.twelveHourClock?"%I":"%H";var fmt;if(t<timeUnitSize.minute){fmt=hourCode+":%M:%S"+suffix}else if(t<timeUnitSize.day){if(span<2*timeUnitSize.day){fmt=hourCode+":%M"+suffix}else{fmt="%b %d "+hourCode+":%M"+suffix}}else if(t<timeUnitSize.month){fmt="%b %d"}else if(useQuarters&&t<timeUnitSize.quarter||!useQuarters&&t<timeUnitSize.year){if(span<timeUnitSize.year){fmt="%b"}else{fmt="%b %Y"}}else if(useQuarters&&t<timeUnitSize.year){if(span<timeUnitSize.year){fmt="Q%q"}else{fmt="Q%q %Y"}}else{fmt="%Y"}var rt=formatDate(d,fmt,opts.monthNames,opts.dayNames);return rt}}})})}$.plot.plugins.push({init:init,options:options,name:"time",version:"1.0"});$.plot.formatDate=formatDate})(jQuery);
11
  //resize",version:"1.0"
12
  (function($,e,t){"$:nomunge";var i=[],n=$.resize=$.extend($.resize,{}),a,r=false,s="setTimeout",u="resize",m=u+"-special-event",o="pendingDelay",l="activeDelay",f="throttleWindow";n[o]=200;n[l]=20;n[f]=true;$.event.special[u]={setup:function(){if(!n[f]&&this[s]){return false}var e=$(this);i.push(this);e.data(m,{w:e.width(),h:e.height()});if(i.length===1){a=t;h()}},teardown:function(){if(!n[f]&&this[s]){return false}var e=$(this);for(var t=i.length-1;t>=0;t--){if(i[t]==this){i.splice(t,1);break}}e.removeData(m);if(!i.length){if(r){cancelAnimationFrame(a)}else{clearTimeout(a)}a=null}},add:function(e){if(!n[f]&&this[s]){return false}var i;function a(e,n,a){var r=$(this),s=r.data(m)||{};s.w=n!==t?n:r.width();s.h=a!==t?a:r.height();i.apply(this,arguments)}if($.isFunction(e)){i=e;return a}else{i=e.handler;e.handler=a}}};function h(t){if(r===true){r=t||1}for(var s=i.length-1;s>=0;s--){var l=$(i[s]);if(l[0]==e||l.is(":visible")){var f=l.width(),c=l.height(),d=l.data(m);if(d&&(f!==d.w||c!==d.h)){l.trigger(u,[d.w=f,d.h=c]);r=t||true}}else{d=l.data(m);d.w=0;d.h=0}}if(a!==null){if(r&&(t==null||t-r<1e3)){a=e.requestAnimationFrame(h)}else{a=setTimeout(h,n[o]);r=false}}}if(!e.requestAnimationFrame){e.requestAnimationFrame=function(){return e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t,i){return e.setTimeout(function(){t((new Date).getTime())},n[l])}}()}if(!e.cancelAnimationFrame){e.cancelAnimationFrame=function(){return e.webkitCancelRequestAnimationFrame||e.mozCancelRequestAnimationFrame||e.oCancelRequestAnimationFrame||e.msCancelRequestAnimationFrame||clearTimeout}()}})(jQuery,this);(function($){var options={};function init(plot){function onResize(){var placeholder=plot.getPlaceholder();if(placeholder.width()==0||placeholder.height()==0)return;plot.resize();plot.setupGrid();plot.draw()}function bindEvents(plot,eventHolder){plot.getPlaceholder().resize(onResize)}function shutdown(plot,eventHolder){plot.getPlaceholder().unbind("resize",onResize)}plot.hooks.bindEvents.push(bindEvents);plot.hooks.shutdown.push(shutdown)}$.plot.plugins.push({init:init,options:options,name:"resize",version:"1.0"})})(jQuery);
 
 
1
+ $.plot = null;
2
  !function(t){t.color={},t.color.make=function(i,e,o,n){var a={};return a.r=i||0,a.g=e||0,a.b=o||0,a.a=null!=n?n:1,a.add=function(t,i){for(var e=0;e<t.length;++e)a[t.charAt(e)]+=i;return a.normalize()},a.scale=function(t,i){for(var e=0;e<t.length;++e)a[t.charAt(e)]*=i;return a.normalize()},a.toString=function(){return a.a>=1?"rgb("+[a.r,a.g,a.b].join(",")+")":"rgba("+[a.r,a.g,a.b,a.a].join(",")+")"},a.normalize=function(){function t(t,i,e){return t>i?t:i>e?e:i}return a.r=t(0,parseInt(a.r),255),a.g=t(0,parseInt(a.g),255),a.b=t(0,parseInt(a.b),255),a.a=t(0,a.a,1),a},a.clone=function(){return t.color.make(a.r,a.b,a.g,a.a)},a.normalize()},t.color.extract=function(i,e){var o;do{if(o=i.css(e).toLowerCase(),""!=o&&"transparent"!=o)break;i=i.parent()}while(i.length&&!t.nodeName(i.get(0),"body"));return"rgba(0, 0, 0, 0)"==o&&(o="transparent"),t.color.parse(o)},t.color.parse=function(e){var o,n=t.color.make;if(o=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(e))return n(parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10));if(o=/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(e))return n(parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10),parseFloat(o[4]));if(o=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(e))return n(2.55*parseFloat(o[1]),2.55*parseFloat(o[2]),2.55*parseFloat(o[3]));if(o=/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(e))return n(2.55*parseFloat(o[1]),2.55*parseFloat(o[2]),2.55*parseFloat(o[3]),parseFloat(o[4]));if(o=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(e))return n(parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16));if(o=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(e))return n(parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16));var a=t.trim(e).toLowerCase();return"transparent"==a?n(255,255,255,0):(o=i[a]||[0,0,0],n(o[0],o[1],o[2]))};var i={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(t){function i(i,e){var o=e.children("."+i)[0];if(null==o&&(o=document.createElement("canvas"),o.className=i,t(o).css({direction:"ltr",position:"absolute",left:0,top:0}).appendTo(e),!o.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.");o=window.G_vmlCanvasManager.initElement(o)}this.element=o;var n=this.context=o.getContext("2d"),a=window.devicePixelRatio||1,r=n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1;this.pixelRatio=a/r,this.resize(e.width(),e.height()),this.textContainer=null,this.text={},this._textCache={}}function e(e,n,a,r){function l(t,i){i=[xt].concat(i);for(var e=0;e<t.length;++e)t[e].apply(this,i)}function s(){for(var e={Canvas:i},o=0;o<r.length;++o){var n=r[o];n.init(xt,e),n.options&&t.extend(!0,nt,n.options)}}function c(i){t.extend(!0,nt,i),i&&i.colors&&(nt.colors=i.colors),null==nt.xaxis.color&&(nt.xaxis.color=t.color.parse(nt.grid.color).scale("a",.22).toString()),null==nt.yaxis.color&&(nt.yaxis.color=t.color.parse(nt.grid.color).scale("a",.22).toString()),null==nt.xaxis.tickColor&&(nt.xaxis.tickColor=nt.grid.tickColor||nt.xaxis.color),null==nt.yaxis.tickColor&&(nt.yaxis.tickColor=nt.grid.tickColor||nt.yaxis.color),null==nt.grid.borderColor&&(nt.grid.borderColor=nt.grid.color),null==nt.grid.tickColor&&(nt.grid.tickColor=t.color.parse(nt.grid.color).scale("a",.22).toString());var o,n,a,r=e.css("font-size"),s=r?+r.replace("px",""):13,c={style:e.css("font-style"),size:Math.round(.8*s),variant:e.css("font-variant"),weight:e.css("font-weight"),family:e.css("font-family")};for(a=nt.xaxes.length||1,o=0;a>o;++o)n=nt.xaxes[o],n&&!n.tickColor&&(n.tickColor=n.color),n=t.extend(!0,{},nt.xaxis,n),nt.xaxes[o]=n,n.font&&(n.font=t.extend({},c,n.font),n.font.color||(n.font.color=n.color),n.font.lineHeight||(n.font.lineHeight=Math.round(1.15*n.font.size)));for(a=nt.yaxes.length||1,o=0;a>o;++o)n=nt.yaxes[o],n&&!n.tickColor&&(n.tickColor=n.color),n=t.extend(!0,{},nt.yaxis,n),nt.yaxes[o]=n,n.font&&(n.font=t.extend({},c,n.font),n.font.color||(n.font.color=n.color),n.font.lineHeight||(n.font.lineHeight=Math.round(1.15*n.font.size)));for(nt.xaxis.noTicks&&null==nt.xaxis.ticks&&(nt.xaxis.ticks=nt.xaxis.noTicks),nt.yaxis.noTicks&&null==nt.yaxis.ticks&&(nt.yaxis.ticks=nt.yaxis.noTicks),nt.x2axis&&(nt.xaxes[1]=t.extend(!0,{},nt.xaxis,nt.x2axis),nt.xaxes[1].position="top",null==nt.x2axis.min&&(nt.xaxes[1].min=null),null==nt.x2axis.max&&(nt.xaxes[1].max=null)),nt.y2axis&&(nt.yaxes[1]=t.extend(!0,{},nt.yaxis,nt.y2axis),nt.yaxes[1].position="right",null==nt.y2axis.min&&(nt.yaxes[1].min=null),null==nt.y2axis.max&&(nt.yaxes[1].max=null)),nt.grid.coloredAreas&&(nt.grid.markings=nt.grid.coloredAreas),nt.grid.coloredAreasColor&&(nt.grid.markingsColor=nt.grid.coloredAreasColor),nt.lines&&t.extend(!0,nt.series.lines,nt.lines),nt.points&&t.extend(!0,nt.series.points,nt.points),nt.bars&&t.extend(!0,nt.series.bars,nt.bars),null!=nt.shadowSize&&(nt.series.shadowSize=nt.shadowSize),null!=nt.highlightColor&&(nt.series.highlightColor=nt.highlightColor),o=0;o<nt.xaxes.length;++o)x(ht,o+1).options=nt.xaxes[o];for(o=0;o<nt.yaxes.length;++o)x(ft,o+1).options=nt.yaxes[o];for(var h in mt)nt.hooks[h]&&nt.hooks[h].length&&(mt[h]=mt[h].concat(nt.hooks[h]));l(mt.processOptions,[nt])}function h(t){ot=f(t),g(),b()}function f(i){for(var e=[],o=0;o<i.length;++o){var n=t.extend(!0,{},nt.series);null!=i[o].data?(n.data=i[o].data,delete i[o].data,t.extend(!0,n,i[o]),i[o].data=n.data):n.data=i[o],e.push(n)}return e}function u(t,i){var e=t[i+"axis"];return"object"==typeof e&&(e=e.n),"number"!=typeof e&&(e=1),e}function d(){return t.grep(ht.concat(ft),function(t){return t})}function p(t){var i,e,o={};for(i=0;i<ht.length;++i)e=ht[i],e&&e.used&&(o["x"+e.n]=e.c2p(t.left));for(i=0;i<ft.length;++i)e=ft[i],e&&e.used&&(o["y"+e.n]=e.c2p(t.top));return void 0!==o.x1&&(o.x=o.x1),void 0!==o.y1&&(o.y=o.y1),o}function m(t){var i,e,o,n={};for(i=0;i<ht.length;++i)if(e=ht[i],e&&e.used&&(o="x"+e.n,null==t[o]&&1==e.n&&(o="x"),null!=t[o])){n.left=e.p2c(t[o]);break}for(i=0;i<ft.length;++i)if(e=ft[i],e&&e.used&&(o="y"+e.n,null==t[o]&&1==e.n&&(o="y"),null!=t[o])){n.top=e.p2c(t[o]);break}return n}function x(i,e){return i[e-1]||(i[e-1]={n:e,direction:i==ht?"x":"y",options:t.extend(!0,{},i==ht?nt.xaxis:nt.yaxis)}),i[e-1]}function g(){var i,e=ot.length,o=-1;for(i=0;i<ot.length;++i){var n=ot[i].color;null!=n&&(e--,"number"==typeof n&&n>o&&(o=n))}o>=e&&(e=o+1);var a,r=[],l=nt.colors,s=l.length,c=0;for(i=0;e>i;i++)a=t.color.parse(l[i%s]||"#666"),i%s==0&&i&&(c=c>=0?.5>c?-c-.2:0:-c),r[i]=a.scale("rgb",1+c);var h,f=0;for(i=0;i<ot.length;++i){if(h=ot[i],null==h.color?(h.color=r[f].toString(),++f):"number"==typeof h.color&&(h.color=r[h.color].toString()),null==h.lines.show){var d,p=!0;for(d in h)if(h[d]&&h[d].show){p=!1;break}p&&(h.lines.show=!0)}null==h.lines.zero&&(h.lines.zero=!!h.lines.fill),h.xaxis=x(ht,u(h,"x")),h.yaxis=x(ft,u(h,"y"))}}function b(){function i(t,i,e){i<t.datamin&&i!=-b&&(t.datamin=i),e>t.datamax&&e!=b&&(t.datamax=e)}var e,o,n,a,r,s,c,h,f,u,p,m,x=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,b=Number.MAX_VALUE;for(t.each(d(),function(t,i){i.datamin=x,i.datamax=g,i.used=!1}),e=0;e<ot.length;++e)r=ot[e],r.datapoints={points:[]},l(mt.processRawData,[r,r.data,r.datapoints]);for(e=0;e<ot.length;++e){if(r=ot[e],p=r.data,m=r.datapoints.format,!m){if(m=[],m.push({x:!0,number:!0,required:!0}),m.push({y:!0,number:!0,required:!0}),r.bars.show||r.lines.show&&r.lines.fill){var v=!!(r.bars.show&&r.bars.zero||r.lines.show&&r.lines.zero);m.push({y:!0,number:!0,required:!1,defaultValue:0,autoscale:v}),r.bars.horizontal&&(delete m[m.length-1].y,m[m.length-1].x=!0)}r.datapoints.format=m}if(null==r.datapoints.pointsize){r.datapoints.pointsize=m.length,c=r.datapoints.pointsize,s=r.datapoints.points;var k=r.lines.show&&r.lines.steps;for(r.xaxis.used=r.yaxis.used=!0,o=n=0;o<p.length;++o,n+=c){u=p[o];var y=null==u;if(!y)for(a=0;c>a;++a)h=u[a],f=m[a],f&&(f.number&&null!=h&&(h=+h,isNaN(h)?h=null:h==1/0?h=b:h==-(1/0)&&(h=-b)),null==h&&(f.required&&(y=!0),null!=f.defaultValue&&(h=f.defaultValue))),s[n+a]=h;if(y)for(a=0;c>a;++a)h=s[n+a],null!=h&&(f=m[a],f.autoscale!==!1&&(f.x&&i(r.xaxis,h,h),f.y&&i(r.yaxis,h,h))),s[n+a]=null;else if(k&&n>0&&null!=s[n-c]&&s[n-c]!=s[n]&&s[n-c+1]!=s[n+1]){for(a=0;c>a;++a)s[n+c+a]=s[n+a];s[n+1]=s[n-c+1],n+=c}}}}for(e=0;e<ot.length;++e)r=ot[e],l(mt.processDatapoints,[r,r.datapoints]);for(e=0;e<ot.length;++e){r=ot[e],s=r.datapoints.points,c=r.datapoints.pointsize,m=r.datapoints.format;var w=x,M=x,T=g,C=g;for(o=0;o<s.length;o+=c)if(null!=s[o])for(a=0;c>a;++a)h=s[o+a],f=m[a],f&&f.autoscale!==!1&&h!=b&&h!=-b&&(f.x&&(w>h&&(w=h),h>T&&(T=h)),f.y&&(M>h&&(M=h),h>C&&(C=h)));if(r.bars.show){var S;switch(r.bars.align){case"left":S=0;break;case"right":S=-r.bars.barWidth;break;default:S=-r.bars.barWidth/2}r.bars.horizontal?(M+=S,C+=S+r.bars.barWidth):(w+=S,T+=S+r.bars.barWidth)}i(r.xaxis,w,T),i(r.yaxis,M,C)}t.each(d(),function(t,i){i.datamin==x&&(i.datamin=null),i.datamax==g&&(i.datamax=null)})}function v(){e.css("padding",0).children().filter(function(){return!t(this).hasClass("flot-overlay")&&!t(this).hasClass("flot-base")}).remove(),"static"==e.css("position")&&e.css("position","relative"),at=new i("flot-base",e),rt=new i("flot-overlay",e),st=at.context,ct=rt.context,lt=t(rt.element).unbind();var o=e.data("plot");o&&(o.shutdown(),rt.clear()),e.data("plot",xt)}function k(){nt.grid.hoverable&&(lt.mousemove(X),lt.bind("mouseleave",Y)),nt.grid.clickable&&lt.click(q),l(mt.bindEvents,[lt])}function y(){bt&&clearTimeout(bt),lt.unbind("mousemove",X),lt.unbind("mouseleave",Y),lt.unbind("click",q),l(mt.shutdown,[lt])}function w(t){function i(t){return t}var e,o,n=t.options.transform||i,a=t.options.inverseTransform;"x"==t.direction?(e=t.scale=dt/Math.abs(n(t.max)-n(t.min)),o=Math.min(n(t.max),n(t.min))):(e=t.scale=pt/Math.abs(n(t.max)-n(t.min)),e=-e,o=Math.max(n(t.max),n(t.min))),n==i?t.p2c=function(t){return(t-o)*e}:t.p2c=function(t){return(n(t)-o)*e},a?t.c2p=function(t){return a(o+t/e)}:t.c2p=function(t){return o+t/e}}function M(t){for(var i=t.options,e=t.ticks||[],o=i.labelWidth||0,n=i.labelHeight||0,a=o||("x"==t.direction?Math.floor(at.width/(e.length||1)):null),r=t.direction+"Axis "+t.direction+t.n+"Axis",l="flot-"+t.direction+"-axis flot-"+t.direction+t.n+"-axis "+r,s=i.font||"flot-tick-label tickLabel",c=0;c<e.length;++c){var h=e[c];if(h.label){var f=at.getTextInfo(l,h.label,s,null,a);o=Math.max(o,f.width),n=Math.max(n,f.height)}}t.labelWidth=i.labelWidth||o,t.labelHeight=i.labelHeight||n}function T(i){var e=i.labelWidth,o=i.labelHeight,n=i.options.position,a="x"===i.direction,r=i.options.tickLength,l=nt.grid.axisMargin,s=nt.grid.labelMargin,c=!0,h=!0,f=!0,u=!1;t.each(a?ht:ft,function(t,e){e&&(e.show||e.reserveSpace)&&(e===i?u=!0:e.options.position===n&&(u?h=!1:c=!1),u||(f=!1))}),h&&(l=0),null==r&&(r=f?"full":5),isNaN(+r)||(s+=+r),a?(o+=s,"bottom"==n?(ut.bottom+=o+l,i.box={top:at.height-ut.bottom,height:o}):(i.box={top:ut.top+l,height:o},ut.top+=o+l)):(e+=s,"left"==n?(i.box={left:ut.left+l,width:e},ut.left+=e+l):(ut.right+=e+l,i.box={left:at.width-ut.right,width:e})),i.position=n,i.tickLength=r,i.box.padding=s,i.innermost=c}function C(t){"x"==t.direction?(t.box.left=ut.left-t.labelWidth/2,t.box.width=at.width-ut.left-ut.right+t.labelWidth):(t.box.top=ut.top-t.labelHeight/2,t.box.height=at.height-ut.bottom-ut.top+t.labelHeight)}function S(){var i,e=nt.grid.minBorderMargin;if(null==e)for(e=0,i=0;i<ot.length;++i)e=Math.max(e,2*(ot[i].points.radius+ot[i].points.lineWidth/2));var o={left:e,right:e,top:e,bottom:e};t.each(d(),function(t,i){i.reserveSpace&&i.ticks&&i.ticks.length&&("x"===i.direction?(o.left=Math.max(o.left,i.labelWidth/2),o.right=Math.max(o.right,i.labelWidth/2)):(o.bottom=Math.max(o.bottom,i.labelHeight/2),o.top=Math.max(o.top,i.labelHeight/2)))}),ut.left=Math.ceil(Math.max(o.left,ut.left)),ut.right=Math.ceil(Math.max(o.right,ut.right)),ut.top=Math.ceil(Math.max(o.top,ut.top)),ut.bottom=Math.ceil(Math.max(o.bottom,ut.bottom))}function W(){var i,e=d(),o=nt.grid.show;for(var n in ut){var a=nt.grid.margin||0;ut[n]="number"==typeof a?a:a[n]||0}l(mt.processOffset,[ut]);for(var n in ut)"object"==typeof nt.grid.borderWidth?ut[n]+=o?nt.grid.borderWidth[n]:0:ut[n]+=o?nt.grid.borderWidth:0;if(t.each(e,function(t,i){var e=i.options;i.show=null==e.show?i.used:e.show,i.reserveSpace=null==e.reserveSpace?i.show:e.reserveSpace,z(i)}),o){var r=t.grep(e,function(t){return t.show||t.reserveSpace});for(t.each(r,function(t,i){I(i),A(i),F(i,i.ticks),M(i)}),i=r.length-1;i>=0;--i)T(r[i]);S(),t.each(r,function(t,i){C(i)})}dt=at.width-ut.left-ut.right,pt=at.height-ut.bottom-ut.top,t.each(e,function(t,i){w(i)}),o&&O(),_()}function z(t){var i=t.options,e=+(null!=i.min?i.min:t.datamin),o=+(null!=i.max?i.max:t.datamax),n=o-e;if(0==n){var a=0==o?1:.01;null==i.min&&(e-=a),(null==i.max||null!=i.min)&&(o+=a)}else{var r=i.autoscaleMargin;null!=r&&(null==i.min&&(e-=n*r,0>e&&null!=t.datamin&&t.datamin>=0&&(e=0)),null==i.max&&(o+=n*r,o>0&&null!=t.datamax&&t.datamax<=0&&(o=0)))}t.min=e,t.max=o}function I(i){var e,n=i.options;e="number"==typeof n.ticks&&n.ticks>0?n.ticks:.3*Math.sqrt("x"==i.direction?at.width:at.height);var a=(i.max-i.min)/e,r=-Math.floor(Math.log(a)/Math.LN10),l=n.tickDecimals;null!=l&&r>l&&(r=l);var s,c=Math.pow(10,-r),h=a/c;if(1.5>h?s=1:3>h?(s=2,h>2.25&&(null==l||l>=r+1)&&(s=2.5,++r)):s=7.5>h?5:10,s*=c,null!=n.minTickSize&&s<n.minTickSize&&(s=n.minTickSize),i.delta=a,i.tickDecimals=Math.max(0,null!=l?l:r),i.tickSize=n.tickSize||s,"time"==n.mode&&!i.tickGenerator)throw new Error("Time mode requires the flot.time plugin.");if(i.tickGenerator||(i.tickGenerator=function(t){var i,e=[],n=o(t.min,t.tickSize),a=0,r=Number.NaN;do i=r,r=n+a*t.tickSize,e.push(r),++a;while(r<t.max&&r!=i);return e},i.tickFormatter=function(t,i){var e=i.tickDecimals?Math.pow(10,i.tickDecimals):1,o=""+Math.round(t*e)/e;if(null!=i.tickDecimals){var n=o.indexOf("."),a=-1==n?0:o.length-n-1;if(a<i.tickDecimals)return(a?o:o+".")+(""+e).substr(1,i.tickDecimals-a)}return o}),t.isFunction(n.tickFormatter)&&(i.tickFormatter=function(t,i){return""+n.tickFormatter(t,i)}),null!=n.alignTicksWithAxis){var f=("x"==i.direction?ht:ft)[n.alignTicksWithAxis-1];if(f&&f.used&&f!=i){var u=i.tickGenerator(i);if(u.length>0&&(null==n.min&&(i.min=Math.min(i.min,u[0])),null==n.max&&u.length>1&&(i.max=Math.max(i.max,u[u.length-1]))),i.tickGenerator=function(t){var i,e,o=[];for(e=0;e<f.ticks.length;++e)i=(f.ticks[e].v-f.min)/(f.max-f.min),i=t.min+i*(t.max-t.min),o.push(i);return o},!i.mode&&null==n.tickDecimals){var d=Math.max(0,-Math.floor(Math.log(i.delta)/Math.LN10)+1),p=i.tickGenerator(i);p.length>1&&/\..*0$/.test((p[1]-p[0]).toFixed(d))||(i.tickDecimals=d)}}}}function A(i){var e=i.options.ticks,o=[];null==e||"number"==typeof e&&e>0?o=i.tickGenerator(i):e&&(o=t.isFunction(e)?e(i):e);var n,a;for(i.ticks=[],n=0;n<o.length;++n){var r=null,l=o[n];"object"==typeof l?(a=+l[0],l.length>1&&(r=l[1])):a=+l,null==r&&(r=i.tickFormatter(a,i)),isNaN(a)||i.ticks.push({v:a,label:r})}}function F(t,i){t.options.autoscaleMargin&&i.length>0&&(null==t.options.min&&(t.min=Math.min(t.min,i[0].v)),null==t.options.max&&i.length>1&&(t.max=Math.max(t.max,i[i.length-1].v)))}function P(){at.clear(),l(mt.drawBackground,[st]);var t=nt.grid;t.show&&t.backgroundColor&&D(),t.show&&!t.aboveData&&L();for(var i=0;i<ot.length;++i)l(mt.drawSeries,[st,ot[i]]),R(ot[i]);l(mt.draw,[st]),t.show&&t.aboveData&&L(),at.render(),U()}function N(t,i){for(var e,o,n,a,r=d(),l=0;l<r.length;++l)if(e=r[l],e.direction==i&&(a=i+e.n+"axis",t[a]||1!=e.n||(a=i+"axis"),t[a])){o=t[a].from,n=t[a].to;break}if(t[a]||(e="x"==i?ht[0]:ft[0],o=t[i+"1"],n=t[i+"2"]),null!=o&&null!=n&&o>n){var s=o;o=n,n=s}return{from:o,to:n,axis:e}}function D(){st.save(),st.translate(ut.left,ut.top),st.fillStyle=et(nt.grid.backgroundColor,pt,0,"rgba(255, 255, 255, 0)"),st.fillRect(0,0,dt,pt),st.restore()}function L(){var i,e,o,n;st.save(),st.translate(ut.left,ut.top);var a=nt.grid.markings;if(a)for(t.isFunction(a)&&(e=xt.getAxes(),e.xmin=e.xaxis.min,e.xmax=e.xaxis.max,e.ymin=e.yaxis.min,e.ymax=e.yaxis.max,a=a(e)),i=0;i<a.length;++i){var r=a[i],l=N(r,"x"),s=N(r,"y");if(null==l.from&&(l.from=l.axis.min),null==l.to&&(l.to=l.axis.max),null==s.from&&(s.from=s.axis.min),null==s.to&&(s.to=s.axis.max),!(l.to<l.axis.min||l.from>l.axis.max||s.to<s.axis.min||s.from>s.axis.max)){l.from=Math.max(l.from,l.axis.min),l.to=Math.min(l.to,l.axis.max),s.from=Math.max(s.from,s.axis.min),s.to=Math.min(s.to,s.axis.max);var c=l.from===l.to,h=s.from===s.to;if(!c||!h)if(l.from=Math.floor(l.axis.p2c(l.from)),l.to=Math.floor(l.axis.p2c(l.to)),s.from=Math.floor(s.axis.p2c(s.from)),s.to=Math.floor(s.axis.p2c(s.to)),c||h){var f=r.lineWidth||nt.grid.markingsLineWidth,u=f%2?.5:0;st.beginPath(),st.strokeStyle=r.color||nt.grid.markingsColor,st.lineWidth=f,c?(st.moveTo(l.to+u,s.from),st.lineTo(l.to+u,s.to)):(st.moveTo(l.from,s.to+u),st.lineTo(l.to,s.to+u)),st.stroke()}else st.fillStyle=r.color||nt.grid.markingsColor,st.fillRect(l.from,s.to,l.to-l.from,s.from-s.to)}}e=d(),o=nt.grid.borderWidth;for(var p=0;p<e.length;++p){var m,x,g,b,v=e[p],k=v.box,y=v.tickLength;if(v.show&&0!=v.ticks.length){for(st.lineWidth=1,"x"==v.direction?(m=0,x="full"==y?"top"==v.position?0:pt:k.top-ut.top+("top"==v.position?k.height:0)):(x=0,m="full"==y?"left"==v.position?0:dt:k.left-ut.left+("left"==v.position?k.width:0)),v.innermost||(st.strokeStyle=v.options.color,st.beginPath(),g=b=0,"x"==v.direction?g=dt+1:b=pt+1,1==st.lineWidth&&("x"==v.direction?x=Math.floor(x)+.5:m=Math.floor(m)+.5),st.moveTo(m,x),st.lineTo(m+g,x+b),st.stroke()),st.strokeStyle=v.options.tickColor,st.beginPath(),i=0;i<v.ticks.length;++i){var w=v.ticks[i].v;g=b=0,isNaN(w)||w<v.min||w>v.max||"full"==y&&("object"==typeof o&&o[v.position]>0||o>0)&&(w==v.min||w==v.max)||("x"==v.direction?(m=v.p2c(w),b="full"==y?-pt:y,"top"==v.position&&(b=-b)):(x=v.p2c(w),g="full"==y?-dt:y,"left"==v.position&&(g=-g)),1==st.lineWidth&&("x"==v.direction?m=Math.floor(m)+.5:x=Math.floor(x)+.5),st.moveTo(m,x),st.lineTo(m+g,x+b))}st.stroke()}}o&&(n=nt.grid.borderColor,"object"==typeof o||"object"==typeof n?("object"!=typeof o&&(o={top:o,right:o,bottom:o,left:o}),"object"!=typeof n&&(n={top:n,right:n,bottom:n,left:n}),o.top>0&&(st.strokeStyle=n.top,st.lineWidth=o.top,st.beginPath(),st.moveTo(0-o.left,0-o.top/2),st.lineTo(dt,0-o.top/2),st.stroke()),o.right>0&&(st.strokeStyle=n.right,st.lineWidth=o.right,st.beginPath(),st.moveTo(dt+o.right/2,0-o.top),st.lineTo(dt+o.right/2,pt),st.stroke()),o.bottom>0&&(st.strokeStyle=n.bottom,st.lineWidth=o.bottom,st.beginPath(),st.moveTo(dt+o.right,pt+o.bottom/2),st.lineTo(0,pt+o.bottom/2),st.stroke()),o.left>0&&(st.strokeStyle=n.left,st.lineWidth=o.left,st.beginPath(),st.moveTo(0-o.left/2,pt+o.bottom),st.lineTo(0-o.left/2,0),st.stroke())):(st.lineWidth=o,st.strokeStyle=nt.grid.borderColor,st.strokeRect(-o/2,-o/2,dt+o,pt+o))),st.restore()}function O(){t.each(d(),function(t,i){var e,o,n,a,r,l=i.box,s=i.direction+"Axis "+i.direction+i.n+"Axis",c="flot-"+i.direction+"-axis flot-"+i.direction+i.n+"-axis "+s,h=i.options.font||"flot-tick-label tickLabel";if(at.removeText(c),i.show&&0!=i.ticks.length)for(var f=0;f<i.ticks.length;++f)e=i.ticks[f],!e.label||e.v<i.min||e.v>i.max||("x"==i.direction?(a="center",o=ut.left+i.p2c(e.v),"bottom"==i.position?n=l.top+l.padding:(n=l.top+l.height-l.padding,r="bottom")):(r="middle",n=ut.top+i.p2c(e.v),"left"==i.position?(o=l.left+l.width-l.padding,a="right"):o=l.left+l.padding),at.addText(c,o,n,e.label,h,null,null,a,r))})}function R(t){t.lines.show&&H(t),t.bars.show&&B(t),t.points.show&&j(t)}function H(t){function i(t,i,e,o,n){var a=t.points,r=t.pointsize,l=null,s=null;st.beginPath();for(var c=r;c<a.length;c+=r){var h=a[c-r],f=a[c-r+1],u=a[c],d=a[c+1];if(null!=h&&null!=u){if(d>=f&&f<n.min){if(d<n.min)continue;h=(n.min-f)/(d-f)*(u-h)+h,f=n.min}else if(f>=d&&d<n.min){if(f<n.min)continue;u=(n.min-f)/(d-f)*(u-h)+h,d=n.min}if(f>=d&&f>n.max){if(d>n.max)continue;h=(n.max-f)/(d-f)*(u-h)+h,f=n.max}else if(d>=f&&d>n.max){if(f>n.max)continue;u=(n.max-f)/(d-f)*(u-h)+h,d=n.max}if(u>=h&&h<o.min){if(u<o.min)continue;f=(o.min-h)/(u-h)*(d-f)+f,h=o.min}else if(h>=u&&u<o.min){if(h<o.min)continue;d=(o.min-h)/(u-h)*(d-f)+f,u=o.min}if(h>=u&&h>o.max){if(u>o.max)continue;f=(o.max-h)/(u-h)*(d-f)+f,h=o.max}else if(u>=h&&u>o.max){if(h>o.max)continue;d=(o.max-h)/(u-h)*(d-f)+f,u=o.max}(h!=l||f!=s)&&st.moveTo(o.p2c(h)+i,n.p2c(f)+e),l=u,s=d,st.lineTo(o.p2c(u)+i,n.p2c(d)+e)}}st.stroke()}function e(t,i,e){for(var o=t.points,n=t.pointsize,a=Math.min(Math.max(0,e.min),e.max),r=0,l=!1,s=1,c=0,h=0;;){if(n>0&&r>o.length+n)break;r+=n;var f=o[r-n],u=o[r-n+s],d=o[r],p=o[r+s];if(l){if(n>0&&null!=f&&null==d){h=r,n=-n,s=2;continue}if(0>n&&r==c+n){st.fill(),l=!1,n=-n,s=1,r=c=h+n;continue}}if(null!=f&&null!=d){if(d>=f&&f<i.min){if(d<i.min)continue;u=(i.min-f)/(d-f)*(p-u)+u,f=i.min}else if(f>=d&&d<i.min){if(f<i.min)continue;p=(i.min-f)/(d-f)*(p-u)+u,d=i.min}if(f>=d&&f>i.max){if(d>i.max)continue;u=(i.max-f)/(d-f)*(p-u)+u,f=i.max}else if(d>=f&&d>i.max){if(f>i.max)continue;p=(i.max-f)/(d-f)*(p-u)+u,d=i.max}if(l||(st.beginPath(),st.moveTo(i.p2c(f),e.p2c(a)),l=!0),u>=e.max&&p>=e.max)st.lineTo(i.p2c(f),e.p2c(e.max)),st.lineTo(i.p2c(d),e.p2c(e.max));else if(u<=e.min&&p<=e.min)st.lineTo(i.p2c(f),e.p2c(e.min)),st.lineTo(i.p2c(d),e.p2c(e.min));else{var m=f,x=d;p>=u&&u<e.min&&p>=e.min?(f=(e.min-u)/(p-u)*(d-f)+f,u=e.min):u>=p&&p<e.min&&u>=e.min&&(d=(e.min-u)/(p-u)*(d-f)+f,p=e.min),u>=p&&u>e.max&&p<=e.max?(f=(e.max-u)/(p-u)*(d-f)+f,u=e.max):p>=u&&p>e.max&&u<=e.max&&(d=(e.max-u)/(p-u)*(d-f)+f,p=e.max),f!=m&&st.lineTo(i.p2c(m),e.p2c(u)),st.lineTo(i.p2c(f),e.p2c(u)),st.lineTo(i.p2c(d),e.p2c(p)),d!=x&&(st.lineTo(i.p2c(d),e.p2c(p)),st.lineTo(i.p2c(x),e.p2c(p)))}}}}st.save(),st.translate(ut.left,ut.top),st.lineJoin="round";var o=t.lines.lineWidth,n=t.shadowSize;if(o>0&&n>0){st.lineWidth=n,st.strokeStyle="rgba(0,0,0,0.1)";var a=Math.PI/18;i(t.datapoints,Math.sin(a)*(o/2+n/2),Math.cos(a)*(o/2+n/2),t.xaxis,t.yaxis),st.lineWidth=n/2,i(t.datapoints,Math.sin(a)*(o/2+n/4),Math.cos(a)*(o/2+n/4),t.xaxis,t.yaxis)}st.lineWidth=o,st.strokeStyle=t.color;var r=G(t.lines,t.color,0,pt);r&&(st.fillStyle=r,e(t.datapoints,t.xaxis,t.yaxis)),o>0&&i(t.datapoints,0,0,t.xaxis,t.yaxis),st.restore()}function j(t){function i(t,i,e,o,n,a,r,l){for(var s=t.points,c=t.pointsize,h=0;h<s.length;h+=c){var f=s[h],u=s[h+1];null==f||f<a.min||f>a.max||u<r.min||u>r.max||(st.beginPath(),f=a.p2c(f),u=r.p2c(u)+o,"circle"==l?st.arc(f,u,i,0,n?Math.PI:2*Math.PI,!1):l(st,f,u,i,n),st.closePath(),e&&(st.fillStyle=e,st.fill()),st.stroke())}}st.save(),st.translate(ut.left,ut.top);var e=t.points.lineWidth,o=t.shadowSize,n=t.points.radius,a=t.points.symbol;if(0==e&&(e=1e-4),e>0&&o>0){var r=o/2;st.lineWidth=r,st.strokeStyle="rgba(0,0,0,0.1)",i(t.datapoints,n,null,r+r/2,!0,t.xaxis,t.yaxis,a),st.strokeStyle="rgba(0,0,0,0.2)",i(t.datapoints,n,null,r/2,!0,t.xaxis,t.yaxis,a)}st.lineWidth=e,st.strokeStyle=t.color,i(t.datapoints,n,G(t.points,t.color),0,!1,t.xaxis,t.yaxis,a),st.restore()}function E(t,i,e,o,n,a,r,l,s,c,h){var f,u,d,p,m,x,g,b,v;c?(b=x=g=!0,m=!1,f=e,u=t,p=i+o,d=i+n,f>u&&(v=u,u=f,f=v,m=!0,x=!1)):(m=x=g=!0,b=!1,f=t+o,u=t+n,d=e,p=i,d>p&&(v=p,p=d,d=v,b=!0,g=!1)),u<r.min||f>r.max||p<l.min||d>l.max||(f<r.min&&(f=r.min,m=!1),u>r.max&&(u=r.max,x=!1),d<l.min&&(d=l.min,b=!1),p>l.max&&(p=l.max,g=!1),f=r.p2c(f),d=l.p2c(d),u=r.p2c(u),p=l.p2c(p),a&&(s.fillStyle=a(d,p),s.fillRect(f,p,u-f,d-p)),h>0&&(m||x||g||b)&&(s.beginPath(),s.moveTo(f,d),m?s.lineTo(f,p):s.moveTo(f,p),g?s.lineTo(u,p):s.moveTo(u,p),x?s.lineTo(u,d):s.moveTo(u,d),b?s.lineTo(f,d):s.moveTo(f,d),s.stroke()))}function B(t){function i(i,e,o,n,a,r){for(var l=i.points,s=i.pointsize,c=0;c<l.length;c+=s)null!=l[c]&&E(l[c],l[c+1],l[c+2],e,o,n,a,r,st,t.bars.horizontal,t.bars.lineWidth)}st.save(),st.translate(ut.left,ut.top),st.lineWidth=t.bars.lineWidth,st.strokeStyle=t.color;var e;switch(t.bars.align){case"left":e=0;break;case"right":e=-t.bars.barWidth;break;default:e=-t.bars.barWidth/2}var o=t.bars.fill?function(i,e){return G(t.bars,t.color,i,e)}:null;i(t.datapoints,e,e+t.bars.barWidth,o,t.xaxis,t.yaxis),st.restore()}function G(i,e,o,n){var a=i.fill;if(!a)return null;if(i.fillColor)return et(i.fillColor,o,n,e);var r=t.color.parse(e);return r.a="number"==typeof a?a:.4,r.normalize(),r.toString()}function _(){if(null!=nt.legend.container?t(nt.legend.container).html(""):e.find(".legend").remove(),nt.legend.show){for(var i,o,n=[],a=[],r=!1,l=nt.legend.labelFormatter,s=0;s<ot.length;++s)i=ot[s],i.label&&(o=l?l(i.label,i):i.label,o&&a.push({label:o,color:i.color}));if(nt.legend.sorted)if(t.isFunction(nt.legend.sorted))a.sort(nt.legend.sorted);else if("reverse"==nt.legend.sorted)a.reverse();else{var c="descending"!=nt.legend.sorted;a.sort(function(t,i){return t.label==i.label?0:t.label<i.label!=c?1:-1})}for(var s=0;s<a.length;++s){var h=a[s];s%nt.legend.noColumns==0&&(r&&n.push("</tr>"),n.push("<tr>"),r=!0),n.push('<td class="legendColorBox"><div style="border:1px solid '+nt.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>")}if(r&&n.push("</tr>"),0!=n.length){var f='<table style="font-size:smaller;color:'+nt.grid.color+'">'+n.join("")+"</table>";if(null!=nt.legend.container)t(nt.legend.container).html(f);else{var u="",d=nt.legend.position,p=nt.legend.margin;null==p[0]&&(p=[p,p]),"n"==d.charAt(0)?u+="top:"+(p[1]+ut.top)+"px;":"s"==d.charAt(0)&&(u+="bottom:"+(p[1]+ut.bottom)+"px;"),"e"==d.charAt(1)?u+="right:"+(p[0]+ut.right)+"px;":"w"==d.charAt(1)&&(u+="left:"+(p[0]+ut.left)+"px;");var m=t('<div class="legend">'+f.replace('style="','style="position:absolute;'+u+";")+"</div>").appendTo(e);if(0!=nt.legend.backgroundOpacity){var x=nt.legend.backgroundColor;null==x&&(x=nt.grid.backgroundColor,x=x&&"string"==typeof x?t.color.parse(x):t.color.extract(m,"background-color"),x.a=1,x=x.toString());var g=m.children();t('<div style="position:absolute;width:'+g.width()+"px;height:"+g.height()+"px;"+u+"background-color:"+x+';"> </div>').prependTo(m).css("opacity",nt.legend.backgroundOpacity)}}}}}function V(t,i,e){var o,n,a,r=nt.grid.mouseActiveRadius,l=r*r+1,s=null;for(o=ot.length-1;o>=0;--o)if(e(ot[o])){var c=ot[o],h=c.xaxis,f=c.yaxis,u=c.datapoints.points,d=h.c2p(t),p=f.c2p(i),m=r/h.scale,x=r/f.scale;if(a=c.datapoints.pointsize,h.options.inverseTransform&&(m=Number.MAX_VALUE),f.options.inverseTransform&&(x=Number.MAX_VALUE),c.lines.show||c.points.show)for(n=0;n<u.length;n+=a){var g=u[n],b=f.datamin;if(null!=g&&!(g-d>m||-m>g-d||b-p>x||-x>b-p)){var v=Math.abs(h.p2c(g)-t),k=Math.abs(f.p2c(b)-i),y=v*v+k*k;l>y&&(l=y,s=[o,n/a])}}if(c.bars.show&&!s){var w,M;switch(c.bars.align){case"left":w=0;break;case"right":w=-c.bars.barWidth;break;default:w=-c.bars.barWidth/2}for(M=w+c.bars.barWidth,n=0;n<u.length;n+=a){var g=u[n],b=u[n+1],T=u[n+2];null!=g&&(ot[o].bars.horizontal?d<=Math.max(T,g)&&d>=Math.min(T,g)&&p>=b+w&&b+M>=p:d>=g+w&&g+M>=d&&p>=Math.min(T,b)&&p<=Math.max(T,b))&&(s=[o,n/a])}}}return s?(o=s[0],n=s[1],a=ot[o].datapoints.pointsize,{datapoint:ot[o].datapoints.points.slice(n*a,(n+1)*a),dataIndex:n,series:ot[o],seriesIndex:o}):null}function X(t){nt.grid.hoverable&&Q("plothover",t,function(t){return 0!=t.hoverable})}function Y(t){nt.grid.hoverable&&Q("plothover",t,function(t){return!1})}function q(t){Q("plotclick",t,function(t){return 0!=t.clickable})}function Q(t,i,o){var n=lt.offset(),a=i.pageX-n.left-ut.left,r=i.pageY-n.top-ut.top,l=p({left:a,top:r});l.pageX=i.pageX,l.pageY=i.pageY;var s=V(a,r,o);if(s&&(s.pageX=parseInt(s.series.xaxis.p2c(s.datapoint[0])+n.left+ut.left,10),s.pageY=parseInt(s.series.yaxis.p2c(s.datapoint[1])+n.top+ut.top,10)),nt.grid.autoHighlight){for(var c=0;c<gt.length;++c){var h=gt[c];h.auto!=t||s&&h.series==s.series&&h.point[0]==s.datapoint[0]&&h.point[1]==s.datapoint[1]||K(h.series,h.point)}s&&$(s.series,s.datapoint,t)}e.trigger(t,[l,s])}function U(){var t=nt.interaction.redrawOverlayInterval;return-1==t?void J():void(bt||(bt=setTimeout(J,t)))}function J(){bt=null,ct.save(),rt.clear(),ct.translate(ut.left,ut.top);var t,i;for(t=0;t<gt.length;++t)i=gt[t],i.series.bars.show?it(i.series,i.point):tt(i.series,i.point);ct.restore(),l(mt.drawOverlay,[ct])}function $(t,i,e){if("number"==typeof t&&(t=ot[t]),"number"==typeof i){var o=t.datapoints.pointsize;i=t.datapoints.points.slice(o*i,o*(i+1))}var n=Z(t,i);-1==n?(gt.push({series:t,point:i,auto:e}),U()):e||(gt[n].auto=!1)}function K(t,i){if(null==t&&null==i)return gt=[],void U();if("number"==typeof t&&(t=ot[t]),"number"==typeof i){var e=t.datapoints.pointsize;i=t.datapoints.points.slice(e*i,e*(i+1))}var o=Z(t,i);-1!=o&&(gt.splice(o,1),U())}function Z(t,i){for(var e=0;e<gt.length;++e){var o=gt[e];if(o.series==t&&o.point[0]==i[0]&&o.point[1]==i[1])return e}return-1}function tt(i,e){var o=e[0],n=e[1],a=i.xaxis,r=i.yaxis,l="string"==typeof i.highlightColor?i.highlightColor:t.color.parse(i.color).scale("a",.5).toString();if(!(o<a.min||o>a.max||n<r.min||n>r.max)){var s=i.points.radius+i.points.lineWidth/2;ct.lineWidth=s,ct.strokeStyle=l;var c=1.5*s;o=a.p2c(o),n=r.p2c(n),ct.beginPath(),"circle"==i.points.symbol?ct.arc(o,n,c,0,2*Math.PI,!1):i.points.symbol(ct,o,n,c,!1),ct.closePath(),ct.stroke()}}function it(i,e){var o,n="string"==typeof i.highlightColor?i.highlightColor:t.color.parse(i.color).scale("a",.5).toString(),a=n;switch(i.bars.align){case"left":o=0;break;case"right":o=-i.bars.barWidth;break;default:o=-i.bars.barWidth/2}ct.lineWidth=i.bars.lineWidth,ct.strokeStyle=n,E(e[0],e[1],e[2]||0,o,o+i.bars.barWidth,function(){return a},i.xaxis,i.yaxis,ct,i.bars.horizontal,i.bars.lineWidth)}function et(i,e,o,n){if("string"==typeof i)return i;for(var a=st.createLinearGradient(0,o,0,e),r=0,l=i.colors.length;l>r;++r){var s=i.colors[r];if("string"!=typeof s){var c=t.color.parse(n);null!=s.brightness&&(c=c.scale("rgb",s.brightness)),null!=s.opacity&&(c.a*=s.opacity),s=c.toString()}a.addColorStop(r/(l-1),s)}return a}var ot=[],nt={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,
3
  fill:!0,fillColor:null,align:"left",horizontal:!1,zero:!0},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:{}},at=null,rt=null,lt=null,st=null,ct=null,ht=[],ft=[],ut={left:0,right:0,top:0,bottom:0},dt=0,pt=0,mt={processOptions:[],processRawData:[],processDatapoints:[],processOffset:[],drawBackground:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},xt=this;xt.setData=h,xt.setupGrid=W,xt.draw=P,xt.getPlaceholder=function(){return e},xt.getCanvas=function(){return at.element},xt.getPlotOffset=function(){return ut},xt.width=function(){return dt},xt.height=function(){return pt},xt.offset=function(){var t=lt.offset();return t.left+=ut.left,t.top+=ut.top,t},xt.getData=function(){return ot},xt.getAxes=function(){var i={};return t.each(ht.concat(ft),function(t,e){e&&(i[e.direction+(1!=e.n?e.n:"")+"axis"]=e)}),i},xt.getXAxes=function(){return ht},xt.getYAxes=function(){return ft},xt.c2p=p,xt.p2c=m,xt.getOptions=function(){return nt},xt.highlight=$,xt.unhighlight=K,xt.triggerRedrawOverlay=U,xt.pointOffset=function(t){return{left:parseInt(ht[u(t,"x")-1].p2c(+t.x)+ut.left,10),top:parseInt(ft[u(t,"y")-1].p2c(+t.y)+ut.top,10)}},xt.shutdown=y,xt.destroy=function(){y(),e.removeData("plot").empty(),ot=[],nt=null,at=null,rt=null,lt=null,st=null,ct=null,ht=[],ft=[],mt=null,gt=[],xt=null},xt.resize=function(){var t=e.width(),i=e.height();at.resize(t,i),rt.resize(t,i)},xt.hooks=mt,s(xt),c(a),v(),h(n),W(),P(),k();var gt=[],bt=null}function o(t,i){return i*Math.floor(t/i)}var n=Object.prototype.hasOwnProperty;t.fn.detach||(t.fn.detach=function(){return this.each(function(){this.parentNode&&this.parentNode.removeChild(this)})}),i.prototype.resize=function(t,i){if(0>=t||0>=i)throw new Error("Invalid dimensions for plot, width = "+t+", height = "+i);var e=this.element,o=this.context,n=this.pixelRatio;this.width!=t&&(e.width=t*n,e.style.width=t+"px",this.width=t),this.height!=i&&(e.height=i*n,e.style.height=i+"px",this.height=i),o.restore(),o.save(),o.scale(n,n)},i.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},i.prototype.render=function(){var t=this._textCache;for(var i in t)if(n.call(t,i)){var e=this.getTextLayer(i),o=t[i];e.hide();for(var a in o)if(n.call(o,a)){var r=o[a];for(var l in r)if(n.call(r,l)){for(var s,c=r[l].positions,h=0;s=c[h];h++)s.active?s.rendered||(e.append(s.element),s.rendered=!0):(c.splice(h--,1),s.rendered&&s.element.detach());0==c.length&&delete r[l]}}e.show()}},i.prototype.getTextLayer=function(i){var e=this.text[i];return null==e&&(null==this.textContainer&&(this.textContainer=t("<div class='flot-text'></div>").css({position:"absolute",top:0,left:0,bottom:0,right:0,"font-size":"smaller",color:"#545454"}).insertAfter(this.element)),e=this.text[i]=t("<div></div>").addClass(i).css({position:"absolute",top:0,left:0,bottom:0,right:0}).appendTo(this.textContainer)),e},i.prototype.getTextInfo=function(i,e,o,n,a){var r,l,s,c;if(e=""+e,r="object"==typeof o?o.style+" "+o.variant+" "+o.weight+" "+o.size+"px/"+o.lineHeight+"px "+o.family:o,l=this._textCache[i],null==l&&(l=this._textCache[i]={}),s=l[r],null==s&&(s=l[r]={}),c=s[e],null==c){var h=t("<div></div>").html(e).css({position:"absolute","max-width":a,top:-9999}).appendTo(this.getTextLayer(i));"object"==typeof o?h.css({font:r,color:o.color}):"string"==typeof o&&h.addClass(o),c=s[e]={width:h.outerWidth(!0),height:h.outerHeight(!0),element:h,positions:[]},h.detach()}return c},i.prototype.addText=function(t,i,e,o,n,a,r,l,s){var c=this.getTextInfo(t,o,n,a,r),h=c.positions;"center"==l?i-=c.width/2:"right"==l&&(i-=c.width),"middle"==s?e-=c.height/2:"bottom"==s&&(e-=c.height);for(var f,u=0;f=h[u];u++)if(f.x==i&&f.y==e)return void(f.active=!0);f={active:!0,rendered:!1,element:h.length?c.element.clone():c.element,x:i,y:e},h.push(f),f.element.css({top:Math.round(e),left:Math.round(i),"text-align":l})},i.prototype.removeText=function(t,i,e,o,a,r){if(null==o){var l=this._textCache[t];if(null!=l)for(var s in l)if(n.call(l,s)){var c=l[s];for(var h in c)if(n.call(c,h))for(var f,u=c[h].positions,d=0;f=u[d];d++)f.active=!1}}else for(var f,u=this.getTextInfo(t,o,a,r).positions,d=0;f=u[d];d++)f.x==i&&f.y==e&&(f.active=!1)},t.plot=function(i,o,n){var a=new e(t(i),o,n,t.plot.plugins);return a},t.plot.version="0.8.3",t.plot.plugins=[],t.fn.plot=function(i,e){return this.each(function(){t.plot(this,i,e)})}}(jQuery);
4
+ $.plot.version = "lara-0.8.3";
5
+ $.plot.plugins = [];
6
  //axisLabels 2.0
7
  !function(t){function i(){return!!document.createElement("canvas").getContext}function e(){if(!i())return!1;var t=document.createElement("canvas"),e=t.getContext("2d");return"function"==typeof e.fillText}function s(){var t=document.createElement("div");return"undefined"!=typeof t.style.MozTransition||"undefined"!=typeof t.style.OTransition||"undefined"!=typeof t.style.webkitTransition||"undefined"!=typeof t.style.transition}function o(t,i,e,s,o){this.axisName=t,this.position=i,this.padding=e,this.plot=s,this.opts=o,this.width=0,this.height=0}function a(t,i,e,s,a){o.prototype.constructor.call(this,t,i,e,s,a)}function l(t,i,e,s,a){o.prototype.constructor.call(this,t,i,e,s,a),this.elem=null}function h(t,i,e,s,o){l.prototype.constructor.call(this,t,i,e,s,o)}function n(t,i,e,s,o){h.prototype.constructor.call(this,t,i,e,s,o),this.requiresResize=!1}function r(i){i.hooks.processOptions.push(function(i,o){if(o.axisLabels.show){var r=!1,p={},d=2;i.hooks.draw.push(function(i,o){var f=!1;r?(r=!1,t.each(i.getAxes(),function(t,e){var s=e.options||i.getOptions()[t];s&&s.axisLabel&&e.show&&p[t].draw(e.box)})):(t.each(i.getAxes(),function(t,o){var r=o.options||i.getOptions()[t];if(t in p&&(o.labelHeight=o.labelHeight-p[t].height,o.labelWidth=o.labelWidth-p[t].width,r.labelHeight=o.labelHeight,r.labelWidth=o.labelWidth,p[t].cleanup(),delete p[t]),r&&r.axisLabel&&o.show){f=!0;var c=null;if(r.axisLabelUseHtml||"Microsoft Internet Explorer"!=navigator.appName)c=r.axisLabelUseHtml||!s()&&!e()&&!r.axisLabelUseCanvas?l:r.axisLabelUseCanvas||!s()?a:h;else{var b=navigator.userAgent,x=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");null!=x.exec(b)&&(rv=parseFloat(RegExp.$1)),c=rv>=9&&!r.axisLabelUseCanvas&&!r.axisLabelUseHtml?h:r.axisLabelUseCanvas||r.axisLabelUseHtml?r.axisLabelUseCanvas?a:l:n}var g=void 0===r.axisLabelPadding?d:r.axisLabelPadding;p[t]=new c(t,o.position,g,i,r),p[t].calculateSize(),r.labelHeight=o.labelHeight+p[t].height,r.labelWidth=o.labelWidth+p[t].width}}),f&&(r=!0,i.setupGrid(),i.draw()))})}})}var p={axisLabels:{show:!0}};o.prototype.cleanup=function(){},a.prototype=new o,a.prototype.constructor=a,a.prototype.calculateSize=function(){this.opts.axisLabelFontSizePixels||(this.opts.axisLabelFontSizePixels=14),this.opts.axisLabelFontFamily||(this.opts.axisLabelFontFamily="sans-serif");this.opts.axisLabelFontSizePixels+this.padding,this.opts.axisLabelFontSizePixels+this.padding;"left"==this.position||"right"==this.position?(this.width=this.opts.axisLabelFontSizePixels+this.padding,this.height=0):(this.width=0,this.height=this.opts.axisLabelFontSizePixels+this.padding)},a.prototype.draw=function(t){this.opts.axisLabelColour||(this.opts.axisLabelColour="black");var i=this.plot.getCanvas().getContext("2d");i.save(),i.font=this.opts.axisLabelFontSizePixels+"px "+this.opts.axisLabelFontFamily,i.fillStyle=this.opts.axisLabelColour;var e,s,o=i.measureText(this.opts.axisLabel).width,a=this.opts.axisLabelFontSizePixels,l=0;"top"==this.position?(e=t.left+t.width/2-o/2,s=t.top+.72*a):"bottom"==this.position?(e=t.left+t.width/2-o/2,s=t.top+t.height-.72*a):"left"==this.position?(e=t.left+.72*a,s=t.height/2+t.top+o/2,l=-Math.PI/2):"right"==this.position&&(e=t.left+t.width-.72*a,s=t.height/2+t.top-o/2,l=Math.PI/2),i.translate(e,s),i.rotate(l),i.fillText(this.opts.axisLabel,0,0),i.restore()},l.prototype=new o,l.prototype.constructor=l,l.prototype.calculateSize=function(){var i=t('<div class="axisLabels" style="position:absolute;">'+this.opts.axisLabel+"</div>");this.plot.getPlaceholder().append(i),this.labelWidth=i.outerWidth(!0),this.labelHeight=i.outerHeight(!0),i.remove(),this.width=this.height=0,"left"==this.position||"right"==this.position?this.width=this.labelWidth+this.padding:this.height=this.labelHeight+this.padding},l.prototype.cleanup=function(){this.elem&&this.elem.remove()},l.prototype.draw=function(i){this.plot.getPlaceholder().find("#"+this.axisName+"Label").remove(),this.elem=t('<div id="'+this.axisName+'Label" " class="axisLabels" style="position:absolute;">'+this.opts.axisLabel+"</div>"),this.plot.getPlaceholder().append(this.elem),"top"==this.position?(this.elem.css("left",i.left+i.width/2-this.labelWidth/2+"px"),this.elem.css("top",i.top+"px")):"bottom"==this.position?(this.elem.css("left",i.left+i.width/2-this.labelWidth/2+"px"),this.elem.css("top",i.top+i.height-this.labelHeight+"px")):"left"==this.position?(this.elem.css("top",i.top+i.height/2-this.labelHeight/2+"px"),this.elem.css("left",i.left+"px")):"right"==this.position&&(this.elem.css("top",i.top+i.height/2-this.labelHeight/2+"px"),this.elem.css("left",i.left+i.width-this.labelWidth+"px"))},h.prototype=new l,h.prototype.constructor=h,h.prototype.calculateSize=function(){l.prototype.calculateSize.call(this),this.width=this.height=0,"left"==this.position||"right"==this.position?this.width=this.labelHeight+this.padding:this.height=this.labelHeight+this.padding},h.prototype.transforms=function(t,i,e){var s={"-moz-transform":"","-webkit-transform":"","-o-transform":"","-ms-transform":""};if(0!=i||0!=e){var o=" translate("+i+"px, "+e+"px)";s["-moz-transform"]+=o,s["-webkit-transform"]+=o,s["-o-transform"]+=o,s["-ms-transform"]+=o}if(0!=t){var a=" rotate("+t+"deg)";s["-moz-transform"]+=a,s["-webkit-transform"]+=a,s["-o-transform"]+=a,s["-ms-transform"]+=a}var l="top: 0; left: 0; ";for(var h in s)s[h]&&(l+=h+":"+s[h]+";");return l+=";"},h.prototype.calculateOffsets=function(t){var i={x:0,y:0,degrees:0};return"bottom"==this.position?(i.x=t.left+t.width/2-this.labelWidth/2,i.y=t.top+t.height-this.labelHeight):"top"==this.position?(i.x=t.left+t.width/2-this.labelWidth/2,i.y=t.top):"left"==this.position?(i.degrees=-90,i.x=t.left-this.labelWidth/2+this.labelHeight/2,i.y=t.height/2+t.top):"right"==this.position&&(i.degrees=90,i.x=t.left+t.width-this.labelWidth/2-this.labelHeight/2,i.y=t.height/2+t.top),i.x=Math.round(i.x),i.y=Math.round(i.y),i},h.prototype.draw=function(i){this.plot.getPlaceholder().find("."+this.axisName+"Label").remove();var e=this.calculateOffsets(i);this.elem=t('<div class="axisLabels '+this.axisName+'Label" style="position:absolute; '+this.transforms(e.degrees,e.x,e.y)+'">'+this.opts.axisLabel+"</div>"),this.plot.getPlaceholder().append(this.elem)},n.prototype=new h,n.prototype.constructor=n,n.prototype.transforms=function(t,i,e){var s="";if(0!=t){for(var o=t/90;0>o;)o+=4;s+=" filter: progid:DXImageTransform.Microsoft.BasicImage(rotation="+o+"); ",this.requiresResize="right"==this.position}return 0!=i&&(s+="left: "+i+"px; "),0!=e&&(s+="top: "+e+"px; "),s},n.prototype.calculateOffsets=function(t){var i=h.prototype.calculateOffsets.call(this,t);return"top"==this.position?i.y=t.top+1:"left"==this.position?(i.x=t.left,i.y=t.height/2+t.top-this.labelWidth/2):"right"==this.position&&(i.x=t.left+t.width-this.labelHeight,i.y=t.height/2+t.top-this.labelWidth/2),i},n.prototype.draw=function(t){h.prototype.draw.call(this,t),this.requiresResize&&(this.elem=this.plot.getPlaceholder().find("."+this.axisName+"Label"),this.elem.css("width",this.labelWidth),this.elem.css("height",this.labelHeight))},t.plot.plugins.push({init:r,options:p,name:"axisLabels",version:"2.0"})}(jQuery);
8
  //improved orderBars 0.2 - github.com/emmerich
13
  (function($){var options={xaxis:{timezone:null,timeformat:null,twelveHourClock:false,monthNames:null}};function floorInBase(n,base){return base*Math.floor(n/base)}function formatDate(d,fmt,monthNames,dayNames){if(typeof d.strftime=="function"){return d.strftime(fmt)}var leftPad=function(n,pad){n=""+n;pad=""+(pad==null?"0":pad);return n.length==1?pad+n:n};var r=[];var escape=false;var hours=d.getHours();var isAM=hours<12;if(monthNames==null){monthNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}if(dayNames==null){dayNames=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]}var hours12;if(hours>12){hours12=hours-12}else if(hours==0){hours12=12}else{hours12=hours}for(var i=0;i<fmt.length;++i){var c=fmt.charAt(i);if(escape){switch(c){case"a":c=""+dayNames[d.getDay()];break;case"b":c=""+monthNames[d.getMonth()];break;case"d":c=leftPad(d.getDate());break;case"e":c=leftPad(d.getDate()," ");break;case"h":case"H":c=leftPad(hours);break;case"I":c=leftPad(hours12);break;case"l":c=leftPad(hours12," ");break;case"m":c=leftPad(d.getMonth()+1);break;case"M":c=leftPad(d.getMinutes());break;case"q":c=""+(Math.floor(d.getMonth()/3)+1);break;case"S":c=leftPad(d.getSeconds());break;case"y":c=leftPad(d.getFullYear()%100);break;case"Y":c=""+d.getFullYear();break;case"p":c=isAM?""+"am":""+"pm";break;case"P":c=isAM?""+"AM":""+"PM";break;case"w":c=""+d.getDay();break}r.push(c);escape=false}else{if(c=="%"){escape=true}else{r.push(c)}}}return r.join("")}function makeUtcWrapper(d){function addProxyMethod(sourceObj,sourceMethod,targetObj,targetMethod){sourceObj[sourceMethod]=function(){return targetObj[targetMethod].apply(targetObj,arguments)}}var utc={date:d};if(d.strftime!=undefined){addProxyMethod(utc,"strftime",d,"strftime")}addProxyMethod(utc,"getTime",d,"getTime");addProxyMethod(utc,"setTime",d,"setTime");var props=["Date","Day","FullYear","Hours","Milliseconds","Minutes","Month","Seconds"];for(var p=0;p<props.length;p++){addProxyMethod(utc,"get"+props[p],d,"getUTC"+props[p]);addProxyMethod(utc,"set"+props[p],d,"setUTC"+props[p])}return utc}function dateGenerator(ts,opts){if(opts.timezone=="browser"){return new Date(ts)}else if(!opts.timezone||opts.timezone=="utc"){return makeUtcWrapper(new Date(ts))}else if(typeof timezoneJS!="undefined"&&typeof timezoneJS.Date!="undefined"){var d=new timezoneJS.Date;d.setTimezone(opts.timezone);d.setTime(ts);return d}else{return makeUtcWrapper(new Date(ts))}}var timeUnitSize={second:1e3,minute:60*1e3,hour:60*60*1e3,day:24*60*60*1e3,month:30*24*60*60*1e3,quarter:3*30*24*60*60*1e3,year:365.2425*24*60*60*1e3};var baseSpec=[[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"]];var specMonths=baseSpec.concat([[3,"month"],[6,"month"],[1,"year"]]);var specQuarters=baseSpec.concat([[1,"quarter"],[2,"quarter"],[1,"year"]]);function init(plot){plot.hooks.processOptions.push(function(plot,options){$.each(plot.getAxes(),function(axisName,axis){var opts=axis.options;if(opts.mode=="time"){axis.tickGenerator=function(axis){var ticks=[];var d=dateGenerator(axis.min,opts);var minSize=0;var spec=opts.tickSize&&opts.tickSize[1]==="quarter"||opts.minTickSize&&opts.minTickSize[1]==="quarter"?specQuarters:specMonths;if(opts.minTickSize!=null){if(typeof opts.tickSize=="number"){minSize=opts.tickSize}else{minSize=opts.minTickSize[0]*timeUnitSize[opts.minTickSize[1]]}}for(var i=0;i<spec.length-1;++i){if(axis.delta<(spec[i][0]*timeUnitSize[spec[i][1]]+spec[i+1][0]*timeUnitSize[spec[i+1][1]])/2&&spec[i][0]*timeUnitSize[spec[i][1]]>=minSize){break}}var size=spec[i][0];var unit=spec[i][1];if(unit=="year"){if(opts.minTickSize!=null&&opts.minTickSize[1]=="year"){size=Math.floor(opts.minTickSize[0])}else{var magn=Math.pow(10,Math.floor(Math.log(axis.delta/timeUnitSize.year)/Math.LN10));var norm=axis.delta/timeUnitSize.year/magn;if(norm<1.5){size=1}else if(norm<3){size=2}else if(norm<7.5){size=5}else{size=10}size*=magn}if(size<1){size=1}}axis.tickSize=opts.tickSize||[size,unit];var tickSize=axis.tickSize[0];unit=axis.tickSize[1];var step=tickSize*timeUnitSize[unit];if(unit=="second"){d.setSeconds(floorInBase(d.getSeconds(),tickSize))}else if(unit=="minute"){d.setMinutes(floorInBase(d.getMinutes(),tickSize))}else if(unit=="hour"){d.setHours(floorInBase(d.getHours(),tickSize))}else if(unit=="month"){d.setMonth(floorInBase(d.getMonth(),tickSize))}else if(unit=="quarter"){d.setMonth(3*floorInBase(d.getMonth()/3,tickSize))}else if(unit=="year"){d.setFullYear(floorInBase(d.getFullYear(),tickSize))}d.setMilliseconds(0);if(step>=timeUnitSize.minute){d.setSeconds(0)}if(step>=timeUnitSize.hour){d.setMinutes(0)}if(step>=timeUnitSize.day){d.setHours(0)}if(step>=timeUnitSize.day*4){d.setDate(1)}if(step>=timeUnitSize.month*2){d.setMonth(floorInBase(d.getMonth(),3))}if(step>=timeUnitSize.quarter*2){d.setMonth(floorInBase(d.getMonth(),6))}if(step>=timeUnitSize.year){d.setMonth(0)}var carry=0;var v=Number.NaN;var prev;do{prev=v;v=d.getTime();ticks.push(v);if(unit=="month"||unit=="quarter"){if(tickSize<1){d.setDate(1);var start=d.getTime();d.setMonth(d.getMonth()+(unit=="quarter"?3:1));var end=d.getTime();d.setTime(v+carry*timeUnitSize.hour+(end-start)*tickSize);carry=d.getHours();d.setHours(0)}else{d.setMonth(d.getMonth()+tickSize*(unit=="quarter"?3:1))}}else if(unit=="year"){d.setFullYear(d.getFullYear()+tickSize)}else{d.setTime(v+step)}}while(v<axis.max&&v!=prev);return ticks};axis.tickFormatter=function(v,axis){var d=dateGenerator(v,axis.options);if(opts.timeformat!=null){return formatDate(d,opts.timeformat,opts.monthNames,opts.dayNames)}var useQuarters=axis.options.tickSize&&axis.options.tickSize[1]=="quarter"||axis.options.minTickSize&&axis.options.minTickSize[1]=="quarter";var t=axis.tickSize[0]*timeUnitSize[axis.tickSize[1]];var span=axis.max-axis.min;var suffix=opts.twelveHourClock?" %p":"";var hourCode=opts.twelveHourClock?"%I":"%H";var fmt;if(t<timeUnitSize.minute){fmt=hourCode+":%M:%S"+suffix}else if(t<timeUnitSize.day){if(span<2*timeUnitSize.day){fmt=hourCode+":%M"+suffix}else{fmt="%b %d "+hourCode+":%M"+suffix}}else if(t<timeUnitSize.month){fmt="%b %d"}else if(useQuarters&&t<timeUnitSize.quarter||!useQuarters&&t<timeUnitSize.year){if(span<timeUnitSize.year){fmt="%b"}else{fmt="%b %Y"}}else if(useQuarters&&t<timeUnitSize.year){if(span<timeUnitSize.year){fmt="Q%q"}else{fmt="Q%q %Y"}}else{fmt="%Y"}var rt=formatDate(d,fmt,opts.monthNames,opts.dayNames);return rt}}})})}$.plot.plugins.push({init:init,options:options,name:"time",version:"1.0"});$.plot.formatDate=formatDate})(jQuery);
14
  //resize",version:"1.0"
15
  (function($,e,t){"$:nomunge";var i=[],n=$.resize=$.extend($.resize,{}),a,r=false,s="setTimeout",u="resize",m=u+"-special-event",o="pendingDelay",l="activeDelay",f="throttleWindow";n[o]=200;n[l]=20;n[f]=true;$.event.special[u]={setup:function(){if(!n[f]&&this[s]){return false}var e=$(this);i.push(this);e.data(m,{w:e.width(),h:e.height()});if(i.length===1){a=t;h()}},teardown:function(){if(!n[f]&&this[s]){return false}var e=$(this);for(var t=i.length-1;t>=0;t--){if(i[t]==this){i.splice(t,1);break}}e.removeData(m);if(!i.length){if(r){cancelAnimationFrame(a)}else{clearTimeout(a)}a=null}},add:function(e){if(!n[f]&&this[s]){return false}var i;function a(e,n,a){var r=$(this),s=r.data(m)||{};s.w=n!==t?n:r.width();s.h=a!==t?a:r.height();i.apply(this,arguments)}if($.isFunction(e)){i=e;return a}else{i=e.handler;e.handler=a}}};function h(t){if(r===true){r=t||1}for(var s=i.length-1;s>=0;s--){var l=$(i[s]);if(l[0]==e||l.is(":visible")){var f=l.width(),c=l.height(),d=l.data(m);if(d&&(f!==d.w||c!==d.h)){l.trigger(u,[d.w=f,d.h=c]);r=t||true}}else{d=l.data(m);d.w=0;d.h=0}}if(a!==null){if(r&&(t==null||t-r<1e3)){a=e.requestAnimationFrame(h)}else{a=setTimeout(h,n[o]);r=false}}}if(!e.requestAnimationFrame){e.requestAnimationFrame=function(){return e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t,i){return e.setTimeout(function(){t((new Date).getTime())},n[l])}}()}if(!e.cancelAnimationFrame){e.cancelAnimationFrame=function(){return e.webkitCancelRequestAnimationFrame||e.mozCancelRequestAnimationFrame||e.oCancelRequestAnimationFrame||e.msCancelRequestAnimationFrame||clearTimeout}()}})(jQuery,this);(function($){var options={};function init(plot){function onResize(){var placeholder=plot.getPlaceholder();if(placeholder.width()==0||placeholder.height()==0)return;plot.resize();plot.setupGrid();plot.draw()}function bindEvents(plot,eventHolder){plot.getPlaceholder().resize(onResize)}function shutdown(plot,eventHolder){plot.getPlaceholder().unbind("resize",onResize)}plot.hooks.bindEvents.push(bindEvents);plot.hooks.shutdown.push(shutdown)}$.plot.plugins.push({init:init,options:options,name:"resize",version:"1.0"})})(jQuery);
16
+ //custom version
17
+ var laraFlotv083 = $.plot;
dist/plugins/minicolors/jquery.minicolors.css ADDED
@@ -0,0 +1,319 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .minicolors {
2
+ position: relative;
3
+ }
4
+
5
+ .minicolors-sprite {
6
+ background-image: url(../plugins/minicolors/jquery.minicolors.png);
7
+ }
8
+
9
+ .minicolors-swatch {
10
+ position: absolute;
11
+ vertical-align: middle;
12
+ background-position: -80px 0;
13
+ border: solid 1px #ccc;
14
+ cursor: text;
15
+ padding: 0;
16
+ margin: 0;
17
+ display: inline-block;
18
+ }
19
+
20
+ .minicolors-swatch-color {
21
+ position: absolute;
22
+ top: 0;
23
+ left: 0;
24
+ right: 0;
25
+ bottom: 0;
26
+ }
27
+
28
+ .minicolors input[type=hidden] + .minicolors-swatch {
29
+ width: 28px;
30
+ position: static;
31
+ cursor: pointer;
32
+ }
33
+
34
+ .minicolors input[type=hidden][disabled] + .minicolors-swatch {
35
+ cursor: default;
36
+ }
37
+
38
+ /* Panel */
39
+ .minicolors-panel {
40
+ position: absolute;
41
+ width: 173px;
42
+ background: white;
43
+ border: solid 1px #CCC;
44
+ box-shadow: 0 0 20px rgba(0, 0, 0, .2);
45
+ z-index: 99999;
46
+ box-sizing: content-box;
47
+ display: none;
48
+ }
49
+
50
+ .minicolors-panel.minicolors-visible {
51
+ display: block;
52
+ }
53
+
54
+ /* Panel positioning */
55
+ .minicolors-position-top .minicolors-panel {
56
+ top: -154px;
57
+ }
58
+
59
+ .minicolors-position-right .minicolors-panel {
60
+ right: 0;
61
+ }
62
+
63
+ .minicolors-position-bottom .minicolors-panel {
64
+ top: auto;
65
+ }
66
+
67
+ .minicolors-position-left .minicolors-panel {
68
+ left: 0;
69
+ }
70
+
71
+ .minicolors-with-opacity .minicolors-panel {
72
+ width: 194px;
73
+ }
74
+
75
+ .minicolors .minicolors-grid {
76
+ position: relative;
77
+ top: 1px;
78
+ left: 1px;
79
+ width: 150px;
80
+ height: 150px;
81
+ background-position: -120px 0;
82
+ cursor: crosshair;
83
+ }
84
+
85
+ .minicolors .minicolors-grid-inner {
86
+ position: absolute;
87
+ top: 0;
88
+ left: 0;
89
+ width: 150px;
90
+ height: 150px;
91
+ }
92
+
93
+ .minicolors-slider-saturation .minicolors-grid {
94
+ background-position: -420px 0;
95
+ }
96
+
97
+ .minicolors-slider-saturation .minicolors-grid-inner {
98
+ background-position: -270px 0;
99
+ background-image: inherit;
100
+ }
101
+
102
+ .minicolors-slider-brightness .minicolors-grid {
103
+ background-position: -570px 0;
104
+ }
105
+
106
+ .minicolors-slider-brightness .minicolors-grid-inner {
107
+ background-color: black;
108
+ }
109
+
110
+ .minicolors-slider-wheel .minicolors-grid {
111
+ background-position: -720px 0;
112
+ }
113
+
114
+ .minicolors-slider,
115
+ .minicolors-opacity-slider {
116
+ position: absolute;
117
+ top: 1px;
118
+ left: 152px;
119
+ width: 20px;
120
+ height: 150px;
121
+ background-color: white;
122
+ background-position: 0 0;
123
+ cursor: row-resize;
124
+ }
125
+
126
+ .minicolors-slider-saturation .minicolors-slider {
127
+ background-position: -60px 0;
128
+ }
129
+
130
+ .minicolors-slider-brightness .minicolors-slider {
131
+ background-position: -20px 0;
132
+ }
133
+
134
+ .minicolors-slider-wheel .minicolors-slider {
135
+ background-position: -20px 0;
136
+ }
137
+
138
+ .minicolors-opacity-slider {
139
+ left: 173px;
140
+ background-position: -40px 0;
141
+ display: none;
142
+ }
143
+
144
+ .minicolors-with-opacity .minicolors-opacity-slider {
145
+ display: block;
146
+ }
147
+
148
+ /* Pickers */
149
+ .minicolors-grid .minicolors-picker {
150
+ position: absolute;
151
+ top: 70px;
152
+ left: 70px;
153
+ width: 12px;
154
+ height: 12px;
155
+ border: solid 1px black;
156
+ border-radius: 10px;
157
+ margin-top: -6px;
158
+ margin-left: -6px;
159
+ background: none;
160
+ }
161
+
162
+ .minicolors-grid .minicolors-picker > div {
163
+ position: absolute;
164
+ top: 0;
165
+ left: 0;
166
+ width: 8px;
167
+ height: 8px;
168
+ border-radius: 8px;
169
+ border: solid 2px white;
170
+ box-sizing: content-box;
171
+ }
172
+
173
+ .minicolors-picker {
174
+ position: absolute;
175
+ top: 0;
176
+ left: 0;
177
+ width: 18px;
178
+ height: 2px;
179
+ background: white;
180
+ border: solid 1px black;
181
+ margin-top: -2px;
182
+ box-sizing: content-box;
183
+ }
184
+
185
+ /* Swatches */
186
+ .minicolors-swatches,
187
+ .minicolors-swatches li {
188
+ margin: 5px 0 3px 5px;
189
+ padding: 0;
190
+ list-style: none;
191
+ overflow: hidden;
192
+ }
193
+
194
+ .minicolors-swatches .minicolors-swatch {
195
+ position: relative;
196
+ float: left;
197
+ cursor: pointer;
198
+ margin:0 4px 0 0;
199
+ }
200
+
201
+ .minicolors-with-opacity .minicolors-swatches .minicolors-swatch {
202
+ margin-right: 7px;
203
+ }
204
+
205
+ .minicolors-swatch.selected {
206
+ border-color: #000;
207
+ }
208
+
209
+ /* Inline controls */
210
+ .minicolors-inline {
211
+ display: inline-block;
212
+ }
213
+
214
+ .minicolors-inline .minicolors-input {
215
+ display: none !important;
216
+ }
217
+
218
+ .minicolors-inline .minicolors-panel {
219
+ position: relative;
220
+ top: auto;
221
+ left: auto;
222
+ box-shadow: none;
223
+ z-index: auto;
224
+ display: inline-block;
225
+ }
226
+
227
+ /* Default theme */
228
+ .minicolors-theme-default .minicolors-swatch {
229
+ top: 5px;
230
+ left: 5px;
231
+ width: 18px;
232
+ height: 18px;
233
+ }
234
+ .minicolors-theme-default .minicolors-swatches .minicolors-swatch {
235
+ margin-bottom: 2px;
236
+ top: 0;
237
+ left: 0;
238
+ width: 18px;
239
+ height: 18px;
240
+ }
241
+ .minicolors-theme-default.minicolors-position-right .minicolors-swatch {
242
+ left: auto;
243
+ right: 5px;
244
+ }
245
+ .minicolors-theme-default.minicolors {
246
+ width: auto;
247
+ display: inline-block;
248
+ }
249
+ .minicolors-theme-default .minicolors-input {
250
+ height: 20px;
251
+ width: auto;
252
+ display: inline-block;
253
+ padding-left: 26px;
254
+ }
255
+ .minicolors-theme-default.minicolors-position-right .minicolors-input {
256
+ padding-right: 26px;
257
+ padding-left: inherit;
258
+ }
259
+
260
+ /* Bootstrap theme */
261
+ .minicolors-theme-bootstrap .minicolors-swatch {
262
+ z-index: 2;
263
+ top: 3px;
264
+ left: 3px;
265
+ width: 28px;
266
+ height: 28px;
267
+ border-radius: 3px;
268
+ }
269
+ .minicolors-theme-bootstrap .minicolors-swatches .minicolors-swatch {
270
+ margin-bottom: 2px;
271
+ top: 0;
272
+ left: 0;
273
+ width: 20px;
274
+ height: 20px;
275
+ }
276
+ .minicolors-theme-bootstrap .minicolors-swatch-color {
277
+ border-radius: inherit;
278
+ }
279
+ .minicolors-theme-bootstrap.minicolors-position-right > .minicolors-swatch {
280
+ left: auto;
281
+ right: 3px;
282
+ }
283
+ .minicolors-theme-bootstrap .minicolors-input {
284
+ float: none;
285
+ padding-left: 44px;
286
+ }
287
+ .minicolors-theme-bootstrap.minicolors-position-right .minicolors-input {
288
+ padding-right: 44px;
289
+ padding-left: 12px;
290
+ }
291
+ .minicolors-theme-bootstrap .minicolors-input.input-lg + .minicolors-swatch {
292
+ top: 4px;
293
+ left: 4px;
294
+ width: 37px;
295
+ height: 37px;
296
+ border-radius: 5px;
297
+ }
298
+ .minicolors-theme-bootstrap .minicolors-input.input-sm + .minicolors-swatch {
299
+ width: 24px;
300
+ height: 24px;
301
+ }
302
+ .minicolors-theme-bootstrap .minicolors-input.input-xs + .minicolors-swatch {
303
+ width: 18px;
304
+ height: 18px;
305
+ }
306
+ .input-group .minicolors-theme-bootstrap:not(:first-child) .minicolors-input {
307
+ border-top-left-radius: 0;
308
+ border-bottom-left-radius: 0;
309
+ }
310
+
311
+ /* Semantic Ui theme */
312
+ .minicolors-theme-semanticui .minicolors-swatch {
313
+ top: 0;
314
+ left: 0;
315
+ padding: 18px;
316
+ }
317
+ .minicolors-theme-semanticui input {
318
+ text-indent: 30px;
319
+ }
dist/plugins/minicolors/jquery.minicolors.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ // jQuery MiniColors v2.2.6 : A tiny color picker built on jQuery - Developed by Cory LaViska for A Beautiful Site, LLC
2
+ !function(i){"function"==typeof define&&define.amd?define(["jquery"],i):"object"==typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";function t(t,o){var s,a,n,e,r,l=i('<div class="minicolors" />'),h=i.minicolors.defaults;if(!t.data("minicolors-initialized")){if(o=i.extend(!0,{},h,o),l.addClass("minicolors-theme-"+o.theme).toggleClass("minicolors-with-opacity",o.opacity),void 0!==o.position&&i.each(o.position.split(" "),function(){l.addClass("minicolors-position-"+this)}),s="rgb"===o.format?o.opacity?"25":"20":o.keywords?"11":"7",t.addClass("minicolors-input").data("minicolors-initialized",!1).data("minicolors-settings",o).prop("size",s).wrap(l).after('<div class="minicolors-panel minicolors-slider-'+o.control+'"><div class="minicolors-slider minicolors-sprite"><div class="minicolors-picker"></div></div><div class="minicolors-opacity-slider minicolors-sprite"><div class="minicolors-picker"></div></div><div class="minicolors-grid minicolors-sprite"><div class="minicolors-grid-inner"></div><div class="minicolors-picker"><div></div></div></div></div>'),o.inline||(t.after('<span class="minicolors-swatch minicolors-sprite minicolors-input-swatch"><span class="minicolors-swatch-color"></span></span>'),t.next(".minicolors-input-swatch").on("click",function(i){i.preventDefault(),t.focus()})),e=t.parent().find(".minicolors-panel"),e.on("selectstart",function(){return!1}).end(),o.swatches&&0!==o.swatches.length)for(e.addClass("minicolors-with-swatches"),a=i('<ul class="minicolors-swatches"></ul>').appendTo(e),r=0;r<o.swatches.length;++r)n=o.swatches[r],n=v(n)?g(n,!0):I(u(n,!0)),i('<li class="minicolors-swatch minicolors-sprite"><span class="minicolors-swatch-color"></span></li>').appendTo(a).data("swatch-color",o.swatches[r]).find(".minicolors-swatch-color").css({backgroundColor:C(n),opacity:n.a}),o.swatches[r]=n;o.inline&&t.parent().addClass("minicolors-inline"),c(t,!1),t.data("minicolors-initialized",!0)}}function o(i){var t=i.parent();i.removeData("minicolors-initialized").removeData("minicolors-settings").removeProp("size").removeClass("minicolors-input"),t.before(i).remove()}function s(i){var t=i.parent(),o=t.find(".minicolors-panel"),s=i.data("minicolors-settings");!i.data("minicolors-initialized")||i.prop("disabled")||t.hasClass("minicolors-inline")||t.hasClass("minicolors-focus")||(a(),t.addClass("minicolors-focus"),o.stop(!0,!0).fadeIn(s.showSpeed,function(){s.show&&s.show.call(i.get(0))}))}function a(){i(".minicolors-focus").each(function(){var t=i(this),o=t.find(".minicolors-input"),s=t.find(".minicolors-panel"),a=o.data("minicolors-settings");s.fadeOut(a.hideSpeed,function(){a.hide&&a.hide.call(o.get(0)),t.removeClass("minicolors-focus")})})}function n(i,t,o){var s,a,n,r,c=i.parents(".minicolors").find(".minicolors-input"),l=c.data("minicolors-settings"),h=i.find("[class$=-picker]"),d=i.offset().left,p=i.offset().top,u=Math.round(t.pageX-d),g=Math.round(t.pageY-p),m=o?l.animationSpeed:0;t.originalEvent.changedTouches&&(u=t.originalEvent.changedTouches[0].pageX-d,g=t.originalEvent.changedTouches[0].pageY-p),u<0&&(u=0),g<0&&(g=0),u>i.width()&&(u=i.width()),g>i.height()&&(g=i.height()),i.parent().is(".minicolors-slider-wheel")&&h.parent().is(".minicolors-grid")&&(s=75-u,a=75-g,n=Math.sqrt(s*s+a*a),r=Math.atan2(a,s),r<0&&(r+=2*Math.PI),n>75&&(n=75,u=75-75*Math.cos(r),g=75-75*Math.sin(r)),u=Math.round(u),g=Math.round(g)),i.is(".minicolors-grid")?h.stop(!0).animate({top:g+"px",left:u+"px"},m,l.animationEasing,function(){e(c,i)}):h.stop(!0).animate({top:g+"px"},m,l.animationEasing,function(){e(c,i)})}function e(i,t){function o(i,t){var o,s;return i.length&&t?(o=i.offset().left,s=i.offset().top,{x:o-t.offset().left+i.outerWidth()/2,y:s-t.offset().top+i.outerHeight()/2}):null}var s,a,n,e,c,h,d,p=i.val(),u=i.attr("data-opacity"),g=i.parent(),m=i.data("minicolors-settings"),v=g.find(".minicolors-input-swatch"),b=g.find(".minicolors-grid"),w=g.find(".minicolors-slider"),y=g.find(".minicolors-opacity-slider"),C=b.find("[class$=-picker]"),M=w.find("[class$=-picker]"),x=y.find("[class$=-picker]"),I=o(C,b),S=o(M,w),z=o(x,y);if(t.is(".minicolors-grid, .minicolors-slider, .minicolors-opacity-slider")){switch(m.control){case"wheel":e=b.width()/2-I.x,c=b.height()/2-I.y,h=Math.sqrt(e*e+c*c),d=Math.atan2(c,e),d<0&&(d+=2*Math.PI),h>75&&(h=75,I.x=69-75*Math.cos(d),I.y=69-75*Math.sin(d)),a=f(h/.75,0,100),s=f(180*d/Math.PI,0,360),n=f(100-Math.floor(S.y*(100/w.height())),0,100),p=k({h:s,s:a,b:n}),w.css("backgroundColor",k({h:s,s:a,b:100}));break;case"saturation":s=f(parseInt(I.x*(360/b.width()),10),0,360),a=f(100-Math.floor(S.y*(100/w.height())),0,100),n=f(100-Math.floor(I.y*(100/b.height())),0,100),p=k({h:s,s:a,b:n}),w.css("backgroundColor",k({h:s,s:100,b:n})),g.find(".minicolors-grid-inner").css("opacity",a/100);break;case"brightness":s=f(parseInt(I.x*(360/b.width()),10),0,360),a=f(100-Math.floor(I.y*(100/b.height())),0,100),n=f(100-Math.floor(S.y*(100/w.height())),0,100),p=k({h:s,s:a,b:n}),w.css("backgroundColor",k({h:s,s:a,b:100})),g.find(".minicolors-grid-inner").css("opacity",1-n/100);break;default:s=f(360-parseInt(S.y*(360/w.height()),10),0,360),a=f(Math.floor(I.x*(100/b.width())),0,100),n=f(100-Math.floor(I.y*(100/b.height())),0,100),p=k({h:s,s:a,b:n}),b.css("backgroundColor",k({h:s,s:100,b:100}))}u=m.opacity?parseFloat(1-z.y/y.height()).toFixed(2):1,r(i,p,u)}else v.find("span").css({backgroundColor:p,opacity:u}),l(i,p,u)}function r(i,t,o){var s,a=i.parent(),n=i.data("minicolors-settings"),e=a.find(".minicolors-input-swatch");n.opacity&&i.attr("data-opacity",o),"rgb"===n.format?(s=v(t)?g(t,!0):I(u(t,!0)),o=""===i.attr("data-opacity")?1:f(parseFloat(i.attr("data-opacity")).toFixed(2),0,1),!isNaN(o)&&n.opacity||(o=1),t=i.minicolors("rgbObject").a<=1&&s&&n.opacity?"rgba("+s.r+", "+s.g+", "+s.b+", "+parseFloat(o)+")":"rgb("+s.r+", "+s.g+", "+s.b+")"):(v(t)&&(t=y(t)),t=p(t,n.letterCase)),i.val(t),e.find("span").css({backgroundColor:t,opacity:o}),l(i,t,o)}function c(t,o){var s,a,n,e,r,c,h,d,w,C,x=t.parent(),I=t.data("minicolors-settings"),S=x.find(".minicolors-input-swatch"),z=x.find(".minicolors-grid"),F=x.find(".minicolors-slider"),T=x.find(".minicolors-opacity-slider"),D=z.find("[class$=-picker]"),j=F.find("[class$=-picker]"),q=T.find("[class$=-picker]");switch(v(t.val())?(s=y(t.val()),r=f(parseFloat(b(t.val())).toFixed(2),0,1),r&&t.attr("data-opacity",r)):s=p(u(t.val(),!0),I.letterCase),s||(s=p(m(I.defaultValue,!0),I.letterCase)),a=M(s),e=I.keywords?i.map(I.keywords.split(","),function(t){return i.trim(t.toLowerCase())}):[],c=""!==t.val()&&i.inArray(t.val().toLowerCase(),e)>-1?p(t.val()):v(t.val())?g(t.val()):s,o||t.val(c),I.opacity&&(n=""===t.attr("data-opacity")?1:f(parseFloat(t.attr("data-opacity")).toFixed(2),0,1),isNaN(n)&&(n=1),t.attr("data-opacity",n),S.find("span").css("opacity",n),d=f(T.height()-T.height()*n,0,T.height()),q.css("top",d+"px")),"transparent"===t.val().toLowerCase()&&S.find("span").css("opacity",0),S.find("span").css("backgroundColor",s),I.control){case"wheel":w=f(Math.ceil(.75*a.s),0,z.height()/2),C=a.h*Math.PI/180,h=f(75-Math.cos(C)*w,0,z.width()),d=f(75-Math.sin(C)*w,0,z.height()),D.css({top:d+"px",left:h+"px"}),d=150-a.b/(100/z.height()),""===s&&(d=0),j.css("top",d+"px"),F.css("backgroundColor",k({h:a.h,s:a.s,b:100}));break;case"saturation":h=f(5*a.h/12,0,150),d=f(z.height()-Math.ceil(a.b/(100/z.height())),0,z.height()),D.css({top:d+"px",left:h+"px"}),d=f(F.height()-a.s*(F.height()/100),0,F.height()),j.css("top",d+"px"),F.css("backgroundColor",k({h:a.h,s:100,b:a.b})),x.find(".minicolors-grid-inner").css("opacity",a.s/100);break;case"brightness":h=f(5*a.h/12,0,150),d=f(z.height()-Math.ceil(a.s/(100/z.height())),0,z.height()),D.css({top:d+"px",left:h+"px"}),d=f(F.height()-a.b*(F.height()/100),0,F.height()),j.css("top",d+"px"),F.css("backgroundColor",k({h:a.h,s:a.s,b:100})),x.find(".minicolors-grid-inner").css("opacity",1-a.b/100);break;default:h=f(Math.ceil(a.s/(100/z.width())),0,z.width()),d=f(z.height()-Math.ceil(a.b/(100/z.height())),0,z.height()),D.css({top:d+"px",left:h+"px"}),d=f(F.height()-a.h/(360/F.height()),0,F.height()),j.css("top",d+"px"),z.css("backgroundColor",k({h:a.h,s:100,b:100}))}t.data("minicolors-initialized")&&l(t,c,n)}function l(i,t,o){var s,a,n,e=i.data("minicolors-settings"),r=i.data("minicolors-lastChange");if(!r||r.value!==t||r.opacity!==o){if(i.data("minicolors-lastChange",{value:t,opacity:o}),e.swatches&&0!==e.swatches.length){for(s=v(t)?g(t,!0):I(t),a=-1,n=0;n<e.swatches.length;++n)if(s.r===e.swatches[n].r&&s.g===e.swatches[n].g&&s.b===e.swatches[n].b&&s.a===e.swatches[n].a){a=n;break}i.parent().find(".minicolors-swatches .minicolors-swatch").removeClass("selected"),a!==-1&&i.parent().find(".minicolors-swatches .minicolors-swatch").eq(n).addClass("selected")}e.change&&(e.changeDelay?(clearTimeout(i.data("minicolors-changeTimeout")),i.data("minicolors-changeTimeout",setTimeout(function(){e.change.call(i.get(0),t,o)},e.changeDelay))):e.change.call(i.get(0),t,o)),i.trigger("change").trigger("input")}}function h(t){var o,s=i(t).attr("data-opacity");if(v(i(t).val()))o=g(i(t).val(),!0);else{var a=u(i(t).val(),!0);o=I(a)}return o?(void 0!==s&&i.extend(o,{a:parseFloat(s)}),o):null}function d(t,o){var s,a=i(t).attr("data-opacity");if(v(i(t).val()))s=g(i(t).val(),!0);else{var n=u(i(t).val(),!0);s=I(n)}return s?(void 0===a&&(a=1),o?"rgba("+s.r+", "+s.g+", "+s.b+", "+parseFloat(a)+")":"rgb("+s.r+", "+s.g+", "+s.b+")"):null}function p(i,t){return"uppercase"===t?i.toUpperCase():i.toLowerCase()}function u(i,t){return i=i.replace(/^#/g,""),i.match(/^[A-F0-9]{3,6}/gi)?3!==i.length&&6!==i.length?"":(3===i.length&&t&&(i=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]),"#"+i):""}function g(i,t){var o=i.replace(/[^\d,.]/g,""),s=o.split(",");return s[0]=f(parseInt(s[0],10),0,255),s[1]=f(parseInt(s[1],10),0,255),s[2]=f(parseInt(s[2],10),0,255),s[3]&&(s[3]=f(parseFloat(s[3],10),0,1)),t?s[3]?{r:s[0],g:s[1],b:s[2],a:s[3]}:{r:s[0],g:s[1],b:s[2]}:"undefined"!=typeof s[3]&&s[3]<=1?"rgba("+s[0]+", "+s[1]+", "+s[2]+", "+s[3]+")":"rgb("+s[0]+", "+s[1]+", "+s[2]+")"}function m(i,t){return v(i)?g(i):u(i,t)}function f(i,t,o){return i<t&&(i=t),i>o&&(i=o),i}function v(i){var t=i.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return!(!t||4!==t.length)}function b(i){return i=i.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+(\.\d{1,2})?|\.\d{1,2})[\s+]?/i),i&&6===i.length?i[4]:"1"}function w(i){var t={},o=Math.round(i.h),s=Math.round(255*i.s/100),a=Math.round(255*i.b/100);if(0===s)t.r=t.g=t.b=a;else{var n=a,e=(255-s)*a/255,r=(n-e)*(o%60)/60;360===o&&(o=0),o<60?(t.r=n,t.b=e,t.g=e+r):o<120?(t.g=n,t.b=e,t.r=n-r):o<180?(t.g=n,t.r=e,t.b=e+r):o<240?(t.b=n,t.r=e,t.g=n-r):o<300?(t.b=n,t.g=e,t.r=e+r):o<360?(t.r=n,t.g=e,t.b=n-r):(t.r=0,t.g=0,t.b=0)}return{r:Math.round(t.r),g:Math.round(t.g),b:Math.round(t.b)}}function y(i){return i=i.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i),i&&4===i.length?"#"+("0"+parseInt(i[1],10).toString(16)).slice(-2)+("0"+parseInt(i[2],10).toString(16)).slice(-2)+("0"+parseInt(i[3],10).toString(16)).slice(-2):""}function C(t){var o=[t.r.toString(16),t.g.toString(16),t.b.toString(16)];return i.each(o,function(i,t){1===t.length&&(o[i]="0"+t)}),"#"+o.join("")}function k(i){return C(w(i))}function M(i){var t=x(I(i));return 0===t.s&&(t.h=360),t}function x(i){var t={h:0,s:0,b:0},o=Math.min(i.r,i.g,i.b),s=Math.max(i.r,i.g,i.b),a=s-o;return t.b=s,t.s=0!==s?255*a/s:0,0!==t.s?i.r===s?t.h=(i.g-i.b)/a:i.g===s?t.h=2+(i.b-i.r)/a:t.h=4+(i.r-i.g)/a:t.h=-1,t.h*=60,t.h<0&&(t.h+=360),t.s*=100/255,t.b*=100/255,t}function I(i){return i=parseInt(i.indexOf("#")>-1?i.substring(1):i,16),{r:i>>16,g:(65280&i)>>8,b:255&i}}i.minicolors={defaults:{animationSpeed:50,animationEasing:"swing",change:null,changeDelay:0,control:"hue",defaultValue:"",format:"hex",hide:null,hideSpeed:100,inline:!1,keywords:"",letterCase:"lowercase",opacity:!1,position:"bottom left",show:null,showSpeed:100,theme:"default",swatches:[]}},i.extend(i.fn,{minicolors:function(n,e){switch(n){case"destroy":return i(this).each(function(){o(i(this))}),i(this);case"hide":return a(),i(this);case"opacity":return void 0===e?i(this).attr("data-opacity"):(i(this).each(function(){c(i(this).attr("data-opacity",e))}),i(this));case"rgbObject":return h(i(this),"rgbaObject"===n);case"rgbString":case"rgbaString":return d(i(this),"rgbaString"===n);case"settings":return void 0===e?i(this).data("minicolors-settings"):(i(this).each(function(){var t=i(this).data("minicolors-settings")||{};o(i(this)),i(this).minicolors(i.extend(!0,t,e))}),i(this));case"show":return s(i(this).eq(0)),i(this);case"value":return void 0===e?i(this).val():(i(this).each(function(){"object"==typeof e&&"null"!==e?(e.opacity&&i(this).attr("data-opacity",f(e.opacity,0,1)),e.color&&i(this).val(e.color)):i(this).val(e),c(i(this))}),i(this));default:return"create"!==n&&(e=n),i(this).each(function(){t(i(this),e)}),i(this)}}}),i([document,top.document]).on("mousedown.minicolors touchstart.minicolors",function(t){i(t.target).parents().add(t.target).hasClass("minicolors")||a()}).on("mousedown.minicolors touchstart.minicolors",".minicolors-grid, .minicolors-slider, .minicolors-opacity-slider",function(t){var o=i(this);t.preventDefault(),i(t.delegateTarget).data("minicolors-target",o),n(o,t,!0)}).on("mousemove.minicolors touchmove.minicolors",function(t){var o=i(t.delegateTarget).data("minicolors-target");o&&n(o,t)}).on("mouseup.minicolors touchend.minicolors",function(){i(this).removeData("minicolors-target")}).on("click.minicolors",".minicolors-swatches li",function(t){t.preventDefault();var o=i(this),s=o.parents(".minicolors").find(".minicolors-input"),a=o.data("swatch-color");r(s,a,b(a)),c(s)}).on("mousedown.minicolors touchstart.minicolors",".minicolors-input-swatch",function(t){var o=i(this).parent().find(".minicolors-input");t.preventDefault(),s(o)}).on("focus.minicolors",".minicolors-input",function(){var t=i(this);t.data("minicolors-initialized")&&s(t)}).on("blur.minicolors",".minicolors-input",function(){var t,o,s,a,n,e=i(this),r=e.data("minicolors-settings");e.data("minicolors-initialized")&&(t=r.keywords?i.map(r.keywords.split(","),function(t){return i.trim(t.toLowerCase())}):[],""!==e.val()&&i.inArray(e.val().toLowerCase(),t)>-1?n=e.val():(v(e.val())?s=g(e.val(),!0):(o=u(e.val(),!0),s=o?I(o):null),n=null===s?r.defaultValue:"rgb"===r.format?g(r.opacity?"rgba("+s.r+","+s.g+","+s.b+","+e.attr("data-opacity")+")":"rgb("+s.r+","+s.g+","+s.b+")"):C(s)),a=r.opacity?e.attr("data-opacity"):1,"transparent"===n.toLowerCase()&&(a=0),e.closest(".minicolors").find(".minicolors-input-swatch > span").css("opacity",a),e.val(n),""===e.val()&&e.val(m(r.defaultValue,!0)),e.val(p(e.val(),r.letterCase)))}).on("keydown.minicolors",".minicolors-input",function(t){var o=i(this);if(o.data("minicolors-initialized"))switch(t.keyCode){case 9:a();break;case 13:case 27:a(),o.blur()}}).on("keyup.minicolors",".minicolors-input",function(){var t=i(this);t.data("minicolors-initialized")&&c(t,!0)}).on("paste.minicolors",".minicolors-input",function(){var t=i(this);t.data("minicolors-initialized")&&setTimeout(function(){c(t,!0)},1)})});
dist/plugins/minicolors/jquery.minicolors.png ADDED
Binary file
languages/lara-google-analytics.pot CHANGED
@@ -3,7 +3,7 @@ msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Lara Google Analytics\n"
5
  "Report-Msgid-Bugs-To: \n"
6
- "POT-Creation-Date: 2020-01-26 12:34+0000\n"
7
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9
  "Language-Team: \n"
@@ -13,89 +13,94 @@ msgstr ""
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "X-Generator: Loco https://localise.biz/\n"
16
- "X-Loco-Version: 2.3.1; wp-5.3.2"
17
 
18
- #: core/lrgawidget.class.php:86 widgets/lrgawidget.php:394
19
  msgid "% New Sessions"
20
  msgstr ""
21
 
22
- #: widgets/lrgawidget.php:854
23
  msgid "(filtered from _MAX_ total entries)"
24
  msgstr ""
25
 
26
- #: widgets/lrgawidget.php:75
27
  msgid "1"
28
  msgstr ""
29
 
30
- #: widgets/lrgawidget.php:771
31
  msgid "12 Months of Free Updates and Support"
32
  msgstr ""
33
 
34
- #: widgets/lrgawidget.php:76
35
  msgid "2"
36
  msgstr ""
37
 
38
- #: widgets/lrgawidget.php:77
39
  msgid "3"
40
  msgstr ""
41
 
42
- #: widgets/lrgawidget.php:869
43
  msgid ": activate to sort column ascending"
44
  msgstr ""
45
 
46
- #: widgets/lrgawidget.php:870
47
  msgid ": activate to sort column descending"
48
  msgstr ""
49
 
50
- #: widgets/lrgawidget.php:575
51
  msgid ""
52
  "<b>Position</b> is the average ranking of your website URLs for that query "
53
  "or keyword, on Google search results."
54
  msgstr ""
55
 
56
- #: widgets/lrgawidget.php:804
57
  msgid ""
58
  "<b>XtraOrbit</b> has been providing a wide range of services <b>since "
59
  "2002</b>, including <b>Web Hosting</b>, <b>Domain Names</b> & <b>Web "
60
  "Development</b>."
61
  msgstr ""
62
 
63
- #: widgets/lrgawidget.php:121 widgets/lrgawidget.php:210
64
  msgid "Access Code"
65
  msgstr ""
66
 
67
- #: widgets/lrgawidget.php:245
68
  msgid "Account"
69
  msgstr ""
70
 
71
- #: widgets/lrgawidget.php:277
72
  msgid "Account Name"
73
  msgstr ""
74
 
75
- #: widgets/lrgawidget.php:430
76
  msgid "active users on site"
77
  msgstr ""
78
 
79
- #: widgets/lrgawidget.php:267
80
  msgid "Add <b>Google Universal Analytics</b> tracking code to all pages."
81
  msgstr ""
82
 
83
- #: core/lrgawidget.permissions.php:32
84
  msgid "Administrator [Change Settings]"
85
  msgstr ""
86
 
87
- #: widgets/lrgawidget.php:143
88
  msgid "Advanced Setup"
89
  msgstr ""
90
 
91
- #: widgets/lrgawidget.php:302
92
  msgid ""
93
  "After adding your website to <b>Google Search Console</b> and verifying "
94
  "ownership, clich <b>Reload</b>, to reload the <b>Search Console Property "
95
  "URL</b> menu."
96
  msgstr ""
97
 
98
- #: widgets/lrgawidget.php:873
 
 
 
 
 
99
  msgid ""
100
  "All saved authentication data will be removed. Do you want to continue ?!"
101
  msgstr ""
@@ -104,159 +109,188 @@ msgstr ""
104
  msgid "Amr M. Ibrahim"
105
  msgstr ""
106
 
107
- #: widgets/lrgawidget.php:890
108
  msgid "Apply"
109
  msgstr ""
110
 
111
- #: widgets/lrgawidget.php:909
112
  msgid "April"
113
  msgstr ""
114
 
115
- #: widgets/lrgawidget.php:913
116
  msgid "August"
117
  msgstr ""
118
 
119
- #: widgets/lrgawidget.php:76
120
  msgid "Authorize APP"
121
  msgstr ""
122
 
123
- #: widgets/lrgawidget.php:223
124
  msgid "Authorize App"
125
  msgstr ""
126
 
127
- #: core/lrgawidget.class.php:88 widgets/lrgawidget.php:380
128
  msgid "Avg. Session Duration"
129
  msgstr ""
130
 
131
- #: widgets/lrgawidget.php:229
132
  msgid ""
133
  "Be sure to use the same email account that is linked to your <b>Google "
134
  "Analytics</b> and <b>Google Search Console</b> (formerly, Google Webmaster "
135
  "tools)."
136
  msgstr ""
137
 
138
- #: core/lrgawidget.class.php:87 widgets/lrgawidget.php:387
 
 
 
 
139
  msgid "Bounce Rate"
140
  msgstr ""
141
 
142
- #: widgets/lrgawidget.php:472
143
  msgid "Browser"
144
  msgstr ""
145
 
146
- #: core/lrgawidget.permissions.php:42 widgets/lrgawidget.php:36
147
  msgid "Browsers"
148
  msgstr ""
149
 
150
- #: widgets/lrgawidget.php:755
151
  msgid "Browsers versions (IE 6, IE 7 .. etc.)."
152
  msgstr ""
153
 
154
- #: widgets/lrgawidget.php:791
155
  msgid "Buy Now"
156
  msgstr ""
157
 
158
- #: widgets/lrgawidget.php:731
159
  msgid "Buy the Premium version and get access to these amazing features"
160
  msgstr ""
161
 
162
- #: widgets/lrgawidget.php:146
163
  msgid ""
164
  "By clicking on <b>Start Advanced Setup</b> button below, The setup wizard "
165
  "will guide you through creating and/or configuring your own Google "
166
  "Application."
167
  msgstr ""
168
 
169
- #: widgets/lrgawidget.php:881
170
  msgid "cached"
171
  msgstr ""
172
 
173
- #: widgets/lrgawidget.php:891
174
  msgid "Cancel"
175
  msgstr ""
176
 
177
- #: core/lrgawidget.permissions.php:38
 
 
 
 
 
 
 
 
178
  msgid "Change Date Range"
179
  msgstr ""
180
 
181
- #: widgets/lrgawidget.php:765
182
  msgid "Check any Date Range, not just the last 30 days"
183
  msgstr ""
184
 
185
- #: widgets/lrgawidget.php:778
186
  msgid ""
187
  "Check the<strong> Demo</strong> to see exactly how the premium version looks "
188
  "like, and what you will get from it without leaving your wordpress dashboard"
189
  msgstr ""
190
 
191
- #: widgets/lrgawidget.php:108 widgets/lrgawidget.php:230
192
  msgid ""
193
  "Click <b>Allow</b>, then copy and paste the access code here, and click <b>"
194
  "Submit</b>."
195
  msgstr ""
196
 
197
- #: widgets/lrgawidget.php:193
198
  msgid "Click <b>Analytics API</b>, then click <b>Enable API</b>."
199
  msgstr ""
200
 
201
- #: widgets/lrgawidget.php:189
202
  msgid ""
203
  "Click on <b>Configure consent screen</b> and enter <b>Lara, The Google "
204
  "Analytics Widget</b> as the <b>Product Name</b>, then click <b>Save</b>."
205
  msgstr ""
206
 
207
- #: widgets/lrgawidget.php:103
208
  msgid ""
209
  "Click on <b>Get Access Code</b> button below, and a pop-up window will open, "
210
  "asking you to allow <b>Lara, The Google Analytics Widget</b> to access the "
211
  "following:"
212
  msgstr ""
213
 
214
- #: widgets/lrgawidget.php:224
215
  msgid ""
216
  "Click on <b>Get Access Code</b> button below, and a pop-up window will open, "
217
  "asking you to allow the <u>app you just created</u> to :"
218
  msgstr ""
219
 
220
- #: widgets/lrgawidget.php:186
221
  msgid ""
222
  "Click on <b>Select a project</b> drop-down, and choose <b>Create a new "
223
  "project</b>."
224
  msgstr ""
225
 
226
- #: widgets/lrgawidget.php:569
227
  msgid "Clicks"
228
  msgstr ""
229
 
230
- #: widgets/lrgawidget.php:160
231
  msgid "Client ID"
232
  msgstr ""
233
 
234
- #: widgets/lrgawidget.php:168
235
  msgid "Client Secret"
236
  msgstr ""
237
 
238
- #: widgets/lrgawidget.php:807
 
 
 
 
239
  msgid "Come, check us out!"
240
  msgstr ""
241
 
242
- #: core/lrgawidget.permissions.php:89
 
 
 
 
 
 
 
 
 
243
  msgid ""
244
  "Could not get or set widget permissions .. please contact an administrator"
245
  msgstr ""
246
 
247
- #: core/lrgawidget.permissions.php:41 widgets/lrgawidget.php:33
248
  msgid "Countries"
249
  msgstr ""
250
 
251
- #: widgets/lrgawidget.php:453
252
  msgid "Country"
253
  msgstr ""
254
 
255
- #: widgets/lrgawidget.php:75 widgets/lrgawidget.php:181
256
  msgid "Create Google APP"
257
  msgstr ""
258
 
259
- #: widgets/lrgawidget.php:569
 
 
 
 
260
  msgid "CTR"
261
  msgstr ""
262
 
@@ -267,7 +301,7 @@ msgid ""
267
  "cURL extension for PHP."
268
  msgstr ""
269
 
270
- #: widgets/lrgawidget.php:894
271
  msgid "Custom Range"
272
  msgstr ""
273
 
@@ -277,51 +311,81 @@ msgstr ""
277
  msgid "DataBase Error .. please contact an administrator"
278
  msgstr ""
279
 
280
- #: widgets/lrgawidget.php:917
281
  msgid "December"
282
  msgstr ""
283
 
284
- #: widgets/lrgawidget.php:531
285
  msgid "Device Type"
286
  msgstr ""
287
 
288
- #: widgets/lrgawidget.php:757
289
  msgid "Device Types and brands (Samsung, Apple .. etc.)."
290
  msgstr ""
291
 
292
- #: core/lrgawidget.permissions.php:45 widgets/lrgawidget.php:45
293
  msgid "Devices"
294
  msgstr ""
295
 
296
- #: widgets/lrgawidget.php:187
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
297
  msgid "Enter <b>Lara</b> as the <b>Project name</b>, then click <b>Create</b>."
298
  msgstr ""
299
 
300
- #: widgets/lrgawidget.php:100
301
  msgid "Express Setup"
302
  msgstr ""
303
 
304
- #: core/callURL.class.php:91 core/lrgawidget.class.php:388
305
- #: core/lrgawidget.handler.php:87 core/lrgawidget.permissions.php:89
 
 
 
 
306
  #: core/storage.class.php:33 core/storage.class.php:36
307
  #: core/storage.class.php:39 core/storage.class.php:54
308
  #: core/storage.class.php:66 core/storage.class.php:86
309
  msgid "Fatal Error"
310
  msgstr ""
311
 
312
- #: widgets/lrgawidget.php:907
313
  msgid "February"
314
  msgstr ""
315
 
316
- #: widgets/lrgawidget.php:863
317
  msgid "First"
318
  msgstr ""
319
 
320
- #: widgets/lrgawidget.php:902
321
  msgid "Fr"
322
  msgstr ""
323
 
324
- #: widgets/lrgawidget.php:892
325
  msgid "From"
326
  msgstr ""
327
 
@@ -331,19 +395,19 @@ msgid ""
331
  "which also inserts latest Google Analytics tracking code to your pages."
332
  msgstr ""
333
 
334
- #: widgets/lrgawidget.php:112 widgets/lrgawidget.php:233
335
  msgid "Get Access Code"
336
  msgstr ""
337
 
338
- #: widgets/lrgawidget.php:87
339
  msgid "Go Back to Express Setup"
340
  msgstr ""
341
 
342
- #: widgets/lrgawidget.php:57 widgets/lrgawidget.php:730
343
  msgid "Go Premium !"
344
  msgstr ""
345
 
346
- #: widgets/lrgawidget.php:7
347
  msgid "Google Analytics"
348
  msgstr ""
349
 
@@ -352,10 +416,19 @@ msgid ""
352
  "Google Replied with unexpected replay, enable debugging to check the reply"
353
  msgstr ""
354
 
355
- #: widgets/lrgawidget.php:827
 
 
 
 
356
  msgid "Help & Support"
357
  msgstr ""
358
 
 
 
 
 
 
359
  #. Author URI of the plugin
360
  msgid "https://www.xtraorbit.com/"
361
  msgstr ""
@@ -368,35 +441,35 @@ msgstr ""
368
  msgid "I already rated it"
369
  msgstr ""
370
 
371
- #: widgets/lrgawidget.php:410 widgets/lrgawidget.php:438
372
- #: widgets/lrgawidget.php:472 widgets/lrgawidget.php:492
373
- #: widgets/lrgawidget.php:512 widgets/lrgawidget.php:531
374
- #: widgets/lrgawidget.php:550 widgets/lrgawidget.php:569
375
- #: widgets/lrgawidget.php:594
376
  msgid "ID"
377
  msgstr ""
378
 
379
- #: widgets/lrgawidget.php:828
380
  msgid ""
381
  "If you are facing any issues, need support or have a new feature request, "
382
  "visit the official plugin support forum, where you will be able to submit a "
383
  "support ticket."
384
  msgstr ""
385
 
386
- #: widgets/lrgawidget.php:110
387
  msgid ""
388
  "If you are using the <b>premium</b> version of the plugin, that email "
389
  "account should also be linked to your <b>Google Search Console</b>."
390
  msgstr ""
391
 
392
- #: widgets/lrgawidget.php:301
393
  msgid ""
394
  "If you cannot find your website, please go to <a href=\"https://www.google."
395
  "com/webmasters/tools/\" target=\"_blank\">Google Search Console</a> and "
396
  "click on <b>Add a property</b>, to add your website."
397
  msgstr ""
398
 
399
- #: core/wp.review.notice.php:74 widgets/lrgawidget.php:818
400
  msgid ""
401
  "If you have a free moment, and want to help us spread the word and boost our "
402
  "motivation, please do us a BIG favour and give us 5 Stars rating on "
@@ -404,33 +477,37 @@ msgid ""
404
  "the plugin :)"
405
  msgstr ""
406
 
407
- #: widgets/lrgawidget.php:147
408
  msgid ""
409
  "If you want a quick start, or just trying the widget, use the <b>Express "
410
  "Setup</b> on the left."
411
  msgstr ""
412
 
413
- #: widgets/lrgawidget.php:109
414
  msgid ""
415
  "If you were asked to login, be sure to use the same email account that is "
416
  "linked to your <b>Google Analytics</b>."
417
  msgstr ""
418
 
419
- #: widgets/lrgawidget.php:569
420
  msgid "Impressions"
421
  msgstr ""
422
 
423
- #: widgets/lrgawidget.php:883
424
  msgid "inactive"
425
  msgstr ""
426
 
427
- #: widgets/lrgawidget.php:874
 
 
 
 
428
  msgid ""
429
  "Initial Setup Required! - Please contact an administratior to complete the "
430
  "widget setup."
431
  msgstr ""
432
 
433
- #: core/lrgawidget.handler.php:87
434
  msgid "Invalid Call"
435
  msgstr ""
436
 
@@ -442,35 +519,35 @@ msgstr ""
442
  msgid "Invalid Reply"
443
  msgstr ""
444
 
445
- #: widgets/lrgawidget.php:906
446
  msgid "January"
447
  msgstr ""
448
 
449
- #: widgets/lrgawidget.php:912
450
  msgid "July"
451
  msgstr ""
452
 
453
- #: widgets/lrgawidget.php:911
454
  msgid "June"
455
  msgstr ""
456
 
457
- #: widgets/lrgawidget.php:569
458
  msgid "Keyword"
459
  msgstr ""
460
 
461
- #: core/lrgawidget.permissions.php:47 widgets/lrgawidget.php:51
462
  msgid "Keywords"
463
  msgstr ""
464
 
465
- #: widgets/lrgawidget.php:747
466
  msgid "Keywords ( provided by Google Search Console)."
467
  msgstr ""
468
 
469
- #: widgets/lrgawidget.php:492
470
  msgid "Language"
471
  msgstr ""
472
 
473
- #: core/lrgawidget.permissions.php:43 widgets/lrgawidget.php:39
474
  msgid "Languages"
475
  msgstr ""
476
 
@@ -478,39 +555,53 @@ msgstr ""
478
  msgid "Lara's Google Analytics"
479
  msgstr ""
480
 
481
- #: widgets/lrgawidget.php:864
482
  msgid "Last"
483
  msgstr ""
484
 
485
- #: widgets/lrgawidget.php:878
486
  msgid "Last 30 Days"
487
  msgstr ""
488
 
489
- #: widgets/lrgawidget.php:877
490
  msgid "Last 7 Days"
491
  msgstr ""
492
 
493
- #: widgets/lrgawidget.php:880
494
  msgid "Last Month"
495
  msgstr ""
496
 
497
- #: widgets/lrgawidget.php:781
498
  msgid "Launch Demo"
499
  msgstr ""
500
 
501
- #: core/wp.review.notice.php:78 widgets/lrgawidget.php:820
502
  msgid "Let's do it, You deserve it"
503
  msgstr ""
504
 
505
- #: widgets/lrgawidget.php:858
 
 
 
 
506
  msgid "Loading..."
507
  msgstr ""
508
 
509
- #: widgets/lrgawidget.php:908
 
 
 
 
 
 
 
 
 
 
510
  msgid "March"
511
  msgstr ""
512
 
513
- #: widgets/lrgawidget.php:910
514
  msgid "May"
515
  msgstr ""
516
 
@@ -520,29 +611,33 @@ msgid ""
520
  "choose a valid <b>Search Console Property URL</b>."
521
  msgstr ""
522
 
523
- #: widgets/lrgawidget.php:898
524
  msgid "Mo"
525
  msgstr ""
526
 
527
- #: widgets/lrgawidget.php:740
 
 
 
 
528
  msgid ""
529
  "Multisite Multi-Network enabled : </b>Every blog/site in your network can "
530
  "has its own analytics tracking code and dashboard widget."
531
  msgstr ""
532
 
533
- #: widgets/lrgawidget.php:865
534
  msgid "Next"
535
  msgstr ""
536
 
537
- #: widgets/lrgawidget.php:885
538
  msgid "No active users"
539
  msgstr ""
540
 
541
- #: widgets/lrgawidget.php:851
542
  msgid "No data available in table"
543
  msgstr ""
544
 
545
- #: widgets/lrgawidget.php:876
546
  msgid ""
547
  "No data available in table. <span class='pull-left'><ul><li>Did you <a "
548
  "href='https://support.google.com/webmasters/answer/34592?hl=en' "
@@ -553,7 +648,7 @@ msgid ""
553
  "appear.</li></ul></span>"
554
  msgstr ""
555
 
556
- #: widgets/lrgawidget.php:861
557
  msgid "No matching records found"
558
  msgstr ""
559
 
@@ -561,60 +656,84 @@ msgstr ""
561
  msgid "Not Interested"
562
  msgstr ""
563
 
564
- #: widgets/lrgawidget.php:916
565
  msgid "November"
566
  msgstr ""
567
 
568
- #: widgets/lrgawidget.php:915
569
  msgid "October"
570
  msgstr ""
571
 
572
- #: widgets/lrgawidget.php:192
 
 
 
 
573
  msgid ""
574
  "Open <b>Google Developers Console</b> menu, by clicking on \" <i class=\"fa "
575
  "fa-bars\"></i> \" and select <b>API Manager</b>."
576
  msgstr ""
577
 
578
- #: widgets/lrgawidget.php:185
579
  msgid ""
580
  "Open the <a target=\"_blank\" href=\"//console.developers.google."
581
  "com/apis/credentials?project=_\">Google Developers Console</a>."
582
  msgstr ""
583
 
584
- #: widgets/lrgawidget.php:512
585
  msgid "Operating System"
586
  msgstr ""
587
 
588
- #: core/lrgawidget.permissions.php:44 widgets/lrgawidget.php:42
589
  msgid "Operating Systems"
590
  msgstr ""
591
 
592
- #: widgets/lrgawidget.php:756
593
  msgid "Operating Systems versions (Windows 7, Windows 8 .. etc.)."
594
  msgstr ""
595
 
596
- #: widgets/lrgawidget.php:410 widgets/lrgawidget.php:438
 
 
 
 
 
 
 
 
 
 
 
 
597
  msgid "Page"
598
  msgstr ""
599
 
600
- #: core/lrgawidget.permissions.php:49 widgets/lrgawidget.php:27
601
  msgid "Pages"
602
  msgstr ""
603
 
604
- #: core/lrgawidget.class.php:89 widgets/lrgawidget.php:373
605
  msgid "Pages / Session"
606
  msgstr ""
607
 
608
- #: core/lrgawidget.class.php:85 widgets/lrgawidget.php:366
609
- #: widgets/lrgawidget.php:410 widgets/lrgawidget.php:438
610
  msgid "Pageviews"
611
  msgstr ""
612
 
613
- #: widgets/lrgawidget.php:410 widgets/lrgawidget.php:438
614
- #: widgets/lrgawidget.php:453 widgets/lrgawidget.php:472
615
- #: widgets/lrgawidget.php:492 widgets/lrgawidget.php:512
616
- #: widgets/lrgawidget.php:531 widgets/lrgawidget.php:550
617
- #: widgets/lrgawidget.php:594
 
 
 
 
 
 
 
 
618
  msgid "Percentage"
619
  msgstr ""
620
 
@@ -622,185 +741,211 @@ msgstr ""
622
  msgid "Permissions"
623
  msgstr ""
624
 
625
- #: widgets/lrgawidget.php:741
626
  msgid ""
627
  "Permissions : </b>Easily control which data is viwed by your blog admins and "
628
  "users (also compatible with Multisite Multi-Network)."
629
  msgstr ""
630
 
631
- #: widgets/lrgawidget.php:298
632
  msgid ""
633
  "Please choose a valid <b>Search Console Property URL</b>, or the widget will "
634
  "not be able to get keywords data for your website."
635
  msgstr ""
636
 
637
- #: widgets/lrgawidget.php:569
638
  msgid "Position"
639
  msgstr ""
640
 
641
- #: widgets/lrgawidget.php:866
 
 
 
 
642
  msgid "Previous"
643
  msgstr ""
644
 
645
- #: widgets/lrgawidget.php:859
 
 
 
 
646
  msgid "Processing..."
647
  msgstr ""
648
 
649
- #: widgets/lrgawidget.php:276
 
 
 
 
650
  msgid "Profile Details"
651
  msgstr ""
652
 
653
- #: widgets/lrgawidget.php:250
654
  msgid "Property"
655
  msgstr ""
656
 
657
- #: widgets/lrgawidget.php:278
658
  msgid "Property Name"
659
  msgstr ""
660
 
661
- #: widgets/lrgawidget.php:295
662
  msgid "Property Url"
663
  msgstr ""
664
 
665
- #: widgets/lrgawidget.php:279
666
  msgid "Property WebsiteUrl"
667
  msgstr ""
668
 
669
- #: widgets/lrgawidget.php:817
670
  msgid "Rate Us"
671
  msgstr ""
672
 
673
- #: core/lrgawidget.permissions.php:40 widgets/lrgawidget.php:30
674
- #: widgets/lrgawidget.php:882
675
  msgid "Real Time"
676
  msgstr ""
677
 
678
- #: widgets/lrgawidget.php:748
679
  msgid "Real Time site visitors"
680
  msgstr ""
681
 
682
- #: widgets/lrgawidget.php:304
 
 
 
 
683
  msgid "Reload"
684
  msgstr ""
685
 
686
- #: widgets/lrgawidget.php:84
687
  msgid "Reset all data and start over"
688
  msgstr ""
689
 
690
- #: widgets/lrgawidget.php:428
691
  msgid "Right now"
692
  msgstr ""
693
 
694
- #: widgets/lrgawidget.php:903
695
  msgid "Sa"
696
  msgstr ""
697
 
698
- #: widgets/lrgawidget.php:270 widgets/lrgawidget.php:331
 
699
  msgid "Save"
700
  msgstr ""
701
 
702
- #: widgets/lrgawidget.php:48 widgets/lrgawidget.php:550
703
  msgid "Screen Resolution"
704
  msgstr ""
705
 
706
- #: core/lrgawidget.permissions.php:46
707
  msgid "Screen Resolutions"
708
  msgstr ""
709
 
710
- #: widgets/lrgawidget.php:294
711
  msgid "Search Console Property"
712
  msgstr ""
713
 
714
- #: widgets/lrgawidget.php:194
715
  msgid ""
716
  "Search for <b>Google Search Console API</b>, then click <b>Enable API</b>."
717
  msgstr ""
718
 
719
- #: widgets/lrgawidget.php:860
720
  msgid "Search:"
721
  msgstr ""
722
 
723
- #: widgets/lrgawidget.php:188
724
  msgid "Select <b>Create credentials</b> and choose <b>OAuth client ID</b>."
725
  msgstr ""
726
 
727
- #: widgets/lrgawidget.php:77
728
  msgid "Select Analytics Profile"
729
  msgstr ""
730
 
731
- #: widgets/lrgawidget.php:875
732
  msgid "Select Property URL"
733
  msgstr ""
734
 
735
- #: widgets/lrgawidget.php:914
736
  msgid "September"
737
  msgstr ""
738
 
739
- #: core/lrgawidget.class.php:83 core/lrgawidget.permissions.php:39
740
- #: widgets/lrgawidget.php:24 widgets/lrgawidget.php:352
741
- #: widgets/lrgawidget.php:453 widgets/lrgawidget.php:472
742
- #: widgets/lrgawidget.php:492 widgets/lrgawidget.php:512
743
- #: widgets/lrgawidget.php:531 widgets/lrgawidget.php:550
744
- #: widgets/lrgawidget.php:594
745
  msgid "Sessions"
746
  msgstr ""
747
 
748
- #: widgets/lrgawidget.php:857
 
 
 
 
 
 
 
 
 
749
  msgid "Show _MENU_ entries"
750
  msgstr ""
751
 
752
- #: widgets/lrgawidget.php:853
753
  msgid "Showing 0 to 0 of 0 entries"
754
  msgstr ""
755
 
756
- #: widgets/lrgawidget.php:852
757
  msgid "Showing _START_ to _END_ of _TOTAL_ entries"
758
  msgstr ""
759
 
760
- #: core/lrgawidget.class.php:388
761
  msgid "Something went wrong .. please contact an administrator"
762
  msgstr ""
763
 
764
- #: widgets/lrgawidget.php:54 widgets/lrgawidget.php:594
765
  msgid "Source"
766
  msgstr ""
767
 
768
- #: core/lrgawidget.permissions.php:48
769
  msgid "Sources"
770
  msgstr ""
771
 
772
- #: widgets/lrgawidget.php:148
773
  msgid "Start Advanced Setup"
774
  msgstr ""
775
 
776
- #: widgets/lrgawidget.php:897
777
  msgid "Su"
778
  msgstr ""
779
 
780
- #: widgets/lrgawidget.php:128 widgets/lrgawidget.php:176
781
- #: widgets/lrgawidget.php:218
782
  msgid "Submit"
783
  msgstr ""
784
 
785
- #: core/lrgawidget.permissions.php:31
786
  msgid "Super Administrator [Change Permissions]"
787
  msgstr ""
788
 
789
- #: widgets/lrgawidget.php:830
790
  msgid "Support Center"
791
  msgstr ""
792
 
793
- #: core/lrgawidget.permissions.php:36
794
  msgid "Tabs"
795
  msgstr ""
796
 
797
- #: widgets/lrgawidget.php:191
798
  msgid ""
799
  "Take note of the <b>client ID</b> & <b>client secret</b> then click <b>Ok</b>"
800
  "."
801
  msgstr ""
802
 
803
- #: widgets/lrgawidget.php:901
804
  msgid "Th"
805
  msgstr ""
806
 
@@ -810,109 +955,131 @@ msgid ""
810
  "it has saved your valuable time and efforts!"
811
  msgstr ""
812
 
813
- #: widgets/lrgawidget.php:285
814
  msgid ""
815
  "The selected view is using a different timezone than your <b>WordPress</b> "
816
  "timezone, which <u>may</u> cause inaccurate dates/values."
817
  msgstr ""
818
 
819
- #: widgets/lrgawidget.php:879
820
  msgid "This Month"
821
  msgstr ""
822
 
823
- #: widgets/lrgawidget.php:893
824
  msgid "To"
825
  msgstr ""
826
 
827
- #: widgets/lrgawidget.php:182
 
 
 
 
 
 
828
  msgid ""
829
  "To use the <b>Google Analytics</b> widget, you will need to create a <b>"
830
  "Google App</b> as follows :"
831
  msgstr ""
832
 
833
- #: widgets/lrgawidget.php:436
834
  msgid "Top 10 Pages"
835
  msgstr ""
836
 
837
- #: widgets/lrgawidget.php:884
838
  msgid "Total"
839
  msgstr ""
840
 
841
- #: widgets/lrgawidget.php:749
 
 
 
 
842
  msgid "Traffic sources."
843
  msgstr ""
844
 
845
- #: widgets/lrgawidget.php:899
846
  msgid "Tu"
847
  msgstr ""
848
 
849
- #: widgets/lrgawidget.php:190
 
 
 
 
850
  msgid ""
851
  "Under <b>Application type</b>, select <b>Other</b>, enter <b>Lara</b> then "
852
  "click <b>Create</b>."
853
  msgstr ""
854
 
855
- #: core/lrgawidget.class.php:84 widgets/lrgawidget.php:359
856
  msgid "Users"
857
  msgstr ""
858
 
859
- #: widgets/lrgawidget.php:255
860
  msgid "View"
861
  msgstr ""
862
 
863
- #: widgets/lrgawidget.php:794
864
  msgid "View all premuim features details"
865
  msgstr ""
866
 
867
- #: widgets/lrgawidget.php:280
868
  msgid "View Name"
869
  msgstr ""
870
 
871
- #: widgets/lrgawidget.php:106 widgets/lrgawidget.php:227
872
  msgid "View Search Console data for your verified sites"
873
  msgstr ""
874
 
875
- #: widgets/lrgawidget.php:282 widgets/lrgawidget.php:287
876
  msgid "View Time Zone"
877
  msgstr ""
878
 
879
- #: widgets/lrgawidget.php:281
880
  msgid "View Type"
881
  msgstr ""
882
 
883
- #: widgets/lrgawidget.php:105 widgets/lrgawidget.php:226
884
  msgid "View your Google Analytics data"
885
  msgstr ""
886
 
887
- #: widgets/lrgawidget.php:750
888
  msgid "Visitors Countries"
889
  msgstr ""
890
 
891
- #: widgets/lrgawidget.php:895
892
  msgid "W"
893
  msgstr ""
894
 
895
- #: widgets/lrgawidget.php:900
896
  msgid "We"
897
  msgstr ""
898
 
899
- #: widgets/lrgawidget.php:805
900
  msgid ""
901
  "We mix creativity with imagination, responsibility with passion, and "
902
  "resourcefulness with fun. That is what we do everyday within our company."
903
  msgstr ""
904
 
905
- #: widgets/lrgawidget.php:196
906
  msgid ""
907
  "When done, paste the <b>client ID</b> & <b>client secret</b> here and click "
908
  "<b>Submit</b>."
909
  msgstr ""
910
 
911
- #: widgets/lrgawidget.php:803
912
  msgid "Who we are & What we do"
913
  msgstr ""
914
 
915
- #: core/lrgawidget.permissions.php:78
 
 
 
 
 
 
 
 
916
  msgid "You do not have permission to access this page"
917
  msgstr ""
918
 
@@ -922,5 +1089,6 @@ msgstr ""
922
  #: core/lrgawidget.handler.php:62 core/lrgawidget.handler.php:66
923
  #: core/lrgawidget.handler.php:70 core/lrgawidget.handler.php:74
924
  #: core/lrgawidget.handler.php:78 core/lrgawidget.handler.php:82
 
925
  msgid "You do not have permission to access this tab!"
926
  msgstr ""
3
  msgstr ""
4
  "Project-Id-Version: Lara Google Analytics\n"
5
  "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2020-03-04 14:44+0000\n"
7
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
8
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
9
  "Language-Team: \n"
13
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Content-Transfer-Encoding: 8bit\n"
15
  "X-Generator: Loco https://localise.biz/\n"
16
+ "X-Loco-Version: 2.3.1; wp-5.4-RC1-47424"
17
 
18
+ #: core/lrgawidget.class.php:101 widgets/lrgawidget.php:457
19
  msgid "% New Sessions"
20
  msgstr ""
21
 
22
+ #: widgets/lrgawidget.php:928
23
  msgid "(filtered from _MAX_ total entries)"
24
  msgstr ""
25
 
26
+ #: widgets/lrgawidget.php:117
27
  msgid "1"
28
  msgstr ""
29
 
30
+ #: widgets/lrgawidget.php:836
31
  msgid "12 Months of Free Updates and Support"
32
  msgstr ""
33
 
34
+ #: widgets/lrgawidget.php:118
35
  msgid "2"
36
  msgstr ""
37
 
38
+ #: widgets/lrgawidget.php:119
39
  msgid "3"
40
  msgstr ""
41
 
42
+ #: widgets/lrgawidget.php:943
43
  msgid ": activate to sort column ascending"
44
  msgstr ""
45
 
46
+ #: widgets/lrgawidget.php:944
47
  msgid ": activate to sort column descending"
48
  msgstr ""
49
 
50
+ #: widgets/lrgawidget.php:638
51
  msgid ""
52
  "<b>Position</b> is the average ranking of your website URLs for that query "
53
  "or keyword, on Google search results."
54
  msgstr ""
55
 
56
+ #: widgets/lrgawidget.php:869
57
  msgid ""
58
  "<b>XtraOrbit</b> has been providing a wide range of services <b>since "
59
  "2002</b>, including <b>Web Hosting</b>, <b>Domain Names</b> & <b>Web "
60
  "Development</b>."
61
  msgstr ""
62
 
63
+ #: widgets/lrgawidget.php:163 widgets/lrgawidget.php:252
64
  msgid "Access Code"
65
  msgstr ""
66
 
67
+ #: widgets/lrgawidget.php:287
68
  msgid "Account"
69
  msgstr ""
70
 
71
+ #: widgets/lrgawidget.php:340
72
  msgid "Account Name"
73
  msgstr ""
74
 
75
+ #: widgets/lrgawidget.php:493
76
  msgid "active users on site"
77
  msgstr ""
78
 
79
+ #: widgets/lrgawidget.php:319
80
  msgid "Add <b>Google Universal Analytics</b> tracking code to all pages."
81
  msgstr ""
82
 
83
+ #: core/lrgawidget.permissions.php:34
84
  msgid "Administrator [Change Settings]"
85
  msgstr ""
86
 
87
+ #: widgets/lrgawidget.php:185
88
  msgid "Advanced Setup"
89
  msgstr ""
90
 
91
+ #: widgets/lrgawidget.php:365
92
  msgid ""
93
  "After adding your website to <b>Google Search Console</b> and verifying "
94
  "ownership, clich <b>Reload</b>, to reload the <b>Search Console Property "
95
  "URL</b> menu."
96
  msgstr ""
97
 
98
+ #: core/plugins/lrga_wp_woo_plugin.php:66
99
+ #: core/plugins/lrga_wp_woo_plugin.php:88
100
+ msgid "All Orders"
101
+ msgstr ""
102
+
103
+ #: widgets/lrgawidget.php:947
104
  msgid ""
105
  "All saved authentication data will be removed. Do you want to continue ?!"
106
  msgstr ""
109
  msgid "Amr M. Ibrahim"
110
  msgstr ""
111
 
112
+ #: widgets/lrgawidget.php:964
113
  msgid "Apply"
114
  msgstr ""
115
 
116
+ #: widgets/lrgawidget.php:983
117
  msgid "April"
118
  msgstr ""
119
 
120
+ #: widgets/lrgawidget.php:987
121
  msgid "August"
122
  msgstr ""
123
 
124
+ #: widgets/lrgawidget.php:118
125
  msgid "Authorize APP"
126
  msgstr ""
127
 
128
+ #: widgets/lrgawidget.php:265
129
  msgid "Authorize App"
130
  msgstr ""
131
 
132
+ #: core/lrgawidget.class.php:103 widgets/lrgawidget.php:443
133
  msgid "Avg. Session Duration"
134
  msgstr ""
135
 
136
+ #: widgets/lrgawidget.php:271
137
  msgid ""
138
  "Be sure to use the same email account that is linked to your <b>Google "
139
  "Analytics</b> and <b>Google Search Console</b> (formerly, Google Webmaster "
140
  "tools)."
141
  msgstr ""
142
 
143
+ #: core/lrgawidget.permissions.php:62
144
+ msgid "beta"
145
+ msgstr ""
146
+
147
+ #: core/lrgawidget.class.php:102 widgets/lrgawidget.php:450
148
  msgid "Bounce Rate"
149
  msgstr ""
150
 
151
+ #: widgets/lrgawidget.php:535
152
  msgid "Browser"
153
  msgstr ""
154
 
155
+ #: core/lrgawidget.permissions.php:47 widgets/lrgawidget.php:78
156
  msgid "Browsers"
157
  msgstr ""
158
 
159
+ #: widgets/lrgawidget.php:820
160
  msgid "Browsers versions (IE 6, IE 7 .. etc.)."
161
  msgstr ""
162
 
163
+ #: widgets/lrgawidget.php:856
164
  msgid "Buy Now"
165
  msgstr ""
166
 
167
+ #: widgets/lrgawidget.php:794
168
  msgid "Buy the Premium version and get access to these amazing features"
169
  msgstr ""
170
 
171
+ #: widgets/lrgawidget.php:188
172
  msgid ""
173
  "By clicking on <b>Start Advanced Setup</b> button below, The setup wizard "
174
  "will guide you through creating and/or configuring your own Google "
175
  "Application."
176
  msgstr ""
177
 
178
+ #: widgets/lrgawidget.php:955
179
  msgid "cached"
180
  msgstr ""
181
 
182
+ #: widgets/lrgawidget.php:965
183
  msgid "Cancel"
184
  msgstr ""
185
 
186
+ #: core/plugins/lrga_wp_woo_plugin.php:49
187
+ msgid "Cancelled"
188
+ msgstr ""
189
+
190
+ #: core/plugins/lrga_wp_woo_plugin.php:69
191
+ msgid "Categories"
192
+ msgstr ""
193
+
194
+ #: core/lrgawidget.permissions.php:42
195
  msgid "Change Date Range"
196
  msgstr ""
197
 
198
+ #: widgets/lrgawidget.php:830
199
  msgid "Check any Date Range, not just the last 30 days"
200
  msgstr ""
201
 
202
+ #: widgets/lrgawidget.php:843
203
  msgid ""
204
  "Check the<strong> Demo</strong> to see exactly how the premium version looks "
205
  "like, and what you will get from it without leaving your wordpress dashboard"
206
  msgstr ""
207
 
208
+ #: widgets/lrgawidget.php:150 widgets/lrgawidget.php:272
209
  msgid ""
210
  "Click <b>Allow</b>, then copy and paste the access code here, and click <b>"
211
  "Submit</b>."
212
  msgstr ""
213
 
214
+ #: widgets/lrgawidget.php:235
215
  msgid "Click <b>Analytics API</b>, then click <b>Enable API</b>."
216
  msgstr ""
217
 
218
+ #: widgets/lrgawidget.php:231
219
  msgid ""
220
  "Click on <b>Configure consent screen</b> and enter <b>Lara, The Google "
221
  "Analytics Widget</b> as the <b>Product Name</b>, then click <b>Save</b>."
222
  msgstr ""
223
 
224
+ #: widgets/lrgawidget.php:145
225
  msgid ""
226
  "Click on <b>Get Access Code</b> button below, and a pop-up window will open, "
227
  "asking you to allow <b>Lara, The Google Analytics Widget</b> to access the "
228
  "following:"
229
  msgstr ""
230
 
231
+ #: widgets/lrgawidget.php:266
232
  msgid ""
233
  "Click on <b>Get Access Code</b> button below, and a pop-up window will open, "
234
  "asking you to allow the <u>app you just created</u> to :"
235
  msgstr ""
236
 
237
+ #: widgets/lrgawidget.php:228
238
  msgid ""
239
  "Click on <b>Select a project</b> drop-down, and choose <b>Create a new "
240
  "project</b>."
241
  msgstr ""
242
 
243
+ #: widgets/lrgawidget.php:632
244
  msgid "Clicks"
245
  msgstr ""
246
 
247
+ #: widgets/lrgawidget.php:202
248
  msgid "Client ID"
249
  msgstr ""
250
 
251
+ #: widgets/lrgawidget.php:210
252
  msgid "Client Secret"
253
  msgstr ""
254
 
255
+ #: widgets/lrgawidget.php:45
256
+ msgid "Close"
257
+ msgstr ""
258
+
259
+ #: widgets/lrgawidget.php:872
260
  msgid "Come, check us out!"
261
  msgstr ""
262
 
263
+ #: core/lrgawidget.permissions.php:63
264
+ msgid "comming soon"
265
+ msgstr ""
266
+
267
+ #: core/plugins/lrga_wp_woo_plugin.php:46
268
+ #: core/plugins/lrga_wp_woo_plugin.php:56
269
+ msgid "Completed"
270
+ msgstr ""
271
+
272
+ #: core/lrgawidget.permissions.php:103
273
  msgid ""
274
  "Could not get or set widget permissions .. please contact an administrator"
275
  msgstr ""
276
 
277
+ #: core/lrgawidget.permissions.php:46 widgets/lrgawidget.php:75
278
  msgid "Countries"
279
  msgstr ""
280
 
281
+ #: widgets/lrgawidget.php:516
282
  msgid "Country"
283
  msgstr ""
284
 
285
+ #: widgets/lrgawidget.php:117 widgets/lrgawidget.php:223
286
  msgid "Create Google APP"
287
  msgstr ""
288
 
289
+ #: core/plugins/lrga_wp_woo_plugin.php:54
290
+ msgid "Created"
291
+ msgstr ""
292
+
293
+ #: widgets/lrgawidget.php:632
294
  msgid "CTR"
295
  msgstr ""
296
 
301
  "cURL extension for PHP."
302
  msgstr ""
303
 
304
+ #: widgets/lrgawidget.php:968
305
  msgid "Custom Range"
306
  msgstr ""
307
 
311
  msgid "DataBase Error .. please contact an administrator"
312
  msgstr ""
313
 
314
+ #: widgets/lrgawidget.php:991
315
  msgid "December"
316
  msgstr ""
317
 
318
+ #: widgets/lrgawidget.php:594
319
  msgid "Device Type"
320
  msgstr ""
321
 
322
+ #: widgets/lrgawidget.php:822
323
  msgid "Device Types and brands (Samsung, Apple .. etc.)."
324
  msgstr ""
325
 
326
+ #: core/lrgawidget.permissions.php:50 widgets/lrgawidget.php:87
327
  msgid "Devices"
328
  msgstr ""
329
 
330
+ #: core/lrgawidget.permissions.php:63
331
+ msgid "Easy Digital Downloads"
332
+ msgstr ""
333
+
334
+ #: core/lrgawidget.permissions.php:58
335
+ msgid "eCommerce Graphs"
336
+ msgstr ""
337
+
338
+ #: widgets/lrgawidget.php:806
339
+ msgid ""
340
+ "eCommerce graphs : </b>Highly customized earnings graphs, for popular "
341
+ "WordPress eCommerce plugins, like WooCommerce."
342
+ msgstr ""
343
+
344
+ #: core/lrgawidget.permissions.php:43
345
+ msgid "Edit Graph Options"
346
+ msgstr ""
347
+
348
+ #: core/plugins/lrga_earnings_sales.php:51
349
+ msgid "Empty Series"
350
+ msgstr ""
351
+
352
+ #: widgets/lrgawidget.php:323
353
+ msgid "Enable eCommerce graphs."
354
+ msgstr ""
355
+
356
+ #: widgets/lrgawidget.php:229
357
  msgid "Enter <b>Lara</b> as the <b>Project name</b>, then click <b>Create</b>."
358
  msgstr ""
359
 
360
+ #: widgets/lrgawidget.php:142
361
  msgid "Express Setup"
362
  msgstr ""
363
 
364
+ #: core/plugins/lrga_wp_woo_plugin.php:48
365
+ msgid "Failed"
366
+ msgstr ""
367
+
368
+ #: core/callURL.class.php:91 core/lrgawidget.class.php:471
369
+ #: core/lrgawidget.handler.php:91 core/lrgawidget.permissions.php:103
370
  #: core/storage.class.php:33 core/storage.class.php:36
371
  #: core/storage.class.php:39 core/storage.class.php:54
372
  #: core/storage.class.php:66 core/storage.class.php:86
373
  msgid "Fatal Error"
374
  msgstr ""
375
 
376
+ #: widgets/lrgawidget.php:981
377
  msgid "February"
378
  msgstr ""
379
 
380
+ #: widgets/lrgawidget.php:937
381
  msgid "First"
382
  msgstr ""
383
 
384
+ #: widgets/lrgawidget.php:976
385
  msgid "Fr"
386
  msgstr ""
387
 
388
+ #: widgets/lrgawidget.php:966
389
  msgid "From"
390
  msgstr ""
391
 
395
  "which also inserts latest Google Analytics tracking code to your pages."
396
  msgstr ""
397
 
398
+ #: widgets/lrgawidget.php:154 widgets/lrgawidget.php:275
399
  msgid "Get Access Code"
400
  msgstr ""
401
 
402
+ #: widgets/lrgawidget.php:129
403
  msgid "Go Back to Express Setup"
404
  msgstr ""
405
 
406
+ #: widgets/lrgawidget.php:99 widgets/lrgawidget.php:793
407
  msgid "Go Premium !"
408
  msgstr ""
409
 
410
+ #: widgets/lrgawidget.php:18
411
  msgid "Google Analytics"
412
  msgstr ""
413
 
416
  "Google Replied with unexpected replay, enable debugging to check the reply"
417
  msgstr ""
418
 
419
+ #: widgets/lrgawidget.php:24
420
+ msgid "Graph Options"
421
+ msgstr ""
422
+
423
+ #: widgets/lrgawidget.php:892
424
  msgid "Help & Support"
425
  msgstr ""
426
 
427
+ #: core/plugins/lrga_earnings_sales.php:54
428
+ #: core/plugins/lrga_earnings_sales.php:60
429
+ msgid "Hide"
430
+ msgstr ""
431
+
432
  #. Author URI of the plugin
433
  msgid "https://www.xtraorbit.com/"
434
  msgstr ""
441
  msgid "I already rated it"
442
  msgstr ""
443
 
444
+ #: widgets/lrgawidget.php:473 widgets/lrgawidget.php:501
445
+ #: widgets/lrgawidget.php:535 widgets/lrgawidget.php:555
446
+ #: widgets/lrgawidget.php:575 widgets/lrgawidget.php:594
447
+ #: widgets/lrgawidget.php:613 widgets/lrgawidget.php:632
448
+ #: widgets/lrgawidget.php:657
449
  msgid "ID"
450
  msgstr ""
451
 
452
+ #: widgets/lrgawidget.php:893
453
  msgid ""
454
  "If you are facing any issues, need support or have a new feature request, "
455
  "visit the official plugin support forum, where you will be able to submit a "
456
  "support ticket."
457
  msgstr ""
458
 
459
+ #: widgets/lrgawidget.php:152
460
  msgid ""
461
  "If you are using the <b>premium</b> version of the plugin, that email "
462
  "account should also be linked to your <b>Google Search Console</b>."
463
  msgstr ""
464
 
465
+ #: widgets/lrgawidget.php:364
466
  msgid ""
467
  "If you cannot find your website, please go to <a href=\"https://www.google."
468
  "com/webmasters/tools/\" target=\"_blank\">Google Search Console</a> and "
469
  "click on <b>Add a property</b>, to add your website."
470
  msgstr ""
471
 
472
+ #: core/wp.review.notice.php:74 widgets/lrgawidget.php:883
473
  msgid ""
474
  "If you have a free moment, and want to help us spread the word and boost our "
475
  "motivation, please do us a BIG favour and give us 5 Stars rating on "
477
  "the plugin :)"
478
  msgstr ""
479
 
480
+ #: widgets/lrgawidget.php:189
481
  msgid ""
482
  "If you want a quick start, or just trying the widget, use the <b>Express "
483
  "Setup</b> on the left."
484
  msgstr ""
485
 
486
+ #: widgets/lrgawidget.php:151
487
  msgid ""
488
  "If you were asked to login, be sure to use the same email account that is "
489
  "linked to your <b>Google Analytics</b>."
490
  msgstr ""
491
 
492
+ #: widgets/lrgawidget.php:632
493
  msgid "Impressions"
494
  msgstr ""
495
 
496
+ #: widgets/lrgawidget.php:957
497
  msgid "inactive"
498
  msgstr ""
499
 
500
+ #: core/plugins/lrga_wp_woo_plugin.php:29
501
+ msgid "Income"
502
+ msgstr ""
503
+
504
+ #: widgets/lrgawidget.php:948
505
  msgid ""
506
  "Initial Setup Required! - Please contact an administratior to complete the "
507
  "widget setup."
508
  msgstr ""
509
 
510
+ #: core/lrgawidget.handler.php:91
511
  msgid "Invalid Call"
512
  msgstr ""
513
 
519
  msgid "Invalid Reply"
520
  msgstr ""
521
 
522
+ #: widgets/lrgawidget.php:980
523
  msgid "January"
524
  msgstr ""
525
 
526
+ #: widgets/lrgawidget.php:986
527
  msgid "July"
528
  msgstr ""
529
 
530
+ #: widgets/lrgawidget.php:985
531
  msgid "June"
532
  msgstr ""
533
 
534
+ #: widgets/lrgawidget.php:632
535
  msgid "Keyword"
536
  msgstr ""
537
 
538
+ #: core/lrgawidget.permissions.php:52 widgets/lrgawidget.php:93
539
  msgid "Keywords"
540
  msgstr ""
541
 
542
+ #: widgets/lrgawidget.php:812
543
  msgid "Keywords ( provided by Google Search Console)."
544
  msgstr ""
545
 
546
+ #: widgets/lrgawidget.php:555
547
  msgid "Language"
548
  msgstr ""
549
 
550
+ #: core/lrgawidget.permissions.php:48 widgets/lrgawidget.php:81
551
  msgid "Languages"
552
  msgstr ""
553
 
555
  msgid "Lara's Google Analytics"
556
  msgstr ""
557
 
558
+ #: widgets/lrgawidget.php:938
559
  msgid "Last"
560
  msgstr ""
561
 
562
+ #: widgets/lrgawidget.php:952
563
  msgid "Last 30 Days"
564
  msgstr ""
565
 
566
+ #: widgets/lrgawidget.php:951
567
  msgid "Last 7 Days"
568
  msgstr ""
569
 
570
+ #: widgets/lrgawidget.php:954
571
  msgid "Last Month"
572
  msgstr ""
573
 
574
+ #: widgets/lrgawidget.php:846
575
  msgid "Launch Demo"
576
  msgstr ""
577
 
578
+ #: core/wp.review.notice.php:78 widgets/lrgawidget.php:885
579
  msgid "Let's do it, You deserve it"
580
  msgstr ""
581
 
582
+ #: widgets/lrgawidget.php:34 widgets/lrgawidget.php:42
583
+ msgid "Loading data, please wait !"
584
+ msgstr ""
585
+
586
+ #: widgets/lrgawidget.php:932
587
  msgid "Loading..."
588
  msgstr ""
589
 
590
+ #: widgets/lrgawidget.php:329
591
+ msgid "Lock settings"
592
+ msgstr ""
593
+
594
+ #: widgets/lrgawidget.php:805
595
+ msgid ""
596
+ "Lock Settings : </b>Prevent users from changing the widget settings or "
597
+ "viewing other Google analytics profiles."
598
+ msgstr ""
599
+
600
+ #: widgets/lrgawidget.php:982
601
  msgid "March"
602
  msgstr ""
603
 
604
+ #: widgets/lrgawidget.php:984
605
  msgid "May"
606
  msgstr ""
607
 
611
  "choose a valid <b>Search Console Property URL</b>."
612
  msgstr ""
613
 
614
+ #: widgets/lrgawidget.php:972
615
  msgid "Mo"
616
  msgstr ""
617
 
618
+ #: core/plugins/lrga_wp_woo_plugin.php:55
619
+ msgid "Modified"
620
+ msgstr ""
621
+
622
+ #: widgets/lrgawidget.php:803
623
  msgid ""
624
  "Multisite Multi-Network enabled : </b>Every blog/site in your network can "
625
  "has its own analytics tracking code and dashboard widget."
626
  msgstr ""
627
 
628
+ #: widgets/lrgawidget.php:939
629
  msgid "Next"
630
  msgstr ""
631
 
632
+ #: widgets/lrgawidget.php:959
633
  msgid "No active users"
634
  msgstr ""
635
 
636
+ #: widgets/lrgawidget.php:925
637
  msgid "No data available in table"
638
  msgstr ""
639
 
640
+ #: widgets/lrgawidget.php:950
641
  msgid ""
642
  "No data available in table. <span class='pull-left'><ul><li>Did you <a "
643
  "href='https://support.google.com/webmasters/answer/34592?hl=en' "
648
  "appear.</li></ul></span>"
649
  msgstr ""
650
 
651
+ #: widgets/lrgawidget.php:935
652
  msgid "No matching records found"
653
  msgstr ""
654
 
656
  msgid "Not Interested"
657
  msgstr ""
658
 
659
+ #: widgets/lrgawidget.php:990
660
  msgid "November"
661
  msgstr ""
662
 
663
+ #: widgets/lrgawidget.php:989
664
  msgid "October"
665
  msgstr ""
666
 
667
+ #: core/plugins/lrga_wp_woo_plugin.php:45
668
+ msgid "On Hold"
669
+ msgstr ""
670
+
671
+ #: widgets/lrgawidget.php:234
672
  msgid ""
673
  "Open <b>Google Developers Console</b> menu, by clicking on \" <i class=\"fa "
674
  "fa-bars\"></i> \" and select <b>API Manager</b>."
675
  msgstr ""
676
 
677
+ #: widgets/lrgawidget.php:227
678
  msgid ""
679
  "Open the <a target=\"_blank\" href=\"//console.developers.google."
680
  "com/apis/credentials?project=_\">Google Developers Console</a>."
681
  msgstr ""
682
 
683
+ #: widgets/lrgawidget.php:575
684
  msgid "Operating System"
685
  msgstr ""
686
 
687
+ #: core/lrgawidget.permissions.php:49 widgets/lrgawidget.php:84
688
  msgid "Operating Systems"
689
  msgstr ""
690
 
691
+ #: widgets/lrgawidget.php:821
692
  msgid "Operating Systems versions (Windows 7, Windows 8 .. etc.)."
693
  msgstr ""
694
 
695
+ #: core/plugins/lrga_wp_woo_plugin.php:52
696
+ msgid "Order Date"
697
+ msgstr ""
698
+
699
+ #: core/plugins/lrga_wp_woo_plugin.php:41
700
+ msgid "Order Status"
701
+ msgstr ""
702
+
703
+ #: core/plugins/lrga_wp_woo_plugin.php:28
704
+ msgid "Orders"
705
+ msgstr ""
706
+
707
+ #: widgets/lrgawidget.php:473 widgets/lrgawidget.php:501
708
  msgid "Page"
709
  msgstr ""
710
 
711
+ #: core/lrgawidget.permissions.php:54 widgets/lrgawidget.php:69
712
  msgid "Pages"
713
  msgstr ""
714
 
715
+ #: core/lrgawidget.class.php:104 widgets/lrgawidget.php:436
716
  msgid "Pages / Session"
717
  msgstr ""
718
 
719
+ #: core/lrgawidget.class.php:100 widgets/lrgawidget.php:429
720
+ #: widgets/lrgawidget.php:473 widgets/lrgawidget.php:501
721
  msgid "Pageviews"
722
  msgstr ""
723
 
724
+ #: core/plugins/lrga_wp_woo_plugin.php:57
725
+ msgid "Paid"
726
+ msgstr ""
727
+
728
+ #: core/plugins/lrga_wp_woo_plugin.php:43
729
+ msgid "Pending"
730
+ msgstr ""
731
+
732
+ #: widgets/lrgawidget.php:473 widgets/lrgawidget.php:501
733
+ #: widgets/lrgawidget.php:516 widgets/lrgawidget.php:535
734
+ #: widgets/lrgawidget.php:555 widgets/lrgawidget.php:575
735
+ #: widgets/lrgawidget.php:594 widgets/lrgawidget.php:613
736
+ #: widgets/lrgawidget.php:657
737
  msgid "Percentage"
738
  msgstr ""
739
 
741
  msgid "Permissions"
742
  msgstr ""
743
 
744
+ #: widgets/lrgawidget.php:804
745
  msgid ""
746
  "Permissions : </b>Easily control which data is viwed by your blog admins and "
747
  "users (also compatible with Multisite Multi-Network)."
748
  msgstr ""
749
 
750
+ #: widgets/lrgawidget.php:361
751
  msgid ""
752
  "Please choose a valid <b>Search Console Property URL</b>, or the widget will "
753
  "not be able to get keywords data for your website."
754
  msgstr ""
755
 
756
+ #: widgets/lrgawidget.php:632
757
  msgid "Position"
758
  msgstr ""
759
 
760
+ #: widgets/lrgawidget.php:326
761
+ msgid "Premium Settings"
762
+ msgstr ""
763
+
764
+ #: widgets/lrgawidget.php:940
765
  msgid "Previous"
766
  msgstr ""
767
 
768
+ #: core/plugins/lrga_wp_woo_plugin.php:44
769
+ msgid "Processing"
770
+ msgstr ""
771
+
772
+ #: widgets/lrgawidget.php:933
773
  msgid "Processing..."
774
  msgstr ""
775
 
776
+ #: core/plugins/lrga_wp_woo_plugin.php:73
777
+ msgid "Products"
778
+ msgstr ""
779
+
780
+ #: widgets/lrgawidget.php:339
781
  msgid "Profile Details"
782
  msgstr ""
783
 
784
+ #: widgets/lrgawidget.php:292
785
  msgid "Property"
786
  msgstr ""
787
 
788
+ #: widgets/lrgawidget.php:341
789
  msgid "Property Name"
790
  msgstr ""
791
 
792
+ #: widgets/lrgawidget.php:358
793
  msgid "Property Url"
794
  msgstr ""
795
 
796
+ #: widgets/lrgawidget.php:342
797
  msgid "Property WebsiteUrl"
798
  msgstr ""
799
 
800
+ #: widgets/lrgawidget.php:882
801
  msgid "Rate Us"
802
  msgstr ""
803
 
804
+ #: core/lrgawidget.permissions.php:45 widgets/lrgawidget.php:72
805
+ #: widgets/lrgawidget.php:956
806
  msgid "Real Time"
807
  msgstr ""
808
 
809
+ #: widgets/lrgawidget.php:813
810
  msgid "Real Time site visitors"
811
  msgstr ""
812
 
813
+ #: core/plugins/lrga_wp_woo_plugin.php:47
814
+ msgid "Refunded"
815
+ msgstr ""
816
+
817
+ #: widgets/lrgawidget.php:367
818
  msgid "Reload"
819
  msgstr ""
820
 
821
+ #: widgets/lrgawidget.php:126
822
  msgid "Reset all data and start over"
823
  msgstr ""
824
 
825
+ #: widgets/lrgawidget.php:491
826
  msgid "Right now"
827
  msgstr ""
828
 
829
+ #: widgets/lrgawidget.php:977
830
  msgid "Sa"
831
  msgstr ""
832
 
833
+ #: widgets/lrgawidget.php:44 widgets/lrgawidget.php:333
834
+ #: widgets/lrgawidget.php:394
835
  msgid "Save"
836
  msgstr ""
837
 
838
+ #: widgets/lrgawidget.php:90 widgets/lrgawidget.php:613
839
  msgid "Screen Resolution"
840
  msgstr ""
841
 
842
+ #: core/lrgawidget.permissions.php:51
843
  msgid "Screen Resolutions"
844
  msgstr ""
845
 
846
+ #: widgets/lrgawidget.php:357
847
  msgid "Search Console Property"
848
  msgstr ""
849
 
850
+ #: widgets/lrgawidget.php:236
851
  msgid ""
852
  "Search for <b>Google Search Console API</b>, then click <b>Enable API</b>."
853
  msgstr ""
854
 
855
+ #: widgets/lrgawidget.php:934
856
  msgid "Search:"
857
  msgstr ""
858
 
859
+ #: widgets/lrgawidget.php:230
860
  msgid "Select <b>Create credentials</b> and choose <b>OAuth client ID</b>."
861
  msgstr ""
862
 
863
+ #: widgets/lrgawidget.php:119
864
  msgid "Select Analytics Profile"
865
  msgstr ""
866
 
867
+ #: widgets/lrgawidget.php:949
868
  msgid "Select Property URL"
869
  msgstr ""
870
 
871
+ #: widgets/lrgawidget.php:988
872
  msgid "September"
873
  msgstr ""
874
 
875
+ #: core/lrgawidget.class.php:98 core/lrgawidget.permissions.php:44
876
+ #: widgets/lrgawidget.php:66 widgets/lrgawidget.php:415
877
+ #: widgets/lrgawidget.php:516 widgets/lrgawidget.php:535
878
+ #: widgets/lrgawidget.php:555 widgets/lrgawidget.php:575
879
+ #: widgets/lrgawidget.php:594 widgets/lrgawidget.php:613
880
+ #: widgets/lrgawidget.php:657
881
  msgid "Sessions"
882
  msgstr ""
883
 
884
+ #: widgets/lrgawidget.php:40
885
+ msgid "Settings"
886
+ msgstr ""
887
+
888
+ #: core/plugins/lrga_earnings_sales.php:53
889
+ #: core/plugins/lrga_earnings_sales.php:59
890
+ msgid "Show"
891
+ msgstr ""
892
+
893
+ #: widgets/lrgawidget.php:931
894
  msgid "Show _MENU_ entries"
895
  msgstr ""
896
 
897
+ #: widgets/lrgawidget.php:927
898
  msgid "Showing 0 to 0 of 0 entries"
899
  msgstr ""
900
 
901
+ #: widgets/lrgawidget.php:926
902
  msgid "Showing _START_ to _END_ of _TOTAL_ entries"
903
  msgstr ""
904
 
905
+ #: core/lrgawidget.class.php:471
906
  msgid "Something went wrong .. please contact an administrator"
907
  msgstr ""
908
 
909
+ #: widgets/lrgawidget.php:96 widgets/lrgawidget.php:657
910
  msgid "Source"
911
  msgstr ""
912
 
913
+ #: core/lrgawidget.permissions.php:53
914
  msgid "Sources"
915
  msgstr ""
916
 
917
+ #: widgets/lrgawidget.php:190
918
  msgid "Start Advanced Setup"
919
  msgstr ""
920
 
921
+ #: widgets/lrgawidget.php:971
922
  msgid "Su"
923
  msgstr ""
924
 
925
+ #: widgets/lrgawidget.php:170 widgets/lrgawidget.php:218
926
+ #: widgets/lrgawidget.php:260
927
  msgid "Submit"
928
  msgstr ""
929
 
930
+ #: core/lrgawidget.permissions.php:33
931
  msgid "Super Administrator [Change Permissions]"
932
  msgstr ""
933
 
934
+ #: widgets/lrgawidget.php:895
935
  msgid "Support Center"
936
  msgstr ""
937
 
938
+ #: core/lrgawidget.permissions.php:38
939
  msgid "Tabs"
940
  msgstr ""
941
 
942
+ #: widgets/lrgawidget.php:233
943
  msgid ""
944
  "Take note of the <b>client ID</b> & <b>client secret</b> then click <b>Ok</b>"
945
  "."
946
  msgstr ""
947
 
948
+ #: widgets/lrgawidget.php:975
949
  msgid "Th"
950
  msgstr ""
951
 
955
  "it has saved your valuable time and efforts!"
956
  msgstr ""
957
 
958
+ #: widgets/lrgawidget.php:348
959
  msgid ""
960
  "The selected view is using a different timezone than your <b>WordPress</b> "
961
  "timezone, which <u>may</u> cause inaccurate dates/values."
962
  msgstr ""
963
 
964
+ #: widgets/lrgawidget.php:953
965
  msgid "This Month"
966
  msgstr ""
967
 
968
+ #: widgets/lrgawidget.php:967
969
  msgid "To"
970
  msgstr ""
971
 
972
+ #: widgets/lrgawidget.php:329
973
+ msgid ""
974
+ "To unlock after saving, you will need to <b>reset all data</b> and re-"
975
+ "authorize with Google Analytics"
976
+ msgstr ""
977
+
978
+ #: widgets/lrgawidget.php:224
979
  msgid ""
980
  "To use the <b>Google Analytics</b> widget, you will need to create a <b>"
981
  "Google App</b> as follows :"
982
  msgstr ""
983
 
984
+ #: widgets/lrgawidget.php:499
985
  msgid "Top 10 Pages"
986
  msgstr ""
987
 
988
+ #: widgets/lrgawidget.php:958
989
  msgid "Total"
990
  msgstr ""
991
 
992
+ #: core/plugins/lrga_earnings_sales.php:57
993
+ msgid "Totals"
994
+ msgstr ""
995
+
996
+ #: widgets/lrgawidget.php:814
997
  msgid "Traffic sources."
998
  msgstr ""
999
 
1000
+ #: widgets/lrgawidget.php:973
1001
  msgid "Tu"
1002
  msgstr ""
1003
 
1004
+ #: core/plugins/lrga_wp_woo_plugin.php:76
1005
+ msgid "Types"
1006
+ msgstr ""
1007
+
1008
+ #: widgets/lrgawidget.php:232
1009
  msgid ""
1010
  "Under <b>Application type</b>, select <b>Other</b>, enter <b>Lara</b> then "
1011
  "click <b>Create</b>."
1012
  msgstr ""
1013
 
1014
+ #: core/lrgawidget.class.php:99 widgets/lrgawidget.php:422
1015
  msgid "Users"
1016
  msgstr ""
1017
 
1018
+ #: widgets/lrgawidget.php:297
1019
  msgid "View"
1020
  msgstr ""
1021
 
1022
+ #: widgets/lrgawidget.php:859
1023
  msgid "View all premuim features details"
1024
  msgstr ""
1025
 
1026
+ #: widgets/lrgawidget.php:343
1027
  msgid "View Name"
1028
  msgstr ""
1029
 
1030
+ #: widgets/lrgawidget.php:148 widgets/lrgawidget.php:269
1031
  msgid "View Search Console data for your verified sites"
1032
  msgstr ""
1033
 
1034
+ #: widgets/lrgawidget.php:345 widgets/lrgawidget.php:350
1035
  msgid "View Time Zone"
1036
  msgstr ""
1037
 
1038
+ #: widgets/lrgawidget.php:344
1039
  msgid "View Type"
1040
  msgstr ""
1041
 
1042
+ #: widgets/lrgawidget.php:147 widgets/lrgawidget.php:268
1043
  msgid "View your Google Analytics data"
1044
  msgstr ""
1045
 
1046
+ #: widgets/lrgawidget.php:815
1047
  msgid "Visitors Countries"
1048
  msgstr ""
1049
 
1050
+ #: widgets/lrgawidget.php:969
1051
  msgid "W"
1052
  msgstr ""
1053
 
1054
+ #: widgets/lrgawidget.php:974
1055
  msgid "We"
1056
  msgstr ""
1057
 
1058
+ #: widgets/lrgawidget.php:870
1059
  msgid ""
1060
  "We mix creativity with imagination, responsibility with passion, and "
1061
  "resourcefulness with fun. That is what we do everyday within our company."
1062
  msgstr ""
1063
 
1064
+ #: widgets/lrgawidget.php:238
1065
  msgid ""
1066
  "When done, paste the <b>client ID</b> & <b>client secret</b> here and click "
1067
  "<b>Submit</b>."
1068
  msgstr ""
1069
 
1070
+ #: widgets/lrgawidget.php:868
1071
  msgid "Who we are & What we do"
1072
  msgstr ""
1073
 
1074
+ #: core/lrgawidget.permissions.php:62 core/plugins/lrga_wp_woo_plugin.php:27
1075
+ msgid "WooCommerce"
1076
+ msgstr ""
1077
+
1078
+ #: widgets/lrgawidget.php:326
1079
+ msgid "Works in the Pro version only"
1080
+ msgstr ""
1081
+
1082
+ #: core/lrgawidget.permissions.php:92
1083
  msgid "You do not have permission to access this page"
1084
  msgstr ""
1085
 
1089
  #: core/lrgawidget.handler.php:62 core/lrgawidget.handler.php:66
1090
  #: core/lrgawidget.handler.php:70 core/lrgawidget.handler.php:74
1091
  #: core/lrgawidget.handler.php:78 core/lrgawidget.handler.php:82
1092
+ #: core/lrgawidget.handler.php:86
1093
  msgid "You do not have permission to access this tab!"
1094
  msgstr ""
lara-google-analytics.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Lara's Google Analytics
5
  Plugin URI: https://www.xtraorbit.com/wordpress-google-analytics-dashboard-widget/
6
  Description: Full width Google Analytics dashboard widget for Wordpress admin interface, which also inserts latest Google Analytics tracking code to your pages.
7
- Version: 3.1.0
8
  Author: Amr M. Ibrahim
9
  Author URI: https://www.xtraorbit.com/
10
  License: GPL2
@@ -12,8 +12,8 @@ Text Domain: lara-google-analytics
12
  Domain Path: /languages/
13
  */
14
 
15
- define ("lrgawidget_plugin_version", "3.1.0");
16
- define ("lrgawidget_plugin_scripts_version", "310");
17
  define ("lrgawidget_plugin_prefiex", "lrgalite-");
18
  define ("lrgawidget_plugin_dist_dir", plugin_dir_url( __FILE__ ).'dist/');
19
  define ("lrgawidget_plugin_plugins_dir", plugin_dir_url( __FILE__ ).'dist/plugins/');
@@ -37,6 +37,7 @@ add_action( 'wp_ajax_lrgawidget_getOS', 'lrgawidget_callback' );
37
  add_action( 'wp_ajax_lrgawidget_getDevices', 'lrgawidget_callback' );
38
  add_action( 'wp_ajax_lrgawidget_getScreenResolution', 'lrgawidget_callback' );
39
  add_action( 'wp_ajax_lrgawidget_getPages', 'lrgawidget_callback' );
 
40
  add_action( 'wp_ajax_lrgawidget_getPermissions', 'lrgawidget_permissions_editor' );
41
  add_action( 'wp_head', 'lrgawidget_ga_code');
42
 
@@ -47,7 +48,6 @@ function lrgawidget_load_textdomain() {
47
  load_plugin_textdomain( 'lara-google-analytics', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
48
  }
49
 
50
-
51
  require_once(dirname(__FILE__).'/core/wp.helper.functions.php');
52
 
53
  function lrgawidget_enqueue($hook) {
@@ -59,7 +59,7 @@ function lrgawidget_enqueue($hook) {
59
  wp_enqueue_script( 'jquery' );
60
  wp_enqueue_script( lrgawidget_plugin_prefiex.'main', plugin_dir_url( __FILE__ ).'dist/js/'.lrgawidget_plugin_prefiex.'main.js' ,array('jquery'),lrgawidget_plugin_scripts_version,true);
61
  wp_localize_script( lrgawidget_plugin_prefiex.'main', 'lrgawidget_ajax_object', array( 'lrgawidget_ajax_url' => admin_url( 'admin-ajax.php' ) ));
62
- add_action( 'admin_notices', 'lrga_welcome_panel' );
63
  }else{
64
  wp_enqueue_script( 'jquery' );
65
  wp_enqueue_script( lrgawidget_plugin_prefiex.'main', plugin_dir_url( __FILE__ ).'dist/js/lrgawidget_control.js' ,array('jquery'),lrgawidget_plugin_scripts_version);
@@ -92,6 +92,8 @@ function lrgawidget_internal_permissions(){
92
  "lrgawidget_perm_devices",
93
  "lrgawidget_perm_screenres",
94
  "lrgawidget_perm_pages",
 
 
95
  "lrgawidget_perm_promo");
96
  $parray["permissions"] = $globalWidgetPermissions;
97
  return $parray;
@@ -111,7 +113,8 @@ function lrgawidget_permissions_editor() {
111
  function lrgawidget_callback() {
112
  $lrperm = lrgawidget_internal_permissions();
113
  if (current_user_can('manage_options')) {
114
- $lrdata = array_map ( 'htmlspecialchars' , $_POST );
 
115
  $modifiedAction = explode("_", $lrdata['action']);
116
  $lrdata['action'] = sanitize_text_field($modifiedAction[1]);
117
 
4
  Plugin Name: Lara's Google Analytics
5
  Plugin URI: https://www.xtraorbit.com/wordpress-google-analytics-dashboard-widget/
6
  Description: Full width Google Analytics dashboard widget for Wordpress admin interface, which also inserts latest Google Analytics tracking code to your pages.
7
+ Version: 3.2.0
8
  Author: Amr M. Ibrahim
9
  Author URI: https://www.xtraorbit.com/
10
  License: GPL2
12
  Domain Path: /languages/
13
  */
14
 
15
+ define ("lrgawidget_plugin_version", "3.2.0");
16
+ define ("lrgawidget_plugin_scripts_version", "320");
17
  define ("lrgawidget_plugin_prefiex", "lrgalite-");
18
  define ("lrgawidget_plugin_dist_dir", plugin_dir_url( __FILE__ ).'dist/');
19
  define ("lrgawidget_plugin_plugins_dir", plugin_dir_url( __FILE__ ).'dist/plugins/');
37
  add_action( 'wp_ajax_lrgawidget_getDevices', 'lrgawidget_callback' );
38
  add_action( 'wp_ajax_lrgawidget_getScreenResolution', 'lrgawidget_callback' );
39
  add_action( 'wp_ajax_lrgawidget_getPages', 'lrgawidget_callback' );
40
+ add_action( 'wp_ajax_lrgawidget_getGraphData', 'lrgawidget_callback' );
41
  add_action( 'wp_ajax_lrgawidget_getPermissions', 'lrgawidget_permissions_editor' );
42
  add_action( 'wp_head', 'lrgawidget_ga_code');
43
 
48
  load_plugin_textdomain( 'lara-google-analytics', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
49
  }
50
 
 
51
  require_once(dirname(__FILE__).'/core/wp.helper.functions.php');
52
 
53
  function lrgawidget_enqueue($hook) {
59
  wp_enqueue_script( 'jquery' );
60
  wp_enqueue_script( lrgawidget_plugin_prefiex.'main', plugin_dir_url( __FILE__ ).'dist/js/'.lrgawidget_plugin_prefiex.'main.js' ,array('jquery'),lrgawidget_plugin_scripts_version,true);
61
  wp_localize_script( lrgawidget_plugin_prefiex.'main', 'lrgawidget_ajax_object', array( 'lrgawidget_ajax_url' => admin_url( 'admin-ajax.php' ) ));
62
+ add_action('in_admin_header','lrga_welcome_panel');
63
  }else{
64
  wp_enqueue_script( 'jquery' );
65
  wp_enqueue_script( lrgawidget_plugin_prefiex.'main', plugin_dir_url( __FILE__ ).'dist/js/lrgawidget_control.js' ,array('jquery'),lrgawidget_plugin_scripts_version);
92
  "lrgawidget_perm_devices",
93
  "lrgawidget_perm_screenres",
94
  "lrgawidget_perm_pages",
95
+ "lrgawidget_perm_graph_options",
96
+ "lrgawidget_perm_ecom_woo",
97
  "lrgawidget_perm_promo");
98
  $parray["permissions"] = $globalWidgetPermissions;
99
  return $parray;
113
  function lrgawidget_callback() {
114
  $lrperm = lrgawidget_internal_permissions();
115
  if (current_user_can('manage_options')) {
116
+ array_walk_recursive($_POST, "Lara\Utils\Common\WPHelperFunctions::sanitizer");
117
+ $lrdata = $_POST;
118
  $modifiedAction = explode("_", $lrdata['action']);
119
  $lrdata['action'] = sanitize_text_field($modifiedAction[1]);
120
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Tags: analytics,google analytics,google analytics dashboard,google analytics plu
3
  Contributors: amribrahim, laragoogleanalytics
4
  Requires PHP: 5.3.0
5
  Requires at least: 4.0
6
- Tested up to: 5.3.2
7
- Stable tag: 3.1.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -123,4 +123,10 @@ Adds a full width Google Analytics dashboard widget for WordPress admin interfac
123
  = 3.1.0 =
124
  * 26-Jan-2020
125
  * New : Localization support.
126
- * New : Review notice.
 
 
 
 
 
 
3
  Contributors: amribrahim, laragoogleanalytics
4
  Requires PHP: 5.3.0
5
  Requires at least: 4.0
6
+ Tested up to: 5.4.0
7
+ Stable tag: 3.2.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
123
  = 3.1.0 =
124
  * 26-Jan-2020
125
  * New : Localization support.
126
+ * New : Review notice.
127
+
128
+ = 3.2.0 =
129
+ * 5-Mar-2020
130
+ * New : [pro] Added the ability to lock settings for users.
131
+ * New : WooCommerce earnings graph.
132
+ * Fix : Compatibility issues with other plugins, that causes the widget to display a blank page, instead of the main graph.
widgets/lrgawidget.php CHANGED
@@ -1,5 +1,16 @@
1
- <div id="lrgawidget_wrap" class="wrap"><!-- /.wrap -->
2
- <h1><?php echo __('Dashboard'); ?></h1>
 
 
 
 
 
 
 
 
 
 
 
3
  <div class="lrga_bs" ><!-- /.class -->
4
  <div class="lrga_bs lrgawidget"><!-- /.id -->
5
  <div class="box box-primary" id="lrgawidget">
@@ -8,6 +19,37 @@
8
  <div class="box-tools pull-right">
9
  <span id="lrgawidget_loading"></span>
10
  <span id="lrgawidget_mode" class="label label-success"></span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  <button type="button" class="btn btn-box-tool" id="lrgawidget_daterange_label">
12
  <i class="fa fa-calendar"></i>
13
  <span id="lrgawidget_reportrange"></span>
@@ -256,16 +298,37 @@
256
  <select class="form-control" style="width: 100%;" id="lrgawidget-profiles" name="profile_id">
257
  </select>
258
  </div>
 
 
259
  <?php
260
- $is_traching_enabled = "";
261
  $enable_universal_tracking = Lara\Utils\Common\WPHelperFunctions::get_blog_option('enable_universal_tracking');
262
  if ($enable_universal_tracking !== "off"){
263
- $is_traching_enabled = "checked";
264
  }
 
 
 
 
 
 
 
265
  ?>
266
- <div class="callout" style="padding: 5px;">
267
- <input name="enable_universal_tracking" <?php echo $is_traching_enabled ?> type="checkbox" style="margin: 0px;" value="on"> <?php _e('Add <b>Google Universal Analytics</b> tracking code to all pages.', 'lara-google-analytics'); ?>
 
 
 
 
 
268
  </div>
 
 
 
 
 
 
 
269
  <div>
270
  <button class="btn btn-primary" type="submit" id="lrgawidget-save-settings"><?php _e('Save', 'lara-google-analytics'); ?></button>
271
  </div>
@@ -323,7 +386,7 @@ if ($enable_universal_tracking !== "off"){
323
  </ul>
324
  </div>
325
  <div class="col-md-9">
326
- <form id="lrgawidget_permissions_form"" role="form">
327
  <input name="action" type="hidden" value="setPermissions">
328
  <div class="tab-content" id="lrgawidget_permissions_list">
329
  </div>
@@ -739,6 +802,8 @@ if ($enable_universal_tracking !== "off"){
739
  <ul class="fa-ul" style="margin-top: 5px;margin-bottom: 5px;">
740
  <li><i class="fa-li fa fa-sitemap fa-lg fa-fw"></i><b><?php _e('Multisite Multi-Network enabled : </b>Every blog/site in your network can has its own analytics tracking code and dashboard widget.', 'lara-google-analytics'); ?></li>
741
  <li><i class="fa-li fa fa-key fa-lg fa-fw"></i><b><?php _e('Permissions : </b>Easily control which data is viwed by your blog admins and users (also compatible with Multisite Multi-Network).', 'lara-google-analytics'); ?></li>
 
 
742
  </ul>
743
  </div>
744
 
@@ -847,6 +912,15 @@ if ($enable_universal_tracking !== "off"){
847
  <!-- /.revise -->
848
  <?php if (!empty($actLrgaTabs[0])){ ?>
849
  <script type="text/javascript">
 
 
 
 
 
 
 
 
 
850
  var actLrgaTabs = '<?php echo $actLrgaTabs[0]; ?>';
851
  var lrdataTableLang = { "sEmptyTable": <?php echo '"'.__('No data available in table', 'lara-google-analytics').'"'; ?>,
852
  "sInfo": <?php echo '"'.__('Showing _START_ to _END_ of _TOTAL_ entries', 'lara-google-analytics').'"'; ?>,
1
+
2
+ <style type="text/css" id="lrgawidget_loader">
3
+ #dashboard-widgets-wrap::before {
4
+ content: "";
5
+ width:99%;
6
+ height:550px;
7
+ margin:8px !important;
8
+ display: inline-block;
9
+ background-color: #ffffff;
10
+ }
11
+ </style>
12
+
13
+ <div id="lrgawidget_wrap" style="display:none;"><!-- /.wrap -->
14
  <div class="lrga_bs" ><!-- /.class -->
15
  <div class="lrga_bs lrgawidget"><!-- /.id -->
16
  <div class="box box-primary" id="lrgawidget">
19
  <div class="box-tools pull-right">
20
  <span id="lrgawidget_loading"></span>
21
  <span id="lrgawidget_mode" class="label label-success"></span>
22
+
23
+ <?php if (in_array("lrgawidget_perm_graph_options",$globalWidgetPermissions)){ ?>
24
+ <button id="lrghop_button" class="btn btn-box-tool hidden-xs " type="button" style="display: none;"><i class="fa fa-bar-chart"></i><?php _e('Graph Options', 'lara-google-analytics'); ?></button>
25
+ <div id="lrghop_menu" class="dropdown-menu">
26
+ <div class="lrghop_colorselector_container hidden-xs" style="display: none;"><div class="lrghop_colorselector"></div></div>
27
+ <form id="lrghop_form" name="lrghop_form" role="form">
28
+ <input name="action" type="hidden" value="setGraphData">
29
+ <input name="currentfilter" type="hidden" value="">
30
+ <div class="row">
31
+ <div class="col-sm-8">
32
+ <div id="lrghop_panels">
33
+ <div data-lrgh-panel="settings" id="lrghop_settings"></div>
34
+ <div id="lrgfilters_panels"><i class="fa fa-spinner fa-pulse"></i> <?php _e('Loading data, please wait !', 'lara-google-analytics'); ?></div>
35
+ </div>
36
+ </div>
37
+
38
+ <div class="col-sm-4">
39
+ <div id="lrghop_buttons">
40
+ <button class="btn btn-primary btn-sm btn-block" data-lrghop-button="settings" type="button"><i class="fa fa fa-cog fa-lg"></i><?php _e('Settings', 'lara-google-analytics'); ?></button>
41
+ <hr/>
42
+ <div id="lrgfilters_buttons"><i class="fa fa-spinner fa-pulse"></i> <?php _e('Loading data, please wait !', 'lara-google-analytics'); ?></div>
43
+ <hr/>
44
+ <button class="btn btn-success btn-sm btn-block" type="submit"><i class="fa fa fa-floppy-o fa-lg"></i> <?php _e('Save', 'lara-google-analytics'); ?></button>
45
+ <button class="btn btn-default btn-sm btn-block" id="lrghop_cancel" type="button"><i class="fa fa-ban fa-lg"></i> <?php _e('Close', 'lara-google-analytics'); ?></button>
46
+ </div>
47
+ </div>
48
+ </div>
49
+ </form>
50
+ </div>
51
+ <?php } ?>
52
+
53
  <button type="button" class="btn btn-box-tool" id="lrgawidget_daterange_label">
54
  <i class="fa fa-calendar"></i>
55
  <span id="lrgawidget_reportrange"></span>
298
  <select class="form-control" style="width: 100%;" id="lrgawidget-profiles" name="profile_id">
299
  </select>
300
  </div>
301
+
302
+
303
  <?php
304
+ $traching_enabled = "";
305
  $enable_universal_tracking = Lara\Utils\Common\WPHelperFunctions::get_blog_option('enable_universal_tracking');
306
  if ($enable_universal_tracking !== "off"){
307
+ $traching_enabled = "checked";
308
  }
309
+
310
+ $ecommerce_graph_enabled = "";
311
+ $enable_ecommerce_graph = Lara\Utils\Common\WPHelperFunctions::get_blog_option('enable_ecommerce_graph');
312
+ if ($enable_ecommerce_graph !== "off"){
313
+ $ecommerce_graph_enabled = "checked";
314
+ }
315
+
316
  ?>
317
+ <div class="lrgawidget-settings-checkbox">
318
+ <input name="enable_universal_tracking" id="enable_universal_tracking" <?php echo $traching_enabled ?> type="checkbox" value="on">
319
+ <label for="enable_universal_tracking"><?php _e('Add <b>Google Universal Analytics</b> tracking code to all pages.', 'lara-google-analytics'); ?></label>
320
+ </div>
321
+ <div class="lrgawidget-settings-checkbox">
322
+ <input name="enable_ecommerce_graph" id="enable_ecommerce_graph" <?php echo $ecommerce_graph_enabled ?> type="checkbox" value="on">
323
+ <label for="enable_ecommerce_graph"><?php _e('Enable eCommerce graphs.', 'lara-google-analytics'); ?></label>
324
  </div>
325
+ <div class="lrgawidget-settings-pro">
326
+ <div><b><?php _e('Premium Settings', 'lara-google-analytics'); ?> </b> [ <?php _e('Works in the Pro version only', 'lara-google-analytics'); ?> ] :</div>
327
+ <div class="lrgawidget-settings-checkbox lrgawidget-lock-settings">
328
+ <input type="checkbox" id="lrgawidget-lock-settings" name="lock_settings" value="on" />
329
+ <label for="lrgawidget-lock-settings"><?php _e('Lock settings', 'lara-google-analytics'); ?> - [<?php _e('To unlock after saving, you will need to <b>reset all data</b> and re-authorize with Google Analytics', 'lara-google-analytics'); ?>].</label>
330
+ </div>
331
+ </div>
332
  <div>
333
  <button class="btn btn-primary" type="submit" id="lrgawidget-save-settings"><?php _e('Save', 'lara-google-analytics'); ?></button>
334
  </div>
386
  </ul>
387
  </div>
388
  <div class="col-md-9">
389
+ <form id="lrgawidget_permissions_form" role="form">
390
  <input name="action" type="hidden" value="setPermissions">
391
  <div class="tab-content" id="lrgawidget_permissions_list">
392
  </div>
802
  <ul class="fa-ul" style="margin-top: 5px;margin-bottom: 5px;">
803
  <li><i class="fa-li fa fa-sitemap fa-lg fa-fw"></i><b><?php _e('Multisite Multi-Network enabled : </b>Every blog/site in your network can has its own analytics tracking code and dashboard widget.', 'lara-google-analytics'); ?></li>
804
  <li><i class="fa-li fa fa-key fa-lg fa-fw"></i><b><?php _e('Permissions : </b>Easily control which data is viwed by your blog admins and users (also compatible with Multisite Multi-Network).', 'lara-google-analytics'); ?></li>
805
+ <li><i class="fa-li fa fa-lock fa-lg fa-fw"></i><b><?php _e('Lock Settings : </b>Prevent users from changing the widget settings or viewing other Google analytics profiles.', 'lara-google-analytics'); ?></li>
806
+ <li><i class="fa-li fa fa-usd fa-lg fa-fw"></i><b><?php _e('eCommerce graphs : </b>Highly customized earnings graphs, for popular WordPress eCommerce plugins, like WooCommerce.', 'lara-google-analytics'); ?></li>
807
  </ul>
808
  </div>
809
 
912
  <!-- /.revise -->
913
  <?php if (!empty($actLrgaTabs[0])){ ?>
914
  <script type="text/javascript">
915
+ (function($) {
916
+ $(document).ready(function(){
917
+ $("#lrgawidget_wrap").detach().insertBefore('#dashboard-widgets-wrap');
918
+ $("#lrgawidget_loader").remove();
919
+ $("#lrgawidget_wrap").show();
920
+
921
+ });
922
+ })(jQuery);
923
+
924
  var actLrgaTabs = '<?php echo $actLrgaTabs[0]; ?>';
925
  var lrdataTableLang = { "sEmptyTable": <?php echo '"'.__('No data available in table', 'lara-google-analytics').'"'; ?>,
926
  "sInfo": <?php echo '"'.__('Showing _START_ to _END_ of _TOTAL_ entries', 'lara-google-analytics').'"'; ?>,