jQuery Pin It Button for Images - Version 2.1.3

Version Description

  • Released 2017-01-12
  • Added ability to disable the plugin on certain filters and changing filters priority
  • Added strong type checking in settings to reduce errors caused by type mismatch
Download this release

Release Info

Developer mrsztuczkens
Plugin Icon wp plugin jQuery Pin It Button for Images
Version 2.1.3
Comparing to
See all releases

Code changes from version 2.1.2 to 2.1.3

Files changed (35) hide show
  1. css/admin-ad.css +2 -3
  2. css/admin.css +1 -1
  3. includes/admin/class-jpibfi-admin.php +0 -184
  4. includes/admin/includes/{class-jpibfi-ajax-result-builder.php → jpibfi-ajax-result-builder.php} +0 -0
  5. includes/admin/includes/jpibfi-nag.php +92 -0
  6. includes/admin/jpibfi-admin.php +220 -0
  7. includes/admin/settings/class-jpibfi-import-export-settings.php +0 -126
  8. includes/admin/settings/class-jpibfi-selection-settings.php +0 -188
  9. includes/admin/settings/class-jpibfi-settings-base.php +0 -117
  10. includes/admin/settings/class-jpibfi-settings-validator.php +0 -69
  11. includes/admin/settings/class-jpibfi-visual-settings.php +0 -209
  12. includes/admin/settings/jpibfi-advanced-settings.php +78 -0
  13. includes/admin/settings/jpibfi-import-export-settings.php +135 -0
  14. includes/admin/settings/jpibfi-license-settings.php +5 -0
  15. includes/admin/settings/jpibfi-selection-settings.php +183 -0
  16. includes/admin/settings/jpibfi-settings-base.php +130 -0
  17. includes/admin/settings/jpibfi-validator.php +150 -0
  18. includes/admin/settings/jpibfi-visual-settings.php +248 -0
  19. includes/includes/{class-jpibfi-edd-sl-plugin-updater.php → jpibfi-edd-sl-plugin-updater.php} +71 -27
  20. includes/includes/{class-jpibfi-includes.php → jpibfi-includes.php} +5 -4
  21. includes/includes/{class-jpibfi-option-converter.php → jpibfi-option-converter.php} +4 -5
  22. includes/includes/{class-jpibfi-updater.php → jpibfi-updater.php} +0 -0
  23. includes/includes/options/class-jpibfi-license-options.php +0 -3
  24. includes/includes/options/index.php +1 -0
  25. includes/includes/options/jpibfi-advanced-options.php +21 -0
  26. includes/{admin/settings/class-jpibfi-license-settings.php → includes/options/jpibfi-license-options.php} +0 -0
  27. includes/includes/options/{class-jpibfi-options.php → jpibfi-options.php} +2 -2
  28. includes/includes/options/{class-jpibfi-selection-options.php → jpibfi-selection-options.php} +0 -0
  29. includes/includes/options/{class-jpibfi-visual-options.php → jpibfi-visual-options.php} +0 -0
  30. includes/{class-jpibfi.php → jpibfi.php} +7 -2
  31. includes/public/class-jpibfi-client.php +23 -3
  32. jquery-pin-it-button-for-images.php +21 -21
  33. js/jpibfi.admin.js +9 -9
  34. languages/jquery-pin-it-button-for-images.pot +206 -126
  35. readme.txt +10 -2
css/admin-ad.css CHANGED
@@ -1,12 +1,11 @@
1
  div.jpibfi-pro-notice {
2
  overflow: hidden;
3
- margin: 5px 0;
4
  }
5
 
6
  div.jpibfi-pro-notice p {
7
  display:block;
8
  float:left;
9
- font-size: 1.3em;
10
  font-weight: 600;
11
  color: #23282d;
12
  margin: 5px 0;
@@ -19,7 +18,7 @@ div.jpibfi-pro-notice a {
19
  div.jpibfi-pro-notice span {
20
  display:block;
21
  float: right;
22
- font-size: 1.6em;
23
  padding: 2px 10px;
24
  margin: 0.6em 0;
25
  cursor: pointer;
1
  div.jpibfi-pro-notice {
2
  overflow: hidden;
 
3
  }
4
 
5
  div.jpibfi-pro-notice p {
6
  display:block;
7
  float:left;
8
+ font-size: 1em;
9
  font-weight: 600;
10
  color: #23282d;
11
  margin: 5px 0;
18
  div.jpibfi-pro-notice span {
19
  display:block;
20
  float: right;
21
+ font-size: 1em;
22
  padding: 2px 10px;
23
  margin: 0.6em 0;
24
  cursor: pointer;
css/admin.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";a.pinit-button.old_default,a.pinit-button.old_default span{height:41px!important;width:65px!important}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-circle,a.pinit-button.default.jpibfi-size-small .jpibfi-icon-plain{font-size:28.8px}a.pinit-button.custom,a.pinit-button.old_default{text-indent:-9999em!important}a.pinit-button.custom span,a.pinit-button.old_default span{display:block;background-color:transparent!important;background-repeat:no-repeat!important;background-position:0 0!important}a.pinit-button.old_default span{background-image:url(images/pinit-button.png)!important;background-size:65px 41px!important}a.pinit-button.default{display:block;overflow:hidden;text-decoration:none;color:#fff;background-color:#bd081c}a.pinit-button.default:hover{background-color:#a50718}a.pinit-button.default.jpibfi-size-small{height:43.2px}a.pinit-button.default.jpibfi-size-small.jpibfi-button-round,a.pinit-button.default.jpibfi-size-small.jpibfi-button-rounded-square,a.pinit-button.default.jpibfi-size-small.jpibfi-button-square{width:43.2px}a.pinit-button.default.jpibfi-size-small.jpibfi-button-rectangle,a.pinit-button.default.jpibfi-size-small.jpibfi-button-rounded-rectangle{width:64.8px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-circle:before{margin-top:-14.4px;margin-left:-12.38px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-pushpin,a.pinit-button.default.jpibfi-size-small .jpibfi-icon-thumb-tack{font-size:17.28px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-plain:before{margin-top:-13.5px;margin-left:-10.06px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-thumb-tack:before{margin-top:-7.97px;margin-left:-5.54px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-pushpin:before{margin-top:-8.64px;margin-left:-8.64px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-pinterest2{font-size:28.8px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-circle,a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-plain{font-size:36px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-pinterest2:before{margin-top:-14.4px;margin-left:-14.4px}a.pinit-button.default.jpibfi-size-normal{height:54px}a.pinit-button.default.jpibfi-size-normal.jpibfi-button-round,a.pinit-button.default.jpibfi-size-normal.jpibfi-button-rounded-square,a.pinit-button.default.jpibfi-size-normal.jpibfi-button-square{width:54px}a.pinit-button.default.jpibfi-size-large.jpibfi-button-round,a.pinit-button.default.jpibfi-size-large.jpibfi-button-rounded-square,a.pinit-button.default.jpibfi-size-large.jpibfi-button-square,a.pinit-button.default.jpibfi-size-normal.jpibfi-button-rectangle,a.pinit-button.default.jpibfi-size-normal.jpibfi-button-rounded-rectangle{width:81px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-circle:before{margin-top:-18px;margin-left:-15.47px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-pushpin,a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-thumb-tack{font-size:21.6px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-plain:before{margin-top:-16.88px;margin-left:-12.58px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-thumb-tack:before{margin-top:-9.96px;margin-left:-6.92px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-pushpin:before{margin-top:-10.8px;margin-left:-10.8px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-pinterest2{font-size:36px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-circle,a.pinit-button.default.jpibfi-size-large .jpibfi-icon-plain{font-size:54px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-pinterest2:before{margin-top:-18px;margin-left:-18px}a.pinit-button.default.jpibfi-size-large{height:81px}a.pinit-button.default.jpibfi-size-large.jpibfi-button-rectangle,a.pinit-button.default.jpibfi-size-large.jpibfi-button-rounded-rectangle{width:121.5px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-circle:before{margin-top:-27px;margin-left:-23.2px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-pushpin,a.pinit-button.default.jpibfi-size-large .jpibfi-icon-thumb-tack{font-size:32.4px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-plain:before{margin-top:-25.31px;margin-left:-18.86px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-thumb-tack:before{margin-top:-14.93px;margin-left:-10.38px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-pushpin:before{margin-top:-16.2px;margin-left:-16.2px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-pinterest2{font-size:54px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-pinterest2:before{margin-top:-27px;margin-left:-27px}a.pinit-button.default.jpibfi-button-rounded-rectangle,a.pinit-button.default.jpibfi-button-rounded-square{border-radius:10px}a.pinit-button.default.jpibfi-button-round{border-radius:50%}a.pinit-button.default [class*=" jpibfi-icon-"],a.pinit-button.default [class^=jpibfi-icon-]{color:#fff;display:block}a.pinit-button.default [class*=" jpibfi-icon-"]:hover,a.pinit-button.default [class^=jpibfi-icon-]:hover{color:#fff}a.pinit-button.default [class*=" jpibfi-icon-"]:before,a.pinit-button.default [class^=jpibfi-icon-]:before{display:block;position:absolute;top:50%;left:50%}@font-face{font-family:jpibfi-font;src:url(fonts/jpibfi-font.eot?ifsn2k);src:url(fonts/jpibfi-font.eot?ifsn2k#iefix) format("embedded-opentype"),url(fonts/jpibfi-font.ttf?ifsn2k) format("truetype"),url(fonts/jpibfi-font.woff?ifsn2k) format("woff"),url(fonts/jpibfi-font.svg?ifsn2k#jpibfi-font) format("svg");font-weight:400;font-style:normal}[class*=" jpibfi-icon-"],[class^=jpibfi-icon-]{font-family:jpibfi-font!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.jpibfi-icon-circle:before{content:""}.jpibfi-icon-plain:before{content:""}.jpibfi-icon-thumb-tack:before{content:""}.jpibfi-icon-pushpin:before{content:""}.jpibfi-icon-pinterest2:before{content:""}.frizzly-sortable li{cursor:move}input[type=checkbox]~label{padding-left:5px}input#custom_image_url{width:100%}div.checkbox-indented{margin-left:20px}table.jpibfi-inner-table td,table.jpibfi-inner-table th{max-width:350px}table.jpibfi-inner-table th{padding:5px;width:auto}table.jpibfi-inner-table td{vertical-align:top;padding:0 15px 0 10px}a.pinit-button{display:block;position:relative}
1
+ @charset "UTF-8";a.pinit-button.old_default,a.pinit-button.old_default span{height:41px!important;width:65px!important}a.pinit-button.custom,a.pinit-button.old_default{text-indent:-9999em!important}a.pinit-button.custom span,a.pinit-button.old_default span{display:block;background-color:transparent!important;background-repeat:no-repeat!important;background-position:0 0!important}a.pinit-button.old_default span{background-image:url(images/pinit-button.png)!important;background-size:65px 41px!important}a.pinit-button.default{display:block;overflow:hidden;text-decoration:none;color:#fff;background-color:#bd081c}a.pinit-button.default:hover{background-color:#a50718}a.pinit-button.default.jpibfi-size-small{height:43.2px}a.pinit-button.default.jpibfi-size-small.jpibfi-button-round,a.pinit-button.default.jpibfi-size-small.jpibfi-button-rounded-square,a.pinit-button.default.jpibfi-size-small.jpibfi-button-square{width:43.2px}a.pinit-button.default.jpibfi-size-small.jpibfi-button-rectangle,a.pinit-button.default.jpibfi-size-small.jpibfi-button-rounded-rectangle{width:64.8px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-circle{font-size:28.8px}a.pinit-button.default.jpibfi-size-small .jpibfi-icon-circle:before{margin-top:-14.4px;margin-left:-12.38px}a.pinit-button.default.jpibfi-size-normal{height:54px}a.pinit-button.default.jpibfi-size-normal.jpibfi-button-round,a.pinit-button.default.jpibfi-size-normal.jpibfi-button-rounded-square,a.pinit-button.default.jpibfi-size-normal.jpibfi-button-square{width:54px}a.pinit-button.default.jpibfi-size-large.jpibfi-button-round,a.pinit-button.default.jpibfi-size-large.jpibfi-button-rounded-square,a.pinit-button.default.jpibfi-size-large.jpibfi-button-square,a.pinit-button.default.jpibfi-size-normal.jpibfi-button-rectangle,a.pinit-button.default.jpibfi-size-normal.jpibfi-button-rounded-rectangle{width:81px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-circle{font-size:36px}a.pinit-button.default.jpibfi-size-normal .jpibfi-icon-circle:before{margin-top:-18px;margin-left:-15.47px}a.pinit-button.default.jpibfi-size-large{height:81px}a.pinit-button.default.jpibfi-size-large.jpibfi-button-rectangle,a.pinit-button.default.jpibfi-size-large.jpibfi-button-rounded-rectangle{width:121.5px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-circle{font-size:54px}a.pinit-button.default.jpibfi-size-large .jpibfi-icon-circle:before{margin-top:-27px;margin-left:-23.2px}a.pinit-button.default.jpibfi-button-rounded-rectangle,a.pinit-button.default.jpibfi-button-rounded-square{border-radius:10px}a.pinit-button.default.jpibfi-button-round{border-radius:50%}a.pinit-button.default [class*=" jpibfi-icon-"],a.pinit-button.default [class^=jpibfi-icon-]{color:#fff;display:block}a.pinit-button.default [class*=" jpibfi-icon-"]:hover,a.pinit-button.default [class^=jpibfi-icon-]:hover{color:#fff}a.pinit-button.default [class*=" jpibfi-icon-"]:before,a.pinit-button.default [class^=jpibfi-icon-]:before{display:block;position:absolute;top:50%;left:50%}@font-face{font-family:jpibfi-font;src:url(fonts/jpibfi-font.eot?ifsn2k);src:url(fonts/jpibfi-font.eot?ifsn2k#iefix) format("embedded-opentype"),url(fonts/jpibfi-font.ttf?ifsn2k) format("truetype"),url(fonts/jpibfi-font.woff?ifsn2k) format("woff"),url(fonts/jpibfi-font.svg?ifsn2k#jpibfi-font) format("svg");font-weight:400;font-style:normal}[class*=" jpibfi-icon-"],[class^=jpibfi-icon-]{font-family:jpibfi-font!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.jpibfi-icon-circle:before{content:""}.frizzly-sortable li{cursor:move}input[type=checkbox]~label{padding-left:5px}input#custom_image_url{width:100%}div.checkbox-indented{margin-left:20px}table.jpibfi-inner-table td,table.jpibfi-inner-table th{max-width:350px}table.jpibfi-inner-table th{padding:5px;width:auto}table.jpibfi-inner-table td{vertical-align:top;padding:0 15px 0 10px}a.pinit-button{display:block;position:relative}
includes/admin/class-jpibfi-admin.php DELETED
@@ -1,184 +0,0 @@
1
- <?php
2
-
3
- class JPIBFI_Admin {
4
-
5
- private $file;
6
- private $version;
7
-
8
- private $admin_screen_hook = '';
9
- private $import_export_settings;
10
- private $selection_settings;
11
- private $visual_settings;
12
-
13
- function __construct($file, $version) {
14
- $this->file = $file;
15
- $this->version = $version;
16
-
17
- $this->load_dependencies();
18
- $this->init_settings();
19
-
20
- add_action( 'admin_menu', array( $this, 'print_admin_page_action') );
21
- add_action( 'admin_enqueue_scripts', array($this, 'add_admin_scripts') );
22
-
23
- $jpibfi_plugin = plugin_basename( $this->file );
24
- add_filter( "plugin_action_links_$jpibfi_plugin", array( $this, 'add_settings_link' ) );
25
- add_action( 'admin_notices', array( $this, 'show_lightbox_ad' ), 11 );
26
- add_action( 'admin_notices', array( $this, 'show_pro_ad') );
27
- add_filter( 'plugin_row_meta', array($this, 'plugin_meta_links'), 10, 2 );
28
- add_action( 'wp_ajax_jpibfi_remove_pro_ad', array($this, 'remove_pro_ad') );
29
- }
30
-
31
- function add_settings_link( $links ) {
32
- $settings_link = '<a href="options-general.php?page=jpibfi_settings">' . __( 'Settings', 'jquery-pin-it-button-for-images' ) . '</a>';
33
- array_unshift( $links, $settings_link );
34
- return $links;
35
- }
36
-
37
- private function load_dependencies(){
38
- $deps = array(
39
- 'includes/class-jpibfi-ajax-result-builder.php',
40
- 'settings/class-jpibfi-settings-base.php',
41
- 'settings/class-jpibfi-settings-validator.php',
42
- 'settings/class-jpibfi-import-export-settings.php',
43
- 'settings/class-jpibfi-selection-settings.php',
44
- 'settings/class-jpibfi-visual-settings.php',
45
- );
46
- foreach ($deps as $dep)
47
- require_once $dep;
48
- }
49
-
50
- private function init_settings(){
51
- $this->import_export_settings = new JPIBFI_Import_Export_Settings();
52
- $this->selection_settings = new JPIBFI_Selection_Settings();
53
- $this->visual_settings = new JPIBFI_Visual_Settings();
54
- }
55
-
56
- public function print_admin_page_action() {
57
-
58
- $name = 'jQuery Pin It Button For Images Lite';
59
-
60
- $this->admin_screen_hook = add_options_page(
61
- $name,
62
- $name,
63
- 'manage_options',
64
- 'jpibfi_settings',
65
- array( $this, 'print_admin_page' )
66
- );
67
- }
68
-
69
- public function add_admin_scripts($hook) {
70
- if ($this->admin_screen_hook === $hook) {
71
- $this->add_settings_scripts();
72
- }
73
-
74
- if ('plugins.php' === $hook) {
75
- $this->add_remove_ad_scripts();
76
- }
77
- }
78
-
79
- private function add_settings_scripts() {
80
- $plugin_dir_url = plugin_dir_url($this->file);
81
-
82
- wp_enqueue_style( 'jquery-pin-it-button-admin-style', $plugin_dir_url . 'css/admin.css', array(), $this->version, 'all' );
83
- wp_enqueue_style( 'jpibfi-ad', $plugin_dir_url . 'css/admin-ad.css', array(), $this->version, 'all' );
84
-
85
- $slug = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'select';
86
- $settings = array (
87
- 'ajax' => apply_filters('jpibfi_settings_ajax', array (
88
- 'url' => admin_url( 'admin-ajax.php' ),
89
- 'tab' => $slug,
90
- )),
91
- 'tabs' => $this->get_sorted_tabs(),
92
- 'currentTab' => $slug,
93
- 'page' => 'jpibfi_settings',
94
- 'settings' => apply_filters( 'jpibfi_settings_configuration_' . $slug, array()),
95
- 'i18n' => array (
96
- 'editor' => apply_filters( 'jpibfi_settings_i18n_' . $slug, array (
97
- 'submit' => __('Save Changes', 'jquery-pin-it-button-for-images'),
98
- 'pro_feature_error' => sprintf(__('This feature is available in <a target="_blank" href="%s">the PRO version</a>.', 'jquery-pin-it-button-for-images'), 'https://highfiveplugins.com/downloads/jquery-pin-it-button-for-images-pro/')
99
- )),
100
- 'status' => array (
101
- 'pending' => __('Saving changes ...', 'jquery-pin-it-button-for-images'),
102
- ),
103
- ),
104
- );
105
- $settings['version'] = 'lite';
106
- wp_enqueue_script( 'jpibfi', $plugin_dir_url . 'js/jpibfi.admin.js', array( 'jquery' ), $this->version, false );
107
- wp_localize_script('jpibfi', 'jpibfi_settings', $settings);
108
-
109
- if ( function_exists( "wp_enqueue_media") ) {
110
- wp_enqueue_media();
111
- }
112
- }
113
-
114
- private function get_sorted_tabs(){
115
- $settings_tabs = apply_filters('jpibfi_settings_tabs', array());
116
-
117
- /* order tabs by priority */
118
- $priority = array();
119
- foreach ($settings_tabs as $key => $tab){
120
- $priority[$key] = $tab['priority'];
121
- }
122
- array_multisort($priority, SORT_ASC, $settings_tabs);
123
- return $settings_tabs;
124
- }
125
-
126
- public function print_admin_page() {
127
- ?>
128
- <div ng-app="app" class="wrap">
129
- <h2><?php _e( 'jQuery Pin It Button For Images Options', 'jquery-pin-it-button-for-images' ); ?></h2>
130
- <div id="icon-plugins" class="icon32"></div>
131
- <app settings-name="jpibfi_settings"></app>
132
- </div>
133
- <?php
134
- }
135
-
136
- public function show_lightbox_ad() {
137
- global $hook_suffix;
138
- if ( $hook_suffix === $this->admin_screen_hook ) {
139
- ?>
140
- <div class="updated jpibfi-pro-notice">
141
- <p><?php echo sprintf(__('Lightbox feature has been transferred to another plugin. Click <a target="_blank" href="%s">here</a> to learn more.', 'jquery-pin-it-button-for-images'), 'http://bit.ly/2cXnS2D'); ?></p>
142
- </div>
143
- <?php
144
- }
145
- }
146
-
147
- private function add_remove_ad_scripts() {
148
- $plugin_dir_url = plugin_dir_url($this->file);
149
- wp_enqueue_style( 'jpibfi-ad', $plugin_dir_url . 'css/admin-ad.css', array(), $this->version, 'all' );
150
- wp_enqueue_script( 'jpibfi-ad', $plugin_dir_url . 'js/jpibfi-ad.admin.js', array( 'jquery' ), $this->version, false );
151
- }
152
-
153
- function show_pro_ad() {
154
- global $hook_suffix;
155
- $hooks = array();
156
- $hooks[] = $this->admin_screen_hook;
157
- if (get_option('jpibfi_pro_ad')) {
158
- $hooks[] = 'plugins.php';
159
- }
160
-
161
- if (in_array($hook_suffix, $hooks)) {
162
- $show_close = 'plugins.php' == $hook_suffix;
163
- ?>
164
- <div class="updated jpibfi-pro-notice">
165
- <p><?php echo sprintf(__('jQuery Pin It Button for Images Pro is available. Click <a target="_blank" href="%s">here</a> to learn more.', 'jquery-pin-it-button-for-images'), 'https://highfiveplugins.com/downloads/jquery-pin-it-button-for-images-pro/'); ?></p>
166
- <?php if ($show_close): ?><span id="jpibfi_remove_ad" class="dashicons dashicons-no"></span><?php endif; ?>
167
- </div>
168
- <?php
169
- }
170
- }
171
-
172
- function plugin_meta_links( $links, $file ) {
173
- $plugin = plugin_basename($this->file);
174
- if ( $file == $plugin ) {
175
- return array_merge($links, array( '<a href="https://highfiveplugins.com/downloads/jquery-pin-it-button-for-images-pro/">jQuery Pin It Button for Images Pro</a>' ));
176
- }
177
- return $links;
178
- }
179
-
180
- function remove_pro_ad(){
181
- delete_option('jpibfi_pro_ad');
182
- wp_die();
183
- }
184
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/admin/includes/{class-jpibfi-ajax-result-builder.php → jpibfi-ajax-result-builder.php} RENAMED
File without changes
includes/admin/includes/jpibfi-nag.php ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class JPIBFI_Nag
5
+ *
6
+ * Heavily influenced by What The File Plugin
7
+ * https://wordpress.org/plugins/what-the-file/
8
+ */
9
+ class JPIBFI_Nag {
10
+
11
+ private $notice_key;
12
+ private $notice_text;
13
+ private $notice_period;
14
+ private $install_date_key;
15
+
16
+ function __construct($plugin_prefix, $plugin_name, $review_link, $period = '-10 days') {
17
+ $this->notice_key = $plugin_prefix . '_review_notice';
18
+ $this->install_date_key = $plugin_prefix . '_install_date';
19
+
20
+ $this->notice_text = sprintf(
21
+ __( "You've been using <b>%s</b> for some time now, could you please give it a review at wordpress.org? <br /><br /> <a href='%s' target='_blank'>Yes, take me there!</a> - <a href='%s'>I've already done this!</a>" ),
22
+ $plugin_name,
23
+ $review_link,
24
+ '%s'
25
+ );
26
+ $this->notice_period = $period;
27
+
28
+ $this->setup();
29
+ }
30
+
31
+ public function setup() {
32
+ if ( current_user_can( 'install_plugins' ) ) {
33
+ $this->catch_hide_notice();
34
+ $this->add_notice();
35
+ }
36
+ }
37
+
38
+ private function catch_hide_notice() {
39
+ if ( ! isset( $_GET[ $this->notice_key ] ) ) {
40
+ return;
41
+ }
42
+ global $current_user;
43
+ add_user_meta( $current_user->ID, $this->notice_key, '1', true );
44
+ wp_redirect( remove_query_arg( $this->notice_key ) );
45
+ exit;
46
+ }
47
+
48
+ private function add_notice() {
49
+ $current_user = wp_get_current_user();
50
+ $hide_notice = get_user_meta( $current_user->ID, $this->notice_key, true );
51
+
52
+ if ( '' != $hide_notice ) {
53
+ return;
54
+ }
55
+
56
+ // Get installation date
57
+ $datetime_install = $this->get_install_date();
58
+ $datetime_past = new DateTime( $this->notice_period );
59
+
60
+ if ( $datetime_past >= $datetime_install ) {
61
+ add_action( 'admin_notices', array( $this, 'display_admin_notice' ) );
62
+ }
63
+ }
64
+
65
+ private function get_install_date() {
66
+ $date_string = get_site_option( $this->install_date_key, '' );
67
+ if ( $date_string == '' ) {
68
+ $date_string = $this->insert_install_date();
69
+ }
70
+
71
+ return new DateTime( $date_string );
72
+ }
73
+
74
+ public function insert_install_date() {
75
+ $datetime_now = new DateTime();
76
+ $date_string = $datetime_now->format( 'Y-m-d' );
77
+ add_site_option( $this->install_date_key, $date_string );
78
+
79
+ return $date_string;
80
+ }
81
+
82
+ /**
83
+ * Display the admin notice
84
+ */
85
+ public function display_admin_notice() {
86
+ ?>
87
+ <div class="updated">
88
+ <p><?php printf( $this->notice_text, add_query_arg( $this->notice_key, '1' ) ); ?></p>
89
+ </div>
90
+ <?php
91
+ }
92
+ }
includes/admin/jpibfi-admin.php ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class JPIBFI_Admin {
4
+
5
+ private $file;
6
+ private $version;
7
+
8
+ private $admin_screen_hook = '';
9
+
10
+ /**
11
+ * @var JPIBFI_Settings_Tab[]
12
+ */
13
+ private $tab_modules;
14
+
15
+ function __construct( $file, $version ) {
16
+ $this->file = $file;
17
+ $this->version = $version;
18
+
19
+ $this->tab_modules = array();
20
+
21
+ $this->load_dependencies();
22
+ $this->init();
23
+
24
+ add_action( 'admin_menu', array( $this, 'print_admin_page_action' ) );
25
+ add_action( 'admin_enqueue_scripts', array( $this, 'add_admin_scripts' ) );
26
+
27
+ $jpibfi_plugin = plugin_basename( $this->file );
28
+ add_filter( "plugin_action_links_$jpibfi_plugin", array( $this, 'add_settings_link' ) );
29
+ add_action( 'admin_notices', array( $this, 'show_ad' ), 11 );
30
+ add_action( 'admin_init', array( $this, 'show_nag' ) );
31
+ add_action( 'admin_notices', array( $this, 'show_pro_ad' ) );
32
+ add_filter( 'plugin_row_meta', array( $this, 'plugin_meta_links' ), 10, 2 );
33
+ add_action( 'wp_ajax_jpibfi_remove_pro_ad', array( $this, 'remove_pro_ad' ) );
34
+ }
35
+
36
+ function add_settings_link( $links ) {
37
+ $settings_link = '<a href="options-general.php?page=jpibfi_settings">' . __( 'Settings', 'jquery-pin-it-button-for-images' ) . '</a>';
38
+ array_unshift( $links, $settings_link );
39
+
40
+ return $links;
41
+ }
42
+
43
+ /**
44
+ * @param $tab_module JPIBFI_Settings_Tab
45
+ */
46
+ private function add_tab_module( $tab_module ) {
47
+ $this->tab_modules[ $tab_module->get_slug() ] = $tab_module;
48
+ }
49
+
50
+ private function load_dependencies() {
51
+ $deps = array(
52
+ 'includes/jpibfi-ajax-result-builder.php',
53
+ 'settings/jpibfi-settings-base.php',
54
+ 'settings/jpibfi-validator.php',
55
+ 'settings/jpibfi-import-export-settings.php',
56
+ 'settings/jpibfi-selection-settings.php',
57
+ 'settings/jpibfi-visual-settings.php',
58
+ 'settings/jpibfi-advanced-settings.php',
59
+ );
60
+ foreach ( $deps as $dep ) {
61
+ require_once $dep;
62
+ }
63
+ }
64
+
65
+ private function init() {
66
+ $this->add_tab_module( new JPIBFI_Selection_Settings() );
67
+ $this->add_tab_module( new JPIBFI_Visual_Settings() );
68
+ $this->add_tab_module( new JPIBFI_Advanced_Settings() );
69
+ $this->add_tab_module( new JPIBFI_Import_Export_Settings() );
70
+ }
71
+
72
+ public function print_admin_page_action() {
73
+
74
+ $name = 'jQuery Pin It Button For Images Lite';
75
+
76
+ $this->admin_screen_hook = add_options_page(
77
+ $name,
78
+ $name,
79
+ 'manage_options',
80
+ 'jpibfi_settings',
81
+ array( $this, 'print_admin_page' )
82
+ );
83
+ }
84
+
85
+ public function add_admin_scripts( $hook ) {
86
+ if ( $this->admin_screen_hook === $hook ) {
87
+ $this->add_settings_scripts();
88
+ }
89
+
90
+ if ( 'plugins.php' === $hook ) {
91
+ $this->add_remove_ad_scripts();
92
+ }
93
+ }
94
+
95
+ private function add_settings_scripts() {
96
+ $plugin_dir_url = plugin_dir_url( $this->file );
97
+
98
+ wp_enqueue_style( 'jquery-pin-it-button-admin-style', $plugin_dir_url . 'css/admin.css', array(), $this->version, 'all' );
99
+ wp_enqueue_style( 'jpibfi-ad', $plugin_dir_url . 'css/admin-ad.css', array(), $this->version, 'all' );
100
+
101
+ $slug = isset( $_GET['tab'] ) ? $_GET['tab'] : 'select';
102
+ $tab_mod = $this->get_tab( $slug );
103
+ $settings = array(
104
+ 'ajax' => $tab_mod->get_settings_ajax(),
105
+ 'tabs' => $this->get_tabs(),
106
+ 'currentTab' => $slug,
107
+ 'page' => 'jpibfi_settings',
108
+ 'links' => array(
109
+ array(
110
+ 'url' => 'https://highfiveplugins.com/jpibfi/jquery-pin-it-button-for-images-documentation/',
111
+ 'label' => __( 'Documentation', 'jquery-pin-it-button-for-images' )
112
+ ),
113
+ array(
114
+ 'url' => 'https://wordpress.org/support/plugin/jquery-pin-it-button-for-images',
115
+ 'label' => __( 'Support', 'jquery-pin-it-button-for-images' )
116
+ )
117
+ ),
118
+ 'settings' => $tab_mod->get_settings_configuration(),
119
+ 'i18n' => array(
120
+ 'editor' => $tab_mod->get_settings_i18n(),
121
+ 'status' => array( 'pending' => __( 'Saving changes ...', 'jquery-pin-it-button-for-images' ) ),
122
+ ),
123
+ );
124
+ $settings['version'] = 'lite';
125
+ wp_enqueue_script( 'jpibfi', $plugin_dir_url . 'js/jpibfi.admin.js', array( 'jquery' ), $this->version, false );
126
+ wp_localize_script( 'jpibfi', 'jpibfi_settings', $settings );
127
+
128
+ if ( function_exists( "wp_enqueue_media" ) ) {
129
+ wp_enqueue_media();
130
+ }
131
+ }
132
+
133
+ private function get_tab( $tab_slug ) {
134
+ return $this->tab_modules[ $tab_slug ];
135
+ }
136
+
137
+ private function get_tabs() {
138
+ $res = array();
139
+ foreach ( $this->tab_modules as $slug => $tab_module ) {
140
+ $res[] = $tab_module->get_module_settings();
141
+ }
142
+
143
+ return $res;
144
+ }
145
+
146
+ public function print_admin_page() {
147
+ ?>
148
+ <div ng-app="app" class="wrap">
149
+ <h2><?php _e( 'jQuery Pin It Button For Images Options', 'jquery-pin-it-button-for-images' ); ?></h2>
150
+ <div id="icon-plugins" class="icon32"></div>
151
+ <app settings-name="jpibfi_settings"></app>
152
+ </div>
153
+ <?php
154
+ }
155
+
156
+ public function show_ad() {
157
+ global $hook_suffix;
158
+ if ( $hook_suffix === $this->admin_screen_hook ) {
159
+ ?>
160
+ <div class="updated jpibfi-pro-notice">
161
+ <p>
162
+ <?php echo
163
+ wp_kses(
164
+ sprintf(
165
+ __( 'Check out <a href="%1$s" target="_blank">Frizzly</a> - share buttons for images and post content.', 'jquery-pin-it-button-for-images' ),
166
+ 'https://wordpress.org/plugins/frizzly/'
167
+ ),
168
+ array( 'a' => array( 'href' => array(), 'target' => array() ) )
169
+ ); ?>
170
+ </p>
171
+ </div>
172
+ <?php
173
+ }
174
+ }
175
+
176
+ private function add_remove_ad_scripts() {
177
+ $plugin_dir_url = plugin_dir_url( $this->file );
178
+ wp_enqueue_style( 'jpibfi-ad', $plugin_dir_url . 'css/admin-ad.css', array(), $this->version, 'all' );
179
+ wp_enqueue_script( 'jpibfi-ad', $plugin_dir_url . 'js/jpibfi-ad.admin.js', array( 'jquery' ), $this->version, false );
180
+ }
181
+
182
+ function show_nag() {
183
+ require_once 'includes/jpibfi-nag.php';
184
+ new JPIBFI_Nag('jpibfi', 'jQuery Pin It Button For Images', 'http://wordpress.org/support/view/plugin-reviews/jquery-pin-it-button-for-images', '-10 days');
185
+ }
186
+
187
+ function show_pro_ad() {
188
+ global $hook_suffix;
189
+ $hooks = array();
190
+ $hooks[] = $this->admin_screen_hook;
191
+ if ( get_option( 'jpibfi_pro_ad' ) ) {
192
+ $hooks[] = 'plugins.php';
193
+ }
194
+
195
+ if ( in_array( $hook_suffix, $hooks ) ) {
196
+ $show_close = 'plugins.php' == $hook_suffix;
197
+ ?>
198
+ <div class="updated jpibfi-pro-notice">
199
+ <p><?php echo sprintf( __( 'jQuery Pin It Button for Images Pro is available. Click <a target="_blank" href="%s">here</a> to learn more.', 'jquery-pin-it-button-for-images' ), 'https://highfiveplugins.com/downloads/jquery-pin-it-button-for-images-pro/' ); ?></p>
200
+ <?php if ( $show_close ): ?><span id="jpibfi_remove_ad"
201
+ class="dashicons dashicons-no"></span><?php endif; ?>
202
+ </div>
203
+ <?php
204
+ }
205
+ }
206
+
207
+ function plugin_meta_links( $links, $file ) {
208
+ $plugin = plugin_basename( $this->file );
209
+ if ( $file == $plugin ) {
210
+ return array_merge( $links, array( '<a href="https://highfiveplugins.com/downloads/jquery-pin-it-button-for-images-pro/">jQuery Pin It Button for Images Pro</a>' ) );
211
+ }
212
+
213
+ return $links;
214
+ }
215
+
216
+ function remove_pro_ad() {
217
+ delete_option( 'jpibfi_pro_ad' );
218
+ wp_die();
219
+ }
220
+ }
includes/admin/settings/class-jpibfi-import-export-settings.php DELETED
@@ -1,126 +0,0 @@
1
- <?php
2
-
3
- class JPIBFI_Import_Export_Settings extends JPIBFI_Settings_Tab {
4
-
5
- private $ajax_import_action;
6
-
7
- function __construct() {
8
- parent::__construct();
9
- $this->ajax_import_action = '_import';
10
- add_filter( 'export_args', array( $this, 'export_args' ) );
11
- add_action( 'export_wp', array( $this, 'export_wp' ) );
12
- add_filter($this->ajax_custom_action . $this->ajax_import_action, array($this, 'ajax_import'));
13
- }
14
-
15
- function ajax_import() {
16
- $result = new JPIBFI_Ajax_Result_Builder();
17
- $file = wp_import_handle_upload();
18
-
19
- if ( isset( $file['error'] ) ) {
20
- return $result
21
- ->set_error(esc_html( $file['error'] ))
22
- ->build();
23
- }
24
-
25
- if ( ! isset( $file['file'], $file['id'] ) ) {
26
- return $result
27
- ->set_error(__( 'The file did not upload properly. Please try again.', 'jquery-pin-it-button-for-images' ))
28
- ->build();
29
- }
30
-
31
- if ( ! file_exists( $file['file'] ) ) {
32
- wp_import_cleanup( $file['id'] );
33
- return $result
34
- ->set_error(sprintf( __( 'The export file could not be found at <code>%s</code>. It is likely that this was caused by a permissions problem.', 'jquery-pin-it-button-for-images' ), esc_html( $file['file'] ) ))
35
- ->build();
36
- }
37
-
38
- if ( ! is_file( $file['file'] ) ) {
39
- wp_import_cleanup( $file['id'] );
40
- return $result
41
- ->set_error(__( 'The path is not a file, please try again.', 'jquery-pin-it-button-for-images' ))
42
- ->build();
43
- }
44
-
45
- $file_contents = file_get_contents( $file['file'] );
46
- $data = json_decode( $file_contents, true );
47
- wp_import_cleanup( $file['id']);
48
-
49
- $options_to_import = $data['options'];
50
- foreach ( (array)$options_to_import as $option_name => $option_value ) {
51
- $options_to_import[$option_name] = maybe_unserialize( $option_value );
52
- }
53
-
54
- $converter = new JPIBFI_Option_Converter();
55
- $converter->save_and_convert_if_needed($options_to_import);
56
-
57
- return $result
58
- ->set_model($input)
59
- ->set_message(__('Import Successful', 'jquery_pin_it_button_for_images'))
60
- ->build();
61
- }
62
-
63
- function filter_settings_i18n($i18n) {
64
- $i18n['export_title'] = __( 'Export', 'jquery-pin-it-button-for-images' );
65
- $i18n['export_url'] = admin_url('export.php?download=true&content=jpibfi');
66
- $i18n['export_button_text'] = __('Download Export File', 'jquery-pin-it-button-for-images');
67
-
68
- $i18n['import_title'] = __( 'Import', 'jquery-pin-it-button-for-images' );
69
- $i18n['import_button_text'] = __('Import Settings', 'jquery-pin-it-button-for-images');
70
- $i18n['import_action_name'] = $this->ajax_import_action;
71
- return $i18n;
72
- }
73
-
74
- function get_module_settings() {
75
- return array (
76
- 'slug' => 'import',
77
- 'name' => __( 'Import/Export Settings', 'jquery-pin-it-button-for-images' ),
78
- 'priority' => 10,
79
- 'setting_name' => ''
80
- );
81
- }
82
-
83
- /**
84
- * @param array $args The export args being filtered.
85
- * @return array The (possibly modified) export args.
86
- */
87
- public function export_args( $args ) {
88
- if ( ! empty( $_GET['content'] ) && 'jpibfi' == $_GET['content'] ) {
89
- return array( 'jpibfi' => true );
90
- }
91
- return $args;
92
- }
93
-
94
-
95
- /**
96
- * Export options as a JSON file if that's what the user wants to do.
97
- *
98
- * @param array $args The export arguments.
99
- * @return void
100
- */
101
- public function export_wp( $args ) {
102
- if (empty($args['jpibfi']))
103
- return;
104
-
105
- $filename = 'jpibfi_settings_' . date( 'Y-m-d' ) . '.json';
106
-
107
- header( 'Content-Description: File Transfer' );
108
- header( 'Content-Disposition: attachment; filename=' . $filename );
109
- header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
110
-
111
- $option_names = apply_filters('jpibfi_option_names', array ('jpibfi_options_version'));
112
-
113
- $export_options = array();
114
-
115
- foreach ( $option_names as $option_name ) {
116
-
117
- $option_value = get_option( $option_name );
118
- if ( $option_value !== false ) {
119
- $export_options[ $option_name ] = maybe_serialize( $option_value );
120
- }
121
- }
122
- $JSON_PRETTY_PRINT = defined( 'JSON_PRETTY_PRINT' ) ? JSON_PRETTY_PRINT : null;
123
- echo json_encode( array( 'options' => $export_options ), $JSON_PRETTY_PRINT );
124
- exit;
125
- }
126
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/admin/settings/class-jpibfi-selection-settings.php DELETED
@@ -1,188 +0,0 @@
1
- <?php
2
-
3
- class JPIBFI_Selection_Settings extends JPIBFI_Settings_Base {
4
-
5
- function __construct() {
6
- parent::__construct();
7
- add_action( 'add_meta_boxes', array( $this, 'add_post_selection_meta_box' ), 10, 2 );
8
- add_action( 'save_post', array( $this, 'save_post_selection_meta' ), 10, 3);
9
- }
10
-
11
- function add_post_selection_meta_box( $post_type, $post ) {
12
- add_meta_box(
13
- 'jpibfi-disable-plugin_meta',
14
- __( 'jQuery Pin It Button for Images Settings', 'jquery-pin-it-button-for-images' ),
15
- array( $this, 'render_post_selection_meta_box' ),
16
- array( 'post', 'page' ),
17
- 'side'
18
- );
19
- }
20
-
21
- function filter_settings_i18n($i18n) {
22
- $i18n['title'] = __('Selection settings', 'jquery-pin-it-button-for-images');
23
- $i18n['image_resolution_label'] = __( 'Minimum image resolution', 'jquery-pin-it-button-for-images' );
24
- $i18n['image_resolution_desc'] = __( 'Use this settings to hide the "Pin it" button on small images (e.g. social media icons).', 'jquery-pin-it-button-for-images' );
25
- $i18n['image_resolution_desc_2'] = __( '* - screen that is less than 768 pixels wide', 'jquery-pin-it-button-for-images' );
26
- $i18n['min_resolution_template_small'] = __('For small screens* the "Pin it" button will show up if the image is at least %height% pixels high and %width% pixels wide.', 'jquery-pin-it-button-for-images');
27
- $i18n['min_resolution_template'] = __('Otherwise, the "Pin it" button will show up if the image is at least %height% pixels high and %width% pixels wide.', 'jquery-pin-it-button-for-images');
28
-
29
- $i18n['show_on_field_label'] = __( 'On which pages the "Pin it" button should be shown', 'jquery-pin-it-button-for-images' );
30
- $i18n['show_on_field_desc'] = __('Separate settings using commas. For the button to show up on a certain page, the page must be included in the "Show on" section and not included in the "Disable on" section. You can use the following settings:')
31
- . '<p>'
32
- . __( 'number (e.g. 588) - the ID of a certain page or post') . '<br/>'
33
- . __( '[front] - front page') . '<br/>'
34
- . __( '[single] - single posts') . '<br/>'
35
- . __( '[page] - single pages') . '<br/>'
36
- . __( '[archive] - archive pages') . '<br/>'
37
- . __( '[search] - search pages') . '<br/>'
38
- . __( '[category] - category pages') . '<br/>'
39
- . __( '[home] - blog page') . '</p>';
40
- return $i18n;
41
- }
42
-
43
- function get_module_settings() {
44
- return array (
45
- 'slug' => 'select',
46
- 'name' => __('Selection', 'jquery-pin-it-button-for-images'),
47
- 'priority' => 0,
48
- 'setting_name' => $this->get_options()->get_option_name()
49
- );
50
- }
51
-
52
- function get_options() {
53
- return new JPIBFI_Selection_Options();
54
- }
55
-
56
- function get_settings_configuration($params) {
57
-
58
- $option_value = $this->options->get();
59
- $res = array();
60
-
61
- $res['image_selector'] = array (
62
- 'key' => 'image_selector',
63
- 'label' => __( 'Image selector', 'jquery-pin-it-button-for-images' ),
64
- 'desc' => sprintf ( __( 'jQuery selector for all the images that should have the "Pin it" button. Set the value to %s if you want the "Pin it" button to appear only on images in content or %s to appear on all images on site (including sidebar, header and footer). If you know a thing or two about jQuery, you might use your own selector. %sClick here%s to read about jQuery selectors.', 'jquery-pin-it-button-for-images' ),
65
- '<strong>.jpibfi_container img</strong>',
66
- '<strong>img</strong>',
67
- '<a href="http://api.jquery.com/category/selectors/" target="_blank">',
68
- '</a>'
69
- )
70
- );
71
-
72
- $res['disabled_classes'] = array (
73
- 'key' => 'disabled_classes',
74
- 'label' => __( 'Disabled classes', 'jquery-pin-it-button-for-images' ),
75
- 'desc' => __( 'Pictures with these CSS classes won\'t show the "Pin it" button. Please separate multiple classes with semicolons. Spaces are not accepted.', 'jquery-pin-it-button-for-images' )
76
- );
77
-
78
- $res['enabled_classes'] = array (
79
- 'key' => 'enabled_classes',
80
- 'label' => __( 'Enabled classes', 'jquery-pin-it-button-for-images' ),
81
- 'desc' => __( 'Only pictures with these CSS classes will show the "Pin it" button. Please separate multiple classes with semicolons. If this field is empty, images with any (besides disabled ones) classes will show the Pin It button.', 'jquery-pin-it-button-for-images' ),
82
- );
83
-
84
- $local_args = array('min' => '0', 'step' => '1');
85
- $res['min_image_height'] = array_merge($local_args, array('key' => 'min_image_height', 'label' => __('Height', 'jquery-pin-it-button-for-images')));
86
- $res['min_image_width'] = array_merge($local_args, array('key' => 'min_image_width', 'label' => __('Width', 'jquery-pin-it-button-for-images')));
87
-
88
- $res['min_image_height_small'] = array_merge($local_args, array('key' => 'min_image_height_small', 'label' => __('Height', 'jquery-pin-it-button-for-images')));
89
- $res['min_image_width_small'] = array_merge($local_args, array('key' => 'min_image_width_small', 'label' => __('Width', 'jquery-pin-it-button-for-images')));
90
-
91
- $res['show_on'] = array (
92
- 'key' => 'show_on',
93
- 'label' => __( 'Show on', 'jquery-pin-it-button-for-images' ),
94
- );
95
-
96
- $res['disable_on'] = array (
97
- 'key' => 'disable_on',
98
- 'label' => __( 'Disable on', 'jquery-pin-it-button-for-images' ),
99
- );
100
-
101
- foreach($res as $key => $setting) {
102
- $res[$key]['value'] = $option_value[$key];
103
- }
104
-
105
- return $res;
106
- }
107
-
108
- function render_post_selection_meta_box() {
109
- global $post;
110
- $id = $post->ID;
111
- $options = $this->options->get();
112
- $disabled_list = $options['disable_on'];
113
- $disabled_array = explode(',', $disabled_list);
114
- $result = in_array((string)$id, $disabled_array);
115
- wp_nonce_field('jpibfi-post-selection', "jpibfi-post-selection");
116
- ?>
117
- <div>
118
- <label>
119
- <input name="jpibfi-disable-post" type="checkbox" <?php checked( true, $result, true); ?> value="1" />
120
- <?php _e('Disable plugin on this post', 'jquery-pin-it-button-for-images'); ?>
121
- </label>
122
- </div>
123
- <?php
124
- }
125
-
126
- public function sanitize_selection_options( $input ) {
127
-
128
- $this->sanitize_input($input);
129
- $output = $this->options->get();
130
-
131
- $validator = new JPIBFI_Settings_Validator($input, $output);
132
-
133
- foreach( $input as $key => $value ) {
134
- switch($key) {
135
- case 'disabled_classes':
136
- case 'enabled_classes':
137
- $field = 'disabled_classes' == $key
138
- ? __( 'Disabled classes', 'jquery-pin-it-button-for-images' )
139
- : __( 'Enabled classes', 'jquery-pin-it-button-for-images' );
140
- $error_message = $field . ' - ' . __('the given value doesn\'t meet the requirements. Please correct it and try again.', 'jquery-pin-it-button-for-images');
141
- $validator->validate_css_class_list($key, $error_message, array());
142
- break;
143
- case 'min_image_height':
144
- case 'min_image_width':
145
- $field = 'min_image_height' == $key
146
- ? __( 'Minimum image height', 'jquery-pin-it-button-for-images' )
147
- : __( 'Minimum image width', 'jquery-pin-it-button-for-images' );
148
- $error_message = $field . ' - ' . sprintf ( __('value must be a number greater or equal to %d.', 'jquery-pin-it-button-for-images'), '0' );
149
- $validator->validate_number($key, $error_message, array( 'min' => 0));
150
- break;
151
- default:
152
- $output[$key] = $value;
153
- break;
154
- }
155
- }
156
- return $output;
157
- }
158
-
159
- function save_post_selection_meta($post_id, $post, $update) {
160
- if ( !isset($_POST["jpibfi-post-selection"]) || !wp_verify_nonce($_POST["jpibfi-post-selection"], 'jpibfi-post-selection') )
161
- return $post_id;
162
-
163
- if ( !current_user_can("edit_post", $post_id) )
164
- return $post_id;
165
-
166
- if ( defined("DOING_AUTOSAVE") && DOING_AUTOSAVE )
167
- return $post_id;
168
-
169
- $should_be_in_array = isset($_POST["jpibfi-disable-post"]);
170
-
171
- $options = $this->options->get();
172
- $disabled_str = $options['disable_on'];
173
- $disabled_array = explode(',', $disabled_str);
174
- $is_in_array = in_array((string)$post_id, $disabled_array);
175
-
176
- if ($should_be_in_array === $is_in_array)
177
- return $post_id;
178
-
179
- if ($should_be_in_array)
180
- $disabled_array[] = (string)$post_id;
181
- else
182
- $disabled_array = array_diff( $disabled_array, array( (string)$post_id ) );
183
-
184
- $disabled_str = implode( ',', $disabled_array );
185
- $options['disable_on'] = $disabled_str;
186
- $this->options->update( $options );
187
- }
188
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/admin/settings/class-jpibfi-settings-base.php DELETED
@@ -1,117 +0,0 @@
1
- <?php
2
-
3
- abstract class JPIBFI_Settings_Tab {
4
-
5
- protected abstract function get_module_settings();
6
-
7
- protected $ajax_custom_action;
8
-
9
- function __construct() {
10
- $this->ajax_custom_action = 'jpibfi_settings_custom';
11
- add_action( 'wp_ajax_' . $this->ajax_custom_action, array($this, 'ajax_custom') );
12
- add_filter( 'jpibfi_settings_ajax', array($this, 'filter_settings_ajax_custom'));
13
- add_filter( 'jpibfi_settings_tabs', array($this, 'filter_settings_tab'));
14
-
15
- $module_settings = $this->get_module_settings();
16
- $slug = $module_settings['slug'];
17
- add_filter('jpibfi_settings_i18n_' . $slug, array($this, 'filter_settings_i18n'));
18
- }
19
-
20
- function ajax_custom() {
21
- check_ajax_referer( $this->ajax_custom_action, 'nonce' );
22
- if (!current_user_can( 'manage_options' ))
23
- wp_die();
24
-
25
- $action = $_REQUEST['name'];
26
- $settings = json_decode(stripslashes($_REQUEST['settings']), true);
27
- $result = apply_filters($this->ajax_custom_action . $action, array(), $settings);
28
- wp_send_json( $result );
29
- }
30
-
31
- function filter_settings_ajax_custom($ajax) {
32
- $ajax['customAction'] = $this->ajax_custom_action;
33
- $ajax['customActionNonce'] = wp_create_nonce( $this->ajax_custom_action );
34
- return $ajax;
35
- }
36
-
37
- function filter_settings_i18n($i18n){
38
- return $i18n;
39
- }
40
-
41
- function filter_settings_tab($tabs) {
42
- $module_settings = $this->get_module_settings();
43
- $tabs[] = $module_settings;
44
- return $tabs;
45
- }
46
- }
47
-
48
- abstract class JPIBFI_Settings_Base extends JPIBFI_Settings_Tab {
49
-
50
- protected $ajax_save_action;
51
- protected $options;
52
- public $settings_name;
53
-
54
- function __construct() {
55
- parent::__construct();
56
- $this->ajax_save_action = 'jpibfi_settings_save_';
57
- $this->options = $this->get_options();
58
- $this->settings_name = $this->options->get_option_name();
59
-
60
- $module_settings = $this->get_module_settings();
61
- $slug = $module_settings['slug'];
62
-
63
- add_action( 'wp_ajax_' . $this->ajax_save_action . $slug, array($this, 'ajax_save_settings') );
64
- add_filter( 'jpibfi_settings_ajax', array($this, 'filter_settings_ajax_settings'));
65
- add_filter( 'jpibfi_option_names', array($this, 'add_option_name') );
66
- add_filter( 'jpibfi_settings_configuration_' . $slug, array($this, 'filter_settings_configuration'));
67
- add_filter( 'jpibfi_settings_i18n_' . $slug, array($this, 'filter_settings_i18n'));
68
- }
69
-
70
- public function add_option_name($arr) {
71
- $arr[] = $this->settings_name;
72
- return $arr;
73
- }
74
-
75
- function ajax_save_settings() {
76
- check_ajax_referer( $this->ajax_save_action, 'nonce' );
77
- if (!current_user_can( 'manage_options' ))
78
- wp_die();
79
-
80
- $settings = json_decode(stripslashes($_REQUEST['settings']), true);
81
- $update_result = $this->save_settings($settings);
82
- wp_send_json( $update_result );
83
- }
84
-
85
- protected function get_checkbox_settings() {
86
- return array();
87
- }
88
-
89
- protected abstract function get_options();
90
-
91
- function filter_settings_ajax_settings($ajax) {
92
- $ajax['saveSettingsAction'] = $this->ajax_save_action;
93
- $ajax['saveSettingsNonce'] = wp_create_nonce( $this->ajax_save_action );
94
- return $ajax;
95
- }
96
-
97
- function filter_settings_tab($tabs) {
98
- $module_settings = $this->get_module_settings();
99
- $tabs[] = $module_settings;
100
- return $tabs;
101
- }
102
-
103
- function filter_settings_configuration($result){
104
- return $this->get_settings_configuration($result);
105
- }
106
-
107
- function save_settings($settings){
108
- $settings = $this->options->sanitize( $settings );
109
- $this->options->update( $settings );
110
-
111
- $result = new JPIBFI_Ajax_Result_Builder();
112
- return $result
113
- ->set_model($settings)
114
- ->set_message(__('Settings saved.', 'jquery-pin-it-button-for-images'))
115
- ->build();
116
- }
117
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/admin/settings/class-jpibfi-settings-validator.php DELETED
@@ -1,69 +0,0 @@
1
- <?php
2
-
3
- class JPIBFI_Settings_Validator {
4
-
5
- private $input = null;
6
- private $output = null;
7
-
8
- function __construct($input_arr, &$output_arr){
9
- $this->input = $input_arr;
10
- $this->output = &$output_arr;
11
- }
12
-
13
- public function add_error($key, $error_text){
14
- add_settings_error(
15
- $key,
16
- esc_attr( 'settings_updated' ),
17
- $error_text
18
- );
19
- }
20
-
21
- public function validate_number($key, $error_message, $validator_settings){
22
- $this->validate($key, $error_message, 'v_number', $validator_settings);
23
- }
24
-
25
- public function validate_css_class_list($key, $error_message, $validation_settings){
26
- $this->validate($key, $error_message, 'v_css_class_names', $validator_settings);
27
- }
28
-
29
- private function validate($key, $error_message, $validator_name, $validator_settings){
30
- $value = $this->input[ $key ];
31
- $valid = call_user_func( array($this, $validator_name), $value, $validator_settings);
32
- $this->handle_validation_result($valid, $key, $error_message);
33
- }
34
-
35
- private function handle_validation_result($validation_result, $key, $error_message){
36
- if ( $validation_result ){
37
- $this->output[ $key ] = $this->input[ $key ];
38
- } else {
39
- $this->add_error($key, $error_message);
40
- }
41
- }
42
-
43
- /* V FUNCTIONS */
44
-
45
- /* Checks if given string contains class names separated by semicolons or is empty */
46
- private function v_css_class_names( $str, $settings ) {
47
- if ( 0 == strlen( $str ) )
48
- return true;
49
-
50
- $names = explode( ';', $str );
51
- $only_class_names = true;
52
-
53
- for( $i = 0; $i < count( $names ) && $only_class_names; $i++ )
54
- $only_class_names = 1 == preg_match( "/^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$/", $names [ $i ] );
55
-
56
- return $only_class_names;
57
- }
58
-
59
- private function v_number($value, $settings){
60
- if (isset($settings['required']) && false == $settings['required'] && '' == $value)
61
- return true;
62
-
63
- return is_numeric($value)
64
- && (!isset($settings[ 'min' ]) || $value >= $settings['min'])
65
- && (!isset($settings[ 'max' ]) || $value <= $settings['max']);
66
- }
67
-
68
- /* END V FUNCTIONS */
69
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/admin/settings/class-jpibfi-visual-settings.php DELETED
@@ -1,209 +0,0 @@
1
- <?php
2
-
3
- class JPIBFI_Visual_Settings extends JPIBFI_Settings_Base {
4
-
5
- function __construct() {
6
- parent::__construct();
7
- }
8
-
9
- function filter_settings_i18n($i18n) {
10
- $i18n['margins_label'] = __( '"Pin it" button margins', 'jquery-pin-it-button-for-images' );
11
- $i18n['margins_desc'] = sprintf( __( 'Margins are used to adjust the position of the "Pin it" button, but not all margins are used on all button positions. Here is an example. If you\'re using the "%s" position, the button\'s position will be affected only by top and left margins. Bottom and right margins affect "%s" position, etc. The "%s" position does not use any margins at all.', 'jquery-pin-it-button-for-images' ),
12
- __( 'Top left', 'jquery-pin-it-button-for-images' ),
13
- __( 'Bottom right', 'jquery-pin-it-button-for-images' ),
14
- __( 'Middle', 'jquery-pin-it-button-for-images' )
15
- );
16
- $i18n['preview'] = __( 'Preview', 'jquery-pin-it-button-for-images' );
17
- $i18n['mode'] = __('Mode', 'jquery-pin-it-button-for-images');
18
- $i18n['settings'] = __('Settings', 'jquery-pin-it-button-for-images');
19
- $i18n['custom_button_desc'] = __( 'Click the button to choose an image from your WordPress media library. Height and width should fill automatically.', 'jquery-pin-it-button-for-images' );
20
- $i18n['custom_button_no_image_to_preview'] = __( 'No image to preview', 'jquery-pin-it-button-for-images' );
21
- $i18n['custom_button_upload'] = __( 'Upload an image using media library','jquery-pin-it-button-for-images');
22
- $i18n['custom_button_frame_title'] = __('Select your custom "Pin It" button', 'jquery-pin-it-button-for-images');
23
- $i18n['custom_button_frame_button_text'] = __('Use as "Pin It" button', 'jquery-pin-it-button-for-images');
24
-
25
- $i18n['attribution'] = sprintf( __('Available icons come from the following icon packs: %s and %s.', 'jquery-pin-it-button-for-images'),
26
- '<a href="http://fontawesome.io/" target="_blank">Font Awesome</a>',
27
- '<a href="https://icomoon.io/icons-icomoon.html" target="_blank">Icomoon</a>'
28
- );
29
-
30
- return $i18n;
31
- }
32
-
33
- function get_module_settings() {
34
- return array (
35
- 'slug' => 'visual',
36
- 'name' => __( 'Visual', 'jquery-pin-it-button-for-images' ),
37
- 'priority' => 1,
38
- 'setting_name' => $this->get_options()->get_option_name()
39
- );
40
- }
41
-
42
- function get_options() {
43
- return new JPIBFI_Visual_Options();
44
- }
45
-
46
- function get_settings_configuration($params) {
47
-
48
- $option_value = $this->options->get();
49
- $res = array();
50
-
51
- $res['show_button'] = array (
52
- 'key' => 'show_button',
53
- 'label' => __( 'Show button', 'jquery-pin-it-button-for-images' ),
54
- 'options' => array (
55
- 'hover' => __( 'On hover', 'jquery-pin-it-button-for-images' ),
56
- 'always_touch' => __( 'Always on touch devices', 'jquery-pin-it-button-for-images' ),
57
- 'always' => __( 'Always', 'jquery-pin-it-button-for-images' )
58
- ),
59
- 'desc' => __( 'When the "Pin it" button should be visible.', 'jquery-pin-it-button-for-images' )
60
- );
61
-
62
- $margin_args = array ('min' => '0', 'step' => '1', 'unit' => 'px');
63
- $res['button_margin_bottom'] = array_merge($margin_args, array('key' => 'button_margin_bottom', 'label' => __('Bottom', 'jquery-pin-it-button-for-images')));
64
- $res['button_margin_top'] = array_merge($margin_args, array('key' => 'button_margin_top', 'label' => __('Top', 'jquery-pin-it-button-for-images')));
65
- $res['button_margin_left'] = array_merge($margin_args, array('key' => 'button_margin_left', 'label' => __('Left', 'jquery-pin-it-button-for-images')));
66
- $res['button_margin_right'] = array_merge($margin_args, array('key' => 'button_margin_right', 'label' => __('Right', 'jquery-pin-it-button-for-images')));
67
-
68
- $res['button_position'] = array (
69
- 'key' => 'button_position',
70
- 'label' => __( '"Pin it" button position', 'jquery-pin-it-button-for-images' ),
71
- 'options' => array (
72
- 'top-left' => __( 'Top left', 'jquery-pin-it-button-for-images' ),
73
- 'top-right' => __( 'Top right', 'jquery-pin-it-button-for-images' ),
74
- 'bottom-left' => __( 'Bottom left', 'jquery-pin-it-button-for-images' ),
75
- 'bottom-right' => __( 'Bottom right', 'jquery-pin-it-button-for-images' ),
76
- 'middle' => __( 'Middle', 'jquery-pin-it-button-for-images' )
77
- ),
78
- 'desc' => __( 'Where the "Pin it" button should appear on the image.', 'jquery-pin-it-button-for-images' )
79
- );
80
-
81
- $res['description_option'] = array (
82
- 'key' => 'description_option',
83
- 'label' => __( 'Description source', 'jquery-pin-it-button-for-images' ),
84
- 'options' => array (
85
- "post_title" => __( 'Post title', 'jquery-pin-it-button-for-images' ),
86
- "post_excerpt" => __( 'Post description (excerpt)', 'jquery-pin-it-button-for-images' ),
87
- "img_title" => __( 'Image title attribute', 'jquery-pin-it-button-for-images' ),
88
- "site_title" => __( 'Site title (Settings->General)', 'jquery-pin-it-button-for-images' ),
89
- "img_description" => __( 'Image description', 'jquery-pin-it-button-for-images' ),
90
- "img_caption" => __('Image caption', 'jquery-pin-it-button-for-images' ),
91
- "img_alt" => __( 'Image alt attribute', 'jquery-pin-it-button-for-images' )
92
- ),
93
- 'desc' => __( 'From where the Pinterest message should be taken. Check which sources should be considered and prioritize them by dragging and dropping. The description will come from the top source that has data. Please note that "Image description" and "Image caption" work properly only for images that were added to your Media Library.', 'jquery-pin-it-button-for-images' )
94
- );
95
-
96
- $res['pinLinkedImages'] = array (
97
- 'key' => 'pinLinkedImages',
98
- 'label' => __('Pin linked images', 'jquery-pin-it-button-for-images'),
99
- 'text' => __('Active', 'jquery-pin-it-button-for-images'),
100
- 'desc' => __('When checked, pins full-sized images instead of thumbnails (works only if you link thumbnails to their full versions).', 'jquery-pin-it-button-for-images')
101
- );
102
-
103
- $res['transparency_value'] = array (
104
- 'key' => 'transparency_value',
105
- 'label' => __('Transparency value', 'jquery-pin-it-button-for-images'),
106
- 'desc' => sprintf ( __('Choose transparency (between %.02f and %.02f)', 'jquery-pin-it-button-for-images'), '0.00', '1.00' ),
107
- 'min' => '0',
108
- 'max' => '1',
109
- 'step' => '0.01'
110
- );
111
-
112
- $res['pin_image'] = array (
113
- 'key' => 'pin_image',
114
- 'label' => __('Pin image', 'jquery-pin-it-button-for-images'),
115
- 'options' => array (
116
- 'old_default' => __('Old default', 'jquery-pin-it-button-for-images'),
117
- 'default' => __('Default', 'jquery-pin-it-button-for-images'),
118
- 'custom' => __('Custom', 'jquery-pin-it-button-for-images')
119
- )
120
- );
121
-
122
- $res['pin_image_button'] = array (
123
- 'key' => 'pin_image_button',
124
- 'label' => __('Button', 'jquery-pin-it-button-for-images'),
125
- 'options' => array (
126
- 'square' => __('Square', 'jquery-pin-it-button-for-images'),
127
- 'rounded-square' => __('Rounded square', 'jquery-pin-it-button-for-images'),
128
- 'round' => __('Round', 'jquery-pin-it-button-for-images'),
129
- 'rectangle' => __('Rectangle', 'jquery-pin-it-button-for-images'),
130
- 'rounded-rectangle' => __('Rounded rectangle', 'jquery-pin-it-button-for-images')
131
- )
132
- );
133
-
134
- $pin_icon_options = array (
135
- 'circle' => __('Circle', 'jquery-pin-it-button-for-images'),
136
- 'plain' => __('Plain', 'jquery-pin-it-button-for-images'),
137
- 'thumb-tack' => __('Thumbtack', 'jquery-pin-it-button-for-images'),
138
- 'pushpin' => __('Thumbtack #2', 'jquery-pin-it-button-for-images'),
139
- 'pinterest2' => __('Classic', 'jquery-pin-it-button-for-images'),
140
- );
141
-
142
- $res['pin_image_icon'] = array (
143
- 'key' => 'pin_image_icon',
144
- 'label' => __('Icon', 'jquery-pin-it-button-for-images'),
145
- 'options' => $pin_icon_options
146
- );
147
-
148
- $res['pin_image_size'] = array (
149
- 'key' => 'pin_image_size',
150
- 'label' => __('Size', 'jquery-pin-it-button-for-images'),
151
- 'options' => array (
152
- 'small' => __('Small', 'jquery-pin-it-button-for-images'),
153
- 'normal' => __('Normal', 'jquery-pin-it-button-for-images'),
154
- 'large' => __('Large', 'jquery-pin-it-button-for-images'),
155
- )
156
- );
157
-
158
- $res['custom_image_url'] = array (
159
- 'key' => 'custom_image_url',
160
- 'label' => __( 'URL address of the image', 'jquery-pin-it-button-for-images' )
161
- );
162
-
163
- $image_size = array ('min' => '0', 'step' => '1', 'unit' => 'px');
164
- $res['custom_image_height'] = array_merge($margin_args, array('key' => 'custom_image_height', 'label' => __( 'Height', 'jquery-pin-it-button-for-images' )));
165
- $res['custom_image_width'] = array_merge($margin_args, array('key' => 'custom_image_width', 'label' => __('Width', 'jquery-pin-it-button-for-images')));
166
-
167
- foreach($res as $key => $setting) {
168
- $res[$key]['value'] = $option_value[$key];
169
- }
170
-
171
- return $res;
172
- }
173
-
174
- public function visual_options_callback() {
175
- echo '<p>' . __('How it should look like', 'jquery-pin-it-button-for-images') . '</p>';
176
- }
177
-
178
- public function sanitize_visual_options( $input ) {
179
-
180
- $this->sanitize_input( $input );
181
- $output = $this->options->get();
182
-
183
- $validator = new JPIBFI_Settings_Validator($input, $output);
184
-
185
- foreach( $input as $key => $value ) {
186
-
187
- switch($key) {
188
- case 'custom_image_height':
189
- case 'custom_image_width':
190
- $name = "";
191
- if ( 'custom_image_height' == $key )
192
- $name = __('Custom image height', 'jquery-pin-it-button-for-images' );
193
- else if ( 'custom_image_width' == $key )
194
- $name = __('Custom image width', 'jquery-pin-it-button-for-images' );
195
- $error_message = $name . ' - ' . sprintf ( __('value must be empty or a number greater or equal to %d.', 'jquery-pin-it-button-for-images'), '0' );
196
- $validator->validate_number($key, $error_message, array( 'min' => 0, 'required' => false));
197
- break;
198
- case 'transparency_value':
199
- $error_message = sprintf( __('Transparency value must be a number between %.02d and %.02f.', 'jquery-pin-it-button-for-images'), '0.00', '1.00' );
200
- $validator->validate_number($key, $error_message, array( 'min' => 0.0, 'max' => 1.0));
201
- break;
202
- default:
203
- $output[ $key ] = $value;
204
- break;
205
- }
206
- }
207
- return $this->options->sanitize($output);
208
- }
209
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/admin/settings/jpibfi-advanced-settings.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class JPIBFI_Advanced_Settings extends JPIBFI_Settings_Base {
4
+
5
+ function __construct() {
6
+ parent::__construct( 'advanced', new JPIBFI_Advanced_Options() );
7
+ }
8
+
9
+ function get_settings_i18n() {
10
+ $parent = parent::get_settings_i18n();
11
+ $i18n = array();
12
+ $i18n['title'] = __('Advanced settings', 'jquery-pin-it-button-for-images');
13
+ $i18n['filters_label'] = __( 'Filters', 'jquery-pin-it-button-for-images' );
14
+ $i18n['filters_description'] =
15
+ sprintf(
16
+ __( 'You can enabled or disable if the plugin should use a certain filter and change the priority setting. Read more about filters <a href="%s" target="_blank">here</a>. By default all 3 filters are active with the priority of 10.', 'jquery-pin-it-button-for-images' ),
17
+ 'https://codex.wordpress.org/Plugin_API'
18
+ );
19
+ $i18n['filter_template'] = __( '%name% <label>with priority of</label> %priority%', 'jquery-pin-it-button-for-images' );
20
+
21
+ return array_merge( $parent, $i18n );
22
+ }
23
+
24
+ function get_module_settings() {
25
+ return array(
26
+ 'slug' => 'advanced',
27
+ 'name' => __( 'Advanced', 'jquery-pin-it-button-for-images' ),
28
+ );
29
+ }
30
+
31
+ function get_settings_configuration() {
32
+
33
+ $option_value = $this->options->get();
34
+ $res = array();
35
+
36
+ $res['filter_the_content_on'] = array(
37
+ 'key' => 'filter_the_content_on',
38
+ 'text' => 'the_content',
39
+ 'type' => 'boolean'
40
+ );
41
+
42
+ $res['filter_the_content_priority'] = array(
43
+ 'key' => 'filter_the_content_priority',
44
+ 'type' => 'int',
45
+ 'error_label' => __( 'the_content priority', 'jquery-pin-it-button-for-images' )
46
+ );
47
+
48
+ $res['filter_the_excerpt_on'] = array(
49
+ 'key' => 'filter_the_excerpt_on',
50
+ 'text' => 'the_excerpt',
51
+ 'type' => 'boolean'
52
+ );
53
+
54
+ $res['filter_the_excerpt_priority'] = array(
55
+ 'key' => 'filter_the_excerpt_priority',
56
+ 'type' => 'int',
57
+ 'error_label' => __( 'the_excerpt priority', 'jquery-pin-it-button-for-images' )
58
+ );
59
+
60
+ $res['filter_post_thumbnail_html_on'] = array(
61
+ 'key' => 'filter_post_thumbnail_html_on',
62
+ 'text' => 'post_thumbnail_html',
63
+ 'type' => 'boolean'
64
+ );
65
+
66
+ $res['filter_post_thumbnail_html_priority'] = array(
67
+ 'key' => 'filter_post_thumbnail_html_priority',
68
+ 'type' => 'int',
69
+ 'error_label' => __( 'post_thumbnail_html priority', 'jquery-pin-it-button-for-images' )
70
+ );
71
+
72
+ foreach ( $res as $key => $setting ) {
73
+ $res[ $key ]['value'] = $option_value[ $key ];
74
+ }
75
+
76
+ return $res;
77
+ }
78
+ }
includes/admin/settings/jpibfi-import-export-settings.php ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class JPIBFI_Import_Export_Settings extends JPIBFI_Settings_Tab {
4
+
5
+ private $ajax_import_action;
6
+
7
+ function __construct() {
8
+ parent::__construct( 'import' );
9
+ $this->ajax_import_action = 'import';
10
+ add_filter( 'export_args', array( $this, 'export_args' ) );
11
+ add_action( 'export_wp', array( $this, 'export_wp' ) );
12
+ }
13
+
14
+ function import() {
15
+ $result = new JPIBFI_Ajax_Result_Builder();
16
+ $file = wp_import_handle_upload();
17
+
18
+ if ( isset( $file['error'] ) ) {
19
+ return $result
20
+ ->set_error( esc_html( $file['error'] ) )
21
+ ->build();
22
+ }
23
+
24
+ if ( ! isset( $file['file'], $file['id'] ) ) {
25
+ return $result
26
+ ->set_error( __( 'The file did not upload properly. Please try again.', 'jquery-pin-it-button-for-images' ) )
27
+ ->build();
28
+ }
29
+
30
+ if ( ! file_exists( $file['file'] ) ) {
31
+ wp_import_cleanup( $file['id'] );
32
+
33
+ return $result
34
+ ->set_error( sprintf( __( 'The export file could not be found at <code>%s</code>. It is likely that this was caused by a permissions problem.', 'jquery-pin-it-button-for-images' ), esc_html( $file['file'] ) ) )
35
+ ->build();
36
+ }
37
+
38
+ if ( ! is_file( $file['file'] ) ) {
39
+ wp_import_cleanup( $file['id'] );
40
+
41
+ return $result
42
+ ->set_error( __( 'The path is not a file, please try again.', 'jquery-pin-it-button-for-images' ) )
43
+ ->build();
44
+ }
45
+
46
+ $file_contents = file_get_contents( $file['file'] );
47
+ $data = json_decode( $file_contents, true );
48
+ wp_import_cleanup( $file['id'] );
49
+
50
+ $options_to_import = $data['options'];
51
+ foreach ( (array) $options_to_import as $option_name => $option_value ) {
52
+ $options_to_import[ $option_name ] = maybe_unserialize( $option_value );
53
+ }
54
+
55
+ $converter = new JPIBFI_Option_Converter();
56
+ $converter->save_and_convert_if_needed( $options_to_import );
57
+
58
+ return $result
59
+ ->set_message( __( 'Import Successful', 'jquery_pin_it_button_for_images' ) )
60
+ ->build();
61
+ }
62
+
63
+ function get_settings_i18n() {
64
+ $parent = parent::get_settings_i18n();
65
+ $i18n = array();
66
+ $i18n['export_title'] = __( 'Export', 'jquery-pin-it-button-for-images' );
67
+ $i18n['export_url'] = admin_url( 'export.php?download=true&content=jpibfi' );
68
+ $i18n['export_button_text'] = __( 'Download Export File', 'jquery-pin-it-button-for-images' );
69
+
70
+ $i18n['import_title'] = __( 'Import', 'jquery-pin-it-button-for-images' );
71
+ $i18n['import_button_text'] = __( 'Import Settings', 'jquery-pin-it-button-for-images' );
72
+ $i18n['import_action_name'] = $this->ajax_import_action;
73
+
74
+ return array_merge( $parent, $i18n );
75
+ }
76
+
77
+ function get_module_settings() {
78
+ return array(
79
+ 'slug' => 'import',
80
+ 'name' => __( 'Import/Export Settings', 'jquery-pin-it-button-for-images' ),
81
+ );
82
+ }
83
+
84
+ /**
85
+ * @param array $args The export args being filtered.
86
+ *
87
+ * @return array The (possibly modified) export args.
88
+ */
89
+ public function export_args( $args ) {
90
+ if ( ! empty( $_GET['content'] ) && 'jpibfi' == $_GET['content'] ) {
91
+ return array( 'jpibfi' => true );
92
+ }
93
+
94
+ return $args;
95
+ }
96
+
97
+
98
+ /**
99
+ * Export options as a JSON file if that's what the user wants to do.
100
+ *
101
+ * @param array $args The export arguments.
102
+ *
103
+ * @return void
104
+ */
105
+ public function export_wp( $args ) {
106
+ if ( empty( $args['jpibfi'] ) ) {
107
+ return;
108
+ }
109
+
110
+ $filename = 'jpibfi_settings_' . date( 'Y-m-d' ) . '.json';
111
+
112
+ header( 'Content-Description: File Transfer' );
113
+ header( 'Content-Disposition: attachment; filename=' . $filename );
114
+ header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
115
+
116
+ $option_names = array(
117
+ 'jpibfi_selection_options',
118
+ 'jpibfi_visual_options',
119
+ 'jpibfi_options_version'
120
+ );
121
+
122
+ $export_options = array();
123
+
124
+ foreach ( $option_names as $option_name ) {
125
+
126
+ $option_value = get_option( $option_name );
127
+ if ( $option_value !== false ) {
128
+ $export_options[ $option_name ] = maybe_serialize( $option_value );
129
+ }
130
+ }
131
+ $JSON_PRETTY_PRINT = defined( 'JSON_PRETTY_PRINT' ) ? JSON_PRETTY_PRINT : null;
132
+ echo json_encode( array( 'options' => $export_options ), $JSON_PRETTY_PRINT );
133
+ exit;
134
+ }
135
+ }
includes/admin/settings/jpibfi-license-settings.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+
includes/admin/settings/jpibfi-selection-settings.php ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class JPIBFI_Selection_Settings extends JPIBFI_Settings_Base {
4
+
5
+ function __construct() {
6
+ parent::__construct( 'select', new JPIBFI_Selection_Options() );
7
+ add_action( 'add_meta_boxes', array( $this, 'add_post_selection_meta_box' ), 10, 2 );
8
+ add_action( 'save_post', array( $this, 'save_post_selection_meta' ), 10, 3 );
9
+ }
10
+
11
+ function add_post_selection_meta_box( $post_type, $post ) {
12
+ add_meta_box(
13
+ 'jpibfi-disable-plugin_meta',
14
+ __( 'jQuery Pin It Button for Images Settings', 'jquery-pin-it-button-for-images' ),
15
+ array( $this, 'render_post_selection_meta_box' ),
16
+ array( 'post', 'page' ),
17
+ 'side'
18
+ );
19
+ }
20
+
21
+ function get_settings_i18n() {
22
+ $parent = parent::get_settings_i18n();
23
+ $i18n = array();
24
+ $i18n['title'] = __( 'Selection settings', 'jquery-pin-it-button-for-images' );
25
+ $i18n['image_resolution_label'] = __( 'Minimum image resolution', 'jquery-pin-it-button-for-images' );
26
+ $i18n['image_resolution_desc'] = __( 'Use this settings to hide the "Pin it" button on small images (e.g. social media icons).', 'jquery-pin-it-button-for-images' );
27
+ $i18n['image_resolution_desc_2'] = __( '* - screen that is less than 768 pixels wide', 'jquery-pin-it-button-for-images' );
28
+ $i18n['min_resolution_template_small'] = __( 'For small screens* the "Pin it" button will show up if the image is at least %height% pixels high and %width% pixels wide.', 'jquery-pin-it-button-for-images' );
29
+ $i18n['min_resolution_template'] = __( 'Otherwise, the "Pin it" button will show up if the image is at least %height% pixels high and %width% pixels wide.', 'jquery-pin-it-button-for-images' );
30
+
31
+ $i18n['show_on_field_label'] = __( 'On which pages the "Pin it" button should be shown', 'jquery-pin-it-button-for-images' );
32
+ $i18n['show_on_field_desc'] = __( 'Separate settings using commas. For the button to show up on a certain page, the page must be included in the "Show on" section and not included in the "Disable on" section. You can use the following settings:' )
33
+ . '<p>'
34
+ . __( 'number (e.g. 588) - the ID of a certain page or post' ) . '<br/>'
35
+ . __( '[front] - front page' ) . '<br/>'
36
+ . __( '[single] - single posts' ) . '<br/>'
37
+ . __( '[page] - single pages' ) . '<br/>'
38
+ . sprintf( __( '[archive] - <a href="%s" target="_blank">archive pages</a>' ) . '<br/>', 'https://codex.wordpress.org/Function_Reference/is_archive' )
39
+ . __( '[search] - search pages' ) . '<br/>'
40
+ . __( '[category] - category pages' ) . '<br/>'
41
+ . __( '[tag] - tag pages' ) . '<br/>'
42
+ . __( '[home] - blog page' ) . '</p>';
43
+
44
+ return array_merge( $parent, $i18n );
45
+ }
46
+
47
+ function get_module_settings() {
48
+ return array(
49
+ 'slug' => 'select',
50
+ 'name' => __( 'Selection', 'jquery-pin-it-button-for-images' ),
51
+ );
52
+ }
53
+
54
+ function get_settings_configuration() {
55
+
56
+ $option_value = $this->options->get();
57
+ $res = array();
58
+
59
+ $res['image_selector'] = array(
60
+ 'key' => 'image_selector',
61
+ 'label' => __( 'Image selector', 'jquery-pin-it-button-for-images' ),
62
+ 'desc' => sprintf( __( 'jQuery selector for all the images that should have the "Pin it" button. Set the value to %s if you want the "Pin it" button to appear only on images in content or %s to appear on all images on site (including sidebar, header and footer). If you know a thing or two about jQuery, you might use your own selector. %sClick here%s to read about jQuery selectors.', 'jquery-pin-it-button-for-images' ),
63
+ '<strong>.jpibfi_container img</strong>',
64
+ '<strong>img</strong>',
65
+ '<a href="http://api.jquery.com/category/selectors/" target="_blank">',
66
+ '</a>'
67
+ ),
68
+ 'type' => 'string'
69
+ );
70
+
71
+ $res['disabled_classes'] = array(
72
+ 'key' => 'disabled_classes',
73
+ 'label' => __( 'Disabled classes', 'jquery-pin-it-button-for-images' ),
74
+ 'desc' => __( 'Images with these CSS classes won\'t show the "Pin it" button. Please separate multiple classes with semicolons. Spaces are not accepted.', 'jquery-pin-it-button-for-images' ),
75
+ 'type' => 'string'
76
+ );
77
+
78
+ $res['enabled_classes'] = array(
79
+ 'key' => 'enabled_classes',
80
+ 'label' => __( 'Enabled classes', 'jquery-pin-it-button-for-images' ),
81
+ 'desc' => __( 'Only images with these CSS classes will show the "Pin it" button. Please separate multiple classes with semicolons. If this field is empty, images with any (besides disabled ones) classes will show the Pin It button.', 'jquery-pin-it-button-for-images' ),
82
+ 'type' => 'string'
83
+ );
84
+
85
+ $local_args = array(
86
+ 'min' => '0',
87
+ 'step' => '1',
88
+ 'type' => 'int'
89
+ );
90
+ $res['min_image_height'] = array_merge( $local_args, array(
91
+ 'key' => 'min_image_height',
92
+ 'label' => __( 'Height', 'jquery-pin-it-button-for-images' ),
93
+ 'error_label' => __( 'Minimum image height', 'jquery-pin-it-button-for-images' )
94
+ ) );
95
+ $res['min_image_width'] = array_merge( $local_args, array(
96
+ 'key' => 'min_image_width',
97
+ 'label' => __( 'Width', 'jquery-pin-it-button-for-images' ),
98
+ 'error_label' => __( 'Minimum image width', 'jquery-pin-it-button-for-images' )
99
+ ) );
100
+
101
+ $res['min_image_height_small'] = array_merge( $local_args, array(
102
+ 'key' => 'min_image_height_small',
103
+ 'label' => __( 'Height', 'jquery-pin-it-button-for-images' ),
104
+ 'error_label' => __( 'Minimum image height for mobile', 'jquery-pin-it-button-for-images' )
105
+ ) );
106
+ $res['min_image_width_small'] = array_merge( $local_args, array(
107
+ 'key' => 'min_image_width_small',
108
+ 'label' => __( 'Width', 'jquery-pin-it-button-for-images' ),
109
+ 'error_label' => __( 'Minimum image width for mobile', 'jquery-pin-it-button-for-images' )
110
+ ) );
111
+
112
+ $res['show_on'] = array(
113
+ 'key' => 'show_on',
114
+ 'label' => __( 'Show on', 'jquery-pin-it-button-for-images' ),
115
+ 'type' => 'string'
116
+ );
117
+
118
+ $res['disable_on'] = array(
119
+ 'key' => 'disable_on',
120
+ 'label' => __( 'Disable on', 'jquery-pin-it-button-for-images' ),
121
+ 'type' => 'string'
122
+ );
123
+
124
+ foreach ( $res as $key => $setting ) {
125
+ $res[ $key ]['value'] = $option_value[ $key ];
126
+ }
127
+
128
+ return $res;
129
+ }
130
+
131
+ function render_post_selection_meta_box() {
132
+ global $post;
133
+ $id = $post->ID;
134
+ $options = $this->options->get();
135
+ $disabled_list = $options['disable_on'];
136
+ $disabled_array = explode( ',', $disabled_list );
137
+ $result = in_array( (string) $id, $disabled_array );
138
+ wp_nonce_field( 'jpibfi-post-selection', "jpibfi-post-selection" );
139
+ ?>
140
+ <div>
141
+ <label>
142
+ <input name="jpibfi-disable-post" type="checkbox" <?php checked( true, $result, true ); ?> value="1"/>
143
+ <?php _e( 'Disable plugin on this post', 'jquery-pin-it-button-for-images' ); ?>
144
+ </label>
145
+ </div>
146
+ <?php
147
+ }
148
+
149
+ function save_post_selection_meta( $post_id, $post, $update ) {
150
+ if ( ! isset( $_POST["jpibfi-post-selection"] ) || ! wp_verify_nonce( $_POST["jpibfi-post-selection"], 'jpibfi-post-selection' ) ) {
151
+ return $post_id;
152
+ }
153
+
154
+ if ( ! current_user_can( "edit_post", $post_id ) ) {
155
+ return $post_id;
156
+ }
157
+
158
+ if ( defined( "DOING_AUTOSAVE" ) && DOING_AUTOSAVE ) {
159
+ return $post_id;
160
+ }
161
+
162
+ $should_be_in_array = isset( $_POST["jpibfi-disable-post"] );
163
+
164
+ $options = $this->options->get();
165
+ $disabled_str = $options['disable_on'];
166
+ $disabled_array = explode( ',', $disabled_str );
167
+ $is_in_array = in_array( (string) $post_id, $disabled_array );
168
+
169
+ if ( $should_be_in_array === $is_in_array ) {
170
+ return $post_id;
171
+ }
172
+
173
+ if ( $should_be_in_array ) {
174
+ $disabled_array[] = (string) $post_id;
175
+ } else {
176
+ $disabled_array = array_diff( $disabled_array, array( (string) $post_id ) );
177
+ }
178
+
179
+ $disabled_str = implode( ',', $disabled_array );
180
+ $options['disable_on'] = $disabled_str;
181
+ $this->options->update( $options );
182
+ }
183
+ }
includes/admin/settings/jpibfi-settings-base.php ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ abstract class JPIBFI_Settings_Tab {
4
+
5
+ abstract function get_module_settings();
6
+
7
+ /**
8
+ * @var string
9
+ */
10
+ private $slug;
11
+
12
+ function __construct( $slug ) {
13
+ $this->slug = $slug;
14
+ add_action( 'wp_ajax_' . $this->get_ajax_custom_action_name(), array( $this, 'ajax_custom' ) );
15
+ }
16
+
17
+ function ajax_custom() {
18
+ check_ajax_referer( $this->get_ajax_custom_action_name(), 'nonce' );
19
+ if ( ! current_user_can( 'manage_options' ) ) {
20
+ wp_die();
21
+ }
22
+
23
+ $action = $_REQUEST['name'];
24
+ if ( ! is_callable( array( $this, $action ) ) ) {
25
+ $builder = new JPIBFI_Ajax_Result_Builder();
26
+ wp_send_json(
27
+ $builder
28
+ ->set_error( __( 'Error', 'jquery-pin-it-button-for-images' ) )
29
+ ->build()
30
+ );
31
+ } else {
32
+ $result = call_user_func( array( $this, $action ) );
33
+ wp_send_json( $result );
34
+ }
35
+ }
36
+
37
+ private function get_ajax_custom_action_name() {
38
+ return 'jpibfi_settings_custom_' . $this->get_slug();
39
+ }
40
+
41
+ function get_settings_ajax() {
42
+ return array(
43
+ 'url' => admin_url( 'admin-ajax.php' ),
44
+ 'customAction' => $this->get_ajax_custom_action_name(),
45
+ 'customActionNonce' => wp_create_nonce( $this->get_ajax_custom_action_name() )
46
+ );
47
+ }
48
+
49
+ function get_settings_configuration() {
50
+ return array();
51
+ }
52
+
53
+ function get_settings_i18n() {
54
+ return array(
55
+ 'submit' => __( 'Save Changes', 'jquery-pin-it-button-for-images' ),
56
+ 'pro_feature_error' => sprintf(
57
+ __( 'This feature is available in <a target="_blank" href="%s">the PRO version</a>.', 'jquery-pin-it-button-for-images' ),
58
+ 'https://highfiveplugins.com/downloads/jquery-pin-it-button-for-images-pro/'
59
+ )
60
+ );
61
+ }
62
+
63
+ function get_slug() {
64
+ return $this->slug;
65
+ }
66
+ }
67
+
68
+ abstract class JPIBFI_Settings_Base extends JPIBFI_Settings_Tab {
69
+
70
+ /**
71
+ * @var JPIBFI_Options
72
+ */
73
+ protected $options;
74
+
75
+ function __construct( $slug, $options ) {
76
+ parent::__construct( $slug );
77
+ $this->options = $options;
78
+
79
+ add_action( 'wp_ajax_' . $this->get_ajax_save_action_name(), array( $this, 'ajax_save_settings' ) );
80
+ }
81
+
82
+ function ajax_save_settings() {
83
+ check_ajax_referer( $this->get_ajax_save_action_name(), 'nonce' );
84
+ if ( ! current_user_can( 'manage_options' ) ) {
85
+ wp_die();
86
+ }
87
+
88
+ $settings = json_decode( stripslashes( $_REQUEST['settings'] ), true );
89
+ $update_result = $this->save_settings( $settings );
90
+ wp_send_json( $update_result );
91
+ }
92
+
93
+ private function get_ajax_save_action_name() {
94
+ return 'jpibfi_settings_save_' . $this->get_slug();
95
+ }
96
+
97
+ function get_settings_ajax() {
98
+ $result = parent::get_settings_ajax();
99
+ $result['saveSettingsAction'] = $this->get_ajax_save_action_name();
100
+ $result['saveSettingsNonce'] = wp_create_nonce( $this->get_ajax_save_action_name() );
101
+
102
+ return $result;
103
+ }
104
+
105
+ function save_settings( $settings ) {
106
+ $settings = $this->options->sanitize( $settings );
107
+
108
+ $validator = new JPIBFI_Validator( $settings, $this->options->get_default_options(), $this->get_settings_configuration() );
109
+ $errors = $validator->get_errors();
110
+
111
+ $result = new JPIBFI_Ajax_Result_Builder();
112
+
113
+ if ( count( $errors ) > 0 ) {
114
+ return $result
115
+ ->set_errors( array_merge(
116
+ array( 'header' => __( 'Settings not saved.', 'jquery-pin-it-button-for-images' ) ),
117
+ $errors
118
+ ) )
119
+ ->build();
120
+ }
121
+
122
+ $sanitized = $validator->get_result();
123
+ $this->options->update( $sanitized );
124
+
125
+ return $result
126
+ ->set_model( $sanitized )
127
+ ->set_message( __( 'Settings saved.', 'jquery-pin-it-button-for-images' ) )
128
+ ->build();
129
+ }
130
+ }
includes/admin/settings/jpibfi-validator.php ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class JPIBFI_Validator {
4
+
5
+ private $current;
6
+ private $default;
7
+ private $settings;
8
+
9
+ private $result;
10
+ private $errors;
11
+
12
+ function __construct( $current, $default, $settings ) {
13
+ $this->current = $current;
14
+ $this->default = $default;
15
+ $this->settings = $settings;
16
+
17
+ $this->process();
18
+ }
19
+
20
+ private function process() {
21
+ $this->errors = array();
22
+ $this->result = array();
23
+
24
+ foreach ( $this->default as $key => $def_value ) {
25
+ if ( ! isset( $this->current[ $key ] ) ) {
26
+ $this->result[ $key ] = $def_value;
27
+ continue;
28
+ }
29
+ if ( ! isset( $this->settings[ $key ] ) ) {
30
+ continue;
31
+ }
32
+ $value = $this->current[ $key ];
33
+ $value = $this->try_sanitize_field( $value, $this->settings[ $key ] );
34
+ $validation_result = $this->validate_field( $value, $this->settings[ $key ] );
35
+ if ( true !== $validation_result ) {
36
+ $this->errors[ $key ] = $validation_result;
37
+ }
38
+ $this->result[ $key ] = $value;
39
+ }
40
+ }
41
+
42
+ function get_errors() {
43
+ return $this->errors;
44
+ }
45
+
46
+ function get_result() {
47
+ return $this->result;
48
+ }
49
+
50
+ private function get_error_label( $setting ) {
51
+ return isset( $setting['error_label'] ) ? $setting['error_label'] : $setting['label'];
52
+ }
53
+
54
+ private function validate_field( $value, $setting ) {
55
+ if ( ! isset( $setting['type'] ) ) {
56
+ return true;
57
+ }
58
+ $func_name = 'validate_' . $setting['type'];
59
+
60
+ if ( is_callable( array( $this, $func_name ) ) ) {
61
+ return call_user_func( array( $this, $func_name ), $value, $setting );
62
+ }
63
+ return true;
64
+ }
65
+
66
+ private function validate_float( $value, $setting ) {
67
+ if ( ! is_float( $value ) ) {
68
+ return sprintf(
69
+ __( '%1$s value is not a number.', 'jquery-pin-it-button-for-images' ),
70
+ $this->get_error_label( $setting )
71
+ );
72
+ }
73
+
74
+ return $this->validate_mix_max( $value, $setting );
75
+ }
76
+
77
+ private function validate_int( $value, $setting ) {
78
+ if ( ! is_int( $value ) ) {
79
+ return sprintf(
80
+ __( '%1$s value is not a number.', 'jquery-pin-it-button-for-images' ),
81
+ $this->get_error_label( $setting )
82
+ );
83
+ }
84
+
85
+ return $this->validate_mix_max( $value, $setting );
86
+ }
87
+
88
+ private function validate_mix_max( $value, $setting ) {
89
+ if ( isset( $setting['min'] ) && $value < $setting['min'] ) {
90
+ return sprintf(
91
+ __( '%1$s value is less than the minimum value of %2$s.', 'jquery-pin-it-button-for-images' ),
92
+ $this->get_error_label( $setting ),
93
+ $setting['min']
94
+ );
95
+ }
96
+ if ( isset( $setting['max'] ) && $value > $setting['max'] ) {
97
+ return sprintf(
98
+ __( '%1$s value is greater than the minimum value of %2$s.', 'jquery-pin-it-button-for-images' ),
99
+ $this->get_error_label( $setting ),
100
+ $setting['max']
101
+ );
102
+ }
103
+
104
+ return true;
105
+ }
106
+
107
+ private function validate_multiselect( $value, $setting ) {
108
+ $err = __( '%1$s value is invalid.', 'jquery-pin-it-button-for-images' );
109
+ if ( ! is_array( $value ) ) {
110
+ return sprintf( $err, $this->get_error_label( $setting ) );
111
+ }
112
+ $options_keys = array_keys( $setting['options'] );
113
+ foreach ( $value as $name ) {
114
+ if ( ! in_array( $name, $options_keys ) ) {
115
+ return sprintf( $err, $this->get_error_label( $setting ) );
116
+ }
117
+ }
118
+
119
+ return true;
120
+ }
121
+
122
+ private function validate_select( $value, $setting ) {
123
+ $options_keys = array_keys( $setting['options'] );
124
+ if ( ! in_array( $value, $options_keys ) ) {
125
+ return sprintf(
126
+ __( '%1$s value is invalid.', 'jquery-pin-it-button-for-images' ),
127
+ $this->get_error_label( $setting )
128
+ );
129
+ }
130
+
131
+ return true;
132
+ }
133
+
134
+ private function try_sanitize_field( $value, $setting ) {
135
+ if ( ! isset( $setting['type'] ) ) {
136
+ return $value;
137
+ }
138
+ switch ( $setting['type'] ) {
139
+ case 'int':
140
+ return is_numeric( $value ) ? intval( $value ) : $value;
141
+ case 'float':
142
+ return is_numeric( $value ) ? floatval( $value ) : $value;
143
+ case 'boolean':
144
+ return ! is_bool( $value ) ? 'true' === $value : $value;
145
+ default:
146
+ return $value;
147
+ }
148
+ }
149
+
150
+ }
includes/admin/settings/jpibfi-visual-settings.php ADDED
@@ -0,0 +1,248 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class JPIBFI_Visual_Settings extends JPIBFI_Settings_Base {
4
+
5
+ function __construct() {
6
+ parent::__construct( 'visual', new JPIBFI_Visual_Options() );
7
+ }
8
+
9
+ function get_settings_i18n() {
10
+ $parent = parent::get_settings_i18n();
11
+ $i18n = array();
12
+ $i18n['margins_label'] = __( '"Pin it" button margins', 'jquery-pin-it-button-for-images' );
13
+ $i18n['margins_desc'] = sprintf( __( 'Margins are used to adjust the position of the "Pin it" button, but not all margins are used on all button positions. Here is an example. If you\'re using the "%s" position, the button\'s position will be affected only by top and left margins. Bottom and right margins affect "%s" position, etc. The "%s" position does not use any margins at all.', 'jquery-pin-it-button-for-images' ),
14
+ __( 'Top left', 'jquery-pin-it-button-for-images' ),
15
+ __( 'Bottom right', 'jquery-pin-it-button-for-images' ),
16
+ __( 'Middle', 'jquery-pin-it-button-for-images' )
17
+ );
18
+ $i18n['preview'] = __( 'Preview', 'jquery-pin-it-button-for-images' );
19
+ $i18n['mode'] = __( 'Mode', 'jquery-pin-it-button-for-images' );
20
+ $i18n['settings'] = __( 'Settings', 'jquery-pin-it-button-for-images' );
21
+ $i18n['custom_button_desc'] = __( 'Click the button to choose an image from your WordPress media library. Height and width should fill automatically.', 'jquery-pin-it-button-for-images' );
22
+ $i18n['custom_button_no_image_to_preview'] = __( 'No image to preview', 'jquery-pin-it-button-for-images' );
23
+ $i18n['custom_button_upload'] = __( 'Upload an image using media library', 'jquery-pin-it-button-for-images' );
24
+ $i18n['custom_button_frame_title'] = __( 'Select your custom "Pin It" button', 'jquery-pin-it-button-for-images' );
25
+ $i18n['custom_button_frame_button_text'] = __( 'Use as "Pin It" button', 'jquery-pin-it-button-for-images' );
26
+
27
+ $i18n['attribution'] = sprintf( __( 'Available icons come from the following icon packs: %s and %s.', 'jquery-pin-it-button-for-images' ),
28
+ '<a href="http://fontawesome.io/" target="_blank">Font Awesome</a>',
29
+ '<a href="https://icomoon.io/icons-icomoon.html" target="_blank">Icomoon</a>'
30
+ );
31
+
32
+ return array_merge( $parent, $i18n );
33
+ }
34
+
35
+ function get_module_settings() {
36
+ return array(
37
+ 'slug' => 'visual',
38
+ 'name' => __( 'Visual', 'jquery-pin-it-button-for-images' ),
39
+ );
40
+ }
41
+
42
+ function get_settings_configuration() {
43
+
44
+ $option_value = $this->options->get();
45
+ $res = array();
46
+
47
+ $res['show_button'] = array(
48
+ 'key' => 'show_button',
49
+ 'label' => __( 'Show button', 'jquery-pin-it-button-for-images' ),
50
+ 'options' => array(
51
+ 'hover' => __( 'On hover', 'jquery-pin-it-button-for-images' ),
52
+ 'always_touch' => __( 'Always on touch devices', 'jquery-pin-it-button-for-images' ),
53
+ 'always' => __( 'Always', 'jquery-pin-it-button-for-images' )
54
+ ),
55
+ 'desc' => __( 'When the "Pin it" button should be visible.', 'jquery-pin-it-button-for-images' ),
56
+ 'type' => 'select'
57
+ );
58
+
59
+ $margin_args = array(
60
+ 'min' => '0',
61
+ 'step' => '1',
62
+ 'unit' => 'px',
63
+ 'type' => 'int'
64
+ );
65
+ $res['button_margin_bottom'] = array_merge( $margin_args,
66
+ array(
67
+ 'key' => 'button_margin_bottom',
68
+ 'label' => __( 'Bottom', 'jquery-pin-it-button-for-images' ),
69
+ 'error_label' => __( 'Button bottom margin', 'jquery-pin-it-button-for-images' )
70
+ ) );
71
+ $res['button_margin_top'] = array_merge( $margin_args,
72
+ array(
73
+ 'key' => 'button_margin_top',
74
+ 'label' => __( 'Top', 'jquery-pin-it-button-for-images' ),
75
+ 'error_label' => __( 'Button top margin', 'jquery-pin-it-button-for-images' )
76
+ ) );
77
+ $res['button_margin_left'] = array_merge( $margin_args,
78
+ array(
79
+ 'key' => 'button_margin_left',
80
+ 'label' => __( 'Left', 'jquery-pin-it-button-for-images' ),
81
+ 'error_label' => __( 'Button left margin', 'jquery-pin-it-button-for-images' )
82
+ ) );
83
+ $res['button_margin_right'] = array_merge( $margin_args,
84
+ array(
85
+ 'key' => 'button_margin_right',
86
+ 'label' => __( 'Right', 'jquery-pin-it-button-for-images' ),
87
+ 'error_label' => __( 'Button right margin', 'jquery-pin-it-button-for-images' )
88
+ ) );
89
+
90
+ $res['button_position'] = array(
91
+ 'key' => 'button_position',
92
+ 'label' => __( '"Pin it" button position', 'jquery-pin-it-button-for-images' ),
93
+ 'options' => array(
94
+ 'top-left' => __( 'Top left', 'jquery-pin-it-button-for-images' ),
95
+ 'top-right' => __( 'Top right', 'jquery-pin-it-button-for-images' ),
96
+ 'bottom-left' => __( 'Bottom left', 'jquery-pin-it-button-for-images' ),
97
+ 'bottom-right' => __( 'Bottom right', 'jquery-pin-it-button-for-images' ),
98
+ 'middle' => __( 'Middle', 'jquery-pin-it-button-for-images' )
99
+ ),
100
+ 'desc' => __( 'Where the "Pin it" button should appear on the image.', 'jquery-pin-it-button-for-images' ),
101
+ 'type' => 'select'
102
+ );
103
+
104
+ $res['description_option'] = array(
105
+ 'key' => 'description_option',
106
+ 'label' => __( 'Description source', 'jquery-pin-it-button-for-images' ),
107
+ 'options' => array(
108
+ "post_title" => __( 'Post title', 'jquery-pin-it-button-for-images' ),
109
+ "post_excerpt" => __( 'Post description (excerpt)', 'jquery-pin-it-button-for-images' ),
110
+ "img_title" => __( 'Image title attribute', 'jquery-pin-it-button-for-images' ),
111
+ "site_title" => __( 'Site title (Settings->General)', 'jquery-pin-it-button-for-images' ),
112
+ "img_description" => __( 'Image description', 'jquery-pin-it-button-for-images' ),
113
+ "img_caption" => __( 'Image caption', 'jquery-pin-it-button-for-images' ),
114
+ "img_alt" => __( 'Image alt attribute', 'jquery-pin-it-button-for-images' )
115
+ ),
116
+ 'desc' => __( 'From where the Pinterest message should be taken. Check which sources should be considered and prioritize them by dragging and dropping. The description will come from the top source that has data. Please note that "Image description" and "Image caption" work properly only for images that were added to your Media Library.', 'jquery-pin-it-button-for-images' ),
117
+ 'type' => 'multiselect'
118
+ );
119
+
120
+ $res['pinLinkedImages'] = array(
121
+ 'key' => 'pinLinkedImages',
122
+ 'label' => __( 'Pin linked images', 'jquery-pin-it-button-for-images' ),
123
+ 'text' => __( 'Active', 'jquery-pin-it-button-for-images' ),
124
+ 'desc' => __( 'When checked, pins full-sized images instead of thumbnails (works only if you link thumbnails to their full versions).', 'jquery-pin-it-button-for-images' ),
125
+ 'type' => 'boolean',
126
+ );
127
+
128
+ $res['transparency_value'] = array(
129
+ 'key' => 'transparency_value',
130
+ 'label' => __( 'Transparency', 'jquery-pin-it-button-for-images' ),
131
+ 'desc' => sprintf( __( 'Choose transparency (between %.02f and %.02f)', 'jquery-pin-it-button-for-images' ), '0.00', '1.00' ),
132
+ 'min' => '0',
133
+ 'max' => '1',
134
+ 'step' => '0.01',
135
+ 'type' => 'float'
136
+ );
137
+
138
+ $res['pin_image'] = array(
139
+ 'key' => 'pin_image',
140
+ 'label' => __( 'Pin image', 'jquery-pin-it-button-for-images' ),
141
+ 'options' => array(
142
+ 'old_default' => __( 'Old default', 'jquery-pin-it-button-for-images' ),
143
+ 'default' => __( 'Default', 'jquery-pin-it-button-for-images' ),
144
+ 'custom' => __( 'Custom', 'jquery-pin-it-button-for-images' )
145
+ ),
146
+ 'type' => 'select'
147
+ );
148
+
149
+ $res['pin_image_button'] = array(
150
+ 'key' => 'pin_image_button',
151
+ 'label' => __( 'Button', 'jquery-pin-it-button-for-images' ),
152
+ 'options' => array(
153
+ 'square' => __( 'Square', 'jquery-pin-it-button-for-images' ),
154
+ 'rounded-square' => __( 'Rounded square', 'jquery-pin-it-button-for-images' ),
155
+ 'round' => __( 'Round', 'jquery-pin-it-button-for-images' ),
156
+ 'rectangle' => __( 'Rectangle', 'jquery-pin-it-button-for-images' ),
157
+ 'rounded-rectangle' => __( 'Rounded rectangle', 'jquery-pin-it-button-for-images' )
158
+ ),
159
+ 'type' => 'select'
160
+ );
161
+
162
+ $res['pin_image_icon'] = array(
163
+ 'key' => 'pin_image_icon',
164
+ 'label' => __( 'Icon', 'jquery-pin-it-button-for-images' ),
165
+ 'options' => array(
166
+ 'circle' => __( 'Circle', 'jquery-pin-it-button-for-images' ),
167
+ 'plain' => __( 'Plain', 'jquery-pin-it-button-for-images' ),
168
+ 'thumb-tack' => __( 'Thumbtack', 'jquery-pin-it-button-for-images' ),
169
+ 'pushpin' => __( 'Thumbtack #2', 'jquery-pin-it-button-for-images' ),
170
+ 'pinterest2' => __( 'Classic', 'jquery-pin-it-button-for-images' ),
171
+ ),
172
+ 'type' => 'select'
173
+ );
174
+
175
+ $res['pin_image_size'] = array(
176
+ 'key' => 'pin_image_size',
177
+ 'label' => __( 'Size', 'jquery-pin-it-button-for-images' ),
178
+ 'options' => array(
179
+ 'small' => __( 'Small', 'jquery-pin-it-button-for-images' ),
180
+ 'normal' => __( 'Normal', 'jquery-pin-it-button-for-images' ),
181
+ 'large' => __( 'Large', 'jquery-pin-it-button-for-images' ),
182
+ ),
183
+ 'type' => 'select'
184
+ );
185
+
186
+ $res['custom_image_url'] = array(
187
+ 'key' => 'custom_image_url',
188
+ 'label' => __( 'URL address of the image', 'jquery-pin-it-button-for-images' ),
189
+ 'type' => 'string'
190
+ );
191
+
192
+ $image_size = array( 'min' => '0', 'step' => '1', 'unit' => 'px', 'type' => 'int' );
193
+ $res['custom_image_height'] = array_merge( $image_size, array(
194
+ 'key' => 'custom_image_height',
195
+ 'label' => __( 'Height', 'jquery-pin-it-button-for-images' ),
196
+ 'error_label' => __( 'Custom image height', 'jquery-pin-it-button-for-images' )
197
+ ) );
198
+ $res['custom_image_width'] = array_merge( $image_size, array(
199
+ 'key' => 'custom_image_width',
200
+ 'label' => __( 'Width', 'jquery-pin-it-button-for-images' ),
201
+ 'error_label' => __( 'Custom image width', 'jquery-pin-it-button-for-images' )
202
+ ) );
203
+
204
+ foreach ( $res as $key => $setting ) {
205
+ $res[ $key ]['value'] = $option_value[ $key ];
206
+ }
207
+
208
+ return $res;
209
+ }
210
+
211
+ public function visual_options_callback() {
212
+ echo '<p>' . __( 'How it should look like', 'jquery-pin-it-button-for-images' ) . '</p>';
213
+ }
214
+
215
+ public function sanitize_visual_options( $input ) {
216
+
217
+ $this->sanitize_input( $input );
218
+ $output = $this->options->get();
219
+
220
+ $validator = new JPIBFI_Settings_Validator( $input, $output );
221
+
222
+ foreach ( $input as $key => $value ) {
223
+
224
+ switch ( $key ) {
225
+ case 'custom_image_height':
226
+ case 'custom_image_width':
227
+ $name = "";
228
+ if ( 'custom_image_height' == $key ) {
229
+ $name = __( 'Custom image height', 'jquery-pin-it-button-for-images' );
230
+ } else if ( 'custom_image_width' == $key ) {
231
+ $name = __( 'Custom image width', 'jquery-pin-it-button-for-images' );
232
+ }
233
+ $error_message = $name . ' - ' . sprintf( __( 'value must be empty or a number greater or equal to %d.', 'jquery-pin-it-button-for-images' ), '0' );
234
+ $validator->validate_number( $key, $error_message, array( 'min' => 0, 'required' => false ) );
235
+ break;
236
+ case 'transparency_value':
237
+ $error_message = sprintf( __( 'Transparency value must be a number between %.02d and %.02f.', 'jquery-pin-it-button-for-images' ), '0.00', '1.00' );
238
+ $validator->validate_number( $key, $error_message, array( 'min' => 0.0, 'max' => 1.0 ) );
239
+ break;
240
+ default:
241
+ $output[ $key ] = $value;
242
+ break;
243
+ }
244
+ }
245
+
246
+ return $this->options->sanitize( $output );
247
+ }
248
+ }
includes/includes/{class-jpibfi-edd-sl-plugin-updater.php → jpibfi-edd-sl-plugin-updater.php} RENAMED
@@ -1,16 +1,13 @@
1
  <?php
2
 
3
- // uncomment this line for testing
4
- //set_site_transient( 'update_plugins', null );
5
-
6
  // Exit if accessed directly
7
  if ( ! defined( 'ABSPATH' ) ) exit;
8
 
9
  /**
10
  * Allows plugins to use their own update API.
11
  *
12
- * @author Pippin Williamson
13
- * @version 1.6.5
14
  */
15
  class JPIBFI_EDD_SL_Plugin_Updater {
16
 
@@ -20,6 +17,7 @@ class JPIBFI_EDD_SL_Plugin_Updater {
20
  private $slug = '';
21
  private $version = '';
22
  private $wp_override = false;
 
23
 
24
  /**
25
  * Class constructor.
@@ -42,6 +40,8 @@ class JPIBFI_EDD_SL_Plugin_Updater {
42
  $this->version = $_api_data['version'];
43
  $this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
44
 
 
 
45
  $edd_plugin_data[ $this->slug ] = $this->api_data;
46
 
47
  // Set up hooks.
@@ -60,7 +60,7 @@ class JPIBFI_EDD_SL_Plugin_Updater {
60
 
61
  add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
62
  add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
63
- remove_action( 'after_plugin_row_' . $this->name, 'wp_plugin_update_row', 10, 2 );
64
  add_action( 'after_plugin_row_' . $this->name, array( $this, 'show_update_notification' ), 10, 2 );
65
  add_action( 'admin_init', array( $this, 'show_changelog' ) );
66
 
@@ -95,7 +95,14 @@ class JPIBFI_EDD_SL_Plugin_Updater {
95
  return $_transient_data;
96
  }
97
 
98
- $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug ) );
 
 
 
 
 
 
 
99
 
100
  if ( false !== $version_info && is_object( $version_info ) && isset( $version_info->new_version ) ) {
101
 
@@ -109,6 +116,7 @@ class JPIBFI_EDD_SL_Plugin_Updater {
109
  $_transient_data->checked[ $this->name ] = $this->version;
110
 
111
  }
 
112
  return $_transient_data;
113
  }
114
 
@@ -145,21 +153,19 @@ class JPIBFI_EDD_SL_Plugin_Updater {
145
 
146
  if ( empty( $update_cache->response ) || empty( $update_cache->response[ $this->name ] ) ) {
147
 
148
- $cache_key = md5( 'edd_plugin_' . sanitize_key( $this->name ) . '_version_info' );
149
- $version_info = get_transient( $cache_key );
150
-
151
- if( false === $version_info ) {
152
 
153
- $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug ) );
 
154
 
155
- set_transient( $cache_key, $version_info, 3600 );
156
  }
157
 
158
- if( ! is_object( $version_info ) ) {
159
  return;
160
  }
161
 
162
- if( version_compare( $this->version, $version_info->new_version, '<' ) ) {
163
 
164
  $update_cache->response[ $this->name ] = $version_info;
165
 
@@ -228,7 +234,6 @@ class JPIBFI_EDD_SL_Plugin_Updater {
228
  */
229
  public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
230
 
231
-
232
  if ( $_action != 'plugin_information' ) {
233
 
234
  return $_data;
@@ -245,28 +250,30 @@ class JPIBFI_EDD_SL_Plugin_Updater {
245
  'slug' => $this->slug,
246
  'is_ssl' => is_ssl(),
247
  'fields' => array(
248
- 'banners' => false, // These will be supported soon hopefully
249
  'reviews' => false
250
  )
251
  );
252
 
253
- $cache_key = 'edd_api_request_' . substr( md5( serialize( $this->slug ) ), 0, 15 );
254
 
255
- //Get the transient where we store the api request for this plugin for 24 hours
256
- $edd_api_request_transient = get_site_transient( $cache_key );
257
 
258
  //If we have no transient-saved value, run the API, set a fresh transient with the API value, and return that value too right now.
259
  if ( empty( $edd_api_request_transient ) ){
260
 
261
  $api_response = $this->api_request( 'plugin_information', $to_send );
262
 
263
- //Expires in 1 day
264
- set_site_transient( $cache_key, $api_response, DAY_IN_SECONDS );
265
 
266
  if ( false !== $api_response ) {
267
  $_data = $api_response;
268
  }
269
 
 
 
270
  }
271
 
272
  return $_data;
@@ -319,7 +326,8 @@ class JPIBFI_EDD_SL_Plugin_Updater {
319
  'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
320
  'slug' => $data['slug'],
321
  'author' => $data['author'],
322
- 'url' => home_url()
 
323
  );
324
 
325
  $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
@@ -334,6 +342,10 @@ class JPIBFI_EDD_SL_Plugin_Updater {
334
  $request = false;
335
  }
336
 
 
 
 
 
337
  return $request;
338
  }
339
 
@@ -359,7 +371,7 @@ class JPIBFI_EDD_SL_Plugin_Updater {
359
 
360
  $data = $edd_plugin_data[ $_REQUEST['slug'] ];
361
  $cache_key = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_version_info' );
362
- $version_info = get_transient( $cache_key );
363
 
364
  if( false === $version_info ) {
365
 
@@ -369,7 +381,8 @@ class JPIBFI_EDD_SL_Plugin_Updater {
369
  'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
370
  'slug' => $_REQUEST['slug'],
371
  'author' => $data['author'],
372
- 'url' => home_url()
 
373
  );
374
 
375
  $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
@@ -384,7 +397,7 @@ class JPIBFI_EDD_SL_Plugin_Updater {
384
  $version_info = false;
385
  }
386
 
387
- set_transient( $cache_key, $version_info, 3600 );
388
 
389
  }
390
 
@@ -395,4 +408,35 @@ class JPIBFI_EDD_SL_Plugin_Updater {
395
  exit;
396
  }
397
 
398
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
 
 
 
 
3
  // Exit if accessed directly
4
  if ( ! defined( 'ABSPATH' ) ) exit;
5
 
6
  /**
7
  * Allows plugins to use their own update API.
8
  *
9
+ * @author Easy Digital Downloads
10
+ * @version 1.6.8
11
  */
12
  class JPIBFI_EDD_SL_Plugin_Updater {
13
 
17
  private $slug = '';
18
  private $version = '';
19
  private $wp_override = false;
20
+ private $cache_key = '';
21
 
22
  /**
23
  * Class constructor.
40
  $this->version = $_api_data['version'];
41
  $this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
42
 
43
+ $this->cache_key = md5( serialize( $this->slug . $this->api_data['license'] ) );
44
+
45
  $edd_plugin_data[ $this->slug ] = $this->api_data;
46
 
47
  // Set up hooks.
60
 
61
  add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
62
  add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
63
+ remove_action( 'after_plugin_row_' . $this->name, 'wp_plugin_update_row', 10 );
64
  add_action( 'after_plugin_row_' . $this->name, array( $this, 'show_update_notification' ), 10, 2 );
65
  add_action( 'admin_init', array( $this, 'show_changelog' ) );
66
 
95
  return $_transient_data;
96
  }
97
 
98
+ $version_info = $this->get_cached_version_info();
99
+
100
+ if ( false === $version_info ) {
101
+ $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => ! empty( $this->api_data['beta'] ) ) );
102
+
103
+ $this->set_version_info_cache( $version_info );
104
+
105
+ }
106
 
107
  if ( false !== $version_info && is_object( $version_info ) && isset( $version_info->new_version ) ) {
108
 
116
  $_transient_data->checked[ $this->name ] = $this->version;
117
 
118
  }
119
+
120
  return $_transient_data;
121
  }
122
 
153
 
154
  if ( empty( $update_cache->response ) || empty( $update_cache->response[ $this->name ] ) ) {
155
 
156
+ $version_info = $this->get_cached_version_info();
 
 
 
157
 
158
+ if ( false === $version_info ) {
159
+ $version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => ! empty( $this->api_data['beta'] ) ) );
160
 
161
+ $this->set_version_info_cache( $version_info );
162
  }
163
 
164
+ if ( ! is_object( $version_info ) ) {
165
  return;
166
  }
167
 
168
+ if ( version_compare( $this->version, $version_info->new_version, '<' ) ) {
169
 
170
  $update_cache->response[ $this->name ] = $version_info;
171
 
234
  */
235
  public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
236
 
 
237
  if ( $_action != 'plugin_information' ) {
238
 
239
  return $_data;
250
  'slug' => $this->slug,
251
  'is_ssl' => is_ssl(),
252
  'fields' => array(
253
+ 'banners' => array(),
254
  'reviews' => false
255
  )
256
  );
257
 
258
+ $cache_key = 'edd_api_request_' . md5( serialize( $this->slug . $this->api_data['license'] ) );
259
 
260
+ // Get the transient where we store the api request for this plugin for 24 hours
261
+ $edd_api_request_transient = $this->get_cached_version_info( $cache_key );
262
 
263
  //If we have no transient-saved value, run the API, set a fresh transient with the API value, and return that value too right now.
264
  if ( empty( $edd_api_request_transient ) ){
265
 
266
  $api_response = $this->api_request( 'plugin_information', $to_send );
267
 
268
+ // Expires in 3 hours
269
+ $this->set_version_info_cache( $api_response, $cache_key );
270
 
271
  if ( false !== $api_response ) {
272
  $_data = $api_response;
273
  }
274
 
275
+ } else {
276
+ $_data = $edd_api_request_transient;
277
  }
278
 
279
  return $_data;
326
  'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
327
  'slug' => $data['slug'],
328
  'author' => $data['author'],
329
+ 'url' => home_url(),
330
+ 'beta' => ! empty( $data['beta'] ),
331
  );
332
 
333
  $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
342
  $request = false;
343
  }
344
 
345
+ if ( $request && isset( $request->banners ) ) {
346
+ $request->banners = maybe_unserialize( $request->banners );
347
+ }
348
+
349
  return $request;
350
  }
351
 
371
 
372
  $data = $edd_plugin_data[ $_REQUEST['slug'] ];
373
  $cache_key = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_version_info' );
374
+ $version_info = $this->get_cached_version_info( $cache_key );
375
 
376
  if( false === $version_info ) {
377
 
381
  'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
382
  'slug' => $_REQUEST['slug'],
383
  'author' => $data['author'],
384
+ 'url' => home_url(),
385
+ 'beta' => ! empty( $data['beta'] )
386
  );
387
 
388
  $request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
397
  $version_info = false;
398
  }
399
 
400
+ $this->set_version_info_cache( $version_info, $cache_key );
401
 
402
  }
403
 
408
  exit;
409
  }
410
 
411
+ public function get_cached_version_info( $cache_key = '' ) {
412
+
413
+ if( empty( $cache_key ) ) {
414
+ $cache_key = $this->cache_key;
415
+ }
416
+
417
+ $cache = get_option( $cache_key );
418
+
419
+ if( empty( $cache['timeout'] ) || current_time( 'timestamp' ) > $cache['timeout'] ) {
420
+ return false; // Cache is expired
421
+ }
422
+
423
+ return json_decode( $cache['value'] );
424
+
425
+ }
426
+
427
+ public function set_version_info_cache( $value = '', $cache_key = '' ) {
428
+
429
+ if( empty( $cache_key ) ) {
430
+ $cache_key = $this->cache_key;
431
+ }
432
+
433
+ $data = array(
434
+ 'timeout' => strtotime( '+3 hours', current_time( 'timestamp' ) ),
435
+ 'value' => json_encode( $value )
436
+ );
437
+
438
+ update_option( $cache_key, $data );
439
+
440
+ }
441
+
442
+ }
includes/includes/{class-jpibfi-includes.php → jpibfi-includes.php} RENAMED
@@ -14,10 +14,11 @@ class JPIBFI_Includes {
14
  function load_dependencies(){
15
 
16
  $deps = array(
17
- 'options/class-jpibfi-options.php',
18
- 'options/class-jpibfi-selection-options.php',
19
- 'options/class-jpibfi-visual-options.php',
20
- 'class-jpibfi-option-converter.php',
 
21
  );
22
 
23
  foreach ($deps as $dep)
14
  function load_dependencies(){
15
 
16
  $deps = array(
17
+ 'options/jpibfi-options.php',
18
+ 'options/jpibfi-selection-options.php',
19
+ 'options/jpibfi-visual-options.php',
20
+ 'options/jpibfi-advanced-options.php',
21
+ 'jpibfi-option-converter.php',
22
  );
23
 
24
  foreach ($deps as $dep)
includes/includes/{class-jpibfi-option-converter.php → jpibfi-option-converter.php} RENAMED
@@ -38,18 +38,17 @@ class JPIBFI_Option_Converter {
38
  public function save_and_convert_if_needed($imported_options) {
39
  if ( !is_array( $imported_options ) )
40
  return;
41
- if ( $imported_options[ $this->converted_option_name ] == $this->converted_option_value )
42
- return;
43
-
44
  $selection_options = $imported_options[ 'jpibfi_selection_options' ];
45
  if ( $selection_options ) {
46
- $selection_options = $this->convert_selection_options( $selection_options );
47
  $this->selection_options->update( $selection_options );
48
  }
49
 
50
  $visual_options = $imported_options[ 'jpibfi_visual_options' ];
51
  if ( $visual_options ) {
52
- $visual_options = $this->convert_visual_options( $visual_options );
53
  $this->visual_options->update( $visual_options );
54
  }
55
 
38
  public function save_and_convert_if_needed($imported_options) {
39
  if ( !is_array( $imported_options ) )
40
  return;
41
+ $convert = $imported_options[ $this->converted_option_name ] != $this->converted_option_value;
42
+
 
43
  $selection_options = $imported_options[ 'jpibfi_selection_options' ];
44
  if ( $selection_options ) {
45
+ $selection_options = $convert ? $this->convert_selection_options( $selection_options ) : $selection_options;
46
  $this->selection_options->update( $selection_options );
47
  }
48
 
49
  $visual_options = $imported_options[ 'jpibfi_visual_options' ];
50
  if ( $visual_options ) {
51
+ $visual_options = $convert ? $this->convert_visual_options( $visual_options ) : $visual_options;
52
  $this->visual_options->update( $visual_options );
53
  }
54
 
includes/includes/{class-jpibfi-updater.php → jpibfi-updater.php} RENAMED
File without changes
includes/includes/options/class-jpibfi-license-options.php DELETED
@@ -1,3 +0,0 @@
1
- <?php
2
- if ( ! defined( 'ABSPATH' ) ) exit;
3
-
 
 
 
includes/includes/options/index.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php //Silence is golden
includes/includes/options/jpibfi-advanced-options.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class JPIBFI_Advanced_Options extends JPIBFI_Options {
4
+
5
+ function get_default_options() {
6
+ $defaults = array(
7
+ 'filter_the_content_on' => true,
8
+ 'filter_the_content_priority' => 10,
9
+ 'filter_the_excerpt_on' => true,
10
+ 'filter_the_excerpt_priority' => 10,
11
+ 'filter_post_thumbnail_html_on' => true,
12
+ 'filter_post_thumbnail_html_priority' => 10,
13
+ );
14
+
15
+ return $defaults;
16
+ }
17
+
18
+ function get_option_name() {
19
+ return 'jpibfi_advanced_options';
20
+ }
21
+ }
includes/{admin/settings/class-jpibfi-license-settings.php → includes/options/jpibfi-license-options.php} RENAMED
File without changes
includes/includes/options/{class-jpibfi-options.php → jpibfi-options.php} RENAMED
@@ -2,9 +2,9 @@
2
 
3
  abstract class JPIBFI_Options {
4
 
5
- abstract protected function get_option_name();
6
 
7
- abstract protected function get_default_options();
8
 
9
  function sanitize($input) {
10
  return $input;
2
 
3
  abstract class JPIBFI_Options {
4
 
5
+ abstract function get_option_name();
6
 
7
+ abstract function get_default_options();
8
 
9
  function sanitize($input) {
10
  return $input;
includes/includes/options/{class-jpibfi-selection-options.php → jpibfi-selection-options.php} RENAMED
File without changes
includes/includes/options/{class-jpibfi-visual-options.php → jpibfi-visual-options.php} RENAMED
File without changes
includes/{class-jpibfi.php → jpibfi.php} RENAMED
@@ -14,16 +14,17 @@ class JPIBFI {
14
  $this->load_textdomain();
15
 
16
  register_activation_hook( $file, array( $this, 'update_plugin' ) );
 
17
  add_action( 'plugins_loaded', array( $this, 'update_plugin' ) );
18
  }
19
 
20
  function load_dependencies(){
21
 
22
- require_once 'includes/class-jpibfi-includes.php';
23
  new JPIBFI_Includes($this->file, $this->version);
24
 
25
  if (is_admin()){
26
- require_once 'admin/class-jpibfi-admin.php';
27
  new JPIBFI_Admin($this->file, $this->version);
28
  } else {
29
  require_once 'public/class-jpibfi-client.php';
@@ -48,4 +49,8 @@ class JPIBFI {
48
  $converter = new JPIBFI_Option_Converter();
49
  $converter->convert_if_needed();
50
  }
 
 
 
 
51
  }
14
  $this->load_textdomain();
15
 
16
  register_activation_hook( $file, array( $this, 'update_plugin' ) );
17
+ register_activation_hook( $file, array( $this, 'setup_nag' ) );
18
  add_action( 'plugins_loaded', array( $this, 'update_plugin' ) );
19
  }
20
 
21
  function load_dependencies(){
22
 
23
+ require_once 'includes/jpibfi-includes.php';
24
  new JPIBFI_Includes($this->file, $this->version);
25
 
26
  if (is_admin()){
27
+ require_once 'admin/jpibfi-admin.php';
28
  new JPIBFI_Admin($this->file, $this->version);
29
  } else {
30
  require_once 'public/class-jpibfi-client.php';
49
  $converter = new JPIBFI_Option_Converter();
50
  $converter->convert_if_needed();
51
  }
52
+
53
+ public function setup_nag(){
54
+
55
+ }
56
  }
includes/public/class-jpibfi-client.php CHANGED
@@ -4,6 +4,10 @@ class JPIBFI_Client {
4
 
5
  private $selection_options;
6
  private $visual_options;
 
 
 
 
7
  private $version;
8
  private $plugin_dir_url;
9
 
@@ -12,14 +16,29 @@ class JPIBFI_Client {
12
  $this->plugin_dir_url = plugin_dir_url($file);
13
  $this->selection_options = new JPIBFI_Selection_Options();
14
  $this->visual_options = new JPIBFI_Visual_Options();
 
15
 
16
  add_action( 'wp_enqueue_scripts', array( $this, 'add_plugin_scripts' ) );
17
  add_action( 'wp_head', array( $this, 'print_header_style' ) );
18
- add_filter( 'post_thumbnail_html', array ( $this, 'the_content' ), 10 );
19
- add_filter( "the_excerpt", array( $this, 'the_content' ), 10 );
20
- add_filter( "the_content", array( $this, 'the_content' ), 10 );
21
  }
22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  public function add_plugin_scripts() {
24
  if ( !$this->add_jpibfi() )
25
  return;
@@ -256,6 +275,7 @@ class JPIBFI_Client {
256
  case '[archive]': return is_archive();
257
  case '[search]': return is_search();
258
  case '[category]': return is_category();
 
259
  case '[home]': return is_home();
260
  default:
261
  return false;
4
 
5
  private $selection_options;
6
  private $visual_options;
7
+ /**
8
+ * @var JPIBFI_Advanced_Options
9
+ */
10
+ private $advanced_options;
11
  private $version;
12
  private $plugin_dir_url;
13
 
16
  $this->plugin_dir_url = plugin_dir_url($file);
17
  $this->selection_options = new JPIBFI_Selection_Options();
18
  $this->visual_options = new JPIBFI_Visual_Options();
19
+ $this->advanced_options = new JPIBFI_Advanced_Options();
20
 
21
  add_action( 'wp_enqueue_scripts', array( $this, 'add_plugin_scripts' ) );
22
  add_action( 'wp_head', array( $this, 'print_header_style' ) );
23
+ $this->add_conditional_filters();
 
 
24
  }
25
 
26
+ private function add_conditional_filters() {
27
+ $advanced_value = $this->advanced_options->get();
28
+
29
+ $filters = array(
30
+ 'post_thumbnail_html',
31
+ 'the_excerpt',
32
+ 'the_content'
33
+ );
34
+
35
+ foreach ( $filters as $filter ) {
36
+ if ( $advanced_value[ 'filter_' . $filter . '_on' ] ){
37
+ add_filter( $filter, array ( $this, 'the_content' ), $advanced_value[ 'filter_' . $filter . '_priority' ] );
38
+ }
39
+ }
40
+ }
41
+
42
  public function add_plugin_scripts() {
43
  if ( !$this->add_jpibfi() )
44
  return;
275
  case '[archive]': return is_archive();
276
  case '[search]': return is_search();
277
  case '[category]': return is_category();
278
+ case '[tag]': return is_tag();
279
  case '[home]': return is_home();
280
  default:
281
  return false;
jquery-pin-it-button-for-images.php CHANGED
@@ -1,40 +1,40 @@
1
  <?php
2
  /*
3
- Plugin Name: jQuery Pin It Button For Images
4
- Plugin URI: https://highfiveplugins.com/jpibfi/jquery-pin-it-button-for-images-documentation/
5
  Description: Highlights images on hover and adds a "Pin It" button over them for easy pinning.
6
  Text Domain: jquery-pin-it-button-for-images
7
  Domain Path: /languages
8
  Author: Marcin Skrzypiec
9
- Version:2.1.2
10
- Author URI: https://highfiveplugins.com/
11
  */
12
 
13
- if ( !defined( 'WPINC' ) )
14
  die;
15
 
16
- if ( !class_exists( 'jQuery_Pin_It_Button_For_Images' ) ) {
17
 
18
  final class jQuery_Pin_It_Button_For_Images {
19
 
20
  function __construct() {
21
- $version = '2.1.2';
22
- require_once plugin_dir_path(__FILE__) . 'includes/class-jpibfi.php';
23
  new JPIBFI(__FILE__, $version);
24
  }
25
  }
26
 
27
- $JPIBFI = new jQuery_Pin_It_Button_For_Images();
28
 
29
- } else {
30
- function jpibfi_duplicate_error() {
31
- ?>
32
- <div class="notice notice-error">
33
- <p><strong>
34
- <?php _e('You have two versions of jQuery Pin It Button for Images installed. Please deactivate and remove one of them.', 'jquery-pin-it-button-for-images'); ?>
35
- </strong></p>
36
- </div>
37
- <?php
38
- }
39
- add_action( 'admin_notices', 'jpibfi_duplicate_error' );
40
- }
1
  <?php
2
  /*
3
+ Plugin Name: jQuery Pin It Button for Images
4
+ Plugin URI: https://highfiveplugins.com/jpibfi/jquery-pin-it-button-for-images-documentation/
5
  Description: Highlights images on hover and adds a "Pin It" button over them for easy pinning.
6
  Text Domain: jquery-pin-it-button-for-images
7
  Domain Path: /languages
8
  Author: Marcin Skrzypiec
9
+ Version:2.1.3
10
+ Author URI: https://highfiveplugins.com/
11
  */
12
 
13
+ if ( !defined( 'WPINC' ) )
14
  die;
15
 
16
+ if ( !class_exists( 'jQuery_Pin_It_Button_For_Images' ) ) {
17
 
18
  final class jQuery_Pin_It_Button_For_Images {
19
 
20
  function __construct() {
21
+ $version = '2.1.3';
22
+ require_once plugin_dir_path(__FILE__) . 'includes/jpibfi.php';
23
  new JPIBFI(__FILE__, $version);
24
  }
25
  }
26
 
27
+ $JPIBFI = new jQuery_Pin_It_Button_For_Images();
28
 
29
+ } else {
30
+ function jpibfi_duplicate_error() {
31
+ ?>
32
+ <div class="notice notice-error">
33
+ <p><strong>
34
+ <?php _e('You have two versions of jQuery Pin It Button for Images installed. Please deactivate and remove one of them.', 'jquery-pin-it-button-for-images'); ?>
35
+ </strong></p>
36
+ </div>
37
+ <?php
38
+ }
39
+ add_action( 'admin_notices', 'jpibfi_duplicate_error' );
40
+ }
js/jpibfi.admin.js CHANGED
@@ -1,9 +1,9 @@
1
- !function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return i(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./app.controller"),o=r(i),a={bindings:{settingsName:"@"},controller:o["default"],template:'<navbar id="settings-navbar"\n tabs="$ctrl.config.tabs"\n page="$ctrl.config.page"\n current-tab="$ctrl.config.currentTab">\n </navbar>\n <status i18n="$ctrl.config.i18n.status"></status>\n <select-editor\n ng-if="$ctrl.config.currentTab == \'select\'"\n settings="$ctrl.config.settings"\n i18n="$ctrl.config.i18n.editor">\n </select-editor>\n <visual-editor\n ng-if="$ctrl.config.currentTab == \'visual\'"\n settings="$ctrl.config.settings"\n i18n="$ctrl.config.i18n.editor">\n </visual-editor>\n <import-editor\n ng-if="$ctrl.config.currentTab == \'import\'"\n settings="$ctrl.config.settings"\n i18n="$ctrl.config.i18n.editor">\n </import-editor>\n '};n["default"]=a},{"./app.controller":2}],2:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t,n){r(this,e),this.httpService=t,this.linkService=n,this.config={},this.settingsValue={}}return i(e,[{key:"$onInit",value:function(){this.config=window[this.settingsName],this.httpService.init(this.config.ajax),this.linkService.init(this.config.page)}}]),e}();o.$inject=["httpService","linkService"],n["default"]=o},{}],3:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("angular-sanitize"),s=r(a),u=e("ng-file-upload"),l=r(u),c=e("angular-drag-and-drop-lists"),f=(r(c),e("./app.component")),d=r(f),p=e("./components/components"),h=r(p),g=e("./common/components"),v=r(g),$=e("./services"),m=r($),b=o["default"].module("app",[s["default"],l["default"],h["default"],v["default"],m["default"]]).component("app",d["default"]).name;n["default"]=b},{"./app.component":1,"./common/components":5,"./components/components":15,"./services":35,angular:42,"angular-drag-and-drop-lists":38,"angular-sanitize":40,"ng-file-upload":44}],4:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(t){r(this,e),this.httpService=t}return o(e,[{key:"$onChanges",value:function(e){var t=this;e.settings&&(this.settings=i({},this.settings),this.values=Object.keys(this.settings).reduce(function(e,n){return e[n]=t.settings[n].value,e},{}))}},{key:"update",value:function(e){var t=e.key,n=e.value;this.values[t]=n}},{key:"updateValue",value:function(e,t){this.settings[e]=i({},this.settings[e],{value:t}),this.values[e]=t}},{key:"save",value:function(){var e=this;this.httpService.saveSettings(this.values).then(function(t){var n=t.status,r=t.model;"OK"===n.status&&(e.values=r,Object.keys(e.values).forEach(function(t){e.settings[t]=i({},e.settings[t],{value:e.values[t]})}))})}}]),e}();a.$inject=["httpService"],n["default"]=a},{}],5:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./select"),s=r(a),u=e("./visual"),l=r(u),c=e("./import"),f=r(c),d=o["default"].module("app.common",[s["default"],l["default"],f["default"]]).name;n["default"]=d},{"./import":8,"./select":9,"./visual":12,angular:42}],6:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./import.controller"),o=r(i),a={bindings:{i18n:"<"},controller:o["default"],template:'\n <h2>{{ ::$ctrl.i18n.title }}</h2>\n <table class="form-table">\n <tbody>\n <tr>\n <th><label>{{ ::$ctrl.i18n.export_title }}</label></th>\n <td>\n <a href="{{ ::$ctrl.i18n.export_url }}" class="button button-default">\n {{ ::$ctrl.i18n.export_button_text }}\n </a>\n </td>\n </tr>\n <tr>\n <th><label>{{ ::$ctrl.i18n.import_title }}</label></th>\n <td>\n <button class="button button-primary" type="file"\n ngf-accept="\'.json\'"\n ngf-select="$ctrl.uploadFiles($file, $invalidFiles)" ngf-max-size="1MB">\n {{ ::$ctrl.i18n.import_button_text }}\n </button>\n <div ng-if="$ctrl.upload_status === \'OK\' || $ctrl.upload_status === \'ERROR\'" class="notice"\n ng-class="{ \'error\': $ctrl.upload_status === \'ERROR\', \'updated\': $ctrl.upload_status === \'OK\' }">\n <p><strong ng-bind-html="$ctrl.upload_message"></strong></p>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n '};n["default"]=a},{"./import.controller":7}],7:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t,n,i){r(this,e),this.$timeout=t,this.httpService=i,this.Upload=n,this.upload_status="",this.upload_message=""}return i(e,[{key:"uploadFiles",value:function(e,t){this.f=e,this.errFile=t&&t[0],e&&this.httpService.uploadFile(this.i18n.import_action_name,e)}}]),e}();o.$inject=["$timeout","Upload","httpService"],n["default"]=o},{}],8:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./import.component"),s=r(a),u=o["default"].module("app.common.import",[]).component("importEditor",s["default"]).name;n["default"]=u},{"./import.component":6,angular:42}],9:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./resolution.directive"),s=r(a),u=e("./select.component"),l=r(u),c=e("./../../components/components"),f=r(c),d=o["default"].module("app.common.select",[f["default"]]).directive("resolution",["$compile",function(e){return new s["default"](e)}]).component("selectEditor",l["default"]).name;n["default"]=d},{"./../../components/components":15,"./resolution.directive":10,"./select.component":11,angular:42}],10:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t){r(this,e),this.$compile=t,this.restrict="E",this.scope={height:"=",width:"=",template:"=",update:"&"}}return i(e,[{key:"link",value:function(e,t,n){var r=e.template,i=r.replace("%height%",'<editor-number args="height" on-update="update({ $event })"></editor-number>').replace("%width%",'<editor-number args="width" on-update="update({ $event })"></editor-number>');t.html(i),this.$compile(t.contents())(e)}}]),e}();n["default"]=o},{}],11:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./../base.controller"),o=r(i),a={bindings:{settings:"<",i18n:"<"},controller:o["default"],template:'\n <h2>{{ $ctrl.i18n.title }}</h2>\n <table class="form-table">\n <tbody>\n <tr>\n <th><label for="image_selector">{{ ::$ctrl.settings.image_selector.label }}</label></th>\n <td>\n <editor-text args="$ctrl.settings.image_selector" on-update="$ctrl.update($event)"></editor-text>\n <p class="description" ng-bind-html="$ctrl.settings.image_selector.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label for="disabled_classes">{{ ::$ctrl.settings.disabled_classes.label }}</label></th>\n <td>\n <editor-text args="$ctrl.settings.disabled_classes" on-update="$ctrl.update($event)"></editor-text>\n <p class="description" ng-bind-html="$ctrl.settings.disabled_classes.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label for="enabled_classes">{{ ::$ctrl.settings.enabled_classes.label }}</label></th>\n <td>\n <editor-text args="$ctrl.settings.enabled_classes" on-update="$ctrl.update($event)"></editor-text>\n <p class="description" ng-bind-html="$ctrl.settings.enabled_classes.desc"></p>\n </td>\n </tr>\n <tr>\n <th>{{ ::$ctrl.i18n.image_resolution_label }}</th>\n <td>\n <p>\n <resolution height="$ctrl.settings.min_image_height_small" width="$ctrl.settings.min_image_width_small"\n update="$ctrl.update($event)" template="$ctrl.i18n.min_resolution_template_small">\n </resolution>\n </p>\n <p>\n <resolution height="$ctrl.settings.min_image_height" width="$ctrl.settings.min_image_width"\n update="$ctrl.update($event)" template="$ctrl.i18n.min_resolution_template">\n </resolution>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.image_resolution_desc"></p>\n <p class="description" ng-bind-html="$ctrl.i18n.image_resolution_desc_2"></p>\n </td>\n </tr>\n <tr>\n <th>{{ ::$ctrl.i18n.show_on_field_label }}</th>\n <td>\n <p>\n <label for="show_on">{{ ::$ctrl.settings.show_on.label }}:</label><br/>\n <editor-textarea args="$ctrl.settings.show_on" on-update="$ctrl.update($event)"></editor-text>\n </p>\n <p>\n <label for="disable_on">{{ ::$ctrl.settings.disable_on.label }}:</label><br/>\n <editor-textarea args="$ctrl.settings.disable_on" on-update="$ctrl.update($event)"></editor-text>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.show_on_field_desc"></p>\n </td>\n </tr>\n </tbody>\n </table>\n <button class="button button-primary" ng-click="$ctrl.save()">\n {{ ::$ctrl.i18n.submit }}\n </button>\n '};n["default"]=a},{"./../base.controller":4}],12:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./visual.component"),s=r(a),u=e("./../../components/components"),l=r(u),c=o["default"].module("app.common.visual",[l["default"]]).component("visualEditor",s["default"]).name;n["default"]=c},{"./../../components/components":15,"./visual.component":13,angular:42}],13:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./visual.controller"),o=r(i),a={bindings:{settings:"<",i18n:"<"},controller:o["default"],template:'\n <h2>{{ $ctrl.i18n.title }}</h2>\n <table class="form-table">\n <tbody>\n <tr>\n <th><label for="show_button">{{ ::$ctrl.settings.show_button.label }}</label></th>\n <td>\n <editor-select args="$ctrl.settings.show_button" on-update="$ctrl.update($event)"></editor-select>\n <p class="description" ng-bind-html="$ctrl.settings.show_button.desc"></p>\n <p ng-if="$ctrl.values.show_button != \'hover\'">\n <b ng-bind-html="$ctrl.i18n.pro_feature_error"></b>\n </p>\n </td>\n </tr>\n <tr>\n <th><label>{{ ::$ctrl.settings.description_option.label }}</label></th>\n <td>\n <editor-sortable-select args="$ctrl.settings.description_option" on-update="$ctrl.update($event)"></editor-sortable-select>\n <p class="description" ng-bind-html="$ctrl.settings.description_option.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label for="pinLinkedImages">{{ ::$ctrl.settings.pinLinkedImages.label }}</label></th>\n <td>\n <editor-checkbox args="$ctrl.settings.pinLinkedImages" on-update="$ctrl.update($event)"></editor-checkbox>\n <p class="description" ng-bind-html="$ctrl.settings.pinLinkedImages.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label for="transparency_value">{{ ::$ctrl.settings.transparency_value.label }}</label></th>\n <td>\n <editor-number args="$ctrl.settings.transparency_value" on-update="$ctrl.update($event)"></editor-number>\n <p class="description" ng-bind-html="$ctrl.settings.transparency_value.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label>{{ ::$ctrl.settings.pin_image.label }}</label></th>\n <td>\n <table class="jpibfi-inner-table">\n <tr>\n <th>{{ ::$ctrl.i18n.mode }}</th>\n <th ng-if="$ctrl.values.pin_image != \'old_default\'">{{ ::$ctrl.i18n.settings }}</th>\n <th>{{ ::$ctrl.i18n.preview }}</th>\n </tr>\n <tr>\n <td>\n <p><label><input type="radio" ng_model="$ctrl.values.pin_image" value="old_default">{{ ::$ctrl.settings.pin_image.options[\'old_default\'] }}</label></p>\n <p><label><input type="radio" ng_model="$ctrl.values.pin_image" value="default">{{ ::$ctrl.settings.pin_image.options[\'default\'] }}</label></p>\n <p><label><input type="radio" ng_model="$ctrl.values.pin_image" value="custom">{{ ::$ctrl.settings.pin_image.options[\'custom\'] }}</label></p>\n </td>\n <td ng-if="$ctrl.values.pin_image != \'old_default\'">\n <div ng-show="$ctrl.values.pin_image == \'default\'">\n <p>\n <label for="pin_image_icon">{{ ::$ctrl.settings.pin_image_icon.label }}</label>\n <editor-select args="$ctrl.settings.pin_image_icon" on-update="$ctrl.update($event)"></editor-select>\n <p ng-if="$ctrl.values.pin_image_icon != \'circle\'">\n <b ng-bind-html="$ctrl.i18n.pro_feature_error"></b>\n </p>\n </p>\n <p>\n <label for="pin_image_size">{{ ::$ctrl.settings.pin_image_size.label }}</label>\n <editor-select args="$ctrl.settings.pin_image_size" on-update="$ctrl.update($event)"></editor-select>\n </p>\n <p>\n <label for="pin_image_button">{{ ::$ctrl.settings.pin_image_button.label }}</label>\n <editor-select args="$ctrl.settings.pin_image_button" on-update="$ctrl.update($event)"></editor-select>\n </p>\n </div>\n <div ng-if="$ctrl.values.pin_image == \'custom\'">\n <p><button class="button button-default" ng-click="$ctrl.upload()">{{ ::$ctrl.i18n.custom_button_upload }}</button></p>\n <p>\n <label for="custom_image_url">{{ ::$ctrl.settings.custom_image_url.label }}</label>\n <editor-text args="$ctrl.settings.custom_image_url" on-update="$ctrl.update($event)"></editor-text>\n </p>\n <p>\n <div style="display: inline-block; width: 49%;">\n <label for="custom_image_height">{{ ::$ctrl.settings.custom_image_height.label }}</label>\n <editor-number args="$ctrl.settings.custom_image_height" on-update="$ctrl.update($event)"></editor-number>\n </div>\n <div style="display: inline-block; width: 49%;">\n <label for="custom_image_width">{{ ::$ctrl.settings.custom_image_width.label }}</label>\n <editor-number args="$ctrl.settings.custom_image_width" on-update="$ctrl.update($event)"></editor-number>\n </div>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.custom_button_desc"></p>\n </div>\n </td>\n <td>\n <div ng-if="$ctrl.values.pin_image == \'old_default\'">\n <a class="pinit-button old_default"><span></span></a>\n </div>\n <div ng-show="$ctrl.values.pin_image == \'default\'">\n <a class="pinit-button default" ng-class="[\'jpibfi-size-\' + $ctrl.values.pin_image_size, \'jpibfi-button-\' + $ctrl.values.pin_image_button]">\n <span ng-class="[\'jpibfi-icon-\' + $ctrl.values.pin_image_icon]"></span>\n </a>\n </div>\n <div ng-show="$ctrl.values.pin_image == \'custom\'">\n <div ng-if="$ctrl.values.custom_image_url">\n <div style="width: {{ $ctrl.values.custom_image_width }}px;\n height: {{ $ctrl.values.custom_image_height }}px;\n background-image: url(\'{{ $ctrl.values.custom_image_url }}\');">\n </div>\n </div>\n <div ng-if="!$ctrl.values.custom_image_url">\n {{ ::$ctrl.i18n.custom_button_no_image_to_preview }}\n </div>\n </div>\n </td>\n </tr>\n </table>\n </tr>\n <tr>\n <th><label for="button_position">{{ ::$ctrl.settings.button_position.label }}</label></th>\n <td>\n <editor-select args="$ctrl.settings.button_position" on-update="$ctrl.update($event)"></editor-select>\n <p class="description" ng-bind-html="$ctrl.settings.button_position.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label>{{ ::$ctrl.i18n.margins_label }}</label></th>\n <td>\n <p>\n <label for="button_margin_top">{{ ::$ctrl.settings.button_margin_top.label }}</label>\n <editor-number ng-disabled="!$ctrl.marginAvailability.top" args="$ctrl.settings.button_margin_top" on-update="$ctrl.update($event)">\n </editor-number>\n </p>\n <p>\n <label for="button_margin_bottom">{{ ::$ctrl.settings.button_margin_bottom.label }}</label>\n <editor-number ng-disabled="!$ctrl.marginAvailability.bottom" args="$ctrl.settings.button_margin_bottom" on-update="$ctrl.update($event)">\n </editor-number>\n </p>\n <p>\n <label for="button_margin_left">{{ ::$ctrl.settings.button_margin_left.label }}</label>\n <editor-number ng-disabled="!$ctrl.marginAvailability.left" args="$ctrl.settings.button_margin_left" on-update="$ctrl.update($event)">\n </editor-number>\n </p>\n <p>\n <label for="button_margin_right">{{ ::$ctrl.settings.button_margin_right.label }}</label>\n <editor-number ng-disabled="!$ctrl.marginAvailability.right" args="$ctrl.settings.button_margin_right" on-update="$ctrl.update($event)">\n </editor-number>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.margins_desc"></p>\n </td>\n </tr>\n </tbody>\n </table>\n <button class="button button-primary" ng-click="$ctrl.save()">\n {{ ::$ctrl.i18n.submit }}\n </button>\n <p ng-bind-html="$ctrl.i18n.attribution"></p>\n '};n["default"]=a},{"./visual.controller":14}],14:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function d(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:d(i,t,n)}if("value"in r)return r.value;var o=r.get;if(void 0!==o)return o.call(n)},l=e("./../base.controller"),c=r(l),f=function(e){function t(e,n){i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return r.$scope=e,r.fileFrame=null,r}return a(t,e),s(t,[{key:"$onChanges",value:function(e){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"$onChanges",this).call(this,e),this.updateMarginAvailability()}},{key:"update",value:function(e){var t=e.key,n=e.value;this.values[t]=n,"button_position"===t&&this.updateMarginAvailability()}},{key:"updateMarginAvailability",value:function(){var e=this.values.button_position;this.marginAvailability={top:"top-left"===e||"top-right"===e,bottom:"bottom-left"===e||"bottom-right"===e,left:"top-left"===e||"bottom-left"===e,right:"top-right"===e||"bottom-right"===e}}},{key:"upload",value:function(){var e=this;return this.fileFrame?void this.fileFrame.open():(this.fileFrame=wp.media.frames.file_frame=wp.media({title:this.i18n.custom_button_frame_title,button:{text:this.i18n.custom_button_frame_button_text},multiple:!1}).on("select",function(){var t=e.fileFrame.state().get("selection").first().toJSON();e.updateValue("custom_image_url",t.url),e.updateValue("custom_image_width",t.width),e.updateValue("custom_image_height",t.height),e.$scope.$digest()}),void this.fileFrame.open())}}]),t}(c["default"]);f.$inject=["$scope","httpService"],n["default"]=f},{"./../base.controller":4}],15:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./navbar"),s=r(a),u=e("./editors"),l=r(u),c=e("./status"),f=r(c),d=o["default"].module("app.components",[s["default"],l["default"],f["default"]]).name;n["default"]=d},{"./editors":28,"./navbar":29,"./status":31,angular:42}],16:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.controller"),o=r(i),a={bindings:{args:"<",onUpdate:"&"},controller:o["default"],template:'<input type="checkbox" ng-change="$ctrl.change()" id="{{ $ctrl.key }}" ng-model="$ctrl.value">\n <label for=" {{ $ctrl.key }}">{{ ::$ctrl.args.text }}</label><br/>'};n["default"]=a},{"./editor.controller":19}],17:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.checkboxes.controller"),o=r(i),a={bindings:{args:"<",onUpdate:"&"},controller:o["default"],template:'<p ng-repeat="(key, label) in $ctrl.args.options">\n <input type="checkbox" id="{{:: $ctrl.key + \'_\' + key }}" ng-change="$ctrl.change()" ng-model="$ctrl.values[key]" />\n <label for="{{ $ctrl.key + \'_\' + key }}">{{ ::label }}</label>\n </p>'};n["default"]=a},{"./editor.checkboxes.controller":18}],18:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(){r(this,e),this.key=this.args.key;var t=this.args.value||[];this.values=Object.keys(this.args.options).reduce(function(e,n){return e[n]=t.indexOf(n)!==-1,e},{})}return o(e,[{key:"$onChanges",value:function(e){e.args&&(this.args=i({},this.args))}},{key:"change",value:function(e){var t=this;return this.onUpdate({$event:{key:this.key,value:Object.keys(this.args.options).reduce(function(e,n){return t.values[n]?e.concat([n]):e},[])}}),e}}]),e}();a.$inject=[],n["default"]=a},{}],19:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(){r(this,e)}return o(e,[{key:"$onChanges",value:function(e){e.args&&(this.args=i({},this.args),this.key=this.args.key,this.value=this.args.value)}},{key:"change",value:function(){this.onUpdate({$event:{key:this.key,value:this.value}})}}]),e}();a.$inject=[],n["default"]=a},{}],20:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.controller"),o=r(i),a={bindings:{args:"<",ngDisabled:"<",onUpdate:"&"},controller:o["default"],template:'\n <input id="{{ $ctrl.key }}" ng-disabled="$ctrl.ngDisabled" number-attributes="$ctrl.args" class="small-text" type="number" ng-model="$ctrl.value" ng-change="$ctrl.change()" /> \n <span>{{ ::$ctrl.args.unit }}</span>'};n["default"]=a},{"./editor.controller":19}],21:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t){r(this,e),this.$parse=t,this.restrict="A"}return i(e,[{key:"link",value:function(e,t,n){var r=this.$parse(n.numberAttributes)(e),i=["step","min","max"];i.forEach(function(e){void 0!==r[e]&&t.attr(e,r[e])})}}]),e}();n["default"]=o},{}],22:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.select.controller"),o=r(i),a={bindings:{args:"<",onUpdate:"&"},controller:o["default"],template:'\n <select ng-model="$ctrl.value" ng-change="$ctrl.change()">\n <option ng-repeat="(value, name) in $ctrl.args.options" value="{{ value }}">{{ name }}</option>\n </select>'};n["default"]=a},{"./editor.select.controller":23}],23:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function d(e,t,n){null===e&&(e=Function.prototype);
2
- var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:d(i,t,n)}if("value"in r)return r.value;var o=r.get;if(void 0!==o)return o.call(n)},l=e("./editor.controller"),c=r(l),f=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"$onChanges",value:function(e){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"$onChanges",this).call(this,e),e.args&&(void 0!==this.args.value&&null!==this.args.value||(this.value=Object.keys(this.args.options)[0],this.change()),this.args.truthy&&(this.value=this.value?"1":"0"))}},{key:"change",value:function(){this.onUpdate({$event:{key:this.key,value:this.args.truthy?"1"===this.value:this.value}})}}]),t}(c["default"]);f.$inject=[],n["default"]=f},{"./editor.controller":19}],24:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.sortableSelect.controller"),o=r(i),a={bindings:{args:"<",onUpdate:"&"},controller:o["default"],template:'\n <ul class="frizzly-sortable" dnd-list="$ctrl.options">\n <li ng-repeat="item in $ctrl.options"\n dnd-draggable="item"\n dnd-moved="$ctrl.options.splice($index, 1); $ctrl.change()"\n dnd-effect-allowed="move">\n <input type="checkbox" id="{{ item.key }}" ng-model="item.selected" ng-change="$ctrl.change()" />\n <label for="{{ item.key }}">{{ item.label }}\n </li>\n </ul>\n '};n["default"]=a},{"./editor.sortableSelect.controller":25}],25:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(){r(this,e)}return o(e,[{key:"$onChanges",value:function(e){var t=this;if(e.args){this.args=i({},this.args),this.key=this.args.key,this.value=this.args.value||[];var n=this.value.slice().concat(Object.keys(this.args.options).filter(function(e){return t.value.indexOf(e)===-1}));this.options=n.map(function(e){return{key:e,label:t.args.options[e],selected:t.value.indexOf(e)!==-1}})}}},{key:"change",value:function(){var e=this.options.reduce(function(e,t){return t.selected?e.concat([t.key]):e},[]);this.onUpdate({$event:{key:this.key,value:e}})}}]),e}();a.$inject=[],n["default"]=a},{}],26:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.controller"),o=r(i),a={bindings:{args:"<",ngDisabled:"<",onUpdate:"&"},controller:o["default"],template:'<input ng-disabled="$ctrl.ngDisabled" type="text" id="{{ $ctrl.key }}" ng-model="$ctrl.value" ng-change="$ctrl.change()" class="regular-text" />'};n["default"]=a},{"./editor.controller":19}],27:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.controller"),o=r(i),a={bindings:{args:"<",onUpdate:"&"},controller:o["default"],template:'<textarea rows="3" cols="50" id="{{ $ctrl.key }}" class="large-text code" ng-model="$ctrl.value" ng-change="$ctrl.change()"></textarea>'};n["default"]=a},{"./editor.controller":19}],28:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./editor.text.component"),s=r(a),u=e("./editor.textarea.component"),l=r(u),c=e("./editor.number.component"),f=r(c),d=e("./editor.number.directive"),p=r(d),h=e("./editor.checkbox.component"),g=r(h),v=e("./editor.checkboxes.component"),$=r(v),m=e("./editor.select.component"),b=r(m),y=e("./editor.sortableSelect.component"),w=r(y),x=o["default"].module("editors",["dndLists"]).component("editorText",s["default"]).component("editorTextarea",l["default"]).component("editorNumber",f["default"]).component("editorCheckbox",g["default"]).component("editorCheckboxes",$["default"]).component("editorSelect",b["default"]).component("editorSortableSelect",w["default"]).directive("numberAttributes",["$parse",function(e){return new p["default"](e)}]).name;n["default"]=x},{"./editor.checkbox.component":16,"./editor.checkboxes.component":17,"./editor.number.component":20,"./editor.number.directive":21,"./editor.select.component":22,"./editor.sortableSelect.component":24,"./editor.text.component":26,"./editor.textarea.component":27,angular:42}],29:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./navbar.component"),s=r(a),u=o["default"].module("navbar",[]).component("navbar",s["default"]).name;n["default"]=u},{"./navbar.component":30,angular:42}],30:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={bindings:{currentTab:"<",tabs:"<",page:"<"},controller:function(){},template:'\n <h2 class="nav-tab-wrapper">\n <a ng-repeat="tab in $ctrl.tabs" \n href="?page={{ $ctrl.page }}&tab={{ tab.slug }}" class="nav-tab {{ $ctrl.currentTab == tab.slug ? \'nav-tab-active\' : \'\' }}">\n {{ tab.name }}\n </a>\n </h2>\n '};n["default"]=r},{}],31:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./status.component"),s=r(a),u=o["default"].module("status",[]).component("status",s["default"]).name;n["default"]=u},{"./status.component":32,angular:42}],32:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./status.controller"),o=r(i),a={bindings:{i18n:"<"},controller:o["default"],template:"\n <div class=\"notice notice-success\" ng-if=\"$ctrl.status.status != ''\" ng-class=\"{ \n 'notice-success': $ctrl.status.status === 'OK',\n 'notice-info' : $ctrl.status.status === 'PENDING',\n 'notice-error': $ctrl.status.status === 'ERROR'\n }\">\n <p ng-repeat=\"(key, text) in $ctrl.status.messages\"><strong>{{ text }}</strong></p>\n </div>\n "};n["default"]=a},{"./status.controller":33}],33:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t,n){var i=this;r(this,e),this.$anchorScroll=t,this.status={status:""},n.onRequest(function(){return i.onRequestHandler()}),n.onResponse(function(e){var t=e.status;return i.onResponseHandler(t)})}return i(e,[{key:"onResponseHandler",value:function(e){this.status=e}},{key:"onRequestHandler",value:function(){this.$anchorScroll(),this.status.status="PENDING",this.status.messages={pending:this.i18n.pending}}}]),e}();o.$inject=["$anchorScroll","httpService"],n["default"]=o},{}],34:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=e("angular"),s=r(a),u=function(){function e(t,n,r){i(this,e),this.$http=t,this.$timeout=n,this.Upload=r,this.responseObservers=[],this.requestObservers=[]}return o(e,[{key:"init",value:function(e){this.url=e.url,this.saveSettingsParams={action:e.saveSettingsAction+e.tab,nonce:e.saveSettingsNonce},this.customActionParams={action:e.customAction,nonce:e.customActionNonce}}},{key:"onRequest",value:function(e){this.requestObservers.push(e)}},{key:"onResponse",value:function(e){this.responseObservers.push(e)}},{key:"saveSettings",value:function(e){var t=s["default"].extend({},this.saveSettingsParams,{settings:e});return this.processRequest(t)}},{key:"customAction",value:function(e,t){var n=s["default"].extend({},this.customActionParams,{name:e,settings:t});return this.processRequest(n)}},{key:"uploadFile",value:function(e,t){var n=this,r=s["default"].extend({},this.customActionParams,{name:e,"import":t}),i=this.Upload.upload({url:this.url,data:r});this.requestObservers.forEach(function(e){e()}),i.then(function(e){var t=e.data;n.$timeout(function(){n.responseObservers.forEach(function(e){e(t)})})},function(e){e.status>0&&(n.errorMsg=e.status+": "+e.data)})}},{key:"processRequest",value:function(e){var t=this,n={method:"POST",url:this.url,params:e};return this.requestObservers.forEach(function(e){e()}),this.$http(n).then(function(e){var n=e.data;return t.responseObservers.forEach(function(e){e(n)}),n})}}]),e}();u.$inject=["$http","$timeout","Upload"],n["default"]=u},{angular:42}],35:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./http.service"),s=r(a),u=e("./link.service"),l=r(u),c=o["default"].module("services",[]).service("httpService",s["default"]).service("linkService",l["default"]).name;n["default"]=c},{"./http.service":34,"./link.service":36,angular:42}],36:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(){r(this,e),this.baseLink=""}return o(e,[{key:"init",value:function(e){this.baseLink="?page="+e}},{key:"generateQuery",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(function(e,t){var n=i(t,2),r=n[0],o=n[1];return e+"&"+r+"="+o},this.baseLink)}}]),e}();a.$inject=[],n["default"]=a},{}],37:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var i=e("./app/app");r(i);!function(e){e(document).ready(function(){})}(jQuery)},{"./app/app":3}],38:[function(e,t,n){angular.module("dndLists",[]).directive("dndDraggable",["$parse","$timeout","dndDropEffectWorkaround","dndDragTypeWorkaround",function(e,t,n,r){return function(i,o,a){o.attr("draggable","true"),a.dndDisableIf&&i.$watch(a.dndDisableIf,function(e){o.attr("draggable",!e)}),o.on("dragstart",function(s){return s=s.originalEvent||s,"false"==o.attr("draggable")||(s.dataTransfer.setData("Text",angular.toJson(i.$eval(a.dndDraggable))),s.dataTransfer.effectAllowed=a.dndEffectAllowed||"move",o.addClass("dndDragging"),t(function(){o.addClass("dndDraggingSource")},0),n.dropEffect="none",r.isDragging=!0,r.dragType=a.dndType?i.$eval(a.dndType):void 0,s._dndHandle&&s.dataTransfer.setDragImage&&s.dataTransfer.setDragImage(o[0],0,0),e(a.dndDragstart)(i,{event:s}),void s.stopPropagation())}),o.on("dragend",function(s){s=s.originalEvent||s;var u=n.dropEffect;i.$apply(function(){switch(u){case"move":e(a.dndMoved)(i,{event:s});break;case"copy":e(a.dndCopied)(i,{event:s});break;case"none":e(a.dndCanceled)(i,{event:s})}e(a.dndDragend)(i,{event:s,dropEffect:u})}),o.removeClass("dndDragging"),t(function(){o.removeClass("dndDraggingSource")},0),r.isDragging=!1,s.stopPropagation()}),o.on("click",function(t){a.dndSelected&&(t=t.originalEvent||t,i.$apply(function(){e(a.dndSelected)(i,{event:t})}),t.stopPropagation())}),o.on("selectstart",function(){this.dragDrop&&this.dragDrop()})}}]).directive("dndList",["$parse","$timeout","dndDropEffectWorkaround","dndDragTypeWorkaround",function(e,t,n,r){return function(i,o,a){function s(e,t,n){var r=$?e.offsetX||e.layerX:e.offsetY||e.layerY,i=$?t.offsetWidth:t.offsetHeight,o=$?t.offsetLeft:t.offsetTop;return o=n?o:0,r<o+i/2}function u(){var e;return angular.forEach(o.children(),function(t){var n=angular.element(t);n.hasClass("dndPlaceholder")&&(e=n)}),e||angular.element("<li class='dndPlaceholder'></li>")}function l(){return Array.prototype.indexOf.call(v.children,g)}function c(e){if(!r.isDragging&&!m)return!1;if(!p(e.dataTransfer.types))return!1;if(a.dndAllowedTypes&&r.isDragging){var t=i.$eval(a.dndAllowedTypes);if(angular.isArray(t)&&t.indexOf(r.dragType)===-1)return!1}return!a.dndDisableIf||!i.$eval(a.dndDisableIf)}function f(){return h.remove(),o.removeClass("dndDragover"),!0}function d(t,n,o,a){return e(t)(i,{event:n,index:o,item:a||void 0,external:!r.isDragging,type:r.isDragging?r.dragType:void 0})}function p(e){if(!e)return!0;for(var t=0;t<e.length;t++)if("Text"===e[t]||"text/plain"===e[t])return!0;return!1}var h=u(),g=h[0],v=o[0];h.remove();var $=a.dndHorizontalList&&i.$eval(a.dndHorizontalList),m=a.dndExternalSources&&i.$eval(a.dndExternalSources);o.on("dragenter",function(e){return e=e.originalEvent||e,!c(e)||void e.preventDefault()}),o.on("dragover",function(e){if(e=e.originalEvent||e,!c(e))return!0;if(g.parentNode!=v&&o.append(h),e.target!==v){for(var t=e.target;t.parentNode!==v&&t.parentNode;)t=t.parentNode;t.parentNode===v&&t!==g&&(s(e,t)?v.insertBefore(g,t):v.insertBefore(g,t.nextSibling))}else if(s(e,g,!0))for(;g.previousElementSibling&&(s(e,g.previousElementSibling,!0)||0===g.previousElementSibling.offsetHeight);)v.insertBefore(g,g.previousElementSibling);else for(;g.nextElementSibling&&!s(e,g.nextElementSibling,!0);)v.insertBefore(g,g.nextElementSibling.nextElementSibling);return a.dndDragover&&!d(a.dndDragover,e,l())?f():(o.addClass("dndDragover"),e.preventDefault(),e.stopPropagation(),!1)}),o.on("drop",function(e){if(e=e.originalEvent||e,!c(e))return!0;e.preventDefault();var t,r=e.dataTransfer.getData("Text")||e.dataTransfer.getData("text/plain");try{t=JSON.parse(r)}catch(o){return f()}var s=l();return a.dndDrop&&(t=d(a.dndDrop,e,s,t),!t)?f():(t!==!0&&i.$apply(function(){i.$eval(a.dndList).splice(s,0,t)}),d(a.dndInserted,e,s,t),"none"===e.dataTransfer.dropEffect?"copy"===e.dataTransfer.effectAllowed||"move"===e.dataTransfer.effectAllowed?n.dropEffect=e.dataTransfer.effectAllowed:n.dropEffect=e.ctrlKey?"copy":"move":n.dropEffect=e.dataTransfer.dropEffect,f(),e.stopPropagation(),!1)}),o.on("dragleave",function(e){e=e.originalEvent||e,o.removeClass("dndDragover"),t(function(){o.hasClass("dndDragover")||h.remove()},100)})}}]).directive("dndNodrag",function(){return function(e,t,n){t.attr("draggable","true"),t.on("dragstart",function(e){e=e.originalEvent||e,e._dndHandle||(e.dataTransfer.types&&e.dataTransfer.types.length||e.preventDefault(),e.stopPropagation())}),t.on("dragend",function(e){e=e.originalEvent||e,e._dndHandle||e.stopPropagation()})}}).directive("dndHandle",function(){return function(e,t,n){t.attr("draggable","true"),t.on("dragstart dragend",function(e){e=e.originalEvent||e,e._dndHandle=!0})}}).factory("dndDragTypeWorkaround",function(){return{}}).factory("dndDropEffectWorkaround",function(){return{}})},{}],39:[function(e,t,n){!function(e,t){"use strict";function n(){function n(e,t){var n,r={},i=e.split(",");for(n=0;n<i.length;n++)r[t?u(i[n]):i[n]]=!0;return r}function r(t,n){null===t||void 0===t?t="":"string"!=typeof t&&(t=""+t),m.innerHTML=t;var r=5;do{if(0===r)throw d("uinput","Failed to sanitize html because the input is unstable");r--,e.document.documentMode&&v(m),t=m.innerHTML,m.innerHTML=t}while(t!==m.innerHTML);for(var i=m.firstChild;i;){switch(i.nodeType){case 1:n.start(i.nodeName.toLowerCase(),p(i.attributes));break;case 3:n.chars(i.textContent)}var o;if(!(o=i.firstChild)&&(1==i.nodeType&&n.end(i.nodeName.toLowerCase()),o=i.nextSibling,!o))for(;null==o&&(i=i.parentNode,i!==m);)o=i.nextSibling,1==i.nodeType&&n.end(i.nodeName.toLowerCase());i=o}for(;i=m.firstChild;)m.removeChild(i)}function p(e){for(var t={},n=0,r=e.length;n<r;n++){var i=e[n];t[i.name]=i.value}return t}function h(e){return e.replace(/&/g,"&amp;").replace(b,function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+(1024*(t-55296)+(n-56320)+65536)+";"}).replace(y,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function g(e,t){var n=!1,r=i(e,e.push);return{start:function(e,i){e=u(e),!n&&A[e]&&(n=e),n||O[e]!==!0||(r("<"),r(e),a(i,function(n,i){var o=u(i),a="img"===e&&"src"===o||"background"===o;T[o]!==!0||M[o]===!0&&!t(n,a)||(r(" "),r(i),r('="'),r(h(n)),r('"'))}),r(">"))},end:function(e){e=u(e),n||O[e]!==!0||w[e]===!0||(r("</"),r(e),r(">")),e==n&&(n=!1)},chars:function(e){n||r(h(e))}}}function v(t){if(t.nodeType===e.Node.ELEMENT_NODE)for(var n=t.attributes,r=0,i=n.length;r<i;r++){var o=n[r],a=o.name.toLowerCase();"xmlns:ns1"!==a&&0!==a.lastIndexOf("ns1:",0)||(t.removeAttributeNode(o),r--,i--)}var s=t.firstChild;s&&v(s),s=t.nextSibling,s&&v(s)}var $=!1;this.$get=["$$sanitizeUri",function(e){return $&&o(O,C),function(t){var n=[];return c(t,f(n,function(t,n){return!/^unsafe:/.test(e(t,n))})),n.join("")}}],this.enableSvg=function(e){return s(e)?($=e,this):$},i=t.bind,o=t.extend,a=t.forEach,s=t.isDefined,u=t.lowercase,l=t.noop,c=r,f=g;var m,b=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,y=/([^\#-~ |!])/g,w=n("area,br,col,hr,img,wbr"),x=n("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),_=n("rp,rt"),S=o({},_,x),k=o({},x,n("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),E=o({},_,n("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),C=n("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),A=n("script,style"),O=o({},w,k,E,S),M=n("background,cite,href,longdesc,src,xlink:href"),j=n("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),P=n("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),T=o({},M,P,j);!function(e){var t;if(!e.document||!e.document.implementation)throw d("noinert","Can't create an inert html document");t=e.document.implementation.createHTMLDocument("inert");var n=t.documentElement||t.getDocumentElement(),r=n.getElementsByTagName("body");if(1===r.length)m=r[0];else{var i=t.createElement("html");m=t.createElement("body"),i.appendChild(m),t.appendChild(i)}}(e)}function r(e){var t=[],n=f(t,l);return n.chars(e),t.join("")}var i,o,a,s,u,l,c,f,d=t.$$minErr("$sanitize");t.module("ngSanitize",[]).provider("$sanitize",n),t.module("ngSanitize").filter("linky",["$sanitize",function(e){var n=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,i=/^mailto:/i,o=t.$$minErr("linky"),a=t.isDefined,s=t.isFunction,u=t.isObject,l=t.isString;return function(t,c,f){function d(e){e&&b.push(r(e))}function p(e,t){var n,r=$(e);b.push("<a ");for(n in r)b.push(n+'="'+r[n]+'" ');!a(c)||"target"in r||b.push('target="',c,'" '),b.push('href="',e.replace(/"/g,"&quot;"),'">'),d(t),b.push("</a>")}if(null==t||""===t)return t;if(!l(t))throw o("notstring","Expected string but received: {0}",t);for(var h,g,v,$=s(f)?f:u(f)?function(){return f}:function(){return{}},m=t,b=[];h=m.match(n);)g=h[0],h[2]||h[4]||(g=(h[3]?"http://":"mailto:")+g),v=h.index,d(m.substr(0,v)),p(g,h[0].replace(i,"")),m=m.substring(v+h[0].length);return d(m),e(b.join(""))}}])}(window,window.angular)},{}],40:[function(e,t,n){e("./angular-sanitize"),t.exports="ngSanitize"},{"./angular-sanitize":39}],41:[function(e,t,n){!function(e){"use strict";function t(e,t){return t=t||Error,function(){var n,r,i=2,o=arguments,a=o[0],s="["+(e?e+":":"")+a+"] ",u=o[1];for(s+=u.replace(/\{\d+\}/g,function(e){var t=+e.slice(1,-1),n=t+i;return n<o.length?me(o[n]):e}),s+="\nhttp://errors.angularjs.org/1.5.8/"+(e?e+"/":"")+a,r=i,n="?";r<o.length;r++,n="&")s+=n+"p"+(r-i)+"="+encodeURIComponent(me(o[r]));return new t(s)}}function n(e){if(null==e||E(e))return!1;if(Kr(e)||w(e)||Rr&&e instanceof Rr)return!0;var t="length"in Object(e)&&e.length;return x(t)&&(t>=0&&(t-1 in e||e instanceof Array)||"function"==typeof e.item)}function r(e,t,i){var o,a;if(e)if(S(e))for(o in e)"prototype"==o||"length"==o||"name"==o||e.hasOwnProperty&&!e.hasOwnProperty(o)||t.call(i,e[o],o,e);else if(Kr(e)||n(e)){var s="object"!=typeof e;for(o=0,a=e.length;o<a;o++)(s||o in e)&&t.call(i,e[o],o,e)}else if(e.forEach&&e.forEach!==r)e.forEach(t,i,e);else if(y(e))for(o in e)t.call(i,e[o],o,e);else if("function"==typeof e.hasOwnProperty)for(o in e)e.hasOwnProperty(o)&&t.call(i,e[o],o,e);else for(o in e)Pr.call(e,o)&&t.call(i,e[o],o,e);return e}function i(e,t,n){for(var r=Object.keys(e).sort(),i=0;i<r.length;i++)t.call(n,e[r[i]],r[i]);return r}function o(e){return function(t,n){e(n,t)}}function a(){return++Xr}function s(e,t){t?e.$$hashKey=t:delete e.$$hashKey}function u(e,t,n){for(var r=e.$$hashKey,i=0,o=t.length;i<o;++i){var a=t[i];if(b(a)||S(a))for(var l=Object.keys(a),c=0,f=l.length;c<f;c++){var d=l[c],p=a[d];n&&b(p)?_(p)?e[d]=new Date(p.valueOf()):k(p)?e[d]=new RegExp(p):p.nodeName?e[d]=p.cloneNode(!0):F(p)?e[d]=p.clone():(b(e[d])||(e[d]=Kr(p)?[]:{}),u(e[d],[p],!0)):e[d]=p}}return s(e,r),e}function l(e){return u(e,zr.call(arguments,1),!1)}function c(e){return u(e,zr.call(arguments,1),!0)}function f(e){return parseInt(e,10)}function d(e,t){return l(Object.create(e),t)}function p(){}function h(e){return e}function g(e){return function(){return e}}function v(e){return S(e.toString)&&e.toString!==Hr}function $(e){return"undefined"==typeof e}function m(e){return"undefined"!=typeof e}function b(e){return null!==e&&"object"==typeof e}function y(e){return null!==e&&"object"==typeof e&&!Br(e)}function w(e){return"string"==typeof e}function x(e){return"number"==typeof e}function _(e){return"[object Date]"===Hr.call(e)}function S(e){return"function"==typeof e}function k(e){return"[object RegExp]"===Hr.call(e)}function E(e){return e&&e.window===e}function C(e){return e&&e.$evalAsync&&e.$watch}function A(e){return"[object File]"===Hr.call(e)}function O(e){return"[object FormData]"===Hr.call(e)}function M(e){return"[object Blob]"===Hr.call(e)}function j(e){return"boolean"==typeof e}function P(e){return e&&S(e.then)}function T(e){return e&&x(e.length)&&Yr.test(Hr.call(e))}function D(e){return"[object ArrayBuffer]"===Hr.call(e)}function F(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function N(e){var t,n={},r=e.split(",");for(t=0;t<r.length;t++)n[r[t]]=!0;return n}function I(e){return Tr(e.nodeName||e[0]&&e[0].nodeName)}function R(e,t){var n=e.indexOf(t);return n>=0&&e.splice(n,1),n}function U(e,t){function n(e,t){var n,r=t.$$hashKey;if(Kr(e))for(var o=0,a=e.length;o<a;o++)t.push(i(e[o]));else if(y(e))for(n in e)t[n]=i(e[n]);else if(e&&"function"==typeof e.hasOwnProperty)for(n in e)e.hasOwnProperty(n)&&(t[n]=i(e[n]));else for(n in e)Pr.call(e,n)&&(t[n]=i(e[n]));return s(t,r),t}function i(e){if(!b(e))return e;var t=a.indexOf(e);if(t!==-1)return u[t];if(E(e)||C(e))throw Wr("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");var r=!1,i=o(e);return void 0===i&&(i=Kr(e)?[]:Object.create(Br(e)),r=!0),a.push(e),u.push(i),r?n(e,i):i}function o(e){switch(Hr.call(e)){case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return new e.constructor(i(e.buffer),e.byteOffset,e.length);case"[object ArrayBuffer]":if(!e.slice){var t=new ArrayBuffer(e.byteLength);return new Uint8Array(t).set(new Uint8Array(e)),t}return e.slice(0);case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new e.constructor(e.valueOf());case"[object RegExp]":var n=new RegExp(e.source,e.toString().match(/[^\/]*$/)[0]);return n.lastIndex=e.lastIndex,n;case"[object Blob]":return new e.constructor([e],{type:e.type})}if(S(e.cloneNode))return e.cloneNode(!0)}var a=[],u=[];if(t){if(T(t)||D(t))throw Wr("cpta","Can't copy! TypedArray destination cannot be mutated.");if(e===t)throw Wr("cpi","Can't copy! Source and destination are identical.");return Kr(t)?t.length=0:r(t,function(e,n){"$$hashKey"!==n&&delete t[n]}),a.push(e),u.push(t),n(e,t)}return i(e)}function V(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!==e&&t!==t)return!0;var n,r,i,o=typeof e,a=typeof t;if(o==a&&"object"==o){if(!Kr(e)){if(_(e))return!!_(t)&&V(e.getTime(),t.getTime());if(k(e))return!!k(t)&&e.toString()==t.toString();if(C(e)||C(t)||E(e)||E(t)||Kr(t)||_(t)||k(t))return!1;i=he();for(r in e)if("$"!==r.charAt(0)&&!S(e[r])){if(!V(e[r],t[r]))return!1;i[r]=!0}for(r in t)if(!(r in i)&&"$"!==r.charAt(0)&&m(t[r])&&!S(t[r]))return!1;return!0}if(!Kr(t))return!1;if((n=e.length)==t.length){for(r=0;r<n;r++)if(!V(e[r],t[r]))return!1;return!0}}return!1}function z(e,t,n){return e.concat(zr.call(t,n))}function L(e,t){return zr.call(e,t||0)}function q(e,t){var n=arguments.length>2?L(arguments,2):[];return!S(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,z(n,arguments,0)):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function H(t,n){var r=n;return"string"==typeof t&&"$"===t.charAt(0)&&"$"===t.charAt(1)?r=void 0:E(n)?r="$WINDOW":n&&e.document===n?r="$DOCUMENT":C(n)&&(r="$SCOPE"),r}function B(e,t){if(!$(e))return x(t)||(t=t?2:null),JSON.stringify(e,H,t)}function W(e){return w(e)?JSON.parse(e):e}function G(e,t){e=e.replace(ti,"");var n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(n)?t:n}function X(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function K(e,t,n){n=n?-1:1;var r=e.getTimezoneOffset(),i=G(t,r);return X(e,n*(i-r))}function Y(e){e=Rr(e).clone();try{e.empty()}catch(t){}var n=Rr("<div>").append(e).html();try{return e[0].nodeType===si?Tr(n):n.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+Tr(t)})}catch(t){return Tr(n)}}function Z(e){try{return decodeURIComponent(e)}catch(t){}}function J(e){var t={};return r((e||"").split("&"),function(e){var n,r,i;e&&(r=e=e.replace(/\+/g,"%20"),n=e.indexOf("="),n!==-1&&(r=e.substring(0,n),i=e.substring(n+1)),r=Z(r),m(r)&&(i=!m(i)||Z(i),Pr.call(t,r)?Kr(t[r])?t[r].push(i):t[r]=[t[r],i]:t[r]=i))}),t}function Q(e){var t=[];return r(e,function(e,n){Kr(e)?r(e,function(e){t.push(te(n,!0)+(e===!0?"":"="+te(e,!0)))}):t.push(te(n,!0)+(e===!0?"":"="+te(e,!0)))}),t.length?t.join("&"):""}function ee(e){return te(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function te(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}function ne(e,t){var n,r,i=ni.length;for(r=0;r<i;++r)if(n=ni[r]+t,w(n=e.getAttribute(n)))return n;return null}function re(e,t){var n,i,o={};r(ni,function(t){var r=t+"app";!n&&e.hasAttribute&&e.hasAttribute(r)&&(n=e,i=e.getAttribute(r))}),r(ni,function(t){var r,o=t+"app";!n&&(r=e.querySelector("["+o.replace(":","\\:")+"]"))&&(n=r,i=r.getAttribute(o))}),n&&(o.strictDi=null!==ne(n,"strict-di"),t(n,i?[i]:[],o))}function ie(t,n,i){b(i)||(i={});var o={strictDi:!1};i=l(o,i);var a=function(){if(t=Rr(t),t.injector()){var r=t[0]===e.document?"document":Y(t);throw Wr("btstrpd","App already bootstrapped with this element '{0}'",r.replace(/</,"&lt;").replace(/>/,"&gt;"))}n=n||[],n.unshift(["$provide",function(e){e.value("$rootElement",t)}]),i.debugInfoEnabled&&n.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),n.unshift("ng");var o=rt(n,i.strictDi);return o.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,r){e.$apply(function(){t.data("$injector",r),n(t)(e)})}]),o},s=/^NG_ENABLE_DEBUG_INFO!/,u=/^NG_DEFER_BOOTSTRAP!/;return e&&s.test(e.name)&&(i.debugInfoEnabled=!0,e.name=e.name.replace(s,"")),e&&!u.test(e.name)?a():(e.name=e.name.replace(u,""),Gr.resumeBootstrap=function(e){return r(e,function(e){n.push(e)}),a()},void(S(Gr.resumeDeferredBootstrap)&&Gr.resumeDeferredBootstrap()))}function oe(){e.name="NG_ENABLE_DEBUG_INFO!"+e.name,e.location.reload()}function ae(e){var t=Gr.element(e).injector();if(!t)throw Wr("test","no injector found for element argument to getTestability");return t.get("$$testability")}function se(e,t){return t=t||"_",e.replace(ri,function(e,n){return(n?t:"")+e.toLowerCase()})}function ue(){var t;if(!ii){var n=ei();Ur=$(n)?e.jQuery:n?e[n]:void 0,Ur&&Ur.fn.on?(Rr=Ur,l(Ur.fn,{scope:Ei.scope,isolateScope:Ei.isolateScope,controller:Ei.controller,injector:Ei.injector,inheritedData:Ei.inheritedData}),t=Ur.cleanData,Ur.cleanData=function(e){for(var n,r,i=0;null!=(r=e[i]);i++)n=Ur._data(r,"events"),n&&n.$destroy&&Ur(r).triggerHandler("$destroy");t(e)}):Rr=Oe,Gr.element=Rr,ii=!0}}function le(e,t,n){if(!e)throw Wr("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function ce(e,t,n){return n&&Kr(e)&&(e=e[e.length-1]),le(S(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function fe(e,t){if("hasOwnProperty"===e)throw Wr("badname","hasOwnProperty is not a valid {0} name",t)}function de(e,t,n){if(!t)return e;for(var r,i=t.split("."),o=e,a=i.length,s=0;s<a;s++)r=i[s],e&&(e=(o=e)[r]);return!n&&S(e)?q(o,e):e}function pe(e){for(var t,n=e[0],r=e[e.length-1],i=1;n!==r&&(n=n.nextSibling);i++)(t||e[i]!==n)&&(t||(t=Rr(zr.call(e,0,i))),
3
- t.push(n));return t||e}function he(){return Object.create(null)}function ge(e){function n(e,t,n){return e[t]||(e[t]=n())}var r=t("$injector"),i=t("ng"),o=n(e,"angular",Object);return o.$$minErr=o.$$minErr||t,n(o,"module",function(){var e={};return function(t,o,a){var s=function(e,t){if("hasOwnProperty"===e)throw i("badname","hasOwnProperty is not a valid {0} name",t)};return s(t,"module"),o&&e.hasOwnProperty(t)&&(e[t]=null),n(e,t,function(){function e(e,t,n,r){return r||(r=i),function(){return r[n||"push"]([e,t,arguments]),c}}function n(e,n){return function(r,o){return o&&S(o)&&(o.$$moduleName=t),i.push([e,n,arguments]),c}}if(!o)throw r("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",t);var i=[],s=[],u=[],l=e("$injector","invoke","push",s),c={_invokeQueue:i,_configBlocks:s,_runBlocks:u,requires:o,name:t,provider:n("$provide","provider"),factory:n("$provide","factory"),service:n("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),decorator:n("$provide","decorator"),animation:n("$animateProvider","register"),filter:n("$filterProvider","register"),controller:n("$controllerProvider","register"),directive:n("$compileProvider","directive"),component:n("$compileProvider","component"),config:l,run:function(e){return u.push(e),this}};return a&&l(a),c})}})}function ve(e,t){if(Kr(e)){t=t||[];for(var n=0,r=e.length;n<r;n++)t[n]=e[n]}else if(b(e)){t=t||{};for(var i in e)"$"===i.charAt(0)&&"$"===i.charAt(1)||(t[i]=e[i])}return t||e}function $e(e){var t=[];return JSON.stringify(e,function(e,n){if(n=H(e,n),b(n)){if(t.indexOf(n)>=0)return"...";t.push(n)}return n})}function me(e){return"function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):$(e)?"undefined":"string"!=typeof e?$e(e):e}function be(n){l(n,{bootstrap:ie,copy:U,extend:l,merge:c,equals:V,element:Rr,forEach:r,injector:rt,noop:p,bind:q,toJson:B,fromJson:W,identity:h,isUndefined:$,isDefined:m,isString:w,isFunction:S,isObject:b,isNumber:x,isElement:F,isArray:Kr,version:fi,isDate:_,lowercase:Tr,uppercase:Dr,callbacks:{$$counter:0},getTestability:ae,$$minErr:t,$$csp:Qr,reloadWithDebugInfo:oe}),(Vr=ge(e))("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:kn}),e.provider("$compile",ht).directive({a:Fo,input:ea,textarea:ea,form:Vo,script:Ka,select:Ja,style:es,option:Qa,ngBind:ra,ngBindHtml:oa,ngBindTemplate:ia,ngClass:sa,ngClassEven:la,ngClassOdd:ua,ngCloak:ca,ngController:fa,ngForm:zo,ngHide:La,ngIf:ha,ngInclude:ga,ngInit:$a,ngNonBindable:Ta,ngPluralize:Ia,ngRepeat:Ra,ngShow:za,ngStyle:qa,ngSwitch:Ha,ngSwitchWhen:Ba,ngSwitchDefault:Wa,ngOptions:Na,ngTransclude:Xa,ngModel:Ma,ngList:ma,ngChange:aa,pattern:ns,ngPattern:ns,required:ts,ngRequired:ts,minlength:is,ngMinlength:is,maxlength:rs,ngMaxlength:rs,ngValue:na,ngModelOptions:Pa}).directive({ngInclude:va}).directive(No).directive(da),e.provider({$anchorScroll:it,$animate:Li,$animateCss:Bi,$$animateJs:Vi,$$animateQueue:zi,$$AnimateRunner:Hi,$$animateAsyncRun:qi,$browser:ct,$cacheFactory:ft,$controller:yt,$document:wt,$exceptionHandler:xt,$filter:Un,$$forceReflow:Zi,$interpolate:Nt,$interval:It,$http:Pt,$httpParamSerializer:St,$httpParamSerializerJQLike:kt,$httpBackend:Dt,$xhrFactory:Tt,$jsonpCallbacks:ao,$location:Jt,$log:Qt,$parse:bn,$rootScope:Sn,$q:yn,$$q:wn,$sce:On,$sceDelegate:An,$sniffer:Mn,$templateCache:dt,$templateRequest:jn,$$testability:Pn,$timeout:Tn,$window:Nn,$$rAF:_n,$$jqLite:Ye,$$HashMap:Mi,$$cookieReader:Rn})}])}function ye(){return++pi}function we(e){return e.replace(vi,function(e,t,n,r){return r?n.toUpperCase():n}).replace($i,"Moz$1")}function xe(e){return!wi.test(e)}function _e(e){var t=e.nodeType;return t===oi||!t||t===li}function Se(e){for(var t in di[e.ng339])return!0;return!1}function ke(e){for(var t=0,n=e.length;t<n;t++)Te(e[t])}function Ee(e,t){var n,i,o,a,s=t.createDocumentFragment(),u=[];if(xe(e))u.push(t.createTextNode(e));else{for(n=s.appendChild(t.createElement("div")),i=(xi.exec(e)||["",""])[1].toLowerCase(),o=Si[i]||Si._default,n.innerHTML=o[1]+e.replace(_i,"<$1></$2>")+o[2],a=o[0];a--;)n=n.lastChild;u=z(u,n.childNodes),n=s.firstChild,n.textContent=""}return s.textContent="",s.innerHTML="",r(u,function(e){s.appendChild(e)}),s}function Ce(t,n){n=n||e.document;var r;return(r=yi.exec(t))?[n.createElement(r[1])]:(r=Ee(t,n))?r.childNodes:[]}function Ae(e,t){var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)}function Oe(e){if(e instanceof Oe)return e;var t;if(w(e)&&(e=Zr(e),t=!0),!(this instanceof Oe)){if(t&&"<"!=e.charAt(0))throw bi("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new Oe(e)}t?Ue(this,Ce(e)):Ue(this,e)}function Me(e){return e.cloneNode(!0)}function je(e,t){if(t||Te(e),e.querySelectorAll)for(var n=e.querySelectorAll("*"),r=0,i=n.length;r<i;r++)Te(n[r])}function Pe(e,t,n,i){if(m(i))throw bi("offargs","jqLite#off() does not support the `selector` argument");var o=De(e),a=o&&o.events,s=o&&o.handle;if(s)if(t){var u=function(t){var r=a[t];m(n)&&R(r||[],n),m(n)&&r&&r.length>0||(gi(e,t,s),delete a[t])};r(t.split(" "),function(e){u(e),mi[e]&&u(mi[e])})}else for(t in a)"$destroy"!==t&&gi(e,t,s),delete a[t]}function Te(e,t){var n=e.ng339,r=n&&di[n];if(r){if(t)return void delete r.data[t];r.handle&&(r.events.$destroy&&r.handle({},"$destroy"),Pe(e)),delete di[n],e.ng339=void 0}}function De(e,t){var n=e.ng339,r=n&&di[n];return t&&!r&&(e.ng339=n=ye(),r=di[n]={events:{},data:{},handle:void 0}),r}function Fe(e,t,n){if(_e(e)){var r=m(n),i=!r&&t&&!b(t),o=!t,a=De(e,!i),s=a&&a.data;if(r)s[t]=n;else{if(o)return s;if(i)return s&&s[t];l(s,t)}}}function Ne(e,t){return!!e.getAttribute&&(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1}function Ie(e,t){t&&e.setAttribute&&r(t.split(" "),function(t){e.setAttribute("class",Zr((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Zr(t)+" "," ")))})}function Re(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");r(t.split(" "),function(e){e=Zr(e),n.indexOf(" "+e+" ")===-1&&(n+=e+" ")}),e.setAttribute("class",Zr(n))}}function Ue(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var n=t.length;if("number"==typeof n&&t.window!==t){if(n)for(var r=0;r<n;r++)e[e.length++]=t[r]}else e[e.length++]=t}}function Ve(e,t){return ze(e,"$"+(t||"ngController")+"Controller")}function ze(e,t,n){e.nodeType==li&&(e=e.documentElement);for(var r=Kr(t)?t:[t];e;){for(var i=0,o=r.length;i<o;i++)if(m(n=Rr.data(e,r[i])))return n;e=e.parentNode||e.nodeType===ci&&e.host}}function Le(e){for(je(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function qe(e,t){t||je(e);var n=e.parentNode;n&&n.removeChild(e)}function He(t,n){n=n||e,"complete"===n.document.readyState?n.setTimeout(t):Rr(n).on("load",t)}function Be(e,t){var n=Ci[t.toLowerCase()];return n&&Ai[I(e)]&&n}function We(e){return Oi[e]}function Ge(e,t){var n=function(n,r){n.isDefaultPrevented=function(){return n.defaultPrevented};var i=t[r||n.type],o=i?i.length:0;if(o){if($(n.immediatePropagationStopped)){var a=n.stopImmediatePropagation;n.stopImmediatePropagation=function(){n.immediatePropagationStopped=!0,n.stopPropagation&&n.stopPropagation(),a&&a.call(n)}}n.isImmediatePropagationStopped=function(){return n.immediatePropagationStopped===!0};var s=i.specialHandlerWrapper||Xe;o>1&&(i=ve(i));for(var u=0;u<o;u++)n.isImmediatePropagationStopped()||s(e,n,i[u])}};return n.elem=e,n}function Xe(e,t,n){n.call(e,t)}function Ke(e,t,n){var r=t.relatedTarget;r&&(r===e||ki.call(e,r))||n.call(e,t)}function Ye(){this.$get=function(){return l(Oe,{hasClass:function(e,t){return e.attr&&(e=e[0]),Ne(e,t)},addClass:function(e,t){return e.attr&&(e=e[0]),Re(e,t)},removeClass:function(e,t){return e.attr&&(e=e[0]),Ie(e,t)}})}}function Ze(e,t){var n=e&&e.$$hashKey;if(n)return"function"==typeof n&&(n=e.$$hashKey()),n;var r=typeof e;return n="function"==r||"object"==r&&null!==e?e.$$hashKey=r+":"+(t||a)():r+":"+e}function Je(e,t){if(t){var n=0;this.nextUid=function(){return++n}}r(e,this.put,this)}function Qe(e){return Function.prototype.toString.call(e)+" "}function et(e){var t=Qe(e).replace(Fi,""),n=t.match(ji)||t.match(Pi);return n}function tt(e){var t=et(e);return t?"function("+(t[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function nt(e,t,n){var i,o,a;if("function"==typeof e){if(!(i=e.$inject)){if(i=[],e.length){if(t)throw w(n)&&n||(n=e.name||tt(e)),Ni("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);o=et(e),r(o[1].split(Ti),function(e){e.replace(Di,function(e,t,n){i.push(n)})})}e.$inject=i}}else Kr(e)?(a=e.length-1,ce(e[a],"fn"),i=e.slice(0,a)):ce(e,"fn",!0);return i}function rt(e,t){function n(e){return function(t,n){return b(t)?void r(t,o(e)):e(t,n)}}function i(e,t){if(fe(e,"service"),(S(t)||Kr(t))&&(t=_.instantiate(t)),!t.$get)throw Ni("pget","Provider '{0}' must define $get factory method.",e);return x[e+v]=t}function a(e,t){return function(){var n=C.invoke(t,this);if($(n))throw Ni("undef","Provider '{0}' must return a value from $get factory method.",e);return n}}function s(e,t,n){return i(e,{$get:n!==!1?a(e,t):t})}function u(e,t){return s(e,["$injector",function(e){return e.instantiate(t)}])}function l(e,t){return s(e,g(t),!1)}function c(e,t){fe(e,"constant"),x[e]=t,k[e]=t}function f(e,t){var n=_.get(e+v),r=n.$get;n.$get=function(){var e=C.invoke(r,n);return C.invoke(t,null,{$delegate:e})}}function d(e){le($(e)||Kr(e),"modulesToLoad","not an array");var t,n=[];return r(e,function(e){function r(e){var t,n;for(t=0,n=e.length;t<n;t++){var r=e[t],i=_.get(r[0]);i[r[1]].apply(i,r[2])}}if(!y.get(e)){y.put(e,!0);try{w(e)?(t=Vr(e),n=n.concat(d(t.requires)).concat(t._runBlocks),r(t._invokeQueue),r(t._configBlocks)):S(e)?n.push(_.invoke(e)):Kr(e)?n.push(_.invoke(e)):ce(e,"module")}catch(i){throw Kr(e)&&(e=e[e.length-1]),i.message&&i.stack&&i.stack.indexOf(i.message)==-1&&(i=i.message+"\n"+i.stack),Ni("modulerr","Failed to instantiate module {0} due to:\n{1}",e,i.stack||i.message||i)}}}),n}function p(e,n){function r(t,r){if(e.hasOwnProperty(t)){if(e[t]===h)throw Ni("cdep","Circular dependency found: {0}",t+" <- "+m.join(" <- "));return e[t]}try{return m.unshift(t),e[t]=h,e[t]=n(t,r)}catch(i){throw e[t]===h&&delete e[t],i}finally{m.shift()}}function i(e,n,i){for(var o=[],a=rt.$$annotate(e,t,i),s=0,u=a.length;s<u;s++){var l=a[s];if("string"!=typeof l)throw Ni("itkn","Incorrect injection token! Expected service name as string, got {0}",l);o.push(n&&n.hasOwnProperty(l)?n[l]:r(l,i))}return o}function o(e){return!(Ir<=11)&&("function"==typeof e&&/^(?:class\b|constructor\()/.test(Qe(e)))}function a(e,t,n,r){"string"==typeof n&&(r=n,n=null);var a=i(e,n,r);return Kr(e)&&(e=e[e.length-1]),o(e)?(a.unshift(null),new(Function.prototype.bind.apply(e,a))):e.apply(t,a)}function s(e,t,n){var r=Kr(e)?e[e.length-1]:e,o=i(e,t,n);return o.unshift(null),new(Function.prototype.bind.apply(r,o))}return{invoke:a,instantiate:s,get:r,annotate:rt.$$annotate,has:function(t){return x.hasOwnProperty(t+v)||e.hasOwnProperty(t)}}}t=t===!0;var h={},v="Provider",m=[],y=new Je([],(!0)),x={$provide:{provider:n(i),factory:n(s),service:n(u),value:n(l),constant:n(c),decorator:f}},_=x.$injector=p(x,function(e,t){throw Gr.isString(t)&&m.push(t),Ni("unpr","Unknown provider: {0}",m.join(" <- "))}),k={},E=p(k,function(e,t){var n=_.get(e+v,t);return C.invoke(n.$get,n,void 0,e)}),C=E;x["$injector"+v]={$get:g(E)};var A=d(e);return C=E.get("$injector"),C.strictDi=t,r(A,function(e){e&&C.invoke(e)}),C}function it(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,r){function i(e){var t=null;return Array.prototype.some.call(e,function(e){if("a"===I(e))return t=e,!0}),t}function o(){var e=s.yOffset;if(S(e))e=e();else if(F(e)){var n=e[0],r=t.getComputedStyle(n);e="fixed"!==r.position?0:n.getBoundingClientRect().bottom}else x(e)||(e=0);return e}function a(e){if(e){e.scrollIntoView();var n=o();if(n){var r=e.getBoundingClientRect().top;t.scrollBy(0,r-n)}}else t.scrollTo(0,0)}function s(e){e=w(e)?e:n.hash();var t;e?(t=u.getElementById(e))?a(t):(t=i(u.getElementsByName(e)))?a(t):"top"===e&&a(null):a(null)}var u=t.document;return e&&r.$watch(function(){return n.hash()},function(e,t){e===t&&""===e||He(function(){r.$evalAsync(s)})}),s}]}function ot(e,t){return e||t?e?t?(Kr(e)&&(e=e.join(" ")),Kr(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function at(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.nodeType===Ri)return n}}function st(e){w(e)&&(e=e.split(" "));var t=he();return r(e,function(e){e.length&&(t[e]=!0)}),t}function ut(e){return b(e)?e:{}}function lt(e,t,n,i){function o(e){try{e.apply(null,L(arguments,1))}finally{if(m--,0===m)for(;b.length;)try{b.pop()()}catch(t){n.error(t)}}}function a(e){var t=e.indexOf("#");return t===-1?"":e.substr(t)}function s(){S=null,u(),l()}function u(){y=k(),y=$(y)?null:y,V(y,A)&&(y=A),A=y}function l(){x===c.url()&&w===y||(x=c.url(),w=y,r(E,function(e){e(c.url(),y)}))}var c=this,f=e.location,d=e.history,h=e.setTimeout,g=e.clearTimeout,v={};c.isMock=!1;var m=0,b=[];c.$$completeOutstandingRequest=o,c.$$incOutstandingRequestCount=function(){m++},c.notifyWhenNoOutstandingRequests=function(e){0===m?e():b.push(e)};var y,w,x=f.href,_=t.find("base"),S=null,k=i.history?function(){try{return d.state}catch(e){}}:p;u(),w=y,c.url=function(t,n,r){if($(r)&&(r=null),f!==e.location&&(f=e.location),d!==e.history&&(d=e.history),t){var o=w===r;if(x===t&&(!i.history||o))return c;var s=x&&qt(x)===qt(t);return x=t,w=r,!i.history||s&&o?(s||(S=t),n?f.replace(t):s?f.hash=a(t):f.href=t,f.href!==t&&(S=t)):(d[n?"replaceState":"pushState"](r,"",t),u(),w=y),S&&(S=t),c}return S||f.href.replace(/%27/g,"'")},c.state=function(){return y};var E=[],C=!1,A=null;c.onUrlChange=function(t){return C||(i.history&&Rr(e).on("popstate",s),Rr(e).on("hashchange",s),C=!0),E.push(t),t},c.$$applicationDestroyed=function(){Rr(e).off("hashchange popstate",s)},c.$$checkUrlChange=l,c.baseHref=function(){var e=_.attr("href");return e?e.replace(/^(https?\:)?\/\/[^\/]*/,""):""},c.defer=function(e,t){var n;return m++,n=h(function(){delete v[n],o(e)},t||0),v[n]=!0,n},c.defer.cancel=function(e){return!!v[e]&&(delete v[e],g(e),o(p),!0)}}function ct(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new lt(e,r,t,n)}]}function ft(){this.$get=function(){function e(e,r){function i(e){e!=d&&(p?p==e&&(p=e.n):p=e,o(e.n,e.p),o(e,d),d=e,d.n=null)}function o(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in n)throw t("$cacheFactory")("iid","CacheId '{0}' is already taken!",e);var a=0,s=l({},r,{id:e}),u=he(),c=r&&r.capacity||Number.MAX_VALUE,f=he(),d=null,p=null;return n[e]={put:function(e,t){if(!$(t)){if(c<Number.MAX_VALUE){var n=f[e]||(f[e]={key:e});i(n)}return e in u||a++,u[e]=t,a>c&&this.remove(p.key),t}},get:function(e){if(c<Number.MAX_VALUE){var t=f[e];if(!t)return;i(t)}return u[e]},remove:function(e){if(c<Number.MAX_VALUE){var t=f[e];if(!t)return;t==d&&(d=t.p),t==p&&(p=t.n),o(t.n,t.p),delete f[e]}e in u&&(delete u[e],a--)},removeAll:function(){u=he(),a=0,f=he(),d=p=null},destroy:function(){u=null,s=null,f=null,delete n[e]},info:function(){return l({},s,{size:a})}}}var n={};return e.info=function(){var e={};return r(n,function(t,n){e[n]=t.info()}),e},e.get=function(e){return n[e]},e}}function dt(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function pt(){}function ht(t,n){function i(e,t,n){var i=/^\s*([@&<]|=(\*?))(\??)\s*(\w*)\s*$/,o=he();return r(e,function(e,r){if(e in E)return void(o[r]=E[e]);var a=e.match(i);if(!a)throw Wi("iscp","Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}",t,r,e,n?"controller bindings definition":"isolate scope definition");o[r]={mode:a[1][0],collection:"*"===a[2],optional:"?"===a[3],attrName:a[4]||r},a[4]&&(E[e]=o[r])}),o}function a(e,t){var n={isolateScope:null,bindToController:null};if(b(e.scope)&&(e.bindToController===!0?(n.bindToController=i(e.scope,t,!0),n.isolateScope={}):n.isolateScope=i(e.scope,t,!1)),b(e.bindToController)&&(n.bindToController=i(e.bindToController,t,!0)),b(n.bindToController)){var r=e.controller,o=e.controllerAs;if(!r)throw Wi("noctrl","Cannot bind to controller without directive '{0}'s controller.",t);if(!bt(r,o))throw Wi("noident","Cannot bind to controller without identifier for directive '{0}'.",t)}return n}function s(e){var t=e.charAt(0);if(!t||t!==Tr(t))throw Wi("baddir","Directive/Component name '{0}' is invalid. The first character must be a lowercase letter",e);if(e!==e.trim())throw Wi("baddir","Directive/Component name '{0}' is invalid. The name should not contain leading or trailing whitespaces",e)}function u(e){var t=e.require||e.controller&&e.name;return!Kr(t)&&b(t)&&r(t,function(e,n){var r=e.match(_),i=e.substring(r[0].length);i||(t[n]=r[0]+n)}),t}var c={},f="Directive",v=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,y=/(([\w\-]+)(?:\:([^;]+))?;?)/,x=N("ngSrc,ngSrcset,src,srcset"),_=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,k=/^(on[a-z]+|formaction)$/,E=he();this.directive=function M(e,n){return fe(e,"directive"),w(e)?(s(e),le(n,"directiveFactory"),c.hasOwnProperty(e)||(c[e]=[],t.factory(e+f,["$injector","$exceptionHandler",function(t,n){var i=[];return r(c[e],function(r,o){try{var a=t.invoke(r);S(a)?a={compile:g(a)}:!a.compile&&a.link&&(a.compile=g(a.link)),a.priority=a.priority||0,a.index=o,a.name=a.name||e,a.require=u(a),a.restrict=a.restrict||"EA",a.$$moduleName=r.$$moduleName,i.push(a)}catch(s){n(s)}}),i}])),c[e].push(n)):r(e,o(M)),this},this.component=function(e,t){function n(e){function n(t){return S(t)||Kr(t)?function(n,r){return e.invoke(t,this,{$element:n,$attrs:r})}:t}var o=t.template||t.templateUrl?t.template:"",a={controller:i,controllerAs:bt(t.controller)||t.controllerAs||"$ctrl",template:n(o),templateUrl:n(t.templateUrl),transclude:t.transclude,scope:{},bindToController:t.bindings||{},restrict:"E",require:t.require};return r(t,function(e,t){"$"===t.charAt(0)&&(a[t]=e)}),a}var i=t.controller||function(){};return r(t,function(e,t){"$"===t.charAt(0)&&(n[t]=e,S(i)&&(i[t]=e))}),n.$inject=["$injector"],this.directive(e,n)},this.aHrefSanitizationWhitelist=function(e){return m(e)?(n.aHrefSanitizationWhitelist(e),this):n.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(e){return m(e)?(n.imgSrcSanitizationWhitelist(e),this):n.imgSrcSanitizationWhitelist()};var A=!0;this.debugInfoEnabled=function(e){return m(e)?(A=e,this):A};var O=10;this.onChangesTtl=function(e){return arguments.length?(O=e,this):O},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate","$$sanitizeUri",function(t,n,i,o,s,u,g,E,M,P){function T(){try{if(!--_e)throw be=void 0,Wi("infchng","{0} $onChanges() iterations reached. Aborting!\n",O);g.$apply(function(){for(var e=[],t=0,n=be.length;t<n;++t)try{be[t]()}catch(r){e.push(r)}if(be=void 0,e.length)throw e})}finally{_e++}}function D(e,t){if(t){var n,r,i,o=Object.keys(t);for(n=0,r=o.length;n<r;n++)i=o[n],this[i]=t[i]}else this.$attr={};this.$$element=e}function F(e,t,n){we.innerHTML="<span "+t+">";var r=we.firstChild.attributes,i=r[0];r.removeNamedItem(i.name),i.value=n,e.attributes.setNamedItem(i)}function N(e,t){try{e.addClass(t)}catch(n){}}function U(t,n,r,i,o){t instanceof Rr||(t=Rr(t));for(var a=/\S+/,s=0,u=t.length;s<u;s++){var l=t[s];l.nodeType===si&&l.nodeValue.match(a)&&Ae(l,t[s]=e.document.createElement("span"))}var c=H(t,n,t,r,i,o);U.$$addScopeClass(t);var f=null;return function(e,n,r){le(e,"scope"),o&&o.needsNewScope&&(e=e.$parent.$new()),r=r||{};var i=r.parentBoundTranscludeFn,a=r.transcludeControllers,s=r.futureParentElement;i&&i.$$boundTransclude&&(i=i.$$boundTransclude),f||(f=z(s));var u;if(u="html"!==f?Rr(fe(f,Rr("<div>").append(t).html())):n?Ei.clone.call(t):t,a)for(var l in a)u.data("$"+l+"Controller",a[l].instance);return U.$$addScopeInfo(u,e),n&&n(u,e),c&&c(e,u,u,i),u}}function z(e){var t=e&&e[0];return t&&"foreignobject"!==I(t)&&Hr.call(t).match(/SVG/)?"svg":"html"}function H(e,t,n,r,i,o){function a(e,n,r,i){var o,a,s,u,l,c,f,d,g;if(p){var v=n.length;for(g=new Array(v),l=0;l<h.length;l+=3)f=h[l],g[f]=n[f]}else g=n;for(l=0,c=h.length;l<c;)s=g[h[l++]],o=h[l++],a=h[l++],o?(o.scope?(u=e.$new(),U.$$addScopeInfo(Rr(s),u)):u=e,d=o.transcludeOnThisElement?B(e,o.transclude,i):!o.templateOnThisElement&&i?i:!i&&t?B(e,t):null,o(a,u,s,r,d)):a&&a(e,s.childNodes,void 0,i)}for(var s,u,l,c,f,d,p,h=[],g=0;g<e.length;g++)s=new D,u=W(e[g],[],s,0===g?r:void 0,i),l=u.length?J(u,e[g],s,t,n,null,[],[],o):null,l&&l.scope&&U.$$addScopeClass(s.$$element),f=l&&l.terminal||!(c=e[g].childNodes)||!c.length?null:H(c,l?(l.transcludeOnThisElement||!l.templateOnThisElement)&&l.transclude:t),(l||f)&&(h.push(g,l,f),d=!0,p=p||l),o=null;return d?a:null}function B(e,t,n){function r(r,i,o,a,s){return r||(r=e.$new(!1,s),r.$$transcluded=!0),t(r,i,{parentBoundTranscludeFn:n,transcludeControllers:o,futureParentElement:a})}var i=r.$$slots=he();for(var o in t.$$slots)t.$$slots[o]?i[o]=B(e,t.$$slots[o],n):i[o]=null;return r}function W(e,t,n,r,i){var o,a,s=e.nodeType,u=n.$attr;switch(s){case oi:ne(t,vt(I(e)),"E",r,i);for(var l,c,f,d,p,h,g=e.attributes,v=0,$=g&&g.length;v<$;v++){var m=!1,x=!1;l=g[v],c=l.name,p=Zr(l.value),d=vt(c),(h=Ce.test(d))&&(c=c.replace(Xi,"").substr(8).replace(/_(.)/g,function(e,t){return t.toUpperCase()}));var _=d.match(Oe);_&&re(_[1])&&(m=c,x=c.substr(0,c.length-5)+"end",c=c.substr(0,c.length-6)),f=vt(c.toLowerCase()),u[f]=c,!h&&n.hasOwnProperty(f)||(n[f]=p,Be(e,f)&&(n[f]=!0)),pe(e,t,p,f,h),ne(t,f,"A",r,i,m,x)}if(a=e.className,b(a)&&(a=a.animVal),w(a)&&""!==a)for(;o=y.exec(a);)f=vt(o[2]),ne(t,f,"C",r,i)&&(n[f]=Zr(o[3])),a=a.substr(o.index+o[0].length);break;case si:if(11===Ir)for(;e.parentNode&&e.nextSibling&&e.nextSibling.nodeType===si;)e.nodeValue=e.nodeValue+e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);ce(t,e.nodeValue);break;case ui:G(e,t,n,r,i)}return t.sort(ae),t}function G(e,t,n,r,i){try{var o=v.exec(e.nodeValue);if(o){var a=vt(o[1]);ne(t,a,"M",r,i)&&(n[a]=Zr(o[2]))}}catch(s){}}function X(e,t,n){var r=[],i=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw Wi("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);e.nodeType==oi&&(e.hasAttribute(t)&&i++,e.hasAttribute(n)&&i--),r.push(e),e=e.nextSibling}while(i>0)}else r.push(e);return Rr(r)}function K(e,t,n){return function(r,i,o,a,s){return i=X(i[0],t,n),e(r,i,o,a,s)}}function Z(e,t,n,r,i,o){var a;return e?U(t,n,r,i,o):function(){return a||(a=U(t,n,r,i,o),t=n=o=null),a.apply(this,arguments)}}function J(e,t,n,o,a,s,u,c,f){function d(e,t,n,r){e&&(n&&(e=K(e,n,r)),e.require=h.require,e.directiveName=g,(k===h||h.$$isolateScope)&&(e=ve(e,{isolateScope:!0})),u.push(e)),t&&(n&&(t=K(t,n,r)),t.require=h.require,t.directiveName=g,(k===h||h.$$isolateScope)&&(t=ve(t,{isolateScope:!0})),c.push(t))}function p(e,o,a,s,f){function d(e,t,n,r){var i;if(C(e)||(r=n,n=t,t=e,e=void 0),j&&(i=y),n||(n=j?A.parent():A),!r)return f(e,t,i,n,R);var o=f.$$slots[r];if(o)return o(e,t,i,n,R);if($(o))throw Wi("noslot",'No parent directive that requires a transclusion with slot name "{0}". Element: {1}',r,Y(A))}var p,h,g,v,m,y,w,A,O,M;t===a?(O=n,A=n.$$element):(A=Rr(a),O=new D(A,n)),m=o,k?v=o.$new(!0):x&&(m=o.$parent),f&&(w=d,w.$$boundTransclude=f,w.isSlotFilled=function(e){return!!f.$$slots[e]}),_&&(y=ee(A,O,w,_,v,o,k)),k&&(U.$$addScopeInfo(A,v,!0,!(E&&(E===k||E===k.$$originalDirective))),U.$$addScopeClass(A,!0),v.$$isolateBindings=k.$$isolateBindings,M=me(o,O,v,v.$$isolateBindings,k),M.removeWatches&&v.$on("$destroy",M.removeWatches));for(var P in y){var T=_[P],F=y[P],N=T.$$bindings.bindToController;F.identifier&&N?F.bindingInfo=me(m,O,F.instance,N,T):F.bindingInfo={};var I=F();I!==F.instance&&(F.instance=I,A.data("$"+T.name+"Controller",I),F.bindingInfo.removeWatches&&F.bindingInfo.removeWatches(),F.bindingInfo=me(m,O,F.instance,N,T))}for(r(_,function(e,t){var n=e.require;e.bindToController&&!Kr(n)&&b(n)&&l(y[t].instance,Q(t,n,A,y))}),r(y,function(e){var t=e.instance;if(S(t.$onChanges))try{t.$onChanges(e.bindingInfo.initialChanges)}catch(n){i(n)}if(S(t.$onInit))try{t.$onInit()}catch(n){i(n)}S(t.$doCheck)&&(m.$watch(function(){t.$doCheck()}),t.$doCheck()),S(t.$onDestroy)&&m.$on("$destroy",function(){t.$onDestroy()})}),p=0,h=u.length;p<h;p++)g=u[p],$e(g,g.isolateScope?v:o,A,O,g.require&&Q(g.directiveName,g.require,A,y),w);var R=o;for(k&&(k.template||null===k.templateUrl)&&(R=v),e&&e(R,a.childNodes,void 0,f),p=c.length-1;p>=0;p--)g=c[p],$e(g,g.isolateScope?v:o,A,O,g.require&&Q(g.directiveName,g.require,A,y),w);r(y,function(e){var t=e.instance;S(t.$postLink)&&t.$postLink()})}f=f||{};for(var h,g,v,m,y,w=-Number.MAX_VALUE,x=f.newScopeDirective,_=f.controllerDirectives,k=f.newIsolateScopeDirective,E=f.templateDirective,A=f.nonTlbTranscludeDirective,O=!1,M=!1,j=f.hasElementTranscludeDirective,P=n.$$element=Rr(t),T=s,F=o,N=!1,R=!1,V=0,z=e.length;V<z;V++){h=e[V];var H=h.$$start,B=h.$$end;if(H&&(P=X(t,H,B)),v=void 0,w>h.priority)break;if((y=h.scope)&&(h.templateUrl||(b(y)?(ue("new/isolated scope",k||x,h,P),k=h):ue("new/isolated scope",k,h,P)),x=x||h),g=h.name,!N&&(h.replace&&(h.templateUrl||h.template)||h.transclude&&!h.$$tlb)){for(var G,J=V+1;G=e[J++];)if(G.transclude&&!G.$$tlb||G.replace&&(G.templateUrl||G.template)){R=!0;break}N=!0}if(!h.templateUrl&&h.controller&&(y=h.controller,_=_||he(),ue("'"+g+"' controller",_[g],h,P),_[g]=h),y=h.transclude)if(O=!0,h.$$tlb||(ue("transclusion",A,h,P),A=h),"element"==y)j=!0,w=h.priority,v=P,P=n.$$element=Rr(U.$$createComment(g,n[g])),t=P[0],ge(a,L(v),t),v[0].$$parentNode=v[0].parentNode,F=Z(R,v,o,w,T&&T.name,{nonTlbTranscludeDirective:A});else{var ne=he();if(v=Rr(Me(t)).contents(),b(y)){v=[];var re=he(),ae=he();r(y,function(e,t){var n="?"===e.charAt(0);e=n?e.substring(1):e,re[e]=t,ne[t]=null,ae[t]=n}),r(P.contents(),function(e){var t=re[vt(I(e))];t?(ae[t]=!0,ne[t]=ne[t]||[],ne[t].push(e)):v.push(e)}),r(ae,function(e,t){if(!e)throw Wi("reqslot","Required transclusion slot `{0}` was not filled.",t)});for(var se in ne)ne[se]&&(ne[se]=Z(R,ne[se],o))}P.empty(),F=Z(R,v,o,void 0,void 0,{needsNewScope:h.$$isolateScope||h.$$newScope}),F.$$slots=ne}if(h.template)if(M=!0,ue("template",E,h,P),E=h,y=S(h.template)?h.template(P,n):h.template,y=Ee(y),h.replace){if(T=h,v=xe(y)?[]:mt(fe(h.templateNamespace,Zr(y))),t=v[0],1!=v.length||t.nodeType!==oi)throw Wi("tplrt","Template for directive '{0}' must have exactly one root element. {1}",g,"");ge(a,P,t);var le={$attr:{}},ce=W(t,[],le),de=e.splice(V+1,e.length-(V+1));(k||x)&&te(ce,k,x),e=e.concat(ce).concat(de),ie(n,le),z=e.length}else P.html(y);if(h.templateUrl)M=!0,ue("template",E,h,P),E=h,h.replace&&(T=h),p=oe(e.splice(V,e.length-V),P,n,a,O&&F,u,c,{controllerDirectives:_,newScopeDirective:x!==h&&x,newIsolateScopeDirective:k,templateDirective:E,nonTlbTranscludeDirective:A}),z=e.length;else if(h.compile)try{m=h.compile(P,n,F);var pe=h.$$originalDirective||h;S(m)?d(null,q(pe,m),H,B):m&&d(q(pe,m.pre),q(pe,m.post),H,B)}catch(be){i(be,Y(P))}h.terminal&&(p.terminal=!0,w=Math.max(w,h.priority))}return p.scope=x&&x.scope===!0,p.transcludeOnThisElement=O,p.templateOnThisElement=M,p.transclude=F,f.hasElementTranscludeDirective=j,p}function Q(e,t,n,i){var o;if(w(t)){var a=t.match(_),s=t.substring(a[0].length),u=a[1]||a[3],l="?"===a[2];if("^^"===u?n=n.parent():(o=i&&i[s],o=o&&o.instance),!o){var c="$"+s+"Controller";o=u?n.inheritedData(c):n.data(c)}if(!o&&!l)throw Wi("ctreq","Controller '{0}', required by directive '{1}', can't be found!",s,e)}else if(Kr(t)){o=[];for(var f=0,d=t.length;f<d;f++)o[f]=Q(e,t[f],n,i)}else b(t)&&(o={},r(t,function(t,r){o[r]=Q(e,t,n,i)}));return o||null}function ee(e,t,n,r,i,o,a){var s=he();for(var l in r){var c=r[l],f={$scope:c===a||c.$$isolateScope?i:o,$element:e,$attrs:t,$transclude:n},d=c.controller;"@"==d&&(d=t[c.name]);var p=u(d,f,!0,c.controllerAs);s[c.name]=p,e.data("$"+c.name+"Controller",p.instance)}return s}function te(e,t,n){for(var r=0,i=e.length;r<i;r++)e[r]=d(e[r],{$$isolateScope:t,$$newScope:n})}function ne(e,n,r,o,s,u,l){if(n===s)return null;var p=null;if(c.hasOwnProperty(n))for(var h,g=t.get(n+f),v=0,m=g.length;v<m;v++)try{if(h=g[v],($(o)||o>h.priority)&&h.restrict.indexOf(r)!=-1){if(u&&(h=d(h,{$$start:u,$$end:l})),!h.$$bindings){var y=h.$$bindings=a(h,h.name);b(y.isolateScope)&&(h.$$isolateBindings=y.isolateScope)}e.push(h),p=h}}catch(w){i(w)}return p}function re(e){if(c.hasOwnProperty(e))for(var n,r=t.get(e+f),i=0,o=r.length;i<o;i++)if(n=r[i],n.multiElement)return!0;return!1}function ie(e,t){var n=t.$attr,i=e.$attr;e.$$element;r(e,function(r,i){"$"!=i.charAt(0)&&(t[i]&&t[i]!==r&&(r+=("style"===i?";":" ")+t[i]),e.$set(i,r,!0,n[i]))}),r(t,function(t,r){e.hasOwnProperty(r)||"$"===r.charAt(0)||(e[r]=t,"class"!==r&&"style"!==r&&(i[r]=n[r]))})}function oe(e,t,n,i,a,s,u,l){var c,f,p=[],h=t[0],g=e.shift(),v=d(g,{templateUrl:null,transclude:null,replace:null,$$originalDirective:g}),$=S(g.templateUrl)?g.templateUrl(t,n):g.templateUrl,m=g.templateNamespace;return t.empty(),o($).then(function(o){var d,y,w,x;if(o=Ee(o),g.replace){if(w=xe(o)?[]:mt(fe(m,Zr(o))),d=w[0],1!=w.length||d.nodeType!==oi)throw Wi("tplrt","Template for directive '{0}' must have exactly one root element. {1}",g.name,$);y={$attr:{}},ge(i,t,d);var _=W(d,[],y);b(g.scope)&&te(_,!0),e=_.concat(e),ie(n,y)}else d=h,t.html(o);for(e.unshift(v),c=J(e,d,n,a,t,g,s,u,l),r(i,function(e,n){e==d&&(i[n]=t[0])}),f=H(t[0].childNodes,a);p.length;){var S=p.shift(),k=p.shift(),E=p.shift(),C=p.shift(),A=t[0];if(!S.$$destroyed){if(k!==h){var O=k.className;l.hasElementTranscludeDirective&&g.replace||(A=Me(d)),ge(E,Rr(k),A),N(Rr(A),O)}x=c.transcludeOnThisElement?B(S,c.transclude,C):C,c(f,S,A,i,x)}}p=null}),function(e,t,n,r,i){var o=i;t.$$destroyed||(p?p.push(t,n,r,o):(c.transcludeOnThisElement&&(o=B(t,c.transclude,i)),c(f,t,n,r,o)))}}function ae(e,t){var n=t.priority-e.priority;return 0!==n?n:e.name!==t.name?e.name<t.name?-1:1:e.index-t.index}function ue(e,t,n,r){function i(e){return e?" (module: "+e+")":""}if(t)throw Wi("multidir","Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}",t.name,i(t.$$moduleName),n.name,i(n.$$moduleName),e,Y(r))}function ce(e,t){var r=n(t,!0);r&&e.push({priority:0,compile:function(e){var t=e.parent(),n=!!t.length;return n&&U.$$addBindingClass(t),function(e,t){var i=t.parent();n||U.$$addBindingClass(i),U.$$addBindingInfo(i,r.expressions),e.$watch(r,function(e){t[0].nodeValue=e})}}})}function fe(t,n){switch(t=Tr(t||"html")){case"svg":case"math":var r=e.document.createElement("div");return r.innerHTML="<"+t+">"+n+"</"+t+">",r.childNodes[0].childNodes;default:return n}}function de(e,t){if("srcdoc"==t)return E.HTML;var n=I(e);return"xlinkHref"==t||"form"==n&&"action"==t||"img"!=n&&("src"==t||"ngSrc"==t)?E.RESOURCE_URL:void 0}function pe(e,t,r,i,o){var a=de(e,i);o=x[i]||o;var s=n(r,!0,a,o);if(s){if("multiple"===i&&"select"===I(e))throw Wi("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",Y(e));t.push({priority:100,compile:function(){return{pre:function(e,t,u){var l=u.$$observers||(u.$$observers=he());if(k.test(i))throw Wi("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var c=u[i];c!==r&&(s=c&&n(c,!0,a,o),r=c),s&&(u[i]=s(e),(l[i]||(l[i]=[])).$$inter=!0,(u.$$observers&&u.$$observers[i].$$scope||e).$watch(s,function(e,t){"class"===i&&e!=t?u.$updateClass(e,t):u.$set(i,e)}))}}}})}}function ge(t,n,r){var i,o,a=n[0],s=n.length,u=a.parentNode;if(t)for(i=0,o=t.length;i<o;i++)if(t[i]==a){t[i++]=r;for(var l=i,c=l+s-1,f=t.length;l<f;l++,c++)c<f?t[l]=t[c]:delete t[l];t.length-=s-1,t.context===a&&(t.context=r);break}u&&u.replaceChild(r,a);var d=e.document.createDocumentFragment();for(i=0;i<s;i++)d.appendChild(n[i]);for(Rr.hasData(a)&&(Rr.data(r,Rr.data(a)),Rr(a).off("$destroy")),Rr.cleanData(d.querySelectorAll("*")),
4
- i=1;i<s;i++)delete n[i];n[0]=r,n.length=1}function ve(e,t){return l(function(){return e.apply(null,arguments)},e,t)}function $e(e,t,n,r,o,a){try{e(t,n,r,o,a)}catch(s){i(s,Y(n))}}function me(e,t,i,o,a){function u(t,n,r){S(i.$onChanges)&&n!==r&&(be||(e.$$postDigest(T),be=[]),c||(c={},be.push(l)),c[t]&&(r=c[t].previousValue),c[t]=new gt(r,n))}function l(){i.$onChanges(c),c=void 0}var c,f=[],d={};return r(o,function(r,o){var l,c,h,g,v,$=r.attrName,m=r.optional,b=r.mode;switch(b){case"@":m||Pr.call(t,$)||(i[o]=t[$]=void 0),t.$observe($,function(e){if(w(e)||j(e)){var t=i[o];u(o,e,t),i[o]=e}}),t.$$observers[$].$$scope=e,l=t[$],w(l)?i[o]=n(l)(e):j(l)&&(i[o]=l),d[o]=new gt(Gi,i[o]);break;case"=":if(!Pr.call(t,$)){if(m)break;t[$]=void 0}if(m&&!t[$])break;c=s(t[$]),g=c.literal?V:function(e,t){return e===t||e!==e&&t!==t},h=c.assign||function(){throw l=i[o]=c(e),Wi("nonassign","Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",t[$],$,a.name)},l=i[o]=c(e);var y=function(t){return g(t,i[o])||(g(t,l)?h(e,t=i[o]):i[o]=t),l=t};y.$stateful=!0,v=r.collection?e.$watchCollection(t[$],y):e.$watch(s(t[$],y),null,c.literal),f.push(v);break;case"<":if(!Pr.call(t,$)){if(m)break;t[$]=void 0}if(m&&!t[$])break;c=s(t[$]);var x=i[o]=c(e);d[o]=new gt(Gi,i[o]),v=e.$watch(c,function(e,t){if(t===e){if(t===x)return;t=x}u(o,e,t),i[o]=e},c.literal),f.push(v);break;case"&":if(c=t.hasOwnProperty($)?s(t[$]):p,c===p&&m)break;i[o]=function(t){return c(e,t)}}}),{initialChanges:d,removeWatches:f.length&&function(){for(var e=0,t=f.length;e<t;++e)f[e]()}}}var be,ye=/^\w/,we=e.document.createElement("div"),_e=O;D.prototype={$normalize:vt,$addClass:function(e){e&&e.length>0&&M.addClass(this.$$element,e)},$removeClass:function(e){e&&e.length>0&&M.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=$t(e,t);n&&n.length&&M.addClass(this.$$element,n);var r=$t(t,e);r&&r.length&&M.removeClass(this.$$element,r)},$set:function(e,t,n,o){var a,s=this.$$element[0],u=Be(s,e),l=We(e),c=e;if(u?(this.$$element.prop(e,t),o=u):l&&(this[l]=t,c=l),this[e]=t,o?this.$attr[e]=o:(o=this.$attr[e],o||(this.$attr[e]=o=se(e,"-"))),a=I(this.$$element),"a"===a&&("href"===e||"xlinkHref"===e)||"img"===a&&"src"===e)this[e]=t=P(t,"src"===e);else if("img"===a&&"srcset"===e&&m(t)){for(var f="",d=Zr(t),p=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,h=/\s/.test(d)?p:/(,)/,g=d.split(h),v=Math.floor(g.length/2),b=0;b<v;b++){var y=2*b;f+=P(Zr(g[y]),!0),f+=" "+Zr(g[y+1])}var w=Zr(g[2*b]).split(/\s/);f+=P(Zr(w[0]),!0),2===w.length&&(f+=" "+Zr(w[1])),this[e]=t=f}n!==!1&&(null===t||$(t)?this.$$element.removeAttr(o):ye.test(o)?this.$$element.attr(o,t):F(this.$$element[0],o,t));var x=this.$$observers;x&&r(x[c],function(e){try{e(t)}catch(n){i(n)}})},$observe:function(e,t){var n=this,r=n.$$observers||(n.$$observers=he()),i=r[e]||(r[e]=[]);return i.push(t),g.$evalAsync(function(){i.$$inter||!n.hasOwnProperty(e)||$(n[e])||t(n[e])}),function(){R(i,t)}}};var Se=n.startSymbol(),ke=n.endSymbol(),Ee="{{"==Se&&"}}"==ke?h:function(e){return e.replace(/\{\{/g,Se).replace(/}}/g,ke)},Ce=/^ngAttr[A-Z]/,Oe=/^(.+)Start$/;return U.$$addBindingInfo=A?function(e,t){var n=e.data("$binding")||[];Kr(t)?n=n.concat(t):n.push(t),e.data("$binding",n)}:p,U.$$addBindingClass=A?function(e){N(e,"ng-binding")}:p,U.$$addScopeInfo=A?function(e,t,n,r){var i=n?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(i,t)}:p,U.$$addScopeClass=A?function(e,t){N(e,t?"ng-isolate-scope":"ng-scope")}:p,U.$$createComment=function(t,n){var r="";return A&&(r=" "+(t||"")+": ",n&&(r+=n+" ")),e.document.createComment(r)},U}]}function gt(e,t){this.previousValue=e,this.currentValue=t}function vt(e){return we(e.replace(Xi,""))}function $t(e,t){var n="",r=e.split(/\s+/),i=t.split(/\s+/);e:for(var o=0;o<r.length;o++){for(var a=r[o],s=0;s<i.length;s++)if(a==i[s])continue e;n+=(n.length>0?" ":"")+a}return n}function mt(e){e=Rr(e);var t=e.length;if(t<=1)return e;for(;t--;){var n=e[t];n.nodeType===ui&&Lr.call(e,t,1)}return e}function bt(e,t){if(t&&w(t))return t;if(w(e)){var n=Yi.exec(e);if(n)return n[3]}}function yt(){var e={},n=!1;this.has=function(t){return e.hasOwnProperty(t)},this.register=function(t,n){fe(t,"controller"),b(t)?l(e,t):e[t]=n},this.allowGlobals=function(){n=!0},this.$get=["$injector","$window",function(r,i){function o(e,n,r,i){if(!e||!b(e.$scope))throw t("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",i,n);e.$scope[n]=r}return function(t,a,s,u){var c,f,d,p;if(s=s===!0,u&&w(u)&&(p=u),w(t)){if(f=t.match(Yi),!f)throw Ki("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",t);d=f[1],p=p||f[3],t=e.hasOwnProperty(d)?e[d]:de(a.$scope,d,!0)||(n?de(i,d,!0):void 0),ce(t,d,!0)}if(s){var h=(Kr(t)?t[t.length-1]:t).prototype;c=Object.create(h||null),p&&o(a,p,c,d||t.name);var g;return g=l(function(){var e=r.invoke(t,c,a,d);return e!==c&&(b(e)||S(e))&&(c=e,p&&o(a,p,c,d||t.name)),c},{instance:c,identifier:p})}return c=r.instantiate(t,a,d),p&&o(a,p,c,d||t.name),c}}]}function wt(){this.$get=["$window",function(e){return Rr(e.document)}]}function xt(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function _t(e){return b(e)?_(e)?e.toISOString():B(e):e}function St(){this.$get=function(){return function(e){if(!e)return"";var t=[];return i(e,function(e,n){null===e||$(e)||(Kr(e)?r(e,function(e){t.push(te(n)+"="+te(_t(e)))}):t.push(te(n)+"="+te(_t(e))))}),t.join("&")}}}function kt(){this.$get=function(){return function(e){function t(e,o,a){null===e||$(e)||(Kr(e)?r(e,function(e,n){t(e,o+"["+(b(e)?n:"")+"]")}):b(e)&&!_(e)?i(e,function(e,n){t(e,o+(a?"":"[")+n+(a?"":"]"))}):n.push(te(o)+"="+te(_t(e))))}if(!e)return"";var n=[];return t(e,"",!0),n.join("&")}}}function Et(e,t){if(w(e)){var n=e.replace(no,"").trim();if(n){var r=t("Content-Type");(r&&0===r.indexOf(Ji)||Ct(n))&&(e=W(n))}}return e}function Ct(e){var t=e.match(eo);return t&&to[t[0]].test(e)}function At(e){function t(e,t){e&&(i[e]=i[e]?i[e]+", "+t:t)}var n,i=he();return w(e)?r(e.split("\n"),function(e){n=e.indexOf(":"),t(Tr(Zr(e.substr(0,n))),Zr(e.substr(n+1)))}):b(e)&&r(e,function(e,n){t(Tr(n),Zr(e))}),i}function Ot(e){var t;return function(n){if(t||(t=At(e)),n){var r=t[Tr(n)];return void 0===r&&(r=null),r}return t}}function Mt(e,t,n,i){return S(i)?i(e,t,n):(r(i,function(r){e=r(e,t,n)}),e)}function jt(e){return 200<=e&&e<300}function Pt(){var e=this.defaults={transformResponse:[Et],transformRequest:[function(e){return!b(e)||A(e)||M(e)||O(e)?e:B(e)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ve(Qi),put:ve(Qi),patch:ve(Qi)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},n=!1;this.useApplyAsync=function(e){return m(e)?(n=!!e,this):n};var i=!0;this.useLegacyPromiseExtensions=function(e){return m(e)?(i=!!e,this):i};var o=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(a,s,u,c,f,d){function p(n){function o(e,t){for(var n=0,r=t.length;n<r;){var i=t[n++],o=t[n++];e=e.then(i,o)}return t.length=0,e}function a(e,t){var n,i={};return r(e,function(e,r){S(e)?(n=e(t),null!=n&&(i[r]=n)):i[r]=e}),i}function s(t){var n,r,i,o=e.headers,s=l({},t.headers);o=l({},o.common,o[Tr(t.method)]);e:for(n in o){r=Tr(n);for(i in s)if(Tr(i)===r)continue e;s[n]=o[n]}return a(s,ve(t))}function u(t){var n=t.headers,i=Mt(t.data,Ot(n),void 0,t.transformRequest);return $(i)&&r(n,function(e,t){"content-type"===Tr(t)&&delete n[t]}),$(t.withCredentials)&&!$(e.withCredentials)&&(t.withCredentials=e.withCredentials),v(t,i).then(c,c)}function c(e){var t=l({},e);return t.data=Mt(e.data,e.headers,e.status,p.transformResponse),jt(e.status)?t:f.reject(t)}if(!b(n))throw t("$http")("badreq","Http request configuration must be an object. Received: {0}",n);if(!w(n.url))throw t("$http")("badreq","Http request configuration url must be a string. Received: {0}",n.url);var p=l({method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse,paramSerializer:e.paramSerializer},n);p.headers=s(n),p.method=Dr(p.method),p.paramSerializer=w(p.paramSerializer)?d.get(p.paramSerializer):p.paramSerializer;var h=[],g=[],m=f.when(p);return r(_,function(e){(e.request||e.requestError)&&h.unshift(e.request,e.requestError),(e.response||e.responseError)&&g.push(e.response,e.responseError)}),m=o(m,h),m=m.then(u),m=o(m,g),i?(m.success=function(e){return ce(e,"fn"),m.then(function(t){e(t.data,t.status,t.headers,p)}),m},m.error=function(e){return ce(e,"fn"),m.then(null,function(t){e(t.data,t.status,t.headers,p)}),m}):(m.success=io("success"),m.error=io("error")),m}function h(e){r(arguments,function(e){p[e]=function(t,n){return p(l({},n||{},{method:e,url:t}))}})}function g(e){r(arguments,function(e){p[e]=function(t,n,r){return p(l({},r||{},{method:e,url:t,data:n}))}})}function v(t,i){function o(e){if(e){var t={};return r(e,function(e,r){t[r]=function(t){function r(){e(t)}n?c.$applyAsync(r):c.$$phase?r():c.$apply(r)}}),t}}function u(e,t,r,i){function o(){l(t,e,r,i)}g&&(jt(e)?g.put(k,[e,t,At(r),i]):g.remove(k)),n?c.$applyAsync(o):(o(),c.$$phase||c.$apply())}function l(e,n,r,i){n=n>=-1?n:0,(jt(n)?w.resolve:w.reject)({data:e,status:n,headers:Ot(r),config:t,statusText:i})}function d(e){l(e.data,e.status,ve(e.headers()),e.statusText)}function h(){var e=p.pendingRequests.indexOf(t);e!==-1&&p.pendingRequests.splice(e,1)}var g,v,w=f.defer(),_=w.promise,S=t.headers,k=y(t.url,t.paramSerializer(t.params));if(p.pendingRequests.push(t),_.then(h,h),!t.cache&&!e.cache||t.cache===!1||"GET"!==t.method&&"JSONP"!==t.method||(g=b(t.cache)?t.cache:b(e.cache)?e.cache:x),g&&(v=g.get(k),m(v)?P(v)?v.then(d,d):Kr(v)?l(v[1],v[0],ve(v[2]),v[3]):l(v,200,{},"OK"):g.put(k,_)),$(v)){var E=Fn(t.url)?s()[t.xsrfCookieName||e.xsrfCookieName]:void 0;E&&(S[t.xsrfHeaderName||e.xsrfHeaderName]=E),a(t.method,k,i,u,S,t.timeout,t.withCredentials,t.responseType,o(t.eventHandlers),o(t.uploadEventHandlers))}return _}function y(e,t){return t.length>0&&(e+=(e.indexOf("?")==-1?"?":"&")+t),e}var x=u("$http");e.paramSerializer=w(e.paramSerializer)?d.get(e.paramSerializer):e.paramSerializer;var _=[];return r(o,function(e){_.unshift(w(e)?d.get(e):d.invoke(e))}),p.pendingRequests=[],h("get","delete","head","jsonp"),g("post","put","patch"),p.defaults=e,p}]}function Tt(){this.$get=function(){return function(){return new e.XMLHttpRequest}}}function Dt(){this.$get=["$browser","$jsonpCallbacks","$document","$xhrFactory",function(e,t,n,r){return Ft(e,r,e.defer,t,n[0])}]}function Ft(e,t,n,i,o){function a(e,t,n){e=e.replace("JSON_CALLBACK",t);var r=o.createElement("script"),a=null;return r.type="text/javascript",r.src=e,r.async=!0,a=function(e){gi(r,"load",a),gi(r,"error",a),o.body.removeChild(r),r=null;var s=-1,u="unknown";e&&("load"!==e.type||i.wasCalled(t)||(e={type:"error"}),u=e.type,s="error"===e.type?404:200),n&&n(s,u)},hi(r,"load",a),hi(r,"error",a),o.body.appendChild(r),a}return function(o,s,u,l,c,f,d,h,g,v){function b(){x&&x(),_&&_.abort()}function y(t,r,i,o,a){m(E)&&n.cancel(E),x=_=null,t(r,i,o,a),e.$$completeOutstandingRequest(p)}if(e.$$incOutstandingRequestCount(),s=s||e.url(),"jsonp"===Tr(o))var w=i.createCallback(s),x=a(s,w,function(e,t){var n=200===e&&i.getResponse(w);y(l,e,n,"",t),i.removeCallback(w)});else{var _=t(o,s);_.open(o,s,!0),r(c,function(e,t){m(e)&&_.setRequestHeader(t,e)}),_.onload=function(){var e=_.statusText||"",t="response"in _?_.response:_.responseText,n=1223===_.status?204:_.status;0===n&&(n=t?200:"file"==Dn(s).protocol?404:0),y(l,n,t,_.getAllResponseHeaders(),e)};var S=function(){y(l,-1,null,null,"")};if(_.onerror=S,_.onabort=S,r(g,function(e,t){_.addEventListener(t,e)}),r(v,function(e,t){_.upload.addEventListener(t,e)}),d&&(_.withCredentials=!0),h)try{_.responseType=h}catch(k){if("json"!==h)throw k}_.send($(u)?null:u)}if(f>0)var E=n(b,f);else P(f)&&f.then(b)}}function Nt(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse","$exceptionHandler","$sce",function(n,r,i){function o(e){return"\\\\\\"+e}function a(n){return n.replace(p,e).replace(h,t)}function s(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=B(e)}return e}function u(e,t,n,r){var i;return i=e.$watch(function(e){return i(),r(e)},t,n)}function c(o,c,p,h){function v(e){try{return e=P(e),h&&!m(e)?e:s(e)}catch(t){r(oo.interr(o,t))}}if(!o.length||o.indexOf(e)===-1){var b;if(!c){var y=a(o);b=g(y),b.exp=o,b.expressions=[],b.$$watchDelegate=u}return b}h=!!h;for(var w,x,_,k=0,E=[],C=[],A=o.length,O=[],M=[];k<A;){if((w=o.indexOf(e,k))==-1||(x=o.indexOf(t,w+f))==-1){k!==A&&O.push(a(o.substring(k)));break}k!==w&&O.push(a(o.substring(k,w))),_=o.substring(w+f,x),E.push(_),C.push(n(_,v)),k=x+d,M.push(O.length),O.push("")}if(p&&O.length>1&&oo.throwNoconcat(o),!c||E.length){var j=function(e){for(var t=0,n=E.length;t<n;t++){if(h&&$(e[t]))return;O[M[t]]=e[t]}return O.join("")},P=function(e){return p?i.getTrusted(p,e):i.valueOf(e)};return l(function(e){var t=0,n=E.length,i=new Array(n);try{for(;t<n;t++)i[t]=C[t](e);return j(i)}catch(a){r(oo.interr(o,a))}},{exp:o,expressions:E,$$watchDelegate:function(e,t){var n;return e.$watchGroup(C,function(r,i){var o=j(r);S(t)&&t.call(this,o,r!==i?n:o,e),n=o})}})}}var f=e.length,d=t.length,p=new RegExp(e.replace(/./g,o),"g"),h=new RegExp(t.replace(/./g,o),"g");return c.startSymbol=function(){return e},c.endSymbol=function(){return t},c}]}function It(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(e,t,n,r,i){function o(o,s,u,l){function c(){f?o.apply(null,d):o(g)}var f=arguments.length>4,d=f?L(arguments,4):[],p=t.setInterval,h=t.clearInterval,g=0,v=m(l)&&!l,$=(v?r:n).defer(),b=$.promise;return u=m(u)?u:0,b.$$intervalId=p(function(){v?i.defer(c):e.$evalAsync(c),$.notify(g++),u>0&&g>=u&&($.resolve(g),h(b.$$intervalId),delete a[b.$$intervalId]),v||e.$apply()},s),a[b.$$intervalId]=$,b}var a={};return o.cancel=function(e){return!!(e&&e.$$intervalId in a)&&(a[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete a[e.$$intervalId],!0)},o}]}function Rt(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=ee(t[n]);return t.join("/")}function Ut(e,t){var n=Dn(e);t.$$protocol=n.protocol,t.$$host=n.hostname,t.$$port=f(n.port)||uo[n.protocol]||null}function Vt(e,t){var n="/"!==e.charAt(0);n&&(e="/"+e);var r=Dn(e);t.$$path=decodeURIComponent(n&&"/"===r.pathname.charAt(0)?r.pathname.substring(1):r.pathname),t.$$search=J(r.search),t.$$hash=decodeURIComponent(r.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function zt(e,t){return 0===e.lastIndexOf(t,0)}function Lt(e,t){if(zt(t,e))return t.substr(e.length)}function qt(e){var t=e.indexOf("#");return t==-1?e:e.substr(0,t)}function Ht(e){return e.replace(/(#.+)|#$/,"$1")}function Bt(e){return e.substr(0,qt(e).lastIndexOf("/")+1)}function Wt(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function Gt(e,t,n){this.$$html5=!0,n=n||"",Ut(e,this),this.$$parse=function(e){var n=Lt(t,e);if(!w(n))throw lo("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',e,t);Vt(n,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=Q(this.$$search),n=this.$$hash?"#"+ee(this.$$hash):"";this.$$url=Rt(this.$$path)+(e?"?"+e:"")+n,this.$$absUrl=t+this.$$url.substr(1)},this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var o,a,s;return m(o=Lt(e,r))?(a=o,s=m(o=Lt(n,o))?t+(Lt("/",o)||o):e+a):m(o=Lt(t,r))?s=t+o:t==r+"/"&&(s=t),s&&this.$$parse(s),!!s}}function Xt(e,t,n){Ut(e,this),this.$$parse=function(r){function i(e,t,n){var r,i=/^\/[A-Z]:(\/.*)/;return zt(t,n)&&(t=t.replace(n,"")),i.exec(t)?e:(r=i.exec(e),r?r[1]:e)}var o,a=Lt(e,r)||Lt(t,r);$(a)||"#"!==a.charAt(0)?this.$$html5?o=a:(o="",$(a)&&(e=r,this.replace())):(o=Lt(n,a),$(o)&&(o=a)),Vt(o,this),this.$$path=i(this.$$path,o,e),this.$$compose()},this.$$compose=function(){var t=Q(this.$$search),r=this.$$hash?"#"+ee(this.$$hash):"";this.$$url=Rt(this.$$path)+(t?"?"+t:"")+r,this.$$absUrl=e+(this.$$url?n+this.$$url:"")},this.$$parseLinkUrl=function(t,n){return qt(e)==qt(t)&&(this.$$parse(t),!0)}}function Kt(e,t,n){this.$$html5=!0,Xt.apply(this,arguments),this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var o,a;return e==qt(r)?o=r:(a=Lt(t,r))?o=e+n+a:t===r+"/"&&(o=t),o&&this.$$parse(o),!!o},this.$$compose=function(){var t=Q(this.$$search),r=this.$$hash?"#"+ee(this.$$hash):"";this.$$url=Rt(this.$$path)+(t?"?"+t:"")+r,this.$$absUrl=e+n+this.$$url}}function Yt(e){return function(){return this[e]}}function Zt(e,t){return function(n){return $(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function Jt(){var e="",t={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(t){return m(t)?(e=t,this):e},this.html5Mode=function(e){return j(e)?(t.enabled=e,this):b(e)?(j(e.enabled)&&(t.enabled=e.enabled),j(e.requireBase)&&(t.requireBase=e.requireBase),j(e.rewriteLinks)&&(t.rewriteLinks=e.rewriteLinks),this):t},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(n,r,i,o,a){function s(e,t,n){var i=l.url(),o=l.$$state;try{r.url(e,t,n),l.$$state=r.state()}catch(a){throw l.url(i),l.$$state=o,a}}function u(e,t){n.$broadcast("$locationChangeSuccess",l.absUrl(),e,l.$$state,t)}var l,c,f,d=r.baseHref(),p=r.url();if(t.enabled){if(!d&&t.requireBase)throw lo("nobase","$location in HTML5 mode requires a <base> tag to be present!");f=Wt(p)+(d||"/"),c=i.history?Gt:Kt}else f=qt(p),c=Xt;var h=Bt(f);l=new c(f,h,"#"+e),l.$$parseLinkUrl(p,p),l.$$state=r.state();var g=/^\s*(javascript|mailto):/i;o.on("click",function(e){if(t.rewriteLinks&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&2!=e.which&&2!=e.button){for(var i=Rr(e.target);"a"!==I(i[0]);)if(i[0]===o[0]||!(i=i.parent())[0])return;var s=i.prop("href"),u=i.attr("href")||i.attr("xlink:href");b(s)&&"[object SVGAnimatedString]"===s.toString()&&(s=Dn(s.animVal).href),g.test(s)||!s||i.attr("target")||e.isDefaultPrevented()||l.$$parseLinkUrl(s,u)&&(e.preventDefault(),l.absUrl()!=r.url()&&(n.$apply(),a.angular["ff-684208-preventDefault"]=!0))}}),Ht(l.absUrl())!=Ht(p)&&r.url(l.absUrl(),!0);var v=!0;return r.onUrlChange(function(e,t){return $(Lt(h,e))?void(a.location.href=e):(n.$evalAsync(function(){var r,i=l.absUrl(),o=l.$$state;e=Ht(e),l.$$parse(e),l.$$state=t,r=n.$broadcast("$locationChangeStart",e,i,t,o).defaultPrevented,l.absUrl()===e&&(r?(l.$$parse(i),l.$$state=o,s(i,!1,o)):(v=!1,u(i,o)))}),void(n.$$phase||n.$digest()))}),n.$watch(function(){var e=Ht(r.url()),t=Ht(l.absUrl()),o=r.state(),a=l.$$replace,c=e!==t||l.$$html5&&i.history&&o!==l.$$state;(v||c)&&(v=!1,n.$evalAsync(function(){var t=l.absUrl(),r=n.$broadcast("$locationChangeStart",t,e,l.$$state,o).defaultPrevented;l.absUrl()===t&&(r?(l.$$parse(e),l.$$state=o):(c&&s(t,a,o===l.$$state?null:l.$$state),u(e,o)))})),l.$$replace=!1}),l}]}function Qt(){var e=!0,t=this;this.debugEnabled=function(t){return m(t)?(e=t,this):e},this.$get=["$window",function(n){function i(e){return e instanceof Error&&(e.stack?e=e.message&&e.stack.indexOf(e.message)===-1?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function o(e){var t=n.console||{},o=t[e]||t.log||p,a=!1;try{a=!!o.apply}catch(s){}return a?function(){var e=[];return r(arguments,function(t){e.push(i(t))}),o.apply(t,e)}:function(e,t){o(e,null==t?"":t)}}return{log:o("log"),info:o("info"),warn:o("warn"),error:o("error"),debug:function(){var n=o("debug");return function(){e&&n.apply(t,arguments)}}()}}]}function en(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throw fo("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return e}function tn(e){return e+""}function nn(e,t){if(e){if(e.constructor===e)throw fo("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throw fo("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw fo("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);if(e===Object)throw fo("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t)}return e}function rn(e,t){if(e){if(e.constructor===e)throw fo("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e===po||e===ho||e===go)throw fo("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",t)}}function on(e,t){if(e&&(e===(0).constructor||e===(!1).constructor||e==="".constructor||e==={}.constructor||e===[].constructor||e===Function.constructor))throw fo("isecaf","Assigning to a constructor is disallowed! Expression: {0}",t)}function an(e,t){return"undefined"!=typeof e?e:t}function sn(e,t){return"undefined"==typeof e?t:"undefined"==typeof t?e:e+t}function un(e,t){var n=e(t);return!n.$stateful}function ln(e,t){var n,i;switch(e.type){case bo.Program:n=!0,r(e.body,function(e){ln(e.expression,t),n=n&&e.expression.constant}),e.constant=n;break;case bo.Literal:e.constant=!0,e.toWatch=[];break;case bo.UnaryExpression:ln(e.argument,t),e.constant=e.argument.constant,e.toWatch=e.argument.toWatch;break;case bo.BinaryExpression:ln(e.left,t),ln(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.left.toWatch.concat(e.right.toWatch);break;case bo.LogicalExpression:ln(e.left,t),ln(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.constant?[]:[e];break;case bo.ConditionalExpression:ln(e.test,t),ln(e.alternate,t),ln(e.consequent,t),e.constant=e.test.constant&&e.alternate.constant&&e.consequent.constant,e.toWatch=e.constant?[]:[e];break;case bo.Identifier:e.constant=!1,e.toWatch=[e];break;case bo.MemberExpression:ln(e.object,t),e.computed&&ln(e.property,t),e.constant=e.object.constant&&(!e.computed||e.property.constant),e.toWatch=[e];break;case bo.CallExpression:n=!!e.filter&&un(t,e.callee.name),i=[],r(e.arguments,function(e){ln(e,t),n=n&&e.constant,e.constant||i.push.apply(i,e.toWatch)}),e.constant=n,e.toWatch=e.filter&&un(t,e.callee.name)?i:[e];break;case bo.AssignmentExpression:ln(e.left,t),ln(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=[e];break;case bo.ArrayExpression:n=!0,i=[],r(e.elements,function(e){ln(e,t),n=n&&e.constant,e.constant||i.push.apply(i,e.toWatch)}),e.constant=n,e.toWatch=i;break;case bo.ObjectExpression:n=!0,i=[],r(e.properties,function(e){ln(e.value,t),n=n&&e.value.constant&&!e.computed,e.value.constant||i.push.apply(i,e.value.toWatch)}),e.constant=n,e.toWatch=i;break;case bo.ThisExpression:e.constant=!1,e.toWatch=[];break;case bo.LocalsExpression:e.constant=!1,e.toWatch=[]}}function cn(e){if(1==e.length){var t=e[0].expression,n=t.toWatch;return 1!==n.length?n:n[0]!==t?n:void 0}}function fn(e){return e.type===bo.Identifier||e.type===bo.MemberExpression}function dn(e){if(1===e.body.length&&fn(e.body[0].expression))return{type:bo.AssignmentExpression,left:e.body[0].expression,right:{type:bo.NGValueParameter},operator:"="}}function pn(e){return 0===e.body.length||1===e.body.length&&(e.body[0].expression.type===bo.Literal||e.body[0].expression.type===bo.ArrayExpression||e.body[0].expression.type===bo.ObjectExpression)}function hn(e){return e.constant}function gn(e,t){this.astBuilder=e,this.$filter=t}function vn(e,t){this.astBuilder=e,this.$filter=t}function $n(e){return"constructor"==e}function mn(e){return S(e.valueOf)?e.valueOf():wo.call(e)}function bn(){var e,t,n=he(),i=he(),o={"true":!0,"false":!1,"null":null,undefined:void 0};this.addLiteral=function(e,t){o[e]=t},this.setIdentifierFns=function(n,r){return e=n,t=r,this},this.$get=["$filter",function(a){function s(e,t,r){var o,s,l;switch(r=r||y,typeof e){case"string":e=e.trim(),l=e;var v=r?i:n;if(o=v[l],!o){":"===e.charAt(0)&&":"===e.charAt(1)&&(s=!0,e=e.substring(2));var m=r?b:$,w=new mo(m),x=new yo(w,a,m);o=x.parse(e),o.constant?o.$$watchDelegate=h:s?o.$$watchDelegate=o.literal?d:f:o.inputs&&(o.$$watchDelegate=c),r&&(o=u(o)),v[l]=o}return g(o,t);case"function":return g(e,t);default:return g(p,t)}}function u(e){function t(t,n,r,i){var o=y;y=!0;try{return e(t,n,r,i)}finally{y=o}}if(!e)return e;t.$$watchDelegate=e.$$watchDelegate,t.assign=u(e.assign),t.constant=e.constant,t.literal=e.literal;for(var n=0;e.inputs&&n<e.inputs.length;++n)e.inputs[n]=u(e.inputs[n]);return t.inputs=e.inputs,t}function l(e,t){return null==e||null==t?e===t:("object"!=typeof e||(e=mn(e),"object"!=typeof e))&&(e===t||e!==e&&t!==t)}function c(e,t,n,r,i){var o,a=r.inputs;if(1===a.length){var s=l;return a=a[0],e.$watch(function(e){var t=a(e);return l(t,s)||(o=r(e,void 0,void 0,[t]),s=t&&mn(t)),o},t,n,i)}for(var u=[],c=[],f=0,d=a.length;f<d;f++)u[f]=l,c[f]=null;return e.$watch(function(e){for(var t=!1,n=0,i=a.length;n<i;n++){var s=a[n](e);(t||(t=!l(s,u[n])))&&(c[n]=s,u[n]=s&&mn(s))}return t&&(o=r(e,void 0,void 0,c)),o},t,n,i)}function f(e,t,n,r){var i,o;return i=e.$watch(function(e){return r(e)},function(e,n,r){o=e,S(t)&&t.apply(this,arguments),m(e)&&r.$$postDigest(function(){m(o)&&i()})},n)}function d(e,t,n,i){function o(e){var t=!0;return r(e,function(e){m(e)||(t=!1)}),t}var a,s;return a=e.$watch(function(e){return i(e)},function(e,n,r){s=e,S(t)&&t.call(this,e,n,r),o(e)&&r.$$postDigest(function(){o(s)&&a()})},n)}function h(e,t,n,r){var i;return i=e.$watch(function(e){return i(),r(e)},t,n)}function g(e,t){if(!t)return e;var n=e.$$watchDelegate,r=!1,i=n!==d&&n!==f,o=i?function(n,i,o,a){var s=r&&a?a[0]:e(n,i,o,a);return t(s,n,i)}:function(n,r,i,o){var a=e(n,r,i,o),s=t(a,n,r);return m(a)?s:a};return e.$$watchDelegate&&e.$$watchDelegate!==c?o.$$watchDelegate=e.$$watchDelegate:t.$stateful||(o.$$watchDelegate=c,r=!e.inputs,o.inputs=e.inputs?e.inputs:[e]),o}var v=Qr().noUnsafeEval,$={csp:v,expensiveChecks:!1,literals:U(o),isIdentifierStart:S(e)&&e,isIdentifierContinue:S(t)&&t},b={csp:v,expensiveChecks:!0,literals:U(o),isIdentifierStart:S(e)&&e,isIdentifierContinue:S(t)&&t},y=!1;return s.$$runningExpensiveChecks=function(){return y},s}]}function yn(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return xn(function(t){e.$evalAsync(t)},t)}]}function wn(){this.$get=["$browser","$exceptionHandler",function(e,t){return xn(function(t){e.defer(t)},t)}]}function xn(e,n){function i(){this.$$state={status:0}}function o(e,t){return function(n){t.call(e,n)}}function a(e){var t,r,i;i=e.pending,e.processScheduled=!1,e.pending=void 0;for(var o=0,a=i.length;o<a;++o){r=i[o][0],t=i[o][e.status];try{S(t)?r.resolve(t(e.value)):1===e.status?r.resolve(e.value):r.reject(e.value)}catch(s){r.reject(s),n(s)}}}function s(t){!t.processScheduled&&t.pending&&(t.processScheduled=!0,e(function(){a(t)}))}function u(){this.promise=new i}function c(e){var t=new u,n=0,i=Kr(e)?[]:{};return r(e,function(e,r){n++,m(e).then(function(e){i.hasOwnProperty(r)||(i[r]=e,--n||t.resolve(i))},function(e){i.hasOwnProperty(r)||t.reject(e)})}),0===n&&t.resolve(i),t.promise}function f(e){var t=p();return r(e,function(e){m(e).then(t.resolve,t.reject)}),t.promise}var d=t("$q",TypeError),p=function(){var e=new u;return e.resolve=o(e,e.resolve),e.reject=o(e,e.reject),e.notify=o(e,e.notify),e};l(i.prototype,{then:function(e,t,n){if($(e)&&$(t)&&$(n))return this;var r=new u;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,e,t,n]),this.$$state.status>0&&s(this.$$state),r.promise},"catch":function(e){return this.then(null,e)},"finally":function(e,t){return this.then(function(t){return v(t,!0,e)},function(t){return v(t,!1,e)},t)}}),l(u.prototype,{resolve:function(e){this.promise.$$state.status||(e===this.promise?this.$$reject(d("qcycle","Expected promise to be resolved with value other than itself '{0}'",e)):this.$$resolve(e))},$$resolve:function(e){function t(e){u||(u=!0,a.$$resolve(e))}function r(e){u||(u=!0,a.$$reject(e))}var i,a=this,u=!1;try{(b(e)||S(e))&&(i=e&&e.then),S(i)?(this.promise.$$state.status=-1,i.call(e,t,r,o(this,this.notify))):(this.promise.$$state.value=e,this.promise.$$state.status=1,s(this.promise.$$state))}catch(l){r(l),n(l)}},reject:function(e){this.promise.$$state.status||this.$$reject(e)},$$reject:function(e){this.promise.$$state.value=e,this.promise.$$state.status=2,s(this.promise.$$state)},notify:function(t){var r=this.promise.$$state.pending;this.promise.$$state.status<=0&&r&&r.length&&e(function(){for(var e,i,o=0,a=r.length;o<a;o++){i=r[o][0],e=r[o][3];try{i.notify(S(e)?e(t):t)}catch(s){n(s)}}})}});var h=function(e){var t=new u;return t.reject(e),t.promise},g=function(e,t){var n=new u;return t?n.resolve(e):n.reject(e),n.promise},v=function(e,t,n){var r=null;try{S(n)&&(r=n())}catch(i){return g(i,!1)}return P(r)?r.then(function(){return g(e,t)},function(e){return g(e,!1)}):g(e,t)},m=function(e,t,n,r){var i=new u;return i.resolve(e),i.promise.then(t,n,r)},y=m,w=function(e){function t(e){r.resolve(e)}function n(e){r.reject(e)}if(!S(e))throw d("norslvr","Expected resolverFn, got '{0}'",e);var r=new u;return e(t,n),r.promise};return w.prototype=i.prototype,w.defer=p,w.reject=h,w.when=m,w.resolve=y,w.all=c,w.race=f,w}function _n(){this.$get=["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame,r=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,i=!!n,o=i?function(e){var t=n(e);return function(){r(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return o.supported=i,o}]}function Sn(){function e(e){function t(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=a(),this.$$ChildScope=null}return t.prototype=e,t}var i=10,o=t("$rootScope"),s=null,u=null;this.digestTtl=function(e){return arguments.length&&(i=e),i},this.$get=["$exceptionHandler","$parse","$browser",function(t,l,c){function f(e){e.currentScope.$$destroyed=!0}function d(e){9===Ir&&(e.$$childHead&&d(e.$$childHead),e.$$nextSibling&&d(e.$$nextSibling)),e.$parent=e.$$nextSibling=e.$$prevSibling=e.$$childHead=e.$$childTail=e.$root=e.$$watchers=null}function h(){this.$id=a(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}function g(e){if(k.$$phase)throw o("inprog","{0} already in progress",k.$$phase);k.$$phase=e}function v(){k.$$phase=null}function m(e,t){do e.$$watchersCount+=t;while(e=e.$parent)}function y(e,t,n){do e.$$listenerCount[n]-=t,0===e.$$listenerCount[n]&&delete e.$$listenerCount[n];while(e=e.$parent)}function w(){}function x(){for(;A.length;)try{A.shift()()}catch(e){t(e)}u=null}function _(){null===u&&(u=c.defer(function(){k.$apply(x)}))}h.prototype={constructor:h,$new:function(t,n){var r;return n=n||this,t?(r=new h,r.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=e(this)),r=new this.$$ChildScope),r.$parent=n,r.$$prevSibling=n.$$childTail,n.$$childHead?(n.$$childTail.$$nextSibling=r,n.$$childTail=r):n.$$childHead=n.$$childTail=r,(t||n!=this)&&r.$on("$destroy",f),r},$watch:function(e,t,n,r){var i=l(e);if(i.$$watchDelegate)return i.$$watchDelegate(this,t,n,i,e);var o=this,a=o.$$watchers,u={fn:t,last:w,get:i,exp:r||e,eq:!!n};return s=null,S(t)||(u.fn=p),a||(a=o.$$watchers=[]),a.unshift(u),m(this,1),function(){R(a,u)>=0&&m(o,-1),s=null}},$watchGroup:function(e,t){function n(){u=!1,l?(l=!1,t(o,o,s)):t(o,i,s)}var i=new Array(e.length),o=new Array(e.length),a=[],s=this,u=!1,l=!0;if(!e.length){var c=!0;return s.$evalAsync(function(){c&&t(o,o,s)}),function(){c=!1}}return 1===e.length?this.$watch(e[0],function(e,n,r){o[0]=e,i[0]=n,t(o,e===n?o:i,r)}):(r(e,function(e,t){var r=s.$watch(e,function(e,r){o[t]=e,i[t]=r,u||(u=!0,s.$evalAsync(n));
5
- });a.push(r)}),function(){for(;a.length;)a.shift()()})},$watchCollection:function(e,t){function r(e){o=e;var t,r,i,s,u;if(!$(o)){if(b(o))if(n(o)){a!==p&&(a=p,v=a.length=0,f++),t=o.length,v!==t&&(f++,a.length=v=t);for(var l=0;l<t;l++)u=a[l],s=o[l],i=u!==u&&s!==s,i||u===s||(f++,a[l]=s)}else{a!==h&&(a=h={},v=0,f++),t=0;for(r in o)Pr.call(o,r)&&(t++,s=o[r],u=a[r],r in a?(i=u!==u&&s!==s,i||u===s||(f++,a[r]=s)):(v++,a[r]=s,f++));if(v>t){f++;for(r in a)Pr.call(o,r)||(v--,delete a[r])}}else a!==o&&(a=o,f++);return f}}function i(){if(g?(g=!1,t(o,o,u)):t(o,s,u),c)if(b(o))if(n(o)){s=new Array(o.length);for(var e=0;e<o.length;e++)s[e]=o[e]}else{s={};for(var r in o)Pr.call(o,r)&&(s[r]=o[r])}else s=o}r.$stateful=!0;var o,a,s,u=this,c=t.length>1,f=0,d=l(e,r),p=[],h={},g=!0,v=0;return this.$watch(d,i)},$digest:function(){var e,n,r,a,l,f,d,p,h,$,m,b,y=i,_=this,A=[];g("$digest"),c.$$checkUrlChange(),this===k&&null!==u&&(c.defer.cancel(u),x()),s=null;do{p=!1,$=_;for(var M=0;M<E.length;M++){try{b=E[M],b.scope.$eval(b.expression,b.locals)}catch(j){t(j)}s=null}E.length=0;e:do{if(f=$.$$watchers)for(d=f.length;d--;)try{if(e=f[d])if(l=e.get,(n=l($))===(r=e.last)||(e.eq?V(n,r):"number"==typeof n&&"number"==typeof r&&isNaN(n)&&isNaN(r))){if(e===s){p=!1;break e}}else p=!0,s=e,e.last=e.eq?U(n,null):n,a=e.fn,a(n,r===w?n:r,$),y<5&&(m=4-y,A[m]||(A[m]=[]),A[m].push({msg:S(e.exp)?"fn: "+(e.exp.name||e.exp.toString()):e.exp,newVal:n,oldVal:r}))}catch(j){t(j)}if(!(h=$.$$watchersCount&&$.$$childHead||$!==_&&$.$$nextSibling))for(;$!==_&&!(h=$.$$nextSibling);)$=$.$parent}while($=h);if((p||E.length)&&!y--)throw v(),o("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",i,A)}while(p||E.length);for(v();O<C.length;)try{C[O++]()}catch(j){t(j)}C.length=O=0},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this===k&&c.$$applicationDestroyed(),m(this,-this.$$watchersCount);for(var t in this.$$listenerCount)y(this,this.$$listenerCount[t],t);e&&e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e&&e.$$childTail==this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=p,this.$on=this.$watch=this.$watchGroup=function(){return p},this.$$listeners={},this.$$nextSibling=null,d(this)}},$eval:function(e,t){return l(e)(this,t)},$evalAsync:function(e,t){k.$$phase||E.length||c.defer(function(){E.length&&k.$digest()}),E.push({scope:this,expression:l(e),locals:t})},$$postDigest:function(e){C.push(e)},$apply:function(e){try{g("$apply");try{return this.$eval(e)}finally{v()}}catch(n){t(n)}finally{try{k.$digest()}catch(n){throw t(n),n}}},$applyAsync:function(e){function t(){n.$eval(e)}var n=this;e&&A.push(t),e=l(e),_()},$on:function(e,t){var n=this.$$listeners[e];n||(this.$$listeners[e]=n=[]),n.push(t);var r=this;do r.$$listenerCount[e]||(r.$$listenerCount[e]=0),r.$$listenerCount[e]++;while(r=r.$parent);var i=this;return function(){var r=n.indexOf(t);r!==-1&&(n[r]=null,y(i,1,e))}},$emit:function(e,n){var r,i,o,a=[],s=this,u=!1,l={name:e,targetScope:s,stopPropagation:function(){u=!0},preventDefault:function(){l.defaultPrevented=!0},defaultPrevented:!1},c=z([l],arguments,1);do{for(r=s.$$listeners[e]||a,l.currentScope=s,i=0,o=r.length;i<o;i++)if(r[i])try{r[i].apply(null,c)}catch(f){t(f)}else r.splice(i,1),i--,o--;if(u)return l.currentScope=null,l;s=s.$parent}while(s);return l.currentScope=null,l},$broadcast:function(e,n){var r=this,i=r,o=r,a={name:e,targetScope:r,preventDefault:function(){a.defaultPrevented=!0},defaultPrevented:!1};if(!r.$$listenerCount[e])return a;for(var s,u,l,c=z([a],arguments,1);i=o;){for(a.currentScope=i,s=i.$$listeners[e]||[],u=0,l=s.length;u<l;u++)if(s[u])try{s[u].apply(null,c)}catch(f){t(f)}else s.splice(u,1),u--,l--;if(!(o=i.$$listenerCount[e]&&i.$$childHead||i!==r&&i.$$nextSibling))for(;i!==r&&!(o=i.$$nextSibling);)i=i.$parent}return a.currentScope=null,a}};var k=new h,E=k.$$asyncQueue=[],C=k.$$postDigestQueue=[],A=k.$$applyAsyncQueue=[],O=0;return k}]}function kn(){var e=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return m(t)?(e=t,this):e},this.imgSrcSanitizationWhitelist=function(e){return m(e)?(t=e,this):t},this.$get=function(){return function(n,r){var i,o=r?t:e;return i=Dn(n).href,""===i||i.match(o)?n:"unsafe:"+i}}}function En(e){if("self"===e)return e;if(w(e)){if(e.indexOf("***")>-1)throw xo("iwcard","Illegal sequence *** in string matcher. String: {0}",e);return e=Jr(e).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+e+"$")}if(k(e))return new RegExp("^"+e.source+"$");throw xo("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Cn(e){var t=[];return m(e)&&r(e,function(e){t.push(En(e))}),t}function An(){this.SCE_CONTEXTS=_o;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=Cn(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=Cn(e)),t},this.$get=["$injector",function(n){function r(e,t){return"self"===e?Fn(t):!!e.exec(t.href)}function i(n){var i,o,a=Dn(n.toString()),s=!1;for(i=0,o=e.length;i<o;i++)if(r(e[i],a)){s=!0;break}if(s)for(i=0,o=t.length;i<o;i++)if(r(t[i],a)){s=!1;break}return s}function o(e){var t=function(e){this.$$unwrapTrustedValue=function(){return e}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}function a(e,t){var n=f.hasOwnProperty(e)?f[e]:null;if(!n)throw xo("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||$(t)||""===t)return t;if("string"!=typeof t)throw xo("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new n(t)}function s(e){return e instanceof c?e.$$unwrapTrustedValue():e}function u(e,t){if(null===t||$(t)||""===t)return t;var n=f.hasOwnProperty(e)?f[e]:null;if(n&&t instanceof n)return t.$$unwrapTrustedValue();if(e===_o.RESOURCE_URL){if(i(t))return t;throw xo("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",t.toString())}if(e===_o.HTML)return l(t);throw xo("unsafe","Attempting to use an unsafe value in a safe context.")}var l=function(e){throw xo("unsafe","Attempting to use an unsafe value in a safe context.")};n.has("$sanitize")&&(l=n.get("$sanitize"));var c=o(),f={};return f[_o.HTML]=o(c),f[_o.CSS]=o(c),f[_o.URL]=o(c),f[_o.JS]=o(c),f[_o.RESOURCE_URL]=o(f[_o.URL]),{trustAs:a,getTrusted:u,valueOf:s}}]}function On(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$sceDelegate",function(t,n){if(e&&Ir<8)throw xo("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var i=ve(_o);i.isEnabled=function(){return e},i.trustAs=n.trustAs,i.getTrusted=n.getTrusted,i.valueOf=n.valueOf,e||(i.trustAs=i.getTrusted=function(e,t){return t},i.valueOf=h),i.parseAs=function(e,n){var r=t(n);return r.literal&&r.constant?r:t(n,function(t){return i.getTrusted(e,t)})};var o=i.parseAs,a=i.getTrusted,s=i.trustAs;return r(_o,function(e,t){var n=Tr(t);i[we("parse_as_"+n)]=function(t){return o(e,t)},i[we("get_trusted_"+n)]=function(t){return a(e,t)},i[we("trust_as_"+n)]=function(t){return s(e,t)}}),i}]}function Mn(){this.$get=["$window","$document",function(e,t){var n,r,i={},o=e.chrome&&e.chrome.app&&e.chrome.app.runtime,a=!o&&e.history&&e.history.pushState,s=f((/android (\d+)/.exec(Tr((e.navigator||{}).userAgent))||[])[1]),u=/Boxee/i.test((e.navigator||{}).userAgent),l=t[0]||{},c=/^(Moz|webkit|ms)(?=[A-Z])/,d=l.body&&l.body.style,p=!1,h=!1;if(d){for(var g in d)if(r=c.exec(g)){n=r[0],n=n[0].toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in d&&"webkit"),p=!!("transition"in d||n+"Transition"in d),h=!!("animation"in d||n+"Animation"in d),!s||p&&h||(p=w(d.webkitTransition),h=w(d.webkitAnimation))}return{history:!(!a||s<4||u),hasEvent:function(e){if("input"===e&&Ir<=11)return!1;if($(i[e])){var t=l.createElement("div");i[e]="on"+e in t}return i[e]},csp:Qr(),vendorPrefix:n,transitions:p,animations:h,android:s}}]}function jn(){var e;this.httpOptions=function(t){return t?(e=t,this):e},this.$get=["$templateCache","$http","$q","$sce",function(t,n,r,i){function o(a,s){function u(e){if(!s)throw So("tpload","Failed to load template: {0} (HTTP status: {1} {2})",a,e.status,e.statusText);return r.reject(e)}o.totalPendingRequests++,w(a)&&!$(t.get(a))||(a=i.getTrustedResourceUrl(a));var c=n.defaults&&n.defaults.transformResponse;return Kr(c)?c=c.filter(function(e){return e!==Et}):c===Et&&(c=null),n.get(a,l({cache:t,transformResponse:c},e))["finally"](function(){o.totalPendingRequests--}).then(function(e){return t.put(a,e.data),e.data},u)}return o.totalPendingRequests=0,o}]}function Pn(){this.$get=["$rootScope","$browser","$location",function(e,t,n){var i={};return i.findBindings=function(e,t,n){var i=e.getElementsByClassName("ng-binding"),o=[];return r(i,function(e){var i=Gr.element(e).data("$binding");i&&r(i,function(r){if(n){var i=new RegExp("(^|\\s)"+Jr(t)+"(\\s|\\||$)");i.test(r)&&o.push(e)}else r.indexOf(t)!=-1&&o.push(e)})}),o},i.findModels=function(e,t,n){for(var r=["ng-","data-ng-","ng\\:"],i=0;i<r.length;++i){var o=n?"=":"*=",a="["+r[i]+"model"+o+'"'+t+'"]',s=e.querySelectorAll(a);if(s.length)return s}},i.getLocation=function(){return n.url()},i.setLocation=function(t){t!==n.url()&&(n.url(t),e.$digest())},i.whenStable=function(e){t.notifyWhenNoOutstandingRequests(e)},i}]}function Tn(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(e,t,n,r,i){function o(o,s,u){S(o)||(u=s,s=o,o=p);var l,c=L(arguments,3),f=m(u)&&!u,d=(f?r:n).defer(),h=d.promise;return l=t.defer(function(){try{d.resolve(o.apply(null,c))}catch(t){d.reject(t),i(t)}finally{delete a[h.$$timeoutId]}f||e.$apply()},s),h.$$timeoutId=l,a[l]=d,h}var a={};return o.cancel=function(e){return!!(e&&e.$$timeoutId in a)&&(a[e.$$timeoutId].reject("canceled"),delete a[e.$$timeoutId],t.defer.cancel(e.$$timeoutId))},o}]}function Dn(e){var t=e;return Ir&&(ko.setAttribute("href",t),t=ko.href),ko.setAttribute("href",t),{href:ko.href,protocol:ko.protocol?ko.protocol.replace(/:$/,""):"",host:ko.host,search:ko.search?ko.search.replace(/^\?/,""):"",hash:ko.hash?ko.hash.replace(/^#/,""):"",hostname:ko.hostname,port:ko.port,pathname:"/"===ko.pathname.charAt(0)?ko.pathname:"/"+ko.pathname}}function Fn(e){var t=w(e)?Dn(e):e;return t.protocol===Eo.protocol&&t.host===Eo.host}function Nn(){this.$get=g(e)}function In(e){function t(e){try{return decodeURIComponent(e)}catch(t){return e}}var n=e[0]||{},r={},i="";return function(){var e,o,a,s,u,l=n.cookie||"";if(l!==i)for(i=l,e=i.split("; "),r={},a=0;a<e.length;a++)o=e[a],s=o.indexOf("="),s>0&&(u=t(o.substring(0,s)),$(r[u])&&(r[u]=t(o.substring(s+1))));return r}}function Rn(){this.$get=In}function Un(e){function t(i,o){if(b(i)){var a={};return r(i,function(e,n){a[n]=t(n,e)}),a}return e.factory(i+n,o)}var n="Filter";this.register=t,this.$get=["$injector",function(e){return function(t){return e.get(t+n)}}],t("currency",Hn),t("date",or),t("filter",Vn),t("json",ar),t("limitTo",sr),t("lowercase",To),t("number",Bn),t("orderBy",lr),t("uppercase",Do)}function Vn(){return function(e,r,i,o){if(!n(e)){if(null==e)return e;throw t("filter")("notarray","Expected array but received: {0}",e)}o=o||"$";var a,s,u=qn(r);switch(u){case"function":a=r;break;case"boolean":case"null":case"number":case"string":s=!0;case"object":a=zn(r,i,o,s);break;default:return e}return Array.prototype.filter.call(e,a)}}function zn(e,t,n,r){var i,o=b(e)&&n in e;return t===!0?t=V:S(t)||(t=function(e,t){return!$(e)&&(null===e||null===t?e===t:!(b(t)||b(e)&&!v(e))&&(e=Tr(""+e),t=Tr(""+t),e.indexOf(t)!==-1))}),i=function(i){return o&&!b(i)?Ln(i,e[n],t,n,!1):Ln(i,e,t,n,r)}}function Ln(e,t,n,r,i,o){var a=qn(e),s=qn(t);if("string"===s&&"!"===t.charAt(0))return!Ln(e,t.substring(1),n,r,i);if(Kr(e))return e.some(function(e){return Ln(e,t,n,r,i)});switch(a){case"object":var u;if(i){for(u in e)if("$"!==u.charAt(0)&&Ln(e[u],t,n,r,!0))return!0;return!o&&Ln(e,t,n,r,!1)}if("object"===s){for(u in t){var l=t[u];if(!S(l)&&!$(l)){var c=u===r,f=c?e:e[u];if(!Ln(f,l,n,r,c,c))return!1}}return!0}return n(e,t);case"function":return!1;default:return n(e,t)}}function qn(e){return null===e?"null":typeof e}function Hn(e){var t=e.NUMBER_FORMATS;return function(e,n,r){return $(n)&&(n=t.CURRENCY_SYM),$(r)&&(r=t.PATTERNS[1].maxFrac),null==e?e:Xn(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,r).replace(/\u00A4/g,n)}}function Bn(e){var t=e.NUMBER_FORMATS;return function(e,n){return null==e?e:Xn(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function Wn(e){var t,n,r,i,o,a=0;for((n=e.indexOf(Ao))>-1&&(e=e.replace(Ao,"")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;e.charAt(r)==Oo;r++);if(r==(o=e.length))t=[0],n=1;else{for(o--;e.charAt(o)==Oo;)o--;for(n-=r,t=[],i=0;r<=o;r++,i++)t[i]=+e.charAt(r)}return n>Co&&(t=t.splice(0,Co-1),a=n-1,n=1),{d:t,e:a,i:n}}function Gn(e,t,n,r){var i=e.d,o=i.length-e.i;t=$(t)?Math.min(Math.max(n,o),r):+t;var a=t+e.i,s=i[a];if(a>0){i.splice(Math.max(e.i,a));for(var u=a;u<i.length;u++)i[u]=0}else{o=Math.max(0,o),e.i=1,i.length=Math.max(1,a=t+1),i[0]=0;for(var l=1;l<a;l++)i[l]=0}if(s>=5)if(a-1<0){for(var c=0;c>a;c--)i.unshift(0),e.i++;i.unshift(1),e.i++}else i[a-1]++;for(;o<Math.max(0,t);o++)i.push(0);var f=i.reduceRight(function(e,t,n,r){return t+=e,r[n]=t%10,Math.floor(t/10)},0);f&&(i.unshift(f),e.i++)}function Xn(e,t,n,r,i){if(!w(e)&&!x(e)||isNaN(e))return"";var o,a=!isFinite(e),s=!1,u=Math.abs(e)+"",l="";if(a)l="∞";else{o=Wn(u),Gn(o,i,t.minFrac,t.maxFrac);var c=o.d,f=o.i,d=o.e,p=[];for(s=c.reduce(function(e,t){return e&&!t},!0);f<0;)c.unshift(0),f++;f>0?p=c.splice(f,c.length):(p=c,c=[0]);var h=[];for(c.length>=t.lgSize&&h.unshift(c.splice(-t.lgSize,c.length).join(""));c.length>t.gSize;)h.unshift(c.splice(-t.gSize,c.length).join(""));c.length&&h.unshift(c.join("")),l=h.join(n),p.length&&(l+=r+p.join("")),d&&(l+="e+"+d)}return e<0&&!s?t.negPre+l+t.negSuf:t.posPre+l+t.posSuf}function Kn(e,t,n,r){var i="";for((e<0||r&&e<=0)&&(r?e=-e+1:(e=-e,i="-")),e=""+e;e.length<t;)e=Oo+e;return n&&(e=e.substr(e.length-t)),i+e}function Yn(e,t,n,r,i){return n=n||0,function(o){var a=o["get"+e]();return(n>0||a>-n)&&(a+=n),0===a&&n==-12&&(a=12),Kn(a,t,r,i)}}function Zn(e,t,n){return function(r,i){var o=r["get"+e](),a=(n?"STANDALONE":"")+(t?"SHORT":""),s=Dr(a+e);return i[s][o]}}function Jn(e,t,n){var r=-1*n,i=r>=0?"+":"";return i+=Kn(Math[r>0?"floor":"ceil"](r/60),2)+Kn(Math.abs(r%60),2)}function Qn(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(t<=4?5:12)-t)}function er(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function tr(e){return function(t){var n=Qn(t.getFullYear()),r=er(t),i=+r-+n,o=1+Math.round(i/6048e5);return Kn(o,e)}}function nr(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function rr(e,t){return e.getFullYear()<=0?t.ERAS[0]:t.ERAS[1]}function ir(e,t){return e.getFullYear()<=0?t.ERANAMES[0]:t.ERANAMES[1]}function or(e){function t(e){var t;if(t=e.match(n)){var r=new Date(0),i=0,o=0,a=t[8]?r.setUTCFullYear:r.setFullYear,s=t[8]?r.setUTCHours:r.setHours;t[9]&&(i=f(t[9]+t[10]),o=f(t[9]+t[11])),a.call(r,f(t[1]),f(t[2])-1,f(t[3]));var u=f(t[4]||0)-i,l=f(t[5]||0)-o,c=f(t[6]||0),d=Math.round(1e3*parseFloat("0."+(t[7]||0)));return s.call(r,u,l,c,d),r}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,i,o){var a,s,u="",l=[];if(i=i||"mediumDate",i=e.DATETIME_FORMATS[i]||i,w(n)&&(n=Po.test(n)?f(n):t(n)),x(n)&&(n=new Date(n)),!_(n)||!isFinite(n.getTime()))return n;for(;i;)s=jo.exec(i),s?(l=z(l,s,1),i=l.pop()):(l.push(i),i=null);var c=n.getTimezoneOffset();return o&&(c=G(o,c),n=K(n,o,!0)),r(l,function(t){a=Mo[t],u+=a?a(n,e.DATETIME_FORMATS,c):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),u}}function ar(){return function(e,t){return $(t)&&(t=2),B(e,t)}}function sr(){return function(e,t,r){return t=Math.abs(Number(t))===1/0?Number(t):f(t),isNaN(t)?e:(x(e)&&(e=e.toString()),n(e)?(r=!r||isNaN(r)?0:f(r),r=r<0?Math.max(0,e.length+r):r,t>=0?ur(e,r,r+t):0===r?ur(e,t,e.length):ur(e,Math.max(0,r+t),r)):e)}}function ur(e,t,n){return w(e)?e.slice(t,n):zr.call(e,t,n)}function lr(e){function r(t){return t.map(function(t){var n=1,r=h;if(S(t))r=t;else if(w(t)&&("+"!=t.charAt(0)&&"-"!=t.charAt(0)||(n="-"==t.charAt(0)?-1:1,t=t.substring(1)),""!==t&&(r=e(t),r.constant))){var i=r();r=function(e){return e[i]}}return{get:r,descending:n}})}function i(e){switch(typeof e){case"number":case"boolean":case"string":return!0;default:return!1}}function o(e){return S(e.valueOf)&&(e=e.valueOf(),i(e))?e:v(e)&&(e=e.toString(),i(e))?e:e}function a(e,t){var n=typeof e;return null===e?(n="string",e="null"):"object"===n&&(e=o(e)),{value:e,type:n,index:t}}function s(e,t){var n=0,r=e.type,i=t.type;if(r===i){var o=e.value,a=t.value;"string"===r?(o=o.toLowerCase(),a=a.toLowerCase()):"object"===r&&(b(o)&&(o=e.index),b(a)&&(a=t.index)),o!==a&&(n=o<a?-1:1)}else n=r<i?-1:1;return n}return function(e,i,o,u){function l(e,t){return{value:e,tieBreaker:{value:t,type:"number",index:t},predicateValues:f.map(function(n){return a(n.get(e),t)})}}function c(e,t){for(var n=0,r=f.length;n<r;n++){var i=p(e.predicateValues[n],t.predicateValues[n]);if(i)return i*f[n].descending*d}return p(e.tieBreaker,t.tieBreaker)*d}if(null==e)return e;if(!n(e))throw t("orderBy")("notarray","Expected array but received: {0}",e);Kr(i)||(i=[i]),0===i.length&&(i=["+"]);var f=r(i),d=o?-1:1,p=S(u)?u:s,h=Array.prototype.map.call(e,l);return h.sort(c),e=h.map(function(e){return e.value})}}function cr(e){return S(e)&&(e={link:e}),e.restrict=e.restrict||"AC",g(e)}function fr(e,t){e.$name=t}function dr(e,t,n,i,o){var a=this,s=[];a.$error={},a.$$success={},a.$pending=void 0,a.$name=o(t.name||t.ngForm||"")(n),a.$dirty=!1,a.$pristine=!0,a.$valid=!0,a.$invalid=!1,a.$submitted=!1,a.$$parentForm=Io,a.$rollbackViewValue=function(){r(s,function(e){e.$rollbackViewValue()})},a.$commitViewValue=function(){r(s,function(e){e.$commitViewValue()})},a.$addControl=function(e){fe(e.$name,"input"),s.push(e),e.$name&&(a[e.$name]=e),e.$$parentForm=a},a.$$renameControl=function(e,t){var n=e.$name;a[n]===e&&delete a[n],a[t]=e,e.$name=t},a.$removeControl=function(e){e.$name&&a[e.$name]===e&&delete a[e.$name],r(a.$pending,function(t,n){a.$setValidity(n,null,e)}),r(a.$error,function(t,n){a.$setValidity(n,null,e)}),r(a.$$success,function(t,n){a.$setValidity(n,null,e)}),R(s,e),e.$$parentForm=Io},Cr({ctrl:this,$element:e,set:function(e,t,n){var r=e[t];if(r){var i=r.indexOf(n);i===-1&&r.push(n)}else e[t]=[n]},unset:function(e,t,n){var r=e[t];r&&(R(r,n),0===r.length&&delete e[t])},$animate:i}),a.$setDirty=function(){i.removeClass(e,wa),i.addClass(e,xa),a.$dirty=!0,a.$pristine=!1,a.$$parentForm.$setDirty()},a.$setPristine=function(){i.setClass(e,wa,xa+" "+Ro),a.$dirty=!1,a.$pristine=!0,a.$submitted=!1,r(s,function(e){e.$setPristine()})},a.$setUntouched=function(){r(s,function(e){e.$setUntouched()})},a.$setSubmitted=function(){i.addClass(e,Ro),a.$submitted=!0,a.$$parentForm.$setSubmitted()}}function pr(e){e.$formatters.push(function(t){return e.$isEmpty(t)?t:t.toString()})}function hr(e,t,n,r,i,o){gr(e,t,n,r,i,o),pr(r)}function gr(e,t,n,r,i,o){var a=Tr(t[0].type);if(!i.android){var s=!1;t.on("compositionstart",function(){s=!0}),t.on("compositionend",function(){s=!1,l()})}var u,l=function(e){if(u&&(o.defer.cancel(u),u=null),!s){var i=t.val(),l=e&&e.type;"password"===a||n.ngTrim&&"false"===n.ngTrim||(i=Zr(i)),(r.$viewValue!==i||""===i&&r.$$hasNativeValidators)&&r.$setViewValue(i,l)}};if(i.hasEvent("input"))t.on("input",l);else{var c=function(e,t,n){u||(u=o.defer(function(){u=null,t&&t.value===n||l(e)}))};t.on("keydown",function(e){var t=e.keyCode;91===t||15<t&&t<19||37<=t&&t<=40||c(e,this,this.value)}),i.hasEvent("paste")&&t.on("paste cut",c)}t.on("change",l),Jo[a]&&r.$$hasNativeValidators&&a===n.type&&t.on(Zo,function(e){if(!u){var t=this[jr],n=t.badInput,r=t.typeMismatch;u=o.defer(function(){u=null,t.badInput===n&&t.typeMismatch===r||l(e)})}}),r.$render=function(){var e=r.$isEmpty(r.$viewValue)?"":r.$viewValue;t.val()!==e&&t.val(e)}}function vr(e,t){if(_(e))return e;if(w(e)){Xo.lastIndex=0;var n=Xo.exec(e);if(n){var r=+n[1],i=+n[2],o=0,a=0,s=0,u=0,l=Qn(r),c=7*(i-1);return t&&(o=t.getHours(),a=t.getMinutes(),s=t.getSeconds(),u=t.getMilliseconds()),new Date(r,0,l.getDate()+c,o,a,s,u)}}return NaN}function $r(e,t){return function(n,i){var o,a;if(_(n))return n;if(w(n)){if('"'==n.charAt(0)&&'"'==n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),Lo.test(n))return new Date(n);if(e.lastIndex=0,o=e.exec(n))return o.shift(),a=i?{yyyy:i.getFullYear(),MM:i.getMonth()+1,dd:i.getDate(),HH:i.getHours(),mm:i.getMinutes(),ss:i.getSeconds(),sss:i.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},r(o,function(e,n){n<t.length&&(a[t[n]]=+e)}),new Date(a.yyyy,a.MM-1,a.dd,a.HH,a.mm,a.ss||0,1e3*a.sss||0)}return NaN}}function mr(e,t,n,r){return function(i,o,a,s,u,l,c){function f(e){return e&&!(e.getTime&&e.getTime()!==e.getTime())}function d(e){return m(e)&&!_(e)?n(e)||void 0:e}br(i,o,a,s),gr(i,o,a,s,u,l);var p,h=s&&s.$options&&s.$options.timezone;if(s.$$parserName=e,s.$parsers.push(function(e){if(s.$isEmpty(e))return null;if(t.test(e)){var r=n(e,p);return h&&(r=K(r,h)),r}}),s.$formatters.push(function(e){if(e&&!_(e))throw Aa("datefmt","Expected `{0}` to be a date",e);return f(e)?(p=e,p&&h&&(p=K(p,h,!0)),c("date")(e,r,h)):(p=null,"")}),m(a.min)||a.ngMin){var g;s.$validators.min=function(e){return!f(e)||$(g)||n(e)>=g},a.$observe("min",function(e){g=d(e),s.$validate()})}if(m(a.max)||a.ngMax){var v;s.$validators.max=function(e){return!f(e)||$(v)||n(e)<=v},a.$observe("max",function(e){v=d(e),s.$validate()})}}}function br(e,t,n,r){var i=t[0],o=r.$$hasNativeValidators=b(i.validity);o&&r.$parsers.push(function(e){var n=t.prop(jr)||{};return n.badInput||n.typeMismatch?void 0:e})}function yr(e,t,n,r,i,o){if(br(e,t,n,r),gr(e,t,n,r,i,o),r.$$parserName="number",r.$parsers.push(function(e){return r.$isEmpty(e)?null:Bo.test(e)?parseFloat(e):void 0}),r.$formatters.push(function(e){if(!r.$isEmpty(e)){if(!x(e))throw Aa("numfmt","Expected `{0}` to be a number",e);e=e.toString()}return e}),m(n.min)||n.ngMin){var a;r.$validators.min=function(e){return r.$isEmpty(e)||$(a)||e>=a},n.$observe("min",function(e){m(e)&&!x(e)&&(e=parseFloat(e)),a=x(e)&&!isNaN(e)?e:void 0,r.$validate()})}if(m(n.max)||n.ngMax){var s;r.$validators.max=function(e){return r.$isEmpty(e)||$(s)||e<=s},n.$observe("max",function(e){m(e)&&!x(e)&&(e=parseFloat(e)),s=x(e)&&!isNaN(e)?e:void 0,r.$validate()})}}function wr(e,t,n,r,i,o){gr(e,t,n,r,i,o),pr(r),r.$$parserName="url",r.$validators.url=function(e,t){var n=e||t;return r.$isEmpty(n)||qo.test(n)}}function xr(e,t,n,r,i,o){gr(e,t,n,r,i,o),pr(r),r.$$parserName="email",r.$validators.email=function(e,t){var n=e||t;return r.$isEmpty(n)||Ho.test(n)}}function _r(e,t,n,r){$(n.name)&&t.attr("name",a());var i=function(e){t[0].checked&&r.$setViewValue(n.value,e&&e.type)};t.on("click",i),r.$render=function(){var e=n.value;t[0].checked=e==r.$viewValue},n.$observe("value",r.$render)}function Sr(e,t,n,r,i){var o;if(m(r)){if(o=e(r),!o.constant)throw Aa("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,r);return o(t)}return i}function kr(e,t,n,r,i,o,a,s){var u=Sr(s,e,"ngTrueValue",n.ngTrueValue,!0),l=Sr(s,e,"ngFalseValue",n.ngFalseValue,!1),c=function(e){r.$setViewValue(t[0].checked,e&&e.type)};t.on("click",c),r.$render=function(){t[0].checked=r.$viewValue},r.$isEmpty=function(e){return e===!1},r.$formatters.push(function(e){return V(e,u)}),r.$parsers.push(function(e){return e?u:l})}function Er(e,t){return e="ngClass"+e,["$animate",function(n){function i(e,t){var n=[];e:for(var r=0;r<e.length;r++){for(var i=e[r],o=0;o<t.length;o++)if(i==t[o])continue e;n.push(i)}return n}function o(e){var t=[];return Kr(e)?(r(e,function(e){t=t.concat(o(e))}),t):w(e)?e.split(" "):b(e)?(r(e,function(e,n){e&&(t=t.concat(n.split(" ")))}),t):e}return{restrict:"AC",link:function(a,s,u){function l(e){var t=f(e,1);u.$addClass(t)}function c(e){var t=f(e,-1);u.$removeClass(t)}function f(e,t){var n=s.data("$classCounts")||he(),i=[];return r(e,function(e){(t>0||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(t>0)&&i.push(e))}),s.data("$classCounts",n),i.join(" ")}function d(e,t){var r=i(t,e),o=i(e,t);r=f(r,1),o=f(o,-1),r&&r.length&&n.addClass(s,r),o&&o.length&&n.removeClass(s,o)}function p(e){if(t===!0||(1&a.$index)===t){var n=o(e||[]);if(h){if(!V(e,h)){var r=o(h);d(r,n)}}else l(n)}h=Kr(e)?e.map(function(e){return ve(e)}):ve(e)}var h;a.$watch(u[e],p,!0),u.$observe("class",function(t){p(a.$eval(u[e]))}),"ngClass"!==e&&a.$watch("$index",function(n,r){var i=1&n;if(i!==(1&r)){var s=o(a.$eval(u[e]));i===t?l(s):c(s)}})}}}]}function Cr(e){function t(e,t,s){$(t)?n("$pending",e,s):r("$pending",e,s),j(t)?t?(c(a.$error,e,s),l(a.$$success,e,s)):(l(a.$error,e,s),c(a.$$success,e,s)):(c(a.$error,e,s),c(a.$$success,e,s)),a.$pending?(i(ka,!0),a.$valid=a.$invalid=void 0,o("",null)):(i(ka,!1),a.$valid=Ar(a.$error),a.$invalid=!a.$valid,o("",a.$valid));var u;u=a.$pending&&a.$pending[e]?void 0:!a.$error[e]&&(!!a.$$success[e]||null),o(e,u),a.$$parentForm.$setValidity(e,u,a)}function n(e,t,n){a[e]||(a[e]={}),l(a[e],t,n)}function r(e,t,n){a[e]&&c(a[e],t,n),Ar(a[e])&&(a[e]=void 0)}function i(e,t){t&&!u[e]?(f.addClass(s,e),u[e]=!0):!t&&u[e]&&(f.removeClass(s,e),u[e]=!1)}function o(e,t){e=e?"-"+se(e,"-"):"",i(ba+e,t===!0),i(ya+e,t===!1)}var a=e.ctrl,s=e.$element,u={},l=e.set,c=e.unset,f=e.$animate;u[ya]=!(u[ba]=s.hasClass(ba)),a.$setValidity=t}function Ar(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function Or(e){e[0].hasAttribute("selected")&&(e[0].selected=!0)}var Mr=/^\/(.+)\/([a-z]*)$/,jr="validity",Pr=Object.prototype.hasOwnProperty,Tr=function(e){return w(e)?e.toLowerCase():e},Dr=function(e){return w(e)?e.toUpperCase():e},Fr=function(e){return w(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},Nr=function(e){return w(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(e.charCodeAt(0)&-33)}):e};"i"!=="I".toLowerCase()&&(Tr=Fr,Dr=Nr);var Ir,Rr,Ur,Vr,zr=[].slice,Lr=[].splice,qr=[].push,Hr=Object.prototype.toString,Br=Object.getPrototypeOf,Wr=t("ng"),Gr=e.angular||(e.angular={}),Xr=0;Ir=e.document.documentMode,p.$inject=[],h.$inject=[];var Kr=Array.isArray,Yr=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,Zr=function(e){return w(e)?e.trim():e},Jr=function(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Qr=function(){function t(){try{return new Function(""),!1}catch(e){return!0}}if(!m(Qr.rules)){var n=e.document.querySelector("[ng-csp]")||e.document.querySelector("[data-ng-csp]");if(n){var r=n.getAttribute("ng-csp")||n.getAttribute("data-ng-csp");Qr.rules={noUnsafeEval:!r||r.indexOf("no-unsafe-eval")!==-1,noInlineStyle:!r||r.indexOf("no-inline-style")!==-1}}else Qr.rules={noUnsafeEval:t(),noInlineStyle:!1}}return Qr.rules},ei=function(){if(m(ei.name_))return ei.name_;var t,n,r,i,o=ni.length;for(n=0;n<o;++n)if(r=ni[n],t=e.document.querySelector("["+r.replace(":","\\:")+"jq]")){i=t.getAttribute(r+"jq");break}return ei.name_=i},ti=/:/g,ni=["ng-","data-ng-","ng:","x-ng-"],ri=/[A-Z]/g,ii=!1,oi=1,ai=2,si=3,ui=8,li=9,ci=11,fi={full:"1.5.8",major:1,minor:5,dot:8,codeName:"arbitrary-fallbacks"};Oe.expando="ng339";var di=Oe.cache={},pi=1,hi=function(e,t,n){e.addEventListener(t,n,!1)},gi=function(e,t,n){e.removeEventListener(t,n,!1)};Oe._data=function(e){return this.cache[e[this.expando]]||{}};var vi=/([\:\-\_]+(.))/g,$i=/^moz([A-Z])/,mi={mouseleave:"mouseout",mouseenter:"mouseover"},bi=t("jqLite"),yi=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,wi=/<|&#?\w+;/,xi=/<([\w:-]+)/,_i=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,Si={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Si.optgroup=Si.option,Si.tbody=Si.tfoot=Si.colgroup=Si.caption=Si.thead,Si.th=Si.td;var ki=e.Node.prototype.contains||function(e){return!!(16&this.compareDocumentPosition(e))},Ei=Oe.prototype={ready:function(t){function n(){r||(r=!0,t())}var r=!1;"complete"===e.document.readyState?e.setTimeout(n):(this.on("DOMContentLoaded",n),Oe(e).on("load",n))},toString:function(){var e=[];return r(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return Rr(e>=0?this[e]:this[this.length+e])},length:0,push:qr,sort:[].sort,splice:[].splice},Ci={};r("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){Ci[Tr(e)]=e});var Ai={};r("input,select,option,textarea,button,form,details".split(","),function(e){Ai[e]=!0});var Oi={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};r({data:Fe,removeData:Te,hasData:Se,cleanData:ke},function(e,t){Oe[t]=e}),r({data:Fe,inheritedData:ze,scope:function(e){return Rr.data(e,"$scope")||ze(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return Rr.data(e,"$isolateScope")||Rr.data(e,"$isolateScopeNoTemplate")},controller:Ve,injector:function(e){return ze(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:Ne,css:function(e,t,n){return t=we(t),m(n)?void(e.style[t]=n):e.style[t]},attr:function(e,t,n){var r=e.nodeType;if(r!==si&&r!==ai&&r!==ui){var i=Tr(t);if(Ci[i]){if(!m(n))return e[t]||(e.attributes.getNamedItem(t)||p).specified?i:void 0;n?(e[t]=!0,e.setAttribute(t,i)):(e[t]=!1,e.removeAttribute(i))}else if(m(n))e.setAttribute(t,n);else if(e.getAttribute){var o=e.getAttribute(t,2);return null===o?void 0:o}}},prop:function(e,t,n){return m(n)?void(e[t]=n):e[t]},text:function(){function e(e,t){if($(t)){var n=e.nodeType;return n===oi||n===si?e.textContent:""}e.textContent=t}return e.$dv="",e}(),val:function(e,t){if($(t)){if(e.multiple&&"select"===I(e)){var n=[];return r(e.options,function(e){e.selected&&n.push(e.value||e.text)}),0===n.length?null:n}return e.value}e.value=t},html:function(e,t){return $(t)?e.innerHTML:(je(e,!0),void(e.innerHTML=t))},empty:Le},function(e,t){Oe.prototype[t]=function(t,n){var r,i,o=this.length;if(e!==Le&&$(2==e.length&&e!==Ne&&e!==Ve?t:n)){if(b(t)){for(r=0;r<o;r++)if(e===Fe)e(this[r],t);else for(i in t)e(this[r],i,t[i]);return this}for(var a=e.$dv,s=$(a)?Math.min(o,1):o,u=0;u<s;u++){var l=e(this[u],t,n);a=a?a+l:l}return a}for(r=0;r<o;r++)e(this[r],t,n);return this}}),r({removeData:Te,on:function(e,t,n,r){if(m(r))throw bi("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(_e(e)){var i=De(e,!0),o=i.events,a=i.handle;a||(a=i.handle=Ge(e,o));for(var s=t.indexOf(" ")>=0?t.split(" "):[t],u=s.length,l=function(t,r,i){var s=o[t];s||(s=o[t]=[],s.specialHandlerWrapper=r,"$destroy"===t||i||hi(e,t,a)),s.push(n)};u--;)t=s[u],mi[t]?(l(mi[t],Ke),l(t,void 0,!0)):l(t)}},off:Pe,one:function(e,t,n){e=Rr(e),e.on(t,function r(){e.off(t,n),e.off(t,r)}),e.on(t,n)},replaceWith:function(e,t){var n,i=e.parentNode;je(e),r(new Oe(t),function(t){n?i.insertBefore(t,n.nextSibling):i.replaceChild(t,e),n=t})},children:function(e){var t=[];return r(e.childNodes,function(e){e.nodeType===oi&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var n=e.nodeType;if(n===oi||n===ci){
6
- t=new Oe(t);for(var r=0,i=t.length;r<i;r++){var o=t[r];e.appendChild(o)}}},prepend:function(e,t){if(e.nodeType===oi){var n=e.firstChild;r(new Oe(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){Ae(e,Rr(t).eq(0).clone()[0])},remove:qe,detach:function(e){qe(e,!0)},after:function(e,t){var n=e,r=e.parentNode;t=new Oe(t);for(var i=0,o=t.length;i<o;i++){var a=t[i];r.insertBefore(a,n.nextSibling),n=a}},addClass:Re,removeClass:Ie,toggleClass:function(e,t,n){t&&r(t.split(" "),function(t){var r=n;$(r)&&(r=!Ne(e,t)),(r?Re:Ie)(e,t)})},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==ci?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:Me,triggerHandler:function(e,t,n){var i,o,a,s=t.type||t,u=De(e),c=u&&u.events,f=c&&c[s];f&&(i={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:p,type:s,target:e},t.type&&(i=l(i,t)),o=ve(f),a=n?[i].concat(n):[i],r(o,function(t){i.isImmediatePropagationStopped()||t.apply(e,a)}))}},function(e,t){Oe.prototype[t]=function(t,n,r){for(var i,o=0,a=this.length;o<a;o++)$(i)?(i=e(this[o],t,n,r),m(i)&&(i=Rr(i))):Ue(i,e(this[o],t,n,r));return m(i)?i:this},Oe.prototype.bind=Oe.prototype.on,Oe.prototype.unbind=Oe.prototype.off}),Je.prototype={put:function(e,t){this[Ze(e,this.nextUid)]=t},get:function(e){return this[Ze(e,this.nextUid)]},remove:function(e){var t=this[e=Ze(e,this.nextUid)];return delete this[e],t}};var Mi=[function(){this.$get=[function(){return Je}]}],ji=/^([^\(]+?)=>/,Pi=/^[^\(]*\(\s*([^\)]*)\)/m,Ti=/,/,Di=/^\s*(_?)(\S+?)\1\s*$/,Fi=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Ni=t("$injector");rt.$$annotate=nt;var Ii=t("$animate"),Ri=1,Ui="ng-animate",Vi=function(){this.$get=p},zi=function(){var e=new Je,t=[];this.$get=["$$AnimateRunner","$rootScope",function(n,i){function o(e,t,n){var i=!1;return t&&(t=w(t)?t.split(" "):Kr(t)?t:[],r(t,function(t){t&&(i=!0,e[t]=n)})),i}function a(){r(t,function(t){var n=e.get(t);if(n){var i=st(t.attr("class")),o="",a="";r(n,function(e,t){var n=!!i[t];e!==n&&(e?o+=(o.length?" ":"")+t:a+=(a.length?" ":"")+t)}),r(t,function(e){o&&Re(e,o),a&&Ie(e,a)}),e.remove(t)}}),t.length=0}function s(n,r,s){var u=e.get(n)||{},l=o(u,r,!0),c=o(u,s,!1);(l||c)&&(e.put(n,u),t.push(n),1===t.length&&i.$$postDigest(a))}return{enabled:p,on:p,off:p,pin:p,push:function(e,t,r,i){i&&i(),r=r||{},r.from&&e.css(r.from),r.to&&e.css(r.to),(r.addClass||r.removeClass)&&s(e,r.addClass,r.removeClass);var o=new n;return o.complete(),o}}}]},Li=["$provide",function(e){var t=this;this.$$registeredAnimations=Object.create(null),this.register=function(n,r){if(n&&"."!==n.charAt(0))throw Ii("notcsel","Expecting class selector starting with '.' got '{0}'.",n);var i=n+"-animation";t.$$registeredAnimations[n.substr(1)]=i,e.factory(i,r)},this.classNameFilter=function(e){if(1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null,this.$$classNameFilter)){var t=new RegExp("(\\s+|\\/)"+Ui+"(\\s+|\\/)");if(t.test(this.$$classNameFilter.toString()))throw Ii("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',Ui)}return this.$$classNameFilter},this.$get=["$$animateQueue",function(e){function t(e,t,n){if(n){var r=at(n);!r||r.parentNode||r.previousElementSibling||(n=null)}n?n.after(e):t.prepend(e)}return{on:e.on,off:e.off,pin:e.pin,enabled:e.enabled,cancel:function(e){e.end&&e.end()},enter:function(n,r,i,o){return r=r&&Rr(r),i=i&&Rr(i),r=r||i.parent(),t(n,r,i),e.push(n,"enter",ut(o))},move:function(n,r,i,o){return r=r&&Rr(r),i=i&&Rr(i),r=r||i.parent(),t(n,r,i),e.push(n,"move",ut(o))},leave:function(t,n){return e.push(t,"leave",ut(n),function(){t.remove()})},addClass:function(t,n,r){return r=ut(r),r.addClass=ot(r.addclass,n),e.push(t,"addClass",r)},removeClass:function(t,n,r){return r=ut(r),r.removeClass=ot(r.removeClass,n),e.push(t,"removeClass",r)},setClass:function(t,n,r,i){return i=ut(i),i.addClass=ot(i.addClass,n),i.removeClass=ot(i.removeClass,r),e.push(t,"setClass",i)},animate:function(t,n,r,i,o){return o=ut(o),o.from=o.from?l(o.from,n):n,o.to=o.to?l(o.to,r):r,i=i||"ng-inline-animate",o.tempClasses=ot(o.tempClasses,i),e.push(t,"animate",o)}}}]}],qi=function(){this.$get=["$$rAF",function(e){function t(t){n.push(t),n.length>1||e(function(){for(var e=0;e<n.length;e++)n[e]();n=[]})}var n=[];return function(){var e=!1;return t(function(){e=!0}),function(n){e?n():t(n)}}}]},Hi=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$document","$timeout",function(e,t,n,i,o){function a(e){this.setHost(e);var t=n(),r=function(e){o(e,0,!1)};this._doneCallbacks=[],this._tick=function(e){var n=i[0];n&&n.hidden?r(e):t(e)},this._state=0}var s=0,u=1,l=2;return a.chain=function(e,t){function n(){return r===e.length?void t(!0):void e[r](function(e){return e===!1?void t(!1):(r++,void n())})}var r=0;n()},a.all=function(e,t){function n(n){o=o&&n,++i===e.length&&t(o)}var i=0,o=!0;r(e,function(e){e.done(n)})},a.prototype={setHost:function(e){this.host=e||{}},done:function(e){this._state===l?e():this._doneCallbacks.push(e)},progress:p,getPromise:function(){if(!this.promise){var t=this;this.promise=e(function(e,n){t.done(function(t){t===!1?n():e()})})}return this.promise},then:function(e,t){return this.getPromise().then(e,t)},"catch":function(e){return this.getPromise()["catch"](e)},"finally":function(e){return this.getPromise()["finally"](e)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end(),this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel(),this._resolve(!1)},complete:function(e){var t=this;t._state===s&&(t._state=u,t._tick(function(){t._resolve(e)}))},_resolve:function(e){this._state!==l&&(r(this._doneCallbacks,function(t){t(e)}),this._doneCallbacks.length=0,this._state=l)}},a}]},Bi=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(e,t,n){return function(t,r){function i(){return e(function(){o(),s||u.complete(),s=!0}),u}function o(){a.addClass&&(t.addClass(a.addClass),a.addClass=null),a.removeClass&&(t.removeClass(a.removeClass),a.removeClass=null),a.to&&(t.css(a.to),a.to=null)}var a=r||{};a.$$prepared||(a=U(a)),a.cleanupStyles&&(a.from=a.to=null),a.from&&(t.css(a.from),a.from=null);var s,u=new n;return{start:i,end:i}}}]},Wi=t("$compile"),Gi=new pt;ht.$inject=["$provide","$$sanitizeUriProvider"],gt.prototype.isFirstChange=function(){return this.previousValue===Gi};var Xi=/^((?:x|data)[\:\-_])/i,Ki=t("$controller"),Yi=/^(\S+)(\s+as\s+([\w$]+))?$/,Zi=function(){this.$get=["$document",function(e){return function(t){return t?!t.nodeType&&t instanceof Rr&&(t=t[0]):t=e[0].body,t.offsetWidth+1}}]},Ji="application/json",Qi={"Content-Type":Ji+";charset=utf-8"},eo=/^\[|^\{(?!\{)/,to={"[":/]$/,"{":/}$/},no=/^\)\]\}',?\n/,ro=t("$http"),io=function(e){return function(){throw ro("legacy","The method `{0}` on the promise returned from `$http` has been disabled.",e)}},oo=Gr.$interpolateMinErr=t("$interpolate");oo.throwNoconcat=function(e){throw oo("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",e)},oo.interr=function(e,t){return oo("interr","Can't interpolate: {0}\n{1}",e,t.toString())};var ao=function(){this.$get=["$window",function(e){function t(e){var t=function(e){t.data=e,t.called=!0};return t.id=e,t}var n=e.angular.callbacks,r={};return{createCallback:function(e){var i="_"+(n.$$counter++).toString(36),o="angular.callbacks."+i,a=t(i);return r[o]=n[i]=a,o},wasCalled:function(e){return r[e].called},getResponse:function(e){return r[e].data},removeCallback:function(e){var t=r[e];delete n[t.id],delete r[e]}}}]},so=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,uo={http:80,https:443,ftp:21},lo=t("$location"),co={$$absUrl:"",$$html5:!1,$$replace:!1,absUrl:Yt("$$absUrl"),url:function(e){if($(e))return this.$$url;var t=so.exec(e);return(t[1]||""===e)&&this.path(decodeURIComponent(t[1])),(t[2]||t[1]||""===e)&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:Yt("$$protocol"),host:Yt("$$host"),port:Yt("$$port"),path:Zt("$$path",function(e){return e=null!==e?e.toString():"","/"==e.charAt(0)?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if(w(e)||x(e))e=e.toString(),this.$$search=J(e);else{if(!b(e))throw lo("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");e=U(e,{}),r(e,function(t,n){null==t&&delete e[n]}),this.$$search=e}break;default:$(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:Zt("$$hash",function(e){return null!==e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};r([Kt,Xt,Gt],function(e){e.prototype=Object.create(co),e.prototype.state=function(t){if(!arguments.length)return this.$$state;if(e!==Gt||!this.$$html5)throw lo("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=$(t)?null:t,this}});var fo=t("$parse"),po=Function.prototype.call,ho=Function.prototype.apply,go=Function.prototype.bind,vo=he();r("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(e){vo[e]=!0});var $o={n:"\n",f:"\f",r:"\r",t:"\t",v:"\x0B","'":"'",'"':'"'},mo=function(e){this.options=e};mo.prototype={constructor:mo,lex:function(e){for(this.text=e,this.index=0,this.tokens=[];this.index<this.text.length;){var t=this.text.charAt(this.index);if('"'===t||"'"===t)this.readString(t);else if(this.isNumber(t)||"."===t&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdentifierStart(this.peekMultichar()))this.readIdent();else if(this.is(t,"(){}[].,;:?"))this.tokens.push({index:this.index,text:t}),this.index++;else if(this.isWhitespace(t))this.index++;else{var n=t+this.peek(),r=n+this.peek(2),i=vo[t],o=vo[n],a=vo[r];if(i||o||a){var s=a?r:o?n:t;this.tokens.push({index:this.index,text:s,operator:!0}),this.index+=s.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(e,t){return t.indexOf(e)!==-1},peek:function(e){var t=e||1;return this.index+t<this.text.length&&this.text.charAt(this.index+t)},isNumber:function(e){return"0"<=e&&e<="9"&&"string"==typeof e},isWhitespace:function(e){return" "===e||"\r"===e||"\t"===e||"\n"===e||"\x0B"===e||" "===e},isIdentifierStart:function(e){return this.options.isIdentifierStart?this.options.isIdentifierStart(e,this.codePointAt(e)):this.isValidIdentifierStart(e)},isValidIdentifierStart:function(e){return"a"<=e&&e<="z"||"A"<=e&&e<="Z"||"_"===e||"$"===e},isIdentifierContinue:function(e){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(e,this.codePointAt(e)):this.isValidIdentifierContinue(e)},isValidIdentifierContinue:function(e,t){return this.isValidIdentifierStart(e,t)||this.isNumber(e)},codePointAt:function(e){return 1===e.length?e.charCodeAt(0):(e.charCodeAt(0)<<10)+e.charCodeAt(1)-56613888},peekMultichar:function(){var e=this.text.charAt(this.index),t=this.peek();if(!t)return e;var n=e.charCodeAt(0),r=t.charCodeAt(0);return n>=55296&&n<=56319&&r>=56320&&r<=57343?e+t:e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){n=n||this.index;var r=m(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n;throw fo("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,r,this.text)},readNumber:function(){for(var e="",t=this.index;this.index<this.text.length;){var n=Tr(this.text.charAt(this.index));if("."==n||this.isNumber(n))e+=n;else{var r=this.peek();if("e"==n&&this.isExpOperator(r))e+=n;else if(this.isExpOperator(n)&&r&&this.isNumber(r)&&"e"==e.charAt(e.length-1))e+=n;else{if(!this.isExpOperator(n)||r&&this.isNumber(r)||"e"!=e.charAt(e.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:t,text:e,constant:!0,value:Number(e)})},readIdent:function(){var e=this.index;for(this.index+=this.peekMultichar().length;this.index<this.text.length;){var t=this.peekMultichar();if(!this.isIdentifierContinue(t))break;this.index+=t.length}this.tokens.push({index:e,text:this.text.slice(e,this.index),identifier:!0})},readString:function(e){var t=this.index;this.index++;for(var n="",r=e,i=!1;this.index<this.text.length;){var o=this.text.charAt(this.index);if(r+=o,i){if("u"===o){var a=this.text.substring(this.index+1,this.index+5);a.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+a+"]"),this.index+=4,n+=String.fromCharCode(parseInt(a,16))}else{var s=$o[o];n+=s||o}i=!1}else if("\\"===o)i=!0;else{if(o===e)return this.index++,void this.tokens.push({index:t,text:r,constant:!0,value:n});n+=o}this.index++}this.throwError("Unterminated quote",t)}};var bo=function(e,t){this.lexer=e,this.options=t};bo.Program="Program",bo.ExpressionStatement="ExpressionStatement",bo.AssignmentExpression="AssignmentExpression",bo.ConditionalExpression="ConditionalExpression",bo.LogicalExpression="LogicalExpression",bo.BinaryExpression="BinaryExpression",bo.UnaryExpression="UnaryExpression",bo.CallExpression="CallExpression",bo.MemberExpression="MemberExpression",bo.Identifier="Identifier",bo.Literal="Literal",bo.ArrayExpression="ArrayExpression",bo.Property="Property",bo.ObjectExpression="ObjectExpression",bo.ThisExpression="ThisExpression",bo.LocalsExpression="LocalsExpression",bo.NGValueParameter="NGValueParameter",bo.prototype={ast:function(e){this.text=e,this.tokens=this.lexer.lex(e);var t=this.program();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),t},program:function(){for(var e=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&e.push(this.expressionStatement()),!this.expect(";"))return{type:bo.Program,body:e}},expressionStatement:function(){return{type:bo.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var e,t=this.expression();e=this.expect("|");)t=this.filter(t);return t},expression:function(){return this.assignment()},assignment:function(){var e=this.ternary();return this.expect("=")&&(e={type:bo.AssignmentExpression,left:e,right:this.assignment(),operator:"="}),e},ternary:function(){var e,t,n=this.logicalOR();return this.expect("?")&&(e=this.expression(),this.consume(":"))?(t=this.expression(),{type:bo.ConditionalExpression,test:n,alternate:e,consequent:t}):n},logicalOR:function(){for(var e=this.logicalAND();this.expect("||");)e={type:bo.LogicalExpression,operator:"||",left:e,right:this.logicalAND()};return e},logicalAND:function(){for(var e=this.equality();this.expect("&&");)e={type:bo.LogicalExpression,operator:"&&",left:e,right:this.equality()};return e},equality:function(){for(var e,t=this.relational();e=this.expect("==","!=","===","!==");)t={type:bo.BinaryExpression,operator:e.text,left:t,right:this.relational()};return t},relational:function(){for(var e,t=this.additive();e=this.expect("<",">","<=",">=");)t={type:bo.BinaryExpression,operator:e.text,left:t,right:this.additive()};return t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t={type:bo.BinaryExpression,operator:e.text,left:t,right:this.multiplicative()};return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t={type:bo.BinaryExpression,operator:e.text,left:t,right:this.unary()};return t},unary:function(){var e;return(e=this.expect("+","-","!"))?{type:bo.UnaryExpression,operator:e.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var e;this.expect("(")?(e=this.filterChain(),this.consume(")")):this.expect("[")?e=this.arrayDeclaration():this.expect("{")?e=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?e=U(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?e={type:bo.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?e=this.identifier():this.peek().constant?e=this.constant():this.throwError("not a primary expression",this.peek());for(var t;t=this.expect("(","[",".");)"("===t.text?(e={type:bo.CallExpression,callee:e,arguments:this.parseArguments()},this.consume(")")):"["===t.text?(e={type:bo.MemberExpression,object:e,property:this.expression(),computed:!0},this.consume("]")):"."===t.text?e={type:bo.MemberExpression,object:e,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return e},filter:function(e){for(var t=[e],n={type:bo.CallExpression,callee:this.identifier(),arguments:t,filter:!0};this.expect(":");)t.push(this.expression());return n},parseArguments:function(){var e=[];if(")"!==this.peekToken().text)do e.push(this.filterChain());while(this.expect(","));return e},identifier:function(){var e=this.consume();return e.identifier||this.throwError("is not a valid identifier",e),{type:bo.Identifier,name:e.text}},constant:function(){return{type:bo.Literal,value:this.consume().value}},arrayDeclaration:function(){var e=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;e.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:bo.ArrayExpression,elements:e}},object:function(){var e,t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;e={type:bo.Property,kind:"init"},this.peek().constant?(e.key=this.constant(),e.computed=!1,this.consume(":"),e.value=this.expression()):this.peek().identifier?(e.key=this.identifier(),e.computed=!1,this.peek(":")?(this.consume(":"),e.value=this.expression()):e.value=e.key):this.peek("[")?(this.consume("["),e.key=this.expression(),this.consume("]"),e.computed=!0,this.consume(":"),e.value=this.expression()):this.throwError("invalid key",this.peek()),t.push(e)}while(this.expect(","));return this.consume("}"),{type:bo.ObjectExpression,properties:t}},throwError:function(e,t){throw fo("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",t.text,e,t.index+1,this.text,this.text.substring(t.index))},consume:function(e){if(0===this.tokens.length)throw fo("ueoe","Unexpected end of expression: {0}",this.text);var t=this.expect(e);return t||this.throwError("is unexpected, expecting ["+e+"]",this.peek()),t},peekToken:function(){if(0===this.tokens.length)throw fo("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e,t,n,r){return this.peekAhead(0,e,t,n,r)},peekAhead:function(e,t,n,r,i){if(this.tokens.length>e){var o=this.tokens[e],a=o.text;if(a===t||a===n||a===r||a===i||!t&&!n&&!r&&!i)return o}return!1},expect:function(e,t,n,r){var i=this.peek(e,t,n,r);return!!i&&(this.tokens.shift(),i)},selfReferential:{"this":{type:bo.ThisExpression},$locals:{type:bo.LocalsExpression}}},gn.prototype={compile:function(e,t){var n=this,i=this.astBuilder.ast(e);this.state={nextId:0,filters:{},expensiveChecks:t,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},ln(i,n.$filter);var o,a="";if(this.stage="assign",o=dn(i)){this.state.computing="assign";var s=this.nextId();this.recurse(o,s),this.return_(s),a="fn.assign="+this.generateFunction("assign","s,v,l")}var u=cn(i.body);n.stage="inputs",r(u,function(e,t){var r="fn"+t;n.state[r]={vars:[],body:[],own:{}},n.state.computing=r;var i=n.nextId();n.recurse(e,i),n.return_(i),n.state.inputs.push(r),e.watchId=t}),this.state.computing="fn",this.stage="main",this.recurse(i);var l='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+a+this.watchFns()+"return fn;",c=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",l)(this.$filter,en,nn,rn,tn,on,an,sn,e);return this.state=this.stage=void 0,c.literal=pn(i),c.constant=hn(i),c},USE:"use",STRICT:"strict",watchFns:function(){var e=[],t=this.state.inputs,n=this;return r(t,function(t){e.push("var "+t+"="+n.generateFunction(t,"s"))}),t.length&&e.push("fn.inputs=["+t.join(",")+"];"),e.join("")},generateFunction:function(e,t){return"function("+t+"){"+this.varsPrefix(e)+this.body(e)+"};"},filterPrefix:function(){var e=[],t=this;return r(this.state.filters,function(n,r){e.push(n+"=$filter("+t.escape(r)+")")}),e.length?"var "+e.join(",")+";":""},varsPrefix:function(e){return this.state[e].vars.length?"var "+this.state[e].vars.join(",")+";":""},body:function(e){return this.state[e].body.join("")},recurse:function(e,t,n,i,o,a){var s,u,l,c,f,d=this;if(i=i||p,!a&&m(e.watchId))return t=t||this.nextId(),void this.if_("i",this.lazyAssign(t,this.computedMember("i",e.watchId)),this.lazyRecurse(e,t,n,i,o,!0));switch(e.type){case bo.Program:r(e.body,function(t,n){d.recurse(t.expression,void 0,void 0,function(e){u=e}),n!==e.body.length-1?d.current().body.push(u,";"):d.return_(u)});break;case bo.Literal:c=this.escape(e.value),this.assign(t,c),i(c);break;case bo.UnaryExpression:this.recurse(e.argument,void 0,void 0,function(e){u=e}),c=e.operator+"("+this.ifDefined(u,0)+")",this.assign(t,c),i(c);break;case bo.BinaryExpression:this.recurse(e.left,void 0,void 0,function(e){s=e}),this.recurse(e.right,void 0,void 0,function(e){u=e}),c="+"===e.operator?this.plus(s,u):"-"===e.operator?this.ifDefined(s,0)+e.operator+this.ifDefined(u,0):"("+s+")"+e.operator+"("+u+")",this.assign(t,c),i(c);break;case bo.LogicalExpression:t=t||this.nextId(),d.recurse(e.left,t),d.if_("&&"===e.operator?t:d.not(t),d.lazyRecurse(e.right,t)),i(t);break;case bo.ConditionalExpression:t=t||this.nextId(),d.recurse(e.test,t),d.if_(t,d.lazyRecurse(e.alternate,t),d.lazyRecurse(e.consequent,t)),i(t);break;case bo.Identifier:t=t||this.nextId(),n&&(n.context="inputs"===d.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",e.name)+"?l:s"),n.computed=!1,n.name=e.name),en(e.name),d.if_("inputs"===d.stage||d.not(d.getHasOwnProperty("l",e.name)),function(){d.if_("inputs"===d.stage||"s",function(){o&&1!==o&&d.if_(d.not(d.nonComputedMember("s",e.name)),d.lazyAssign(d.nonComputedMember("s",e.name),"{}")),d.assign(t,d.nonComputedMember("s",e.name))})},t&&d.lazyAssign(t,d.nonComputedMember("l",e.name))),(d.state.expensiveChecks||$n(e.name))&&d.addEnsureSafeObject(t),i(t);break;case bo.MemberExpression:s=n&&(n.context=this.nextId())||this.nextId(),t=t||this.nextId(),d.recurse(e.object,s,void 0,function(){d.if_(d.notNull(s),function(){o&&1!==o&&d.addEnsureSafeAssignContext(s),e.computed?(u=d.nextId(),d.recurse(e.property,u),d.getStringValue(u),d.addEnsureSafeMemberName(u),o&&1!==o&&d.if_(d.not(d.computedMember(s,u)),d.lazyAssign(d.computedMember(s,u),"{}")),c=d.ensureSafeObject(d.computedMember(s,u)),d.assign(t,c),n&&(n.computed=!0,n.name=u)):(en(e.property.name),o&&1!==o&&d.if_(d.not(d.nonComputedMember(s,e.property.name)),d.lazyAssign(d.nonComputedMember(s,e.property.name),"{}")),c=d.nonComputedMember(s,e.property.name),(d.state.expensiveChecks||$n(e.property.name))&&(c=d.ensureSafeObject(c)),d.assign(t,c),n&&(n.computed=!1,n.name=e.property.name))},function(){d.assign(t,"undefined")}),i(t)},!!o);break;case bo.CallExpression:t=t||this.nextId(),e.filter?(u=d.filter(e.callee.name),l=[],r(e.arguments,function(e){var t=d.nextId();d.recurse(e,t),l.push(t)}),c=u+"("+l.join(",")+")",d.assign(t,c),i(t)):(u=d.nextId(),s={},l=[],d.recurse(e.callee,u,s,function(){d.if_(d.notNull(u),function(){d.addEnsureSafeFunction(u),r(e.arguments,function(e){d.recurse(e,d.nextId(),void 0,function(e){l.push(d.ensureSafeObject(e))})}),s.name?(d.state.expensiveChecks||d.addEnsureSafeObject(s.context),c=d.member(s.context,s.name,s.computed)+"("+l.join(",")+")"):c=u+"("+l.join(",")+")",c=d.ensureSafeObject(c),d.assign(t,c)},function(){d.assign(t,"undefined")}),i(t)}));break;case bo.AssignmentExpression:if(u=this.nextId(),s={},!fn(e.left))throw fo("lval","Trying to assign a value to a non l-value");this.recurse(e.left,void 0,s,function(){d.if_(d.notNull(s.context),function(){d.recurse(e.right,u),d.addEnsureSafeObject(d.member(s.context,s.name,s.computed)),d.addEnsureSafeAssignContext(s.context),c=d.member(s.context,s.name,s.computed)+e.operator+u,d.assign(t,c),i(t||c)})},1);break;case bo.ArrayExpression:l=[],r(e.elements,function(e){d.recurse(e,d.nextId(),void 0,function(e){l.push(e)})}),c="["+l.join(",")+"]",this.assign(t,c),i(c);break;case bo.ObjectExpression:l=[],f=!1,r(e.properties,function(e){e.computed&&(f=!0)}),f?(t=t||this.nextId(),this.assign(t,"{}"),r(e.properties,function(e){e.computed?(s=d.nextId(),d.recurse(e.key,s)):s=e.key.type===bo.Identifier?e.key.name:""+e.key.value,u=d.nextId(),d.recurse(e.value,u),d.assign(d.member(t,s,e.computed),u)})):(r(e.properties,function(t){d.recurse(t.value,e.constant?void 0:d.nextId(),void 0,function(e){l.push(d.escape(t.key.type===bo.Identifier?t.key.name:""+t.key.value)+":"+e)})}),c="{"+l.join(",")+"}",this.assign(t,c)),i(t||c);break;case bo.ThisExpression:this.assign(t,"s"),i("s");break;case bo.LocalsExpression:this.assign(t,"l"),i("l");break;case bo.NGValueParameter:this.assign(t,"v"),i("v")}},getHasOwnProperty:function(e,t){var n=e+"."+t,r=this.current().own;return r.hasOwnProperty(n)||(r[n]=this.nextId(!1,e+"&&("+this.escape(t)+" in "+e+")")),r[n]},assign:function(e,t){if(e)return this.current().body.push(e,"=",t,";"),e},filter:function(e){return this.state.filters.hasOwnProperty(e)||(this.state.filters[e]=this.nextId(!0)),this.state.filters[e]},ifDefined:function(e,t){return"ifDefined("+e+","+this.escape(t)+")"},plus:function(e,t){return"plus("+e+","+t+")"},return_:function(e){this.current().body.push("return ",e,";")},if_:function(e,t,n){if(e===!0)t();else{var r=this.current().body;r.push("if(",e,"){"),t(),r.push("}"),n&&(r.push("else{"),n(),r.push("}"))}},not:function(e){return"!("+e+")"},notNull:function(e){return e+"!=null"},nonComputedMember:function(e,t){var n=/[$_a-zA-Z][$_a-zA-Z0-9]*/,r=/[^$_a-zA-Z0-9]/g;return n.test(t)?e+"."+t:e+'["'+t.replace(r,this.stringEscapeFn)+'"]'},computedMember:function(e,t){return e+"["+t+"]"},member:function(e,t,n){return n?this.computedMember(e,t):this.nonComputedMember(e,t)},addEnsureSafeObject:function(e){this.current().body.push(this.ensureSafeObject(e),";")},addEnsureSafeMemberName:function(e){this.current().body.push(this.ensureSafeMemberName(e),";")},addEnsureSafeFunction:function(e){this.current().body.push(this.ensureSafeFunction(e),";")},addEnsureSafeAssignContext:function(e){this.current().body.push(this.ensureSafeAssignContext(e),";")},ensureSafeObject:function(e){return"ensureSafeObject("+e+",text)"},ensureSafeMemberName:function(e){return"ensureSafeMemberName("+e+",text)"},ensureSafeFunction:function(e){return"ensureSafeFunction("+e+",text)"},getStringValue:function(e){this.assign(e,"getStringValue("+e+")")},ensureSafeAssignContext:function(e){return"ensureSafeAssignContext("+e+",text)"},lazyRecurse:function(e,t,n,r,i,o){var a=this;return function(){a.recurse(e,t,n,r,i,o)}},lazyAssign:function(e,t){var n=this;return function(){n.assign(e,t)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)},escape:function(e){if(w(e))return"'"+e.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(x(e))return e.toString();if(e===!0)return"true";if(e===!1)return"false";if(null===e)return"null";if("undefined"==typeof e)return"undefined";throw fo("esc","IMPOSSIBLE")},nextId:function(e,t){var n="v"+this.state.nextId++;return e||this.current().vars.push(n+(t?"="+t:"")),n},current:function(){return this.state[this.state.computing]}},vn.prototype={compile:function(e,t){var n=this,i=this.astBuilder.ast(e);this.expression=e,this.expensiveChecks=t,ln(i,n.$filter);var o,a;(o=dn(i))&&(a=this.recurse(o));var s,u=cn(i.body);u&&(s=[],r(u,function(e,t){var r=n.recurse(e);e.input=r,s.push(r),e.watchId=t}));var l=[];r(i.body,function(e){l.push(n.recurse(e.expression))});var c=0===i.body.length?p:1===i.body.length?l[0]:function(e,t){var n;return r(l,function(r){n=r(e,t)}),n};return a&&(c.assign=function(e,t,n){return a(e,n,t)}),s&&(c.inputs=s),c.literal=pn(i),c.constant=hn(i),c},recurse:function(e,t,n){var i,o,a,s=this;if(e.input)return this.inputs(e.input,e.watchId);switch(e.type){case bo.Literal:return this.value(e.value,t);case bo.UnaryExpression:return o=this.recurse(e.argument),this["unary"+e.operator](o,t);case bo.BinaryExpression:return i=this.recurse(e.left),o=this.recurse(e.right),this["binary"+e.operator](i,o,t);case bo.LogicalExpression:return i=this.recurse(e.left),o=this.recurse(e.right),this["binary"+e.operator](i,o,t);case bo.ConditionalExpression:return this["ternary?:"](this.recurse(e.test),this.recurse(e.alternate),this.recurse(e.consequent),t);case bo.Identifier:return en(e.name,s.expression),s.identifier(e.name,s.expensiveChecks||$n(e.name),t,n,s.expression);case bo.MemberExpression:return i=this.recurse(e.object,!1,!!n),e.computed||(en(e.property.name,s.expression),o=e.property.name),e.computed&&(o=this.recurse(e.property)),e.computed?this.computedMember(i,o,t,n,s.expression):this.nonComputedMember(i,o,s.expensiveChecks,t,n,s.expression);case bo.CallExpression:return a=[],r(e.arguments,function(e){a.push(s.recurse(e))}),e.filter&&(o=this.$filter(e.callee.name)),e.filter||(o=this.recurse(e.callee,!0)),e.filter?function(e,n,r,i){for(var s=[],u=0;u<a.length;++u)s.push(a[u](e,n,r,i));var l=o.apply(void 0,s,i);return t?{context:void 0,name:void 0,value:l}:l}:function(e,n,r,i){var u,l=o(e,n,r,i);if(null!=l.value){nn(l.context,s.expression),rn(l.value,s.expression);for(var c=[],f=0;f<a.length;++f)c.push(nn(a[f](e,n,r,i),s.expression));u=nn(l.value.apply(l.context,c),s.expression)}return t?{value:u}:u};case bo.AssignmentExpression:return i=this.recurse(e.left,!0,1),o=this.recurse(e.right),function(e,n,r,a){var u=i(e,n,r,a),l=o(e,n,r,a);return nn(u.value,s.expression),on(u.context),u.context[u.name]=l,t?{value:l}:l};case bo.ArrayExpression:return a=[],r(e.elements,function(e){a.push(s.recurse(e))}),function(e,n,r,i){for(var o=[],s=0;s<a.length;++s)o.push(a[s](e,n,r,i));return t?{value:o}:o};case bo.ObjectExpression:return a=[],r(e.properties,function(e){e.computed?a.push({key:s.recurse(e.key),computed:!0,value:s.recurse(e.value)}):a.push({key:e.key.type===bo.Identifier?e.key.name:""+e.key.value,computed:!1,value:s.recurse(e.value)})}),function(e,n,r,i){for(var o={},s=0;s<a.length;++s)a[s].computed?o[a[s].key(e,n,r,i)]=a[s].value(e,n,r,i):o[a[s].key]=a[s].value(e,n,r,i);return t?{value:o}:o};case bo.ThisExpression:return function(e){return t?{value:e}:e};case bo.LocalsExpression:return function(e,n){return t?{value:n}:n};case bo.NGValueParameter:return function(e,n,r){return t?{value:r}:r}}},"unary+":function(e,t){return function(n,r,i,o){var a=e(n,r,i,o);return a=m(a)?+a:0,t?{value:a}:a}},"unary-":function(e,t){return function(n,r,i,o){var a=e(n,r,i,o);return a=m(a)?-a:0,t?{value:a}:a}},"unary!":function(e,t){return function(n,r,i,o){var a=!e(n,r,i,o);return t?{value:a}:a}},"binary+":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a),u=t(r,i,o,a),l=sn(s,u);return n?{value:l}:l}},"binary-":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a),u=t(r,i,o,a),l=(m(s)?s:0)-(m(u)?u:0);return n?{value:l}:l}},"binary*":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)*t(r,i,o,a);return n?{value:s}:s}},"binary/":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)/t(r,i,o,a);return n?{value:s}:s}},"binary%":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)%t(r,i,o,a);return n?{value:s}:s}},"binary===":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)===t(r,i,o,a);return n?{value:s}:s}},"binary!==":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)!==t(r,i,o,a);return n?{value:s}:s}},"binary==":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)==t(r,i,o,a);return n?{
7
- value:s}:s}},"binary!=":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)!=t(r,i,o,a);return n?{value:s}:s}},"binary<":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)<t(r,i,o,a);return n?{value:s}:s}},"binary>":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)>t(r,i,o,a);return n?{value:s}:s}},"binary<=":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)<=t(r,i,o,a);return n?{value:s}:s}},"binary>=":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)>=t(r,i,o,a);return n?{value:s}:s}},"binary&&":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)&&t(r,i,o,a);return n?{value:s}:s}},"binary||":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)||t(r,i,o,a);return n?{value:s}:s}},"ternary?:":function(e,t,n,r){return function(i,o,a,s){var u=e(i,o,a,s)?t(i,o,a,s):n(i,o,a,s);return r?{value:u}:u}},value:function(e,t){return function(){return t?{context:void 0,name:void 0,value:e}:e}},identifier:function(e,t,n,r,i){return function(o,a,s,u){var l=a&&e in a?a:o;r&&1!==r&&l&&!l[e]&&(l[e]={});var c=l?l[e]:void 0;return t&&nn(c,i),n?{context:l,name:e,value:c}:c}},computedMember:function(e,t,n,r,i){return function(o,a,s,u){var l,c,f=e(o,a,s,u);return null!=f&&(l=t(o,a,s,u),l=tn(l),en(l,i),r&&1!==r&&(on(f),f&&!f[l]&&(f[l]={})),c=f[l],nn(c,i)),n?{context:f,name:l,value:c}:c}},nonComputedMember:function(e,t,n,r,i,o){return function(a,s,u,l){var c=e(a,s,u,l);i&&1!==i&&(on(c),c&&!c[t]&&(c[t]={}));var f=null!=c?c[t]:void 0;return(n||$n(t))&&nn(f,o),r?{context:c,name:t,value:f}:f}},inputs:function(e,t){return function(n,r,i,o){return o?o[t]:e(n,r,i)}}};var yo=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n,this.ast=new bo(e,n),this.astCompiler=n.csp?new vn(this.ast,t):new gn(this.ast,t)};yo.prototype={constructor:yo,parse:function(e){return this.astCompiler.compile(e,this.options.expensiveChecks)}};var wo=Object.prototype.valueOf,xo=t("$sce"),_o={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},So=t("$compile"),ko=e.document.createElement("a"),Eo=Dn(e.location.href);In.$inject=["$document"],Un.$inject=["$provide"];var Co=22,Ao=".",Oo="0";Hn.$inject=["$locale"],Bn.$inject=["$locale"];var Mo={yyyy:Yn("FullYear",4,0,!1,!0),yy:Yn("FullYear",2,0,!0,!0),y:Yn("FullYear",1,0,!1,!0),MMMM:Zn("Month"),MMM:Zn("Month",!0),MM:Yn("Month",2,1),M:Yn("Month",1,1),LLLL:Zn("Month",!1,!0),dd:Yn("Date",2),d:Yn("Date",1),HH:Yn("Hours",2),H:Yn("Hours",1),hh:Yn("Hours",2,-12),h:Yn("Hours",1,-12),mm:Yn("Minutes",2),m:Yn("Minutes",1),ss:Yn("Seconds",2),s:Yn("Seconds",1),sss:Yn("Milliseconds",3),EEEE:Zn("Day"),EEE:Zn("Day",!0),a:nr,Z:Jn,ww:tr(2),w:tr(1),G:rr,GG:rr,GGG:rr,GGGG:ir},jo=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,Po=/^\-?\d+$/;or.$inject=["$locale"];var To=g(Tr),Do=g(Dr);lr.$inject=["$parse"];var Fo=g({restrict:"E",compile:function(e,t){if(!t.href&&!t.xlinkHref)return function(e,t){if("a"===t[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===Hr.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}}),No={};r(Ci,function(e,t){function n(e,n,i){e.$watch(i[r],function(e){i.$set(t,!!e)})}if("multiple"!=e){var r=vt("ng-"+t),i=n;"checked"===e&&(i=function(e,t,i){i.ngModel!==i[r]&&n(e,t,i)}),No[r]=function(){return{restrict:"A",priority:100,link:i}}}}),r(Oi,function(e,t){No[t]=function(){return{priority:100,link:function(e,n,r){if("ngPattern"===t&&"/"==r.ngPattern.charAt(0)){var i=r.ngPattern.match(Mr);if(i)return void r.$set("ngPattern",new RegExp(i[1],i[2]))}e.$watch(r[t],function(e){r.$set(t,e)})}}}}),r(["src","srcset","href"],function(e){var t=vt("ng-"+e);No[t]=function(){return{priority:99,link:function(n,r,i){var o=e,a=e;"href"===e&&"[object SVGAnimatedString]"===Hr.call(r.prop("href"))&&(a="xlinkHref",i.$attr[a]="xlink:href",o=null),i.$observe(t,function(t){return t?(i.$set(a,t),void(Ir&&o&&r.prop(o,i[a]))):void("href"===e&&i.$set(a,null))})}}}});var Io={$addControl:p,$$renameControl:fr,$removeControl:p,$setValidity:p,$setDirty:p,$setPristine:p,$setSubmitted:p},Ro="ng-submitted";dr.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Uo=function(e){return["$timeout","$parse",function(t,n){function r(e){return""===e?n('this[""]').assign:n(e).assign||p}var i={name:"form",restrict:e?"EAC":"E",require:["form","^^?form"],controller:dr,compile:function(n,i){n.addClass(wa).addClass(ba);var o=i.name?"name":!(!e||!i.ngForm)&&"ngForm";return{pre:function(e,n,i,a){var s=a[0];if(!("action"in i)){var u=function(t){e.$apply(function(){s.$commitViewValue(),s.$setSubmitted()}),t.preventDefault()};hi(n[0],"submit",u),n.on("$destroy",function(){t(function(){gi(n[0],"submit",u)},0,!1)})}var c=a[1]||s.$$parentForm;c.$addControl(s);var f=o?r(s.$name):p;o&&(f(e,s),i.$observe(o,function(t){s.$name!==t&&(f(e,void 0),s.$$parentForm.$$renameControl(s,t),(f=r(s.$name))(e,s))})),n.on("$destroy",function(){s.$$parentForm.$removeControl(s),f(e,void 0),l(s,Io)})}}}};return i}]},Vo=Uo(),zo=Uo(!0),Lo=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,qo=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:\/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,Ho=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,Bo=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Wo=/^(\d{4,})-(\d{2})-(\d{2})$/,Go=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Xo=/^(\d{4,})-W(\d\d)$/,Ko=/^(\d{4,})-(\d\d)$/,Yo=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Zo="keydown wheel mousedown",Jo=he();r("date,datetime-local,month,time,week".split(","),function(e){Jo[e]=!0});var Qo={text:hr,date:mr("date",Wo,$r(Wo,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":mr("datetimelocal",Go,$r(Go,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:mr("time",Yo,$r(Yo,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:mr("week",Xo,vr,"yyyy-Www"),month:mr("month",Ko,$r(Ko,["yyyy","MM"]),"yyyy-MM"),number:yr,url:wr,email:xr,radio:_r,checkbox:kr,hidden:p,button:p,submit:p,reset:p,file:p},ea=["$browser","$sniffer","$filter","$parse",function(e,t,n,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(i,o,a,s){s[0]&&(Qo[Tr(a.type)]||Qo.text)(i,o,a,s[0],t,e,n,r)}}}}],ta=/^(true|false|\d+)$/,na=function(){return{restrict:"A",priority:100,compile:function(e,t){return ta.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e)})}}}},ra=["$compile",function(e){return{restrict:"AC",compile:function(t){return e.$$addBindingClass(t),function(t,n,r){e.$$addBindingInfo(n,r.ngBind),n=n[0],t.$watch(r.ngBind,function(e){n.textContent=$(e)?"":e})}}}}],ia=["$interpolate","$compile",function(e,t){return{compile:function(n){return t.$$addBindingClass(n),function(n,r,i){var o=e(r.attr(i.$attr.ngBindTemplate));t.$$addBindingInfo(r,o.expressions),r=r[0],i.$observe("ngBindTemplate",function(e){r.textContent=$(e)?"":e})}}}}],oa=["$sce","$parse","$compile",function(e,t,n){return{restrict:"A",compile:function(r,i){var o=t(i.ngBindHtml),a=t(i.ngBindHtml,function(t){return e.valueOf(t)});return n.$$addBindingClass(r),function(t,r,i){n.$$addBindingInfo(r,i.ngBindHtml),t.$watch(a,function(){var n=o(t);r.html(e.getTrustedHtml(n)||"")})}}}}],aa=g({restrict:"A",require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),sa=Er("",!0),ua=Er("Odd",0),la=Er("Even",1),ca=cr({compile:function(e,t){t.$set("ngCloak",void 0),e.removeClass("ng-cloak")}}),fa=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],da={},pa={blur:!0,focus:!0};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=vt("ng-"+e);da[t]=["$parse","$rootScope",function(n,r){return{restrict:"A",compile:function(i,o){var a=n(o[t],null,!0);return function(t,n){n.on(e,function(n){var i=function(){a(t,{$event:n})};pa[e]&&r.$$phase?t.$evalAsync(i):t.$apply(i)})}}}}]});var ha=["$animate","$compile",function(e,t){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,r,i,o,a){var s,u,l;n.$watch(i.ngIf,function(n){n?u||a(function(n,o){u=o,n[n.length++]=t.$$createComment("end ngIf",i.ngIf),s={clone:n},e.enter(n,r.parent(),r)}):(l&&(l.remove(),l=null),u&&(u.$destroy(),u=null),s&&(l=pe(s.clone),e.leave(l).then(function(){l=null}),s=null))})}}}],ga=["$templateRequest","$anchorScroll","$animate",function(e,t,n){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Gr.noop,compile:function(r,i){var o=i.ngInclude||i.src,a=i.onload||"",s=i.autoscroll;return function(r,i,u,l,c){var f,d,p,h=0,g=function(){d&&(d.remove(),d=null),f&&(f.$destroy(),f=null),p&&(n.leave(p).then(function(){d=null}),d=p,p=null)};r.$watch(o,function(o){var u=function(){!m(s)||s&&!r.$eval(s)||t()},d=++h;o?(e(o,!0).then(function(e){if(!r.$$destroyed&&d===h){var t=r.$new();l.template=e;var s=c(t,function(e){g(),n.enter(e,null,i).then(u)});f=t,p=s,f.$emit("$includeContentLoaded",o),r.$eval(a)}},function(){r.$$destroyed||d===h&&(g(),r.$emit("$includeContentError",o))}),r.$emit("$includeContentRequested",o)):(g(),l.template=null)})}}}}],va=["$compile",function(t){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,r,i,o){return Hr.call(r[0]).match(/SVG/)?(r.empty(),void t(Ee(o.template,e.document).childNodes)(n,function(e){r.append(e)},{futureParentElement:r})):(r.html(o.template),void t(r.contents())(n))}}}],$a=cr({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),ma=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,n,i){var o=t.attr(n.$attr.ngList)||", ",a="false"!==n.ngTrim,s=a?Zr(o):o,u=function(e){if(!$(e)){var t=[];return e&&r(e.split(s),function(e){e&&t.push(a?Zr(e):e)}),t}};i.$parsers.push(u),i.$formatters.push(function(e){if(Kr(e))return e.join(o)}),i.$isEmpty=function(e){return!e||!e.length}}}},ba="ng-valid",ya="ng-invalid",wa="ng-pristine",xa="ng-dirty",_a="ng-untouched",Sa="ng-touched",ka="ng-pending",Ea="ng-empty",Ca="ng-not-empty",Aa=t("ngModel"),Oa=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(e,t,n,i,o,a,s,u,l,c){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=void 0,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=void 0,this.$name=c(n.name||"",!1)(e),this.$$parentForm=Io;var f,d=o(n.ngModel),h=d.assign,g=d,v=h,b=null,y=this;this.$$setOptions=function(e){if(y.$options=e,e&&e.getterSetter){var t=o(n.ngModel+"()"),r=o(n.ngModel+"($$$p)");g=function(e){var n=d(e);return S(n)&&(n=t(e)),n},v=function(e,t){S(d(e))?r(e,{$$$p:t}):h(e,t)}}else if(!d.assign)throw Aa("nonassign","Expression '{0}' is non-assignable. Element: {1}",n.ngModel,Y(i))},this.$render=p,this.$isEmpty=function(e){return $(e)||""===e||null===e||e!==e},this.$$updateEmptyClasses=function(e){y.$isEmpty(e)?(a.removeClass(i,Ca),a.addClass(i,Ea)):(a.removeClass(i,Ea),a.addClass(i,Ca))};var w=0;Cr({ctrl:this,$element:i,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]},$animate:a}),this.$setPristine=function(){y.$dirty=!1,y.$pristine=!0,a.removeClass(i,xa),a.addClass(i,wa)},this.$setDirty=function(){y.$dirty=!0,y.$pristine=!1,a.removeClass(i,wa),a.addClass(i,xa),y.$$parentForm.$setDirty()},this.$setUntouched=function(){y.$touched=!1,y.$untouched=!0,a.setClass(i,_a,Sa)},this.$setTouched=function(){y.$touched=!0,y.$untouched=!1,a.setClass(i,Sa,_a)},this.$rollbackViewValue=function(){s.cancel(b),y.$viewValue=y.$$lastCommittedViewValue,y.$render()},this.$validate=function(){if(!x(y.$modelValue)||!isNaN(y.$modelValue)){var e=y.$$lastCommittedViewValue,t=y.$$rawModelValue,n=y.$valid,r=y.$modelValue,i=y.$options&&y.$options.allowInvalid;y.$$runValidators(t,e,function(e){i||n===e||(y.$modelValue=e?t:void 0,y.$modelValue!==r&&y.$$writeModelToScope())})}},this.$$runValidators=function(e,t,n){function i(){var e=y.$$parserName||"parse";return $(f)?(s(e,null),!0):(f||(r(y.$validators,function(e,t){s(t,null)}),r(y.$asyncValidators,function(e,t){s(t,null)})),s(e,f),f)}function o(){var n=!0;return r(y.$validators,function(r,i){var o=r(e,t);n=n&&o,s(i,o)}),!!n||(r(y.$asyncValidators,function(e,t){s(t,null)}),!1)}function a(){var n=[],i=!0;r(y.$asyncValidators,function(r,o){var a=r(e,t);if(!P(a))throw Aa("nopromise","Expected asynchronous validator to return a promise but got '{0}' instead.",a);s(o,void 0),n.push(a.then(function(){s(o,!0)},function(){i=!1,s(o,!1)}))}),n.length?l.all(n).then(function(){u(i)},p):u(!0)}function s(e,t){c===w&&y.$setValidity(e,t)}function u(e){c===w&&n(e)}w++;var c=w;return i()&&o()?void a():void u(!1)},this.$commitViewValue=function(){var e=y.$viewValue;s.cancel(b),(y.$$lastCommittedViewValue!==e||""===e&&y.$$hasNativeValidators)&&(y.$$updateEmptyClasses(e),y.$$lastCommittedViewValue=e,y.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function t(){y.$modelValue!==o&&y.$$writeModelToScope()}var n=y.$$lastCommittedViewValue,r=n;if(f=!$(r)||void 0)for(var i=0;i<y.$parsers.length;i++)if(r=y.$parsers[i](r),$(r)){f=!1;break}x(y.$modelValue)&&isNaN(y.$modelValue)&&(y.$modelValue=g(e));var o=y.$modelValue,a=y.$options&&y.$options.allowInvalid;y.$$rawModelValue=r,a&&(y.$modelValue=r,t()),y.$$runValidators(r,y.$$lastCommittedViewValue,function(e){a||(y.$modelValue=e?r:void 0,t())})},this.$$writeModelToScope=function(){v(e,y.$modelValue),r(y.$viewChangeListeners,function(e){try{e()}catch(n){t(n)}})},this.$setViewValue=function(e,t){y.$viewValue=e,y.$options&&!y.$options.updateOnDefault||y.$$debounceViewValueCommit(t)},this.$$debounceViewValueCommit=function(t){var n,r=0,i=y.$options;i&&m(i.debounce)&&(n=i.debounce,x(n)?r=n:x(n[t])?r=n[t]:x(n["default"])&&(r=n["default"])),s.cancel(b),r?b=s(function(){y.$commitViewValue()},r):u.$$phase?y.$commitViewValue():e.$apply(function(){y.$commitViewValue()})},e.$watch(function(){var t=g(e);if(t!==y.$modelValue&&(y.$modelValue===y.$modelValue||t===t)){y.$modelValue=y.$$rawModelValue=t,f=void 0;for(var n=y.$formatters,r=n.length,i=t;r--;)i=n[r](i);y.$viewValue!==i&&(y.$$updateEmptyClasses(i),y.$viewValue=y.$$lastCommittedViewValue=i,y.$render(),y.$$runValidators(t,i,p))}return t})}],Ma=["$rootScope",function(e){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Oa,priority:1,compile:function(t){return t.addClass(wa).addClass(_a).addClass(ba),{pre:function(e,t,n,r){var i=r[0],o=r[1]||i.$$parentForm;i.$$setOptions(r[2]&&r[2].$options),o.$addControl(i),n.$observe("name",function(e){i.$name!==e&&i.$$parentForm.$$renameControl(i,e)}),e.$on("$destroy",function(){i.$$parentForm.$removeControl(i)})},post:function(t,n,r,i){var o=i[0];o.$options&&o.$options.updateOn&&n.on(o.$options.updateOn,function(e){o.$$debounceViewValueCommit(e&&e.type)}),n.on("blur",function(){o.$touched||(e.$$phase?t.$evalAsync(o.$setTouched):t.$apply(o.$setTouched))})}}}}}],ja=/(\s+|^)default(\s+|$)/,Pa=function(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){var n=this;this.$options=U(e.$eval(t.ngModelOptions)),m(this.$options.updateOn)?(this.$options.updateOnDefault=!1,this.$options.updateOn=Zr(this.$options.updateOn.replace(ja,function(){return n.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},Ta=cr({terminal:!0,priority:1e3}),Da=t("ngOptions"),Fa=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,Na=["$compile","$document","$parse",function(t,i,o){function a(e,t,r){function i(e,t,n,r,i){this.selectValue=e,this.viewValue=t,this.label=n,this.group=r,this.disabled=i}function a(e){var t;if(!l&&n(e))t=e;else{t=[];for(var r in e)e.hasOwnProperty(r)&&"$"!==r.charAt(0)&&t.push(r)}return t}var s=e.match(Fa);if(!s)throw Da("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",e,Y(t));var u=s[5]||s[7],l=s[6],c=/ as /.test(s[0])&&s[1],f=s[9],d=o(s[2]?s[1]:u),p=c&&o(c),h=p||d,g=f&&o(f),v=f?function(e,t){return g(r,t)}:function(e){return Ze(e)},$=function(e,t){return v(e,_(e,t))},m=o(s[2]||s[1]),b=o(s[3]||""),y=o(s[4]||""),w=o(s[8]),x={},_=l?function(e,t){return x[l]=t,x[u]=e,x}:function(e){return x[u]=e,x};return{trackBy:f,getTrackByValue:$,getWatchables:o(w,function(e){var t=[];e=e||[];for(var n=a(e),i=n.length,o=0;o<i;o++){var u=e===n?o:n[o],l=e[u],c=_(l,u),f=v(l,c);if(t.push(f),s[2]||s[1]){var d=m(r,c);t.push(d)}if(s[4]){var p=y(r,c);t.push(p)}}return t}),getOptions:function(){for(var e=[],t={},n=w(r)||[],o=a(n),s=o.length,u=0;u<s;u++){var l=n===o?u:o[u],c=n[l],d=_(c,l),p=h(r,d),g=v(p,d),x=m(r,d),S=b(r,d),k=y(r,d),E=new i(g,p,x,S,k);e.push(E),t[g]=E}return{items:e,selectValueMap:t,getOptionFromViewValue:function(e){return t[$(e)]},getViewValueFromOption:function(e){return f?Gr.copy(e.viewValue):e.viewValue}}}}}function s(e,n,o,s){function c(e,t){var n=u.cloneNode(!1);t.appendChild(n),f(e,n)}function f(e,t){e.element=t,t.disabled=e.disabled,e.label!==t.label&&(t.label=e.label,t.textContent=e.label),e.value!==t.value&&(t.value=e.selectValue)}function d(){var e=_&&h.readValue();if(_)for(var t=_.items.length-1;t>=0;t--){var r=_.items[t];qe(m(r.group)?r.element.parentNode:r.element)}_=S.getOptions();var i={};if(w&&n.prepend(p),_.items.forEach(function(e){var t;m(e.group)?(t=i[e.group],t||(t=l.cloneNode(!1),k.appendChild(t),t.label=null===e.group?"null":e.group,i[e.group]=t),c(e,t)):c(e,k)}),n[0].appendChild(k),g.$render(),!g.$isEmpty(e)){var o=h.readValue(),a=S.trackBy||v;(a?V(e,o):e===o)||(g.$setViewValue(o),g.$render())}}for(var p,h=s[0],g=s[1],v=o.multiple,$=0,b=n.children(),y=b.length;$<y;$++)if(""===b[$].value){p=b.eq($);break}var w=!!p,x=Rr(u.cloneNode(!1));x.val("?");var _,S=a(o.ngOptions,n,e),k=i[0].createDocumentFragment(),E=function(){w||n.prepend(p),n.val(""),p.prop("selected",!0),p.attr("selected",!0)},C=function(){w||p.remove()},A=function(){n.prepend(x),n.val("?"),x.prop("selected",!0),x.attr("selected",!0)},O=function(){x.remove()};v?(g.$isEmpty=function(e){return!e||0===e.length},h.writeValue=function(e){_.items.forEach(function(e){e.element.selected=!1}),e&&e.forEach(function(e){var t=_.getOptionFromViewValue(e);t&&(t.element.selected=!0)})},h.readValue=function(){var e=n.val()||[],t=[];return r(e,function(e){var n=_.selectValueMap[e];n&&!n.disabled&&t.push(_.getViewValueFromOption(n))}),t},S.trackBy&&e.$watchCollection(function(){if(Kr(g.$viewValue))return g.$viewValue.map(function(e){return S.getTrackByValue(e)})},function(){g.$render()})):(h.writeValue=function(e){var t=_.getOptionFromViewValue(e);t?(n[0].value!==t.selectValue&&(O(),C(),n[0].value=t.selectValue,t.element.selected=!0),t.element.setAttribute("selected","selected")):null===e||w?(O(),E()):(C(),A())},h.readValue=function(){var e=_.selectValueMap[n.val()];return e&&!e.disabled?(C(),O(),_.getViewValueFromOption(e)):null},S.trackBy&&e.$watch(function(){return S.getTrackByValue(g.$viewValue)},function(){g.$render()})),w?(p.remove(),t(p)(e),p.removeClass("ng-scope")):p=Rr(u.cloneNode(!1)),n.empty(),d(),e.$watchCollection(S.getWatchables,d)}var u=e.document.createElement("option"),l=e.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(e,t,n,r){r[0].registerOption=p},post:s}}}],Ia=["$locale","$interpolate","$log",function(e,t,n){var i=/{}/g,o=/^when(Minus)?(.+)$/;return{link:function(a,s,u){function l(e){s.text(e||"")}var c,f=u.count,d=u.$attr.when&&s.attr(u.$attr.when),h=u.offset||0,g=a.$eval(d)||{},v={},m=t.startSymbol(),b=t.endSymbol(),y=m+f+"-"+h+b,w=Gr.noop;r(u,function(e,t){var n=o.exec(t);if(n){var r=(n[1]?"-":"")+Tr(n[2]);g[r]=s.attr(u.$attr[t])}}),r(g,function(e,n){v[n]=t(e.replace(i,y))}),a.$watch(f,function(t){var r=parseFloat(t),i=isNaN(r);if(i||r in g||(r=e.pluralCat(r-h)),r!==c&&!(i&&x(c)&&isNaN(c))){w();var o=v[r];$(o)?(null!=t&&n.debug("ngPluralize: no rule defined for '"+r+"' in "+d),w=p,l()):w=a.$watch(o,l),c=r}})}}}],Ra=["$parse","$animate","$compile",function(e,i,o){var a="$$NG_REMOVED",s=t("ngRepeat"),u=function(e,t,n,r,i,o,a){e[n]=r,i&&(e[i]=o),e.$index=t,e.$first=0===t,e.$last=t===a-1,e.$middle=!(e.$first||e.$last),e.$odd=!(e.$even=0===(1&t))},l=function(e){return e.clone[0]},c=function(e){return e.clone[e.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(t,f){var d=f.ngRepeat,p=o.$$createComment("end ngRepeat",d),h=d.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!h)throw s("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",d);var g=h[1],v=h[2],$=h[3],m=h[4];if(h=g.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!h)throw s("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",g);var b=h[3]||h[1],y=h[2];if($&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test($)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test($)))throw s("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",$);var w,x,_,S,k={$id:Ze};return m?w=e(m):(_=function(e,t){return Ze(t)},S=function(e){return e}),function(e,t,o,f,h){w&&(x=function(t,n,r){return y&&(k[y]=t),k[b]=n,k.$index=r,w(e,k)});var g=he();e.$watchCollection(v,function(o){var f,v,m,w,k,E,C,A,O,M,j,P,T=t[0],D=he();if($&&(e[$]=o),n(o))O=o,A=x||_;else{A=x||S,O=[];for(var F in o)Pr.call(o,F)&&"$"!==F.charAt(0)&&O.push(F)}for(w=O.length,j=new Array(w),f=0;f<w;f++)if(k=o===O?f:O[f],E=o[k],C=A(k,E,f),g[C])M=g[C],delete g[C],D[C]=M,j[f]=M;else{if(D[C])throw r(j,function(e){e&&e.scope&&(g[e.id]=e)}),s("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",d,C,E);j[f]={id:C,scope:void 0,clone:void 0},D[C]=!0}for(var N in g){if(M=g[N],P=pe(M.clone),i.leave(P),P[0].parentNode)for(f=0,v=P.length;f<v;f++)P[f][a]=!0;M.scope.$destroy()}for(f=0;f<w;f++)if(k=o===O?f:O[f],E=o[k],M=j[f],M.scope){m=T;do m=m.nextSibling;while(m&&m[a]);l(M)!=m&&i.move(pe(M.clone),null,T),T=c(M),u(M.scope,f,b,E,y,k,w)}else h(function(e,t){M.scope=t;var n=p.cloneNode(!1);e[e.length++]=n,i.enter(e,null,T),T=n,M.clone=e,D[M.id]=M,u(M.scope,f,b,E,y,k,w)});g=D})}}}}],Ua="ng-hide",Va="ng-hide-animate",za=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngShow,function(t){e[t?"removeClass":"addClass"](n,Ua,{tempClasses:Va})})}}}],La=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngHide,function(t){e[t?"addClass":"removeClass"](n,Ua,{tempClasses:Va})})}}}],qa=cr(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&r(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),Ha=["$animate","$compile",function(e,t){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,i,o,a){var s=o.ngSwitch||o.on,u=[],l=[],c=[],f=[],d=function(e,t){return function(){e.splice(t,1)}};n.$watch(s,function(n){var i,o;for(i=0,o=c.length;i<o;++i)e.cancel(c[i]);for(c.length=0,i=0,o=f.length;i<o;++i){var s=pe(l[i].clone);f[i].$destroy();var p=c[i]=e.leave(s);p.then(d(c,i))}l.length=0,f.length=0,(u=a.cases["!"+n]||a.cases["?"])&&r(u,function(n){n.transclude(function(r,i){f.push(i);var o=n.element;r[r.length++]=t.$$createComment("end ngSwitchWhen");var a={clone:r};l.push(a),e.enter(r,o.parent(),o)})})})}}}],Ba=cr({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["!"+n.ngSwitchWhen]=r.cases["!"+n.ngSwitchWhen]||[],r.cases["!"+n.ngSwitchWhen].push({transclude:i,element:t})}}),Wa=cr({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:t})}}),Ga=t("ngTransclude"),Xa=["$compile",function(e){return{restrict:"EAC",terminal:!0,compile:function(t){var n=e(t.contents());return t.empty(),function(e,t,r,i,o){function a(e,n){e.length?t.append(e):(s(),n.$destroy())}function s(){n(e,function(e){t.append(e)})}if(!o)throw Ga("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",Y(t));r.ngTransclude===r.$attr.ngTransclude&&(r.ngTransclude="");var u=r.ngTransclude||r.ngTranscludeSlot;o(a,null,u),u&&!o.isSlotFilled(u)&&s()}}}}],Ka=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){if("text/ng-template"==n.type){var r=n.id,i=t[0].text;e.put(r,i)}}}}],Ya={$setViewValue:p,$render:p},Za=["$element","$scope",function(t,n){var r=this,i=new Je;r.ngModelCtrl=Ya,r.unknownOption=Rr(e.document.createElement("option")),r.renderUnknownOption=function(e){var n="? "+Ze(e)+" ?";r.unknownOption.val(n),t.prepend(r.unknownOption),t.val(n)},n.$on("$destroy",function(){r.renderUnknownOption=p}),r.removeUnknownOption=function(){r.unknownOption.parent()&&r.unknownOption.remove()},r.readValue=function(){return r.removeUnknownOption(),t.val()},r.writeValue=function(e){r.hasOption(e)?(r.removeUnknownOption(),t.val(e),""===e&&r.emptyOption.prop("selected",!0)):null==e&&r.emptyOption?(r.removeUnknownOption(),t.val("")):r.renderUnknownOption(e)},r.addOption=function(e,t){if(t[0].nodeType!==ui){fe(e,'"option value"'),""===e&&(r.emptyOption=t);var n=i.get(e)||0;i.put(e,n+1),r.ngModelCtrl.$render(),Or(t)}},r.removeOption=function(e){var t=i.get(e);t&&(1===t?(i.remove(e),""===e&&(r.emptyOption=void 0)):i.put(e,t-1))},r.hasOption=function(e){return!!i.get(e)},r.registerOption=function(e,t,n,i,o){if(i){var a;n.$observe("value",function(e){m(a)&&r.removeOption(a),a=e,r.addOption(e,t)})}else o?e.$watch(o,function(e,i){n.$set("value",e),i!==e&&r.removeOption(i),r.addOption(e,t)}):r.addOption(n.value,t);t.on("$destroy",function(){r.removeOption(n.value),r.ngModelCtrl.$render()})}}],Ja=function(){function e(e,t,n,i){var o=i[1];if(o){var a=i[0];if(a.ngModelCtrl=o,t.on("change",function(){e.$apply(function(){o.$setViewValue(a.readValue())})}),n.multiple){a.readValue=function(){var e=[];return r(t.find("option"),function(t){t.selected&&e.push(t.value)}),e},a.writeValue=function(e){var n=new Je(e);r(t.find("option"),function(e){e.selected=m(n.get(e.value))})};var s,u=NaN;e.$watch(function(){u!==o.$viewValue||V(s,o.$viewValue)||(s=ve(o.$viewValue),o.$render()),u=o.$viewValue}),o.$isEmpty=function(e){return!e||0===e.length}}}}function t(e,t,n,r){var i=r[1];if(i){var o=r[0];i.$render=function(){o.writeValue(i.$viewValue)}}}return{restrict:"E",require:["select","?ngModel"],controller:Za,priority:1,link:{pre:e,post:t}}},Qa=["$interpolate",function(e){return{restrict:"E",priority:100,compile:function(t,n){if(m(n.value))var r=e(n.value,!0);else{var i=e(t.text(),!0);i||n.$set("value",t.text())}return function(e,t,n){var o="$selectController",a=t.parent(),s=a.data(o)||a.parent().data(o);s&&s.registerOption(e,t,n,r,i)}}}}],es=g({restrict:"E",terminal:!1}),ts=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){r&&(n.required=!0,r.$validators.required=function(e,t){return!n.required||!r.$isEmpty(t)},n.$observe("required",function(){r.$validate()}))}}},ns=function(){return{restrict:"A",require:"?ngModel",link:function(e,n,r,i){if(i){var o,a=r.ngPattern||r.pattern;r.$observe("pattern",function(e){if(w(e)&&e.length>0&&(e=new RegExp("^"+e+"$")),e&&!e.test)throw t("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",a,e,Y(n));o=e||void 0,i.$validate()}),i.$validators.pattern=function(e,t){return i.$isEmpty(t)||$(o)||o.test(t)}}}}},rs=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=-1;n.$observe("maxlength",function(e){var t=f(e);i=isNaN(t)?-1:t,r.$validate()}),r.$validators.maxlength=function(e,t){return i<0||r.$isEmpty(t)||t.length<=i}}}}},is=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=0;n.$observe("minlength",function(e){i=f(e)||0,r.$validate()}),r.$validators.minlength=function(e,t){return r.$isEmpty(t)||t.length>=i}}}}};return e.angular.bootstrap?void(e.console&&console.log("WARNING: Tried to load angular more than once.")):(ue(),be(Gr),Gr.module("ngLocale",[],["$provide",function(e){function t(e){e+="";var t=e.indexOf(".");return t==-1?0:e.length-t-1}function n(e,n){var r=n;void 0===r&&(r=Math.min(t(e),3));var i=Math.pow(10,r),o=(e*i|0)%i;return{v:r,f:o}}var r={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};e.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],STANDALONEMONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(e,t){var i=0|e,o=n(e,t);return 1==i&&0==o.v?r.ONE:r.OTHER}})}]),void Rr(e.document).ready(function(){re(e.document,ie)}))}(window),!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>')},{}],42:[function(e,t,n){e("./angular"),t.exports=angular},{"./angular":41}],43:[function(e,t,n){!function(){function e(e,t){window.XMLHttpRequest.prototype[e]=t(window.XMLHttpRequest.prototype[e])}function t(e,t,n){try{Object.defineProperty(e,t,{get:n})}catch(r){}}if(window.FileAPI||(window.FileAPI={}),!window.XMLHttpRequest)throw"AJAX is not supported. XMLHttpRequest is not defined.";if(FileAPI.shouldLoad=!window.FormData||FileAPI.forceLoad,FileAPI.shouldLoad){var n=function(e){if(!e.__listeners){e.upload||(e.upload={}),e.__listeners=[];var t=e.upload.addEventListener;e.upload.addEventListener=function(n,r){e.__listeners[n]=r,t&&t.apply(this,arguments)}}};e("open",function(e){return function(t,r,i){n(this),this.__url=r;try{e.apply(this,[t,r,i])}catch(o){o.message.indexOf("Access is denied")>-1&&(this.__origError=o,e.apply(this,[t,"_fix_for_ie_crossdomain__",i]))}}}),e("getResponseHeader",function(e){return function(t){return this.__fileApiXHR&&this.__fileApiXHR.getResponseHeader?this.__fileApiXHR.getResponseHeader(t):null==e?null:e.apply(this,[t])}}),e("getAllResponseHeaders",function(e){return function(){return this.__fileApiXHR&&this.__fileApiXHR.getAllResponseHeaders?this.__fileApiXHR.getAllResponseHeaders():null==e?null:e.apply(this);
8
- }}),e("abort",function(e){return function(){return this.__fileApiXHR&&this.__fileApiXHR.abort?this.__fileApiXHR.abort():null==e?null:e.apply(this)}}),e("setRequestHeader",function(e){return function(t,r){if("__setXHR_"===t){n(this);var i=r(this);i instanceof Function&&i(this)}else this.__requestHeaders=this.__requestHeaders||{},this.__requestHeaders[t]=r,e.apply(this,arguments)}}),e("send",function(e){return function(){var n=this;if(arguments[0]&&arguments[0].__isFileAPIShim){var r=arguments[0],i={url:n.__url,jsonp:!1,cache:!0,complete:function(e,r){e&&angular.isString(e)&&e.indexOf("#2174")!==-1&&(e=null),n.__completed=!0,!e&&n.__listeners.load&&n.__listeners.load({type:"load",loaded:n.__loaded,total:n.__total,target:n,lengthComputable:!0}),!e&&n.__listeners.loadend&&n.__listeners.loadend({type:"loadend",loaded:n.__loaded,total:n.__total,target:n,lengthComputable:!0}),"abort"===e&&n.__listeners.abort&&n.__listeners.abort({type:"abort",loaded:n.__loaded,total:n.__total,target:n,lengthComputable:!0}),void 0!==r.status&&t(n,"status",function(){return 0===r.status&&e&&"abort"!==e?500:r.status}),void 0!==r.statusText&&t(n,"statusText",function(){return r.statusText}),t(n,"readyState",function(){return 4}),void 0!==r.response&&t(n,"response",function(){return r.response});var i=r.responseText||(e&&0===r.status&&"abort"!==e?e:void 0);t(n,"responseText",function(){return i}),t(n,"response",function(){return i}),e&&t(n,"err",function(){return e}),n.__fileApiXHR=r,n.onreadystatechange&&n.onreadystatechange(),n.onload&&n.onload()},progress:function(e){if(e.target=n,n.__listeners.progress&&n.__listeners.progress(e),n.__total=e.total,n.__loaded=e.loaded,e.total===e.loaded){var t=this;setTimeout(function(){n.__completed||(n.getAllResponseHeaders=function(){},t.complete(null,{status:204,statusText:"No Content"}))},FileAPI.noContentTimeout||1e4)}},headers:n.__requestHeaders};i.data={},i.files={};for(var o=0;o<r.data.length;o++){var a=r.data[o];null!=a.val&&null!=a.val.name&&null!=a.val.size&&null!=a.val.type?i.files[a.key]=a.val:i.data[a.key]=a.val}setTimeout(function(){if(!FileAPI.hasFlash)throw'Adode Flash Player need to be installed. To check ahead use "FileAPI.hasFlash"';n.__fileApiXHR=FileAPI.upload(i)},1)}else{if(this.__origError)throw this.__origError;e.apply(n,arguments)}}}),window.XMLHttpRequest.__isFileAPIShim=!0,window.FormData=FormData=function(){return{append:function(e,t,n){t.__isFileAPIBlobShim&&(t=t.data[0]),this.data.push({key:e,val:t,name:n})},data:[],__isFileAPIShim:!0}},window.Blob=Blob=function(e){return{data:e,__isFileAPIBlobShim:!0}}}}(),function(){function e(e){return"input"===e[0].tagName.toLowerCase()&&e.attr("type")&&"file"===e.attr("type").toLowerCase()}function t(){try{var e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(e)return!0}catch(t){if(void 0!==navigator.mimeTypes["application/x-shockwave-flash"])return!0}return!1}function n(e){var t=0,n=0;if(window.jQuery)return jQuery(e).offset();if(e.offsetParent)do t+=e.offsetLeft-e.scrollLeft,n+=e.offsetTop-e.scrollTop,e=e.offsetParent;while(e);return{left:t,top:n}}if(FileAPI.shouldLoad){if(FileAPI.hasFlash=t(),FileAPI.forceLoad&&(FileAPI.html5=!1),!FileAPI.upload){var r,i,o,a,s,u=document.createElement("script"),l=document.getElementsByTagName("script");if(window.FileAPI.jsUrl)r=window.FileAPI.jsUrl;else if(window.FileAPI.jsPath)i=window.FileAPI.jsPath;else for(o=0;o<l.length;o++)if(s=l[o].src,a=s.search(/\/ng\-file\-upload[\-a-zA-z0-9\.]*\.js/),a>-1){i=s.substring(0,a+1);break}null==FileAPI.staticPath&&(FileAPI.staticPath=i),u.setAttribute("src",r||i+"FileAPI.min.js"),document.getElementsByTagName("head")[0].appendChild(u)}FileAPI.ngfFixIE=function(r,i,o){if(!t())throw'Adode Flash Player need to be installed. To check ahead use "FileAPI.hasFlash"';var a=function(){var t=i.parent();r.attr("disabled")?t&&t.removeClass("js-fileapi-wrapper"):(i.attr("__ngf_flash_")||(i.unbind("change"),i.unbind("click"),i.bind("change",function(e){s.apply(this,[e]),o.apply(this,[e])}),i.attr("__ngf_flash_","true")),t.addClass("js-fileapi-wrapper"),e(r)||(t.css("position","absolute").css("top",n(r[0]).top+"px").css("left",n(r[0]).left+"px").css("width",r[0].offsetWidth+"px").css("height",r[0].offsetHeight+"px").css("filter","alpha(opacity=0)").css("display",r.css("display")).css("overflow","hidden").css("z-index","900000").css("visibility","visible"),i.css("width",r[0].offsetWidth+"px").css("height",r[0].offsetHeight+"px").css("position","absolute").css("top","0px").css("left","0px")))};r.bind("mouseenter",a);var s=function(e){for(var t=FileAPI.getFiles(e),n=0;n<t.length;n++)void 0===t[n].size&&(t[n].size=0),void 0===t[n].name&&(t[n].name="file"),void 0===t[n].type&&(t[n].type="undefined");e.target||(e.target={}),e.target.files=t,e.target.files!==t&&(e.__files_=t),(e.__files_||e.target.files).item=function(t){return(e.__files_||e.target.files)[t]||null}}},FileAPI.disableFileInput=function(e,t){t?e.removeClass("js-fileapi-wrapper"):e.addClass("js-fileapi-wrapper")}}}(),window.FileReader||(window.FileReader=function(){var e=this,t=!1;this.listeners={},this.addEventListener=function(t,n){e.listeners[t]=e.listeners[t]||[],e.listeners[t].push(n)},this.removeEventListener=function(t,n){e.listeners[t]&&e.listeners[t].splice(e.listeners[t].indexOf(n),1)},this.dispatchEvent=function(t){var n=e.listeners[t.type];if(n)for(var r=0;r<n.length;r++)n[r].call(e,t)},this.onabort=this.onerror=this.onload=this.onloadstart=this.onloadend=this.onprogress=null;var n=function(t,n){var r={type:t,target:e,loaded:n.loaded,total:n.total,error:n.error};return null!=n.result&&(r.target.result=n.result),r},r=function(r){t||(t=!0,e.onloadstart&&e.onloadstart(n("loadstart",r)));var i;"load"===r.type?(e.onloadend&&e.onloadend(n("loadend",r)),i=n("load",r),e.onload&&e.onload(i),e.dispatchEvent(i)):"progress"===r.type?(i=n("progress",r),e.onprogress&&e.onprogress(i),e.dispatchEvent(i)):(i=n("error",r),e.onerror&&e.onerror(i),e.dispatchEvent(i))};this.readAsDataURL=function(e){FileAPI.readAsDataURL(e,r)},this.readAsText=function(e){FileAPI.readAsText(e,r)}}),!window.XMLHttpRequest||window.FileAPI&&FileAPI.shouldLoad||(window.XMLHttpRequest.prototype.setRequestHeader=function(e){return function(t,n){if("__setXHR_"===t){var r=n(this);r instanceof Function&&r(this)}else e.apply(this,arguments)}}(window.XMLHttpRequest.prototype.setRequestHeader));var r=angular.module("ngFileUpload",[]);r.version="12.2.12",r.service("UploadBase",["$http","$q","$timeout",function(e,t,n){function i(r){function i(e){l.notify&&l.notify(e),c.progressFunc&&n(function(){c.progressFunc(e)})}function o(e){return null!=r._start&&s?{loaded:e.loaded+r._start,total:r._file&&r._file.size||e.total,type:e.type,config:r,lengthComputable:!0,target:e.target}:e}function u(){e(r).then(function(e){if(s&&r._chunkSize&&!r._finished&&r._file){var t=r._file&&r._file.size||0;i({loaded:Math.min(r._end,t),total:t,config:r,type:"progress"}),a.upload(r,!0)}else r._finished&&delete r._finished,l.resolve(e)},function(e){l.reject(e)},function(e){l.notify(e)})}r.method=r.method||"POST",r.headers=r.headers||{};var l=r._deferred=r._deferred||t.defer(),c=l.promise;return r.disableProgress||(r.headers.__setXHR_=function(){return function(e){e&&e.upload&&e.upload.addEventListener&&(r.__XHR=e,r.xhrFn&&r.xhrFn(e),e.upload.addEventListener("progress",function(e){e.config=r,i(o(e))},!1),e.upload.addEventListener("load",function(e){e.lengthComputable&&(e.config=r,i(o(e)))},!1))}}),s?r._chunkSize&&r._end&&!r._finished?(r._start=r._end,r._end+=r._chunkSize,u()):r.resumeSizeUrl?e.get(r.resumeSizeUrl).then(function(e){r.resumeSizeResponseReader?r._start=r.resumeSizeResponseReader(e.data):r._start=parseInt((null==e.data.size?e.data:e.data.size).toString()),r._chunkSize&&(r._end=r._start+r._chunkSize),u()},function(e){throw e}):r.resumeSize?r.resumeSize().then(function(e){r._start=e,r._chunkSize&&(r._end=r._start+r._chunkSize),u()},function(e){throw e}):(r._chunkSize&&(r._start=0,r._end=r._start+r._chunkSize),u()):u(),c.success=function(e){return c.then(function(t){e(t.data,t.status,t.headers,r)}),c},c.error=function(e){return c.then(null,function(t){e(t.data,t.status,t.headers,r)}),c},c.progress=function(e){return c.progressFunc=e,c.then(null,null,function(t){e(t)}),c},c.abort=c.pause=function(){return r.__XHR&&n(function(){r.__XHR.abort()}),c},c.xhr=function(e){return r.xhrFn=function(t){return function(){t&&t.apply(c,arguments),e.apply(c,arguments)}}(r.xhrFn),c},a.promisesCount++,c["finally"]&&c["finally"]instanceof Function&&c["finally"](function(){a.promisesCount--}),c}function o(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var a=this;a.promisesCount=0,this.isResumeSupported=function(){return window.Blob&&window.Blob.prototype.slice};var s=this.isResumeSupported();this.isUploadInProgress=function(){return a.promisesCount>0},this.rename=function(e,t){return e.ngfName=t,e},this.jsonBlob=function(e){null==e||angular.isString(e)||(e=JSON.stringify(e));var t=new window.Blob([e],{type:"application/json"});return t._ngfBlob=!0,t},this.json=function(e){return angular.toJson(e)},this.isFile=function(e){return null!=e&&(e instanceof window.Blob||e.flashId&&e.name&&e.size)},this.upload=function(e,t){function n(t,n){if(t._ngfBlob)return t;if(e._file=e._file||t,null!=e._start&&s){e._end&&e._end>=t.size&&(e._finished=!0,e._end=t.size);var r=t.slice(e._start,e._end||t.size);return r.name=t.name,r.ngfName=t.ngfName,e._chunkSize&&(n.append("_chunkSize",e._chunkSize),n.append("_currentChunkSize",e._end-e._start),n.append("_chunkNumber",Math.floor(e._start/e._chunkSize)),n.append("_totalSize",e._file.size)),r}return t}function r(t,i,o){if(void 0!==i)if(angular.isDate(i)&&(i=i.toISOString()),angular.isString(i))t.append(o,i);else if(a.isFile(i)){var s=n(i,t),u=o.split(",");u[1]&&(s.ngfName=u[1].replace(/^\s+|\s+$/g,""),o=u[0]),e._fileKey=e._fileKey||o,t.append(o,s,s.ngfName||s.name)}else if(angular.isObject(i)){if(i.$$ngfCircularDetection)throw"ngFileUpload: Circular reference in config.data. Make sure specified data for Upload.upload() has no circular reference: "+o;i.$$ngfCircularDetection=!0;try{for(var l in i)if(i.hasOwnProperty(l)&&"$$ngfCircularDetection"!==l){var c=null==e.objectKey?"[i]":e.objectKey;i.length&&parseInt(l)>-1&&(c=null==e.arrayKey?c:e.arrayKey),r(t,i[l],o+c.replace(/[ik]/g,l))}}finally{delete i.$$ngfCircularDetection}}else t.append(o,i)}function u(){e._chunkSize=a.translateScalars(e.resumeChunkSize),e._chunkSize=e._chunkSize?parseInt(e._chunkSize.toString()):null,e.headers=e.headers||{},e.headers["Content-Type"]=void 0,e.transformRequest=e.transformRequest?angular.isArray(e.transformRequest)?e.transformRequest:[e.transformRequest]:[],e.transformRequest.push(function(t){var n,i=new window.FormData;t=t||e.fields||{},e.file&&(t.file=e.file);for(n in t)if(t.hasOwnProperty(n)){var o=t[n];e.formDataAppender?e.formDataAppender(i,n,o):r(i,o,n)}return i})}return t||(e=o(e)),e._isDigested||(e._isDigested=!0,u()),i(e)},this.http=function(t){return t=o(t),t.transformRequest=t.transformRequest||function(t){return window.ArrayBuffer&&t instanceof window.ArrayBuffer||t instanceof window.Blob?t:e.defaults.transformRequest[0].apply(this,arguments)},t._chunkSize=a.translateScalars(t.resumeChunkSize),t._chunkSize=t._chunkSize?parseInt(t._chunkSize.toString()):null,i(t)},this.translateScalars=function(e){if(angular.isString(e)){if(e.search(/kb/i)===e.length-2)return parseFloat(1024*e.substring(0,e.length-2));if(e.search(/mb/i)===e.length-2)return parseFloat(1048576*e.substring(0,e.length-2));if(e.search(/gb/i)===e.length-2)return parseFloat(1073741824*e.substring(0,e.length-2));if(e.search(/b/i)===e.length-1)return parseFloat(e.substring(0,e.length-1));if(e.search(/s/i)===e.length-1)return parseFloat(e.substring(0,e.length-1));if(e.search(/m/i)===e.length-1)return parseFloat(60*e.substring(0,e.length-1));if(e.search(/h/i)===e.length-1)return parseFloat(3600*e.substring(0,e.length-1))}return e},this.urlToBlob=function(n){var r=t.defer();return e({url:n,method:"get",responseType:"arraybuffer"}).then(function(e){var t=new Uint8Array(e.data),i=e.headers("content-type")||"image/WebP",o=new window.Blob([t],{type:i}),a=n.match(/.*\/(.+?)(\?.*)?$/);a.length>1&&(o.name=a[1]),r.resolve(o)},function(e){r.reject(e)}),r.promise},this.setDefaults=function(e){this.defaults=e||{}},this.defaults={},this.version=r.version}]),r.service("Upload",["$parse","$timeout","$compile","$q","UploadExif",function(e,t,n,r,i){function o(e,t,n){var i=[u.emptyPromise()];return angular.forEach(e,function(r,o){0===r.type.indexOf("image/jpeg")&&u.attrGetter("ngfFixOrientation",t,n,{$file:r})&&i.push(u.happyPromise(u.applyExifRotation(r),r).then(function(t){e.splice(o,1,t)}))}),r.all(i)}function a(e,t,n,i){var o=u.attrGetter("ngfResize",t,n);if(!o||!u.isResizeSupported()||!e.length)return u.emptyPromise();if(o instanceof Function){var a=r.defer();return o(e).then(function(r){s(r,e,t,n,i).then(function(e){a.resolve(e)},function(e){a.reject(e)})},function(e){a.reject(e)})}return s(o,e,t,n,i)}function s(e,t,n,i,o){function a(r,a){if(0===r.type.indexOf("image")){if(e.pattern&&!u.validatePattern(r,e.pattern))return;e.resizeIf=function(e,t){return u.attrGetter("ngfResizeIf",n,i,{$width:e,$height:t,$file:r})};var l=u.resize(r,e);s.push(l),l.then(function(e){t.splice(a,1,e)},function(e){r.$error="resize",(r.$errorMessages=r.$errorMessages||{}).resize=!0,r.$errorParam=(e?(e.message?e.message:e)+": ":"")+(r&&r.name),o.$ngfValidations.push({name:"resize",valid:!1}),u.applyModelValidation(o,t)})}}for(var s=[u.emptyPromise()],l=0;l<t.length;l++)a(t[l],l);return r.all(s)}var u=i;return u.getAttrWithDefaults=function(e,t){if(null!=e[t])return e[t];var n=u.defaults[t];return null==n?n:angular.isString(n)?n:JSON.stringify(n)},u.attrGetter=function(t,n,r,i){var o=this.getAttrWithDefaults(n,t);if(!r)return o;try{return i?e(o)(r,i):e(o)(r)}catch(a){if(t.search(/min|max|pattern/i))return o;throw a}},u.shouldUpdateOn=function(e,t,n){var r=u.attrGetter("ngfModelOptions",t,n);return!r||!r.updateOn||r.updateOn.split(" ").indexOf(e)>-1},u.emptyPromise=function(){var e=r.defer(),n=arguments;return t(function(){e.resolve.apply(e,n)}),e.promise},u.rejectPromise=function(){var e=r.defer(),n=arguments;return t(function(){e.reject.apply(e,n)}),e.promise},u.happyPromise=function(e,n){var i=r.defer();return e.then(function(e){i.resolve(e)},function(e){t(function(){throw e}),i.resolve(n)}),i.promise},u.updateModel=function(n,r,i,s,l,c,f){function d(o,a,l,f,d){r.$$ngfPrevValidFiles=o,r.$$ngfPrevInvalidFiles=a;var p=o&&o.length?o[0]:null,h=a&&a.length?a[0]:null;n&&(u.applyModelValidation(n,o),n.$setViewValue(d?p:o)),s&&e(s)(i,{$files:o,$file:p,$newFiles:l,$duplicateFiles:f,$invalidFiles:a,$invalidFile:h,$event:c});var g=u.attrGetter("ngfModelInvalid",r);g&&t(function(){e(g).assign(i,d?h:a)}),t(function(){})}function p(){function e(e,t){return e.name===t.name&&(e.$ngfOrigSize||e.size)===(t.$ngfOrigSize||t.size)&&e.type===t.type}function t(t){var n;for(n=0;n<$.length;n++)if(e(t,$[n]))return!0;for(n=0;n<m.length;n++)if(e(t,m[n]))return!0;return!1}if(l){v=[],b=[];for(var n=0;n<l.length;n++)t(l[n])?b.push(l[n]):v.push(l[n])}}function h(e){return angular.isArray(e)?e:[e]}function g(){function e(){t(function(){d(x?$.concat(w):w,x?m.concat(y):y,l,b,_)},k&&k.debounce?k.debounce.change||k.debounce:0)}var o=S?v:w;a(o,r,i,n).then(function(){S?u.validate(v,x?$.length:0,n,r,i).then(function(t){w=t.validsFiles,y=t.invalidsFiles,e()}):e()},function(){for(var t=0;t<o.length;t++){var n=o[t];if("resize"===n.$error){var r=w.indexOf(n);r>-1&&(w.splice(r,1),y.push(n)),e()}}})}var v,$,m,b=[],y=[],w=[];$=r.$$ngfPrevValidFiles||[],m=r.$$ngfPrevInvalidFiles||[],n&&n.$modelValue&&($=h(n.$modelValue));var x=u.attrGetter("ngfKeep",r,i);v=(l||[]).slice(0),"distinct"!==x&&u.attrGetter("ngfKeepDistinct",r,i)!==!0||p(r,i);var _=!x&&!u.attrGetter("ngfMultiple",r,i)&&!u.attrGetter("multiple",r);if(!x||v.length){u.attrGetter("ngfBeforeModelChange",r,i,{$files:l,$file:l&&l.length?l[0]:null,$newFiles:v,$duplicateFiles:b,$event:c});var S=u.attrGetter("ngfValidateAfterResize",r,i),k=u.attrGetter("ngfModelOptions",r,i);u.validate(v,x?$.length:0,n,r,i).then(function(e){f?d(v,[],l,b,_):(k&&k.allowInvalid||S?w=v:(w=e.validFiles,y=e.invalidFiles),u.attrGetter("ngfFixOrientation",r,i)&&u.isExifSupported()?o(w,r,i).then(function(){g()}):g())})}},u}]),r.directive("ngfSelect",["$parse","$timeout","$compile","Upload",function(e,t,n,r){function i(e){var t=e.match(/Android[^\d]*(\d+)\.(\d+)/);if(t&&t.length>2){var n=r.defaults.androidFixMinorVersion||4;return parseInt(t[1])<4||parseInt(t[1])===n&&parseInt(t[2])<n}return e.indexOf("Chrome")===-1&&/.*Windows.*Safari.*/.test(e)}function o(e,t,n,r,o,s,u,l){function c(){return"input"===t[0].tagName.toLowerCase()&&n.type&&"file"===n.type.toLowerCase()}function f(){return b("ngfChange")||b("ngfSelect")}function d(t){if(l.shouldUpdateOn("change",n,e)){var i=t.__files_||t.target&&t.target.files,o=[];if(!i)return;for(var a=0;a<i.length;a++)o.push(i[a]);l.updateModel(r,n,e,f(),o.length?o:null,t)}}function p(e,r){function i(t){e.attr("id","ngf-"+t),r.attr("id","ngf-label-"+t)}for(var o=0;o<t[0].attributes.length;o++){var a=t[0].attributes[o];"type"!==a.name&&"class"!==a.name&&"style"!==a.name&&("id"===a.name?(i(a.value),y.push(n.$observe("id",i))):e.attr(a.name,a.value||"required"!==a.name&&"multiple"!==a.name?a.value:a.name))}}function h(){if(c())return t;var e=angular.element('<input type="file">'),n=angular.element("<label>upload</label>");return n.css("visibility","hidden").css("position","absolute").css("overflow","hidden").css("width","0px").css("height","0px").css("border","none").css("margin","0px").css("padding","0px").attr("tabindex","-1"),p(e,n),a.push({el:t,ref:n}),document.body.appendChild(n.append(e)[0]),e}function g(n){if(t.attr("disabled"))return!1;if(!b("ngfSelectDisabled",e)){var r=v(n);if(null!=r)return r;$(n);try{c()||document.body.contains(_[0])||(a.push({el:t,ref:_.parent()}),document.body.appendChild(_.parent()[0]),_.bind("change",d))}catch(o){}return i(navigator.userAgent)?setTimeout(function(){_[0].click()},0):_[0].click(),!1}}function v(e){var t=e.changedTouches||e.originalEvent&&e.originalEvent.changedTouches;if(t){if("touchstart"===e.type)return x=t[0].clientX,w=t[0].clientY,!0;if("touchend"===e.type){var n=t[0].clientX,r=t[0].clientY;if(Math.abs(n-x)>20||Math.abs(r-w)>20)return e.stopPropagation(),e.preventDefault(),!1}return!0}}function $(t){l.shouldUpdateOn("click",n,e)&&_.val()&&(_.val(null),l.updateModel(r,n,e,f(),null,t,!0))}function m(e){if(_&&!_.attr("__ngf_ie10_Fix_")){if(!_[0].parentNode)return void(_=null);e.preventDefault(),e.stopPropagation(),_.unbind("click");var t=_.clone();return _.replaceWith(t),_=t,_.attr("__ngf_ie10_Fix_","true"),_.bind("change",d),_.bind("click",m),_[0].click(),!1}_.removeAttr("__ngf_ie10_Fix_")}var b=function(e,t){return l.attrGetter(e,n,t)};l.registerModelChangeValidator(r,n,e);var y=[];b("ngfMultiple")&&y.push(e.$watch(b("ngfMultiple"),function(){_.attr("multiple",b("ngfMultiple",e))})),b("ngfCapture")&&y.push(e.$watch(b("ngfCapture"),function(){_.attr("capture",b("ngfCapture",e))})),b("ngfAccept")&&y.push(e.$watch(b("ngfAccept"),function(){_.attr("accept",b("ngfAccept",e))})),y.push(n.$observe("accept",function(){_.attr("accept",b("accept"))}));var w=0,x=0,_=t;c()||(_=h()),_.bind("change",d),c()?t.bind("click",$):t.bind("click touchstart touchend",g),navigator.appVersion.indexOf("MSIE 10")!==-1&&_.bind("click",m),r&&r.$formatters.push(function(e){return null!=e&&0!==e.length||_.val()&&_.val(null),e}),e.$on("$destroy",function(){c()||_.parent().remove(),angular.forEach(y,function(e){e()})}),s(function(){for(var e=0;e<a.length;e++){var t=a[e];document.body.contains(t.el[0])||(a.splice(e,1),t.ref.remove())}}),window.FileAPI&&window.FileAPI.ngfFixIE&&window.FileAPI.ngfFixIE(t,_,d)}var a=[];return{restrict:"AEC",require:"?ngModel",link:function(i,a,s,u){o(i,a,s,u,e,t,n,r)}}}]),function(){function e(e){return"img"===e.tagName.toLowerCase()?"image":"audio"===e.tagName.toLowerCase()?"audio":"video"===e.tagName.toLowerCase()?"video":/./}function t(t,n,r,i,o,a,s,u){function l(e){var a=t.attrGetter("ngfNoObjectUrl",o,r);t.dataUrl(e,a)["finally"](function(){n(function(){var t=(a?e.$ngfDataUrl:e.$ngfBlobUrl)||e.$ngfDataUrl;u?i.css("background-image","url('"+(t||"")+"')"):i.attr("src",t),t?i.removeClass("ng-hide"):i.addClass("ng-hide")})})}n(function(){var n=r.$watch(o[a],function(n){var c=s;if("ngfThumbnail"===a&&(c||(c={width:i[0].naturalWidth||i[0].clientWidth,height:i[0].naturalHeight||i[0].clientHeight}),0===c.width&&window.getComputedStyle)){var f=getComputedStyle(i[0]);c={width:parseInt(f.width.slice(0,-2)),height:parseInt(f.height.slice(0,-2))}}return angular.isString(n)?(i.removeClass("ng-hide"),u?i.css("background-image","url('"+n+"')"):i.attr("src",n)):void(!n||!n.type||0!==n.type.search(e(i[0]))||u&&0!==n.type.indexOf("image")?i.addClass("ng-hide"):c&&t.isResizeSupported()?(c.resizeIf=function(e,i){return t.attrGetter("ngfResizeIf",o,r,{$width:e,$height:i,$file:n})},t.resize(n,c).then(function(e){l(e)},function(e){throw e})):l(n))});r.$on("$destroy",function(){n()})})}r.service("UploadDataUrl",["UploadBase","$timeout","$q",function(e,t,n){var r=e;return r.base64DataUrl=function(e){if(angular.isArray(e)){var t=n.defer(),i=0;return angular.forEach(e,function(n){r.dataUrl(n,!0)["finally"](function(){if(i++,i===e.length){var n=[];angular.forEach(e,function(e){n.push(e.$ngfDataUrl)}),t.resolve(n,e)}})}),t.promise}return r.dataUrl(e,!0)},r.dataUrl=function(e,i){if(!e)return r.emptyPromise(e,e);if(i&&null!=e.$ngfDataUrl||!i&&null!=e.$ngfBlobUrl)return r.emptyPromise(i?e.$ngfDataUrl:e.$ngfBlobUrl,e);var o=i?e.$$ngfDataUrlPromise:e.$$ngfBlobUrlPromise;if(o)return o;var a=n.defer();return t(function(){if(window.FileReader&&e&&(!window.FileAPI||navigator.userAgent.indexOf("MSIE 8")===-1||e.size<2e4)&&(!window.FileAPI||navigator.userAgent.indexOf("MSIE 9")===-1||e.size<4e6)){var n=window.URL||window.webkitURL;if(n&&n.createObjectURL&&!i){var o;try{o=n.createObjectURL(e)}catch(s){return void t(function(){e.$ngfBlobUrl="",a.reject()})}t(function(){if(e.$ngfBlobUrl=o,o){a.resolve(o,e),r.blobUrls=r.blobUrls||[],r.blobUrlsTotalSize=r.blobUrlsTotalSize||0,r.blobUrls.push({url:o,size:e.size}),r.blobUrlsTotalSize+=e.size||0;for(var t=r.defaults.blobUrlsMaxMemory||268435456,i=r.defaults.blobUrlsMaxQueueSize||200;(r.blobUrlsTotalSize>t||r.blobUrls.length>i)&&r.blobUrls.length>1;){var s=r.blobUrls.splice(0,1)[0];n.revokeObjectURL(s.url),r.blobUrlsTotalSize-=s.size}}})}else{var u=new FileReader;u.onload=function(n){t(function(){e.$ngfDataUrl=n.target.result,a.resolve(n.target.result,e),t(function(){delete e.$ngfDataUrl},1e3)})},u.onerror=function(){t(function(){e.$ngfDataUrl="",a.reject()})},u.readAsDataURL(e)}}else t(function(){e[i?"$ngfDataUrl":"$ngfBlobUrl"]="",a.reject()})}),o=i?e.$$ngfDataUrlPromise=a.promise:e.$$ngfBlobUrlPromise=a.promise,o["finally"](function(){delete e[i?"$$ngfDataUrlPromise":"$$ngfBlobUrlPromise"]}),o},r}]),r.directive("ngfSrc",["Upload","$timeout",function(e,n){return{restrict:"AE",link:function(r,i,o){t(e,n,r,i,o,"ngfSrc",e.attrGetter("ngfResize",o,r),!1)}}}]),r.directive("ngfBackground",["Upload","$timeout",function(e,n){return{restrict:"AE",link:function(r,i,o){t(e,n,r,i,o,"ngfBackground",e.attrGetter("ngfResize",o,r),!0)}}}]),r.directive("ngfThumbnail",["Upload","$timeout",function(e,n){return{restrict:"AE",link:function(r,i,o){var a=e.attrGetter("ngfSize",o,r);t(e,n,r,i,o,"ngfThumbnail",a,e.attrGetter("ngfAsBackground",o,r))}}}]),r.config(["$compileProvider",function(e){e.imgSrcSanitizationWhitelist&&e.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|webcal|local|file|data|blob):/),e.aHrefSanitizationWhitelist&&e.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|webcal|local|file|data|blob):/)}]),r.filter("ngfDataUrl",["UploadDataUrl","$sce",function(e,t){return function(n,r,i){if(angular.isString(n))return t.trustAsResourceUrl(n);var o=n&&((r?n.$ngfDataUrl:n.$ngfBlobUrl)||n.$ngfDataUrl);return n&&!o?(!n.$ngfDataUrlFilterInProgress&&angular.isObject(n)&&(n.$ngfDataUrlFilterInProgress=!0,e.dataUrl(n,r)),""):(n&&delete n.$ngfDataUrlFilterInProgress,(n&&o?i?t.trustAsResourceUrl(o):o:n)||"")}}])}(),r.service("UploadValidate",["UploadDataUrl","$q","$timeout",function(e,t,n){function r(e){var t="",n=[];if(e.length>2&&"/"===e[0]&&"/"===e[e.length-1])t=e.substring(1,e.length-1);else{var i=e.split(",");if(i.length>1)for(var o=0;o<i.length;o++){var a=r(i[o]);a.regexp?(t+="("+a.regexp+")",o<i.length-1&&(t+="|")):n=n.concat(a.excludes)}else 0===e.indexOf("!")?n.push("^((?!"+r(e.substring(1)).regexp+").)*$"):(0===e.indexOf(".")&&(e="*"+e),t="^"+e.replace(new RegExp("[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\-]","g"),"\\$&")+"$",t=t.replace(/\\\*/g,".*").replace(/\\\?/g,"."))}return{regexp:t,excludes:n}}function i(e,t){null==t||e.$dirty||(e.$setDirty?e.$setDirty():e.$dirty=!0)}var o=e;return o.validatePattern=function(e,t){if(!t)return!0;var n=r(t),i=!0;if(n.regexp&&n.regexp.length){var o=new RegExp(n.regexp,"i");i=null!=e.type&&o.test(e.type)||null!=e.name&&o.test(e.name)}for(var a=n.excludes.length;a--;){var s=new RegExp(n.excludes[a],"i");i=i&&(null==e.type||s.test(e.type))&&(null==e.name||s.test(e.name))}return i},o.ratioToFloat=function(e){var t=e.toString(),n=t.search(/[x:]/i);return t=n>-1?parseFloat(t.substring(0,n))/parseFloat(t.substring(n+1)):parseFloat(t)},o.registerModelChangeValidator=function(e,t,n){e&&e.$formatters.push(function(r){if(e.$dirty){var i=r;r&&!angular.isArray(r)&&(i=[r]),o.validate(i,0,e,t,n).then(function(){o.applyModelValidation(e,i)})}return r})},o.applyModelValidation=function(e,t){i(e,t),angular.forEach(e.$ngfValidations,function(t){e.$setValidity(t.name,t.valid)})},o.getValidationAttr=function(e,t,n,r,i){var a="ngf"+n[0].toUpperCase()+n.substr(1),s=o.attrGetter(a,e,t,{$file:i});if(null==s&&(s=o.attrGetter("ngfValidate",e,t,{$file:i}))){var u=(r||n).split(".");s=s[u[0]],u.length>1&&(s=s&&s[u[1]])}return s},o.validate=function(e,n,r,i,a){function s(t,n,s){if(e){for(var u=e.length,l=null;u--;){var p=e[u];if(p){var h=o.getValidationAttr(i,a,t,n,p);null!=h&&(s(p,h,u)||(c.indexOf(t)===-1?(p.$error=t,(p.$errorMessages=p.$errorMessages||{})[t]=!0,p.$errorParam=h,d.indexOf(p)===-1&&d.push(p),f||e.splice(u,1),l=!1):e.splice(u,1)))}}null!==l&&r.$ngfValidations.push({name:t,valid:l})}}function u(n,s,u,p,h){function g(t,r,i){function o(o){if(o())if(c.indexOf(n)===-1){if(r.$error=n,(r.$errorMessages=r.$errorMessages||{})[n]=!0,r.$errorParam=i,d.indexOf(r)===-1&&d.push(r),!f){var a=e.indexOf(r);a>-1&&e.splice(a,1)}t.resolve(!1)}else{var s=e.indexOf(r);s>-1&&e.splice(s,1),t.resolve(!0)}else t.resolve(!0)}null!=i?p(r,i).then(function(e){o(function(){return!h(e,i)})},function(){o(function(){return l("ngfValidateForce",{$file:r})})}):t.resolve(!0)}var v=[o.emptyPromise(!0)];e&&(e=void 0===e.length?[e]:e,angular.forEach(e,function(e){var r=t.defer();return v.push(r.promise),!u||null!=e.type&&0===e.type.search(u)?void("dimensions"===n&&null!=o.attrGetter("ngfDimensions",i)?o.imageDimensions(e).then(function(t){g(r,e,l("ngfDimensions",{$file:e,$width:t.width,$height:t.height}))},function(){r.resolve(!1)}):"duration"===n&&null!=o.attrGetter("ngfDuration",i)?o.mediaDuration(e).then(function(t){g(r,e,l("ngfDuration",{$file:e,$duration:t}))},function(){r.resolve(!1)}):g(r,e,o.getValidationAttr(i,a,n,s,e))):void r.resolve(!0)}));var $=t.defer();return t.all(v).then(function(e){for(var t=!0,i=0;i<e.length;i++)if(!e[i]){t=!1;break}r.$ngfValidations.push({name:n,valid:t}),$.resolve(t)}),$.promise}r=r||{},r.$ngfValidations=r.$ngfValidations||[],angular.forEach(r.$ngfValidations,function(e){e.valid=!0});var l=function(e,t){return o.attrGetter(e,i,a,t)},c=(o.attrGetter("ngfIgnoreInvalid",i,a)||"").split(" "),f=o.attrGetter("ngfRunAllValidations",i,a);if(null==e||0===e.length)return o.emptyPromise({validFiles:e,invalidFiles:[]});e=void 0===e.length?[e]:e.slice(0);var d=[];s("pattern",null,o.validatePattern),s("minSize","size.min",function(e,t){return e.size+.1>=o.translateScalars(t)}),s("maxSize","size.max",function(e,t){return e.size-.1<=o.translateScalars(t)});var p=0;if(s("maxTotalSize",null,function(t,n){return p+=t.size,!(p>o.translateScalars(n))||(e.splice(0,e.length),!1)}),s("validateFn",null,function(e,t){return t===!0||null===t||""===t}),!e.length)return o.emptyPromise({validFiles:[],invalidFiles:d});var h=t.defer(),g=[];return g.push(u("maxHeight","height.max",/image/,this.imageDimensions,function(e,t){return e.height<=t})),g.push(u("minHeight","height.min",/image/,this.imageDimensions,function(e,t){return e.height>=t})),g.push(u("maxWidth","width.max",/image/,this.imageDimensions,function(e,t){return e.width<=t})),g.push(u("minWidth","width.min",/image/,this.imageDimensions,function(e,t){return e.width>=t})),g.push(u("dimensions",null,/image/,function(e,t){return o.emptyPromise(t)},function(e){return e})),g.push(u("ratio",null,/image/,this.imageDimensions,function(e,t){for(var n=t.toString().split(","),r=!1,i=0;i<n.length;i++)Math.abs(e.width/e.height-o.ratioToFloat(n[i]))<.01&&(r=!0);return r})),g.push(u("maxRatio","ratio.max",/image/,this.imageDimensions,function(e,t){return e.width/e.height-o.ratioToFloat(t)<1e-4})),g.push(u("minRatio","ratio.min",/image/,this.imageDimensions,function(e,t){return e.width/e.height-o.ratioToFloat(t)>-1e-4})),g.push(u("maxDuration","duration.max",/audio|video/,this.mediaDuration,function(e,t){return e<=o.translateScalars(t)})),g.push(u("minDuration","duration.min",/audio|video/,this.mediaDuration,function(e,t){return e>=o.translateScalars(t)})),g.push(u("duration",null,/audio|video/,function(e,t){return o.emptyPromise(t)},function(e){return e})),g.push(u("validateAsyncFn",null,null,function(e,t){return t},function(e){return e===!0||null===e||""===e})),t.all(g).then(function(){if(f)for(var t=0;t<e.length;t++){var r=e[t];r.$error&&e.splice(t--,1)}f=!1,s("maxFiles",null,function(e,t,r){return n+r<t}),h.resolve({validFiles:e,invalidFiles:d})}),h.promise},o.imageDimensions=function(e){if(e.$ngfWidth&&e.$ngfHeight){var r=t.defer();return n(function(){r.resolve({width:e.$ngfWidth,height:e.$ngfHeight})}),r.promise}if(e.$ngfDimensionPromise)return e.$ngfDimensionPromise;var i=t.defer();return n(function(){return 0!==e.type.indexOf("image")?void i.reject("not image"):void o.dataUrl(e).then(function(t){function r(){var t=s[0].naturalWidth||s[0].clientWidth,n=s[0].naturalHeight||s[0].clientHeight;s.remove(),e.$ngfWidth=t,e.$ngfHeight=n,i.resolve({width:t,height:n})}function o(){s.remove(),i.reject("load error")}function a(){n(function(){s[0].parentNode&&(s[0].clientWidth?r():u++>10?o():a())},1e3)}var s=angular.element("<img>").attr("src",t).css("visibility","hidden").css("position","fixed").css("max-width","none !important").css("max-height","none !important");s.on("load",r),s.on("error",o);var u=0;a(),angular.element(document.getElementsByTagName("body")[0]).append(s)},function(){i.reject("load error")})}),e.$ngfDimensionPromise=i.promise,e.$ngfDimensionPromise["finally"](function(){delete e.$ngfDimensionPromise}),e.$ngfDimensionPromise},o.mediaDuration=function(e){if(e.$ngfDuration){var r=t.defer();return n(function(){r.resolve(e.$ngfDuration)}),r.promise}if(e.$ngfDurationPromise)return e.$ngfDurationPromise;var i=t.defer();return n(function(){return 0!==e.type.indexOf("audio")&&0!==e.type.indexOf("video")?void i.reject("not media"):void o.dataUrl(e).then(function(t){function r(){var t=s[0].duration;e.$ngfDuration=t,s.remove(),i.resolve(t)}function o(){s.remove(),i.reject("load error")}function a(){n(function(){s[0].parentNode&&(s[0].duration?r():u>10?o():a())},1e3)}var s=angular.element(0===e.type.indexOf("audio")?"<audio>":"<video>").attr("src",t).css("visibility","none").css("position","fixed");s.on("loadedmetadata",r),s.on("error",o);var u=0;a(),angular.element(document.body).append(s)},function(){i.reject("load error");
9
- })}),e.$ngfDurationPromise=i.promise,e.$ngfDurationPromise["finally"](function(){delete e.$ngfDurationPromise}),e.$ngfDurationPromise},o}]),r.service("UploadResize",["UploadValidate","$q",function(e,t){var n=e,r=function(e,t,n,r,i){var o=i?Math.max(n/e,r/t):Math.min(n/e,r/t);return{width:e*o,height:t*o,marginX:e*o-n,marginY:t*o-r}},i=function(e,i,o,a,s,u,l,c){var f=t.defer(),d=document.createElement("canvas"),p=document.createElement("img");return p.setAttribute("style","visibility:hidden;position:fixed;z-index:-100000"),document.body.appendChild(p),p.onload=function(){var e=p.width,t=p.height;if(p.parentNode.removeChild(p),null!=c&&c(e,t)===!1)return void f.reject("resizeIf");try{if(u){var h=n.ratioToFloat(u),g=e/t;g<h?(i=e,o=i/h):(o=t,i=o*h)}i||(i=e),o||(o=t);var v=r(e,t,i,o,l);d.width=Math.min(v.width,i),d.height=Math.min(v.height,o);var $=d.getContext("2d");$.drawImage(p,Math.min(0,-v.marginX/2),Math.min(0,-v.marginY/2),v.width,v.height),f.resolve(d.toDataURL(s||"image/WebP",a||.934))}catch(m){f.reject(m)}},p.onerror=function(){p.parentNode.removeChild(p),f.reject()},p.src=e,f.promise};return n.dataUrltoBlob=function(e,t,n){for(var r=e.split(","),i=r[0].match(/:(.*?);/)[1],o=atob(r[1]),a=o.length,s=new Uint8Array(a);a--;)s[a]=o.charCodeAt(a);var u=new window.Blob([s],{type:i});return u.name=t,u.$ngfOrigSize=n,u},n.isResizeSupported=function(){var e=document.createElement("canvas");return window.atob&&e.getContext&&e.getContext("2d")&&window.Blob},n.isResizeSupported()&&Object.defineProperty(window.Blob.prototype,"name",{get:function(){return this.$ngfName},set:function(e){this.$ngfName=e},configurable:!0}),n.resize=function(e,r){if(0!==e.type.indexOf("image"))return n.emptyPromise(e);var o=t.defer();return n.dataUrl(e,!0).then(function(t){i(t,r.width,r.height,r.quality,r.type||e.type,r.ratio,r.centerCrop,r.resizeIf).then(function(i){if("image/jpeg"===e.type&&r.restoreExif!==!1)try{i=n.restoreExif(t,i)}catch(a){setTimeout(function(){throw a},1)}try{var s=n.dataUrltoBlob(i,e.name,e.size);o.resolve(s)}catch(a){o.reject(a)}},function(t){"resizeIf"===t&&o.resolve(e),o.reject(t)})},function(e){o.reject(e)}),o.promise},n}]),function(){function e(e,n,r,i,o,a,s,u,l,c){function f(){return n.attr("disabled")||$("ngfDropDisabled",e)}function d(t,n){u.updateModel(i,r,e,$("ngfChange")||$("ngfDrop"),t,n)}function p(t,n){if(!u.shouldUpdateOn(t,r,e)||"string"!=typeof n)return u.rejectPromise([]);var i=[];n.replace(/<(img src|img [^>]* src) *=\"([^\"]*)\"/gi,function(e,t,n){i.push(n)});var o=[],a=[];if(i.length){angular.forEach(i,function(e){o.push(u.urlToBlob(e).then(function(e){a.push(e)}))});var s=c.defer();return c.all(o).then(function(){s.resolve(a)},function(e){s.reject(e)}),s.promise}return u.emptyPromise()}function h(e,t,n,r){var i=$("ngfDragOverClass",e,{$event:n}),o="dragover";if(angular.isString(i))o=i;else if(i&&(i.delay&&(w=i.delay),i.accept||i.reject)){var a=n.dataTransfer.items;if(null!=a&&a.length)for(var s=i.pattern||$("ngfPattern",e,{$event:n}),l=a.length;l--;){if(!u.validatePattern(a[l],s)){o=i.reject;break}o=i.accept}else o=i.accept}r(o)}function g(t,n,i,o){function a(e,t){var n=c.defer();if(null!=e)if(e.isDirectory){var r=[u.emptyPromise()];if(d){var i={type:"directory"};i.name=i.path=(t||"")+e.name,p.push(i)}var o=e.createReader(),s=[],g=function(){o.readEntries(function(i){try{i.length?(s=s.concat(Array.prototype.slice.call(i||[],0)),g()):(angular.forEach(s.slice(0),function(n){p.length<=l&&h<=f&&r.push(a(n,(t?t:"")+e.name+"/"))}),c.all(r).then(function(){n.resolve()},function(e){n.reject(e)}))}catch(o){n.reject(o)}},function(e){n.reject(e)})};g()}else e.file(function(e){try{e.path=(t?t:"")+e.name,d&&(e=u.rename(e,e.path)),p.push(e),h+=e.size,n.resolve()}catch(r){n.reject(r)}},function(e){n.reject(e)});return n.promise}var l=u.getValidationAttr(r,e,"maxFiles");null==l&&(l=Number.MAX_VALUE);var f=u.getValidationAttr(r,e,"maxTotalSize");null==f&&(f=Number.MAX_VALUE);var d=$("ngfIncludeDir",e),p=[],h=0,g=[u.emptyPromise()];if(t&&t.length>0&&"file:"!==s.location.protocol)for(var v=0;v<t.length;v++){if(t[v].webkitGetAsEntry&&t[v].webkitGetAsEntry()&&t[v].webkitGetAsEntry().isDirectory){var m=t[v].webkitGetAsEntry();if(m.isDirectory&&!i)continue;null!=m&&g.push(a(m))}else{var b=t[v].getAsFile();null!=b&&(p.push(b),h+=b.size)}if(p.length>l||h>f||!o&&p.length>0)break}else if(null!=n)for(var y=0;y<n.length;y++){var w=n.item(y);if((w.type||w.size>0)&&(p.push(w),h+=w.size),p.length>l||h>f||!o&&p.length>0)break}var x=c.defer();return c.all(g).then(function(){if(o||d||!p.length)x.resolve(p);else{for(var e=0;p[e]&&"directory"===p[e].type;)e++;x.resolve([p[e]])}},function(e){x.reject(e)}),x.promise}var v=t(),$=function(e,t,n){return u.attrGetter(e,r,t,n)};if($("dropAvailable")&&a(function(){e[$("dropAvailable")]?e[$("dropAvailable")].value=v:e[$("dropAvailable")]=v}),!v)return void($("ngfHideOnDropNotAvailable",e)===!0&&n.css("display","none"));null==$("ngfSelect")&&u.registerModelChangeValidator(i,r,e);var m,b=null,y=o($("ngfStopPropagation")),w=1;n[0].addEventListener("dragover",function(t){if(!f()&&u.shouldUpdateOn("drop",r,e)){if(t.preventDefault(),y(e)&&t.stopPropagation(),navigator.userAgent.indexOf("Chrome")>-1){var i=t.dataTransfer.effectAllowed;t.dataTransfer.dropEffect="move"===i||"linkMove"===i?"move":"copy"}a.cancel(b),m||(m="C",h(e,r,t,function(r){m=r,n.addClass(m),$("ngfDrag",e,{$isDragging:!0,$class:m,$event:t})}))}},!1),n[0].addEventListener("dragenter",function(t){!f()&&u.shouldUpdateOn("drop",r,e)&&(t.preventDefault(),y(e)&&t.stopPropagation())},!1),n[0].addEventListener("dragleave",function(t){!f()&&u.shouldUpdateOn("drop",r,e)&&(t.preventDefault(),y(e)&&t.stopPropagation(),b=a(function(){m&&n.removeClass(m),m=null,$("ngfDrag",e,{$isDragging:!1,$event:t})},w||100))},!1),n[0].addEventListener("drop",function(t){if(!f()&&u.shouldUpdateOn("drop",r,e)){t.preventDefault(),y(e)&&t.stopPropagation(),m&&n.removeClass(m),m=null;var i,o=t.dataTransfer.items;try{i=t.dataTransfer&&t.dataTransfer.getData&&t.dataTransfer.getData("text/html")}catch(a){}g(o,t.dataTransfer.files,$("ngfAllowDir",e)!==!1,$("multiple")||$("ngfMultiple",e)).then(function(e){e.length?d(e,t):p("dropUrl",i).then(function(e){d(e,t)})})}},!1),n[0].addEventListener("paste",function(t){if(navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&$("ngfEnableFirefoxPaste",e)&&t.preventDefault(),!f()&&u.shouldUpdateOn("paste",r,e)){var n=[],i=t.clipboardData||t.originalEvent.clipboardData;if(i&&i.items)for(var o=0;o<i.items.length;o++)i.items[o].type.indexOf("image")!==-1&&n.push(i.items[o].getAsFile());n.length?d(n,t):p("pasteUrl",i).then(function(e){d(e,t)})}},!1),navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&$("ngfEnableFirefoxPaste",e)&&(n.attr("contenteditable",!0),n.on("keypress",function(e){e.metaKey||e.ctrlKey||e.preventDefault()}))}function t(){var e=document.createElement("div");return"draggable"in e&&"ondrop"in e&&!/Edge\/12./i.test(navigator.userAgent)}r.directive("ngfDrop",["$parse","$timeout","$window","Upload","$http","$q",function(t,n,r,i,o,a){return{restrict:"AEC",require:"?ngModel",link:function(s,u,l,c){e(s,u,l,c,t,n,r,i,o,a)}}}]),r.directive("ngfNoFileDrop",function(){return function(e,n){t()&&n.css("display","none")}}),r.directive("ngfDropAvailable",["$parse","$timeout","Upload",function(e,n,r){return function(i,o,a){if(t()){var s=e(r.attrGetter("ngfDropAvailable",a));n(function(){s(i),s.assign&&s.assign(i,!0)})}}}])}(),r.service("UploadExif",["UploadResize","$q",function(e,t){function n(e,t,n,r){switch(t){case 2:return e.transform(-1,0,0,1,n,0);case 3:return e.transform(-1,0,0,-1,n,r);case 4:return e.transform(1,0,0,-1,0,r);case 5:return e.transform(0,1,1,0,0,0);case 6:return e.transform(0,1,-1,0,r,0);case 7:return e.transform(0,-1,-1,0,r,n);case 8:return e.transform(0,-1,1,0,0,n)}}function r(e){for(var t="",n=new Uint8Array(e),r=n.byteLength,i=0;i<r;i++)t+=String.fromCharCode(n[i]);return window.btoa(t)}var i=e;return i.isExifSupported=function(){return window.FileReader&&(new FileReader).readAsArrayBuffer&&i.isResizeSupported()},i.readOrientation=function(e){var n=t.defer(),r=new FileReader,i=e.slice?e.slice(0,65536):e;return r.readAsArrayBuffer(i),r.onerror=function(e){return n.reject(e)},r.onload=function(e){var t={orientation:1},r=new DataView(this.result);if(65496!==r.getUint16(0,!1))return n.resolve(t);for(var i=r.byteLength,o=2;o<i;){var a=r.getUint16(o,!1);if(o+=2,65505===a){if(1165519206!==r.getUint32(o+=2,!1))return n.resolve(t);var s=18761===r.getUint16(o+=6,!1);o+=r.getUint32(o+4,s);var u=r.getUint16(o,s);o+=2;for(var l=0;l<u;l++)if(274===r.getUint16(o+12*l,s)){var c=r.getUint16(o+12*l+8,s);return c>=2&&c<=8&&(r.setUint16(o+12*l+8,1,s),t.fixedArrayBuffer=e.target.result),t.orientation=c,n.resolve(t)}}else{if(65280!==(65280&a))break;o+=r.getUint16(o,!1)}}return n.resolve(t)},n.promise},i.applyExifRotation=function(e){if(0!==e.type.indexOf("image/jpeg"))return i.emptyPromise(e);var o=t.defer();return i.readOrientation(e).then(function(t){return t.orientation<2||t.orientation>8?o.resolve(e):void i.dataUrl(e,!0).then(function(a){var s=document.createElement("canvas"),u=document.createElement("img");u.onload=function(){try{s.width=t.orientation>4?u.height:u.width,s.height=t.orientation>4?u.width:u.height;var a=s.getContext("2d");n(a,t.orientation,u.width,u.height),a.drawImage(u,0,0);var l=s.toDataURL(e.type||"image/WebP",.934);l=i.restoreExif(r(t.fixedArrayBuffer),l);var c=i.dataUrltoBlob(l,e.name);o.resolve(c)}catch(f){return o.reject(f)}},u.onerror=function(){o.reject()},u.src=a},function(e){o.reject(e)})},function(e){o.reject(e)}),o.promise},i.restoreExif=function(e,t){var n={};return n.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n.encode64=function(e){var t,n,r,i,o,a="",s="",u="",l=0;do t=e[l++],n=e[l++],s=e[l++],r=t>>2,i=(3&t)<<4|n>>4,o=(15&n)<<2|s>>6,u=63&s,isNaN(n)?o=u=64:isNaN(s)&&(u=64),a=a+this.KEY_STR.charAt(r)+this.KEY_STR.charAt(i)+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(u),t=n=s="",r=i=o=u="";while(l<e.length);return a},n.restore=function(e,t){e.match("data:image/jpeg;base64,")&&(e=e.replace("data:image/jpeg;base64,",""));var n=this.decode64(e),r=this.slice2Segments(n),i=this.exifManipulation(t,r);return"data:image/jpeg;base64,"+this.encode64(i)},n.exifManipulation=function(e,t){var n=this.getExifArray(t),r=this.insertExif(e,n);return new Uint8Array(r)},n.getExifArray=function(e){for(var t,n=0;n<e.length;n++)if(t=e[n],255===t[0]&225===t[1])return t;return[]},n.insertExif=function(e,t){var n=e.replace("data:image/jpeg;base64,",""),r=this.decode64(n),i=r.indexOf(255,3),o=r.slice(0,i),a=r.slice(i),s=o;return s=s.concat(t),s=s.concat(a)},n.slice2Segments=function(e){for(var t=0,n=[];;){if(255===e[t]&218===e[t+1])break;if(255===e[t]&216===e[t+1])t+=2;else{var r=256*e[t+2]+e[t+3],i=t+r+2,o=e.slice(t,i);n.push(o),t=i}if(t>e.length)break}return n},n.decode64=function(e){var t,n,r,i,o,a="",s="",u=0,l=[],c=/[^A-Za-z0-9\+\/\=]/g;c.exec(e)&&console.log("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, NaNExpect errors in decoding."),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");do r=this.KEY_STR.indexOf(e.charAt(u++)),i=this.KEY_STR.indexOf(e.charAt(u++)),o=this.KEY_STR.indexOf(e.charAt(u++)),s=this.KEY_STR.indexOf(e.charAt(u++)),t=r<<2|i>>4,n=(15&i)<<4|o>>2,a=(3&o)<<6|s,l.push(t),64!==o&&l.push(n),64!==s&&l.push(a),t=n=a="",r=i=o=s="";while(u<e.length);return l},n.restore(e,t)},i}])},{}],44:[function(e,t,n){e("./dist/ng-file-upload-all"),t.exports="ngFileUpload"},{"./dist/ng-file-upload-all":43}]},{},[37]);
1
+ !function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return i(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./app.controller"),o=r(i),a={bindings:{settingsName:"@"},controller:o["default"],template:'<navbar id="settings-navbar"\n tabs="$ctrl.config.tabs"\n page="$ctrl.config.page"\n links="$ctrl.config.links"\n current-tab="$ctrl.config.currentTab">\n </navbar>\n <status i18n="$ctrl.config.i18n.status"></status>\n <select-editor\n ng-if="$ctrl.config.currentTab == \'select\'"\n settings="$ctrl.config.settings"\n i18n="$ctrl.config.i18n.editor">\n </select-editor>\n <visual-editor\n ng-if="$ctrl.config.currentTab == \'visual\'"\n settings="$ctrl.config.settings"\n i18n="$ctrl.config.i18n.editor">\n </visual-editor>\n <advanced-editor\n ng-if="$ctrl.config.currentTab == \'advanced\'"\n settings="$ctrl.config.settings"\n i18n="$ctrl.config.i18n.editor">\n </advanced-editor>\n <import-editor\n ng-if="$ctrl.config.currentTab == \'import\'"\n settings="$ctrl.config.settings"\n i18n="$ctrl.config.i18n.editor">\n </import-editor>\n '};n["default"]=a},{"./app.controller":2}],2:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t,n){r(this,e),this.httpService=t,this.linkService=n,this.config={},this.settingsValue={}}return i(e,[{key:"$onInit",value:function(){this.config=window[this.settingsName],this.httpService.init(this.config.ajax),this.linkService.init(this.config.page)}}]),e}();o.$inject=["httpService","linkService"],n["default"]=o},{}],3:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("angular-sanitize"),s=r(a),u=e("ng-file-upload"),l=r(u),c=e("angular-drag-and-drop-lists"),f=(r(c),e("./app.component")),d=r(f),p=e("./components/components"),h=r(p),g=e("./common/components"),v=r(g),m=e("./services"),$=r(m),b=o["default"].module("app",[s["default"],l["default"],h["default"],v["default"],$["default"]]).component("app",d["default"]).name;n["default"]=b},{"./app.component":1,"./common/components":8,"./components/components":18,"./services":39,angular:46,"angular-drag-and-drop-lists":42,"angular-sanitize":44,"ng-file-upload":48}],4:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./../base.controller"),o=r(i),a={bindings:{settings:"<",i18n:"<"},controller:o["default"],template:'\n <h2>{{ $ctrl.i18n.title }}</h2>\n <table class="form-table">\n <tbody>\n <tr>\n <th>{{ ::$ctrl.i18n.filters_label }}</th>\n <td>\n <p>\n <filter name="$ctrl.settings.filter_the_content_on" priority="$ctrl.settings.filter_the_content_priority"\n update="$ctrl.update($event)" template="$ctrl.i18n.filter_template">\n </filter>\n </p>\n <p>\n <filter name="$ctrl.settings.filter_the_excerpt_on" priority="$ctrl.settings.filter_the_excerpt_priority"\n update="$ctrl.update($event)" template="$ctrl.i18n.filter_template">\n </filter>\n </p>\n <p>\n <filter name="$ctrl.settings.filter_post_thumbnail_html_on" priority="$ctrl.settings.filter_post_thumbnail_html_priority"\n update="$ctrl.update($event)" template="$ctrl.i18n.filter_template">\n </filter>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.filters_description"></p>\n </td>\n </tr>\n </tbody>\n </table>\n <button class="button button-primary" ng-click="$ctrl.save()">\n {{ ::$ctrl.i18n.submit }}\n </button>\n '};n["default"]=a},{"./../base.controller":7}],5:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t){r(this,e),this.$compile=t,this.restrict="E",this.scope={name:"=",priority:"=",template:"=",update:"&"}}return i(e,[{key:"link",value:function(e,t,n){var r=e.template,i=r.replace("%name%",'<editor-checkbox args="name" on-update="update({ $event })" add-br="false"></editor-checkbox>').replace("%priority%",'<editor-number args="priority" on-update="update({ $event })"></editor-number>');t.html(i),this.$compile(t.contents())(e)}}]),e}();n["default"]=o},{}],6:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./filter.directive"),s=r(a),u=e("./advanced.component"),l=r(u),c=e("./../../components/components"),f=r(c),d=o["default"].module("app.common.advanced",[f["default"]]).directive("filter",["$compile",function(e){return new s["default"](e)}]).component("advancedEditor",l["default"]).name;n["default"]=d},{"./../../components/components":18,"./advanced.component":4,"./filter.directive":5,angular:46}],7:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(t){r(this,e),this.httpService=t}return o(e,[{key:"$onChanges",value:function(e){var t=this;e.settings&&(this.settings=i({},this.settings),this.values=Object.keys(this.settings).reduce(function(e,n){return e[n]=t.settings[n].value,e},{}))}},{key:"update",value:function(e){var t=e.key,n=e.value;this.values[t]=n}},{key:"updateValue",value:function(e,t){this.settings[e]=i({},this.settings[e],{value:t}),this.values[e]=t}},{key:"save",value:function(){var e=this;this.httpService.saveSettings(this.values).then(function(t){var n=t.status,r=t.model;"OK"===n.status&&(e.values=r,Object.keys(e.values).forEach(function(t){e.settings[t]=i({},e.settings[t],{value:e.values[t]})}))})}}]),e}();a.$inject=["httpService"],n["default"]=a},{}],8:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./select"),s=r(a),u=e("./visual"),l=r(u),c=e("./import"),f=r(c),d=e("./advanced"),p=r(d),h=o["default"].module("app.common",[s["default"],l["default"],f["default"],p["default"]]).name;n["default"]=h},{"./advanced":6,"./import":11,"./select":12,"./visual":15,angular:46}],9:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./import.controller"),o=r(i),a={bindings:{i18n:"<"},controller:o["default"],template:'\n <h2>{{ ::$ctrl.i18n.title }}</h2>\n <table class="form-table">\n <tbody>\n <tr>\n <th><label>{{ ::$ctrl.i18n.export_title }}</label></th>\n <td>\n <a href="{{ ::$ctrl.i18n.export_url }}" class="button button-default">\n {{ ::$ctrl.i18n.export_button_text }}\n </a>\n </td>\n </tr>\n <tr>\n <th><label>{{ ::$ctrl.i18n.import_title }}</label></th>\n <td>\n <button class="button button-primary" type="file"\n ngf-accept="\'.json\'"\n ngf-select="$ctrl.uploadFiles($file, $invalidFiles)" ngf-max-size="1MB">\n {{ ::$ctrl.i18n.import_button_text }}\n </button>\n <div ng-if="$ctrl.upload_status === \'OK\' || $ctrl.upload_status === \'ERROR\'" class="notice"\n ng-class="{ \'error\': $ctrl.upload_status === \'ERROR\', \'updated\': $ctrl.upload_status === \'OK\' }">\n <p><strong ng-bind-html="$ctrl.upload_message"></strong></p>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n '};n["default"]=a},{"./import.controller":10}],10:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t,n,i){r(this,e),this.$timeout=t,this.httpService=i,this.Upload=n,this.upload_status="",this.upload_message=""}return i(e,[{key:"uploadFiles",value:function(e,t){this.f=e,this.errFile=t&&t[0],e&&this.httpService.uploadFile(this.i18n.import_action_name,e)}}]),e}();o.$inject=["$timeout","Upload","httpService"],n["default"]=o},{}],11:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./import.component"),s=r(a),u=o["default"].module("app.common.import",[]).component("importEditor",s["default"]).name;n["default"]=u},{"./import.component":9,angular:46}],12:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./resolution.directive"),s=r(a),u=e("./select.component"),l=r(u),c=e("./../../components/components"),f=r(c),d=o["default"].module("app.common.select",[f["default"]]).directive("resolution",["$compile",function(e){return new s["default"](e)}]).component("selectEditor",l["default"]).name;n["default"]=d},{"./../../components/components":18,"./resolution.directive":13,"./select.component":14,angular:46}],13:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t){r(this,e),this.$compile=t,this.restrict="E",this.scope={height:"=",width:"=",template:"=",update:"&"}}return i(e,[{key:"link",value:function(e,t,n){var r=e.template,i=r.replace("%height%",'<editor-number args="height" on-update="update({ $event })"></editor-number>').replace("%width%",'<editor-number args="width" on-update="update({ $event })"></editor-number>');t.html(i),this.$compile(t.contents())(e)}}]),e}();n["default"]=o},{}],14:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./../base.controller"),o=r(i),a={bindings:{settings:"<",i18n:"<"},controller:o["default"],template:'\n <h2>{{ $ctrl.i18n.title }}</h2>\n <table class="form-table">\n <tbody>\n <tr>\n <th><label for="image_selector">{{ ::$ctrl.settings.image_selector.label }}</label></th>\n <td>\n <editor-text args="$ctrl.settings.image_selector" on-update="$ctrl.update($event)"></editor-text>\n <p class="description" ng-bind-html="$ctrl.settings.image_selector.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label for="disabled_classes">{{ ::$ctrl.settings.disabled_classes.label }}</label></th>\n <td>\n <editor-text args="$ctrl.settings.disabled_classes" on-update="$ctrl.update($event)"></editor-text>\n <p class="description" ng-bind-html="$ctrl.settings.disabled_classes.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label for="enabled_classes">{{ ::$ctrl.settings.enabled_classes.label }}</label></th>\n <td>\n <editor-text args="$ctrl.settings.enabled_classes" on-update="$ctrl.update($event)"></editor-text>\n <p class="description" ng-bind-html="$ctrl.settings.enabled_classes.desc"></p>\n </td>\n </tr>\n <tr>\n <th>{{ ::$ctrl.i18n.image_resolution_label }}</th>\n <td>\n <p>\n <resolution height="$ctrl.settings.min_image_height_small" width="$ctrl.settings.min_image_width_small"\n update="$ctrl.update($event)" template="$ctrl.i18n.min_resolution_template_small">\n </resolution>\n </p>\n <p>\n <resolution height="$ctrl.settings.min_image_height" width="$ctrl.settings.min_image_width"\n update="$ctrl.update($event)" template="$ctrl.i18n.min_resolution_template">\n </resolution>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.image_resolution_desc"></p>\n <p class="description" ng-bind-html="$ctrl.i18n.image_resolution_desc_2"></p>\n </td>\n </tr>\n <tr>\n <th>{{ ::$ctrl.i18n.show_on_field_label }}</th>\n <td>\n <p>\n <label for="show_on">{{ ::$ctrl.settings.show_on.label }}:</label><br/>\n <editor-textarea args="$ctrl.settings.show_on" on-update="$ctrl.update($event)"></editor-text>\n </p>\n <p>\n <label for="disable_on">{{ ::$ctrl.settings.disable_on.label }}:</label><br/>\n <editor-textarea args="$ctrl.settings.disable_on" on-update="$ctrl.update($event)"></editor-text>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.show_on_field_desc"></p>\n </td>\n </tr>\n </tbody>\n </table>\n <button class="button button-primary" ng-click="$ctrl.save()">\n {{ ::$ctrl.i18n.submit }}\n </button>\n '};n["default"]=a},{"./../base.controller":7}],15:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./visual.component"),s=r(a),u=e("./../../components/components"),l=r(u),c=o["default"].module("app.common.visual",[l["default"]]).component("visualEditor",s["default"]).name;n["default"]=c},{"./../../components/components":18,"./visual.component":16,angular:46}],16:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./visual.controller"),o=r(i),a={bindings:{settings:"<",i18n:"<"},controller:o["default"],template:'\n <h2>{{ $ctrl.i18n.title }}</h2>\n <table class="form-table">\n <tbody>\n <tr>\n <th><label for="show_button">{{ ::$ctrl.settings.show_button.label }}</label></th>\n <td>\n <editor-select args="$ctrl.settings.show_button" on-update="$ctrl.update($event)"></editor-select>\n <p class="description" ng-bind-html="$ctrl.settings.show_button.desc"></p>\n <p ng-if="$ctrl.values.show_button != \'hover\'">\n <b ng-bind-html="$ctrl.i18n.pro_feature_error"></b>\n </p>\n </td>\n </tr>\n <tr>\n <th><label>{{ ::$ctrl.settings.description_option.label }}</label></th>\n <td>\n <editor-sortable-select args="$ctrl.settings.description_option" on-update="$ctrl.update($event)"></editor-sortable-select>\n <p class="description" ng-bind-html="$ctrl.settings.description_option.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label for="pinLinkedImages">{{ ::$ctrl.settings.pinLinkedImages.label }}</label></th>\n <td>\n <editor-checkbox args="$ctrl.settings.pinLinkedImages" on-update="$ctrl.update($event)"></editor-checkbox>\n <p class="description" ng-bind-html="$ctrl.settings.pinLinkedImages.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label for="transparency_value">{{ ::$ctrl.settings.transparency_value.label }}</label></th>\n <td>\n <editor-number args="$ctrl.settings.transparency_value" on-update="$ctrl.update($event)"></editor-number>\n <p class="description" ng-bind-html="$ctrl.settings.transparency_value.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label>{{ ::$ctrl.settings.pin_image.label }}</label></th>\n <td>\n <table class="jpibfi-inner-table">\n <tr>\n <th>{{ ::$ctrl.i18n.mode }}</th>\n <th ng-if="$ctrl.values.pin_image != \'old_default\'">{{ ::$ctrl.i18n.settings }}</th>\n <th>{{ ::$ctrl.i18n.preview }}</th>\n </tr>\n <tr>\n <td>\n <p><label><input type="radio" ng_model="$ctrl.values.pin_image" value="old_default">{{ ::$ctrl.settings.pin_image.options[\'old_default\'] }}</label></p>\n <p><label><input type="radio" ng_model="$ctrl.values.pin_image" value="default">{{ ::$ctrl.settings.pin_image.options[\'default\'] }}</label></p>\n <p><label><input type="radio" ng_model="$ctrl.values.pin_image" value="custom">{{ ::$ctrl.settings.pin_image.options[\'custom\'] }}</label></p>\n </td>\n <td ng-if="$ctrl.values.pin_image != \'old_default\'">\n <div ng-show="$ctrl.values.pin_image == \'default\'">\n <p>\n <label for="pin_image_icon">{{ ::$ctrl.settings.pin_image_icon.label }}</label>\n <editor-select args="$ctrl.settings.pin_image_icon" on-update="$ctrl.update($event)"></editor-select>\n <p ng-if="$ctrl.values.pin_image_icon != \'circle\'">\n <b ng-bind-html="$ctrl.i18n.pro_feature_error"></b>\n </p>\n </p>\n <p>\n <label for="pin_image_size">{{ ::$ctrl.settings.pin_image_size.label }}</label>\n <editor-select args="$ctrl.settings.pin_image_size" on-update="$ctrl.update($event)"></editor-select>\n </p>\n <p>\n <label for="pin_image_button">{{ ::$ctrl.settings.pin_image_button.label }}</label>\n <editor-select args="$ctrl.settings.pin_image_button" on-update="$ctrl.update($event)"></editor-select>\n </p>\n </div>\n <div ng-if="$ctrl.values.pin_image == \'custom\'">\n <p><button class="button button-default" ng-click="$ctrl.upload()">{{ ::$ctrl.i18n.custom_button_upload }}</button></p>\n <p>\n <label for="custom_image_url">{{ ::$ctrl.settings.custom_image_url.label }}</label>\n <editor-text args="$ctrl.settings.custom_image_url" on-update="$ctrl.update($event)"></editor-text>\n </p>\n <p>\n <div style="display: inline-block; width: 49%;">\n <label for="custom_image_height">{{ ::$ctrl.settings.custom_image_height.label }}</label>\n <editor-number args="$ctrl.settings.custom_image_height" on-update="$ctrl.update($event)"></editor-number>\n </div>\n <div style="display: inline-block; width: 49%;">\n <label for="custom_image_width">{{ ::$ctrl.settings.custom_image_width.label }}</label>\n <editor-number args="$ctrl.settings.custom_image_width" on-update="$ctrl.update($event)"></editor-number>\n </div>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.custom_button_desc"></p>\n </div>\n </td>\n <td>\n <div ng-if="$ctrl.values.pin_image == \'old_default\'">\n <a class="pinit-button old_default"><span></span></a>\n </div>\n <div ng-show="$ctrl.values.pin_image == \'default\'">\n <a class="pinit-button default" ng-class="[\'jpibfi-size-\' + $ctrl.values.pin_image_size, \'jpibfi-button-\' + $ctrl.values.pin_image_button]">\n <span ng-class="[\'jpibfi-icon-\' + $ctrl.values.pin_image_icon]"></span>\n </a>\n </div>\n <div ng-show="$ctrl.values.pin_image == \'custom\'">\n <div ng-if="$ctrl.values.custom_image_url">\n <div style="width: {{ $ctrl.values.custom_image_width }}px;\n height: {{ $ctrl.values.custom_image_height }}px;\n background-image: url(\'{{ $ctrl.values.custom_image_url }}\');">\n </div>\n </div>\n <div ng-if="!$ctrl.values.custom_image_url">\n {{ ::$ctrl.i18n.custom_button_no_image_to_preview }}\n </div>\n </div>\n </td>\n </tr>\n </table>\n </tr>\n <tr>\n <th><label for="button_position">{{ ::$ctrl.settings.button_position.label }}</label></th>\n <td>\n <editor-select args="$ctrl.settings.button_position" on-update="$ctrl.update($event)"></editor-select>\n <p class="description" ng-bind-html="$ctrl.settings.button_position.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label>{{ ::$ctrl.i18n.margins_label }}</label></th>\n <td>\n <p>\n <label for="button_margin_top">{{ ::$ctrl.settings.button_margin_top.label }}</label>\n <editor-number ng-disabled="!$ctrl.marginAvailability.top" args="$ctrl.settings.button_margin_top" on-update="$ctrl.update($event)">\n </editor-number>\n </p>\n <p>\n <label for="button_margin_bottom">{{ ::$ctrl.settings.button_margin_bottom.label }}</label>\n <editor-number ng-disabled="!$ctrl.marginAvailability.bottom" args="$ctrl.settings.button_margin_bottom" on-update="$ctrl.update($event)">\n </editor-number>\n </p>\n <p>\n <label for="button_margin_left">{{ ::$ctrl.settings.button_margin_left.label }}</label>\n <editor-number ng-disabled="!$ctrl.marginAvailability.left" args="$ctrl.settings.button_margin_left" on-update="$ctrl.update($event)">\n </editor-number>\n </p>\n <p>\n <label for="button_margin_right">{{ ::$ctrl.settings.button_margin_right.label }}</label>\n <editor-number ng-disabled="!$ctrl.marginAvailability.right" args="$ctrl.settings.button_margin_right" on-update="$ctrl.update($event)">\n </editor-number>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.margins_desc"></p>\n </td>\n </tr>\n </tbody>\n </table>\n <button class="button button-primary" ng-click="$ctrl.save()">\n {{ ::$ctrl.i18n.submit }}\n </button>\n <p ng-bind-html="$ctrl.i18n.attribution"></p>\n '};n["default"]=a},{"./visual.controller":17}],17:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function d(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:d(i,t,n)}if("value"in r)return r.value;var o=r.get;if(void 0!==o)return o.call(n)},l=e("./../base.controller"),c=r(l),f=function(e){function t(e,n){i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return r.$scope=e,r.fileFrame=null,r}return a(t,e),s(t,[{key:"$onChanges",value:function(e){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"$onChanges",this).call(this,e),this.updateMarginAvailability()}},{key:"update",value:function(e){var t=e.key,n=e.value;this.values[t]=n,"button_position"===t&&this.updateMarginAvailability()}},{key:"updateMarginAvailability",value:function(){var e=this.values.button_position;this.marginAvailability={top:"top-left"===e||"top-right"===e,bottom:"bottom-left"===e||"bottom-right"===e,left:"top-left"===e||"bottom-left"===e,right:"top-right"===e||"bottom-right"===e}}},{key:"upload",value:function(){var e=this;return this.fileFrame?void this.fileFrame.open():(this.fileFrame=wp.media.frames.file_frame=wp.media({title:this.i18n.custom_button_frame_title,button:{text:this.i18n.custom_button_frame_button_text},multiple:!1}).on("select",function(){var t=e.fileFrame.state().get("selection").first().toJSON();e.updateValue("custom_image_url",t.url),e.updateValue("custom_image_width",t.width),e.updateValue("custom_image_height",t.height),e.$scope.$digest()}),void this.fileFrame.open())}}]),t}(c["default"]);f.$inject=["$scope","httpService"],n["default"]=f},{"./../base.controller":7}],18:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./navbar"),s=r(a),u=e("./editors"),l=r(u),c=e("./status"),f=r(c),d=o["default"].module("app.components",[s["default"],l["default"],f["default"]]).name;n["default"]=d},{"./editors":32,"./navbar":33,"./status":35,angular:46}],19:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.checkbox.controller"),o=r(i),a={bindings:{args:"<",onUpdate:"&",addBr:"<?"},controller:o["default"],template:'<input type="checkbox" ng-change="$ctrl.change()" id="{{ $ctrl.key }}" ng-model="$ctrl.value">\n <label for=" {{ $ctrl.key }}">{{ ::$ctrl.args.text }}</label><br ng-if="$ctrl.addBr" />'};n["default"]=a},{"./editor.checkbox.controller":20}],20:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=e("./editor.controller"),l=r(u),c=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"$onInit",value:function(){void 0===this.addBr&&(this.addBr=!0)}}]),t}(l["default"]);n["default"]=c},{"./editor.controller":23}],21:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.checkboxes.controller"),o=r(i),a={bindings:{args:"<",onUpdate:"&"},controller:o["default"],template:'<p ng-repeat="(key, label) in $ctrl.args.options">\n <input type="checkbox" id="{{:: $ctrl.key + \'_\' + key }}" ng-change="$ctrl.change()" ng-model="$ctrl.values[key]" />\n <label for="{{ $ctrl.key + \'_\' + key }}">{{ ::label }}</label>\n </p>'
2
+ };n["default"]=a},{"./editor.checkboxes.controller":22}],22:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(){r(this,e),this.key=this.args.key;var t=this.args.value||[];this.values=Object.keys(this.args.options).reduce(function(e,n){return e[n]=t.indexOf(n)!==-1,e},{})}return o(e,[{key:"$onChanges",value:function(e){e.args&&(this.args=i({},this.args))}},{key:"change",value:function(e){var t=this;return this.onUpdate({$event:{key:this.key,value:Object.keys(this.args.options).reduce(function(e,n){return t.values[n]?e.concat([n]):e},[])}}),e}}]),e}();a.$inject=[],n["default"]=a},{}],23:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(){r(this,e)}return o(e,[{key:"$onChanges",value:function(e){e.args&&(this.args=i({},this.args),this.key=this.args.key,this.value=this.args.value)}},{key:"change",value:function(){this.onUpdate({$event:{key:this.key,value:this.value}})}}]),e}();a.$inject=[],n["default"]=a},{}],24:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.controller"),o=r(i),a={bindings:{args:"<",ngDisabled:"<",onUpdate:"&"},controller:o["default"],template:'\n <input id="{{ $ctrl.key }}" ng-disabled="$ctrl.ngDisabled" number-attributes="$ctrl.args" class="small-text" type="number" ng-model="$ctrl.value" ng-change="$ctrl.change()" /> \n <span>{{ ::$ctrl.args.unit }}</span>'};n["default"]=a},{"./editor.controller":23}],25:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t){r(this,e),this.$parse=t,this.restrict="A"}return i(e,[{key:"link",value:function(e,t,n){var r=this.$parse(n.numberAttributes)(e),i=["step","min","max"];i.forEach(function(e){void 0!==r[e]&&t.attr(e,r[e])})}}]),e}();n["default"]=o},{}],26:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.select.controller"),o=r(i),a={bindings:{args:"<",onUpdate:"&"},controller:o["default"],template:'\n <select ng-model="$ctrl.value" ng-change="$ctrl.change()">\n <option ng-repeat="(value, name) in $ctrl.args.options" value="{{ value }}">{{ name }}</option>\n </select>'};n["default"]=a},{"./editor.select.controller":27}],27:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function d(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:d(i,t,n)}if("value"in r)return r.value;var o=r.get;if(void 0!==o)return o.call(n)},l=e("./editor.controller"),c=r(l),f=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"$onChanges",value:function(e){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"$onChanges",this).call(this,e),e.args&&(void 0!==this.args.value&&null!==this.args.value||(this.value=Object.keys(this.args.options)[0],this.change()),this.args.truthy&&(this.value=this.value?"1":"0"))}},{key:"change",value:function(){this.onUpdate({$event:{key:this.key,value:this.args.truthy?"1"===this.value:this.value}})}}]),t}(c["default"]);f.$inject=[],n["default"]=f},{"./editor.controller":23}],28:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.sortableSelect.controller"),o=r(i),a={bindings:{args:"<",onUpdate:"&"},controller:o["default"],template:'\n <ul class="frizzly-sortable" dnd-list="$ctrl.options">\n <li ng-repeat="item in $ctrl.options"\n dnd-draggable="item"\n dnd-moved="$ctrl.options.splice($index, 1); $ctrl.change()"\n dnd-effect-allowed="move">\n <input type="checkbox" id="{{ item.key }}" ng-model="item.selected" ng-change="$ctrl.change()" />\n <label for="{{ item.key }}">{{ item.label }}\n </li>\n </ul>\n '};n["default"]=a},{"./editor.sortableSelect.controller":29}],29:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(){r(this,e)}return o(e,[{key:"$onChanges",value:function(e){var t=this;if(e.args){this.args=i({},this.args),this.key=this.args.key,this.value=this.args.value||[];var n=this.value.slice().concat(Object.keys(this.args.options).filter(function(e){return t.value.indexOf(e)===-1}));this.options=n.map(function(e){return{key:e,label:t.args.options[e],selected:t.value.indexOf(e)!==-1}})}}},{key:"change",value:function(){var e=this.options.reduce(function(e,t){return t.selected?e.concat([t.key]):e},[]);this.onUpdate({$event:{key:this.key,value:e}})}}]),e}();a.$inject=[],n["default"]=a},{}],30:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.controller"),o=r(i),a={bindings:{args:"<",ngDisabled:"<",onUpdate:"&"},controller:o["default"],template:'<input ng-disabled="$ctrl.ngDisabled" type="text" id="{{ $ctrl.key }}" ng-model="$ctrl.value" ng-change="$ctrl.change()" class="regular-text" />'};n["default"]=a},{"./editor.controller":23}],31:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.controller"),o=r(i),a={bindings:{args:"<",onUpdate:"&"},controller:o["default"],template:'<textarea rows="3" cols="50" id="{{ $ctrl.key }}" class="large-text code" ng-model="$ctrl.value" ng-change="$ctrl.change()"></textarea>'};n["default"]=a},{"./editor.controller":23}],32:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./editor.text.component"),s=r(a),u=e("./editor.textarea.component"),l=r(u),c=e("./editor.number.component"),f=r(c),d=e("./editor.number.directive"),p=r(d),h=e("./editor.checkbox.component"),g=r(h),v=e("./editor.checkboxes.component"),m=r(v),$=e("./editor.select.component"),b=r($),y=e("./editor.sortableSelect.component"),w=r(y),x=o["default"].module("editors",["dndLists"]).component("editorText",s["default"]).component("editorTextarea",l["default"]).component("editorNumber",f["default"]).component("editorCheckbox",g["default"]).component("editorCheckboxes",m["default"]).component("editorSelect",b["default"]).component("editorSortableSelect",w["default"]).directive("numberAttributes",["$parse",function(e){return new p["default"](e)}]).name;n["default"]=x},{"./editor.checkbox.component":19,"./editor.checkboxes.component":21,"./editor.number.component":24,"./editor.number.directive":25,"./editor.select.component":26,"./editor.sortableSelect.component":28,"./editor.text.component":30,"./editor.textarea.component":31,angular:46}],33:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./navbar.component"),s=r(a),u=o["default"].module("navbar",[]).component("navbar",s["default"]).name;n["default"]=u},{"./navbar.component":34,angular:46}],34:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={bindings:{currentTab:"<",tabs:"<",page:"<",links:"<"},controller:function(){},template:'\n <h2 class="nav-tab-wrapper">\n <a ng-repeat="tab in $ctrl.tabs" \n href="?page={{ $ctrl.page }}&tab={{ tab.slug }}" class="nav-tab {{ $ctrl.currentTab == tab.slug ? \'nav-tab-active\' : \'\' }}">\n {{ tab.name }}\n </a>\n <a ng-repeat="link in $ctrl.links" href="{{ link.url }}" target="_blank" class="nav-tab">\n {{ link.label }}\n </a>\n </h2>\n '};n["default"]=r},{}],35:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./status.component"),s=r(a),u=o["default"].module("status",[]).component("status",s["default"]).name;n["default"]=u},{"./status.component":36,angular:46}],36:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./status.controller"),o=r(i),a={bindings:{i18n:"<"},controller:o["default"],template:"\n <div class=\"notice notice-success\" ng-if=\"$ctrl.status.status != ''\" ng-class=\"{ \n 'notice-success': $ctrl.status.status === 'OK',\n 'notice-info' : $ctrl.status.status === 'PENDING',\n 'notice-error': $ctrl.status.status === 'ERROR'\n }\">\n <p ng-repeat=\"(key, text) in $ctrl.status.messages\"><strong>{{ text }}</strong></p>\n </div>\n "};n["default"]=a},{"./status.controller":37}],37:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t,n){var i=this;r(this,e),this.$anchorScroll=t,this.status={status:""},n.onRequest(function(){return i.onRequestHandler()}),n.onResponse(function(e){var t=e.status;return i.onResponseHandler(t)})}return i(e,[{key:"onResponseHandler",value:function(e){this.status=e}},{key:"onRequestHandler",value:function(){this.$anchorScroll(),this.status.status="PENDING",this.status.messages={pending:this.i18n.pending}}}]),e}();o.$inject=["$anchorScroll","httpService"],n["default"]=o},{}],38:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=e("angular"),s=r(a),u=function(){function e(t,n,r){i(this,e),this.$http=t,this.$timeout=n,this.Upload=r,this.responseObservers=[],this.requestObservers=[]}return o(e,[{key:"init",value:function(e){this.url=e.url,this.saveSettingsParams={action:e.saveSettingsAction,nonce:e.saveSettingsNonce},this.customActionParams={action:e.customAction,nonce:e.customActionNonce}}},{key:"onRequest",value:function(e){this.requestObservers.push(e)}},{key:"onResponse",value:function(e){this.responseObservers.push(e)}},{key:"saveSettings",value:function(e){var t=s["default"].extend({},this.saveSettingsParams,{settings:e});return this.processRequest(t)}},{key:"customAction",value:function(e,t){var n=s["default"].extend({},this.customActionParams,{name:e,settings:t});return this.processRequest(n)}},{key:"uploadFile",value:function(e,t){var n=this,r=s["default"].extend({},this.customActionParams,{name:e,"import":t}),i=this.Upload.upload({url:this.url,data:r});this.requestObservers.forEach(function(e){e()}),i.then(function(e){var t=e.data;n.$timeout(function(){n.responseObservers.forEach(function(e){e(t)})})},function(e){e.status>0&&(n.errorMsg=e.status+": "+e.data)})}},{key:"processRequest",value:function(e){var t=this,n={method:"POST",url:this.url,params:e};return this.requestObservers.forEach(function(e){e()}),this.$http(n).then(function(e){var n=e.data;return t.responseObservers.forEach(function(e){e(n)}),n})}}]),e}();u.$inject=["$http","$timeout","Upload"],n["default"]=u},{angular:46}],39:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./http.service"),s=r(a),u=e("./link.service"),l=r(u),c=o["default"].module("services",[]).service("httpService",s["default"]).service("linkService",l["default"]).name;n["default"]=c},{"./http.service":38,"./link.service":40,angular:46}],40:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(){r(this,e),this.baseLink=""}return o(e,[{key:"init",value:function(e){this.baseLink="?page="+e}},{key:"generateQuery",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(function(e,t){var n=i(t,2),r=n[0],o=n[1];return e+"&"+r+"="+o},this.baseLink)}}]),e}();a.$inject=[],n["default"]=a},{}],41:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var i=e("./app/app");r(i);!function(e){e(document).ready(function(){})}(jQuery)},{"./app/app":3}],42:[function(e,t,n){angular.module("dndLists",[]).directive("dndDraggable",["$parse","$timeout","dndDropEffectWorkaround","dndDragTypeWorkaround",function(e,t,n,r){return function(i,o,a){o.attr("draggable","true"),a.dndDisableIf&&i.$watch(a.dndDisableIf,function(e){o.attr("draggable",!e)}),o.on("dragstart",function(s){return s=s.originalEvent||s,"false"==o.attr("draggable")||(s.dataTransfer.setData("Text",angular.toJson(i.$eval(a.dndDraggable))),s.dataTransfer.effectAllowed=a.dndEffectAllowed||"move",o.addClass("dndDragging"),t(function(){o.addClass("dndDraggingSource")},0),n.dropEffect="none",r.isDragging=!0,r.dragType=a.dndType?i.$eval(a.dndType):void 0,s._dndHandle&&s.dataTransfer.setDragImage&&s.dataTransfer.setDragImage(o[0],0,0),e(a.dndDragstart)(i,{event:s}),void s.stopPropagation())}),o.on("dragend",function(s){s=s.originalEvent||s;var u=n.dropEffect;i.$apply(function(){switch(u){case"move":e(a.dndMoved)(i,{event:s});break;case"copy":e(a.dndCopied)(i,{event:s});break;case"none":e(a.dndCanceled)(i,{event:s})}e(a.dndDragend)(i,{event:s,dropEffect:u})}),o.removeClass("dndDragging"),t(function(){o.removeClass("dndDraggingSource")},0),r.isDragging=!1,s.stopPropagation()}),o.on("click",function(t){a.dndSelected&&(t=t.originalEvent||t,i.$apply(function(){e(a.dndSelected)(i,{event:t})}),t.stopPropagation())}),o.on("selectstart",function(){this.dragDrop&&this.dragDrop()})}}]).directive("dndList",["$parse","$timeout","dndDropEffectWorkaround","dndDragTypeWorkaround",function(e,t,n,r){return function(i,o,a){function s(e,t,n){var r=m?e.offsetX||e.layerX:e.offsetY||e.layerY,i=m?t.offsetWidth:t.offsetHeight,o=m?t.offsetLeft:t.offsetTop;return o=n?o:0,r<o+i/2}function u(){var e;return angular.forEach(o.children(),function(t){var n=angular.element(t);n.hasClass("dndPlaceholder")&&(e=n)}),e||angular.element("<li class='dndPlaceholder'></li>")}function l(){return Array.prototype.indexOf.call(v.children,g)}function c(e){if(!r.isDragging&&!$)return!1;if(!p(e.dataTransfer.types))return!1;if(a.dndAllowedTypes&&r.isDragging){var t=i.$eval(a.dndAllowedTypes);if(angular.isArray(t)&&t.indexOf(r.dragType)===-1)return!1}return!a.dndDisableIf||!i.$eval(a.dndDisableIf)}function f(){return h.remove(),o.removeClass("dndDragover"),!0}function d(t,n,o,a){return e(t)(i,{event:n,index:o,item:a||void 0,external:!r.isDragging,type:r.isDragging?r.dragType:void 0})}function p(e){if(!e)return!0;for(var t=0;t<e.length;t++)if("Text"===e[t]||"text/plain"===e[t])return!0;return!1}var h=u(),g=h[0],v=o[0];h.remove();var m=a.dndHorizontalList&&i.$eval(a.dndHorizontalList),$=a.dndExternalSources&&i.$eval(a.dndExternalSources);o.on("dragenter",function(e){return e=e.originalEvent||e,!c(e)||void e.preventDefault()}),o.on("dragover",function(e){if(e=e.originalEvent||e,!c(e))return!0;if(g.parentNode!=v&&o.append(h),e.target!==v){for(var t=e.target;t.parentNode!==v&&t.parentNode;)t=t.parentNode;t.parentNode===v&&t!==g&&(s(e,t)?v.insertBefore(g,t):v.insertBefore(g,t.nextSibling))}else if(s(e,g,!0))for(;g.previousElementSibling&&(s(e,g.previousElementSibling,!0)||0===g.previousElementSibling.offsetHeight);)v.insertBefore(g,g.previousElementSibling);else for(;g.nextElementSibling&&!s(e,g.nextElementSibling,!0);)v.insertBefore(g,g.nextElementSibling.nextElementSibling);return a.dndDragover&&!d(a.dndDragover,e,l())?f():(o.addClass("dndDragover"),e.preventDefault(),e.stopPropagation(),!1)}),o.on("drop",function(e){if(e=e.originalEvent||e,!c(e))return!0;e.preventDefault();var t,r=e.dataTransfer.getData("Text")||e.dataTransfer.getData("text/plain");try{t=JSON.parse(r)}catch(o){return f()}var s=l();return a.dndDrop&&(t=d(a.dndDrop,e,s,t),!t)?f():(t!==!0&&i.$apply(function(){i.$eval(a.dndList).splice(s,0,t)}),d(a.dndInserted,e,s,t),"none"===e.dataTransfer.dropEffect?"copy"===e.dataTransfer.effectAllowed||"move"===e.dataTransfer.effectAllowed?n.dropEffect=e.dataTransfer.effectAllowed:n.dropEffect=e.ctrlKey?"copy":"move":n.dropEffect=e.dataTransfer.dropEffect,f(),e.stopPropagation(),!1)}),o.on("dragleave",function(e){e=e.originalEvent||e,o.removeClass("dndDragover"),t(function(){o.hasClass("dndDragover")||h.remove()},100)})}}]).directive("dndNodrag",function(){return function(e,t,n){t.attr("draggable","true"),t.on("dragstart",function(e){e=e.originalEvent||e,e._dndHandle||(e.dataTransfer.types&&e.dataTransfer.types.length||e.preventDefault(),e.stopPropagation())}),t.on("dragend",function(e){e=e.originalEvent||e,e._dndHandle||e.stopPropagation()})}}).directive("dndHandle",function(){return function(e,t,n){t.attr("draggable","true"),t.on("dragstart dragend",function(e){e=e.originalEvent||e,e._dndHandle=!0})}}).factory("dndDragTypeWorkaround",function(){return{}}).factory("dndDropEffectWorkaround",function(){return{}})},{}],43:[function(e,t,n){!function(e,t){"use strict";function n(){function n(e,t){var n,r={},i=e.split(",");for(n=0;n<i.length;n++)r[t?u(i[n]):i[n]]=!0;return r}function r(t,n){null===t||void 0===t?t="":"string"!=typeof t&&(t=""+t),$.innerHTML=t;var r=5;do{if(0===r)throw d("uinput","Failed to sanitize html because the input is unstable");r--,e.document.documentMode&&v($),t=$.innerHTML,$.innerHTML=t}while(t!==$.innerHTML);for(var i=$.firstChild;i;){switch(i.nodeType){case 1:n.start(i.nodeName.toLowerCase(),p(i.attributes));break;case 3:n.chars(i.textContent)}var o;if(!(o=i.firstChild)&&(1==i.nodeType&&n.end(i.nodeName.toLowerCase()),o=i.nextSibling,!o))for(;null==o&&(i=i.parentNode,i!==$);)o=i.nextSibling,1==i.nodeType&&n.end(i.nodeName.toLowerCase());i=o}for(;i=$.firstChild;)$.removeChild(i)}function p(e){for(var t={},n=0,r=e.length;n<r;n++){var i=e[n];t[i.name]=i.value}return t}function h(e){return e.replace(/&/g,"&amp;").replace(b,function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+(1024*(t-55296)+(n-56320)+65536)+";"}).replace(y,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function g(e,t){var n=!1,r=i(e,e.push);return{start:function(e,i){e=u(e),!n&&A[e]&&(n=e),n||O[e]!==!0||(r("<"),r(e),a(i,function(n,i){var o=u(i),a="img"===e&&"src"===o||"background"===o;T[o]!==!0||M[o]===!0&&!t(n,a)||(r(" "),r(i),r('="'),r(h(n)),r('"'))}),r(">"))},end:function(e){e=u(e),n||O[e]!==!0||w[e]===!0||(r("</"),r(e),r(">")),e==n&&(n=!1)},chars:function(e){n||r(h(e))}}}function v(t){if(t.nodeType===e.Node.ELEMENT_NODE)for(var n=t.attributes,r=0,i=n.length;r<i;r++){var o=n[r],a=o.name.toLowerCase();"xmlns:ns1"!==a&&0!==a.lastIndexOf("ns1:",0)||(t.removeAttributeNode(o),r--,i--)}var s=t.firstChild;s&&v(s),s=t.nextSibling,s&&v(s)}var m=!1;this.$get=["$$sanitizeUri",function(e){return m&&o(O,C),function(t){var n=[];return c(t,f(n,function(t,n){return!/^unsafe:/.test(e(t,n))})),n.join("")}}],this.enableSvg=function(e){return s(e)?(m=e,this):m},i=t.bind,o=t.extend,a=t.forEach,s=t.isDefined,u=t.lowercase,l=t.noop,c=r,f=g;var $,b=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,y=/([^\#-~ |!])/g,w=n("area,br,col,hr,img,wbr"),x=n("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),_=n("rp,rt"),k=o({},_,x),S=o({},x,n("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),E=o({},_,n("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),C=n("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),A=n("script,style"),O=o({},w,S,E,k),M=n("background,cite,href,longdesc,src,xlink:href"),j=n("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),P=n("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),T=o({},M,P,j);!function(e){var t;if(!e.document||!e.document.implementation)throw d("noinert","Can't create an inert html document");t=e.document.implementation.createHTMLDocument("inert");var n=t.documentElement||t.getDocumentElement(),r=n.getElementsByTagName("body");if(1===r.length)$=r[0];else{var i=t.createElement("html");$=t.createElement("body"),i.appendChild($),t.appendChild(i)}}(e)}function r(e){var t=[],n=f(t,l);return n.chars(e),t.join("")}var i,o,a,s,u,l,c,f,d=t.$$minErr("$sanitize");t.module("ngSanitize",[]).provider("$sanitize",n),t.module("ngSanitize").filter("linky",["$sanitize",function(e){var n=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,i=/^mailto:/i,o=t.$$minErr("linky"),a=t.isDefined,s=t.isFunction,u=t.isObject,l=t.isString;return function(t,c,f){function d(e){e&&b.push(r(e))}function p(e,t){var n,r=m(e);b.push("<a ");for(n in r)b.push(n+'="'+r[n]+'" ');!a(c)||"target"in r||b.push('target="',c,'" '),b.push('href="',e.replace(/"/g,"&quot;"),'">'),d(t),b.push("</a>")}if(null==t||""===t)return t;if(!l(t))throw o("notstring","Expected string but received: {0}",t);for(var h,g,v,m=s(f)?f:u(f)?function(){return f}:function(){return{}},$=t,b=[];h=$.match(n);)g=h[0],h[2]||h[4]||(g=(h[3]?"http://":"mailto:")+g),v=h.index,d($.substr(0,v)),p(g,h[0].replace(i,"")),$=$.substring(v+h[0].length);return d($),e(b.join(""))}}])}(window,window.angular)},{}],44:[function(e,t,n){e("./angular-sanitize"),t.exports="ngSanitize"},{"./angular-sanitize":43}],45:[function(e,t,n){!function(e){"use strict";function t(e,t){return t=t||Error,function(){var n,r,i=2,o=arguments,a=o[0],s="["+(e?e+":":"")+a+"] ",u=o[1];for(s+=u.replace(/\{\d+\}/g,function(e){var t=+e.slice(1,-1),n=t+i;return n<o.length?$e(o[n]):e}),s+="\nhttp://errors.angularjs.org/1.5.8/"+(e?e+"/":"")+a,r=i,n="?";r<o.length;r++,n="&")s+=n+"p"+(r-i)+"="+encodeURIComponent($e(o[r]));return new t(s)}}function n(e){if(null==e||E(e))return!1;if(Kr(e)||w(e)||Rr&&e instanceof Rr)return!0;var t="length"in Object(e)&&e.length;return x(t)&&(t>=0&&(t-1 in e||e instanceof Array)||"function"==typeof e.item)}function r(e,t,i){var o,a;if(e)if(k(e))for(o in e)"prototype"==o||"length"==o||"name"==o||e.hasOwnProperty&&!e.hasOwnProperty(o)||t.call(i,e[o],o,e);else if(Kr(e)||n(e)){var s="object"!=typeof e;for(o=0,a=e.length;o<a;o++)(s||o in e)&&t.call(i,e[o],o,e)}else if(e.forEach&&e.forEach!==r)e.forEach(t,i,e);else if(y(e))for(o in e)t.call(i,e[o],o,e);else if("function"==typeof e.hasOwnProperty)for(o in e)e.hasOwnProperty(o)&&t.call(i,e[o],o,e);else for(o in e)Pr.call(e,o)&&t.call(i,e[o],o,e);return e}function i(e,t,n){for(var r=Object.keys(e).sort(),i=0;i<r.length;i++)t.call(n,e[r[i]],r[i]);return r}function o(e){return function(t,n){e(n,t)}}function a(){return++Xr}function s(e,t){t?e.$$hashKey=t:delete e.$$hashKey}function u(e,t,n){for(var r=e.$$hashKey,i=0,o=t.length;i<o;++i){var a=t[i];if(b(a)||k(a))for(var l=Object.keys(a),c=0,f=l.length;c<f;c++){var d=l[c],p=a[d];n&&b(p)?_(p)?e[d]=new Date(p.valueOf()):S(p)?e[d]=new RegExp(p):p.nodeName?e[d]=p.cloneNode(!0):F(p)?e[d]=p.clone():(b(e[d])||(e[d]=Kr(p)?[]:{}),u(e[d],[p],!0)):e[d]=p}}return s(e,r),e}function l(e){return u(e,zr.call(arguments,1),!1)}function c(e){return u(e,zr.call(arguments,1),!0)}function f(e){return parseInt(e,10)}function d(e,t){return l(Object.create(e),t)}function p(){}function h(e){return e}function g(e){return function(){return e}}function v(e){return k(e.toString)&&e.toString!==Hr}function m(e){return"undefined"==typeof e}function $(e){return"undefined"!=typeof e}function b(e){return null!==e&&"object"==typeof e}function y(e){return null!==e&&"object"==typeof e&&!Br(e)}function w(e){return"string"==typeof e}function x(e){return"number"==typeof e}function _(e){return"[object Date]"===Hr.call(e)}function k(e){return"function"==typeof e}function S(e){return"[object RegExp]"===Hr.call(e)}function E(e){return e&&e.window===e}function C(e){return e&&e.$evalAsync&&e.$watch}function A(e){return"[object File]"===Hr.call(e)}function O(e){return"[object FormData]"===Hr.call(e)}function M(e){return"[object Blob]"===Hr.call(e)}function j(e){return"boolean"==typeof e}function P(e){return e&&k(e.then)}function T(e){return e&&x(e.length)&&Yr.test(Hr.call(e))}function D(e){return"[object ArrayBuffer]"===Hr.call(e)}function F(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function N(e){var t,n={},r=e.split(",");for(t=0;t<r.length;t++)n[r[t]]=!0;return n}function I(e){return Tr(e.nodeName||e[0]&&e[0].nodeName)}function R(e,t){var n=e.indexOf(t);return n>=0&&e.splice(n,1),n}function U(e,t){function n(e,t){var n,r=t.$$hashKey;if(Kr(e))for(var o=0,a=e.length;o<a;o++)t.push(i(e[o]));else if(y(e))for(n in e)t[n]=i(e[n]);else if(e&&"function"==typeof e.hasOwnProperty)for(n in e)e.hasOwnProperty(n)&&(t[n]=i(e[n]));else for(n in e)Pr.call(e,n)&&(t[n]=i(e[n]));return s(t,r),t}function i(e){if(!b(e))return e;var t=a.indexOf(e);if(t!==-1)return u[t];if(E(e)||C(e))throw Wr("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");var r=!1,i=o(e);return void 0===i&&(i=Kr(e)?[]:Object.create(Br(e)),r=!0),a.push(e),u.push(i),r?n(e,i):i}function o(e){switch(Hr.call(e)){case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return new e.constructor(i(e.buffer),e.byteOffset,e.length);case"[object ArrayBuffer]":if(!e.slice){var t=new ArrayBuffer(e.byteLength);return new Uint8Array(t).set(new Uint8Array(e)),t}return e.slice(0);case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new e.constructor(e.valueOf());case"[object RegExp]":var n=new RegExp(e.source,e.toString().match(/[^\/]*$/)[0]);return n.lastIndex=e.lastIndex,n;case"[object Blob]":return new e.constructor([e],{type:e.type})}if(k(e.cloneNode))return e.cloneNode(!0)}var a=[],u=[];if(t){if(T(t)||D(t))throw Wr("cpta","Can't copy! TypedArray destination cannot be mutated.");if(e===t)throw Wr("cpi","Can't copy! Source and destination are identical.");return Kr(t)?t.length=0:r(t,function(e,n){"$$hashKey"!==n&&delete t[n]}),a.push(e),u.push(t),n(e,t)}return i(e)}function V(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!==e&&t!==t)return!0;var n,r,i,o=typeof e,a=typeof t;if(o==a&&"object"==o){if(!Kr(e)){
3
+ if(_(e))return!!_(t)&&V(e.getTime(),t.getTime());if(S(e))return!!S(t)&&e.toString()==t.toString();if(C(e)||C(t)||E(e)||E(t)||Kr(t)||_(t)||S(t))return!1;i=he();for(r in e)if("$"!==r.charAt(0)&&!k(e[r])){if(!V(e[r],t[r]))return!1;i[r]=!0}for(r in t)if(!(r in i)&&"$"!==r.charAt(0)&&$(t[r])&&!k(t[r]))return!1;return!0}if(!Kr(t))return!1;if((n=e.length)==t.length){for(r=0;r<n;r++)if(!V(e[r],t[r]))return!1;return!0}}return!1}function z(e,t,n){return e.concat(zr.call(t,n))}function L(e,t){return zr.call(e,t||0)}function q(e,t){var n=arguments.length>2?L(arguments,2):[];return!k(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,z(n,arguments,0)):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function H(t,n){var r=n;return"string"==typeof t&&"$"===t.charAt(0)&&"$"===t.charAt(1)?r=void 0:E(n)?r="$WINDOW":n&&e.document===n?r="$DOCUMENT":C(n)&&(r="$SCOPE"),r}function B(e,t){if(!m(e))return x(t)||(t=t?2:null),JSON.stringify(e,H,t)}function W(e){return w(e)?JSON.parse(e):e}function G(e,t){e=e.replace(ti,"");var n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(n)?t:n}function X(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function K(e,t,n){n=n?-1:1;var r=e.getTimezoneOffset(),i=G(t,r);return X(e,n*(i-r))}function Y(e){e=Rr(e).clone();try{e.empty()}catch(t){}var n=Rr("<div>").append(e).html();try{return e[0].nodeType===si?Tr(n):n.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+Tr(t)})}catch(t){return Tr(n)}}function Z(e){try{return decodeURIComponent(e)}catch(t){}}function J(e){var t={};return r((e||"").split("&"),function(e){var n,r,i;e&&(r=e=e.replace(/\+/g,"%20"),n=e.indexOf("="),n!==-1&&(r=e.substring(0,n),i=e.substring(n+1)),r=Z(r),$(r)&&(i=!$(i)||Z(i),Pr.call(t,r)?Kr(t[r])?t[r].push(i):t[r]=[t[r],i]:t[r]=i))}),t}function Q(e){var t=[];return r(e,function(e,n){Kr(e)?r(e,function(e){t.push(te(n,!0)+(e===!0?"":"="+te(e,!0)))}):t.push(te(n,!0)+(e===!0?"":"="+te(e,!0)))}),t.length?t.join("&"):""}function ee(e){return te(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function te(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}function ne(e,t){var n,r,i=ni.length;for(r=0;r<i;++r)if(n=ni[r]+t,w(n=e.getAttribute(n)))return n;return null}function re(e,t){var n,i,o={};r(ni,function(t){var r=t+"app";!n&&e.hasAttribute&&e.hasAttribute(r)&&(n=e,i=e.getAttribute(r))}),r(ni,function(t){var r,o=t+"app";!n&&(r=e.querySelector("["+o.replace(":","\\:")+"]"))&&(n=r,i=r.getAttribute(o))}),n&&(o.strictDi=null!==ne(n,"strict-di"),t(n,i?[i]:[],o))}function ie(t,n,i){b(i)||(i={});var o={strictDi:!1};i=l(o,i);var a=function(){if(t=Rr(t),t.injector()){var r=t[0]===e.document?"document":Y(t);throw Wr("btstrpd","App already bootstrapped with this element '{0}'",r.replace(/</,"&lt;").replace(/>/,"&gt;"))}n=n||[],n.unshift(["$provide",function(e){e.value("$rootElement",t)}]),i.debugInfoEnabled&&n.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),n.unshift("ng");var o=rt(n,i.strictDi);return o.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,r){e.$apply(function(){t.data("$injector",r),n(t)(e)})}]),o},s=/^NG_ENABLE_DEBUG_INFO!/,u=/^NG_DEFER_BOOTSTRAP!/;return e&&s.test(e.name)&&(i.debugInfoEnabled=!0,e.name=e.name.replace(s,"")),e&&!u.test(e.name)?a():(e.name=e.name.replace(u,""),Gr.resumeBootstrap=function(e){return r(e,function(e){n.push(e)}),a()},void(k(Gr.resumeDeferredBootstrap)&&Gr.resumeDeferredBootstrap()))}function oe(){e.name="NG_ENABLE_DEBUG_INFO!"+e.name,e.location.reload()}function ae(e){var t=Gr.element(e).injector();if(!t)throw Wr("test","no injector found for element argument to getTestability");return t.get("$$testability")}function se(e,t){return t=t||"_",e.replace(ri,function(e,n){return(n?t:"")+e.toLowerCase()})}function ue(){var t;if(!ii){var n=ei();Ur=m(n)?e.jQuery:n?e[n]:void 0,Ur&&Ur.fn.on?(Rr=Ur,l(Ur.fn,{scope:Ei.scope,isolateScope:Ei.isolateScope,controller:Ei.controller,injector:Ei.injector,inheritedData:Ei.inheritedData}),t=Ur.cleanData,Ur.cleanData=function(e){for(var n,r,i=0;null!=(r=e[i]);i++)n=Ur._data(r,"events"),n&&n.$destroy&&Ur(r).triggerHandler("$destroy");t(e)}):Rr=Oe,Gr.element=Rr,ii=!0}}function le(e,t,n){if(!e)throw Wr("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function ce(e,t,n){return n&&Kr(e)&&(e=e[e.length-1]),le(k(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function fe(e,t){if("hasOwnProperty"===e)throw Wr("badname","hasOwnProperty is not a valid {0} name",t)}function de(e,t,n){if(!t)return e;for(var r,i=t.split("."),o=e,a=i.length,s=0;s<a;s++)r=i[s],e&&(e=(o=e)[r]);return!n&&k(e)?q(o,e):e}function pe(e){for(var t,n=e[0],r=e[e.length-1],i=1;n!==r&&(n=n.nextSibling);i++)(t||e[i]!==n)&&(t||(t=Rr(zr.call(e,0,i))),t.push(n));return t||e}function he(){return Object.create(null)}function ge(e){function n(e,t,n){return e[t]||(e[t]=n())}var r=t("$injector"),i=t("ng"),o=n(e,"angular",Object);return o.$$minErr=o.$$minErr||t,n(o,"module",function(){var e={};return function(t,o,a){var s=function(e,t){if("hasOwnProperty"===e)throw i("badname","hasOwnProperty is not a valid {0} name",t)};return s(t,"module"),o&&e.hasOwnProperty(t)&&(e[t]=null),n(e,t,function(){function e(e,t,n,r){return r||(r=i),function(){return r[n||"push"]([e,t,arguments]),c}}function n(e,n){return function(r,o){return o&&k(o)&&(o.$$moduleName=t),i.push([e,n,arguments]),c}}if(!o)throw r("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",t);var i=[],s=[],u=[],l=e("$injector","invoke","push",s),c={_invokeQueue:i,_configBlocks:s,_runBlocks:u,requires:o,name:t,provider:n("$provide","provider"),factory:n("$provide","factory"),service:n("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),decorator:n("$provide","decorator"),animation:n("$animateProvider","register"),filter:n("$filterProvider","register"),controller:n("$controllerProvider","register"),directive:n("$compileProvider","directive"),component:n("$compileProvider","component"),config:l,run:function(e){return u.push(e),this}};return a&&l(a),c})}})}function ve(e,t){if(Kr(e)){t=t||[];for(var n=0,r=e.length;n<r;n++)t[n]=e[n]}else if(b(e)){t=t||{};for(var i in e)"$"===i.charAt(0)&&"$"===i.charAt(1)||(t[i]=e[i])}return t||e}function me(e){var t=[];return JSON.stringify(e,function(e,n){if(n=H(e,n),b(n)){if(t.indexOf(n)>=0)return"...";t.push(n)}return n})}function $e(e){return"function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):m(e)?"undefined":"string"!=typeof e?me(e):e}function be(n){l(n,{bootstrap:ie,copy:U,extend:l,merge:c,equals:V,element:Rr,forEach:r,injector:rt,noop:p,bind:q,toJson:B,fromJson:W,identity:h,isUndefined:m,isDefined:$,isString:w,isFunction:k,isObject:b,isNumber:x,isElement:F,isArray:Kr,version:fi,isDate:_,lowercase:Tr,uppercase:Dr,callbacks:{$$counter:0},getTestability:ae,$$minErr:t,$$csp:Qr,reloadWithDebugInfo:oe}),(Vr=ge(e))("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:Sn}),e.provider("$compile",ht).directive({a:Fo,input:ea,textarea:ea,form:Vo,script:Ka,select:Ja,style:es,option:Qa,ngBind:ra,ngBindHtml:oa,ngBindTemplate:ia,ngClass:sa,ngClassEven:la,ngClassOdd:ua,ngCloak:ca,ngController:fa,ngForm:zo,ngHide:La,ngIf:ha,ngInclude:ga,ngInit:ma,ngNonBindable:Ta,ngPluralize:Ia,ngRepeat:Ra,ngShow:za,ngStyle:qa,ngSwitch:Ha,ngSwitchWhen:Ba,ngSwitchDefault:Wa,ngOptions:Na,ngTransclude:Xa,ngModel:Ma,ngList:$a,ngChange:aa,pattern:ns,ngPattern:ns,required:ts,ngRequired:ts,minlength:is,ngMinlength:is,maxlength:rs,ngMaxlength:rs,ngValue:na,ngModelOptions:Pa}).directive({ngInclude:va}).directive(No).directive(da),e.provider({$anchorScroll:it,$animate:Li,$animateCss:Bi,$$animateJs:Vi,$$animateQueue:zi,$$AnimateRunner:Hi,$$animateAsyncRun:qi,$browser:ct,$cacheFactory:ft,$controller:yt,$document:wt,$exceptionHandler:xt,$filter:Un,$$forceReflow:Zi,$interpolate:Nt,$interval:It,$http:Pt,$httpParamSerializer:kt,$httpParamSerializerJQLike:St,$httpBackend:Dt,$xhrFactory:Tt,$jsonpCallbacks:ao,$location:Jt,$log:Qt,$parse:bn,$rootScope:kn,$q:yn,$$q:wn,$sce:On,$sceDelegate:An,$sniffer:Mn,$templateCache:dt,$templateRequest:jn,$$testability:Pn,$timeout:Tn,$window:Nn,$$rAF:_n,$$jqLite:Ye,$$HashMap:Mi,$$cookieReader:Rn})}])}function ye(){return++pi}function we(e){return e.replace(vi,function(e,t,n,r){return r?n.toUpperCase():n}).replace(mi,"Moz$1")}function xe(e){return!wi.test(e)}function _e(e){var t=e.nodeType;return t===oi||!t||t===li}function ke(e){for(var t in di[e.ng339])return!0;return!1}function Se(e){for(var t=0,n=e.length;t<n;t++)Te(e[t])}function Ee(e,t){var n,i,o,a,s=t.createDocumentFragment(),u=[];if(xe(e))u.push(t.createTextNode(e));else{for(n=s.appendChild(t.createElement("div")),i=(xi.exec(e)||["",""])[1].toLowerCase(),o=ki[i]||ki._default,n.innerHTML=o[1]+e.replace(_i,"<$1></$2>")+o[2],a=o[0];a--;)n=n.lastChild;u=z(u,n.childNodes),n=s.firstChild,n.textContent=""}return s.textContent="",s.innerHTML="",r(u,function(e){s.appendChild(e)}),s}function Ce(t,n){n=n||e.document;var r;return(r=yi.exec(t))?[n.createElement(r[1])]:(r=Ee(t,n))?r.childNodes:[]}function Ae(e,t){var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)}function Oe(e){if(e instanceof Oe)return e;var t;if(w(e)&&(e=Zr(e),t=!0),!(this instanceof Oe)){if(t&&"<"!=e.charAt(0))throw bi("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new Oe(e)}t?Ue(this,Ce(e)):Ue(this,e)}function Me(e){return e.cloneNode(!0)}function je(e,t){if(t||Te(e),e.querySelectorAll)for(var n=e.querySelectorAll("*"),r=0,i=n.length;r<i;r++)Te(n[r])}function Pe(e,t,n,i){if($(i))throw bi("offargs","jqLite#off() does not support the `selector` argument");var o=De(e),a=o&&o.events,s=o&&o.handle;if(s)if(t){var u=function(t){var r=a[t];$(n)&&R(r||[],n),$(n)&&r&&r.length>0||(gi(e,t,s),delete a[t])};r(t.split(" "),function(e){u(e),$i[e]&&u($i[e])})}else for(t in a)"$destroy"!==t&&gi(e,t,s),delete a[t]}function Te(e,t){var n=e.ng339,r=n&&di[n];if(r){if(t)return void delete r.data[t];r.handle&&(r.events.$destroy&&r.handle({},"$destroy"),Pe(e)),delete di[n],e.ng339=void 0}}function De(e,t){var n=e.ng339,r=n&&di[n];return t&&!r&&(e.ng339=n=ye(),r=di[n]={events:{},data:{},handle:void 0}),r}function Fe(e,t,n){if(_e(e)){var r=$(n),i=!r&&t&&!b(t),o=!t,a=De(e,!i),s=a&&a.data;if(r)s[t]=n;else{if(o)return s;if(i)return s&&s[t];l(s,t)}}}function Ne(e,t){return!!e.getAttribute&&(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1}function Ie(e,t){t&&e.setAttribute&&r(t.split(" "),function(t){e.setAttribute("class",Zr((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Zr(t)+" "," ")))})}function Re(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");r(t.split(" "),function(e){e=Zr(e),n.indexOf(" "+e+" ")===-1&&(n+=e+" ")}),e.setAttribute("class",Zr(n))}}function Ue(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var n=t.length;if("number"==typeof n&&t.window!==t){if(n)for(var r=0;r<n;r++)e[e.length++]=t[r]}else e[e.length++]=t}}function Ve(e,t){return ze(e,"$"+(t||"ngController")+"Controller")}function ze(e,t,n){e.nodeType==li&&(e=e.documentElement);for(var r=Kr(t)?t:[t];e;){for(var i=0,o=r.length;i<o;i++)if($(n=Rr.data(e,r[i])))return n;e=e.parentNode||e.nodeType===ci&&e.host}}function Le(e){for(je(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function qe(e,t){t||je(e);var n=e.parentNode;n&&n.removeChild(e)}function He(t,n){n=n||e,"complete"===n.document.readyState?n.setTimeout(t):Rr(n).on("load",t)}function Be(e,t){var n=Ci[t.toLowerCase()];return n&&Ai[I(e)]&&n}function We(e){return Oi[e]}function Ge(e,t){var n=function(n,r){n.isDefaultPrevented=function(){return n.defaultPrevented};var i=t[r||n.type],o=i?i.length:0;if(o){if(m(n.immediatePropagationStopped)){var a=n.stopImmediatePropagation;n.stopImmediatePropagation=function(){n.immediatePropagationStopped=!0,n.stopPropagation&&n.stopPropagation(),a&&a.call(n)}}n.isImmediatePropagationStopped=function(){return n.immediatePropagationStopped===!0};var s=i.specialHandlerWrapper||Xe;o>1&&(i=ve(i));for(var u=0;u<o;u++)n.isImmediatePropagationStopped()||s(e,n,i[u])}};return n.elem=e,n}function Xe(e,t,n){n.call(e,t)}function Ke(e,t,n){var r=t.relatedTarget;r&&(r===e||Si.call(e,r))||n.call(e,t)}function Ye(){this.$get=function(){return l(Oe,{hasClass:function(e,t){return e.attr&&(e=e[0]),Ne(e,t)},addClass:function(e,t){return e.attr&&(e=e[0]),Re(e,t)},removeClass:function(e,t){return e.attr&&(e=e[0]),Ie(e,t)}})}}function Ze(e,t){var n=e&&e.$$hashKey;if(n)return"function"==typeof n&&(n=e.$$hashKey()),n;var r=typeof e;return n="function"==r||"object"==r&&null!==e?e.$$hashKey=r+":"+(t||a)():r+":"+e}function Je(e,t){if(t){var n=0;this.nextUid=function(){return++n}}r(e,this.put,this)}function Qe(e){return Function.prototype.toString.call(e)+" "}function et(e){var t=Qe(e).replace(Fi,""),n=t.match(ji)||t.match(Pi);return n}function tt(e){var t=et(e);return t?"function("+(t[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function nt(e,t,n){var i,o,a;if("function"==typeof e){if(!(i=e.$inject)){if(i=[],e.length){if(t)throw w(n)&&n||(n=e.name||tt(e)),Ni("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);o=et(e),r(o[1].split(Ti),function(e){e.replace(Di,function(e,t,n){i.push(n)})})}e.$inject=i}}else Kr(e)?(a=e.length-1,ce(e[a],"fn"),i=e.slice(0,a)):ce(e,"fn",!0);return i}function rt(e,t){function n(e){return function(t,n){return b(t)?void r(t,o(e)):e(t,n)}}function i(e,t){if(fe(e,"service"),(k(t)||Kr(t))&&(t=_.instantiate(t)),!t.$get)throw Ni("pget","Provider '{0}' must define $get factory method.",e);return x[e+v]=t}function a(e,t){return function(){var n=C.invoke(t,this);if(m(n))throw Ni("undef","Provider '{0}' must return a value from $get factory method.",e);return n}}function s(e,t,n){return i(e,{$get:n!==!1?a(e,t):t})}function u(e,t){return s(e,["$injector",function(e){return e.instantiate(t)}])}function l(e,t){return s(e,g(t),!1)}function c(e,t){fe(e,"constant"),x[e]=t,S[e]=t}function f(e,t){var n=_.get(e+v),r=n.$get;n.$get=function(){var e=C.invoke(r,n);return C.invoke(t,null,{$delegate:e})}}function d(e){le(m(e)||Kr(e),"modulesToLoad","not an array");var t,n=[];return r(e,function(e){function r(e){var t,n;for(t=0,n=e.length;t<n;t++){var r=e[t],i=_.get(r[0]);i[r[1]].apply(i,r[2])}}if(!y.get(e)){y.put(e,!0);try{w(e)?(t=Vr(e),n=n.concat(d(t.requires)).concat(t._runBlocks),r(t._invokeQueue),r(t._configBlocks)):k(e)?n.push(_.invoke(e)):Kr(e)?n.push(_.invoke(e)):ce(e,"module")}catch(i){throw Kr(e)&&(e=e[e.length-1]),i.message&&i.stack&&i.stack.indexOf(i.message)==-1&&(i=i.message+"\n"+i.stack),Ni("modulerr","Failed to instantiate module {0} due to:\n{1}",e,i.stack||i.message||i)}}}),n}function p(e,n){function r(t,r){if(e.hasOwnProperty(t)){if(e[t]===h)throw Ni("cdep","Circular dependency found: {0}",t+" <- "+$.join(" <- "));return e[t]}try{return $.unshift(t),e[t]=h,e[t]=n(t,r)}catch(i){throw e[t]===h&&delete e[t],i}finally{$.shift()}}function i(e,n,i){for(var o=[],a=rt.$$annotate(e,t,i),s=0,u=a.length;s<u;s++){var l=a[s];if("string"!=typeof l)throw Ni("itkn","Incorrect injection token! Expected service name as string, got {0}",l);o.push(n&&n.hasOwnProperty(l)?n[l]:r(l,i))}return o}function o(e){return!(Ir<=11)&&("function"==typeof e&&/^(?:class\b|constructor\()/.test(Qe(e)))}function a(e,t,n,r){"string"==typeof n&&(r=n,n=null);var a=i(e,n,r);return Kr(e)&&(e=e[e.length-1]),o(e)?(a.unshift(null),new(Function.prototype.bind.apply(e,a))):e.apply(t,a)}function s(e,t,n){var r=Kr(e)?e[e.length-1]:e,o=i(e,t,n);return o.unshift(null),new(Function.prototype.bind.apply(r,o))}return{invoke:a,instantiate:s,get:r,annotate:rt.$$annotate,has:function(t){return x.hasOwnProperty(t+v)||e.hasOwnProperty(t)}}}t=t===!0;var h={},v="Provider",$=[],y=new Je([],(!0)),x={$provide:{provider:n(i),factory:n(s),service:n(u),value:n(l),constant:n(c),decorator:f}},_=x.$injector=p(x,function(e,t){throw Gr.isString(t)&&$.push(t),Ni("unpr","Unknown provider: {0}",$.join(" <- "))}),S={},E=p(S,function(e,t){var n=_.get(e+v,t);return C.invoke(n.$get,n,void 0,e)}),C=E;x["$injector"+v]={$get:g(E)};var A=d(e);return C=E.get("$injector"),C.strictDi=t,r(A,function(e){e&&C.invoke(e)}),C}function it(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,r){function i(e){var t=null;return Array.prototype.some.call(e,function(e){if("a"===I(e))return t=e,!0}),t}function o(){var e=s.yOffset;if(k(e))e=e();else if(F(e)){var n=e[0],r=t.getComputedStyle(n);e="fixed"!==r.position?0:n.getBoundingClientRect().bottom}else x(e)||(e=0);return e}function a(e){if(e){e.scrollIntoView();var n=o();if(n){var r=e.getBoundingClientRect().top;t.scrollBy(0,r-n)}}else t.scrollTo(0,0)}function s(e){e=w(e)?e:n.hash();var t;e?(t=u.getElementById(e))?a(t):(t=i(u.getElementsByName(e)))?a(t):"top"===e&&a(null):a(null)}var u=t.document;return e&&r.$watch(function(){return n.hash()},function(e,t){e===t&&""===e||He(function(){r.$evalAsync(s)})}),s}]}function ot(e,t){return e||t?e?t?(Kr(e)&&(e=e.join(" ")),Kr(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function at(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.nodeType===Ri)return n}}function st(e){w(e)&&(e=e.split(" "));var t=he();return r(e,function(e){e.length&&(t[e]=!0)}),t}function ut(e){return b(e)?e:{}}function lt(e,t,n,i){function o(e){try{e.apply(null,L(arguments,1))}finally{if($--,0===$)for(;b.length;)try{b.pop()()}catch(t){n.error(t)}}}function a(e){var t=e.indexOf("#");return t===-1?"":e.substr(t)}function s(){k=null,u(),l()}function u(){y=S(),y=m(y)?null:y,V(y,A)&&(y=A),A=y}function l(){x===c.url()&&w===y||(x=c.url(),w=y,r(E,function(e){e(c.url(),y)}))}var c=this,f=e.location,d=e.history,h=e.setTimeout,g=e.clearTimeout,v={};c.isMock=!1;var $=0,b=[];c.$$completeOutstandingRequest=o,c.$$incOutstandingRequestCount=function(){$++},c.notifyWhenNoOutstandingRequests=function(e){0===$?e():b.push(e)};var y,w,x=f.href,_=t.find("base"),k=null,S=i.history?function(){try{return d.state}catch(e){}}:p;u(),w=y,c.url=function(t,n,r){if(m(r)&&(r=null),f!==e.location&&(f=e.location),d!==e.history&&(d=e.history),t){var o=w===r;if(x===t&&(!i.history||o))return c;var s=x&&qt(x)===qt(t);return x=t,w=r,!i.history||s&&o?(s||(k=t),n?f.replace(t):s?f.hash=a(t):f.href=t,f.href!==t&&(k=t)):(d[n?"replaceState":"pushState"](r,"",t),u(),w=y),k&&(k=t),c}return k||f.href.replace(/%27/g,"'")},c.state=function(){return y};var E=[],C=!1,A=null;c.onUrlChange=function(t){return C||(i.history&&Rr(e).on("popstate",s),Rr(e).on("hashchange",s),C=!0),E.push(t),t},c.$$applicationDestroyed=function(){Rr(e).off("hashchange popstate",s)},c.$$checkUrlChange=l,c.baseHref=function(){var e=_.attr("href");return e?e.replace(/^(https?\:)?\/\/[^\/]*/,""):""},c.defer=function(e,t){var n;return $++,n=h(function(){delete v[n],o(e)},t||0),v[n]=!0,n},c.defer.cancel=function(e){return!!v[e]&&(delete v[e],g(e),o(p),!0)}}function ct(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new lt(e,r,t,n)}]}function ft(){this.$get=function(){function e(e,r){function i(e){e!=d&&(p?p==e&&(p=e.n):p=e,o(e.n,e.p),o(e,d),d=e,d.n=null)}function o(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in n)throw t("$cacheFactory")("iid","CacheId '{0}' is already taken!",e);var a=0,s=l({},r,{id:e}),u=he(),c=r&&r.capacity||Number.MAX_VALUE,f=he(),d=null,p=null;return n[e]={put:function(e,t){if(!m(t)){if(c<Number.MAX_VALUE){var n=f[e]||(f[e]={key:e});i(n)}return e in u||a++,u[e]=t,a>c&&this.remove(p.key),t}},get:function(e){if(c<Number.MAX_VALUE){var t=f[e];if(!t)return;i(t)}return u[e]},remove:function(e){if(c<Number.MAX_VALUE){var t=f[e];if(!t)return;t==d&&(d=t.p),t==p&&(p=t.n),o(t.n,t.p),delete f[e]}e in u&&(delete u[e],a--)},removeAll:function(){u=he(),a=0,f=he(),d=p=null},destroy:function(){u=null,s=null,f=null,delete n[e]},info:function(){return l({},s,{size:a})}}}var n={};return e.info=function(){var e={};return r(n,function(t,n){e[n]=t.info()}),e},e.get=function(e){return n[e]},e}}function dt(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function pt(){}function ht(t,n){function i(e,t,n){var i=/^\s*([@&<]|=(\*?))(\??)\s*(\w*)\s*$/,o=he();return r(e,function(e,r){if(e in E)return void(o[r]=E[e]);var a=e.match(i);if(!a)throw Wi("iscp","Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}",t,r,e,n?"controller bindings definition":"isolate scope definition");o[r]={mode:a[1][0],collection:"*"===a[2],optional:"?"===a[3],attrName:a[4]||r},a[4]&&(E[e]=o[r])}),o}function a(e,t){var n={isolateScope:null,bindToController:null};if(b(e.scope)&&(e.bindToController===!0?(n.bindToController=i(e.scope,t,!0),n.isolateScope={}):n.isolateScope=i(e.scope,t,!1)),b(e.bindToController)&&(n.bindToController=i(e.bindToController,t,!0)),b(n.bindToController)){var r=e.controller,o=e.controllerAs;if(!r)throw Wi("noctrl","Cannot bind to controller without directive '{0}'s controller.",t);if(!bt(r,o))throw Wi("noident","Cannot bind to controller without identifier for directive '{0}'.",t)}return n}function s(e){var t=e.charAt(0);if(!t||t!==Tr(t))throw Wi("baddir","Directive/Component name '{0}' is invalid. The first character must be a lowercase letter",e);if(e!==e.trim())throw Wi("baddir","Directive/Component name '{0}' is invalid. The name should not contain leading or trailing whitespaces",e)}function u(e){var t=e.require||e.controller&&e.name;return!Kr(t)&&b(t)&&r(t,function(e,n){var r=e.match(_),i=e.substring(r[0].length);i||(t[n]=r[0]+n)}),t}var c={},f="Directive",v=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,y=/(([\w\-]+)(?:\:([^;]+))?;?)/,x=N("ngSrc,ngSrcset,src,srcset"),_=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,S=/^(on[a-z]+|formaction)$/,E=he();this.directive=function M(e,n){return fe(e,"directive"),w(e)?(s(e),le(n,"directiveFactory"),c.hasOwnProperty(e)||(c[e]=[],t.factory(e+f,["$injector","$exceptionHandler",function(t,n){var i=[];return r(c[e],function(r,o){try{var a=t.invoke(r);k(a)?a={compile:g(a)}:!a.compile&&a.link&&(a.compile=g(a.link)),a.priority=a.priority||0,a.index=o,a.name=a.name||e,a.require=u(a),a.restrict=a.restrict||"EA",a.$$moduleName=r.$$moduleName,i.push(a)}catch(s){n(s)}}),i}])),c[e].push(n)):r(e,o(M)),this},this.component=function(e,t){function n(e){function n(t){return k(t)||Kr(t)?function(n,r){return e.invoke(t,this,{$element:n,$attrs:r})}:t}var o=t.template||t.templateUrl?t.template:"",a={controller:i,controllerAs:bt(t.controller)||t.controllerAs||"$ctrl",template:n(o),templateUrl:n(t.templateUrl),transclude:t.transclude,scope:{},bindToController:t.bindings||{},restrict:"E",require:t.require};return r(t,function(e,t){"$"===t.charAt(0)&&(a[t]=e)}),a}var i=t.controller||function(){};return r(t,function(e,t){"$"===t.charAt(0)&&(n[t]=e,k(i)&&(i[t]=e))}),n.$inject=["$injector"],this.directive(e,n)},this.aHrefSanitizationWhitelist=function(e){return $(e)?(n.aHrefSanitizationWhitelist(e),this):n.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(e){return $(e)?(n.imgSrcSanitizationWhitelist(e),this):n.imgSrcSanitizationWhitelist()};var A=!0;this.debugInfoEnabled=function(e){return $(e)?(A=e,this):A};var O=10;this.onChangesTtl=function(e){return arguments.length?(O=e,this):O},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate","$$sanitizeUri",function(t,n,i,o,s,u,g,E,M,P){function T(){try{if(!--_e)throw be=void 0,Wi("infchng","{0} $onChanges() iterations reached. Aborting!\n",O);g.$apply(function(){for(var e=[],t=0,n=be.length;t<n;++t)try{be[t]()}catch(r){e.push(r)}if(be=void 0,e.length)throw e})}finally{_e++}}function D(e,t){if(t){var n,r,i,o=Object.keys(t);for(n=0,r=o.length;n<r;n++)i=o[n],this[i]=t[i]}else this.$attr={};this.$$element=e}function F(e,t,n){we.innerHTML="<span "+t+">";var r=we.firstChild.attributes,i=r[0];r.removeNamedItem(i.name),i.value=n,e.attributes.setNamedItem(i)}function N(e,t){try{e.addClass(t)}catch(n){}}function U(t,n,r,i,o){t instanceof Rr||(t=Rr(t));for(var a=/\S+/,s=0,u=t.length;s<u;s++){var l=t[s];l.nodeType===si&&l.nodeValue.match(a)&&Ae(l,t[s]=e.document.createElement("span"))}var c=H(t,n,t,r,i,o);U.$$addScopeClass(t);var f=null;return function(e,n,r){le(e,"scope"),o&&o.needsNewScope&&(e=e.$parent.$new()),r=r||{};var i=r.parentBoundTranscludeFn,a=r.transcludeControllers,s=r.futureParentElement;i&&i.$$boundTransclude&&(i=i.$$boundTransclude),f||(f=z(s));var u;if(u="html"!==f?Rr(fe(f,Rr("<div>").append(t).html())):n?Ei.clone.call(t):t,a)for(var l in a)u.data("$"+l+"Controller",a[l].instance);return U.$$addScopeInfo(u,e),n&&n(u,e),c&&c(e,u,u,i),u}}function z(e){var t=e&&e[0];return t&&"foreignobject"!==I(t)&&Hr.call(t).match(/SVG/)?"svg":"html"}function H(e,t,n,r,i,o){function a(e,n,r,i){var o,a,s,u,l,c,f,d,g;if(p){var v=n.length;for(g=new Array(v),l=0;l<h.length;l+=3)f=h[l],g[f]=n[f]}else g=n;for(l=0,c=h.length;l<c;)s=g[h[l++]],o=h[l++],a=h[l++],o?(o.scope?(u=e.$new(),U.$$addScopeInfo(Rr(s),u)):u=e,d=o.transcludeOnThisElement?B(e,o.transclude,i):!o.templateOnThisElement&&i?i:!i&&t?B(e,t):null,o(a,u,s,r,d)):a&&a(e,s.childNodes,void 0,i)}for(var s,u,l,c,f,d,p,h=[],g=0;g<e.length;g++)s=new D,u=W(e[g],[],s,0===g?r:void 0,i),l=u.length?J(u,e[g],s,t,n,null,[],[],o):null,l&&l.scope&&U.$$addScopeClass(s.$$element),f=l&&l.terminal||!(c=e[g].childNodes)||!c.length?null:H(c,l?(l.transcludeOnThisElement||!l.templateOnThisElement)&&l.transclude:t),(l||f)&&(h.push(g,l,f),d=!0,p=p||l),o=null;return d?a:null}function B(e,t,n){function r(r,i,o,a,s){return r||(r=e.$new(!1,s),r.$$transcluded=!0),t(r,i,{parentBoundTranscludeFn:n,transcludeControllers:o,futureParentElement:a})}var i=r.$$slots=he();for(var o in t.$$slots)t.$$slots[o]?i[o]=B(e,t.$$slots[o],n):i[o]=null;return r}function W(e,t,n,r,i){var o,a,s=e.nodeType,u=n.$attr;switch(s){case oi:ne(t,vt(I(e)),"E",r,i);for(var l,c,f,d,p,h,g=e.attributes,v=0,m=g&&g.length;v<m;v++){var $=!1,x=!1;l=g[v],c=l.name,p=Zr(l.value),d=vt(c),(h=Ce.test(d))&&(c=c.replace(Xi,"").substr(8).replace(/_(.)/g,function(e,t){return t.toUpperCase()}));var _=d.match(Oe);_&&re(_[1])&&($=c,x=c.substr(0,c.length-5)+"end",c=c.substr(0,c.length-6)),f=vt(c.toLowerCase()),u[f]=c,!h&&n.hasOwnProperty(f)||(n[f]=p,Be(e,f)&&(n[f]=!0)),pe(e,t,p,f,h),ne(t,f,"A",r,i,$,x)}if(a=e.className,b(a)&&(a=a.animVal),w(a)&&""!==a)for(;o=y.exec(a);)f=vt(o[2]),ne(t,f,"C",r,i)&&(n[f]=Zr(o[3])),a=a.substr(o.index+o[0].length);break;case si:if(11===Ir)for(;e.parentNode&&e.nextSibling&&e.nextSibling.nodeType===si;)e.nodeValue=e.nodeValue+e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);ce(t,e.nodeValue);break;case ui:G(e,t,n,r,i)}return t.sort(ae),t}function G(e,t,n,r,i){try{var o=v.exec(e.nodeValue);if(o){var a=vt(o[1]);ne(t,a,"M",r,i)&&(n[a]=Zr(o[2]))}}catch(s){}}function X(e,t,n){var r=[],i=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw Wi("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);e.nodeType==oi&&(e.hasAttribute(t)&&i++,e.hasAttribute(n)&&i--),r.push(e),e=e.nextSibling}while(i>0)}else r.push(e);return Rr(r)}function K(e,t,n){return function(r,i,o,a,s){return i=X(i[0],t,n),e(r,i,o,a,s)}}function Z(e,t,n,r,i,o){var a;return e?U(t,n,r,i,o):function(){return a||(a=U(t,n,r,i,o),t=n=o=null),a.apply(this,arguments)}}function J(e,t,n,o,a,s,u,c,f){function d(e,t,n,r){e&&(n&&(e=K(e,n,r)),e.require=h.require,e.directiveName=g,(S===h||h.$$isolateScope)&&(e=ve(e,{isolateScope:!0})),u.push(e)),t&&(n&&(t=K(t,n,r)),t.require=h.require,t.directiveName=g,(S===h||h.$$isolateScope)&&(t=ve(t,{isolateScope:!0})),c.push(t))}function p(e,o,a,s,f){function d(e,t,n,r){var i;if(C(e)||(r=n,n=t,t=e,e=void 0),j&&(i=y),n||(n=j?A.parent():A),!r)return f(e,t,i,n,R);var o=f.$$slots[r];if(o)return o(e,t,i,n,R);if(m(o))throw Wi("noslot",'No parent directive that requires a transclusion with slot name "{0}". Element: {1}',r,Y(A))}var p,h,g,v,$,y,w,A,O,M;t===a?(O=n,A=n.$$element):(A=Rr(a),O=new D(A,n)),$=o,S?v=o.$new(!0):x&&($=o.$parent),f&&(w=d,w.$$boundTransclude=f,w.isSlotFilled=function(e){return!!f.$$slots[e]}),_&&(y=ee(A,O,w,_,v,o,S)),S&&(U.$$addScopeInfo(A,v,!0,!(E&&(E===S||E===S.$$originalDirective))),U.$$addScopeClass(A,!0),v.$$isolateBindings=S.$$isolateBindings,M=$e(o,O,v,v.$$isolateBindings,S),M.removeWatches&&v.$on("$destroy",M.removeWatches));for(var P in y){var T=_[P],F=y[P],N=T.$$bindings.bindToController;F.identifier&&N?F.bindingInfo=$e($,O,F.instance,N,T):F.bindingInfo={};var I=F();I!==F.instance&&(F.instance=I,A.data("$"+T.name+"Controller",I),F.bindingInfo.removeWatches&&F.bindingInfo.removeWatches(),F.bindingInfo=$e($,O,F.instance,N,T))}for(r(_,function(e,t){var n=e.require;e.bindToController&&!Kr(n)&&b(n)&&l(y[t].instance,Q(t,n,A,y))}),r(y,function(e){var t=e.instance;if(k(t.$onChanges))try{t.$onChanges(e.bindingInfo.initialChanges)}catch(n){i(n)}if(k(t.$onInit))try{t.$onInit()}catch(n){i(n)}k(t.$doCheck)&&($.$watch(function(){t.$doCheck()}),t.$doCheck()),k(t.$onDestroy)&&$.$on("$destroy",function(){t.$onDestroy()})}),p=0,h=u.length;p<h;p++)g=u[p],me(g,g.isolateScope?v:o,A,O,g.require&&Q(g.directiveName,g.require,A,y),w);var R=o;for(S&&(S.template||null===S.templateUrl)&&(R=v),e&&e(R,a.childNodes,void 0,f),p=c.length-1;p>=0;p--)g=c[p],me(g,g.isolateScope?v:o,A,O,g.require&&Q(g.directiveName,g.require,A,y),w);r(y,function(e){var t=e.instance;k(t.$postLink)&&t.$postLink()})}f=f||{};for(var h,g,v,$,y,w=-Number.MAX_VALUE,x=f.newScopeDirective,_=f.controllerDirectives,S=f.newIsolateScopeDirective,E=f.templateDirective,A=f.nonTlbTranscludeDirective,O=!1,M=!1,j=f.hasElementTranscludeDirective,P=n.$$element=Rr(t),T=s,F=o,N=!1,R=!1,V=0,z=e.length;V<z;V++){h=e[V];var H=h.$$start,B=h.$$end;if(H&&(P=X(t,H,B)),v=void 0,w>h.priority)break;if((y=h.scope)&&(h.templateUrl||(b(y)?(ue("new/isolated scope",S||x,h,P),S=h):ue("new/isolated scope",S,h,P)),x=x||h),g=h.name,!N&&(h.replace&&(h.templateUrl||h.template)||h.transclude&&!h.$$tlb)){for(var G,J=V+1;G=e[J++];)if(G.transclude&&!G.$$tlb||G.replace&&(G.templateUrl||G.template)){R=!0;break}N=!0}if(!h.templateUrl&&h.controller&&(y=h.controller,_=_||he(),ue("'"+g+"' controller",_[g],h,P),_[g]=h),y=h.transclude)if(O=!0,h.$$tlb||(ue("transclusion",A,h,P),A=h),"element"==y)j=!0,w=h.priority,v=P,P=n.$$element=Rr(U.$$createComment(g,n[g])),t=P[0],ge(a,L(v),t),v[0].$$parentNode=v[0].parentNode,F=Z(R,v,o,w,T&&T.name,{nonTlbTranscludeDirective:A});else{var ne=he();if(v=Rr(Me(t)).contents(),b(y)){v=[];var re=he(),ae=he();r(y,function(e,t){var n="?"===e.charAt(0);e=n?e.substring(1):e,re[e]=t,ne[t]=null,ae[t]=n}),r(P.contents(),function(e){var t=re[vt(I(e))];t?(ae[t]=!0,ne[t]=ne[t]||[],ne[t].push(e)):v.push(e)}),r(ae,function(e,t){if(!e)throw Wi("reqslot","Required transclusion slot `{0}` was not filled.",t)});for(var se in ne)ne[se]&&(ne[se]=Z(R,ne[se],o))}P.empty(),F=Z(R,v,o,void 0,void 0,{needsNewScope:h.$$isolateScope||h.$$newScope}),F.$$slots=ne}if(h.template)if(M=!0,ue("template",E,h,P),E=h,y=k(h.template)?h.template(P,n):h.template,y=Ee(y),h.replace){if(T=h,v=xe(y)?[]:$t(fe(h.templateNamespace,Zr(y))),t=v[0],1!=v.length||t.nodeType!==oi)throw Wi("tplrt","Template for directive '{0}' must have exactly one root element. {1}",g,"");ge(a,P,t);var le={$attr:{}},ce=W(t,[],le),de=e.splice(V+1,e.length-(V+1));(S||x)&&te(ce,S,x),e=e.concat(ce).concat(de),ie(n,le),z=e.length}else P.html(y);if(h.templateUrl)M=!0,ue("template",E,h,P),E=h,h.replace&&(T=h),p=oe(e.splice(V,e.length-V),P,n,a,O&&F,u,c,{controllerDirectives:_,newScopeDirective:x!==h&&x,newIsolateScopeDirective:S,templateDirective:E,nonTlbTranscludeDirective:A}),z=e.length;else if(h.compile)try{$=h.compile(P,n,F);var pe=h.$$originalDirective||h;
4
+ k($)?d(null,q(pe,$),H,B):$&&d(q(pe,$.pre),q(pe,$.post),H,B)}catch(be){i(be,Y(P))}h.terminal&&(p.terminal=!0,w=Math.max(w,h.priority))}return p.scope=x&&x.scope===!0,p.transcludeOnThisElement=O,p.templateOnThisElement=M,p.transclude=F,f.hasElementTranscludeDirective=j,p}function Q(e,t,n,i){var o;if(w(t)){var a=t.match(_),s=t.substring(a[0].length),u=a[1]||a[3],l="?"===a[2];if("^^"===u?n=n.parent():(o=i&&i[s],o=o&&o.instance),!o){var c="$"+s+"Controller";o=u?n.inheritedData(c):n.data(c)}if(!o&&!l)throw Wi("ctreq","Controller '{0}', required by directive '{1}', can't be found!",s,e)}else if(Kr(t)){o=[];for(var f=0,d=t.length;f<d;f++)o[f]=Q(e,t[f],n,i)}else b(t)&&(o={},r(t,function(t,r){o[r]=Q(e,t,n,i)}));return o||null}function ee(e,t,n,r,i,o,a){var s=he();for(var l in r){var c=r[l],f={$scope:c===a||c.$$isolateScope?i:o,$element:e,$attrs:t,$transclude:n},d=c.controller;"@"==d&&(d=t[c.name]);var p=u(d,f,!0,c.controllerAs);s[c.name]=p,e.data("$"+c.name+"Controller",p.instance)}return s}function te(e,t,n){for(var r=0,i=e.length;r<i;r++)e[r]=d(e[r],{$$isolateScope:t,$$newScope:n})}function ne(e,n,r,o,s,u,l){if(n===s)return null;var p=null;if(c.hasOwnProperty(n))for(var h,g=t.get(n+f),v=0,$=g.length;v<$;v++)try{if(h=g[v],(m(o)||o>h.priority)&&h.restrict.indexOf(r)!=-1){if(u&&(h=d(h,{$$start:u,$$end:l})),!h.$$bindings){var y=h.$$bindings=a(h,h.name);b(y.isolateScope)&&(h.$$isolateBindings=y.isolateScope)}e.push(h),p=h}}catch(w){i(w)}return p}function re(e){if(c.hasOwnProperty(e))for(var n,r=t.get(e+f),i=0,o=r.length;i<o;i++)if(n=r[i],n.multiElement)return!0;return!1}function ie(e,t){var n=t.$attr,i=e.$attr;e.$$element;r(e,function(r,i){"$"!=i.charAt(0)&&(t[i]&&t[i]!==r&&(r+=("style"===i?";":" ")+t[i]),e.$set(i,r,!0,n[i]))}),r(t,function(t,r){e.hasOwnProperty(r)||"$"===r.charAt(0)||(e[r]=t,"class"!==r&&"style"!==r&&(i[r]=n[r]))})}function oe(e,t,n,i,a,s,u,l){var c,f,p=[],h=t[0],g=e.shift(),v=d(g,{templateUrl:null,transclude:null,replace:null,$$originalDirective:g}),m=k(g.templateUrl)?g.templateUrl(t,n):g.templateUrl,$=g.templateNamespace;return t.empty(),o(m).then(function(o){var d,y,w,x;if(o=Ee(o),g.replace){if(w=xe(o)?[]:$t(fe($,Zr(o))),d=w[0],1!=w.length||d.nodeType!==oi)throw Wi("tplrt","Template for directive '{0}' must have exactly one root element. {1}",g.name,m);y={$attr:{}},ge(i,t,d);var _=W(d,[],y);b(g.scope)&&te(_,!0),e=_.concat(e),ie(n,y)}else d=h,t.html(o);for(e.unshift(v),c=J(e,d,n,a,t,g,s,u,l),r(i,function(e,n){e==d&&(i[n]=t[0])}),f=H(t[0].childNodes,a);p.length;){var k=p.shift(),S=p.shift(),E=p.shift(),C=p.shift(),A=t[0];if(!k.$$destroyed){if(S!==h){var O=S.className;l.hasElementTranscludeDirective&&g.replace||(A=Me(d)),ge(E,Rr(S),A),N(Rr(A),O)}x=c.transcludeOnThisElement?B(k,c.transclude,C):C,c(f,k,A,i,x)}}p=null}),function(e,t,n,r,i){var o=i;t.$$destroyed||(p?p.push(t,n,r,o):(c.transcludeOnThisElement&&(o=B(t,c.transclude,i)),c(f,t,n,r,o)))}}function ae(e,t){var n=t.priority-e.priority;return 0!==n?n:e.name!==t.name?e.name<t.name?-1:1:e.index-t.index}function ue(e,t,n,r){function i(e){return e?" (module: "+e+")":""}if(t)throw Wi("multidir","Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}",t.name,i(t.$$moduleName),n.name,i(n.$$moduleName),e,Y(r))}function ce(e,t){var r=n(t,!0);r&&e.push({priority:0,compile:function(e){var t=e.parent(),n=!!t.length;return n&&U.$$addBindingClass(t),function(e,t){var i=t.parent();n||U.$$addBindingClass(i),U.$$addBindingInfo(i,r.expressions),e.$watch(r,function(e){t[0].nodeValue=e})}}})}function fe(t,n){switch(t=Tr(t||"html")){case"svg":case"math":var r=e.document.createElement("div");return r.innerHTML="<"+t+">"+n+"</"+t+">",r.childNodes[0].childNodes;default:return n}}function de(e,t){if("srcdoc"==t)return E.HTML;var n=I(e);return"xlinkHref"==t||"form"==n&&"action"==t||"img"!=n&&("src"==t||"ngSrc"==t)?E.RESOURCE_URL:void 0}function pe(e,t,r,i,o){var a=de(e,i);o=x[i]||o;var s=n(r,!0,a,o);if(s){if("multiple"===i&&"select"===I(e))throw Wi("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",Y(e));t.push({priority:100,compile:function(){return{pre:function(e,t,u){var l=u.$$observers||(u.$$observers=he());if(S.test(i))throw Wi("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var c=u[i];c!==r&&(s=c&&n(c,!0,a,o),r=c),s&&(u[i]=s(e),(l[i]||(l[i]=[])).$$inter=!0,(u.$$observers&&u.$$observers[i].$$scope||e).$watch(s,function(e,t){"class"===i&&e!=t?u.$updateClass(e,t):u.$set(i,e)}))}}}})}}function ge(t,n,r){var i,o,a=n[0],s=n.length,u=a.parentNode;if(t)for(i=0,o=t.length;i<o;i++)if(t[i]==a){t[i++]=r;for(var l=i,c=l+s-1,f=t.length;l<f;l++,c++)c<f?t[l]=t[c]:delete t[l];t.length-=s-1,t.context===a&&(t.context=r);break}u&&u.replaceChild(r,a);var d=e.document.createDocumentFragment();for(i=0;i<s;i++)d.appendChild(n[i]);for(Rr.hasData(a)&&(Rr.data(r,Rr.data(a)),Rr(a).off("$destroy")),Rr.cleanData(d.querySelectorAll("*")),i=1;i<s;i++)delete n[i];n[0]=r,n.length=1}function ve(e,t){return l(function(){return e.apply(null,arguments)},e,t)}function me(e,t,n,r,o,a){try{e(t,n,r,o,a)}catch(s){i(s,Y(n))}}function $e(e,t,i,o,a){function u(t,n,r){k(i.$onChanges)&&n!==r&&(be||(e.$$postDigest(T),be=[]),c||(c={},be.push(l)),c[t]&&(r=c[t].previousValue),c[t]=new gt(r,n))}function l(){i.$onChanges(c),c=void 0}var c,f=[],d={};return r(o,function(r,o){var l,c,h,g,v,m=r.attrName,$=r.optional,b=r.mode;switch(b){case"@":$||Pr.call(t,m)||(i[o]=t[m]=void 0),t.$observe(m,function(e){if(w(e)||j(e)){var t=i[o];u(o,e,t),i[o]=e}}),t.$$observers[m].$$scope=e,l=t[m],w(l)?i[o]=n(l)(e):j(l)&&(i[o]=l),d[o]=new gt(Gi,i[o]);break;case"=":if(!Pr.call(t,m)){if($)break;t[m]=void 0}if($&&!t[m])break;c=s(t[m]),g=c.literal?V:function(e,t){return e===t||e!==e&&t!==t},h=c.assign||function(){throw l=i[o]=c(e),Wi("nonassign","Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",t[m],m,a.name)},l=i[o]=c(e);var y=function(t){return g(t,i[o])||(g(t,l)?h(e,t=i[o]):i[o]=t),l=t};y.$stateful=!0,v=r.collection?e.$watchCollection(t[m],y):e.$watch(s(t[m],y),null,c.literal),f.push(v);break;case"<":if(!Pr.call(t,m)){if($)break;t[m]=void 0}if($&&!t[m])break;c=s(t[m]);var x=i[o]=c(e);d[o]=new gt(Gi,i[o]),v=e.$watch(c,function(e,t){if(t===e){if(t===x)return;t=x}u(o,e,t),i[o]=e},c.literal),f.push(v);break;case"&":if(c=t.hasOwnProperty(m)?s(t[m]):p,c===p&&$)break;i[o]=function(t){return c(e,t)}}}),{initialChanges:d,removeWatches:f.length&&function(){for(var e=0,t=f.length;e<t;++e)f[e]()}}}var be,ye=/^\w/,we=e.document.createElement("div"),_e=O;D.prototype={$normalize:vt,$addClass:function(e){e&&e.length>0&&M.addClass(this.$$element,e)},$removeClass:function(e){e&&e.length>0&&M.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=mt(e,t);n&&n.length&&M.addClass(this.$$element,n);var r=mt(t,e);r&&r.length&&M.removeClass(this.$$element,r)},$set:function(e,t,n,o){var a,s=this.$$element[0],u=Be(s,e),l=We(e),c=e;if(u?(this.$$element.prop(e,t),o=u):l&&(this[l]=t,c=l),this[e]=t,o?this.$attr[e]=o:(o=this.$attr[e],o||(this.$attr[e]=o=se(e,"-"))),a=I(this.$$element),"a"===a&&("href"===e||"xlinkHref"===e)||"img"===a&&"src"===e)this[e]=t=P(t,"src"===e);else if("img"===a&&"srcset"===e&&$(t)){for(var f="",d=Zr(t),p=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,h=/\s/.test(d)?p:/(,)/,g=d.split(h),v=Math.floor(g.length/2),b=0;b<v;b++){var y=2*b;f+=P(Zr(g[y]),!0),f+=" "+Zr(g[y+1])}var w=Zr(g[2*b]).split(/\s/);f+=P(Zr(w[0]),!0),2===w.length&&(f+=" "+Zr(w[1])),this[e]=t=f}n!==!1&&(null===t||m(t)?this.$$element.removeAttr(o):ye.test(o)?this.$$element.attr(o,t):F(this.$$element[0],o,t));var x=this.$$observers;x&&r(x[c],function(e){try{e(t)}catch(n){i(n)}})},$observe:function(e,t){var n=this,r=n.$$observers||(n.$$observers=he()),i=r[e]||(r[e]=[]);return i.push(t),g.$evalAsync(function(){i.$$inter||!n.hasOwnProperty(e)||m(n[e])||t(n[e])}),function(){R(i,t)}}};var ke=n.startSymbol(),Se=n.endSymbol(),Ee="{{"==ke&&"}}"==Se?h:function(e){return e.replace(/\{\{/g,ke).replace(/}}/g,Se)},Ce=/^ngAttr[A-Z]/,Oe=/^(.+)Start$/;return U.$$addBindingInfo=A?function(e,t){var n=e.data("$binding")||[];Kr(t)?n=n.concat(t):n.push(t),e.data("$binding",n)}:p,U.$$addBindingClass=A?function(e){N(e,"ng-binding")}:p,U.$$addScopeInfo=A?function(e,t,n,r){var i=n?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(i,t)}:p,U.$$addScopeClass=A?function(e,t){N(e,t?"ng-isolate-scope":"ng-scope")}:p,U.$$createComment=function(t,n){var r="";return A&&(r=" "+(t||"")+": ",n&&(r+=n+" ")),e.document.createComment(r)},U}]}function gt(e,t){this.previousValue=e,this.currentValue=t}function vt(e){return we(e.replace(Xi,""))}function mt(e,t){var n="",r=e.split(/\s+/),i=t.split(/\s+/);e:for(var o=0;o<r.length;o++){for(var a=r[o],s=0;s<i.length;s++)if(a==i[s])continue e;n+=(n.length>0?" ":"")+a}return n}function $t(e){e=Rr(e);var t=e.length;if(t<=1)return e;for(;t--;){var n=e[t];n.nodeType===ui&&Lr.call(e,t,1)}return e}function bt(e,t){if(t&&w(t))return t;if(w(e)){var n=Yi.exec(e);if(n)return n[3]}}function yt(){var e={},n=!1;this.has=function(t){return e.hasOwnProperty(t)},this.register=function(t,n){fe(t,"controller"),b(t)?l(e,t):e[t]=n},this.allowGlobals=function(){n=!0},this.$get=["$injector","$window",function(r,i){function o(e,n,r,i){if(!e||!b(e.$scope))throw t("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",i,n);e.$scope[n]=r}return function(t,a,s,u){var c,f,d,p;if(s=s===!0,u&&w(u)&&(p=u),w(t)){if(f=t.match(Yi),!f)throw Ki("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",t);d=f[1],p=p||f[3],t=e.hasOwnProperty(d)?e[d]:de(a.$scope,d,!0)||(n?de(i,d,!0):void 0),ce(t,d,!0)}if(s){var h=(Kr(t)?t[t.length-1]:t).prototype;c=Object.create(h||null),p&&o(a,p,c,d||t.name);var g;return g=l(function(){var e=r.invoke(t,c,a,d);return e!==c&&(b(e)||k(e))&&(c=e,p&&o(a,p,c,d||t.name)),c},{instance:c,identifier:p})}return c=r.instantiate(t,a,d),p&&o(a,p,c,d||t.name),c}}]}function wt(){this.$get=["$window",function(e){return Rr(e.document)}]}function xt(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function _t(e){return b(e)?_(e)?e.toISOString():B(e):e}function kt(){this.$get=function(){return function(e){if(!e)return"";var t=[];return i(e,function(e,n){null===e||m(e)||(Kr(e)?r(e,function(e){t.push(te(n)+"="+te(_t(e)))}):t.push(te(n)+"="+te(_t(e))))}),t.join("&")}}}function St(){this.$get=function(){return function(e){function t(e,o,a){null===e||m(e)||(Kr(e)?r(e,function(e,n){t(e,o+"["+(b(e)?n:"")+"]")}):b(e)&&!_(e)?i(e,function(e,n){t(e,o+(a?"":"[")+n+(a?"":"]"))}):n.push(te(o)+"="+te(_t(e))))}if(!e)return"";var n=[];return t(e,"",!0),n.join("&")}}}function Et(e,t){if(w(e)){var n=e.replace(no,"").trim();if(n){var r=t("Content-Type");(r&&0===r.indexOf(Ji)||Ct(n))&&(e=W(n))}}return e}function Ct(e){var t=e.match(eo);return t&&to[t[0]].test(e)}function At(e){function t(e,t){e&&(i[e]=i[e]?i[e]+", "+t:t)}var n,i=he();return w(e)?r(e.split("\n"),function(e){n=e.indexOf(":"),t(Tr(Zr(e.substr(0,n))),Zr(e.substr(n+1)))}):b(e)&&r(e,function(e,n){t(Tr(n),Zr(e))}),i}function Ot(e){var t;return function(n){if(t||(t=At(e)),n){var r=t[Tr(n)];return void 0===r&&(r=null),r}return t}}function Mt(e,t,n,i){return k(i)?i(e,t,n):(r(i,function(r){e=r(e,t,n)}),e)}function jt(e){return 200<=e&&e<300}function Pt(){var e=this.defaults={transformResponse:[Et],transformRequest:[function(e){return!b(e)||A(e)||M(e)||O(e)?e:B(e)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ve(Qi),put:ve(Qi),patch:ve(Qi)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},n=!1;this.useApplyAsync=function(e){return $(e)?(n=!!e,this):n};var i=!0;this.useLegacyPromiseExtensions=function(e){return $(e)?(i=!!e,this):i};var o=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(a,s,u,c,f,d){function p(n){function o(e,t){for(var n=0,r=t.length;n<r;){var i=t[n++],o=t[n++];e=e.then(i,o)}return t.length=0,e}function a(e,t){var n,i={};return r(e,function(e,r){k(e)?(n=e(t),null!=n&&(i[r]=n)):i[r]=e}),i}function s(t){var n,r,i,o=e.headers,s=l({},t.headers);o=l({},o.common,o[Tr(t.method)]);e:for(n in o){r=Tr(n);for(i in s)if(Tr(i)===r)continue e;s[n]=o[n]}return a(s,ve(t))}function u(t){var n=t.headers,i=Mt(t.data,Ot(n),void 0,t.transformRequest);return m(i)&&r(n,function(e,t){"content-type"===Tr(t)&&delete n[t]}),m(t.withCredentials)&&!m(e.withCredentials)&&(t.withCredentials=e.withCredentials),v(t,i).then(c,c)}function c(e){var t=l({},e);return t.data=Mt(e.data,e.headers,e.status,p.transformResponse),jt(e.status)?t:f.reject(t)}if(!b(n))throw t("$http")("badreq","Http request configuration must be an object. Received: {0}",n);if(!w(n.url))throw t("$http")("badreq","Http request configuration url must be a string. Received: {0}",n.url);var p=l({method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse,paramSerializer:e.paramSerializer},n);p.headers=s(n),p.method=Dr(p.method),p.paramSerializer=w(p.paramSerializer)?d.get(p.paramSerializer):p.paramSerializer;var h=[],g=[],$=f.when(p);return r(_,function(e){(e.request||e.requestError)&&h.unshift(e.request,e.requestError),(e.response||e.responseError)&&g.push(e.response,e.responseError)}),$=o($,h),$=$.then(u),$=o($,g),i?($.success=function(e){return ce(e,"fn"),$.then(function(t){e(t.data,t.status,t.headers,p)}),$},$.error=function(e){return ce(e,"fn"),$.then(null,function(t){e(t.data,t.status,t.headers,p)}),$}):($.success=io("success"),$.error=io("error")),$}function h(e){r(arguments,function(e){p[e]=function(t,n){return p(l({},n||{},{method:e,url:t}))}})}function g(e){r(arguments,function(e){p[e]=function(t,n,r){return p(l({},r||{},{method:e,url:t,data:n}))}})}function v(t,i){function o(e){if(e){var t={};return r(e,function(e,r){t[r]=function(t){function r(){e(t)}n?c.$applyAsync(r):c.$$phase?r():c.$apply(r)}}),t}}function u(e,t,r,i){function o(){l(t,e,r,i)}g&&(jt(e)?g.put(S,[e,t,At(r),i]):g.remove(S)),n?c.$applyAsync(o):(o(),c.$$phase||c.$apply())}function l(e,n,r,i){n=n>=-1?n:0,(jt(n)?w.resolve:w.reject)({data:e,status:n,headers:Ot(r),config:t,statusText:i})}function d(e){l(e.data,e.status,ve(e.headers()),e.statusText)}function h(){var e=p.pendingRequests.indexOf(t);e!==-1&&p.pendingRequests.splice(e,1)}var g,v,w=f.defer(),_=w.promise,k=t.headers,S=y(t.url,t.paramSerializer(t.params));if(p.pendingRequests.push(t),_.then(h,h),!t.cache&&!e.cache||t.cache===!1||"GET"!==t.method&&"JSONP"!==t.method||(g=b(t.cache)?t.cache:b(e.cache)?e.cache:x),g&&(v=g.get(S),$(v)?P(v)?v.then(d,d):Kr(v)?l(v[1],v[0],ve(v[2]),v[3]):l(v,200,{},"OK"):g.put(S,_)),m(v)){var E=Fn(t.url)?s()[t.xsrfCookieName||e.xsrfCookieName]:void 0;E&&(k[t.xsrfHeaderName||e.xsrfHeaderName]=E),a(t.method,S,i,u,k,t.timeout,t.withCredentials,t.responseType,o(t.eventHandlers),o(t.uploadEventHandlers))}return _}function y(e,t){return t.length>0&&(e+=(e.indexOf("?")==-1?"?":"&")+t),e}var x=u("$http");e.paramSerializer=w(e.paramSerializer)?d.get(e.paramSerializer):e.paramSerializer;var _=[];return r(o,function(e){_.unshift(w(e)?d.get(e):d.invoke(e))}),p.pendingRequests=[],h("get","delete","head","jsonp"),g("post","put","patch"),p.defaults=e,p}]}function Tt(){this.$get=function(){return function(){return new e.XMLHttpRequest}}}function Dt(){this.$get=["$browser","$jsonpCallbacks","$document","$xhrFactory",function(e,t,n,r){return Ft(e,r,e.defer,t,n[0])}]}function Ft(e,t,n,i,o){function a(e,t,n){e=e.replace("JSON_CALLBACK",t);var r=o.createElement("script"),a=null;return r.type="text/javascript",r.src=e,r.async=!0,a=function(e){gi(r,"load",a),gi(r,"error",a),o.body.removeChild(r),r=null;var s=-1,u="unknown";e&&("load"!==e.type||i.wasCalled(t)||(e={type:"error"}),u=e.type,s="error"===e.type?404:200),n&&n(s,u)},hi(r,"load",a),hi(r,"error",a),o.body.appendChild(r),a}return function(o,s,u,l,c,f,d,h,g,v){function b(){x&&x(),_&&_.abort()}function y(t,r,i,o,a){$(E)&&n.cancel(E),x=_=null,t(r,i,o,a),e.$$completeOutstandingRequest(p)}if(e.$$incOutstandingRequestCount(),s=s||e.url(),"jsonp"===Tr(o))var w=i.createCallback(s),x=a(s,w,function(e,t){var n=200===e&&i.getResponse(w);y(l,e,n,"",t),i.removeCallback(w)});else{var _=t(o,s);_.open(o,s,!0),r(c,function(e,t){$(e)&&_.setRequestHeader(t,e)}),_.onload=function(){var e=_.statusText||"",t="response"in _?_.response:_.responseText,n=1223===_.status?204:_.status;0===n&&(n=t?200:"file"==Dn(s).protocol?404:0),y(l,n,t,_.getAllResponseHeaders(),e)};var k=function(){y(l,-1,null,null,"")};if(_.onerror=k,_.onabort=k,r(g,function(e,t){_.addEventListener(t,e)}),r(v,function(e,t){_.upload.addEventListener(t,e)}),d&&(_.withCredentials=!0),h)try{_.responseType=h}catch(S){if("json"!==h)throw S}_.send(m(u)?null:u)}if(f>0)var E=n(b,f);else P(f)&&f.then(b)}}function Nt(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse","$exceptionHandler","$sce",function(n,r,i){function o(e){return"\\\\\\"+e}function a(n){return n.replace(p,e).replace(h,t)}function s(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=B(e)}return e}function u(e,t,n,r){var i;return i=e.$watch(function(e){return i(),r(e)},t,n)}function c(o,c,p,h){function v(e){try{return e=P(e),h&&!$(e)?e:s(e)}catch(t){r(oo.interr(o,t))}}if(!o.length||o.indexOf(e)===-1){var b;if(!c){var y=a(o);b=g(y),b.exp=o,b.expressions=[],b.$$watchDelegate=u}return b}h=!!h;for(var w,x,_,S=0,E=[],C=[],A=o.length,O=[],M=[];S<A;){if((w=o.indexOf(e,S))==-1||(x=o.indexOf(t,w+f))==-1){S!==A&&O.push(a(o.substring(S)));break}S!==w&&O.push(a(o.substring(S,w))),_=o.substring(w+f,x),E.push(_),C.push(n(_,v)),S=x+d,M.push(O.length),O.push("")}if(p&&O.length>1&&oo.throwNoconcat(o),!c||E.length){var j=function(e){for(var t=0,n=E.length;t<n;t++){if(h&&m(e[t]))return;O[M[t]]=e[t]}return O.join("")},P=function(e){return p?i.getTrusted(p,e):i.valueOf(e)};return l(function(e){var t=0,n=E.length,i=new Array(n);try{for(;t<n;t++)i[t]=C[t](e);return j(i)}catch(a){r(oo.interr(o,a))}},{exp:o,expressions:E,$$watchDelegate:function(e,t){var n;return e.$watchGroup(C,function(r,i){var o=j(r);k(t)&&t.call(this,o,r!==i?n:o,e),n=o})}})}}var f=e.length,d=t.length,p=new RegExp(e.replace(/./g,o),"g"),h=new RegExp(t.replace(/./g,o),"g");return c.startSymbol=function(){return e},c.endSymbol=function(){return t},c}]}function It(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(e,t,n,r,i){function o(o,s,u,l){function c(){f?o.apply(null,d):o(g)}var f=arguments.length>4,d=f?L(arguments,4):[],p=t.setInterval,h=t.clearInterval,g=0,v=$(l)&&!l,m=(v?r:n).defer(),b=m.promise;return u=$(u)?u:0,b.$$intervalId=p(function(){v?i.defer(c):e.$evalAsync(c),m.notify(g++),u>0&&g>=u&&(m.resolve(g),h(b.$$intervalId),delete a[b.$$intervalId]),v||e.$apply()},s),a[b.$$intervalId]=m,b}var a={};return o.cancel=function(e){return!!(e&&e.$$intervalId in a)&&(a[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete a[e.$$intervalId],!0)},o}]}function Rt(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=ee(t[n]);return t.join("/")}function Ut(e,t){var n=Dn(e);t.$$protocol=n.protocol,t.$$host=n.hostname,t.$$port=f(n.port)||uo[n.protocol]||null}function Vt(e,t){var n="/"!==e.charAt(0);n&&(e="/"+e);var r=Dn(e);t.$$path=decodeURIComponent(n&&"/"===r.pathname.charAt(0)?r.pathname.substring(1):r.pathname),t.$$search=J(r.search),t.$$hash=decodeURIComponent(r.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function zt(e,t){return 0===e.lastIndexOf(t,0)}function Lt(e,t){if(zt(t,e))return t.substr(e.length)}function qt(e){var t=e.indexOf("#");return t==-1?e:e.substr(0,t)}function Ht(e){return e.replace(/(#.+)|#$/,"$1")}function Bt(e){return e.substr(0,qt(e).lastIndexOf("/")+1)}function Wt(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function Gt(e,t,n){this.$$html5=!0,n=n||"",Ut(e,this),this.$$parse=function(e){var n=Lt(t,e);if(!w(n))throw lo("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',e,t);Vt(n,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=Q(this.$$search),n=this.$$hash?"#"+ee(this.$$hash):"";this.$$url=Rt(this.$$path)+(e?"?"+e:"")+n,this.$$absUrl=t+this.$$url.substr(1)},this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var o,a,s;return $(o=Lt(e,r))?(a=o,s=$(o=Lt(n,o))?t+(Lt("/",o)||o):e+a):$(o=Lt(t,r))?s=t+o:t==r+"/"&&(s=t),s&&this.$$parse(s),!!s}}function Xt(e,t,n){Ut(e,this),this.$$parse=function(r){function i(e,t,n){var r,i=/^\/[A-Z]:(\/.*)/;return zt(t,n)&&(t=t.replace(n,"")),i.exec(t)?e:(r=i.exec(e),r?r[1]:e)}var o,a=Lt(e,r)||Lt(t,r);m(a)||"#"!==a.charAt(0)?this.$$html5?o=a:(o="",m(a)&&(e=r,this.replace())):(o=Lt(n,a),m(o)&&(o=a)),Vt(o,this),this.$$path=i(this.$$path,o,e),this.$$compose()},this.$$compose=function(){var t=Q(this.$$search),r=this.$$hash?"#"+ee(this.$$hash):"";this.$$url=Rt(this.$$path)+(t?"?"+t:"")+r,this.$$absUrl=e+(this.$$url?n+this.$$url:"")},this.$$parseLinkUrl=function(t,n){return qt(e)==qt(t)&&(this.$$parse(t),!0)}}function Kt(e,t,n){this.$$html5=!0,Xt.apply(this,arguments),this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var o,a;return e==qt(r)?o=r:(a=Lt(t,r))?o=e+n+a:t===r+"/"&&(o=t),o&&this.$$parse(o),!!o},this.$$compose=function(){var t=Q(this.$$search),r=this.$$hash?"#"+ee(this.$$hash):"";this.$$url=Rt(this.$$path)+(t?"?"+t:"")+r,this.$$absUrl=e+n+this.$$url}}function Yt(e){return function(){return this[e]}}function Zt(e,t){return function(n){return m(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function Jt(){var e="",t={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(t){return $(t)?(e=t,this):e},this.html5Mode=function(e){return j(e)?(t.enabled=e,this):b(e)?(j(e.enabled)&&(t.enabled=e.enabled),j(e.requireBase)&&(t.requireBase=e.requireBase),j(e.rewriteLinks)&&(t.rewriteLinks=e.rewriteLinks),this):t},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(n,r,i,o,a){function s(e,t,n){var i=l.url(),o=l.$$state;try{r.url(e,t,n),l.$$state=r.state()}catch(a){throw l.url(i),l.$$state=o,a}}function u(e,t){n.$broadcast("$locationChangeSuccess",l.absUrl(),e,l.$$state,t)}var l,c,f,d=r.baseHref(),p=r.url();if(t.enabled){if(!d&&t.requireBase)throw lo("nobase","$location in HTML5 mode requires a <base> tag to be present!");f=Wt(p)+(d||"/"),c=i.history?Gt:Kt}else f=qt(p),c=Xt;var h=Bt(f);l=new c(f,h,"#"+e),l.$$parseLinkUrl(p,p),l.$$state=r.state();var g=/^\s*(javascript|mailto):/i;o.on("click",function(e){if(t.rewriteLinks&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&2!=e.which&&2!=e.button){for(var i=Rr(e.target);"a"!==I(i[0]);)if(i[0]===o[0]||!(i=i.parent())[0])return;var s=i.prop("href"),u=i.attr("href")||i.attr("xlink:href");b(s)&&"[object SVGAnimatedString]"===s.toString()&&(s=Dn(s.animVal).href),g.test(s)||!s||i.attr("target")||e.isDefaultPrevented()||l.$$parseLinkUrl(s,u)&&(e.preventDefault(),l.absUrl()!=r.url()&&(n.$apply(),a.angular["ff-684208-preventDefault"]=!0))}}),Ht(l.absUrl())!=Ht(p)&&r.url(l.absUrl(),!0);var v=!0;return r.onUrlChange(function(e,t){return m(Lt(h,e))?void(a.location.href=e):(n.$evalAsync(function(){var r,i=l.absUrl(),o=l.$$state;e=Ht(e),l.$$parse(e),l.$$state=t,r=n.$broadcast("$locationChangeStart",e,i,t,o).defaultPrevented,l.absUrl()===e&&(r?(l.$$parse(i),l.$$state=o,s(i,!1,o)):(v=!1,u(i,o)))}),void(n.$$phase||n.$digest()))}),n.$watch(function(){var e=Ht(r.url()),t=Ht(l.absUrl()),o=r.state(),a=l.$$replace,c=e!==t||l.$$html5&&i.history&&o!==l.$$state;(v||c)&&(v=!1,n.$evalAsync(function(){var t=l.absUrl(),r=n.$broadcast("$locationChangeStart",t,e,l.$$state,o).defaultPrevented;l.absUrl()===t&&(r?(l.$$parse(e),l.$$state=o):(c&&s(t,a,o===l.$$state?null:l.$$state),u(e,o)))})),l.$$replace=!1}),l}]}function Qt(){var e=!0,t=this;this.debugEnabled=function(t){return $(t)?(e=t,this):e},this.$get=["$window",function(n){function i(e){return e instanceof Error&&(e.stack?e=e.message&&e.stack.indexOf(e.message)===-1?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function o(e){var t=n.console||{},o=t[e]||t.log||p,a=!1;try{a=!!o.apply}catch(s){}return a?function(){var e=[];return r(arguments,function(t){e.push(i(t))}),o.apply(t,e)}:function(e,t){o(e,null==t?"":t)}}return{log:o("log"),info:o("info"),warn:o("warn"),error:o("error"),debug:function(){var n=o("debug");return function(){e&&n.apply(t,arguments)}}()}}]}function en(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throw fo("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return e}function tn(e){return e+""}function nn(e,t){if(e){if(e.constructor===e)throw fo("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throw fo("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw fo("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);if(e===Object)throw fo("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t)}return e}function rn(e,t){if(e){if(e.constructor===e)throw fo("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e===po||e===ho||e===go)throw fo("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",t)}}function on(e,t){if(e&&(e===(0).constructor||e===(!1).constructor||e==="".constructor||e==={}.constructor||e===[].constructor||e===Function.constructor))throw fo("isecaf","Assigning to a constructor is disallowed! Expression: {0}",t)}function an(e,t){return"undefined"!=typeof e?e:t}function sn(e,t){return"undefined"==typeof e?t:"undefined"==typeof t?e:e+t}function un(e,t){var n=e(t);return!n.$stateful}function ln(e,t){var n,i;switch(e.type){case bo.Program:n=!0,r(e.body,function(e){ln(e.expression,t),n=n&&e.expression.constant}),e.constant=n;break;case bo.Literal:e.constant=!0,e.toWatch=[];break;case bo.UnaryExpression:ln(e.argument,t),e.constant=e.argument.constant,e.toWatch=e.argument.toWatch;break;case bo.BinaryExpression:ln(e.left,t),ln(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.left.toWatch.concat(e.right.toWatch);break;case bo.LogicalExpression:ln(e.left,t),ln(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.constant?[]:[e];break;case bo.ConditionalExpression:ln(e.test,t),ln(e.alternate,t),ln(e.consequent,t),e.constant=e.test.constant&&e.alternate.constant&&e.consequent.constant,e.toWatch=e.constant?[]:[e];break;case bo.Identifier:e.constant=!1,e.toWatch=[e];break;case bo.MemberExpression:ln(e.object,t),e.computed&&ln(e.property,t),e.constant=e.object.constant&&(!e.computed||e.property.constant),e.toWatch=[e];break;case bo.CallExpression:n=!!e.filter&&un(t,e.callee.name),i=[],r(e.arguments,function(e){ln(e,t),n=n&&e.constant,e.constant||i.push.apply(i,e.toWatch)}),e.constant=n,e.toWatch=e.filter&&un(t,e.callee.name)?i:[e];break;case bo.AssignmentExpression:ln(e.left,t),ln(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=[e];break;case bo.ArrayExpression:n=!0,i=[],r(e.elements,function(e){ln(e,t),n=n&&e.constant,e.constant||i.push.apply(i,e.toWatch)}),e.constant=n,e.toWatch=i;break;case bo.ObjectExpression:n=!0,i=[],r(e.properties,function(e){ln(e.value,t),n=n&&e.value.constant&&!e.computed,e.value.constant||i.push.apply(i,e.value.toWatch)}),e.constant=n,e.toWatch=i;break;case bo.ThisExpression:e.constant=!1,e.toWatch=[];break;case bo.LocalsExpression:e.constant=!1,e.toWatch=[]}}function cn(e){if(1==e.length){var t=e[0].expression,n=t.toWatch;return 1!==n.length?n:n[0]!==t?n:void 0}}function fn(e){return e.type===bo.Identifier||e.type===bo.MemberExpression}function dn(e){if(1===e.body.length&&fn(e.body[0].expression))return{type:bo.AssignmentExpression,left:e.body[0].expression,right:{type:bo.NGValueParameter},operator:"="}}function pn(e){return 0===e.body.length||1===e.body.length&&(e.body[0].expression.type===bo.Literal||e.body[0].expression.type===bo.ArrayExpression||e.body[0].expression.type===bo.ObjectExpression)}function hn(e){return e.constant}function gn(e,t){this.astBuilder=e,this.$filter=t}function vn(e,t){this.astBuilder=e,this.$filter=t}function mn(e){return"constructor"==e}function $n(e){return k(e.valueOf)?e.valueOf():wo.call(e)}function bn(){var e,t,n=he(),i=he(),o={"true":!0,"false":!1,"null":null,undefined:void 0};this.addLiteral=function(e,t){o[e]=t},this.setIdentifierFns=function(n,r){return e=n,t=r,this},this.$get=["$filter",function(a){function s(e,t,r){var o,s,l;switch(r=r||y,typeof e){case"string":e=e.trim(),l=e;var v=r?i:n;if(o=v[l],!o){":"===e.charAt(0)&&":"===e.charAt(1)&&(s=!0,e=e.substring(2));var $=r?b:m,w=new $o($),x=new yo(w,a,$);o=x.parse(e),o.constant?o.$$watchDelegate=h:s?o.$$watchDelegate=o.literal?d:f:o.inputs&&(o.$$watchDelegate=c),r&&(o=u(o)),v[l]=o}return g(o,t);case"function":return g(e,t);default:return g(p,t)}}function u(e){function t(t,n,r,i){var o=y;y=!0;try{return e(t,n,r,i)}finally{y=o}}if(!e)return e;t.$$watchDelegate=e.$$watchDelegate,t.assign=u(e.assign),t.constant=e.constant,t.literal=e.literal;for(var n=0;e.inputs&&n<e.inputs.length;++n)e.inputs[n]=u(e.inputs[n]);return t.inputs=e.inputs,t}function l(e,t){return null==e||null==t?e===t:("object"!=typeof e||(e=$n(e),"object"!=typeof e))&&(e===t||e!==e&&t!==t)}function c(e,t,n,r,i){var o,a=r.inputs;if(1===a.length){var s=l;return a=a[0],e.$watch(function(e){var t=a(e);return l(t,s)||(o=r(e,void 0,void 0,[t]),s=t&&$n(t)),o},t,n,i)}for(var u=[],c=[],f=0,d=a.length;f<d;f++)u[f]=l,c[f]=null;return e.$watch(function(e){for(var t=!1,n=0,i=a.length;n<i;n++){var s=a[n](e);(t||(t=!l(s,u[n])))&&(c[n]=s,u[n]=s&&$n(s))}return t&&(o=r(e,void 0,void 0,c)),o},t,n,i)}function f(e,t,n,r){var i,o;return i=e.$watch(function(e){return r(e)},function(e,n,r){o=e,k(t)&&t.apply(this,arguments),$(e)&&r.$$postDigest(function(){$(o)&&i()})},n)}function d(e,t,n,i){function o(e){var t=!0;return r(e,function(e){$(e)||(t=!1)}),t}var a,s;return a=e.$watch(function(e){return i(e)},function(e,n,r){s=e,k(t)&&t.call(this,e,n,r),o(e)&&r.$$postDigest(function(){o(s)&&a()})},n)}function h(e,t,n,r){var i;return i=e.$watch(function(e){return i(),r(e)},t,n)}function g(e,t){if(!t)return e;var n=e.$$watchDelegate,r=!1,i=n!==d&&n!==f,o=i?function(n,i,o,a){var s=r&&a?a[0]:e(n,i,o,a);return t(s,n,i)}:function(n,r,i,o){var a=e(n,r,i,o),s=t(a,n,r);return $(a)?s:a};return e.$$watchDelegate&&e.$$watchDelegate!==c?o.$$watchDelegate=e.$$watchDelegate:t.$stateful||(o.$$watchDelegate=c,r=!e.inputs,o.inputs=e.inputs?e.inputs:[e]),o}var v=Qr().noUnsafeEval,m={csp:v,expensiveChecks:!1,literals:U(o),isIdentifierStart:k(e)&&e,isIdentifierContinue:k(t)&&t},b={csp:v,expensiveChecks:!0,literals:U(o),isIdentifierStart:k(e)&&e,isIdentifierContinue:k(t)&&t},y=!1;return s.$$runningExpensiveChecks=function(){return y},s}]}function yn(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return xn(function(t){e.$evalAsync(t)},t)}]}function wn(){this.$get=["$browser","$exceptionHandler",function(e,t){return xn(function(t){e.defer(t)},t)}]}function xn(e,n){function i(){this.$$state={status:0}}function o(e,t){return function(n){t.call(e,n)}}function a(e){var t,r,i;i=e.pending,e.processScheduled=!1,e.pending=void 0;for(var o=0,a=i.length;o<a;++o){r=i[o][0],t=i[o][e.status];try{k(t)?r.resolve(t(e.value)):1===e.status?r.resolve(e.value):r.reject(e.value)}catch(s){r.reject(s),n(s)}}}function s(t){!t.processScheduled&&t.pending&&(t.processScheduled=!0,e(function(){a(t)}))}function u(){this.promise=new i}function c(e){var t=new u,n=0,i=Kr(e)?[]:{};return r(e,function(e,r){n++,$(e).then(function(e){i.hasOwnProperty(r)||(i[r]=e,
5
+ --n||t.resolve(i))},function(e){i.hasOwnProperty(r)||t.reject(e)})}),0===n&&t.resolve(i),t.promise}function f(e){var t=p();return r(e,function(e){$(e).then(t.resolve,t.reject)}),t.promise}var d=t("$q",TypeError),p=function(){var e=new u;return e.resolve=o(e,e.resolve),e.reject=o(e,e.reject),e.notify=o(e,e.notify),e};l(i.prototype,{then:function(e,t,n){if(m(e)&&m(t)&&m(n))return this;var r=new u;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,e,t,n]),this.$$state.status>0&&s(this.$$state),r.promise},"catch":function(e){return this.then(null,e)},"finally":function(e,t){return this.then(function(t){return v(t,!0,e)},function(t){return v(t,!1,e)},t)}}),l(u.prototype,{resolve:function(e){this.promise.$$state.status||(e===this.promise?this.$$reject(d("qcycle","Expected promise to be resolved with value other than itself '{0}'",e)):this.$$resolve(e))},$$resolve:function(e){function t(e){u||(u=!0,a.$$resolve(e))}function r(e){u||(u=!0,a.$$reject(e))}var i,a=this,u=!1;try{(b(e)||k(e))&&(i=e&&e.then),k(i)?(this.promise.$$state.status=-1,i.call(e,t,r,o(this,this.notify))):(this.promise.$$state.value=e,this.promise.$$state.status=1,s(this.promise.$$state))}catch(l){r(l),n(l)}},reject:function(e){this.promise.$$state.status||this.$$reject(e)},$$reject:function(e){this.promise.$$state.value=e,this.promise.$$state.status=2,s(this.promise.$$state)},notify:function(t){var r=this.promise.$$state.pending;this.promise.$$state.status<=0&&r&&r.length&&e(function(){for(var e,i,o=0,a=r.length;o<a;o++){i=r[o][0],e=r[o][3];try{i.notify(k(e)?e(t):t)}catch(s){n(s)}}})}});var h=function(e){var t=new u;return t.reject(e),t.promise},g=function(e,t){var n=new u;return t?n.resolve(e):n.reject(e),n.promise},v=function(e,t,n){var r=null;try{k(n)&&(r=n())}catch(i){return g(i,!1)}return P(r)?r.then(function(){return g(e,t)},function(e){return g(e,!1)}):g(e,t)},$=function(e,t,n,r){var i=new u;return i.resolve(e),i.promise.then(t,n,r)},y=$,w=function(e){function t(e){r.resolve(e)}function n(e){r.reject(e)}if(!k(e))throw d("norslvr","Expected resolverFn, got '{0}'",e);var r=new u;return e(t,n),r.promise};return w.prototype=i.prototype,w.defer=p,w.reject=h,w.when=$,w.resolve=y,w.all=c,w.race=f,w}function _n(){this.$get=["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame,r=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,i=!!n,o=i?function(e){var t=n(e);return function(){r(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return o.supported=i,o}]}function kn(){function e(e){function t(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=a(),this.$$ChildScope=null}return t.prototype=e,t}var i=10,o=t("$rootScope"),s=null,u=null;this.digestTtl=function(e){return arguments.length&&(i=e),i},this.$get=["$exceptionHandler","$parse","$browser",function(t,l,c){function f(e){e.currentScope.$$destroyed=!0}function d(e){9===Ir&&(e.$$childHead&&d(e.$$childHead),e.$$nextSibling&&d(e.$$nextSibling)),e.$parent=e.$$nextSibling=e.$$prevSibling=e.$$childHead=e.$$childTail=e.$root=e.$$watchers=null}function h(){this.$id=a(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this.$root=this,this.$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}function g(e){if(S.$$phase)throw o("inprog","{0} already in progress",S.$$phase);S.$$phase=e}function v(){S.$$phase=null}function $(e,t){do e.$$watchersCount+=t;while(e=e.$parent)}function y(e,t,n){do e.$$listenerCount[n]-=t,0===e.$$listenerCount[n]&&delete e.$$listenerCount[n];while(e=e.$parent)}function w(){}function x(){for(;A.length;)try{A.shift()()}catch(e){t(e)}u=null}function _(){null===u&&(u=c.defer(function(){S.$apply(x)}))}h.prototype={constructor:h,$new:function(t,n){var r;return n=n||this,t?(r=new h,r.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=e(this)),r=new this.$$ChildScope),r.$parent=n,r.$$prevSibling=n.$$childTail,n.$$childHead?(n.$$childTail.$$nextSibling=r,n.$$childTail=r):n.$$childHead=n.$$childTail=r,(t||n!=this)&&r.$on("$destroy",f),r},$watch:function(e,t,n,r){var i=l(e);if(i.$$watchDelegate)return i.$$watchDelegate(this,t,n,i,e);var o=this,a=o.$$watchers,u={fn:t,last:w,get:i,exp:r||e,eq:!!n};return s=null,k(t)||(u.fn=p),a||(a=o.$$watchers=[]),a.unshift(u),$(this,1),function(){R(a,u)>=0&&$(o,-1),s=null}},$watchGroup:function(e,t){function n(){u=!1,l?(l=!1,t(o,o,s)):t(o,i,s)}var i=new Array(e.length),o=new Array(e.length),a=[],s=this,u=!1,l=!0;if(!e.length){var c=!0;return s.$evalAsync(function(){c&&t(o,o,s)}),function(){c=!1}}return 1===e.length?this.$watch(e[0],function(e,n,r){o[0]=e,i[0]=n,t(o,e===n?o:i,r)}):(r(e,function(e,t){var r=s.$watch(e,function(e,r){o[t]=e,i[t]=r,u||(u=!0,s.$evalAsync(n))});a.push(r)}),function(){for(;a.length;)a.shift()()})},$watchCollection:function(e,t){function r(e){o=e;var t,r,i,s,u;if(!m(o)){if(b(o))if(n(o)){a!==p&&(a=p,v=a.length=0,f++),t=o.length,v!==t&&(f++,a.length=v=t);for(var l=0;l<t;l++)u=a[l],s=o[l],i=u!==u&&s!==s,i||u===s||(f++,a[l]=s)}else{a!==h&&(a=h={},v=0,f++),t=0;for(r in o)Pr.call(o,r)&&(t++,s=o[r],u=a[r],r in a?(i=u!==u&&s!==s,i||u===s||(f++,a[r]=s)):(v++,a[r]=s,f++));if(v>t){f++;for(r in a)Pr.call(o,r)||(v--,delete a[r])}}else a!==o&&(a=o,f++);return f}}function i(){if(g?(g=!1,t(o,o,u)):t(o,s,u),c)if(b(o))if(n(o)){s=new Array(o.length);for(var e=0;e<o.length;e++)s[e]=o[e]}else{s={};for(var r in o)Pr.call(o,r)&&(s[r]=o[r])}else s=o}r.$stateful=!0;var o,a,s,u=this,c=t.length>1,f=0,d=l(e,r),p=[],h={},g=!0,v=0;return this.$watch(d,i)},$digest:function(){var e,n,r,a,l,f,d,p,h,m,$,b,y=i,_=this,A=[];g("$digest"),c.$$checkUrlChange(),this===S&&null!==u&&(c.defer.cancel(u),x()),s=null;do{p=!1,m=_;for(var M=0;M<E.length;M++){try{b=E[M],b.scope.$eval(b.expression,b.locals)}catch(j){t(j)}s=null}E.length=0;e:do{if(f=m.$$watchers)for(d=f.length;d--;)try{if(e=f[d])if(l=e.get,(n=l(m))===(r=e.last)||(e.eq?V(n,r):"number"==typeof n&&"number"==typeof r&&isNaN(n)&&isNaN(r))){if(e===s){p=!1;break e}}else p=!0,s=e,e.last=e.eq?U(n,null):n,a=e.fn,a(n,r===w?n:r,m),y<5&&($=4-y,A[$]||(A[$]=[]),A[$].push({msg:k(e.exp)?"fn: "+(e.exp.name||e.exp.toString()):e.exp,newVal:n,oldVal:r}))}catch(j){t(j)}if(!(h=m.$$watchersCount&&m.$$childHead||m!==_&&m.$$nextSibling))for(;m!==_&&!(h=m.$$nextSibling);)m=m.$parent}while(m=h);if((p||E.length)&&!y--)throw v(),o("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",i,A)}while(p||E.length);for(v();O<C.length;)try{C[O++]()}catch(j){t(j)}C.length=O=0},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this===S&&c.$$applicationDestroyed(),$(this,-this.$$watchersCount);for(var t in this.$$listenerCount)y(this,this.$$listenerCount[t],t);e&&e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e&&e.$$childTail==this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=p,this.$on=this.$watch=this.$watchGroup=function(){return p},this.$$listeners={},this.$$nextSibling=null,d(this)}},$eval:function(e,t){return l(e)(this,t)},$evalAsync:function(e,t){S.$$phase||E.length||c.defer(function(){E.length&&S.$digest()}),E.push({scope:this,expression:l(e),locals:t})},$$postDigest:function(e){C.push(e)},$apply:function(e){try{g("$apply");try{return this.$eval(e)}finally{v()}}catch(n){t(n)}finally{try{S.$digest()}catch(n){throw t(n),n}}},$applyAsync:function(e){function t(){n.$eval(e)}var n=this;e&&A.push(t),e=l(e),_()},$on:function(e,t){var n=this.$$listeners[e];n||(this.$$listeners[e]=n=[]),n.push(t);var r=this;do r.$$listenerCount[e]||(r.$$listenerCount[e]=0),r.$$listenerCount[e]++;while(r=r.$parent);var i=this;return function(){var r=n.indexOf(t);r!==-1&&(n[r]=null,y(i,1,e))}},$emit:function(e,n){var r,i,o,a=[],s=this,u=!1,l={name:e,targetScope:s,stopPropagation:function(){u=!0},preventDefault:function(){l.defaultPrevented=!0},defaultPrevented:!1},c=z([l],arguments,1);do{for(r=s.$$listeners[e]||a,l.currentScope=s,i=0,o=r.length;i<o;i++)if(r[i])try{r[i].apply(null,c)}catch(f){t(f)}else r.splice(i,1),i--,o--;if(u)return l.currentScope=null,l;s=s.$parent}while(s);return l.currentScope=null,l},$broadcast:function(e,n){var r=this,i=r,o=r,a={name:e,targetScope:r,preventDefault:function(){a.defaultPrevented=!0},defaultPrevented:!1};if(!r.$$listenerCount[e])return a;for(var s,u,l,c=z([a],arguments,1);i=o;){for(a.currentScope=i,s=i.$$listeners[e]||[],u=0,l=s.length;u<l;u++)if(s[u])try{s[u].apply(null,c)}catch(f){t(f)}else s.splice(u,1),u--,l--;if(!(o=i.$$listenerCount[e]&&i.$$childHead||i!==r&&i.$$nextSibling))for(;i!==r&&!(o=i.$$nextSibling);)i=i.$parent}return a.currentScope=null,a}};var S=new h,E=S.$$asyncQueue=[],C=S.$$postDigestQueue=[],A=S.$$applyAsyncQueue=[],O=0;return S}]}function Sn(){var e=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return $(t)?(e=t,this):e},this.imgSrcSanitizationWhitelist=function(e){return $(e)?(t=e,this):t},this.$get=function(){return function(n,r){var i,o=r?t:e;return i=Dn(n).href,""===i||i.match(o)?n:"unsafe:"+i}}}function En(e){if("self"===e)return e;if(w(e)){if(e.indexOf("***")>-1)throw xo("iwcard","Illegal sequence *** in string matcher. String: {0}",e);return e=Jr(e).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+e+"$")}if(S(e))return new RegExp("^"+e.source+"$");throw xo("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Cn(e){var t=[];return $(e)&&r(e,function(e){t.push(En(e))}),t}function An(){this.SCE_CONTEXTS=_o;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=Cn(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=Cn(e)),t},this.$get=["$injector",function(n){function r(e,t){return"self"===e?Fn(t):!!e.exec(t.href)}function i(n){var i,o,a=Dn(n.toString()),s=!1;for(i=0,o=e.length;i<o;i++)if(r(e[i],a)){s=!0;break}if(s)for(i=0,o=t.length;i<o;i++)if(r(t[i],a)){s=!1;break}return s}function o(e){var t=function(e){this.$$unwrapTrustedValue=function(){return e}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}function a(e,t){var n=f.hasOwnProperty(e)?f[e]:null;if(!n)throw xo("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||m(t)||""===t)return t;if("string"!=typeof t)throw xo("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new n(t)}function s(e){return e instanceof c?e.$$unwrapTrustedValue():e}function u(e,t){if(null===t||m(t)||""===t)return t;var n=f.hasOwnProperty(e)?f[e]:null;if(n&&t instanceof n)return t.$$unwrapTrustedValue();if(e===_o.RESOURCE_URL){if(i(t))return t;throw xo("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",t.toString())}if(e===_o.HTML)return l(t);throw xo("unsafe","Attempting to use an unsafe value in a safe context.")}var l=function(e){throw xo("unsafe","Attempting to use an unsafe value in a safe context.")};n.has("$sanitize")&&(l=n.get("$sanitize"));var c=o(),f={};return f[_o.HTML]=o(c),f[_o.CSS]=o(c),f[_o.URL]=o(c),f[_o.JS]=o(c),f[_o.RESOURCE_URL]=o(f[_o.URL]),{trustAs:a,getTrusted:u,valueOf:s}}]}function On(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$sceDelegate",function(t,n){if(e&&Ir<8)throw xo("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var i=ve(_o);i.isEnabled=function(){return e},i.trustAs=n.trustAs,i.getTrusted=n.getTrusted,i.valueOf=n.valueOf,e||(i.trustAs=i.getTrusted=function(e,t){return t},i.valueOf=h),i.parseAs=function(e,n){var r=t(n);return r.literal&&r.constant?r:t(n,function(t){return i.getTrusted(e,t)})};var o=i.parseAs,a=i.getTrusted,s=i.trustAs;return r(_o,function(e,t){var n=Tr(t);i[we("parse_as_"+n)]=function(t){return o(e,t)},i[we("get_trusted_"+n)]=function(t){return a(e,t)},i[we("trust_as_"+n)]=function(t){return s(e,t)}}),i}]}function Mn(){this.$get=["$window","$document",function(e,t){var n,r,i={},o=e.chrome&&e.chrome.app&&e.chrome.app.runtime,a=!o&&e.history&&e.history.pushState,s=f((/android (\d+)/.exec(Tr((e.navigator||{}).userAgent))||[])[1]),u=/Boxee/i.test((e.navigator||{}).userAgent),l=t[0]||{},c=/^(Moz|webkit|ms)(?=[A-Z])/,d=l.body&&l.body.style,p=!1,h=!1;if(d){for(var g in d)if(r=c.exec(g)){n=r[0],n=n[0].toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in d&&"webkit"),p=!!("transition"in d||n+"Transition"in d),h=!!("animation"in d||n+"Animation"in d),!s||p&&h||(p=w(d.webkitTransition),h=w(d.webkitAnimation))}return{history:!(!a||s<4||u),hasEvent:function(e){if("input"===e&&Ir<=11)return!1;if(m(i[e])){var t=l.createElement("div");i[e]="on"+e in t}return i[e]},csp:Qr(),vendorPrefix:n,transitions:p,animations:h,android:s}}]}function jn(){var e;this.httpOptions=function(t){return t?(e=t,this):e},this.$get=["$templateCache","$http","$q","$sce",function(t,n,r,i){function o(a,s){function u(e){if(!s)throw ko("tpload","Failed to load template: {0} (HTTP status: {1} {2})",a,e.status,e.statusText);return r.reject(e)}o.totalPendingRequests++,w(a)&&!m(t.get(a))||(a=i.getTrustedResourceUrl(a));var c=n.defaults&&n.defaults.transformResponse;return Kr(c)?c=c.filter(function(e){return e!==Et}):c===Et&&(c=null),n.get(a,l({cache:t,transformResponse:c},e))["finally"](function(){o.totalPendingRequests--}).then(function(e){return t.put(a,e.data),e.data},u)}return o.totalPendingRequests=0,o}]}function Pn(){this.$get=["$rootScope","$browser","$location",function(e,t,n){var i={};return i.findBindings=function(e,t,n){var i=e.getElementsByClassName("ng-binding"),o=[];return r(i,function(e){var i=Gr.element(e).data("$binding");i&&r(i,function(r){if(n){var i=new RegExp("(^|\\s)"+Jr(t)+"(\\s|\\||$)");i.test(r)&&o.push(e)}else r.indexOf(t)!=-1&&o.push(e)})}),o},i.findModels=function(e,t,n){for(var r=["ng-","data-ng-","ng\\:"],i=0;i<r.length;++i){var o=n?"=":"*=",a="["+r[i]+"model"+o+'"'+t+'"]',s=e.querySelectorAll(a);if(s.length)return s}},i.getLocation=function(){return n.url()},i.setLocation=function(t){t!==n.url()&&(n.url(t),e.$digest())},i.whenStable=function(e){t.notifyWhenNoOutstandingRequests(e)},i}]}function Tn(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(e,t,n,r,i){function o(o,s,u){k(o)||(u=s,s=o,o=p);var l,c=L(arguments,3),f=$(u)&&!u,d=(f?r:n).defer(),h=d.promise;return l=t.defer(function(){try{d.resolve(o.apply(null,c))}catch(t){d.reject(t),i(t)}finally{delete a[h.$$timeoutId]}f||e.$apply()},s),h.$$timeoutId=l,a[l]=d,h}var a={};return o.cancel=function(e){return!!(e&&e.$$timeoutId in a)&&(a[e.$$timeoutId].reject("canceled"),delete a[e.$$timeoutId],t.defer.cancel(e.$$timeoutId))},o}]}function Dn(e){var t=e;return Ir&&(So.setAttribute("href",t),t=So.href),So.setAttribute("href",t),{href:So.href,protocol:So.protocol?So.protocol.replace(/:$/,""):"",host:So.host,search:So.search?So.search.replace(/^\?/,""):"",hash:So.hash?So.hash.replace(/^#/,""):"",hostname:So.hostname,port:So.port,pathname:"/"===So.pathname.charAt(0)?So.pathname:"/"+So.pathname}}function Fn(e){var t=w(e)?Dn(e):e;return t.protocol===Eo.protocol&&t.host===Eo.host}function Nn(){this.$get=g(e)}function In(e){function t(e){try{return decodeURIComponent(e)}catch(t){return e}}var n=e[0]||{},r={},i="";return function(){var e,o,a,s,u,l=n.cookie||"";if(l!==i)for(i=l,e=i.split("; "),r={},a=0;a<e.length;a++)o=e[a],s=o.indexOf("="),s>0&&(u=t(o.substring(0,s)),m(r[u])&&(r[u]=t(o.substring(s+1))));return r}}function Rn(){this.$get=In}function Un(e){function t(i,o){if(b(i)){var a={};return r(i,function(e,n){a[n]=t(n,e)}),a}return e.factory(i+n,o)}var n="Filter";this.register=t,this.$get=["$injector",function(e){return function(t){return e.get(t+n)}}],t("currency",Hn),t("date",or),t("filter",Vn),t("json",ar),t("limitTo",sr),t("lowercase",To),t("number",Bn),t("orderBy",lr),t("uppercase",Do)}function Vn(){return function(e,r,i,o){if(!n(e)){if(null==e)return e;throw t("filter")("notarray","Expected array but received: {0}",e)}o=o||"$";var a,s,u=qn(r);switch(u){case"function":a=r;break;case"boolean":case"null":case"number":case"string":s=!0;case"object":a=zn(r,i,o,s);break;default:return e}return Array.prototype.filter.call(e,a)}}function zn(e,t,n,r){var i,o=b(e)&&n in e;return t===!0?t=V:k(t)||(t=function(e,t){return!m(e)&&(null===e||null===t?e===t:!(b(t)||b(e)&&!v(e))&&(e=Tr(""+e),t=Tr(""+t),e.indexOf(t)!==-1))}),i=function(i){return o&&!b(i)?Ln(i,e[n],t,n,!1):Ln(i,e,t,n,r)}}function Ln(e,t,n,r,i,o){var a=qn(e),s=qn(t);if("string"===s&&"!"===t.charAt(0))return!Ln(e,t.substring(1),n,r,i);if(Kr(e))return e.some(function(e){return Ln(e,t,n,r,i)});switch(a){case"object":var u;if(i){for(u in e)if("$"!==u.charAt(0)&&Ln(e[u],t,n,r,!0))return!0;return!o&&Ln(e,t,n,r,!1)}if("object"===s){for(u in t){var l=t[u];if(!k(l)&&!m(l)){var c=u===r,f=c?e:e[u];if(!Ln(f,l,n,r,c,c))return!1}}return!0}return n(e,t);case"function":return!1;default:return n(e,t)}}function qn(e){return null===e?"null":typeof e}function Hn(e){var t=e.NUMBER_FORMATS;return function(e,n,r){return m(n)&&(n=t.CURRENCY_SYM),m(r)&&(r=t.PATTERNS[1].maxFrac),null==e?e:Xn(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,r).replace(/\u00A4/g,n)}}function Bn(e){var t=e.NUMBER_FORMATS;return function(e,n){return null==e?e:Xn(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function Wn(e){var t,n,r,i,o,a=0;for((n=e.indexOf(Ao))>-1&&(e=e.replace(Ao,"")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;e.charAt(r)==Oo;r++);if(r==(o=e.length))t=[0],n=1;else{for(o--;e.charAt(o)==Oo;)o--;for(n-=r,t=[],i=0;r<=o;r++,i++)t[i]=+e.charAt(r)}return n>Co&&(t=t.splice(0,Co-1),a=n-1,n=1),{d:t,e:a,i:n}}function Gn(e,t,n,r){var i=e.d,o=i.length-e.i;t=m(t)?Math.min(Math.max(n,o),r):+t;var a=t+e.i,s=i[a];if(a>0){i.splice(Math.max(e.i,a));for(var u=a;u<i.length;u++)i[u]=0}else{o=Math.max(0,o),e.i=1,i.length=Math.max(1,a=t+1),i[0]=0;for(var l=1;l<a;l++)i[l]=0}if(s>=5)if(a-1<0){for(var c=0;c>a;c--)i.unshift(0),e.i++;i.unshift(1),e.i++}else i[a-1]++;for(;o<Math.max(0,t);o++)i.push(0);var f=i.reduceRight(function(e,t,n,r){return t+=e,r[n]=t%10,Math.floor(t/10)},0);f&&(i.unshift(f),e.i++)}function Xn(e,t,n,r,i){if(!w(e)&&!x(e)||isNaN(e))return"";var o,a=!isFinite(e),s=!1,u=Math.abs(e)+"",l="";if(a)l="∞";else{o=Wn(u),Gn(o,i,t.minFrac,t.maxFrac);var c=o.d,f=o.i,d=o.e,p=[];for(s=c.reduce(function(e,t){return e&&!t},!0);f<0;)c.unshift(0),f++;f>0?p=c.splice(f,c.length):(p=c,c=[0]);var h=[];for(c.length>=t.lgSize&&h.unshift(c.splice(-t.lgSize,c.length).join(""));c.length>t.gSize;)h.unshift(c.splice(-t.gSize,c.length).join(""));c.length&&h.unshift(c.join("")),l=h.join(n),p.length&&(l+=r+p.join("")),d&&(l+="e+"+d)}return e<0&&!s?t.negPre+l+t.negSuf:t.posPre+l+t.posSuf}function Kn(e,t,n,r){var i="";for((e<0||r&&e<=0)&&(r?e=-e+1:(e=-e,i="-")),e=""+e;e.length<t;)e=Oo+e;return n&&(e=e.substr(e.length-t)),i+e}function Yn(e,t,n,r,i){return n=n||0,function(o){var a=o["get"+e]();return(n>0||a>-n)&&(a+=n),0===a&&n==-12&&(a=12),Kn(a,t,r,i)}}function Zn(e,t,n){return function(r,i){var o=r["get"+e](),a=(n?"STANDALONE":"")+(t?"SHORT":""),s=Dr(a+e);return i[s][o]}}function Jn(e,t,n){var r=-1*n,i=r>=0?"+":"";return i+=Kn(Math[r>0?"floor":"ceil"](r/60),2)+Kn(Math.abs(r%60),2)}function Qn(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(t<=4?5:12)-t)}function er(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function tr(e){return function(t){var n=Qn(t.getFullYear()),r=er(t),i=+r-+n,o=1+Math.round(i/6048e5);return Kn(o,e)}}function nr(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function rr(e,t){return e.getFullYear()<=0?t.ERAS[0]:t.ERAS[1]}function ir(e,t){return e.getFullYear()<=0?t.ERANAMES[0]:t.ERANAMES[1]}function or(e){function t(e){var t;if(t=e.match(n)){var r=new Date(0),i=0,o=0,a=t[8]?r.setUTCFullYear:r.setFullYear,s=t[8]?r.setUTCHours:r.setHours;t[9]&&(i=f(t[9]+t[10]),o=f(t[9]+t[11])),a.call(r,f(t[1]),f(t[2])-1,f(t[3]));var u=f(t[4]||0)-i,l=f(t[5]||0)-o,c=f(t[6]||0),d=Math.round(1e3*parseFloat("0."+(t[7]||0)));return s.call(r,u,l,c,d),r}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,i,o){var a,s,u="",l=[];if(i=i||"mediumDate",i=e.DATETIME_FORMATS[i]||i,w(n)&&(n=Po.test(n)?f(n):t(n)),x(n)&&(n=new Date(n)),!_(n)||!isFinite(n.getTime()))return n;for(;i;)s=jo.exec(i),s?(l=z(l,s,1),i=l.pop()):(l.push(i),i=null);var c=n.getTimezoneOffset();return o&&(c=G(o,c),n=K(n,o,!0)),r(l,function(t){a=Mo[t],u+=a?a(n,e.DATETIME_FORMATS,c):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),u}}function ar(){return function(e,t){return m(t)&&(t=2),B(e,t)}}function sr(){return function(e,t,r){return t=Math.abs(Number(t))===1/0?Number(t):f(t),isNaN(t)?e:(x(e)&&(e=e.toString()),n(e)?(r=!r||isNaN(r)?0:f(r),r=r<0?Math.max(0,e.length+r):r,t>=0?ur(e,r,r+t):0===r?ur(e,t,e.length):ur(e,Math.max(0,r+t),r)):e)}}function ur(e,t,n){return w(e)?e.slice(t,n):zr.call(e,t,n)}function lr(e){function r(t){return t.map(function(t){var n=1,r=h;if(k(t))r=t;else if(w(t)&&("+"!=t.charAt(0)&&"-"!=t.charAt(0)||(n="-"==t.charAt(0)?-1:1,t=t.substring(1)),""!==t&&(r=e(t),r.constant))){var i=r();r=function(e){return e[i]}}return{get:r,descending:n}})}function i(e){switch(typeof e){case"number":case"boolean":case"string":return!0;default:return!1}}function o(e){return k(e.valueOf)&&(e=e.valueOf(),i(e))?e:v(e)&&(e=e.toString(),i(e))?e:e}function a(e,t){var n=typeof e;return null===e?(n="string",e="null"):"object"===n&&(e=o(e)),{value:e,type:n,index:t}}function s(e,t){var n=0,r=e.type,i=t.type;if(r===i){var o=e.value,a=t.value;"string"===r?(o=o.toLowerCase(),a=a.toLowerCase()):"object"===r&&(b(o)&&(o=e.index),b(a)&&(a=t.index)),o!==a&&(n=o<a?-1:1)}else n=r<i?-1:1;return n}return function(e,i,o,u){function l(e,t){return{value:e,tieBreaker:{value:t,type:"number",index:t},predicateValues:f.map(function(n){return a(n.get(e),t)})}}function c(e,t){for(var n=0,r=f.length;n<r;n++){var i=p(e.predicateValues[n],t.predicateValues[n]);if(i)return i*f[n].descending*d}return p(e.tieBreaker,t.tieBreaker)*d}if(null==e)return e;if(!n(e))throw t("orderBy")("notarray","Expected array but received: {0}",e);Kr(i)||(i=[i]),0===i.length&&(i=["+"]);var f=r(i),d=o?-1:1,p=k(u)?u:s,h=Array.prototype.map.call(e,l);return h.sort(c),e=h.map(function(e){return e.value})}}function cr(e){return k(e)&&(e={link:e}),e.restrict=e.restrict||"AC",g(e)}function fr(e,t){e.$name=t}function dr(e,t,n,i,o){var a=this,s=[];a.$error={},a.$$success={},a.$pending=void 0,a.$name=o(t.name||t.ngForm||"")(n),a.$dirty=!1,a.$pristine=!0,a.$valid=!0,a.$invalid=!1,a.$submitted=!1,a.$$parentForm=Io,a.$rollbackViewValue=function(){r(s,function(e){e.$rollbackViewValue()})},a.$commitViewValue=function(){r(s,function(e){e.$commitViewValue()})},a.$addControl=function(e){fe(e.$name,"input"),s.push(e),e.$name&&(a[e.$name]=e),e.$$parentForm=a},a.$$renameControl=function(e,t){var n=e.$name;a[n]===e&&delete a[n],a[t]=e,e.$name=t},a.$removeControl=function(e){e.$name&&a[e.$name]===e&&delete a[e.$name],r(a.$pending,function(t,n){a.$setValidity(n,null,e)}),r(a.$error,function(t,n){a.$setValidity(n,null,e)}),r(a.$$success,function(t,n){a.$setValidity(n,null,e)}),R(s,e),e.$$parentForm=Io},Cr({ctrl:this,$element:e,set:function(e,t,n){var r=e[t];if(r){var i=r.indexOf(n);i===-1&&r.push(n)}else e[t]=[n]},unset:function(e,t,n){var r=e[t];r&&(R(r,n),0===r.length&&delete e[t])},$animate:i}),a.$setDirty=function(){i.removeClass(e,wa),i.addClass(e,xa),a.$dirty=!0,a.$pristine=!1,a.$$parentForm.$setDirty()},a.$setPristine=function(){i.setClass(e,wa,xa+" "+Ro),a.$dirty=!1,a.$pristine=!0,a.$submitted=!1,r(s,function(e){e.$setPristine()})},a.$setUntouched=function(){r(s,function(e){e.$setUntouched()})},a.$setSubmitted=function(){i.addClass(e,Ro),a.$submitted=!0,a.$$parentForm.$setSubmitted()}}function pr(e){e.$formatters.push(function(t){return e.$isEmpty(t)?t:t.toString()})}function hr(e,t,n,r,i,o){gr(e,t,n,r,i,o),pr(r)}function gr(e,t,n,r,i,o){var a=Tr(t[0].type);if(!i.android){var s=!1;t.on("compositionstart",function(){s=!0}),t.on("compositionend",function(){s=!1,l()})}var u,l=function(e){if(u&&(o.defer.cancel(u),u=null),!s){var i=t.val(),l=e&&e.type;"password"===a||n.ngTrim&&"false"===n.ngTrim||(i=Zr(i)),(r.$viewValue!==i||""===i&&r.$$hasNativeValidators)&&r.$setViewValue(i,l)}};if(i.hasEvent("input"))t.on("input",l);else{var c=function(e,t,n){u||(u=o.defer(function(){u=null,t&&t.value===n||l(e)}))};t.on("keydown",function(e){var t=e.keyCode;91===t||15<t&&t<19||37<=t&&t<=40||c(e,this,this.value)}),i.hasEvent("paste")&&t.on("paste cut",c)}t.on("change",l),Jo[a]&&r.$$hasNativeValidators&&a===n.type&&t.on(Zo,function(e){if(!u){var t=this[jr],n=t.badInput,r=t.typeMismatch;u=o.defer(function(){u=null,t.badInput===n&&t.typeMismatch===r||l(e)})}}),r.$render=function(){var e=r.$isEmpty(r.$viewValue)?"":r.$viewValue;t.val()!==e&&t.val(e)}}function vr(e,t){if(_(e))return e;if(w(e)){Xo.lastIndex=0;var n=Xo.exec(e);if(n){var r=+n[1],i=+n[2],o=0,a=0,s=0,u=0,l=Qn(r),c=7*(i-1);return t&&(o=t.getHours(),a=t.getMinutes(),s=t.getSeconds(),u=t.getMilliseconds()),new Date(r,0,l.getDate()+c,o,a,s,u)}}return NaN}function mr(e,t){return function(n,i){var o,a;if(_(n))return n;if(w(n)){if('"'==n.charAt(0)&&'"'==n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),Lo.test(n))return new Date(n);if(e.lastIndex=0,o=e.exec(n))return o.shift(),a=i?{yyyy:i.getFullYear(),MM:i.getMonth()+1,dd:i.getDate(),HH:i.getHours(),mm:i.getMinutes(),ss:i.getSeconds(),sss:i.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},r(o,function(e,n){n<t.length&&(a[t[n]]=+e)}),new Date(a.yyyy,a.MM-1,a.dd,a.HH,a.mm,a.ss||0,1e3*a.sss||0)}return NaN}}function $r(e,t,n,r){return function(i,o,a,s,u,l,c){function f(e){return e&&!(e.getTime&&e.getTime()!==e.getTime())}function d(e){return $(e)&&!_(e)?n(e)||void 0:e}br(i,o,a,s),gr(i,o,a,s,u,l);var p,h=s&&s.$options&&s.$options.timezone;if(s.$$parserName=e,s.$parsers.push(function(e){if(s.$isEmpty(e))return null;if(t.test(e)){var r=n(e,p);return h&&(r=K(r,h)),r}}),s.$formatters.push(function(e){if(e&&!_(e))throw Aa("datefmt","Expected `{0}` to be a date",e);return f(e)?(p=e,p&&h&&(p=K(p,h,!0)),c("date")(e,r,h)):(p=null,"")}),$(a.min)||a.ngMin){var g;s.$validators.min=function(e){return!f(e)||m(g)||n(e)>=g},a.$observe("min",function(e){g=d(e),s.$validate()})}if($(a.max)||a.ngMax){var v;s.$validators.max=function(e){return!f(e)||m(v)||n(e)<=v},a.$observe("max",function(e){v=d(e),s.$validate()})}}}function br(e,t,n,r){var i=t[0],o=r.$$hasNativeValidators=b(i.validity);o&&r.$parsers.push(function(e){var n=t.prop(jr)||{};return n.badInput||n.typeMismatch?void 0:e})}function yr(e,t,n,r,i,o){if(br(e,t,n,r),gr(e,t,n,r,i,o),r.$$parserName="number",r.$parsers.push(function(e){return r.$isEmpty(e)?null:Bo.test(e)?parseFloat(e):void 0}),r.$formatters.push(function(e){if(!r.$isEmpty(e)){if(!x(e))throw Aa("numfmt","Expected `{0}` to be a number",e);e=e.toString()}return e}),$(n.min)||n.ngMin){var a;r.$validators.min=function(e){return r.$isEmpty(e)||m(a)||e>=a},n.$observe("min",function(e){$(e)&&!x(e)&&(e=parseFloat(e)),a=x(e)&&!isNaN(e)?e:void 0,r.$validate()})}if($(n.max)||n.ngMax){var s;r.$validators.max=function(e){return r.$isEmpty(e)||m(s)||e<=s},n.$observe("max",function(e){$(e)&&!x(e)&&(e=parseFloat(e)),s=x(e)&&!isNaN(e)?e:void 0,r.$validate()})}}function wr(e,t,n,r,i,o){gr(e,t,n,r,i,o),pr(r),r.$$parserName="url",r.$validators.url=function(e,t){var n=e||t;return r.$isEmpty(n)||qo.test(n)}}function xr(e,t,n,r,i,o){gr(e,t,n,r,i,o),pr(r),r.$$parserName="email",r.$validators.email=function(e,t){var n=e||t;return r.$isEmpty(n)||Ho.test(n)}}function _r(e,t,n,r){m(n.name)&&t.attr("name",a());var i=function(e){t[0].checked&&r.$setViewValue(n.value,e&&e.type)};t.on("click",i),r.$render=function(){var e=n.value;t[0].checked=e==r.$viewValue},n.$observe("value",r.$render)}function kr(e,t,n,r,i){var o;if($(r)){if(o=e(r),!o.constant)throw Aa("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,r);return o(t)}return i}function Sr(e,t,n,r,i,o,a,s){var u=kr(s,e,"ngTrueValue",n.ngTrueValue,!0),l=kr(s,e,"ngFalseValue",n.ngFalseValue,!1),c=function(e){r.$setViewValue(t[0].checked,e&&e.type)};t.on("click",c),r.$render=function(){t[0].checked=r.$viewValue},r.$isEmpty=function(e){return e===!1},r.$formatters.push(function(e){return V(e,u)}),r.$parsers.push(function(e){return e?u:l})}function Er(e,t){return e="ngClass"+e,["$animate",function(n){function i(e,t){var n=[];e:for(var r=0;r<e.length;r++){for(var i=e[r],o=0;o<t.length;o++)if(i==t[o])continue e;n.push(i)}return n}function o(e){var t=[];return Kr(e)?(r(e,function(e){t=t.concat(o(e))}),t):w(e)?e.split(" "):b(e)?(r(e,function(e,n){e&&(t=t.concat(n.split(" ")))}),t):e}return{restrict:"AC",link:function(a,s,u){function l(e){var t=f(e,1);u.$addClass(t)}function c(e){var t=f(e,-1);u.$removeClass(t)}function f(e,t){var n=s.data("$classCounts")||he(),i=[];return r(e,function(e){(t>0||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(t>0)&&i.push(e))}),s.data("$classCounts",n),i.join(" ")}function d(e,t){var r=i(t,e),o=i(e,t);r=f(r,1),o=f(o,-1),r&&r.length&&n.addClass(s,r),o&&o.length&&n.removeClass(s,o)}function p(e){if(t===!0||(1&a.$index)===t){var n=o(e||[]);if(h){if(!V(e,h)){var r=o(h);d(r,n)}}else l(n)}h=Kr(e)?e.map(function(e){return ve(e)}):ve(e)}var h;a.$watch(u[e],p,!0),u.$observe("class",function(t){p(a.$eval(u[e]))}),"ngClass"!==e&&a.$watch("$index",function(n,r){var i=1&n;if(i!==(1&r)){var s=o(a.$eval(u[e]));i===t?l(s):c(s)}})}}}]}function Cr(e){function t(e,t,s){m(t)?n("$pending",e,s):r("$pending",e,s),j(t)?t?(c(a.$error,e,s),l(a.$$success,e,s)):(l(a.$error,e,s),c(a.$$success,e,s)):(c(a.$error,e,s),c(a.$$success,e,s)),a.$pending?(i(Sa,!0),a.$valid=a.$invalid=void 0,o("",null)):(i(Sa,!1),a.$valid=Ar(a.$error),a.$invalid=!a.$valid,o("",a.$valid));var u;u=a.$pending&&a.$pending[e]?void 0:!a.$error[e]&&(!!a.$$success[e]||null),o(e,u),a.$$parentForm.$setValidity(e,u,a)}function n(e,t,n){a[e]||(a[e]={}),l(a[e],t,n)}function r(e,t,n){a[e]&&c(a[e],t,n),Ar(a[e])&&(a[e]=void 0)}function i(e,t){t&&!u[e]?(f.addClass(s,e),u[e]=!0):!t&&u[e]&&(f.removeClass(s,e),u[e]=!1)}function o(e,t){e=e?"-"+se(e,"-"):"",i(ba+e,t===!0),i(ya+e,t===!1)}var a=e.ctrl,s=e.$element,u={},l=e.set,c=e.unset,f=e.$animate;u[ya]=!(u[ba]=s.hasClass(ba)),a.$setValidity=t}function Ar(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function Or(e){e[0].hasAttribute("selected")&&(e[0].selected=!0)}var Mr=/^\/(.+)\/([a-z]*)$/,jr="validity",Pr=Object.prototype.hasOwnProperty,Tr=function(e){return w(e)?e.toLowerCase():e},Dr=function(e){return w(e)?e.toUpperCase():e},Fr=function(e){return w(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},Nr=function(e){return w(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(e.charCodeAt(0)&-33)}):e};"i"!=="I".toLowerCase()&&(Tr=Fr,Dr=Nr);var Ir,Rr,Ur,Vr,zr=[].slice,Lr=[].splice,qr=[].push,Hr=Object.prototype.toString,Br=Object.getPrototypeOf,Wr=t("ng"),Gr=e.angular||(e.angular={}),Xr=0;Ir=e.document.documentMode,p.$inject=[],h.$inject=[];var Kr=Array.isArray,Yr=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,Zr=function(e){return w(e)?e.trim():e;
6
+ },Jr=function(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Qr=function(){function t(){try{return new Function(""),!1}catch(e){return!0}}if(!$(Qr.rules)){var n=e.document.querySelector("[ng-csp]")||e.document.querySelector("[data-ng-csp]");if(n){var r=n.getAttribute("ng-csp")||n.getAttribute("data-ng-csp");Qr.rules={noUnsafeEval:!r||r.indexOf("no-unsafe-eval")!==-1,noInlineStyle:!r||r.indexOf("no-inline-style")!==-1}}else Qr.rules={noUnsafeEval:t(),noInlineStyle:!1}}return Qr.rules},ei=function(){if($(ei.name_))return ei.name_;var t,n,r,i,o=ni.length;for(n=0;n<o;++n)if(r=ni[n],t=e.document.querySelector("["+r.replace(":","\\:")+"jq]")){i=t.getAttribute(r+"jq");break}return ei.name_=i},ti=/:/g,ni=["ng-","data-ng-","ng:","x-ng-"],ri=/[A-Z]/g,ii=!1,oi=1,ai=2,si=3,ui=8,li=9,ci=11,fi={full:"1.5.8",major:1,minor:5,dot:8,codeName:"arbitrary-fallbacks"};Oe.expando="ng339";var di=Oe.cache={},pi=1,hi=function(e,t,n){e.addEventListener(t,n,!1)},gi=function(e,t,n){e.removeEventListener(t,n,!1)};Oe._data=function(e){return this.cache[e[this.expando]]||{}};var vi=/([\:\-\_]+(.))/g,mi=/^moz([A-Z])/,$i={mouseleave:"mouseout",mouseenter:"mouseover"},bi=t("jqLite"),yi=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,wi=/<|&#?\w+;/,xi=/<([\w:-]+)/,_i=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ki={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ki.optgroup=ki.option,ki.tbody=ki.tfoot=ki.colgroup=ki.caption=ki.thead,ki.th=ki.td;var Si=e.Node.prototype.contains||function(e){return!!(16&this.compareDocumentPosition(e))},Ei=Oe.prototype={ready:function(t){function n(){r||(r=!0,t())}var r=!1;"complete"===e.document.readyState?e.setTimeout(n):(this.on("DOMContentLoaded",n),Oe(e).on("load",n))},toString:function(){var e=[];return r(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return Rr(e>=0?this[e]:this[this.length+e])},length:0,push:qr,sort:[].sort,splice:[].splice},Ci={};r("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){Ci[Tr(e)]=e});var Ai={};r("input,select,option,textarea,button,form,details".split(","),function(e){Ai[e]=!0});var Oi={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};r({data:Fe,removeData:Te,hasData:ke,cleanData:Se},function(e,t){Oe[t]=e}),r({data:Fe,inheritedData:ze,scope:function(e){return Rr.data(e,"$scope")||ze(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return Rr.data(e,"$isolateScope")||Rr.data(e,"$isolateScopeNoTemplate")},controller:Ve,injector:function(e){return ze(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:Ne,css:function(e,t,n){return t=we(t),$(n)?void(e.style[t]=n):e.style[t]},attr:function(e,t,n){var r=e.nodeType;if(r!==si&&r!==ai&&r!==ui){var i=Tr(t);if(Ci[i]){if(!$(n))return e[t]||(e.attributes.getNamedItem(t)||p).specified?i:void 0;n?(e[t]=!0,e.setAttribute(t,i)):(e[t]=!1,e.removeAttribute(i))}else if($(n))e.setAttribute(t,n);else if(e.getAttribute){var o=e.getAttribute(t,2);return null===o?void 0:o}}},prop:function(e,t,n){return $(n)?void(e[t]=n):e[t]},text:function(){function e(e,t){if(m(t)){var n=e.nodeType;return n===oi||n===si?e.textContent:""}e.textContent=t}return e.$dv="",e}(),val:function(e,t){if(m(t)){if(e.multiple&&"select"===I(e)){var n=[];return r(e.options,function(e){e.selected&&n.push(e.value||e.text)}),0===n.length?null:n}return e.value}e.value=t},html:function(e,t){return m(t)?e.innerHTML:(je(e,!0),void(e.innerHTML=t))},empty:Le},function(e,t){Oe.prototype[t]=function(t,n){var r,i,o=this.length;if(e!==Le&&m(2==e.length&&e!==Ne&&e!==Ve?t:n)){if(b(t)){for(r=0;r<o;r++)if(e===Fe)e(this[r],t);else for(i in t)e(this[r],i,t[i]);return this}for(var a=e.$dv,s=m(a)?Math.min(o,1):o,u=0;u<s;u++){var l=e(this[u],t,n);a=a?a+l:l}return a}for(r=0;r<o;r++)e(this[r],t,n);return this}}),r({removeData:Te,on:function(e,t,n,r){if($(r))throw bi("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(_e(e)){var i=De(e,!0),o=i.events,a=i.handle;a||(a=i.handle=Ge(e,o));for(var s=t.indexOf(" ")>=0?t.split(" "):[t],u=s.length,l=function(t,r,i){var s=o[t];s||(s=o[t]=[],s.specialHandlerWrapper=r,"$destroy"===t||i||hi(e,t,a)),s.push(n)};u--;)t=s[u],$i[t]?(l($i[t],Ke),l(t,void 0,!0)):l(t)}},off:Pe,one:function(e,t,n){e=Rr(e),e.on(t,function r(){e.off(t,n),e.off(t,r)}),e.on(t,n)},replaceWith:function(e,t){var n,i=e.parentNode;je(e),r(new Oe(t),function(t){n?i.insertBefore(t,n.nextSibling):i.replaceChild(t,e),n=t})},children:function(e){var t=[];return r(e.childNodes,function(e){e.nodeType===oi&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var n=e.nodeType;if(n===oi||n===ci){t=new Oe(t);for(var r=0,i=t.length;r<i;r++){var o=t[r];e.appendChild(o)}}},prepend:function(e,t){if(e.nodeType===oi){var n=e.firstChild;r(new Oe(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){Ae(e,Rr(t).eq(0).clone()[0])},remove:qe,detach:function(e){qe(e,!0)},after:function(e,t){var n=e,r=e.parentNode;t=new Oe(t);for(var i=0,o=t.length;i<o;i++){var a=t[i];r.insertBefore(a,n.nextSibling),n=a}},addClass:Re,removeClass:Ie,toggleClass:function(e,t,n){t&&r(t.split(" "),function(t){var r=n;m(r)&&(r=!Ne(e,t)),(r?Re:Ie)(e,t)})},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==ci?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:Me,triggerHandler:function(e,t,n){var i,o,a,s=t.type||t,u=De(e),c=u&&u.events,f=c&&c[s];f&&(i={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:p,type:s,target:e},t.type&&(i=l(i,t)),o=ve(f),a=n?[i].concat(n):[i],r(o,function(t){i.isImmediatePropagationStopped()||t.apply(e,a)}))}},function(e,t){Oe.prototype[t]=function(t,n,r){for(var i,o=0,a=this.length;o<a;o++)m(i)?(i=e(this[o],t,n,r),$(i)&&(i=Rr(i))):Ue(i,e(this[o],t,n,r));return $(i)?i:this},Oe.prototype.bind=Oe.prototype.on,Oe.prototype.unbind=Oe.prototype.off}),Je.prototype={put:function(e,t){this[Ze(e,this.nextUid)]=t},get:function(e){return this[Ze(e,this.nextUid)]},remove:function(e){var t=this[e=Ze(e,this.nextUid)];return delete this[e],t}};var Mi=[function(){this.$get=[function(){return Je}]}],ji=/^([^\(]+?)=>/,Pi=/^[^\(]*\(\s*([^\)]*)\)/m,Ti=/,/,Di=/^\s*(_?)(\S+?)\1\s*$/,Fi=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Ni=t("$injector");rt.$$annotate=nt;var Ii=t("$animate"),Ri=1,Ui="ng-animate",Vi=function(){this.$get=p},zi=function(){var e=new Je,t=[];this.$get=["$$AnimateRunner","$rootScope",function(n,i){function o(e,t,n){var i=!1;return t&&(t=w(t)?t.split(" "):Kr(t)?t:[],r(t,function(t){t&&(i=!0,e[t]=n)})),i}function a(){r(t,function(t){var n=e.get(t);if(n){var i=st(t.attr("class")),o="",a="";r(n,function(e,t){var n=!!i[t];e!==n&&(e?o+=(o.length?" ":"")+t:a+=(a.length?" ":"")+t)}),r(t,function(e){o&&Re(e,o),a&&Ie(e,a)}),e.remove(t)}}),t.length=0}function s(n,r,s){var u=e.get(n)||{},l=o(u,r,!0),c=o(u,s,!1);(l||c)&&(e.put(n,u),t.push(n),1===t.length&&i.$$postDigest(a))}return{enabled:p,on:p,off:p,pin:p,push:function(e,t,r,i){i&&i(),r=r||{},r.from&&e.css(r.from),r.to&&e.css(r.to),(r.addClass||r.removeClass)&&s(e,r.addClass,r.removeClass);var o=new n;return o.complete(),o}}}]},Li=["$provide",function(e){var t=this;this.$$registeredAnimations=Object.create(null),this.register=function(n,r){if(n&&"."!==n.charAt(0))throw Ii("notcsel","Expecting class selector starting with '.' got '{0}'.",n);var i=n+"-animation";t.$$registeredAnimations[n.substr(1)]=i,e.factory(i,r)},this.classNameFilter=function(e){if(1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null,this.$$classNameFilter)){var t=new RegExp("(\\s+|\\/)"+Ui+"(\\s+|\\/)");if(t.test(this.$$classNameFilter.toString()))throw Ii("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',Ui)}return this.$$classNameFilter},this.$get=["$$animateQueue",function(e){function t(e,t,n){if(n){var r=at(n);!r||r.parentNode||r.previousElementSibling||(n=null)}n?n.after(e):t.prepend(e)}return{on:e.on,off:e.off,pin:e.pin,enabled:e.enabled,cancel:function(e){e.end&&e.end()},enter:function(n,r,i,o){return r=r&&Rr(r),i=i&&Rr(i),r=r||i.parent(),t(n,r,i),e.push(n,"enter",ut(o))},move:function(n,r,i,o){return r=r&&Rr(r),i=i&&Rr(i),r=r||i.parent(),t(n,r,i),e.push(n,"move",ut(o))},leave:function(t,n){return e.push(t,"leave",ut(n),function(){t.remove()})},addClass:function(t,n,r){return r=ut(r),r.addClass=ot(r.addclass,n),e.push(t,"addClass",r)},removeClass:function(t,n,r){return r=ut(r),r.removeClass=ot(r.removeClass,n),e.push(t,"removeClass",r)},setClass:function(t,n,r,i){return i=ut(i),i.addClass=ot(i.addClass,n),i.removeClass=ot(i.removeClass,r),e.push(t,"setClass",i)},animate:function(t,n,r,i,o){return o=ut(o),o.from=o.from?l(o.from,n):n,o.to=o.to?l(o.to,r):r,i=i||"ng-inline-animate",o.tempClasses=ot(o.tempClasses,i),e.push(t,"animate",o)}}}]}],qi=function(){this.$get=["$$rAF",function(e){function t(t){n.push(t),n.length>1||e(function(){for(var e=0;e<n.length;e++)n[e]();n=[]})}var n=[];return function(){var e=!1;return t(function(){e=!0}),function(n){e?n():t(n)}}}]},Hi=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$document","$timeout",function(e,t,n,i,o){function a(e){this.setHost(e);var t=n(),r=function(e){o(e,0,!1)};this._doneCallbacks=[],this._tick=function(e){var n=i[0];n&&n.hidden?r(e):t(e)},this._state=0}var s=0,u=1,l=2;return a.chain=function(e,t){function n(){return r===e.length?void t(!0):void e[r](function(e){return e===!1?void t(!1):(r++,void n())})}var r=0;n()},a.all=function(e,t){function n(n){o=o&&n,++i===e.length&&t(o)}var i=0,o=!0;r(e,function(e){e.done(n)})},a.prototype={setHost:function(e){this.host=e||{}},done:function(e){this._state===l?e():this._doneCallbacks.push(e)},progress:p,getPromise:function(){if(!this.promise){var t=this;this.promise=e(function(e,n){t.done(function(t){t===!1?n():e()})})}return this.promise},then:function(e,t){return this.getPromise().then(e,t)},"catch":function(e){return this.getPromise()["catch"](e)},"finally":function(e){return this.getPromise()["finally"](e)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end(),this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel(),this._resolve(!1)},complete:function(e){var t=this;t._state===s&&(t._state=u,t._tick(function(){t._resolve(e)}))},_resolve:function(e){this._state!==l&&(r(this._doneCallbacks,function(t){t(e)}),this._doneCallbacks.length=0,this._state=l)}},a}]},Bi=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(e,t,n){return function(t,r){function i(){return e(function(){o(),s||u.complete(),s=!0}),u}function o(){a.addClass&&(t.addClass(a.addClass),a.addClass=null),a.removeClass&&(t.removeClass(a.removeClass),a.removeClass=null),a.to&&(t.css(a.to),a.to=null)}var a=r||{};a.$$prepared||(a=U(a)),a.cleanupStyles&&(a.from=a.to=null),a.from&&(t.css(a.from),a.from=null);var s,u=new n;return{start:i,end:i}}}]},Wi=t("$compile"),Gi=new pt;ht.$inject=["$provide","$$sanitizeUriProvider"],gt.prototype.isFirstChange=function(){return this.previousValue===Gi};var Xi=/^((?:x|data)[\:\-_])/i,Ki=t("$controller"),Yi=/^(\S+)(\s+as\s+([\w$]+))?$/,Zi=function(){this.$get=["$document",function(e){return function(t){return t?!t.nodeType&&t instanceof Rr&&(t=t[0]):t=e[0].body,t.offsetWidth+1}}]},Ji="application/json",Qi={"Content-Type":Ji+";charset=utf-8"},eo=/^\[|^\{(?!\{)/,to={"[":/]$/,"{":/}$/},no=/^\)\]\}',?\n/,ro=t("$http"),io=function(e){return function(){throw ro("legacy","The method `{0}` on the promise returned from `$http` has been disabled.",e)}},oo=Gr.$interpolateMinErr=t("$interpolate");oo.throwNoconcat=function(e){throw oo("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",e)},oo.interr=function(e,t){return oo("interr","Can't interpolate: {0}\n{1}",e,t.toString())};var ao=function(){this.$get=["$window",function(e){function t(e){var t=function(e){t.data=e,t.called=!0};return t.id=e,t}var n=e.angular.callbacks,r={};return{createCallback:function(e){var i="_"+(n.$$counter++).toString(36),o="angular.callbacks."+i,a=t(i);return r[o]=n[i]=a,o},wasCalled:function(e){return r[e].called},getResponse:function(e){return r[e].data},removeCallback:function(e){var t=r[e];delete n[t.id],delete r[e]}}}]},so=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,uo={http:80,https:443,ftp:21},lo=t("$location"),co={$$absUrl:"",$$html5:!1,$$replace:!1,absUrl:Yt("$$absUrl"),url:function(e){if(m(e))return this.$$url;var t=so.exec(e);return(t[1]||""===e)&&this.path(decodeURIComponent(t[1])),(t[2]||t[1]||""===e)&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:Yt("$$protocol"),host:Yt("$$host"),port:Yt("$$port"),path:Zt("$$path",function(e){return e=null!==e?e.toString():"","/"==e.charAt(0)?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if(w(e)||x(e))e=e.toString(),this.$$search=J(e);else{if(!b(e))throw lo("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");e=U(e,{}),r(e,function(t,n){null==t&&delete e[n]}),this.$$search=e}break;default:m(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:Zt("$$hash",function(e){return null!==e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};r([Kt,Xt,Gt],function(e){e.prototype=Object.create(co),e.prototype.state=function(t){if(!arguments.length)return this.$$state;if(e!==Gt||!this.$$html5)throw lo("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=m(t)?null:t,this}});var fo=t("$parse"),po=Function.prototype.call,ho=Function.prototype.apply,go=Function.prototype.bind,vo=he();r("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(e){vo[e]=!0});var mo={n:"\n",f:"\f",r:"\r",t:"\t",v:"\x0B","'":"'",'"':'"'},$o=function(e){this.options=e};$o.prototype={constructor:$o,lex:function(e){for(this.text=e,this.index=0,this.tokens=[];this.index<this.text.length;){var t=this.text.charAt(this.index);if('"'===t||"'"===t)this.readString(t);else if(this.isNumber(t)||"."===t&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdentifierStart(this.peekMultichar()))this.readIdent();else if(this.is(t,"(){}[].,;:?"))this.tokens.push({index:this.index,text:t}),this.index++;else if(this.isWhitespace(t))this.index++;else{var n=t+this.peek(),r=n+this.peek(2),i=vo[t],o=vo[n],a=vo[r];if(i||o||a){var s=a?r:o?n:t;this.tokens.push({index:this.index,text:s,operator:!0}),this.index+=s.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(e,t){return t.indexOf(e)!==-1},peek:function(e){var t=e||1;return this.index+t<this.text.length&&this.text.charAt(this.index+t)},isNumber:function(e){return"0"<=e&&e<="9"&&"string"==typeof e},isWhitespace:function(e){return" "===e||"\r"===e||"\t"===e||"\n"===e||"\x0B"===e||" "===e},isIdentifierStart:function(e){return this.options.isIdentifierStart?this.options.isIdentifierStart(e,this.codePointAt(e)):this.isValidIdentifierStart(e)},isValidIdentifierStart:function(e){return"a"<=e&&e<="z"||"A"<=e&&e<="Z"||"_"===e||"$"===e},isIdentifierContinue:function(e){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(e,this.codePointAt(e)):this.isValidIdentifierContinue(e)},isValidIdentifierContinue:function(e,t){return this.isValidIdentifierStart(e,t)||this.isNumber(e)},codePointAt:function(e){return 1===e.length?e.charCodeAt(0):(e.charCodeAt(0)<<10)+e.charCodeAt(1)-56613888},peekMultichar:function(){var e=this.text.charAt(this.index),t=this.peek();if(!t)return e;var n=e.charCodeAt(0),r=t.charCodeAt(0);return n>=55296&&n<=56319&&r>=56320&&r<=57343?e+t:e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){n=n||this.index;var r=$(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n;throw fo("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,r,this.text)},readNumber:function(){for(var e="",t=this.index;this.index<this.text.length;){var n=Tr(this.text.charAt(this.index));if("."==n||this.isNumber(n))e+=n;else{var r=this.peek();if("e"==n&&this.isExpOperator(r))e+=n;else if(this.isExpOperator(n)&&r&&this.isNumber(r)&&"e"==e.charAt(e.length-1))e+=n;else{if(!this.isExpOperator(n)||r&&this.isNumber(r)||"e"!=e.charAt(e.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:t,text:e,constant:!0,value:Number(e)})},readIdent:function(){var e=this.index;for(this.index+=this.peekMultichar().length;this.index<this.text.length;){var t=this.peekMultichar();if(!this.isIdentifierContinue(t))break;this.index+=t.length}this.tokens.push({index:e,text:this.text.slice(e,this.index),identifier:!0})},readString:function(e){var t=this.index;this.index++;for(var n="",r=e,i=!1;this.index<this.text.length;){var o=this.text.charAt(this.index);if(r+=o,i){if("u"===o){var a=this.text.substring(this.index+1,this.index+5);a.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+a+"]"),this.index+=4,n+=String.fromCharCode(parseInt(a,16))}else{var s=mo[o];n+=s||o}i=!1}else if("\\"===o)i=!0;else{if(o===e)return this.index++,void this.tokens.push({index:t,text:r,constant:!0,value:n});n+=o}this.index++}this.throwError("Unterminated quote",t)}};var bo=function(e,t){this.lexer=e,this.options=t};bo.Program="Program",bo.ExpressionStatement="ExpressionStatement",bo.AssignmentExpression="AssignmentExpression",bo.ConditionalExpression="ConditionalExpression",bo.LogicalExpression="LogicalExpression",bo.BinaryExpression="BinaryExpression",bo.UnaryExpression="UnaryExpression",bo.CallExpression="CallExpression",bo.MemberExpression="MemberExpression",bo.Identifier="Identifier",bo.Literal="Literal",bo.ArrayExpression="ArrayExpression",bo.Property="Property",bo.ObjectExpression="ObjectExpression",bo.ThisExpression="ThisExpression",bo.LocalsExpression="LocalsExpression",bo.NGValueParameter="NGValueParameter",bo.prototype={ast:function(e){this.text=e,this.tokens=this.lexer.lex(e);var t=this.program();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),t},program:function(){for(var e=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&e.push(this.expressionStatement()),!this.expect(";"))return{type:bo.Program,body:e}},expressionStatement:function(){return{type:bo.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var e,t=this.expression();e=this.expect("|");)t=this.filter(t);return t},expression:function(){return this.assignment()},assignment:function(){var e=this.ternary();return this.expect("=")&&(e={type:bo.AssignmentExpression,left:e,right:this.assignment(),operator:"="}),e},ternary:function(){var e,t,n=this.logicalOR();return this.expect("?")&&(e=this.expression(),this.consume(":"))?(t=this.expression(),{type:bo.ConditionalExpression,test:n,alternate:e,consequent:t}):n},logicalOR:function(){for(var e=this.logicalAND();this.expect("||");)e={type:bo.LogicalExpression,operator:"||",left:e,right:this.logicalAND()};return e},logicalAND:function(){for(var e=this.equality();this.expect("&&");)e={type:bo.LogicalExpression,operator:"&&",left:e,right:this.equality()};return e},equality:function(){for(var e,t=this.relational();e=this.expect("==","!=","===","!==");)t={type:bo.BinaryExpression,operator:e.text,left:t,right:this.relational()};return t},relational:function(){for(var e,t=this.additive();e=this.expect("<",">","<=",">=");)t={type:bo.BinaryExpression,operator:e.text,left:t,right:this.additive()};return t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t={type:bo.BinaryExpression,operator:e.text,left:t,right:this.multiplicative()};return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t={type:bo.BinaryExpression,operator:e.text,left:t,right:this.unary()};return t},unary:function(){var e;return(e=this.expect("+","-","!"))?{type:bo.UnaryExpression,operator:e.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var e;this.expect("(")?(e=this.filterChain(),this.consume(")")):this.expect("[")?e=this.arrayDeclaration():this.expect("{")?e=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?e=U(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?e={type:bo.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?e=this.identifier():this.peek().constant?e=this.constant():this.throwError("not a primary expression",this.peek());for(var t;t=this.expect("(","[",".");)"("===t.text?(e={type:bo.CallExpression,callee:e,arguments:this.parseArguments()},this.consume(")")):"["===t.text?(e={type:bo.MemberExpression,object:e,property:this.expression(),computed:!0},this.consume("]")):"."===t.text?e={type:bo.MemberExpression,object:e,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return e},filter:function(e){for(var t=[e],n={type:bo.CallExpression,callee:this.identifier(),arguments:t,filter:!0};this.expect(":");)t.push(this.expression());return n},parseArguments:function(){var e=[];if(")"!==this.peekToken().text)do e.push(this.filterChain());while(this.expect(","));return e},identifier:function(){var e=this.consume();return e.identifier||this.throwError("is not a valid identifier",e),{type:bo.Identifier,name:e.text}},constant:function(){return{type:bo.Literal,value:this.consume().value}},arrayDeclaration:function(){var e=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;e.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:bo.ArrayExpression,elements:e}},object:function(){var e,t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;e={type:bo.Property,kind:"init"},this.peek().constant?(e.key=this.constant(),e.computed=!1,this.consume(":"),e.value=this.expression()):this.peek().identifier?(e.key=this.identifier(),e.computed=!1,this.peek(":")?(this.consume(":"),e.value=this.expression()):e.value=e.key):this.peek("[")?(this.consume("["),e.key=this.expression(),this.consume("]"),e.computed=!0,this.consume(":"),e.value=this.expression()):this.throwError("invalid key",this.peek()),t.push(e)}while(this.expect(","));return this.consume("}"),{type:bo.ObjectExpression,properties:t}},throwError:function(e,t){throw fo("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",t.text,e,t.index+1,this.text,this.text.substring(t.index))},consume:function(e){if(0===this.tokens.length)throw fo("ueoe","Unexpected end of expression: {0}",this.text);var t=this.expect(e);return t||this.throwError("is unexpected, expecting ["+e+"]",this.peek()),t},peekToken:function(){if(0===this.tokens.length)throw fo("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e,t,n,r){return this.peekAhead(0,e,t,n,r)},peekAhead:function(e,t,n,r,i){if(this.tokens.length>e){var o=this.tokens[e],a=o.text;if(a===t||a===n||a===r||a===i||!t&&!n&&!r&&!i)return o}return!1},expect:function(e,t,n,r){var i=this.peek(e,t,n,r);return!!i&&(this.tokens.shift(),i)},selfReferential:{"this":{type:bo.ThisExpression},$locals:{type:bo.LocalsExpression}}},gn.prototype={compile:function(e,t){var n=this,i=this.astBuilder.ast(e);this.state={nextId:0,filters:{},expensiveChecks:t,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},ln(i,n.$filter);var o,a="";if(this.stage="assign",o=dn(i)){this.state.computing="assign";var s=this.nextId();this.recurse(o,s),this.return_(s),a="fn.assign="+this.generateFunction("assign","s,v,l")}var u=cn(i.body);n.stage="inputs",r(u,function(e,t){var r="fn"+t;n.state[r]={vars:[],body:[],own:{}},n.state.computing=r;var i=n.nextId();n.recurse(e,i),n.return_(i),n.state.inputs.push(r),e.watchId=t}),this.state.computing="fn",this.stage="main",this.recurse(i);var l='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+a+this.watchFns()+"return fn;",c=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",l)(this.$filter,en,nn,rn,tn,on,an,sn,e);return this.state=this.stage=void 0,c.literal=pn(i),c.constant=hn(i),c},USE:"use",STRICT:"strict",watchFns:function(){var e=[],t=this.state.inputs,n=this;return r(t,function(t){e.push("var "+t+"="+n.generateFunction(t,"s"))}),t.length&&e.push("fn.inputs=["+t.join(",")+"];"),e.join("")},generateFunction:function(e,t){return"function("+t+"){"+this.varsPrefix(e)+this.body(e)+"};"},filterPrefix:function(){var e=[],t=this;return r(this.state.filters,function(n,r){e.push(n+"=$filter("+t.escape(r)+")")}),e.length?"var "+e.join(",")+";":""},varsPrefix:function(e){return this.state[e].vars.length?"var "+this.state[e].vars.join(",")+";":""},body:function(e){return this.state[e].body.join("")},recurse:function(e,t,n,i,o,a){var s,u,l,c,f,d=this;if(i=i||p,!a&&$(e.watchId))return t=t||this.nextId(),void this.if_("i",this.lazyAssign(t,this.computedMember("i",e.watchId)),this.lazyRecurse(e,t,n,i,o,!0));switch(e.type){case bo.Program:r(e.body,function(t,n){d.recurse(t.expression,void 0,void 0,function(e){u=e}),n!==e.body.length-1?d.current().body.push(u,";"):d.return_(u)});break;case bo.Literal:c=this.escape(e.value),this.assign(t,c),i(c);break;case bo.UnaryExpression:this.recurse(e.argument,void 0,void 0,function(e){u=e}),c=e.operator+"("+this.ifDefined(u,0)+")",this.assign(t,c),i(c);break;case bo.BinaryExpression:this.recurse(e.left,void 0,void 0,function(e){s=e}),this.recurse(e.right,void 0,void 0,function(e){u=e}),c="+"===e.operator?this.plus(s,u):"-"===e.operator?this.ifDefined(s,0)+e.operator+this.ifDefined(u,0):"("+s+")"+e.operator+"("+u+")",this.assign(t,c),i(c);break;case bo.LogicalExpression:t=t||this.nextId(),d.recurse(e.left,t),d.if_("&&"===e.operator?t:d.not(t),d.lazyRecurse(e.right,t)),i(t);break;case bo.ConditionalExpression:t=t||this.nextId(),d.recurse(e.test,t),d.if_(t,d.lazyRecurse(e.alternate,t),d.lazyRecurse(e.consequent,t)),i(t);break;case bo.Identifier:t=t||this.nextId(),n&&(n.context="inputs"===d.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",e.name)+"?l:s"),n.computed=!1,n.name=e.name),en(e.name),d.if_("inputs"===d.stage||d.not(d.getHasOwnProperty("l",e.name)),function(){d.if_("inputs"===d.stage||"s",function(){o&&1!==o&&d.if_(d.not(d.nonComputedMember("s",e.name)),d.lazyAssign(d.nonComputedMember("s",e.name),"{}")),d.assign(t,d.nonComputedMember("s",e.name))})},t&&d.lazyAssign(t,d.nonComputedMember("l",e.name))),(d.state.expensiveChecks||mn(e.name))&&d.addEnsureSafeObject(t),i(t);break;case bo.MemberExpression:s=n&&(n.context=this.nextId())||this.nextId(),t=t||this.nextId(),d.recurse(e.object,s,void 0,function(){d.if_(d.notNull(s),function(){o&&1!==o&&d.addEnsureSafeAssignContext(s),e.computed?(u=d.nextId(),d.recurse(e.property,u),d.getStringValue(u),d.addEnsureSafeMemberName(u),o&&1!==o&&d.if_(d.not(d.computedMember(s,u)),d.lazyAssign(d.computedMember(s,u),"{}")),c=d.ensureSafeObject(d.computedMember(s,u)),d.assign(t,c),n&&(n.computed=!0,n.name=u)):(en(e.property.name),o&&1!==o&&d.if_(d.not(d.nonComputedMember(s,e.property.name)),d.lazyAssign(d.nonComputedMember(s,e.property.name),"{}")),c=d.nonComputedMember(s,e.property.name),(d.state.expensiveChecks||mn(e.property.name))&&(c=d.ensureSafeObject(c)),d.assign(t,c),n&&(n.computed=!1,n.name=e.property.name))},function(){d.assign(t,"undefined")}),i(t)},!!o);break;case bo.CallExpression:t=t||this.nextId(),e.filter?(u=d.filter(e.callee.name),l=[],r(e.arguments,function(e){var t=d.nextId();d.recurse(e,t),l.push(t)}),c=u+"("+l.join(",")+")",d.assign(t,c),i(t)):(u=d.nextId(),s={},l=[],d.recurse(e.callee,u,s,function(){d.if_(d.notNull(u),function(){d.addEnsureSafeFunction(u),r(e.arguments,function(e){d.recurse(e,d.nextId(),void 0,function(e){l.push(d.ensureSafeObject(e))})}),s.name?(d.state.expensiveChecks||d.addEnsureSafeObject(s.context),c=d.member(s.context,s.name,s.computed)+"("+l.join(",")+")"):c=u+"("+l.join(",")+")",c=d.ensureSafeObject(c),d.assign(t,c)},function(){d.assign(t,"undefined")}),i(t)}));break;case bo.AssignmentExpression:if(u=this.nextId(),s={},!fn(e.left))throw fo("lval","Trying to assign a value to a non l-value");this.recurse(e.left,void 0,s,function(){d.if_(d.notNull(s.context),function(){d.recurse(e.right,u),d.addEnsureSafeObject(d.member(s.context,s.name,s.computed)),d.addEnsureSafeAssignContext(s.context),c=d.member(s.context,s.name,s.computed)+e.operator+u,d.assign(t,c),i(t||c)})},1);break;case bo.ArrayExpression:l=[],r(e.elements,function(e){d.recurse(e,d.nextId(),void 0,function(e){l.push(e)})}),c="["+l.join(",")+"]",this.assign(t,c),i(c);break;case bo.ObjectExpression:l=[],f=!1,r(e.properties,function(e){e.computed&&(f=!0)}),f?(t=t||this.nextId(),this.assign(t,"{}"),r(e.properties,function(e){e.computed?(s=d.nextId(),d.recurse(e.key,s)):s=e.key.type===bo.Identifier?e.key.name:""+e.key.value,u=d.nextId(),d.recurse(e.value,u),d.assign(d.member(t,s,e.computed),u)})):(r(e.properties,function(t){d.recurse(t.value,e.constant?void 0:d.nextId(),void 0,function(e){l.push(d.escape(t.key.type===bo.Identifier?t.key.name:""+t.key.value)+":"+e)})}),c="{"+l.join(",")+"}",this.assign(t,c)),i(t||c);break;case bo.ThisExpression:this.assign(t,"s"),i("s");break;case bo.LocalsExpression:this.assign(t,"l"),i("l");break;case bo.NGValueParameter:this.assign(t,"v"),i("v")}},getHasOwnProperty:function(e,t){var n=e+"."+t,r=this.current().own;return r.hasOwnProperty(n)||(r[n]=this.nextId(!1,e+"&&("+this.escape(t)+" in "+e+")")),r[n]},assign:function(e,t){if(e)return this.current().body.push(e,"=",t,";"),e},filter:function(e){return this.state.filters.hasOwnProperty(e)||(this.state.filters[e]=this.nextId(!0)),this.state.filters[e]},ifDefined:function(e,t){return"ifDefined("+e+","+this.escape(t)+")"},plus:function(e,t){return"plus("+e+","+t+")"},return_:function(e){this.current().body.push("return ",e,";")},if_:function(e,t,n){if(e===!0)t();else{var r=this.current().body;r.push("if(",e,"){"),t(),r.push("}"),n&&(r.push("else{"),n(),r.push("}"))}},not:function(e){return"!("+e+")"},notNull:function(e){return e+"!=null"},nonComputedMember:function(e,t){var n=/[$_a-zA-Z][$_a-zA-Z0-9]*/,r=/[^$_a-zA-Z0-9]/g;return n.test(t)?e+"."+t:e+'["'+t.replace(r,this.stringEscapeFn)+'"]'},computedMember:function(e,t){return e+"["+t+"]"},member:function(e,t,n){return n?this.computedMember(e,t):this.nonComputedMember(e,t)},addEnsureSafeObject:function(e){this.current().body.push(this.ensureSafeObject(e),";")},addEnsureSafeMemberName:function(e){this.current().body.push(this.ensureSafeMemberName(e),";")},addEnsureSafeFunction:function(e){this.current().body.push(this.ensureSafeFunction(e),";")},addEnsureSafeAssignContext:function(e){this.current().body.push(this.ensureSafeAssignContext(e),";")},ensureSafeObject:function(e){return"ensureSafeObject("+e+",text)"},ensureSafeMemberName:function(e){return"ensureSafeMemberName("+e+",text)"},ensureSafeFunction:function(e){return"ensureSafeFunction("+e+",text)"},getStringValue:function(e){this.assign(e,"getStringValue("+e+")")},ensureSafeAssignContext:function(e){return"ensureSafeAssignContext("+e+",text)"},lazyRecurse:function(e,t,n,r,i,o){
7
+ var a=this;return function(){a.recurse(e,t,n,r,i,o)}},lazyAssign:function(e,t){var n=this;return function(){n.assign(e,t)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)},escape:function(e){if(w(e))return"'"+e.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(x(e))return e.toString();if(e===!0)return"true";if(e===!1)return"false";if(null===e)return"null";if("undefined"==typeof e)return"undefined";throw fo("esc","IMPOSSIBLE")},nextId:function(e,t){var n="v"+this.state.nextId++;return e||this.current().vars.push(n+(t?"="+t:"")),n},current:function(){return this.state[this.state.computing]}},vn.prototype={compile:function(e,t){var n=this,i=this.astBuilder.ast(e);this.expression=e,this.expensiveChecks=t,ln(i,n.$filter);var o,a;(o=dn(i))&&(a=this.recurse(o));var s,u=cn(i.body);u&&(s=[],r(u,function(e,t){var r=n.recurse(e);e.input=r,s.push(r),e.watchId=t}));var l=[];r(i.body,function(e){l.push(n.recurse(e.expression))});var c=0===i.body.length?p:1===i.body.length?l[0]:function(e,t){var n;return r(l,function(r){n=r(e,t)}),n};return a&&(c.assign=function(e,t,n){return a(e,n,t)}),s&&(c.inputs=s),c.literal=pn(i),c.constant=hn(i),c},recurse:function(e,t,n){var i,o,a,s=this;if(e.input)return this.inputs(e.input,e.watchId);switch(e.type){case bo.Literal:return this.value(e.value,t);case bo.UnaryExpression:return o=this.recurse(e.argument),this["unary"+e.operator](o,t);case bo.BinaryExpression:return i=this.recurse(e.left),o=this.recurse(e.right),this["binary"+e.operator](i,o,t);case bo.LogicalExpression:return i=this.recurse(e.left),o=this.recurse(e.right),this["binary"+e.operator](i,o,t);case bo.ConditionalExpression:return this["ternary?:"](this.recurse(e.test),this.recurse(e.alternate),this.recurse(e.consequent),t);case bo.Identifier:return en(e.name,s.expression),s.identifier(e.name,s.expensiveChecks||mn(e.name),t,n,s.expression);case bo.MemberExpression:return i=this.recurse(e.object,!1,!!n),e.computed||(en(e.property.name,s.expression),o=e.property.name),e.computed&&(o=this.recurse(e.property)),e.computed?this.computedMember(i,o,t,n,s.expression):this.nonComputedMember(i,o,s.expensiveChecks,t,n,s.expression);case bo.CallExpression:return a=[],r(e.arguments,function(e){a.push(s.recurse(e))}),e.filter&&(o=this.$filter(e.callee.name)),e.filter||(o=this.recurse(e.callee,!0)),e.filter?function(e,n,r,i){for(var s=[],u=0;u<a.length;++u)s.push(a[u](e,n,r,i));var l=o.apply(void 0,s,i);return t?{context:void 0,name:void 0,value:l}:l}:function(e,n,r,i){var u,l=o(e,n,r,i);if(null!=l.value){nn(l.context,s.expression),rn(l.value,s.expression);for(var c=[],f=0;f<a.length;++f)c.push(nn(a[f](e,n,r,i),s.expression));u=nn(l.value.apply(l.context,c),s.expression)}return t?{value:u}:u};case bo.AssignmentExpression:return i=this.recurse(e.left,!0,1),o=this.recurse(e.right),function(e,n,r,a){var u=i(e,n,r,a),l=o(e,n,r,a);return nn(u.value,s.expression),on(u.context),u.context[u.name]=l,t?{value:l}:l};case bo.ArrayExpression:return a=[],r(e.elements,function(e){a.push(s.recurse(e))}),function(e,n,r,i){for(var o=[],s=0;s<a.length;++s)o.push(a[s](e,n,r,i));return t?{value:o}:o};case bo.ObjectExpression:return a=[],r(e.properties,function(e){e.computed?a.push({key:s.recurse(e.key),computed:!0,value:s.recurse(e.value)}):a.push({key:e.key.type===bo.Identifier?e.key.name:""+e.key.value,computed:!1,value:s.recurse(e.value)})}),function(e,n,r,i){for(var o={},s=0;s<a.length;++s)a[s].computed?o[a[s].key(e,n,r,i)]=a[s].value(e,n,r,i):o[a[s].key]=a[s].value(e,n,r,i);return t?{value:o}:o};case bo.ThisExpression:return function(e){return t?{value:e}:e};case bo.LocalsExpression:return function(e,n){return t?{value:n}:n};case bo.NGValueParameter:return function(e,n,r){return t?{value:r}:r}}},"unary+":function(e,t){return function(n,r,i,o){var a=e(n,r,i,o);return a=$(a)?+a:0,t?{value:a}:a}},"unary-":function(e,t){return function(n,r,i,o){var a=e(n,r,i,o);return a=$(a)?-a:0,t?{value:a}:a}},"unary!":function(e,t){return function(n,r,i,o){var a=!e(n,r,i,o);return t?{value:a}:a}},"binary+":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a),u=t(r,i,o,a),l=sn(s,u);return n?{value:l}:l}},"binary-":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a),u=t(r,i,o,a),l=($(s)?s:0)-($(u)?u:0);return n?{value:l}:l}},"binary*":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)*t(r,i,o,a);return n?{value:s}:s}},"binary/":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)/t(r,i,o,a);return n?{value:s}:s}},"binary%":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)%t(r,i,o,a);return n?{value:s}:s}},"binary===":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)===t(r,i,o,a);return n?{value:s}:s}},"binary!==":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)!==t(r,i,o,a);return n?{value:s}:s}},"binary==":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)==t(r,i,o,a);return n?{value:s}:s}},"binary!=":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)!=t(r,i,o,a);return n?{value:s}:s}},"binary<":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)<t(r,i,o,a);return n?{value:s}:s}},"binary>":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)>t(r,i,o,a);return n?{value:s}:s}},"binary<=":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)<=t(r,i,o,a);return n?{value:s}:s}},"binary>=":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)>=t(r,i,o,a);return n?{value:s}:s}},"binary&&":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)&&t(r,i,o,a);return n?{value:s}:s}},"binary||":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)||t(r,i,o,a);return n?{value:s}:s}},"ternary?:":function(e,t,n,r){return function(i,o,a,s){var u=e(i,o,a,s)?t(i,o,a,s):n(i,o,a,s);return r?{value:u}:u}},value:function(e,t){return function(){return t?{context:void 0,name:void 0,value:e}:e}},identifier:function(e,t,n,r,i){return function(o,a,s,u){var l=a&&e in a?a:o;r&&1!==r&&l&&!l[e]&&(l[e]={});var c=l?l[e]:void 0;return t&&nn(c,i),n?{context:l,name:e,value:c}:c}},computedMember:function(e,t,n,r,i){return function(o,a,s,u){var l,c,f=e(o,a,s,u);return null!=f&&(l=t(o,a,s,u),l=tn(l),en(l,i),r&&1!==r&&(on(f),f&&!f[l]&&(f[l]={})),c=f[l],nn(c,i)),n?{context:f,name:l,value:c}:c}},nonComputedMember:function(e,t,n,r,i,o){return function(a,s,u,l){var c=e(a,s,u,l);i&&1!==i&&(on(c),c&&!c[t]&&(c[t]={}));var f=null!=c?c[t]:void 0;return(n||mn(t))&&nn(f,o),r?{context:c,name:t,value:f}:f}},inputs:function(e,t){return function(n,r,i,o){return o?o[t]:e(n,r,i)}}};var yo=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n,this.ast=new bo(e,n),this.astCompiler=n.csp?new vn(this.ast,t):new gn(this.ast,t)};yo.prototype={constructor:yo,parse:function(e){return this.astCompiler.compile(e,this.options.expensiveChecks)}};var wo=Object.prototype.valueOf,xo=t("$sce"),_o={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},ko=t("$compile"),So=e.document.createElement("a"),Eo=Dn(e.location.href);In.$inject=["$document"],Un.$inject=["$provide"];var Co=22,Ao=".",Oo="0";Hn.$inject=["$locale"],Bn.$inject=["$locale"];var Mo={yyyy:Yn("FullYear",4,0,!1,!0),yy:Yn("FullYear",2,0,!0,!0),y:Yn("FullYear",1,0,!1,!0),MMMM:Zn("Month"),MMM:Zn("Month",!0),MM:Yn("Month",2,1),M:Yn("Month",1,1),LLLL:Zn("Month",!1,!0),dd:Yn("Date",2),d:Yn("Date",1),HH:Yn("Hours",2),H:Yn("Hours",1),hh:Yn("Hours",2,-12),h:Yn("Hours",1,-12),mm:Yn("Minutes",2),m:Yn("Minutes",1),ss:Yn("Seconds",2),s:Yn("Seconds",1),sss:Yn("Milliseconds",3),EEEE:Zn("Day"),EEE:Zn("Day",!0),a:nr,Z:Jn,ww:tr(2),w:tr(1),G:rr,GG:rr,GGG:rr,GGGG:ir},jo=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,Po=/^\-?\d+$/;or.$inject=["$locale"];var To=g(Tr),Do=g(Dr);lr.$inject=["$parse"];var Fo=g({restrict:"E",compile:function(e,t){if(!t.href&&!t.xlinkHref)return function(e,t){if("a"===t[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===Hr.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}}),No={};r(Ci,function(e,t){function n(e,n,i){e.$watch(i[r],function(e){i.$set(t,!!e)})}if("multiple"!=e){var r=vt("ng-"+t),i=n;"checked"===e&&(i=function(e,t,i){i.ngModel!==i[r]&&n(e,t,i)}),No[r]=function(){return{restrict:"A",priority:100,link:i}}}}),r(Oi,function(e,t){No[t]=function(){return{priority:100,link:function(e,n,r){if("ngPattern"===t&&"/"==r.ngPattern.charAt(0)){var i=r.ngPattern.match(Mr);if(i)return void r.$set("ngPattern",new RegExp(i[1],i[2]))}e.$watch(r[t],function(e){r.$set(t,e)})}}}}),r(["src","srcset","href"],function(e){var t=vt("ng-"+e);No[t]=function(){return{priority:99,link:function(n,r,i){var o=e,a=e;"href"===e&&"[object SVGAnimatedString]"===Hr.call(r.prop("href"))&&(a="xlinkHref",i.$attr[a]="xlink:href",o=null),i.$observe(t,function(t){return t?(i.$set(a,t),void(Ir&&o&&r.prop(o,i[a]))):void("href"===e&&i.$set(a,null))})}}}});var Io={$addControl:p,$$renameControl:fr,$removeControl:p,$setValidity:p,$setDirty:p,$setPristine:p,$setSubmitted:p},Ro="ng-submitted";dr.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Uo=function(e){return["$timeout","$parse",function(t,n){function r(e){return""===e?n('this[""]').assign:n(e).assign||p}var i={name:"form",restrict:e?"EAC":"E",require:["form","^^?form"],controller:dr,compile:function(n,i){n.addClass(wa).addClass(ba);var o=i.name?"name":!(!e||!i.ngForm)&&"ngForm";return{pre:function(e,n,i,a){var s=a[0];if(!("action"in i)){var u=function(t){e.$apply(function(){s.$commitViewValue(),s.$setSubmitted()}),t.preventDefault()};hi(n[0],"submit",u),n.on("$destroy",function(){t(function(){gi(n[0],"submit",u)},0,!1)})}var c=a[1]||s.$$parentForm;c.$addControl(s);var f=o?r(s.$name):p;o&&(f(e,s),i.$observe(o,function(t){s.$name!==t&&(f(e,void 0),s.$$parentForm.$$renameControl(s,t),(f=r(s.$name))(e,s))})),n.on("$destroy",function(){s.$$parentForm.$removeControl(s),f(e,void 0),l(s,Io)})}}}};return i}]},Vo=Uo(),zo=Uo(!0),Lo=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,qo=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:\/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,Ho=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,Bo=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Wo=/^(\d{4,})-(\d{2})-(\d{2})$/,Go=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Xo=/^(\d{4,})-W(\d\d)$/,Ko=/^(\d{4,})-(\d\d)$/,Yo=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Zo="keydown wheel mousedown",Jo=he();r("date,datetime-local,month,time,week".split(","),function(e){Jo[e]=!0});var Qo={text:hr,date:$r("date",Wo,mr(Wo,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":$r("datetimelocal",Go,mr(Go,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:$r("time",Yo,mr(Yo,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:$r("week",Xo,vr,"yyyy-Www"),month:$r("month",Ko,mr(Ko,["yyyy","MM"]),"yyyy-MM"),number:yr,url:wr,email:xr,radio:_r,checkbox:Sr,hidden:p,button:p,submit:p,reset:p,file:p},ea=["$browser","$sniffer","$filter","$parse",function(e,t,n,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(i,o,a,s){s[0]&&(Qo[Tr(a.type)]||Qo.text)(i,o,a,s[0],t,e,n,r)}}}}],ta=/^(true|false|\d+)$/,na=function(){return{restrict:"A",priority:100,compile:function(e,t){return ta.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e)})}}}},ra=["$compile",function(e){return{restrict:"AC",compile:function(t){return e.$$addBindingClass(t),function(t,n,r){e.$$addBindingInfo(n,r.ngBind),n=n[0],t.$watch(r.ngBind,function(e){n.textContent=m(e)?"":e})}}}}],ia=["$interpolate","$compile",function(e,t){return{compile:function(n){return t.$$addBindingClass(n),function(n,r,i){var o=e(r.attr(i.$attr.ngBindTemplate));t.$$addBindingInfo(r,o.expressions),r=r[0],i.$observe("ngBindTemplate",function(e){r.textContent=m(e)?"":e})}}}}],oa=["$sce","$parse","$compile",function(e,t,n){return{restrict:"A",compile:function(r,i){var o=t(i.ngBindHtml),a=t(i.ngBindHtml,function(t){return e.valueOf(t)});return n.$$addBindingClass(r),function(t,r,i){n.$$addBindingInfo(r,i.ngBindHtml),t.$watch(a,function(){var n=o(t);r.html(e.getTrustedHtml(n)||"")})}}}}],aa=g({restrict:"A",require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),sa=Er("",!0),ua=Er("Odd",0),la=Er("Even",1),ca=cr({compile:function(e,t){t.$set("ngCloak",void 0),e.removeClass("ng-cloak")}}),fa=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],da={},pa={blur:!0,focus:!0};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=vt("ng-"+e);da[t]=["$parse","$rootScope",function(n,r){return{restrict:"A",compile:function(i,o){var a=n(o[t],null,!0);return function(t,n){n.on(e,function(n){var i=function(){a(t,{$event:n})};pa[e]&&r.$$phase?t.$evalAsync(i):t.$apply(i)})}}}}]});var ha=["$animate","$compile",function(e,t){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,r,i,o,a){var s,u,l;n.$watch(i.ngIf,function(n){n?u||a(function(n,o){u=o,n[n.length++]=t.$$createComment("end ngIf",i.ngIf),s={clone:n},e.enter(n,r.parent(),r)}):(l&&(l.remove(),l=null),u&&(u.$destroy(),u=null),s&&(l=pe(s.clone),e.leave(l).then(function(){l=null}),s=null))})}}}],ga=["$templateRequest","$anchorScroll","$animate",function(e,t,n){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Gr.noop,compile:function(r,i){var o=i.ngInclude||i.src,a=i.onload||"",s=i.autoscroll;return function(r,i,u,l,c){var f,d,p,h=0,g=function(){d&&(d.remove(),d=null),f&&(f.$destroy(),f=null),p&&(n.leave(p).then(function(){d=null}),d=p,p=null)};r.$watch(o,function(o){var u=function(){!$(s)||s&&!r.$eval(s)||t()},d=++h;o?(e(o,!0).then(function(e){if(!r.$$destroyed&&d===h){var t=r.$new();l.template=e;var s=c(t,function(e){g(),n.enter(e,null,i).then(u)});f=t,p=s,f.$emit("$includeContentLoaded",o),r.$eval(a)}},function(){r.$$destroyed||d===h&&(g(),r.$emit("$includeContentError",o))}),r.$emit("$includeContentRequested",o)):(g(),l.template=null)})}}}}],va=["$compile",function(t){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,r,i,o){return Hr.call(r[0]).match(/SVG/)?(r.empty(),void t(Ee(o.template,e.document).childNodes)(n,function(e){r.append(e)},{futureParentElement:r})):(r.html(o.template),void t(r.contents())(n))}}}],ma=cr({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),$a=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,n,i){var o=t.attr(n.$attr.ngList)||", ",a="false"!==n.ngTrim,s=a?Zr(o):o,u=function(e){if(!m(e)){var t=[];return e&&r(e.split(s),function(e){e&&t.push(a?Zr(e):e)}),t}};i.$parsers.push(u),i.$formatters.push(function(e){if(Kr(e))return e.join(o)}),i.$isEmpty=function(e){return!e||!e.length}}}},ba="ng-valid",ya="ng-invalid",wa="ng-pristine",xa="ng-dirty",_a="ng-untouched",ka="ng-touched",Sa="ng-pending",Ea="ng-empty",Ca="ng-not-empty",Aa=t("ngModel"),Oa=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(e,t,n,i,o,a,s,u,l,c){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=void 0,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=void 0,this.$name=c(n.name||"",!1)(e),this.$$parentForm=Io;var f,d=o(n.ngModel),h=d.assign,g=d,v=h,b=null,y=this;this.$$setOptions=function(e){if(y.$options=e,e&&e.getterSetter){var t=o(n.ngModel+"()"),r=o(n.ngModel+"($$$p)");g=function(e){var n=d(e);return k(n)&&(n=t(e)),n},v=function(e,t){k(d(e))?r(e,{$$$p:t}):h(e,t)}}else if(!d.assign)throw Aa("nonassign","Expression '{0}' is non-assignable. Element: {1}",n.ngModel,Y(i))},this.$render=p,this.$isEmpty=function(e){return m(e)||""===e||null===e||e!==e},this.$$updateEmptyClasses=function(e){y.$isEmpty(e)?(a.removeClass(i,Ca),a.addClass(i,Ea)):(a.removeClass(i,Ea),a.addClass(i,Ca))};var w=0;Cr({ctrl:this,$element:i,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]},$animate:a}),this.$setPristine=function(){y.$dirty=!1,y.$pristine=!0,a.removeClass(i,xa),a.addClass(i,wa)},this.$setDirty=function(){y.$dirty=!0,y.$pristine=!1,a.removeClass(i,wa),a.addClass(i,xa),y.$$parentForm.$setDirty()},this.$setUntouched=function(){y.$touched=!1,y.$untouched=!0,a.setClass(i,_a,ka)},this.$setTouched=function(){y.$touched=!0,y.$untouched=!1,a.setClass(i,ka,_a)},this.$rollbackViewValue=function(){s.cancel(b),y.$viewValue=y.$$lastCommittedViewValue,y.$render()},this.$validate=function(){if(!x(y.$modelValue)||!isNaN(y.$modelValue)){var e=y.$$lastCommittedViewValue,t=y.$$rawModelValue,n=y.$valid,r=y.$modelValue,i=y.$options&&y.$options.allowInvalid;y.$$runValidators(t,e,function(e){i||n===e||(y.$modelValue=e?t:void 0,y.$modelValue!==r&&y.$$writeModelToScope())})}},this.$$runValidators=function(e,t,n){function i(){var e=y.$$parserName||"parse";return m(f)?(s(e,null),!0):(f||(r(y.$validators,function(e,t){s(t,null)}),r(y.$asyncValidators,function(e,t){s(t,null)})),s(e,f),f)}function o(){var n=!0;return r(y.$validators,function(r,i){var o=r(e,t);n=n&&o,s(i,o)}),!!n||(r(y.$asyncValidators,function(e,t){s(t,null)}),!1)}function a(){var n=[],i=!0;r(y.$asyncValidators,function(r,o){var a=r(e,t);if(!P(a))throw Aa("nopromise","Expected asynchronous validator to return a promise but got '{0}' instead.",a);s(o,void 0),n.push(a.then(function(){s(o,!0)},function(){i=!1,s(o,!1)}))}),n.length?l.all(n).then(function(){u(i)},p):u(!0)}function s(e,t){c===w&&y.$setValidity(e,t)}function u(e){c===w&&n(e)}w++;var c=w;return i()&&o()?void a():void u(!1)},this.$commitViewValue=function(){var e=y.$viewValue;s.cancel(b),(y.$$lastCommittedViewValue!==e||""===e&&y.$$hasNativeValidators)&&(y.$$updateEmptyClasses(e),y.$$lastCommittedViewValue=e,y.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function t(){y.$modelValue!==o&&y.$$writeModelToScope()}var n=y.$$lastCommittedViewValue,r=n;if(f=!m(r)||void 0)for(var i=0;i<y.$parsers.length;i++)if(r=y.$parsers[i](r),m(r)){f=!1;break}x(y.$modelValue)&&isNaN(y.$modelValue)&&(y.$modelValue=g(e));var o=y.$modelValue,a=y.$options&&y.$options.allowInvalid;y.$$rawModelValue=r,a&&(y.$modelValue=r,t()),y.$$runValidators(r,y.$$lastCommittedViewValue,function(e){a||(y.$modelValue=e?r:void 0,t())})},this.$$writeModelToScope=function(){v(e,y.$modelValue),r(y.$viewChangeListeners,function(e){try{e()}catch(n){t(n)}})},this.$setViewValue=function(e,t){y.$viewValue=e,y.$options&&!y.$options.updateOnDefault||y.$$debounceViewValueCommit(t)},this.$$debounceViewValueCommit=function(t){var n,r=0,i=y.$options;i&&$(i.debounce)&&(n=i.debounce,x(n)?r=n:x(n[t])?r=n[t]:x(n["default"])&&(r=n["default"])),s.cancel(b),r?b=s(function(){y.$commitViewValue()},r):u.$$phase?y.$commitViewValue():e.$apply(function(){y.$commitViewValue()})},e.$watch(function(){var t=g(e);if(t!==y.$modelValue&&(y.$modelValue===y.$modelValue||t===t)){y.$modelValue=y.$$rawModelValue=t,f=void 0;for(var n=y.$formatters,r=n.length,i=t;r--;)i=n[r](i);y.$viewValue!==i&&(y.$$updateEmptyClasses(i),y.$viewValue=y.$$lastCommittedViewValue=i,y.$render(),y.$$runValidators(t,i,p))}return t})}],Ma=["$rootScope",function(e){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Oa,priority:1,compile:function(t){return t.addClass(wa).addClass(_a).addClass(ba),{pre:function(e,t,n,r){var i=r[0],o=r[1]||i.$$parentForm;i.$$setOptions(r[2]&&r[2].$options),o.$addControl(i),n.$observe("name",function(e){i.$name!==e&&i.$$parentForm.$$renameControl(i,e)}),e.$on("$destroy",function(){i.$$parentForm.$removeControl(i)})},post:function(t,n,r,i){var o=i[0];o.$options&&o.$options.updateOn&&n.on(o.$options.updateOn,function(e){o.$$debounceViewValueCommit(e&&e.type)}),n.on("blur",function(){o.$touched||(e.$$phase?t.$evalAsync(o.$setTouched):t.$apply(o.$setTouched))})}}}}}],ja=/(\s+|^)default(\s+|$)/,Pa=function(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){var n=this;this.$options=U(e.$eval(t.ngModelOptions)),$(this.$options.updateOn)?(this.$options.updateOnDefault=!1,this.$options.updateOn=Zr(this.$options.updateOn.replace(ja,function(){return n.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},Ta=cr({terminal:!0,priority:1e3}),Da=t("ngOptions"),Fa=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,Na=["$compile","$document","$parse",function(t,i,o){function a(e,t,r){function i(e,t,n,r,i){this.selectValue=e,this.viewValue=t,this.label=n,this.group=r,this.disabled=i}function a(e){var t;if(!l&&n(e))t=e;else{t=[];for(var r in e)e.hasOwnProperty(r)&&"$"!==r.charAt(0)&&t.push(r)}return t}var s=e.match(Fa);if(!s)throw Da("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",e,Y(t));var u=s[5]||s[7],l=s[6],c=/ as /.test(s[0])&&s[1],f=s[9],d=o(s[2]?s[1]:u),p=c&&o(c),h=p||d,g=f&&o(f),v=f?function(e,t){return g(r,t)}:function(e){return Ze(e)},m=function(e,t){return v(e,_(e,t))},$=o(s[2]||s[1]),b=o(s[3]||""),y=o(s[4]||""),w=o(s[8]),x={},_=l?function(e,t){return x[l]=t,x[u]=e,x}:function(e){return x[u]=e,x};return{trackBy:f,getTrackByValue:m,getWatchables:o(w,function(e){var t=[];e=e||[];for(var n=a(e),i=n.length,o=0;o<i;o++){var u=e===n?o:n[o],l=e[u],c=_(l,u),f=v(l,c);if(t.push(f),s[2]||s[1]){var d=$(r,c);t.push(d)}if(s[4]){var p=y(r,c);t.push(p)}}return t}),getOptions:function(){for(var e=[],t={},n=w(r)||[],o=a(n),s=o.length,u=0;u<s;u++){var l=n===o?u:o[u],c=n[l],d=_(c,l),p=h(r,d),g=v(p,d),x=$(r,d),k=b(r,d),S=y(r,d),E=new i(g,p,x,k,S);e.push(E),t[g]=E}return{items:e,selectValueMap:t,getOptionFromViewValue:function(e){return t[m(e)]},getViewValueFromOption:function(e){return f?Gr.copy(e.viewValue):e.viewValue}}}}}function s(e,n,o,s){function c(e,t){var n=u.cloneNode(!1);t.appendChild(n),f(e,n)}function f(e,t){e.element=t,t.disabled=e.disabled,e.label!==t.label&&(t.label=e.label,t.textContent=e.label),e.value!==t.value&&(t.value=e.selectValue)}function d(){var e=_&&h.readValue();if(_)for(var t=_.items.length-1;t>=0;t--){var r=_.items[t];qe($(r.group)?r.element.parentNode:r.element)}_=k.getOptions();var i={};if(w&&n.prepend(p),_.items.forEach(function(e){var t;$(e.group)?(t=i[e.group],t||(t=l.cloneNode(!1),S.appendChild(t),t.label=null===e.group?"null":e.group,i[e.group]=t),c(e,t)):c(e,S)}),n[0].appendChild(S),g.$render(),!g.$isEmpty(e)){var o=h.readValue(),a=k.trackBy||v;(a?V(e,o):e===o)||(g.$setViewValue(o),g.$render())}}for(var p,h=s[0],g=s[1],v=o.multiple,m=0,b=n.children(),y=b.length;m<y;m++)if(""===b[m].value){p=b.eq(m);break}var w=!!p,x=Rr(u.cloneNode(!1));x.val("?");var _,k=a(o.ngOptions,n,e),S=i[0].createDocumentFragment(),E=function(){w||n.prepend(p),n.val(""),p.prop("selected",!0),p.attr("selected",!0)},C=function(){w||p.remove()},A=function(){n.prepend(x),n.val("?"),x.prop("selected",!0),x.attr("selected",!0)},O=function(){x.remove()};v?(g.$isEmpty=function(e){return!e||0===e.length},h.writeValue=function(e){_.items.forEach(function(e){e.element.selected=!1}),e&&e.forEach(function(e){var t=_.getOptionFromViewValue(e);t&&(t.element.selected=!0)})},h.readValue=function(){var e=n.val()||[],t=[];return r(e,function(e){var n=_.selectValueMap[e];n&&!n.disabled&&t.push(_.getViewValueFromOption(n))}),t},k.trackBy&&e.$watchCollection(function(){if(Kr(g.$viewValue))return g.$viewValue.map(function(e){return k.getTrackByValue(e)})},function(){g.$render()})):(h.writeValue=function(e){var t=_.getOptionFromViewValue(e);t?(n[0].value!==t.selectValue&&(O(),C(),n[0].value=t.selectValue,t.element.selected=!0),t.element.setAttribute("selected","selected")):null===e||w?(O(),E()):(C(),A())},h.readValue=function(){var e=_.selectValueMap[n.val()];return e&&!e.disabled?(C(),O(),_.getViewValueFromOption(e)):null},k.trackBy&&e.$watch(function(){return k.getTrackByValue(g.$viewValue)},function(){g.$render()})),w?(p.remove(),t(p)(e),p.removeClass("ng-scope")):p=Rr(u.cloneNode(!1)),n.empty(),d(),e.$watchCollection(k.getWatchables,d)}var u=e.document.createElement("option"),l=e.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(e,t,n,r){r[0].registerOption=p},post:s}}}],Ia=["$locale","$interpolate","$log",function(e,t,n){var i=/{}/g,o=/^when(Minus)?(.+)$/;return{link:function(a,s,u){function l(e){s.text(e||"")}var c,f=u.count,d=u.$attr.when&&s.attr(u.$attr.when),h=u.offset||0,g=a.$eval(d)||{},v={},$=t.startSymbol(),b=t.endSymbol(),y=$+f+"-"+h+b,w=Gr.noop;r(u,function(e,t){var n=o.exec(t);if(n){var r=(n[1]?"-":"")+Tr(n[2]);g[r]=s.attr(u.$attr[t])}}),r(g,function(e,n){v[n]=t(e.replace(i,y))}),a.$watch(f,function(t){var r=parseFloat(t),i=isNaN(r);if(i||r in g||(r=e.pluralCat(r-h)),r!==c&&!(i&&x(c)&&isNaN(c))){w();var o=v[r];m(o)?(null!=t&&n.debug("ngPluralize: no rule defined for '"+r+"' in "+d),w=p,l()):w=a.$watch(o,l),c=r}})}}}],Ra=["$parse","$animate","$compile",function(e,i,o){var a="$$NG_REMOVED",s=t("ngRepeat"),u=function(e,t,n,r,i,o,a){e[n]=r,i&&(e[i]=o),e.$index=t,e.$first=0===t,e.$last=t===a-1,e.$middle=!(e.$first||e.$last),e.$odd=!(e.$even=0===(1&t))},l=function(e){return e.clone[0]},c=function(e){return e.clone[e.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(t,f){var d=f.ngRepeat,p=o.$$createComment("end ngRepeat",d),h=d.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!h)throw s("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",d);var g=h[1],v=h[2],m=h[3],$=h[4];if(h=g.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!h)throw s("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",g);var b=h[3]||h[1],y=h[2];if(m&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(m)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(m)))throw s("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",m);var w,x,_,k,S={$id:Ze};return $?w=e($):(_=function(e,t){return Ze(t)},k=function(e){return e}),function(e,t,o,f,h){w&&(x=function(t,n,r){return y&&(S[y]=t),S[b]=n,S.$index=r,w(e,S)});var g=he();e.$watchCollection(v,function(o){var f,v,$,w,S,E,C,A,O,M,j,P,T=t[0],D=he();if(m&&(e[m]=o),n(o))O=o,A=x||_;else{A=x||k,O=[];for(var F in o)Pr.call(o,F)&&"$"!==F.charAt(0)&&O.push(F)}for(w=O.length,j=new Array(w),f=0;f<w;f++)if(S=o===O?f:O[f],E=o[S],C=A(S,E,f),g[C])M=g[C],delete g[C],D[C]=M,j[f]=M;else{if(D[C])throw r(j,function(e){e&&e.scope&&(g[e.id]=e)}),s("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",d,C,E);j[f]={id:C,scope:void 0,clone:void 0},D[C]=!0}for(var N in g){if(M=g[N],P=pe(M.clone),i.leave(P),P[0].parentNode)for(f=0,v=P.length;f<v;f++)P[f][a]=!0;M.scope.$destroy()}for(f=0;f<w;f++)if(S=o===O?f:O[f],E=o[S],M=j[f],M.scope){$=T;do $=$.nextSibling;while($&&$[a]);l(M)!=$&&i.move(pe(M.clone),null,T),T=c(M),u(M.scope,f,b,E,y,S,w)}else h(function(e,t){M.scope=t;var n=p.cloneNode(!1);e[e.length++]=n,i.enter(e,null,T),T=n,M.clone=e,D[M.id]=M,u(M.scope,f,b,E,y,S,w)});g=D})}}}}],Ua="ng-hide",Va="ng-hide-animate",za=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngShow,function(t){e[t?"removeClass":"addClass"](n,Ua,{tempClasses:Va})})}}}],La=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngHide,function(t){e[t?"addClass":"removeClass"](n,Ua,{tempClasses:Va})})}}}],qa=cr(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&r(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),Ha=["$animate","$compile",function(e,t){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,i,o,a){var s=o.ngSwitch||o.on,u=[],l=[],c=[],f=[],d=function(e,t){return function(){e.splice(t,1)}};n.$watch(s,function(n){var i,o;for(i=0,o=c.length;i<o;++i)e.cancel(c[i]);for(c.length=0,i=0,o=f.length;i<o;++i){var s=pe(l[i].clone);f[i].$destroy();var p=c[i]=e.leave(s);p.then(d(c,i))}l.length=0,f.length=0,(u=a.cases["!"+n]||a.cases["?"])&&r(u,function(n){n.transclude(function(r,i){f.push(i);var o=n.element;r[r.length++]=t.$$createComment("end ngSwitchWhen");var a={clone:r};l.push(a),e.enter(r,o.parent(),o)})})})}}}],Ba=cr({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["!"+n.ngSwitchWhen]=r.cases["!"+n.ngSwitchWhen]||[],r.cases["!"+n.ngSwitchWhen].push({transclude:i,element:t})}}),Wa=cr({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:t})}}),Ga=t("ngTransclude"),Xa=["$compile",function(e){return{restrict:"EAC",terminal:!0,compile:function(t){var n=e(t.contents());return t.empty(),function(e,t,r,i,o){function a(e,n){e.length?t.append(e):(s(),n.$destroy())}function s(){n(e,function(e){t.append(e)})}if(!o)throw Ga("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",Y(t));r.ngTransclude===r.$attr.ngTransclude&&(r.ngTransclude="");var u=r.ngTransclude||r.ngTranscludeSlot;o(a,null,u),u&&!o.isSlotFilled(u)&&s()}}}}],Ka=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){if("text/ng-template"==n.type){var r=n.id,i=t[0].text;e.put(r,i)}}}}],Ya={$setViewValue:p,$render:p},Za=["$element","$scope",function(t,n){var r=this,i=new Je;r.ngModelCtrl=Ya,r.unknownOption=Rr(e.document.createElement("option")),r.renderUnknownOption=function(e){var n="? "+Ze(e)+" ?";r.unknownOption.val(n),t.prepend(r.unknownOption),t.val(n)},n.$on("$destroy",function(){r.renderUnknownOption=p}),r.removeUnknownOption=function(){r.unknownOption.parent()&&r.unknownOption.remove()},r.readValue=function(){return r.removeUnknownOption(),t.val()},r.writeValue=function(e){r.hasOption(e)?(r.removeUnknownOption(),t.val(e),""===e&&r.emptyOption.prop("selected",!0)):null==e&&r.emptyOption?(r.removeUnknownOption(),t.val("")):r.renderUnknownOption(e)},r.addOption=function(e,t){if(t[0].nodeType!==ui){fe(e,'"option value"'),""===e&&(r.emptyOption=t);var n=i.get(e)||0;i.put(e,n+1),r.ngModelCtrl.$render(),Or(t)}},r.removeOption=function(e){var t=i.get(e);t&&(1===t?(i.remove(e),""===e&&(r.emptyOption=void 0)):i.put(e,t-1))},r.hasOption=function(e){return!!i.get(e)},r.registerOption=function(e,t,n,i,o){if(i){var a;n.$observe("value",function(e){$(a)&&r.removeOption(a),a=e,r.addOption(e,t)})}else o?e.$watch(o,function(e,i){n.$set("value",e),i!==e&&r.removeOption(i),r.addOption(e,t)}):r.addOption(n.value,t);t.on("$destroy",function(){r.removeOption(n.value),r.ngModelCtrl.$render()})}}],Ja=function(){function e(e,t,n,i){var o=i[1];if(o){var a=i[0];if(a.ngModelCtrl=o,t.on("change",function(){e.$apply(function(){o.$setViewValue(a.readValue())})}),n.multiple){a.readValue=function(){var e=[];return r(t.find("option"),function(t){t.selected&&e.push(t.value)}),e},a.writeValue=function(e){var n=new Je(e);r(t.find("option"),function(e){e.selected=$(n.get(e.value))})};var s,u=NaN;e.$watch(function(){u!==o.$viewValue||V(s,o.$viewValue)||(s=ve(o.$viewValue),
8
+ o.$render()),u=o.$viewValue}),o.$isEmpty=function(e){return!e||0===e.length}}}}function t(e,t,n,r){var i=r[1];if(i){var o=r[0];i.$render=function(){o.writeValue(i.$viewValue)}}}return{restrict:"E",require:["select","?ngModel"],controller:Za,priority:1,link:{pre:e,post:t}}},Qa=["$interpolate",function(e){return{restrict:"E",priority:100,compile:function(t,n){if($(n.value))var r=e(n.value,!0);else{var i=e(t.text(),!0);i||n.$set("value",t.text())}return function(e,t,n){var o="$selectController",a=t.parent(),s=a.data(o)||a.parent().data(o);s&&s.registerOption(e,t,n,r,i)}}}}],es=g({restrict:"E",terminal:!1}),ts=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){r&&(n.required=!0,r.$validators.required=function(e,t){return!n.required||!r.$isEmpty(t)},n.$observe("required",function(){r.$validate()}))}}},ns=function(){return{restrict:"A",require:"?ngModel",link:function(e,n,r,i){if(i){var o,a=r.ngPattern||r.pattern;r.$observe("pattern",function(e){if(w(e)&&e.length>0&&(e=new RegExp("^"+e+"$")),e&&!e.test)throw t("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",a,e,Y(n));o=e||void 0,i.$validate()}),i.$validators.pattern=function(e,t){return i.$isEmpty(t)||m(o)||o.test(t)}}}}},rs=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=-1;n.$observe("maxlength",function(e){var t=f(e);i=isNaN(t)?-1:t,r.$validate()}),r.$validators.maxlength=function(e,t){return i<0||r.$isEmpty(t)||t.length<=i}}}}},is=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=0;n.$observe("minlength",function(e){i=f(e)||0,r.$validate()}),r.$validators.minlength=function(e,t){return r.$isEmpty(t)||t.length>=i}}}}};return e.angular.bootstrap?void(e.console&&console.log("WARNING: Tried to load angular more than once.")):(ue(),be(Gr),Gr.module("ngLocale",[],["$provide",function(e){function t(e){e+="";var t=e.indexOf(".");return t==-1?0:e.length-t-1}function n(e,n){var r=n;void 0===r&&(r=Math.min(t(e),3));var i=Math.pow(10,r),o=(e*i|0)%i;return{v:r,f:o}}var r={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};e.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],STANDALONEMONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(e,t){var i=0|e,o=n(e,t);return 1==i&&0==o.v?r.ONE:r.OTHER}})}]),void Rr(e.document).ready(function(){re(e.document,ie)}))}(window),!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>')},{}],46:[function(e,t,n){e("./angular"),t.exports=angular},{"./angular":45}],47:[function(e,t,n){!function(){function e(e,t){window.XMLHttpRequest.prototype[e]=t(window.XMLHttpRequest.prototype[e])}function t(e,t,n){try{Object.defineProperty(e,t,{get:n})}catch(r){}}if(window.FileAPI||(window.FileAPI={}),!window.XMLHttpRequest)throw"AJAX is not supported. XMLHttpRequest is not defined.";if(FileAPI.shouldLoad=!window.FormData||FileAPI.forceLoad,FileAPI.shouldLoad){var n=function(e){if(!e.__listeners){e.upload||(e.upload={}),e.__listeners=[];var t=e.upload.addEventListener;e.upload.addEventListener=function(n,r){e.__listeners[n]=r,t&&t.apply(this,arguments)}}};e("open",function(e){return function(t,r,i){n(this),this.__url=r;try{e.apply(this,[t,r,i])}catch(o){o.message.indexOf("Access is denied")>-1&&(this.__origError=o,e.apply(this,[t,"_fix_for_ie_crossdomain__",i]))}}}),e("getResponseHeader",function(e){return function(t){return this.__fileApiXHR&&this.__fileApiXHR.getResponseHeader?this.__fileApiXHR.getResponseHeader(t):null==e?null:e.apply(this,[t])}}),e("getAllResponseHeaders",function(e){return function(){return this.__fileApiXHR&&this.__fileApiXHR.getAllResponseHeaders?this.__fileApiXHR.getAllResponseHeaders():null==e?null:e.apply(this)}}),e("abort",function(e){return function(){return this.__fileApiXHR&&this.__fileApiXHR.abort?this.__fileApiXHR.abort():null==e?null:e.apply(this)}}),e("setRequestHeader",function(e){return function(t,r){if("__setXHR_"===t){n(this);var i=r(this);i instanceof Function&&i(this)}else this.__requestHeaders=this.__requestHeaders||{},this.__requestHeaders[t]=r,e.apply(this,arguments)}}),e("send",function(e){return function(){var n=this;if(arguments[0]&&arguments[0].__isFileAPIShim){var r=arguments[0],i={url:n.__url,jsonp:!1,cache:!0,complete:function(e,r){e&&angular.isString(e)&&e.indexOf("#2174")!==-1&&(e=null),n.__completed=!0,!e&&n.__listeners.load&&n.__listeners.load({type:"load",loaded:n.__loaded,total:n.__total,target:n,lengthComputable:!0}),!e&&n.__listeners.loadend&&n.__listeners.loadend({type:"loadend",loaded:n.__loaded,total:n.__total,target:n,lengthComputable:!0}),"abort"===e&&n.__listeners.abort&&n.__listeners.abort({type:"abort",loaded:n.__loaded,total:n.__total,target:n,lengthComputable:!0}),void 0!==r.status&&t(n,"status",function(){return 0===r.status&&e&&"abort"!==e?500:r.status}),void 0!==r.statusText&&t(n,"statusText",function(){return r.statusText}),t(n,"readyState",function(){return 4}),void 0!==r.response&&t(n,"response",function(){return r.response});var i=r.responseText||(e&&0===r.status&&"abort"!==e?e:void 0);t(n,"responseText",function(){return i}),t(n,"response",function(){return i}),e&&t(n,"err",function(){return e}),n.__fileApiXHR=r,n.onreadystatechange&&n.onreadystatechange(),n.onload&&n.onload()},progress:function(e){if(e.target=n,n.__listeners.progress&&n.__listeners.progress(e),n.__total=e.total,n.__loaded=e.loaded,e.total===e.loaded){var t=this;setTimeout(function(){n.__completed||(n.getAllResponseHeaders=function(){},t.complete(null,{status:204,statusText:"No Content"}))},FileAPI.noContentTimeout||1e4)}},headers:n.__requestHeaders};i.data={},i.files={};for(var o=0;o<r.data.length;o++){var a=r.data[o];null!=a.val&&null!=a.val.name&&null!=a.val.size&&null!=a.val.type?i.files[a.key]=a.val:i.data[a.key]=a.val}setTimeout(function(){if(!FileAPI.hasFlash)throw'Adode Flash Player need to be installed. To check ahead use "FileAPI.hasFlash"';n.__fileApiXHR=FileAPI.upload(i)},1)}else{if(this.__origError)throw this.__origError;e.apply(n,arguments)}}}),window.XMLHttpRequest.__isFileAPIShim=!0,window.FormData=FormData=function(){return{append:function(e,t,n){t.__isFileAPIBlobShim&&(t=t.data[0]),this.data.push({key:e,val:t,name:n})},data:[],__isFileAPIShim:!0}},window.Blob=Blob=function(e){return{data:e,__isFileAPIBlobShim:!0}}}}(),function(){function e(e){return"input"===e[0].tagName.toLowerCase()&&e.attr("type")&&"file"===e.attr("type").toLowerCase()}function t(){try{var e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(e)return!0}catch(t){if(void 0!==navigator.mimeTypes["application/x-shockwave-flash"])return!0}return!1}function n(e){var t=0,n=0;if(window.jQuery)return jQuery(e).offset();if(e.offsetParent)do t+=e.offsetLeft-e.scrollLeft,n+=e.offsetTop-e.scrollTop,e=e.offsetParent;while(e);return{left:t,top:n}}if(FileAPI.shouldLoad){if(FileAPI.hasFlash=t(),FileAPI.forceLoad&&(FileAPI.html5=!1),!FileAPI.upload){var r,i,o,a,s,u=document.createElement("script"),l=document.getElementsByTagName("script");if(window.FileAPI.jsUrl)r=window.FileAPI.jsUrl;else if(window.FileAPI.jsPath)i=window.FileAPI.jsPath;else for(o=0;o<l.length;o++)if(s=l[o].src,a=s.search(/\/ng\-file\-upload[\-a-zA-z0-9\.]*\.js/),a>-1){i=s.substring(0,a+1);break}null==FileAPI.staticPath&&(FileAPI.staticPath=i),u.setAttribute("src",r||i+"FileAPI.min.js"),document.getElementsByTagName("head")[0].appendChild(u)}FileAPI.ngfFixIE=function(r,i,o){if(!t())throw'Adode Flash Player need to be installed. To check ahead use "FileAPI.hasFlash"';var a=function(){var t=i.parent();r.attr("disabled")?t&&t.removeClass("js-fileapi-wrapper"):(i.attr("__ngf_flash_")||(i.unbind("change"),i.unbind("click"),i.bind("change",function(e){s.apply(this,[e]),o.apply(this,[e])}),i.attr("__ngf_flash_","true")),t.addClass("js-fileapi-wrapper"),e(r)||(t.css("position","absolute").css("top",n(r[0]).top+"px").css("left",n(r[0]).left+"px").css("width",r[0].offsetWidth+"px").css("height",r[0].offsetHeight+"px").css("filter","alpha(opacity=0)").css("display",r.css("display")).css("overflow","hidden").css("z-index","900000").css("visibility","visible"),i.css("width",r[0].offsetWidth+"px").css("height",r[0].offsetHeight+"px").css("position","absolute").css("top","0px").css("left","0px")))};r.bind("mouseenter",a);var s=function(e){for(var t=FileAPI.getFiles(e),n=0;n<t.length;n++)void 0===t[n].size&&(t[n].size=0),void 0===t[n].name&&(t[n].name="file"),void 0===t[n].type&&(t[n].type="undefined");e.target||(e.target={}),e.target.files=t,e.target.files!==t&&(e.__files_=t),(e.__files_||e.target.files).item=function(t){return(e.__files_||e.target.files)[t]||null}}},FileAPI.disableFileInput=function(e,t){t?e.removeClass("js-fileapi-wrapper"):e.addClass("js-fileapi-wrapper")}}}(),window.FileReader||(window.FileReader=function(){var e=this,t=!1;this.listeners={},this.addEventListener=function(t,n){e.listeners[t]=e.listeners[t]||[],e.listeners[t].push(n)},this.removeEventListener=function(t,n){e.listeners[t]&&e.listeners[t].splice(e.listeners[t].indexOf(n),1)},this.dispatchEvent=function(t){var n=e.listeners[t.type];if(n)for(var r=0;r<n.length;r++)n[r].call(e,t)},this.onabort=this.onerror=this.onload=this.onloadstart=this.onloadend=this.onprogress=null;var n=function(t,n){var r={type:t,target:e,loaded:n.loaded,total:n.total,error:n.error};return null!=n.result&&(r.target.result=n.result),r},r=function(r){t||(t=!0,e.onloadstart&&e.onloadstart(n("loadstart",r)));var i;"load"===r.type?(e.onloadend&&e.onloadend(n("loadend",r)),i=n("load",r),e.onload&&e.onload(i),e.dispatchEvent(i)):"progress"===r.type?(i=n("progress",r),e.onprogress&&e.onprogress(i),e.dispatchEvent(i)):(i=n("error",r),e.onerror&&e.onerror(i),e.dispatchEvent(i))};this.readAsDataURL=function(e){FileAPI.readAsDataURL(e,r)},this.readAsText=function(e){FileAPI.readAsText(e,r)}}),!window.XMLHttpRequest||window.FileAPI&&FileAPI.shouldLoad||(window.XMLHttpRequest.prototype.setRequestHeader=function(e){return function(t,n){if("__setXHR_"===t){var r=n(this);r instanceof Function&&r(this)}else e.apply(this,arguments)}}(window.XMLHttpRequest.prototype.setRequestHeader));var r=angular.module("ngFileUpload",[]);r.version="12.2.12",r.service("UploadBase",["$http","$q","$timeout",function(e,t,n){function i(r){function i(e){l.notify&&l.notify(e),c.progressFunc&&n(function(){c.progressFunc(e)})}function o(e){return null!=r._start&&s?{loaded:e.loaded+r._start,total:r._file&&r._file.size||e.total,type:e.type,config:r,lengthComputable:!0,target:e.target}:e}function u(){e(r).then(function(e){if(s&&r._chunkSize&&!r._finished&&r._file){var t=r._file&&r._file.size||0;i({loaded:Math.min(r._end,t),total:t,config:r,type:"progress"}),a.upload(r,!0)}else r._finished&&delete r._finished,l.resolve(e)},function(e){l.reject(e)},function(e){l.notify(e)})}r.method=r.method||"POST",r.headers=r.headers||{};var l=r._deferred=r._deferred||t.defer(),c=l.promise;return r.disableProgress||(r.headers.__setXHR_=function(){return function(e){e&&e.upload&&e.upload.addEventListener&&(r.__XHR=e,r.xhrFn&&r.xhrFn(e),e.upload.addEventListener("progress",function(e){e.config=r,i(o(e))},!1),e.upload.addEventListener("load",function(e){e.lengthComputable&&(e.config=r,i(o(e)))},!1))}}),s?r._chunkSize&&r._end&&!r._finished?(r._start=r._end,r._end+=r._chunkSize,u()):r.resumeSizeUrl?e.get(r.resumeSizeUrl).then(function(e){r.resumeSizeResponseReader?r._start=r.resumeSizeResponseReader(e.data):r._start=parseInt((null==e.data.size?e.data:e.data.size).toString()),r._chunkSize&&(r._end=r._start+r._chunkSize),u()},function(e){throw e}):r.resumeSize?r.resumeSize().then(function(e){r._start=e,r._chunkSize&&(r._end=r._start+r._chunkSize),u()},function(e){throw e}):(r._chunkSize&&(r._start=0,r._end=r._start+r._chunkSize),u()):u(),c.success=function(e){return c.then(function(t){e(t.data,t.status,t.headers,r)}),c},c.error=function(e){return c.then(null,function(t){e(t.data,t.status,t.headers,r)}),c},c.progress=function(e){return c.progressFunc=e,c.then(null,null,function(t){e(t)}),c},c.abort=c.pause=function(){return r.__XHR&&n(function(){r.__XHR.abort()}),c},c.xhr=function(e){return r.xhrFn=function(t){return function(){t&&t.apply(c,arguments),e.apply(c,arguments)}}(r.xhrFn),c},a.promisesCount++,c["finally"]&&c["finally"]instanceof Function&&c["finally"](function(){a.promisesCount--}),c}function o(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var a=this;a.promisesCount=0,this.isResumeSupported=function(){return window.Blob&&window.Blob.prototype.slice};var s=this.isResumeSupported();this.isUploadInProgress=function(){return a.promisesCount>0},this.rename=function(e,t){return e.ngfName=t,e},this.jsonBlob=function(e){null==e||angular.isString(e)||(e=JSON.stringify(e));var t=new window.Blob([e],{type:"application/json"});return t._ngfBlob=!0,t},this.json=function(e){return angular.toJson(e)},this.isFile=function(e){return null!=e&&(e instanceof window.Blob||e.flashId&&e.name&&e.size)},this.upload=function(e,t){function n(t,n){if(t._ngfBlob)return t;if(e._file=e._file||t,null!=e._start&&s){e._end&&e._end>=t.size&&(e._finished=!0,e._end=t.size);var r=t.slice(e._start,e._end||t.size);return r.name=t.name,r.ngfName=t.ngfName,e._chunkSize&&(n.append("_chunkSize",e._chunkSize),n.append("_currentChunkSize",e._end-e._start),n.append("_chunkNumber",Math.floor(e._start/e._chunkSize)),n.append("_totalSize",e._file.size)),r}return t}function r(t,i,o){if(void 0!==i)if(angular.isDate(i)&&(i=i.toISOString()),angular.isString(i))t.append(o,i);else if(a.isFile(i)){var s=n(i,t),u=o.split(",");u[1]&&(s.ngfName=u[1].replace(/^\s+|\s+$/g,""),o=u[0]),e._fileKey=e._fileKey||o,t.append(o,s,s.ngfName||s.name)}else if(angular.isObject(i)){if(i.$$ngfCircularDetection)throw"ngFileUpload: Circular reference in config.data. Make sure specified data for Upload.upload() has no circular reference: "+o;i.$$ngfCircularDetection=!0;try{for(var l in i)if(i.hasOwnProperty(l)&&"$$ngfCircularDetection"!==l){var c=null==e.objectKey?"[i]":e.objectKey;i.length&&parseInt(l)>-1&&(c=null==e.arrayKey?c:e.arrayKey),r(t,i[l],o+c.replace(/[ik]/g,l))}}finally{delete i.$$ngfCircularDetection}}else t.append(o,i)}function u(){e._chunkSize=a.translateScalars(e.resumeChunkSize),e._chunkSize=e._chunkSize?parseInt(e._chunkSize.toString()):null,e.headers=e.headers||{},e.headers["Content-Type"]=void 0,e.transformRequest=e.transformRequest?angular.isArray(e.transformRequest)?e.transformRequest:[e.transformRequest]:[],e.transformRequest.push(function(t){var n,i=new window.FormData;t=t||e.fields||{},e.file&&(t.file=e.file);for(n in t)if(t.hasOwnProperty(n)){var o=t[n];e.formDataAppender?e.formDataAppender(i,n,o):r(i,o,n)}return i})}return t||(e=o(e)),e._isDigested||(e._isDigested=!0,u()),i(e)},this.http=function(t){return t=o(t),t.transformRequest=t.transformRequest||function(t){return window.ArrayBuffer&&t instanceof window.ArrayBuffer||t instanceof window.Blob?t:e.defaults.transformRequest[0].apply(this,arguments)},t._chunkSize=a.translateScalars(t.resumeChunkSize),t._chunkSize=t._chunkSize?parseInt(t._chunkSize.toString()):null,i(t)},this.translateScalars=function(e){if(angular.isString(e)){if(e.search(/kb/i)===e.length-2)return parseFloat(1024*e.substring(0,e.length-2));if(e.search(/mb/i)===e.length-2)return parseFloat(1048576*e.substring(0,e.length-2));if(e.search(/gb/i)===e.length-2)return parseFloat(1073741824*e.substring(0,e.length-2));if(e.search(/b/i)===e.length-1)return parseFloat(e.substring(0,e.length-1));if(e.search(/s/i)===e.length-1)return parseFloat(e.substring(0,e.length-1));if(e.search(/m/i)===e.length-1)return parseFloat(60*e.substring(0,e.length-1));if(e.search(/h/i)===e.length-1)return parseFloat(3600*e.substring(0,e.length-1))}return e},this.urlToBlob=function(n){var r=t.defer();return e({url:n,method:"get",responseType:"arraybuffer"}).then(function(e){var t=new Uint8Array(e.data),i=e.headers("content-type")||"image/WebP",o=new window.Blob([t],{type:i}),a=n.match(/.*\/(.+?)(\?.*)?$/);a.length>1&&(o.name=a[1]),r.resolve(o)},function(e){r.reject(e)}),r.promise},this.setDefaults=function(e){this.defaults=e||{}},this.defaults={},this.version=r.version}]),r.service("Upload",["$parse","$timeout","$compile","$q","UploadExif",function(e,t,n,r,i){function o(e,t,n){var i=[u.emptyPromise()];return angular.forEach(e,function(r,o){0===r.type.indexOf("image/jpeg")&&u.attrGetter("ngfFixOrientation",t,n,{$file:r})&&i.push(u.happyPromise(u.applyExifRotation(r),r).then(function(t){e.splice(o,1,t)}))}),r.all(i)}function a(e,t,n,i){var o=u.attrGetter("ngfResize",t,n);if(!o||!u.isResizeSupported()||!e.length)return u.emptyPromise();if(o instanceof Function){var a=r.defer();return o(e).then(function(r){s(r,e,t,n,i).then(function(e){a.resolve(e)},function(e){a.reject(e)})},function(e){a.reject(e)})}return s(o,e,t,n,i)}function s(e,t,n,i,o){function a(r,a){if(0===r.type.indexOf("image")){if(e.pattern&&!u.validatePattern(r,e.pattern))return;e.resizeIf=function(e,t){return u.attrGetter("ngfResizeIf",n,i,{$width:e,$height:t,$file:r})};var l=u.resize(r,e);s.push(l),l.then(function(e){t.splice(a,1,e)},function(e){r.$error="resize",(r.$errorMessages=r.$errorMessages||{}).resize=!0,r.$errorParam=(e?(e.message?e.message:e)+": ":"")+(r&&r.name),o.$ngfValidations.push({name:"resize",valid:!1}),u.applyModelValidation(o,t)})}}for(var s=[u.emptyPromise()],l=0;l<t.length;l++)a(t[l],l);return r.all(s)}var u=i;return u.getAttrWithDefaults=function(e,t){if(null!=e[t])return e[t];var n=u.defaults[t];return null==n?n:angular.isString(n)?n:JSON.stringify(n)},u.attrGetter=function(t,n,r,i){var o=this.getAttrWithDefaults(n,t);if(!r)return o;try{return i?e(o)(r,i):e(o)(r)}catch(a){if(t.search(/min|max|pattern/i))return o;throw a}},u.shouldUpdateOn=function(e,t,n){var r=u.attrGetter("ngfModelOptions",t,n);return!r||!r.updateOn||r.updateOn.split(" ").indexOf(e)>-1},u.emptyPromise=function(){var e=r.defer(),n=arguments;return t(function(){e.resolve.apply(e,n)}),e.promise},u.rejectPromise=function(){var e=r.defer(),n=arguments;return t(function(){e.reject.apply(e,n)}),e.promise},u.happyPromise=function(e,n){var i=r.defer();return e.then(function(e){i.resolve(e)},function(e){t(function(){throw e}),i.resolve(n)}),i.promise},u.updateModel=function(n,r,i,s,l,c,f){function d(o,a,l,f,d){r.$$ngfPrevValidFiles=o,r.$$ngfPrevInvalidFiles=a;var p=o&&o.length?o[0]:null,h=a&&a.length?a[0]:null;n&&(u.applyModelValidation(n,o),n.$setViewValue(d?p:o)),s&&e(s)(i,{$files:o,$file:p,$newFiles:l,$duplicateFiles:f,$invalidFiles:a,$invalidFile:h,$event:c});var g=u.attrGetter("ngfModelInvalid",r);g&&t(function(){e(g).assign(i,d?h:a)}),t(function(){})}function p(){function e(e,t){return e.name===t.name&&(e.$ngfOrigSize||e.size)===(t.$ngfOrigSize||t.size)&&e.type===t.type}function t(t){var n;for(n=0;n<m.length;n++)if(e(t,m[n]))return!0;for(n=0;n<$.length;n++)if(e(t,$[n]))return!0;return!1}if(l){v=[],b=[];for(var n=0;n<l.length;n++)t(l[n])?b.push(l[n]):v.push(l[n])}}function h(e){return angular.isArray(e)?e:[e]}function g(){function e(){t(function(){d(x?m.concat(w):w,x?$.concat(y):y,l,b,_)},S&&S.debounce?S.debounce.change||S.debounce:0)}var o=k?v:w;a(o,r,i,n).then(function(){k?u.validate(v,x?m.length:0,n,r,i).then(function(t){w=t.validsFiles,y=t.invalidsFiles,e()}):e()},function(){for(var t=0;t<o.length;t++){var n=o[t];if("resize"===n.$error){var r=w.indexOf(n);r>-1&&(w.splice(r,1),y.push(n)),e()}}})}var v,m,$,b=[],y=[],w=[];m=r.$$ngfPrevValidFiles||[],$=r.$$ngfPrevInvalidFiles||[],n&&n.$modelValue&&(m=h(n.$modelValue));var x=u.attrGetter("ngfKeep",r,i);v=(l||[]).slice(0),"distinct"!==x&&u.attrGetter("ngfKeepDistinct",r,i)!==!0||p(r,i);var _=!x&&!u.attrGetter("ngfMultiple",r,i)&&!u.attrGetter("multiple",r);if(!x||v.length){u.attrGetter("ngfBeforeModelChange",r,i,{$files:l,$file:l&&l.length?l[0]:null,$newFiles:v,$duplicateFiles:b,$event:c});var k=u.attrGetter("ngfValidateAfterResize",r,i),S=u.attrGetter("ngfModelOptions",r,i);u.validate(v,x?m.length:0,n,r,i).then(function(e){f?d(v,[],l,b,_):(S&&S.allowInvalid||k?w=v:(w=e.validFiles,y=e.invalidFiles),u.attrGetter("ngfFixOrientation",r,i)&&u.isExifSupported()?o(w,r,i).then(function(){g()}):g())})}},u}]),r.directive("ngfSelect",["$parse","$timeout","$compile","Upload",function(e,t,n,r){function i(e){var t=e.match(/Android[^\d]*(\d+)\.(\d+)/);if(t&&t.length>2){var n=r.defaults.androidFixMinorVersion||4;return parseInt(t[1])<4||parseInt(t[1])===n&&parseInt(t[2])<n}return e.indexOf("Chrome")===-1&&/.*Windows.*Safari.*/.test(e)}function o(e,t,n,r,o,s,u,l){function c(){return"input"===t[0].tagName.toLowerCase()&&n.type&&"file"===n.type.toLowerCase()}function f(){return b("ngfChange")||b("ngfSelect")}function d(t){if(l.shouldUpdateOn("change",n,e)){var i=t.__files_||t.target&&t.target.files,o=[];if(!i)return;for(var a=0;a<i.length;a++)o.push(i[a]);l.updateModel(r,n,e,f(),o.length?o:null,t)}}function p(e,r){function i(t){e.attr("id","ngf-"+t),r.attr("id","ngf-label-"+t)}for(var o=0;o<t[0].attributes.length;o++){var a=t[0].attributes[o];"type"!==a.name&&"class"!==a.name&&"style"!==a.name&&("id"===a.name?(i(a.value),y.push(n.$observe("id",i))):e.attr(a.name,a.value||"required"!==a.name&&"multiple"!==a.name?a.value:a.name))}}function h(){if(c())return t;var e=angular.element('<input type="file">'),n=angular.element("<label>upload</label>");return n.css("visibility","hidden").css("position","absolute").css("overflow","hidden").css("width","0px").css("height","0px").css("border","none").css("margin","0px").css("padding","0px").attr("tabindex","-1"),p(e,n),a.push({el:t,ref:n}),document.body.appendChild(n.append(e)[0]),e}function g(n){if(t.attr("disabled"))return!1;if(!b("ngfSelectDisabled",e)){var r=v(n);if(null!=r)return r;m(n);try{c()||document.body.contains(_[0])||(a.push({el:t,ref:_.parent()}),document.body.appendChild(_.parent()[0]),_.bind("change",d))}catch(o){}return i(navigator.userAgent)?setTimeout(function(){_[0].click()},0):_[0].click(),!1}}function v(e){var t=e.changedTouches||e.originalEvent&&e.originalEvent.changedTouches;if(t){if("touchstart"===e.type)return x=t[0].clientX,w=t[0].clientY,!0;if("touchend"===e.type){var n=t[0].clientX,r=t[0].clientY;if(Math.abs(n-x)>20||Math.abs(r-w)>20)return e.stopPropagation(),e.preventDefault(),!1}return!0}}function m(t){l.shouldUpdateOn("click",n,e)&&_.val()&&(_.val(null),l.updateModel(r,n,e,f(),null,t,!0))}function $(e){if(_&&!_.attr("__ngf_ie10_Fix_")){if(!_[0].parentNode)return void(_=null);e.preventDefault(),e.stopPropagation(),_.unbind("click");var t=_.clone();return _.replaceWith(t),_=t,_.attr("__ngf_ie10_Fix_","true"),_.bind("change",d),_.bind("click",$),_[0].click(),!1}_.removeAttr("__ngf_ie10_Fix_")}var b=function(e,t){return l.attrGetter(e,n,t)};l.registerModelChangeValidator(r,n,e);var y=[];b("ngfMultiple")&&y.push(e.$watch(b("ngfMultiple"),function(){_.attr("multiple",b("ngfMultiple",e))})),b("ngfCapture")&&y.push(e.$watch(b("ngfCapture"),function(){_.attr("capture",b("ngfCapture",e))})),b("ngfAccept")&&y.push(e.$watch(b("ngfAccept"),function(){_.attr("accept",b("ngfAccept",e))})),y.push(n.$observe("accept",function(){_.attr("accept",b("accept"))}));var w=0,x=0,_=t;c()||(_=h()),_.bind("change",d),c()?t.bind("click",m):t.bind("click touchstart touchend",g),navigator.appVersion.indexOf("MSIE 10")!==-1&&_.bind("click",$),r&&r.$formatters.push(function(e){return null!=e&&0!==e.length||_.val()&&_.val(null),e}),e.$on("$destroy",function(){c()||_.parent().remove(),angular.forEach(y,function(e){e()})}),s(function(){for(var e=0;e<a.length;e++){var t=a[e];document.body.contains(t.el[0])||(a.splice(e,1),t.ref.remove())}}),window.FileAPI&&window.FileAPI.ngfFixIE&&window.FileAPI.ngfFixIE(t,_,d)}var a=[];return{restrict:"AEC",require:"?ngModel",link:function(i,a,s,u){o(i,a,s,u,e,t,n,r)}}}]),function(){function e(e){return"img"===e.tagName.toLowerCase()?"image":"audio"===e.tagName.toLowerCase()?"audio":"video"===e.tagName.toLowerCase()?"video":/./}function t(t,n,r,i,o,a,s,u){function l(e){var a=t.attrGetter("ngfNoObjectUrl",o,r);t.dataUrl(e,a)["finally"](function(){n(function(){var t=(a?e.$ngfDataUrl:e.$ngfBlobUrl)||e.$ngfDataUrl;u?i.css("background-image","url('"+(t||"")+"')"):i.attr("src",t),t?i.removeClass("ng-hide"):i.addClass("ng-hide")})})}n(function(){var n=r.$watch(o[a],function(n){var c=s;if("ngfThumbnail"===a&&(c||(c={width:i[0].naturalWidth||i[0].clientWidth,height:i[0].naturalHeight||i[0].clientHeight}),0===c.width&&window.getComputedStyle)){var f=getComputedStyle(i[0]);c={width:parseInt(f.width.slice(0,-2)),height:parseInt(f.height.slice(0,-2))}}return angular.isString(n)?(i.removeClass("ng-hide"),u?i.css("background-image","url('"+n+"')"):i.attr("src",n)):void(!n||!n.type||0!==n.type.search(e(i[0]))||u&&0!==n.type.indexOf("image")?i.addClass("ng-hide"):c&&t.isResizeSupported()?(c.resizeIf=function(e,i){return t.attrGetter("ngfResizeIf",o,r,{$width:e,$height:i,$file:n})},t.resize(n,c).then(function(e){l(e)},function(e){throw e})):l(n))});r.$on("$destroy",function(){n()})})}r.service("UploadDataUrl",["UploadBase","$timeout","$q",function(e,t,n){var r=e;return r.base64DataUrl=function(e){if(angular.isArray(e)){var t=n.defer(),i=0;return angular.forEach(e,function(n){r.dataUrl(n,!0)["finally"](function(){if(i++,i===e.length){var n=[];angular.forEach(e,function(e){n.push(e.$ngfDataUrl)}),t.resolve(n,e)}})}),t.promise}return r.dataUrl(e,!0)},r.dataUrl=function(e,i){if(!e)return r.emptyPromise(e,e);if(i&&null!=e.$ngfDataUrl||!i&&null!=e.$ngfBlobUrl)return r.emptyPromise(i?e.$ngfDataUrl:e.$ngfBlobUrl,e);var o=i?e.$$ngfDataUrlPromise:e.$$ngfBlobUrlPromise;if(o)return o;var a=n.defer();return t(function(){if(window.FileReader&&e&&(!window.FileAPI||navigator.userAgent.indexOf("MSIE 8")===-1||e.size<2e4)&&(!window.FileAPI||navigator.userAgent.indexOf("MSIE 9")===-1||e.size<4e6)){var n=window.URL||window.webkitURL;if(n&&n.createObjectURL&&!i){var o;try{o=n.createObjectURL(e)}catch(s){return void t(function(){e.$ngfBlobUrl="",a.reject()})}t(function(){if(e.$ngfBlobUrl=o,o){a.resolve(o,e),r.blobUrls=r.blobUrls||[],r.blobUrlsTotalSize=r.blobUrlsTotalSize||0,r.blobUrls.push({url:o,size:e.size}),r.blobUrlsTotalSize+=e.size||0;for(var t=r.defaults.blobUrlsMaxMemory||268435456,i=r.defaults.blobUrlsMaxQueueSize||200;(r.blobUrlsTotalSize>t||r.blobUrls.length>i)&&r.blobUrls.length>1;){var s=r.blobUrls.splice(0,1)[0];n.revokeObjectURL(s.url),r.blobUrlsTotalSize-=s.size}}})}else{var u=new FileReader;u.onload=function(n){t(function(){e.$ngfDataUrl=n.target.result,a.resolve(n.target.result,e),t(function(){delete e.$ngfDataUrl},1e3)})},u.onerror=function(){t(function(){e.$ngfDataUrl="",a.reject()})},u.readAsDataURL(e)}}else t(function(){e[i?"$ngfDataUrl":"$ngfBlobUrl"]="",a.reject()})}),o=i?e.$$ngfDataUrlPromise=a.promise:e.$$ngfBlobUrlPromise=a.promise,o["finally"](function(){delete e[i?"$$ngfDataUrlPromise":"$$ngfBlobUrlPromise"]}),o},r}]),r.directive("ngfSrc",["Upload","$timeout",function(e,n){return{restrict:"AE",link:function(r,i,o){t(e,n,r,i,o,"ngfSrc",e.attrGetter("ngfResize",o,r),!1)}}}]),r.directive("ngfBackground",["Upload","$timeout",function(e,n){return{restrict:"AE",link:function(r,i,o){t(e,n,r,i,o,"ngfBackground",e.attrGetter("ngfResize",o,r),!0)}}}]),r.directive("ngfThumbnail",["Upload","$timeout",function(e,n){return{restrict:"AE",link:function(r,i,o){var a=e.attrGetter("ngfSize",o,r);t(e,n,r,i,o,"ngfThumbnail",a,e.attrGetter("ngfAsBackground",o,r))}}}]),r.config(["$compileProvider",function(e){e.imgSrcSanitizationWhitelist&&e.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|webcal|local|file|data|blob):/),e.aHrefSanitizationWhitelist&&e.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|webcal|local|file|data|blob):/)}]),r.filter("ngfDataUrl",["UploadDataUrl","$sce",function(e,t){return function(n,r,i){if(angular.isString(n))return t.trustAsResourceUrl(n);var o=n&&((r?n.$ngfDataUrl:n.$ngfBlobUrl)||n.$ngfDataUrl);return n&&!o?(!n.$ngfDataUrlFilterInProgress&&angular.isObject(n)&&(n.$ngfDataUrlFilterInProgress=!0,e.dataUrl(n,r)),""):(n&&delete n.$ngfDataUrlFilterInProgress,(n&&o?i?t.trustAsResourceUrl(o):o:n)||"")}}])}(),r.service("UploadValidate",["UploadDataUrl","$q","$timeout",function(e,t,n){function r(e){var t="",n=[];if(e.length>2&&"/"===e[0]&&"/"===e[e.length-1])t=e.substring(1,e.length-1);else{var i=e.split(",");if(i.length>1)for(var o=0;o<i.length;o++){var a=r(i[o]);a.regexp?(t+="("+a.regexp+")",o<i.length-1&&(t+="|")):n=n.concat(a.excludes)}else 0===e.indexOf("!")?n.push("^((?!"+r(e.substring(1)).regexp+").)*$"):(0===e.indexOf(".")&&(e="*"+e),t="^"+e.replace(new RegExp("[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\-]","g"),"\\$&")+"$",t=t.replace(/\\\*/g,".*").replace(/\\\?/g,"."))}return{regexp:t,excludes:n}}function i(e,t){null==t||e.$dirty||(e.$setDirty?e.$setDirty():e.$dirty=!0)}var o=e;return o.validatePattern=function(e,t){if(!t)return!0;var n=r(t),i=!0;if(n.regexp&&n.regexp.length){var o=new RegExp(n.regexp,"i");i=null!=e.type&&o.test(e.type)||null!=e.name&&o.test(e.name)}for(var a=n.excludes.length;a--;){var s=new RegExp(n.excludes[a],"i");i=i&&(null==e.type||s.test(e.type))&&(null==e.name||s.test(e.name))}return i},o.ratioToFloat=function(e){var t=e.toString(),n=t.search(/[x:]/i);return t=n>-1?parseFloat(t.substring(0,n))/parseFloat(t.substring(n+1)):parseFloat(t)},o.registerModelChangeValidator=function(e,t,n){e&&e.$formatters.push(function(r){if(e.$dirty){var i=r;r&&!angular.isArray(r)&&(i=[r]),o.validate(i,0,e,t,n).then(function(){o.applyModelValidation(e,i)})}return r})},o.applyModelValidation=function(e,t){i(e,t),angular.forEach(e.$ngfValidations,function(t){e.$setValidity(t.name,t.valid)})},o.getValidationAttr=function(e,t,n,r,i){var a="ngf"+n[0].toUpperCase()+n.substr(1),s=o.attrGetter(a,e,t,{$file:i});if(null==s&&(s=o.attrGetter("ngfValidate",e,t,{$file:i}))){var u=(r||n).split(".");s=s[u[0]],u.length>1&&(s=s&&s[u[1]])}return s},o.validate=function(e,n,r,i,a){function s(t,n,s){if(e){for(var u=e.length,l=null;u--;){var p=e[u];if(p){var h=o.getValidationAttr(i,a,t,n,p);null!=h&&(s(p,h,u)||(c.indexOf(t)===-1?(p.$error=t,(p.$errorMessages=p.$errorMessages||{})[t]=!0,p.$errorParam=h,d.indexOf(p)===-1&&d.push(p),f||e.splice(u,1),l=!1):e.splice(u,1)))}}null!==l&&r.$ngfValidations.push({name:t,valid:l})}}function u(n,s,u,p,h){function g(t,r,i){function o(o){if(o())if(c.indexOf(n)===-1){if(r.$error=n,(r.$errorMessages=r.$errorMessages||{})[n]=!0,r.$errorParam=i,d.indexOf(r)===-1&&d.push(r),!f){var a=e.indexOf(r);a>-1&&e.splice(a,1)}t.resolve(!1)}else{var s=e.indexOf(r);s>-1&&e.splice(s,1),t.resolve(!0)}else t.resolve(!0)}null!=i?p(r,i).then(function(e){o(function(){return!h(e,i)})},function(){o(function(){return l("ngfValidateForce",{$file:r})})}):t.resolve(!0)}var v=[o.emptyPromise(!0)];e&&(e=void 0===e.length?[e]:e,angular.forEach(e,function(e){var r=t.defer();return v.push(r.promise),
9
+ !u||null!=e.type&&0===e.type.search(u)?void("dimensions"===n&&null!=o.attrGetter("ngfDimensions",i)?o.imageDimensions(e).then(function(t){g(r,e,l("ngfDimensions",{$file:e,$width:t.width,$height:t.height}))},function(){r.resolve(!1)}):"duration"===n&&null!=o.attrGetter("ngfDuration",i)?o.mediaDuration(e).then(function(t){g(r,e,l("ngfDuration",{$file:e,$duration:t}))},function(){r.resolve(!1)}):g(r,e,o.getValidationAttr(i,a,n,s,e))):void r.resolve(!0)}));var m=t.defer();return t.all(v).then(function(e){for(var t=!0,i=0;i<e.length;i++)if(!e[i]){t=!1;break}r.$ngfValidations.push({name:n,valid:t}),m.resolve(t)}),m.promise}r=r||{},r.$ngfValidations=r.$ngfValidations||[],angular.forEach(r.$ngfValidations,function(e){e.valid=!0});var l=function(e,t){return o.attrGetter(e,i,a,t)},c=(o.attrGetter("ngfIgnoreInvalid",i,a)||"").split(" "),f=o.attrGetter("ngfRunAllValidations",i,a);if(null==e||0===e.length)return o.emptyPromise({validFiles:e,invalidFiles:[]});e=void 0===e.length?[e]:e.slice(0);var d=[];s("pattern",null,o.validatePattern),s("minSize","size.min",function(e,t){return e.size+.1>=o.translateScalars(t)}),s("maxSize","size.max",function(e,t){return e.size-.1<=o.translateScalars(t)});var p=0;if(s("maxTotalSize",null,function(t,n){return p+=t.size,!(p>o.translateScalars(n))||(e.splice(0,e.length),!1)}),s("validateFn",null,function(e,t){return t===!0||null===t||""===t}),!e.length)return o.emptyPromise({validFiles:[],invalidFiles:d});var h=t.defer(),g=[];return g.push(u("maxHeight","height.max",/image/,this.imageDimensions,function(e,t){return e.height<=t})),g.push(u("minHeight","height.min",/image/,this.imageDimensions,function(e,t){return e.height>=t})),g.push(u("maxWidth","width.max",/image/,this.imageDimensions,function(e,t){return e.width<=t})),g.push(u("minWidth","width.min",/image/,this.imageDimensions,function(e,t){return e.width>=t})),g.push(u("dimensions",null,/image/,function(e,t){return o.emptyPromise(t)},function(e){return e})),g.push(u("ratio",null,/image/,this.imageDimensions,function(e,t){for(var n=t.toString().split(","),r=!1,i=0;i<n.length;i++)Math.abs(e.width/e.height-o.ratioToFloat(n[i]))<.01&&(r=!0);return r})),g.push(u("maxRatio","ratio.max",/image/,this.imageDimensions,function(e,t){return e.width/e.height-o.ratioToFloat(t)<1e-4})),g.push(u("minRatio","ratio.min",/image/,this.imageDimensions,function(e,t){return e.width/e.height-o.ratioToFloat(t)>-1e-4})),g.push(u("maxDuration","duration.max",/audio|video/,this.mediaDuration,function(e,t){return e<=o.translateScalars(t)})),g.push(u("minDuration","duration.min",/audio|video/,this.mediaDuration,function(e,t){return e>=o.translateScalars(t)})),g.push(u("duration",null,/audio|video/,function(e,t){return o.emptyPromise(t)},function(e){return e})),g.push(u("validateAsyncFn",null,null,function(e,t){return t},function(e){return e===!0||null===e||""===e})),t.all(g).then(function(){if(f)for(var t=0;t<e.length;t++){var r=e[t];r.$error&&e.splice(t--,1)}f=!1,s("maxFiles",null,function(e,t,r){return n+r<t}),h.resolve({validFiles:e,invalidFiles:d})}),h.promise},o.imageDimensions=function(e){if(e.$ngfWidth&&e.$ngfHeight){var r=t.defer();return n(function(){r.resolve({width:e.$ngfWidth,height:e.$ngfHeight})}),r.promise}if(e.$ngfDimensionPromise)return e.$ngfDimensionPromise;var i=t.defer();return n(function(){return 0!==e.type.indexOf("image")?void i.reject("not image"):void o.dataUrl(e).then(function(t){function r(){var t=s[0].naturalWidth||s[0].clientWidth,n=s[0].naturalHeight||s[0].clientHeight;s.remove(),e.$ngfWidth=t,e.$ngfHeight=n,i.resolve({width:t,height:n})}function o(){s.remove(),i.reject("load error")}function a(){n(function(){s[0].parentNode&&(s[0].clientWidth?r():u++>10?o():a())},1e3)}var s=angular.element("<img>").attr("src",t).css("visibility","hidden").css("position","fixed").css("max-width","none !important").css("max-height","none !important");s.on("load",r),s.on("error",o);var u=0;a(),angular.element(document.getElementsByTagName("body")[0]).append(s)},function(){i.reject("load error")})}),e.$ngfDimensionPromise=i.promise,e.$ngfDimensionPromise["finally"](function(){delete e.$ngfDimensionPromise}),e.$ngfDimensionPromise},o.mediaDuration=function(e){if(e.$ngfDuration){var r=t.defer();return n(function(){r.resolve(e.$ngfDuration)}),r.promise}if(e.$ngfDurationPromise)return e.$ngfDurationPromise;var i=t.defer();return n(function(){return 0!==e.type.indexOf("audio")&&0!==e.type.indexOf("video")?void i.reject("not media"):void o.dataUrl(e).then(function(t){function r(){var t=s[0].duration;e.$ngfDuration=t,s.remove(),i.resolve(t)}function o(){s.remove(),i.reject("load error")}function a(){n(function(){s[0].parentNode&&(s[0].duration?r():u>10?o():a())},1e3)}var s=angular.element(0===e.type.indexOf("audio")?"<audio>":"<video>").attr("src",t).css("visibility","none").css("position","fixed");s.on("loadedmetadata",r),s.on("error",o);var u=0;a(),angular.element(document.body).append(s)},function(){i.reject("load error")})}),e.$ngfDurationPromise=i.promise,e.$ngfDurationPromise["finally"](function(){delete e.$ngfDurationPromise}),e.$ngfDurationPromise},o}]),r.service("UploadResize",["UploadValidate","$q",function(e,t){var n=e,r=function(e,t,n,r,i){var o=i?Math.max(n/e,r/t):Math.min(n/e,r/t);return{width:e*o,height:t*o,marginX:e*o-n,marginY:t*o-r}},i=function(e,i,o,a,s,u,l,c){var f=t.defer(),d=document.createElement("canvas"),p=document.createElement("img");return p.setAttribute("style","visibility:hidden;position:fixed;z-index:-100000"),document.body.appendChild(p),p.onload=function(){var e=p.width,t=p.height;if(p.parentNode.removeChild(p),null!=c&&c(e,t)===!1)return void f.reject("resizeIf");try{if(u){var h=n.ratioToFloat(u),g=e/t;g<h?(i=e,o=i/h):(o=t,i=o*h)}i||(i=e),o||(o=t);var v=r(e,t,i,o,l);d.width=Math.min(v.width,i),d.height=Math.min(v.height,o);var m=d.getContext("2d");m.drawImage(p,Math.min(0,-v.marginX/2),Math.min(0,-v.marginY/2),v.width,v.height),f.resolve(d.toDataURL(s||"image/WebP",a||.934))}catch($){f.reject($)}},p.onerror=function(){p.parentNode.removeChild(p),f.reject()},p.src=e,f.promise};return n.dataUrltoBlob=function(e,t,n){for(var r=e.split(","),i=r[0].match(/:(.*?);/)[1],o=atob(r[1]),a=o.length,s=new Uint8Array(a);a--;)s[a]=o.charCodeAt(a);var u=new window.Blob([s],{type:i});return u.name=t,u.$ngfOrigSize=n,u},n.isResizeSupported=function(){var e=document.createElement("canvas");return window.atob&&e.getContext&&e.getContext("2d")&&window.Blob},n.isResizeSupported()&&Object.defineProperty(window.Blob.prototype,"name",{get:function(){return this.$ngfName},set:function(e){this.$ngfName=e},configurable:!0}),n.resize=function(e,r){if(0!==e.type.indexOf("image"))return n.emptyPromise(e);var o=t.defer();return n.dataUrl(e,!0).then(function(t){i(t,r.width,r.height,r.quality,r.type||e.type,r.ratio,r.centerCrop,r.resizeIf).then(function(i){if("image/jpeg"===e.type&&r.restoreExif!==!1)try{i=n.restoreExif(t,i)}catch(a){setTimeout(function(){throw a},1)}try{var s=n.dataUrltoBlob(i,e.name,e.size);o.resolve(s)}catch(a){o.reject(a)}},function(t){"resizeIf"===t&&o.resolve(e),o.reject(t)})},function(e){o.reject(e)}),o.promise},n}]),function(){function e(e,n,r,i,o,a,s,u,l,c){function f(){return n.attr("disabled")||m("ngfDropDisabled",e)}function d(t,n){u.updateModel(i,r,e,m("ngfChange")||m("ngfDrop"),t,n)}function p(t,n){if(!u.shouldUpdateOn(t,r,e)||"string"!=typeof n)return u.rejectPromise([]);var i=[];n.replace(/<(img src|img [^>]* src) *=\"([^\"]*)\"/gi,function(e,t,n){i.push(n)});var o=[],a=[];if(i.length){angular.forEach(i,function(e){o.push(u.urlToBlob(e).then(function(e){a.push(e)}))});var s=c.defer();return c.all(o).then(function(){s.resolve(a)},function(e){s.reject(e)}),s.promise}return u.emptyPromise()}function h(e,t,n,r){var i=m("ngfDragOverClass",e,{$event:n}),o="dragover";if(angular.isString(i))o=i;else if(i&&(i.delay&&(w=i.delay),i.accept||i.reject)){var a=n.dataTransfer.items;if(null!=a&&a.length)for(var s=i.pattern||m("ngfPattern",e,{$event:n}),l=a.length;l--;){if(!u.validatePattern(a[l],s)){o=i.reject;break}o=i.accept}else o=i.accept}r(o)}function g(t,n,i,o){function a(e,t){var n=c.defer();if(null!=e)if(e.isDirectory){var r=[u.emptyPromise()];if(d){var i={type:"directory"};i.name=i.path=(t||"")+e.name,p.push(i)}var o=e.createReader(),s=[],g=function(){o.readEntries(function(i){try{i.length?(s=s.concat(Array.prototype.slice.call(i||[],0)),g()):(angular.forEach(s.slice(0),function(n){p.length<=l&&h<=f&&r.push(a(n,(t?t:"")+e.name+"/"))}),c.all(r).then(function(){n.resolve()},function(e){n.reject(e)}))}catch(o){n.reject(o)}},function(e){n.reject(e)})};g()}else e.file(function(e){try{e.path=(t?t:"")+e.name,d&&(e=u.rename(e,e.path)),p.push(e),h+=e.size,n.resolve()}catch(r){n.reject(r)}},function(e){n.reject(e)});return n.promise}var l=u.getValidationAttr(r,e,"maxFiles");null==l&&(l=Number.MAX_VALUE);var f=u.getValidationAttr(r,e,"maxTotalSize");null==f&&(f=Number.MAX_VALUE);var d=m("ngfIncludeDir",e),p=[],h=0,g=[u.emptyPromise()];if(t&&t.length>0&&"file:"!==s.location.protocol)for(var v=0;v<t.length;v++){if(t[v].webkitGetAsEntry&&t[v].webkitGetAsEntry()&&t[v].webkitGetAsEntry().isDirectory){var $=t[v].webkitGetAsEntry();if($.isDirectory&&!i)continue;null!=$&&g.push(a($))}else{var b=t[v].getAsFile();null!=b&&(p.push(b),h+=b.size)}if(p.length>l||h>f||!o&&p.length>0)break}else if(null!=n)for(var y=0;y<n.length;y++){var w=n.item(y);if((w.type||w.size>0)&&(p.push(w),h+=w.size),p.length>l||h>f||!o&&p.length>0)break}var x=c.defer();return c.all(g).then(function(){if(o||d||!p.length)x.resolve(p);else{for(var e=0;p[e]&&"directory"===p[e].type;)e++;x.resolve([p[e]])}},function(e){x.reject(e)}),x.promise}var v=t(),m=function(e,t,n){return u.attrGetter(e,r,t,n)};if(m("dropAvailable")&&a(function(){e[m("dropAvailable")]?e[m("dropAvailable")].value=v:e[m("dropAvailable")]=v}),!v)return void(m("ngfHideOnDropNotAvailable",e)===!0&&n.css("display","none"));null==m("ngfSelect")&&u.registerModelChangeValidator(i,r,e);var $,b=null,y=o(m("ngfStopPropagation")),w=1;n[0].addEventListener("dragover",function(t){if(!f()&&u.shouldUpdateOn("drop",r,e)){if(t.preventDefault(),y(e)&&t.stopPropagation(),navigator.userAgent.indexOf("Chrome")>-1){var i=t.dataTransfer.effectAllowed;t.dataTransfer.dropEffect="move"===i||"linkMove"===i?"move":"copy"}a.cancel(b),$||($="C",h(e,r,t,function(r){$=r,n.addClass($),m("ngfDrag",e,{$isDragging:!0,$class:$,$event:t})}))}},!1),n[0].addEventListener("dragenter",function(t){!f()&&u.shouldUpdateOn("drop",r,e)&&(t.preventDefault(),y(e)&&t.stopPropagation())},!1),n[0].addEventListener("dragleave",function(t){!f()&&u.shouldUpdateOn("drop",r,e)&&(t.preventDefault(),y(e)&&t.stopPropagation(),b=a(function(){$&&n.removeClass($),$=null,m("ngfDrag",e,{$isDragging:!1,$event:t})},w||100))},!1),n[0].addEventListener("drop",function(t){if(!f()&&u.shouldUpdateOn("drop",r,e)){t.preventDefault(),y(e)&&t.stopPropagation(),$&&n.removeClass($),$=null;var i,o=t.dataTransfer.items;try{i=t.dataTransfer&&t.dataTransfer.getData&&t.dataTransfer.getData("text/html")}catch(a){}g(o,t.dataTransfer.files,m("ngfAllowDir",e)!==!1,m("multiple")||m("ngfMultiple",e)).then(function(e){e.length?d(e,t):p("dropUrl",i).then(function(e){d(e,t)})})}},!1),n[0].addEventListener("paste",function(t){if(navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&m("ngfEnableFirefoxPaste",e)&&t.preventDefault(),!f()&&u.shouldUpdateOn("paste",r,e)){var n=[],i=t.clipboardData||t.originalEvent.clipboardData;if(i&&i.items)for(var o=0;o<i.items.length;o++)i.items[o].type.indexOf("image")!==-1&&n.push(i.items[o].getAsFile());n.length?d(n,t):p("pasteUrl",i).then(function(e){d(e,t)})}},!1),navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&m("ngfEnableFirefoxPaste",e)&&(n.attr("contenteditable",!0),n.on("keypress",function(e){e.metaKey||e.ctrlKey||e.preventDefault()}))}function t(){var e=document.createElement("div");return"draggable"in e&&"ondrop"in e&&!/Edge\/12./i.test(navigator.userAgent)}r.directive("ngfDrop",["$parse","$timeout","$window","Upload","$http","$q",function(t,n,r,i,o,a){return{restrict:"AEC",require:"?ngModel",link:function(s,u,l,c){e(s,u,l,c,t,n,r,i,o,a)}}}]),r.directive("ngfNoFileDrop",function(){return function(e,n){t()&&n.css("display","none")}}),r.directive("ngfDropAvailable",["$parse","$timeout","Upload",function(e,n,r){return function(i,o,a){if(t()){var s=e(r.attrGetter("ngfDropAvailable",a));n(function(){s(i),s.assign&&s.assign(i,!0)})}}}])}(),r.service("UploadExif",["UploadResize","$q",function(e,t){function n(e,t,n,r){switch(t){case 2:return e.transform(-1,0,0,1,n,0);case 3:return e.transform(-1,0,0,-1,n,r);case 4:return e.transform(1,0,0,-1,0,r);case 5:return e.transform(0,1,1,0,0,0);case 6:return e.transform(0,1,-1,0,r,0);case 7:return e.transform(0,-1,-1,0,r,n);case 8:return e.transform(0,-1,1,0,0,n)}}function r(e){for(var t="",n=new Uint8Array(e),r=n.byteLength,i=0;i<r;i++)t+=String.fromCharCode(n[i]);return window.btoa(t)}var i=e;return i.isExifSupported=function(){return window.FileReader&&(new FileReader).readAsArrayBuffer&&i.isResizeSupported()},i.readOrientation=function(e){var n=t.defer(),r=new FileReader,i=e.slice?e.slice(0,65536):e;return r.readAsArrayBuffer(i),r.onerror=function(e){return n.reject(e)},r.onload=function(e){var t={orientation:1},r=new DataView(this.result);if(65496!==r.getUint16(0,!1))return n.resolve(t);for(var i=r.byteLength,o=2;o<i;){var a=r.getUint16(o,!1);if(o+=2,65505===a){if(1165519206!==r.getUint32(o+=2,!1))return n.resolve(t);var s=18761===r.getUint16(o+=6,!1);o+=r.getUint32(o+4,s);var u=r.getUint16(o,s);o+=2;for(var l=0;l<u;l++)if(274===r.getUint16(o+12*l,s)){var c=r.getUint16(o+12*l+8,s);return c>=2&&c<=8&&(r.setUint16(o+12*l+8,1,s),t.fixedArrayBuffer=e.target.result),t.orientation=c,n.resolve(t)}}else{if(65280!==(65280&a))break;o+=r.getUint16(o,!1)}}return n.resolve(t)},n.promise},i.applyExifRotation=function(e){if(0!==e.type.indexOf("image/jpeg"))return i.emptyPromise(e);var o=t.defer();return i.readOrientation(e).then(function(t){return t.orientation<2||t.orientation>8?o.resolve(e):void i.dataUrl(e,!0).then(function(a){var s=document.createElement("canvas"),u=document.createElement("img");u.onload=function(){try{s.width=t.orientation>4?u.height:u.width,s.height=t.orientation>4?u.width:u.height;var a=s.getContext("2d");n(a,t.orientation,u.width,u.height),a.drawImage(u,0,0);var l=s.toDataURL(e.type||"image/WebP",.934);l=i.restoreExif(r(t.fixedArrayBuffer),l);var c=i.dataUrltoBlob(l,e.name);o.resolve(c)}catch(f){return o.reject(f)}},u.onerror=function(){o.reject()},u.src=a},function(e){o.reject(e)})},function(e){o.reject(e)}),o.promise},i.restoreExif=function(e,t){var n={};return n.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n.encode64=function(e){var t,n,r,i,o,a="",s="",u="",l=0;do t=e[l++],n=e[l++],s=e[l++],r=t>>2,i=(3&t)<<4|n>>4,o=(15&n)<<2|s>>6,u=63&s,isNaN(n)?o=u=64:isNaN(s)&&(u=64),a=a+this.KEY_STR.charAt(r)+this.KEY_STR.charAt(i)+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(u),t=n=s="",r=i=o=u="";while(l<e.length);return a},n.restore=function(e,t){e.match("data:image/jpeg;base64,")&&(e=e.replace("data:image/jpeg;base64,",""));var n=this.decode64(e),r=this.slice2Segments(n),i=this.exifManipulation(t,r);return"data:image/jpeg;base64,"+this.encode64(i)},n.exifManipulation=function(e,t){var n=this.getExifArray(t),r=this.insertExif(e,n);return new Uint8Array(r)},n.getExifArray=function(e){for(var t,n=0;n<e.length;n++)if(t=e[n],255===t[0]&225===t[1])return t;return[]},n.insertExif=function(e,t){var n=e.replace("data:image/jpeg;base64,",""),r=this.decode64(n),i=r.indexOf(255,3),o=r.slice(0,i),a=r.slice(i),s=o;return s=s.concat(t),s=s.concat(a)},n.slice2Segments=function(e){for(var t=0,n=[];;){if(255===e[t]&218===e[t+1])break;if(255===e[t]&216===e[t+1])t+=2;else{var r=256*e[t+2]+e[t+3],i=t+r+2,o=e.slice(t,i);n.push(o),t=i}if(t>e.length)break}return n},n.decode64=function(e){var t,n,r,i,o,a="",s="",u=0,l=[],c=/[^A-Za-z0-9\+\/\=]/g;c.exec(e)&&console.log("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, NaNExpect errors in decoding."),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");do r=this.KEY_STR.indexOf(e.charAt(u++)),i=this.KEY_STR.indexOf(e.charAt(u++)),o=this.KEY_STR.indexOf(e.charAt(u++)),s=this.KEY_STR.indexOf(e.charAt(u++)),t=r<<2|i>>4,n=(15&i)<<4|o>>2,a=(3&o)<<6|s,l.push(t),64!==o&&l.push(n),64!==s&&l.push(a),t=n=a="",r=i=o=s="";while(u<e.length);return l},n.restore(e,t)},i}])},{}],48:[function(e,t,n){e("./dist/ng-file-upload-all"),t.exports="ngFileUpload"},{"./dist/ng-file-upload-all":47}]},{},[41]);
languages/jquery-pin-it-button-for-images.pot CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2016 jquery-pin-it-button-for-images
2
  # This file is distributed under the same license as the jquery-pin-it-button-for-images package.
3
  msgid ""
4
  msgstr ""
@@ -6,7 +6,7 @@ msgstr ""
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
9
- "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
10
  "Language-Team: Marcin Skrzypiec\n"
11
  "X-Poedit-Basepath: ..\n"
12
  "X-Poedit-SourceCharset: UTF-8\n"
@@ -14,434 +14,514 @@ msgstr ""
14
  "X-Poedit-SearchPath-0: .\n"
15
  "X-Poedit-SearchPathExcluded-0: *.js\n"
16
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
- #: includes/admin/class-jpibfi-admin.php:63, includes/admin/settings/class-jpibfi-visual-settings.php:35
18
  msgid "Settings"
19
  msgstr ""
20
 
21
- #: includes/admin/class-jpibfi-admin.php:193
22
- msgid "Save Changes"
23
  msgstr ""
24
 
25
- #: includes/admin/class-jpibfi-admin.php:195
26
- msgid "This feature is available in <a target=\"_blank\" href=\"%s\">the PRO version</a>."
27
  msgstr ""
28
 
29
- #: includes/admin/class-jpibfi-admin.php:201
30
  msgid "Saving changes ..."
31
  msgstr ""
32
 
33
- #: includes/admin/class-jpibfi-admin.php:257
34
  msgid "jQuery Pin It Button For Images Options"
35
  msgstr ""
36
 
37
- #: includes/admin/class-jpibfi-admin.php:281
38
- msgid "Lightbox feature has been transferred to another plugin. Click <a target=\"_blank\" href=\"%s\">here</a> to learn more."
39
  msgstr ""
40
 
41
- #: includes/admin/class-jpibfi-admin.php:329
42
  msgid "jQuery Pin It Button for Images Pro is available. Click <a target=\"_blank\" href=\"%s\">here</a> to learn more."
43
  msgstr ""
44
 
45
- #: includes/admin/settings/class-jpibfi-import-export-settings.php:53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  msgid "The file did not upload properly. Please try again."
47
  msgstr ""
48
 
49
- #: includes/admin/settings/class-jpibfi-import-export-settings.php:67
50
  msgid "The export file could not be found at <code>%s</code>. It is likely that this was caused by a permissions problem."
51
  msgstr ""
52
 
53
- #: includes/admin/settings/class-jpibfi-import-export-settings.php:81
54
  msgid "The path is not a file, please try again."
55
  msgstr ""
56
 
57
- #: includes/admin/settings/class-jpibfi-import-export-settings.php:127
58
  msgid "Export"
59
  msgstr ""
60
 
61
- #: includes/admin/settings/class-jpibfi-import-export-settings.php:131
62
  msgid "Download Export File"
63
  msgstr ""
64
 
65
- #: includes/admin/settings/class-jpibfi-import-export-settings.php:135
66
  msgid "Import"
67
  msgstr ""
68
 
69
- #: includes/admin/settings/class-jpibfi-import-export-settings.php:137
70
  msgid "Import Settings"
71
  msgstr ""
72
 
73
- #: includes/admin/settings/class-jpibfi-import-export-settings.php:153
74
  msgid "Import/Export Settings"
75
  msgstr ""
76
 
77
- #: includes/admin/settings/class-jpibfi-selection-settings.php:27
78
  msgid "jQuery Pin It Button for Images Settings"
79
  msgstr ""
80
 
81
- #: includes/admin/settings/class-jpibfi-selection-settings.php:43
82
  msgid "Selection settings"
83
  msgstr ""
84
 
85
- #: includes/admin/settings/class-jpibfi-selection-settings.php:45
86
  msgid "Minimum image resolution"
87
  msgstr ""
88
 
89
- #: includes/admin/settings/class-jpibfi-selection-settings.php:47
90
  msgid "Use this settings to hide the \"Pin it\" button on small images (e.g. social media icons)."
91
  msgstr ""
92
 
93
- #: includes/admin/settings/class-jpibfi-selection-settings.php:49
94
  msgid "* - screen that is less than 768 pixels wide"
95
  msgstr ""
96
 
97
- #: includes/admin/settings/class-jpibfi-selection-settings.php:51
98
  msgid "For small screens* the \"Pin it\" button will show up if the image is at least %height% pixels high and %width% pixels wide."
99
  msgstr ""
100
 
101
- #: includes/admin/settings/class-jpibfi-selection-settings.php:53
102
  msgid "Otherwise, the \"Pin it\" button will show up if the image is at least %height% pixels high and %width% pixels wide."
103
  msgstr ""
104
 
105
- #: includes/admin/settings/class-jpibfi-selection-settings.php:57
106
  msgid "On which pages the \"Pin it\" button should be shown"
107
  msgstr ""
108
 
109
- #: includes/admin/settings/class-jpibfi-selection-settings.php:91
110
  msgid "Selection"
111
  msgstr ""
112
 
113
- #: includes/admin/settings/class-jpibfi-selection-settings.php:125
114
  msgid "Image selector"
115
  msgstr ""
116
 
117
- #: includes/admin/settings/class-jpibfi-selection-settings.php:127
118
  msgid "jQuery selector for all the images that should have the \"Pin it\" button. Set the value to %s if you want the \"Pin it\" button to appear only on images in content or %s to appear on all images on site (including sidebar, header and footer). If you know a thing or two about jQuery, you might use your own selector. %sClick here%s to read about jQuery selectors."
119
  msgstr ""
120
 
121
- #: includes/admin/settings/class-jpibfi-selection-settings.php:147, includes/admin/settings/class-jpibfi-selection-settings.php:275
122
  msgid "Disabled classes"
123
  msgstr ""
124
 
125
- #: includes/admin/settings/class-jpibfi-selection-settings.php:149
126
- msgid "Pictures with these CSS classes won't show the \"Pin it\" button. Please separate multiple classes with semicolons. Spaces are not accepted."
127
  msgstr ""
128
 
129
- #: includes/admin/settings/class-jpibfi-selection-settings.php:159, includes/admin/settings/class-jpibfi-selection-settings.php:277
130
  msgid "Enabled classes"
131
  msgstr ""
132
 
133
- #: includes/admin/settings/class-jpibfi-selection-settings.php:161
134
- msgid "Only pictures with these CSS classes will show the \"Pin it\" button. Please separate multiple classes with semicolons. If this field is empty, images with any (besides disabled ones) classes will show the Pin It button."
135
  msgstr ""
136
 
137
- #: includes/admin/settings/class-jpibfi-selection-settings.php:169, includes/admin/settings/class-jpibfi-selection-settings.php:175, includes/admin/settings/class-jpibfi-visual-settings.php:327
138
  msgid "Height"
139
  msgstr ""
140
 
141
- #: includes/admin/settings/class-jpibfi-selection-settings.php:171, includes/admin/settings/class-jpibfi-selection-settings.php:177, includes/admin/settings/class-jpibfi-visual-settings.php:329
 
 
 
 
142
  msgid "Width"
143
  msgstr ""
144
 
145
- #: includes/admin/settings/class-jpibfi-selection-settings.php:185
 
 
 
 
 
 
 
 
 
 
 
 
146
  msgid "Show on"
147
  msgstr ""
148
 
149
- #: includes/admin/settings/class-jpibfi-selection-settings.php:195
150
  msgid "Disable on"
151
  msgstr ""
152
 
153
- #: includes/admin/settings/class-jpibfi-selection-settings.php:239
154
  msgid "Disable plugin on this post"
155
  msgstr ""
156
 
157
- #: includes/admin/settings/class-jpibfi-selection-settings.php:279
158
- msgid "the given value doesn't meet the requirements. Please correct it and try again."
159
  msgstr ""
160
 
161
- #: includes/admin/settings/class-jpibfi-selection-settings.php:291
162
- msgid "Minimum image height"
163
  msgstr ""
164
 
165
- #: includes/admin/settings/class-jpibfi-selection-settings.php:293
166
- msgid "Minimum image width"
167
  msgstr ""
168
 
169
- #: includes/admin/settings/class-jpibfi-selection-settings.php:295
170
- msgid "value must be a number greater or equal to %d."
171
  msgstr ""
172
 
173
- #: includes/admin/settings/class-jpibfi-settings-base.php:227
174
  msgid "Settings saved."
175
  msgstr ""
176
 
177
- #: includes/admin/settings/class-jpibfi-visual-settings.php:19
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  msgid "\"Pin it\" button margins"
179
  msgstr ""
180
 
181
- #: includes/admin/settings/class-jpibfi-visual-settings.php:21
182
  msgid "Margins are used to adjust the position of the \"Pin it\" button, but not all margins are used on all button positions. Here is an example. If you're using the \"%s\" position, the button's position will be affected only by top and left margins. Bottom and right margins affect \"%s\" position, etc. The \"%s\" position does not use any margins at all."
183
  msgstr ""
184
 
185
- #: includes/admin/settings/class-jpibfi-visual-settings.php:23, includes/admin/settings/class-jpibfi-visual-settings.php:143
186
  msgid "Top left"
187
  msgstr ""
188
 
189
- #: includes/admin/settings/class-jpibfi-visual-settings.php:25, includes/admin/settings/class-jpibfi-visual-settings.php:149
190
  msgid "Bottom right"
191
  msgstr ""
192
 
193
- #: includes/admin/settings/class-jpibfi-visual-settings.php:27, includes/admin/settings/class-jpibfi-visual-settings.php:151
194
  msgid "Middle"
195
  msgstr ""
196
 
197
- #: includes/admin/settings/class-jpibfi-visual-settings.php:31
198
  msgid "Preview"
199
  msgstr ""
200
 
201
- #: includes/admin/settings/class-jpibfi-visual-settings.php:33
202
  msgid "Mode"
203
  msgstr ""
204
 
205
- #: includes/admin/settings/class-jpibfi-visual-settings.php:37
206
  msgid "Click the button to choose an image from your WordPress media library. Height and width should fill automatically."
207
  msgstr ""
208
 
209
- #: includes/admin/settings/class-jpibfi-visual-settings.php:39
210
  msgid "No image to preview"
211
  msgstr ""
212
 
213
- #: includes/admin/settings/class-jpibfi-visual-settings.php:41
214
  msgid "Upload an image using media library"
215
  msgstr ""
216
 
217
- #: includes/admin/settings/class-jpibfi-visual-settings.php:43
218
  msgid "Select your custom \"Pin It\" button"
219
  msgstr ""
220
 
221
- #: includes/admin/settings/class-jpibfi-visual-settings.php:45
222
  msgid "Use as \"Pin It\" button"
223
  msgstr ""
224
 
225
- #: includes/admin/settings/class-jpibfi-visual-settings.php:49
226
  msgid "Available icons come from the following icon packs: %s and %s."
227
  msgstr ""
228
 
229
- #: includes/admin/settings/class-jpibfi-visual-settings.php:71
230
  msgid "Visual"
231
  msgstr ""
232
 
233
- #: includes/admin/settings/class-jpibfi-visual-settings.php:105
234
  msgid "Show button"
235
  msgstr ""
236
 
237
- #: includes/admin/settings/class-jpibfi-visual-settings.php:109
238
  msgid "On hover"
239
  msgstr ""
240
 
241
- #: includes/admin/settings/class-jpibfi-visual-settings.php:111
242
  msgid "Always on touch devices"
243
  msgstr ""
244
 
245
- #: includes/admin/settings/class-jpibfi-visual-settings.php:113
246
  msgid "Always"
247
  msgstr ""
248
 
249
- #: includes/admin/settings/class-jpibfi-visual-settings.php:117
250
  msgid "When the \"Pin it\" button should be visible."
251
  msgstr ""
252
 
253
- #: includes/admin/settings/class-jpibfi-visual-settings.php:125
254
  msgid "Bottom"
255
  msgstr ""
256
 
257
- #: includes/admin/settings/class-jpibfi-visual-settings.php:127
 
 
 
 
258
  msgid "Top"
259
  msgstr ""
260
 
261
- #: includes/admin/settings/class-jpibfi-visual-settings.php:129
 
 
 
 
262
  msgid "Left"
263
  msgstr ""
264
 
265
- #: includes/admin/settings/class-jpibfi-visual-settings.php:131
 
 
 
 
266
  msgid "Right"
267
  msgstr ""
268
 
269
- #: includes/admin/settings/class-jpibfi-visual-settings.php:139
 
 
 
 
270
  msgid "\"Pin it\" button position"
271
  msgstr ""
272
 
273
- #: includes/admin/settings/class-jpibfi-visual-settings.php:145
274
  msgid "Top right"
275
  msgstr ""
276
 
277
- #: includes/admin/settings/class-jpibfi-visual-settings.php:147
278
  msgid "Bottom left"
279
  msgstr ""
280
 
281
- #: includes/admin/settings/class-jpibfi-visual-settings.php:155
282
  msgid "Where the \"Pin it\" button should appear on the image."
283
  msgstr ""
284
 
285
- #: includes/admin/settings/class-jpibfi-visual-settings.php:165
286
  msgid "Description source"
287
  msgstr ""
288
 
289
- #: includes/admin/settings/class-jpibfi-visual-settings.php:169
290
  msgid "Post title"
291
  msgstr ""
292
 
293
- #: includes/admin/settings/class-jpibfi-visual-settings.php:171
294
  msgid "Post description (excerpt)"
295
  msgstr ""
296
 
297
- #: includes/admin/settings/class-jpibfi-visual-settings.php:173
298
  msgid "Image title attribute"
299
  msgstr ""
300
 
301
- #: includes/admin/settings/class-jpibfi-visual-settings.php:175
302
  msgid "Site title (Settings->General)"
303
  msgstr ""
304
 
305
- #: includes/admin/settings/class-jpibfi-visual-settings.php:177
306
  msgid "Image description"
307
  msgstr ""
308
 
309
- #: includes/admin/settings/class-jpibfi-visual-settings.php:179
310
  msgid "Image caption"
311
  msgstr ""
312
 
313
- #: includes/admin/settings/class-jpibfi-visual-settings.php:181
314
  msgid "Image alt attribute"
315
  msgstr ""
316
 
317
- #: includes/admin/settings/class-jpibfi-visual-settings.php:185
318
  msgid "From where the Pinterest message should be taken. Check which sources should be considered and prioritize them by dragging and dropping. The description will come from the top source that has data. Please note that \"Image description\" and \"Image caption\" work properly only for images that were added to your Media Library."
319
  msgstr ""
320
 
321
- #: includes/admin/settings/class-jpibfi-visual-settings.php:195
322
  msgid "Pin linked images"
323
  msgstr ""
324
 
325
- #: includes/admin/settings/class-jpibfi-visual-settings.php:197
326
  msgid "Active"
327
  msgstr ""
328
 
329
- #: includes/admin/settings/class-jpibfi-visual-settings.php:199
330
  msgid "When checked, pins full-sized images instead of thumbnails (works only if you link thumbnails to their full versions)."
331
  msgstr ""
332
 
333
- #: includes/admin/settings/class-jpibfi-visual-settings.php:209
334
- msgid "Transparency value"
335
  msgstr ""
336
 
337
- #: includes/admin/settings/class-jpibfi-visual-settings.php:211
338
  msgid "Choose transparency (between %.02f and %.02f)"
339
  msgstr ""
340
 
341
- #: includes/admin/settings/class-jpibfi-visual-settings.php:227
342
  msgid "Pin image"
343
  msgstr ""
344
 
345
- #: includes/admin/settings/class-jpibfi-visual-settings.php:231
346
  msgid "Old default"
347
  msgstr ""
348
 
349
- #: includes/admin/settings/class-jpibfi-visual-settings.php:233
350
  msgid "Default"
351
  msgstr ""
352
 
353
- #: includes/admin/settings/class-jpibfi-visual-settings.php:235
354
  msgid "Custom"
355
  msgstr ""
356
 
357
- #: includes/admin/settings/class-jpibfi-visual-settings.php:247
358
  msgid "Button"
359
  msgstr ""
360
 
361
- #: includes/admin/settings/class-jpibfi-visual-settings.php:251
362
  msgid "Square"
363
  msgstr ""
364
 
365
- #: includes/admin/settings/class-jpibfi-visual-settings.php:253
366
  msgid "Rounded square"
367
  msgstr ""
368
 
369
- #: includes/admin/settings/class-jpibfi-visual-settings.php:255
370
  msgid "Round"
371
  msgstr ""
372
 
373
- #: includes/admin/settings/class-jpibfi-visual-settings.php:257
374
  msgid "Rectangle"
375
  msgstr ""
376
 
377
- #: includes/admin/settings/class-jpibfi-visual-settings.php:259
378
  msgid "Rounded rectangle"
379
  msgstr ""
380
 
381
- #: includes/admin/settings/class-jpibfi-visual-settings.php:269
 
 
 
 
382
  msgid "Circle"
383
  msgstr ""
384
 
385
- #: includes/admin/settings/class-jpibfi-visual-settings.php:271
386
  msgid "Plain"
387
  msgstr ""
388
 
389
- #: includes/admin/settings/class-jpibfi-visual-settings.php:273
390
  msgid "Thumbtack"
391
  msgstr ""
392
 
393
- #: includes/admin/settings/class-jpibfi-visual-settings.php:275
394
  msgid "Thumbtack #2"
395
  msgstr ""
396
 
397
- #: includes/admin/settings/class-jpibfi-visual-settings.php:277
398
  msgid "Classic"
399
  msgstr ""
400
 
401
- #: includes/admin/settings/class-jpibfi-visual-settings.php:287
402
- msgid "Icon"
403
- msgstr ""
404
-
405
- #: includes/admin/settings/class-jpibfi-visual-settings.php:299
406
  msgid "Size"
407
  msgstr ""
408
 
409
- #: includes/admin/settings/class-jpibfi-visual-settings.php:303
410
  msgid "Small"
411
  msgstr ""
412
 
413
- #: includes/admin/settings/class-jpibfi-visual-settings.php:305
414
  msgid "Normal"
415
  msgstr ""
416
 
417
- #: includes/admin/settings/class-jpibfi-visual-settings.php:307
418
  msgid "Large"
419
  msgstr ""
420
 
421
- #: includes/admin/settings/class-jpibfi-visual-settings.php:319
422
  msgid "URL address of the image"
423
  msgstr ""
424
 
425
- #: includes/admin/settings/class-jpibfi-visual-settings.php:349
426
- msgid "How it should look like"
427
- msgstr ""
428
-
429
- #: includes/admin/settings/class-jpibfi-visual-settings.php:383
430
  msgid "Custom image height"
431
  msgstr ""
432
 
433
- #: includes/admin/settings/class-jpibfi-visual-settings.php:387
434
  msgid "Custom image width"
435
  msgstr ""
436
 
437
- #: includes/admin/settings/class-jpibfi-visual-settings.php:389
 
 
 
 
438
  msgid "value must be empty or a number greater or equal to %d."
439
  msgstr ""
440
 
441
- #: includes/admin/settings/class-jpibfi-visual-settings.php:397
442
  msgid "Transparency value must be a number between %.02d and %.02f."
443
  msgstr ""
444
 
445
- #: jquery-pin-it-button-for-images.php:55
446
  msgid "You have two versions of jQuery Pin It Button for Images installed. Please deactivate and remove one of them."
447
  msgstr ""
1
+ # Copyright (C) 2017 jquery-pin-it-button-for-images
2
  # This file is distributed under the same license as the jquery-pin-it-button-for-images package.
3
  msgid ""
4
  msgstr ""
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
9
+ "PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
10
  "Language-Team: Marcin Skrzypiec\n"
11
  "X-Poedit-Basepath: ..\n"
12
  "X-Poedit-SourceCharset: UTF-8\n"
14
  "X-Poedit-SearchPath-0: .\n"
15
  "X-Poedit-SearchPathExcluded-0: *.js\n"
16
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
+ #: includes/admin/jpibfi-admin.php:73, includes/admin/settings/jpibfi-visual-settings.php:39
18
  msgid "Settings"
19
  msgstr ""
20
 
21
+ #: includes/admin/jpibfi-admin.php:221
22
+ msgid "Documentation"
23
  msgstr ""
24
 
25
+ #: includes/admin/jpibfi-admin.php:229
26
+ msgid "Support"
27
  msgstr ""
28
 
29
+ #: includes/admin/jpibfi-admin.php:241
30
  msgid "Saving changes ..."
31
  msgstr ""
32
 
33
+ #: includes/admin/jpibfi-admin.php:297
34
  msgid "jQuery Pin It Button For Images Options"
35
  msgstr ""
36
 
37
+ #: includes/admin/jpibfi-admin.php:329
38
+ msgid "Check out <a href=\"%1$s\" target=\"_blank\">Frizzly</a> - share buttons for images and post content."
39
  msgstr ""
40
 
41
+ #: includes/admin/jpibfi-admin.php:397
42
  msgid "jQuery Pin It Button for Images Pro is available. Click <a target=\"_blank\" href=\"%s\">here</a> to learn more."
43
  msgstr ""
44
 
45
+ #: includes/admin/settings/jpibfi-advanced-settings.php:23
46
+ msgid "Advanced settings"
47
+ msgstr ""
48
+
49
+ #: includes/admin/settings/jpibfi-advanced-settings.php:25
50
+ msgid "Filters"
51
+ msgstr ""
52
+
53
+ #: includes/admin/settings/jpibfi-advanced-settings.php:31
54
+ msgid "You can enabled or disable if the plugin should use a certain filter and change the priority setting. Read more about filters <a href=\"%s\" target=\"_blank\">here</a>. By default all 3 filters are active with the priority of 10."
55
+ msgstr ""
56
+
57
+ #: includes/admin/settings/jpibfi-advanced-settings.php:37
58
+ msgid "%name% <label>with priority of</label> %priority%"
59
+ msgstr ""
60
+
61
+ #: includes/admin/settings/jpibfi-advanced-settings.php:53
62
+ msgid "Advanced"
63
+ msgstr ""
64
+
65
+ #: includes/admin/settings/jpibfi-advanced-settings.php:89
66
+ msgid "the_content priority"
67
+ msgstr ""
68
+
69
+ #: includes/admin/settings/jpibfi-advanced-settings.php:113
70
+ msgid "the_excerpt priority"
71
+ msgstr ""
72
+
73
+ #: includes/admin/settings/jpibfi-advanced-settings.php:137
74
+ msgid "post_thumbnail_html priority"
75
+ msgstr ""
76
+
77
+ #: includes/admin/settings/jpibfi-import-export-settings.php:51
78
  msgid "The file did not upload properly. Please try again."
79
  msgstr ""
80
 
81
+ #: includes/admin/settings/jpibfi-import-export-settings.php:67
82
  msgid "The export file could not be found at <code>%s</code>. It is likely that this was caused by a permissions problem."
83
  msgstr ""
84
 
85
+ #: includes/admin/settings/jpibfi-import-export-settings.php:83
86
  msgid "The path is not a file, please try again."
87
  msgstr ""
88
 
89
+ #: includes/admin/settings/jpibfi-import-export-settings.php:131
90
  msgid "Export"
91
  msgstr ""
92
 
93
+ #: includes/admin/settings/jpibfi-import-export-settings.php:135
94
  msgid "Download Export File"
95
  msgstr ""
96
 
97
+ #: includes/admin/settings/jpibfi-import-export-settings.php:139
98
  msgid "Import"
99
  msgstr ""
100
 
101
+ #: includes/admin/settings/jpibfi-import-export-settings.php:141
102
  msgid "Import Settings"
103
  msgstr ""
104
 
105
+ #: includes/admin/settings/jpibfi-import-export-settings.php:159
106
  msgid "Import/Export Settings"
107
  msgstr ""
108
 
109
+ #: includes/admin/settings/jpibfi-selection-settings.php:27
110
  msgid "jQuery Pin It Button for Images Settings"
111
  msgstr ""
112
 
113
+ #: includes/admin/settings/jpibfi-selection-settings.php:47
114
  msgid "Selection settings"
115
  msgstr ""
116
 
117
+ #: includes/admin/settings/jpibfi-selection-settings.php:49
118
  msgid "Minimum image resolution"
119
  msgstr ""
120
 
121
+ #: includes/admin/settings/jpibfi-selection-settings.php:51
122
  msgid "Use this settings to hide the \"Pin it\" button on small images (e.g. social media icons)."
123
  msgstr ""
124
 
125
+ #: includes/admin/settings/jpibfi-selection-settings.php:53
126
  msgid "* - screen that is less than 768 pixels wide"
127
  msgstr ""
128
 
129
+ #: includes/admin/settings/jpibfi-selection-settings.php:55
130
  msgid "For small screens* the \"Pin it\" button will show up if the image is at least %height% pixels high and %width% pixels wide."
131
  msgstr ""
132
 
133
+ #: includes/admin/settings/jpibfi-selection-settings.php:57
134
  msgid "Otherwise, the \"Pin it\" button will show up if the image is at least %height% pixels high and %width% pixels wide."
135
  msgstr ""
136
 
137
+ #: includes/admin/settings/jpibfi-selection-settings.php:61
138
  msgid "On which pages the \"Pin it\" button should be shown"
139
  msgstr ""
140
 
141
+ #: includes/admin/settings/jpibfi-selection-settings.php:99
142
  msgid "Selection"
143
  msgstr ""
144
 
145
+ #: includes/admin/settings/jpibfi-selection-settings.php:121
146
  msgid "Image selector"
147
  msgstr ""
148
 
149
+ #: includes/admin/settings/jpibfi-selection-settings.php:123
150
  msgid "jQuery selector for all the images that should have the \"Pin it\" button. Set the value to %s if you want the \"Pin it\" button to appear only on images in content or %s to appear on all images on site (including sidebar, header and footer). If you know a thing or two about jQuery, you might use your own selector. %sClick here%s to read about jQuery selectors."
151
  msgstr ""
152
 
153
+ #: includes/admin/settings/jpibfi-selection-settings.php:145
154
  msgid "Disabled classes"
155
  msgstr ""
156
 
157
+ #: includes/admin/settings/jpibfi-selection-settings.php:147
158
+ msgid "Images with these CSS classes won't show the \"Pin it\" button. Please separate multiple classes with semicolons. Spaces are not accepted."
159
  msgstr ""
160
 
161
+ #: includes/admin/settings/jpibfi-selection-settings.php:159
162
  msgid "Enabled classes"
163
  msgstr ""
164
 
165
+ #: includes/admin/settings/jpibfi-selection-settings.php:161
166
+ msgid "Only images with these CSS classes will show the \"Pin it\" button. Please separate multiple classes with semicolons. If this field is empty, images with any (besides disabled ones) classes will show the Pin It button."
167
  msgstr ""
168
 
169
+ #: includes/admin/settings/jpibfi-selection-settings.php:183, includes/admin/settings/jpibfi-selection-settings.php:205, includes/admin/settings/jpibfi-visual-settings.php:389
170
  msgid "Height"
171
  msgstr ""
172
 
173
+ #: includes/admin/settings/jpibfi-selection-settings.php:185
174
+ msgid "Minimum image height"
175
+ msgstr ""
176
+
177
+ #: includes/admin/settings/jpibfi-selection-settings.php:193, includes/admin/settings/jpibfi-selection-settings.php:215, includes/admin/settings/jpibfi-visual-settings.php:399
178
  msgid "Width"
179
  msgstr ""
180
 
181
+ #: includes/admin/settings/jpibfi-selection-settings.php:195
182
+ msgid "Minimum image width"
183
+ msgstr ""
184
+
185
+ #: includes/admin/settings/jpibfi-selection-settings.php:207
186
+ msgid "Minimum image height for mobile"
187
+ msgstr ""
188
+
189
+ #: includes/admin/settings/jpibfi-selection-settings.php:217
190
+ msgid "Minimum image width for mobile"
191
+ msgstr ""
192
+
193
+ #: includes/admin/settings/jpibfi-selection-settings.php:227
194
  msgid "Show on"
195
  msgstr ""
196
 
197
+ #: includes/admin/settings/jpibfi-selection-settings.php:239
198
  msgid "Disable on"
199
  msgstr ""
200
 
201
+ #: includes/admin/settings/jpibfi-selection-settings.php:285
202
  msgid "Disable plugin on this post"
203
  msgstr ""
204
 
205
+ #: includes/admin/settings/jpibfi-settings-base.php:55
206
+ msgid "Error"
207
  msgstr ""
208
 
209
+ #: includes/admin/settings/jpibfi-settings-base.php:109
210
+ msgid "Save Changes"
211
  msgstr ""
212
 
213
+ #: includes/admin/settings/jpibfi-settings-base.php:113
214
+ msgid "This feature is available in <a target=\"_blank\" href=\"%s\">the PRO version</a>."
215
  msgstr ""
216
 
217
+ #: includes/admin/settings/jpibfi-settings-base.php:231
218
+ msgid "Settings not saved."
219
  msgstr ""
220
 
221
+ #: includes/admin/settings/jpibfi-settings-base.php:253
222
  msgid "Settings saved."
223
  msgstr ""
224
 
225
+ #: includes/admin/settings/jpibfi-validator.php:137, includes/admin/settings/jpibfi-validator.php:159
226
+ msgid "%1$s value is not a number."
227
+ msgstr ""
228
+
229
+ #: includes/admin/settings/jpibfi-validator.php:181
230
+ msgid "%1$s value is less than the minimum value of %2$s."
231
+ msgstr ""
232
+
233
+ #: includes/admin/settings/jpibfi-validator.php:195
234
+ msgid "%1$s value is greater than the minimum value of %2$s."
235
+ msgstr ""
236
+
237
+ #: includes/admin/settings/jpibfi-validator.php:215, includes/admin/settings/jpibfi-validator.php:251
238
+ msgid "%1$s value is invalid."
239
+ msgstr ""
240
+
241
+ #: includes/admin/settings/jpibfi-visual-settings.php:23
242
  msgid "\"Pin it\" button margins"
243
  msgstr ""
244
 
245
+ #: includes/admin/settings/jpibfi-visual-settings.php:25
246
  msgid "Margins are used to adjust the position of the \"Pin it\" button, but not all margins are used on all button positions. Here is an example. If you're using the \"%s\" position, the button's position will be affected only by top and left margins. Bottom and right margins affect \"%s\" position, etc. The \"%s\" position does not use any margins at all."
247
  msgstr ""
248
 
249
+ #: includes/admin/settings/jpibfi-visual-settings.php:27, includes/admin/settings/jpibfi-visual-settings.php:187
250
  msgid "Top left"
251
  msgstr ""
252
 
253
+ #: includes/admin/settings/jpibfi-visual-settings.php:29, includes/admin/settings/jpibfi-visual-settings.php:193
254
  msgid "Bottom right"
255
  msgstr ""
256
 
257
+ #: includes/admin/settings/jpibfi-visual-settings.php:31, includes/admin/settings/jpibfi-visual-settings.php:195
258
  msgid "Middle"
259
  msgstr ""
260
 
261
+ #: includes/admin/settings/jpibfi-visual-settings.php:35
262
  msgid "Preview"
263
  msgstr ""
264
 
265
+ #: includes/admin/settings/jpibfi-visual-settings.php:37
266
  msgid "Mode"
267
  msgstr ""
268
 
269
+ #: includes/admin/settings/jpibfi-visual-settings.php:41
270
  msgid "Click the button to choose an image from your WordPress media library. Height and width should fill automatically."
271
  msgstr ""
272
 
273
+ #: includes/admin/settings/jpibfi-visual-settings.php:43
274
  msgid "No image to preview"
275
  msgstr ""
276
 
277
+ #: includes/admin/settings/jpibfi-visual-settings.php:45
278
  msgid "Upload an image using media library"
279
  msgstr ""
280
 
281
+ #: includes/admin/settings/jpibfi-visual-settings.php:47
282
  msgid "Select your custom \"Pin It\" button"
283
  msgstr ""
284
 
285
+ #: includes/admin/settings/jpibfi-visual-settings.php:49
286
  msgid "Use as \"Pin It\" button"
287
  msgstr ""
288
 
289
+ #: includes/admin/settings/jpibfi-visual-settings.php:53
290
  msgid "Available icons come from the following icon packs: %s and %s."
291
  msgstr ""
292
 
293
+ #: includes/admin/settings/jpibfi-visual-settings.php:75
294
  msgid "Visual"
295
  msgstr ""
296
 
297
+ #: includes/admin/settings/jpibfi-visual-settings.php:97
298
  msgid "Show button"
299
  msgstr ""
300
 
301
+ #: includes/admin/settings/jpibfi-visual-settings.php:101
302
  msgid "On hover"
303
  msgstr ""
304
 
305
+ #: includes/admin/settings/jpibfi-visual-settings.php:103
306
  msgid "Always on touch devices"
307
  msgstr ""
308
 
309
+ #: includes/admin/settings/jpibfi-visual-settings.php:105
310
  msgid "Always"
311
  msgstr ""
312
 
313
+ #: includes/admin/settings/jpibfi-visual-settings.php:109
314
  msgid "When the \"Pin it\" button should be visible."
315
  msgstr ""
316
 
317
+ #: includes/admin/settings/jpibfi-visual-settings.php:135
318
  msgid "Bottom"
319
  msgstr ""
320
 
321
+ #: includes/admin/settings/jpibfi-visual-settings.php:137
322
+ msgid "Button bottom margin"
323
+ msgstr ""
324
+
325
+ #: includes/admin/settings/jpibfi-visual-settings.php:147
326
  msgid "Top"
327
  msgstr ""
328
 
329
+ #: includes/admin/settings/jpibfi-visual-settings.php:149
330
+ msgid "Button top margin"
331
+ msgstr ""
332
+
333
+ #: includes/admin/settings/jpibfi-visual-settings.php:159
334
  msgid "Left"
335
  msgstr ""
336
 
337
+ #: includes/admin/settings/jpibfi-visual-settings.php:161
338
+ msgid "Button left margin"
339
+ msgstr ""
340
+
341
+ #: includes/admin/settings/jpibfi-visual-settings.php:171
342
  msgid "Right"
343
  msgstr ""
344
 
345
+ #: includes/admin/settings/jpibfi-visual-settings.php:173
346
+ msgid "Button right margin"
347
+ msgstr ""
348
+
349
+ #: includes/admin/settings/jpibfi-visual-settings.php:183
350
  msgid "\"Pin it\" button position"
351
  msgstr ""
352
 
353
+ #: includes/admin/settings/jpibfi-visual-settings.php:189
354
  msgid "Top right"
355
  msgstr ""
356
 
357
+ #: includes/admin/settings/jpibfi-visual-settings.php:191
358
  msgid "Bottom left"
359
  msgstr ""
360
 
361
+ #: includes/admin/settings/jpibfi-visual-settings.php:199
362
  msgid "Where the \"Pin it\" button should appear on the image."
363
  msgstr ""
364
 
365
+ #: includes/admin/settings/jpibfi-visual-settings.php:211
366
  msgid "Description source"
367
  msgstr ""
368
 
369
+ #: includes/admin/settings/jpibfi-visual-settings.php:215
370
  msgid "Post title"
371
  msgstr ""
372
 
373
+ #: includes/admin/settings/jpibfi-visual-settings.php:217
374
  msgid "Post description (excerpt)"
375
  msgstr ""
376
 
377
+ #: includes/admin/settings/jpibfi-visual-settings.php:219
378
  msgid "Image title attribute"
379
  msgstr ""
380
 
381
+ #: includes/admin/settings/jpibfi-visual-settings.php:221
382
  msgid "Site title (Settings->General)"
383
  msgstr ""
384
 
385
+ #: includes/admin/settings/jpibfi-visual-settings.php:223
386
  msgid "Image description"
387
  msgstr ""
388
 
389
+ #: includes/admin/settings/jpibfi-visual-settings.php:225
390
  msgid "Image caption"
391
  msgstr ""
392
 
393
+ #: includes/admin/settings/jpibfi-visual-settings.php:227
394
  msgid "Image alt attribute"
395
  msgstr ""
396
 
397
+ #: includes/admin/settings/jpibfi-visual-settings.php:231
398
  msgid "From where the Pinterest message should be taken. Check which sources should be considered and prioritize them by dragging and dropping. The description will come from the top source that has data. Please note that \"Image description\" and \"Image caption\" work properly only for images that were added to your Media Library."
399
  msgstr ""
400
 
401
+ #: includes/admin/settings/jpibfi-visual-settings.php:243
402
  msgid "Pin linked images"
403
  msgstr ""
404
 
405
+ #: includes/admin/settings/jpibfi-visual-settings.php:245
406
  msgid "Active"
407
  msgstr ""
408
 
409
+ #: includes/admin/settings/jpibfi-visual-settings.php:247
410
  msgid "When checked, pins full-sized images instead of thumbnails (works only if you link thumbnails to their full versions)."
411
  msgstr ""
412
 
413
+ #: includes/admin/settings/jpibfi-visual-settings.php:259
414
+ msgid "Transparency"
415
  msgstr ""
416
 
417
+ #: includes/admin/settings/jpibfi-visual-settings.php:261
418
  msgid "Choose transparency (between %.02f and %.02f)"
419
  msgstr ""
420
 
421
+ #: includes/admin/settings/jpibfi-visual-settings.php:279
422
  msgid "Pin image"
423
  msgstr ""
424
 
425
+ #: includes/admin/settings/jpibfi-visual-settings.php:283
426
  msgid "Old default"
427
  msgstr ""
428
 
429
+ #: includes/admin/settings/jpibfi-visual-settings.php:285
430
  msgid "Default"
431
  msgstr ""
432
 
433
+ #: includes/admin/settings/jpibfi-visual-settings.php:287
434
  msgid "Custom"
435
  msgstr ""
436
 
437
+ #: includes/admin/settings/jpibfi-visual-settings.php:301
438
  msgid "Button"
439
  msgstr ""
440
 
441
+ #: includes/admin/settings/jpibfi-visual-settings.php:305
442
  msgid "Square"
443
  msgstr ""
444
 
445
+ #: includes/admin/settings/jpibfi-visual-settings.php:307
446
  msgid "Rounded square"
447
  msgstr ""
448
 
449
+ #: includes/admin/settings/jpibfi-visual-settings.php:309
450
  msgid "Round"
451
  msgstr ""
452
 
453
+ #: includes/admin/settings/jpibfi-visual-settings.php:311
454
  msgid "Rectangle"
455
  msgstr ""
456
 
457
+ #: includes/admin/settings/jpibfi-visual-settings.php:313
458
  msgid "Rounded rectangle"
459
  msgstr ""
460
 
461
+ #: includes/admin/settings/jpibfi-visual-settings.php:327
462
+ msgid "Icon"
463
+ msgstr ""
464
+
465
+ #: includes/admin/settings/jpibfi-visual-settings.php:331
466
  msgid "Circle"
467
  msgstr ""
468
 
469
+ #: includes/admin/settings/jpibfi-visual-settings.php:333
470
  msgid "Plain"
471
  msgstr ""
472
 
473
+ #: includes/admin/settings/jpibfi-visual-settings.php:335
474
  msgid "Thumbtack"
475
  msgstr ""
476
 
477
+ #: includes/admin/settings/jpibfi-visual-settings.php:337
478
  msgid "Thumbtack #2"
479
  msgstr ""
480
 
481
+ #: includes/admin/settings/jpibfi-visual-settings.php:339
482
  msgid "Classic"
483
  msgstr ""
484
 
485
+ #: includes/admin/settings/jpibfi-visual-settings.php:353
 
 
 
 
486
  msgid "Size"
487
  msgstr ""
488
 
489
+ #: includes/admin/settings/jpibfi-visual-settings.php:357
490
  msgid "Small"
491
  msgstr ""
492
 
493
+ #: includes/admin/settings/jpibfi-visual-settings.php:359
494
  msgid "Normal"
495
  msgstr ""
496
 
497
+ #: includes/admin/settings/jpibfi-visual-settings.php:361
498
  msgid "Large"
499
  msgstr ""
500
 
501
+ #: includes/admin/settings/jpibfi-visual-settings.php:375
502
  msgid "URL address of the image"
503
  msgstr ""
504
 
505
+ #: includes/admin/settings/jpibfi-visual-settings.php:391, includes/admin/settings/jpibfi-visual-settings.php:457
 
 
 
 
506
  msgid "Custom image height"
507
  msgstr ""
508
 
509
+ #: includes/admin/settings/jpibfi-visual-settings.php:401, includes/admin/settings/jpibfi-visual-settings.php:461
510
  msgid "Custom image width"
511
  msgstr ""
512
 
513
+ #: includes/admin/settings/jpibfi-visual-settings.php:423
514
+ msgid "How it should look like"
515
+ msgstr ""
516
+
517
+ #: includes/admin/settings/jpibfi-visual-settings.php:465
518
  msgid "value must be empty or a number greater or equal to %d."
519
  msgstr ""
520
 
521
+ #: includes/admin/settings/jpibfi-visual-settings.php:473
522
  msgid "Transparency value must be a number between %.02d and %.02f."
523
  msgstr ""
524
 
525
+ #: jquery-pin-it-button-for-images.php:67
526
  msgid "You have two versions of jQuery Pin It Button for Images installed. Please deactivate and remove one of them."
527
  msgstr ""
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
- === jQuery Pin It Button For Images ===
2
  Contributors: mrsztuczkens, redearthdesign, brocheafoin, robertark
3
  Tags: pinterest, pin it, button, image, images, pinit, social media, hover, click, photo, photos
4
  Requires at least: 3.3.0
5
  Tested up to: 4.6.1
6
- Stable tag: 2.1.2
7
  License: GPLv2 or later
8
 
9
  Highlights images on hover and adds a Pinterest "Pin It" button over them for easy pinning.
@@ -68,6 +68,11 @@ Please report them in the plugin's support forum on Wordpress.org.
68
 
69
  == Changelog ==
70
 
 
 
 
 
 
71
  = 2.1.2 =
72
  * Released 2016-12-07
73
  * Minor bug fixes
@@ -277,6 +282,9 @@ Please report them in the plugin's support forum on Wordpress.org.
277
 
278
  == Upgrade Notice ==
279
 
 
 
 
280
  = 2.1.2 =
281
  * Minor bug fixes
282
 
1
+ === jQuery Pin It Button for Images ===
2
  Contributors: mrsztuczkens, redearthdesign, brocheafoin, robertark
3
  Tags: pinterest, pin it, button, image, images, pinit, social media, hover, click, photo, photos
4
  Requires at least: 3.3.0
5
  Tested up to: 4.6.1
6
+ Stable tag: 2.1.3
7
  License: GPLv2 or later
8
 
9
  Highlights images on hover and adds a Pinterest "Pin It" button over them for easy pinning.
68
 
69
  == Changelog ==
70
 
71
+ = 2.1.3 =
72
+ * Released 2017-01-12
73
+ * Added ability to disable the plugin on certain filters and changing filters priority
74
+ * Added strong type checking in settings to reduce errors caused by type mismatch
75
+
76
  = 2.1.2 =
77
  * Released 2016-12-07
78
  * Minor bug fixes
282
 
283
  == Upgrade Notice ==
284
 
285
+ = 2.1.3 =
286
+ * Added ability to manipulate filters the plugin uses and added additional validation to settings.
287
+
288
  = 2.1.2 =
289
  * Minor bug fixes
290