Version Description
Download this release
Release Info
Developer | jbutkus |
Plugin | All-in-One Event Calendar |
Version | 2.1.6 |
Comparing to | |
See all releases |
Code changes from version 2.1.5 to 2.1.6
- all-in-one-event-calendar.php +2 -2
- app/config/constants.php +18 -2
- app/controller/extension-license.php +6 -6
- app/controller/extension.php +26 -0
- app/controller/front.php +131 -64
- app/controller/javascript-widget.php +180 -0
- app/controller/javascript.php +27 -3
- app/model/event-compatibility.php +62 -0
- app/model/event.php +28 -46
- app/model/event/creating.php +4 -1
- app/model/event/instance.php +7 -12
- app/model/event/taxonomy.php +50 -12
- app/model/filter/taxonomy.php +12 -10
- app/model/search.php +8 -4
- app/model/settings.php +15 -12
- app/model/taxonomy.php +45 -1
- app/view/admin/add-new-event.php +41 -0
- app/view/admin/add-ons.php +97 -0
- app/view/admin/settings.php +6 -8
- app/view/admin/widget-creator.php +142 -0
- app/view/calendar/fallbacks.php +45 -0
- app/view/calendar/page.php +65 -20
- app/view/calendar/shortcode.php +44 -13
- app/view/calendar/view/agenda.php +60 -13
- app/view/calendar/view/month.php +57 -8
- app/view/calendar/view/oneday.php +101 -38
- app/view/calendar/view/week.php +93 -30
- app/view/calendar/widget.php +216 -101
- app/view/embeddable.php +167 -0
- app/view/event/avatar.php +88 -28
- app/view/event/single.php +30 -5
- language/all-in-one-event-calendar.mo +0 -0
- language/all-in-one-event-calendar.po +276 -137
- language/all-in-one-event-calendar.pot +261 -136
- lib/bootstrap/loader-map.php +540 -0
- lib/bootstrap/registry/object.php +6 -0
- lib/cache/strategy/file.php +30 -5
- lib/calendar-feed/ics.php +2 -0
- lib/command/abstract.php +14 -5
- lib/command/change-theme.php +7 -18
- lib/command/clone.php +8 -23
- lib/command/export-events.php +1 -1
- lib/command/render-calendar.php +11 -8
- lib/command/render-event.php +6 -3
- lib/command/resolver.php +5 -4
- lib/command/save-settings.php +15 -10
- lib/css/frontend.php +30 -19
- lib/date/time.php +13 -3
- lib/date/timezone.php +18 -3
- lib/environment/check.php +112 -0
- lib/environment/exception/addon.php +46 -0
- lib/exception/handler.php +1 -1
- lib/factory/event.php +11 -4
- lib/factory/strategy.php +10 -3
- lib/html/element/href.php +41 -3
- lib/html/element/setting/select.php +1 -0
- lib/html/element/setting/tags-categories.php +4 -2
- lib/http/request.php +34 -2
- lib/http/request/parser.php +4 -1
- lib/http/response/helper.php +17 -0
- lib/http/response/render/strategy/jsonp.php +3 -0
- lib/import-export/ics.php +61 -22
- lib/less/lessphp.php +55 -6
- lib/less/variable/font.php +6 -5
- lib/news/feed.php +91 -0
- lib/notification/admin.php +4 -1
- lib/routing/router.php +10 -2
- lib/theme/compiler.php +7 -1
- lib/theme/file/php.php +1 -0
- lib/theme/loader.php +43 -8
- lib/theme/search.php +4 -4
- lib/twig/ai1ec-extension.php +11 -0
- public/admin/agenda-widget-form.php +8 -8
- public/admin/css/add_new_event.css +7 -0
- public/admin/css/addons.css +30 -0
- public/admin/css/super-widget.css +11 -0
- public/admin/twig/add-ons-list/page.twig +12 -0
- public/admin/twig/banner-image.twig +22 -0
- public/admin/twig/widget-creator/page.twig +13 -0
- public/admin/twig/widget-creator/super-widget-contents.twig +45 -0
- public/js/agenda.js +1 -0
- public/js/build.txt +20 -0
- public/js/external_libs/twig.js +29 -0
- public/js/libs/timepicker_helper.js +1 -1
- public/js/libs/utils.js +1 -1
- public/js/month.js +1 -0
- public/js/oneday.js +1 -0
- public/js/pages/add_new_event.js +1 -1
- public/js/pages/admin_settings.js +1 -1
- public/js/pages/calendar.js +29 -1
all-in-one-event-calendar.php
CHANGED
@@ -5,11 +5,10 @@
|
|
5 |
* Description: A calendar system with month, week, day, agenda views, upcoming events widget, color-coded categories, recurrence, and import/export of .ics feeds.
|
6 |
* Author: Time.ly Network Inc.
|
7 |
* Author URI: http://time.ly/
|
8 |
-
* Version: 2.1.
|
9 |
* Text Domain: all-in-one-event-calendar
|
10 |
* Domain Path: /language
|
11 |
*/
|
12 |
-
|
13 |
$ai1ec_base_dir = dirname( __FILE__ );
|
14 |
$ai1ec_base_url = plugins_url( '', __FILE__ );
|
15 |
|
@@ -45,6 +44,7 @@ $ai1ec_exception_handler = new Ai1ec_Exception_Handler(
|
|
45 |
'Ai1ec_Error_Exception'
|
46 |
);
|
47 |
|
|
|
48 |
// if the user clicked the link to reactivate the plugin
|
49 |
if ( isset( $_GET[Ai1ec_Exception_Handler::DB_REACTIVATE_PLUGIN] ) ) {
|
50 |
$ai1ec_exception_handler->reactivate_plugin();
|
5 |
* Description: A calendar system with month, week, day, agenda views, upcoming events widget, color-coded categories, recurrence, and import/export of .ics feeds.
|
6 |
* Author: Time.ly Network Inc.
|
7 |
* Author URI: http://time.ly/
|
8 |
+
* Version: 2.1.6
|
9 |
* Text Domain: all-in-one-event-calendar
|
10 |
* Domain Path: /language
|
11 |
*/
|
|
|
12 |
$ai1ec_base_dir = dirname( __FILE__ );
|
13 |
$ai1ec_base_url = plugins_url( '', __FILE__ );
|
14 |
|
44 |
'Ai1ec_Error_Exception'
|
45 |
);
|
46 |
|
47 |
+
|
48 |
// if the user clicked the link to reactivate the plugin
|
49 |
if ( isset( $_GET[Ai1ec_Exception_Handler::DB_REACTIVATE_PLUGIN] ) ) {
|
50 |
$ai1ec_exception_handler->reactivate_plugin();
|
app/config/constants.php
CHANGED
@@ -50,7 +50,7 @@ function ai1ec_initiate_constants( $ai1ec_base_dir, $ai1ec_base_url ) {
|
|
50 |
// = Plugin Version =
|
51 |
// ==================
|
52 |
if ( ! defined( 'AI1EC_VERSION' ) ) {
|
53 |
-
define( 'AI1EC_VERSION', '2.1.
|
54 |
}
|
55 |
|
56 |
// ================
|
@@ -359,6 +359,11 @@ function ai1ec_initiate_constants( $ai1ec_base_dir, $ai1ec_base_url ) {
|
|
359 |
define( 'AI1EC_EVENT_PLATFORM', false );
|
360 |
}
|
361 |
|
|
|
|
|
|
|
|
|
|
|
362 |
// If i choose to use the calendar url as the base for events permalinks,
|
363 |
// i must specify another name for the events archive.
|
364 |
if ( ! defined( 'AI1EC_ALTERNATIVE_ARCHIVE_URL' ) ) {
|
@@ -442,6 +447,12 @@ function ai1ec_initiate_constants( $ai1ec_base_dir, $ai1ec_base_url ) {
|
|
442 |
define( 'AI1EC_ADMIN_THEME_IMG_URL', AI1EC_URL . '/public/admin/' . AI1EC_IMG_FOLDER );
|
443 |
}
|
444 |
|
|
|
|
|
|
|
|
|
|
|
|
|
445 |
|
446 |
// Enable All-in-One-Event-Calendar to work in debug mode, which means,
|
447 |
// that cache is ignored, extra output may appear at places, etc.
|
@@ -459,7 +470,7 @@ function ai1ec_initiate_constants( $ai1ec_base_dir, $ai1ec_base_url ) {
|
|
459 |
if ( ! defined( 'AI1EC_CACHE' ) ) {
|
460 |
define( 'AI1EC_CACHE', true );
|
461 |
}
|
462 |
-
|
463 |
if ( ! defined( 'AI1EC_DISABLE_FILE_CACHE' ) ) {
|
464 |
define( 'AI1EC_DISABLE_FILE_CACHE', false );
|
465 |
}
|
@@ -471,4 +482,9 @@ function ai1ec_initiate_constants( $ai1ec_base_dir, $ai1ec_base_url ) {
|
|
471 |
define( 'AI1EC_CACHE_UNAVAILABLE', 'AI1EC_CACHE_UNAVAILABLE' );
|
472 |
}
|
473 |
|
|
|
|
|
|
|
|
|
|
|
474 |
}
|
50 |
// = Plugin Version =
|
51 |
// ==================
|
52 |
if ( ! defined( 'AI1EC_VERSION' ) ) {
|
53 |
+
define( 'AI1EC_VERSION', '2.1.6' );
|
54 |
}
|
55 |
|
56 |
// ================
|
359 |
define( 'AI1EC_EVENT_PLATFORM', false );
|
360 |
}
|
361 |
|
362 |
+
// Use frontend rendering.
|
363 |
+
if ( ! defined( 'AI1EC_USE_FRONTEND_RENDERING' ) ) {
|
364 |
+
define( 'AI1EC_USE_FRONTEND_RENDERING', false );
|
365 |
+
}
|
366 |
+
|
367 |
// If i choose to use the calendar url as the base for events permalinks,
|
368 |
// i must specify another name for the events archive.
|
369 |
if ( ! defined( 'AI1EC_ALTERNATIVE_ARCHIVE_URL' ) ) {
|
447 |
define( 'AI1EC_ADMIN_THEME_IMG_URL', AI1EC_URL . '/public/admin/' . AI1EC_IMG_FOLDER );
|
448 |
}
|
449 |
|
450 |
+
// ====================
|
451 |
+
// = Add-ons list URL =
|
452 |
+
// ====================
|
453 |
+
if ( ! defined( 'AI1EC_TIMELY_ADDONS_URI' ) ) {
|
454 |
+
define( 'AI1EC_TIMELY_ADDONS_URI', 'https://time.ly/?action=addons_list' );
|
455 |
+
}
|
456 |
|
457 |
// Enable All-in-One-Event-Calendar to work in debug mode, which means,
|
458 |
// that cache is ignored, extra output may appear at places, etc.
|
470 |
if ( ! defined( 'AI1EC_CACHE' ) ) {
|
471 |
define( 'AI1EC_CACHE', true );
|
472 |
}
|
473 |
+
|
474 |
if ( ! defined( 'AI1EC_DISABLE_FILE_CACHE' ) ) {
|
475 |
define( 'AI1EC_DISABLE_FILE_CACHE', false );
|
476 |
}
|
482 |
define( 'AI1EC_CACHE_UNAVAILABLE', 'AI1EC_CACHE_UNAVAILABLE' );
|
483 |
}
|
484 |
|
485 |
+
// Defines if backward (<= 2.1.5) theme compatibility is enabled or not.
|
486 |
+
if ( ! defined( 'AI1EC_THEME_COMPATIBILITY_FER' ) ) {
|
487 |
+
define( 'AI1EC_THEME_COMPATIBILITY_FER', false );
|
488 |
+
}
|
489 |
+
|
490 |
}
|
app/controller/extension-license.php
CHANGED
@@ -56,8 +56,8 @@ abstract class Ai1ec_Base_License_Controller extends Ai1ec_Base_Extension_Contro
|
|
56 |
'licenses' => Ai1ec_I18n::__( 'Licenses' ),
|
57 |
),
|
58 |
);
|
59 |
-
} else if ( ! isset( $tabs['extensions']['items']['
|
60 |
-
$tabs['extensions']['items']['
|
61 |
}
|
62 |
return $tabs;
|
63 |
}
|
@@ -82,19 +82,19 @@ abstract class Ai1ec_Base_License_Controller extends Ai1ec_Base_Extension_Contro
|
|
82 |
'item_name' => urlencode( $this->get_name() ),// the name of our product in EDD,
|
83 |
'url' => home_url()
|
84 |
);
|
85 |
-
|
86 |
// Call the custom API.
|
87 |
$response = wp_remote_get( add_query_arg( $api_params, $this->_store ) );
|
88 |
-
|
89 |
// make sure the response came back okay
|
90 |
if ( is_wp_error( $response ) ) {
|
91 |
return false;
|
92 |
}
|
93 |
-
|
94 |
// decode the license data
|
95 |
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
96 |
// $license_data->license will be either "active" or "inactive"
|
97 |
-
|
98 |
$this->_registry->get( 'model.settings' )
|
99 |
->set( $this->_licence_status, $license_data->license );
|
100 |
}
|
56 |
'licenses' => Ai1ec_I18n::__( 'Licenses' ),
|
57 |
),
|
58 |
);
|
59 |
+
} else if ( ! isset( $tabs['extensions']['items']['licenses'] ) ) {
|
60 |
+
$tabs['extensions']['items']['licenses'] = Ai1ec_I18n::__( 'Licences' );
|
61 |
}
|
62 |
return $tabs;
|
63 |
}
|
82 |
'item_name' => urlencode( $this->get_name() ),// the name of our product in EDD,
|
83 |
'url' => home_url()
|
84 |
);
|
85 |
+
|
86 |
// Call the custom API.
|
87 |
$response = wp_remote_get( add_query_arg( $api_params, $this->_store ) );
|
88 |
+
|
89 |
// make sure the response came back okay
|
90 |
if ( is_wp_error( $response ) ) {
|
91 |
return false;
|
92 |
}
|
93 |
+
|
94 |
// decode the license data
|
95 |
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
|
96 |
// $license_data->license will be either "active" or "inactive"
|
97 |
+
|
98 |
$this->_registry->get( 'model.settings' )
|
99 |
->set( $this->_licence_status, $license_data->license );
|
100 |
}
|
app/controller/extension.php
CHANGED
@@ -137,6 +137,7 @@ abstract class Ai1ec_Base_Extension_Controller {
|
|
137 |
$this->_install_schema( $registry );
|
138 |
$this->_register_actions( $registry->get( 'event.dispatcher' ) );
|
139 |
$this->_add_settings( $registry->get( 'model.settings' ) );
|
|
|
140 |
if ( method_exists( $this, 'initialize_licence_actions' ) ) {
|
141 |
$this->initialize_licence_actions();
|
142 |
}
|
@@ -195,6 +196,31 @@ abstract class Ai1ec_Base_Extension_Controller {
|
|
195 |
);
|
196 |
}
|
197 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
/**
|
199 |
* Since the call the to the uninstall hook it's static, if a different behaviour
|
200 |
* is needed also this call must be overridden.
|
137 |
$this->_install_schema( $registry );
|
138 |
$this->_register_actions( $registry->get( 'event.dispatcher' ) );
|
139 |
$this->_add_settings( $registry->get( 'model.settings' ) );
|
140 |
+
$this->_perform_upgrade( $registry );
|
141 |
if ( method_exists( $this, 'initialize_licence_actions' ) ) {
|
142 |
$this->initialize_licence_actions();
|
143 |
}
|
196 |
);
|
197 |
}
|
198 |
|
199 |
+
/**
|
200 |
+
* Performe upgarde actions based on extension version
|
201 |
+
*
|
202 |
+
* @param Ai1ec_Registry_Object $registry
|
203 |
+
*/
|
204 |
+
protected function _perform_upgrade( Ai1ec_Registry_Object $registry ) {
|
205 |
+
$version_variable = 'ai1ec_' . $this->get_machine_name() .
|
206 |
+
'_version';
|
207 |
+
$option = $registry->get( 'model.option' );
|
208 |
+
$version = $option->get( $version_variable );
|
209 |
+
if ( $version !== $this->get_version() ) {
|
210 |
+
$registry->get( 'model.settings' )->perform_upgrade_actions();
|
211 |
+
$this->_perform_upgrade_actions();
|
212 |
+
$option->set( $version_variable, $this->get_version(), true );
|
213 |
+
}
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Function called on add on upgrade.
|
218 |
+
* Can be overridden by add ons for extra behaviour
|
219 |
+
*/
|
220 |
+
protected function _perform_upgrade_actions() {
|
221 |
+
|
222 |
+
}
|
223 |
+
|
224 |
/**
|
225 |
* Since the call the to the uninstall hook it's static, if a different behaviour
|
226 |
* is needed also this call must be overridden.
|
app/controller/front.php
CHANGED
@@ -37,13 +37,9 @@ class Ai1ec_Front_Controller {
|
|
37 |
protected $_default_theme;
|
38 |
|
39 |
/**
|
40 |
-
*
|
41 |
-
*
|
42 |
-
* @param Ai1ec_Loader $ai1ec_loader Instance of Ai1EC classes loader
|
43 |
-
*
|
44 |
-
* @return void
|
45 |
*/
|
46 |
-
public function
|
47 |
// Initialize default theme.
|
48 |
$this->_default_theme = array(
|
49 |
'theme_dir' => AI1EC_DEFAULT_THEME_PATH,
|
@@ -52,6 +48,16 @@ class Ai1ec_Front_Controller {
|
|
52 |
'stylesheet' => AI1EC_DEFAULT_THEME_NAME,
|
53 |
'legacy' => false,
|
54 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
ai1ec_start();
|
56 |
$this->_init( $ai1ec_loader );
|
57 |
$this->_initialize_dispatcher();
|
@@ -60,12 +66,13 @@ class Ai1ec_Front_Controller {
|
|
60 |
$this->_registry->get( 'controller.shutdown' )
|
61 |
->register( 'ai1ec_stop' );
|
62 |
add_action( 'plugins_loaded', array( $this, 'register_extensions' ), 1 );
|
|
|
63 |
add_action( 'init', array( $lessphp, 'invalidate_css_cache_if_requested' ) );
|
64 |
}
|
65 |
|
66 |
/**
|
67 |
* Let other objects access default theme
|
68 |
-
*
|
69 |
* @return array
|
70 |
*/
|
71 |
public function get_default_theme() {
|
@@ -82,27 +89,23 @@ class Ai1ec_Front_Controller {
|
|
82 |
}
|
83 |
|
84 |
/**
|
85 |
-
*
|
86 |
*
|
87 |
-
* @
|
88 |
-
*
|
89 |
-
* @return Ai1ec_Registry_Object
|
90 |
*/
|
91 |
-
public function
|
92 |
-
|
93 |
}
|
94 |
|
95 |
/**
|
96 |
-
*
|
97 |
*
|
98 |
-
* @
|
99 |
*
|
100 |
-
* @return
|
101 |
*/
|
102 |
-
public function
|
103 |
-
$this->_registry
|
104 |
-
// Flush rewrite rules.
|
105 |
-
$this->_registry->get( 'rewrite' )->check_rewrites();
|
106 |
}
|
107 |
|
108 |
/**
|
@@ -120,10 +123,15 @@ class Ai1ec_Front_Controller {
|
|
120 |
$this->_request
|
121 |
);
|
122 |
// get the command
|
123 |
-
$
|
124 |
// if we have a command
|
125 |
-
if (
|
126 |
-
$command
|
|
|
|
|
|
|
|
|
|
|
127 |
}
|
128 |
}
|
129 |
|
@@ -233,6 +241,10 @@ class Ai1ec_Front_Controller {
|
|
233 |
$this->_initialize_schema();
|
234 |
// set the default theme if not set
|
235 |
$this->_add_default_theme_if_not_set();
|
|
|
|
|
|
|
|
|
236 |
} catch ( Ai1ec_Constants_Not_Set_Exception $e ) {
|
237 |
// This is blocking, throw it and disable the plugin
|
238 |
$exception = $e;
|
@@ -282,7 +294,10 @@ class Ai1ec_Front_Controller {
|
|
282 |
$url = AI1EC_THEMES_URL . '/' . $theme_name;
|
283 |
}
|
284 |
// if it's from 1.x, move folders to avoid confusion
|
285 |
-
|
|
|
|
|
|
|
286 |
// Ensure existence of theme directory.
|
287 |
if ( ! is_dir( $root . DIRECTORY_SEPARATOR . $theme_name ) ) {
|
288 |
// It's missing; something is wrong with this theme. Reset theme to
|
@@ -340,6 +355,17 @@ class Ai1ec_Front_Controller {
|
|
340 |
array( $this, 'initialize_router' ),
|
341 |
PHP_INT_MAX - 1
|
342 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
343 |
// Route the request.
|
344 |
$action = 'template_redirect';
|
345 |
if ( is_admin() ) {
|
@@ -465,10 +491,6 @@ class Ai1ec_Front_Controller {
|
|
465 |
10,
|
466 |
3
|
467 |
);
|
468 |
-
$dispatcher->register_action(
|
469 |
-
'widgets_init',
|
470 |
-
array( 'view.calendar.widget', 'register_widget' )
|
471 |
-
);
|
472 |
|
473 |
// register ICS cron action
|
474 |
$dispatcher->register_action(
|
@@ -506,10 +528,6 @@ class Ai1ec_Front_Controller {
|
|
506 |
'parse_query',
|
507 |
array( 'view.admin.all-events', 'taxonomy_filter_post_type_request' )
|
508 |
);
|
509 |
-
$dispatcher->register_action(
|
510 |
-
'admin_enqueue_scripts',
|
511 |
-
array( 'css.admin', 'admin_enqueue_scripts' )
|
512 |
-
);
|
513 |
$dispatcher->register_action(
|
514 |
'admin_menu',
|
515 |
array( 'view.admin.calendar-feeds', 'add_page' )
|
@@ -518,6 +536,10 @@ class Ai1ec_Front_Controller {
|
|
518 |
'current_screen',
|
519 |
array( 'view.admin.calendar-feeds', 'add_meta_box' )
|
520 |
);
|
|
|
|
|
|
|
|
|
521 |
$dispatcher->register_action(
|
522 |
'admin_menu',
|
523 |
array( 'view.admin.theme-switching', 'add_page' )
|
@@ -576,6 +598,10 @@ class Ai1ec_Front_Controller {
|
|
576 |
'add_meta_boxes',
|
577 |
array( 'view.admin.add-new-event', 'event_meta_box_container' )
|
578 |
);
|
|
|
|
|
|
|
|
|
579 |
$dispatcher->register_action(
|
580 |
'edit_form_after_title',
|
581 |
array( 'view.admin.add-new-event', 'event_inline_alert' )
|
@@ -623,6 +649,28 @@ class Ai1ec_Front_Controller {
|
|
623 |
'admin_init',
|
624 |
array( 'environment.check', 'run_checks' )
|
625 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
626 |
} else { // ! is_admin()
|
627 |
$dispatcher->register_shortcode(
|
628 |
'ai1ec',
|
@@ -741,8 +789,8 @@ class Ai1ec_Front_Controller {
|
|
741 |
* @return void
|
742 |
*/
|
743 |
protected function _install_crons() {
|
744 |
-
$scheduling = $this->_registry->get( 'scheduling.utility'
|
745 |
-
$allow = $this->_registry->get( 'model.settings'
|
746 |
->get( 'allow_statistics' );
|
747 |
$correct = false;
|
748 |
// install the cron for stats
|
@@ -770,19 +818,6 @@ class Ai1ec_Front_Controller {
|
|
770 |
}
|
771 |
}
|
772 |
|
773 |
-
/**
|
774 |
-
* Register the activation hook for the plugin.
|
775 |
-
*
|
776 |
-
* @return void
|
777 |
-
*/
|
778 |
-
protected function _register_activation_hook() {
|
779 |
-
// register_activation_hook
|
780 |
-
register_activation_hook(
|
781 |
-
AI1EC_PLUGIN_NAME . '/' . AI1EC_PLUGIN_NAME . '.php',
|
782 |
-
array( $this, 'activation_hook' )
|
783 |
-
);
|
784 |
-
}
|
785 |
-
|
786 |
/**
|
787 |
* Initialize the registry object.
|
788 |
*
|
@@ -887,23 +922,23 @@ class Ai1ec_Front_Controller {
|
|
887 |
protected function _migrate_categories_meta() {
|
888 |
$db = $this->_registry->get( 'dbi.dbi' );
|
889 |
$table_name = $db->get_table_name( 'ai1ec_event_category_colors' );
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
}
|
908 |
|
909 |
/**
|
@@ -981,4 +1016,36 @@ class Ai1ec_Front_Controller {
|
|
981 |
return $sql;
|
982 |
}
|
983 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
984 |
}
|
37 |
protected $_default_theme;
|
38 |
|
39 |
/**
|
40 |
+
* Initializes the default theme property.
|
|
|
|
|
|
|
|
|
41 |
*/
|
42 |
+
public function __construct() {
|
43 |
// Initialize default theme.
|
44 |
$this->_default_theme = array(
|
45 |
'theme_dir' => AI1EC_DEFAULT_THEME_PATH,
|
48 |
'stylesheet' => AI1EC_DEFAULT_THEME_NAME,
|
49 |
'legacy' => false,
|
50 |
);
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Initialize the controller.
|
55 |
+
*
|
56 |
+
* @param Ai1ec_Loader $ai1ec_loader Instance of Ai1EC classes loader
|
57 |
+
*
|
58 |
+
* @return void
|
59 |
+
*/
|
60 |
+
public function initialize( $ai1ec_loader ) {
|
61 |
ai1ec_start();
|
62 |
$this->_init( $ai1ec_loader );
|
63 |
$this->_initialize_dispatcher();
|
66 |
$this->_registry->get( 'controller.shutdown' )
|
67 |
->register( 'ai1ec_stop' );
|
68 |
add_action( 'plugins_loaded', array( $this, 'register_extensions' ), 1 );
|
69 |
+
add_action( 'after_setup_theme', array( $this, 'register_themes' ), 1 );
|
70 |
add_action( 'init', array( $lessphp, 'invalidate_css_cache_if_requested' ) );
|
71 |
}
|
72 |
|
73 |
/**
|
74 |
* Let other objects access default theme
|
75 |
+
*
|
76 |
* @return array
|
77 |
*/
|
78 |
public function get_default_theme() {
|
89 |
}
|
90 |
|
91 |
/**
|
92 |
+
* Notify themes and pass them instance of objects registry.
|
93 |
*
|
94 |
+
* @return void
|
|
|
|
|
95 |
*/
|
96 |
+
public function register_themes() {
|
97 |
+
do_action( 'ai1ec_after_themes_setup', $this->_registry );
|
98 |
}
|
99 |
|
100 |
/**
|
101 |
+
* Returns the registry object
|
102 |
*
|
103 |
+
* @param mixed $discard not used. Always return the registry.
|
104 |
*
|
105 |
+
* @return Ai1ec_Registry_Object
|
106 |
*/
|
107 |
+
public function return_registry( $discard ) {
|
108 |
+
return $this->_registry;
|
|
|
|
|
109 |
}
|
110 |
|
111 |
/**
|
123 |
$this->_request
|
124 |
);
|
125 |
// get the command
|
126 |
+
$commands = $resolver->get_commands();
|
127 |
// if we have a command
|
128 |
+
if ( ! empty( $commands ) ) {
|
129 |
+
foreach( $commands as $command ) {
|
130 |
+
$result = $command->execute();
|
131 |
+
if ( $command->stop_execution() ) {
|
132 |
+
return $result;
|
133 |
+
}
|
134 |
+
}
|
135 |
}
|
136 |
}
|
137 |
|
241 |
$this->_initialize_schema();
|
242 |
// set the default theme if not set
|
243 |
$this->_add_default_theme_if_not_set();
|
244 |
+
// check if custom theme is set
|
245 |
+
if ( is_admin() ) {
|
246 |
+
$this->_check_old_theme();
|
247 |
+
}
|
248 |
} catch ( Ai1ec_Constants_Not_Set_Exception $e ) {
|
249 |
// This is blocking, throw it and disable the plugin
|
250 |
$exception = $e;
|
294 |
$url = AI1EC_THEMES_URL . '/' . $theme_name;
|
295 |
}
|
296 |
// if it's from 1.x, move folders to avoid confusion
|
297 |
+
if ( apply_filters( 'ai1ec_move_themes_to_backup', true ) ) {
|
298 |
+
$this->_registry->get( 'theme.search' )
|
299 |
+
->move_themes_to_backup( $core_themes );
|
300 |
+
}
|
301 |
// Ensure existence of theme directory.
|
302 |
if ( ! is_dir( $root . DIRECTORY_SEPARATOR . $theme_name ) ) {
|
303 |
// It's missing; something is wrong with this theme. Reset theme to
|
355 |
array( $this, 'initialize_router' ),
|
356 |
PHP_INT_MAX - 1
|
357 |
);
|
358 |
+
add_action(
|
359 |
+
'widgets_init',
|
360 |
+
array( 'Ai1ec_View_Admin_Widget', 'register_widget' )
|
361 |
+
);
|
362 |
+
if ( isset( $_GET[Ai1ec_Controller_Javascript_Widget::WIDGET_PARAMETER] ) ) {
|
363 |
+
$this->_registry->get( 'event.dispatcher' )->register_action(
|
364 |
+
'init',
|
365 |
+
array( 'controller.javascript-widget', 'render_js_widget' ),
|
366 |
+
PHP_INT_MAX
|
367 |
+
);
|
368 |
+
}
|
369 |
// Route the request.
|
370 |
$action = 'template_redirect';
|
371 |
if ( is_admin() ) {
|
491 |
10,
|
492 |
3
|
493 |
);
|
|
|
|
|
|
|
|
|
494 |
|
495 |
// register ICS cron action
|
496 |
$dispatcher->register_action(
|
528 |
'parse_query',
|
529 |
array( 'view.admin.all-events', 'taxonomy_filter_post_type_request' )
|
530 |
);
|
|
|
|
|
|
|
|
|
531 |
$dispatcher->register_action(
|
532 |
'admin_menu',
|
533 |
array( 'view.admin.calendar-feeds', 'add_page' )
|
536 |
'current_screen',
|
537 |
array( 'view.admin.calendar-feeds', 'add_meta_box' )
|
538 |
);
|
539 |
+
$dispatcher->register_action(
|
540 |
+
'admin_menu',
|
541 |
+
array( 'view.admin.add-ons', 'add_page' )
|
542 |
+
);
|
543 |
$dispatcher->register_action(
|
544 |
'admin_menu',
|
545 |
array( 'view.admin.theme-switching', 'add_page' )
|
598 |
'add_meta_boxes',
|
599 |
array( 'view.admin.add-new-event', 'event_meta_box_container' )
|
600 |
);
|
601 |
+
$dispatcher->register_action(
|
602 |
+
'add_meta_boxes',
|
603 |
+
array( 'view.admin.add-new-event', 'event_banner_meta_box_container' )
|
604 |
+
);
|
605 |
$dispatcher->register_action(
|
606 |
'edit_form_after_title',
|
607 |
array( 'view.admin.add-new-event', 'event_inline_alert' )
|
649 |
'admin_init',
|
650 |
array( 'environment.check', 'run_checks' )
|
651 |
);
|
652 |
+
$dispatcher->register_action(
|
653 |
+
'activated_plugin',
|
654 |
+
array( 'environment.check', 'check_addons_activation' )
|
655 |
+
);
|
656 |
+
$dispatcher->register_filter(
|
657 |
+
'upgrader_post_install',
|
658 |
+
array( 'environment.check', 'check_bulk_addons_activation' )
|
659 |
+
);
|
660 |
+
// Widget Creator
|
661 |
+
$dispatcher->register_action(
|
662 |
+
'admin_enqueue_scripts',
|
663 |
+
array( 'css.admin', 'admin_enqueue_scripts' )
|
664 |
+
);
|
665 |
+
$dispatcher->register_action(
|
666 |
+
'current_screen',
|
667 |
+
array( 'view.admin.widget-creator', 'add_meta_box' )
|
668 |
+
);
|
669 |
+
$dispatcher->register_action(
|
670 |
+
'admin_menu',
|
671 |
+
array( 'view.admin.widget-creator', 'add_page' )
|
672 |
+
);
|
673 |
+
|
674 |
} else { // ! is_admin()
|
675 |
$dispatcher->register_shortcode(
|
676 |
'ai1ec',
|
789 |
* @return void
|
790 |
*/
|
791 |
protected function _install_crons() {
|
792 |
+
$scheduling = $this->_registry->get( 'scheduling.utility' );
|
793 |
+
$allow = $this->_registry->get( 'model.settings' )
|
794 |
->get( 'allow_statistics' );
|
795 |
$correct = false;
|
796 |
// install the cron for stats
|
818 |
}
|
819 |
}
|
820 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
821 |
/**
|
822 |
* Initialize the registry object.
|
823 |
*
|
922 |
protected function _migrate_categories_meta() {
|
923 |
$db = $this->_registry->get( 'dbi.dbi' );
|
924 |
$table_name = $db->get_table_name( 'ai1ec_event_category_colors' );
|
925 |
+
$db_h = $this->_registry->get( 'database.helper' );
|
926 |
+
if ( $db_h->table_exists( $table_name ) ) { // if old table exists otherwise ignore it
|
927 |
+
// Migrate color information
|
928 |
+
$dest_table = $db->get_table_name( 'ai1ec_event_category_meta' );
|
929 |
+
$colors = $db->select(
|
930 |
+
$table_name,
|
931 |
+
array( 'term_id', 'term_color'),
|
932 |
+
ARRAY_A
|
933 |
+
);
|
934 |
+
if ( ! empty( $colors ) ) {
|
935 |
+
foreach ( $colors as $color ) {
|
936 |
+
$db->insert( $dest_table, $color );
|
937 |
+
}
|
938 |
+
}
|
939 |
+
// Drop the old table
|
940 |
+
$db->query( 'DROP TABLE IF EXISTS ' . $table_name );
|
941 |
+
}
|
942 |
}
|
943 |
|
944 |
/**
|
1016 |
return $sql;
|
1017 |
}
|
1018 |
|
1019 |
+
/**
|
1020 |
+
* Performs run-once check if calendar is using theme outside core directory
|
1021 |
+
* what may mean that it is old format theme.
|
1022 |
+
*
|
1023 |
+
* @return void Method does not return.
|
1024 |
+
*/
|
1025 |
+
protected function _check_old_theme() {
|
1026 |
+
$option = $this->_registry->get( 'model.option' );
|
1027 |
+
if ( true === (bool)$option->get( 'ai1ec_fer_checked', false ) ) {
|
1028 |
+
return;
|
1029 |
+
}
|
1030 |
+
$cur_theme = $option->get( 'ai1ec_current_theme', array() );
|
1031 |
+
$theme_root = dirname( AI1EC_DEFAULT_THEME_ROOT );
|
1032 |
+
if (
|
1033 |
+
! isset( $cur_theme['theme_root'] ) ||
|
1034 |
+
$theme_root === dirname( $cur_theme['theme_root'] )
|
1035 |
+
) {
|
1036 |
+
$option->set( 'ai1ec_fer_checked', true );
|
1037 |
+
return;
|
1038 |
+
}
|
1039 |
+
$this->_registry->get( 'notification.admin' )->store(
|
1040 |
+
Ai1ec_I18n::__(
|
1041 |
+
'You may be using a legacy custom calendar theme. If you have problems viewing the calendar, please read <a href="https://time.ly/">this article</a>.'
|
1042 |
+
),
|
1043 |
+
'error',
|
1044 |
+
0,
|
1045 |
+
array( Ai1ec_Notification_Admin::RCPT_ADMIN ),
|
1046 |
+
true
|
1047 |
+
);
|
1048 |
+
$option->set( 'ai1ec_fer_checked', true );
|
1049 |
+
}
|
1050 |
+
|
1051 |
}
|
app/controller/javascript-widget.php
ADDED
@@ -0,0 +1,180 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Handles Super Widget.
|
5 |
+
*
|
6 |
+
* @author Time.ly Network Inc.
|
7 |
+
* @since 2.0
|
8 |
+
*
|
9 |
+
* @package AI1EC
|
10 |
+
* @subpackage AI1EC.Javascript
|
11 |
+
*/
|
12 |
+
class Ai1ec_Controller_Javascript_Widget extends Ai1ec_Base {
|
13 |
+
|
14 |
+
const WIDGET_PARAMETER = 'ai1ec_js_widget';
|
15 |
+
|
16 |
+
protected $_widgets = array();
|
17 |
+
|
18 |
+
|
19 |
+
public function add_widget( $widget_id, $widget_class ) {
|
20 |
+
$this->_widgets[$widget_id] = $widget_class;
|
21 |
+
}
|
22 |
+
|
23 |
+
public function get_widgets() {
|
24 |
+
return $this->_widgets;
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Adds Super Widget JS to admin screen.
|
29 |
+
*
|
30 |
+
* @param array $files
|
31 |
+
* @param string $page_to_load
|
32 |
+
*
|
33 |
+
* @return array
|
34 |
+
*/
|
35 |
+
public function add_js( array $files, $page_to_load ) {
|
36 |
+
if ( 'admin_settings.js' === $page_to_load ) {
|
37 |
+
$files[] = AI1ECSW_PATH . '/public/js/pages/admin_settings.js';
|
38 |
+
}
|
39 |
+
return $files;
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* @param array $data
|
44 |
+
* @return array
|
45 |
+
*/
|
46 |
+
public function add_js_translation( array $data ) {
|
47 |
+
$data['set_calendar_page'] = __(
|
48 |
+
'You must choose the Calendar page before using the Super Widget',
|
49 |
+
AI1EC_PLUGIN_NAME
|
50 |
+
);
|
51 |
+
return $data;
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Renders everything that's needed for the embedded widget.
|
56 |
+
*/
|
57 |
+
public function render_js_widget() {
|
58 |
+
if ( isset( $_GET['render'] ) && 'true' === $_GET['render'] ) {
|
59 |
+
$widget = $_GET[self::WIDGET_PARAMETER];
|
60 |
+
$widget_class = null;
|
61 |
+
if ( isset( $this->_widgets[$widget] ) ) {
|
62 |
+
$widget_class = $this->_widgets[$widget];
|
63 |
+
}
|
64 |
+
if ( null === $widget_class ) {
|
65 |
+
return;
|
66 |
+
}
|
67 |
+
$widget_instance = $this->_registry->get( $widget_class );
|
68 |
+
$this->render_content( $widget_instance );
|
69 |
+
}
|
70 |
+
$this->render_javascript();
|
71 |
+
}
|
72 |
+
|
73 |
+
public function render_javascript() {
|
74 |
+
header( 'Content-Type: application/javascript' );
|
75 |
+
header(
|
76 |
+
'Expires: ' . gmdate( 'D, d M Y H:i:s', time() + 31536000 ) . ' GMT'
|
77 |
+
);
|
78 |
+
header( 'Cache-Control: public, max-age=31536000' );
|
79 |
+
|
80 |
+
|
81 |
+
$jscontroller = $this->_registry->get( 'controller.javascript' );
|
82 |
+
$css_controller = $this->_registry->get( 'css.frontend' );
|
83 |
+
$require_main = AI1EC_ADMIN_THEME_JS_PATH . DIRECTORY_SEPARATOR . 'require.js';
|
84 |
+
$widget_file = AI1EC_PATH . '/public/js/widget/common_widget.js';
|
85 |
+
$translation = $jscontroller->get_frontend_translation_data();
|
86 |
+
$permalink = get_permalink(
|
87 |
+
$this->_registry->get( 'model.settings' )
|
88 |
+
->get( 'calendar_page_id' )
|
89 |
+
);
|
90 |
+
// load the css to hardcode, saving a call
|
91 |
+
$css_rules = $css_controller->get_compiled_css();
|
92 |
+
$css_rules = addslashes( $css_rules );
|
93 |
+
$translation['calendar_url'] = $permalink;
|
94 |
+
// Let extensions add their scripts.
|
95 |
+
// look at Extended Views or Super Widget for examples
|
96 |
+
$extension_urls = array();
|
97 |
+
$extension_urls = apply_filters(
|
98 |
+
'ai1ec_render_js',
|
99 |
+
$extension_urls,
|
100 |
+
'ai1ec_widget.js'
|
101 |
+
);
|
102 |
+
|
103 |
+
$translation['extension_urls'] = $extension_urls;
|
104 |
+
// the single event page js is loaded dinamically.
|
105 |
+
$translation['event_page'] = array(
|
106 |
+
'id' => 'ai1ec_event',
|
107 |
+
'url' => AI1EC_URL . '/public/js/pages/event.js',
|
108 |
+
);
|
109 |
+
$translation_module = $jscontroller->create_require_js_module(
|
110 |
+
Ai1ec_Javascript_Controller::FRONTEND_CONFIG_MODULE,
|
111 |
+
$translation
|
112 |
+
);
|
113 |
+
// get requirejs
|
114 |
+
$require = file_get_contents( $require_main );
|
115 |
+
$main_widget = file_get_contents( $widget_file );
|
116 |
+
$require_config = $jscontroller->create_require_js_config_object();
|
117 |
+
$config = $jscontroller->create_require_js_module(
|
118 |
+
'ai1ec_config',
|
119 |
+
$jscontroller->get_translation_data()
|
120 |
+
);
|
121 |
+
// get jquery
|
122 |
+
$jquery = $jscontroller->get_jquery_version_based_on_browser(
|
123 |
+
$_SERVER['HTTP_USER_AGENT']
|
124 |
+
);
|
125 |
+
|
126 |
+
$domready = $jscontroller->get_module(
|
127 |
+
'domReady.js'
|
128 |
+
);
|
129 |
+
$frontend = $jscontroller->get_module(
|
130 |
+
'scripts/common_scripts/frontend/common_frontend.js'
|
131 |
+
);
|
132 |
+
|
133 |
+
// compress data if possible
|
134 |
+
$compatibility_ob = $this->_registry->get( 'compatibility.ob' );
|
135 |
+
$js = <<<JS
|
136 |
+
/******** Called once Require.js has loaded ******/
|
137 |
+
|
138 |
+
(function() {
|
139 |
+
|
140 |
+
var timely_css = document.createElement( 'style' );
|
141 |
+
timely_css.innerHTML = '$css_rules';
|
142 |
+
( document.getElementsByTagName( "head" )[0] || document.documentElement ).appendChild( timely_css );
|
143 |
+
// bring in requires
|
144 |
+
$require
|
145 |
+
// make timely global
|
146 |
+
window.timely = timely;
|
147 |
+
$require_config
|
148 |
+
// Load other modules
|
149 |
+
$translation_module
|
150 |
+
$config
|
151 |
+
$jquery
|
152 |
+
$frontend
|
153 |
+
|
154 |
+
// start up the widget
|
155 |
+
$main_widget
|
156 |
+
})(); // We call our anonymous function immediately
|
157 |
+
JS;
|
158 |
+
$compatibility_ob->gzip_if_possible( $js );
|
159 |
+
|
160 |
+
exit( 0 );
|
161 |
+
}
|
162 |
+
|
163 |
+
public function render_content( Ai1ec_Embeddable $widget_instance ) {
|
164 |
+
$args = array();
|
165 |
+
$defaults = $widget_instance->get_js_widget_configurable_defaults();
|
166 |
+
foreach ( $defaults as $id => $value ) {
|
167 |
+
if ( isset( $_GET[$id] ) ) {
|
168 |
+
$args[$id] = $_GET[$id];
|
169 |
+
}
|
170 |
+
}
|
171 |
+
$html = $widget_instance->javascript_widget( $args );
|
172 |
+
$jsonp = $this->_registry->get( 'http.response.render.strategy.jsonp' );
|
173 |
+
$jsonp->render(
|
174 |
+
array(
|
175 |
+
'data' => array( 'html' => $html )
|
176 |
+
)
|
177 |
+
);
|
178 |
+
}
|
179 |
+
|
180 |
+
}
|
app/controller/javascript.php
CHANGED
@@ -58,6 +58,8 @@ class Ai1ec_Javascript_Controller {
|
|
58 |
// settings page
|
59 |
const SETTINGS_PAGE = 'admin_settings.js';
|
60 |
|
|
|
|
|
61 |
/**
|
62 |
* @var Ai1ec_Registry_Object
|
63 |
*/
|
@@ -77,6 +79,7 @@ class Ai1ec_Javascript_Controller {
|
|
77 |
self::SETTINGS_PAGE => true,
|
78 |
self::EVENT_PAGE_JS => true,
|
79 |
self::CALENDAR_PAGE_JS => true,
|
|
|
80 |
);
|
81 |
|
82 |
/**
|
@@ -244,7 +247,7 @@ class Ai1ec_Javascript_Controller {
|
|
244 |
);
|
245 |
|
246 |
$javascript = $require . $require_config . $translation_module .
|
247 |
-
$config . $jquery . $
|
248 |
$this->_echo_javascript( $javascript );
|
249 |
}
|
250 |
|
@@ -296,7 +299,9 @@ class Ai1ec_Javascript_Controller {
|
|
296 |
if ( $this->_are_we_accessing_the_calendar_settings_page() === TRUE ) {
|
297 |
$script_to_load = self::SETTINGS_PAGE;
|
298 |
}
|
299 |
-
|
|
|
|
|
300 |
if ( false === $script_to_load ) {
|
301 |
$script_to_load = apply_filters( 'ai1ec_backend_js', self::LOAD_ONLY_BACKEND_SCRIPTS );
|
302 |
}
|
@@ -438,7 +443,19 @@ class Ai1ec_Javascript_Controller {
|
|
438 |
'affix_vertical_offset_lg' => $settings->get( 'affix_vertical_offset_lg' ),
|
439 |
'affix_vertical_offset_sm' => $settings->get( 'affix_vertical_offset_sm' ),
|
440 |
'affix_vertical_offset_xs' => $settings->get( 'affix_vertical_offset_xs' ),
|
|
|
441 |
'region' => ( $settings->get( 'geo_region_biasing' ) ) ? $locale->get_region() : '',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
442 |
);
|
443 |
return apply_filters( 'ai1ec_js_translations', $data );
|
444 |
}
|
@@ -564,6 +581,7 @@ JSC;
|
|
564 |
if( true === is_page( $this->_settings->get( 'calendar_page_id' ) ) ) {
|
565 |
$is_calendar_page = self::TRUE_PARAM;
|
566 |
}
|
|
|
567 |
$url = add_query_arg(
|
568 |
array(
|
569 |
// Add the page to load
|
@@ -631,12 +649,18 @@ JSC;
|
|
631 |
* @return boolean TRUE if we are accessing the settings page FALSE otherwise
|
632 |
*/
|
633 |
private function _are_we_accessing_the_calendar_settings_page() {
|
634 |
-
$path_details = pathinfo( $_SERVER[
|
635 |
$page = isset( $_GET['page'] ) ? $_GET['page'] : '';
|
636 |
return $path_details['basename'] === 'edit.php' &&
|
637 |
$page === AI1EC_PLUGIN_NAME . '-settings';
|
638 |
}
|
639 |
|
|
|
|
|
|
|
|
|
|
|
|
|
640 |
/**
|
641 |
* Check if we are editing less variables
|
642 |
*
|
58 |
// settings page
|
59 |
const SETTINGS_PAGE = 'admin_settings.js';
|
60 |
|
61 |
+
//widget creator page
|
62 |
+
CONST WIDGET_CREATOR = 'widget-creator.js';
|
63 |
/**
|
64 |
* @var Ai1ec_Registry_Object
|
65 |
*/
|
79 |
self::SETTINGS_PAGE => true,
|
80 |
self::EVENT_PAGE_JS => true,
|
81 |
self::CALENDAR_PAGE_JS => true,
|
82 |
+
self::WIDGET_CREATOR => true,
|
83 |
);
|
84 |
|
85 |
/**
|
247 |
);
|
248 |
|
249 |
$javascript = $require . $require_config . $translation_module .
|
250 |
+
$config . $jquery . $common_js . $ext_js . $page_js . $page_ready;
|
251 |
$this->_echo_javascript( $javascript );
|
252 |
}
|
253 |
|
299 |
if ( $this->_are_we_accessing_the_calendar_settings_page() === TRUE ) {
|
300 |
$script_to_load = self::SETTINGS_PAGE;
|
301 |
}
|
302 |
+
if ( true === $this->_are_we_creating_widgets() ) {
|
303 |
+
$script_to_load = self::WIDGET_CREATOR;
|
304 |
+
}
|
305 |
if ( false === $script_to_load ) {
|
306 |
$script_to_load = apply_filters( 'ai1ec_backend_js', self::LOAD_ONLY_BACKEND_SCRIPTS );
|
307 |
}
|
443 |
'affix_vertical_offset_lg' => $settings->get( 'affix_vertical_offset_lg' ),
|
444 |
'affix_vertical_offset_sm' => $settings->get( 'affix_vertical_offset_sm' ),
|
445 |
'affix_vertical_offset_xs' => $settings->get( 'affix_vertical_offset_xs' ),
|
446 |
+
'calendar_page_id' => $settings->get( 'calendar_page_id' ),
|
447 |
'region' => ( $settings->get( 'geo_region_biasing' ) ) ? $locale->get_region() : '',
|
448 |
+
'site_url' => trailingslashit( get_site_url() ),
|
449 |
+
'javascript_widgets' => array(),
|
450 |
+
'widget_creator' => array(
|
451 |
+
'preview' => Ai1ec_I18n::__( 'Preview:' ),
|
452 |
+
'preview_loading' => Ai1ec_I18n::__(
|
453 |
+
'Loading preview <i class="ai1ec-fa ai1ec-fa-spin ai1ec-fa-spinner"></i>'
|
454 |
+
)
|
455 |
+
),
|
456 |
+
'load_views_error' => Ai1ec_I18n::__(
|
457 |
+
'Something went wrong while fetching events.<br>The request status is: %STATUS% <br>The error thrown was: %ERROR%'
|
458 |
+
),
|
459 |
);
|
460 |
return apply_filters( 'ai1ec_js_translations', $data );
|
461 |
}
|
581 |
if( true === is_page( $this->_settings->get( 'calendar_page_id' ) ) ) {
|
582 |
$is_calendar_page = self::TRUE_PARAM;
|
583 |
}
|
584 |
+
|
585 |
$url = add_query_arg(
|
586 |
array(
|
587 |
// Add the page to load
|
649 |
* @return boolean TRUE if we are accessing the settings page FALSE otherwise
|
650 |
*/
|
651 |
private function _are_we_accessing_the_calendar_settings_page() {
|
652 |
+
$path_details = pathinfo( $_SERVER['SCRIPT_NAME'] );
|
653 |
$page = isset( $_GET['page'] ) ? $_GET['page'] : '';
|
654 |
return $path_details['basename'] === 'edit.php' &&
|
655 |
$page === AI1EC_PLUGIN_NAME . '-settings';
|
656 |
}
|
657 |
|
658 |
+
protected function _are_we_creating_widgets() {
|
659 |
+
$path_details = pathinfo( $_SERVER['SCRIPT_NAME'] );
|
660 |
+
$page = isset( $_GET['page'] ) ? $_GET['page'] : '';
|
661 |
+
return $path_details['basename'] === 'edit.php' &&
|
662 |
+
$page === AI1EC_PLUGIN_NAME . '-widget-creator';
|
663 |
+
}
|
664 |
/**
|
665 |
* Check if we are editing less variables
|
666 |
*
|
app/model/event-compatibility.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Model representing an event or an event instance.
|
5 |
+
*
|
6 |
+
* @author Time.ly Network, Inc.
|
7 |
+
* @since 2.1
|
8 |
+
* @instantiator Ai1ec_Factory_Event.create_event_instance
|
9 |
+
* @package Ai1EC
|
10 |
+
* @subpackage Ai1EC.Model
|
11 |
+
*/
|
12 |
+
class Ai1ec_Event_Compatibility extends Ai1ec_Event {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Getter.
|
16 |
+
*
|
17 |
+
* @param string $name Property name.
|
18 |
+
*
|
19 |
+
* @return mixed Property value.
|
20 |
+
*/
|
21 |
+
public function __get( $name ) {
|
22 |
+
$value = $this->get( $name );
|
23 |
+
if ( null !== $value ) {
|
24 |
+
return $value;
|
25 |
+
}
|
26 |
+
return $this->get_runtime( $name );
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Isset magic function.
|
31 |
+
*
|
32 |
+
* @param string $name Property name.
|
33 |
+
*
|
34 |
+
* @return bool True of false.
|
35 |
+
*/
|
36 |
+
public function __isset( $name ) {
|
37 |
+
$method_name = 'get' . $name;
|
38 |
+
if ( method_exists( $this, $method_name ) ) {
|
39 |
+
return false;
|
40 |
+
}
|
41 |
+
return ( null !== $this->$name );
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Twig timespan short method.
|
46 |
+
*
|
47 |
+
* @return string Value.
|
48 |
+
*/
|
49 |
+
public function gettimespan_short() {
|
50 |
+
return $this->_registry->get( 'view.event.time' )
|
51 |
+
->get_timespan_html( $this, 'short' );
|
52 |
+
}
|
53 |
+
|
54 |
+
/**
|
55 |
+
* Twig is_allday method.
|
56 |
+
*
|
57 |
+
* @return bool Value.
|
58 |
+
*/
|
59 |
+
public function getis_allday() {
|
60 |
+
return $this->is_allday();
|
61 |
+
}
|
62 |
+
}
|
app/model/event.php
CHANGED
@@ -24,9 +24,9 @@ class Ai1ec_Event extends Ai1ec_Base {
|
|
24 |
* [-1] - only `get` (for storage) operations require care.
|
25 |
*/
|
26 |
protected $_swizzable = array(
|
27 |
-
'contact_url' =>
|
28 |
'cost' => 0,
|
29 |
-
'ticket_url' =>
|
30 |
'start' => -1,
|
31 |
'end' => -1,
|
32 |
'timezone_name' => -1,
|
@@ -343,58 +343,40 @@ class Ai1ec_Event extends Ai1ec_Base {
|
|
343 |
}
|
344 |
|
345 |
/**
|
346 |
-
*
|
347 |
*
|
348 |
-
* @param
|
349 |
-
* @param string $intent Char definition: 'b' - buy, 'd' - details
|
350 |
*
|
351 |
-
* @return string
|
352 |
-
*
|
353 |
-
* @staticvar array $options Defaut options to persist between instances.
|
354 |
*/
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
$options = array(
|
363 |
-
'l' => NULL,
|
364 |
-
'e' => ( false !== strpos( AI1EC_VERSION, 'pro' ) ) ? 'p' : 's',
|
365 |
-
'v' => (string)AI1EC_VERSION,
|
366 |
-
'i' => NULL,
|
367 |
-
'c' => NULL,
|
368 |
-
'o' => (string)get_site_url(),
|
369 |
);
|
370 |
-
}
|
371 |
-
$options['l'] = (string)$url;
|
372 |
-
$options['i'] = (string)$intent;
|
373 |
-
$options['c'] = (string)$this->get( 'cost' );
|
374 |
-
return AI1EC_REDIRECTION_SERVICE .
|
375 |
-
base64_encode( json_encode( $options ) );
|
376 |
}
|
377 |
|
378 |
/**
|
379 |
-
*
|
380 |
-
*
|
381 |
-
* @param string $value Ticket URL stored in database
|
382 |
*
|
383 |
-
* @return bool
|
384 |
*/
|
385 |
-
public function
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
}
|
399 |
|
400 |
/**
|
@@ -521,6 +503,7 @@ class Ai1ec_Event extends Ai1ec_Base {
|
|
521 |
* @return int The post_id of the new or existing event.
|
522 |
*/
|
523 |
function save( $update = false ) {
|
|
|
524 |
if ( ! $update ) {
|
525 |
$response = apply_filters( 'ai1ec_event_save_new', $this );
|
526 |
if ( is_wp_error( $response ) ) {
|
@@ -540,7 +523,6 @@ class Ai1ec_Event extends Ai1ec_Base {
|
|
540 |
$this->set_no_end_time();
|
541 |
}
|
542 |
if ( $post_id ) {
|
543 |
-
|
544 |
$success = false;
|
545 |
if ( ! $update ) {
|
546 |
$success = $dbi->insert(
|
24 |
* [-1] - only `get` (for storage) operations require care.
|
25 |
*/
|
26 |
protected $_swizzable = array(
|
27 |
+
'contact_url' => -1, // strip on save/import
|
28 |
'cost' => 0,
|
29 |
+
'ticket_url' => -1, // strip on save/import
|
30 |
'start' => -1,
|
31 |
'end' => -1,
|
32 |
'timezone_name' => -1,
|
343 |
}
|
344 |
|
345 |
/**
|
346 |
+
* Twig method for retrieving avatar.
|
347 |
*
|
348 |
+
* @param bool $wrap_permalink Whether to wrap avatar in <a> element or not
|
|
|
349 |
*
|
350 |
+
* @return string Avatar markup
|
|
|
|
|
351 |
*/
|
352 |
+
public function getavatar( $wrap_permalink = true ) {
|
353 |
+
return $this->_registry->
|
354 |
+
get( 'view.event.avatar' )->get_event_avatar(
|
355 |
+
$this,
|
356 |
+
$this->_registry->get( 'view.calendar.fallbacks' )->get_all(),
|
357 |
+
'',
|
358 |
+
$wrap_permalink
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
359 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
360 |
}
|
361 |
|
362 |
/**
|
363 |
+
* Returns whether Event has geo information.
|
|
|
|
|
364 |
*
|
365 |
+
* @return bool True or false.
|
366 |
*/
|
367 |
+
public function has_geoinformation() {
|
368 |
+
$latitude = floatval( $this->get( 'latitude') );
|
369 |
+
$longitude = floatval( $this->get( 'longitude' ) );
|
370 |
+
return (
|
371 |
+
(
|
372 |
+
$latitude >= 0.000000000000001 ||
|
373 |
+
$latitude <= -0.000000000000001
|
374 |
+
) &&
|
375 |
+
(
|
376 |
+
$longitude >= 0.000000000000001 ||
|
377 |
+
$longitude <= -0.000000000000001
|
378 |
+
)
|
379 |
+
);
|
380 |
}
|
381 |
|
382 |
/**
|
503 |
* @return int The post_id of the new or existing event.
|
504 |
*/
|
505 |
function save( $update = false ) {
|
506 |
+
do_action( 'ai1ec_pre_save_event', $this, $update );
|
507 |
if ( ! $update ) {
|
508 |
$response = apply_filters( 'ai1ec_event_save_new', $this );
|
509 |
if ( is_wp_error( $response ) ) {
|
523 |
$this->set_no_end_time();
|
524 |
}
|
525 |
if ( $post_id ) {
|
|
|
526 |
$success = false;
|
527 |
if ( ! $update ) {
|
528 |
$success = $dbi->insert(
|
app/model/event/creating.php
CHANGED
@@ -88,6 +88,7 @@ class Ai1ec_Event_Creating extends Ai1ec_Base {
|
|
88 |
$show_coordinates = isset( $_POST['ai1ec_input_coordinates'] )? 1 : 0;
|
89 |
$longitude = isset( $_POST['ai1ec_longitude'] ) ? $_POST['ai1ec_longitude'] : '';
|
90 |
$latitude = isset( $_POST['ai1ec_latitude'] ) ? $_POST['ai1ec_latitude'] : '';
|
|
|
91 |
|
92 |
$rrule = NULL;
|
93 |
$exrule = NULL;
|
@@ -181,6 +182,8 @@ class Ai1ec_Event_Creating extends Ai1ec_Base {
|
|
181 |
$event->set( 'latitude', trim( $latitude ) );
|
182 |
$event->set( 'ical_uid', $event->get_uid() );
|
183 |
|
|
|
|
|
184 |
// let other extensions save their fields.
|
185 |
do_action( 'ai1ec_save_post', $event );
|
186 |
|
@@ -235,4 +238,4 @@ class Ai1ec_Event_Creating extends Ai1ec_Base {
|
|
235 |
);
|
236 |
return $post_id;
|
237 |
}
|
238 |
-
}
|
88 |
$show_coordinates = isset( $_POST['ai1ec_input_coordinates'] )? 1 : 0;
|
89 |
$longitude = isset( $_POST['ai1ec_longitude'] ) ? $_POST['ai1ec_longitude'] : '';
|
90 |
$latitude = isset( $_POST['ai1ec_latitude'] ) ? $_POST['ai1ec_latitude'] : '';
|
91 |
+
$banner_image = isset( $_POST['ai1ec_banner_image'] ) ? $_POST['ai1ec_banner_image'] : '';
|
92 |
|
93 |
$rrule = NULL;
|
94 |
$exrule = NULL;
|
182 |
$event->set( 'latitude', trim( $latitude ) );
|
183 |
$event->set( 'ical_uid', $event->get_uid() );
|
184 |
|
185 |
+
update_post_meta( $post_id, 'ai1ec_banner_image', $banner_image );
|
186 |
+
|
187 |
// let other extensions save their fields.
|
188 |
do_action( 'ai1ec_save_post', $event );
|
189 |
|
238 |
);
|
239 |
return $post_id;
|
240 |
}
|
241 |
+
}
|
app/model/event/instance.php
CHANGED
@@ -64,7 +64,6 @@ class Ai1ec_Event_Instance extends Ai1ec_Base {
|
|
64 |
* @param Ai1ec_Event $event Event to generate instances for.
|
65 |
* @param array $event_instance First instance contents.
|
66 |
* @param int $_start Timestamp of first occurence.
|
67 |
-
* @param int $tif Timestamp of last occurence.
|
68 |
* @param int $duration Event duration in seconds.
|
69 |
* @param string $timezone Target timezone.
|
70 |
*
|
@@ -74,7 +73,6 @@ class Ai1ec_Event_Instance extends Ai1ec_Base {
|
|
74 |
Ai1ec_Event $event,
|
75 |
array $event_instance,
|
76 |
$_start,
|
77 |
-
$tif,
|
78 |
$duration,
|
79 |
$timezone
|
80 |
) {
|
@@ -85,14 +83,10 @@ class Ai1ec_Event_Instance extends Ai1ec_Base {
|
|
85 |
'timestamp' => $_start,
|
86 |
'tz' => $timezone,
|
87 |
);
|
88 |
-
$enddate = array(
|
89 |
-
'timestamp' => $tif,
|
90 |
-
'tz' => $timezone,
|
91 |
-
);
|
92 |
$start = $event_instance['start'];
|
93 |
-
$wdate = $startdate
|
94 |
= iCalUtilityFunctions::_timestamp2date( $startdate, 6 );
|
95 |
-
$enddate
|
96 |
$exclude_dates = array();
|
97 |
$recurrence_dates = array();
|
98 |
if ( $event->get( 'exception_rules' ) ) {
|
@@ -118,6 +112,7 @@ class Ai1ec_Event_Instance extends Ai1ec_Base {
|
|
118 |
->build_recurrence_rules_array(
|
119 |
$event->get( 'recurrence_rules' )
|
120 |
);
|
|
|
121 |
$recurrence_rules = iCalUtilityFunctions::_setRexrule( $recurrence_rules );
|
122 |
iCalUtilityFunctions::_recur2date(
|
123 |
$recurrence_dates,
|
@@ -126,9 +121,12 @@ class Ai1ec_Event_Instance extends Ai1ec_Base {
|
|
126 |
$startdate,
|
127 |
$enddate
|
128 |
);
|
|
|
|
|
129 |
$recurrence_dates = array_keys( $recurrence_dates );
|
130 |
// Add the instances
|
131 |
foreach ( $recurrence_dates as $date ) {
|
|
|
132 |
// The arrays are in the form timestamp => true so an isset call is what we need
|
133 |
if ( isset( $exclude_dates[$date] ) ) {
|
134 |
continue;
|
@@ -154,6 +152,7 @@ class Ai1ec_Event_Instance extends Ai1ec_Base {
|
|
154 |
$evs[] = $event_instance;
|
155 |
}
|
156 |
}
|
|
|
157 |
return $evs;
|
158 |
}
|
159 |
|
@@ -173,9 +172,6 @@ class Ai1ec_Event_Instance extends Ai1ec_Base {
|
|
173 |
);
|
174 |
$duration = $event->get( 'end' )->diff_sec( $event->get( 'start' ) );
|
175 |
|
176 |
-
// Timestamp of today date + 3 years (94608000 seconds)
|
177 |
-
$tif = $this->_registry->get( 'date.system' )
|
178 |
-
->current_time( true ) + 94608000;
|
179 |
// Always cache initial instance
|
180 |
$evs[] = $e;
|
181 |
|
@@ -192,7 +188,6 @@ class Ai1ec_Event_Instance extends Ai1ec_Base {
|
|
192 |
$event,
|
193 |
$e,
|
194 |
$_start,
|
195 |
-
$tif,
|
196 |
$duration,
|
197 |
$start_timezone
|
198 |
)
|
64 |
* @param Ai1ec_Event $event Event to generate instances for.
|
65 |
* @param array $event_instance First instance contents.
|
66 |
* @param int $_start Timestamp of first occurence.
|
|
|
67 |
* @param int $duration Event duration in seconds.
|
68 |
* @param string $timezone Target timezone.
|
69 |
*
|
73 |
Ai1ec_Event $event,
|
74 |
array $event_instance,
|
75 |
$_start,
|
|
|
76 |
$duration,
|
77 |
$timezone
|
78 |
) {
|
83 |
'timestamp' => $_start,
|
84 |
'tz' => $timezone,
|
85 |
);
|
|
|
|
|
|
|
|
|
86 |
$start = $event_instance['start'];
|
87 |
+
$wdate = $startdate = $enddate
|
88 |
= iCalUtilityFunctions::_timestamp2date( $startdate, 6 );
|
89 |
+
$enddate['year'] = $enddate['year'] + 3;
|
90 |
$exclude_dates = array();
|
91 |
$recurrence_dates = array();
|
92 |
if ( $event->get( 'exception_rules' ) ) {
|
112 |
->build_recurrence_rules_array(
|
113 |
$event->get( 'recurrence_rules' )
|
114 |
);
|
115 |
+
|
116 |
$recurrence_rules = iCalUtilityFunctions::_setRexrule( $recurrence_rules );
|
117 |
iCalUtilityFunctions::_recur2date(
|
118 |
$recurrence_dates,
|
121 |
$startdate,
|
122 |
$enddate
|
123 |
);
|
124 |
+
|
125 |
+
|
126 |
$recurrence_dates = array_keys( $recurrence_dates );
|
127 |
// Add the instances
|
128 |
foreach ( $recurrence_dates as $date ) {
|
129 |
+
|
130 |
// The arrays are in the form timestamp => true so an isset call is what we need
|
131 |
if ( isset( $exclude_dates[$date] ) ) {
|
132 |
continue;
|
152 |
$evs[] = $event_instance;
|
153 |
}
|
154 |
}
|
155 |
+
|
156 |
return $evs;
|
157 |
}
|
158 |
|
172 |
);
|
173 |
$duration = $event->get( 'end' )->diff_sec( $event->get( 'start' ) );
|
174 |
|
|
|
|
|
|
|
175 |
// Always cache initial instance
|
176 |
$evs[] = $e;
|
177 |
|
188 |
$event,
|
189 |
$e,
|
190 |
$_start,
|
|
|
191 |
$duration,
|
192 |
$start_timezone
|
193 |
)
|
app/model/event/taxonomy.php
CHANGED
@@ -9,7 +9,8 @@
|
|
9 |
* @package Ai1EC
|
10 |
* @subpackage Ai1EC.Model
|
11 |
*/
|
12 |
-
|
|
|
13 |
|
14 |
/**
|
15 |
* @var string Name of categories taxonomy.
|
@@ -38,7 +39,8 @@ class Ai1ec_Event_Taxonomy {
|
|
38 |
*
|
39 |
* @return void
|
40 |
*/
|
41 |
-
public function __construct( $post_id = 0 ) {
|
|
|
42 |
$this->_post_id = (int)$post_id;
|
43 |
}
|
44 |
|
@@ -50,7 +52,8 @@ class Ai1ec_Event_Taxonomy {
|
|
50 |
* @param bool $is_id Set to true if $term is ID.
|
51 |
* @param array $attrs Attributes to creatable entity.
|
52 |
*
|
53 |
-
* @return
|
|
|
54 |
*/
|
55 |
public function initiate_term(
|
56 |
$term,
|
@@ -58,16 +61,32 @@ class Ai1ec_Event_Taxonomy {
|
|
58 |
$is_id = false,
|
59 |
array $attrs = array()
|
60 |
) {
|
61 |
-
|
62 |
-
$
|
63 |
-
|
64 |
-
|
65 |
-
|
|
|
|
|
|
|
|
|
|
|
66 |
return false;
|
67 |
}
|
68 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
}
|
70 |
-
return
|
71 |
}
|
72 |
|
73 |
/**
|
@@ -128,7 +147,7 @@ class Ai1ec_Event_Taxonomy {
|
|
128 |
$url_components = parse_url( $feed->feed_url );
|
129 |
$feed_name = $url_components['host'];
|
130 |
}
|
131 |
-
$
|
132 |
$feed_name,
|
133 |
self::FEEDS,
|
134 |
false,
|
@@ -136,10 +155,29 @@ class Ai1ec_Event_Taxonomy {
|
|
136 |
'description' => $feed->feed_url,
|
137 |
)
|
138 |
);
|
139 |
-
if ( false === $
|
140 |
return false;
|
141 |
}
|
|
|
142 |
return $this->set_terms( array( $term_id ), self::FEEDS );
|
143 |
}
|
144 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
}
|
9 |
* @package Ai1EC
|
10 |
* @subpackage Ai1EC.Model
|
11 |
*/
|
12 |
+
|
13 |
+
class Ai1ec_Event_Taxonomy extends Ai1ec_Base {
|
14 |
|
15 |
/**
|
16 |
* @var string Name of categories taxonomy.
|
39 |
*
|
40 |
* @return void
|
41 |
*/
|
42 |
+
public function __construct( Ai1ec_Registry_Object $registry, $post_id = 0 ) {
|
43 |
+
parent::__construct( $registry );
|
44 |
$this->_post_id = (int)$post_id;
|
45 |
}
|
46 |
|
52 |
* @param bool $is_id Set to true if $term is ID.
|
53 |
* @param array $attrs Attributes to creatable entity.
|
54 |
*
|
55 |
+
* @return array|bool Associative array with term_id
|
56 |
+
* and taxonomy keys or false on error
|
57 |
*/
|
58 |
public function initiate_term(
|
59 |
$term,
|
61 |
$is_id = false,
|
62 |
array $attrs = array()
|
63 |
) {
|
64 |
+
// cast to int to have it working with term_exists
|
65 |
+
$term = ( $is_id ) ? (int) $term : $term;
|
66 |
+
$term_to_check = term_exists( $term );
|
67 |
+
$to_return = array(
|
68 |
+
'taxonomy' => $taxonomy
|
69 |
+
);
|
70 |
+
// if term doesn't exist, create it.
|
71 |
+
if ( 0 === $term_to_check || null === $term_to_check ) {
|
72 |
+
$term_to_check = wp_insert_term( $term, $taxonomy, $attrs );
|
73 |
+
if ( is_wp_error( $term_to_check ) ) {
|
74 |
return false;
|
75 |
}
|
76 |
+
$term_to_check = (object)$term_to_check;
|
77 |
+
$to_return['term_id'] = (int)$term_to_check->term_id;
|
78 |
+
} else {
|
79 |
+
$to_return['term_id'] = (int)$term_to_check;
|
80 |
+
// when importing categories, use the mapping of the current site
|
81 |
+
// so place the term in the current taxonomy
|
82 |
+
if ( self::CATEGORIES === $taxonomy ) {
|
83 |
+
// check that the term matches the taxonomy
|
84 |
+
$tax = $this->_get_taxonomy_for_term_id( $term_to_check );
|
85 |
+
$to_return['taxonomy'] = $tax->taxonomy;
|
86 |
+
}
|
87 |
+
|
88 |
}
|
89 |
+
return $to_return;
|
90 |
}
|
91 |
|
92 |
/**
|
147 |
$url_components = parse_url( $feed->feed_url );
|
148 |
$feed_name = $url_components['host'];
|
149 |
}
|
150 |
+
$term = $this->initiate_term(
|
151 |
$feed_name,
|
152 |
self::FEEDS,
|
153 |
false,
|
155 |
'description' => $feed->feed_url,
|
156 |
)
|
157 |
);
|
158 |
+
if ( false === $term ) {
|
159 |
return false;
|
160 |
}
|
161 |
+
$term_id = $term['term_id'];
|
162 |
return $this->set_terms( array( $term_id ), self::FEEDS );
|
163 |
}
|
164 |
|
165 |
+
/**
|
166 |
+
* Get the taxonomy name from term id
|
167 |
+
*
|
168 |
+
* @param int $term
|
169 |
+
*
|
170 |
+
* @return stdClass The taxonomy nane
|
171 |
+
*/
|
172 |
+
protected function _get_taxonomy_for_term_id( $term ) {
|
173 |
+
$db = $this->_registry->get( 'dbi.dbi' );
|
174 |
+
return $db->get_row(
|
175 |
+
$db->prepare(
|
176 |
+
'SELECT terms_taxonomy.taxonomy FROM ' . $db->get_table_name( 'terms' ) .
|
177 |
+
' AS terms INNER JOIN ' .
|
178 |
+
$db->get_table_name( 'term_taxonomy' ) .
|
179 |
+
' AS terms_taxonomy USING(term_id) '.
|
180 |
+
'WHERE terms.term_id = %d LIMIT 1', $term )
|
181 |
+
);
|
182 |
+
}
|
183 |
}
|
app/model/filter/taxonomy.php
CHANGED
@@ -38,16 +38,18 @@ abstract class Ai1ec_Filter_Taxonomy extends Ai1ec_Filter_Int {
|
|
38 |
* @return string Valid SQL snippet.
|
39 |
*/
|
40 |
public function get_join() {
|
41 |
-
$
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
|
|
|
|
51 |
return str_replace(
|
52 |
array(
|
53 |
'{{RELATIONSHIPS_TABLE}}',
|
38 |
* @return string Valid SQL snippet.
|
39 |
*/
|
40 |
public function get_join() {
|
41 |
+
if ( empty( $this->_values ) ) {
|
42 |
+
return '';
|
43 |
+
}
|
44 |
+
$sql_query =
|
45 |
+
'LEFT JOIN `{{RELATIONSHIPS_TABLE}}` AS `{{RELATIONSHIP_ALIAS}}` ' .
|
46 |
+
'ON ( `e` . `post_id` = `{{RELATIONSHIP_ALIAS}}` . `object_id` ) ' .
|
47 |
+
'LEFT JOIN `{{TAXONOMY_TABLE}}` AS `{{TAXONOMY_ALIAS}}` ' .
|
48 |
+
'ON (' .
|
49 |
+
'`{{RELATIONSHIP_ALIAS}}` . `term_taxonomy_id` = ' .
|
50 |
+
'`{{TAXONOMY_ALIAS}}` . `term_taxonomy_id` ' .
|
51 |
+
'AND `{{TAXONOMY_ALIAS}}` . taxonomy = {{TAXONOMY}} ' .
|
52 |
+
')';
|
53 |
return str_replace(
|
54 |
array(
|
55 |
'{{RELATIONSHIPS_TABLE}}',
|
app/model/search.php
CHANGED
@@ -128,7 +128,9 @@ class Ai1ec_Event_Search extends Ai1ec_Base {
|
|
128 |
`e`.`ical_source_url`,
|
129 |
`e`.`ical_organizer`,
|
130 |
`e`.`ical_contact`,
|
131 |
-
`e`.`ical_uid
|
|
|
|
|
132 |
FROM
|
133 |
' . $this->_dbi->get_table_name( 'ai1ec_events' ) . ' e
|
134 |
INNER JOIN
|
@@ -225,7 +227,9 @@ class Ai1ec_Event_Search extends Ai1ec_Base {
|
|
225 |
}
|
226 |
|
227 |
// Convert timestamp to GMT time
|
228 |
-
$time = $this->_registry->get(
|
|
|
|
|
229 |
// Get post status Where snippet and associated SQL arguments
|
230 |
$where_parameters = $this->_get_post_status_sql();
|
231 |
$post_status_where = $where_parameters['post_status_where'];
|
@@ -257,7 +261,7 @@ class Ai1ec_Event_Search extends Ai1ec_Base {
|
|
257 |
$order_direction = ( $page_offset >= 0 ) ? 'ASC' : 'DESC';
|
258 |
if ( false !== $last_day ) {
|
259 |
if ( 0 == $last_day ) {
|
260 |
-
$last_day = $
|
261 |
}
|
262 |
$filter_date_clause = ' i.end ';
|
263 |
if ( $page_offset < 0 ) {
|
@@ -279,7 +283,7 @@ class Ai1ec_Event_Search extends Ai1ec_Base {
|
|
279 |
'e.recurrence_rules, e.exception_rules, e.ticket_url, e.instant_event, e.recurrence_dates, e.exception_dates, ' .
|
280 |
'e.venue, e.country, e.address, e.city, e.province, e.postal_code, ' .
|
281 |
'e.show_map, e.contact_name, e.contact_phone, e.contact_email, e.cost, ' .
|
282 |
-
'e.ical_feed_url, e.ical_source_url, e.ical_organizer, e.ical_contact, e.ical_uid, e.timezone_name ' .
|
283 |
'FROM ' . $this->_dbi->get_table_name( 'ai1ec_events' ) . ' e ' .
|
284 |
'INNER JOIN ' . $this->_dbi->get_table_name( 'posts' ) . ' p ON e.post_id = p.ID ' .
|
285 |
$wpml_join_particle .
|
128 |
`e`.`ical_source_url`,
|
129 |
`e`.`ical_organizer`,
|
130 |
`e`.`ical_contact`,
|
131 |
+
`e`.`ical_uid`,
|
132 |
+
`e`.`longitude`,
|
133 |
+
`e`.`latitude`
|
134 |
FROM
|
135 |
' . $this->_dbi->get_table_name( 'ai1ec_events' ) . ' e
|
136 |
INNER JOIN
|
227 |
}
|
228 |
|
229 |
// Convert timestamp to GMT time
|
230 |
+
$time = $this->_registry->get(
|
231 |
+
'date.system'
|
232 |
+
)->current_time() >> 11 << 11;
|
233 |
// Get post status Where snippet and associated SQL arguments
|
234 |
$where_parameters = $this->_get_post_status_sql();
|
235 |
$post_status_where = $where_parameters['post_status_where'];
|
261 |
$order_direction = ( $page_offset >= 0 ) ? 'ASC' : 'DESC';
|
262 |
if ( false !== $last_day ) {
|
263 |
if ( 0 == $last_day ) {
|
264 |
+
$last_day = $time;
|
265 |
}
|
266 |
$filter_date_clause = ' i.end ';
|
267 |
if ( $page_offset < 0 ) {
|
283 |
'e.recurrence_rules, e.exception_rules, e.ticket_url, e.instant_event, e.recurrence_dates, e.exception_dates, ' .
|
284 |
'e.venue, e.country, e.address, e.city, e.province, e.postal_code, ' .
|
285 |
'e.show_map, e.contact_name, e.contact_phone, e.contact_email, e.cost, ' .
|
286 |
+
'e.ical_feed_url, e.ical_source_url, e.ical_organizer, e.ical_contact, e.ical_uid, e.timezone_name, e.longitude, e.latitude ' .
|
287 |
'FROM ' . $this->_dbi->get_table_name( 'ai1ec_events' ) . ' e ' .
|
288 |
'INNER JOIN ' . $this->_dbi->get_table_name( 'posts' ) . ' p ON e.post_id = p.ID ' .
|
289 |
$wpml_join_particle .
|
app/model/settings.php
CHANGED
@@ -214,6 +214,17 @@ class Ai1ec_Settings extends Ai1ec_App {
|
|
214 |
}
|
215 |
}
|
216 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
/**
|
218 |
* Hide an option by unsetting it's renderer
|
219 |
*
|
@@ -284,23 +295,13 @@ class Ai1ec_Settings extends Ai1ec_App {
|
|
284 |
$upgrade = true;
|
285 |
}
|
286 |
if ( true === $upgrade ) {
|
287 |
-
$this->
|
288 |
}
|
289 |
$this->_registry->get( 'controller.shutdown' )->register(
|
290 |
array( $this, 'shutdown' )
|
291 |
);
|
292 |
}
|
293 |
|
294 |
-
/**
|
295 |
-
* Do things needed on every plugin upgrade.
|
296 |
-
*/
|
297 |
-
protected function _perform_upgrade_actions() {
|
298 |
-
$option = $this->_registry->get( 'model.option' );
|
299 |
-
$option->set( 'ai1ec_force_flush_rewrite_rules', true, true );
|
300 |
-
$option->set( 'ai1ec_invalidate_css_cache', true, true );
|
301 |
-
$option->set( Ai1ec_Theme_Loader::OPTION_FORCE_CLEAN, true, true );
|
302 |
-
}
|
303 |
-
|
304 |
/**
|
305 |
* Set the standard values for the options of the core plugin.
|
306 |
*
|
@@ -421,7 +422,6 @@ class Ai1ec_Settings extends Ai1ec_App {
|
|
421 |
'item' => 'viewing-events',
|
422 |
'label' => Ai1ec_I18n::__( 'Timezone' ),
|
423 |
'options' => 'Ai1ec_Date_Timezone:get_timezones',
|
424 |
-
'condition' => 'Ai1ec_Date_Timezone:is_timezone_not_set',
|
425 |
),
|
426 |
'default' => $this->_registry->get( 'model.option' )->get(
|
427 |
'timezone_string'
|
@@ -605,6 +605,9 @@ class Ai1ec_Settings extends Ai1ec_App {
|
|
605 |
'label' => Ai1ec_I18n::__(
|
606 |
' <strong>Affix filter menu</strong> to top of window when it scrolls out of view'
|
607 |
),
|
|
|
|
|
|
|
608 |
),
|
609 |
'default' => false,
|
610 |
),
|
214 |
}
|
215 |
}
|
216 |
|
217 |
+
|
218 |
+
/**
|
219 |
+
* Do things needed on every plugin upgrade.
|
220 |
+
*/
|
221 |
+
public function perform_upgrade_actions() {
|
222 |
+
$option = $this->_registry->get( 'model.option' );
|
223 |
+
$option->set( 'ai1ec_force_flush_rewrite_rules', true, true );
|
224 |
+
$option->set( 'ai1ec_invalidate_css_cache', true, true );
|
225 |
+
$option->set( Ai1ec_Theme_Loader::OPTION_FORCE_CLEAN, true, true );
|
226 |
+
}
|
227 |
+
|
228 |
/**
|
229 |
* Hide an option by unsetting it's renderer
|
230 |
*
|
295 |
$upgrade = true;
|
296 |
}
|
297 |
if ( true === $upgrade ) {
|
298 |
+
$this->perform_upgrade_actions();
|
299 |
}
|
300 |
$this->_registry->get( 'controller.shutdown' )->register(
|
301 |
array( $this, 'shutdown' )
|
302 |
);
|
303 |
}
|
304 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
/**
|
306 |
* Set the standard values for the options of the core plugin.
|
307 |
*
|
422 |
'item' => 'viewing-events',
|
423 |
'label' => Ai1ec_I18n::__( 'Timezone' ),
|
424 |
'options' => 'Ai1ec_Date_Timezone:get_timezones',
|
|
|
425 |
),
|
426 |
'default' => $this->_registry->get( 'model.option' )->get(
|
427 |
'timezone_string'
|
605 |
'label' => Ai1ec_I18n::__(
|
606 |
' <strong>Affix filter menu</strong> to top of window when it scrolls out of view'
|
607 |
),
|
608 |
+
'help' => Ai1ec_I18n::__(
|
609 |
+
'Only applies to first visible calendar found on the page.'
|
610 |
+
),
|
611 |
),
|
612 |
'default' => false,
|
613 |
),
|
app/model/taxonomy.php
CHANGED
@@ -15,9 +15,53 @@ class Ai1ec_Taxonomy extends Ai1ec_Base {
|
|
15 |
*/
|
16 |
protected $_taxonomy_map = array(
|
17 |
'events_categories' => array(),
|
18 |
-
'events_tags'
|
19 |
);
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
/**
|
22 |
* Callback to pre-populate taxonomies before processing.
|
23 |
*
|
15 |
*/
|
16 |
protected $_taxonomy_map = array(
|
17 |
'events_categories' => array(),
|
18 |
+
'events_tags' => array(),
|
19 |
);
|
20 |
|
21 |
+
/**
|
22 |
+
* Callback to pre-populate taxonomies before exporting ics.
|
23 |
+
* All taxonomies which are not tags are exported as event_categories
|
24 |
+
*
|
25 |
+
* @param array $post_ids List of Post IDs to inspect.
|
26 |
+
*
|
27 |
+
* @return void
|
28 |
+
*/
|
29 |
+
public function prepare_meta_for_ics( array $post_ids ) {
|
30 |
+
$taxonomies = get_object_taxonomies( AI1EC_POST_TYPE );
|
31 |
+
$categories = array();
|
32 |
+
$excluded_categories = array(
|
33 |
+
'events_tags' => true,
|
34 |
+
'events_feeds' => true
|
35 |
+
);
|
36 |
+
foreach ( $taxonomies as $taxonomy ) {
|
37 |
+
if ( isset( $excluded_categories[$taxonomy] ) ) {
|
38 |
+
continue;
|
39 |
+
}
|
40 |
+
$categories[] = $taxonomy;
|
41 |
+
}
|
42 |
+
foreach ( $post_ids as $post_id ) {
|
43 |
+
$post_id = (int)$post_id;
|
44 |
+
$this->_taxonomy_map['events_categories'][$post_id] = array();
|
45 |
+
$this->_taxonomy_map['events_tags'][$post_id] = array();
|
46 |
+
}
|
47 |
+
$tags = wp_get_object_terms(
|
48 |
+
$post_ids,
|
49 |
+
array( 'events_tags' ),
|
50 |
+
array( 'fields' => 'all_with_object_id' )
|
51 |
+
);
|
52 |
+
foreach ( $tags as $term ) {
|
53 |
+
$this->_taxonomy_map[$term->taxonomy][$term->object_id][] = $term;
|
54 |
+
}
|
55 |
+
$category_terms = wp_get_object_terms(
|
56 |
+
$post_ids,
|
57 |
+
$categories,
|
58 |
+
array( 'fields' => 'all_with_object_id' )
|
59 |
+
);
|
60 |
+
foreach ( $category_terms as $term ) {
|
61 |
+
$this->_taxonomy_map['events_categories'][$term->object_id][] = $term;
|
62 |
+
}
|
63 |
+
}
|
64 |
+
|
65 |
/**
|
66 |
* Callback to pre-populate taxonomies before processing.
|
67 |
*
|
app/view/admin/add-new-event.php
CHANGED
@@ -31,6 +31,27 @@ class Ai1ec_View_Add_New_Event extends Ai1ec_Base {
|
|
31 |
);
|
32 |
}
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
/**
|
35 |
* Add Event Details meta box to the Add/Edit Event screen in the dashboard.
|
36 |
*
|
@@ -342,6 +363,26 @@ class Ai1ec_View_Add_New_Event extends Ai1ec_Base {
|
|
342 |
->get_content();
|
343 |
}
|
344 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
345 |
/**
|
346 |
* disable_autosave method
|
347 |
*
|
31 |
);
|
32 |
}
|
33 |
|
34 |
+
/**
|
35 |
+
* Create hook to display Banner image meta box.
|
36 |
+
*
|
37 |
+
* @wp_hook add_meta_boxes
|
38 |
+
*
|
39 |
+
* @return void
|
40 |
+
*/
|
41 |
+
public function event_banner_meta_box_container() {
|
42 |
+
if ( ! apply_filters( 'ai1ec_use_banner_image', false ) ) {
|
43 |
+
return;
|
44 |
+
}
|
45 |
+
add_meta_box(
|
46 |
+
AI1EC_POST_TYPE. '_banner',
|
47 |
+
Ai1ec_I18n::__( 'Banner Image' ),
|
48 |
+
array( $this, 'banner_meta_box_view' ),
|
49 |
+
AI1EC_POST_TYPE,
|
50 |
+
'side',
|
51 |
+
'low'
|
52 |
+
);
|
53 |
+
}
|
54 |
+
|
55 |
/**
|
56 |
* Add Event Details meta box to the Add/Edit Event screen in the dashboard.
|
57 |
*
|
363 |
->get_content();
|
364 |
}
|
365 |
|
366 |
+
/**
|
367 |
+
* Add Banner Image meta box to the Add/Edit Event.
|
368 |
+
*
|
369 |
+
* @return void
|
370 |
+
*/
|
371 |
+
public function banner_meta_box_view( $post ) {
|
372 |
+
$banner_image_meta = get_post_meta( $post->ID, 'ai1ec_banner_image' );
|
373 |
+
$theme_loader = $this->_registry->get( 'theme.loader' );
|
374 |
+
$args = array(
|
375 |
+
'src' => $banner_image_meta && $banner_image_meta[0]
|
376 |
+
? $banner_image_meta[0] : false,
|
377 |
+
'set_text' => Ai1ec_I18n::__( 'Set banner image' ),
|
378 |
+
'remove_text' => Ai1ec_I18n::__( 'Remove banner image' ),
|
379 |
+
|
380 |
+
);
|
381 |
+
echo $theme_loader
|
382 |
+
->get_file( 'banner-image.twig', $args, true )
|
383 |
+
->get_content();
|
384 |
+
}
|
385 |
+
|
386 |
/**
|
387 |
* disable_autosave method
|
388 |
*
|
app/view/admin/add-ons.php
ADDED
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* The Calendar Add-ons page.
|
5 |
+
*
|
6 |
+
* @author Time.ly Network Inc.
|
7 |
+
* @since 2.1
|
8 |
+
*
|
9 |
+
* @package AI1EC
|
10 |
+
* @subpackage AI1EC.View
|
11 |
+
*/
|
12 |
+
class Ai1ec_View_Add_Ons extends Ai1ec_View_Admin_Abstract {
|
13 |
+
/**
|
14 |
+
* Adds page to the menu.
|
15 |
+
*
|
16 |
+
* @wp_hook admin_menu
|
17 |
+
*
|
18 |
+
* @return void
|
19 |
+
*/
|
20 |
+
public function add_page() {
|
21 |
+
// =======================
|
22 |
+
// = Calendar Add Ons Page =
|
23 |
+
// =======================
|
24 |
+
add_submenu_page(
|
25 |
+
AI1EC_ADMIN_BASE_URL,
|
26 |
+
Ai1ec_I18n::__( 'Add-ons' ),
|
27 |
+
Ai1ec_I18n::__( 'Add-ons' ),
|
28 |
+
'manage_ai1ec_feeds',
|
29 |
+
AI1EC_PLUGIN_NAME . '-add-ons',
|
30 |
+
array( $this, 'display_page' )
|
31 |
+
);
|
32 |
+
}
|
33 |
+
/**
|
34 |
+
* Display Add Ons list page.
|
35 |
+
*
|
36 |
+
* @return void
|
37 |
+
*/
|
38 |
+
public function display_page() {
|
39 |
+
wp_enqueue_style(
|
40 |
+
'ai1ec_addons.css',
|
41 |
+
AI1EC_ADMIN_THEME_CSS_URL . 'addons.css',
|
42 |
+
array(),
|
43 |
+
AI1EC_VERSION
|
44 |
+
);
|
45 |
+
$content = get_transient( 'ai1ec_timely_addons' );
|
46 |
+
$is_error = false;
|
47 |
+
if (
|
48 |
+
false === $content ||
|
49 |
+
(
|
50 |
+
defined( 'AI1EC_DEBUG' ) &&
|
51 |
+
AI1EC_DEBUG
|
52 |
+
)
|
53 |
+
) {
|
54 |
+
$is_error = true;
|
55 |
+
$feed = wp_remote_get( AI1EC_TIMELY_ADDONS_URI );
|
56 |
+
if ( ! is_wp_error( $feed ) ) {
|
57 |
+
$content = json_decode( wp_remote_retrieve_body( $feed ) );
|
58 |
+
if ( null !== $content ) {
|
59 |
+
set_transient( 'ai1ec_timely_addons', $content, 3600 );
|
60 |
+
$is_error = false;
|
61 |
+
}
|
62 |
+
}
|
63 |
+
}
|
64 |
+
$this->_registry->get( 'theme.loader' )->get_file(
|
65 |
+
'add-ons-list/page.twig',
|
66 |
+
array(
|
67 |
+
'labels' => array(
|
68 |
+
'title' => Ai1ec_I18n::__(
|
69 |
+
'Add-ons for All In One Event Calendar'
|
70 |
+
),
|
71 |
+
'button_title' => Ai1ec_I18n::__(
|
72 |
+
'Browse All Extensions'
|
73 |
+
),
|
74 |
+
'paragraph_content' => Ai1ec_I18n::__(
|
75 |
+
'These add-ons extend the functionality of the All-in-One Event Calendar.'
|
76 |
+
),
|
77 |
+
'error' => Ai1ec_I18n::__(
|
78 |
+
'There was an error retrieving the extensions list from the server. Please try again later.'
|
79 |
+
),
|
80 |
+
),
|
81 |
+
'content' => $content,
|
82 |
+
'is_error' => $is_error,
|
83 |
+
),
|
84 |
+
true
|
85 |
+
)->render();
|
86 |
+
}
|
87 |
+
|
88 |
+
public function add_meta_box() {
|
89 |
+
}
|
90 |
+
|
91 |
+
public function display_meta_box( $object, $box ) {
|
92 |
+
}
|
93 |
+
|
94 |
+
public function handle_post() {
|
95 |
+
}
|
96 |
+
|
97 |
+
}
|
app/view/admin/settings.php
CHANGED
@@ -51,7 +51,9 @@ class Ai1ec_View_Admin_Settings extends Ai1ec_View_Admin_Abstract {
|
|
51 |
$loader = $this->_registry->get( 'theme.loader' );
|
52 |
$file = $loader->get_file( 'setting/page.twig', $args, true );
|
53 |
$file->render();
|
54 |
-
|
|
|
|
|
55 |
}
|
56 |
|
57 |
/* (non-PHPdoc)
|
@@ -105,11 +107,7 @@ class Ai1ec_View_Admin_Settings extends Ai1ec_View_Admin_Abstract {
|
|
105 |
* @param mixed $box
|
106 |
*/
|
107 |
public function support_meta_box( $object, $box ) {
|
108 |
-
|
109 |
-
// Initialize new feed
|
110 |
-
$newsItems = array();
|
111 |
-
$feed = fetch_feed( AI1EC_RSS_FEED );
|
112 |
-
$newsItems = is_wp_error( $feed ) ? array() : $feed->get_items( 0, 5 );
|
113 |
$loader = $this->_registry->get( 'theme.loader' );
|
114 |
$file = $loader->get_file(
|
115 |
'box_support.php',
|
@@ -177,8 +175,8 @@ class Ai1ec_View_Admin_Settings extends Ai1ec_View_Admin_Abstract {
|
|
177 |
'If the form below is not working please follow <a href="%s">this link</a>.'
|
178 |
) .
|
179 |
'</div>',
|
180 |
-
wp_nonce_url(
|
181 |
-
add_query_arg( 'ai1ec_disable_gzip_compression', '1' ),
|
182 |
'ai1ec_disable_gzip_compression'
|
183 |
)
|
184 |
)
|
51 |
$loader = $this->_registry->get( 'theme.loader' );
|
52 |
$file = $loader->get_file( 'setting/page.twig', $args, true );
|
53 |
$file->render();
|
54 |
+
if ( apply_filters( 'ai1ec_robots_install', true ) ) {
|
55 |
+
$this->_registry->get( 'robots.helper' )->install();
|
56 |
+
}
|
57 |
}
|
58 |
|
59 |
/* (non-PHPdoc)
|
107 |
* @param mixed $box
|
108 |
*/
|
109 |
public function support_meta_box( $object, $box ) {
|
110 |
+
$newsItems = $this->_registry->get( 'news.feed' )->import_feed();
|
|
|
|
|
|
|
|
|
111 |
$loader = $this->_registry->get( 'theme.loader' );
|
112 |
$file = $loader->get_file(
|
113 |
'box_support.php',
|
175 |
'If the form below is not working please follow <a href="%s">this link</a>.'
|
176 |
) .
|
177 |
'</div>',
|
178 |
+
wp_nonce_url(
|
179 |
+
add_query_arg( 'ai1ec_disable_gzip_compression', '1' ),
|
180 |
'ai1ec_disable_gzip_compression'
|
181 |
)
|
182 |
)
|
app/view/admin/widget-creator.php
ADDED
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* The SuperWidget creator page.
|
5 |
+
*
|
6 |
+
* @author Time.ly Network Inc.
|
7 |
+
* @since 2.1
|
8 |
+
*
|
9 |
+
* @package AI1ECSW
|
10 |
+
* @subpackage AI1ECSW.View
|
11 |
+
*/
|
12 |
+
class Ai1ec_View_Widget_Creator extends Ai1ec_View_Admin_Abstract {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Adds page to the menu.
|
16 |
+
*
|
17 |
+
* @wp_hook admin_menu
|
18 |
+
*
|
19 |
+
* @return void
|
20 |
+
*/
|
21 |
+
public function add_page() {
|
22 |
+
add_submenu_page(
|
23 |
+
AI1EC_ADMIN_BASE_URL,
|
24 |
+
__( 'Widget Creator', AI1EC_PLUGIN_NAME ),
|
25 |
+
__( 'Widget Creator', AI1EC_PLUGIN_NAME ),
|
26 |
+
'manage_ai1ec_feeds',
|
27 |
+
AI1EC_PLUGIN_NAME . '-widget-creator',
|
28 |
+
array( $this, 'display_page' )
|
29 |
+
);
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Display this plugin's feeds page in the admin.
|
34 |
+
*
|
35 |
+
* @return void
|
36 |
+
*/
|
37 |
+
public function display_page() {
|
38 |
+
$this->_registry->get( 'css.admin' )->admin_enqueue_scripts(
|
39 |
+
'ai1ec_event_page_all-in-one-event-calendar-settings'
|
40 |
+
);
|
41 |
+
$this->_registry->get( 'css.admin' )->process_enqueue(
|
42 |
+
array(
|
43 |
+
array( 'style', 'super-widget.css', ),
|
44 |
+
)
|
45 |
+
);
|
46 |
+
$args = array(
|
47 |
+
'title' => __(
|
48 |
+
'Widget Creator',
|
49 |
+
AI1EC_PLUGIN_NAME
|
50 |
+
),
|
51 |
+
'metabox' => array(
|
52 |
+
'screen' => 'ai1ec-super-widget',
|
53 |
+
'action' => 'left',
|
54 |
+
'object' => null
|
55 |
+
),
|
56 |
+
);
|
57 |
+
$loader = $this->_registry->get( 'theme.loader' );
|
58 |
+
$file = $loader->get_file( 'widget-creator/page.twig', $args, true );
|
59 |
+
$file->render();
|
60 |
+
}
|
61 |
+
|
62 |
+
/* (non-PHPdoc)
|
63 |
+
* @see Ai1ec_View_Admin_Settings::handle_post()
|
64 |
+
*/
|
65 |
+
public function handle_post() {
|
66 |
+
}
|
67 |
+
|
68 |
+
/* (non-PHPdoc)
|
69 |
+
* @see Ai1ec_View_Admin_Settings::add_meta_box()
|
70 |
+
*/
|
71 |
+
public function add_meta_box() {
|
72 |
+
add_meta_box(
|
73 |
+
'ai1ec-widget-creator',
|
74 |
+
_x( 'Widget Creator', 'meta box', AI1EC_PLUGIN_NAME ),
|
75 |
+
array( $this, 'display_meta_box' ),
|
76 |
+
'ai1ec-super-widget',
|
77 |
+
'left',
|
78 |
+
'default'
|
79 |
+
);
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Renders the settings
|
84 |
+
*
|
85 |
+
* @param array $settings
|
86 |
+
*
|
87 |
+
* @return array
|
88 |
+
*/
|
89 |
+
public function get_html_from_settings( array $settings ) {
|
90 |
+
$named_elements = array();
|
91 |
+
foreach ( $settings as $id => $setting ) {
|
92 |
+
$named_elements[$id] = $this->_registry->get(
|
93 |
+
'html.element.setting.' . $setting['renderer']['class'],
|
94 |
+
array(
|
95 |
+
'id' => $id,
|
96 |
+
'value' => $setting['value'],
|
97 |
+
'renderer' => $setting['renderer'],
|
98 |
+
)
|
99 |
+
)->render();
|
100 |
+
}
|
101 |
+
return $named_elements;
|
102 |
+
}
|
103 |
+
|
104 |
+
/* (non-PHPdoc)
|
105 |
+
* @see Ai1ec_View_Admin_Settings::display_meta_box()
|
106 |
+
*/
|
107 |
+
public function display_meta_box( $object, $box ) {
|
108 |
+
$widgets = $this->_registry->get( 'controller.javascript-widget' )
|
109 |
+
->get_widgets();
|
110 |
+
// this is just for the Super Widget which doesn't fully implement Ai1ec_Embeddable
|
111 |
+
$widgets = apply_filters( 'ai1ec_widget_creators_widgets', $widgets );
|
112 |
+
$tabs = array();
|
113 |
+
foreach ( $widgets as $widget_id => $widget_class ) {
|
114 |
+
$widget = $this->_registry->get( $widget_class );
|
115 |
+
$tabs[$widget_id] = array(
|
116 |
+
'name' => $widget->get_name(),
|
117 |
+
'requirements' => $widget->check_requirements(),
|
118 |
+
'elements' => $this->get_html_from_settings(
|
119 |
+
$widget->get_configurable_for_widget_creation()
|
120 |
+
)
|
121 |
+
);
|
122 |
+
}
|
123 |
+
|
124 |
+
$loader = $this->_registry->get( 'theme.loader' );
|
125 |
+
$file = $loader->get_file(
|
126 |
+
'widget-creator/super-widget-contents.twig',
|
127 |
+
array(
|
128 |
+
'tabs' => $tabs,
|
129 |
+
'siteurl' => trailingslashit( get_site_url() ),
|
130 |
+
'common_info' => __( 'Use this tool to generate code snippets you can place on your site to embed new calendars and widgets.', AI1EC_PLUGIN_NAME ),
|
131 |
+
'preview' => __( 'Preview:', AI1EC_PLUGIN_NAME ),
|
132 |
+
'full_calendar_title' => __( 'Full Calendar', AI1EC_PLUGIN_NAME ),
|
133 |
+
'paste_text' => __( 'Paste this code onto your site:', AI1EC_PLUGIN_NAME ),
|
134 |
+
'updated_code_text' => __( 'This code will update to reflect changes made to the settings. Changing settings will not affect previously embedded widgets.', AI1EC_PLUGIN_NAME )
|
135 |
+
),
|
136 |
+
true
|
137 |
+
);
|
138 |
+
$file->render();
|
139 |
+
}
|
140 |
+
|
141 |
+
|
142 |
+
}
|
app/view/calendar/fallbacks.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* The concrete class for the calendar page.
|
5 |
+
*
|
6 |
+
* @author Time.ly Network Inc.
|
7 |
+
* @since 2.1
|
8 |
+
*
|
9 |
+
* @package AI1EC
|
10 |
+
* @subpackage AI1EC.View
|
11 |
+
*/
|
12 |
+
class Ai1ec_Calendar_Avatar_Fallbacks extends Ai1ec_Base {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Default avatar fallbacks.
|
16 |
+
*
|
17 |
+
* @var array
|
18 |
+
*/
|
19 |
+
protected $_fallbacks = array(
|
20 |
+
'post_thumbnail',
|
21 |
+
'content_img',
|
22 |
+
'category_avatar',
|
23 |
+
);
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Get registered fallbacks.
|
27 |
+
*
|
28 |
+
* @return array
|
29 |
+
*/
|
30 |
+
public function get_all() {
|
31 |
+
return $this->_fallbacks;
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Register new avatar fallbacks.
|
36 |
+
*
|
37 |
+
* @param array $fallbacks Fallbacks.
|
38 |
+
*
|
39 |
+
* @return void Method does not return.
|
40 |
+
*/
|
41 |
+
public function set( array $fallbacks ) {
|
42 |
+
$this->_fallbacks = $fallbacks;
|
43 |
+
}
|
44 |
+
|
45 |
+
}
|
app/view/calendar/page.php
CHANGED
@@ -33,8 +33,7 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
|
|
33 |
* @param Ai1ec_Request_Parser $request
|
34 |
*/
|
35 |
public function get_content( Ai1ec_Request_Parser $request ) {
|
36 |
-
|
37 |
-
$shortcode = $request->get( 'shortcode' );
|
38 |
|
39 |
// Get args for the current view; required to generate HTML for views
|
40 |
// dropdown list, categories, tags, subscribe buttons, and of course the
|
@@ -91,14 +90,16 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
|
|
91 |
// Get HTML for view itself.
|
92 |
$view = $view_obj->get_content( $view_args );
|
93 |
|
|
|
|
|
|
|
|
|
|
|
94 |
if (
|
95 |
( $view_args['no_navigation'] || $type !== 'html' ) &&
|
96 |
-
'
|
97 |
) {
|
98 |
-
|
99 |
-
$are_filters_set = $router->is_at_least_one_filter_set_in_request(
|
100 |
-
$view_args
|
101 |
-
);
|
102 |
// send data both for json and jsonp as shortcodes are jsonp
|
103 |
return array(
|
104 |
'html' => $view,
|
@@ -107,12 +108,19 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
|
|
107 |
'views_dropdown' => $views_dropdown,
|
108 |
'subscribe_buttons' => $subscribe_buttons,
|
109 |
'are_filters_set' => $are_filters_set,
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
);
|
111 |
|
112 |
} else {
|
113 |
$loader = $this->_registry->get( 'theme.loader' );
|
114 |
$empty = $loader->get_file( 'empty.twig', array(), false );
|
115 |
-
|
|
|
116 |
// Define new arguments for overall calendar view
|
117 |
$filter_args = array(
|
118 |
'views_dropdown' => $views_dropdown,
|
@@ -120,7 +128,8 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
|
|
120 |
'tags' => $tags,
|
121 |
'contribution_buttons' => apply_filters(
|
122 |
'ai1ec_contribution_buttons',
|
123 |
-
''
|
|
|
124 |
),
|
125 |
'show_dropdowns' => apply_filters(
|
126 |
'ai1ec_show_dropdowns',
|
@@ -142,13 +151,20 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
|
|
142 |
'ai1ec_save_view_btngroup',
|
143 |
$empty
|
144 |
),
|
|
|
|
|
145 |
);
|
146 |
-
|
147 |
$filter_menu = $loader->get_file(
|
148 |
'filter-menu.twig',
|
149 |
$filter_args,
|
150 |
false
|
151 |
-
);
|
|
|
|
|
|
|
|
|
|
|
152 |
$calendar_args = array(
|
153 |
'version' => AI1EC_VERSION,
|
154 |
'filter_menu' => $filter_menu,
|
@@ -161,7 +177,19 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
|
|
161 |
);
|
162 |
|
163 |
$calendar = $loader->get_file( 'calendar.twig', $calendar_args, false );
|
164 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
}
|
166 |
}
|
167 |
|
@@ -204,6 +232,11 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
|
|
204 |
implode( ',', $view_args['post_ids'] );
|
205 |
$args['is_filtered'] = true;
|
206 |
}
|
|
|
|
|
|
|
|
|
|
|
207 |
$localization = $this->_registry->get( 'p28n.wpml' );
|
208 |
if (
|
209 |
NULL !== ( $use_lang = $localization->get_language() )
|
@@ -262,6 +295,9 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
|
|
262 |
$val['longname'],
|
263 |
1
|
264 |
);
|
|
|
|
|
|
|
265 |
$href = $this->_registry->get( 'html.element.href', $options );
|
266 |
$values['href'] = $href->generate_href();
|
267 |
$available_views[$key] = $values;
|
@@ -379,14 +415,18 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
|
|
379 |
if ( 0 === strncmp( $action, 'ai1ec_', 6 ) ) {
|
380 |
$action = substr( $action, 6 );
|
381 |
}
|
382 |
-
$view_args = $request->get_dict(
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
|
|
|
|
|
|
|
|
390 |
$add_defaults = array(
|
391 |
'cat_ids' => 'categories',
|
392 |
'tag_ids' => 'tags',
|
@@ -406,6 +446,7 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
|
|
406 |
$type
|
407 |
);
|
408 |
|
|
|
409 |
$exact_date = $this->get_exact_date( $request );
|
410 |
|
411 |
$view_args['no_navigation'] = $request
|
@@ -416,6 +457,10 @@ class Ai1ec_Calendar_Page extends Ai1ec_Base {
|
|
416 |
$view_args['action'] = $action;
|
417 |
|
418 |
$view_args['request'] = $request;
|
|
|
|
|
|
|
|
|
419 |
if ( null === $exact_date ) {
|
420 |
$href = $this->_registry->get( 'html.element.href', $view_args )
|
421 |
->generate_href();
|
33 |
* @param Ai1ec_Request_Parser $request
|
34 |
*/
|
35 |
public function get_content( Ai1ec_Request_Parser $request ) {
|
36 |
+
|
|
|
37 |
|
38 |
// Get args for the current view; required to generate HTML for views
|
39 |
// dropdown list, categories, tags, subscribe buttons, and of course the
|
90 |
// Get HTML for view itself.
|
91 |
$view = $view_obj->get_content( $view_args );
|
92 |
|
93 |
+
$router = $this->_registry->get( 'routing.router' );
|
94 |
+
$are_filters_set = $router->is_at_least_one_filter_set_in_request(
|
95 |
+
$view_args
|
96 |
+
);
|
97 |
+
|
98 |
if (
|
99 |
( $view_args['no_navigation'] || $type !== 'html' ) &&
|
100 |
+
'jsonp' !== $type
|
101 |
) {
|
102 |
+
|
|
|
|
|
|
|
103 |
// send data both for json and jsonp as shortcodes are jsonp
|
104 |
return array(
|
105 |
'html' => $view,
|
108 |
'views_dropdown' => $views_dropdown,
|
109 |
'subscribe_buttons' => $subscribe_buttons,
|
110 |
'are_filters_set' => $are_filters_set,
|
111 |
+
'custom_filters' => apply_filters(
|
112 |
+
'ai1ec_custom_filters_html',
|
113 |
+
'',
|
114 |
+
$view_args,
|
115 |
+
$request
|
116 |
+
),
|
117 |
);
|
118 |
|
119 |
} else {
|
120 |
$loader = $this->_registry->get( 'theme.loader' );
|
121 |
$empty = $loader->get_file( 'empty.twig', array(), false );
|
122 |
+
|
123 |
+
// option to show filters in the super widget
|
124 |
// Define new arguments for overall calendar view
|
125 |
$filter_args = array(
|
126 |
'views_dropdown' => $views_dropdown,
|
128 |
'tags' => $tags,
|
129 |
'contribution_buttons' => apply_filters(
|
130 |
'ai1ec_contribution_buttons',
|
131 |
+
'',
|
132 |
+
$type
|
133 |
),
|
134 |
'show_dropdowns' => apply_filters(
|
135 |
'ai1ec_show_dropdowns',
|
151 |
'ai1ec_save_view_btngroup',
|
152 |
$empty
|
153 |
),
|
154 |
+
'view_args' => $view_args,
|
155 |
+
'request' => $request,
|
156 |
);
|
157 |
+
|
158 |
$filter_menu = $loader->get_file(
|
159 |
'filter-menu.twig',
|
160 |
$filter_args,
|
161 |
false
|
162 |
+
)->get_content();
|
163 |
+
// hide filters in the SW
|
164 |
+
if ( 'true' !== $request->get( 'display_filters' ) && 'jsonp' === $type ) {
|
165 |
+
$filter_menu = '';
|
166 |
+
}
|
167 |
+
|
168 |
$calendar_args = array(
|
169 |
'version' => AI1EC_VERSION,
|
170 |
'filter_menu' => $filter_menu,
|
177 |
);
|
178 |
|
179 |
$calendar = $loader->get_file( 'calendar.twig', $calendar_args, false );
|
180 |
+
// if it's just html, only the calendar html must be returned.
|
181 |
+
if ( 'html' === $type ) {
|
182 |
+
return $calendar->get_content();
|
183 |
+
}
|
184 |
+
// send data both for json and jsonp as shortcodes are jsonp
|
185 |
+
return array(
|
186 |
+
'html' => $calendar->get_content(),
|
187 |
+
'categories' => $categories,
|
188 |
+
'tags' => $tags,
|
189 |
+
'views_dropdown' => $views_dropdown,
|
190 |
+
'subscribe_buttons' => $subscribe_buttons,
|
191 |
+
'are_filters_set' => $are_filters_set,
|
192 |
+
);
|
193 |
}
|
194 |
}
|
195 |
|
232 |
implode( ',', $view_args['post_ids'] );
|
233 |
$args['is_filtered'] = true;
|
234 |
}
|
235 |
+
$args = apply_filters(
|
236 |
+
'ai1ec_subscribe_buttons_arguments',
|
237 |
+
$args,
|
238 |
+
$view_args
|
239 |
+
);
|
240 |
$localization = $this->_registry->get( 'p28n.wpml' );
|
241 |
if (
|
242 |
NULL !== ( $use_lang = $localization->get_language() )
|
295 |
$val['longname'],
|
296 |
1
|
297 |
);
|
298 |
+
if ( AI1EC_USE_FRONTEND_RENDERING ) {
|
299 |
+
$options['request_format'] = 'json';
|
300 |
+
}
|
301 |
$href = $this->_registry->get( 'html.element.href', $options );
|
302 |
$values['href'] = $href->generate_href();
|
303 |
$available_views[$key] = $values;
|
415 |
if ( 0 === strncmp( $action, 'ai1ec_', 6 ) ) {
|
416 |
$action = substr( $action, 6 );
|
417 |
}
|
418 |
+
$view_args = $request->get_dict(
|
419 |
+
apply_filters(
|
420 |
+
'ai1ec_view_args_for_view',
|
421 |
+
array(
|
422 |
+
'post_ids',
|
423 |
+
'auth_ids',
|
424 |
+
'cat_ids',
|
425 |
+
'tag_ids',
|
426 |
+
'events_limit',
|
427 |
+
)
|
428 |
+
)
|
429 |
+
);
|
430 |
$add_defaults = array(
|
431 |
'cat_ids' => 'categories',
|
432 |
'tag_ids' => 'tags',
|
446 |
$type
|
447 |
);
|
448 |
|
449 |
+
$view_args['request_format'] = $request->get( 'request_format' );
|
450 |
$exact_date = $this->get_exact_date( $request );
|
451 |
|
452 |
$view_args['no_navigation'] = $request
|
457 |
$view_args['action'] = $action;
|
458 |
|
459 |
$view_args['request'] = $request;
|
460 |
+
$view_args = apply_filters(
|
461 |
+
'ai1ec_view_args_array',
|
462 |
+
$view_args
|
463 |
+
);
|
464 |
if ( null === $exact_date ) {
|
465 |
$href = $this->_registry->get( 'html.element.href', $view_args )
|
466 |
->generate_href();
|
app/view/calendar/shortcode.php
CHANGED
@@ -31,9 +31,9 @@ class Ai1ec_View_Calendar_Shortcode extends Ai1ec_Base {
|
|
31 |
$view_names[$view_name] = true;
|
32 |
}
|
33 |
|
34 |
-
$view
|
35 |
-
$
|
36 |
-
$events_limit
|
37 |
|
38 |
if ( isset( $atts['view'] ) ) {
|
39 |
if ( 'ly' === substr( $atts['view'], -2 ) ) {
|
@@ -46,13 +46,34 @@ class Ai1ec_View_Calendar_Shortcode extends Ai1ec_Base {
|
|
46 |
}
|
47 |
|
48 |
$mappings = array(
|
49 |
-
'cat_name' => '
|
50 |
-
'cat_id' => '
|
51 |
-
'tag_name' => '
|
52 |
-
'tag_id' => '
|
53 |
'post_id' => 'post_ids',
|
54 |
'events_limit' => 'events_limit',
|
55 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
foreach ( $mappings as $att_name => $type ) {
|
57 |
if ( ! isset( $atts[$att_name] ) ) {
|
58 |
continue;
|
@@ -71,7 +92,7 @@ class Ai1ec_View_Calendar_Shortcode extends Ai1ec_Base {
|
|
71 |
$record = get_term_by(
|
72 |
$field,
|
73 |
$search_val,
|
74 |
-
|
75 |
);
|
76 |
if ( false !== $record ) {
|
77 |
$argument = $record;
|
@@ -88,23 +109,32 @@ class Ai1ec_View_Calendar_Shortcode extends Ai1ec_Base {
|
|
88 |
continue;
|
89 |
}
|
90 |
}
|
91 |
-
${$type}[] = $argument;
|
92 |
}
|
93 |
}
|
94 |
}
|
95 |
$query = array(
|
96 |
-
'ai1ec_cat_ids' => implode( ',', $
|
97 |
-
'ai1ec_tag_ids' => implode( ',', $
|
98 |
'ai1ec_post_ids' => implode( ',', $post_ids ),
|
99 |
'action' => $view,
|
100 |
'request_type' => 'jsonp',
|
101 |
-
'shortcode' => 'true',
|
102 |
'events_limit' => ( null !== $events_limit )
|
103 |
// definition above casts values as array, so we take first element,
|
104 |
// as there won't be others
|
105 |
? $events_limit[0]
|
106 |
: null,
|
107 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
if ( isset( $atts['exact_date'] ) ) {
|
109 |
$query['exact_date'] = $atts['exact_date'];
|
110 |
}
|
@@ -120,7 +150,8 @@ class Ai1ec_View_Calendar_Shortcode extends Ai1ec_Base {
|
|
120 |
->add_link_to_html_for_frontend();
|
121 |
$js = $this->_registry->get( 'controller.javascript' )
|
122 |
->load_frontend_js( true );
|
123 |
-
|
|
|
124 |
}
|
125 |
|
126 |
}
|
31 |
$view_names[$view_name] = true;
|
32 |
}
|
33 |
|
34 |
+
$view = $default_view;
|
35 |
+
$_events_categories = $_events_tags = $post_ids = array();
|
36 |
+
$events_limit = null;
|
37 |
|
38 |
if ( isset( $atts['view'] ) ) {
|
39 |
if ( 'ly' === substr( $atts['view'], -2 ) ) {
|
46 |
}
|
47 |
|
48 |
$mappings = array(
|
49 |
+
'cat_name' => 'events_categories',
|
50 |
+
'cat_id' => 'events_categories',
|
51 |
+
'tag_name' => 'events_tags',
|
52 |
+
'tag_id' => 'events_tags',
|
53 |
'post_id' => 'post_ids',
|
54 |
'events_limit' => 'events_limit',
|
55 |
);
|
56 |
+
$matches = array();
|
57 |
+
$custom_taxonomies = array();
|
58 |
+
if ( ! empty( $atts ) ) {
|
59 |
+
foreach ( $atts as $att => $value ) {
|
60 |
+
if (
|
61 |
+
! preg_match( '/([a-z0-9\_]+)_(id|name)/', $att, $matches ) ||
|
62 |
+
isset( $mappings[$matches[1] . '_id'] )
|
63 |
+
) {
|
64 |
+
continue;
|
65 |
+
}
|
66 |
+
${'_' . $matches[1] . '_ids'} = array();
|
67 |
+
$custom_taxonomies[] = $matches[1];
|
68 |
+
|
69 |
+
if ( ! isset( $mappings[$matches[1] . '_id'] ) ) {
|
70 |
+
$mappings[$matches[1] . '_id'] = $matches[1];
|
71 |
+
}
|
72 |
+
if ( ! isset( $mappings[$matches[1] . '_name'] ) ) {
|
73 |
+
$mappings[$matches[1] . '_name'] = $matches[1];
|
74 |
+
}
|
75 |
+
}
|
76 |
+
}
|
77 |
foreach ( $mappings as $att_name => $type ) {
|
78 |
if ( ! isset( $atts[$att_name] ) ) {
|
79 |
continue;
|
92 |
$record = get_term_by(
|
93 |
$field,
|
94 |
$search_val,
|
95 |
+
$type
|
96 |
);
|
97 |
if ( false !== $record ) {
|
98 |
$argument = $record;
|
109 |
continue;
|
110 |
}
|
111 |
}
|
112 |
+
${'_' . $type}[] = $argument;
|
113 |
}
|
114 |
}
|
115 |
}
|
116 |
$query = array(
|
117 |
+
'ai1ec_cat_ids' => implode( ',', $_events_categories ),
|
118 |
+
'ai1ec_tag_ids' => implode( ',', $_events_tags ),
|
119 |
'ai1ec_post_ids' => implode( ',', $post_ids ),
|
120 |
'action' => $view,
|
121 |
'request_type' => 'jsonp',
|
|
|
122 |
'events_limit' => ( null !== $events_limit )
|
123 |
// definition above casts values as array, so we take first element,
|
124 |
// as there won't be others
|
125 |
? $events_limit[0]
|
126 |
: null,
|
127 |
);
|
128 |
+
// this is the opposite of how the SuperWidget works.
|
129 |
+
if ( ! isset( $atts['display_filters'] ) ) {
|
130 |
+
$query['display_filters'] = 'true';
|
131 |
+
} else {
|
132 |
+
$query['display_filters'] = $atts['display_filters'];
|
133 |
+
}
|
134 |
+
|
135 |
+
foreach ( $custom_taxonomies as $taxonomy ) {
|
136 |
+
$query['ai1ec_' . $taxonomy . '_ids'] = implode( ',', ${'_' . $taxonomy} );
|
137 |
+
}
|
138 |
if ( isset( $atts['exact_date'] ) ) {
|
139 |
$query['exact_date'] = $atts['exact_date'];
|
140 |
}
|
150 |
->add_link_to_html_for_frontend();
|
151 |
$js = $this->_registry->get( 'controller.javascript' )
|
152 |
->load_frontend_js( true );
|
153 |
+
|
154 |
+
return $page_content['html'];
|
155 |
}
|
156 |
|
157 |
}
|
app/view/calendar/view/agenda.php
CHANGED
@@ -38,11 +38,15 @@ class Ai1ec_Calendar_View_Agenda extends Ai1ec_Calendar_View_Abstract {
|
|
38 |
$timestamp,
|
39 |
$events_limit,
|
40 |
$view_args['page_offset'],
|
41 |
-
|
42 |
-
'
|
43 |
-
|
44 |
-
|
45 |
-
|
|
|
|
|
|
|
|
|
46 |
),
|
47 |
$view_args['time_limit']
|
48 |
);
|
@@ -146,11 +150,12 @@ class Ai1ec_Calendar_View_Agenda extends Ai1ec_Calendar_View_Abstract {
|
|
146 |
|
147 |
$file = $loader->get_file( $type . '.twig', $args, false );
|
148 |
|
149 |
-
return
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
|
|
154 |
}
|
155 |
|
156 |
/* (non-PHPdoc)
|
@@ -219,9 +224,43 @@ class Ai1ec_Calendar_View_Agenda extends Ai1ec_Calendar_View_Abstract {
|
|
219 |
}
|
220 |
$this->_add_runtime_properties( $event );
|
221 |
// Add the event.
|
222 |
-
$category
|
223 |
-
|
224 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
}
|
226 |
$this->_registry->get( 'controller.content-filter' )
|
227 |
->restore_the_content_filters();
|
@@ -269,6 +308,9 @@ class Ai1ec_Calendar_View_Agenda extends Ai1ec_Calendar_View_Abstract {
|
|
269 |
|
270 |
$links = array();
|
271 |
|
|
|
|
|
|
|
272 |
$args['page_offset'] = -1;
|
273 |
$args['time_limit'] = $this->_registry
|
274 |
->get( 'date.time', $date_first )->set_time(
|
@@ -322,6 +364,7 @@ class Ai1ec_Calendar_View_Agenda extends Ai1ec_Calendar_View_Abstract {
|
|
322 |
*/
|
323 |
protected function _add_view_specific_runtime_properties( Ai1ec_Event $event ) {
|
324 |
$taxonomy = $this->_registry->get( 'view.event.taxonomy' );
|
|
|
325 |
$event->set_runtime(
|
326 |
'categories_html',
|
327 |
$taxonomy->get_categories_html( $event )
|
@@ -330,5 +373,9 @@ class Ai1ec_Calendar_View_Agenda extends Ai1ec_Calendar_View_Abstract {
|
|
330 |
'tags_html',
|
331 |
$taxonomy->get_tags_html( $event )
|
332 |
);
|
|
|
|
|
|
|
|
|
333 |
}
|
334 |
}
|
38 |
$timestamp,
|
39 |
$events_limit,
|
40 |
$view_args['page_offset'],
|
41 |
+
apply_filters(
|
42 |
+
'ai1ec_get_events_relative_to_filter',
|
43 |
+
array(
|
44 |
+
'post_ids' => $view_args['post_ids'],
|
45 |
+
'auth_ids' => $view_args['auth_ids'],
|
46 |
+
'cat_ids' => $view_args['cat_ids'],
|
47 |
+
'tag_ids' => $view_args['tag_ids'],
|
48 |
+
),
|
49 |
+
$view_args
|
50 |
),
|
51 |
$view_args['time_limit']
|
52 |
);
|
150 |
|
151 |
$file = $loader->get_file( $type . '.twig', $args, false );
|
152 |
|
153 |
+
return
|
154 |
+
$this->_registry->get( 'http.request' )->is_json_required(
|
155 |
+
$view_args['request_format']
|
156 |
+
)
|
157 |
+
? json_encode( $args )
|
158 |
+
: $this->_get_view( $args );
|
159 |
}
|
160 |
|
161 |
/* (non-PHPdoc)
|
224 |
}
|
225 |
$this->_add_runtime_properties( $event );
|
226 |
// Add the event.
|
227 |
+
$category = $event->is_allday()
|
228 |
+
? 'allday'
|
229 |
+
: 'notallday';
|
230 |
+
$event_props = array();
|
231 |
+
$event_props['post_id'] = $event->get( 'post_id' );
|
232 |
+
$event_props['instance_id'] = $event->get( 'instance_id' );
|
233 |
+
$event_props['venue'] = $event->get( 'venue' );
|
234 |
+
$event_props['ticket_url'] = $event->get( 'ticket_url' );
|
235 |
+
$event_props['filtered_title'] = $event->get_runtime( 'filtered_title' );
|
236 |
+
$event_props['edit_post_link'] = $event->get_runtime( 'edit_post_link' );
|
237 |
+
$event_props['content_img_url'] = $event->get_runtime( 'content_img_url' );
|
238 |
+
$event_props['filtered_content'] = $event->get_runtime( 'filtered_content' );
|
239 |
+
$event_props['ticket_url_label'] = $event->get_runtime( 'ticket_url_label' );
|
240 |
+
$event_props['permalink'] = $event->get_runtime( 'instance_permalink' );
|
241 |
+
$event_props['categories_html'] = $event->get_runtime( 'categories_html' );
|
242 |
+
$event_props['category_bg_color'] = $event->get_runtime( 'category_bg_color' );
|
243 |
+
$event_props['category_text_color'] = $event->get_runtime( 'category_text_color' );
|
244 |
+
$event_props['tags_html'] = $event->get_runtime( 'tags_html' );
|
245 |
+
$event_props['post_excerpt'] = $event->get_runtime( 'post_excerpt' );
|
246 |
+
$event_props['short_start_time'] = $event->get_runtime( 'short_start_time' );
|
247 |
+
$event_props['timespan_short'] = $event->_registry->
|
248 |
+
get( 'view.event.time' )->get_timespan_html( $event, 'short' );
|
249 |
+
$event_props['avatar'] = $event->getavatar( false );
|
250 |
+
$event_object = $event_props;
|
251 |
+
if ( AI1EC_THEME_COMPATIBILITY_FER ) {
|
252 |
+
$event_object = $event;
|
253 |
+
}
|
254 |
+
$dates[$timestamp]['events'][$category][] = $event_object;
|
255 |
+
$dates[$timestamp]['href'] = $href_for_date;
|
256 |
+
$dates[$timestamp]['day'] = $this->_registry->
|
257 |
+
get( 'date.time', $timestamp )->format_i18n( 'j' );
|
258 |
+
$dates[$timestamp]['weekday'] = $this->_registry->
|
259 |
+
get( 'date.time', $timestamp )->format_i18n( 'D' );
|
260 |
+
$dates[$timestamp]['month'] = $this->_registry->
|
261 |
+
get( 'date.time', $timestamp )->format_i18n( 'M' );
|
262 |
+
$dates[$timestamp]['year'] = $this->_registry->
|
263 |
+
get( 'date.time', $timestamp )->format_i18n( 'Y' );
|
264 |
}
|
265 |
$this->_registry->get( 'controller.content-filter' )
|
266 |
->restore_the_content_filters();
|
308 |
|
309 |
$links = array();
|
310 |
|
311 |
+
if ( AI1EC_USE_FRONTEND_RENDERING ) {
|
312 |
+
$args['request_format'] = 'json';
|
313 |
+
}
|
314 |
$args['page_offset'] = -1;
|
315 |
$args['time_limit'] = $this->_registry
|
316 |
->get( 'date.time', $date_first )->set_time(
|
364 |
*/
|
365 |
protected function _add_view_specific_runtime_properties( Ai1ec_Event $event ) {
|
366 |
$taxonomy = $this->_registry->get( 'view.event.taxonomy' );
|
367 |
+
$avatar = $this->_registry->get( 'view.event.avatar' );
|
368 |
$event->set_runtime(
|
369 |
'categories_html',
|
370 |
$taxonomy->get_categories_html( $event )
|
373 |
'tags_html',
|
374 |
$taxonomy->get_tags_html( $event )
|
375 |
);
|
376 |
+
$event->set_runtime(
|
377 |
+
'content_img_url',
|
378 |
+
$avatar->get_content_img_url( $event )
|
379 |
+
);
|
380 |
}
|
381 |
}
|
app/view/calendar/view/month.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
* @package AI1EC
|
10 |
* @subpackage AI1EC.View
|
11 |
*/
|
12 |
-
class Ai1ec_Calendar_View_Month
|
13 |
|
14 |
/* (non-PHPdoc)
|
15 |
* @see Ai1ec_Calendar_View_Abstract::get_name()
|
@@ -44,11 +44,15 @@ class Ai1ec_Calendar_View_Month extends Ai1ec_Calendar_View_Abstract {
|
|
44 |
|
45 |
$days_events = $this->get_events_for_month(
|
46 |
$local_date,
|
47 |
-
|
48 |
-
'
|
49 |
-
|
50 |
-
|
51 |
-
|
|
|
|
|
|
|
|
|
52 |
)
|
53 |
);
|
54 |
$cell_array = $this->get_month_cell_array(
|
@@ -90,7 +94,12 @@ class Ai1ec_Calendar_View_Month extends Ai1ec_Calendar_View_Abstract {
|
|
90 |
)
|
91 |
);
|
92 |
|
93 |
-
return
|
|
|
|
|
|
|
|
|
|
|
94 |
}
|
95 |
|
96 |
/**
|
@@ -325,6 +334,45 @@ class Ai1ec_Calendar_View_Month extends Ai1ec_Calendar_View_Abstract {
|
|
325 |
$day,
|
326 |
$settings->get( 'input_date_format' )
|
327 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
328 |
$weeks[$week][] = array(
|
329 |
'date' => $i,
|
330 |
'date_link' => $this->_create_link_for_day_view( $exact_date ),
|
@@ -332,7 +380,8 @@ class Ai1ec_Calendar_View_Month extends Ai1ec_Calendar_View_Abstract {
|
|
332 |
$timestamp->format( 'Y' ) == $today->format( 'Y' ) &&
|
333 |
$timestamp->format( 'm' ) == $today->format( 'm' ) &&
|
334 |
$i == $today->format( 'j' ),
|
335 |
-
'events' => $
|
|
|
336 |
);
|
337 |
// If reached the end of the week, increment week
|
338 |
if( count( $weeks[$week] ) == 7 )
|
9 |
* @package AI1EC
|
10 |
* @subpackage AI1EC.View
|
11 |
*/
|
12 |
+
class Ai1ec_Calendar_View_Month extends Ai1ec_Calendar_View_Abstract {
|
13 |
|
14 |
/* (non-PHPdoc)
|
15 |
* @see Ai1ec_Calendar_View_Abstract::get_name()
|
44 |
|
45 |
$days_events = $this->get_events_for_month(
|
46 |
$local_date,
|
47 |
+
apply_filters(
|
48 |
+
'ai1ec_get_events_relative_to_filter',
|
49 |
+
array(
|
50 |
+
'cat_ids' => $args['cat_ids'],
|
51 |
+
'tag_ids' => $args['tag_ids'],
|
52 |
+
'post_ids' => $args['post_ids'],
|
53 |
+
'auth_ids' => $args['auth_ids'],
|
54 |
+
),
|
55 |
+
$view_args
|
56 |
)
|
57 |
);
|
58 |
$cell_array = $this->get_month_cell_array(
|
94 |
)
|
95 |
);
|
96 |
|
97 |
+
return
|
98 |
+
$this->_registry->get( 'http.request' )->is_json_required(
|
99 |
+
$args['request_format']
|
100 |
+
)
|
101 |
+
? json_encode( $view_args )
|
102 |
+
: $this->_get_view( $view_args );
|
103 |
}
|
104 |
|
105 |
/**
|
334 |
$day,
|
335 |
$settings->get( 'input_date_format' )
|
336 |
);
|
337 |
+
$events = array();
|
338 |
+
foreach ( $days_events[$i] as $evt ){
|
339 |
+
$events[] = array(
|
340 |
+
'filtered_title' => $evt->get_runtime( 'filtered_title' ),
|
341 |
+
'post_excerpt' => $evt->get_runtime( 'post_excerpt' ),
|
342 |
+
'color_style' => $evt->get_runtime( 'color_style' ),
|
343 |
+
'category_colors' => $evt->get_runtime( 'category_colors' ),
|
344 |
+
'permalink' => $evt->get_runtime( 'instance_permalink' ),
|
345 |
+
'ticket_url_label' => $evt->get_runtime( 'ticket_url_label' ),
|
346 |
+
'edit_post_link' => $evt->get_runtime( 'edit_post_link' ),
|
347 |
+
'short_start_time' => $evt->get_runtime( 'short_start_time' ),
|
348 |
+
'multiday_end_day' => $evt->get_runtime( 'multiday_end_day' ),
|
349 |
+
'short_start_time' => $evt->get_runtime( 'short_start_time' ),
|
350 |
+
'instance_id' => $evt->get( 'instance_id' ),
|
351 |
+
'post_id' => $evt->get( 'post_id' ),
|
352 |
+
'is_allday' => $evt->is_allday(),
|
353 |
+
'is_multiday' => $evt->is_multiday(),
|
354 |
+
'venue' => $evt->get( 'venue' ),
|
355 |
+
'ticket_url' => $evt->get( 'ticket_url' ),
|
356 |
+
'start_truncated' => $evt->get( 'start_truncated' ),
|
357 |
+
'end_truncated' => $evt->get( 'end_truncated' ),
|
358 |
+
'popup_timespan' => $this->_registry
|
359 |
+
->get( 'twig.ai1ec-extension')->timespan( $evt, 'short' ),
|
360 |
+
'avatar' => $this->_registry
|
361 |
+
->get( 'twig.ai1ec-extension')->avatar(
|
362 |
+
$evt,
|
363 |
+
array(
|
364 |
+
'post_thumbnail',
|
365 |
+
'content_img',
|
366 |
+
'location_avatar',
|
367 |
+
'category_avatar',
|
368 |
+
),
|
369 |
+
'',
|
370 |
+
false ),
|
371 |
+
);
|
372 |
+
}
|
373 |
+
if ( AI1EC_THEME_COMPATIBILITY_FER ) {
|
374 |
+
$events = $days_events[$i];
|
375 |
+
}
|
376 |
$weeks[$week][] = array(
|
377 |
'date' => $i,
|
378 |
'date_link' => $this->_create_link_for_day_view( $exact_date ),
|
380 |
$timestamp->format( 'Y' ) == $today->format( 'Y' ) &&
|
381 |
$timestamp->format( 'm' ) == $today->format( 'm' ) &&
|
382 |
$i == $today->format( 'j' ),
|
383 |
+
'events' => $events,
|
384 |
+
|
385 |
);
|
386 |
// If reached the end of the week, increment week
|
387 |
if( count( $weeks[$week] ) == 7 )
|
app/view/calendar/view/oneday.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
* @package AI1EC
|
10 |
* @subpackage AI1EC.View
|
11 |
*/
|
12 |
-
class Ai1ec_Calendar_View_Oneday
|
13 |
|
14 |
/* (non-PHPdoc)
|
15 |
* @see Ai1ec_Calendar_View_Abstract::get_name()
|
@@ -41,11 +41,15 @@ class Ai1ec_Calendar_View_Oneday extends Ai1ec_Calendar_View_Abstract {
|
|
41 |
|
42 |
$cell_array = $this->get_oneday_cell_array(
|
43 |
$local_date,
|
44 |
-
|
45 |
-
'
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
|
|
|
|
|
|
49 |
)
|
50 |
);
|
51 |
// Create pagination links.
|
@@ -70,6 +74,14 @@ class Ai1ec_Calendar_View_Oneday extends Ai1ec_Calendar_View_Abstract {
|
|
70 |
$time_format = $this->_registry->get( 'model.option' )
|
71 |
->get( 'time_format', Ai1ec_I18n::__( 'g a' ) );
|
72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
$view_args = array(
|
74 |
'title' => $title,
|
75 |
'type' => 'oneday',
|
@@ -88,6 +100,9 @@ class Ai1ec_Calendar_View_Oneday extends Ai1ec_Calendar_View_Abstract {
|
|
88 |
'text_all_day' => __( 'All-day', AI1EC_PLUGIN_NAME ),
|
89 |
'text_now_label' => __( 'Now:', AI1EC_PLUGIN_NAME ),
|
90 |
'text_venue_separator' => __( '@ %s', AI1EC_PLUGIN_NAME ),
|
|
|
|
|
|
|
91 |
);
|
92 |
if ( $settings->get( 'ajaxify_events_in_web_widget' ) ) {
|
93 |
$view_args['data_type_events'] = $args['data_type'];
|
@@ -102,7 +117,13 @@ class Ai1ec_Calendar_View_Oneday extends Ai1ec_Calendar_View_Abstract {
|
|
102 |
)
|
103 |
);
|
104 |
|
105 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
}
|
107 |
|
108 |
/**
|
@@ -270,48 +291,90 @@ class Ai1ec_Calendar_View_Oneday extends Ai1ec_Calendar_View_Abstract {
|
|
270 |
$all_events[$day_start_ts]['notallday'] = array();
|
271 |
}
|
272 |
|
273 |
-
$notallday = array();
|
274 |
-
$evt_stack = array( 0 ); // Stack to keep track of indentation
|
275 |
-
foreach ( $all_events[$day_start_ts]['notallday'] as $evt ) {
|
276 |
-
// Calculate top and bottom edges of current event
|
277 |
-
$top = (int)(
|
278 |
-
$evt->get( 'start' )->diff_sec( $loc_start_time ) / 60
|
279 |
-
);
|
280 |
-
$bottom = min(
|
281 |
-
$top + ( $evt->get_duration() / 60 ),
|
282 |
-
1440
|
283 |
-
);
|
284 |
-
|
285 |
-
// While there's more than one event in the stack and this event's
|
286 |
-
// top position is beyond the last event's bottom, pop the stack
|
287 |
-
while ( count( $evt_stack ) > 1 && $top >= end( $evt_stack ) ) {
|
288 |
-
array_pop( $evt_stack );
|
289 |
-
}
|
290 |
-
// Indentation is number of stacked events minus 1
|
291 |
-
$indent = count( $evt_stack ) - 1;
|
292 |
-
// Push this event onto the top of the stack
|
293 |
-
array_push( $evt_stack, $bottom );
|
294 |
-
|
295 |
-
$notallday[] = array(
|
296 |
-
'top' => $top,
|
297 |
-
'height' => $bottom - $top,
|
298 |
-
'indent' => $indent,
|
299 |
-
'event' => $evt,
|
300 |
-
);
|
301 |
-
}
|
302 |
-
|
303 |
$today_ymd = $this->_registry->get(
|
304 |
'date.time',
|
305 |
$this->_registry->get( 'date.system' )->current_time()
|
306 |
)->format( 'Y-m-d' );
|
307 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
308 |
$days[$day_start_ts] = array(
|
309 |
'today' => 0 === strcmp(
|
310 |
$today_ymd,
|
311 |
$start_time->format( 'Y-m-d' )
|
312 |
),
|
313 |
'allday' => $all_events[$day_start_ts]['allday'],
|
314 |
-
'notallday' => $notallday,
|
|
|
|
|
|
|
|
|
315 |
);
|
316 |
|
317 |
return apply_filters(
|
9 |
* @package AI1EC
|
10 |
* @subpackage AI1EC.View
|
11 |
*/
|
12 |
+
class Ai1ec_Calendar_View_Oneday extends Ai1ec_Calendar_View_Abstract {
|
13 |
|
14 |
/* (non-PHPdoc)
|
15 |
* @see Ai1ec_Calendar_View_Abstract::get_name()
|
41 |
|
42 |
$cell_array = $this->get_oneday_cell_array(
|
43 |
$local_date,
|
44 |
+
apply_filters(
|
45 |
+
'ai1ec_get_events_relative_to_filter',
|
46 |
+
array(
|
47 |
+
'cat_ids' => $args['cat_ids'],
|
48 |
+
'tag_ids' => $args['tag_ids'],
|
49 |
+
'post_ids' => $args['post_ids'],
|
50 |
+
'auth_ids' => $args['auth_ids'],
|
51 |
+
),
|
52 |
+
$view_args
|
53 |
)
|
54 |
);
|
55 |
// Create pagination links.
|
74 |
$time_format = $this->_registry->get( 'model.option' )
|
75 |
->get( 'time_format', Ai1ec_I18n::__( 'g a' ) );
|
76 |
|
77 |
+
$hours = array();
|
78 |
+
$today = $this->_registry->get( 'date.time', 'now', 'sys.default' );
|
79 |
+
for ( $hour = 0; $hour < 24; $hour++ ) {
|
80 |
+
$hours[] = $today
|
81 |
+
->set_time( $hour, 0, 0 )
|
82 |
+
->format_i18n( $time_format );
|
83 |
+
}
|
84 |
+
|
85 |
$view_args = array(
|
86 |
'title' => $title,
|
87 |
'type' => 'oneday',
|
100 |
'text_all_day' => __( 'All-day', AI1EC_PLUGIN_NAME ),
|
101 |
'text_now_label' => __( 'Now:', AI1EC_PLUGIN_NAME ),
|
102 |
'text_venue_separator' => __( '@ %s', AI1EC_PLUGIN_NAME ),
|
103 |
+
'hours' => $hours,
|
104 |
+
'indent_multiplier' => 16,
|
105 |
+
'indent_offset' => 54,
|
106 |
);
|
107 |
if ( $settings->get( 'ajaxify_events_in_web_widget' ) ) {
|
108 |
$view_args['data_type_events'] = $args['data_type'];
|
117 |
)
|
118 |
);
|
119 |
|
120 |
+
return
|
121 |
+
$this->_registry->get( 'http.request' )->is_json_required(
|
122 |
+
$args['request_format']
|
123 |
+
)
|
124 |
+
? json_encode( $view_args )
|
125 |
+
: $this->_get_view( $view_args );
|
126 |
+
|
127 |
}
|
128 |
|
129 |
/**
|
291 |
$all_events[$day_start_ts]['notallday'] = array();
|
292 |
}
|
293 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
294 |
$today_ymd = $this->_registry->get(
|
295 |
'date.time',
|
296 |
$this->_registry->get( 'date.system' )->current_time()
|
297 |
)->format( 'Y-m-d' );
|
298 |
|
299 |
+
$evt_stack = array( 0 ); // Stack to keep track of indentation
|
300 |
+
|
301 |
+
foreach ( $all_events[$day_start_ts] as $event_type => &$events ) {
|
302 |
+
foreach ( $events as &$evt ) {
|
303 |
+
$event = array(
|
304 |
+
'filtered_title' => $evt->get_runtime( 'filtered_title' ),
|
305 |
+
'post_excerpt' => $evt->get_runtime( 'post_excerpt' ),
|
306 |
+
'color_style' => $evt->get_runtime( 'color_style' ),
|
307 |
+
'category_colors' => $evt->get_runtime( 'category_colors' ),
|
308 |
+
'permalink' => $evt->get_runtime( 'instance_permalink' ),
|
309 |
+
'ticket_url_label' => $evt->get_runtime( 'ticket_url_label' ),
|
310 |
+
'edit_post_link' => $evt->get_runtime( 'edit_post_link' ),
|
311 |
+
'faded_color' => $evt->get_runtime( 'faded_color' ),
|
312 |
+
'rgba_color' => $evt->get_runtime( 'rgba_color' ),
|
313 |
+
'short_start_time' => $evt->get_runtime( 'short_start_time' ),
|
314 |
+
'instance_id' => $evt->get( 'instance_id' ),
|
315 |
+
'post_id' => $evt->get( 'post_id' ),
|
316 |
+
'is_multiday' => $evt->get( 'is_multiday' ),
|
317 |
+
'venue' => $evt->get( 'venue' ),
|
318 |
+
'ticket_url' => $evt->get( 'ticket_url' ),
|
319 |
+
'start_truncated' => $evt->get( 'start_truncated' ),
|
320 |
+
'end_truncated' => $evt->get( 'end_truncated' ),
|
321 |
+
'popup_timespan' => $this->_registry
|
322 |
+
->get( 'twig.ai1ec-extension')->timespan( $evt, 'short' ),
|
323 |
+
'avatar' => $this->_registry
|
324 |
+
->get( 'twig.ai1ec-extension')->avatar(
|
325 |
+
$evt,
|
326 |
+
array(
|
327 |
+
'post_thumbnail',
|
328 |
+
'content_img',
|
329 |
+
'location_avatar',
|
330 |
+
'category_avatar',
|
331 |
+
),
|
332 |
+
'',
|
333 |
+
false ),
|
334 |
+
);
|
335 |
+
if ( AI1EC_THEME_COMPATIBILITY_FER ) {
|
336 |
+
$event = $evt;
|
337 |
+
}
|
338 |
+
if ( 'notallday' === $event_type) {
|
339 |
+
// Calculate top and bottom edges of current event
|
340 |
+
$top = (int)(
|
341 |
+
$evt->get( 'start' )->diff_sec( $loc_start_time ) / 60
|
342 |
+
);
|
343 |
+
$bottom = min(
|
344 |
+
$top + ( $evt->get_duration() / 60 ),
|
345 |
+
1440
|
346 |
+
);
|
347 |
+
// While there's more than one event in the stack and this event's
|
348 |
+
// top position is beyond the last event's bottom, pop the stack
|
349 |
+
while ( count( $evt_stack ) > 1 && $top >= end( $evt_stack ) ) {
|
350 |
+
array_pop( $evt_stack );
|
351 |
+
}
|
352 |
+
// Indentation is number of stacked events minus 1
|
353 |
+
$indent = count( $evt_stack ) - 1;
|
354 |
+
// Push this event onto the top of the stack
|
355 |
+
array_push( $evt_stack, $bottom );
|
356 |
+
$evt = array(
|
357 |
+
'top' => $top,
|
358 |
+
'height' => $bottom - $top,
|
359 |
+
'indent' => $indent,
|
360 |
+
'event' => $event,
|
361 |
+
);
|
362 |
+
} else {
|
363 |
+
$evt = $event;
|
364 |
+
}
|
365 |
+
}
|
366 |
+
}
|
367 |
$days[$day_start_ts] = array(
|
368 |
'today' => 0 === strcmp(
|
369 |
$today_ymd,
|
370 |
$start_time->format( 'Y-m-d' )
|
371 |
),
|
372 |
'allday' => $all_events[$day_start_ts]['allday'],
|
373 |
+
'notallday' => $all_events[$day_start_ts]['notallday'],
|
374 |
+
'day' => $this->_registry->
|
375 |
+
get( 'date.time', $day_start_ts )->format_i18n( 'j' ),
|
376 |
+
'weekday' => $this->_registry->
|
377 |
+
get( 'date.time', $day_start_ts )->format_i18n( 'D' ),
|
378 |
);
|
379 |
|
380 |
return apply_filters(
|
app/view/calendar/view/week.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
* @package AI1EC
|
10 |
* @subpackage AI1EC.View
|
11 |
*/
|
12 |
-
class Ai1ec_Calendar_View_Week
|
13 |
|
14 |
/* (non-PHPdoc)
|
15 |
* @see Ai1ec_Calendar_View_Abstract::get_name()
|
@@ -44,11 +44,15 @@ class Ai1ec_Calendar_View_Week extends Ai1ec_Calendar_View_Abstract {
|
|
44 |
|
45 |
$cell_array = $this->get_week_cell_array(
|
46 |
$local_date,
|
47 |
-
|
48 |
-
'
|
49 |
-
|
50 |
-
|
51 |
-
|
|
|
|
|
|
|
|
|
52 |
)
|
53 |
);
|
54 |
|
@@ -79,6 +83,14 @@ class Ai1ec_Calendar_View_Week extends Ai1ec_Calendar_View_Abstract {
|
|
79 |
$is_ticket_button_enabled = apply_filters( 'ai1ec_week_ticket_button', false );
|
80 |
$show_reveal_button = apply_filters( 'ai1ec_week_reveal_button', false );
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
$view_args = array(
|
83 |
'title' => $title,
|
84 |
'type' => 'week',
|
@@ -99,6 +111,9 @@ class Ai1ec_Calendar_View_Week extends Ai1ec_Calendar_View_Abstract {
|
|
99 |
'text_all_day' => __( 'All-day', AI1EC_PLUGIN_NAME ),
|
100 |
'text_now_label' => __( 'Now:', AI1EC_PLUGIN_NAME ),
|
101 |
'text_venue_separator' => __( '@ %s', AI1EC_PLUGIN_NAME ),
|
|
|
|
|
|
|
102 |
);
|
103 |
if ( $settings->get( 'ajaxify_events_in_web_widget' ) ) {
|
104 |
$view_args['data_type_events'] = $args['data_type'];
|
@@ -113,7 +128,12 @@ class Ai1ec_Calendar_View_Week extends Ai1ec_Calendar_View_Abstract {
|
|
113 |
)
|
114 |
);
|
115 |
|
116 |
-
return
|
|
|
|
|
|
|
|
|
|
|
117 |
}
|
118 |
|
119 |
/**
|
@@ -305,41 +325,84 @@ class Ai1ec_Calendar_View_Week extends Ai1ec_Calendar_View_Abstract {
|
|
305 |
$all_events[$day_date]['notallday'] = array();
|
306 |
}
|
307 |
|
308 |
-
$notallday = array();
|
309 |
$evt_stack = array( 0 ); // Stack to keep track of indentation
|
310 |
-
foreach ( $all_events[$day_date]['notallday'] as $evt ) {
|
311 |
-
$start = $evt->get( 'start' );
|
312 |
-
|
313 |
-
// Calculate top and bottom edges of current event
|
314 |
-
$top = $start->format( 'G' ) * 60 + $start->format( 'i' );
|
315 |
-
$bottom = min( $top + $evt->get_duration() / 60, 1440 );
|
316 |
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
321 |
}
|
322 |
-
// Indentation is number of stacked events minus 1
|
323 |
-
$indent = count( $evt_stack ) - 1;
|
324 |
-
// Push this event onto the top of the stack
|
325 |
-
array_push( $evt_stack, $bottom );
|
326 |
-
|
327 |
-
$notallday[] = array(
|
328 |
-
'top' => $top,
|
329 |
-
'height' => $bottom - $top,
|
330 |
-
'indent' => $indent,
|
331 |
-
'event' => $evt,
|
332 |
-
);
|
333 |
}
|
334 |
|
|
|
335 |
$days[$day_date] = array(
|
336 |
'today' =>
|
337 |
$day_date_ob->format( 'Y' ) == $now->format( 'Y' ) &&
|
338 |
$day_date_ob->format( 'm' ) == $now->format( 'm' ) &&
|
339 |
$day_date_ob->format( 'j' ) == $now->format( 'j' ),
|
340 |
'allday' => $all_events[$day_date]['allday'],
|
341 |
-
'notallday' => $notallday,
|
342 |
'href' => $href_for_date,
|
|
|
|
|
|
|
|
|
343 |
);
|
344 |
}
|
345 |
|
9 |
* @package AI1EC
|
10 |
* @subpackage AI1EC.View
|
11 |
*/
|
12 |
+
class Ai1ec_Calendar_View_Week extends Ai1ec_Calendar_View_Abstract {
|
13 |
|
14 |
/* (non-PHPdoc)
|
15 |
* @see Ai1ec_Calendar_View_Abstract::get_name()
|
44 |
|
45 |
$cell_array = $this->get_week_cell_array(
|
46 |
$local_date,
|
47 |
+
apply_filters(
|
48 |
+
'ai1ec_get_events_relative_to_filter',
|
49 |
+
array(
|
50 |
+
'cat_ids' => $args['cat_ids'],
|
51 |
+
'tag_ids' => $args['tag_ids'],
|
52 |
+
'post_ids' => $args['post_ids'],
|
53 |
+
'auth_ids' => $args['auth_ids'],
|
54 |
+
),
|
55 |
+
$view_args
|
56 |
)
|
57 |
);
|
58 |
|
83 |
$is_ticket_button_enabled = apply_filters( 'ai1ec_week_ticket_button', false );
|
84 |
$show_reveal_button = apply_filters( 'ai1ec_week_reveal_button', false );
|
85 |
|
86 |
+
$hours = array();
|
87 |
+
$today = $this->_registry->get( 'date.time', 'now', 'sys.default' );
|
88 |
+
for ( $hour = 0; $hour < 24; $hour++ ) {
|
89 |
+
$hours[] = $today
|
90 |
+
->set_time( $hour, 0, 0 )
|
91 |
+
->format_i18n( $time_format );
|
92 |
+
}
|
93 |
+
|
94 |
$view_args = array(
|
95 |
'title' => $title,
|
96 |
'type' => 'week',
|
111 |
'text_all_day' => __( 'All-day', AI1EC_PLUGIN_NAME ),
|
112 |
'text_now_label' => __( 'Now:', AI1EC_PLUGIN_NAME ),
|
113 |
'text_venue_separator' => __( '@ %s', AI1EC_PLUGIN_NAME ),
|
114 |
+
'hours' => $hours,
|
115 |
+
'indent_multiplier' => 8,
|
116 |
+
'indent_offset' => 0,
|
117 |
);
|
118 |
if ( $settings->get( 'ajaxify_events_in_web_widget' ) ) {
|
119 |
$view_args['data_type_events'] = $args['data_type'];
|
128 |
)
|
129 |
);
|
130 |
|
131 |
+
return
|
132 |
+
$this->_registry->get( 'http.request' )->is_json_required(
|
133 |
+
$args['request_format']
|
134 |
+
)
|
135 |
+
? json_encode( $view_args )
|
136 |
+
: $this->_get_view( $view_args );
|
137 |
}
|
138 |
|
139 |
/**
|
325 |
$all_events[$day_date]['notallday'] = array();
|
326 |
}
|
327 |
|
|
|
328 |
$evt_stack = array( 0 ); // Stack to keep track of indentation
|
|
|
|
|
|
|
|
|
|
|
|
|
329 |
|
330 |
+
foreach ( $all_events[$day_date] as $event_type => &$events ) {
|
331 |
+
foreach ( $events as &$evt ) {
|
332 |
+
$event = array(
|
333 |
+
'filtered_title' => $evt->get_runtime( 'filtered_title' ),
|
334 |
+
'post_excerpt' => $evt->get_runtime( 'post_excerpt' ),
|
335 |
+
'color_style' => $evt->get_runtime( 'color_style' ),
|
336 |
+
'category_colors' => $evt->get_runtime( 'category_colors' ),
|
337 |
+
'permalink' => $evt->get_runtime( 'instance_permalink' ),
|
338 |
+
'ticket_url_label' => $evt->get_runtime( 'ticket_url_label' ),
|
339 |
+
'edit_post_link' => $evt->get_runtime( 'edit_post_link' ),
|
340 |
+
'faded_color' => $evt->get_runtime( 'faded_color' ),
|
341 |
+
'rgba_color' => $evt->get_runtime( 'rgba_color' ),
|
342 |
+
'short_start_time' => $evt->get_runtime( 'short_start_time' ),
|
343 |
+
'instance_id' => $evt->get( 'instance_id' ),
|
344 |
+
'post_id' => $evt->get( 'post_id' ),
|
345 |
+
'is_multiday' => $evt->get( 'is_multiday' ),
|
346 |
+
'venue' => $evt->get( 'venue' ),
|
347 |
+
'ticket_url' => $evt->get( 'ticket_url' ),
|
348 |
+
'start_truncated' => $evt->get( 'start_truncated' ),
|
349 |
+
'end_truncated' => $evt->get( 'end_truncated' ),
|
350 |
+
'popup_timespan' => $this->_registry
|
351 |
+
->get( 'twig.ai1ec-extension')->timespan( $evt, 'short' ),
|
352 |
+
'avatar' => $this->_registry
|
353 |
+
->get( 'twig.ai1ec-extension')->avatar(
|
354 |
+
$evt,
|
355 |
+
array(
|
356 |
+
'post_thumbnail',
|
357 |
+
'content_img',
|
358 |
+
'location_avatar',
|
359 |
+
'category_avatar',
|
360 |
+
),
|
361 |
+
'',
|
362 |
+
false ),
|
363 |
+
);
|
364 |
+
if ( AI1EC_THEME_COMPATIBILITY_FER ) {
|
365 |
+
$event = $evt;
|
366 |
+
}
|
367 |
+
if ( 'notallday' === $event_type) {
|
368 |
+
$start = $evt->get( 'start' );
|
369 |
+
// Calculate top and bottom edges of current event
|
370 |
+
$top = $start->format( 'G' ) * 60 + $start->format( 'i' );
|
371 |
+
$bottom = min( $top + $evt->get_duration() / 60, 1440 );
|
372 |
+
// While there's more than one event in the stack and this event's top
|
373 |
+
// position is beyond the last event's bottom, pop the stack
|
374 |
+
while ( count( $evt_stack ) > 1 && $top >= end( $evt_stack ) ) {
|
375 |
+
array_pop( $evt_stack );
|
376 |
+
}
|
377 |
+
// Indentation is number of stacked events minus 1
|
378 |
+
$indent = count( $evt_stack ) - 1;
|
379 |
+
// Push this event onto the top of the stack
|
380 |
+
array_push( $evt_stack, $bottom );
|
381 |
+
$evt = array(
|
382 |
+
'top' => $top,
|
383 |
+
'height' => $bottom - $top,
|
384 |
+
'indent' => $indent,
|
385 |
+
'event' => $event,
|
386 |
+
);
|
387 |
+
} else {
|
388 |
+
$evt = $event;
|
389 |
+
}
|
390 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
391 |
}
|
392 |
|
393 |
+
|
394 |
$days[$day_date] = array(
|
395 |
'today' =>
|
396 |
$day_date_ob->format( 'Y' ) == $now->format( 'Y' ) &&
|
397 |
$day_date_ob->format( 'm' ) == $now->format( 'm' ) &&
|
398 |
$day_date_ob->format( 'j' ) == $now->format( 'j' ),
|
399 |
'allday' => $all_events[$day_date]['allday'],
|
400 |
+
'notallday' => $all_events[$day_date]['notallday'],
|
401 |
'href' => $href_for_date,
|
402 |
+
'day' => $this->_registry->
|
403 |
+
get( 'date.time', $day_date )->format_i18n( 'j' ),
|
404 |
+
'weekday' => $this->_registry->
|
405 |
+
get( 'date.time', $day_date )->format_i18n( 'D' ),
|
406 |
);
|
407 |
}
|
408 |
|
app/view/calendar/widget.php
CHANGED
@@ -5,27 +5,34 @@
|
|
5 |
*
|
6 |
* A widget that displays the next X upcoming events (similar to Agenda view).
|
7 |
*/
|
8 |
-
class Ai1ec_View_Admin_Widget extends
|
9 |
|
10 |
/**
|
11 |
-
* @var
|
12 |
*/
|
13 |
-
protected $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
/**
|
16 |
* Constructor for widget.
|
17 |
*/
|
18 |
public function __construct() {
|
19 |
-
// Set registry
|
20 |
-
$this->_registry = apply_filters( 'ai1ec_registry', false );
|
21 |
-
|
22 |
-
// Load CSS in front-end.
|
23 |
-
if ( ! is_admin() ) {
|
24 |
-
$this->_registry->get( 'css.frontend' )->add_link_to_html_for_frontend();
|
25 |
-
}
|
26 |
|
27 |
parent::__construct(
|
28 |
-
|
29 |
__( 'Upcoming Events', AI1EC_PLUGIN_NAME ),
|
30 |
array(
|
31 |
'description' => __( 'All-in-One Event Calendar: Lists upcoming events in Agenda view', AI1EC_PLUGIN_NAME ),
|
@@ -34,20 +41,115 @@ class Ai1ec_View_Admin_Widget extends WP_Widget {
|
|
34 |
);
|
35 |
}
|
36 |
|
37 |
-
|
38 |
-
*
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
*/
|
42 |
-
public function
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
}
|
45 |
|
46 |
/* (non-PHPdoc)
|
47 |
* @see Ai1ec_Calendar_View_Abstract::get_name()
|
48 |
*/
|
49 |
public function get_name() {
|
50 |
-
return '
|
51 |
}
|
52 |
|
53 |
/**
|
@@ -59,19 +161,7 @@ class Ai1ec_View_Admin_Widget extends WP_Widget {
|
|
59 |
* @return void
|
60 |
*/
|
61 |
public function form( $instance ) {
|
62 |
-
$default =
|
63 |
-
'title' => __( 'Upcoming Events', AI1EC_PLUGIN_NAME ),
|
64 |
-
'events_seek_type' => 'events',
|
65 |
-
'events_per_page' => 10,
|
66 |
-
'days_per_page' => 10,
|
67 |
-
'show_subscribe_buttons' => true,
|
68 |
-
'show_calendar_button' => true,
|
69 |
-
'hide_on_calendar_page' => true,
|
70 |
-
'limit_by_cat' => false,
|
71 |
-
'limit_by_tag' => false,
|
72 |
-
'event_cat_ids' => array(),
|
73 |
-
'event_tag_ids' => array(),
|
74 |
-
);
|
75 |
$instance = wp_parse_args( (array) $instance, $default );
|
76 |
|
77 |
// Get available cats, tags, events to allow user to limit widget to certain categories
|
@@ -89,12 +179,12 @@ class Ai1ec_View_Admin_Widget extends WP_Widget {
|
|
89 |
'hide_on_calendar_page' => array('value' => $instance['hide_on_calendar_page']),
|
90 |
'limit_by_cat' => array('value' => $instance['limit_by_cat']),
|
91 |
'limit_by_tag' => array('value' => $instance['limit_by_tag']),
|
92 |
-
'
|
93 |
-
'value' => (array)$instance['
|
94 |
'options' => $events_categories
|
95 |
),
|
96 |
-
'
|
97 |
-
'value' => (array)$instance['
|
98 |
'options' => $events_tags
|
99 |
),
|
100 |
);
|
@@ -148,43 +238,46 @@ class Ai1ec_View_Admin_Widget extends WP_Widget {
|
|
148 |
|
149 |
// For limits, set the limit to False if no IDs were selected, or set the respective IDs to empty if "limit by" was unchecked
|
150 |
$instance['limit_by_cat'] = false;
|
151 |
-
$instance['
|
152 |
-
if ( isset( $new_instance['
|
153 |
$instance['limit_by_cat'] = true;
|
154 |
}
|
155 |
if ( isset( $new_instance['limit_by_cat'] ) && $new_instance['limit_by_cat'] != false ) {
|
156 |
$instance['limit_by_cat'] = true;
|
157 |
}
|
158 |
-
if ( isset( $new_instance['
|
159 |
-
$instance['
|
160 |
}
|
161 |
|
162 |
$instance['limit_by_tag'] = false;
|
163 |
-
$instance['
|
164 |
-
if ( isset( $new_instance['
|
165 |
$instance['limit_by_tag'] = true;
|
166 |
}
|
167 |
if ( isset( $new_instance['limit_by_tag'] ) && $new_instance['limit_by_tag'] != false ) {
|
168 |
$instance['limit_by_tag'] = true;
|
169 |
}
|
170 |
-
if ( isset( $new_instance['
|
171 |
-
$instance['
|
172 |
}
|
173 |
|
174 |
return $instance;
|
175 |
}
|
176 |
|
177 |
-
|
178 |
-
*
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
|
|
|
|
|
|
|
|
185 |
*/
|
186 |
-
public function
|
187 |
-
$type = $this->get_name();
|
188 |
$agenda = $this->_registry->get(
|
189 |
'view.calendar.view.agenda',
|
190 |
$this->_registry->get( 'http.request.parser' )
|
@@ -193,50 +286,43 @@ class Ai1ec_View_Admin_Widget extends WP_Widget {
|
|
193 |
$search = $this->_registry->get( 'model.search' );
|
194 |
$settings = $this->_registry->get( 'model.settings' );
|
195 |
$html = $this->_registry->get( 'factory.html' );
|
196 |
-
$javascript = $this->_registry->get( 'controller.javascript' );
|
197 |
|
198 |
-
$
|
199 |
-
|
200 |
-
|
201 |
-
);
|
202 |
-
$defaults = array(
|
203 |
-
'hide_on_calendar_page' => true,
|
204 |
-
'event_cat_ids' => array(),
|
205 |
-
'event_tag_ids' => array(),
|
206 |
-
'events_per_page' => 10,
|
207 |
-
'days_per_page' => 10,
|
208 |
-
'events_seek_type' => 'events',
|
209 |
-
);
|
210 |
-
$instance = wp_parse_args( $instance, $defaults );
|
211 |
-
|
212 |
-
if ( $instance['hide_on_calendar_page'] &&
|
213 |
-
is_page( $settings->get( 'calendar_page_id' ) ) ) {
|
214 |
return;
|
215 |
}
|
216 |
|
217 |
// Add params to the subscribe_url for filtering by Limits (category, tag)
|
218 |
$subscribe_filter = '';
|
219 |
-
|
220 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
|
222 |
// Get localized time
|
223 |
$timestamp = $time->format_to_gmt();
|
224 |
|
225 |
// Set $limit to the specified category/tag
|
226 |
$limit = array(
|
227 |
-
'cat_ids' => $
|
228 |
-
'tag_ids' => $
|
229 |
);
|
230 |
|
231 |
// Get events, then classify into date array
|
232 |
// JB: apply seek check here
|
233 |
-
$seek_days = ( 'days' === $
|
234 |
-
$seek_count = $
|
235 |
$last_day = false;
|
236 |
if ( $seek_days ) {
|
237 |
-
$seek_count = $
|
238 |
$last_day = strtotime(
|
239 |
-
'+' . $
|
240 |
);
|
241 |
}
|
242 |
|
@@ -255,33 +341,62 @@ class Ai1ec_View_Admin_Widget extends WP_Widget {
|
|
255 |
}
|
256 |
|
257 |
$dates = $agenda->get_agenda_like_date_array( $event_results['events'] );
|
258 |
-
|
259 |
-
|
260 |
-
$
|
261 |
-
|
262 |
-
|
263 |
-
$
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
$
|
270 |
-
$
|
271 |
-
$
|
272 |
-
$
|
273 |
-
$
|
274 |
-
$
|
275 |
-
$
|
276 |
-
$
|
|
|
|
|
|
|
|
|
277 |
->get( 'view.calendar.subscribe-button' )
|
278 |
->get_labels();
|
279 |
-
|
280 |
// Display theme
|
281 |
-
$this->_registry->get( 'theme.loader' )->get_file(
|
282 |
'agenda-widget.twig',
|
283 |
-
$
|
284 |
-
)->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
285 |
}
|
286 |
|
287 |
/**
|
5 |
*
|
6 |
* A widget that displays the next X upcoming events (similar to Agenda view).
|
7 |
*/
|
8 |
+
class Ai1ec_View_Admin_Widget extends Ai1ec_Embeddable {
|
9 |
|
10 |
/**
|
11 |
+
* @var boolean
|
12 |
*/
|
13 |
+
protected $_css_loaded = false;
|
14 |
+
|
15 |
+
/**
|
16 |
+
* @return string
|
17 |
+
*/
|
18 |
+
public function get_id() {
|
19 |
+
return 'ai1ec_agenda_widget';
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Register the widget class.
|
24 |
+
*/
|
25 |
+
public static function register_widget() {
|
26 |
+
register_widget( 'Ai1ec_View_Admin_Widget' );
|
27 |
+
}
|
28 |
|
29 |
/**
|
30 |
* Constructor for widget.
|
31 |
*/
|
32 |
public function __construct() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
parent::__construct(
|
35 |
+
$this->get_id(),
|
36 |
__( 'Upcoming Events', AI1EC_PLUGIN_NAME ),
|
37 |
array(
|
38 |
'description' => __( 'All-in-One Event Calendar: Lists upcoming events in Agenda view', AI1EC_PLUGIN_NAME ),
|
41 |
);
|
42 |
}
|
43 |
|
44 |
+
/* (non-PHPdoc)
|
45 |
+
* @see Ai1ec_Embeddable::register_javascript_widget()
|
46 |
+
*/
|
47 |
+
public function register_javascript_widget( $id_base ) {
|
48 |
+
$this->_registry->get( 'controller.javascript-widget' )
|
49 |
+
->add_widget( $id_base, 'view.calendar.widget' );
|
50 |
+
}
|
51 |
+
/* (non-PHPdoc)
|
52 |
+
* @see Ai1ec_Embeddable::get_defaults()
|
53 |
+
*/
|
54 |
+
public function get_defaults() {
|
55 |
+
return array(
|
56 |
+
'title' => __( 'Upcoming Events', AI1EC_PLUGIN_NAME ),
|
57 |
+
'events_seek_type' => 'events',
|
58 |
+
'events_per_page' => 10,
|
59 |
+
'days_per_page' => 10,
|
60 |
+
'show_subscribe_buttons' => true,
|
61 |
+
'show_calendar_button' => true,
|
62 |
+
'hide_on_calendar_page' => true,
|
63 |
+
'limit_by_cat' => false,
|
64 |
+
'limit_by_tag' => false,
|
65 |
+
'cat_ids' => array(),
|
66 |
+
'tag_ids' => array(),
|
67 |
+
'link_for_days' => true,
|
68 |
+
);
|
69 |
+
}
|
70 |
+
|
71 |
+
/* (non-PHPdoc)
|
72 |
+
* @see Ai1ec_Embeddable::get_configurable_for_widget_creation()
|
73 |
*/
|
74 |
+
public function get_configurable_for_widget_creation() {
|
75 |
+
$defaults = $this->get_js_widget_configurable_defaults();
|
76 |
+
return array(
|
77 |
+
'events_seek_type' => array(
|
78 |
+
'renderer' => array(
|
79 |
+
'class' => 'select',
|
80 |
+
'label' => __(
|
81 |
+
'Choose how to limit the upcoming events',
|
82 |
+
AI1EC_PLUGIN_NAME
|
83 |
+
),
|
84 |
+
'options' => array(
|
85 |
+
array(
|
86 |
+
'text' => __(
|
87 |
+
'Events',
|
88 |
+
AI1EC_PLUGIN_NAME
|
89 |
+
),
|
90 |
+
'value' => 'events'
|
91 |
+
),
|
92 |
+
array(
|
93 |
+
'text' => __(
|
94 |
+
'Days',
|
95 |
+
AI1EC_PLUGIN_NAME
|
96 |
+
),
|
97 |
+
'value' => 'days'
|
98 |
+
),
|
99 |
+
),
|
100 |
+
),
|
101 |
+
'value' => $defaults['events_seek_type']
|
102 |
+
),
|
103 |
+
'events_per_page' => array(
|
104 |
+
'renderer' => array(
|
105 |
+
'class' => 'input',
|
106 |
+
'label' => Ai1ec_I18n::__( 'Number of events to show' ),
|
107 |
+
'type' => 'append',
|
108 |
+
'append' => 'events',
|
109 |
+
),
|
110 |
+
'value' => $defaults['events_per_page'],
|
111 |
+
),
|
112 |
+
'days_per_page' => array(
|
113 |
+
'renderer' => array(
|
114 |
+
'class' => 'input',
|
115 |
+
'label' => Ai1ec_I18n::__( 'Number of days to show' ),
|
116 |
+
'type' => 'append',
|
117 |
+
'append' => 'days',
|
118 |
+
),
|
119 |
+
'value' => $defaults['days_per_page'],
|
120 |
+
),
|
121 |
+
'upcoming_widgets_default_tags_categories' => array(
|
122 |
+
'renderer' => array(
|
123 |
+
'class' => 'tags-categories',
|
124 |
+
'label' => __(
|
125 |
+
'Show events filtered for the following tags/categories',
|
126 |
+
AI1EC_PLUGIN_NAME
|
127 |
+
),
|
128 |
+
'help' => __(
|
129 |
+
'To clear, hold ⌘/<abbr class="initialism">CTRL</abbr> and click selection.',
|
130 |
+
AI1EC_PLUGIN_NAME
|
131 |
+
)
|
132 |
+
),
|
133 |
+
'value' => array(
|
134 |
+
'categories' => array(),
|
135 |
+
'tags' => array(),
|
136 |
+
),
|
137 |
+
),
|
138 |
+
'show_subscribe_buttons' => array(
|
139 |
+
'renderer' => array(
|
140 |
+
'class' => 'checkbox',
|
141 |
+
'label' => Ai1ec_I18n::__( 'Show the subscribe button in the widget' ),
|
142 |
+
),
|
143 |
+
'value' => $defaults['show_subscribe_buttons'],
|
144 |
+
),
|
145 |
+
);
|
146 |
}
|
147 |
|
148 |
/* (non-PHPdoc)
|
149 |
* @see Ai1ec_Calendar_View_Abstract::get_name()
|
150 |
*/
|
151 |
public function get_name() {
|
152 |
+
return 'Upcoming Events';
|
153 |
}
|
154 |
|
155 |
/**
|
161 |
* @return void
|
162 |
*/
|
163 |
public function form( $instance ) {
|
164 |
+
$default = $this->get_defaults();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
$instance = wp_parse_args( (array) $instance, $default );
|
166 |
|
167 |
// Get available cats, tags, events to allow user to limit widget to certain categories
|
179 |
'hide_on_calendar_page' => array('value' => $instance['hide_on_calendar_page']),
|
180 |
'limit_by_cat' => array('value' => $instance['limit_by_cat']),
|
181 |
'limit_by_tag' => array('value' => $instance['limit_by_tag']),
|
182 |
+
'cat_ids' => array(
|
183 |
+
'value' => (array)$instance['cat_ids'],
|
184 |
'options' => $events_categories
|
185 |
),
|
186 |
+
'tag_ids' => array(
|
187 |
+
'value' => (array)$instance['tag_ids'],
|
188 |
'options' => $events_tags
|
189 |
),
|
190 |
);
|
238 |
|
239 |
// For limits, set the limit to False if no IDs were selected, or set the respective IDs to empty if "limit by" was unchecked
|
240 |
$instance['limit_by_cat'] = false;
|
241 |
+
$instance['cat_ids'] = array();
|
242 |
+
if ( isset( $new_instance['cat_ids'] ) && $new_instance['cat_ids'] != false ) {
|
243 |
$instance['limit_by_cat'] = true;
|
244 |
}
|
245 |
if ( isset( $new_instance['limit_by_cat'] ) && $new_instance['limit_by_cat'] != false ) {
|
246 |
$instance['limit_by_cat'] = true;
|
247 |
}
|
248 |
+
if ( isset( $new_instance['cat_ids'] ) && $instance['limit_by_cat'] === true ) {
|
249 |
+
$instance['cat_ids'] = $new_instance['cat_ids'];
|
250 |
}
|
251 |
|
252 |
$instance['limit_by_tag'] = false;
|
253 |
+
$instance['tag_ids'] = array();
|
254 |
+
if ( isset( $new_instance['tag_ids'] ) && $new_instance['tag_ids'] != false ) {
|
255 |
$instance['limit_by_tag'] = true;
|
256 |
}
|
257 |
if ( isset( $new_instance['limit_by_tag'] ) && $new_instance['limit_by_tag'] != false ) {
|
258 |
$instance['limit_by_tag'] = true;
|
259 |
}
|
260 |
+
if ( isset( $new_instance['tag_ids'] ) && $instance['limit_by_tag'] === true ) {
|
261 |
+
$instance['tag_ids'] = $new_instance['tag_ids'];
|
262 |
}
|
263 |
|
264 |
return $instance;
|
265 |
}
|
266 |
|
267 |
+
/* (non-PHPdoc)
|
268 |
+
* @see Ai1ec_Embeddable::add_js()
|
269 |
+
*/
|
270 |
+
public function add_js() {
|
271 |
+
$this->_registry->get( 'controller.javascript' )->add_link_to_render_js(
|
272 |
+
Ai1ec_Javascript_Controller::LOAD_ONLY_FRONTEND_SCRIPTS,
|
273 |
+
false
|
274 |
+
);
|
275 |
+
}
|
276 |
+
|
277 |
+
/* (non-PHPdoc)
|
278 |
+
* @see Ai1ec_Embeddable::get_content()
|
279 |
*/
|
280 |
+
public function get_content( array $args_for_widget, $remote = false ) {
|
|
|
281 |
$agenda = $this->_registry->get(
|
282 |
'view.calendar.view.agenda',
|
283 |
$this->_registry->get( 'http.request.parser' )
|
286 |
$search = $this->_registry->get( 'model.search' );
|
287 |
$settings = $this->_registry->get( 'model.settings' );
|
288 |
$html = $this->_registry->get( 'factory.html' );
|
|
|
289 |
|
290 |
+
$is_calendar_page = is_page( $settings->get( 'calendar_page_id' ) );
|
291 |
+
if ( $args_for_widget['hide_on_calendar_page'] &&
|
292 |
+
$is_calendar_page ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
293 |
return;
|
294 |
}
|
295 |
|
296 |
// Add params to the subscribe_url for filtering by Limits (category, tag)
|
297 |
$subscribe_filter = '';
|
298 |
+
if ( ! is_array( $args_for_widget['cat_ids'] ) ) {
|
299 |
+
$args_for_widget['cat_ids'] = explode( ',', $args_for_widget['cat_ids'] );
|
300 |
+
}
|
301 |
+
|
302 |
+
if ( ! is_array( $args_for_widget['tag_ids'] ) ) {
|
303 |
+
$args_for_widget['tag_ids'] = explode( ',', $args_for_widget['tag_ids'] );
|
304 |
+
}
|
305 |
+
$subscribe_filter .= $args_for_widget['cat_ids'] ? '&ai1ec_cat_ids=' . join( ',', $args_for_widget['cat_ids'] ) : '';
|
306 |
+
$subscribe_filter .= $args_for_widget['tag_ids'] ? '&ai1ec_tag_ids=' . join( ',', $args_for_widget['tag_ids'] ) : '';
|
307 |
|
308 |
// Get localized time
|
309 |
$timestamp = $time->format_to_gmt();
|
310 |
|
311 |
// Set $limit to the specified category/tag
|
312 |
$limit = array(
|
313 |
+
'cat_ids' => $args_for_widget['cat_ids'],
|
314 |
+
'tag_ids' => $args_for_widget['tag_ids'],
|
315 |
);
|
316 |
|
317 |
// Get events, then classify into date array
|
318 |
// JB: apply seek check here
|
319 |
+
$seek_days = ( 'days' === $args_for_widget['events_seek_type'] );
|
320 |
+
$seek_count = $args_for_widget['events_per_page'];
|
321 |
$last_day = false;
|
322 |
if ( $seek_days ) {
|
323 |
+
$seek_count = $args_for_widget['days_per_page'] * 5;
|
324 |
$last_day = strtotime(
|
325 |
+
'+' . $args_for_widget['days_per_page'] . ' days'
|
326 |
);
|
327 |
}
|
328 |
|
341 |
}
|
342 |
|
343 |
$dates = $agenda->get_agenda_like_date_array( $event_results['events'] );
|
344 |
+
|
345 |
+
|
346 |
+
$args_for_widget['dates'] = $dates;
|
347 |
+
// load CSS just once for all widgets.
|
348 |
+
// Do not load it on the calendar page as it's already loaded.
|
349 |
+
if ( false === $this->_css_loaded && ! $is_calendar_page ) {
|
350 |
+
if ( true === $remote ) {
|
351 |
+
$args_for_widget['css'] = $this->_registry->get( 'css.frontend' )->get_compiled_css();
|
352 |
+
}
|
353 |
+
$this->_css_loaded = true;
|
354 |
+
}
|
355 |
+
$args_for_widget['show_location_in_title'] = $settings->get( 'show_location_in_title' );
|
356 |
+
$args_for_widget['show_year_in_agenda_dates'] = $settings->get( 'show_year_in_agenda_dates' );
|
357 |
+
$args_for_widget['calendar_url'] = $html->create_href_helper_instance( $limit )->generate_href();
|
358 |
+
$args_for_widget['subscribe_url'] = AI1EC_EXPORT_URL . $subscribe_filter;
|
359 |
+
$args_for_widget['subscribe_url_no_html'] = AI1EC_EXPORT_URL . '&no_html=true' . $subscribe_filter;
|
360 |
+
$args_for_widget['text_upcoming_events'] = __( 'There are no upcoming events.', AI1EC_PLUGIN_NAME );
|
361 |
+
$args_for_widget['text_all_day'] = __( 'all-day', AI1EC_PLUGIN_NAME );
|
362 |
+
$args_for_widget['text_view_calendar'] = __( 'View Calendar', AI1EC_PLUGIN_NAME );
|
363 |
+
$args_for_widget['text_edit'] = __( 'Edit', AI1EC_PLUGIN_NAME );
|
364 |
+
$args_for_widget['text_venue_separator'] = __( '@ %s', AI1EC_PLUGIN_NAME );
|
365 |
+
$args_for_widget['text_subscribe_label'] = __( 'Add', AI1EC_PLUGIN_NAME );
|
366 |
+
$args_for_widget['subscribe_buttons_text'] = $this->_registry
|
367 |
->get( 'view.calendar.subscribe-button' )
|
368 |
->get_labels();
|
|
|
369 |
// Display theme
|
370 |
+
return $this->_registry->get( 'theme.loader' )->get_file(
|
371 |
'agenda-widget.twig',
|
372 |
+
$args_for_widget
|
373 |
+
)->get_content();
|
374 |
+
}
|
375 |
+
|
376 |
+
/* (non-PHPdoc)
|
377 |
+
* @see Ai1ec_Embeddable::get_js_widget_configurable_defaults()
|
378 |
+
*/
|
379 |
+
public function get_js_widget_configurable_defaults() {
|
380 |
+
$def = $this->get_defaults();
|
381 |
+
unset( $def['title'] );
|
382 |
+
unset( $def['link_for_days'] );
|
383 |
+
return $def;
|
384 |
+
}
|
385 |
+
|
386 |
+
/* (non-PHPdoc)
|
387 |
+
* @see Ai1ec_Embeddable::javascript_widget()
|
388 |
+
*/
|
389 |
+
public function javascript_widget( $args ) {
|
390 |
+
$args['show_calendar_button'] = false;
|
391 |
+
$args['link_for_days'] = false;
|
392 |
+
return parent::javascript_widget( $args );
|
393 |
+
}
|
394 |
+
|
395 |
+
/* (non-PHPdoc)
|
396 |
+
* @see Ai1ec_Embeddable::check_requirements()
|
397 |
+
*/
|
398 |
+
public function check_requirements() {
|
399 |
+
return null;
|
400 |
}
|
401 |
|
402 |
/**
|
app/view/embeddable.php
ADDED
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
abstract class Ai1ec_Embeddable extends WP_Widget {
|
3 |
+
|
4 |
+
/**
|
5 |
+
* @var Ai1ec_Registry_Object
|
6 |
+
*/
|
7 |
+
protected $_registry;
|
8 |
+
|
9 |
+
/**
|
10 |
+
* @var string
|
11 |
+
*/
|
12 |
+
protected $_id;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* @var boolean
|
16 |
+
*/
|
17 |
+
protected $_css_loaded = false;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Get default values for shortcode or widget.
|
21 |
+
*
|
22 |
+
* @return array
|
23 |
+
*/
|
24 |
+
abstract public function get_defaults();
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Get values which are configurable in the Javascript widget.
|
28 |
+
* Some things might not be configurable.
|
29 |
+
*
|
30 |
+
* @return array
|
31 |
+
*/
|
32 |
+
abstract public function get_js_widget_configurable_defaults();
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Create the html for the widget. Shared by all versions.
|
36 |
+
*
|
37 |
+
* @param array $args_for_widget
|
38 |
+
* @param bool $remote_request whether the request is for a remote site or not (useful to inline CSS)
|
39 |
+
*/
|
40 |
+
abstract public function get_content( array $args_for_widget, $remote_request = false );
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Add the required javascript for the widget. Needed for shortcode and Wordpress widget
|
44 |
+
*/
|
45 |
+
abstract public function add_js();
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Register the widget to the controller.
|
49 |
+
*
|
50 |
+
* @param string $id_base
|
51 |
+
*/
|
52 |
+
abstract public function register_javascript_widget( $id_base );
|
53 |
+
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Return options needed for thw "Widget creator page
|
57 |
+
*
|
58 |
+
* @return array
|
59 |
+
*/
|
60 |
+
abstract public function get_configurable_for_widget_creation();
|
61 |
+
|
62 |
+
/**
|
63 |
+
* The human-readable name of the widget.
|
64 |
+
*
|
65 |
+
* @return string
|
66 |
+
*/
|
67 |
+
abstract public function get_name();
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Checks and returns widget requirements.
|
71 |
+
*
|
72 |
+
* @return string
|
73 |
+
*/
|
74 |
+
abstract public function check_requirements();
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Register widget class with current WP instance.
|
78 |
+
* This must be static as otherwise the class would be instantiated twice,
|
79 |
+
* one to register it and the other from Wordpress.
|
80 |
+
*
|
81 |
+
* @return string
|
82 |
+
*/
|
83 |
+
public static function register_widget() {
|
84 |
+
throw new Ai1ec_Exception( 'This should be implemented in child class' );
|
85 |
+
}
|
86 |
+
|
87 |
+
public function __construct( $id_base, $name, $widget_options = array(), $control_options = array() ) {
|
88 |
+
$this->_id = $id_base;
|
89 |
+
parent::__construct( $id_base, $name, $widget_options, $control_options );
|
90 |
+
add_shortcode( $id_base, array( $this, 'shortcode' ) );
|
91 |
+
$this->_registry = apply_filters( 'ai1ec_registry', false );
|
92 |
+
$this->register_javascript_widget( $id_base );
|
93 |
+
add_filter( 'ai1ec_js_translations', array( $this, 'add_js_translations' ) );
|
94 |
+
$this->_registry->get( 'css.frontend' )->add_link_to_html_for_frontend();
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* @param array $translations
|
99 |
+
* @return array
|
100 |
+
*/
|
101 |
+
public function add_js_translations( array $translations ) {
|
102 |
+
$translations['javascript_widgets'][$this->_id] = $this->get_js_widget_configurable_defaults();
|
103 |
+
return $translations;
|
104 |
+
}
|
105 |
+
/**
|
106 |
+
* Widget function.
|
107 |
+
*
|
108 |
+
* Outputs the given instance of the widget to the front-end.
|
109 |
+
*
|
110 |
+
* @param array $args Display arguments passed to the widget
|
111 |
+
* @param array $instance The settings for this widget instance
|
112 |
+
* @return void
|
113 |
+
*/
|
114 |
+
public function widget( $args, $instance ) {
|
115 |
+
$defaults = $this->get_defaults();
|
116 |
+
$instance = wp_parse_args( $instance, $defaults );
|
117 |
+
$this->add_js();
|
118 |
+
$args['widget_html'] = $this->get_content( $instance );
|
119 |
+
if ( ! empty( $args['widget_html'] ) ) {
|
120 |
+
$args['title'] = $instance['title'];
|
121 |
+
$args = $this->_filter_widget_args( $args );
|
122 |
+
// Display theme
|
123 |
+
$this->_registry->get( 'theme.loader' )->get_file(
|
124 |
+
'widget.twig',
|
125 |
+
$args
|
126 |
+
)->render();
|
127 |
+
}
|
128 |
+
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Renders shortcode
|
133 |
+
*
|
134 |
+
* @param array $atts
|
135 |
+
* @param string $content
|
136 |
+
*/
|
137 |
+
public function shortcode( $atts, $content = null ) {
|
138 |
+
$defaults = $this->get_defaults();
|
139 |
+
$atts = shortcode_atts( $defaults, $atts );
|
140 |
+
$this->add_js();
|
141 |
+
return $this->get_content( $atts );
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* Renders js widget
|
146 |
+
*
|
147 |
+
* @param array $args
|
148 |
+
*/
|
149 |
+
public function javascript_widget( $args ) {
|
150 |
+
$defaults = $this->get_defaults();
|
151 |
+
$args = wp_parse_args( $args, $defaults );
|
152 |
+
return $this->get_content( $args, true );
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* Filters default widget parameters like classes, html elements before and
|
157 |
+
* after title or widget. Useful for Feature Events widget which has
|
158 |
+
* different title styling.
|
159 |
+
*
|
160 |
+
* @param array $args Widget arguments.
|
161 |
+
*
|
162 |
+
* @return array Filtered arguments.
|
163 |
+
*/
|
164 |
+
protected function _filter_widget_args( $args ) {
|
165 |
+
return $args;
|
166 |
+
}
|
167 |
+
}
|
app/view/event/avatar.php
CHANGED
@@ -44,7 +44,7 @@ class Ai1ec_View_Event_Avatar extends Ai1ec_Base {
|
|
44 |
if ( empty( $url ) ) {
|
45 |
return '';
|
46 |
}
|
47 |
-
|
48 |
$url = esc_attr( $url );
|
49 |
$classes = esc_attr( $classes );
|
50 |
|
@@ -107,19 +107,20 @@ class Ai1ec_View_Event_Avatar extends Ai1ec_Base {
|
|
107 |
'default_avatar',
|
108 |
);
|
109 |
}
|
110 |
-
|
111 |
$valid_fallbacks = array(
|
|
|
112 |
'post_thumbnail' => 'get_post_thumbnail_url',
|
113 |
'content_img' => 'get_content_img_url',
|
114 |
'category_avatar' => 'get_category_avatar_url',
|
115 |
'default_avatar' => 'get_default_avatar_url',
|
116 |
);
|
117 |
-
|
118 |
foreach ( $fallback_order as $fallback ) {
|
119 |
if ( ! isset( $valid_fallbacks[$fallback] ) ) {
|
120 |
continue;
|
121 |
}
|
122 |
-
|
123 |
$function = $valid_fallbacks[$fallback];
|
124 |
$url = $this->$function( $event, $size );
|
125 |
if ( NULL !== $url ) {
|
@@ -127,7 +128,7 @@ class Ai1ec_View_Event_Avatar extends Ai1ec_Base {
|
|
127 |
break;
|
128 |
}
|
129 |
}
|
130 |
-
|
131 |
if ( empty( $url ) ) {
|
132 |
return NULL;
|
133 |
}
|
@@ -137,51 +138,64 @@ class Ai1ec_View_Event_Avatar extends Ai1ec_Base {
|
|
137 |
/**
|
138 |
* Read post meta for post-thumbnail and return its URL as a string.
|
139 |
*
|
140 |
-
* @param
|
|
|
141 |
*
|
142 |
* @return string|null
|
143 |
*/
|
144 |
public function get_post_thumbnail_url( Ai1ec_Event $event, &$size = null ) {
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
)
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
}
|
161 |
|
162 |
/**
|
163 |
* Simple regex-parse of post_content for matches of <img src="foo" />; if
|
164 |
* one is found, return its URL.
|
165 |
-
*
|
166 |
* @param Ai1ec_Event $event
|
167 |
* @param null $size (width, height) array of returned image
|
168 |
*
|
169 |
* @return string|null
|
170 |
*/
|
171 |
public function get_content_img_url( Ai1ec_Event $event, &$size = null ) {
|
172 |
-
|
173 |
-
|
174 |
-
$event->get( 'post' )->post_content,
|
175 |
-
$matches
|
176 |
);
|
177 |
// Check if we have a result, otherwise a notice is issued.
|
178 |
if ( empty( $matches ) ) {
|
179 |
return null;
|
180 |
}
|
181 |
-
|
182 |
$url = $matches[2];
|
183 |
$size = array( 0, 0 );
|
184 |
-
|
185 |
// Try to detect width and height.
|
186 |
$attrs = $matches[1] . $matches[3];
|
187 |
$matches = null;
|
@@ -200,6 +214,21 @@ class Ai1ec_View_Event_Avatar extends Ai1ec_Base {
|
|
200 |
return $url;
|
201 |
}
|
202 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
203 |
/**
|
204 |
* Returns default avatar image (normally when no other ones are available).
|
205 |
*
|
@@ -269,4 +298,35 @@ class Ai1ec_View_Event_Avatar extends Ai1ec_Base {
|
|
269 |
return empty( $url ) ? null : $url;
|
270 |
}
|
271 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
}
|
44 |
if ( empty( $url ) ) {
|
45 |
return '';
|
46 |
}
|
47 |
+
|
48 |
$url = esc_attr( $url );
|
49 |
$classes = esc_attr( $classes );
|
50 |
|
107 |
'default_avatar',
|
108 |
);
|
109 |
}
|
110 |
+
|
111 |
$valid_fallbacks = array(
|
112 |
+
'post_image' => 'get_post_image_url',
|
113 |
'post_thumbnail' => 'get_post_thumbnail_url',
|
114 |
'content_img' => 'get_content_img_url',
|
115 |
'category_avatar' => 'get_category_avatar_url',
|
116 |
'default_avatar' => 'get_default_avatar_url',
|
117 |
);
|
118 |
+
|
119 |
foreach ( $fallback_order as $fallback ) {
|
120 |
if ( ! isset( $valid_fallbacks[$fallback] ) ) {
|
121 |
continue;
|
122 |
}
|
123 |
+
|
124 |
$function = $valid_fallbacks[$fallback];
|
125 |
$url = $this->$function( $event, $size );
|
126 |
if ( NULL !== $url ) {
|
128 |
break;
|
129 |
}
|
130 |
}
|
131 |
+
|
132 |
if ( empty( $url ) ) {
|
133 |
return NULL;
|
134 |
}
|
138 |
/**
|
139 |
* Read post meta for post-thumbnail and return its URL as a string.
|
140 |
*
|
141 |
+
* @param Ai1ec_Event $event Event object.
|
142 |
+
* @param null $size (width, height) array of returned image.
|
143 |
*
|
144 |
* @return string|null
|
145 |
*/
|
146 |
public function get_post_thumbnail_url( Ai1ec_Event $event, &$size = null ) {
|
147 |
+
return $this->_get_post_attachment_url(
|
148 |
+
$event,
|
149 |
+
array(
|
150 |
+
'medium',
|
151 |
+
'large',
|
152 |
+
'full',
|
153 |
+
),
|
154 |
+
$size
|
155 |
+
);
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Read post meta for post-image and return its URL as a string.
|
160 |
+
*
|
161 |
+
* @param Ai1ec_Event $event Event object.
|
162 |
+
* @param null $size (width, height) array of returned image.
|
163 |
+
*
|
164 |
+
* @return string|null
|
165 |
+
*/
|
166 |
+
public function get_post_image_url( Ai1ec_Event $event, &$size = null ) {
|
167 |
+
return $this->_get_post_attachment_url(
|
168 |
+
$event,
|
169 |
+
array(
|
170 |
+
'full',
|
171 |
+
'large',
|
172 |
+
'medium'
|
173 |
+
),
|
174 |
+
$size
|
175 |
+
);
|
176 |
}
|
177 |
|
178 |
/**
|
179 |
* Simple regex-parse of post_content for matches of <img src="foo" />; if
|
180 |
* one is found, return its URL.
|
181 |
+
*
|
182 |
* @param Ai1ec_Event $event
|
183 |
* @param null $size (width, height) array of returned image
|
184 |
*
|
185 |
* @return string|null
|
186 |
*/
|
187 |
public function get_content_img_url( Ai1ec_Event $event, &$size = null ) {
|
188 |
+
$matches = $this->get_image_from_content(
|
189 |
+
$event->get( 'post' )->post_content
|
|
|
|
|
190 |
);
|
191 |
// Check if we have a result, otherwise a notice is issued.
|
192 |
if ( empty( $matches ) ) {
|
193 |
return null;
|
194 |
}
|
195 |
+
|
196 |
$url = $matches[2];
|
197 |
$size = array( 0, 0 );
|
198 |
+
|
199 |
// Try to detect width and height.
|
200 |
$attrs = $matches[1] . $matches[3];
|
201 |
$matches = null;
|
214 |
return $url;
|
215 |
}
|
216 |
|
217 |
+
/**
|
218 |
+
* Get an image tag from an html string
|
219 |
+
*
|
220 |
+
* @param string $content
|
221 |
+
*
|
222 |
+
* @return array
|
223 |
+
*/
|
224 |
+
public function get_image_from_content( $content ) {
|
225 |
+
preg_match(
|
226 |
+
'/<img([^>]+)src=["\']?([^"\'\ >]+)([^>]*)>/i',
|
227 |
+
$content,
|
228 |
+
$matches
|
229 |
+
);
|
230 |
+
return $matches;
|
231 |
+
}
|
232 |
/**
|
233 |
* Returns default avatar image (normally when no other ones are available).
|
234 |
*
|
298 |
return empty( $url ) ? null : $url;
|
299 |
}
|
300 |
|
301 |
+
/**
|
302 |
+
* Read post meta for post-attachment and return its URL as a string.
|
303 |
+
*
|
304 |
+
* @param Ai1ec_Event $event Event object.
|
305 |
+
* @param array $ordered_img_sizes Image sizes order.
|
306 |
+
* @param null $size (width, height) array of returned
|
307 |
+
* image.
|
308 |
+
*
|
309 |
+
* @return string|null
|
310 |
+
*/
|
311 |
+
protected function _get_post_attachment_url(
|
312 |
+
Ai1ec_Event $event,
|
313 |
+
array $ordered_img_sizes,
|
314 |
+
&$size = null
|
315 |
+
) {
|
316 |
+
// Since WP does will return null if the wrong size is targeted,
|
317 |
+
// we iterate over an array of sizes, breaking if a URL is found.
|
318 |
+
foreach ( $ordered_img_sizes as $size ) {
|
319 |
+
$attributes = wp_get_attachment_image_src(
|
320 |
+
get_post_thumbnail_id( $event->get( 'post_id' ) ), $size
|
321 |
+
);
|
322 |
+
if ( $attributes ) {
|
323 |
+
$url = array_shift( $attributes );
|
324 |
+
$size = $attributes;
|
325 |
+
break;
|
326 |
+
}
|
327 |
+
}
|
328 |
+
|
329 |
+
return empty( $url ) ? null : $url;
|
330 |
+
}
|
331 |
+
|
332 |
}
|
app/view/event/single.php
CHANGED
@@ -50,6 +50,29 @@ class Ai1ec_View_Event_Single extends Ai1ec_Base {
|
|
50 |
nl2br( $location->get_location( $event ) ),
|
51 |
$event
|
52 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
// objects are passed by reference so an action is ok
|
54 |
do_action( 'ai1ec_single_event_page_before_render', $event );
|
55 |
|
@@ -82,6 +105,8 @@ class Ai1ec_View_Event_Single extends Ai1ec_Base {
|
|
82 |
'text_free' => __( 'Free', AI1EC_PLUGIN_NAME ),
|
83 |
'text_categories' => __( 'Categories', AI1EC_PLUGIN_NAME ),
|
84 |
'text_tags' => __( 'Tags', AI1EC_PLUGIN_NAME ),
|
|
|
|
|
85 |
);
|
86 |
|
87 |
if (
|
@@ -125,12 +150,13 @@ class Ai1ec_View_Event_Single extends Ai1ec_Base {
|
|
125 |
* @param Ai1ec_Event $event
|
126 |
*/
|
127 |
public function get_full_article( Ai1ec_Event $event ) {
|
128 |
-
$title
|
129 |
'the_title',
|
130 |
$event->get( 'post' )->post_title,
|
131 |
$event->get( 'post_id' )
|
132 |
);
|
133 |
-
$
|
|
|
134 |
apply_filters(
|
135 |
'ai1ec_the_content',
|
136 |
apply_filters(
|
@@ -139,11 +165,10 @@ class Ai1ec_View_Event_Single extends Ai1ec_Base {
|
|
139 |
)
|
140 |
)
|
141 |
);
|
142 |
-
$args = compact( 'title', 'content' );
|
143 |
$loader = $this->_registry->get( 'theme.loader' );
|
144 |
return $loader->get_file( 'event-single-full.twig', $args, false )
|
145 |
->get_content();
|
146 |
-
|
147 |
}
|
148 |
|
149 |
-
}
|
50 |
nl2br( $location->get_location( $event ) ),
|
51 |
$event
|
52 |
);
|
53 |
+
$timezone_info = array(
|
54 |
+
'show_timezone' => false,
|
55 |
+
'text_timezone_title' => null,
|
56 |
+
'event_timezone' => null,
|
57 |
+
);
|
58 |
+
$default_tz = $this->_registry->get( 'date.timezone' )
|
59 |
+
->get_default_timezone();
|
60 |
+
if ( $event->get( 'timezone_name' ) !== $default_tz ) {
|
61 |
+
$timezone_info = array(
|
62 |
+
'show_timezone' => true,
|
63 |
+
'event_timezone' => $event->get( 'start' )->get_gmt_offset_as_text(),
|
64 |
+
'text_timezone_title' => sprintf(
|
65 |
+
Ai1ec_I18n:: __(
|
66 |
+
'Event was created in the %s time zone'
|
67 |
+
),
|
68 |
+
$event->get( 'timezone_name' )
|
69 |
+
),
|
70 |
+
);
|
71 |
+
}
|
72 |
+
|
73 |
+
$banner_image_meta = get_post_meta( $event->get( 'post_id' ), 'ai1ec_banner_image' );
|
74 |
+
$banner_image = $banner_image_meta ? $banner_image_meta[0] : '';
|
75 |
+
|
76 |
// objects are passed by reference so an action is ok
|
77 |
do_action( 'ai1ec_single_event_page_before_render', $event );
|
78 |
|
105 |
'text_free' => __( 'Free', AI1EC_PLUGIN_NAME ),
|
106 |
'text_categories' => __( 'Categories', AI1EC_PLUGIN_NAME ),
|
107 |
'text_tags' => __( 'Tags', AI1EC_PLUGIN_NAME ),
|
108 |
+
'timezone_info' => $timezone_info,
|
109 |
+
'banner_image' => $banner_image,
|
110 |
);
|
111 |
|
112 |
if (
|
150 |
* @param Ai1ec_Event $event
|
151 |
*/
|
152 |
public function get_full_article( Ai1ec_Event $event ) {
|
153 |
+
$title = apply_filters(
|
154 |
'the_title',
|
155 |
$event->get( 'post' )->post_title,
|
156 |
$event->get( 'post_id' )
|
157 |
);
|
158 |
+
$event_details = $this->get_content( $event );
|
159 |
+
$content = wpautop(
|
160 |
apply_filters(
|
161 |
'ai1ec_the_content',
|
162 |
apply_filters(
|
165 |
)
|
166 |
)
|
167 |
);
|
168 |
+
$args = compact( 'title', 'event_details', 'content' );
|
169 |
$loader = $this->_registry->get( 'theme.loader' );
|
170 |
return $loader->get_file( 'event-single-full.twig', $args, false )
|
171 |
->get_content();
|
|
|
172 |
}
|
173 |
|
174 |
+
}
|
language/all-in-one-event-calendar.mo
CHANGED
Binary file
|
language/all-in-one-event-calendar.po
CHANGED
@@ -2,17 +2,18 @@
|
|
2 |
# This file is distributed under the same license as the All-in-One Event Calendar by Time.ly package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: All-in-One Event Calendar by Time.ly 2.1.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-event-calendar\n"
|
7 |
-
"POT-Creation-Date: 2014-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"PO-Revision-Date: 2014-
|
12 |
"Last-Translator: Timely <support@time.ly>\n"
|
13 |
"Language-Team:\n"
|
14 |
|
15 |
-
#: app/controller/extension-license.php:54
|
|
|
16 |
msgid "Add-ons"
|
17 |
msgstr "Add-ons"
|
18 |
|
@@ -24,7 +25,7 @@ msgstr "Licenses"
|
|
24 |
msgid "Licences"
|
25 |
msgstr "Licences"
|
26 |
|
27 |
-
#: app/controller/front.php:
|
28 |
msgid ""
|
29 |
"Your active calendar theme could not be properly initialized. The default "
|
30 |
"theme has been activated instead. Please visit %s and try reactivating your "
|
@@ -34,12 +35,12 @@ msgstr ""
|
|
34 |
"theme has been activated instead. Please visit %s and try reactivating your "
|
35 |
"theme manually."
|
36 |
|
37 |
-
#: app/controller/front.php:
|
38 |
#: app/view/admin/theme-switching.php:55
|
39 |
msgid "Calendar Themes"
|
40 |
msgstr "Calendar Themes"
|
41 |
|
42 |
-
#: app/controller/front.php:
|
43 |
msgid ""
|
44 |
"Your database is found to be corrupt. Likely previous update has failed. "
|
45 |
"Please restore All-in-One Event Calendar tables from a backup and retry."
|
@@ -49,33 +50,47 @@ msgstr ""
|
|
49 |
"Please restore All-in-One Event Calendar tables from a backup and retry."
|
50 |
"<br>Following errors were found:<br>%s"
|
51 |
|
52 |
-
#: app/controller/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
msgid "This feed is already being imported."
|
54 |
msgstr "This feed is already being imported."
|
55 |
|
56 |
-
#: app/controller/javascript.php:
|
57 |
msgid "Please enter a valid iCalendar URL."
|
58 |
msgstr "Please enter a valid iCalendar URL."
|
59 |
|
60 |
-
#: app/controller/javascript.php:
|
61 |
msgid "Please enter a valid email address."
|
62 |
msgstr "Please enter a valid email address."
|
63 |
|
64 |
-
#: app/controller/javascript.php:
|
65 |
msgid "Choose Image"
|
66 |
msgstr "Choose Image"
|
67 |
|
68 |
-
#: app/controller/javascript.php:
|
69 |
msgid "The value you have entered is not a valid CSS length."
|
70 |
msgstr "The value you have entered is not a valid CSS length."
|
71 |
|
72 |
-
#: app/controller/javascript.php:
|
73 |
msgid ""
|
74 |
"Are you sure you want to reset your theme options to their default values?"
|
75 |
msgstr ""
|
76 |
"Are you sure you want to reset your theme options to their default values?"
|
77 |
|
78 |
-
#: app/controller/javascript.php:
|
79 |
msgid ""
|
80 |
"Please enter a valid latitude. A valid latitude is comprised between +90 and "
|
81 |
"-90."
|
@@ -83,7 +98,7 @@ msgstr ""
|
|
83 |
"Please enter a valid latitude. A valid latitude is comprised between +90 and "
|
84 |
"-90."
|
85 |
|
86 |
-
#: app/controller/javascript.php:
|
87 |
msgid ""
|
88 |
"Please enter a valid longitude. A valid longitude is comprised between +180 "
|
89 |
"and -180."
|
@@ -91,7 +106,7 @@ msgstr ""
|
|
91 |
"Please enter a valid longitude. A valid longitude is comprised between +180 "
|
92 |
"and -180."
|
93 |
|
94 |
-
#: app/controller/javascript.php:
|
95 |
msgid ""
|
96 |
"When the \"Input coordinates\" checkbox is checked, \"Latitude\" is a "
|
97 |
"required field."
|
@@ -99,7 +114,7 @@ msgstr ""
|
|
99 |
"When the \"Input coordinates\" checkbox is checked, \"Latitude\" is a "
|
100 |
"required field."
|
101 |
|
102 |
-
#: app/controller/javascript.php:
|
103 |
msgid ""
|
104 |
"When the \"Input coordinates\" checkbox is checked, \"Longitude\" is a "
|
105 |
"required field."
|
@@ -107,7 +122,7 @@ msgstr ""
|
|
107 |
"When the \"Input coordinates\" checkbox is checked, \"Longitude\" is a "
|
108 |
"required field."
|
109 |
|
110 |
-
#: app/controller/javascript.php:
|
111 |
msgid ""
|
112 |
"The URL you have entered in the <b>Organizer Contact Info</b> > "
|
113 |
"<b>External URL</b> seems to be invalid."
|
@@ -115,7 +130,7 @@ msgstr ""
|
|
115 |
"The URL you have entered in the <b>Organizer Contact Info</b> > "
|
116 |
"<b>External URL</b> seems to be invalid."
|
117 |
|
118 |
-
#: app/controller/javascript.php:
|
119 |
msgid ""
|
120 |
"The URL you have entered in the <b>Event Cost and Tickets</b> > <b>Buy "
|
121 |
"Tickets URL</b> seems to be invalid."
|
@@ -123,12 +138,32 @@ msgstr ""
|
|
123 |
"The URL you have entered in the <b>Event Cost and Tickets</b> > <b>Buy "
|
124 |
"Tickets URL</b> seems to be invalid."
|
125 |
|
126 |
-
#: app/controller/javascript.php:
|
127 |
msgid ""
|
128 |
"Please remember that URLs must start with either \"http://\" or \"https://\"."
|
129 |
msgstr ""
|
130 |
"Please remember that URLs must start with either \"http://\" or \"https://\"."
|
131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
#: app/model/event/parent.php:186
|
133 |
msgid "Edit “%s”"
|
134 |
msgstr "Edit “%s”"
|
@@ -137,44 +172,44 @@ msgstr "Edit “%s”"
|
|
137 |
msgid "Base Event"
|
138 |
msgstr "Base Event"
|
139 |
|
140 |
-
#: app/model/settings.php:
|
141 |
#: lib/html/element/setting/calendar-page-selector.php:50
|
142 |
msgid "Calendar page"
|
143 |
msgstr "Calendar page"
|
144 |
|
145 |
-
#: app/model/settings.php:
|
146 |
msgid "Week starts on"
|
147 |
msgstr "Week starts on"
|
148 |
|
149 |
-
#: app/model/settings.php:
|
150 |
msgid "Available views"
|
151 |
msgstr "Available views"
|
152 |
|
153 |
-
#: app/model/settings.php:
|
154 |
msgid "Agenda"
|
155 |
msgid_plural "Agenda"
|
156 |
msgstr[0] "Agenda"
|
157 |
msgstr[1] "Agenda"
|
158 |
|
159 |
-
#: app/model/settings.php:
|
160 |
msgid "Day"
|
161 |
msgid_plural "Day"
|
162 |
msgstr[0] "Day"
|
163 |
msgstr[1] "Day"
|
164 |
|
165 |
-
#: app/model/settings.php:
|
166 |
msgid "Month"
|
167 |
msgid_plural "Month"
|
168 |
msgstr[0] "Month"
|
169 |
msgstr[1] "Month"
|
170 |
|
171 |
-
#: app/model/settings.php:
|
172 |
msgid "Week"
|
173 |
msgid_plural "Week"
|
174 |
msgstr[0] "Week"
|
175 |
msgstr[1] "Week"
|
176 |
|
177 |
-
#: app/model/settings.php:
|
178 |
msgid "Timezone"
|
179 |
msgstr "Timezone"
|
180 |
|
@@ -182,7 +217,7 @@ msgstr "Timezone"
|
|
182 |
msgid "Preselected calendar filters"
|
183 |
msgstr "Preselected calendar filters"
|
184 |
|
185 |
-
#: app/model/settings.php:437
|
186 |
msgid ""
|
187 |
"To clear, hold ⌘/<abbr class=\"initialism\">CTRL</abbr> and click "
|
188 |
"selection."
|
@@ -264,65 +299,69 @@ msgstr ""
|
|
264 |
" <strong>Affix filter menu</strong> to top of window when it scrolls out of "
|
265 |
"view"
|
266 |
|
267 |
-
#: app/model/settings.php:
|
|
|
|
|
|
|
|
|
268 |
msgid "Offset affixed filter bar vertically by"
|
269 |
msgstr "Offset affixed filter bar vertically by"
|
270 |
|
271 |
-
#: app/model/settings.php:
|
272 |
msgid "Wide screens only (≥ 1200px)"
|
273 |
msgstr "Wide screens only (≥ 1200px)"
|
274 |
|
275 |
-
#: app/model/settings.php:
|
276 |
msgid "Tablets only (< 980px)"
|
277 |
msgstr "Tablets only (< 980px)"
|
278 |
|
279 |
-
#: app/model/settings.php:
|
280 |
msgid "Phones only (< 768px)"
|
281 |
msgstr "Phones only (< 768px)"
|
282 |
|
283 |
-
#: app/model/settings.php:
|
284 |
msgid "Strict compatibility content filtering"
|
285 |
msgstr "Strict compatibility content filtering"
|
286 |
|
287 |
-
#: app/model/settings.php:
|
288 |
msgid " <strong>Hide featured image</strong> from event details page"
|
289 |
msgstr " <strong>Hide featured image</strong> from event details page"
|
290 |
|
291 |
-
#: app/model/settings.php:
|
292 |
msgid ""
|
293 |
"Select this option if your theme already displays each post's featured image."
|
294 |
msgstr ""
|
295 |
"Select this option if your theme already displays each post's featured image."
|
296 |
|
297 |
-
#: app/model/settings.php:
|
298 |
msgid "Input dates in this format"
|
299 |
msgstr "Input dates in this format"
|
300 |
|
301 |
-
#: app/model/settings.php:
|
302 |
msgid "Default (d/m/yyyy)"
|
303 |
msgstr "Default (d/m/yyyy)"
|
304 |
|
305 |
-
#: app/model/settings.php:
|
306 |
msgid "US (m/d/yyyy)"
|
307 |
msgstr "US (m/d/yyyy)"
|
308 |
|
309 |
-
#: app/model/settings.php:
|
310 |
msgid "ISO 8601 (yyyy-m-d)"
|
311 |
msgstr "ISO 8601 (yyyy-m-d)"
|
312 |
|
313 |
-
#: app/model/settings.php:
|
314 |
msgid "Dotted (m.d.yyyy)"
|
315 |
msgstr "Dotted (m.d.yyyy)"
|
316 |
|
317 |
-
#: app/model/settings.php:
|
318 |
msgid " Use <strong>24h time</strong> in time pickers"
|
319 |
msgstr " Use <strong>24h time</strong> in time pickers"
|
320 |
|
321 |
-
#: app/model/settings.php:
|
322 |
msgid "<strong>Disable address autocomplete</strong> function"
|
323 |
msgstr "<strong>Disable address autocomplete</strong> function"
|
324 |
|
325 |
-
#: app/model/settings.php:
|
326 |
msgid ""
|
327 |
"Use the configured <strong>region</strong> (WordPress locale) to bias the "
|
328 |
"address autocomplete function "
|
@@ -330,7 +369,7 @@ msgstr ""
|
|
330 |
"Use the configured <strong>region</strong> (WordPress locale) to bias the "
|
331 |
"address autocomplete function "
|
332 |
|
333 |
-
#: app/model/settings.php:
|
334 |
msgid ""
|
335 |
" Show the old <strong>Post Your Event</strong> button above the calendar to "
|
336 |
"privileged users"
|
@@ -338,7 +377,7 @@ msgstr ""
|
|
338 |
" Show the old <strong>Post Your Event</strong> button above the calendar to "
|
339 |
"privileged users"
|
340 |
|
341 |
-
#: app/model/settings.php:
|
342 |
msgid ""
|
343 |
"Install the <a target=\"_blank\" href=\"http://time.ly/\">Interactive "
|
344 |
"Frontend Extension</a> for the <strong>frontend Post Your Event form</"
|
@@ -348,11 +387,11 @@ msgstr ""
|
|
348 |
"Frontend Extension</a> for the <strong>frontend Post Your Event form</"
|
349 |
"strong>."
|
350 |
|
351 |
-
#: app/model/settings.php:
|
352 |
msgid "Move calendar into this DOM element"
|
353 |
msgstr "Move calendar into this DOM element"
|
354 |
|
355 |
-
#: app/model/settings.php:
|
356 |
msgid ""
|
357 |
"Optional. Use this JavaScript-based shortcut to place the\n"
|
358 |
"\t\t\t\t\t\tcalendar a DOM element other than the usual page content "
|
@@ -376,7 +415,7 @@ msgstr ""
|
|
376 |
"\t\t\t\t\t\tAny existing markup found within the target will be replaced\n"
|
377 |
"\t\t\t\t\t\tby the calendar."
|
378 |
|
379 |
-
#: app/model/settings.php:
|
380 |
msgid ""
|
381 |
"<strong>Skip <tt>in_the_loop()</tt> check </strong> that protects against "
|
382 |
"multiple calendar output"
|
@@ -384,7 +423,7 @@ msgstr ""
|
|
384 |
"<strong>Skip <tt>in_the_loop()</tt> check </strong> that protects against "
|
385 |
"multiple calendar output"
|
386 |
|
387 |
-
#: app/model/settings.php:
|
388 |
msgid ""
|
389 |
"Try enabling this option if your calendar does not appear on the calendar "
|
390 |
"page. It is needed for compatibility with a small number of themes that call "
|
@@ -394,11 +433,11 @@ msgstr ""
|
|
394 |
"page. It is needed for compatibility with a small number of themes that call "
|
395 |
"<tt>the_content()</tt> from outside of The Loop. Leave disabled otherwise."
|
396 |
|
397 |
-
#: app/model/settings.php:
|
398 |
msgid "Disable <strong>gzip</strong> compression."
|
399 |
msgstr "Disable <strong>gzip</strong> compression."
|
400 |
|
401 |
-
#: app/model/settings.php:
|
402 |
msgid ""
|
403 |
"Use this option if calendar is unresponsive. <a href=\"http://support.time."
|
404 |
"ly/disable-gzip-compression/\">Read more</a> about the issue. (From version "
|
@@ -408,7 +447,7 @@ msgstr ""
|
|
408 |
"ly/disable-gzip-compression/\">Read more</a> about the issue. (From version "
|
409 |
"2.1 onwards, gzip is disabled by default for maximum compatibility.)"
|
410 |
|
411 |
-
#: app/model/settings.php:
|
412 |
msgid ""
|
413 |
"<strong>Link CSS</strong> in <code><head></code> section when file "
|
414 |
"cache is unavailable."
|
@@ -416,7 +455,7 @@ msgstr ""
|
|
416 |
"<strong>Link CSS</strong> in <code><head></code> section when file "
|
417 |
"cache is unavailable."
|
418 |
|
419 |
-
#: app/model/settings.php:
|
420 |
msgid ""
|
421 |
"Use this option if file cache is unavailable and you would prefer to serve "
|
422 |
"CSS as a link rather than have it output inline."
|
@@ -424,11 +463,11 @@ msgstr ""
|
|
424 |
"Use this option if file cache is unavailable and you would prefer to serve "
|
425 |
"CSS as a link rather than have it output inline."
|
426 |
|
427 |
-
#: app/model/settings.php:
|
428 |
msgid "Current <strong>robots.txt</strong> on this site"
|
429 |
msgstr "Current <strong>robots.txt</strong> on this site"
|
430 |
|
431 |
-
#: app/model/settings.php:
|
432 |
msgid ""
|
433 |
"The Robot Exclusion Standard, also known as the Robots Exclusion Protocol "
|
434 |
"or\n"
|
@@ -452,7 +491,7 @@ msgstr ""
|
|
452 |
"\t\t\t\t\t\tYou can change it manually by editing <code>robots.txt</code> in "
|
453 |
"your root WordPress directory."
|
454 |
|
455 |
-
#: app/model/settings.php:
|
456 |
msgid ""
|
457 |
"<strong>Publicize, promote, and share my events</strong> marked as public on "
|
458 |
"the Timely network. (<a href=\"%s\" target=\"_blank\">Learn more »</a>)"
|
@@ -460,7 +499,7 @@ msgstr ""
|
|
460 |
"<strong>Publicize, promote, and share my events</strong> marked as public on "
|
461 |
"the Timely network. (<a href=\"%s\" target=\"_blank\">Learn more »</a>)"
|
462 |
|
463 |
-
#: app/model/settings.php:
|
464 |
msgid "Templates cache improves site performance"
|
465 |
msgstr "Templates cache improves site performance"
|
466 |
|
@@ -468,6 +507,40 @@ msgstr "Templates cache improves site performance"
|
|
468 |
msgid "Event Details"
|
469 |
msgstr "Event Details"
|
470 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
471 |
#: app/view/admin/all-events.php:16
|
472 |
msgid "Author"
|
473 |
msgstr "Author"
|
@@ -642,59 +715,59 @@ msgstr "<a href=\"%s\">Settings</a>"
|
|
642 |
msgid "All-in-One Event Calendar: Settings"
|
643 |
msgstr "All-in-One Event Calendar: Settings"
|
644 |
|
645 |
-
#: app/view/admin/settings.php:
|
646 |
#: lib/date/timezone.php:366
|
647 |
msgid "Settings"
|
648 |
msgstr "Settings"
|
649 |
|
650 |
-
#: app/view/admin/settings.php:
|
651 |
msgctxt "meta box"
|
652 |
msgid "General Settings"
|
653 |
msgstr "General Settings"
|
654 |
|
655 |
-
#: app/view/admin/settings.php:
|
656 |
msgctxt "meta box"
|
657 |
msgid "Timely"
|
658 |
msgstr "Timely"
|
659 |
|
660 |
-
#: app/view/admin/settings.php:
|
661 |
msgid "Viewing Events"
|
662 |
msgstr "Viewing Events"
|
663 |
|
664 |
-
#: app/view/admin/settings.php:
|
665 |
msgid "Adding/Editing Events"
|
666 |
msgstr "Adding/Editing Events"
|
667 |
|
668 |
-
#: app/view/admin/settings.php:
|
669 |
msgid "Advanced"
|
670 |
msgstr "Advanced"
|
671 |
|
672 |
-
#: app/view/admin/settings.php:
|
673 |
msgid "Advanced Settings"
|
674 |
msgstr "Advanced Settings"
|
675 |
|
676 |
-
#: app/view/admin/settings.php:
|
677 |
msgid "Shortcodes"
|
678 |
msgstr "Shortcodes"
|
679 |
|
680 |
-
#: app/view/admin/settings.php:
|
681 |
msgid "Email Templates"
|
682 |
msgstr "Email Templates"
|
683 |
|
684 |
-
#: app/view/admin/settings.php:
|
685 |
msgid "External Services"
|
686 |
msgstr "External Services"
|
687 |
|
688 |
-
#: app/view/admin/settings.php:
|
689 |
msgid "Cache Report"
|
690 |
msgstr "Cache Report"
|
691 |
|
692 |
-
#: app/view/admin/settings.php:
|
693 |
#: public/admin/plugins/ics/display_feeds.php:24
|
694 |
msgid "Save Settings"
|
695 |
msgstr "Save Settings"
|
696 |
|
697 |
-
#: app/view/admin/settings.php:
|
698 |
msgid ""
|
699 |
"If the form below is not working please follow <a href=\"%s\">this link</a>."
|
700 |
msgstr ""
|
@@ -753,7 +826,41 @@ msgstr "Reset to Defaults"
|
|
753 |
msgid "All-in-One Event Calendar: Themes"
|
754 |
msgstr "All-in-One Event Calendar: Themes"
|
755 |
|
756 |
-
#: app/view/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
757 |
msgid ""
|
758 |
"There was an error loading calendar. Please contact site administrator and "
|
759 |
"inform him to configure calendar views."
|
@@ -761,11 +868,11 @@ msgstr ""
|
|
761 |
"There was an error loading calendar. Please contact site administrator and "
|
762 |
"inform him to configure calendar views."
|
763 |
|
764 |
-
#: app/view/calendar/page.php:
|
765 |
msgid "Subscribe to filtered calendar"
|
766 |
msgstr "Subscribe to filtered calendar"
|
767 |
|
768 |
-
#: app/view/calendar/page.php:
|
769 |
msgid "Subscribe"
|
770 |
msgstr "Subscribe"
|
771 |
|
@@ -821,7 +928,7 @@ msgstr "Subscribe to this calendar in another plain-text calendar"
|
|
821 |
msgid "Clear category filter"
|
822 |
msgstr "Clear category filter"
|
823 |
|
824 |
-
#: app/view/calendar/taxonomy.php:98 app/view/event/single.php:
|
825 |
#: lib/html/element/setting/tags-categories.php:47
|
826 |
msgid "Categories"
|
827 |
msgstr "Categories"
|
@@ -830,95 +937,123 @@ msgstr "Categories"
|
|
830 |
msgid "Clear tag filter"
|
831 |
msgstr "Clear tag filter"
|
832 |
|
833 |
-
#: app/view/calendar/taxonomy.php:100 app/view/event/single.php:
|
834 |
#: lib/html/element/setting/tags-categories.php:39
|
835 |
msgid "Tags"
|
836 |
msgstr "Tags"
|
837 |
|
838 |
-
#: app/view/calendar/view/agenda.php:
|
839 |
msgid "Collapse All"
|
840 |
msgstr "Collapse All"
|
841 |
|
842 |
-
#: app/view/calendar/view/agenda.php:
|
843 |
msgid "Expand All"
|
844 |
msgstr "Expand All"
|
845 |
|
846 |
-
#: app/view/calendar/view/agenda.php:
|
847 |
msgid "There are no upcoming events to display at this time."
|
848 |
msgstr "There are no upcoming events to display at this time."
|
849 |
|
850 |
-
#: app/view/calendar/view/agenda.php:
|
851 |
msgid "Edit"
|
852 |
msgstr "Edit"
|
853 |
|
854 |
-
#: app/view/calendar/view/agenda.php:
|
855 |
msgid "Read more"
|
856 |
msgstr "Read more"
|
857 |
|
858 |
-
#: app/view/calendar/view/agenda.php:
|
859 |
msgid "Categories:"
|
860 |
msgstr "Categories:"
|
861 |
|
862 |
-
#: app/view/calendar/view/agenda.php:
|
863 |
#: public/admin/themes.php:29
|
864 |
msgid "Tags:"
|
865 |
msgstr "Tags:"
|
866 |
|
867 |
-
#: app/view/calendar/view/agenda.php:
|
868 |
-
#: app/view/calendar/view/oneday.php:
|
869 |
-
#: app/view/calendar/widget.php:
|
870 |
msgid "@ %s"
|
871 |
msgstr "@ %s"
|
872 |
|
873 |
-
#: app/view/calendar/view/oneday.php:
|
874 |
msgid "g a"
|
875 |
msgstr "g a"
|
876 |
|
877 |
-
#: app/view/calendar/view/oneday.php:
|
878 |
msgid "Reveal full day"
|
879 |
msgstr "Reveal full day"
|
880 |
|
881 |
-
#: app/view/calendar/view/oneday.php:
|
882 |
msgid "All-day"
|
883 |
msgstr "All-day"
|
884 |
|
885 |
-
#: app/view/calendar/view/oneday.php:
|
886 |
msgid "Now:"
|
887 |
msgstr "Now:"
|
888 |
|
889 |
-
#: app/view/calendar/view/week.php:
|
890 |
msgid "Week of %s"
|
891 |
msgstr "Week of %s"
|
892 |
|
893 |
-
#: app/view/calendar/widget.php:
|
894 |
msgid "Upcoming Events"
|
895 |
msgstr "Upcoming Events"
|
896 |
|
897 |
-
#: app/view/calendar/widget.php:
|
898 |
msgid "All-in-One Event Calendar: Lists upcoming events in Agenda view"
|
899 |
msgstr "All-in-One Event Calendar: Lists upcoming events in Agenda view"
|
900 |
|
901 |
-
#: app/view/calendar/widget.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
902 |
msgid "There are no upcoming events."
|
903 |
msgstr "There are no upcoming events."
|
904 |
|
905 |
-
#: app/view/calendar/widget.php:
|
906 |
msgid "all-day"
|
907 |
msgstr "all-day"
|
908 |
|
909 |
-
#: app/view/calendar/widget.php:
|
910 |
msgid "View Calendar"
|
911 |
msgstr "View Calendar"
|
912 |
|
913 |
-
#: app/view/calendar/widget.php:
|
914 |
msgid "Add"
|
915 |
msgstr "Add"
|
916 |
|
917 |
-
#: app/view/event/content.php:33 app/view/event/single.php:
|
918 |
msgid "When:"
|
919 |
msgstr "When:"
|
920 |
|
921 |
-
#: app/view/event/content.php:34 app/view/event/single.php:
|
922 |
msgid "Where:"
|
923 |
msgstr "Where:"
|
924 |
|
@@ -989,27 +1124,31 @@ msgid "Event draft updated. <a target=\"_blank\" href=\"%s\">Preview event</a>"
|
|
989 |
msgstr ""
|
990 |
"Event draft updated. <a target=\"_blank\" href=\"%s\">Preview event</a>"
|
991 |
|
992 |
-
#: app/view/event/single.php:
|
|
|
|
|
|
|
|
|
993 |
msgid "Add to Calendar"
|
994 |
msgstr "Add to Calendar"
|
995 |
|
996 |
-
#: app/view/event/single.php:
|
997 |
msgid "Cost:"
|
998 |
msgstr "Cost:"
|
999 |
|
1000 |
-
#: app/view/event/single.php:
|
1001 |
msgid "Contact:"
|
1002 |
msgstr "Contact:"
|
1003 |
|
1004 |
-
#: app/view/event/single.php:
|
1005 |
msgid "Free"
|
1006 |
msgstr "Free"
|
1007 |
|
1008 |
-
#: app/view/event/single.php:
|
1009 |
msgid "Edit this occurrence (%s)"
|
1010 |
msgstr "Edit this occurrence (%s)"
|
1011 |
|
1012 |
-
#: app/view/event/single.php:
|
1013 |
msgid ""
|
1014 |
"This post was replicated from another site's <a class=\"ai1ec-ics-icon\" "
|
1015 |
"href=\"%s\" title=\"iCalendar feed\">calendar feed</a>."
|
@@ -1017,7 +1156,7 @@ msgstr ""
|
|
1017 |
"This post was replicated from another site's <a class=\"ai1ec-ics-icon\" "
|
1018 |
"href=\"%s\" title=\"iCalendar feed\">calendar feed</a>."
|
1019 |
|
1020 |
-
#: app/view/event/single.php:
|
1021 |
msgid "View original post"
|
1022 |
msgstr "View original post"
|
1023 |
|
@@ -1071,7 +1210,7 @@ msgstr "ICS"
|
|
1071 |
msgid "Another import process in progress. Please try again later."
|
1072 |
msgstr "Another import process in progress. Please try again later."
|
1073 |
|
1074 |
-
#: lib/calendar-feed/ics.php:
|
1075 |
msgid ""
|
1076 |
"A system error has prevented calendar data from being fetched. Something is "
|
1077 |
"preventing the plugin from functioning correctly. This message should "
|
@@ -1081,7 +1220,7 @@ msgstr ""
|
|
1081 |
"preventing the plugin from functioning correctly. This message should "
|
1082 |
"provide a clue: %s"
|
1083 |
|
1084 |
-
#: lib/calendar-feed/ics.php:
|
1085 |
msgid ""
|
1086 |
"Calendar data could not be fetched. If your URL is valid and contains an "
|
1087 |
"iCalendar resource, this is likely the result of a temporary server error "
|
@@ -1091,47 +1230,47 @@ msgstr ""
|
|
1091 |
"iCalendar resource, this is likely the result of a temporary server error "
|
1092 |
"and time may resolve this issue"
|
1093 |
|
1094 |
-
#: lib/calendar-feed/ics.php:
|
1095 |
msgid "No events were found"
|
1096 |
msgstr "No events were found"
|
1097 |
|
1098 |
-
#: lib/calendar-feed/ics.php:
|
1099 |
msgid "Imported %s event"
|
1100 |
msgid_plural "Imported %s events"
|
1101 |
msgstr[0] "Imported %s event"
|
1102 |
msgstr[1] "Imported %s events"
|
1103 |
|
1104 |
-
#: lib/calendar-feed/ics.php:
|
1105 |
msgid "Invalid ICS feed ID"
|
1106 |
msgstr "Invalid ICS feed ID"
|
1107 |
|
1108 |
-
#: lib/calendar-feed/ics.php:
|
1109 |
msgid "Categories (optional)"
|
1110 |
msgstr "Categories (optional)"
|
1111 |
|
1112 |
-
#: lib/calendar-feed/ics.php:
|
1113 |
msgid ""
|
1114 |
"Do you want to keep the events imported from the calendar or remove them?"
|
1115 |
msgstr ""
|
1116 |
"Do you want to keep the events imported from the calendar or remove them?"
|
1117 |
|
1118 |
-
#: lib/calendar-feed/ics.php:
|
1119 |
msgid "Removing ICS Feed"
|
1120 |
msgstr "Removing ICS Feed"
|
1121 |
|
1122 |
-
#: lib/calendar-feed/ics.php:
|
1123 |
msgid "Keep Events"
|
1124 |
msgstr "Keep Events"
|
1125 |
|
1126 |
-
#: lib/calendar-feed/ics.php:
|
1127 |
msgid "Remove Events"
|
1128 |
msgstr "Remove Events"
|
1129 |
|
1130 |
-
#: lib/calendar-feed/ics.php:
|
1131 |
msgid "Deleted %d events"
|
1132 |
msgstr "Deleted %d events"
|
1133 |
|
1134 |
-
#: lib/calendar-feed/ics.php:
|
1135 |
msgid "Feed deleted"
|
1136 |
msgstr "Feed deleted"
|
1137 |
|
@@ -1162,7 +1301,7 @@ msgstr "Copy to a new draft"
|
|
1162 |
msgid "Clone to Draft"
|
1163 |
msgstr "Clone to Draft"
|
1164 |
|
1165 |
-
#: lib/command/clone.php:
|
1166 |
msgid ""
|
1167 |
"<p>The event <strong>%s</strong> was cloned succesfully. <a href=\"%s\">Edit "
|
1168 |
"cloned event</a></p>"
|
@@ -1170,7 +1309,7 @@ msgstr ""
|
|
1170 |
"<p>The event <strong>%s</strong> was cloned succesfully. <a href=\"%s\">Edit "
|
1171 |
"cloned event</a></p>"
|
1172 |
|
1173 |
-
#: lib/css/frontend.php:
|
1174 |
msgid ""
|
1175 |
"The LESS file compiled correctly but there was an error while saving the "
|
1176 |
"generated CSS to persistence."
|
@@ -1178,7 +1317,7 @@ msgstr ""
|
|
1178 |
"The LESS file compiled correctly but there was an error while saving the "
|
1179 |
"generated CSS to persistence."
|
1180 |
|
1181 |
-
#: lib/css/frontend.php:
|
1182 |
msgid ""
|
1183 |
"<p><strong>There was an error while compiling CSS.</strong> The message "
|
1184 |
"returned was: <em>%s</em></p>"
|
@@ -1186,7 +1325,7 @@ msgstr ""
|
|
1186 |
"<p><strong>There was an error while compiling CSS.</strong> The message "
|
1187 |
"returned was: <em>%s</em></p>"
|
1188 |
|
1189 |
-
#: lib/css/frontend.php:
|
1190 |
msgid ""
|
1191 |
"Theme options were successfully reset to their default values. <a "
|
1192 |
"href='%s'>Visit site</a>"
|
@@ -1194,11 +1333,11 @@ msgstr ""
|
|
1194 |
"Theme options were successfully reset to their default values. <a "
|
1195 |
"href='%s'>Visit site</a>"
|
1196 |
|
1197 |
-
#: lib/css/frontend.php:
|
1198 |
msgid "Theme options were updated successfully. <a href='%s'>Visit site</a>"
|
1199 |
msgstr "Theme options were updated successfully. <a href='%s'>Visit site</a>"
|
1200 |
|
1201 |
-
#: lib/css/frontend.php:
|
1202 |
msgid ""
|
1203 |
"Your CSS is being compiled on every request, which causes your calendar to "
|
1204 |
"perform slowly. The following error occurred: %s"
|
@@ -1244,19 +1383,19 @@ msgstr ""
|
|
1244 |
msgid "Selected timezone \"UTC%+d\" will be treated as %s."
|
1245 |
msgstr "Selected timezone \"UTC%+d\" will be treated as %s."
|
1246 |
|
1247 |
-
#: lib/date/timezone.php:
|
1248 |
msgid "Manual Offset"
|
1249 |
msgstr "Manual Offset"
|
1250 |
|
1251 |
-
#: lib/date/timezone.php:
|
1252 |
msgid "Choose your timezone"
|
1253 |
msgstr "Choose your timezone"
|
1254 |
|
1255 |
-
#: lib/environment/check.php:
|
1256 |
msgid "Select an option in the <strong>Calendar page</strong> dropdown list."
|
1257 |
msgstr "Select an option in the <strong>Calendar page</strong> dropdown list."
|
1258 |
|
1259 |
-
#: lib/environment/check.php:
|
1260 |
msgid ""
|
1261 |
"The plugin is installed, but has not been configured. <a href=\"%s\">Click "
|
1262 |
"here to set it up now »</a>"
|
@@ -1264,7 +1403,7 @@ msgstr ""
|
|
1264 |
"The plugin is installed, but has not been configured. <a href=\"%s\">Click "
|
1265 |
"here to set it up now »</a>"
|
1266 |
|
1267 |
-
#: lib/environment/check.php:
|
1268 |
msgid ""
|
1269 |
"The plugin is installed, but has not been configured. Please log in as an "
|
1270 |
"Administrator to set it up."
|
@@ -1272,6 +1411,10 @@ msgstr ""
|
|
1272 |
"The plugin is installed, but has not been configured. Please log in as an "
|
1273 |
"Administrator to set it up."
|
1274 |
|
|
|
|
|
|
|
|
|
1275 |
#: lib/exception/handler.php:176
|
1276 |
msgid "Disabled add-on \"%s\" due to an error"
|
1277 |
msgstr "Disabled add-on \"%s\" due to an error"
|
@@ -1478,7 +1621,7 @@ msgstr ""
|
|
1478 |
msgid "Custom..."
|
1479 |
msgstr "Custom..."
|
1480 |
|
1481 |
-
#: lib/less/variable/font.php:
|
1482 |
msgid "Enter custom font(s)"
|
1483 |
msgstr "Enter custom font(s)"
|
1484 |
|
@@ -1486,7 +1629,7 @@ msgstr "Enter custom font(s)"
|
|
1486 |
msgid "Length"
|
1487 |
msgstr "Length"
|
1488 |
|
1489 |
-
#: lib/notification/admin.php:
|
1490 |
msgid "All-in-One Event Calendar"
|
1491 |
msgstr "All-in-One Event Calendar"
|
1492 |
|
@@ -1536,10 +1679,6 @@ msgstr "No Events found in Trash"
|
|
1536 |
msgid "Parent Event"
|
1537 |
msgstr "Parent Event"
|
1538 |
|
1539 |
-
#: lib/post/custom-type.php:37
|
1540 |
-
msgid "Events"
|
1541 |
-
msgstr "Events"
|
1542 |
-
|
1543 |
#: lib/post/custom-type.php:55
|
1544 |
msgid "event"
|
1545 |
msgstr "event"
|
@@ -2583,9 +2722,9 @@ msgstr "Today background"
|
|
2583 |
msgid "All-in-One Event Calendar by Time.ly"
|
2584 |
msgstr "All-in-One Event Calendar by Time.ly"
|
2585 |
|
2586 |
-
#. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.1.
|
2587 |
#. Plugin URI of the plugin/theme
|
2588 |
-
#. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.1.
|
2589 |
#. Author URI of the plugin/theme
|
2590 |
msgid "http://time.ly/"
|
2591 |
msgstr "http://time.ly/"
|
2 |
# This file is distributed under the same license as the All-in-One Event Calendar by Time.ly package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: All-in-One Event Calendar by Time.ly 2.1.6\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-event-calendar\n"
|
7 |
+
"POT-Creation-Date: 2014-11-19 22:34:16+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2014-11-19 23:34+0100\n"
|
12 |
"Last-Translator: Timely <support@time.ly>\n"
|
13 |
"Language-Team:\n"
|
14 |
|
15 |
+
#: app/controller/extension-license.php:54 app/view/admin/add-ons.php:26
|
16 |
+
#: app/view/admin/add-ons.php:27
|
17 |
msgid "Add-ons"
|
18 |
msgstr "Add-ons"
|
19 |
|
25 |
msgid "Licences"
|
26 |
msgstr "Licences"
|
27 |
|
28 |
+
#: app/controller/front.php:309
|
29 |
msgid ""
|
30 |
"Your active calendar theme could not be properly initialized. The default "
|
31 |
"theme has been activated instead. Please visit %s and try reactivating your "
|
35 |
"theme has been activated instead. Please visit %s and try reactivating your "
|
36 |
"theme manually."
|
37 |
|
38 |
+
#: app/controller/front.php:313 app/view/admin/theme-switching.php:54
|
39 |
#: app/view/admin/theme-switching.php:55
|
40 |
msgid "Calendar Themes"
|
41 |
msgstr "Calendar Themes"
|
42 |
|
43 |
+
#: app/controller/front.php:886
|
44 |
msgid ""
|
45 |
"Your database is found to be corrupt. Likely previous update has failed. "
|
46 |
"Please restore All-in-One Event Calendar tables from a backup and retry."
|
50 |
"Please restore All-in-One Event Calendar tables from a backup and retry."
|
51 |
"<br>Following errors were found:<br>%s"
|
52 |
|
53 |
+
#: app/controller/front.php:1040
|
54 |
+
msgid ""
|
55 |
+
"You may be using a legacy custom calendar theme. If you have problems "
|
56 |
+
"viewing the calendar, please read <a href=\"https://time.ly/\">this article</"
|
57 |
+
"a>."
|
58 |
+
msgstr ""
|
59 |
+
"You may be using a legacy custom calendar theme. If you have problems "
|
60 |
+
"viewing the calendar, please read <a href=\"https://time.ly/\">this article</"
|
61 |
+
"a>."
|
62 |
+
|
63 |
+
#: app/controller/javascript-widget.php:47
|
64 |
+
msgid "You must choose the Calendar page before using the Super Widget"
|
65 |
+
msgstr "You must choose the Calendar page before using the Super Widget"
|
66 |
+
|
67 |
+
#: app/controller/javascript.php:386
|
68 |
msgid "This feed is already being imported."
|
69 |
msgstr "This feed is already being imported."
|
70 |
|
71 |
+
#: app/controller/javascript.php:389
|
72 |
msgid "Please enter a valid iCalendar URL."
|
73 |
msgstr "Please enter a valid iCalendar URL."
|
74 |
|
75 |
+
#: app/controller/javascript.php:392
|
76 |
msgid "Please enter a valid email address."
|
77 |
msgstr "Please enter a valid email address."
|
78 |
|
79 |
+
#: app/controller/javascript.php:394
|
80 |
msgid "Choose Image"
|
81 |
msgstr "Choose Image"
|
82 |
|
83 |
+
#: app/controller/javascript.php:397
|
84 |
msgid "The value you have entered is not a valid CSS length."
|
85 |
msgstr "The value you have entered is not a valid CSS length."
|
86 |
|
87 |
+
#: app/controller/javascript.php:400
|
88 |
msgid ""
|
89 |
"Are you sure you want to reset your theme options to their default values?"
|
90 |
msgstr ""
|
91 |
"Are you sure you want to reset your theme options to their default values?"
|
92 |
|
93 |
+
#: app/controller/javascript.php:403
|
94 |
msgid ""
|
95 |
"Please enter a valid latitude. A valid latitude is comprised between +90 and "
|
96 |
"-90."
|
98 |
"Please enter a valid latitude. A valid latitude is comprised between +90 and "
|
99 |
"-90."
|
100 |
|
101 |
+
#: app/controller/javascript.php:406
|
102 |
msgid ""
|
103 |
"Please enter a valid longitude. A valid longitude is comprised between +180 "
|
104 |
"and -180."
|
106 |
"Please enter a valid longitude. A valid longitude is comprised between +180 "
|
107 |
"and -180."
|
108 |
|
109 |
+
#: app/controller/javascript.php:409
|
110 |
msgid ""
|
111 |
"When the \"Input coordinates\" checkbox is checked, \"Latitude\" is a "
|
112 |
"required field."
|
114 |
"When the \"Input coordinates\" checkbox is checked, \"Latitude\" is a "
|
115 |
"required field."
|
116 |
|
117 |
+
#: app/controller/javascript.php:412
|
118 |
msgid ""
|
119 |
"When the \"Input coordinates\" checkbox is checked, \"Longitude\" is a "
|
120 |
"required field."
|
122 |
"When the \"Input coordinates\" checkbox is checked, \"Longitude\" is a "
|
123 |
"required field."
|
124 |
|
125 |
+
#: app/controller/javascript.php:415
|
126 |
msgid ""
|
127 |
"The URL you have entered in the <b>Organizer Contact Info</b> > "
|
128 |
"<b>External URL</b> seems to be invalid."
|
130 |
"The URL you have entered in the <b>Organizer Contact Info</b> > "
|
131 |
"<b>External URL</b> seems to be invalid."
|
132 |
|
133 |
+
#: app/controller/javascript.php:418
|
134 |
msgid ""
|
135 |
"The URL you have entered in the <b>Event Cost and Tickets</b> > <b>Buy "
|
136 |
"Tickets URL</b> seems to be invalid."
|
138 |
"The URL you have entered in the <b>Event Cost and Tickets</b> > <b>Buy "
|
139 |
"Tickets URL</b> seems to be invalid."
|
140 |
|
141 |
+
#: app/controller/javascript.php:421
|
142 |
msgid ""
|
143 |
"Please remember that URLs must start with either \"http://\" or \"https://\"."
|
144 |
msgstr ""
|
145 |
"Please remember that URLs must start with either \"http://\" or \"https://\"."
|
146 |
|
147 |
+
#: app/controller/javascript.php:451 app/view/admin/widget-creator.php:131
|
148 |
+
msgid "Preview:"
|
149 |
+
msgstr "Preview:"
|
150 |
+
|
151 |
+
#: app/controller/javascript.php:452
|
152 |
+
msgid ""
|
153 |
+
"Loading preview <i class=\"ai1ec-fa ai1ec-fa-spin ai1ec-fa-spinner\"></"
|
154 |
+
"i>"
|
155 |
+
msgstr ""
|
156 |
+
"Loading preview <i class=\"ai1ec-fa ai1ec-fa-spin ai1ec-fa-spinner\"></"
|
157 |
+
"i>"
|
158 |
+
|
159 |
+
#: app/controller/javascript.php:456
|
160 |
+
msgid ""
|
161 |
+
"Something went wrong while fetching events.<br>The request status is: %STATUS"
|
162 |
+
"% <br>The error thrown was: %ERROR%"
|
163 |
+
msgstr ""
|
164 |
+
"Something went wrong while fetching events.<br>The request status is: %STATUS"
|
165 |
+
"% <br>The error thrown was: %ERROR%"
|
166 |
+
|
167 |
#: app/model/event/parent.php:186
|
168 |
msgid "Edit “%s”"
|
169 |
msgstr "Edit “%s”"
|
172 |
msgid "Base Event"
|
173 |
msgstr "Base Event"
|
174 |
|
175 |
+
#: app/model/settings.php:345
|
176 |
#: lib/html/element/setting/calendar-page-selector.php:50
|
177 |
msgid "Calendar page"
|
178 |
msgstr "Calendar page"
|
179 |
|
180 |
+
#: app/model/settings.php:355
|
181 |
msgid "Week starts on"
|
182 |
msgstr "Week starts on"
|
183 |
|
184 |
+
#: app/model/settings.php:368
|
185 |
msgid "Available views"
|
186 |
msgstr "Available views"
|
187 |
|
188 |
+
#: app/model/settings.php:376
|
189 |
msgid "Agenda"
|
190 |
msgid_plural "Agenda"
|
191 |
msgstr[0] "Agenda"
|
192 |
msgstr[1] "Agenda"
|
193 |
|
194 |
+
#: app/model/settings.php:387
|
195 |
msgid "Day"
|
196 |
msgid_plural "Day"
|
197 |
msgstr[0] "Day"
|
198 |
msgstr[1] "Day"
|
199 |
|
200 |
+
#: app/model/settings.php:398
|
201 |
msgid "Month"
|
202 |
msgid_plural "Month"
|
203 |
msgstr[0] "Month"
|
204 |
msgstr[1] "Month"
|
205 |
|
206 |
+
#: app/model/settings.php:409
|
207 |
msgid "Week"
|
208 |
msgid_plural "Week"
|
209 |
msgstr[0] "Week"
|
210 |
msgstr[1] "Week"
|
211 |
|
212 |
+
#: app/model/settings.php:423
|
213 |
msgid "Timezone"
|
214 |
msgstr "Timezone"
|
215 |
|
217 |
msgid "Preselected calendar filters"
|
218 |
msgstr "Preselected calendar filters"
|
219 |
|
220 |
+
#: app/model/settings.php:437 app/view/calendar/widget.php:128
|
221 |
msgid ""
|
222 |
"To clear, hold ⌘/<abbr class=\"initialism\">CTRL</abbr> and click "
|
223 |
"selection."
|
299 |
" <strong>Affix filter menu</strong> to top of window when it scrolls out of "
|
300 |
"view"
|
301 |
|
302 |
+
#: app/model/settings.php:608
|
303 |
+
msgid "Only applies to first visible calendar found on the page."
|
304 |
+
msgstr "Only applies to first visible calendar found on the page."
|
305 |
+
|
306 |
+
#: app/model/settings.php:620
|
307 |
msgid "Offset affixed filter bar vertically by"
|
308 |
msgstr "Offset affixed filter bar vertically by"
|
309 |
|
310 |
+
#: app/model/settings.php:635
|
311 |
msgid "Wide screens only (≥ 1200px)"
|
312 |
msgstr "Wide screens only (≥ 1200px)"
|
313 |
|
314 |
+
#: app/model/settings.php:650
|
315 |
msgid "Tablets only (< 980px)"
|
316 |
msgstr "Tablets only (< 980px)"
|
317 |
|
318 |
+
#: app/model/settings.php:665
|
319 |
msgid "Phones only (< 768px)"
|
320 |
msgstr "Phones only (< 768px)"
|
321 |
|
322 |
+
#: app/model/settings.php:678
|
323 |
msgid "Strict compatibility content filtering"
|
324 |
msgstr "Strict compatibility content filtering"
|
325 |
|
326 |
+
#: app/model/settings.php:690
|
327 |
msgid " <strong>Hide featured image</strong> from event details page"
|
328 |
msgstr " <strong>Hide featured image</strong> from event details page"
|
329 |
|
330 |
+
#: app/model/settings.php:693
|
331 |
msgid ""
|
332 |
"Select this option if your theme already displays each post's featured image."
|
333 |
msgstr ""
|
334 |
"Select this option if your theme already displays each post's featured image."
|
335 |
|
336 |
+
#: app/model/settings.php:704
|
337 |
msgid "Input dates in this format"
|
338 |
msgstr "Input dates in this format"
|
339 |
|
340 |
+
#: app/model/settings.php:709
|
341 |
msgid "Default (d/m/yyyy)"
|
342 |
msgstr "Default (d/m/yyyy)"
|
343 |
|
344 |
+
#: app/model/settings.php:713
|
345 |
msgid "US (m/d/yyyy)"
|
346 |
msgstr "US (m/d/yyyy)"
|
347 |
|
348 |
+
#: app/model/settings.php:717
|
349 |
msgid "ISO 8601 (yyyy-m-d)"
|
350 |
msgstr "ISO 8601 (yyyy-m-d)"
|
351 |
|
352 |
+
#: app/model/settings.php:721
|
353 |
msgid "Dotted (m.d.yyyy)"
|
354 |
msgstr "Dotted (m.d.yyyy)"
|
355 |
|
356 |
+
#: app/model/settings.php:733
|
357 |
msgid " Use <strong>24h time</strong> in time pickers"
|
358 |
msgstr " Use <strong>24h time</strong> in time pickers"
|
359 |
|
360 |
+
#: app/model/settings.php:744
|
361 |
msgid "<strong>Disable address autocomplete</strong> function"
|
362 |
msgstr "<strong>Disable address autocomplete</strong> function"
|
363 |
|
364 |
+
#: app/model/settings.php:755
|
365 |
msgid ""
|
366 |
"Use the configured <strong>region</strong> (WordPress locale) to bias the "
|
367 |
"address autocomplete function "
|
369 |
"Use the configured <strong>region</strong> (WordPress locale) to bias the "
|
370 |
"address autocomplete function "
|
371 |
|
372 |
+
#: app/model/settings.php:771
|
373 |
msgid ""
|
374 |
" Show the old <strong>Post Your Event</strong> button above the calendar to "
|
375 |
"privileged users"
|
377 |
" Show the old <strong>Post Your Event</strong> button above the calendar to "
|
378 |
"privileged users"
|
379 |
|
380 |
+
#: app/model/settings.php:774
|
381 |
msgid ""
|
382 |
"Install the <a target=\"_blank\" href=\"http://time.ly/\">Interactive "
|
383 |
"Frontend Extension</a> for the <strong>frontend Post Your Event form</"
|
387 |
"Frontend Extension</a> for the <strong>frontend Post Your Event form</"
|
388 |
"strong>."
|
389 |
|
390 |
+
#: app/model/settings.php:795
|
391 |
msgid "Move calendar into this DOM element"
|
392 |
msgstr "Move calendar into this DOM element"
|
393 |
|
394 |
+
#: app/model/settings.php:797
|
395 |
msgid ""
|
396 |
"Optional. Use this JavaScript-based shortcut to place the\n"
|
397 |
"\t\t\t\t\t\tcalendar a DOM element other than the usual page content "
|
415 |
"\t\t\t\t\t\tAny existing markup found within the target will be replaced\n"
|
416 |
"\t\t\t\t\t\tby the calendar."
|
417 |
|
418 |
+
#: app/model/settings.php:816
|
419 |
msgid ""
|
420 |
"<strong>Skip <tt>in_the_loop()</tt> check </strong> that protects against "
|
421 |
"multiple calendar output"
|
423 |
"<strong>Skip <tt>in_the_loop()</tt> check </strong> that protects against "
|
424 |
"multiple calendar output"
|
425 |
|
426 |
+
#: app/model/settings.php:819
|
427 |
msgid ""
|
428 |
"Try enabling this option if your calendar does not appear on the calendar "
|
429 |
"page. It is needed for compatibility with a small number of themes that call "
|
433 |
"page. It is needed for compatibility with a small number of themes that call "
|
434 |
"<tt>the_content()</tt> from outside of The Loop. Leave disabled otherwise."
|
435 |
|
436 |
+
#: app/model/settings.php:831
|
437 |
msgid "Disable <strong>gzip</strong> compression."
|
438 |
msgstr "Disable <strong>gzip</strong> compression."
|
439 |
|
440 |
+
#: app/model/settings.php:834
|
441 |
msgid ""
|
442 |
"Use this option if calendar is unresponsive. <a href=\"http://support.time."
|
443 |
"ly/disable-gzip-compression/\">Read more</a> about the issue. (From version "
|
447 |
"ly/disable-gzip-compression/\">Read more</a> about the issue. (From version "
|
448 |
"2.1 onwards, gzip is disabled by default for maximum compatibility.)"
|
449 |
|
450 |
+
#: app/model/settings.php:846
|
451 |
msgid ""
|
452 |
"<strong>Link CSS</strong> in <code><head></code> section when file "
|
453 |
"cache is unavailable."
|
455 |
"<strong>Link CSS</strong> in <code><head></code> section when file "
|
456 |
"cache is unavailable."
|
457 |
|
458 |
+
#: app/model/settings.php:849
|
459 |
msgid ""
|
460 |
"Use this option if file cache is unavailable and you would prefer to serve "
|
461 |
"CSS as a link rather than have it output inline."
|
463 |
"Use this option if file cache is unavailable and you would prefer to serve "
|
464 |
"CSS as a link rather than have it output inline."
|
465 |
|
466 |
+
#: app/model/settings.php:861
|
467 |
msgid "Current <strong>robots.txt</strong> on this site"
|
468 |
msgstr "Current <strong>robots.txt</strong> on this site"
|
469 |
|
470 |
+
#: app/model/settings.php:865
|
471 |
msgid ""
|
472 |
"The Robot Exclusion Standard, also known as the Robots Exclusion Protocol "
|
473 |
"or\n"
|
491 |
"\t\t\t\t\t\tYou can change it manually by editing <code>robots.txt</code> in "
|
492 |
"your root WordPress directory."
|
493 |
|
494 |
+
#: app/model/settings.php:882
|
495 |
msgid ""
|
496 |
"<strong>Publicize, promote, and share my events</strong> marked as public on "
|
497 |
"the Timely network. (<a href=\"%s\" target=\"_blank\">Learn more »</a>)"
|
499 |
"<strong>Publicize, promote, and share my events</strong> marked as public on "
|
500 |
"the Timely network. (<a href=\"%s\" target=\"_blank\">Learn more »</a>)"
|
501 |
|
502 |
+
#: app/model/settings.php:905
|
503 |
msgid "Templates cache improves site performance"
|
504 |
msgstr "Templates cache improves site performance"
|
505 |
|
507 |
msgid "Event Details"
|
508 |
msgstr "Event Details"
|
509 |
|
510 |
+
#: app/view/admin/add-new-event.php:47
|
511 |
+
msgid "Banner Image"
|
512 |
+
msgstr "Banner Image"
|
513 |
+
|
514 |
+
#: app/view/admin/add-new-event.php:377
|
515 |
+
msgid "Set banner image"
|
516 |
+
msgstr "Set banner image"
|
517 |
+
|
518 |
+
#: app/view/admin/add-new-event.php:378
|
519 |
+
msgid "Remove banner image"
|
520 |
+
msgstr "Remove banner image"
|
521 |
+
|
522 |
+
#: app/view/admin/add-ons.php:68
|
523 |
+
msgid "Add-ons for All In One Event Calendar"
|
524 |
+
msgstr "Add-ons for All In One Event Calendar"
|
525 |
+
|
526 |
+
#: app/view/admin/add-ons.php:71
|
527 |
+
msgid "Browse All Extensions"
|
528 |
+
msgstr "Browse All Extensions"
|
529 |
+
|
530 |
+
#: app/view/admin/add-ons.php:74
|
531 |
+
msgid ""
|
532 |
+
"These add-ons extend the functionality of the All-in-One Event Calendar."
|
533 |
+
msgstr ""
|
534 |
+
"These add-ons extend the functionality of the All-in-One Event Calendar."
|
535 |
+
|
536 |
+
#: app/view/admin/add-ons.php:77
|
537 |
+
msgid ""
|
538 |
+
"There was an error retrieving the extensions list from the server. Please "
|
539 |
+
"try again later."
|
540 |
+
msgstr ""
|
541 |
+
"There was an error retrieving the extensions list from the server. Please "
|
542 |
+
"try again later."
|
543 |
+
|
544 |
#: app/view/admin/all-events.php:16
|
545 |
msgid "Author"
|
546 |
msgstr "Author"
|
715 |
msgid "All-in-One Event Calendar: Settings"
|
716 |
msgstr "All-in-One Event Calendar: Settings"
|
717 |
|
718 |
+
#: app/view/admin/settings.php:65 app/view/admin/settings.php:66
|
719 |
#: lib/date/timezone.php:366
|
720 |
msgid "Settings"
|
721 |
msgstr "Settings"
|
722 |
|
723 |
+
#: app/view/admin/settings.php:86
|
724 |
msgctxt "meta box"
|
725 |
msgid "General Settings"
|
726 |
msgstr "General Settings"
|
727 |
|
728 |
+
#: app/view/admin/settings.php:95
|
729 |
msgctxt "meta box"
|
730 |
msgid "Timely"
|
731 |
msgstr "Timely"
|
732 |
|
733 |
+
#: app/view/admin/settings.php:137
|
734 |
msgid "Viewing Events"
|
735 |
msgstr "Viewing Events"
|
736 |
|
737 |
+
#: app/view/admin/settings.php:140
|
738 |
msgid "Adding/Editing Events"
|
739 |
msgstr "Adding/Editing Events"
|
740 |
|
741 |
+
#: app/view/admin/settings.php:143
|
742 |
msgid "Advanced"
|
743 |
msgstr "Advanced"
|
744 |
|
745 |
+
#: app/view/admin/settings.php:145
|
746 |
msgid "Advanced Settings"
|
747 |
msgstr "Advanced Settings"
|
748 |
|
749 |
+
#: app/view/admin/settings.php:146
|
750 |
msgid "Shortcodes"
|
751 |
msgstr "Shortcodes"
|
752 |
|
753 |
+
#: app/view/admin/settings.php:147
|
754 |
msgid "Email Templates"
|
755 |
msgstr "Email Templates"
|
756 |
|
757 |
+
#: app/view/admin/settings.php:148
|
758 |
msgid "External Services"
|
759 |
msgstr "External Services"
|
760 |
|
761 |
+
#: app/view/admin/settings.php:149
|
762 |
msgid "Cache Report"
|
763 |
msgstr "Cache Report"
|
764 |
|
765 |
+
#: app/view/admin/settings.php:167
|
766 |
#: public/admin/plugins/ics/display_feeds.php:24
|
767 |
msgid "Save Settings"
|
768 |
msgstr "Save Settings"
|
769 |
|
770 |
+
#: app/view/admin/settings.php:174
|
771 |
msgid ""
|
772 |
"If the form below is not working please follow <a href=\"%s\">this link</a>."
|
773 |
msgstr ""
|
826 |
msgid "All-in-One Event Calendar: Themes"
|
827 |
msgstr "All-in-One Event Calendar: Themes"
|
828 |
|
829 |
+
#: app/view/admin/widget-creator.php:24 app/view/admin/widget-creator.php:25
|
830 |
+
#: app/view/admin/widget-creator.php:47
|
831 |
+
msgid "Widget Creator"
|
832 |
+
msgstr "Widget Creator"
|
833 |
+
|
834 |
+
#: app/view/admin/widget-creator.php:74
|
835 |
+
msgctxt "meta box"
|
836 |
+
msgid "Widget Creator"
|
837 |
+
msgstr "Widget Creator"
|
838 |
+
|
839 |
+
#: app/view/admin/widget-creator.php:130
|
840 |
+
msgid ""
|
841 |
+
"Use this tool to generate code snippets you can place on your site to embed "
|
842 |
+
"new calendars and widgets."
|
843 |
+
msgstr ""
|
844 |
+
"Use this tool to generate code snippets you can place on your site to embed "
|
845 |
+
"new calendars and widgets."
|
846 |
+
|
847 |
+
#: app/view/admin/widget-creator.php:132
|
848 |
+
msgid "Full Calendar"
|
849 |
+
msgstr "Full Calendar"
|
850 |
+
|
851 |
+
#: app/view/admin/widget-creator.php:133
|
852 |
+
msgid "Paste this code onto your site:"
|
853 |
+
msgstr "Paste this code onto your site:"
|
854 |
+
|
855 |
+
#: app/view/admin/widget-creator.php:134
|
856 |
+
msgid ""
|
857 |
+
"This code will update to reflect changes made to the settings. Changing "
|
858 |
+
"settings will not affect previously embedded widgets."
|
859 |
+
msgstr ""
|
860 |
+
"This code will update to reflect changes made to the settings. Changing "
|
861 |
+
"settings will not affect previously embedded widgets."
|
862 |
+
|
863 |
+
#: app/view/calendar/page.php:49
|
864 |
msgid ""
|
865 |
"There was an error loading calendar. Please contact site administrator and "
|
866 |
"inform him to configure calendar views."
|
868 |
"There was an error loading calendar. Please contact site administrator and "
|
869 |
"inform him to configure calendar views."
|
870 |
|
871 |
+
#: app/view/calendar/page.php:214
|
872 |
msgid "Subscribe to filtered calendar"
|
873 |
msgstr "Subscribe to filtered calendar"
|
874 |
|
875 |
+
#: app/view/calendar/page.php:215
|
876 |
msgid "Subscribe"
|
877 |
msgstr "Subscribe"
|
878 |
|
928 |
msgid "Clear category filter"
|
929 |
msgstr "Clear category filter"
|
930 |
|
931 |
+
#: app/view/calendar/taxonomy.php:98 app/view/event/single.php:106
|
932 |
#: lib/html/element/setting/tags-categories.php:47
|
933 |
msgid "Categories"
|
934 |
msgstr "Categories"
|
937 |
msgid "Clear tag filter"
|
938 |
msgstr "Clear tag filter"
|
939 |
|
940 |
+
#: app/view/calendar/taxonomy.php:100 app/view/event/single.php:107
|
941 |
#: lib/html/element/setting/tags-categories.php:39
|
942 |
msgid "Tags"
|
943 |
msgstr "Tags"
|
944 |
|
945 |
+
#: app/view/calendar/view/agenda.php:113
|
946 |
msgid "Collapse All"
|
947 |
msgstr "Collapse All"
|
948 |
|
949 |
+
#: app/view/calendar/view/agenda.php:114
|
950 |
msgid "Expand All"
|
951 |
msgstr "Expand All"
|
952 |
|
953 |
+
#: app/view/calendar/view/agenda.php:137
|
954 |
msgid "There are no upcoming events to display at this time."
|
955 |
msgstr "There are no upcoming events to display at this time."
|
956 |
|
957 |
+
#: app/view/calendar/view/agenda.php:138 app/view/calendar/widget.php:363
|
958 |
msgid "Edit"
|
959 |
msgstr "Edit"
|
960 |
|
961 |
+
#: app/view/calendar/view/agenda.php:139
|
962 |
msgid "Read more"
|
963 |
msgstr "Read more"
|
964 |
|
965 |
+
#: app/view/calendar/view/agenda.php:140
|
966 |
msgid "Categories:"
|
967 |
msgstr "Categories:"
|
968 |
|
969 |
+
#: app/view/calendar/view/agenda.php:141 lib/theme/list.php:323
|
970 |
#: public/admin/themes.php:29
|
971 |
msgid "Tags:"
|
972 |
msgstr "Tags:"
|
973 |
|
974 |
+
#: app/view/calendar/view/agenda.php:142 app/view/calendar/view/month.php:82
|
975 |
+
#: app/view/calendar/view/oneday.php:102 app/view/calendar/view/week.php:113
|
976 |
+
#: app/view/calendar/widget.php:364
|
977 |
msgid "@ %s"
|
978 |
msgstr "@ %s"
|
979 |
|
980 |
+
#: app/view/calendar/view/oneday.php:75 app/view/calendar/view/week.php:67
|
981 |
msgid "g a"
|
982 |
msgstr "g a"
|
983 |
|
984 |
+
#: app/view/calendar/view/oneday.php:99 app/view/calendar/view/week.php:110
|
985 |
msgid "Reveal full day"
|
986 |
msgstr "Reveal full day"
|
987 |
|
988 |
+
#: app/view/calendar/view/oneday.php:100 app/view/calendar/view/week.php:111
|
989 |
msgid "All-day"
|
990 |
msgstr "All-day"
|
991 |
|
992 |
+
#: app/view/calendar/view/oneday.php:101 app/view/calendar/view/week.php:112
|
993 |
msgid "Now:"
|
994 |
msgstr "Now:"
|
995 |
|
996 |
+
#: app/view/calendar/view/week.php:61
|
997 |
msgid "Week of %s"
|
998 |
msgstr "Week of %s"
|
999 |
|
1000 |
+
#: app/view/calendar/widget.php:36 app/view/calendar/widget.php:56
|
1001 |
msgid "Upcoming Events"
|
1002 |
msgstr "Upcoming Events"
|
1003 |
|
1004 |
+
#: app/view/calendar/widget.php:38
|
1005 |
msgid "All-in-One Event Calendar: Lists upcoming events in Agenda view"
|
1006 |
msgstr "All-in-One Event Calendar: Lists upcoming events in Agenda view"
|
1007 |
|
1008 |
+
#: app/view/calendar/widget.php:80
|
1009 |
+
msgid "Choose how to limit the upcoming events"
|
1010 |
+
msgstr "Choose how to limit the upcoming events"
|
1011 |
+
|
1012 |
+
#: app/view/calendar/widget.php:86 lib/post/custom-type.php:37
|
1013 |
+
msgid "Events"
|
1014 |
+
msgstr "Events"
|
1015 |
+
|
1016 |
+
#: app/view/calendar/widget.php:93
|
1017 |
+
msgid "Days"
|
1018 |
+
msgstr "Days"
|
1019 |
+
|
1020 |
+
#: app/view/calendar/widget.php:106
|
1021 |
+
msgid "Number of events to show"
|
1022 |
+
msgstr "Number of events to show"
|
1023 |
+
|
1024 |
+
#: app/view/calendar/widget.php:115
|
1025 |
+
msgid "Number of days to show"
|
1026 |
+
msgstr "Number of days to show"
|
1027 |
+
|
1028 |
+
#: app/view/calendar/widget.php:124
|
1029 |
+
msgid "Show events filtered for the following tags/categories"
|
1030 |
+
msgstr "Show events filtered for the following tags/categories"
|
1031 |
+
|
1032 |
+
#: app/view/calendar/widget.php:141
|
1033 |
+
msgid "Show the subscribe button in the widget"
|
1034 |
+
msgstr "Show the subscribe button in the widget"
|
1035 |
+
|
1036 |
+
#: app/view/calendar/widget.php:360
|
1037 |
msgid "There are no upcoming events."
|
1038 |
msgstr "There are no upcoming events."
|
1039 |
|
1040 |
+
#: app/view/calendar/widget.php:361 app/view/event/time.php:131
|
1041 |
msgid "all-day"
|
1042 |
msgstr "all-day"
|
1043 |
|
1044 |
+
#: app/view/calendar/widget.php:362
|
1045 |
msgid "View Calendar"
|
1046 |
msgstr "View Calendar"
|
1047 |
|
1048 |
+
#: app/view/calendar/widget.php:365
|
1049 |
msgid "Add"
|
1050 |
msgstr "Add"
|
1051 |
|
1052 |
+
#: app/view/event/content.php:33 app/view/event/single.php:101
|
1053 |
msgid "When:"
|
1054 |
msgstr "When:"
|
1055 |
|
1056 |
+
#: app/view/event/content.php:34 app/view/event/single.php:102
|
1057 |
msgid "Where:"
|
1058 |
msgstr "Where:"
|
1059 |
|
1124 |
msgstr ""
|
1125 |
"Event draft updated. <a target=\"_blank\" href=\"%s\">Preview event</a>"
|
1126 |
|
1127 |
+
#: app/view/event/single.php:65
|
1128 |
+
msgid "Event was created in the %s time zone"
|
1129 |
+
msgstr "Event was created in the %s time zone"
|
1130 |
+
|
1131 |
+
#: app/view/event/single.php:97
|
1132 |
msgid "Add to Calendar"
|
1133 |
msgstr "Add to Calendar"
|
1134 |
|
1135 |
+
#: app/view/event/single.php:103
|
1136 |
msgid "Cost:"
|
1137 |
msgstr "Cost:"
|
1138 |
|
1139 |
+
#: app/view/event/single.php:104
|
1140 |
msgid "Contact:"
|
1141 |
msgstr "Contact:"
|
1142 |
|
1143 |
+
#: app/view/event/single.php:105
|
1144 |
msgid "Free"
|
1145 |
msgstr "Free"
|
1146 |
|
1147 |
+
#: app/view/event/single.php:122
|
1148 |
msgid "Edit this occurrence (%s)"
|
1149 |
msgstr "Edit this occurrence (%s)"
|
1150 |
|
1151 |
+
#: app/view/event/single.php:140
|
1152 |
msgid ""
|
1153 |
"This post was replicated from another site's <a class=\"ai1ec-ics-icon\" "
|
1154 |
"href=\"%s\" title=\"iCalendar feed\">calendar feed</a>."
|
1156 |
"This post was replicated from another site's <a class=\"ai1ec-ics-icon\" "
|
1157 |
"href=\"%s\" title=\"iCalendar feed\">calendar feed</a>."
|
1158 |
|
1159 |
+
#: app/view/event/single.php:141
|
1160 |
msgid "View original post"
|
1161 |
msgstr "View original post"
|
1162 |
|
1210 |
msgid "Another import process in progress. Please try again later."
|
1211 |
msgstr "Another import process in progress. Please try again later."
|
1212 |
|
1213 |
+
#: lib/calendar-feed/ics.php:173
|
1214 |
msgid ""
|
1215 |
"A system error has prevented calendar data from being fetched. Something is "
|
1216 |
"preventing the plugin from functioning correctly. This message should "
|
1220 |
"preventing the plugin from functioning correctly. This message should "
|
1221 |
"provide a clue: %s"
|
1222 |
|
1223 |
+
#: lib/calendar-feed/ics.php:180
|
1224 |
msgid ""
|
1225 |
"Calendar data could not be fetched. If your URL is valid and contains an "
|
1226 |
"iCalendar resource, this is likely the result of a temporary server error "
|
1230 |
"iCalendar resource, this is likely the result of a temporary server error "
|
1231 |
"and time may resolve this issue"
|
1232 |
|
1233 |
+
#: lib/calendar-feed/ics.php:190
|
1234 |
msgid "No events were found"
|
1235 |
msgstr "No events were found"
|
1236 |
|
1237 |
+
#: lib/calendar-feed/ics.php:199
|
1238 |
msgid "Imported %s event"
|
1239 |
msgid_plural "Imported %s events"
|
1240 |
msgstr[0] "Imported %s event"
|
1241 |
msgstr[1] "Imported %s events"
|
1242 |
|
1243 |
+
#: lib/calendar-feed/ics.php:205 lib/calendar-feed/ics.php:654
|
1244 |
msgid "Invalid ICS feed ID"
|
1245 |
msgstr "Invalid ICS feed ID"
|
1246 |
|
1247 |
+
#: lib/calendar-feed/ics.php:348
|
1248 |
msgid "Categories (optional)"
|
1249 |
msgstr "Categories (optional)"
|
1250 |
|
1251 |
+
#: lib/calendar-feed/ics.php:365
|
1252 |
msgid ""
|
1253 |
"Do you want to keep the events imported from the calendar or remove them?"
|
1254 |
msgstr ""
|
1255 |
"Do you want to keep the events imported from the calendar or remove them?"
|
1256 |
|
1257 |
+
#: lib/calendar-feed/ics.php:371
|
1258 |
msgid "Removing ICS Feed"
|
1259 |
msgstr "Removing ICS Feed"
|
1260 |
|
1261 |
+
#: lib/calendar-feed/ics.php:374
|
1262 |
msgid "Keep Events"
|
1263 |
msgstr "Keep Events"
|
1264 |
|
1265 |
+
#: lib/calendar-feed/ics.php:377
|
1266 |
msgid "Remove Events"
|
1267 |
msgstr "Remove Events"
|
1268 |
|
1269 |
+
#: lib/calendar-feed/ics.php:646
|
1270 |
msgid "Deleted %d events"
|
1271 |
msgstr "Deleted %d events"
|
1272 |
|
1273 |
+
#: lib/calendar-feed/ics.php:681
|
1274 |
msgid "Feed deleted"
|
1275 |
msgstr "Feed deleted"
|
1276 |
|
1301 |
msgid "Clone to Draft"
|
1302 |
msgstr "Clone to Draft"
|
1303 |
|
1304 |
+
#: lib/command/clone.php:166
|
1305 |
msgid ""
|
1306 |
"<p>The event <strong>%s</strong> was cloned succesfully. <a href=\"%s\">Edit "
|
1307 |
"cloned event</a></p>"
|
1309 |
"<p>The event <strong>%s</strong> was cloned succesfully. <a href=\"%s\">Edit "
|
1310 |
"cloned event</a></p>"
|
1311 |
|
1312 |
+
#: lib/css/frontend.php:232
|
1313 |
msgid ""
|
1314 |
"The LESS file compiled correctly but there was an error while saving the "
|
1315 |
"generated CSS to persistence."
|
1317 |
"The LESS file compiled correctly but there was an error while saving the "
|
1318 |
"generated CSS to persistence."
|
1319 |
|
1320 |
+
#: lib/css/frontend.php:238
|
1321 |
msgid ""
|
1322 |
"<p><strong>There was an error while compiling CSS.</strong> The message "
|
1323 |
"returned was: <em>%s</em></p>"
|
1325 |
"<p><strong>There was an error while compiling CSS.</strong> The message "
|
1326 |
"returned was: <em>%s</em></p>"
|
1327 |
|
1328 |
+
#: lib/css/frontend.php:266
|
1329 |
msgid ""
|
1330 |
"Theme options were successfully reset to their default values. <a "
|
1331 |
"href='%s'>Visit site</a>"
|
1333 |
"Theme options were successfully reset to their default values. <a "
|
1334 |
"href='%s'>Visit site</a>"
|
1335 |
|
1336 |
+
#: lib/css/frontend.php:273
|
1337 |
msgid "Theme options were updated successfully. <a href='%s'>Visit site</a>"
|
1338 |
msgstr "Theme options were updated successfully. <a href='%s'>Visit site</a>"
|
1339 |
|
1340 |
+
#: lib/css/frontend.php:309
|
1341 |
msgid ""
|
1342 |
"Your CSS is being compiled on every request, which causes your calendar to "
|
1343 |
"perform slowly. The following error occurred: %s"
|
1383 |
msgid "Selected timezone \"UTC%+d\" will be treated as %s."
|
1384 |
msgstr "Selected timezone \"UTC%+d\" will be treated as %s."
|
1385 |
|
1386 |
+
#: lib/date/timezone.php:490
|
1387 |
msgid "Manual Offset"
|
1388 |
msgstr "Manual Offset"
|
1389 |
|
1390 |
+
#: lib/date/timezone.php:493
|
1391 |
msgid "Choose your timezone"
|
1392 |
msgstr "Choose your timezone"
|
1393 |
|
1394 |
+
#: lib/environment/check.php:53
|
1395 |
msgid "Select an option in the <strong>Calendar page</strong> dropdown list."
|
1396 |
msgstr "Select an option in the <strong>Calendar page</strong> dropdown list."
|
1397 |
|
1398 |
+
#: lib/environment/check.php:66
|
1399 |
msgid ""
|
1400 |
"The plugin is installed, but has not been configured. <a href=\"%s\">Click "
|
1401 |
"here to set it up now »</a>"
|
1403 |
"The plugin is installed, but has not been configured. <a href=\"%s\">Click "
|
1404 |
"here to set it up now »</a>"
|
1405 |
|
1406 |
+
#: lib/environment/check.php:76
|
1407 |
msgid ""
|
1408 |
"The plugin is installed, but has not been configured. Please log in as an "
|
1409 |
"Administrator to set it up."
|
1411 |
"The plugin is installed, but has not been configured. Please log in as an "
|
1412 |
"Administrator to set it up."
|
1413 |
|
1414 |
+
#: lib/environment/check.php:192
|
1415 |
+
msgid "Addon %s needs to be at least in version %s"
|
1416 |
+
msgstr "Addon %s needs to be at least in version %s"
|
1417 |
+
|
1418 |
#: lib/exception/handler.php:176
|
1419 |
msgid "Disabled add-on \"%s\" due to an error"
|
1420 |
msgstr "Disabled add-on \"%s\" due to an error"
|
1621 |
msgid "Custom..."
|
1622 |
msgstr "Custom..."
|
1623 |
|
1624 |
+
#: lib/less/variable/font.php:112
|
1625 |
msgid "Enter custom font(s)"
|
1626 |
msgstr "Enter custom font(s)"
|
1627 |
|
1629 |
msgid "Length"
|
1630 |
msgstr "Length"
|
1631 |
|
1632 |
+
#: lib/notification/admin.php:180
|
1633 |
msgid "All-in-One Event Calendar"
|
1634 |
msgstr "All-in-One Event Calendar"
|
1635 |
|
1679 |
msgid "Parent Event"
|
1680 |
msgstr "Parent Event"
|
1681 |
|
|
|
|
|
|
|
|
|
1682 |
#: lib/post/custom-type.php:55
|
1683 |
msgid "event"
|
1684 |
msgstr "event"
|
2722 |
msgid "All-in-One Event Calendar by Time.ly"
|
2723 |
msgstr "All-in-One Event Calendar by Time.ly"
|
2724 |
|
2725 |
+
#. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.1.6) #-#-#-#-#
|
2726 |
#. Plugin URI of the plugin/theme
|
2727 |
+
#. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.1.6) #-#-#-#-#
|
2728 |
#. Author URI of the plugin/theme
|
2729 |
msgid "http://time.ly/"
|
2730 |
msgstr "http://time.ly/"
|
language/all-in-one-event-calendar.pot
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
# This file is distributed under the same license as the All-in-One Event Calendar by Time.ly package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
-
"Project-Id-Version: All-in-One Event Calendar by Time.ly 2.1.
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-event-calendar\n"
|
7 |
-
"POT-Creation-Date: 2014-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -12,7 +12,8 @@ msgstr ""
|
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
-
#: app/controller/extension-license.php:54
|
|
|
16 |
msgid "Add-ons"
|
17 |
msgstr ""
|
18 |
|
@@ -24,91 +25,118 @@ msgstr ""
|
|
24 |
msgid "Licences"
|
25 |
msgstr ""
|
26 |
|
27 |
-
#: app/controller/front.php:
|
28 |
msgid ""
|
29 |
"Your active calendar theme could not be properly initialized. The default "
|
30 |
"theme has been activated instead. Please visit %s and try reactivating your "
|
31 |
"theme manually."
|
32 |
msgstr ""
|
33 |
|
34 |
-
#: app/controller/front.php:
|
35 |
#: app/view/admin/theme-switching.php:55
|
36 |
msgid "Calendar Themes"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: app/controller/front.php:
|
40 |
msgid ""
|
41 |
"Your database is found to be corrupt. Likely previous update has failed. "
|
42 |
"Please restore All-in-One Event Calendar tables from a backup and retry."
|
43 |
"<br>Following errors were found:<br>%s"
|
44 |
msgstr ""
|
45 |
|
46 |
-
#: app/controller/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
msgid "This feed is already being imported."
|
48 |
msgstr ""
|
49 |
|
50 |
-
#: app/controller/javascript.php:
|
51 |
msgid "Please enter a valid iCalendar URL."
|
52 |
msgstr ""
|
53 |
|
54 |
-
#: app/controller/javascript.php:
|
55 |
msgid "Please enter a valid email address."
|
56 |
msgstr ""
|
57 |
|
58 |
-
#: app/controller/javascript.php:
|
59 |
msgid "Choose Image"
|
60 |
msgstr ""
|
61 |
|
62 |
-
#: app/controller/javascript.php:
|
63 |
msgid "The value you have entered is not a valid CSS length."
|
64 |
msgstr ""
|
65 |
|
66 |
-
#: app/controller/javascript.php:
|
67 |
msgid ""
|
68 |
"Are you sure you want to reset your theme options to their default values?"
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: app/controller/javascript.php:
|
72 |
msgid ""
|
73 |
"Please enter a valid latitude. A valid latitude is comprised between +90 and "
|
74 |
"-90."
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: app/controller/javascript.php:
|
78 |
msgid ""
|
79 |
"Please enter a valid longitude. A valid longitude is comprised between +180 "
|
80 |
"and -180."
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: app/controller/javascript.php:
|
84 |
msgid ""
|
85 |
"When the \"Input coordinates\" checkbox is checked, \"Latitude\" is a "
|
86 |
"required field."
|
87 |
msgstr ""
|
88 |
|
89 |
-
#: app/controller/javascript.php:
|
90 |
msgid ""
|
91 |
"When the \"Input coordinates\" checkbox is checked, \"Longitude\" is a "
|
92 |
"required field."
|
93 |
msgstr ""
|
94 |
|
95 |
-
#: app/controller/javascript.php:
|
96 |
msgid ""
|
97 |
"The URL you have entered in the <b>Organizer Contact Info</b> > "
|
98 |
"<b>External URL</b> seems to be invalid."
|
99 |
msgstr ""
|
100 |
|
101 |
-
#: app/controller/javascript.php:
|
102 |
msgid ""
|
103 |
"The URL you have entered in the <b>Event Cost and Tickets</b> > <b>Buy "
|
104 |
"Tickets URL</b> seems to be invalid."
|
105 |
msgstr ""
|
106 |
|
107 |
-
#: app/controller/javascript.php:
|
108 |
msgid ""
|
109 |
"Please remember that URLs must start with either \"http://\" or \"https://\"."
|
110 |
msgstr ""
|
111 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
#: app/model/event/parent.php:186
|
113 |
msgid "Edit “%s”"
|
114 |
msgstr ""
|
@@ -117,44 +145,44 @@ msgstr ""
|
|
117 |
msgid "Base Event"
|
118 |
msgstr ""
|
119 |
|
120 |
-
#: app/model/settings.php:
|
121 |
#: lib/html/element/setting/calendar-page-selector.php:50
|
122 |
msgid "Calendar page"
|
123 |
msgstr ""
|
124 |
|
125 |
-
#: app/model/settings.php:
|
126 |
msgid "Week starts on"
|
127 |
msgstr ""
|
128 |
|
129 |
-
#: app/model/settings.php:
|
130 |
msgid "Available views"
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: app/model/settings.php:
|
134 |
msgid "Agenda"
|
135 |
msgid_plural "Agenda"
|
136 |
msgstr[0] ""
|
137 |
msgstr[1] ""
|
138 |
|
139 |
-
#: app/model/settings.php:
|
140 |
msgid "Day"
|
141 |
msgid_plural "Day"
|
142 |
msgstr[0] ""
|
143 |
msgstr[1] ""
|
144 |
|
145 |
-
#: app/model/settings.php:
|
146 |
msgid "Month"
|
147 |
msgid_plural "Month"
|
148 |
msgstr[0] ""
|
149 |
msgstr[1] ""
|
150 |
|
151 |
-
#: app/model/settings.php:
|
152 |
msgid "Week"
|
153 |
msgid_plural "Week"
|
154 |
msgstr[0] ""
|
155 |
msgstr[1] ""
|
156 |
|
157 |
-
#: app/model/settings.php:
|
158 |
msgid "Timezone"
|
159 |
msgstr ""
|
160 |
|
@@ -162,7 +190,7 @@ msgstr ""
|
|
162 |
msgid "Preselected calendar filters"
|
163 |
msgstr ""
|
164 |
|
165 |
-
#: app/model/settings.php:437
|
166 |
msgid ""
|
167 |
"To clear, hold ⌘/<abbr class=\"initialism\">CTRL</abbr> and click "
|
168 |
"selection."
|
@@ -233,87 +261,91 @@ msgid ""
|
|
233 |
"view"
|
234 |
msgstr ""
|
235 |
|
236 |
-
#: app/model/settings.php:
|
|
|
|
|
|
|
|
|
237 |
msgid "Offset affixed filter bar vertically by"
|
238 |
msgstr ""
|
239 |
|
240 |
-
#: app/model/settings.php:
|
241 |
msgid "Wide screens only (≥ 1200px)"
|
242 |
msgstr ""
|
243 |
|
244 |
-
#: app/model/settings.php:
|
245 |
msgid "Tablets only (< 980px)"
|
246 |
msgstr ""
|
247 |
|
248 |
-
#: app/model/settings.php:
|
249 |
msgid "Phones only (< 768px)"
|
250 |
msgstr ""
|
251 |
|
252 |
-
#: app/model/settings.php:
|
253 |
msgid "Strict compatibility content filtering"
|
254 |
msgstr ""
|
255 |
|
256 |
-
#: app/model/settings.php:
|
257 |
msgid " <strong>Hide featured image</strong> from event details page"
|
258 |
msgstr ""
|
259 |
|
260 |
-
#: app/model/settings.php:
|
261 |
msgid ""
|
262 |
"Select this option if your theme already displays each post's featured image."
|
263 |
msgstr ""
|
264 |
|
265 |
-
#: app/model/settings.php:
|
266 |
msgid "Input dates in this format"
|
267 |
msgstr ""
|
268 |
|
269 |
-
#: app/model/settings.php:
|
270 |
msgid "Default (d/m/yyyy)"
|
271 |
msgstr ""
|
272 |
|
273 |
-
#: app/model/settings.php:
|
274 |
msgid "US (m/d/yyyy)"
|
275 |
msgstr ""
|
276 |
|
277 |
-
#: app/model/settings.php:
|
278 |
msgid "ISO 8601 (yyyy-m-d)"
|
279 |
msgstr ""
|
280 |
|
281 |
-
#: app/model/settings.php:
|
282 |
msgid "Dotted (m.d.yyyy)"
|
283 |
msgstr ""
|
284 |
|
285 |
-
#: app/model/settings.php:
|
286 |
msgid " Use <strong>24h time</strong> in time pickers"
|
287 |
msgstr ""
|
288 |
|
289 |
-
#: app/model/settings.php:
|
290 |
msgid "<strong>Disable address autocomplete</strong> function"
|
291 |
msgstr ""
|
292 |
|
293 |
-
#: app/model/settings.php:
|
294 |
msgid ""
|
295 |
"Use the configured <strong>region</strong> (WordPress locale) to bias the "
|
296 |
"address autocomplete function "
|
297 |
msgstr ""
|
298 |
|
299 |
-
#: app/model/settings.php:
|
300 |
msgid ""
|
301 |
" Show the old <strong>Post Your Event</strong> button above the calendar to "
|
302 |
"privileged users"
|
303 |
msgstr ""
|
304 |
|
305 |
-
#: app/model/settings.php:
|
306 |
msgid ""
|
307 |
"Install the <a target=\"_blank\" href=\"http://time.ly/\">Interactive "
|
308 |
"Frontend Extension</a> for the <strong>frontend Post Your Event form</"
|
309 |
"strong>."
|
310 |
msgstr ""
|
311 |
|
312 |
-
#: app/model/settings.php:
|
313 |
msgid "Move calendar into this DOM element"
|
314 |
msgstr ""
|
315 |
|
316 |
-
#: app/model/settings.php:
|
317 |
msgid ""
|
318 |
"Optional. Use this JavaScript-based shortcut to place the\n"
|
319 |
"\t\t\t\t\t\tcalendar a DOM element other than the usual page content "
|
@@ -327,47 +359,47 @@ msgid ""
|
|
327 |
"\t\t\t\t\t\tby the calendar."
|
328 |
msgstr ""
|
329 |
|
330 |
-
#: app/model/settings.php:
|
331 |
msgid ""
|
332 |
"<strong>Skip <tt>in_the_loop()</tt> check </strong> that protects against "
|
333 |
"multiple calendar output"
|
334 |
msgstr ""
|
335 |
|
336 |
-
#: app/model/settings.php:
|
337 |
msgid ""
|
338 |
"Try enabling this option if your calendar does not appear on the calendar "
|
339 |
"page. It is needed for compatibility with a small number of themes that call "
|
340 |
"<tt>the_content()</tt> from outside of The Loop. Leave disabled otherwise."
|
341 |
msgstr ""
|
342 |
|
343 |
-
#: app/model/settings.php:
|
344 |
msgid "Disable <strong>gzip</strong> compression."
|
345 |
msgstr ""
|
346 |
|
347 |
-
#: app/model/settings.php:
|
348 |
msgid ""
|
349 |
"Use this option if calendar is unresponsive. <a href=\"http://support.time."
|
350 |
"ly/disable-gzip-compression/\">Read more</a> about the issue. (From version "
|
351 |
"2.1 onwards, gzip is disabled by default for maximum compatibility.)"
|
352 |
msgstr ""
|
353 |
|
354 |
-
#: app/model/settings.php:
|
355 |
msgid ""
|
356 |
"<strong>Link CSS</strong> in <code><head></code> section when file "
|
357 |
"cache is unavailable."
|
358 |
msgstr ""
|
359 |
|
360 |
-
#: app/model/settings.php:
|
361 |
msgid ""
|
362 |
"Use this option if file cache is unavailable and you would prefer to serve "
|
363 |
"CSS as a link rather than have it output inline."
|
364 |
msgstr ""
|
365 |
|
366 |
-
#: app/model/settings.php:
|
367 |
msgid "Current <strong>robots.txt</strong> on this site"
|
368 |
msgstr ""
|
369 |
|
370 |
-
#: app/model/settings.php:
|
371 |
msgid ""
|
372 |
"The Robot Exclusion Standard, also known as the Robots Exclusion Protocol "
|
373 |
"or\n"
|
@@ -381,13 +413,13 @@ msgid ""
|
|
381 |
"your root WordPress directory."
|
382 |
msgstr ""
|
383 |
|
384 |
-
#: app/model/settings.php:
|
385 |
msgid ""
|
386 |
"<strong>Publicize, promote, and share my events</strong> marked as public on "
|
387 |
"the Timely network. (<a href=\"%s\" target=\"_blank\">Learn more »</a>)"
|
388 |
msgstr ""
|
389 |
|
390 |
-
#: app/model/settings.php:
|
391 |
msgid "Templates cache improves site performance"
|
392 |
msgstr ""
|
393 |
|
@@ -395,6 +427,37 @@ msgstr ""
|
|
395 |
msgid "Event Details"
|
396 |
msgstr ""
|
397 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
398 |
#: app/view/admin/all-events.php:16
|
399 |
msgid "Author"
|
400 |
msgstr ""
|
@@ -567,59 +630,59 @@ msgstr ""
|
|
567 |
msgid "All-in-One Event Calendar: Settings"
|
568 |
msgstr ""
|
569 |
|
570 |
-
#: app/view/admin/settings.php:
|
571 |
#: lib/date/timezone.php:366
|
572 |
msgid "Settings"
|
573 |
msgstr ""
|
574 |
|
575 |
-
#: app/view/admin/settings.php:
|
576 |
msgctxt "meta box"
|
577 |
msgid "General Settings"
|
578 |
msgstr ""
|
579 |
|
580 |
-
#: app/view/admin/settings.php:
|
581 |
msgctxt "meta box"
|
582 |
msgid "Timely"
|
583 |
msgstr ""
|
584 |
|
585 |
-
#: app/view/admin/settings.php:
|
586 |
msgid "Viewing Events"
|
587 |
msgstr ""
|
588 |
|
589 |
-
#: app/view/admin/settings.php:
|
590 |
msgid "Adding/Editing Events"
|
591 |
msgstr ""
|
592 |
|
593 |
-
#: app/view/admin/settings.php:
|
594 |
msgid "Advanced"
|
595 |
msgstr ""
|
596 |
|
597 |
-
#: app/view/admin/settings.php:
|
598 |
msgid "Advanced Settings"
|
599 |
msgstr ""
|
600 |
|
601 |
-
#: app/view/admin/settings.php:
|
602 |
msgid "Shortcodes"
|
603 |
msgstr ""
|
604 |
|
605 |
-
#: app/view/admin/settings.php:
|
606 |
msgid "Email Templates"
|
607 |
msgstr ""
|
608 |
|
609 |
-
#: app/view/admin/settings.php:
|
610 |
msgid "External Services"
|
611 |
msgstr ""
|
612 |
|
613 |
-
#: app/view/admin/settings.php:
|
614 |
msgid "Cache Report"
|
615 |
msgstr ""
|
616 |
|
617 |
-
#: app/view/admin/settings.php:
|
618 |
#: public/admin/plugins/ics/display_feeds.php:24
|
619 |
msgid "Save Settings"
|
620 |
msgstr ""
|
621 |
|
622 |
-
#: app/view/admin/settings.php:
|
623 |
msgid ""
|
624 |
"If the form below is not working please follow <a href=\"%s\">this link</a>."
|
625 |
msgstr ""
|
@@ -677,17 +740,47 @@ msgstr ""
|
|
677 |
msgid "All-in-One Event Calendar: Themes"
|
678 |
msgstr ""
|
679 |
|
680 |
-
#: app/view/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
681 |
msgid ""
|
682 |
"There was an error loading calendar. Please contact site administrator and "
|
683 |
"inform him to configure calendar views."
|
684 |
msgstr ""
|
685 |
|
686 |
-
#: app/view/calendar/page.php:
|
687 |
msgid "Subscribe to filtered calendar"
|
688 |
msgstr ""
|
689 |
|
690 |
-
#: app/view/calendar/page.php:
|
691 |
msgid "Subscribe"
|
692 |
msgstr ""
|
693 |
|
@@ -741,7 +834,7 @@ msgstr ""
|
|
741 |
msgid "Clear category filter"
|
742 |
msgstr ""
|
743 |
|
744 |
-
#: app/view/calendar/taxonomy.php:98 app/view/event/single.php:
|
745 |
#: lib/html/element/setting/tags-categories.php:47
|
746 |
msgid "Categories"
|
747 |
msgstr ""
|
@@ -750,95 +843,123 @@ msgstr ""
|
|
750 |
msgid "Clear tag filter"
|
751 |
msgstr ""
|
752 |
|
753 |
-
#: app/view/calendar/taxonomy.php:100 app/view/event/single.php:
|
754 |
#: lib/html/element/setting/tags-categories.php:39
|
755 |
msgid "Tags"
|
756 |
msgstr ""
|
757 |
|
758 |
-
#: app/view/calendar/view/agenda.php:
|
759 |
msgid "Collapse All"
|
760 |
msgstr ""
|
761 |
|
762 |
-
#: app/view/calendar/view/agenda.php:
|
763 |
msgid "Expand All"
|
764 |
msgstr ""
|
765 |
|
766 |
-
#: app/view/calendar/view/agenda.php:
|
767 |
msgid "There are no upcoming events to display at this time."
|
768 |
msgstr ""
|
769 |
|
770 |
-
#: app/view/calendar/view/agenda.php:
|
771 |
msgid "Edit"
|
772 |
msgstr ""
|
773 |
|
774 |
-
#: app/view/calendar/view/agenda.php:
|
775 |
msgid "Read more"
|
776 |
msgstr ""
|
777 |
|
778 |
-
#: app/view/calendar/view/agenda.php:
|
779 |
msgid "Categories:"
|
780 |
msgstr ""
|
781 |
|
782 |
-
#: app/view/calendar/view/agenda.php:
|
783 |
#: public/admin/themes.php:29
|
784 |
msgid "Tags:"
|
785 |
msgstr ""
|
786 |
|
787 |
-
#: app/view/calendar/view/agenda.php:
|
788 |
-
#: app/view/calendar/view/oneday.php:
|
789 |
-
#: app/view/calendar/widget.php:
|
790 |
msgid "@ %s"
|
791 |
msgstr ""
|
792 |
|
793 |
-
#: app/view/calendar/view/oneday.php:
|
794 |
msgid "g a"
|
795 |
msgstr ""
|
796 |
|
797 |
-
#: app/view/calendar/view/oneday.php:
|
798 |
msgid "Reveal full day"
|
799 |
msgstr ""
|
800 |
|
801 |
-
#: app/view/calendar/view/oneday.php:
|
802 |
msgid "All-day"
|
803 |
msgstr ""
|
804 |
|
805 |
-
#: app/view/calendar/view/oneday.php:
|
806 |
msgid "Now:"
|
807 |
msgstr ""
|
808 |
|
809 |
-
#: app/view/calendar/view/week.php:
|
810 |
msgid "Week of %s"
|
811 |
msgstr ""
|
812 |
|
813 |
-
#: app/view/calendar/widget.php:
|
814 |
msgid "Upcoming Events"
|
815 |
msgstr ""
|
816 |
|
817 |
-
#: app/view/calendar/widget.php:
|
818 |
msgid "All-in-One Event Calendar: Lists upcoming events in Agenda view"
|
819 |
msgstr ""
|
820 |
|
821 |
-
#: app/view/calendar/widget.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
822 |
msgid "There are no upcoming events."
|
823 |
msgstr ""
|
824 |
|
825 |
-
#: app/view/calendar/widget.php:
|
826 |
msgid "all-day"
|
827 |
msgstr ""
|
828 |
|
829 |
-
#: app/view/calendar/widget.php:
|
830 |
msgid "View Calendar"
|
831 |
msgstr ""
|
832 |
|
833 |
-
#: app/view/calendar/widget.php:
|
834 |
msgid "Add"
|
835 |
msgstr ""
|
836 |
|
837 |
-
#: app/view/event/content.php:33 app/view/event/single.php:
|
838 |
msgid "When:"
|
839 |
msgstr ""
|
840 |
|
841 |
-
#: app/view/event/content.php:34 app/view/event/single.php:
|
842 |
msgid "Where:"
|
843 |
msgstr ""
|
844 |
|
@@ -906,33 +1027,37 @@ msgstr ""
|
|
906 |
msgid "Event draft updated. <a target=\"_blank\" href=\"%s\">Preview event</a>"
|
907 |
msgstr ""
|
908 |
|
909 |
-
#: app/view/event/single.php:
|
|
|
|
|
|
|
|
|
910 |
msgid "Add to Calendar"
|
911 |
msgstr ""
|
912 |
|
913 |
-
#: app/view/event/single.php:
|
914 |
msgid "Cost:"
|
915 |
msgstr ""
|
916 |
|
917 |
-
#: app/view/event/single.php:
|
918 |
msgid "Contact:"
|
919 |
msgstr ""
|
920 |
|
921 |
-
#: app/view/event/single.php:
|
922 |
msgid "Free"
|
923 |
msgstr ""
|
924 |
|
925 |
-
#: app/view/event/single.php:
|
926 |
msgid "Edit this occurrence (%s)"
|
927 |
msgstr ""
|
928 |
|
929 |
-
#: app/view/event/single.php:
|
930 |
msgid ""
|
931 |
"This post was replicated from another site's <a class=\"ai1ec-ics-icon\" "
|
932 |
"href=\"%s\" title=\"iCalendar feed\">calendar feed</a>."
|
933 |
msgstr ""
|
934 |
|
935 |
-
#: app/view/event/single.php:
|
936 |
msgid "View original post"
|
937 |
msgstr ""
|
938 |
|
@@ -986,60 +1111,60 @@ msgstr ""
|
|
986 |
msgid "Another import process in progress. Please try again later."
|
987 |
msgstr ""
|
988 |
|
989 |
-
#: lib/calendar-feed/ics.php:
|
990 |
msgid ""
|
991 |
"A system error has prevented calendar data from being fetched. Something is "
|
992 |
"preventing the plugin from functioning correctly. This message should "
|
993 |
"provide a clue: %s"
|
994 |
msgstr ""
|
995 |
|
996 |
-
#: lib/calendar-feed/ics.php:
|
997 |
msgid ""
|
998 |
"Calendar data could not be fetched. If your URL is valid and contains an "
|
999 |
"iCalendar resource, this is likely the result of a temporary server error "
|
1000 |
"and time may resolve this issue"
|
1001 |
msgstr ""
|
1002 |
|
1003 |
-
#: lib/calendar-feed/ics.php:
|
1004 |
msgid "No events were found"
|
1005 |
msgstr ""
|
1006 |
|
1007 |
-
#: lib/calendar-feed/ics.php:
|
1008 |
msgid "Imported %s event"
|
1009 |
msgid_plural "Imported %s events"
|
1010 |
msgstr[0] ""
|
1011 |
msgstr[1] ""
|
1012 |
|
1013 |
-
#: lib/calendar-feed/ics.php:
|
1014 |
msgid "Invalid ICS feed ID"
|
1015 |
msgstr ""
|
1016 |
|
1017 |
-
#: lib/calendar-feed/ics.php:
|
1018 |
msgid "Categories (optional)"
|
1019 |
msgstr ""
|
1020 |
|
1021 |
-
#: lib/calendar-feed/ics.php:
|
1022 |
msgid ""
|
1023 |
"Do you want to keep the events imported from the calendar or remove them?"
|
1024 |
msgstr ""
|
1025 |
|
1026 |
-
#: lib/calendar-feed/ics.php:
|
1027 |
msgid "Removing ICS Feed"
|
1028 |
msgstr ""
|
1029 |
|
1030 |
-
#: lib/calendar-feed/ics.php:
|
1031 |
msgid "Keep Events"
|
1032 |
msgstr ""
|
1033 |
|
1034 |
-
#: lib/calendar-feed/ics.php:
|
1035 |
msgid "Remove Events"
|
1036 |
msgstr ""
|
1037 |
|
1038 |
-
#: lib/calendar-feed/ics.php:
|
1039 |
msgid "Deleted %d events"
|
1040 |
msgstr ""
|
1041 |
|
1042 |
-
#: lib/calendar-feed/ics.php:
|
1043 |
msgid "Feed deleted"
|
1044 |
msgstr ""
|
1045 |
|
@@ -1069,35 +1194,35 @@ msgstr ""
|
|
1069 |
msgid "Clone to Draft"
|
1070 |
msgstr ""
|
1071 |
|
1072 |
-
#: lib/command/clone.php:
|
1073 |
msgid ""
|
1074 |
"<p>The event <strong>%s</strong> was cloned succesfully. <a href=\"%s\">Edit "
|
1075 |
"cloned event</a></p>"
|
1076 |
msgstr ""
|
1077 |
|
1078 |
-
#: lib/css/frontend.php:
|
1079 |
msgid ""
|
1080 |
"The LESS file compiled correctly but there was an error while saving the "
|
1081 |
"generated CSS to persistence."
|
1082 |
msgstr ""
|
1083 |
|
1084 |
-
#: lib/css/frontend.php:
|
1085 |
msgid ""
|
1086 |
"<p><strong>There was an error while compiling CSS.</strong> The message "
|
1087 |
"returned was: <em>%s</em></p>"
|
1088 |
msgstr ""
|
1089 |
|
1090 |
-
#: lib/css/frontend.php:
|
1091 |
msgid ""
|
1092 |
"Theme options were successfully reset to their default values. <a "
|
1093 |
"href='%s'>Visit site</a>"
|
1094 |
msgstr ""
|
1095 |
|
1096 |
-
#: lib/css/frontend.php:
|
1097 |
msgid "Theme options were updated successfully. <a href='%s'>Visit site</a>"
|
1098 |
msgstr ""
|
1099 |
|
1100 |
-
#: lib/css/frontend.php:
|
1101 |
msgid ""
|
1102 |
"Your CSS is being compiled on every request, which causes your calendar to "
|
1103 |
"perform slowly. The following error occurred: %s"
|
@@ -1136,30 +1261,34 @@ msgstr ""
|
|
1136 |
msgid "Selected timezone \"UTC%+d\" will be treated as %s."
|
1137 |
msgstr ""
|
1138 |
|
1139 |
-
#: lib/date/timezone.php:
|
1140 |
msgid "Manual Offset"
|
1141 |
msgstr ""
|
1142 |
|
1143 |
-
#: lib/date/timezone.php:
|
1144 |
msgid "Choose your timezone"
|
1145 |
msgstr ""
|
1146 |
|
1147 |
-
#: lib/environment/check.php:
|
1148 |
msgid "Select an option in the <strong>Calendar page</strong> dropdown list."
|
1149 |
msgstr ""
|
1150 |
|
1151 |
-
#: lib/environment/check.php:
|
1152 |
msgid ""
|
1153 |
"The plugin is installed, but has not been configured. <a href=\"%s\">Click "
|
1154 |
"here to set it up now »</a>"
|
1155 |
msgstr ""
|
1156 |
|
1157 |
-
#: lib/environment/check.php:
|
1158 |
msgid ""
|
1159 |
"The plugin is installed, but has not been configured. Please log in as an "
|
1160 |
"Administrator to set it up."
|
1161 |
msgstr ""
|
1162 |
|
|
|
|
|
|
|
|
|
1163 |
#: lib/exception/handler.php:176
|
1164 |
msgid "Disabled add-on \"%s\" due to an error"
|
1165 |
msgstr ""
|
@@ -1357,7 +1486,7 @@ msgstr ""
|
|
1357 |
msgid "Custom..."
|
1358 |
msgstr ""
|
1359 |
|
1360 |
-
#: lib/less/variable/font.php:
|
1361 |
msgid "Enter custom font(s)"
|
1362 |
msgstr ""
|
1363 |
|
@@ -1365,7 +1494,7 @@ msgstr ""
|
|
1365 |
msgid "Length"
|
1366 |
msgstr ""
|
1367 |
|
1368 |
-
#: lib/notification/admin.php:
|
1369 |
msgid "All-in-One Event Calendar"
|
1370 |
msgstr ""
|
1371 |
|
@@ -1415,10 +1544,6 @@ msgstr ""
|
|
1415 |
msgid "Parent Event"
|
1416 |
msgstr ""
|
1417 |
|
1418 |
-
#: lib/post/custom-type.php:37
|
1419 |
-
msgid "Events"
|
1420 |
-
msgstr ""
|
1421 |
-
|
1422 |
#: lib/post/custom-type.php:55
|
1423 |
msgid "event"
|
1424 |
msgstr ""
|
@@ -2420,9 +2545,9 @@ msgstr ""
|
|
2420 |
msgid "All-in-One Event Calendar by Time.ly"
|
2421 |
msgstr ""
|
2422 |
|
2423 |
-
#. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.1.
|
2424 |
#. Plugin URI of the plugin/theme
|
2425 |
-
#. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.1.
|
2426 |
#. Author URI of the plugin/theme
|
2427 |
msgid "http://time.ly/"
|
2428 |
msgstr ""
|
2 |
# This file is distributed under the same license as the All-in-One Event Calendar by Time.ly package.
|
3 |
msgid ""
|
4 |
msgstr ""
|
5 |
+
"Project-Id-Version: All-in-One Event Calendar by Time.ly 2.1.6\n"
|
6 |
"Report-Msgid-Bugs-To: http://wordpress.org/tag/all-in-one-event-calendar\n"
|
7 |
+
"POT-Creation-Date: 2014-11-19 22:34:16+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
|
15 |
+
#: app/controller/extension-license.php:54 app/view/admin/add-ons.php:26
|
16 |
+
#: app/view/admin/add-ons.php:27
|
17 |
msgid "Add-ons"
|
18 |
msgstr ""
|
19 |
|
25 |
msgid "Licences"
|
26 |
msgstr ""
|
27 |
|
28 |
+
#: app/controller/front.php:309
|
29 |
msgid ""
|
30 |
"Your active calendar theme could not be properly initialized. The default "
|
31 |
"theme has been activated instead. Please visit %s and try reactivating your "
|
32 |
"theme manually."
|
33 |
msgstr ""
|
34 |
|
35 |
+
#: app/controller/front.php:313 app/view/admin/theme-switching.php:54
|
36 |
#: app/view/admin/theme-switching.php:55
|
37 |
msgid "Calendar Themes"
|
38 |
msgstr ""
|
39 |
|
40 |
+
#: app/controller/front.php:886
|
41 |
msgid ""
|
42 |
"Your database is found to be corrupt. Likely previous update has failed. "
|
43 |
"Please restore All-in-One Event Calendar tables from a backup and retry."
|
44 |
"<br>Following errors were found:<br>%s"
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: app/controller/front.php:1040
|
48 |
+
msgid ""
|
49 |
+
"You may be using a legacy custom calendar theme. If you have problems "
|
50 |
+
"viewing the calendar, please read <a href=\"https://time.ly/\">this article</"
|
51 |
+
"a>."
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: app/controller/javascript-widget.php:47
|
55 |
+
msgid "You must choose the Calendar page before using the Super Widget"
|
56 |
+
msgstr ""
|
57 |
+
|
58 |
+
#: app/controller/javascript.php:386
|
59 |
msgid "This feed is already being imported."
|
60 |
msgstr ""
|
61 |
|
62 |
+
#: app/controller/javascript.php:389
|
63 |
msgid "Please enter a valid iCalendar URL."
|
64 |
msgstr ""
|
65 |
|
66 |
+
#: app/controller/javascript.php:392
|
67 |
msgid "Please enter a valid email address."
|
68 |
msgstr ""
|
69 |
|
70 |
+
#: app/controller/javascript.php:394
|
71 |
msgid "Choose Image"
|
72 |
msgstr ""
|
73 |
|
74 |
+
#: app/controller/javascript.php:397
|
75 |
msgid "The value you have entered is not a valid CSS length."
|
76 |
msgstr ""
|
77 |
|
78 |
+
#: app/controller/javascript.php:400
|
79 |
msgid ""
|
80 |
"Are you sure you want to reset your theme options to their default values?"
|
81 |
msgstr ""
|
82 |
|
83 |
+
#: app/controller/javascript.php:403
|
84 |
msgid ""
|
85 |
"Please enter a valid latitude. A valid latitude is comprised between +90 and "
|
86 |
"-90."
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: app/controller/javascript.php:406
|
90 |
msgid ""
|
91 |
"Please enter a valid longitude. A valid longitude is comprised between +180 "
|
92 |
"and -180."
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: app/controller/javascript.php:409
|
96 |
msgid ""
|
97 |
"When the \"Input coordinates\" checkbox is checked, \"Latitude\" is a "
|
98 |
"required field."
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: app/controller/javascript.php:412
|
102 |
msgid ""
|
103 |
"When the \"Input coordinates\" checkbox is checked, \"Longitude\" is a "
|
104 |
"required field."
|
105 |
msgstr ""
|
106 |
|
107 |
+
#: app/controller/javascript.php:415
|
108 |
msgid ""
|
109 |
"The URL you have entered in the <b>Organizer Contact Info</b> > "
|
110 |
"<b>External URL</b> seems to be invalid."
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: app/controller/javascript.php:418
|
114 |
msgid ""
|
115 |
"The URL you have entered in the <b>Event Cost and Tickets</b> > <b>Buy "
|
116 |
"Tickets URL</b> seems to be invalid."
|
117 |
msgstr ""
|
118 |
|
119 |
+
#: app/controller/javascript.php:421
|
120 |
msgid ""
|
121 |
"Please remember that URLs must start with either \"http://\" or \"https://\"."
|
122 |
msgstr ""
|
123 |
|
124 |
+
#: app/controller/javascript.php:451 app/view/admin/widget-creator.php:131
|
125 |
+
msgid "Preview:"
|
126 |
+
msgstr ""
|
127 |
+
|
128 |
+
#: app/controller/javascript.php:452
|
129 |
+
msgid ""
|
130 |
+
"Loading preview <i class=\"ai1ec-fa ai1ec-fa-spin ai1ec-fa-spinner\"></"
|
131 |
+
"i>"
|
132 |
+
msgstr ""
|
133 |
+
|
134 |
+
#: app/controller/javascript.php:456
|
135 |
+
msgid ""
|
136 |
+
"Something went wrong while fetching events.<br>The request status is: %STATUS"
|
137 |
+
"% <br>The error thrown was: %ERROR%"
|
138 |
+
msgstr ""
|
139 |
+
|
140 |
#: app/model/event/parent.php:186
|
141 |
msgid "Edit “%s”"
|
142 |
msgstr ""
|
145 |
msgid "Base Event"
|
146 |
msgstr ""
|
147 |
|
148 |
+
#: app/model/settings.php:345
|
149 |
#: lib/html/element/setting/calendar-page-selector.php:50
|
150 |
msgid "Calendar page"
|
151 |
msgstr ""
|
152 |
|
153 |
+
#: app/model/settings.php:355
|
154 |
msgid "Week starts on"
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: app/model/settings.php:368
|
158 |
msgid "Available views"
|
159 |
msgstr ""
|
160 |
|
161 |
+
#: app/model/settings.php:376
|
162 |
msgid "Agenda"
|
163 |
msgid_plural "Agenda"
|
164 |
msgstr[0] ""
|
165 |
msgstr[1] ""
|
166 |
|
167 |
+
#: app/model/settings.php:387
|
168 |
msgid "Day"
|
169 |
msgid_plural "Day"
|
170 |
msgstr[0] ""
|
171 |
msgstr[1] ""
|
172 |
|
173 |
+
#: app/model/settings.php:398
|
174 |
msgid "Month"
|
175 |
msgid_plural "Month"
|
176 |
msgstr[0] ""
|
177 |
msgstr[1] ""
|
178 |
|
179 |
+
#: app/model/settings.php:409
|
180 |
msgid "Week"
|
181 |
msgid_plural "Week"
|
182 |
msgstr[0] ""
|
183 |
msgstr[1] ""
|
184 |
|
185 |
+
#: app/model/settings.php:423
|
186 |
msgid "Timezone"
|
187 |
msgstr ""
|
188 |
|
190 |
msgid "Preselected calendar filters"
|
191 |
msgstr ""
|
192 |
|
193 |
+
#: app/model/settings.php:437 app/view/calendar/widget.php:128
|
194 |
msgid ""
|
195 |
"To clear, hold ⌘/<abbr class=\"initialism\">CTRL</abbr> and click "
|
196 |
"selection."
|
261 |
"view"
|
262 |
msgstr ""
|
263 |
|
264 |
+
#: app/model/settings.php:608
|
265 |
+
msgid "Only applies to first visible calendar found on the page."
|
266 |
+
msgstr ""
|
267 |
+
|
268 |
+
#: app/model/settings.php:620
|
269 |
msgid "Offset affixed filter bar vertically by"
|
270 |
msgstr ""
|
271 |
|
272 |
+
#: app/model/settings.php:635
|
273 |
msgid "Wide screens only (≥ 1200px)"
|
274 |
msgstr ""
|
275 |
|
276 |
+
#: app/model/settings.php:650
|
277 |
msgid "Tablets only (< 980px)"
|
278 |
msgstr ""
|
279 |
|
280 |
+
#: app/model/settings.php:665
|
281 |
msgid "Phones only (< 768px)"
|
282 |
msgstr ""
|
283 |
|
284 |
+
#: app/model/settings.php:678
|
285 |
msgid "Strict compatibility content filtering"
|
286 |
msgstr ""
|
287 |
|
288 |
+
#: app/model/settings.php:690
|
289 |
msgid " <strong>Hide featured image</strong> from event details page"
|
290 |
msgstr ""
|
291 |
|
292 |
+
#: app/model/settings.php:693
|
293 |
msgid ""
|
294 |
"Select this option if your theme already displays each post's featured image."
|
295 |
msgstr ""
|
296 |
|
297 |
+
#: app/model/settings.php:704
|
298 |
msgid "Input dates in this format"
|
299 |
msgstr ""
|
300 |
|
301 |
+
#: app/model/settings.php:709
|
302 |
msgid "Default (d/m/yyyy)"
|
303 |
msgstr ""
|
304 |
|
305 |
+
#: app/model/settings.php:713
|
306 |
msgid "US (m/d/yyyy)"
|
307 |
msgstr ""
|
308 |
|
309 |
+
#: app/model/settings.php:717
|
310 |
msgid "ISO 8601 (yyyy-m-d)"
|
311 |
msgstr ""
|
312 |
|
313 |
+
#: app/model/settings.php:721
|
314 |
msgid "Dotted (m.d.yyyy)"
|
315 |
msgstr ""
|
316 |
|
317 |
+
#: app/model/settings.php:733
|
318 |
msgid " Use <strong>24h time</strong> in time pickers"
|
319 |
msgstr ""
|
320 |
|
321 |
+
#: app/model/settings.php:744
|
322 |
msgid "<strong>Disable address autocomplete</strong> function"
|
323 |
msgstr ""
|
324 |
|
325 |
+
#: app/model/settings.php:755
|
326 |
msgid ""
|
327 |
"Use the configured <strong>region</strong> (WordPress locale) to bias the "
|
328 |
"address autocomplete function "
|
329 |
msgstr ""
|
330 |
|
331 |
+
#: app/model/settings.php:771
|
332 |
msgid ""
|
333 |
" Show the old <strong>Post Your Event</strong> button above the calendar to "
|
334 |
"privileged users"
|
335 |
msgstr ""
|
336 |
|
337 |
+
#: app/model/settings.php:774
|
338 |
msgid ""
|
339 |
"Install the <a target=\"_blank\" href=\"http://time.ly/\">Interactive "
|
340 |
"Frontend Extension</a> for the <strong>frontend Post Your Event form</"
|
341 |
"strong>."
|
342 |
msgstr ""
|
343 |
|
344 |
+
#: app/model/settings.php:795
|
345 |
msgid "Move calendar into this DOM element"
|
346 |
msgstr ""
|
347 |
|
348 |
+
#: app/model/settings.php:797
|
349 |
msgid ""
|
350 |
"Optional. Use this JavaScript-based shortcut to place the\n"
|
351 |
"\t\t\t\t\t\tcalendar a DOM element other than the usual page content "
|
359 |
"\t\t\t\t\t\tby the calendar."
|
360 |
msgstr ""
|
361 |
|
362 |
+
#: app/model/settings.php:816
|
363 |
msgid ""
|
364 |
"<strong>Skip <tt>in_the_loop()</tt> check </strong> that protects against "
|
365 |
"multiple calendar output"
|
366 |
msgstr ""
|
367 |
|
368 |
+
#: app/model/settings.php:819
|
369 |
msgid ""
|
370 |
"Try enabling this option if your calendar does not appear on the calendar "
|
371 |
"page. It is needed for compatibility with a small number of themes that call "
|
372 |
"<tt>the_content()</tt> from outside of The Loop. Leave disabled otherwise."
|
373 |
msgstr ""
|
374 |
|
375 |
+
#: app/model/settings.php:831
|
376 |
msgid "Disable <strong>gzip</strong> compression."
|
377 |
msgstr ""
|
378 |
|
379 |
+
#: app/model/settings.php:834
|
380 |
msgid ""
|
381 |
"Use this option if calendar is unresponsive. <a href=\"http://support.time."
|
382 |
"ly/disable-gzip-compression/\">Read more</a> about the issue. (From version "
|
383 |
"2.1 onwards, gzip is disabled by default for maximum compatibility.)"
|
384 |
msgstr ""
|
385 |
|
386 |
+
#: app/model/settings.php:846
|
387 |
msgid ""
|
388 |
"<strong>Link CSS</strong> in <code><head></code> section when file "
|
389 |
"cache is unavailable."
|
390 |
msgstr ""
|
391 |
|
392 |
+
#: app/model/settings.php:849
|
393 |
msgid ""
|
394 |
"Use this option if file cache is unavailable and you would prefer to serve "
|
395 |
"CSS as a link rather than have it output inline."
|
396 |
msgstr ""
|
397 |
|
398 |
+
#: app/model/settings.php:861
|
399 |
msgid "Current <strong>robots.txt</strong> on this site"
|
400 |
msgstr ""
|
401 |
|
402 |
+
#: app/model/settings.php:865
|
403 |
msgid ""
|
404 |
"The Robot Exclusion Standard, also known as the Robots Exclusion Protocol "
|
405 |
"or\n"
|
413 |
"your root WordPress directory."
|
414 |
msgstr ""
|
415 |
|
416 |
+
#: app/model/settings.php:882
|
417 |
msgid ""
|
418 |
"<strong>Publicize, promote, and share my events</strong> marked as public on "
|
419 |
"the Timely network. (<a href=\"%s\" target=\"_blank\">Learn more »</a>)"
|
420 |
msgstr ""
|
421 |
|
422 |
+
#: app/model/settings.php:905
|
423 |
msgid "Templates cache improves site performance"
|
424 |
msgstr ""
|
425 |
|
427 |
msgid "Event Details"
|
428 |
msgstr ""
|
429 |
|
430 |
+
#: app/view/admin/add-new-event.php:47
|
431 |
+
msgid "Banner Image"
|
432 |
+
msgstr ""
|
433 |
+
|
434 |
+
#: app/view/admin/add-new-event.php:377
|
435 |
+
msgid "Set banner image"
|
436 |
+
msgstr ""
|
437 |
+
|
438 |
+
#: app/view/admin/add-new-event.php:378
|
439 |
+
msgid "Remove banner image"
|
440 |
+
msgstr ""
|
441 |
+
|
442 |
+
#: app/view/admin/add-ons.php:68
|
443 |
+
msgid "Add-ons for All In One Event Calendar"
|
444 |
+
msgstr ""
|
445 |
+
|
446 |
+
#: app/view/admin/add-ons.php:71
|
447 |
+
msgid "Browse All Extensions"
|
448 |
+
msgstr ""
|
449 |
+
|
450 |
+
#: app/view/admin/add-ons.php:74
|
451 |
+
msgid ""
|
452 |
+
"These add-ons extend the functionality of the All-in-One Event Calendar."
|
453 |
+
msgstr ""
|
454 |
+
|
455 |
+
#: app/view/admin/add-ons.php:77
|
456 |
+
msgid ""
|
457 |
+
"There was an error retrieving the extensions list from the server. Please "
|
458 |
+
"try again later."
|
459 |
+
msgstr ""
|
460 |
+
|
461 |
#: app/view/admin/all-events.php:16
|
462 |
msgid "Author"
|
463 |
msgstr ""
|
630 |
msgid "All-in-One Event Calendar: Settings"
|
631 |
msgstr ""
|
632 |
|
633 |
+
#: app/view/admin/settings.php:65 app/view/admin/settings.php:66
|
634 |
#: lib/date/timezone.php:366
|
635 |
msgid "Settings"
|
636 |
msgstr ""
|
637 |
|
638 |
+
#: app/view/admin/settings.php:86
|
639 |
msgctxt "meta box"
|
640 |
msgid "General Settings"
|
641 |
msgstr ""
|
642 |
|
643 |
+
#: app/view/admin/settings.php:95
|
644 |
msgctxt "meta box"
|
645 |
msgid "Timely"
|
646 |
msgstr ""
|
647 |
|
648 |
+
#: app/view/admin/settings.php:137
|
649 |
msgid "Viewing Events"
|
650 |
msgstr ""
|
651 |
|
652 |
+
#: app/view/admin/settings.php:140
|
653 |
msgid "Adding/Editing Events"
|
654 |
msgstr ""
|
655 |
|
656 |
+
#: app/view/admin/settings.php:143
|
657 |
msgid "Advanced"
|
658 |
msgstr ""
|
659 |
|
660 |
+
#: app/view/admin/settings.php:145
|
661 |
msgid "Advanced Settings"
|
662 |
msgstr ""
|
663 |
|
664 |
+
#: app/view/admin/settings.php:146
|
665 |
msgid "Shortcodes"
|
666 |
msgstr ""
|
667 |
|
668 |
+
#: app/view/admin/settings.php:147
|
669 |
msgid "Email Templates"
|
670 |
msgstr ""
|
671 |
|
672 |
+
#: app/view/admin/settings.php:148
|
673 |
msgid "External Services"
|
674 |
msgstr ""
|
675 |
|
676 |
+
#: app/view/admin/settings.php:149
|
677 |
msgid "Cache Report"
|
678 |
msgstr ""
|
679 |
|
680 |
+
#: app/view/admin/settings.php:167
|
681 |
#: public/admin/plugins/ics/display_feeds.php:24
|
682 |
msgid "Save Settings"
|
683 |
msgstr ""
|
684 |
|
685 |
+
#: app/view/admin/settings.php:174
|
686 |
msgid ""
|
687 |
"If the form below is not working please follow <a href=\"%s\">this link</a>."
|
688 |
msgstr ""
|
740 |
msgid "All-in-One Event Calendar: Themes"
|
741 |
msgstr ""
|
742 |
|
743 |
+
#: app/view/admin/widget-creator.php:24 app/view/admin/widget-creator.php:25
|
744 |
+
#: app/view/admin/widget-creator.php:47
|
745 |
+
msgid "Widget Creator"
|
746 |
+
msgstr ""
|
747 |
+
|
748 |
+
#: app/view/admin/widget-creator.php:74
|
749 |
+
msgctxt "meta box"
|
750 |
+
msgid "Widget Creator"
|
751 |
+
msgstr ""
|
752 |
+
|
753 |
+
#: app/view/admin/widget-creator.php:130
|
754 |
+
msgid ""
|
755 |
+
"Use this tool to generate code snippets you can place on your site to embed "
|
756 |
+
"new calendars and widgets."
|
757 |
+
msgstr ""
|
758 |
+
|
759 |
+
#: app/view/admin/widget-creator.php:132
|
760 |
+
msgid "Full Calendar"
|
761 |
+
msgstr ""
|
762 |
+
|
763 |
+
#: app/view/admin/widget-creator.php:133
|
764 |
+
msgid "Paste this code onto your site:"
|
765 |
+
msgstr ""
|
766 |
+
|
767 |
+
#: app/view/admin/widget-creator.php:134
|
768 |
+
msgid ""
|
769 |
+
"This code will update to reflect changes made to the settings. Changing "
|
770 |
+
"settings will not affect previously embedded widgets."
|
771 |
+
msgstr ""
|
772 |
+
|
773 |
+
#: app/view/calendar/page.php:49
|
774 |
msgid ""
|
775 |
"There was an error loading calendar. Please contact site administrator and "
|
776 |
"inform him to configure calendar views."
|
777 |
msgstr ""
|
778 |
|
779 |
+
#: app/view/calendar/page.php:214
|
780 |
msgid "Subscribe to filtered calendar"
|
781 |
msgstr ""
|
782 |
|
783 |
+
#: app/view/calendar/page.php:215
|
784 |
msgid "Subscribe"
|
785 |
msgstr ""
|
786 |
|
834 |
msgid "Clear category filter"
|
835 |
msgstr ""
|
836 |
|
837 |
+
#: app/view/calendar/taxonomy.php:98 app/view/event/single.php:106
|
838 |
#: lib/html/element/setting/tags-categories.php:47
|
839 |
msgid "Categories"
|
840 |
msgstr ""
|
843 |
msgid "Clear tag filter"
|
844 |
msgstr ""
|
845 |
|
846 |
+
#: app/view/calendar/taxonomy.php:100 app/view/event/single.php:107
|
847 |
#: lib/html/element/setting/tags-categories.php:39
|
848 |
msgid "Tags"
|
849 |
msgstr ""
|
850 |
|
851 |
+
#: app/view/calendar/view/agenda.php:113
|
852 |
msgid "Collapse All"
|
853 |
msgstr ""
|
854 |
|
855 |
+
#: app/view/calendar/view/agenda.php:114
|
856 |
msgid "Expand All"
|
857 |
msgstr ""
|
858 |
|
859 |
+
#: app/view/calendar/view/agenda.php:137
|
860 |
msgid "There are no upcoming events to display at this time."
|
861 |
msgstr ""
|
862 |
|
863 |
+
#: app/view/calendar/view/agenda.php:138 app/view/calendar/widget.php:363
|
864 |
msgid "Edit"
|
865 |
msgstr ""
|
866 |
|
867 |
+
#: app/view/calendar/view/agenda.php:139
|
868 |
msgid "Read more"
|
869 |
msgstr ""
|
870 |
|
871 |
+
#: app/view/calendar/view/agenda.php:140
|
872 |
msgid "Categories:"
|
873 |
msgstr ""
|
874 |
|
875 |
+
#: app/view/calendar/view/agenda.php:141 lib/theme/list.php:323
|
876 |
#: public/admin/themes.php:29
|
877 |
msgid "Tags:"
|
878 |
msgstr ""
|
879 |
|
880 |
+
#: app/view/calendar/view/agenda.php:142 app/view/calendar/view/month.php:82
|
881 |
+
#: app/view/calendar/view/oneday.php:102 app/view/calendar/view/week.php:113
|
882 |
+
#: app/view/calendar/widget.php:364
|
883 |
msgid "@ %s"
|
884 |
msgstr ""
|
885 |
|
886 |
+
#: app/view/calendar/view/oneday.php:75 app/view/calendar/view/week.php:67
|
887 |
msgid "g a"
|
888 |
msgstr ""
|
889 |
|
890 |
+
#: app/view/calendar/view/oneday.php:99 app/view/calendar/view/week.php:110
|
891 |
msgid "Reveal full day"
|
892 |
msgstr ""
|
893 |
|
894 |
+
#: app/view/calendar/view/oneday.php:100 app/view/calendar/view/week.php:111
|
895 |
msgid "All-day"
|
896 |
msgstr ""
|
897 |
|
898 |
+
#: app/view/calendar/view/oneday.php:101 app/view/calendar/view/week.php:112
|
899 |
msgid "Now:"
|
900 |
msgstr ""
|
901 |
|
902 |
+
#: app/view/calendar/view/week.php:61
|
903 |
msgid "Week of %s"
|
904 |
msgstr ""
|
905 |
|
906 |
+
#: app/view/calendar/widget.php:36 app/view/calendar/widget.php:56
|
907 |
msgid "Upcoming Events"
|
908 |
msgstr ""
|
909 |
|
910 |
+
#: app/view/calendar/widget.php:38
|
911 |
msgid "All-in-One Event Calendar: Lists upcoming events in Agenda view"
|
912 |
msgstr ""
|
913 |
|
914 |
+
#: app/view/calendar/widget.php:80
|
915 |
+
msgid "Choose how to limit the upcoming events"
|
916 |
+
msgstr ""
|
917 |
+
|
918 |
+
#: app/view/calendar/widget.php:86 lib/post/custom-type.php:37
|
919 |
+
msgid "Events"
|
920 |
+
msgstr ""
|
921 |
+
|
922 |
+
#: app/view/calendar/widget.php:93
|
923 |
+
msgid "Days"
|
924 |
+
msgstr ""
|
925 |
+
|
926 |
+
#: app/view/calendar/widget.php:106
|
927 |
+
msgid "Number of events to show"
|
928 |
+
msgstr ""
|
929 |
+
|
930 |
+
#: app/view/calendar/widget.php:115
|
931 |
+
msgid "Number of days to show"
|
932 |
+
msgstr ""
|
933 |
+
|
934 |
+
#: app/view/calendar/widget.php:124
|
935 |
+
msgid "Show events filtered for the following tags/categories"
|
936 |
+
msgstr ""
|
937 |
+
|
938 |
+
#: app/view/calendar/widget.php:141
|
939 |
+
msgid "Show the subscribe button in the widget"
|
940 |
+
msgstr ""
|
941 |
+
|
942 |
+
#: app/view/calendar/widget.php:360
|
943 |
msgid "There are no upcoming events."
|
944 |
msgstr ""
|
945 |
|
946 |
+
#: app/view/calendar/widget.php:361 app/view/event/time.php:131
|
947 |
msgid "all-day"
|
948 |
msgstr ""
|
949 |
|
950 |
+
#: app/view/calendar/widget.php:362
|
951 |
msgid "View Calendar"
|
952 |
msgstr ""
|
953 |
|
954 |
+
#: app/view/calendar/widget.php:365
|
955 |
msgid "Add"
|
956 |
msgstr ""
|
957 |
|
958 |
+
#: app/view/event/content.php:33 app/view/event/single.php:101
|
959 |
msgid "When:"
|
960 |
msgstr ""
|
961 |
|
962 |
+
#: app/view/event/content.php:34 app/view/event/single.php:102
|
963 |
msgid "Where:"
|
964 |
msgstr ""
|
965 |
|
1027 |
msgid "Event draft updated. <a target=\"_blank\" href=\"%s\">Preview event</a>"
|
1028 |
msgstr ""
|
1029 |
|
1030 |
+
#: app/view/event/single.php:65
|
1031 |
+
msgid "Event was created in the %s time zone"
|
1032 |
+
msgstr ""
|
1033 |
+
|
1034 |
+
#: app/view/event/single.php:97
|
1035 |
msgid "Add to Calendar"
|
1036 |
msgstr ""
|
1037 |
|
1038 |
+
#: app/view/event/single.php:103
|
1039 |
msgid "Cost:"
|
1040 |
msgstr ""
|
1041 |
|
1042 |
+
#: app/view/event/single.php:104
|
1043 |
msgid "Contact:"
|
1044 |
msgstr ""
|
1045 |
|
1046 |
+
#: app/view/event/single.php:105
|
1047 |
msgid "Free"
|
1048 |
msgstr ""
|
1049 |
|
1050 |
+
#: app/view/event/single.php:122
|
1051 |
msgid "Edit this occurrence (%s)"
|
1052 |
msgstr ""
|
1053 |
|
1054 |
+
#: app/view/event/single.php:140
|
1055 |
msgid ""
|
1056 |
"This post was replicated from another site's <a class=\"ai1ec-ics-icon\" "
|
1057 |
"href=\"%s\" title=\"iCalendar feed\">calendar feed</a>."
|
1058 |
msgstr ""
|
1059 |
|
1060 |
+
#: app/view/event/single.php:141
|
1061 |
msgid "View original post"
|
1062 |
msgstr ""
|
1063 |
|
1111 |
msgid "Another import process in progress. Please try again later."
|
1112 |
msgstr ""
|
1113 |
|
1114 |
+
#: lib/calendar-feed/ics.php:173
|
1115 |
msgid ""
|
1116 |
"A system error has prevented calendar data from being fetched. Something is "
|
1117 |
"preventing the plugin from functioning correctly. This message should "
|
1118 |
"provide a clue: %s"
|
1119 |
msgstr ""
|
1120 |
|
1121 |
+
#: lib/calendar-feed/ics.php:180
|
1122 |
msgid ""
|
1123 |
"Calendar data could not be fetched. If your URL is valid and contains an "
|
1124 |
"iCalendar resource, this is likely the result of a temporary server error "
|
1125 |
"and time may resolve this issue"
|
1126 |
msgstr ""
|
1127 |
|
1128 |
+
#: lib/calendar-feed/ics.php:190
|
1129 |
msgid "No events were found"
|
1130 |
msgstr ""
|
1131 |
|
1132 |
+
#: lib/calendar-feed/ics.php:199
|
1133 |
msgid "Imported %s event"
|
1134 |
msgid_plural "Imported %s events"
|
1135 |
msgstr[0] ""
|
1136 |
msgstr[1] ""
|
1137 |
|
1138 |
+
#: lib/calendar-feed/ics.php:205 lib/calendar-feed/ics.php:654
|
1139 |
msgid "Invalid ICS feed ID"
|
1140 |
msgstr ""
|
1141 |
|
1142 |
+
#: lib/calendar-feed/ics.php:348
|
1143 |
msgid "Categories (optional)"
|
1144 |
msgstr ""
|
1145 |
|
1146 |
+
#: lib/calendar-feed/ics.php:365
|
1147 |
msgid ""
|
1148 |
"Do you want to keep the events imported from the calendar or remove them?"
|
1149 |
msgstr ""
|
1150 |
|
1151 |
+
#: lib/calendar-feed/ics.php:371
|
1152 |
msgid "Removing ICS Feed"
|
1153 |
msgstr ""
|
1154 |
|
1155 |
+
#: lib/calendar-feed/ics.php:374
|
1156 |
msgid "Keep Events"
|
1157 |
msgstr ""
|
1158 |
|
1159 |
+
#: lib/calendar-feed/ics.php:377
|
1160 |
msgid "Remove Events"
|
1161 |
msgstr ""
|
1162 |
|
1163 |
+
#: lib/calendar-feed/ics.php:646
|
1164 |
msgid "Deleted %d events"
|
1165 |
msgstr ""
|
1166 |
|
1167 |
+
#: lib/calendar-feed/ics.php:681
|
1168 |
msgid "Feed deleted"
|
1169 |
msgstr ""
|
1170 |
|
1194 |
msgid "Clone to Draft"
|
1195 |
msgstr ""
|
1196 |
|
1197 |
+
#: lib/command/clone.php:166
|
1198 |
msgid ""
|
1199 |
"<p>The event <strong>%s</strong> was cloned succesfully. <a href=\"%s\">Edit "
|
1200 |
"cloned event</a></p>"
|
1201 |
msgstr ""
|
1202 |
|
1203 |
+
#: lib/css/frontend.php:232
|
1204 |
msgid ""
|
1205 |
"The LESS file compiled correctly but there was an error while saving the "
|
1206 |
"generated CSS to persistence."
|
1207 |
msgstr ""
|
1208 |
|
1209 |
+
#: lib/css/frontend.php:238
|
1210 |
msgid ""
|
1211 |
"<p><strong>There was an error while compiling CSS.</strong> The message "
|
1212 |
"returned was: <em>%s</em></p>"
|
1213 |
msgstr ""
|
1214 |
|
1215 |
+
#: lib/css/frontend.php:266
|
1216 |
msgid ""
|
1217 |
"Theme options were successfully reset to their default values. <a "
|
1218 |
"href='%s'>Visit site</a>"
|
1219 |
msgstr ""
|
1220 |
|
1221 |
+
#: lib/css/frontend.php:273
|
1222 |
msgid "Theme options were updated successfully. <a href='%s'>Visit site</a>"
|
1223 |
msgstr ""
|
1224 |
|
1225 |
+
#: lib/css/frontend.php:309
|
1226 |
msgid ""
|
1227 |
"Your CSS is being compiled on every request, which causes your calendar to "
|
1228 |
"perform slowly. The following error occurred: %s"
|
1261 |
msgid "Selected timezone \"UTC%+d\" will be treated as %s."
|
1262 |
msgstr ""
|
1263 |
|
1264 |
+
#: lib/date/timezone.php:490
|
1265 |
msgid "Manual Offset"
|
1266 |
msgstr ""
|
1267 |
|
1268 |
+
#: lib/date/timezone.php:493
|
1269 |
msgid "Choose your timezone"
|
1270 |
msgstr ""
|
1271 |
|
1272 |
+
#: lib/environment/check.php:53
|
1273 |
msgid "Select an option in the <strong>Calendar page</strong> dropdown list."
|
1274 |
msgstr ""
|
1275 |
|
1276 |
+
#: lib/environment/check.php:66
|
1277 |
msgid ""
|
1278 |
"The plugin is installed, but has not been configured. <a href=\"%s\">Click "
|
1279 |
"here to set it up now »</a>"
|
1280 |
msgstr ""
|
1281 |
|
1282 |
+
#: lib/environment/check.php:76
|
1283 |
msgid ""
|
1284 |
"The plugin is installed, but has not been configured. Please log in as an "
|
1285 |
"Administrator to set it up."
|
1286 |
msgstr ""
|
1287 |
|
1288 |
+
#: lib/environment/check.php:192
|
1289 |
+
msgid "Addon %s needs to be at least in version %s"
|
1290 |
+
msgstr ""
|
1291 |
+
|
1292 |
#: lib/exception/handler.php:176
|
1293 |
msgid "Disabled add-on \"%s\" due to an error"
|
1294 |
msgstr ""
|
1486 |
msgid "Custom..."
|
1487 |
msgstr ""
|
1488 |
|
1489 |
+
#: lib/less/variable/font.php:112
|
1490 |
msgid "Enter custom font(s)"
|
1491 |
msgstr ""
|
1492 |
|
1494 |
msgid "Length"
|
1495 |
msgstr ""
|
1496 |
|
1497 |
+
#: lib/notification/admin.php:180
|
1498 |
msgid "All-in-One Event Calendar"
|
1499 |
msgstr ""
|
1500 |
|
1544 |
msgid "Parent Event"
|
1545 |
msgstr ""
|
1546 |
|
|
|
|
|
|
|
|
|
1547 |
#: lib/post/custom-type.php:55
|
1548 |
msgid "event"
|
1549 |
msgstr ""
|
2545 |
msgid "All-in-One Event Calendar by Time.ly"
|
2546 |
msgstr ""
|
2547 |
|
2548 |
+
#. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.1.6) #-#-#-#-#
|
2549 |
#. Plugin URI of the plugin/theme
|
2550 |
+
#. #-#-#-#-# all-in-one-event-calendar.pot (All-in-One Event Calendar by Time.ly 2.1.6) #-#-#-#-#
|
2551 |
#. Author URI of the plugin/theme
|
2552 |
msgid "http://time.ly/"
|
2553 |
msgstr ""
|
lib/bootstrap/loader-map.php
CHANGED
@@ -135,6 +135,13 @@
|
|
135 |
'c' => 'Ai1ec_Cache_Write_Exception',
|
136 |
'i' => 'g',
|
137 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
'Ai1ec_Calendar_Page' =>
|
139 |
array (
|
140 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'calendar' . DIRECTORY_SEPARATOR . 'page.php',
|
@@ -336,6 +343,13 @@
|
|
336 |
'i' => 'g',
|
337 |
'r' => 'y',
|
338 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
339 |
'Ai1ec_Cookie_Present_Dto' =>
|
340 |
array (
|
341 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'cookie' . DIRECTORY_SEPARATOR . 'dto.php',
|
@@ -455,6 +469,12 @@
|
|
455 |
'i' => 'n',
|
456 |
'r' => 'y',
|
457 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
458 |
'Ai1ec_Engine_Not_Set_Exception' =>
|
459 |
array (
|
460 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'controller' . DIRECTORY_SEPARATOR . 'exception' . DIRECTORY_SEPARATOR . 'engine-not-set.php',
|
@@ -509,6 +529,13 @@
|
|
509 |
'i' => 'n',
|
510 |
'r' => 'y',
|
511 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
512 |
'Ai1ec_Event_Create_Exception' =>
|
513 |
array (
|
514 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR . 'event' . DIRECTORY_SEPARATOR . 'event-create-exception.php',
|
@@ -575,6 +602,7 @@
|
|
575 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR . 'event' . DIRECTORY_SEPARATOR . 'taxonomy.php',
|
576 |
'c' => 'Ai1ec_Event_Taxonomy',
|
577 |
'i' => 'n',
|
|
|
578 |
),
|
579 |
'Ai1ec_Event_Trashing' =>
|
580 |
array (
|
@@ -969,6 +997,12 @@
|
|
969 |
'i' => 'g',
|
970 |
'r' => 'y',
|
971 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
972 |
'Ai1ec_Notification' =>
|
973 |
array (
|
974 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'notification' . DIRECTORY_SEPARATOR . 'abstract.php',
|
@@ -990,6 +1024,12 @@
|
|
990 |
'i' => 'g',
|
991 |
'r' => 'y',
|
992 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
993 |
'Ai1ec_Parse_Exception' =>
|
994 |
array (
|
995 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'import-export' . DIRECTORY_SEPARATOR . 'exception.php',
|
@@ -1325,6 +1365,13 @@
|
|
1325 |
'i' => 'g',
|
1326 |
'r' => 'y',
|
1327 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1328 |
'Ai1ec_View_Admin_Abstract' =>
|
1329 |
array (
|
1330 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'abstract.php',
|
@@ -1476,6 +1523,13 @@
|
|
1476 |
'i' => 'g',
|
1477 |
'r' => 'y',
|
1478 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1479 |
'Ai1ec_Wp_Uri_Helper' =>
|
1480 |
array (
|
1481 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'routing' . DIRECTORY_SEPARATOR . 'uri-helper.php',
|
@@ -2527,6 +2581,222 @@
|
|
2527 |
'c' => 'Twig_TokenStream',
|
2528 |
'i' => 'g',
|
2529 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2530 |
'acl.aco' =>
|
2531 |
array (
|
2532 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'acl' . DIRECTORY_SEPARATOR . 'aco.php',
|
@@ -2859,6 +3129,13 @@
|
|
2859 |
'i' => 'g',
|
2860 |
'r' => 'y',
|
2861 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2862 |
'controller.shutdown' =>
|
2863 |
array (
|
2864 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'controller' . DIRECTORY_SEPARATOR . 'shutdown.php',
|
@@ -3016,6 +3293,12 @@
|
|
3016 |
'i' => 'g',
|
3017 |
'r' => 'y',
|
3018 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
3019 |
'event.callback.abstract' =>
|
3020 |
array (
|
3021 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'event' . DIRECTORY_SEPARATOR . 'callback' . DIRECTORY_SEPARATOR . 'abstract.php',
|
@@ -3524,6 +3807,13 @@
|
|
3524 |
'i' => 'Ai1ec_Factory_Event.create_event_instance',
|
3525 |
'r' => 'y',
|
3526 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3527 |
'model.event.creating' =>
|
3528 |
array (
|
3529 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR . 'event' . DIRECTORY_SEPARATOR . 'creating.php',
|
@@ -3582,6 +3872,7 @@
|
|
3582 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR . 'event' . DIRECTORY_SEPARATOR . 'taxonomy.php',
|
3583 |
'c' => 'Ai1ec_Event_Taxonomy',
|
3584 |
'i' => 'n',
|
|
|
3585 |
),
|
3586 |
'model.event.trashing' =>
|
3587 |
array (
|
@@ -3700,6 +3991,12 @@
|
|
3700 |
'i' => 'g',
|
3701 |
'r' => 'y',
|
3702 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
3703 |
'notification.abstract' =>
|
3704 |
array (
|
3705 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'notification' . DIRECTORY_SEPARATOR . 'abstract.php',
|
@@ -3922,6 +4219,150 @@
|
|
3922 |
'i' => 'g',
|
3923 |
'r' => 'y',
|
3924 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3925 |
'twig.Compiler' =>
|
3926 |
array (
|
3927 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'Compiler.php',
|
@@ -4858,12 +5299,48 @@
|
|
4858 |
'c' => 'Twig_TokenStream',
|
4859 |
'i' => 'g',
|
4860 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4861 |
'twig.ai1ec-extension' =>
|
4862 |
array (
|
4863 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'ai1ec-extension.php',
|
4864 |
'c' => 'Ai1ec_Twig_Ai1ec_Extension',
|
4865 |
'i' => 'g',
|
4866 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4867 |
'twig.cache' =>
|
4868 |
array (
|
4869 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'cache.php',
|
@@ -4871,12 +5348,48 @@
|
|
4871 |
'i' => 'g',
|
4872 |
'r' => 'y',
|
4873 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4874 |
'twig.environment' =>
|
4875 |
array (
|
4876 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'environment.php',
|
4877 |
'c' => 'Ai1ec_Twig_Environment',
|
4878 |
'i' => 'g',
|
4879 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4880 |
'twig.loader' =>
|
4881 |
array (
|
4882 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'loader.php',
|
@@ -4941,6 +5454,13 @@
|
|
4941 |
'i' => 'g',
|
4942 |
'r' => 'y',
|
4943 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4944 |
'view.admin.all-events' =>
|
4945 |
array (
|
4946 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'all-events.php',
|
@@ -4997,6 +5517,20 @@
|
|
4997 |
'i' => 'g',
|
4998 |
'r' => 'y',
|
4999 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5000 |
'view.calendar.page' =>
|
5001 |
array (
|
5002 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'calendar' . DIRECTORY_SEPARATOR . 'page.php',
|
@@ -5065,6 +5599,12 @@
|
|
5065 |
'c' => 'Ai1ec_View_Admin_Widget',
|
5066 |
'i' => 'g',
|
5067 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
5068 |
'view.event.avatar' =>
|
5069 |
array (
|
5070 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'event' . DIRECTORY_SEPARATOR . 'avatar.php',
|
135 |
'c' => 'Ai1ec_Cache_Write_Exception',
|
136 |
'i' => 'g',
|
137 |
),
|
138 |
+
'Ai1ec_Calendar_Avatar_Fallbacks' =>
|
139 |
+
array (
|
140 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'calendar' . DIRECTORY_SEPARATOR . 'fallbacks.php',
|
141 |
+
'c' => 'Ai1ec_Calendar_Avatar_Fallbacks',
|
142 |
+
'i' => 'g',
|
143 |
+
'r' => 'y',
|
144 |
+
),
|
145 |
'Ai1ec_Calendar_Page' =>
|
146 |
array (
|
147 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'calendar' . DIRECTORY_SEPARATOR . 'page.php',
|
343 |
'i' => 'g',
|
344 |
'r' => 'y',
|
345 |
),
|
346 |
+
'Ai1ec_Controller_Javascript_Widget' =>
|
347 |
+
array (
|
348 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'controller' . DIRECTORY_SEPARATOR . 'javascript-widget.php',
|
349 |
+
'c' => 'Ai1ec_Controller_Javascript_Widget',
|
350 |
+
'i' => 'g',
|
351 |
+
'r' => 'y',
|
352 |
+
),
|
353 |
'Ai1ec_Cookie_Present_Dto' =>
|
354 |
array (
|
355 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'cookie' . DIRECTORY_SEPARATOR . 'dto.php',
|
469 |
'i' => 'n',
|
470 |
'r' => 'y',
|
471 |
),
|
472 |
+
'Ai1ec_Embeddable' =>
|
473 |
+
array (
|
474 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'embeddable.php',
|
475 |
+
'c' => 'Ai1ec_Embeddable',
|
476 |
+
'i' => 'g',
|
477 |
+
),
|
478 |
'Ai1ec_Engine_Not_Set_Exception' =>
|
479 |
array (
|
480 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'controller' . DIRECTORY_SEPARATOR . 'exception' . DIRECTORY_SEPARATOR . 'engine-not-set.php',
|
529 |
'i' => 'n',
|
530 |
'r' => 'y',
|
531 |
),
|
532 |
+
'Ai1ec_Event_Compatibility' =>
|
533 |
+
array (
|
534 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR . 'event-compatibility.php',
|
535 |
+
'c' => 'Ai1ec_Event_Compatibility',
|
536 |
+
'i' => 'Ai1ec_Factory_Event.create_event_instance',
|
537 |
+
'r' => 'y',
|
538 |
+
),
|
539 |
'Ai1ec_Event_Create_Exception' =>
|
540 |
array (
|
541 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR . 'event' . DIRECTORY_SEPARATOR . 'event-create-exception.php',
|
602 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR . 'event' . DIRECTORY_SEPARATOR . 'taxonomy.php',
|
603 |
'c' => 'Ai1ec_Event_Taxonomy',
|
604 |
'i' => 'n',
|
605 |
+
'r' => 'y',
|
606 |
),
|
607 |
'Ai1ec_Event_Trashing' =>
|
608 |
array (
|
997 |
'i' => 'g',
|
998 |
'r' => 'y',
|
999 |
),
|
1000 |
+
'Ai1ec_News_Feed' =>
|
1001 |
+
array (
|
1002 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'news' . DIRECTORY_SEPARATOR . 'feed.php',
|
1003 |
+
'c' => 'Ai1ec_News_Feed',
|
1004 |
+
'i' => 'g',
|
1005 |
+
),
|
1006 |
'Ai1ec_Notification' =>
|
1007 |
array (
|
1008 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'notification' . DIRECTORY_SEPARATOR . 'abstract.php',
|
1024 |
'i' => 'g',
|
1025 |
'r' => 'y',
|
1026 |
),
|
1027 |
+
'Ai1ec_Outdated_Addon_Exception' =>
|
1028 |
+
array (
|
1029 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'environment' . DIRECTORY_SEPARATOR . 'exception' . DIRECTORY_SEPARATOR . 'addon.php',
|
1030 |
+
'c' => 'Ai1ec_Outdated_Addon_Exception',
|
1031 |
+
'i' => 'g',
|
1032 |
+
),
|
1033 |
'Ai1ec_Parse_Exception' =>
|
1034 |
array (
|
1035 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'import-export' . DIRECTORY_SEPARATOR . 'exception.php',
|
1365 |
'i' => 'g',
|
1366 |
'r' => 'y',
|
1367 |
),
|
1368 |
+
'Ai1ec_View_Add_Ons' =>
|
1369 |
+
array (
|
1370 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'add-ons.php',
|
1371 |
+
'c' => 'Ai1ec_View_Add_Ons',
|
1372 |
+
'i' => 'g',
|
1373 |
+
'r' => 'y',
|
1374 |
+
),
|
1375 |
'Ai1ec_View_Admin_Abstract' =>
|
1376 |
array (
|
1377 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'abstract.php',
|
1523 |
'i' => 'g',
|
1524 |
'r' => 'y',
|
1525 |
),
|
1526 |
+
'Ai1ec_View_Widget_Creator' =>
|
1527 |
+
array (
|
1528 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'widget-creator.php',
|
1529 |
+
'c' => 'Ai1ec_View_Widget_Creator',
|
1530 |
+
'i' => 'g',
|
1531 |
+
'r' => 'y',
|
1532 |
+
),
|
1533 |
'Ai1ec_Wp_Uri_Helper' =>
|
1534 |
array (
|
1535 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'routing' . DIRECTORY_SEPARATOR . 'uri-helper.php',
|
2581 |
'c' => 'Twig_TokenStream',
|
2582 |
'i' => 'g',
|
2583 |
),
|
2584 |
+
'__TwigTemplate_04184c73b8c7ce7223d1dfe1e6f79fe17690e8b74969b07b58a06c2994a0d9e6' =>
|
2585 |
+
array (
|
2586 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '04' . DIRECTORY_SEPARATOR . '18' . DIRECTORY_SEPARATOR . '4c73b8c7ce7223d1dfe1e6f79fe17690e8b74969b07b58a06c2994a0d9e6.php',
|
2587 |
+
'c' => '__TwigTemplate_04184c73b8c7ce7223d1dfe1e6f79fe17690e8b74969b07b58a06c2994a0d9e6',
|
2588 |
+
'i' => 'g',
|
2589 |
+
),
|
2590 |
+
'__TwigTemplate_0637d929bcaa80c8f95cc2e341066aa553f8bc8d62a627a097e42516253258f7' =>
|
2591 |
+
array (
|
2592 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '06' . DIRECTORY_SEPARATOR . '37' . DIRECTORY_SEPARATOR . 'd929bcaa80c8f95cc2e341066aa553f8bc8d62a627a097e42516253258f7.php',
|
2593 |
+
'c' => '__TwigTemplate_0637d929bcaa80c8f95cc2e341066aa553f8bc8d62a627a097e42516253258f7',
|
2594 |
+
'i' => 'g',
|
2595 |
+
),
|
2596 |
+
'__TwigTemplate_08e44d5fc50332367b2d7e81902230ac0e7ea950ee003ec7a490752fc6534c00' =>
|
2597 |
+
array (
|
2598 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '08' . DIRECTORY_SEPARATOR . 'e4' . DIRECTORY_SEPARATOR . '4d5fc50332367b2d7e81902230ac0e7ea950ee003ec7a490752fc6534c00.php',
|
2599 |
+
'c' => '__TwigTemplate_08e44d5fc50332367b2d7e81902230ac0e7ea950ee003ec7a490752fc6534c00',
|
2600 |
+
'i' => 'g',
|
2601 |
+
),
|
2602 |
+
'__TwigTemplate_1f25bacc16e82305cef35f2d4954e3a58cf88f86b74ba3bdfdb3edd107c03a6d' =>
|
2603 |
+
array (
|
2604 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '1f' . DIRECTORY_SEPARATOR . '25' . DIRECTORY_SEPARATOR . 'bacc16e82305cef35f2d4954e3a58cf88f86b74ba3bdfdb3edd107c03a6d.php',
|
2605 |
+
'c' => '__TwigTemplate_1f25bacc16e82305cef35f2d4954e3a58cf88f86b74ba3bdfdb3edd107c03a6d',
|
2606 |
+
'i' => 'g',
|
2607 |
+
),
|
2608 |
+
'__TwigTemplate_21cfb7e0c7543e64053052e7d3df401f7fdde0a3873bf1f837c0be10edd95099' =>
|
2609 |
+
array (
|
2610 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '21' . DIRECTORY_SEPARATOR . 'cf' . DIRECTORY_SEPARATOR . 'b7e0c7543e64053052e7d3df401f7fdde0a3873bf1f837c0be10edd95099.php',
|
2611 |
+
'c' => '__TwigTemplate_21cfb7e0c7543e64053052e7d3df401f7fdde0a3873bf1f837c0be10edd95099',
|
2612 |
+
'i' => 'g',
|
2613 |
+
),
|
2614 |
+
'__TwigTemplate_25cf38a130b14648c0aca4ff6f257001cca5d546a903039bd078463facea12bd' =>
|
2615 |
+
array (
|
2616 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '25' . DIRECTORY_SEPARATOR . 'cf' . DIRECTORY_SEPARATOR . '38a130b14648c0aca4ff6f257001cca5d546a903039bd078463facea12bd.php',
|
2617 |
+
'c' => '__TwigTemplate_25cf38a130b14648c0aca4ff6f257001cca5d546a903039bd078463facea12bd',
|
2618 |
+
'i' => 'g',
|
2619 |
+
),
|
2620 |
+
'__TwigTemplate_26624a4f92c0d3894cd5eb735508b4c009471e957872345c3b56f7b41ef3ea7e' =>
|
2621 |
+
array (
|
2622 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '26' . DIRECTORY_SEPARATOR . '62' . DIRECTORY_SEPARATOR . '4a4f92c0d3894cd5eb735508b4c009471e957872345c3b56f7b41ef3ea7e.php',
|
2623 |
+
'c' => '__TwigTemplate_26624a4f92c0d3894cd5eb735508b4c009471e957872345c3b56f7b41ef3ea7e',
|
2624 |
+
'i' => 'g',
|
2625 |
+
),
|
2626 |
+
'__TwigTemplate_2715acf678c380d630c83d3a7e40c2555c0b4cb21a16d95a1cc06a601f043e45' =>
|
2627 |
+
array (
|
2628 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '27' . DIRECTORY_SEPARATOR . '15' . DIRECTORY_SEPARATOR . 'acf678c380d630c83d3a7e40c2555c0b4cb21a16d95a1cc06a601f043e45.php',
|
2629 |
+
'c' => '__TwigTemplate_2715acf678c380d630c83d3a7e40c2555c0b4cb21a16d95a1cc06a601f043e45',
|
2630 |
+
'i' => 'g',
|
2631 |
+
),
|
2632 |
+
'__TwigTemplate_329deb0ec180c4f8841124bdaf197b12ef9a98a20063c07a36cdeb9375af3c8e' =>
|
2633 |
+
array (
|
2634 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '32' . DIRECTORY_SEPARATOR . '9d' . DIRECTORY_SEPARATOR . 'eb0ec180c4f8841124bdaf197b12ef9a98a20063c07a36cdeb9375af3c8e.php',
|
2635 |
+
'c' => '__TwigTemplate_329deb0ec180c4f8841124bdaf197b12ef9a98a20063c07a36cdeb9375af3c8e',
|
2636 |
+
'i' => 'g',
|
2637 |
+
),
|
2638 |
+
'__TwigTemplate_33e16cf8aa9822e97c186ffb4cb4ca897e21f410bfd489328566d22b282224cc' =>
|
2639 |
+
array (
|
2640 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '33' . DIRECTORY_SEPARATOR . 'e1' . DIRECTORY_SEPARATOR . '6cf8aa9822e97c186ffb4cb4ca897e21f410bfd489328566d22b282224cc.php',
|
2641 |
+
'c' => '__TwigTemplate_33e16cf8aa9822e97c186ffb4cb4ca897e21f410bfd489328566d22b282224cc',
|
2642 |
+
'i' => 'g',
|
2643 |
+
),
|
2644 |
+
'__TwigTemplate_3714fa01bbe4d4ffa4f03a4cba6fb9acbd490824785b969c9e705534675c60f5' =>
|
2645 |
+
array (
|
2646 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '37' . DIRECTORY_SEPARATOR . '14' . DIRECTORY_SEPARATOR . 'fa01bbe4d4ffa4f03a4cba6fb9acbd490824785b969c9e705534675c60f5.php',
|
2647 |
+
'c' => '__TwigTemplate_3714fa01bbe4d4ffa4f03a4cba6fb9acbd490824785b969c9e705534675c60f5',
|
2648 |
+
'i' => 'g',
|
2649 |
+
),
|
2650 |
+
'__TwigTemplate_4932ea4178e92f66ddbdb1feb9ec1496773dcb031265fc870a3e981abc68ca2a' =>
|
2651 |
+
array (
|
2652 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '49' . DIRECTORY_SEPARATOR . '32' . DIRECTORY_SEPARATOR . 'ea4178e92f66ddbdb1feb9ec1496773dcb031265fc870a3e981abc68ca2a.php',
|
2653 |
+
'c' => '__TwigTemplate_4932ea4178e92f66ddbdb1feb9ec1496773dcb031265fc870a3e981abc68ca2a',
|
2654 |
+
'i' => 'g',
|
2655 |
+
),
|
2656 |
+
'__TwigTemplate_5ca1499a9c32090a9a368a28b4c13261022bf5d11f22b5211fb873b104fc70e4' =>
|
2657 |
+
array (
|
2658 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '5c' . DIRECTORY_SEPARATOR . 'a1' . DIRECTORY_SEPARATOR . '499a9c32090a9a368a28b4c13261022bf5d11f22b5211fb873b104fc70e4.php',
|
2659 |
+
'c' => '__TwigTemplate_5ca1499a9c32090a9a368a28b4c13261022bf5d11f22b5211fb873b104fc70e4',
|
2660 |
+
'i' => 'g',
|
2661 |
+
),
|
2662 |
+
'__TwigTemplate_5dd773750481354d81ed8097491f321553b77d6cdc59276d9122a7dde91c0eb3' =>
|
2663 |
+
array (
|
2664 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '5d' . DIRECTORY_SEPARATOR . 'd7' . DIRECTORY_SEPARATOR . '73750481354d81ed8097491f321553b77d6cdc59276d9122a7dde91c0eb3.php',
|
2665 |
+
'c' => '__TwigTemplate_5dd773750481354d81ed8097491f321553b77d6cdc59276d9122a7dde91c0eb3',
|
2666 |
+
'i' => 'g',
|
2667 |
+
),
|
2668 |
+
'__TwigTemplate_748f9fcd9eaa89a1116c6d9eea0983a4cc663ce75faa449b2f4ab2f7d1e54092' =>
|
2669 |
+
array (
|
2670 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '74' . DIRECTORY_SEPARATOR . '8f' . DIRECTORY_SEPARATOR . '9fcd9eaa89a1116c6d9eea0983a4cc663ce75faa449b2f4ab2f7d1e54092.php',
|
2671 |
+
'c' => '__TwigTemplate_748f9fcd9eaa89a1116c6d9eea0983a4cc663ce75faa449b2f4ab2f7d1e54092',
|
2672 |
+
'i' => 'g',
|
2673 |
+
),
|
2674 |
+
'__TwigTemplate_783e57d2212e2837aee7813ecc844f345947f68d3edb57d31388f926a75264db' =>
|
2675 |
+
array (
|
2676 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '78' . DIRECTORY_SEPARATOR . '3e' . DIRECTORY_SEPARATOR . '57d2212e2837aee7813ecc844f345947f68d3edb57d31388f926a75264db.php',
|
2677 |
+
'c' => '__TwigTemplate_783e57d2212e2837aee7813ecc844f345947f68d3edb57d31388f926a75264db',
|
2678 |
+
'i' => 'g',
|
2679 |
+
),
|
2680 |
+
'__TwigTemplate_7a118b4d92f97f1deee45684469b3beb98e214e0d5a32c9a259b9bcf81a41145' =>
|
2681 |
+
array (
|
2682 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '7a' . DIRECTORY_SEPARATOR . '11' . DIRECTORY_SEPARATOR . '8b4d92f97f1deee45684469b3beb98e214e0d5a32c9a259b9bcf81a41145.php',
|
2683 |
+
'c' => '__TwigTemplate_7a118b4d92f97f1deee45684469b3beb98e214e0d5a32c9a259b9bcf81a41145',
|
2684 |
+
'i' => 'g',
|
2685 |
+
),
|
2686 |
+
'__TwigTemplate_82b0255fefe74fca92677a6a96c9e569117eabff494d93e0b5f6b38cdaaea0b0' =>
|
2687 |
+
array (
|
2688 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '82' . DIRECTORY_SEPARATOR . 'b0' . DIRECTORY_SEPARATOR . '255fefe74fca92677a6a96c9e569117eabff494d93e0b5f6b38cdaaea0b0.php',
|
2689 |
+
'c' => '__TwigTemplate_82b0255fefe74fca92677a6a96c9e569117eabff494d93e0b5f6b38cdaaea0b0',
|
2690 |
+
'i' => 'g',
|
2691 |
+
),
|
2692 |
+
'__TwigTemplate_862f5bd0aae3cdc2eb247965d6758532defae4940dfe30c68378e622f1d1148c' =>
|
2693 |
+
array (
|
2694 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '86' . DIRECTORY_SEPARATOR . '2f' . DIRECTORY_SEPARATOR . '5bd0aae3cdc2eb247965d6758532defae4940dfe30c68378e622f1d1148c.php',
|
2695 |
+
'c' => '__TwigTemplate_862f5bd0aae3cdc2eb247965d6758532defae4940dfe30c68378e622f1d1148c',
|
2696 |
+
'i' => 'g',
|
2697 |
+
),
|
2698 |
+
'__TwigTemplate_89d906e4eee3169b93edc33ec32aac5ff78e197d36969e2b8d0437bf2f0283a2' =>
|
2699 |
+
array (
|
2700 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '89' . DIRECTORY_SEPARATOR . 'd9' . DIRECTORY_SEPARATOR . '06e4eee3169b93edc33ec32aac5ff78e197d36969e2b8d0437bf2f0283a2.php',
|
2701 |
+
'c' => '__TwigTemplate_89d906e4eee3169b93edc33ec32aac5ff78e197d36969e2b8d0437bf2f0283a2',
|
2702 |
+
'i' => 'g',
|
2703 |
+
),
|
2704 |
+
'__TwigTemplate_8ab3a406d66e131df0ce2cd5f806db207bd6b5c7b1b0a7d4aea4080218183ebd' =>
|
2705 |
+
array (
|
2706 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '8a' . DIRECTORY_SEPARATOR . 'b3' . DIRECTORY_SEPARATOR . 'a406d66e131df0ce2cd5f806db207bd6b5c7b1b0a7d4aea4080218183ebd.php',
|
2707 |
+
'c' => '__TwigTemplate_8ab3a406d66e131df0ce2cd5f806db207bd6b5c7b1b0a7d4aea4080218183ebd',
|
2708 |
+
'i' => 'g',
|
2709 |
+
),
|
2710 |
+
'__TwigTemplate_943e432a0dcbd7fe60a569412aaad985e131799f5363073300d0a6cd788b4d71' =>
|
2711 |
+
array (
|
2712 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '94' . DIRECTORY_SEPARATOR . '3e' . DIRECTORY_SEPARATOR . '432a0dcbd7fe60a569412aaad985e131799f5363073300d0a6cd788b4d71.php',
|
2713 |
+
'c' => '__TwigTemplate_943e432a0dcbd7fe60a569412aaad985e131799f5363073300d0a6cd788b4d71',
|
2714 |
+
'i' => 'g',
|
2715 |
+
),
|
2716 |
+
'__TwigTemplate_95b0bc90e12b886869857ead6c28360f596d7226395498afb6afc90ae60143ca' =>
|
2717 |
+
array (
|
2718 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '95' . DIRECTORY_SEPARATOR . 'b0' . DIRECTORY_SEPARATOR . 'bc90e12b886869857ead6c28360f596d7226395498afb6afc90ae60143ca.php',
|
2719 |
+
'c' => '__TwigTemplate_95b0bc90e12b886869857ead6c28360f596d7226395498afb6afc90ae60143ca',
|
2720 |
+
'i' => 'g',
|
2721 |
+
),
|
2722 |
+
'__TwigTemplate_9c3c1820db174d7efba416743bbb9bf744e8454155f8129f69296092b49c45d3' =>
|
2723 |
+
array (
|
2724 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '9c' . DIRECTORY_SEPARATOR . '3c' . DIRECTORY_SEPARATOR . '1820db174d7efba416743bbb9bf744e8454155f8129f69296092b49c45d3.php',
|
2725 |
+
'c' => '__TwigTemplate_9c3c1820db174d7efba416743bbb9bf744e8454155f8129f69296092b49c45d3',
|
2726 |
+
'i' => 'g',
|
2727 |
+
),
|
2728 |
+
'__TwigTemplate_a54faca929c567a44d5e4e2e7cf06d45c14508bd3d07f5bdfb60a7ddce3ec07a' =>
|
2729 |
+
array (
|
2730 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'a5' . DIRECTORY_SEPARATOR . '4f' . DIRECTORY_SEPARATOR . 'aca929c567a44d5e4e2e7cf06d45c14508bd3d07f5bdfb60a7ddce3ec07a.php',
|
2731 |
+
'c' => '__TwigTemplate_a54faca929c567a44d5e4e2e7cf06d45c14508bd3d07f5bdfb60a7ddce3ec07a',
|
2732 |
+
'i' => 'g',
|
2733 |
+
),
|
2734 |
+
'__TwigTemplate_aa616d3f918f480e4f6f0dabdeee1324d87d759ec18352a21a1cfcee8802f528' =>
|
2735 |
+
array (
|
2736 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'aa' . DIRECTORY_SEPARATOR . '61' . DIRECTORY_SEPARATOR . '6d3f918f480e4f6f0dabdeee1324d87d759ec18352a21a1cfcee8802f528.php',
|
2737 |
+
'c' => '__TwigTemplate_aa616d3f918f480e4f6f0dabdeee1324d87d759ec18352a21a1cfcee8802f528',
|
2738 |
+
'i' => 'g',
|
2739 |
+
),
|
2740 |
+
'__TwigTemplate_aaf160acb65256cd5e7a75c653378172251a21509b15232d1e2afc9c3dc3e446' =>
|
2741 |
+
array (
|
2742 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'aa' . DIRECTORY_SEPARATOR . 'f1' . DIRECTORY_SEPARATOR . '60acb65256cd5e7a75c653378172251a21509b15232d1e2afc9c3dc3e446.php',
|
2743 |
+
'c' => '__TwigTemplate_aaf160acb65256cd5e7a75c653378172251a21509b15232d1e2afc9c3dc3e446',
|
2744 |
+
'i' => 'g',
|
2745 |
+
),
|
2746 |
+
'__TwigTemplate_b1af5b1cfc01f62c430dd9a064f9459384693440bf30e05d6a34dcdfa47540e4' =>
|
2747 |
+
array (
|
2748 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'b1' . DIRECTORY_SEPARATOR . 'af' . DIRECTORY_SEPARATOR . '5b1cfc01f62c430dd9a064f9459384693440bf30e05d6a34dcdfa47540e4.php',
|
2749 |
+
'c' => '__TwigTemplate_b1af5b1cfc01f62c430dd9a064f9459384693440bf30e05d6a34dcdfa47540e4',
|
2750 |
+
'i' => 'g',
|
2751 |
+
),
|
2752 |
+
'__TwigTemplate_b5633d95de14839f5641ad75e89a427aa6fdfc24b529c6a3f1d8e24779f6f79f' =>
|
2753 |
+
array (
|
2754 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'b5' . DIRECTORY_SEPARATOR . '63' . DIRECTORY_SEPARATOR . '3d95de14839f5641ad75e89a427aa6fdfc24b529c6a3f1d8e24779f6f79f.php',
|
2755 |
+
'c' => '__TwigTemplate_b5633d95de14839f5641ad75e89a427aa6fdfc24b529c6a3f1d8e24779f6f79f',
|
2756 |
+
'i' => 'g',
|
2757 |
+
),
|
2758 |
+
'__TwigTemplate_c1804f545c5b33b8114cc21fe6cb5c59952fa8c7d680d237c3ca4d3f63b96c1c' =>
|
2759 |
+
array (
|
2760 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'c1' . DIRECTORY_SEPARATOR . '80' . DIRECTORY_SEPARATOR . '4f545c5b33b8114cc21fe6cb5c59952fa8c7d680d237c3ca4d3f63b96c1c.php',
|
2761 |
+
'c' => '__TwigTemplate_c1804f545c5b33b8114cc21fe6cb5c59952fa8c7d680d237c3ca4d3f63b96c1c',
|
2762 |
+
'i' => 'g',
|
2763 |
+
),
|
2764 |
+
'__TwigTemplate_dc78b950182efb8f436b144938fb0dc48cf395d7daabe20293234dbcf2b26545' =>
|
2765 |
+
array (
|
2766 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'dc' . DIRECTORY_SEPARATOR . '78' . DIRECTORY_SEPARATOR . 'b950182efb8f436b144938fb0dc48cf395d7daabe20293234dbcf2b26545.php',
|
2767 |
+
'c' => '__TwigTemplate_dc78b950182efb8f436b144938fb0dc48cf395d7daabe20293234dbcf2b26545',
|
2768 |
+
'i' => 'g',
|
2769 |
+
),
|
2770 |
+
'__TwigTemplate_e2c54407992fc7f64fc763c8fa820f4d1ef92de870acc466bbd2209e5965d014' =>
|
2771 |
+
array (
|
2772 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'e2' . DIRECTORY_SEPARATOR . 'c5' . DIRECTORY_SEPARATOR . '4407992fc7f64fc763c8fa820f4d1ef92de870acc466bbd2209e5965d014.php',
|
2773 |
+
'c' => '__TwigTemplate_e2c54407992fc7f64fc763c8fa820f4d1ef92de870acc466bbd2209e5965d014',
|
2774 |
+
'i' => 'g',
|
2775 |
+
),
|
2776 |
+
'__TwigTemplate_e90fcb1f091e9b4127585185e68c26f1b9d6d847e0152d264f92b621d5ec2944' =>
|
2777 |
+
array (
|
2778 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'e9' . DIRECTORY_SEPARATOR . '0f' . DIRECTORY_SEPARATOR . 'cb1f091e9b4127585185e68c26f1b9d6d847e0152d264f92b621d5ec2944.php',
|
2779 |
+
'c' => '__TwigTemplate_e90fcb1f091e9b4127585185e68c26f1b9d6d847e0152d264f92b621d5ec2944',
|
2780 |
+
'i' => 'g',
|
2781 |
+
),
|
2782 |
+
'__TwigTemplate_f05703afef869c4fea0061567a42872d377423a41be579565d0cdf32260df05f' =>
|
2783 |
+
array (
|
2784 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'f0' . DIRECTORY_SEPARATOR . '57' . DIRECTORY_SEPARATOR . '03afef869c4fea0061567a42872d377423a41be579565d0cdf32260df05f.php',
|
2785 |
+
'c' => '__TwigTemplate_f05703afef869c4fea0061567a42872d377423a41be579565d0cdf32260df05f',
|
2786 |
+
'i' => 'g',
|
2787 |
+
),
|
2788 |
+
'__TwigTemplate_f927e9ebb965697e227fa8ba7991946a80bc34917fe8e437edbc0c4567956326' =>
|
2789 |
+
array (
|
2790 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'f9' . DIRECTORY_SEPARATOR . '27' . DIRECTORY_SEPARATOR . 'e9ebb965697e227fa8ba7991946a80bc34917fe8e437edbc0c4567956326.php',
|
2791 |
+
'c' => '__TwigTemplate_f927e9ebb965697e227fa8ba7991946a80bc34917fe8e437edbc0c4567956326',
|
2792 |
+
'i' => 'g',
|
2793 |
+
),
|
2794 |
+
'__TwigTemplate_fe5fa372e0eb51f713beb664be0cf0c9c8c78572b1851c15eac685f6cd98c181' =>
|
2795 |
+
array (
|
2796 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'fe' . DIRECTORY_SEPARATOR . '5f' . DIRECTORY_SEPARATOR . 'a372e0eb51f713beb664be0cf0c9c8c78572b1851c15eac685f6cd98c181.php',
|
2797 |
+
'c' => '__TwigTemplate_fe5fa372e0eb51f713beb664be0cf0c9c8c78572b1851c15eac685f6cd98c181',
|
2798 |
+
'i' => 'g',
|
2799 |
+
),
|
2800 |
'acl.aco' =>
|
2801 |
array (
|
2802 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'acl' . DIRECTORY_SEPARATOR . 'aco.php',
|
3129 |
'i' => 'g',
|
3130 |
'r' => 'y',
|
3131 |
),
|
3132 |
+
'controller.javascript-widget' =>
|
3133 |
+
array (
|
3134 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'controller' . DIRECTORY_SEPARATOR . 'javascript-widget.php',
|
3135 |
+
'c' => 'Ai1ec_Controller_Javascript_Widget',
|
3136 |
+
'i' => 'g',
|
3137 |
+
'r' => 'y',
|
3138 |
+
),
|
3139 |
'controller.shutdown' =>
|
3140 |
array (
|
3141 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'controller' . DIRECTORY_SEPARATOR . 'shutdown.php',
|
3293 |
'i' => 'g',
|
3294 |
'r' => 'y',
|
3295 |
),
|
3296 |
+
'environment.exception.addon' =>
|
3297 |
+
array (
|
3298 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'environment' . DIRECTORY_SEPARATOR . 'exception' . DIRECTORY_SEPARATOR . 'addon.php',
|
3299 |
+
'c' => 'Ai1ec_Outdated_Addon_Exception',
|
3300 |
+
'i' => 'g',
|
3301 |
+
),
|
3302 |
'event.callback.abstract' =>
|
3303 |
array (
|
3304 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'event' . DIRECTORY_SEPARATOR . 'callback' . DIRECTORY_SEPARATOR . 'abstract.php',
|
3807 |
'i' => 'Ai1ec_Factory_Event.create_event_instance',
|
3808 |
'r' => 'y',
|
3809 |
),
|
3810 |
+
'model.event-compatibility' =>
|
3811 |
+
array (
|
3812 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR . 'event-compatibility.php',
|
3813 |
+
'c' => 'Ai1ec_Event_Compatibility',
|
3814 |
+
'i' => 'Ai1ec_Factory_Event.create_event_instance',
|
3815 |
+
'r' => 'y',
|
3816 |
+
),
|
3817 |
'model.event.creating' =>
|
3818 |
array (
|
3819 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR . 'event' . DIRECTORY_SEPARATOR . 'creating.php',
|
3872 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'model' . DIRECTORY_SEPARATOR . 'event' . DIRECTORY_SEPARATOR . 'taxonomy.php',
|
3873 |
'c' => 'Ai1ec_Event_Taxonomy',
|
3874 |
'i' => 'n',
|
3875 |
+
'r' => 'y',
|
3876 |
),
|
3877 |
'model.event.trashing' =>
|
3878 |
array (
|
3991 |
'i' => 'g',
|
3992 |
'r' => 'y',
|
3993 |
),
|
3994 |
+
'news.feed' =>
|
3995 |
+
array (
|
3996 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'news' . DIRECTORY_SEPARATOR . 'feed.php',
|
3997 |
+
'c' => 'Ai1ec_News_Feed',
|
3998 |
+
'i' => 'g',
|
3999 |
+
),
|
4000 |
'notification.abstract' =>
|
4001 |
array (
|
4002 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'notification' . DIRECTORY_SEPARATOR . 'abstract.php',
|
4219 |
'i' => 'g',
|
4220 |
'r' => 'y',
|
4221 |
),
|
4222 |
+
'twig.04.18.4c73b8c7ce7223d1dfe1e6f79fe17690e8b74969b07b58a06c2994a0d9e6' =>
|
4223 |
+
array (
|
4224 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '04' . DIRECTORY_SEPARATOR . '18' . DIRECTORY_SEPARATOR . '4c73b8c7ce7223d1dfe1e6f79fe17690e8b74969b07b58a06c2994a0d9e6.php',
|
4225 |
+
'c' => '__TwigTemplate_04184c73b8c7ce7223d1dfe1e6f79fe17690e8b74969b07b58a06c2994a0d9e6',
|
4226 |
+
'i' => 'g',
|
4227 |
+
),
|
4228 |
+
'twig.06.37.d929bcaa80c8f95cc2e341066aa553f8bc8d62a627a097e42516253258f7' =>
|
4229 |
+
array (
|
4230 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '06' . DIRECTORY_SEPARATOR . '37' . DIRECTORY_SEPARATOR . 'd929bcaa80c8f95cc2e341066aa553f8bc8d62a627a097e42516253258f7.php',
|
4231 |
+
'c' => '__TwigTemplate_0637d929bcaa80c8f95cc2e341066aa553f8bc8d62a627a097e42516253258f7',
|
4232 |
+
'i' => 'g',
|
4233 |
+
),
|
4234 |
+
'twig.08.e4.4d5fc50332367b2d7e81902230ac0e7ea950ee003ec7a490752fc6534c00' =>
|
4235 |
+
array (
|
4236 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '08' . DIRECTORY_SEPARATOR . 'e4' . DIRECTORY_SEPARATOR . '4d5fc50332367b2d7e81902230ac0e7ea950ee003ec7a490752fc6534c00.php',
|
4237 |
+
'c' => '__TwigTemplate_08e44d5fc50332367b2d7e81902230ac0e7ea950ee003ec7a490752fc6534c00',
|
4238 |
+
'i' => 'g',
|
4239 |
+
),
|
4240 |
+
'twig.1f.25.bacc16e82305cef35f2d4954e3a58cf88f86b74ba3bdfdb3edd107c03a6d' =>
|
4241 |
+
array (
|
4242 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '1f' . DIRECTORY_SEPARATOR . '25' . DIRECTORY_SEPARATOR . 'bacc16e82305cef35f2d4954e3a58cf88f86b74ba3bdfdb3edd107c03a6d.php',
|
4243 |
+
'c' => '__TwigTemplate_1f25bacc16e82305cef35f2d4954e3a58cf88f86b74ba3bdfdb3edd107c03a6d',
|
4244 |
+
'i' => 'g',
|
4245 |
+
),
|
4246 |
+
'twig.21.cf.b7e0c7543e64053052e7d3df401f7fdde0a3873bf1f837c0be10edd95099' =>
|
4247 |
+
array (
|
4248 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '21' . DIRECTORY_SEPARATOR . 'cf' . DIRECTORY_SEPARATOR . 'b7e0c7543e64053052e7d3df401f7fdde0a3873bf1f837c0be10edd95099.php',
|
4249 |
+
'c' => '__TwigTemplate_21cfb7e0c7543e64053052e7d3df401f7fdde0a3873bf1f837c0be10edd95099',
|
4250 |
+
'i' => 'g',
|
4251 |
+
),
|
4252 |
+
'twig.25.cf.38a130b14648c0aca4ff6f257001cca5d546a903039bd078463facea12bd' =>
|
4253 |
+
array (
|
4254 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '25' . DIRECTORY_SEPARATOR . 'cf' . DIRECTORY_SEPARATOR . '38a130b14648c0aca4ff6f257001cca5d546a903039bd078463facea12bd.php',
|
4255 |
+
'c' => '__TwigTemplate_25cf38a130b14648c0aca4ff6f257001cca5d546a903039bd078463facea12bd',
|
4256 |
+
'i' => 'g',
|
4257 |
+
),
|
4258 |
+
'twig.26.62.4a4f92c0d3894cd5eb735508b4c009471e957872345c3b56f7b41ef3ea7e' =>
|
4259 |
+
array (
|
4260 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '26' . DIRECTORY_SEPARATOR . '62' . DIRECTORY_SEPARATOR . '4a4f92c0d3894cd5eb735508b4c009471e957872345c3b56f7b41ef3ea7e.php',
|
4261 |
+
'c' => '__TwigTemplate_26624a4f92c0d3894cd5eb735508b4c009471e957872345c3b56f7b41ef3ea7e',
|
4262 |
+
'i' => 'g',
|
4263 |
+
),
|
4264 |
+
'twig.27.15.acf678c380d630c83d3a7e40c2555c0b4cb21a16d95a1cc06a601f043e45' =>
|
4265 |
+
array (
|
4266 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '27' . DIRECTORY_SEPARATOR . '15' . DIRECTORY_SEPARATOR . 'acf678c380d630c83d3a7e40c2555c0b4cb21a16d95a1cc06a601f043e45.php',
|
4267 |
+
'c' => '__TwigTemplate_2715acf678c380d630c83d3a7e40c2555c0b4cb21a16d95a1cc06a601f043e45',
|
4268 |
+
'i' => 'g',
|
4269 |
+
),
|
4270 |
+
'twig.32.9d.eb0ec180c4f8841124bdaf197b12ef9a98a20063c07a36cdeb9375af3c8e' =>
|
4271 |
+
array (
|
4272 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '32' . DIRECTORY_SEPARATOR . '9d' . DIRECTORY_SEPARATOR . 'eb0ec180c4f8841124bdaf197b12ef9a98a20063c07a36cdeb9375af3c8e.php',
|
4273 |
+
'c' => '__TwigTemplate_329deb0ec180c4f8841124bdaf197b12ef9a98a20063c07a36cdeb9375af3c8e',
|
4274 |
+
'i' => 'g',
|
4275 |
+
),
|
4276 |
+
'twig.33.e1.6cf8aa9822e97c186ffb4cb4ca897e21f410bfd489328566d22b282224cc' =>
|
4277 |
+
array (
|
4278 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '33' . DIRECTORY_SEPARATOR . 'e1' . DIRECTORY_SEPARATOR . '6cf8aa9822e97c186ffb4cb4ca897e21f410bfd489328566d22b282224cc.php',
|
4279 |
+
'c' => '__TwigTemplate_33e16cf8aa9822e97c186ffb4cb4ca897e21f410bfd489328566d22b282224cc',
|
4280 |
+
'i' => 'g',
|
4281 |
+
),
|
4282 |
+
'twig.37.14.fa01bbe4d4ffa4f03a4cba6fb9acbd490824785b969c9e705534675c60f5' =>
|
4283 |
+
array (
|
4284 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '37' . DIRECTORY_SEPARATOR . '14' . DIRECTORY_SEPARATOR . 'fa01bbe4d4ffa4f03a4cba6fb9acbd490824785b969c9e705534675c60f5.php',
|
4285 |
+
'c' => '__TwigTemplate_3714fa01bbe4d4ffa4f03a4cba6fb9acbd490824785b969c9e705534675c60f5',
|
4286 |
+
'i' => 'g',
|
4287 |
+
),
|
4288 |
+
'twig.49.32.ea4178e92f66ddbdb1feb9ec1496773dcb031265fc870a3e981abc68ca2a' =>
|
4289 |
+
array (
|
4290 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '49' . DIRECTORY_SEPARATOR . '32' . DIRECTORY_SEPARATOR . 'ea4178e92f66ddbdb1feb9ec1496773dcb031265fc870a3e981abc68ca2a.php',
|
4291 |
+
'c' => '__TwigTemplate_4932ea4178e92f66ddbdb1feb9ec1496773dcb031265fc870a3e981abc68ca2a',
|
4292 |
+
'i' => 'g',
|
4293 |
+
),
|
4294 |
+
'twig.5c.a1.499a9c32090a9a368a28b4c13261022bf5d11f22b5211fb873b104fc70e4' =>
|
4295 |
+
array (
|
4296 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '5c' . DIRECTORY_SEPARATOR . 'a1' . DIRECTORY_SEPARATOR . '499a9c32090a9a368a28b4c13261022bf5d11f22b5211fb873b104fc70e4.php',
|
4297 |
+
'c' => '__TwigTemplate_5ca1499a9c32090a9a368a28b4c13261022bf5d11f22b5211fb873b104fc70e4',
|
4298 |
+
'i' => 'g',
|
4299 |
+
),
|
4300 |
+
'twig.5d.d7.73750481354d81ed8097491f321553b77d6cdc59276d9122a7dde91c0eb3' =>
|
4301 |
+
array (
|
4302 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '5d' . DIRECTORY_SEPARATOR . 'd7' . DIRECTORY_SEPARATOR . '73750481354d81ed8097491f321553b77d6cdc59276d9122a7dde91c0eb3.php',
|
4303 |
+
'c' => '__TwigTemplate_5dd773750481354d81ed8097491f321553b77d6cdc59276d9122a7dde91c0eb3',
|
4304 |
+
'i' => 'g',
|
4305 |
+
),
|
4306 |
+
'twig.74.8f.9fcd9eaa89a1116c6d9eea0983a4cc663ce75faa449b2f4ab2f7d1e54092' =>
|
4307 |
+
array (
|
4308 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '74' . DIRECTORY_SEPARATOR . '8f' . DIRECTORY_SEPARATOR . '9fcd9eaa89a1116c6d9eea0983a4cc663ce75faa449b2f4ab2f7d1e54092.php',
|
4309 |
+
'c' => '__TwigTemplate_748f9fcd9eaa89a1116c6d9eea0983a4cc663ce75faa449b2f4ab2f7d1e54092',
|
4310 |
+
'i' => 'g',
|
4311 |
+
),
|
4312 |
+
'twig.78.3e.57d2212e2837aee7813ecc844f345947f68d3edb57d31388f926a75264db' =>
|
4313 |
+
array (
|
4314 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '78' . DIRECTORY_SEPARATOR . '3e' . DIRECTORY_SEPARATOR . '57d2212e2837aee7813ecc844f345947f68d3edb57d31388f926a75264db.php',
|
4315 |
+
'c' => '__TwigTemplate_783e57d2212e2837aee7813ecc844f345947f68d3edb57d31388f926a75264db',
|
4316 |
+
'i' => 'g',
|
4317 |
+
),
|
4318 |
+
'twig.7a.11.8b4d92f97f1deee45684469b3beb98e214e0d5a32c9a259b9bcf81a41145' =>
|
4319 |
+
array (
|
4320 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '7a' . DIRECTORY_SEPARATOR . '11' . DIRECTORY_SEPARATOR . '8b4d92f97f1deee45684469b3beb98e214e0d5a32c9a259b9bcf81a41145.php',
|
4321 |
+
'c' => '__TwigTemplate_7a118b4d92f97f1deee45684469b3beb98e214e0d5a32c9a259b9bcf81a41145',
|
4322 |
+
'i' => 'g',
|
4323 |
+
),
|
4324 |
+
'twig.82.b0.255fefe74fca92677a6a96c9e569117eabff494d93e0b5f6b38cdaaea0b0' =>
|
4325 |
+
array (
|
4326 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '82' . DIRECTORY_SEPARATOR . 'b0' . DIRECTORY_SEPARATOR . '255fefe74fca92677a6a96c9e569117eabff494d93e0b5f6b38cdaaea0b0.php',
|
4327 |
+
'c' => '__TwigTemplate_82b0255fefe74fca92677a6a96c9e569117eabff494d93e0b5f6b38cdaaea0b0',
|
4328 |
+
'i' => 'g',
|
4329 |
+
),
|
4330 |
+
'twig.86.2f.5bd0aae3cdc2eb247965d6758532defae4940dfe30c68378e622f1d1148c' =>
|
4331 |
+
array (
|
4332 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '86' . DIRECTORY_SEPARATOR . '2f' . DIRECTORY_SEPARATOR . '5bd0aae3cdc2eb247965d6758532defae4940dfe30c68378e622f1d1148c.php',
|
4333 |
+
'c' => '__TwigTemplate_862f5bd0aae3cdc2eb247965d6758532defae4940dfe30c68378e622f1d1148c',
|
4334 |
+
'i' => 'g',
|
4335 |
+
),
|
4336 |
+
'twig.89.d9.06e4eee3169b93edc33ec32aac5ff78e197d36969e2b8d0437bf2f0283a2' =>
|
4337 |
+
array (
|
4338 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '89' . DIRECTORY_SEPARATOR . 'd9' . DIRECTORY_SEPARATOR . '06e4eee3169b93edc33ec32aac5ff78e197d36969e2b8d0437bf2f0283a2.php',
|
4339 |
+
'c' => '__TwigTemplate_89d906e4eee3169b93edc33ec32aac5ff78e197d36969e2b8d0437bf2f0283a2',
|
4340 |
+
'i' => 'g',
|
4341 |
+
),
|
4342 |
+
'twig.8a.b3.a406d66e131df0ce2cd5f806db207bd6b5c7b1b0a7d4aea4080218183ebd' =>
|
4343 |
+
array (
|
4344 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '8a' . DIRECTORY_SEPARATOR . 'b3' . DIRECTORY_SEPARATOR . 'a406d66e131df0ce2cd5f806db207bd6b5c7b1b0a7d4aea4080218183ebd.php',
|
4345 |
+
'c' => '__TwigTemplate_8ab3a406d66e131df0ce2cd5f806db207bd6b5c7b1b0a7d4aea4080218183ebd',
|
4346 |
+
'i' => 'g',
|
4347 |
+
),
|
4348 |
+
'twig.94.3e.432a0dcbd7fe60a569412aaad985e131799f5363073300d0a6cd788b4d71' =>
|
4349 |
+
array (
|
4350 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '94' . DIRECTORY_SEPARATOR . '3e' . DIRECTORY_SEPARATOR . '432a0dcbd7fe60a569412aaad985e131799f5363073300d0a6cd788b4d71.php',
|
4351 |
+
'c' => '__TwigTemplate_943e432a0dcbd7fe60a569412aaad985e131799f5363073300d0a6cd788b4d71',
|
4352 |
+
'i' => 'g',
|
4353 |
+
),
|
4354 |
+
'twig.95.b0.bc90e12b886869857ead6c28360f596d7226395498afb6afc90ae60143ca' =>
|
4355 |
+
array (
|
4356 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '95' . DIRECTORY_SEPARATOR . 'b0' . DIRECTORY_SEPARATOR . 'bc90e12b886869857ead6c28360f596d7226395498afb6afc90ae60143ca.php',
|
4357 |
+
'c' => '__TwigTemplate_95b0bc90e12b886869857ead6c28360f596d7226395498afb6afc90ae60143ca',
|
4358 |
+
'i' => 'g',
|
4359 |
+
),
|
4360 |
+
'twig.9c.3c.1820db174d7efba416743bbb9bf744e8454155f8129f69296092b49c45d3' =>
|
4361 |
+
array (
|
4362 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . '9c' . DIRECTORY_SEPARATOR . '3c' . DIRECTORY_SEPARATOR . '1820db174d7efba416743bbb9bf744e8454155f8129f69296092b49c45d3.php',
|
4363 |
+
'c' => '__TwigTemplate_9c3c1820db174d7efba416743bbb9bf744e8454155f8129f69296092b49c45d3',
|
4364 |
+
'i' => 'g',
|
4365 |
+
),
|
4366 |
'twig.Compiler' =>
|
4367 |
array (
|
4368 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'Compiler.php',
|
5299 |
'c' => 'Twig_TokenStream',
|
5300 |
'i' => 'g',
|
5301 |
),
|
5302 |
+
'twig.a5.4f.aca929c567a44d5e4e2e7cf06d45c14508bd3d07f5bdfb60a7ddce3ec07a' =>
|
5303 |
+
array (
|
5304 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'a5' . DIRECTORY_SEPARATOR . '4f' . DIRECTORY_SEPARATOR . 'aca929c567a44d5e4e2e7cf06d45c14508bd3d07f5bdfb60a7ddce3ec07a.php',
|
5305 |
+
'c' => '__TwigTemplate_a54faca929c567a44d5e4e2e7cf06d45c14508bd3d07f5bdfb60a7ddce3ec07a',
|
5306 |
+
'i' => 'g',
|
5307 |
+
),
|
5308 |
+
'twig.aa.61.6d3f918f480e4f6f0dabdeee1324d87d759ec18352a21a1cfcee8802f528' =>
|
5309 |
+
array (
|
5310 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'aa' . DIRECTORY_SEPARATOR . '61' . DIRECTORY_SEPARATOR . '6d3f918f480e4f6f0dabdeee1324d87d759ec18352a21a1cfcee8802f528.php',
|
5311 |
+
'c' => '__TwigTemplate_aa616d3f918f480e4f6f0dabdeee1324d87d759ec18352a21a1cfcee8802f528',
|
5312 |
+
'i' => 'g',
|
5313 |
+
),
|
5314 |
+
'twig.aa.f1.60acb65256cd5e7a75c653378172251a21509b15232d1e2afc9c3dc3e446' =>
|
5315 |
+
array (
|
5316 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'aa' . DIRECTORY_SEPARATOR . 'f1' . DIRECTORY_SEPARATOR . '60acb65256cd5e7a75c653378172251a21509b15232d1e2afc9c3dc3e446.php',
|
5317 |
+
'c' => '__TwigTemplate_aaf160acb65256cd5e7a75c653378172251a21509b15232d1e2afc9c3dc3e446',
|
5318 |
+
'i' => 'g',
|
5319 |
+
),
|
5320 |
'twig.ai1ec-extension' =>
|
5321 |
array (
|
5322 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'ai1ec-extension.php',
|
5323 |
'c' => 'Ai1ec_Twig_Ai1ec_Extension',
|
5324 |
'i' => 'g',
|
5325 |
),
|
5326 |
+
'twig.b1.af.5b1cfc01f62c430dd9a064f9459384693440bf30e05d6a34dcdfa47540e4' =>
|
5327 |
+
array (
|
5328 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'b1' . DIRECTORY_SEPARATOR . 'af' . DIRECTORY_SEPARATOR . '5b1cfc01f62c430dd9a064f9459384693440bf30e05d6a34dcdfa47540e4.php',
|
5329 |
+
'c' => '__TwigTemplate_b1af5b1cfc01f62c430dd9a064f9459384693440bf30e05d6a34dcdfa47540e4',
|
5330 |
+
'i' => 'g',
|
5331 |
+
),
|
5332 |
+
'twig.b5.63.3d95de14839f5641ad75e89a427aa6fdfc24b529c6a3f1d8e24779f6f79f' =>
|
5333 |
+
array (
|
5334 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'b5' . DIRECTORY_SEPARATOR . '63' . DIRECTORY_SEPARATOR . '3d95de14839f5641ad75e89a427aa6fdfc24b529c6a3f1d8e24779f6f79f.php',
|
5335 |
+
'c' => '__TwigTemplate_b5633d95de14839f5641ad75e89a427aa6fdfc24b529c6a3f1d8e24779f6f79f',
|
5336 |
+
'i' => 'g',
|
5337 |
+
),
|
5338 |
+
'twig.c1.80.4f545c5b33b8114cc21fe6cb5c59952fa8c7d680d237c3ca4d3f63b96c1c' =>
|
5339 |
+
array (
|
5340 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'c1' . DIRECTORY_SEPARATOR . '80' . DIRECTORY_SEPARATOR . '4f545c5b33b8114cc21fe6cb5c59952fa8c7d680d237c3ca4d3f63b96c1c.php',
|
5341 |
+
'c' => '__TwigTemplate_c1804f545c5b33b8114cc21fe6cb5c59952fa8c7d680d237c3ca4d3f63b96c1c',
|
5342 |
+
'i' => 'g',
|
5343 |
+
),
|
5344 |
'twig.cache' =>
|
5345 |
array (
|
5346 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'cache.php',
|
5348 |
'i' => 'g',
|
5349 |
'r' => 'y',
|
5350 |
),
|
5351 |
+
'twig.dc.78.b950182efb8f436b144938fb0dc48cf395d7daabe20293234dbcf2b26545' =>
|
5352 |
+
array (
|
5353 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'dc' . DIRECTORY_SEPARATOR . '78' . DIRECTORY_SEPARATOR . 'b950182efb8f436b144938fb0dc48cf395d7daabe20293234dbcf2b26545.php',
|
5354 |
+
'c' => '__TwigTemplate_dc78b950182efb8f436b144938fb0dc48cf395d7daabe20293234dbcf2b26545',
|
5355 |
+
'i' => 'g',
|
5356 |
+
),
|
5357 |
+
'twig.e2.c5.4407992fc7f64fc763c8fa820f4d1ef92de870acc466bbd2209e5965d014' =>
|
5358 |
+
array (
|
5359 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'e2' . DIRECTORY_SEPARATOR . 'c5' . DIRECTORY_SEPARATOR . '4407992fc7f64fc763c8fa820f4d1ef92de870acc466bbd2209e5965d014.php',
|
5360 |
+
'c' => '__TwigTemplate_e2c54407992fc7f64fc763c8fa820f4d1ef92de870acc466bbd2209e5965d014',
|
5361 |
+
'i' => 'g',
|
5362 |
+
),
|
5363 |
+
'twig.e9.0f.cb1f091e9b4127585185e68c26f1b9d6d847e0152d264f92b621d5ec2944' =>
|
5364 |
+
array (
|
5365 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'e9' . DIRECTORY_SEPARATOR . '0f' . DIRECTORY_SEPARATOR . 'cb1f091e9b4127585185e68c26f1b9d6d847e0152d264f92b621d5ec2944.php',
|
5366 |
+
'c' => '__TwigTemplate_e90fcb1f091e9b4127585185e68c26f1b9d6d847e0152d264f92b621d5ec2944',
|
5367 |
+
'i' => 'g',
|
5368 |
+
),
|
5369 |
'twig.environment' =>
|
5370 |
array (
|
5371 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'environment.php',
|
5372 |
'c' => 'Ai1ec_Twig_Environment',
|
5373 |
'i' => 'g',
|
5374 |
),
|
5375 |
+
'twig.f0.57.03afef869c4fea0061567a42872d377423a41be579565d0cdf32260df05f' =>
|
5376 |
+
array (
|
5377 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'f0' . DIRECTORY_SEPARATOR . '57' . DIRECTORY_SEPARATOR . '03afef869c4fea0061567a42872d377423a41be579565d0cdf32260df05f.php',
|
5378 |
+
'c' => '__TwigTemplate_f05703afef869c4fea0061567a42872d377423a41be579565d0cdf32260df05f',
|
5379 |
+
'i' => 'g',
|
5380 |
+
),
|
5381 |
+
'twig.f9.27.e9ebb965697e227fa8ba7991946a80bc34917fe8e437edbc0c4567956326' =>
|
5382 |
+
array (
|
5383 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'f9' . DIRECTORY_SEPARATOR . '27' . DIRECTORY_SEPARATOR . 'e9ebb965697e227fa8ba7991946a80bc34917fe8e437edbc0c4567956326.php',
|
5384 |
+
'c' => '__TwigTemplate_f927e9ebb965697e227fa8ba7991946a80bc34917fe8e437edbc0c4567956326',
|
5385 |
+
'i' => 'g',
|
5386 |
+
),
|
5387 |
+
'twig.fe.5f.a372e0eb51f713beb664be0cf0c9c8c78572b1851c15eac685f6cd98c181' =>
|
5388 |
+
array (
|
5389 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'fe' . DIRECTORY_SEPARATOR . '5f' . DIRECTORY_SEPARATOR . 'a372e0eb51f713beb664be0cf0c9c8c78572b1851c15eac685f6cd98c181.php',
|
5390 |
+
'c' => '__TwigTemplate_fe5fa372e0eb51f713beb664be0cf0c9c8c78572b1851c15eac685f6cd98c181',
|
5391 |
+
'i' => 'g',
|
5392 |
+
),
|
5393 |
'twig.loader' =>
|
5394 |
array (
|
5395 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'twig' . DIRECTORY_SEPARATOR . 'loader.php',
|
5454 |
'i' => 'g',
|
5455 |
'r' => 'y',
|
5456 |
),
|
5457 |
+
'view.admin.add-ons' =>
|
5458 |
+
array (
|
5459 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'add-ons.php',
|
5460 |
+
'c' => 'Ai1ec_View_Add_Ons',
|
5461 |
+
'i' => 'g',
|
5462 |
+
'r' => 'y',
|
5463 |
+
),
|
5464 |
'view.admin.all-events' =>
|
5465 |
array (
|
5466 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'all-events.php',
|
5517 |
'i' => 'g',
|
5518 |
'r' => 'y',
|
5519 |
),
|
5520 |
+
'view.admin.widget-creator' =>
|
5521 |
+
array (
|
5522 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'admin' . DIRECTORY_SEPARATOR . 'widget-creator.php',
|
5523 |
+
'c' => 'Ai1ec_View_Widget_Creator',
|
5524 |
+
'i' => 'g',
|
5525 |
+
'r' => 'y',
|
5526 |
+
),
|
5527 |
+
'view.calendar.fallbacks' =>
|
5528 |
+
array (
|
5529 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'calendar' . DIRECTORY_SEPARATOR . 'fallbacks.php',
|
5530 |
+
'c' => 'Ai1ec_Calendar_Avatar_Fallbacks',
|
5531 |
+
'i' => 'g',
|
5532 |
+
'r' => 'y',
|
5533 |
+
),
|
5534 |
'view.calendar.page' =>
|
5535 |
array (
|
5536 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'calendar' . DIRECTORY_SEPARATOR . 'page.php',
|
5599 |
'c' => 'Ai1ec_View_Admin_Widget',
|
5600 |
'i' => 'g',
|
5601 |
),
|
5602 |
+
'view.embeddable' =>
|
5603 |
+
array (
|
5604 |
+
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'embeddable.php',
|
5605 |
+
'c' => 'Ai1ec_Embeddable',
|
5606 |
+
'i' => 'g',
|
5607 |
+
),
|
5608 |
'view.event.avatar' =>
|
5609 |
array (
|
5610 |
'f' => AI1EC_PATH . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR . 'event' . DIRECTORY_SEPARATOR . 'avatar.php',
|
lib/bootstrap/registry/object.php
CHANGED
@@ -81,6 +81,12 @@ class Ai1ec_Registry_Object implements Ai1ec_Registry {
|
|
81 |
);
|
82 |
}
|
83 |
$class_name = $class_data['c'];
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
$instantiator = $class_data['i'];
|
85 |
$args = array_slice( func_get_args(), 1 );
|
86 |
if ( isset ( $class_data['r'] ) ) {
|
81 |
);
|
82 |
}
|
83 |
$class_name = $class_data['c'];
|
84 |
+
if (
|
85 |
+
'Ai1ec_Event' === $class_name &&
|
86 |
+
AI1EC_THEME_COMPATIBILITY_FER
|
87 |
+
) {
|
88 |
+
$class_name = 'Ai1ec_Event_Compatibility';
|
89 |
+
}
|
90 |
$instantiator = $class_data['i'];
|
91 |
$args = array_slice( func_get_args(), 1 );
|
92 |
if ( isset ( $class_data['r'] ) ) {
|
lib/cache/strategy/file.php
CHANGED
@@ -47,7 +47,7 @@ class Ai1ec_Cache_Strategy_File extends Ai1ec_Cache_Strategy {
|
|
47 |
*
|
48 |
*/
|
49 |
public function write_data( $filename, $value ) {
|
50 |
-
$filename = $this->_safe_file_name( $filename )
|
51 |
$value = maybe_serialize( $value );
|
52 |
|
53 |
$result = $this->_registry->get( 'filesystem.checker' )->put_contents(
|
@@ -103,6 +103,23 @@ class Ai1ec_Cache_Strategy_File extends Ai1ec_Cache_Strategy {
|
|
103 |
return $count;
|
104 |
}
|
105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
/**
|
107 |
* _safe_file_name method
|
108 |
*
|
@@ -113,9 +130,17 @@ class Ai1ec_Cache_Strategy_File extends Ai1ec_Cache_Strategy {
|
|
113 |
* @return string Sanitized file name
|
114 |
*/
|
115 |
protected function _safe_file_name( $file ) {
|
116 |
-
static $prefix =
|
117 |
-
|
118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
}
|
120 |
$length = strlen( $file );
|
121 |
if ( ! ctype_alnum( $file ) ) {
|
@@ -128,7 +153,7 @@ class Ai1ec_Cache_Strategy_File extends Ai1ec_Cache_Strategy {
|
|
128 |
if ( 0 !== strncmp( $file, $prefix, 8 ) ) {
|
129 |
$file = $prefix . '_' . $file;
|
130 |
}
|
131 |
-
return $file;
|
132 |
}
|
133 |
|
134 |
}
|
47 |
*
|
48 |
*/
|
49 |
public function write_data( $filename, $value ) {
|
50 |
+
$filename = $this->_safe_file_name( $filename );
|
51 |
$value = maybe_serialize( $value );
|
52 |
|
53 |
$result = $this->_registry->get( 'filesystem.checker' )->put_contents(
|
103 |
return $count;
|
104 |
}
|
105 |
|
106 |
+
/**
|
107 |
+
* Get the extension for the file if required
|
108 |
+
*
|
109 |
+
* @param string $file
|
110 |
+
*
|
111 |
+
* @return string
|
112 |
+
*/
|
113 |
+
protected function _get_extension_for_file( $file ) {
|
114 |
+
$extensions = array(
|
115 |
+
'ai1ec_parsed_css' => '.css'
|
116 |
+
);
|
117 |
+
if ( isset( $extensions[$file] ) ) {
|
118 |
+
return $extensions[$file];
|
119 |
+
}
|
120 |
+
return '';
|
121 |
+
}
|
122 |
+
|
123 |
/**
|
124 |
* _safe_file_name method
|
125 |
*
|
130 |
* @return string Sanitized file name
|
131 |
*/
|
132 |
protected function _safe_file_name( $file ) {
|
133 |
+
static $prefix = null;
|
134 |
+
$extension = $this->_get_extension_for_file( $file );
|
135 |
+
if ( null === $prefix ) {
|
136 |
+
// always include site_url when there is more than one
|
137 |
+
$pref_string = site_url();
|
138 |
+
if ( ! AI1EC_DEBUG ) {
|
139 |
+
// address multiple re-saves for a single version
|
140 |
+
// i.e. when theme settings are being edited
|
141 |
+
$pref_string .= mt_rand();
|
142 |
+
}
|
143 |
+
$prefix = substr( md5( $pref_string ), 0, 8 );
|
144 |
}
|
145 |
$length = strlen( $file );
|
146 |
if ( ! ctype_alnum( $file ) ) {
|
153 |
if ( 0 !== strncmp( $file, $prefix, 8 ) ) {
|
154 |
$file = $prefix . '_' . $file;
|
155 |
}
|
156 |
+
return $file . $extension;
|
157 |
}
|
158 |
|
159 |
}
|
lib/calendar-feed/ics.php
CHANGED
@@ -150,7 +150,9 @@ class Ai1ecIcsConnectorPlugin extends Ai1ec_Connector_Plugin {
|
|
150 |
$args['do_show_map'] = 1;
|
151 |
}
|
152 |
$args['source'] = $response['body'];
|
|
|
153 |
$result = $import_export->import_events( 'ics', $args );
|
|
|
154 |
$count = $result['count'];
|
155 |
// we must flip again the array to iterate over it
|
156 |
if ( 0 == $feed->keep_old_events ) {
|
150 |
$args['do_show_map'] = 1;
|
151 |
}
|
152 |
$args['source'] = $response['body'];
|
153 |
+
do_action( 'ai1ec_ics_before_import', $args );
|
154 |
$result = $import_export->import_events( 'ics', $args );
|
155 |
+
do_action( 'ai1ec_ics_after_import' );
|
156 |
$count = $result['count'];
|
157 |
// we must flip again the array to iterate over it
|
158 |
if ( 0 == $feed->keep_old_events ) {
|
lib/command/abstract.php
CHANGED
@@ -41,7 +41,7 @@ abstract class Ai1ec_Command {
|
|
41 |
|
42 |
/**
|
43 |
* Gets parameters from the request object.
|
44 |
-
*
|
45 |
* @return array|boolean
|
46 |
*/
|
47 |
public function get_parameters() {
|
@@ -49,8 +49,8 @@ abstract class Ai1ec_Command {
|
|
49 |
$plugin = Ai1ec_Request_Parser::get_param( 'plugin', $plugin );
|
50 |
$controller = Ai1ec_Request_Parser::get_param( 'controller', $controller );
|
51 |
$action = Ai1ec_Request_Parser::get_param( 'action', $action );
|
52 |
-
if ( (string)AI1EC_PLUGIN_NAME === (string)$plugin &&
|
53 |
-
null !== $controller &&
|
54 |
null !== $action
|
55 |
) {
|
56 |
return array(
|
@@ -76,6 +76,15 @@ abstract class Ai1ec_Command {
|
|
76 |
$this->_render_strategy->render( $data );
|
77 |
}
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
/**
|
80 |
* The abstract method concrete command must implement.
|
81 |
*
|
@@ -96,10 +105,10 @@ abstract class Ai1ec_Command {
|
|
96 |
* @return boolean
|
97 |
*/
|
98 |
abstract public function is_this_to_execute();
|
99 |
-
|
100 |
/**
|
101 |
* Sets the render strategy.
|
102 |
-
*
|
103 |
* @param Ai1ec_Request_Parser $request
|
104 |
*/
|
105 |
abstract public function set_render_strategy( Ai1ec_Request_Parser $request );
|
41 |
|
42 |
/**
|
43 |
* Gets parameters from the request object.
|
44 |
+
*
|
45 |
* @return array|boolean
|
46 |
*/
|
47 |
public function get_parameters() {
|
49 |
$plugin = Ai1ec_Request_Parser::get_param( 'plugin', $plugin );
|
50 |
$controller = Ai1ec_Request_Parser::get_param( 'controller', $controller );
|
51 |
$action = Ai1ec_Request_Parser::get_param( 'action', $action );
|
52 |
+
if ( (string)AI1EC_PLUGIN_NAME === (string)$plugin &&
|
53 |
+
null !== $controller &&
|
54 |
null !== $action
|
55 |
) {
|
56 |
return array(
|
76 |
$this->_render_strategy->render( $data );
|
77 |
}
|
78 |
|
79 |
+
/**
|
80 |
+
* Defines whether to stop execution of command loop or not.
|
81 |
+
*
|
82 |
+
* @return bool True or false.
|
83 |
+
*/
|
84 |
+
public function stop_execution() {
|
85 |
+
return false;
|
86 |
+
}
|
87 |
+
|
88 |
/**
|
89 |
* The abstract method concrete command must implement.
|
90 |
*
|
105 |
* @return boolean
|
106 |
*/
|
107 |
abstract public function is_this_to_execute();
|
108 |
+
|
109 |
/**
|
110 |
* Sets the render strategy.
|
111 |
+
*
|
112 |
* @param Ai1ec_Request_Parser $request
|
113 |
*/
|
114 |
abstract public function set_render_strategy( Ai1ec_Request_Parser $request );
|
lib/command/change-theme.php
CHANGED
@@ -24,23 +24,13 @@ class Ai1ec_Command_Change_Theme extends Ai1ec_Command {
|
|
24 |
'',
|
25 |
$_GET['ai1ec_stylesheet']
|
26 |
);
|
27 |
-
|
28 |
-
'
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
'stylesheet' => $stylesheet,
|
35 |
-
)
|
36 |
-
);
|
37 |
-
// Delete user variables from database so fresh ones are used by new theme.
|
38 |
-
$this->_registry->get( 'model.option' )->delete(
|
39 |
-
Ai1ec_Less_Lessphp::DB_KEY_FOR_LESS_VARIABLES
|
40 |
-
);
|
41 |
-
// Recompile CSS for new theme.
|
42 |
-
$css_controller = $this->_registry->get( 'css.frontend' );
|
43 |
-
$css_controller->invalidate_cache( null, false );
|
44 |
|
45 |
// Return user to themes list page with success message.
|
46 |
return array(
|
@@ -80,5 +70,4 @@ class Ai1ec_Command_Change_Theme extends Ai1ec_Command {
|
|
80 |
}
|
81 |
return false;
|
82 |
}
|
83 |
-
|
84 |
}
|
24 |
'',
|
25 |
$_GET['ai1ec_stylesheet']
|
26 |
);
|
27 |
+
$this->_registry->get( 'theme.loader' )->switch_theme( array(
|
28 |
+
'theme_root' => realpath( $_GET['ai1ec_theme_root'] ),
|
29 |
+
'theme_dir' => realpath( $_GET['ai1ec_theme_dir'] ),
|
30 |
+
'theme_url' => $_GET['ai1ec_theme_url'],
|
31 |
+
'stylesheet' => $stylesheet,
|
32 |
+
'legacy' => (bool)intval( $_GET['ai1ec_legacy'] )
|
33 |
+
) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
// Return user to themes list page with success message.
|
36 |
return array(
|
70 |
}
|
71 |
return false;
|
72 |
}
|
|
|
73 |
}
|
lib/command/clone.php
CHANGED
@@ -64,31 +64,18 @@ class Ai1ec_Command_Clone extends Ai1ec_Command {
|
|
64 |
* @return boolean
|
65 |
*/
|
66 |
public function is_this_to_execute() {
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
$_REQUEST['action'] === 'clone' &&
|
71 |
-
! empty( $_REQUEST['post'] )
|
72 |
-
) {
|
73 |
-
foreach ( $_REQUEST['post'] as $post_id ) {
|
74 |
-
$this->_posts[] = array(
|
75 |
-
'status' => 'new',
|
76 |
-
'post' => get_post( $post_id )
|
77 |
-
);
|
78 |
-
}
|
79 |
-
return true;
|
80 |
-
}
|
81 |
|
82 |
-
// duplicate all selected post by bottom dropdown
|
83 |
if (
|
84 |
-
|
85 |
-
$_REQUEST['action2'] === 'clone' &&
|
86 |
! empty( $_REQUEST['post'] )
|
87 |
) {
|
88 |
-
foreach ( $_REQUEST['post'] as $
|
89 |
$this->_posts[] = array(
|
90 |
'status' => '',
|
91 |
-
'post' => $
|
92 |
);
|
93 |
}
|
94 |
return true;
|
@@ -98,8 +85,7 @@ class Ai1ec_Command_Clone extends Ai1ec_Command {
|
|
98 |
|
99 |
// duplicate single post
|
100 |
if (
|
101 |
-
|
102 |
-
$_REQUEST['action'] === 'duplicate_post_save_as_new_post' &&
|
103 |
! empty( $_REQUEST['post'] )
|
104 |
) {
|
105 |
check_admin_referer( 'ai1ec_clone_'. $_REQUEST['post'] );
|
@@ -113,8 +99,7 @@ class Ai1ec_Command_Clone extends Ai1ec_Command {
|
|
113 |
}
|
114 |
// duplicate single post as draft
|
115 |
if (
|
116 |
-
|
117 |
-
$_REQUEST['action'] === 'duplicate_post_save_as_new_post_draft' &&
|
118 |
! empty( $_REQUEST['post'] )
|
119 |
) {
|
120 |
check_admin_referer( 'ai1ec_clone_'. $_REQUEST['post'] );
|
64 |
* @return boolean
|
65 |
*/
|
66 |
public function is_this_to_execute() {
|
67 |
+
$current_action = $this->_registry->get(
|
68 |
+
'http.request'
|
69 |
+
)->get_current_action();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
|
|
71 |
if (
|
72 |
+
'clone' === $current_action &&
|
|
|
73 |
! empty( $_REQUEST['post'] )
|
74 |
) {
|
75 |
+
foreach ( $_REQUEST['post'] as $post_id ) {
|
76 |
$this->_posts[] = array(
|
77 |
'status' => '',
|
78 |
+
'post' => get_post( $post_id )
|
79 |
);
|
80 |
}
|
81 |
return true;
|
85 |
|
86 |
// duplicate single post
|
87 |
if (
|
88 |
+
$current_action === 'duplicate_post_save_as_new_post' &&
|
|
|
89 |
! empty( $_REQUEST['post'] )
|
90 |
) {
|
91 |
check_admin_referer( 'ai1ec_clone_'. $_REQUEST['post'] );
|
99 |
}
|
100 |
// duplicate single post as draft
|
101 |
if (
|
102 |
+
$current_action === 'duplicate_post_save_as_new_post_draft' &&
|
|
|
103 |
! empty( $_REQUEST['post'] )
|
104 |
) {
|
105 |
check_admin_referer( 'ai1ec_clone_'. $_REQUEST['post'] );
|
lib/command/export-events.php
CHANGED
@@ -105,7 +105,7 @@ class Ai1ec_Command_Export_Events extends Ai1ec_Command {
|
|
105 |
$ai1ec_post_ids
|
106 |
);
|
107 |
}
|
108 |
-
|
109 |
// when exporting events by post_id, do not look up the event's start/end date/time
|
110 |
$start = ( $ai1ec_post_ids !== false )
|
111 |
? $this->_registry->get( 'date.time', '-3 years' )
|
105 |
$ai1ec_post_ids
|
106 |
);
|
107 |
}
|
108 |
+
$filter = apply_filters( 'ai1ec_export_filter', $filter );
|
109 |
// when exporting events by post_id, do not look up the event's start/end date/time
|
110 |
$start = ( $ai1ec_post_ids !== false )
|
111 |
? $this->_registry->get( 'date.time', '-3 years' )
|
lib/command/render-calendar.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
* @subpackage AI1EC.Command
|
11 |
*/
|
12 |
class Ai1ec_Command_Render_Calendar extends Ai1ec_Command {
|
13 |
-
|
14 |
/**
|
15 |
* @var string
|
16 |
*/
|
@@ -47,14 +47,17 @@ class Ai1ec_Command_Render_Calendar extends Ai1ec_Command {
|
|
47 |
* @see Ai1ec_Command::set_render_strategy()
|
48 |
*/
|
49 |
public function set_render_strategy( Ai1ec_Request_Parser $request ) {
|
50 |
-
|
51 |
-
|
52 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
}
|
54 |
-
$this->_request_type = $type;
|
55 |
-
$this->_render_strategy = $this->_registry->get(
|
56 |
-
'http.response.render.strategy.' . $type
|
57 |
-
);
|
58 |
}
|
59 |
|
60 |
/* (non-PHPdoc)
|
10 |
* @subpackage AI1EC.Command
|
11 |
*/
|
12 |
class Ai1ec_Command_Render_Calendar extends Ai1ec_Command {
|
13 |
+
|
14 |
/**
|
15 |
* @var string
|
16 |
*/
|
47 |
* @see Ai1ec_Command::set_render_strategy()
|
48 |
*/
|
49 |
public function set_render_strategy( Ai1ec_Request_Parser $request ) {
|
50 |
+
try {
|
51 |
+
$this->_request_type = $request->get( 'request_type' );
|
52 |
+
$this->_render_strategy = $this->_registry->get(
|
53 |
+
'http.response.render.strategy.' . $this->_request_type
|
54 |
+
);
|
55 |
+
} catch ( Ai1ec_Bootstrap_Exception $e ) {
|
56 |
+
$this->_request_type = 'html';
|
57 |
+
$this->_render_strategy = $this->_registry->get(
|
58 |
+
'http.response.render.strategy.' . $this->_request_type
|
59 |
+
);
|
60 |
}
|
|
|
|
|
|
|
|
|
61 |
}
|
62 |
|
63 |
/* (non-PHPdoc)
|
lib/command/render-event.php
CHANGED
@@ -41,8 +41,11 @@ class Ai1ec_Command_Render_Event extends Ai1ec_Command_Render_Calendar {
|
|
41 |
get_the_ID(),
|
42 |
$instance
|
43 |
);
|
44 |
-
$
|
45 |
-
$
|
|
|
|
|
|
|
46 |
if( is_single() ) {
|
47 |
$event_page = $this->_registry->get( 'view.event.single' );
|
48 |
$footer_html = $event_page->get_footer( $event );
|
@@ -57,7 +60,7 @@ class Ai1ec_Command_Render_Event extends Ai1ec_Command_Render_Calendar {
|
|
57 |
$js = $this->_registry->get( 'controller.javascript' )->load_frontend_js( false );
|
58 |
if ( 'html' !== $this->_request_type ) {
|
59 |
return array(
|
60 |
-
'data' => array(
|
61 |
'html' => $event_page->get_full_article( $event )
|
62 |
),
|
63 |
'callback' => Ai1ec_Request_Parser::get_param(
|
41 |
get_the_ID(),
|
42 |
$instance
|
43 |
);
|
44 |
+
$timezone_name = $event->get( 'timezone_name' );
|
45 |
+
$event->get( 'start' )->set_preferred_timezone( $timezone_name );
|
46 |
+
$event->get( 'end' )->set_preferred_timezone( $timezone_name );
|
47 |
+
$event_page = null;
|
48 |
+
$footer_html = '';
|
49 |
if( is_single() ) {
|
50 |
$event_page = $this->_registry->get( 'view.event.single' );
|
51 |
$footer_html = $event_page->get_footer( $event );
|
60 |
$js = $this->_registry->get( 'controller.javascript' )->load_frontend_js( false );
|
61 |
if ( 'html' !== $this->_request_type ) {
|
62 |
return array(
|
63 |
+
'data' => array(
|
64 |
'html' => $event_page->get_full_article( $event )
|
65 |
),
|
66 |
'callback' => Ai1ec_Request_Parser::get_param(
|
lib/command/resolver.php
CHANGED
@@ -69,7 +69,7 @@ class Ai1ec_Command_Resolver {
|
|
69 |
);
|
70 |
$this->add_command(
|
71 |
$registry->get(
|
72 |
-
'command.save-settings',
|
73 |
$request,
|
74 |
array(
|
75 |
'action' => 'ai1ec_save_settings',
|
@@ -121,12 +121,13 @@ class Ai1ec_Command_Resolver {
|
|
121 |
*
|
122 |
* @return Ai1ec_Command|null
|
123 |
*/
|
124 |
-
public function
|
|
|
125 |
foreach ( $this->_commands as $command ) {
|
126 |
if ( $command->is_this_to_execute() ) {
|
127 |
-
|
128 |
}
|
129 |
}
|
130 |
-
return
|
131 |
}
|
132 |
}
|
69 |
);
|
70 |
$this->add_command(
|
71 |
$registry->get(
|
72 |
+
'command.save-settings',
|
73 |
$request,
|
74 |
array(
|
75 |
'action' => 'ai1ec_save_settings',
|
121 |
*
|
122 |
* @return Ai1ec_Command|null
|
123 |
*/
|
124 |
+
public function get_commands() {
|
125 |
+
$commands = array();
|
126 |
foreach ( $this->_commands as $command ) {
|
127 |
if ( $command->is_this_to_execute() ) {
|
128 |
+
$commands[] = $command;
|
129 |
}
|
130 |
}
|
131 |
+
return $commands;
|
132 |
}
|
133 |
}
|
lib/command/save-settings.php
CHANGED
@@ -18,11 +18,14 @@ class Ai1ec_Command_Save_Settings extends Ai1ec_Command_Save_Abstract {
|
|
18 |
$settings = $this->_registry->get( 'model.settings' );
|
19 |
$options = $settings->get_options();
|
20 |
$_POST['default_tags_categories'] = (
|
21 |
-
isset( $_POST['
|
22 |
-
isset( $_POST['
|
23 |
);
|
|
|
24 |
$_POST['enabled_views'] = true;
|
25 |
-
|
|
|
|
|
26 |
foreach ( $options as $name => $data ) {
|
27 |
$value = null;
|
28 |
if ( isset( $_POST[$name] ) ) {
|
@@ -39,7 +42,6 @@ class Ai1ec_Command_Save_Settings extends Ai1ec_Command_Save_Abstract {
|
|
39 |
continue;
|
40 |
}
|
41 |
} else {
|
42 |
-
|
43 |
switch ( $data['type'] ) {
|
44 |
case 'bool':
|
45 |
$value = true;
|
@@ -77,7 +79,7 @@ class Ai1ec_Command_Save_Settings extends Ai1ec_Command_Save_Abstract {
|
|
77 |
case 'wp_option': // set the corresponding WP option
|
78 |
$this->_registry->get( 'model.option' )
|
79 |
->set( $name, $_POST[$name], true );
|
80 |
-
$value =
|
81 |
}
|
82 |
}
|
83 |
} else {
|
@@ -89,6 +91,7 @@ class Ai1ec_Command_Save_Settings extends Ai1ec_Command_Save_Abstract {
|
|
89 |
$settings->set( $name, stripslashes_deep( $value ) );
|
90 |
}
|
91 |
}
|
|
|
92 |
$new_options = $settings->get_options();
|
93 |
// let extension manipulate things if needed.
|
94 |
do_action( 'ai1ec_settings_updated', $options, $new_options );
|
@@ -113,7 +116,9 @@ class Ai1ec_Command_Save_Settings extends Ai1ec_Command_Save_Abstract {
|
|
113 |
$enabled_views = $settings->get( 'enabled_views' );
|
114 |
foreach ( $enabled_views as $view => &$options ) {
|
115 |
$options['enabled'] = isset( $_POST['view_' . $view . '_enabled'] );
|
116 |
-
$options['default'] = $_POST['default_calendar_view']
|
|
|
|
|
117 |
$options['enabled_mobile'] =
|
118 |
isset( $_POST['view_' . $view . '_enabled_mobile'] );
|
119 |
$options['default_mobile'] =
|
@@ -130,11 +135,11 @@ class Ai1ec_Command_Save_Settings extends Ai1ec_Command_Save_Abstract {
|
|
130 |
*/
|
131 |
protected function _handle_saving_default_tags_categories() {
|
132 |
return array(
|
133 |
-
'tags' => isset( $_POST['
|
134 |
-
$_POST['
|
135 |
array(),
|
136 |
-
'categories' => isset( $_POST['
|
137 |
-
$_POST['
|
138 |
array(),
|
139 |
);
|
140 |
}
|
18 |
$settings = $this->_registry->get( 'model.settings' );
|
19 |
$options = $settings->get_options();
|
20 |
$_POST['default_tags_categories'] = (
|
21 |
+
isset( $_POST['default_tags_categories_default_categories'] ) ||
|
22 |
+
isset( $_POST['default_tags_categories_default_tags'] )
|
23 |
);
|
24 |
+
// set some a variable to true to trigger the saving.
|
25 |
$_POST['enabled_views'] = true;
|
26 |
+
// let other plugin modify the post
|
27 |
+
$_POST = apply_filters( 'ai1ec_before_save_settings', $_POST );
|
28 |
+
|
29 |
foreach ( $options as $name => $data ) {
|
30 |
$value = null;
|
31 |
if ( isset( $_POST[$name] ) ) {
|
42 |
continue;
|
43 |
}
|
44 |
} else {
|
|
|
45 |
switch ( $data['type'] ) {
|
46 |
case 'bool':
|
47 |
$value = true;
|
79 |
case 'wp_option': // set the corresponding WP option
|
80 |
$this->_registry->get( 'model.option' )
|
81 |
->set( $name, $_POST[$name], true );
|
82 |
+
$value = (string)$_POST[$name];
|
83 |
}
|
84 |
}
|
85 |
} else {
|
91 |
$settings->set( $name, stripslashes_deep( $value ) );
|
92 |
}
|
93 |
}
|
94 |
+
|
95 |
$new_options = $settings->get_options();
|
96 |
// let extension manipulate things if needed.
|
97 |
do_action( 'ai1ec_settings_updated', $options, $new_options );
|
116 |
$enabled_views = $settings->get( 'enabled_views' );
|
117 |
foreach ( $enabled_views as $view => &$options ) {
|
118 |
$options['enabled'] = isset( $_POST['view_' . $view . '_enabled'] );
|
119 |
+
$options['default'] = isset( $_POST['default_calendar_view'] )
|
120 |
+
? $_POST['default_calendar_view'] === $view
|
121 |
+
: false;
|
122 |
$options['enabled_mobile'] =
|
123 |
isset( $_POST['view_' . $view . '_enabled_mobile'] );
|
124 |
$options['default_mobile'] =
|
135 |
*/
|
136 |
protected function _handle_saving_default_tags_categories() {
|
137 |
return array(
|
138 |
+
'tags' => isset( $_POST['default_tags_categories_default_tags'] ) ?
|
139 |
+
$_POST['default_tags_categories_default_tags'] :
|
140 |
array(),
|
141 |
+
'categories' => isset( $_POST['default_tags_categories_default_categories'] ) ?
|
142 |
+
$_POST['default_tags_categories_default_categories'] :
|
143 |
array(),
|
144 |
);
|
145 |
}
|
lib/css/frontend.php
CHANGED
@@ -36,10 +36,10 @@ class Ai1ec_Css_Frontend extends Ai1ec_Base {
|
|
36 |
* @var Ai1ec_Template_Adapter
|
37 |
*/
|
38 |
private $template_adapter;
|
39 |
-
|
40 |
/**
|
41 |
* Possible paths/url for file cache
|
42 |
-
*
|
43 |
* @var array
|
44 |
*/
|
45 |
protected $_cache_paths = array();
|
@@ -53,17 +53,19 @@ class Ai1ec_Css_Frontend extends Ai1ec_Base {
|
|
53 |
Ai1ec_Registry_Object $registry
|
54 |
) {
|
55 |
parent::__construct( $registry );
|
56 |
-
$this->_cache_paths[] = array(
|
57 |
'path' => AI1EC_CACHE_PATH,
|
58 |
'url' => AI1EC_CACHE_URL
|
59 |
);
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
$
|
64 |
-
|
65 |
-
|
66 |
-
|
|
|
|
|
67 |
}
|
68 |
$this->persistance_context = $this->_registry->get(
|
69 |
'cache.strategy.persistence-context',
|
@@ -79,7 +81,7 @@ class Ai1ec_Css_Frontend extends Ai1ec_Base {
|
|
79 |
}
|
80 |
|
81 |
/**
|
82 |
-
*
|
83 |
* Get if file cache is enabled
|
84 |
* @return boolean
|
85 |
*/
|
@@ -89,7 +91,7 @@ class Ai1ec_Css_Frontend extends Ai1ec_Base {
|
|
89 |
|
90 |
/**
|
91 |
* Get folders which are not writable
|
92 |
-
*
|
93 |
* @return array
|
94 |
*/
|
95 |
public function get_folders_not_writable() {
|
@@ -155,15 +157,22 @@ class Ai1ec_Css_Frontend extends Ai1ec_Base {
|
|
155 |
// if it's empty it's a new install probably. Return static css.
|
156 |
// if it's numeric, just consider it a new install
|
157 |
if ( empty( $saved_par ) ) {
|
158 |
-
return
|
|
|
|
|
|
|
|
|
|
|
159 |
}
|
160 |
if ( is_numeric( $saved_par ) ) {
|
161 |
if ( $this->_registry->get( 'model.settings' )->get( 'render_css_as_link' ) ) {
|
162 |
$time = (int) $saved_par;
|
163 |
$template_helper = $this->_registry->get( 'template.link.helper' );
|
164 |
-
return
|
165 |
-
|
166 |
-
|
|
|
|
|
167 |
);
|
168 |
} else {
|
169 |
add_action( 'wp_head', array( $this, 'echo_css' ) );
|
@@ -172,7 +181,9 @@ class Ai1ec_Css_Frontend extends Ai1ec_Base {
|
|
172 |
|
173 |
}
|
174 |
// otherwise return the string
|
175 |
-
return
|
|
|
|
|
176 |
}
|
177 |
|
178 |
/**
|
@@ -180,7 +191,7 @@ class Ai1ec_Css_Frontend extends Ai1ec_Base {
|
|
180 |
*/
|
181 |
public function add_link_to_html_for_frontend() {
|
182 |
$url = $this->get_css_url();
|
183 |
-
if ( '' !== $url ) {
|
184 |
wp_enqueue_style( 'ai1ec_style', $url, array(), AI1EC_VERSION );
|
185 |
}
|
186 |
}
|
@@ -294,7 +305,7 @@ class Ai1ec_Css_Frontend extends Ai1ec_Base {
|
|
294 |
if ( ! self::PARSE_LESS_FILES_AT_EVERY_REQUEST ) {
|
295 |
$this->_registry->get( 'notification.admin' )
|
296 |
->store(
|
297 |
-
sprintf(
|
298 |
__(
|
299 |
'Your CSS is being compiled on every request, which causes your calendar to perform slowly. The following error occurred: %s',
|
300 |
AI1EC_PLUGIN_NAME
|
36 |
* @var Ai1ec_Template_Adapter
|
37 |
*/
|
38 |
private $template_adapter;
|
39 |
+
|
40 |
/**
|
41 |
* Possible paths/url for file cache
|
42 |
+
*
|
43 |
* @var array
|
44 |
*/
|
45 |
protected $_cache_paths = array();
|
53 |
Ai1ec_Registry_Object $registry
|
54 |
) {
|
55 |
parent::__construct( $registry );
|
56 |
+
$this->_cache_paths[] = array(
|
57 |
'path' => AI1EC_CACHE_PATH,
|
58 |
'url' => AI1EC_CACHE_URL
|
59 |
);
|
60 |
+
if ( apply_filters( 'ai1ec_check_static_dir', true ) ) {
|
61 |
+
$filesystem = $this->_registry->get( 'filesystem.checker' );
|
62 |
+
$wp_static_folder = $filesystem->get_ai1ec_static_dir_if_available();
|
63 |
+
if ( '' !== $wp_static_folder ) {
|
64 |
+
$this->_cache_paths[] = array(
|
65 |
+
'path' => $wp_static_folder,
|
66 |
+
'url' => content_url() . '/ai1ec_static/'
|
67 |
+
);
|
68 |
+
}
|
69 |
}
|
70 |
$this->persistance_context = $this->_registry->get(
|
71 |
'cache.strategy.persistence-context',
|
81 |
}
|
82 |
|
83 |
/**
|
84 |
+
*
|
85 |
* Get if file cache is enabled
|
86 |
* @return boolean
|
87 |
*/
|
91 |
|
92 |
/**
|
93 |
* Get folders which are not writable
|
94 |
+
*
|
95 |
* @return array
|
96 |
*/
|
97 |
public function get_folders_not_writable() {
|
157 |
// if it's empty it's a new install probably. Return static css.
|
158 |
// if it's numeric, just consider it a new install
|
159 |
if ( empty( $saved_par ) ) {
|
160 |
+
return Ai1ec_Http_Response_Helper::remove_protocols(
|
161 |
+
apply_filters(
|
162 |
+
'ai1ec_frontend_standard_css_url',
|
163 |
+
AI1EC_URL . '/public/themes-ai1ec/vortex/css/ai1ec_parsed_css.css'
|
164 |
+
)
|
165 |
+
);
|
166 |
}
|
167 |
if ( is_numeric( $saved_par ) ) {
|
168 |
if ( $this->_registry->get( 'model.settings' )->get( 'render_css_as_link' ) ) {
|
169 |
$time = (int) $saved_par;
|
170 |
$template_helper = $this->_registry->get( 'template.link.helper' );
|
171 |
+
return Ai1ec_Http_Response_Helper::remove_protocols(
|
172 |
+
add_query_arg(
|
173 |
+
array( self::QUERY_STRING_PARAM => $time, ),
|
174 |
+
trailingslashit( $template_helper->get_site_url() )
|
175 |
+
)
|
176 |
);
|
177 |
} else {
|
178 |
add_action( 'wp_head', array( $this, 'echo_css' ) );
|
181 |
|
182 |
}
|
183 |
// otherwise return the string
|
184 |
+
return Ai1ec_Http_Response_Helper::remove_protocols(
|
185 |
+
$saved_par
|
186 |
+
);
|
187 |
}
|
188 |
|
189 |
/**
|
191 |
*/
|
192 |
public function add_link_to_html_for_frontend() {
|
193 |
$url = $this->get_css_url();
|
194 |
+
if ( '' !== $url && ! is_admin() ) {
|
195 |
wp_enqueue_style( 'ai1ec_style', $url, array(), AI1EC_VERSION );
|
196 |
}
|
197 |
}
|
305 |
if ( ! self::PARSE_LESS_FILES_AT_EVERY_REQUEST ) {
|
306 |
$this->_registry->get( 'notification.admin' )
|
307 |
->store(
|
308 |
+
sprintf(
|
309 |
__(
|
310 |
'Your CSS is being compiled on every request, which causes your calendar to perform slowly. The following error occurred: %s',
|
311 |
AI1EC_PLUGIN_NAME
|
lib/date/time.php
CHANGED
@@ -158,6 +158,16 @@ class Ai1ec_Date_Time {
|
|
158 |
return $this->_date_time->getOffset() / 60;
|
159 |
}
|
160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
/**
|
162 |
* Set preferred timezone to use when format is called without any.
|
163 |
*
|
@@ -255,7 +265,7 @@ class Ai1ec_Date_Time {
|
|
255 |
* Adjust only time fragment of entity.
|
256 |
*
|
257 |
* @param int $hour Hour of the time.
|
258 |
-
* @param int $minute Minute of the time.
|
259 |
* @param int $second Second of the time.
|
260 |
*
|
261 |
* @return Ai1ec_Date_Time Instance of self for chaining.
|
@@ -383,8 +393,8 @@ class Ai1ec_Date_Time {
|
|
383 |
}
|
384 |
|
385 |
/**
|
386 |
-
* Modifies the DateTime object
|
387 |
-
*
|
388 |
* @param int $quantifieruantifier
|
389 |
* @param string $longname
|
390 |
*/
|
158 |
return $this->_date_time->getOffset() / 60;
|
159 |
}
|
160 |
|
161 |
+
/**
|
162 |
+
* Returns timezone offset as human readable GMT string.
|
163 |
+
*
|
164 |
+
* @return string
|
165 |
+
*/
|
166 |
+
public function get_gmt_offset_as_text() {
|
167 |
+
$offset = $this->_date_time->getOffset() / 3600;
|
168 |
+
return 'GMT' . ( $offset > 0 ? '+' : '' ) . $offset;
|
169 |
+
}
|
170 |
+
|
171 |
/**
|
172 |
* Set preferred timezone to use when format is called without any.
|
173 |
*
|
265 |
* Adjust only time fragment of entity.
|
266 |
*
|
267 |
* @param int $hour Hour of the time.
|
268 |
+
* @param int $minute Minute of the time.
|
269 |
* @param int $second Second of the time.
|
270 |
*
|
271 |
* @return Ai1ec_Date_Time Instance of self for chaining.
|
393 |
}
|
394 |
|
395 |
/**
|
396 |
+
* Modifies the DateTime object
|
397 |
+
*
|
398 |
* @param int $quantifieruantifier
|
399 |
* @param string $longname
|
400 |
*/
|
lib/date/timezone.php
CHANGED
@@ -125,7 +125,7 @@ class Ai1ec_Date_Timezone extends Ai1ec_Base {
|
|
125 |
'French_Guiana' => 'America/Cayenne',
|
126 |
'French_Southern' => 'Indian/Kerguelen',
|
127 |
'Frunze' => 'Asia/Bishkek',
|
128 |
-
'GMT' => 'Atlantic/Reykjavik'
|
129 |
'GMT Standard Time' => 'Europe/London',
|
130 |
'GTB Standard Time' => 'Europe/Istanbul',
|
131 |
'Galapagos' => 'Pacific/Galapagos',
|
@@ -373,11 +373,11 @@ class Ai1ec_Date_Timezone extends Ai1ec_Base {
|
|
373 |
}
|
374 |
|
375 |
/**
|
376 |
-
* Attempt to decode GMT offset to some
|
377 |
*
|
378 |
* @param float $zone GMT offset.
|
379 |
*
|
380 |
-
* @return string Valid
|
381 |
*/
|
382 |
public function decode_gmt_timezone( $zone ) {
|
383 |
$auto_zone = timezone_name_from_abbr( null, $zone * 3600, true );
|
@@ -433,6 +433,7 @@ class Ai1ec_Date_Timezone extends Ai1ec_Base {
|
|
433 |
return $zone; // anything should do, as zones are not supported
|
434 |
}
|
435 |
if ( ! isset( $this->_identifiers[$zone] ) ) {
|
|
|
436 |
$valid_legacy = false;
|
437 |
try {
|
438 |
new DateTimeZone( $zone ); // throw away instantly
|
@@ -449,6 +450,20 @@ class Ai1ec_Date_Timezone extends Ai1ec_Base {
|
|
449 |
return $zone;
|
450 |
}
|
451 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
452 |
/**
|
453 |
* Check if timezone is set in wp_option
|
454 |
*
|
125 |
'French_Guiana' => 'America/Cayenne',
|
126 |
'French_Southern' => 'Indian/Kerguelen',
|
127 |
'Frunze' => 'Asia/Bishkek',
|
128 |
+
'GMT' => 'UTC', // seems better than 'Atlantic/Reykjavik'
|
129 |
'GMT Standard Time' => 'Europe/London',
|
130 |
'GTB Standard Time' => 'Europe/Istanbul',
|
131 |
'Galapagos' => 'Pacific/Galapagos',
|
373 |
}
|
374 |
|
375 |
/**
|
376 |
+
* Attempt to decode GMT offset to some Olson timezone.
|
377 |
*
|
378 |
* @param float $zone GMT offset.
|
379 |
*
|
380 |
+
* @return string Valid Olson timezone name (UTC is last resort).
|
381 |
*/
|
382 |
public function decode_gmt_timezone( $zone ) {
|
383 |
$auto_zone = timezone_name_from_abbr( null, $zone * 3600, true );
|
433 |
return $zone; // anything should do, as zones are not supported
|
434 |
}
|
435 |
if ( ! isset( $this->_identifiers[$zone] ) ) {
|
436 |
+
$zone = $this->_olson_lookup( $zone );
|
437 |
$valid_legacy = false;
|
438 |
try {
|
439 |
new DateTimeZone( $zone ); // throw away instantly
|
450 |
return $zone;
|
451 |
}
|
452 |
|
453 |
+
/**
|
454 |
+
* Quick map look-up to discard zones that have limited recognition.
|
455 |
+
*
|
456 |
+
* @param string $zone Name of timezone to lookup.
|
457 |
+
*
|
458 |
+
* @return string Timezone name to use. Might be the same as $zone.
|
459 |
+
*/
|
460 |
+
protected function _olson_lookup( $zone ) {
|
461 |
+
if ( isset( $this->_zones[$zone] ) ) {
|
462 |
+
return $this->_zones[$zone];
|
463 |
+
}
|
464 |
+
return $zone;
|
465 |
+
}
|
466 |
+
|
467 |
/**
|
468 |
* Check if timezone is set in wp_option
|
469 |
*
|
lib/environment/check.php
CHANGED
@@ -11,6 +11,18 @@
|
|
11 |
*/
|
12 |
class Ai1ec_Environment_Checks extends Ai1ec_Base {
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
/**
|
15 |
* Runs checks for necessary config options.
|
16 |
*
|
@@ -30,6 +42,7 @@ class Ai1ec_Environment_Checks extends Ai1ec_Base {
|
|
30 |
) {
|
31 |
return;
|
32 |
}
|
|
|
33 |
global $plugin_page;
|
34 |
$settings = $this->_registry->get( 'model.settings' );
|
35 |
$notification = $this->_registry->get( 'notification.admin' );
|
@@ -95,4 +108,103 @@ class Ai1ec_Environment_Checks extends Ai1ec_Base {
|
|
95 |
$option->set( 'ai1ec_force_flush_rewrite_rules', false );
|
96 |
}
|
97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
}
|
11 |
*/
|
12 |
class Ai1ec_Environment_Checks extends Ai1ec_Base {
|
13 |
|
14 |
+
const CORE_NAME = 'all-in-one-event-calendar/all-in-one-event-calendar.php';
|
15 |
+
|
16 |
+
/**
|
17 |
+
* List of dependencies.
|
18 |
+
*
|
19 |
+
* @var array
|
20 |
+
*/
|
21 |
+
protected $_addons = array(
|
22 |
+
'all-in-one-event-calendar-extended-views/all-in-one-event-calendar-extended-views.php' => '1.1.0.10',
|
23 |
+
'all-in-one-event-calendar-super-widget/all-in-one-event-calendar-super-widget.php' => '1.0.7.12',
|
24 |
+
);
|
25 |
+
|
26 |
/**
|
27 |
* Runs checks for necessary config options.
|
28 |
*
|
42 |
) {
|
43 |
return;
|
44 |
}
|
45 |
+
do_action( 'ai1ec_env_check' );
|
46 |
global $plugin_page;
|
47 |
$settings = $this->_registry->get( 'model.settings' );
|
48 |
$notification = $this->_registry->get( 'notification.admin' );
|
108 |
$option->set( 'ai1ec_force_flush_rewrite_rules', false );
|
109 |
}
|
110 |
|
111 |
+
/**
|
112 |
+
* Checks for add-on versions.
|
113 |
+
*
|
114 |
+
* @param string $plugin Plugin name.
|
115 |
+
*
|
116 |
+
* @return void Method does not return.
|
117 |
+
*/
|
118 |
+
public function check_addons_activation( $plugin ) {
|
119 |
+
switch ( $plugin ) {
|
120 |
+
case self::CORE_NAME:
|
121 |
+
$this->_check_active_addons();
|
122 |
+
break;
|
123 |
+
default:
|
124 |
+
$min_version = isset( $this->_addons[$plugin] )
|
125 |
+
? $this->_addons[$plugin]
|
126 |
+
: null;
|
127 |
+
if ( null !== $min_version ) {
|
128 |
+
$this->_plugin_activation( $plugin, $min_version );
|
129 |
+
}
|
130 |
+
break;
|
131 |
+
}
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Launches after bulk update.
|
136 |
+
*
|
137 |
+
* @param bool $result Input filter value.
|
138 |
+
*
|
139 |
+
* @return bool Output filter value.
|
140 |
+
*/
|
141 |
+
public function check_bulk_addons_activation( $result ) {
|
142 |
+
$this->_check_active_addons( true );
|
143 |
+
return $result;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Checks all Time.ly addons.
|
148 |
+
*
|
149 |
+
* @param bool $silent Whether to perform silent plugin deactivation or not.
|
150 |
+
*
|
151 |
+
* @return void Method does not return.
|
152 |
+
*/
|
153 |
+
protected function _check_active_addons( $silent = false ) {
|
154 |
+
foreach ( $this->_addons as $addon => $version ) {
|
155 |
+
if ( is_plugin_active( $addon ) ) {
|
156 |
+
$this->_plugin_activation( $addon, $version, true, $silent );
|
157 |
+
}
|
158 |
+
}
|
159 |
+
}
|
160 |
+
|
161 |
+
/**
|
162 |
+
* Performs Extended Views version check.
|
163 |
+
*
|
164 |
+
* @param string $addon Addon identifier.
|
165 |
+
* @param string $min_version Minimum required version.
|
166 |
+
* @param bool $core If set to true Core deactivates active and
|
167 |
+
* outdated addons when it is activated. If set
|
168 |
+
* false it means that addon activation process
|
169 |
+
* called this method and it's enough to throw
|
170 |
+
* and exception and allow exception handler
|
171 |
+
* to deactivate addon with proper notices.
|
172 |
+
* @param bool $silent Whether to perform silent plugin deactivation
|
173 |
+
* or not.
|
174 |
+
*
|
175 |
+
* @return void Method does not return.
|
176 |
+
*/
|
177 |
+
protected function _plugin_activation(
|
178 |
+
$addon,
|
179 |
+
$min_version,
|
180 |
+
$core = false,
|
181 |
+
$silent = false
|
182 |
+
) {
|
183 |
+
$ev_data = get_plugin_data(
|
184 |
+
WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $addon
|
185 |
+
);
|
186 |
+
if ( ! isset( $ev_data['Version'] ) ) {
|
187 |
+
return;
|
188 |
+
}
|
189 |
+
$version = $ev_data['Version'];
|
190 |
+
if ( -1 === version_compare( $version, $min_version ) ) {
|
191 |
+
$message = sprintf(
|
192 |
+
Ai1ec_I18n::__( 'Addon %s needs to be at least in version %s' ),
|
193 |
+
$ev_data['Name'],
|
194 |
+
$min_version
|
195 |
+
);
|
196 |
+
if ( ! $core ) {
|
197 |
+
throw new Ai1ec_Outdated_Addon_Exception( $message, $addon );
|
198 |
+
} else {
|
199 |
+
deactivate_plugins( $addon, $silent );
|
200 |
+
$this->_registry->get( 'notification.admin' )->store(
|
201 |
+
$message,
|
202 |
+
'error',
|
203 |
+
0,
|
204 |
+
array( Ai1ec_Notification_Admin::RCPT_ADMIN ),
|
205 |
+
true
|
206 |
+
);
|
207 |
+
}
|
208 |
+
}
|
209 |
+
}
|
210 |
}
|
lib/environment/exception/addon.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* The exception thrown when value doesn't pass validation.
|
5 |
+
*
|
6 |
+
* @author Time.ly Network Inc.
|
7 |
+
* @since 2.2
|
8 |
+
*
|
9 |
+
* @package AI1EC
|
10 |
+
* @subpackage AI1EC.Lib
|
11 |
+
*/
|
12 |
+
class Ai1ec_Outdated_Addon_Exception extends Ai1ec_Exception {
|
13 |
+
|
14 |
+
protected $_addon;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Constructor.
|
18 |
+
*
|
19 |
+
* @param string $message Exception message.
|
20 |
+
* @param string $addon Addon to disable.
|
21 |
+
*
|
22 |
+
* @return void Method does not return.
|
23 |
+
*/
|
24 |
+
public function __construct( $message, $addon ) {
|
25 |
+
parent::__construct( $message );
|
26 |
+
$this->_addon = $addon;
|
27 |
+
}
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Returns addon name.
|
31 |
+
*
|
32 |
+
* @return string Addon name.
|
33 |
+
*/
|
34 |
+
public function plugin_to_disable() {
|
35 |
+
return $this->_addon;
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Overrides __toString() to avoid stack trace.
|
40 |
+
*
|
41 |
+
* @return string Empty string.
|
42 |
+
*/
|
43 |
+
public function __toString() {
|
44 |
+
return '';
|
45 |
+
}
|
46 |
+
}
|
lib/exception/handler.php
CHANGED
@@ -256,7 +256,7 @@ class Ai1ec_Exception_Handler {
|
|
256 |
$errstr,
|
257 |
$errfile,
|
258 |
$errline,
|
259 |
-
$errcontext
|
260 |
) {
|
261 |
// if the error is not in our plugin, let PHP handle things.
|
262 |
$position = strpos( $errfile, AI1EC_PLUGIN_NAME );
|
256 |
$errstr,
|
257 |
$errfile,
|
258 |
$errline,
|
259 |
+
$errcontext = array()
|
260 |
) {
|
261 |
// if the error is not in our plugin, let PHP handle things.
|
262 |
$position = strpos( $errfile, AI1EC_PLUGIN_NAME );
|
lib/factory/event.php
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
* @subpackage Ai1EC.Factory
|
10 |
*/
|
11 |
class Ai1ec_Factory_Event extends Ai1ec_Base {
|
12 |
-
|
13 |
/**
|
14 |
* @var bool whether the theme is legacy
|
15 |
*/
|
@@ -27,10 +27,10 @@ class Ai1ec_Factory_Event extends Ai1ec_Base {
|
|
27 |
|
28 |
/**
|
29 |
* Factory method for events
|
30 |
-
*
|
31 |
* @param string $data
|
32 |
* @param string $instance
|
33 |
-
*
|
34 |
* @return Ai1ec_Event
|
35 |
*/
|
36 |
public function create_event_instance(
|
@@ -45,7 +45,14 @@ class Ai1ec_Factory_Event extends Ai1ec_Base {
|
|
45 |
$instance
|
46 |
);
|
47 |
}
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
$registry,
|
50 |
$data,
|
51 |
$instance
|
9 |
* @subpackage Ai1EC.Factory
|
10 |
*/
|
11 |
class Ai1ec_Factory_Event extends Ai1ec_Base {
|
12 |
+
|
13 |
/**
|
14 |
* @var bool whether the theme is legacy
|
15 |
*/
|
27 |
|
28 |
/**
|
29 |
* Factory method for events
|
30 |
+
*
|
31 |
* @param string $data
|
32 |
* @param string $instance
|
33 |
+
*
|
34 |
* @return Ai1ec_Event
|
35 |
*/
|
36 |
public function create_event_instance(
|
45 |
$instance
|
46 |
);
|
47 |
}
|
48 |
+
$class_name = 'Ai1ec_Event';
|
49 |
+
if (
|
50 |
+
'Ai1ec_Event' === $class_name &&
|
51 |
+
AI1EC_THEME_COMPATIBILITY_FER
|
52 |
+
) {
|
53 |
+
$class_name = 'Ai1ec_Event_Compatibility';
|
54 |
+
}
|
55 |
+
return new $class_name(
|
56 |
$registry,
|
57 |
$data,
|
58 |
$instance
|
lib/factory/strategy.php
CHANGED
@@ -66,7 +66,7 @@ class Ai1ec_Factory_Strategy extends Ai1ec_Base {
|
|
66 |
|
67 |
/**
|
68 |
* Get a writable directory if possible, falling back on wp_contet dir
|
69 |
-
*
|
70 |
* @param array $cache_dirs
|
71 |
* @return boolean|string
|
72 |
*/
|
@@ -93,10 +93,17 @@ class Ai1ec_Factory_Strategy extends Ai1ec_Base {
|
|
93 |
protected function _is_cache_dir_writable( $directory ) {
|
94 |
static $cache_directories = array();
|
95 |
if ( ! isset( $cache_directories[$directory] ) ) {
|
96 |
-
$
|
97 |
-
|
|
|
98 |
$directory
|
99 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
}
|
101 |
return $cache_directories[$directory];
|
102 |
}
|
66 |
|
67 |
/**
|
68 |
* Get a writable directory if possible, falling back on wp_contet dir
|
69 |
+
*
|
70 |
* @param array $cache_dirs
|
71 |
* @return boolean|string
|
72 |
*/
|
93 |
protected function _is_cache_dir_writable( $directory ) {
|
94 |
static $cache_directories = array();
|
95 |
if ( ! isset( $cache_directories[$directory] ) ) {
|
96 |
+
$cache_directories[$directory] = apply_filters(
|
97 |
+
'ai1ec_is_cache_dir_writable',
|
98 |
+
null,
|
99 |
$directory
|
100 |
);
|
101 |
+
if ( null === $cache_directories[$directory] ) {
|
102 |
+
$filesystem = $this->_registry->get( 'filesystem.checker' );
|
103 |
+
$cache_directories[$directory] = $filesystem->is_writable(
|
104 |
+
$directory
|
105 |
+
);
|
106 |
+
}
|
107 |
}
|
108 |
return $cache_directories[$directory];
|
109 |
}
|
lib/html/element/href.php
CHANGED
@@ -27,6 +27,7 @@ class Ai1ec_Html_Element_Href {
|
|
27 |
'post_ids',
|
28 |
'tag_ids',
|
29 |
'events_limit',
|
|
|
30 |
);
|
31 |
|
32 |
/**
|
@@ -44,6 +45,11 @@ class Ai1ec_Html_Element_Href {
|
|
44 |
*/
|
45 |
private $is_author;
|
46 |
|
|
|
|
|
|
|
|
|
|
|
47 |
/**
|
48 |
* @var array the arguments to parse
|
49 |
*/
|
@@ -64,6 +70,11 @@ class Ai1ec_Html_Element_Href {
|
|
64 |
*/
|
65 |
private $pretty_permalinks_enabled;
|
66 |
|
|
|
|
|
|
|
|
|
|
|
67 |
/**
|
68 |
* @param boolean $pretty_permalinks_enabled
|
69 |
*/
|
@@ -85,6 +96,12 @@ class Ai1ec_Html_Element_Href {
|
|
85 |
public function __construct( array $args, $calendar ) {
|
86 |
$this->args = $args;
|
87 |
$this->calendar_page = $calendar;
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
}
|
89 |
|
90 |
/**
|
@@ -127,7 +144,12 @@ class Ai1ec_Html_Element_Href {
|
|
127 |
$value;
|
128 |
}
|
129 |
}
|
130 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
131 |
$to_implode = $this->add_or_remove_category_from_href(
|
132 |
$to_implode
|
133 |
);
|
@@ -149,6 +171,19 @@ class Ai1ec_Html_Element_Href {
|
|
149 |
return $full_url;
|
150 |
}
|
151 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
/**
|
153 |
* Perform some extra manipulation for filter href. Basically if the current
|
154 |
* category is part of the filter, the href will not contain it (because
|
@@ -159,7 +194,10 @@ class Ai1ec_Html_Element_Href {
|
|
159 |
* @return array
|
160 |
*/
|
161 |
private function add_or_remove_category_from_href( array $to_implode ) {
|
162 |
-
$array_key = $this->
|
|
|
|
|
|
|
163 |
// Let's copy the origina cat_ids or tag_ids so we do not affect it
|
164 |
$copy = array();
|
165 |
if ( isset( $this->args[$array_key] ) ) {
|
@@ -218,4 +256,4 @@ class Ai1ec_Html_Element_Href {
|
|
218 |
return strpos( $url, '?' ) === false ? '?' : '&';
|
219 |
}
|
220 |
|
221 |
-
}
|
27 |
'post_ids',
|
28 |
'tag_ids',
|
29 |
'events_limit',
|
30 |
+
'request_format',
|
31 |
);
|
32 |
|
33 |
/**
|
45 |
*/
|
46 |
private $is_author;
|
47 |
|
48 |
+
/**
|
49 |
+
* @var boolean
|
50 |
+
*/
|
51 |
+
private $is_custom_filter;
|
52 |
+
|
53 |
/**
|
54 |
* @var array the arguments to parse
|
55 |
*/
|
70 |
*/
|
71 |
private $pretty_permalinks_enabled;
|
72 |
|
73 |
+
/**
|
74 |
+
* @var string
|
75 |
+
*/
|
76 |
+
private $uri_particle = null;
|
77 |
+
|
78 |
/**
|
79 |
* @param boolean $pretty_permalinks_enabled
|
80 |
*/
|
96 |
public function __construct( array $args, $calendar ) {
|
97 |
$this->args = $args;
|
98 |
$this->calendar_page = $calendar;
|
99 |
+
if ( isset( $args['_extra_used_parameters'] ) ) {
|
100 |
+
$this->used_paramaters = array_merge(
|
101 |
+
$this->used_paramaters,
|
102 |
+
$args['_extra_used_parameters']
|
103 |
+
);
|
104 |
+
}
|
105 |
}
|
106 |
|
107 |
/**
|
144 |
$value;
|
145 |
}
|
146 |
}
|
147 |
+
if (
|
148 |
+
$this->is_category ||
|
149 |
+
$this->is_tag ||
|
150 |
+
$this->is_author ||
|
151 |
+
$this->is_custom_filter
|
152 |
+
) {
|
153 |
$to_implode = $this->add_or_remove_category_from_href(
|
154 |
$to_implode
|
155 |
);
|
171 |
return $full_url;
|
172 |
}
|
173 |
|
174 |
+
/**
|
175 |
+
* Sets that class is used for custom filter.
|
176 |
+
*
|
177 |
+
* @param bool $value Expected true or false.
|
178 |
+
* @param string $uri_particle URI particle identifier.
|
179 |
+
*
|
180 |
+
* @return void Method does not return.
|
181 |
+
*/
|
182 |
+
public function set_custom_filter( $value, $uri_particle = null ) {
|
183 |
+
$this->is_custom_filter = $value;
|
184 |
+
$this->uri_particle = $uri_particle;
|
185 |
+
}
|
186 |
+
|
187 |
/**
|
188 |
* Perform some extra manipulation for filter href. Basically if the current
|
189 |
* category is part of the filter, the href will not contain it (because
|
194 |
* @return array
|
195 |
*/
|
196 |
private function add_or_remove_category_from_href( array $to_implode ) {
|
197 |
+
$array_key = $this->uri_particle;
|
198 |
+
if ( null === $this->uri_particle ) {
|
199 |
+
$array_key = $this->_current_array_key();
|
200 |
+
}
|
201 |
// Let's copy the origina cat_ids or tag_ids so we do not affect it
|
202 |
$copy = array();
|
203 |
if ( isset( $this->args[$array_key] ) ) {
|
256 |
return strpos( $url, '?' ) === false ? '?' : '&';
|
257 |
}
|
258 |
|
259 |
+
}
|
lib/html/element/setting/select.php
CHANGED
@@ -41,6 +41,7 @@ class Ai1ec_Html_Setting_Select extends Ai1ec_Html_Element_Settings {
|
|
41 |
);
|
42 |
}
|
43 |
}
|
|
|
44 |
foreach ( $options as $key => &$option ) {
|
45 |
// if the key is a string, it's an optgroup
|
46 |
if ( is_string( $key ) ) {
|
41 |
);
|
42 |
}
|
43 |
}
|
44 |
+
$options = apply_filters( 'ai1ec_settings_select_options' , $options, $this->_args['id'] );
|
45 |
foreach ( $options as $key => &$option ) {
|
46 |
// if the key is a string, it's an optgroup
|
47 |
if ( is_string( $key ) ) {
|
lib/html/element/setting/tags-categories.php
CHANGED
@@ -79,14 +79,16 @@ class Ai1ec_Html_Setting_Tags_Categories extends Ai1ec_Html_Element_Settings {
|
|
79 |
$options[] = $option;
|
80 |
}
|
81 |
$args = array(
|
82 |
-
'id' => '
|
83 |
-
'name' => '
|
84 |
'label' => $label,
|
85 |
'options' => $options,
|
86 |
'stacked' => true,
|
87 |
'attributes' => array(
|
88 |
'class' => 'ai1ec-form-control',
|
89 |
'multiple' => 'multiple',
|
|
|
|
|
90 |
),
|
91 |
);
|
92 |
return $loader->get_file( 'setting/select.twig', $args, true )
|
79 |
$options[] = $option;
|
80 |
}
|
81 |
$args = array(
|
82 |
+
'id' => $this->_args['id'] . '_default_' . $type,
|
83 |
+
'name' => $this->_args['id'] . '_default_' . $type . '[]',
|
84 |
'label' => $label,
|
85 |
'options' => $options,
|
86 |
'stacked' => true,
|
87 |
'attributes' => array(
|
88 |
'class' => 'ai1ec-form-control',
|
89 |
'multiple' => 'multiple',
|
90 |
+
// for Widget creator
|
91 |
+
'data-id' => 'tags' === $type ? 'tag_ids' : 'cat_ids',
|
92 |
),
|
93 |
);
|
94 |
return $loader->get_file( 'setting/select.twig', $args, true )
|
lib/http/request.php
CHANGED
@@ -59,6 +59,9 @@ class Ai1ec_Http_Request {
|
|
59 |
) {
|
60 |
return true;
|
61 |
}
|
|
|
|
|
|
|
62 |
if (
|
63 |
isset( $_GET['ai1ec_render_js'] ) ||
|
64 |
isset( $_GET['ai1ec_render_css'] )
|
@@ -146,7 +149,7 @@ class Ai1ec_Http_Request {
|
|
146 |
curl_setopt( $curl, CURLOPT_CAINFO, AI1EC_CA_ROOT_PEM );
|
147 |
}
|
148 |
}
|
149 |
-
|
150 |
/**
|
151 |
* Initialize time.ly certificate only for time.ly domain
|
152 |
*
|
@@ -154,7 +157,7 @@ class Ai1ec_Http_Request {
|
|
154 |
* @param string $url Current URL address.
|
155 |
*
|
156 |
* @return void Method does not return value
|
157 |
-
*/
|
158 |
public function init_certificate( $args, $url ) {
|
159 |
remove_action( 'http_api_curl', array( $this, 'curl_inject_certificate' ) );
|
160 |
if ( false !== stripos( $url, '//time.ly' ) ) {
|
@@ -162,4 +165,33 @@ class Ai1ec_Http_Request {
|
|
162 |
}
|
163 |
return $args;
|
164 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
}
|
59 |
) {
|
60 |
return true;
|
61 |
}
|
62 |
+
if ( isset( $_GET['ai1ec_js_widget'] ) ) {
|
63 |
+
return true;
|
64 |
+
}
|
65 |
if (
|
66 |
isset( $_GET['ai1ec_render_js'] ) ||
|
67 |
isset( $_GET['ai1ec_render_css'] )
|
149 |
curl_setopt( $curl, CURLOPT_CAINFO, AI1EC_CA_ROOT_PEM );
|
150 |
}
|
151 |
}
|
152 |
+
|
153 |
/**
|
154 |
* Initialize time.ly certificate only for time.ly domain
|
155 |
*
|
157 |
* @param string $url Current URL address.
|
158 |
*
|
159 |
* @return void Method does not return value
|
160 |
+
*/
|
161 |
public function init_certificate( $args, $url ) {
|
162 |
remove_action( 'http_api_curl', array( $this, 'curl_inject_certificate' ) );
|
163 |
if ( false !== stripos( $url, '//time.ly' ) ) {
|
165 |
}
|
166 |
return $args;
|
167 |
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Checks if is json required for frontend rendering.
|
171 |
+
*
|
172 |
+
* @param string $request_format Format.
|
173 |
+
*
|
174 |
+
* @return bool True or false.
|
175 |
+
*/
|
176 |
+
public function is_json_required( $request_format ) {
|
177 |
+
return
|
178 |
+
'json' === $request_format
|
179 |
+
&& AI1EC_USE_FRONTEND_RENDERING
|
180 |
+
&& $this->is_ajax();
|
181 |
+
}
|
182 |
+
|
183 |
+
/**
|
184 |
+
* Returns current action for bulk operations.
|
185 |
+
*
|
186 |
+
* @return string|null Action or null when empty.
|
187 |
+
*/
|
188 |
+
public function get_current_action() {
|
189 |
+
if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] ) {
|
190 |
+
return $_REQUEST['action'];
|
191 |
+
}
|
192 |
+
if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] ) {
|
193 |
+
return $_REQUEST['action2'];
|
194 |
+
}
|
195 |
+
return null;
|
196 |
+
}
|
197 |
}
|
lib/http/request/parser.php
CHANGED
@@ -100,15 +100,18 @@ class Ai1ec_Request_Parser extends Ai1ec_Abstract_Query {
|
|
100 |
$this->add_rule( 'exact_date', false, 'string', null, false );
|
101 |
// This is the type of the request: Standard, json or jsonp
|
102 |
$this->add_rule( 'request_type', false, 'string', 'html', false );
|
103 |
-
// This is the format of the request.
|
104 |
$this->add_rule( 'request_format',false, 'string', 'html', false );
|
105 |
// The callback function for jsonp calls
|
106 |
$this->add_rule( 'callback', false, 'string', null, false );
|
107 |
// Whether to include navigation controls
|
108 |
$this->add_rule( 'no_navigation' ,false, 'string', false, false );
|
|
|
|
|
109 |
$this->add_rule( 'applying_filters' ,false, 'string', false, false );
|
110 |
$this->add_rule( 'shortcode' ,false, 'string', false, false );
|
111 |
$this->add_rule( 'events_limit', false, 'int', null, false );
|
|
|
112 |
}
|
113 |
|
114 |
/**
|
100 |
$this->add_rule( 'exact_date', false, 'string', null, false );
|
101 |
// This is the type of the request: Standard, json or jsonp
|
102 |
$this->add_rule( 'request_type', false, 'string', 'html', false );
|
103 |
+
// This is the format of the request.
|
104 |
$this->add_rule( 'request_format',false, 'string', 'html', false );
|
105 |
// The callback function for jsonp calls
|
106 |
$this->add_rule( 'callback', false, 'string', null, false );
|
107 |
// Whether to include navigation controls
|
108 |
$this->add_rule( 'no_navigation' ,false, 'string', false, false );
|
109 |
+
// whether to display the filter bar in the super widget
|
110 |
+
$this->add_rule( 'display_filters' ,false, 'string', false, false );
|
111 |
$this->add_rule( 'applying_filters' ,false, 'string', false, false );
|
112 |
$this->add_rule( 'shortcode' ,false, 'string', false, false );
|
113 |
$this->add_rule( 'events_limit', false, 'int', null, false );
|
114 |
+
do_action( 'ai1ec_request_parser_rules_added', $this );
|
115 |
}
|
116 |
|
117 |
/**
|
lib/http/response/helper.php
CHANGED
@@ -77,4 +77,21 @@ class Ai1ec_Http_Response_Helper {
|
|
77 |
}
|
78 |
return array_map( array( __CLASS__, 'utf8' ), $input );
|
79 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
}
|
77 |
}
|
78 |
return array_map( array( __CLASS__, 'utf8' ), $input );
|
79 |
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Removes the protocla from the url
|
83 |
+
*
|
84 |
+
* @param string $url
|
85 |
+
*
|
86 |
+
* @return string
|
87 |
+
*/
|
88 |
+
public static function remove_protocols( $url ) {
|
89 |
+
$disallowed = array( 'http:', 'https:' );
|
90 |
+
foreach ( $disallowed as $d ) {
|
91 |
+
if ( strpos( $url, $d ) === 0 ) {
|
92 |
+
return str_replace( $d, '', $url );
|
93 |
+
}
|
94 |
+
}
|
95 |
+
return $url;
|
96 |
+
}
|
97 |
}
|
lib/http/response/render/strategy/jsonp.php
CHANGED
@@ -21,7 +21,10 @@ class Ai1ec_Render_Strategy_Jsonp extends Ai1ec_Http_Response_Render_Strategy {
|
|
21 |
$output = json_encode( $data );
|
22 |
if ( ! empty( $params['callback'] ) ) {
|
23 |
$output = $params['callback'] . '(' . $output . ')';
|
|
|
|
|
24 |
}
|
|
|
25 |
echo $output;
|
26 |
return Ai1ec_Http_Response_Helper::stop( 0 );
|
27 |
}
|
21 |
$output = json_encode( $data );
|
22 |
if ( ! empty( $params['callback'] ) ) {
|
23 |
$output = $params['callback'] . '(' . $output . ')';
|
24 |
+
} else if ( isset( $_GET['callback'] ) ) {
|
25 |
+
$output = $_GET['callback'] . '(' . $output . ')';
|
26 |
}
|
27 |
+
|
28 |
echo $output;
|
29 |
return Ai1ec_Http_Response_Helper::stop( 0 );
|
30 |
}
|
lib/import-export/ics.php
CHANGED
@@ -69,7 +69,7 @@ class Ai1ec_Ics_Import_Export_Engine
|
|
69 |
foreach ( $arguments['events'] as $event ) {
|
70 |
$post_ids[] = $event->get( 'post_id' );
|
71 |
}
|
72 |
-
$this->_taxonomy_model->
|
73 |
$this->_registry->get( 'controller.content-filter' )
|
74 |
->clear_the_content_filters();
|
75 |
foreach ( $arguments['events'] as $event ) {
|
@@ -139,9 +139,19 @@ class Ai1ec_Ics_Import_Export_Engine
|
|
139 |
// Maybe use $v->selectComponents(), which takes into account recurrence
|
140 |
|
141 |
// Fetch default timezone in case individual properties don't define it
|
142 |
-
$
|
143 |
-
|
144 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
// go over each event
|
146 |
while ( $e = $v->getComponent( 'vevent' ) ) {
|
147 |
// Event data array.
|
@@ -185,7 +195,7 @@ class Ai1ec_Ics_Import_Export_Engine
|
|
185 |
}
|
186 |
|
187 |
$categories = $e->getProperty( "CATEGORIES", false, true );
|
188 |
-
$imported_cat = array();
|
189 |
// If the user chose to preserve taxonomies during import, add categories.
|
190 |
if( $categories && $feed->keep_tags_categories ) {
|
191 |
$imported_cat = $this->_add_categories_and_tags(
|
@@ -206,7 +216,7 @@ class Ai1ec_Ics_Import_Export_Engine
|
|
206 |
}
|
207 |
$tags = $e->getProperty( "X-TAGS", false, true );
|
208 |
|
209 |
-
$imported_tags = array();
|
210 |
// If the user chose to preserve taxonomies during import, add tags.
|
211 |
if( $tags && $feed->keep_tags_categories ) {
|
212 |
$imported_tags = $this->_add_categories_and_tags(
|
@@ -233,14 +243,17 @@ class Ai1ec_Ics_Import_Export_Engine
|
|
233 |
if ( ! empty( $ms_allday ) && $ms_allday[1] == 'TRUE' ) {
|
234 |
$allday = true;
|
235 |
}
|
236 |
-
|
237 |
-
|
238 |
-
|
|
|
|
|
|
|
239 |
|
240 |
if ( false === $start || false === $end ) {
|
241 |
throw new Ai1ec_Parse_Exception(
|
242 |
'Failed to parse one or more dates given timezone "' .
|
243 |
-
var_export( $
|
244 |
);
|
245 |
continue;
|
246 |
}
|
@@ -281,7 +294,7 @@ class Ai1ec_Ics_Import_Export_Engine
|
|
281 |
// We may have two formats:
|
282 |
// one exdate with many dates ot more EXDATE rules
|
283 |
$exdates = explode( 'EXDATE', $exdates );
|
284 |
-
$def_timezone = $this->_get_import_timezone( $
|
285 |
foreach ( $exdates as $exd ) {
|
286 |
if ( empty( $exd ) ) {
|
287 |
continue;
|
@@ -414,7 +427,6 @@ class Ai1ec_Ics_Import_Export_Engine
|
|
414 |
// If no contact name, default to organizer property.
|
415 |
$data['contact_name'] = $organizer;
|
416 |
}
|
417 |
-
|
418 |
// Store yet-unsaved values to the $data array.
|
419 |
$data += array(
|
420 |
'recurrence_rules' => $rrule,
|
@@ -433,8 +445,8 @@ class Ai1ec_Ics_Import_Export_Engine
|
|
433 |
'ical_organizer' => $organizer,
|
434 |
'ical_contact' => $contact,
|
435 |
'ical_uid' => $e->getProperty( 'uid' ),
|
436 |
-
'categories' => array_keys( $imported_cat ),
|
437 |
-
'tags' => array_keys( $imported_tags ),
|
438 |
'feed' => $feed,
|
439 |
'post' => array(
|
440 |
'post_status' => 'publish',
|
@@ -453,6 +465,13 @@ class Ai1ec_Ics_Import_Export_Engine
|
|
453 |
);
|
454 |
|
455 |
// Create event object.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
456 |
$event = $this->_registry->get( 'model.event', $data );
|
457 |
|
458 |
// Instant Event
|
@@ -506,8 +525,17 @@ class Ai1ec_Ics_Import_Export_Engine
|
|
506 |
}
|
507 |
|
508 |
}
|
509 |
-
|
510 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
511 |
}
|
512 |
|
513 |
return array(
|
@@ -664,6 +692,7 @@ class Ai1ec_Ics_Import_Export_Engine
|
|
664 |
)
|
665 |
)
|
666 |
);
|
|
|
667 |
$content = apply_filters(
|
668 |
'ai1ec_the_content',
|
669 |
apply_filters(
|
@@ -673,14 +702,20 @@ class Ai1ec_Ics_Import_Export_Engine
|
|
673 |
);
|
674 |
$content = str_replace(']]>', ']]>', $content);
|
675 |
$content = html_entity_decode( $content, ENT_QUOTES, 'UTF-8' );
|
|
|
676 |
// Prepend featured image if available.
|
677 |
$size = null;
|
678 |
$avatar = $this->_registry->get( 'view.event.avatar' );
|
679 |
-
|
680 |
-
|
|
|
|
|
|
|
681 |
esc_attr( $img_url ) . '" width="' . $size[0] . '" height="' .
|
682 |
$size[1] . '" /></div>' . $content;
|
|
|
683 |
}
|
|
|
684 |
if ( isset( $params['no_html'] ) && $params['no_html'] ) {
|
685 |
$e->setProperty(
|
686 |
'description',
|
@@ -806,6 +841,7 @@ class Ai1ec_Ics_Import_Export_Engine
|
|
806 |
|
807 |
$categories = array();
|
808 |
$language = get_bloginfo( 'language' );
|
|
|
809 |
foreach (
|
810 |
$this->_taxonomy_model->get_post_categories(
|
811 |
$event->get( 'post_id' )
|
@@ -1052,16 +1088,19 @@ class Ai1ec_Ics_Import_Export_Engine
|
|
1052 |
) {
|
1053 |
$taxonomy = $is_tag ? 'events_tags' : 'events_categories';
|
1054 |
$categories = explode( ',', $terms );
|
1055 |
-
$get_term_by = $use_name ? 'name' : 'id';
|
1056 |
$event_taxonomy = $this->_registry->get( 'model.event.taxonomy' );
|
|
|
1057 |
foreach ( $categories as $cat_name ) {
|
1058 |
$cat_name = trim( $cat_name );
|
1059 |
if ( empty( $cat_name ) ) {
|
1060 |
continue;
|
1061 |
}
|
1062 |
-
$
|
1063 |
-
if ( false !== $
|
1064 |
-
$imported_terms[$
|
|
|
|
|
|
|
1065 |
}
|
1066 |
}
|
1067 |
return $imported_terms;
|
69 |
foreach ( $arguments['events'] as $event ) {
|
70 |
$post_ids[] = $event->get( 'post_id' );
|
71 |
}
|
72 |
+
$this->_taxonomy_model->prepare_meta_for_ics( $post_ids );
|
73 |
$this->_registry->get( 'controller.content-filter' )
|
74 |
->clear_the_content_filters();
|
75 |
foreach ( $arguments['events'] as $event ) {
|
139 |
// Maybe use $v->selectComponents(), which takes into account recurrence
|
140 |
|
141 |
// Fetch default timezone in case individual properties don't define it
|
142 |
+
$tz = $v->getComponent( 'vtimezone' );
|
143 |
+
if ( ! empty( $tz ) ) {
|
144 |
+
$timezone = $tz->getProperty( 'TZID' );
|
145 |
+
}
|
146 |
+
if ( empty( $timezone ) ) {
|
147 |
+
$timezone = $v->getProperty( 'X-WR-TIMEZONE' );
|
148 |
+
$timezone = (string)$timezone[1];
|
149 |
+
}
|
150 |
+
|
151 |
+
$messages = array();
|
152 |
+
$local_timezone = $this->_registry->get( 'date.timezone' )
|
153 |
+
->get_default_timezone();
|
154 |
+
$current_timestamp = $this->_registry->get( 'date.time' )->format_to_gmt();
|
155 |
// go over each event
|
156 |
while ( $e = $v->getComponent( 'vevent' ) ) {
|
157 |
// Event data array.
|
195 |
}
|
196 |
|
197 |
$categories = $e->getProperty( "CATEGORIES", false, true );
|
198 |
+
$imported_cat = array( Ai1ec_Event_Taxonomy::CATEGORIES => array() );
|
199 |
// If the user chose to preserve taxonomies during import, add categories.
|
200 |
if( $categories && $feed->keep_tags_categories ) {
|
201 |
$imported_cat = $this->_add_categories_and_tags(
|
216 |
}
|
217 |
$tags = $e->getProperty( "X-TAGS", false, true );
|
218 |
|
219 |
+
$imported_tags = array( Ai1ec_Event_Taxonomy::TAGS => array() );
|
220 |
// If the user chose to preserve taxonomies during import, add tags.
|
221 |
if( $tags && $feed->keep_tags_categories ) {
|
222 |
$imported_tags = $this->_add_categories_and_tags(
|
243 |
if ( ! empty( $ms_allday ) && $ms_allday[1] == 'TRUE' ) {
|
244 |
$allday = true;
|
245 |
}
|
246 |
+
$event_timezone = $timezone;
|
247 |
+
if ( $allday ) {
|
248 |
+
$event_timezone = $local_timezone;
|
249 |
+
}
|
250 |
+
$start = $this->_time_array_to_datetime( $start, $event_timezone );
|
251 |
+
$end = $this->_time_array_to_datetime( $end, $event_timezone );
|
252 |
|
253 |
if ( false === $start || false === $end ) {
|
254 |
throw new Ai1ec_Parse_Exception(
|
255 |
'Failed to parse one or more dates given timezone "' .
|
256 |
+
var_export( $event_timezone, true ) . '"'
|
257 |
);
|
258 |
continue;
|
259 |
}
|
294 |
// We may have two formats:
|
295 |
// one exdate with many dates ot more EXDATE rules
|
296 |
$exdates = explode( 'EXDATE', $exdates );
|
297 |
+
$def_timezone = $this->_get_import_timezone( $event_timezone );
|
298 |
foreach ( $exdates as $exd ) {
|
299 |
if ( empty( $exd ) ) {
|
300 |
continue;
|
427 |
// If no contact name, default to organizer property.
|
428 |
$data['contact_name'] = $organizer;
|
429 |
}
|
|
|
430 |
// Store yet-unsaved values to the $data array.
|
431 |
$data += array(
|
432 |
'recurrence_rules' => $rrule,
|
445 |
'ical_organizer' => $organizer,
|
446 |
'ical_contact' => $contact,
|
447 |
'ical_uid' => $e->getProperty( 'uid' ),
|
448 |
+
'categories' => array_keys( $imported_cat[Ai1ec_Event_Taxonomy::CATEGORIES] ),
|
449 |
+
'tags' => array_keys( $imported_tags[Ai1ec_Event_Taxonomy::TAGS] ),
|
450 |
'feed' => $feed,
|
451 |
'post' => array(
|
452 |
'post_status' => 'publish',
|
465 |
);
|
466 |
|
467 |
// Create event object.
|
468 |
+
$data = apply_filters(
|
469 |
+
'ai1ec_pre_init_event_from_feed',
|
470 |
+
$data,
|
471 |
+
$e,
|
472 |
+
$feed
|
473 |
+
);
|
474 |
+
|
475 |
$event = $this->_registry->get( 'model.event', $data );
|
476 |
|
477 |
// Instant Event
|
525 |
}
|
526 |
|
527 |
}
|
528 |
+
|
529 |
+
// import not standard taxonomies.
|
530 |
+
unset( $imported_cat[Ai1ec_Event_Taxonomy::CATEGORIES] );
|
531 |
+
foreach ( $imported_cat as $tax_name => $ids ) {
|
532 |
+
wp_set_post_terms( $event->get( 'post_id' ), array_keys( $ids ), $tax_name );
|
533 |
+
}
|
534 |
+
|
535 |
+
// if the event is not finished, unset it otherwise it could be deleted afterwards.
|
536 |
+
if ( $event->get( 'end' )->format_to_gmt() > $current_timestamp ) {
|
537 |
+
unset( $events_in_db[$event->get( 'post_id' )] );
|
538 |
+
}
|
539 |
}
|
540 |
|
541 |
return array(
|
692 |
)
|
693 |
)
|
694 |
);
|
695 |
+
|
696 |
$content = apply_filters(
|
697 |
'ai1ec_the_content',
|
698 |
apply_filters(
|
702 |
);
|
703 |
$content = str_replace(']]>', ']]>', $content);
|
704 |
$content = html_entity_decode( $content, ENT_QUOTES, 'UTF-8' );
|
705 |
+
|
706 |
// Prepend featured image if available.
|
707 |
$size = null;
|
708 |
$avatar = $this->_registry->get( 'view.event.avatar' );
|
709 |
+
$matches = $avatar->get_image_from_content( $content );
|
710 |
+
// if no img is already present - add thumbnail
|
711 |
+
if ( empty( $matches ) ) {
|
712 |
+
if ( $img_url = $avatar->get_post_thumbnail_url( $event, $size ) ) {
|
713 |
+
$content = '<div class="ai1ec-event-avatar alignleft timely"><img src="' .
|
714 |
esc_attr( $img_url ) . '" width="' . $size[0] . '" height="' .
|
715 |
$size[1] . '" /></div>' . $content;
|
716 |
+
}
|
717 |
}
|
718 |
+
|
719 |
if ( isset( $params['no_html'] ) && $params['no_html'] ) {
|
720 |
$e->setProperty(
|
721 |
'description',
|
841 |
|
842 |
$categories = array();
|
843 |
$language = get_bloginfo( 'language' );
|
844 |
+
|
845 |
foreach (
|
846 |
$this->_taxonomy_model->get_post_categories(
|
847 |
$event->get( 'post_id' )
|
1088 |
) {
|
1089 |
$taxonomy = $is_tag ? 'events_tags' : 'events_categories';
|
1090 |
$categories = explode( ',', $terms );
|
|
|
1091 |
$event_taxonomy = $this->_registry->get( 'model.event.taxonomy' );
|
1092 |
+
|
1093 |
foreach ( $categories as $cat_name ) {
|
1094 |
$cat_name = trim( $cat_name );
|
1095 |
if ( empty( $cat_name ) ) {
|
1096 |
continue;
|
1097 |
}
|
1098 |
+
$term = $event_taxonomy->initiate_term( $cat_name, $taxonomy, ! $use_name );
|
1099 |
+
if ( false !== $term ) {
|
1100 |
+
if ( ! isset( $imported_terms[$term['taxonomy']] ) ) {
|
1101 |
+
$imported_terms[$term['taxonomy']] = array();
|
1102 |
+
}
|
1103 |
+
$imported_terms[$term['taxonomy']][$term['term_id']] = true;
|
1104 |
}
|
1105 |
}
|
1106 |
return $imported_terms;
|
lib/less/lessphp.php
CHANGED
@@ -104,10 +104,10 @@ class Ai1ec_Less_Lessphp extends Ai1ec_Base {
|
|
104 |
$variables = $this->convert_less_variables_for_parsing( $variables );
|
105 |
// Inject additional constants from extensions if not compiling core only.
|
106 |
if ( false === $compile_core ) {
|
107 |
-
|
108 |
$variables = apply_filters( 'ai1ec_less_constants', $variables );
|
109 |
}
|
110 |
-
|
111 |
|
112 |
// Load the static variables defined in the theme's variables.less file.
|
113 |
$this->load_static_theme_variables();
|
@@ -158,10 +158,22 @@ class Ai1ec_Less_Lessphp extends Ai1ec_Base {
|
|
158 |
$this->lessc->addImportDir( $dir );
|
159 |
}
|
160 |
}
|
161 |
-
$variables['fontdir'] = '~"' .
|
162 |
-
|
163 |
-
|
164 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
if ( true === $compile_core ) {
|
166 |
$variables['fontdir'] = '~"../font"';
|
167 |
$variables['fontdir_default'] = '~"../font"';
|
@@ -176,6 +188,14 @@ class Ai1ec_Less_Lessphp extends Ai1ec_Base {
|
|
176 |
} catch ( Exception $e ) {
|
177 |
throw $e;
|
178 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
return $this->parsed_css;
|
180 |
}
|
181 |
|
@@ -291,6 +311,35 @@ class Ai1ec_Less_Lessphp extends Ai1ec_Base {
|
|
291 |
$this->unparsed_variable_file = $file->get_content();
|
292 |
}
|
293 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
294 |
/**
|
295 |
* Gets the saved variables from the database, and make sure all variables
|
296 |
* are set correctly as required by config file and any extensions. Also
|
104 |
$variables = $this->convert_less_variables_for_parsing( $variables );
|
105 |
// Inject additional constants from extensions if not compiling core only.
|
106 |
if ( false === $compile_core ) {
|
107 |
+
|
108 |
$variables = apply_filters( 'ai1ec_less_constants', $variables );
|
109 |
}
|
110 |
+
|
111 |
|
112 |
// Load the static variables defined in the theme's variables.less file.
|
113 |
$this->load_static_theme_variables();
|
158 |
$this->lessc->addImportDir( $dir );
|
159 |
}
|
160 |
}
|
161 |
+
$variables['fontdir'] = '~"' .
|
162 |
+
Ai1ec_Http_Response_Helper::remove_protocols(
|
163 |
+
$theme['theme_url']
|
164 |
+
) . '/font"';
|
165 |
+
$variables['fontdir_default'] = '~"' .
|
166 |
+
Ai1ec_Http_Response_Helper::remove_protocols(
|
167 |
+
$this->default_theme_url
|
168 |
+
) . 'font"';
|
169 |
+
$variables['imgdir'] = '~"' .
|
170 |
+
Ai1ec_Http_Response_Helper::remove_protocols(
|
171 |
+
$theme['theme_url']
|
172 |
+
) . '/img"';
|
173 |
+
$variables['imgdir_default'] = '~"' .
|
174 |
+
Ai1ec_Http_Response_Helper::remove_protocols(
|
175 |
+
$this->default_theme_url
|
176 |
+
) . 'img"';
|
177 |
if ( true === $compile_core ) {
|
178 |
$variables['fontdir'] = '~"../font"';
|
179 |
$variables['fontdir_default'] = '~"../font"';
|
188 |
} catch ( Exception $e ) {
|
189 |
throw $e;
|
190 |
}
|
191 |
+
|
192 |
+
// Replace font placeholders
|
193 |
+
$this->parsed_css = preg_replace_callback(
|
194 |
+
'/__BASE64_FONT_([a-zA-Z0-9]+)_(\S+)__/m',
|
195 |
+
array( $this, 'load_font_base64' ),
|
196 |
+
$this->parsed_css
|
197 |
+
);
|
198 |
+
|
199 |
return $this->parsed_css;
|
200 |
}
|
201 |
|
311 |
$this->unparsed_variable_file = $file->get_content();
|
312 |
}
|
313 |
|
314 |
+
/**
|
315 |
+
* Load font as base 64 encoded
|
316 |
+
*
|
317 |
+
* @param array $matches
|
318 |
+
* @return string
|
319 |
+
*/
|
320 |
+
private function load_font_base64( $matches ) {
|
321 |
+
// Find out the active theme URL.
|
322 |
+
$option = $this->_registry->get( 'model.option' );
|
323 |
+
$theme = $option->get( 'ai1ec_current_theme' );
|
324 |
+
$dirs = apply_filters(
|
325 |
+
'ai1ec_font_dirs',
|
326 |
+
array(
|
327 |
+
'AI1EC' => array(
|
328 |
+
$theme['theme_dir'] . DIRECTORY_SEPARATOR . 'font',
|
329 |
+
AI1EC_DEFAULT_THEME_PATH . DIRECTORY_SEPARATOR . 'font',
|
330 |
+
)
|
331 |
+
)
|
332 |
+
);
|
333 |
+
$directories = $dirs[$matches[1]];
|
334 |
+
foreach ( $directories as $dir ) {
|
335 |
+
$font_file = $dir . DIRECTORY_SEPARATOR . $matches[2];
|
336 |
+
if ( file_exists( $font_file ) ) {
|
337 |
+
return base64_encode( file_get_contents( $font_file ) );
|
338 |
+
}
|
339 |
+
}
|
340 |
+
return '';
|
341 |
+
}
|
342 |
+
|
343 |
/**
|
344 |
* Gets the saved variables from the database, and make sure all variables
|
345 |
* are set correctly as required by config file and any extensions. Also
|
lib/less/variable/font.php
CHANGED
@@ -65,10 +65,9 @@ class Ai1ec_Less_Variable_Font extends Ai1ec_Less_Variable {
|
|
65 |
|
66 |
// Allow extensions to add options to the font list.
|
67 |
$this->fonts = apply_filters( 'ai1ec_font_options', $this->fonts );
|
68 |
-
|
69 |
-
if ( ! in_array( $this->value, $this->fonts ) ) {
|
70 |
$this->use_custom_value = true;
|
71 |
-
$this->custom_value = $
|
72 |
$this->value = self::CUSTOM_FONT;
|
73 |
}
|
74 |
parent::__construct( $registry, $params );
|
@@ -86,7 +85,9 @@ class Ai1ec_Less_Variable_Font extends Ai1ec_Less_Variable {
|
|
86 |
'text' => $text,
|
87 |
'value' => $key,
|
88 |
);
|
89 |
-
if ( $key === $this->value
|
|
|
|
|
90 |
$option['args'] = array(
|
91 |
'selected' => 'selected',
|
92 |
);
|
@@ -122,7 +123,7 @@ class Ai1ec_Less_Variable_Font extends Ai1ec_Less_Variable {
|
|
122 |
|
123 |
);
|
124 |
|
125 |
-
if ( $this->
|
126 |
$args['input']['args']['class'] = 'ai1ec-custom-font ai1ec-hide';
|
127 |
} else {
|
128 |
$args['input']['value'] = $this->custom_value;
|
65 |
|
66 |
// Allow extensions to add options to the font list.
|
67 |
$this->fonts = apply_filters( 'ai1ec_font_options', $this->fonts );
|
68 |
+
if ( ! in_array( $params['value'], $this->fonts ) ) {
|
|
|
69 |
$this->use_custom_value = true;
|
70 |
+
$this->custom_value = $params['value'];
|
71 |
$this->value = self::CUSTOM_FONT;
|
72 |
}
|
73 |
parent::__construct( $registry, $params );
|
85 |
'text' => $text,
|
86 |
'value' => $key,
|
87 |
);
|
88 |
+
if ( $key === $this->value
|
89 |
+
|| ( self::CUSTOM_FONT === $key && $this->use_custom_value )
|
90 |
+
) {
|
91 |
$option['args'] = array(
|
92 |
'selected' => 'selected',
|
93 |
);
|
123 |
|
124 |
);
|
125 |
|
126 |
+
if ( ! $this->use_custom_value ) {
|
127 |
$args['input']['args']['class'] = 'ai1ec-custom-font ai1ec-hide';
|
128 |
} else {
|
129 |
$args['input']['value'] = $this->custom_value;
|
lib/news/feed.php
ADDED
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* RSS feed importer.
|
5 |
+
*
|
6 |
+
* @author Time.ly Network Inc.
|
7 |
+
* @since 2.1
|
8 |
+
*
|
9 |
+
* @package AI1EC
|
10 |
+
* @subpackage AI1EC.News
|
11 |
+
*/
|
12 |
+
class Ai1ec_News_Feed {
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Import RSS feed.
|
16 |
+
*
|
17 |
+
* @param int $limit Number of entries to fetch.
|
18 |
+
* @param string $feed URI of RSS feed to import.
|
19 |
+
*
|
20 |
+
* @return array RSS feed entries.
|
21 |
+
*/
|
22 |
+
public function import_feed( $limit = 5, $feed = AI1EC_RSS_FEED ) {
|
23 |
+
include_once(
|
24 |
+
ABSPATH . WPINC . DIRECTORY_SEPARATOR . 'class-simplepie.php'
|
25 |
+
);
|
26 |
+
$cache = $this->get_transient_name( $feed );
|
27 |
+
$result = get_transient( $cache );
|
28 |
+
if ( false === $result || AI1EC_DEBUG ) {
|
29 |
+
$result = $this->fetch_feed( $limit, $feed );
|
30 |
+
$expiration = $this->get_expiration( $feed );
|
31 |
+
set_transient( $cache, $result, $expiration );
|
32 |
+
}
|
33 |
+
return $result;
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Fetch feed w/o caching.
|
38 |
+
*
|
39 |
+
* @param int $limit Number of entries to fetch.
|
40 |
+
* @param string $feed URI of RSS feed to import.
|
41 |
+
*
|
42 |
+
* @return array List of feed entries.
|
43 |
+
*/
|
44 |
+
public function fetch_feed( $limit, $feed ) {
|
45 |
+
include_once(
|
46 |
+
ABSPATH . WPINC . DIRECTORY_SEPARATOR .'SimplePie'
|
47 |
+
. DIRECTORY_SEPARATOR .'File.php'
|
48 |
+
);
|
49 |
+
$result = array();
|
50 |
+
try {
|
51 |
+
$file = new SimplePie_File( $feed );
|
52 |
+
$feed = new SimplePie();
|
53 |
+
$feed->set_raw_data( $file->body );
|
54 |
+
$feed->init();
|
55 |
+
if ( ! is_wp_error( $feed ) ) {
|
56 |
+
$result = $feed->get_items( 0, $limit );
|
57 |
+
}
|
58 |
+
} catch ( Exception $exception ) {} // discard
|
59 |
+
return $result;
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Get name to be used for transient.
|
64 |
+
*
|
65 |
+
* @param string $feed URI of feed to get transien name for.
|
66 |
+
*
|
67 |
+
* @return string Transient name to use.
|
68 |
+
*/
|
69 |
+
public function get_transient_name( $feed ) {
|
70 |
+
return ( AI1EC_RSS_FEED === $feed )
|
71 |
+
? 'ai1ec_rss_feed' :
|
72 |
+
'ai1ec_rss_' . substr( md5( $feed ), 5, 8 );
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Get expiration time (in seconds) for feed.
|
77 |
+
*
|
78 |
+
* @param string $feed URI of feed to get transien name for.
|
79 |
+
*
|
80 |
+
* @return int Number of seconds to keep cached feed output.
|
81 |
+
*/
|
82 |
+
public function get_expiration( $feed ) {
|
83 |
+
$expiration = apply_filters(
|
84 |
+
'wp_feed_cache_transient_lifetime',
|
85 |
+
12 * HOUR_IN_SECONDS,
|
86 |
+
$feed
|
87 |
+
);
|
88 |
+
return $expiration;
|
89 |
+
}
|
90 |
+
|
91 |
+
}
|
lib/notification/admin.php
CHANGED
@@ -175,7 +175,10 @@ class Ai1ec_Notification_Admin extends Ai1ec_Notification {
|
|
175 |
if ( null === $theme ) {
|
176 |
$theme = $this->_registry->get( 'theme.loader' );
|
177 |
}
|
178 |
-
$entity['text_label'] =
|
|
|
|
|
|
|
179 |
$file = $theme->get_file(
|
180 |
'notification/admin.twig',
|
181 |
$entity,
|
175 |
if ( null === $theme ) {
|
176 |
$theme = $this->_registry->get( 'theme.loader' );
|
177 |
}
|
178 |
+
$entity['text_label'] = apply_filters(
|
179 |
+
'ai1ec_notification_label',
|
180 |
+
__( 'All-in-One Event Calendar', AI1EC_PLUGIN_NAME )
|
181 |
+
);
|
182 |
$file = $theme->get_file(
|
183 |
'notification/admin.twig',
|
184 |
$entity,
|
lib/routing/router.php
CHANGED
@@ -48,8 +48,16 @@ class Ai1ec_Router extends Ai1ec_Base {
|
|
48 |
$filter_set = false;
|
49 |
$ai1ec_settings = $this->_registry->get( 'model.settings' );
|
50 |
// check if something in the filters is set
|
51 |
-
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
$filter_set = true;
|
54 |
break;
|
55 |
}
|
48 |
$filter_set = false;
|
49 |
$ai1ec_settings = $this->_registry->get( 'model.settings' );
|
50 |
// check if something in the filters is set
|
51 |
+
$types = apply_filters(
|
52 |
+
'ai1ec_filter_types',
|
53 |
+
Ai1ec_Cookie_Utility::$types
|
54 |
+
);
|
55 |
+
foreach ( $types as $type ) {
|
56 |
+
if (
|
57 |
+
! is_array( $type ) &&
|
58 |
+
isset( $view_args[$type] ) &&
|
59 |
+
! empty( $view_args[$type] )
|
60 |
+
) {
|
61 |
$filter_set = true;
|
62 |
break;
|
63 |
}
|
lib/theme/compiler.php
CHANGED
@@ -147,7 +147,10 @@ class Ai1ec_Theme_Compiler extends Ai1ec_Base {
|
|
147 |
if ( ! $this->_prune_dir( $parent ) ) {
|
148 |
return false;
|
149 |
}
|
150 |
-
if (
|
|
|
|
|
|
|
151 |
return true;
|
152 |
}
|
153 |
return false;
|
@@ -198,6 +201,9 @@ class Ai1ec_Theme_Compiler extends Ai1ec_Base {
|
|
198 |
}
|
199 |
}
|
200 |
closedir( $handle );
|
|
|
|
|
|
|
201 |
return rmdir( $cache_dir );
|
202 |
}
|
203 |
|
147 |
if ( ! $this->_prune_dir( $parent ) ) {
|
148 |
return false;
|
149 |
}
|
150 |
+
if (
|
151 |
+
is_dir( $cache_dir ) && chmod( $cache_dir, 0754 )
|
152 |
+
|| mkdir( $cache_dir, 0754, true )
|
153 |
+
) {
|
154 |
return true;
|
155 |
}
|
156 |
return false;
|
201 |
}
|
202 |
}
|
203 |
closedir( $handle );
|
204 |
+
if ( is_file( $cache_dir . DIRECTORY_SEPARATOR . 'EMPTY' ) ) {
|
205 |
+
return true; // ignore, this directory is intentionally here
|
206 |
+
}
|
207 |
return rmdir( $cache_dir );
|
208 |
}
|
209 |
|
lib/theme/file/php.php
CHANGED
@@ -55,6 +55,7 @@ class Ai1ec_File_Php extends Ai1ec_File_Abstract {
|
|
55 |
// Check if file is custom LESS variable definitions.
|
56 |
$user_variables_pattern = Ai1ec_File_Less::THEME_LESS_FOLDER .
|
57 |
'/' . self::USER_VARIABLES_FILE;
|
|
|
58 |
if ( strpos( $this->_name, $user_variables_pattern ) === 0 ) {
|
59 |
// It's a user variables file. We must handle the fact that it might
|
60 |
// be legacy.
|
55 |
// Check if file is custom LESS variable definitions.
|
56 |
$user_variables_pattern = Ai1ec_File_Less::THEME_LESS_FOLDER .
|
57 |
'/' . self::USER_VARIABLES_FILE;
|
58 |
+
|
59 |
if ( strpos( $this->_name, $user_variables_pattern ) === 0 ) {
|
60 |
// It's a user variables file. We must handle the fact that it might
|
61 |
// be legacy.
|
lib/theme/loader.php
CHANGED
@@ -234,10 +234,10 @@ class Ai1ec_Theme_Loader {
|
|
234 |
switch ( $ext ) {
|
235 |
case 'less':
|
236 |
case 'css':
|
237 |
-
$
|
238 |
-
$file
|
239 |
'theme.file.less',
|
240 |
-
$
|
241 |
array_keys( $this->_paths['theme'] ) // Values (URLs) not used for CSS
|
242 |
);
|
243 |
break;
|
@@ -388,10 +388,12 @@ class Ai1ec_Theme_Loader {
|
|
388 |
}
|
389 |
$path = false;
|
390 |
$scan_dirs = array( AI1EC_TWIG_CACHE_PATH );
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
|
|
|
|
395 |
}
|
396 |
foreach ( $scan_dirs as $dir ) {
|
397 |
if ( $this->_is_dir_writable( $dir ) ) {
|
@@ -416,6 +418,9 @@ class Ai1ec_Theme_Loader {
|
|
416 |
* @return void Method doesn't return
|
417 |
*/
|
418 |
public function clean_cache_on_upgrade() {
|
|
|
|
|
|
|
419 |
$model_option = $this->_registry->get( 'model.option' );
|
420 |
if ( $model_option->get( self::OPTION_FORCE_CLEAN, false ) ) {
|
421 |
$model_option->set( self::OPTION_FORCE_CLEAN, false );
|
@@ -528,4 +533,34 @@ class Ai1ec_Theme_Loader {
|
|
528 |
return true;
|
529 |
}
|
530 |
|
531 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
switch ( $ext ) {
|
235 |
case 'less':
|
236 |
case 'css':
|
237 |
+
$filename_base = substr( $filename, 0, $dot_position - 1);
|
238 |
+
$file = $this->_registry->get(
|
239 |
'theme.file.less',
|
240 |
+
$filename_base,
|
241 |
array_keys( $this->_paths['theme'] ) // Values (URLs) not used for CSS
|
242 |
);
|
243 |
break;
|
388 |
}
|
389 |
$path = false;
|
390 |
$scan_dirs = array( AI1EC_TWIG_CACHE_PATH );
|
391 |
+
if ( apply_filters( 'ai1ec_check_static_dir', true ) ) {
|
392 |
+
$filesystem = $this->_registry->get( 'filesystem.checker' );
|
393 |
+
$upload_folder = $filesystem->get_ai1ec_static_dir_if_available();
|
394 |
+
if ( '' !== $upload_folder ) {
|
395 |
+
$scan_dirs[] = $upload_folder;
|
396 |
+
}
|
397 |
}
|
398 |
foreach ( $scan_dirs as $dir ) {
|
399 |
if ( $this->_is_dir_writable( $dir ) ) {
|
418 |
* @return void Method doesn't return
|
419 |
*/
|
420 |
public function clean_cache_on_upgrade() {
|
421 |
+
if ( ! apply_filters( 'ai1ec_clean_cache_on_upgrade', true ) ) {
|
422 |
+
return;
|
423 |
+
}
|
424 |
$model_option = $this->_registry->get( 'model.option' );
|
425 |
if ( $model_option->get( self::OPTION_FORCE_CLEAN, false ) ) {
|
426 |
$model_option->set( self::OPTION_FORCE_CLEAN, false );
|
533 |
return true;
|
534 |
}
|
535 |
|
536 |
+
/**
|
537 |
+
* Switch to the given calendar theme.
|
538 |
+
*
|
539 |
+
* @param array $theme The theme's settings array
|
540 |
+
* @param bool $delete_variables If true, deletes user variables from DB.
|
541 |
+
* Else replaces them with config file.
|
542 |
+
*/
|
543 |
+
public function switch_theme( array $theme, $delete_variables = true ) {
|
544 |
+
$option = $this->_registry->get( 'model.option' );
|
545 |
+
$option->set(
|
546 |
+
'ai1ec_current_theme',
|
547 |
+
$theme
|
548 |
+
);
|
549 |
+
$lessphp = $this->_registry->get( 'less.lessphp' );
|
550 |
+
// If requested, delete theme variables from DB.
|
551 |
+
if ( $delete_variables ) {
|
552 |
+
$option->delete( Ai1ec_Less_Lessphp::DB_KEY_FOR_LESS_VARIABLES );
|
553 |
+
}
|
554 |
+
// Else replace them with those loaded from config file.
|
555 |
+
else {
|
556 |
+
$option->set(
|
557 |
+
Ai1ec_Less_Lessphp::DB_KEY_FOR_LESS_VARIABLES,
|
558 |
+
$lessphp->get_less_variable_data_from_config_file()
|
559 |
+
);
|
560 |
+
}
|
561 |
+
// Recompile CSS for new theme.
|
562 |
+
$css_controller = $this->_registry->get( 'css.frontend' );
|
563 |
+
$css_controller->invalidate_cache( null, false );
|
564 |
+
}
|
565 |
+
|
566 |
+
}
|
lib/theme/search.php
CHANGED
@@ -230,7 +230,7 @@ class Ai1ec_Theme_Search extends Ai1ec_Base {
|
|
230 |
|
231 |
/**
|
232 |
* Move passed themes to backup folder.
|
233 |
-
*
|
234 |
* @param array $themes
|
235 |
*/
|
236 |
public function move_themes_to_backup( array $themes ) {
|
@@ -242,7 +242,7 @@ class Ai1ec_Theme_Search extends Ai1ec_Base {
|
|
242 |
// this also means the access is 'direct'
|
243 |
$backup_dir_exists = false;
|
244 |
|
245 |
-
$errors = array();
|
246 |
if ( true === $writable ) {
|
247 |
if ( ! $wp_filesystem->is_dir( $backup ) ) {
|
248 |
$backup_dir_exists = $wp_filesystem->mkdir( $backup );
|
@@ -250,7 +250,7 @@ class Ai1ec_Theme_Search extends Ai1ec_Base {
|
|
250 |
$backup_dir_exists = true;
|
251 |
}
|
252 |
} else {
|
253 |
-
$message = __(
|
254 |
'Unable to move your old core themes from <code>wp-content/themes-ai1ec</code> to <code>wp-content/themes-ai1ec-obsolete</code> because your <code>wp-content</code> folder is not writable. Please manually remove your old core themes from <code>wp-content/themes-ai1ec</code>.',
|
255 |
AI1EC_PLUGIN_NAME
|
256 |
);
|
@@ -266,7 +266,7 @@ class Ai1ec_Theme_Search extends Ai1ec_Base {
|
|
266 |
AI1EC_PLUGIN_NAME
|
267 |
);
|
268 |
$errors[] = sprintf( $message, $theme_dir, $theme_dir, $theme_dir );
|
269 |
-
}
|
270 |
}
|
271 |
}
|
272 |
}
|
230 |
|
231 |
/**
|
232 |
* Move passed themes to backup folder.
|
233 |
+
*
|
234 |
* @param array $themes
|
235 |
*/
|
236 |
public function move_themes_to_backup( array $themes ) {
|
242 |
// this also means the access is 'direct'
|
243 |
$backup_dir_exists = false;
|
244 |
|
245 |
+
$errors = array();
|
246 |
if ( true === $writable ) {
|
247 |
if ( ! $wp_filesystem->is_dir( $backup ) ) {
|
248 |
$backup_dir_exists = $wp_filesystem->mkdir( $backup );
|
250 |
$backup_dir_exists = true;
|
251 |
}
|
252 |
} else {
|
253 |
+
$message = __(
|
254 |
'Unable to move your old core themes from <code>wp-content/themes-ai1ec</code> to <code>wp-content/themes-ai1ec-obsolete</code> because your <code>wp-content</code> folder is not writable. Please manually remove your old core themes from <code>wp-content/themes-ai1ec</code>.',
|
255 |
AI1EC_PLUGIN_NAME
|
256 |
);
|
266 |
AI1EC_PLUGIN_NAME
|
267 |
);
|
268 |
$errors[] = sprintf( $message, $theme_dir, $theme_dir, $theme_dir );
|
269 |
+
}
|
270 |
}
|
271 |
}
|
272 |
}
|
lib/twig/ai1ec-extension.php
CHANGED
@@ -33,6 +33,7 @@ class Ai1ec_Twig_Ai1ec_Extension extends Twig_Extension {
|
|
33 |
'screen_icon' => new Twig_Function_Method( $this, 'screen_icon' ),
|
34 |
'wp_nonce_field' => new Twig_Function_Method( $this, 'wp_nonce_field' ),
|
35 |
'do_meta_boxes' => new Twig_Function_Method( $this, 'do_meta_boxes' ),
|
|
|
36 |
);
|
37 |
}
|
38 |
|
@@ -100,6 +101,16 @@ class Ai1ec_Twig_Ai1ec_Extension extends Twig_Extension {
|
|
100 |
);
|
101 |
}
|
102 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
/**
|
104 |
* Get URL for avatar.
|
105 |
*
|
33 |
'screen_icon' => new Twig_Function_Method( $this, 'screen_icon' ),
|
34 |
'wp_nonce_field' => new Twig_Function_Method( $this, 'wp_nonce_field' ),
|
35 |
'do_meta_boxes' => new Twig_Function_Method( $this, 'do_meta_boxes' ),
|
36 |
+
'fb' => new Twig_Function_Method( $this, 'fb' ),
|
37 |
);
|
38 |
}
|
39 |
|
101 |
);
|
102 |
}
|
103 |
|
104 |
+
/**
|
105 |
+
* Debug function to be used in twig templates with Firebug/FirePHP
|
106 |
+
*
|
107 |
+
* @param mixed $object
|
108 |
+
*/
|
109 |
+
public function fb( $object ) {
|
110 |
+
if ( function_exists( 'fb' ) ) {
|
111 |
+
fb( $object );
|
112 |
+
}
|
113 |
+
}
|
114 |
/**
|
115 |
* Get URL for avatar.
|
116 |
*
|
public/admin/agenda-widget-form.php
CHANGED
@@ -31,11 +31,11 @@
|
|
31 |
</p>
|
32 |
<div class="ai1ec-limit-by-options-container" <?php if( ! $limit_by_cat['value'] ) { ?> style="display: none;" <?php } ?>>
|
33 |
<!-- Limit by Category Select box -->
|
34 |
-
<select id="<?php echo $
|
35 |
-
<?php foreach( $
|
36 |
-
<option value="<?php echo $event_cat->term_id; ?>"<?php if( in_array( $event_cat->term_id, $
|
37 |
<?php endforeach ?>
|
38 |
-
<?php if( count( $
|
39 |
<option disabled><?php _e( 'No categories found.', AI1EC_PLUGIN_NAME ) ?></option>
|
40 |
<?php endif ?>
|
41 |
</select>
|
@@ -47,11 +47,11 @@
|
|
47 |
</p>
|
48 |
<div class="ai1ec-limit-by-options-container" <?php if( ! $limit_by_tag['value'] ) { ?> style="display: none;" <?php } ?>>
|
49 |
<!-- Limit by Tag Select box -->
|
50 |
-
<select id="<?php echo $
|
51 |
-
<?php foreach( $
|
52 |
-
<option value="<?php echo $event_tag->term_id; ?>"<?php if( in_array( $event_tag->term_id, $
|
53 |
<?php endforeach ?>
|
54 |
-
<?php if( count( $
|
55 |
<option disabled><?php _e( 'No tags found.', AI1EC_PLUGIN_NAME ) ?></option>
|
56 |
<?php endif ?>
|
57 |
</select>
|
31 |
</p>
|
32 |
<div class="ai1ec-limit-by-options-container" <?php if( ! $limit_by_cat['value'] ) { ?> style="display: none;" <?php } ?>>
|
33 |
<!-- Limit by Category Select box -->
|
34 |
+
<select id="<?php echo $cat_ids['id'] ?>" class="ai1ec-widget-cat-ids" name="<?php echo $cat_ids['name'] ?>[]" size="5" multiple="multiple">
|
35 |
+
<?php foreach( $cat_ids['options'] as $event_cat ): ?>
|
36 |
+
<option value="<?php echo $event_cat->term_id; ?>"<?php if( in_array( $event_cat->term_id, $cat_ids['value'] ) ) { ?> selected="selected"<?php } ?>><?php echo $event_cat->name; ?></option>
|
37 |
<?php endforeach ?>
|
38 |
+
<?php if( count( $cat_ids['options'] ) == 0 ) : ?>
|
39 |
<option disabled><?php _e( 'No categories found.', AI1EC_PLUGIN_NAME ) ?></option>
|
40 |
<?php endif ?>
|
41 |
</select>
|
47 |
</p>
|
48 |
<div class="ai1ec-limit-by-options-container" <?php if( ! $limit_by_tag['value'] ) { ?> style="display: none;" <?php } ?>>
|
49 |
<!-- Limit by Tag Select box -->
|
50 |
+
<select id="<?php echo $tag_ids['id'] ?>" class="ai1ec-widget-tag-ids" name="<?php echo $tag_ids['name'] ?>[]" size="5" multiple="multiple">
|
51 |
+
<?php foreach( $tag_ids['options'] as $event_tag ): ?>
|
52 |
+
<option value="<?php echo $event_tag->term_id; ?>"<?php if( in_array( $event_tag->term_id, $tag_ids['value'] ) ) { ?> selected="selected"<?php } ?>><?php echo $event_tag->name; ?></option>
|
53 |
<?php endforeach ?>
|
54 |
+
<?php if( count( $tag_ids['options'] ) == 0 ) : ?>
|
55 |
<option disabled><?php _e( 'No tags found.', AI1EC_PLUGIN_NAME ) ?></option>
|
56 |
<?php endif ?>
|
57 |
</select>
|
public/admin/css/add_new_event.css
CHANGED
@@ -389,3 +389,10 @@
|
|
389 |
width: 172px;
|
390 |
margin: 0;
|
391 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
389 |
width: 172px;
|
390 |
margin: 0;
|
391 |
}
|
392 |
+
|
393 |
+
#ai1ec_event_banner > .inside > p {
|
394 |
+
margin-bottom: 0 !important;
|
395 |
+
}
|
396 |
+
.ai1ec-banner-image-frame .edit-attachment {
|
397 |
+
display: none !important;
|
398 |
+
}
|
public/admin/css/addons.css
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.ai1ec-addon {
|
2 |
+
max-width:246px;
|
3 |
+
padding: 6px;
|
4 |
+
margin-right: 8px;
|
5 |
+
margin-bottom: 8px;
|
6 |
+
border: 1px solid #CCC;
|
7 |
+
display: inline-block;
|
8 |
+
}
|
9 |
+
.ai1ec-addon-title {
|
10 |
+
font-size: 12px;
|
11 |
+
font-weight: bold;
|
12 |
+
color: #000;
|
13 |
+
margin-bottom: 3px;
|
14 |
+
}
|
15 |
+
.ai1ec-addon-excerpt {
|
16 |
+
font-size: 11px;
|
17 |
+
height: 32px;
|
18 |
+
overflow: hidden;
|
19 |
+
line-height: 1.5;
|
20 |
+
}
|
21 |
+
.ai1ec-addon-button {
|
22 |
+
display: inline-block;
|
23 |
+
padding: 3px 6px;
|
24 |
+
margin-top: 6px;
|
25 |
+
border: 1px solid #CCC;
|
26 |
+
border-radius: 3px;
|
27 |
+
background: #F5F5F5;
|
28 |
+
font-size: 11px;
|
29 |
+
text-decoration: none;
|
30 |
+
}
|
public/admin/css/super-widget.css
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#ai1ec-superwidget-preview iframe {
|
2 |
+
width: 100%;
|
3 |
+
height: 350px;
|
4 |
+
}
|
5 |
+
#ai1ec-superwidget-code {
|
6 |
+
height: 140px;
|
7 |
+
white-space: normal;
|
8 |
+
}
|
9 |
+
#ai1ec-super_widget .ai1ec-nav {
|
10 |
+
margin-bottom: 8px;
|
11 |
+
}
|
public/admin/twig/add-ons-list/page.twig
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="wrap" id="ai1ec-add-ons">
|
2 |
+
<h2>
|
3 |
+
{{ labels.title }}
|
4 |
+
— <a href="https://time.ly/downloads/" class="button-primary" title="{{ labels.button_title | e("html_attr") }}" target="_blank">{{ labels.button_title }}</a>
|
5 |
+
</h2>
|
6 |
+
<p>{{ labels.paragraph_content }}</p>
|
7 |
+
{% if is_error %}
|
8 |
+
<div class="error"><p>{{ labels.error }}</p></div>
|
9 |
+
{% else %}
|
10 |
+
{{ content | raw }}
|
11 |
+
{% endif %}
|
12 |
+
</div>
|
public/admin/twig/banner-image.twig
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<p class="ai1ec-banner-image-block hide-if-no-js {{ src ? '' : 'ai1ec-hidden' }}">
|
2 |
+
<a href="#">
|
3 |
+
<img width="100%" class="ai1ec-set-banner-image"
|
4 |
+
src="{{ src | e( 'html_attr' ) }}">
|
5 |
+
</a>
|
6 |
+
<input type="hidden" name="ai1ec_banner_image"
|
7 |
+
value="{{ src | e( 'html_attr' ) }}">
|
8 |
+
</p>
|
9 |
+
<p class="ai1ec-set-banner-block hide-if-no-js {{ src ? 'ai1ec-hidden' : '' }}">
|
10 |
+
<a href="#" class="ai1ec-set-banner-image">{{ set_text }}</a>
|
11 |
+
</p>
|
12 |
+
<p class="ai1ec-remove-banner-block hide-if-no-js {{ src ? '' : 'ai1ec-hidden' }}">
|
13 |
+
<a class="ai1ec-remove-banner" href="#">{{ remove_text }}</a>
|
14 |
+
</p>
|
15 |
+
<div class="media-toolbar ai1ec-hidden ai1ec-media-toolbar">
|
16 |
+
<div class="media-toolbar-primary search-form">
|
17 |
+
<a href="#" class="button media-button button-primary button-large
|
18 |
+
ai1ec-save-banner-image">
|
19 |
+
{{ set_text }}
|
20 |
+
</a>
|
21 |
+
</div>
|
22 |
+
</div>
|
public/admin/twig/widget-creator/page.twig
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="wrap">
|
2 |
+
{{ screen_icon() }}
|
3 |
+
<h2>{{ title }}</h2>
|
4 |
+
<div id="poststuff">
|
5 |
+
<div class="metabox-holder">
|
6 |
+
<div class="post-box-container left-side timely">
|
7 |
+
<div class="ai1ec-tab-content-container ai1ec-form-horizontal">
|
8 |
+
{{ do_meta_boxes( metabox.screen, metabox.action, metabox.object ) }}
|
9 |
+
</div>
|
10 |
+
</div>
|
11 |
+
</div>
|
12 |
+
</div>{# /#poststuff #}
|
13 |
+
</div>{# /.wrap #}
|
public/admin/twig/widget-creator/super-widget-contents.twig
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div id="ai1ec-super_widget" class="ai1ec-collapse ai1ec-in">
|
2 |
+
<p>{{ common_info | raw }}</p>
|
3 |
+
<div class="ai1ec-col-12">
|
4 |
+
<ul class="ai1ec-nav ai1ec-nav-pills" role="tablist">
|
5 |
+
{% for id, data in tabs %}
|
6 |
+
<li >
|
7 |
+
<a href="#{{ id | e('html_attr') }}" data-toggle="ai1ec-tab" >
|
8 |
+
<i class="ai1ec-fa ai1ec-fa-calendar ai1ec-fa-lg ai1ec-fa-fw"></i>
|
9 |
+
{{ data.name | raw }}
|
10 |
+
</a>
|
11 |
+
</li>
|
12 |
+
{% endfor %}
|
13 |
+
</ul>
|
14 |
+
</div>
|
15 |
+
<div class="ai1ec-col-md-6">
|
16 |
+
<div class="ai1ec-tab-content">
|
17 |
+
{% for id, data in tabs %}
|
18 |
+
<div class="ai1ec-tab-pane" id="{{ id }}">
|
19 |
+
{% if data.requirements is not empty %}
|
20 |
+
<div class="ai1ec-alert ai1ec-alert-info">
|
21 |
+
<i class="ai1ec-fa ai1ec-fa-info-circle ai1ec-fa-fw"></i>
|
22 |
+
{{ data.requirements | raw }}
|
23 |
+
</div>
|
24 |
+
{% endif %}
|
25 |
+
{% for element in data.elements %}
|
26 |
+
{{ element | raw }}
|
27 |
+
{% endfor %}
|
28 |
+
</div>
|
29 |
+
{% endfor %}
|
30 |
+
</div>
|
31 |
+
</div>
|
32 |
+
<div class="ai1ec-col-md-6">
|
33 |
+
<p><strong>{{ paste_text | raw }}</strong></p>
|
34 |
+
<pre id="ai1ec-superwidget-code" class="ai1ec-autoselect"
|
35 |
+
data-url="{{ siteurl | e('html_attr') }}?ai1ec_super_widget" data-widget-url="{{ siteurl | e('html_attr') }}?ai1ec_js_widget"></pre>
|
36 |
+
<div class="ai1ec-alert ai1ec-alert-info">
|
37 |
+
<i class="ai1ec-fa ai1ec-fa-info-circle ai1ec-fa-fw"></i>
|
38 |
+
{{ updated_code_text
|
39 |
+
| format( 'http://time.ly/document/manage-add-ons/embed-calendar-sites-super-widget/' )
|
40 |
+
| raw }}
|
41 |
+
</div>
|
42 |
+
</div>
|
43 |
+
<h2 id="widget-preview-title">{{ preview }}</h2>
|
44 |
+
<div id="ai1ec-superwidget-preview" class="ai1ec-well ai1ec-hidden"></div>
|
45 |
+
</div>
|
public/js/agenda.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
timely.define(["external_libs/twig","agenda"],function(e){var t,n;return t=e.twig,n=t({id:"../js_src/agenda.twig",data:[{type:"output",stack:[{type:"Twig.expression.type.variable",value:"navigation",match:["navigation"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n\n<div class="ai1ec-agenda-view">\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"dates",match:["dates"]},{type:"Twig.expression.type.test",filter:"empty"}],output:[{type:"raw",value:' <p class="ai1ec-no-results">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_upcoming_events",match:["text_upcoming_events"]}]},{type:"raw",value:"\n </p>\n "}]}},{type:"logic",token:{type:"Twig.logic.type.else",match:["else"],output:[{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:"date",value_var:"date_info",expression:[{type:"Twig.expression.type.variable",value:"dates",match:["dates"]}],output:[{type:"raw",value:' <div class="ai1ec-date\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"today"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:"ai1ec-today"}]}},{type:"raw",value:'">\n <a class="ai1ec-date-title ai1ec-load-view"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"href"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"data_type",match:["data_type"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'>\n <div class="ai1ec-month">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"month"}]},{type:"raw",value:'</div>\n <div class="ai1ec-day">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"day"}]},{type:"raw",value:'</div>\n <div class="ai1ec-weekday">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"weekday"}]},{type:"raw",value:"</div>\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_year_in_agenda_dates",match:["show_year_in_agenda_dates"]}],output:[{type:"raw",value:' <div class="ai1ec-year">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"year"}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:' </a>\n <div class="ai1ec-date-events">\n '},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"category",expression:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"events"}],output:[{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"event",expression:[{type:"Twig.expression.type.variable",value:"category",match:["category"]}],output:[{type:"raw",value:' <div class="ai1ec-event\n ai1ec-event-id-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_id"}]},{type:"raw",value:"\n ai1ec-event-instance-id-"},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_id"}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"is_allday"}],output:[{type:"raw",value:"ai1ec-allday"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"expanded",match:["expanded"]}],output:[{type:"raw",value:"ai1ec-expanded"}]}},{type:"raw",value:'">\n\n <div class="ai1ec-event-header">\n <div class="ai1ec-event-toggle">\n <i class="ai1ec-fa ai1ec-fa-minus-circle ai1ec-fa-lg"></i>\n <i class="ai1ec-fa ai1ec-fa-plus-circle ai1ec-fa-lg"></i>\n </div>\n <span class="ai1ec-event-title">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_title"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_location_in_title",match:["show_location_in_title"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <span class="ai1ec-event-location"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_venue_separator",match:["text_venue_separator"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:"</span>\n "}]}},{type:"raw",value:" </span>\n\n "},{type:"logic",token:{type:"Twig.logic.type.set",key:"edit_post_link",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"edit_post_link"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"edit_post_link",match:["edit_post_link"]},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:' <a class="post-edit-link" href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"edit_post_link",match:["edit_post_link"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'">\n <i class="ai1ec-fa ai1ec-fa-pencil"></i> '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_edit",match:["text_edit"]}]},{type:"raw",value:"\n </a>\n "}]}},{type:"raw",value:'\n <div class="ai1ec-event-time">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"timespan_short"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </div>\n </div>\n\n "},{type:"raw",value:'\n <div class="ai1ec-event-summary '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"expanded",match:["expanded"]}],output:[{type:"raw",value:"ai1ec-expanded"}]}},{type:"raw",value:'">\n\n <div class="ai1ec-event-description">\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"content_img_url"},{type:"Twig.expression.type.test",filter:"empty"}],output:[{type:"raw",value:" "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"avatar"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n "}]}},{type:"raw",value:" "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_content"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n </div>\n\n <div class="ai1ec-event-summary-footer">\n <div class="ai1ec-btn-group ai1ec-actions">\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"is_ticket_button_enabled",match:["is_ticket_button_enabled"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <a class="ai1ec-pull-right ai1ec-btn ai1ec-btn-primary\n ai1ec-btn-xs ai1ec-buy-tickets"\n target="_blank"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url_label"}]},{type:"raw",value:"</a>\n "}]}},{type:"raw",value:" <a "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"data_type_events",match:["data_type_events"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n class="ai1ec-read-more ai1ec-btn ai1ec-btn-default\n ai1ec-load-event"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_read_more",match:["text_read_more"]}]},{type:"raw",value:' <i class="ai1ec-fa ai1ec-fa-arrow-right"></i>\n </a>\n </div>\n '},{type:"logic",token:{type:"Twig.logic.type.set",key:"categories",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"categories_html"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.set",key:"tags",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"tags_html"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"categories",match:["categories"]},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:' <span class="ai1ec-categories">\n <span class="ai1ec-field-label">\n <i class="ai1ec-fa ai1ec-fa-folder-open"></i>\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_categories",match:["text_categories"]}]},{type:"raw",value:"\n </span>\n "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"categories",match:["categories"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </span>\n "}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"tags",match:["tags"]},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:' <span class="ai1ec-tags">\n <span class="ai1ec-field-label">\n <i class="ai1ec-fa ai1ec-fa-tags"></i>\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_tags",match:["text_tags"]}]},{type:"raw",value:"\n </span>\n "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"tags",match:["tags"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </span>\n "}]}},{type:"raw",value:" </div>\n </div>\n\n </div>\n "}]}},{type:"raw",value:" "},{type:"raw",value:"\n "}]}},{type:"raw",value:" "},{type:"raw",value:"\n </div>\n </div>\n "}]}},{type:"raw",value:" "},{type:"raw",value:"\n "}]}},{type:"raw",value:" "},{type:"raw",value:'\n</div>\n\n<div class="ai1ec-pull-left">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"pagination_links",match:["pagination_links"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n"}],precompiled:!0}),n});
|
public/js/build.txt
CHANGED
@@ -18,6 +18,10 @@ external_libs/bootstrap/dropdown.js
|
|
18 |
scripts/common_scripts/frontend/common_frontend.js
|
19 |
external_libs/select2.js
|
20 |
libs/select2_multiselect_helper.js
|
|
|
|
|
|
|
|
|
21 |
external_libs/jquery_history.js
|
22 |
external_libs/jquery.tablescroller.js
|
23 |
external_libs/jquery.scrollTo.js
|
@@ -216,6 +220,10 @@ external_libs/bootstrap/dropdown.js
|
|
216 |
scripts/common_scripts/frontend/common_frontend.js
|
217 |
external_libs/select2.js
|
218 |
libs/select2_multiselect_helper.js
|
|
|
|
|
|
|
|
|
219 |
external_libs/jquery_history.js
|
220 |
external_libs/jquery.tablescroller.js
|
221 |
external_libs/jquery.scrollTo.js
|
@@ -281,3 +289,15 @@ scripts/common_scripts/page_ready.js
|
|
281 |
----------------
|
282 |
domReady.js
|
283 |
scripts/common_scripts/page_ready.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
scripts/common_scripts/frontend/common_frontend.js
|
19 |
external_libs/select2.js
|
20 |
libs/select2_multiselect_helper.js
|
21 |
+
external_libs/twig.js
|
22 |
+
agenda.js
|
23 |
+
oneday.js
|
24 |
+
month.js
|
25 |
external_libs/jquery_history.js
|
26 |
external_libs/jquery.tablescroller.js
|
27 |
external_libs/jquery.scrollTo.js
|
220 |
scripts/common_scripts/frontend/common_frontend.js
|
221 |
external_libs/select2.js
|
222 |
libs/select2_multiselect_helper.js
|
223 |
+
external_libs/twig.js
|
224 |
+
agenda.js
|
225 |
+
oneday.js
|
226 |
+
month.js
|
227 |
external_libs/jquery_history.js
|
228 |
external_libs/jquery.tablescroller.js
|
229 |
external_libs/jquery.scrollTo.js
|
289 |
----------------
|
290 |
domReady.js
|
291 |
scripts/common_scripts/page_ready.js
|
292 |
+
|
293 |
+
scripts/widget-creator.js
|
294 |
+
----------------
|
295 |
+
domReady.js
|
296 |
+
external_libs/bootstrap/tab.js
|
297 |
+
libs/utils.js
|
298 |
+
external_libs/jquery_cookie.js
|
299 |
+
scripts/widget-creator.js
|
300 |
+
|
301 |
+
external_libs/twig.js
|
302 |
+
----------------
|
303 |
+
external_libs/twig.js
|
public/js/external_libs/twig.js
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Twig.js 0.7.2
|
3 |
+
*
|
4 |
+
* @copyright 2011-2013 John Roepke
|
5 |
+
* @license Available under the BSD 2-Clause License
|
6 |
+
* @link https://github.com/justjohn/twig.js
|
7 |
+
*/
|
8 |
+
|
9 |
+
// Copyright (c) 2011-2013 John Roepke
|
10 |
+
|
11 |
+
// [MIT License](http://www.opensource.org/licenses/mit-license.php) or are
|
12 |
+
|
13 |
+
// [Public Domain](https://developer.mozilla.org/Project:Copyrights).
|
14 |
+
|
15 |
+
// Copies of the licenses for the code included here can be found in the
|
16 |
+
|
17 |
+
/**
|
18 |
+
* jPaq - A fully customizable JavaScript/JScript library
|
19 |
+
* http://jpaq.org/
|
20 |
+
*
|
21 |
+
* Copyright (c) 2011 Christopher West
|
22 |
+
* Licensed under the MIT license.
|
23 |
+
* http://jpaq.org/license/
|
24 |
+
*
|
25 |
+
* Version: 1.0.6.0000W
|
26 |
+
* Revised: April 6, 2011
|
27 |
+
*/
|
28 |
+
|
29 |
+
var Twig=function(e){return e.VERSION="0.7.2",e}(Twig||{}),Twig=function(e){function t(e,t){var n=Object.prototype.toString.call(t).slice(8,-1);return t!==undefined&&t!==null&&n===e}function n(t,n){var r,i,s="/",o=[],u;if(t.url)typeof t.base!="undefined"?r=t.base+(t.base.charAt(t.base.length-1)==="/"?"":"/"):r=t.url;else{if(!t.path)throw new e.Error("Cannot extend an inline template.");var a=require("path"),f=a.sep||s,l=new RegExp("^\\.{1,2}"+f.replace("\\","\\\\"));n=n.replace(/\//g,f),t.base!==undefined&&n.match(l)==null?(n=n.replace(t.base,""),r=t.base+f):r=t.path,r=r.replace(f+f,f),s=f}i=r.split(s),i.pop(),i=i.concat(n.split(s));while(i.length>0)u=i.shift(),u!="."&&(u==".."&&o.length>0&&o[o.length-1]!=".."?o.pop():o.push(u));return o.join(s)}return e.trace=!1,e.debug=!1,e.cache=!0,e.placeholders={parent:"{{|PARENT|}}"},e.indexOf=function(e,t){if(Array.prototype.hasOwnProperty("indexOf"))return e.indexOf(t);if(e===void 0||e===null)throw new TypeError;var n=Object(e),r=n.length>>>0;if(r===0)return-1;var i=0;arguments.length>0&&(i=Number(arguments[1]),i!==i?i=0:i!==0&&i!==Infinity&&i!==-Infinity&&(i=(i>0||-1)*Math.floor(Math.abs(i))));if(i>=r)return-1;var s=i>=0?i:Math.max(r-Math.abs(i),0);for(;s<r;s++)if(s in n&&n[s]===t)return s;return e==t?0:-1},e.forEach=function(e,t,n){if(Array.prototype.forEach)return e.forEach(t,n);var r,i;if(e==null)throw new TypeError(" this is null or not defined");var s=Object(e),o=s.length>>>0;if({}.toString.call(t)!="[object Function]")throw new TypeError(t+" is not a function");n&&(r=n),i=0;while(i<o){var u;i in s&&(u=s[i],t.call(r,u,i,s)),i++}},e.Error=function(e){this.message=e,this.name="TwigException",this.type="TwigException"},e.Error.prototype.toString=function(){var e=this.name+": "+this.message;return e},e.log={trace:function(){e.trace&&console&&console.log(Array.prototype.slice.call(arguments))},debug:function(){e.debug&&console&&console.log(Array.prototype.slice.call(arguments))}},typeof console!="undefined"&&typeof console.log!="undefined"?e.log.error=function(){console.log.apply(console,arguments)}:e.log.error=function(){},e.token={},e.token.type={output:"output",logic:"logic",comment:"comment",raw:"raw"},e.token.definitions=[{type:e.token.type.raw,open:"{% raw %}",close:"{% endraw %}"},{type:e.token.type.output,open:"{{",close:"}}"},{type:e.token.type.logic,open:"{%",close:"%}"},{type:e.token.type.comment,open:"{#",close:"#}"}],e.token.strings=['"',"'"],e.token.findStart=function(t){var n={position:null,def:null},r,i,s;for(r=0;r<e.token.definitions.length;r++)i=e.token.definitions[r],s=t.indexOf(i.open),e.log.trace("Twig.token.findStart: ","Searching for ",i.open," found at ",s),s>=0&&(n.position===null||s<n.position)&&(n.position=s,n.def=i);return n},e.token.findEnd=function(t,n,r){var i=null,s=!1,o=0,u=null,a=null,f=null,l=null,c=null,h=null,p,d;while(!s){u=null,a=null,f=t.indexOf(n.close,o);if(!(f>=0))throw new e.Error("Unable to find closing bracket '"+n.close+"'"+" opened near template position "+r);i=f,s=!0;if(n.type===e.token.type.comment)break;d=e.token.strings.length;for(p=0;p<d;p+=1)c=t.indexOf(e.token.strings[p],o),c>0&&c<f&&(u===null||c<u)&&(u=c,a=e.token.strings[p]);if(u!==null){l=u+1,i=null,s=!1;for(;;){h=t.indexOf(a,l);if(h<0)throw"Unclosed string in template";if(t.substr(h-1,1)!=="\\"){o=h+1;break}l=h+1}}}return i},e.tokenize=function(t){var n=[],r=0,i=null,s=null;while(t.length>0)i=e.token.findStart(t),e.log.trace("Twig.tokenize: ","Found token: ",i),i.position!==null?(i.position>0&&n.push({type:e.token.type.raw,value:t.substring(0,i.position)}),t=t.substr(i.position+i.def.open.length),r+=i.position+i.def.open.length,s=e.token.findEnd(t,i.def,r),e.log.trace("Twig.tokenize: ","Token ends at ",s),n.push({type:i.def.type,value:t.substring(0,s).trim()}),i.def.type==="logic"&&t.substr(s+i.def.close.length,1)==="\n"&&(s+=1),t=t.substr(s+i.def.close.length),r+=s+i.def.close.length):(n.push({type:e.token.type.raw,value:t}),t="");return n},e.compile=function(t){try{var n=[],r=[],i=[],s=null,o=null,u=null,a=null,f=null,l=null,c=null,h=null,p=null;while(t.length>0){s=t.shift(),e.log.trace("Compiling token ",s);switch(s.type){case e.token.type.raw:r.length>0?i.push(s):n.push(s);break;case e.token.type.logic:o=e.logic.compile.apply(this,[s]),c=o.type,h=e.logic.handler[c].open,p=e.logic.handler[c].next,e.log.trace("Twig.compile: ","Compiled logic token to ",o," next is: ",p," open is : ",h);if(h!==undefined&&!h){a=r.pop(),f=e.logic.handler[a.type];if(e.indexOf(f.next,c)<0)throw new Error(c+" not expected after a "+a.type);a.output=a.output||[],a.output=a.output.concat(i),i=[],l={type:e.token.type.logic,token:a},r.length>0?i.push(l):n.push(l)}p!==undefined&&p.length>0?(e.log.trace("Twig.compile: ","Pushing ",o," to logic stack."),r.length>0&&(a=r.pop(),a.output=a.output||[],a.output=a.output.concat(i),r.push(a),i=[]),r.push(o)):h!==undefined&&h&&(l={type:e.token.type.logic,token:o},r.length>0?i.push(l):n.push(l));break;case e.token.type.comment:break;case e.token.type.output:e.expression.compile.apply(this,[s]),r.length>0?i.push(s):n.push(s)}e.log.trace("Twig.compile: "," Output: ",n," Logic Stack: ",r," Pending Output: ",i)}if(r.length>0)throw u=r.pop(),new Error("Unable to find an end tag for "+u.type+", expecting one of "+u.next);return n}catch(d){e.log.error("Error compiling twig template "+this.id+": "),d.stack?e.log.error(d.stack):e.log.error(d.toString());if(this.options.rethrow)throw d}},e.parse=function(t,n){try{var r=[],i=!0,s=this;return n=n||{},e.forEach(t,function(o){e.log.debug("Twig.parse: ","Parsing token: ",o);switch(o.type){case e.token.type.raw:r.push(o.value);break;case e.token.type.logic:var u=o.token,a=e.logic.parse.apply(s,[u,n,i]);a.chain!==undefined&&(i=a.chain),a.context!==undefined&&(n=a.context),a.output!==undefined&&r.push(a.output);break;case e.token.type.comment:break;case e.token.type.output:e.log.debug("Twig.parse: ","Output token: ",o.stack),r.push(e.expression.parse.apply(s,[o.stack,n]))}}),r.join("")}catch(o){e.log.error("Error parsing twig template "+this.id+": "),o.stack?e.log.error(o.stack):e.log.error(o.toString());if(this.options.rethrow)throw o;if(e.debug)return o.toString()}},e.prepare=function(t){var n,r;return e.log.debug("Twig.prepare: ","Tokenizing ",t),r=e.tokenize.apply(this,[t]),e.log.debug("Twig.prepare: ","Compiling ",r),n=e.compile.apply(this,[r]),e.log.debug("Twig.prepare: ","Compiled ",n),n},e.Templates={registry:{}},e.validateId=function(t){if(t==="prototype")throw new e.Error(t+" is not a valid twig identifier");if(e.Templates.registry.hasOwnProperty(t))throw new e.Error("There is already a template with the ID "+t);return!0},e.Templates.save=function(t){if(t.id===undefined)throw new e.Error("Unable to save template with no id");e.Templates.registry[t.id]=t},e.Templates.load=function(t){return e.Templates.registry.hasOwnProperty(t)?e.Templates.registry[t]:null},e.Templates.loadRemote=function(t,n,r,i){var s=n.id,o=n.method,u=n.async,a=n.precompiled,f=null;u===undefined&&(u=!0),s===undefined&&(s=t),n.id=s;if(e.cache&&e.Templates.registry.hasOwnProperty(s))return r&&r(e.Templates.registry[s]),e.Templates.registry[s];if(o=="ajax"){if(typeof XMLHttpRequest=="undefined")throw new e.Error("Unsupported platform: Unable to do remote requests because there is no XMLHTTPRequest implementation");var l=new XMLHttpRequest;l.onreadystatechange=function(){var s=null;l.readyState==4&&(l.status==200?(e.log.debug("Got template ",l.responseText),a===!0?s=JSON.parse(l.responseText):s=l.responseText,n.url=t,n.data=s,f=new e.Template(n),r&&r(f)):i&&i(l))},l.open("GET",t,u),l.send()}else(function(){var s=require("fs"),o=require("path"),l=null,c=function(s,o){if(s){i&&i(s);return}a===!0&&(o=JSON.parse(o)),n.data=o,n.path=t,f=new e.Template(n),r&&r(f)};if(u===!0)s.stat(t,function(n,r){if(n||!r.isFile())throw new e.Error("Unable to find template file "+t);s.readFile(t,"utf8",c)});else{if(!s.statSync(t).isFile())throw new e.Error("Unable to find template file "+t);l=s.readFileSync(t,"utf8"),c(undefined,l)}})();return u===!1?f:!0},e.Template=function(n){var r=n.data,i=n.id,s=n.blocks,o=n.macros||{},u=n.base,a=n.path,f=n.url,l=n.options;this.id=i,this.base=u,this.path=a,this.url=f,this.macros=o,this.options=l,this.reset(s),t("String",r)?this.tokens=e.prepare.apply(this,[r]):this.tokens=r,i!==undefined&&e.Templates.save(this)},e.Template.prototype.reset=function(t){e.log.debug("Twig.Template.reset","Reseting template "+this.id),this.blocks={},this.child={blocks:t||{}},this.extend=null},e.Template.prototype.render=function(t,r){r=r||{};var i,s;this.context=t||{},this.reset(),r.blocks&&(this.blocks=r.blocks),r.macros&&(this.macros=r.macros),i=e.parse.apply(this,[this.tokens,this.context]);if(this.extend){var o;return this.options.allowInlineIncludes&&(o=e.Templates.load(this.extend),o&&(o.options=this.options)),o||(s=n(this,this.extend),o=e.Templates.loadRemote(s,{method:this.url?"ajax":"fs",base:this.base,async:!1,id:s,options:this.options})),this.parent=o,this.parent.render(this.context,{blocks:this.blocks})}return r.output=="blocks"?this.blocks:r.output=="macros"?this.macros:i},e.Template.prototype.importFile=function(t){var r,i;if(!this.url&&!this.path&&this.options.allowInlineIncludes){i=e.Templates.load(t),i.options=this.options;if(i)return i;throw new e.Error("Didn't find the inline template by id")}return r=n(this,t),i=e.Templates.loadRemote(r,{method:this.url?"ajax":"fs",base:this.base,async:!1,options:this.options,id:r}),i},e.Template.prototype.importBlocks=function(t,n){var r=this.importFile(t),i=this.context,s=this,o;n=n||!1,r.render(i),e.forEach(Object.keys(r.blocks),function(e){if(n||s.blocks[e]===undefined)s.blocks[e]=r.blocks[e]})},e.Template.prototype.importMacros=function(t){var r=n(this,t),i=e.Templates.loadRemote(r,{method:this.url?"ajax":"fs",async:!1,id:r});return i},e.Template.prototype.compile=function(t){return e.compiler.compile(this,t)},e}(Twig||{});(function(){String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),Object.keys||(Object.keys=function(e){if(e!==Object(e))throw new TypeError("Object.keys called on non-object");var t=[],n;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t})})();var Twig=function(e){e.lib={};var t=function(){function e(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function n(e,t){for(var n=[];t>0;n[--t]=e);return n.join("")}var r=function(){return r.cache.hasOwnProperty(arguments[0])||(r.cache[arguments[0]]=r.parse(arguments[0])),r.format.call(null,r.cache[arguments[0]],arguments)};return r.format=function(r,i){var s=1,o=r.length,u="",a,f=[],l,c,h,p,d,v;for(l=0;l<o;l++){u=e(r[l]);if(u==="string")f.push(r[l]);else if(u==="array"){h=r[l];if(h[2]){a=i[s];for(c=0;c<h[2].length;c++){if(!a.hasOwnProperty(h[2][c]))throw t('[sprintf] property "%s" does not exist',h[2][c]);a=a[h[2][c]]}}else h[1]?a=i[h[1]]:a=i[s++];if(/[^s]/.test(h[8])&&e(a)!="number")throw t("[sprintf] expecting number but found %s",e(a));switch(h[8]){case"b":a=a.toString(2);break;case"c":a=String.fromCharCode(a);break;case"d":a=parseInt(a,10);break;case"e":a=h[7]?a.toExponential(h[7]):a.toExponential();break;case"f":a=h[7]?parseFloat(a).toFixed(h[7]):parseFloat(a);break;case"o":a=a.toString(8);break;case"s":a=(a=String(a))&&h[7]?a.substring(0,h[7]):a;break;case"u":a=Math.abs(a);break;case"x":a=a.toString(16);break;case"X":a=a.toString(16).toUpperCase()}a=/[def]/.test(h[8])&&h[3]&&a>=0?"+"+a:a,d=h[4]?h[4]=="0"?"0":h[4].charAt(1):" ",v=h[6]-String(a).length,p=h[6]?n(d,v):"",f.push(h[5]?a+p:p+a)}}return f.join("")},r.cache={},r.parse=function(e){var t=e,n=[],r=[],i=0;while(t){if((n=/^[^\x25]+/.exec(t))!==null)r.push(n[0]);else if((n=/^\x25{2}/.exec(t))!==null)r.push("%");else{if((n=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(t))===null)throw"[sprintf] huh?";if(n[2]){i|=1;var s=[],o=n[2],u=[];if((u=/^([a-z_][a-z_\d]*)/i.exec(o))===null)throw"[sprintf] huh?";s.push(u[1]);while((o=o.substring(u[0].length))!=="")if((u=/^\.([a-z_][a-z_\d]*)/i.exec(o))!==null)s.push(u[1]);else{if((u=/^\[(\d+)\]/.exec(o))===null)throw"[sprintf] huh?";s.push(u[1])}n[2]=s}else i|=2;if(i===3)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";r.push(n)}t=t.substring(n[0].length)}return r},r}(),n=function(e,n){return n.unshift(e),t.apply(null,n)};return e.lib.sprintf=t,e.lib.vsprintf=n,function(){function s(e){return(e=Math.abs(e)%100)%10==1&&e!=11?"st":e%10==2&&e!=12?"nd":e%10==3&&e!=13?"rd":"th"}function o(e){var t=new Date(e.getFullYear()+1,0,4);return(t-e)/864e5<7&&(e.getDay()+6)%7<(t.getDay()+6)%7?t.getFullYear():e.getMonth()>0||e.getDate()>=4?e.getFullYear():e.getFullYear()-((e.getDay()+6)%7-e.getDate()>2?1:0)}function u(e){var t=new Date(o(e),0,4);return t.setDate(t.getDate()-(t.getDay()+6)%7),parseInt((e-t)/6048e5)+1}var t="Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),n="Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),r="Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),i="January,February,March,April,May,June,July,August,September,October,November,December".split(",");e.lib.formatDate=function(e,a){if(typeof a!="string"||/^\s*$/.test(a))return e+"";var f=new Date(e.getFullYear(),0,1),l=e;return a.replace(/[dDjlNSwzWFmMntLoYyaABgGhHisuU]/g,function(e){switch(e){case"d":return("0"+l.getDate()).replace(/^.+(..)$/,"$1");case"D":return t[l.getDay()];case"j":return l.getDate();case"l":return n[l.getDay()];case"N":return(l.getDay()+6)%7+1;case"S":return s(l.getDate());case"w":return l.getDay();case"z":return Math.ceil((f-l)/864e5);case"W":return("0"+u(l)).replace(/^.(..)$/,"$1");case"F":return i[l.getMonth()];case"m":return("0"+(l.getMonth()+1)).replace(/^.+(..)$/,"$1");case"M":return r[l.getMonth()];case"n":return l.getMonth()+1;case"t":return(new Date(l.getFullYear(),l.getMonth()+1,-1)).getDate();case"L":return(new Date(l.getFullYear(),1,29)).getDate()==29?1:0;case"o":return o(l);case"Y":return l.getFullYear();case"y":return(l.getFullYear()+"").replace(/^.+(..)$/,"$1");case"a":return l.getHours()<12?"am":"pm";case"A":return l.getHours()<12?"AM":"PM";case"B":return Math.floor(((l.getUTCHours()+1)%24+l.getUTCMinutes()/60+l.getUTCSeconds()/3600)*1e3/24);case"g":return l.getHours()%12!=0?l.getHours()%12:12;case"G":return l.getHours();case"h":return("0"+(l.getHours()%12!=0?l.getHours()%12:12)).replace(/^.+(..)$/,"$1");case"H":return("0"+l.getHours()).replace(/^.+(..)$/,"$1");case"i":return("0"+l.getMinutes()).replace(/^.+(..)$/,"$1");case"s":return("0"+l.getSeconds()).replace(/^.+(..)$/,"$1");case"u":return l.getMilliseconds();case"U":return l.getTime()/1e3}})}}(),e.lib.strip_tags=function(e,t){t=(((t||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");var n=/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,r=/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;return e.replace(r,"").replace(n,function(e,n){return t.indexOf("<"+n.toLowerCase()+">")>-1?e:""})},e.lib.parseISO8601Date=function(e){var t=/(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)(\.\d+)?(Z|([+-])(\d\d):(\d\d))/,n=[];n=e.match(t);if(!n)throw"Couldn't parse ISO 8601 date string '"+e+"'";var r=[1,2,3,4,5,6,10,11];for(var i in r)n[r[i]]=parseInt(n[r[i]],10);n[7]=parseFloat(n[7]);var s=Date.UTC(n[1],n[2]-1,n[3],n[4],n[5],n[6]);n[7]>0&&(s+=Math.round(n[7]*1e3));if(n[8]!="Z"&&n[10]){var o=n[10]*60*60*1e3;n[11]&&(o+=n[11]*60*1e3),n[9]=="-"?s-=o:s+=o}return new Date(s)},e.lib.strtotime=function(t,n){var r,i,s,o,u="";t=t.replace(/\s{2,}|^\s|\s$/g," "),t=t.replace(/[\t\r\n]/g,"");if(t==="now")return n===null||isNaN(n)?(new Date).getTime()/1e3|0:n|0;if(!isNaN(u=Date.parse(t)))return u/1e3|0;n?n=new Date(n*1e3):n=new Date;var a=t;t=t.toLowerCase();var f={day:{sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},mon:["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"]},l=function(e){var t=e[2]&&e[2]==="ago",r=(r=e[0]==="last"?-1:1)*(t?-1:1);switch(e[0]){case"last":case"next":switch(e[1].substring(0,3)){case"yea":n.setFullYear(n.getFullYear()+r);break;case"wee":n.setDate(n.getDate()+r*7);break;case"day":n.setDate(n.getDate()+r);break;case"hou":n.setHours(n.getHours()+r);break;case"min":n.setMinutes(n.getMinutes()+r);break;case"sec":n.setSeconds(n.getSeconds()+r);break;case"mon":if(e[1]==="month"){n.setMonth(n.getMonth()+r);break};default:var i=f.day[e[1].substring(0,3)];if(typeof i!="undefined"){var s=i-n.getDay();s===0?s=7*r:s>0?e[0]==="last"&&(s-=7):e[0]==="next"&&(s+=7),n.setDate(n.getDate()+s),n.setHours(0,0,0,0)}}break;default:if(!/\d+/.test(e[0]))return!1;r*=parseInt(e[0],10);switch(e[1].substring(0,3)){case"yea":n.setFullYear(n.getFullYear()+r);break;case"mon":n.setMonth(n.getMonth()+r);break;case"wee":n.setDate(n.getDate()+r*7);break;case"day":n.setDate(n.getDate()+r);break;case"hou":n.setHours(n.getHours()+r);break;case"min":n.setMinutes(n.getMinutes()+r);break;case"sec":n.setSeconds(n.getSeconds()+r)}}return!0};s=t.match(/^(\d{2,4}-\d{2}-\d{2})(?:\s(\d{1,2}:\d{2}(:\d{2})?)?(?:\.(\d+))?)?$/);if(s!==null)return s[2]?s[3]||(s[2]+=":00"):s[2]="00:00:00",o=s[1].split(/-/g),o[1]=f.mon[o[1]-1]||o[1],o[0]=+o[0],o[0]=o[0]>=0&&o[0]<=69?"20"+(o[0]<10?"0"+o[0]:o[0]+""):o[0]>=70&&o[0]<=99?"19"+o[0]:o[0]+"",parseInt(this.strtotime(o[2]+" "+o[1]+" "+o[0]+" "+s[2])+(s[4]?s[4]/1e3:""),10);var c="([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday)|(last|next)\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday))(\\sago)?";s=t.match(new RegExp(c,"gi"));if(s===null){try{num=e.lib.parseISO8601Date(a);if(num)return num/1e3|0}catch(h){return!1}return!1}for(r=0,i=s.length;r<i;r++)if(!l(s[r].split(" ")))return!1;return n.getTime()/1e3|0},e.lib.is=function(e,t){var n=Object.prototype.toString.call(t).slice(8,-1);return t!==undefined&&t!==null&&n===e},e.lib.copy=function(e){var t={},n;for(n in e)t[n]=e[n];return t},e.lib.replaceAll=function(e,t,n){return e.split(t).join(n)},e.lib.chunkArray=function(t,n){var r=[],i=0,s=t.length;if(n<1||!e.lib.is("Array",t))return[];while(i<s)r.push(t.slice(i,i+=n));return r},e.lib.round=function(t,n,r){var i,s,o,u;n|=0,i=Math.pow(10,n),t*=i,u=t>0|-(t<0),o=t%1===.5*u,s=Math.floor(t);if(o)switch(r){case"PHP_ROUND_HALF_DOWN":t=s+(u<0);break;case"PHP_ROUND_HALF_EVEN":t=s+s%2*u;break;case"PHP_ROUND_HALF_ODD":t=s+!(s%2);break;default:t=s+(u>0)}return(o?t:Math.round(t))/i},e}(Twig||{}),Twig=function(e){e.logic={},e.logic.type={if_:"Twig.logic.type.if",endif:"Twig.logic.type.endif",for_:"Twig.logic.type.for",endfor:"Twig.logic.type.endfor",else_:"Twig.logic.type.else",elseif:"Twig.logic.type.elseif",set:"Twig.logic.type.set",setcapture:"Twig.logic.type.setcapture",endset:"Twig.logic.type.endset",filter:"Twig.logic.type.filter",endfilter:"Twig.logic.type.endfilter",block:"Twig.logic.type.block",endblock:"Twig.logic.type.endblock",extends_:"Twig.logic.type.extends",use:"Twig.logic.type.use",include:"Twig.logic.type.include",spaceless:"Twig.logic.type.spaceless",endspaceless:"Twig.logic.type.endspaceless",macro:"Twig.logic.type.macro",endmacro:"Twig.logic.type.endmacro",import_:"Twig.logic.type.import",from:"Twig.logic.type.from"},e.logic.definitions=[{type:e.logic.type.if_,regex:/^if\s+([^\s].+)$/,next:[e.logic.type.else_,e.logic.type.elseif,e.logic.type.endif],open:!0,compile:function(t){var n=t.match[1];return t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,delete t.match,t},parse:function(t,n,r){var i="",s=e.expression.parse.apply(this,[t.stack,n]);return r=!0,s&&(r=!1,i=e.parse.apply(this,[t.output,n])),{chain:r,output:i}}},{type:e.logic.type.elseif,regex:/^elseif\s+([^\s].*)$/,next:[e.logic.type.else_,e.logic.type.elseif,e.logic.type.endif],open:!1,compile:function(t){var n=t.match[1];return t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,delete t.match,t},parse:function(t,n,r){var i="";return r&&e.expression.parse.apply(this,[t.stack,n])===!0&&(r=!1,i=e.parse.apply(this,[t.output,n])),{chain:r,output:i}}},{type:e.logic.type.else_,regex:/^else$/,next:[e.logic.type.endif,e.logic.type.endfor],open:!1,parse:function(t,n,r){var i="";return r&&(i=e.parse.apply(this,[t.output,n])),{chain:r,output:i}}},{type:e.logic.type.endif,regex:/^endif$/,next:[],open:!1},{type:e.logic.type.for_,regex:/^for\s+([a-zA-Z0-9_,\s]+)\s+in\s+([^\s].*?)(?:\s+if\s+([^\s].*))?$/,next:[e.logic.type.else_,e.logic.type.endfor],open:!0,compile:function(t){var n=t.match[1],r=t.match[2],i=t.match[3],s=null;t.key_var=null,t.value_var=null;if(n.indexOf(",")>=0){s=n.split(",");if(s.length!==2)throw new e.Error("Invalid expression in for loop: "+n);t.key_var=s[0].trim(),t.value_var=s[1].trim()}else t.value_var=n;return t.expression=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:r}]).stack,i&&(t.conditional=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:i}]).stack),delete t.match,t},parse:function(t,n,r){var i=e.expression.parse.apply(this,[t.expression,n]),s=[],o,u=0,a,f=this,l=t.conditional,c=function(e,t){var r=l!==undefined;return{index:e+1,index0:e,revindex:r?undefined:t-e,revindex0:r?undefined:t-e-1,first:e===0,last:r?undefined:e===t-1,length:r?undefined:t,parent:n}},h=function(r,i){var a=e.lib.copy(n);a[t.value_var]=i,t.key_var&&(a[t.key_var]=r),a.loop=c(u,o);if(l===undefined||e.expression.parse.apply(f,[l,a]))s.push(e.parse.apply(f,[t.output,a])),u+=1};return i instanceof Array?(o=i.length,e.forEach(i,function(e){var t=u;h(t,e)})):i instanceof Object&&(i._keys!==undefined?a=i._keys:a=Object.keys(i),o=a.length,e.forEach(a,function(e){if(e==="_keys")return;h(e,i[e])})),r=s.length===0,{chain:r,output:s.join("")}}},{type:e.logic.type.endfor,regex:/^endfor$/,next:[],open:!1},{type:e.logic.type.set,regex:/^set\s+([a-zA-Z0-9_,\s]+)\s*=\s*(.+)$/,next:[],open:!0,compile:function(t){var n=t.match[1].trim(),r=t.match[2],i=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:r}]).stack;return t.key=n,t.expression=i,delete t.match,t},parse:function(t,n,r){var i=e.expression.parse.apply(this,[t.expression,n]),s=t.key;return this.context[s]=i,n[s]=i,{chain:r,context:n}}},{type:e.logic.type.setcapture,regex:/^set\s+([a-zA-Z0-9_,\s]+)$/,next:[e.logic.type.endset],open:!0,compile:function(e){var t=e.match[1].trim();return e.key=t,delete e.match,e},parse:function(t,n,r){var i=e.parse.apply(this,[t.output,n]),s=t.key;return this.context[s]=i,n[s]=i,{chain:r,context:n}}},{type:e.logic.type.endset,regex:/^endset$/,next:[],open:!1},{type:e.logic.type.filter,regex:/^filter\s+(.+)$/,next:[e.logic.type.endfilter],open:!0,compile:function(t){var n="|"+t.match[1].trim();return t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,delete t.match,t},parse:function(t,n,r){var i=e.parse.apply(this,[t.output,n]),s=[{type:e.expression.type.string,value:i}].concat(t.stack),o=e.expression.parse.apply(this,[s,n]);return{chain:r,output:o}}},{type:e.logic.type.endfilter,regex:/^endfilter$/,next:[],open:!1},{type:e.logic.type.block,regex:/^block\s+([a-zA-Z0-9_]+)$/,next:[e.logic.type.endblock],open:!0,compile:function(e){return e.block=e.match[1].trim(),delete e.match,e},parse:function(t,n,r){var i="",s="",o=this.blocks[t.block]&&this.blocks[t.block].indexOf(e.placeholders.parent)>-1;if(this.blocks[t.block]===undefined||o||n.loop)i=e.expression.parse.apply(this,[{type:e.expression.type.string,value:e.parse.apply(this,[t.output,n])},n]),o?this.blocks[t.block]=this.blocks[t.block].replace(e.placeholders.parent,i):this.blocks[t.block]=i;return this.child.blocks[t.block]?s=this.child.blocks[t.block]:s=this.blocks[t.block],{chain:r,output:s}}},{type:e.logic.type.endblock,regex:/^endblock(?:\s+([a-zA-Z0-9_]+))?$/,next:[],open:!1},{type:e.logic.type.extends_,regex:/^extends\s+(.+)$/,next:[],open:!0,compile:function(t){var n=t.match[1].trim();return delete t.match,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,t},parse:function(t,n,r){var i=e.expression.parse.apply(this,[t.stack,n]);return this.extend=i,{chain:r,output:""}}},{type:e.logic.type.use,regex:/^use\s+(.+)$/,next:[],open:!0,compile:function(t){var n=t.match[1].trim();return delete t.match,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,t},parse:function(t,n,r){var i=e.expression.parse.apply(this,[t.stack,n]);return this.importBlocks(i),{chain:r,output:""}}},{type:e.logic.type.include,regex:/^include\s+(ignore missing\s+)?(.+?)\s*(?:with\s+(.+?))?\s*(only)?$/,next:[],open:!0,compile:function(t){var n=t.match,r=n[1]!==undefined,i=n[2].trim(),s=n[3],o=n[4]!==undefined&&n[4].length;return delete t.match,t.only=o,t.includeMissing=r,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:i}]).stack,s!==undefined&&(t.withStack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:s.trim()}]).stack),t},parse:function(t,n,r){var i={},s,o,u;if(!t.only)for(o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);if(t.withStack!==undefined){s=e.expression.parse.apply(this,[t.withStack,n]);for(o in s)s.hasOwnProperty(o)&&(i[o]=s[o])}var a=e.expression.parse.apply(this,[t.stack,i]);return u=this.importFile(a),{chain:r,output:u.render(i)}}},{type:e.logic.type.spaceless,regex:/^spaceless$/,next:[e.logic.type.endspaceless],open:!0,parse:function(t,n,r){var i=e.parse.apply(this,[t.output,n]),s=/>\s+</g,o=i.replace(s,"><").trim();return{chain:r,output:o}}},{type:e.logic.type.endspaceless,regex:/^endspaceless$/,next:[],open:!1},{type:e.logic.type.macro,regex:/^macro\s+([a-zA-Z0-9_]+)\s?\((([a-zA-Z0-9_]+(,\s?)?)*)\)$/,next:[e.logic.type.endmacro],open:!0,compile:function(t){var n=t.match[1],r=t.match[2].split(/[ ,]+/);for(var i=0;i<r.length;i++)for(var s=0;s<r.length;s++)if(r[i]===r[s]&&i!==s)throw new e.Error("Duplicate arguments for parameter: "+r[i]);return t.macroName=n,t.parameters=r,delete t.match,t},parse:function(t,n,r){var i=this;return this.macros[t.macroName]=function(){var n={_self:i.macros};for(var r=0;r<t.parameters.length;r++){var s=t.parameters[r];typeof arguments[r]!="undefined"?n[s]=arguments[r]:n[s]=undefined}return e.parse.apply(i,[t.output,n])},{chain:r,output:""}}},{type:e.logic.type.endmacro,regex:/^endmacro$/,next:[],open:!1},{type:e.logic.type.import_,regex:/^import\s+(.+)\s+as\s+([a-zA-Z0-9_]+)$/,next:[],open:!0,compile:function(t){var n=t.match[1].trim(),r=t.match[2].trim();return delete t.match,t.expression=n,t.contextName=r,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,t},parse:function(t,n,r){if(t.expression!=="_self"){var i=e.expression.parse.apply(this,[t.stack,n]),s=this.importMacros(i||t.expression);n[t.contextName]=s.render({},{output:"macros"})}else n[t.contextName]=this.macros;return{chain:r,output:""}}},{type:e.logic.type.from,regex:/^from\s+(.+)\s+import\s+([a-zA-Z0-9_, ]+)$/,next:[],open:!0,compile:function(t){var n=t.match[1].trim(),r=t.match[2].trim().split(/[ ,]+/),i={};for(var s=0;s<r.length;s++){var o=r[s],u=o.match(/^([a-zA-Z0-9_]+)\s+(.+)\s+as\s+([a-zA-Z0-9_]+)$/);u?i[u[1].trim()]=u[2].trim():o.match(/^([a-zA-Z0-9_]+)$/)&&(i[o]=o)}return delete t.match,t.expression=n,t.macroNames=i,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,t},parse:function(t,n,r){var i;if(t.expression!=="_self"){var s=e.expression.parse.apply(this,[t.stack,n]),o=this.importMacros(s||t.expression);i=o.render({},{output:"macros"})}else i=this.macros;for(var u in t.macroNames)i.hasOwnProperty(u)&&(n[t.macroNames[u]]=i[u]);return{chain:r,output:""}}}],e.logic.handler={},e.logic.extendType=function(t,n){n=n||"Twig.logic.type"+t,e.logic.type[t]=n},e.logic.extend=function(t){if(!t.type)throw new e.Error("Unable to extend logic definition. No type provided for "+t);if(e.logic.type[t.type])throw new e.Error("Unable to extend logic definitions. Type "+t.type+" is already defined.");e.logic.extendType(t.type),e.logic.handler[t.type]=t};while(e.logic.definitions.length>0)e.logic.extend(e.logic.definitions.shift());return e.logic.compile=function(t){var n=t.value.trim(),r=e.logic.tokenize.apply(this,[n]),i=e.logic.handler[r.type];return i.compile&&(r=i.compile.apply(this,[r]),e.log.trace("Twig.logic.compile: ","Compiled logic token to ",r)),r},e.logic.tokenize=function(t){var n={},r=null,i=null,s=null,o=null,u=null,a=null;t=t.trim();for(r in e.logic.handler)if(e.logic.handler.hasOwnProperty(r)){i=e.logic.handler[r].type,s=e.logic.handler[r].regex,o=[],s instanceof Array?o=s:o.push(s);while(o.length>0){u=o.shift(),a=u.exec(t.trim());if(a!==null)return n.type=i,n.match=a,e.log.trace("Twig.logic.tokenize: ","Matched a ",i," regular expression of ",a),n}}throw new e.Error("Unable to parse '"+t.trim()+"'")},e.logic.parse=function(t,n,r){var i="",s;return n=n||{},e.log.debug("Twig.logic.parse: ","Parsing logic token ",t),s=e.logic.handler[t.type],s.parse&&(i=s.parse.apply(this,[t,n,r])),i},e}(Twig||{}),Twig=function(e){e.expression={},e.expression.reservedWords=["true","false","null","_context"],e.expression.type={comma:"Twig.expression.type.comma",operator:{unary:"Twig.expression.type.operator.unary",binary:"Twig.expression.type.operator.binary"},string:"Twig.expression.type.string",bool:"Twig.expression.type.bool",array:{start:"Twig.expression.type.array.start",end:"Twig.expression.type.array.end"},object:{start:"Twig.expression.type.object.start",end:"Twig.expression.type.object.end"},parameter:{start:"Twig.expression.type.parameter.start",end:"Twig.expression.type.parameter.end"},key:{period:"Twig.expression.type.key.period",brackets:"Twig.expression.type.key.brackets"},filter:"Twig.expression.type.filter",_function:"Twig.expression.type._function",variable:"Twig.expression.type.variable",number:"Twig.expression.type.number",_null:"Twig.expression.type.null",context:"Twig.expression.type.context",test:"Twig.expression.type.test"},e.expression.set={operations:[e.expression.type.filter,e.expression.type.operator.unary,e.expression.type.operator.binary,e.expression.type.array.end,e.expression.type.object.end,e.expression.type.parameter.end,e.expression.type.comma,e.expression.type.test],expressions:[e.expression.type._function,e.expression.type.bool,e.expression.type.string,e.expression.type.variable,e.expression.type.number,e.expression.type._null,e.expression.type.context,e.expression.type.parameter.start,e.expression.type.array.start,e.expression.type.object.start]},e.expression.set.operations_extended=e.expression.set.operations.concat([e.expression.type.key.period,e.expression.type.key.brackets]),e.expression.fn={compile:{push:function(e,t,n){n.push(e)},push_both:function(e,t,n){n.push(e),t.push(e)}},parse:{push:function(e,t,n){t.push(e)},push_value:function(e,t,n){t.push(e.value)}}},e.expression.definitions=[{type:e.expression.type.test,regex:/^is\s+(not)?\s*([a-zA-Z_][a-zA-Z0-9_]*)/,next:e.expression.set.operations.concat([e.expression.type.parameter.start]),compile:function(e,t,n){e.filter=e.match[2],e.modifier=e.match[1],delete e.match,delete e.value,n.push(e)},parse:function(t,n,r){var i=n.pop(),s=t.params&&e.expression.parse.apply(this,[t.params,r]),o=e.test(t.filter,i,s);t.modifier=="not"?n.push(!o):n.push(o)}},{type:e.expression.type.comma,regex:/^,/,next:e.expression.set.expressions.concat([e.expression.type.array.end,e.expression.type.object.end]),compile:function(t,n,r){var i=n.length-1,s;delete t.match,delete t.value;for(;i>=0;i--){s=n.pop();if(s.type===e.expression.type.object.start||s.type===e.expression.type.parameter.start||s.type===e.expression.type.array.start){n.push(s);break}r.push(s)}r.push(t)}},{type:e.expression.type.operator.binary,regex:/(^[\+\-~%\?\:]|^[!=]==?|^[!<>]=?|^\*\*?|^\/\/?|^and\s+|^or\s+|^in\s+|^not in\s+|^\.\.)/,next:e.expression.set.expressions.concat([e.expression.type.operator.unary]),compile:function(t,n,r){delete t.match,t.value=t.value.trim();var i=t.value,s=e.expression.operator.lookup(i,t);e.log.trace("Twig.expression.compile: ","Operator: ",s," from ",i);while(n.length>0&&(n[n.length-1].type==e.expression.type.operator.unary||n[n.length-1].type==e.expression.type.operator.binary)&&(s.associativity===e.expression.operator.leftToRight&&s.precidence>=n[n.length-1].precidence||s.associativity===e.expression.operator.rightToLeft&&s.precidence>n[n.length-1].precidence)){var o=n.pop();r.push(o)}if(i===":"){if(!n[n.length-1]||n[n.length-1].value!=="?"){var u=r.pop();if(u.type!==e.expression.type.string&&u.type!==e.expression.type.variable&&u.type!==e.expression.type.number)throw new e.Error("Unexpected value before ':' of "+u.type+" = "+u.value);t.key=u.value,r.push(t);return}}else n.push(s)},parse:function(t,n,r){t.key?n.push(t):e.expression.operator.parse(t.value,n)}},{type:e.expression.type.operator.unary,regex:/(^not\s+)/,next:e.expression.set.expressions,compile:function(t,n,r){delete t.match,t.value=t.value.trim();var i=t.value,s=e.expression.operator.lookup(i,t);e.log.trace("Twig.expression.compile: ","Operator: ",s," from ",i);while(n.length>0&&(n[n.length-1].type==e.expression.type.operator.unary||n[n.length-1].type==e.expression.type.operator.binary)&&(s.associativity===e.expression.operator.leftToRight&&s.precidence>=n[n.length-1].precidence||s.associativity===e.expression.operator.rightToLeft&&s.precidence>n[n.length-1].precidence)){var o=n.pop();r.push(o)}n.push(s)},parse:function(t,n,r){e.expression.operator.parse(t.value,n)}},{type:e.expression.type.string,regex:/^(["'])(?:(?=(\\?))\2.)*?\1/,next:e.expression.set.operations,compile:function(t,n,r){var i=t.value;delete t.match,i.substring(0,1)==='"'?i=i.replace('\\"','"'):i=i.replace("\\'","'"),t.value=i.substring(1,i.length-1).replace(/\\n/g,"\n").replace(/\\r/g,"\r"),e.log.trace("Twig.expression.compile: ","String value: ",t.value),r.push(t)},parse:e.expression.fn.parse.push_value},{type:e.expression.type.parameter.start,regex:/^\(/,next:e.expression.set.expressions.concat([e.expression.type.parameter.end]),compile:e.expression.fn.compile.push_both,parse:e.expression.fn.parse.push},{type:e.expression.type.parameter.end,regex:/^\)/,next:e.expression.set.operations_extended,compile:function(t,n,r){var i,s=t;i=n.pop();while(n.length>0&&i.type!=e.expression.type.parameter.start)r.push(i),i=n.pop();var o=[];while(t.type!==e.expression.type.parameter.start)o.unshift(t),t=r.pop();o.unshift(t);var u=!1;t=r[r.length-1],t===undefined||t.type!==e.expression.type._function&&t.type!==e.expression.type.filter&&t.type!==e.expression.type.test&&t.type!==e.expression.type.key.brackets&&t.type!==e.expression.type.key.period?(s.expression=!0,o.pop(),o.shift(),s.params=o,r.push(s)):(s.expression=!1,t.params=o)},parse:function(t,n,r){var i=[],s=!1,o=null;if(t.expression)o=e.expression.parse.apply(this,[t.params,r]),n.push(o);else{while(n.length>0){o=n.pop();if(o&&o.type&&o.type==e.expression.type.parameter.start){s=!0;break}i.unshift(o)}if(!s)throw new e.Error("Expected end of parameter set.");n.push(i)}}},{type:e.expression.type.array.start,regex:/^\[/,next:e.expression.set.expressions.concat([e.expression.type.array.end]),compile:e.expression.fn.compile.push_both,parse:e.expression.fn.parse.push},{type:e.expression.type.array.end,regex:/^\]/,next:e.expression.set.operations_extended,compile:function(t,n,r){var i=n.length-1,s;for(;i>=0;i--){s=n.pop();if(s.type===e.expression.type.array.start)break;r.push(s)}r.push(t)},parse:function(t,n,r){var i=[],s=!1,o=null;while(n.length>0){o=n.pop();if(o.type&&o.type==e.expression.type.array.start){s=!0;break}i.unshift(o)}if(!s)throw new e.Error("Expected end of array.");n.push(i)}},{type:e.expression.type.object.start,regex:/^\{/,next:e.expression.set.expressions.concat([e.expression.type.object.end]),compile:e.expression.fn.compile.push_both,parse:e.expression.fn.parse.push},{type:e.expression.type.object.end,regex:/^\}/,next:e.expression.set.operations_extended,compile:function(t,n,r){var i=n.length-1,s;for(;i>=0;i--){s=n.pop();if(s&&s.type===e.expression.type.object.start)break;r.push(s)}r.push(t)},parse:function(t,n,r){var i={},s=!1,o=null,u=null,a=!1,f=null;while(n.length>0){o=n.pop();if(o&&o.type&&o.type===e.expression.type.object.start){s=!0;break}if(o&&o.type&&(o.type===e.expression.type.operator.binary||o.type===e.expression.type.operator.unary)&&o.key){if(!a)throw new e.Error("Missing value for key '"+o.key+"' in object definition.");i[o.key]=f,i._keys===undefined&&(i._keys=[]),i._keys.unshift(o.key),f=null,a=!1}else a=!0,f=o}if(!s)throw new e.Error("Unexpected end of object.");n.push(i)}},{type:e.expression.type.filter,regex:/^\|\s?([a-zA-Z_][a-zA-Z0-9_\-]*)/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:function(e,t,n){e.value=e.match[1],n.push(e)},parse:function(t,n,r){var i=n.pop(),s=t.params&&e.expression.parse.apply(this,[t.params,r]);n.push(e.filter.apply(this,[t.value,i,s]))}},{type:e.expression.type._function,regex:/^([a-zA-Z_][a-zA-Z0-9_]*)\s*\(/,next:e.expression.type.parameter.start,transform:function(e,t){return"("},compile:function(e,t,n){var r=e.match[1];e.fn=r,delete e.match,delete e.value,n.push(e)},parse:function(t,n,r){var i=t.params&&e.expression.parse.apply(this,[t.params,r]),s=t.fn,o;if(e.functions[s])o=e.functions[s].apply(this,i);else{if(typeof r[s]!="function")throw new e.Error(s+" function does not exist and is not defined in the context");o=r[s].apply(r,i)}n.push(o)}},{type:e.expression.type.variable,regex:/^[a-zA-Z_][a-zA-Z0-9_]*/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:e.expression.fn.compile.push,validate:function(t,n){return e.indexOf(e.expression.reservedWords,t[0])<0},parse:function(t,n,r){var i=e.expression.resolve(r[t.value],r);n.push(i)}},{type:e.expression.type.key.period,regex:/^\.([a-zA-Z0-9_]+)/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:function(e,t,n){e.key=e.match[1],delete e.match,delete e.value,n.push(e)},parse:function(t,n,r){var i=t.params&&e.expression.parse.apply(this,[t.params,r]),s=t.key,o=n.pop(),u;if(o===null||o===undefined){if(this.options.strict_variables)throw new e.Error("Can't access a key "+s+" on an null or undefined object.");return null}var a=function(e){return e.substr(0,1).toUpperCase()+e.substr(1)};typeof o=="object"&&s in o?u=o[s]:o["get"+a(s)]!==undefined?u=o["get"+a(s)]:o["is"+a(s)]!==undefined?u=o["is"+a(s)]:u=null,n.push(e.expression.resolve(u,o,i))}},{type:e.expression.type.key.brackets,regex:/^\[([^\]]*)\]/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:function(t,n,r){var i=t.match[1];delete t.value,delete t.match,t.stack=e.expression.compile({value:i}).stack,r.push(t)},parse:function(t,n,r){var i=t.params&&e.expression.parse.apply(this,[t.params,r]),s=e.expression.parse.apply(this,[t.stack,r]),o=n.pop(),u;if(o===null||o===undefined){if(this.options.strict_variables)throw new e.Error("Can't access a key "+s+" on an null or undefined object.");return null}typeof o=="object"&&s in o?u=o[s]:u=null,n.push(e.expression.resolve(u,o,i))}},{type:e.expression.type._null,regex:/^null/,next:e.expression.set.operations,compile:function(e,t,n){delete e.match,e.value=null,n.push(e)},parse:e.expression.fn.parse.push_value},{type:e.expression.type.context,regex:/^_context/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:e.expression.fn.compile.push,parse:function(e,t,n){t.push(n)}},{type:e.expression.type.number,regex:/^\-?\d+(\.\d+)?/,next:e.expression.set.operations,compile:function(e,t,n){e.value=Number(e.value),n.push(e)},parse:e.expression.fn.parse.push_value},{type:e.expression.type.bool,regex:/^(true|false)/,next:e.expression.set.operations,compile:function(e,t,n){e.value=e.match[0]=="true",delete e.match,n.push(e)},parse:e.expression.fn.parse.push_value}],e.expression.resolve=function(e,t,n){return typeof e=="function"?e.apply(t,n||[]):e},e.expression.handler={},e.expression.extendType=function(t){e.expression.type[t]="Twig.expression.type."+t},e.expression.extend=function(t){if(!t.type)throw new e.Error("Unable to extend logic definition. No type provided for "+t);e.expression.handler[t.type]=t};while(e.expression.definitions.length>0)e.expression.extend(e.expression.definitions.shift());return e.expression.tokenize=function(t){var n=[],r=0,i=null,s,o,u,a,f,l=[],c;c=function(){var t=Array.prototype.slice.apply(arguments),o=t.pop(),u=t.pop();return e.log.trace("Twig.expression.tokenize","Matched a ",s," regular expression of ",t),i&&e.indexOf(i,s)<0?(l.push(s+" cannot follow a "+n[n.length-1].type+" at template:"+r+" near '"+t[0].substring(0,20)+"...'"),t[0]):e.expression.handler[s].validate&&!e.expression.handler[s].validate(t,n)?t[0]:(l=[],n.push({type:s,value:t[0],match:t}),f=!0,i=a,r+=t[0].length,e.expression.handler[s].transform?e.expression.handler[s].transform(t,n):"")},e.log.debug("Twig.expression.tokenize","Tokenizing expression ",t);while(t.length>0){t=t.trim();for(s in e.expression.handler)if(e.expression.handler.hasOwnProperty(s)){a=e.expression.handler[s].next,o=e.expression.handler[s].regex,o instanceof Array?u=o:u=[o],f=!1;while(u.length>0)o=u.pop(),t=t.replace(o,c);if(f)break}if(!f)throw l.length>0?new e.Error(l.join(" OR ")):new e.Error("Unable to parse '"+t+"' at template position"+r)}return e.log.trace("Twig.expression.tokenize","Tokenized to ",n),n},e.expression.compile=function(t){var n=t.value,r=e.expression.tokenize(n),i=null,s=[],o=[],u=null;e.log.trace("Twig.expression.compile: ","Compiling ",n);while(r.length>0)i=r.shift(),u=e.expression.handler[i.type],e.log.trace("Twig.expression.compile: ","Compiling ",i),u.compile&&u.compile(i,o,s),e.log.trace("Twig.expression.compile: ","Stack is",o),e.log.trace("Twig.expression.compile: ","Output is",s);while(o.length>0)s.push(o.pop());return e.log.trace("Twig.expression.compile: ","Final output is",s),t.stack=s,delete t.value,t},e.expression.parse=function(t,n){var r=this;t instanceof Array||(t=[t]);var i=[],s=null;return e.forEach(t,function(t){s=e.expression.handler[t.type],s.parse&&s.parse.apply(r,[t,i,n])}),i.pop()},e}(Twig||{}),Twig=function(e){e.expression.operator={leftToRight:"leftToRight",rightToLeft:"rightToLeft"};var t=function(e,t){if(t.indexOf!==undefined)return e===t||e!==""&&t.indexOf(e)>-1;var n;for(n in t)if(t.hasOwnProperty(n)&&t[n]===e)return!0;return!1};return e.expression.operator.lookup=function(t,n){switch(t){case"..":case"not in":case"in":n.precidence=20,n.associativity=e.expression.operator.leftToRight;break;case",":n.precidence=18,n.associativity=e.expression.operator.leftToRight;break;case"?":case":":n.precidence=16,n.associativity=e.expression.operator.rightToLeft;break;case"or":n.precidence=14,n.associativity=e.expression.operator.leftToRight;break;case"and":n.precidence=13,n.associativity=e.expression.operator.leftToRight;break;case"==":case"!=":n.precidence=9,n.associativity=e.expression.operator.leftToRight;break;case"<":case"<=":case">":case">=":n.precidence=8,n.associativity=e.expression.operator.leftToRight;break;case"~":case"+":case"-":n.precidence=6,n.associativity=e.expression.operator.leftToRight;break;case"//":case"**":case"*":case"/":case"%":n.precidence=5,n.associativity=e.expression.operator.leftToRight;break;case"not":n.precidence=3,n.associativity=e.expression.operator.rightToLeft;break;default:throw new e.Error(t+" is an unknown operator.")}return n.operator=t,n},e.expression.operator.parse=function(n,r){e.log.trace("Twig.expression.operator.parse: ","Handling ",n);var i,s,o;switch(n){case":":break;case"?":o=r.pop(),s=r.pop(),i=r.pop(),i?r.push(s):r.push(o);break;case"+":s=parseFloat(r.pop()),i=parseFloat(r.pop()),r.push(i+s);break;case"-":s=parseFloat(r.pop()),i=parseFloat(r.pop()),r.push(i-s);break;case"*":s=parseFloat(r.pop()),i=parseFloat(r.pop()),r.push(i*s);break;case"/":s=parseFloat(r.pop()),i=parseFloat(r.pop()),r.push(i/s);break;case"//":s=parseFloat(r.pop()),i=parseFloat(r.pop()),r.push(parseInt(i/s));break;case"%":s=parseFloat(r.pop()),i=parseFloat(r.pop()),r.push(i%s);break;case"~":s=r.pop(),i=r.pop(),r.push((i!==undefined?i.toString():"")+(s!==undefined?s.toString():""));break;case"not":case"!":r.push(!r.pop());break;case"<":s=r.pop(),i=r.pop(),r.push(i<s);break;case"<=":s=r.pop(),i=r.pop(),r.push(i<=s);break;case">":s=r.pop(),i=r.pop(),r.push(i>s);break;case">=":s=r.pop(),i=r.pop(),r.push(i>=s);break;case"===":s=r.pop(),i=r.pop(),r.push(i===s);break;case"==":s=r.pop(),i=r.pop(),r.push(i==s);break;case"!==":s=r.pop(),i=r.pop(),r.push(i!==s);break;case"!=":s=r.pop(),i=r.pop(),r.push(i!=s);break;case"or":s=r.pop(),i=r.pop(),r.push(i||s);break;case"and":s=r.pop(),i=r.pop(),r.push(i&&s);break;case"**":s=r.pop(),i=r.pop(),r.push(Math.pow(i,s));break;case"not in":s=r.pop(),i=r.pop(),r.push(!t(i,s));break;case"in":s=r.pop(),i=r.pop(),r.push(t(i,s));break;case"..":s=r.pop(),i=r.pop(),r.push(e.functions.range(i,s));break;default:throw new e.Error(n+" is an unknown operator.")}},e}(Twig||{}),Twig=function(e){function t(e,t){var n=Object.prototype.toString.call(t).slice(8,-1);return t!==undefined&&t!==null&&n===e}return e.filters={upper:function(e){return typeof e!="string"?e:e.toUpperCase()},lower:function(e){return typeof e!="string"?e:e.toLowerCase()},capitalize:function(e){return typeof e!="string"?e:e.substr(0,1).toUpperCase()+e.toLowerCase().substr(1)},title:function(e){return typeof e!="string"?e:e.toLowerCase().replace(/(^|\s)([a-z])/g,function(e,t,n){return t+n.toUpperCase()})},length:function(t){return e.lib.is("Array",t)||typeof t=="string"?t.length:e.lib.is("Object",t)?t._keys===undefined?Object.keys(t).length:t._keys.length:0},reverse:function(e){if(t("Array",e))return e.reverse();if(t("String",e))return e.split("").reverse().join("");if(e instanceof Object){var n=e._keys||Object.keys(e).reverse();return e._keys=n,e}},sort:function(e){if(t("Array",e))return e.sort();if(e instanceof Object){delete e._keys;var n=Object.keys(e),r=n.sort(function(t,n){return e[t]>e[n]});return e._keys=r,e}},keys:function(t){if(t===undefined||t===null)return;var n=t._keys||Object.keys(t),r=[];return e.forEach(n,function(e){if(e==="_keys")return;t.hasOwnProperty(e)&&r.push(e)}),r},url_encode:function(e){if(e===undefined||e===null)return;return encodeURIComponent(e)},join:function(t,n){if(t===undefined||t===null)return;var r="",i=[],s=null;return n&&n[0]&&(r=n[0]),t instanceof Array?i=t:(s=t._keys||Object.keys(t),e.forEach(s,function(e){if(e==="_keys")return;t.hasOwnProperty(e)&&i.push(t[e])})),i.join(r)},"default":function(t,n){if(n===undefined||n.length!==1)throw new e.Error("default filter expects one argument");return t===undefined||t===null||t===""?n[0]:t},json_encode:function(e){return e&&e.hasOwnProperty("_keys")&&delete e._keys,e===undefined||e===null?"null":JSON.stringify(e)},merge:function(t,n){var r=[],i=0,s=[];t instanceof Array?e.forEach(n,function(e){e instanceof Array||(r={})}):r={},r instanceof Array||(r._keys=[]),t instanceof Array?e.forEach(t,function(e){r._keys&&r._keys.push(i),r[i]=e,i++}):(s=t._keys||Object.keys(t),e.forEach(s,function(e){r[e]=t[e],r._keys.push(e);var n=parseInt(e,10);!isNaN(n)&&n>=i&&(i=n+1)})),e.forEach(n,function(t){t instanceof Array?e.forEach(t,function(e){r._keys&&r._keys.push(i),r[i]=e,i++}):(s=t._keys||Object.keys(t),e.forEach(s,function(e){r[e]||r._keys.push(e),r[e]=t[e];var n=parseInt(e,10);!isNaN(n)&&n>=i&&(i=n+1)}))});if(n.length===0)throw new e.Error("Filter merge expects at least one parameter");return r},date:function(t,n){if(t===undefined||t===null)return;var r=e.functions.date(t);return e.lib.formatDate(r,n[0])},date_modify:function(t,n){if(t===undefined||t===null)return;if(n===undefined||n.length!==1)throw new e.Error("date_modify filter expects 1 argument");var r=n[0],i;return e.lib.is("Date",t)&&(i=e.lib.strtotime(r,t.getTime()/1e3)),e.lib.is("String",t)&&(i=e.lib.strtotime(r,e.lib.strtotime(t))),e.lib.is("Number",t)&&(i=e.lib.strtotime(r,t)),new Date(i*1e3)},replace:function(t,n){if(t===undefined||t===null)return;var r=n[0],i;for(i in r)r.hasOwnProperty(i)&&i!=="_keys"&&(t=e.lib.replaceAll(t,i,r[i]));return t},format:function(t,n){if(t===undefined||t===null)return;return e.lib.vsprintf(t,n)},striptags:function(t){if(t===undefined||t===null)return;return e.lib.strip_tags(t)},escape:function(e){if(e===undefined||e===null)return;return e.toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},e:function(t){return e.filters.escape(t)},nl2br:function(t){if(t===undefined||t===null)return;var n="BACKSLASH_n_replace",r="<br />"+n;return t=e.filters.escape(t).replace(/\r\n/g,r).replace(/\r/g,r).replace(/\n/g,r),e.lib.replaceAll(t,n,"\n")},number_format:function(e,t){var n=e,r=t&&t[0]?t[0]:undefined,i=t&&t[1]!==undefined?t[1]:".",s=t&&t[2]!==undefined?t[2]:",";n=(n+"").replace(/[^0-9+\-Ee.]/g,"");var o=isFinite(+n)?+n:0,u=isFinite(+r)?Math.abs(r):0,a="",f=function(e,t){var n=Math.pow(10,t);return""+Math.round(e*n)/n};return a=(u?f(o,u):""+Math.round(o)).split("."),a[0].length>3&&(a[0]=a[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,s)),(a[1]||"").length<u&&(a[1]=a[1]||"",a[1]+=(new Array(u-a[1].length+1)).join("0")),a.join(i)},trim:function(t,n){if(t===undefined||t===null)return;var r=e.filters.escape(""+t),i;n&&n[0]?i=""+n[0]:i=" \n\r \f \u2028\u2029 ";for(var s=0;s<r.length;s++)if(i.indexOf(r.charAt(s))===-1){r=r.substring(s);break}for(s=r.length-1;s>=0;s--)if(i.indexOf(r.charAt(s))===-1){r=r.substring(0,s+1);break}return i.indexOf(r.charAt(0))===-1?r:""},slice:function(t,n){if(t===undefined||t===null)return;if(n===undefined||n.length<1)throw new e.Error("slice filter expects at least 1 argument");var r=n[0]||0,i=n.length>1?n[1]:t.length,s=r>=0?r:Math.max(t.length+r,0);if(e.lib.is("Array",t)){var o=[];for(var u=s;u<s+i&&u<t.length;u++)o.push(t[u]);return o}if(e.lib.is("String",t))return t.substr(s,i);throw new e.Error("slice filter expects value to be an array or string")},abs:function(e){if(e===undefined||e===null)return;return Math.abs(e)},first:function(e){if(e instanceof Array)return e[0];if(e instanceof Object){if("_keys"in e)return e[e._keys[0]]}else if(typeof e=="string")return e.substr(0,1);return},split:function(t,n){if(t===undefined||t===null)return;if(n===undefined||n.length<1||n.length>2)throw new e.Error("split filter expects 1 or 2 argument");if(e.lib.is("String",t)){var r=n[0],i=n[1],s=t.split(r);if(i===undefined)return s;if(i<0)return t.split(r,s.length+i);var o=[];if(r=="")while(s.length>0){var u="";for(var a=0;a<i&&s.length>0;a++)u+=s.shift();o.push(u)}else{for(var a=0;a<i-1&&s.length>0;a++)o.push(s.shift());s.length>0&&o.push(s.join(r))}return o}throw new e.Error("split filter expects value to be a string")},last:function(t){if(e.lib.is("Object",t)){var n;return t._keys===undefined?n=Object.keys(t):n=t._keys,t[n[n.length-1]]}return t[t.length-1]},raw:function(e){return e},batch:function(t,n){var r=n.shift(),i=n.shift(),s,o,u;if(!e.lib.is("Array",t))throw new e.Error("batch filter expects items to be an array");if(!e.lib.is("Number",r))throw new e.Error("batch filter expects size to be a number");r=Math.ceil(r),s=e.lib.chunkArray(t,r);if(i&&t.length%r!=0){o=s.pop(),u=r-o.length;while(u--)o.push(i);s.push(o)}return s},round:function(t,n){n=n||[];var r=n.length>0?n[0]:0,i=n.length>1?n[1]:"common";t=parseFloat(t);if(r&&!e.lib.is("Number",r))throw new e.Error("round filter expects precision to be a number");if(i==="common")return e.lib.round(t,r);if(!e.lib.is("Function",Math[i]))throw new e.Error("round filter expects method to be 'floor', 'ceil', or 'common'");return Math[i](t*Math.pow(10,r))/Math.pow(10,r)}},e.filter=function(t,n,r){if(!e.filters[t])throw"Unable to find filter "+t;return e.filters[t].apply(this,[n,r])},e.filter.extend=function(t,n){e.filters[t]=n},e}(Twig||{}),Twig=function(e){function t(e,t){var n=Object.prototype.toString.call(t).slice(8,-1);return t!==undefined&&t!==null&&n===e}return e.functions={range:function(e,t,n){var r=[],i,s,o,u=n||1,a=!1;!isNaN(e)&&!isNaN(t)?(i=parseInt(e,10),s=parseInt(t,10)):isNaN(e)&&isNaN(t)?(a=!0,i=e.charCodeAt(0),s=t.charCodeAt(0)):(i=isNaN(e)?0:e,s=isNaN(t)?0:t),o=i>s?!1:!0;if(o)while(i<=s)r.push(a?String.fromCharCode(i):i),i+=u;else while(i>=s)r.push(a?String.fromCharCode(i):i),i-=u;return r},cycle:function(e,t){var n=t%e.length;return e[n]},dump:function(){var t="\n",n=" ",r=0,i="",s=Array.prototype.slice.call(arguments),o=function(e){var t="";while(e>0)e--,t+=n;return t},u=function(e){i+=o(r),typeof e=="object"?a(e):typeof e=="function"?i+="function()"+t:typeof e=="string"?i+="string("+e.length+') "'+e+'"'+t:typeof e=="number"?i+="number("+e+")"+t:typeof e=="boolean"&&(i+="bool("+e+")"+t)},a=function(e){var n;if(e===null)i+="NULL"+t;else if(e===undefined)i+="undefined"+t;else if(typeof e=="object"){i+=o(r)+typeof e,r++,i+="("+function(e){var t=0,n;for(n in e)e.hasOwnProperty(n)&&t++;return t}(e)+") {"+t;for(n in e)i+=o(r)+"["+n+"]=> "+t,u(e[n]);r--,i+=o(r)+"}"+t}else u(e)};return s.length==0&&s.push(this.context),e.forEach(s,function(e){a(e)}),i},date:function(t,n){var r;if(t===undefined)r=new Date;else if(e.lib.is("Date",t))r=t;else if(e.lib.is("String",t))r=new Date(e.lib.strtotime(t)*1e3);else{if(!e.lib.is("Number",t))throw new e.Error("Unable to parse date "+t);r=new Date(t*1e3)}return r},block:function(e){return this.blocks[e]},parent:function(){return e.placeholders.parent},attribute:function(e,t,n){return e instanceof Object&&e.hasOwnProperty(t)?typeof e[t]=="function"?e[t].apply(undefined,n):e[t]:e[t]||undefined}},e._function=function(t,n,r){if(!e.functions[t])throw"Unable to find function "+t;return e.functions[t](n,r)},e._function.extend=function(t,n){e.functions[t]=n},e}(Twig||{}),Twig=function(e){return e.tests={empty:function(e){if(e===null||e===undefined)return!0;if(typeof e=="number")return!1;if(e.length&&e.length>0)return!1;for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},odd:function(e){return e%2===1},even:function(e){return e%2===0},divisibleby:function(e,t){return e%t[0]===0},defined:function(e){return e!==undefined},none:function(e){return e===null},"null":function(e){return this.none(e)},sameas:function(e,t){return e===t[0]}},e.test=function(t,n,r){if(!e.tests[t])throw"Test "+t+" is not defined.";return e.tests[t](n,r)},e.test.extend=function(t,n){e.tests[t]=n},e}(Twig||{}),Twig=function(e){return e.exports={VERSION:e.VERSION},e.exports.twig=function(n){var r=n.id,i={strict_variables:n.strict_variables||!1,allowInlineIncludes:n.allowInlineIncludes||!1,rethrow:n.rethrow||!1};r&&e.validateId(r),n.debug!==undefined&&(e.debug=n.debug),n.trace!==undefined&&(e.trace=n.trace);if(n.data!==undefined)return new e.Template({data:n.data,module:n.module,id:r,options:i});if(n.ref!==undefined){if(n.id!==undefined)throw new e.Error("Both ref and id cannot be set on a twig.js template.");return e.Templates.load(n.ref)}if(n.href!==undefined)return e.Templates.loadRemote(n.href,{id:r,method:"ajax",base:n.base,module:n.module,precompiled:n.precompiled,async:n.async,options:i},n.load,n.error);if(n.path!==undefined)return e.Templates.loadRemote(n.path,{id:r,method:"fs",base:n.base,module:n.module,precompiled:n.precompiled,async:n.async,options:i},n.load,n.error)},e.exports.extendFilter=function(t,n){e.filter.extend(t,n)},e.exports.extendFunction=function(t,n){e._function.extend(t,n)},e.exports.extendTest=function(t,n){e.test.extend(t,n)},e.exports.extendTag=function(t){e.logic.extend(t)},e.exports.extend=function(t){t(e)},e.exports.compile=function(t,n){var r=n.filename,i=n.filename,s;return s=new e.Template({data:t,path:i,id:r,options:n.settings["twig options"]}),function(e){return s.render(e)}},e.exports.renderFile=function(t,n,r){"function"==typeof n&&(r=n,n={}),n=n||{};var i={path:t,base:n.settings.views,load:function(e){r(null,e.render(n))}},s=n.settings["twig options"];if(s)for(var o in s)s.hasOwnProperty(o)&&(i[o]=s[o]);e.exports.twig(i)},e.exports.__express=e.exports.renderFile,e.exports.cache=function(t){e.cache=t},e}(Twig||{}),Twig=function(e){return e.compiler={module:{}},e.compiler.compile=function(t,n){var r=JSON.stringify(t.tokens),i=t.id,s;if(n.module){if(e.compiler.module[n.module]===undefined)throw new e.Error("Unable to find module type "+n.module);s=e.compiler.module[n.module](i,r,n.twig)}else s=e.compiler.wrap(i,r);return s},e.compiler.module={amd:function(t,n,r){return'define(["'+r+'"], function (Twig) {\n var twig, templates;\ntwig = Twig.twig;\ntemplates = '+e.compiler.wrap(t,n)+"\n return templates;\n});"},node:function(t,n){return'var twig = require("twig").twig;\nexports.template = '+e.compiler.wrap(t,n)},cjs2:function(t,n,r){return'module.declare([{ twig: "'+r+'" }], function (require, exports, module) {\n'+' var twig = require("twig").twig;\n'+" exports.template = "+e.compiler.wrap(t,n)+"\n});"}},e.compiler.wrap=function(e,t){return'twig({id:"'+e.replace('"','\\"')+'", data:'+t+", precompiled: true});\n"},e}(Twig||{});typeof module!="undefined"&&module.declare?module.declare([],function(e,t,n){for(key in Twig.exports)Twig.exports.hasOwnProperty(key)&&(t[key]=Twig.exports[key])}):typeof define=="function"&&define.amd||1?timely.define("external_libs/twig",[],function(){return Twig.exports}):typeof module!="undefined"&&module.exports?module.exports=Twig.exports:(window.twig=Twig.exports.twig,window.Twig=Twig.exports);
|
public/js/libs/timepicker_helper.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
timely.define(["jquery_timely","external_libs/moment","external_libs/bootstrap_timepicker"],function(e,t,n){var r=function(){var n=e(this);if(typeof n.data("timepicker")=="undefined"){if(n.val()===""){var r=t().
|
1 |
+
timely.define(["jquery_timely","external_libs/moment","external_libs/bootstrap_timepicker"],function(e,t,n){var r=function(){var n=e(this);if(typeof n.data("timepicker")=="undefined"){if(n.val()===""){var r=t().local(),i=n.data("showMeridian")?"hh:mm A":"HH:mm";n.val(r.format(i))}n.timepicker({showMeridian:n.data("showMeridian"),showInputs:!1,defaultTime:n.val()}).on("show.timepicker",function(){n.parents(".ai1ec-collapse").addClass("ai1ec-timepicker-visible")}).on("hide.timepicker",function(){n.parents(".ai1ec-collapse").removeClass("ai1ec-timepicker-visible")});var s=n.data("timepicker").$widget;s.addClass("timely")}},i=function(t){typeof t=="undefined"&&(t=e(document)),t.on("focus",".ai1ec-timepicker",r)};return{init:i}});
|
public/js/libs/utils.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
timely.define(["jquery_timely","external_libs/bootstrap/tab"],function(e){var t=function(){return{is_float:function(e){return!isNaN(parseFloat(e))},is_valid_coordinate:function(e,t){var n=t?90:180;return this.is_float(e)&&Math.abs(e)<n},convert_comma_to_dot:function(e){return e.replace(",",".")},field_has_value:function(t){var n="#"+t,r=e(n),i=!1;return r.length===1&&(i=e.trim(r.val())!==""),i},make_alert:function(t,n,r){var i="";switch(n){case"error":i="ai1ec-alert ai1ec-alert-danger";break;case"success":i="ai1ec-alert ai1ec-alert-success";break;default:i="ai1ec-alert"}var s=e("<div />",{"class":i,html:t});if(!r){var o=e("<button>",{type:"button","class":"ai1ec-close","data-dismiss":"ai1ec-alert",text:"×"});s.prepend(o)}return s},get_ajax_url:function(){return typeof window.ajaxurl=="undefined"?"http://localhost/wordpress/wp-admin/admin-ajax.php":window.ajaxurl},isUrl:function(e){var t=/(http|https|webcal):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)},isValidEmail:function(e){var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)},activate_saved_tab_on_page_load:function(t){null===t||undefined===t?e("ul.ai1ec-nav a:first").tab("show"):e("ul.ai1ec-nav a[href="+t+"]").tab("show")}}}();return t});
|
1 |
+
timely.define(["jquery_timely","external_libs/bootstrap/tab"],function(e){var t=function(){return{is_float:function(e){return!isNaN(parseFloat(e))},is_valid_coordinate:function(e,t){var n=t?90:180;return this.is_float(e)&&Math.abs(e)<n},convert_comma_to_dot:function(e){return e.replace(",",".")},field_has_value:function(t){var n="#"+t,r=e(n),i=!1;return r.length===1&&(i=e.trim(r.val())!==""),i},make_alert:function(t,n,r){var i="";switch(n){case"error":i="ai1ec-alert ai1ec-alert-danger";break;case"success":i="ai1ec-alert ai1ec-alert-success";break;default:i="ai1ec-alert"}var s=e("<div />",{"class":i,html:t});if(!r){var o=e("<button>",{type:"button","class":"ai1ec-close","data-dismiss":"ai1ec-alert",text:"×"});s.prepend(o)}return s},get_ajax_url:function(){return typeof window.ajaxurl=="undefined"?"http://localhost/wordpress/wp-admin/admin-ajax.php":window.ajaxurl},isUrl:function(e){var t=/(http|https|webcal):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)},isValidEmail:function(e){var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)},activate_saved_tab_on_page_load:function(t){null===t||undefined===t?e("ul.ai1ec-nav a:first").tab("show"):e("ul.ai1ec-nav a[href="+t+"]").tab("show")},add_query_arg:function(e,t){var n=e.indexOf("?")===-1?"?":"&";return-1!==e.indexOf(n+t[0]+"=")?e:e+n+t[0]+"="+t[1]},init_autoselect:function(){e(document).one("click",".ai1ec-autoselect",function(t){if(e(this).data("clicked")&&t.originalEvent.detail<2)return;e(this).data("clicked",!0);var n;document.body.createTextRange?(n=document.body.createTextRange(),n.moveToElementText(this),n.select()):window.getSelection&&(selection=window.getSelection(),n=document.createRange(),n.selectNodeContents(this),selection.removeAllRanges(),selection.addRange(n))})}}}();return t});
|
public/js/month.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
timely.define(["external_libs/twig","month"],function(e){var t,n;return t=e.twig,n=t({id:"../js_src/month.twig",data:[{type:"output",stack:[{type:"Twig.expression.type.variable",value:"navigation",match:["navigation"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n\n<table class="ai1ec-month-view ai1ec-popover-boundary\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"month_word_wrap",match:["month_word_wrap"]}],output:[{type:"raw",value:"ai1ec-word-wrap"}]}},{type:"raw",value:'">\n <thead>\n <tr>\n '},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"weekday",expression:[{type:"Twig.expression.type.variable",value:"weekdays",match:["weekdays"]}],output:[{type:"raw",value:' <th scope="col" class="ai1ec-weekday">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"weekday",match:["weekday"]}]},{type:"raw",value:"</th>\n "}]}},{type:"raw",value:" </tr>\n </thead>\n <tbody>\n "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"week",expression:[{type:"Twig.expression.type.variable",value:"cell_array",match:["cell_array"]}],output:[{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.set",key:"added_stretcher",expression:[{type:"Twig.expression.type.bool",value:!1}]}},{type:"raw",value:' <tr class="ai1ec-week">\n '},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"day",expression:[{type:"Twig.expression.type.variable",value:"week",match:["week"]}],output:[{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"date"}],output:[{type:"raw",value:" <td "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"today"}],output:[{type:"raw",value:'class="ai1ec-today"'}]}},{type:"raw",value:">\n "},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"added_stretcher",match:["added_stretcher"]},{type:"Twig.expression.type.operator.unary",value:"not",precidence:3,associativity:"rightToLeft",operator:"not"}],output:[{type:"raw",value:' <div class="ai1ec-day-stretcher"></div>\n '},{type:"logic",token:{type:"Twig.logic.type.set",key:"added_stretcher",expression:[{type:"Twig.expression.type.bool",value:!0}]}},{type:"raw",value:" "}]}},{type:"raw",value:'\n <div class="ai1ec-day">\n <div class="ai1ec-date">\n <a class="ai1ec-load-view"\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"data_type",match:["data_type"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"date_link"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"date"}]},{type:"raw",value:"</a>\n </div>\n\n "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"event",expression:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"events"}],output:[{type:"raw",value:' <a href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"data_type_events",match:["data_type_events"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"is_multiday"}],output:[{type:"raw",value:' data-end-day="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"multiday_end_day"}]},{type:"raw",value:'"\n data-start-truncated="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"start_truncated"},{type:"Twig.expression.type.string",value:"true"},{type:"Twig.expression.type.string",value:"false"},{type:"Twig.expression.type.operator.binary",value:"?",precidence:16,associativity:"rightToLeft",operator:"?"}]},{type:"raw",value:'"\n data-end-truncated="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"end_truncated"},{type:"Twig.expression.type.string",value:"true"},{type:"Twig.expression.type.string",value:"false"},{type:"Twig.expression.type.operator.binary",value:"?",precidence:16,associativity:"rightToLeft",operator:"?"}]},{type:"raw",value:'"\n '}]}},{type:"raw",value:' data-instance-id="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_id"}]},{type:"raw",value:'"\n class="ai1ec-event-container ai1ec-load-event\n ai1ec-popup-trigger\n ai1ec-event-id-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_id"}]},{type:"raw",value:"\n ai1ec-event-instance-id-"},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_id"}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"is_allday"}],output:[{type:"raw",value:"ai1ec-allday"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"is_multiday"}],output:[{type:"raw",value:"ai1ec-multiday"}]}},{type:"raw",value:'"\n >\n\n <div class="ai1ec-event"\n style="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"color_style"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'">\n <span class="ai1ec-event-title">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_title"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </span>\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"is_allday"},{type:"Twig.expression.type.operator.unary",value:"not",precidence:3,associativity:"rightToLeft",operator:"not"}],output:[{type:"raw",value:' <span class="ai1ec-event-time">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"short_start_time"}]},{type:"raw",value:"\n </span>\n "}]}},{type:"raw",value:' </div>\n </a>\n \n <div class="ai1ec-popover ai1ec-popup ai1ec-popup-in-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"type",match:["type"]}]},{type:"raw",value:'-view">\n '},{type:"logic",token:{type:"Twig.logic.type.set",key:"category_colors",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"category_colors"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"category_colors",match:["category_colors"]}],output:[{type:"raw",value:' <div class="ai1ec-color-swatches">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"category_colors",match:["category_colors"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:' <span class="ai1ec-popup-title">\n <a href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_title"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</a>\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_location_in_title",match:["show_location_in_title"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <span class="ai1ec-event-location"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_venue_separator",match:["text_venue_separator"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:"</span>\n "}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"is_ticket_button_enabled",match:["is_ticket_button_enabled"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <a class="ai1ec-pull-right ai1ec-btn ai1ec-btn-primary ai1ec-btn-xs\n ai1ec-buy-tickets" target="_blank"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url_label"}]},{type:"raw",value:"</a>\n "}]}},{type:"raw",value:" </span>\n "},{type:"logic",token:{type:"Twig.logic.type.set",key:"edit_post_link",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"edit_post_link"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"edit_post_link",match:["edit_post_link"]}],output:[{type:"raw",value:' <a class="post-edit-link" href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"edit_post_link",match:["edit_post_link"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'">\n <i class="ai1ec-fa ai1ec-fa-pencil"></i> '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_edit",match:["text_edit"]}]},{type:"raw",value:"\n </a>\n "}]}},{type:"raw",value:' <div class="ai1ec-event-time">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"popup_timespan"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </div>\n "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"avatar"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_excerpt"}],output:[{type:"raw",value:' <div class="ai1ec-popup-excerpt">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_excerpt"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:" </div>\n\n "}]}},{type:"raw",value:" </div>\n </td>\n "}]}},{type:"logic",token:{type:"Twig.logic.type.else",match:["else"],output:[{type:"raw",value:" "},{type:"raw",value:'\n <td class="ai1ec-empty"></td>\n '}]}},{type:"raw",value:" "},{type:"raw",value:"\n\n "}]}},{type:"raw",value:" "},{type:"raw",value:"\n </tr>\n "}]}},{type:"raw",value:" "},{type:"raw",value:"\n </tbody>\n</table>\n"}],precompiled:!0}),n});
|
public/js/oneday.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
timely.define(["external_libs/twig","oneday"],function(e){var t,n;return t=e.twig,n=t({id:"../js_src/oneday.twig",data:[{type:"output",stack:[{type:"Twig.expression.type.variable",value:"navigation",match:["navigation"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n\n<table class="ai1ec-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"type",match:["type"]}]},{type:"raw",value:'-view-original" xxx>\n <thead>\n <tr>\n '},{type:"logic",token:{type:"Twig.logic.type.for",key_var:"date",value_var:"day",expression:[{type:"Twig.expression.type.variable",value:"cell_array",match:["cell_array"]}],output:[{type:"raw",value:' <th class="ai1ec-weekday\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"today"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:"ai1ec-today"}]}},{type:"raw",value:'">\n '},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_reveal_button",match:["show_reveal_button"]},{type:"Twig.expression.type.variable",value:"loop",match:["loop"]},{type:"Twig.expression.type.key.period",key:"last"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <div class="ai1ec-reveal-full-day">\n <button class="ai1ec-btn ai1ec-btn-info ai1ec-btn-xs\n ai1ec-tooltip-trigger"\n data-placement="left"\n title="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_full_day",match:["text_full_day"]},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'">\n <i class="ai1ec-fa ai1ec-fa-expand"></i>\n </button>\n </div>\n '}]}},{type:"raw",value:' <a class="ai1ec-load-view" href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"href"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"data_type",match:["data_type"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'>\n <span class="ai1ec-weekday-date">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"day"}]},{type:"raw",value:'</span>\n <span class="ai1ec-weekday-day">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"weekday"}]},{type:"raw",value:"</span>\n </a>\n </th>\n "}]}},{type:"raw",value:" </tr>\n <tr>\n "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"day",expression:[{type:"Twig.expression.type.variable",value:"cell_array",match:["cell_array"]}],output:[{type:"raw",value:' <td class="ai1ec-allday-events\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"today"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:"ai1ec-today"}]}},{type:"raw",value:'">\n\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"loop",match:["loop"]},{type:"Twig.expression.type.key.period",key:"first"}],output:[{type:"raw",value:' <div class="ai1ec-allday-label">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_all_day",match:["text_all_day"]}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"event",expression:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"allday"}],output:[{type:"raw",value:' <a href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"data_type_events",match:["data_type_events"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n data-instance-id="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_id"}]},{type:"raw",value:'"\n class="ai1ec-event-container ai1ec-load-event ai1ec-popup-trigger\n ai1ec-event-id-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_id"}]},{type:"raw",value:"\n ai1ec-event-instance-id-"},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_id"}]},{type:"raw",value:"\n ai1ec-allday\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"is_multiday"}],output:[{type:"raw",value:"ai1ec-multiday"}]}},{type:"raw",value:'"\n >\n <div class="ai1ec-event"\n style="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"color_style"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'">\n <span class="ai1ec-event-title">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_title"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_location_in_title",match:["show_location_in_title"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <span class="ai1ec-event-location"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_venue_separator",match:["text_venue_separator"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:"</span>\n "}]}},{type:"raw",value:' </span>\n </div>\n </a>\n\n <div class="ai1ec-popover ai1ec-popup ai1ec-popup-in-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"type",match:["type"]}]},{type:"raw",value:'-view">\n\n '},{type:"logic",token:{type:"Twig.logic.type.set",key:"category_colors",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"category_colors"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"category_colors",match:["category_colors"]}],output:[{type:"raw",value:' <div class="ai1ec-color-swatches">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"category_colors",match:["category_colors"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:' \n <span class="ai1ec-popup-title">\n <a href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_title"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</a>\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_location_in_title",match:["show_location_in_title"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <span class="ai1ec-event-location"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_venue_separator",match:["text_venue_separator"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:"</span>\n "}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"is_ticket_button_enabled",match:["is_ticket_button_enabled"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <a class="ai1ec-pull-right ai1ec-btn ai1ec-btn-primary ai1ec-btn-xs\n ai1ec-buy-tickets" target="_blank"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url_label"}]},{type:"raw",value:"</a>\n "}]}},{type:"raw",value:" </span>\n \n "},{type:"logic",token:{type:"Twig.logic.type.set",key:"edit_post_link",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"edit_post_link"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"edit_post_link",match:["edit_post_link"]}],output:[{type:"raw",value:' <a class="post-edit-link" href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"edit_post_link",match:["edit_post_link"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'">\n <i class="ai1ec-fa ai1ec-fa-pencil"></i> '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_edit",match:["text_edit"]}]},{type:"raw",value:"\n </a>\n "}]}},{type:"raw",value:' \n <div class="ai1ec-event-time">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"popup_timespan"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </div>\n \n "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"avatar"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_excerpt"}],output:[{type:"raw",value:' <div class="ai1ec-popup-excerpt">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_excerpt"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:" \n </div>\n\n "}]}},{type:"raw",value:" "},{type:"raw",value:"\n\n </td>\n "}]}},{type:"raw",value:" "},{type:"raw",value:'\n </tr>\n\n </thead>\n <tbody>\n <tr class="ai1ec-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"type",match:["type"]}]},{type:"raw",value:'">\n '},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"day",expression:[{type:"Twig.expression.type.variable",value:"cell_array",match:["cell_array"]}],output:[{type:"raw",value:" <td "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"today"}],output:[{type:"raw",value:'class="ai1ec-today"'}]}},{type:"raw",value:">today\n\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"loop",match:["loop"]},{type:"Twig.expression.type.key.period",key:"first"}],output:[{type:"raw",value:' <div class="ai1ec-grid-container">\n '},{type:"logic",token:{type:"Twig.logic.type.for",key_var:"h",value_var:"hour",expression:[{type:"Twig.expression.type.variable",value:"hours",match:["hours"]}],output:[{type:"raw",value:' <div class="ai1ec-hour-marker\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"h",match:["h"]},{type:"Twig.expression.type.number",value:8,match:["8",null]},{type:"Twig.expression.type.operator.binary",value:">=",precidence:8,associativity:"leftToRight",operator:">="},{type:"Twig.expression.type.variable",value:"h",match:["h"]},{type:"Twig.expression.type.number",value:18,match:["18",null]},{type:"Twig.expression.type.operator.binary",value:"<",precidence:8,associativity:"leftToRight",operator:"<"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:"ai1ec-business-hour"}]}},{type:"raw",value:'"\n style="top: '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"h",match:["h"]},{type:"Twig.expression.type.number",value:60,match:["60",null]},{type:"Twig.expression.type.operator.binary",value:"*",precidence:5,associativity:"leftToRight",operator:"*"}]},{type:"raw",value:'px;">\n <div>\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"hour",match:["hour"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </div>\n </div>\n "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"quarter",expression:[{type:"Twig.expression.type.number",value:1,match:["1",null]},{type:"Twig.expression.type.number",value:3,match:["3",null]},{type:"Twig.expression.type.operator.binary",value:"..",precidence:20,associativity:"leftToRight",operator:".."}],output:[{type:"raw",value:' <div class="ai1ec-quarter-marker"\n style="top: '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"h",match:["h"]},{type:"Twig.expression.type.number",value:60,match:["60",null]},{type:"Twig.expression.type.operator.binary",value:"*",precidence:5,associativity:"leftToRight",operator:"*"},{type:"Twig.expression.type.variable",value:"quarter",match:["quarter"]},{type:"Twig.expression.type.number",value:15,match:["15",null]},{type:"Twig.expression.type.operator.binary",value:"*",precidence:5,associativity:"leftToRight",operator:"*"},{type:"Twig.expression.type.operator.binary",value:"+",precidence:6,associativity:"leftToRight",operator:"+"}]},{type:"raw",value:'px;"></div>\n '}]}},{type:"raw",value:" "}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"today"}],output:[{type:"raw",value:' <div class="ai1ec-now-marker" style="top: '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"now_top",match:["now_top"]}]},{type:"raw",value:'px;">\n <div>\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_now_label",match:["text_now_label"]}]},{type:"raw",value:" "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"now_text",match:["now_text"]}]},{type:"raw",value:"\n </div>\n </div>\n "}]}},{type:"raw",value:" </div>\n "}]}},{type:"raw",value:'\n <div class="ai1ec-day">\n\n '},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"day_array",expression:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"notallday"}],output:[{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.set",key:"event",expression:[{type:"Twig.expression.type.variable",value:"day_array",match:["day_array"]},{type:"Twig.expression.type.key.period",key:"event"}]}},{type:"raw",value:' <a href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"data_type_events",match:["data_type_events"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n data-instance-id="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_id"}]},{type:"raw",value:'"\n class="ai1ec-event-container ai1ec-load-event ai1ec-popup-trigger\n ai1ec-event-id-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_id"}]},{type:"raw",value:"\n ai1ec-event-instance-id-"},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_id"}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"start_truncated"}],output:[{type:"raw",value:"ai1ec-start-truncated"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"end_truncated"}],output:[{type:"raw",value:"ai1ec-end-truncated"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"is_multiday"}],output:[{type:"raw",value:"ai1ec-multiday"}]}},{type:"raw",value:'"\n style="top: '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day_array",match:["day_array"]},{type:"Twig.expression.type.key.period",key:"top"}]},{type:"raw",value:"px;\n height: "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day_array",match:["day_array"]},{type:"Twig.expression.type.key.period",key:"height"}]},{type:"raw",value:"px;\n left: "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day_array",match:["day_array"]},{type:"Twig.expression.type.key.period",key:"indent"},{type:"Twig.expression.type.variable",value:"indent_multiplier",match:["indent_multiplier"]},{type:"Twig.expression.type.operator.binary",value:"*",precidence:5,associativity:"leftToRight",operator:"*"},{type:"Twig.expression.type.variable",value:"indent_offset",match:["indent_offset"]},{type:"Twig.expression.type.operator.binary",value:"+",precidence:6,associativity:"leftToRight",operator:"+"}]},{type:"raw",value:"px;\n "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"color_style"}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.set",key:"faded_color",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"faded_color"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.set",key:"rgba_color",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"rgba_color"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"faded_color",match:["faded_color"]}],output:[{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.set",key:"rgba1",expression:[{type:"Twig.expression.type.variable",value:"rgba_color",match:["rgba_color"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"0.05"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.set",key:"rgba3",expression:[{type:"Twig.expression.type.variable",value:"rgba_color",match:["rgba_color"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"0.3"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]}},{type:"raw",value:" border: 1px solid "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"faded_color",match:["faded_color"]}]},{type:"raw",value:";\n border-color: "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba_color",match:["rgba_color"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"0.5"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:";\n background-image: -webkit-linear-gradient( top, "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba1",match:["rgba1"]}]},{type:"raw",value:", "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba3",match:["rgba3"]}]},{type:"raw",value:" 50px );\n background-image: -moz-linear-gradient( top, "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba1",match:["rgba1"]}]},{type:"raw",value:", "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba3",match:["rgba3"]}]},{type:"raw",value:" 50px );\n background-image: -ms-linear-gradient( top, "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba1",match:["rgba1"]}]},{type:"raw",value:", "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba3",match:["rgba3"]}]},{type:"raw",value:" 50px );\n background-image: -o-linear-gradient( top, "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba1",match:["rgba1"]}]},{type:"raw",value:", "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba3",match:["rgba3"]}]},{type:"raw",value:" 50px );\n background-image: linear-gradient( top, "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba1",match:["rgba1"]}]},{type:"raw",value:", "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"rgba3",match:["rgba3"]}]},{type:"raw",value:" 50px );\n "}]}},{type:"raw",value:' ">\n\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"start_truncated"}],output:[{type:"raw",value:' <div class="ai1ec-start-truncator">◤</div>\n '}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"end_truncated"}],output:[{type:"raw",value:' <div class="ai1ec-end-truncator">◢</div>\n '}]}},{type:"raw",value:'\n <div class="ai1ec-event">\n <span class="ai1ec-event-time">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"short_start_time"}]},{type:"raw",value:'\n </span>\n <span class="ai1ec-event-title">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_title"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_location_in_title",match:["show_location_in_title"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <span class="ai1ec-event-location"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_venue_separator",match:["text_venue_separator"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:"</span>\n "}]}},{type:"raw",value:' </span>\n </div>\n\n </a>\n\n <div class="ai1ec-popover ai1ec-popup ai1ec-popup-in-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"type",match:["type"]}]},{type:"raw",value:'-view">\n\n '},{type:"logic",token:{type:"Twig.logic.type.set",key:"category_colors",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"category_colors"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"category_colors",match:["category_colors"]}],output:[{type:"raw",value:' <div class="ai1ec-color-swatches">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"category_colors",match:["category_colors"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:' \n <span class="ai1ec-popup-title">\n <a href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_title"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</a>\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_location_in_title",match:["show_location_in_title"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <span class="ai1ec-event-location"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_venue_separator",match:["text_venue_separator"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:"</span>\n "}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"is_ticket_button_enabled",match:["is_ticket_button_enabled"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <a class="ai1ec-pull-right ai1ec-btn ai1ec-btn-primary ai1ec-btn-xs\n ai1ec-buy-tickets" target="_blank"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url_label"}]},{type:"raw",value:"</a>\n "}]}},{type:"raw",value:" </span>\n \n "},{type:"logic",token:{type:"Twig.logic.type.set",key:"edit_post_link",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"edit_post_link"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"edit_post_link",match:["edit_post_link"]}],output:[{type:"raw",value:' <a class="post-edit-link" href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"edit_post_link",match:["edit_post_link"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'">\n <i class="ai1ec-fa ai1ec-fa-pencil"></i> '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_edit",match:["text_edit"]}]},{type:"raw",value:"\n </a>\n "}]}},{type:"raw",value:' \n <div class="ai1ec-event-time">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"popup_timespan"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </div>\n \n "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"avatar"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_excerpt"}],output:[{type:"raw",value:' <div class="ai1ec-popup-excerpt">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_excerpt"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:" \n </div>\n\n\n "}]}},{type:"raw",value:" "},{type:"raw",value:"\n </div>\n \n </td>\n "}]}},{type:"raw",value:" "},{type:"raw",value:'\n </tr>\n </tbody>\n\n</table>\n\n<div class="ai1ec-pull-left">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"pagination_links",match:["pagination_links"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n"}],precompiled:!0}),n});
|
public/js/pages/add_new_event.js
CHANGED
@@ -139,4 +139,4 @@ CONDITIONS OF ANY KIND, either express or implied. See the Apache License and th
|
|
139 |
the specific language governing permissions and limitations under the Apache License and the GPL License.
|
140 |
*/
|
141 |
|
142 |
-
timely.define("domReady",[],function(){function u(e){var t;for(t=0;t<e.length;t++)e[t](n)}function a(){var e=r;t&&e.length&&(r=[],u(e))}function f(){t||(t=!0,o&&clearInterval(o),a())}function c(e){return t?e(n):r.push(e),c}var e=typeof window!="undefined"&&window.document,t=!e,n=e?document:null,r=[],i,s,o;if(e){if(document.addEventListener)document.addEventListener("DOMContentLoaded",f,!1),window.addEventListener("load",f,!1);else if(window.attachEvent){window.attachEvent("onload",f),s=document.createElement("div");try{i=window.frameElement===null}catch(l){}s.doScroll&&i&&window.external&&(o=setInterval(function(){try{s.doScroll(),f()}catch(e){}},30))}(document.readyState==="complete"||document.readyState==="interactive")&&f()}return c.version="2.0.0",c.load=function(e,t,n,r){r.isBuild?n(null):c(n)},c}),timely.define("external_libs/bootstrap/tab",["jquery_timely"],function(e){var t=function(t){this.element=e(t)};t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.ai1ec-dropdown-menu)"),r=t.data("target");r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("ai1ec-active"))return;var i=n.find(".ai1ec-active:last a")[0],s=e.Event("show.bs.tab",{relatedTarget:i});t.trigger(s);if(s.isDefaultPrevented())return;var o=e(r);this.activate(t.parent("li"),n),this.activate(o,o.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:i})})},t.prototype.activate=function(t,n,r){function o(){i.removeClass("ai1ec-active").find("> .ai1ec-dropdown-menu > .ai1ec-active").removeClass("ai1ec-active"),t.addClass("ai1ec-active"),s?(t[0].offsetWidth,t.addClass("ai1ec-in")):t.removeClass("ai1ec-fade"),t.parent(".ai1ec-dropdown-menu")&&t.closest("li.ai1ec-dropdown").addClass("ai1ec-active"),r&&r()}var i=n.find("> .ai1ec-active"),s=r&&e.support.transition&&i.hasClass("ai1ec-fade");s?i.one(e.support.transition.end,o).emulateTransitionEnd(150):o(),i.removeClass("ai1ec-in")};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tab");i||r.data("bs.tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.bs.tab.data-api",'[data-toggle="ai1ec-tab"], [data-toggle="ai1ec-pill"]',function(t){t.preventDefault(),e(this).tab("show")})}),timely.define("libs/utils",["jquery_timely","external_libs/bootstrap/tab"],function(e){var t=function(){return{is_float:function(e){return!isNaN(parseFloat(e))},is_valid_coordinate:function(e,t){var n=t?90:180;return this.is_float(e)&&Math.abs(e)<n},convert_comma_to_dot:function(e){return e.replace(",",".")},field_has_value:function(t){var n="#"+t,r=e(n),i=!1;return r.length===1&&(i=e.trim(r.val())!==""),i},make_alert:function(t,n,r){var i="";switch(n){case"error":i="ai1ec-alert ai1ec-alert-danger";break;case"success":i="ai1ec-alert ai1ec-alert-success";break;default:i="ai1ec-alert"}var s=e("<div />",{"class":i,html:t});if(!r){var o=e("<button>",{type:"button","class":"ai1ec-close","data-dismiss":"ai1ec-alert",text:"×"});s.prepend(o)}return s},get_ajax_url:function(){return typeof window.ajaxurl=="undefined"?"http://localhost/wordpress/wp-admin/admin-ajax.php":window.ajaxurl},isUrl:function(e){var t=/(http|https|webcal):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)},isValidEmail:function(e){var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)},activate_saved_tab_on_page_load:function(t){null===t||undefined===t?e("ul.ai1ec-nav a:first").tab("show"):e("ul.ai1ec-nav a[href="+t+"]").tab("show")}}}();return t}),timely.define("scripts/add_new_event/event_location/input_coordinates_utility_functions",["jquery_timely","ai1ec_config","libs/utils"],function(e,t,n){var r=function(){e("#ai1ec_input_coordinates:checked").length>0&&e("#ai1ec_table_coordinates input.coordinates").each(function(){this.value=n.convert_comma_to_dot(this.value)})},i=function(t,n){var r=e("<div />",{text:n,"class":"ai1ec-error"});e(t).after(r)},s=function(t,n){t.target.id==="post"&&(t.stopImmediatePropagation(),t.preventDefault(),e("#publish").removeClass("button-primary-disabled"),e("#publish").siblings(".spinner").css("visibility","hidden")),e(n).focus()},o=function(){var t=n.field_has_value("ai1ec_address"),r=!0;return e(".coordinates").each(function(){var e=n.field_has_value(this.id);e||(r=!1)}),t||r},u=function(n){var r=!0,o=!1;return e("#ai1ec_input_coordinates:checked").length>0&&(e("div.ai1ec-error").remove(),e("#ai1ec_table_coordinates input.coordinates").each(function(){var n=e(this).hasClass("latitude"),s=n?t.error_message_not_entered_lat:t.error_message_not_entered_long;this.value===""&&(r=!1,o===!1&&(o=this),i(this,s))})),r===!1&&s(n,o),r},a=function(r){if(e("#ai1ec_input_coordinates:checked").length===1){e("div.ai1ec-error").remove();var o=!0,u=!1,a=!1;return e("#ai1ec_table_coordinates input.coordinates").each(function(){if(this.value===""){a=!0;return}var r=e(this).hasClass("latitude"),s=r?t.error_message_not_valid_lat:t.error_message_not_valid_long;n.is_valid_coordinate(this.value,r)||(o=!1,u===!1&&(u=this),i(this,s))}),o===!1&&s(r,u),a===!0&&(o=!1),o}};return{ai1ec_convert_commas_to_dots_for_coordinates:r,ai1ec_show_error_message_after_element:i,check_if_address_or_coordinates_are_set:o,ai1ec_check_lat_long_fields_filled_when_publishing_event:u,ai1ec_check_lat_long_ok_for_search:a}}),timely.define("external_libs/jquery.autocomplete_geomod",["jquery_timely"],function(e){e.fn.extend({autocomplete:function(t,n){var r=typeof t=="string";return n=e.extend({},e.Autocompleter.defaults,{url:r?t:null,data:r?null:t,delay:r?e.Autocompleter.defaults.delay:10,max:n&&!n.scroll?10:150},n),n.highlight=n.highlight||function(e){return e},n.formatMatch=n.formatMatch||n.formatItem,this.each(function(){new e.Autocompleter(this,n)})},result:function(e){return this.bind("result",e)},search:function(e){return this.trigger("search",[e])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(e){return this.trigger("setOptions",[e])},unautocomplete:function(){return this.trigger("unautocomplete")}}),e.Autocompleter=function(t,n){function d(){var r=h.selected();if(!r)return!1;var s=r.result;o=s;if(n.multiple){var u=m(i.val());if(u.length>1){var a=n.multipleSeparator.length,f=e(t).selection().start,l,c=0;e.each(u,function(e,t){c+=t.length;if(f<=c)return l=e,!1;c+=a}),u[l]=s,s=u.join(n.multipleSeparator)}s+=n.multipleSeparator}return i.val(s),w(),i.trigger("result",[r.data,r.value]),!0}function v(e,t){if(f==r.DEL){h.hide();return}var s=i.val();if(!t&&s==o)return;o=s,s=g(s),s.length>=n.minChars?(i.addClass(n.loadingClass),n.matchCase||(s=s.toLowerCase()),S(s,E,w)):(T(),h.hide())}function m(t){return t?n.multiple?e.map(t.split(n.multipleSeparator),function(n){return e.trim(t).length?e.trim(n):null}):[e.trim(t)]:[""]}function g(r){if(!n.multiple)return r;var i=m(r);if(i.length==1)return i[0];var s=e(t).selection().start;return s==r.length?i=m(r):i=m(r.replace(r.substring(s),"")),i[i.length-1]}function y(s,u){n.autoFill&&g(i.val()).toLowerCase()==s.toLowerCase()&&f!=r.BACKSPACE&&(i.val(i.val()+u.substring(g(o).length)),e(t).selection(o.length,o.length+u.length))}function b(){clearTimeout(s),s=setTimeout(w,200)}function w(){var e=h.visible();h.hide(),clearTimeout(s),T(),n.mustMatch&&i.search(function(e){if(!e)if(n.multiple){var t=m(i.val()).slice(0,-1);i.val(t.join(n.multipleSeparator)+(t.length?n.multipleSeparator:""))}else i.val(""),i.trigger("result",null)})}function E(e,t){t&&t.length&&a?(T(),h.display(t,e),y(e,t[0].value),h.show()):w()}function S(r,i,s){n.matchCase||(r=r.toLowerCase());var o=u.load(r);if(o&&o.length)i(r,o);else if(n.geocoder){var a=g(r),f={address:a};n.region&&(f.region=n.region),n.geocoder.geocode(f,function(e,t){var s=n.parse(e,t,a);u.add(r,s),i(r,s)})}else if(typeof n.url=="string"&&n.url.length>0){var l={timestamp:+(new Date)};e.each(n.extraParams,function(e,t){l[e]=typeof t=="function"?t():t}),e.ajax({mode:"abort",port:"autocomplete"+t.name,dataType:n.dataType,url:n.url,data:e.extend({q:g(r),limit:n.max},l),success:function(e){var t=n.parse&&n.parse(e)||x(e);u.add(r,t),i(r,t)}})}else h.emptyList(),s(r)}function x(t){var r=[],i=t.split("\n");for(var s=0;s<i.length;s++){var o=e.trim(i[s]);o&&(o=o.split("|"),r[r.length]={data:o,value:o[0],result:n.formatResult&&n.formatResult(o,o[0])||o[0]})}return r}function T(){i.removeClass(n.loadingClass)}var r={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8},i=e(t).attr("autocomplete","off").addClass(n.inputClass),s,o="",u=e.Autocompleter.Cache(n),a=0,f,l=navigator.userAgent.match(/opera/i),c={mouseDownOnSelect:!1},h=e.Autocompleter.Select(n,t,d,c),p;l&&e(t.form).bind("submit.autocomplete",function(){if(p)return p=!1,!1}),i.bind((l?"keypress":"keydown")+".autocomplete",function(t){a=1,f=t.keyCode;switch(t.keyCode){case r.UP:t.preventDefault(),h.visible()?h.prev():v(0,!0);break;case r.DOWN:t.preventDefault(),h.visible()?h.next():v(0,!0);break;case r.PAGEUP:t.preventDefault(),h.visible()?h.pageUp():v(0,!0);break;case r.PAGEDOWN:t.preventDefault(),h.visible()?h.pageDown():v(0,!0);break;case n.multiple&&e.trim(n.multipleSeparator)==","&&r.COMMA:case r.TAB:case r.RETURN:if(d())return t.preventDefault(),p=!0,!1;break;case r.ESC:h.hide();break;default:clearTimeout(s),s=setTimeout(v,n.delay)}}).focus(function(){a++}).blur(function(){a=0,c.mouseDownOnSelect||b()}).click(function(){a++>1&&!h.visible()&&v(0,!0)}).bind("search",function(){function n(e,n){var r;if(n&&n.length)for(var s=0;s<n.length;s++)if(n[s].result.toLowerCase()==e.toLowerCase()){r=n[s];break}typeof t=="function"?t(r):i.trigger("result",r&&[r.data,r.value])}var t=arguments.length>1?arguments[1]:null;e.each(m(i.val()),function(e,t){S(t,n,n)})}).bind("flushCache",function(){u.flush()}).bind("setOptions",function(){e.extend(n,arguments[1]),"data"in arguments[1]&&u.populate()}).bind("unautocomplete",function(){h.unbind(),i.unbind(),e(t.form).unbind(".autocomplete")})},e.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:!1,matchSubset:!0,matchContains:!1,cacheLength:10,max:100,mustMatch:!1,extraParams:{},selectFirst:!0,formatItem:function(e){return e[0]},formatMatch:null,autoFill:!1,width:0,multiple:!1,multipleSeparator:", ",highlight:function(e,t){return e.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+t.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:!0,scrollHeight:180},e.Autocompleter.Cache=function(t){function i(e,n){t.matchCase||(e=e.toLowerCase());var r=e.indexOf(n);return t.matchContains=="word"&&(r=e.toLowerCase().search("\\b"+n.toLowerCase())),r==-1?!1:r==0||t.matchContains}function s(e,i){r>t.cacheLength&&u(),n[e]||r++,n[e]=i}function o(){if(!t.data)return!1;var n={},r=0;t.url||(t.cacheLength=1),n[""]=[];for(var i=0,o=t.data.length;i<o;i++){var u=t.data[i];u=typeof u=="string"?[u]:u;var a=t.formatMatch(u,i+1,t.data.length);if(a===!1)continue;var f=a.charAt(0).toLowerCase();n[f]||(n[f]=[]);var l={value:a,data:u,result:t.formatResult&&t.formatResult(u)||a};n[f].push(l),r++<t.max&&n[""].push(l)}e.each(n,function(e,n){t.cacheLength++,s(e,n)})}function u(){n={},r=0}var n={},r=0;return setTimeout(o,25),{flush:u,add:s,populate:o,load:function(s){if(!t.cacheLength||!r)return null;if(!t.url&&t.matchContains){var o=[];for(var u in n)if(u.length>0){var a=n[u];e.each(a,function(e,t){i(t.value,s)&&o.push(t)})}return o}if(n[s])return n[s];if(t.matchSubset)for(var f=s.length-1;f>=t.minChars;f--){var a=n[s.substr(0,f)];if(a){var o=[];return e.each(a,function(e,t){i(t.value,s)&&(o[o.length]=t)}),o}}return null}}},e.Autocompleter.Select=function(t,n,r,i){function p(){if(!l)return;c=e("<div/>").hide().addClass(t.resultsClass).css("position","absolute").appendTo(document.body),h=e("<ul/>").appendTo(c).mouseover(function(t){d(t).nodeName&&d(t).nodeName.toUpperCase()=="LI"&&(u=e("li",h).removeClass(s.ACTIVE).index(d(t)),e(d(t)).addClass(s.ACTIVE))}).click(function(t){return e(d(t)).addClass(s.ACTIVE),r(),n.focus(),!1}).mousedown(function(){i.mouseDownOnSelect=!0}).mouseup(function(){i.mouseDownOnSelect=!1}),t.width>0&&c.css("width",t.width),l=!1}function d(e){var t=e.target;while(t&&t.tagName!="LI")t=t.parentNode;return t?t:[]}function v(e){o.slice(u,u+1).removeClass(s.ACTIVE),m(e);var n=o.slice(u,u+1).addClass(s.ACTIVE);if(t.scroll){var r=0;o.slice(0,u).each(function(){r+=this.offsetHeight}),r+n[0].offsetHeight-h.scrollTop()>h[0].clientHeight?h.scrollTop(r+n[0].offsetHeight-h.innerHeight()):r<h.scrollTop()&&h.scrollTop(r)}}function m(e){u+=e,u<0?u=o.size()-1:u>=o.size()&&(u=0)}function g(e){return t.max&&t.max<e?t.max:e}function y(){h.empty();var n=g(a.length);for(var r=0;r<n;r++){if(!a[r])continue;var i=t.formatItem(a[r].data,r+1,n,a[r].value,f);if(i===!1)continue;var l=e("<li/>").html(t.highlight(i,f)).addClass(r%2==0?"ac_even":"ac_odd").appendTo(h)[0];e.data(l,"ac_data",a[r])}o=h.find("li"),t.selectFirst&&(o.slice(0,1).addClass(s.ACTIVE),u=0),e.fn.bgiframe&&h.bgiframe()}var s={ACTIVE:"ac_over"},o,u=-1,a,f="",l=!0,c,h;return{display:function(e,t){p(),a=e,f=t,y()},next:function(){v(1)},prev:function(){v(-1)},pageUp:function(){u!=0&&u-8<0?v(-u):v(-8)},pageDown:function(){u!=o.size()-1&&u+8>o.size()?v(o.size()-1-u):v(8)},hide:function(){c&&c.hide(),o&&o.removeClass(s.ACTIVE),u=-1},visible:function(){return c&&c.is(":visible")},current:function(){return this.visible()&&(o.filter("."+s.ACTIVE)[0]||t.selectFirst&&o[0])},show:function(){var r=e(n).offset();c.css({width:typeof t.width=="string"||t.width>0?t.width:e(n).width(),top:r.top+n.offsetHeight,left:r.left}).show();if(t.scroll){h.scrollTop(0),h.css({maxHeight:t.scrollHeight,overflow:"auto"});if(navigator.userAgent.match(/msie/i)&&typeof document.body.style.maxHeight=="undefined"){var i=0;o.each(function(){i+=this.offsetHeight});var s=i>t.scrollHeight;h.css("height",s?t.scrollHeight:i),s||o.width(h.width()-parseInt(o.css("padding-left"))-parseInt(o.css("padding-right")))}}},selected:function(){var t=o&&o.filter("."+s.ACTIVE).removeClass(s.ACTIVE);return t&&t.length&&e.data(t[0],"ac_data")},emptyList:function(){h&&h.empty()},unbind:function(){c&&c.remove()}}},e.fn.selection=function(e,t){if(e!==undefined)return this.each(function(){if(this.createTextRange){var n=this.createTextRange();t===undefined||e==t?(n.move("character",e),n.select()):(n.collapse(!0),n.moveStart("character",e),n.moveEnd("character",t),n.select())}else this.setSelectionRange?this.setSelectionRange(e,t):this.selectionStart&&(this.selectionStart=e,this.selectionEnd=t)});var n=this[0];if(n.createTextRange){var r=document.selection.createRange(),i=n.value,s="<->",o=r.text.length;r.text=s;var u=n.value.indexOf(s);return n.value=i,this.selection(u,u+o),{start:u,end:u+o}}if(n.selectionStart!==undefined)return{start:n.selectionStart,end:n.selectionEnd}}}),timely.define("external_libs/geo_autocomplete",["jquery_timely","external_libs/jquery.autocomplete_geomod"],function(e){e.fn.extend({geo_autocomplete:function(t,n){return options=e.extend({},e.Autocompleter.defaults,{geocoder:t,mapwidth:100,mapheight:100,maptype:"terrain",mapkey:"ABQIAAAAbnvDoAoYOSW2iqoXiGTpYBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQNumU68AwGqjbSNF9YO8NokKst8w",mapsensor:!1,parse:function(t,n,r){var i=[];return t&&n&&n=="OK"&&e.each(t,function(t,n){if(n.geometry&&n.geometry.viewport){var s=n.formatted_address.split(","),o=s[0];e.each(s,function(t,n){if(n.toLowerCase().indexOf(r.toLowerCase())!=-1)return o=e.trim(n),!1}),i.push({data:n,value:o,result:o})}}),i},formatItem:function(e,t,n,r){var i="https://maps.google.com/maps/api/staticmap?visible="+e.geometry.viewport.getSouthWest().toUrlValue()+"|"+e.geometry.viewport.getNorthEast().toUrlValue()+"&size="+options.mapwidth+"x"+options.mapheight+"&maptype="+options.maptype+"&key="+options.mapkey+"&sensor="+(options.mapsensor?"true":"false"),s=e.formatted_address.replace(/,/gi,",<br/>");return'<img src="'+i+'" width="'+options.mapwidth+'" height="'+options.mapheight+'" /> '+s+'<br clear="both"/>'}},n),options.highlight=options.highlight||function(e){return e},options.formatMatch=options.formatMatch||options.formatItem,options.resultsClass="ai1ec-geo-ac-results-not-ready",this.each(function(){e(this).one("focus",function(){var t=setInterval(function(){var n=e(".ai1ec-geo-ac-results-not-ready");n.length&&(n.removeClass("ai1ec-geo-ac-results-not-ready").addClass("ai1ec-geo-ac-results").children("ul").addClass("ai1ec-dropdown-menu"),clearInterval(t))},500)}),new e.Autocompleter(this,options)})}})}),timely.define("scripts/add_new_event/event_location/gmaps_helper",["jquery_timely","domReady","ai1ec_config","scripts/add_new_event/event_location/input_coordinates_utility_functions","external_libs/jquery.autocomplete_geomod","external_libs/geo_autocomplete"],function(e,t,n,r){var i,s,o,u,a,f,l=function(t){e("input.longitude").val(t.latLng.lng()),e("input.latitude").val(t.latLng.lat()),e("#ai1ec_input_coordinates:checked").length===0&&e("#ai1ec_input_coordinates").trigger("click")},c=function(){!navigator.geolocation||navigator.geolocation.getCurrentPosition(function(e){var t=r.check_if_address_or_coordinates_are_set();if(t===!1){var n=e.coords.latitude,i=e.coords.longitude;s=new google.maps.LatLng(n,i),a.setPosition(s),u.setCenter(s),u.setZoom(15),f=e}})},h=function(){n.disable_autocompletion||e("#ai1ec_address").geo_autocomplete(new google.maps.Geocoder,{selectFirst:!1,minChars:3,cacheLength:50,width:300,scroll:!0,scrollHeight:330,region:n.region}).result(function(e,t){t&&d(t)}).change(function(){if(e(this).val().length>0){var t=e(this).val();i.geocode({address:t,region:n.region},function(e,t){t===google.maps.GeocoderStatus.OK&&d(e[0])})}})},p=function(){i=new google.maps.Geocoder,s=new google.maps.LatLng(9.965,-83.327),o={zoom:0,mapTypeId:google.maps.MapTypeId.ROADMAP,center:s},t(function(){e("#ai1ec_map_canvas").length>0&&(u=new google.maps.Map(e("#ai1ec_map_canvas").get(0),o),a=new google.maps.Marker({map:u,draggable:!0}),google.maps.event.addListener(a,"dragend",l),a.setPosition(s),c(),h(),m())})},d=function(t){u.setCenter(t.geometry.location),u.setZoom(15),a.setPosition(t.geometry.location),e("#ai1ec_address").val(t.formatted_address),e("#ai1ec_latitude").val(t.geometry.location.lat()),e("#ai1ec_longitude").val(t.geometry.location.lng()),e("#ai1ec_input_coordinates").is(":checked")||e("#ai1ec_input_coordinates").click();var n="",r="",i="",s=0,o=0,f="",l;for(var c=0;c<t.address_components.length;c++)switch(t.address_components[c].types[0]){case"street_number":n=t.address_components[c].long_name;break;case"route":r=t.address_components[c].long_name;break;case"locality":i=t.address_components[c].long_name;break;case"administrative_area_level_1":f=t.address_components[c].long_name;break;case"postal_code":s=t.address_components[c].long_name;break;case"country":l=t.address_components[c].short_name,o=t.address_components[c].long_name}var h=n.length>0?n+" ":"";h+=r.length>0?r:"",s=s!==0?s:"",e("#ai1ec_city").val(i),e("#ai1ec_province").val(f),e("#ai1ec_postal_code").val(s),e("#ai1ec_country").val(o),e("#ai1ec_country_short").val(l)},v=function(){var t=parseFloat(e("input.latitude").val()),n=parseFloat(e("input.longitude").val()),r=new google.maps.LatLng(t,n);u.setCenter(r),u.setZoom(15),a.setPosition(r)},m=function(){e("#ai1ec_input_coordinates:checked").length===0?(e("#ai1ec_table_coordinates").css({visibility:"hidden"}),e("#ai1ec_address").change()):v()},g=function(){return a},y=function(){return f};return{init_gmaps:p,ai1ec_update_map_from_coordinates:v,get_marker:g,get_position:y}}),timely.define("scripts/add_new_event/event_location/input_coordinates_event_handlers",["jquery_timely","scripts/add_new_event/event_location/input_coordinates_utility_functions","scripts/add_new_event/event_location/gmaps_helper","ai1ec_config"],function(e,t,n,r){var i=function(t){e(this).is(":checked")?e(".ai1ec_box_map").addClass("ai1ec_box_map_visible").hide().slideDown("fast"):e(".ai1ec_box_map").slideUp("fast")},s=function(t){this.checked===!0?e("#ai1ec_table_coordinates").css({visibility:"visible"}):(e("#ai1ec_table_coordinates").css({visibility:"hidden"}),e("#ai1ec_table_coordinates input").val(""),e("div.ai1ec-error").remove())},o=function(e){t.ai1ec_convert_commas_to_dots_for_coordinates();var r=t.ai1ec_check_lat_long_ok_for_search(e);r===!0&&n.ai1ec_update_map_from_coordinates()};return{toggle_visibility_of_google_map_on_click:i,toggle_visibility_of_coordinate_fields_on_click:s,update_map_from_coordinates_on_blur:o}}),timely.define("scripts/add_new_event/event_date_time/date_time_utility_functions",["jquery_timely","ai1ec_config","libs/utils"],function(e,t,n){var r=n.get_ajax_url(),i=function(t,n,r,i,s,o){e(t).val(i),e("#ai1ec_repeat_box").modal("hide");var u=e.trim(e(n).text());u.lastIndexOf(":")===-1&&(u=u.substring(0,u.length-3),e(n).text(u+":")),e(s).attr("disabled",!1),e(r).fadeOut("fast",function(){e(this).text(o.message),e(this).fadeIn("fast")})},s=function(t,n,r,i){e("#ai1ec_repeat_box .ai1ec-alert-danger").text(r.message).removeClass("ai1ec-hide"),e(i).attr("disabled",!1),e(t).val("");var s=e.trim(e(n).text());s.lastIndexOf("...")===-1&&(s=s.substring(0,s.length-1),e(n).text(s+"...")),e(this).closest("tr").find(".ai1ec_rule_text").text()===""&&e(t).siblings("input:checkbox").removeAttr("checked")},o=function(t,n,r,i,s){e(document).on("click",t,function(){if(!e(n).is(":checked")){e(n).attr("checked",!0);var t=e.trim(e(r).text());t=t.substring(0,t.length-3),e(r).text(t+":")}return l(i,s),!1})},u=function(t,n,r,i,s){e(t).click(function(){if(e(this).is(":checked"))this.id==="ai1ec_repeat"&&e("#ai1ec_exclude").removeAttr("disabled"),l(i,s);else{this.id==="ai1ec_repeat"&&e("#ai1ec_exclude").attr("disabled",!0),e(n).text("");var t=e.trim(e(r).text());t=t.substring(0,t.length-1),e(r).text(t+"...")}})},a=function(t,n,r){if(e.trim(e(t).text())===""){e(n).removeAttr("checked"),e("#ai1ec_repeat").is(":checked")||e("#ai1ec_exclude").attr("disabled",!0);var i=e.trim(e(r).text());i.lastIndexOf("...")===-1&&(i=i.substring(0,i.length-1),e(r).text(i+"..."))}},f=function(){e("#ai1ec_count, #ai1ec_daily_count, #ai1ec_weekly_count, #ai1ec_monthly_count, #ai1ec_yearly_count").rangeinput({css:{input:"ai1ec-range",slider:"ai1ec-slider",progress:"ai1ec-progress",handle:"ai1ec-handle"}});var n={start_date_input:"#ai1ec_until-date-input",start_time:"#ai1ec_until-time",date_format:t.date_format,month_names:t.month_names,day_names:t.day_names,week_start_day:t.week_start_day,twentyfour_hour:t.twentyfour_hour,now:new Date(t.now*1e3)};e.inputdate(n)},l=function(t,n){var i=e("#ai1ec_repeat_box"),s=e(".ai1ec-loading",i);i.modal({backdrop:"static"}),e.post(r,t,function(e){e.error?(window.alert(e.message),i.modal("hide")):(s.addClass("ai1ec-hide").after(e.message),typeof n=="function"&&n())},"json")};return{show_repeat_tabs:l,init_modal_widgets:f,click_on_modal_cancel:a,click_on_checkbox:u,click_on_ics_rule_text:o,repeat_form_error:s,repeat_form_success:i}}),timely.define("external_libs/jquery.calendrical_timespan",["jquery_timely"],function(e){function l(){var e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function c(e,t){return typeof e=="string"&&(e=new Date(e)),typeof t=="string"&&(t=new Date(t)),e.getUTCDate()===t.getUTCDate()&&e.getUTCMonth()===t.getUTCMonth()&&e.getUTCFullYear()===t.getUTCFullYear()?!0:!1}function h(e,t){if(e instanceof Date)return h(e.getUTCFullYear(),e.getUTCMonth());if(t==1){var n=e%4==0&&(e%100!=0||e%400==0);return n?29:28}return t==3||t==5||t==8||t==10?30:31}function p(e){return new Date(e.getTime()+864e5)}function d(e){return new Date(e.getTime()-864e5)}function v(e,t){return t==11?new Date(e+1,0,1):new Date(e,t+1,1)}function m(t,n,r,i){var s=i.monthNames.split(","),o=e("<thead />"),u=e("<tr />").appendTo(o);e("<th />").addClass("monthCell").append(e('<a href="javascript:;">«</a>').addClass("prevMonth").mousedown(function(e){g(t,r==0?n-1:n,r==0?11:r-1,i),e.preventDefault()})).appendTo(u),e("<th />").addClass("monthCell").attr("colSpan",5).append(e('<a href="javascript:;">'+s[r]+" "+n+"</a>").addClass("monthName")).appendTo(u),e("<th />").addClass("monthCell").append(e('<a href="javascript:;">»</a>').addClass("nextMonth").mousedown(function(){g(t,r==11?n+1:n,r==11?0:r+1,i)})).appendTo(u);var a=i.dayNames.split(","),f=parseInt(i.weekStartDay),l=[];for(var c=0,h=a.length;c<h;c++)l[c]=a[(c+f)%h];var p=e("<tr />").appendTo(o);return e.each(l,function(t,n){e("<td />").addClass("dayName").append(n).appendTo(p)}),o}function g(t,n,r,i){i=i||{};var s=parseInt(i.weekStartDay),o=i.today?i.today:l();o.setHours(0),o.setMinutes(0);var u=new Date(n,r,1),a=v(n,r),f=Math.abs(o.getTimezoneOffset());f!=0&&(o.setHours(o.getHours()+f/60),o.setMinutes(o.getMinutes()+f%60),u.setHours(u.getHours()+f/60),u.setMinutes(u.getMinutes()+f%60),a.setHours(a.getHours()+f/60),a.setMinutes(a.getMinutes()+f%60));var h=a.getUTCDay()-s;h<0?h=Math.abs(h)-1:h=6-h;for(var g=0;g<h;g++)a=p(a);var y=e("<table />");m(t,n,r,i).appendTo(y);var b=e("<tbody />").appendTo(y),w=e("<tr />"),E=u.getUTCDay()-s;E<0&&(E=7+E);for(var g=0;g<E;g++)u=d(u);while(u<=a){var S=e("<td />").addClass("day").append(e('<a href="javascript:;">'+u.getUTCDate()+"</a>").click(function(){var e=u;return function(){i&&i.selectDate&&i.selectDate(e)}}())).appendTo(w),x=c(u,o),T=i.selected&&c(i.selected,u);x&&S.addClass("today"),T&&S.addClass("selected"),x&&T&&S.addClass("today_selected"),u.getUTCMonth()!=r&&S.addClass("nonMonth");var N=u.getUTCDay();(N+1)%7==s&&(b.append(w),w=e("<tr />")),u=p(u)}w.children().length?b.append(w):w.remove(),t.empty().append(y)}function y(t,n){var r=n.selection&&f(n.selection);r&&(r.minute=Math.floor(r.minute/15)*15);var i=n.startTime&&n.startTime.hour*60+n.startTime.minute,s,o=e("<ul />");for(var a=0;a<24;a++)for(var l=0;l<60;l+=15){if(i&&i>a*60+l)continue;(function(){var t=u(a,l,n.isoTime),f=t;if(i!=null){var c=a*60+l-i;c<60?f+=" ("+c+" min)":c==60?f+=" (1 hr)":f+=" ("+Math.floor(c/60)+" hr "+c%60+" min)"}var h=e("<li />").append(e('<a href="javascript:;">'+f+"</a>").click(function(){n&&n.selectTime&&n.selectTime(t)}).mousemove(function(){e("li.selected",o).removeClass("selected")})).appendTo(o);!s&&a==n.defaultHour&&(s=h),r&&r.hour==a&&r.minute==l&&(h.addClass("selected"),s=h)})()}s&&setTimeout(function(){t[0].scrollTop=s[0].offsetTop-s.height()*2},0),t.empty().append(o)}function b(e){e.addClass("error").fadeOut("normal",function(){e.val(e.data("timespan.stored")).removeClass("error").fadeIn("fast")})}function w(){e(this).data("timespan.stored",this.value)}function E(t,n,r,i,a,f,l,c,h,p){r.val(r.data("timespan.initial_value")),f.val(f.data("timespan.initial_value")),l.get(0).checked=l.data("timespan.initial_value");var d=s(r,p,0,15);n.val(u(d.getUTCHours(),d.getUTCMinutes(),c)),t.val(o(d,h));var v=s(f,d.getTime(),1,15);a.val(u(v.getUTCHours(),v.getUTCMinutes(),c)),l.get(0).checked&&v.setUTCDate(v.getUTCDate()-1),i.val(o(v,h)),t.each(w),n.each(w),i.each(w),a.each(w),l.trigger("change.timespan"),e("#ai1ec_instant_event").trigger("change.timespan")}var t={us:{pattern:/([\d]{1,2})\/([\d]{1,2})\/([\d]{4}|[\d]{2})/,format:"m/d/y",order:"middleEndian",zeroPad:!1},iso:{pattern:/([\d]{4}|[\d]{2})-([\d]{1,2})-([\d]{1,2})/,format:"y-m-d",order:"bigEndian",zeroPad:!0},dot:{pattern:/([\d]{1,2}).([\d]{1,2}).([\d]{4}|[\d]{2})/,format:"d.m.y",order:"littleEndian",zeroPad:!1},def:{pattern:/([\d]{1,2})\/([\d]{1,2})\/([\d]{4}|[\d]{2})/,format:"d/m/y",order:"littleEndian",zeroPad:!1}},n=function(e){return e<10?"0"+e:e},r=function(e,t){typeof t=="undefined"&&(t=!1);var r=e.getUTCFullYear()+"-"+n(e.getUTCMonth()+1)+"-"+n(e.getUTCDate());return t&&(r+="T"+n(e.getUTCHours())+":"+n(e.getUTCMinutes())+":00"),r},i=function(e,t){var n=e.val(),r=null;if(n.length<4)r=new Date(t);else{r=new Date(n);var i=n.split("T"),s=i[0].split("-"),o=i[1].split(":");r.setUTCFullYear(s[0],s[1]-1,s[2]),r.setUTCHours(o[0],o[1],o[2],0)}return r},s=function(e,t,n,r){return t+=n*36e5,t-=t%(r*6e4),i(e,t)},o=function(e,n,r){var i,s,o;typeof t[n]=="undefined"&&(n="def"),typeof r=="undefined"&&(r=!1),!0===r?(i=e.getFullYear().toString(),s=(e.getMonth()+1).toString(),o=e.getDate().toString()):(i=e.getUTCFullYear().toString(),s=(e.getUTCMonth()+1).toString(),o=e.getUTCDate().toString()),t[n].zeroPad&&(s.length==1&&(s="0"+s),o.length==1&&(o="0"+o));var u=t[n].format;return u=u.replace("d",o),u=u.replace("m",s),u=u.replace("y",i),u},u=function(e,t,n){var r=t;t<10&&(r="0"+t);if(n){var i=e;return i<10&&(i="0"+e),i+":"+r}var i=e%12;i==0&&(i=12);var s=e<12?"am":"pm";return i+":"+r+s},a=function(e,n){typeof t[n]=="undefined"&&(n="def");var r=e.match(t[n].pattern);if(!r||r.length!=4)return Date("invalid");switch(t[n].order){case"bigEndian":var i=r[3],s=r[2],o=r[1];break;case"littleEndian":var i=r[1],s=r[2],o=r[3];break;case"middleEndian":var i=r[2],s=r[1],o=r[3];break;default:var i=r[1],s=r[2],o=r[3]}return o.length==2&&(o=(new Date).getUTCFullYear().toString().substr(0,2)+o),new Date(s+"/"+i+"/"+o+" GMT")},f=function(e){var t=t=/(\d+)\s*[:\-\.,]\s*(\d+)\s*(am|pm)?/i.exec(e);if(t&&t.length>=3){var n=Number(t[1]),r=Number(t[2]);return n==12&&t[3]&&(n-=12),t[3]&&t[3].toLowerCase()=="pm"&&(n+=12),{hour:n,minute:r}}return null};e.fn.calendricalDate=function(t){return t=t||{},t.padding=t.padding||4,t.monthNames=t.monthNames||"January,February,March,April,May,June,July,August,September,October,November,December",t.dayNames=t.dayNames||"S,M,T,W,T,F,S",t.weekStartDay=t.weekStartDay||0,this.each(function(){var n=e(this),r,i=!1;n.bind("focus",function(){if(r)return;var s=n.position(),u=n.css("padding-left");r=e("<div />").addClass("calendricalDatePopup").mouseenter(function(){i=!0}).mouseleave(function(){i=!1}).mousedown(function(e){e.preventDefault()}).css({position:"absolute",left:s.left,top:s.top+n.height()+t.padding*2}),n.after(r);var f=a(n.val(),t.dateFormat);f.getUTCFullYear()||(f=t.today?t.today:l()),g(r,f.getUTCFullYear(),f.getUTCMonth(),{today:t.today,selected:f,monthNames:t.monthNames,dayNames:t.dayNames,weekStartDay:t.weekStartDay,selectDate:function(e){i=!1,n.val(o(e,t.dateFormat)),r.remove(),r=null;if(t.endDate){var s=a(t.endDate.val(),t.dateFormat);s>=f&&t.endDate.val(o(new Date(e.getTime()+s.getTime()-f.getTime()),t.dateFormat))}}})}).blur(function(){if(i){r&&n.focus();return}if(!r)return;r.remove(),r=null})})},e.fn.calendricalDateRange=function(t){return this.length>=2&&(e(this[0]).calendricalDate(e.extend({endDate:e(this[1])},t)),e(this[1]).calendricalDate(t)),this},e.fn.calendricalDateRangeSingle=function(t){return this.length==1&&e(this).calendricalDate(t),this},e.fn.calendricalTime=function(t){return t=t||{},t.padding=t.padding||4,this.each(function(){var n=e(this),r,i=!1;n.bind("focus click",function(){if(r)return;var s=t.startTime;s&&t.startDate&&t.endDate&&!c(a(t.startDate.val()),a(t.endDate.val()))&&(s=!1);var o=n.position();r=e("<div />").addClass("calendricalTimePopup").mouseenter(function(){i=!0}).mouseleave(function(){i=!1}).mousedown(function(e){e.preventDefault()}).css({position:"absolute",left:o.left,top:o.top+n.height()+t.padding*2}),s&&r.addClass("calendricalEndTimePopup"),n.after(r);var u={selection:n.val(),selectTime:function(e){i=!1,n.val(e),r.remove(),r=null},isoTime:t.isoTime||!1,defaultHour:t.defaultHour!=null?t.defaultHour:8};s&&(u.startTime=f(t.startTime.val())),y(r,u)}).blur(function(){if(i){r&&n.focus();return}if(!r)return;r.remove(),r=null})})},e.fn.calendricalTimeRange=function(t){return this.length>=2&&(e(this[0]).calendricalTime(t),e(this[1]).calendricalTime(e.extend({startTime:e(this[0])},t))),this},e.fn.calendricalDateTimeRange=function(t){return this.length>=4&&(e(this[0]).calendricalDate(e.extend({endDate:e(this[2])},t)),e(this[1]).calendricalTime(t),e(this[2]).calendricalDate(t),e(this[3]).calendricalTime(e.extend({startTime:e(this[1]),startDate:e(this[0]),endDate:e(this[2])},t))),this};var S={allday:"#allday",start_date_input:"#start-date-input",start_time_input:"#start-time-input",start_time:"#start-time",end_date_input:"#end-date-input",end_time_input:"#end-time-input",end_time:"#end-time",twentyfour_hour:!1,date_format:"def",now:new Date},x={init:function(t){function C(){var e=a(s.val(),n.date_format).getTime()/1e3,t=f(l.val());e+=t.hour*3600+t.minute*60;var r=a(h.val(),n.date_format).getTime()/1e3,i=f(p.val());return r+=i.hour*3600+i.minute*60,r-e}function k(){var e=a(s.data("timespan.stored"),n.date_format),t=f(l.data("timespan.stored")),r=e.getTime()/1e3+t.hour*3600+t.minute*60+s.data("time_diff");return r=new Date(r*1e3),h.val(o(r,n.date_format)),p.val(u(r.getUTCHours(),r.getUTCMinutes(),n.twentyfour_hour)),!0}var n=e.extend({},S,t),i=e(n.allday),s=e(n.start_date_input),l=e(n.start_time_input),c=e(n.start_time),h=e(n.end_date_input),p=e(n.end_time_input),d=e(n.end_time),v=e("#ai1ec_instant_event"),m=h.add(p),g=s.add(n.end_date_input),y=l.add(n.end_time_input),x=s.add(n.start_time_input).add(n.end_date_input).add(n.end_time_input);x.bind("focus.timespan",w),v.bind("change.timespan",function(){this.checked?(m.closest("tr").fadeOut(),i.attr("disabled",!0)):(i.removeAttr("disabled"),m.closest("tr").fadeIn())});var T=new Date(n.now.getFullYear(),n.now.getMonth(),n.now.getDate()),N=!1;return i.bind("change.timespan",function(){this.checked?(y.fadeOut(),v.attr("disabled",!0)):(v.removeAttr("disabled"),y.fadeIn()),N||(N=!0,x.calendricalDateTimeRange({today:T,dateFormat:n.date_format,isoTime:n.twentyfour_hour,monthNames:n.month_names,dayNames:n.day_names,weekStartDay:n.week_start_day}))}).get().checked=!1,g.bind("blur.timespan",function(){var t=a(this.value,n.date_format);isNaN(t)?b(e(this)):(e(this).data("timespan.stored",this.value),e(this).val(o(t,n.date_format)))}),y.bind("blur.timespan",function(){var t=f(this.value);t?(e(this).data("timespan.stored",this.value),e(this).val(u(t.hour,t.minute,n.twentyfour_hour))):b(e(this))}),s.add(n.start_time_input).bind("focus.timespan",function(){s.data("time_diff",C())}).bind("blur.timespan",function(){s.data("time_diff")<0&&s.data("time_diff",900);var e=k()}),h.add(n.start_time_input).bind("blur.timespan",function(){if(C()<0){s.data("time_diff",900);var e=k()}}),s.closest("form").bind("submit.timespan",function(){var e=a(s.val(),n.date_format).getTime()/1e3;if(!isNaN(e)){if(!i.get(0).checked){var t=f(l.val());t?e+=t.hour*3600+t.minute*60:e=""}}else e="";e>0&&c.val(r(new Date(e*1e3),!0));var o=a(h.val(),n.date_format).getTime()/1e3;if(!isNaN(o))if(i.get(0).checked)o+=86400;else{var t=f(p.val());t?o+=t.hour*3600+t.minute*60:o=""}else o="";o>0&&d.val(r(new Date(o*1e3),!0))}),c.data("timespan.initial_value",c.val()),d.data("timespan.initial_value",d.val()),i.data("timespan.initial_value",i.get(0).checked),E(s,l,c,h,p,d,i,n.twentyfour_hour,n.date_format,n.now),this},reset:function(t){var n=e.extend({},S,t);return E(e(n.start_date_input),e(n.start_time_input),e(n.start_time),e(n.end_date_input),e(n.end_time_input),e(n.end_time),e(n.allday),n.twentyfour_hour,n.date_format,n.now),this},destroy:function(t){return t=e.extend({},S,t),e.each(t,function(t,n){e(n).unbind(".timespan")}),e(t.start_date_input).closest("form").unbind(".timespan"),this}};return e.timespan=function(t){if(x[t])return x[t].apply(this,Array.prototype.slice.call(arguments,1));if(typeof t=="object"||!t)return x.init.apply(this,arguments);e.error("Method "+t+" does not exist on jQuery.timespan")},{formatDate:o,parseDate:a}}),timely.define("external_libs/bootstrap/button",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r)};t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.is("input")?"val":"html",i=n.data();e+="Text",i.resetText||n.data("resetText",n[r]()),n[r](i[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass("ai1ec-"+t).attr(t,t):n.removeClass("ai1ec-"+t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="ai1ec-buttons"]'),t=!0;if(e.length){var n=this.$element.find("input");n.prop("type")==="radio"&&(n.prop("checked")&&this.$element.hasClass("ai1ec-active")?t=!1:e.find(".ai1ec-active").removeClass("ai1ec-active")),t&&n.prop("checked",!this.$element.hasClass("ai1ec-active")).trigger("change")}t&&this.$element.toggleClass("ai1ec-active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("bs.button"),s=typeof n=="object"&&n;i||r.data("bs.button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.bs.button.data-api","[data-toggle^=ai1ec-button]",function(t){var n=e(t.target);n.hasClass("ai1ec-btn")||(n=n.closest(".ai1ec-btn")),n.button("toggle"),t.preventDefault()})}),timely.define("scripts/add_new_event/event_date_time/date_time_event_handlers",["jquery_timely","ai1ec_config","scripts/add_new_event/event_date_time/date_time_utility_functions","external_libs/jquery.calendrical_timespan","libs/utils","external_libs/bootstrap/button"],function(e,t,n,r,i){var s=i.get_ajax_url(),o=function(){var t=e("#ai1ec_end option:selected").val();switch(t){case"0":e("#ai1ec_until_holder, #ai1ec_count_holder").collapse("hide");break;case"1":e("#ai1ec_until_holder").collapse("hide"),e("#ai1ec_count_holder").collapse("show");break;case"2":e("#ai1ec_count_holder").collapse("hide"),e("#ai1ec_until_holder").collapse("show")}},u=function(){e("#publish").trigger("click")},a=function(){var i=e(this),o="",u=e("#ai1ec_repeat_box .ai1ec-tab-pane.ai1ec-active"),a=u.data("freq");switch(a){case"daily":o+="FREQ=DAILY;";var f=e("#ai1ec_daily_count").val();f>1&&(o+="INTERVAL="+f+";");break;case"weekly":o+="FREQ=WEEKLY;";var l=e("#ai1ec_weekly_count").val();l>1&&(o+="INTERVAL="+l+";");var c=e('input[name="ai1ec_weekly_date_select"]:first').val(),h=e('#ai1ec_weekly_date_select > div:first > input[type="hidden"]:first').val();c.length>0&&(o+="WKST="+h+";BYday="+c+";");break;case"monthly":o+="FREQ=MONTHLY;";var p=e("#ai1ec_monthly_count").val(),d=e('input[name="ai1ec_monthly_type"]:checked').val();p>1&&(o+="INTERVAL="+p+";");var v=e('input[name="ai1ec_montly_date_select"]:first').val();if(v.length>0&&d==="bymonthday")o+="BYMONTHDAY="+v+";";else if(d==="byday"){var m=e("#ai1ec_monthly_byday_num").val(),g=e("#ai1ec_monthly_byday_weekday").val();o+="BYday="+m+g+";"}break;case"yearly":o+="FREQ=YEARLY;";var y=e("#ai1ec_yearly_count").val();y>1&&(o+="INTERVAL="+y+";");var b=e('input[name="ai1ec_yearly_date_select"]:first').val();b.length>0&&(o+="BYMONTH="+b+";")}var w=e("#ai1ec_end").val();if(w==="1")o+="COUNT="+e("#ai1ec_count").val()+";";else if(w==="2"){var E=e("#ai1ec_until-date-input").val();E=r.parseDate(E,t.date_format);var S=e("#ai1ec_start-time").val();S=r.parseDate(S,t.date_format),S=new Date(S);var x=E.getUTCDate(),T=E.getUTCMonth()+1,N=S.getUTCHours(),C=S.getUTCMinutes();T=T<10?"0"+T:T,x=x<10?"0"+x:x,N=N<10?"0"+N:N,C=C<10?"0"+C:C,E=E.getUTCFullYear()+""+T+x+"T235959Z",o+="UNTIL="+E+";"}var k={action:"ai1ec_rrule_to_text",rrule:o};i.button("loading").next().addClass("ai1ec-disabled"),e.post(s,k,function(t){t.error?(i.button("reset").next().removeClass("ai1ec-disabled"),"1"===e("#ai1ec_is_box_repeat").val()?n.repeat_form_error("#ai1ec_rrule","#ai1ec_repeat_label",t,i):n.repeat_form_error("#ai1ec_exrule","#ai1ec_exclude_label",t,i)):"1"===e("#ai1ec_is_box_repeat").val()?n.repeat_form_success("#ai1ec_rrule","#ai1ec_repeat_label","#ai1ec_repeat_text > a",o,i,t):n.repeat_form_success("#ai1ec_exrule","#ai1ec_exclude_label","#ai1ec_exclude_text > a",o,i,t)},"json")},f=function(){return e("#ai1ec_is_box_repeat").val()==="1"?n.click_on_modal_cancel("#ai1ec_repeat_text > a","#ai1ec_repeat","#ai1ec_repeat_label"):n.click_on_modal_cancel("#ai1ec_exclude_text > a","#ai1ec_exclude","#ai1ec_exclude_label"),e("#ai1ec_repeat_box").modal("hide"),!1},l=function(){e(this).is("#ai1ec_monthly_type_bymonthday")?(e("#ai1ec_repeat_monthly_byday").collapse("hide"),e("#ai1ec_repeat_monthly_bymonthday").collapse("show")):(e("#ai1ec_repeat_monthly_bymonthday").collapse("hide"),e("#ai1ec_repeat_monthly_byday").collapse("show"))},c=function(){var t=e(this),n=[],r=t.closest(".ai1ec-btn-group-grid"),i;t.toggleClass("ai1ec-active"),e("a",r).each(function(){var t=e(this);t.is(".ai1ec-active")&&(i=t.next().val(),n.push(i))}),r.next().val(n.join())},h=function(){n.click_on_ics_rule_text("#ai1ec_repeat_text > a","#ai1ec_repeat","#ai1ec_repeat_label",{action:"ai1ec_get_repeat_box",repeat:1,post_id:e("#post_ID").val()},n.init_modal_widgets),n.click_on_ics_rule_text("#ai1ec_exclude_text > a","#ai1ec_exclude","#ai1ec_exclude_label",{action:"ai1ec_get_repeat_box",repeat:0,post_id:e("#post_ID").val()},n.init_modal_widgets),n.click_on_checkbox("#ai1ec_repeat","#ai1ec_repeat_text > a","#ai1ec_repeat_label",{action:"ai1ec_get_repeat_box",repeat:1,post_id:e("#post_ID").val()},n.init_modal_widgets),n.click_on_checkbox("#ai1ec_exclude","#ai1ec_exclude_text > a","#ai1ec_exclude_label",{action:"ai1ec_get_repeat_box",repeat:0,post_id:e("#post_ID").val()},n.init_modal_widgets)},p=function(t){return e("#widgetCalendar").toggle(),!1},d=function(){e(".ai1ec-modal-content",this).not(".ai1ec-loading ").remove().end().removeClass("ai1ec-hide")};return{show_end_fields:o,trigger_publish:u,handle_click_on_apply_button:a,handle_click_on_cancel_modal:f,handle_checkbox_monthly_tab_modal:l,execute_pseudo_handlers:h,handle_animation_of_calendar_widget:p,handle_click_on_toggle_buttons:c,handle_modal_hide:d}}),timely.define("scripts/add_new_event/event_cost_helper",["jquery_timely","ai1ec_config"],function(e,t){var n=function(){return e("#ai1ec_is_free").is(":checked")},r=function(){return e("#ai1ec_cost").val()!==""},i=function(r){var i=e(this).parents("table:eq(0)"),s=e("#ai1ec_cost",i),o=t.label_a_buy_tickets_url;n()?(s.attr("value","").addClass("ai1ec-hidden"),o=t.label_a_rsvp_url):s.removeClass("ai1ec-hidden"),e("label[for=ai1ec_ticket_url]",i).text(o)};return{handle_change_is_free:i,check_is_free:n,check_is_price_entered:r}}),timely.define("external_libs/jquery.inputdate",["jquery_timely","external_libs/jquery.calendrical_timespan"],function(e,t){function n(e){e.addClass("error").fadeOut("normal",function(){e.val(e.data("timespan.stored")).removeClass("error").fadeIn("fast")})}function r(){e(this).data("timespan.stored",this.value)}function i(e,n,i,s,o){n.val(n.data("timespan.initial_value"));var u=parseInt(n.val());isNaN(parseInt(u))?u=new Date(o):u=new Date(parseInt(u)*1e3),e.val(t.formatDate(u,s)),e.each(r)}var s={start_date_input:"date-input",start_time:"time",twentyfour_hour:!1,date_format:"def",now:new Date},o={init:function(o){var u=e.extend({},s,o),a=e(u.start_date_input),f=e(u.start_time),l=a,c=a;return c.bind("focus.timespan",r),l.calendricalDate({today:new Date(u.now.getFullYear(),u.now.getMonth(),u.now.getDate()),dateFormat:u.date_format,monthNames:u.month_names,dayNames:u.day_names,weekStartDay:u.week_start_day}),l.bind("blur.timespan",function(){var r=t.parseDate(this.value,u.date_format);isNaN(r)?n(e(this)):(e(this).data("timespan.stored",this.value),e(this).val(t.formatDate(r,u.date_format)))}),a.bind("focus.timespan",function(){var e=t.parseDate(a.val(),u.date_format).getTime()/1e3}).bind("blur.timespan",function(){var e=t.parseDate(a.data("timespan.stored"),u.date_format)}),a.closest("form").bind("submit.timespan",function(){var e=t.parseDate(a.val(),u.date_format).getTime()/1e3;isNaN(e)&&(e=""),f.val(e)}),f.data("timespan.initial_value",f.val()),i(a,f,u.twentyfour_hour,u.date_format,u.now),this},reset:function(t){var n=e.extend({},s,t);return i(e(n.start_date_input),e(n.start_time),n.twentyfour_hour,n.date_format,n.now),this},destroy:function(t){return t=e.extend({},s,t),e.each(t,function(t,n){e(n).unbind(".timespan")}),e(t.start_date_input).closest("form").unbind(".timespan"),this}};e.inputdate=function(t){if(o[t])return o[t].apply(this,Array.prototype.slice.call(arguments,1));if(typeof t=="object"||!t)return o.init.apply(this,arguments);e.error("Method "+t+" does not exist on jQuery.timespan")}}),timely.define("external_libs/jquery.tools",["jquery_timely"],function(e){function i(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}function s(e,t){var n=parseInt(e.css(t),10);if(n)return n;var r=e[0].currentStyle;return r&&r.width&&parseInt(r.width,10)}function o(e){var t=e.data("events");return t&&t.onSlide}function u(t,n){function x(e,s,o,u){o===undefined?o=s/h*m:u&&(o-=n.min),g&&(o=Math.round(o/g)*g);if(s===undefined||g)s=o*h/m;if(isNaN(o))return r;s=Math.max(0,Math.min(s,h)),o=s/h*m;if(u||!f)o+=n.min;f&&(u?s=h-s:o=n.max-o),o=i(o,y);var a=e.type=="click";if(S&&l!==undefined&&!a){e.type="onSlide",E.trigger(e,[o,s]);if(e.isDefaultPrevented())return r}var c=a?n.speed:0,b=a?function(){e.type="change",E.trigger(e,[o])}:null;return f?(d.animate({top:s},c,b),n.progress&&v.animate({height:h-s+d.height()/2},c)):(d.animate({left:s},c,b),n.progress&&v.animate({width:s+d.width()/2},c)),l=o,p=s,t.val(o),r}function T(){f=n.vertical||s(a,"height")>s(a,"width"),f?(h=s(a,"height")-s(d,"height"),c=a.offset().top+h):(h=s(a,"width")-s(d,"width"),c=a.offset().left)}function N(){T(),r.setValue(n.value!==undefined?n.value:n.min)}var r=this,u=n.css,a=e("<div><div/><a href='#'/></div>").data("rangeinput",r),f,l,c,h,p;t.before(a);var d=a.addClass(u.slider).find("a").addClass(u.handle),v=a.find("div").addClass(u.progress);e.each("min,max,step,value".split(","),function(e,r){var i=t.attr(r);parseFloat(i)&&(n[r]=parseFloat(i,10))});var m=n.max-n.min,g=n.step=="any"?0:n.step,y=n.precision;y===undefined&&(y=g.toString().split("."),y=y.length===2?y[1].length:0);if(t.attr("type")=="range"){var b=t.clone().wrap("<div/>").parent().html(),w=e(b.replace(/type/i,"type=text data-orig-type"));w.val(n.value),t.replaceWith(w),t=w}t.addClass(u.input);var E=e(r).add(t),S=!0;e.extend(r,{getValue:function(){return l},setValue:function(t,n){return T(),x(n||e.Event("api"),undefined,t,!0)},getConf:function(){return n},getProgress:function(){return v},getHandle:function(){return d},getInput:function(){return t},step:function(t,i){i=i||e.Event();var s=n.step=="any"?1:n.step;r.setValue(l+s*(t||1),i)},stepUp:function(e){return r.step(e||1)},stepDown:function(e){return r.step(-e||-1)}}),e.each("onSlide,change".split(","),function(t,i){e.isFunction(n[i])&&e(r).on(i,n[i]),r[i]=function(t){return t&&e(r).on(i,t),r}}),d.drag({drag:!1}).on("dragStart",function(){T(),S=o(e(r))||o(t)}).on("drag",function(e,n,r){if(t.is(":disabled"))return!1;x(e,f?n:r)}).on("dragEnd",function(e){e.isDefaultPrevented()||(e.type="change",E.trigger(e,[l]))}).click(function(e){return e.preventDefault()}),a.click(function(e){if(t.is(":disabled")||e.target==d[0])return e.preventDefault();T();var n=f?d.height()/2:d.width()/2;x(e,f?h-c-n+e.pageY:e.pageX-c-n)}),n.keyboard&&t.keydown(function(n){if(t.attr("readonly"))return;var i=n.keyCode,s=e([75,76,38,33,39]).index(i)!=-1,o=e([74,72,40,34,37]).index(i)!=-1;if((s||o)&&!(n.shiftKey||n.altKey||n.ctrlKey))return s?r.step(i==33?10:1,n):o&&r.step(i==34?-10:-1,n),n.preventDefault()}),t.blur(function(t){var n=e(this).val();n!==l&&r.setValue(n,t)}),e.extend(t[0],{stepUp:r.stepUp,stepDown:r.stepDown}),N(),h||e(window).load(N)}e.tools=e.tools||{version:"1.2.7"};var t;t=e.tools.rangeinput={conf:{min:0,max:100,step:"any",steps:0,value:0,precision:undefined,vertical:0,keyboard:!0,progress:!1,speed:100,css:{input:"range",slider:"slider",progress:"progress",handle:"handle"}}};var n,r;e.fn.drag=function(t){return document.ondragstart=function(){return!1},t=e.extend({x:!0,y:!0,drag:!0},t),n=n||e(document).on("mousedown mouseup",function(i){var s=e(i.target);if(i.type=="mousedown"&&s.data("drag")){var o=s.position(),u=i.pageX-o.left,a=i.pageY-o.top,f=!0;n.on("mousemove.drag",function(e){var n=e.pageX-u,i=e.pageY-a,o={};t.x&&(o.left=n),t.y&&(o.top=i),f&&(s.trigger("dragStart"),f=!1),t.drag&&s.css(o),s.trigger("drag",[i,n]),r=s}),i.preventDefault()}else try{r&&r.trigger("dragEnd")}finally{n.off("mousemove.drag"),r=null}}),this.data("drag",!0)},e.expr[":"].range=function(t){var n=t.getAttribute("type");return n&&n=="range"||!!e(t).filter("input").data("rangeinput")},e.fn.rangeinput=function(n){if(this.data("rangeinput"))return this;n=e.extend(!0,{},t.conf,n);var r;return this.each(function(){var t=new u(e(this),e.extend(!0,{},n)),i=t.getInput().data("rangeinput",t);r=r?r.add(i):i}),r?r:this}}),timely.define("external_libs/ai1ec_datepicker",["jquery_timely"],function(e){var t=function(){var t={},n={years:"datepickerViewYears",moths:"datepickerViewMonths",days:"datepickerViewDays"},i={wrapper:'<div class="datepicker"><div class="datepickerBorderT" /><div class="datepickerBorderB" /><div class="datepickerBorderL" /><div class="datepickerBorderR" /><div class="datepickerBorderTL" /><div class="datepickerBorderTR" /><div class="datepickerBorderBL" /><div class="datepickerBorderBR" /><div class="datepickerContainer"><table cellspacing="0" cellpadding="0"><tbody><tr></tr></tbody></table></div></div>',head:["<td>",'<table cellspacing="0" cellpadding="0">',"<thead>","<tr>",'<th class="datepickerGoPrev"><a href="#"><span><%=prev%></span></a></th>','<th colspan="5" class="datepickerMonth"><a href="#"><span></span></a></th>','<th class="datepickerGoNext"><a href="#"><span><%=next%></span></a></th>',"</tr>",'<tr class="datepickerDoW">','<th class="ai1ec-datepicker-header-week"><span><%=week%></span></th>',"<th><span><%=day1%></span></th>","<th><span><%=day2%></span></th>","<th><span><%=day3%></span></th>","<th><span><%=day4%></span></th>","<th><span><%=day5%></span></th>","<th><span><%=day6%></span></th>","<th><span><%=day7%></span></th>","</tr>","</thead>","</table></td>"],space:'<td class="datepickerSpace"><div></div></td>',days:['<tbody class="datepickerDays">',"<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[0].week%></span></a></th>','<td class="<%=weeks[0].days[0].classname%>"><a href="#"><span><%=weeks[0].days[0].text%></span></a></td>','<td class="<%=weeks[0].days[1].classname%>"><a href="#"><span><%=weeks[0].days[1].text%></span></a></td>','<td class="<%=weeks[0].days[2].classname%>"><a href="#"><span><%=weeks[0].days[2].text%></span></a></td>','<td class="<%=weeks[0].days[3].classname%>"><a href="#"><span><%=weeks[0].days[3].text%></span></a></td>','<td class="<%=weeks[0].days[4].classname%>"><a href="#"><span><%=weeks[0].days[4].text%></span></a></td>','<td class="<%=weeks[0].days[5].classname%>"><a href="#"><span><%=weeks[0].days[5].text%></span></a></td>','<td class="<%=weeks[0].days[6].classname%>"><a href="#"><span><%=weeks[0].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[1].week%></span></a></th>','<td class="<%=weeks[1].days[0].classname%>"><a href="#"><span><%=weeks[1].days[0].text%></span></a></td>','<td class="<%=weeks[1].days[1].classname%>"><a href="#"><span><%=weeks[1].days[1].text%></span></a></td>','<td class="<%=weeks[1].days[2].classname%>"><a href="#"><span><%=weeks[1].days[2].text%></span></a></td>','<td class="<%=weeks[1].days[3].classname%>"><a href="#"><span><%=weeks[1].days[3].text%></span></a></td>','<td class="<%=weeks[1].days[4].classname%>"><a href="#"><span><%=weeks[1].days[4].text%></span></a></td>','<td class="<%=weeks[1].days[5].classname%>"><a href="#"><span><%=weeks[1].days[5].text%></span></a></td>','<td class="<%=weeks[1].days[6].classname%>"><a href="#"><span><%=weeks[1].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[2].week%></span></a></th>','<td class="<%=weeks[2].days[0].classname%>"><a href="#"><span><%=weeks[2].days[0].text%></span></a></td>','<td class="<%=weeks[2].days[1].classname%>"><a href="#"><span><%=weeks[2].days[1].text%></span></a></td>','<td class="<%=weeks[2].days[2].classname%>"><a href="#"><span><%=weeks[2].days[2].text%></span></a></td>','<td class="<%=weeks[2].days[3].classname%>"><a href="#"><span><%=weeks[2].days[3].text%></span></a></td>','<td class="<%=weeks[2].days[4].classname%>"><a href="#"><span><%=weeks[2].days[4].text%></span></a></td>','<td class="<%=weeks[2].days[5].classname%>"><a href="#"><span><%=weeks[2].days[5].text%></span></a></td>','<td class="<%=weeks[2].days[6].classname%>"><a href="#"><span><%=weeks[2].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[3].week%></span></a></th>','<td class="<%=weeks[3].days[0].classname%>"><a href="#"><span><%=weeks[3].days[0].text%></span></a></td>','<td class="<%=weeks[3].days[1].classname%>"><a href="#"><span><%=weeks[3].days[1].text%></span></a></td>','<td class="<%=weeks[3].days[2].classname%>"><a href="#"><span><%=weeks[3].days[2].text%></span></a></td>','<td class="<%=weeks[3].days[3].classname%>"><a href="#"><span><%=weeks[3].days[3].text%></span></a></td>','<td class="<%=weeks[3].days[4].classname%>"><a href="#"><span><%=weeks[3].days[4].text%></span></a></td>','<td class="<%=weeks[3].days[5].classname%>"><a href="#"><span><%=weeks[3].days[5].text%></span></a></td>','<td class="<%=weeks[3].days[6].classname%>"><a href="#"><span><%=weeks[3].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[4].week%></span></a></th>','<td class="<%=weeks[4].days[0].classname%>"><a href="#"><span><%=weeks[4].days[0].text%></span></a></td>','<td class="<%=weeks[4].days[1].classname%>"><a href="#"><span><%=weeks[4].days[1].text%></span></a></td>','<td class="<%=weeks[4].days[2].classname%>"><a href="#"><span><%=weeks[4].days[2].text%></span></a></td>','<td class="<%=weeks[4].days[3].classname%>"><a href="#"><span><%=weeks[4].days[3].text%></span></a></td>','<td class="<%=weeks[4].days[4].classname%>"><a href="#"><span><%=weeks[4].days[4].text%></span></a></td>','<td class="<%=weeks[4].days[5].classname%>"><a href="#"><span><%=weeks[4].days[5].text%></span></a></td>','<td class="<%=weeks[4].days[6].classname%>"><a href="#"><span><%=weeks[4].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[5].week%></span></a></th>','<td class="<%=weeks[5].days[0].classname%>"><a href="#"><span><%=weeks[5].days[0].text%></span></a></td>','<td class="<%=weeks[5].days[1].classname%>"><a href="#"><span><%=weeks[5].days[1].text%></span></a></td>','<td class="<%=weeks[5].days[2].classname%>"><a href="#"><span><%=weeks[5].days[2].text%></span></a></td>','<td class="<%=weeks[5].days[3].classname%>"><a href="#"><span><%=weeks[5].days[3].text%></span></a></td>','<td class="<%=weeks[5].days[4].classname%>"><a href="#"><span><%=weeks[5].days[4].text%></span></a></td>','<td class="<%=weeks[5].days[5].classname%>"><a href="#"><span><%=weeks[5].days[5].text%></span></a></td>','<td class="<%=weeks[5].days[6].classname%>"><a href="#"><span><%=weeks[5].days[6].text%></span></a></td>',"</tr>","</tbody>"],months:['<tbody class="<%=className%>">',"<tr>",'<td colspan="2"><a href="#"><span><%=data[0]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[1]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[2]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[3]%></span></a></td>',"</tr>","<tr>",'<td colspan="2"><a href="#"><span><%=data[4]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[5]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[6]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[7]%></span></a></td>',"</tr>","<tr>",'<td colspan="2"><a href="#"><span><%=data[8]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[9]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[10]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[11]%></span></a></td>',"</tr>","</tbody>"]},s={flat:!1,starts:1,prev:"◀",next:"▶",lastSel:!1,mode:"single",view:"days",calendars:1,format:"Y-m-d",position:"bottom",eventName:"click",onRender:function(){return{}},onChange:function(){return!0},onShow:function(){return!0},onBeforeShow:function(){return!0},onHide:function(){return!0},locale:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekMin:"wk"}},o=function(t){var n=e(t).data("datepicker"),s=e(t),o=Math.floor(n.calendars/2),u,f,l,c,h=0,p,d,v,m,g,y;s.find("td>table tbody").remove();for(var b=0;b<n.calendars;b++){u=new Date(n.current),u.addMonths(-o+b),y=s.find("table").eq(b+1);switch(y[0].className){case"datepickerViewDays":l=a(u,"B Y");break;case"datepickerViewMonths":l=u.getFullYear();break;case"datepickerViewYears":l=u.getFullYear()-6+" - "+(u.getFullYear()+5)}y.find("thead tr:first th:eq(1) span").text(l),l=u.getFullYear()-6,f={data:[],className:"datepickerYears"};for(var w=0;w<12;w++)f.data.push(l+w);g=r(i.months.join(""),f),u.setDate(1),f={weeks:[],test:10},c=u.getMonth();var l=(u.getDay()-n.starts)%7;u.addDays(-(l+(l<0?7:0))),p=-1,h=0;while(h<42){v=parseInt(h/7,10),m=h%7,f.weeks[v]||(p=u.getWeekNumber(),f.weeks[v]={week:p,days:[]}),f.weeks[v].days[m]={text:u.getDate(),classname:[]},c!=u.getMonth()&&f.weeks[v].days[m].classname.push("datepickerNotInMonth"),u.getDay()==0&&f.weeks[v].days[m].classname.push("datepickerSunday"),u.getDay()==6&&f.weeks[v].days[m].classname.push("datepickerSaturday");var E=n.onRender(u),S=u.valueOf();(E.selected||n.date==S||e.inArray(S,n.date)>-1||n.mode=="range"&&S>=n.date[0]&&S<=n.date[1])&&f.weeks[v].days[m].classname.push("datepickerSelected"),E.disabled&&f.weeks[v].days[m].classname.push("datepickerDisabled"),E.className&&f.weeks[v].days[m].classname.push(E.className),f.weeks[v].days[m].classname=f.weeks[v].days[m].classname.join(" "),h++,u.addDays(1)}g=r(i.days.join(""),f)+g,f={data:n.locale.monthsShort,className:"datepickerMonths"},g=r(i.months.join(""),f)+g,y.append(g)}},u=function(e,t){if(e.constructor==Date)return new Date(e);var n=e.split(/\W+/),r=t.split(/\W+/),i,s,o,u,a,f=new Date;for(var l=0;l<n.length;l++)switch(r[l]){case"d":case"e":i=parseInt(n[l],10);break;case"m":s=parseInt(n[l],10)-1;break;case"Y":case"y":o=parseInt(n[l],10),o+=o>100?0:o<29?2e3:1900;break;case"H":case"I":case"k":case"l":u=parseInt(n[l],10);break;case"P":case"p":/pm/i.test(n[l])&&u<12?u+=12:/am/i.test(n[l])&&u>=12&&(u-=12);break;case"M":a=parseInt(n[l],10)}return new Date(o===undefined?f.getFullYear():o,s===undefined?f.getMonth():s,i===undefined?f.getDate():i,u===undefined?f.getHours():u,a===undefined?f.getMinutes():a,0)},a=function(e,t){var n=e.getMonth(),r=e.getDate(),i=e.getFullYear(),s=e.getWeekNumber(),o=e.getDay(),u={},a=e.getHours(),f=a>=12,l=f?a-12:a,c=e.getDayOfYear();l==0&&(l=12);var h=e.getMinutes(),p=e.getSeconds(),d=t.split(""),v;for(var m=0;m<d.length;m++){v=d[m];switch(d[m]){case"a":v=e.getDayName();break;case"A":v=e.getDayName(!0);break;case"b":v=e.getMonthName();break;case"B":v=e.getMonthName(!0);break;case"C":v=1+Math.floor(i/100);break;case"d":v=r<10?"0"+r:r;break;case"e":v=r;break;case"H":v=a<10?"0"+a:a;break;case"I":v=l<10?"0"+l:l;break;case"j":v=c<100?c<10?"00"+c:"0"+c:c;break;case"k":v=a;break;case"l":v=l;break;case"m":v=n<9?"0"+(1+n):1+n;break;case"M":v=h<10?"0"+h:h;break;case"p":case"P":v=f?"PM":"AM";break;case"s":v=Math.floor(e.getTime()/1e3);break;case"S":v=p<10?"0"+p:p;break;case"u":v=o+1;break;case"w":v=o;break;case"y":v=(""+i).substr(2,2);break;case"Y":v=i}d[m]=v}return d.join("")},f=function(e){if(Date.prototype.tempDate)return;Date.prototype.tempDate=null,Date.prototype.months=e.months,Date.prototype.monthsShort=e.monthsShort,Date.prototype.days=e.days,Date.prototype.daysShort=e.daysShort,Date.prototype.getMonthName=function(e){return this[e?"months":"monthsShort"][this.getMonth()]},Date.prototype.getDayName=function(e){return this[e?"days":"daysShort"][this.getDay()]},Date.prototype.addDays=function(e){this.setDate(this.getDate()+e),this.tempDate=this.getDate()},Date.prototype.addMonths=function(e){this.tempDate==null&&(this.tempDate=this.getDate()),this.setDate(1),this.setMonth(this.getMonth()+e),this.setDate(Math.min(this.tempDate,this.getMaxDays()))},Date.prototype.addYears=function(e){this.tempDate==null&&(this.tempDate=this.getDate()),this.setDate(1),this.setFullYear(this.getFullYear()+e),this.setDate(Math.min(this.tempDate,this.getMaxDays()))},Date.prototype.getMaxDays=function(){var e=new Date(Date.parse(this)),t=28,n;n=e.getMonth(),t=28;while(e.getMonth()==n)t++,e.setDate(t);return t-1},Date.prototype.getFirstDay=function(){var e=new Date(Date.parse(this));return e.setDate(1),e.getDay()},Date.prototype.getWeekNumber=function(){var e=new Date(this);e.setDate(e.getDate()-(e.getDay()+6)%7+3);var t=e.valueOf();return e.setMonth(0),e.setDate(4),Math.round((t-e.valueOf())/6048e5)+1},Date.prototype.getDayOfYear=function(){var e=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0),t=new Date(this.getFullYear(),0,0,0,0,0),n=e-t;return Math.floor(n/24*60*60*1e3)}},l=function(t){var n=e(t).data("datepicker"),r=e("#"+n.id);if(!n.extraHeight){var i=e(t).find("div");n.extraHeight=i.get(0).offsetHeight+i.get(1).offsetHeight,n.extraWidth=i.get(2).offsetWidth+i.get(3).offsetWidth}var s=r.find("table:first").get(0),o=s.offsetWidth,u=s.offsetHeight;r.css({width:o+n.extraWidth+"px",height:u+n.extraHeight+"px"}).find("div.datepickerContainer").css({width:o+"px",height:u+"px"})},c=function(t){e(t.target).is("span")&&(t.target=t.target.parentNode);var n=e(t.target);if(n.is("a")){t.target.blur();if(n.hasClass("datepickerDisabled"))return!1;var r=e(this).data("datepicker"),i=n.parent(),s=i.parent().parent().parent(),u=e("table",this).index(s.get(0))-1,f=new Date(r.current),l=!1,c=!1;if(i.is("th")){if(i.hasClass("datepickerWeek")&&r.mode=="range"&&!i.next().hasClass("datepickerDisabled")){var p=parseInt(i.next().text(),10);f.addMonths(u-Math.floor(r.calendars/2)),i.next().hasClass("datepickerNotInMonth")&&f.addMonths(p>15?-1:1),f.setDate(p),r.date[0]=f.setHours(0,0,0,0).valueOf(),f.setHours(23,59,59,0),f.addDays(6),r.date[1]=f.valueOf(),c=!0,l=!0,r.lastSel=!1}else if(i.hasClass("datepickerMonth")){if(r.month_link_inactive)return!1;f.addMonths(u-Math.floor(r.calendars/2));switch(s.get(0).className){case"datepickerViewDays":s.get(0).className="datepickerViewMonths",n.find("span").text(f.getFullYear());break;case"datepickerViewMonths":s.get(0).className="datepickerViewYears",n.find("span").text(f.getFullYear()-6+" - "+(f.getFullYear()+5));break;case"datepickerViewYears":s.get(0).className="datepickerViewDays",n.find("span").text(a(f,"B, Y"))}}else if(i.parent().parent().is("thead")){switch(s.get(0).className){case"datepickerViewDays":r.current.addMonths(i.hasClass("datepickerGoPrev")?-1:1);break;case"datepickerViewMonths":r.current.addYears(i.hasClass("datepickerGoPrev")?-1:1);break;case"datepickerViewYears":r.current.addYears(i.hasClass("datepickerGoPrev")?-12:12)}c=!0}}else if(i.is("td")&&!i.hasClass("datepickerDisabled")){switch(s.get(0).className){case"datepickerViewMonths":r.current.setMonth(s.find("tbody.datepickerMonths td").index(i)),r.current.setFullYear(parseInt(s.find("thead th.datepickerMonth span").text(),10)),r.current.addMonths(Math.floor(r.calendars/2)-u),s.get(0).className="datepickerViewDays";break;case"datepickerViewYears":r.current.setFullYear(parseInt(n.text(),10)),s.get(0).className="datepickerViewMonths";break;default:var p=parseInt(n.text(),10);f.addMonths(u-Math.floor(r.calendars/2)),i.hasClass("datepickerNotInMonth")&&f.addMonths(p>15?-1:1),f.setDate(p);switch(r.mode){case"multiple":p=f.setHours(0,0,0,0).valueOf(),e.inArray(p,r.date)>-1?e.each(r.date,function(e,t){if(t==p)return r.date.splice(e,1),!1}):r.date.push(p);break;case"range":r.lastSel||(r.date[0]=f.setHours(0,0,0,0).valueOf()),p=f.setHours(23,59,59,0).valueOf(),p<r.date[0]?(r.date[1]=r.date[0]+86399e3,r.date[0]=p-86399e3):r.date[1]=p,r.lastSel=!r.lastSel;break;default:r.date=f.valueOf()}}c=!0,l=!0}c&&o(this),l&&r.onChange.apply(this,h(r))}return!1},h=function(t){var n;return t.mode=="single"?(n=new Date(t.date),[a(n,t.format),n,t.el]):(n=[[],[],t.el],e.each(t.date,function(e,r){var i=new Date(r);n[0].push(a(i,t.format)),n[1].push(i)}),n)},p=function(){var e=document.compatMode=="CSS1Compat";return{l:window.pageXOffset||(e?document.documentElement.scrollLeft:document.body.scrollLeft),t:window.pageYOffset||(e?document.documentElement.scrollTop:document.body.scrollTop),w:window.innerWidth||(e?document.documentElement.clientWidth:document.body.clientWidth),h:window.innerHeight||(e?document.documentElement.clientHeight:document.body.clientHeight)}},d=function(e,t,n){if(e==t)return!0;if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return!!(e.compareDocumentPosition(t)&16);var r=t.parentNode;while(r&&r!=n){if(r==e)return!0;r=r.parentNode}return!1},v=function(t){var n=e("#"+e(this).data("datepickerId"));if(!n.is(":visible")){var r=n.get(0);o(r);var i=n.data("datepicker");i.onBeforeShow.apply(this,[n.get(0)]);var s=e(this).offset(),u=p(),a=s.top,f=s.left,c=e.curCSS(r,"display");n.css({visibility:"hidden",display:"block"}),l(r);switch(i.position){case"top":a-=r.offsetHeight;break;case"left":f-=r.offsetWidth;break;case"right":f+=this.offsetWidth;break;case"bottom":a+=this.offsetHeight}a+r.offsetHeight>u.t+u.h&&(a=s.top-r.offsetHeight),a<u.t&&(a=s.top+this.offsetHeight+r.offsetHeight),f+r.offsetWidth>u.l+u.w&&(f=s.left-r.offsetWidth),f<u.l&&(f=s.left+this.offsetWidth),n.css({visibility:"visible",display:"block",top:a+"px",left:f+"px"}),i.onShow.apply(this,[n.get(0)])!=0&&n.show(),e(document).bind("mousedown",{cal:n,trigger:this},m)}return!1},m=function(t){t.target!=t.data.trigger&&!d(t.data.cal.get(0),t.target,t.data.cal.get(0))&&(t.data.cal.data("datepicker").onHide.apply(this,[t.data.cal.get(0)])!=0&&t.data.cal.hide(),e(document).unbind("mousedown",m))};return{init:function(t){return t=e.extend(!0,{},s,t||{}),f(t.locale),t.calendars=Math.max(1,parseInt(t.calendars,10)||1),t.mode=/single|multiple|range/.test(t.mode)?t.mode:"single",this.each(function(){if(!e(this).data("datepicker")){t.el=this,t.date.constructor==String&&(t.date=u(t.date,t.format),t.date.setHours(0,0,0,0));if(t.mode!="single")if(t.date.constructor!=Array)t.date=[t.date.valueOf()],t.mode=="range"&&t.date.push((new Date(t.date[0])).setHours(23,59,59,0).valueOf());else{for(var s=0;s<t.date.length;s++)t.date[s]=u(t.date[s],t.format).setHours(0,0,0,0).valueOf();t.mode=="range"&&(t.date[1]=(new Date(t.date[1])).setHours(23,59,59,0).valueOf())}else t.date=t.date.valueOf();t.current?t.current=u(t.current,t.format):t.current=new Date,t.current.setDate(1),t.current.setHours(0,0,0,0);var a="datepicker_"+parseInt(Math.random()*1e3),f;t.id=a,e(this).data("datepickerId",t.id);var h=e(i.wrapper).attr("id",a).bind("click",c).data("datepicker",t);t.className&&h.addClass(t.className);var p="";for(var s=0;s<t.calendars;s++)f=t.starts,s>0&&(p+=i.space),p+=r(i.head.join(""),{week:t.locale.weekMin,prev:t.prev,next:t.next,day1:t.locale.daysMin[f++%7],day2:t.locale.daysMin[f++%7],day3:t.locale.daysMin[f++%7],day4:t.locale.daysMin[f++%7],day5:t.locale.daysMin[f++%7],day6:t.locale.daysMin[f++%7],day7:t.locale.daysMin[f++%7]});h.find("tr:first").append(p).find("table").addClass(n[t.view]),o(h.get(0)),t.flat?(h.appendTo(this).show().css("position","relative"),l(h.get(0))):(h.appendTo(document.body),e(this).bind(t.eventName,v))}})},showPicker:function(){return this.each(function(){e(this).data("datepickerId")&&v.apply(this)})},hidePicker:function(){return this.each(function(){e(this).data("datepickerId")&&e("#"+e(this).data("datepickerId")).hide()})},setDate:function(t,n){return this.each(function(){if(e(this).data("datepickerId")){var r=e("#"+e(this).data("datepickerId")),i=r.data("datepicker");i.date=t,i.date.constructor==String&&(i.date=u(i.date,i.format),i.date.setHours(0,0,0,0));if(i.mode!="single")if(i.date.constructor!=Array)i.date=[i.date.valueOf()],i.mode=="range"&&i.date.push((new Date(i.date[0])).setHours(23,59,59,0).valueOf());else{for(var s=0;s<i.date.length;s++)i.date[s]=u(i.date[s],i.format).setHours(0,0,0,0).valueOf();i.mode=="range"&&(i.date[1]=(new Date(i.date[1])).setHours(23,59,59,0).valueOf())}else i.date=i.date.valueOf();n&&(i.current=new Date(i.mode!="single"?i.date[0]:i.date)),o(r.get(0))}})},getDate:function(t){if(this.size()>0)return h(e("#"+e(this).data("datepickerId")).data("datepicker"))[t?0:1]},clear:function(){return this.each(function(){if(e(this).data("datepickerId")){var t=e("#"+e(this).data("datepickerId")),n=t.data("datepicker");n.mode!="single"&&(n.date=[],o(t.get(0)))}})},fixLayout:function(){return this.each(function(){if(e(this).data("datepickerId")){var t=e("#"+e(this).data("datepickerId")),n=t.data("datepicker");n.flat&&l(t.get(0))}})}}}();e.fn.extend({DatePicker:t.init,DatePickerHide:t.hidePicker,DatePickerShow:t.showPicker,DatePickerSetDate:t.setDate,DatePickerGetDate:t.getDate,DatePickerClear:t.clear,DatePickerLayout:t.fixLayout});var n={},r=function(e,t){var i=/\W/.test(e)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+e.replace(/[\r\t\n]/g," ").split("<%").join(" ").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split(" ").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):n[e]=n[e]||r(document.getElementById(e).innerHTML);return t?i(t):i}}),timely.define("external_libs/bootstrap/transition",["jquery_timely"],function(e){function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(e.style[n]!==undefined)return{end:t[n]}}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this;e(this).one(e.support.transition.end,function(){n=!0});var i=function(){n||e(r).trigger(e.support.transition.end)};return setTimeout(i,t),this},e(function(){e.support.transition=t()})}),timely.define("external_libs/bootstrap/collapse",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.transitioning=null,this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e=this.$element.hasClass("ai1ec-width");return e?"width":"height"},t.prototype.show=function(){if(this.transitioning||this.$element.hasClass("ai1ec-in"))return;var t=e.Event("show.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.$parent&&this.$parent.find("> .ai1ec-panel > .ai1ec-in");if(n&&n.length){var r=n.data("bs.collapse");if(r&&r.transitioning)return;n.collapse("hide"),r||n.data("bs.collapse",null)}var i=this.dimension();this.$element.removeClass("ai1ec-collapse").addClass("ai1ec-collapsing")[i](0),this.transitioning=1;var s=function(){this.$element.removeClass("ai1ec-collapsing").addClass("ai1ec-in")[i]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return s.call(this);var o=e.camelCase(["scroll",i].join("-"));this.$element.one(e.support.transition.end,e.proxy(s,this)).emulateTransitionEnd(350)[i](this.$element[0][o])},t.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("ai1ec-in"))return;var t=e.Event("hide.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("ai1ec-collapsing").removeClass("ai1ec-collapse").removeClass("ai1ec-in"),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("ai1ec-collapsing").addClass("ai1ec-collapse")};if(!e.support.transition)return r.call(this);this.$element[n](0).one(e.support.transition.end,e.proxy(r,this)).emulateTransitionEnd(350)},t.prototype.toggle=function(){this[this.$element.hasClass("ai1ec-in")?"hide":"show"]()};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("bs.collapse"),s=e.extend({},t.DEFAULTS,r.data(),typeof n=="object"&&n);i||r.data("bs.collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.bs.collapse.data-api","[data-toggle=ai1ec-collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i),o=s.data("bs.collapse"),u=o?"toggle":n.data(),a=n.attr("data-parent"),f=a&&e(a);if(!o||!o.transitioning)f&&f.find('[data-toggle=ai1ec-collapse][data-parent="'+a+'"]').not(n).addClass("ai1ec-collapsed"),n[s.hasClass("ai1ec-in")?"addClass":"removeClass"]("ai1ec-collapsed");s.collapse(u)})}),timely.define("external_libs/bootstrap/modal",["jquery_timely"],function(e){var t=function(t,n){this.options=n,this.$element=e(t),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},t.prototype.toggle=function(e){return this[this.isShown?"hide":"show"](e)},t.prototype.show=function(t){var n=this,r=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r);if(this.isShown||r.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="ai1ec-modal"]',e.proxy(this.hide,this)),this.backdrop(function(){var r=e.support.transition&&n.$element.hasClass("ai1ec-fade");n.$element.parent().length||n.$element.appendTo(document.body),n.$element.show(),r&&n.$element[0].offsetWidth,n.$element.addClass("ai1ec-in").attr("aria-hidden",!1),n.enforceFocus();var i=e.Event("shown.bs.modal",{relatedTarget:t});r?n.$element.find(".ai1ec-modal-dialog").one(e.support.transition.end,function(){n.$element.focus().trigger(i)}).emulateTransitionEnd(300):n.$element.focus().trigger(i)})},t.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.bs.modal"),this.$element.removeClass("ai1ec-in").attr("aria-hidden",!0).off("click.dismiss.modal"),e.support.transition&&this.$element.hasClass("ai1ec-fade")?this.$element.one(e.support.transition.end,e.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal()},t.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){this.$element[0]!==e.target&&!this.$element.has(e.target).length&&this.$element.focus()},this))},t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",e.proxy(function(e){e.which==27&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},t.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden.bs.modal")})},t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},t.prototype.backdrop=function(t){var n=this,r=this.$element.hasClass("ai1ec-fade")?"ai1ec-fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="ai1ec-modal-backdrop '+r+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",e.proxy(function(e){if(e.target!==e.currentTarget)return;this.options.backdrop=="static"?this.$element[0].focus.call(this.$element[0]):this.hide.call(this)},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("ai1ec-in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("ai1ec-in"),e.support.transition&&this.$element.hasClass("ai1ec-fade")?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};var n=e.fn.modal;e.fn.modal=function(n,r){return this.each(function(){var i=e(this),s=i.data("bs.modal"),o=e.extend({},t.DEFAULTS,i.data(),typeof n=="object"&&n);s||i.data("bs.modal",s=new t(this,o)),typeof n=="string"?s[n](r):o.show&&s.show(r)})},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.bs.modal.data-api",'[data-toggle="ai1ec-modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s,this).one("hide",function(){n.is(":visible")&&n.focus()})}),e(document).on("show.bs.modal",".ai1ec-modal",function(){e(document.body).addClass("ai1ec-modal-open")}).on("hidden.bs.modal",".ai1ec-modal",function(){e(document.body).removeClass("ai1ec-modal-open")})}),timely.define("external_libs/bootstrap/alert",["jquery_timely"],function(e){var t='[data-dismiss="ai1ec-alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed.bs.alert").remove()}var n=e(this),r=n.attr("data-target");r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var i=e(r);t&&t.preventDefault(),i.length||(i=n.hasClass("ai1ec-alert")?n:n.parent()),i.trigger(t=e.Event("close.bs.alert"));if(t.isDefaultPrevented())return;i.removeClass("ai1ec-in"),e.support.transition&&i.hasClass("ai1ec-fade")?i.one(e.support.transition.end,s).emulateTransitionEnd(150):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("bs.alert");i||r.data("bs.alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}),timely.define("external_libs/select2",["jquery_timely"],function(e){(function(e){typeof e.fn.each2=="undefined"&&e.fn.extend({each2:function(t){var n=e([0]),r=-1,i=this.length;while(++r<i&&(n.context=n[0]=this[r])&&t.call(n[0],r,n)!==!1);return this}})})(e),function(e,t){function l(e,t){var n=0,r=t.length;for(;n<r;n+=1)if(c(e,t[n]))return n;return-1}function c(e,n){return e===n?!0:e===t||n===t?!1:e===null||n===null?!1:e.constructor===String?e===n+"":n.constructor===String?n===e+"":!1}function h(t,n){var r,i,s;if(t===null||t.length<1)return[];r=t.split(n);for(i=0,s=r.length;i<s;i+=1)r[i]=e.trim(r[i]);return r}function p(e){return e.outerWidth(!1)-e.width()}function d(n){var r="keyup-change-value";n.bind("keydown",function(){e.data(n,r)===t&&e.data(n,r,n.val())}),n.bind("keyup",function(){var i=e.data(n,r);i!==t&&n.val()!==i&&(e.removeData(n,r),n.trigger("keyup-change"))})}function v(n){n.bind("mousemove",function(n){var r=a;(r===t||r.x!==n.pageX||r.y!==n.pageY)&&e(n.target).trigger("mousemove-filtered",n)})}function m(e,n,r){r=r||t;var i;return function(){var t=arguments;window.clearTimeout(i),i=window.setTimeout(function(){n.apply(r,t)},e)}}function g(e){var t=!1,n;return function(){return t===!1&&(n=e(),t=!0),n}}function y(e,t){var n=m(e,function(e){t.trigger("scroll-debounced",e)});t.bind("scroll",function(e){l(e.target,t.get())>=0&&n(e)})}function b(e){if(e[0]===document.activeElement)return;window.setTimeout(function(){var t=e[0],n=e.val().length,r;e.focus(),t.setSelectionRange?t.setSelectionRange(n,n):t.createTextRange&&(r=t.createTextRange(),r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",n),r.select())},0)}function w(e){e.preventDefault(),e.stopPropagation()}function E(e){e.preventDefault(),e.stopImmediatePropagation()}function S(t){if(!u){var n=t[0].currentStyle||window.getComputedStyle(t[0],null);u=e(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:n.fontSize,fontFamily:n.fontFamily,fontStyle:n.fontStyle,fontWeight:n.fontWeight,letterSpacing:n.letterSpacing,textTransform:n.textTransform,whiteSpace:"nowrap"}),u.attr("class","select2-sizer"),e("body").append(u)}return u.text(t.val()),u.width()}function x(t,n,r){var i,s=[],o;i=t.attr("class"),typeof i=="string"&&e(i.split(" ")).each2(function(){this.indexOf("select2-")===0&&s.push(this)}),i=n.attr("class"),typeof i=="string"&&e(i.split(" ")).each2(function(){this.indexOf("select2-")!==0&&(o=r(this),typeof o=="string"&&o.length>0&&s.push(this))}),t.attr("class",s.join(" "))}function T(e,t,n,r){var i=e.toUpperCase().indexOf(t.toUpperCase()),s=t.length;if(i<0){n.push(r(e));return}n.push(r(e.substring(0,i))),n.push("<span class='select2-match'>"),n.push(r(e.substring(i,i+s))),n.push("</span>"),n.push(r(e.substring(i+s,e.length)))}function N(t){var n,r=0,i=null,s=t.quietMillis||100,o=t.url,u=this;return function(a){window.clearTimeout(n),n=window.setTimeout(function(){r+=1;var n=r,s=t.data,f=o,l=t.transport||e.ajax,c=t.type||"GET",h={};s=s?s.call(u,a.term,a.page,a.context):null,f=typeof f=="function"?f.call(u,a.term,a.page,a.context):f,null!==i&&i.abort(),t.params&&(e.isFunction(t.params)?e.extend(h,t.params.call(u)):e.extend(h,t.params)),e.extend(h,{url:f,dataType:t.dataType,data:s,type:c,cache:!1,success:function(e){if(n<r)return;var i=t.results(e,a.page);a.callback(i)}}),i=l.call(u,h)},s)}}function C(t){var n=t,r,i,s=function(e){return""+e.text};e.isArray(n)&&(i=n,n={results:i}),e.isFunction(n)===!1&&(i=n,n=function(){return i});var o=n();return o.text&&(s=o.text,e.isFunction(s)||(r=n.text,s=function(e){return e[r]})),function(t){var r=t.term,i={results:[]},o;if(r===""){t.callback(n());return}o=function(n,i){var u,a;n=n[0];if(n.children){u={};for(a in n)n.hasOwnProperty(a)&&(u[a]=n[a]);u.children=[],e(n.children).each2(function(e,t){o(t,u.children)}),(u.children.length||t.matcher(r,s(u),n))&&i.push(u)}else t.matcher(r,s(n),n)&&i.push(n)},e(n().results).each2(function(e,t){o(t,i.results)}),t.callback(i)}}function k(n){var r=e.isFunction(n);return function(i){var s=i.term,o={results:[]};e(r?n():n).each(function(){var e=this.text!==t,n=e?this.text:this;(s===""||i.matcher(s,n))&&o.results.push(e?this:{id:this,text:this})}),i.callback(o)}}function L(t,n){if(e.isFunction(t))return!0;if(!t)return!1;throw new Error("formatterName must be a function or a falsy value")}function A(t){return e.isFunction(t)?t():t}function O(t){var n=0;return e.each(t,function(e,t){t.children?n+=O(t.children):n++}),n}function M(e,n,r,i){var s=e,o=!1,u,a,f,l,h;if(!i.createSearchChoice||!i.tokenSeparators||i.tokenSeparators.length<1)return t;for(;;){a=-1;for(f=0,l=i.tokenSeparators.length;f<l;f++){h=i.tokenSeparators[f],a=e.indexOf(h);if(a>=0)break}if(a<0)break;u=e.substring(0,a),e=e.substring(a+h.length);if(u.length>0){u=i.createSearchChoice(u,n);if(u!==t&&u!==null&&i.id(u)!==t&&i.id(u)!==null){o=!1;for(f=0,l=n.length;f<l;f++)if(c(i.id(u),i.id(n[f]))){o=!0;break}o||r(u)}}}if(s!==e)return e}function _(t,n){var r=function(){};return r.prototype=new t,r.prototype.constructor=r,r.prototype.parent=t.prototype,r.prototype=e.extend(r.prototype,n),r}var n,r,i,s,o,u,a,f;n={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(e){e=e.which?e.which:e;switch(e){case n.LEFT:case n.RIGHT:case n.UP:case n.DOWN:return!0}return!1},isControl:function(e){var t=e.which;switch(t){case n.SHIFT:case n.CTRL:case n.ALT:return!0}return e.metaKey?!0:!1},isFunctionKey:function(e){return e=e.which?e.which:e,e>=112&&e<=123}},f=e(document),o=function(){var e=1;return function(){return e++}}(),f.bind("mousemove",function(e){a={x:e.pageX,y:e.pageY}}),r=_(Object,{bind:function(e){var t=this;return function(){e.apply(t,arguments)}},init:function(n){var r,i,s=".select2-results",u;this.opts=n=this.prepareOpts(n),this.id=n.id,n.element.data("select2")!==t&&n.element.data("select2")!==null&&this.destroy(),this.enabled=!0,this.container=this.createContainer(),this.containerId="s2id_"+(n.element.attr("id")||"autogen"+o()),this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.body=g(function(){return n.element.closest("body")}),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.css(A(n.containerCss)),this.container.addClass(A(n.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabIndex"),this.opts.element.data("select2",this).addClass("select2-offscreen").bind("focus.select2",function(){e(this).select2("focus")}).attr("tabIndex","-1").before(this.container),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),this.dropdown.addClass(A(n.dropdownCssClass)),this.dropdown.data("select2",this),this.results=r=this.container.find(s),this.search=i=this.container.find("input.select2-input"),i.attr("tabIndex",this.elementTabIndex),this.resultsPage=0,this.context=null,this.initContainer(),v(this.results),this.dropdown.delegate(s,"mousemove-filtered touchstart touchmove touchend",this.bind(this.highlightUnderEvent)),y(80,this.results),this.dropdown.delegate(s,"scroll-debounced",this.bind(this.loadMoreIfNeeded)),e.fn.mousewheel&&r.mousewheel(function(e,t,n,i){var s=r.scrollTop(),o;i>0&&s-i<=0?(r.scrollTop(0),w(e)):i<0&&r.get(0).scrollHeight-r.scrollTop()+i<=r.height()&&(r.scrollTop(r.get(0).scrollHeight-r.height()),w(e))}),d(i),i.bind("keyup-change input paste",this.bind(this.updateResults)),i.bind("focus",function(){i.addClass("select2-focused")}),i.bind("blur",function(){i.removeClass("select2-focused")}),this.dropdown.delegate(s,"mouseup",this.bind(function(t){e(t.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(t),this.selectHighlighted(t))})),this.dropdown.bind("click mouseup mousedown",function(e){e.stopPropagation()}),e.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),(n.element.is(":disabled")||n.element.is("[readonly='readonly']"))&&this.disable()},destroy:function(){var e=this.opts.element.data("select2");this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),e!==t&&(e.container.remove(),e.dropdown.remove(),e.opts.element.removeClass("select2-offscreen").removeData("select2").unbind(".select2").attr({tabIndex:this.elementTabIndex}).show())},prepareOpts:function(n){var r,i,s,o;r=n.element,r.get(0).tagName.toLowerCase()==="select"&&(this.select=i=n.element),i&&e.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in n)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),n=e.extend({},{populateResults:function(r,i,s){var o,u,a,f,l=this.opts.id,c=this;o=function(r,i,u){var a,f,h,p,d,v,m,g,y,b;r=n.sortResults(r,i,s);for(a=0,f=r.length;a<f;a+=1)h=r[a],d=h.disabled===!0,p=!d&&l(h)!==t,v=h.children&&h.children.length>0,m=e("<li></li>"),m.addClass("select2-results-dept-"+u),m.addClass("select2-result"),m.addClass(p?"select2-result-selectable":"select2-result-unselectable"),d&&m.addClass("select2-disabled"),v&&m.addClass("select2-result-with-children"),m.addClass(c.opts.formatResultCssClass(h)),g=e(document.createElement("div")),g.addClass("select2-result-label"),b=n.formatResult(h,g,s,c.opts.escapeMarkup),b!==t&&g.html(b),m.append(g),v&&(y=e("<ul></ul>"),y.addClass("select2-result-sub"),o(h.children,y,u+1),m.append(y)),m.data("select2-data",h),i.append(m)},o(i,r,0)}},e.fn.select2.defaults,n),typeof n.id!="function"&&(s=n.id,n.id=function(e){return e[s]});if(e.isArray(n.element.data("select2Tags"))){if("tags"in n)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+n.element.attr("id");n.tags=n.element.attr("data-select2-tags")}i?(n.query=this.bind(function(n){var i={results:[],more:!1},s=n.term,o,u,a;a=function(e,t){var r;e.is("option")?n.matcher(s,e.text(),e)&&t.push({id:e.attr("value"),text:e.text(),element:e.get(),css:e.attr("class"),disabled:c(e.attr("disabled"),"disabled")}):e.is("optgroup")&&(r={text:e.attr("label"),children:[],element:e.get(),css:e.attr("class")},e.children().each2(function(e,t){a(t,r.children)}),r.children.length>0&&t.push(r))},o=r.children(),this.getPlaceholder()!==t&&o.length>0&&(u=o[0],e(u).text()===""&&(o=o.not(u))),o.each2(function(e,t){a(t,i.results)}),n.callback(i)}),n.id=function(e){return e.id},n.formatResultCssClass=function(e){return e.css}):"query"in n||("ajax"in n?(o=n.element.data("ajax-url"),o&&o.length>0&&(n.ajax.url=o),n.query=N.call(n.element,n.ajax)):"data"in n?n.query=C(n.data):"tags"in n&&(n.query=k(n.tags),n.createSearchChoice===t&&(n.createSearchChoice=function(e){return{id:e,text:e}}),n.initSelection===t&&(n.initSelection=function(t,r){var i=[];e(h(t.val(),n.separator)).each(function(){var t=this,r=this,s=n.tags;e.isFunction(s)&&(s=s()),e(s).each(function(){if(c(this.id,t))return r=this.text,!1}),i.push({id:t,text:r})}),r(i)})));if(typeof n.query!="function")throw"query function not defined for Select2 "+n.element.attr("id");return n},monitorSource:function(){var e=this.opts.element,t;e.bind("change.select2",this.bind(function(e){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),t=this.bind(function(){var e,t,n=this;e=this.opts.element.attr("disabled")!=="disabled",t=this.opts.element.attr("readonly")==="readonly",e=e&&!t,this.enabled!==e&&(e?this.enable():this.disable()),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(A(this.opts.containerCssClass)),x(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(A(this.opts.dropdownCssClass))}),e.bind("propertychange.select2 DOMAttrModified.select2",t),typeof WebKitMutationObserver!="undefined"&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new WebKitMutationObserver(function(e){e.forEach(t)}),this.propertyObserver.observe(e.get(0),{attributes:!0,subtree:!1}))},triggerChange:function(t){t=t||{},t=e.extend({},t,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(t),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},enable:function(){if(this.enabled)return;this.enabled=!0,this.container.removeClass("select2-container-disabled"),this.opts.element.removeAttr("disabled")},disable:function(){if(!this.enabled)return;this.close(),this.enabled=!1,this.container.addClass("select2-container-disabled"),this.opts.element.attr("disabled","disabled")},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var t=this.container.offset(),n=this.container.outerHeight(!1),r=this.container.outerWidth(!1),i=this.dropdown.outerHeight(!1),s=e(window).scrollLeft()+e(window).width(),o=e(window).scrollTop()+e(window).height(),u=t.top+n,a=t.left,f=u+i<=o,l=t.top-i>=this.body().scrollTop(),c=this.dropdown.outerWidth(!1),h=a+c<=s,p=this.dropdown.hasClass("select2-drop-above"),d,v,m;this.body().css("position")!=="static"&&(d=this.body().offset(),u-=d.top,a-=d.left),p?(v=!0,!l&&f&&(v=!1)):(v=!1,!f&&l&&(v=!0)),h||(a=t.left+r-c),v?(u=t.top-i,this.container.addClass("select2-drop-above"),this.dropdown.addClass("select2-drop-above")):(this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")),m=e.extend({top:u,left:a,width:r},A(this.opts.dropdownCss)),this.dropdown.css(m)},shouldOpen:function(){var t;return this.opened()?!1:(t=e.Event("opening"),this.opts.element.trigger(t),!t.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(window.setTimeout(this.bind(this.opening),1),!0):!1},opening:function(){var t=this.containerId,n="scroll."+t,r="resize."+t,i="orientationchange."+t,s;this.clearDropdownAlignmentPreference(),this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.dropdown[0]!==this.body().children().last()[0]&&this.dropdown.detach().appendTo(this.body()),this.updateResults(!0),s=e("#select2-drop-mask"),s.length==0&&(s=e(document.createElement("div")),s.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),s.hide(),s.appendTo(this.body()),s.bind("mousedown touchstart",function(t){var n=e("#select2-drop"),r;n.length>0&&(r=n.data("select2"),r.opts.selectOnBlur&&r.selectHighlighted({noFocus:!0}),r.close())})),this.dropdown.prev()[0]!==s[0]&&this.dropdown.before(s),e("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),s.css({width:document.documentElement.scrollWidth,height:document.documentElement.scrollHeight}),s.show(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active"),this.ensureHighlightVisible();var o=this;this.container.parents().add(window).each(function(){e(this).bind(r+" "+n+" "+i,function(t){e("#select2-drop-mask").css({width:document.documentElement.scrollWidth,height:document.documentElement.scrollHeight}),o.positionDropdown()})}),this.focusSearch()},close:function(){if(!this.opened())return;var t=this.containerId,n="scroll."+t,r="resize."+t,i="orientationchange."+t;this.container.parents().add(window).each(function(){e(this).unbind(n).unbind(r).unbind(i)}),this.clearDropdownAlignmentPreference(),e("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open"),this.results.empty(),this.clearSearch(),this.opts.element.trigger(e.Event("close"))},clearSearch:function(){},getMaximumSelectionSize:function(){return A(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var t=this.results,n,r,i,s,o,u,a;r=this.highlight();if(r<0)return;if(r==0){t.scrollTop(0);return}n=this.findHighlightableChoices(),i=e(n[r]),s=i.offset().top+i.outerHeight(!0),r===n.length-1&&(a=t.find("li.select2-more-results"),a.length>0&&(s=a.offset().top+a.outerHeight(!0))),o=t.offset().top+t.outerHeight(!0),s>o&&t.scrollTop(t.scrollTop()+(s-o)),u=i.offset().top-t.offset().top,u<0&&i.css("display")!="none"&&t.scrollTop(t.scrollTop()+u)},findHighlightableChoices:function(){var e=this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)");return this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)")},moveHighlight:function(t){var n=this.findHighlightableChoices(),r=this.highlight();while(r>-1&&r<n.length){r+=t;var i=e(n[r]);if(i.hasClass("select2-result-selectable")&&!i.hasClass("select2-disabled")&&!i.hasClass("select2-selected")){this.highlight(r);break}}},highlight:function(t){var n=this.findHighlightableChoices(),r,i;if(arguments.length===0)return l(n.filter(".select2-highlighted")[0],n.get());t>=n.length&&(t=n.length-1),t<0&&(t=0),this.results.find(".select2-highlighted").removeClass("select2-highlighted"),r=e(n[t]),r.addClass("select2-highlighted"),this.ensureHighlightVisible(),i=r.data("select2-data"),i&&this.opts.element.trigger({type:"highlight",val:this.id(i),choice:i})},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(t){var n=e(t.target).closest(".select2-result-selectable");if(n.length>0&&!n.is(".select2-highlighted")){var r=this.findHighlightableChoices();this.highlight(r.index(n))}else n.length==0&&this.results.find(".select2-highlighted").removeClass("select2-highlighted")},loadMoreIfNeeded:function(){var e=this.results,t=e.find("li.select2-more-results"),n,r=-1,i=this.resultsPage+1,s=this,o=this.search.val(),u=this.context;if(t.length===0)return;n=t.offset().top-e.offset().top-e.height(),n<=this.opts.loadMorePadding&&(t.addClass("select2-active"),this.opts.query({element:this.opts.element,term:o,page:i,context:u,matcher:this.opts.matcher,callback:this.bind(function(n){if(!s.opened())return;s.opts.populateResults.call(this,e,n.results,{term:o,page:i,context:u}),n.more===!0?(t.detach().appendTo(e).text(s.opts.formatLoadMore(i+1)),window.setTimeout(function(){s.loadMoreIfNeeded()},10)):t.remove(),s.positionDropdown(),s.resultsPage=i,s.context=n.context})}))},tokenize:function(){},updateResults:function(n){function f(){i.scrollTop(0),r.removeClass("select2-active"),u.positionDropdown()}function l(e){i.html(e),f()}var r=this.search,i=this.results,s=this.opts,o,u=this,a;if(n!==!0&&(this.showSearchInput===!1||!this.opened()))return;r.addClass("select2-active");var h=this.getMaximumSelectionSize();if(h>=1){o=this.data();if(e.isArray(o)&&o.length>=h&&L(s.formatSelectionTooBig,"formatSelectionTooBig")){l("<li class='select2-selection-limit'>"+s.formatSelectionTooBig(h)+"</li>");return}}if(r.val().length<s.minimumInputLength){L(s.formatInputTooShort,"formatInputTooShort")?l("<li class='select2-no-results'>"+s.formatInputTooShort(r.val(),s.minimumInputLength)+"</li>"):l("");return}s.formatSearching()&&n===!0&&l("<li class='select2-searching'>"+s.formatSearching()+"</li>");if(s.maximumInputLength&&r.val().length>s.maximumInputLength){L(s.formatInputTooLong,"formatInputTooLong")?l("<li class='select2-no-results'>"+s.formatInputTooLong(r.val(),s.maximumInputLength)+"</li>"):l("");return}a=this.tokenize(),a!=t&&a!=null&&r.val(a),this.resultsPage=1,s.query({element:s.element,term:r.val(),page:this.resultsPage,context:null,matcher:s.matcher,callback:this.bind(function(o){var a;if(!this.opened())return;this.context=o.context===t?null:o.context,this.opts.createSearchChoice&&r.val()!==""&&(a=this.opts.createSearchChoice.call(null,r.val(),o.results),a!==t&&a!==null&&u.id(a)!==t&&u.id(a)!==null&&e(o.results).filter(function(){return c(u.id(this),u.id(a))}).length===0&&o.results.unshift(a));if(o.results.length===0&&L(s.formatNoMatches,"formatNoMatches")){l("<li class='select2-no-results'>"+s.formatNoMatches(r.val())+"</li>");return}i.empty(),u.opts.populateResults.call(this,i,o.results,{term:r.val(),page:this.resultsPage,context:null}),o.more===!0&&L(s.formatLoadMore,"formatLoadMore")&&(i.append("<li class='select2-more-results'>"+u.opts.escapeMarkup(s.formatLoadMore(this.resultsPage))+"</li>"),window.setTimeout(function(){u.loadMoreIfNeeded()},10)),this.postprocessResults(o,n),f()})})},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){b(this.search)},selectHighlighted:function(e){var t=this.highlight(),n=this.results.find(".select2-highlighted"),r=n.closest(".select2-result").data("select2-data");r&&(this.highlight(t),this.onSelect(r,e))},getPlaceholder:function(){return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder},initContainerWidth:function(){function n(){var n,r,i,s,o;if(this.opts.width==="off")return null;if(this.opts.width==="element")return this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px";if(this.opts.width==="copy"||this.opts.width==="resolve"){n=this.opts.element.attr("style");if(n!==t){r=n.split(";");for(s=0,o=r.length;s<o;s+=1){i=r[s].replace(/\s/g,"").match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/);if(i!==null&&i.length>=1)return i[1]}}return this.opts.width==="resolve"?(n=this.opts.element.css("width"),n.indexOf("%")>0?n:this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px"):null}return e.isFunction(this.opts.width)?this.opts.width():this.opts.width}var r=n.call(this);r!==null&&this.container.css("width",r)}}),i=_(r,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' onclick='return false;' class='select2-choice' tabindex='-1'>"," <span></span><abbr class='select2-search-choice-close' style='display:none;'></abbr>"," <div><b></b></div>","</a>","<input class='select2-focusser select2-offscreen' type='text'/>","<div class='select2-drop' style='display:none'>"," <div class='select2-search'>"," <input type='text' autocomplete='off' class='select2-input'/>"," </div>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return t},disable:function(){if(!this.enabled)return;this.parent.disable.apply(this,arguments),this.focusser.attr("disabled","disabled")},enable:function(){if(this.enabled)return;this.parent.enable.apply(this,arguments),this.focusser.removeAttr("disabled")},opening:function(){this.parent.opening.apply(this,arguments),this.focusser.attr("disabled","disabled"),this.opts.element.trigger(e.Event("open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments),this.focusser.removeAttr("disabled"),b(this.focusser)},focus:function(){this.opened()?this.close():(this.focusser.removeAttr("disabled"),this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.removeAttr("disabled"),this.focusser.focus()},initContainer:function(){var e,t=this.container,r=this.dropdown,i=!1;this.showSearch(this.opts.minimumResultsForSearch>=0),this.selection=e=t.find(".select2-choice"),this.focusser=t.find(".select2-focusser"),this.search.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.PAGE_UP||e.which===n.PAGE_DOWN){w(e);return}switch(e.which){case n.UP:case n.DOWN:this.moveHighlight(e.which===n.UP?-1:1),w(e);return;case n.TAB:case n.ENTER:this.selectHighlighted(),w(e);return;case n.ESC:this.cancel(e),w(e);return}})),this.focusser.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.TAB||n.isControl(e)||n.isFunctionKey(e)||e.which===n.ESC)return;if(this.opts.openOnEnter===!1&&e.which===n.ENTER){w(e);return}if(e.which==n.DOWN||e.which==n.UP||e.which==n.ENTER&&this.opts.openOnEnter){this.open(),w(e);return}if(e.which==n.DELETE||e.which==n.BACKSPACE){this.opts.allowClear&&this.clear(),w(e);return}})),d(this.focusser),this.focusser.bind("keyup-change input",this.bind(function(e){if(this.opened())return;this.open(),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.focusser.val(""),w(e)})),e.delegate("abbr","mousedown",this.bind(function(e){if(!this.enabled)return;this.clear(),E(e),this.close(),this.selection.focus()})),e.bind("mousedown",this.bind(function(e){i=!0,this.opened()?this.close():this.enabled&&this.open(),w(e),i=!1})),r.bind("mousedown",this.bind(function(){this.search.focus()})),e.bind("focus",this.bind(function(e){w(e)})),this.focusser.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})).bind("blur",this.bind(function(){this.opened()||this.container.removeClass("select2-container-active")})),this.search.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.setPlaceholder()},clear:function(){var e=this.selection.data("select2-data");this.opts.element.val(""),this.selection.find("span").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),this.opts.element.trigger({type:"removed",val:this.id(e),choice:e}),this.triggerChange({removed:e})},initSelection:function(){var e;if(this.opts.element.val()===""&&this.opts.element.text()==="")this.close(),this.setPlaceholder();else{var n=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==t&&e!==null&&(n.updateSelection(e),n.close(),n.setPlaceholder())})}},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments);return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(t,n){var r=t.find(":selected");e.isFunction(n)&&n({id:r.attr("value"),text:r.text(),element:r})}:"data"in t&&(t.initSelection=t.initSelection||function(n,r){var i=n.val();t.query({matcher:function(e,n,r){return c(i,t.id(r))},callback:e.isFunction(r)?function(e){r(e.results.length?e.results[0]:null)}:e.noop})}),t},getPlaceholder:function(){return this.select&&this.select.find("option").first().text()!==""?t:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var e=this.getPlaceholder();if(this.opts.element.val()===""&&e!==t){if(this.select&&this.select.find("option:first").text()!=="")return;this.selection.find("span").html(this.opts.escapeMarkup(e)),this.selection.addClass("select2-default"),this.selection.find("abbr").hide()}},postprocessResults:function(e,t){var n=0,r=this,i=!0;this.findHighlightableChoices().each2(function(e,t){if(c(r.id(t.data("select2-data")),r.opts.element.val()))return n=e,!1}),this.highlight(n);if(t===!0){var s=this.opts.minimumResultsForSearch;i=s<0?!1:O(e.results)>=s,this.showSearch(i)}},showSearch:function(t){this.showSearchInput=t,this.dropdown.find(".select2-search")[t?"removeClass":"addClass"]("select2-search-hidden"),e(this.dropdown,this.container)[t?"addClass":"removeClass"]("select2-with-searchbox")},onSelect:function(e,t){var n=this.opts.element.val();this.opts.element.val(this.id(e)),this.updateSelection(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),this.close(),(!t||!t.noFocus)&&this.selection.focus(),c(n,this.id(e))||this.triggerChange()},updateSelection:function(e){var n=this.selection.find("span"),r;this.selection.data("select2-data",e),n.empty(),r=this.opts.formatSelection(e,n),r!==t&&n.append(this.opts.escapeMarkup(r)),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==t&&this.selection.find("abbr").show()},val:function(){var e,n=!1,r=null,i=this;if(arguments.length===0)return this.opts.element.val();e=arguments[0],arguments.length>1&&(n=arguments[1]);if(this.select)this.select.val(e).find(":selected").each2(function(e,t){return r={id:t.attr("value"),text:t.text()},!1}),this.updateSelection(r),this.setPlaceholder(),n&&this.triggerChange();else{if(this.opts.initSelection===t)throw new Error("cannot call val() if initSelection() is not defined");if(!e&&e!==0){this.clear(),n&&this.triggerChange();return}this.opts.element.val(e),this.opts.initSelection(this.opts.element,function(e){i.opts.element.val(e?i.id(e):""),i.updateSelection(e),i.setPlaceholder(),n&&i.triggerChange()})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(e){var n;if(arguments.length===0)return n=this.selection.data("select2-data"),n==t&&(n=null),n;!e||e===""?this.clear():(this.opts.element.val(e?this.id(e):""),this.updateSelection(e))}}),s=_(r,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html([" <ul class='select2-choices'>"," <li class='select2-search-field'>"," <input type='text' autocomplete='off' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi' style='display:none;'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return t},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments);return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(e,t){var n=[];e.find(":selected").each2(function(e,t){n.push({id:t.attr("value"),text:t.text(),element:t[0]})}),t(n)}:"data"in t&&(t.initSelection=t.initSelection||function(n,r){var i=h(n.val(),t.separator);t.query({matcher:function(n,r,s){return e.grep(i,function(e){return c(e,t.id(s))}).length},callback:e.isFunction(r)?function(e){r(e.results)}:e.noop})}),t},initContainer:function(){var t=".select2-choices",r;this.searchContainer=this.container.find(".select2-search-field"),this.selection=r=this.container.find(t),this.search.bind("input paste",this.bind(function(){if(!this.enabled)return;this.opened()||this.open()})),this.search.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.BACKSPACE&&this.search.val()===""){this.close();var t,i=r.find(".select2-search-choice-focus");if(i.length>0){this.unselect(i.first()),this.search.width(10),w(e);return}t=r.find(".select2-search-choice:not(.select2-locked)"),t.length>0&&t.last().addClass("select2-search-choice-focus")}else r.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");if(this.opened())switch(e.which){case n.UP:case n.DOWN:this.moveHighlight(e.which===n.UP?-1:1),w(e);return;case n.ENTER:case n.TAB:this.selectHighlighted(),w(e);return;case n.ESC:this.cancel(e),w(e);return}if(e.which===n.TAB||n.isControl(e)||n.isFunctionKey(e)||e.which===n.BACKSPACE||e.which===n.ESC)return;if(e.which===n.ENTER){if(this.opts.openOnEnter===!1)return;if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return}this.open(),(e.which===n.PAGE_UP||e.which===n.PAGE_DOWN)&&w(e)})),this.search.bind("keyup",this.bind(this.resizeSearch)),this.search.bind("blur",this.bind(function(e){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.opened()||this.clearSearch(),e.stopImmediatePropagation()})),this.container.delegate(t,"mousedown",this.bind(function(t){if(!this.enabled)return;if(e(t.target).closest(".select2-search-choice").length>0)return;this.clearPlaceholder(),this.open(),this.focusSearch(),t.preventDefault()})),this.container.delegate(t,"focus",this.bind(function(){if(!this.enabled)return;this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder()})),this.initContainerWidth(),this.clearSearch()},enable:function(){if(this.enabled)return;this.parent.enable.apply(this,arguments),this.search.removeAttr("disabled")},disable:function(){if(!this.enabled)return;this.parent.disable.apply(this,arguments),this.search.attr("disabled",!0)},initSelection:function(){var e;this.opts.element.val()===""&&this.opts.element.text()===""&&(this.updateSelection([]),this.close(),this.clearSearch());if(this.select||this.opts.element.val()!==""){var n=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==t&&e!==null&&(n.updateSelection(e),n.close(),n.clearSearch())})}},clearSearch:function(){var e=this.getPlaceholder();e!==t&&this.getVal().length===0&&this.search.hasClass("select2-focused")===!1?(this.search.val(e).addClass("select2-default"),this.resizeSearch()):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.parent.opening.apply(this,arguments),this.clearPlaceholder(),this.resizeSearch(),this.focusSearch(),this.opts.element.trigger(e.Event("open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus(),this.opts.element.triggerHandler("focus")},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(t){var n=[],r=[],i=this;e(t).each(function(){l(i.id(this),n)<0&&(n.push(i.id(this)),r.push(this))}),t=r,this.selection.find(".select2-search-choice").remove(),e(t).each(function(){i.addSelectedChoice(this)}),i.postprocessResults()},tokenize:function(){var e=this.search.val();e=this.opts.tokenizer(e,this.data(),this.bind(this.onSelect),this.opts),e!=null&&e!=t&&(this.search.val(e),e.length>0&&this.open())},onSelect:function(e,t){this.addSelectedChoice(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.val().length>=this.getMaximumSelectionSize()&&this.updateResults(!0),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:e}),(!t||!t.noFocus)&&this.focusSearch()},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(n){var r=!n.locked,i=e("<li class='select2-search-choice'> <div></div> <a href='#' onclick='return false;' class='select2-search-choice-close' tabindex='-1'></a></li>"),s=e("<li class='select2-search-choice select2-locked'><div></div></li>"),o=r?i:s,u=this.id(n),a=this.getVal(),f;f=this.opts.formatSelection(n,o.find("div")),f!=t&&o.find("div").replaceWith("<div>"+this.opts.escapeMarkup(f)+"</div>"),r&&o.find(".select2-search-choice-close").bind("mousedown",w).bind("click dblclick",this.bind(function(t){if(!this.enabled)return;e(t.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(e(t.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),this.close(),this.focusSearch()})).dequeue(),w(t)})).bind("focus",this.bind(function(){if(!this.enabled)return;this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active")})),o.data("select2-data",n),o.insertBefore(this.searchContainer),a.push(u),this.setVal(a)},unselect:function(e){var t=this.getVal(),n,r;e=e.closest(".select2-search-choice");if(e.length===0)throw"Invalid argument: "+e+". Must be .select2-search-choice";n=e.data("select2-data");if(!n)return;r=l(this.id(n),t),r>=0&&(t.splice(r,1),this.setVal(t),this.select&&this.postprocessResults()),e.remove(),this.opts.element.trigger({type:"removed",val:this.id(n),choice:n}),this.triggerChange({removed:n})},postprocessResults:function(){var e=this.getVal(),t=this.results.find(".select2-result"),n=this.results.find(".select2-result-with-children"),r=this;t.each2(function(t,n){var i=r.id(n.data("select2-data"));l(i,e)>=0&&(n.addClass("select2-selected"),n.find(".select2-result-selectable").addClass("select2-selected"))}),n.each2(function(e,t){!t.is(".select2-result-selectable")&&t.find(".select2-result-selectable:not(.select2-selected)").length===0&&t.addClass("select2-selected")}),this.highlight()==-1&&r.highlight(0)},resizeSearch:function(){var e,t,n,r,i,s=p(this.search);e=S(this.search)+10,t=this.search.offset().left,n=this.selection.width(),r=this.selection.offset().left,i=n-(t-r)-s,i<e&&(i=n-s),i<40&&(i=n-s),i<=0&&(i=e),this.search.width(i)},getVal:function(){var e;return this.select?(e=this.select.val(),e===null?[]:e):(e=this.opts.element.val(),h(e,this.opts.separator))},setVal:function(t){var n;this.select?this.select.val(t):(n=[],e(t).each(function(){l(this,n)<0&&n.push(this)}),this.opts.element.val(n.length===0?"":n.join(this.opts.separator)))},val:function(){var n,r=!1,i=[],s=this;if(arguments.length===0)return this.getVal();n=arguments[0],arguments.length>1&&(r=arguments[1]);if(!n&&n!==0){this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),r&&this.triggerChange();return}this.setVal(n);if(this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),r&&this.triggerChange();else{if(this.opts.initSelection===t)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(t){var n=e(t).map(s.id);s.setVal(n),s.updateSelection(t),s.clearSearch(),r&&s.triggerChange()})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var t=[],n=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){t.push(n.opts.id(e(this).data("select2-data")))}),this.setVal(t),this.triggerChange()},data:function(t){var n=this,r;if(arguments.length===0)return this.selection.find(".select2-search-choice").map(function(){return e(this).data("select2-data")}).get();t||(t=[]),r=e.map(t,function(e){return n.opts.id(e)}),this.setVal(r),this.updateSelection(t),this.clearSearch()}}),e.fn.select2=function(){var n=Array.prototype.slice.call(arguments,0),r,o,u,a,f=["val","destroy","opened","open","close","focus","isFocused","container","onSortStart","onSortEnd","enable","disable","positionDropdown","data"];return this.each(function(){if(n.length===0||typeof n[0]=="object")r=n.length===0?{}:e.extend({},n[0]),r.element=e(this),r.element.get(0).tagName.toLowerCase()==="select"?a=r.element.attr("multiple"):(a=r.multiple||!1,"tags"in r&&(r.multiple=a=!0)),o=a?new s:new i,o.init(r);else{if(typeof n[0]!="string")throw"Invalid arguments to select2 plugin: "+n;if(l(n[0],f)<0)throw"Unknown method: "+n[0];u=t,o=e(this).data("select2");if(o===t)return;n[0]==="container"?u=o.container:u=o[n[0]].apply(o,n.slice(1));if(u!==t)return!1}}),u===t?this:u},e.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(e,t,n,r){var i=[];return T(e.text,n.term,i,r),i.join("")},formatSelection:function(e,n){return e?e.text:t},sortResults:function(e,t,n){return e},formatResultCssClass:function(e){return t},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(e,t){var n=t-e.length;return"Please enter "+n+" more character"+(n==1?"":"s")},formatInputTooLong:function(e,t){var n=e.length-t;return"Please enter "+n+" less character"+(n==1?"":"s")},formatSelectionTooBig:function(e){return"You can only select "+e+" item"+(e==1?"":"s")},formatLoadMore:function(e){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(e){return e.id},matcher:function(e,t){return t.toUpperCase().indexOf(e.toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:M,escapeMarkup:function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(e).replace(/[&<>"'/\\]/g,function(e){return t[e[0]]})},blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(e){return e},adaptDropdownCssClass:function(e){return null}}}(e)}),timely.define("scripts/add_new_event",["jquery_timely","domReady","ai1ec_config","scripts/add_new_event/event_location/gmaps_helper","scripts/add_new_event/event_location/input_coordinates_event_handlers","scripts/add_new_event/event_location/input_coordinates_utility_functions","scripts/add_new_event/event_date_time/date_time_event_handlers","scripts/add_new_event/event_cost_helper","external_libs/jquery.calendrical_timespan","external_libs/jquery.inputdate","external_libs/jquery.tools","external_libs/ai1ec_datepicker","external_libs/bootstrap/transition","external_libs/bootstrap/collapse","external_libs/bootstrap/modal","external_libs/bootstrap/alert","external_libs/bootstrap/tab","external_libs/select2"],function(e,t,n,r,i,s,o,u,a){var f=function(){var t=new Date(n.now*1e3),r={allday:"#ai1ec_all_day_event",start_date_input:"#ai1ec_start-date-input",start_time_input:"#ai1ec_start-time-input",start_time:"#ai1ec_start-time",end_date_input:"#ai1ec_end-date-input",end_time_input:"#ai1ec_end-time-input",end_time:"#ai1ec_end-time",date_format:n.date_format,month_names:n.month_names,day_names:n.day_names,week_start_day:n.week_start_day,twentyfour_hour:n.twentyfour_hour,now:t};e.timespan(r);var i=e("#ai1ec_exdate").val(),s=null,o=!1,u;if(i.length>=8){s=[];var f=[];e.each(i.split(","),function(e,t){var r=t.slice(0,8),i=r.substr(0,4),o=r.substr(4,2);u=r.substr(6,2),o=o.charAt(0)==="0"?"0"+(parseInt(o.charAt(1),10)-1):parseInt(o,10)-1,s.push(new Date(i,o,u)),f.push(a.formatDate(new Date(i,o,u),n.date_format,!0))}),e("#ai1ec_exclude-dates-input").text(f.join(", "))}else s=new Date(n.now*1e3),o=!0,e("#ai1ec_exclude-dates-input").text(e("#ai1ec_exclude-dates-input").data("placeholder"));e("#widgetCalendar").DatePicker({flat:!0,calendars:3,mode:"multiple",starts:n.week_start_day,date:s,onChange:function(t){t=t.toString();if(t.length>=8){var r="",i=[];e.each(t.split(","),function(e,t){i.push(a.formatDate(new Date(t),n.date_format)),r+=t.replace(/-/g,"")+"T000000Z,"}),e("#ai1ec_exclude-dates-input").text(i.join(", ")),r=r.slice(0,r.length-1),e("#ai1ec_exdate").val(r)}else e("#ai1ec_exdate").val(""),e("#ai1ec_exclude-dates-input").text(e("#ai1ec_exclude-dates-input").data("placeholder"))},prev:"«",next:"»",month_link_inactive:!0,locale:{daysMin:n.day_names.split(","),months:n.month_names.split(",")}}),o&&e("#widgetCalendar").DatePickerClear(),e(document).on("mousedown.exclude",function(t){var n=e("#widgetCalendar"),r=e("#ai1ec_exclude-dates-input");!n.is(t.target)&&!r.is(t.target)&&0===n.has(t.target).length&&e("#widgetCalendar").hide()})},l=function(){e(".ai1ec-panel-collapse").on("hide",function(){e(this).parent().removeClass("ai1ec-overflow-visible")}),e(".ai1ec-panel-collapse").on("shown",function(){var t=e(this);window.setTimeout(function(){t.parent().addClass("ai1ec-overflow-visible")},350)})},c=function(){f(),timely.require(["libs/gmaps"],function(e){e(r.init_gmaps)})},h=function(t,n){var r=null;"[object Array]"===Object.prototype.toString.call(n)?r=n.join("<br>"):r=n,e("#ai1ec_event_inline_alert").html(r),e("#ai1ec_event_inline_alert").removeClass("ai1ec-hidden"),t.preventDefault(),e("#publish, #ai1ec_bottom_publish").removeClass("button-primary-disabled"),e("#publish, #ai1ec_bottom_publish").removeClass("disabled"),e("#publish, #ai1ec_bottom_publish").siblings("#ajax-loading, .spinner").css("visibility","hidden")},p=function(t){s.ai1ec_check_lat_long_fields_filled_when_publishing_event(t)===!0&&(s.ai1ec_convert_commas_to_dots_for_coordinates(),s.ai1ec_check_lat_long_ok_for_search(t));var r=!1,i=[];e("#ai1ec_ticket_url, #ai1ec_contact_url").each(function(){var t=this.value;e(this).removeClass("ai1ec-input-warn"),e(this).closest(".ai1ec-panel-collapse").parent().find(".ai1ec-panel-heading .ai1ec-fa-warning").addClass("ai1ec-hidden").parent().css("color","");if(""!==t){var s=/(http|https):\/\//;if(!s.test(t)){e(this).closest(".ai1ec-panel-collapse").parent().find(".ai1ec-panel-heading .ai1ec-fa-warning").removeClass("ai1ec-hidden").parent().css("color","rgb(255, 79, 79)"),r||e(this).closest(".ai1ec-panel-collapse").collapse("show"),r=!0;var o=e(this).attr("id")+"_not_valid";i.push(n[o]),e(this).addClass("ai1ec-input-warn")}}}),r&&(i.push(n.general_url_not_valid),h(t,i))},d=function(){e("#ai1ec_google_map").click(i.toggle_visibility_of_google_map_on_click),e("#ai1ec_input_coordinates").change(i.toggle_visibility_of_coordinate_fields_on_click),e("#post").submit(p),e("input.coordinates").blur(i.update_map_from_coordinates_on_blur),e("#ai1ec_bottom_publish").on("click",o.trigger_publish),e(document).on("change","#ai1ec_end",o.show_end_fields).on("click","#ai1ec_repeat_apply",o.handle_click_on_apply_button).on("click","#ai1ec_repeat_cancel",o.handle_click_on_cancel_modal).on("click","#ai1ec_monthly_type_bymonthday, #ai1ec_monthly_type_byday",o.handle_checkbox_monthly_tab_modal).on("click",".ai1ec-btn-group-grid a",o.handle_click_on_toggle_buttons),e("#ai1ec_repeat_box").on("hidden.bs.modal",o.handle_modal_hide),o.execute_pseudo_handlers(),e("#widgetField > a").on("click",o.handle_animation_of_calendar_widget),e("#ai1ec_is_free").on("change",u.handle_change_is_free)},v=function(){e("#ai1ec_event").insertAfter("#ai1ec_event_inline_alert"),e("#post").addClass("ai1ec-visible")},m=function(){e("#timezone-select").select2()},g=function(){c(),t(function(){l(),v(),d(),m()})};return{start:g}}),timely.require(["scripts/add_new_event"],function(e){e.start()}),timely.define("pages/add_new_event",function(){});
|
139 |
the specific language governing permissions and limitations under the Apache License and the GPL License.
|
140 |
*/
|
141 |
|
142 |
+
timely.define("domReady",[],function(){function u(e){var t;for(t=0;t<e.length;t++)e[t](n)}function a(){var e=r;t&&e.length&&(r=[],u(e))}function f(){t||(t=!0,o&&clearInterval(o),a())}function c(e){return t?e(n):r.push(e),c}var e=typeof window!="undefined"&&window.document,t=!e,n=e?document:null,r=[],i,s,o;if(e){if(document.addEventListener)document.addEventListener("DOMContentLoaded",f,!1),window.addEventListener("load",f,!1);else if(window.attachEvent){window.attachEvent("onload",f),s=document.createElement("div");try{i=window.frameElement===null}catch(l){}s.doScroll&&i&&window.external&&(o=setInterval(function(){try{s.doScroll(),f()}catch(e){}},30))}(document.readyState==="complete"||document.readyState==="interactive")&&f()}return c.version="2.0.0",c.load=function(e,t,n,r){r.isBuild?n(null):c(n)},c}),timely.define("external_libs/bootstrap/tab",["jquery_timely"],function(e){var t=function(t){this.element=e(t)};t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.ai1ec-dropdown-menu)"),r=t.data("target");r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("ai1ec-active"))return;var i=n.find(".ai1ec-active:last a")[0],s=e.Event("show.bs.tab",{relatedTarget:i});t.trigger(s);if(s.isDefaultPrevented())return;var o=e(r);this.activate(t.parent("li"),n),this.activate(o,o.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:i})})},t.prototype.activate=function(t,n,r){function o(){i.removeClass("ai1ec-active").find("> .ai1ec-dropdown-menu > .ai1ec-active").removeClass("ai1ec-active"),t.addClass("ai1ec-active"),s?(t[0].offsetWidth,t.addClass("ai1ec-in")):t.removeClass("ai1ec-fade"),t.parent(".ai1ec-dropdown-menu")&&t.closest("li.ai1ec-dropdown").addClass("ai1ec-active"),r&&r()}var i=n.find("> .ai1ec-active"),s=r&&e.support.transition&&i.hasClass("ai1ec-fade");s?i.one(e.support.transition.end,o).emulateTransitionEnd(150):o(),i.removeClass("ai1ec-in")};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tab");i||r.data("bs.tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.bs.tab.data-api",'[data-toggle="ai1ec-tab"], [data-toggle="ai1ec-pill"]',function(t){t.preventDefault(),e(this).tab("show")})}),timely.define("libs/utils",["jquery_timely","external_libs/bootstrap/tab"],function(e){var t=function(){return{is_float:function(e){return!isNaN(parseFloat(e))},is_valid_coordinate:function(e,t){var n=t?90:180;return this.is_float(e)&&Math.abs(e)<n},convert_comma_to_dot:function(e){return e.replace(",",".")},field_has_value:function(t){var n="#"+t,r=e(n),i=!1;return r.length===1&&(i=e.trim(r.val())!==""),i},make_alert:function(t,n,r){var i="";switch(n){case"error":i="ai1ec-alert ai1ec-alert-danger";break;case"success":i="ai1ec-alert ai1ec-alert-success";break;default:i="ai1ec-alert"}var s=e("<div />",{"class":i,html:t});if(!r){var o=e("<button>",{type:"button","class":"ai1ec-close","data-dismiss":"ai1ec-alert",text:"×"});s.prepend(o)}return s},get_ajax_url:function(){return typeof window.ajaxurl=="undefined"?"http://localhost/wordpress/wp-admin/admin-ajax.php":window.ajaxurl},isUrl:function(e){var t=/(http|https|webcal):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)},isValidEmail:function(e){var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)},activate_saved_tab_on_page_load:function(t){null===t||undefined===t?e("ul.ai1ec-nav a:first").tab("show"):e("ul.ai1ec-nav a[href="+t+"]").tab("show")},add_query_arg:function(e,t){var n=e.indexOf("?")===-1?"?":"&";return-1!==e.indexOf(n+t[0]+"=")?e:e+n+t[0]+"="+t[1]},init_autoselect:function(){e(document).one("click",".ai1ec-autoselect",function(t){if(e(this).data("clicked")&&t.originalEvent.detail<2)return;e(this).data("clicked",!0);var n;document.body.createTextRange?(n=document.body.createTextRange(),n.moveToElementText(this),n.select()):window.getSelection&&(selection=window.getSelection(),n=document.createRange(),n.selectNodeContents(this),selection.removeAllRanges(),selection.addRange(n))})}}}();return t}),timely.define("scripts/add_new_event/event_location/input_coordinates_utility_functions",["jquery_timely","ai1ec_config","libs/utils"],function(e,t,n){var r=function(){e("#ai1ec_input_coordinates:checked").length>0&&e("#ai1ec_table_coordinates input.coordinates").each(function(){this.value=n.convert_comma_to_dot(this.value)})},i=function(t,n){var r=e("<div />",{text:n,"class":"ai1ec-error"});e(t).after(r)},s=function(t,n){t.target.id==="post"&&(t.stopImmediatePropagation(),t.preventDefault(),e("#publish").removeClass("button-primary-disabled"),e("#publish").siblings(".spinner").css("visibility","hidden")),e(n).focus()},o=function(){var t=n.field_has_value("ai1ec_address"),r=!0;return e(".coordinates").each(function(){var e=n.field_has_value(this.id);e||(r=!1)}),t||r},u=function(n){var r=!0,o=!1;return e("#ai1ec_input_coordinates:checked").length>0&&(e("div.ai1ec-error").remove(),e("#ai1ec_table_coordinates input.coordinates").each(function(){var n=e(this).hasClass("latitude"),s=n?t.error_message_not_entered_lat:t.error_message_not_entered_long;this.value===""&&(r=!1,o===!1&&(o=this),i(this,s))})),r===!1&&s(n,o),r},a=function(r){if(e("#ai1ec_input_coordinates:checked").length===1){e("div.ai1ec-error").remove();var o=!0,u=!1,a=!1;return e("#ai1ec_table_coordinates input.coordinates").each(function(){if(this.value===""){a=!0;return}var r=e(this).hasClass("latitude"),s=r?t.error_message_not_valid_lat:t.error_message_not_valid_long;n.is_valid_coordinate(this.value,r)||(o=!1,u===!1&&(u=this),i(this,s))}),o===!1&&s(r,u),a===!0&&(o=!1),o}};return{ai1ec_convert_commas_to_dots_for_coordinates:r,ai1ec_show_error_message_after_element:i,check_if_address_or_coordinates_are_set:o,ai1ec_check_lat_long_fields_filled_when_publishing_event:u,ai1ec_check_lat_long_ok_for_search:a}}),timely.define("external_libs/jquery.autocomplete_geomod",["jquery_timely"],function(e){e.fn.extend({autocomplete:function(t,n){var r=typeof t=="string";return n=e.extend({},e.Autocompleter.defaults,{url:r?t:null,data:r?null:t,delay:r?e.Autocompleter.defaults.delay:10,max:n&&!n.scroll?10:150},n),n.highlight=n.highlight||function(e){return e},n.formatMatch=n.formatMatch||n.formatItem,this.each(function(){new e.Autocompleter(this,n)})},result:function(e){return this.bind("result",e)},search:function(e){return this.trigger("search",[e])},flushCache:function(){return this.trigger("flushCache")},setOptions:function(e){return this.trigger("setOptions",[e])},unautocomplete:function(){return this.trigger("unautocomplete")}}),e.Autocompleter=function(t,n){function d(){var r=h.selected();if(!r)return!1;var s=r.result;o=s;if(n.multiple){var u=m(i.val());if(u.length>1){var a=n.multipleSeparator.length,f=e(t).selection().start,l,c=0;e.each(u,function(e,t){c+=t.length;if(f<=c)return l=e,!1;c+=a}),u[l]=s,s=u.join(n.multipleSeparator)}s+=n.multipleSeparator}return i.val(s),w(),i.trigger("result",[r.data,r.value]),!0}function v(e,t){if(f==r.DEL){h.hide();return}var s=i.val();if(!t&&s==o)return;o=s,s=g(s),s.length>=n.minChars?(i.addClass(n.loadingClass),n.matchCase||(s=s.toLowerCase()),S(s,E,w)):(T(),h.hide())}function m(t){return t?n.multiple?e.map(t.split(n.multipleSeparator),function(n){return e.trim(t).length?e.trim(n):null}):[e.trim(t)]:[""]}function g(r){if(!n.multiple)return r;var i=m(r);if(i.length==1)return i[0];var s=e(t).selection().start;return s==r.length?i=m(r):i=m(r.replace(r.substring(s),"")),i[i.length-1]}function y(s,u){n.autoFill&&g(i.val()).toLowerCase()==s.toLowerCase()&&f!=r.BACKSPACE&&(i.val(i.val()+u.substring(g(o).length)),e(t).selection(o.length,o.length+u.length))}function b(){clearTimeout(s),s=setTimeout(w,200)}function w(){var e=h.visible();h.hide(),clearTimeout(s),T(),n.mustMatch&&i.search(function(e){if(!e)if(n.multiple){var t=m(i.val()).slice(0,-1);i.val(t.join(n.multipleSeparator)+(t.length?n.multipleSeparator:""))}else i.val(""),i.trigger("result",null)})}function E(e,t){t&&t.length&&a?(T(),h.display(t,e),y(e,t[0].value),h.show()):w()}function S(r,i,s){n.matchCase||(r=r.toLowerCase());var o=u.load(r);if(o&&o.length)i(r,o);else if(n.geocoder){var a=g(r),f={address:a};n.region&&(f.region=n.region),n.geocoder.geocode(f,function(e,t){var s=n.parse(e,t,a);u.add(r,s),i(r,s)})}else if(typeof n.url=="string"&&n.url.length>0){var l={timestamp:+(new Date)};e.each(n.extraParams,function(e,t){l[e]=typeof t=="function"?t():t}),e.ajax({mode:"abort",port:"autocomplete"+t.name,dataType:n.dataType,url:n.url,data:e.extend({q:g(r),limit:n.max},l),success:function(e){var t=n.parse&&n.parse(e)||x(e);u.add(r,t),i(r,t)}})}else h.emptyList(),s(r)}function x(t){var r=[],i=t.split("\n");for(var s=0;s<i.length;s++){var o=e.trim(i[s]);o&&(o=o.split("|"),r[r.length]={data:o,value:o[0],result:n.formatResult&&n.formatResult(o,o[0])||o[0]})}return r}function T(){i.removeClass(n.loadingClass)}var r={UP:38,DOWN:40,DEL:46,TAB:9,RETURN:13,ESC:27,COMMA:188,PAGEUP:33,PAGEDOWN:34,BACKSPACE:8},i=e(t).attr("autocomplete","off").addClass(n.inputClass),s,o="",u=e.Autocompleter.Cache(n),a=0,f,l=navigator.userAgent.match(/opera/i),c={mouseDownOnSelect:!1},h=e.Autocompleter.Select(n,t,d,c),p;l&&e(t.form).bind("submit.autocomplete",function(){if(p)return p=!1,!1}),i.bind((l?"keypress":"keydown")+".autocomplete",function(t){a=1,f=t.keyCode;switch(t.keyCode){case r.UP:t.preventDefault(),h.visible()?h.prev():v(0,!0);break;case r.DOWN:t.preventDefault(),h.visible()?h.next():v(0,!0);break;case r.PAGEUP:t.preventDefault(),h.visible()?h.pageUp():v(0,!0);break;case r.PAGEDOWN:t.preventDefault(),h.visible()?h.pageDown():v(0,!0);break;case n.multiple&&e.trim(n.multipleSeparator)==","&&r.COMMA:case r.TAB:case r.RETURN:if(d())return t.preventDefault(),p=!0,!1;break;case r.ESC:h.hide();break;default:clearTimeout(s),s=setTimeout(v,n.delay)}}).focus(function(){a++}).blur(function(){a=0,c.mouseDownOnSelect||b()}).click(function(){a++>1&&!h.visible()&&v(0,!0)}).bind("search",function(){function n(e,n){var r;if(n&&n.length)for(var s=0;s<n.length;s++)if(n[s].result.toLowerCase()==e.toLowerCase()){r=n[s];break}typeof t=="function"?t(r):i.trigger("result",r&&[r.data,r.value])}var t=arguments.length>1?arguments[1]:null;e.each(m(i.val()),function(e,t){S(t,n,n)})}).bind("flushCache",function(){u.flush()}).bind("setOptions",function(){e.extend(n,arguments[1]),"data"in arguments[1]&&u.populate()}).bind("unautocomplete",function(){h.unbind(),i.unbind(),e(t.form).unbind(".autocomplete")})},e.Autocompleter.defaults={inputClass:"ac_input",resultsClass:"ac_results",loadingClass:"ac_loading",minChars:1,delay:400,matchCase:!1,matchSubset:!0,matchContains:!1,cacheLength:10,max:100,mustMatch:!1,extraParams:{},selectFirst:!0,formatItem:function(e){return e[0]},formatMatch:null,autoFill:!1,width:0,multiple:!1,multipleSeparator:", ",highlight:function(e,t){return e.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)("+t.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi,"\\$1")+")(?![^<>]*>)(?![^&;]+;)","gi"),"<strong>$1</strong>")},scroll:!0,scrollHeight:180},e.Autocompleter.Cache=function(t){function i(e,n){t.matchCase||(e=e.toLowerCase());var r=e.indexOf(n);return t.matchContains=="word"&&(r=e.toLowerCase().search("\\b"+n.toLowerCase())),r==-1?!1:r==0||t.matchContains}function s(e,i){r>t.cacheLength&&u(),n[e]||r++,n[e]=i}function o(){if(!t.data)return!1;var n={},r=0;t.url||(t.cacheLength=1),n[""]=[];for(var i=0,o=t.data.length;i<o;i++){var u=t.data[i];u=typeof u=="string"?[u]:u;var a=t.formatMatch(u,i+1,t.data.length);if(a===!1)continue;var f=a.charAt(0).toLowerCase();n[f]||(n[f]=[]);var l={value:a,data:u,result:t.formatResult&&t.formatResult(u)||a};n[f].push(l),r++<t.max&&n[""].push(l)}e.each(n,function(e,n){t.cacheLength++,s(e,n)})}function u(){n={},r=0}var n={},r=0;return setTimeout(o,25),{flush:u,add:s,populate:o,load:function(s){if(!t.cacheLength||!r)return null;if(!t.url&&t.matchContains){var o=[];for(var u in n)if(u.length>0){var a=n[u];e.each(a,function(e,t){i(t.value,s)&&o.push(t)})}return o}if(n[s])return n[s];if(t.matchSubset)for(var f=s.length-1;f>=t.minChars;f--){var a=n[s.substr(0,f)];if(a){var o=[];return e.each(a,function(e,t){i(t.value,s)&&(o[o.length]=t)}),o}}return null}}},e.Autocompleter.Select=function(t,n,r,i){function p(){if(!l)return;c=e("<div/>").hide().addClass(t.resultsClass).css("position","absolute").appendTo(document.body),h=e("<ul/>").appendTo(c).mouseover(function(t){d(t).nodeName&&d(t).nodeName.toUpperCase()=="LI"&&(u=e("li",h).removeClass(s.ACTIVE).index(d(t)),e(d(t)).addClass(s.ACTIVE))}).click(function(t){return e(d(t)).addClass(s.ACTIVE),r(),n.focus(),!1}).mousedown(function(){i.mouseDownOnSelect=!0}).mouseup(function(){i.mouseDownOnSelect=!1}),t.width>0&&c.css("width",t.width),l=!1}function d(e){var t=e.target;while(t&&t.tagName!="LI")t=t.parentNode;return t?t:[]}function v(e){o.slice(u,u+1).removeClass(s.ACTIVE),m(e);var n=o.slice(u,u+1).addClass(s.ACTIVE);if(t.scroll){var r=0;o.slice(0,u).each(function(){r+=this.offsetHeight}),r+n[0].offsetHeight-h.scrollTop()>h[0].clientHeight?h.scrollTop(r+n[0].offsetHeight-h.innerHeight()):r<h.scrollTop()&&h.scrollTop(r)}}function m(e){u+=e,u<0?u=o.size()-1:u>=o.size()&&(u=0)}function g(e){return t.max&&t.max<e?t.max:e}function y(){h.empty();var n=g(a.length);for(var r=0;r<n;r++){if(!a[r])continue;var i=t.formatItem(a[r].data,r+1,n,a[r].value,f);if(i===!1)continue;var l=e("<li/>").html(t.highlight(i,f)).addClass(r%2==0?"ac_even":"ac_odd").appendTo(h)[0];e.data(l,"ac_data",a[r])}o=h.find("li"),t.selectFirst&&(o.slice(0,1).addClass(s.ACTIVE),u=0),e.fn.bgiframe&&h.bgiframe()}var s={ACTIVE:"ac_over"},o,u=-1,a,f="",l=!0,c,h;return{display:function(e,t){p(),a=e,f=t,y()},next:function(){v(1)},prev:function(){v(-1)},pageUp:function(){u!=0&&u-8<0?v(-u):v(-8)},pageDown:function(){u!=o.size()-1&&u+8>o.size()?v(o.size()-1-u):v(8)},hide:function(){c&&c.hide(),o&&o.removeClass(s.ACTIVE),u=-1},visible:function(){return c&&c.is(":visible")},current:function(){return this.visible()&&(o.filter("."+s.ACTIVE)[0]||t.selectFirst&&o[0])},show:function(){var r=e(n).offset();c.css({width:typeof t.width=="string"||t.width>0?t.width:e(n).width(),top:r.top+n.offsetHeight,left:r.left}).show();if(t.scroll){h.scrollTop(0),h.css({maxHeight:t.scrollHeight,overflow:"auto"});if(navigator.userAgent.match(/msie/i)&&typeof document.body.style.maxHeight=="undefined"){var i=0;o.each(function(){i+=this.offsetHeight});var s=i>t.scrollHeight;h.css("height",s?t.scrollHeight:i),s||o.width(h.width()-parseInt(o.css("padding-left"))-parseInt(o.css("padding-right")))}}},selected:function(){var t=o&&o.filter("."+s.ACTIVE).removeClass(s.ACTIVE);return t&&t.length&&e.data(t[0],"ac_data")},emptyList:function(){h&&h.empty()},unbind:function(){c&&c.remove()}}},e.fn.selection=function(e,t){if(e!==undefined)return this.each(function(){if(this.createTextRange){var n=this.createTextRange();t===undefined||e==t?(n.move("character",e),n.select()):(n.collapse(!0),n.moveStart("character",e),n.moveEnd("character",t),n.select())}else this.setSelectionRange?this.setSelectionRange(e,t):this.selectionStart&&(this.selectionStart=e,this.selectionEnd=t)});var n=this[0];if(n.createTextRange){var r=document.selection.createRange(),i=n.value,s="<->",o=r.text.length;r.text=s;var u=n.value.indexOf(s);return n.value=i,this.selection(u,u+o),{start:u,end:u+o}}if(n.selectionStart!==undefined)return{start:n.selectionStart,end:n.selectionEnd}}}),timely.define("external_libs/geo_autocomplete",["jquery_timely","external_libs/jquery.autocomplete_geomod"],function(e){e.fn.extend({geo_autocomplete:function(t,n){return options=e.extend({},e.Autocompleter.defaults,{geocoder:t,mapwidth:100,mapheight:100,maptype:"terrain",mapkey:"ABQIAAAAbnvDoAoYOSW2iqoXiGTpYBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQNumU68AwGqjbSNF9YO8NokKst8w",mapsensor:!1,parse:function(t,n,r){var i=[];return t&&n&&n=="OK"&&e.each(t,function(t,n){if(n.geometry&&n.geometry.viewport){var s=n.formatted_address.split(","),o=s[0];e.each(s,function(t,n){if(n.toLowerCase().indexOf(r.toLowerCase())!=-1)return o=e.trim(n),!1}),i.push({data:n,value:o,result:o})}}),i},formatItem:function(e,t,n,r){var i="https://maps.google.com/maps/api/staticmap?visible="+e.geometry.viewport.getSouthWest().toUrlValue()+"|"+e.geometry.viewport.getNorthEast().toUrlValue()+"&size="+options.mapwidth+"x"+options.mapheight+"&maptype="+options.maptype+"&key="+options.mapkey+"&sensor="+(options.mapsensor?"true":"false"),s=e.formatted_address.replace(/,/gi,",<br/>");return'<img src="'+i+'" width="'+options.mapwidth+'" height="'+options.mapheight+'" /> '+s+'<br clear="both"/>'}},n),options.highlight=options.highlight||function(e){return e},options.formatMatch=options.formatMatch||options.formatItem,options.resultsClass="ai1ec-geo-ac-results-not-ready",this.each(function(){e(this).one("focus",function(){var t=setInterval(function(){var n=e(".ai1ec-geo-ac-results-not-ready");n.length&&(n.removeClass("ai1ec-geo-ac-results-not-ready").addClass("ai1ec-geo-ac-results").children("ul").addClass("ai1ec-dropdown-menu"),clearInterval(t))},500)}),new e.Autocompleter(this,options)})}})}),timely.define("scripts/add_new_event/event_location/gmaps_helper",["jquery_timely","domReady","ai1ec_config","scripts/add_new_event/event_location/input_coordinates_utility_functions","external_libs/jquery.autocomplete_geomod","external_libs/geo_autocomplete"],function(e,t,n,r){var i,s,o,u,a,f,l=function(t){e("input.longitude").val(t.latLng.lng()),e("input.latitude").val(t.latLng.lat()),e("#ai1ec_input_coordinates:checked").length===0&&e("#ai1ec_input_coordinates").trigger("click")},c=function(){!navigator.geolocation||navigator.geolocation.getCurrentPosition(function(e){var t=r.check_if_address_or_coordinates_are_set();if(t===!1){var n=e.coords.latitude,i=e.coords.longitude;s=new google.maps.LatLng(n,i),a.setPosition(s),u.setCenter(s),u.setZoom(15),f=e}})},h=function(){n.disable_autocompletion||e("#ai1ec_address").geo_autocomplete(new google.maps.Geocoder,{selectFirst:!1,minChars:3,cacheLength:50,width:300,scroll:!0,scrollHeight:330,region:n.region}).result(function(e,t){t&&d(t)}).change(function(){if(e(this).val().length>0){var t=e(this).val();i.geocode({address:t,region:n.region},function(e,t){t===google.maps.GeocoderStatus.OK&&d(e[0])})}})},p=function(){i=new google.maps.Geocoder,s=new google.maps.LatLng(9.965,-83.327),o={zoom:0,mapTypeId:google.maps.MapTypeId.ROADMAP,center:s},t(function(){e("#ai1ec_map_canvas").length>0&&(u=new google.maps.Map(e("#ai1ec_map_canvas").get(0),o),a=new google.maps.Marker({map:u,draggable:!0}),google.maps.event.addListener(a,"dragend",l),a.setPosition(s),c(),h(),m())})},d=function(t){u.setCenter(t.geometry.location),u.setZoom(15),a.setPosition(t.geometry.location),e("#ai1ec_address").val(t.formatted_address),e("#ai1ec_latitude").val(t.geometry.location.lat()),e("#ai1ec_longitude").val(t.geometry.location.lng()),e("#ai1ec_input_coordinates").is(":checked")||e("#ai1ec_input_coordinates").click();var n="",r="",i="",s=0,o=0,f="",l;for(var c=0;c<t.address_components.length;c++)switch(t.address_components[c].types[0]){case"street_number":n=t.address_components[c].long_name;break;case"route":r=t.address_components[c].long_name;break;case"locality":i=t.address_components[c].long_name;break;case"administrative_area_level_1":f=t.address_components[c].long_name;break;case"postal_code":s=t.address_components[c].long_name;break;case"country":l=t.address_components[c].short_name,o=t.address_components[c].long_name}var h=n.length>0?n+" ":"";h+=r.length>0?r:"",s=s!==0?s:"",e("#ai1ec_city").val(i),e("#ai1ec_province").val(f),e("#ai1ec_postal_code").val(s),e("#ai1ec_country").val(o),e("#ai1ec_country_short").val(l)},v=function(){var t=parseFloat(e("input.latitude").val()),n=parseFloat(e("input.longitude").val()),r=new google.maps.LatLng(t,n);u.setCenter(r),u.setZoom(15),a.setPosition(r)},m=function(){e("#ai1ec_input_coordinates:checked").length===0?(e("#ai1ec_table_coordinates").css({visibility:"hidden"}),e("#ai1ec_address").change()):v()},g=function(){return a},y=function(){return f};return{init_gmaps:p,ai1ec_update_map_from_coordinates:v,get_marker:g,get_position:y}}),timely.define("scripts/add_new_event/event_location/input_coordinates_event_handlers",["jquery_timely","scripts/add_new_event/event_location/input_coordinates_utility_functions","scripts/add_new_event/event_location/gmaps_helper","ai1ec_config"],function(e,t,n,r){var i=function(t){e(this).is(":checked")?e(".ai1ec_box_map").addClass("ai1ec_box_map_visible").hide().slideDown("fast"):e(".ai1ec_box_map").slideUp("fast")},s=function(t){this.checked===!0?e("#ai1ec_table_coordinates").css({visibility:"visible"}):(e("#ai1ec_table_coordinates").css({visibility:"hidden"}),e("#ai1ec_table_coordinates input").val(""),e("div.ai1ec-error").remove())},o=function(e){t.ai1ec_convert_commas_to_dots_for_coordinates();var r=t.ai1ec_check_lat_long_ok_for_search(e);r===!0&&n.ai1ec_update_map_from_coordinates()};return{toggle_visibility_of_google_map_on_click:i,toggle_visibility_of_coordinate_fields_on_click:s,update_map_from_coordinates_on_blur:o}}),timely.define("scripts/add_new_event/event_date_time/date_time_utility_functions",["jquery_timely","ai1ec_config","libs/utils"],function(e,t,n){var r=n.get_ajax_url(),i=function(t,n,r,i,s,o){e(t).val(i),e("#ai1ec_repeat_box").modal("hide");var u=e.trim(e(n).text());u.lastIndexOf(":")===-1&&(u=u.substring(0,u.length-3),e(n).text(u+":")),e(s).attr("disabled",!1),e(r).fadeOut("fast",function(){e(this).text(o.message),e(this).fadeIn("fast")})},s=function(t,n,r,i){e("#ai1ec_repeat_box .ai1ec-alert-danger").text(r.message).removeClass("ai1ec-hide"),e(i).attr("disabled",!1),e(t).val("");var s=e.trim(e(n).text());s.lastIndexOf("...")===-1&&(s=s.substring(0,s.length-1),e(n).text(s+"...")),e(this).closest("tr").find(".ai1ec_rule_text").text()===""&&e(t).siblings("input:checkbox").removeAttr("checked")},o=function(t,n,r,i,s){e(document).on("click",t,function(){if(!e(n).is(":checked")){e(n).attr("checked",!0);var t=e.trim(e(r).text());t=t.substring(0,t.length-3),e(r).text(t+":")}return l(i,s),!1})},u=function(t,n,r,i,s){e(t).click(function(){if(e(this).is(":checked"))this.id==="ai1ec_repeat"&&e("#ai1ec_exclude").removeAttr("disabled"),l(i,s);else{this.id==="ai1ec_repeat"&&e("#ai1ec_exclude").attr("disabled",!0),e(n).text("");var t=e.trim(e(r).text());t=t.substring(0,t.length-1),e(r).text(t+"...")}})},a=function(t,n,r){if(e.trim(e(t).text())===""){e(n).removeAttr("checked"),e("#ai1ec_repeat").is(":checked")||e("#ai1ec_exclude").attr("disabled",!0);var i=e.trim(e(r).text());i.lastIndexOf("...")===-1&&(i=i.substring(0,i.length-1),e(r).text(i+"..."))}},f=function(){e("#ai1ec_count, #ai1ec_daily_count, #ai1ec_weekly_count, #ai1ec_monthly_count, #ai1ec_yearly_count").rangeinput({css:{input:"ai1ec-range",slider:"ai1ec-slider",progress:"ai1ec-progress",handle:"ai1ec-handle"}});var n={start_date_input:"#ai1ec_until-date-input",start_time:"#ai1ec_until-time",date_format:t.date_format,month_names:t.month_names,day_names:t.day_names,week_start_day:t.week_start_day,twentyfour_hour:t.twentyfour_hour,now:new Date(t.now*1e3)};e.inputdate(n)},l=function(t,n){var i=e("#ai1ec_repeat_box"),s=e(".ai1ec-loading",i);i.modal({backdrop:"static"}),e.post(r,t,function(e){e.error?(window.alert(e.message),i.modal("hide")):(s.addClass("ai1ec-hide").after(e.message),typeof n=="function"&&n())},"json")};return{show_repeat_tabs:l,init_modal_widgets:f,click_on_modal_cancel:a,click_on_checkbox:u,click_on_ics_rule_text:o,repeat_form_error:s,repeat_form_success:i}}),timely.define("external_libs/jquery.calendrical_timespan",["jquery_timely"],function(e){function l(){var e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function c(e,t){return typeof e=="string"&&(e=new Date(e)),typeof t=="string"&&(t=new Date(t)),e.getUTCDate()===t.getUTCDate()&&e.getUTCMonth()===t.getUTCMonth()&&e.getUTCFullYear()===t.getUTCFullYear()?!0:!1}function h(e,t){if(e instanceof Date)return h(e.getUTCFullYear(),e.getUTCMonth());if(t==1){var n=e%4==0&&(e%100!=0||e%400==0);return n?29:28}return t==3||t==5||t==8||t==10?30:31}function p(e){return new Date(e.getTime()+864e5)}function d(e){return new Date(e.getTime()-864e5)}function v(e,t){return t==11?new Date(e+1,0,1):new Date(e,t+1,1)}function m(t,n,r,i){var s=i.monthNames.split(","),o=e("<thead />"),u=e("<tr />").appendTo(o);e("<th />").addClass("monthCell").append(e('<a href="javascript:;">«</a>').addClass("prevMonth").mousedown(function(e){g(t,r==0?n-1:n,r==0?11:r-1,i),e.preventDefault()})).appendTo(u),e("<th />").addClass("monthCell").attr("colSpan",5).append(e('<a href="javascript:;">'+s[r]+" "+n+"</a>").addClass("monthName")).appendTo(u),e("<th />").addClass("monthCell").append(e('<a href="javascript:;">»</a>').addClass("nextMonth").mousedown(function(){g(t,r==11?n+1:n,r==11?0:r+1,i)})).appendTo(u);var a=i.dayNames.split(","),f=parseInt(i.weekStartDay),l=[];for(var c=0,h=a.length;c<h;c++)l[c]=a[(c+f)%h];var p=e("<tr />").appendTo(o);return e.each(l,function(t,n){e("<td />").addClass("dayName").append(n).appendTo(p)}),o}function g(t,n,r,i){i=i||{};var s=parseInt(i.weekStartDay),o=i.today?i.today:l();o.setHours(0),o.setMinutes(0);var u=new Date(n,r,1),a=v(n,r),f=Math.abs(o.getTimezoneOffset());f!=0&&(o.setHours(o.getHours()+f/60),o.setMinutes(o.getMinutes()+f%60),u.setHours(u.getHours()+f/60),u.setMinutes(u.getMinutes()+f%60),a.setHours(a.getHours()+f/60),a.setMinutes(a.getMinutes()+f%60));var h=a.getUTCDay()-s;h<0?h=Math.abs(h)-1:h=6-h;for(var g=0;g<h;g++)a=p(a);var y=e("<table />");m(t,n,r,i).appendTo(y);var b=e("<tbody />").appendTo(y),w=e("<tr />"),E=u.getUTCDay()-s;E<0&&(E=7+E);for(var g=0;g<E;g++)u=d(u);while(u<=a){var S=e("<td />").addClass("day").append(e('<a href="javascript:;">'+u.getUTCDate()+"</a>").click(function(){var e=u;return function(){i&&i.selectDate&&i.selectDate(e)}}())).appendTo(w),x=c(u,o),T=i.selected&&c(i.selected,u);x&&S.addClass("today"),T&&S.addClass("selected"),x&&T&&S.addClass("today_selected"),u.getUTCMonth()!=r&&S.addClass("nonMonth");var N=u.getUTCDay();(N+1)%7==s&&(b.append(w),w=e("<tr />")),u=p(u)}w.children().length?b.append(w):w.remove(),t.empty().append(y)}function y(t,n){var r=n.selection&&f(n.selection);r&&(r.minute=Math.floor(r.minute/15)*15);var i=n.startTime&&n.startTime.hour*60+n.startTime.minute,s,o=e("<ul />");for(var a=0;a<24;a++)for(var l=0;l<60;l+=15){if(i&&i>a*60+l)continue;(function(){var t=u(a,l,n.isoTime),f=t;if(i!=null){var c=a*60+l-i;c<60?f+=" ("+c+" min)":c==60?f+=" (1 hr)":f+=" ("+Math.floor(c/60)+" hr "+c%60+" min)"}var h=e("<li />").append(e('<a href="javascript:;">'+f+"</a>").click(function(){n&&n.selectTime&&n.selectTime(t)}).mousemove(function(){e("li.selected",o).removeClass("selected")})).appendTo(o);!s&&a==n.defaultHour&&(s=h),r&&r.hour==a&&r.minute==l&&(h.addClass("selected"),s=h)})()}s&&setTimeout(function(){t[0].scrollTop=s[0].offsetTop-s.height()*2},0),t.empty().append(o)}function b(e){e.addClass("error").fadeOut("normal",function(){e.val(e.data("timespan.stored")).removeClass("error").fadeIn("fast")})}function w(){e(this).data("timespan.stored",this.value)}function E(t,n,r,i,a,f,l,c,h,p){r.val(r.data("timespan.initial_value")),f.val(f.data("timespan.initial_value")),l.get(0).checked=l.data("timespan.initial_value");var d=s(r,p,0,15);n.val(u(d.getUTCHours(),d.getUTCMinutes(),c)),t.val(o(d,h));var v=s(f,d.getTime(),1,15);a.val(u(v.getUTCHours(),v.getUTCMinutes(),c)),l.get(0).checked&&v.setUTCDate(v.getUTCDate()-1),i.val(o(v,h)),t.each(w),n.each(w),i.each(w),a.each(w),l.trigger("change.timespan"),e("#ai1ec_instant_event").trigger("change.timespan")}var t={us:{pattern:/([\d]{1,2})\/([\d]{1,2})\/([\d]{4}|[\d]{2})/,format:"m/d/y",order:"middleEndian",zeroPad:!1},iso:{pattern:/([\d]{4}|[\d]{2})-([\d]{1,2})-([\d]{1,2})/,format:"y-m-d",order:"bigEndian",zeroPad:!0},dot:{pattern:/([\d]{1,2}).([\d]{1,2}).([\d]{4}|[\d]{2})/,format:"d.m.y",order:"littleEndian",zeroPad:!1},def:{pattern:/([\d]{1,2})\/([\d]{1,2})\/([\d]{4}|[\d]{2})/,format:"d/m/y",order:"littleEndian",zeroPad:!1}},n=function(e){return e<10?"0"+e:e},r=function(e,t){typeof t=="undefined"&&(t=!1);var r=e.getUTCFullYear()+"-"+n(e.getUTCMonth()+1)+"-"+n(e.getUTCDate());return t&&(r+="T"+n(e.getUTCHours())+":"+n(e.getUTCMinutes())+":00"),r},i=function(e,t){var n=e.val(),r=null;if(n.length<4)r=new Date(t);else{r=new Date(n);var i=n.split("T"),s=i[0].split("-"),o=i[1].split(":");r.setUTCFullYear(s[0],s[1]-1,s[2]),r.setUTCHours(o[0],o[1],o[2],0)}return r},s=function(e,t,n,r){return t+=n*36e5,t-=t%(r*6e4),i(e,t)},o=function(e,n,r){var i,s,o;typeof t[n]=="undefined"&&(n="def"),typeof r=="undefined"&&(r=!1),!0===r?(i=e.getFullYear().toString(),s=(e.getMonth()+1).toString(),o=e.getDate().toString()):(i=e.getUTCFullYear().toString(),s=(e.getUTCMonth()+1).toString(),o=e.getUTCDate().toString()),t[n].zeroPad&&(s.length==1&&(s="0"+s),o.length==1&&(o="0"+o));var u=t[n].format;return u=u.replace("d",o),u=u.replace("m",s),u=u.replace("y",i),u},u=function(e,t,n){var r=t;t<10&&(r="0"+t);if(n){var i=e;return i<10&&(i="0"+e),i+":"+r}var i=e%12;i==0&&(i=12);var s=e<12?"am":"pm";return i+":"+r+s},a=function(e,n){typeof t[n]=="undefined"&&(n="def");var r=e.match(t[n].pattern);if(!r||r.length!=4)return Date("invalid");switch(t[n].order){case"bigEndian":var i=r[3],s=r[2],o=r[1];break;case"littleEndian":var i=r[1],s=r[2],o=r[3];break;case"middleEndian":var i=r[2],s=r[1],o=r[3];break;default:var i=r[1],s=r[2],o=r[3]}return o.length==2&&(o=(new Date).getUTCFullYear().toString().substr(0,2)+o),new Date(s+"/"+i+"/"+o+" GMT")},f=function(e){var t=t=/(\d+)\s*[:\-\.,]\s*(\d+)\s*(am|pm)?/i.exec(e);if(t&&t.length>=3){var n=Number(t[1]),r=Number(t[2]);return n==12&&t[3]&&(n-=12),t[3]&&t[3].toLowerCase()=="pm"&&(n+=12),{hour:n,minute:r}}return null};e.fn.calendricalDate=function(t){return t=t||{},t.padding=t.padding||4,t.monthNames=t.monthNames||"January,February,March,April,May,June,July,August,September,October,November,December",t.dayNames=t.dayNames||"S,M,T,W,T,F,S",t.weekStartDay=t.weekStartDay||0,this.each(function(){var n=e(this),r,i=!1;n.bind("focus",function(){if(r)return;var s=n.position(),u=n.css("padding-left");r=e("<div />").addClass("calendricalDatePopup").mouseenter(function(){i=!0}).mouseleave(function(){i=!1}).mousedown(function(e){e.preventDefault()}).css({position:"absolute",left:s.left,top:s.top+n.height()+t.padding*2}),n.after(r);var f=a(n.val(),t.dateFormat);f.getUTCFullYear()||(f=t.today?t.today:l()),g(r,f.getUTCFullYear(),f.getUTCMonth(),{today:t.today,selected:f,monthNames:t.monthNames,dayNames:t.dayNames,weekStartDay:t.weekStartDay,selectDate:function(e){i=!1,n.val(o(e,t.dateFormat)),r.remove(),r=null;if(t.endDate){var s=a(t.endDate.val(),t.dateFormat);s>=f&&t.endDate.val(o(new Date(e.getTime()+s.getTime()-f.getTime()),t.dateFormat))}}})}).blur(function(){if(i){r&&n.focus();return}if(!r)return;r.remove(),r=null})})},e.fn.calendricalDateRange=function(t){return this.length>=2&&(e(this[0]).calendricalDate(e.extend({endDate:e(this[1])},t)),e(this[1]).calendricalDate(t)),this},e.fn.calendricalDateRangeSingle=function(t){return this.length==1&&e(this).calendricalDate(t),this},e.fn.calendricalTime=function(t){return t=t||{},t.padding=t.padding||4,this.each(function(){var n=e(this),r,i=!1;n.bind("focus click",function(){if(r)return;var s=t.startTime;s&&t.startDate&&t.endDate&&!c(a(t.startDate.val()),a(t.endDate.val()))&&(s=!1);var o=n.position();r=e("<div />").addClass("calendricalTimePopup").mouseenter(function(){i=!0}).mouseleave(function(){i=!1}).mousedown(function(e){e.preventDefault()}).css({position:"absolute",left:o.left,top:o.top+n.height()+t.padding*2}),s&&r.addClass("calendricalEndTimePopup"),n.after(r);var u={selection:n.val(),selectTime:function(e){i=!1,n.val(e),r.remove(),r=null},isoTime:t.isoTime||!1,defaultHour:t.defaultHour!=null?t.defaultHour:8};s&&(u.startTime=f(t.startTime.val())),y(r,u)}).blur(function(){if(i){r&&n.focus();return}if(!r)return;r.remove(),r=null})})},e.fn.calendricalTimeRange=function(t){return this.length>=2&&(e(this[0]).calendricalTime(t),e(this[1]).calendricalTime(e.extend({startTime:e(this[0])},t))),this},e.fn.calendricalDateTimeRange=function(t){return this.length>=4&&(e(this[0]).calendricalDate(e.extend({endDate:e(this[2])},t)),e(this[1]).calendricalTime(t),e(this[2]).calendricalDate(t),e(this[3]).calendricalTime(e.extend({startTime:e(this[1]),startDate:e(this[0]),endDate:e(this[2])},t))),this};var S={allday:"#allday",start_date_input:"#start-date-input",start_time_input:"#start-time-input",start_time:"#start-time",end_date_input:"#end-date-input",end_time_input:"#end-time-input",end_time:"#end-time",twentyfour_hour:!1,date_format:"def",now:new Date},x={init:function(t){function C(){var e=a(s.val(),n.date_format).getTime()/1e3,t=f(l.val());e+=t.hour*3600+t.minute*60;var r=a(h.val(),n.date_format).getTime()/1e3,i=f(p.val());return r+=i.hour*3600+i.minute*60,r-e}function k(){var e=a(s.data("timespan.stored"),n.date_format),t=f(l.data("timespan.stored")),r=e.getTime()/1e3+t.hour*3600+t.minute*60+s.data("time_diff");return r=new Date(r*1e3),h.val(o(r,n.date_format)),p.val(u(r.getUTCHours(),r.getUTCMinutes(),n.twentyfour_hour)),!0}var n=e.extend({},S,t),i=e(n.allday),s=e(n.start_date_input),l=e(n.start_time_input),c=e(n.start_time),h=e(n.end_date_input),p=e(n.end_time_input),d=e(n.end_time),v=e("#ai1ec_instant_event"),m=h.add(p),g=s.add(n.end_date_input),y=l.add(n.end_time_input),x=s.add(n.start_time_input).add(n.end_date_input).add(n.end_time_input);x.bind("focus.timespan",w),v.bind("change.timespan",function(){this.checked?(m.closest("tr").fadeOut(),i.attr("disabled",!0)):(i.removeAttr("disabled"),m.closest("tr").fadeIn())});var T=new Date(n.now.getFullYear(),n.now.getMonth(),n.now.getDate()),N=!1;return i.bind("change.timespan",function(){this.checked?(y.fadeOut(),v.attr("disabled",!0)):(v.removeAttr("disabled"),y.fadeIn()),N||(N=!0,x.calendricalDateTimeRange({today:T,dateFormat:n.date_format,isoTime:n.twentyfour_hour,monthNames:n.month_names,dayNames:n.day_names,weekStartDay:n.week_start_day}))}).get().checked=!1,g.bind("blur.timespan",function(){var t=a(this.value,n.date_format);isNaN(t)?b(e(this)):(e(this).data("timespan.stored",this.value),e(this).val(o(t,n.date_format)))}),y.bind("blur.timespan",function(){var t=f(this.value);t?(e(this).data("timespan.stored",this.value),e(this).val(u(t.hour,t.minute,n.twentyfour_hour))):b(e(this))}),s.add(n.start_time_input).bind("focus.timespan",function(){s.data("time_diff",C())}).bind("blur.timespan",function(){s.data("time_diff")<0&&s.data("time_diff",900);var e=k()}),h.add(n.start_time_input).bind("blur.timespan",function(){if(C()<0){s.data("time_diff",900);var e=k()}}),s.closest("form").bind("submit.timespan",function(){var e=a(s.val(),n.date_format).getTime()/1e3;if(!isNaN(e)){if(!i.get(0).checked){var t=f(l.val());t?e+=t.hour*3600+t.minute*60:e=""}}else e="";e>0&&c.val(r(new Date(e*1e3),!0));var o=a(h.val(),n.date_format).getTime()/1e3;if(!isNaN(o))if(i.get(0).checked)o+=86400;else{var t=f(p.val());t?o+=t.hour*3600+t.minute*60:o=""}else o="";o>0&&d.val(r(new Date(o*1e3),!0))}),c.data("timespan.initial_value",c.val()),d.data("timespan.initial_value",d.val()),i.data("timespan.initial_value",i.get(0).checked),E(s,l,c,h,p,d,i,n.twentyfour_hour,n.date_format,n.now),this},reset:function(t){var n=e.extend({},S,t);return E(e(n.start_date_input),e(n.start_time_input),e(n.start_time),e(n.end_date_input),e(n.end_time_input),e(n.end_time),e(n.allday),n.twentyfour_hour,n.date_format,n.now),this},destroy:function(t){return t=e.extend({},S,t),e.each(t,function(t,n){e(n).unbind(".timespan")}),e(t.start_date_input).closest("form").unbind(".timespan"),this}};return e.timespan=function(t){if(x[t])return x[t].apply(this,Array.prototype.slice.call(arguments,1));if(typeof t=="object"||!t)return x.init.apply(this,arguments);e.error("Method "+t+" does not exist on jQuery.timespan")},{formatDate:o,parseDate:a}}),timely.define("external_libs/bootstrap/button",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r)};t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.is("input")?"val":"html",i=n.data();e+="Text",i.resetText||n.data("resetText",n[r]()),n[r](i[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass("ai1ec-"+t).attr(t,t):n.removeClass("ai1ec-"+t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="ai1ec-buttons"]'),t=!0;if(e.length){var n=this.$element.find("input");n.prop("type")==="radio"&&(n.prop("checked")&&this.$element.hasClass("ai1ec-active")?t=!1:e.find(".ai1ec-active").removeClass("ai1ec-active")),t&&n.prop("checked",!this.$element.hasClass("ai1ec-active")).trigger("change")}t&&this.$element.toggleClass("ai1ec-active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("bs.button"),s=typeof n=="object"&&n;i||r.data("bs.button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.bs.button.data-api","[data-toggle^=ai1ec-button]",function(t){var n=e(t.target);n.hasClass("ai1ec-btn")||(n=n.closest(".ai1ec-btn")),n.button("toggle"),t.preventDefault()})}),timely.define("scripts/add_new_event/event_date_time/date_time_event_handlers",["jquery_timely","ai1ec_config","scripts/add_new_event/event_date_time/date_time_utility_functions","external_libs/jquery.calendrical_timespan","libs/utils","external_libs/bootstrap/button"],function(e,t,n,r,i){var s=i.get_ajax_url(),o=function(){var t=e("#ai1ec_end option:selected").val();switch(t){case"0":e("#ai1ec_until_holder, #ai1ec_count_holder").collapse("hide");break;case"1":e("#ai1ec_until_holder").collapse("hide"),e("#ai1ec_count_holder").collapse("show");break;case"2":e("#ai1ec_count_holder").collapse("hide"),e("#ai1ec_until_holder").collapse("show")}},u=function(){e("#publish").trigger("click")},a=function(){var i=e(this),o="",u=e("#ai1ec_repeat_box .ai1ec-tab-pane.ai1ec-active"),a=u.data("freq");switch(a){case"daily":o+="FREQ=DAILY;";var f=e("#ai1ec_daily_count").val();f>1&&(o+="INTERVAL="+f+";");break;case"weekly":o+="FREQ=WEEKLY;";var l=e("#ai1ec_weekly_count").val();l>1&&(o+="INTERVAL="+l+";");var c=e('input[name="ai1ec_weekly_date_select"]:first').val(),h=e('#ai1ec_weekly_date_select > div:first > input[type="hidden"]:first').val();c.length>0&&(o+="WKST="+h+";BYday="+c+";");break;case"monthly":o+="FREQ=MONTHLY;";var p=e("#ai1ec_monthly_count").val(),d=e('input[name="ai1ec_monthly_type"]:checked').val();p>1&&(o+="INTERVAL="+p+";");var v=e('input[name="ai1ec_montly_date_select"]:first').val();if(v.length>0&&d==="bymonthday")o+="BYMONTHDAY="+v+";";else if(d==="byday"){var m=e("#ai1ec_monthly_byday_num").val(),g=e("#ai1ec_monthly_byday_weekday").val();o+="BYday="+m+g+";"}break;case"yearly":o+="FREQ=YEARLY;";var y=e("#ai1ec_yearly_count").val();y>1&&(o+="INTERVAL="+y+";");var b=e('input[name="ai1ec_yearly_date_select"]:first').val();b.length>0&&(o+="BYMONTH="+b+";")}var w=e("#ai1ec_end").val();if(w==="1")o+="COUNT="+e("#ai1ec_count").val()+";";else if(w==="2"){var E=e("#ai1ec_until-date-input").val();E=r.parseDate(E,t.date_format);var S=e("#ai1ec_start-time").val();S=r.parseDate(S,t.date_format),S=new Date(S);var x=E.getUTCDate(),T=E.getUTCMonth()+1,N=S.getUTCHours(),C=S.getUTCMinutes();T=T<10?"0"+T:T,x=x<10?"0"+x:x,N=N<10?"0"+N:N,C=C<10?"0"+C:C,E=E.getUTCFullYear()+""+T+x+"T235959Z",o+="UNTIL="+E+";"}var k={action:"ai1ec_rrule_to_text",rrule:o};i.button("loading").next().addClass("ai1ec-disabled"),e.post(s,k,function(t){t.error?(i.button("reset").next().removeClass("ai1ec-disabled"),"1"===e("#ai1ec_is_box_repeat").val()?n.repeat_form_error("#ai1ec_rrule","#ai1ec_repeat_label",t,i):n.repeat_form_error("#ai1ec_exrule","#ai1ec_exclude_label",t,i)):"1"===e("#ai1ec_is_box_repeat").val()?n.repeat_form_success("#ai1ec_rrule","#ai1ec_repeat_label","#ai1ec_repeat_text > a",o,i,t):n.repeat_form_success("#ai1ec_exrule","#ai1ec_exclude_label","#ai1ec_exclude_text > a",o,i,t)},"json")},f=function(){return e("#ai1ec_is_box_repeat").val()==="1"?n.click_on_modal_cancel("#ai1ec_repeat_text > a","#ai1ec_repeat","#ai1ec_repeat_label"):n.click_on_modal_cancel("#ai1ec_exclude_text > a","#ai1ec_exclude","#ai1ec_exclude_label"),e("#ai1ec_repeat_box").modal("hide"),!1},l=function(){e(this).is("#ai1ec_monthly_type_bymonthday")?(e("#ai1ec_repeat_monthly_byday").collapse("hide"),e("#ai1ec_repeat_monthly_bymonthday").collapse("show")):(e("#ai1ec_repeat_monthly_bymonthday").collapse("hide"),e("#ai1ec_repeat_monthly_byday").collapse("show"))},c=function(){var t=e(this),n=[],r=t.closest(".ai1ec-btn-group-grid"),i;t.toggleClass("ai1ec-active"),e("a",r).each(function(){var t=e(this);t.is(".ai1ec-active")&&(i=t.next().val(),n.push(i))}),r.next().val(n.join())},h=function(){n.click_on_ics_rule_text("#ai1ec_repeat_text > a","#ai1ec_repeat","#ai1ec_repeat_label",{action:"ai1ec_get_repeat_box",repeat:1,post_id:e("#post_ID").val()},n.init_modal_widgets),n.click_on_ics_rule_text("#ai1ec_exclude_text > a","#ai1ec_exclude","#ai1ec_exclude_label",{action:"ai1ec_get_repeat_box",repeat:0,post_id:e("#post_ID").val()},n.init_modal_widgets),n.click_on_checkbox("#ai1ec_repeat","#ai1ec_repeat_text > a","#ai1ec_repeat_label",{action:"ai1ec_get_repeat_box",repeat:1,post_id:e("#post_ID").val()},n.init_modal_widgets),n.click_on_checkbox("#ai1ec_exclude","#ai1ec_exclude_text > a","#ai1ec_exclude_label",{action:"ai1ec_get_repeat_box",repeat:0,post_id:e("#post_ID").val()},n.init_modal_widgets)},p=function(t){return e("#widgetCalendar").toggle(),!1},d=function(){e(".ai1ec-modal-content",this).not(".ai1ec-loading ").remove().end().removeClass("ai1ec-hide")};return{show_end_fields:o,trigger_publish:u,handle_click_on_apply_button:a,handle_click_on_cancel_modal:f,handle_checkbox_monthly_tab_modal:l,execute_pseudo_handlers:h,handle_animation_of_calendar_widget:p,handle_click_on_toggle_buttons:c,handle_modal_hide:d}}),timely.define("scripts/add_new_event/event_cost_helper",["jquery_timely","ai1ec_config"],function(e,t){var n=function(){return e("#ai1ec_is_free").is(":checked")},r=function(){return e("#ai1ec_cost").val()!==""},i=function(r){var i=e(this).parents("table:eq(0)"),s=e("#ai1ec_cost",i),o=t.label_a_buy_tickets_url;n()?(s.attr("value","").addClass("ai1ec-hidden"),o=t.label_a_rsvp_url):s.removeClass("ai1ec-hidden"),e("label[for=ai1ec_ticket_url]",i).text(o)};return{handle_change_is_free:i,check_is_free:n,check_is_price_entered:r}}),timely.define("external_libs/jquery.inputdate",["jquery_timely","external_libs/jquery.calendrical_timespan"],function(e,t){function n(e){e.addClass("error").fadeOut("normal",function(){e.val(e.data("timespan.stored")).removeClass("error").fadeIn("fast")})}function r(){e(this).data("timespan.stored",this.value)}function i(e,n,i,s,o){n.val(n.data("timespan.initial_value"));var u=parseInt(n.val());isNaN(parseInt(u))?u=new Date(o):u=new Date(parseInt(u)*1e3),e.val(t.formatDate(u,s)),e.each(r)}var s={start_date_input:"date-input",start_time:"time",twentyfour_hour:!1,date_format:"def",now:new Date},o={init:function(o){var u=e.extend({},s,o),a=e(u.start_date_input),f=e(u.start_time),l=a,c=a;return c.bind("focus.timespan",r),l.calendricalDate({today:new Date(u.now.getFullYear(),u.now.getMonth(),u.now.getDate()),dateFormat:u.date_format,monthNames:u.month_names,dayNames:u.day_names,weekStartDay:u.week_start_day}),l.bind("blur.timespan",function(){var r=t.parseDate(this.value,u.date_format);isNaN(r)?n(e(this)):(e(this).data("timespan.stored",this.value),e(this).val(t.formatDate(r,u.date_format)))}),a.bind("focus.timespan",function(){var e=t.parseDate(a.val(),u.date_format).getTime()/1e3}).bind("blur.timespan",function(){var e=t.parseDate(a.data("timespan.stored"),u.date_format)}),a.closest("form").bind("submit.timespan",function(){var e=t.parseDate(a.val(),u.date_format).getTime()/1e3;isNaN(e)&&(e=""),f.val(e)}),f.data("timespan.initial_value",f.val()),i(a,f,u.twentyfour_hour,u.date_format,u.now),this},reset:function(t){var n=e.extend({},s,t);return i(e(n.start_date_input),e(n.start_time),n.twentyfour_hour,n.date_format,n.now),this},destroy:function(t){return t=e.extend({},s,t),e.each(t,function(t,n){e(n).unbind(".timespan")}),e(t.start_date_input).closest("form").unbind(".timespan"),this}};e.inputdate=function(t){if(o[t])return o[t].apply(this,Array.prototype.slice.call(arguments,1));if(typeof t=="object"||!t)return o.init.apply(this,arguments);e.error("Method "+t+" does not exist on jQuery.timespan")}}),timely.define("external_libs/jquery.tools",["jquery_timely"],function(e){function i(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}function s(e,t){var n=parseInt(e.css(t),10);if(n)return n;var r=e[0].currentStyle;return r&&r.width&&parseInt(r.width,10)}function o(e){var t=e.data("events");return t&&t.onSlide}function u(t,n){function x(e,s,o,u){o===undefined?o=s/h*m:u&&(o-=n.min),g&&(o=Math.round(o/g)*g);if(s===undefined||g)s=o*h/m;if(isNaN(o))return r;s=Math.max(0,Math.min(s,h)),o=s/h*m;if(u||!f)o+=n.min;f&&(u?s=h-s:o=n.max-o),o=i(o,y);var a=e.type=="click";if(S&&l!==undefined&&!a){e.type="onSlide",E.trigger(e,[o,s]);if(e.isDefaultPrevented())return r}var c=a?n.speed:0,b=a?function(){e.type="change",E.trigger(e,[o])}:null;return f?(d.animate({top:s},c,b),n.progress&&v.animate({height:h-s+d.height()/2},c)):(d.animate({left:s},c,b),n.progress&&v.animate({width:s+d.width()/2},c)),l=o,p=s,t.val(o),r}function T(){f=n.vertical||s(a,"height")>s(a,"width"),f?(h=s(a,"height")-s(d,"height"),c=a.offset().top+h):(h=s(a,"width")-s(d,"width"),c=a.offset().left)}function N(){T(),r.setValue(n.value!==undefined?n.value:n.min)}var r=this,u=n.css,a=e("<div><div/><a href='#'/></div>").data("rangeinput",r),f,l,c,h,p;t.before(a);var d=a.addClass(u.slider).find("a").addClass(u.handle),v=a.find("div").addClass(u.progress);e.each("min,max,step,value".split(","),function(e,r){var i=t.attr(r);parseFloat(i)&&(n[r]=parseFloat(i,10))});var m=n.max-n.min,g=n.step=="any"?0:n.step,y=n.precision;y===undefined&&(y=g.toString().split("."),y=y.length===2?y[1].length:0);if(t.attr("type")=="range"){var b=t.clone().wrap("<div/>").parent().html(),w=e(b.replace(/type/i,"type=text data-orig-type"));w.val(n.value),t.replaceWith(w),t=w}t.addClass(u.input);var E=e(r).add(t),S=!0;e.extend(r,{getValue:function(){return l},setValue:function(t,n){return T(),x(n||e.Event("api"),undefined,t,!0)},getConf:function(){return n},getProgress:function(){return v},getHandle:function(){return d},getInput:function(){return t},step:function(t,i){i=i||e.Event();var s=n.step=="any"?1:n.step;r.setValue(l+s*(t||1),i)},stepUp:function(e){return r.step(e||1)},stepDown:function(e){return r.step(-e||-1)}}),e.each("onSlide,change".split(","),function(t,i){e.isFunction(n[i])&&e(r).on(i,n[i]),r[i]=function(t){return t&&e(r).on(i,t),r}}),d.drag({drag:!1}).on("dragStart",function(){T(),S=o(e(r))||o(t)}).on("drag",function(e,n,r){if(t.is(":disabled"))return!1;x(e,f?n:r)}).on("dragEnd",function(e){e.isDefaultPrevented()||(e.type="change",E.trigger(e,[l]))}).click(function(e){return e.preventDefault()}),a.click(function(e){if(t.is(":disabled")||e.target==d[0])return e.preventDefault();T();var n=f?d.height()/2:d.width()/2;x(e,f?h-c-n+e.pageY:e.pageX-c-n)}),n.keyboard&&t.keydown(function(n){if(t.attr("readonly"))return;var i=n.keyCode,s=e([75,76,38,33,39]).index(i)!=-1,o=e([74,72,40,34,37]).index(i)!=-1;if((s||o)&&!(n.shiftKey||n.altKey||n.ctrlKey))return s?r.step(i==33?10:1,n):o&&r.step(i==34?-10:-1,n),n.preventDefault()}),t.blur(function(t){var n=e(this).val();n!==l&&r.setValue(n,t)}),e.extend(t[0],{stepUp:r.stepUp,stepDown:r.stepDown}),N(),h||e(window).load(N)}e.tools=e.tools||{version:"1.2.7"};var t;t=e.tools.rangeinput={conf:{min:0,max:100,step:"any",steps:0,value:0,precision:undefined,vertical:0,keyboard:!0,progress:!1,speed:100,css:{input:"range",slider:"slider",progress:"progress",handle:"handle"}}};var n,r;e.fn.drag=function(t){return document.ondragstart=function(){return!1},t=e.extend({x:!0,y:!0,drag:!0},t),n=n||e(document).on("mousedown mouseup",function(i){var s=e(i.target);if(i.type=="mousedown"&&s.data("drag")){var o=s.position(),u=i.pageX-o.left,a=i.pageY-o.top,f=!0;n.on("mousemove.drag",function(e){var n=e.pageX-u,i=e.pageY-a,o={};t.x&&(o.left=n),t.y&&(o.top=i),f&&(s.trigger("dragStart"),f=!1),t.drag&&s.css(o),s.trigger("drag",[i,n]),r=s}),i.preventDefault()}else try{r&&r.trigger("dragEnd")}finally{n.off("mousemove.drag"),r=null}}),this.data("drag",!0)},e.expr[":"].range=function(t){var n=t.getAttribute("type");return n&&n=="range"||!!e(t).filter("input").data("rangeinput")},e.fn.rangeinput=function(n){if(this.data("rangeinput"))return this;n=e.extend(!0,{},t.conf,n);var r;return this.each(function(){var t=new u(e(this),e.extend(!0,{},n)),i=t.getInput().data("rangeinput",t);r=r?r.add(i):i}),r?r:this}}),timely.define("external_libs/ai1ec_datepicker",["jquery_timely"],function(e){var t=function(){var t={},n={years:"datepickerViewYears",moths:"datepickerViewMonths",days:"datepickerViewDays"},i={wrapper:'<div class="datepicker"><div class="datepickerBorderT" /><div class="datepickerBorderB" /><div class="datepickerBorderL" /><div class="datepickerBorderR" /><div class="datepickerBorderTL" /><div class="datepickerBorderTR" /><div class="datepickerBorderBL" /><div class="datepickerBorderBR" /><div class="datepickerContainer"><table cellspacing="0" cellpadding="0"><tbody><tr></tr></tbody></table></div></div>',head:["<td>",'<table cellspacing="0" cellpadding="0">',"<thead>","<tr>",'<th class="datepickerGoPrev"><a href="#"><span><%=prev%></span></a></th>','<th colspan="5" class="datepickerMonth"><a href="#"><span></span></a></th>','<th class="datepickerGoNext"><a href="#"><span><%=next%></span></a></th>',"</tr>",'<tr class="datepickerDoW">','<th class="ai1ec-datepicker-header-week"><span><%=week%></span></th>',"<th><span><%=day1%></span></th>","<th><span><%=day2%></span></th>","<th><span><%=day3%></span></th>","<th><span><%=day4%></span></th>","<th><span><%=day5%></span></th>","<th><span><%=day6%></span></th>","<th><span><%=day7%></span></th>","</tr>","</thead>","</table></td>"],space:'<td class="datepickerSpace"><div></div></td>',days:['<tbody class="datepickerDays">',"<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[0].week%></span></a></th>','<td class="<%=weeks[0].days[0].classname%>"><a href="#"><span><%=weeks[0].days[0].text%></span></a></td>','<td class="<%=weeks[0].days[1].classname%>"><a href="#"><span><%=weeks[0].days[1].text%></span></a></td>','<td class="<%=weeks[0].days[2].classname%>"><a href="#"><span><%=weeks[0].days[2].text%></span></a></td>','<td class="<%=weeks[0].days[3].classname%>"><a href="#"><span><%=weeks[0].days[3].text%></span></a></td>','<td class="<%=weeks[0].days[4].classname%>"><a href="#"><span><%=weeks[0].days[4].text%></span></a></td>','<td class="<%=weeks[0].days[5].classname%>"><a href="#"><span><%=weeks[0].days[5].text%></span></a></td>','<td class="<%=weeks[0].days[6].classname%>"><a href="#"><span><%=weeks[0].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[1].week%></span></a></th>','<td class="<%=weeks[1].days[0].classname%>"><a href="#"><span><%=weeks[1].days[0].text%></span></a></td>','<td class="<%=weeks[1].days[1].classname%>"><a href="#"><span><%=weeks[1].days[1].text%></span></a></td>','<td class="<%=weeks[1].days[2].classname%>"><a href="#"><span><%=weeks[1].days[2].text%></span></a></td>','<td class="<%=weeks[1].days[3].classname%>"><a href="#"><span><%=weeks[1].days[3].text%></span></a></td>','<td class="<%=weeks[1].days[4].classname%>"><a href="#"><span><%=weeks[1].days[4].text%></span></a></td>','<td class="<%=weeks[1].days[5].classname%>"><a href="#"><span><%=weeks[1].days[5].text%></span></a></td>','<td class="<%=weeks[1].days[6].classname%>"><a href="#"><span><%=weeks[1].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[2].week%></span></a></th>','<td class="<%=weeks[2].days[0].classname%>"><a href="#"><span><%=weeks[2].days[0].text%></span></a></td>','<td class="<%=weeks[2].days[1].classname%>"><a href="#"><span><%=weeks[2].days[1].text%></span></a></td>','<td class="<%=weeks[2].days[2].classname%>"><a href="#"><span><%=weeks[2].days[2].text%></span></a></td>','<td class="<%=weeks[2].days[3].classname%>"><a href="#"><span><%=weeks[2].days[3].text%></span></a></td>','<td class="<%=weeks[2].days[4].classname%>"><a href="#"><span><%=weeks[2].days[4].text%></span></a></td>','<td class="<%=weeks[2].days[5].classname%>"><a href="#"><span><%=weeks[2].days[5].text%></span></a></td>','<td class="<%=weeks[2].days[6].classname%>"><a href="#"><span><%=weeks[2].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[3].week%></span></a></th>','<td class="<%=weeks[3].days[0].classname%>"><a href="#"><span><%=weeks[3].days[0].text%></span></a></td>','<td class="<%=weeks[3].days[1].classname%>"><a href="#"><span><%=weeks[3].days[1].text%></span></a></td>','<td class="<%=weeks[3].days[2].classname%>"><a href="#"><span><%=weeks[3].days[2].text%></span></a></td>','<td class="<%=weeks[3].days[3].classname%>"><a href="#"><span><%=weeks[3].days[3].text%></span></a></td>','<td class="<%=weeks[3].days[4].classname%>"><a href="#"><span><%=weeks[3].days[4].text%></span></a></td>','<td class="<%=weeks[3].days[5].classname%>"><a href="#"><span><%=weeks[3].days[5].text%></span></a></td>','<td class="<%=weeks[3].days[6].classname%>"><a href="#"><span><%=weeks[3].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[4].week%></span></a></th>','<td class="<%=weeks[4].days[0].classname%>"><a href="#"><span><%=weeks[4].days[0].text%></span></a></td>','<td class="<%=weeks[4].days[1].classname%>"><a href="#"><span><%=weeks[4].days[1].text%></span></a></td>','<td class="<%=weeks[4].days[2].classname%>"><a href="#"><span><%=weeks[4].days[2].text%></span></a></td>','<td class="<%=weeks[4].days[3].classname%>"><a href="#"><span><%=weeks[4].days[3].text%></span></a></td>','<td class="<%=weeks[4].days[4].classname%>"><a href="#"><span><%=weeks[4].days[4].text%></span></a></td>','<td class="<%=weeks[4].days[5].classname%>"><a href="#"><span><%=weeks[4].days[5].text%></span></a></td>','<td class="<%=weeks[4].days[6].classname%>"><a href="#"><span><%=weeks[4].days[6].text%></span></a></td>',"</tr>","<tr>",'<th class="datepickerWeek ai1ec-datepicker-week"><a href="#"><span><%=weeks[5].week%></span></a></th>','<td class="<%=weeks[5].days[0].classname%>"><a href="#"><span><%=weeks[5].days[0].text%></span></a></td>','<td class="<%=weeks[5].days[1].classname%>"><a href="#"><span><%=weeks[5].days[1].text%></span></a></td>','<td class="<%=weeks[5].days[2].classname%>"><a href="#"><span><%=weeks[5].days[2].text%></span></a></td>','<td class="<%=weeks[5].days[3].classname%>"><a href="#"><span><%=weeks[5].days[3].text%></span></a></td>','<td class="<%=weeks[5].days[4].classname%>"><a href="#"><span><%=weeks[5].days[4].text%></span></a></td>','<td class="<%=weeks[5].days[5].classname%>"><a href="#"><span><%=weeks[5].days[5].text%></span></a></td>','<td class="<%=weeks[5].days[6].classname%>"><a href="#"><span><%=weeks[5].days[6].text%></span></a></td>',"</tr>","</tbody>"],months:['<tbody class="<%=className%>">',"<tr>",'<td colspan="2"><a href="#"><span><%=data[0]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[1]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[2]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[3]%></span></a></td>',"</tr>","<tr>",'<td colspan="2"><a href="#"><span><%=data[4]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[5]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[6]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[7]%></span></a></td>',"</tr>","<tr>",'<td colspan="2"><a href="#"><span><%=data[8]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[9]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[10]%></span></a></td>','<td colspan="2"><a href="#"><span><%=data[11]%></span></a></td>',"</tr>","</tbody>"]},s={flat:!1,starts:1,prev:"◀",next:"▶",lastSel:!1,mode:"single",view:"days",calendars:1,format:"Y-m-d",position:"bottom",eventName:"click",onRender:function(){return{}},onChange:function(){return!0},onShow:function(){return!0},onBeforeShow:function(){return!0},onHide:function(){return!0},locale:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekMin:"wk"}},o=function(t){var n=e(t).data("datepicker"),s=e(t),o=Math.floor(n.calendars/2),u,f,l,c,h=0,p,d,v,m,g,y;s.find("td>table tbody").remove();for(var b=0;b<n.calendars;b++){u=new Date(n.current),u.addMonths(-o+b),y=s.find("table").eq(b+1);switch(y[0].className){case"datepickerViewDays":l=a(u,"B Y");break;case"datepickerViewMonths":l=u.getFullYear();break;case"datepickerViewYears":l=u.getFullYear()-6+" - "+(u.getFullYear()+5)}y.find("thead tr:first th:eq(1) span").text(l),l=u.getFullYear()-6,f={data:[],className:"datepickerYears"};for(var w=0;w<12;w++)f.data.push(l+w);g=r(i.months.join(""),f),u.setDate(1),f={weeks:[],test:10},c=u.getMonth();var l=(u.getDay()-n.starts)%7;u.addDays(-(l+(l<0?7:0))),p=-1,h=0;while(h<42){v=parseInt(h/7,10),m=h%7,f.weeks[v]||(p=u.getWeekNumber(),f.weeks[v]={week:p,days:[]}),f.weeks[v].days[m]={text:u.getDate(),classname:[]},c!=u.getMonth()&&f.weeks[v].days[m].classname.push("datepickerNotInMonth"),u.getDay()==0&&f.weeks[v].days[m].classname.push("datepickerSunday"),u.getDay()==6&&f.weeks[v].days[m].classname.push("datepickerSaturday");var E=n.onRender(u),S=u.valueOf();(E.selected||n.date==S||e.inArray(S,n.date)>-1||n.mode=="range"&&S>=n.date[0]&&S<=n.date[1])&&f.weeks[v].days[m].classname.push("datepickerSelected"),E.disabled&&f.weeks[v].days[m].classname.push("datepickerDisabled"),E.className&&f.weeks[v].days[m].classname.push(E.className),f.weeks[v].days[m].classname=f.weeks[v].days[m].classname.join(" "),h++,u.addDays(1)}g=r(i.days.join(""),f)+g,f={data:n.locale.monthsShort,className:"datepickerMonths"},g=r(i.months.join(""),f)+g,y.append(g)}},u=function(e,t){if(e.constructor==Date)return new Date(e);var n=e.split(/\W+/),r=t.split(/\W+/),i,s,o,u,a,f=new Date;for(var l=0;l<n.length;l++)switch(r[l]){case"d":case"e":i=parseInt(n[l],10);break;case"m":s=parseInt(n[l],10)-1;break;case"Y":case"y":o=parseInt(n[l],10),o+=o>100?0:o<29?2e3:1900;break;case"H":case"I":case"k":case"l":u=parseInt(n[l],10);break;case"P":case"p":/pm/i.test(n[l])&&u<12?u+=12:/am/i.test(n[l])&&u>=12&&(u-=12);break;case"M":a=parseInt(n[l],10)}return new Date(o===undefined?f.getFullYear():o,s===undefined?f.getMonth():s,i===undefined?f.getDate():i,u===undefined?f.getHours():u,a===undefined?f.getMinutes():a,0)},a=function(e,t){var n=e.getMonth(),r=e.getDate(),i=e.getFullYear(),s=e.getWeekNumber(),o=e.getDay(),u={},a=e.getHours(),f=a>=12,l=f?a-12:a,c=e.getDayOfYear();l==0&&(l=12);var h=e.getMinutes(),p=e.getSeconds(),d=t.split(""),v;for(var m=0;m<d.length;m++){v=d[m];switch(d[m]){case"a":v=e.getDayName();break;case"A":v=e.getDayName(!0);break;case"b":v=e.getMonthName();break;case"B":v=e.getMonthName(!0);break;case"C":v=1+Math.floor(i/100);break;case"d":v=r<10?"0"+r:r;break;case"e":v=r;break;case"H":v=a<10?"0"+a:a;break;case"I":v=l<10?"0"+l:l;break;case"j":v=c<100?c<10?"00"+c:"0"+c:c;break;case"k":v=a;break;case"l":v=l;break;case"m":v=n<9?"0"+(1+n):1+n;break;case"M":v=h<10?"0"+h:h;break;case"p":case"P":v=f?"PM":"AM";break;case"s":v=Math.floor(e.getTime()/1e3);break;case"S":v=p<10?"0"+p:p;break;case"u":v=o+1;break;case"w":v=o;break;case"y":v=(""+i).substr(2,2);break;case"Y":v=i}d[m]=v}return d.join("")},f=function(e){if(Date.prototype.tempDate)return;Date.prototype.tempDate=null,Date.prototype.months=e.months,Date.prototype.monthsShort=e.monthsShort,Date.prototype.days=e.days,Date.prototype.daysShort=e.daysShort,Date.prototype.getMonthName=function(e){return this[e?"months":"monthsShort"][this.getMonth()]},Date.prototype.getDayName=function(e){return this[e?"days":"daysShort"][this.getDay()]},Date.prototype.addDays=function(e){this.setDate(this.getDate()+e),this.tempDate=this.getDate()},Date.prototype.addMonths=function(e){this.tempDate==null&&(this.tempDate=this.getDate()),this.setDate(1),this.setMonth(this.getMonth()+e),this.setDate(Math.min(this.tempDate,this.getMaxDays()))},Date.prototype.addYears=function(e){this.tempDate==null&&(this.tempDate=this.getDate()),this.setDate(1),this.setFullYear(this.getFullYear()+e),this.setDate(Math.min(this.tempDate,this.getMaxDays()))},Date.prototype.getMaxDays=function(){var e=new Date(Date.parse(this)),t=28,n;n=e.getMonth(),t=28;while(e.getMonth()==n)t++,e.setDate(t);return t-1},Date.prototype.getFirstDay=function(){var e=new Date(Date.parse(this));return e.setDate(1),e.getDay()},Date.prototype.getWeekNumber=function(){var e=new Date(this);e.setDate(e.getDate()-(e.getDay()+6)%7+3);var t=e.valueOf();return e.setMonth(0),e.setDate(4),Math.round((t-e.valueOf())/6048e5)+1},Date.prototype.getDayOfYear=function(){var e=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0),t=new Date(this.getFullYear(),0,0,0,0,0),n=e-t;return Math.floor(n/24*60*60*1e3)}},l=function(t){var n=e(t).data("datepicker"),r=e("#"+n.id);if(!n.extraHeight){var i=e(t).find("div");n.extraHeight=i.get(0).offsetHeight+i.get(1).offsetHeight,n.extraWidth=i.get(2).offsetWidth+i.get(3).offsetWidth}var s=r.find("table:first").get(0),o=s.offsetWidth,u=s.offsetHeight;r.css({width:o+n.extraWidth+"px",height:u+n.extraHeight+"px"}).find("div.datepickerContainer").css({width:o+"px",height:u+"px"})},c=function(t){e(t.target).is("span")&&(t.target=t.target.parentNode);var n=e(t.target);if(n.is("a")){t.target.blur();if(n.hasClass("datepickerDisabled"))return!1;var r=e(this).data("datepicker"),i=n.parent(),s=i.parent().parent().parent(),u=e("table",this).index(s.get(0))-1,f=new Date(r.current),l=!1,c=!1;if(i.is("th")){if(i.hasClass("datepickerWeek")&&r.mode=="range"&&!i.next().hasClass("datepickerDisabled")){var p=parseInt(i.next().text(),10);f.addMonths(u-Math.floor(r.calendars/2)),i.next().hasClass("datepickerNotInMonth")&&f.addMonths(p>15?-1:1),f.setDate(p),r.date[0]=f.setHours(0,0,0,0).valueOf(),f.setHours(23,59,59,0),f.addDays(6),r.date[1]=f.valueOf(),c=!0,l=!0,r.lastSel=!1}else if(i.hasClass("datepickerMonth")){if(r.month_link_inactive)return!1;f.addMonths(u-Math.floor(r.calendars/2));switch(s.get(0).className){case"datepickerViewDays":s.get(0).className="datepickerViewMonths",n.find("span").text(f.getFullYear());break;case"datepickerViewMonths":s.get(0).className="datepickerViewYears",n.find("span").text(f.getFullYear()-6+" - "+(f.getFullYear()+5));break;case"datepickerViewYears":s.get(0).className="datepickerViewDays",n.find("span").text(a(f,"B, Y"))}}else if(i.parent().parent().is("thead")){switch(s.get(0).className){case"datepickerViewDays":r.current.addMonths(i.hasClass("datepickerGoPrev")?-1:1);break;case"datepickerViewMonths":r.current.addYears(i.hasClass("datepickerGoPrev")?-1:1);break;case"datepickerViewYears":r.current.addYears(i.hasClass("datepickerGoPrev")?-12:12)}c=!0}}else if(i.is("td")&&!i.hasClass("datepickerDisabled")){switch(s.get(0).className){case"datepickerViewMonths":r.current.setMonth(s.find("tbody.datepickerMonths td").index(i)),r.current.setFullYear(parseInt(s.find("thead th.datepickerMonth span").text(),10)),r.current.addMonths(Math.floor(r.calendars/2)-u),s.get(0).className="datepickerViewDays";break;case"datepickerViewYears":r.current.setFullYear(parseInt(n.text(),10)),s.get(0).className="datepickerViewMonths";break;default:var p=parseInt(n.text(),10);f.addMonths(u-Math.floor(r.calendars/2)),i.hasClass("datepickerNotInMonth")&&f.addMonths(p>15?-1:1),f.setDate(p);switch(r.mode){case"multiple":p=f.setHours(0,0,0,0).valueOf(),e.inArray(p,r.date)>-1?e.each(r.date,function(e,t){if(t==p)return r.date.splice(e,1),!1}):r.date.push(p);break;case"range":r.lastSel||(r.date[0]=f.setHours(0,0,0,0).valueOf()),p=f.setHours(23,59,59,0).valueOf(),p<r.date[0]?(r.date[1]=r.date[0]+86399e3,r.date[0]=p-86399e3):r.date[1]=p,r.lastSel=!r.lastSel;break;default:r.date=f.valueOf()}}c=!0,l=!0}c&&o(this),l&&r.onChange.apply(this,h(r))}return!1},h=function(t){var n;return t.mode=="single"?(n=new Date(t.date),[a(n,t.format),n,t.el]):(n=[[],[],t.el],e.each(t.date,function(e,r){var i=new Date(r);n[0].push(a(i,t.format)),n[1].push(i)}),n)},p=function(){var e=document.compatMode=="CSS1Compat";return{l:window.pageXOffset||(e?document.documentElement.scrollLeft:document.body.scrollLeft),t:window.pageYOffset||(e?document.documentElement.scrollTop:document.body.scrollTop),w:window.innerWidth||(e?document.documentElement.clientWidth:document.body.clientWidth),h:window.innerHeight||(e?document.documentElement.clientHeight:document.body.clientHeight)}},d=function(e,t,n){if(e==t)return!0;if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return!!(e.compareDocumentPosition(t)&16);var r=t.parentNode;while(r&&r!=n){if(r==e)return!0;r=r.parentNode}return!1},v=function(t){var n=e("#"+e(this).data("datepickerId"));if(!n.is(":visible")){var r=n.get(0);o(r);var i=n.data("datepicker");i.onBeforeShow.apply(this,[n.get(0)]);var s=e(this).offset(),u=p(),a=s.top,f=s.left,c=e.curCSS(r,"display");n.css({visibility:"hidden",display:"block"}),l(r);switch(i.position){case"top":a-=r.offsetHeight;break;case"left":f-=r.offsetWidth;break;case"right":f+=this.offsetWidth;break;case"bottom":a+=this.offsetHeight}a+r.offsetHeight>u.t+u.h&&(a=s.top-r.offsetHeight),a<u.t&&(a=s.top+this.offsetHeight+r.offsetHeight),f+r.offsetWidth>u.l+u.w&&(f=s.left-r.offsetWidth),f<u.l&&(f=s.left+this.offsetWidth),n.css({visibility:"visible",display:"block",top:a+"px",left:f+"px"}),i.onShow.apply(this,[n.get(0)])!=0&&n.show(),e(document).bind("mousedown",{cal:n,trigger:this},m)}return!1},m=function(t){t.target!=t.data.trigger&&!d(t.data.cal.get(0),t.target,t.data.cal.get(0))&&(t.data.cal.data("datepicker").onHide.apply(this,[t.data.cal.get(0)])!=0&&t.data.cal.hide(),e(document).unbind("mousedown",m))};return{init:function(t){return t=e.extend(!0,{},s,t||{}),f(t.locale),t.calendars=Math.max(1,parseInt(t.calendars,10)||1),t.mode=/single|multiple|range/.test(t.mode)?t.mode:"single",this.each(function(){if(!e(this).data("datepicker")){t.el=this,t.date.constructor==String&&(t.date=u(t.date,t.format),t.date.setHours(0,0,0,0));if(t.mode!="single")if(t.date.constructor!=Array)t.date=[t.date.valueOf()],t.mode=="range"&&t.date.push((new Date(t.date[0])).setHours(23,59,59,0).valueOf());else{for(var s=0;s<t.date.length;s++)t.date[s]=u(t.date[s],t.format).setHours(0,0,0,0).valueOf();t.mode=="range"&&(t.date[1]=(new Date(t.date[1])).setHours(23,59,59,0).valueOf())}else t.date=t.date.valueOf();t.current?t.current=u(t.current,t.format):t.current=new Date,t.current.setDate(1),t.current.setHours(0,0,0,0);var a="datepicker_"+parseInt(Math.random()*1e3),f;t.id=a,e(this).data("datepickerId",t.id);var h=e(i.wrapper).attr("id",a).bind("click",c).data("datepicker",t);t.className&&h.addClass(t.className);var p="";for(var s=0;s<t.calendars;s++)f=t.starts,s>0&&(p+=i.space),p+=r(i.head.join(""),{week:t.locale.weekMin,prev:t.prev,next:t.next,day1:t.locale.daysMin[f++%7],day2:t.locale.daysMin[f++%7],day3:t.locale.daysMin[f++%7],day4:t.locale.daysMin[f++%7],day5:t.locale.daysMin[f++%7],day6:t.locale.daysMin[f++%7],day7:t.locale.daysMin[f++%7]});h.find("tr:first").append(p).find("table").addClass(n[t.view]),o(h.get(0)),t.flat?(h.appendTo(this).show().css("position","relative"),l(h.get(0))):(h.appendTo(document.body),e(this).bind(t.eventName,v))}})},showPicker:function(){return this.each(function(){e(this).data("datepickerId")&&v.apply(this)})},hidePicker:function(){return this.each(function(){e(this).data("datepickerId")&&e("#"+e(this).data("datepickerId")).hide()})},setDate:function(t,n){return this.each(function(){if(e(this).data("datepickerId")){var r=e("#"+e(this).data("datepickerId")),i=r.data("datepicker");i.date=t,i.date.constructor==String&&(i.date=u(i.date,i.format),i.date.setHours(0,0,0,0));if(i.mode!="single")if(i.date.constructor!=Array)i.date=[i.date.valueOf()],i.mode=="range"&&i.date.push((new Date(i.date[0])).setHours(23,59,59,0).valueOf());else{for(var s=0;s<i.date.length;s++)i.date[s]=u(i.date[s],i.format).setHours(0,0,0,0).valueOf();i.mode=="range"&&(i.date[1]=(new Date(i.date[1])).setHours(23,59,59,0).valueOf())}else i.date=i.date.valueOf();n&&(i.current=new Date(i.mode!="single"?i.date[0]:i.date)),o(r.get(0))}})},getDate:function(t){if(this.size()>0)return h(e("#"+e(this).data("datepickerId")).data("datepicker"))[t?0:1]},clear:function(){return this.each(function(){if(e(this).data("datepickerId")){var t=e("#"+e(this).data("datepickerId")),n=t.data("datepicker");n.mode!="single"&&(n.date=[],o(t.get(0)))}})},fixLayout:function(){return this.each(function(){if(e(this).data("datepickerId")){var t=e("#"+e(this).data("datepickerId")),n=t.data("datepicker");n.flat&&l(t.get(0))}})}}}();e.fn.extend({DatePicker:t.init,DatePickerHide:t.hidePicker,DatePickerShow:t.showPicker,DatePickerSetDate:t.setDate,DatePickerGetDate:t.getDate,DatePickerClear:t.clear,DatePickerLayout:t.fixLayout});var n={},r=function(e,t){var i=/\W/.test(e)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+e.replace(/[\r\t\n]/g," ").split("<%").join(" ").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g,"',$1,'").split(" ").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):n[e]=n[e]||r(document.getElementById(e).innerHTML);return t?i(t):i}}),timely.define("external_libs/bootstrap/transition",["jquery_timely"],function(e){function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(e.style[n]!==undefined)return{end:t[n]}}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this;e(this).one(e.support.transition.end,function(){n=!0});var i=function(){n||e(r).trigger(e.support.transition.end)};return setTimeout(i,t),this},e(function(){e.support.transition=t()})}),timely.define("external_libs/bootstrap/collapse",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.transitioning=null,this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e=this.$element.hasClass("ai1ec-width");return e?"width":"height"},t.prototype.show=function(){if(this.transitioning||this.$element.hasClass("ai1ec-in"))return;var t=e.Event("show.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.$parent&&this.$parent.find("> .ai1ec-panel > .ai1ec-in");if(n&&n.length){var r=n.data("bs.collapse");if(r&&r.transitioning)return;n.collapse("hide"),r||n.data("bs.collapse",null)}var i=this.dimension();this.$element.removeClass("ai1ec-collapse").addClass("ai1ec-collapsing")[i](0),this.transitioning=1;var s=function(){this.$element.removeClass("ai1ec-collapsing").addClass("ai1ec-in")[i]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return s.call(this);var o=e.camelCase(["scroll",i].join("-"));this.$element.one(e.support.transition.end,e.proxy(s,this)).emulateTransitionEnd(350)[i](this.$element[0][o])},t.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("ai1ec-in"))return;var t=e.Event("hide.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("ai1ec-collapsing").removeClass("ai1ec-collapse").removeClass("ai1ec-in"),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("ai1ec-collapsing").addClass("ai1ec-collapse")};if(!e.support.transition)return r.call(this);this.$element[n](0).one(e.support.transition.end,e.proxy(r,this)).emulateTransitionEnd(350)},t.prototype.toggle=function(){this[this.$element.hasClass("ai1ec-in")?"hide":"show"]()};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("bs.collapse"),s=e.extend({},t.DEFAULTS,r.data(),typeof n=="object"&&n);i||r.data("bs.collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.bs.collapse.data-api","[data-toggle=ai1ec-collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i),o=s.data("bs.collapse"),u=o?"toggle":n.data(),a=n.attr("data-parent"),f=a&&e(a);if(!o||!o.transitioning)f&&f.find('[data-toggle=ai1ec-collapse][data-parent="'+a+'"]').not(n).addClass("ai1ec-collapsed"),n[s.hasClass("ai1ec-in")?"addClass":"removeClass"]("ai1ec-collapsed");s.collapse(u)})}),timely.define("external_libs/bootstrap/modal",["jquery_timely"],function(e){var t=function(t,n){this.options=n,this.$element=e(t),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},t.prototype.toggle=function(e){return this[this.isShown?"hide":"show"](e)},t.prototype.show=function(t){var n=this,r=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r);if(this.isShown||r.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="ai1ec-modal"]',e.proxy(this.hide,this)),this.backdrop(function(){var r=e.support.transition&&n.$element.hasClass("ai1ec-fade");n.$element.parent().length||n.$element.appendTo(document.body),n.$element.show(),r&&n.$element[0].offsetWidth,n.$element.addClass("ai1ec-in").attr("aria-hidden",!1),n.enforceFocus();var i=e.Event("shown.bs.modal",{relatedTarget:t});r?n.$element.find(".ai1ec-modal-dialog").one(e.support.transition.end,function(){n.$element.focus().trigger(i)}).emulateTransitionEnd(300):n.$element.focus().trigger(i)})},t.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.bs.modal"),this.$element.removeClass("ai1ec-in").attr("aria-hidden",!0).off("click.dismiss.modal"),e.support.transition&&this.$element.hasClass("ai1ec-fade")?this.$element.one(e.support.transition.end,e.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal()},t.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){this.$element[0]!==e.target&&!this.$element.has(e.target).length&&this.$element.focus()},this))},t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",e.proxy(function(e){e.which==27&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},t.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden.bs.modal")})},t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},t.prototype.backdrop=function(t){var n=this,r=this.$element.hasClass("ai1ec-fade")?"ai1ec-fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="ai1ec-modal-backdrop '+r+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",e.proxy(function(e){if(e.target!==e.currentTarget)return;this.options.backdrop=="static"?this.$element[0].focus.call(this.$element[0]):this.hide.call(this)},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("ai1ec-in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("ai1ec-in"),e.support.transition&&this.$element.hasClass("ai1ec-fade")?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};var n=e.fn.modal;e.fn.modal=function(n,r){return this.each(function(){var i=e(this),s=i.data("bs.modal"),o=e.extend({},t.DEFAULTS,i.data(),typeof n=="object"&&n);s||i.data("bs.modal",s=new t(this,o)),typeof n=="string"?s[n](r):o.show&&s.show(r)})},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.bs.modal.data-api",'[data-toggle="ai1ec-modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s,this).one("hide",function(){n.is(":visible")&&n.focus()})}),e(document).on("show.bs.modal",".ai1ec-modal",function(){e(document.body).addClass("ai1ec-modal-open")}).on("hidden.bs.modal",".ai1ec-modal",function(){e(document.body).removeClass("ai1ec-modal-open")})}),timely.define("external_libs/bootstrap/alert",["jquery_timely"],function(e){var t='[data-dismiss="ai1ec-alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed.bs.alert").remove()}var n=e(this),r=n.attr("data-target");r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var i=e(r);t&&t.preventDefault(),i.length||(i=n.hasClass("ai1ec-alert")?n:n.parent()),i.trigger(t=e.Event("close.bs.alert"));if(t.isDefaultPrevented())return;i.removeClass("ai1ec-in"),e.support.transition&&i.hasClass("ai1ec-fade")?i.one(e.support.transition.end,s).emulateTransitionEnd(150):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("bs.alert");i||r.data("bs.alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}),timely.define("external_libs/select2",["jquery_timely"],function(e){(function(e){typeof e.fn.each2=="undefined"&&e.fn.extend({each2:function(t){var n=e([0]),r=-1,i=this.length;while(++r<i&&(n.context=n[0]=this[r])&&t.call(n[0],r,n)!==!1);return this}})})(e),function(e,t){function l(e,t){var n=0,r=t.length;for(;n<r;n+=1)if(c(e,t[n]))return n;return-1}function c(e,n){return e===n?!0:e===t||n===t?!1:e===null||n===null?!1:e.constructor===String?e===n+"":n.constructor===String?n===e+"":!1}function h(t,n){var r,i,s;if(t===null||t.length<1)return[];r=t.split(n);for(i=0,s=r.length;i<s;i+=1)r[i]=e.trim(r[i]);return r}function p(e){return e.outerWidth(!1)-e.width()}function d(n){var r="keyup-change-value";n.bind("keydown",function(){e.data(n,r)===t&&e.data(n,r,n.val())}),n.bind("keyup",function(){var i=e.data(n,r);i!==t&&n.val()!==i&&(e.removeData(n,r),n.trigger("keyup-change"))})}function v(n){n.bind("mousemove",function(n){var r=a;(r===t||r.x!==n.pageX||r.y!==n.pageY)&&e(n.target).trigger("mousemove-filtered",n)})}function m(e,n,r){r=r||t;var i;return function(){var t=arguments;window.clearTimeout(i),i=window.setTimeout(function(){n.apply(r,t)},e)}}function g(e){var t=!1,n;return function(){return t===!1&&(n=e(),t=!0),n}}function y(e,t){var n=m(e,function(e){t.trigger("scroll-debounced",e)});t.bind("scroll",function(e){l(e.target,t.get())>=0&&n(e)})}function b(e){if(e[0]===document.activeElement)return;window.setTimeout(function(){var t=e[0],n=e.val().length,r;e.focus(),t.setSelectionRange?t.setSelectionRange(n,n):t.createTextRange&&(r=t.createTextRange(),r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",n),r.select())},0)}function w(e){e.preventDefault(),e.stopPropagation()}function E(e){e.preventDefault(),e.stopImmediatePropagation()}function S(t){if(!u){var n=t[0].currentStyle||window.getComputedStyle(t[0],null);u=e(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:n.fontSize,fontFamily:n.fontFamily,fontStyle:n.fontStyle,fontWeight:n.fontWeight,letterSpacing:n.letterSpacing,textTransform:n.textTransform,whiteSpace:"nowrap"}),u.attr("class","select2-sizer"),e("body").append(u)}return u.text(t.val()),u.width()}function x(t,n,r){var i,s=[],o;i=t.attr("class"),typeof i=="string"&&e(i.split(" ")).each2(function(){this.indexOf("select2-")===0&&s.push(this)}),i=n.attr("class"),typeof i=="string"&&e(i.split(" ")).each2(function(){this.indexOf("select2-")!==0&&(o=r(this),typeof o=="string"&&o.length>0&&s.push(this))}),t.attr("class",s.join(" "))}function T(e,t,n,r){var i=e.toUpperCase().indexOf(t.toUpperCase()),s=t.length;if(i<0){n.push(r(e));return}n.push(r(e.substring(0,i))),n.push("<span class='select2-match'>"),n.push(r(e.substring(i,i+s))),n.push("</span>"),n.push(r(e.substring(i+s,e.length)))}function N(t){var n,r=0,i=null,s=t.quietMillis||100,o=t.url,u=this;return function(a){window.clearTimeout(n),n=window.setTimeout(function(){r+=1;var n=r,s=t.data,f=o,l=t.transport||e.ajax,c=t.type||"GET",h={};s=s?s.call(u,a.term,a.page,a.context):null,f=typeof f=="function"?f.call(u,a.term,a.page,a.context):f,null!==i&&i.abort(),t.params&&(e.isFunction(t.params)?e.extend(h,t.params.call(u)):e.extend(h,t.params)),e.extend(h,{url:f,dataType:t.dataType,data:s,type:c,cache:!1,success:function(e){if(n<r)return;var i=t.results(e,a.page);a.callback(i)}}),i=l.call(u,h)},s)}}function C(t){var n=t,r,i,s=function(e){return""+e.text};e.isArray(n)&&(i=n,n={results:i}),e.isFunction(n)===!1&&(i=n,n=function(){return i});var o=n();return o.text&&(s=o.text,e.isFunction(s)||(r=n.text,s=function(e){return e[r]})),function(t){var r=t.term,i={results:[]},o;if(r===""){t.callback(n());return}o=function(n,i){var u,a;n=n[0];if(n.children){u={};for(a in n)n.hasOwnProperty(a)&&(u[a]=n[a]);u.children=[],e(n.children).each2(function(e,t){o(t,u.children)}),(u.children.length||t.matcher(r,s(u),n))&&i.push(u)}else t.matcher(r,s(n),n)&&i.push(n)},e(n().results).each2(function(e,t){o(t,i.results)}),t.callback(i)}}function k(n){var r=e.isFunction(n);return function(i){var s=i.term,o={results:[]};e(r?n():n).each(function(){var e=this.text!==t,n=e?this.text:this;(s===""||i.matcher(s,n))&&o.results.push(e?this:{id:this,text:this})}),i.callback(o)}}function L(t,n){if(e.isFunction(t))return!0;if(!t)return!1;throw new Error("formatterName must be a function or a falsy value")}function A(t){return e.isFunction(t)?t():t}function O(t){var n=0;return e.each(t,function(e,t){t.children?n+=O(t.children):n++}),n}function M(e,n,r,i){var s=e,o=!1,u,a,f,l,h;if(!i.createSearchChoice||!i.tokenSeparators||i.tokenSeparators.length<1)return t;for(;;){a=-1;for(f=0,l=i.tokenSeparators.length;f<l;f++){h=i.tokenSeparators[f],a=e.indexOf(h);if(a>=0)break}if(a<0)break;u=e.substring(0,a),e=e.substring(a+h.length);if(u.length>0){u=i.createSearchChoice(u,n);if(u!==t&&u!==null&&i.id(u)!==t&&i.id(u)!==null){o=!1;for(f=0,l=n.length;f<l;f++)if(c(i.id(u),i.id(n[f]))){o=!0;break}o||r(u)}}}if(s!==e)return e}function _(t,n){var r=function(){};return r.prototype=new t,r.prototype.constructor=r,r.prototype.parent=t.prototype,r.prototype=e.extend(r.prototype,n),r}var n,r,i,s,o,u,a,f;n={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(e){e=e.which?e.which:e;switch(e){case n.LEFT:case n.RIGHT:case n.UP:case n.DOWN:return!0}return!1},isControl:function(e){var t=e.which;switch(t){case n.SHIFT:case n.CTRL:case n.ALT:return!0}return e.metaKey?!0:!1},isFunctionKey:function(e){return e=e.which?e.which:e,e>=112&&e<=123}},f=e(document),o=function(){var e=1;return function(){return e++}}(),f.bind("mousemove",function(e){a={x:e.pageX,y:e.pageY}}),r=_(Object,{bind:function(e){var t=this;return function(){e.apply(t,arguments)}},init:function(n){var r,i,s=".select2-results",u;this.opts=n=this.prepareOpts(n),this.id=n.id,n.element.data("select2")!==t&&n.element.data("select2")!==null&&this.destroy(),this.enabled=!0,this.container=this.createContainer(),this.containerId="s2id_"+(n.element.attr("id")||"autogen"+o()),this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.body=g(function(){return n.element.closest("body")}),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.css(A(n.containerCss)),this.container.addClass(A(n.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabIndex"),this.opts.element.data("select2",this).addClass("select2-offscreen").bind("focus.select2",function(){e(this).select2("focus")}).attr("tabIndex","-1").before(this.container),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),this.dropdown.addClass(A(n.dropdownCssClass)),this.dropdown.data("select2",this),this.results=r=this.container.find(s),this.search=i=this.container.find("input.select2-input"),i.attr("tabIndex",this.elementTabIndex),this.resultsPage=0,this.context=null,this.initContainer(),v(this.results),this.dropdown.delegate(s,"mousemove-filtered touchstart touchmove touchend",this.bind(this.highlightUnderEvent)),y(80,this.results),this.dropdown.delegate(s,"scroll-debounced",this.bind(this.loadMoreIfNeeded)),e.fn.mousewheel&&r.mousewheel(function(e,t,n,i){var s=r.scrollTop(),o;i>0&&s-i<=0?(r.scrollTop(0),w(e)):i<0&&r.get(0).scrollHeight-r.scrollTop()+i<=r.height()&&(r.scrollTop(r.get(0).scrollHeight-r.height()),w(e))}),d(i),i.bind("keyup-change input paste",this.bind(this.updateResults)),i.bind("focus",function(){i.addClass("select2-focused")}),i.bind("blur",function(){i.removeClass("select2-focused")}),this.dropdown.delegate(s,"mouseup",this.bind(function(t){e(t.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(t),this.selectHighlighted(t))})),this.dropdown.bind("click mouseup mousedown",function(e){e.stopPropagation()}),e.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),(n.element.is(":disabled")||n.element.is("[readonly='readonly']"))&&this.disable()},destroy:function(){var e=this.opts.element.data("select2");this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),e!==t&&(e.container.remove(),e.dropdown.remove(),e.opts.element.removeClass("select2-offscreen").removeData("select2").unbind(".select2").attr({tabIndex:this.elementTabIndex}).show())},prepareOpts:function(n){var r,i,s,o;r=n.element,r.get(0).tagName.toLowerCase()==="select"&&(this.select=i=n.element),i&&e.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in n)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),n=e.extend({},{populateResults:function(r,i,s){var o,u,a,f,l=this.opts.id,c=this;o=function(r,i,u){var a,f,h,p,d,v,m,g,y,b;r=n.sortResults(r,i,s);for(a=0,f=r.length;a<f;a+=1)h=r[a],d=h.disabled===!0,p=!d&&l(h)!==t,v=h.children&&h.children.length>0,m=e("<li></li>"),m.addClass("select2-results-dept-"+u),m.addClass("select2-result"),m.addClass(p?"select2-result-selectable":"select2-result-unselectable"),d&&m.addClass("select2-disabled"),v&&m.addClass("select2-result-with-children"),m.addClass(c.opts.formatResultCssClass(h)),g=e(document.createElement("div")),g.addClass("select2-result-label"),b=n.formatResult(h,g,s,c.opts.escapeMarkup),b!==t&&g.html(b),m.append(g),v&&(y=e("<ul></ul>"),y.addClass("select2-result-sub"),o(h.children,y,u+1),m.append(y)),m.data("select2-data",h),i.append(m)},o(i,r,0)}},e.fn.select2.defaults,n),typeof n.id!="function"&&(s=n.id,n.id=function(e){return e[s]});if(e.isArray(n.element.data("select2Tags"))){if("tags"in n)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+n.element.attr("id");n.tags=n.element.attr("data-select2-tags")}i?(n.query=this.bind(function(n){var i={results:[],more:!1},s=n.term,o,u,a;a=function(e,t){var r;e.is("option")?n.matcher(s,e.text(),e)&&t.push({id:e.attr("value"),text:e.text(),element:e.get(),css:e.attr("class"),disabled:c(e.attr("disabled"),"disabled")}):e.is("optgroup")&&(r={text:e.attr("label"),children:[],element:e.get(),css:e.attr("class")},e.children().each2(function(e,t){a(t,r.children)}),r.children.length>0&&t.push(r))},o=r.children(),this.getPlaceholder()!==t&&o.length>0&&(u=o[0],e(u).text()===""&&(o=o.not(u))),o.each2(function(e,t){a(t,i.results)}),n.callback(i)}),n.id=function(e){return e.id},n.formatResultCssClass=function(e){return e.css}):"query"in n||("ajax"in n?(o=n.element.data("ajax-url"),o&&o.length>0&&(n.ajax.url=o),n.query=N.call(n.element,n.ajax)):"data"in n?n.query=C(n.data):"tags"in n&&(n.query=k(n.tags),n.createSearchChoice===t&&(n.createSearchChoice=function(e){return{id:e,text:e}}),n.initSelection===t&&(n.initSelection=function(t,r){var i=[];e(h(t.val(),n.separator)).each(function(){var t=this,r=this,s=n.tags;e.isFunction(s)&&(s=s()),e(s).each(function(){if(c(this.id,t))return r=this.text,!1}),i.push({id:t,text:r})}),r(i)})));if(typeof n.query!="function")throw"query function not defined for Select2 "+n.element.attr("id");return n},monitorSource:function(){var e=this.opts.element,t;e.bind("change.select2",this.bind(function(e){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),t=this.bind(function(){var e,t,n=this;e=this.opts.element.attr("disabled")!=="disabled",t=this.opts.element.attr("readonly")==="readonly",e=e&&!t,this.enabled!==e&&(e?this.enable():this.disable()),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(A(this.opts.containerCssClass)),x(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(A(this.opts.dropdownCssClass))}),e.bind("propertychange.select2 DOMAttrModified.select2",t),typeof WebKitMutationObserver!="undefined"&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new WebKitMutationObserver(function(e){e.forEach(t)}),this.propertyObserver.observe(e.get(0),{attributes:!0,subtree:!1}))},triggerChange:function(t){t=t||{},t=e.extend({},t,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(t),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},enable:function(){if(this.enabled)return;this.enabled=!0,this.container.removeClass("select2-container-disabled"),this.opts.element.removeAttr("disabled")},disable:function(){if(!this.enabled)return;this.close(),this.enabled=!1,this.container.addClass("select2-container-disabled"),this.opts.element.attr("disabled","disabled")},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var t=this.container.offset(),n=this.container.outerHeight(!1),r=this.container.outerWidth(!1),i=this.dropdown.outerHeight(!1),s=e(window).scrollLeft()+e(window).width(),o=e(window).scrollTop()+e(window).height(),u=t.top+n,a=t.left,f=u+i<=o,l=t.top-i>=this.body().scrollTop(),c=this.dropdown.outerWidth(!1),h=a+c<=s,p=this.dropdown.hasClass("select2-drop-above"),d,v,m;this.body().css("position")!=="static"&&(d=this.body().offset(),u-=d.top,a-=d.left),p?(v=!0,!l&&f&&(v=!1)):(v=!1,!f&&l&&(v=!0)),h||(a=t.left+r-c),v?(u=t.top-i,this.container.addClass("select2-drop-above"),this.dropdown.addClass("select2-drop-above")):(this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")),m=e.extend({top:u,left:a,width:r},A(this.opts.dropdownCss)),this.dropdown.css(m)},shouldOpen:function(){var t;return this.opened()?!1:(t=e.Event("opening"),this.opts.element.trigger(t),!t.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(window.setTimeout(this.bind(this.opening),1),!0):!1},opening:function(){var t=this.containerId,n="scroll."+t,r="resize."+t,i="orientationchange."+t,s;this.clearDropdownAlignmentPreference(),this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.dropdown[0]!==this.body().children().last()[0]&&this.dropdown.detach().appendTo(this.body()),this.updateResults(!0),s=e("#select2-drop-mask"),s.length==0&&(s=e(document.createElement("div")),s.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),s.hide(),s.appendTo(this.body()),s.bind("mousedown touchstart",function(t){var n=e("#select2-drop"),r;n.length>0&&(r=n.data("select2"),r.opts.selectOnBlur&&r.selectHighlighted({noFocus:!0}),r.close())})),this.dropdown.prev()[0]!==s[0]&&this.dropdown.before(s),e("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),s.css({width:document.documentElement.scrollWidth,height:document.documentElement.scrollHeight}),s.show(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active"),this.ensureHighlightVisible();var o=this;this.container.parents().add(window).each(function(){e(this).bind(r+" "+n+" "+i,function(t){e("#select2-drop-mask").css({width:document.documentElement.scrollWidth,height:document.documentElement.scrollHeight}),o.positionDropdown()})}),this.focusSearch()},close:function(){if(!this.opened())return;var t=this.containerId,n="scroll."+t,r="resize."+t,i="orientationchange."+t;this.container.parents().add(window).each(function(){e(this).unbind(n).unbind(r).unbind(i)}),this.clearDropdownAlignmentPreference(),e("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open"),this.results.empty(),this.clearSearch(),this.opts.element.trigger(e.Event("close"))},clearSearch:function(){},getMaximumSelectionSize:function(){return A(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var t=this.results,n,r,i,s,o,u,a;r=this.highlight();if(r<0)return;if(r==0){t.scrollTop(0);return}n=this.findHighlightableChoices(),i=e(n[r]),s=i.offset().top+i.outerHeight(!0),r===n.length-1&&(a=t.find("li.select2-more-results"),a.length>0&&(s=a.offset().top+a.outerHeight(!0))),o=t.offset().top+t.outerHeight(!0),s>o&&t.scrollTop(t.scrollTop()+(s-o)),u=i.offset().top-t.offset().top,u<0&&i.css("display")!="none"&&t.scrollTop(t.scrollTop()+u)},findHighlightableChoices:function(){var e=this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)");return this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)")},moveHighlight:function(t){var n=this.findHighlightableChoices(),r=this.highlight();while(r>-1&&r<n.length){r+=t;var i=e(n[r]);if(i.hasClass("select2-result-selectable")&&!i.hasClass("select2-disabled")&&!i.hasClass("select2-selected")){this.highlight(r);break}}},highlight:function(t){var n=this.findHighlightableChoices(),r,i;if(arguments.length===0)return l(n.filter(".select2-highlighted")[0],n.get());t>=n.length&&(t=n.length-1),t<0&&(t=0),this.results.find(".select2-highlighted").removeClass("select2-highlighted"),r=e(n[t]),r.addClass("select2-highlighted"),this.ensureHighlightVisible(),i=r.data("select2-data"),i&&this.opts.element.trigger({type:"highlight",val:this.id(i),choice:i})},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(t){var n=e(t.target).closest(".select2-result-selectable");if(n.length>0&&!n.is(".select2-highlighted")){var r=this.findHighlightableChoices();this.highlight(r.index(n))}else n.length==0&&this.results.find(".select2-highlighted").removeClass("select2-highlighted")},loadMoreIfNeeded:function(){var e=this.results,t=e.find("li.select2-more-results"),n,r=-1,i=this.resultsPage+1,s=this,o=this.search.val(),u=this.context;if(t.length===0)return;n=t.offset().top-e.offset().top-e.height(),n<=this.opts.loadMorePadding&&(t.addClass("select2-active"),this.opts.query({element:this.opts.element,term:o,page:i,context:u,matcher:this.opts.matcher,callback:this.bind(function(n){if(!s.opened())return;s.opts.populateResults.call(this,e,n.results,{term:o,page:i,context:u}),n.more===!0?(t.detach().appendTo(e).text(s.opts.formatLoadMore(i+1)),window.setTimeout(function(){s.loadMoreIfNeeded()},10)):t.remove(),s.positionDropdown(),s.resultsPage=i,s.context=n.context})}))},tokenize:function(){},updateResults:function(n){function f(){i.scrollTop(0),r.removeClass("select2-active"),u.positionDropdown()}function l(e){i.html(e),f()}var r=this.search,i=this.results,s=this.opts,o,u=this,a;if(n!==!0&&(this.showSearchInput===!1||!this.opened()))return;r.addClass("select2-active");var h=this.getMaximumSelectionSize();if(h>=1){o=this.data();if(e.isArray(o)&&o.length>=h&&L(s.formatSelectionTooBig,"formatSelectionTooBig")){l("<li class='select2-selection-limit'>"+s.formatSelectionTooBig(h)+"</li>");return}}if(r.val().length<s.minimumInputLength){L(s.formatInputTooShort,"formatInputTooShort")?l("<li class='select2-no-results'>"+s.formatInputTooShort(r.val(),s.minimumInputLength)+"</li>"):l("");return}s.formatSearching()&&n===!0&&l("<li class='select2-searching'>"+s.formatSearching()+"</li>");if(s.maximumInputLength&&r.val().length>s.maximumInputLength){L(s.formatInputTooLong,"formatInputTooLong")?l("<li class='select2-no-results'>"+s.formatInputTooLong(r.val(),s.maximumInputLength)+"</li>"):l("");return}a=this.tokenize(),a!=t&&a!=null&&r.val(a),this.resultsPage=1,s.query({element:s.element,term:r.val(),page:this.resultsPage,context:null,matcher:s.matcher,callback:this.bind(function(o){var a;if(!this.opened())return;this.context=o.context===t?null:o.context,this.opts.createSearchChoice&&r.val()!==""&&(a=this.opts.createSearchChoice.call(null,r.val(),o.results),a!==t&&a!==null&&u.id(a)!==t&&u.id(a)!==null&&e(o.results).filter(function(){return c(u.id(this),u.id(a))}).length===0&&o.results.unshift(a));if(o.results.length===0&&L(s.formatNoMatches,"formatNoMatches")){l("<li class='select2-no-results'>"+s.formatNoMatches(r.val())+"</li>");return}i.empty(),u.opts.populateResults.call(this,i,o.results,{term:r.val(),page:this.resultsPage,context:null}),o.more===!0&&L(s.formatLoadMore,"formatLoadMore")&&(i.append("<li class='select2-more-results'>"+u.opts.escapeMarkup(s.formatLoadMore(this.resultsPage))+"</li>"),window.setTimeout(function(){u.loadMoreIfNeeded()},10)),this.postprocessResults(o,n),f()})})},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){b(this.search)},selectHighlighted:function(e){var t=this.highlight(),n=this.results.find(".select2-highlighted"),r=n.closest(".select2-result").data("select2-data");r&&(this.highlight(t),this.onSelect(r,e))},getPlaceholder:function(){return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder},initContainerWidth:function(){function n(){var n,r,i,s,o;if(this.opts.width==="off")return null;if(this.opts.width==="element")return this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px";if(this.opts.width==="copy"||this.opts.width==="resolve"){n=this.opts.element.attr("style");if(n!==t){r=n.split(";");for(s=0,o=r.length;s<o;s+=1){i=r[s].replace(/\s/g,"").match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/);if(i!==null&&i.length>=1)return i[1]}}return this.opts.width==="resolve"?(n=this.opts.element.css("width"),n.indexOf("%")>0?n:this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px"):null}return e.isFunction(this.opts.width)?this.opts.width():this.opts.width}var r=n.call(this);r!==null&&this.container.css("width",r)}}),i=_(r,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' onclick='return false;' class='select2-choice' tabindex='-1'>"," <span></span><abbr class='select2-search-choice-close' style='display:none;'></abbr>"," <div><b></b></div>","</a>","<input class='select2-focusser select2-offscreen' type='text'/>","<div class='select2-drop' style='display:none'>"," <div class='select2-search'>"," <input type='text' autocomplete='off' class='select2-input'/>"," </div>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return t},disable:function(){if(!this.enabled)return;this.parent.disable.apply(this,arguments),this.focusser.attr("disabled","disabled")},enable:function(){if(this.enabled)return;this.parent.enable.apply(this,arguments),this.focusser.removeAttr("disabled")},opening:function(){this.parent.opening.apply(this,arguments),this.focusser.attr("disabled","disabled"),this.opts.element.trigger(e.Event("open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments),this.focusser.removeAttr("disabled"),b(this.focusser)},focus:function(){this.opened()?this.close():(this.focusser.removeAttr("disabled"),this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.removeAttr("disabled"),this.focusser.focus()},initContainer:function(){var e,t=this.container,r=this.dropdown,i=!1;this.showSearch(this.opts.minimumResultsForSearch>=0),this.selection=e=t.find(".select2-choice"),this.focusser=t.find(".select2-focusser"),this.search.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.PAGE_UP||e.which===n.PAGE_DOWN){w(e);return}switch(e.which){case n.UP:case n.DOWN:this.moveHighlight(e.which===n.UP?-1:1),w(e);return;case n.TAB:case n.ENTER:this.selectHighlighted(),w(e);return;case n.ESC:this.cancel(e),w(e);return}})),this.focusser.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.TAB||n.isControl(e)||n.isFunctionKey(e)||e.which===n.ESC)return;if(this.opts.openOnEnter===!1&&e.which===n.ENTER){w(e);return}if(e.which==n.DOWN||e.which==n.UP||e.which==n.ENTER&&this.opts.openOnEnter){this.open(),w(e);return}if(e.which==n.DELETE||e.which==n.BACKSPACE){this.opts.allowClear&&this.clear(),w(e);return}})),d(this.focusser),this.focusser.bind("keyup-change input",this.bind(function(e){if(this.opened())return;this.open(),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.focusser.val(""),w(e)})),e.delegate("abbr","mousedown",this.bind(function(e){if(!this.enabled)return;this.clear(),E(e),this.close(),this.selection.focus()})),e.bind("mousedown",this.bind(function(e){i=!0,this.opened()?this.close():this.enabled&&this.open(),w(e),i=!1})),r.bind("mousedown",this.bind(function(){this.search.focus()})),e.bind("focus",this.bind(function(e){w(e)})),this.focusser.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})).bind("blur",this.bind(function(){this.opened()||this.container.removeClass("select2-container-active")})),this.search.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.setPlaceholder()},clear:function(){var e=this.selection.data("select2-data");this.opts.element.val(""),this.selection.find("span").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),this.opts.element.trigger({type:"removed",val:this.id(e),choice:e}),this.triggerChange({removed:e})},initSelection:function(){var e;if(this.opts.element.val()===""&&this.opts.element.text()==="")this.close(),this.setPlaceholder();else{var n=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==t&&e!==null&&(n.updateSelection(e),n.close(),n.setPlaceholder())})}},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments);return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(t,n){var r=t.find(":selected");e.isFunction(n)&&n({id:r.attr("value"),text:r.text(),element:r})}:"data"in t&&(t.initSelection=t.initSelection||function(n,r){var i=n.val();t.query({matcher:function(e,n,r){return c(i,t.id(r))},callback:e.isFunction(r)?function(e){r(e.results.length?e.results[0]:null)}:e.noop})}),t},getPlaceholder:function(){return this.select&&this.select.find("option").first().text()!==""?t:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var e=this.getPlaceholder();if(this.opts.element.val()===""&&e!==t){if(this.select&&this.select.find("option:first").text()!=="")return;this.selection.find("span").html(this.opts.escapeMarkup(e)),this.selection.addClass("select2-default"),this.selection.find("abbr").hide()}},postprocessResults:function(e,t){var n=0,r=this,i=!0;this.findHighlightableChoices().each2(function(e,t){if(c(r.id(t.data("select2-data")),r.opts.element.val()))return n=e,!1}),this.highlight(n);if(t===!0){var s=this.opts.minimumResultsForSearch;i=s<0?!1:O(e.results)>=s,this.showSearch(i)}},showSearch:function(t){this.showSearchInput=t,this.dropdown.find(".select2-search")[t?"removeClass":"addClass"]("select2-search-hidden"),e(this.dropdown,this.container)[t?"addClass":"removeClass"]("select2-with-searchbox")},onSelect:function(e,t){var n=this.opts.element.val();this.opts.element.val(this.id(e)),this.updateSelection(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),this.close(),(!t||!t.noFocus)&&this.selection.focus(),c(n,this.id(e))||this.triggerChange()},updateSelection:function(e){var n=this.selection.find("span"),r;this.selection.data("select2-data",e),n.empty(),r=this.opts.formatSelection(e,n),r!==t&&n.append(this.opts.escapeMarkup(r)),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==t&&this.selection.find("abbr").show()},val:function(){var e,n=!1,r=null,i=this;if(arguments.length===0)return this.opts.element.val();e=arguments[0],arguments.length>1&&(n=arguments[1]);if(this.select)this.select.val(e).find(":selected").each2(function(e,t){return r={id:t.attr("value"),text:t.text()},!1}),this.updateSelection(r),this.setPlaceholder(),n&&this.triggerChange();else{if(this.opts.initSelection===t)throw new Error("cannot call val() if initSelection() is not defined");if(!e&&e!==0){this.clear(),n&&this.triggerChange();return}this.opts.element.val(e),this.opts.initSelection(this.opts.element,function(e){i.opts.element.val(e?i.id(e):""),i.updateSelection(e),i.setPlaceholder(),n&&i.triggerChange()})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(e){var n;if(arguments.length===0)return n=this.selection.data("select2-data"),n==t&&(n=null),n;!e||e===""?this.clear():(this.opts.element.val(e?this.id(e):""),this.updateSelection(e))}}),s=_(r,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html([" <ul class='select2-choices'>"," <li class='select2-search-field'>"," <input type='text' autocomplete='off' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi' style='display:none;'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return t},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments);return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(e,t){var n=[];e.find(":selected").each2(function(e,t){n.push({id:t.attr("value"),text:t.text(),element:t[0]})}),t(n)}:"data"in t&&(t.initSelection=t.initSelection||function(n,r){var i=h(n.val(),t.separator);t.query({matcher:function(n,r,s){return e.grep(i,function(e){return c(e,t.id(s))}).length},callback:e.isFunction(r)?function(e){r(e.results)}:e.noop})}),t},initContainer:function(){var t=".select2-choices",r;this.searchContainer=this.container.find(".select2-search-field"),this.selection=r=this.container.find(t),this.search.bind("input paste",this.bind(function(){if(!this.enabled)return;this.opened()||this.open()})),this.search.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.BACKSPACE&&this.search.val()===""){this.close();var t,i=r.find(".select2-search-choice-focus");if(i.length>0){this.unselect(i.first()),this.search.width(10),w(e);return}t=r.find(".select2-search-choice:not(.select2-locked)"),t.length>0&&t.last().addClass("select2-search-choice-focus")}else r.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");if(this.opened())switch(e.which){case n.UP:case n.DOWN:this.moveHighlight(e.which===n.UP?-1:1),w(e);return;case n.ENTER:case n.TAB:this.selectHighlighted(),w(e);return;case n.ESC:this.cancel(e),w(e);return}if(e.which===n.TAB||n.isControl(e)||n.isFunctionKey(e)||e.which===n.BACKSPACE||e.which===n.ESC)return;if(e.which===n.ENTER){if(this.opts.openOnEnter===!1)return;if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return}this.open(),(e.which===n.PAGE_UP||e.which===n.PAGE_DOWN)&&w(e)})),this.search.bind("keyup",this.bind(this.resizeSearch)),this.search.bind("blur",this.bind(function(e){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.opened()||this.clearSearch(),e.stopImmediatePropagation()})),this.container.delegate(t,"mousedown",this.bind(function(t){if(!this.enabled)return;if(e(t.target).closest(".select2-search-choice").length>0)return;this.clearPlaceholder(),this.open(),this.focusSearch(),t.preventDefault()})),this.container.delegate(t,"focus",this.bind(function(){if(!this.enabled)return;this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder()})),this.initContainerWidth(),this.clearSearch()},enable:function(){if(this.enabled)return;this.parent.enable.apply(this,arguments),this.search.removeAttr("disabled")},disable:function(){if(!this.enabled)return;this.parent.disable.apply(this,arguments),this.search.attr("disabled",!0)},initSelection:function(){var e;this.opts.element.val()===""&&this.opts.element.text()===""&&(this.updateSelection([]),this.close(),this.clearSearch());if(this.select||this.opts.element.val()!==""){var n=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==t&&e!==null&&(n.updateSelection(e),n.close(),n.clearSearch())})}},clearSearch:function(){var e=this.getPlaceholder();e!==t&&this.getVal().length===0&&this.search.hasClass("select2-focused")===!1?(this.search.val(e).addClass("select2-default"),this.resizeSearch()):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.parent.opening.apply(this,arguments),this.clearPlaceholder(),this.resizeSearch(),this.focusSearch(),this.opts.element.trigger(e.Event("open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus(),this.opts.element.triggerHandler("focus")},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(t){var n=[],r=[],i=this;e(t).each(function(){l(i.id(this),n)<0&&(n.push(i.id(this)),r.push(this))}),t=r,this.selection.find(".select2-search-choice").remove(),e(t).each(function(){i.addSelectedChoice(this)}),i.postprocessResults()},tokenize:function(){var e=this.search.val();e=this.opts.tokenizer(e,this.data(),this.bind(this.onSelect),this.opts),e!=null&&e!=t&&(this.search.val(e),e.length>0&&this.open())},onSelect:function(e,t){this.addSelectedChoice(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.val().length>=this.getMaximumSelectionSize()&&this.updateResults(!0),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:e}),(!t||!t.noFocus)&&this.focusSearch()},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(n){var r=!n.locked,i=e("<li class='select2-search-choice'> <div></div> <a href='#' onclick='return false;' class='select2-search-choice-close' tabindex='-1'></a></li>"),s=e("<li class='select2-search-choice select2-locked'><div></div></li>"),o=r?i:s,u=this.id(n),a=this.getVal(),f;f=this.opts.formatSelection(n,o.find("div")),f!=t&&o.find("div").replaceWith("<div>"+this.opts.escapeMarkup(f)+"</div>"),r&&o.find(".select2-search-choice-close").bind("mousedown",w).bind("click dblclick",this.bind(function(t){if(!this.enabled)return;e(t.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(e(t.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),this.close(),this.focusSearch()})).dequeue(),w(t)})).bind("focus",this.bind(function(){if(!this.enabled)return;this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active")})),o.data("select2-data",n),o.insertBefore(this.searchContainer),a.push(u),this.setVal(a)},unselect:function(e){var t=this.getVal(),n,r;e=e.closest(".select2-search-choice");if(e.length===0)throw"Invalid argument: "+e+". Must be .select2-search-choice";n=e.data("select2-data");if(!n)return;r=l(this.id(n),t),r>=0&&(t.splice(r,1),this.setVal(t),this.select&&this.postprocessResults()),e.remove(),this.opts.element.trigger({type:"removed",val:this.id(n),choice:n}),this.triggerChange({removed:n})},postprocessResults:function(){var e=this.getVal(),t=this.results.find(".select2-result"),n=this.results.find(".select2-result-with-children"),r=this;t.each2(function(t,n){var i=r.id(n.data("select2-data"));l(i,e)>=0&&(n.addClass("select2-selected"),n.find(".select2-result-selectable").addClass("select2-selected"))}),n.each2(function(e,t){!t.is(".select2-result-selectable")&&t.find(".select2-result-selectable:not(.select2-selected)").length===0&&t.addClass("select2-selected")}),this.highlight()==-1&&r.highlight(0)},resizeSearch:function(){var e,t,n,r,i,s=p(this.search);e=S(this.search)+10,t=this.search.offset().left,n=this.selection.width(),r=this.selection.offset().left,i=n-(t-r)-s,i<e&&(i=n-s),i<40&&(i=n-s),i<=0&&(i=e),this.search.width(i)},getVal:function(){var e;return this.select?(e=this.select.val(),e===null?[]:e):(e=this.opts.element.val(),h(e,this.opts.separator))},setVal:function(t){var n;this.select?this.select.val(t):(n=[],e(t).each(function(){l(this,n)<0&&n.push(this)}),this.opts.element.val(n.length===0?"":n.join(this.opts.separator)))},val:function(){var n,r=!1,i=[],s=this;if(arguments.length===0)return this.getVal();n=arguments[0],arguments.length>1&&(r=arguments[1]);if(!n&&n!==0){this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),r&&this.triggerChange();return}this.setVal(n);if(this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),r&&this.triggerChange();else{if(this.opts.initSelection===t)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(t){var n=e(t).map(s.id);s.setVal(n),s.updateSelection(t),s.clearSearch(),r&&s.triggerChange()})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var t=[],n=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){t.push(n.opts.id(e(this).data("select2-data")))}),this.setVal(t),this.triggerChange()},data:function(t){var n=this,r;if(arguments.length===0)return this.selection.find(".select2-search-choice").map(function(){return e(this).data("select2-data")}).get();t||(t=[]),r=e.map(t,function(e){return n.opts.id(e)}),this.setVal(r),this.updateSelection(t),this.clearSearch()}}),e.fn.select2=function(){var n=Array.prototype.slice.call(arguments,0),r,o,u,a,f=["val","destroy","opened","open","close","focus","isFocused","container","onSortStart","onSortEnd","enable","disable","positionDropdown","data"];return this.each(function(){if(n.length===0||typeof n[0]=="object")r=n.length===0?{}:e.extend({},n[0]),r.element=e(this),r.element.get(0).tagName.toLowerCase()==="select"?a=r.element.attr("multiple"):(a=r.multiple||!1,"tags"in r&&(r.multiple=a=!0)),o=a?new s:new i,o.init(r);else{if(typeof n[0]!="string")throw"Invalid arguments to select2 plugin: "+n;if(l(n[0],f)<0)throw"Unknown method: "+n[0];u=t,o=e(this).data("select2");if(o===t)return;n[0]==="container"?u=o.container:u=o[n[0]].apply(o,n.slice(1));if(u!==t)return!1}}),u===t?this:u},e.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(e,t,n,r){var i=[];return T(e.text,n.term,i,r),i.join("")},formatSelection:function(e,n){return e?e.text:t},sortResults:function(e,t,n){return e},formatResultCssClass:function(e){return t},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(e,t){var n=t-e.length;return"Please enter "+n+" more character"+(n==1?"":"s")},formatInputTooLong:function(e,t){var n=e.length-t;return"Please enter "+n+" less character"+(n==1?"":"s")},formatSelectionTooBig:function(e){return"You can only select "+e+" item"+(e==1?"":"s")},formatLoadMore:function(e){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(e){return e.id},matcher:function(e,t){return t.toUpperCase().indexOf(e.toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:M,escapeMarkup:function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(e).replace(/[&<>"'/\\]/g,function(e){return t[e[0]]})},blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(e){return e},adaptDropdownCssClass:function(e){return null}}}(e)}),timely.define("scripts/add_new_event",["jquery_timely","domReady","ai1ec_config","scripts/add_new_event/event_location/gmaps_helper","scripts/add_new_event/event_location/input_coordinates_event_handlers","scripts/add_new_event/event_location/input_coordinates_utility_functions","scripts/add_new_event/event_date_time/date_time_event_handlers","scripts/add_new_event/event_cost_helper","external_libs/jquery.calendrical_timespan","external_libs/jquery.inputdate","external_libs/jquery.tools","external_libs/ai1ec_datepicker","external_libs/bootstrap/transition","external_libs/bootstrap/collapse","external_libs/bootstrap/modal","external_libs/bootstrap/alert","external_libs/bootstrap/tab","external_libs/select2"],function(e,t,n,r,i,s,o,u,a){var f=function(){var t=new Date(n.now*1e3),r={allday:"#ai1ec_all_day_event",start_date_input:"#ai1ec_start-date-input",start_time_input:"#ai1ec_start-time-input",start_time:"#ai1ec_start-time",end_date_input:"#ai1ec_end-date-input",end_time_input:"#ai1ec_end-time-input",end_time:"#ai1ec_end-time",date_format:n.date_format,month_names:n.month_names,day_names:n.day_names,week_start_day:n.week_start_day,twentyfour_hour:n.twentyfour_hour,now:t};e.timespan(r);var i=e("#ai1ec_exdate").val(),s=null,o=!1,u;if(i.length>=8){s=[];var f=[];e.each(i.split(","),function(e,t){var r=t.slice(0,8),i=r.substr(0,4),o=r.substr(4,2);u=r.substr(6,2),o=o.charAt(0)==="0"?"0"+(parseInt(o.charAt(1),10)-1):parseInt(o,10)-1,s.push(new Date(i,o,u)),f.push(a.formatDate(new Date(i,o,u),n.date_format,!0))}),e("#ai1ec_exclude-dates-input").text(f.join(", "))}else s=new Date(n.now*1e3),o=!0,e("#ai1ec_exclude-dates-input").text(e("#ai1ec_exclude-dates-input").data("placeholder"));e("#widgetCalendar").DatePicker({flat:!0,calendars:3,mode:"multiple",starts:n.week_start_day,date:s,onChange:function(t){t=t.toString();if(t.length>=8){var r="",i=[];e.each(t.split(","),function(e,t){i.push(a.formatDate(new Date(t),n.date_format)),r+=t.replace(/-/g,"")+"T000000Z,"}),e("#ai1ec_exclude-dates-input").text(i.join(", ")),r=r.slice(0,r.length-1),e("#ai1ec_exdate").val(r)}else e("#ai1ec_exdate").val(""),e("#ai1ec_exclude-dates-input").text(e("#ai1ec_exclude-dates-input").data("placeholder"))},prev:"«",next:"»",month_link_inactive:!0,locale:{daysMin:n.day_names.split(","),months:n.month_names.split(",")}}),o&&e("#widgetCalendar").DatePickerClear(),e(document).on("mousedown.exclude",function(t){var n=e("#widgetCalendar"),r=e("#ai1ec_exclude-dates-input");!n.is(t.target)&&!r.is(t.target)&&0===n.has(t.target).length&&e("#widgetCalendar").hide()})},l=function(){e(".ai1ec-panel-collapse").on("hide",function(){e(this).parent().removeClass("ai1ec-overflow-visible")}),e(".ai1ec-panel-collapse").on("shown",function(){var t=e(this);window.setTimeout(function(){t.parent().addClass("ai1ec-overflow-visible")},350)})},c=function(){f(),timely.require(["libs/gmaps"],function(e){e(r.init_gmaps)})},h=function(t,n){var r=null;"[object Array]"===Object.prototype.toString.call(n)?r=n.join("<br>"):r=n,e("#ai1ec_event_inline_alert").html(r),e("#ai1ec_event_inline_alert").removeClass("ai1ec-hidden"),t.preventDefault(),e("#publish, #ai1ec_bottom_publish").removeClass("button-primary-disabled"),e("#publish, #ai1ec_bottom_publish").removeClass("disabled"),e("#publish, #ai1ec_bottom_publish").siblings("#ajax-loading, .spinner").css("visibility","hidden")},p=function(t){s.ai1ec_check_lat_long_fields_filled_when_publishing_event(t)===!0&&(s.ai1ec_convert_commas_to_dots_for_coordinates(),s.ai1ec_check_lat_long_ok_for_search(t));var r=!1,i=[];e("#ai1ec_ticket_url, #ai1ec_contact_url").each(function(){var t=this.value;e(this).removeClass("ai1ec-input-warn"),e(this).closest(".ai1ec-panel-collapse").parent().find(".ai1ec-panel-heading .ai1ec-fa-warning").addClass("ai1ec-hidden").parent().css("color","");if(""!==t){var s=/(http|https):\/\//;if(!s.test(t)){e(this).closest(".ai1ec-panel-collapse").parent().find(".ai1ec-panel-heading .ai1ec-fa-warning").removeClass("ai1ec-hidden").parent().css("color","rgb(255, 79, 79)"),r||e(this).closest(".ai1ec-panel-collapse").collapse("show"),r=!0;var o=e(this).attr("id")+"_not_valid";i.push(n[o]),e(this).addClass("ai1ec-input-warn")}}}),r&&(i.push(n.general_url_not_valid),h(t,i))},d=function(){e("#ai1ec_google_map").click(i.toggle_visibility_of_google_map_on_click),e("#ai1ec_input_coordinates").change(i.toggle_visibility_of_coordinate_fields_on_click),e("#post").submit(p),e("input.coordinates").blur(i.update_map_from_coordinates_on_blur),e("#ai1ec_bottom_publish").on("click",o.trigger_publish),e(document).on("change","#ai1ec_end",o.show_end_fields).on("click","#ai1ec_repeat_apply",o.handle_click_on_apply_button).on("click","#ai1ec_repeat_cancel",o.handle_click_on_cancel_modal).on("click","#ai1ec_monthly_type_bymonthday, #ai1ec_monthly_type_byday",o.handle_checkbox_monthly_tab_modal).on("click",".ai1ec-btn-group-grid a",o.handle_click_on_toggle_buttons),e("#ai1ec_repeat_box").on("hidden.bs.modal",o.handle_modal_hide),o.execute_pseudo_handlers(),e("#widgetField > a").on("click",o.handle_animation_of_calendar_widget),e("#ai1ec_is_free").on("change",u.handle_change_is_free),e(document).on("click",".ai1ec-set-banner-image",v),e(document).on("click",".ai1ec-remove-banner",m)},v=function(){var t={};return t._frame=wp.media({state:"featured-image",states:[new wp.media.controller.FeaturedImage,new wp.media.controller.EditImage]}),t._frame.open(),e(".media-frame:last ").addClass("ai1ec-banner-image-frame"),e(".media-frame-title:last h1").text(e(".ai1ec-set-banner-block .ai1ec-set-banner-image").text()),e(".media-frame-toolbar:last").append(e(".ai1ec-media-toolbar").clone().removeClass("ai1ec-media-toolbar ai1ec-hidden")),e(".ai1ec-save-banner-image").off().on("click",function(){var n=e(".attachments:visible li.selected img").attr("src"),r=e(".attachment-details:visible input[type=text]").val();return n&&r&&e("#ai1ec_event_banner .inside").find(".ai1ec-banner-image-block").removeClass("ai1ec-hidden").find("img").attr("src",n).end().find("input").val(r).end().end().find(".ai1ec-set-banner-block").addClass("ai1ec-hidden").end().find(".ai1ec-remove-banner-block").removeClass("ai1ec-hidden"),t._frame.close(),!1}),!1},m=function(){return e("#ai1ec_event_banner .inside").find(".ai1ec-remove-banner-block").addClass("ai1ec-hidden").end().find(".ai1ec-banner-image-block").addClass("ai1ec-hidden").find("input").val("").end().find("img").attr("src","").end().end().find(".ai1ec-set-banner-block").removeClass("ai1ec-hidden"),!1},g=function(){e("#ai1ec_event").insertAfter("#ai1ec_event_inline_alert"),e("#post").addClass("ai1ec-visible")},y=function(){e("#timezone-select").select2()},b=function(){c(),t(function(){l(),g(),d(),y()})};return{start:b}}),timely.require(["scripts/add_new_event"],function(e){e.start()}),timely.define("pages/add_new_event",function(){});
|
public/js/pages/admin_settings.js
CHANGED
@@ -141,4 +141,4 @@
|
|
141 |
* limitations under the License.
|
142 |
* ======================================================================== */
|
143 |
|
144 |
-
timely.define("domReady",[],function(){function u(e){var t;for(t=0;t<e.length;t++)e[t](n)}function a(){var e=r;t&&e.length&&(r=[],u(e))}function f(){t||(t=!0,o&&clearInterval(o),a())}function c(e){return t?e(n):r.push(e),c}var e=typeof window!="undefined"&&window.document,t=!e,n=e?document:null,r=[],i,s,o;if(e){if(document.addEventListener)document.addEventListener("DOMContentLoaded",f,!1),window.addEventListener("load",f,!1);else if(window.attachEvent){window.attachEvent("onload",f),s=document.createElement("div");try{i=window.frameElement===null}catch(l){}s.doScroll&&i&&window.external&&(o=setInterval(function(){try{s.doScroll(),f()}catch(e){}},30))}(document.readyState==="complete"||document.readyState==="interactive")&&f()}return c.version="2.0.0",c.load=function(e,t,n,r){r.isBuild?n(null):c(n)},c}),timely.define("external_libs/bootstrap/tab",["jquery_timely"],function(e){var t=function(t){this.element=e(t)};t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.ai1ec-dropdown-menu)"),r=t.data("target");r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("ai1ec-active"))return;var i=n.find(".ai1ec-active:last a")[0],s=e.Event("show.bs.tab",{relatedTarget:i});t.trigger(s);if(s.isDefaultPrevented())return;var o=e(r);this.activate(t.parent("li"),n),this.activate(o,o.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:i})})},t.prototype.activate=function(t,n,r){function o(){i.removeClass("ai1ec-active").find("> .ai1ec-dropdown-menu > .ai1ec-active").removeClass("ai1ec-active"),t.addClass("ai1ec-active"),s?(t[0].offsetWidth,t.addClass("ai1ec-in")):t.removeClass("ai1ec-fade"),t.parent(".ai1ec-dropdown-menu")&&t.closest("li.ai1ec-dropdown").addClass("ai1ec-active"),r&&r()}var i=n.find("> .ai1ec-active"),s=r&&e.support.transition&&i.hasClass("ai1ec-fade");s?i.one(e.support.transition.end,o).emulateTransitionEnd(150):o(),i.removeClass("ai1ec-in")};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tab");i||r.data("bs.tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.bs.tab.data-api",'[data-toggle="ai1ec-tab"], [data-toggle="ai1ec-pill"]',function(t){t.preventDefault(),e(this).tab("show")})}),timely.define("libs/utils",["jquery_timely","external_libs/bootstrap/tab"],function(e){var t=function(){return{is_float:function(e){return!isNaN(parseFloat(e))},is_valid_coordinate:function(e,t){var n=t?90:180;return this.is_float(e)&&Math.abs(e)<n},convert_comma_to_dot:function(e){return e.replace(",",".")},field_has_value:function(t){var n="#"+t,r=e(n),i=!1;return r.length===1&&(i=e.trim(r.val())!==""),i},make_alert:function(t,n,r){var i="";switch(n){case"error":i="ai1ec-alert ai1ec-alert-danger";break;case"success":i="ai1ec-alert ai1ec-alert-success";break;default:i="ai1ec-alert"}var s=e("<div />",{"class":i,html:t});if(!r){var o=e("<button>",{type:"button","class":"ai1ec-close","data-dismiss":"ai1ec-alert",text:"×"});s.prepend(o)}return s},get_ajax_url:function(){return typeof window.ajaxurl=="undefined"?"http://localhost/wordpress/wp-admin/admin-ajax.php":window.ajaxurl},isUrl:function(e){var t=/(http|https|webcal):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)},isValidEmail:function(e){var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)},activate_saved_tab_on_page_load:function(t){null===t||undefined===t?e("ul.ai1ec-nav a:first").tab("show"):e("ul.ai1ec-nav a[href="+t+"]").tab("show")}}}();return t}),timely.define("scripts/setting/cache/cache_ajax_handlers",["jquery_timely","libs/utils"],function(e,t){var n=function(n){var r=e("#ai1ec-button-refresh"),i=e("#ai1ec-cache-scan-success"),s=e("#ai1ec-cache-scan-danger"),o;r.button("reset"),n.error?o=t.make_alert(n.message,"error"):"0"===n.state?(i.toggleClass("ai1ec-hide",!0),s.toggleClass("ai1ec-hide",!1)):(i.toggleClass("ai1ec-hide",!1),s.toggleClass("ai1ec-hide",!0))};return{handle_rescan_cache:n}}),timely.define("scripts/setting/cache/cache_event_handlers",["jquery_timely","scripts/setting/cache/cache_ajax_handlers","libs/utils"],function(e,t,n){var r=n.get_ajax_url(),i=function(){var n=e(this);n.button("loading");var i={action:"ai1ec_rescan_cache"};return e.post(r,i,t.handle_rescan_cache,"json"),!1};return{perform_rescan:i}}),timely.define("external_libs/bootstrap/button",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r)};t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.is("input")?"val":"html",i=n.data();e+="Text",i.resetText||n.data("resetText",n[r]()),n[r](i[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass("ai1ec-"+t).attr(t,t):n.removeClass("ai1ec-"+t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="ai1ec-buttons"]'),t=!0;if(e.length){var n=this.$element.find("input");n.prop("type")==="radio"&&(n.prop("checked")&&this.$element.hasClass("ai1ec-active")?t=!1:e.find(".ai1ec-active").removeClass("ai1ec-active")),t&&n.prop("checked",!this.$element.hasClass("ai1ec-active")).trigger("change")}t&&this.$element.toggleClass("ai1ec-active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("bs.button"),s=typeof n=="object"&&n;i||r.data("bs.button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.bs.button.data-api","[data-toggle^=ai1ec-button]",function(t){var n=e(t.target);n.hasClass("ai1ec-btn")||(n=n.closest(".ai1ec-btn")),n.button("toggle"),t.preventDefault()})}),timely.define("external_libs/bootstrap/transition",["jquery_timely"],function(e){function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(e.style[n]!==undefined)return{end:t[n]}}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this;e(this).one(e.support.transition.end,function(){n=!0});var i=function(){n||e(r).trigger(e.support.transition.end)};return setTimeout(i,t),this},e(function(){e.support.transition=t()})}),timely.define("external_libs/bootstrap/collapse",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.transitioning=null,this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e=this.$element.hasClass("ai1ec-width");return e?"width":"height"},t.prototype.show=function(){if(this.transitioning||this.$element.hasClass("ai1ec-in"))return;var t=e.Event("show.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.$parent&&this.$parent.find("> .ai1ec-panel > .ai1ec-in");if(n&&n.length){var r=n.data("bs.collapse");if(r&&r.transitioning)return;n.collapse("hide"),r||n.data("bs.collapse",null)}var i=this.dimension();this.$element.removeClass("ai1ec-collapse").addClass("ai1ec-collapsing")[i](0),this.transitioning=1;var s=function(){this.$element.removeClass("ai1ec-collapsing").addClass("ai1ec-in")[i]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return s.call(this);var o=e.camelCase(["scroll",i].join("-"));this.$element.one(e.support.transition.end,e.proxy(s,this)).emulateTransitionEnd(350)[i](this.$element[0][o])},t.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("ai1ec-in"))return;var t=e.Event("hide.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("ai1ec-collapsing").removeClass("ai1ec-collapse").removeClass("ai1ec-in"),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("ai1ec-collapsing").addClass("ai1ec-collapse")};if(!e.support.transition)return r.call(this);this.$element[n](0).one(e.support.transition.end,e.proxy(r,this)).emulateTransitionEnd(350)},t.prototype.toggle=function(){this[this.$element.hasClass("ai1ec-in")?"hide":"show"]()};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("bs.collapse"),s=e.extend({},t.DEFAULTS,r.data(),typeof n=="object"&&n);i||r.data("bs.collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.bs.collapse.data-api","[data-toggle=ai1ec-collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i),o=s.data("bs.collapse"),u=o?"toggle":n.data(),a=n.attr("data-parent"),f=a&&e(a);if(!o||!o.transitioning)f&&f.find('[data-toggle=ai1ec-collapse][data-parent="'+a+'"]').not(n).addClass("ai1ec-collapsed"),n[s.hasClass("ai1ec-in")?"addClass":"removeClass"]("ai1ec-collapsed");s.collapse(u)})}),timely.define("libs/collapse_helper",["jquery_timely","domReady","external_libs/bootstrap/transition","external_libs/bootstrap/collapse"],function(e,t){t(function(){e(document).on("click",'[data-toggle="ai1ec-collapse"]',function(){e(this).toggleClass("ai1ec-active"),e(".ai1ec-fa-caret-down, .ai1ec-fa-caret-up, .ai1ec-fa-chevron-down, .ai1ec-fa-chevron-up, .ai1ec-fa-arrow-down, .ai1ec-fa-arrow-up",this).toggleClass("ai1ec-hide")})})}),timely.define("external_libs/bootstrap/dropdown",["jquery_timely"],function(e){function i(){e(t).remove(),e(n).each(function(t){var n=s(e(this));if(!n.hasClass("ai1ec-open"))return;n.trigger(t=e.Event("hide.bs.dropdown"));if(t.isDefaultPrevented())return;n.removeClass("ai1ec-open").trigger("hidden.bs.dropdown")})}function s(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r=n&&e(n);return r&&r.length?r:t.parent()}var t=".ai1ec-dropdown-backdrop",n="[data-toggle=ai1ec-dropdown]",r=function(t){e(t).on("click.bs.dropdown",this.toggle)};r.prototype.toggle=function(t){var n=e(this);if(n.is(".ai1ec-disabled, :disabled"))return;var r=s(n),o=r.hasClass("ai1ec-open");i();if(!o){"ontouchstart"in document.documentElement&&!r.closest(".ai1ec-navbar-nav").length&&e('<div class="ai1ec-dropdown-backdrop"/>').insertAfter(e(this)).on("click",i),r.trigger(t=e.Event("show.bs.dropdown"));if(t.isDefaultPrevented())return;r.toggleClass("ai1ec-open").trigger("shown.bs.dropdown"),n.focus()}return!1},r.prototype.keydown=function(t){if(!/(38|40|27)/.test(t.keyCode))return;var r=e(this);t.preventDefault(),t.stopPropagation();if(r.is(".ai1ec-disabled, :disabled"))return;var i=s(r),o=i.hasClass("ai1ec-open");if(!o||o&&t.keyCode==27)return t.which==27&&i.find(n).focus(),r.click();var u=e("[role=menu] li:not(.ai1ec-divider):visible a",i);if(!u.length)return;var a=u.index(u.filter(":focus"));t.keyCode==38&&a>0&&a--,t.keyCode==40&&a<u.length-1&&a++,~a||(a=0),u.eq(a).focus()};var o=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new r(this)),typeof t=="string"&&i[t].call(n)})},e.fn.dropdown.Constructor=r,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=o,this},e(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".ai1ec-dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",n,r.prototype.toggle).on("keydown.bs.dropdown.data-api",n+", [role=menu]",r.prototype.keydown)}),timely.define("external_libs/locales/bootstrap-datepicker.bg",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.bg={days:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота","Неделя"],daysShort:["Нед","Пон","Вто","Сря","Чет","Пет","Съб","Нед"],daysMin:["Н","П","В","С","Ч","П","С","Н"],months:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],monthsShort:["Ян","Фев","Мар","Апр","Май","Юни","Юли","Авг","Сеп","Окт","Ное","Дек"],today:"днес"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.br",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.br={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"]}}}}),timely.define("external_libs/locales/bootstrap-datepicker.cs",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.cs={days:["Neděle","Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota","Neděle"],daysShort:["Ned","Pon","Úte","Stř","Čtv","Pát","Sob","Ned"],daysMin:["Ne","Po","Út","St","Čt","Pá","So","Ne"],months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"],monthsShort:["Led","Úno","Bře","Dub","Kvě","Čer","Čnc","Srp","Zář","Říj","Lis","Pro"],today:"Dnes"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.da",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.da={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],months:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"I Dag",clear:"Nulstil"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.de",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.de={days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"],daysShort:["Son","Mon","Die","Mit","Don","Fre","Sam","Son"],daysMin:["So","Mo","Di","Mi","Do","Fr","Sa","So"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",clear:"Löschen",weekStart:1,format:"dd.mm.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.es",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.es={days:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"],daysShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb","Dom"],daysMin:["Do","Lu","Ma","Mi","Ju","Vi","Sa","Do"],months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthsShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],today:"Hoy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.fi",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.fi={days:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai","sunnuntai"],daysShort:["sun","maa","tii","kes","tor","per","lau","sun"],daysMin:["su","ma","ti","ke","to","pe","la","su"],months:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"],monthsShort:["tam","hel","maa","huh","tou","kes","hei","elo","syy","lok","mar","jou"],today:"tänään",weekStart:1,format:"d.m.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.fr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.fr={days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Dimanche"],daysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam","Dim"],daysMin:["D","L","Ma","Me","J","V","S","D"],months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],monthsShort:["Jan","Fév","Mar","Avr","Mai","Jui","Jul","Aou","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",clear:"Effacer",weekStart:1,format:"dd/mm/yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.id",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.id={days:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu","Minggu"],daysShort:["Mgu","Sen","Sel","Rab","Kam","Jum","Sab","Mgu"],daysMin:["Mg","Sn","Sl","Ra","Ka","Ju","Sa","Mg"],months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ags","Sep","Okt","Nov","Des"],today:"Hari Ini",clear:"Kosongkan"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.is",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.is={days:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur","Sunnudagur"],daysShort:["Sun","Mán","Þri","Mið","Fim","Fös","Lau","Sun"],daysMin:["Su","Má","Þr","Mi","Fi","Fö","La","Su"],months:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Maí","Jún","Júl","Ágú","Sep","Okt","Nóv","Des"],today:"Í Dag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.it",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.it={days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato","Domenica"],daysShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab","Dom"],daysMin:["Do","Lu","Ma","Me","Gi","Ve","Sa","Do"],months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],monthsShort:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],today:"Oggi",clear:"Cancella",weekStart:1,format:"dd/mm/yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ja",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ja={days:["日曜","月曜","火曜","水曜","木曜","金曜","土曜","日曜"],daysShort:["日","月","火","水","木","金","土","日"],daysMin:["日","月","火","水","木","金","土","日"],months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],today:"今日",format:"yyyy/mm/dd"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.kr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.kr={days:["일요일","월요일","화요일","수요일","목요일","금요일","토요일","일요일"],daysShort:["일","월","화","수","목","금","토","일"],daysMin:["일","월","화","수","목","금","토","일"],months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],monthsShort:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]}}}}),timely.define("external_libs/locales/bootstrap-datepicker.lt",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.lt={days:["Sekmadienis","Pirmadienis","Antradienis","Trečiadienis","Ketvirtadienis","Penktadienis","Šeštadienis","Sekmadienis"],daysShort:["S","Pr","A","T","K","Pn","Š","S"],daysMin:["Sk","Pr","An","Tr","Ke","Pn","Št","Sk"],months:["Sausis","Vasaris","Kovas","Balandis","Gegužė","Birželis","Liepa","Rugpjūtis","Rugsėjis","Spalis","Lapkritis","Gruodis"],monthsShort:["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rugp","Rugs","Spa","Lap","Gru"],today:"Šiandien",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.lv",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.lv={days:["Svētdiena","Pirmdiena","Otrdiena","Trešdiena","Ceturtdiena","Piektdiena","Sestdiena","Svētdiena"],daysShort:["Sv","P","O","T","C","Pk","S","Sv"],daysMin:["Sv","Pr","Ot","Tr","Ce","Pk","Se","Sv"],months:["Janvāris","Februāris","Marts","Aprīlis","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jūn","Jūl","Aug","Sep","Okt","Nov","Dec"],today:"Šodien",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ms",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ms={days:["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu","Ahad"],daysShort:["Aha","Isn","Sel","Rab","Kha","Jum","Sab","Aha"],daysMin:["Ah","Is","Se","Ra","Kh","Ju","Sa","Ah"],months:["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ogo","Sep","Okt","Nov","Dis"],today:"Hari Ini"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.nb",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.nb={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],today:"I Dag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.nl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.nl={days:["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag","Zondag"],daysShort:["Zo","Ma","Di","Wo","Do","Vr","Za","Zo"],daysMin:["Zo","Ma","Di","Wo","Do","Vr","Za","Zo"],months:["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mrt","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"Vandaag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.pl={days:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota","Niedziela"],daysShort:["Nie","Pn","Wt","Śr","Czw","Pt","So","Nie"],daysMin:["N","Pn","Wt","Śr","Cz","Pt","So","N"],months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],monthsShort:["Sty","Lu","Mar","Kw","Maj","Cze","Lip","Sie","Wrz","Pa","Lis","Gru"],today:"Dzisiaj",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pt-BR",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["pt-BR"]={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",clear:"Limpar"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pt",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.pt={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",clear:"Limpar"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ru",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ru={days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота","Воскресенье"],daysShort:["Вск","Пнд","Втр","Срд","Чтв","Птн","Суб","Вск"],daysMin:["Вс","Пн","Вт","Ср","Чт","Пт","Сб","Вс"],months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthsShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],today:"Сегодня",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.sl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.sl={days:["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota","Nedelja"],daysShort:["Ned","Pon","Tor","Sre","Čet","Pet","Sob","Ned"],daysMin:["Ne","Po","To","Sr","Če","Pe","So","Ne"],months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],today:"Danes"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.sv",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.sv={days:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag","Söndag"],daysShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör","Sön"],daysMin:["Sö","Må","Ti","On","To","Fr","Lö","Sö"],months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"I Dag",format:"yyyy-mm-dd",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.th",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.th={days:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัส","ศุกร์","เสาร์","อาทิตย์"],daysShort:["อา","จ","อ","พ","พฤ","ศ","ส","อา"],daysMin:["อา","จ","อ","พ","พฤ","ศ","ส","อา"],months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],monthsShort:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],today:"วันนี้"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.tr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.tr={days:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi","Pazar"],daysShort:["Pz","Pzt","Sal","Çrş","Prş","Cu","Cts","Pz"],daysMin:["Pz","Pzt","Sa","Çr","Pr","Cu","Ct","Pz"],months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],monthsShort:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],today:"Bugün",format:"dd.mm.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.zh-CN",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["zh-CN"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["周日","周一","周二","周三","周四","周五","周六","周日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今日",format:"yyyy年mm月dd日",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.zh-TW",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["zh-TW"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["週日","週一","週二","週三","週四","週五","週六","週日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今天",format:"yyyy年mm月dd日",weekStart:1}}}}),timely.define("external_libs/bootstrap_datepicker",["jquery_timely","ai1ec_config","external_libs/locales/bootstrap-datepicker.bg","external_libs/locales/bootstrap-datepicker.br","external_libs/locales/bootstrap-datepicker.cs","external_libs/locales/bootstrap-datepicker.da","external_libs/locales/bootstrap-datepicker.de","external_libs/locales/bootstrap-datepicker.es","external_libs/locales/bootstrap-datepicker.fi","external_libs/locales/bootstrap-datepicker.fr","external_libs/locales/bootstrap-datepicker.id","external_libs/locales/bootstrap-datepicker.is","external_libs/locales/bootstrap-datepicker.it","external_libs/locales/bootstrap-datepicker.ja","external_libs/locales/bootstrap-datepicker.kr","external_libs/locales/bootstrap-datepicker.lt","external_libs/locales/bootstrap-datepicker.lv","external_libs/locales/bootstrap-datepicker.ms","external_libs/locales/bootstrap-datepicker.nb","external_libs/locales/bootstrap-datepicker.nl","external_libs/locales/bootstrap-datepicker.pl","external_libs/locales/bootstrap-datepicker.pt-BR","external_libs/locales/bootstrap-datepicker.pt","external_libs/locales/bootstrap-datepicker.ru","external_libs/locales/bootstrap-datepicker.sl","external_libs/locales/bootstrap-datepicker.sv","external_libs/locales/bootstrap-datepicker.th","external_libs/locales/bootstrap-datepicker.tr","external_libs/locales/bootstrap-datepicker.zh-CN","external_libs/locales/bootstrap-datepicker.zh-TW"],function(e,t){function r(){return new Date(Date.UTC.apply(Date,arguments))}function i(){var e=new Date;return r(e.getFullYear(),e.getMonth(),e.getDate())}function s(e){return function(){return this[e].apply(this,arguments)}}function f(t,n){var r=e(t).data(),i={},s,o=new RegExp("^"+n.toLowerCase()+"([A-Z])"),n=new RegExp("^"+n.toLowerCase());for(var u in r)n.test(u)&&(s=u.replace(o,function(e,t){return t.toLowerCase()}),i[s]=r[u]);return i}function l(t){var n={};if(!d[t]){t=t.split("-")[0];if(!d[t])return}var r=d[t];return e.each(p,function(e,t){t in r&&(n[t]=r[t])}),n}var n=e(window),o=function(){var t={get:function(e){return this.slice(e)[0]},contains:function(e){var t=e&&e.valueOf();for(var n=0,r=this.length;n<r;n++)if(this[n].valueOf()===t)return n;return-1},remove:function(e){this.splice(e,1)},replace:function(t){if(!t)return;e.isArray(t)||(t=[t]),this.clear(),this.push.apply(this,t)},clear:function(){this.splice(0)},copy:function(){var e=new o;return e.replace(this),e}};return function(){var n=[];return n.push.apply(n,arguments),e.extend(n,t),n}}(),u=function(t,n){this.dates=new o,this.viewDate=i(),this.focusDate=null,this._process_options(n),this.element=e(t),this.isInline=!1,this.isInput=this.element.is("input"),this.component=this.element.is(".ai1ec-date")?this.element.find(".ai1ec-input-group, .ai1ec-input-group-addon, .ai1ec-btn"):!1,this.hasInput=this.component&&this.element.find("input").length,this.component&&this.component.length===0&&(this.component=!1),this.picker=e(v.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("ai1ec-datepicker-inline").appendTo(this.element):this.picker.addClass("ai1ec-datepicker-dropdown ai1ec-dropdown-menu"),this.o.rtl&&this.picker.addClass("ai1ec-datepicker-rtl"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.ai1ec-today").attr("colspan",function(e,t){return parseInt(t)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};u.prototype={constructor:u,_process_options:function(n){this._o=e.extend({},this._o,n);var r=this.o=e.extend({},this._o),i=r.language;d[i]||(i=i.split("-")[0],d[i]||(i=t.language,d[i]||(i=h.language))),r.language=i;switch(r.startView){case 2:case"decade":r.startView=2;break;case 1:case"year":r.startView=1;break;default:r.startView=0}switch(r.minViewMode){case 1:case"months":r.minViewMode=1;break;case 2:case"years":r.minViewMode=2;break;default:r.minViewMode=0}r.startView=Math.max(r.startView,r.minViewMode),r.multidate!==!0&&(r.multidate=Number(r.multidate)||!1,r.multidate!==!1?r.multidate=Math.max(0,r.multidate):r.multidate=1),r.multidateSeparator=String(r.multidateSeparator),r.weekStart%=7,r.weekEnd=(r.weekStart+6)%7;var s=v.parseFormat(r.format);r.startDate!==-Infinity&&(r.startDate?r.startDate instanceof Date?r.startDate=this._local_to_utc(this._zero_time(r.startDate)):r.startDate=v.parseDate(r.startDate,s,r.language):r.startDate=-Infinity),r.endDate!==Infinity&&(r.endDate?r.endDate instanceof Date?r.endDate=this._local_to_utc(this._zero_time(r.endDate)):r.endDate=v.parseDate(r.endDate,s,r.language):r.endDate=Infinity),r.daysOfWeekDisabled=r.daysOfWeekDisabled||[],e.isArray(r.daysOfWeekDisabled)||(r.daysOfWeekDisabled=r.daysOfWeekDisabled.split(/[,\s]*/)),r.daysOfWeekDisabled=e.map(r.daysOfWeekDisabled,function(e){return parseInt(e,10)});var o=String(r.orientation).toLowerCase().split(/\s+/g),u=r.orientation.toLowerCase();o=e.grep(o,function(e){return/^auto|left|right|top|bottom$/.test(e)}),r.orientation={x:"auto",y:"auto"};if(!!u&&u!=="auto")if(o.length===1)switch(o[0]){case"top":case"bottom":r.orientation.y=o[0];break;case"left":case"right":r.orientation.x=o[0]}else u=e.grep(o,function(e){return/^left|right$/.test(e)}),r.orientation.x=u[0]||"auto",u=e.grep(o,function(e){return/^top|bottom$/.test(e)}),r.orientation.y=u[0]||"auto"},_events:[],_secondaryEvents:[],_applyEvents:function(e){for(var t=0,n,r,i;t<e.length;t++)n=e[t][0],e[t].length==2?(r=undefined,i=e[t][1]):e[t].length==3&&(r=e[t][1],i=e[t][2]),n.on(i,r)},_unapplyEvents:function(e){for(var t=0,n,r,i;t<e.length;t++)n=e[t][0],e[t].length==2?(i=undefined,r=e[t][1]):e[t].length==3&&(i=e[t][1],r=e[t][2]),n.off(r,i)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:e.proxy(this.show,this),keyup:e.proxy(function(t){e.inArray(t.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:e.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:e.proxy(this.show,this),keyup:e.proxy(function(t){e.inArray(t.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:e.proxy(this.keydown,this)}],[this.component,{click:e.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:e.proxy(this.show,this)}]],this._events.push([this.element,"*",{blur:e.proxy(function(e){this._focused_from=e.target},this)}],[this.element,{blur:e.proxy(function(e){this._focused_from=e.target},this)}]),this._secondaryEvents=[[this.picker,{click:e.proxy(this.click,this)}],[e(window),{resize:e.proxy(this.place,this)}],[e(document),{"mousedown touchstart":e.proxy(function(e){this.element.is(e.target)||this.element.find(e.target).length||this.picker.is(e.target)||this.picker.find(e.target).length||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,n){var r=n||this.dates.get(-1),i=this._utc_to_local(r);this.element.trigger({type:t,date:i,dates:e.map(this.dates,this._utc_to_local),format:e.proxy(function(e,t){arguments.length===0?(e=this.dates.length-1,t=this.o.format):typeof e=="string"&&(t=e,e=this.dates.length-1),t=t||this.o.format;var n=this.dates.get(e);return v.formatDate(n,t,this.o.language)},this)})},show:function(e){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.height=this.component?this.component.outerHeight():this.element.outerHeight(),this.place(),this._attachSecondaryEvents(),this._trigger("show")},hide:function(){if(this.isInline)return;if(!this.picker.is(":visible"))return;this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide")},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date},_utc_to_local:function(e){return e&&new Date(e.getTime()+e.getTimezoneOffset()*6e4)},_local_to_utc:function(e){return e&&new Date(e.getTime()-e.getTimezoneOffset()*6e4)},_zero_time:function(e){return e&&new Date(e.getFullYear(),e.getMonth(),e.getDate())},_zero_utc_time:function(e){return e&&new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},getDates:function(){return e.map(this.dates,this._utc_to_local)},getUTCDates:function(){return e.map(this.dates,function(e){return new Date(e)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){return new Date(this.dates.get(-1))},setDates:function(){this.update.apply(this,arguments),this._trigger("changeDate"),this.setValue()},setUTCDates:function(){this.update.apply(this,e.map(arguments,this._utc_to_local)),this._trigger("changeDate"),this.setValue()},setDate:s("setDates"),setUTCDate:s("setUTCDates"),setValue:function(){var e=this.getFormattedDate();this.isInput?this.element.val(e).change():this.component&&this.element.find("input").val(e).change()},getFormattedDate:function(t){t===undefined&&(t=this.o.format);var n=this.o.language;return e.map(this.dates,function(e){return v.formatDate(e,t,n)}).join(this.o.multidateSeparator)},setStartDate:function(e){this._process_options({startDate:e}),this.update(),this.updateNavArrows()},setEndDate:function(e){this._process_options({endDate:e}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(e){this._process_options({daysOfWeekDisabled:e}),this.update(),this.updateNavArrows()},place:function(){if(this.isInline)return;var t=this.picker.outerWidth(),r=this.picker.outerHeight(),i=10,s=n.width(),o=n.height(),u=n.scrollTop(),a=parseInt(this.element.parents().filter(function(){return e(this).css("z-index")!="auto"}).first().css("z-index"))+10,f=this.component?this.component.parent().offset():this.element.offset(),l=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),c=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),h=f.left,p=f.top;this.picker.removeClass("ai1ec-datepicker-orient-top ai1ec-datepicker-orient-bottom ai1ec-datepicker-orient-right ai1ec-datepicker-orient-left"),this.o.orientation.x!=="auto"?(this.picker.addClass("ai1ec-datepicker-orient-"+this.o.orientation.x),this.o.orientation.x==="right"&&(h-=t-c)):(this.picker.addClass("ai1ec-datepicker-orient-left"),f.left<0?h-=f.left-i:f.left+t>s&&(h=s-t-i));var d=this.o.orientation.y,v,m;d==="auto"&&(v=-u+f.top-r,m=u+o-(f.top+l+r),Math.max(v,m)===m?d="top":d="bottom"),this.picker.addClass("ai1ec-datepicker-orient-"+d),d==="top"?p+=l:p-=r+parseInt(this.picker.css("padding-top")),this.picker.css({top:p,left:h,zIndex:a})},_allow_update:!0,update:function(){if(!this._allow_update)return;var t=this.dates.copy(),n=[],r=!1;arguments.length?(e.each(arguments,e.proxy(function(e,t){t instanceof Date&&(t=this._local_to_utc(t)),n.push(t)},this)),r=!0):(n=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),n&&this.o.multidate?n=n.split(this.o.multidateSeparator):n=[n],delete this.element.data().date),n=e.map(n,e.proxy(function(e){return v.parseDate(e,this.o.format,this.o.language)},this)),n=e.grep(n,e.proxy(function(e){return e<this.o.startDate||e>this.o.endDate||!e},this),!0),this.dates.replace(n),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate&&(this.viewDate=new Date(this.o.endDate)),r?this.setValue():n.length&&String(t)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&t.length&&this._trigger("clearDate"),this.fill()},fillDow:function(){var e=this.o.weekStart,t="<tr>";if(this.o.calendarWeeks){var n='<th class="ai1ec-cw"> </th>';t+=n,this.picker.find(".ai1ec-datepicker-days thead tr:first-child").prepend(n)}while(e<this.o.weekStart+7)t+='<th class="ai1ec-dow">'+d[this.o.language].daysMin[e++%7]+"</th>";t+="</tr>",this.picker.find(".ai1ec-datepicker-days thead").append(t)},fillMonths:function(){var e="",t=0;while(t<12)e+='<span class="ai1ec-month">'+d[this.o.language].monthsShort[t++]+"</span>";this.picker.find(".ai1ec-datepicker-months td").html(e)},setRange:function(t){!t||!t.length?delete this.range:this.range=e.map(t,function(e){return e.valueOf()}),this.fill()},getClassNames:function(t){var n=[],r=this.viewDate.getUTCFullYear(),i=this.viewDate.getUTCMonth(),s=new Date;return t.getUTCFullYear()<r||t.getUTCFullYear()==r&&t.getUTCMonth()<i?n.push("ai1ec-old"):(t.getUTCFullYear()>r||t.getUTCFullYear()==r&&t.getUTCMonth()>i)&&n.push("ai1ec-new"),this.focusDate&&t.valueOf()===this.focusDate.valueOf()&&n.push("ai1ec-focused"),this.o.todayHighlight&&t.getUTCFullYear()==s.getFullYear()&&t.getUTCMonth()==s.getMonth()&&t.getUTCDate()==s.getDate()&&n.push("ai1ec-today"),this.dates.contains(t)!==-1&&n.push("ai1ec-active"),(t.valueOf()<this.o.startDate||t.valueOf()>this.o.endDate||e.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled)!==-1)&&n.push("ai1ec-disabled"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&n.push("ai1ec-range"),e.inArray(t.valueOf(),this.range)!=-1&&n.push("ai1ec-selected")),n},fill:function(){var t=new Date(this.viewDate),n=t.getUTCFullYear(),i=t.getUTCMonth(),s=this.o.startDate!==-Infinity?this.o.startDate.getUTCFullYear():-Infinity,o=this.o.startDate!==-Infinity?this.o.startDate.getUTCMonth():-Infinity,u=this.o.endDate!==Infinity?this.o.endDate.getUTCFullYear():Infinity,a=this.o.endDate!==Infinity?this.o.endDate.getUTCMonth():Infinity,f,l;this.picker.find(".ai1ec-datepicker-days thead th.ai1ec-datepicker-switch").text(d[this.o.language].months[i]+" "+n),this.picker.find("tfoot th.ai1ec-today").text(d[this.o.language].today).toggle(this.o.todayBtn!==!1),this.picker.find("tfoot th.ai1ec-clear").text(d[this.o.language].clear).toggle(this.o.clearBtn!==!1),this.updateNavArrows(),this.fillMonths();var c=r(n,i-1,28),h=v.getDaysInMonth(c.getUTCFullYear(),c.getUTCMonth());c.setUTCDate(h),c.setUTCDate(h-(c.getUTCDay()-this.o.weekStart+7)%7);var p=new Date(c);p.setUTCDate(p.getUTCDate()+42),p=p.valueOf();var m=[],g;while(c.valueOf()<p){if(c.getUTCDay()==this.o.weekStart){m.push("<tr>");if(this.o.calendarWeeks){var y=new Date(+c+(this.o.weekStart-c.getUTCDay()-7)%7*864e5),b=new Date(+y+(11-y.getUTCDay())%7*864e5),w=new Date(+(w=r(b.getUTCFullYear(),0,1))+(11-w.getUTCDay())%7*864e5),E=(b-w)/864e5/7+1;m.push('<td class="ai1ec-cw">'+E+"</td>")}}g=this.getClassNames(c),g.push("ai1ec-day");if(this.o.beforeShowDay!==e.noop){var S=this.o.beforeShowDay(this._utc_to_local(c));S===undefined?S={}:typeof S=="boolean"?S={enabled:S}:typeof S=="string"&&(S={classes:S}),S.enabled===!1&&g.push("ai1ec-disabled"),S.classes&&(g=g.concat(S.classes.split(/\s+/))),S.tooltip&&(f=S.tooltip)}g=e.unique(g),m.push('<td class="'+g.join(" ")+'"'+(f?' title="'+f+'"':"")+">"+c.getUTCDate()+"</td>"),c.getUTCDay()==this.o.weekEnd&&m.push("</tr>"),c.setUTCDate(c.getUTCDate()+1)}this.picker.find(".ai1ec-datepicker-days tbody").empty().append(m.join(""));var x=this.picker.find(".ai1ec-datepicker-months").find("th:eq(1)").text(n).end().find("span").removeClass("ai1ec-active");e.each(this.dates,function(e,t){t.getUTCFullYear()==n&&x.eq(t.getUTCMonth()).addClass("ai1ec-active")}),(n<s||n>u)&&x.addClass("ai1ec-disabled"),n==s&&x.slice(0,o).addClass("ai1ec-disabled"),n==u&&x.slice(a+1).addClass("ai1ec-disabled"),m="",n=parseInt(n/10,10)*10;var T=this.picker.find(".ai1ec-datepicker-years").find("th:eq(1)").text(n+"-"+(n+9)).end().find("td");n-=1;var N=e.map(this.dates,function(e){return e.getUTCFullYear()}),C;for(var k=-1;k<11;k++)C=["ai1ec-year"],k===-1?C.push("ai1ec-old"):k===10&&C.push("ai1ec-new"),e.inArray(n,N)!==-1&&C.push("ai1ec-active"),(n<s||n>u)&&C.push("ai1ec-disabled"),m+='<span class="'+C.join(" ")+'">'+n+"</span>",n+=1;T.html(m)},updateNavArrows:function(){if(!this._allow_update)return;var e=new Date(this.viewDate),t=e.getUTCFullYear(),n=e.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-Infinity&&t<=this.o.startDate.getUTCFullYear()&&n<=this.o.startDate.getUTCMonth()?this.picker.find(".ai1ec-prev").css({visibility:"hidden"}):this.picker.find(".ai1ec-prev").css({visibility:"visible"}),this.o.endDate!==Infinity&&t>=this.o.endDate.getUTCFullYear()&&n>=this.o.endDate.getUTCMonth()?this.picker.find(".ai1ec-next").css({visibility:"hidden"}):this.picker.find(".ai1ec-next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-Infinity&&t<=this.o.startDate.getUTCFullYear()?this.picker.find(".ai1ec-prev").css({visibility:"hidden"}):this.picker.find(".ai1ec-prev").css({visibility:"visible"}),this.o.endDate!==Infinity&&t>=this.o.endDate.getUTCFullYear()?this.picker.find(".ai1ec-next").css({visibility:"hidden"}):this.picker.find(".ai1ec-next").css({visibility:"visible"})}},click:function(t){t.preventDefault();var n=e(t.target).closest("span, td, th"),i,s,o;if(n.length==1)switch(n[0].nodeName.toLowerCase()){case"th":switch(n[0].className){case"ai1ec-datepicker-switch":this.showMode(1);break;case"ai1ec-prev":case"ai1ec-next":var u=v.modes[this.viewMode].navStep*(n[0].className=="ai1ec-prev"?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,u),this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,u),this.viewMode===1&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"ai1ec-today":var a=new Date;a=r(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0),this.showMode(-2);var f=this.o.todayBtn=="linked"?null:"view";this._setDate(a,f);break;case"ai1ec-clear":var l;this.isInput?l=this.element:this.component&&(l=this.element.find("input")),l&&l.val("").change(),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()}break;case"span":n.is(".ai1ec-disabled")||(this.viewDate.setUTCDate(1),n.is(".ai1ec-month")?(o=1,s=n.parent().find("span").index(n),i=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(s),this._trigger("changeMonth",this.viewDate),this.o.minViewMode===1&&this._setDate(r(i,s,o))):(o=1,s=0,i=parseInt(n.text(),10)||0,this.viewDate.setUTCFullYear(i),this._trigger("changeYear",this.viewDate),this.o.minViewMode===2&&this._setDate(r(i,s,o))),this.showMode(-1),this.fill());break;case"td":n.is(".ai1ec-day")&&!n.is(".ai1ec-disabled")&&(o=parseInt(n.text(),10)||1,i=this.viewDate.getUTCFullYear(),s=this.viewDate.getUTCMonth(),n.is(".ai1ec-old")?s===0?(s=11,i-=1):s-=1:n.is(".ai1ec-new")&&(s==11?(s=0,i+=1):s+=1),this._setDate(r(i,s,o)))}this.picker.is(":visible")&&this._focused_from&&e(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(e){var t=this.dates.contains(e);e?t!==-1?this.dates.remove(t):this.dates.push(e):this.dates.clear();if(typeof this.o.multidate=="number")while(this.dates.length>this.o.multidate)this.dates.remove(0)},_setDate:function(e,t){(!t||t=="date")&&this._toggle_multidate(e&&new Date(e));if(!t||t=="view")this.viewDate=e&&new Date(e);this.fill(),this.setValue(),this._trigger("changeDate");var n;this.isInput?n=this.element:this.component&&(n=this.element.find("input")),n&&n.change(),this.o.autoclose&&(!t||t=="date")&&this.hide()},moveMonth:function(e,t){if(!e)return undefined;if(!t)return e;var n=new Date(e.valueOf()),r=n.getUTCDate(),i=n.getUTCMonth(),s=Math.abs(t),o,u;t=t>0?1:-1;if(s==1){u=t==-1?function(){return n.getUTCMonth()==i}:function(){return n.getUTCMonth()!=o},o=i+t,n.setUTCMonth(o);if(o<0||o>11)o=(o+12)%12}else{for(var a=0;a<s;a++)n=this.moveMonth(n,t);o=n.getUTCMonth(),n.setUTCDate(r),u=function(){return o!=n.getUTCMonth()}}while(u())n.setUTCDate(--r),n.setUTCMonth(o);return n},moveYear:function(e,t){return this.moveMonth(e,t*12)},dateWithinRange:function(e){return e>=this.o.startDate&&e<=this.o.endDate},keydown:function(e){if(this.picker.is(":not(:visible)")){e.keyCode==27&&this.show();return}var t=!1,n,r,s,o=this.focusDate||this.viewDate;switch(e.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),e.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;n=e.keyCode==37?-1:1,e.ctrlKey?(r=this.moveYear(this.dates.get(-1)||i(),n),s=this.moveYear(o,n),this._trigger("changeYear",this.viewDate)):e.shiftKey?(r=this.moveMonth(this.dates.get(-1)||i(),n),s=this.moveMonth(o,n),this._trigger("changeMonth",this.viewDate)):(r=new Date(this.dates.get(-1)||i()),r.setUTCDate(r.getUTCDate()+n),s=new Date(o),s.setUTCDate(o.getUTCDate()+n)),this.dateWithinRange(r)&&(this.focusDate=this.viewDate=s,this.setValue(),this.fill(),e.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;n=e.keyCode==38?-1:1,e.ctrlKey?(r=this.moveYear(this.dates.get(-1)||i(),n),s=this.moveYear(o,n),this._trigger("changeYear",this.viewDate)):e.shiftKey?(r=this.moveMonth(this.dates.get(-1)||i(),n),s=this.moveMonth(o,n),this._trigger("changeMonth",this.viewDate)):(r=new Date(this.dates.get(-1)||i()),r.setUTCDate(r.getUTCDate()+n*7),s=new Date(o),s.setUTCDate(o.getUTCDate()+n*7)),this.dateWithinRange(r)&&(this.focusDate=this.viewDate=s,this.setValue(),this.fill(),e.preventDefault());break;case 32:break;case 13:o=this.focusDate||this.dates.get(-1)||this.viewDate,this._toggle_multidate(o),t=!0,this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(e.preventDefault(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}if(t){this.dates.length?this._trigger("changeDate"):this._trigger("clearDate");var u;this.isInput?u=this.element:this.component&&(u=this.element.find("input")),u&&u.change()}},showMode:function(e){e&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+e))),this.picker.find(">div").hide().filter(".ai1ec-datepicker-"+v.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var a=function(t,n){this.element=e(t),this.inputs=e.map(n.inputs,function(e){return e.jquery?e[0]:e}),delete n.inputs,e(this.inputs).datepicker(n).bind("changeDate",e.proxy(this.dateUpdated,this)),this.pickers=e.map(this.inputs,function(t){return e(t).data("datepicker")}),this.updateDates()};a.prototype={updateDates:function(){this.dates=e.map(this.pickers,function(e){return e.getUTCDate()}),this.updateRanges()},updateRanges:function(){var t=e.map(this.dates,function(e){return e.valueOf()});e.each(this.pickers,function(e,n){n.setRange(t)})},dateUpdated:function(t){if(this.updating)return;this.updating=!0;var n=e(t.target).data("datepicker"),r=n.getUTCDate(),i=e.inArray(t.target,this.inputs),s=this.inputs.length;if(i==-1)return;e.each(this.pickers,function(e,t){t.getUTCDate()||t.setUTCDate(r)});if(r<this.dates[i])while(i>=0&&r<this.dates[i])this.pickers[i--].setUTCDate(r);else if(r>this.dates[i])while(i<s&&r>this.dates[i])this.pickers[i++].setUTCDate(r);this.updateDates(),delete this.updating},remove:function(){e.map(this.pickers,function(e){e.remove()}),delete this.element.data().datepicker}};var c=e.fn.datepicker;e.fn.datepicker=function(t){var n=Array.apply(null,arguments);n.shift();var r;return this.each(function(){var i=e(this),s=i.data("datepicker"),o=typeof t=="object"&&t;if(!s){var c=f(this,"date"),p=e.extend({},h,c,o),d=l(p.language),v=e.extend({},h,d,c,o);if(i.is(".ai1ec-input-daterange")||v.inputs){var m={inputs:v.inputs||i.find("input").toArray()};i.data("datepicker",s=new a(this,e.extend(v,m)))}else i.data("datepicker",s=new u(this,v))}if(typeof t=="string"&&typeof s[t]=="function"){r=s[t].apply(s,n);if(r!==undefined)return!1}}),r!==undefined?r:this};var h=e.fn.datepicker.defaults={autoclose:!1,beforeShowDay:e.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:Infinity,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-Infinity,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},p=e.fn.datepicker.locale_opts=["format","rtl","weekStart"];e.fn.datepicker.Constructor=u;var d=e.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},v={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(e){return e%4===0&&e%100!==0||e%400===0},getDaysInMonth:function(e,t){return[31,v.isLeapYear(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(e){var t=e.replace(this.validParts,"\0").split("\0"),n=e.match(this.validParts);if(!t||!t.length||!n||n.length===0)throw new Error("Invalid date format.");return{separators:t,parts:n}},parseDate:function(t,n,i){if(!t)return undefined;if(t instanceof Date)return t;typeof n=="string"&&(n=v.parseFormat(n));if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(t)){var s=/([\-+]\d+)([dmwy])/,o=t.match(/([\-+]\d+)([dmwy])/g),a,f;t=new Date;for(var l=0;l<o.length;l++){a=s.exec(o[l]),f=parseInt(a[1]);switch(a[2]){case"d":t.setUTCDate(t.getUTCDate()+f);break;case"m":t=u.prototype.moveMonth.call(u.prototype,t,f);break;case"w":t.setUTCDate(t.getUTCDate()+f*7);break;case"y":t=u.prototype.moveYear.call(u.prototype,t,f)}}return r(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),0,0,0)}var o=t&&t.match(this.nonpunctuation)||[],t=new Date,c={},h=["yyyy","yy","M","MM","m","mm","d","dd"],p={yyyy:function(e,t){return e.setUTCFullYear(t)},yy:function(e,t){return e.setUTCFullYear(2e3+t)},m:function(e,t){if(isNaN(e))return e;t-=1;while(t<0)t+=12;t%=12,e.setUTCMonth(t);while(e.getUTCMonth()!=t)e.setUTCDate(e.getUTCDate()-1);return e},d:function(e,t){return e.setUTCDate(t)}},m,g,a;p.M=p.MM=p.mm=p.m,p.dd=p.d,t=r(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0);var y=n.parts.slice();o.length!=y.length&&(y=e(y).filter(function(t,n){return e.inArray(n,h)!==-1}).toArray());if(o.length==y.length){for(var l=0,b=y.length;l<b;l++){m=parseInt(o[l],10),a=y[l];if(isNaN(m))switch(a){case"MM":g=e(d[i].months).filter(function(){var e=this.slice(0,o[l].length),t=o[l].slice(0,e.length);return e==t}),m=e.inArray(g[0],d[i].months)+1;break;case"M":g=e(d[i].monthsShort).filter(function(){var e=this.slice(0,o[l].length),t=o[l].slice(0,e.length);return e==t}),m=e.inArray(g[0],d[i].monthsShort)+1}c[a]=m}for(var l=0,w,E;l<h.length;l++)E=h[l],E in c&&!isNaN(c[E])&&(w=new Date(t),p[E](w,c[E]),isNaN(w)||(t=w))}return t},formatDate:function(t,n,r){if(!t)return"";typeof n=="string"&&(n=v.parseFormat(n));var i={d:t.getUTCDate(),D:d[r].daysShort[t.getUTCDay()],DD:d[r].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:d[r].monthsShort[t.getUTCMonth()],MM:d[r].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()};i.dd=(i.d<10?"0":"")+i.d,i.mm=(i.m<10?"0":"")+i.m;var t=[],s=e.extend([],n.separators);for(var o=0,u=n.parts.length;o<=u;o++)s.length&&t.push(s.shift()),t.push(i[n.parts[o]]);return t.join("")},headTemplate:'<thead><tr><th class="ai1ec-prev"><i class="ai1ec-fa ai1ec-fa-arrow-left"></i></th><th colspan="5" class="ai1ec-datepicker-switch"></th><th class="ai1ec-next"><i class="ai1ec-fa ai1ec-fa-arrow-right"></i></th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="ai1ec-today"></th></tr><tr><th colspan="7" class="ai1ec-clear"></th></tr></tfoot>'};v.template='<div class="timely ai1ec-datepicker"><div class="ai1ec-datepicker-days"><table class=" ai1ec-table-condensed">'+v.headTemplate+"<tbody></tbody>"+v.footTemplate+"</table>"+"</div>"+'<div class="ai1ec-datepicker-months">'+'<table class="ai1ec-table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+"</table>"+"</div>"+'<div class="ai1ec-datepicker-years">'+'<table class="ai1ec-table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+"</table>"+"</div>"+"</div>",e.fn.datepicker.DPGlobal=v,e.fn.datepicker.noConflict=function(){return e.fn.datepicker=c,this},e(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var n=e(this);if(n.data("datepicker"))return;t.preventDefault(),n.datepicker("show")}),e(function(){e('[data-provide="datepicker-inline"]').datepicker()});for(var m=2,g=arguments.length;m<g;m++)arguments[m].localize()}),timely.define("external_libs/bootstrap/tooltip",["jquery_timely"],function(e){var t=function(e,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",e,t)};t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="ai1ec-tooltip"><div class="ai1ec-tooltip-arrow"></div><div class="ai1ec-tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},t.prototype.init=function(t,n,r){this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(r);var i=this.options.trigger.split(" ");for(var s=i.length;s--;){var o=i[s];if(o=="click")this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if(o!="manual"){var u=o=="hover"?"mouseenter":"focus",a=o=="hover"?"mouseleave":"blur";this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},t.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,r){n[e]!=r&&(t[e]=r)}),t},t.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(n.timeout),n.hoverState="in";if(!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},t.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(n.timeout),n.hoverState="out";if(!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},t.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.tip();this.setContent(),this.options.animation&&n.addClass("ai1ec-fade");var r=typeof this.options.placement=="function"?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,s=i.test(r);s&&(r=r.replace(i,"")||"top"),n.detach().css({top:0,left:0,display:"block"}).addClass("ai1ec-"+r),this.options.container?n.appendTo(this.options.container):n.insertAfter(this.$element);var o=this.getPosition(),u=n[0].offsetWidth,a=n[0].offsetHeight;if(s){var f=this.$element.parent(),l=r,c=document.documentElement.scrollTop||document.body.scrollTop,h=this.options.container=="body"?window.innerWidth:f.outerWidth(),p=this.options.container=="body"?window.innerHeight:f.outerHeight(),d=this.options.container=="body"?0:f.offset().left;r=r=="bottom"&&o.top+o.height+a-c>p?"top":r=="top"&&o.top-c-a<0?"bottom":r=="right"&&o.right+u>h?"left":r=="left"&&o.left-u<d?"right":r,n.removeClass("ai1ec-"+l).addClass("ai1ec-"+r)}var v=this.getCalculatedOffset(r,o,u,a);this.applyPlacement(v,r),this.$element.trigger("shown.bs."+this.type)}},t.prototype.applyPlacement=function(e,t){var n,r=this.tip(),i=r[0].offsetWidth,s=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),u=parseInt(r.css("margin-left"),10);isNaN(o)&&(o=0),isNaN(u)&&(u=0),e.top=e.top+o,e.left=e.left+u,r.offset(e).addClass("ai1ec-in");var a=r[0].offsetWidth,f=r[0].offsetHeight;t=="top"&&f!=s&&(n=!0,e.top=e.top+s-f);if(/bottom|top/.test(t)){var l=0;e.left<0&&(l=e.left*-2,e.left=0,r.offset(e),a=r[0].offsetWidth,f=r[0].offsetHeight),this.replaceArrow(l-i+a,a,"left")}else this.replaceArrow(f-s,f,"top");n&&r.offset(e)},t.prototype.replaceArrow=function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".ai1ec-tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("ai1ec-fade ai1ec-in ai1ec-top ai1ec-bottom ai1ec-left ai1ec-right")},t.prototype.hide=function(){function i(){t.hoverState!="in"&&n.detach()}var t=this,n=this.tip(),r=e.Event("hide.bs."+this.type);this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("ai1ec-in"),e.support.transition&&this.$tip.hasClass("ai1ec-fade")?n.one(e.support.transition.end,i).emulateTransitionEnd(150):i(),this.$element.trigger("hidden.bs."+this.type),this},t.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},t.prototype.hasContent=function(){return this.getTitle()},t.prototype.getPosition=function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},t.prototype.getCalculatedOffset=function(e,t,n,r){return e=="bottom"?{top:t.top+t.height,left:t.left+t.width/2-n/2}:e=="top"?{top:t.top-r,left:t.left+t.width/2-n/2}:e=="left"?{top:t.top+t.height/2-r/2,left:t.left-n}:{top:t.top+t.height/2-r/2,left:t.left+t.width}},t.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},t.prototype.tip=function(){return this.$tip=this.$tip||e(this.options.template)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".ai1ec-tooltip-arrow")},t.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.toggleEnabled=function(){this.enabled=!this.enabled},t.prototype.toggle=function(t){var n=t?e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;n.tip().hasClass("ai1ec-in")?n.leave(n):n.enter(n)},t.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tooltip"),s=typeof n=="object"&&n;i||r.data("bs.tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}),timely.define("external_libs/jquery_cookie",["jquery_timely"],function(e){function n(e){return u.raw?e:encodeURIComponent(e)}function r(e){return u.raw?e:decodeURIComponent(e)}function i(e){return n(u.json?JSON.stringify(e):String(e))}function s(e){e.indexOf('"')===0&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(t," ")),u.json?JSON.parse(e):e}catch(n){}}function o(t,n){var r=u.raw?t:s(t);return e.isFunction(n)?n(r):r}var t=/\+/g,u=e.cookie=function(t,s,a){if(s!==undefined&&!e.isFunction(s)){a=e.extend({},u.defaults,a);if(typeof a.expires=="number"){var f=a.expires,l=a.expires=new Date;l.setTime(+l+f*864e5)}return document.cookie=[n(t),"=",i(s),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}var c=t?undefined:{},h=document.cookie?document.cookie.split("; "):[];for(var p=0,d=h.length;p<d;p++){var v=h[p].split("="),m=r(v.shift()),g=v.join("=");if(t&&t===m){c=o(g,s);break}!t&&(g=o(g))!==undefined&&(c[m]=g)}return c};u.defaults={},e.removeCookie=function(t,n){return e.cookie(t)===undefined?!1:(e.cookie(t,"",e.extend({},n,{expires:-1})),!e.cookie(t))}}),timely.define("scripts/admin_settings",["jquery_timely","domReady","ai1ec_config","libs/utils","scripts/setting/cache/cache_event_handlers","external_libs/bootstrap/button","libs/collapse_helper","external_libs/bootstrap/tab","external_libs/bootstrap/dropdown","external_libs/bootstrap_datepicker","external_libs/bootstrap/tooltip","external_libs/jquery_cookie"],function(e,t,n,r,i){var s=function(){var t=!0;e("#ai1ec-plugins-settings input:text").each(function(){this.value!==""&&(t=!1)}),t===!0&&e("#ai1ec-plugins-settings").remove()},o=function(t){var n=e(this).attr("href");e.cookie("ai1ec_general_settings_active_tab",n)},u=function(){var t=e("#week_view_starts_at"),r=e("#week_view_ends_at"),i=parseInt(t.val(),10),s=parseInt(r.val(),10);if(s<i)return window.alert(n.end_must_be_after_start),r.focus(),!1;var o=s-i;if(o<6)return window.alert(n.show_at_least_six_hours),r.focus(),!1},a=function(){e(".ai1ec-gzip-causes-js-failure").remove()},f=function(){e("#ai1ec_save_settings").on("click",function(t){var r=e("#require_disclaimer").is(":checked"),i=e("#disclaimer").val();!0===r&&""===i&&(alert(n.require_desclaimer),e('#ai1ec-general-settings ul.ai1ec-nav a[href="#ai1ec-advanced"]').tab("show"),e("#disclaimer").focus(),t.preventDefault())})},l=function(){t(function(){f(),a(),r.activate_saved_tab_on_page_load(e.cookie("ai1ec_general_settings_active_tab")),e(document).on("click",'#ai1ec-general-settings .ai1ec-nav a[data-toggle="ai1ec-tab"]',o),e(document).on("click","#disable_standard_filter_menu_toggler",function(e){e.preventDefault()}),e(document).on("click","#ai1ec-button-refresh",i.perform_rescan);var t=e("#exact_date");t.datepicker({autoclose:!0}),s(),e(document).on("click",".ai1ec-admin-view-settings .ai1ec-toggle-view",function(){var t=e(this),n=t.parent().index()+1;if(0===t.closest("tr").siblings().find("td:nth-child("+n+") .ai1ec-toggle-view:checked").length)return!1;if(t.parent().next("td").find(".ai1ec-toggle-default-view").is(":checked"))return!1}),e(document).on("click",".ai1ec-autoselect",function(t){if(e(this).data("clicked")&&t.originalEvent.detail<2)return;e(this).data("clicked",!0);var n;document.body.createTextRange?(n=document.body.createTextRange(),n.moveToElementText(this),n.select()):window.getSelection&&(selection=window.getSelection(),n=document.createRange(),n.selectNodeContents(this),selection.removeAllRanges(),selection.addRange(n))});var n=function(){var t=e(this).closest(".ai1ec-form-group").nextAll(".ai1ec-form-group").slice(0,4);e(this).prop("checked")?t.show():t.hide()};n.apply(e("#affix_filter_menu").on("click",n)[0]),e(document).on("click",".ai1ec-admin-view-settings .ai1ec-toggle-default-view",function(){e(this).parent().prev("td").children(".ai1ec-toggle-view").prop("checked",!0)}),e("#ai1ec_save_settings").on("click",u),e("#show_create_event_button").trigger("ready")})};return{start:l}}),timely.require(["scripts/admin_settings"],function(e){e.start()}),timely.define("pages/admin_settings",function(){});
|
141 |
* limitations under the License.
|
142 |
* ======================================================================== */
|
143 |
|
144 |
+
timely.define("domReady",[],function(){function u(e){var t;for(t=0;t<e.length;t++)e[t](n)}function a(){var e=r;t&&e.length&&(r=[],u(e))}function f(){t||(t=!0,o&&clearInterval(o),a())}function c(e){return t?e(n):r.push(e),c}var e=typeof window!="undefined"&&window.document,t=!e,n=e?document:null,r=[],i,s,o;if(e){if(document.addEventListener)document.addEventListener("DOMContentLoaded",f,!1),window.addEventListener("load",f,!1);else if(window.attachEvent){window.attachEvent("onload",f),s=document.createElement("div");try{i=window.frameElement===null}catch(l){}s.doScroll&&i&&window.external&&(o=setInterval(function(){try{s.doScroll(),f()}catch(e){}},30))}(document.readyState==="complete"||document.readyState==="interactive")&&f()}return c.version="2.0.0",c.load=function(e,t,n,r){r.isBuild?n(null):c(n)},c}),timely.define("external_libs/bootstrap/tab",["jquery_timely"],function(e){var t=function(t){this.element=e(t)};t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.ai1ec-dropdown-menu)"),r=t.data("target");r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("ai1ec-active"))return;var i=n.find(".ai1ec-active:last a")[0],s=e.Event("show.bs.tab",{relatedTarget:i});t.trigger(s);if(s.isDefaultPrevented())return;var o=e(r);this.activate(t.parent("li"),n),this.activate(o,o.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:i})})},t.prototype.activate=function(t,n,r){function o(){i.removeClass("ai1ec-active").find("> .ai1ec-dropdown-menu > .ai1ec-active").removeClass("ai1ec-active"),t.addClass("ai1ec-active"),s?(t[0].offsetWidth,t.addClass("ai1ec-in")):t.removeClass("ai1ec-fade"),t.parent(".ai1ec-dropdown-menu")&&t.closest("li.ai1ec-dropdown").addClass("ai1ec-active"),r&&r()}var i=n.find("> .ai1ec-active"),s=r&&e.support.transition&&i.hasClass("ai1ec-fade");s?i.one(e.support.transition.end,o).emulateTransitionEnd(150):o(),i.removeClass("ai1ec-in")};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tab");i||r.data("bs.tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.bs.tab.data-api",'[data-toggle="ai1ec-tab"], [data-toggle="ai1ec-pill"]',function(t){t.preventDefault(),e(this).tab("show")})}),timely.define("libs/utils",["jquery_timely","external_libs/bootstrap/tab"],function(e){var t=function(){return{is_float:function(e){return!isNaN(parseFloat(e))},is_valid_coordinate:function(e,t){var n=t?90:180;return this.is_float(e)&&Math.abs(e)<n},convert_comma_to_dot:function(e){return e.replace(",",".")},field_has_value:function(t){var n="#"+t,r=e(n),i=!1;return r.length===1&&(i=e.trim(r.val())!==""),i},make_alert:function(t,n,r){var i="";switch(n){case"error":i="ai1ec-alert ai1ec-alert-danger";break;case"success":i="ai1ec-alert ai1ec-alert-success";break;default:i="ai1ec-alert"}var s=e("<div />",{"class":i,html:t});if(!r){var o=e("<button>",{type:"button","class":"ai1ec-close","data-dismiss":"ai1ec-alert",text:"×"});s.prepend(o)}return s},get_ajax_url:function(){return typeof window.ajaxurl=="undefined"?"http://localhost/wordpress/wp-admin/admin-ajax.php":window.ajaxurl},isUrl:function(e){var t=/(http|https|webcal):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)},isValidEmail:function(e){var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)},activate_saved_tab_on_page_load:function(t){null===t||undefined===t?e("ul.ai1ec-nav a:first").tab("show"):e("ul.ai1ec-nav a[href="+t+"]").tab("show")},add_query_arg:function(e,t){var n=e.indexOf("?")===-1?"?":"&";return-1!==e.indexOf(n+t[0]+"=")?e:e+n+t[0]+"="+t[1]},init_autoselect:function(){e(document).one("click",".ai1ec-autoselect",function(t){if(e(this).data("clicked")&&t.originalEvent.detail<2)return;e(this).data("clicked",!0);var n;document.body.createTextRange?(n=document.body.createTextRange(),n.moveToElementText(this),n.select()):window.getSelection&&(selection=window.getSelection(),n=document.createRange(),n.selectNodeContents(this),selection.removeAllRanges(),selection.addRange(n))})}}}();return t}),timely.define("scripts/setting/cache/cache_ajax_handlers",["jquery_timely","libs/utils"],function(e,t){var n=function(n){var r=e("#ai1ec-button-refresh"),i=e("#ai1ec-cache-scan-success"),s=e("#ai1ec-cache-scan-danger"),o;r.button("reset"),n.error?o=t.make_alert(n.message,"error"):"0"===n.state?(i.toggleClass("ai1ec-hide",!0),s.toggleClass("ai1ec-hide",!1)):(i.toggleClass("ai1ec-hide",!1),s.toggleClass("ai1ec-hide",!0))};return{handle_rescan_cache:n}}),timely.define("scripts/setting/cache/cache_event_handlers",["jquery_timely","scripts/setting/cache/cache_ajax_handlers","libs/utils"],function(e,t,n){var r=n.get_ajax_url(),i=function(){var n=e(this);n.button("loading");var i={action:"ai1ec_rescan_cache"};return e.post(r,i,t.handle_rescan_cache,"json"),!1};return{perform_rescan:i}}),timely.define("external_libs/bootstrap/button",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r)};t.DEFAULTS={loadingText:"loading..."},t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.is("input")?"val":"html",i=n.data();e+="Text",i.resetText||n.data("resetText",n[r]()),n[r](i[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass("ai1ec-"+t).attr(t,t):n.removeClass("ai1ec-"+t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="ai1ec-buttons"]'),t=!0;if(e.length){var n=this.$element.find("input");n.prop("type")==="radio"&&(n.prop("checked")&&this.$element.hasClass("ai1ec-active")?t=!1:e.find(".ai1ec-active").removeClass("ai1ec-active")),t&&n.prop("checked",!this.$element.hasClass("ai1ec-active")).trigger("change")}t&&this.$element.toggleClass("ai1ec-active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("bs.button"),s=typeof n=="object"&&n;i||r.data("bs.button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.bs.button.data-api","[data-toggle^=ai1ec-button]",function(t){var n=e(t.target);n.hasClass("ai1ec-btn")||(n=n.closest(".ai1ec-btn")),n.button("toggle"),t.preventDefault()})}),timely.define("external_libs/bootstrap/transition",["jquery_timely"],function(e){function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(e.style[n]!==undefined)return{end:t[n]}}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this;e(this).one(e.support.transition.end,function(){n=!0});var i=function(){n||e(r).trigger(e.support.transition.end)};return setTimeout(i,t),this},e(function(){e.support.transition=t()})}),timely.define("external_libs/bootstrap/collapse",["jquery_timely"],function(e){var t=function(n,r){this.$element=e(n),this.options=e.extend({},t.DEFAULTS,r),this.transitioning=null,this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.DEFAULTS={toggle:!0},t.prototype.dimension=function(){var e=this.$element.hasClass("ai1ec-width");return e?"width":"height"},t.prototype.show=function(){if(this.transitioning||this.$element.hasClass("ai1ec-in"))return;var t=e.Event("show.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.$parent&&this.$parent.find("> .ai1ec-panel > .ai1ec-in");if(n&&n.length){var r=n.data("bs.collapse");if(r&&r.transitioning)return;n.collapse("hide"),r||n.data("bs.collapse",null)}var i=this.dimension();this.$element.removeClass("ai1ec-collapse").addClass("ai1ec-collapsing")[i](0),this.transitioning=1;var s=function(){this.$element.removeClass("ai1ec-collapsing").addClass("ai1ec-in")[i]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!e.support.transition)return s.call(this);var o=e.camelCase(["scroll",i].join("-"));this.$element.one(e.support.transition.end,e.proxy(s,this)).emulateTransitionEnd(350)[i](this.$element[0][o])},t.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("ai1ec-in"))return;var t=e.Event("hide.bs.collapse");this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("ai1ec-collapsing").removeClass("ai1ec-collapse").removeClass("ai1ec-in"),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("ai1ec-collapsing").addClass("ai1ec-collapse")};if(!e.support.transition)return r.call(this);this.$element[n](0).one(e.support.transition.end,e.proxy(r,this)).emulateTransitionEnd(350)},t.prototype.toggle=function(){this[this.$element.hasClass("ai1ec-in")?"hide":"show"]()};var n=e.fn.collapse;e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("bs.collapse"),s=e.extend({},t.DEFAULTS,r.data(),typeof n=="object"&&n);i||r.data("bs.collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.Constructor=t,e.fn.collapse.noConflict=function(){return e.fn.collapse=n,this},e(document).on("click.bs.collapse.data-api","[data-toggle=ai1ec-collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i),o=s.data("bs.collapse"),u=o?"toggle":n.data(),a=n.attr("data-parent"),f=a&&e(a);if(!o||!o.transitioning)f&&f.find('[data-toggle=ai1ec-collapse][data-parent="'+a+'"]').not(n).addClass("ai1ec-collapsed"),n[s.hasClass("ai1ec-in")?"addClass":"removeClass"]("ai1ec-collapsed");s.collapse(u)})}),timely.define("libs/collapse_helper",["jquery_timely","domReady","external_libs/bootstrap/transition","external_libs/bootstrap/collapse"],function(e,t){t(function(){e(document).on("click",'[data-toggle="ai1ec-collapse"]',function(){e(this).toggleClass("ai1ec-active"),e(".ai1ec-fa-caret-down, .ai1ec-fa-caret-up, .ai1ec-fa-chevron-down, .ai1ec-fa-chevron-up, .ai1ec-fa-arrow-down, .ai1ec-fa-arrow-up",this).toggleClass("ai1ec-hide")})})}),timely.define("external_libs/bootstrap/dropdown",["jquery_timely"],function(e){function i(){e(t).remove(),e(n).each(function(t){var n=s(e(this));if(!n.hasClass("ai1ec-open"))return;n.trigger(t=e.Event("hide.bs.dropdown"));if(t.isDefaultPrevented())return;n.removeClass("ai1ec-open").trigger("hidden.bs.dropdown")})}function s(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r=n&&e(n);return r&&r.length?r:t.parent()}var t=".ai1ec-dropdown-backdrop",n="[data-toggle=ai1ec-dropdown]",r=function(t){e(t).on("click.bs.dropdown",this.toggle)};r.prototype.toggle=function(t){var n=e(this);if(n.is(".ai1ec-disabled, :disabled"))return;var r=s(n),o=r.hasClass("ai1ec-open");i();if(!o){"ontouchstart"in document.documentElement&&!r.closest(".ai1ec-navbar-nav").length&&e('<div class="ai1ec-dropdown-backdrop"/>').insertAfter(e(this)).on("click",i),r.trigger(t=e.Event("show.bs.dropdown"));if(t.isDefaultPrevented())return;r.toggleClass("ai1ec-open").trigger("shown.bs.dropdown"),n.focus()}return!1},r.prototype.keydown=function(t){if(!/(38|40|27)/.test(t.keyCode))return;var r=e(this);t.preventDefault(),t.stopPropagation();if(r.is(".ai1ec-disabled, :disabled"))return;var i=s(r),o=i.hasClass("ai1ec-open");if(!o||o&&t.keyCode==27)return t.which==27&&i.find(n).focus(),r.click();var u=e("[role=menu] li:not(.ai1ec-divider):visible a",i);if(!u.length)return;var a=u.index(u.filter(":focus"));t.keyCode==38&&a>0&&a--,t.keyCode==40&&a<u.length-1&&a++,~a||(a=0),u.eq(a).focus()};var o=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new r(this)),typeof t=="string"&&i[t].call(n)})},e.fn.dropdown.Constructor=r,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=o,this},e(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".ai1ec-dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",n,r.prototype.toggle).on("keydown.bs.dropdown.data-api",n+", [role=menu]",r.prototype.keydown)}),timely.define("external_libs/locales/bootstrap-datepicker.bg",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.bg={days:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота","Неделя"],daysShort:["Нед","Пон","Вто","Сря","Чет","Пет","Съб","Нед"],daysMin:["Н","П","В","С","Ч","П","С","Н"],months:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],monthsShort:["Ян","Фев","Мар","Апр","Май","Юни","Юли","Авг","Сеп","Окт","Ное","Дек"],today:"днес"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.br",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.br={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"]}}}}),timely.define("external_libs/locales/bootstrap-datepicker.cs",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.cs={days:["Neděle","Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota","Neděle"],daysShort:["Ned","Pon","Úte","Stř","Čtv","Pát","Sob","Ned"],daysMin:["Ne","Po","Út","St","Čt","Pá","So","Ne"],months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"],monthsShort:["Led","Úno","Bře","Dub","Kvě","Čer","Čnc","Srp","Zář","Říj","Lis","Pro"],today:"Dnes"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.da",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.da={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],months:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"I Dag",clear:"Nulstil"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.de",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.de={days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"],daysShort:["Son","Mon","Die","Mit","Don","Fre","Sam","Son"],daysMin:["So","Mo","Di","Mi","Do","Fr","Sa","So"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",clear:"Löschen",weekStart:1,format:"dd.mm.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.es",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.es={days:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"],daysShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb","Dom"],daysMin:["Do","Lu","Ma","Mi","Ju","Vi","Sa","Do"],months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthsShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],today:"Hoy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.fi",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.fi={days:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai","sunnuntai"],daysShort:["sun","maa","tii","kes","tor","per","lau","sun"],daysMin:["su","ma","ti","ke","to","pe","la","su"],months:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"],monthsShort:["tam","hel","maa","huh","tou","kes","hei","elo","syy","lok","mar","jou"],today:"tänään",weekStart:1,format:"d.m.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.fr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.fr={days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Dimanche"],daysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam","Dim"],daysMin:["D","L","Ma","Me","J","V","S","D"],months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],monthsShort:["Jan","Fév","Mar","Avr","Mai","Jui","Jul","Aou","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",clear:"Effacer",weekStart:1,format:"dd/mm/yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.id",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.id={days:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu","Minggu"],daysShort:["Mgu","Sen","Sel","Rab","Kam","Jum","Sab","Mgu"],daysMin:["Mg","Sn","Sl","Ra","Ka","Ju","Sa","Mg"],months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ags","Sep","Okt","Nov","Des"],today:"Hari Ini",clear:"Kosongkan"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.is",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.is={days:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur","Sunnudagur"],daysShort:["Sun","Mán","Þri","Mið","Fim","Fös","Lau","Sun"],daysMin:["Su","Má","Þr","Mi","Fi","Fö","La","Su"],months:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Maí","Jún","Júl","Ágú","Sep","Okt","Nóv","Des"],today:"Í Dag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.it",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.it={days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato","Domenica"],daysShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab","Dom"],daysMin:["Do","Lu","Ma","Me","Gi","Ve","Sa","Do"],months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],monthsShort:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],today:"Oggi",clear:"Cancella",weekStart:1,format:"dd/mm/yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ja",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ja={days:["日曜","月曜","火曜","水曜","木曜","金曜","土曜","日曜"],daysShort:["日","月","火","水","木","金","土","日"],daysMin:["日","月","火","水","木","金","土","日"],months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],today:"今日",format:"yyyy/mm/dd"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.kr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.kr={days:["일요일","월요일","화요일","수요일","목요일","금요일","토요일","일요일"],daysShort:["일","월","화","수","목","금","토","일"],daysMin:["일","월","화","수","목","금","토","일"],months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],monthsShort:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]}}}}),timely.define("external_libs/locales/bootstrap-datepicker.lt",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.lt={days:["Sekmadienis","Pirmadienis","Antradienis","Trečiadienis","Ketvirtadienis","Penktadienis","Šeštadienis","Sekmadienis"],daysShort:["S","Pr","A","T","K","Pn","Š","S"],daysMin:["Sk","Pr","An","Tr","Ke","Pn","Št","Sk"],months:["Sausis","Vasaris","Kovas","Balandis","Gegužė","Birželis","Liepa","Rugpjūtis","Rugsėjis","Spalis","Lapkritis","Gruodis"],monthsShort:["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rugp","Rugs","Spa","Lap","Gru"],today:"Šiandien",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.lv",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.lv={days:["Svētdiena","Pirmdiena","Otrdiena","Trešdiena","Ceturtdiena","Piektdiena","Sestdiena","Svētdiena"],daysShort:["Sv","P","O","T","C","Pk","S","Sv"],daysMin:["Sv","Pr","Ot","Tr","Ce","Pk","Se","Sv"],months:["Janvāris","Februāris","Marts","Aprīlis","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jūn","Jūl","Aug","Sep","Okt","Nov","Dec"],today:"Šodien",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ms",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ms={days:["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu","Ahad"],daysShort:["Aha","Isn","Sel","Rab","Kha","Jum","Sab","Aha"],daysMin:["Ah","Is","Se","Ra","Kh","Ju","Sa","Ah"],months:["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ogo","Sep","Okt","Nov","Dis"],today:"Hari Ini"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.nb",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.nb={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],today:"I Dag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.nl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.nl={days:["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag","Zondag"],daysShort:["Zo","Ma","Di","Wo","Do","Vr","Za","Zo"],daysMin:["Zo","Ma","Di","Wo","Do","Vr","Za","Zo"],months:["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mrt","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"Vandaag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.pl={days:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota","Niedziela"],daysShort:["Nie","Pn","Wt","Śr","Czw","Pt","So","Nie"],daysMin:["N","Pn","Wt","Śr","Cz","Pt","So","N"],months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],monthsShort:["Sty","Lu","Mar","Kw","Maj","Cze","Lip","Sie","Wrz","Pa","Lis","Gru"],today:"Dzisiaj",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pt-BR",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["pt-BR"]={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",clear:"Limpar"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pt",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.pt={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",clear:"Limpar"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ru",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ru={days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота","Воскресенье"],daysShort:["Вск","Пнд","Втр","Срд","Чтв","Птн","Суб","Вск"],daysMin:["Вс","Пн","Вт","Ср","Чт","Пт","Сб","Вс"],months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthsShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],today:"Сегодня",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.sl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.sl={days:["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota","Nedelja"],daysShort:["Ned","Pon","Tor","Sre","Čet","Pet","Sob","Ned"],daysMin:["Ne","Po","To","Sr","Če","Pe","So","Ne"],months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],today:"Danes"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.sv",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.sv={days:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag","Söndag"],daysShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör","Sön"],daysMin:["Sö","Må","Ti","On","To","Fr","Lö","Sö"],months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"I Dag",format:"yyyy-mm-dd",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.th",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.th={days:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัส","ศุกร์","เสาร์","อาทิตย์"],daysShort:["อา","จ","อ","พ","พฤ","ศ","ส","อา"],daysMin:["อา","จ","อ","พ","พฤ","ศ","ส","อา"],months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],monthsShort:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],today:"วันนี้"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.tr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.tr={days:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi","Pazar"],daysShort:["Pz","Pzt","Sal","Çrş","Prş","Cu","Cts","Pz"],daysMin:["Pz","Pzt","Sa","Çr","Pr","Cu","Ct","Pz"],months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],monthsShort:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],today:"Bugün",format:"dd.mm.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.zh-CN",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["zh-CN"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["周日","周一","周二","周三","周四","周五","周六","周日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今日",format:"yyyy年mm月dd日",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.zh-TW",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["zh-TW"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["週日","週一","週二","週三","週四","週五","週六","週日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今天",format:"yyyy年mm月dd日",weekStart:1}}}}),timely.define("external_libs/bootstrap_datepicker",["jquery_timely","ai1ec_config","external_libs/locales/bootstrap-datepicker.bg","external_libs/locales/bootstrap-datepicker.br","external_libs/locales/bootstrap-datepicker.cs","external_libs/locales/bootstrap-datepicker.da","external_libs/locales/bootstrap-datepicker.de","external_libs/locales/bootstrap-datepicker.es","external_libs/locales/bootstrap-datepicker.fi","external_libs/locales/bootstrap-datepicker.fr","external_libs/locales/bootstrap-datepicker.id","external_libs/locales/bootstrap-datepicker.is","external_libs/locales/bootstrap-datepicker.it","external_libs/locales/bootstrap-datepicker.ja","external_libs/locales/bootstrap-datepicker.kr","external_libs/locales/bootstrap-datepicker.lt","external_libs/locales/bootstrap-datepicker.lv","external_libs/locales/bootstrap-datepicker.ms","external_libs/locales/bootstrap-datepicker.nb","external_libs/locales/bootstrap-datepicker.nl","external_libs/locales/bootstrap-datepicker.pl","external_libs/locales/bootstrap-datepicker.pt-BR","external_libs/locales/bootstrap-datepicker.pt","external_libs/locales/bootstrap-datepicker.ru","external_libs/locales/bootstrap-datepicker.sl","external_libs/locales/bootstrap-datepicker.sv","external_libs/locales/bootstrap-datepicker.th","external_libs/locales/bootstrap-datepicker.tr","external_libs/locales/bootstrap-datepicker.zh-CN","external_libs/locales/bootstrap-datepicker.zh-TW"],function(e,t){function r(){return new Date(Date.UTC.apply(Date,arguments))}function i(){var e=new Date;return r(e.getFullYear(),e.getMonth(),e.getDate())}function s(e){return function(){return this[e].apply(this,arguments)}}function f(t,n){var r=e(t).data(),i={},s,o=new RegExp("^"+n.toLowerCase()+"([A-Z])"),n=new RegExp("^"+n.toLowerCase());for(var u in r)n.test(u)&&(s=u.replace(o,function(e,t){return t.toLowerCase()}),i[s]=r[u]);return i}function l(t){var n={};if(!d[t]){t=t.split("-")[0];if(!d[t])return}var r=d[t];return e.each(p,function(e,t){t in r&&(n[t]=r[t])}),n}var n=e(window),o=function(){var t={get:function(e){return this.slice(e)[0]},contains:function(e){var t=e&&e.valueOf();for(var n=0,r=this.length;n<r;n++)if(this[n].valueOf()===t)return n;return-1},remove:function(e){this.splice(e,1)},replace:function(t){if(!t)return;e.isArray(t)||(t=[t]),this.clear(),this.push.apply(this,t)},clear:function(){this.splice(0)},copy:function(){var e=new o;return e.replace(this),e}};return function(){var n=[];return n.push.apply(n,arguments),e.extend(n,t),n}}(),u=function(t,n){this.dates=new o,this.viewDate=i(),this.focusDate=null,this._process_options(n),this.element=e(t),this.isInline=!1,this.isInput=this.element.is("input"),this.component=this.element.is(".ai1ec-date")?this.element.find(".ai1ec-input-group, .ai1ec-input-group-addon, .ai1ec-btn"):!1,this.hasInput=this.component&&this.element.find("input").length,this.component&&this.component.length===0&&(this.component=!1),this.picker=e(v.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("ai1ec-datepicker-inline").appendTo(this.element):this.picker.addClass("ai1ec-datepicker-dropdown ai1ec-dropdown-menu"),this.o.rtl&&this.picker.addClass("ai1ec-datepicker-rtl"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.ai1ec-today").attr("colspan",function(e,t){return parseInt(t)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};u.prototype={constructor:u,_process_options:function(n){this._o=e.extend({},this._o,n);var r=this.o=e.extend({},this._o),i=r.language;d[i]||(i=i.split("-")[0],d[i]||(i=t.language,d[i]||(i=h.language))),r.language=i;switch(r.startView){case 2:case"decade":r.startView=2;break;case 1:case"year":r.startView=1;break;default:r.startView=0}switch(r.minViewMode){case 1:case"months":r.minViewMode=1;break;case 2:case"years":r.minViewMode=2;break;default:r.minViewMode=0}r.startView=Math.max(r.startView,r.minViewMode),r.multidate!==!0&&(r.multidate=Number(r.multidate)||!1,r.multidate!==!1?r.multidate=Math.max(0,r.multidate):r.multidate=1),r.multidateSeparator=String(r.multidateSeparator),r.weekStart%=7,r.weekEnd=(r.weekStart+6)%7;var s=v.parseFormat(r.format);r.startDate!==-Infinity&&(r.startDate?r.startDate instanceof Date?r.startDate=this._local_to_utc(this._zero_time(r.startDate)):r.startDate=v.parseDate(r.startDate,s,r.language):r.startDate=-Infinity),r.endDate!==Infinity&&(r.endDate?r.endDate instanceof Date?r.endDate=this._local_to_utc(this._zero_time(r.endDate)):r.endDate=v.parseDate(r.endDate,s,r.language):r.endDate=Infinity),r.daysOfWeekDisabled=r.daysOfWeekDisabled||[],e.isArray(r.daysOfWeekDisabled)||(r.daysOfWeekDisabled=r.daysOfWeekDisabled.split(/[,\s]*/)),r.daysOfWeekDisabled=e.map(r.daysOfWeekDisabled,function(e){return parseInt(e,10)});var o=String(r.orientation).toLowerCase().split(/\s+/g),u=r.orientation.toLowerCase();o=e.grep(o,function(e){return/^auto|left|right|top|bottom$/.test(e)}),r.orientation={x:"auto",y:"auto"};if(!!u&&u!=="auto")if(o.length===1)switch(o[0]){case"top":case"bottom":r.orientation.y=o[0];break;case"left":case"right":r.orientation.x=o[0]}else u=e.grep(o,function(e){return/^left|right$/.test(e)}),r.orientation.x=u[0]||"auto",u=e.grep(o,function(e){return/^top|bottom$/.test(e)}),r.orientation.y=u[0]||"auto"},_events:[],_secondaryEvents:[],_applyEvents:function(e){for(var t=0,n,r,i;t<e.length;t++)n=e[t][0],e[t].length==2?(r=undefined,i=e[t][1]):e[t].length==3&&(r=e[t][1],i=e[t][2]),n.on(i,r)},_unapplyEvents:function(e){for(var t=0,n,r,i;t<e.length;t++)n=e[t][0],e[t].length==2?(i=undefined,r=e[t][1]):e[t].length==3&&(i=e[t][1],r=e[t][2]),n.off(r,i)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:e.proxy(this.show,this),keyup:e.proxy(function(t){e.inArray(t.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:e.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:e.proxy(this.show,this),keyup:e.proxy(function(t){e.inArray(t.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:e.proxy(this.keydown,this)}],[this.component,{click:e.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:e.proxy(this.show,this)}]],this._events.push([this.element,"*",{blur:e.proxy(function(e){this._focused_from=e.target},this)}],[this.element,{blur:e.proxy(function(e){this._focused_from=e.target},this)}]),this._secondaryEvents=[[this.picker,{click:e.proxy(this.click,this)}],[e(window),{resize:e.proxy(this.place,this)}],[e(document),{"mousedown touchstart":e.proxy(function(e){this.element.is(e.target)||this.element.find(e.target).length||this.picker.is(e.target)||this.picker.find(e.target).length||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,n){var r=n||this.dates.get(-1),i=this._utc_to_local(r);this.element.trigger({type:t,date:i,dates:e.map(this.dates,this._utc_to_local),format:e.proxy(function(e,t){arguments.length===0?(e=this.dates.length-1,t=this.o.format):typeof e=="string"&&(t=e,e=this.dates.length-1),t=t||this.o.format;var n=this.dates.get(e);return v.formatDate(n,t,this.o.language)},this)})},show:function(e){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.height=this.component?this.component.outerHeight():this.element.outerHeight(),this.place(),this._attachSecondaryEvents(),this._trigger("show")},hide:function(){if(this.isInline)return;if(!this.picker.is(":visible"))return;this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide")},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date},_utc_to_local:function(e){return e&&new Date(e.getTime()+e.getTimezoneOffset()*6e4)},_local_to_utc:function(e){return e&&new Date(e.getTime()-e.getTimezoneOffset()*6e4)},_zero_time:function(e){return e&&new Date(e.getFullYear(),e.getMonth(),e.getDate())},_zero_utc_time:function(e){return e&&new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},getDates:function(){return e.map(this.dates,this._utc_to_local)},getUTCDates:function(){return e.map(this.dates,function(e){return new Date(e)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){return new Date(this.dates.get(-1))},setDates:function(){this.update.apply(this,arguments),this._trigger("changeDate"),this.setValue()},setUTCDates:function(){this.update.apply(this,e.map(arguments,this._utc_to_local)),this._trigger("changeDate"),this.setValue()},setDate:s("setDates"),setUTCDate:s("setUTCDates"),setValue:function(){var e=this.getFormattedDate();this.isInput?this.element.val(e).change():this.component&&this.element.find("input").val(e).change()},getFormattedDate:function(t){t===undefined&&(t=this.o.format);var n=this.o.language;return e.map(this.dates,function(e){return v.formatDate(e,t,n)}).join(this.o.multidateSeparator)},setStartDate:function(e){this._process_options({startDate:e}),this.update(),this.updateNavArrows()},setEndDate:function(e){this._process_options({endDate:e}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(e){this._process_options({daysOfWeekDisabled:e}),this.update(),this.updateNavArrows()},place:function(){if(this.isInline)return;var t=this.picker.outerWidth(),r=this.picker.outerHeight(),i=10,s=n.width(),o=n.height(),u=n.scrollTop(),a=parseInt(this.element.parents().filter(function(){return e(this).css("z-index")!="auto"}).first().css("z-index"))+10,f=this.component?this.component.parent().offset():this.element.offset(),l=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),c=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),h=f.left,p=f.top;this.picker.removeClass("ai1ec-datepicker-orient-top ai1ec-datepicker-orient-bottom ai1ec-datepicker-orient-right ai1ec-datepicker-orient-left"),this.o.orientation.x!=="auto"?(this.picker.addClass("ai1ec-datepicker-orient-"+this.o.orientation.x),this.o.orientation.x==="right"&&(h-=t-c)):(this.picker.addClass("ai1ec-datepicker-orient-left"),f.left<0?h-=f.left-i:f.left+t>s&&(h=s-t-i));var d=this.o.orientation.y,v,m;d==="auto"&&(v=-u+f.top-r,m=u+o-(f.top+l+r),Math.max(v,m)===m?d="top":d="bottom"),this.picker.addClass("ai1ec-datepicker-orient-"+d),d==="top"?p+=l:p-=r+parseInt(this.picker.css("padding-top")),this.picker.css({top:p,left:h,zIndex:a})},_allow_update:!0,update:function(){if(!this._allow_update)return;var t=this.dates.copy(),n=[],r=!1;arguments.length?(e.each(arguments,e.proxy(function(e,t){t instanceof Date&&(t=this._local_to_utc(t)),n.push(t)},this)),r=!0):(n=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),n&&this.o.multidate?n=n.split(this.o.multidateSeparator):n=[n],delete this.element.data().date),n=e.map(n,e.proxy(function(e){return v.parseDate(e,this.o.format,this.o.language)},this)),n=e.grep(n,e.proxy(function(e){return e<this.o.startDate||e>this.o.endDate||!e},this),!0),this.dates.replace(n),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate&&(this.viewDate=new Date(this.o.endDate)),r?this.setValue():n.length&&String(t)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&t.length&&this._trigger("clearDate"),this.fill()},fillDow:function(){var e=this.o.weekStart,t="<tr>";if(this.o.calendarWeeks){var n='<th class="ai1ec-cw"> </th>';t+=n,this.picker.find(".ai1ec-datepicker-days thead tr:first-child").prepend(n)}while(e<this.o.weekStart+7)t+='<th class="ai1ec-dow">'+d[this.o.language].daysMin[e++%7]+"</th>";t+="</tr>",this.picker.find(".ai1ec-datepicker-days thead").append(t)},fillMonths:function(){var e="",t=0;while(t<12)e+='<span class="ai1ec-month">'+d[this.o.language].monthsShort[t++]+"</span>";this.picker.find(".ai1ec-datepicker-months td").html(e)},setRange:function(t){!t||!t.length?delete this.range:this.range=e.map(t,function(e){return e.valueOf()}),this.fill()},getClassNames:function(t){var n=[],r=this.viewDate.getUTCFullYear(),i=this.viewDate.getUTCMonth(),s=new Date;return t.getUTCFullYear()<r||t.getUTCFullYear()==r&&t.getUTCMonth()<i?n.push("ai1ec-old"):(t.getUTCFullYear()>r||t.getUTCFullYear()==r&&t.getUTCMonth()>i)&&n.push("ai1ec-new"),this.focusDate&&t.valueOf()===this.focusDate.valueOf()&&n.push("ai1ec-focused"),this.o.todayHighlight&&t.getUTCFullYear()==s.getFullYear()&&t.getUTCMonth()==s.getMonth()&&t.getUTCDate()==s.getDate()&&n.push("ai1ec-today"),this.dates.contains(t)!==-1&&n.push("ai1ec-active"),(t.valueOf()<this.o.startDate||t.valueOf()>this.o.endDate||e.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled)!==-1)&&n.push("ai1ec-disabled"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&n.push("ai1ec-range"),e.inArray(t.valueOf(),this.range)!=-1&&n.push("ai1ec-selected")),n},fill:function(){var t=new Date(this.viewDate),n=t.getUTCFullYear(),i=t.getUTCMonth(),s=this.o.startDate!==-Infinity?this.o.startDate.getUTCFullYear():-Infinity,o=this.o.startDate!==-Infinity?this.o.startDate.getUTCMonth():-Infinity,u=this.o.endDate!==Infinity?this.o.endDate.getUTCFullYear():Infinity,a=this.o.endDate!==Infinity?this.o.endDate.getUTCMonth():Infinity,f,l;this.picker.find(".ai1ec-datepicker-days thead th.ai1ec-datepicker-switch").text(d[this.o.language].months[i]+" "+n),this.picker.find("tfoot th.ai1ec-today").text(d[this.o.language].today).toggle(this.o.todayBtn!==!1),this.picker.find("tfoot th.ai1ec-clear").text(d[this.o.language].clear).toggle(this.o.clearBtn!==!1),this.updateNavArrows(),this.fillMonths();var c=r(n,i-1,28),h=v.getDaysInMonth(c.getUTCFullYear(),c.getUTCMonth());c.setUTCDate(h),c.setUTCDate(h-(c.getUTCDay()-this.o.weekStart+7)%7);var p=new Date(c);p.setUTCDate(p.getUTCDate()+42),p=p.valueOf();var m=[],g;while(c.valueOf()<p){if(c.getUTCDay()==this.o.weekStart){m.push("<tr>");if(this.o.calendarWeeks){var y=new Date(+c+(this.o.weekStart-c.getUTCDay()-7)%7*864e5),b=new Date(+y+(11-y.getUTCDay())%7*864e5),w=new Date(+(w=r(b.getUTCFullYear(),0,1))+(11-w.getUTCDay())%7*864e5),E=(b-w)/864e5/7+1;m.push('<td class="ai1ec-cw">'+E+"</td>")}}g=this.getClassNames(c),g.push("ai1ec-day");if(this.o.beforeShowDay!==e.noop){var S=this.o.beforeShowDay(this._utc_to_local(c));S===undefined?S={}:typeof S=="boolean"?S={enabled:S}:typeof S=="string"&&(S={classes:S}),S.enabled===!1&&g.push("ai1ec-disabled"),S.classes&&(g=g.concat(S.classes.split(/\s+/))),S.tooltip&&(f=S.tooltip)}g=e.unique(g),m.push('<td class="'+g.join(" ")+'"'+(f?' title="'+f+'"':"")+">"+c.getUTCDate()+"</td>"),c.getUTCDay()==this.o.weekEnd&&m.push("</tr>"),c.setUTCDate(c.getUTCDate()+1)}this.picker.find(".ai1ec-datepicker-days tbody").empty().append(m.join(""));var x=this.picker.find(".ai1ec-datepicker-months").find("th:eq(1)").text(n).end().find("span").removeClass("ai1ec-active");e.each(this.dates,function(e,t){t.getUTCFullYear()==n&&x.eq(t.getUTCMonth()).addClass("ai1ec-active")}),(n<s||n>u)&&x.addClass("ai1ec-disabled"),n==s&&x.slice(0,o).addClass("ai1ec-disabled"),n==u&&x.slice(a+1).addClass("ai1ec-disabled"),m="",n=parseInt(n/10,10)*10;var T=this.picker.find(".ai1ec-datepicker-years").find("th:eq(1)").text(n+"-"+(n+9)).end().find("td");n-=1;var N=e.map(this.dates,function(e){return e.getUTCFullYear()}),C;for(var k=-1;k<11;k++)C=["ai1ec-year"],k===-1?C.push("ai1ec-old"):k===10&&C.push("ai1ec-new"),e.inArray(n,N)!==-1&&C.push("ai1ec-active"),(n<s||n>u)&&C.push("ai1ec-disabled"),m+='<span class="'+C.join(" ")+'">'+n+"</span>",n+=1;T.html(m)},updateNavArrows:function(){if(!this._allow_update)return;var e=new Date(this.viewDate),t=e.getUTCFullYear(),n=e.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-Infinity&&t<=this.o.startDate.getUTCFullYear()&&n<=this.o.startDate.getUTCMonth()?this.picker.find(".ai1ec-prev").css({visibility:"hidden"}):this.picker.find(".ai1ec-prev").css({visibility:"visible"}),this.o.endDate!==Infinity&&t>=this.o.endDate.getUTCFullYear()&&n>=this.o.endDate.getUTCMonth()?this.picker.find(".ai1ec-next").css({visibility:"hidden"}):this.picker.find(".ai1ec-next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-Infinity&&t<=this.o.startDate.getUTCFullYear()?this.picker.find(".ai1ec-prev").css({visibility:"hidden"}):this.picker.find(".ai1ec-prev").css({visibility:"visible"}),this.o.endDate!==Infinity&&t>=this.o.endDate.getUTCFullYear()?this.picker.find(".ai1ec-next").css({visibility:"hidden"}):this.picker.find(".ai1ec-next").css({visibility:"visible"})}},click:function(t){t.preventDefault();var n=e(t.target).closest("span, td, th"),i,s,o;if(n.length==1)switch(n[0].nodeName.toLowerCase()){case"th":switch(n[0].className){case"ai1ec-datepicker-switch":this.showMode(1);break;case"ai1ec-prev":case"ai1ec-next":var u=v.modes[this.viewMode].navStep*(n[0].className=="ai1ec-prev"?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,u),this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,u),this.viewMode===1&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"ai1ec-today":var a=new Date;a=r(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0),this.showMode(-2);var f=this.o.todayBtn=="linked"?null:"view";this._setDate(a,f);break;case"ai1ec-clear":var l;this.isInput?l=this.element:this.component&&(l=this.element.find("input")),l&&l.val("").change(),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()}break;case"span":n.is(".ai1ec-disabled")||(this.viewDate.setUTCDate(1),n.is(".ai1ec-month")?(o=1,s=n.parent().find("span").index(n),i=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(s),this._trigger("changeMonth",this.viewDate),this.o.minViewMode===1&&this._setDate(r(i,s,o))):(o=1,s=0,i=parseInt(n.text(),10)||0,this.viewDate.setUTCFullYear(i),this._trigger("changeYear",this.viewDate),this.o.minViewMode===2&&this._setDate(r(i,s,o))),this.showMode(-1),this.fill());break;case"td":n.is(".ai1ec-day")&&!n.is(".ai1ec-disabled")&&(o=parseInt(n.text(),10)||1,i=this.viewDate.getUTCFullYear(),s=this.viewDate.getUTCMonth(),n.is(".ai1ec-old")?s===0?(s=11,i-=1):s-=1:n.is(".ai1ec-new")&&(s==11?(s=0,i+=1):s+=1),this._setDate(r(i,s,o)))}this.picker.is(":visible")&&this._focused_from&&e(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(e){var t=this.dates.contains(e);e?t!==-1?this.dates.remove(t):this.dates.push(e):this.dates.clear();if(typeof this.o.multidate=="number")while(this.dates.length>this.o.multidate)this.dates.remove(0)},_setDate:function(e,t){(!t||t=="date")&&this._toggle_multidate(e&&new Date(e));if(!t||t=="view")this.viewDate=e&&new Date(e);this.fill(),this.setValue(),this._trigger("changeDate");var n;this.isInput?n=this.element:this.component&&(n=this.element.find("input")),n&&n.change(),this.o.autoclose&&(!t||t=="date")&&this.hide()},moveMonth:function(e,t){if(!e)return undefined;if(!t)return e;var n=new Date(e.valueOf()),r=n.getUTCDate(),i=n.getUTCMonth(),s=Math.abs(t),o,u;t=t>0?1:-1;if(s==1){u=t==-1?function(){return n.getUTCMonth()==i}:function(){return n.getUTCMonth()!=o},o=i+t,n.setUTCMonth(o);if(o<0||o>11)o=(o+12)%12}else{for(var a=0;a<s;a++)n=this.moveMonth(n,t);o=n.getUTCMonth(),n.setUTCDate(r),u=function(){return o!=n.getUTCMonth()}}while(u())n.setUTCDate(--r),n.setUTCMonth(o);return n},moveYear:function(e,t){return this.moveMonth(e,t*12)},dateWithinRange:function(e){return e>=this.o.startDate&&e<=this.o.endDate},keydown:function(e){if(this.picker.is(":not(:visible)")){e.keyCode==27&&this.show();return}var t=!1,n,r,s,o=this.focusDate||this.viewDate;switch(e.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),e.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;n=e.keyCode==37?-1:1,e.ctrlKey?(r=this.moveYear(this.dates.get(-1)||i(),n),s=this.moveYear(o,n),this._trigger("changeYear",this.viewDate)):e.shiftKey?(r=this.moveMonth(this.dates.get(-1)||i(),n),s=this.moveMonth(o,n),this._trigger("changeMonth",this.viewDate)):(r=new Date(this.dates.get(-1)||i()),r.setUTCDate(r.getUTCDate()+n),s=new Date(o),s.setUTCDate(o.getUTCDate()+n)),this.dateWithinRange(r)&&(this.focusDate=this.viewDate=s,this.setValue(),this.fill(),e.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;n=e.keyCode==38?-1:1,e.ctrlKey?(r=this.moveYear(this.dates.get(-1)||i(),n),s=this.moveYear(o,n),this._trigger("changeYear",this.viewDate)):e.shiftKey?(r=this.moveMonth(this.dates.get(-1)||i(),n),s=this.moveMonth(o,n),this._trigger("changeMonth",this.viewDate)):(r=new Date(this.dates.get(-1)||i()),r.setUTCDate(r.getUTCDate()+n*7),s=new Date(o),s.setUTCDate(o.getUTCDate()+n*7)),this.dateWithinRange(r)&&(this.focusDate=this.viewDate=s,this.setValue(),this.fill(),e.preventDefault());break;case 32:break;case 13:o=this.focusDate||this.dates.get(-1)||this.viewDate,this._toggle_multidate(o),t=!0,this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(e.preventDefault(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}if(t){this.dates.length?this._trigger("changeDate"):this._trigger("clearDate");var u;this.isInput?u=this.element:this.component&&(u=this.element.find("input")),u&&u.change()}},showMode:function(e){e&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+e))),this.picker.find(">div").hide().filter(".ai1ec-datepicker-"+v.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var a=function(t,n){this.element=e(t),this.inputs=e.map(n.inputs,function(e){return e.jquery?e[0]:e}),delete n.inputs,e(this.inputs).datepicker(n).bind("changeDate",e.proxy(this.dateUpdated,this)),this.pickers=e.map(this.inputs,function(t){return e(t).data("datepicker")}),this.updateDates()};a.prototype={updateDates:function(){this.dates=e.map(this.pickers,function(e){return e.getUTCDate()}),this.updateRanges()},updateRanges:function(){var t=e.map(this.dates,function(e){return e.valueOf()});e.each(this.pickers,function(e,n){n.setRange(t)})},dateUpdated:function(t){if(this.updating)return;this.updating=!0;var n=e(t.target).data("datepicker"),r=n.getUTCDate(),i=e.inArray(t.target,this.inputs),s=this.inputs.length;if(i==-1)return;e.each(this.pickers,function(e,t){t.getUTCDate()||t.setUTCDate(r)});if(r<this.dates[i])while(i>=0&&r<this.dates[i])this.pickers[i--].setUTCDate(r);else if(r>this.dates[i])while(i<s&&r>this.dates[i])this.pickers[i++].setUTCDate(r);this.updateDates(),delete this.updating},remove:function(){e.map(this.pickers,function(e){e.remove()}),delete this.element.data().datepicker}};var c=e.fn.datepicker;e.fn.datepicker=function(t){var n=Array.apply(null,arguments);n.shift();var r;return this.each(function(){var i=e(this),s=i.data("datepicker"),o=typeof t=="object"&&t;if(!s){var c=f(this,"date"),p=e.extend({},h,c,o),d=l(p.language),v=e.extend({},h,d,c,o);if(i.is(".ai1ec-input-daterange")||v.inputs){var m={inputs:v.inputs||i.find("input").toArray()};i.data("datepicker",s=new a(this,e.extend(v,m)))}else i.data("datepicker",s=new u(this,v))}if(typeof t=="string"&&typeof s[t]=="function"){r=s[t].apply(s,n);if(r!==undefined)return!1}}),r!==undefined?r:this};var h=e.fn.datepicker.defaults={autoclose:!1,beforeShowDay:e.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:Infinity,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-Infinity,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},p=e.fn.datepicker.locale_opts=["format","rtl","weekStart"];e.fn.datepicker.Constructor=u;var d=e.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},v={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(e){return e%4===0&&e%100!==0||e%400===0},getDaysInMonth:function(e,t){return[31,v.isLeapYear(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(e){var t=e.replace(this.validParts,"\0").split("\0"),n=e.match(this.validParts);if(!t||!t.length||!n||n.length===0)throw new Error("Invalid date format.");return{separators:t,parts:n}},parseDate:function(t,n,i){if(!t)return undefined;if(t instanceof Date)return t;typeof n=="string"&&(n=v.parseFormat(n));if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(t)){var s=/([\-+]\d+)([dmwy])/,o=t.match(/([\-+]\d+)([dmwy])/g),a,f;t=new Date;for(var l=0;l<o.length;l++){a=s.exec(o[l]),f=parseInt(a[1]);switch(a[2]){case"d":t.setUTCDate(t.getUTCDate()+f);break;case"m":t=u.prototype.moveMonth.call(u.prototype,t,f);break;case"w":t.setUTCDate(t.getUTCDate()+f*7);break;case"y":t=u.prototype.moveYear.call(u.prototype,t,f)}}return r(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),0,0,0)}var o=t&&t.match(this.nonpunctuation)||[],t=new Date,c={},h=["yyyy","yy","M","MM","m","mm","d","dd"],p={yyyy:function(e,t){return e.setUTCFullYear(t)},yy:function(e,t){return e.setUTCFullYear(2e3+t)},m:function(e,t){if(isNaN(e))return e;t-=1;while(t<0)t+=12;t%=12,e.setUTCMonth(t);while(e.getUTCMonth()!=t)e.setUTCDate(e.getUTCDate()-1);return e},d:function(e,t){return e.setUTCDate(t)}},m,g,a;p.M=p.MM=p.mm=p.m,p.dd=p.d,t=r(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0);var y=n.parts.slice();o.length!=y.length&&(y=e(y).filter(function(t,n){return e.inArray(n,h)!==-1}).toArray());if(o.length==y.length){for(var l=0,b=y.length;l<b;l++){m=parseInt(o[l],10),a=y[l];if(isNaN(m))switch(a){case"MM":g=e(d[i].months).filter(function(){var e=this.slice(0,o[l].length),t=o[l].slice(0,e.length);return e==t}),m=e.inArray(g[0],d[i].months)+1;break;case"M":g=e(d[i].monthsShort).filter(function(){var e=this.slice(0,o[l].length),t=o[l].slice(0,e.length);return e==t}),m=e.inArray(g[0],d[i].monthsShort)+1}c[a]=m}for(var l=0,w,E;l<h.length;l++)E=h[l],E in c&&!isNaN(c[E])&&(w=new Date(t),p[E](w,c[E]),isNaN(w)||(t=w))}return t},formatDate:function(t,n,r){if(!t)return"";typeof n=="string"&&(n=v.parseFormat(n));var i={d:t.getUTCDate(),D:d[r].daysShort[t.getUTCDay()],DD:d[r].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:d[r].monthsShort[t.getUTCMonth()],MM:d[r].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()};i.dd=(i.d<10?"0":"")+i.d,i.mm=(i.m<10?"0":"")+i.m;var t=[],s=e.extend([],n.separators);for(var o=0,u=n.parts.length;o<=u;o++)s.length&&t.push(s.shift()),t.push(i[n.parts[o]]);return t.join("")},headTemplate:'<thead><tr><th class="ai1ec-prev"><i class="ai1ec-fa ai1ec-fa-arrow-left"></i></th><th colspan="5" class="ai1ec-datepicker-switch"></th><th class="ai1ec-next"><i class="ai1ec-fa ai1ec-fa-arrow-right"></i></th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="ai1ec-today"></th></tr><tr><th colspan="7" class="ai1ec-clear"></th></tr></tfoot>'};v.template='<div class="timely ai1ec-datepicker"><div class="ai1ec-datepicker-days"><table class=" ai1ec-table-condensed">'+v.headTemplate+"<tbody></tbody>"+v.footTemplate+"</table>"+"</div>"+'<div class="ai1ec-datepicker-months">'+'<table class="ai1ec-table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+"</table>"+"</div>"+'<div class="ai1ec-datepicker-years">'+'<table class="ai1ec-table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+"</table>"+"</div>"+"</div>",e.fn.datepicker.DPGlobal=v,e.fn.datepicker.noConflict=function(){return e.fn.datepicker=c,this},e(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var n=e(this);if(n.data("datepicker"))return;t.preventDefault(),n.datepicker("show")}),e(function(){e('[data-provide="datepicker-inline"]').datepicker()});for(var m=2,g=arguments.length;m<g;m++)arguments[m].localize()}),timely.define("external_libs/bootstrap/tooltip",["jquery_timely"],function(e){var t=function(e,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",e,t)};t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="ai1ec-tooltip"><div class="ai1ec-tooltip-arrow"></div><div class="ai1ec-tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},t.prototype.init=function(t,n,r){this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(r);var i=this.options.trigger.split(" ");for(var s=i.length;s--;){var o=i[s];if(o=="click")this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if(o!="manual"){var u=o=="hover"?"mouseenter":"focus",a=o=="hover"?"mouseleave":"blur";this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},t.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,r){n[e]!=r&&(t[e]=r)}),t},t.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(n.timeout),n.hoverState="in";if(!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},t.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(n.timeout),n.hoverState="out";if(!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},t.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.tip();this.setContent(),this.options.animation&&n.addClass("ai1ec-fade");var r=typeof this.options.placement=="function"?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,s=i.test(r);s&&(r=r.replace(i,"")||"top"),n.detach().css({top:0,left:0,display:"block"}).addClass("ai1ec-"+r),this.options.container?n.appendTo(this.options.container):n.insertAfter(this.$element);var o=this.getPosition(),u=n[0].offsetWidth,a=n[0].offsetHeight;if(s){var f=this.$element.parent(),l=r,c=document.documentElement.scrollTop||document.body.scrollTop,h=this.options.container=="body"?window.innerWidth:f.outerWidth(),p=this.options.container=="body"?window.innerHeight:f.outerHeight(),d=this.options.container=="body"?0:f.offset().left;r=r=="bottom"&&o.top+o.height+a-c>p?"top":r=="top"&&o.top-c-a<0?"bottom":r=="right"&&o.right+u>h?"left":r=="left"&&o.left-u<d?"right":r,n.removeClass("ai1ec-"+l).addClass("ai1ec-"+r)}var v=this.getCalculatedOffset(r,o,u,a);this.applyPlacement(v,r),this.$element.trigger("shown.bs."+this.type)}},t.prototype.applyPlacement=function(e,t){var n,r=this.tip(),i=r[0].offsetWidth,s=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),u=parseInt(r.css("margin-left"),10);isNaN(o)&&(o=0),isNaN(u)&&(u=0),e.top=e.top+o,e.left=e.left+u,r.offset(e).addClass("ai1ec-in");var a=r[0].offsetWidth,f=r[0].offsetHeight;t=="top"&&f!=s&&(n=!0,e.top=e.top+s-f);if(/bottom|top/.test(t)){var l=0;e.left<0&&(l=e.left*-2,e.left=0,r.offset(e),a=r[0].offsetWidth,f=r[0].offsetHeight),this.replaceArrow(l-i+a,a,"left")}else this.replaceArrow(f-s,f,"top");n&&r.offset(e)},t.prototype.replaceArrow=function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".ai1ec-tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("ai1ec-fade ai1ec-in ai1ec-top ai1ec-bottom ai1ec-left ai1ec-right")},t.prototype.hide=function(){function i(){t.hoverState!="in"&&n.detach()}var t=this,n=this.tip(),r=e.Event("hide.bs."+this.type);this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("ai1ec-in"),e.support.transition&&this.$tip.hasClass("ai1ec-fade")?n.one(e.support.transition.end,i).emulateTransitionEnd(150):i(),this.$element.trigger("hidden.bs."+this.type),this},t.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},t.prototype.hasContent=function(){return this.getTitle()},t.prototype.getPosition=function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},t.prototype.getCalculatedOffset=function(e,t,n,r){return e=="bottom"?{top:t.top+t.height,left:t.left+t.width/2-n/2}:e=="top"?{top:t.top-r,left:t.left+t.width/2-n/2}:e=="left"?{top:t.top+t.height/2-r/2,left:t.left-n}:{top:t.top+t.height/2-r/2,left:t.left+t.width}},t.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},t.prototype.tip=function(){return this.$tip=this.$tip||e(this.options.template)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".ai1ec-tooltip-arrow")},t.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.toggleEnabled=function(){this.enabled=!this.enabled},t.prototype.toggle=function(t){var n=t?e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;n.tip().hasClass("ai1ec-in")?n.leave(n):n.enter(n)},t.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tooltip"),s=typeof n=="object"&&n;i||r.data("bs.tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}),timely.define("external_libs/jquery_cookie",["jquery_timely"],function(e){function n(e){return u.raw?e:encodeURIComponent(e)}function r(e){return u.raw?e:decodeURIComponent(e)}function i(e){return n(u.json?JSON.stringify(e):String(e))}function s(e){e.indexOf('"')===0&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(t," ")),u.json?JSON.parse(e):e}catch(n){}}function o(t,n){var r=u.raw?t:s(t);return e.isFunction(n)?n(r):r}var t=/\+/g,u=e.cookie=function(t,s,a){if(s!==undefined&&!e.isFunction(s)){a=e.extend({},u.defaults,a);if(typeof a.expires=="number"){var f=a.expires,l=a.expires=new Date;l.setTime(+l+f*864e5)}return document.cookie=[n(t),"=",i(s),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}var c=t?undefined:{},h=document.cookie?document.cookie.split("; "):[];for(var p=0,d=h.length;p<d;p++){var v=h[p].split("="),m=r(v.shift()),g=v.join("=");if(t&&t===m){c=o(g,s);break}!t&&(g=o(g))!==undefined&&(c[m]=g)}return c};u.defaults={},e.removeCookie=function(t,n){return e.cookie(t)===undefined?!1:(e.cookie(t,"",e.extend({},n,{expires:-1})),!e.cookie(t))}}),timely.define("scripts/admin_settings",["jquery_timely","domReady","ai1ec_config","libs/utils","scripts/setting/cache/cache_event_handlers","external_libs/bootstrap/button","libs/collapse_helper","external_libs/bootstrap/tab","external_libs/bootstrap/dropdown","external_libs/bootstrap_datepicker","external_libs/bootstrap/tooltip","external_libs/jquery_cookie"],function(e,t,n,r,i){var s=function(){var t=!0;e("#ai1ec-plugins-settings input:text").each(function(){this.value!==""&&(t=!1)}),t===!0&&e("#ai1ec-plugins-settings").remove()},o=function(t){var n=e(this).attr("href");e.cookie("ai1ec_general_settings_active_tab",n)},u=function(){var t=e("#week_view_starts_at"),r=e("#week_view_ends_at"),i=parseInt(t.val(),10),s=parseInt(r.val(),10);if(s<i)return window.alert(n.end_must_be_after_start),r.focus(),!1;var o=s-i;if(o<6)return window.alert(n.show_at_least_six_hours),r.focus(),!1},a=function(){e(".ai1ec-gzip-causes-js-failure").remove()},f=function(){e("#ai1ec_save_settings").on("click",function(t){var r=e("#require_disclaimer").is(":checked"),i=e("#disclaimer").val();!0===r&&""===i&&(alert(n.require_desclaimer),e('#ai1ec-general-settings ul.ai1ec-nav a[href="#ai1ec-advanced"]').tab("show"),e("#disclaimer").focus(),t.preventDefault())})},l=function(){t(function(){f(),a(),r.activate_saved_tab_on_page_load(e.cookie("ai1ec_general_settings_active_tab")),e(document).on("click",'#ai1ec-general-settings .ai1ec-nav a[data-toggle="ai1ec-tab"]',o),e(document).on("click","#disable_standard_filter_menu_toggler",function(e){e.preventDefault()}),e(document).on("click","#ai1ec-button-refresh",i.perform_rescan);var t=e("#exact_date");t.datepicker({autoclose:!0}),s(),e(document).on("click",".ai1ec-admin-view-settings .ai1ec-toggle-view",function(){var t=e(this),n=t.parent().index()+1;if(0===t.closest("tr").siblings().find("td:nth-child("+n+") .ai1ec-toggle-view:checked").length)return!1;if(t.parent().next("td").find(".ai1ec-toggle-default-view").is(":checked"))return!1});var n=function(){var t=e(this).closest(".ai1ec-form-group").nextAll(".ai1ec-form-group").slice(0,4);e(this).prop("checked")?t.show():t.hide()};n.apply(e("#affix_filter_menu").on("click",n)[0]),e(document).on("click",".ai1ec-admin-view-settings .ai1ec-toggle-default-view",function(){e(this).parent().prev("td").children(".ai1ec-toggle-view").prop("checked",!0)}),r.init_autoselect(),e("#ai1ec_save_settings").on("click",u),e("#show_create_event_button").trigger("ready")})};return{start:l}}),timely.require(["scripts/admin_settings"],function(e){e.start()}),timely.define("pages/admin_settings",function(){});
|
public/js/pages/calendar.js
CHANGED
@@ -110,6 +110,34 @@ CONDITIONS OF ANY KIND, either express or implied. See the Apache License and th
|
|
110 |
the specific language governing permissions and limitations under the Apache License and the GPL License.
|
111 |
*/
|
112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
/**
|
114 |
* History.js jQuery Adapter
|
115 |
* @author Benjamin Arthur Lupton <contact@balupton.com>
|
@@ -312,4 +340,4 @@ OTHER DEALINGS IN THE SOFTWARE.
|
|
312 |
* limitations under the License.
|
313 |
* ======================================================================== */
|
314 |
|
315 |
-
timely.define("scripts/calendar/print",["jquery_timely"],function(e){var t=function(t){t.preventDefault();var n=e("body"),r=e("html"),i=e(this).closest(".ai1ec-calendar").html(),s=n.html();s=s.replace(/<script.*?>([\s\S]*?)<\/script>/gmi,""),n.empty(),n.addClass("timely"),r.addClass("ai1ec-print"),n.html(i),e("span").click(function(){return!1}),window.print(),n.removeClass("timely"),r.removeClass("ai1ec-print"),n.html(s)};return{handle_click_on_print_button:t}}),timely.define("scripts/calendar/agenda_view",["jquery_timely"],function(e){var t=function(){e(this).closest(".ai1ec-event").toggleClass("ai1ec-expanded").find(".ai1ec-event-summary").slideToggle(300)},n=function(){var t=e(this).closest(".ai1ec-calendar");t.find(".ai1ec-expanded .ai1ec-event-toggle").click()},r=function(){var t=e(this).closest(".ai1ec-calendar");t.find(".ai1ec-event:not(.ai1ec-expanded) .ai1ec-event-toggle").click()};return{toggle_event:t,collapse_all:n,expand_all:r}}),timely.define("external_libs/modernizr",[],function(){var e=function(e,t,n){function S(e){f.cssText=e}function x(e,t){return S(h.join(e+";")+(t||""))}function T(e,t){return typeof e===t}function N(e,t){return!!~(""+e).indexOf(t)}function C(e,t,r){for(var i in e){var s=t[e[i]];if(s!==n)return r===!1?e[i]:T(s,"function")?s.bind(r||t):s}return!1}var r="2.5.3",i={},s=!0,o=t.documentElement,u="modernizr",a=t.createElement(u),f=a.style,l,c={}.toString,h=" -webkit- -moz- -o- -ms- ".split(" "),p={},d={},v={},m=[],g=m.slice,y,b=function(e,n,r,i){var s,a,f,l=t.createElement("div"),c=t.body,h=c?c:t.createElement("body");if(parseInt(r,10))while(r--)f=t.createElement("div"),f.id=i?i[r]:u+(r+1),l.appendChild(f);return s=["­","<style>",e,"</style>"].join(""),l.id=u,(c?l:h).innerHTML+=s,h.appendChild(l),c||(h.style.background="",o.appendChild(h)),a=n(l,e),c?l.parentNode.removeChild(l):h.parentNode.removeChild(h),!!a},w={}.hasOwnProperty,E;!T(w,"undefined")&&!T(w.call,"undefined")?E=function(e,t){return w.call(e,t)}:E=function(e,t){return t in e&&T(e.constructor.prototype[t],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(t){var n=this;if(typeof n!="function")throw new TypeError;var r=g.call(arguments,1),i=function(){if(this instanceof i){var e=function(){};e.prototype=n.prototype;var s=new e,o=n.apply(s,r.concat(g.call(arguments)));return Object(o)===o?o:s}return n.apply(t,r.concat(g.call(arguments)))};return i});var k=function(n,r){var s=n.join(""),o=r.length;b(s,function(n,r){var s=t.styleSheets[t.styleSheets.length-1],u=s?s.cssRules&&s.cssRules[0]?s.cssRules[0].cssText:s.cssText||"":"",a=n.childNodes,f={};while(o--)f[a[o].id]=a[o];i.touch="ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch||(f.touch&&f.touch.offsetTop)===9},o,r)}([,["@media (",h.join("touch-enabled),("),u,")","{#touch{top:9px;position:absolute}}"].join("")],[,"touch"]);p.touch=function(){return i.touch};for(var L in p)E(p,L)&&(y=L.toLowerCase(),i[y]=p[L](),m.push((i[y]?"":"no-")+y));return S(""),a=l=null,i._version=r,i._prefixes=h,i.testStyles=b,o.className=o.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(s?" js "+m.join(" "):""),i}(window,window.document);return e}),timely.define("scripts/calendar/month_view",["jquery_timely","external_libs/modernizr"],function(e,t){var n=navigator.userAgent.match(/opera/i),r=navigator.userAgent.match(/webkit/i),i=function(t){var n=t.find(".ai1ec-day"),r=t.find(".ai1ec-week:first .ai1ec-day").length;t.find(".ai1ec-month-view .ai1ec-multiday").each(function(){var t=this.parentNode,r=e(this).outerHeight(!0),i=e(".ai1ec-date",t),u=parseInt(i.text(),10),a=e(this).data("endTruncated"),f=parseInt(a?e(n[n.length-1]).text():e(this).data("endDay"),10),l=e(this),c=e(".ai1ec-event",l)[0].style.backgroundColor,h=0,p=f-u+1,d=p,v,m=0;n.each(function(t){var n=e(".ai1ec-date",this),r=e(this.parentNode),i=r.index(),a=parseInt(n.text(),10);if(a>=u&&a<=f){a===u&&(v=parseInt(n.css("marginBottom"),10)+16),h===0&&m++;if(i===0&&a>u&&d!==0){var p=l.next(".ai1ec-popup").andSelf().clone(!1);n.parent().append(p);var g=p.first();g.addClass("ai1ec-multiday-bar ai1ec-multiday-clone"),g.css({position:"absolute",left:"1px",top:parseInt(n.css("marginBottom"),10)+13,backgroundColor:c});var y=d>7?7:d;g.css("width",s(y)),d>7&&g.append(o(1,c)),g.append(o(2,c))}h===0?n.css({marginBottom:v+"px"}):n.css({marginBottom:"+=16px"}),d--,d>0&&i===6&&h++}});if(a){var g=l.find("."+l[0].className.replace(/\s+/igm,".")).last();g.append(o(1,c))}e(this).css({position:"absolute",top:i.outerHeight(!0)-r-1+"px",left:"1px",width:s(m)}),h>0&&e(this).append(o(1,c)),e(this).data("startTruncated")&&e(this).append(o(2,c)).addClass("ai1ec-multiday-bar")})},s=function(e){var t;switch(e){case 1:t=97.5;break;case 2:t=198.7;break;case 3:t=300;break;case 4:t=401;break;case 5:r||n?t=507:t=503.4;break;case 6:r||n?t=608:t=603.5;break;case 7:r||n?t=709:t=705}return t+"%"},o=function(t,n){var r=e('<div class="ai1ec-multiday-arrow'+t+'"></div>');return t===1?r.css({borderLeftColor:n}):r.css({borderTopColor:n,borderRightColor:n,borderBottomColor:n}),r};return{extend_multiday_events:i}}),timely.define("libs/frontend_utils",[],function(){var e=function(e){var t,n;t=function(e){if(/&[^;]+;/.test(e)){var t=document.createElement("div");return t.innerHTML=e,t.firstChild?t.firstChild.nodeValue:e}return e};if(typeof e=="string")return t(e);if(typeof e=="object")for(n in e)typeof e[n]=="string"&&(e[n]=t(e[n]));return e},t=function(e,t,n){var r,i,s,o,u;if("#"===e.charAt(0)||"?"===e.charAt(0))e=e.substring(1);r={},e=e.split(t);for(i=0;i<e.length;i++)o=e[i].trim(),-1!==(u=o.indexOf(n))?(s=o.substring(0,u).trim(),o=o.substring(u+1).trim()):(s=o,o=!0),r[s]=o;return r},n=function(e){var n,r,i,s,o;e=t(e,"&","="),i=Object.keys(e),n={ai1ec:{},action:"month"};for(r=0;r<i.length;r++)if("ai1ec"===i[r]){var u=t(e[i[r]],"|",":");for(s in u)if(""!==u[s]){if("action"===s||"view"===s)n.action=u[s];n.ai1ec[s]=u[s]}}else"ai1ec_"===i[r].substring(0,6)?n.ai1ec[i[r].substring(6)]=e[i[r]]:n[i[r]]=e[i[r]];"ai1ec_"!==n.action.substring(0,6)&&(n.action="ai1ec_"+n.action),o="action="+n.action+"&ai1ec=";for(s in n.ai1ec)n.ai1ec.hasOwnProperty(s)&&(o+=escape(s)+":"+escape(n.ai1ec[s])+"|");o=o.substring(0,o.length-1);for(s in n)"ai1ec"!==s&&"action"!==s&&(o+="&"+s+"="+escape(n[s]));return o};return{ai1ec_convert_entities:e,ai1ec_map_internal_query:n,ai1ec_tokenize_uri:t}}),timely.define("external_libs/bootstrap/tab",["jquery_timely"],function(e){var t=function(t){this.element=e(t)};t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.ai1ec-dropdown-menu)"),r=t.data("target");r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("ai1ec-active"))return;var i=n.find(".ai1ec-active:last a")[0],s=e.Event("show.bs.tab",{relatedTarget:i});t.trigger(s);if(s.isDefaultPrevented())return;var o=e(r);this.activate(t.parent("li"),n),this.activate(o,o.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:i})})},t.prototype.activate=function(t,n,r){function o(){i.removeClass("ai1ec-active").find("> .ai1ec-dropdown-menu > .ai1ec-active").removeClass("ai1ec-active"),t.addClass("ai1ec-active"),s?(t[0].offsetWidth,t.addClass("ai1ec-in")):t.removeClass("ai1ec-fade"),t.parent(".ai1ec-dropdown-menu")&&t.closest("li.ai1ec-dropdown").addClass("ai1ec-active"),r&&r()}var i=n.find("> .ai1ec-active"),s=r&&e.support.transition&&i.hasClass("ai1ec-fade");s?i.one(e.support.transition.end,o).emulateTransitionEnd(150):o(),i.removeClass("ai1ec-in")};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tab");i||r.data("bs.tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.bs.tab.data-api",'[data-toggle="ai1ec-tab"], [data-toggle="ai1ec-pill"]',function(t){t.preventDefault(),e(this).tab("show")})}),timely.define("libs/utils",["jquery_timely","external_libs/bootstrap/tab"],function(e){var t=function(){return{is_float:function(e){return!isNaN(parseFloat(e))},is_valid_coordinate:function(e,t){var n=t?90:180;return this.is_float(e)&&Math.abs(e)<n},convert_comma_to_dot:function(e){return e.replace(",",".")},field_has_value:function(t){var n="#"+t,r=e(n),i=!1;return r.length===1&&(i=e.trim(r.val())!==""),i},make_alert:function(t,n,r){var i="";switch(n){case"error":i="ai1ec-alert ai1ec-alert-danger";break;case"success":i="ai1ec-alert ai1ec-alert-success";break;default:i="ai1ec-alert"}var s=e("<div />",{"class":i,html:t});if(!r){var o=e("<button>",{type:"button","class":"ai1ec-close","data-dismiss":"ai1ec-alert",text:"×"});s.prepend(o)}return s},get_ajax_url:function(){return typeof window.ajaxurl=="undefined"?"http://localhost/wordpress/wp-admin/admin-ajax.php":window.ajaxurl},isUrl:function(e){var t=/(http|https|webcal):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)},isValidEmail:function(e){var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)},activate_saved_tab_on_page_load:function(t){null===t||undefined===t?e("ul.ai1ec-nav a:first").tab("show"):e("ul.ai1ec-nav a[href="+t+"]").tab("show")}}}();return t}),timely.define("domReady",[],function(){function u(e){var t;for(t=0;t<e.length;t++)e[t](n)}function a(){var e=r;t&&e.length&&(r=[],u(e))}function f(){t||(t=!0,o&&clearInterval(o),a())}function c(e){return t?e(n):r.push(e),c}var e=typeof window!="undefined"&&window.document,t=!e,n=e?document:null,r=[],i,s,o;if(e){if(document.addEventListener)document.addEventListener("DOMContentLoaded",f,!1),window.addEventListener("load",f,!1);else if(window.attachEvent){window.attachEvent("onload",f),s=document.createElement("div");try{i=window.frameElement===null}catch(l){}s.doScroll&&i&&window.external&&(o=setInterval(function(){try{s.doScroll(),f()}catch(e){}},30))}(document.readyState==="complete"||document.readyState==="interactive")&&f()}return c.version="2.0.0",c.load=function(e,t,n,r){r.isBuild?n(null):c(n)},c}),timely.define("external_libs/bootstrap/affix",["jquery_timely"],function(e){var t=function(n,r){this.options=e.extend({},t.DEFAULTS,r),this.$window=e(window).on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(n),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};t.RESET="ai1ec-affix ai1ec-affix-top ai1ec-affix-bottom",t.DEFAULTS={offset:0},t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("ai1ec-affix");var e=this.$window.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-e},t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var n=e(document).height(),r=this.$window.scrollTop(),i=this.$element.offset(),s=this.options.offset,o=s.top,u=s.bottom;this.affixed=="top"&&(i.top+=r),typeof s!="object"&&(u=o=s),typeof o=="function"&&(o=s.top(this.$element)),typeof u=="function"&&(u=s.bottom(this.$element));var a=this.unpin!=null&&r+this.unpin<=i.top?!1:u!=null&&i.top+this.$element.height()>=n-u?"bottom":o!=null&&r<=o?"top":!1;if(this.affixed===a)return;this.unpin&&this.$element.css("top","");var f="ai1ec-affix"+(a?"-"+a:""),l=e.Event(f+".bs.affix");this.$element.trigger(l);if(l.isDefaultPrevented())return;this.affixed=a,this.unpin=a=="bottom"?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(f).trigger(e.Event(f.replace("affix","affixed"))),a=="bottom"&&this.$element.offset({top:n-u-this.$element.height()})};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("bs.affix"),s=typeof n=="object"&&n;i||r.data("bs.affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="ai1ec-affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}),timely.define("scripts/common_scripts/frontend/common_event_handlers",["jquery_timely","external_libs/bootstrap/affix"],function(e){var t=function(t){var n=e(this),r=n.next(".ai1ec-popup"),i,s,o;if(r.length===0)return;i=r.html(),s=r.attr("class");var u=n.closest("#ai1ec-calendar-view");u.length===0&&(u=e("body")),n.offset().left-u.offset().left>182?o="left":o="right",n.constrained_popover({content:i,title:"",placement:o,trigger:"manual",html:!0,template:'<div class="timely ai1ec-popover '+s+'">'+'<div class="ai1ec-arrow"></div>'+'<div class="ai1ec-popover-inner">'+'<div class="ai1ec-popover-content"><div></div></div>'+"</div>"+"</div>",container:"body"}).constrained_popover("show")},n=function(t){var n=e(t.toElement||t.relatedTarget);n.closest(".ai1ec-popup").length===0&&e(this).constrained_popover("hide")},r=function(t){var n=e(t.toElement||t.relatedTarget);n.closest(".ai1ec-tooltip").length===0&&(e(this).remove(),e("body > .ai1ec-tooltip").remove())},i=function(t){var n=e(this),r={template:'<div class="timely ai1ec-tooltip"><div class="ai1ec-tooltip-arrow"></div><div class="ai1ec-tooltip-inner"></div></div>',trigger:"manual",container:"body"};if(n.is(".ai1ec-category .ai1ec-color-swatch"))return;n.is(".ai1ec-tooltip-auto")&&(r.placement=u(250)),n.tooltip(r),n.tooltip("show")},s=function(t){var n=e(t.toElement||t.relatedTarget);n.closest(".ai1ec-tooltip").length===0&&e(this).data("bs.tooltip")&&e(this).tooltip("hide")},o=function(t){var n=e(t.toElement||t.relatedTarget);n.closest(".ai1ec-tooltip-trigger").length===0&&e(this).remove(),n.closest(".ai1ec-popup").length===0&&e("body > .ai1ec-popup").remove()},u=function(t){return function(n,r){var i,s,o=e(r),u=o.attr("data-placement"),a=e.extend({},o.offset(),{width:r.offsetWidth,height:r.offsetHeight}),f=function(){return!1===i?!1:(i=a.left-t>=0,i?"left":!1)},l=function(){return!1===s?!1:(s=a.left+t<=e(window).width(),s?"right":!1)};switch(u){case"top":return"top";case"bottom":return"bottom";case"left":if(f())return"left";case"right":if(l())return"right";default:if(f())return"left";if(l())return"right";return u}}};return{handle_popover_over:t,handle_popover_out:n,handle_popover_self_out:r,handle_tooltip_over:i,handle_tooltip_out:s,handle_tooltip_self_out:o}}),timely.define("external_libs/bootstrap/tooltip",["jquery_timely"],function(e){var t=function(e,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",e,t)};t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="ai1ec-tooltip"><div class="ai1ec-tooltip-arrow"></div><div class="ai1ec-tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},t.prototype.init=function(t,n,r){this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(r);var i=this.options.trigger.split(" ");for(var s=i.length;s--;){var o=i[s];if(o=="click")this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if(o!="manual"){var u=o=="hover"?"mouseenter":"focus",a=o=="hover"?"mouseleave":"blur";this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},t.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,r){n[e]!=r&&(t[e]=r)}),t},t.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(n.timeout),n.hoverState="in";if(!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},t.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(n.timeout),n.hoverState="out";if(!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},t.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.tip();this.setContent(),this.options.animation&&n.addClass("ai1ec-fade");var r=typeof this.options.placement=="function"?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,s=i.test(r);s&&(r=r.replace(i,"")||"top"),n.detach().css({top:0,left:0,display:"block"}).addClass("ai1ec-"+r),this.options.container?n.appendTo(this.options.container):n.insertAfter(this.$element);var o=this.getPosition(),u=n[0].offsetWidth,a=n[0].offsetHeight;if(s){var f=this.$element.parent(),l=r,c=document.documentElement.scrollTop||document.body.scrollTop,h=this.options.container=="body"?window.innerWidth:f.outerWidth(),p=this.options.container=="body"?window.innerHeight:f.outerHeight(),d=this.options.container=="body"?0:f.offset().left;r=r=="bottom"&&o.top+o.height+a-c>p?"top":r=="top"&&o.top-c-a<0?"bottom":r=="right"&&o.right+u>h?"left":r=="left"&&o.left-u<d?"right":r,n.removeClass("ai1ec-"+l).addClass("ai1ec-"+r)}var v=this.getCalculatedOffset(r,o,u,a);this.applyPlacement(v,r),this.$element.trigger("shown.bs."+this.type)}},t.prototype.applyPlacement=function(e,t){var n,r=this.tip(),i=r[0].offsetWidth,s=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),u=parseInt(r.css("margin-left"),10);isNaN(o)&&(o=0),isNaN(u)&&(u=0),e.top=e.top+o,e.left=e.left+u,r.offset(e).addClass("ai1ec-in");var a=r[0].offsetWidth,f=r[0].offsetHeight;t=="top"&&f!=s&&(n=!0,e.top=e.top+s-f);if(/bottom|top/.test(t)){var l=0;e.left<0&&(l=e.left*-2,e.left=0,r.offset(e),a=r[0].offsetWidth,f=r[0].offsetHeight),this.replaceArrow(l-i+a,a,"left")}else this.replaceArrow(f-s,f,"top");n&&r.offset(e)},t.prototype.replaceArrow=function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".ai1ec-tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("ai1ec-fade ai1ec-in ai1ec-top ai1ec-bottom ai1ec-left ai1ec-right")},t.prototype.hide=function(){function i(){t.hoverState!="in"&&n.detach()}var t=this,n=this.tip(),r=e.Event("hide.bs."+this.type);this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("ai1ec-in"),e.support.transition&&this.$tip.hasClass("ai1ec-fade")?n.one(e.support.transition.end,i).emulateTransitionEnd(150):i(),this.$element.trigger("hidden.bs."+this.type),this},t.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},t.prototype.hasContent=function(){return this.getTitle()},t.prototype.getPosition=function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},t.prototype.getCalculatedOffset=function(e,t,n,r){return e=="bottom"?{top:t.top+t.height,left:t.left+t.width/2-n/2}:e=="top"?{top:t.top-r,left:t.left+t.width/2-n/2}:e=="left"?{top:t.top+t.height/2-r/2,left:t.left-n}:{top:t.top+t.height/2-r/2,left:t.left+t.width}},t.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},t.prototype.tip=function(){return this.$tip=this.$tip||e(this.options.template)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".ai1ec-tooltip-arrow")},t.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.toggleEnabled=function(){this.enabled=!this.enabled},t.prototype.toggle=function(t){var n=t?e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;n.tip().hasClass("ai1ec-in")?n.leave(n):n.enter(n)},t.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tooltip"),s=typeof n=="object"&&n;i||r.data("bs.tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}),timely.define("external_libs/bootstrap/popover",["jquery_timely","external_libs/bootstrap/tooltip"],function(e){var t=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");t.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="ai1ec-popover"><div class="ai1ec-arrow"></div><h3 class="ai1ec-popover-title"></h3><div class="ai1ec-popover-content"></div></div>'}),t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".ai1ec-popover-title")[this.options.html?"html":"text"](t),e.find(".ai1ec-popover-content")[this.options.html?"html":"text"](n),e.removeClass("ai1ec-fade ai1ec-top ai1ec-bottom ai1ec-left ai1ec-right ai1ec-in"),e.find(".ai1ec-popover-title").html()||e.find(".ai1ec-popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||(typeof t.content=="function"?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".ai1ec-arrow")},t.prototype.tip=function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip};var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("bs.popover"),s=typeof n=="object"&&n;i||r.data("bs.popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}),timely.define("external_libs/constrained_popover",["jquery_timely","external_libs/bootstrap/popover"],function(e){var t=function(e,t){this.init("constrained_popover",e,t)};t.DEFAULTS=e.extend({},e.fn.popover.Constructor.DEFAULTS,{container:"",content:this.options}),t.prototype=e.extend({},e.fn.popover.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.applyPlacement=function(t,n){e.fn.popover.Constructor.prototype.applyPlacement.call(this,t,n);var r=this.tip(),i=r[0].offsetWidth,s=r[0].offsetHeight,o=this.getPosition(),u={};switch(n){case"left":newPos=this.defineBounds(o),typeof newPos.top=="undefined"?u.top=o.top+o.height/2-s/2:u.top=newPos.top-s/2,typeof newPos.left=="undefined"?u.left=o.left-i:u.left=newPos.left-i,r.offset(u);break;case"right":newPos=this.defineBounds(o),typeof newPos.top=="undefined"?u.top=o.top+o.height/2-s/2:u.top=newPos.top-s/2,typeof newPos.left=="undefined"?u.left=o.left+o.width:u.left=newPos.left+o.width,r.offset(u)}},t.prototype.defineBounds=function(t){var n,r,i,s,o,u={},a=e("body"===this.options.container?document:this.options.container);return a.length?(n=a.offset()||{top:0,left:0},r=n.top,i=n.left,s=r+a.height(),o=i+a.width(),t.top+t.height/2<r&&(u.top=r),t.top+t.height/2>s&&(u.top=s),t.left-t.width/2<i&&(u.left=i),t.left-t.width/2>o&&(u.left=o),u):!1};var n=e.fn.popover;e.fn.constrained_popover=function(n){return this.each(function(){var r=e(this),i=r.data("ai1ec.constrained_popover"),s=typeof n=="object"&&n;i||r.data("ai1ec.constrained_popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.constrained_popover.Constructor=t,e.fn.constrained_popover.noConflict=function(){return e.fn.constrained_popover=n,this}}),timely.define("external_libs/bootstrap/dropdown",["jquery_timely"],function(e){function i(){e(t).remove(),e(n).each(function(t){var n=s(e(this));if(!n.hasClass("ai1ec-open"))return;n.trigger(t=e.Event("hide.bs.dropdown"));if(t.isDefaultPrevented())return;n.removeClass("ai1ec-open").trigger("hidden.bs.dropdown")})}function s(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r=n&&e(n);return r&&r.length?r:t.parent()}var t=".ai1ec-dropdown-backdrop",n="[data-toggle=ai1ec-dropdown]",r=function(t){e(t).on("click.bs.dropdown",this.toggle)};r.prototype.toggle=function(t){var n=e(this);if(n.is(".ai1ec-disabled, :disabled"))return;var r=s(n),o=r.hasClass("ai1ec-open");i();if(!o){"ontouchstart"in document.documentElement&&!r.closest(".ai1ec-navbar-nav").length&&e('<div class="ai1ec-dropdown-backdrop"/>').insertAfter(e(this)).on("click",i),r.trigger(t=e.Event("show.bs.dropdown"));if(t.isDefaultPrevented())return;r.toggleClass("ai1ec-open").trigger("shown.bs.dropdown"),n.focus()}return!1},r.prototype.keydown=function(t){if(!/(38|40|27)/.test(t.keyCode))return;var r=e(this);t.preventDefault(),t.stopPropagation();if(r.is(".ai1ec-disabled, :disabled"))return;var i=s(r),o=i.hasClass("ai1ec-open");if(!o||o&&t.keyCode==27)return t.which==27&&i.find(n).focus(),r.click();var u=e("[role=menu] li:not(.ai1ec-divider):visible a",i);if(!u.length)return;var a=u.index(u.filter(":focus"));t.keyCode==38&&a>0&&a--,t.keyCode==40&&a<u.length-1&&a++,~a||(a=0),u.eq(a).focus()};var o=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new r(this)),typeof t=="string"&&i[t].call(n)})},e.fn.dropdown.Constructor=r,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=o,this},e(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".ai1ec-dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",n,r.prototype.toggle).on("keydown.bs.dropdown.data-api",n+", [role=menu]",r.prototype.keydown)}),timely.define("scripts/common_scripts/frontend/common_frontend",["jquery_timely","domReady","scripts/common_scripts/frontend/common_event_handlers","ai1ec_calendar","external_libs/modernizr","external_libs/bootstrap/tooltip","external_libs/constrained_popover","external_libs/bootstrap/dropdown"],function(e,t,n,r,i){var s=!1,o=function(){s=!0,e(document).on("mouseenter",".ai1ec-popup-trigger",n.handle_popover_over),e(document).on("mouseleave",".ai1ec-popup-trigger",n.handle_popover_out),e(document).on("mouseleave",".ai1ec-popup",n.handle_popover_self_out),e(document).on("mouseenter",".ai1ec-tooltip-trigger",n.handle_tooltip_over),e(document).on("mouseleave",".ai1ec-tooltip-trigger",n.handle_tooltip_out),e(document).on("mouseleave",".ai1ec-tooltip",n.handle_tooltip_self_out)},u=function(){t(function(){o()})},a=function(){return s};return{start:u,are_event_listeners_attached:a}}),timely.define("external_libs/select2",["jquery_timely"],function(e){(function(e){typeof e.fn.each2=="undefined"&&e.fn.extend({each2:function(t){var n=e([0]),r=-1,i=this.length;while(++r<i&&(n.context=n[0]=this[r])&&t.call(n[0],r,n)!==!1);return this}})})(e),function(e,t){function l(e,t){var n=0,r=t.length;for(;n<r;n+=1)if(c(e,t[n]))return n;return-1}function c(e,n){return e===n?!0:e===t||n===t?!1:e===null||n===null?!1:e.constructor===String?e===n+"":n.constructor===String?n===e+"":!1}function h(t,n){var r,i,s;if(t===null||t.length<1)return[];r=t.split(n);for(i=0,s=r.length;i<s;i+=1)r[i]=e.trim(r[i]);return r}function p(e){return e.outerWidth(!1)-e.width()}function d(n){var r="keyup-change-value";n.bind("keydown",function(){e.data(n,r)===t&&e.data(n,r,n.val())}),n.bind("keyup",function(){var i=e.data(n,r);i!==t&&n.val()!==i&&(e.removeData(n,r),n.trigger("keyup-change"))})}function v(n){n.bind("mousemove",function(n){var r=a;(r===t||r.x!==n.pageX||r.y!==n.pageY)&&e(n.target).trigger("mousemove-filtered",n)})}function m(e,n,r){r=r||t;var i;return function(){var t=arguments;window.clearTimeout(i),i=window.setTimeout(function(){n.apply(r,t)},e)}}function g(e){var t=!1,n;return function(){return t===!1&&(n=e(),t=!0),n}}function y(e,t){var n=m(e,function(e){t.trigger("scroll-debounced",e)});t.bind("scroll",function(e){l(e.target,t.get())>=0&&n(e)})}function b(e){if(e[0]===document.activeElement)return;window.setTimeout(function(){var t=e[0],n=e.val().length,r;e.focus(),t.setSelectionRange?t.setSelectionRange(n,n):t.createTextRange&&(r=t.createTextRange(),r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",n),r.select())},0)}function w(e){e.preventDefault(),e.stopPropagation()}function E(e){e.preventDefault(),e.stopImmediatePropagation()}function S(t){if(!u){var n=t[0].currentStyle||window.getComputedStyle(t[0],null);u=e(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:n.fontSize,fontFamily:n.fontFamily,fontStyle:n.fontStyle,fontWeight:n.fontWeight,letterSpacing:n.letterSpacing,textTransform:n.textTransform,whiteSpace:"nowrap"}),u.attr("class","select2-sizer"),e("body").append(u)}return u.text(t.val()),u.width()}function x(t,n,r){var i,s=[],o;i=t.attr("class"),typeof i=="string"&&e(i.split(" ")).each2(function(){this.indexOf("select2-")===0&&s.push(this)}),i=n.attr("class"),typeof i=="string"&&e(i.split(" ")).each2(function(){this.indexOf("select2-")!==0&&(o=r(this),typeof o=="string"&&o.length>0&&s.push(this))}),t.attr("class",s.join(" "))}function T(e,t,n,r){var i=e.toUpperCase().indexOf(t.toUpperCase()),s=t.length;if(i<0){n.push(r(e));return}n.push(r(e.substring(0,i))),n.push("<span class='select2-match'>"),n.push(r(e.substring(i,i+s))),n.push("</span>"),n.push(r(e.substring(i+s,e.length)))}function N(t){var n,r=0,i=null,s=t.quietMillis||100,o=t.url,u=this;return function(a){window.clearTimeout(n),n=window.setTimeout(function(){r+=1;var n=r,s=t.data,f=o,l=t.transport||e.ajax,c=t.type||"GET",h={};s=s?s.call(u,a.term,a.page,a.context):null,f=typeof f=="function"?f.call(u,a.term,a.page,a.context):f,null!==i&&i.abort(),t.params&&(e.isFunction(t.params)?e.extend(h,t.params.call(u)):e.extend(h,t.params)),e.extend(h,{url:f,dataType:t.dataType,data:s,type:c,cache:!1,success:function(e){if(n<r)return;var i=t.results(e,a.page);a.callback(i)}}),i=l.call(u,h)},s)}}function C(t){var n=t,r,i,s=function(e){return""+e.text};e.isArray(n)&&(i=n,n={results:i}),e.isFunction(n)===!1&&(i=n,n=function(){return i});var o=n();return o.text&&(s=o.text,e.isFunction(s)||(r=n.text,s=function(e){return e[r]})),function(t){var r=t.term,i={results:[]},o;if(r===""){t.callback(n());return}o=function(n,i){var u,a;n=n[0];if(n.children){u={};for(a in n)n.hasOwnProperty(a)&&(u[a]=n[a]);u.children=[],e(n.children).each2(function(e,t){o(t,u.children)}),(u.children.length||t.matcher(r,s(u),n))&&i.push(u)}else t.matcher(r,s(n),n)&&i.push(n)},e(n().results).each2(function(e,t){o(t,i.results)}),t.callback(i)}}function k(n){var r=e.isFunction(n);return function(i){var s=i.term,o={results:[]};e(r?n():n).each(function(){var e=this.text!==t,n=e?this.text:this;(s===""||i.matcher(s,n))&&o.results.push(e?this:{id:this,text:this})}),i.callback(o)}}function L(t,n){if(e.isFunction(t))return!0;if(!t)return!1;throw new Error("formatterName must be a function or a falsy value")}function A(t){return e.isFunction(t)?t():t}function O(t){var n=0;return e.each(t,function(e,t){t.children?n+=O(t.children):n++}),n}function M(e,n,r,i){var s=e,o=!1,u,a,f,l,h;if(!i.createSearchChoice||!i.tokenSeparators||i.tokenSeparators.length<1)return t;for(;;){a=-1;for(f=0,l=i.tokenSeparators.length;f<l;f++){h=i.tokenSeparators[f],a=e.indexOf(h);if(a>=0)break}if(a<0)break;u=e.substring(0,a),e=e.substring(a+h.length);if(u.length>0){u=i.createSearchChoice(u,n);if(u!==t&&u!==null&&i.id(u)!==t&&i.id(u)!==null){o=!1;for(f=0,l=n.length;f<l;f++)if(c(i.id(u),i.id(n[f]))){o=!0;break}o||r(u)}}}if(s!==e)return e}function _(t,n){var r=function(){};return r.prototype=new t,r.prototype.constructor=r,r.prototype.parent=t.prototype,r.prototype=e.extend(r.prototype,n),r}var n,r,i,s,o,u,a,f;n={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(e){e=e.which?e.which:e;switch(e){case n.LEFT:case n.RIGHT:case n.UP:case n.DOWN:return!0}return!1},isControl:function(e){var t=e.which;switch(t){case n.SHIFT:case n.CTRL:case n.ALT:return!0}return e.metaKey?!0:!1},isFunctionKey:function(e){return e=e.which?e.which:e,e>=112&&e<=123}},f=e(document),o=function(){var e=1;return function(){return e++}}(),f.bind("mousemove",function(e){a={x:e.pageX,y:e.pageY}}),r=_(Object,{bind:function(e){var t=this;return function(){e.apply(t,arguments)}},init:function(n){var r,i,s=".select2-results",u;this.opts=n=this.prepareOpts(n),this.id=n.id,n.element.data("select2")!==t&&n.element.data("select2")!==null&&this.destroy(),this.enabled=!0,this.container=this.createContainer(),this.containerId="s2id_"+(n.element.attr("id")||"autogen"+o()),this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.body=g(function(){return n.element.closest("body")}),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.css(A(n.containerCss)),this.container.addClass(A(n.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabIndex"),this.opts.element.data("select2",this).addClass("select2-offscreen").bind("focus.select2",function(){e(this).select2("focus")}).attr("tabIndex","-1").before(this.container),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),this.dropdown.addClass(A(n.dropdownCssClass)),this.dropdown.data("select2",this),this.results=r=this.container.find(s),this.search=i=this.container.find("input.select2-input"),i.attr("tabIndex",this.elementTabIndex),this.resultsPage=0,this.context=null,this.initContainer(),v(this.results),this.dropdown.delegate(s,"mousemove-filtered touchstart touchmove touchend",this.bind(this.highlightUnderEvent)),y(80,this.results),this.dropdown.delegate(s,"scroll-debounced",this.bind(this.loadMoreIfNeeded)),e.fn.mousewheel&&r.mousewheel(function(e,t,n,i){var s=r.scrollTop(),o;i>0&&s-i<=0?(r.scrollTop(0),w(e)):i<0&&r.get(0).scrollHeight-r.scrollTop()+i<=r.height()&&(r.scrollTop(r.get(0).scrollHeight-r.height()),w(e))}),d(i),i.bind("keyup-change input paste",this.bind(this.updateResults)),i.bind("focus",function(){i.addClass("select2-focused")}),i.bind("blur",function(){i.removeClass("select2-focused")}),this.dropdown.delegate(s,"mouseup",this.bind(function(t){e(t.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(t),this.selectHighlighted(t))})),this.dropdown.bind("click mouseup mousedown",function(e){e.stopPropagation()}),e.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),(n.element.is(":disabled")||n.element.is("[readonly='readonly']"))&&this.disable()},destroy:function(){var e=this.opts.element.data("select2");this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),e!==t&&(e.container.remove(),e.dropdown.remove(),e.opts.element.removeClass("select2-offscreen").removeData("select2").unbind(".select2").attr({tabIndex:this.elementTabIndex}).show())},prepareOpts:function(n){var r,i,s,o;r=n.element,r.get(0).tagName.toLowerCase()==="select"&&(this.select=i=n.element),i&&e.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in n)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),n=e.extend({},{populateResults:function(r,i,s){var o,u,a,f,l=this.opts.id,c=this;o=function(r,i,u){var a,f,h,p,d,v,m,g,y,b;r=n.sortResults(r,i,s);for(a=0,f=r.length;a<f;a+=1)h=r[a],d=h.disabled===!0,p=!d&&l(h)!==t,v=h.children&&h.children.length>0,m=e("<li></li>"),m.addClass("select2-results-dept-"+u),m.addClass("select2-result"),m.addClass(p?"select2-result-selectable":"select2-result-unselectable"),d&&m.addClass("select2-disabled"),v&&m.addClass("select2-result-with-children"),m.addClass(c.opts.formatResultCssClass(h)),g=e(document.createElement("div")),g.addClass("select2-result-label"),b=n.formatResult(h,g,s,c.opts.escapeMarkup),b!==t&&g.html(b),m.append(g),v&&(y=e("<ul></ul>"),y.addClass("select2-result-sub"),o(h.children,y,u+1),m.append(y)),m.data("select2-data",h),i.append(m)},o(i,r,0)}},e.fn.select2.defaults,n),typeof n.id!="function"&&(s=n.id,n.id=function(e){return e[s]});if(e.isArray(n.element.data("select2Tags"))){if("tags"in n)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+n.element.attr("id");n.tags=n.element.attr("data-select2-tags")}i?(n.query=this.bind(function(n){var i={results:[],more:!1},s=n.term,o,u,a;a=function(e,t){var r;e.is("option")?n.matcher(s,e.text(),e)&&t.push({id:e.attr("value"),text:e.text(),element:e.get(),css:e.attr("class"),disabled:c(e.attr("disabled"),"disabled")}):e.is("optgroup")&&(r={text:e.attr("label"),children:[],element:e.get(),css:e.attr("class")},e.children().each2(function(e,t){a(t,r.children)}),r.children.length>0&&t.push(r))},o=r.children(),this.getPlaceholder()!==t&&o.length>0&&(u=o[0],e(u).text()===""&&(o=o.not(u))),o.each2(function(e,t){a(t,i.results)}),n.callback(i)}),n.id=function(e){return e.id},n.formatResultCssClass=function(e){return e.css}):"query"in n||("ajax"in n?(o=n.element.data("ajax-url"),o&&o.length>0&&(n.ajax.url=o),n.query=N.call(n.element,n.ajax)):"data"in n?n.query=C(n.data):"tags"in n&&(n.query=k(n.tags),n.createSearchChoice===t&&(n.createSearchChoice=function(e){return{id:e,text:e}}),n.initSelection===t&&(n.initSelection=function(t,r){var i=[];e(h(t.val(),n.separator)).each(function(){var t=this,r=this,s=n.tags;e.isFunction(s)&&(s=s()),e(s).each(function(){if(c(this.id,t))return r=this.text,!1}),i.push({id:t,text:r})}),r(i)})));if(typeof n.query!="function")throw"query function not defined for Select2 "+n.element.attr("id");return n},monitorSource:function(){var e=this.opts.element,t;e.bind("change.select2",this.bind(function(e){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),t=this.bind(function(){var e,t,n=this;e=this.opts.element.attr("disabled")!=="disabled",t=this.opts.element.attr("readonly")==="readonly",e=e&&!t,this.enabled!==e&&(e?this.enable():this.disable()),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(A(this.opts.containerCssClass)),x(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(A(this.opts.dropdownCssClass))}),e.bind("propertychange.select2 DOMAttrModified.select2",t),typeof WebKitMutationObserver!="undefined"&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new WebKitMutationObserver(function(e){e.forEach(t)}),this.propertyObserver.observe(e.get(0),{attributes:!0,subtree:!1}))},triggerChange:function(t){t=t||{},t=e.extend({},t,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(t),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},enable:function(){if(this.enabled)return;this.enabled=!0,this.container.removeClass("select2-container-disabled"),this.opts.element.removeAttr("disabled")},disable:function(){if(!this.enabled)return;this.close(),this.enabled=!1,this.container.addClass("select2-container-disabled"),this.opts.element.attr("disabled","disabled")},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var t=this.container.offset(),n=this.container.outerHeight(!1),r=this.container.outerWidth(!1),i=this.dropdown.outerHeight(!1),s=e(window).scrollLeft()+e(window).width(),o=e(window).scrollTop()+e(window).height(),u=t.top+n,a=t.left,f=u+i<=o,l=t.top-i>=this.body().scrollTop(),c=this.dropdown.outerWidth(!1),h=a+c<=s,p=this.dropdown.hasClass("select2-drop-above"),d,v,m;this.body().css("position")!=="static"&&(d=this.body().offset(),u-=d.top,a-=d.left),p?(v=!0,!l&&f&&(v=!1)):(v=!1,!f&&l&&(v=!0)),h||(a=t.left+r-c),v?(u=t.top-i,this.container.addClass("select2-drop-above"),this.dropdown.addClass("select2-drop-above")):(this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")),m=e.extend({top:u,left:a,width:r},A(this.opts.dropdownCss)),this.dropdown.css(m)},shouldOpen:function(){var t;return this.opened()?!1:(t=e.Event("opening"),this.opts.element.trigger(t),!t.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(window.setTimeout(this.bind(this.opening),1),!0):!1},opening:function(){var t=this.containerId,n="scroll."+t,r="resize."+t,i="orientationchange."+t,s;this.clearDropdownAlignmentPreference(),this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.dropdown[0]!==this.body().children().last()[0]&&this.dropdown.detach().appendTo(this.body()),this.updateResults(!0),s=e("#select2-drop-mask"),s.length==0&&(s=e(document.createElement("div")),s.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),s.hide(),s.appendTo(this.body()),s.bind("mousedown touchstart",function(t){var n=e("#select2-drop"),r;n.length>0&&(r=n.data("select2"),r.opts.selectOnBlur&&r.selectHighlighted({noFocus:!0}),r.close())})),this.dropdown.prev()[0]!==s[0]&&this.dropdown.before(s),e("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),s.css({width:document.documentElement.scrollWidth,height:document.documentElement.scrollHeight}),s.show(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active"),this.ensureHighlightVisible();var o=this;this.container.parents().add(window).each(function(){e(this).bind(r+" "+n+" "+i,function(t){e("#select2-drop-mask").css({width:document.documentElement.scrollWidth,height:document.documentElement.scrollHeight}),o.positionDropdown()})}),this.focusSearch()},close:function(){if(!this.opened())return;var t=this.containerId,n="scroll."+t,r="resize."+t,i="orientationchange."+t;this.container.parents().add(window).each(function(){e(this).unbind(n).unbind(r).unbind(i)}),this.clearDropdownAlignmentPreference(),e("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open"),this.results.empty(),this.clearSearch(),this.opts.element.trigger(e.Event("close"))},clearSearch:function(){},getMaximumSelectionSize:function(){return A(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var t=this.results,n,r,i,s,o,u,a;r=this.highlight();if(r<0)return;if(r==0){t.scrollTop(0);return}n=this.findHighlightableChoices(),i=e(n[r]),s=i.offset().top+i.outerHeight(!0),r===n.length-1&&(a=t.find("li.select2-more-results"),a.length>0&&(s=a.offset().top+a.outerHeight(!0))),o=t.offset().top+t.outerHeight(!0),s>o&&t.scrollTop(t.scrollTop()+(s-o)),u=i.offset().top-t.offset().top,u<0&&i.css("display")!="none"&&t.scrollTop(t.scrollTop()+u)},findHighlightableChoices:function(){var e=this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)");return this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)")},moveHighlight:function(t){var n=this.findHighlightableChoices(),r=this.highlight();while(r>-1&&r<n.length){r+=t;var i=e(n[r]);if(i.hasClass("select2-result-selectable")&&!i.hasClass("select2-disabled")&&!i.hasClass("select2-selected")){this.highlight(r);break}}},highlight:function(t){var n=this.findHighlightableChoices(),r,i;if(arguments.length===0)return l(n.filter(".select2-highlighted")[0],n.get());t>=n.length&&(t=n.length-1),t<0&&(t=0),this.results.find(".select2-highlighted").removeClass("select2-highlighted"),r=e(n[t]),r.addClass("select2-highlighted"),this.ensureHighlightVisible(),i=r.data("select2-data"),i&&this.opts.element.trigger({type:"highlight",val:this.id(i),choice:i})},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(t){var n=e(t.target).closest(".select2-result-selectable");if(n.length>0&&!n.is(".select2-highlighted")){var r=this.findHighlightableChoices();this.highlight(r.index(n))}else n.length==0&&this.results.find(".select2-highlighted").removeClass("select2-highlighted")},loadMoreIfNeeded:function(){var e=this.results,t=e.find("li.select2-more-results"),n,r=-1,i=this.resultsPage+1,s=this,o=this.search.val(),u=this.context;if(t.length===0)return;n=t.offset().top-e.offset().top-e.height(),n<=this.opts.loadMorePadding&&(t.addClass("select2-active"),this.opts.query({element:this.opts.element,term:o,page:i,context:u,matcher:this.opts.matcher,callback:this.bind(function(n){if(!s.opened())return;s.opts.populateResults.call(this,e,n.results,{term:o,page:i,context:u}),n.more===!0?(t.detach().appendTo(e).text(s.opts.formatLoadMore(i+1)),window.setTimeout(function(){s.loadMoreIfNeeded()},10)):t.remove(),s.positionDropdown(),s.resultsPage=i,s.context=n.context})}))},tokenize:function(){},updateResults:function(n){function f(){i.scrollTop(0),r.removeClass("select2-active"),u.positionDropdown()}function l(e){i.html(e),f()}var r=this.search,i=this.results,s=this.opts,o,u=this,a;if(n!==!0&&(this.showSearchInput===!1||!this.opened()))return;r.addClass("select2-active");var h=this.getMaximumSelectionSize();if(h>=1){o=this.data();if(e.isArray(o)&&o.length>=h&&L(s.formatSelectionTooBig,"formatSelectionTooBig")){l("<li class='select2-selection-limit'>"+s.formatSelectionTooBig(h)+"</li>");return}}if(r.val().length<s.minimumInputLength){L(s.formatInputTooShort,"formatInputTooShort")?l("<li class='select2-no-results'>"+s.formatInputTooShort(r.val(),s.minimumInputLength)+"</li>"):l("");return}s.formatSearching()&&n===!0&&l("<li class='select2-searching'>"+s.formatSearching()+"</li>");if(s.maximumInputLength&&r.val().length>s.maximumInputLength){L(s.formatInputTooLong,"formatInputTooLong")?l("<li class='select2-no-results'>"+s.formatInputTooLong(r.val(),s.maximumInputLength)+"</li>"):l("");return}a=this.tokenize(),a!=t&&a!=null&&r.val(a),this.resultsPage=1,s.query({element:s.element,term:r.val(),page:this.resultsPage,context:null,matcher:s.matcher,callback:this.bind(function(o){var a;if(!this.opened())return;this.context=o.context===t?null:o.context,this.opts.createSearchChoice&&r.val()!==""&&(a=this.opts.createSearchChoice.call(null,r.val(),o.results),a!==t&&a!==null&&u.id(a)!==t&&u.id(a)!==null&&e(o.results).filter(function(){return c(u.id(this),u.id(a))}).length===0&&o.results.unshift(a));if(o.results.length===0&&L(s.formatNoMatches,"formatNoMatches")){l("<li class='select2-no-results'>"+s.formatNoMatches(r.val())+"</li>");return}i.empty(),u.opts.populateResults.call(this,i,o.results,{term:r.val(),page:this.resultsPage,context:null}),o.more===!0&&L(s.formatLoadMore,"formatLoadMore")&&(i.append("<li class='select2-more-results'>"+u.opts.escapeMarkup(s.formatLoadMore(this.resultsPage))+"</li>"),window.setTimeout(function(){u.loadMoreIfNeeded()},10)),this.postprocessResults(o,n),f()})})},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){b(this.search)},selectHighlighted:function(e){var t=this.highlight(),n=this.results.find(".select2-highlighted"),r=n.closest(".select2-result").data("select2-data");r&&(this.highlight(t),this.onSelect(r,e))},getPlaceholder:function(){return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder},initContainerWidth:function(){function n(){var n,r,i,s,o;if(this.opts.width==="off")return null;if(this.opts.width==="element")return this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px";if(this.opts.width==="copy"||this.opts.width==="resolve"){n=this.opts.element.attr("style");if(n!==t){r=n.split(";");for(s=0,o=r.length;s<o;s+=1){i=r[s].replace(/\s/g,"").match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/);if(i!==null&&i.length>=1)return i[1]}}return this.opts.width==="resolve"?(n=this.opts.element.css("width"),n.indexOf("%")>0?n:this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px"):null}return e.isFunction(this.opts.width)?this.opts.width():this.opts.width}var r=n.call(this);r!==null&&this.container.css("width",r)}}),i=_(r,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' onclick='return false;' class='select2-choice' tabindex='-1'>"," <span></span><abbr class='select2-search-choice-close' style='display:none;'></abbr>"," <div><b></b></div>","</a>","<input class='select2-focusser select2-offscreen' type='text'/>","<div class='select2-drop' style='display:none'>"," <div class='select2-search'>"," <input type='text' autocomplete='off' class='select2-input'/>"," </div>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return t},disable:function(){if(!this.enabled)return;this.parent.disable.apply(this,arguments),this.focusser.attr("disabled","disabled")},enable:function(){if(this.enabled)return;this.parent.enable.apply(this,arguments),this.focusser.removeAttr("disabled")},opening:function(){this.parent.opening.apply(this,arguments),this.focusser.attr("disabled","disabled"),this.opts.element.trigger(e.Event("open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments),this.focusser.removeAttr("disabled"),b(this.focusser)},focus:function(){this.opened()?this.close():(this.focusser.removeAttr("disabled"),this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.removeAttr("disabled"),this.focusser.focus()},initContainer:function(){var e,t=this.container,r=this.dropdown,i=!1;this.showSearch(this.opts.minimumResultsForSearch>=0),this.selection=e=t.find(".select2-choice"),this.focusser=t.find(".select2-focusser"),this.search.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.PAGE_UP||e.which===n.PAGE_DOWN){w(e);return}switch(e.which){case n.UP:case n.DOWN:this.moveHighlight(e.which===n.UP?-1:1),w(e);return;case n.TAB:case n.ENTER:this.selectHighlighted(),w(e);return;case n.ESC:this.cancel(e),w(e);return}})),this.focusser.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.TAB||n.isControl(e)||n.isFunctionKey(e)||e.which===n.ESC)return;if(this.opts.openOnEnter===!1&&e.which===n.ENTER){w(e);return}if(e.which==n.DOWN||e.which==n.UP||e.which==n.ENTER&&this.opts.openOnEnter){this.open(),w(e);return}if(e.which==n.DELETE||e.which==n.BACKSPACE){this.opts.allowClear&&this.clear(),w(e);return}})),d(this.focusser),this.focusser.bind("keyup-change input",this.bind(function(e){if(this.opened())return;this.open(),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.focusser.val(""),w(e)})),e.delegate("abbr","mousedown",this.bind(function(e){if(!this.enabled)return;this.clear(),E(e),this.close(),this.selection.focus()})),e.bind("mousedown",this.bind(function(e){i=!0,this.opened()?this.close():this.enabled&&this.open(),w(e),i=!1})),r.bind("mousedown",this.bind(function(){this.search.focus()})),e.bind("focus",this.bind(function(e){w(e)})),this.focusser.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})).bind("blur",this.bind(function(){this.opened()||this.container.removeClass("select2-container-active")})),this.search.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.setPlaceholder()},clear:function(){var e=this.selection.data("select2-data");this.opts.element.val(""),this.selection.find("span").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),this.opts.element.trigger({type:"removed",val:this.id(e),choice:e}),this.triggerChange({removed:e})},initSelection:function(){var e;if(this.opts.element.val()===""&&this.opts.element.text()==="")this.close(),this.setPlaceholder();else{var n=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==t&&e!==null&&(n.updateSelection(e),n.close(),n.setPlaceholder())})}},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments);return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(t,n){var r=t.find(":selected");e.isFunction(n)&&n({id:r.attr("value"),text:r.text(),element:r})}:"data"in t&&(t.initSelection=t.initSelection||function(n,r){var i=n.val();t.query({matcher:function(e,n,r){return c(i,t.id(r))},callback:e.isFunction(r)?function(e){r(e.results.length?e.results[0]:null)}:e.noop})}),t},getPlaceholder:function(){return this.select&&this.select.find("option").first().text()!==""?t:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var e=this.getPlaceholder();if(this.opts.element.val()===""&&e!==t){if(this.select&&this.select.find("option:first").text()!=="")return;this.selection.find("span").html(this.opts.escapeMarkup(e)),this.selection.addClass("select2-default"),this.selection.find("abbr").hide()}},postprocessResults:function(e,t){var n=0,r=this,i=!0;this.findHighlightableChoices().each2(function(e,t){if(c(r.id(t.data("select2-data")),r.opts.element.val()))return n=e,!1}),this.highlight(n);if(t===!0){var s=this.opts.minimumResultsForSearch;i=s<0?!1:O(e.results)>=s,this.showSearch(i)}},showSearch:function(t){this.showSearchInput=t,this.dropdown.find(".select2-search")[t?"removeClass":"addClass"]("select2-search-hidden"),e(this.dropdown,this.container)[t?"addClass":"removeClass"]("select2-with-searchbox")},onSelect:function(e,t){var n=this.opts.element.val();this.opts.element.val(this.id(e)),this.updateSelection(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),this.close(),(!t||!t.noFocus)&&this.selection.focus(),c(n,this.id(e))||this.triggerChange()},updateSelection:function(e){var n=this.selection.find("span"),r;this.selection.data("select2-data",e),n.empty(),r=this.opts.formatSelection(e,n),r!==t&&n.append(this.opts.escapeMarkup(r)),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==t&&this.selection.find("abbr").show()},val:function(){var e,n=!1,r=null,i=this;if(arguments.length===0)return this.opts.element.val();e=arguments[0],arguments.length>1&&(n=arguments[1]);if(this.select)this.select.val(e).find(":selected").each2(function(e,t){return r={id:t.attr("value"),text:t.text()},!1}),this.updateSelection(r),this.setPlaceholder(),n&&this.triggerChange();else{if(this.opts.initSelection===t)throw new Error("cannot call val() if initSelection() is not defined");if(!e&&e!==0){this.clear(),n&&this.triggerChange();return}this.opts.element.val(e),this.opts.initSelection(this.opts.element,function(e){i.opts.element.val(e?i.id(e):""),i.updateSelection(e),i.setPlaceholder(),n&&i.triggerChange()})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(e){var n;if(arguments.length===0)return n=this.selection.data("select2-data"),n==t&&(n=null),n;!e||e===""?this.clear():(this.opts.element.val(e?this.id(e):""),this.updateSelection(e))}}),s=_(r,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html([" <ul class='select2-choices'>"," <li class='select2-search-field'>"," <input type='text' autocomplete='off' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi' style='display:none;'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return t},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments);return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(e,t){var n=[];e.find(":selected").each2(function(e,t){n.push({id:t.attr("value"),text:t.text(),element:t[0]})}),t(n)}:"data"in t&&(t.initSelection=t.initSelection||function(n,r){var i=h(n.val(),t.separator);t.query({matcher:function(n,r,s){return e.grep(i,function(e){return c(e,t.id(s))}).length},callback:e.isFunction(r)?function(e){r(e.results)}:e.noop})}),t},initContainer:function(){var t=".select2-choices",r;this.searchContainer=this.container.find(".select2-search-field"),this.selection=r=this.container.find(t),this.search.bind("input paste",this.bind(function(){if(!this.enabled)return;this.opened()||this.open()})),this.search.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.BACKSPACE&&this.search.val()===""){this.close();var t,i=r.find(".select2-search-choice-focus");if(i.length>0){this.unselect(i.first()),this.search.width(10),w(e);return}t=r.find(".select2-search-choice:not(.select2-locked)"),t.length>0&&t.last().addClass("select2-search-choice-focus")}else r.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");if(this.opened())switch(e.which){case n.UP:case n.DOWN:this.moveHighlight(e.which===n.UP?-1:1),w(e);return;case n.ENTER:case n.TAB:this.selectHighlighted(),w(e);return;case n.ESC:this.cancel(e),w(e);return}if(e.which===n.TAB||n.isControl(e)||n.isFunctionKey(e)||e.which===n.BACKSPACE||e.which===n.ESC)return;if(e.which===n.ENTER){if(this.opts.openOnEnter===!1)return;if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return}this.open(),(e.which===n.PAGE_UP||e.which===n.PAGE_DOWN)&&w(e)})),this.search.bind("keyup",this.bind(this.resizeSearch)),this.search.bind("blur",this.bind(function(e){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.opened()||this.clearSearch(),e.stopImmediatePropagation()})),this.container.delegate(t,"mousedown",this.bind(function(t){if(!this.enabled)return;if(e(t.target).closest(".select2-search-choice").length>0)return;this.clearPlaceholder(),this.open(),this.focusSearch(),t.preventDefault()})),this.container.delegate(t,"focus",this.bind(function(){if(!this.enabled)return;this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder()})),this.initContainerWidth(),this.clearSearch()},enable:function(){if(this.enabled)return;this.parent.enable.apply(this,arguments),this.search.removeAttr("disabled")},disable:function(){if(!this.enabled)return;this.parent.disable.apply(this,arguments),this.search.attr("disabled",!0)},initSelection:function(){var e;this.opts.element.val()===""&&this.opts.element.text()===""&&(this.updateSelection([]),this.close(),this.clearSearch());if(this.select||this.opts.element.val()!==""){var n=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==t&&e!==null&&(n.updateSelection(e),n.close(),n.clearSearch())})}},clearSearch:function(){var e=this.getPlaceholder();e!==t&&this.getVal().length===0&&this.search.hasClass("select2-focused")===!1?(this.search.val(e).addClass("select2-default"),this.resizeSearch()):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.parent.opening.apply(this,arguments),this.clearPlaceholder(),this.resizeSearch(),this.focusSearch(),this.opts.element.trigger(e.Event("open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus(),this.opts.element.triggerHandler("focus")},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(t){var n=[],r=[],i=this;e(t).each(function(){l(i.id(this),n)<0&&(n.push(i.id(this)),r.push(this))}),t=r,this.selection.find(".select2-search-choice").remove(),e(t).each(function(){i.addSelectedChoice(this)}),i.postprocessResults()},tokenize:function(){var e=this.search.val();e=this.opts.tokenizer(e,this.data(),this.bind(this.onSelect),this.opts),e!=null&&e!=t&&(this.search.val(e),e.length>0&&this.open())},onSelect:function(e,t){this.addSelectedChoice(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.val().length>=this.getMaximumSelectionSize()&&this.updateResults(!0),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:e}),(!t||!t.noFocus)&&this.focusSearch()},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(n){var r=!n.locked,i=e("<li class='select2-search-choice'> <div></div> <a href='#' onclick='return false;' class='select2-search-choice-close' tabindex='-1'></a></li>"),s=e("<li class='select2-search-choice select2-locked'><div></div></li>"),o=r?i:s,u=this.id(n),a=this.getVal(),f;f=this.opts.formatSelection(n,o.find("div")),f!=t&&o.find("div").replaceWith("<div>"+this.opts.escapeMarkup(f)+"</div>"),r&&o.find(".select2-search-choice-close").bind("mousedown",w).bind("click dblclick",this.bind(function(t){if(!this.enabled)return;e(t.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(e(t.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),this.close(),this.focusSearch()})).dequeue(),w(t)})).bind("focus",this.bind(function(){if(!this.enabled)return;this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active")})),o.data("select2-data",n),o.insertBefore(this.searchContainer),a.push(u),this.setVal(a)},unselect:function(e){var t=this.getVal(),n,r;e=e.closest(".select2-search-choice");if(e.length===0)throw"Invalid argument: "+e+". Must be .select2-search-choice";n=e.data("select2-data");if(!n)return;r=l(this.id(n),t),r>=0&&(t.splice(r,1),this.setVal(t),this.select&&this.postprocessResults()),e.remove(),this.opts.element.trigger({type:"removed",val:this.id(n),choice:n}),this.triggerChange({removed:n})},postprocessResults:function(){var e=this.getVal(),t=this.results.find(".select2-result"),n=this.results.find(".select2-result-with-children"),r=this;t.each2(function(t,n){var i=r.id(n.data("select2-data"));l(i,e)>=0&&(n.addClass("select2-selected"),n.find(".select2-result-selectable").addClass("select2-selected"))}),n.each2(function(e,t){!t.is(".select2-result-selectable")&&t.find(".select2-result-selectable:not(.select2-selected)").length===0&&t.addClass("select2-selected")}),this.highlight()==-1&&r.highlight(0)},resizeSearch:function(){var e,t,n,r,i,s=p(this.search);e=S(this.search)+10,t=this.search.offset().left,n=this.selection.width(),r=this.selection.offset().left,i=n-(t-r)-s,i<e&&(i=n-s),i<40&&(i=n-s),i<=0&&(i=e),this.search.width(i)},getVal:function(){var e;return this.select?(e=this.select.val(),e===null?[]:e):(e=this.opts.element.val(),h(e,this.opts.separator))},setVal:function(t){var n;this.select?this.select.val(t):(n=[],e(t).each(function(){l(this,n)<0&&n.push(this)}),this.opts.element.val(n.length===0?"":n.join(this.opts.separator)))},val:function(){var n,r=!1,i=[],s=this;if(arguments.length===0)return this.getVal();n=arguments[0],arguments.length>1&&(r=arguments[1]);if(!n&&n!==0){this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),r&&this.triggerChange();return}this.setVal(n);if(this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),r&&this.triggerChange();else{if(this.opts.initSelection===t)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(t){var n=e(t).map(s.id);s.setVal(n),s.updateSelection(t),s.clearSearch(),r&&s.triggerChange()})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var t=[],n=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){t.push(n.opts.id(e(this).data("select2-data")))}),this.setVal(t),this.triggerChange()},data:function(t){var n=this,r;if(arguments.length===0)return this.selection.find(".select2-search-choice").map(function(){return e(this).data("select2-data")}).get();t||(t=[]),r=e.map(t,function(e){return n.opts.id(e)}),this.setVal(r),this.updateSelection(t),this.clearSearch()}}),e.fn.select2=function(){var n=Array.prototype.slice.call(arguments,0),r,o,u,a,f=["val","destroy","opened","open","close","focus","isFocused","container","onSortStart","onSortEnd","enable","disable","positionDropdown","data"];return this.each(function(){if(n.length===0||typeof n[0]=="object")r=n.length===0?{}:e.extend({},n[0]),r.element=e(this),r.element.get(0).tagName.toLowerCase()==="select"?a=r.element.attr("multiple"):(a=r.multiple||!1,"tags"in r&&(r.multiple=a=!0)),o=a?new s:new i,o.init(r);else{if(typeof n[0]!="string")throw"Invalid arguments to select2 plugin: "+n;if(l(n[0],f)<0)throw"Unknown method: "+n[0];u=t,o=e(this).data("select2");if(o===t)return;n[0]==="container"?u=o.container:u=o[n[0]].apply(o,n.slice(1));if(u!==t)return!1}}),u===t?this:u},e.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(e,t,n,r){var i=[];return T(e.text,n.term,i,r),i.join("")},formatSelection:function(e,n){return e?e.text:t},sortResults:function(e,t,n){return e},formatResultCssClass:function(e){return t},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(e,t){var n=t-e.length;return"Please enter "+n+" more character"+(n==1?"":"s")},formatInputTooLong:function(e,t){var n=e.length-t;return"Please enter "+n+" less character"+(n==1?"":"s")},formatSelectionTooBig:function(e){return"You can only select "+e+" item"+(e==1?"":"s")},formatLoadMore:function(e){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(e){return e.id},matcher:function(e,t){return t.toUpperCase().indexOf(e.toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:M,escapeMarkup:function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(e).replace(/[&<>"'/\\]/g,function(e){return t[e[0]]})},blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(e){return e},adaptDropdownCssClass:function(e){return null}}}(e)}),timely.define("libs/select2_multiselect_helper",["jquery_timely","external_libs/select2"],function(e){var t=function(t){var n=e(t.element),r=n.data("color"),i=n.data("description"),s="";return typeof r!="undefined"&&r!==""&&(s+='<span class="ai1ec-color-swatch" style="background: '+n.data("color")+'"></span> '),s+=t.text,s='<span title="'+i+'">'+s+"</span>",s},n=function(t){var n=e(t.element),r=n.data("color"),i=n.data("description"),s="";return typeof r!="undefined"&&r!==""?s+='<span class="ai1ec-color-swatch" style="background: '+n.data("color")+'"></span> ':s+='<span class="ai1ec-color-swatch-empty"></span> ',s+=t.text,s='<span title="'+i+'">'+s+"</span>",s},r=function(r){typeof r=="undefined"&&(r=e(document)),e(".ai1ec-select2-multiselect-selector",r).select2({allowClear:!0,formatResult:n,formatSelection:t,escapeMarkup:function(e){return e}})},i=function(t){e(".ai1ec-select2-multiselect-selector.select2-container",t).each(function(){e(this).data("select2").resizeSearch()})};return{init:r,refresh:i}}),timely.define("external_libs/jquery_history",["jquery_timely"],function(e){try{(function(t,n){var r=t.History=t.History||{};if(typeof r.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");r.Adapter={bind:function(t,n,r){e(t).bind(n,r)},trigger:function(t,n,r){e(t).trigger(n,r)},extractEventData:function(e,t,r){var i=t&&t.originalEvent&&t.originalEvent[e]||r&&r[e]||n;return i},onDomLoad:function(t){e(t)}},typeof r.init!="undefined"&&r.init()})(window),function(e,t){var n=e.document,r=e.setTimeout||r,i=e.clearTimeout||i,s=e.setInterval||s,o=e.History=e.History||{};if(typeof o.initHtml4!="undefined")throw new Error("History.js HTML4 Support has already been loaded...");o.initHtml4=function(){if(typeof o.initHtml4.initialized!="undefined")return!1;o.initHtml4.initialized=!0,o.enabled=!0,o.savedHashes=[],o.isLastHash=function(e){var t=o.getHashByIndex(),n;return n=e===t,n},o.saveHash=function(e){return o.isLastHash(e)?!1:(o.savedHashes.push(e),!0)},o.getHashByIndex=function(e){var t=null;return typeof e=="undefined"?t=o.savedHashes[o.savedHashes.length-1]:e<0?t=o.savedHashes[o.savedHashes.length+e]:t=o.savedHashes[e],t},o.discardedHashes={},o.discardedStates={},o.discardState=function(e,t,n){var r=o.getHashByState(e),i;return i={discardedState:e,backState:n,forwardState:t},o.discardedStates[r]=i,!0},o.discardHash=function(e,t,n){var r={discardedHash:e,backState:n,forwardState:t};return o.discardedHashes[e]=r,!0},o.discardedState=function(e){var t=o.getHashByState(e),n;return n=o.discardedStates[t]||!1,n},o.discardedHash=function(e){var t=o.discardedHashes[e]||!1;return t},o.recycleState=function(e){var t=o.getHashByState(e);return o.discardedState(e)&&delete o.discardedStates[t],!0},o.emulated.hashChange&&(o.hashChangeInit=function(){o.checkerFunction=null;var t="",r,i,u,a;return o.isInternetExplorer()?(r="historyjs-iframe",i=n.createElement("iframe"),i.setAttribute("id",r),i.style.display="none",n.body.appendChild(i),i.contentWindow.document.open(),i.contentWindow.document.close(),u="",a=!1,o.checkerFunction=function(){if(a)return!1;a=!0;var n=o.getHash()||"",r=o.unescapeHash(i.contentWindow.document.location.hash)||"";return n!==t?(t=n,r!==n&&(u=r=n,i.contentWindow.document.open(),i.contentWindow.document.close(),i.contentWindow.document.location.hash=o.escapeHash(n)),o.Adapter.trigger(e,"hashchange")):r!==u&&(u=r,o.setHash(r,!1)),a=!1,!0}):o.checkerFunction=function(){var n=o.getHash();return n!==t&&(t=n,o.Adapter.trigger(e,"hashchange")),!0},o.intervalList.push(s(o.checkerFunction,o.options.hashChangeInterval)),!0},o.Adapter.onDomLoad(o.hashChangeInit)),o.emulated.pushState&&(o.onHashChange=function(t){var r=t&&t.newURL||n.location.href,i=o.getHashByUrl(r),s=null,u=null,a=null,f;return o.isLastHash(i)?(o.busy(!1),!1):(o.doubleCheckComplete(),o.saveHash(i),i&&o.isTraditionalAnchor(i)?(o.Adapter.trigger(e,"anchorchange"),o.busy(!1),!1):(s=o.extractState(o.getFullUrl(i||n.location.href,!1),!0),o.isLastSavedState(s)?(o.busy(!1),!1):(u=o.getHashByState(s),f=o.discardedState(s),f?(o.getHashByIndex(-2)===o.getHashByState(f.forwardState)?o.back(!1):o.forward(!1),!1):(o.pushState(s.data,s.title,s.url,!1),!0))))},o.Adapter.bind(e,"hashchange",o.onHashChange),o.pushState=function(t,r,i,s){if(o.getHashByUrl(i))throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(s!==!1&&o.busy())return o.pushQueue({scope:o,callback:o.pushState,args:arguments,queue:s}),!1;o.busy(!0);var u=o.createStateObject(t,r,i),a=o.getHashByState(u),f=o.getState(!1),l=o.getHashByState(f),c=o.getHash();return o.storeState(u),o.expectedStateId=u.id,o.recycleState(u),o.setTitle(u),a===l?(o.busy(!1),!1):a!==c&&a!==o.getShortUrl(n.location.href)?(o.setHash(a,!1),!1):(o.saveState(u),o.Adapter.trigger(e,"statechange"),o.busy(!1),!0)},o.replaceState=function(e,t,n,r){if(o.getHashByUrl(n))throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(r!==!1&&o.busy())return o.pushQueue({scope:o,callback:o.replaceState,args:arguments,queue:r}),!1;o.busy(!0);var i=o.createStateObject(e,t,n),s=o.getState(!1),u=o.getStateByIndex(-2);return o.discardState(s,i,u),o.pushState(i.data,i.title,i.url,!1),!0}),o.emulated.pushState&&o.getHash()&&!o.emulated.hashChange&&o.Adapter.onDomLoad(function(){o.Adapter.trigger(e,"hashchange")})},typeof o.init!="undefined"&&o.init()}(window),function(e,t){var n=e.console||t,r=e.document,i=e.navigator,s=e.sessionStorage||!1,o=e.setTimeout,u=e.clearTimeout,a=e.setInterval,f=e.clearInterval,l=e.JSON,c=e.alert,h=e.History=e.History||{},p=e.history;l.stringify=l.stringify||l.encode,l.parse=l.parse||l.decode;if(typeof h.init!="undefined")throw new Error("History.js Core has already been loaded...");h.init=function(){return typeof h.Adapter=="undefined"?!1:(typeof h.initCore!="undefined"&&h.initCore(),typeof h.initHtml4!="undefined"&&h.initHtml4(),!0)},h.initCore=function(){if(typeof h.initCore.initialized!="undefined")return!1;h.initCore.initialized=!0,h.options=h.options||{},h.options.hashChangeInterval=h.options.hashChangeInterval||100,h.options.safariPollInterval=h.options.safariPollInterval||500,h.options.doubleCheckInterval=h.options.doubleCheckInterval||500,h.options.storeInterval=h.options.storeInterval||1e3,h.options.busyDelay=h.options.busyDelay||250,h.options.debug=h.options.debug||!1,h.options.initialTitle=h.options.initialTitle||r.title,h.intervalList=[],h.clearAllIntervals=function(){var e,t=h.intervalList;if(typeof t!="undefined"&&t!==null){for(e=0;e<t.length;e++)f(t[e]);h.intervalList=null}},h.debug=function(){(h.options.debug||!1)&&h.log.apply(h,arguments)},h.log=function(){var e=typeof n!="undefined"&&typeof n.log!="undefined"&&typeof n.log.apply!="undefined",t=r.getElementById("log"),i,s,o,u,a;e?(u=Array.prototype.slice.call(arguments),i=u.shift(),typeof n.debug!="undefined"?n.debug.apply(n,[i,u]):n.log.apply(n,[i,u])):i="\n"+arguments[0]+"\n";for(s=1,o=arguments.length;s<o;++s){a=arguments[s];if(typeof a=="object"&&typeof l!="undefined")try{a=l.stringify(a)}catch(f){}i+="\n"+a+"\n"}return t?(t.value+=i+"\n-----\n",t.scrollTop=t.scrollHeight-t.clientHeight):e||c(i),!0},h.getInternetExplorerMajorVersion=function(){var e=h.getInternetExplorerMajorVersion.cached=typeof h.getInternetExplorerMajorVersion.cached!="undefined"?h.getInternetExplorerMajorVersion.cached:function(){var e=3,t=r.createElement("div"),n=t.getElementsByTagName("i");while((t.innerHTML="<!--[if gt IE "+ ++e+"]><i></i><![endif]-->")&&n[0]);return e>4?e:!1}();return e},h.isInternetExplorer=function(){var e=h.isInternetExplorer.cached=typeof h.isInternetExplorer.cached!="undefined"?h.isInternetExplorer.cached:Boolean(h.getInternetExplorerMajorVersion());return e},h.emulated={pushState:!Boolean(e.history&&e.history.pushState&&e.history.replaceState&&!/ Mobile\/([1-7][a-z]|(8([abcde]|f(1[0-8]))))/i.test(i.userAgent)&&!/AppleWebKit\/5([0-2]|3[0-2])/i.test(i.userAgent)),hashChange:Boolean(!("onhashchange"in e||"onhashchange"in r)||h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8)},h.enabled=!h.emulated.pushState,h.bugs={setHash:Boolean(!h.emulated.pushState&&i.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),safariPoll:Boolean(!h.emulated.pushState&&i.vendor==="Apple Computer, Inc."&&/AppleWebKit\/5([0-2]|3[0-3])/.test(i.userAgent)),ieDoubleCheck:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<8),hashEscape:Boolean(h.isInternetExplorer()&&h.getInternetExplorerMajorVersion()<7)},h.isEmptyObject=function(e){for(var t in e)return!1;return!0},h.cloneObject=function(e){var t,n;return e?(t=l.stringify(e),n=l.parse(t)):n={},n},h.getRootUrl=function(){var e=r.location.protocol+"//"+(r.location.hostname||r.location.host);if(r.location.port||!1)e+=":"+r.location.port;return e+="/",e},h.getBaseHref=function(){var e=r.getElementsByTagName("base"),t=null,n="";return e.length===1&&(t=e[0],n=t.href.replace(/[^\/]+$/,"")),n=n.replace(/\/+$/,""),n&&(n+="/"),n},h.getBaseUrl=function(){var e=h.getBaseHref()||h.getBasePageUrl()||h.getRootUrl();return e},h.getPageUrl=function(){var e=h.getState(!1,!1),t=(e||{}).url||r.location.href,n;return n=t.replace(/\/+$/,"").replace(/[^\/]+$/,function(e,t,n){return/\./.test(e)?e:e+"/"}),n},h.getBasePageUrl=function(){var e=r.location.href.replace(/[#\?].*/,"").replace(/[^\/]+$/,function(e,t,n){return/[^\/]$/.test(e)?"":e}).replace(/\/+$/,"")+"/";return e},h.getFullUrl=function(e,t){var n=e,r=e.substring(0,1);return t=typeof t=="undefined"?!0:t,/[a-z]+\:\/\//.test(e)||(r==="/"?n=h.getRootUrl()+e.replace(/^\/+/,""):r==="#"?n=h.getPageUrl().replace(/#.*/,"")+e:r==="?"?n=h.getPageUrl().replace(/[\?#].*/,"")+e:t?n=h.getBaseUrl()+e.replace(/^(\.\/)+/,""):n=h.getBasePageUrl()+e.replace(/^(\.\/)+/,"")),n.replace(/\#$/,"")},h.getShortUrl=function(e){var t=e,n=h.getBaseUrl(),r=h.getRootUrl();return h.emulated.pushState&&(t=t.replace(n,"")),t=t.replace(r,"/"),h.isTraditionalAnchor(t)&&(t="./"+t),t=t.replace(/^(\.\/)+/g,"./").replace(/\#$/,""),t},h.store={},h.idToState=h.idToState||{},h.stateToId=h.stateToId||{},h.urlToId=h.urlToId||{},h.storedStates=h.storedStates||[],h.savedStates=h.savedStates||[],h.normalizeStore=function(){h.store.idToState=h.store.idToState||{},h.store.urlToId=h.store.urlToId||{},h.store.stateToId=h.store.stateToId||{}},h.getState=function(e,t){typeof e=="undefined"&&(e=!0),typeof t=="undefined"&&(t=!0);var n=h.getLastSavedState();return!n&&t&&(n=h.createStateObject()),e&&(n=h.cloneObject(n),n.url=n.cleanUrl||n.url),n},h.getIdByState=function(e){var t=h.extractId(e.url),n;if(!t){n=h.getStateString(e);if(typeof h.stateToId[n]!="undefined")t=h.stateToId[n];else if(typeof h.store.stateToId[n]!="undefined")t=h.store.stateToId[n];else{for(;;){t=(new Date).getTime()+String(Math.random()).replace(/\D/g,"");if(typeof h.idToState[t]=="undefined"&&typeof h.store.idToState[t]=="undefined")break}h.stateToId[n]=t,h.idToState[t]=e}}return t},h.normalizeState=function(e){var t,n;if(!e||typeof e!="object")e={};if(typeof e.normalized!="undefined")return e;if(!e.data||typeof e.data!="object")e.data={};t={},t.normalized=!0,t.title=e.title||"",t.url=h.getFullUrl(h.unescapeString(e.url||r.location.href)),t.hash=h.getShortUrl(t.url),t.data=h.cloneObject(e.data),t.id=h.getIdByState(t),t.cleanUrl=t.url.replace(/\??\&_suid.*/,""),t.url=t.cleanUrl,n=!h.isEmptyObject(t.data);if(t.title||n)t.hash=h.getShortUrl(t.url).replace(/\??\&_suid.*/,""),/\?/.test(t.hash)||(t.hash+="?"),t.hash+="&_suid="+t.id;return t.hashedUrl=h.getFullUrl(t.hash),(h.emulated.pushState||h.bugs.safariPoll)&&h.hasUrlDuplicate(t)&&(t.url=t.hashedUrl),t},h.createStateObject=function(e,t,n){var r={data:e,title:t,url:n};return r=h.normalizeState(r),r},h.getStateById=function(e){e=String(e);var n=h.idToState[e]||h.store.idToState[e]||t;return n},h.getStateString=function(e){var t,n,r;return t=h.normalizeState(e),n={data:t.data,title:e.title,url:e.url},r=l.stringify(n),r},h.getStateId=function(e){var t,n;return t=h.normalizeState(e),n=t.id,n},h.getHashByState=function(e){var t,n;return t=h.normalizeState(e),n=t.hash,n},h.extractId=function(e){var t,n,r;return n=/(.*)\&_suid=([0-9]+)$/.exec(e),r=n?n[1]||e:e,t=n?String(n[2]||""):"",t||!1},h.isTraditionalAnchor=function(e){var t=!/[\/\?\.]/.test(e);return t},h.extractState=function(e,t){var n=null,r,i;return t=t||!1,r=h.extractId(e),r&&(n=h.getStateById(r)),n||(i=h.getFullUrl(e),r=h.getIdByUrl(i)||!1,r&&(n=h.getStateById(r)),!n&&t&&!h.isTraditionalAnchor(e)&&(n=h.createStateObject(null,null,i))),n},h.getIdByUrl=function(e){var n=h.urlToId[e]||h.store.urlToId[e]||t;return n},h.getLastSavedState=function(){return h.savedStates[h.savedStates.length-1]||t},h.getLastStoredState=function(){return h.storedStates[h.storedStates.length-1]||t},h.hasUrlDuplicate=function(e){var t=!1,n;return n=h.extractState(e.url),t=n&&n.id!==e.id,t},h.storeState=function(e){return h.urlToId[e.url]=e.id,h.storedStates.push(h.cloneObject(e)),e},h.isLastSavedState=function(e){var t=!1,n,r,i;return h.savedStates.length&&(n=e.id,r=h.getLastSavedState(),i=r.id,t=n===i),t},h.saveState=function(e){return h.isLastSavedState(e)?!1:(h.savedStates.push(h.cloneObject(e)),!0)},h.getStateByIndex=function(e){var t=null;return typeof e=="undefined"?t=h.savedStates[h.savedStates.length-1]:e<0?t=h.savedStates[h.savedStates.length+e]:t=h.savedStates[e],t},h.getHash=function(){var e=h.unescapeHash(r.location.hash);return e},h.unescapeString=function(t){var n=t,r;for(;;){r=e.unescape(n);if(r===n)break;n=r}return n},h.unescapeHash=function(e){var t=h.normalizeHash(e);return t=h.unescapeString(t),t},h.normalizeHash=function(e){var t=e.replace(/[^#]*#/,"").replace(/#.*/,"");return t},h.setHash=function(e,t){var n,i,s;return t!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.setHash,args:arguments,queue:t}),!1):(n=h.escapeHash(e),h.busy(!0),i=h.extractState(e,!0),i&&!h.emulated.pushState?h.pushState(i.data,i.title,i.url,!1):r.location.hash!==n&&(h.bugs.setHash?(s=h.getPageUrl(),h.pushState(null,null,s+"#"+n,!1)):r.location.hash=n),h)},h.escapeHash=function(t){var n=h.normalizeHash(t);return n=e.escape(n),h.bugs.hashEscape||(n=n.replace(/\%21/g,"!").replace(/\%26/g,"&").replace(/\%3D/g,"=").replace(/\%3F/g,"?")),n},h.getHashByUrl=function(e){var t=String(e).replace(/([^#]*)#?([^#]*)#?(.*)/,"$2");return t=h.unescapeHash(t),t},h.setTitle=function(e){var t=e.title,n;t||(n=h.getStateByIndex(0),n&&n.url===e.url&&(t=n.title||h.options.initialTitle));try{r.getElementsByTagName("title")[0].innerHTML=t.replace("<","<").replace(">",">").replace(" & "," & ")}catch(i){}return r.title=t,h},h.queues=[],h.busy=function(e){typeof e!="undefined"?h.busy.flag=e:typeof h.busy.flag=="undefined"&&(h.busy.flag=!1);if(!h.busy.flag){u(h.busy.timeout);var t=function(){var e,n,r;if(h.busy.flag)return;for(e=h.queues.length-1;e>=0;--e){n=h.queues[e];if(n.length===0)continue;r=n.shift(),h.fireQueueItem(r),h.busy.timeout=o(t,h.options.busyDelay)}};h.busy.timeout=o(t,h.options.busyDelay)}return h.busy.flag},h.busy.flag=!1,h.fireQueueItem=function(e){return e.callback.apply(e.scope||h,e.args||[])},h.pushQueue=function(e){return h.queues[e.queue||0]=h.queues[e.queue||0]||[],h.queues[e.queue||0].push(e),h},h.queue=function(e,t){return typeof e=="function"&&(e={callback:e}),typeof t!="undefined"&&(e.queue=t),h.busy()?h.pushQueue(e):h.fireQueueItem(e),h},h.clearQueue=function(){return h.busy.flag=!1,h.queues=[],h},h.stateChanged=!1,h.doubleChecker=!1,h.doubleCheckComplete=function(){return h.stateChanged=!0,h.doubleCheckClear(),h},h.doubleCheckClear=function(){return h.doubleChecker&&(u(h.doubleChecker),h.doubleChecker=!1),h},h.doubleCheck=function(e){return h.stateChanged=!1,h.doubleCheckClear(),h.bugs.ieDoubleCheck&&(h.doubleChecker=o(function(){return h.doubleCheckClear(),h.stateChanged||e(),!0},h.options.doubleCheckInterval)),h},h.safariStatePoll=function(){var t=h.extractState(r.location.href),n;if(!h.isLastSavedState(t))return n=t,n||(n=h.createStateObject()),h.Adapter.trigger(e,"popstate"),h;return},h.back=function(e){return e!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.back,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck(function(){h.back(!1)}),p.go(-1),!0)},h.forward=function(e){return e!==!1&&h.busy()?(h.pushQueue({scope:h,callback:h.forward,args:arguments,queue:e}),!1):(h.busy(!0),h.doubleCheck(function(){h.forward(!1)}),p.go(1),!0)},h.go=function(e,t){var n;if(e>0)for(n=1;n<=e;++n)h.forward(t);else{if(!(e<0))throw new Error("History.go: History.go requires a positive or negative integer passed.");for(n=-1;n>=e;--n)h.back(t)}return h};if(h.emulated.pushState){var d=function(){};h.pushState=h.pushState||d,h.replaceState=h.replaceState||d}else h.onPopState=function(t,n){var i=!1,s=!1,o,u;return h.doubleCheckComplete(),o=h.getHash(),o?(u=h.extractState(o||r.location.href,!0),u?h.replaceState(u.data,u.title,u.url,!1):(h.Adapter.trigger(e,"anchorchange"),h.busy(!1)),h.expectedStateId=!1,!1):(i=h.Adapter.extractEventData("state",t,n)||!1,i?s=h.getStateById(i):h.expectedStateId?s=h.getStateById(h.expectedStateId):s=h.extractState(r.location.href),s||(s=h.createStateObject(null,null,r.location.href)),h.expectedStateId=!1,h.isLastSavedState(s)?(h.busy(!1),!1):(h.storeState(s),h.saveState(s),h.setTitle(s),h.Adapter.trigger(e,"statechange"),h.busy(!1),!0))},h.Adapter.bind(e,"popstate",h.onPopState),h.pushState=function(t,n,r,i){if(h.getHashByUrl(r)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(i!==!1&&h.busy())return h.pushQueue({scope:h,callback:h.pushState,args:arguments,queue:i}),!1;h.busy(!0);var s=h.createStateObject(t,n,r);return h.isLastSavedState(s)?h.busy(!1):(h.storeState(s),h.expectedStateId=s.id,p.pushState(s.id,s.title,s.url),h.Adapter.trigger(e,"popstate")),!0},h.replaceState=function(t,n,r,i){if(h.getHashByUrl(r)&&h.emulated.pushState)throw new Error("History.js does not support states with fragement-identifiers (hashes/anchors).");if(i!==!1&&h.busy())return h.pushQueue({scope:h,callback:h.replaceState,args:arguments,queue:i}),!1;h.busy(!0);var s=h.createStateObject(t,n,r);return h.isLastSavedState(s)?h.busy(!1):(h.storeState(s),h.expectedStateId=s.id,p.replaceState(s.id,s.title,s.url),h.Adapter.trigger(e,"popstate")),!0};if(s){try{h.store=l.parse(s.getItem("History.store"))||{}}catch(v){h.store={}}h.normalizeStore()}else h.store={},h.normalizeStore();h.Adapter.bind(e,"beforeunload",h.clearAllIntervals),h.Adapter.bind(e,"unload",h.clearAllIntervals),h.saveState(h.storeState(h.extractState(r.location.href,!0))),s&&(h.onUnload=function(){var e,t;try{e=l.parse(s.getItem("History.store"))||{}}catch(n){e={}}e.idToState=e.idToState||{},e.urlToId=e.urlToId||{},e.stateToId=e.stateToId||{};for(t in h.idToState){if(!h.idToState.hasOwnProperty(t))continue;e.idToState[t]=h.idToState[t]}for(t in h.urlToId){if(!h.urlToId.hasOwnProperty(t))continue;e.urlToId[t]=h.urlToId[t]}for(t in h.stateToId){if(!h.stateToId.hasOwnProperty(t))continue;e.stateToId[t]=h.stateToId[t]}h.store=e,h.normalizeStore(),s.setItem("History.store",l.stringify(e))},h.intervalList.push(a(h.onUnload,h.options.storeInterval)),h.Adapter.bind(e,"beforeunload",h.onUnload),h.Adapter.bind(e,"unload",h.onUnload));if(!h.emulated.pushState){h.bugs.safariPoll&&h.intervalList.push(a(h.safariStatePoll,h.options.safariPollInterval));if(i.vendor==="Apple Computer, Inc."||(i.appCodeName||"")==="Mozilla")h.Adapter.bind(e,"hashchange",function(){h.Adapter.trigger(e,"popstate")}),h.getHash()&&h.Adapter.onDomLoad(function(){h.Adapter.trigger(e,"hashchange")})}},h.init()}(window)}catch(t){}}),timely.define("external_libs/jquery.tablescroller",["jquery_timely"],function(e){function n(){if(t)return t;var n=e('<div style="width:50px;height:50px;overflow:hidden;position:absolute;top:-200px;left:-200px;"><div style="height:100px;"></div></div>');e("body").append(n);var r=e("div",n).innerWidth();n.css("overflow-y","auto");var i=e("div",n).innerWidth();return e(n).remove(),t=r-i,t}var t=0;e.fn.tableScroll=function(t){if(t=="undo"){var r=e(this).parent().parent();r.hasClass("tablescroll_wrapper")&&(r.find(".tablescroll_head thead").prependTo(this),r.find(".tablescroll_foot tfoot").appendTo(this),r.before(this),r.empty());return}var i=e.extend({},e.fn.tableScroll.defaults,t);return i.scrollbarWidth=n(),this.each(function(){var t=i.flush,n=e(this).addClass("tablescroll_body"),r=e('<div class="tablescroll_wrapper ai1ec-popover-boundary"></div>').insertBefore(n).append(n);r.parent("div").hasClass(i.containerClass)||e("<div></div>").addClass(i.containerClass).insertBefore(r).append(r);var s=i.width?i.width:n.outerWidth(),o=i.scroll?"auto":"hidden";r.css({width:s+"px",height:i.height+"px",overflow:o}),n.css("width",s+"px");var u=r.outerWidth(),a=u-s;r.css({width:s-a-2+"px"}),n.css("width",s-a-i.scrollbarWidth+"px"),n.outerHeight()<=i.height&&(r.css({height:"auto",width:s-a+"px"}),t=!1);var f=e("thead",n).length?!0:!1,l=e("tfoot",n).length?!0:!1,c=e("thead tr:first",n),h=e("tbody tr:first",n),p=e("tfoot tr:first",n),d=0;e("th, td",c).each(function(t){d=e(this).width(),e("th:eq("+t+"), td:eq("+t+")",c).css("width",d+"px"),e("th:eq("+t+"), td:eq("+t+")",h).css("width",d+"px"),l&&e("th:eq("+t+"), td:eq("+t+")",p).css("width",d+"px")});if(f)var v=e('<table class="tablescroll_head" cellspacing="0"></table>').insertBefore(r).prepend(e("thead",n));if(l)var m=e('<table class="tablescroll_foot" cellspacing="0"></table>').insertAfter(r).prepend(e("tfoot",n));v!=undefined&&(v.css("width",s+"px"),t&&(e("tr:first th:last, tr:first td:last",v).css("width",d+i.scrollbarWidth+"px"),v.css("width",r.outerWidth()+"px"))),m!=undefined&&(m.css("width",s+"px"),t&&(e("tr:first th:last, tr:first td:last",m).css("width",d+i.scrollbarWidth+"px"),m.css("width",r.outerWidth()+"px")))}),this},e.fn.tableScroll.defaults={flush:!0,width:null,height:100,containerClass:"tablescroll",scroll:!0}}),timely.define("external_libs/jquery.scrollTo",["jquery_timely"],function(e){function n(e){return typeof e=="object"?e:{top:e,left:e}}var t=e.scrollTo=function(t,n,r){e(window).scrollTo(t,n,r)};t.defaults={axis:"xy",duration:parseFloat(e.fn.jquery)>=1.3?0:1,limit:!0},t.window=function(t){return e(window)._scrollable()},e.fn._scrollable=function(){return this.map(function(){var t=this,n=!t.nodeName||e.inArray(t.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!n)return t;var r=(t.contentWindow||t).document||t.ownerDocument||t;return/webkit/i.test(navigator.userAgent)||r.compatMode=="BackCompat"?r.body:r.documentElement})},e.fn.scrollTo=function(r,i,s){return typeof i=="object"&&(s=i,i=0),typeof s=="function"&&(s={onAfter:s}),r=="max"&&(r=9e9),s=e.extend({},t.defaults,s),i=i||s.duration,s.queue=s.queue&&s.axis.length>1,s.queue&&(i/=2),s.offset=n(s.offset),s.over=n(s.over),this._scrollable().each(function(){function h(e){u.animate(l,i,s.easing,e&&function(){e.call(this,r,s)})}if(r==null)return;var o=this,u=e(o),a=r,f,l={},c=u.is("html,body");switch(typeof a){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(a)){a=n(a);break}a=e(a,this);if(!a.length)return;case"object":if(a.is||a.style)f=(a=e(a)).offset()}e.each(s.axis.split(""),function(e,n){var r=n=="x"?"Left":"Top",i=r.toLowerCase(),p="scroll"+r,d=o[p],v=t.max(o,n);if(f)l[p]=f[i]+(c?0:d-u.offset()[i]),s.margin&&(l[p]-=parseInt(a.css("margin"+r))||0,l[p]-=parseInt(a.css("border"+r+"Width"))||0),l[p]+=s.offset[i]||0,s.over[i]&&(l[p]+=a[n=="x"?"width":"height"]()*s.over[i]);else{var m=a[i];l[p]=m.slice&&m.slice(-1)=="%"?parseFloat(m)/100*v:m}s.limit&&/^\d+$/.test(l[p])&&(l[p]=l[p]<=0?0:Math.min(l[p],v)),!e&&s.queue&&(d!=l[p]&&h(s.onAfterFirst),delete l[p])}),h(s.onAfter)}).end()},t.max=function(t,n){var r=n=="x"?"Width":"Height",i="scroll"+r;if(!e(t).is("html,body"))return t[i]-e(t)[r.toLowerCase()]();var s="client"+r,o=t.ownerDocument.documentElement,u=t.ownerDocument.body;return Math.max(o[i],u[i])-Math.min(o[s],u[s])}}),timely.define("external_libs/locales/bootstrap-datepicker.bg",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.bg={days:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота","Неделя"],daysShort:["Нед","Пон","Вто","Сря","Чет","Пет","Съб","Нед"],daysMin:["Н","П","В","С","Ч","П","С","Н"],months:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],monthsShort:["Ян","Фев","Мар","Апр","Май","Юни","Юли","Авг","Сеп","Окт","Ное","Дек"],today:"днес"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.br",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.br={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"]}}}}),timely.define("external_libs/locales/bootstrap-datepicker.cs",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.cs={days:["Neděle","Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota","Neděle"],daysShort:["Ned","Pon","Úte","Stř","Čtv","Pát","Sob","Ned"],daysMin:["Ne","Po","Út","St","Čt","Pá","So","Ne"],months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"],monthsShort:["Led","Úno","Bře","Dub","Kvě","Čer","Čnc","Srp","Zář","Říj","Lis","Pro"],today:"Dnes"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.da",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.da={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],months:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"I Dag",clear:"Nulstil"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.de",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.de={days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"],daysShort:["Son","Mon","Die","Mit","Don","Fre","Sam","Son"],daysMin:["So","Mo","Di","Mi","Do","Fr","Sa","So"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",clear:"Löschen",weekStart:1,format:"dd.mm.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.es",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.es={days:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado","Domingo"],daysShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb","Dom"],daysMin:["Do","Lu","Ma","Mi","Ju","Vi","Sa","Do"],months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthsShort:["Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],today:"Hoy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.fi",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.fi={days:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai","sunnuntai"],daysShort:["sun","maa","tii","kes","tor","per","lau","sun"],daysMin:["su","ma","ti","ke","to","pe","la","su"],months:["tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu"],monthsShort:["tam","hel","maa","huh","tou","kes","hei","elo","syy","lok","mar","jou"],today:"tänään",weekStart:1,format:"d.m.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.fr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.fr={days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Dimanche"],daysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam","Dim"],daysMin:["D","L","Ma","Me","J","V","S","D"],months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],monthsShort:["Jan","Fév","Mar","Avr","Mai","Jui","Jul","Aou","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",clear:"Effacer",weekStart:1,format:"dd/mm/yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.id",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.id={days:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu","Minggu"],daysShort:["Mgu","Sen","Sel","Rab","Kam","Jum","Sab","Mgu"],daysMin:["Mg","Sn","Sl","Ra","Ka","Ju","Sa","Mg"],months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ags","Sep","Okt","Nov","Des"],today:"Hari Ini",clear:"Kosongkan"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.is",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.is={days:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur","Sunnudagur"],daysShort:["Sun","Mán","Þri","Mið","Fim","Fös","Lau","Sun"],daysMin:["Su","Má","Þr","Mi","Fi","Fö","La","Su"],months:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Maí","Jún","Júl","Ágú","Sep","Okt","Nóv","Des"],today:"Í Dag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.it",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.it={days:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato","Domenica"],daysShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab","Dom"],daysMin:["Do","Lu","Ma","Me","Gi","Ve","Sa","Do"],months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],monthsShort:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],today:"Oggi",clear:"Cancella",weekStart:1,format:"dd/mm/yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ja",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ja={days:["日曜","月曜","火曜","水曜","木曜","金曜","土曜","日曜"],daysShort:["日","月","火","水","木","金","土","日"],daysMin:["日","月","火","水","木","金","土","日"],months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],today:"今日",format:"yyyy/mm/dd"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.kr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.kr={days:["일요일","월요일","화요일","수요일","목요일","금요일","토요일","일요일"],daysShort:["일","월","화","수","목","금","토","일"],daysMin:["일","월","화","수","목","금","토","일"],months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],monthsShort:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"]}}}}),timely.define("external_libs/locales/bootstrap-datepicker.lt",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.lt={days:["Sekmadienis","Pirmadienis","Antradienis","Trečiadienis","Ketvirtadienis","Penktadienis","Šeštadienis","Sekmadienis"],daysShort:["S","Pr","A","T","K","Pn","Š","S"],daysMin:["Sk","Pr","An","Tr","Ke","Pn","Št","Sk"],months:["Sausis","Vasaris","Kovas","Balandis","Gegužė","Birželis","Liepa","Rugpjūtis","Rugsėjis","Spalis","Lapkritis","Gruodis"],monthsShort:["Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rugp","Rugs","Spa","Lap","Gru"],today:"Šiandien",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.lv",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.lv={days:["Svētdiena","Pirmdiena","Otrdiena","Trešdiena","Ceturtdiena","Piektdiena","Sestdiena","Svētdiena"],daysShort:["Sv","P","O","T","C","Pk","S","Sv"],daysMin:["Sv","Pr","Ot","Tr","Ce","Pk","Se","Sv"],months:["Janvāris","Februāris","Marts","Aprīlis","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jūn","Jūl","Aug","Sep","Okt","Nov","Dec"],today:"Šodien",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ms",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ms={days:["Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu","Ahad"],daysShort:["Aha","Isn","Sel","Rab","Kha","Jum","Sab","Aha"],daysMin:["Ah","Is","Se","Ra","Kh","Ju","Sa","Ah"],months:["Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember"],monthsShort:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Ogo","Sep","Okt","Nov","Dis"],today:"Hari Ini"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.nb",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.nb={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],monthsShort:["Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Des"],today:"I Dag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.nl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.nl={days:["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag","Zondag"],daysShort:["Zo","Ma","Di","Wo","Do","Vr","Za","Zo"],daysMin:["Zo","Ma","Di","Wo","Do","Vr","Za","Zo"],months:["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mrt","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"Vandaag"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.pl={days:["Niedziela","Poniedziałek","Wtorek","Środa","Czwartek","Piątek","Sobota","Niedziela"],daysShort:["Nie","Pn","Wt","Śr","Czw","Pt","So","Nie"],daysMin:["N","Pn","Wt","Śr","Cz","Pt","So","N"],months:["Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"],monthsShort:["Sty","Lu","Mar","Kw","Maj","Cze","Lip","Sie","Wrz","Pa","Lis","Gru"],today:"Dzisiaj",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pt-BR",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["pt-BR"]={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",clear:"Limpar"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.pt",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.pt={days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo"],daysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb","Dom"],daysMin:["Do","Se","Te","Qu","Qu","Se","Sa","Do"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"],today:"Hoje",clear:"Limpar"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.ru",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.ru={days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота","Воскресенье"],daysShort:["Вск","Пнд","Втр","Срд","Чтв","Птн","Суб","Вск"],daysMin:["Вс","Пн","Вт","Ср","Чт","Пт","Сб","Вс"],months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthsShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],today:"Сегодня",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.sl",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.sl={days:["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota","Nedelja"],daysShort:["Ned","Pon","Tor","Sre","Čet","Pet","Sob","Ned"],daysMin:["Ne","Po","To","Sr","Če","Pe","So","Ne"],months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Avg","Sep","Okt","Nov","Dec"],today:"Danes"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.sv",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.sv={days:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag","Söndag"],daysShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör","Sön"],daysMin:["Sö","Må","Ti","On","To","Fr","Lö","Sö"],months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"I Dag",format:"yyyy-mm-dd",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.th",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.th={days:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัส","ศุกร์","เสาร์","อาทิตย์"],daysShort:["อา","จ","อ","พ","พฤ","ศ","ส","อา"],daysMin:["อา","จ","อ","พ","พฤ","ศ","ส","อา"],months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],monthsShort:["ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."],today:"วันนี้"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.tr",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates.tr={days:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi","Pazar"],daysShort:["Pz","Pzt","Sal","Çrş","Prş","Cu","Cts","Pz"],daysMin:["Pz","Pzt","Sa","Çr","Pr","Cu","Ct","Pz"],months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],monthsShort:["Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"],today:"Bugün",format:"dd.mm.yyyy"}}}}),timely.define("external_libs/locales/bootstrap-datepicker.zh-CN",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["zh-CN"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["周日","周一","周二","周三","周四","周五","周六","周日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今日",format:"yyyy年mm月dd日",weekStart:1}}}}),timely.define("external_libs/locales/bootstrap-datepicker.zh-TW",["jquery_timely"],function(e){return{localize:function(){e.fn.datepicker.dates["zh-TW"]={days:["星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日"],daysShort:["週日","週一","週二","週三","週四","週五","週六","週日"],daysMin:["日","一","二","三","四","五","六","日"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今天",format:"yyyy年mm月dd日",weekStart:1}}}}),timely.define("external_libs/bootstrap_datepicker",["jquery_timely","ai1ec_config","external_libs/locales/bootstrap-datepicker.bg","external_libs/locales/bootstrap-datepicker.br","external_libs/locales/bootstrap-datepicker.cs","external_libs/locales/bootstrap-datepicker.da","external_libs/locales/bootstrap-datepicker.de","external_libs/locales/bootstrap-datepicker.es","external_libs/locales/bootstrap-datepicker.fi","external_libs/locales/bootstrap-datepicker.fr","external_libs/locales/bootstrap-datepicker.id","external_libs/locales/bootstrap-datepicker.is","external_libs/locales/bootstrap-datepicker.it","external_libs/locales/bootstrap-datepicker.ja","external_libs/locales/bootstrap-datepicker.kr","external_libs/locales/bootstrap-datepicker.lt","external_libs/locales/bootstrap-datepicker.lv","external_libs/locales/bootstrap-datepicker.ms","external_libs/locales/bootstrap-datepicker.nb","external_libs/locales/bootstrap-datepicker.nl","external_libs/locales/bootstrap-datepicker.pl","external_libs/locales/bootstrap-datepicker.pt-BR","external_libs/locales/bootstrap-datepicker.pt","external_libs/locales/bootstrap-datepicker.ru","external_libs/locales/bootstrap-datepicker.sl","external_libs/locales/bootstrap-datepicker.sv","external_libs/locales/bootstrap-datepicker.th","external_libs/locales/bootstrap-datepicker.tr","external_libs/locales/bootstrap-datepicker.zh-CN","external_libs/locales/bootstrap-datepicker.zh-TW"],function(e,t){function r(){return new Date(Date.UTC.apply(Date,arguments))}function i(){var e=new Date;return r(e.getFullYear(),e.getMonth(),e.getDate())}function s(e){return function(){return this[e].apply(this,arguments)}}function f(t,n){var r=e(t).data(),i={},s,o=new RegExp("^"+n.toLowerCase()+"([A-Z])"),n=new RegExp("^"+n.toLowerCase());for(var u in r)n.test(u)&&(s=u.replace(o,function(e,t){return t.toLowerCase()}),i[s]=r[u]);return i}function l(t){var n={};if(!d[t]){t=t.split("-")[0];if(!d[t])return}var r=d[t];return e.each(p,function(e,t){t in r&&(n[t]=r[t])}),n}var n=e(window),o=function(){var t={get:function(e){return this.slice(e)[0]},contains:function(e){var t=e&&e.valueOf();for(var n=0,r=this.length;n<r;n++)if(this[n].valueOf()===t)return n;return-1},remove:function(e){this.splice(e,1)},replace:function(t){if(!t)return;e.isArray(t)||(t=[t]),this.clear(),this.push.apply(this,t)},clear:function(){this.splice(0)},copy:function(){var e=new o;return e.replace(this),e}};return function(){var n=[];return n.push.apply(n,arguments),e.extend(n,t),n}}(),u=function(t,n){this.dates=new o,this.viewDate=i(),this.focusDate=null,this._process_options(n),this.element=e(t),this.isInline=!1,this.isInput=this.element.is("input"),this.component=this.element.is(".ai1ec-date")?this.element.find(".ai1ec-input-group, .ai1ec-input-group-addon, .ai1ec-btn"):!1,this.hasInput=this.component&&this.element.find("input").length,this.component&&this.component.length===0&&(this.component=!1),this.picker=e(v.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("ai1ec-datepicker-inline").appendTo(this.element):this.picker.addClass("ai1ec-datepicker-dropdown ai1ec-dropdown-menu"),this.o.rtl&&this.picker.addClass("ai1ec-datepicker-rtl"),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.ai1ec-today").attr("colspan",function(e,t){return parseInt(t)+1}),this._allow_update=!1,this.setStartDate(this._o.startDate),this.setEndDate(this._o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};u.prototype={constructor:u,_process_options:function(n){this._o=e.extend({},this._o,n);var r=this.o=e.extend({},this._o),i=r.language;d[i]||(i=i.split("-")[0],d[i]||(i=t.language,d[i]||(i=h.language))),r.language=i;switch(r.startView){case 2:case"decade":r.startView=2;break;case 1:case"year":r.startView=1;break;default:r.startView=0}switch(r.minViewMode){case 1:case"months":r.minViewMode=1;break;case 2:case"years":r.minViewMode=2;break;default:r.minViewMode=0}r.startView=Math.max(r.startView,r.minViewMode),r.multidate!==!0&&(r.multidate=Number(r.multidate)||!1,r.multidate!==!1?r.multidate=Math.max(0,r.multidate):r.multidate=1),r.multidateSeparator=String(r.multidateSeparator),r.weekStart%=7,r.weekEnd=(r.weekStart+6)%7;var s=v.parseFormat(r.format);r.startDate!==-Infinity&&(r.startDate?r.startDate instanceof Date?r.startDate=this._local_to_utc(this._zero_time(r.startDate)):r.startDate=v.parseDate(r.startDate,s,r.language):r.startDate=-Infinity),r.endDate!==Infinity&&(r.endDate?r.endDate instanceof Date?r.endDate=this._local_to_utc(this._zero_time(r.endDate)):r.endDate=v.parseDate(r.endDate,s,r.language):r.endDate=Infinity),r.daysOfWeekDisabled=r.daysOfWeekDisabled||[],e.isArray(r.daysOfWeekDisabled)||(r.daysOfWeekDisabled=r.daysOfWeekDisabled.split(/[,\s]*/)),r.daysOfWeekDisabled=e.map(r.daysOfWeekDisabled,function(e){return parseInt(e,10)});var o=String(r.orientation).toLowerCase().split(/\s+/g),u=r.orientation.toLowerCase();o=e.grep(o,function(e){return/^auto|left|right|top|bottom$/.test(e)}),r.orientation={x:"auto",y:"auto"};if(!!u&&u!=="auto")if(o.length===1)switch(o[0]){case"top":case"bottom":r.orientation.y=o[0];break;case"left":case"right":r.orientation.x=o[0]}else u=e.grep(o,function(e){return/^left|right$/.test(e)}),r.orientation.x=u[0]||"auto",u=e.grep(o,function(e){return/^top|bottom$/.test(e)}),r.orientation.y=u[0]||"auto"},_events:[],_secondaryEvents:[],_applyEvents:function(e){for(var t=0,n,r,i;t<e.length;t++)n=e[t][0],e[t].length==2?(r=undefined,i=e[t][1]):e[t].length==3&&(r=e[t][1],i=e[t][2]),n.on(i,r)},_unapplyEvents:function(e){for(var t=0,n,r,i;t<e.length;t++)n=e[t][0],e[t].length==2?(i=undefined,r=e[t][1]):e[t].length==3&&(i=e[t][1],r=e[t][2]),n.off(r,i)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:e.proxy(this.show,this),keyup:e.proxy(function(t){e.inArray(t.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:e.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:e.proxy(this.show,this),keyup:e.proxy(function(t){e.inArray(t.keyCode,[27,37,39,38,40,32,13,9])===-1&&this.update()},this),keydown:e.proxy(this.keydown,this)}],[this.component,{click:e.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:e.proxy(this.show,this)}]],this._events.push([this.element,"*",{blur:e.proxy(function(e){this._focused_from=e.target},this)}],[this.element,{blur:e.proxy(function(e){this._focused_from=e.target},this)}]),this._secondaryEvents=[[this.picker,{click:e.proxy(this.click,this)}],[e(window),{resize:e.proxy(this.place,this)}],[e(document),{"mousedown touchstart":e.proxy(function(e){this.element.is(e.target)||this.element.find(e.target).length||this.picker.is(e.target)||this.picker.find(e.target).length||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,n){var r=n||this.dates.get(-1),i=this._utc_to_local(r);this.element.trigger({type:t,date:i,dates:e.map(this.dates,this._utc_to_local),format:e.proxy(function(e,t){arguments.length===0?(e=this.dates.length-1,t=this.o.format):typeof e=="string"&&(t=e,e=this.dates.length-1),t=t||this.o.format;var n=this.dates.get(e);return v.formatDate(n,t,this.o.language)},this)})},show:function(e){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.height=this.component?this.component.outerHeight():this.element.outerHeight(),this.place(),this._attachSecondaryEvents(),this._trigger("show")},hide:function(){if(this.isInline)return;if(!this.picker.is(":visible"))return;this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide")},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date},_utc_to_local:function(e){return e&&new Date(e.getTime()+e.getTimezoneOffset()*6e4)},_local_to_utc:function(e){return e&&new Date(e.getTime()-e.getTimezoneOffset()*6e4)},_zero_time:function(e){return e&&new Date(e.getFullYear(),e.getMonth(),e.getDate())},_zero_utc_time:function(e){return e&&new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},getDates:function(){return e.map(this.dates,this._utc_to_local)},getUTCDates:function(){return e.map(this.dates,function(e){return new Date(e)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){return new Date(this.dates.get(-1))},setDates:function(){this.update.apply(this,arguments),this._trigger("changeDate"),this.setValue()},setUTCDates:function(){this.update.apply(this,e.map(arguments,this._utc_to_local)),this._trigger("changeDate"),this.setValue()},setDate:s("setDates"),setUTCDate:s("setUTCDates"),setValue:function(){var e=this.getFormattedDate();this.isInput?this.element.val(e).change():this.component&&this.element.find("input").val(e).change()},getFormattedDate:function(t){t===undefined&&(t=this.o.format);var n=this.o.language;return e.map(this.dates,function(e){return v.formatDate(e,t,n)}).join(this.o.multidateSeparator)},setStartDate:function(e){this._process_options({startDate:e}),this.update(),this.updateNavArrows()},setEndDate:function(e){this._process_options({endDate:e}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(e){this._process_options({daysOfWeekDisabled:e}),this.update(),this.updateNavArrows()},place:function(){if(this.isInline)return;var t=this.picker.outerWidth(),r=this.picker.outerHeight(),i=10,s=n.width(),o=n.height(),u=n.scrollTop(),a=parseInt(this.element.parents().filter(function(){return e(this).css("z-index")!="auto"}).first().css("z-index"))+10,f=this.component?this.component.parent().offset():this.element.offset(),l=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),c=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),h=f.left,p=f.top;this.picker.removeClass("ai1ec-datepicker-orient-top ai1ec-datepicker-orient-bottom ai1ec-datepicker-orient-right ai1ec-datepicker-orient-left"),this.o.orientation.x!=="auto"?(this.picker.addClass("ai1ec-datepicker-orient-"+this.o.orientation.x),this.o.orientation.x==="right"&&(h-=t-c)):(this.picker.addClass("ai1ec-datepicker-orient-left"),f.left<0?h-=f.left-i:f.left+t>s&&(h=s-t-i));var d=this.o.orientation.y,v,m;d==="auto"&&(v=-u+f.top-r,m=u+o-(f.top+l+r),Math.max(v,m)===m?d="top":d="bottom"),this.picker.addClass("ai1ec-datepicker-orient-"+d),d==="top"?p+=l:p-=r+parseInt(this.picker.css("padding-top")),this.picker.css({top:p,left:h,zIndex:a})},_allow_update:!0,update:function(){if(!this._allow_update)return;var t=this.dates.copy(),n=[],r=!1;arguments.length?(e.each(arguments,e.proxy(function(e,t){t instanceof Date&&(t=this._local_to_utc(t)),n.push(t)},this)),r=!0):(n=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),n&&this.o.multidate?n=n.split(this.o.multidateSeparator):n=[n],delete this.element.data().date),n=e.map(n,e.proxy(function(e){return v.parseDate(e,this.o.format,this.o.language)},this)),n=e.grep(n,e.proxy(function(e){return e<this.o.startDate||e>this.o.endDate||!e},this),!0),this.dates.replace(n),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate&&(this.viewDate=new Date(this.o.endDate)),r?this.setValue():n.length&&String(t)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&t.length&&this._trigger("clearDate"),this.fill()},fillDow:function(){var e=this.o.weekStart,t="<tr>";if(this.o.calendarWeeks){var n='<th class="ai1ec-cw"> </th>';t+=n,this.picker.find(".ai1ec-datepicker-days thead tr:first-child").prepend(n)}while(e<this.o.weekStart+7)t+='<th class="ai1ec-dow">'+d[this.o.language].daysMin[e++%7]+"</th>";t+="</tr>",this.picker.find(".ai1ec-datepicker-days thead").append(t)},fillMonths:function(){var e="",t=0;while(t<12)e+='<span class="ai1ec-month">'+d[this.o.language].monthsShort[t++]+"</span>";this.picker.find(".ai1ec-datepicker-months td").html(e)},setRange:function(t){!t||!t.length?delete this.range:this.range=e.map(t,function(e){return e.valueOf()}),this.fill()},getClassNames:function(t){var n=[],r=this.viewDate.getUTCFullYear(),i=this.viewDate.getUTCMonth(),s=new Date;return t.getUTCFullYear()<r||t.getUTCFullYear()==r&&t.getUTCMonth()<i?n.push("ai1ec-old"):(t.getUTCFullYear()>r||t.getUTCFullYear()==r&&t.getUTCMonth()>i)&&n.push("ai1ec-new"),this.focusDate&&t.valueOf()===this.focusDate.valueOf()&&n.push("ai1ec-focused"),this.o.todayHighlight&&t.getUTCFullYear()==s.getFullYear()&&t.getUTCMonth()==s.getMonth()&&t.getUTCDate()==s.getDate()&&n.push("ai1ec-today"),this.dates.contains(t)!==-1&&n.push("ai1ec-active"),(t.valueOf()<this.o.startDate||t.valueOf()>this.o.endDate||e.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled)!==-1)&&n.push("ai1ec-disabled"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&n.push("ai1ec-range"),e.inArray(t.valueOf(),this.range)!=-1&&n.push("ai1ec-selected")),n},fill:function(){var t=new Date(this.viewDate),n=t.getUTCFullYear(),i=t.getUTCMonth(),s=this.o.startDate!==-Infinity?this.o.startDate.getUTCFullYear():-Infinity,o=this.o.startDate!==-Infinity?this.o.startDate.getUTCMonth():-Infinity,u=this.o.endDate!==Infinity?this.o.endDate.getUTCFullYear():Infinity,a=this.o.endDate!==Infinity?this.o.endDate.getUTCMonth():Infinity,f,l;this.picker.find(".ai1ec-datepicker-days thead th.ai1ec-datepicker-switch").text(d[this.o.language].months[i]+" "+n),this.picker.find("tfoot th.ai1ec-today").text(d[this.o.language].today).toggle(this.o.todayBtn!==!1),this.picker.find("tfoot th.ai1ec-clear").text(d[this.o.language].clear).toggle(this.o.clearBtn!==!1),this.updateNavArrows(),this.fillMonths();var c=r(n,i-1,28),h=v.getDaysInMonth(c.getUTCFullYear(),c.getUTCMonth());c.setUTCDate(h),c.setUTCDate(h-(c.getUTCDay()-this.o.weekStart+7)%7);var p=new Date(c);p.setUTCDate(p.getUTCDate()+42),p=p.valueOf();var m=[],g;while(c.valueOf()<p){if(c.getUTCDay()==this.o.weekStart){m.push("<tr>");if(this.o.calendarWeeks){var y=new Date(+c+(this.o.weekStart-c.getUTCDay()-7)%7*864e5),b=new Date(+y+(11-y.getUTCDay())%7*864e5),w=new Date(+(w=r(b.getUTCFullYear(),0,1))+(11-w.getUTCDay())%7*864e5),E=(b-w)/864e5/7+1;m.push('<td class="ai1ec-cw">'+E+"</td>")}}g=this.getClassNames(c),g.push("ai1ec-day");if(this.o.beforeShowDay!==e.noop){var S=this.o.beforeShowDay(this._utc_to_local(c));S===undefined?S={}:typeof S=="boolean"?S={enabled:S}:typeof S=="string"&&(S={classes:S}),S.enabled===!1&&g.push("ai1ec-disabled"),S.classes&&(g=g.concat(S.classes.split(/\s+/))),S.tooltip&&(f=S.tooltip)}g=e.unique(g),m.push('<td class="'+g.join(" ")+'"'+(f?' title="'+f+'"':"")+">"+c.getUTCDate()+"</td>"),c.getUTCDay()==this.o.weekEnd&&m.push("</tr>"),c.setUTCDate(c.getUTCDate()+1)}this.picker.find(".ai1ec-datepicker-days tbody").empty().append(m.join(""));var x=this.picker.find(".ai1ec-datepicker-months").find("th:eq(1)").text(n).end().find("span").removeClass("ai1ec-active");e.each(this.dates,function(e,t){t.getUTCFullYear()==n&&x.eq(t.getUTCMonth()).addClass("ai1ec-active")}),(n<s||n>u)&&x.addClass("ai1ec-disabled"),n==s&&x.slice(0,o).addClass("ai1ec-disabled"),n==u&&x.slice(a+1).addClass("ai1ec-disabled"),m="",n=parseInt(n/10,10)*10;var T=this.picker.find(".ai1ec-datepicker-years").find("th:eq(1)").text(n+"-"+(n+9)).end().find("td");n-=1;var N=e.map(this.dates,function(e){return e.getUTCFullYear()}),C;for(var k=-1;k<11;k++)C=["ai1ec-year"],k===-1?C.push("ai1ec-old"):k===10&&C.push("ai1ec-new"),e.inArray(n,N)!==-1&&C.push("ai1ec-active"),(n<s||n>u)&&C.push("ai1ec-disabled"),m+='<span class="'+C.join(" ")+'">'+n+"</span>",n+=1;T.html(m)},updateNavArrows:function(){if(!this._allow_update)return;var e=new Date(this.viewDate),t=e.getUTCFullYear(),n=e.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-Infinity&&t<=this.o.startDate.getUTCFullYear()&&n<=this.o.startDate.getUTCMonth()?this.picker.find(".ai1ec-prev").css({visibility:"hidden"}):this.picker.find(".ai1ec-prev").css({visibility:"visible"}),this.o.endDate!==Infinity&&t>=this.o.endDate.getUTCFullYear()&&n>=this.o.endDate.getUTCMonth()?this.picker.find(".ai1ec-next").css({visibility:"hidden"}):this.picker.find(".ai1ec-next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-Infinity&&t<=this.o.startDate.getUTCFullYear()?this.picker.find(".ai1ec-prev").css({visibility:"hidden"}):this.picker.find(".ai1ec-prev").css({visibility:"visible"}),this.o.endDate!==Infinity&&t>=this.o.endDate.getUTCFullYear()?this.picker.find(".ai1ec-next").css({visibility:"hidden"}):this.picker.find(".ai1ec-next").css({visibility:"visible"})}},click:function(t){t.preventDefault();var n=e(t.target).closest("span, td, th"),i,s,o;if(n.length==1)switch(n[0].nodeName.toLowerCase()){case"th":switch(n[0].className){case"ai1ec-datepicker-switch":this.showMode(1);break;case"ai1ec-prev":case"ai1ec-next":var u=v.modes[this.viewMode].navStep*(n[0].className=="ai1ec-prev"?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,u),this._trigger("changeMonth",this.viewDate);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,u),this.viewMode===1&&this._trigger("changeYear",this.viewDate)}this.fill();break;case"ai1ec-today":var a=new Date;a=r(a.getFullYear(),a.getMonth(),a.getDate(),0,0,0),this.showMode(-2);var f=this.o.todayBtn=="linked"?null:"view";this._setDate(a,f);break;case"ai1ec-clear":var l;this.isInput?l=this.element:this.component&&(l=this.element.find("input")),l&&l.val("").change(),this.update(),this._trigger("changeDate"),this.o.autoclose&&this.hide()}break;case"span":n.is(".ai1ec-disabled")||(this.viewDate.setUTCDate(1),n.is(".ai1ec-month")?(o=1,s=n.parent().find("span").index(n),i=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(s),this._trigger("changeMonth",this.viewDate),this.o.minViewMode===1&&this._setDate(r(i,s,o))):(o=1,s=0,i=parseInt(n.text(),10)||0,this.viewDate.setUTCFullYear(i),this._trigger("changeYear",this.viewDate),this.o.minViewMode===2&&this._setDate(r(i,s,o))),this.showMode(-1),this.fill());break;case"td":n.is(".ai1ec-day")&&!n.is(".ai1ec-disabled")&&(o=parseInt(n.text(),10)||1,i=this.viewDate.getUTCFullYear(),s=this.viewDate.getUTCMonth(),n.is(".ai1ec-old")?s===0?(s=11,i-=1):s-=1:n.is(".ai1ec-new")&&(s==11?(s=0,i+=1):s+=1),this._setDate(r(i,s,o)))}this.picker.is(":visible")&&this._focused_from&&e(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(e){var t=this.dates.contains(e);e?t!==-1?this.dates.remove(t):this.dates.push(e):this.dates.clear();if(typeof this.o.multidate=="number")while(this.dates.length>this.o.multidate)this.dates.remove(0)},_setDate:function(e,t){(!t||t=="date")&&this._toggle_multidate(e&&new Date(e));if(!t||t=="view")this.viewDate=e&&new Date(e);this.fill(),this.setValue(),this._trigger("changeDate");var n;this.isInput?n=this.element:this.component&&(n=this.element.find("input")),n&&n.change(),this.o.autoclose&&(!t||t=="date")&&this.hide()},moveMonth:function(e,t){if(!e)return undefined;if(!t)return e;var n=new Date(e.valueOf()),r=n.getUTCDate(),i=n.getUTCMonth(),s=Math.abs(t),o,u;t=t>0?1:-1;if(s==1){u=t==-1?function(){return n.getUTCMonth()==i}:function(){return n.getUTCMonth()!=o},o=i+t,n.setUTCMonth(o);if(o<0||o>11)o=(o+12)%12}else{for(var a=0;a<s;a++)n=this.moveMonth(n,t);o=n.getUTCMonth(),n.setUTCDate(r),u=function(){return o!=n.getUTCMonth()}}while(u())n.setUTCDate(--r),n.setUTCMonth(o);return n},moveYear:function(e,t){return this.moveMonth(e,t*12)},dateWithinRange:function(e){return e>=this.o.startDate&&e<=this.o.endDate},keydown:function(e){if(this.picker.is(":not(:visible)")){e.keyCode==27&&this.show();return}var t=!1,n,r,s,o=this.focusDate||this.viewDate;switch(e.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),e.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;n=e.keyCode==37?-1:1,e.ctrlKey?(r=this.moveYear(this.dates.get(-1)||i(),n),s=this.moveYear(o,n),this._trigger("changeYear",this.viewDate)):e.shiftKey?(r=this.moveMonth(this.dates.get(-1)||i(),n),s=this.moveMonth(o,n),this._trigger("changeMonth",this.viewDate)):(r=new Date(this.dates.get(-1)||i()),r.setUTCDate(r.getUTCDate()+n),s=new Date(o),s.setUTCDate(o.getUTCDate()+n)),this.dateWithinRange(r)&&(this.focusDate=this.viewDate=s,this.setValue(),this.fill(),e.preventDefault());break;case 38:case 40:if(!this.o.keyboardNavigation)break;n=e.keyCode==38?-1:1,e.ctrlKey?(r=this.moveYear(this.dates.get(-1)||i(),n),s=this.moveYear(o,n),this._trigger("changeYear",this.viewDate)):e.shiftKey?(r=this.moveMonth(this.dates.get(-1)||i(),n),s=this.moveMonth(o,n),this._trigger("changeMonth",this.viewDate)):(r=new Date(this.dates.get(-1)||i()),r.setUTCDate(r.getUTCDate()+n*7),s=new Date(o),s.setUTCDate(o.getUTCDate()+n*7)),this.dateWithinRange(r)&&(this.focusDate=this.viewDate=s,this.setValue(),this.fill(),e.preventDefault());break;case 32:break;case 13:o=this.focusDate||this.dates.get(-1)||this.viewDate,this._toggle_multidate(o),t=!0,this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(e.preventDefault(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}if(t){this.dates.length?this._trigger("changeDate"):this._trigger("clearDate");var u;this.isInput?u=this.element:this.component&&(u=this.element.find("input")),u&&u.change()}},showMode:function(e){e&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+e))),this.picker.find(">div").hide().filter(".ai1ec-datepicker-"+v.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var a=function(t,n){this.element=e(t),this.inputs=e.map(n.inputs,function(e){return e.jquery?e[0]:e}),delete n.inputs,e(this.inputs).datepicker(n).bind("changeDate",e.proxy(this.dateUpdated,this)),this.pickers=e.map(this.inputs,function(t){return e(t).data("datepicker")}),this.updateDates()};a.prototype={updateDates:function(){this.dates=e.map(this.pickers,function(e){return e.getUTCDate()}),this.updateRanges()},updateRanges:function(){var t=e.map(this.dates,function(e){return e.valueOf()});e.each(this.pickers,function(e,n){n.setRange(t)})},dateUpdated:function(t){if(this.updating)return;this.updating=!0;var n=e(t.target).data("datepicker"),r=n.getUTCDate(),i=e.inArray(t.target,this.inputs),s=this.inputs.length;if(i==-1)return;e.each(this.pickers,function(e,t){t.getUTCDate()||t.setUTCDate(r)});if(r<this.dates[i])while(i>=0&&r<this.dates[i])this.pickers[i--].setUTCDate(r);else if(r>this.dates[i])while(i<s&&r>this.dates[i])this.pickers[i++].setUTCDate(r);this.updateDates(),delete this.updating},remove:function(){e.map(this.pickers,function(e){e.remove()}),delete this.element.data().datepicker}};var c=e.fn.datepicker;e.fn.datepicker=function(t){var n=Array.apply(null,arguments);n.shift();var r;return this.each(function(){var i=e(this),s=i.data("datepicker"),o=typeof t=="object"&&t;if(!s){var c=f(this,"date"),p=e.extend({},h,c,o),d=l(p.language),v=e.extend({},h,d,c,o);if(i.is(".ai1ec-input-daterange")||v.inputs){var m={inputs:v.inputs||i.find("input").toArray()};i.data("datepicker",s=new a(this,e.extend(v,m)))}else i.data("datepicker",s=new u(this,v))}if(typeof t=="string"&&typeof s[t]=="function"){r=s[t].apply(s,n);if(r!==undefined)return!1}}),r!==undefined?r:this};var h=e.fn.datepicker.defaults={autoclose:!1,beforeShowDay:e.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:Infinity,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-Infinity,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},p=e.fn.datepicker.locale_opts=["format","rtl","weekStart"];e.fn.datepicker.Constructor=u;var d=e.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},v={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(e){return e%4===0&&e%100!==0||e%400===0},getDaysInMonth:function(e,t){return[31,v.isLeapYear(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(e){var t=e.replace(this.validParts,"\0").split("\0"),n=e.match(this.validParts);if(!t||!t.length||!n||n.length===0)throw new Error("Invalid date format.");return{separators:t,parts:n}},parseDate:function(t,n,i){if(!t)return undefined;if(t instanceof Date)return t;typeof n=="string"&&(n=v.parseFormat(n));if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(t)){var s=/([\-+]\d+)([dmwy])/,o=t.match(/([\-+]\d+)([dmwy])/g),a,f;t=new Date;for(var l=0;l<o.length;l++){a=s.exec(o[l]),f=parseInt(a[1]);switch(a[2]){case"d":t.setUTCDate(t.getUTCDate()+f);break;case"m":t=u.prototype.moveMonth.call(u.prototype,t,f);break;case"w":t.setUTCDate(t.getUTCDate()+f*7);break;case"y":t=u.prototype.moveYear.call(u.prototype,t,f)}}return r(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),0,0,0)}var o=t&&t.match(this.nonpunctuation)||[],t=new Date,c={},h=["yyyy","yy","M","MM","m","mm","d","dd"],p={yyyy:function(e,t){return e.setUTCFullYear(t)},yy:function(e,t){return e.setUTCFullYear(2e3+t)},m:function(e,t){if(isNaN(e))return e;t-=1;while(t<0)t+=12;t%=12,e.setUTCMonth(t);while(e.getUTCMonth()!=t)e.setUTCDate(e.getUTCDate()-1);return e},d:function(e,t){return e.setUTCDate(t)}},m,g,a;p.M=p.MM=p.mm=p.m,p.dd=p.d,t=r(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0);var y=n.parts.slice();o.length!=y.length&&(y=e(y).filter(function(t,n){return e.inArray(n,h)!==-1}).toArray());if(o.length==y.length){for(var l=0,b=y.length;l<b;l++){m=parseInt(o[l],10),a=y[l];if(isNaN(m))switch(a){case"MM":g=e(d[i].months).filter(function(){var e=this.slice(0,o[l].length),t=o[l].slice(0,e.length);return e==t}),m=e.inArray(g[0],d[i].months)+1;break;case"M":g=e(d[i].monthsShort).filter(function(){var e=this.slice(0,o[l].length),t=o[l].slice(0,e.length);return e==t}),m=e.inArray(g[0],d[i].monthsShort)+1}c[a]=m}for(var l=0,w,E;l<h.length;l++)E=h[l],E in c&&!isNaN(c[E])&&(w=new Date(t),p[E](w,c[E]),isNaN(w)||(t=w))}return t},formatDate:function(t,n,r){if(!t)return"";typeof n=="string"&&(n=v.parseFormat(n));var i={d:t.getUTCDate(),D:d[r].daysShort[t.getUTCDay()],DD:d[r].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:d[r].monthsShort[t.getUTCMonth()],MM:d[r].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()};i.dd=(i.d<10?"0":"")+i.d,i.mm=(i.m<10?"0":"")+i.m;var t=[],s=e.extend([],n.separators);for(var o=0,u=n.parts.length;o<=u;o++)s.length&&t.push(s.shift()),t.push(i[n.parts[o]]);return t.join("")},headTemplate:'<thead><tr><th class="ai1ec-prev"><i class="ai1ec-fa ai1ec-fa-arrow-left"></i></th><th colspan="5" class="ai1ec-datepicker-switch"></th><th class="ai1ec-next"><i class="ai1ec-fa ai1ec-fa-arrow-right"></i></th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="ai1ec-today"></th></tr><tr><th colspan="7" class="ai1ec-clear"></th></tr></tfoot>'};v.template='<div class="timely ai1ec-datepicker"><div class="ai1ec-datepicker-days"><table class=" ai1ec-table-condensed">'+v.headTemplate+"<tbody></tbody>"+v.footTemplate+"</table>"+"</div>"+'<div class="ai1ec-datepicker-months">'+'<table class="ai1ec-table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+"</table>"+"</div>"+'<div class="ai1ec-datepicker-years">'+'<table class="ai1ec-table-condensed">'+v.headTemplate+v.contTemplate+v.footTemplate+"</table>"+"</div>"+"</div>",e.fn.datepicker.DPGlobal=v,e.fn.datepicker.noConflict=function(){return e.fn.datepicker=c,this},e(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var n=e(this);if(n.data("datepicker"))return;t.preventDefault(),n.datepicker("show")}),e(function(){e('[data-provide="datepicker-inline"]').datepicker()});for(var m=2,g=arguments.length;m<g;m++)arguments[m].localize()}),timely.define("external_libs/bootstrap/alert",["jquery_timely"],function(e){var t='[data-dismiss="ai1ec-alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed.bs.alert").remove()}var n=e(this),r=n.attr("data-target");r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var i=e(r);t&&t.preventDefault(),i.length||(i=n.hasClass("ai1ec-alert")?n:n.parent()),i.trigger(t=e.Event("close.bs.alert"));if(t.isDefaultPrevented())return;i.removeClass("ai1ec-in"),e.support.transition&&i.hasClass("ai1ec-fade")?i.one(e.support.transition.end,s).emulateTransitionEnd(150):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("bs.alert");i||r.data("bs.alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.bs.alert.data-api",t,n.prototype.close)}),timely.define("external_libs/jquery_cookie",["jquery_timely"],function(e){function n(e){return u.raw?e:encodeURIComponent(e)}function r(e){return u.raw?e:decodeURIComponent(e)}function i(e){return n(u.json?JSON.stringify(e):String(e))}function s(e){e.indexOf('"')===0&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(t," ")),u.json?JSON.parse(e):e}catch(n){}}function o(t,n){var r=u.raw?t:s(t);return e.isFunction(n)?n(r):r}var t=/\+/g,u=e.cookie=function(t,s,a){if(s!==undefined&&!e.isFunction(s)){a=e.extend({},u.defaults,a);if(typeof a.expires=="number"){var f=a.expires,l=a.expires=new Date;l.setTime(+l+f*864e5)}return document.cookie=[n(t),"=",i(s),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}var c=t?undefined:{},h=document.cookie?document.cookie.split("; "):[];for(var p=0,d=h.length;p<d;p++){var v=h[p].split("="),m=r(v.shift()),g=v.join("=");if(t&&t===m){c=o(g,s);break}!t&&(g=o(g))!==undefined&&(c[m]=g)}return c};u.defaults={},e.removeCookie=function(t,n){return e.cookie(t)===undefined?!1:(e.cookie(t,"",e.extend({},n,{expires:-1})),!e.cookie(t))}}),timely.define("scripts/calendar/load_views",["jquery_timely","scripts/calendar/print","scripts/calendar/agenda_view","scripts/calendar/month_view","libs/frontend_utils","libs/utils","ai1ec_calendar","ai1ec_config","scripts/common_scripts/frontend/common_frontend","libs/select2_multiselect_helper","external_libs/jquery_history","external_libs/jquery.tablescroller","external_libs/jquery.scrollTo","external_libs/bootstrap_datepicker","external_libs/bootstrap/alert","external_libs/jquery_cookie"],function(e,t,n,r,i,s,o,u,a,f){e.cookie.json=!0;var l="ai1ec_saved_filter",c=!e("#save_filtered_views").hasClass("ai1ec-hide"),h=function(e){var t=e.find("#ai1ec-view-dropdown .ai1ec-dropdown-menu .ai1ec-active a"),n=u.week_view_ends_at-u.week_view_starts_at,i=n*60;e.find("table.ai1ec-week-view-original").tableScroll({height:i,containerClass:"ai1ec-week-view ai1ec-popover-boundary",scroll:!1}),e.find("table.ai1ec-oneday-view-original").tableScroll({height:i,containerClass:"ai1ec-oneday-view ai1ec-popover-boundary",scroll:!1});if(e.find(".ai1ec-week-view").length||e.find(".ai1ec-oneday-view").length)e.find(".ai1ec-oneday-view .tablescroll_wrapper, .ai1ec-week-view .tablescroll_wrapper").scrollTo(e.find(".ai1ec-hour-marker:eq("+u.week_view_starts_at+")")),e.find(".ai1ec-hour-marker:eq("+u.week_view_starts_at+")").addClass("ai1ec-first-visible");e.find(".ai1ec-month-view .ai1ec-multiday").length&&r.extend_multiday_events(e),e.find(".ai1ec-calendar-view-container").trigger("initialize_view.ai1ec"),e.find(".ai1ec-calendar-toolbar").trigger("ai1ec-affix.reinit")},p=function(t){t.find(".ai1ec-calendar-view-container").trigger("destroy_view.ai1ec");var n=t.find(".ai1ec-minical-trigger").data("datepicker");typeof n!="undefined"&&(n.picker.remove(),e(document).off("changeDate",".ai1ec-minical-trigger")),t.find(".ai1ec-tooltip.ai1ec-in, .ai1ec-popup").remove(),t.find(".ai1ec-calendar-toolbar .ai1ec-btn-toolbar").remove()},d=function(){var t=[],n=[],r=[],i;e(".ai1ec-category-filter .ai1ec-dropdown-menu .ai1ec-active").each(function(){t.push(e(this).data("term"))}),e(".ai1ec-tag-filter .ai1ec-dropdown-menu .ai1ec-active").each(function(){n.push(e(this).data("term"))}),e(".ai1ec-author-filter .ai1ec-dropdown-menu .ai1ec-active").each(function(){r.push(e(this).data("term"))});var s={};return s.cat_ids=t,s.tag_ids=n,s.auth_ids=r,i=e(".ai1ec-views-dropdown .ai1ec-dropdown-menu .ai1ec-active").data("action"),s.action=i,s},v=function(){var t=History.getState(),n=e.cookie(l);if(null===n||undefined===n)n={};var r=d();u.is_calendar_page?n.calendar_page=r:n[t.url]=r,e.cookie(l,n,{path:"/",expires:365}),e("#save_filtered_views").addClass("ai1ec-active").attr("data-original-title",u.clear_saved_filter_text);var i=s.make_alert(u.save_filter_text_ok,"success");e("#ai1ec-calendar").prepend(i)},m=function(t){t.stopImmediatePropagation();var n=e.cookie(l);if(u.is_calendar_page)delete n.calendar_page;else{var r=History.getState();delete n[r.url]}e.cookie(l,n,{path:"/",expires:365}),e("#save_filtered_views").removeClass("ai1ec-active").attr("data-original-title",u.reset_saved_filter_text),c||e("#save_filtered_views").addClass("ai1ec-hide");var i=s.make_alert(u.remove_filter_text_ok,"success");e("#ai1ec-calendar").prepend(i)},g=function(t,n,r){t.find(".ai1ec-calendar-view-loading").fadeIn("fast").end().find(".ai1ec-calendar-view").fadeTo("fast",.3,function(){var i={request_type:r,ai1ec_doing_ajax:!0};e.ajax({url:n,dataType:r,data:i,method:"get",success:function(n){e(".ai1ec-subscribe-container").show(),p(t),typeof n.views_dropdown=="string"&&t.find(".ai1ec-views-dropdown").replaceWith(n.views_dropdown),typeof n.categories=="string"&&(t.find(".ai1ec-category-filter").replaceWith(n.categories),u.use_select2&&f.init(t.find(".ai1ec-category-filter"))),typeof n.authors=="string"&&(t.find(".ai1ec-author-filter").replaceWith(n.authors),u.use_select2&&f.init(t.find(".ai1ec-author-filter"))),typeof n.tags=="string"&&(t.find(".ai1ec-tag-filter").replaceWith(n.tags),u.use_select2&&f.init(t.find(".ai1ec-tag-filter"))),typeof n.subscribe_buttons=="string"&&t.find(".ai1ec-subscribe-container").replaceWith(n.subscribe_buttons),typeof n.save_view_btngroup=="string"&&t.find("#save_filtered_views").closest(".ai1ec-btn-group").replaceWith(n.save_view_btngroup),c=n.are_filters_set;var r=t.find(".ai1ec-calendar-view-container");r.height(r.height());var i=t.find(".ai1ec-calendar-view").html(n.html).height();r.animate({height:i},{complete:function(){r.height("auto")}}),t.find(".ai1ec-calendar-view-loading").fadeOut("fast"),t.find(".ai1ec-calendar-view").fadeTo("fast",1),h(t)}})})},y=!1,b=function(t){var n=History.getState(),r=e(".ai1ec-calendar:first");if(n.data.ai1ec!==undefined&&!0===n.data.ai1ec||!0===y)y=!0,g(r,n.url,"json")},w=function(e,t,n){if(t==="json"){var r={ai1ec:!0};History.pushState(r,document.title,decodeURI(n))}else g(e,n,"jsonp")},E=function(t){var n=e(this);$calendar=n.closest(".ai1ec-calendar"),t.preventDefault(),w($calendar,n.data("type"),n.attr("href"))},S=function(t){var n=e(this);t.preventDefault();if(typeof n.data("datepicker")=="undefined"){n.datepicker({todayBtn:"linked",todayHighlight:!0,language:n.data("lang")});var r=n.data("datepicker");if(n.closest(".ai1ec-pull-right").length>0){r.picker.addClass("ai1ec-right-aligned");var i=r.place;r.place=function(){i.call(this);var t=this.component?this.component:this.element,n=t.offset();this.picker.css({left:"auto",right:e(document).width()-n.left-t.outerWidth()})}}e(document).on("changeDate",".ai1ec-minical-trigger",x)}n.datepicker("show")},x=function(t){var n,r=e(this),i=r.closest(".ai1ec-calendar"),s;r.datepicker("hide"),n=r.data("href"),s=t.format(),s=s.replace(/\//g,"-"),n=n.replace("__DATE__",s),w(i,r.data("type"),n)},T=function(t){var n;typeof t.added!="undefined"?n=e(t.added.element).data("href"):n=e("option[value="+t.removed.id+"]",t.target).data("href"),data={ai1ec:!0},History.pushState(data,null,n)},N=function(){var t=e(this).closest(".ai1ec-calendar");w(t,e(this).data("type"),e(this).data("href"))};return{initialize_view:h,handle_click_on_link_to_load_view:E,handle_minical_trigger:S,handle_minical_change_date:x,clear_filters:N,handle_state_change:b,load_view:g,save_current_filter:v,remove_current_filter:m,load_view_from_select2_filter:T,load_view_according_to_datatype:w}}),timely.define("scripts/calendar/calendar-affix",["jquery_timely","ai1ec_config"],function(e,t){var n=function(n){var r=n.find(".ai1ec-calendar-toolbar");if(!r.length)return!1;var i=n.find(".ai1ec-views-dropdown").closest("div.ai1ec-clearfix").css("clear","both"),s=r.find(".ai1ec-dropdown-toggle"),o=n.find("#ai1ec-calendar-view"),u=e("#wpadminbar"),a=r.offset().top,f=0,l=null,c=function(){return e("#ai1ec-bs-modes div:visible:first").text()},h=function(){var t=["xs","sm","md","lg"],n=e('<div id="ai1ec-bs-modes"></div>');for(var r in t)e('<div class="ai1ec-device-'+t[r]+" ai1ec-visible-"+t[r]+'">'+t[r]+"</div>").appendTo(n);n.appendTo("body")},p=function(){return parseInt(t["affix_vertical_offset_"+c()]||0)},d=function(){s.each(function(){e(this).contents().eq(-3).wrap('<div class="ai1ec-hidden" />')})},v=function(){s.find(".ai1ec-hidden").contents().unwrap()},m=function(){var e=0;"fixed"===u.css("position")&&(e=u.height()),r.css("top",e+p()+"px")},g=function(){return f},y=function(){f=a-("fixed"===u.css("position")?u.height():0)-p()},b=function(){r.height()>r.data("original_height")?(d(),r.height()>r.data("original_height")&&v()):v()},w=function(){n.find(".ai1ec-affix .ai1ec-views-dropdown").closest("div.ai1ec-clearfix").remove(),i=n.find(".ai1ec-views-dropdown").closest("div.ai1ec-clearfix"),s=r.find(".ai1ec-dropdown-toggle"),r.trigger("ai1ec-affix-top.bs.affix").find(".ai1ec-views-dropdown").closest("div.ai1ec-clearfix").hide().end().end().data({original_height:r.height()}).find(".ai1ec-views-dropdown").closest("div.ai1ec-clearfix").show().end().end().filter(".ai1ec-affix").trigger("ai1ec-affix.bs.affix")},E=function(){r.hasClass("ai1ec-affix")&&r.addClass("ai1ec-was-affixed"),y(),r.removeClass("ai1ec-affix").css("width",n.width()).find(".ai1ec-btn-toolbar").hide().end().data({original_height:r.height()}),m(),a=r.offset().top,r.filter(".ai1ec-was-affixed").addClass("ai1ec-affix").removeClass("ai1ec-was-affixed").find(".ai1ec-btn-toolbar").show(),l=null};return h(),y(),r.data({original_height:r.height()}).css("width",n.width()).affix({offset:{top:g,bottom:0}}).on("ai1ec-affix.bs.affix",function(){var e=o.offset().top;i.hide().appendTo(r).show().css("opacity",0).animate({opacity:1},400),b(),m(),o.css("margin-top",r.outerHeight(!0)+parseInt(r.css("margin-bottom"))+"px")}).on("ai1ec-affix-top.bs.affix",function(){i.hide(),o.prepend(i),i.show().css("opacity",0).animate({opacity:1},400),v(),m(),o.css("margin-top",0),r.data("original_height",r.height())}).on("ai1ec-affix.reinit",w).filter(".ai1ec-affix").trigger("ai1ec-affix.bs.affix"),e(window).on("resize.affix",function(){clearTimeout(l),l=setTimeout(E,100)}),n};return{initialize_affixed_toolbar:n}}),timely.define("external_libs/bootstrap/transition",["jquery_timely"],function(e){function t(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(e.style[n]!==undefined)return{end:t[n]}}e.fn.emulateTransitionEnd=function(t){var n=!1,r=this;e(this).one(e.support.transition.end,function(){n=!0});var i=function(){n||e(r).trigger(e.support.transition.end)};return setTimeout(i,t),this},e(function(){e.support.transition=t()})}),timely.define("external_libs/bootstrap/modal",["jquery_timely"],function(e){var t=function(t,n){this.options=n,this.$element=e(t),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.load(this.options.remote)};t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},t.prototype.toggle=function(e){return this[this.isShown?"hide":"show"](e)},t.prototype.show=function(t){var n=this,r=e.Event("show.bs.modal",{relatedTarget:t});this.$element.trigger(r);if(this.isShown||r.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.$element.on("click.dismiss.modal",'[data-dismiss="ai1ec-modal"]',e.proxy(this.hide,this)),this.backdrop(function(){var r=e.support.transition&&n.$element.hasClass("ai1ec-fade");n.$element.parent().length||n.$element.appendTo(document.body),n.$element.show(),r&&n.$element[0].offsetWidth,n.$element.addClass("ai1ec-in").attr("aria-hidden",!1),n.enforceFocus();var i=e.Event("shown.bs.modal",{relatedTarget:t});r?n.$element.find(".ai1ec-modal-dialog").one(e.support.transition.end,function(){n.$element.focus().trigger(i)}).emulateTransitionEnd(300):n.$element.focus().trigger(i)})},t.prototype.hide=function(t){t&&t.preventDefault(),t=e.Event("hide.bs.modal"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,this.escape(),e(document).off("focusin.bs.modal"),this.$element.removeClass("ai1ec-in").attr("aria-hidden",!0).off("click.dismiss.modal"),e.support.transition&&this.$element.hasClass("ai1ec-fade")?this.$element.one(e.support.transition.end,e.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal()},t.prototype.enforceFocus=function(){e(document).off("focusin.bs.modal").on("focusin.bs.modal",e.proxy(function(e){this.$element[0]!==e.target&&!this.$element.has(e.target).length&&this.$element.focus()},this))},t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",e.proxy(function(e){e.which==27&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},t.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.removeBackdrop(),e.$element.trigger("hidden.bs.modal")})},t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},t.prototype.backdrop=function(t){var n=this,r=this.$element.hasClass("ai1ec-fade")?"ai1ec-fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="ai1ec-modal-backdrop '+r+'" />').appendTo(document.body),this.$element.on("click.dismiss.modal",e.proxy(function(e){if(e.target!==e.currentTarget)return;this.options.backdrop=="static"?this.$element[0].focus.call(this.$element[0]):this.hide.call(this)},this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("ai1ec-in");if(!t)return;i?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("ai1ec-in"),e.support.transition&&this.$element.hasClass("ai1ec-fade")?this.$backdrop.one(e.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};var n=e.fn.modal;e.fn.modal=function(n,r){return this.each(function(){var i=e(this),s=i.data("bs.modal"),o=e.extend({},t.DEFAULTS,i.data(),typeof n=="object"&&n);s||i.data("bs.modal",s=new t(this,o)),typeof n=="string"?s[n](r):o.show&&s.show(r)})},e.fn.modal.Constructor=t,e.fn.modal.noConflict=function(){return e.fn.modal=n,this},e(document).on("click.bs.modal.data-api",'[data-toggle="ai1ec-modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s,this).one("hide",function(){n.is(":visible")&&n.focus()})}),e(document).on("show.bs.modal",".ai1ec-modal",function(){e(document.body).addClass("ai1ec-modal-open")}).on("hidden.bs.modal",".ai1ec-modal",function(){e(document.body).removeClass("ai1ec-modal-open")})}),timely.define("scripts/calendar",["jquery_timely","scripts/calendar/load_views","scripts/calendar/print","scripts/calendar/agenda_view","scripts/calendar/month_view","scripts/calendar/calendar-affix","ai1ec_calendar","ai1ec_config","scripts/common_scripts/frontend/common_frontend","libs/utils","libs/select2_multiselect_helper","external_libs/bootstrap/transition","external_libs/bootstrap/modal","external_libs/jquery.scrollTo","external_libs/jquery_cookie"],function(e,t,n,r,i,s,o,u,a,f,l){var c=function(){if(o.selector!==undefined&&o.selector!==""&&e(o.selector).length===1){var t=e(":header:contains("+o.title+"):first");t.length||(t=e('<h1 class="page-title"></h1>'),t.text(o.title));var n=e(".ai1ec-main-container:first").detach().before(t);e(o.selector).empty().append(n).hide().css("visibility","visible").fadeIn("fast")}},h=function(){var t=e(this).data("instanceId"),n=e(this).closest(".ai1ec-calendar");n.find(".ai1ec-event-instance-id-"+t).addClass("ai1ec-hover")},p=function(){var t=e(this).data("instanceId"),n=e(this).closest(".ai1ec-calendar");n.find(".ai1ec-event-instance-id-"+t).removeClass("ai1ec-hover")},d=function(){var t=e(this),n=t.closest(".ai1ec-calendar"),r=t.data("instanceId");t.delay(500).queue(function(){n.find(".ai1ec-event-instance-id-"+r).addClass("ai1ec-raised")})},v=function(t){var n=e(this),r=n.closest(".ai1ec-calendar"),i=n.data("instanceId"),s=e(t.toElement||t.relatedTarget),o=r.find(".ai1ec-event-instance-id-"+i);if(s.is(o)||s.parent().is(o))return;r.find(".ai1ec-event-instance-id-"+i).clearQueue().removeClass("ai1ec-raised")},m=function(){c()},g=function(){e(document).on({mouseenter:h,mouseleave:p},".ai1ec-event-container.ai1ec-multiday"),e(document).on({mouseenter:d,mouseleave:v},".ai1ec-oneday-view .ai1ec-oneday .ai1ec-event-container, .ai1ec-week-view .ai1ec-week .ai1ec-event-container"),e(document).on("click",".ai1ec-agenda-view .ai1ec-event-header",r.toggle_event),e(document).on("click","#ai1ec-agenda-expand-all",r.expand_all),e(document).on("click","#ai1ec-agenda-collapse-all",r.collapse_all),e(document).on("click","a.ai1ec-load-view",t.handle_click_on_link_to_load_view),e(document).on("click",".ai1ec-minical-trigger",t.handle_minical_trigger),e(document).on("click",".ai1ec-clear-filter",t.clear_filters),e(document).on("click","#ai1ec-print-button",n.handle_click_on_print_button),e(document).on("click",".ai1ec-reveal-full-day button",function(){var t=e(this).closest(".ai1ec-calendar");e(this).fadeOut();var n=t.find(".ai1ec-oneday-view-original, .ai1ec-week-view-original"),r=t.find(".tablescroll_wrapper").offset().top-n.offset().top;e(window).scrollTo("+="+r+"px",400);var i=1442;t.find(".tablescroll_wrapper").scrollTo("-="+r+"px",400).animate({height:i+"px"})}),History.Adapter.bind(window,"statechange",t.handle_state_change),e(document).on("click","#ai1ec-calendar-view .ai1ec-load-event",function(t){t.preventDefault(),e.cookie.raw=!1,e.cookie("ai1ec_calendar_url",document.URL),window.location.href=this.href})},y=function(){l.init(e(".ai1ec-select2-filters")),e(document).on("change",".ai1ec-select2-multiselect-selector",t.load_view_from_select2_filter)},b=function(){e(document).on("page_ready.ai1ec",function(){m(),u.use_select2&&y(),g(),e(".ai1ec-calendar").each(function(){t.initialize_view(e(this))}),u.affix_filter_menu&&1===e(".ai1ec-calendar").length&&s.initialize_affixed_toolbar(e(".ai1ec-calendar"))})};return{start:b}}),timely.require(["scripts/calendar"],function(e){e.start()}),timely.define("pages/calendar",function(){});
|
110 |
the specific language governing permissions and limitations under the Apache License and the GPL License.
|
111 |
*/
|
112 |
|
113 |
+
/**
|
114 |
+
* Twig.js 0.7.2
|
115 |
+
*
|
116 |
+
* @copyright 2011-2013 John Roepke
|
117 |
+
* @license Available under the BSD 2-Clause License
|
118 |
+
* @link https://github.com/justjohn/twig.js
|
119 |
+
*/
|
120 |
+
|
121 |
+
// Copyright (c) 2011-2013 John Roepke
|
122 |
+
|
123 |
+
// [MIT License](http://www.opensource.org/licenses/mit-license.php) or are
|
124 |
+
|
125 |
+
// [Public Domain](https://developer.mozilla.org/Project:Copyrights).
|
126 |
+
|
127 |
+
// Copies of the licenses for the code included here can be found in the
|
128 |
+
|
129 |
+
/**
|
130 |
+
* jPaq - A fully customizable JavaScript/JScript library
|
131 |
+
* http://jpaq.org/
|
132 |
+
*
|
133 |
+
* Copyright (c) 2011 Christopher West
|
134 |
+
* Licensed under the MIT license.
|
135 |
+
* http://jpaq.org/license/
|
136 |
+
*
|
137 |
+
* Version: 1.0.6.0000W
|
138 |
+
* Revised: April 6, 2011
|
139 |
+
*/
|
140 |
+
|
141 |
/**
|
142 |
* History.js jQuery Adapter
|
143 |
* @author Benjamin Arthur Lupton <contact@balupton.com>
|
340 |
* limitations under the License.
|
341 |
* ======================================================================== */
|
342 |
|
343 |
+
timely.define("scripts/calendar/print",["jquery_timely"],function(e){var t=function(t){t.preventDefault();var n=e("body"),r=e("html"),i=e(this).closest(".ai1ec-calendar").html(),s=n.html();s=s.replace(/<script.*?>([\s\S]*?)<\/script>/gmi,""),n.empty(),n.addClass("timely"),r.addClass("ai1ec-print"),n.html(i),e("span").click(function(){return!1}),window.print(),n.removeClass("timely"),r.removeClass("ai1ec-print"),n.html(s)};return{handle_click_on_print_button:t}}),timely.define("scripts/calendar/agenda_view",["jquery_timely"],function(e){var t=function(){e(this).closest(".ai1ec-event").toggleClass("ai1ec-expanded").find(".ai1ec-event-summary").slideToggle(300)},n=function(){var t=e(this).closest(".ai1ec-calendar");t.find(".ai1ec-expanded .ai1ec-event-toggle").click()},r=function(){var t=e(this).closest(".ai1ec-calendar");t.find(".ai1ec-event:not(.ai1ec-expanded) .ai1ec-event-toggle").click()};return{toggle_event:t,collapse_all:n,expand_all:r}}),timely.define("external_libs/modernizr",[],function(){var e=function(e,t,n){function S(e){f.cssText=e}function x(e,t){return S(h.join(e+";")+(t||""))}function T(e,t){return typeof e===t}function N(e,t){return!!~(""+e).indexOf(t)}function C(e,t,r){for(var i in e){var s=t[e[i]];if(s!==n)return r===!1?e[i]:T(s,"function")?s.bind(r||t):s}return!1}var r="2.5.3",i={},s=!0,o=t.documentElement,u="modernizr",a=t.createElement(u),f=a.style,l,c={}.toString,h=" -webkit- -moz- -o- -ms- ".split(" "),p={},d={},v={},m=[],g=m.slice,y,b=function(e,n,r,i){var s,a,f,l=t.createElement("div"),c=t.body,h=c?c:t.createElement("body");if(parseInt(r,10))while(r--)f=t.createElement("div"),f.id=i?i[r]:u+(r+1),l.appendChild(f);return s=["­","<style>",e,"</style>"].join(""),l.id=u,(c?l:h).innerHTML+=s,h.appendChild(l),c||(h.style.background="",o.appendChild(h)),a=n(l,e),c?l.parentNode.removeChild(l):h.parentNode.removeChild(h),!!a},w={}.hasOwnProperty,E;!T(w,"undefined")&&!T(w.call,"undefined")?E=function(e,t){return w.call(e,t)}:E=function(e,t){return t in e&&T(e.constructor.prototype[t],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(t){var n=this;if(typeof n!="function")throw new TypeError;var r=g.call(arguments,1),i=function(){if(this instanceof i){var e=function(){};e.prototype=n.prototype;var s=new e,o=n.apply(s,r.concat(g.call(arguments)));return Object(o)===o?o:s}return n.apply(t,r.concat(g.call(arguments)))};return i});var k=function(n,r){var s=n.join(""),o=r.length;b(s,function(n,r){var s=t.styleSheets[t.styleSheets.length-1],u=s?s.cssRules&&s.cssRules[0]?s.cssRules[0].cssText:s.cssText||"":"",a=n.childNodes,f={};while(o--)f[a[o].id]=a[o];i.touch="ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch||(f.touch&&f.touch.offsetTop)===9},o,r)}([,["@media (",h.join("touch-enabled),("),u,")","{#touch{top:9px;position:absolute}}"].join("")],[,"touch"]);p.touch=function(){return i.touch};for(var L in p)E(p,L)&&(y=L.toLowerCase(),i[y]=p[L](),m.push((i[y]?"":"no-")+y));return S(""),a=l=null,i._version=r,i._prefixes=h,i.testStyles=b,o.className=o.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(s?" js "+m.join(" "):""),i}(window,window.document);return e}),timely.define("scripts/calendar/month_view",["jquery_timely","external_libs/modernizr"],function(e,t){var n=navigator.userAgent.match(/opera/i),r=navigator.userAgent.match(/webkit/i),i=function(t){var n=t.find(".ai1ec-day"),r=t.find(".ai1ec-week:first .ai1ec-day").length;t.find(".ai1ec-month-view .ai1ec-multiday").each(function(){var t=this.parentNode,r=e(this).outerHeight(!0),i=e(".ai1ec-date",t),u=parseInt(i.text(),10),a=e(this).data("endTruncated"),f=parseInt(a?e(n[n.length-1]).text():e(this).data("endDay"),10),l=e(this),c=e(".ai1ec-event",l)[0].style.backgroundColor,h=0,p=f-u+1,d=p,v,m=0;n.each(function(t){var n=e(".ai1ec-date",this),r=e(this.parentNode),i=r.index(),a=parseInt(n.text(),10);if(a>=u&&a<=f){a===u&&(v=parseInt(n.css("marginBottom"),10)+16),h===0&&m++;if(i===0&&a>u&&d!==0){var p=l.next(".ai1ec-popup").andSelf().clone(!1);n.parent().append(p);var g=p.first();g.addClass("ai1ec-multiday-bar ai1ec-multiday-clone"),g.css({position:"absolute",left:"1px",top:parseInt(n.css("marginBottom"),10)+13,backgroundColor:c});var y=d>7?7:d;g.css("width",s(y)),d>7&&g.append(o(1,c)),g.append(o(2,c))}h===0?n.css({marginBottom:v+"px"}):n.css({marginBottom:"+=16px"}),d--,d>0&&i===6&&h++}});if(a){var g=l.find("."+l[0].className.replace(/\s+/igm,".")).last();g.append(o(1,c))}e(this).css({position:"absolute",top:i.outerHeight(!0)-r-1+"px",left:"1px",width:s(m)}),h>0&&e(this).append(o(1,c)),e(this).data("startTruncated")&&e(this).append(o(2,c)).addClass("ai1ec-multiday-bar")})},s=function(e){var t;switch(e){case 1:t=97.5;break;case 2:t=198.7;break;case 3:t=300;break;case 4:t=401;break;case 5:r||n?t=507:t=503.4;break;case 6:r||n?t=608:t=603.5;break;case 7:r||n?t=709:t=705}return t+"%"},o=function(t,n){var r=e('<div class="ai1ec-multiday-arrow'+t+'"></div>');return t===1?r.css({borderLeftColor:n}):r.css({borderTopColor:n,borderRightColor:n,borderBottomColor:n}),r};return{extend_multiday_events:i}}),timely.define("libs/frontend_utils",[],function(){var e=function(e){var t,n;t=function(e){if(/&[^;]+;/.test(e)){var t=document.createElement("div");return t.innerHTML=e,t.firstChild?t.firstChild.nodeValue:e}return e};if(typeof e=="string")return t(e);if(typeof e=="object")for(n in e)typeof e[n]=="string"&&(e[n]=t(e[n]));return e},t=function(e,t,n){var r,i,s,o,u;if("#"===e.charAt(0)||"?"===e.charAt(0))e=e.substring(1);r={},e=e.split(t);for(i=0;i<e.length;i++)o=e[i].trim(),-1!==(u=o.indexOf(n))?(s=o.substring(0,u).trim(),o=o.substring(u+1).trim()):(s=o,o=!0),r[s]=o;return r},n=function(e){var n,r,i,s,o;e=t(e,"&","="),i=Object.keys(e),n={ai1ec:{},action:"month"};for(r=0;r<i.length;r++)if("ai1ec"===i[r]){var u=t(e[i[r]],"|",":");for(s in u)if(""!==u[s]){if("action"===s||"view"===s)n.action=u[s];n.ai1ec[s]=u[s]}}else"ai1ec_"===i[r].substring(0,6)?n.ai1ec[i[r].substring(6)]=e[i[r]]:n[i[r]]=e[i[r]];"ai1ec_"!==n.action.substring(0,6)&&(n.action="ai1ec_"+n.action),o="action="+n.action+"&ai1ec=";for(s in n.ai1ec)n.ai1ec.hasOwnProperty(s)&&(o+=escape(s)+":"+escape(n.ai1ec[s])+"|");o=o.substring(0,o.length-1);for(s in n)"ai1ec"!==s&&"action"!==s&&(o+="&"+s+"="+escape(n[s]));return o};return{ai1ec_convert_entities:e,ai1ec_map_internal_query:n,ai1ec_tokenize_uri:t}}),timely.define("external_libs/bootstrap/tab",["jquery_timely"],function(e){var t=function(t){this.element=e(t)};t.prototype.show=function(){var t=this.element,n=t.closest("ul:not(.ai1ec-dropdown-menu)"),r=t.data("target");r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("ai1ec-active"))return;var i=n.find(".ai1ec-active:last a")[0],s=e.Event("show.bs.tab",{relatedTarget:i});t.trigger(s);if(s.isDefaultPrevented())return;var o=e(r);this.activate(t.parent("li"),n),this.activate(o,o.parent(),function(){t.trigger({type:"shown.bs.tab",relatedTarget:i})})},t.prototype.activate=function(t,n,r){function o(){i.removeClass("ai1ec-active").find("> .ai1ec-dropdown-menu > .ai1ec-active").removeClass("ai1ec-active"),t.addClass("ai1ec-active"),s?(t[0].offsetWidth,t.addClass("ai1ec-in")):t.removeClass("ai1ec-fade"),t.parent(".ai1ec-dropdown-menu")&&t.closest("li.ai1ec-dropdown").addClass("ai1ec-active"),r&&r()}var i=n.find("> .ai1ec-active"),s=r&&e.support.transition&&i.hasClass("ai1ec-fade");s?i.one(e.support.transition.end,o).emulateTransitionEnd(150):o(),i.removeClass("ai1ec-in")};var n=e.fn.tab;e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tab");i||r.data("bs.tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e.fn.tab.noConflict=function(){return e.fn.tab=n,this},e(document).on("click.bs.tab.data-api",'[data-toggle="ai1ec-tab"], [data-toggle="ai1ec-pill"]',function(t){t.preventDefault(),e(this).tab("show")})}),timely.define("libs/utils",["jquery_timely","external_libs/bootstrap/tab"],function(e){var t=function(){return{is_float:function(e){return!isNaN(parseFloat(e))},is_valid_coordinate:function(e,t){var n=t?90:180;return this.is_float(e)&&Math.abs(e)<n},convert_comma_to_dot:function(e){return e.replace(",",".")},field_has_value:function(t){var n="#"+t,r=e(n),i=!1;return r.length===1&&(i=e.trim(r.val())!==""),i},make_alert:function(t,n,r){var i="";switch(n){case"error":i="ai1ec-alert ai1ec-alert-danger";break;case"success":i="ai1ec-alert ai1ec-alert-success";break;default:i="ai1ec-alert"}var s=e("<div />",{"class":i,html:t});if(!r){var o=e("<button>",{type:"button","class":"ai1ec-close","data-dismiss":"ai1ec-alert",text:"×"});s.prepend(o)}return s},get_ajax_url:function(){return typeof window.ajaxurl=="undefined"?"http://localhost/wordpress/wp-admin/admin-ajax.php":window.ajaxurl},isUrl:function(e){var t=/(http|https|webcal):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return t.test(e)},isValidEmail:function(e){var t=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return t.test(e)},activate_saved_tab_on_page_load:function(t){null===t||undefined===t?e("ul.ai1ec-nav a:first").tab("show"):e("ul.ai1ec-nav a[href="+t+"]").tab("show")},add_query_arg:function(e,t){var n=e.indexOf("?")===-1?"?":"&";return-1!==e.indexOf(n+t[0]+"=")?e:e+n+t[0]+"="+t[1]},init_autoselect:function(){e(document).one("click",".ai1ec-autoselect",function(t){if(e(this).data("clicked")&&t.originalEvent.detail<2)return;e(this).data("clicked",!0);var n;document.body.createTextRange?(n=document.body.createTextRange(),n.moveToElementText(this),n.select()):window.getSelection&&(selection=window.getSelection(),n=document.createRange(),n.selectNodeContents(this),selection.removeAllRanges(),selection.addRange(n))})}}}();return t}),timely.define("domReady",[],function(){function u(e){var t;for(t=0;t<e.length;t++)e[t](n)}function a(){var e=r;t&&e.length&&(r=[],u(e))}function f(){t||(t=!0,o&&clearInterval(o),a())}function c(e){return t?e(n):r.push(e),c}var e=typeof window!="undefined"&&window.document,t=!e,n=e?document:null,r=[],i,s,o;if(e){if(document.addEventListener)document.addEventListener("DOMContentLoaded",f,!1),window.addEventListener("load",f,!1);else if(window.attachEvent){window.attachEvent("onload",f),s=document.createElement("div");try{i=window.frameElement===null}catch(l){}s.doScroll&&i&&window.external&&(o=setInterval(function(){try{s.doScroll(),f()}catch(e){}},30))}(document.readyState==="complete"||document.readyState==="interactive")&&f()}return c.version="2.0.0",c.load=function(e,t,n,r){r.isBuild?n(null):c(n)},c}),timely.define("external_libs/bootstrap/affix",["jquery_timely"],function(e){var t=function(n,r){this.options=e.extend({},t.DEFAULTS,r),this.$window=e(window).on("scroll.bs.affix.data-api",e.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",e.proxy(this.checkPositionWithEventLoop,this)),this.$element=e(n),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};t.RESET="ai1ec-affix ai1ec-affix-top ai1ec-affix-bottom",t.DEFAULTS={offset:0},t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("ai1ec-affix");var e=this.$window.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-e},t.prototype.checkPositionWithEventLoop=function(){setTimeout(e.proxy(this.checkPosition,this),1)},t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var n=e(document).height(),r=this.$window.scrollTop(),i=this.$element.offset(),s=this.options.offset,o=s.top,u=s.bottom;this.affixed=="top"&&(i.top+=r),typeof s!="object"&&(u=o=s),typeof o=="function"&&(o=s.top(this.$element)),typeof u=="function"&&(u=s.bottom(this.$element));var a=this.unpin!=null&&r+this.unpin<=i.top?!1:u!=null&&i.top+this.$element.height()>=n-u?"bottom":o!=null&&r<=o?"top":!1;if(this.affixed===a)return;this.unpin&&this.$element.css("top","");var f="ai1ec-affix"+(a?"-"+a:""),l=e.Event(f+".bs.affix");this.$element.trigger(l);if(l.isDefaultPrevented())return;this.affixed=a,this.unpin=a=="bottom"?this.getPinnedOffset():null,this.$element.removeClass(t.RESET).addClass(f).trigger(e.Event(f.replace("affix","affixed"))),a=="bottom"&&this.$element.offset({top:n-u-this.$element.height()})};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("bs.affix"),s=typeof n=="object"&&n;i||r.data("bs.affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="ai1ec-affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}),timely.define("scripts/common_scripts/frontend/common_event_handlers",["jquery_timely","external_libs/bootstrap/affix"],function(e){var t=function(t){var n=e(this),r=n.next(".ai1ec-popup"),i,s,o;if(r.length===0)return;i=r.html(),s=r.attr("class");var u=n.closest("#ai1ec-calendar-view");u.length===0&&(u=e("body")),n.offset().left-u.offset().left>182?o="left":o="right",n.constrained_popover({content:i,title:"",placement:o,trigger:"manual",html:!0,template:'<div class="timely ai1ec-popover '+s+'">'+'<div class="ai1ec-arrow"></div>'+'<div class="ai1ec-popover-inner">'+'<div class="ai1ec-popover-content"><div></div></div>'+"</div>"+"</div>",container:"body"}).constrained_popover("show")},n=function(t){var n=e(t.toElement||t.relatedTarget);n.closest(".ai1ec-popup").length===0&&e(this).constrained_popover("hide")},r=function(t){var n=e(t.toElement||t.relatedTarget);n.closest(".ai1ec-tooltip").length===0&&(e(this).remove(),e("body > .ai1ec-tooltip").remove())},i=function(t){var n=e(this),r={template:'<div class="timely ai1ec-tooltip"><div class="ai1ec-tooltip-arrow"></div><div class="ai1ec-tooltip-inner"></div></div>',trigger:"manual",container:"body"};if(n.is(".ai1ec-category .ai1ec-color-swatch"))return;n.is(".ai1ec-tooltip-auto")&&(r.placement=u(250)),n.tooltip(r),n.tooltip("show")},s=function(t){var n=e(t.toElement||t.relatedTarget);n.closest(".ai1ec-tooltip").length===0&&e(this).data("bs.tooltip")&&e(this).tooltip("hide")},o=function(t){var n=e(t.toElement||t.relatedTarget);n.closest(".ai1ec-tooltip-trigger").length===0&&e(this).remove(),n.closest(".ai1ec-popup").length===0&&e("body > .ai1ec-popup").remove()},u=function(t){return function(n,r){var i,s,o=e(r),u=o.attr("data-placement"),a=e.extend({},o.offset(),{width:r.offsetWidth,height:r.offsetHeight}),f=function(){return!1===i?!1:(i=a.left-t>=0,i?"left":!1)},l=function(){return!1===s?!1:(s=a.left+t<=e(window).width(),s?"right":!1)};switch(u){case"top":return"top";case"bottom":return"bottom";case"left":if(f())return"left";case"right":if(l())return"right";default:if(f())return"left";if(l())return"right";return u}}};return{handle_popover_over:t,handle_popover_out:n,handle_popover_self_out:r,handle_tooltip_over:i,handle_tooltip_out:s,handle_tooltip_self_out:o}}),timely.define("external_libs/bootstrap/tooltip",["jquery_timely"],function(e){var t=function(e,t){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",e,t)};t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="ai1ec-tooltip"><div class="ai1ec-tooltip-arrow"></div><div class="ai1ec-tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},t.prototype.init=function(t,n,r){this.enabled=!0,this.type=t,this.$element=e(n),this.options=this.getOptions(r);var i=this.options.trigger.split(" ");for(var s=i.length;s--;){var o=i[s];if(o=="click")this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this));else if(o!="manual"){var u=o=="hover"?"mouseenter":"focus",a=o=="hover"?"mouseleave":"blur";this.$element.on(u+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(a+"."+this.type,this.options.selector,e.proxy(this.leave,this))}}this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.getOptions=function(t){return t=e.extend({},this.getDefaults(),this.$element.data(),t),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},t.prototype.getDelegateOptions=function(){var t={},n=this.getDefaults();return this._options&&e.each(this._options,function(e,r){n[e]!=r&&(t[e]=r)}),t},t.prototype.enter=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(n.timeout),n.hoverState="in";if(!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},t.prototype.leave=function(t){var n=t instanceof this.constructor?t:e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);clearTimeout(n.timeout),n.hoverState="out";if(!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},t.prototype.show=function(){var t=e.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(t);if(t.isDefaultPrevented())return;var n=this.tip();this.setContent(),this.options.animation&&n.addClass("ai1ec-fade");var r=typeof this.options.placement=="function"?this.options.placement.call(this,n[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,s=i.test(r);s&&(r=r.replace(i,"")||"top"),n.detach().css({top:0,left:0,display:"block"}).addClass("ai1ec-"+r),this.options.container?n.appendTo(this.options.container):n.insertAfter(this.$element);var o=this.getPosition(),u=n[0].offsetWidth,a=n[0].offsetHeight;if(s){var f=this.$element.parent(),l=r,c=document.documentElement.scrollTop||document.body.scrollTop,h=this.options.container=="body"?window.innerWidth:f.outerWidth(),p=this.options.container=="body"?window.innerHeight:f.outerHeight(),d=this.options.container=="body"?0:f.offset().left;r=r=="bottom"&&o.top+o.height+a-c>p?"top":r=="top"&&o.top-c-a<0?"bottom":r=="right"&&o.right+u>h?"left":r=="left"&&o.left-u<d?"right":r,n.removeClass("ai1ec-"+l).addClass("ai1ec-"+r)}var v=this.getCalculatedOffset(r,o,u,a);this.applyPlacement(v,r),this.$element.trigger("shown.bs."+this.type)}},t.prototype.applyPlacement=function(e,t){var n,r=this.tip(),i=r[0].offsetWidth,s=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),u=parseInt(r.css("margin-left"),10);isNaN(o)&&(o=0),isNaN(u)&&(u=0),e.top=e.top+o,e.left=e.left+u,r.offset(e).addClass("ai1ec-in");var a=r[0].offsetWidth,f=r[0].offsetHeight;t=="top"&&f!=s&&(n=!0,e.top=e.top+s-f);if(/bottom|top/.test(t)){var l=0;e.left<0&&(l=e.left*-2,e.left=0,r.offset(e),a=r[0].offsetWidth,f=r[0].offsetHeight),this.replaceArrow(l-i+a,a,"left")}else this.replaceArrow(f-s,f,"top");n&&r.offset(e)},t.prototype.replaceArrow=function(e,t,n){this.arrow().css(n,e?50*(1-e/t)+"%":"")},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();e.find(".ai1ec-tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("ai1ec-fade ai1ec-in ai1ec-top ai1ec-bottom ai1ec-left ai1ec-right")},t.prototype.hide=function(){function i(){t.hoverState!="in"&&n.detach()}var t=this,n=this.tip(),r=e.Event("hide.bs."+this.type);this.$element.trigger(r);if(r.isDefaultPrevented())return;return n.removeClass("ai1ec-in"),e.support.transition&&this.$tip.hasClass("ai1ec-fade")?n.one(e.support.transition.end,i).emulateTransitionEnd(150):i(),this.$element.trigger("hidden.bs."+this.type),this},t.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},t.prototype.hasContent=function(){return this.getTitle()},t.prototype.getPosition=function(){var t=this.$element[0];return e.extend({},typeof t.getBoundingClientRect=="function"?t.getBoundingClientRect():{width:t.offsetWidth,height:t.offsetHeight},this.$element.offset())},t.prototype.getCalculatedOffset=function(e,t,n,r){return e=="bottom"?{top:t.top+t.height,left:t.left+t.width/2-n/2}:e=="top"?{top:t.top-r,left:t.left+t.width/2-n/2}:e=="left"?{top:t.top+t.height/2-r/2,left:t.left-n}:{top:t.top+t.height/2-r/2,left:t.left+t.width}},t.prototype.getTitle=function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},t.prototype.tip=function(){return this.$tip=this.$tip||e(this.options.template)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".ai1ec-tooltip-arrow")},t.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},t.prototype.enable=function(){this.enabled=!0},t.prototype.disable=function(){this.enabled=!1},t.prototype.toggleEnabled=function(){this.enabled=!this.enabled},t.prototype.toggle=function(t){var n=t?e(t.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;n.tip().hasClass("ai1ec-in")?n.leave(n):n.enter(n)},t.prototype.destroy=function(){this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var n=e.fn.tooltip;e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("bs.tooltip"),s=typeof n=="object"&&n;i||r.data("bs.tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.noConflict=function(){return e.fn.tooltip=n,this}}),timely.define("external_libs/bootstrap/popover",["jquery_timely","external_libs/bootstrap/tooltip"],function(e){var t=function(e,t){this.init("popover",e,t)};if(!e.fn.tooltip)throw new Error("Popover requires tooltip.js");t.DEFAULTS=e.extend({},e.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="ai1ec-popover"><div class="ai1ec-arrow"></div><h3 class="ai1ec-popover-title"></h3><div class="ai1ec-popover-content"></div></div>'}),t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".ai1ec-popover-title")[this.options.html?"html":"text"](t),e.find(".ai1ec-popover-content")[this.options.html?"html":"text"](n),e.removeClass("ai1ec-fade ai1ec-top ai1ec-bottom ai1ec-left ai1ec-right ai1ec-in"),e.find(".ai1ec-popover-title").html()||e.find(".ai1ec-popover-title").hide()},t.prototype.hasContent=function(){return this.getTitle()||this.getContent()},t.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||(typeof t.content=="function"?t.content.call(e[0]):t.content)},t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".ai1ec-arrow")},t.prototype.tip=function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip};var n=e.fn.popover;e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("bs.popover"),s=typeof n=="object"&&n;i||r.data("bs.popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.noConflict=function(){return e.fn.popover=n,this}}),timely.define("external_libs/constrained_popover",["jquery_timely","external_libs/bootstrap/popover"],function(e){var t=function(e,t){this.init("constrained_popover",e,t)};t.DEFAULTS=e.extend({},e.fn.popover.Constructor.DEFAULTS,{container:"",content:this.options}),t.prototype=e.extend({},e.fn.popover.Constructor.prototype),t.prototype.constructor=t,t.prototype.getDefaults=function(){return t.DEFAULTS},t.prototype.applyPlacement=function(t,n){e.fn.popover.Constructor.prototype.applyPlacement.call(this,t,n);var r=this.tip(),i=r[0].offsetWidth,s=r[0].offsetHeight,o=this.getPosition(),u={};switch(n){case"left":newPos=this.defineBounds(o),typeof newPos.top=="undefined"?u.top=o.top+o.height/2-s/2:u.top=newPos.top-s/2,typeof newPos.left=="undefined"?u.left=o.left-i:u.left=newPos.left-i,r.offset(u);break;case"right":newPos=this.defineBounds(o),typeof newPos.top=="undefined"?u.top=o.top+o.height/2-s/2:u.top=newPos.top-s/2,typeof newPos.left=="undefined"?u.left=o.left+o.width:u.left=newPos.left+o.width,r.offset(u)}},t.prototype.defineBounds=function(t){var n,r,i,s,o,u={},a=e("body"===this.options.container?document:this.options.container);return a.length?(n=a.offset()||{top:0,left:0},r=n.top,i=n.left,s=r+a.height(),o=i+a.width(),t.top+t.height/2<r&&(u.top=r),t.top+t.height/2>s&&(u.top=s),t.left-t.width/2<i&&(u.left=i),t.left-t.width/2>o&&(u.left=o),u):!1};var n=e.fn.popover;e.fn.constrained_popover=function(n){return this.each(function(){var r=e(this),i=r.data("ai1ec.constrained_popover"),s=typeof n=="object"&&n;i||r.data("ai1ec.constrained_popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.constrained_popover.Constructor=t,e.fn.constrained_popover.noConflict=function(){return e.fn.constrained_popover=n,this}}),timely.define("external_libs/bootstrap/dropdown",["jquery_timely"],function(e){function i(){e(t).remove(),e(n).each(function(t){var n=s(e(this));if(!n.hasClass("ai1ec-open"))return;n.trigger(t=e.Event("hide.bs.dropdown"));if(t.isDefaultPrevented())return;n.removeClass("ai1ec-open").trigger("hidden.bs.dropdown")})}function s(t){var n=t.attr("data-target");n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r=n&&e(n);return r&&r.length?r:t.parent()}var t=".ai1ec-dropdown-backdrop",n="[data-toggle=ai1ec-dropdown]",r=function(t){e(t).on("click.bs.dropdown",this.toggle)};r.prototype.toggle=function(t){var n=e(this);if(n.is(".ai1ec-disabled, :disabled"))return;var r=s(n),o=r.hasClass("ai1ec-open");i();if(!o){"ontouchstart"in document.documentElement&&!r.closest(".ai1ec-navbar-nav").length&&e('<div class="ai1ec-dropdown-backdrop"/>').insertAfter(e(this)).on("click",i),r.trigger(t=e.Event("show.bs.dropdown"));if(t.isDefaultPrevented())return;r.toggleClass("ai1ec-open").trigger("shown.bs.dropdown"),n.focus()}return!1},r.prototype.keydown=function(t){if(!/(38|40|27)/.test(t.keyCode))return;var r=e(this);t.preventDefault(),t.stopPropagation();if(r.is(".ai1ec-disabled, :disabled"))return;var i=s(r),o=i.hasClass("ai1ec-open");if(!o||o&&t.keyCode==27)return t.which==27&&i.find(n).focus(),r.click();var u=e("[role=menu] li:not(.ai1ec-divider):visible a",i);if(!u.length)return;var a=u.index(u.filter(":focus"));t.keyCode==38&&a>0&&a--,t.keyCode==40&&a<u.length-1&&a++,~a||(a=0),u.eq(a).focus()};var o=e.fn.dropdown;e.fn.dropdown=function(t){return this.each(function(){var n=e(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new r(this)),typeof t=="string"&&i[t].call(n)})},e.fn.dropdown.Constructor=r,e.fn.dropdown.noConflict=function(){return e.fn.dropdown=o,this},e(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".ai1ec-dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",n,r.prototype.toggle).on("keydown.bs.dropdown.data-api",n+", [role=menu]",r.prototype.keydown)}),timely.define("scripts/common_scripts/frontend/common_frontend",["jquery_timely","domReady","scripts/common_scripts/frontend/common_event_handlers","ai1ec_calendar","external_libs/modernizr","external_libs/bootstrap/tooltip","external_libs/constrained_popover","external_libs/bootstrap/dropdown"],function(e,t,n,r,i){var s=!1,o=function(){s=!0,e(document).on("mouseenter",".ai1ec-popup-trigger",n.handle_popover_over),e(document).on("mouseleave",".ai1ec-popup-trigger",n.handle_popover_out),e(document).on("mouseleave",".ai1ec-popup",n.handle_popover_self_out),e(document).on("mouseenter",".ai1ec-tooltip-trigger",n.handle_tooltip_over),e(document).on("mouseleave",".ai1ec-tooltip-trigger",n.handle_tooltip_out),e(document).on("mouseleave",".ai1ec-tooltip",n.handle_tooltip_self_out)},u=function(){t(function(){o()})},a=function(){return s};return{start:u,are_event_listeners_attached:a}}),timely.define("external_libs/select2",["jquery_timely"],function(e){(function(e){typeof e.fn.each2=="undefined"&&e.fn.extend({each2:function(t){var n=e([0]),r=-1,i=this.length;while(++r<i&&(n.context=n[0]=this[r])&&t.call(n[0],r,n)!==!1);return this}})})(e),function(e,t){function l(e,t){var n=0,r=t.length;for(;n<r;n+=1)if(c(e,t[n]))return n;return-1}function c(e,n){return e===n?!0:e===t||n===t?!1:e===null||n===null?!1:e.constructor===String?e===n+"":n.constructor===String?n===e+"":!1}function h(t,n){var r,i,s;if(t===null||t.length<1)return[];r=t.split(n);for(i=0,s=r.length;i<s;i+=1)r[i]=e.trim(r[i]);return r}function p(e){return e.outerWidth(!1)-e.width()}function d(n){var r="keyup-change-value";n.bind("keydown",function(){e.data(n,r)===t&&e.data(n,r,n.val())}),n.bind("keyup",function(){var i=e.data(n,r);i!==t&&n.val()!==i&&(e.removeData(n,r),n.trigger("keyup-change"))})}function v(n){n.bind("mousemove",function(n){var r=a;(r===t||r.x!==n.pageX||r.y!==n.pageY)&&e(n.target).trigger("mousemove-filtered",n)})}function m(e,n,r){r=r||t;var i;return function(){var t=arguments;window.clearTimeout(i),i=window.setTimeout(function(){n.apply(r,t)},e)}}function g(e){var t=!1,n;return function(){return t===!1&&(n=e(),t=!0),n}}function y(e,t){var n=m(e,function(e){t.trigger("scroll-debounced",e)});t.bind("scroll",function(e){l(e.target,t.get())>=0&&n(e)})}function b(e){if(e[0]===document.activeElement)return;window.setTimeout(function(){var t=e[0],n=e.val().length,r;e.focus(),t.setSelectionRange?t.setSelectionRange(n,n):t.createTextRange&&(r=t.createTextRange(),r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",n),r.select())},0)}function w(e){e.preventDefault(),e.stopPropagation()}function E(e){e.preventDefault(),e.stopImmediatePropagation()}function S(t){if(!u){var n=t[0].currentStyle||window.getComputedStyle(t[0],null);u=e(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:n.fontSize,fontFamily:n.fontFamily,fontStyle:n.fontStyle,fontWeight:n.fontWeight,letterSpacing:n.letterSpacing,textTransform:n.textTransform,whiteSpace:"nowrap"}),u.attr("class","select2-sizer"),e("body").append(u)}return u.text(t.val()),u.width()}function x(t,n,r){var i,s=[],o;i=t.attr("class"),typeof i=="string"&&e(i.split(" ")).each2(function(){this.indexOf("select2-")===0&&s.push(this)}),i=n.attr("class"),typeof i=="string"&&e(i.split(" ")).each2(function(){this.indexOf("select2-")!==0&&(o=r(this),typeof o=="string"&&o.length>0&&s.push(this))}),t.attr("class",s.join(" "))}function T(e,t,n,r){var i=e.toUpperCase().indexOf(t.toUpperCase()),s=t.length;if(i<0){n.push(r(e));return}n.push(r(e.substring(0,i))),n.push("<span class='select2-match'>"),n.push(r(e.substring(i,i+s))),n.push("</span>"),n.push(r(e.substring(i+s,e.length)))}function N(t){var n,r=0,i=null,s=t.quietMillis||100,o=t.url,u=this;return function(a){window.clearTimeout(n),n=window.setTimeout(function(){r+=1;var n=r,s=t.data,f=o,l=t.transport||e.ajax,c=t.type||"GET",h={};s=s?s.call(u,a.term,a.page,a.context):null,f=typeof f=="function"?f.call(u,a.term,a.page,a.context):f,null!==i&&i.abort(),t.params&&(e.isFunction(t.params)?e.extend(h,t.params.call(u)):e.extend(h,t.params)),e.extend(h,{url:f,dataType:t.dataType,data:s,type:c,cache:!1,success:function(e){if(n<r)return;var i=t.results(e,a.page);a.callback(i)}}),i=l.call(u,h)},s)}}function C(t){var n=t,r,i,s=function(e){return""+e.text};e.isArray(n)&&(i=n,n={results:i}),e.isFunction(n)===!1&&(i=n,n=function(){return i});var o=n();return o.text&&(s=o.text,e.isFunction(s)||(r=n.text,s=function(e){return e[r]})),function(t){var r=t.term,i={results:[]},o;if(r===""){t.callback(n());return}o=function(n,i){var u,a;n=n[0];if(n.children){u={};for(a in n)n.hasOwnProperty(a)&&(u[a]=n[a]);u.children=[],e(n.children).each2(function(e,t){o(t,u.children)}),(u.children.length||t.matcher(r,s(u),n))&&i.push(u)}else t.matcher(r,s(n),n)&&i.push(n)},e(n().results).each2(function(e,t){o(t,i.results)}),t.callback(i)}}function k(n){var r=e.isFunction(n);return function(i){var s=i.term,o={results:[]};e(r?n():n).each(function(){var e=this.text!==t,n=e?this.text:this;(s===""||i.matcher(s,n))&&o.results.push(e?this:{id:this,text:this})}),i.callback(o)}}function L(t,n){if(e.isFunction(t))return!0;if(!t)return!1;throw new Error("formatterName must be a function or a falsy value")}function A(t){return e.isFunction(t)?t():t}function O(t){var n=0;return e.each(t,function(e,t){t.children?n+=O(t.children):n++}),n}function M(e,n,r,i){var s=e,o=!1,u,a,f,l,h;if(!i.createSearchChoice||!i.tokenSeparators||i.tokenSeparators.length<1)return t;for(;;){a=-1;for(f=0,l=i.tokenSeparators.length;f<l;f++){h=i.tokenSeparators[f],a=e.indexOf(h);if(a>=0)break}if(a<0)break;u=e.substring(0,a),e=e.substring(a+h.length);if(u.length>0){u=i.createSearchChoice(u,n);if(u!==t&&u!==null&&i.id(u)!==t&&i.id(u)!==null){o=!1;for(f=0,l=n.length;f<l;f++)if(c(i.id(u),i.id(n[f]))){o=!0;break}o||r(u)}}}if(s!==e)return e}function _(t,n){var r=function(){};return r.prototype=new t,r.prototype.constructor=r,r.prototype.parent=t.prototype,r.prototype=e.extend(r.prototype,n),r}var n,r,i,s,o,u,a,f;n={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(e){e=e.which?e.which:e;switch(e){case n.LEFT:case n.RIGHT:case n.UP:case n.DOWN:return!0}return!1},isControl:function(e){var t=e.which;switch(t){case n.SHIFT:case n.CTRL:case n.ALT:return!0}return e.metaKey?!0:!1},isFunctionKey:function(e){return e=e.which?e.which:e,e>=112&&e<=123}},f=e(document),o=function(){var e=1;return function(){return e++}}(),f.bind("mousemove",function(e){a={x:e.pageX,y:e.pageY}}),r=_(Object,{bind:function(e){var t=this;return function(){e.apply(t,arguments)}},init:function(n){var r,i,s=".select2-results",u;this.opts=n=this.prepareOpts(n),this.id=n.id,n.element.data("select2")!==t&&n.element.data("select2")!==null&&this.destroy(),this.enabled=!0,this.container=this.createContainer(),this.containerId="s2id_"+(n.element.attr("id")||"autogen"+o()),this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1"),this.container.attr("id",this.containerId),this.body=g(function(){return n.element.closest("body")}),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.css(A(n.containerCss)),this.container.addClass(A(n.containerCssClass)),this.elementTabIndex=this.opts.element.attr("tabIndex"),this.opts.element.data("select2",this).addClass("select2-offscreen").bind("focus.select2",function(){e(this).select2("focus")}).attr("tabIndex","-1").before(this.container),this.container.data("select2",this),this.dropdown=this.container.find(".select2-drop"),this.dropdown.addClass(A(n.dropdownCssClass)),this.dropdown.data("select2",this),this.results=r=this.container.find(s),this.search=i=this.container.find("input.select2-input"),i.attr("tabIndex",this.elementTabIndex),this.resultsPage=0,this.context=null,this.initContainer(),v(this.results),this.dropdown.delegate(s,"mousemove-filtered touchstart touchmove touchend",this.bind(this.highlightUnderEvent)),y(80,this.results),this.dropdown.delegate(s,"scroll-debounced",this.bind(this.loadMoreIfNeeded)),e.fn.mousewheel&&r.mousewheel(function(e,t,n,i){var s=r.scrollTop(),o;i>0&&s-i<=0?(r.scrollTop(0),w(e)):i<0&&r.get(0).scrollHeight-r.scrollTop()+i<=r.height()&&(r.scrollTop(r.get(0).scrollHeight-r.height()),w(e))}),d(i),i.bind("keyup-change input paste",this.bind(this.updateResults)),i.bind("focus",function(){i.addClass("select2-focused")}),i.bind("blur",function(){i.removeClass("select2-focused")}),this.dropdown.delegate(s,"mouseup",this.bind(function(t){e(t.target).closest(".select2-result-selectable").length>0&&(this.highlightUnderEvent(t),this.selectHighlighted(t))})),this.dropdown.bind("click mouseup mousedown",function(e){e.stopPropagation()}),e.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),(n.element.is(":disabled")||n.element.is("[readonly='readonly']"))&&this.disable()},destroy:function(){var e=this.opts.element.data("select2");this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),e!==t&&(e.container.remove(),e.dropdown.remove(),e.opts.element.removeClass("select2-offscreen").removeData("select2").unbind(".select2").attr({tabIndex:this.elementTabIndex}).show())},prepareOpts:function(n){var r,i,s,o;r=n.element,r.get(0).tagName.toLowerCase()==="select"&&(this.select=i=n.element),i&&e.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in n)throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}),n=e.extend({},{populateResults:function(r,i,s){var o,u,a,f,l=this.opts.id,c=this;o=function(r,i,u){var a,f,h,p,d,v,m,g,y,b;r=n.sortResults(r,i,s);for(a=0,f=r.length;a<f;a+=1)h=r[a],d=h.disabled===!0,p=!d&&l(h)!==t,v=h.children&&h.children.length>0,m=e("<li></li>"),m.addClass("select2-results-dept-"+u),m.addClass("select2-result"),m.addClass(p?"select2-result-selectable":"select2-result-unselectable"),d&&m.addClass("select2-disabled"),v&&m.addClass("select2-result-with-children"),m.addClass(c.opts.formatResultCssClass(h)),g=e(document.createElement("div")),g.addClass("select2-result-label"),b=n.formatResult(h,g,s,c.opts.escapeMarkup),b!==t&&g.html(b),m.append(g),v&&(y=e("<ul></ul>"),y.addClass("select2-result-sub"),o(h.children,y,u+1),m.append(y)),m.data("select2-data",h),i.append(m)},o(i,r,0)}},e.fn.select2.defaults,n),typeof n.id!="function"&&(s=n.id,n.id=function(e){return e[s]});if(e.isArray(n.element.data("select2Tags"))){if("tags"in n)throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+n.element.attr("id");n.tags=n.element.attr("data-select2-tags")}i?(n.query=this.bind(function(n){var i={results:[],more:!1},s=n.term,o,u,a;a=function(e,t){var r;e.is("option")?n.matcher(s,e.text(),e)&&t.push({id:e.attr("value"),text:e.text(),element:e.get(),css:e.attr("class"),disabled:c(e.attr("disabled"),"disabled")}):e.is("optgroup")&&(r={text:e.attr("label"),children:[],element:e.get(),css:e.attr("class")},e.children().each2(function(e,t){a(t,r.children)}),r.children.length>0&&t.push(r))},o=r.children(),this.getPlaceholder()!==t&&o.length>0&&(u=o[0],e(u).text()===""&&(o=o.not(u))),o.each2(function(e,t){a(t,i.results)}),n.callback(i)}),n.id=function(e){return e.id},n.formatResultCssClass=function(e){return e.css}):"query"in n||("ajax"in n?(o=n.element.data("ajax-url"),o&&o.length>0&&(n.ajax.url=o),n.query=N.call(n.element,n.ajax)):"data"in n?n.query=C(n.data):"tags"in n&&(n.query=k(n.tags),n.createSearchChoice===t&&(n.createSearchChoice=function(e){return{id:e,text:e}}),n.initSelection===t&&(n.initSelection=function(t,r){var i=[];e(h(t.val(),n.separator)).each(function(){var t=this,r=this,s=n.tags;e.isFunction(s)&&(s=s()),e(s).each(function(){if(c(this.id,t))return r=this.text,!1}),i.push({id:t,text:r})}),r(i)})));if(typeof n.query!="function")throw"query function not defined for Select2 "+n.element.attr("id");return n},monitorSource:function(){var e=this.opts.element,t;e.bind("change.select2",this.bind(function(e){this.opts.element.data("select2-change-triggered")!==!0&&this.initSelection()})),t=this.bind(function(){var e,t,n=this;e=this.opts.element.attr("disabled")!=="disabled",t=this.opts.element.attr("readonly")==="readonly",e=e&&!t,this.enabled!==e&&(e?this.enable():this.disable()),x(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(A(this.opts.containerCssClass)),x(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(A(this.opts.dropdownCssClass))}),e.bind("propertychange.select2 DOMAttrModified.select2",t),typeof WebKitMutationObserver!="undefined"&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new WebKitMutationObserver(function(e){e.forEach(t)}),this.propertyObserver.observe(e.get(0),{attributes:!0,subtree:!1}))},triggerChange:function(t){t=t||{},t=e.extend({},t,{type:"change",val:this.val()}),this.opts.element.data("select2-change-triggered",!0),this.opts.element.trigger(t),this.opts.element.data("select2-change-triggered",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},enable:function(){if(this.enabled)return;this.enabled=!0,this.container.removeClass("select2-container-disabled"),this.opts.element.removeAttr("disabled")},disable:function(){if(!this.enabled)return;this.close(),this.enabled=!1,this.container.addClass("select2-container-disabled"),this.opts.element.attr("disabled","disabled")},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var t=this.container.offset(),n=this.container.outerHeight(!1),r=this.container.outerWidth(!1),i=this.dropdown.outerHeight(!1),s=e(window).scrollLeft()+e(window).width(),o=e(window).scrollTop()+e(window).height(),u=t.top+n,a=t.left,f=u+i<=o,l=t.top-i>=this.body().scrollTop(),c=this.dropdown.outerWidth(!1),h=a+c<=s,p=this.dropdown.hasClass("select2-drop-above"),d,v,m;this.body().css("position")!=="static"&&(d=this.body().offset(),u-=d.top,a-=d.left),p?(v=!0,!l&&f&&(v=!1)):(v=!1,!f&&l&&(v=!0)),h||(a=t.left+r-c),v?(u=t.top-i,this.container.addClass("select2-drop-above"),this.dropdown.addClass("select2-drop-above")):(this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")),m=e.extend({top:u,left:a,width:r},A(this.opts.dropdownCss)),this.dropdown.css(m)},shouldOpen:function(){var t;return this.opened()?!1:(t=e.Event("opening"),this.opts.element.trigger(t),!t.isDefaultPrevented())},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above"),this.dropdown.removeClass("select2-drop-above")},open:function(){return this.shouldOpen()?(window.setTimeout(this.bind(this.opening),1),!0):!1},opening:function(){var t=this.containerId,n="scroll."+t,r="resize."+t,i="orientationchange."+t,s;this.clearDropdownAlignmentPreference(),this.container.addClass("select2-dropdown-open").addClass("select2-container-active"),this.dropdown[0]!==this.body().children().last()[0]&&this.dropdown.detach().appendTo(this.body()),this.updateResults(!0),s=e("#select2-drop-mask"),s.length==0&&(s=e(document.createElement("div")),s.attr("id","select2-drop-mask").attr("class","select2-drop-mask"),s.hide(),s.appendTo(this.body()),s.bind("mousedown touchstart",function(t){var n=e("#select2-drop"),r;n.length>0&&(r=n.data("select2"),r.opts.selectOnBlur&&r.selectHighlighted({noFocus:!0}),r.close())})),this.dropdown.prev()[0]!==s[0]&&this.dropdown.before(s),e("#select2-drop").removeAttr("id"),this.dropdown.attr("id","select2-drop"),s.css({width:document.documentElement.scrollWidth,height:document.documentElement.scrollHeight}),s.show(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass("select2-drop-active"),this.ensureHighlightVisible();var o=this;this.container.parents().add(window).each(function(){e(this).bind(r+" "+n+" "+i,function(t){e("#select2-drop-mask").css({width:document.documentElement.scrollWidth,height:document.documentElement.scrollHeight}),o.positionDropdown()})}),this.focusSearch()},close:function(){if(!this.opened())return;var t=this.containerId,n="scroll."+t,r="resize."+t,i="orientationchange."+t;this.container.parents().add(window).each(function(){e(this).unbind(n).unbind(r).unbind(i)}),this.clearDropdownAlignmentPreference(),e("#select2-drop-mask").hide(),this.dropdown.removeAttr("id"),this.dropdown.hide(),this.container.removeClass("select2-dropdown-open"),this.results.empty(),this.clearSearch(),this.opts.element.trigger(e.Event("close"))},clearSearch:function(){},getMaximumSelectionSize:function(){return A(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var t=this.results,n,r,i,s,o,u,a;r=this.highlight();if(r<0)return;if(r==0){t.scrollTop(0);return}n=this.findHighlightableChoices(),i=e(n[r]),s=i.offset().top+i.outerHeight(!0),r===n.length-1&&(a=t.find("li.select2-more-results"),a.length>0&&(s=a.offset().top+a.outerHeight(!0))),o=t.offset().top+t.outerHeight(!0),s>o&&t.scrollTop(t.scrollTop()+(s-o)),u=i.offset().top-t.offset().top,u<0&&i.css("display")!="none"&&t.scrollTop(t.scrollTop()+u)},findHighlightableChoices:function(){var e=this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)");return this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)")},moveHighlight:function(t){var n=this.findHighlightableChoices(),r=this.highlight();while(r>-1&&r<n.length){r+=t;var i=e(n[r]);if(i.hasClass("select2-result-selectable")&&!i.hasClass("select2-disabled")&&!i.hasClass("select2-selected")){this.highlight(r);break}}},highlight:function(t){var n=this.findHighlightableChoices(),r,i;if(arguments.length===0)return l(n.filter(".select2-highlighted")[0],n.get());t>=n.length&&(t=n.length-1),t<0&&(t=0),this.results.find(".select2-highlighted").removeClass("select2-highlighted"),r=e(n[t]),r.addClass("select2-highlighted"),this.ensureHighlightVisible(),i=r.data("select2-data"),i&&this.opts.element.trigger({type:"highlight",val:this.id(i),choice:i})},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(t){var n=e(t.target).closest(".select2-result-selectable");if(n.length>0&&!n.is(".select2-highlighted")){var r=this.findHighlightableChoices();this.highlight(r.index(n))}else n.length==0&&this.results.find(".select2-highlighted").removeClass("select2-highlighted")},loadMoreIfNeeded:function(){var e=this.results,t=e.find("li.select2-more-results"),n,r=-1,i=this.resultsPage+1,s=this,o=this.search.val(),u=this.context;if(t.length===0)return;n=t.offset().top-e.offset().top-e.height(),n<=this.opts.loadMorePadding&&(t.addClass("select2-active"),this.opts.query({element:this.opts.element,term:o,page:i,context:u,matcher:this.opts.matcher,callback:this.bind(function(n){if(!s.opened())return;s.opts.populateResults.call(this,e,n.results,{term:o,page:i,context:u}),n.more===!0?(t.detach().appendTo(e).text(s.opts.formatLoadMore(i+1)),window.setTimeout(function(){s.loadMoreIfNeeded()},10)):t.remove(),s.positionDropdown(),s.resultsPage=i,s.context=n.context})}))},tokenize:function(){},updateResults:function(n){function f(){i.scrollTop(0),r.removeClass("select2-active"),u.positionDropdown()}function l(e){i.html(e),f()}var r=this.search,i=this.results,s=this.opts,o,u=this,a;if(n!==!0&&(this.showSearchInput===!1||!this.opened()))return;r.addClass("select2-active");var h=this.getMaximumSelectionSize();if(h>=1){o=this.data();if(e.isArray(o)&&o.length>=h&&L(s.formatSelectionTooBig,"formatSelectionTooBig")){l("<li class='select2-selection-limit'>"+s.formatSelectionTooBig(h)+"</li>");return}}if(r.val().length<s.minimumInputLength){L(s.formatInputTooShort,"formatInputTooShort")?l("<li class='select2-no-results'>"+s.formatInputTooShort(r.val(),s.minimumInputLength)+"</li>"):l("");return}s.formatSearching()&&n===!0&&l("<li class='select2-searching'>"+s.formatSearching()+"</li>");if(s.maximumInputLength&&r.val().length>s.maximumInputLength){L(s.formatInputTooLong,"formatInputTooLong")?l("<li class='select2-no-results'>"+s.formatInputTooLong(r.val(),s.maximumInputLength)+"</li>"):l("");return}a=this.tokenize(),a!=t&&a!=null&&r.val(a),this.resultsPage=1,s.query({element:s.element,term:r.val(),page:this.resultsPage,context:null,matcher:s.matcher,callback:this.bind(function(o){var a;if(!this.opened())return;this.context=o.context===t?null:o.context,this.opts.createSearchChoice&&r.val()!==""&&(a=this.opts.createSearchChoice.call(null,r.val(),o.results),a!==t&&a!==null&&u.id(a)!==t&&u.id(a)!==null&&e(o.results).filter(function(){return c(u.id(this),u.id(a))}).length===0&&o.results.unshift(a));if(o.results.length===0&&L(s.formatNoMatches,"formatNoMatches")){l("<li class='select2-no-results'>"+s.formatNoMatches(r.val())+"</li>");return}i.empty(),u.opts.populateResults.call(this,i,o.results,{term:r.val(),page:this.resultsPage,context:null}),o.more===!0&&L(s.formatLoadMore,"formatLoadMore")&&(i.append("<li class='select2-more-results'>"+u.opts.escapeMarkup(s.formatLoadMore(this.resultsPage))+"</li>"),window.setTimeout(function(){u.loadMoreIfNeeded()},10)),this.postprocessResults(o,n),f()})})},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass("select2-container-active"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){b(this.search)},selectHighlighted:function(e){var t=this.highlight(),n=this.results.find(".select2-highlighted"),r=n.closest(".select2-result").data("select2-data");r&&(this.highlight(t),this.onSelect(r,e))},getPlaceholder:function(){return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder},initContainerWidth:function(){function n(){var n,r,i,s,o;if(this.opts.width==="off")return null;if(this.opts.width==="element")return this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px";if(this.opts.width==="copy"||this.opts.width==="resolve"){n=this.opts.element.attr("style");if(n!==t){r=n.split(";");for(s=0,o=r.length;s<o;s+=1){i=r[s].replace(/\s/g,"").match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/);if(i!==null&&i.length>=1)return i[1]}}return this.opts.width==="resolve"?(n=this.opts.element.css("width"),n.indexOf("%")>0?n:this.opts.element.outerWidth(!1)===0?"auto":this.opts.element.outerWidth(!1)+"px"):null}return e.isFunction(this.opts.width)?this.opts.width():this.opts.width}var r=n.call(this);r!==null&&this.container.css("width",r)}}),i=_(r,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' onclick='return false;' class='select2-choice' tabindex='-1'>"," <span></span><abbr class='select2-search-choice-close' style='display:none;'></abbr>"," <div><b></b></div>","</a>","<input class='select2-focusser select2-offscreen' type='text'/>","<div class='select2-drop' style='display:none'>"," <div class='select2-search'>"," <input type='text' autocomplete='off' class='select2-input'/>"," </div>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return t},disable:function(){if(!this.enabled)return;this.parent.disable.apply(this,arguments),this.focusser.attr("disabled","disabled")},enable:function(){if(this.enabled)return;this.parent.enable.apply(this,arguments),this.focusser.removeAttr("disabled")},opening:function(){this.parent.opening.apply(this,arguments),this.focusser.attr("disabled","disabled"),this.opts.element.trigger(e.Event("open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments),this.focusser.removeAttr("disabled"),b(this.focusser)},focus:function(){this.opened()?this.close():(this.focusser.removeAttr("disabled"),this.focusser.focus())},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.removeAttr("disabled"),this.focusser.focus()},initContainer:function(){var e,t=this.container,r=this.dropdown,i=!1;this.showSearch(this.opts.minimumResultsForSearch>=0),this.selection=e=t.find(".select2-choice"),this.focusser=t.find(".select2-focusser"),this.search.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.PAGE_UP||e.which===n.PAGE_DOWN){w(e);return}switch(e.which){case n.UP:case n.DOWN:this.moveHighlight(e.which===n.UP?-1:1),w(e);return;case n.TAB:case n.ENTER:this.selectHighlighted(),w(e);return;case n.ESC:this.cancel(e),w(e);return}})),this.focusser.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.TAB||n.isControl(e)||n.isFunctionKey(e)||e.which===n.ESC)return;if(this.opts.openOnEnter===!1&&e.which===n.ENTER){w(e);return}if(e.which==n.DOWN||e.which==n.UP||e.which==n.ENTER&&this.opts.openOnEnter){this.open(),w(e);return}if(e.which==n.DELETE||e.which==n.BACKSPACE){this.opts.allowClear&&this.clear(),w(e);return}})),d(this.focusser),this.focusser.bind("keyup-change input",this.bind(function(e){if(this.opened())return;this.open(),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.focusser.val(""),w(e)})),e.delegate("abbr","mousedown",this.bind(function(e){if(!this.enabled)return;this.clear(),E(e),this.close(),this.selection.focus()})),e.bind("mousedown",this.bind(function(e){i=!0,this.opened()?this.close():this.enabled&&this.open(),w(e),i=!1})),r.bind("mousedown",this.bind(function(){this.search.focus()})),e.bind("focus",this.bind(function(e){w(e)})),this.focusser.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})).bind("blur",this.bind(function(){this.opened()||this.container.removeClass("select2-container-active")})),this.search.bind("focus",this.bind(function(){this.container.addClass("select2-container-active")})),this.initContainerWidth(),this.setPlaceholder()},clear:function(){var e=this.selection.data("select2-data");this.opts.element.val(""),this.selection.find("span").empty(),this.selection.removeData("select2-data"),this.setPlaceholder(),this.opts.element.trigger({type:"removed",val:this.id(e),choice:e}),this.triggerChange({removed:e})},initSelection:function(){var e;if(this.opts.element.val()===""&&this.opts.element.text()==="")this.close(),this.setPlaceholder();else{var n=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==t&&e!==null&&(n.updateSelection(e),n.close(),n.setPlaceholder())})}},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments);return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(t,n){var r=t.find(":selected");e.isFunction(n)&&n({id:r.attr("value"),text:r.text(),element:r})}:"data"in t&&(t.initSelection=t.initSelection||function(n,r){var i=n.val();t.query({matcher:function(e,n,r){return c(i,t.id(r))},callback:e.isFunction(r)?function(e){r(e.results.length?e.results[0]:null)}:e.noop})}),t},getPlaceholder:function(){return this.select&&this.select.find("option").first().text()!==""?t:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var e=this.getPlaceholder();if(this.opts.element.val()===""&&e!==t){if(this.select&&this.select.find("option:first").text()!=="")return;this.selection.find("span").html(this.opts.escapeMarkup(e)),this.selection.addClass("select2-default"),this.selection.find("abbr").hide()}},postprocessResults:function(e,t){var n=0,r=this,i=!0;this.findHighlightableChoices().each2(function(e,t){if(c(r.id(t.data("select2-data")),r.opts.element.val()))return n=e,!1}),this.highlight(n);if(t===!0){var s=this.opts.minimumResultsForSearch;i=s<0?!1:O(e.results)>=s,this.showSearch(i)}},showSearch:function(t){this.showSearchInput=t,this.dropdown.find(".select2-search")[t?"removeClass":"addClass"]("select2-search-hidden"),e(this.dropdown,this.container)[t?"addClass":"removeClass"]("select2-with-searchbox")},onSelect:function(e,t){var n=this.opts.element.val();this.opts.element.val(this.id(e)),this.updateSelection(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),this.close(),(!t||!t.noFocus)&&this.selection.focus(),c(n,this.id(e))||this.triggerChange()},updateSelection:function(e){var n=this.selection.find("span"),r;this.selection.data("select2-data",e),n.empty(),r=this.opts.formatSelection(e,n),r!==t&&n.append(this.opts.escapeMarkup(r)),this.selection.removeClass("select2-default"),this.opts.allowClear&&this.getPlaceholder()!==t&&this.selection.find("abbr").show()},val:function(){var e,n=!1,r=null,i=this;if(arguments.length===0)return this.opts.element.val();e=arguments[0],arguments.length>1&&(n=arguments[1]);if(this.select)this.select.val(e).find(":selected").each2(function(e,t){return r={id:t.attr("value"),text:t.text()},!1}),this.updateSelection(r),this.setPlaceholder(),n&&this.triggerChange();else{if(this.opts.initSelection===t)throw new Error("cannot call val() if initSelection() is not defined");if(!e&&e!==0){this.clear(),n&&this.triggerChange();return}this.opts.element.val(e),this.opts.initSelection(this.opts.element,function(e){i.opts.element.val(e?i.id(e):""),i.updateSelection(e),i.setPlaceholder(),n&&i.triggerChange()})}},clearSearch:function(){this.search.val(""),this.focusser.val("")},data:function(e){var n;if(arguments.length===0)return n=this.selection.data("select2-data"),n==t&&(n=null),n;!e||e===""?this.clear():(this.opts.element.val(e?this.id(e):""),this.updateSelection(e))}}),s=_(r,{createContainer:function(){var t=e(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html([" <ul class='select2-choices'>"," <li class='select2-search-field'>"," <input type='text' autocomplete='off' class='select2-input'>"," </li>","</ul>","<div class='select2-drop select2-drop-multi' style='display:none;'>"," <ul class='select2-results'>"," </ul>","</div>"].join(""));return t},prepareOpts:function(){var t=this.parent.prepareOpts.apply(this,arguments);return t.element.get(0).tagName.toLowerCase()==="select"?t.initSelection=function(e,t){var n=[];e.find(":selected").each2(function(e,t){n.push({id:t.attr("value"),text:t.text(),element:t[0]})}),t(n)}:"data"in t&&(t.initSelection=t.initSelection||function(n,r){var i=h(n.val(),t.separator);t.query({matcher:function(n,r,s){return e.grep(i,function(e){return c(e,t.id(s))}).length},callback:e.isFunction(r)?function(e){r(e.results)}:e.noop})}),t},initContainer:function(){var t=".select2-choices",r;this.searchContainer=this.container.find(".select2-search-field"),this.selection=r=this.container.find(t),this.search.bind("input paste",this.bind(function(){if(!this.enabled)return;this.opened()||this.open()})),this.search.bind("keydown",this.bind(function(e){if(!this.enabled)return;if(e.which===n.BACKSPACE&&this.search.val()===""){this.close();var t,i=r.find(".select2-search-choice-focus");if(i.length>0){this.unselect(i.first()),this.search.width(10),w(e);return}t=r.find(".select2-search-choice:not(.select2-locked)"),t.length>0&&t.last().addClass("select2-search-choice-focus")}else r.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");if(this.opened())switch(e.which){case n.UP:case n.DOWN:this.moveHighlight(e.which===n.UP?-1:1),w(e);return;case n.ENTER:case n.TAB:this.selectHighlighted(),w(e);return;case n.ESC:this.cancel(e),w(e);return}if(e.which===n.TAB||n.isControl(e)||n.isFunctionKey(e)||e.which===n.BACKSPACE||e.which===n.ESC)return;if(e.which===n.ENTER){if(this.opts.openOnEnter===!1)return;if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return}this.open(),(e.which===n.PAGE_UP||e.which===n.PAGE_DOWN)&&w(e)})),this.search.bind("keyup",this.bind(this.resizeSearch)),this.search.bind("blur",this.bind(function(e){this.container.removeClass("select2-container-active"),this.search.removeClass("select2-focused"),this.opened()||this.clearSearch(),e.stopImmediatePropagation()})),this.container.delegate(t,"mousedown",this.bind(function(t){if(!this.enabled)return;if(e(t.target).closest(".select2-search-choice").length>0)return;this.clearPlaceholder(),this.open(),this.focusSearch(),t.preventDefault()})),this.container.delegate(t,"focus",this.bind(function(){if(!this.enabled)return;this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active"),this.clearPlaceholder()})),this.initContainerWidth(),this.clearSearch()},enable:function(){if(this.enabled)return;this.parent.enable.apply(this,arguments),this.search.removeAttr("disabled")},disable:function(){if(!this.enabled)return;this.parent.disable.apply(this,arguments),this.search.attr("disabled",!0)},initSelection:function(){var e;this.opts.element.val()===""&&this.opts.element.text()===""&&(this.updateSelection([]),this.close(),this.clearSearch());if(this.select||this.opts.element.val()!==""){var n=this;this.opts.initSelection.call(null,this.opts.element,function(e){e!==t&&e!==null&&(n.updateSelection(e),n.close(),n.clearSearch())})}},clearSearch:function(){var e=this.getPlaceholder();e!==t&&this.getVal().length===0&&this.search.hasClass("select2-focused")===!1?(this.search.val(e).addClass("select2-default"),this.resizeSearch()):this.search.val("").width(10)},clearPlaceholder:function(){this.search.hasClass("select2-default")&&this.search.val("").removeClass("select2-default")},opening:function(){this.parent.opening.apply(this,arguments),this.clearPlaceholder(),this.resizeSearch(),this.focusSearch(),this.opts.element.trigger(e.Event("open"))},close:function(){if(!this.opened())return;this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus(),this.opts.element.triggerHandler("focus")},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(t){var n=[],r=[],i=this;e(t).each(function(){l(i.id(this),n)<0&&(n.push(i.id(this)),r.push(this))}),t=r,this.selection.find(".select2-search-choice").remove(),e(t).each(function(){i.addSelectedChoice(this)}),i.postprocessResults()},tokenize:function(){var e=this.search.val();e=this.opts.tokenizer(e,this.data(),this.bind(this.onSelect),this.opts),e!=null&&e!=t&&(this.search.val(e),e.length>0&&this.open())},onSelect:function(e,t){this.addSelectedChoice(e),this.opts.element.trigger({type:"selected",val:this.id(e),choice:e}),(this.select||!this.opts.closeOnSelect)&&this.postprocessResults(),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.val().length>=this.getMaximumSelectionSize()&&this.updateResults(!0),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:e}),(!t||!t.noFocus)&&this.focusSearch()},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(n){var r=!n.locked,i=e("<li class='select2-search-choice'> <div></div> <a href='#' onclick='return false;' class='select2-search-choice-close' tabindex='-1'></a></li>"),s=e("<li class='select2-search-choice select2-locked'><div></div></li>"),o=r?i:s,u=this.id(n),a=this.getVal(),f;f=this.opts.formatSelection(n,o.find("div")),f!=t&&o.find("div").replaceWith("<div>"+this.opts.escapeMarkup(f)+"</div>"),r&&o.find(".select2-search-choice-close").bind("mousedown",w).bind("click dblclick",this.bind(function(t){if(!this.enabled)return;e(t.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(e(t.target)),this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus"),this.close(),this.focusSearch()})).dequeue(),w(t)})).bind("focus",this.bind(function(){if(!this.enabled)return;this.container.addClass("select2-container-active"),this.dropdown.addClass("select2-drop-active")})),o.data("select2-data",n),o.insertBefore(this.searchContainer),a.push(u),this.setVal(a)},unselect:function(e){var t=this.getVal(),n,r;e=e.closest(".select2-search-choice");if(e.length===0)throw"Invalid argument: "+e+". Must be .select2-search-choice";n=e.data("select2-data");if(!n)return;r=l(this.id(n),t),r>=0&&(t.splice(r,1),this.setVal(t),this.select&&this.postprocessResults()),e.remove(),this.opts.element.trigger({type:"removed",val:this.id(n),choice:n}),this.triggerChange({removed:n})},postprocessResults:function(){var e=this.getVal(),t=this.results.find(".select2-result"),n=this.results.find(".select2-result-with-children"),r=this;t.each2(function(t,n){var i=r.id(n.data("select2-data"));l(i,e)>=0&&(n.addClass("select2-selected"),n.find(".select2-result-selectable").addClass("select2-selected"))}),n.each2(function(e,t){!t.is(".select2-result-selectable")&&t.find(".select2-result-selectable:not(.select2-selected)").length===0&&t.addClass("select2-selected")}),this.highlight()==-1&&r.highlight(0)},resizeSearch:function(){var e,t,n,r,i,s=p(this.search);e=S(this.search)+10,t=this.search.offset().left,n=this.selection.width(),r=this.selection.offset().left,i=n-(t-r)-s,i<e&&(i=n-s),i<40&&(i=n-s),i<=0&&(i=e),this.search.width(i)},getVal:function(){var e;return this.select?(e=this.select.val(),e===null?[]:e):(e=this.opts.element.val(),h(e,this.opts.separator))},setVal:function(t){var n;this.select?this.select.val(t):(n=[],e(t).each(function(){l(this,n)<0&&n.push(this)}),this.opts.element.val(n.length===0?"":n.join(this.opts.separator)))},val:function(){var n,r=!1,i=[],s=this;if(arguments.length===0)return this.getVal();n=arguments[0],arguments.length>1&&(r=arguments[1]);if(!n&&n!==0){this.opts.element.val(""),this.updateSelection([]),this.clearSearch(),r&&this.triggerChange();return}this.setVal(n);if(this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),r&&this.triggerChange();else{if(this.opts.initSelection===t)throw new Error("val() cannot be called if initSelection() is not defined");this.opts.initSelection(this.opts.element,function(t){var n=e(t).map(s.id);s.setVal(n),s.updateSelection(t),s.clearSearch(),r&&s.triggerChange()})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var t=[],n=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(".select2-search-choice").each(function(){t.push(n.opts.id(e(this).data("select2-data")))}),this.setVal(t),this.triggerChange()},data:function(t){var n=this,r;if(arguments.length===0)return this.selection.find(".select2-search-choice").map(function(){return e(this).data("select2-data")}).get();t||(t=[]),r=e.map(t,function(e){return n.opts.id(e)}),this.setVal(r),this.updateSelection(t),this.clearSearch()}}),e.fn.select2=function(){var n=Array.prototype.slice.call(arguments,0),r,o,u,a,f=["val","destroy","opened","open","close","focus","isFocused","container","onSortStart","onSortEnd","enable","disable","positionDropdown","data"];return this.each(function(){if(n.length===0||typeof n[0]=="object")r=n.length===0?{}:e.extend({},n[0]),r.element=e(this),r.element.get(0).tagName.toLowerCase()==="select"?a=r.element.attr("multiple"):(a=r.multiple||!1,"tags"in r&&(r.multiple=a=!0)),o=a?new s:new i,o.init(r);else{if(typeof n[0]!="string")throw"Invalid arguments to select2 plugin: "+n;if(l(n[0],f)<0)throw"Unknown method: "+n[0];u=t,o=e(this).data("select2");if(o===t)return;n[0]==="container"?u=o.container:u=o[n[0]].apply(o,n.slice(1));if(u!==t)return!1}}),u===t?this:u},e.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(e,t,n,r){var i=[];return T(e.text,n.term,i,r),i.join("")},formatSelection:function(e,n){return e?e.text:t},sortResults:function(e,t,n){return e},formatResultCssClass:function(e){return t},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(e,t){var n=t-e.length;return"Please enter "+n+" more character"+(n==1?"":"s")},formatInputTooLong:function(e,t){var n=e.length-t;return"Please enter "+n+" less character"+(n==1?"":"s")},formatSelectionTooBig:function(e){return"You can only select "+e+" item"+(e==1?"":"s")},formatLoadMore:function(e){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(e){return e.id},matcher:function(e,t){return t.toUpperCase().indexOf(e.toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:M,escapeMarkup:function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return String(e).replace(/[&<>"'/\\]/g,function(e){return t[e[0]]})},blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(e){return e},adaptDropdownCssClass:function(e){return null}}}(e)}),timely.define("libs/select2_multiselect_helper",["jquery_timely","external_libs/select2"],function(e){var t=function(t){var n=e(t.element),r=n.data("color"),i=n.data("description"),s="";return typeof r!="undefined"&&r!==""&&(s+='<span class="ai1ec-color-swatch" style="background: '+n.data("color")+'"></span> '),s+=t.text,s='<span title="'+i+'">'+s+"</span>",s},n=function(t){var n=e(t.element),r=n.data("color"),i=n.data("description"),s="";return typeof r!="undefined"&&r!==""?s+='<span class="ai1ec-color-swatch" style="background: '+n.data("color")+'"></span> ':s+='<span class="ai1ec-color-swatch-empty"></span> ',s+=t.text,s='<span title="'+i+'">'+s+"</span>",s},r=function(r){typeof r=="undefined"&&(r=e(document)),e(".ai1ec-select2-multiselect-selector",r).select2({allowClear:!0,formatResult:n,formatSelection:t,escapeMarkup:function(e){return e}})},i=function(t){e(".ai1ec-select2-multiselect-selector.select2-container",t).each(function(){e(this).data("select2").resizeSearch()})};return{init:r,refresh:i}});var Twig=function(e){return e.VERSION="0.7.2",e}(Twig||{}),Twig=function(e){function t(e,t){var n=Object.prototype.toString.call(t).slice(8,-1);return t!==undefined&&t!==null&&n===e}function n(t,n){var r,i,s="/",o=[],u;if(t.url)typeof t.base!="undefined"?r=t.base+(t.base.charAt(t.base.length-1)==="/"?"":"/"):r=t.url;else{if(!t.path)throw new e.Error("Cannot extend an inline template.");var a=require("path"),f=a.sep||s,l=new RegExp("^\\.{1,2}"+f.replace("\\","\\\\"));n=n.replace(/\//g,f),t.base!==undefined&&n.match(l)==null?(n=n.replace(t.base,""),r=t.base+f):r=t.path,r=r.replace(f+f,f),s=f}i=r.split(s),i.pop(),i=i.concat(n.split(s));while(i.length>0)u=i.shift(),u!="."&&(u==".."&&o.length>0&&o[o.length-1]!=".."?o.pop():o.push(u));return o.join(s)}return e.trace=!1,e.debug=!1,e.cache=!0,e.placeholders={parent:"{{|PARENT|}}"},e.indexOf=function(e,t){if(Array.prototype.hasOwnProperty("indexOf"))return e.indexOf(t);if(e===void 0||e===null)throw new TypeError;var n=Object(e),r=n.length>>>0;if(r===0)return-1;var i=0;arguments.length>0&&(i=Number(arguments[1]),i!==i?i=0:i!==0&&i!==Infinity&&i!==-Infinity&&(i=(i>0||-1)*Math.floor(Math.abs(i))));if(i>=r)return-1;var s=i>=0?i:Math.max(r-Math.abs(i),0);for(;s<r;s++)if(s in n&&n[s]===t)return s;return e==t?0:-1},e.forEach=function(e,t,n){if(Array.prototype.forEach)return e.forEach(t,n);var r,i;if(e==null)throw new TypeError(" this is null or not defined");var s=Object(e),o=s.length>>>0;if({}.toString.call(t)!="[object Function]")throw new TypeError(t+" is not a function");n&&(r=n),i=0;while(i<o){var u;i in s&&(u=s[i],t.call(r,u,i,s)),i++}},e.Error=function(e){this.message=e,this.name="TwigException",this.type="TwigException"},e.Error.prototype.toString=function(){var e=this.name+": "+this.message;return e},e.log={trace:function(){e.trace&&console&&console.log(Array.prototype.slice.call(arguments))},debug:function(){e.debug&&console&&console.log(Array.prototype.slice.call(arguments))}},typeof console!="undefined"&&typeof console.log!="undefined"?e.log.error=function(){console.log.apply(console,arguments)}:e.log.error=function(){},e.token={},e.token.type={output:"output",logic:"logic",comment:"comment",raw:"raw"},e.token.definitions=[{type:e.token.type.raw,open:"{% raw %}",close:"{% endraw %}"},{type:e.token.type.output,open:"{{",close:"}}"},{type:e.token.type.logic,open:"{%",close:"%}"},{type:e.token.type.comment,open:"{#",close:"#}"}],e.token.strings=['"',"'"],e.token.findStart=function(t){var n={position:null,def:null},r,i,s;for(r=0;r<e.token.definitions.length;r++)i=e.token.definitions[r],s=t.indexOf(i.open),e.log.trace("Twig.token.findStart: ","Searching for ",i.open," found at ",s),s>=0&&(n.position===null||s<n.position)&&(n.position=s,n.def=i);return n},e.token.findEnd=function(t,n,r){var i=null,s=!1,o=0,u=null,a=null,f=null,l=null,c=null,h=null,p,d;while(!s){u=null,a=null,f=t.indexOf(n.close,o);if(!(f>=0))throw new e.Error("Unable to find closing bracket '"+n.close+"'"+" opened near template position "+r);i=f,s=!0;if(n.type===e.token.type.comment)break;d=e.token.strings.length;for(p=0;p<d;p+=1)c=t.indexOf(e.token.strings[p],o),c>0&&c<f&&(u===null||c<u)&&(u=c,a=e.token.strings[p]);if(u!==null){l=u+1,i=null,s=!1;for(;;){h=t.indexOf(a,l);if(h<0)throw"Unclosed string in template";if(t.substr(h-1,1)!=="\\"){o=h+1;break}l=h+1}}}return i},e.tokenize=function(t){var n=[],r=0,i=null,s=null;while(t.length>0)i=e.token.findStart(t),e.log.trace("Twig.tokenize: ","Found token: ",i),i.position!==null?(i.position>0&&n.push({type:e.token.type.raw,value:t.substring(0,i.position)}),t=t.substr(i.position+i.def.open.length),r+=i.position+i.def.open.length,s=e.token.findEnd(t,i.def,r),e.log.trace("Twig.tokenize: ","Token ends at ",s),n.push({type:i.def.type,value:t.substring(0,s).trim()}),i.def.type==="logic"&&t.substr(s+i.def.close.length,1)==="\n"&&(s+=1),t=t.substr(s+i.def.close.length),r+=s+i.def.close.length):(n.push({type:e.token.type.raw,value:t}),t="");return n},e.compile=function(t){try{var n=[],r=[],i=[],s=null,o=null,u=null,a=null,f=null,l=null,c=null,h=null,p=null;while(t.length>0){s=t.shift(),e.log.trace("Compiling token ",s);switch(s.type){case e.token.type.raw:r.length>0?i.push(s):n.push(s);break;case e.token.type.logic:o=e.logic.compile.apply(this,[s]),c=o.type,h=e.logic.handler[c].open,p=e.logic.handler[c].next,e.log.trace("Twig.compile: ","Compiled logic token to ",o," next is: ",p," open is : ",h);if(h!==undefined&&!h){a=r.pop(),f=e.logic.handler[a.type];if(e.indexOf(f.next,c)<0)throw new Error(c+" not expected after a "+a.type);a.output=a.output||[],a.output=a.output.concat(i),i=[],l={type:e.token.type.logic,token:a},r.length>0?i.push(l):n.push(l)}p!==undefined&&p.length>0?(e.log.trace("Twig.compile: ","Pushing ",o," to logic stack."),r.length>0&&(a=r.pop(),a.output=a.output||[],a.output=a.output.concat(i),r.push(a),i=[]),r.push(o)):h!==undefined&&h&&(l={type:e.token.type.logic,token:o},r.length>0?i.push(l):n.push(l));break;case e.token.type.comment:break;case e.token.type.output:e.expression.compile.apply(this,[s]),r.length>0?i.push(s):n.push(s)}e.log.trace("Twig.compile: "," Output: ",n," Logic Stack: ",r," Pending Output: ",i)}if(r.length>0)throw u=r.pop(),new Error("Unable to find an end tag for "+u.type+", expecting one of "+u.next);return n}catch(d){e.log.error("Error compiling twig template "+this.id+": "),d.stack?e.log.error(d.stack):e.log.error(d.toString());if(this.options.rethrow)throw d}},e.parse=function(t,n){try{var r=[],i=!0,s=this;return n=n||{},e.forEach(t,function(o){e.log.debug("Twig.parse: ","Parsing token: ",o);switch(o.type){case e.token.type.raw:r.push(o.value);break;case e.token.type.logic:var u=o.token,a=e.logic.parse.apply(s,[u,n,i]);a.chain!==undefined&&(i=a.chain),a.context!==undefined&&(n=a.context),a.output!==undefined&&r.push(a.output);break;case e.token.type.comment:break;case e.token.type.output:e.log.debug("Twig.parse: ","Output token: ",o.stack),r.push(e.expression.parse.apply(s,[o.stack,n]))}}),r.join("")}catch(o){e.log.error("Error parsing twig template "+this.id+": "),o.stack?e.log.error(o.stack):e.log.error(o.toString());if(this.options.rethrow)throw o;if(e.debug)return o.toString()}},e.prepare=function(t){var n,r;return e.log.debug("Twig.prepare: ","Tokenizing ",t),r=e.tokenize.apply(this,[t]),e.log.debug("Twig.prepare: ","Compiling ",r),n=e.compile.apply(this,[r]),e.log.debug("Twig.prepare: ","Compiled ",n),n},e.Templates={registry:{}},e.validateId=function(t){if(t==="prototype")throw new e.Error(t+" is not a valid twig identifier");if(e.Templates.registry.hasOwnProperty(t))throw new e.Error("There is already a template with the ID "+t);return!0},e.Templates.save=function(t){if(t.id===undefined)throw new e.Error("Unable to save template with no id");e.Templates.registry[t.id]=t},e.Templates.load=function(t){return e.Templates.registry.hasOwnProperty(t)?e.Templates.registry[t]:null},e.Templates.loadRemote=function(t,n,r,i){var s=n.id,o=n.method,u=n.async,a=n.precompiled,f=null;u===undefined&&(u=!0),s===undefined&&(s=t),n.id=s;if(e.cache&&e.Templates.registry.hasOwnProperty(s))return r&&r(e.Templates.registry[s]),e.Templates.registry[s];if(o=="ajax"){if(typeof XMLHttpRequest=="undefined")throw new e.Error("Unsupported platform: Unable to do remote requests because there is no XMLHTTPRequest implementation");var l=new XMLHttpRequest;l.onreadystatechange=function(){var s=null;l.readyState==4&&(l.status==200?(e.log.debug("Got template ",l.responseText),a===!0?s=JSON.parse(l.responseText):s=l.responseText,n.url=t,n.data=s,f=new e.Template(n),r&&r(f)):i&&i(l))},l.open("GET",t,u),l.send()}else(function(){var s=require("fs"),o=require("path"),l=null,c=function(s,o){if(s){i&&i(s);return}a===!0&&(o=JSON.parse(o)),n.data=o,n.path=t,f=new e.Template(n),r&&r(f)};if(u===!0)s.stat(t,function(n,r){if(n||!r.isFile())throw new e.Error("Unable to find template file "+t);s.readFile(t,"utf8",c)});else{if(!s.statSync(t).isFile())throw new e.Error("Unable to find template file "+t);l=s.readFileSync(t,"utf8"),c(undefined,l)}})();return u===!1?f:!0},e.Template=function(n){var r=n.data,i=n.id,s=n.blocks,o=n.macros||{},u=n.base,a=n.path,f=n.url,l=n.options;this.id=i,this.base=u,this.path=a,this.url=f,this.macros=o,this.options=l,this.reset(s),t("String",r)?this.tokens=e.prepare.apply(this,[r]):this.tokens=r,i!==undefined&&e.Templates.save(this)},e.Template.prototype.reset=function(t){e.log.debug("Twig.Template.reset","Reseting template "+this.id),this.blocks={},this.child={blocks:t||{}},this.extend=null},e.Template.prototype.render=function(t,r){r=r||{};var i,s;this.context=t||{},this.reset(),r.blocks&&(this.blocks=r.blocks),r.macros&&(this.macros=r.macros),i=e.parse.apply(this,[this.tokens,this.context]);if(this.extend){var o;return this.options.allowInlineIncludes&&(o=e.Templates.load(this.extend),o&&(o.options=this.options)),o||(s=n(this,this.extend),o=e.Templates.loadRemote(s,{method:this.url?"ajax":"fs",base:this.base,async:!1,id:s,options:this.options})),this.parent=o,this.parent.render(this.context,{blocks:this.blocks})}return r.output=="blocks"?this.blocks:r.output=="macros"?this.macros:i},e.Template.prototype.importFile=function(t){var r,i;if(!this.url&&!this.path&&this.options.allowInlineIncludes){i=e.Templates.load(t),i.options=this.options;if(i)return i;throw new e.Error("Didn't find the inline template by id")}return r=n(this,t),i=e.Templates.loadRemote(r,{method:this.url?"ajax":"fs",base:this.base,async:!1,options:this.options,id:r}),i},e.Template.prototype.importBlocks=function(t,n){var r=this.importFile(t),i=this.context,s=this,o;n=n||!1,r.render(i),e.forEach(Object.keys(r.blocks),function(e){if(n||s.blocks[e]===undefined)s.blocks[e]=r.blocks[e]})},e.Template.prototype.importMacros=function(t){var r=n(this,t),i=e.Templates.loadRemote(r,{method:this.url?"ajax":"fs",async:!1,id:r});return i},e.Template.prototype.compile=function(t){return e.compiler.compile(this,t)},e}(Twig||{});(function(){String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),Object.keys||(Object.keys=function(e){if(e!==Object(e))throw new TypeError("Object.keys called on non-object");var t=[],n;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t})})();var Twig=function(e){e.lib={};var t=function(){function e(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function n(e,t){for(var n=[];t>0;n[--t]=e);return n.join("")}var r=function(){return r.cache.hasOwnProperty(arguments[0])||(r.cache[arguments[0]]=r.parse(arguments[0])),r.format.call(null,r.cache[arguments[0]],arguments)};return r.format=function(r,i){var s=1,o=r.length,u="",a,f=[],l,c,h,p,d,v;for(l=0;l<o;l++){u=e(r[l]);if(u==="string")f.push(r[l]);else if(u==="array"){h=r[l];if(h[2]){a=i[s];for(c=0;c<h[2].length;c++){if(!a.hasOwnProperty(h[2][c]))throw t('[sprintf] property "%s" does not exist',h[2][c]);a=a[h[2][c]]}}else h[1]?a=i[h[1]]:a=i[s++];if(/[^s]/.test(h[8])&&e(a)!="number")throw t("[sprintf] expecting number but found %s",e(a));switch(h[8]){case"b":a=a.toString(2);break;case"c":a=String.fromCharCode(a);break;case"d":a=parseInt(a,10);break;case"e":a=h[7]?a.toExponential(h[7]):a.toExponential();break;case"f":a=h[7]?parseFloat(a).toFixed(h[7]):parseFloat(a);break;case"o":a=a.toString(8);break;case"s":a=(a=String(a))&&h[7]?a.substring(0,h[7]):a;break;case"u":a=Math.abs(a);break;case"x":a=a.toString(16);break;case"X":a=a.toString(16).toUpperCase()}a=/[def]/.test(h[8])&&h[3]&&a>=0?"+"+a:a,d=h[4]?h[4]=="0"?"0":h[4].charAt(1):" ",v=h[6]-String(a).length,p=h[6]?n(d,v):"",f.push(h[5]?a+p:p+a)}}return f.join("")},r.cache={},r.parse=function(e){var t=e,n=[],r=[],i=0;while(t){if((n=/^[^\x25]+/.exec(t))!==null)r.push(n[0]);else if((n=/^\x25{2}/.exec(t))!==null)r.push("%");else{if((n=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(t))===null)throw"[sprintf] huh?";if(n[2]){i|=1;var s=[],o=n[2],u=[];if((u=/^([a-z_][a-z_\d]*)/i.exec(o))===null)throw"[sprintf] huh?";s.push(u[1]);while((o=o.substring(u[0].length))!=="")if((u=/^\.([a-z_][a-z_\d]*)/i.exec(o))!==null)s.push(u[1]);else{if((u=/^\[(\d+)\]/.exec(o))===null)throw"[sprintf] huh?";s.push(u[1])}n[2]=s}else i|=2;if(i===3)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";r.push(n)}t=t.substring(n[0].length)}return r},r}(),n=function(e,n){return n.unshift(e),t.apply(null,n)};return e.lib.sprintf=t,e.lib.vsprintf=n,function(){function s(e){return(e=Math.abs(e)%100)%10==1&&e!=11?"st":e%10==2&&e!=12?"nd":e%10==3&&e!=13?"rd":"th"}function o(e){var t=new Date(e.getFullYear()+1,0,4);return(t-e)/864e5<7&&(e.getDay()+6)%7<(t.getDay()+6)%7?t.getFullYear():e.getMonth()>0||e.getDate()>=4?e.getFullYear():e.getFullYear()-((e.getDay()+6)%7-e.getDate()>2?1:0)}function u(e){var t=new Date(o(e),0,4);return t.setDate(t.getDate()-(t.getDay()+6)%7),parseInt((e-t)/6048e5)+1}var t="Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),n="Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),r="Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),i="January,February,March,April,May,June,July,August,September,October,November,December".split(",");e.lib.formatDate=function(e,a){if(typeof a!="string"||/^\s*$/.test(a))return e+"";var f=new Date(e.getFullYear(),0,1),l=e;return a.replace(/[dDjlNSwzWFmMntLoYyaABgGhHisuU]/g,function(e){switch(e){case"d":return("0"+l.getDate()).replace(/^.+(..)$/,"$1");case"D":return t[l.getDay()];case"j":return l.getDate();case"l":return n[l.getDay()];case"N":return(l.getDay()+6)%7+1;case"S":return s(l.getDate());case"w":return l.getDay();case"z":return Math.ceil((f-l)/864e5);case"W":return("0"+u(l)).replace(/^.(..)$/,"$1");case"F":return i[l.getMonth()];case"m":return("0"+(l.getMonth()+1)).replace(/^.+(..)$/,"$1");case"M":return r[l.getMonth()];case"n":return l.getMonth()+1;case"t":return(new Date(l.getFullYear(),l.getMonth()+1,-1)).getDate();case"L":return(new Date(l.getFullYear(),1,29)).getDate()==29?1:0;case"o":return o(l);case"Y":return l.getFullYear();case"y":return(l.getFullYear()+"").replace(/^.+(..)$/,"$1");case"a":return l.getHours()<12?"am":"pm";case"A":return l.getHours()<12?"AM":"PM";case"B":return Math.floor(((l.getUTCHours()+1)%24+l.getUTCMinutes()/60+l.getUTCSeconds()/3600)*1e3/24);case"g":return l.getHours()%12!=0?l.getHours()%12:12;case"G":return l.getHours();case"h":return("0"+(l.getHours()%12!=0?l.getHours()%12:12)).replace(/^.+(..)$/,"$1");case"H":return("0"+l.getHours()).replace(/^.+(..)$/,"$1");case"i":return("0"+l.getMinutes()).replace(/^.+(..)$/,"$1");case"s":return("0"+l.getSeconds()).replace(/^.+(..)$/,"$1");case"u":return l.getMilliseconds();case"U":return l.getTime()/1e3}})}}(),e.lib.strip_tags=function(e,t){t=(((t||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");var n=/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,r=/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;return e.replace(r,"").replace(n,function(e,n){return t.indexOf("<"+n.toLowerCase()+">")>-1?e:""})},e.lib.parseISO8601Date=function(e){var t=/(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)(\.\d+)?(Z|([+-])(\d\d):(\d\d))/,n=[];n=e.match(t);if(!n)throw"Couldn't parse ISO 8601 date string '"+e+"'";var r=[1,2,3,4,5,6,10,11];for(var i in r)n[r[i]]=parseInt(n[r[i]],10);n[7]=parseFloat(n[7]);var s=Date.UTC(n[1],n[2]-1,n[3],n[4],n[5],n[6]);n[7]>0&&(s+=Math.round(n[7]*1e3));if(n[8]!="Z"&&n[10]){var o=n[10]*60*60*1e3;n[11]&&(o+=n[11]*60*1e3),n[9]=="-"?s-=o:s+=o}return new Date(s)},e.lib.strtotime=function(t,n){var r,i,s,o,u="";t=t.replace(/\s{2,}|^\s|\s$/g," "),t=t.replace(/[\t\r\n]/g,"");if(t==="now")return n===null||isNaN(n)?(new Date).getTime()/1e3|0:n|0;if(!isNaN(u=Date.parse(t)))return u/1e3|0;n?n=new Date(n*1e3):n=new Date;var a=t;t=t.toLowerCase();var f={day:{sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},mon:["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"]},l=function(e){var t=e[2]&&e[2]==="ago",r=(r=e[0]==="last"?-1:1)*(t?-1:1);switch(e[0]){case"last":case"next":switch(e[1].substring(0,3)){case"yea":n.setFullYear(n.getFullYear()+r);break;case"wee":n.setDate(n.getDate()+r*7);break;case"day":n.setDate(n.getDate()+r);break;case"hou":n.setHours(n.getHours()+r);break;case"min":n.setMinutes(n.getMinutes()+r);break;case"sec":n.setSeconds(n.getSeconds()+r);break;case"mon":if(e[1]==="month"){n.setMonth(n.getMonth()+r);break};default:var i=f.day[e[1].substring(0,3)];if(typeof i!="undefined"){var s=i-n.getDay();s===0?s=7*r:s>0?e[0]==="last"&&(s-=7):e[0]==="next"&&(s+=7),n.setDate(n.getDate()+s),n.setHours(0,0,0,0)}}break;default:if(!/\d+/.test(e[0]))return!1;r*=parseInt(e[0],10);switch(e[1].substring(0,3)){case"yea":n.setFullYear(n.getFullYear()+r);break;case"mon":n.setMonth(n.getMonth()+r);break;case"wee":n.setDate(n.getDate()+r*7);break;case"day":n.setDate(n.getDate()+r);break;case"hou":n.setHours(n.getHours()+r);break;case"min":n.setMinutes(n.getMinutes()+r);break;case"sec":n.setSeconds(n.getSeconds()+r)}}return!0};s=t.match(/^(\d{2,4}-\d{2}-\d{2})(?:\s(\d{1,2}:\d{2}(:\d{2})?)?(?:\.(\d+))?)?$/);if(s!==null)return s[2]?s[3]||(s[2]+=":00"):s[2]="00:00:00",o=s[1].split(/-/g),o[1]=f.mon[o[1]-1]||o[1],o[0]=+o[0],o[0]=o[0]>=0&&o[0]<=69?"20"+(o[0]<10?"0"+o[0]:o[0]+""):o[0]>=70&&o[0]<=99?"19"+o[0]:o[0]+"",parseInt(this.strtotime(o[2]+" "+o[1]+" "+o[0]+" "+s[2])+(s[4]?s[4]/1e3:""),10);var c="([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday)|(last|next)\\s(years?|months?|weeks?|days?|hours?|min|minutes?|sec|seconds?|sun\\.?|sunday|mon\\.?|monday|tue\\.?|tuesday|wed\\.?|wednesday|thu\\.?|thursday|fri\\.?|friday|sat\\.?|saturday))(\\sago)?";s=t.match(new RegExp(c,"gi"));if(s===null){try{num=e.lib.parseISO8601Date(a);if(num)return num/1e3|0}catch(h){return!1}return!1}for(r=0,i=s.length;r<i;r++)if(!l(s[r].split(" ")))return!1;return n.getTime()/1e3|0},e.lib.is=function(e,t){var n=Object.prototype.toString.call(t).slice(8,-1);return t!==undefined&&t!==null&&n===e},e.lib.copy=function(e){var t={},n;for(n in e)t[n]=e[n];return t},e.lib.replaceAll=function(e,t,n){return e.split(t).join(n)},e.lib.chunkArray=function(t,n){var r=[],i=0,s=t.length;if(n<1||!e.lib.is("Array",t))return[];while(i<s)r.push(t.slice(i,i+=n));return r},e.lib.round=function(t,n,r){var i,s,o,u;n|=0,i=Math.pow(10,n),t*=i,u=t>0|-(t<0),o=t%1===.5*u,s=Math.floor(t);if(o)switch(r){case"PHP_ROUND_HALF_DOWN":t=s+(u<0);break;case"PHP_ROUND_HALF_EVEN":t=s+s%2*u;break;case"PHP_ROUND_HALF_ODD":t=s+!(s%2);break;default:t=s+(u>0)}return(o?t:Math.round(t))/i},e}(Twig||{}),Twig=function(e){e.logic={},e.logic.type={if_:"Twig.logic.type.if",endif:"Twig.logic.type.endif",for_:"Twig.logic.type.for",endfor:"Twig.logic.type.endfor",else_:"Twig.logic.type.else",elseif:"Twig.logic.type.elseif",set:"Twig.logic.type.set",setcapture:"Twig.logic.type.setcapture",endset:"Twig.logic.type.endset",filter:"Twig.logic.type.filter",endfilter:"Twig.logic.type.endfilter",block:"Twig.logic.type.block",endblock:"Twig.logic.type.endblock",extends_:"Twig.logic.type.extends",use:"Twig.logic.type.use",include:"Twig.logic.type.include",spaceless:"Twig.logic.type.spaceless",endspaceless:"Twig.logic.type.endspaceless",macro:"Twig.logic.type.macro",endmacro:"Twig.logic.type.endmacro",import_:"Twig.logic.type.import",from:"Twig.logic.type.from"},e.logic.definitions=[{type:e.logic.type.if_,regex:/^if\s+([^\s].+)$/,next:[e.logic.type.else_,e.logic.type.elseif,e.logic.type.endif],open:!0,compile:function(t){var n=t.match[1];return t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,delete t.match,t},parse:function(t,n,r){var i="",s=e.expression.parse.apply(this,[t.stack,n]);return r=!0,s&&(r=!1,i=e.parse.apply(this,[t.output,n])),{chain:r,output:i}}},{type:e.logic.type.elseif,regex:/^elseif\s+([^\s].*)$/,next:[e.logic.type.else_,e.logic.type.elseif,e.logic.type.endif],open:!1,compile:function(t){var n=t.match[1];return t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,delete t.match,t},parse:function(t,n,r){var i="";return r&&e.expression.parse.apply(this,[t.stack,n])===!0&&(r=!1,i=e.parse.apply(this,[t.output,n])),{chain:r,output:i}}},{type:e.logic.type.else_,regex:/^else$/,next:[e.logic.type.endif,e.logic.type.endfor],open:!1,parse:function(t,n,r){var i="";return r&&(i=e.parse.apply(this,[t.output,n])),{chain:r,output:i}}},{type:e.logic.type.endif,regex:/^endif$/,next:[],open:!1},{type:e.logic.type.for_,regex:/^for\s+([a-zA-Z0-9_,\s]+)\s+in\s+([^\s].*?)(?:\s+if\s+([^\s].*))?$/,next:[e.logic.type.else_,e.logic.type.endfor],open:!0,compile:function(t){var n=t.match[1],r=t.match[2],i=t.match[3],s=null;t.key_var=null,t.value_var=null;if(n.indexOf(",")>=0){s=n.split(",");if(s.length!==2)throw new e.Error("Invalid expression in for loop: "+n);t.key_var=s[0].trim(),t.value_var=s[1].trim()}else t.value_var=n;return t.expression=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:r}]).stack,i&&(t.conditional=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:i}]).stack),delete t.match,t},parse:function(t,n,r){var i=e.expression.parse.apply(this,[t.expression,n]),s=[],o,u=0,a,f=this,l=t.conditional,c=function(e,t){var r=l!==undefined;return{index:e+1,index0:e,revindex:r?undefined:t-e,revindex0:r?undefined:t-e-1,first:e===0,last:r?undefined:e===t-1,length:r?undefined:t,parent:n}},h=function(r,i){var a=e.lib.copy(n);a[t.value_var]=i,t.key_var&&(a[t.key_var]=r),a.loop=c(u,o);if(l===undefined||e.expression.parse.apply(f,[l,a]))s.push(e.parse.apply(f,[t.output,a])),u+=1};return i instanceof Array?(o=i.length,e.forEach(i,function(e){var t=u;h(t,e)})):i instanceof Object&&(i._keys!==undefined?a=i._keys:a=Object.keys(i),o=a.length,e.forEach(a,function(e){if(e==="_keys")return;h(e,i[e])})),r=s.length===0,{chain:r,output:s.join("")}}},{type:e.logic.type.endfor,regex:/^endfor$/,next:[],open:!1},{type:e.logic.type.set,regex:/^set\s+([a-zA-Z0-9_,\s]+)\s*=\s*(.+)$/,next:[],open:!0,compile:function(t){var n=t.match[1].trim(),r=t.match[2],i=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:r}]).stack;return t.key=n,t.expression=i,delete t.match,t},parse:function(t,n,r){var i=e.expression.parse.apply(this,[t.expression,n]),s=t.key;return this.context[s]=i,n[s]=i,{chain:r,context:n}}},{type:e.logic.type.setcapture,regex:/^set\s+([a-zA-Z0-9_,\s]+)$/,next:[e.logic.type.endset],open:!0,compile:function(e){var t=e.match[1].trim();return e.key=t,delete e.match,e},parse:function(t,n,r){var i=e.parse.apply(this,[t.output,n]),s=t.key;return this.context[s]=i,n[s]=i,{chain:r,context:n}}},{type:e.logic.type.endset,regex:/^endset$/,next:[],open:!1},{type:e.logic.type.filter,regex:/^filter\s+(.+)$/,next:[e.logic.type.endfilter],open:!0,compile:function(t){var n="|"+t.match[1].trim();return t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,delete t.match,t},parse:function(t,n,r){var i=e.parse.apply(this,[t.output,n]),s=[{type:e.expression.type.string,value:i}].concat(t.stack),o=e.expression.parse.apply(this,[s,n]);return{chain:r,output:o}}},{type:e.logic.type.endfilter,regex:/^endfilter$/,next:[],open:!1},{type:e.logic.type.block,regex:/^block\s+([a-zA-Z0-9_]+)$/,next:[e.logic.type.endblock],open:!0,compile:function(e){return e.block=e.match[1].trim(),delete e.match,e},parse:function(t,n,r){var i="",s="",o=this.blocks[t.block]&&this.blocks[t.block].indexOf(e.placeholders.parent)>-1;if(this.blocks[t.block]===undefined||o||n.loop)i=e.expression.parse.apply(this,[{type:e.expression.type.string,value:e.parse.apply(this,[t.output,n])},n]),o?this.blocks[t.block]=this.blocks[t.block].replace(e.placeholders.parent,i):this.blocks[t.block]=i;return this.child.blocks[t.block]?s=this.child.blocks[t.block]:s=this.blocks[t.block],{chain:r,output:s}}},{type:e.logic.type.endblock,regex:/^endblock(?:\s+([a-zA-Z0-9_]+))?$/,next:[],open:!1},{type:e.logic.type.extends_,regex:/^extends\s+(.+)$/,next:[],open:!0,compile:function(t){var n=t.match[1].trim();return delete t.match,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,t},parse:function(t,n,r){var i=e.expression.parse.apply(this,[t.stack,n]);return this.extend=i,{chain:r,output:""}}},{type:e.logic.type.use,regex:/^use\s+(.+)$/,next:[],open:!0,compile:function(t){var n=t.match[1].trim();return delete t.match,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,t},parse:function(t,n,r){var i=e.expression.parse.apply(this,[t.stack,n]);return this.importBlocks(i),{chain:r,output:""}}},{type:e.logic.type.include,regex:/^include\s+(ignore missing\s+)?(.+?)\s*(?:with\s+(.+?))?\s*(only)?$/,next:[],open:!0,compile:function(t){var n=t.match,r=n[1]!==undefined,i=n[2].trim(),s=n[3],o=n[4]!==undefined&&n[4].length;return delete t.match,t.only=o,t.includeMissing=r,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:i}]).stack,s!==undefined&&(t.withStack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:s.trim()}]).stack),t},parse:function(t,n,r){var i={},s,o,u;if(!t.only)for(o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);if(t.withStack!==undefined){s=e.expression.parse.apply(this,[t.withStack,n]);for(o in s)s.hasOwnProperty(o)&&(i[o]=s[o])}var a=e.expression.parse.apply(this,[t.stack,i]);return u=this.importFile(a),{chain:r,output:u.render(i)}}},{type:e.logic.type.spaceless,regex:/^spaceless$/,next:[e.logic.type.endspaceless],open:!0,parse:function(t,n,r){var i=e.parse.apply(this,[t.output,n]),s=/>\s+</g,o=i.replace(s,"><").trim();return{chain:r,output:o}}},{type:e.logic.type.endspaceless,regex:/^endspaceless$/,next:[],open:!1},{type:e.logic.type.macro,regex:/^macro\s+([a-zA-Z0-9_]+)\s?\((([a-zA-Z0-9_]+(,\s?)?)*)\)$/,next:[e.logic.type.endmacro],open:!0,compile:function(t){var n=t.match[1],r=t.match[2].split(/[ ,]+/);for(var i=0;i<r.length;i++)for(var s=0;s<r.length;s++)if(r[i]===r[s]&&i!==s)throw new e.Error("Duplicate arguments for parameter: "+r[i]);return t.macroName=n,t.parameters=r,delete t.match,t},parse:function(t,n,r){var i=this;return this.macros[t.macroName]=function(){var n={_self:i.macros};for(var r=0;r<t.parameters.length;r++){var s=t.parameters[r];typeof arguments[r]!="undefined"?n[s]=arguments[r]:n[s]=undefined}return e.parse.apply(i,[t.output,n])},{chain:r,output:""}}},{type:e.logic.type.endmacro,regex:/^endmacro$/,next:[],open:!1},{type:e.logic.type.import_,regex:/^import\s+(.+)\s+as\s+([a-zA-Z0-9_]+)$/,next:[],open:!0,compile:function(t){var n=t.match[1].trim(),r=t.match[2].trim();return delete t.match,t.expression=n,t.contextName=r,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,t},parse:function(t,n,r){if(t.expression!=="_self"){var i=e.expression.parse.apply(this,[t.stack,n]),s=this.importMacros(i||t.expression);n[t.contextName]=s.render({},{output:"macros"})}else n[t.contextName]=this.macros;return{chain:r,output:""}}},{type:e.logic.type.from,regex:/^from\s+(.+)\s+import\s+([a-zA-Z0-9_, ]+)$/,next:[],open:!0,compile:function(t){var n=t.match[1].trim(),r=t.match[2].trim().split(/[ ,]+/),i={};for(var s=0;s<r.length;s++){var o=r[s],u=o.match(/^([a-zA-Z0-9_]+)\s+(.+)\s+as\s+([a-zA-Z0-9_]+)$/);u?i[u[1].trim()]=u[2].trim():o.match(/^([a-zA-Z0-9_]+)$/)&&(i[o]=o)}return delete t.match,t.expression=n,t.macroNames=i,t.stack=e.expression.compile.apply(this,[{type:e.expression.type.expression,value:n}]).stack,t},parse:function(t,n,r){var i;if(t.expression!=="_self"){var s=e.expression.parse.apply(this,[t.stack,n]),o=this.importMacros(s||t.expression);i=o.render({},{output:"macros"})}else i=this.macros;for(var u in t.macroNames)i.hasOwnProperty(u)&&(n[t.macroNames[u]]=i[u]);return{chain:r,output:""}}}],e.logic.handler={},e.logic.extendType=function(t,n){n=n||"Twig.logic.type"+t,e.logic.type[t]=n},e.logic.extend=function(t){if(!t.type)throw new e.Error("Unable to extend logic definition. No type provided for "+t);if(e.logic.type[t.type])throw new e.Error("Unable to extend logic definitions. Type "+t.type+" is already defined.");e.logic.extendType(t.type),e.logic.handler[t.type]=t};while(e.logic.definitions.length>0)e.logic.extend(e.logic.definitions.shift());return e.logic.compile=function(t){var n=t.value.trim(),r=e.logic.tokenize.apply(this,[n]),i=e.logic.handler[r.type];return i.compile&&(r=i.compile.apply(this,[r]),e.log.trace("Twig.logic.compile: ","Compiled logic token to ",r)),r},e.logic.tokenize=function(t){var n={},r=null,i=null,s=null,o=null,u=null,a=null;t=t.trim();for(r in e.logic.handler)if(e.logic.handler.hasOwnProperty(r)){i=e.logic.handler[r].type,s=e.logic.handler[r].regex,o=[],s instanceof Array?o=s:o.push(s);while(o.length>0){u=o.shift(),a=u.exec(t.trim());if(a!==null)return n.type=i,n.match=a,e.log.trace("Twig.logic.tokenize: ","Matched a ",i," regular expression of ",a),n}}throw new e.Error("Unable to parse '"+t.trim()+"'")},e.logic.parse=function(t,n,r){var i="",s;return n=n||{},e.log.debug("Twig.logic.parse: ","Parsing logic token ",t),s=e.logic.handler[t.type],s.parse&&(i=s.parse.apply(this,[t,n,r])),i},e}(Twig||{}),Twig=function(e){e.expression={},e.expression.reservedWords=["true","false","null","_context"],e.expression.type={comma:"Twig.expression.type.comma",operator:{unary:"Twig.expression.type.operator.unary",binary:"Twig.expression.type.operator.binary"},string:"Twig.expression.type.string",bool:"Twig.expression.type.bool",array:{start:"Twig.expression.type.array.start",end:"Twig.expression.type.array.end"},object:{start:"Twig.expression.type.object.start",end:"Twig.expression.type.object.end"},parameter:{start:"Twig.expression.type.parameter.start",end:"Twig.expression.type.parameter.end"},key:{period:"Twig.expression.type.key.period",brackets:"Twig.expression.type.key.brackets"},filter:"Twig.expression.type.filter",_function:"Twig.expression.type._function",variable:"Twig.expression.type.variable",number:"Twig.expression.type.number",_null:"Twig.expression.type.null",context:"Twig.expression.type.context",test:"Twig.expression.type.test"},e.expression.set={operations:[e.expression.type.filter,e.expression.type.operator.unary,e.expression.type.operator.binary,e.expression.type.array.end,e.expression.type.object.end,e.expression.type.parameter.end,e.expression.type.comma,e.expression.type.test],expressions:[e.expression.type._function,e.expression.type.bool,e.expression.type.string,e.expression.type.variable,e.expression.type.number,e.expression.type._null,e.expression.type.context,e.expression.type.parameter.start,e.expression.type.array.start,e.expression.type.object.start]},e.expression.set.operations_extended=e.expression.set.operations.concat([e.expression.type.key.period,e.expression.type.key.brackets]),e.expression.fn={compile:{push:function(e,t,n){n.push(e)},push_both:function(e,t,n){n.push(e),t.push(e)}},parse:{push:function(e,t,n){t.push(e)},push_value:function(e,t,n){t.push(e.value)}}},e.expression.definitions=[{type:e.expression.type.test,regex:/^is\s+(not)?\s*([a-zA-Z_][a-zA-Z0-9_]*)/,next:e.expression.set.operations.concat([e.expression.type.parameter.start]),compile:function(e,t,n){e.filter=e.match[2],e.modifier=e.match[1],delete e.match,delete e.value,n.push(e)},parse:function(t,n,r){var i=n.pop(),s=t.params&&e.expression.parse.apply(this,[t.params,r]),o=e.test(t.filter,i,s);t.modifier=="not"?n.push(!o):n.push(o)}},{type:e.expression.type.comma,regex:/^,/,next:e.expression.set.expressions.concat([e.expression.type.array.end,e.expression.type.object.end]),compile:function(t,n,r){var i=n.length-1,s;delete t.match,delete t.value;for(;i>=0;i--){s=n.pop();if(s.type===e.expression.type.object.start||s.type===e.expression.type.parameter.start||s.type===e.expression.type.array.start){n.push(s);break}r.push(s)}r.push(t)}},{type:e.expression.type.operator.binary,regex:/(^[\+\-~%\?\:]|^[!=]==?|^[!<>]=?|^\*\*?|^\/\/?|^and\s+|^or\s+|^in\s+|^not in\s+|^\.\.)/,next:e.expression.set.expressions.concat([e.expression.type.operator.unary]),compile:function(t,n,r){delete t.match,t.value=t.value.trim();var i=t.value,s=e.expression.operator.lookup(i,t);e.log.trace("Twig.expression.compile: ","Operator: ",s," from ",i);while(n.length>0&&(n[n.length-1].type==e.expression.type.operator.unary||n[n.length-1].type==e.expression.type.operator.binary)&&(s.associativity===e.expression.operator.leftToRight&&s.precidence>=n[n.length-1].precidence||s.associativity===e.expression.operator.rightToLeft&&s.precidence>n[n.length-1].precidence)){var o=n.pop();r.push(o)}if(i===":"){if(!n[n.length-1]||n[n.length-1].value!=="?"){var u=r.pop();if(u.type!==e.expression.type.string&&u.type!==e.expression.type.variable&&u.type!==e.expression.type.number)throw new e.Error("Unexpected value before ':' of "+u.type+" = "+u.value);t.key=u.value,r.push(t);return}}else n.push(s)},parse:function(t,n,r){t.key?n.push(t):e.expression.operator.parse(t.value,n)}},{type:e.expression.type.operator.unary,regex:/(^not\s+)/,next:e.expression.set.expressions,compile:function(t,n,r){delete t.match,t.value=t.value.trim();var i=t.value,s=e.expression.operator.lookup(i,t);e.log.trace("Twig.expression.compile: ","Operator: ",s," from ",i);while(n.length>0&&(n[n.length-1].type==e.expression.type.operator.unary||n[n.length-1].type==e.expression.type.operator.binary)&&(s.associativity===e.expression.operator.leftToRight&&s.precidence>=n[n.length-1].precidence||s.associativity===e.expression.operator.rightToLeft&&s.precidence>n[n.length-1].precidence)){var o=n.pop();r.push(o)}n.push(s)},parse:function(t,n,r){e.expression.operator.parse(t.value,n)}},{type:e.expression.type.string,regex:/^(["'])(?:(?=(\\?))\2.)*?\1/,next:e.expression.set.operations,compile:function(t,n,r){var i=t.value;delete t.match,i.substring(0,1)==='"'?i=i.replace('\\"','"'):i=i.replace("\\'","'"),t.value=i.substring(1,i.length-1).replace(/\\n/g,"\n").replace(/\\r/g,"\r"),e.log.trace("Twig.expression.compile: ","String value: ",t.value),r.push(t)},parse:e.expression.fn.parse.push_value},{type:e.expression.type.parameter.start,regex:/^\(/,next:e.expression.set.expressions.concat([e.expression.type.parameter.end]),compile:e.expression.fn.compile.push_both,parse:e.expression.fn.parse.push},{type:e.expression.type.parameter.end,regex:/^\)/,next:e.expression.set.operations_extended,compile:function(t,n,r){var i,s=t;i=n.pop();while(n.length>0&&i.type!=e.expression.type.parameter.start)r.push(i),i=n.pop();var o=[];while(t.type!==e.expression.type.parameter.start)o.unshift(t),t=r.pop();o.unshift(t);var u=!1;t=r[r.length-1],t===undefined||t.type!==e.expression.type._function&&t.type!==e.expression.type.filter&&t.type!==e.expression.type.test&&t.type!==e.expression.type.key.brackets&&t.type!==e.expression.type.key.period?(s.expression=!0,o.pop(),o.shift(),s.params=o,r.push(s)):(s.expression=!1,t.params=o)},parse:function(t,n,r){var i=[],s=!1,o=null;if(t.expression)o=e.expression.parse.apply(this,[t.params,r]),n.push(o);else{while(n.length>0){o=n.pop();if(o&&o.type&&o.type==e.expression.type.parameter.start){s=!0;break}i.unshift(o)}if(!s)throw new e.Error("Expected end of parameter set.");n.push(i)}}},{type:e.expression.type.array.start,regex:/^\[/,next:e.expression.set.expressions.concat([e.expression.type.array.end]),compile:e.expression.fn.compile.push_both,parse:e.expression.fn.parse.push},{type:e.expression.type.array.end,regex:/^\]/,next:e.expression.set.operations_extended,compile:function(t,n,r){var i=n.length-1,s;for(;i>=0;i--){s=n.pop();if(s.type===e.expression.type.array.start)break;r.push(s)}r.push(t)},parse:function(t,n,r){var i=[],s=!1,o=null;while(n.length>0){o=n.pop();if(o.type&&o.type==e.expression.type.array.start){s=!0;break}i.unshift(o)}if(!s)throw new e.Error("Expected end of array.");n.push(i)}},{type:e.expression.type.object.start,regex:/^\{/,next:e.expression.set.expressions.concat([e.expression.type.object.end]),compile:e.expression.fn.compile.push_both,parse:e.expression.fn.parse.push},{type:e.expression.type.object.end,regex:/^\}/,next:e.expression.set.operations_extended,compile:function(t,n,r){var i=n.length-1,s;for(;i>=0;i--){s=n.pop();if(s&&s.type===e.expression.type.object.start)break;r.push(s)}r.push(t)},parse:function(t,n,r){var i={},s=!1,o=null,u=null,a=!1,f=null;while(n.length>0){o=n.pop();if(o&&o.type&&o.type===e.expression.type.object.start){s=!0;break}if(o&&o.type&&(o.type===e.expression.type.operator.binary||o.type===e.expression.type.operator.unary)&&o.key){if(!a)throw new e.Error("Missing value for key '"+o.key+"' in object definition.");i[o.key]=f,i._keys===undefined&&(i._keys=[]),i._keys.unshift(o.key),f=null,a=!1}else a=!0,f=o}if(!s)throw new e.Error("Unexpected end of object.");n.push(i)}},{type:e.expression.type.filter,regex:/^\|\s?([a-zA-Z_][a-zA-Z0-9_\-]*)/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:function(e,t,n){e.value=e.match[1],n.push(e)},parse:function(t,n,r){var i=n.pop(),s=t.params&&e.expression.parse.apply(this,[t.params,r]);n.push(e.filter.apply(this,[t.value,i,s]))}},{type:e.expression.type._function,regex:/^([a-zA-Z_][a-zA-Z0-9_]*)\s*\(/,next:e.expression.type.parameter.start,transform:function(e,t){return"("},compile:function(e,t,n){var r=e.match[1];e.fn=r,delete e.match,delete e.value,n.push(e)},parse:function(t,n,r){var i=t.params&&e.expression.parse.apply(this,[t.params,r]),s=t.fn,o;if(e.functions[s])o=e.functions[s].apply(this,i);else{if(typeof r[s]!="function")throw new e.Error(s+" function does not exist and is not defined in the context");o=r[s].apply(r,i)}n.push(o)}},{type:e.expression.type.variable,regex:/^[a-zA-Z_][a-zA-Z0-9_]*/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:e.expression.fn.compile.push,validate:function(t,n){return e.indexOf(e.expression.reservedWords,t[0])<0},parse:function(t,n,r){var i=e.expression.resolve(r[t.value],r);n.push(i)}},{type:e.expression.type.key.period,regex:/^\.([a-zA-Z0-9_]+)/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:function(e,t,n){e.key=e.match[1],delete e.match,delete e.value,n.push(e)},parse:function(t,n,r){var i=t.params&&e.expression.parse.apply(this,[t.params,r]),s=t.key,o=n.pop(),u;if(o===null||o===undefined){if(this.options.strict_variables)throw new e.Error("Can't access a key "+s+" on an null or undefined object.");return null}var a=function(e){return e.substr(0,1).toUpperCase()+e.substr(1)};typeof o=="object"&&s in o?u=o[s]:o["get"+a(s)]!==undefined?u=o["get"+a(s)]:o["is"+a(s)]!==undefined?u=o["is"+a(s)]:u=null,n.push(e.expression.resolve(u,o,i))}},{type:e.expression.type.key.brackets,regex:/^\[([^\]]*)\]/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:function(t,n,r){var i=t.match[1];delete t.value,delete t.match,t.stack=e.expression.compile({value:i}).stack,r.push(t)},parse:function(t,n,r){var i=t.params&&e.expression.parse.apply(this,[t.params,r]),s=e.expression.parse.apply(this,[t.stack,r]),o=n.pop(),u;if(o===null||o===undefined){if(this.options.strict_variables)throw new e.Error("Can't access a key "+s+" on an null or undefined object.");return null}typeof o=="object"&&s in o?u=o[s]:u=null,n.push(e.expression.resolve(u,o,i))}},{type:e.expression.type._null,regex:/^null/,next:e.expression.set.operations,compile:function(e,t,n){delete e.match,e.value=null,n.push(e)},parse:e.expression.fn.parse.push_value},{type:e.expression.type.context,regex:/^_context/,next:e.expression.set.operations_extended.concat([e.expression.type.parameter.start]),compile:e.expression.fn.compile.push,parse:function(e,t,n){t.push(n)}},{type:e.expression.type.number,regex:/^\-?\d+(\.\d+)?/,next:e.expression.set.operations,compile:function(e,t,n){e.value=Number(e.value),n.push(e)},parse:e.expression.fn.parse.push_value},{type:e.expression.type.bool,regex:/^(true|false)/,next:e.expression.set.operations,compile:function(e,t,n){e.value=e.match[0]=="true",delete e.match,n.push(e)},parse:e.expression.fn.parse.push_value}],e.expression.resolve=function(e,t,n){return typeof e=="function"?e.apply(t,n||[]):e},e.expression.handler={},e.expression.extendType=function(t){e.expression.type[t]="Twig.expression.type."+t},e.expression.extend=function(t){if(!t.type)throw new e.Error("Unable to extend logic definition. No type provided for "+t);e.expression.handler[t.type]=t};while(e.expression.definitions.length>0)e.expression.extend(e.expression.definitions.shift());return e.expression.tokenize=function(t){var n=[],r=0,i=null,s,o,u,a,f,l=[],c;c=function(){var t=Array.prototype.slice.apply(arguments),o=t.pop(),u=t.pop();return e.log.trace("Twig.expression.tokenize","Matched a ",s," regular expression of ",t),i&&e.indexOf(i,s)<0?(l.push(s+" cannot follow a "+n[n.length-1].type+" at template:"+r+" near '"+t[0].substring(0,20)+"...'"),t[0]):e.expression.handler[s].validate&&!e.expression.handler[s].validate(t,n)?t[0]:(l=[],n.push({type:s,value:t[0],match:t}),f=!0,i=a,r+=t[0].length,e.expression.handler[s].transform?e.expression.handler[s].transform(t,n):"")},e.log.debug("Twig.expression.tokenize","Tokenizing expression ",t);while(t.length>0){t=t.trim();for(s in e.expression.handler)if(e.expression.handler.hasOwnProperty(s)){a=e.expression.handler[s].next,o=e.expression.handler[s].regex,o instanceof Array?u=o:u=[o],f=!1;while(u.length>0)o=u.pop(),t=t.replace(o,c);if(f)break}if(!f)throw l.length>0?new e.Error(l.join(" OR ")):new e.Error("Unable to parse '"+t+"' at template position"+r)}return e.log.trace("Twig.expression.tokenize","Tokenized to ",n),n},e.expression.compile=function(t){var n=t.value,r=e.expression.tokenize(n),i=null,s=[],o=[],u=null;e.log.trace("Twig.expression.compile: ","Compiling ",n);while(r.length>0)i=r.shift(),u=e.expression.handler[i.type],e.log.trace("Twig.expression.compile: ","Compiling ",i),u.compile&&u.compile(i,o,s),e.log.trace("Twig.expression.compile: ","Stack is",o),e.log.trace("Twig.expression.compile: ","Output is",s);while(o.length>0)s.push(o.pop());return e.log.trace("Twig.expression.compile: ","Final output is",s),t.stack=s,delete t.value,t},e.expression.parse=function(t,n){var r=this;t instanceof Array||(t=[t]);var i=[],s=null;return e.forEach(t,function(t){s=e.expression.handler[t.type],s.parse&&s.parse.apply(r,[t,i,n])}),i.pop()},e}(Twig||{}),Twig=function(e){e.expression.operator={leftToRight:"leftToRight",rightToLeft:"rightToLeft"};var t=function(e,t){if(t.indexOf!==undefined)return e===t||e!==""&&t.indexOf(e)>-1;var n;for(n in t)if(t.hasOwnProperty(n)&&t[n]===e)return!0;return!1};return e.expression.operator.lookup=function(t,n){switch(t){case"..":case"not in":case"in":n.precidence=20,n.associativity=e.expression.operator.leftToRight;break;case",":n.precidence=18,n.associativity=e.expression.operator.leftToRight;break;case"?":case":":n.precidence=16,n.associativity=e.expression.operator.rightToLeft;break;case"or":n.precidence=14,n.associativity=e.expression.operator.leftToRight;break;case"and":n.precidence=13,n.associativity=e.expression.operator.leftToRight;break;case"==":case"!=":n.precidence=9,n.associativity=e.expression.operator.leftToRight;break;case"<":case"<=":case">":case">=":n.precidence=8,n.associativity=e.expression.operator.leftToRight;break;case"~":case"+":case"-":n.precidence=6,n.associativity=e.expression.operator.leftToRight;break;case"//":case"**":case"*":case"/":case"%":n.precidence=5,n.associativity=e.expression.operator.leftToRight;break;case"not":n.precidence=3,n.associativity=e.expression.operator.rightToLeft;break;default:throw new e.Error(t+" is an unknown operator.")}return n.operator=t,n},e.expression.operator.parse=function(n,r){e.log.trace("Twig.expression.operator.parse: ","Handling ",n);var i,s,o;switch(n){case":":break;case"?":o=r.pop(),s=r.pop(),i=r.pop(),i?r.push(s):r.push(o);break;case"+":s=parseFloat(r.pop()),i=parseFloat(r.pop()),r.push(i+s);break;case"-":s=parseFloat(r.pop()),i=parseFloat(r.pop()),r.push(i-s);break;case"*":s=parseFloat(r.pop()),i=parseFloat(r.pop()),r.push(i*s);break;case"/":s=parseFloat(r.pop()),i=parseFloat(r.pop()),r.push(i/s);break;case"//":s=parseFloat(r.pop()),i=parseFloat(r.pop()),r.push(parseInt(i/s));break;case"%":s=parseFloat(r.pop()),i=parseFloat(r.pop()),r.push(i%s);break;case"~":s=r.pop(),i=r.pop(),r.push((i!==undefined?i.toString():"")+(s!==undefined?s.toString():""));break;case"not":case"!":r.push(!r.pop());break;case"<":s=r.pop(),i=r.pop(),r.push(i<s);break;case"<=":s=r.pop(),i=r.pop(),r.push(i<=s);break;case">":s=r.pop(),i=r.pop(),r.push(i>s);break;case">=":s=r.pop(),i=r.pop(),r.push(i>=s);break;case"===":s=r.pop(),i=r.pop(),r.push(i===s);break;case"==":s=r.pop(),i=r.pop(),r.push(i==s);break;case"!==":s=r.pop(),i=r.pop(),r.push(i!==s);break;case"!=":s=r.pop(),i=r.pop(),r.push(i!=s);break;case"or":s=r.pop(),i=r.pop(),r.push(i||s);break;case"and":s=r.pop(),i=r.pop(),r.push(i&&s);break;case"**":s=r.pop(),i=r.pop(),r.push(Math.pow(i,s));break;case"not in":s=r.pop(),i=r.pop(),r.push(!t(i,s));break;case"in":s=r.pop(),i=r.pop(),r.push(t(i,s));break;case"..":s=r.pop(),i=r.pop(),r.push(e.functions.range(i,s));break;default:throw new e.Error(n+" is an unknown operator.")}},e}(Twig||{}),Twig=function(e){function t(e,t){var n=Object.prototype.toString.call(t).slice(8,-1);return t!==undefined&&t!==null&&n===e}return e.filters={upper:function(e){return typeof e!="string"?e:e.toUpperCase()},lower:function(e){return typeof e!="string"?e:e.toLowerCase()},capitalize:function(e){return typeof e!="string"?e:e.substr(0,1).toUpperCase()+e.toLowerCase().substr(1)},title:function(e){return typeof e!="string"?e:e.toLowerCase().replace(/(^|\s)([a-z])/g,function(e,t,n){return t+n.toUpperCase()})},length:function(t){return e.lib.is("Array",t)||typeof t=="string"?t.length:e.lib.is("Object",t)?t._keys===undefined?Object.keys(t).length:t._keys.length:0},reverse:function(e){if(t("Array",e))return e.reverse();if(t("String",e))return e.split("").reverse().join("");if(e instanceof Object){var n=e._keys||Object.keys(e).reverse();return e._keys=n,e}},sort:function(e){if(t("Array",e))return e.sort();if(e instanceof Object){delete e._keys;var n=Object.keys(e),r=n.sort(function(t,n){return e[t]>e[n]});return e._keys=r,e}},keys:function(t){if(t===undefined||t===null)return;var n=t._keys||Object.keys(t),r=[];return e.forEach(n,function(e){if(e==="_keys")return;t.hasOwnProperty(e)&&r.push(e)}),r},url_encode:function(e){if(e===undefined||e===null)return;return encodeURIComponent(e)},join:function(t,n){if(t===undefined||t===null)return;var r="",i=[],s=null;return n&&n[0]&&(r=n[0]),t instanceof Array?i=t:(s=t._keys||Object.keys(t),e.forEach(s,function(e){if(e==="_keys")return;t.hasOwnProperty(e)&&i.push(t[e])})),i.join(r)},"default":function(t,n){if(n===undefined||n.length!==1)throw new e.Error("default filter expects one argument");return t===undefined||t===null||t===""?n[0]:t},json_encode:function(e){return e&&e.hasOwnProperty("_keys")&&delete e._keys,e===undefined||e===null?"null":JSON.stringify(e)},merge:function(t,n){var r=[],i=0,s=[];t instanceof Array?e.forEach(n,function(e){e instanceof Array||(r={})}):r={},r instanceof Array||(r._keys=[]),t instanceof Array?e.forEach(t,function(e){r._keys&&r._keys.push(i),r[i]=e,i++}):(s=t._keys||Object.keys(t),e.forEach(s,function(e){r[e]=t[e],r._keys.push(e);var n=parseInt(e,10);!isNaN(n)&&n>=i&&(i=n+1)})),e.forEach(n,function(t){t instanceof Array?e.forEach(t,function(e){r._keys&&r._keys.push(i),r[i]=e,i++}):(s=t._keys||Object.keys(t),e.forEach(s,function(e){r[e]||r._keys.push(e),r[e]=t[e];var n=parseInt(e,10);!isNaN(n)&&n>=i&&(i=n+1)}))});if(n.length===0)throw new e.Error("Filter merge expects at least one parameter");return r},date:function(t,n){if(t===undefined||t===null)return;var r=e.functions.date(t);return e.lib.formatDate(r,n[0])},date_modify:function(t,n){if(t===undefined||t===null)return;if(n===undefined||n.length!==1)throw new e.Error("date_modify filter expects 1 argument");var r=n[0],i;return e.lib.is("Date",t)&&(i=e.lib.strtotime(r,t.getTime()/1e3)),e.lib.is("String",t)&&(i=e.lib.strtotime(r,e.lib.strtotime(t))),e.lib.is("Number",t)&&(i=e.lib.strtotime(r,t)),new Date(i*1e3)},replace:function(t,n){if(t===undefined||t===null)return;var r=n[0],i;for(i in r)r.hasOwnProperty(i)&&i!=="_keys"&&(t=e.lib.replaceAll(t,i,r[i]));return t},format:function(t,n){if(t===undefined||t===null)return;return e.lib.vsprintf(t,n)},striptags:function(t){if(t===undefined||t===null)return;return e.lib.strip_tags(t)},escape:function(e){if(e===undefined||e===null)return;return e.toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},e:function(t){return e.filters.escape(t)},nl2br:function(t){if(t===undefined||t===null)return;var n="BACKSLASH_n_replace",r="<br />"+n;return t=e.filters.escape(t).replace(/\r\n/g,r).replace(/\r/g,r).replace(/\n/g,r),e.lib.replaceAll(t,n,"\n")},number_format:function(e,t){var n=e,r=t&&t[0]?t[0]:undefined,i=t&&t[1]!==undefined?t[1]:".",s=t&&t[2]!==undefined?t[2]:",";n=(n+"").replace(/[^0-9+\-Ee.]/g,"");var o=isFinite(+n)?+n:0,u=isFinite(+r)?Math.abs(r):0,a="",f=function(e,t){var n=Math.pow(10,t);return""+Math.round(e*n)/n};return a=(u?f(o,u):""+Math.round(o)).split("."),a[0].length>3&&(a[0]=a[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,s)),(a[1]||"").length<u&&(a[1]=a[1]||"",a[1]+=(new Array(u-a[1].length+1)).join("0")),a.join(i)},trim:function(t,n){if(t===undefined||t===null)return;var r=e.filters.escape(""+t),i;n&&n[0]?i=""+n[0]:i=" \n\r \f \u2028\u2029 ";for(var s=0;s<r.length;s++)if(i.indexOf(r.charAt(s))===-1){r=r.substring(s);break}for(s=r.length-1;s>=0;s--)if(i.indexOf(r.charAt(s))===-1){r=r.substring(0,s+1);break}return i.indexOf(r.charAt(0))===-1?r:""},slice:function(t,n){if(t===undefined||t===null)return;if(n===undefined||n.length<1)throw new e.Error("slice filter expects at least 1 argument");var r=n[0]||0,i=n.length>1?n[1]:t.length,s=r>=0?r:Math.max(t.length+r,0);if(e.lib.is("Array",t)){var o=[];for(var u=s;u<s+i&&u<t.length;u++)o.push(t[u]);return o}if(e.lib.is("String",t))return t.substr(s,i);throw new e.Error("slice filter expects value to be an array or string")},abs:function(e){if(e===undefined||e===null)return;return Math.abs(e)},first:function(e){if(e instanceof Array)return e[0];if(e instanceof Object){if("_keys"in e)return e[e._keys[0]]}else if(typeof e=="string")return e.substr(0,1);return},split:function(t,n){if(t===undefined||t===null)return;if(n===undefined||n.length<1||n.length>2)throw new e.Error("split filter expects 1 or 2 argument");if(e.lib.is("String",t)){var r=n[0],i=n[1],s=t.split(r);if(i===undefined)return s;if(i<0)return t.split(r,s.length+i);var o=[];if(r=="")while(s.length>0){var u="";for(var a=0;a<i&&s.length>0;a++)u+=s.shift();o.push(u)}else{for(var a=0;a<i-1&&s.length>0;a++)o.push(s.shift());s.length>0&&o.push(s.join(r))}return o}throw new e.Error("split filter expects value to be a string")},last:function(t){if(e.lib.is("Object",t)){var n;return t._keys===undefined?n=Object.keys(t):n=t._keys,t[n[n.length-1]]}return t[t.length-1]},raw:function(e){return e},batch:function(t,n){var r=n.shift(),i=n.shift(),s,o,u;if(!e.lib.is("Array",t))throw new e.Error("batch filter expects items to be an array");if(!e.lib.is("Number",r))throw new e.Error("batch filter expects size to be a number");r=Math.ceil(r),s=e.lib.chunkArray(t,r);if(i&&t.length%r!=0){o=s.pop(),u=r-o.length;while(u--)o.push(i);s.push(o)}return s},round:function(t,n){n=n||[];var r=n.length>0?n[0]:0,i=n.length>1?n[1]:"common";t=parseFloat(t);if(r&&!e.lib.is("Number",r))throw new e.Error("round filter expects precision to be a number");if(i==="common")return e.lib.round(t,r);if(!e.lib.is("Function",Math[i]))throw new e.Error("round filter expects method to be 'floor', 'ceil', or 'common'");return Math[i](t*Math.pow(10,r))/Math.pow(10,r)}},e.filter=function(t,n,r){if(!e.filters[t])throw"Unable to find filter "+t;return e.filters[t].apply(this,[n,r])},e.filter.extend=function(t,n){e.filters[t]=n},e}(Twig||{}),Twig=function(e){function t(e,t){var n=Object.prototype.toString.call(t).slice(8,-1);return t!==undefined&&t!==null&&n===e}return e.functions={range:function(e,t,n){var r=[],i,s,o,u=n||1,a=!1;!isNaN(e)&&!isNaN(t)?(i=parseInt(e,10),s=parseInt(t,10)):isNaN(e)&&isNaN(t)?(a=!0,i=e.charCodeAt(0),s=t.charCodeAt(0)):(i=isNaN(e)?0:e,s=isNaN(t)?0:t),o=i>s?!1:!0;if(o)while(i<=s)r.push(a?String.fromCharCode(i):i),i+=u;else while(i>=s)r.push(a?String.fromCharCode(i):i),i-=u;return r},cycle:function(e,t){var n=t%e.length;return e[n]},dump:function(){var t="\n",n=" ",r=0,i="",s=Array.prototype.slice.call(arguments),o=function(e){var t="";while(e>0)e--,t+=n;return t},u=function(e){i+=o(r),typeof e=="object"?a(e):typeof e=="function"?i+="function()"+t:typeof e=="string"?i+="string("+e.length+') "'+e+'"'+t:typeof e=="number"?i+="number("+e+")"+t:typeof e=="boolean"&&(i+="bool("+e+")"+t)},a=function(e){var n;if(e===null)i+="NULL"+t;else if(e===undefined)i+="undefined"+t;else if(typeof e=="object"){i+=o(r)+typeof e,r++,i+="("+function(e){var t=0,n;for(n in e)e.hasOwnProperty(n)&&t++;return t}(e)+") {"+t;for(n in e)i+=o(r)+"["+n+"]=> "+t,u(e[n]);r--,i+=o(r)+"}"+t}else u(e)};return s.length==0&&s.push(this.context),e.forEach(s,function(e){a(e)}),i},date:function(t,n){var r;if(t===undefined)r=new Date;else if(e.lib.is("Date",t))r=t;else if(e.lib.is("String",t))r=new Date(e.lib.strtotime(t)*1e3);else{if(!e.lib.is("Number",t))throw new e.Error("Unable to parse date "+t);r=new Date(t*1e3)}return r},block:function(e){return this.blocks[e]},parent:function(){return e.placeholders.parent},attribute:function(e,t,n){return e instanceof Object&&e.hasOwnProperty(t)?typeof e[t]=="function"?e[t].apply(undefined,n):e[t]:e[t]||undefined}},e._function=function(t,n,r){if(!e.functions[t])throw"Unable to find function "+t;return e.functions[t](n,r)},e._function.extend=function(t,n){e.functions[t]=n},e}(Twig||{}),Twig=function(e){return e.tests={empty:function(e){if(e===null||e===undefined)return!0;if(typeof e=="number")return!1;if(e.length&&e.length>0)return!1;for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},odd:function(e){return e%2===1},even:function(e){return e%2===0},divisibleby:function(e,t){return e%t[0]===0},defined:function(e){return e!==undefined},none:function(e){return e===null},"null":function(e){return this.none(e)},sameas:function(e,t){return e===t[0]}},e.test=function(t,n,r){if(!e.tests[t])throw"Test "+t+" is not defined.";return e.tests[t](n,r)},e.test.extend=function(t,n){e.tests[t]=n},e}(Twig||{}),Twig=function(e){return e.exports={VERSION:e.VERSION},e.exports.twig=function(n){var r=n.id,i={strict_variables:n.strict_variables||!1,allowInlineIncludes:n.allowInlineIncludes||!1,rethrow:n.rethrow||!1};r&&e.validateId(r),n.debug!==undefined&&(e.debug=n.debug),n.trace!==undefined&&(e.trace=n.trace);if(n.data!==undefined)return new e.Template({data:n.data,module:n.module,id:r,options:i});if(n.ref!==undefined){if(n.id!==undefined)throw new e.Error("Both ref and id cannot be set on a twig.js template.");return e.Templates.load(n.ref)}if(n.href!==undefined)return e.Templates.loadRemote(n.href,{id:r,method:"ajax",base:n.base,module:n.module,precompiled:n.precompiled,async:n.async,options:i},n.load,n.error);if(n.path!==undefined)return e.Templates.loadRemote(n.path,{id:r,method:"fs",base:n.base,module:n.module,precompiled:n.precompiled,async:n.async,options:i},n.load,n.error)},e.exports.extendFilter=function(t,n){e.filter.extend(t,n)},e.exports.extendFunction=function(t,n){e._function.extend(t,n)},e.exports.extendTest=function(t,n){e.test.extend(t,n)},e.exports.extendTag=function(t){e.logic.extend(t)},e.exports.extend=function(t){t(e)},e.exports.compile=function(t,n){var r=n.filename,i=n.filename,s;return s=new e.Template({data:t,path:i,id:r,options:n.settings["twig options"]}),function(e){return s.render(e)}},e.exports.renderFile=function(t,n,r){"function"==typeof n&&(r=n,n={}),n=n||{};var i={path:t,base:n.settings.views,load:function(e){r(null,e.render(n))}},s=n.settings["twig options"];if(s)for(var o in s)s.hasOwnProperty(o)&&(i[o]=s[o]);e.exports.twig(i)},e.exports.__express=e.exports.renderFile,e.exports.cache=function(t){e.cache=t},e}(Twig||{}),Twig=function(e){return e.compiler={module:{}},e.compiler.compile=function(t,n){var r=JSON.stringify(t.tokens),i=t.id,s;if(n.module){if(e.compiler.module[n.module]===undefined)throw new e.Error("Unable to find module type "+n.module);s=e.compiler.module[n.module](i,r,n.twig)}else s=e.compiler.wrap(i,r);return s},e.compiler.module={amd:function(t,n,r){return'define(["'+r+'"], function (Twig) {\n var twig, templates;\ntwig = Twig.twig;\ntemplates = '+e.compiler.wrap(t,n)+"\n return templates;\n});"},node:function(t,n){return'var twig = require("twig").twig;\nexports.template = '+e.compiler.wrap(t,n)},cjs2:function(t,n,r){return'module.declare([{ twig: "'+r+'" }], function (require, exports, module) {\n'+' var twig = require("twig").twig;\n'+" exports.template = "+e.compiler.wrap(t,n)+"\n});"}},e.compiler.wrap=function(e,t){return'twig({id:"'+e.replace('"','\\"')+'", data:'+t+", precompiled: true});\n"},e}(Twig||{});typeof module!="undefined"&&module.declare?module.declare([],function(e,t,n){for(key in Twig.exports)Twig.exports.hasOwnProperty(key)&&(t[key]=Twig.exports[key])}):typeof define=="function"&&define.amd||1?timely.define("external_libs/twig",[],function(){return Twig.exports}):typeof module!="undefined"&&module.exports?module.exports=Twig.exports:(window.twig=Twig.exports.twig,window.Twig=Twig.exports),timely.define("agenda",["external_libs/twig","agenda"],function(e){var t,n;return t=e.twig,n=t({id:"../js_src/agenda.twig",data:[{type:"output",stack:[{type:"Twig.expression.type.variable",value:"navigation",match:["navigation"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n\n<div class="ai1ec-agenda-view">\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"dates",match:["dates"]},{type:"Twig.expression.type.test",filter:"empty"}],output:[{type:"raw",value:' <p class="ai1ec-no-results">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_upcoming_events",match:["text_upcoming_events"]}]},{type:"raw",value:"\n </p>\n "}]}},{type:"logic",token:{type:"Twig.logic.type.else",match:["else"],output:[{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:"date",value_var:"date_info",expression:[{type:"Twig.expression.type.variable",value:"dates",match:["dates"]}],output:[{type:"raw",value:' <div class="ai1ec-date\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"today"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:"ai1ec-today"}]}},{type:"raw",value:'">\n <a class="ai1ec-date-title ai1ec-load-view"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"href"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"data_type",match:["data_type"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'>\n <div class="ai1ec-month">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"month"}]},{type:"raw",value:'</div>\n <div class="ai1ec-day">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"day"}]},{type:"raw",value:'</div>\n <div class="ai1ec-weekday">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"weekday"}]},{type:"raw",value:"</div>\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_year_in_agenda_dates",match:["show_year_in_agenda_dates"]}],output:[{type:"raw",value:' <div class="ai1ec-year">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"year"}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:' </a>\n <div class="ai1ec-date-events">\n '},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"category",expression:[{type:"Twig.expression.type.variable",value:"date_info",match:["date_info"]},{type:"Twig.expression.type.key.period",key:"events"}],output:[{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"event",expression:[{type:"Twig.expression.type.variable",value:"category",match:["category"]}],output:[{type:"raw",value:' <div class="ai1ec-event\n ai1ec-event-id-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_id"}]},{type:"raw",value:"\n ai1ec-event-instance-id-"},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_id"}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"is_allday"}],output:[{type:"raw",value:"ai1ec-allday"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"expanded",match:["expanded"]}],output:[{type:"raw",value:"ai1ec-expanded"}]}},{type:"raw",value:'">\n\n <div class="ai1ec-event-header">\n <div class="ai1ec-event-toggle">\n <i class="ai1ec-fa ai1ec-fa-minus-circle ai1ec-fa-lg"></i>\n <i class="ai1ec-fa ai1ec-fa-plus-circle ai1ec-fa-lg"></i>\n </div>\n <span class="ai1ec-event-title">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_title"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_location_in_title",match:["show_location_in_title"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <span class="ai1ec-event-location"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_venue_separator",match:["text_venue_separator"]},{type:"Twig.expression.type.filter",value:"format",match:["| format","format"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"venue"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:"</span>\n "}]}},{type:"raw",value:" </span>\n\n "},{type:"logic",token:{type:"Twig.logic.type.set",key:"edit_post_link",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"edit_post_link"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"edit_post_link",match:["edit_post_link"]},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:' <a class="post-edit-link" href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"edit_post_link",match:["edit_post_link"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'">\n <i class="ai1ec-fa ai1ec-fa-pencil"></i> '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_edit",match:["text_edit"]}]},{type:"raw",value:"\n </a>\n "}]}},{type:"raw",value:'\n <div class="ai1ec-event-time">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"timespan_short"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </div>\n </div>\n\n "},{type:"raw",value:'\n <div class="ai1ec-event-summary '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"expanded",match:["expanded"]}],output:[{type:"raw",value:"ai1ec-expanded"}]}},{type:"raw",value:'">\n\n <div class="ai1ec-event-description">\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"content_img_url"},{type:"Twig.expression.type.test",filter:"empty"}],output:[{type:"raw",value:" "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"avatar"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n "}]}},{type:"raw",value:" "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"filtered_content"},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n </div>\n\n <div class="ai1ec-event-summary-footer">\n <div class="ai1ec-btn-group ai1ec-actions">\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"is_ticket_button_enabled",match:["is_ticket_button_enabled"]},{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <a class="ai1ec-pull-right ai1ec-btn ai1ec-btn-primary\n ai1ec-btn-xs ai1ec-buy-tickets"\n target="_blank"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n >'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"ticket_url_label"}]},{type:"raw",value:"</a>\n "}]}},{type:"raw",value:" <a "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"data_type_events",match:["data_type_events"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n class="ai1ec-read-more ai1ec-btn ai1ec-btn-default\n ai1ec-load-event"\n href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'">\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_read_more",match:["text_read_more"]}]},{type:"raw",value:' <i class="ai1ec-fa ai1ec-fa-arrow-right"></i>\n </a>\n </div>\n '},{type:"logic",token:{type:"Twig.logic.type.set",key:"categories",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"categories_html"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.set",key:"tags",expression:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"tags_html"}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"categories",match:["categories"]},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:' <span class="ai1ec-categories">\n <span class="ai1ec-field-label">\n <i class="ai1ec-fa ai1ec-fa-folder-open"></i>\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_categories",match:["text_categories"]}]},{type:"raw",value:"\n </span>\n "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"categories",match:["categories"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </span>\n "}]}},{type:"raw",value:" "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"tags",match:["tags"]},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:' <span class="ai1ec-tags">\n <span class="ai1ec-field-label">\n <i class="ai1ec-fa ai1ec-fa-tags"></i>\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_tags",match:["text_tags"]}]},{type:"raw",value:"\n </span>\n "},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"tags",match:["tags"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"\n </span>\n "}]}},{type:"raw",value:" </div>\n </div>\n\n </div>\n "}]}},{type:"raw",value:" "},{type:"raw",value:"\n "}]}},{type:"raw",value:" "},{type:"raw",value:"\n </div>\n </div>\n "}]}},{type:"raw",value:" "},{type:"raw",value:"\n "}]}},{type:"raw",value:" "},{type:"raw",value:'\n</div>\n\n<div class="ai1ec-pull-left">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"pagination_links",match:["pagination_links"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:"</div>\n"}],precompiled:!0}),n}),timely.define("oneday",["external_libs/twig","oneday"],function(e){var t,n;return t=e.twig,n=t({id:"../js_src/oneday.twig",data:[{type:"output",stack:[{type:"Twig.expression.type.variable",value:"navigation",match:["navigation"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n\n<table class="ai1ec-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"type",match:["type"]}]},{type:"raw",value:'-view-original" xxx>\n <thead>\n <tr>\n '},{type:"logic",token:{type:"Twig.logic.type.for",key_var:"date",value_var:"day",expression:[{type:"Twig.expression.type.variable",value:"cell_array",match:["cell_array"]}],output:[{type:"raw",value:' <th class="ai1ec-weekday\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"today"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:"ai1ec-today"}]}},{type:"raw",value:'">\n '},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"show_reveal_button",match:["show_reveal_button"]},{type:"Twig.expression.type.variable",value:"loop",match:["loop"]},{type:"Twig.expression.type.key.period",key:"last"},{type:"Twig.expression.type.operator.binary",value:"and",precidence:13,associativity:"leftToRight",operator:"and"}],output:[{type:"raw",value:' <div class="ai1ec-reveal-full-day">\n <button class="ai1ec-btn ai1ec-btn-info ai1ec-btn-xs\n ai1ec-tooltip-trigger"\n data-placement="left"\n title="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_full_day",match:["text_full_day"]},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'">\n <i class="ai1ec-fa ai1ec-fa-expand"></i>\n </button>\n </div>\n '}]}},{type:"raw",value:' <a class="ai1ec-load-view" href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"href"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"data_type",match:["data_type"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'>\n <span class="ai1ec-weekday-date">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"day"}]},{type:"raw",value:'</span>\n <span class="ai1ec-weekday-day">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"weekday"}]},{type:"raw",value:"</span>\n </a>\n </th>\n "}]}},{type:"raw",value:" </tr>\n <tr>\n "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"day",expression:[{type:"Twig.expression.type.variable",value:"cell_array",match:["cell_array"]}],output:[{type:"raw",value:' <td class="ai1ec-allday-events\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"today"},{type:"Twig.expression.type.test",filter:"empty",modifier:"not"}],output:[{type:"raw",value:"ai1ec-today"}]}},{type:"raw",value:'">\n\n '},{type:"logic",token:{type:"Twig.logic.type.if",stack:[{type:"Twig.expression.type.variable",value:"loop",match:["loop"]},{type:"Twig.expression.type.key.period",key:"first"}],output:[{type:"raw",value:' <div class="ai1ec-allday-label">'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"text_all_day",match:["text_all_day"]}]},{type:"raw",value:"</div>\n "}]}},{type:"raw",value:"\n "},{type:"logic",token:{type:"Twig.logic.type.for",key_var:null,value_var:"event",expression:[{type:"Twig.expression.type.variable",value:"day",match:["day"]},{type:"Twig.expression.type.key.period",key:"allday"}],output:[{type:"raw",value:' <a href="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"permalink"},{type:"Twig.expression.type.filter",value:"e",match:["| e","e"],params:[{type:"Twig.expression.type.parameter.start",value:"(",match:["("]},{type:"Twig.expression.type.string",value:"html_attr"},{type:"Twig.expression.type.parameter.end",value:")",match:[")"],expression:!1}]}]},{type:"raw",value:'"\n '},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"data_type_events",match:["data_type_events"]},{type:"Twig.expression.type.filter",value:"raw",match:["| raw","raw"]}]},{type:"raw",value:'\n data-instance-id="'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"instance_id"}]},{type:"raw",value:'"\n class="ai1ec-event-container ai1ec-load-event ai1ec-popup-trigger\n ai1ec-event-id-'},{type:"output",stack:[{type:"Twig.expression.type.variable",value:"event",match:["event"]},{type:"Twig.expression.type.key.period",key:"post_id"}]},{type:"raw",value:"\n ai1ec-event-instance-id-"},{type:"output",stack:[{type:"Twig.expression.type.v
|