Version Description
- Released 2017-01-29
- Minor cleanup
- Enhanced type checking to reduce errors caused by type mismatch even further
Download this release
Release Info
Developer | mrsztuczkens |
Plugin | jQuery Pin It Button for Images |
Version | 2.2.3 |
Comparing to | |
See all releases |
Code changes from version 2.2.1 to 2.2.3
- includes/admin/jpibfi-admin.php +14 -10
- includes/admin/settings/jpibfi-import-export-settings.php +28 -23
- includes/admin/settings/jpibfi-settings-base.php +1 -1
- includes/includes/JPIBFI_Version_Updater.php +28 -0
- includes/includes/jpibfi-includes.php +6 -11
- includes/includes/jpibfi-option-converter.php +0 -175
- includes/includes/options/jpibfi-advanced-options.php +11 -0
- includes/includes/options/jpibfi-options.php +29 -0
- includes/includes/options/jpibfi-selection-options.php +32 -17
- includes/includes/options/jpibfi-visual-options.php +114 -90
- includes/includes/versions/JPIBFI_Version_Update_2_2_3.php +194 -0
- includes/jpibfi.php +2 -10
- jquery-pin-it-button-for-images.php +2 -2
- js/jpibfi.admin.js +7 -7
- js/jpibfi.client.js +1 -1
- languages/jquery-pin-it-button-for-images.pot +14 -14
- readme.txt +11 -3
includes/admin/jpibfi-admin.php
CHANGED
@@ -100,8 +100,21 @@ class JPIBFI_Admin {
|
|
100 |
|
101 |
wp_enqueue_style( 'jquery-pin-it-button-admin-style', $plugin_dir_url . 'css/admin.css', array(), $this->version, 'all' );
|
102 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
$slug = isset( $_GET['tab'] ) ? $_GET['tab'] : 'select';
|
104 |
$tab_mod = $this->get_tab( $slug );
|
|
|
105 |
$settings = array(
|
106 |
'tabs' => $this->get_tabs(),
|
107 |
'currentTab' => $slug,
|
@@ -113,16 +126,7 @@ class JPIBFI_Admin {
|
|
113 |
'tab' => $this->save_settings_tab,
|
114 |
'submit' => __( 'Save Changes', 'jquery-pin-it-button-for-images' )
|
115 |
),
|
116 |
-
'links' =>
|
117 |
-
array(
|
118 |
-
'url' => 'https://highfiveplugins.com/jpibfi/jquery-pin-it-button-for-images-documentation/',
|
119 |
-
'label' => __( 'Documentation', 'jquery-pin-it-button-for-images' )
|
120 |
-
),
|
121 |
-
array(
|
122 |
-
'url' => 'https://wordpress.org/support/plugin/jquery-pin-it-button-for-images',
|
123 |
-
'label' => __( 'Support', 'jquery-pin-it-button-for-images' )
|
124 |
-
),
|
125 |
-
),
|
126 |
'settings' => $tab_mod->get_settings_configuration(),
|
127 |
'i18n' => array(
|
128 |
'editor' => $tab_mod->get_settings_i18n(),
|
100 |
|
101 |
wp_enqueue_style( 'jquery-pin-it-button-admin-style', $plugin_dir_url . 'css/admin.css', array(), $this->version, 'all' );
|
102 |
|
103 |
+
$links = array(
|
104 |
+
array(
|
105 |
+
'url' => 'https://highfiveplugins.com/jpibfi/jquery-pin-it-button-for-images-documentation/',
|
106 |
+
'label' => __( 'Documentation', 'jquery-pin-it-button-for-images' )
|
107 |
+
),
|
108 |
+
array(
|
109 |
+
'url' => 'https://wordpress.org/support/plugin/jquery-pin-it-button-for-images',
|
110 |
+
'label' => __( 'Support', 'jquery-pin-it-button-for-images' )
|
111 |
+
)
|
112 |
+
);
|
113 |
+
|
114 |
+
|
115 |
$slug = isset( $_GET['tab'] ) ? $_GET['tab'] : 'select';
|
116 |
$tab_mod = $this->get_tab( $slug );
|
117 |
+
|
118 |
$settings = array(
|
119 |
'tabs' => $this->get_tabs(),
|
120 |
'currentTab' => $slug,
|
126 |
'tab' => $this->save_settings_tab,
|
127 |
'submit' => __( 'Save Changes', 'jquery-pin-it-button-for-images' )
|
128 |
),
|
129 |
+
'links' => $links,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
'settings' => $tab_mod->get_settings_configuration(),
|
131 |
'i18n' => array(
|
132 |
'editor' => $tab_mod->get_settings_i18n(),
|
includes/admin/settings/jpibfi-import-export-settings.php
CHANGED
@@ -4,23 +4,33 @@ 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
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
add_filter( 'export_args', array( $this, 'export_args' ) );
|
11 |
add_action( 'export_wp', array( $this, 'export_wp' ) );
|
12 |
}
|
13 |
|
14 |
function import() {
|
15 |
-
$file
|
16 |
|
17 |
if ( isset( $file['error'] ) ) {
|
18 |
$this->notices[] = new JPIBFI_Admin_Notice( 'error', true, esc_html( $file['error'] ) );
|
|
|
19 |
return;
|
20 |
}
|
21 |
|
22 |
if ( ! isset( $file['file'], $file['id'] ) ) {
|
23 |
$this->notices[] = new JPIBFI_Admin_Notice( 'error', true, __( 'The file did not upload properly. Please try again.', 'jquery-pin-it-button-for-images' ) );
|
|
|
24 |
return;
|
25 |
}
|
26 |
|
@@ -28,13 +38,14 @@ class JPIBFI_Import_Export_Settings extends JPIBFI_Settings_Tab {
|
|
28 |
wp_import_cleanup( $file['id'] );
|
29 |
|
30 |
$this->notices[] = new JPIBFI_Admin_Notice( 'error', true, 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'] ) ) );
|
|
|
31 |
return;
|
32 |
}
|
33 |
|
34 |
if ( ! is_file( $file['file'] ) ) {
|
35 |
wp_import_cleanup( $file['id'] );
|
36 |
-
|
37 |
$this->notices[] = new JPIBFI_Admin_Notice( 'error', true, __( 'The path is not a file, please try again.', 'jquery-pin-it-button-for-images' ) );
|
|
|
38 |
return;
|
39 |
}
|
40 |
|
@@ -46,9 +57,13 @@ class JPIBFI_Import_Export_Settings extends JPIBFI_Settings_Tab {
|
|
46 |
foreach ( (array) $options_to_import as $option_name => $option_value ) {
|
47 |
$options_to_import[ $option_name ] = maybe_unserialize( $option_value );
|
48 |
}
|
|
|
49 |
|
50 |
-
$
|
51 |
-
|
|
|
|
|
|
|
52 |
|
53 |
$this->notices[] = new JPIBFI_Admin_Notice( 'success', true, __( 'Import Successful', 'jquery_pin_it_button_for_images' ) );
|
54 |
}
|
@@ -69,8 +84,8 @@ class JPIBFI_Import_Export_Settings extends JPIBFI_Settings_Tab {
|
|
69 |
|
70 |
function get_module_settings() {
|
71 |
return array(
|
72 |
-
'slug'
|
73 |
-
'name'
|
74 |
);
|
75 |
}
|
76 |
|
@@ -106,29 +121,19 @@ class JPIBFI_Import_Export_Settings extends JPIBFI_Settings_Tab {
|
|
106 |
header( 'Content-Disposition: attachment; filename=' . $filename );
|
107 |
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
108 |
|
109 |
-
$
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
);
|
115 |
-
|
116 |
-
$export_options = array();
|
117 |
-
|
118 |
-
foreach ( $option_names as $option_name ) {
|
119 |
|
120 |
-
$option_value = get_option( $option_name );
|
121 |
-
if ( $option_value !== false ) {
|
122 |
-
$export_options[ $option_name ] = maybe_serialize( $option_value );
|
123 |
-
}
|
124 |
-
}
|
125 |
$JSON_PRETTY_PRINT = defined( 'JSON_PRETTY_PRINT' ) ? JSON_PRETTY_PRINT : null;
|
126 |
echo json_encode( array( 'options' => $export_options ), $JSON_PRETTY_PRINT );
|
127 |
exit;
|
128 |
}
|
129 |
|
130 |
public function save_settings( $settings ) {
|
131 |
-
print_r( $settings, true);
|
132 |
$this->import();
|
133 |
}
|
134 |
}
|
4 |
|
5 |
private $ajax_import_action;
|
6 |
|
7 |
+
private $options_to_import_export;
|
8 |
+
|
9 |
function __construct() {
|
10 |
parent::__construct( 'import' );
|
11 |
+
$this->ajax_import_action = 'import';
|
12 |
+
$this->options_to_import_export = array(
|
13 |
+
'jpibfi_selection_options',
|
14 |
+
'jpibfi_visual_options',
|
15 |
+
'jpibfi_advanced_options',
|
16 |
+
'jpibfi_version',
|
17 |
+
);
|
18 |
add_filter( 'export_args', array( $this, 'export_args' ) );
|
19 |
add_action( 'export_wp', array( $this, 'export_wp' ) );
|
20 |
}
|
21 |
|
22 |
function import() {
|
23 |
+
$file = wp_import_handle_upload();
|
24 |
|
25 |
if ( isset( $file['error'] ) ) {
|
26 |
$this->notices[] = new JPIBFI_Admin_Notice( 'error', true, esc_html( $file['error'] ) );
|
27 |
+
|
28 |
return;
|
29 |
}
|
30 |
|
31 |
if ( ! isset( $file['file'], $file['id'] ) ) {
|
32 |
$this->notices[] = new JPIBFI_Admin_Notice( 'error', true, __( 'The file did not upload properly. Please try again.', 'jquery-pin-it-button-for-images' ) );
|
33 |
+
|
34 |
return;
|
35 |
}
|
36 |
|
38 |
wp_import_cleanup( $file['id'] );
|
39 |
|
40 |
$this->notices[] = new JPIBFI_Admin_Notice( 'error', true, 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'] ) ) );
|
41 |
+
|
42 |
return;
|
43 |
}
|
44 |
|
45 |
if ( ! is_file( $file['file'] ) ) {
|
46 |
wp_import_cleanup( $file['id'] );
|
|
|
47 |
$this->notices[] = new JPIBFI_Admin_Notice( 'error', true, __( 'The path is not a file, please try again.', 'jquery-pin-it-button-for-images' ) );
|
48 |
+
|
49 |
return;
|
50 |
}
|
51 |
|
57 |
foreach ( (array) $options_to_import as $option_name => $option_value ) {
|
58 |
$options_to_import[ $option_name ] = maybe_unserialize( $option_value );
|
59 |
}
|
60 |
+
$options_to_import[ 'jpibfi_version' ] = ! isset( $options_to_import[ 'jpibfi_version' ] ) ? '2.2.2' : $options_to_import[ 'jpibfi_version' ];
|
61 |
|
62 |
+
foreach ( $this->options_to_import_export as $option_name ) {
|
63 |
+
if ( isset( $options_to_import[ $option_name ] ) ) {
|
64 |
+
update_option( $option_name, $options_to_import[ $option_name] );
|
65 |
+
}
|
66 |
+
}
|
67 |
|
68 |
$this->notices[] = new JPIBFI_Admin_Notice( 'success', true, __( 'Import Successful', 'jquery_pin_it_button_for_images' ) );
|
69 |
}
|
84 |
|
85 |
function get_module_settings() {
|
86 |
return array(
|
87 |
+
'slug' => 'import',
|
88 |
+
'name' => __( 'Import/Export', 'jquery-pin-it-button-for-images' ),
|
89 |
);
|
90 |
}
|
91 |
|
121 |
header( 'Content-Disposition: attachment; filename=' . $filename );
|
122 |
header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ), true );
|
123 |
|
124 |
+
$export_options = array_reduce($this->options_to_import_export, function($return, $current) {
|
125 |
+
$option_value = get_option( $current );
|
126 |
+
return false !== $option_value
|
127 |
+
? array_merge( $return, array( $current => maybe_serialize( $option_value ) ) )
|
128 |
+
: $return;
|
129 |
+
}, array() );
|
|
|
|
|
|
|
|
|
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 |
|
136 |
public function save_settings( $settings ) {
|
|
|
137 |
$this->import();
|
138 |
}
|
139 |
}
|
includes/admin/settings/jpibfi-settings-base.php
CHANGED
@@ -68,7 +68,7 @@ abstract class JPIBFI_Settings_Base extends JPIBFI_Settings_Tab {
|
|
68 |
$errors = $validator->get_errors();
|
69 |
if ( count( $errors ) > 0 ) {
|
70 |
$error_messages = array_merge(
|
71 |
-
array( '<strong>' .__( 'Settings not saved.', '
|
72 |
$errors
|
73 |
);
|
74 |
$this->notices[] = new JPIBFI_Admin_Notice( 'error', true, join( '<br/>', $error_messages ) );
|
68 |
$errors = $validator->get_errors();
|
69 |
if ( count( $errors ) > 0 ) {
|
70 |
$error_messages = array_merge(
|
71 |
+
array( '<strong>' .__( 'Settings not saved.', 'jquery-pin-in-button-for-images' ) . '</strong>' ),
|
72 |
$errors
|
73 |
);
|
74 |
$this->notices[] = new JPIBFI_Admin_Notice( 'error', true, join( '<br/>', $error_messages ) );
|
includes/includes/JPIBFI_Version_Updater.php
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class JPIBFI_Version_Updater {
|
4 |
+
|
5 |
+
private $version;
|
6 |
+
private $option_name = 'jpibfi_version';
|
7 |
+
|
8 |
+
function __construct( $version ) {
|
9 |
+
$this->version = $version;
|
10 |
+
}
|
11 |
+
|
12 |
+
function update() {
|
13 |
+
$version = get_option( $this->option_name );
|
14 |
+
if ( $this->version == $version ) {
|
15 |
+
return;
|
16 |
+
}
|
17 |
+
|
18 |
+
if ( version_compare( $version, '2.2.3', 'lt' ) ) {
|
19 |
+
$this->update_2_2_3();
|
20 |
+
}
|
21 |
+
update_option( $this->option_name, $this->version );
|
22 |
+
}
|
23 |
+
|
24 |
+
private function update_2_2_3() {
|
25 |
+
require_once 'versions/JPIBFI_Version_Update_2_2_3.php';
|
26 |
+
new JPIBFI_Version_Update_2_2_3();
|
27 |
+
}
|
28 |
+
}
|
includes/includes/jpibfi-includes.php
CHANGED
@@ -12,17 +12,12 @@ class JPIBFI_Includes {
|
|
12 |
}
|
13 |
|
14 |
function load_dependencies(){
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
'options/jpibfi-visual-options.php',
|
20 |
-
'options/jpibfi-advanced-options.php',
|
21 |
-
'jpibfi-option-converter.php',
|
22 |
-
);
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
}
|
28 |
}
|
12 |
}
|
13 |
|
14 |
function load_dependencies(){
|
15 |
+
require_once 'options/jpibfi-options.php';
|
16 |
+
require_once 'options/jpibfi-selection-options.php';
|
17 |
+
require_once 'options/jpibfi-visual-options.php';
|
18 |
+
require_once 'options/jpibfi-advanced-options.php';
|
|
|
|
|
|
|
|
|
19 |
|
20 |
+
|
21 |
+
require_once 'JPIBFI_Version_Updater.php';
|
|
|
22 |
}
|
23 |
}
|
includes/includes/jpibfi-option-converter.php
DELETED
@@ -1,175 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
class JPIBFI_Option_Converter {
|
4 |
-
|
5 |
-
private $selection_options;
|
6 |
-
private $visual_options;
|
7 |
-
private $advanced_options;
|
8 |
-
|
9 |
-
private $converted_option_name;
|
10 |
-
private $converted_option_value;
|
11 |
-
|
12 |
-
public function __construct() {
|
13 |
-
$this->advanced_options = new JPIBFI_Advanced_Options();
|
14 |
-
$this->selection_options = new JPIBFI_Selection_Options();
|
15 |
-
$this->visual_options = new JPIBFI_Visual_Options();
|
16 |
-
|
17 |
-
$this->converted_option_name = 'jpibfi_options_version';
|
18 |
-
$this->converted_option_value = '2.0';
|
19 |
-
}
|
20 |
-
|
21 |
-
public function convert_if_needed() {
|
22 |
-
$converted_val = get_option( $this->converted_option_name );
|
23 |
-
if ( $this->converted_option_value === $converted_val )
|
24 |
-
return;
|
25 |
-
|
26 |
-
$selection_options = get_option( 'jpibfi_selection_options' );
|
27 |
-
if ( $selection_options ) {
|
28 |
-
$selection_options = $this->convert_selection_options( $selection_options );
|
29 |
-
$this->selection_options->update( $selection_options );
|
30 |
-
}
|
31 |
-
|
32 |
-
$visual_options = get_option( 'jpibfi_visual_options' );
|
33 |
-
if ( $visual_options ) {
|
34 |
-
$visual_options = $this->convert_visual_options( $visual_options );
|
35 |
-
$this->visual_options->update( $visual_options );
|
36 |
-
}
|
37 |
-
$this->finish();
|
38 |
-
}
|
39 |
-
|
40 |
-
public function save_and_convert_if_needed($imported_options) {
|
41 |
-
if ( !is_array( $imported_options ) )
|
42 |
-
return;
|
43 |
-
$convert = $imported_options[ $this->converted_option_name ] != $this->converted_option_value;
|
44 |
-
|
45 |
-
$selection_options = $imported_options[ 'jpibfi_selection_options' ];
|
46 |
-
if ( $selection_options ) {
|
47 |
-
$selection_options = $convert ? $this->convert_selection_options( $selection_options ) : $selection_options;
|
48 |
-
$this->selection_options->update( $selection_options );
|
49 |
-
}
|
50 |
-
|
51 |
-
$visual_options = $imported_options[ 'jpibfi_visual_options' ];
|
52 |
-
if ( $visual_options ) {
|
53 |
-
$visual_options = $convert ? $this->convert_visual_options( $visual_options ) : $visual_options;
|
54 |
-
$this->visual_options->update( $visual_options );
|
55 |
-
}
|
56 |
-
|
57 |
-
$advanced_options = $imported_options[ 'jpibfi_advanced_options' ];
|
58 |
-
if ( $advanced_options ) {
|
59 |
-
$this->advanced_options->update( $advanced_options );
|
60 |
-
}
|
61 |
-
|
62 |
-
$this->finish();
|
63 |
-
}
|
64 |
-
|
65 |
-
private function convert_selection_options($options) {
|
66 |
-
$new_options = array (
|
67 |
-
'image_selector' => $options['image_selector'],
|
68 |
-
'disabled_classes' => $options['disabled_classes'],
|
69 |
-
'enabled_classes' => $options['enabled_classes'],
|
70 |
-
'min_image_height' => is_numeric( $options['min_image_height'] ) ? intval( $options['min_image_height'] ) : 0,
|
71 |
-
'min_image_height_small' => is_numeric( $options['min_image_height'] ) ? intval( $options['min_image_height'] ) : 0,
|
72 |
-
'min_image_width' => is_numeric( $options['min_image_width'] ) ? intval( $options['min_image_width'] ) : 0,
|
73 |
-
'min_image_width_small' => is_numeric( $options['min_image_width'] ) ? intval( $options['min_image_width'] ) : 0,
|
74 |
-
'show_on' => $this->create_show_on( $options ),
|
75 |
-
'disable_on' => $this->create_disable_on()
|
76 |
-
);
|
77 |
-
$defaults = $this->selection_options->get_default_options();
|
78 |
-
return array_merge($defaults, $new_options);
|
79 |
-
}
|
80 |
-
|
81 |
-
private function create_show_on($selection_settings) {
|
82 |
-
$show_on = array ();
|
83 |
-
if ($selection_settings['show_on_home'] == "1")
|
84 |
-
$show_on[] = '[front]';
|
85 |
-
|
86 |
-
if ($selection_settings['show_on_single'] == "1")
|
87 |
-
$show_on[] = '[single]';
|
88 |
-
|
89 |
-
if ($selection_settings['show_on_page'] == "1")
|
90 |
-
$show_on[] = '[page]';
|
91 |
-
|
92 |
-
if ($selection_settings['show_on_category'] == "1") {
|
93 |
-
$show_on[] = '[category]';
|
94 |
-
$show_on[] = '[archive]';
|
95 |
-
$show_on[] = '[search]';
|
96 |
-
}
|
97 |
-
|
98 |
-
if ($selection_settings['show_on_blog'] == "1")
|
99 |
-
$show_on[] = '[home]';
|
100 |
-
|
101 |
-
return implode(',', $show_on);
|
102 |
-
}
|
103 |
-
|
104 |
-
private function create_disable_on() {
|
105 |
-
$result = array ();
|
106 |
-
$args = array(
|
107 |
-
'post_type' => array ( 'page', 'post' ),
|
108 |
-
'meta_query' => array (
|
109 |
-
array ( 'key' => 'jpibfi_meta' )
|
110 |
-
)
|
111 |
-
);
|
112 |
-
$my_query = new WP_Query( $args );
|
113 |
-
if( $my_query->have_posts() ) {
|
114 |
-
while( $my_query->have_posts() ) {
|
115 |
-
$my_query->the_post();
|
116 |
-
$post_meta = get_post_meta( get_the_ID(), 'jpibfi_meta', true );
|
117 |
-
if ( array_key_exists( 'jpibfi_disable_for_post', $post_meta ) && '1' == $post_meta['jpibfi_disable_for_post'] ) {
|
118 |
-
$result[] = get_the_ID();
|
119 |
-
}
|
120 |
-
}
|
121 |
-
}
|
122 |
-
wp_reset_postdata();
|
123 |
-
return implode(',', $result);
|
124 |
-
}
|
125 |
-
|
126 |
-
private function convert_visual_options($options) {
|
127 |
-
$new_options = array (
|
128 |
-
'show_button' => $options['show_button'],
|
129 |
-
'button_margin_bottom' => is_numeric( $options['button_margin_bottom'] ) ? intval( $options['button_margin_bottom'] ) : 0,
|
130 |
-
'button_margin_top' => is_numeric( $options['button_margin_top'] ) ? intval( $options['button_margin_top'] ) : 0,
|
131 |
-
'button_margin_left' => is_numeric( $options['button_margin_left'] ) ? intval( $options['button_margin_left'] ) : 0,
|
132 |
-
'button_margin_right' => is_numeric( $options['button_margin_right'] ) ? intval( $options['button_margin_right'] ) : 0,
|
133 |
-
'button_position' => $this->convert_button_position( $options['button_position'] ),
|
134 |
-
'description_option' => $this->convert_description_option( $options['description_option'] ),
|
135 |
-
'pinLinkedImages' => $options['pinLinkedImages'] == '1',
|
136 |
-
'transparency_value' => is_numeric( $options['transparency_value'] ) ? floatval( $options['transparency_value'] ) : 0.5,
|
137 |
-
'use_custom_image' => $options['use_custom_image'] == '1',
|
138 |
-
'custom_image_url' => $options['custom_image_url'],
|
139 |
-
'custom_image_height' => is_numeric( $options['custom_image_height'] ) ? intval( $options['custom_image_height'] ) : 0,
|
140 |
-
'custom_image_width' => is_numeric( $options['custom_image_width'] ) ? intval( $options['custom_image_width'] ) : 0
|
141 |
-
);
|
142 |
-
$defaults = $this->visual_options->get_default_options();
|
143 |
-
return array_merge($defaults, $new_options);
|
144 |
-
}
|
145 |
-
|
146 |
-
private function convert_button_position( $button_position ) {
|
147 |
-
switch ( $button_position ){
|
148 |
-
case '0': return 'top-left';
|
149 |
-
case '1': return 'top-right';
|
150 |
-
case '2': return 'bottom-left';
|
151 |
-
case '3': return 'bottom-right';
|
152 |
-
case '4': return 'middle';
|
153 |
-
default: return 'top-left';
|
154 |
-
}
|
155 |
-
}
|
156 |
-
|
157 |
-
private function convert_description_option( $description_option ) {
|
158 |
-
switch( $description_option ) {
|
159 |
-
case '1': return array ( 'post_title' );
|
160 |
-
case '2': return array ( 'post_excerpt' );
|
161 |
-
case '3': return array ( 'img_title' );
|
162 |
-
case '4': return array ( 'site_title' );
|
163 |
-
case '5': return array ( 'img_description' );
|
164 |
-
case '6': return array ( 'img_alt' );
|
165 |
-
default: return array ( 'img_title', 'img_alt', 'post_title' );
|
166 |
-
}
|
167 |
-
}
|
168 |
-
|
169 |
-
private function finish() {
|
170 |
-
update_option( $this->converted_option_name, $this->converted_option_value );
|
171 |
-
delete_option( 'jpibfi_advanced_options' );
|
172 |
-
delete_option( 'jpibfi_lightbox_options' );
|
173 |
-
delete_post_meta_by_key( 'jpibfi_meta' );
|
174 |
-
}
|
175 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/includes/options/jpibfi-advanced-options.php
CHANGED
@@ -18,4 +18,15 @@ class JPIBFI_Advanced_Options extends JPIBFI_Options {
|
|
18 |
function get_option_name() {
|
19 |
return 'jpibfi_advanced_options';
|
20 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
}
|
18 |
function get_option_name() {
|
19 |
return 'jpibfi_advanced_options';
|
20 |
}
|
21 |
+
|
22 |
+
function get_types() {
|
23 |
+
return array(
|
24 |
+
'filter_the_content_on' => 'boolean',
|
25 |
+
'filter_the_content_priority' => 'int',
|
26 |
+
'filter_the_excerpt_on' => 'boolean',
|
27 |
+
'filter_the_excerpt_priority' => 'int',
|
28 |
+
'filter_post_thumbnail_html_on' => 'boolean',
|
29 |
+
'filter_post_thumbnail_html_priority' => 'int',
|
30 |
+
);
|
31 |
+
}
|
32 |
}
|
includes/includes/options/jpibfi-options.php
CHANGED
@@ -6,7 +6,17 @@ abstract class JPIBFI_Options {
|
|
6 |
|
7 |
abstract function get_default_options();
|
8 |
|
|
|
|
|
|
|
|
|
|
|
9 |
function sanitize($input) {
|
|
|
|
|
|
|
|
|
|
|
10 |
return $input;
|
11 |
}
|
12 |
|
@@ -21,4 +31,23 @@ abstract class JPIBFI_Options {
|
|
21 |
public function update( $val ) {
|
22 |
update_option( $this->get_option_name(), $val );
|
23 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
}
|
6 |
|
7 |
abstract function get_default_options();
|
8 |
|
9 |
+
/**
|
10 |
+
* @return array
|
11 |
+
*/
|
12 |
+
protected abstract function get_types();
|
13 |
+
|
14 |
function sanitize($input) {
|
15 |
+
$types = $this->get_types();
|
16 |
+
$defaults = $this->get_default_options();
|
17 |
+
foreach ( $types as $key => $type ) {
|
18 |
+
$input[ $key ] = $this->sanitize_field( $input[ $key ], $type, $defaults[ $key ] );
|
19 |
+
}
|
20 |
return $input;
|
21 |
}
|
22 |
|
31 |
public function update( $val ) {
|
32 |
update_option( $this->get_option_name(), $val );
|
33 |
}
|
34 |
+
|
35 |
+
private function sanitize_field( $value, $type, $default ) {
|
36 |
+
if ( ! isset($value ) )
|
37 |
+
return $default;
|
38 |
+
switch ( $type ) {
|
39 |
+
case 'int':
|
40 |
+
return is_numeric( $value ) ? intval( $value ) : $default;
|
41 |
+
case 'float':
|
42 |
+
return is_numeric( $value ) ? floatval( $value ) : $default;
|
43 |
+
case 'boolean':
|
44 |
+
return is_bool( $value ) ? $value : $default;
|
45 |
+
case 'array':
|
46 |
+
return is_array( $value ) ? $value : $default;
|
47 |
+
case 'string':
|
48 |
+
return is_string( $value ) ? $value : $default;
|
49 |
+
default:
|
50 |
+
return $value;
|
51 |
+
}
|
52 |
+
}
|
53 |
}
|
includes/includes/options/jpibfi-selection-options.php
CHANGED
@@ -2,22 +2,37 @@
|
|
2 |
|
3 |
class JPIBFI_Selection_Options extends JPIBFI_Options {
|
4 |
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
return $defaults;
|
18 |
-
}
|
19 |
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
}
|
2 |
|
3 |
class JPIBFI_Selection_Options extends JPIBFI_Options {
|
4 |
|
5 |
+
function get_default_options() {
|
6 |
+
$defaults = array(
|
7 |
+
'image_selector' => '.jpibfi_container img',
|
8 |
+
'disabled_classes' => 'wp-smiley;nopin',
|
9 |
+
'enabled_classes' => '',
|
10 |
+
'min_image_height' => 0,
|
11 |
+
'min_image_height_small' => 0,
|
12 |
+
'min_image_width' => 0,
|
13 |
+
'min_image_width_small' => 0,
|
14 |
+
'show_on' => '[front],[home],[single],[page],[archive],[search],[category]',
|
15 |
+
'disable_on' => ''
|
16 |
+
);
|
|
|
|
|
17 |
|
18 |
+
return $defaults;
|
19 |
+
}
|
20 |
+
|
21 |
+
function get_option_name() {
|
22 |
+
return 'jpibfi_selection_options';
|
23 |
+
}
|
24 |
+
|
25 |
+
function get_types() {
|
26 |
+
return array(
|
27 |
+
'image_selector' => 'string',
|
28 |
+
'disabled_classes' => 'string',
|
29 |
+
'enabled_classes' => 'string',
|
30 |
+
'min_image_height' => 'int',
|
31 |
+
'min_image_height_small' => 'int',
|
32 |
+
'min_image_width' => 'int',
|
33 |
+
'min_image_width_small' => 'int',
|
34 |
+
'show_on' => 'string',
|
35 |
+
'disable_on' => 'string'
|
36 |
+
);
|
37 |
+
}
|
38 |
}
|
includes/includes/options/jpibfi-visual-options.php
CHANGED
@@ -2,101 +2,125 @@
|
|
2 |
|
3 |
class JPIBFI_Visual_Options extends JPIBFI_Options {
|
4 |
|
5 |
-
|
6 |
-
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
40 |
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
if ( $save ) {
|
54 |
-
$this->update( $input );
|
55 |
-
}
|
56 |
-
return $input;
|
57 |
-
}
|
58 |
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
$options['pinImageWidth'] = $options['custom_image_width'];
|
63 |
-
$options['pinImageHeight'] = $options['custom_image_height'];
|
64 |
-
} else if ( $options['pin_image'] == 'old_default' ) {
|
65 |
-
$options['pinImageWidth'] = $this->image_width;
|
66 |
-
$options['pinImageHeight'] = $this->image_height;
|
67 |
-
} else {
|
68 |
-
$baseHeight = 54;
|
69 |
-
switch ( $options['pin_image_size'] ) {
|
70 |
-
case 'small':
|
71 |
-
$options['pinImageHeight'] = $baseHeight * 0.8;
|
72 |
-
break;
|
73 |
-
case 'large':
|
74 |
-
$options['pinImageHeight'] = $baseHeight * 1.5;
|
75 |
-
break;
|
76 |
-
case 'normal':
|
77 |
-
default:
|
78 |
-
$options['pinImageHeight'] = $baseHeight;
|
79 |
-
break;
|
80 |
-
}
|
81 |
|
82 |
-
|
83 |
-
|
84 |
-
case 'rounded-rectangle':
|
85 |
-
$options['pinImageWidth'] = $options['pinImageHeight'] * 1.5;
|
86 |
-
break;
|
87 |
-
case 'square':
|
88 |
-
case 'rounded-square':
|
89 |
-
case 'round':
|
90 |
-
default:
|
91 |
-
$options['pinImageWidth'] = $options['pinImageHeight'];
|
92 |
-
break;
|
93 |
-
}
|
94 |
-
}
|
95 |
-
unset( $options['custom_image_width'], $options['custom_image_height'] );
|
96 |
-
return $options;
|
97 |
-
}
|
98 |
|
99 |
-
|
100 |
-
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
}
|
2 |
|
3 |
class JPIBFI_Visual_Options extends JPIBFI_Options {
|
4 |
|
5 |
+
private $image_height = 41;
|
6 |
+
private $image_width = 65;
|
7 |
|
8 |
+
function get_default_options() {
|
9 |
+
$defaults = array(
|
10 |
+
'show_button' => 'hover',
|
11 |
+
'button_margin_bottom' => 20,
|
12 |
+
'button_margin_top' => 20,
|
13 |
+
'button_margin_left' => 20,
|
14 |
+
'button_margin_right' => 20,
|
15 |
+
'button_position' => 'top-left',
|
16 |
+
'description_option' => array( 'img_title', 'img_alt', 'post_title' ),
|
17 |
+
'pinLinkedImages' => true,
|
18 |
+
'transparency_value' => 0.2,
|
19 |
+
'pin_image' => 'default',
|
20 |
+
'pin_image_button' => 'square',
|
21 |
+
'pin_image_icon' => 'circle',
|
22 |
+
'pin_image_size' => 'normal',
|
23 |
+
'custom_image_url' => '',
|
24 |
+
'custom_image_height' => 0,
|
25 |
+
'custom_image_width' => 0
|
26 |
+
);
|
27 |
+
return $defaults;
|
28 |
+
}
|
29 |
|
30 |
+
function sanitize( $input ) {
|
31 |
+
$input = parent::sanitize( $input );
|
32 |
+
$save = false;
|
33 |
+
if ( $input['show_button'] != 'hover' ) {
|
34 |
+
$input['show_button'] = 'hover';
|
35 |
+
$save = true;
|
36 |
+
}
|
37 |
+
if ( $input['pin_image_icon'] != 'circle' ) {
|
38 |
+
$input['pin_image_icon'] = 'circle';
|
39 |
+
$save = true;
|
40 |
+
}
|
41 |
|
42 |
+
if ( ! is_array( $input['description_option'] ) ) {
|
43 |
+
$input['description_option'] = array( 'img_title', 'img_alt', 'post_title' );
|
44 |
+
$save = true;
|
45 |
+
}
|
46 |
|
47 |
+
if ( array_key_exists( 'use_custom_image', $input ) ) {
|
48 |
+
$use_custom = $input['use_custom_image'] == true;
|
49 |
+
$input['pin_image'] = $use_custom ? 'custom' : 'old_default';
|
50 |
+
unset( $input['use_custom_image'] );
|
51 |
+
$save = true;
|
52 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
+
if ( $save ) {
|
55 |
+
$this->update( $input );
|
56 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
+
return $input;
|
59 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
+
public function get_options_for_view() {
|
62 |
+
$options = $this->get();
|
63 |
+
if ( $options['pin_image'] == 'custom' ) {
|
64 |
+
$options['pinImageWidth'] = $options['custom_image_width'];
|
65 |
+
$options['pinImageHeight'] = $options['custom_image_height'];
|
66 |
+
} else if ( $options['pin_image'] == 'old_default' ) {
|
67 |
+
$options['pinImageWidth'] = $this->image_width;
|
68 |
+
$options['pinImageHeight'] = $this->image_height;
|
69 |
+
} else {
|
70 |
+
$baseHeight = 54;
|
71 |
+
switch ( $options['pin_image_size'] ) {
|
72 |
+
case 'small':
|
73 |
+
$options['pinImageHeight'] = $baseHeight * 0.8;
|
74 |
+
break;
|
75 |
+
case 'large':
|
76 |
+
$options['pinImageHeight'] = $baseHeight * 1.5;
|
77 |
+
break;
|
78 |
+
case 'normal':
|
79 |
+
default:
|
80 |
+
$options['pinImageHeight'] = $baseHeight;
|
81 |
+
break;
|
82 |
+
}
|
83 |
+
|
84 |
+
switch ( $options['pin_image_button'] ) {
|
85 |
+
case 'rectangle':
|
86 |
+
case 'rounded-rectangle':
|
87 |
+
$options['pinImageWidth'] = $options['pinImageHeight'] * 1.5;
|
88 |
+
break;
|
89 |
+
case 'square':
|
90 |
+
case 'rounded-square':
|
91 |
+
case 'round':
|
92 |
+
default:
|
93 |
+
$options['pinImageWidth'] = $options['pinImageHeight'];
|
94 |
+
break;
|
95 |
+
}
|
96 |
+
}
|
97 |
+
unset( $options['custom_image_width'], $options['custom_image_height'] );
|
98 |
+
|
99 |
+
return $options;
|
100 |
+
}
|
101 |
+
|
102 |
+
public function get_option_name() {
|
103 |
+
return 'jpibfi_visual_options';
|
104 |
+
}
|
105 |
+
|
106 |
+
function get_types() {
|
107 |
+
return array(
|
108 |
+
'show_button' => 'string',
|
109 |
+
'button_margin_bottom' => 'int',
|
110 |
+
'button_margin_top' => 'int',
|
111 |
+
'button_margin_left' => 'int',
|
112 |
+
'button_margin_right' => 'int',
|
113 |
+
'button_position' => 'string',
|
114 |
+
'description_option' => 'array',
|
115 |
+
'pinLinkedImages' => 'boolean',
|
116 |
+
'transparency_value' => 'float',
|
117 |
+
'pin_image' => 'string',
|
118 |
+
'pin_image_button' => 'string',
|
119 |
+
'pin_image_icon' => 'string',
|
120 |
+
'pin_image_size' => 'string',
|
121 |
+
'custom_image_url' => 'string',
|
122 |
+
'custom_image_height' => 'int',
|
123 |
+
'custom_image_width' => 'int'
|
124 |
+
);
|
125 |
+
}
|
126 |
}
|
includes/includes/versions/JPIBFI_Version_Update_2_2_3.php
ADDED
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class JPIBFI_Version_Update_2_2_3 {
|
4 |
+
|
5 |
+
function __construct() {
|
6 |
+
$this->update_options_if_needed();
|
7 |
+
$this->cleanup();
|
8 |
+
}
|
9 |
+
|
10 |
+
public function update_options_if_needed() {
|
11 |
+
|
12 |
+
$options_val = get_option( 'jpibfi_selection_options' );
|
13 |
+
if ( $options_val ) {
|
14 |
+
$options_val = $this->fix_selection_options( $options_val );
|
15 |
+
$options = new JPIBFI_Selection_Options();
|
16 |
+
$defaults = $options->get_default_options();
|
17 |
+
$with_defaults = array_merge( $defaults, $options_val );
|
18 |
+
$keys = array_keys( $defaults );
|
19 |
+
$result = array_reduce( $keys, function ( $result, $current_key ) use ( $with_defaults ) {
|
20 |
+
return array_merge( $result, array( $current_key => $with_defaults[ $current_key ] ) );
|
21 |
+
}, array() );
|
22 |
+
$options->update( $result );
|
23 |
+
}
|
24 |
+
|
25 |
+
$options_val = get_option( 'jpibfi_visual_options' );
|
26 |
+
if ( $options_val ) {
|
27 |
+
$options_val = $this->fix_visual_options( $options_val );
|
28 |
+
$options = new JPIBFI_Visual_Options();
|
29 |
+
$defaults = $options->get_default_options();
|
30 |
+
$with_defaults = array_merge( $defaults, $options_val );
|
31 |
+
$keys = array_keys( $defaults );
|
32 |
+
$result = array_reduce( $keys, function ( $result, $current_key ) use ( $with_defaults ) {
|
33 |
+
return array_merge( $result, array( $current_key => $with_defaults[ $current_key ] ) );
|
34 |
+
}, array() );
|
35 |
+
$options->update( $result );
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
+
private function fix_selection_options( $options ) {
|
40 |
+
$resolution_options = array(
|
41 |
+
'min_image_height',
|
42 |
+
'min_image_height_small',
|
43 |
+
'min_image_width',
|
44 |
+
'min_image_width_small'
|
45 |
+
);
|
46 |
+
foreach ( $resolution_options as $resolution_option ) {
|
47 |
+
$options[ $resolution_option ] = isset( $options[ $resolution_option ] ) && is_numeric( $options[ $resolution_option ] )
|
48 |
+
? intval( $options[ $resolution_option ] )
|
49 |
+
: 0;
|
50 |
+
}
|
51 |
+
if ( ! isset( $options['show_on'] ) ) {
|
52 |
+
$options['show_on'] = $this->create_show_on( $options );
|
53 |
+
}
|
54 |
+
if ( ! isset( $options['disable_on'] ) ) {
|
55 |
+
$options['disable_on'] = $this->create_disable_on();
|
56 |
+
}
|
57 |
+
|
58 |
+
return $options;
|
59 |
+
}
|
60 |
+
|
61 |
+
private function create_show_on( $selection_settings ) {
|
62 |
+
$show_on = array();
|
63 |
+
if ( isset( $selection_settings['show_on_home'] ) && $selection_settings['show_on_home'] == "1" ) {
|
64 |
+
$show_on[] = '[front]';
|
65 |
+
}
|
66 |
+
|
67 |
+
if ( isset( $selection_settings['show_on_single'] ) && $selection_settings['show_on_single'] == "1" ) {
|
68 |
+
$show_on[] = '[single]';
|
69 |
+
}
|
70 |
+
|
71 |
+
if ( isset( $selection_settings['show_on_page'] ) && $selection_settings['show_on_page'] == "1" ) {
|
72 |
+
$show_on[] = '[page]';
|
73 |
+
}
|
74 |
+
|
75 |
+
if ( isset( $selection_settings['show_on_category'] ) && $selection_settings['show_on_category'] == "1" ) {
|
76 |
+
$show_on[] = '[category]';
|
77 |
+
$show_on[] = '[archive]';
|
78 |
+
$show_on[] = '[search]';
|
79 |
+
}
|
80 |
+
|
81 |
+
if ( isset( $selection_settings['show_on_blog'] ) && $selection_settings['show_on_blog'] == "1" ) {
|
82 |
+
$show_on[] = '[home]';
|
83 |
+
}
|
84 |
+
|
85 |
+
return implode( ',', $show_on );
|
86 |
+
}
|
87 |
+
|
88 |
+
private function create_disable_on() {
|
89 |
+
$result = array();
|
90 |
+
$args = array(
|
91 |
+
'post_type' => array( 'page', 'post' ),
|
92 |
+
'meta_query' => array(
|
93 |
+
array( 'key' => 'jpibfi_meta' )
|
94 |
+
)
|
95 |
+
);
|
96 |
+
$my_query = new WP_Query( $args );
|
97 |
+
if ( $my_query->have_posts() ) {
|
98 |
+
while ( $my_query->have_posts() ) {
|
99 |
+
$my_query->the_post();
|
100 |
+
$post_meta = get_post_meta( get_the_ID(), 'jpibfi_meta', true );
|
101 |
+
if ( array_key_exists( 'jpibfi_disable_for_post', $post_meta ) && '1' == $post_meta['jpibfi_disable_for_post'] ) {
|
102 |
+
$result[] = get_the_ID();
|
103 |
+
}
|
104 |
+
}
|
105 |
+
}
|
106 |
+
wp_reset_postdata();
|
107 |
+
|
108 |
+
return implode( ',', $result );
|
109 |
+
}
|
110 |
+
|
111 |
+
private function fix_visual_options( $options ) {
|
112 |
+
$int_options = array(
|
113 |
+
'button_margin_bottom',
|
114 |
+
'button_margin_top',
|
115 |
+
'button_margin_left',
|
116 |
+
'button_margin_right',
|
117 |
+
'custom_image_height',
|
118 |
+
'custom_image_width'
|
119 |
+
);
|
120 |
+
foreach ( $int_options as $int_option ) {
|
121 |
+
$options[ $int_option ] = isset( $options[ $int_option ] ) && is_numeric( $options[ $int_option ] )
|
122 |
+
? intval( $options[ $int_option ] )
|
123 |
+
: 0;
|
124 |
+
}
|
125 |
+
if ( isset( $options['pinLinkedImages'] ) && is_string( $options['pinLinkedImages'] ) ) {
|
126 |
+
$options['pinLinkedImages'] = '1' == $options['pinLinkedImages'];
|
127 |
+
}
|
128 |
+
if ( isset( $options['use_custom_image'] ) && is_string( $options['use_custom_image'] ) ) {
|
129 |
+
$options['use_custom_image'] = '1' == $options['use_custom_image'];
|
130 |
+
}
|
131 |
+
|
132 |
+
$options['transparency_value'] = isset( $options['transparency_value'] ) && is_numeric( $options['transparency_value'] )
|
133 |
+
? floatval( $options['transparency_value'] )
|
134 |
+
: 0.5;
|
135 |
+
|
136 |
+
if ( isset( $options['button_position'] ) ) {
|
137 |
+
$options['button_position'] = $this->convert_button_position( $options['button_position'] );
|
138 |
+
}
|
139 |
+
if ( isset( $options['description_option'] ) && ! is_array( $options['description_option'] ) ) {
|
140 |
+
$options['description_option'] = $this->convert_description_option( $options['description_option'] );
|
141 |
+
}
|
142 |
+
|
143 |
+
return $options;
|
144 |
+
}
|
145 |
+
|
146 |
+
private function convert_button_position( $button_position ) {
|
147 |
+
switch ( $button_position ) {
|
148 |
+
case 'top-left':
|
149 |
+
case 'top-right':
|
150 |
+
case 'bottom-left':
|
151 |
+
case 'bottom-right':
|
152 |
+
case 'middle':
|
153 |
+
return $button_position;
|
154 |
+
case '0':
|
155 |
+
return 'top-left';
|
156 |
+
case '1':
|
157 |
+
return 'top-right';
|
158 |
+
case '2':
|
159 |
+
return 'bottom-left';
|
160 |
+
case '3':
|
161 |
+
return 'bottom-right';
|
162 |
+
case '4':
|
163 |
+
return 'middle';
|
164 |
+
default:
|
165 |
+
return 'top-left';
|
166 |
+
}
|
167 |
+
}
|
168 |
+
|
169 |
+
private function convert_description_option( $description_option ) {
|
170 |
+
switch ( $description_option ) {
|
171 |
+
case '1':
|
172 |
+
return array( 'post_title' );
|
173 |
+
case '2':
|
174 |
+
return array( 'post_excerpt' );
|
175 |
+
case '3':
|
176 |
+
return array( 'img_title' );
|
177 |
+
case '4':
|
178 |
+
return array( 'site_title' );
|
179 |
+
case '5':
|
180 |
+
return array( 'img_description' );
|
181 |
+
case '6':
|
182 |
+
return array( 'img_alt' );
|
183 |
+
default:
|
184 |
+
return array( 'img_title', 'img_alt', 'post_title' );
|
185 |
+
}
|
186 |
+
}
|
187 |
+
|
188 |
+
private function cleanup() {
|
189 |
+
delete_option( 'jpibfi_lightbox_options' );
|
190 |
+
delete_option( 'jpibfi_options_version' );
|
191 |
+
delete_post_meta_by_key( 'jpibfi_meta' );
|
192 |
+
}
|
193 |
+
|
194 |
+
}
|
includes/jpibfi.php
CHANGED
@@ -36,15 +36,7 @@ class JPIBFI {
|
|
36 |
}
|
37 |
|
38 |
public function update_plugin() {
|
39 |
-
|
40 |
-
|
41 |
-
$version = get_option( $version_option );
|
42 |
-
if ( $this->version == $version )
|
43 |
-
return;
|
44 |
-
|
45 |
-
update_option( $version_option, $this->version );
|
46 |
-
|
47 |
-
$converter = new JPIBFI_Option_Converter();
|
48 |
-
$converter->convert_if_needed();
|
49 |
}
|
50 |
}
|
36 |
}
|
37 |
|
38 |
public function update_plugin() {
|
39 |
+
$version_updater = new JPIBFI_Version_Updater( $this->version );
|
40 |
+
$version_updater->update();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
}
|
42 |
}
|
jquery-pin-it-button-for-images.php
CHANGED
@@ -6,7 +6,7 @@ Description: Highlights images on hover and adds a "Pin It" button over them for
|
|
6 |
Text Domain: jquery-pin-it-button-for-images
|
7 |
Domain Path: /languages
|
8 |
Author: Marcin Skrzypiec
|
9 |
-
Version:2.2.
|
10 |
Author URI: https://highfiveplugins.com/
|
11 |
*/
|
12 |
|
@@ -18,7 +18,7 @@ if ( !class_exists( 'jQuery_Pin_It_Button_For_Images' ) ) {
|
|
18 |
final class jQuery_Pin_It_Button_For_Images {
|
19 |
|
20 |
function __construct() {
|
21 |
-
$version = '2.2.
|
22 |
require_once plugin_dir_path(__FILE__) . 'includes/jpibfi.php';
|
23 |
new JPIBFI(__FILE__, $version);
|
24 |
}
|
6 |
Text Domain: jquery-pin-it-button-for-images
|
7 |
Domain Path: /languages
|
8 |
Author: Marcin Skrzypiec
|
9 |
+
Version:2.2.3
|
10 |
Author URI: https://highfiveplugins.com/
|
11 |
*/
|
12 |
|
18 |
final class jQuery_Pin_It_Button_For_Images {
|
19 |
|
20 |
function __construct() {
|
21 |
+
$version = '2.2.3';
|
22 |
require_once plugin_dir_path(__FILE__) . 'includes/jpibfi.php';
|
23 |
new JPIBFI(__FILE__, $version);
|
24 |
}
|
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 links="$ctrl.config.links"\n current-tab="$ctrl.config.currentTab">\n </navbar>\n <form method="POST" enctype="multipart/form-data" id="jpibfi-form" action="{{ $ctrl.config.save.post_url }}">\n <input name="{{ ::$ctrl.config.save.action }}" value="{{ ::$ctrl.config.save.nonce }}" type="hidden" />\n <input name="{{ ::$ctrl.config.save.tab }}" value="{{ ::$ctrl.config.currentTab }}" type="hidden" />\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 <input ng-if="$ctrl.config.currentTab == \'select\' || $ctrl.config.currentTab == \'visual\' || $ctrl.config.currentTab == \'advanced\'" \n type="submit" class="button button-primary" value="{{ ::$ctrl.config.save.submit }}" /> \n </form>\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){r(this,e),this.linkService=t,this.config={},this.settingsValue={}}return i(e,[{key:"$onInit",value:function(){this.config=window[this.settingsName],this.linkService.init(this.config.page)}}]),e}();o.$inject=["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"),$=r(g),v=e("./services"),m=r(v),y=o["default"].module("app",[s["default"],l["default"],h["default"],$["default"],m["default"]]).component("app",d["default"]).name;n["default"]=y},{"./app.component":1,"./common/components":8,"./components/components":18,"./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){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 '};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:42}],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(){r(this,e)}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}}]),e}();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: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("./import.controller"),o=r(i),a={bindings:{i18n:"<"},require:{form:"^form"},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 <input type="file" name="import" ng-change="$ctrl.upload()" ng-model="$ctrl.file" ngf-accept="\'.json\'"\n ngf-select="$ctrl.upload()" ngf-max-size="1MB" />\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){r(this,e),this.Upload=t}return i(e,[{key:"upload",value:function(){document.getElementById("jpibfi-form").submit()}}]),e}();o.$inject=["Upload"],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:42}],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:42}],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 '};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: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("./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" name="{{ ::$ctrl.settings.pin_image.key }}" ng_model="$ctrl.values.pin_image" value="old_default">{{ ::$ctrl.settings.pin_image.options[\'old_default\'] }}</label></p>\n <p><label><input type="radio" name="{{ ::$ctrl.settings.pin_image.key }}" ng_model="$ctrl.values.pin_image" value="default">{{ ::$ctrl.settings.pin_image.options[\'default\'] }}</label></p>\n <p><label><input type="radio" name="{{ ::$ctrl.settings.pin_image.key }}" 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($event)">{{ ::$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 <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){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.$scope=e,n.fileFrame=null,n}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(e){var t=this;return e.preventDefault(),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 e=t.fileFrame.state().get("selection").first().toJSON();t.updateValue("custom_image_url",e.url),t.updateValue("custom_image_width",e.width),t.updateValue("custom_image_height",e.height),t.$scope.$digest()}),void this.fileFrame.open())}}]),t}(c["default"]);f.$inject=["$scope"],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=o["default"].module("app.components",[s["default"],l["default"]]).name;n["default"]=c},{"./editors":32,"./navbar":33,angular:42}],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()" name="{{ ::$ctrl.key }}" id="{{ ::$ctrl.key }}" ng-model="$ctrl.value">\n <label for="{{ ::$ctrl.key }}">{{ ::$ctrl.args.text }}</label>\n <span ng-if="$ctrl.args.tooltip" tooltips tooltip-template="{{ ::$ctrl.args.tooltip }}" class="dashicons dashicons-editor-help"></span>\n <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":21}],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=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},{}],22:[function(e,t,n){
|
2 |
-
"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.image.controller"),o=r(i),a={bindings:{args:"<",onUpdate:"&","class":"@"},controller:o["default"],template:'<input type="text" id="{{ $ctrl.key }}" name="{{ ::$ctrl.args.key }}" ng-model="$ctrl.value" ng-change="$ctrl.change()" class="regular-text" />\n<input type="button" class="button" value="{{ ::$ctrl.args.button_text }}" ng-click="$ctrl.selectFile()" />'};n["default"]=a},{"./editor.image.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=e("./editor.controller"),l=r(u),c=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.$scope=e,n}return a(t,e),s(t,[{key:"selectFile",value:function(){var e=this;return this.fileFrame=this.fileFrame||null,this.fileFrame?this.fileFrame.open():(this.fileFrame=wp.media.frames.file_frame=wp.media({title:this.args.title_text,button:{text:this.args.button_text},multiple:!1}).on("select",function(){var t=e.fileFrame.state().get("selection").first().toJSON();e.value=t.url,e.onUpdate({$event:{key:e.key,value:e.value}}),e.$scope.$apply()}),void this.fileFrame.open())}}]),t}(l["default"]);c.$inject=["$scope"],n["default"]=c},{"./editor.controller":21}],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 }}" name="{{ ::$ctrl.args.key }}" ng-disabled="$ctrl.ngDisabled" number-attributes="$ctrl.args" class="small-text" type="number" ng-model="$ctrl.value" ng-change="$ctrl.change()" />'};n["default"]=a},{"./editor.controller":21}],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 name="{{ ::$ctrl.key }}" ng-model="$ctrl.value" id="{{ ::$ctrl.args.key }}" 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":21}],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 <input type="hidden" name="{{ ::$ctrl.args.key }}" ng-value="$ctrl.hiddenInputValue" />\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||[],this.hiddenInputValue=this.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.hiddenInputValue=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}}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=e("./editor.controller"),u=r(s),l=function(e){function t(){i(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e["class"]="regular-text",e}return a(t,e),t}(u["default"]),c={bindings:{args:"<",onUpdate:"&","class":"@",ngDisabled:"<"},controller:l,template:'<input type="text" placeholder="{{ $ctrl.args.placeholder || \'\' }}" name="{{ ::$ctrl.key }}" id="{{ $ctrl.key }}" ng-model="$ctrl.value" ng-change="$ctrl.change()" ng-class="$ctrl.class" ng-disabled="$ctrl.ngDisabled" />'};n["default"]=c},{"./editor.controller":21}],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 }}" name="{{ ::$ctrl.args.key }}" class="large-text code" ng-model="$ctrl.value" ng-change="$ctrl.change()"></textarea>'};n["default"]=a},{"./editor.controller":21}],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.image.component"),f=r(c),d=e("./editor.number.component"),p=r(d),h=e("./editor.number.directive"),g=r(h),$=e("./editor.checkbox.component"),v=r($),m=e("./editor.select.component"),y=r(m),b=e("./editor.sortableSelect.component"),w=r(b),x=o["default"].module("editors",["dndLists"]).component("editorText",s["default"]).component("editorTextarea",l["default"]).component("editorImage",f["default"]).component("editorNumber",p["default"]).component("editorCheckbox",v["default"]).component("editorSelect",y["default"]).component("editorSortableSelect",w["default"]).directive("numberAttributes",["$parse",function(e){return new g["default"](e)}]).name;n["default"]=x},{"./editor.checkbox.component":19,"./editor.image.component":22,"./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:42}],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:42}],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("./link.service"),s=r(a),u=o["default"].module("services",[]).service("linkService",s["default"]).name;n["default"]=u},{"./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=v?e.offsetX||e.layerX:e.offsetY||e.layerY,i=v?t.offsetWidth:t.offsetHeight,o=v?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($.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],$=o[0];h.remove();var v=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!=$&&o.append(h),e.target!==$){for(var t=e.target;t.parentNode!==$&&t.parentNode;)t=t.parentNode;t.parentNode===$&&t!==g&&(s(e,t)?$.insertBefore(g,t):$.insertBefore(g,t.nextSibling))}else if(s(e,g,!0))for(;g.previousElementSibling&&(s(e,g.previousElementSibling,!0)||0===g.previousElementSibling.offsetHeight);)$.insertBefore(g,g.previousElementSibling);else for(;g.nextElementSibling&&!s(e,g.nextElementSibling,!0);)$.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&&$(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,"&").replace(y,function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+(1024*(t-55296)+(n-56320)+65536)+";"}).replace(b,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}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;P[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 $(t){for(;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&&$(s),t=t.nextSibling}}var v=!1;this.$get=["$$sanitizeUri",function(e){return v&&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)?(v=e,this):v},i=t.bind,o=t.extend,a=t.forEach,s=t.isDefined,u=t.lowercase,l=t.noop,c=r,f=g;var m,y=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,b=/([^#-~ |!])/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),E=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")),S=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,E,S,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"),T=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),P=o({},M,T,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&&y.push(r(e))}function p(e,t){var n,r=v(e);y.push("<a ");for(n in r)y.push(n+'="'+r[n]+'" ');!a(c)||"target"in r||y.push('target="',c,'" '),y.push('href="',e.replace(/"/g,"""),'">'),d(t),y.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,y=[];h=m.match(n);)g=h[0],h[2]||h[4]||(g=(h[3]?"http://":"mailto:")+g),$=h.index,d(m.substr(0,$)),p(g,h[0].replace(i,"")),m=m.substring($+h[0].length);return d(m),e(y.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?we(o[n]):e}),s+="\nhttp://errors.angularjs.org/1.6.1/"+(e?e+"/":"")+a,r=i,n="?";r<o.length;r++,n="&")s+=n+"p"+(r-i)+"="+encodeURIComponent(we(o[r]));return new t(s)}}function n(e){if(null==e||S(e))return!1;if(li(e)||w(e)||Jr&&e instanceof Jr)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(o)&&t.call(i,e[o],o,e);else if(li(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(b(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)Br.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++si}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(y(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&&y(p)?_(p)?e[d]=new Date(p.valueOf()):E(p)?e[d]=new RegExp(p):p.nodeName?e[d]=p.cloneNode(!0):V(p)?e[d]=p.clone():(y(e[d])||(e[d]=li(p)?[]:{}),u(e[d],[p],!0)):e[d]=p}}return s(e,r),e}function l(e){return u(e,ei.call(arguments,1),!1)}function c(e){return u(e,ei.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 $(e){return k(e.toString)&&e.toString!==ri}function v(e){return"undefined"==typeof e}function m(e){return"undefined"!=typeof e}function y(e){return null!==e&&"object"==typeof e}function b(e){return null!==e&&"object"==typeof e&&!ii(e)}function w(e){return"string"==typeof e}function x(e){return"number"==typeof e}function _(e){return"[object Date]"===ri.call(e)}function k(e){return"function"==typeof e}function E(e){return"[object RegExp]"===ri.call(e)}function S(e){return e&&e.window===e}function C(e){return e&&e.$evalAsync&&e.$watch}function A(e){return"[object File]"===ri.call(e)}function O(e){return"[object FormData]"===ri.call(e)}function M(e){return"[object Blob]"===ri.call(e)}function j(e){return"boolean"==typeof e}function T(e){return e&&k(e.then)}function P(e){return e&&x(e.length)&&ci.test(ri.call(e))}function D(e){return"[object ArrayBuffer]"===ri.call(e)}function V(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function I(e){var t,n={},r=e.split(",");for(t=0;t<r.length;t++)n[r[t]]=!0;return n}function U(e){return Wr(e.nodeName||e[0]&&e[0].nodeName)}function F(e,t){return Array.prototype.indexOf.call(e,t)!==-1}function N(e,t){var n=e.indexOf(t);return n>=0&&e.splice(n,1),n}function R(e,t){function n(e,t){var n,r=t.$$hashKey;if(li(e))for(var o=0,a=e.length;o<a;o++)t.push(i(e[o]));else if(b(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)Br.call(e,n)&&(t[n]=i(e[n]));return s(t,r),t}function i(e){if(!y(e))return e;var t=a.indexOf(e);if(t!==-1)return u[t];if(S(e)||C(e))throw oi("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=li(e)?[]:Object.create(ii(e)),r=!0),a.push(e),u.push(i),r?n(e,i):i}function o(e){switch(ri.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(P(t)||D(t))throw oi("cpta","Can't copy! TypedArray destination cannot be mutated.");if(e===t)throw oi("cpi","Can't copy! Source and destination are identical.");return li(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 z(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(!li(e)){if(_(e))return!!_(t)&&z(e.getTime(),t.getTime());if(E(e))return!!E(t)&&e.toString()===t.toString();if(C(e)||C(t)||S(e)||S(t)||li(t)||_(t)||E(t))return!1;i=$e();for(r in e)if("$"!==r.charAt(0)&&!k(e[r])){if(!z(e[r],t[r]))return!1;i[r]=!0}for(r in t)if(!(r in i)&&"$"!==r.charAt(0)&&m(t[r])&&!k(t[r]))return!1;return!0}if(!li(t))return!1;if((n=e.length)===t.length){for(r=0;r<n;r++)if(!z(e[r],t[r]))return!1;return!0}}return!1}function L(e,t,n){return e.concat(ei.call(t,n))}function H(e,t){return ei.call(e,t||0)}function q(e,t){var n=arguments.length>2?H(arguments,2):[];return!k(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,L(n,arguments,0)):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function B(t,n){var r=n;return"string"==typeof t&&"$"===t.charAt(0)&&"$"===t.charAt(1)?r=void 0:S(n)?r="$WINDOW":n&&e.document===n?r="$DOCUMENT":C(n)&&(r="$SCOPE"),r}function W(e,t){if(!v(e))return x(t)||(t=t?2:null),JSON.stringify(e,B,t)}function G(e){return w(e)?JSON.parse(e):e}function X(e,t){e=e.replace(gi,"");var n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return ui(n)?t:n}function K(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function Y(e,t,n){n=n?-1:1;var r=e.getTimezoneOffset(),i=X(t,r);return K(e,n*(i-r))}function J(e){e=Jr(e).clone();try{e.empty()}catch(t){}var n=Jr("<div>").append(e).html();try{return e[0].nodeType===xi?Wr(n):n.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,function(e,t){return"<"+Wr(t)})}catch(t){return Wr(n)}}function Z(e){try{return decodeURIComponent(e)}catch(t){}}function Q(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),Br.call(t,r)?li(t[r])?t[r].push(i):t[r]=[t[r],i]:t[r]=i))}),t}function ee(e){var t=[];return r(e,function(e,n){li(e)?r(e,function(e){t.push(ne(n,!0)+(e===!0?"":"="+ne(e,!0)))}):t.push(ne(n,!0)+(e===!0?"":"="+ne(e,!0)))}),t.length?t.join("&"):""}function te(e){return ne(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ne(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 re(e,t){var n,r,i=$i.length;for(r=0;r<i;++r)if(n=$i[r]+t,w(n=e.getAttribute(n)))return n;return null}function ie(e){if(!e.currentScript)return!0;var t=e.currentScript.getAttribute("src"),n=e.createElement("a");if(n.href=t,e.location.origin===n.origin)return!0;switch(n.protocol){case"http:":case"https:":case"ftp:":case"blob:":case"file:":case"data:":return!0;default:return!1}}function oe(t,n){var i,o,a={};
|
3 |
-
if(r($i,function(e){var n=e+"app";!i&&t.hasAttribute&&t.hasAttribute(n)&&(i=t,o=t.getAttribute(n))}),r($i,function(e){var n,r=e+"app";!i&&(n=t.querySelector("["+r.replace(":","\\:")+"]"))&&(i=n,o=n.getAttribute(r))}),i){if(!vi)return void e.console.error("Angular: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match.");a.strictDi=null!==re(i,"strict-di"),n(i,o?[o]:[],a)}}function ae(t,n,i){y(i)||(i={});var o={strictDi:!1};i=l(o,i);var a=function(){if(t=Jr(t),t.injector()){var r=t[0]===e.document?"document":J(t);throw oi("btstrpd","App already bootstrapped with this element '{0}'",r.replace(/</,"<").replace(/>/,">"))}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=lt(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,""),ai.resumeBootstrap=function(e){return r(e,function(e){n.push(e)}),a()},void(k(ai.resumeDeferredBootstrap)&&ai.resumeDeferredBootstrap()))}function se(){e.name="NG_ENABLE_DEBUG_INFO!"+e.name,e.location.reload()}function ue(e){var t=ai.element(e).injector();if(!t)throw oi("test","no injector found for element argument to getTestability");return t.get("$$testability")}function le(e,t){return t=t||"_",e.replace(mi,function(e,n){return(n?t:"")+e.toLowerCase()})}function ce(){var t;if(!yi){var n=hi();Zr=v(n)?e.jQuery:n?e[n]:void 0,Zr&&Zr.fn.on?(Jr=Zr,l(Zr.fn,{scope:Ni.scope,isolateScope:Ni.isolateScope,controller:Ni.controller,injector:Ni.injector,inheritedData:Ni.inheritedData}),t=Zr.cleanData,Zr.cleanData=function(e){for(var n,r,i=0;null!=(r=e[i]);i++)n=Zr._data(r,"events"),n&&n.$destroy&&Zr(r).triggerHandler("$destroy");t(e)}):Jr=De,ai.element=Jr,yi=!0}}function fe(e,t,n){if(!e)throw oi("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function de(e,t,n){return n&&li(e)&&(e=e[e.length-1]),fe(k(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function pe(e,t){if("hasOwnProperty"===e)throw oi("badname","hasOwnProperty is not a valid {0} name",t)}function he(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 ge(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=Jr(ei.call(e,0,i))),t.push(n));return t||e}function $e(){return Object.create(null)}function ve(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=!$(e)||li(e)||_(e)?W(e):e.toString()}return e}function me(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,r){return r||(r=i),function(i,o){return o&&k(o)&&(o.$$moduleName=t),r.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",s),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 ye(e,t){if(li(e)){t=t||[];for(var n=0,r=e.length;n<r;n++)t[n]=e[n]}else if(y(e)){t=t||{};for(var i in e)"$"===i.charAt(0)&&"$"===i.charAt(1)||(t[i]=e[i])}return t||e}function be(e){var t=[];return JSON.stringify(e,function(e,n){if(n=B(e,n),y(n)){if(t.indexOf(n)>=0)return"...";t.push(n)}return n})}function we(e){return"function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):v(e)?"undefined":"string"!=typeof e?be(e):e}function xe(n){l(n,{bootstrap:ae,copy:R,extend:l,merge:c,equals:z,element:Jr,forEach:r,injector:lt,noop:p,bind:q,toJson:W,fromJson:G,identity:h,isUndefined:v,isDefined:m,isString:w,isFunction:k,isObject:y,isNumber:x,isElement:V,isArray:li,version:Si,isDate:_,lowercase:Wr,uppercase:Gr,callbacks:{$$counter:0},getTestability:ue,reloadWithDebugInfo:se,$$minErr:t,$$csp:pi,$$encodeUriSegment:te,$$encodeUriQuery:ne,$$stringify:ve}),(Qr=me(e))("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:Cn}),e.provider("$compile",bt).directive({a:Go,input:pa,textarea:pa,form:Qo,script:ss,select:cs,option:fs,ngBind:$a,ngBindHtml:ma,ngBindTemplate:va,ngClass:ba,ngClassEven:xa,ngClassOdd:wa,ngCloak:_a,ngController:ka,ngForm:ea,ngHide:es,ngIf:Ca,ngInclude:Aa,ngInit:Ma,ngNonBindable:Ba,ngPluralize:Ka,ngRepeat:Ya,ngShow:Qa,ngStyle:ts,ngSwitch:ns,ngSwitchWhen:rs,ngSwitchDefault:is,ngOptions:Xa,ngTransclude:as,ngModel:La,ngList:ja,ngChange:ya,pattern:ps,ngPattern:ps,required:ds,ngRequired:ds,minlength:gs,ngMinlength:gs,maxlength:hs,ngMaxlength:hs,ngValue:ga,ngModelOptions:qa}).directive({ngInclude:Oa}).directive(Xo).directive(Ea),e.provider({$anchorScroll:ct,$animate:to,$animateCss:io,$$animateJs:Qi,$$animateQueue:eo,$$AnimateRunner:ro,$$animateAsyncRun:no,$browser:$t,$cacheFactory:vt,$controller:St,$document:Ct,$$isDocumentHidden:At,$exceptionHandler:Ot,$filter:Ln,$$forceReflow:fo,$interpolate:Ht,$interval:qt,$http:Nt,$httpParamSerializer:jt,$httpParamSerializerJQLike:Tt,$httpBackend:zt,$xhrFactory:Rt,$jsonpCallbacks:bo,$location:an,$log:sn,$parse:wn,$rootScope:Sn,$q:xn,$$q:_n,$sce:Tn,$sceDelegate:jn,$sniffer:Pn,$templateCache:mt,$templateRequest:Dn,$$testability:Vn,$timeout:In,$window:Nn,$$rAF:En,$$jqLite:nt,$$HashMap:Hi,$$cookieReader:zn})}])}function _e(){return++Ai}function ke(e){return Se(e.replace(Mi,"ms-"))}function Ee(e,t){return t.toUpperCase()}function Se(e){return e.replace(Oi,Ee)}function Ce(e){return!Di.test(e)}function Ae(e){var t=e.nodeType;return t===bi||!t||t===ki}function Oe(e){for(var t in Ci[e.ng339])return!0;return!1}function Me(e){for(var t=0,n=e.length;t<n;t++)Fe(e[t])}function je(e,t){var n,i,o,a,s=t.createDocumentFragment(),u=[];if(Ce(e))u.push(t.createTextNode(e));else{for(n=s.appendChild(t.createElement("div")),i=(Vi.exec(e)||["",""])[1].toLowerCase(),o=Ui[i]||Ui._default,n.innerHTML=o[1]+e.replace(Ii,"<$1></$2>")+o[2],a=o[0];a--;)n=n.lastChild;u=L(u,n.childNodes),n=s.firstChild,n.textContent=""}return s.textContent="",s.innerHTML="",r(u,function(e){s.appendChild(e)}),s}function Te(t,n){n=n||e.document;var r;return(r=Pi.exec(t))?[n.createElement(r[1])]:(r=je(t,n))?r.childNodes:[]}function Pe(e,t){var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)}function De(e){if(e instanceof De)return e;var t;if(w(e)&&(e=fi(e),t=!0),!(this instanceof De)){if(t&&"<"!==e.charAt(0))throw Ti("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new De(e)}t?qe(this,Te(e)):k(e)?Ye(e):qe(this,e)}function Ve(e){return e.cloneNode(!0)}function Ie(e,t){if(t||Fe(e),e.querySelectorAll)for(var n=e.querySelectorAll("*"),r=0,i=n.length;r<i;r++)Fe(n[r])}function Ue(e,t,n,i){if(m(i))throw Ti("offargs","jqLite#off() does not support the `selector` argument");var o=Ne(e),a=o&&o.events,s=o&&o.handle;if(s)if(t){var u=function(t){var r=a[t];m(n)&&N(r||[],n),m(n)&&r&&r.length>0||(e.removeEventListener(t,s),delete a[t])};r(t.split(" "),function(e){u(e),ji[e]&&u(ji[e])})}else for(t in a)"$destroy"!==t&&e.removeEventListener(t,s),delete a[t]}function Fe(e,t){var n=e.ng339,r=n&&Ci[n];if(r){if(t)return void delete r.data[t];r.handle&&(r.events.$destroy&&r.handle({},"$destroy"),Ue(e)),delete Ci[n],e.ng339=void 0}}function Ne(e,t){var n=e.ng339,r=n&&Ci[n];return t&&!r&&(e.ng339=n=_e(),r=Ci[n]={events:{},data:{},handle:void 0}),r}function Re(e,t,n){if(Ae(e)){var r,i=m(n),o=!i&&t&&!y(t),a=!t,s=Ne(e,!o),u=s&&s.data;if(i)u[Se(t)]=n;else{if(a)return u;if(o)return u&&u[Se(t)];for(r in t)u[Se(r)]=t[r]}}}function ze(e,t){return!!e.getAttribute&&(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1}function Le(e,t){t&&e.setAttribute&&r(t.split(" "),function(t){e.setAttribute("class",fi((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+fi(t)+" "," ")))})}function He(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");r(t.split(" "),function(e){e=fi(e),n.indexOf(" "+e+" ")===-1&&(n+=e+" ")}),e.setAttribute("class",fi(n))}}function qe(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 Be(e,t){return We(e,"$"+(t||"ngController")+"Controller")}function We(e,t,n){e.nodeType===ki&&(e=e.documentElement);for(var r=li(t)?t:[t];e;){for(var i=0,o=r.length;i<o;i++)if(m(n=Jr.data(e,r[i])))return n;e=e.parentNode||e.nodeType===Ei&&e.host}}function Ge(e){for(Ie(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function Xe(e,t){t||Ie(e);var n=e.parentNode;n&&n.removeChild(e)}function Ke(t,n){n=n||e,"complete"===n.document.readyState?n.setTimeout(t):Jr(n).on("load",t)}function Ye(t){function n(){e.document.removeEventListener("DOMContentLoaded",n),e.removeEventListener("load",n),t()}"complete"===e.document.readyState?e.setTimeout(t):(e.document.addEventListener("DOMContentLoaded",n),e.addEventListener("load",n))}function Je(e,t){var n=Ri[t.toLowerCase()];return n&&zi[U(e)]&&n}function Ze(e){return Li[e]}function Qe(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(v(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||et;o>1&&(i=ye(i));for(var u=0;u<o;u++)n.isImmediatePropagationStopped()||s(e,n,i[u])}};return n.elem=e,n}function et(e,t,n){n.call(e,t)}function tt(e,t,n){var r=t.relatedTarget;r&&(r===e||Fi.call(e,r))||n.call(e,t)}function nt(){this.$get=function(){return l(De,{hasClass:function(e,t){return e.attr&&(e=e[0]),ze(e,t)},addClass:function(e,t){return e.attr&&(e=e[0]),He(e,t)},removeClass:function(e,t){return e.attr&&(e=e[0]),Le(e,t)}})}}function rt(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 it(e,t){if(t){var n=0;this.nextUid=function(){return++n}}r(e,this.put,this)}function ot(e){return Function.prototype.toString.call(e)+" "}function at(e){var t=ot(e).replace(Xi,""),n=t.match(qi)||t.match(Bi);return n}function st(e){var t=at(e);return t?"function("+(t[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function ut(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||st(e)),Ki("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);o=at(e),r(o[1].split(Wi),function(e){e.replace(Gi,function(e,t,n){i.push(n)})})}e.$inject=i}}else li(e)?(a=e.length-1,de(e[a],"fn"),i=e.slice(0,a)):de(e,"fn",!0);return i}function lt(e,t){function n(e){return function(t,n){return y(t)?void r(t,o(e)):e(t,n)}}function i(e,t){if(pe(e,"service"),(k(t)||li(t))&&(t=_.instantiate(t)),!t.$get)throw Ki("pget","Provider '{0}' must define $get factory method.",e);return x[e+$]=t}function a(e,t){return function(){var n=C.invoke(t,this);if(v(n))throw Ki("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){pe(e,"constant"),x[e]=t,E[e]=t}function f(e,t){var n=_.get(e+$),r=n.$get;n.$get=function(){var e=C.invoke(r,n);return C.invoke(t,null,{$delegate:e})}}function d(e){fe(v(e)||li(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(!b.get(e)){b.put(e,!0);try{w(e)?(t=Qr(e),n=n.concat(d(t.requires)).concat(t._runBlocks),r(t._invokeQueue),r(t._configBlocks)):k(e)?n.push(_.invoke(e)):li(e)?n.push(_.invoke(e)):de(e,"module")}catch(i){throw li(e)&&(e=e[e.length-1]),i.message&&i.stack&&i.stack.indexOf(i.message)===-1&&(i=i.message+"\n"+i.stack),Ki("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 Ki("cdep","Circular dependency found: {0}",t+" <- "+m.join(" <- "));return e[t]}try{return m.unshift(t),e[t]=h,e[t]=n(t,r),e[t]}catch(i){throw e[t]===h&&delete e[t],i}finally{m.shift()}}function i(e,n,i){for(var o=[],a=lt.$$annotate(e,t,i),s=0,u=a.length;s<u;s++){var l=a[s];if("string"!=typeof l)throw Ki("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){if(Yr||"function"!=typeof e)return!1;var t=e.$$ngIsClass;return j(t)||(t=e.$$ngIsClass=/^(?:class\b|constructor\()/.test(ot(e))),t}function a(e,t,n,r){"string"==typeof n&&(r=n,n=null);var a=i(e,n,r);return li(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=li(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:lt.$$annotate,has:function(t){return x.hasOwnProperty(t+$)||e.hasOwnProperty(t)}}}t=t===!0;var h={},$="Provider",m=[],b=new it([],(!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 ai.isString(t)&&m.push(t),Ki("unpr","Unknown provider: {0}",m.join(" <- "))}),E={},S=p(E,function(e,t){var n=_.get(e+$,t);return C.invoke(n.$get,n,void 0,e)}),C=S;x["$injector"+$]={$get:g(S)};var A=d(e);return C=S.get("$injector"),C.strictDi=t,r(A,function(e){e&&C.invoke(e)}),C}function ct(){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"===U(e))return t=e,!0}),t}function o(){var e=s.yOffset;if(k(e))e=e();else if(V(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:x(e)?e.toString():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||Ke(function(){r.$evalAsync(s)})}),s}]}function ft(e,t){return e||t?e?t?(li(e)&&(e=e.join(" ")),li(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function dt(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.nodeType===Ji)return n}}function pt(e){w(e)&&(e=e.split(" "));var t=$e();return r(e,function(e){e.length&&(t[e]=!0)}),t}function ht(e){return y(e)?e:{}}function gt(e,t,n,i){function o(e){try{e.apply(null,H(arguments,1))}finally{if(m--,0===m)for(;y.length;)try{y.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(){b=E(),b=v(b)?null:b,z(b,A)&&(b=A),A=b}function l(){x===c.url()&&w===b||(x=c.url(),w=b,r(S,function(e){e(c.url(),b)}))}var c=this,f=e.location,d=e.history,h=e.setTimeout,g=e.clearTimeout,$={};c.isMock=!1;var m=0,y=[];c.$$completeOutstandingRequest=o,c.$$incOutstandingRequestCount=function(){m++},c.notifyWhenNoOutstandingRequests=function(e){0===m?e():y.push(e)};var b,w,x=f.href,_=t.find("base"),k=null,E=i.history?function(){try{return d.state}catch(e){}}:p;u(),w=b,c.url=function(t,n,r){if(v(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&&Yt(x)===Yt(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=b),k&&(k=t),c}return k||f.href.replace(/%27/g,"'")},c.state=function(){return b};var S=[],C=!1,A=null;c.onUrlChange=function(t){return C||(i.history&&Jr(e).on("popstate",s),Jr(e).on("hashchange",s),C=!0),S.push(t),t},c.$$applicationDestroyed=function(){Jr(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 $[n],o(e)},t||0),$[n]=!0,n},c.defer.cancel=function(e){return!!$[e]&&(delete $[e],g(e),o(p),!0)}}function $t(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new gt(e,r,t,n)}]}function vt(){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=$e(),c=r&&r.capacity||Number.MAX_VALUE,f=$e(),d=null,p=null;return n[e]={put:function(e,t){if(!v(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=$e(),a=0,f=$e(),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 mt(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function yt(){}function bt(t,n){function i(e,t,n){var i=/^\s*([@&<]|=(\*?))(\??)\s*(\w*)\s*$/,o=$e();return r(e,function(e,r){if(e in A)return void(o[r]=A[e]);var a=e.match(i);if(!a)throw oo("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]&&(A[e]=o[r])}),o}function a(e,t){var n={isolateScope:null,bindToController:null};if(y(e.scope)&&(e.bindToController===!0?(n.bindToController=i(e.scope,t,!0),n.isolateScope={}):n.isolateScope=i(e.scope,t,!1)),y(e.bindToController)&&(n.bindToController=i(e.bindToController,t,!0)),n.bindToController&&!e.controller)throw oo("noctrl","Cannot bind to controller without directive '{0}'s controller.",t);return n}function s(e){var t=e.charAt(0);if(!t||t!==Wr(t))throw oo("baddir","Directive/Component name '{0}' is invalid. The first character must be a lowercase letter",e);if(e!==e.trim())throw oo("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!li(t)&&y(t)&&r(t,function(e,n){var r=e.match(E),i=e.substring(r[0].length);i||(t[n]=r[0]+n)}),t}function c(e,t){if(e&&(!w(e)||!/[EACM]/.test(e)))throw oo("badrestrict","Restrict property '{0}' of directive '{1}' is invalid",e,t);return e||"EA"}var f={},$="Directive",b=/^\s*directive:\s*([\w-]+)\s+(.*)$/,x=/(([\w-]+)(?::([^;]+))?;?)/,_=I("ngSrc,ngSrcset,src,srcset"),E=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,S=/^(on[a-z]+|formaction)$/,A=$e();this.directive=function V(e,n){return fe(e,"name"),pe(e,"directive"),w(e)?(s(e),fe(n,"directiveFactory"),f.hasOwnProperty(e)||(f[e]=[],t.factory(e+$,["$injector","$exceptionHandler",function(t,n){var i=[];return r(f[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=c(a.restrict,e),a.$$moduleName=r.$$moduleName,i.push(a)}catch(s){n(s)}}),i}])),f[e].push(n)):r(e,o(V)),this},this.component=function(e,t){function n(e){function n(t){return k(t)||li(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:Et(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 m(e)?(n.aHrefSanitizationWhitelist(e),this):n.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(e){return m(e)?(n.imgSrcSanitizationWhitelist(e),this):n.imgSrcSanitizationWhitelist()};var O=!0;this.debugInfoEnabled=function(e){return m(e)?(O=e,this):O};var M=!1;this.preAssignBindingsEnabled=function(e){return m(e)?(M=e,this):M};var T=10;this.onChangesTtl=function(e){return arguments.length?(T=e,this):T};var P=!0;this.commentDirectivesEnabled=function(e){return arguments.length?(P=e,this):P};var D=!0;this.cssClassDirectivesEnabled=function(e){return arguments.length?(D=e,this):D},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate","$$sanitizeUri",function(t,n,i,o,s,u,c,g,A,V){function I(){try{if(!--Oe)throw _e=void 0,oo("infchng","{0} $onChanges() iterations reached. Aborting!\n",T);c.$apply(function(){for(var e=[],t=0,n=_e.length;t<n;++t)try{_e[t]()}catch(r){e.push(r)}if(_e=void 0,e.length)throw e})}finally{Oe++}}function F(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 R(e,t,n){Ee.innerHTML="<span "+t+">";var r=Ee.firstChild.attributes,i=r[0];r.removeNamedItem(i.name),i.value=n,e.attributes.setNamedItem(i)}function L(e,t){try{e.addClass(t)}catch(n){}}function B(e,t,n,r,i){e instanceof Jr||(e=Jr(e));var o=G(e,t,e,n,r,i);B.$$addScopeClass(e);var a=null;return function(t,n,r){if(!e)throw oo("multilink","This element has already been linked.");fe(t,"scope"),i&&i.needsNewScope&&(t=t.$parent.$new()),r=r||{};var s=r.parentBoundTranscludeFn,u=r.transcludeControllers,l=r.futureParentElement;s&&s.$$boundTransclude&&(s=s.$$boundTransclude),a||(a=W(l));var c;if(c="html"!==a?Jr(ge(a,Jr("<div>").append(e).html())):n?Ni.clone.call(e):e,u)for(var f in u)c.data("$"+f+"Controller",u[f].instance);return B.$$addScopeInfo(c,t),n&&n(c,t),o&&o(t,c,c,s),n||(e=o=null),c}}function W(e){var t=e&&e[0];return t&&"foreignobject"!==U(t)&&ri.call(t).match(/SVG/)?"svg":"html"}function G(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 $=n.length;for(g=new Array($),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(),B.$$addScopeInfo(Jr(s),u)):u=e,d=o.transcludeOnThisElement?K(e,o.transclude,i):!o.templateOnThisElement&&i?i:!i&&t?K(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=li(e)||e instanceof Jr,$=0;$<e.length;$++)s=new F,11===Yr&&X(e,$,g),u=Y(e[$],[],s,0===$?r:void 0,i),l=u.length?ne(u,e[$],s,t,n,null,[],[],o):null,l&&l.scope&&B.$$addScopeClass(s.$$element),f=l&&l.terminal||!(c=e[$].childNodes)||!c.length?null:G(c,l?(l.transcludeOnThisElement||!l.templateOnThisElement)&&l.transclude:t),(l||f)&&(h.push($,l,f),d=!0,p=p||l),o=null;return d?a:null}function X(e,t,n){var r,i=e[t],o=i.parentNode;if(i.nodeType===xi)for(;;){if(r=o?i.nextSibling:e[t+1],!r||r.nodeType!==xi)break;i.nodeValue=i.nodeValue+r.nodeValue,r.parentNode&&r.parentNode.removeChild(r),n&&r===e[t+1]&&e.splice(t+1,1)}}function K(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=$e();for(var o in t.$$slots)t.$$slots[o]?i[o]=K(e,t.$$slots[o],n):i[o]=null;return r}function Y(e,t,n,r,i){var o,a,s,u=e.nodeType,l=n.$attr;switch(u){case bi:a=U(e),ae(t,xt(a),"E",r,i);for(var c,f,d,p,h,g,$=e.attributes,v=0,m=$&&$.length;v<m;v++){var b=!1,_=!1;c=$[v],f=c.name,h=c.value,p=xt(f),g=Pe.test(p),g&&(f=f.replace(so,"").substr(8).replace(/_(.)/g,function(e,t){return t.toUpperCase()}));var k=p.match(De);k&&se(k[1])&&(b=f,_=f.substr(0,f.length-5)+"end",f=f.substr(0,f.length-6)),d=xt(f.toLowerCase()),l[d]=f,!g&&n.hasOwnProperty(d)||(n[d]=h,Je(e,d)&&(n[d]=!0)),me(e,t,h,d,g),ae(t,d,"A",r,i,b,_)}if("input"===a&&"hidden"===e.getAttribute("type")&&e.setAttribute("autocomplete","off"),!Ae)break;if(s=e.className,y(s)&&(s=s.animVal),w(s)&&""!==s)for(;o=x.exec(s);)d=xt(o[2]),ae(t,d,"C",r,i)&&(n[d]=fi(o[3])),s=s.substr(o.index+o[0].length);break;case xi:he(t,e.nodeValue);break;case _i:if(!Se)break;Z(e,t,n,r,i)}return t.sort(de),t}function Z(e,t,n,r,i){try{var o=b.exec(e.nodeValue);if(o){var a=xt(o[1]);ae(t,a,"M",r,i)&&(n[a]=fi(o[2]))}}catch(s){}}function Q(e,t,n){var r=[],i=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw oo("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);e.nodeType===bi&&(e.hasAttribute(t)&&i++,e.hasAttribute(n)&&i--),r.push(e),e=e.nextSibling}while(i>0)}else r.push(e);return Jr(r)}function ee(e,t,n){return function(r,i,o,a,s){return i=Q(i[0],t,n),e(r,i,o,a,s)}}function te(e,t,n,r,i,o){var a;return e?B(t,n,r,i,o):function(){return a||(a=B(t,n,r,i,o),t=n=o=null),a.apply(this,arguments)}}function ne(e,t,n,o,a,s,u,c,f){function d(e,t,n,r){e&&(n&&(e=ee(e,n,r)),e.require=h.require,e.directiveName=g,(E===h||h.$$isolateScope)&&(e=be(e,{isolateScope:!0})),u.push(e)),t&&(n&&(t=ee(t,n,r)),t.require=h.require,t.directiveName=g,(E===h||h.$$isolateScope)&&(t=be(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),T&&(i=b),n||(n=T?A.parent():A),!r)return f(e,t,i,n,N);var o=f.$$slots[r];if(o)return o(e,t,i,n,N);if(v(o))throw oo("noslot",'No parent directive that requires a transclusion with slot name "{0}". Element: {1}',r,J(A))}var p,h,g,$,m,b,w,A,O,j;t===a?(O=n,A=n.$$element):(A=Jr(a),O=new F(A,n)),m=o,E?$=o.$new(!0):x&&(m=o.$parent),f&&(w=d,w.$$boundTransclude=f,w.isSlotFilled=function(e){return!!f.$$slots[e]}),_&&(b=ie(A,O,w,_,$,o,E)),E&&(B.$$addScopeInfo(A,$,!0,!(S&&(S===E||S===E.$$originalDirective))),B.$$addScopeClass(A,!0),$.$$isolateBindings=E.$$isolateBindings,j=xe(o,O,$,$.$$isolateBindings,E),j.removeWatches&&$.$on("$destroy",j.removeWatches));for(var P in b){var D=_[P],V=b[P],I=D.$$bindings.bindToController;if(M){I?V.bindingInfo=xe(m,O,V.instance,I,D):V.bindingInfo={};var U=V();U!==V.instance&&(V.instance=U,A.data("$"+D.name+"Controller",U),V.bindingInfo.removeWatches&&V.bindingInfo.removeWatches(),V.bindingInfo=xe(m,O,V.instance,I,D))}else V.instance=V(),A.data("$"+D.name+"Controller",V.instance),V.bindingInfo=xe(m,O,V.instance,I,D)}for(r(_,function(e,t){var n=e.require;e.bindToController&&!li(n)&&y(n)&&l(b[t].instance,re(t,n,A,b))}),r(b,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)&&(m.$watch(function(){t.$doCheck()}),t.$doCheck()),k(t.$onDestroy)&&m.$on("$destroy",function(){t.$onDestroy()})}),p=0,h=u.length;p<h;p++)g=u[p],we(g,g.isolateScope?$:o,A,O,g.require&&re(g.directiveName,g.require,A,b),w);var N=o;for(E&&(E.template||null===E.templateUrl)&&(N=$),e&&e(N,a.childNodes,void 0,f),p=c.length-1;p>=0;p--)g=c[p],we(g,g.isolateScope?$:o,A,O,g.require&&re(g.directiveName,g.require,A,b),w);r(b,function(e){var t=e.instance;k(t.$postLink)&&t.$postLink()})}f=f||{};for(var h,g,$,m,b,w=-Number.MAX_VALUE,x=f.newScopeDirective,_=f.controllerDirectives,E=f.newIsolateScopeDirective,S=f.templateDirective,A=f.nonTlbTranscludeDirective,O=!1,j=!1,T=f.hasElementTranscludeDirective,P=n.$$element=Jr(t),D=s,V=o,I=!1,N=!1,R=0,z=e.length;R<z;R++){h=e[R];var L=h.$$start,W=h.$$end;if(L&&(P=Q(t,L,W)),$=void 0,w>h.priority)break;if(b=h.scope,b&&(h.templateUrl||(y(b)?(pe("new/isolated scope",E||x,h,P),E=h):pe("new/isolated scope",E,h,P)),x=x||h),g=h.name,!I&&(h.replace&&(h.templateUrl||h.template)||h.transclude&&!h.$$tlb)){for(var G,X=R+1;G=e[X++];)if(G.transclude&&!G.$$tlb||G.replace&&(G.templateUrl||G.template)){N=!0;break}I=!0}if(!h.templateUrl&&h.controller&&(_=_||$e(),pe("'"+g+"' controller",_[g],h,P),_[g]=h),b=h.transclude)if(O=!0,h.$$tlb||(pe("transclusion",A,h,P),A=h),"element"===b)T=!0,w=h.priority,$=P,P=n.$$element=Jr(B.$$createComment(g,n[g])),t=P[0],ye(a,H($),t),$[0].$$parentNode=$[0].parentNode,V=te(N,$,o,w,D&&D.name,{nonTlbTranscludeDirective:A});else{var K=$e();if(y(b)){$=[];var Z=$e(),ne=$e();r(b,function(e,t){var n="?"===e.charAt(0);e=n?e.substring(1):e,Z[e]=t,K[t]=null,ne[t]=n}),r(P.contents(),function(e){var t=Z[xt(U(e))];t?(ne[t]=!0,K[t]=K[t]||[],K[t].push(e)):$.push(e)}),r(ne,function(e,t){if(!e)throw oo("reqslot","Required transclusion slot `{0}` was not filled.",t)});for(var ae in K)K[ae]&&(K[ae]=te(N,K[ae],o))}else $=Jr(Ve(t)).contents();P.empty(),V=te(N,$,o,void 0,void 0,{needsNewScope:h.$$isolateScope||h.$$newScope}),V.$$slots=K}if(h.template)if(j=!0,pe("template",S,h,P),S=h,b=k(h.template)?h.template(P,n):h.template,b=Te(b),h.replace){if(D=h,$=Ce(b)?[]:kt(ge(h.templateNamespace,fi(b))),t=$[0],1!==$.length||t.nodeType!==bi)throw oo("tplrt","Template for directive '{0}' must have exactly one root element. {1}",g,"");ye(a,P,t);var se={$attr:{}},le=Y(t,[],se),fe=e.splice(R+1,e.length-(R+1));(E||x)&&oe(le,E,x),e=e.concat(le).concat(fe),ue(n,se),z=e.length}else P.html(b);if(h.templateUrl)j=!0,pe("template",S,h,P),S=h,h.replace&&(D=h),p=ce(e.splice(R,e.length-R),P,n,a,O&&V,u,c,{controllerDirectives:_,newScopeDirective:x!==h&&x,newIsolateScopeDirective:E,templateDirective:S,nonTlbTranscludeDirective:A}),z=e.length;else if(h.compile)try{m=h.compile(P,n,V);var de=h.$$originalDirective||h;k(m)?d(null,q(de,m),L,W):m&&d(q(de,m.pre),q(de,m.post),L,W)}catch(he){i(he,J(P))}h.terminal&&(p.terminal=!0,w=Math.max(w,h.priority))}return p.scope=x&&x.scope===!0,p.transcludeOnThisElement=O,p.templateOnThisElement=j,p.transclude=V,f.hasElementTranscludeDirective=T,p}function re(e,t,n,i){var o;if(w(t)){var a=t.match(E),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 oo("ctreq","Controller '{0}', required by directive '{1}', can't be found!",s,e)}else if(li(t)){o=[];for(var f=0,d=t.length;f<d;f++)o[f]=re(e,t[f],n,i)}else y(t)&&(o={},r(t,function(t,r){o[r]=re(e,t,n,i)}));return o||null}function ie(e,t,n,r,i,o,a){var s=$e();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 oe(e,t,n){for(var r=0,i=e.length;r<i;r++)e[r]=d(e[r],{$$isolateScope:t,
|
4 |
-
$$newScope:n})}function ae(e,n,r,i,o,s,u){if(n===o)return null;var l=null;if(f.hasOwnProperty(n))for(var c,p=t.get(n+$),h=0,g=p.length;h<g;h++)if(c=p[h],(v(i)||i>c.priority)&&c.restrict.indexOf(r)!==-1){if(s&&(c=d(c,{$$start:s,$$end:u})),!c.$$bindings){var m=c.$$bindings=a(c,c.name);y(m.isolateScope)&&(c.$$isolateBindings=m.isolateScope)}e.push(c),l=c}return l}function se(e){if(f.hasOwnProperty(e))for(var n,r=t.get(e+$),i=0,o=r.length;i<o;i++)if(n=r[i],n.multiElement)return!0;return!1}function ue(e,t){var n=t.$attr,i=e.$attr;r(e,function(r,i){"$"!==i.charAt(0)&&(t[i]&&t[i]!==r&&(r.length?r+=("style"===i?";":" ")+t[i]:r=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 ce(e,t,n,a,s,u,l,c){var f,h,g=[],$=t[0],v=e.shift(),m=d(v,{templateUrl:null,transclude:null,replace:null,$$originalDirective:v}),b=k(v.templateUrl)?v.templateUrl(t,n):v.templateUrl,w=v.templateNamespace;return t.empty(),o(b).then(function(i){var o,d,p,x;if(i=Te(i),v.replace){if(p=Ce(i)?[]:kt(ge(w,fi(i))),o=p[0],1!==p.length||o.nodeType!==bi)throw oo("tplrt","Template for directive '{0}' must have exactly one root element. {1}",v.name,b);d={$attr:{}},ye(a,t,o);var _=Y(o,[],d);y(v.scope)&&oe(_,!0),e=_.concat(e),ue(n,d)}else o=$,t.html(i);for(e.unshift(m),f=ne(e,o,n,s,t,v,u,l,c),r(a,function(e,n){e===o&&(a[n]=t[0])}),h=G(t[0].childNodes,s);g.length;){var k=g.shift(),E=g.shift(),S=g.shift(),C=g.shift(),A=t[0];if(!k.$$destroyed){if(E!==$){var O=E.className;c.hasElementTranscludeDirective&&v.replace||(A=Ve(o)),ye(S,Jr(E),A),L(Jr(A),O)}x=f.transcludeOnThisElement?K(k,f.transclude,C):C,f(h,k,A,a,x)}}g=null})["catch"](function(e){e instanceof Error&&i(e)})["catch"](p),function(e,t,n,r,i){var o=i;t.$$destroyed||(g?g.push(t,n,r,o):(f.transcludeOnThisElement&&(o=K(t,f.transclude,i)),f(h,t,n,r,o)))}}function de(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 pe(e,t,n,r){function i(e){return e?" (module: "+e+")":""}if(t)throw oo("multidir","Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}",t.name,i(t.$$moduleName),n.name,i(n.$$moduleName),e,J(r))}function he(e,t){var r=n(t,!0);r&&e.push({priority:0,compile:function(e){var t=e.parent(),n=!!t.length;return n&&B.$$addBindingClass(t),function(e,t){var i=t.parent();n||B.$$addBindingClass(i),B.$$addBindingInfo(i,r.expressions),e.$watch(r,function(e){t[0].nodeValue=e})}}})}function ge(t,n){switch(t=Wr(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 ve(e,t){if("srcdoc"===t)return g.HTML;var n=U(e);if("src"===t||"ngSrc"===t){if(["img","video","audio","source","track"].indexOf(n)===-1)return g.RESOURCE_URL}else if("xlinkHref"===t||"form"===n&&"action"===t||"link"===n&&"href"===t)return g.RESOURCE_URL}function me(e,t,r,i,o){var a=ve(e,i),s=!o,u=_[i]||o,l=n(r,s,a,u);if(l){if("multiple"===i&&"select"===U(e))throw oo("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",J(e));if(S.test(i))throw oo("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");t.push({priority:100,compile:function(){return{pre:function(e,t,o){var s=o.$$observers||(o.$$observers=$e()),c=o[i];c!==r&&(l=c&&n(c,!0,a,u),r=c),l&&(o[i]=l(e),(s[i]||(s[i]=[])).$$inter=!0,(o.$$observers&&o.$$observers[i].$$scope||e).$watch(l,function(e,t){"class"===i&&e!==t?o.$updateClass(e,t):o.$set(i,e)}))}}}})}}function ye(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(Jr.hasData(a)&&(Jr.data(r,Jr.data(a)),Jr(a).off("$destroy")),Jr.cleanData(d.querySelectorAll("*")),i=1;i<s;i++)delete n[i];n[0]=r,n.length=1}function be(e,t){return l(function(){return e.apply(null,arguments)},e,t)}function we(e,t,n,r,o,a){try{e(t,n,r,o,a)}catch(s){i(s,J(n))}}function xe(e,t,i,o,a){function u(t,n,r){!k(i.$onChanges)||n===r||n!==n&&r!==r||(_e||(e.$$postDigest(I),_e=[]),c||(c={},_e.push(l)),c[t]&&(r=c[t].previousValue),c[t]=new wt(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,y=r.mode;switch(y){case"@":m||Br.call(t,v)||(i[o]=t[v]=void 0),$=t.$observe(v,function(e){if(w(e)||j(e)){var t=i[o];u(o,e,t),i[o]=e}}),t.$$observers[v].$$scope=e,l=t[v],w(l)?i[o]=n(l)(e):j(l)&&(i[o]=l),d[o]=new wt(ao,i[o]),f.push($);break;case"=":if(!Br.call(t,v)){if(m)break;t[v]=void 0}if(m&&!t[v])break;c=s(t[v]),g=c.literal?z:function(e,t){return e===t||e!==e&&t!==t},h=c.assign||function(){throw l=i[o]=c(e),oo("nonassign","Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",t[v],v,a.name)},l=i[o]=c(e);var b=function(t){return g(t,i[o])||(g(t,l)?h(e,t=i[o]):i[o]=t),l=t};b.$stateful=!0,$=r.collection?e.$watchCollection(t[v],b):e.$watch(s(t[v],b),null,c.literal),f.push($);break;case"<":if(!Br.call(t,v)){if(m)break;t[v]=void 0}if(m&&!t[v])break;c=s(t[v]);var x=c.literal,_=i[o]=c(e);d[o]=new wt(ao,i[o]),$=e.$watch(c,function(e,t){if(t===e){if(t===_||x&&z(t,_))return;t=_}u(o,e,t),i[o]=e},x),f.push($);break;case"&":if(c=t.hasOwnProperty(v)?s(t[v]):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 _e,ke=/^\w/,Ee=e.document.createElement("div"),Se=P,Ae=D,Oe=T;F.prototype={$normalize:xt,$addClass:function(e){e&&e.length>0&&A.addClass(this.$$element,e)},$removeClass:function(e){e&&e.length>0&&A.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=_t(e,t);n&&n.length&&A.addClass(this.$$element,n);var r=_t(t,e);r&&r.length&&A.removeClass(this.$$element,r)},$set:function(e,t,n,o){var a,s=this.$$element[0],u=Je(s,e),l=Ze(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=le(e,"-"))),a=U(this.$$element),"a"===a&&("href"===e||"xlinkHref"===e)||"img"===a&&"src"===e)this[e]=t=V(t,"src"===e);else if("img"===a&&"srcset"===e&&m(t)){for(var f="",d=fi(t),p=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,h=/\s/.test(d)?p:/(,)/,g=d.split(h),$=Math.floor(g.length/2),y=0;y<$;y++){var b=2*y;f+=V(fi(g[b]),!0),f+=" "+fi(g[b+1])}var w=fi(g[2*y]).split(/\s/);f+=V(fi(w[0]),!0),2===w.length&&(f+=" "+fi(w[1])),this[e]=t=f}n!==!1&&(null===t||v(t)?this.$$element.removeAttr(o):ke.test(o)?this.$$element.attr(o,t):R(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=$e()),i=r[e]||(r[e]=[]);return i.push(t),c.$evalAsync(function(){i.$$inter||!n.hasOwnProperty(e)||v(n[e])||t(n[e])}),function(){N(i,t)}}};var Me=n.startSymbol(),je=n.endSymbol(),Te="{{"===Me&&"}}"===je?h:function(e){return e.replace(/\{\{/g,Me).replace(/}}/g,je)},Pe=/^ngAttr[A-Z]/,De=/^(.+)Start$/;return B.$$addBindingInfo=O?function(e,t){var n=e.data("$binding")||[];li(t)?n=n.concat(t):n.push(t),e.data("$binding",n)}:p,B.$$addBindingClass=O?function(e){L(e,"ng-binding")}:p,B.$$addScopeInfo=O?function(e,t,n,r){var i=n?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(i,t)}:p,B.$$addScopeClass=O?function(e,t){L(e,t?"ng-isolate-scope":"ng-scope")}:p,B.$$createComment=function(t,n){var r="";return O&&(r=" "+(t||"")+": ",n&&(r+=n+" ")),e.document.createComment(r)},B}]}function wt(e,t){this.previousValue=e,this.currentValue=t}function xt(e){return e.replace(so,"").replace(uo,Ee)}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 kt(e){e=Jr(e);var t=e.length;if(t<=1)return e;for(;t--;){var n=e[t];(n.nodeType===_i||n.nodeType===xi&&""===n.nodeValue.trim())&&ti.call(e,t,1)}return e}function Et(e,t){if(t&&w(t))return t;if(w(e)){var n=co.exec(e);if(n)return n[3]}}function St(){var e={},n=!1;this.has=function(t){return e.hasOwnProperty(t)},this.register=function(t,n){pe(t,"controller"),y(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||!y(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(co),!f)throw lo("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",t);if(d=f[1],p=p||f[3],t=e.hasOwnProperty(d)?e[d]:he(a.$scope,d,!0)||(n?he(i,d,!0):void 0),!t)throw lo("ctrlreg","The controller with the name '{0}' is not registered.",d);de(t,d,!0)}if(s){var h=(li(t)?t[t.length-1]:t).prototype;return c=Object.create(h||null),p&&o(a,p,c,d||t.name),l(function(){var e=r.invoke(t,c,a,d);return e!==c&&(y(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 Ct(){this.$get=["$window",function(e){return Jr(e.document)}]}function At(){this.$get=["$document","$rootScope",function(e,t){function n(){i=r.hidden}var r=e[0],i=r&&r.hidden;return e.on("visibilitychange",n),t.$on("$destroy",function(){e.off("visibilitychange",n)}),function(){return i}}]}function Ot(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function Mt(e){return y(e)?_(e)?e.toISOString():W(e):e}function jt(){this.$get=function(){return function(e){if(!e)return"";var t=[];return i(e,function(e,n){null===e||v(e)||(li(e)?r(e,function(e){t.push(ne(n)+"="+ne(Mt(e)))}):t.push(ne(n)+"="+ne(Mt(e))))}),t.join("&")}}}function Tt(){this.$get=function(){return function(e){function t(e,o,a){null===e||v(e)||(li(e)?r(e,function(e,n){t(e,o+"["+(y(e)?n:"")+"]")}):y(e)&&!_(e)?i(e,function(e,n){t(e,o+(a?"":"[")+n+(a?"":"]"))}):n.push(ne(o)+"="+ne(Mt(e))))}if(!e)return"";var n=[];return t(e,"",!0),n.join("&")}}}function Pt(e,t){if(w(e)){var n=e.replace(vo,"").trim();if(n){var r=t("Content-Type");(r&&0===r.indexOf(po)||Dt(n))&&(e=G(n))}}return e}function Dt(e){var t=e.match(go);return t&&$o[t[0]].test(e)}function Vt(e){function t(e,t){e&&(i[e]=i[e]?i[e]+", "+t:t)}var n,i=$e();return w(e)?r(e.split("\n"),function(e){n=e.indexOf(":"),t(Wr(fi(e.substr(0,n))),fi(e.substr(n+1)))}):y(e)&&r(e,function(e,n){t(Wr(n),fi(e))}),i}function It(e){var t;return function(n){if(t||(t=Vt(e)),n){var r=t[Wr(n)];return void 0===r&&(r=null),r}return t}}function Ut(e,t,n,i){return k(i)?i(e,t,n):(r(i,function(r){e=r(e,t,n)}),e)}function Ft(e){return 200<=e&&e<300}function Nt(){var e=this.defaults={transformResponse:[Pt],transformRequest:[function(e){return!y(e)||A(e)||M(e)||O(e)?e:W(e)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ye(ho),put:ye(ho),patch:ye(ho)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer",jsonpCallbackParam:"callback"},n=!1;this.useApplyAsync=function(e){return m(e)?(n=!!e,this):n};var i=this.interceptors=[];this.$get=["$browser","$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector","$sce",function(o,a,s,u,c,f,d,h){function g(n){function i(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(){o.$$completeOutstandingRequest(p)}function s(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 u(t){var n,r,i,o=e.headers,a=l({},t.headers);o=l({},o.common,o[Wr(t.method)]);e:for(n in o){r=Wr(n);for(i in a)if(Wr(i)===r)continue e;a[n]=o[n]}return s(a,ye(t))}function c(t){var n=t.headers,i=Ut(t.data,It(n),void 0,t.transformRequest);return v(i)&&r(n,function(e,t){"content-type"===Wr(t)&&delete n[t]}),v(t.withCredentials)&&!v(e.withCredentials)&&(t.withCredentials=e.withCredentials),x(t,i).then(g,g)}function g(e){var t=l({},e);return t.data=Ut(e.data,e.headers,e.status,$.transformResponse),Ft(e.status)?t:f.reject(t)}if(!y(n))throw t("$http")("badreq","Http request configuration must be an object. Received: {0}",n);if(!w(h.valueOf(n.url)))throw t("$http")("badreq","Http request configuration url must be a string or a $sce trusted object. Received: {0}",n.url);var $=l({method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse,paramSerializer:e.paramSerializer,jsonpCallbackParam:e.jsonpCallbackParam},n);$.headers=u(n),$.method=Gr($.method),$.paramSerializer=w($.paramSerializer)?d.get($.paramSerializer):$.paramSerializer,o.$$incOutstandingRequestCount();var m=[],b=[],_=f.resolve($);return r(C,function(e){(e.request||e.requestError)&&m.unshift(e.request,e.requestError),(e.response||e.responseError)&&b.push(e.response,e.responseError)}),_=i(_,m),_=_.then(c),_=i(_,b),_=_["finally"](a)}function $(e){r(arguments,function(e){g[e]=function(t,n){return g(l({},n||{},{method:e,url:t}))}})}function b(e){r(arguments,function(e){g[e]=function(t,n,r){return g(l({},r||{},{method:e,url:t,data:n}))}})}function x(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)}$&&(Ft(e)?$.put(O,[e,t,Vt(r),i]):$.remove(O)),n?c.$applyAsync(o):(o(),c.$$phase||c.$apply())}function l(e,n,r,i){n=n>=-1?n:0,(Ft(n)?x.resolve:x.reject)({data:e,status:n,headers:It(r),config:t,statusText:i})}function d(e){l(e.data,e.status,ye(e.headers()),e.statusText)}function p(){var e=g.pendingRequests.indexOf(t);e!==-1&&g.pendingRequests.splice(e,1)}var $,b,x=f.defer(),k=x.promise,C=t.headers,A="jsonp"===Wr(t.method),O=t.url;if(A?O=h.getTrustedResourceUrl(O):w(O)||(O=h.valueOf(O)),O=_(O,t.paramSerializer(t.params)),A&&(O=E(O,t.jsonpCallbackParam)),g.pendingRequests.push(t),k.then(p,p),!t.cache&&!e.cache||t.cache===!1||"GET"!==t.method&&"JSONP"!==t.method||($=y(t.cache)?t.cache:y(e.cache)?e.cache:S),$&&(b=$.get(O),m(b)?T(b)?b.then(d,d):li(b)?l(b[1],b[0],ye(b[2]),b[3]):l(b,200,{},"OK"):$.put(O,k)),v(b)){var M=Fn(t.url)?s()[t.xsrfCookieName||e.xsrfCookieName]:void 0;M&&(C[t.xsrfHeaderName||e.xsrfHeaderName]=M),a(t.method,O,i,u,C,t.timeout,t.withCredentials,t.responseType,o(t.eventHandlers),o(t.uploadEventHandlers))}return k}function _(e,t){return t.length>0&&(e+=(e.indexOf("?")===-1?"?":"&")+t),e}function E(e,t){if(/[&?][^=]+=JSON_CALLBACK/.test(e))throw mo("badjsonp",'Illegal use of JSON_CALLBACK in url, "{0}"',e);var n=new RegExp("[&?]"+t+"=");if(n.test(e))throw mo("badjsonp",'Illegal use of callback param, "{0}", in url, "{1}"',t,e);return e+=(e.indexOf("?")===-1?"?":"&")+t+"=JSON_CALLBACK"}var S=u("$http");e.paramSerializer=w(e.paramSerializer)?d.get(e.paramSerializer):e.paramSerializer;var C=[];return r(i,function(e){C.unshift(w(e)?d.get(e):d.invoke(e))}),g.pendingRequests=[],$("get","delete","head","jsonp"),b("post","put","patch"),g.defaults=e,g}]}function Rt(){this.$get=function(){return function(){return new e.XMLHttpRequest}}}function zt(){this.$get=["$browser","$jsonpCallbacks","$document","$xhrFactory",function(e,t,n,r){return Lt(e,r,e.defer,t,n[0])}]}function Lt(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){r.removeEventListener("load",a),r.removeEventListener("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)},r.addEventListener("load",a),r.addEventListener("error",a),o.body.appendChild(r),a}return function(o,s,u,l,c,f,d,p,h,g){function $(){w&&w(),x&&x.abort()}function y(e,t,r,i,o){m(E)&&n.cancel(E),w=x=null,e(t,r,i,o)}if(s=s||e.url(),"jsonp"===Wr(o))var b=i.createCallback(s),w=a(s,b,function(e,t){var n=200===e&&i.getResponse(b);y(l,e,n,"",t),i.removeCallback(b)});else{var x=t(o,s);x.open(o,s,!0),r(c,function(e,t){m(e)&&x.setRequestHeader(t,e)}),x.onload=function(){var e=x.statusText||"",t="response"in x?x.response:x.responseText,n=1223===x.status?204:x.status;0===n&&(n=t?200:"file"===Un(s).protocol?404:0),y(l,n,t,x.getAllResponseHeaders(),e)};var _=function(){y(l,-1,null,null,"")};if(x.onerror=_,x.onabort=_,x.ontimeout=_,r(h,function(e,t){x.addEventListener(t,e)}),r(g,function(e,t){x.upload.addEventListener(t,e)}),d&&(x.withCredentials=!0),p)try{x.responseType=p}catch(k){if("json"!==p)throw k}x.send(v(u)?null:u)}if(f>0)var E=n($,f);else T(f)&&f.then($)}}function Ht(){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(d,e).replace(p,t)}function s(e,t,n,r){var i=e.$watch(function(e){return i(),r(e)},t,n);return i}function u(o,u,d,p){function h(e){try{return e=j(e),p&&!m(e)?e:ve(e)}catch(t){r(yo.interr(o,t))}}if(!o.length||o.indexOf(e)===-1){var $;if(!u){var y=a(o);$=g(y),$.exp=o,$.expressions=[],$.$$watchDelegate=s}return $}p=!!p;for(var b,w,x,_=0,E=[],S=[],C=o.length,A=[],O=[];_<C;){if((b=o.indexOf(e,_))===-1||(w=o.indexOf(t,b+c))===-1){_!==C&&A.push(a(o.substring(_)));break}_!==b&&A.push(a(o.substring(_,b))),x=o.substring(b+c,w),E.push(x),S.push(n(x,h)),_=w+f,O.push(A.length),A.push("")}if(d&&A.length>1&&yo.throwNoconcat(o),!u||E.length){var M=function(e){for(var t=0,n=E.length;t<n;t++){if(p&&v(e[t]))return;A[O[t]]=e[t]}return A.join("")},j=function(e){return d?i.getTrusted(d,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]=S[t](e);return M(i)}catch(a){r(yo.interr(o,a))}},{exp:o,expressions:E,$$watchDelegate:function(e,t){var n;return e.$watchGroup(S,function(r,i){var o=M(r);k(t)&&t.call(this,o,r!==i?n:o,e),n=o})}})}}var c=e.length,f=t.length,d=new RegExp(e.replace(/./g,o),"g"),p=new RegExp(t.replace(/./g,o),"g");return u.startSymbol=function(){return e},u.endSymbol=function(){return t},u}]}function qt(){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?H(arguments,4):[],p=t.setInterval,h=t.clearInterval,g=0,$=m(l)&&!l,v=($?r:n).defer(),y=v.promise;return u=m(u)?u:0,y.$$intervalId=p(function(){$?i.defer(c):e.$evalAsync(c),v.notify(g++),u>0&&g>=u&&(v.resolve(g),h(y.$$intervalId),delete a[y.$$intervalId]),$||e.$apply()},s),a[y.$$intervalId]=v,y}var a={};return o.cancel=function(e){return!!(e&&e.$$intervalId in a)&&(a[e.$$intervalId].promise["catch"](p),a[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete a[e.$$intervalId],!0)},o}]}function Bt(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=te(t[n]);return t.join("/")}function Wt(e,t){var n=Un(e);t.$$protocol=n.protocol,t.$$host=n.hostname,t.$$port=f(n.port)||xo[n.protocol]||null}function Gt(e,t){if(ko.test(e))throw _o("badpath",'Invalid url "{0}".',e);var n="/"!==e.charAt(0);n&&(e="/"+e);var r=Un(e);t.$$path=decodeURIComponent(n&&"/"===r.pathname.charAt(0)?r.pathname.substring(1):r.pathname),t.$$search=Q(r.search),t.$$hash=decodeURIComponent(r.hash),t.$$path&&"/"!==t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function Xt(e,t){return e.slice(0,t.length)===t}function Kt(e,t){if(Xt(t,e))return t.substr(e.length)}function Yt(e){var t=e.indexOf("#");return t===-1?e:e.substr(0,t)}function Jt(e){return e.replace(/(#.+)|#$/,"$1")}function Zt(e){return e.substr(0,Yt(e).lastIndexOf("/")+1)}function Qt(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function en(e,t,n){this.$$html5=!0,n=n||"",Wt(e,this),this.$$parse=function(e){var n=Kt(t,e);if(!w(n))throw _o("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',e,t);Gt(n,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=ee(this.$$search),n=this.$$hash?"#"+te(this.$$hash):"";this.$$url=Bt(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=Kt(e,r))?(a=o,s=n&&m(o=Kt(n,o))?t+(Kt("/",o)||o):e+a):m(o=Kt(t,r))?s=t+o:t===r+"/"&&(s=t),s&&this.$$parse(s),!!s}}function tn(e,t,n){Wt(e,this),this.$$parse=function(r){function i(e,t,n){var r,i=/^\/[A-Z]:(\/.*)/;return Xt(t,n)&&(t=t.replace(n,"")),i.exec(t)?e:(r=i.exec(e),r?r[1]:e)}var o,a=Kt(e,r)||Kt(t,r);v(a)||"#"!==a.charAt(0)?this.$$html5?o=a:(o="",v(a)&&(e=r,this.replace())):(o=Kt(n,a),v(o)&&(o=a)),Gt(o,this),this.$$path=i(this.$$path,o,e),this.$$compose()},this.$$compose=function(){var t=ee(this.$$search),r=this.$$hash?"#"+te(this.$$hash):"";this.$$url=Bt(this.$$path)+(t?"?"+t:"")+r,this.$$absUrl=e+(this.$$url?n+this.$$url:"")},this.$$parseLinkUrl=function(t,n){return Yt(e)===Yt(t)&&(this.$$parse(t),!0)}}function nn(e,t,n){this.$$html5=!0,tn.apply(this,arguments),this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var o,a;return e===Yt(r)?o=r:(a=Kt(t,r))?o=e+n+a:t===r+"/"&&(o=t),o&&this.$$parse(o),!!o},this.$$compose=function(){var t=ee(this.$$search),r=this.$$hash?"#"+te(this.$$hash):"";this.$$url=Bt(this.$$path)+(t?"?"+t:"")+r,this.$$absUrl=e+n+this.$$url}}function rn(e){return function(){return this[e]}}function on(e,t){return function(n){return v(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function an(){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):y(e)?(j(e.enabled)&&(t.enabled=e.enabled),j(e.requireBase)&&(t.requireBase=e.requireBase),(j(e.rewriteLinks)||w(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 _o("nobase","$location in HTML5 mode requires a <base> tag to be present!");f=Qt(p)+(d||"/"),c=i.history?en:nn}else f=Yt(p),c=tn;var h=Zt(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){var i=t.rewriteLinks;if(i&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&2!==e.which&&2!==e.button){for(var s=Jr(e.target);"a"!==U(s[0]);)if(s[0]===o[0]||!(s=s.parent())[0])return;if(!w(i)||!v(s.attr(i))){var u=s.prop("href"),c=s.attr("href")||s.attr("xlink:href");y(u)&&"[object SVGAnimatedString]"===u.toString()&&(u=Un(u.animVal).href),g.test(u)||!u||s.attr("target")||e.isDefaultPrevented()||l.$$parseLinkUrl(u,c)&&(e.preventDefault(),l.absUrl()!==r.url()&&(n.$apply(),a.angular["ff-684208-preventDefault"]=!0))}}}),Jt(l.absUrl())!==Jt(p)&&r.url(l.absUrl(),!0);var $=!0;return r.onUrlChange(function(e,t){return Xt(e,h)?(n.$evalAsync(function(){var r,i=l.absUrl(),o=l.$$state;e=Jt(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)):($=!1,u(i,o)))}),void(n.$$phase||n.$digest())):void(a.location.href=e)}),n.$watch(function(){var e=Jt(r.url()),t=Jt(l.absUrl()),o=r.state(),a=l.$$replace,c=e!==t||l.$$html5&&i.history&&o!==l.$$state;($||c)&&($=!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 sn(){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 un(e){return e+""}function ln(e,t){return"undefined"!=typeof e?e:t}function cn(e,t){return"undefined"==typeof e?t:"undefined"==typeof t?e:e+t}function fn(e,t){var n=e(t);return!n.$stateful}function dn(e,t){var n,i,o;switch(e.type){case jo.Program:n=!0,r(e.body,function(e){dn(e.expression,t),n=n&&e.expression.constant}),e.constant=n;break;case jo.Literal:e.constant=!0,e.toWatch=[];break;case jo.UnaryExpression:dn(e.argument,t),e.constant=e.argument.constant,e.toWatch=e.argument.toWatch;break;case jo.BinaryExpression:dn(e.left,t),dn(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.left.toWatch.concat(e.right.toWatch);break;case jo.LogicalExpression:dn(e.left,t),dn(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.constant?[]:[e];break;case jo.ConditionalExpression:dn(e.test,t),dn(e.alternate,t),dn(e.consequent,t),e.constant=e.test.constant&&e.alternate.constant&&e.consequent.constant,e.toWatch=e.constant?[]:[e];break;case jo.Identifier:e.constant=!1,e.toWatch=[e];break;case jo.MemberExpression:dn(e.object,t),e.computed&&dn(e.property,t),e.constant=e.object.constant&&(!e.computed||e.property.constant),e.toWatch=[e];break;case jo.CallExpression:o=!!e.filter&&fn(t,e.callee.name),n=o,i=[],r(e.arguments,function(e){dn(e,t),n=n&&e.constant,e.constant||i.push.apply(i,e.toWatch)}),e.constant=n,e.toWatch=o?i:[e];break;case jo.AssignmentExpression:dn(e.left,t),dn(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=[e];break;case jo.ArrayExpression:n=!0,i=[],r(e.elements,function(e){dn(e,t),n=n&&e.constant,e.constant||i.push.apply(i,e.toWatch)}),e.constant=n,e.toWatch=i;break;case jo.ObjectExpression:n=!0,i=[],r(e.properties,function(e){dn(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 jo.ThisExpression:e.constant=!1,e.toWatch=[];break;case jo.LocalsExpression:e.constant=!1,e.toWatch=[]}}function pn(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 hn(e){return e.type===jo.Identifier||e.type===jo.MemberExpression}function gn(e){if(1===e.body.length&&hn(e.body[0].expression))return{type:jo.AssignmentExpression,left:e.body[0].expression,right:{type:jo.NGValueParameter},operator:"="}}function $n(e){return 0===e.body.length||1===e.body.length&&(e.body[0].expression.type===jo.Literal||e.body[0].expression.type===jo.ArrayExpression||e.body[0].expression.type===jo.ObjectExpression)}function vn(e){return e.constant}function mn(e,t){this.astBuilder=e,this.$filter=t}function yn(e,t){this.astBuilder=e,this.$filter=t}function bn(e){return k(e.valueOf)?e.valueOf():Co.call(e)}function wn(){var e,t,n=$e(),i={"true":!0,"false":!1,"null":null,undefined:void 0};this.addLiteral=function(e,t){i[e]=t},this.setIdentifierFns=function(n,r){return e=n,t=r,this},this.$get=["$filter",function(o){function a(e,t){var r,i,a;switch(typeof e){case"string":if(e=e.trim(),a=e,r=n[a],!r){":"===e.charAt(0)&&":"===e.charAt(1)&&(i=!0,e=e.substring(2));var s=new Mo(g),h=new To(s,o,g);r=h.parse(e),r.constant?r.$$watchDelegate=f:i?r.$$watchDelegate=r.literal?c:l:r.inputs&&(r.$$watchDelegate=u),n[a]=r}return d(r,t);case"function":return d(e,t);default:return d(p,t)}}function s(e,t){return null==e||null==t?e===t:("object"!=typeof e||(e=bn(e),"object"!=typeof e))&&(e===t||e!==e&&t!==t)}function u(e,t,n,r,i){var o,a=r.inputs;if(1===a.length){var u=s;return a=a[0],e.$watch(function(e){var t=a(e);return s(t,u)||(o=r(e,void 0,void 0,[t]),u=t&&bn(t)),o},t,n,i)}for(var l=[],c=[],f=0,d=a.length;f<d;f++)l[f]=s,c[f]=null;return e.$watch(function(e){for(var t=!1,n=0,i=a.length;n<i;n++){var u=a[n](e);(t||(t=!s(u,l[n])))&&(c[n]=u,l[n]=u&&bn(u))}return t&&(o=r(e,void 0,void 0,c)),o},t,n,i)}function l(e,t,n,r,i){function o(e){return r(e)}function a(e,n,r){l=e,k(t)&&t(e,n,r),m(e)&&r.$$postDigest(function(){m(l)&&s()})}var s,l;return s=r.inputs?u(e,a,n,r,i):e.$watch(o,a,n)}function c(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,k(t)&&t(e,n,r),o(e)&&r.$$postDigest(function(){o(s)&&a()})},n)}function f(e,t,n,r){var i=e.$watch(function(e){return i(),r(e)},t,n);return i}function d(e,t){if(!t)return e;var n=e.$$watchDelegate,r=!1,i=n!==c&&n!==l,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 r=!e.inputs,e.$$watchDelegate&&e.$$watchDelegate!==u?(o.$$watchDelegate=e.$$watchDelegate,o.inputs=e.inputs):t.$stateful||(o.$$watchDelegate=u,o.inputs=e.inputs?e.inputs:[e]),o}var h=pi().noUnsafeEval,g={csp:h,literals:R(i),isIdentifierStart:k(e)&&e,isIdentifierContinue:k(t)&&t};return a}]}function xn(){var e=!0;this.$get=["$rootScope","$exceptionHandler",function(t,n){return kn(function(e){t.$evalAsync(e)},n,e)}],this.errorOnUnhandledRejections=function(t){return m(t)?(e=t,this):e}}function _n(){var e=!0;this.$get=["$browser","$exceptionHandler",function(t,n){return kn(function(e){t.defer(e)},n,e)}],this.errorOnUnhandledRejections=function(t){return m(t)?(e=t,this):e}}function kn(e,n,i){function o(){return new a}function a(){var e=this.promise=new s;this.resolve=function(t){d(e,t)},this.reject=function(t){h(e,t)},this.notify=function(t){$(e,t)}}function s(){this.$$state={status:0}}function u(t){var n,r,o;o=t.pending,t.processScheduled=!1,t.pending=void 0;try{for(var a=0,s=o.length;a<s;++a){t.pur=!0,r=o[a][0],n=o[a][t.status];try{k(n)?d(r,n(t.value)):1===t.status?d(r,t.value):h(r,t.value)}catch(u){h(r,u)}}}finally{--C,i&&0===C&&e(c)}}function c(){for(;!C&&A.length;){var e=A.shift();if(!e.pur){e.pur=!0;var t="Possibly unhandled rejection: "+we(e.value);e.value instanceof Error?n(e.value,t):n(t)}}}function f(t){!i||t.pending||2!==t.status||t.pur||(0===C&&0===A.length&&e(c),A.push(t)),!t.processScheduled&&t.pending&&(t.processScheduled=!0,++C,e(function(){u(t)}))}function d(e,t){e.$$state.status||(t===e?g(e,S("qcycle","Expected promise to be resolved with value other than itself '{0}'",t)):p(e,t))}function p(e,t){function n(t){a||(a=!0,p(e,t))}function r(t){a||(a=!0,g(e,t))}function i(t){$(e,t)}var o,a=!1;try{(y(t)||k(t))&&(o=t.then),k(o)?(e.$$state.status=-1,o.call(t,n,r,i)):(e.$$state.value=t,e.$$state.status=1,f(e.$$state))}catch(s){r(s)}}function h(e,t){e.$$state.status||g(e,t)}function g(e,t){e.$$state.value=t,e.$$state.status=2,f(e.$$state)}function $(t,r){var i=t.$$state.pending;t.$$state.status<=0&&i&&i.length&&e(function(){for(var e,t,o=0,a=i.length;o<a;o++){t=i[o][0],e=i[o][3];try{$(t,k(e)?e(r):r)}catch(s){n(s)}}})}function m(e){var t=new s;return h(t,e),t}function b(e,t,n){var r=null;try{k(n)&&(r=n())}catch(i){return m(i)}return T(r)?r.then(function(){return t(e)},m):t(e)}function w(e,t,n,r){var i=new s;return d(i,e),i.then(t,n,r)}function x(e){var t=new s,n=0,i=li(e)?[]:{};return r(e,function(e,r){n++,w(e).then(function(e){i[r]=e,--n||d(t,i)},function(e){h(t,e)})}),0===n&&d(t,i),t}function _(e){var t=o();return r(e,function(e){w(e).then(t.resolve,t.reject)}),t.promise}function E(e){function t(e){d(r,e)}function n(e){h(r,e)}if(!k(e))throw S("norslvr","Expected resolverFn, got '{0}'",e);var r=new s;return e(t,n),r}var S=t("$q",TypeError),C=0,A=[];l(s.prototype,{then:function(e,t,n){if(v(e)&&v(t)&&v(n))return this;var r=new s;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,e,t,n]),this.$$state.status>0&&f(this.$$state),r},"catch":function(e){return this.then(null,e);
|
5 |
-
},"finally":function(e,t){return this.then(function(t){return b(t,O,e)},function(t){return b(t,m,e)},t)}});var O=w;return E.prototype=s.prototype,E.defer=o,E.reject=m,E.when=w,E.resolve=O,E.all=x,E.race=_,E}function En(){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===Yr&&(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(E.$$phase)throw o("inprog","{0} already in progress",E.$$phase);E.$$phase=e}function $(){E.$$phase=null}function m(e,t){do e.$$watchersCount+=t;while(e=e.$parent)}function b(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(){E.$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.$$digestWatchIndex=-1),a.unshift(u),a.$$digestWatchIndex++,m(this,1),function(){var e=N(a,u);e>=0&&(m(o,-1),e<a.$$digestWatchIndex&&a.$$digestWatchIndex--),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(!v(o)){if(y(o))if(n(o)){a!==p&&(a=p,$=a.length=0,f++),t=o.length,$!==t&&(f++,a.length=$=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={},$=0,f++),t=0;for(r in o)Br.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)):($++,a[r]=s,f++));if($>t){f++;for(r in a)Br.call(o,r)||($--,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(y(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)Br.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,$=0;return this.$watch(d,i)},$digest:function(){var e,n,r,a,l,f,d,p,h,v,m,y=i,b=this,_=[];g("$digest"),c.$$checkUrlChange(),this===E&&null!==u&&(c.defer.cancel(u),x()),s=null;do{d=!1,h=b;for(var A=0;A<S.length;A++){try{m=S[A],m.scope.$eval(m.expression,m.locals)}catch(M){t(M)}s=null}S.length=0;e:do{if(f=h.$$watchers)for(f.$$digestWatchIndex=f.length;f.$$digestWatchIndex--;)try{if(e=f[f.$$digestWatchIndex])if(l=e.get,(n=l(h))===(r=e.last)||(e.eq?z(n,r):ui(n)&&ui(r))){if(e===s){d=!1;break e}}else d=!0,s=e,e.last=e.eq?R(n,null):n,a=e.fn,a(n,r===w?n:r,h),y<5&&(v=4-y,_[v]||(_[v]=[]),_[v].push({msg:k(e.exp)?"fn: "+(e.exp.name||e.exp.toString()):e.exp,newVal:n,oldVal:r}))}catch(M){t(M)}if(!(p=h.$$watchersCount&&h.$$childHead||h!==b&&h.$$nextSibling))for(;h!==b&&!(p=h.$$nextSibling);)h=h.$parent}while(h=p);if((d||S.length)&&!y--)throw $(),o("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",i,_)}while(d||S.length);for($();O<C.length;)try{C[O++]()}catch(M){t(M)}C.length=O=0},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this===E&&c.$$applicationDestroyed(),m(this,-this.$$watchersCount);for(var t in this.$$listenerCount)b(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){E.$$phase||S.length||c.defer(function(){S.length&&E.$digest()}),S.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{$()}}catch(n){t(n)}finally{try{E.$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,b(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=L([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=L([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 E=new h,S=E.$$asyncQueue=[],C=E.$$postDigestQueue=[],A=E.$$applyAsyncQueue=[],O=0;return E}]}function Cn(){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=Un(n).href,""===i||i.match(o)?n:"unsafe:"+i}}}function An(e){return e.replace(Vo,Ee)}function On(e){if("self"===e)return e;if(w(e)){if(e.indexOf("***")>-1)throw Po("iwcard","Illegal sequence *** in string matcher. String: {0}",e);return e=di(e).replace(/\\\*\\\*/g,".*").replace(/\\\*/g,"[^:/.?&;]*"),new RegExp("^"+e+"$")}if(E(e))return new RegExp("^"+e.source+"$");throw Po("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Mn(e){var t=[];return m(e)&&r(e,function(e){t.push(On(e))}),t}function jn(){this.SCE_CONTEXTS=Do;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=Mn(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=Mn(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=Un(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 Po("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||v(t)||""===t)return t;if("string"!=typeof t)throw Po("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||v(t)||""===t)return t;var n=f.hasOwnProperty(e)?f[e]:null;if(n&&t instanceof n)return t.$$unwrapTrustedValue();if(e===Do.RESOURCE_URL){if(i(t))return t;throw Po("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",t.toString())}if(e===Do.HTML)return l(t);throw Po("unsafe","Attempting to use an unsafe value in a safe context.")}var l=function(e){throw Po("unsafe","Attempting to use an unsafe value in a safe context.")};n.has("$sanitize")&&(l=n.get("$sanitize"));var c=o(),f={};return f[Do.HTML]=o(c),f[Do.CSS]=o(c),f[Do.URL]=o(c),f[Do.JS]=o(c),f[Do.RESOURCE_URL]=o(f[Do.URL]),{trustAs:a,getTrusted:u,valueOf:s}}]}function Tn(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$sceDelegate",function(t,n){if(e&&Yr<8)throw Po("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=ye(Do);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(Do,function(e,t){var n=Wr(t);i[An("parse_as_"+n)]=function(t){return o(e,t)},i[An("get_trusted_"+n)]=function(t){return a(e,t)},i[An("trust_as_"+n)]=function(t){return s(e,t)}}),i}]}function Pn(){this.$get=["$window","$document",function(e,t){var n={},r=e.chrome&&(e.chrome.app&&e.chrome.app.runtime||!e.chrome.app&&e.chrome.runtime&&e.chrome.runtime.id),i=!r&&e.history&&e.history.pushState,o=f((/android (\d+)/.exec(Wr((e.navigator||{}).userAgent))||[])[1]),a=/Boxee/i.test((e.navigator||{}).userAgent),s=t[0]||{},u=s.body&&s.body.style,l=!1,c=!1;return u&&(l=!!("transition"in u||"webkitTransition"in u),c=!!("animation"in u||"webkitAnimation"in u)),{history:!(!i||o<4||a),hasEvent:function(e){if("input"===e&&Yr)return!1;if(v(n[e])){var t=s.createElement("div");n[e]="on"+e in t}return n[e]},csp:pi(),transitions:l,animations:c,android:o}}]}function Dn(){var e;this.httpOptions=function(t){return t?(e=t,this):e},this.$get=["$exceptionHandler","$templateCache","$http","$q","$sce",function(t,n,r,i,o){function a(s,u){function c(e){return u||(e=Io("tpload","Failed to load template: {0} (HTTP status: {1} {2})",s,e.status,e.statusText),t(e)),i.reject(e)}a.totalPendingRequests++,w(s)&&!v(n.get(s))||(s=o.getTrustedResourceUrl(s));var f=r.defaults&&r.defaults.transformResponse;return li(f)?f=f.filter(function(e){return e!==Pt}):f===Pt&&(f=null),r.get(s,l({cache:n,transformResponse:f},e))["finally"](function(){a.totalPendingRequests--}).then(function(e){return n.put(s,e.data),e.data},c)}return a.totalPendingRequests=0,a}]}function Vn(){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=ai.element(e).data("$binding");i&&r(i,function(r){if(n){var i=new RegExp("(^|\\s)"+di(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 In(){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=H(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].promise["catch"](p),a[e.$$timeoutId].reject("canceled"),delete a[e.$$timeoutId],t.defer.cancel(e.$$timeoutId))},o}]}function Un(e){var t=e;return Yr&&(Uo.setAttribute("href",t),t=Uo.href),Uo.setAttribute("href",t),{href:Uo.href,protocol:Uo.protocol?Uo.protocol.replace(/:$/,""):"",host:Uo.host,search:Uo.search?Uo.search.replace(/^\?/,""):"",hash:Uo.hash?Uo.hash.replace(/^#/,""):"",hostname:Uo.hostname,port:Uo.port,pathname:"/"===Uo.pathname.charAt(0)?Uo.pathname:"/"+Uo.pathname}}function Fn(e){var t=w(e)?Un(e):e;return t.protocol===Fo.protocol&&t.host===Fo.host}function Nn(){this.$get=g(e)}function Rn(e){function t(e){try{return e.cookie||""}catch(t){return""}}function n(e){try{return decodeURIComponent(e)}catch(t){return e}}var r=e[0]||{},i={},o="";return function(){var e,a,s,u,l,c=t(r);if(c!==o)for(o=c,e=o.split("; "),i={},s=0;s<e.length;s++)a=e[s],u=a.indexOf("="),u>0&&(l=n(a.substring(0,u)),v(i[l])&&(i[l]=n(a.substring(u+1))));return i}}function zn(){this.$get=Rn}function Ln(e){function t(i,o){if(y(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",Gn),t("date",ur),t("filter",Hn),t("json",lr),t("limitTo",cr),t("lowercase",Bo),t("number",Xn),t("orderBy",dr),t("uppercase",Wo)}function Hn(){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=Wn(r);switch(u){case"function":a=r;break;case"boolean":case"null":case"number":case"string":s=!0;case"object":a=qn(r,i,o,s);break;default:return e}return Array.prototype.filter.call(e,a)}}function qn(e,t,n,r){var i,o=y(e)&&n in e;return t===!0?t=z:k(t)||(t=function(e,t){return!v(e)&&(null===e||null===t?e===t:!(y(t)||y(e)&&!$(e))&&(e=Wr(""+e),t=Wr(""+t),e.indexOf(t)!==-1))}),i=function(i){return o&&!y(i)?Bn(i,e[n],t,n,!1):Bn(i,e,t,n,r)}}function Bn(e,t,n,r,i,o){var a=Wn(e),s=Wn(t);if("string"===s&&"!"===t.charAt(0))return!Bn(e,t.substring(1),n,r,i);if(li(e))return e.some(function(e){return Bn(e,t,n,r,i)});switch(a){case"object":var u;if(i){for(u in e)if("$"!==u.charAt(0)&&Bn(e[u],t,n,r,!0))return!0;return!o&&Bn(e,t,n,r,!1)}if("object"===s){for(u in t){var l=t[u];if(!k(l)&&!v(l)){var c=u===r,f=c?e:e[u];if(!Bn(f,l,n,r,c,c))return!1}}return!0}return n(e,t);case"function":return!1;default:return n(e,t)}}function Wn(e){return null===e?"null":typeof e}function Gn(e){var t=e.NUMBER_FORMATS;return function(e,n,r){return v(n)&&(n=t.CURRENCY_SYM),v(r)&&(r=t.PATTERNS[1].maxFrac),null==e?e:Jn(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,r).replace(/\u00A4/g,n)}}function Xn(e){var t=e.NUMBER_FORMATS;return function(e,n){return null==e?e:Jn(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function Kn(e){var t,n,r,i,o,a=0;for((n=e.indexOf(Ro))>-1&&(e=e.replace(Ro,"")),(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)===zo;r++);if(r===(o=e.length))t=[0],n=1;else{for(o--;e.charAt(o)===zo;)o--;for(n-=r,t=[],i=0;r<=o;r++,i++)t[i]=+e.charAt(r)}return n>No&&(t=t.splice(0,No-1),a=n-1,n=1),{d:t,e:a,i:n}}function Yn(e,t,n,r){var i=e.d,o=i.length-e.i;t=v(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 Jn(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=Kn(u),Yn(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 Zn(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=zo+e;return n&&(e=e.substr(e.length-t)),i+e}function Qn(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),Zn(a,t,r,i)}}function er(e,t,n){return function(r,i){var o=r["get"+e](),a=(n?"STANDALONE":"")+(t?"SHORT":""),s=Gr(a+e);return i[s][o]}}function tr(e,t,n){var r=-1*n,i=r>=0?"+":"";return i+=Zn(Math[r>0?"floor":"ceil"](r/60),2)+Zn(Math.abs(r%60),2)}function nr(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(t<=4?5:12)-t)}function rr(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function ir(e){return function(t){var n=nr(t.getFullYear()),r=rr(t),i=+r-+n,o=1+Math.round(i/6048e5);return Zn(o,e)}}function or(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function ar(e,t){return e.getFullYear()<=0?t.ERAS[0]:t.ERAS[1]}function sr(e,t){return e.getFullYear()<=0?t.ERANAMES[0]:t.ERANAMES[1]}function ur(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=qo.test(n)?f(n):t(n)),x(n)&&(n=new Date(n)),!_(n)||!isFinite(n.getTime()))return n;for(;i;)s=Ho.exec(i),s?(l=L(l,s,1),i=l.pop()):(l.push(i),i=null);var c=n.getTimezoneOffset();return o&&(c=X(o,c),n=Y(n,o,!0)),r(l,function(t){a=Lo[t],u+=a?a(n,e.DATETIME_FORMATS,c):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),u}}function lr(){return function(e,t){return v(t)&&(t=2),W(e,t)}}function cr(){return function(e,t,r){return t=Math.abs(Number(t))===1/0?Number(t):f(t),ui(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?fr(e,r,r+t):0===r?fr(e,t,e.length):fr(e,Math.max(0,r+t),r)):e)}}function fr(e,t,n){return w(e)?e.slice(t,n):ei.call(e,t,n)}function dr(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:$(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&&(y(o)&&(o=e.index),y(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);li(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 pr(e){return k(e)&&(e={link:e}),e.restrict=e.restrict||"AC",g(e)}function hr(e,t){e.$name=t}function gr(e,t,n,r,i){this.$$controls=[],this.$error={},this.$$success={},this.$pending=void 0,this.$name=i(t.name||t.ngForm||"")(n),this.$dirty=!1,this.$pristine=!0,this.$valid=!0,this.$invalid=!1,this.$submitted=!1,this.$$parentForm=Ko,this.$$element=e,this.$$animate=r,$r(this)}function $r(e){e.$$classCache={},e.$$classCache[Pa]=!(e.$$classCache[Ta]=e.$$element.hasClass(Ta))}function vr(e){function t(e,t,n,r){e[t]||(e[t]={}),a(e[t],n,r)}function n(e,t,n,r){e[t]&&s(e[t],n,r),mr(e[t])&&(e[t]=void 0)}function r(e,t,n){n&&!e.$$classCache[t]?(e.$$animate.addClass(e.$$element,t),e.$$classCache[t]=!0):!n&&e.$$classCache[t]&&(e.$$animate.removeClass(e.$$element,t),e.$$classCache[t]=!1)}function i(e,t,n){t=t?"-"+le(t,"-"):"",r(e,Ta+t,n===!0),r(e,Pa+t,n===!1)}var o=e.clazz,a=e.set,s=e.unset;o.prototype.$setValidity=function(e,o,u){v(o)?t(this,"$pending",e,u):n(this,"$pending",e,u),j(o)?o?(s(this.$error,e,u),a(this.$$success,e,u)):(a(this.$error,e,u),s(this.$$success,e,u)):(s(this.$error,e,u),s(this.$$success,e,u)),this.$pending?(r(this,Yo,!0),this.$valid=this.$invalid=void 0,i(this,"",null)):(r(this,Yo,!1),this.$valid=mr(this.$error),this.$invalid=!this.$valid,i(this,"",this.$valid));var l;l=this.$pending&&this.$pending[e]?void 0:!this.$error[e]&&(!!this.$$success[e]||null),i(this,e,l),this.$$parentForm.$setValidity(e,l,this)}}function mr(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function yr(e){e.$formatters.push(function(t){return e.$isEmpty(t)?t:t.toString()})}function br(e,t,n,r,i,o){wr(e,t,n,r,i,o),yr(r)}function wr(e,t,n,r,i,o){var a=Wr(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=fi(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),fa[a]&&r.$$hasNativeValidators&&a===n.type&&t.on(ca,function(e){if(!u){var t=this[qr],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 xr(e,t){if(_(e))return e;if(w(e)){sa.lastIndex=0;var n=sa.exec(e);if(n){var r=+n[1],i=+n[2],o=0,a=0,s=0,u=0,l=nr(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)),ta.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 kr(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}Er(i,o,a,s),wr(i,o,a,s,u,l);var p,h=s&&s.$options.getOption("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=Y(r,h)),r}}),s.$formatters.push(function(e){if(e&&!_(e))throw Ra("datefmt","Expected `{0}` to be a date",e);return f(e)?(p=e,p&&h&&(p=Y(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)||v(g)||n(e)>=g},a.$observe("min",function(e){g=d(e),s.$validate()})}if(m(a.max)||a.ngMax){var $;s.$validators.max=function(e){return!f(e)||v($)||n(e)<=$},a.$observe("max",function(e){$=d(e),s.$validate()})}}}function Er(e,t,n,r){var i=t[0],o=r.$$hasNativeValidators=y(i.validity);o&&r.$parsers.push(function(e){var n=t.prop(qr)||{};return n.badInput||n.typeMismatch?void 0:e})}function Sr(e){e.$$parserName="number",e.$parsers.push(function(t){return e.$isEmpty(t)?null:ia.test(t)?parseFloat(t):void 0}),e.$formatters.push(function(t){if(!e.$isEmpty(t)){if(!x(t))throw Ra("numfmt","Expected `{0}` to be a number",t);t=t.toString()}return t})}function Cr(e){return m(e)&&!x(e)&&(e=parseFloat(e)),ui(e)?void 0:e}function Ar(e){return(0|e)===e}function Or(e){var t=e.toString(),n=t.indexOf(".");if(n===-1){if(-1<e&&e<1){var r=/e-(\d+)$/.exec(t);if(r)return Number(r[1])}return 0}return t.length-n-1}function Mr(e,t,n){var r=Number(e);if(!Ar(r)||!Ar(t)||!Ar(n)){var i=Math.max(Or(r),Or(t),Or(n)),o=Math.pow(10,i);r*=o,t*=o,n*=o}return(r-t)%n===0}function jr(e,t,n,r,i,o){Er(e,t,n,r),Sr(r),wr(e,t,n,r,i,o);var a,s;if((m(n.min)||n.ngMin)&&(r.$validators.min=function(e){return r.$isEmpty(e)||v(a)||e>=a},n.$observe("min",function(e){a=Cr(e),r.$validate()})),(m(n.max)||n.ngMax)&&(r.$validators.max=function(e){return r.$isEmpty(e)||v(s)||e<=s},n.$observe("max",function(e){s=Cr(e),r.$validate()})),m(n.step)||n.ngStep){var u;r.$validators.step=function(e,t){return r.$isEmpty(t)||v(u)||Mr(t,a||0,u)},n.$observe("step",function(e){u=Cr(e),r.$validate()})}}function Tr(e,t,n,r,i,o){function a(e,r){t.attr(e,n[e]),n.$observe(e,r)}function s(e){if(f=Cr(e),!ui(r.$modelValue))if(c){var n=t.val();f>n&&(n=f,t.val(n)),r.$setViewValue(n)}else r.$validate()}function u(e){if(d=Cr(e),!ui(r.$modelValue))if(c){var n=t.val();d<n&&(t.val(d),n=d<f?f:d),r.$setViewValue(n)}else r.$validate()}function l(e){p=Cr(e),ui(r.$modelValue)||(c&&r.$viewValue!==t.val()?r.$setViewValue(t.val()):r.$validate())}Er(e,t,n,r),Sr(r),wr(e,t,n,r,i,o);var c=r.$$hasNativeValidators&&"range"===t[0].type,f=c?0:void 0,d=c?100:void 0,p=c?1:void 0,h=t[0].validity,g=m(n.min),$=m(n.max),y=m(n.step),b=r.$render;r.$render=c&&m(h.rangeUnderflow)&&m(h.rangeOverflow)?function(){b(),r.$setViewValue(t.val())}:b,g&&(r.$validators.min=c?function(){return!0}:function(e,t){return r.$isEmpty(t)||v(f)||t>=f},a("min",s)),$&&(r.$validators.max=c?function(){return!0}:function(e,t){return r.$isEmpty(t)||v(d)||t<=d},a("max",u)),y&&(r.$validators.step=c?function(){return!h.stepMismatch}:function(e,t){return r.$isEmpty(t)||v(p)||Mr(t,f||0,p)},a("step",l))}function Pr(e,t,n,r,i,o){wr(e,t,n,r,i,o),yr(r),r.$$parserName="url",r.$validators.url=function(e,t){var n=e||t;return r.$isEmpty(n)||na.test(n)}}function Dr(e,t,n,r,i,o){wr(e,t,n,r,i,o),yr(r),r.$$parserName="email",r.$validators.email=function(e,t){var n=e||t;return r.$isEmpty(n)||ra.test(n)}}function Vr(e,t,n,r){var i=!n.ngTrim||"false"!==fi(n.ngTrim);v(n.name)&&t.attr("name",a());var o=function(e){var o;t[0].checked&&(o=n.value,i&&(o=fi(o)),r.$setViewValue(o,e&&e.type))};t.on("click",o),r.$render=function(){var e=n.value;i&&(e=fi(e)),t[0].checked=e===r.$viewValue},n.$observe("value",r.$render)}function Ir(e,t,n,r,i){var o;if(m(r)){if(o=e(r),!o.constant)throw Ra("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,r);return o(t)}return i}function Ur(e,t,n,r,i,o,a,s){var u=Ir(s,e,"ngTrueValue",n.ngTrueValue,!0),l=Ir(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 z(e,u)}),r.$parsers.push(function(e){return e?u:l})}function Fr(e,t){function n(e,t){if(!e||!e.length)return[];if(!t||!t.length)return e;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 i(e){return e&&e.split(" ")}function o(e){var t=e;return li(e)?t=e.map(o).join(" "):y(e)&&(t=Object.keys(e).filter(function(t){return e[t]}).join(" ")),t}function a(e){var t=e;if(li(e))t=e.map(a);else if(y(e)){var n=!1;t=Object.keys(e).filter(function(t){var r=e[t];return!n&&v(r)&&(n=!0),r}),n&&t.push(void 0)}return t}e="ngClass"+e;var s;return["$parse",function(u){return{restrict:"AC",link:function(l,c,f){function d(e){e=g(i(e),1),f.$addClass(e)}function p(e){e=g(i(e),-1),f.$removeClass(e)}function h(e,t){var r=i(e),o=i(t),a=n(r,o),s=n(o,r),u=g(a,-1),l=g(s,1);f.$addClass(l),f.$removeClass(u)}function g(e,t){var n=[];return r(e,function(e){(t>0||E[e])&&(E[e]=(E[e]||0)+t,E[e]===+(t>0)&&n.push(e))}),n.join(" ")}function $(e){e===t?d(y):p(y),S=e}function v(e){var t=o(e);t!==y&&m(t)}function m(e){S===t&&h(y,e),y=e}var y,b=f[e].trim(),w=":"===b.charAt(0)&&":"===b.charAt(1),x=w?a:o,_=u(b,x),k=w?v:m,E=c.data("$classCounts"),S=!0;E||(E=$e(),c.data("$classCounts",E)),"ngClass"!==e&&(s||(s=u("$index",function(e){return 1&e})),l.$watch(s,$)),l.$watch(_,k,w)}}}]}function Nr(e,t,n,r,i,o,a,s,u){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=u(n.name||"",!1)(e),this.$$parentForm=Ko,this.$options=za,this.$$parsedNgModel=i(n.ngModel),this.$$parsedNgModelAssign=this.$$parsedNgModel.assign,this.$$ngModelGet=this.$$parsedNgModel,this.$$ngModelSet=this.$$parsedNgModelAssign,this.$$pendingDebounce=null,this.$$parserValid=void 0,this.$$currentValidationRunId=0,this.$$scope=e,this.$$attr=n,this.$$element=r,this.$$animate=o,this.$$timeout=a,this.$$parse=i,this.$$q=s,this.$$exceptionHandler=t,$r(this),Rr(this)}function Rr(e){e.$$scope.$watch(function(){var t=e.$$ngModelGet(e.$$scope);if(t!==e.$modelValue&&(e.$modelValue===e.$modelValue||t===t)){e.$modelValue=e.$$rawModelValue=t,e.$$parserValid=void 0;for(var n=e.$formatters,r=n.length,i=t;r--;)i=n[r](i);e.$viewValue!==i&&(e.$$updateEmptyClasses(i),e.$viewValue=e.$$lastCommittedViewValue=i,e.$render(),e.$$runValidators(e.$modelValue,e.$viewValue,p))}return t})}function zr(e){this.$$options=e}function Lr(e,t){r(t,function(t,n){m(e[n])||(e[n]=t)})}var Hr=/^\/(.+)\/([a-z]*)$/,qr="validity",Br=Object.prototype.hasOwnProperty,Wr=function(e){return w(e)?e.toLowerCase():e},Gr=function(e){return w(e)?e.toUpperCase():e},Xr=function(e){return w(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},Kr=function(e){return w(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(e.charCodeAt(0)&-33)}):e};"i"!=="I".toLowerCase()&&(Wr=Xr,Gr=Kr);var Yr,Jr,Zr,Qr,ei=[].slice,ti=[].splice,ni=[].push,ri=Object.prototype.toString,ii=Object.getPrototypeOf,oi=t("ng"),ai=e.angular||(e.angular={}),si=0;
|
6 |
-
Yr=e.document.documentMode;var ui=Number.isNaN||function(e){return e!==e};p.$inject=[],h.$inject=[];var li=Array.isArray,ci=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/,fi=function(e){return w(e)?e.trim():e},di=function(e){return e.replace(/([-()[\]{}+?*.$^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},pi=function(){function t(){try{return new Function(""),!1}catch(e){return!0}}if(!m(pi.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");pi.rules={noUnsafeEval:!r||r.indexOf("no-unsafe-eval")!==-1,noInlineStyle:!r||r.indexOf("no-inline-style")!==-1}}else pi.rules={noUnsafeEval:t(),noInlineStyle:!1}}return pi.rules},hi=function(){if(m(hi.name_))return hi.name_;var t,n,r,i,o=$i.length;for(n=0;n<o;++n)if(r=$i[n],t=e.document.querySelector("["+r.replace(":","\\:")+"jq]")){i=t.getAttribute(r+"jq");break}return hi.name_=i},gi=/:/g,$i=["ng-","data-ng-","ng:","x-ng-"],vi=ie(e.document),mi=/[A-Z]/g,yi=!1,bi=1,wi=2,xi=3,_i=8,ki=9,Ei=11,Si={full:"1.6.1",major:1,minor:6,dot:1,codeName:"promise-rectification"};De.expando="ng339";var Ci=De.cache={},Ai=1;De._data=function(e){return this.cache[e[this.expando]]||{}};var Oi=/-([a-z])/g,Mi=/^-ms-/,ji={mouseleave:"mouseout",mouseenter:"mouseover"},Ti=t("jqLite"),Pi=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Di=/<|&#?\w+;/,Vi=/<([\w:-]+)/,Ii=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,Ui={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,"",""]};Ui.optgroup=Ui.option,Ui.tbody=Ui.tfoot=Ui.colgroup=Ui.caption=Ui.thead,Ui.th=Ui.td;var Fi=e.Node.prototype.contains||function(e){return!!(16&this.compareDocumentPosition(e))},Ni=De.prototype={ready:Ye,toString:function(){var e=[];return r(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return Jr(e>=0?this[e]:this[this.length+e])},length:0,push:ni,sort:[].sort,splice:[].splice},Ri={};r("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){Ri[Wr(e)]=e});var zi={};r("input,select,option,textarea,button,form,details".split(","),function(e){zi[e]=!0});var Li={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern",ngStep:"step"};r({data:Re,removeData:Fe,hasData:Oe,cleanData:Me},function(e,t){De[t]=e}),r({data:Re,inheritedData:We,scope:function(e){return Jr.data(e,"$scope")||We(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return Jr.data(e,"$isolateScope")||Jr.data(e,"$isolateScopeNoTemplate")},controller:Be,injector:function(e){return We(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:ze,css:function(e,t,n){return t=ke(t),m(n)?void(e.style[t]=n):e.style[t]},attr:function(e,t,n){var r,i=e.nodeType;if(i!==xi&&i!==wi&&i!==_i&&e.getAttribute){var o=Wr(t),a=Ri[o];return m(n)?void(null===n||n===!1&&a?e.removeAttribute(t):e.setAttribute(t,a?o:n)):(r=e.getAttribute(t),a&&null!==r&&(r=o),null===r?void 0:r)}},prop:function(e,t,n){return m(n)?void(e[t]=n):e[t]},text:function(){function e(e,t){if(v(t)){var n=e.nodeType;return n===bi||n===xi?e.textContent:""}e.textContent=t}return e.$dv="",e}(),val:function(e,t){if(v(t)){if(e.multiple&&"select"===U(e)){var n=[];return r(e.options,function(e){e.selected&&n.push(e.value||e.text)}),n}return e.value}e.value=t},html:function(e,t){return v(t)?e.innerHTML:(Ie(e,!0),void(e.innerHTML=t))},empty:Ge},function(e,t){De.prototype[t]=function(t,n){var r,i,o=this.length;if(e!==Ge&&v(2===e.length&&e!==ze&&e!==Be?t:n)){if(y(t)){for(r=0;r<o;r++)if(e===Re)e(this[r],t);else for(i in t)e(this[r],i,t[i]);return this}for(var a=e.$dv,s=v(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:Fe,on:function(e,t,n,r){if(m(r))throw Ti("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(Ae(e)){var i=Ne(e,!0),o=i.events,a=i.handle;a||(a=i.handle=Qe(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||e.addEventListener(t,a)),s.push(n)};u--;)t=s[u],ji[t]?(l(ji[t],tt),l(t,void 0,!0)):l(t)}},off:Ue,one:function(e,t,n){e=Jr(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;Ie(e),r(new De(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===bi&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var n=e.nodeType;if(n===bi||n===Ei){t=new De(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===bi){var n=e.firstChild;r(new De(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){Pe(e,Jr(t).eq(0).clone()[0])},remove:Xe,detach:function(e){Xe(e,!0)},after:function(e,t){var n=e,r=e.parentNode;if(r){t=new De(t);for(var i=0,o=t.length;i<o;i++){var a=t[i];r.insertBefore(a,n.nextSibling),n=a}}},addClass:He,removeClass:Le,toggleClass:function(e,t,n){t&&r(t.split(" "),function(t){var r=n;v(r)&&(r=!ze(e,t)),(r?He:Le)(e,t)})},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==Ei?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:Ve,triggerHandler:function(e,t,n){var i,o,a,s=t.type||t,u=Ne(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=ye(f),a=n?[i].concat(n):[i],r(o,function(t){i.isImmediatePropagationStopped()||t.apply(e,a)}))}},function(e,t){De.prototype[t]=function(t,n,r){for(var i,o=0,a=this.length;o<a;o++)v(i)?(i=e(this[o],t,n,r),m(i)&&(i=Jr(i))):qe(i,e(this[o],t,n,r));return m(i)?i:this}}),De.prototype.bind=De.prototype.on,De.prototype.unbind=De.prototype.off,it.prototype={put:function(e,t){this[rt(e,this.nextUid)]=t},get:function(e){return this[rt(e,this.nextUid)]},remove:function(e){var t=this[e=rt(e,this.nextUid)];return delete this[e],t}};var Hi=[function(){this.$get=[function(){return it}]}],qi=/^([^(]+?)=>/,Bi=/^[^(]*\(\s*([^)]*)\)/m,Wi=/,/,Gi=/^\s*(_?)(\S+?)\1\s*$/,Xi=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Ki=t("$injector");lt.$$annotate=ut;var Yi=t("$animate"),Ji=1,Zi="ng-animate",Qi=function(){this.$get=p},eo=function(){var e=new it,t=[];this.$get=["$$AnimateRunner","$rootScope",function(n,i){function o(e,t,n){var i=!1;return t&&(t=w(t)?t.split(" "):li(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=pt(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&&He(e,o),a&&Le(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}}}]},to=["$provide",function(e){var t=this;this.$$registeredAnimations=Object.create(null),this.register=function(n,r){if(n&&"."!==n.charAt(0))throw Yi("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+|\\/)"+Zi+"(\\s+|\\/)");if(t.test(this.$$classNameFilter.toString()))throw Yi("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',Zi)}return this.$$classNameFilter},this.$get=["$$animateQueue",function(e){function t(e,t,n){if(n){var r=dt(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&&Jr(r),i=i&&Jr(i),r=r||i.parent(),t(n,r,i),e.push(n,"enter",ht(o))},move:function(n,r,i,o){return r=r&&Jr(r),i=i&&Jr(i),r=r||i.parent(),t(n,r,i),e.push(n,"move",ht(o))},leave:function(t,n){return e.push(t,"leave",ht(n),function(){t.remove()})},addClass:function(t,n,r){return r=ht(r),r.addClass=ft(r.addclass,n),e.push(t,"addClass",r)},removeClass:function(t,n,r){return r=ht(r),r.removeClass=ft(r.removeClass,n),e.push(t,"removeClass",r)},setClass:function(t,n,r,i){return i=ht(i),i.addClass=ft(i.addClass,n),i.removeClass=ft(i.removeClass,r),e.push(t,"setClass",i)},animate:function(t,n,r,i,o){return o=ht(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=ft(o.tempClasses,i),e.push(t,"animate",o)}}}]}],no=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)}}}]},ro=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$$isDocumentHidden","$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){i()?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}]},io=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=R(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}}}]},oo=t("$compile"),ao=new yt;bt.$inject=["$provide","$$sanitizeUriProvider"],wt.prototype.isFirstChange=function(){return this.previousValue===ao};var so=/^((?:x|data)[:\-_])/i,uo=/[:\-_]+(.)/g,lo=t("$controller"),co=/^(\S+)(\s+as\s+([\w$]+))?$/,fo=function(){this.$get=["$document",function(e){return function(t){return t?!t.nodeType&&t instanceof Jr&&(t=t[0]):t=e[0].body,t.offsetWidth+1}}]},po="application/json",ho={"Content-Type":po+";charset=utf-8"},go=/^\[|^\{(?!\{)/,$o={"[":/]$/,"{":/}$/},vo=/^\)]\}',?\n/,mo=t("$http"),yo=ai.$interpolateMinErr=t("$interpolate");yo.throwNoconcat=function(e){throw yo("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)},yo.interr=function(e,t){return yo("interr","Can't interpolate: {0}\n{1}",e,t.toString())};var bo=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]}}}]},wo=/^([^?#]*)(\?([^#]*))?(#(.*))?$/,xo={http:80,https:443,ftp:21},_o=t("$location"),ko=/^\s*[\\/]{2,}/,Eo={$$absUrl:"",$$html5:!1,$$replace:!1,absUrl:rn("$$absUrl"),url:function(e){if(v(e))return this.$$url;var t=wo.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:rn("$$protocol"),host:rn("$$host"),port:rn("$$port"),path:on("$$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=Q(e);else{if(!y(e))throw _o("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");e=R(e,{}),r(e,function(t,n){null==t&&delete e[n]}),this.$$search=e}break;default:v(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:on("$$hash",function(e){return null!==e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};r([nn,tn,en],function(e){e.prototype=Object.create(Eo),e.prototype.state=function(t){if(!arguments.length)return this.$$state;if(e!==en||!this.$$html5)throw _o("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=v(t)?null:t,this}});var So=t("$parse"),Co={}.constructor.prototype.valueOf,Ao=$e();r("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(e){Ao[e]=!0});var Oo={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=Ao[t],o=Ao[n],a=Ao[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 So("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=Wr(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=Oo[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 jo=function(e,t){this.lexer=e,this.options=t};jo.Program="Program",jo.ExpressionStatement="ExpressionStatement",jo.AssignmentExpression="AssignmentExpression",jo.ConditionalExpression="ConditionalExpression",jo.LogicalExpression="LogicalExpression",jo.BinaryExpression="BinaryExpression",jo.UnaryExpression="UnaryExpression",jo.CallExpression="CallExpression",jo.MemberExpression="MemberExpression",jo.Identifier="Identifier",jo.Literal="Literal",jo.ArrayExpression="ArrayExpression",jo.Property="Property",jo.ObjectExpression="ObjectExpression",jo.ThisExpression="ThisExpression",jo.LocalsExpression="LocalsExpression",jo.NGValueParameter="NGValueParameter",jo.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:jo.Program,body:e}},expressionStatement:function(){return{type:jo.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var e=this.expression();this.expect("|");)e=this.filter(e);return e},expression:function(){return this.assignment()},assignment:function(){var e=this.ternary();if(this.expect("=")){if(!hn(e))throw So("lval","Trying to assign a value to a non l-value");e={type:jo.AssignmentExpression,left:e,right:this.assignment(),operator:"="}}return e},ternary:function(){var e,t,n=this.logicalOR();return this.expect("?")&&(e=this.expression(),this.consume(":"))?(t=this.expression(),{type:jo.ConditionalExpression,test:n,alternate:e,consequent:t}):n},logicalOR:function(){for(var e=this.logicalAND();this.expect("||");)e={type:jo.LogicalExpression,operator:"||",left:e,right:this.logicalAND()};return e},logicalAND:function(){for(var e=this.equality();this.expect("&&");)e={type:jo.LogicalExpression,operator:"&&",left:e,right:this.equality()};return e},equality:function(){for(var e,t=this.relational();e=this.expect("==","!=","===","!==");)t={type:jo.BinaryExpression,operator:e.text,left:t,right:this.relational()};return t},relational:function(){for(var e,t=this.additive();e=this.expect("<",">","<=",">=");)t={type:jo.BinaryExpression,operator:e.text,left:t,right:this.additive()};return t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t={type:jo.BinaryExpression,operator:e.text,left:t,right:this.multiplicative()};return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t={type:jo.BinaryExpression,operator:e.text,left:t,right:this.unary()};return t},unary:function(){var e;return(e=this.expect("+","-","!"))?{type:jo.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=R(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?e={type:jo.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:jo.CallExpression,callee:e,arguments:this.parseArguments()},this.consume(")")):"["===t.text?(e={type:jo.MemberExpression,object:e,property:this.expression(),computed:!0},this.consume("]")):"."===t.text?e={type:jo.MemberExpression,object:e,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return e},filter:function(e){for(var t=[e],n={type:jo.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:jo.Identifier,name:e.text}},constant:function(){return{type:jo.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:jo.ArrayExpression,elements:e}},object:function(){var e,t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;e={type:jo.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:jo.ObjectExpression,properties:t}},throwError:function(e,t){throw So("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 So("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 So("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:jo.ThisExpression},$locals:{type:jo.LocalsExpression}}},mn.prototype={compile:function(e){var t=this,n=this.astBuilder.ast(e);this.state={nextId:0,filters:{},fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},dn(n,t.$filter);var i,o="";if(this.stage="assign",i=gn(n)){this.state.computing="assign";var a=this.nextId();this.recurse(i,a),this.return_(a),o="fn.assign="+this.generateFunction("assign","s,v,l")}var s=pn(n.body);t.stage="inputs",r(s,function(e,n){var r="fn"+n;t.state[r]={vars:[],body:[],own:{}},t.state.computing=r;var i=t.nextId();t.recurse(e,i),t.return_(i),t.state.inputs.push(r),e.watchId=n}),this.state.computing="fn",this.stage="main",this.recurse(n);var u='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+o+this.watchFns()+"return fn;",l=new Function("$filter","getStringValue","ifDefined","plus",u)(this.$filter,un,ln,cn);return this.state=this.stage=void 0,l.literal=$n(n),l.constant=vn(n),l},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 jo.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 jo.Literal:c=this.escape(e.value),this.assign(t,c),i(t||c);break;case jo.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 jo.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 jo.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 jo.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 jo.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),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.isNull(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))),i(t);break;case jo.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(){e.computed?(u=d.nextId(),d.recurse(e.property,u),d.getStringValue(u),o&&1!==o&&d.if_(d.not(d.computedMember(s,u)),d.lazyAssign(d.computedMember(s,u),"{}")),c=d.computedMember(s,u),d.assign(t,c),n&&(n.computed=!0,n.name=u)):(o&&1!==o&&d.if_(d.isNull(d.nonComputedMember(s,e.property.name)),d.lazyAssign(d.nonComputedMember(s,e.property.name),"{}")),c=d.nonComputedMember(s,e.property.name),d.assign(t,c),n&&(n.computed=!1,n.name=e.property.name))},function(){d.assign(t,"undefined")}),i(t)},!!o);break;case jo.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(){r(e.arguments,function(t){d.recurse(t,e.constant?void 0:d.nextId(),void 0,function(e){l.push(e)})}),c=s.name?d.member(s.context,s.name,s.computed)+"("+l.join(",")+")":u+"("+l.join(",")+")",d.assign(t,c)},function(){d.assign(t,"undefined")}),i(t)}));break;case jo.AssignmentExpression:u=this.nextId(),s={},this.recurse(e.left,void 0,s,function(){d.if_(d.notNull(s.context),function(){d.recurse(e.right,u),c=d.member(s.context,s.name,s.computed)+e.operator+u,d.assign(t,c),i(t||c)})},1);break;case jo.ArrayExpression:l=[],r(e.elements,function(t){d.recurse(t,e.constant?void 0:d.nextId(),void 0,function(e){l.push(e)})}),c="["+l.join(",")+"]",this.assign(t,c),i(t||c);break;case jo.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===jo.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===jo.Identifier?t.key.name:""+t.key.value)+":"+e)})}),c="{"+l.join(",")+"}",this.assign(t,c)),i(t||c);break;case jo.ThisExpression:this.assign(t,"s"),i(t||"s");break;case jo.LocalsExpression:this.assign(t,"l"),i(t||"l");break;case jo.NGValueParameter:this.assign(t,"v"),i(t||"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+")"},isNull:function(e){return e+"==null"},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)},getStringValue:function(e){this.assign(e,"getStringValue("+e+")")},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 So("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]}},yn.prototype={compile:function(e){var t=this,n=this.astBuilder.ast(e);dn(n,t.$filter);var i,o;(i=gn(n))&&(o=this.recurse(i));var a,s=pn(n.body);s&&(a=[],r(s,function(e,n){var r=t.recurse(e);e.input=r,a.push(r),e.watchId=n}));var u=[];r(n.body,function(e){u.push(t.recurse(e.expression))});var l=0===n.body.length?p:1===n.body.length?u[0]:function(e,t){var n;return r(u,function(r){n=r(e,t)}),n};return o&&(l.assign=function(e,t,n){return o(e,n,t)}),a&&(l.inputs=a),l.literal=$n(n),l.constant=vn(n),l},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 jo.Literal:return this.value(e.value,t);case jo.UnaryExpression:return o=this.recurse(e.argument),this["unary"+e.operator](o,t);
|
7 |
-
case jo.BinaryExpression:return i=this.recurse(e.left),o=this.recurse(e.right),this["binary"+e.operator](i,o,t);case jo.LogicalExpression:return i=this.recurse(e.left),o=this.recurse(e.right),this["binary"+e.operator](i,o,t);case jo.ConditionalExpression:return this["ternary?:"](this.recurse(e.test),this.recurse(e.alternate),this.recurse(e.consequent),t);case jo.Identifier:return s.identifier(e.name,t,n);case jo.MemberExpression:return i=this.recurse(e.object,!1,!!n),e.computed||(o=e.property.name),e.computed&&(o=this.recurse(e.property)),e.computed?this.computedMember(i,o,t,n):this.nonComputedMember(i,o,t,n);case jo.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 s,u=o(e,n,r,i);if(null!=u.value){for(var l=[],c=0;c<a.length;++c)l.push(a[c](e,n,r,i));s=u.value.apply(u.context,l)}return t?{value:s}:s};case jo.AssignmentExpression:return i=this.recurse(e.left,!0,1),o=this.recurse(e.right),function(e,n,r,a){var s=i(e,n,r,a),u=o(e,n,r,a);return s.context[s.name]=u,t?{value:u}:u};case jo.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 jo.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===jo.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 jo.ThisExpression:return function(e){return t?{value:e}:e};case jo.LocalsExpression:return function(e,n){return t?{value:n}:n};case jo.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=cn(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?{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){return function(r,i,o,a){var s=i&&e in i?i:r;n&&1!==n&&s&&null==s[e]&&(s[e]={});var u=s?s[e]:void 0;return t?{context:s,name:e,value:u}:u}},computedMember:function(e,t,n,r){return function(i,o,a,s){var u,l,c=e(i,o,a,s);return null!=c&&(u=t(i,o,a,s),u=un(u),r&&1!==r&&c&&!c[u]&&(c[u]={}),l=c[u]),n?{context:c,name:u,value:l}:l}},nonComputedMember:function(e,t,n,r){return function(i,o,a,s){var u=e(i,o,a,s);r&&1!==r&&u&&null==u[t]&&(u[t]={});var l=null!=u?u[t]:void 0;return n?{context:u,name:t,value:l}:l}},inputs:function(e,t){return function(n,r,i,o){return o?o[t]:e(n,r,i)}}};var To=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n,this.ast=new jo(e,n),this.astCompiler=n.csp?new yn(this.ast,t):new mn(this.ast,t)};To.prototype={constructor:To,parse:function(e){return this.astCompiler.compile(e)}};var Po=t("$sce"),Do={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Vo=/_([a-z])/g,Io=t("$compile"),Uo=e.document.createElement("a"),Fo=Un(e.location.href);Rn.$inject=["$document"],Ln.$inject=["$provide"];var No=22,Ro=".",zo="0";Gn.$inject=["$locale"],Xn.$inject=["$locale"];var Lo={yyyy:Qn("FullYear",4,0,!1,!0),yy:Qn("FullYear",2,0,!0,!0),y:Qn("FullYear",1,0,!1,!0),MMMM:er("Month"),MMM:er("Month",!0),MM:Qn("Month",2,1),M:Qn("Month",1,1),LLLL:er("Month",!1,!0),dd:Qn("Date",2),d:Qn("Date",1),HH:Qn("Hours",2),H:Qn("Hours",1),hh:Qn("Hours",2,-12),h:Qn("Hours",1,-12),mm:Qn("Minutes",2),m:Qn("Minutes",1),ss:Qn("Seconds",2),s:Qn("Seconds",1),sss:Qn("Milliseconds",3),EEEE:er("Day"),EEE:er("Day",!0),a:or,Z:tr,ww:ir(2),w:ir(1),G:ar,GG:ar,GGG:ar,GGGG:sr},Ho=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,qo=/^-?\d+$/;ur.$inject=["$locale"];var Bo=g(Wr),Wo=g(Gr);dr.$inject=["$parse"];var Go=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]"===ri.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}}),Xo={};r(Ri,function(e,t){function n(e,n,i){e.$watch(i[r],function(e){i.$set(t,!!e)})}if("multiple"!==e){var r=xt("ng-"+t),i=n;"checked"===e&&(i=function(e,t,i){i.ngModel!==i[r]&&n(e,t,i)}),Xo[r]=function(){return{restrict:"A",priority:100,link:i}}}}),r(Li,function(e,t){Xo[t]=function(){return{priority:100,link:function(e,n,r){if("ngPattern"===t&&"/"===r.ngPattern.charAt(0)){var i=r.ngPattern.match(Hr);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=xt("ng-"+e);Xo[t]=function(){return{priority:99,link:function(n,r,i){var o=e,a=e;"href"===e&&"[object SVGAnimatedString]"===ri.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(Yr&&o&&r.prop(o,i[a]))):void("href"===e&&i.$set(a,null))})}}}});var Ko={$addControl:p,$$renameControl:hr,$removeControl:p,$setValidity:p,$setDirty:p,$setPristine:p,$setSubmitted:p},Yo="ng-pending",Jo="ng-submitted";gr.$inject=["$element","$attrs","$scope","$animate","$interpolate"],gr.prototype={$rollbackViewValue:function(){r(this.$$controls,function(e){e.$rollbackViewValue()})},$commitViewValue:function(){r(this.$$controls,function(e){e.$commitViewValue()})},$addControl:function(e){pe(e.$name,"input"),this.$$controls.push(e),e.$name&&(this[e.$name]=e),e.$$parentForm=this},$$renameControl:function(e,t){var n=e.$name;this[n]===e&&delete this[n],this[t]=e,e.$name=t},$removeControl:function(e){e.$name&&this[e.$name]===e&&delete this[e.$name],r(this.$pending,function(t,n){this.$setValidity(n,null,e)},this),r(this.$error,function(t,n){this.$setValidity(n,null,e)},this),r(this.$$success,function(t,n){this.$setValidity(n,null,e)},this),N(this.$$controls,e),e.$$parentForm=Ko},$setDirty:function(){this.$$animate.removeClass(this.$$element,Da),this.$$animate.addClass(this.$$element,Va),this.$dirty=!0,this.$pristine=!1,this.$$parentForm.$setDirty()},$setPristine:function(){this.$$animate.setClass(this.$$element,Da,Va+" "+Jo),this.$dirty=!1,this.$pristine=!0,this.$submitted=!1,r(this.$$controls,function(e){e.$setPristine()})},$setUntouched:function(){r(this.$$controls,function(e){e.$setUntouched()})},$setSubmitted:function(){this.$$animate.addClass(this.$$element,Jo),this.$submitted=!0,this.$$parentForm.$setSubmitted()}},vr({clazz:gr,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&&(N(r,n),0===r.length&&delete e[t])}});var Zo=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:gr,compile:function(n,i){n.addClass(Da).addClass(Ta);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()};n[0].addEventListener("submit",u),n.on("$destroy",function(){t(function(){n[0].removeEventListener("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,Ko)})}}}};return i}]},Qo=Zo(),ea=Zo(!0),ta=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,na=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:\/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,ra=/^(?=.{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])?)*$/,ia=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,oa=/^(\d{4,})-(\d{2})-(\d{2})$/,aa=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,sa=/^(\d{4,})-W(\d\d)$/,ua=/^(\d{4,})-(\d\d)$/,la=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,ca="keydown wheel mousedown",fa=$e();r("date,datetime-local,month,time,week".split(","),function(e){fa[e]=!0});var da={text:br,date:kr("date",oa,_r(oa,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":kr("datetimelocal",aa,_r(aa,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:kr("time",la,_r(la,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:kr("week",sa,xr,"yyyy-Www"),month:kr("month",ua,_r(ua,["yyyy","MM"]),"yyyy-MM"),number:jr,url:Pr,email:Dr,radio:Vr,range:Tr,checkbox:Ur,hidden:p,button:p,submit:p,reset:p,file:p},pa=["$browser","$sniffer","$filter","$parse",function(e,t,n,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(i,o,a,s){s[0]&&(da[Wr(a.type)]||da.text)(i,o,a,s[0],t,e,n,r)}}}}],ha=/^(true|false|\d+)$/,ga=function(){function e(e,t,n){e.prop("value",n),t.$set("value",n)}return{restrict:"A",priority:100,compile:function(t,n){return ha.test(n.ngValue)?function(t,n,r){var i=t.$eval(r.ngValue);e(n,r,i)}:function(t,n,r){t.$watch(r.ngValue,function(t){e(n,r,t)})}}}},$a=["$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=ve(e)})}}}}],va=["$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=v(e)?"":e})}}}}],ma=["$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)||"")})}}}}],ya=g({restrict:"A",require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),ba=Fr("",!0),wa=Fr("Odd",0),xa=Fr("Even",1),_a=pr({compile:function(e,t){t.$set("ngCloak",void 0),e.removeClass("ng-cloak")}}),ka=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Ea={},Sa={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=xt("ng-"+e);Ea[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})};Sa[e]&&r.$$phase?t.$evalAsync(i):t.$apply(i)})}}}}]});var Ca=["$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=ge(s.clone),e.leave(l).done(function(e){e!==!1&&(l=null)}),s=null))})}}}],Aa=["$templateRequest","$anchorScroll","$animate",function(e,t,n){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:ai.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).done(function(e){e!==!1&&(d=null)}),d=p,p=null)};r.$watch(o,function(o){var u=function(e){e===!1||!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).done(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)})}}}}],Oa=["$compile",function(t){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,r,i,o){return ri.call(r[0]).match(/SVG/)?(r.empty(),void t(je(o.template,e.document).childNodes)(n,function(e){r.append(e)},{futureParentElement:r})):(r.html(o.template),void t(r.contents())(n))}}}],Ma=pr({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),ja=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,n,i){var o=n.ngList||", ",a="false"!==n.ngTrim,s=a?fi(o):o,u=function(e){if(!v(e)){var t=[];return e&&r(e.split(s),function(e){e&&t.push(a?fi(e):e)}),t}};i.$parsers.push(u),i.$formatters.push(function(e){if(li(e))return e.join(o)}),i.$isEmpty=function(e){return!e||!e.length}}}},Ta="ng-valid",Pa="ng-invalid",Da="ng-pristine",Va="ng-dirty",Ia="ng-untouched",Ua="ng-touched",Fa="ng-empty",Na="ng-not-empty",Ra=t("ngModel");Nr.$inject=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$q","$interpolate"],Nr.prototype={$$initGetterSetters:function(){if(this.$options.getOption("getterSetter")){var e=this.$$parse(this.$$attr.ngModel+"()"),t=this.$$parse(this.$$attr.ngModel+"($$$p)");this.$$ngModelGet=function(t){var n=this.$$parsedNgModel(t);return k(n)&&(n=e(t)),n},this.$$ngModelSet=function(e,n){k(this.$$parsedNgModel(e))?t(e,{$$$p:n}):this.$$parsedNgModelAssign(e,n)}}else if(!this.$$parsedNgModel.assign)throw Ra("nonassign","Expression '{0}' is non-assignable. Element: {1}",this.$$attr.ngModel,J(this.$$element))},$render:p,$isEmpty:function(e){return v(e)||""===e||null===e||e!==e},$$updateEmptyClasses:function(e){this.$isEmpty(e)?(this.$$animate.removeClass(this.$$element,Na),this.$$animate.addClass(this.$$element,Fa)):(this.$$animate.removeClass(this.$$element,Fa),this.$$animate.addClass(this.$$element,Na))},$setPristine:function(){this.$dirty=!1,this.$pristine=!0,this.$$animate.removeClass(this.$$element,Va),this.$$animate.addClass(this.$$element,Da)},$setDirty:function(){this.$dirty=!0,this.$pristine=!1,this.$$animate.removeClass(this.$$element,Da),this.$$animate.addClass(this.$$element,Va),this.$$parentForm.$setDirty()},$setUntouched:function(){this.$touched=!1,this.$untouched=!0,this.$$animate.setClass(this.$$element,Ia,Ua)},$setTouched:function(){this.$touched=!0,this.$untouched=!1,this.$$animate.setClass(this.$$element,Ua,Ia)},$rollbackViewValue:function(){this.$$timeout.cancel(this.$$pendingDebounce),this.$viewValue=this.$$lastCommittedViewValue,this.$render()},$validate:function(){if(!ui(this.$modelValue)){var e=this.$$lastCommittedViewValue,t=this.$$rawModelValue,n=this.$valid,r=this.$modelValue,i=this.$options.getOption("allowInvalid"),o=this;this.$$runValidators(t,e,function(e){i||n===e||(o.$modelValue=e?t:void 0,o.$modelValue!==r&&o.$$writeModelToScope())})}},$$runValidators:function(e,t,n){function i(){var e=c.$$parserName||"parse";return v(c.$$parserValid)?(s(e,null),!0):(c.$$parserValid||(r(c.$validators,function(e,t){s(t,null)}),r(c.$asyncValidators,function(e,t){s(t,null)})),s(e,c.$$parserValid),c.$$parserValid)}function o(){var n=!0;return r(c.$validators,function(r,i){var o=Boolean(r(e,t));n=n&&o,s(i,o)}),!!n||(r(c.$asyncValidators,function(e,t){s(t,null)}),!1)}function a(){var n=[],i=!0;r(c.$asyncValidators,function(r,o){var a=r(e,t);if(!T(a))throw Ra("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?c.$$q.all(n).then(function(){u(i)},p):u(!0)}function s(e,t){l===c.$$currentValidationRunId&&c.$setValidity(e,t)}function u(e){l===c.$$currentValidationRunId&&n(e)}this.$$currentValidationRunId++;var l=this.$$currentValidationRunId,c=this;return i()&&o()?void a():void u(!1)},$commitViewValue:function(){var e=this.$viewValue;this.$$timeout.cancel(this.$$pendingDebounce),(this.$$lastCommittedViewValue!==e||""===e&&this.$$hasNativeValidators)&&(this.$$updateEmptyClasses(e),this.$$lastCommittedViewValue=e,this.$pristine&&this.$setDirty(),this.$$parseAndValidate())},$$parseAndValidate:function(){function e(){r.$modelValue!==o&&r.$$writeModelToScope()}var t=this.$$lastCommittedViewValue,n=t,r=this;if(this.$$parserValid=!v(n)||void 0,this.$$parserValid)for(var i=0;i<this.$parsers.length;i++)if(n=this.$parsers[i](n),v(n)){this.$$parserValid=!1;break}ui(this.$modelValue)&&(this.$modelValue=this.$$ngModelGet(this.$$scope));var o=this.$modelValue,a=this.$options.getOption("allowInvalid");this.$$rawModelValue=n,a&&(this.$modelValue=n,e()),this.$$runValidators(n,this.$$lastCommittedViewValue,function(t){a||(r.$modelValue=t?n:void 0,e())})},$$writeModelToScope:function(){this.$$ngModelSet(this.$$scope,this.$modelValue),r(this.$viewChangeListeners,function(e){try{e()}catch(t){this.$$exceptionHandler(t)}},this)},$setViewValue:function(e,t){this.$viewValue=e,this.$options.getOption("updateOnDefault")&&this.$$debounceViewValueCommit(t)},$$debounceViewValueCommit:function(e){var t=this.$options.getOption("debounce");x(t[e])?t=t[e]:x(t["default"])&&(t=t["default"]),this.$$timeout.cancel(this.$$pendingDebounce);var n=this;t>0?this.$$pendingDebounce=this.$$timeout(function(){n.$commitViewValue()},t):this.$$scope.$root.$$phase?this.$commitViewValue():this.$$scope.$apply(function(){n.$commitViewValue()})}},vr({clazz:Nr,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]}});var za,La=["$rootScope",function(e){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Nr,priority:1,compile:function(t){return t.addClass(Da).addClass(Ia).addClass(Ta),{pre:function(e,t,n,r){var i=r[0],o=r[1]||i.$$parentForm,a=r[2];a&&(i.$options=a.$options),i.$$initGetterSetters(),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){function o(){a.$setTouched()}var a=i[0];a.$options.getOption("updateOn")&&n.on(a.$options.getOption("updateOn"),function(e){a.$$debounceViewValueCommit(e&&e.type)}),n.on("blur",function(){a.$touched||(e.$$phase?t.$evalAsync(o):t.$apply(o))})}}}}}],Ha=/(\s+|^)default(\s+|$)/;zr.prototype={getOption:function(e){return this.$$options[e]},createChild:function(e){var t=!1;return e=l({},e),r(e,function(n,r){"$inherit"===n?"*"===r?t=!0:(e[r]=this.$$options[r],"updateOn"===r&&(e.updateOnDefault=this.$$options.updateOnDefault)):"updateOn"===r&&(e.updateOnDefault=!1,e[r]=fi(n.replace(Ha,function(){return e.updateOnDefault=!0," "})))},this),t&&(delete e["*"],Lr(e,this.$$options)),Lr(e,za.$$options),new zr(e)}},za=new zr({updateOn:"",updateOnDefault:!0,debounce:0,getterSetter:!1,allowInvalid:!1,timezone:null});var qa=function(){function e(e,t){this.$$attrs=e,this.$$scope=t}return e.$inject=["$attrs","$scope"],e.prototype={$onInit:function(){var e=this.parentCtrl?this.parentCtrl.$options:za,t=this.$$scope.$eval(this.$$attrs.ngModelOptions);this.$options=e.createChild(t)}},{restrict:"A",priority:10,require:{parentCtrl:"?^^ngModelOptions"},bindToController:!0,controller:e}},Ba=pr({terminal:!0,priority:1e3}),Wa=t("ngOptions"),Ga=/^\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]+?))?$/,Xa=["$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(Ga);if(!s)throw Wa("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",e,J(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),$=f?function(e,t){return g(r,t)}:function(e){return rt(e)},v=function(e,t){return $(e,_(e,t))},m=o(s[2]||s[1]),y=o(s[3]||""),b=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:v,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=$(l,c);if(t.push(f),s[2]||s[1]){var d=m(r,c);t.push(d)}if(s[4]){var p=b(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=$(p,d),x=m(r,d),k=y(r,d),E=b(r,d),S=new i(g,p,x,k,E);e.push(S),t[g]=S}return{items:e,selectValueMap:t,getOptionFromViewValue:function(e){return t[v(e)]},getViewValueFromOption:function(e){return f?R(e.viewValue):e.viewValue}}}}}function s(e,n,o,s){function c(e,t){var n=u.cloneNode(!1);t.appendChild(n),d(e,n)}function f(e){var t=_.getOptionFromViewValue(e),n=t&&t.element;return n&&!n.selected&&(n.selected=!0),t}function d(e,t){e.element=t,t.disabled=e.disabled,e.label!==t.label&&(t.label=e.label,t.textContent=e.label),t.value=e.selectValue}function p(){var e=_&&h.readValue();if(_)for(var t=_.items.length-1;t>=0;t--){var r=_.items[t];Xe(m(r.group)?r.element.parentNode:r.element)}_=k.getOptions();var i={};if(w&&n.prepend(h.emptyOption),_.items.forEach(function(e){var t;m(e.group)?(t=i[e.group],t||(t=l.cloneNode(!1),E.appendChild(t),t.label=null===e.group?"null":e.group,i[e.group]=t),c(e,t)):c(e,E)}),n[0].appendChild(E),g.$render(),!g.$isEmpty(e)){var o=h.readValue(),a=k.trackBy||$;(a?z(e,o):e===o)||(g.$setViewValue(o),g.$render())}}for(var h=s[0],g=s[1],$=o.multiple,v=0,y=n.children(),b=y.length;v<b;v++)if(""===y[v].value){h.hasEmptyOption=!0,h.emptyOption=y.eq(v);break}var w=!!h.emptyOption,x=Jr(u.cloneNode(!1));x.val("?");var _,k=a(o.ngOptions,n,e),E=i[0].createDocumentFragment();h.generateUnknownOptionValue=function(e){return"?"},$?(h.writeValue=function(e){var t=e&&e.map(f)||[];_.items.forEach(function(e){e.element.selected&&!F(t,e)&&(e.element.selected=!1)})},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(li(g.$viewValue))return g.$viewValue.map(function(e){return k.getTrackByValue(e)})},function(){g.$render()})):(h.writeValue=function(e){var t=_.selectValueMap[n.val()],r=_.getOptionFromViewValue(e);t&&t.element.removeAttribute("selected"),r?(n[0].value!==r.selectValue&&(h.removeUnknownOption(),h.unselectEmptyOption(),n[0].value=r.selectValue,r.element.selected=!0),r.element.setAttribute("selected","selected")):w?h.selectEmptyOption():h.unknownOption.parent().length?h.updateUnknownOption(e):h.renderUnknownOption(e)},h.readValue=function(){var e=_.selectValueMap[n.val()];return e&&!e.disabled?(h.unselectEmptyOption(),h.removeUnknownOption(),_.getViewValueFromOption(e)):null},k.trackBy&&e.$watch(function(){return k.getTrackByValue(g.$viewValue)},function(){g.$render()})),w&&(h.emptyOption.remove(),t(h.emptyOption)(e),h.emptyOption[0].nodeType===_i?(h.hasEmptyOption=!1,h.registerOption=function(e,t){""===t.val()&&(h.hasEmptyOption=!0,h.emptyOption=t,h.emptyOption.removeClass("ng-scope"),g.$render(),t.on("$destroy",function(){h.hasEmptyOption=!1,h.emptyOption=void 0}))}):h.emptyOption.removeClass("ng-scope")),n.empty(),p(),e.$watchCollection(k.getWatchables,p)}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}}}],Ka=["$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)||{},$={},m=t.startSymbol(),y=t.endSymbol(),b=m+f+"-"+h+y,w=ai.noop;r(u,function(e,t){var n=o.exec(t);if(n){var r=(n[1]?"-":"")+Wr(n[2]);g[r]=s.attr(u.$attr[t])}}),r(g,function(e,n){$[n]=t(e.replace(i,b))}),a.$watch(f,function(t){var r=parseFloat(t),i=ui(r);if(i||r in g||(r=e.pluralCat(r-h)),!(r===c||i&&ui(c))){w();var o=$[r];v(o)?(null!=t&&n.debug("ngPluralize: no rule defined for '"+r+"' in "+d),w=p,l()):w=a.$watch(o,l),c=r}})}}}],Ya=["$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],$=h[2],v=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 y=h[3]||h[1],b=h[2];if(v&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(v)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(v)))throw s("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",v);var w,x,_,k,E={$id:rt};return m?w=e(m):(_=function(e,t){return rt(t)},k=function(e){return e}),function(e,t,o,f,h){w&&(x=function(t,n,r){return b&&(E[b]=t),E[y]=n,E.$index=r,w(e,E)});var g=$e();e.$watchCollection($,function(o){var f,$,m,w,E,S,C,A,O,M,j,T,P=t[0],D=$e();if(v&&(e[v]=o),n(o))O=o,A=x||_;else{A=x||k,O=[];for(var V in o)Br.call(o,V)&&"$"!==V.charAt(0)&&O.push(V)}for(w=O.length,j=new Array(w),f=0;f<w;f++)if(E=o===O?f:O[f],S=o[E],C=A(E,S,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,S);j[f]={id:C,scope:void 0,clone:void 0},D[C]=!0}for(var I in g){if(M=g[I],T=ge(M.clone),i.leave(T),T[0].parentNode)for(f=0,$=T.length;f<$;f++)T[f][a]=!0;M.scope.$destroy()}for(f=0;f<w;f++)if(E=o===O?f:O[f],S=o[E],M=j[f],M.scope){m=P;do m=m.nextSibling;while(m&&m[a]);l(M)!==m&&i.move(ge(M.clone),null,P),P=c(M),u(M.scope,f,y,S,b,E,w)}else h(function(e,t){M.scope=t;var n=p.cloneNode(!1);e[e.length++]=n,i.enter(e,null,P),P=n,M.clone=e,D[M.id]=M,u(M.scope,f,y,S,b,E,w)});g=D})}}}}],Ja="ng-hide",Za="ng-hide-animate",Qa=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngShow,function(t){e[t?"removeClass":"addClass"](n,Ja,{tempClasses:Za})})}}}],es=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngHide,function(t){e[t?"addClass":"removeClass"](n,Ja,{tempClasses:Za})})}}}],ts=pr(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)}),ns=["$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(n){n!==!1&&e.splice(t,1)}};n.$watch(s,function(n){for(var i,o;c.length;)e.cancel(c.pop());for(i=0,o=f.length;i<o;++i){var s=ge(l[i].clone);f[i].$destroy();var p=c[i]=e.leave(s);p.done(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)})})})}}}],rs=pr({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,i,o){var a=n.ngSwitchWhen.split(n.ngSwitchWhenSeparator).sort().filter(function(e,t,n){return n[t-1]!==e});r(a,function(e){i.cases["!"+e]=i.cases["!"+e]||[],i.cases["!"+e].push({transclude:o,element:t})})}}),is=pr({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})}}),os=t("ngTransclude"),as=["$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&&u(e)?t.append(e):(s(),n.$destroy())}function s(){n(e,function(e){t.append(e)})}function u(e){for(var t=0,n=e.length;t<n;t++){var r=e[t];if(r.nodeType!==xi||r.nodeValue.trim())return!0}}if(!o)throw os("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",J(t));r.ngTransclude===r.$attr.ngTransclude&&(r.ngTransclude="");var l=r.ngTransclude||r.ngTranscludeSlot;o(a,null,l),l&&!o.isSlotFilled(l)&&s()}}}}],ss=["$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)}}}}],us={$setViewValue:p,$render:p},ls=["$element","$scope",function(t,n){function r(){u||(u=!0,n.$$postDigest(function(){u=!1,a.ngModelCtrl.$render()}))}function i(e){l||(l=!0,n.$$postDigest(function(){n.$$destroyed||(l=!1,a.ngModelCtrl.$setViewValue(a.readValue()),e&&a.ngModelCtrl.$render())}))}function o(e){e.prop("selected",!0),e.attr("selected",!0)}var a=this,s=new it;a.selectValueMap={},a.ngModelCtrl=us,a.multiple=!1,a.unknownOption=Jr(e.document.createElement("option")),a.hasEmptyOption=!1,a.emptyOption=void 0,a.renderUnknownOption=function(e){var n=a.generateUnknownOptionValue(e);a.unknownOption.val(n),t.prepend(a.unknownOption),o(a.unknownOption),t.val(n)},a.updateUnknownOption=function(e){var n=a.generateUnknownOptionValue(e);a.unknownOption.val(n),o(a.unknownOption),t.val(n)},a.generateUnknownOptionValue=function(e){
|
8 |
return"? "+rt(e)+" ?"},a.removeUnknownOption=function(){a.unknownOption.parent()&&a.unknownOption.remove()},a.selectEmptyOption=function(){a.emptyOption&&(t.val(""),o(a.emptyOption))},a.unselectEmptyOption=function(){a.hasEmptyOption&&a.emptyOption.removeAttr("selected")},n.$on("$destroy",function(){a.renderUnknownOption=p}),a.readValue=function(){var e=t.val(),n=e in a.selectValueMap?a.selectValueMap[e]:e;return a.hasOption(n)?n:null},a.writeValue=function(e){var n=t[0].options[t[0].selectedIndex];if(n&&n.removeAttribute("selected"),a.hasOption(e)){a.removeUnknownOption();var r=rt(e);t.val(r in a.selectValueMap?r:e);var i=t[0].options[t[0].selectedIndex];o(Jr(i))}else null==e&&a.emptyOption?(a.removeUnknownOption(),a.selectEmptyOption()):a.unknownOption.parent().length?a.updateUnknownOption(e):a.renderUnknownOption(e)},a.addOption=function(e,t){if(t[0].nodeType!==_i){pe(e,'"option value"'),""===e&&(a.hasEmptyOption=!0,a.emptyOption=t);var n=s.get(e)||0;s.put(e,n+1),r()}},a.removeOption=function(e){var t=s.get(e);t&&(1===t?(s.remove(e),""===e&&(a.hasEmptyOption=!1,a.emptyOption=void 0)):s.put(e,t-1))},a.hasOption=function(e){return!!s.get(e)};var u=!1,l=!1;a.registerOption=function(e,t,n,r,o){if(n.$attr.ngValue){var s,u=NaN;n.$observe("value",function(e){var n,r=t.prop("selected");m(u)&&(a.removeOption(s),delete a.selectValueMap[u],n=!0),u=rt(e),s=e,a.selectValueMap[u]=e,a.addOption(e,t),t.attr("value",u),n&&r&&i()})}else r?n.$observe("value",function(e){a.readValue();var n,r=t.prop("selected");m(s)&&(a.removeOption(s),n=!0),s=e,a.addOption(e,t),n&&r&&i()}):o?e.$watch(o,function(e,r){n.$set("value",e);var o=t.prop("selected");r!==e&&a.removeOption(r),a.addOption(e,t),r&&o&&i()}):a.addOption(n.value,t);n.$observe("disabled",function(e){("true"===e||e&&t.prop("selected"))&&(a.multiple?i(!0):(a.ngModelCtrl.$setViewValue(null),a.ngModelCtrl.$render()))}),t.on("$destroy",function(){var e=a.readValue(),t=n.value;a.removeOption(t),a.ngModelCtrl.$render(),(a.multiple&&e&&e.indexOf(t)!==-1||e===t)&&i(!0)})}}],cs=function(){function e(e,t,n,i){var o=i[0],a=i[1];if(!a)return void(o.registerOption=p);if(o.ngModelCtrl=a,t.on("change",function(){o.removeUnknownOption(),e.$apply(function(){a.$setViewValue(o.readValue())})}),n.multiple){o.multiple=!0,o.readValue=function(){var e=[];return r(t.find("option"),function(t){if(t.selected&&!t.disabled){var n=t.value;e.push(n in o.selectValueMap?o.selectValueMap[n]:n)}}),e},o.writeValue=function(e){var n=new it(e);r(t.find("option"),function(e){e.selected=m(n.get(e.value))||m(n.get(o.selectValueMap[e.value]))})};var s,u=NaN;e.$watch(function(){u!==a.$viewValue||z(s,a.$viewValue)||(s=ye(a.$viewValue),a.$render()),u=a.$viewValue}),a.$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:ls,priority:1,link:{pre:e,post:t}}},fs=["$interpolate",function(e){return{restrict:"E",priority:100,compile:function(t,n){var r,i;return m(n.ngValue)||(m(n.value)?r=e(n.value,!0):(i=e(t.text(),!0),i||n.$set("value",t.text()))),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)}}}}],ds=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()}))}}},ps=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,J(n));o=e||void 0,i.$validate()}),i.$validators.pattern=function(e,t){return i.$isEmpty(t)||v(o)||o.test(t)}}}}},hs=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=ui(t)?-1:t,r.$validate()}),r.$validators.maxlength=function(e,t){return i<0||r.$isEmpty(t)||t.length<=i}}}}},gs=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.")):(ce(),xe(ai),ai.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 Jr(function(){oe(e.document,ae)}))}(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)}}),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.13",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<v.length;n++)if(e(t,v[n]))return!0;for(n=0;n<m.length;n++)if(e(t,m[n]))return!0;return!1}if(l){$=[],y=[];for(var n=0;n<l.length;n++)t(l[n])?y.push(l[n]):$.push(l[n])}}function h(e){return angular.isArray(e)?e:[e]}function g(){function e(){t(function(){d(x?v.concat(w):w,x?m.concat(b):b,l,y,_)},E&&E.debounce?E.debounce.change||E.debounce:0)}var o=k?$:w;a(o,r,i,n).then(function(){k?u.validate($,x?v.length:0,n,r,i).then(function(t){w=t.validsFiles,b=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),b.push(n)),e()}}})}var $,v,m,y=[],b=[],w=[];v=r.$$ngfPrevValidFiles||[],m=r.$$ngfPrevInvalidFiles||[],n&&n.$modelValue&&(v=h(n.$modelValue));var x=u.attrGetter("ngfKeep",r,i);$=(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||$.length){u.attrGetter("ngfBeforeModelChange",r,i,{$files:l,$file:l&&l.length?l[0]:null,$newFiles:$,$duplicateFiles:y,$event:c});var k=u.attrGetter("ngfValidateAfterResize",r,i),E=u.attrGetter("ngfModelOptions",r,i);u.validate($,x?v.length:0,n,r,i).then(function(e){f?d($,[],l,y,_):(E&&E.allowInvalid||k?w=$:(w=e.validFiles,b=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 y("ngfChange")||y("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),b.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(!y("ngfSelectDisabled",e)){var r=$(n);if(null!=r)return r;v(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 $(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 v(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 y=function(e,t){return l.attrGetter(e,n,t)};l.registerModelChangeValidator(r,n,e);var b=[];y("ngfMultiple")&&b.push(e.$watch(y("ngfMultiple"),function(){_.attr("multiple",y("ngfMultiple",e))})),y("ngfCapture")&&b.push(e.$watch(y("ngfCapture"),function(){_.attr("capture",y("ngfCapture",e))})),y("ngfAccept")&&b.push(e.$watch(y("ngfAccept"),function(){_.attr("accept",y("ngfAccept",e))})),b.push(n.$observe("accept",function(){_.attr("accept",y("accept"))}));var w=0,x=0,_=t;c()||(_=h()),_.bind("change",d),c()?t.bind("click",v):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(b,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]);f.width&&f.width.indexOf("px")>-1&&f.height&&f.height.indexOf("px")>-1&&(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)||"")}}])}(),
|
9 |
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 $=[o.emptyPromise(!0)];e&&(e=void 0===e.length?[e]:e,angular.forEach(e,function(e){var r=t.defer();return $.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 v=t.defer();return t.all($).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}),v.resolve(t)}),v.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 $=r(e,t,i,o,l);d.width=Math.min($.width,i),d.height=Math.min($.height,o);var v=d.getContext("2d");v.drawImage(p,Math.min(0,-$.marginX/2),Math.min(0,-$.marginY/2),$.width,$.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")||m("ngfDropDisabled",e)}function d(t,n,r){if(t){var i;try{i=t&&t.getData&&t.getData("text/html")}catch(o){}$(t.items,t.files,m("ngfAllowDir",e)!==!1,m("multiple")||m("ngfMultiple",e)).then(function(e){e.length?p(e,n):h(r,i).then(function(e){p(e,n)})})}}function p(t,n){u.updateModel(i,r,e,m("ngfChange")||m("ngfDrop"),t,n)}function h(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 g(e,t,n,r){var i=m("ngfDragOverClass",e,{$event:n}),o="dragover";if(angular.isString(i))o=i;else if(i&&(i.delay&&(x=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 $(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 $=0;$<t.length;$++){if(t[$].webkitGetAsEntry&&t[$].webkitGetAsEntry()&&t[$].webkitGetAsEntry().isDirectory){var v=t[$].webkitGetAsEntry();if(v.isDirectory&&!i)continue;null!=v&&g.push(a(v))}else{var y=t[$].getAsFile();null!=y&&(p.push(y),h+=y.size)}if(p.length>l||h>f||!o&&p.length>0)break}else if(null!=n)for(var b=0;b<n.length;b++){var w=n.item(b);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 y,b=null,w=o(m("ngfStopPropagation")),x=1;n[0].addEventListener("dragover",function(t){if(!f()&&u.shouldUpdateOn("drop",r,e)){if(t.preventDefault(),w(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),y||(y="C",g(e,r,t,function(r){y=r,n.addClass(y),m("ngfDrag",e,{$isDragging:!0,$class:y,$event:t})}))}},!1),n[0].addEventListener("dragenter",function(t){!f()&&u.shouldUpdateOn("drop",r,e)&&(t.preventDefault(),w(e)&&t.stopPropagation())},!1),n[0].addEventListener("dragleave",function(t){!f()&&u.shouldUpdateOn("drop",r,e)&&(t.preventDefault(),w(e)&&t.stopPropagation(),b=a(function(){y&&n.removeClass(y),y=null,m("ngfDrag",e,{$isDragging:!1,$event:t})},x||100))},!1),n[0].addEventListener("drop",function(t){!f()&&u.shouldUpdateOn("drop",r,e)&&(t.preventDefault(),w(e)&&t.stopPropagation(),y&&n.removeClass(y),y=null,d(t.dataTransfer,t,"dropUrl"))},!1),n[0].addEventListener("paste",function(t){navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&m("ngfEnableFirefoxPaste",e)&&t.preventDefault(),!f()&&u.shouldUpdateOn("paste",r,e)&&d(t.clipboardData||t.originalEvent.clipboardData,t,"pasteUrl")},!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}])},{}],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 <form method="POST" enctype="multipart/form-data" id="jpibfi-form" action="{{ $ctrl.config.save.post_url }}">\n <input name="{{ ::$ctrl.config.save.action }}" value="{{ ::$ctrl.config.save.nonce }}" type="hidden" />\n <input name="{{ ::$ctrl.config.save.tab }}" value="{{ ::$ctrl.config.currentTab }}" type="hidden" />\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 <input ng-if="$ctrl.config.currentTab == \'select\' || $ctrl.config.currentTab == \'visual\' || $ctrl.config.currentTab == \'advanced\'" \n type="submit" class="button button-primary" value="{{ ::$ctrl.config.save.submit }}" /> \n </form>\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){r(this,e),this.linkService=t,this.config={},this.settingsValue={}}return i(e,[{key:"$onInit",value:function(){this.config=window[this.settingsName],this.linkService.init(this.config.page)}}]),e}();o.$inject=["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"),$=r(g),v=e("./services"),m=r(v),y=o["default"].module("app",[s["default"],l["default"],h["default"],$["default"],m["default"]]).component("app",d["default"]).name;n["default"]=y},{"./app.component":1,"./common/components":8,"./components/components":18,"./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){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 '};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:42}],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(){r(this,e)}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}}]),e}();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: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("./import.controller"),o=r(i),a={bindings:{i18n:"<"},require:{form:"^form"},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 <input type="file" name="import" ng-change="$ctrl.upload()" ng-model="$ctrl.file" ngf-accept="\'.json\'"\n ngf-select="$ctrl.upload()" ngf-max-size="1MB" />\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){r(this,e),this.Upload=t}return i(e,[{key:"upload",value:function(){document.getElementById("jpibfi-form").submit()}}]),e}();o.$inject=["Upload"],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:42}],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:42}],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 '};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: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("./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" name="{{ ::$ctrl.settings.pin_image.key }}" ng_model="$ctrl.values.pin_image" value="old_default">{{ ::$ctrl.settings.pin_image.options[\'old_default\'] }}</label></p>\n <p><label><input type="radio" name="{{ ::$ctrl.settings.pin_image.key }}" ng_model="$ctrl.values.pin_image" value="default">{{ ::$ctrl.settings.pin_image.options[\'default\'] }}</label></p>\n <p><label><input type="radio" name="{{ ::$ctrl.settings.pin_image.key }}" 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 type="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 <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){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.$scope=e,n.fileFrame=null,n}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(e){var t=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 e=t.fileFrame.state().get("selection").first().toJSON();t.updateValue("custom_image_url",e.url),t.updateValue("custom_image_width",e.width),t.updateValue("custom_image_height",e.height),t.$scope.$digest()}),void this.fileFrame.open())}}]),t}(c["default"]);f.$inject=["$scope"],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=o["default"].module("app.components",[s["default"],l["default"]]).name;n["default"]=c},{"./editors":32,"./navbar":33,angular:42}],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()" name="{{ ::$ctrl.key }}" id="{{ ::$ctrl.key }}" ng-model="$ctrl.value">\n <label for="{{ ::$ctrl.key }}">{{ ::$ctrl.args.text }}</label>\n <span ng-if="$ctrl.args.tooltip" tooltips tooltip-template="{{ ::$ctrl.args.tooltip }}" class="dashicons dashicons-editor-help"></span>\n <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":21}],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=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},{}],22:[function(e,t,n){"use strict";
|
2 |
+
function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.image.controller"),o=r(i),a={bindings:{args:"<",onUpdate:"&","class":"@"},controller:o["default"],template:'<input type="text" id="{{ $ctrl.key }}" name="{{ ::$ctrl.args.key }}" ng-model="$ctrl.value" ng-change="$ctrl.change()" class="regular-text" />\n<input type="button" class="button" value="{{ ::$ctrl.args.button_text }}" ng-click="$ctrl.selectFile()" />'};n["default"]=a},{"./editor.image.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=e("./editor.controller"),l=r(u),c=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.$scope=e,n}return a(t,e),s(t,[{key:"selectFile",value:function(){var e=this;return this.fileFrame=this.fileFrame||null,this.fileFrame?this.fileFrame.open():(this.fileFrame=wp.media.frames.file_frame=wp.media({title:this.args.title_text,button:{text:this.args.button_text},multiple:!1}).on("select",function(){var t=e.fileFrame.state().get("selection").first().toJSON();e.value=t.url,e.onUpdate({$event:{key:e.key,value:e.value}}),e.$scope.$apply()}),void this.fileFrame.open())}}]),t}(l["default"]);c.$inject=["$scope"],n["default"]=c},{"./editor.controller":21}],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 }}" name="{{ ::$ctrl.args.key }}" ng-disabled="$ctrl.ngDisabled" number-attributes="$ctrl.args" class="small-text" type="number" ng-model="$ctrl.value" ng-change="$ctrl.change()" />'};n["default"]=a},{"./editor.controller":21}],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 name="{{ ::$ctrl.key }}" ng-model="$ctrl.value" id="{{ ::$ctrl.args.key }}" 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":21}],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 <input type="hidden" name="{{ ::$ctrl.args.key }}" ng-value="$ctrl.hiddenInputValue" />\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||[],this.hiddenInputValue=this.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.hiddenInputValue=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}}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=e("./editor.controller"),u=r(s),l=function(e){function t(){i(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e["class"]="regular-text",e}return a(t,e),t}(u["default"]),c={bindings:{args:"<",onUpdate:"&","class":"@",ngDisabled:"<"},controller:l,template:'<input type="text" placeholder="{{ $ctrl.args.placeholder || \'\' }}" name="{{ ::$ctrl.key }}" id="{{ $ctrl.key }}" ng-model="$ctrl.value" ng-change="$ctrl.change()" ng-class="$ctrl.class" ng-disabled="$ctrl.ngDisabled" />'};n["default"]=c},{"./editor.controller":21}],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 }}" name="{{ ::$ctrl.args.key }}" class="large-text code" ng-model="$ctrl.value" ng-change="$ctrl.change()"></textarea>'};n["default"]=a},{"./editor.controller":21}],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.image.component"),f=r(c),d=e("./editor.number.component"),p=r(d),h=e("./editor.number.directive"),g=r(h),$=e("./editor.checkbox.component"),v=r($),m=e("./editor.select.component"),y=r(m),b=e("./editor.sortableSelect.component"),w=r(b),x=o["default"].module("editors",["dndLists"]).component("editorText",s["default"]).component("editorTextarea",l["default"]).component("editorImage",f["default"]).component("editorNumber",p["default"]).component("editorCheckbox",v["default"]).component("editorSelect",y["default"]).component("editorSortableSelect",w["default"]).directive("numberAttributes",["$parse",function(e){return new g["default"](e)}]).name;n["default"]=x},{"./editor.checkbox.component":19,"./editor.image.component":22,"./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:42}],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:42}],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("./link.service"),s=r(a),u=o["default"].module("services",[]).service("linkService",s["default"]).name;n["default"]=u},{"./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)},{"./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=v?e.offsetX||e.layerX:e.offsetY||e.layerY,i=v?t.offsetWidth:t.offsetHeight,o=v?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($.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],$=o[0];h.remove();var v=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!=$&&o.append(h),e.target!==$){for(var t=e.target;t.parentNode!==$&&t.parentNode;)t=t.parentNode;t.parentNode===$&&t!==g&&(s(e,t)?$.insertBefore(g,t):$.insertBefore(g,t.nextSibling))}else if(s(e,g,!0))for(;g.previousElementSibling&&(s(e,g.previousElementSibling,!0)||0===g.previousElementSibling.offsetHeight);)$.insertBefore(g,g.previousElementSibling);else for(;g.nextElementSibling&&!s(e,g.nextElementSibling,!0);)$.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&&$(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,"&").replace(y,function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+(1024*(t-55296)+(n-56320)+65536)+";"}).replace(b,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}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;P[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 $(t){for(;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&&$(s),t=t.nextSibling}}var v=!1;this.$get=["$$sanitizeUri",function(e){return v&&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)?(v=e,this):v},i=t.bind,o=t.extend,a=t.forEach,s=t.isDefined,u=t.lowercase,l=t.noop,c=r,f=g;var m,y=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,b=/([^#-~ |!])/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),E=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")),S=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,E,S,k),M=n("background,cite,href,longdesc,src,xlink:href"),T=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"),j=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),P=o({},M,j,T);!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&&y.push(r(e))}function p(e,t){var n,r=v(e);y.push("<a ");for(n in r)y.push(n+'="'+r[n]+'" ');!a(c)||"target"in r||y.push('target="',c,'" '),y.push('href="',e.replace(/"/g,"""),'">'),d(t),y.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,y=[];h=m.match(n);)g=h[0],h[2]||h[4]||(g=(h[3]?"http://":"mailto:")+g),$=h.index,d(m.substr(0,$)),p(g,h[0].replace(i,"")),m=m.substring($+h[0].length);return d(m),e(y.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?we(o[n]):e}),s+="\nhttp://errors.angularjs.org/1.6.1/"+(e?e+"/":"")+a,r=i,n="?";r<o.length;r++,n="&")s+=n+"p"+(r-i)+"="+encodeURIComponent(we(o[r]));return new t(s)}}function n(e){if(null==e||S(e))return!1;if(li(e)||w(e)||Jr&&e instanceof Jr)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(o)&&t.call(i,e[o],o,e);else if(li(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(b(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)Br.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++si}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(y(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&&y(p)?_(p)?e[d]=new Date(p.valueOf()):E(p)?e[d]=new RegExp(p):p.nodeName?e[d]=p.cloneNode(!0):V(p)?e[d]=p.clone():(y(e[d])||(e[d]=li(p)?[]:{}),u(e[d],[p],!0)):e[d]=p}}return s(e,r),e}function l(e){return u(e,ei.call(arguments,1),!1)}function c(e){return u(e,ei.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 $(e){return k(e.toString)&&e.toString!==ri}function v(e){return"undefined"==typeof e}function m(e){return"undefined"!=typeof e}function y(e){return null!==e&&"object"==typeof e}function b(e){return null!==e&&"object"==typeof e&&!ii(e)}function w(e){return"string"==typeof e}function x(e){return"number"==typeof e}function _(e){return"[object Date]"===ri.call(e)}function k(e){return"function"==typeof e}function E(e){return"[object RegExp]"===ri.call(e)}function S(e){return e&&e.window===e}function C(e){return e&&e.$evalAsync&&e.$watch}function A(e){return"[object File]"===ri.call(e)}function O(e){return"[object FormData]"===ri.call(e)}function M(e){return"[object Blob]"===ri.call(e)}function T(e){return"boolean"==typeof e}function j(e){return e&&k(e.then)}function P(e){return e&&x(e.length)&&ci.test(ri.call(e))}function D(e){return"[object ArrayBuffer]"===ri.call(e)}function V(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function I(e){var t,n={},r=e.split(",");for(t=0;t<r.length;t++)n[r[t]]=!0;return n}function U(e){return Wr(e.nodeName||e[0]&&e[0].nodeName)}function F(e,t){return Array.prototype.indexOf.call(e,t)!==-1}function N(e,t){var n=e.indexOf(t);return n>=0&&e.splice(n,1),n}function R(e,t){function n(e,t){var n,r=t.$$hashKey;if(li(e))for(var o=0,a=e.length;o<a;o++)t.push(i(e[o]));else if(b(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)Br.call(e,n)&&(t[n]=i(e[n]));return s(t,r),t}function i(e){if(!y(e))return e;var t=a.indexOf(e);if(t!==-1)return u[t];if(S(e)||C(e))throw oi("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=li(e)?[]:Object.create(ii(e)),r=!0),a.push(e),u.push(i),r?n(e,i):i}function o(e){switch(ri.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(P(t)||D(t))throw oi("cpta","Can't copy! TypedArray destination cannot be mutated.");if(e===t)throw oi("cpi","Can't copy! Source and destination are identical.");return li(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 z(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(!li(e)){if(_(e))return!!_(t)&&z(e.getTime(),t.getTime());if(E(e))return!!E(t)&&e.toString()===t.toString();if(C(e)||C(t)||S(e)||S(t)||li(t)||_(t)||E(t))return!1;i=$e();for(r in e)if("$"!==r.charAt(0)&&!k(e[r])){if(!z(e[r],t[r]))return!1;i[r]=!0}for(r in t)if(!(r in i)&&"$"!==r.charAt(0)&&m(t[r])&&!k(t[r]))return!1;return!0}if(!li(t))return!1;if((n=e.length)===t.length){for(r=0;r<n;r++)if(!z(e[r],t[r]))return!1;return!0}}return!1}function L(e,t,n){return e.concat(ei.call(t,n))}function H(e,t){return ei.call(e,t||0)}function q(e,t){var n=arguments.length>2?H(arguments,2):[];return!k(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,L(n,arguments,0)):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function B(t,n){var r=n;return"string"==typeof t&&"$"===t.charAt(0)&&"$"===t.charAt(1)?r=void 0:S(n)?r="$WINDOW":n&&e.document===n?r="$DOCUMENT":C(n)&&(r="$SCOPE"),r}function W(e,t){if(!v(e))return x(t)||(t=t?2:null),JSON.stringify(e,B,t)}function G(e){return w(e)?JSON.parse(e):e}function X(e,t){e=e.replace(gi,"");var n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return ui(n)?t:n}function K(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function Y(e,t,n){n=n?-1:1;var r=e.getTimezoneOffset(),i=X(t,r);return K(e,n*(i-r))}function J(e){e=Jr(e).clone();try{e.empty()}catch(t){}var n=Jr("<div>").append(e).html();try{return e[0].nodeType===xi?Wr(n):n.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,function(e,t){return"<"+Wr(t)})}catch(t){return Wr(n)}}function Z(e){try{return decodeURIComponent(e)}catch(t){}}function Q(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),Br.call(t,r)?li(t[r])?t[r].push(i):t[r]=[t[r],i]:t[r]=i))}),t}function ee(e){var t=[];return r(e,function(e,n){li(e)?r(e,function(e){t.push(ne(n,!0)+(e===!0?"":"="+ne(e,!0)))}):t.push(ne(n,!0)+(e===!0?"":"="+ne(e,!0)))}),t.length?t.join("&"):""}function te(e){return ne(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ne(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 re(e,t){var n,r,i=$i.length;for(r=0;r<i;++r)if(n=$i[r]+t,w(n=e.getAttribute(n)))return n;return null}function ie(e){if(!e.currentScript)return!0;var t=e.currentScript.getAttribute("src"),n=e.createElement("a");if(n.href=t,e.location.origin===n.origin)return!0;switch(n.protocol){case"http:":case"https:":case"ftp:":case"blob:":case"file:":case"data:":return!0;default:return!1}}function oe(t,n){var i,o,a={};if(r($i,function(e){var n=e+"app";!i&&t.hasAttribute&&t.hasAttribute(n)&&(i=t,
|
3 |
+
o=t.getAttribute(n))}),r($i,function(e){var n,r=e+"app";!i&&(n=t.querySelector("["+r.replace(":","\\:")+"]"))&&(i=n,o=n.getAttribute(r))}),i){if(!vi)return void e.console.error("Angular: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match.");a.strictDi=null!==re(i,"strict-di"),n(i,o?[o]:[],a)}}function ae(t,n,i){y(i)||(i={});var o={strictDi:!1};i=l(o,i);var a=function(){if(t=Jr(t),t.injector()){var r=t[0]===e.document?"document":J(t);throw oi("btstrpd","App already bootstrapped with this element '{0}'",r.replace(/</,"<").replace(/>/,">"))}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=lt(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,""),ai.resumeBootstrap=function(e){return r(e,function(e){n.push(e)}),a()},void(k(ai.resumeDeferredBootstrap)&&ai.resumeDeferredBootstrap()))}function se(){e.name="NG_ENABLE_DEBUG_INFO!"+e.name,e.location.reload()}function ue(e){var t=ai.element(e).injector();if(!t)throw oi("test","no injector found for element argument to getTestability");return t.get("$$testability")}function le(e,t){return t=t||"_",e.replace(mi,function(e,n){return(n?t:"")+e.toLowerCase()})}function ce(){var t;if(!yi){var n=hi();Zr=v(n)?e.jQuery:n?e[n]:void 0,Zr&&Zr.fn.on?(Jr=Zr,l(Zr.fn,{scope:Ni.scope,isolateScope:Ni.isolateScope,controller:Ni.controller,injector:Ni.injector,inheritedData:Ni.inheritedData}),t=Zr.cleanData,Zr.cleanData=function(e){for(var n,r,i=0;null!=(r=e[i]);i++)n=Zr._data(r,"events"),n&&n.$destroy&&Zr(r).triggerHandler("$destroy");t(e)}):Jr=De,ai.element=Jr,yi=!0}}function fe(e,t,n){if(!e)throw oi("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function de(e,t,n){return n&&li(e)&&(e=e[e.length-1]),fe(k(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function pe(e,t){if("hasOwnProperty"===e)throw oi("badname","hasOwnProperty is not a valid {0} name",t)}function he(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 ge(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=Jr(ei.call(e,0,i))),t.push(n));return t||e}function $e(){return Object.create(null)}function ve(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=!$(e)||li(e)||_(e)?W(e):e.toString()}return e}function me(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,r){return r||(r=i),function(i,o){return o&&k(o)&&(o.$$moduleName=t),r.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",s),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 ye(e,t){if(li(e)){t=t||[];for(var n=0,r=e.length;n<r;n++)t[n]=e[n]}else if(y(e)){t=t||{};for(var i in e)"$"===i.charAt(0)&&"$"===i.charAt(1)||(t[i]=e[i])}return t||e}function be(e){var t=[];return JSON.stringify(e,function(e,n){if(n=B(e,n),y(n)){if(t.indexOf(n)>=0)return"...";t.push(n)}return n})}function we(e){return"function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):v(e)?"undefined":"string"!=typeof e?be(e):e}function xe(n){l(n,{bootstrap:ae,copy:R,extend:l,merge:c,equals:z,element:Jr,forEach:r,injector:lt,noop:p,bind:q,toJson:W,fromJson:G,identity:h,isUndefined:v,isDefined:m,isString:w,isFunction:k,isObject:y,isNumber:x,isElement:V,isArray:li,version:Si,isDate:_,lowercase:Wr,uppercase:Gr,callbacks:{$$counter:0},getTestability:ue,reloadWithDebugInfo:se,$$minErr:t,$$csp:pi,$$encodeUriSegment:te,$$encodeUriQuery:ne,$$stringify:ve}),(Qr=me(e))("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:Cn}),e.provider("$compile",bt).directive({a:Go,input:pa,textarea:pa,form:Qo,script:ss,select:cs,option:fs,ngBind:$a,ngBindHtml:ma,ngBindTemplate:va,ngClass:ba,ngClassEven:xa,ngClassOdd:wa,ngCloak:_a,ngController:ka,ngForm:ea,ngHide:es,ngIf:Ca,ngInclude:Aa,ngInit:Ma,ngNonBindable:Ba,ngPluralize:Ka,ngRepeat:Ya,ngShow:Qa,ngStyle:ts,ngSwitch:ns,ngSwitchWhen:rs,ngSwitchDefault:is,ngOptions:Xa,ngTransclude:as,ngModel:La,ngList:Ta,ngChange:ya,pattern:ps,ngPattern:ps,required:ds,ngRequired:ds,minlength:gs,ngMinlength:gs,maxlength:hs,ngMaxlength:hs,ngValue:ga,ngModelOptions:qa}).directive({ngInclude:Oa}).directive(Xo).directive(Ea),e.provider({$anchorScroll:ct,$animate:to,$animateCss:io,$$animateJs:Qi,$$animateQueue:eo,$$AnimateRunner:ro,$$animateAsyncRun:no,$browser:$t,$cacheFactory:vt,$controller:St,$document:Ct,$$isDocumentHidden:At,$exceptionHandler:Ot,$filter:Ln,$$forceReflow:fo,$interpolate:Ht,$interval:qt,$http:Nt,$httpParamSerializer:Tt,$httpParamSerializerJQLike:jt,$httpBackend:zt,$xhrFactory:Rt,$jsonpCallbacks:bo,$location:an,$log:sn,$parse:wn,$rootScope:Sn,$q:xn,$$q:_n,$sce:jn,$sceDelegate:Tn,$sniffer:Pn,$templateCache:mt,$templateRequest:Dn,$$testability:Vn,$timeout:In,$window:Nn,$$rAF:En,$$jqLite:nt,$$HashMap:Hi,$$cookieReader:zn})}])}function _e(){return++Ai}function ke(e){return Se(e.replace(Mi,"ms-"))}function Ee(e,t){return t.toUpperCase()}function Se(e){return e.replace(Oi,Ee)}function Ce(e){return!Di.test(e)}function Ae(e){var t=e.nodeType;return t===bi||!t||t===ki}function Oe(e){for(var t in Ci[e.ng339])return!0;return!1}function Me(e){for(var t=0,n=e.length;t<n;t++)Fe(e[t])}function Te(e,t){var n,i,o,a,s=t.createDocumentFragment(),u=[];if(Ce(e))u.push(t.createTextNode(e));else{for(n=s.appendChild(t.createElement("div")),i=(Vi.exec(e)||["",""])[1].toLowerCase(),o=Ui[i]||Ui._default,n.innerHTML=o[1]+e.replace(Ii,"<$1></$2>")+o[2],a=o[0];a--;)n=n.lastChild;u=L(u,n.childNodes),n=s.firstChild,n.textContent=""}return s.textContent="",s.innerHTML="",r(u,function(e){s.appendChild(e)}),s}function je(t,n){n=n||e.document;var r;return(r=Pi.exec(t))?[n.createElement(r[1])]:(r=Te(t,n))?r.childNodes:[]}function Pe(e,t){var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)}function De(e){if(e instanceof De)return e;var t;if(w(e)&&(e=fi(e),t=!0),!(this instanceof De)){if(t&&"<"!==e.charAt(0))throw ji("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new De(e)}t?qe(this,je(e)):k(e)?Ye(e):qe(this,e)}function Ve(e){return e.cloneNode(!0)}function Ie(e,t){if(t||Fe(e),e.querySelectorAll)for(var n=e.querySelectorAll("*"),r=0,i=n.length;r<i;r++)Fe(n[r])}function Ue(e,t,n,i){if(m(i))throw ji("offargs","jqLite#off() does not support the `selector` argument");var o=Ne(e),a=o&&o.events,s=o&&o.handle;if(s)if(t){var u=function(t){var r=a[t];m(n)&&N(r||[],n),m(n)&&r&&r.length>0||(e.removeEventListener(t,s),delete a[t])};r(t.split(" "),function(e){u(e),Ti[e]&&u(Ti[e])})}else for(t in a)"$destroy"!==t&&e.removeEventListener(t,s),delete a[t]}function Fe(e,t){var n=e.ng339,r=n&&Ci[n];if(r){if(t)return void delete r.data[t];r.handle&&(r.events.$destroy&&r.handle({},"$destroy"),Ue(e)),delete Ci[n],e.ng339=void 0}}function Ne(e,t){var n=e.ng339,r=n&&Ci[n];return t&&!r&&(e.ng339=n=_e(),r=Ci[n]={events:{},data:{},handle:void 0}),r}function Re(e,t,n){if(Ae(e)){var r,i=m(n),o=!i&&t&&!y(t),a=!t,s=Ne(e,!o),u=s&&s.data;if(i)u[Se(t)]=n;else{if(a)return u;if(o)return u&&u[Se(t)];for(r in t)u[Se(r)]=t[r]}}}function ze(e,t){return!!e.getAttribute&&(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1}function Le(e,t){t&&e.setAttribute&&r(t.split(" "),function(t){e.setAttribute("class",fi((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+fi(t)+" "," ")))})}function He(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");r(t.split(" "),function(e){e=fi(e),n.indexOf(" "+e+" ")===-1&&(n+=e+" ")}),e.setAttribute("class",fi(n))}}function qe(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 Be(e,t){return We(e,"$"+(t||"ngController")+"Controller")}function We(e,t,n){e.nodeType===ki&&(e=e.documentElement);for(var r=li(t)?t:[t];e;){for(var i=0,o=r.length;i<o;i++)if(m(n=Jr.data(e,r[i])))return n;e=e.parentNode||e.nodeType===Ei&&e.host}}function Ge(e){for(Ie(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function Xe(e,t){t||Ie(e);var n=e.parentNode;n&&n.removeChild(e)}function Ke(t,n){n=n||e,"complete"===n.document.readyState?n.setTimeout(t):Jr(n).on("load",t)}function Ye(t){function n(){e.document.removeEventListener("DOMContentLoaded",n),e.removeEventListener("load",n),t()}"complete"===e.document.readyState?e.setTimeout(t):(e.document.addEventListener("DOMContentLoaded",n),e.addEventListener("load",n))}function Je(e,t){var n=Ri[t.toLowerCase()];return n&&zi[U(e)]&&n}function Ze(e){return Li[e]}function Qe(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(v(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||et;o>1&&(i=ye(i));for(var u=0;u<o;u++)n.isImmediatePropagationStopped()||s(e,n,i[u])}};return n.elem=e,n}function et(e,t,n){n.call(e,t)}function tt(e,t,n){var r=t.relatedTarget;r&&(r===e||Fi.call(e,r))||n.call(e,t)}function nt(){this.$get=function(){return l(De,{hasClass:function(e,t){return e.attr&&(e=e[0]),ze(e,t)},addClass:function(e,t){return e.attr&&(e=e[0]),He(e,t)},removeClass:function(e,t){return e.attr&&(e=e[0]),Le(e,t)}})}}function rt(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 it(e,t){if(t){var n=0;this.nextUid=function(){return++n}}r(e,this.put,this)}function ot(e){return Function.prototype.toString.call(e)+" "}function at(e){var t=ot(e).replace(Xi,""),n=t.match(qi)||t.match(Bi);return n}function st(e){var t=at(e);return t?"function("+(t[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function ut(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||st(e)),Ki("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);o=at(e),r(o[1].split(Wi),function(e){e.replace(Gi,function(e,t,n){i.push(n)})})}e.$inject=i}}else li(e)?(a=e.length-1,de(e[a],"fn"),i=e.slice(0,a)):de(e,"fn",!0);return i}function lt(e,t){function n(e){return function(t,n){return y(t)?void r(t,o(e)):e(t,n)}}function i(e,t){if(pe(e,"service"),(k(t)||li(t))&&(t=_.instantiate(t)),!t.$get)throw Ki("pget","Provider '{0}' must define $get factory method.",e);return x[e+$]=t}function a(e,t){return function(){var n=C.invoke(t,this);if(v(n))throw Ki("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){pe(e,"constant"),x[e]=t,E[e]=t}function f(e,t){var n=_.get(e+$),r=n.$get;n.$get=function(){var e=C.invoke(r,n);return C.invoke(t,null,{$delegate:e})}}function d(e){fe(v(e)||li(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(!b.get(e)){b.put(e,!0);try{w(e)?(t=Qr(e),n=n.concat(d(t.requires)).concat(t._runBlocks),r(t._invokeQueue),r(t._configBlocks)):k(e)?n.push(_.invoke(e)):li(e)?n.push(_.invoke(e)):de(e,"module")}catch(i){throw li(e)&&(e=e[e.length-1]),i.message&&i.stack&&i.stack.indexOf(i.message)===-1&&(i=i.message+"\n"+i.stack),Ki("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 Ki("cdep","Circular dependency found: {0}",t+" <- "+m.join(" <- "));return e[t]}try{return m.unshift(t),e[t]=h,e[t]=n(t,r),e[t]}catch(i){throw e[t]===h&&delete e[t],i}finally{m.shift()}}function i(e,n,i){for(var o=[],a=lt.$$annotate(e,t,i),s=0,u=a.length;s<u;s++){var l=a[s];if("string"!=typeof l)throw Ki("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){if(Yr||"function"!=typeof e)return!1;var t=e.$$ngIsClass;return T(t)||(t=e.$$ngIsClass=/^(?:class\b|constructor\()/.test(ot(e))),t}function a(e,t,n,r){"string"==typeof n&&(r=n,n=null);var a=i(e,n,r);return li(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=li(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:lt.$$annotate,has:function(t){return x.hasOwnProperty(t+$)||e.hasOwnProperty(t)}}}t=t===!0;var h={},$="Provider",m=[],b=new it([],(!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 ai.isString(t)&&m.push(t),Ki("unpr","Unknown provider: {0}",m.join(" <- "))}),E={},S=p(E,function(e,t){var n=_.get(e+$,t);return C.invoke(n.$get,n,void 0,e)}),C=S;x["$injector"+$]={$get:g(S)};var A=d(e);return C=S.get("$injector"),C.strictDi=t,r(A,function(e){e&&C.invoke(e)}),C}function ct(){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"===U(e))return t=e,!0}),t}function o(){var e=s.yOffset;if(k(e))e=e();else if(V(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:x(e)?e.toString():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||Ke(function(){r.$evalAsync(s)})}),s}]}function ft(e,t){return e||t?e?t?(li(e)&&(e=e.join(" ")),li(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function dt(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.nodeType===Ji)return n}}function pt(e){w(e)&&(e=e.split(" "));var t=$e();return r(e,function(e){e.length&&(t[e]=!0)}),t}function ht(e){return y(e)?e:{}}function gt(e,t,n,i){function o(e){try{e.apply(null,H(arguments,1))}finally{if(m--,0===m)for(;y.length;)try{y.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(){b=E(),b=v(b)?null:b,z(b,A)&&(b=A),A=b}function l(){x===c.url()&&w===b||(x=c.url(),w=b,r(S,function(e){e(c.url(),b)}))}var c=this,f=e.location,d=e.history,h=e.setTimeout,g=e.clearTimeout,$={};c.isMock=!1;var m=0,y=[];c.$$completeOutstandingRequest=o,c.$$incOutstandingRequestCount=function(){m++},c.notifyWhenNoOutstandingRequests=function(e){0===m?e():y.push(e)};var b,w,x=f.href,_=t.find("base"),k=null,E=i.history?function(){try{return d.state}catch(e){}}:p;u(),w=b,c.url=function(t,n,r){if(v(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&&Yt(x)===Yt(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=b),k&&(k=t),c}return k||f.href.replace(/%27/g,"'")},c.state=function(){return b};var S=[],C=!1,A=null;c.onUrlChange=function(t){return C||(i.history&&Jr(e).on("popstate",s),Jr(e).on("hashchange",s),C=!0),S.push(t),t},c.$$applicationDestroyed=function(){Jr(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 $[n],o(e)},t||0),$[n]=!0,n},c.defer.cancel=function(e){return!!$[e]&&(delete $[e],g(e),o(p),!0)}}function $t(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new gt(e,r,t,n)}]}function vt(){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=$e(),c=r&&r.capacity||Number.MAX_VALUE,f=$e(),d=null,p=null;return n[e]={put:function(e,t){if(!v(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=$e(),a=0,f=$e(),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 mt(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function yt(){}function bt(t,n){function i(e,t,n){var i=/^\s*([@&<]|=(\*?))(\??)\s*(\w*)\s*$/,o=$e();return r(e,function(e,r){if(e in A)return void(o[r]=A[e]);var a=e.match(i);if(!a)throw oo("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]&&(A[e]=o[r])}),o}function a(e,t){var n={isolateScope:null,bindToController:null};if(y(e.scope)&&(e.bindToController===!0?(n.bindToController=i(e.scope,t,!0),n.isolateScope={}):n.isolateScope=i(e.scope,t,!1)),y(e.bindToController)&&(n.bindToController=i(e.bindToController,t,!0)),n.bindToController&&!e.controller)throw oo("noctrl","Cannot bind to controller without directive '{0}'s controller.",t);return n}function s(e){var t=e.charAt(0);if(!t||t!==Wr(t))throw oo("baddir","Directive/Component name '{0}' is invalid. The first character must be a lowercase letter",e);if(e!==e.trim())throw oo("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!li(t)&&y(t)&&r(t,function(e,n){var r=e.match(E),i=e.substring(r[0].length);i||(t[n]=r[0]+n)}),t}function c(e,t){if(e&&(!w(e)||!/[EACM]/.test(e)))throw oo("badrestrict","Restrict property '{0}' of directive '{1}' is invalid",e,t);return e||"EA"}var f={},$="Directive",b=/^\s*directive:\s*([\w-]+)\s+(.*)$/,x=/(([\w-]+)(?::([^;]+))?;?)/,_=I("ngSrc,ngSrcset,src,srcset"),E=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,S=/^(on[a-z]+|formaction)$/,A=$e();this.directive=function V(e,n){return fe(e,"name"),pe(e,"directive"),w(e)?(s(e),fe(n,"directiveFactory"),f.hasOwnProperty(e)||(f[e]=[],t.factory(e+$,["$injector","$exceptionHandler",function(t,n){var i=[];return r(f[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=c(a.restrict,e),a.$$moduleName=r.$$moduleName,i.push(a)}catch(s){n(s)}}),i}])),f[e].push(n)):r(e,o(V)),this},this.component=function(e,t){function n(e){function n(t){return k(t)||li(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:Et(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 m(e)?(n.aHrefSanitizationWhitelist(e),this):n.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(e){return m(e)?(n.imgSrcSanitizationWhitelist(e),this):n.imgSrcSanitizationWhitelist()};var O=!0;this.debugInfoEnabled=function(e){return m(e)?(O=e,this):O};var M=!1;this.preAssignBindingsEnabled=function(e){return m(e)?(M=e,this):M};var j=10;this.onChangesTtl=function(e){return arguments.length?(j=e,this):j};var P=!0;this.commentDirectivesEnabled=function(e){return arguments.length?(P=e,this):P};var D=!0;this.cssClassDirectivesEnabled=function(e){return arguments.length?(D=e,this):D},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate","$$sanitizeUri",function(t,n,i,o,s,u,c,g,A,V){function I(){try{if(!--Oe)throw _e=void 0,oo("infchng","{0} $onChanges() iterations reached. Aborting!\n",j);c.$apply(function(){for(var e=[],t=0,n=_e.length;t<n;++t)try{_e[t]()}catch(r){e.push(r)}if(_e=void 0,e.length)throw e})}finally{Oe++}}function F(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 R(e,t,n){Ee.innerHTML="<span "+t+">";var r=Ee.firstChild.attributes,i=r[0];r.removeNamedItem(i.name),i.value=n,e.attributes.setNamedItem(i)}function L(e,t){try{e.addClass(t)}catch(n){}}function B(e,t,n,r,i){e instanceof Jr||(e=Jr(e));var o=G(e,t,e,n,r,i);B.$$addScopeClass(e);var a=null;return function(t,n,r){if(!e)throw oo("multilink","This element has already been linked.");fe(t,"scope"),i&&i.needsNewScope&&(t=t.$parent.$new()),r=r||{};var s=r.parentBoundTranscludeFn,u=r.transcludeControllers,l=r.futureParentElement;s&&s.$$boundTransclude&&(s=s.$$boundTransclude),a||(a=W(l));var c;if(c="html"!==a?Jr(ge(a,Jr("<div>").append(e).html())):n?Ni.clone.call(e):e,u)for(var f in u)c.data("$"+f+"Controller",u[f].instance);return B.$$addScopeInfo(c,t),n&&n(c,t),o&&o(t,c,c,s),n||(e=o=null),c}}function W(e){var t=e&&e[0];return t&&"foreignobject"!==U(t)&&ri.call(t).match(/SVG/)?"svg":"html"}function G(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 $=n.length;for(g=new Array($),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(),B.$$addScopeInfo(Jr(s),u)):u=e,d=o.transcludeOnThisElement?K(e,o.transclude,i):!o.templateOnThisElement&&i?i:!i&&t?K(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=li(e)||e instanceof Jr,$=0;$<e.length;$++)s=new F,11===Yr&&X(e,$,g),u=Y(e[$],[],s,0===$?r:void 0,i),l=u.length?ne(u,e[$],s,t,n,null,[],[],o):null,l&&l.scope&&B.$$addScopeClass(s.$$element),f=l&&l.terminal||!(c=e[$].childNodes)||!c.length?null:G(c,l?(l.transcludeOnThisElement||!l.templateOnThisElement)&&l.transclude:t),(l||f)&&(h.push($,l,f),d=!0,p=p||l),o=null;return d?a:null}function X(e,t,n){var r,i=e[t],o=i.parentNode;if(i.nodeType===xi)for(;;){if(r=o?i.nextSibling:e[t+1],!r||r.nodeType!==xi)break;i.nodeValue=i.nodeValue+r.nodeValue,r.parentNode&&r.parentNode.removeChild(r),n&&r===e[t+1]&&e.splice(t+1,1)}}function K(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=$e();for(var o in t.$$slots)t.$$slots[o]?i[o]=K(e,t.$$slots[o],n):i[o]=null;return r}function Y(e,t,n,r,i){var o,a,s,u=e.nodeType,l=n.$attr;switch(u){case bi:a=U(e),ae(t,xt(a),"E",r,i);for(var c,f,d,p,h,g,$=e.attributes,v=0,m=$&&$.length;v<m;v++){var b=!1,_=!1;c=$[v],f=c.name,h=c.value,p=xt(f),g=Pe.test(p),g&&(f=f.replace(so,"").substr(8).replace(/_(.)/g,function(e,t){return t.toUpperCase()}));var k=p.match(De);k&&se(k[1])&&(b=f,_=f.substr(0,f.length-5)+"end",f=f.substr(0,f.length-6)),d=xt(f.toLowerCase()),l[d]=f,!g&&n.hasOwnProperty(d)||(n[d]=h,Je(e,d)&&(n[d]=!0)),me(e,t,h,d,g),ae(t,d,"A",r,i,b,_)}if("input"===a&&"hidden"===e.getAttribute("type")&&e.setAttribute("autocomplete","off"),!Ae)break;if(s=e.className,y(s)&&(s=s.animVal),w(s)&&""!==s)for(;o=x.exec(s);)d=xt(o[2]),ae(t,d,"C",r,i)&&(n[d]=fi(o[3])),s=s.substr(o.index+o[0].length);break;case xi:he(t,e.nodeValue);break;case _i:if(!Se)break;Z(e,t,n,r,i)}return t.sort(de),t}function Z(e,t,n,r,i){try{var o=b.exec(e.nodeValue);if(o){var a=xt(o[1]);ae(t,a,"M",r,i)&&(n[a]=fi(o[2]))}}catch(s){}}function Q(e,t,n){var r=[],i=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw oo("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);e.nodeType===bi&&(e.hasAttribute(t)&&i++,e.hasAttribute(n)&&i--),r.push(e),e=e.nextSibling}while(i>0)}else r.push(e);return Jr(r)}function ee(e,t,n){return function(r,i,o,a,s){return i=Q(i[0],t,n),e(r,i,o,a,s)}}function te(e,t,n,r,i,o){var a;return e?B(t,n,r,i,o):function(){return a||(a=B(t,n,r,i,o),t=n=o=null),a.apply(this,arguments)}}function ne(e,t,n,o,a,s,u,c,f){function d(e,t,n,r){e&&(n&&(e=ee(e,n,r)),e.require=h.require,e.directiveName=g,(E===h||h.$$isolateScope)&&(e=be(e,{isolateScope:!0})),u.push(e)),t&&(n&&(t=ee(t,n,r)),t.require=h.require,t.directiveName=g,(E===h||h.$$isolateScope)&&(t=be(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=b),n||(n=j?A.parent():A),!r)return f(e,t,i,n,N);var o=f.$$slots[r];if(o)return o(e,t,i,n,N);if(v(o))throw oo("noslot",'No parent directive that requires a transclusion with slot name "{0}". Element: {1}',r,J(A))}var p,h,g,$,m,b,w,A,O,T;t===a?(O=n,A=n.$$element):(A=Jr(a),O=new F(A,n)),m=o,E?$=o.$new(!0):x&&(m=o.$parent),f&&(w=d,w.$$boundTransclude=f,w.isSlotFilled=function(e){return!!f.$$slots[e]}),_&&(b=ie(A,O,w,_,$,o,E)),E&&(B.$$addScopeInfo(A,$,!0,!(S&&(S===E||S===E.$$originalDirective))),B.$$addScopeClass(A,!0),$.$$isolateBindings=E.$$isolateBindings,T=xe(o,O,$,$.$$isolateBindings,E),T.removeWatches&&$.$on("$destroy",T.removeWatches));for(var P in b){var D=_[P],V=b[P],I=D.$$bindings.bindToController;if(M){I?V.bindingInfo=xe(m,O,V.instance,I,D):V.bindingInfo={};var U=V();U!==V.instance&&(V.instance=U,A.data("$"+D.name+"Controller",U),V.bindingInfo.removeWatches&&V.bindingInfo.removeWatches(),V.bindingInfo=xe(m,O,V.instance,I,D))}else V.instance=V(),A.data("$"+D.name+"Controller",V.instance),V.bindingInfo=xe(m,O,V.instance,I,D)}for(r(_,function(e,t){var n=e.require;e.bindToController&&!li(n)&&y(n)&&l(b[t].instance,re(t,n,A,b))}),r(b,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)&&(m.$watch(function(){t.$doCheck()}),t.$doCheck()),k(t.$onDestroy)&&m.$on("$destroy",function(){t.$onDestroy()})}),p=0,h=u.length;p<h;p++)g=u[p],we(g,g.isolateScope?$:o,A,O,g.require&&re(g.directiveName,g.require,A,b),w);var N=o;for(E&&(E.template||null===E.templateUrl)&&(N=$),e&&e(N,a.childNodes,void 0,f),p=c.length-1;p>=0;p--)g=c[p],we(g,g.isolateScope?$:o,A,O,g.require&&re(g.directiveName,g.require,A,b),w);r(b,function(e){var t=e.instance;k(t.$postLink)&&t.$postLink()})}f=f||{};for(var h,g,$,m,b,w=-Number.MAX_VALUE,x=f.newScopeDirective,_=f.controllerDirectives,E=f.newIsolateScopeDirective,S=f.templateDirective,A=f.nonTlbTranscludeDirective,O=!1,T=!1,j=f.hasElementTranscludeDirective,P=n.$$element=Jr(t),D=s,V=o,I=!1,N=!1,R=0,z=e.length;R<z;R++){h=e[R];var L=h.$$start,W=h.$$end;if(L&&(P=Q(t,L,W)),$=void 0,w>h.priority)break;if(b=h.scope,b&&(h.templateUrl||(y(b)?(pe("new/isolated scope",E||x,h,P),E=h):pe("new/isolated scope",E,h,P)),x=x||h),g=h.name,!I&&(h.replace&&(h.templateUrl||h.template)||h.transclude&&!h.$$tlb)){for(var G,X=R+1;G=e[X++];)if(G.transclude&&!G.$$tlb||G.replace&&(G.templateUrl||G.template)){N=!0;break}I=!0}if(!h.templateUrl&&h.controller&&(_=_||$e(),pe("'"+g+"' controller",_[g],h,P),_[g]=h),b=h.transclude)if(O=!0,h.$$tlb||(pe("transclusion",A,h,P),A=h),"element"===b)j=!0,w=h.priority,$=P,P=n.$$element=Jr(B.$$createComment(g,n[g])),t=P[0],ye(a,H($),t),$[0].$$parentNode=$[0].parentNode,V=te(N,$,o,w,D&&D.name,{nonTlbTranscludeDirective:A});else{var K=$e();if(y(b)){$=[];var Z=$e(),ne=$e();r(b,function(e,t){var n="?"===e.charAt(0);e=n?e.substring(1):e,Z[e]=t,K[t]=null,ne[t]=n}),r(P.contents(),function(e){var t=Z[xt(U(e))];t?(ne[t]=!0,K[t]=K[t]||[],K[t].push(e)):$.push(e)}),r(ne,function(e,t){if(!e)throw oo("reqslot","Required transclusion slot `{0}` was not filled.",t)});for(var ae in K)K[ae]&&(K[ae]=te(N,K[ae],o))}else $=Jr(Ve(t)).contents();P.empty(),V=te(N,$,o,void 0,void 0,{needsNewScope:h.$$isolateScope||h.$$newScope}),V.$$slots=K}if(h.template)if(T=!0,pe("template",S,h,P),S=h,b=k(h.template)?h.template(P,n):h.template,b=je(b),h.replace){if(D=h,$=Ce(b)?[]:kt(ge(h.templateNamespace,fi(b))),t=$[0],1!==$.length||t.nodeType!==bi)throw oo("tplrt","Template for directive '{0}' must have exactly one root element. {1}",g,"");ye(a,P,t);var se={$attr:{}},le=Y(t,[],se),fe=e.splice(R+1,e.length-(R+1));(E||x)&&oe(le,E,x),e=e.concat(le).concat(fe),ue(n,se),z=e.length}else P.html(b);if(h.templateUrl)T=!0,pe("template",S,h,P),S=h,h.replace&&(D=h),p=ce(e.splice(R,e.length-R),P,n,a,O&&V,u,c,{controllerDirectives:_,newScopeDirective:x!==h&&x,newIsolateScopeDirective:E,templateDirective:S,nonTlbTranscludeDirective:A}),z=e.length;else if(h.compile)try{m=h.compile(P,n,V);var de=h.$$originalDirective||h;k(m)?d(null,q(de,m),L,W):m&&d(q(de,m.pre),q(de,m.post),L,W)}catch(he){i(he,J(P))}h.terminal&&(p.terminal=!0,w=Math.max(w,h.priority))}return p.scope=x&&x.scope===!0,p.transcludeOnThisElement=O,p.templateOnThisElement=T,p.transclude=V,f.hasElementTranscludeDirective=j,p}function re(e,t,n,i){var o;if(w(t)){var a=t.match(E),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 oo("ctreq","Controller '{0}', required by directive '{1}', can't be found!",s,e)}else if(li(t)){o=[];for(var f=0,d=t.length;f<d;f++)o[f]=re(e,t[f],n,i)}else y(t)&&(o={},r(t,function(t,r){o[r]=re(e,t,n,i)}));return o||null}function ie(e,t,n,r,i,o,a){var s=$e();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 oe(e,t,n){for(var r=0,i=e.length;r<i;r++)e[r]=d(e[r],{$$isolateScope:t,$$newScope:n})}function ae(e,n,r,i,o,s,u){if(n===o)return null;
|
4 |
+
var l=null;if(f.hasOwnProperty(n))for(var c,p=t.get(n+$),h=0,g=p.length;h<g;h++)if(c=p[h],(v(i)||i>c.priority)&&c.restrict.indexOf(r)!==-1){if(s&&(c=d(c,{$$start:s,$$end:u})),!c.$$bindings){var m=c.$$bindings=a(c,c.name);y(m.isolateScope)&&(c.$$isolateBindings=m.isolateScope)}e.push(c),l=c}return l}function se(e){if(f.hasOwnProperty(e))for(var n,r=t.get(e+$),i=0,o=r.length;i<o;i++)if(n=r[i],n.multiElement)return!0;return!1}function ue(e,t){var n=t.$attr,i=e.$attr;r(e,function(r,i){"$"!==i.charAt(0)&&(t[i]&&t[i]!==r&&(r.length?r+=("style"===i?";":" ")+t[i]:r=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 ce(e,t,n,a,s,u,l,c){var f,h,g=[],$=t[0],v=e.shift(),m=d(v,{templateUrl:null,transclude:null,replace:null,$$originalDirective:v}),b=k(v.templateUrl)?v.templateUrl(t,n):v.templateUrl,w=v.templateNamespace;return t.empty(),o(b).then(function(i){var o,d,p,x;if(i=je(i),v.replace){if(p=Ce(i)?[]:kt(ge(w,fi(i))),o=p[0],1!==p.length||o.nodeType!==bi)throw oo("tplrt","Template for directive '{0}' must have exactly one root element. {1}",v.name,b);d={$attr:{}},ye(a,t,o);var _=Y(o,[],d);y(v.scope)&&oe(_,!0),e=_.concat(e),ue(n,d)}else o=$,t.html(i);for(e.unshift(m),f=ne(e,o,n,s,t,v,u,l,c),r(a,function(e,n){e===o&&(a[n]=t[0])}),h=G(t[0].childNodes,s);g.length;){var k=g.shift(),E=g.shift(),S=g.shift(),C=g.shift(),A=t[0];if(!k.$$destroyed){if(E!==$){var O=E.className;c.hasElementTranscludeDirective&&v.replace||(A=Ve(o)),ye(S,Jr(E),A),L(Jr(A),O)}x=f.transcludeOnThisElement?K(k,f.transclude,C):C,f(h,k,A,a,x)}}g=null})["catch"](function(e){e instanceof Error&&i(e)})["catch"](p),function(e,t,n,r,i){var o=i;t.$$destroyed||(g?g.push(t,n,r,o):(f.transcludeOnThisElement&&(o=K(t,f.transclude,i)),f(h,t,n,r,o)))}}function de(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 pe(e,t,n,r){function i(e){return e?" (module: "+e+")":""}if(t)throw oo("multidir","Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}",t.name,i(t.$$moduleName),n.name,i(n.$$moduleName),e,J(r))}function he(e,t){var r=n(t,!0);r&&e.push({priority:0,compile:function(e){var t=e.parent(),n=!!t.length;return n&&B.$$addBindingClass(t),function(e,t){var i=t.parent();n||B.$$addBindingClass(i),B.$$addBindingInfo(i,r.expressions),e.$watch(r,function(e){t[0].nodeValue=e})}}})}function ge(t,n){switch(t=Wr(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 ve(e,t){if("srcdoc"===t)return g.HTML;var n=U(e);if("src"===t||"ngSrc"===t){if(["img","video","audio","source","track"].indexOf(n)===-1)return g.RESOURCE_URL}else if("xlinkHref"===t||"form"===n&&"action"===t||"link"===n&&"href"===t)return g.RESOURCE_URL}function me(e,t,r,i,o){var a=ve(e,i),s=!o,u=_[i]||o,l=n(r,s,a,u);if(l){if("multiple"===i&&"select"===U(e))throw oo("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",J(e));if(S.test(i))throw oo("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");t.push({priority:100,compile:function(){return{pre:function(e,t,o){var s=o.$$observers||(o.$$observers=$e()),c=o[i];c!==r&&(l=c&&n(c,!0,a,u),r=c),l&&(o[i]=l(e),(s[i]||(s[i]=[])).$$inter=!0,(o.$$observers&&o.$$observers[i].$$scope||e).$watch(l,function(e,t){"class"===i&&e!==t?o.$updateClass(e,t):o.$set(i,e)}))}}}})}}function ye(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(Jr.hasData(a)&&(Jr.data(r,Jr.data(a)),Jr(a).off("$destroy")),Jr.cleanData(d.querySelectorAll("*")),i=1;i<s;i++)delete n[i];n[0]=r,n.length=1}function be(e,t){return l(function(){return e.apply(null,arguments)},e,t)}function we(e,t,n,r,o,a){try{e(t,n,r,o,a)}catch(s){i(s,J(n))}}function xe(e,t,i,o,a){function u(t,n,r){!k(i.$onChanges)||n===r||n!==n&&r!==r||(_e||(e.$$postDigest(I),_e=[]),c||(c={},_e.push(l)),c[t]&&(r=c[t].previousValue),c[t]=new wt(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,y=r.mode;switch(y){case"@":m||Br.call(t,v)||(i[o]=t[v]=void 0),$=t.$observe(v,function(e){if(w(e)||T(e)){var t=i[o];u(o,e,t),i[o]=e}}),t.$$observers[v].$$scope=e,l=t[v],w(l)?i[o]=n(l)(e):T(l)&&(i[o]=l),d[o]=new wt(ao,i[o]),f.push($);break;case"=":if(!Br.call(t,v)){if(m)break;t[v]=void 0}if(m&&!t[v])break;c=s(t[v]),g=c.literal?z:function(e,t){return e===t||e!==e&&t!==t},h=c.assign||function(){throw l=i[o]=c(e),oo("nonassign","Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",t[v],v,a.name)},l=i[o]=c(e);var b=function(t){return g(t,i[o])||(g(t,l)?h(e,t=i[o]):i[o]=t),l=t};b.$stateful=!0,$=r.collection?e.$watchCollection(t[v],b):e.$watch(s(t[v],b),null,c.literal),f.push($);break;case"<":if(!Br.call(t,v)){if(m)break;t[v]=void 0}if(m&&!t[v])break;c=s(t[v]);var x=c.literal,_=i[o]=c(e);d[o]=new wt(ao,i[o]),$=e.$watch(c,function(e,t){if(t===e){if(t===_||x&&z(t,_))return;t=_}u(o,e,t),i[o]=e},x),f.push($);break;case"&":if(c=t.hasOwnProperty(v)?s(t[v]):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 _e,ke=/^\w/,Ee=e.document.createElement("div"),Se=P,Ae=D,Oe=j;F.prototype={$normalize:xt,$addClass:function(e){e&&e.length>0&&A.addClass(this.$$element,e)},$removeClass:function(e){e&&e.length>0&&A.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=_t(e,t);n&&n.length&&A.addClass(this.$$element,n);var r=_t(t,e);r&&r.length&&A.removeClass(this.$$element,r)},$set:function(e,t,n,o){var a,s=this.$$element[0],u=Je(s,e),l=Ze(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=le(e,"-"))),a=U(this.$$element),"a"===a&&("href"===e||"xlinkHref"===e)||"img"===a&&"src"===e)this[e]=t=V(t,"src"===e);else if("img"===a&&"srcset"===e&&m(t)){for(var f="",d=fi(t),p=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,h=/\s/.test(d)?p:/(,)/,g=d.split(h),$=Math.floor(g.length/2),y=0;y<$;y++){var b=2*y;f+=V(fi(g[b]),!0),f+=" "+fi(g[b+1])}var w=fi(g[2*y]).split(/\s/);f+=V(fi(w[0]),!0),2===w.length&&(f+=" "+fi(w[1])),this[e]=t=f}n!==!1&&(null===t||v(t)?this.$$element.removeAttr(o):ke.test(o)?this.$$element.attr(o,t):R(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=$e()),i=r[e]||(r[e]=[]);return i.push(t),c.$evalAsync(function(){i.$$inter||!n.hasOwnProperty(e)||v(n[e])||t(n[e])}),function(){N(i,t)}}};var Me=n.startSymbol(),Te=n.endSymbol(),je="{{"===Me&&"}}"===Te?h:function(e){return e.replace(/\{\{/g,Me).replace(/}}/g,Te)},Pe=/^ngAttr[A-Z]/,De=/^(.+)Start$/;return B.$$addBindingInfo=O?function(e,t){var n=e.data("$binding")||[];li(t)?n=n.concat(t):n.push(t),e.data("$binding",n)}:p,B.$$addBindingClass=O?function(e){L(e,"ng-binding")}:p,B.$$addScopeInfo=O?function(e,t,n,r){var i=n?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(i,t)}:p,B.$$addScopeClass=O?function(e,t){L(e,t?"ng-isolate-scope":"ng-scope")}:p,B.$$createComment=function(t,n){var r="";return O&&(r=" "+(t||"")+": ",n&&(r+=n+" ")),e.document.createComment(r)},B}]}function wt(e,t){this.previousValue=e,this.currentValue=t}function xt(e){return e.replace(so,"").replace(uo,Ee)}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 kt(e){e=Jr(e);var t=e.length;if(t<=1)return e;for(;t--;){var n=e[t];(n.nodeType===_i||n.nodeType===xi&&""===n.nodeValue.trim())&&ti.call(e,t,1)}return e}function Et(e,t){if(t&&w(t))return t;if(w(e)){var n=co.exec(e);if(n)return n[3]}}function St(){var e={},n=!1;this.has=function(t){return e.hasOwnProperty(t)},this.register=function(t,n){pe(t,"controller"),y(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||!y(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(co),!f)throw lo("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",t);if(d=f[1],p=p||f[3],t=e.hasOwnProperty(d)?e[d]:he(a.$scope,d,!0)||(n?he(i,d,!0):void 0),!t)throw lo("ctrlreg","The controller with the name '{0}' is not registered.",d);de(t,d,!0)}if(s){var h=(li(t)?t[t.length-1]:t).prototype;return c=Object.create(h||null),p&&o(a,p,c,d||t.name),l(function(){var e=r.invoke(t,c,a,d);return e!==c&&(y(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 Ct(){this.$get=["$window",function(e){return Jr(e.document)}]}function At(){this.$get=["$document","$rootScope",function(e,t){function n(){i=r.hidden}var r=e[0],i=r&&r.hidden;return e.on("visibilitychange",n),t.$on("$destroy",function(){e.off("visibilitychange",n)}),function(){return i}}]}function Ot(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function Mt(e){return y(e)?_(e)?e.toISOString():W(e):e}function Tt(){this.$get=function(){return function(e){if(!e)return"";var t=[];return i(e,function(e,n){null===e||v(e)||(li(e)?r(e,function(e){t.push(ne(n)+"="+ne(Mt(e)))}):t.push(ne(n)+"="+ne(Mt(e))))}),t.join("&")}}}function jt(){this.$get=function(){return function(e){function t(e,o,a){null===e||v(e)||(li(e)?r(e,function(e,n){t(e,o+"["+(y(e)?n:"")+"]")}):y(e)&&!_(e)?i(e,function(e,n){t(e,o+(a?"":"[")+n+(a?"":"]"))}):n.push(ne(o)+"="+ne(Mt(e))))}if(!e)return"";var n=[];return t(e,"",!0),n.join("&")}}}function Pt(e,t){if(w(e)){var n=e.replace(vo,"").trim();if(n){var r=t("Content-Type");(r&&0===r.indexOf(po)||Dt(n))&&(e=G(n))}}return e}function Dt(e){var t=e.match(go);return t&&$o[t[0]].test(e)}function Vt(e){function t(e,t){e&&(i[e]=i[e]?i[e]+", "+t:t)}var n,i=$e();return w(e)?r(e.split("\n"),function(e){n=e.indexOf(":"),t(Wr(fi(e.substr(0,n))),fi(e.substr(n+1)))}):y(e)&&r(e,function(e,n){t(Wr(n),fi(e))}),i}function It(e){var t;return function(n){if(t||(t=Vt(e)),n){var r=t[Wr(n)];return void 0===r&&(r=null),r}return t}}function Ut(e,t,n,i){return k(i)?i(e,t,n):(r(i,function(r){e=r(e,t,n)}),e)}function Ft(e){return 200<=e&&e<300}function Nt(){var e=this.defaults={transformResponse:[Pt],transformRequest:[function(e){return!y(e)||A(e)||M(e)||O(e)?e:W(e)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ye(ho),put:ye(ho),patch:ye(ho)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer",jsonpCallbackParam:"callback"},n=!1;this.useApplyAsync=function(e){return m(e)?(n=!!e,this):n};var i=this.interceptors=[];this.$get=["$browser","$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector","$sce",function(o,a,s,u,c,f,d,h){function g(n){function i(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(){o.$$completeOutstandingRequest(p)}function s(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 u(t){var n,r,i,o=e.headers,a=l({},t.headers);o=l({},o.common,o[Wr(t.method)]);e:for(n in o){r=Wr(n);for(i in a)if(Wr(i)===r)continue e;a[n]=o[n]}return s(a,ye(t))}function c(t){var n=t.headers,i=Ut(t.data,It(n),void 0,t.transformRequest);return v(i)&&r(n,function(e,t){"content-type"===Wr(t)&&delete n[t]}),v(t.withCredentials)&&!v(e.withCredentials)&&(t.withCredentials=e.withCredentials),x(t,i).then(g,g)}function g(e){var t=l({},e);return t.data=Ut(e.data,e.headers,e.status,$.transformResponse),Ft(e.status)?t:f.reject(t)}if(!y(n))throw t("$http")("badreq","Http request configuration must be an object. Received: {0}",n);if(!w(h.valueOf(n.url)))throw t("$http")("badreq","Http request configuration url must be a string or a $sce trusted object. Received: {0}",n.url);var $=l({method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse,paramSerializer:e.paramSerializer,jsonpCallbackParam:e.jsonpCallbackParam},n);$.headers=u(n),$.method=Gr($.method),$.paramSerializer=w($.paramSerializer)?d.get($.paramSerializer):$.paramSerializer,o.$$incOutstandingRequestCount();var m=[],b=[],_=f.resolve($);return r(C,function(e){(e.request||e.requestError)&&m.unshift(e.request,e.requestError),(e.response||e.responseError)&&b.push(e.response,e.responseError)}),_=i(_,m),_=_.then(c),_=i(_,b),_=_["finally"](a)}function $(e){r(arguments,function(e){g[e]=function(t,n){return g(l({},n||{},{method:e,url:t}))}})}function b(e){r(arguments,function(e){g[e]=function(t,n,r){return g(l({},r||{},{method:e,url:t,data:n}))}})}function x(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)}$&&(Ft(e)?$.put(O,[e,t,Vt(r),i]):$.remove(O)),n?c.$applyAsync(o):(o(),c.$$phase||c.$apply())}function l(e,n,r,i){n=n>=-1?n:0,(Ft(n)?x.resolve:x.reject)({data:e,status:n,headers:It(r),config:t,statusText:i})}function d(e){l(e.data,e.status,ye(e.headers()),e.statusText)}function p(){var e=g.pendingRequests.indexOf(t);e!==-1&&g.pendingRequests.splice(e,1)}var $,b,x=f.defer(),k=x.promise,C=t.headers,A="jsonp"===Wr(t.method),O=t.url;if(A?O=h.getTrustedResourceUrl(O):w(O)||(O=h.valueOf(O)),O=_(O,t.paramSerializer(t.params)),A&&(O=E(O,t.jsonpCallbackParam)),g.pendingRequests.push(t),k.then(p,p),!t.cache&&!e.cache||t.cache===!1||"GET"!==t.method&&"JSONP"!==t.method||($=y(t.cache)?t.cache:y(e.cache)?e.cache:S),$&&(b=$.get(O),m(b)?j(b)?b.then(d,d):li(b)?l(b[1],b[0],ye(b[2]),b[3]):l(b,200,{},"OK"):$.put(O,k)),v(b)){var M=Fn(t.url)?s()[t.xsrfCookieName||e.xsrfCookieName]:void 0;M&&(C[t.xsrfHeaderName||e.xsrfHeaderName]=M),a(t.method,O,i,u,C,t.timeout,t.withCredentials,t.responseType,o(t.eventHandlers),o(t.uploadEventHandlers))}return k}function _(e,t){return t.length>0&&(e+=(e.indexOf("?")===-1?"?":"&")+t),e}function E(e,t){if(/[&?][^=]+=JSON_CALLBACK/.test(e))throw mo("badjsonp",'Illegal use of JSON_CALLBACK in url, "{0}"',e);var n=new RegExp("[&?]"+t+"=");if(n.test(e))throw mo("badjsonp",'Illegal use of callback param, "{0}", in url, "{1}"',t,e);return e+=(e.indexOf("?")===-1?"?":"&")+t+"=JSON_CALLBACK"}var S=u("$http");e.paramSerializer=w(e.paramSerializer)?d.get(e.paramSerializer):e.paramSerializer;var C=[];return r(i,function(e){C.unshift(w(e)?d.get(e):d.invoke(e))}),g.pendingRequests=[],$("get","delete","head","jsonp"),b("post","put","patch"),g.defaults=e,g}]}function Rt(){this.$get=function(){return function(){return new e.XMLHttpRequest}}}function zt(){this.$get=["$browser","$jsonpCallbacks","$document","$xhrFactory",function(e,t,n,r){return Lt(e,r,e.defer,t,n[0])}]}function Lt(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){r.removeEventListener("load",a),r.removeEventListener("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)},r.addEventListener("load",a),r.addEventListener("error",a),o.body.appendChild(r),a}return function(o,s,u,l,c,f,d,p,h,g){function $(){w&&w(),x&&x.abort()}function y(e,t,r,i,o){m(E)&&n.cancel(E),w=x=null,e(t,r,i,o)}if(s=s||e.url(),"jsonp"===Wr(o))var b=i.createCallback(s),w=a(s,b,function(e,t){var n=200===e&&i.getResponse(b);y(l,e,n,"",t),i.removeCallback(b)});else{var x=t(o,s);x.open(o,s,!0),r(c,function(e,t){m(e)&&x.setRequestHeader(t,e)}),x.onload=function(){var e=x.statusText||"",t="response"in x?x.response:x.responseText,n=1223===x.status?204:x.status;0===n&&(n=t?200:"file"===Un(s).protocol?404:0),y(l,n,t,x.getAllResponseHeaders(),e)};var _=function(){y(l,-1,null,null,"")};if(x.onerror=_,x.onabort=_,x.ontimeout=_,r(h,function(e,t){x.addEventListener(t,e)}),r(g,function(e,t){x.upload.addEventListener(t,e)}),d&&(x.withCredentials=!0),p)try{x.responseType=p}catch(k){if("json"!==p)throw k}x.send(v(u)?null:u)}if(f>0)var E=n($,f);else j(f)&&f.then($)}}function Ht(){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(d,e).replace(p,t)}function s(e,t,n,r){var i=e.$watch(function(e){return i(),r(e)},t,n);return i}function u(o,u,d,p){function h(e){try{return e=T(e),p&&!m(e)?e:ve(e)}catch(t){r(yo.interr(o,t))}}if(!o.length||o.indexOf(e)===-1){var $;if(!u){var y=a(o);$=g(y),$.exp=o,$.expressions=[],$.$$watchDelegate=s}return $}p=!!p;for(var b,w,x,_=0,E=[],S=[],C=o.length,A=[],O=[];_<C;){if((b=o.indexOf(e,_))===-1||(w=o.indexOf(t,b+c))===-1){_!==C&&A.push(a(o.substring(_)));break}_!==b&&A.push(a(o.substring(_,b))),x=o.substring(b+c,w),E.push(x),S.push(n(x,h)),_=w+f,O.push(A.length),A.push("")}if(d&&A.length>1&&yo.throwNoconcat(o),!u||E.length){var M=function(e){for(var t=0,n=E.length;t<n;t++){if(p&&v(e[t]))return;A[O[t]]=e[t]}return A.join("")},T=function(e){return d?i.getTrusted(d,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]=S[t](e);return M(i)}catch(a){r(yo.interr(o,a))}},{exp:o,expressions:E,$$watchDelegate:function(e,t){var n;return e.$watchGroup(S,function(r,i){var o=M(r);k(t)&&t.call(this,o,r!==i?n:o,e),n=o})}})}}var c=e.length,f=t.length,d=new RegExp(e.replace(/./g,o),"g"),p=new RegExp(t.replace(/./g,o),"g");return u.startSymbol=function(){return e},u.endSymbol=function(){return t},u}]}function qt(){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?H(arguments,4):[],p=t.setInterval,h=t.clearInterval,g=0,$=m(l)&&!l,v=($?r:n).defer(),y=v.promise;return u=m(u)?u:0,y.$$intervalId=p(function(){$?i.defer(c):e.$evalAsync(c),v.notify(g++),u>0&&g>=u&&(v.resolve(g),h(y.$$intervalId),delete a[y.$$intervalId]),$||e.$apply()},s),a[y.$$intervalId]=v,y}var a={};return o.cancel=function(e){return!!(e&&e.$$intervalId in a)&&(a[e.$$intervalId].promise["catch"](p),a[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete a[e.$$intervalId],!0)},o}]}function Bt(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=te(t[n]);return t.join("/")}function Wt(e,t){var n=Un(e);t.$$protocol=n.protocol,t.$$host=n.hostname,t.$$port=f(n.port)||xo[n.protocol]||null}function Gt(e,t){if(ko.test(e))throw _o("badpath",'Invalid url "{0}".',e);var n="/"!==e.charAt(0);n&&(e="/"+e);var r=Un(e);t.$$path=decodeURIComponent(n&&"/"===r.pathname.charAt(0)?r.pathname.substring(1):r.pathname),t.$$search=Q(r.search),t.$$hash=decodeURIComponent(r.hash),t.$$path&&"/"!==t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function Xt(e,t){return e.slice(0,t.length)===t}function Kt(e,t){if(Xt(t,e))return t.substr(e.length)}function Yt(e){var t=e.indexOf("#");return t===-1?e:e.substr(0,t)}function Jt(e){return e.replace(/(#.+)|#$/,"$1")}function Zt(e){return e.substr(0,Yt(e).lastIndexOf("/")+1)}function Qt(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function en(e,t,n){this.$$html5=!0,n=n||"",Wt(e,this),this.$$parse=function(e){var n=Kt(t,e);if(!w(n))throw _o("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',e,t);Gt(n,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=ee(this.$$search),n=this.$$hash?"#"+te(this.$$hash):"";this.$$url=Bt(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=Kt(e,r))?(a=o,s=n&&m(o=Kt(n,o))?t+(Kt("/",o)||o):e+a):m(o=Kt(t,r))?s=t+o:t===r+"/"&&(s=t),s&&this.$$parse(s),!!s}}function tn(e,t,n){Wt(e,this),this.$$parse=function(r){function i(e,t,n){var r,i=/^\/[A-Z]:(\/.*)/;return Xt(t,n)&&(t=t.replace(n,"")),i.exec(t)?e:(r=i.exec(e),r?r[1]:e)}var o,a=Kt(e,r)||Kt(t,r);v(a)||"#"!==a.charAt(0)?this.$$html5?o=a:(o="",v(a)&&(e=r,this.replace())):(o=Kt(n,a),v(o)&&(o=a)),Gt(o,this),this.$$path=i(this.$$path,o,e),this.$$compose()},this.$$compose=function(){var t=ee(this.$$search),r=this.$$hash?"#"+te(this.$$hash):"";this.$$url=Bt(this.$$path)+(t?"?"+t:"")+r,this.$$absUrl=e+(this.$$url?n+this.$$url:"")},this.$$parseLinkUrl=function(t,n){return Yt(e)===Yt(t)&&(this.$$parse(t),!0)}}function nn(e,t,n){this.$$html5=!0,tn.apply(this,arguments),this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var o,a;return e===Yt(r)?o=r:(a=Kt(t,r))?o=e+n+a:t===r+"/"&&(o=t),o&&this.$$parse(o),!!o},this.$$compose=function(){var t=ee(this.$$search),r=this.$$hash?"#"+te(this.$$hash):"";this.$$url=Bt(this.$$path)+(t?"?"+t:"")+r,this.$$absUrl=e+n+this.$$url}}function rn(e){return function(){return this[e]}}function on(e,t){return function(n){return v(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function an(){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 T(e)?(t.enabled=e,this):y(e)?(T(e.enabled)&&(t.enabled=e.enabled),T(e.requireBase)&&(t.requireBase=e.requireBase),(T(e.rewriteLinks)||w(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 _o("nobase","$location in HTML5 mode requires a <base> tag to be present!");f=Qt(p)+(d||"/"),c=i.history?en:nn}else f=Yt(p),c=tn;var h=Zt(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){var i=t.rewriteLinks;if(i&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&2!==e.which&&2!==e.button){for(var s=Jr(e.target);"a"!==U(s[0]);)if(s[0]===o[0]||!(s=s.parent())[0])return;if(!w(i)||!v(s.attr(i))){var u=s.prop("href"),c=s.attr("href")||s.attr("xlink:href");y(u)&&"[object SVGAnimatedString]"===u.toString()&&(u=Un(u.animVal).href),g.test(u)||!u||s.attr("target")||e.isDefaultPrevented()||l.$$parseLinkUrl(u,c)&&(e.preventDefault(),l.absUrl()!==r.url()&&(n.$apply(),a.angular["ff-684208-preventDefault"]=!0))}}}),Jt(l.absUrl())!==Jt(p)&&r.url(l.absUrl(),!0);var $=!0;return r.onUrlChange(function(e,t){return Xt(e,h)?(n.$evalAsync(function(){var r,i=l.absUrl(),o=l.$$state;e=Jt(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)):($=!1,u(i,o)))}),void(n.$$phase||n.$digest())):void(a.location.href=e)}),n.$watch(function(){var e=Jt(r.url()),t=Jt(l.absUrl()),o=r.state(),a=l.$$replace,c=e!==t||l.$$html5&&i.history&&o!==l.$$state;($||c)&&($=!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 sn(){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 un(e){return e+""}function ln(e,t){return"undefined"!=typeof e?e:t}function cn(e,t){return"undefined"==typeof e?t:"undefined"==typeof t?e:e+t}function fn(e,t){var n=e(t);return!n.$stateful}function dn(e,t){var n,i,o;switch(e.type){case To.Program:n=!0,r(e.body,function(e){dn(e.expression,t),n=n&&e.expression.constant}),e.constant=n;break;case To.Literal:e.constant=!0,e.toWatch=[];break;case To.UnaryExpression:dn(e.argument,t),e.constant=e.argument.constant,e.toWatch=e.argument.toWatch;break;case To.BinaryExpression:dn(e.left,t),dn(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.left.toWatch.concat(e.right.toWatch);break;case To.LogicalExpression:dn(e.left,t),dn(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.constant?[]:[e];break;case To.ConditionalExpression:dn(e.test,t),dn(e.alternate,t),dn(e.consequent,t),e.constant=e.test.constant&&e.alternate.constant&&e.consequent.constant,e.toWatch=e.constant?[]:[e];break;case To.Identifier:e.constant=!1,e.toWatch=[e];break;case To.MemberExpression:dn(e.object,t),e.computed&&dn(e.property,t),e.constant=e.object.constant&&(!e.computed||e.property.constant),e.toWatch=[e];break;case To.CallExpression:o=!!e.filter&&fn(t,e.callee.name),n=o,i=[],r(e.arguments,function(e){dn(e,t),n=n&&e.constant,e.constant||i.push.apply(i,e.toWatch)}),e.constant=n,e.toWatch=o?i:[e];break;case To.AssignmentExpression:dn(e.left,t),dn(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=[e];break;case To.ArrayExpression:n=!0,i=[],r(e.elements,function(e){dn(e,t),n=n&&e.constant,e.constant||i.push.apply(i,e.toWatch)}),e.constant=n,e.toWatch=i;break;case To.ObjectExpression:n=!0,i=[],r(e.properties,function(e){dn(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 To.ThisExpression:e.constant=!1,e.toWatch=[];break;case To.LocalsExpression:e.constant=!1,e.toWatch=[]}}function pn(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 hn(e){return e.type===To.Identifier||e.type===To.MemberExpression}function gn(e){if(1===e.body.length&&hn(e.body[0].expression))return{type:To.AssignmentExpression,left:e.body[0].expression,right:{type:To.NGValueParameter},operator:"="}}function $n(e){return 0===e.body.length||1===e.body.length&&(e.body[0].expression.type===To.Literal||e.body[0].expression.type===To.ArrayExpression||e.body[0].expression.type===To.ObjectExpression)}function vn(e){return e.constant}function mn(e,t){this.astBuilder=e,this.$filter=t}function yn(e,t){this.astBuilder=e,this.$filter=t}function bn(e){return k(e.valueOf)?e.valueOf():Co.call(e)}function wn(){var e,t,n=$e(),i={"true":!0,"false":!1,"null":null,undefined:void 0};this.addLiteral=function(e,t){i[e]=t},this.setIdentifierFns=function(n,r){return e=n,t=r,this},this.$get=["$filter",function(o){function a(e,t){var r,i,a;switch(typeof e){case"string":if(e=e.trim(),a=e,r=n[a],!r){":"===e.charAt(0)&&":"===e.charAt(1)&&(i=!0,e=e.substring(2));var s=new Mo(g),h=new jo(s,o,g);r=h.parse(e),r.constant?r.$$watchDelegate=f:i?r.$$watchDelegate=r.literal?c:l:r.inputs&&(r.$$watchDelegate=u),n[a]=r}return d(r,t);case"function":return d(e,t);default:return d(p,t)}}function s(e,t){return null==e||null==t?e===t:("object"!=typeof e||(e=bn(e),"object"!=typeof e))&&(e===t||e!==e&&t!==t)}function u(e,t,n,r,i){var o,a=r.inputs;if(1===a.length){var u=s;return a=a[0],e.$watch(function(e){var t=a(e);return s(t,u)||(o=r(e,void 0,void 0,[t]),u=t&&bn(t)),o},t,n,i)}for(var l=[],c=[],f=0,d=a.length;f<d;f++)l[f]=s,c[f]=null;return e.$watch(function(e){for(var t=!1,n=0,i=a.length;n<i;n++){var u=a[n](e);(t||(t=!s(u,l[n])))&&(c[n]=u,l[n]=u&&bn(u))}return t&&(o=r(e,void 0,void 0,c)),o},t,n,i)}function l(e,t,n,r,i){function o(e){return r(e)}function a(e,n,r){l=e,k(t)&&t(e,n,r),m(e)&&r.$$postDigest(function(){m(l)&&s()})}var s,l;return s=r.inputs?u(e,a,n,r,i):e.$watch(o,a,n)}function c(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,k(t)&&t(e,n,r),o(e)&&r.$$postDigest(function(){o(s)&&a()})},n)}function f(e,t,n,r){var i=e.$watch(function(e){return i(),r(e)},t,n);return i}function d(e,t){if(!t)return e;var n=e.$$watchDelegate,r=!1,i=n!==c&&n!==l,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 r=!e.inputs,e.$$watchDelegate&&e.$$watchDelegate!==u?(o.$$watchDelegate=e.$$watchDelegate,o.inputs=e.inputs):t.$stateful||(o.$$watchDelegate=u,o.inputs=e.inputs?e.inputs:[e]),o}var h=pi().noUnsafeEval,g={csp:h,literals:R(i),isIdentifierStart:k(e)&&e,isIdentifierContinue:k(t)&&t};return a}]}function xn(){var e=!0;this.$get=["$rootScope","$exceptionHandler",function(t,n){return kn(function(e){t.$evalAsync(e)},n,e)}],this.errorOnUnhandledRejections=function(t){return m(t)?(e=t,this):e}}function _n(){var e=!0;this.$get=["$browser","$exceptionHandler",function(t,n){return kn(function(e){t.defer(e)},n,e)}],this.errorOnUnhandledRejections=function(t){return m(t)?(e=t,this):e}}function kn(e,n,i){function o(){return new a}function a(){var e=this.promise=new s;this.resolve=function(t){d(e,t)},this.reject=function(t){h(e,t)},this.notify=function(t){$(e,t)}}function s(){this.$$state={status:0}}function u(t){var n,r,o;o=t.pending,t.processScheduled=!1,t.pending=void 0;try{for(var a=0,s=o.length;a<s;++a){t.pur=!0,r=o[a][0],n=o[a][t.status];try{k(n)?d(r,n(t.value)):1===t.status?d(r,t.value):h(r,t.value)}catch(u){h(r,u)}}}finally{--C,i&&0===C&&e(c)}}function c(){for(;!C&&A.length;){var e=A.shift();if(!e.pur){e.pur=!0;var t="Possibly unhandled rejection: "+we(e.value);e.value instanceof Error?n(e.value,t):n(t)}}}function f(t){!i||t.pending||2!==t.status||t.pur||(0===C&&0===A.length&&e(c),A.push(t)),!t.processScheduled&&t.pending&&(t.processScheduled=!0,++C,e(function(){u(t)}))}function d(e,t){e.$$state.status||(t===e?g(e,S("qcycle","Expected promise to be resolved with value other than itself '{0}'",t)):p(e,t))}function p(e,t){function n(t){a||(a=!0,p(e,t))}function r(t){a||(a=!0,g(e,t))}function i(t){$(e,t)}var o,a=!1;try{(y(t)||k(t))&&(o=t.then),k(o)?(e.$$state.status=-1,o.call(t,n,r,i)):(e.$$state.value=t,e.$$state.status=1,f(e.$$state))}catch(s){r(s)}}function h(e,t){e.$$state.status||g(e,t)}function g(e,t){e.$$state.value=t,e.$$state.status=2,f(e.$$state)}function $(t,r){var i=t.$$state.pending;t.$$state.status<=0&&i&&i.length&&e(function(){for(var e,t,o=0,a=i.length;o<a;o++){t=i[o][0],e=i[o][3];try{$(t,k(e)?e(r):r)}catch(s){n(s)}}})}function m(e){var t=new s;return h(t,e),t}function b(e,t,n){var r=null;try{k(n)&&(r=n())}catch(i){return m(i)}return j(r)?r.then(function(){return t(e)},m):t(e)}function w(e,t,n,r){var i=new s;return d(i,e),i.then(t,n,r)}function x(e){var t=new s,n=0,i=li(e)?[]:{};return r(e,function(e,r){n++,w(e).then(function(e){i[r]=e,--n||d(t,i)},function(e){h(t,e)})}),0===n&&d(t,i),t}function _(e){var t=o();return r(e,function(e){w(e).then(t.resolve,t.reject)}),t.promise}function E(e){function t(e){d(r,e)}function n(e){h(r,e)}if(!k(e))throw S("norslvr","Expected resolverFn, got '{0}'",e);var r=new s;return e(t,n),r}var S=t("$q",TypeError),C=0,A=[];l(s.prototype,{then:function(e,t,n){if(v(e)&&v(t)&&v(n))return this;var r=new s;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,e,t,n]),this.$$state.status>0&&f(this.$$state),r},"catch":function(e){return this.then(null,e)},"finally":function(e,t){return this.then(function(t){return b(t,O,e);
|
5 |
+
},function(t){return b(t,m,e)},t)}});var O=w;return E.prototype=s.prototype,E.defer=o,E.reject=m,E.when=w,E.resolve=O,E.all=x,E.race=_,E}function En(){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===Yr&&(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(E.$$phase)throw o("inprog","{0} already in progress",E.$$phase);E.$$phase=e}function $(){E.$$phase=null}function m(e,t){do e.$$watchersCount+=t;while(e=e.$parent)}function b(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(){E.$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.$$digestWatchIndex=-1),a.unshift(u),a.$$digestWatchIndex++,m(this,1),function(){var e=N(a,u);e>=0&&(m(o,-1),e<a.$$digestWatchIndex&&a.$$digestWatchIndex--),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(!v(o)){if(y(o))if(n(o)){a!==p&&(a=p,$=a.length=0,f++),t=o.length,$!==t&&(f++,a.length=$=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={},$=0,f++),t=0;for(r in o)Br.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)):($++,a[r]=s,f++));if($>t){f++;for(r in a)Br.call(o,r)||($--,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(y(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)Br.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,$=0;return this.$watch(d,i)},$digest:function(){var e,n,r,a,l,f,d,p,h,v,m,y=i,b=this,_=[];g("$digest"),c.$$checkUrlChange(),this===E&&null!==u&&(c.defer.cancel(u),x()),s=null;do{d=!1,h=b;for(var A=0;A<S.length;A++){try{m=S[A],m.scope.$eval(m.expression,m.locals)}catch(M){t(M)}s=null}S.length=0;e:do{if(f=h.$$watchers)for(f.$$digestWatchIndex=f.length;f.$$digestWatchIndex--;)try{if(e=f[f.$$digestWatchIndex])if(l=e.get,(n=l(h))===(r=e.last)||(e.eq?z(n,r):ui(n)&&ui(r))){if(e===s){d=!1;break e}}else d=!0,s=e,e.last=e.eq?R(n,null):n,a=e.fn,a(n,r===w?n:r,h),y<5&&(v=4-y,_[v]||(_[v]=[]),_[v].push({msg:k(e.exp)?"fn: "+(e.exp.name||e.exp.toString()):e.exp,newVal:n,oldVal:r}))}catch(M){t(M)}if(!(p=h.$$watchersCount&&h.$$childHead||h!==b&&h.$$nextSibling))for(;h!==b&&!(p=h.$$nextSibling);)h=h.$parent}while(h=p);if((d||S.length)&&!y--)throw $(),o("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",i,_)}while(d||S.length);for($();O<C.length;)try{C[O++]()}catch(M){t(M)}C.length=O=0},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this===E&&c.$$applicationDestroyed(),m(this,-this.$$watchersCount);for(var t in this.$$listenerCount)b(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){E.$$phase||S.length||c.defer(function(){S.length&&E.$digest()}),S.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{$()}}catch(n){t(n)}finally{try{E.$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,b(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=L([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=L([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 E=new h,S=E.$$asyncQueue=[],C=E.$$postDigestQueue=[],A=E.$$applyAsyncQueue=[],O=0;return E}]}function Cn(){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=Un(n).href,""===i||i.match(o)?n:"unsafe:"+i}}}function An(e){return e.replace(Vo,Ee)}function On(e){if("self"===e)return e;if(w(e)){if(e.indexOf("***")>-1)throw Po("iwcard","Illegal sequence *** in string matcher. String: {0}",e);return e=di(e).replace(/\\\*\\\*/g,".*").replace(/\\\*/g,"[^:/.?&;]*"),new RegExp("^"+e+"$")}if(E(e))return new RegExp("^"+e.source+"$");throw Po("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Mn(e){var t=[];return m(e)&&r(e,function(e){t.push(On(e))}),t}function Tn(){this.SCE_CONTEXTS=Do;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=Mn(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=Mn(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=Un(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 Po("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||v(t)||""===t)return t;if("string"!=typeof t)throw Po("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||v(t)||""===t)return t;var n=f.hasOwnProperty(e)?f[e]:null;if(n&&t instanceof n)return t.$$unwrapTrustedValue();if(e===Do.RESOURCE_URL){if(i(t))return t;throw Po("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",t.toString())}if(e===Do.HTML)return l(t);throw Po("unsafe","Attempting to use an unsafe value in a safe context.")}var l=function(e){throw Po("unsafe","Attempting to use an unsafe value in a safe context.")};n.has("$sanitize")&&(l=n.get("$sanitize"));var c=o(),f={};return f[Do.HTML]=o(c),f[Do.CSS]=o(c),f[Do.URL]=o(c),f[Do.JS]=o(c),f[Do.RESOURCE_URL]=o(f[Do.URL]),{trustAs:a,getTrusted:u,valueOf:s}}]}function jn(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$sceDelegate",function(t,n){if(e&&Yr<8)throw Po("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=ye(Do);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(Do,function(e,t){var n=Wr(t);i[An("parse_as_"+n)]=function(t){return o(e,t)},i[An("get_trusted_"+n)]=function(t){return a(e,t)},i[An("trust_as_"+n)]=function(t){return s(e,t)}}),i}]}function Pn(){this.$get=["$window","$document",function(e,t){var n={},r=e.chrome&&(e.chrome.app&&e.chrome.app.runtime||!e.chrome.app&&e.chrome.runtime&&e.chrome.runtime.id),i=!r&&e.history&&e.history.pushState,o=f((/android (\d+)/.exec(Wr((e.navigator||{}).userAgent))||[])[1]),a=/Boxee/i.test((e.navigator||{}).userAgent),s=t[0]||{},u=s.body&&s.body.style,l=!1,c=!1;return u&&(l=!!("transition"in u||"webkitTransition"in u),c=!!("animation"in u||"webkitAnimation"in u)),{history:!(!i||o<4||a),hasEvent:function(e){if("input"===e&&Yr)return!1;if(v(n[e])){var t=s.createElement("div");n[e]="on"+e in t}return n[e]},csp:pi(),transitions:l,animations:c,android:o}}]}function Dn(){var e;this.httpOptions=function(t){return t?(e=t,this):e},this.$get=["$exceptionHandler","$templateCache","$http","$q","$sce",function(t,n,r,i,o){function a(s,u){function c(e){return u||(e=Io("tpload","Failed to load template: {0} (HTTP status: {1} {2})",s,e.status,e.statusText),t(e)),i.reject(e)}a.totalPendingRequests++,w(s)&&!v(n.get(s))||(s=o.getTrustedResourceUrl(s));var f=r.defaults&&r.defaults.transformResponse;return li(f)?f=f.filter(function(e){return e!==Pt}):f===Pt&&(f=null),r.get(s,l({cache:n,transformResponse:f},e))["finally"](function(){a.totalPendingRequests--}).then(function(e){return n.put(s,e.data),e.data},c)}return a.totalPendingRequests=0,a}]}function Vn(){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=ai.element(e).data("$binding");i&&r(i,function(r){if(n){var i=new RegExp("(^|\\s)"+di(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 In(){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=H(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].promise["catch"](p),a[e.$$timeoutId].reject("canceled"),delete a[e.$$timeoutId],t.defer.cancel(e.$$timeoutId))},o}]}function Un(e){var t=e;return Yr&&(Uo.setAttribute("href",t),t=Uo.href),Uo.setAttribute("href",t),{href:Uo.href,protocol:Uo.protocol?Uo.protocol.replace(/:$/,""):"",host:Uo.host,search:Uo.search?Uo.search.replace(/^\?/,""):"",hash:Uo.hash?Uo.hash.replace(/^#/,""):"",hostname:Uo.hostname,port:Uo.port,pathname:"/"===Uo.pathname.charAt(0)?Uo.pathname:"/"+Uo.pathname}}function Fn(e){var t=w(e)?Un(e):e;return t.protocol===Fo.protocol&&t.host===Fo.host}function Nn(){this.$get=g(e)}function Rn(e){function t(e){try{return e.cookie||""}catch(t){return""}}function n(e){try{return decodeURIComponent(e)}catch(t){return e}}var r=e[0]||{},i={},o="";return function(){var e,a,s,u,l,c=t(r);if(c!==o)for(o=c,e=o.split("; "),i={},s=0;s<e.length;s++)a=e[s],u=a.indexOf("="),u>0&&(l=n(a.substring(0,u)),v(i[l])&&(i[l]=n(a.substring(u+1))));return i}}function zn(){this.$get=Rn}function Ln(e){function t(i,o){if(y(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",Gn),t("date",ur),t("filter",Hn),t("json",lr),t("limitTo",cr),t("lowercase",Bo),t("number",Xn),t("orderBy",dr),t("uppercase",Wo)}function Hn(){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=Wn(r);switch(u){case"function":a=r;break;case"boolean":case"null":case"number":case"string":s=!0;case"object":a=qn(r,i,o,s);break;default:return e}return Array.prototype.filter.call(e,a)}}function qn(e,t,n,r){var i,o=y(e)&&n in e;return t===!0?t=z:k(t)||(t=function(e,t){return!v(e)&&(null===e||null===t?e===t:!(y(t)||y(e)&&!$(e))&&(e=Wr(""+e),t=Wr(""+t),e.indexOf(t)!==-1))}),i=function(i){return o&&!y(i)?Bn(i,e[n],t,n,!1):Bn(i,e,t,n,r)}}function Bn(e,t,n,r,i,o){var a=Wn(e),s=Wn(t);if("string"===s&&"!"===t.charAt(0))return!Bn(e,t.substring(1),n,r,i);if(li(e))return e.some(function(e){return Bn(e,t,n,r,i)});switch(a){case"object":var u;if(i){for(u in e)if("$"!==u.charAt(0)&&Bn(e[u],t,n,r,!0))return!0;return!o&&Bn(e,t,n,r,!1)}if("object"===s){for(u in t){var l=t[u];if(!k(l)&&!v(l)){var c=u===r,f=c?e:e[u];if(!Bn(f,l,n,r,c,c))return!1}}return!0}return n(e,t);case"function":return!1;default:return n(e,t)}}function Wn(e){return null===e?"null":typeof e}function Gn(e){var t=e.NUMBER_FORMATS;return function(e,n,r){return v(n)&&(n=t.CURRENCY_SYM),v(r)&&(r=t.PATTERNS[1].maxFrac),null==e?e:Jn(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,r).replace(/\u00A4/g,n)}}function Xn(e){var t=e.NUMBER_FORMATS;return function(e,n){return null==e?e:Jn(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function Kn(e){var t,n,r,i,o,a=0;for((n=e.indexOf(Ro))>-1&&(e=e.replace(Ro,"")),(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)===zo;r++);if(r===(o=e.length))t=[0],n=1;else{for(o--;e.charAt(o)===zo;)o--;for(n-=r,t=[],i=0;r<=o;r++,i++)t[i]=+e.charAt(r)}return n>No&&(t=t.splice(0,No-1),a=n-1,n=1),{d:t,e:a,i:n}}function Yn(e,t,n,r){var i=e.d,o=i.length-e.i;t=v(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 Jn(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=Kn(u),Yn(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 Zn(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=zo+e;return n&&(e=e.substr(e.length-t)),i+e}function Qn(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),Zn(a,t,r,i)}}function er(e,t,n){return function(r,i){var o=r["get"+e](),a=(n?"STANDALONE":"")+(t?"SHORT":""),s=Gr(a+e);return i[s][o]}}function tr(e,t,n){var r=-1*n,i=r>=0?"+":"";return i+=Zn(Math[r>0?"floor":"ceil"](r/60),2)+Zn(Math.abs(r%60),2)}function nr(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(t<=4?5:12)-t)}function rr(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function ir(e){return function(t){var n=nr(t.getFullYear()),r=rr(t),i=+r-+n,o=1+Math.round(i/6048e5);return Zn(o,e)}}function or(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function ar(e,t){return e.getFullYear()<=0?t.ERAS[0]:t.ERAS[1]}function sr(e,t){return e.getFullYear()<=0?t.ERANAMES[0]:t.ERANAMES[1]}function ur(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=qo.test(n)?f(n):t(n)),x(n)&&(n=new Date(n)),!_(n)||!isFinite(n.getTime()))return n;for(;i;)s=Ho.exec(i),s?(l=L(l,s,1),i=l.pop()):(l.push(i),i=null);var c=n.getTimezoneOffset();return o&&(c=X(o,c),n=Y(n,o,!0)),r(l,function(t){a=Lo[t],u+=a?a(n,e.DATETIME_FORMATS,c):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),u}}function lr(){return function(e,t){return v(t)&&(t=2),W(e,t)}}function cr(){return function(e,t,r){return t=Math.abs(Number(t))===1/0?Number(t):f(t),ui(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?fr(e,r,r+t):0===r?fr(e,t,e.length):fr(e,Math.max(0,r+t),r)):e)}}function fr(e,t,n){return w(e)?e.slice(t,n):ei.call(e,t,n)}function dr(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:$(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&&(y(o)&&(o=e.index),y(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);li(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 pr(e){return k(e)&&(e={link:e}),e.restrict=e.restrict||"AC",g(e)}function hr(e,t){e.$name=t}function gr(e,t,n,r,i){this.$$controls=[],this.$error={},this.$$success={},this.$pending=void 0,this.$name=i(t.name||t.ngForm||"")(n),this.$dirty=!1,this.$pristine=!0,this.$valid=!0,this.$invalid=!1,this.$submitted=!1,this.$$parentForm=Ko,this.$$element=e,this.$$animate=r,$r(this)}function $r(e){e.$$classCache={},e.$$classCache[Pa]=!(e.$$classCache[ja]=e.$$element.hasClass(ja))}function vr(e){function t(e,t,n,r){e[t]||(e[t]={}),a(e[t],n,r)}function n(e,t,n,r){e[t]&&s(e[t],n,r),mr(e[t])&&(e[t]=void 0)}function r(e,t,n){n&&!e.$$classCache[t]?(e.$$animate.addClass(e.$$element,t),e.$$classCache[t]=!0):!n&&e.$$classCache[t]&&(e.$$animate.removeClass(e.$$element,t),e.$$classCache[t]=!1)}function i(e,t,n){t=t?"-"+le(t,"-"):"",r(e,ja+t,n===!0),r(e,Pa+t,n===!1)}var o=e.clazz,a=e.set,s=e.unset;o.prototype.$setValidity=function(e,o,u){v(o)?t(this,"$pending",e,u):n(this,"$pending",e,u),T(o)?o?(s(this.$error,e,u),a(this.$$success,e,u)):(a(this.$error,e,u),s(this.$$success,e,u)):(s(this.$error,e,u),s(this.$$success,e,u)),this.$pending?(r(this,Yo,!0),this.$valid=this.$invalid=void 0,i(this,"",null)):(r(this,Yo,!1),this.$valid=mr(this.$error),this.$invalid=!this.$valid,i(this,"",this.$valid));var l;l=this.$pending&&this.$pending[e]?void 0:!this.$error[e]&&(!!this.$$success[e]||null),i(this,e,l),this.$$parentForm.$setValidity(e,l,this)}}function mr(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function yr(e){e.$formatters.push(function(t){return e.$isEmpty(t)?t:t.toString()})}function br(e,t,n,r,i,o){wr(e,t,n,r,i,o),yr(r)}function wr(e,t,n,r,i,o){var a=Wr(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=fi(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),fa[a]&&r.$$hasNativeValidators&&a===n.type&&t.on(ca,function(e){if(!u){var t=this[qr],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 xr(e,t){if(_(e))return e;if(w(e)){sa.lastIndex=0;var n=sa.exec(e);if(n){var r=+n[1],i=+n[2],o=0,a=0,s=0,u=0,l=nr(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)),ta.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 kr(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}Er(i,o,a,s),wr(i,o,a,s,u,l);var p,h=s&&s.$options.getOption("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=Y(r,h)),r}}),s.$formatters.push(function(e){if(e&&!_(e))throw Ra("datefmt","Expected `{0}` to be a date",e);return f(e)?(p=e,p&&h&&(p=Y(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)||v(g)||n(e)>=g},a.$observe("min",function(e){g=d(e),s.$validate()})}if(m(a.max)||a.ngMax){var $;s.$validators.max=function(e){return!f(e)||v($)||n(e)<=$},a.$observe("max",function(e){$=d(e),s.$validate()})}}}function Er(e,t,n,r){var i=t[0],o=r.$$hasNativeValidators=y(i.validity);o&&r.$parsers.push(function(e){var n=t.prop(qr)||{};return n.badInput||n.typeMismatch?void 0:e})}function Sr(e){e.$$parserName="number",e.$parsers.push(function(t){return e.$isEmpty(t)?null:ia.test(t)?parseFloat(t):void 0}),e.$formatters.push(function(t){if(!e.$isEmpty(t)){if(!x(t))throw Ra("numfmt","Expected `{0}` to be a number",t);t=t.toString()}return t})}function Cr(e){return m(e)&&!x(e)&&(e=parseFloat(e)),ui(e)?void 0:e}function Ar(e){return(0|e)===e}function Or(e){var t=e.toString(),n=t.indexOf(".");if(n===-1){if(-1<e&&e<1){var r=/e-(\d+)$/.exec(t);if(r)return Number(r[1])}return 0}return t.length-n-1}function Mr(e,t,n){var r=Number(e);if(!Ar(r)||!Ar(t)||!Ar(n)){var i=Math.max(Or(r),Or(t),Or(n)),o=Math.pow(10,i);r*=o,t*=o,n*=o}return(r-t)%n===0}function Tr(e,t,n,r,i,o){Er(e,t,n,r),Sr(r),wr(e,t,n,r,i,o);var a,s;if((m(n.min)||n.ngMin)&&(r.$validators.min=function(e){return r.$isEmpty(e)||v(a)||e>=a},n.$observe("min",function(e){a=Cr(e),r.$validate()})),(m(n.max)||n.ngMax)&&(r.$validators.max=function(e){return r.$isEmpty(e)||v(s)||e<=s},n.$observe("max",function(e){s=Cr(e),r.$validate()})),m(n.step)||n.ngStep){var u;r.$validators.step=function(e,t){return r.$isEmpty(t)||v(u)||Mr(t,a||0,u)},n.$observe("step",function(e){u=Cr(e),r.$validate()})}}function jr(e,t,n,r,i,o){function a(e,r){t.attr(e,n[e]),n.$observe(e,r)}function s(e){if(f=Cr(e),!ui(r.$modelValue))if(c){var n=t.val();f>n&&(n=f,t.val(n)),r.$setViewValue(n)}else r.$validate()}function u(e){if(d=Cr(e),!ui(r.$modelValue))if(c){var n=t.val();d<n&&(t.val(d),n=d<f?f:d),r.$setViewValue(n)}else r.$validate()}function l(e){p=Cr(e),ui(r.$modelValue)||(c&&r.$viewValue!==t.val()?r.$setViewValue(t.val()):r.$validate())}Er(e,t,n,r),Sr(r),wr(e,t,n,r,i,o);var c=r.$$hasNativeValidators&&"range"===t[0].type,f=c?0:void 0,d=c?100:void 0,p=c?1:void 0,h=t[0].validity,g=m(n.min),$=m(n.max),y=m(n.step),b=r.$render;r.$render=c&&m(h.rangeUnderflow)&&m(h.rangeOverflow)?function(){b(),r.$setViewValue(t.val())}:b,g&&(r.$validators.min=c?function(){return!0}:function(e,t){return r.$isEmpty(t)||v(f)||t>=f},a("min",s)),$&&(r.$validators.max=c?function(){return!0}:function(e,t){return r.$isEmpty(t)||v(d)||t<=d},a("max",u)),y&&(r.$validators.step=c?function(){return!h.stepMismatch}:function(e,t){return r.$isEmpty(t)||v(p)||Mr(t,f||0,p)},a("step",l))}function Pr(e,t,n,r,i,o){wr(e,t,n,r,i,o),yr(r),r.$$parserName="url",r.$validators.url=function(e,t){var n=e||t;return r.$isEmpty(n)||na.test(n)}}function Dr(e,t,n,r,i,o){wr(e,t,n,r,i,o),yr(r),r.$$parserName="email",r.$validators.email=function(e,t){var n=e||t;return r.$isEmpty(n)||ra.test(n)}}function Vr(e,t,n,r){var i=!n.ngTrim||"false"!==fi(n.ngTrim);v(n.name)&&t.attr("name",a());var o=function(e){var o;t[0].checked&&(o=n.value,i&&(o=fi(o)),r.$setViewValue(o,e&&e.type))};t.on("click",o),r.$render=function(){var e=n.value;i&&(e=fi(e)),t[0].checked=e===r.$viewValue},n.$observe("value",r.$render)}function Ir(e,t,n,r,i){var o;if(m(r)){if(o=e(r),!o.constant)throw Ra("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,r);return o(t)}return i}function Ur(e,t,n,r,i,o,a,s){var u=Ir(s,e,"ngTrueValue",n.ngTrueValue,!0),l=Ir(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 z(e,u)}),r.$parsers.push(function(e){return e?u:l})}function Fr(e,t){function n(e,t){if(!e||!e.length)return[];if(!t||!t.length)return e;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 i(e){return e&&e.split(" ")}function o(e){var t=e;return li(e)?t=e.map(o).join(" "):y(e)&&(t=Object.keys(e).filter(function(t){return e[t]}).join(" ")),t}function a(e){var t=e;if(li(e))t=e.map(a);else if(y(e)){var n=!1;t=Object.keys(e).filter(function(t){var r=e[t];return!n&&v(r)&&(n=!0),r}),n&&t.push(void 0)}return t}e="ngClass"+e;var s;return["$parse",function(u){return{restrict:"AC",link:function(l,c,f){function d(e){e=g(i(e),1),f.$addClass(e)}function p(e){e=g(i(e),-1),f.$removeClass(e)}function h(e,t){var r=i(e),o=i(t),a=n(r,o),s=n(o,r),u=g(a,-1),l=g(s,1);f.$addClass(l),f.$removeClass(u)}function g(e,t){var n=[];return r(e,function(e){(t>0||E[e])&&(E[e]=(E[e]||0)+t,E[e]===+(t>0)&&n.push(e))}),n.join(" ")}function $(e){e===t?d(y):p(y),S=e}function v(e){var t=o(e);t!==y&&m(t)}function m(e){S===t&&h(y,e),y=e}var y,b=f[e].trim(),w=":"===b.charAt(0)&&":"===b.charAt(1),x=w?a:o,_=u(b,x),k=w?v:m,E=c.data("$classCounts"),S=!0;E||(E=$e(),c.data("$classCounts",E)),"ngClass"!==e&&(s||(s=u("$index",function(e){return 1&e})),l.$watch(s,$)),l.$watch(_,k,w)}}}]}function Nr(e,t,n,r,i,o,a,s,u){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=u(n.name||"",!1)(e),this.$$parentForm=Ko,this.$options=za,this.$$parsedNgModel=i(n.ngModel),this.$$parsedNgModelAssign=this.$$parsedNgModel.assign,this.$$ngModelGet=this.$$parsedNgModel,this.$$ngModelSet=this.$$parsedNgModelAssign,this.$$pendingDebounce=null,this.$$parserValid=void 0,this.$$currentValidationRunId=0,this.$$scope=e,this.$$attr=n,this.$$element=r,this.$$animate=o,this.$$timeout=a,this.$$parse=i,this.$$q=s,this.$$exceptionHandler=t,$r(this),Rr(this)}function Rr(e){e.$$scope.$watch(function(){var t=e.$$ngModelGet(e.$$scope);if(t!==e.$modelValue&&(e.$modelValue===e.$modelValue||t===t)){e.$modelValue=e.$$rawModelValue=t,e.$$parserValid=void 0;for(var n=e.$formatters,r=n.length,i=t;r--;)i=n[r](i);e.$viewValue!==i&&(e.$$updateEmptyClasses(i),e.$viewValue=e.$$lastCommittedViewValue=i,e.$render(),e.$$runValidators(e.$modelValue,e.$viewValue,p))}return t})}function zr(e){this.$$options=e}function Lr(e,t){r(t,function(t,n){m(e[n])||(e[n]=t)})}var Hr=/^\/(.+)\/([a-z]*)$/,qr="validity",Br=Object.prototype.hasOwnProperty,Wr=function(e){return w(e)?e.toLowerCase():e},Gr=function(e){return w(e)?e.toUpperCase():e},Xr=function(e){return w(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},Kr=function(e){return w(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(e.charCodeAt(0)&-33)}):e};"i"!=="I".toLowerCase()&&(Wr=Xr,Gr=Kr);var Yr,Jr,Zr,Qr,ei=[].slice,ti=[].splice,ni=[].push,ri=Object.prototype.toString,ii=Object.getPrototypeOf,oi=t("ng"),ai=e.angular||(e.angular={}),si=0;
|
6 |
+
Yr=e.document.documentMode;var ui=Number.isNaN||function(e){return e!==e};p.$inject=[],h.$inject=[];var li=Array.isArray,ci=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/,fi=function(e){return w(e)?e.trim():e},di=function(e){return e.replace(/([-()[\]{}+?*.$^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},pi=function(){function t(){try{return new Function(""),!1}catch(e){return!0}}if(!m(pi.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");pi.rules={noUnsafeEval:!r||r.indexOf("no-unsafe-eval")!==-1,noInlineStyle:!r||r.indexOf("no-inline-style")!==-1}}else pi.rules={noUnsafeEval:t(),noInlineStyle:!1}}return pi.rules},hi=function(){if(m(hi.name_))return hi.name_;var t,n,r,i,o=$i.length;for(n=0;n<o;++n)if(r=$i[n],t=e.document.querySelector("["+r.replace(":","\\:")+"jq]")){i=t.getAttribute(r+"jq");break}return hi.name_=i},gi=/:/g,$i=["ng-","data-ng-","ng:","x-ng-"],vi=ie(e.document),mi=/[A-Z]/g,yi=!1,bi=1,wi=2,xi=3,_i=8,ki=9,Ei=11,Si={full:"1.6.1",major:1,minor:6,dot:1,codeName:"promise-rectification"};De.expando="ng339";var Ci=De.cache={},Ai=1;De._data=function(e){return this.cache[e[this.expando]]||{}};var Oi=/-([a-z])/g,Mi=/^-ms-/,Ti={mouseleave:"mouseout",mouseenter:"mouseover"},ji=t("jqLite"),Pi=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Di=/<|&#?\w+;/,Vi=/<([\w:-]+)/,Ii=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,Ui={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,"",""]};Ui.optgroup=Ui.option,Ui.tbody=Ui.tfoot=Ui.colgroup=Ui.caption=Ui.thead,Ui.th=Ui.td;var Fi=e.Node.prototype.contains||function(e){return!!(16&this.compareDocumentPosition(e))},Ni=De.prototype={ready:Ye,toString:function(){var e=[];return r(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return Jr(e>=0?this[e]:this[this.length+e])},length:0,push:ni,sort:[].sort,splice:[].splice},Ri={};r("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){Ri[Wr(e)]=e});var zi={};r("input,select,option,textarea,button,form,details".split(","),function(e){zi[e]=!0});var Li={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern",ngStep:"step"};r({data:Re,removeData:Fe,hasData:Oe,cleanData:Me},function(e,t){De[t]=e}),r({data:Re,inheritedData:We,scope:function(e){return Jr.data(e,"$scope")||We(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return Jr.data(e,"$isolateScope")||Jr.data(e,"$isolateScopeNoTemplate")},controller:Be,injector:function(e){return We(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:ze,css:function(e,t,n){return t=ke(t),m(n)?void(e.style[t]=n):e.style[t]},attr:function(e,t,n){var r,i=e.nodeType;if(i!==xi&&i!==wi&&i!==_i&&e.getAttribute){var o=Wr(t),a=Ri[o];return m(n)?void(null===n||n===!1&&a?e.removeAttribute(t):e.setAttribute(t,a?o:n)):(r=e.getAttribute(t),a&&null!==r&&(r=o),null===r?void 0:r)}},prop:function(e,t,n){return m(n)?void(e[t]=n):e[t]},text:function(){function e(e,t){if(v(t)){var n=e.nodeType;return n===bi||n===xi?e.textContent:""}e.textContent=t}return e.$dv="",e}(),val:function(e,t){if(v(t)){if(e.multiple&&"select"===U(e)){var n=[];return r(e.options,function(e){e.selected&&n.push(e.value||e.text)}),n}return e.value}e.value=t},html:function(e,t){return v(t)?e.innerHTML:(Ie(e,!0),void(e.innerHTML=t))},empty:Ge},function(e,t){De.prototype[t]=function(t,n){var r,i,o=this.length;if(e!==Ge&&v(2===e.length&&e!==ze&&e!==Be?t:n)){if(y(t)){for(r=0;r<o;r++)if(e===Re)e(this[r],t);else for(i in t)e(this[r],i,t[i]);return this}for(var a=e.$dv,s=v(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:Fe,on:function(e,t,n,r){if(m(r))throw ji("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(Ae(e)){var i=Ne(e,!0),o=i.events,a=i.handle;a||(a=i.handle=Qe(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||e.addEventListener(t,a)),s.push(n)};u--;)t=s[u],Ti[t]?(l(Ti[t],tt),l(t,void 0,!0)):l(t)}},off:Ue,one:function(e,t,n){e=Jr(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;Ie(e),r(new De(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===bi&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var n=e.nodeType;if(n===bi||n===Ei){t=new De(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===bi){var n=e.firstChild;r(new De(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){Pe(e,Jr(t).eq(0).clone()[0])},remove:Xe,detach:function(e){Xe(e,!0)},after:function(e,t){var n=e,r=e.parentNode;if(r){t=new De(t);for(var i=0,o=t.length;i<o;i++){var a=t[i];r.insertBefore(a,n.nextSibling),n=a}}},addClass:He,removeClass:Le,toggleClass:function(e,t,n){t&&r(t.split(" "),function(t){var r=n;v(r)&&(r=!ze(e,t)),(r?He:Le)(e,t)})},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==Ei?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:Ve,triggerHandler:function(e,t,n){var i,o,a,s=t.type||t,u=Ne(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=ye(f),a=n?[i].concat(n):[i],r(o,function(t){i.isImmediatePropagationStopped()||t.apply(e,a)}))}},function(e,t){De.prototype[t]=function(t,n,r){for(var i,o=0,a=this.length;o<a;o++)v(i)?(i=e(this[o],t,n,r),m(i)&&(i=Jr(i))):qe(i,e(this[o],t,n,r));return m(i)?i:this}}),De.prototype.bind=De.prototype.on,De.prototype.unbind=De.prototype.off,it.prototype={put:function(e,t){this[rt(e,this.nextUid)]=t},get:function(e){return this[rt(e,this.nextUid)]},remove:function(e){var t=this[e=rt(e,this.nextUid)];return delete this[e],t}};var Hi=[function(){this.$get=[function(){return it}]}],qi=/^([^(]+?)=>/,Bi=/^[^(]*\(\s*([^)]*)\)/m,Wi=/,/,Gi=/^\s*(_?)(\S+?)\1\s*$/,Xi=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Ki=t("$injector");lt.$$annotate=ut;var Yi=t("$animate"),Ji=1,Zi="ng-animate",Qi=function(){this.$get=p},eo=function(){var e=new it,t=[];this.$get=["$$AnimateRunner","$rootScope",function(n,i){function o(e,t,n){var i=!1;return t&&(t=w(t)?t.split(" "):li(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=pt(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&&He(e,o),a&&Le(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}}}]},to=["$provide",function(e){var t=this;this.$$registeredAnimations=Object.create(null),this.register=function(n,r){if(n&&"."!==n.charAt(0))throw Yi("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+|\\/)"+Zi+"(\\s+|\\/)");if(t.test(this.$$classNameFilter.toString()))throw Yi("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',Zi)}return this.$$classNameFilter},this.$get=["$$animateQueue",function(e){function t(e,t,n){if(n){var r=dt(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&&Jr(r),i=i&&Jr(i),r=r||i.parent(),t(n,r,i),e.push(n,"enter",ht(o))},move:function(n,r,i,o){return r=r&&Jr(r),i=i&&Jr(i),r=r||i.parent(),t(n,r,i),e.push(n,"move",ht(o))},leave:function(t,n){return e.push(t,"leave",ht(n),function(){t.remove()})},addClass:function(t,n,r){return r=ht(r),r.addClass=ft(r.addclass,n),e.push(t,"addClass",r)},removeClass:function(t,n,r){return r=ht(r),r.removeClass=ft(r.removeClass,n),e.push(t,"removeClass",r)},setClass:function(t,n,r,i){return i=ht(i),i.addClass=ft(i.addClass,n),i.removeClass=ft(i.removeClass,r),e.push(t,"setClass",i)},animate:function(t,n,r,i,o){return o=ht(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=ft(o.tempClasses,i),e.push(t,"animate",o)}}}]}],no=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)}}}]},ro=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$$isDocumentHidden","$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){i()?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}]},io=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=R(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}}}]},oo=t("$compile"),ao=new yt;bt.$inject=["$provide","$$sanitizeUriProvider"],wt.prototype.isFirstChange=function(){return this.previousValue===ao};var so=/^((?:x|data)[:\-_])/i,uo=/[:\-_]+(.)/g,lo=t("$controller"),co=/^(\S+)(\s+as\s+([\w$]+))?$/,fo=function(){this.$get=["$document",function(e){return function(t){return t?!t.nodeType&&t instanceof Jr&&(t=t[0]):t=e[0].body,t.offsetWidth+1}}]},po="application/json",ho={"Content-Type":po+";charset=utf-8"},go=/^\[|^\{(?!\{)/,$o={"[":/]$/,"{":/}$/},vo=/^\)]\}',?\n/,mo=t("$http"),yo=ai.$interpolateMinErr=t("$interpolate");yo.throwNoconcat=function(e){throw yo("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)},yo.interr=function(e,t){return yo("interr","Can't interpolate: {0}\n{1}",e,t.toString())};var bo=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]}}}]},wo=/^([^?#]*)(\?([^#]*))?(#(.*))?$/,xo={http:80,https:443,ftp:21},_o=t("$location"),ko=/^\s*[\\/]{2,}/,Eo={$$absUrl:"",$$html5:!1,$$replace:!1,absUrl:rn("$$absUrl"),url:function(e){if(v(e))return this.$$url;var t=wo.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:rn("$$protocol"),host:rn("$$host"),port:rn("$$port"),path:on("$$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=Q(e);else{if(!y(e))throw _o("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");e=R(e,{}),r(e,function(t,n){null==t&&delete e[n]}),this.$$search=e}break;default:v(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:on("$$hash",function(e){return null!==e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};r([nn,tn,en],function(e){e.prototype=Object.create(Eo),e.prototype.state=function(t){if(!arguments.length)return this.$$state;if(e!==en||!this.$$html5)throw _o("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=v(t)?null:t,this}});var So=t("$parse"),Co={}.constructor.prototype.valueOf,Ao=$e();r("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(e){Ao[e]=!0});var Oo={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=Ao[t],o=Ao[n],a=Ao[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 So("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=Wr(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=Oo[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 To=function(e,t){this.lexer=e,this.options=t};To.Program="Program",To.ExpressionStatement="ExpressionStatement",To.AssignmentExpression="AssignmentExpression",To.ConditionalExpression="ConditionalExpression",To.LogicalExpression="LogicalExpression",To.BinaryExpression="BinaryExpression",To.UnaryExpression="UnaryExpression",To.CallExpression="CallExpression",To.MemberExpression="MemberExpression",To.Identifier="Identifier",To.Literal="Literal",To.ArrayExpression="ArrayExpression",To.Property="Property",To.ObjectExpression="ObjectExpression",To.ThisExpression="ThisExpression",To.LocalsExpression="LocalsExpression",To.NGValueParameter="NGValueParameter",To.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:To.Program,body:e}},expressionStatement:function(){return{type:To.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var e=this.expression();this.expect("|");)e=this.filter(e);return e},expression:function(){return this.assignment()},assignment:function(){var e=this.ternary();if(this.expect("=")){if(!hn(e))throw So("lval","Trying to assign a value to a non l-value");e={type:To.AssignmentExpression,left:e,right:this.assignment(),operator:"="}}return e},ternary:function(){var e,t,n=this.logicalOR();return this.expect("?")&&(e=this.expression(),this.consume(":"))?(t=this.expression(),{type:To.ConditionalExpression,test:n,alternate:e,consequent:t}):n},logicalOR:function(){for(var e=this.logicalAND();this.expect("||");)e={type:To.LogicalExpression,operator:"||",left:e,right:this.logicalAND()};return e},logicalAND:function(){for(var e=this.equality();this.expect("&&");)e={type:To.LogicalExpression,operator:"&&",left:e,right:this.equality()};return e},equality:function(){for(var e,t=this.relational();e=this.expect("==","!=","===","!==");)t={type:To.BinaryExpression,operator:e.text,left:t,right:this.relational()};return t},relational:function(){for(var e,t=this.additive();e=this.expect("<",">","<=",">=");)t={type:To.BinaryExpression,operator:e.text,left:t,right:this.additive()};return t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t={type:To.BinaryExpression,operator:e.text,left:t,right:this.multiplicative()};return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t={type:To.BinaryExpression,operator:e.text,left:t,right:this.unary()};return t},unary:function(){var e;return(e=this.expect("+","-","!"))?{type:To.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=R(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?e={type:To.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:To.CallExpression,callee:e,arguments:this.parseArguments()},this.consume(")")):"["===t.text?(e={type:To.MemberExpression,object:e,property:this.expression(),computed:!0},this.consume("]")):"."===t.text?e={type:To.MemberExpression,object:e,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return e},filter:function(e){for(var t=[e],n={type:To.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:To.Identifier,name:e.text}},constant:function(){return{type:To.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:To.ArrayExpression,elements:e}},object:function(){var e,t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;e={type:To.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:To.ObjectExpression,properties:t}},throwError:function(e,t){throw So("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 So("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 So("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:To.ThisExpression},$locals:{type:To.LocalsExpression}}},mn.prototype={compile:function(e){var t=this,n=this.astBuilder.ast(e);this.state={nextId:0,filters:{},fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},dn(n,t.$filter);var i,o="";if(this.stage="assign",i=gn(n)){this.state.computing="assign";var a=this.nextId();this.recurse(i,a),this.return_(a),o="fn.assign="+this.generateFunction("assign","s,v,l")}var s=pn(n.body);t.stage="inputs",r(s,function(e,n){var r="fn"+n;t.state[r]={vars:[],body:[],own:{}},t.state.computing=r;var i=t.nextId();t.recurse(e,i),t.return_(i),t.state.inputs.push(r),e.watchId=n}),this.state.computing="fn",this.stage="main",this.recurse(n);var u='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+o+this.watchFns()+"return fn;",l=new Function("$filter","getStringValue","ifDefined","plus",u)(this.$filter,un,ln,cn);return this.state=this.stage=void 0,l.literal=$n(n),l.constant=vn(n),l},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 To.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 To.Literal:c=this.escape(e.value),this.assign(t,c),i(t||c);break;case To.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 To.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 To.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 To.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 To.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),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.isNull(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))),i(t);break;case To.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(){e.computed?(u=d.nextId(),d.recurse(e.property,u),d.getStringValue(u),o&&1!==o&&d.if_(d.not(d.computedMember(s,u)),d.lazyAssign(d.computedMember(s,u),"{}")),c=d.computedMember(s,u),d.assign(t,c),n&&(n.computed=!0,n.name=u)):(o&&1!==o&&d.if_(d.isNull(d.nonComputedMember(s,e.property.name)),d.lazyAssign(d.nonComputedMember(s,e.property.name),"{}")),c=d.nonComputedMember(s,e.property.name),d.assign(t,c),n&&(n.computed=!1,n.name=e.property.name))},function(){d.assign(t,"undefined")}),i(t)},!!o);break;case To.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(){r(e.arguments,function(t){d.recurse(t,e.constant?void 0:d.nextId(),void 0,function(e){l.push(e)})}),c=s.name?d.member(s.context,s.name,s.computed)+"("+l.join(",")+")":u+"("+l.join(",")+")",d.assign(t,c)},function(){d.assign(t,"undefined")}),i(t)}));break;case To.AssignmentExpression:u=this.nextId(),s={},this.recurse(e.left,void 0,s,function(){d.if_(d.notNull(s.context),function(){d.recurse(e.right,u),c=d.member(s.context,s.name,s.computed)+e.operator+u,d.assign(t,c),i(t||c)})},1);break;case To.ArrayExpression:l=[],r(e.elements,function(t){d.recurse(t,e.constant?void 0:d.nextId(),void 0,function(e){l.push(e)})}),c="["+l.join(",")+"]",this.assign(t,c),i(t||c);break;case To.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===To.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===To.Identifier?t.key.name:""+t.key.value)+":"+e)})}),c="{"+l.join(",")+"}",this.assign(t,c)),i(t||c);break;case To.ThisExpression:this.assign(t,"s"),i(t||"s");break;case To.LocalsExpression:this.assign(t,"l"),i(t||"l");break;case To.NGValueParameter:this.assign(t,"v"),i(t||"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+")"},isNull:function(e){return e+"==null"},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)},getStringValue:function(e){this.assign(e,"getStringValue("+e+")")},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 So("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]}},yn.prototype={compile:function(e){var t=this,n=this.astBuilder.ast(e);dn(n,t.$filter);var i,o;(i=gn(n))&&(o=this.recurse(i));var a,s=pn(n.body);s&&(a=[],r(s,function(e,n){var r=t.recurse(e);e.input=r,a.push(r),e.watchId=n}));var u=[];r(n.body,function(e){u.push(t.recurse(e.expression))});var l=0===n.body.length?p:1===n.body.length?u[0]:function(e,t){var n;return r(u,function(r){n=r(e,t)}),n};return o&&(l.assign=function(e,t,n){return o(e,n,t)}),a&&(l.inputs=a),l.literal=$n(n),l.constant=vn(n),l},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 To.Literal:return this.value(e.value,t);case To.UnaryExpression:return o=this.recurse(e.argument),this["unary"+e.operator](o,t);
|
7 |
+
case To.BinaryExpression:return i=this.recurse(e.left),o=this.recurse(e.right),this["binary"+e.operator](i,o,t);case To.LogicalExpression:return i=this.recurse(e.left),o=this.recurse(e.right),this["binary"+e.operator](i,o,t);case To.ConditionalExpression:return this["ternary?:"](this.recurse(e.test),this.recurse(e.alternate),this.recurse(e.consequent),t);case To.Identifier:return s.identifier(e.name,t,n);case To.MemberExpression:return i=this.recurse(e.object,!1,!!n),e.computed||(o=e.property.name),e.computed&&(o=this.recurse(e.property)),e.computed?this.computedMember(i,o,t,n):this.nonComputedMember(i,o,t,n);case To.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 s,u=o(e,n,r,i);if(null!=u.value){for(var l=[],c=0;c<a.length;++c)l.push(a[c](e,n,r,i));s=u.value.apply(u.context,l)}return t?{value:s}:s};case To.AssignmentExpression:return i=this.recurse(e.left,!0,1),o=this.recurse(e.right),function(e,n,r,a){var s=i(e,n,r,a),u=o(e,n,r,a);return s.context[s.name]=u,t?{value:u}:u};case To.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 To.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===To.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 To.ThisExpression:return function(e){return t?{value:e}:e};case To.LocalsExpression:return function(e,n){return t?{value:n}:n};case To.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=cn(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?{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){return function(r,i,o,a){var s=i&&e in i?i:r;n&&1!==n&&s&&null==s[e]&&(s[e]={});var u=s?s[e]:void 0;return t?{context:s,name:e,value:u}:u}},computedMember:function(e,t,n,r){return function(i,o,a,s){var u,l,c=e(i,o,a,s);return null!=c&&(u=t(i,o,a,s),u=un(u),r&&1!==r&&c&&!c[u]&&(c[u]={}),l=c[u]),n?{context:c,name:u,value:l}:l}},nonComputedMember:function(e,t,n,r){return function(i,o,a,s){var u=e(i,o,a,s);r&&1!==r&&u&&null==u[t]&&(u[t]={});var l=null!=u?u[t]:void 0;return n?{context:u,name:t,value:l}:l}},inputs:function(e,t){return function(n,r,i,o){return o?o[t]:e(n,r,i)}}};var jo=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n,this.ast=new To(e,n),this.astCompiler=n.csp?new yn(this.ast,t):new mn(this.ast,t)};jo.prototype={constructor:jo,parse:function(e){return this.astCompiler.compile(e)}};var Po=t("$sce"),Do={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Vo=/_([a-z])/g,Io=t("$compile"),Uo=e.document.createElement("a"),Fo=Un(e.location.href);Rn.$inject=["$document"],Ln.$inject=["$provide"];var No=22,Ro=".",zo="0";Gn.$inject=["$locale"],Xn.$inject=["$locale"];var Lo={yyyy:Qn("FullYear",4,0,!1,!0),yy:Qn("FullYear",2,0,!0,!0),y:Qn("FullYear",1,0,!1,!0),MMMM:er("Month"),MMM:er("Month",!0),MM:Qn("Month",2,1),M:Qn("Month",1,1),LLLL:er("Month",!1,!0),dd:Qn("Date",2),d:Qn("Date",1),HH:Qn("Hours",2),H:Qn("Hours",1),hh:Qn("Hours",2,-12),h:Qn("Hours",1,-12),mm:Qn("Minutes",2),m:Qn("Minutes",1),ss:Qn("Seconds",2),s:Qn("Seconds",1),sss:Qn("Milliseconds",3),EEEE:er("Day"),EEE:er("Day",!0),a:or,Z:tr,ww:ir(2),w:ir(1),G:ar,GG:ar,GGG:ar,GGGG:sr},Ho=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,qo=/^-?\d+$/;ur.$inject=["$locale"];var Bo=g(Wr),Wo=g(Gr);dr.$inject=["$parse"];var Go=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]"===ri.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}}),Xo={};r(Ri,function(e,t){function n(e,n,i){e.$watch(i[r],function(e){i.$set(t,!!e)})}if("multiple"!==e){var r=xt("ng-"+t),i=n;"checked"===e&&(i=function(e,t,i){i.ngModel!==i[r]&&n(e,t,i)}),Xo[r]=function(){return{restrict:"A",priority:100,link:i}}}}),r(Li,function(e,t){Xo[t]=function(){return{priority:100,link:function(e,n,r){if("ngPattern"===t&&"/"===r.ngPattern.charAt(0)){var i=r.ngPattern.match(Hr);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=xt("ng-"+e);Xo[t]=function(){return{priority:99,link:function(n,r,i){var o=e,a=e;"href"===e&&"[object SVGAnimatedString]"===ri.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(Yr&&o&&r.prop(o,i[a]))):void("href"===e&&i.$set(a,null))})}}}});var Ko={$addControl:p,$$renameControl:hr,$removeControl:p,$setValidity:p,$setDirty:p,$setPristine:p,$setSubmitted:p},Yo="ng-pending",Jo="ng-submitted";gr.$inject=["$element","$attrs","$scope","$animate","$interpolate"],gr.prototype={$rollbackViewValue:function(){r(this.$$controls,function(e){e.$rollbackViewValue()})},$commitViewValue:function(){r(this.$$controls,function(e){e.$commitViewValue()})},$addControl:function(e){pe(e.$name,"input"),this.$$controls.push(e),e.$name&&(this[e.$name]=e),e.$$parentForm=this},$$renameControl:function(e,t){var n=e.$name;this[n]===e&&delete this[n],this[t]=e,e.$name=t},$removeControl:function(e){e.$name&&this[e.$name]===e&&delete this[e.$name],r(this.$pending,function(t,n){this.$setValidity(n,null,e)},this),r(this.$error,function(t,n){this.$setValidity(n,null,e)},this),r(this.$$success,function(t,n){this.$setValidity(n,null,e)},this),N(this.$$controls,e),e.$$parentForm=Ko},$setDirty:function(){this.$$animate.removeClass(this.$$element,Da),this.$$animate.addClass(this.$$element,Va),this.$dirty=!0,this.$pristine=!1,this.$$parentForm.$setDirty()},$setPristine:function(){this.$$animate.setClass(this.$$element,Da,Va+" "+Jo),this.$dirty=!1,this.$pristine=!0,this.$submitted=!1,r(this.$$controls,function(e){e.$setPristine()})},$setUntouched:function(){r(this.$$controls,function(e){e.$setUntouched()})},$setSubmitted:function(){this.$$animate.addClass(this.$$element,Jo),this.$submitted=!0,this.$$parentForm.$setSubmitted()}},vr({clazz:gr,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&&(N(r,n),0===r.length&&delete e[t])}});var Zo=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:gr,compile:function(n,i){n.addClass(Da).addClass(ja);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()};n[0].addEventListener("submit",u),n.on("$destroy",function(){t(function(){n[0].removeEventListener("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,Ko)})}}}};return i}]},Qo=Zo(),ea=Zo(!0),ta=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,na=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:\/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,ra=/^(?=.{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])?)*$/,ia=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,oa=/^(\d{4,})-(\d{2})-(\d{2})$/,aa=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,sa=/^(\d{4,})-W(\d\d)$/,ua=/^(\d{4,})-(\d\d)$/,la=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,ca="keydown wheel mousedown",fa=$e();r("date,datetime-local,month,time,week".split(","),function(e){fa[e]=!0});var da={text:br,date:kr("date",oa,_r(oa,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":kr("datetimelocal",aa,_r(aa,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:kr("time",la,_r(la,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:kr("week",sa,xr,"yyyy-Www"),month:kr("month",ua,_r(ua,["yyyy","MM"]),"yyyy-MM"),number:Tr,url:Pr,email:Dr,radio:Vr,range:jr,checkbox:Ur,hidden:p,button:p,submit:p,reset:p,file:p},pa=["$browser","$sniffer","$filter","$parse",function(e,t,n,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(i,o,a,s){s[0]&&(da[Wr(a.type)]||da.text)(i,o,a,s[0],t,e,n,r)}}}}],ha=/^(true|false|\d+)$/,ga=function(){function e(e,t,n){e.prop("value",n),t.$set("value",n)}return{restrict:"A",priority:100,compile:function(t,n){return ha.test(n.ngValue)?function(t,n,r){var i=t.$eval(r.ngValue);e(n,r,i)}:function(t,n,r){t.$watch(r.ngValue,function(t){e(n,r,t)})}}}},$a=["$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=ve(e)})}}}}],va=["$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=v(e)?"":e})}}}}],ma=["$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)||"")})}}}}],ya=g({restrict:"A",require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),ba=Fr("",!0),wa=Fr("Odd",0),xa=Fr("Even",1),_a=pr({compile:function(e,t){t.$set("ngCloak",void 0),e.removeClass("ng-cloak")}}),ka=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Ea={},Sa={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=xt("ng-"+e);Ea[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})};Sa[e]&&r.$$phase?t.$evalAsync(i):t.$apply(i)})}}}}]});var Ca=["$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=ge(s.clone),e.leave(l).done(function(e){e!==!1&&(l=null)}),s=null))})}}}],Aa=["$templateRequest","$anchorScroll","$animate",function(e,t,n){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:ai.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).done(function(e){e!==!1&&(d=null)}),d=p,p=null)};r.$watch(o,function(o){var u=function(e){e===!1||!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).done(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)})}}}}],Oa=["$compile",function(t){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,r,i,o){return ri.call(r[0]).match(/SVG/)?(r.empty(),void t(Te(o.template,e.document).childNodes)(n,function(e){r.append(e)},{futureParentElement:r})):(r.html(o.template),void t(r.contents())(n))}}}],Ma=pr({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),Ta=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,n,i){var o=n.ngList||", ",a="false"!==n.ngTrim,s=a?fi(o):o,u=function(e){if(!v(e)){var t=[];return e&&r(e.split(s),function(e){e&&t.push(a?fi(e):e)}),t}};i.$parsers.push(u),i.$formatters.push(function(e){if(li(e))return e.join(o)}),i.$isEmpty=function(e){return!e||!e.length}}}},ja="ng-valid",Pa="ng-invalid",Da="ng-pristine",Va="ng-dirty",Ia="ng-untouched",Ua="ng-touched",Fa="ng-empty",Na="ng-not-empty",Ra=t("ngModel");Nr.$inject=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$q","$interpolate"],Nr.prototype={$$initGetterSetters:function(){if(this.$options.getOption("getterSetter")){var e=this.$$parse(this.$$attr.ngModel+"()"),t=this.$$parse(this.$$attr.ngModel+"($$$p)");this.$$ngModelGet=function(t){var n=this.$$parsedNgModel(t);return k(n)&&(n=e(t)),n},this.$$ngModelSet=function(e,n){k(this.$$parsedNgModel(e))?t(e,{$$$p:n}):this.$$parsedNgModelAssign(e,n)}}else if(!this.$$parsedNgModel.assign)throw Ra("nonassign","Expression '{0}' is non-assignable. Element: {1}",this.$$attr.ngModel,J(this.$$element))},$render:p,$isEmpty:function(e){return v(e)||""===e||null===e||e!==e},$$updateEmptyClasses:function(e){this.$isEmpty(e)?(this.$$animate.removeClass(this.$$element,Na),this.$$animate.addClass(this.$$element,Fa)):(this.$$animate.removeClass(this.$$element,Fa),this.$$animate.addClass(this.$$element,Na))},$setPristine:function(){this.$dirty=!1,this.$pristine=!0,this.$$animate.removeClass(this.$$element,Va),this.$$animate.addClass(this.$$element,Da)},$setDirty:function(){this.$dirty=!0,this.$pristine=!1,this.$$animate.removeClass(this.$$element,Da),this.$$animate.addClass(this.$$element,Va),this.$$parentForm.$setDirty()},$setUntouched:function(){this.$touched=!1,this.$untouched=!0,this.$$animate.setClass(this.$$element,Ia,Ua)},$setTouched:function(){this.$touched=!0,this.$untouched=!1,this.$$animate.setClass(this.$$element,Ua,Ia)},$rollbackViewValue:function(){this.$$timeout.cancel(this.$$pendingDebounce),this.$viewValue=this.$$lastCommittedViewValue,this.$render()},$validate:function(){if(!ui(this.$modelValue)){var e=this.$$lastCommittedViewValue,t=this.$$rawModelValue,n=this.$valid,r=this.$modelValue,i=this.$options.getOption("allowInvalid"),o=this;this.$$runValidators(t,e,function(e){i||n===e||(o.$modelValue=e?t:void 0,o.$modelValue!==r&&o.$$writeModelToScope())})}},$$runValidators:function(e,t,n){function i(){var e=c.$$parserName||"parse";return v(c.$$parserValid)?(s(e,null),!0):(c.$$parserValid||(r(c.$validators,function(e,t){s(t,null)}),r(c.$asyncValidators,function(e,t){s(t,null)})),s(e,c.$$parserValid),c.$$parserValid)}function o(){var n=!0;return r(c.$validators,function(r,i){var o=Boolean(r(e,t));n=n&&o,s(i,o)}),!!n||(r(c.$asyncValidators,function(e,t){s(t,null)}),!1)}function a(){var n=[],i=!0;r(c.$asyncValidators,function(r,o){var a=r(e,t);if(!j(a))throw Ra("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?c.$$q.all(n).then(function(){u(i)},p):u(!0)}function s(e,t){l===c.$$currentValidationRunId&&c.$setValidity(e,t)}function u(e){l===c.$$currentValidationRunId&&n(e)}this.$$currentValidationRunId++;var l=this.$$currentValidationRunId,c=this;return i()&&o()?void a():void u(!1)},$commitViewValue:function(){var e=this.$viewValue;this.$$timeout.cancel(this.$$pendingDebounce),(this.$$lastCommittedViewValue!==e||""===e&&this.$$hasNativeValidators)&&(this.$$updateEmptyClasses(e),this.$$lastCommittedViewValue=e,this.$pristine&&this.$setDirty(),this.$$parseAndValidate())},$$parseAndValidate:function(){function e(){r.$modelValue!==o&&r.$$writeModelToScope()}var t=this.$$lastCommittedViewValue,n=t,r=this;if(this.$$parserValid=!v(n)||void 0,this.$$parserValid)for(var i=0;i<this.$parsers.length;i++)if(n=this.$parsers[i](n),v(n)){this.$$parserValid=!1;break}ui(this.$modelValue)&&(this.$modelValue=this.$$ngModelGet(this.$$scope));var o=this.$modelValue,a=this.$options.getOption("allowInvalid");this.$$rawModelValue=n,a&&(this.$modelValue=n,e()),this.$$runValidators(n,this.$$lastCommittedViewValue,function(t){a||(r.$modelValue=t?n:void 0,e())})},$$writeModelToScope:function(){this.$$ngModelSet(this.$$scope,this.$modelValue),r(this.$viewChangeListeners,function(e){try{e()}catch(t){this.$$exceptionHandler(t)}},this)},$setViewValue:function(e,t){this.$viewValue=e,this.$options.getOption("updateOnDefault")&&this.$$debounceViewValueCommit(t)},$$debounceViewValueCommit:function(e){var t=this.$options.getOption("debounce");x(t[e])?t=t[e]:x(t["default"])&&(t=t["default"]),this.$$timeout.cancel(this.$$pendingDebounce);var n=this;t>0?this.$$pendingDebounce=this.$$timeout(function(){n.$commitViewValue()},t):this.$$scope.$root.$$phase?this.$commitViewValue():this.$$scope.$apply(function(){n.$commitViewValue()})}},vr({clazz:Nr,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]}});var za,La=["$rootScope",function(e){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Nr,priority:1,compile:function(t){return t.addClass(Da).addClass(Ia).addClass(ja),{pre:function(e,t,n,r){var i=r[0],o=r[1]||i.$$parentForm,a=r[2];a&&(i.$options=a.$options),i.$$initGetterSetters(),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){function o(){a.$setTouched()}var a=i[0];a.$options.getOption("updateOn")&&n.on(a.$options.getOption("updateOn"),function(e){a.$$debounceViewValueCommit(e&&e.type)}),n.on("blur",function(){a.$touched||(e.$$phase?t.$evalAsync(o):t.$apply(o))})}}}}}],Ha=/(\s+|^)default(\s+|$)/;zr.prototype={getOption:function(e){return this.$$options[e]},createChild:function(e){var t=!1;return e=l({},e),r(e,function(n,r){"$inherit"===n?"*"===r?t=!0:(e[r]=this.$$options[r],"updateOn"===r&&(e.updateOnDefault=this.$$options.updateOnDefault)):"updateOn"===r&&(e.updateOnDefault=!1,e[r]=fi(n.replace(Ha,function(){return e.updateOnDefault=!0," "})))},this),t&&(delete e["*"],Lr(e,this.$$options)),Lr(e,za.$$options),new zr(e)}},za=new zr({updateOn:"",updateOnDefault:!0,debounce:0,getterSetter:!1,allowInvalid:!1,timezone:null});var qa=function(){function e(e,t){this.$$attrs=e,this.$$scope=t}return e.$inject=["$attrs","$scope"],e.prototype={$onInit:function(){var e=this.parentCtrl?this.parentCtrl.$options:za,t=this.$$scope.$eval(this.$$attrs.ngModelOptions);this.$options=e.createChild(t)}},{restrict:"A",priority:10,require:{parentCtrl:"?^^ngModelOptions"},bindToController:!0,controller:e}},Ba=pr({terminal:!0,priority:1e3}),Wa=t("ngOptions"),Ga=/^\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]+?))?$/,Xa=["$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(Ga);if(!s)throw Wa("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",e,J(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),$=f?function(e,t){return g(r,t)}:function(e){return rt(e)},v=function(e,t){return $(e,_(e,t))},m=o(s[2]||s[1]),y=o(s[3]||""),b=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:v,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=$(l,c);if(t.push(f),s[2]||s[1]){var d=m(r,c);t.push(d)}if(s[4]){var p=b(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=$(p,d),x=m(r,d),k=y(r,d),E=b(r,d),S=new i(g,p,x,k,E);e.push(S),t[g]=S}return{items:e,selectValueMap:t,getOptionFromViewValue:function(e){return t[v(e)]},getViewValueFromOption:function(e){return f?R(e.viewValue):e.viewValue}}}}}function s(e,n,o,s){function c(e,t){var n=u.cloneNode(!1);t.appendChild(n),d(e,n)}function f(e){var t=_.getOptionFromViewValue(e),n=t&&t.element;return n&&!n.selected&&(n.selected=!0),t}function d(e,t){e.element=t,t.disabled=e.disabled,e.label!==t.label&&(t.label=e.label,t.textContent=e.label),t.value=e.selectValue}function p(){var e=_&&h.readValue();if(_)for(var t=_.items.length-1;t>=0;t--){var r=_.items[t];Xe(m(r.group)?r.element.parentNode:r.element)}_=k.getOptions();var i={};if(w&&n.prepend(h.emptyOption),_.items.forEach(function(e){var t;m(e.group)?(t=i[e.group],t||(t=l.cloneNode(!1),E.appendChild(t),t.label=null===e.group?"null":e.group,i[e.group]=t),c(e,t)):c(e,E)}),n[0].appendChild(E),g.$render(),!g.$isEmpty(e)){var o=h.readValue(),a=k.trackBy||$;(a?z(e,o):e===o)||(g.$setViewValue(o),g.$render())}}for(var h=s[0],g=s[1],$=o.multiple,v=0,y=n.children(),b=y.length;v<b;v++)if(""===y[v].value){h.hasEmptyOption=!0,h.emptyOption=y.eq(v);break}var w=!!h.emptyOption,x=Jr(u.cloneNode(!1));x.val("?");var _,k=a(o.ngOptions,n,e),E=i[0].createDocumentFragment();h.generateUnknownOptionValue=function(e){return"?"},$?(h.writeValue=function(e){var t=e&&e.map(f)||[];_.items.forEach(function(e){e.element.selected&&!F(t,e)&&(e.element.selected=!1)})},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(li(g.$viewValue))return g.$viewValue.map(function(e){return k.getTrackByValue(e)})},function(){g.$render()})):(h.writeValue=function(e){var t=_.selectValueMap[n.val()],r=_.getOptionFromViewValue(e);t&&t.element.removeAttribute("selected"),r?(n[0].value!==r.selectValue&&(h.removeUnknownOption(),h.unselectEmptyOption(),n[0].value=r.selectValue,r.element.selected=!0),r.element.setAttribute("selected","selected")):w?h.selectEmptyOption():h.unknownOption.parent().length?h.updateUnknownOption(e):h.renderUnknownOption(e)},h.readValue=function(){var e=_.selectValueMap[n.val()];return e&&!e.disabled?(h.unselectEmptyOption(),h.removeUnknownOption(),_.getViewValueFromOption(e)):null},k.trackBy&&e.$watch(function(){return k.getTrackByValue(g.$viewValue)},function(){g.$render()})),w&&(h.emptyOption.remove(),t(h.emptyOption)(e),h.emptyOption[0].nodeType===_i?(h.hasEmptyOption=!1,h.registerOption=function(e,t){""===t.val()&&(h.hasEmptyOption=!0,h.emptyOption=t,h.emptyOption.removeClass("ng-scope"),g.$render(),t.on("$destroy",function(){h.hasEmptyOption=!1,h.emptyOption=void 0}))}):h.emptyOption.removeClass("ng-scope")),n.empty(),p(),e.$watchCollection(k.getWatchables,p)}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}}}],Ka=["$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)||{},$={},m=t.startSymbol(),y=t.endSymbol(),b=m+f+"-"+h+y,w=ai.noop;r(u,function(e,t){var n=o.exec(t);if(n){var r=(n[1]?"-":"")+Wr(n[2]);g[r]=s.attr(u.$attr[t])}}),r(g,function(e,n){$[n]=t(e.replace(i,b))}),a.$watch(f,function(t){var r=parseFloat(t),i=ui(r);if(i||r in g||(r=e.pluralCat(r-h)),!(r===c||i&&ui(c))){w();var o=$[r];v(o)?(null!=t&&n.debug("ngPluralize: no rule defined for '"+r+"' in "+d),w=p,l()):w=a.$watch(o,l),c=r}})}}}],Ya=["$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],$=h[2],v=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 y=h[3]||h[1],b=h[2];if(v&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(v)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(v)))throw s("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",v);var w,x,_,k,E={$id:rt};return m?w=e(m):(_=function(e,t){return rt(t)},k=function(e){return e}),function(e,t,o,f,h){w&&(x=function(t,n,r){return b&&(E[b]=t),E[y]=n,E.$index=r,w(e,E)});var g=$e();e.$watchCollection($,function(o){var f,$,m,w,E,S,C,A,O,M,T,j,P=t[0],D=$e();if(v&&(e[v]=o),n(o))O=o,A=x||_;else{A=x||k,O=[];for(var V in o)Br.call(o,V)&&"$"!==V.charAt(0)&&O.push(V)}for(w=O.length,T=new Array(w),f=0;f<w;f++)if(E=o===O?f:O[f],S=o[E],C=A(E,S,f),g[C])M=g[C],delete g[C],D[C]=M,T[f]=M;else{if(D[C])throw r(T,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,S);T[f]={id:C,scope:void 0,clone:void 0},D[C]=!0}for(var I in g){if(M=g[I],j=ge(M.clone),i.leave(j),j[0].parentNode)for(f=0,$=j.length;f<$;f++)j[f][a]=!0;M.scope.$destroy()}for(f=0;f<w;f++)if(E=o===O?f:O[f],S=o[E],M=T[f],M.scope){m=P;do m=m.nextSibling;while(m&&m[a]);l(M)!==m&&i.move(ge(M.clone),null,P),P=c(M),u(M.scope,f,y,S,b,E,w)}else h(function(e,t){M.scope=t;var n=p.cloneNode(!1);e[e.length++]=n,i.enter(e,null,P),P=n,M.clone=e,D[M.id]=M,u(M.scope,f,y,S,b,E,w)});g=D})}}}}],Ja="ng-hide",Za="ng-hide-animate",Qa=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngShow,function(t){e[t?"removeClass":"addClass"](n,Ja,{tempClasses:Za})})}}}],es=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngHide,function(t){e[t?"addClass":"removeClass"](n,Ja,{tempClasses:Za})})}}}],ts=pr(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)}),ns=["$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(n){n!==!1&&e.splice(t,1)}};n.$watch(s,function(n){for(var i,o;c.length;)e.cancel(c.pop());for(i=0,o=f.length;i<o;++i){var s=ge(l[i].clone);f[i].$destroy();var p=c[i]=e.leave(s);p.done(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)})})})}}}],rs=pr({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,i,o){var a=n.ngSwitchWhen.split(n.ngSwitchWhenSeparator).sort().filter(function(e,t,n){return n[t-1]!==e});r(a,function(e){i.cases["!"+e]=i.cases["!"+e]||[],i.cases["!"+e].push({transclude:o,element:t})})}}),is=pr({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})}}),os=t("ngTransclude"),as=["$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&&u(e)?t.append(e):(s(),n.$destroy())}function s(){n(e,function(e){t.append(e)})}function u(e){for(var t=0,n=e.length;t<n;t++){var r=e[t];if(r.nodeType!==xi||r.nodeValue.trim())return!0}}if(!o)throw os("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",J(t));r.ngTransclude===r.$attr.ngTransclude&&(r.ngTransclude="");var l=r.ngTransclude||r.ngTranscludeSlot;o(a,null,l),l&&!o.isSlotFilled(l)&&s()}}}}],ss=["$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)}}}}],us={$setViewValue:p,$render:p},ls=["$element","$scope",function(t,n){function r(){u||(u=!0,n.$$postDigest(function(){u=!1,a.ngModelCtrl.$render()}))}function i(e){l||(l=!0,n.$$postDigest(function(){n.$$destroyed||(l=!1,a.ngModelCtrl.$setViewValue(a.readValue()),e&&a.ngModelCtrl.$render())}))}function o(e){e.prop("selected",!0),e.attr("selected",!0)}var a=this,s=new it;a.selectValueMap={},a.ngModelCtrl=us,a.multiple=!1,a.unknownOption=Jr(e.document.createElement("option")),a.hasEmptyOption=!1,a.emptyOption=void 0,a.renderUnknownOption=function(e){var n=a.generateUnknownOptionValue(e);a.unknownOption.val(n),t.prepend(a.unknownOption),o(a.unknownOption),t.val(n)},a.updateUnknownOption=function(e){var n=a.generateUnknownOptionValue(e);a.unknownOption.val(n),o(a.unknownOption),t.val(n)},a.generateUnknownOptionValue=function(e){
|
8 |
return"? "+rt(e)+" ?"},a.removeUnknownOption=function(){a.unknownOption.parent()&&a.unknownOption.remove()},a.selectEmptyOption=function(){a.emptyOption&&(t.val(""),o(a.emptyOption))},a.unselectEmptyOption=function(){a.hasEmptyOption&&a.emptyOption.removeAttr("selected")},n.$on("$destroy",function(){a.renderUnknownOption=p}),a.readValue=function(){var e=t.val(),n=e in a.selectValueMap?a.selectValueMap[e]:e;return a.hasOption(n)?n:null},a.writeValue=function(e){var n=t[0].options[t[0].selectedIndex];if(n&&n.removeAttribute("selected"),a.hasOption(e)){a.removeUnknownOption();var r=rt(e);t.val(r in a.selectValueMap?r:e);var i=t[0].options[t[0].selectedIndex];o(Jr(i))}else null==e&&a.emptyOption?(a.removeUnknownOption(),a.selectEmptyOption()):a.unknownOption.parent().length?a.updateUnknownOption(e):a.renderUnknownOption(e)},a.addOption=function(e,t){if(t[0].nodeType!==_i){pe(e,'"option value"'),""===e&&(a.hasEmptyOption=!0,a.emptyOption=t);var n=s.get(e)||0;s.put(e,n+1),r()}},a.removeOption=function(e){var t=s.get(e);t&&(1===t?(s.remove(e),""===e&&(a.hasEmptyOption=!1,a.emptyOption=void 0)):s.put(e,t-1))},a.hasOption=function(e){return!!s.get(e)};var u=!1,l=!1;a.registerOption=function(e,t,n,r,o){if(n.$attr.ngValue){var s,u=NaN;n.$observe("value",function(e){var n,r=t.prop("selected");m(u)&&(a.removeOption(s),delete a.selectValueMap[u],n=!0),u=rt(e),s=e,a.selectValueMap[u]=e,a.addOption(e,t),t.attr("value",u),n&&r&&i()})}else r?n.$observe("value",function(e){a.readValue();var n,r=t.prop("selected");m(s)&&(a.removeOption(s),n=!0),s=e,a.addOption(e,t),n&&r&&i()}):o?e.$watch(o,function(e,r){n.$set("value",e);var o=t.prop("selected");r!==e&&a.removeOption(r),a.addOption(e,t),r&&o&&i()}):a.addOption(n.value,t);n.$observe("disabled",function(e){("true"===e||e&&t.prop("selected"))&&(a.multiple?i(!0):(a.ngModelCtrl.$setViewValue(null),a.ngModelCtrl.$render()))}),t.on("$destroy",function(){var e=a.readValue(),t=n.value;a.removeOption(t),a.ngModelCtrl.$render(),(a.multiple&&e&&e.indexOf(t)!==-1||e===t)&&i(!0)})}}],cs=function(){function e(e,t,n,i){var o=i[0],a=i[1];if(!a)return void(o.registerOption=p);if(o.ngModelCtrl=a,t.on("change",function(){o.removeUnknownOption(),e.$apply(function(){a.$setViewValue(o.readValue())})}),n.multiple){o.multiple=!0,o.readValue=function(){var e=[];return r(t.find("option"),function(t){if(t.selected&&!t.disabled){var n=t.value;e.push(n in o.selectValueMap?o.selectValueMap[n]:n)}}),e},o.writeValue=function(e){var n=new it(e);r(t.find("option"),function(e){e.selected=m(n.get(e.value))||m(n.get(o.selectValueMap[e.value]))})};var s,u=NaN;e.$watch(function(){u!==a.$viewValue||z(s,a.$viewValue)||(s=ye(a.$viewValue),a.$render()),u=a.$viewValue}),a.$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:ls,priority:1,link:{pre:e,post:t}}},fs=["$interpolate",function(e){return{restrict:"E",priority:100,compile:function(t,n){var r,i;return m(n.ngValue)||(m(n.value)?r=e(n.value,!0):(i=e(t.text(),!0),i||n.$set("value",t.text()))),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)}}}}],ds=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()}))}}},ps=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,J(n));o=e||void 0,i.$validate()}),i.$validators.pattern=function(e,t){return i.$isEmpty(t)||v(o)||o.test(t)}}}}},hs=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=ui(t)?-1:t,r.$validate()}),r.$validators.maxlength=function(e,t){return i<0||r.$isEmpty(t)||t.length<=i}}}}},gs=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.")):(ce(),xe(ai),ai.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 Jr(function(){oe(e.document,ae)}))}(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)}}),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.13",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<v.length;n++)if(e(t,v[n]))return!0;for(n=0;n<m.length;n++)if(e(t,m[n]))return!0;return!1}if(l){$=[],y=[];for(var n=0;n<l.length;n++)t(l[n])?y.push(l[n]):$.push(l[n])}}function h(e){return angular.isArray(e)?e:[e]}function g(){function e(){t(function(){d(x?v.concat(w):w,x?m.concat(b):b,l,y,_)},E&&E.debounce?E.debounce.change||E.debounce:0)}var o=k?$:w;a(o,r,i,n).then(function(){k?u.validate($,x?v.length:0,n,r,i).then(function(t){w=t.validsFiles,b=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),b.push(n)),e()}}})}var $,v,m,y=[],b=[],w=[];v=r.$$ngfPrevValidFiles||[],m=r.$$ngfPrevInvalidFiles||[],n&&n.$modelValue&&(v=h(n.$modelValue));var x=u.attrGetter("ngfKeep",r,i);$=(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||$.length){u.attrGetter("ngfBeforeModelChange",r,i,{$files:l,$file:l&&l.length?l[0]:null,$newFiles:$,$duplicateFiles:y,$event:c});var k=u.attrGetter("ngfValidateAfterResize",r,i),E=u.attrGetter("ngfModelOptions",r,i);u.validate($,x?v.length:0,n,r,i).then(function(e){f?d($,[],l,y,_):(E&&E.allowInvalid||k?w=$:(w=e.validFiles,b=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 y("ngfChange")||y("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),b.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(!y("ngfSelectDisabled",e)){var r=$(n);if(null!=r)return r;v(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 $(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 v(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 y=function(e,t){return l.attrGetter(e,n,t)};l.registerModelChangeValidator(r,n,e);var b=[];y("ngfMultiple")&&b.push(e.$watch(y("ngfMultiple"),function(){_.attr("multiple",y("ngfMultiple",e))})),y("ngfCapture")&&b.push(e.$watch(y("ngfCapture"),function(){_.attr("capture",y("ngfCapture",e))})),y("ngfAccept")&&b.push(e.$watch(y("ngfAccept"),function(){_.attr("accept",y("ngfAccept",e))})),b.push(n.$observe("accept",function(){_.attr("accept",y("accept"))}));var w=0,x=0,_=t;c()||(_=h()),_.bind("change",d),c()?t.bind("click",v):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(b,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]);f.width&&f.width.indexOf("px")>-1&&f.height&&f.height.indexOf("px")>-1&&(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)||"")}}])}(),
|
9 |
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 $=[o.emptyPromise(!0)];e&&(e=void 0===e.length?[e]:e,angular.forEach(e,function(e){var r=t.defer();return $.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 v=t.defer();return t.all($).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}),v.resolve(t)}),v.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 $=r(e,t,i,o,l);d.width=Math.min($.width,i),d.height=Math.min($.height,o);var v=d.getContext("2d");v.drawImage(p,Math.min(0,-$.marginX/2),Math.min(0,-$.marginY/2),$.width,$.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")||m("ngfDropDisabled",e)}function d(t,n,r){if(t){var i;try{i=t&&t.getData&&t.getData("text/html")}catch(o){}$(t.items,t.files,m("ngfAllowDir",e)!==!1,m("multiple")||m("ngfMultiple",e)).then(function(e){e.length?p(e,n):h(r,i).then(function(e){p(e,n)})})}}function p(t,n){u.updateModel(i,r,e,m("ngfChange")||m("ngfDrop"),t,n)}function h(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 g(e,t,n,r){var i=m("ngfDragOverClass",e,{$event:n}),o="dragover";if(angular.isString(i))o=i;else if(i&&(i.delay&&(x=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 $(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 $=0;$<t.length;$++){if(t[$].webkitGetAsEntry&&t[$].webkitGetAsEntry()&&t[$].webkitGetAsEntry().isDirectory){var v=t[$].webkitGetAsEntry();if(v.isDirectory&&!i)continue;null!=v&&g.push(a(v))}else{var y=t[$].getAsFile();null!=y&&(p.push(y),h+=y.size)}if(p.length>l||h>f||!o&&p.length>0)break}else if(null!=n)for(var b=0;b<n.length;b++){var w=n.item(b);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 y,b=null,w=o(m("ngfStopPropagation")),x=1;n[0].addEventListener("dragover",function(t){if(!f()&&u.shouldUpdateOn("drop",r,e)){if(t.preventDefault(),w(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),y||(y="C",g(e,r,t,function(r){y=r,n.addClass(y),m("ngfDrag",e,{$isDragging:!0,$class:y,$event:t})}))}},!1),n[0].addEventListener("dragenter",function(t){!f()&&u.shouldUpdateOn("drop",r,e)&&(t.preventDefault(),w(e)&&t.stopPropagation())},!1),n[0].addEventListener("dragleave",function(t){!f()&&u.shouldUpdateOn("drop",r,e)&&(t.preventDefault(),w(e)&&t.stopPropagation(),b=a(function(){y&&n.removeClass(y),y=null,m("ngfDrag",e,{$isDragging:!1,$event:t})},x||100))},!1),n[0].addEventListener("drop",function(t){!f()&&u.shouldUpdateOn("drop",r,e)&&(t.preventDefault(),w(e)&&t.stopPropagation(),y&&n.removeClass(y),y=null,d(t.dataTransfer,t,"dropUrl"))},!1),n[0].addEventListener("paste",function(t){navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&m("ngfEnableFirefoxPaste",e)&&t.preventDefault(),!f()&&u.shouldUpdateOn("paste",r,e)&&d(t.clipboardData||t.originalEvent.clipboardData,t,"pasteUrl")},!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}])},{}],44:[function(e,t,n){e("./dist/ng-file-upload-all"),t.exports="ngFileUpload"},{"./dist/ng-file-upload-all":43}]},{},[37]);
|
js/jpibfi.client.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function t(e,n,i){function r(a,u){if(!n[a]){if(!e[a]){var s="function"==typeof require&&require;if(!u&&s)return s(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:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return r(n?n:t)},c,c.exports,t,e,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.siteTitle,r=void 0===n?"":n;i(this,t),this.desc_funcs={img_title:function(t){return t.attr("title")},img_alt:function(t){return t.attr("alt")},post_title:function(t){return t.attr("data-jpibfi-post-title")},post_excerpt:function(t){return t.attr("data-jpibfi-post-excerpt")},img_description:function(t){return t.attr("data-jpibfi-description")},img_caption:function(t){return t.attr("data-jpibfi-caption")},site_title:function(){return r}}}return r(t,[{key:"getDescription",value:function(t,e){for(var n="",i=0;i<e.length&&!n;i++)n=this.desc_funcs[e[i]](t);return n||""}}]),t}();n["default"]=o},{}],2:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(){function t(e){var n=this;i(this,t),this.flags={},this.pluginName=e;var r="undefined"!=typeof console&&"undefined"!=typeof console.log,o="undefined"!=typeof JSON&&"function"==typeof JSON.stringify;r?(this.logString=function(t){n.log(t)},this.logObject=o?function(t){n.log(JSON.stringify(t,null,4))}:function(t){return n.simplelogObject(t)}):(this.logString=function(){},this.logObject=function(){})}return r(t,[{key:"getFlag",value:function(t){return!!this.flags[t]}},{key:"log",value:function(t){this.getFlag("print")&&console.log(this.pluginName+" debug: "+t)}},{key:"setFlag",value:function(t){this.flags[t]=!0}},{key:"simplelogObject",value:function(t){if(this.getFlag("print")){var e=Object.keys(t).filter(function(e){return t.hasOwnPrototype(e)}).map(function(e){return e+": "+t[e]+"\n"}).join();this.log(e)}}}]),t}();n["default"]=o},{}],3:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=t("./link-generator"),u=i(a),s=function(){function t(e,n){r(this,t),this.$=e,this.settings=n,this.linkGenerator=new u["default"](n),this.$element=this.$("<a />",{target:"_blank","class":"pinit-button "+n.pin_image});var i="default"===n.pin_image?"jpibfi-icon-"+n.pin_image_icon:"";this.$element.html('<span class="'+i+'"></span>'),"default"===n.pin_image&&this.$element.addClass("jpibfi-size-"+n.pin_image_size+" jpibfi-button-"+n.pin_image_button),this.size={height:n.pinImageHeight,width:n.pinImageWidth}}return o(t,[{key:"createButton",value:function(t){var e=this.$element.clone(!1);return e.attr("href",this.linkGenerator.generate(t)).click(function(t){t.preventDefault(),t.stopPropagation(),"#"!==t.currentTarget.href.slice(-1)&&window.open(t.currentTarget.href,"mw"+t.timeStamp,"left=20,top=20,width=500,height=500,toolbar=1,resizable=0")}),{$element:e,size:this.size}}}]),t}();n["default"]=s},{"./link-generator":6}],4:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(){function t(e){var n=this;i(this,t),this.settings=e,this.disabledClasses=this.createClassList(e.disabled_classes),this.enabledClasses=this.createClassList(e.enabled_classes),this.updateSizeConstraints(),window.addEventListener("resize",function(){return n.updateSizeConstraints()},!1)}return r(t,[{key:"createClassList",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.split(";").filter(function(t){return!!t})}},{key:"imageEligible",value:function(t){return this.enabledClasses.every(function(e){return t.hasClass(e)})&&!this.disabledClasses.some(function(e){return t.hasClass(e)})&&this.imageSizeIsOk(t)}},{key:"imageSizeIsOk",value:function(t){var e=t[0].clientWidth,n=t[0].clientHeight;return e>=this.minWidth&&n>=this.minHeight}},{key:"updateSizeConstraints",value:function(){this.minWidth=window.outerWidth<768?this.settings.min_image_width_small:this.settings.min_image_width,this.minHeight=window.outerWidth<768?this.settings.min_image_height_small:this.settings.min_image_height}}]),t}();n["default"]=o},{}],5:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=t("./show-on-hover-strategy"),u=i(a),s=function(){function t(e,n,i){r(this,t),this.settings=n,this.$=e,this.logger=i}return o(t,[{key:"init",value:function(){this.showStrategy=this.getStrategy(),this.showStrategy.start()}},{key:"getStrategy",value:function(){var t=null;return new(t=u["default"])(this.$,this.settings,this.logger)}}]),t}();n["default"]=s},{"./show-on-hover-strategy":8}],6:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=t("./../common/description-helper"),u=i(a),s=function(){function t(e){r(this,t),this.descriptionHelper=new u["default"]({siteTitle:e.siteTitle}),this.pinLinkedImages=e.pinLinkedImages,this.description_option=e.description_option,this.desc_funcs={img_title:function(t){return t.attr("title")},img_alt:function(t){return t.attr("alt")},post_title:function(t){return t.attr("data-jpibfi-post-title")},img_description:function(t){return t.attr("data-jpibfi-description")},img_caption:function(t){return t.attr("data-jpibfi-caption")},site_title:function(){return e.siteTitle}}}return o(t,[{key:"getDescription",value:function(t){return this.descriptionHelper.getDescription(t,this.description_option)}},{key:"getImage",value:function(t){var e=t.prop?t.prop("src"):t.attr("src");if(!this.pinLinkedImages)return e;var n=t.closest("a");if(0===n.length)return e;var i=e.split(".").pop(),r=n.attr("href"),o=r.split(".").pop();return o.toLowerCase()===i.toLowerCase()?r:e}},{key:"getUrl",value:function(t){return t.attr("data-jpibfi-post-url")||window.location.href}},{key:"generate",value:function(t){var e=encodeURIComponent(this.getDescription(t)),n=encodeURIComponent(this.getUrl(t)),i=encodeURIComponent(this.getImage(t));return"http://pinterest.com/pin/create/bookmarklet/?is_video=false&url="+n+"&media="+i+"&description="+e}}]),t}();n["default"]=s},{"./../common/description-helper":1}],7:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(t,e,n,i){return t.top+i.top},a=function(t,e,n,i){return t.left+i.left},u=function(t,e,n,i){return e.top-n.height-i.bottom},s=function(t,e,n,i){return e.left-i.right-n.width},l=function(t,e,n){return t.top+((e.top-t.top)/2-n.height/2)},c=function(t,e,n){return t.left+((e.left-t.left)/2-n.width/2)},f=function(){function t(e,n){i(this,t),this.topF=e,this.leftF=n}return r(t,[{key:"calculate",value:function(t,e,n,i){return{top:this.topF(t,e,n,i),left:this.leftF(t,e,n,i)}}}]),t}(),p=function(){function t(e,n){i(this,t),this.margins=n,this.positionCalculator=this.getPositionCalculator(e)}return r(t,[{key:"getPositionCalculator",value:function(t){switch(t){case"top-left":return new f(o,a);case"top-right":return new f(o,s);case"bottom-left":return new f(u,a);case"bottom-right":return new f(u,s);case"center":default:return new f(l,c)}}},{key:"calculatePosition",value:function(t,e,n){return this.positionCalculator.calculate(t,e,n,this.margins)}}]),t}();n["default"]=p},{}],8:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),s=t("./show-strategy"),l=i(s),c=function(t){function e(){return r(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),u(e,[{key:"init",value:function(){var t=this,e=function(){return t.$(".jpibfi").closest("div").addClass("jpibfi_container")};e()}},{key:"start",value:function(){var t=this;this.init();var e="data-jpibfi-timeout",n=0,i=function(e){return t.$("a.pinit-button["+t.indexerAttr+'="'+e+'"]')},r=this;r.$(document).delegate(this.settings.image_selector,"mouseenter",function(){var t=r.$(this);if(r.imageFilter.imageEligible(t)){t.addClass("pinit-hover");var o=t.attr(r.indexerAttr);o||(o=n++,t.attr(r.indexerAttr,o));var a=i(o);0===a.length?!function(){var n=r.buttonGenerator.createButton(t),i=n.$element,a=n.size,u=t.offset(),s={top:u.top+t[0].clientHeight,left:u.left+t[0].clientWidth},l=r.positioner.calculatePosition(u,s,a);t.after(i),i.attr(r.indexerAttr,o).css("visibility","hidden").show().offset(l).css("visibility","visible").hover(function(){return clearTimeout(i.attr(e))},function(){return i.attr(e,setTimeout(function(){t.removeClass("pinit-hover"),i.remove()},100))})}():clearTimeout(a.attr(e))}}),r.$(document).delegate(this.settings.image_selector,"mouseleave",function(){if(!r.logger.getFlag("prevent_hide")){var t=r.$(this),n=t.attr(r.indexerAttr);if(n){var o=i(n);o.attr(e,setTimeout(function(){t.removeClass("pinit-hover"),o.remove()},100))}}})}}]),e}(l["default"]);n["default"]=c},{"./show-strategy":9}],9:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=t("./image-filter"),a=i(o),u=t("./button-generator"),s=i(u),l=t("./positioner"),c=i(l),f=function p(t,e,n){r(this,p),this.$=t,this.settings=e,this.logger=n,this.imageFilter=new a["default"](e),this.buttonGenerator=new s["default"](t,e);var i={left:e.button_margin_left,top:e.button_margin_top,right:e.button_margin_right,bottom:e.button_margin_bottom};this.positioner=new c["default"](e.button_position,i),this.indexerAttr="data-jpibfi-indexer"};n["default"]=f},{"./button-generator":3,"./image-filter":4,"./positioner":7}],10:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var r=t("./settings"),o=i(r),a=t("./debugger"),u=i(a),s=t("./hover"),l=i(s);!function(t){var e=window.jpibfi_options,n=new o["default"](t.extend({pageUrl:document.URL,pageTitle:document.title,pageDescription:t('meta[name="description"]').attr("content")||""},e.hover)),i=new u["default"]("jpibfi");window.jpibfi_debugger=i;var r=function(){var e=new l["default"](t,n,i);e.init()};t(document).ready(r)}(jQuery)},{"./debugger":2,"./hover":5,"./settings":11}],11:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function o(t){var e=this;i(this,o),Object.keys(t).forEach(function(n){e[n]=t[n]}),this.isTouchDevice="ontouchstart"in window||{}.hasOwnProperty.call(navigator,"maxTouchPoints")};n["default"]=r},{}]},{},[10]);
|
1 |
+
!function t(e,n,i){function r(a,u){if(!n[a]){if(!e[a]){var s="function"==typeof require&&require;if(!u&&s)return s(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:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return r(n?n:t)},c,c.exports,t,e,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.siteTitle,r=void 0===n?"":n;i(this,t),this.desc_funcs={img_title:function(t){return t.attr("title")},img_alt:function(t){return t.attr("alt")},post_title:function(t){return t.attr("data-jpibfi-post-title")},post_excerpt:function(t){return t.attr("data-jpibfi-post-excerpt")},img_description:function(t){return t.attr("data-jpibfi-description")},img_caption:function(t){return t.attr("data-jpibfi-caption")},site_title:function(){return r}}}return r(t,[{key:"getDescription",value:function(t,e){for(var n="",i=0;i<e.length&&!n;i++)n=this.desc_funcs[e[i]](t);return n||""}}]),t}();n["default"]=o},{}],2:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(){function t(e){var n=this;i(this,t),this.flags={},this.pluginName=e;var r="undefined"!=typeof console&&"undefined"!=typeof console.log,o="undefined"!=typeof JSON&&"function"==typeof JSON.stringify;r?(this.logString=function(t){n.log(t)},this.logObject=o?function(t){n.log(JSON.stringify(t,null,4))}:function(t){return n.simplelogObject(t)}):(this.logString=function(){},this.logObject=function(){});var a=this.getQueryParams(document.location.search);Object.keys(a).forEach(function(t){var i=t.replace(e+"_","");n.setFlag(i,a[t])})}return r(t,[{key:"getFlag",value:function(t){return void 0!=this.flags[t]&&this.flags[t]}},{key:"getQueryParams",value:function(t){t=t.split("+").join(" ");for(var e={},n=void 0,i=/[?&]?([^=]+)=([^&]*)/g;n=i.exec(t);)e[decodeURIComponent(n[1])]=decodeURIComponent(n[2]);return e}},{key:"log",value:function(t){this.getFlag("print")&&console.log(this.pluginName+" debug: "+t)}},{key:"setFlag",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.flags[t]=e}},{key:"simplelogObject",value:function(t){if(this.getFlag("print")){var e=Object.keys(t).filter(function(e){return t.hasOwnPrototype(e)}).map(function(e){return e+": "+t[e]+"\n"}).join();this.log(e)}}}]),t}();n["default"]=o},{}],3:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=t("./link-generator"),u=i(a),s=function(){function t(e,n){r(this,t),this.$=e,this.settings=n,this.linkGenerator=new u["default"](n),this.$element=this.$("<a />",{target:"_blank","class":"pinit-button "+n.pin_image});var i="default"===n.pin_image?"jpibfi-icon-"+n.pin_image_icon:"";this.$element.html('<span class="'+i+'"></span>'),"default"===n.pin_image&&this.$element.addClass("jpibfi-size-"+n.pin_image_size+" jpibfi-button-"+n.pin_image_button),this.size={height:n.pinImageHeight,width:n.pinImageWidth}}return o(t,[{key:"createButton",value:function(t){var e=this.$element.clone(!1);return e.attr("href",this.linkGenerator.generate(t)).click(function(t){t.preventDefault(),t.stopPropagation(),"#"!==t.currentTarget.href.slice(-1)&&window.open(t.currentTarget.href,"mw"+t.timeStamp,"left=20,top=20,width=500,height=500,toolbar=1,resizable=0")}),{$element:e,size:this.size}}}]),t}();n["default"]=s},{"./link-generator":6}],4:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(){function t(e){var n=this;i(this,t),this.settings=e,this.disabledClasses=this.createClassList(e.disabled_classes),this.enabledClasses=this.createClassList(e.enabled_classes),this.updateSizeConstraints(),window.addEventListener("resize",function(){return n.updateSizeConstraints()},!1)}return r(t,[{key:"createClassList",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.split(";").filter(function(t){return!!t})}},{key:"imageEligible",value:function(t){return this.enabledClasses.every(function(e){return t.hasClass(e)})&&!this.disabledClasses.some(function(e){return t.hasClass(e)})&&this.imageSizeIsOk(t)}},{key:"imageSizeIsOk",value:function(t){var e=t[0].clientWidth,n=t[0].clientHeight;return e>=this.minWidth&&n>=this.minHeight}},{key:"updateSizeConstraints",value:function(){this.minWidth=window.outerWidth<768?this.settings.min_image_width_small:this.settings.min_image_width,this.minHeight=window.outerWidth<768?this.settings.min_image_height_small:this.settings.min_image_height}}]),t}();n["default"]=o},{}],5:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=t("./show-on-hover-strategy"),u=i(a),s=function(){function t(e,n,i){r(this,t),this.settings=n,this.$=e,this.logger=i}return o(t,[{key:"init",value:function(){this.showStrategy=this.getStrategy(),this.showStrategy.start()}},{key:"getStrategy",value:function(){var t=null;return new(t=u["default"])(this.$,this.settings,this.logger)}}]),t}();n["default"]=s},{"./show-on-hover-strategy":8}],6:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=t("./../common/description-helper"),u=i(a),s=function(){function t(e){r(this,t),this.descriptionHelper=new u["default"]({siteTitle:e.siteTitle}),this.pinLinkedImages=e.pinLinkedImages,this.description_option=e.description_option,this.desc_funcs={img_title:function(t){return t.attr("title")},img_alt:function(t){return t.attr("alt")},post_title:function(t){return t.attr("data-jpibfi-post-title")},img_description:function(t){return t.attr("data-jpibfi-description")},img_caption:function(t){return t.attr("data-jpibfi-caption")},site_title:function(){return e.siteTitle}}}return o(t,[{key:"getDescription",value:function(t){return this.descriptionHelper.getDescription(t,this.description_option)}},{key:"getImage",value:function(t){var e=t.prop?t.prop("src"):t.attr("src");if(!this.pinLinkedImages)return e;var n=t.closest("a");if(0===n.length)return e;var i=e.split(".").pop(),r=n.attr("href"),o=r.split(".").pop();return o.toLowerCase()===i.toLowerCase()?r:e}},{key:"getUrl",value:function(t){return t.attr("data-jpibfi-post-url")||window.location.href}},{key:"generate",value:function(t){var e=encodeURIComponent(this.getDescription(t)),n=encodeURIComponent(this.getUrl(t)),i=encodeURIComponent(this.getImage(t));return"http://pinterest.com/pin/create/bookmarklet/?is_video=false&url="+n+"&media="+i+"&description="+e}}]),t}();n["default"]=s},{"./../common/description-helper":1}],7:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(t,e,n,i){return t.top+i.top},a=function(t,e,n,i){return t.left+i.left},u=function(t,e,n,i){return e.top-n.height-i.bottom},s=function(t,e,n,i){return e.left-i.right-n.width},l=function(t,e,n){return t.top+((e.top-t.top)/2-n.height/2)},c=function(t,e,n){return t.left+((e.left-t.left)/2-n.width/2)},f=function(){function t(e,n){i(this,t),this.topF=e,this.leftF=n}return r(t,[{key:"calculate",value:function(t,e,n,i){return{top:this.topF(t,e,n,i),left:this.leftF(t,e,n,i)}}}]),t}(),p=function(){function t(e,n){i(this,t),this.margins=n,this.positionCalculator=this.getPositionCalculator(e)}return r(t,[{key:"getPositionCalculator",value:function(t){switch(t){case"top-left":return new f(o,a);case"top-right":return new f(o,s);case"bottom-left":return new f(u,a);case"bottom-right":return new f(u,s);case"center":default:return new f(l,c)}}},{key:"calculatePosition",value:function(t,e,n){return this.positionCalculator.calculate(t,e,n,this.margins)}}]),t}();n["default"]=p},{}],8:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),s=t("./show-strategy"),l=i(s),c=function(t){function e(){return r(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),u(e,[{key:"init",value:function(){var t=this,e=function(){return t.$(".jpibfi").closest("div").addClass("jpibfi_container")};e()}},{key:"start",value:function(){var t=this;this.init();var e="data-jpibfi-timeout",n=0,i=function(e){return t.$("a.pinit-button["+t.indexerAttr+'="'+e+'"]')},r=this;r.$(document).delegate(this.settings.image_selector,"mouseenter",function(){var t=r.$(this);if(r.imageFilter.imageEligible(t)){t.addClass("pinit-hover");var o=t.attr(r.indexerAttr);o||(o=n++,t.attr(r.indexerAttr,o));var a=i(o);0===a.length?!function(){var n=r.buttonGenerator.createButton(t),i=n.$element,a=n.size,u=t.offset(),s={top:u.top+t[0].clientHeight,left:u.left+t[0].clientWidth},l=r.positioner.calculatePosition(u,s,a);t.after(i),i.attr(r.indexerAttr,o).css("visibility","hidden").show().offset(l).css("visibility","visible").hover(function(){return clearTimeout(i.attr(e))},function(){return i.attr(e,setTimeout(function(){t.removeClass("pinit-hover"),i.remove()},100))})}():clearTimeout(a.attr(e))}}),r.$(document).delegate(this.settings.image_selector,"mouseleave",function(){if(!r.logger.getFlag("prevent_hide")){var t=r.$(this),n=t.attr(r.indexerAttr);if(n){var o=i(n);o.attr(e,setTimeout(function(){t.removeClass("pinit-hover"),o.remove()},100))}}})}}]),e}(l["default"]);n["default"]=c},{"./show-strategy":9}],9:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=t("./image-filter"),a=i(o),u=t("./button-generator"),s=i(u),l=t("./positioner"),c=i(l),f=function p(t,e,n){r(this,p),this.$=t,this.settings=e,this.logger=n,this.imageFilter=new a["default"](e),this.buttonGenerator=new s["default"](t,e);var i={left:e.button_margin_left,top:e.button_margin_top,right:e.button_margin_right,bottom:e.button_margin_bottom};this.positioner=new c["default"](e.button_position,i),this.indexerAttr="data-jpibfi-indexer"};n["default"]=f},{"./button-generator":3,"./image-filter":4,"./positioner":7}],10:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var r=t("./settings"),o=i(r),a=t("./debugger"),u=i(a),s=t("./hover"),l=i(s);!function(t){var e=window.jpibfi_options,n=new o["default"](t.extend({pageUrl:document.URL,pageTitle:document.title,pageDescription:t('meta[name="description"]').attr("content")||""},e.hover)),i=new u["default"]("jpibfi");window.jpibfi_debugger=i;var r=function(){var e=new l["default"](t,n,i);e.init()};t(document).ready(r)}(jQuery)},{"./debugger":2,"./hover":5,"./settings":11}],11:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function o(t){var e=this;i(this,o),Object.keys(t).forEach(function(n){e[n]=t[n]}),this.isTouchDevice="ontouchstart"in window||{}.hasOwnProperty.call(navigator,"maxTouchPoints")};n["default"]=r},{}]},{},[10]);
|
languages/jquery-pin-it-button-for-images.pot
CHANGED
@@ -95,7 +95,7 @@ msgstr ""
|
|
95 |
msgid "<a href=\"%s\" class=\"button button-primary\">Go to Advanced settings</a>"
|
96 |
msgstr ""
|
97 |
|
98 |
-
#: includes/admin/JPIBFI_Welcome_Screen.php:179, includes/admin/settings/jpibfi-import-export-settings.php:
|
99 |
msgid "Import/Export"
|
100 |
msgstr ""
|
101 |
|
@@ -115,7 +115,7 @@ msgstr ""
|
|
115 |
msgid "If you're stuck and can't get the plugin to work the way you want it to, get help!"
|
116 |
msgstr ""
|
117 |
|
118 |
-
#: includes/admin/JPIBFI_Welcome_Screen.php:209, includes/admin/jpibfi-admin.php:
|
119 |
msgid "Documentation"
|
120 |
msgstr ""
|
121 |
|
@@ -123,7 +123,7 @@ msgstr ""
|
|
123 |
msgid "If you are having difficulties with some aspects of the plugin, the first place to look for help is <a href=\"%s\" target=\"_blank\">the documentation</a> of the plugin. Chances are you will find what you are looking for there."
|
124 |
msgstr ""
|
125 |
|
126 |
-
#: includes/admin/JPIBFI_Welcome_Screen.php:217, includes/admin/jpibfi-admin.php:
|
127 |
msgid "Support"
|
128 |
msgstr ""
|
129 |
|
@@ -139,19 +139,19 @@ msgstr ""
|
|
139 |
msgid "In most cases, the plugin is ready to go without any configuration. If there is anything you would like to change, go to the <a href=\"%s\">Settings panel</a>."
|
140 |
msgstr ""
|
141 |
|
142 |
-
#: includes/admin/jpibfi-admin.php:
|
143 |
msgid "Save Changes"
|
144 |
msgstr ""
|
145 |
|
146 |
-
#: includes/admin/jpibfi-admin.php:
|
147 |
msgid "Saving changes ..."
|
148 |
msgstr ""
|
149 |
|
150 |
-
#: includes/admin/jpibfi-admin.php:
|
151 |
msgid "jQuery Pin It Button For Images Options"
|
152 |
msgstr ""
|
153 |
|
154 |
-
#: includes/admin/jpibfi-admin.php:
|
155 |
msgid "jQuery Pin It Button for Images Pro is available. <a class=\"button button-primary\" href=\"%1$s\" target=\"_blank\">Check it out →</a>"
|
156 |
msgstr ""
|
157 |
|
@@ -183,31 +183,31 @@ msgstr ""
|
|
183 |
msgid "post_thumbnail_html priority"
|
184 |
msgstr ""
|
185 |
|
186 |
-
#: includes/admin/settings/jpibfi-import-export-settings.php:
|
187 |
msgid "The file did not upload properly. Please try again."
|
188 |
msgstr ""
|
189 |
|
190 |
-
#: includes/admin/settings/jpibfi-import-export-settings.php:
|
191 |
msgid "The export file could not be found at <code>%s</code>. It is likely that this was caused by a permissions problem."
|
192 |
msgstr ""
|
193 |
|
194 |
-
#: includes/admin/settings/jpibfi-import-export-settings.php:
|
195 |
msgid "The path is not a file, please try again."
|
196 |
msgstr ""
|
197 |
|
198 |
-
#: includes/admin/settings/jpibfi-import-export-settings.php:
|
199 |
msgid "Export"
|
200 |
msgstr ""
|
201 |
|
202 |
-
#: includes/admin/settings/jpibfi-import-export-settings.php:
|
203 |
msgid "Download Export File"
|
204 |
msgstr ""
|
205 |
|
206 |
-
#: includes/admin/settings/jpibfi-import-export-settings.php:
|
207 |
msgid "Import"
|
208 |
msgstr ""
|
209 |
|
210 |
-
#: includes/admin/settings/jpibfi-import-export-settings.php:
|
211 |
msgid "Import Settings"
|
212 |
msgstr ""
|
213 |
|
95 |
msgid "<a href=\"%s\" class=\"button button-primary\">Go to Advanced settings</a>"
|
96 |
msgstr ""
|
97 |
|
98 |
+
#: includes/admin/JPIBFI_Welcome_Screen.php:179, includes/admin/settings/jpibfi-import-export-settings.php:175
|
99 |
msgid "Import/Export"
|
100 |
msgstr ""
|
101 |
|
115 |
msgid "If you're stuck and can't get the plugin to work the way you want it to, get help!"
|
116 |
msgstr ""
|
117 |
|
118 |
+
#: includes/admin/JPIBFI_Welcome_Screen.php:209, includes/admin/jpibfi-admin.php:211
|
119 |
msgid "Documentation"
|
120 |
msgstr ""
|
121 |
|
123 |
msgid "If you are having difficulties with some aspects of the plugin, the first place to look for help is <a href=\"%s\" target=\"_blank\">the documentation</a> of the plugin. Chances are you will find what you are looking for there."
|
124 |
msgstr ""
|
125 |
|
126 |
+
#: includes/admin/JPIBFI_Welcome_Screen.php:217, includes/admin/jpibfi-admin.php:219
|
127 |
msgid "Support"
|
128 |
msgstr ""
|
129 |
|
139 |
msgid "In most cases, the plugin is ready to go without any configuration. If there is anything you would like to change, go to the <a href=\"%s\">Settings panel</a>."
|
140 |
msgstr ""
|
141 |
|
142 |
+
#: includes/admin/jpibfi-admin.php:253, includes/admin/settings/jpibfi-settings-base.php:59
|
143 |
msgid "Save Changes"
|
144 |
msgstr ""
|
145 |
|
146 |
+
#: includes/admin/jpibfi-admin.php:265
|
147 |
msgid "Saving changes ..."
|
148 |
msgstr ""
|
149 |
|
150 |
+
#: includes/admin/jpibfi-admin.php:321
|
151 |
msgid "jQuery Pin It Button For Images Options"
|
152 |
msgstr ""
|
153 |
|
154 |
+
#: includes/admin/jpibfi-admin.php:371
|
155 |
msgid "jQuery Pin It Button for Images Pro is available. <a class=\"button button-primary\" href=\"%1$s\" target=\"_blank\">Check it out →</a>"
|
156 |
msgstr ""
|
157 |
|
183 |
msgid "post_thumbnail_html priority"
|
184 |
msgstr ""
|
185 |
|
186 |
+
#: includes/admin/settings/jpibfi-import-export-settings.php:63
|
187 |
msgid "The file did not upload properly. Please try again."
|
188 |
msgstr ""
|
189 |
|
190 |
+
#: includes/admin/settings/jpibfi-import-export-settings.php:79
|
191 |
msgid "The export file could not be found at <code>%s</code>. It is likely that this was caused by a permissions problem."
|
192 |
msgstr ""
|
193 |
|
194 |
+
#: includes/admin/settings/jpibfi-import-export-settings.php:93
|
195 |
msgid "The path is not a file, please try again."
|
196 |
msgstr ""
|
197 |
|
198 |
+
#: includes/admin/settings/jpibfi-import-export-settings.php:147
|
199 |
msgid "Export"
|
200 |
msgstr ""
|
201 |
|
202 |
+
#: includes/admin/settings/jpibfi-import-export-settings.php:151
|
203 |
msgid "Download Export File"
|
204 |
msgstr ""
|
205 |
|
206 |
+
#: includes/admin/settings/jpibfi-import-export-settings.php:155
|
207 |
msgid "Import"
|
208 |
msgstr ""
|
209 |
|
210 |
+
#: includes/admin/settings/jpibfi-import-export-settings.php:157
|
211 |
msgid "Import Settings"
|
212 |
msgstr ""
|
213 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ 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.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,12 +68,17 @@ Please report them in the plugin's support forum on Wordpress.org.
|
|
68 |
|
69 |
== Changelog ==
|
70 |
|
|
|
|
|
|
|
|
|
|
|
71 |
= 2.2.1 =
|
72 |
-
*
|
73 |
* Fixed issue with saving custom images
|
74 |
|
75 |
= 2.2.0 =
|
76 |
-
*
|
77 |
* Settings panel switched to saving via form submit instead of an Ajax request to avoid conflicts with security plugins
|
78 |
* Settings panel cleanup
|
79 |
|
@@ -291,6 +296,9 @@ Please report them in the plugin's support forum on Wordpress.org.
|
|
291 |
|
292 |
== Upgrade Notice ==
|
293 |
|
|
|
|
|
|
|
294 |
= 2.2.1 =
|
295 |
* Fixed issue with saving custom images
|
296 |
|
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.2.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.2.3 =
|
72 |
+
* Released 2017-01-29
|
73 |
+
* Minor cleanup
|
74 |
+
* Enhanced type checking to reduce errors caused by type mismatch even further
|
75 |
+
|
76 |
= 2.2.1 =
|
77 |
+
* Released 2017-01-22
|
78 |
* Fixed issue with saving custom images
|
79 |
|
80 |
= 2.2.0 =
|
81 |
+
* Released 2017-01-21
|
82 |
* Settings panel switched to saving via form submit instead of an Ajax request to avoid conflicts with security plugins
|
83 |
* Settings panel cleanup
|
84 |
|
296 |
|
297 |
== Upgrade Notice ==
|
298 |
|
299 |
+
= 2.2.3 =
|
300 |
+
* Code cleanup * enhancements to using settings
|
301 |
+
|
302 |
= 2.2.1 =
|
303 |
* Fixed issue with saving custom images
|
304 |
|