Version Description
- 08.14.2020 =
- Fixed: Fancybox lightbox not working with WordPress 5.5
- Fixed: Inability to upload images or create galleries in WordPress 5.5
- Fixed: Cannot crop images from Manage Galleries page
- Fixed: Removed use of jquery.size() and jquery.browser
- Fixed: Fixed iterator_to_array() PHP warning
Download this release
Release Info
Developer | photocrati |
Plugin | NextGEN Gallery – WordPress Gallery Plugin |
Version | 3.3.11 |
Comparing to | |
See all releases |
Code changes from version 3.3.10 to 3.3.11
- changelog.txt +7 -0
- nggallery.php +2 -2
- products/photocrati_nextgen/modules/ajax/module.ajax.php +1 -1
- products/photocrati_nextgen/modules/ajax/static/ajax.min.js +3 -5
- products/photocrati_nextgen/modules/lightbox/module.lightbox.php +1 -1
- products/photocrati_nextgen/modules/lightbox/package.module.lightbox.php +1 -1
- products/photocrati_nextgen/modules/nextgen_admin/module.nextgen_admin.php +1 -1
- products/photocrati_nextgen/modules/nextgen_admin/static/nextgen_wizards.js +8 -8
- products/photocrati_nextgen/modules/nextgen_admin/static/nextgen_wizards.min.js +1 -1
- products/photocrati_nextgen/modules/nextgen_admin/static/select2/select2.js +1 -1
- products/photocrati_nextgen/modules/nextgen_admin/static/select2/select2.min.js +1 -1
- products/photocrati_nextgen/modules/nextgen_data/module.nextgen_data.php +4 -2
- products/photocrati_nextgen/modules/ngglegacy/admin/js/Jcrop/js/jquery.Jcrop.js +11 -7
- products/photocrati_nextgen/modules/ngglegacy/admin/js/Jcrop/js/jquery.Jcrop.min.js +1 -1
- products/photocrati_nextgen/modules/ngglegacy/admin/manage-images.php +1 -1
- products/photocrati_nextgen/modules/ngglegacy/module.ngglegacy.php +1 -1
- readme.txt +8 -1
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +10 -7
- vendor/composer/autoload_static.php +3 -3
changelog.txt
CHANGED
@@ -1,6 +1,13 @@
|
|
1 |
NextGEN Gallery
|
2 |
by Imagely
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
= V3.3.10 - 08.12.2020 =
|
5 |
* NEW: Added filter 'ngg_recent_images_sort_by_column' to control how recent images are sorted
|
6 |
* Fixed: Assigning a thumbnail to a custom post type page/post caused a fatal javsacript error
|
1 |
NextGEN Gallery
|
2 |
by Imagely
|
3 |
|
4 |
+
= V3.3.11 - 08.14.2020 =
|
5 |
+
* Fixed: Fancybox lightbox not working with WordPress 5.5
|
6 |
+
* Fixed: Inability to upload images or create galleries in WordPress 5.5
|
7 |
+
* Fixed: Cannot crop images from Manage Galleries page
|
8 |
+
* Fixed: Removed use of jquery.size() and jquery.browser
|
9 |
+
* Fixed: Fixed iterator_to_array() PHP warning
|
10 |
+
|
11 |
= V3.3.10 - 08.12.2020 =
|
12 |
* NEW: Added filter 'ngg_recent_images_sort_by_column' to control how recent images are sorted
|
13 |
* Fixed: Assigning a thumbnail to a custom post type page/post caused a fatal javsacript error
|
nggallery.php
CHANGED
@@ -4,7 +4,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
|
|
4 |
/**
|
5 |
* Plugin Name: NextGEN Gallery
|
6 |
* Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 28 million downloads.
|
7 |
-
* Version: 3.3.
|
8 |
* Author: Imagely
|
9 |
* Plugin URI: https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/
|
10 |
* Author URI: https://www.imagely.com
|
@@ -680,7 +680,7 @@ class C_NextGEN_Bootstrap
|
|
680 |
define('NGG_PRODUCT_URL', path_join(str_replace("\\" , '/', NGG_PLUGIN_URL), 'products'));
|
681 |
define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
|
682 |
define('NGG_PLUGIN_STARTED_AT', microtime());
|
683 |
-
define('NGG_PLUGIN_VERSION', '3.3.
|
684 |
|
685 |
define(
|
686 |
'NGG_SCRIPT_VERSION',
|
4 |
/**
|
5 |
* Plugin Name: NextGEN Gallery
|
6 |
* Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 28 million downloads.
|
7 |
+
* Version: 3.3.11
|
8 |
* Author: Imagely
|
9 |
* Plugin URI: https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/
|
10 |
* Author URI: https://www.imagely.com
|
680 |
define('NGG_PRODUCT_URL', path_join(str_replace("\\" , '/', NGG_PLUGIN_URL), 'products'));
|
681 |
define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
|
682 |
define('NGG_PLUGIN_STARTED_AT', microtime());
|
683 |
+
define('NGG_PLUGIN_VERSION', '3.3.11');
|
684 |
|
685 |
define(
|
686 |
'NGG_SCRIPT_VERSION',
|
products/photocrati_nextgen/modules/ajax/module.ajax.php
CHANGED
@@ -17,7 +17,7 @@ class M_Ajax extends C_Base_Module
|
|
17 |
'photocrati-ajax',
|
18 |
'AJAX',
|
19 |
'Provides AJAX functionality',
|
20 |
-
'3.
|
21 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
22 |
'Imagely',
|
23 |
'https://www.imagely.com'
|
17 |
'photocrati-ajax',
|
18 |
'AJAX',
|
19 |
'Provides AJAX functionality',
|
20 |
+
'3.3.11',
|
21 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
22 |
'Imagely',
|
23 |
'https://www.imagely.com'
|
products/photocrati_nextgen/modules/ajax/static/ajax.min.js
CHANGED
@@ -47,9 +47,7 @@ window.Ngg_Store = {
|
|
47 |
};
|
48 |
|
49 |
jQuery(function($){
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
})
|
54 |
-
|
55 |
});
|
47 |
};
|
48 |
|
49 |
jQuery(function($){
|
50 |
+
$(window).on('unload', function(){
|
51 |
+
Ngg_Store.save();
|
52 |
+
})
|
|
|
|
|
53 |
});
|
products/photocrati_nextgen/modules/lightbox/module.lightbox.php
CHANGED
@@ -23,7 +23,7 @@ class M_Lightbox extends C_Base_Module
|
|
23 |
'photocrati-lightbox',
|
24 |
'Lightbox',
|
25 |
"Provides integration with several JavaScript lightbox effect libraries",
|
26 |
-
'3.3.
|
27 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
28 |
'Imagely',
|
29 |
'https://www.imagely.com'
|
23 |
'photocrati-lightbox',
|
24 |
'Lightbox',
|
25 |
"Provides integration with several JavaScript lightbox effect libraries",
|
26 |
+
'3.3.11',
|
27 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
28 |
'Imagely',
|
29 |
'https://www.imagely.com'
|
products/photocrati_nextgen/modules/lightbox/package.module.lightbox.php
CHANGED
@@ -64,7 +64,7 @@ class C_Lightbox_Library_Manager
|
|
64 |
$fancybox->title = __('Fancybox', 'nggallery');
|
65 |
$fancybox->code = 'class="ngg-fancybox" rel="%GALLERY_NAME%"';
|
66 |
$fancybox->styles = array('photocrati-lightbox#fancybox/jquery.fancybox-1.3.4.css');
|
67 |
-
$fancybox->scripts = array('photocrati-lightbox#fancybox/jquery.easing-1.3.pack.js', 'photocrati-lightbox#fancybox/jquery.fancybox-1.3.4.pack.js', 'photocrati-lightbox#fancybox/nextgen_fancybox_init.js');
|
68 |
$this->register('fancybox', $fancybox);
|
69 |
// Add Shutter
|
70 |
$shutter = new C_NGG_Lightbox('shutter');
|
64 |
$fancybox->title = __('Fancybox', 'nggallery');
|
65 |
$fancybox->code = 'class="ngg-fancybox" rel="%GALLERY_NAME%"';
|
66 |
$fancybox->styles = array('photocrati-lightbox#fancybox/jquery.fancybox-1.3.4.css');
|
67 |
+
$fancybox->scripts = array('https://cdnjs.cloudflare.com/ajax/libs/jquery-browser/0.1.0/jquery.browser.min.js', 'photocrati-lightbox#fancybox/jquery.easing-1.3.pack.js', 'photocrati-lightbox#fancybox/jquery.fancybox-1.3.4.pack.js', 'photocrati-lightbox#fancybox/nextgen_fancybox_init.js');
|
68 |
$this->register('fancybox', $fancybox);
|
69 |
// Add Shutter
|
70 |
$shutter = new C_NGG_Lightbox('shutter');
|
products/photocrati_nextgen/modules/nextgen_admin/module.nextgen_admin.php
CHANGED
@@ -26,7 +26,7 @@ class M_NextGen_Admin extends C_Base_Module
|
|
26 |
'photocrati-nextgen_admin',
|
27 |
'NextGEN Administration',
|
28 |
'Provides a framework for adding Administration pages',
|
29 |
-
'3.3.
|
30 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
31 |
'Imagely',
|
32 |
'https://www.imagely.com'
|
26 |
'photocrati-nextgen_admin',
|
27 |
'NextGEN Administration',
|
28 |
'Provides a framework for adding Administration pages',
|
29 |
+
'3.3.11',
|
30 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
31 |
'Imagely',
|
32 |
'https://www.imagely.com'
|
products/photocrati_nextgen/modules/nextgen_admin/static/nextgen_wizards.js
CHANGED
@@ -259,7 +259,7 @@ if (typeof(NextGEN_Wizard_Manager) === 'undefined') {
|
|
259 |
var findFrameHierarchy = function (root, targetDoc) {
|
260 |
var iframes = root.find("iframe");
|
261 |
var ret = [];
|
262 |
-
for (var i = 0; i < iframes.
|
263 |
var iframe = jQuery(iframes.get(i));
|
264 |
try {
|
265 |
if (iframe.prop("contentWindow").document == targetDoc)
|
@@ -484,7 +484,7 @@ if (typeof(NextGEN_Wizard_Manager) === 'undefined') {
|
|
484 |
}
|
485 |
}
|
486 |
|
487 |
-
if (jContext.
|
488 |
jContext = jQuery([]);
|
489 |
}
|
490 |
else
|
@@ -506,7 +506,7 @@ if (typeof(NextGEN_Wizard_Manager) === 'undefined') {
|
|
506 |
if (target != null) {
|
507 |
jTarget = jContext.find(target);
|
508 |
|
509 |
-
if (jTarget.
|
510 |
isTargeted = true;
|
511 |
else
|
512 |
jTarget = this.anchor;
|
@@ -523,7 +523,7 @@ if (typeof(NextGEN_Wizard_Manager) === 'undefined') {
|
|
523 |
if (view != null) {
|
524 |
jView = jContext.find(view);
|
525 |
|
526 |
-
if (jView.
|
527 |
viewOb = this.getViewFor(jView, wizard.id, step['id']);
|
528 |
}
|
529 |
|
@@ -607,10 +607,10 @@ if (typeof(NextGEN_Wizard_Manager) === 'undefined') {
|
|
607 |
}
|
608 |
|
609 |
if (tourStep != null) {
|
610 |
-
if (tourStep.target == null || tourStep.target.
|
611 |
canNext = wizard.manager.computeStepTarget(wizard, stepNext, tourStep);
|
612 |
|
613 |
-
if (canNext && (tourStep.target == null || tourStep.target.
|
614 |
canNext = false;
|
615 |
}
|
616 |
else
|
@@ -667,7 +667,7 @@ if (typeof(NextGEN_Wizard_Manager) === 'undefined') {
|
|
667 |
$ob = wizard.manager.getContextObject(condCtx).find(condOb);
|
668 |
}
|
669 |
|
670 |
-
if ($ob.
|
671 |
var doc = $ob.get(0).ownerDocument;
|
672 |
obWin = doc.defaultView || doc.parentWindow;
|
673 |
}
|
@@ -686,7 +686,7 @@ if (typeof(NextGEN_Wizard_Manager) === 'undefined') {
|
|
686 |
}
|
687 |
case 'event_bind':
|
688 |
case 'plupload_bind': {
|
689 |
-
var doBind = $ob.
|
690 |
|
691 |
if (condType == 'plupload_bind') {
|
692 |
if (typeof($ob.pluploadQueue) !== 'undefined')
|
259 |
var findFrameHierarchy = function (root, targetDoc) {
|
260 |
var iframes = root.find("iframe");
|
261 |
var ret = [];
|
262 |
+
for (var i = 0; i < iframes.length; i++) {
|
263 |
var iframe = jQuery(iframes.get(i));
|
264 |
try {
|
265 |
if (iframe.prop("contentWindow").document == targetDoc)
|
484 |
}
|
485 |
}
|
486 |
|
487 |
+
if (jContext.length == 0)
|
488 |
jContext = jQuery([]);
|
489 |
}
|
490 |
else
|
506 |
if (target != null) {
|
507 |
jTarget = jContext.find(target);
|
508 |
|
509 |
+
if (jTarget.length > 0)
|
510 |
isTargeted = true;
|
511 |
else
|
512 |
jTarget = this.anchor;
|
523 |
if (view != null) {
|
524 |
jView = jContext.find(view);
|
525 |
|
526 |
+
if (jView.length > 0)
|
527 |
viewOb = this.getViewFor(jView, wizard.id, step['id']);
|
528 |
}
|
529 |
|
607 |
}
|
608 |
|
609 |
if (tourStep != null) {
|
610 |
+
if (tourStep.target == null || tourStep.target.length == 0 || tourStep.target.attr('id') == 'ngg-wizard-anchor') {
|
611 |
canNext = wizard.manager.computeStepTarget(wizard, stepNext, tourStep);
|
612 |
|
613 |
+
if (canNext && (tourStep.target == null || tourStep.target.length == 0 || tourStep.target.attr('id') == 'ngg-wizard-anchor'))
|
614 |
canNext = false;
|
615 |
}
|
616 |
else
|
667 |
$ob = wizard.manager.getContextObject(condCtx).find(condOb);
|
668 |
}
|
669 |
|
670 |
+
if ($ob.length > 0) {
|
671 |
var doc = $ob.get(0).ownerDocument;
|
672 |
obWin = doc.defaultView || doc.parentWindow;
|
673 |
}
|
686 |
}
|
687 |
case 'event_bind':
|
688 |
case 'plupload_bind': {
|
689 |
+
var doBind = $ob.length > 0;
|
690 |
|
691 |
if (condType == 'plupload_bind') {
|
692 |
if (typeof($ob.pluploadQueue) !== 'undefined')
|
products/photocrati_nextgen/modules/nextgen_admin/static/nextgen_wizards.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function NextGEN_Wizard(t,e){this.id=t,this.manager=e,this.data={},this.steps=[],this.status=null,this.tour=null,this.created=Math.floor(Date.now()/1e3)}if("undefined"==typeof NextGEN_Wizard_Manager){NextGEN_Wizard.prototype.start=function(){null!=this.tour&&this.tour.start()},NextGEN_Wizard.prototype.getNextStep=function(t){for(var e=0;e<this.steps.length;e++){if(this.steps[e].id==t)break}return e++,e<this.steps.length?this.steps[e]:null},NextGEN_Wizard.prototype.setState=function(t){};var manager={state:[],wizards:[],runningWizard:null,views:[],starter:null,anchor:null,events:{},targetWatchers:{},refreshTimer:null,nggEvents:[],init:function(){function t(t){this.itemSelector=".view-item",this.currentWizard=null,this.currentStep=null,this.doneFlag=!1,this.init=function(){},this.disable=function(){t.addClass("ngg-wizard-disabled")},this.enable=function(){t.removeClass("ngg-wizard-disabled")},this.setup=function(){},this.reset=function(){t.removeClass("ngg-wizard-has-selection"),t.find(this.itemSelector).removeClass("ngg-wizard-selected")},this.done=function(t){this.doneFlag||(this.doneFlag=!0,this.trigger("done",this,t))}}function e(e){t.call(this,e);var i=this;jQuery(e.get(0).ownerDocument).on("click",e.selector,function(t){i.done(e)})}function i(e){t.call(this,e);var i=this;e.click(function(t){(!e.is("a,button.ngg_save_settings_button,input.ngg_save_gallery_changes")||e.attr("href").startsWith("#")||e.attr("href").startsWith("javascript:")||e.hasClass("thickbox"))&&i.done(e)}),this.setup=function(){if(e.is("a,button.ngg_save_settings_button,button.ngg_save_pricelist_button,input.ngg_save_gallery_changes")){if(e.is("a")){var t=e.attr("href");this.originalHref=t}if(e.is("button.ngg_save_settings_button,button.ngg_save_pricelist_button,input.ngg_save_gallery_changes")){var t=e.parents("form").attr("action");t.indexOf("&ngg_wizard")>-1&&(hrefSplit=t.split("&ngg_wizard"),t=hrefSplit[0])}t.startsWith("#")||(-1==t.indexOf("?")?t+="?":t+="&",t=t+"ngg_wizard="+this.currentWizard+"&ngg_wizard_step="+this.currentStep,e.is("a")&&e.attr("href",t),e.is("button.ngg_save_settings_button,button.ngg_save_pricelist_button,input.ngg_save_gallery_changes")&&e.parents("form").attr("action",t))}},this.reset=function(){this.originalHref&&e.is("a")&&e.attr("href",this.originalHref)}}function n(e){t.call(this,e);var i=this;e.on("input",function(t){jQuery(this).val().length>=3&&i.done(e)}),this.setup=function(){}}function r(e){t.call(this,e);var i=this;jQuery(e.get(0).ownerDocument).on("change",e.selector,function(t){jQuery(this).is(":checked")&&i.done(e)}),this.setup=function(){}}function a(e){t.call(this,e);var i=this;e.on("change",function(t){i.done(e)})}"undefined"!=typeof NextGEN_Wizard_Manager_State&&(this.state=NextGEN_Wizard_Manager_State);var s=this;jQuery(window.top.document).find("body").on("nextgen_event",function(t,e){s.nggEvents.push({type:e})}),_.extend(t.prototype,Backbone.Events),_.extend(e.prototype,t.prototype),_.extend(i.prototype,t.prototype),_.extend(n.prototype,t.prototype),_.extend(r.prototype,t.prototype),_.extend(a.prototype,t.prototype);var o=null;o={handler:a,name:"SelectView",selector:"select"},this.views.push(o),o={handler:r,name:"RadioView",selector:"input[type='radio']"},this.views.push(o),o={handler:n,name:"TextView",selector:"input[type='text'], input[type='search'], input[type='email'], input[type='tel'], input[type='number'], input[type='username'], input[type='password'], textarea"},this.views.push(o),o={handler:i,name:"ButtonView",selector:"a, input[type='button'], input[type='submit'], button"},this.views.push(o),o={handler:e,name:"GenericView",selector:"*"},this.views.push(o),Tourist.Tip.Base.prototype.nextButtonTemplate='<a class="button-primary pull-right tour-next">Next step →</a>',Tourist.Tip.Base.prototype.finalButtonTemplate='<button class="button-primary pull-right tour-next">Finish up</button>',Tourist.Tip.Base.prototype.closeButtonTemplate='<a class="btn btn-close tour-close" href="#"><i class="icon icon-remove far fa-window-close"></i></a>',Tourist.Tip.BootstrapTip.prototype._getTargetBounds=function(t){var e,i;e=t[0],i="function"==typeof e.getBoundingClientRect?e.getBoundingClientRect():{width:e.offsetWidth,height:e.offsetHeight};var n=t.offset();if(t.ownerDocument!=document)for(var r=function(t,e){for(var i=t.find("iframe"),n=[],a=0;a<i.size();a++){var s=jQuery(i.get(a));try{if(s.prop("contentWindow").document==e)return[s]}catch(t){continue}var o=r(s.contents(),e);if(o.length>0){n.push(s);for(var u=0;u<o.length;u++)n.push(o[u]);break}}return n},a=r(jQuery(document),t.get(0).ownerDocument),s=0;s<a.length;s++){var o=a[s],u=o.offset();n.left+=u.left,n.top+=u.top}return jQuery.extend({},i,n)},jQuery(".ngg-wizard-invoker").on("click",function(t){t.preventDefault();for(var e=NextGEN_Wizard_Manager,i=jQuery(this).data("ngg-wizard"),n=null,r=0;r<e.wizards.length;r++){var a=e.wizards[r];if(a.id==i){n=a;break}}return null!=n&&null==this.runningWizard&&n.start(),!1})},bind:function(t,e){t in this.events||(this.events[t]=[]);var i={handler:e};this.events[t].push(i)},trigger:function(t,e){if(void 0===e&&(e={}),t in this.events)for(var i=this.events[t],n=0;n<i.length;n++){var r=i[n];r.handler&&r.handler(this,e)}},didNextgenEventFire:function(t){for(var e=0;e<this.nggEvents.length;e++){if(this.nggEvents[e].type==t)return!0}return!1},getViewForSelector:function(t,e){var i=null;void 0===e&&(e=!0);for(var n=0;n<this.views.length;n++){var r=this.views[n];if(t.is(r.selector)){i=r.handler;break}}if(null!=i){var r=new i(t);return e&&r.init(),r}return null},getViewFor:function(t,e,i){var n=this.getViewForSelector(t,!1);return null!=n&&(n.currentWizard=e,n.currentStep=i,n.init()),n},generateQueue:function(t){var e=this,i=this.state,n=i.wizard_list.length,r=i.starter,a=i.running_wizard;if(n>0){var s=t('<div id="ngg-wizard-starter" class="ngg-wizard-starter"></div>');s.append('<div class="starter-wrap-top"><div class="starter-wrap-icon"><img class="starter-icon" src="'+r.image+'" /></div></div>'),s.append('<div class="starter-wrap-bottom"><div class="starter-wrap-text">'+r.text+"</div></div>"),s.on("click",".starter-wrap-icon, starter-wrap-bottom",function(){e.startQueue()}),s.hide(),s.appendTo("body"),this.starter=s;var o=t('<div id="ngg-wizard-anchor" class="ngg-wizard-anchor"></div>');o.appendTo("body"),this.anchor=o;for(var u=0,l=0;l<n;l++){var d=i.wizard_list[l],h=new NextGEN_Wizard(d.id,this);h.data=d,h.steps=d.steps;var c=this.generateTour(h);"ok"==c.result?(h.status="ready",h.tour=c.tour):"wait_element"==c.result&&(h.status="wait",u++),h.id==a?(this.wizards.unshift(h),this.runningWizard=h):this.wizards.push(h)}u>0?this.enqueueRefreshOperation():this.trigger("ready")}},getContextObject:function(t){var e=null;if(null!=t){"object"!=typeof t&&(t=[t]);for(var i=0;i<t.length;i++){var n=t[i];if(e=null==e?jQuery(n):e.find(n),e.is("iframe")){var r=e.prop("contentWindow");if("interactive"!=r.document.readyState&&"complete"!=r.document.readyState){e=jQuery([]);break}e=r.jQuery?r.jQuery("body"):e.contents().find("body")}}0==e.size()&&(e=jQuery([]))}else e=jQuery(document);return e},computeStepTarget:function(t,e,i){var n=e.target_wait,r=e.target,a=e.view,s=null,o=null,u=null,l=this.getContextObject(e.context),d=!1;if(null!=r){if(s=l.find(r),s.size()>0?d=!0:s=this.anchor,!d&&null!=n&&Math.floor(Date.now()/1e3)-t.created<=n)return!1}else s=this.anchor;return null!=a&&(o=l.find(a),o.size()>0&&(u=this.getViewFor(o,t.id,e.id))),i.highlightTarget=d,i.nextButton=!d||e.optional,i.target=s,i.ngg_view=u,!0},scrollIntoView:function(t){},generateTour:function(t){if(null==t.tour){var e=t.data,i=e.steps,n=e.current_step,r=0,a=[],s=null;if(null!=e.view&&null==(s=this.getViewFor(jQuery(e.view),t.id)))return{result:"wait_element",element:e.view};for(var o=0;o<i.length;o++){var u=i[o];null!=n&&n==u.id&&(r=o);var l={ngg_step_id:u.id,ngg_step_data:u,viewport:jQuery(window),closeButton:!0,content:'<div class="ngg-wizard-text">'+u.text+"</div>",my:u.popup_anchor,at:u.target_anchor,bind:["onDone"],onDone:function(t,e,i,n){var r=t.ngg_wizard,a=this.ngg_step_data,s=!0;if(null!=a.condition&&(this.condition_met||(s=!1,this.condition_setup||this.setupCondition(t,e))),s&&null!=r){var o=r.getNextStep(this.ngg_step_id);if(null!=o&&o.lazy){s=!1;for(var u=null,l=0;l<t.options.steps.length;l++){var d=t.options.steps[l];if(d.ngg_step_id==o.id){u=d;break}}null!=u&&(null==u.target||0==u.target.size()||"ngg-wizard-anchor"==u.target.attr("id")?!(s=r.manager.computeStepTarget(r,o,u))||null!=u.target&&0!=u.target.size()&&"ngg-wizard-anchor"!=u.target.attr("id")||(s=!1):s=!0)}}if(s)t.next();else{null!=this.lazyTimeout&&(clearTimeout(this.lazyTimeout),this.lazyTimeout=null);var h=this;this.lazyTimeout=setTimeout(function(){h.lazyTimeout=null,h.onDone(t,e,i,n)},500)}}};if(!this.computeStepTarget(t,u,l))return{result:"wait_element",element:u.target};l.setupCondition=function(t,e){var i=t.ngg_wizard,n=this.ngg_step_data;if(!this.condition_setup&&null!=n.condition){var r=n.condition,a=r.type,s=r.value,o=r.context,u=r.timeout;this.condition_met=!1,this.condition_setup=!1,o&&"object"!=typeof o&&(o=[o]);var l=jQuery([]);if(o){o=o.slice(0);var d=o.pop();l=i.manager.getContextObject(o).find(d)}if(l.size()>0){var h=l.get(0).ownerDocument;h.defaultView||h.parentWindow}switch(a){case"frame_event":if(window.Frame_Event_Publisher){this.condition_setup=!0;var c=this;Frame_Event_Publisher.listen_for(s,function(){c.condition_met=!0})}break;case"event_bind":case"plupload_bind":var g=l.size()>0;if("plupload_bind"==a&&(void 0!==l.pluploadQueue?l=l.pluploadQueue():g=!1),g){this.condition_setup=!0;var c=this;l.bind(s,function(){c.condition_met=!0})}break;case"nextgen_event":if(this.condition_setup=!0,i.manager.didNextgenEventFire(s))this.condition_met=!0;else{var c=this;jQuery(window.top.document).find("body").bind("nextgen_event",function(t,e){e==s&&(c.condition_met=!0)})}break;case"wait":this.condition_setup=!0;var c=this;setTimeout(function(){c.condition_met=!0},s)}}var p=jQuery(".tourist-popover .ngg-wizard-text"),f=p.find(".ngg-wizard-loading");if(f.hide(),this.condition_setup&&!this.condition_met&&u>0){this.condition_timeout=0,0==f.length&&(f=jQuery('<div class="ngg-wizard-loading"></div>'),p.append(f)),f.html("Loading... ("+Math.ceil(u/1e3).toString()+")"),f.show();var c=this;c.condition_timer=setInterval(function(){c.condition_timeout+=1e3,c.condition_timeout>=u&&(c.condition_met=!0);var t=(Math.floor(c.condition_timeout/1e3),Math.ceil(u/1e3),Math.floor((u-c.condition_timeout)/1e3));f.html("Loading... ("+t.toString()+")"),c.condition_met&&(f.hide(),clearInterval(c.condition_timer),c.condition_timer=null)},1e3)}return this.condition_setup},l.setup=function(t,e){var i=e.view;null!=this.ngg_view&&(i=this.ngg_view),null!=i&&(i.currentWizard=t.ngg_wizard_id,i.currentStep=this.ngg_step_id,i.setup(),i.bind("done",this.onDone),i.enable())},l.teardown=function(t,e){var i=e.view;null!=this.ngg_view&&(i=this.ngg_view),null!=i&&(i.disable(),i.unbind("done",this.onDone),i.reset())},a.push(l)}var d={steps:a,tipClass:"Bootstrap",tipOptions:{showEffect:"slidein"},stepOptions:{}};null!=s&&(d.stepOptions.view=s);var h=new Tourist.Tour(d);for(h.ngg_wizard_id=t.id,h.ngg_wizard=t;r>0;)h.next(),r--;return{result:"ok",tour:h}}},enqueueRefreshOperation:function(){null!=this.refreshTimer&&(clearTimeout(this.refreshTimer),this.refreshTimer=null),this.refreshTimer=setTimeout(function(t){NextGEN_Wizard_Manager.refreshQueue()},500)},refreshQueue:function(){this.refreshTimer=null;for(var t=0,e=0;e<this.wizards.length;e++){var i=this.wizards[e];if("wait"==i.status){var n=this.generateTour(i);"ok"==n.result?(i.status="ready",i.tour=n.tour):"wait_element"==n.result&&(i.status="wait",t++)}}t>0?this.enqueueRefreshOperation():this.trigger("ready")},start:function(){null!=this.runningWizard?this.runningWizard.start():this.showStarter()},showStarter:function(){},startQueue:function(){if(null!=this.starter){var t=this;this.starter.fadeOut(function(){t.nextTour()})}else this.nextTour()},nextTour:function(){for(var t=0,e=0;e<this.wizards.length;e++){var i=this.wizards[e];if("ready"==i.status&&null!=i.tour){t=e;break}}if(t<this.wizards.length){var i=this.wizards[t];i.tour.start()}},updateWizardState:function(t){}};manager.init(),window.NextGEN_Wizard_Manager=manager}jQuery(function(t){"undefined"!=typeof NextGEN_Wizard_Manager&&(NextGEN_Wizard_Manager.bind("ready",function(){NextGEN_Wizard_Manager.start()}),NextGEN_Wizard_Manager.generateQueue(t))});
|
1 |
+
function NextGEN_Wizard(t,e){this.id=t,this.manager=e,this.data={},this.steps=[],this.status=null,this.tour=null,this.created=Math.floor(Date.now()/1e3)}if("undefined"==typeof NextGEN_Wizard_Manager){NextGEN_Wizard.prototype.start=function(){null!=this.tour&&this.tour.start()},NextGEN_Wizard.prototype.getNextStep=function(t){for(var e=0;e<this.steps.length;e++){if(this.steps[e].id==t)break}return e++,e<this.steps.length?this.steps[e]:null},NextGEN_Wizard.prototype.setState=function(t){};var manager={state:[],wizards:[],runningWizard:null,views:[],starter:null,anchor:null,events:{},targetWatchers:{},refreshTimer:null,nggEvents:[],init:function(){function t(t){this.itemSelector=".view-item",this.currentWizard=null,this.currentStep=null,this.doneFlag=!1,this.init=function(){},this.disable=function(){t.addClass("ngg-wizard-disabled")},this.enable=function(){t.removeClass("ngg-wizard-disabled")},this.setup=function(){},this.reset=function(){t.removeClass("ngg-wizard-has-selection"),t.find(this.itemSelector).removeClass("ngg-wizard-selected")},this.done=function(t){this.doneFlag||(this.doneFlag=!0,this.trigger("done",this,t))}}function e(e){t.call(this,e);var n=this;jQuery(e.get(0).ownerDocument).on("click",e.selector,function(t){n.done(e)})}function n(e){t.call(this,e);var n=this;e.click(function(t){(!e.is("a,button.ngg_save_settings_button,input.ngg_save_gallery_changes")||e.attr("href").startsWith("#")||e.attr("href").startsWith("javascript:")||e.hasClass("thickbox"))&&n.done(e)}),this.setup=function(){if(e.is("a,button.ngg_save_settings_button,button.ngg_save_pricelist_button,input.ngg_save_gallery_changes")){if(e.is("a")){var t=e.attr("href");this.originalHref=t}if(e.is("button.ngg_save_settings_button,button.ngg_save_pricelist_button,input.ngg_save_gallery_changes")){var t=e.parents("form").attr("action");t.indexOf("&ngg_wizard")>-1&&(hrefSplit=t.split("&ngg_wizard"),t=hrefSplit[0])}t.startsWith("#")||(-1==t.indexOf("?")?t+="?":t+="&",t=t+"ngg_wizard="+this.currentWizard+"&ngg_wizard_step="+this.currentStep,e.is("a")&&e.attr("href",t),e.is("button.ngg_save_settings_button,button.ngg_save_pricelist_button,input.ngg_save_gallery_changes")&&e.parents("form").attr("action",t))}},this.reset=function(){this.originalHref&&e.is("a")&&e.attr("href",this.originalHref)}}function i(e){t.call(this,e);var n=this;e.on("input",function(t){jQuery(this).val().length>=3&&n.done(e)}),this.setup=function(){}}function r(e){t.call(this,e);var n=this;jQuery(e.get(0).ownerDocument).on("change",e.selector,function(t){jQuery(this).is(":checked")&&n.done(e)}),this.setup=function(){}}function a(e){t.call(this,e);var n=this;e.on("change",function(t){n.done(e)})}"undefined"!=typeof NextGEN_Wizard_Manager_State&&(this.state=NextGEN_Wizard_Manager_State);var o=this;jQuery(window.top.document).find("body").on("nextgen_event",function(t,e){o.nggEvents.push({type:e})}),_.extend(t.prototype,Backbone.Events),_.extend(e.prototype,t.prototype),_.extend(n.prototype,t.prototype),_.extend(i.prototype,t.prototype),_.extend(r.prototype,t.prototype),_.extend(a.prototype,t.prototype);var s=null;s={handler:a,name:"SelectView",selector:"select"},this.views.push(s),s={handler:r,name:"RadioView",selector:"input[type='radio']"},this.views.push(s),s={handler:i,name:"TextView",selector:"input[type='text'], input[type='search'], input[type='email'], input[type='tel'], input[type='number'], input[type='username'], input[type='password'], textarea"},this.views.push(s),s={handler:n,name:"ButtonView",selector:"a, input[type='button'], input[type='submit'], button"},this.views.push(s),s={handler:e,name:"GenericView",selector:"*"},this.views.push(s),Tourist.Tip.Base.prototype.nextButtonTemplate='<a class="button-primary pull-right tour-next">Next step →</a>',Tourist.Tip.Base.prototype.finalButtonTemplate='<button class="button-primary pull-right tour-next">Finish up</button>',Tourist.Tip.Base.prototype.closeButtonTemplate='<a class="btn btn-close tour-close" href="#"><i class="icon icon-remove far fa-window-close"></i></a>',Tourist.Tip.BootstrapTip.prototype._getTargetBounds=function(t){var e,n;e=t[0],n="function"==typeof e.getBoundingClientRect?e.getBoundingClientRect():{width:e.offsetWidth,height:e.offsetHeight};var i=t.offset();if(t.ownerDocument!=document)for(var r=function(t,e){for(var n=t.find("iframe"),i=[],a=0;a<n.length;a++){var o=jQuery(n.get(a));try{if(o.prop("contentWindow").document==e)return[o]}catch(t){continue}var s=r(o.contents(),e);if(s.length>0){i.push(o);for(var u=0;u<s.length;u++)i.push(s[u]);break}}return i},a=r(jQuery(document),t.get(0).ownerDocument),o=0;o<a.length;o++){var s=a[o],u=s.offset();i.left+=u.left,i.top+=u.top}return jQuery.extend({},n,i)},jQuery(".ngg-wizard-invoker").on("click",function(t){t.preventDefault();for(var e=NextGEN_Wizard_Manager,n=jQuery(this).data("ngg-wizard"),i=null,r=0;r<e.wizards.length;r++){var a=e.wizards[r];if(a.id==n){i=a;break}}return null!=i&&null==this.runningWizard&&i.start(),!1})},bind:function(t,e){t in this.events||(this.events[t]=[]);var n={handler:e};this.events[t].push(n)},trigger:function(t,e){if(void 0===e&&(e={}),t in this.events)for(var n=this.events[t],i=0;i<n.length;i++){var r=n[i];r.handler&&r.handler(this,e)}},didNextgenEventFire:function(t){for(var e=0;e<this.nggEvents.length;e++){if(this.nggEvents[e].type==t)return!0}return!1},getViewForSelector:function(t,e){var n=null;void 0===e&&(e=!0);for(var i=0;i<this.views.length;i++){var r=this.views[i];if(t.is(r.selector)){n=r.handler;break}}if(null!=n){var r=new n(t);return e&&r.init(),r}return null},getViewFor:function(t,e,n){var i=this.getViewForSelector(t,!1);return null!=i&&(i.currentWizard=e,i.currentStep=n,i.init()),i},generateQueue:function(t){var e=this,n=this.state,i=n.wizard_list.length,r=n.starter,a=n.running_wizard;if(i>0){var o=t('<div id="ngg-wizard-starter" class="ngg-wizard-starter"></div>');o.append('<div class="starter-wrap-top"><div class="starter-wrap-icon"><img class="starter-icon" src="'+r.image+'" /></div></div>'),o.append('<div class="starter-wrap-bottom"><div class="starter-wrap-text">'+r.text+"</div></div>"),o.on("click",".starter-wrap-icon, starter-wrap-bottom",function(){e.startQueue()}),o.hide(),o.appendTo("body"),this.starter=o;var s=t('<div id="ngg-wizard-anchor" class="ngg-wizard-anchor"></div>');s.appendTo("body"),this.anchor=s;for(var u=0,l=0;l<i;l++){var d=n.wizard_list[l],h=new NextGEN_Wizard(d.id,this);h.data=d,h.steps=d.steps;var g=this.generateTour(h);"ok"==g.result?(h.status="ready",h.tour=g.tour):"wait_element"==g.result&&(h.status="wait",u++),h.id==a?(this.wizards.unshift(h),this.runningWizard=h):this.wizards.push(h)}u>0?this.enqueueRefreshOperation():this.trigger("ready")}},getContextObject:function(t){var e=null;if(null!=t){"object"!=typeof t&&(t=[t]);for(var n=0;n<t.length;n++){var i=t[n];if(e=null==e?jQuery(i):e.find(i),e.is("iframe")){var r=e.prop("contentWindow");if("interactive"!=r.document.readyState&&"complete"!=r.document.readyState){e=jQuery([]);break}e=r.jQuery?r.jQuery("body"):e.contents().find("body")}}0==e.length&&(e=jQuery([]))}else e=jQuery(document);return e},computeStepTarget:function(t,e,n){var i=e.target_wait,r=e.target,a=e.view,o=null,s=null,u=null,l=this.getContextObject(e.context),d=!1;if(null!=r){if(o=l.find(r),o.length>0?d=!0:o=this.anchor,!d&&null!=i&&Math.floor(Date.now()/1e3)-t.created<=i)return!1}else o=this.anchor;return null!=a&&(s=l.find(a),s.length>0&&(u=this.getViewFor(s,t.id,e.id))),n.highlightTarget=d,n.nextButton=!d||e.optional,n.target=o,n.ngg_view=u,!0},scrollIntoView:function(t){},generateTour:function(t){if(null==t.tour){var e=t.data,n=e.steps,i=e.current_step,r=0,a=[],o=null;if(null!=e.view&&null==(o=this.getViewFor(jQuery(e.view),t.id)))return{result:"wait_element",element:e.view};for(var s=0;s<n.length;s++){var u=n[s];null!=i&&i==u.id&&(r=s);var l={ngg_step_id:u.id,ngg_step_data:u,viewport:jQuery(window),closeButton:!0,content:'<div class="ngg-wizard-text">'+u.text+"</div>",my:u.popup_anchor,at:u.target_anchor,bind:["onDone"],onDone:function(t,e,n,i){var r=t.ngg_wizard,a=this.ngg_step_data,o=!0;if(null!=a.condition&&(this.condition_met||(o=!1,this.condition_setup||this.setupCondition(t,e))),o&&null!=r){var s=r.getNextStep(this.ngg_step_id);if(null!=s&&s.lazy){o=!1;for(var u=null,l=0;l<t.options.steps.length;l++){var d=t.options.steps[l];if(d.ngg_step_id==s.id){u=d;break}}null!=u&&(null==u.target||0==u.target.length||"ngg-wizard-anchor"==u.target.attr("id")?!(o=r.manager.computeStepTarget(r,s,u))||null!=u.target&&0!=u.target.length&&"ngg-wizard-anchor"!=u.target.attr("id")||(o=!1):o=!0)}}if(o)t.next();else{null!=this.lazyTimeout&&(clearTimeout(this.lazyTimeout),this.lazyTimeout=null);var h=this;this.lazyTimeout=setTimeout(function(){h.lazyTimeout=null,h.onDone(t,e,n,i)},500)}}};if(!this.computeStepTarget(t,u,l))return{result:"wait_element",element:u.target};l.setupCondition=function(t,e){var n=t.ngg_wizard,i=this.ngg_step_data;if(!this.condition_setup&&null!=i.condition){var r=i.condition,a=r.type,o=r.value,s=r.context,u=r.timeout;this.condition_met=!1,this.condition_setup=!1,s&&"object"!=typeof s&&(s=[s]);var l=jQuery([]);if(s){s=s.slice(0);var d=s.pop();l=n.manager.getContextObject(s).find(d)}if(l.length>0){var h=l.get(0).ownerDocument;h.defaultView||h.parentWindow}switch(a){case"frame_event":if(window.Frame_Event_Publisher){this.condition_setup=!0;var g=this;Frame_Event_Publisher.listen_for(o,function(){g.condition_met=!0})}break;case"event_bind":case"plupload_bind":var c=l.length>0;if("plupload_bind"==a&&(void 0!==l.pluploadQueue?l=l.pluploadQueue():c=!1),c){this.condition_setup=!0;var g=this;l.bind(o,function(){g.condition_met=!0})}break;case"nextgen_event":if(this.condition_setup=!0,n.manager.didNextgenEventFire(o))this.condition_met=!0;else{var g=this;jQuery(window.top.document).find("body").bind("nextgen_event",function(t,e){e==o&&(g.condition_met=!0)})}break;case"wait":this.condition_setup=!0;var g=this;setTimeout(function(){g.condition_met=!0},o)}}var p=jQuery(".tourist-popover .ngg-wizard-text"),f=p.find(".ngg-wizard-loading");if(f.hide(),this.condition_setup&&!this.condition_met&&u>0){this.condition_timeout=0,0==f.length&&(f=jQuery('<div class="ngg-wizard-loading"></div>'),p.append(f)),f.html("Loading... ("+Math.ceil(u/1e3).toString()+")"),f.show();var g=this;g.condition_timer=setInterval(function(){g.condition_timeout+=1e3,g.condition_timeout>=u&&(g.condition_met=!0);var t=(Math.floor(g.condition_timeout/1e3),Math.ceil(u/1e3),Math.floor((u-g.condition_timeout)/1e3));f.html("Loading... ("+t.toString()+")"),g.condition_met&&(f.hide(),clearInterval(g.condition_timer),g.condition_timer=null)},1e3)}return this.condition_setup},l.setup=function(t,e){var n=e.view;null!=this.ngg_view&&(n=this.ngg_view),null!=n&&(n.currentWizard=t.ngg_wizard_id,n.currentStep=this.ngg_step_id,n.setup(),n.bind("done",this.onDone),n.enable())},l.teardown=function(t,e){var n=e.view;null!=this.ngg_view&&(n=this.ngg_view),null!=n&&(n.disable(),n.unbind("done",this.onDone),n.reset())},a.push(l)}var d={steps:a,tipClass:"Bootstrap",tipOptions:{showEffect:"slidein"},stepOptions:{}};null!=o&&(d.stepOptions.view=o);var h=new Tourist.Tour(d);for(h.ngg_wizard_id=t.id,h.ngg_wizard=t;r>0;)h.next(),r--;return{result:"ok",tour:h}}},enqueueRefreshOperation:function(){null!=this.refreshTimer&&(clearTimeout(this.refreshTimer),this.refreshTimer=null),this.refreshTimer=setTimeout(function(t){NextGEN_Wizard_Manager.refreshQueue()},500)},refreshQueue:function(){this.refreshTimer=null;for(var t=0,e=0;e<this.wizards.length;e++){var n=this.wizards[e];if("wait"==n.status){var i=this.generateTour(n);"ok"==i.result?(n.status="ready",n.tour=i.tour):"wait_element"==i.result&&(n.status="wait",t++)}}t>0?this.enqueueRefreshOperation():this.trigger("ready")},start:function(){null!=this.runningWizard?this.runningWizard.start():this.showStarter()},showStarter:function(){},startQueue:function(){if(null!=this.starter){var t=this;this.starter.fadeOut(function(){t.nextTour()})}else this.nextTour()},nextTour:function(){for(var t=0,e=0;e<this.wizards.length;e++){var n=this.wizards[e];if("ready"==n.status&&null!=n.tour){t=e;break}}if(t<this.wizards.length){var n=this.wizards[t];n.tour.start()}},updateWizardState:function(t){}};manager.init(),window.NextGEN_Wizard_Manager=manager}jQuery(function(t){"undefined"!=typeof NextGEN_Wizard_Manager&&(NextGEN_Wizard_Manager.bind("ready",function(){NextGEN_Wizard_Manager.start()}),NextGEN_Wizard_Manager.generateQueue(t))});
|
products/photocrati_nextgen/modules/nextgen_admin/static/select2/select2.js
CHANGED
@@ -4236,7 +4236,7 @@ S2.define('select2/dropdown/attachBody',[
|
|
4236 |
// Modified 2018-02-22 by benjamin@imagely.com
|
4237 |
// See: https://github.com/select2/select2/issues/3125 -- without this if()
|
4238 |
// select2 will prevent scrolling inside the IGW window after being opened once
|
4239 |
-
if ($(this).find('.select2-container--open').
|
4240 |
$(this).scrollTop(position.y);
|
4241 |
}
|
4242 |
});
|
4236 |
// Modified 2018-02-22 by benjamin@imagely.com
|
4237 |
// See: https://github.com/select2/select2/issues/3125 -- without this if()
|
4238 |
// select2 will prevent scrolling inside the IGW window after being opened once
|
4239 |
+
if ($(this).find('.select2-container--open').length > 0) {
|
4240 |
$(this).scrollTop(position.y);
|
4241 |
}
|
4242 |
});
|
products/photocrati_nextgen/modules/nextgen_admin/static/select2/select2.min.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,n){return void 0===n&&(n="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(n),n}:e(jQuery)}(function(e){var t=function(){if(e&&e.fn&&e.fn.select2&&e.fn.select2.amd)var t=e.fn.select2.amd;var t;return function(){if(!t||!t.requirejs){t?n=t:t={};var e,n,i;!function(t){function o(e,t){return $.call(e,t)}function r(e,t){var n,i,o,r,s,a,l,c,u,d,p,h,f=t&&t.split("/"),g=w.map,m=g&&g["*"]||{};if(e){for(e=e.split("/"),s=e.length-1,w.nodeIdCompat&&x.test(e[s])&&(e[s]=e[s].replace(x,"")),"."===e[0].charAt(0)&&f&&(h=f.slice(0,f.length-1),e=h.concat(e)),u=0;u<e.length;u++)if("."===(p=e[u]))e.splice(u,1),u-=1;else if(".."===p){if(0===u||1===u&&".."===e[2]||".."===e[u-1])continue;u>0&&(e.splice(u-1,2),u-=2)}e=e.join("/")}if((f||m)&&g){for(n=e.split("/"),u=n.length;u>0;u-=1){if(i=n.slice(0,u).join("/"),f)for(d=f.length;d>0;d-=1)if((o=g[f.slice(0,d).join("/")])&&(o=o[i])){r=o,a=u;break}if(r)break;!l&&m&&m[i]&&(l=m[i],c=u)}!r&&l&&(r=l,a=c),r&&(n.splice(0,a,r),e=n.join("/"))}return e}function s(e,n){return function(){var i=b.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),f.apply(t,i.concat([e,n]))}}function a(e){return function(t){return r(t,e)}}function l(e){return function(t){v[e]=t}}function c(e){if(o(y,e)){var n=y[e];delete y[e],_[e]=!0,h.apply(t,n)}if(!o(v,e)&&!o(_,e))throw new Error("No "+e);return v[e]}function u(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function d(e){return e?u(e):[]}function p(e){return function(){return w&&w.config&&w.config[e]||{}}}var h,f,g,m,v={},y={},w={},_={},$=Object.prototype.hasOwnProperty,b=[].slice,x=/\.js$/;g=function(e,t){var n,i=u(e),o=i[0],s=t[1];return e=i[1],o&&(o=r(o,s),n=c(o)),o?e=n&&n.normalize?n.normalize(e,a(s)):r(e,s):(e=r(e,s),i=u(e),o=i[0],e=i[1],o&&(n=c(o))),{f:o?o+"!"+e:e,n:e,pr:o,p:n}},m={require:function(e){return s(e)},exports:function(e){var t=v[e];return void 0!==t?t:v[e]={}},module:function(e){return{id:e,uri:"",exports:v[e],config:p(e)}}},h=function(e,n,i,r){var a,u,p,h,f,w,$,b=[],x=typeof i;if(r=r||e,w=d(r),"undefined"===x||"function"===x){for(n=!n.length&&i.length?["require","exports","module"]:n,f=0;f<n.length;f+=1)if(h=g(n[f],w),"require"===(u=h.f))b[f]=m.require(e);else if("exports"===u)b[f]=m.exports(e),$=!0;else if("module"===u)a=b[f]=m.module(e);else if(o(v,u)||o(y,u)||o(_,u))b[f]=c(u);else{if(!h.p)throw new Error(e+" missing "+u);h.p.load(h.n,s(r,!0),l(u),{}),b[f]=v[u]}p=i?i.apply(v[e],b):void 0,e&&(a&&a.exports!==t&&a.exports!==v[e]?v[e]=a.exports:p===t&&$||(v[e]=p))}else e&&(v[e]=i)},e=n=f=function(e,n,i,o,r){if("string"==typeof e)return m[e]?m[e](n):c(g(e,d(n)).f);if(!e.splice){if(w=e,w.deps&&f(w.deps,w.callback),!n)return;n.splice?(e=n,n=i,i=null):e=t}return n=n||function(){},"function"==typeof i&&(i=o,o=r),o?h(t,e,n,i):setTimeout(function(){h(t,e,n,i)},4),f},f.config=function(e){return f(e)},e._defined=v,i=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),o(v,e)||o(y,e)||(y[e]=[e,t,n])},i.amd={jQuery:!0}}(),t.requirejs=e,t.require=n,t.define=i}}(),t.define("almond",function(){}),t.define("jquery",[],function(){var t=e||$;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),t}),t.define("select2/utils",["jquery"],function(e){function t(e){var t=e.prototype,n=[];for(var i in t){"function"==typeof t[i]&&("constructor"!==i&&n.push(i))}return n}var n={};n.Extend=function(e,t){function n(){this.constructor=e}var i={}.hasOwnProperty;for(var o in t)i.call(t,o)&&(e[o]=t[o]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},n.Decorate=function(e,n){function i(){var t=Array.prototype.unshift,i=n.prototype.constructor.length,o=e.prototype.constructor;i>0&&(t.call(arguments,e.prototype.constructor),o=n.prototype.constructor),o.apply(this,arguments)}function o(){this.constructor=i}var r=t(n),s=t(e);n.displayName=e.displayName,i.prototype=new o;for(var a=0;a<s.length;a++){var l=s[a];i.prototype[l]=e.prototype[l]}for(var c=0;c<r.length;c++){var u=r[c];i.prototype[u]=function(e){var t=function(){};e in i.prototype&&(t=i.prototype[e]);var o=n.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),o.apply(this,arguments)}}(u)}return i};var i=function(){this.listeners={}};return i.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},i.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),n[0]._type=e,e in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},i.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},n.Observable=i,n.generateChars=function(e){for(var t="",n=0;n<e;n++){t+=Math.floor(36*Math.random()).toString(36)}return t},n.bind=function(e,t){return function(){e.apply(t,arguments)}},n._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var o=0;o<n.length;o++){var r=n[o];r=r.substring(0,1).toLowerCase()+r.substring(1),r in i||(i[r]={}),o==n.length-1&&(i[r]=e[t]),i=i[r]}delete e[t]}}return e},n.hasScroll=function(t,n){var i=e(n),o=n.style.overflowX,r=n.style.overflowY;return(o!==r||"hidden"!==r&&"visible"!==r)&&("scroll"===o||"scroll"===r||(i.innerHeight()<n.scrollHeight||i.innerWidth()<n.scrollWidth))},n.escapeMarkup=function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},n.appendMany=function(t,n){if("1.7"===e.fn.jquery.substr(0,3)){var i=e();e.map(n,function(e){i=i.add(e)}),n=i}t.append(n)},n}),t.define("select2/results",["jquery","./utils"],function(e,t){function n(e,t,i){this.$element=e,this.data=i,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t,t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=e('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),o=this.options.get("translations").get(t.message);i.append(n(o(t.args))),i[0].className+=" select2-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(e){this.hideLoading();var t=[];if(null==e.results||0===e.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],o=this.option(i);t.push(o)}this.$results.append(t)},n.prototype.position=function(e,t){t.find(".select2-results").append(e)},n.prototype.sort=function(e){return this.options.get("sorter")(e)},n.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");t.length>0?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var t=this;this.data.current(function(n){var i=e.map(n,function(e){return e.id.toString()});t.$results.find(".select2-results__option[aria-selected]").each(function(){var t=e(this),n=e.data(this,"data"),o=""+n.id;null!=n.element&&n.element.selected||null==n.element&&e.inArray(o,i)>-1?t.attr("aria-selected","true"):t.attr("aria-selected","false")})})},n.prototype.showLoading=function(e){this.hideLoading();var t=this.options.get("translations").get("searching"),n={disabled:!0,loading:!0,text:t(e)},i=this.option(n);i.className+=" loading-results",this.$results.prepend(i)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(t){var n=document.createElement("li");n.className="select2-results__option";var i={role:"treeitem","aria-selected":"false"};t.disabled&&(delete i["aria-selected"],i["aria-disabled"]="true"),null==t.id&&delete i["aria-selected"],null!=t._resultId&&(n.id=t._resultId),t.title&&(n.title=t.title),t.children&&(i.role="group",i["aria-label"]=t.text,delete i["aria-selected"]);for(var o in i){var r=i[o];n.setAttribute(o,r)}if(t.children){var s=e(n),a=document.createElement("strong");a.className="select2-results__group";e(a);this.template(t,a);for(var l=[],c=0;c<t.children.length;c++){var u=t.children[c],d=this.option(u);l.push(d)}var p=e("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});p.append(l),s.append(a),s.append(p)}else this.template(t,n);return e.data(n,"data",t),n},n.prototype.bind=function(t,n){var i=this,o=t.id+"-results";this.$results.attr("id",o),t.on("results:all",function(e){i.clear(),i.append(e.data),t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),t.on("results:append",function(e){i.append(e.data),t.isOpen()&&i.setClasses()}),t.on("query",function(e){i.hideMessages(),i.showLoading(e)}),t.on("select",function(){t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),t.on("open",function(){i.$results.attr("aria-expanded","true"),i.$results.attr("aria-hidden","false"),i.setClasses(),i.ensureHighlightVisible()}),t.on("close",function(){i.$results.attr("aria-expanded","false"),i.$results.attr("aria-hidden","true"),i.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=i.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=i.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?i.trigger("close",{}):i.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=i.getHighlightedResults(),t=i.$results.find("[aria-selected]"),n=t.index(e);if(0!==n){var o=n-1;0===e.length&&(o=0);var r=t.eq(o);r.trigger("mouseenter");var s=i.$results.offset().top,a=r.offset().top,l=i.$results.scrollTop()+(a-s);0===o?i.$results.scrollTop(0):a-s<0&&i.$results.scrollTop(l)}}),t.on("results:next",function(){var e=i.getHighlightedResults(),t=i.$results.find("[aria-selected]"),n=t.index(e),o=n+1;if(!(o>=t.length)){var r=t.eq(o);r.trigger("mouseenter");var s=i.$results.offset().top+i.$results.outerHeight(!1),a=r.offset().top+r.outerHeight(!1),l=i.$results.scrollTop()+a-s;0===o?i.$results.scrollTop(0):a>s&&i.$results.scrollTop(l)}}),t.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),t.on("results:message",function(e){i.displayMessage(e)}),e.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=i.$results.scrollTop(),n=i.$results.get(0).scrollHeight-t+e.deltaY,o=e.deltaY>0&&t-e.deltaY<=0,r=e.deltaY<0&&n<=i.$results.height();o?(i.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):r&&(i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(t){var n=e(this),o=n.data("data");if("true"===n.attr("aria-selected"))return void(i.options.get("multiple")?i.trigger("unselect",{originalEvent:t,data:o}):i.trigger("close",{}));i.trigger("select",{originalEvent:t,data:o})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(t){var n=e(this).data("data");i.getHighlightedResults().removeClass("select2-results__option--highlighted"),i.trigger("results:focus",{data:n,element:e(this)})})},n.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]"),n=t.index(e),i=this.$results.offset().top,o=e.offset().top,r=this.$results.scrollTop()+(o-i),s=o-i;r-=2*e.outerHeight(!1),n<=2?this.$results.scrollTop(0):(s>this.$results.outerHeight()||s<0)&&this.$results.scrollTop(r)}},n.prototype.template=function(t,n){var i=this.options.get("templateResult"),o=this.options.get("escapeMarkup"),r=i(t,n);null==r?n.style.display="none":"string"==typeof r?n.innerHTML=o(r):e(n).append(r)},n}),t.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),t.define("select2/selection/base",["jquery","../utils","../keys"],function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,t.Observable),i.prototype.render=function(){var t=e('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),t.attr("title",this.$element.attr("title")),t.attr("tabindex",this._tabindex),this.$selection=t,t},i.prototype.bind=function(e,t){var i=this,o=(e.id,e.id+"-results");this.container=e,this.$selection.on("focus",function(e){i.trigger("focus",e)}),this.$selection.on("blur",function(e){i._handleBlur(e)}),this.$selection.on("keydown",function(e){i.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){i.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){i.update(e.data)}),e.on("open",function(){i.$selection.attr("aria-expanded","true"),i.$selection.attr("aria-owns",o),i._attachCloseHandler(e)}),e.on("close",function(){i.$selection.attr("aria-expanded","false"),i.$selection.removeAttr("aria-activedescendant"),i.$selection.removeAttr("aria-owns"),i.$selection.focus(),i._detachCloseHandler(e)}),e.on("enable",function(){i.$selection.attr("tabindex",i._tabindex)}),e.on("disable",function(){i.$selection.attr("tabindex","-1")})},i.prototype._handleBlur=function(t){var n=this;window.setTimeout(function(){document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement)||n.trigger("blur",t)},1)},i.prototype._attachCloseHandler=function(t){e(document.body).on("mousedown.select2."+t.id,function(t){var n=e(t.target),i=n.closest(".select2");e(".select2.select2-container--open").each(function(){var t=e(this);this!=i[0]&&t.data("element").select2("close")})})},i.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2."+t.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i}),t.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function o(){o.__super__.constructor.apply(this,arguments)}return n.Extend(o,t),o.prototype.render=function(){var e=o.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},o.prototype.bind=function(e,t){var n=this;o.__super__.bind.apply(this,arguments);var i=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),e.on("focus",function(t){e.isOpen()||n.$selection.focus()}),e.on("selection:update",function(e){n.update(e.data)})},o.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},o.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},o.prototype.selectionContainer=function(){return e("<span></span>")},o.prototype.update=function(e){if(0===e.length)return void this.clear();var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i),n.prop("title",t.title||t.text)},o}),t.define("select2/selection/multiple",["jquery","./base","../utils"],function(e,t,n){function i(e,t){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},i.prototype.bind=function(t,n){var o=this;i.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){o.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(t){if(!o.options.get("disabled")){var n=e(this),i=n.parent(),r=i.data("data");o.trigger("unselect",{originalEvent:t,data:r})}})},i.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>')},i.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],i=0;i<e.length;i++){var o=e[i],r=this.selectionContainer(),s=this.display(o,r);r.append(s),r.prop("title",o.title||o.text),r.data("data",o),t.push(r)}var a=this.$selection.find(".select2-selection__rendered");n.appendMany(a,t)}},i}),t.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(t.length>1||n)return e.call(this,t);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(i)},t}),t.define("select2/selection/allowClear",["jquery","../keys"],function(e,t){function n(){}return n.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){i._handleClear(e)}),t.on("keypress",function(e){i._handleKeyboardClear(e,t)})},n.prototype._handleClear=function(e,t){if(!this.options.get("disabled")){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();for(var i=n.data("data"),o=0;o<i.length;o++){var r={data:i[o]};if(this.trigger("unselect",r),r.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},n.prototype._handleKeyboardClear=function(e,n,i){i.isOpen()||n.which!=t.DELETE&&n.which!=t.BACKSPACE||this._handleClear(n)},n.prototype.update=function(t,n){if(t.call(this,n),!(this.$selection.find(".select2-selection__placeholder").length>0||0===n.length)){var i=e('<span class="select2-selection__clear">×</span>');i.data("data",n),this.$selection.find(".select2-selection__rendered").prepend(i)}},n}),t.define("select2/selection/search",["jquery","../utils","../keys"],function(e,t,n){function i(e,t,n){e.call(this,t,n)}return i.prototype.render=function(t){var n=e('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=n,this.$search=n.find("input");var i=t.call(this);return this._transferTabIndex(),i},i.prototype.bind=function(e,t,i){var o=this;e.call(this,t,i),t.on("open",function(){o.$search.trigger("focus")}),t.on("close",function(){o.$search.val(""),o.$search.removeAttr("aria-activedescendant"),o.$search.trigger("focus")}),t.on("enable",function(){o.$search.prop("disabled",!1),o._transferTabIndex()}),t.on("disable",function(){o.$search.prop("disabled",!0)}),t.on("focus",function(e){o.$search.trigger("focus")}),t.on("results:focus",function(e){o.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".select2-search--inline",function(e){o.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){o._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented(),e.which===n.BACKSPACE&&""===o.$search.val()){var t=o.$searchContainer.prev(".select2-selection__choice");if(t.length>0){var i=t.data("data");o.searchRemoveChoice(i),e.preventDefault()}}});var r=document.documentMode,s=r&&r<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){if(s)return void o.$selection.off("input.search input.searchcheck");o.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(s&&"input"===e.type)return void o.$selection.off("input.search input.searchcheck");var t=e.which;t!=n.SHIFT&&t!=n.CTRL&&t!=n.ALT&&t!=n.TAB&&o.handleSearch(e)})},i.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},i.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},i.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.focus()},i.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},i.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},i.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";if(""!==this.$search.attr("placeholder"))e=this.$selection.find(".select2-selection__rendered").innerWidth();else{e=.75*(this.$search.val().length+1)+"em"}this.$search.css("width",e)},i}),t.define("select2/selection/eventRelay",["jquery"],function(e){function t(){}return t.prototype.bind=function(t,n,i){var o=this,r=["open","opening","close","closing","select","selecting","unselect","unselecting"],s=["opening","closing","selecting","unselecting"];t.call(this,n,i),n.on("*",function(t,n){if(-1!==e.inArray(t,r)){n=n||{};var i=e.Event("select2:"+t,{params:n});o.$element.trigger(i),-1!==e.inArray(t,s)&&(n.prevented=i.isDefaultPrevented())}})},t}),t.define("select2/translation",["jquery","require"],function(e,t){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(e){return this.dict[e]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={},n.loadPath=function(e){if(!(e in n._cache)){var i=t(e);n._cache[e]=i}return new n(n._cache[e])},n}),t.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),t.define("select2/data/base",["../utils"],function(e){function t(e,n){t.__super__.constructor.call(this)}return e.Extend(t,e.Observable),t.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},t.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},t.prototype.bind=function(e,t){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,n){var i=t.id+"-result-";return i+=e.generateChars(4),null!=n.id?i+="-"+n.id.toString():i+="-"+e.generateChars(4),i},t}),t.define("select2/data/select",["./base","../utils","jquery"],function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,e),i.prototype.current=function(e){var t=[],i=this;this.$element.find(":selected").each(function(){var e=n(this),o=i.item(e);t.push(o)}),e(t)},i.prototype.select=function(e){var t=this;if(e.selected=!0,n(e.element).is("option"))return e.element.selected=!0,
|
2 |
-
void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(i){var o=[];e=[e],e.push.apply(e,i);for(var r=0;r<e.length;r++){var s=e[r].id;-1===n.inArray(s,o)&&o.push(s)}t.$element.val(o),t.$element.trigger("change")});else{var i=e.id;this.$element.val(i),this.$element.trigger("change")}},i.prototype.unselect=function(e){var t=this;if(this.$element.prop("multiple")){if(e.selected=!1,n(e.element).is("option"))return e.element.selected=!1,void this.$element.trigger("change");this.current(function(i){for(var o=[],r=0;r<i.length;r++){var s=i[r].id;s!==e.id&&-1===n.inArray(s,o)&&o.push(s)}t.$element.val(o),t.$element.trigger("change")})}},i.prototype.bind=function(e,t){var n=this;this.container=e,e.on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},i.prototype.destroy=function(){this.$element.find("*").each(function(){n.removeData(this,"data")})},i.prototype.query=function(e,t){var i=[],o=this;this.$element.children().each(function(){var t=n(this);if(t.is("option")||t.is("optgroup")){var r=o.item(t),s=o.matches(e,r);null!==s&&i.push(s)}}),t({results:i})},i.prototype.addOptions=function(e){t.appendMany(this.$element,e)},i.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup"),t.label=e.text):(t=document.createElement("option"),void 0!==t.textContent?t.textContent=e.text:t.innerText=e.text),void 0!==e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var i=n(t),o=this._normalizeItem(e);return o.element=t,n.data(t,"data",o),i},i.prototype.item=function(e){var t={};if(null!=(t=n.data(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var i=e.children("option"),o=[],r=0;r<i.length;r++){var s=n(i[r]),a=this.item(s);o.push(a)}t.children=o}return t=this._normalizeItem(t),t.element=e[0],n.data(e[0],"data",t),t},i.prototype._normalizeItem=function(e){n.isPlainObject(e)||(e={id:e,text:e}),e=n.extend({},{text:""},e);var t={selected:!1,disabled:!1};return null!=e.id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),n.extend({},t,e)},i.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},i}),t.define("select2/data/array",["./select","../utils","jquery"],function(e,t,n){function i(e,t){var n=t.get("data")||[];i.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return t.Extend(i,e),i.prototype.select=function(e){var t=this.$element.find("option").filter(function(t,n){return n.value==e.id.toString()});0===t.length&&(t=this.option(e),this.addOptions(t)),i.__super__.select.call(this,e)},i.prototype.convertToOptions=function(e){for(var i=this,o=this.$element.find("option"),r=o.map(function(){return i.item(n(this)).id}).get(),s=[],a=0;a<e.length;a++){var l=this._normalizeItem(e[a]);if(n.inArray(l.id,r)>=0){var c=o.filter(function(e){return function(){return n(this).val()==e.id}}(l)),u=this.item(c),d=n.extend(!0,{},l,u),p=this.option(d);c.replaceWith(p)}else{var h=this.option(l);if(l.children){var f=this.convertToOptions(l.children);t.appendMany(h,f)}s.push(h)}}return s},i}),t.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,n){function i(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),i.__super__.constructor.call(this,e,t)}return t.Extend(i,e),i.prototype._applyDefaults=function(e){var t={data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,i){var o=n.ajax(e);return o.then(t),o.fail(i),o}};return n.extend({},t,e,!0)},i.prototype.processResults=function(e){return e},i.prototype.query=function(e,t){function i(){var i=r.transport(r,function(i){var r=o.processResults(i,e);o.options.get("debug")&&window.console&&console.error&&(r&&r.results&&n.isArray(r.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),t(r)},function(){i.status&&"0"===i.status||o.trigger("results:message",{message:"errorLoading"})});o._request=i}var o=this;null!=this._request&&(n.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var r=n.extend({type:"GET"},this.ajaxOptions);"function"==typeof r.url&&(r.url=r.url.call(this.$element,e)),"function"==typeof r.data&&(r.data=r.data.call(this.$element,e)),this.ajaxOptions.delay&&null!=e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(i,this.ajaxOptions.delay)):i()},i}),t.define("select2/data/tags",["jquery"],function(e){function t(t,n,i){var o=i.get("tags"),r=i.get("createTag");void 0!==r&&(this.createTag=r);var s=i.get("insertTag");if(void 0!==s&&(this.insertTag=s),t.call(this,n,i),e.isArray(o))for(var a=0;a<o.length;a++){var l=o[a],c=this._normalizeItem(l),u=this.option(c);this.$element.append(u)}}return t.prototype.query=function(e,t,n){function i(e,r){for(var s=e.results,a=0;a<s.length;a++){var l=s[a],c=null!=l.children&&!i({results:l.children},!0);if((l.text||"").toUpperCase()===(t.term||"").toUpperCase()||c)return!r&&(e.data=s,void n(e))}if(r)return!0;var u=o.createTag(t);if(null!=u){var d=o.option(u);d.attr("data-select2-tag",!0),o.addOptions([d]),o.insertTag(s,u)}e.results=s,n(e)}var o=this;if(this._removeOldTags(),null==t.term||null!=t.page)return void e.call(this,t,n);e.call(this,t,i)},t.prototype.createTag=function(t,n){var i=e.trim(n.term);return""===i?null:{id:i,text:i}},t.prototype.insertTag=function(e,t,n){t.unshift(n)},t.prototype._removeOldTags=function(t){this._lastTag;this.$element.find("option[data-select2-tag]").each(function(){this.selected||e(this).remove()})},t}),t.define("select2/data/tokenizer",["jquery"],function(e){function t(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return t.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},t.prototype.query=function(t,n,i){function o(t){var n=s._normalizeItem(t);if(!s.$element.find("option").filter(function(){return e(this).val()===n.id}).length){var i=s.option(n);i.attr("data-select2-tag",!0),s._removeOldTags(),s.addOptions([i])}r(n)}function r(e){s.trigger("select",{data:e})}var s=this;n.term=n.term||"";var a=this.tokenizer(n,this.options,o);a.term!==n.term&&(this.$search.length&&(this.$search.val(a.term),this.$search.focus()),n.term=a.term),t.call(this,n,i)},t.prototype.tokenizer=function(t,n,i,o){for(var r=i.get("tokenSeparators")||[],s=n.term,a=0,l=this.createTag||function(e){return{id:e.term,text:e.term}};a<s.length;){var c=s[a];if(-1!==e.inArray(c,r)){var u=s.substr(0,a),d=e.extend({},n,{term:u}),p=l(d);null!=p?(o(p),s=s.substr(a+1)||"",a=0):a++}else a++}return{term:s}},t}),t.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){if(t.term=t.term||"",t.term.length<this.minimumInputLength)return void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}});e.call(this,t,n)},e}),t.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){if(t.term=t.term||"",this.maximumInputLength>0&&t.term.length>this.maximumInputLength)return void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}});e.call(this,t,n)},e}),t.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){var i=this;this.current(function(o){var r=null!=o?o.length:0;if(i.maximumSelectionLength>0&&r>=i.maximumSelectionLength)return void i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}});e.call(i,t,n)})},e}),t.define("select2/dropdown",["jquery","./utils"],function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<span class="select2-dropdown"><span class="select2-results"></span></span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t,t},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),t.define("select2/dropdown/search",["jquery","../utils"],function(e,t){function n(){}return n.prototype.render=function(t){var n=t.call(this),i=e('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=i,this.$search=i.find("input"),n.prepend(i),n},n.prototype.bind=function(t,n,i){var o=this;t.call(this,n,i),this.$search.on("keydown",function(e){o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(t){e(this).off("keyup")}),this.$search.on("keyup input",function(e){o.handleSearch(e)}),n.on("open",function(){o.$search.attr("tabindex",0),o.$search.focus(),window.setTimeout(function(){o.$search.focus()},0)}),n.on("close",function(){o.$search.attr("tabindex",-1),o.$search.val("")}),n.on("focus",function(){n.isOpen()||o.$search.focus()}),n.on("results:all",function(e){if(null==e.query.term||""===e.query.term){o.showSearch(e)?o.$searchContainer.removeClass("select2-search--hide"):o.$searchContainer.addClass("select2-search--hide")}})},n.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.showSearch=function(e,t){return!0},n}),t.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;i>=0;i--){var o=t[i];this.placeholder.id===o.id&&n.splice(i,1)}return n},e}),t.define("select2/dropdown/infiniteScroll",["jquery"],function(e){function t(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},t.prototype.bind=function(t,n,i){var o=this;t.call(this,n,i),n.on("query",function(e){o.lastParams=e,o.loading=!0}),n.on("query:append",function(e){o.lastParams=e,o.loading=!0}),this.$results.on("scroll",function(){var t=e.contains(document.documentElement,o.$loadingMore[0]);if(!o.loading&&t){o.$results.offset().top+o.$results.outerHeight(!1)+50>=o.$loadingMore.offset().top+o.$loadingMore.outerHeight(!1)&&o.loadMore()}})},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t}),t.define("select2/dropdown/attachBody",["jquery","../utils"],function(e,t){function n(t,n,i){this.$dropdownParent=i.get("dropdownParent")||e(document.body),t.call(this,n,i)}return n.prototype.bind=function(e,t,n){var i=this,o=!1;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),o||(o=!0,t.on("results:all",function(){i._positionDropdown(),i._resizeDropdown()}),t.on("results:append",function(){i._positionDropdown(),i._resizeDropdown()}))}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},n.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(t){var n=e("<span></span>"),i=t.call(this);return n.append(i),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._attachPositioningHandler=function(n,i){var o=this,r="scroll.select2."+i.id,s="resize.select2."+i.id,a="orientationchange.select2."+i.id,l=this.$container.parents().filter(t.hasScroll);l.each(function(){e(this).data("select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})}),l.on(r,function(t){var n=e(this).data("select2-scroll-position");e(this).find(".select2-container--open").size()>0&&e(this).scrollTop(n.y)}),e(window).on(r+" "+s+" "+a,function(e){o._positionDropdown(),o._resizeDropdown()})},n.prototype._detachPositioningHandler=function(n,i){var o="scroll.select2."+i.id,r="resize.select2."+i.id,s="orientationchange.select2."+i.id;this.$container.parents().filter(t.hasScroll).off(o),e(window).off(o+" "+r+" "+s)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown.hasClass("select2-dropdown--above"),i=this.$dropdown.hasClass("select2-dropdown--below"),o=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var s={height:this.$container.outerHeight(!1)};s.top=r.top,s.bottom=r.top+s.height;var a={height:this.$dropdown.outerHeight(!1)},l={top:t.scrollTop(),bottom:t.scrollTop()+t.height()},c=l.top<r.top-a.height,u=l.bottom>r.bottom+a.height,d={left:r.left,top:s.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h=p.offset();d.top-=h.top,d.left-=h.left,n||i||(o="below"),u||!c||n?!c&&u&&n&&(o="below"):o="above",("above"==o||n&&"below"!==o)&&(d.top=s.top-h.top-a.height),null!=o&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+o),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+o)),this.$dropdownContainer.css(d)},n.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n}),t.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(t){for(var n=0,i=0;i<t.length;i++){var o=t[i];o.children?n+=e(o.children):n++}return n}function t(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return t.prototype.showSearch=function(t,n){return!(e(n.data.results)<this.minimumResultsForSearch)&&t.call(this,n)},t}),t.define("select2/dropdown/selectOnClose",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",function(e){i._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var i=this.getHighlightedResults();if(!(i.length<1)){var o=i.data("data");null!=o.element&&o.element.selected||null==o.element&&o.selected||this.trigger("select",{data:o})}},e}),t.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(e){i._selectTriggered(e)}),t.on("unselect",function(e){i._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&n.ctrlKey||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),t.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),t.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(e,t,n,i,o,r,s,a,l,c,u,d,p,h,f,g,m,v,y,w,_,$,b,x,A,C,S,O,E){function D(){this.reset()}return D.prototype.apply=function(d){if(d=e.extend(!0,{},this.defaults,d),null==d.dataAdapter){if(null!=d.ajax?d.dataAdapter=f:null!=d.data?d.dataAdapter=h:d.dataAdapter=p,d.minimumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,v)),d.maximumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,y)),d.maximumSelectionLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,w)),d.tags&&(d.dataAdapter=c.Decorate(d.dataAdapter,g)),null==d.tokenSeparators&&null==d.tokenizer||(d.dataAdapter=c.Decorate(d.dataAdapter,m)),null!=d.query){var E=t(d.amdBase+"compat/query");d.dataAdapter=c.Decorate(d.dataAdapter,E)}if(null!=d.initSelection){var D=t(d.amdBase+"compat/initSelection");d.dataAdapter=c.Decorate(d.dataAdapter,D)}}if(null==d.resultsAdapter&&(d.resultsAdapter=n,null!=d.ajax&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,x)),null!=d.placeholder&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,b)),d.selectOnClose&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,S))),null==d.dropdownAdapter){if(d.multiple)d.dropdownAdapter=_;else{var T=c.Decorate(_,$);d.dropdownAdapter=T}if(0!==d.minimumResultsForSearch&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,C)),d.closeOnSelect&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,O)),null!=d.dropdownCssClass||null!=d.dropdownCss||null!=d.adaptDropdownCssClass){var q=t(d.amdBase+"compat/dropdownCss");d.dropdownAdapter=c.Decorate(d.dropdownAdapter,q)}d.dropdownAdapter=c.Decorate(d.dropdownAdapter,A)}if(null==d.selectionAdapter){if(d.multiple?d.selectionAdapter=o:d.selectionAdapter=i,null!=d.placeholder&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,r)),d.allowClear&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,s)),d.multiple&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,a)),null!=d.containerCssClass||null!=d.containerCss||null!=d.adaptContainerCssClass){var j=t(d.amdBase+"compat/containerCss");d.selectionAdapter=c.Decorate(d.selectionAdapter,j)}d.selectionAdapter=c.Decorate(d.selectionAdapter,l)}if("string"==typeof d.language)if(d.language.indexOf("-")>0){var L=d.language.split("-"),k=L[0];d.language=[d.language,k]}else d.language=[d.language];if(e.isArray(d.language)){var P=new u;d.language.push("en");for(var I=d.language,M=0;M<I.length;M++){var R=I[M],z={};try{z=u.loadPath(R)}catch(e){try{R=this.defaults.amdLanguageBase+R,z=u.loadPath(R)}catch(e){d.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+R+'" could not be automatically loaded. A fallback will be used instead.');continue}}P.extend(z)}d.translations=P}else{var H=u.loadPath(this.defaults.amdLanguageBase+"en"),U=new u(d.language);U.extend(H),d.translations=U}return d},D.prototype.reset=function(){function t(e){function t(e){return d[e]||e}return e.replace(/[^\u0000-\u007E]/g,t)}function n(i,o){if(""===e.trim(i.term))return o;if(o.children&&o.children.length>0){for(var r=e.extend(!0,{},o),s=o.children.length-1;s>=0;s--){null==n(i,o.children[s])&&r.children.splice(s,1)}return r.children.length>0?r:n(i,r)}var a=t(o.text).toUpperCase(),l=t(i.term).toUpperCase();return a.indexOf(l)>-1?o:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:E,matcher:n,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},D.prototype.set=function(t,n){var i=e.camelCase(t),o={};o[i]=n;var r=c._convertData(o);e.extend(this.defaults,r)},new D}),t.define("select2/options",["require","jquery","./defaults","./utils"],function(e,t,n,i){function o(t,o){if(this.options=t,null!=o&&this.fromElement(o),this.options=n.apply(this.options),o&&o.is("input")){var r=e(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=i.Decorate(this.options.dataAdapter,r)}}return o.prototype.fromElement=function(e){var n=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.language&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),e.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),e.data("data",e.data("select2Tags")),e.data("tags",!0)),e.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",e.data("ajaxUrl")),e.data("ajax--url",e.data("ajaxUrl")));var o={};o=t.fn.jquery&&"1."==t.fn.jquery.substr(0,2)&&e[0].dataset?t.extend(!0,{},e[0].dataset,e.data()):e.data();var r=t.extend(!0,{},o);r=i._convertData(r);for(var s in r)t.inArray(s,n)>-1||(t.isPlainObject(this.options[s])?t.extend(this.options[s],r[s]):this.options[s]=r[s]);return this},o.prototype.get=function(e){return this.options[e]},o.prototype.set=function(e,t){this.options[e]=t},o}),t.define("select2/core",["jquery","./options","./utils","./keys"],function(e,t,n,i){var o=function(e,n){null!=e.data("select2")&&e.data("select2").destroy(),this.$element=e,this.id=this._generateId(e),n=n||{},this.options=new t(n,e),o.__super__.constructor.call(this);var i=e.attr("tabindex")||0;e.data("old-tabindex",i),e.attr("tabindex","-1");var r=this.options.get("dataAdapter");this.dataAdapter=new r(e,this.options);var s=this.render();this._placeContainer(s);var a=this.options.get("selectionAdapter");this.selection=new a(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,s);var l=this.options.get("dropdownAdapter");this.dropdown=new l(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,s);var c=this.options.get("resultsAdapter");this.results=new c(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var u=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){u.trigger("selection:update",{data:e})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),e.data("select2",this)};return n.Extend(o,n.Observable),o.prototype._generateId=function(e){var t="";return t=null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4),t=t.replace(/(:|\.|\[|\]|,)/g,""),t="select2-"+t},o.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},o.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var o=e.outerWidth(!1);return o<=0?"auto":o+"px"}if("style"==t){var r=e.attr("style");if("string"!=typeof r)return null;for(var s=r.split(";"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\s/g,""),u=c.match(n);if(null!==u&&u.length>=1)return u[1]}return null}return t},o.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},o.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var i=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=i?(this._observer=new i(function(n){e.each(n,t._syncA),e.each(n,t._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},o.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerSelectionEvents=function(){var t=this,n=["toggle","focus"];this.selection.on("toggle",function(){t.toggleDropdown()}),this.selection.on("focus",function(e){t.focus(e)}),this.selection.on("*",function(i,o){-1===e.inArray(i,n)&&t.trigger(i,o)})},o.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerEvents=function(){var e=this;this.on("open",function(){e.$container.addClass("select2-container--open")}),this.on("close",function(){e.$container.removeClass("select2-container--open")}),this.on("enable",function(){e.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){e.$container.addClass("select2-container--disabled")}),this.on("blur",function(){e.$container.removeClass("select2-container--focus")}),this.on("query",function(t){e.isOpen()||e.trigger("open",{}),this.dataAdapter.query(t,function(n){e.trigger("results:all",{data:n,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(n){e.trigger("results:append",{data:n,query:t})})}),this.on("keypress",function(t){var n=t.which;e.isOpen()?n===i.ESC||n===i.TAB||n===i.UP&&t.altKey?(e.close(),t.preventDefault()):n===i.ENTER?(e.trigger("results:select",{}),t.preventDefault()):n===i.SPACE&&t.ctrlKey?(e.trigger("results:toggle",{}),t.preventDefault()):n===i.UP?(e.trigger("results:previous",{}),t.preventDefault()):n===i.DOWN&&(e.trigger("results:next",{}),t.preventDefault()):(n===i.ENTER||n===i.SPACE||n===i.DOWN&&t.altKey)&&(e.open(),t.preventDefault())})},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},o.prototype._syncSubtree=function(e,t){var n=!1,i=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&t.addedNodes.length>0)for(var o=0;o<t.addedNodes.length;o++){var r=t.addedNodes[o];r.selected&&(n=!0)}else t.removedNodes&&t.removedNodes.length>0&&(n=!0);else n=!0;n&&this.dataAdapter.current(function(e){i.trigger("selection:update",{data:e})})}},o.prototype.trigger=function(e,t){var n=o.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===t&&(t={}),e in i){var r=i[e],s={prevented:!1,name:e,args:t};if(n.call(this,r,s),s.prevented)return void(t.prevented=!0)}n.call(this,e,t)},o.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||this.trigger("query",{})},o.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},o.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},o.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},o.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},o.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},o.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var e=[];return this.dataAdapter.current(function(t){e=t}),e},o.prototype.val=function(t){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==t||0===t.length)return this.$element.val();var n=t[0];e.isArray(n)&&(n=e.map(n,function(e){return e.toString()})),this.$element.val(n).trigger("change")},o.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,
|
3 |
this.selection=null,this.dropdown=null,this.results=null},o.prototype.render=function(){var t=e('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("select2-container--"+this.options.get("theme")),t.data("element",this.$element),t},o}),t.define("select2/compat/utils",["jquery"],function(e){function t(t,n,i){var o,r,s=[];o=e.trim(t.attr("class")),o&&(o=""+o,e(o.split(/\s+/)).each(function(){0===this.indexOf("select2-")&&s.push(this)})),o=e.trim(n.attr("class")),o&&(o=""+o,e(o.split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(r=i(this))&&s.push(r)})),t.attr("class",s.join(" "))}return{syncCssClasses:t}}),t.define("select2/compat/containerCss",["jquery","./utils"],function(e,t){function n(e){return null}function i(){}return i.prototype.render=function(i){var o=i.call(this),r=this.options.get("containerCssClass")||"";e.isFunction(r)&&(r=r(this.$element));var s=this.options.get("adaptContainerCssClass");if(s=s||n,-1!==r.indexOf(":all:")){r=r.replace(":all:","");var a=s;s=function(e){var t=a(e);return null!=t?t+" "+e:e}}var l=this.options.get("containerCss")||{};return e.isFunction(l)&&(l=l(this.$element)),t.syncCssClasses(o,this.$element,s),o.css(l),o.addClass(r),o},i}),t.define("select2/compat/dropdownCss",["jquery","./utils"],function(e,t){function n(e){return null}function i(){}return i.prototype.render=function(i){var o=i.call(this),r=this.options.get("dropdownCssClass")||"";e.isFunction(r)&&(r=r(this.$element));var s=this.options.get("adaptDropdownCssClass");if(s=s||n,-1!==r.indexOf(":all:")){r=r.replace(":all:","");var a=s;s=function(e){var t=a(e);return null!=t?t+" "+e:e}}var l=this.options.get("dropdownCss")||{};return e.isFunction(l)&&(l=l(this.$element)),t.syncCssClasses(o,this.$element,s),o.css(l),o.addClass(r),o},i}),t.define("select2/compat/initSelection",["jquery"],function(e){function t(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=n.get("initSelection"),this._isInitialized=!1,e.call(this,t,n)}return t.prototype.current=function(t,n){var i=this;if(this._isInitialized)return void t.call(this,n);this.initSelection.call(null,this.$element,function(t){i._isInitialized=!0,e.isArray(t)||(t=[t]),n(t)})},t}),t.define("select2/compat/inputData",["jquery"],function(e){function t(e,t,n){this._currentData=[],this._valueSeparator=n.get("valueSeparator")||",","hidden"===t.prop("type")&&n.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),e.call(this,t,n)}return t.prototype.current=function(t,n){function i(t,n){var o=[];return t.selected||-1!==e.inArray(t.id,n)?(t.selected=!0,o.push(t)):t.selected=!1,t.children&&o.push.apply(o,i(t.children,n)),o}for(var o=[],r=0;r<this._currentData.length;r++){var s=this._currentData[r];o.push.apply(o,i(s,this.$element.val().split(this._valueSeparator)))}n(o)},t.prototype.select=function(t,n){if(this.options.get("multiple")){var i=this.$element.val();i+=this._valueSeparator+n.id,this.$element.val(i),this.$element.trigger("change")}else this.current(function(t){e.map(t,function(e){e.selected=!1})}),this.$element.val(n.id),this.$element.trigger("change")},t.prototype.unselect=function(e,t){var n=this;t.selected=!1,this.current(function(e){for(var i=[],o=0;o<e.length;o++){var r=e[o];t.id!=r.id&&i.push(r.id)}n.$element.val(i.join(n._valueSeparator)),n.$element.trigger("change")})},t.prototype.query=function(e,t,n){for(var i=[],o=0;o<this._currentData.length;o++){var r=this._currentData[o],s=this.matches(t,r);null!==s&&i.push(s)}n({results:i})},t.prototype.addOptions=function(t,n){var i=e.map(n,function(t){return e.data(t[0],"data")});this._currentData.push.apply(this._currentData,i)},t}),t.define("select2/compat/matcher",["jquery"],function(e){function t(t){function n(n,i){var o=e.extend(!0,{},i);if(null==n.term||""===e.trim(n.term))return o;if(i.children){for(var r=i.children.length-1;r>=0;r--){var s=i.children[r];t(n.term,s.text,s)||o.children.splice(r,1)}if(o.children.length>0)return o}return t(n.term,i.text,i)?o:null}return n}return t}),t.define("select2/compat/query",[],function(){function e(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.callback=n,this.options.get("query").call(null,t)},e}),t.define("select2/dropdown/attachContainer",[],function(){function e(e,t,n){e.call(this,t,n)}return e.prototype.position=function(e,t,n){n.find(".dropdown-wrapper").append(t),t.addClass("select2-dropdown--below"),n.addClass("select2-container--below")},e}),t.define("select2/dropdown/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);var i=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$dropdown.on(i.join(" "),function(e){e.stopPropagation()})},e}),t.define("select2/selection/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);var i=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$selection.on(i.join(" "),function(e){e.stopPropagation()})},e}),function(n){"function"==typeof t.define&&t.define.amd?t.define("jquery-mousewheel",["jquery"],n):"object"==typeof exports?module.exports=n:n(e)}(function(e){function t(t){var s=t||window.event,a=l.call(arguments,1),c=0,d=0,p=0,h=0,f=0,g=0;if(t=e.event.fix(s),t.type="mousewheel","detail"in s&&(p=-1*s.detail),"wheelDelta"in s&&(p=s.wheelDelta),"wheelDeltaY"in s&&(p=s.wheelDeltaY),"wheelDeltaX"in s&&(d=-1*s.wheelDeltaX),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(d=-1*p,p=0),c=0===p?d:p,"deltaY"in s&&(p=-1*s.deltaY,c=p),"deltaX"in s&&(d=s.deltaX,0===p&&(c=-1*d)),0!==p||0!==d){if(1===s.deltaMode){var m=e.data(this,"mousewheel-line-height");c*=m,p*=m,d*=m}else if(2===s.deltaMode){var v=e.data(this,"mousewheel-page-height");c*=v,p*=v,d*=v}if(h=Math.max(Math.abs(p),Math.abs(d)),(!r||h<r)&&(r=h,i(s,h)&&(r/=40)),i(s,h)&&(c/=40,d/=40,p/=40),c=Math[c>=1?"floor":"ceil"](c/r),d=Math[d>=1?"floor":"ceil"](d/r),p=Math[p>=1?"floor":"ceil"](p/r),u.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();f=t.clientX-y.left,g=t.clientY-y.top}return t.deltaX=d,t.deltaY=p,t.deltaFactor=r,t.offsetX=f,t.offsetY=g,t.deltaMode=0,a.unshift(t,c,d,p),o&&clearTimeout(o),o=setTimeout(n,200),(e.event.dispatch||e.event.handle).apply(this,a)}}function n(){r=null}function i(e,t){return u.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}var o,r,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],a="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(e.event.fixHooks)for(var c=s.length;c;)e.event.fixHooks[s[--c]]=e.event.mouseHooks;var u=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var n=a.length;n;)this.addEventListener(a[--n],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",u.getLineHeight(this)),e.data(this,"mousewheel-page-height",u.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var n=a.length;n;)this.removeEventListener(a[--n],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var n=e(t),i=n["offsetParent"in e.fn?"offsetParent":"parent"]();return i.length||(i=e("body")),parseInt(i.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(e,t,n,i){if(null==e.fn.select2){var o=["open","close","destroy"];e.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var i=e.extend(!0,{},t);new n(e(this),i)}),this;if("string"==typeof t){var i,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=e(this).data("select2");null==n&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),i=n[t].apply(n,r)}),e.inArray(t,o)>-1?this:i}throw new Error("Invalid arguments for Select2: "+t)}}return null==e.fn.select2.defaults&&(e.fn.select2.defaults=i),n}),{define:t.define,require:t.require}}(),n=t.require("jquery.select2");return e.fn.select2.amd=t,n});
|
1 |
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,n){return void 0===n&&(n="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(n),n}:e(jQuery)}(function(e){var t=function(){if(e&&e.fn&&e.fn.select2&&e.fn.select2.amd)var t=e.fn.select2.amd;var t;return function(){if(!t||!t.requirejs){t?n=t:t={};var e,n,i;!function(t){function o(e,t){return $.call(e,t)}function r(e,t){var n,i,o,r,s,a,l,c,u,d,p,h,f=t&&t.split("/"),g=w.map,m=g&&g["*"]||{};if(e){for(e=e.split("/"),s=e.length-1,w.nodeIdCompat&&x.test(e[s])&&(e[s]=e[s].replace(x,"")),"."===e[0].charAt(0)&&f&&(h=f.slice(0,f.length-1),e=h.concat(e)),u=0;u<e.length;u++)if("."===(p=e[u]))e.splice(u,1),u-=1;else if(".."===p){if(0===u||1===u&&".."===e[2]||".."===e[u-1])continue;u>0&&(e.splice(u-1,2),u-=2)}e=e.join("/")}if((f||m)&&g){for(n=e.split("/"),u=n.length;u>0;u-=1){if(i=n.slice(0,u).join("/"),f)for(d=f.length;d>0;d-=1)if((o=g[f.slice(0,d).join("/")])&&(o=o[i])){r=o,a=u;break}if(r)break;!l&&m&&m[i]&&(l=m[i],c=u)}!r&&l&&(r=l,a=c),r&&(n.splice(0,a,r),e=n.join("/"))}return e}function s(e,n){return function(){var i=b.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),f.apply(t,i.concat([e,n]))}}function a(e){return function(t){return r(t,e)}}function l(e){return function(t){v[e]=t}}function c(e){if(o(y,e)){var n=y[e];delete y[e],_[e]=!0,h.apply(t,n)}if(!o(v,e)&&!o(_,e))throw new Error("No "+e);return v[e]}function u(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function d(e){return e?u(e):[]}function p(e){return function(){return w&&w.config&&w.config[e]||{}}}var h,f,g,m,v={},y={},w={},_={},$=Object.prototype.hasOwnProperty,b=[].slice,x=/\.js$/;g=function(e,t){var n,i=u(e),o=i[0],s=t[1];return e=i[1],o&&(o=r(o,s),n=c(o)),o?e=n&&n.normalize?n.normalize(e,a(s)):r(e,s):(e=r(e,s),i=u(e),o=i[0],e=i[1],o&&(n=c(o))),{f:o?o+"!"+e:e,n:e,pr:o,p:n}},m={require:function(e){return s(e)},exports:function(e){var t=v[e];return void 0!==t?t:v[e]={}},module:function(e){return{id:e,uri:"",exports:v[e],config:p(e)}}},h=function(e,n,i,r){var a,u,p,h,f,w,$,b=[],x=typeof i;if(r=r||e,w=d(r),"undefined"===x||"function"===x){for(n=!n.length&&i.length?["require","exports","module"]:n,f=0;f<n.length;f+=1)if(h=g(n[f],w),"require"===(u=h.f))b[f]=m.require(e);else if("exports"===u)b[f]=m.exports(e),$=!0;else if("module"===u)a=b[f]=m.module(e);else if(o(v,u)||o(y,u)||o(_,u))b[f]=c(u);else{if(!h.p)throw new Error(e+" missing "+u);h.p.load(h.n,s(r,!0),l(u),{}),b[f]=v[u]}p=i?i.apply(v[e],b):void 0,e&&(a&&a.exports!==t&&a.exports!==v[e]?v[e]=a.exports:p===t&&$||(v[e]=p))}else e&&(v[e]=i)},e=n=f=function(e,n,i,o,r){if("string"==typeof e)return m[e]?m[e](n):c(g(e,d(n)).f);if(!e.splice){if(w=e,w.deps&&f(w.deps,w.callback),!n)return;n.splice?(e=n,n=i,i=null):e=t}return n=n||function(){},"function"==typeof i&&(i=o,o=r),o?h(t,e,n,i):setTimeout(function(){h(t,e,n,i)},4),f},f.config=function(e){return f(e)},e._defined=v,i=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),o(v,e)||o(y,e)||(y[e]=[e,t,n])},i.amd={jQuery:!0}}(),t.requirejs=e,t.require=n,t.define=i}}(),t.define("almond",function(){}),t.define("jquery",[],function(){var t=e||$;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),t}),t.define("select2/utils",["jquery"],function(e){function t(e){var t=e.prototype,n=[];for(var i in t){"function"==typeof t[i]&&("constructor"!==i&&n.push(i))}return n}var n={};n.Extend=function(e,t){function n(){this.constructor=e}var i={}.hasOwnProperty;for(var o in t)i.call(t,o)&&(e[o]=t[o]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},n.Decorate=function(e,n){function i(){var t=Array.prototype.unshift,i=n.prototype.constructor.length,o=e.prototype.constructor;i>0&&(t.call(arguments,e.prototype.constructor),o=n.prototype.constructor),o.apply(this,arguments)}function o(){this.constructor=i}var r=t(n),s=t(e);n.displayName=e.displayName,i.prototype=new o;for(var a=0;a<s.length;a++){var l=s[a];i.prototype[l]=e.prototype[l]}for(var c=0;c<r.length;c++){var u=r[c];i.prototype[u]=function(e){var t=function(){};e in i.prototype&&(t=i.prototype[e]);var o=n.prototype[e];return function(){return Array.prototype.unshift.call(arguments,t),o.apply(this,arguments)}}(u)}return i};var i=function(){this.listeners={}};return i.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},i.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},null==n&&(n=[]),0===n.length&&n.push({}),n[0]._type=e,e in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},i.prototype.invoke=function(e,t){for(var n=0,i=e.length;n<i;n++)e[n].apply(this,t)},n.Observable=i,n.generateChars=function(e){for(var t="",n=0;n<e;n++){t+=Math.floor(36*Math.random()).toString(36)}return t},n.bind=function(e,t){return function(){e.apply(t,arguments)}},n._convertData=function(e){for(var t in e){var n=t.split("-"),i=e;if(1!==n.length){for(var o=0;o<n.length;o++){var r=n[o];r=r.substring(0,1).toLowerCase()+r.substring(1),r in i||(i[r]={}),o==n.length-1&&(i[r]=e[t]),i=i[r]}delete e[t]}}return e},n.hasScroll=function(t,n){var i=e(n),o=n.style.overflowX,r=n.style.overflowY;return(o!==r||"hidden"!==r&&"visible"!==r)&&("scroll"===o||"scroll"===r||(i.innerHeight()<n.scrollHeight||i.innerWidth()<n.scrollWidth))},n.escapeMarkup=function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,function(e){return t[e]})},n.appendMany=function(t,n){if("1.7"===e.fn.jquery.substr(0,3)){var i=e();e.map(n,function(e){i=i.add(e)}),n=i}t.append(n)},n}),t.define("select2/results",["jquery","./utils"],function(e,t){function n(e,t,i){this.$element=e,this.data=i,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t,t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var i=e('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),o=this.options.get("translations").get(t.message);i.append(n(o(t.args))),i[0].className+=" select2-results__message",this.$results.append(i)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(e){this.hideLoading();var t=[];if(null==e.results||0===e.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var i=e.results[n],o=this.option(i);t.push(o)}this.$results.append(t)},n.prototype.position=function(e,t){t.find(".select2-results").append(e)},n.prototype.sort=function(e){return this.options.get("sorter")(e)},n.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option[aria-selected]"),t=e.filter("[aria-selected=true]");t.length>0?t.first().trigger("mouseenter"):e.first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var t=this;this.data.current(function(n){var i=e.map(n,function(e){return e.id.toString()});t.$results.find(".select2-results__option[aria-selected]").each(function(){var t=e(this),n=e.data(this,"data"),o=""+n.id;null!=n.element&&n.element.selected||null==n.element&&e.inArray(o,i)>-1?t.attr("aria-selected","true"):t.attr("aria-selected","false")})})},n.prototype.showLoading=function(e){this.hideLoading();var t=this.options.get("translations").get("searching"),n={disabled:!0,loading:!0,text:t(e)},i=this.option(n);i.className+=" loading-results",this.$results.prepend(i)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(t){var n=document.createElement("li");n.className="select2-results__option";var i={role:"treeitem","aria-selected":"false"};t.disabled&&(delete i["aria-selected"],i["aria-disabled"]="true"),null==t.id&&delete i["aria-selected"],null!=t._resultId&&(n.id=t._resultId),t.title&&(n.title=t.title),t.children&&(i.role="group",i["aria-label"]=t.text,delete i["aria-selected"]);for(var o in i){var r=i[o];n.setAttribute(o,r)}if(t.children){var s=e(n),a=document.createElement("strong");a.className="select2-results__group";e(a);this.template(t,a);for(var l=[],c=0;c<t.children.length;c++){var u=t.children[c],d=this.option(u);l.push(d)}var p=e("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});p.append(l),s.append(a),s.append(p)}else this.template(t,n);return e.data(n,"data",t),n},n.prototype.bind=function(t,n){var i=this,o=t.id+"-results";this.$results.attr("id",o),t.on("results:all",function(e){i.clear(),i.append(e.data),t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),t.on("results:append",function(e){i.append(e.data),t.isOpen()&&i.setClasses()}),t.on("query",function(e){i.hideMessages(),i.showLoading(e)}),t.on("select",function(){t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),t.on("unselect",function(){t.isOpen()&&(i.setClasses(),i.highlightFirstItem())}),t.on("open",function(){i.$results.attr("aria-expanded","true"),i.$results.attr("aria-hidden","false"),i.setClasses(),i.ensureHighlightVisible()}),t.on("close",function(){i.$results.attr("aria-expanded","false"),i.$results.attr("aria-hidden","true"),i.$results.removeAttr("aria-activedescendant")}),t.on("results:toggle",function(){var e=i.getHighlightedResults();0!==e.length&&e.trigger("mouseup")}),t.on("results:select",function(){var e=i.getHighlightedResults();if(0!==e.length){var t=e.data("data");"true"==e.attr("aria-selected")?i.trigger("close",{}):i.trigger("select",{data:t})}}),t.on("results:previous",function(){var e=i.getHighlightedResults(),t=i.$results.find("[aria-selected]"),n=t.index(e);if(0!==n){var o=n-1;0===e.length&&(o=0);var r=t.eq(o);r.trigger("mouseenter");var s=i.$results.offset().top,a=r.offset().top,l=i.$results.scrollTop()+(a-s);0===o?i.$results.scrollTop(0):a-s<0&&i.$results.scrollTop(l)}}),t.on("results:next",function(){var e=i.getHighlightedResults(),t=i.$results.find("[aria-selected]"),n=t.index(e),o=n+1;if(!(o>=t.length)){var r=t.eq(o);r.trigger("mouseenter");var s=i.$results.offset().top+i.$results.outerHeight(!1),a=r.offset().top+r.outerHeight(!1),l=i.$results.scrollTop()+a-s;0===o?i.$results.scrollTop(0):a>s&&i.$results.scrollTop(l)}}),t.on("results:focus",function(e){e.element.addClass("select2-results__option--highlighted")}),t.on("results:message",function(e){i.displayMessage(e)}),e.fn.mousewheel&&this.$results.on("mousewheel",function(e){var t=i.$results.scrollTop(),n=i.$results.get(0).scrollHeight-t+e.deltaY,o=e.deltaY>0&&t-e.deltaY<=0,r=e.deltaY<0&&n<=i.$results.height();o?(i.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):r&&(i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height()),e.preventDefault(),e.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(t){var n=e(this),o=n.data("data");if("true"===n.attr("aria-selected"))return void(i.options.get("multiple")?i.trigger("unselect",{originalEvent:t,data:o}):i.trigger("close",{}));i.trigger("select",{originalEvent:t,data:o})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(t){var n=e(this).data("data");i.getHighlightedResults().removeClass("select2-results__option--highlighted"),i.trigger("results:focus",{data:n,element:e(this)})})},n.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var e=this.getHighlightedResults();if(0!==e.length){var t=this.$results.find("[aria-selected]"),n=t.index(e),i=this.$results.offset().top,o=e.offset().top,r=this.$results.scrollTop()+(o-i),s=o-i;r-=2*e.outerHeight(!1),n<=2?this.$results.scrollTop(0):(s>this.$results.outerHeight()||s<0)&&this.$results.scrollTop(r)}},n.prototype.template=function(t,n){var i=this.options.get("templateResult"),o=this.options.get("escapeMarkup"),r=i(t,n);null==r?n.style.display="none":"string"==typeof r?n.innerHTML=o(r):e(n).append(r)},n}),t.define("select2/keys",[],function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}}),t.define("select2/selection/base",["jquery","../utils","../keys"],function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,t.Observable),i.prototype.render=function(){var t=e('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),t.attr("title",this.$element.attr("title")),t.attr("tabindex",this._tabindex),this.$selection=t,t},i.prototype.bind=function(e,t){var i=this,o=(e.id,e.id+"-results");this.container=e,this.$selection.on("focus",function(e){i.trigger("focus",e)}),this.$selection.on("blur",function(e){i._handleBlur(e)}),this.$selection.on("keydown",function(e){i.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()}),e.on("results:focus",function(e){i.$selection.attr("aria-activedescendant",e.data._resultId)}),e.on("selection:update",function(e){i.update(e.data)}),e.on("open",function(){i.$selection.attr("aria-expanded","true"),i.$selection.attr("aria-owns",o),i._attachCloseHandler(e)}),e.on("close",function(){i.$selection.attr("aria-expanded","false"),i.$selection.removeAttr("aria-activedescendant"),i.$selection.removeAttr("aria-owns"),i.$selection.focus(),i._detachCloseHandler(e)}),e.on("enable",function(){i.$selection.attr("tabindex",i._tabindex)}),e.on("disable",function(){i.$selection.attr("tabindex","-1")})},i.prototype._handleBlur=function(t){var n=this;window.setTimeout(function(){document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement)||n.trigger("blur",t)},1)},i.prototype._attachCloseHandler=function(t){e(document.body).on("mousedown.select2."+t.id,function(t){var n=e(t.target),i=n.closest(".select2");e(".select2.select2-container--open").each(function(){var t=e(this);this!=i[0]&&t.data("element").select2("close")})})},i.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2."+t.id)},i.prototype.position=function(e,t){t.find(".selection").append(e)},i.prototype.destroy=function(){this._detachCloseHandler(this.container)},i.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},i}),t.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(e,t,n,i){function o(){o.__super__.constructor.apply(this,arguments)}return n.Extend(o,t),o.prototype.render=function(){var e=o.__super__.render.call(this);return e.addClass("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},o.prototype.bind=function(e,t){var n=this;o.__super__.bind.apply(this,arguments);var i=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",i),this.$selection.attr("aria-labelledby",i),this.$selection.on("mousedown",function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})}),this.$selection.on("focus",function(e){}),this.$selection.on("blur",function(e){}),e.on("focus",function(t){e.isOpen()||n.$selection.focus()}),e.on("selection:update",function(e){n.update(e.data)})},o.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},o.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},o.prototype.selectionContainer=function(){return e("<span></span>")},o.prototype.update=function(e){if(0===e.length)return void this.clear();var t=e[0],n=this.$selection.find(".select2-selection__rendered"),i=this.display(t,n);n.empty().append(i),n.prop("title",t.title||t.text)},o}),t.define("select2/selection/multiple",["jquery","./base","../utils"],function(e,t,n){function i(e,t){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e.addClass("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},i.prototype.bind=function(t,n){var o=this;i.__super__.bind.apply(this,arguments),this.$selection.on("click",function(e){o.trigger("toggle",{originalEvent:e})}),this.$selection.on("click",".select2-selection__choice__remove",function(t){if(!o.options.get("disabled")){var n=e(this),i=n.parent(),r=i.data("data");o.trigger("unselect",{originalEvent:t,data:r})}})},i.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>')},i.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],i=0;i<e.length;i++){var o=e[i],r=this.selectionContainer(),s=this.display(o,r);r.append(s),r.prop("title",o.title||o.text),r.data("data",o),t.push(r)}var a=this.$selection.find(".select2-selection__rendered");n.appendMany(a,t)}},i}),t.define("select2/selection/placeholder",["../utils"],function(e){function t(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return t.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},t.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),n},t.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(t.length>1||n)return e.call(this,t);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(i)},t}),t.define("select2/selection/allowClear",["jquery","../keys"],function(e,t){function n(){}return n.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(e){i._handleClear(e)}),t.on("keypress",function(e){i._handleKeyboardClear(e,t)})},n.prototype._handleClear=function(e,t){if(!this.options.get("disabled")){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){t.stopPropagation();for(var i=n.data("data"),o=0;o<i.length;o++){var r={data:i[o]};if(this.trigger("unselect",r),r.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},n.prototype._handleKeyboardClear=function(e,n,i){i.isOpen()||n.which!=t.DELETE&&n.which!=t.BACKSPACE||this._handleClear(n)},n.prototype.update=function(t,n){if(t.call(this,n),!(this.$selection.find(".select2-selection__placeholder").length>0||0===n.length)){var i=e('<span class="select2-selection__clear">×</span>');i.data("data",n),this.$selection.find(".select2-selection__rendered").prepend(i)}},n}),t.define("select2/selection/search",["jquery","../utils","../keys"],function(e,t,n){function i(e,t,n){e.call(this,t,n)}return i.prototype.render=function(t){var n=e('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=n,this.$search=n.find("input");var i=t.call(this);return this._transferTabIndex(),i},i.prototype.bind=function(e,t,i){var o=this;e.call(this,t,i),t.on("open",function(){o.$search.trigger("focus")}),t.on("close",function(){o.$search.val(""),o.$search.removeAttr("aria-activedescendant"),o.$search.trigger("focus")}),t.on("enable",function(){o.$search.prop("disabled",!1),o._transferTabIndex()}),t.on("disable",function(){o.$search.prop("disabled",!0)}),t.on("focus",function(e){o.$search.trigger("focus")}),t.on("results:focus",function(e){o.$search.attr("aria-activedescendant",e.id)}),this.$selection.on("focusin",".select2-search--inline",function(e){o.trigger("focus",e)}),this.$selection.on("focusout",".select2-search--inline",function(e){o._handleBlur(e)}),this.$selection.on("keydown",".select2-search--inline",function(e){if(e.stopPropagation(),o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented(),e.which===n.BACKSPACE&&""===o.$search.val()){var t=o.$searchContainer.prev(".select2-selection__choice");if(t.length>0){var i=t.data("data");o.searchRemoveChoice(i),e.preventDefault()}}});var r=document.documentMode,s=r&&r<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(e){if(s)return void o.$selection.off("input.search input.searchcheck");o.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(e){if(s&&"input"===e.type)return void o.$selection.off("input.search input.searchcheck");var t=e.which;t!=n.SHIFT&&t!=n.CTRL&&t!=n.ALT&&t!=n.TAB&&o.handleSearch(e)})},i.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},i.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},i.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.focus()},i.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},i.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},i.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="";if(""!==this.$search.attr("placeholder"))e=this.$selection.find(".select2-selection__rendered").innerWidth();else{e=.75*(this.$search.val().length+1)+"em"}this.$search.css("width",e)},i}),t.define("select2/selection/eventRelay",["jquery"],function(e){function t(){}return t.prototype.bind=function(t,n,i){var o=this,r=["open","opening","close","closing","select","selecting","unselect","unselecting"],s=["opening","closing","selecting","unselecting"];t.call(this,n,i),n.on("*",function(t,n){if(-1!==e.inArray(t,r)){n=n||{};var i=e.Event("select2:"+t,{params:n});o.$element.trigger(i),-1!==e.inArray(t,s)&&(n.prevented=i.isDefaultPrevented())}})},t}),t.define("select2/translation",["jquery","require"],function(e,t){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(e){return this.dict[e]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={},n.loadPath=function(e){if(!(e in n._cache)){var i=t(e);n._cache[e]=i}return new n(n._cache[e])},n}),t.define("select2/diacritics",[],function(){return{"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"}}),t.define("select2/data/base",["../utils"],function(e){function t(e,n){t.__super__.constructor.call(this)}return e.Extend(t,e.Observable),t.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},t.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},t.prototype.bind=function(e,t){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,n){var i=t.id+"-result-";return i+=e.generateChars(4),null!=n.id?i+="-"+n.id.toString():i+="-"+e.generateChars(4),i},t}),t.define("select2/data/select",["./base","../utils","jquery"],function(e,t,n){function i(e,t){this.$element=e,this.options=t,i.__super__.constructor.call(this)}return t.Extend(i,e),i.prototype.current=function(e){var t=[],i=this;this.$element.find(":selected").each(function(){var e=n(this),o=i.item(e);t.push(o)}),e(t)},i.prototype.select=function(e){var t=this;if(e.selected=!0,n(e.element).is("option"))return e.element.selected=!0,
|
2 |
+
void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(i){var o=[];e=[e],e.push.apply(e,i);for(var r=0;r<e.length;r++){var s=e[r].id;-1===n.inArray(s,o)&&o.push(s)}t.$element.val(o),t.$element.trigger("change")});else{var i=e.id;this.$element.val(i),this.$element.trigger("change")}},i.prototype.unselect=function(e){var t=this;if(this.$element.prop("multiple")){if(e.selected=!1,n(e.element).is("option"))return e.element.selected=!1,void this.$element.trigger("change");this.current(function(i){for(var o=[],r=0;r<i.length;r++){var s=i[r].id;s!==e.id&&-1===n.inArray(s,o)&&o.push(s)}t.$element.val(o),t.$element.trigger("change")})}},i.prototype.bind=function(e,t){var n=this;this.container=e,e.on("select",function(e){n.select(e.data)}),e.on("unselect",function(e){n.unselect(e.data)})},i.prototype.destroy=function(){this.$element.find("*").each(function(){n.removeData(this,"data")})},i.prototype.query=function(e,t){var i=[],o=this;this.$element.children().each(function(){var t=n(this);if(t.is("option")||t.is("optgroup")){var r=o.item(t),s=o.matches(e,r);null!==s&&i.push(s)}}),t({results:i})},i.prototype.addOptions=function(e){t.appendMany(this.$element,e)},i.prototype.option=function(e){var t;e.children?(t=document.createElement("optgroup"),t.label=e.text):(t=document.createElement("option"),void 0!==t.textContent?t.textContent=e.text:t.innerText=e.text),void 0!==e.id&&(t.value=e.id),e.disabled&&(t.disabled=!0),e.selected&&(t.selected=!0),e.title&&(t.title=e.title);var i=n(t),o=this._normalizeItem(e);return o.element=t,n.data(t,"data",o),i},i.prototype.item=function(e){var t={};if(null!=(t=n.data(e[0],"data")))return t;if(e.is("option"))t={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if(e.is("optgroup")){t={text:e.prop("label"),children:[],title:e.prop("title")};for(var i=e.children("option"),o=[],r=0;r<i.length;r++){var s=n(i[r]),a=this.item(s);o.push(a)}t.children=o}return t=this._normalizeItem(t),t.element=e[0],n.data(e[0],"data",t),t},i.prototype._normalizeItem=function(e){n.isPlainObject(e)||(e={id:e,text:e}),e=n.extend({},{text:""},e);var t={selected:!1,disabled:!1};return null!=e.id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),n.extend({},t,e)},i.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},i}),t.define("select2/data/array",["./select","../utils","jquery"],function(e,t,n){function i(e,t){var n=t.get("data")||[];i.__super__.constructor.call(this,e,t),this.addOptions(this.convertToOptions(n))}return t.Extend(i,e),i.prototype.select=function(e){var t=this.$element.find("option").filter(function(t,n){return n.value==e.id.toString()});0===t.length&&(t=this.option(e),this.addOptions(t)),i.__super__.select.call(this,e)},i.prototype.convertToOptions=function(e){for(var i=this,o=this.$element.find("option"),r=o.map(function(){return i.item(n(this)).id}).get(),s=[],a=0;a<e.length;a++){var l=this._normalizeItem(e[a]);if(n.inArray(l.id,r)>=0){var c=o.filter(function(e){return function(){return n(this).val()==e.id}}(l)),u=this.item(c),d=n.extend(!0,{},l,u),p=this.option(d);c.replaceWith(p)}else{var h=this.option(l);if(l.children){var f=this.convertToOptions(l.children);t.appendMany(h,f)}s.push(h)}}return s},i}),t.define("select2/data/ajax",["./array","../utils","jquery"],function(e,t,n){function i(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),i.__super__.constructor.call(this,e,t)}return t.Extend(i,e),i.prototype._applyDefaults=function(e){var t={data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,i){var o=n.ajax(e);return o.then(t),o.fail(i),o}};return n.extend({},t,e,!0)},i.prototype.processResults=function(e){return e},i.prototype.query=function(e,t){function i(){var i=r.transport(r,function(i){var r=o.processResults(i,e);o.options.get("debug")&&window.console&&console.error&&(r&&r.results&&n.isArray(r.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),t(r)},function(){i.status&&"0"===i.status||o.trigger("results:message",{message:"errorLoading"})});o._request=i}var o=this;null!=this._request&&(n.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var r=n.extend({type:"GET"},this.ajaxOptions);"function"==typeof r.url&&(r.url=r.url.call(this.$element,e)),"function"==typeof r.data&&(r.data=r.data.call(this.$element,e)),this.ajaxOptions.delay&&null!=e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(i,this.ajaxOptions.delay)):i()},i}),t.define("select2/data/tags",["jquery"],function(e){function t(t,n,i){var o=i.get("tags"),r=i.get("createTag");void 0!==r&&(this.createTag=r);var s=i.get("insertTag");if(void 0!==s&&(this.insertTag=s),t.call(this,n,i),e.isArray(o))for(var a=0;a<o.length;a++){var l=o[a],c=this._normalizeItem(l),u=this.option(c);this.$element.append(u)}}return t.prototype.query=function(e,t,n){function i(e,r){for(var s=e.results,a=0;a<s.length;a++){var l=s[a],c=null!=l.children&&!i({results:l.children},!0);if((l.text||"").toUpperCase()===(t.term||"").toUpperCase()||c)return!r&&(e.data=s,void n(e))}if(r)return!0;var u=o.createTag(t);if(null!=u){var d=o.option(u);d.attr("data-select2-tag",!0),o.addOptions([d]),o.insertTag(s,u)}e.results=s,n(e)}var o=this;if(this._removeOldTags(),null==t.term||null!=t.page)return void e.call(this,t,n);e.call(this,t,i)},t.prototype.createTag=function(t,n){var i=e.trim(n.term);return""===i?null:{id:i,text:i}},t.prototype.insertTag=function(e,t,n){t.unshift(n)},t.prototype._removeOldTags=function(t){this._lastTag;this.$element.find("option[data-select2-tag]").each(function(){this.selected||e(this).remove()})},t}),t.define("select2/data/tokenizer",["jquery"],function(e){function t(e,t,n){var i=n.get("tokenizer");void 0!==i&&(this.tokenizer=i),e.call(this,t,n)}return t.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},t.prototype.query=function(t,n,i){function o(t){var n=s._normalizeItem(t);if(!s.$element.find("option").filter(function(){return e(this).val()===n.id}).length){var i=s.option(n);i.attr("data-select2-tag",!0),s._removeOldTags(),s.addOptions([i])}r(n)}function r(e){s.trigger("select",{data:e})}var s=this;n.term=n.term||"";var a=this.tokenizer(n,this.options,o);a.term!==n.term&&(this.$search.length&&(this.$search.val(a.term),this.$search.focus()),n.term=a.term),t.call(this,n,i)},t.prototype.tokenizer=function(t,n,i,o){for(var r=i.get("tokenSeparators")||[],s=n.term,a=0,l=this.createTag||function(e){return{id:e.term,text:e.term}};a<s.length;){var c=s[a];if(-1!==e.inArray(c,r)){var u=s.substr(0,a),d=e.extend({},n,{term:u}),p=l(d);null!=p?(o(p),s=s.substr(a+1)||"",a=0):a++}else a++}return{term:s}},t}),t.define("select2/data/minimumInputLength",[],function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){if(t.term=t.term||"",t.term.length<this.minimumInputLength)return void this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}});e.call(this,t,n)},e}),t.define("select2/data/maximumInputLength",[],function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){if(t.term=t.term||"",this.maximumInputLength>0&&t.term.length>this.maximumInputLength)return void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}});e.call(this,t,n)},e}),t.define("select2/data/maximumSelectionLength",[],function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){var i=this;this.current(function(o){var r=null!=o?o.length:0;if(i.maximumSelectionLength>0&&r>=i.maximumSelectionLength)return void i.trigger("results:message",{message:"maximumSelected",args:{maximum:i.maximumSelectionLength}});e.call(i,t,n)})},e}),t.define("select2/dropdown",["jquery","./utils"],function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<span class="select2-dropdown"><span class="select2-results"></span></span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t,t},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),t.define("select2/dropdown/search",["jquery","../utils"],function(e,t){function n(){}return n.prototype.render=function(t){var n=t.call(this),i=e('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=i,this.$search=i.find("input"),n.prepend(i),n},n.prototype.bind=function(t,n,i){var o=this;t.call(this,n,i),this.$search.on("keydown",function(e){o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented()}),this.$search.on("input",function(t){e(this).off("keyup")}),this.$search.on("keyup input",function(e){o.handleSearch(e)}),n.on("open",function(){o.$search.attr("tabindex",0),o.$search.focus(),window.setTimeout(function(){o.$search.focus()},0)}),n.on("close",function(){o.$search.attr("tabindex",-1),o.$search.val("")}),n.on("focus",function(){n.isOpen()||o.$search.focus()}),n.on("results:all",function(e){if(null==e.query.term||""===e.query.term){o.showSearch(e)?o.$searchContainer.removeClass("select2-search--hide"):o.$searchContainer.addClass("select2-search--hide")}})},n.prototype.handleSearch=function(e){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},n.prototype.showSearch=function(e,t){return!0},n}),t.define("select2/dropdown/hidePlaceholder",[],function(){function e(e,t,n,i){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,i)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t&&(t={id:"",text:t}),t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),i=t.length-1;i>=0;i--){var o=t[i];this.placeholder.id===o.id&&n.splice(i,1)}return n},e}),t.define("select2/dropdown/infiniteScroll",["jquery"],function(e){function t(e,t,n,i){this.lastParams={},e.call(this,t,n,i),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&this.$results.append(this.$loadingMore)},t.prototype.bind=function(t,n,i){var o=this;t.call(this,n,i),n.on("query",function(e){o.lastParams=e,o.loading=!0}),n.on("query:append",function(e){o.lastParams=e,o.loading=!0}),this.$results.on("scroll",function(){var t=e.contains(document.documentElement,o.$loadingMore[0]);if(!o.loading&&t){o.$results.offset().top+o.$results.outerHeight(!1)+50>=o.$loadingMore.offset().top+o.$loadingMore.outerHeight(!1)&&o.loadMore()}})},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t}),t.define("select2/dropdown/attachBody",["jquery","../utils"],function(e,t){function n(t,n,i){this.$dropdownParent=i.get("dropdownParent")||e(document.body),t.call(this,n,i)}return n.prototype.bind=function(e,t,n){var i=this,o=!1;e.call(this,t,n),t.on("open",function(){i._showDropdown(),i._attachPositioningHandler(t),o||(o=!0,t.on("results:all",function(){i._positionDropdown(),i._resizeDropdown()}),t.on("results:append",function(){i._positionDropdown(),i._resizeDropdown()}))}),t.on("close",function(){i._hideDropdown(),i._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(e){e.stopPropagation()})},n.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t.removeClass("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(t){var n=e("<span></span>"),i=t.call(this);return n.append(i),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._attachPositioningHandler=function(n,i){var o=this,r="scroll.select2."+i.id,s="resize.select2."+i.id,a="orientationchange.select2."+i.id,l=this.$container.parents().filter(t.hasScroll);l.each(function(){e(this).data("select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})}),l.on(r,function(t){var n=e(this).data("select2-scroll-position");e(this).find(".select2-container--open").length>0&&e(this).scrollTop(n.y)}),e(window).on(r+" "+s+" "+a,function(e){o._positionDropdown(),o._resizeDropdown()})},n.prototype._detachPositioningHandler=function(n,i){var o="scroll.select2."+i.id,r="resize.select2."+i.id,s="orientationchange.select2."+i.id;this.$container.parents().filter(t.hasScroll).off(o),e(window).off(o+" "+r+" "+s)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown.hasClass("select2-dropdown--above"),i=this.$dropdown.hasClass("select2-dropdown--below"),o=null,r=this.$container.offset();r.bottom=r.top+this.$container.outerHeight(!1);var s={height:this.$container.outerHeight(!1)};s.top=r.top,s.bottom=r.top+s.height;var a={height:this.$dropdown.outerHeight(!1)},l={top:t.scrollTop(),bottom:t.scrollTop()+t.height()},c=l.top<r.top-a.height,u=l.bottom>r.bottom+a.height,d={left:r.left,top:s.bottom},p=this.$dropdownParent;"static"===p.css("position")&&(p=p.offsetParent());var h=p.offset();d.top-=h.top,d.left-=h.left,n||i||(o="below"),u||!c||n?!c&&u&&n&&(o="below"):o="above",("above"==o||n&&"below"!==o)&&(d.top=s.top-h.top-a.height),null!=o&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+o),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+o)),this.$dropdownContainer.css(d)},n.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n}),t.define("select2/dropdown/minimumResultsForSearch",[],function(){function e(t){for(var n=0,i=0;i<t.length;i++){var o=t[i];o.children?n+=e(o.children):n++}return n}function t(e,t,n,i){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,i)}return t.prototype.showSearch=function(t,n){return!(e(n.data.results)<this.minimumResultsForSearch)&&t.call(this,n)},t}),t.define("select2/dropdown/selectOnClose",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("close",function(e){i._handleSelectOnClose(e)})},e.prototype._handleSelectOnClose=function(e,t){if(t&&null!=t.originalSelect2Event){var n=t.originalSelect2Event;if("select"===n._type||"unselect"===n._type)return}var i=this.getHighlightedResults();if(!(i.length<1)){var o=i.data("data");null!=o.element&&o.element.selected||null==o.element&&o.selected||this.trigger("select",{data:o})}},e}),t.define("select2/dropdown/closeOnSelect",[],function(){function e(){}return e.prototype.bind=function(e,t,n){var i=this;e.call(this,t,n),t.on("select",function(e){i._selectTriggered(e)}),t.on("unselect",function(e){i._selectTriggered(e)})},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&n.ctrlKey||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e}),t.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum,n="Please delete "+t+" character";return 1!=t&&(n+="s"),n},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"}}}),t.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(e,t,n,i,o,r,s,a,l,c,u,d,p,h,f,g,m,v,y,w,_,$,b,x,A,C,S,O,E){function D(){this.reset()}return D.prototype.apply=function(d){if(d=e.extend(!0,{},this.defaults,d),null==d.dataAdapter){if(null!=d.ajax?d.dataAdapter=f:null!=d.data?d.dataAdapter=h:d.dataAdapter=p,d.minimumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,v)),d.maximumInputLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,y)),d.maximumSelectionLength>0&&(d.dataAdapter=c.Decorate(d.dataAdapter,w)),d.tags&&(d.dataAdapter=c.Decorate(d.dataAdapter,g)),null==d.tokenSeparators&&null==d.tokenizer||(d.dataAdapter=c.Decorate(d.dataAdapter,m)),null!=d.query){var E=t(d.amdBase+"compat/query");d.dataAdapter=c.Decorate(d.dataAdapter,E)}if(null!=d.initSelection){var D=t(d.amdBase+"compat/initSelection");d.dataAdapter=c.Decorate(d.dataAdapter,D)}}if(null==d.resultsAdapter&&(d.resultsAdapter=n,null!=d.ajax&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,x)),null!=d.placeholder&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,b)),d.selectOnClose&&(d.resultsAdapter=c.Decorate(d.resultsAdapter,S))),null==d.dropdownAdapter){if(d.multiple)d.dropdownAdapter=_;else{var T=c.Decorate(_,$);d.dropdownAdapter=T}if(0!==d.minimumResultsForSearch&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,C)),d.closeOnSelect&&(d.dropdownAdapter=c.Decorate(d.dropdownAdapter,O)),null!=d.dropdownCssClass||null!=d.dropdownCss||null!=d.adaptDropdownCssClass){var q=t(d.amdBase+"compat/dropdownCss");d.dropdownAdapter=c.Decorate(d.dropdownAdapter,q)}d.dropdownAdapter=c.Decorate(d.dropdownAdapter,A)}if(null==d.selectionAdapter){if(d.multiple?d.selectionAdapter=o:d.selectionAdapter=i,null!=d.placeholder&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,r)),d.allowClear&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,s)),d.multiple&&(d.selectionAdapter=c.Decorate(d.selectionAdapter,a)),null!=d.containerCssClass||null!=d.containerCss||null!=d.adaptContainerCssClass){var j=t(d.amdBase+"compat/containerCss");d.selectionAdapter=c.Decorate(d.selectionAdapter,j)}d.selectionAdapter=c.Decorate(d.selectionAdapter,l)}if("string"==typeof d.language)if(d.language.indexOf("-")>0){var L=d.language.split("-"),k=L[0];d.language=[d.language,k]}else d.language=[d.language];if(e.isArray(d.language)){var P=new u;d.language.push("en");for(var I=d.language,M=0;M<I.length;M++){var R=I[M],z={};try{z=u.loadPath(R)}catch(e){try{R=this.defaults.amdLanguageBase+R,z=u.loadPath(R)}catch(e){d.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+R+'" could not be automatically loaded. A fallback will be used instead.');continue}}P.extend(z)}d.translations=P}else{var H=u.loadPath(this.defaults.amdLanguageBase+"en"),U=new u(d.language);U.extend(H),d.translations=U}return d},D.prototype.reset=function(){function t(e){function t(e){return d[e]||e}return e.replace(/[^\u0000-\u007E]/g,t)}function n(i,o){if(""===e.trim(i.term))return o;if(o.children&&o.children.length>0){for(var r=e.extend(!0,{},o),s=o.children.length-1;s>=0;s--){null==n(i,o.children[s])&&r.children.splice(s,1)}return r.children.length>0?r:n(i,r)}var a=t(o.text).toUpperCase(),l=t(i.term).toUpperCase();return a.indexOf(l)>-1?o:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:E,matcher:n,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},D.prototype.set=function(t,n){var i=e.camelCase(t),o={};o[i]=n;var r=c._convertData(o);e.extend(this.defaults,r)},new D}),t.define("select2/options",["require","jquery","./defaults","./utils"],function(e,t,n,i){function o(t,o){if(this.options=t,null!=o&&this.fromElement(o),this.options=n.apply(this.options),o&&o.is("input")){var r=e(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=i.Decorate(this.options.dataAdapter,r)}}return o.prototype.fromElement=function(e){var n=["select2"];null==this.options.multiple&&(this.options.multiple=e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=e.prop("disabled")),null==this.options.language&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),null==this.options.dir&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),e.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),e.data("data",e.data("select2Tags")),e.data("tags",!0)),e.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),e.attr("ajax--url",e.data("ajaxUrl")),e.data("ajax--url",e.data("ajaxUrl")));var o={};o=t.fn.jquery&&"1."==t.fn.jquery.substr(0,2)&&e[0].dataset?t.extend(!0,{},e[0].dataset,e.data()):e.data();var r=t.extend(!0,{},o);r=i._convertData(r);for(var s in r)t.inArray(s,n)>-1||(t.isPlainObject(this.options[s])?t.extend(this.options[s],r[s]):this.options[s]=r[s]);return this},o.prototype.get=function(e){return this.options[e]},o.prototype.set=function(e,t){this.options[e]=t},o}),t.define("select2/core",["jquery","./options","./utils","./keys"],function(e,t,n,i){var o=function(e,n){null!=e.data("select2")&&e.data("select2").destroy(),this.$element=e,this.id=this._generateId(e),n=n||{},this.options=new t(n,e),o.__super__.constructor.call(this);var i=e.attr("tabindex")||0;e.data("old-tabindex",i),e.attr("tabindex","-1");var r=this.options.get("dataAdapter");this.dataAdapter=new r(e,this.options);var s=this.render();this._placeContainer(s);var a=this.options.get("selectionAdapter");this.selection=new a(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,s);var l=this.options.get("dropdownAdapter");this.dropdown=new l(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,s);var c=this.options.get("resultsAdapter");this.results=new c(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var u=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(e){u.trigger("selection:update",{data:e})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),e.data("select2",this)};return n.Extend(o,n.Observable),o.prototype._generateId=function(e){var t="";return t=null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4),t=t.replace(/(:|\.|\[|\]|,)/g,""),t="select2-"+t},o.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},o.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var i=this._resolveWidth(e,"style");return null!=i?i:this._resolveWidth(e,"element")}if("element"==t){var o=e.outerWidth(!1);return o<=0?"auto":o+"px"}if("style"==t){var r=e.attr("style");if("string"!=typeof r)return null;for(var s=r.split(";"),a=0,l=s.length;a<l;a+=1){var c=s[a].replace(/\s/g,""),u=c.match(n);if(null!==u&&u.length>=1)return u[1]}return null}return t},o.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},o.prototype._registerDomEvents=function(){var t=this;this.$element.on("change.select2",function(){t.dataAdapter.current(function(e){t.trigger("selection:update",{data:e})})}),this.$element.on("focus.select2",function(e){t.trigger("focus",e)}),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var i=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=i?(this._observer=new i(function(n){e.each(n,t._syncA),e.each(n,t._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",t._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",t._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",t._syncS,!1))},o.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerSelectionEvents=function(){var t=this,n=["toggle","focus"];this.selection.on("toggle",function(){t.toggleDropdown()}),this.selection.on("focus",function(e){t.focus(e)}),this.selection.on("*",function(i,o){-1===e.inArray(i,n)&&t.trigger(i,o)})},o.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",function(t,n){e.trigger(t,n)})},o.prototype._registerEvents=function(){var e=this;this.on("open",function(){e.$container.addClass("select2-container--open")}),this.on("close",function(){e.$container.removeClass("select2-container--open")}),this.on("enable",function(){e.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){e.$container.addClass("select2-container--disabled")}),this.on("blur",function(){e.$container.removeClass("select2-container--focus")}),this.on("query",function(t){e.isOpen()||e.trigger("open",{}),this.dataAdapter.query(t,function(n){e.trigger("results:all",{data:n,query:t})})}),this.on("query:append",function(t){this.dataAdapter.query(t,function(n){e.trigger("results:append",{data:n,query:t})})}),this.on("keypress",function(t){var n=t.which;e.isOpen()?n===i.ESC||n===i.TAB||n===i.UP&&t.altKey?(e.close(),t.preventDefault()):n===i.ENTER?(e.trigger("results:select",{}),t.preventDefault()):n===i.SPACE&&t.ctrlKey?(e.trigger("results:toggle",{}),t.preventDefault()):n===i.UP?(e.trigger("results:previous",{}),t.preventDefault()):n===i.DOWN&&(e.trigger("results:next",{}),t.preventDefault()):(n===i.ENTER||n===i.SPACE||n===i.DOWN&&t.altKey)&&(e.open(),t.preventDefault())})},o.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},o.prototype._syncSubtree=function(e,t){var n=!1,i=this;if(!e||!e.target||"OPTION"===e.target.nodeName||"OPTGROUP"===e.target.nodeName){if(t)if(t.addedNodes&&t.addedNodes.length>0)for(var o=0;o<t.addedNodes.length;o++){var r=t.addedNodes[o];r.selected&&(n=!0)}else t.removedNodes&&t.removedNodes.length>0&&(n=!0);else n=!0;n&&this.dataAdapter.current(function(e){i.trigger("selection:update",{data:e})})}},o.prototype.trigger=function(e,t){var n=o.__super__.trigger,i={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===t&&(t={}),e in i){var r=i[e],s={prevented:!1,name:e,args:t};if(n.call(this,r,s),s.prevented)return void(t.prevented=!0)}n.call(this,e,t)},o.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},o.prototype.open=function(){this.isOpen()||this.trigger("query",{})},o.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},o.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},o.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},o.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},o.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=e&&0!==e.length||(e=[!0]);var t=!e[0];this.$element.prop("disabled",t)},o.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var e=[];return this.dataAdapter.current(function(t){e=t}),e},o.prototype.val=function(t){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==t||0===t.length)return this.$element.val();var n=t[0];e.isArray(n)&&(n=e.map(n,function(e){return e.toString()})),this.$element.val(n).trigger("change")},o.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,
|
3 |
this.selection=null,this.dropdown=null,this.results=null},o.prototype.render=function(){var t=e('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container.addClass("select2-container--"+this.options.get("theme")),t.data("element",this.$element),t},o}),t.define("select2/compat/utils",["jquery"],function(e){function t(t,n,i){var o,r,s=[];o=e.trim(t.attr("class")),o&&(o=""+o,e(o.split(/\s+/)).each(function(){0===this.indexOf("select2-")&&s.push(this)})),o=e.trim(n.attr("class")),o&&(o=""+o,e(o.split(/\s+/)).each(function(){0!==this.indexOf("select2-")&&null!=(r=i(this))&&s.push(r)})),t.attr("class",s.join(" "))}return{syncCssClasses:t}}),t.define("select2/compat/containerCss",["jquery","./utils"],function(e,t){function n(e){return null}function i(){}return i.prototype.render=function(i){var o=i.call(this),r=this.options.get("containerCssClass")||"";e.isFunction(r)&&(r=r(this.$element));var s=this.options.get("adaptContainerCssClass");if(s=s||n,-1!==r.indexOf(":all:")){r=r.replace(":all:","");var a=s;s=function(e){var t=a(e);return null!=t?t+" "+e:e}}var l=this.options.get("containerCss")||{};return e.isFunction(l)&&(l=l(this.$element)),t.syncCssClasses(o,this.$element,s),o.css(l),o.addClass(r),o},i}),t.define("select2/compat/dropdownCss",["jquery","./utils"],function(e,t){function n(e){return null}function i(){}return i.prototype.render=function(i){var o=i.call(this),r=this.options.get("dropdownCssClass")||"";e.isFunction(r)&&(r=r(this.$element));var s=this.options.get("adaptDropdownCssClass");if(s=s||n,-1!==r.indexOf(":all:")){r=r.replace(":all:","");var a=s;s=function(e){var t=a(e);return null!=t?t+" "+e:e}}var l=this.options.get("dropdownCss")||{};return e.isFunction(l)&&(l=l(this.$element)),t.syncCssClasses(o,this.$element,s),o.css(l),o.addClass(r),o},i}),t.define("select2/compat/initSelection",["jquery"],function(e){function t(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection` option in future versions of Select2"),this.initSelection=n.get("initSelection"),this._isInitialized=!1,e.call(this,t,n)}return t.prototype.current=function(t,n){var i=this;if(this._isInitialized)return void t.call(this,n);this.initSelection.call(null,this.$element,function(t){i._isInitialized=!0,e.isArray(t)||(t=[t]),n(t)})},t}),t.define("select2/compat/inputData",["jquery"],function(e){function t(e,t,n){this._currentData=[],this._valueSeparator=n.get("valueSeparator")||",","hidden"===t.prop("type")&&n.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),e.call(this,t,n)}return t.prototype.current=function(t,n){function i(t,n){var o=[];return t.selected||-1!==e.inArray(t.id,n)?(t.selected=!0,o.push(t)):t.selected=!1,t.children&&o.push.apply(o,i(t.children,n)),o}for(var o=[],r=0;r<this._currentData.length;r++){var s=this._currentData[r];o.push.apply(o,i(s,this.$element.val().split(this._valueSeparator)))}n(o)},t.prototype.select=function(t,n){if(this.options.get("multiple")){var i=this.$element.val();i+=this._valueSeparator+n.id,this.$element.val(i),this.$element.trigger("change")}else this.current(function(t){e.map(t,function(e){e.selected=!1})}),this.$element.val(n.id),this.$element.trigger("change")},t.prototype.unselect=function(e,t){var n=this;t.selected=!1,this.current(function(e){for(var i=[],o=0;o<e.length;o++){var r=e[o];t.id!=r.id&&i.push(r.id)}n.$element.val(i.join(n._valueSeparator)),n.$element.trigger("change")})},t.prototype.query=function(e,t,n){for(var i=[],o=0;o<this._currentData.length;o++){var r=this._currentData[o],s=this.matches(t,r);null!==s&&i.push(s)}n({results:i})},t.prototype.addOptions=function(t,n){var i=e.map(n,function(t){return e.data(t[0],"data")});this._currentData.push.apply(this._currentData,i)},t}),t.define("select2/compat/matcher",["jquery"],function(e){function t(t){function n(n,i){var o=e.extend(!0,{},i);if(null==n.term||""===e.trim(n.term))return o;if(i.children){for(var r=i.children.length-1;r>=0;r--){var s=i.children[r];t(n.term,s.text,s)||o.children.splice(r,1)}if(o.children.length>0)return o}return t(n.term,i.text,i)?o:null}return n}return t}),t.define("select2/compat/query",[],function(){function e(e,t,n){n.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.callback=n,this.options.get("query").call(null,t)},e}),t.define("select2/dropdown/attachContainer",[],function(){function e(e,t,n){e.call(this,t,n)}return e.prototype.position=function(e,t,n){n.find(".dropdown-wrapper").append(t),t.addClass("select2-dropdown--below"),n.addClass("select2-container--below")},e}),t.define("select2/dropdown/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);var i=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$dropdown.on(i.join(" "),function(e){e.stopPropagation()})},e}),t.define("select2/selection/stopPropagation",[],function(){function e(){}return e.prototype.bind=function(e,t,n){e.call(this,t,n);var i=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$selection.on(i.join(" "),function(e){e.stopPropagation()})},e}),function(n){"function"==typeof t.define&&t.define.amd?t.define("jquery-mousewheel",["jquery"],n):"object"==typeof exports?module.exports=n:n(e)}(function(e){function t(t){var s=t||window.event,a=l.call(arguments,1),c=0,d=0,p=0,h=0,f=0,g=0;if(t=e.event.fix(s),t.type="mousewheel","detail"in s&&(p=-1*s.detail),"wheelDelta"in s&&(p=s.wheelDelta),"wheelDeltaY"in s&&(p=s.wheelDeltaY),"wheelDeltaX"in s&&(d=-1*s.wheelDeltaX),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(d=-1*p,p=0),c=0===p?d:p,"deltaY"in s&&(p=-1*s.deltaY,c=p),"deltaX"in s&&(d=s.deltaX,0===p&&(c=-1*d)),0!==p||0!==d){if(1===s.deltaMode){var m=e.data(this,"mousewheel-line-height");c*=m,p*=m,d*=m}else if(2===s.deltaMode){var v=e.data(this,"mousewheel-page-height");c*=v,p*=v,d*=v}if(h=Math.max(Math.abs(p),Math.abs(d)),(!r||h<r)&&(r=h,i(s,h)&&(r/=40)),i(s,h)&&(c/=40,d/=40,p/=40),c=Math[c>=1?"floor":"ceil"](c/r),d=Math[d>=1?"floor":"ceil"](d/r),p=Math[p>=1?"floor":"ceil"](p/r),u.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();f=t.clientX-y.left,g=t.clientY-y.top}return t.deltaX=d,t.deltaY=p,t.deltaFactor=r,t.offsetX=f,t.offsetY=g,t.deltaMode=0,a.unshift(t,c,d,p),o&&clearTimeout(o),o=setTimeout(n,200),(e.event.dispatch||e.event.handle).apply(this,a)}}function n(){r=null}function i(e,t){return u.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}var o,r,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],a="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(e.event.fixHooks)for(var c=s.length;c;)e.event.fixHooks[s[--c]]=e.event.mouseHooks;var u=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var n=a.length;n;)this.addEventListener(a[--n],t,!1);else this.onmousewheel=t;e.data(this,"mousewheel-line-height",u.getLineHeight(this)),e.data(this,"mousewheel-page-height",u.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var n=a.length;n;)this.removeEventListener(a[--n],t,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var n=e(t),i=n["offsetParent"in e.fn?"offsetParent":"parent"]();return i.length||(i=e("body")),parseInt(i.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(e,t,n,i){if(null==e.fn.select2){var o=["open","close","destroy"];e.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var i=e.extend(!0,{},t);new n(e(this),i)}),this;if("string"==typeof t){var i,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=e(this).data("select2");null==n&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),i=n[t].apply(n,r)}),e.inArray(t,o)>-1?this:i}throw new Error("Invalid arguments for Select2: "+t)}}return null==e.fn.select2.defaults&&(e.fn.select2.defaults=i),n}),{define:t.define,require:t.require}}(),n=t.require("jquery.select2");return e.fn.select2.amd=t,n});
|
products/photocrati_nextgen/modules/nextgen_data/module.nextgen_data.php
CHANGED
@@ -221,8 +221,10 @@ class M_NextGen_Data extends C_Base_Module
|
|
221 |
// Invoke the actual work
|
222 |
self::strip_html($dom->documentElement, TRUE);
|
223 |
|
224 |
-
|
225 |
-
|
|
|
|
|
226 |
}
|
227 |
else {
|
228 |
$retval = '';
|
221 |
// Invoke the actual work
|
222 |
self::strip_html($dom->documentElement, TRUE);
|
223 |
|
224 |
+
$el = $dom->getElementById($id);
|
225 |
+
$retval = $el
|
226 |
+
? implode(array_map([$dom, 'saveHTML'], iterator_to_array($el->childNodes)))
|
227 |
+
: $dom->saveHTML();
|
228 |
}
|
229 |
else {
|
230 |
$retval = '';
|
products/photocrati_nextgen/modules/ngglegacy/admin/js/Jcrop/js/jquery.Jcrop.js
CHANGED
@@ -43,15 +43,17 @@ $.Jcrop = function(obj,opt)
|
|
43 |
// Some on-the-fly fixes for MSIE...sigh
|
44 |
if (!('trackDocument' in opt))
|
45 |
{
|
46 |
-
|
47 |
-
|
|
|
48 |
opt.trackDocument = true;
|
|
|
49 |
}
|
50 |
|
51 |
if (!('keySupport' in opt))
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
// Extend the default options {{{
|
56 |
var defaults = {
|
57 |
|
@@ -416,7 +418,7 @@ $.Jcrop = function(obj,opt)
|
|
416 |
if (options.drawBorders) {
|
417 |
borders = {
|
418 |
top: insertBorder('hline')
|
419 |
-
.css('top'
|
420 |
bottom: insertBorder('hline'),
|
421 |
left: insertBorder('vline'),
|
422 |
right: insertBorder('vline')
|
@@ -965,7 +967,9 @@ $.Jcrop = function(obj,opt)
|
|
965 |
function newTracker()
|
966 |
{
|
967 |
var trk = $('<div></div>').addClass(cssClass('tracker'));
|
968 |
-
|
|
|
|
|
969 |
return trk;
|
970 |
};
|
971 |
|
43 |
// Some on-the-fly fixes for MSIE...sigh
|
44 |
if (!('trackDocument' in opt))
|
45 |
{
|
46 |
+
if (navigator.appName.indexOf("Internet Explorer") !== -1) {
|
47 |
+
opt.trackDocument = navigator.appVersion.indexOf("MSIE 8") !== -1;
|
48 |
+
} else {
|
49 |
opt.trackDocument = true;
|
50 |
+
}
|
51 |
}
|
52 |
|
53 |
if (!('keySupport' in opt))
|
54 |
+
opt.keySupport = navigator.appName.indexOf("Internet Explorer") !== -1;
|
55 |
+
|
56 |
+
// }}}
|
57 |
// Extend the default options {{{
|
58 |
var defaults = {
|
59 |
|
418 |
if (options.drawBorders) {
|
419 |
borders = {
|
420 |
top: insertBorder('hline')
|
421 |
+
.css('top', navigator.appVersion.indexOf("MSIE 8") !== -1 ? px(-1) : px(0)),
|
422 |
bottom: insertBorder('hline'),
|
423 |
left: insertBorder('vline'),
|
424 |
right: insertBorder('vline')
|
967 |
function newTracker()
|
968 |
{
|
969 |
var trk = $('<div></div>').addClass(cssClass('tracker'));
|
970 |
+
if (navigator.appName.indexOf("Internet Explorer") !== -1) {
|
971 |
+
trk.css({ opacity: 0, backgroundColor: 'white' });
|
972 |
+
}
|
973 |
return trk;
|
974 |
};
|
975 |
|
products/photocrati_nextgen/modules/ngglegacy/admin/js/Jcrop/js/jquery.Jcrop.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){e.Jcrop=function(t,n){function s(e){return parseInt(e)+"px"}function r(e){return parseInt(e)+"%"}function o(e){return j.baseClass+"-"+e}function a(t){var n=e(t).offset();return[n.left,n.top]}function c(e){return[e.pageX-se[0],e.pageY-se[1]]}function u(e){e!=L&&(ie.setCursor(e),L=e)}function d(e,t){if(se=a(K),ie.setCursor("move"==e?e:e+"-resize"),"move"==e)return ie.activateHandlers(f(t),g);var n=re.getFixed(),s=p(e),r=re.getCorner(p(s));re.setPressed(re.getCorner(s)),re.setCurrent(r),ie.activateHandlers(l(e,n),g)}function l(e,t){return function(n){if(j.aspectRatio)switch(e){case"e":case"w":n[1]=t.y+1;break;case"n":case"s":n[0]=t.x+1}else switch(e){case"e":case"w":n[1]=t.y2;break;case"n":case"s":n[0]=t.x2}re.setCurrent(n),oe.update()}}function f(e){var t=e;return ae.watchKeys(),function(e){re.moveOffset([e[0]-t[0],e[1]-t[1]]),t=e,oe.update()}}function p(e){switch(e){case"n":return"sw";case"s":case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function b(e){return function(t){return!j.disabled&&(!("move"==e&&!j.allowMove)&&(G=!0,d(e,c(t)),t.stopPropagation(),t.preventDefault(),!1))}}function v(e){return{x:parseInt(e.x*Y),y:parseInt(e.y*q),x2:parseInt(e.x2*Y),y2:parseInt(e.y2*q),w:parseInt(e.w*Y),h:parseInt(e.h*q)}}function g(e){var t=re.getFixed();t.w>j.minSelect[0]&&t.h>j.minSelect[1]?(oe.enableHandles(),oe.done()):oe.release(),ie.setCursor(j.allowSelect?"crosshair":"default")}function m(e){if(j.disabled)return!1;if(!j.allowSelect)return!1;G=!0,se=a(K),oe.disableHandles(),u("crosshair");var t=c(e);return re.setPressed(t),ie.activateHandlers(y,g),ae.watchKeys(),oe.update(),e.stopPropagation(),e.preventDefault(),!1}function y(e){re.setCurrent(e),oe.update()}function x(){var t=e("<div></div>").addClass(o("tracker"));return e.browser.msie&&t.css({opacity:0,backgroundColor:"white"}),t}function C(e){function t(){window.setTimeout(g,u)}var n=e[0]/Y,s=e[1]/q,r=e[2]/Y,o=e[3]/q;if(!N){var i=re.flipCoords(n,s,r,o),a=re.getFixed(),c=initcr=[a.x,a.y,a.x2,a.y2],u=j.animationDelay,d=c[0],l=c[1],r=c[2],o=c[3],f=i[0]-initcr[0],h=i[1]-initcr[1],p=i[2]-initcr[2],w=i[3]-initcr[3],b=0,v=j.swingSpeed;oe.animMode(!0);var g=function(){return function(){b+=(100-b)/v,c[0]=d+b/100*f,c[1]=l+b/100*h,c[2]=r+b/100*p,c[3]=o+b/100*w,b<100?t():oe.done(),b>=99.8&&(b=100),z(c)}}();t()}}function S(e){z([e[0]/Y,e[1]/q,e[2]/Y,e[3]/q])}function z(e){re.setPressed([e[0],e[1]]),re.setCurrent([e[2],e[3]]),oe.update()}function k(t){"object"!=typeof t&&(t={}),j=e.extend(j,t),"function"!=typeof j.onChange&&(j.onChange=function(){}),"function"!=typeof j.onSelect&&(j.onSelect=function(){})}function M(){return v(re.getFixed())}function I(){return re.getFixed()}function H(e){k(e),J()}function O(){j.disabled=!0,oe.disableHandles(),oe.setCursor("default"),ie.setCursor("default")}function D(){j.disabled=!1,J()}function F(){oe.done(),ie.activateHandlers(null,null)}function P(){E.remove(),B.show()}function J(e){j.allowResize?e?oe.enableOnly():oe.enableHandles():oe.disableHandles(),ie.setCursor(j.allowSelect?"crosshair":"default"),oe.setCursor(j.allowMove?"move":"default"),E.css("backgroundColor",j.bgColor),"setSelect"in j&&(S(n.setSelect),oe.done(),delete j.setSelect),"trueSize"in j&&(Y=j.trueSize[0]/W,q=j.trueSize[1]/A),T=j.maxSize[0]||0,V=j.maxSize[1]||0,Q=j.minSize[0]||0,X=j.minSize[1]||0,"outerImage"in j&&(K.attr("src",j.outerImage),delete j.outerImage),oe.refresh()}var t=t,n=n;"object"!=typeof t&&(t=e(t)[0]),"object"!=typeof n&&(n={}),"trackDocument"in n||(n.trackDocument=!e.browser.msie,e.browser.msie&&"8"==e.browser.version.split(".")[0]&&(n.trackDocument=!0)),"keySupport"in n||(n.keySupport=!e.browser.msie);var R={trackDocument:!1,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:.6,borderOpacity:.4,handleOpacity:.5,handlePad:5,handleSize:9,handleOffset:5,edgeMargin:14,aspectRatio:0,keySupport:!0,cornerHandles:!0,sideHandles:!0,drawBorders:!0,dragEdges:!0,boxWidth:0,boxHeight:0,boundary:8,animationDelay:20,swingSpeed:3,allowSelect:!0,allowMove:!0,allowResize:!0,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){}},j=R;k(n);var B=e(t),K=B.clone().removeAttr("id").css({position:"absolute"});K.width(B.width()),K.height(B.height()),B.after(K).hide(),function(e,t,n){var s=e.width(),r=e.height();s>t&&t>0&&(s=t,r=t/e.width()*e.height()),r>n&&n>0&&(r=n,s=n/e.height()*e.width()),Y=e.width()/s,q=e.height()/r,e.width(s).height(r)}(K,j.boxWidth,j.boxHeight);var W=K.width(),A=K.height(),E=e("<div />").width(W).height(A).addClass(o("holder")).css({position:"relative",backgroundColor:j.bgColor}).insertAfter(B).append(K);j.addClass&&E.addClass(j.addClass);var T,V,Q,X,Y,q,G,L,N,U,Z=e("<img />").attr("src",K.attr("src")).css("position","absolute").width(W).height(A),$=e("<div />").width(r(100)).height(r(100)).css({zIndex:310,position:"absolute",overflow:"hidden"}).append(Z),_=e("<div />").width(r(100)).height(r(100)).css("zIndex",320),ee=e("<div />").css({position:"absolute",zIndex:300}).insertBefore(K).append($,_),te=j.boundary,ne=x().width(W+2*te).height(A+2*te).css({position:"absolute",top:s(-te),left:s(-te),zIndex:290}).mousedown(m),se=a(K),re=function(){function e(e){var e=i(e);b=f=e[0],v=p=e[1]}function t(e){var e=i(e);d=e[0]-b,l=e[1]-v,b=e[0],v=e[1]}function n(){return[d,l]}function s(e){var t=e[0],n=e[1];0>f+t&&(t-=t+f),0>p+n&&(n-=n+p),A<v+n&&(n+=A-(v+n)),W<b+t&&(t+=W-(b+t)),f+=t,b+=t,p+=n,v+=n}function r(e){var t=o();switch(e){case"ne":return[t.x2,t.y];case"nw":return[t.x,t.y];case"se":return[t.x2,t.y2];case"sw":return[t.x,t.y2]}}function o(){if(!j.aspectRatio)return c();var e,t,n=j.aspectRatio,s=j.minSize[0]/Y,r=(j.minSize[1],j.maxSize[0]/Y),o=j.maxSize[1]/q,i=b-f,d=v-p,l=Math.abs(i),g=Math.abs(d),m=l/g;return 0==r&&(r=10*W),0==o&&(o=10*A),m<n?(t=v,w=g*n,e=i<0?f-w:w+f,e<0?(e=0,h=Math.abs((e-f)/n),t=d<0?p-h:h+p):e>W&&(e=W,h=Math.abs((e-f)/n),t=d<0?p-h:h+p)):(e=b,h=l/n,t=d<0?p-h:p+h,t<0?(t=0,w=Math.abs((t-p)*n),e=i<0?f-w:w+f):t>A&&(t=A,w=Math.abs(t-p)*n,e=i<0?f-w:w+f)),e>f?(e-f<s?e=f+s:e-f>r&&(e=f+r),t=t>p?p+(e-f)/n:p-(e-f)/n):e<f&&(f-e<s?e=f-s:f-e>r&&(e=f-r),t=t>p?p+(f-e)/n:p-(f-e)/n),e<0?(f-=e,e=0):e>W&&(f-=e-W,e=W),t<0?(p-=t,t=0):t>A&&(p-=t-A,t=A),last=u(a(f,p,e,t))}function i(e){return e[0]<0&&(e[0]=0),e[1]<0&&(e[1]=0),e[0]>W&&(e[0]=W),e[1]>A&&(e[1]=A),[e[0],e[1]]}function a(e,t,n,s){var r=e,o=n,i=t,a=s;return n<e&&(r=n,o=e),s<t&&(i=s,a=t),[Math.round(r),Math.round(i),Math.round(o),Math.round(a)]}function c(){var e=b-f,t=v-p;if(T&&Math.abs(e)>T&&(b=e>0?f+T:f-T),V&&Math.abs(t)>V&&(v=t>0?p+V:p-V),X&&Math.abs(t)<X&&(v=t>0?p+X:p-X),Q&&Math.abs(e)<Q&&(b=e>0?f+Q:f-Q),f<0&&(b-=f,f-=f),p<0&&(v-=p,p-=p),b<0&&(f-=b,b-=b),v<0&&(p-=v,v-=v),b>W){var n=b-W;f-=n,b-=n}if(v>A){var n=v-A;p-=n,v-=n}if(f>W){var n=f-A;v-=n,p-=n}if(p>A){var n=p-A;v-=n,p-=n}return u(a(f,p,b,v))}function u(e){return{x:e[0],y:e[1],x2:e[2],y2:e[3],w:e[2]-e[0],h:e[3]-e[1]}}var d,l,f=0,p=0,b=0,v=0;return{flipCoords:a,setPressed:e,setCurrent:t,getOffset:n,moveOffset:s,getCorner:r,getFixed:o}}(),oe=function(){function t(t){var n=e("<div />").css({position:"absolute",opacity:j.borderOpacity}).addClass(o(t));return $.append(n),n}function n(t,n){var s=e("<div />").mousedown(b(t)).css({cursor:t+"-resize",position:"absolute",zIndex:n});return _.append(s),s}function a(e){return n(e,I++).css({top:s(1-F),left:s(1-F),opacity:j.handleOpacity}).addClass(o("handle"))}function c(e){var t=j.handleSize,o=F,i=t,a=t,c=o,u=o;switch(e){case"n":case"s":a=r(100);break;case"e":case"w":i=r(100)}return n(e,I++).width(a).height(i).css({top:s(1-c),left:s(1-u)})}function u(e){for(i in e)O[e[i]]=a(e[i])}function d(e){var t=Math.round(e.h/2-F),n=Math.round(e.w/2-F),r=(west=1-F,e.w-F),o=e.h-F;"e"in O&&O.e.css({top:s(t),left:s(r)})&&O.w.css({top:s(t)})&&O.s.css({top:s(o),left:s(n)})&&O.n.css({left:s(n)}),"ne"in O&&O.ne.css({left:s(r)})&&O.se.css({top:s(o),left:s(r)})&&O.sw.css({top:s(o)}),"b"in O&&O.b.css({top:s(o)})&&O.r.css({left:s(r)})}function l(e,t){Z.css({top:s(-t),left:s(-e)}),ee.css({top:s(t),left:s(e)})}function f(e,t){ee.width(e).height(t)}function h(){var e=re.getFixed();re.setPressed([e.x,e.y]),re.setCurrent([e.x2,e.y2]),p()}function p(){if(M)return w()}function w(){var e=re.getFixed();f(e.w,e.h),l(e.x,e.y),j.drawBorders&&H.right.css({left:s(e.w-1)})&&H.bottom.css({top:s(e.h-1)}),D&&d(e),M||g(),j.onChange(v(e))}function g(){ee.show(),K.css("opacity",j.bgOpacity),M=!0}function m(){S(),ee.hide(),K.css("opacity",1),M=!1}function y(){D&&(d(re.getFixed()),_.show())}function C(){if(D=!0,j.allowResize)return d(re.getFixed()),_.show(),!0}function S(){D=!1,_.hide()}function z(e){(N=e)?S():C()}function k(){z(!1),h()}var M,I=370,H={},O={},D=!1,F=j.handleOffset;j.drawBorders&&(H={top:t("hline").css("top",s(e.browser.msie?-1:0)),bottom:t("hline"),left:t("vline"),right:t("vline")}),j.dragEdges&&(O.t=c("n"),O.b=c("s"),O.r=c("e"),O.l=c("w")),j.sideHandles&&u(["n","s","e","w"]),j.cornerHandles&&u(["sw","nw","ne","se"]);var P=x().mousedown(b("move")).css({cursor:"move",position:"absolute",zIndex:360});return $.append(P),S(),{updateVisible:p,update:w,release:m,refresh:h,setCursor:function(e){P.css("cursor",e)},enableHandles:C,enableOnly:function(){D=!0},showHandles:y,disableHandles:S,animMode:z,done:k}}(),ie=function(){function t(){ne.css({zIndex:450}),d&&e(document).mousemove(s).mouseup(r)}function n(){ne.css({zIndex:290}),d&&e(document).unbind("mousemove",s).unbind("mouseup",r)}function s(e){a(c(e))}function r(e){return e.preventDefault(),e.stopPropagation(),G&&(G=!1,u(c(e)),j.onSelect(v(re.getFixed())),n(),a=function(){},u=function(){}),!1}function o(e,n){return G=!0,a=e,u=n,t(),!1}function i(e){ne.css("cursor",e)}var a=function(){},u=function(){},d=j.trackDocument;return d||ne.mousemove(s).mouseup(r).mouseout(r),K.before(ne),{activateHandlers:o,setCursor:i}}(),ae=function(){function t(){j.keySupport&&(o.show(),o.focus())}function n(e){o.hide()}function s(e,t,n){j.allowMove&&(re.moveOffset([t,n]),oe.updateVisible()),e.preventDefault(),e.stopPropagation()}function r(e){if(e.ctrlKey)return!0;U=!!e.shiftKey;var t=U?10:1;switch(e.keyCode){case 37:s(e,-t,0);break;case 39:s(e,t,0);break;case 38:s(e,0,-t);break;case 40:s(e,0,t);break;case 27:oe.release();break;case 9:return!0}return nothing(e)}var o=e('<input type="radio" />').css({position:"absolute",left:"-30px"}).keypress(r).blur(n),i=e("<div />").css({position:"absolute",overflow:"hidden"}).append(o);return j.keySupport&&i.insertBefore(K),{watchKeys:t}}();_.hide(),J(!0);var ce={animateTo:C,setSelect:S,setOptions:H,tellSelect:M,tellScaled:I,disable:O,enable:D,cancel:F,focus:ae.watchKeys,getBounds:function(){return[W*Y,A*q]},getWidgetSize:function(){return[W,A]},release:oe.release,destroy:P};return B.data("Jcrop",ce),ce},e.fn.Jcrop=function(t){function n(n){var s=t.useImg||n.src,r=new Image;r.onload=function(){e.Jcrop(n,t)},r.src=s}return"object"!=typeof t&&(t={}),this.each(function(){if(e(this).data("Jcrop")){if("api"==t)return e(this).data("Jcrop");e(this).data("Jcrop").setOptions(t)}else n(this)}),this}}(jQuery);
|
1 |
+
!function(e){e.Jcrop=function(t,n){function r(e){return parseInt(e)+"px"}function o(e){return parseInt(e)+"%"}function s(e){return R.baseClass+"-"+e}function a(t){var n=e(t).offset();return[n.left,n.top]}function c(e){return[e.pageX-re[0],e.pageY-re[1]]}function u(e){e!=G&&(ie.setCursor(e),G=e)}function d(e,t){if(re=a(B),ie.setCursor("move"==e?e:e+"-resize"),"move"==e)return ie.activateHandlers(l(t),g);var n=oe.getFixed(),r=p(e),o=oe.getCorner(p(r));oe.setPressed(oe.getCorner(r)),oe.setCurrent(o),ie.activateHandlers(f(e,n),g)}function f(e,t){return function(n){if(R.aspectRatio)switch(e){case"e":case"w":n[1]=t.y+1;break;case"n":case"s":n[0]=t.x+1}else switch(e){case"e":case"w":n[1]=t.y2;break;case"n":case"s":n[0]=t.x2}oe.setCurrent(n),se.update()}}function l(e){var t=e;return ae.watchKeys(),function(e){oe.moveOffset([e[0]-t[0],e[1]-t[1]]),t=e,se.update()}}function p(e){switch(e){case"n":return"sw";case"s":case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function v(e){return function(t){return!R.disabled&&(!("move"==e&&!R.allowMove)&&(q=!0,d(e,c(t)),t.stopPropagation(),t.preventDefault(),!1))}}function b(e){return{x:parseInt(e.x*X),y:parseInt(e.y*Y),x2:parseInt(e.x2*X),y2:parseInt(e.y2*Y),w:parseInt(e.w*X),h:parseInt(e.h*Y)}}function g(e){var t=oe.getFixed();t.w>R.minSelect[0]&&t.h>R.minSelect[1]?(se.enableHandles(),se.done()):se.release(),ie.setCursor(R.allowSelect?"crosshair":"default")}function m(e){if(R.disabled)return!1;if(!R.allowSelect)return!1;q=!0,re=a(B),se.disableHandles(),u("crosshair");var t=c(e);return oe.setPressed(t),ie.activateHandlers(x,g),ae.watchKeys(),se.update(),e.stopPropagation(),e.preventDefault(),!1}function x(e){oe.setCurrent(e),se.update()}function y(){var t=e("<div></div>").addClass(s("tracker"));return-1!==navigator.appName.indexOf("Internet Explorer")&&t.css({opacity:0,backgroundColor:"white"}),t}function S(e){function t(){window.setTimeout(g,u)}var n=e[0]/X,r=e[1]/Y,o=e[2]/X,s=e[3]/Y;if(!L){var i=oe.flipCoords(n,r,o,s),a=oe.getFixed(),c=initcr=[a.x,a.y,a.x2,a.y2],u=R.animationDelay,d=c[0],f=c[1],o=c[2],s=c[3],l=i[0]-initcr[0],h=i[1]-initcr[1],p=i[2]-initcr[2],w=i[3]-initcr[3],v=0,b=R.swingSpeed;se.animMode(!0);var g=function(){return function(){v+=(100-v)/b,c[0]=d+v/100*l,c[1]=f+v/100*h,c[2]=o+v/100*p,c[3]=s+v/100*w,v<100?t():se.done(),v>=99.8&&(v=100),z(c)}}();t()}}function C(e){z([e[0]/X,e[1]/Y,e[2]/X,e[3]/Y])}function z(e){oe.setPressed([e[0],e[1]]),oe.setCurrent([e[2],e[3]]),se.update()}function I(t){"object"!=typeof t&&(t={}),R=e.extend(R,t),"function"!=typeof R.onChange&&(R.onChange=function(){}),"function"!=typeof R.onSelect&&(R.onSelect=function(){})}function k(){return b(oe.getFixed())}function M(){return oe.getFixed()}function O(e){I(e),E()}function H(){R.disabled=!0,se.disableHandles(),se.setCursor("default"),ie.setCursor("default")}function D(){R.disabled=!1,E()}function F(){se.done(),ie.activateHandlers(null,null)}function P(){N.remove(),j.show()}function E(e){R.allowResize?e?se.enableOnly():se.enableHandles():se.disableHandles(),ie.setCursor(R.allowSelect?"crosshair":"default"),se.setCursor(R.allowMove?"move":"default"),N.css("backgroundColor",R.bgColor),"setSelect"in R&&(C(n.setSelect),se.done(),delete R.setSelect),"trueSize"in R&&(X=R.trueSize[0]/K,Y=R.trueSize[1]/V),W=R.maxSize[0]||0,A=R.maxSize[1]||0,T=R.minSize[0]||0,Q=R.minSize[1]||0,"outerImage"in R&&(B.attr("src",R.outerImage),delete R.outerImage),se.refresh()}var t=t,n=n;"object"!=typeof t&&(t=e(t)[0]),"object"!=typeof n&&(n={}),"trackDocument"in n||(-1!==navigator.appName.indexOf("Internet Explorer")?n.trackDocument=-1!==navigator.appVersion.indexOf("MSIE 8"):n.trackDocument=!0),"keySupport"in n||(n.keySupport=-1!==navigator.appName.indexOf("Internet Explorer"));var J={trackDocument:!1,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:.6,borderOpacity:.4,handleOpacity:.5,handlePad:5,handleSize:9,handleOffset:5,edgeMargin:14,aspectRatio:0,keySupport:!0,cornerHandles:!0,sideHandles:!0,drawBorders:!0,dragEdges:!0,boxWidth:0,boxHeight:0,boundary:8,animationDelay:20,swingSpeed:3,allowSelect:!0,allowMove:!0,allowResize:!0,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){}},R=J;I(n);var j=e(t),B=j.clone().removeAttr("id").css({position:"absolute"});B.width(j.width()),B.height(j.height()),j.after(B).hide(),function(e,t,n){var r=e.width(),o=e.height();r>t&&t>0&&(r=t,o=t/e.width()*e.height()),o>n&&n>0&&(o=n,r=n/e.height()*e.width()),X=e.width()/r,Y=e.height()/o,e.width(r).height(o)}(B,R.boxWidth,R.boxHeight);var K=B.width(),V=B.height(),N=e("<div />").width(K).height(V).addClass(s("holder")).css({position:"relative",backgroundColor:R.bgColor}).insertAfter(j).append(B);R.addClass&&N.addClass(R.addClass);var W,A,T,Q,X,Y,q,G,L,U,Z=e("<img />").attr("src",B.attr("src")).css("position","absolute").width(K).height(V),$=e("<div />").width(o(100)).height(o(100)).css({zIndex:310,position:"absolute",overflow:"hidden"}).append(Z),_=e("<div />").width(o(100)).height(o(100)).css("zIndex",320),ee=e("<div />").css({position:"absolute",zIndex:300}).insertBefore(B).append($,_),te=R.boundary,ne=y().width(K+2*te).height(V+2*te).css({position:"absolute",top:r(-te),left:r(-te),zIndex:290}).mousedown(m),re=a(B),oe=function(){function e(e){var e=i(e);v=l=e[0],b=p=e[1]}function t(e){var e=i(e);d=e[0]-v,f=e[1]-b,v=e[0],b=e[1]}function n(){return[d,f]}function r(e){var t=e[0],n=e[1];0>l+t&&(t-=t+l),0>p+n&&(n-=n+p),V<b+n&&(n+=V-(b+n)),K<v+t&&(t+=K-(v+t)),l+=t,v+=t,p+=n,b+=n}function o(e){var t=s();switch(e){case"ne":return[t.x2,t.y];case"nw":return[t.x,t.y];case"se":return[t.x2,t.y2];case"sw":return[t.x,t.y2]}}function s(){if(!R.aspectRatio)return c();var e,t,n=R.aspectRatio,r=R.minSize[0]/X,o=(R.minSize[1],R.maxSize[0]/X),s=R.maxSize[1]/Y,i=v-l,d=b-p,f=Math.abs(i),g=Math.abs(d),m=f/g;return 0==o&&(o=10*K),0==s&&(s=10*V),m<n?(t=b,w=g*n,e=i<0?l-w:w+l,e<0?(e=0,h=Math.abs((e-l)/n),t=d<0?p-h:h+p):e>K&&(e=K,h=Math.abs((e-l)/n),t=d<0?p-h:h+p)):(e=v,h=f/n,t=d<0?p-h:p+h,t<0?(t=0,w=Math.abs((t-p)*n),e=i<0?l-w:w+l):t>V&&(t=V,w=Math.abs(t-p)*n,e=i<0?l-w:w+l)),e>l?(e-l<r?e=l+r:e-l>o&&(e=l+o),t=t>p?p+(e-l)/n:p-(e-l)/n):e<l&&(l-e<r?e=l-r:l-e>o&&(e=l-o),t=t>p?p+(l-e)/n:p-(l-e)/n),e<0?(l-=e,e=0):e>K&&(l-=e-K,e=K),t<0?(p-=t,t=0):t>V&&(p-=t-V,t=V),last=u(a(l,p,e,t))}function i(e){return e[0]<0&&(e[0]=0),e[1]<0&&(e[1]=0),e[0]>K&&(e[0]=K),e[1]>V&&(e[1]=V),[e[0],e[1]]}function a(e,t,n,r){var o=e,s=n,i=t,a=r;return n<e&&(o=n,s=e),r<t&&(i=r,a=t),[Math.round(o),Math.round(i),Math.round(s),Math.round(a)]}function c(){var e=v-l,t=b-p;if(W&&Math.abs(e)>W&&(v=e>0?l+W:l-W),A&&Math.abs(t)>A&&(b=t>0?p+A:p-A),Q&&Math.abs(t)<Q&&(b=t>0?p+Q:p-Q),T&&Math.abs(e)<T&&(v=e>0?l+T:l-T),l<0&&(v-=l,l-=l),p<0&&(b-=p,p-=p),v<0&&(l-=v,v-=v),b<0&&(p-=b,b-=b),v>K){var n=v-K;l-=n,v-=n}if(b>V){var n=b-V;p-=n,b-=n}if(l>K){var n=l-V;b-=n,p-=n}if(p>V){var n=p-V;b-=n,p-=n}return u(a(l,p,v,b))}function u(e){return{x:e[0],y:e[1],x2:e[2],y2:e[3],w:e[2]-e[0],h:e[3]-e[1]}}var d,f,l=0,p=0,v=0,b=0;return{flipCoords:a,setPressed:e,setCurrent:t,getOffset:n,moveOffset:r,getCorner:o,getFixed:s}}(),se=function(){function t(t){var n=e("<div />").css({position:"absolute",opacity:R.borderOpacity}).addClass(s(t));return $.append(n),n}function n(t,n){var r=e("<div />").mousedown(v(t)).css({cursor:t+"-resize",position:"absolute",zIndex:n});return _.append(r),r}function a(e){return n(e,M++).css({top:r(1-F),left:r(1-F),opacity:R.handleOpacity}).addClass(s("handle"))}function c(e){var t=R.handleSize,s=F,i=t,a=t,c=s,u=s;switch(e){case"n":case"s":a=o(100);break;case"e":case"w":i=o(100)}return n(e,M++).width(a).height(i).css({top:r(1-c),left:r(1-u)})}function u(e){for(i in e)H[e[i]]=a(e[i])}function d(e){var t=Math.round(e.h/2-F),n=Math.round(e.w/2-F),o=(west=1-F,e.w-F),s=e.h-F;"e"in H&&H.e.css({top:r(t),left:r(o)})&&H.w.css({top:r(t)})&&H.s.css({top:r(s),left:r(n)})&&H.n.css({left:r(n)}),"ne"in H&&H.ne.css({left:r(o)})&&H.se.css({top:r(s),left:r(o)})&&H.sw.css({top:r(s)}),"b"in H&&H.b.css({top:r(s)})&&H.r.css({left:r(o)})}function f(e,t){Z.css({top:r(-t),left:r(-e)}),ee.css({top:r(t),left:r(e)})}function l(e,t){ee.width(e).height(t)}function h(){var e=oe.getFixed();oe.setPressed([e.x,e.y]),oe.setCurrent([e.x2,e.y2]),p()}function p(){if(k)return w()}function w(){var e=oe.getFixed();l(e.w,e.h),f(e.x,e.y),R.drawBorders&&O.right.css({left:r(e.w-1)})&&O.bottom.css({top:r(e.h-1)}),D&&d(e),k||g(),R.onChange(b(e))}function g(){ee.show(),B.css("opacity",R.bgOpacity),k=!0}function m(){C(),ee.hide(),B.css("opacity",1),k=!1}function x(){D&&(d(oe.getFixed()),_.show())}function S(){if(D=!0,R.allowResize)return d(oe.getFixed()),_.show(),!0}function C(){D=!1,_.hide()}function z(e){(L=e)?C():S()}function I(){z(!1),h()}var k,M=370,O={},H={},D=!1,F=R.handleOffset;R.drawBorders&&(O={top:t("hline").css("top",r(-1!==navigator.appVersion.indexOf("MSIE 8")?-1:0)),bottom:t("hline"),left:t("vline"),right:t("vline")}),R.dragEdges&&(H.t=c("n"),H.b=c("s"),H.r=c("e"),H.l=c("w")),R.sideHandles&&u(["n","s","e","w"]),R.cornerHandles&&u(["sw","nw","ne","se"]);var P=y().mousedown(v("move")).css({cursor:"move",position:"absolute",zIndex:360});return $.append(P),C(),{updateVisible:p,update:w,release:m,refresh:h,setCursor:function(e){P.css("cursor",e)},enableHandles:S,enableOnly:function(){D=!0},showHandles:x,disableHandles:C,animMode:z,done:I}}(),ie=function(){function t(){ne.css({zIndex:450}),d&&e(document).mousemove(r).mouseup(o)}function n(){ne.css({zIndex:290}),d&&e(document).unbind("mousemove",r).unbind("mouseup",o)}function r(e){a(c(e))}function o(e){return e.preventDefault(),e.stopPropagation(),q&&(q=!1,u(c(e)),R.onSelect(b(oe.getFixed())),n(),a=function(){},u=function(){}),!1}function s(e,n){return q=!0,a=e,u=n,t(),!1}function i(e){ne.css("cursor",e)}var a=function(){},u=function(){},d=R.trackDocument;return d||ne.mousemove(r).mouseup(o).mouseout(o),B.before(ne),{activateHandlers:s,setCursor:i}}(),ae=function(){function t(){R.keySupport&&(s.show(),s.focus())}function n(e){s.hide()}function r(e,t,n){R.allowMove&&(oe.moveOffset([t,n]),se.updateVisible()),e.preventDefault(),e.stopPropagation()}function o(e){if(e.ctrlKey)return!0;U=!!e.shiftKey;var t=U?10:1;switch(e.keyCode){case 37:r(e,-t,0);break;case 39:r(e,t,0);break;case 38:r(e,0,-t);break;case 40:r(e,0,t);break;case 27:se.release();break;case 9:return!0}return nothing(e)}var s=e('<input type="radio" />').css({position:"absolute",left:"-30px"}).keypress(o).blur(n),i=e("<div />").css({position:"absolute",overflow:"hidden"}).append(s);return R.keySupport&&i.insertBefore(B),{watchKeys:t}}();_.hide(),E(!0);var ce={animateTo:S,setSelect:C,setOptions:O,tellSelect:k,tellScaled:M,disable:H,enable:D,cancel:F,focus:ae.watchKeys,getBounds:function(){return[K*X,V*Y]},getWidgetSize:function(){return[K,V]},release:se.release,destroy:P};return j.data("Jcrop",ce),ce},e.fn.Jcrop=function(t){function n(n){var r=t.useImg||n.src,o=new Image;o.onload=function(){e.Jcrop(n,t)},o.src=r}return"object"!=typeof t&&(t={}),this.each(function(){if(e(this).data("Jcrop")){if("api"==t)return e(this).data("Jcrop");e(this).data("Jcrop").setOptions(t)}else n(this)}),this}}(jQuery);
|
products/photocrati_nextgen/modules/ngglegacy/admin/manage-images.php
CHANGED
@@ -161,7 +161,7 @@ function nggallery_picturelist($controller)
|
|
161 |
// load a content via ajax
|
162 |
$('a.ngg-dialog').click(function() {
|
163 |
var dialogs = $('.ngg-overlay-dialog:visible');
|
164 |
-
if (dialogs.
|
165 |
return false;
|
166 |
}
|
167 |
|
161 |
// load a content via ajax
|
162 |
$('a.ngg-dialog').click(function() {
|
163 |
var dialogs = $('.ngg-overlay-dialog:visible');
|
164 |
+
if (dialogs.length > 0) {
|
165 |
return false;
|
166 |
}
|
167 |
|
products/photocrati_nextgen/modules/ngglegacy/module.ngglegacy.php
CHANGED
@@ -23,7 +23,7 @@ class M_NggLegacy extends C_Base_Module
|
|
23 |
'photocrati-nextgen-legacy',
|
24 |
'NextGEN Legacy',
|
25 |
'Embeds the original version of NextGEN 1.9.3 by Alex Rabe',
|
26 |
-
'3.3.
|
27 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
28 |
'Imagely',
|
29 |
'https://www.imagely.com'
|
23 |
'photocrati-nextgen-legacy',
|
24 |
'NextGEN Legacy',
|
25 |
'Embeds the original version of NextGEN 1.9.3 by Alex Rabe',
|
26 |
+
'3.3.11',
|
27 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
28 |
'Imagely',
|
29 |
'https://www.imagely.com'
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: photocrati, imagely
|
3 |
Tags: wordpress gallery plugin, gallery, nextgen, nextgen gallery, photo gallery, image gallery, photography, slideshow, images, photo, photo album, watermark
|
4 |
Requires at least: 4.0.0
|
5 |
-
Stable tag: 3.3.
|
6 |
Tested up to: 5.5.0
|
7 |
License: GPLv2
|
8 |
Requires PHP: 5.4
|
@@ -180,6 +180,13 @@ For more information, feel free to visit the official website for the NextGEN Ga
|
|
180 |
|
181 |
== Changelog ==
|
182 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
= V3.3.10 - 08.12.2020 =
|
184 |
* NEW: Added filter 'ngg_recent_images_sort_by_column' to control how recent images are sorted
|
185 |
* Fixed: Assigning a thumbnail to a custom post type page/post caused a fatal javsacript error
|
2 |
Contributors: photocrati, imagely
|
3 |
Tags: wordpress gallery plugin, gallery, nextgen, nextgen gallery, photo gallery, image gallery, photography, slideshow, images, photo, photo album, watermark
|
4 |
Requires at least: 4.0.0
|
5 |
+
Stable tag: 3.3.11
|
6 |
Tested up to: 5.5.0
|
7 |
License: GPLv2
|
8 |
Requires PHP: 5.4
|
180 |
|
181 |
== Changelog ==
|
182 |
|
183 |
+
= V3.3.11 - 08.14.2020 =
|
184 |
+
* Fixed: Fancybox lightbox not working with WordPress 5.5
|
185 |
+
* Fixed: Inability to upload images or create galleries in WordPress 5.5
|
186 |
+
* Fixed: Cannot crop images from Manage Galleries page
|
187 |
+
* Fixed: Removed use of jquery.size() and jquery.browser
|
188 |
+
* Fixed: Fixed iterator_to_array() PHP warning
|
189 |
+
|
190 |
= V3.3.10 - 08.12.2020 =
|
191 |
* NEW: Added filter 'ngg_recent_images_sort_by_column' to control how recent images are sorted
|
192 |
* Fixed: Assigning a thumbnail to a custom post type page/post caused a fatal javsacript error
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitd944cb3ad10f834222db970b76dd976d::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -13,21 +13,24 @@ class ComposerAutoloaderInit17e6fbef90226b256518f9edbfa906ab
|
|
13 |
}
|
14 |
}
|
15 |
|
|
|
|
|
|
|
16 |
public static function getLoader()
|
17 |
{
|
18 |
if (null !== self::$loader) {
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
@@ -48,19 +51,19 @@ class ComposerAutoloaderInit17e6fbef90226b256518f9edbfa906ab
|
|
48 |
$loader->register(true);
|
49 |
|
50 |
if ($useStaticLoader) {
|
51 |
-
$includeFiles = Composer\Autoload\
|
52 |
} else {
|
53 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
54 |
}
|
55 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
56 |
-
|
57 |
}
|
58 |
|
59 |
return $loader;
|
60 |
}
|
61 |
}
|
62 |
|
63 |
-
function
|
64 |
{
|
65 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
66 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInitd944cb3ad10f834222db970b76dd976d
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
13 |
}
|
14 |
}
|
15 |
|
16 |
+
/**
|
17 |
+
* @return \Composer\Autoload\ClassLoader
|
18 |
+
*/
|
19 |
public static function getLoader()
|
20 |
{
|
21 |
if (null !== self::$loader) {
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInitd944cb3ad10f834222db970b76dd976d', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitd944cb3ad10f834222db970b76dd976d', 'loadClassLoader'));
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require_once __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
+
call_user_func(\Composer\Autoload\ComposerStaticInitd944cb3ad10f834222db970b76dd976d::getInitializer($loader));
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
51 |
$loader->register(true);
|
52 |
|
53 |
if ($useStaticLoader) {
|
54 |
+
$includeFiles = Composer\Autoload\ComposerStaticInitd944cb3ad10f834222db970b76dd976d::$files;
|
55 |
} else {
|
56 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
57 |
}
|
58 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
59 |
+
composerRequired944cb3ad10f834222db970b76dd976d($fileIdentifier, $file);
|
60 |
}
|
61 |
|
62 |
return $loader;
|
63 |
}
|
64 |
}
|
65 |
|
66 |
+
function composerRequired944cb3ad10f834222db970b76dd976d($fileIdentifier, $file)
|
67 |
{
|
68 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
69 |
require $file;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'a5dbe7df96665c0b6c16ae8d91231502' => __DIR__ . '/..' . '/imagely/pope-framework/lib/autoload.php',
|
@@ -27,8 +27,8 @@ class ComposerStaticInit17e6fbef90226b256518f9edbfa906ab
|
|
27 |
public static function getInitializer(ClassLoader $loader)
|
28 |
{
|
29 |
return \Closure::bind(function () use ($loader) {
|
30 |
-
$loader->prefixLengthsPsr4 =
|
31 |
-
$loader->prefixDirsPsr4 =
|
32 |
|
33 |
}, null, ClassLoader::class);
|
34 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInitd944cb3ad10f834222db970b76dd976d
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'a5dbe7df96665c0b6c16ae8d91231502' => __DIR__ . '/..' . '/imagely/pope-framework/lib/autoload.php',
|
27 |
public static function getInitializer(ClassLoader $loader)
|
28 |
{
|
29 |
return \Closure::bind(function () use ($loader) {
|
30 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInitd944cb3ad10f834222db970b76dd976d::$prefixLengthsPsr4;
|
31 |
+
$loader->prefixDirsPsr4 = ComposerStaticInitd944cb3ad10f834222db970b76dd976d::$prefixDirsPsr4;
|
32 |
|
33 |
}, null, ClassLoader::class);
|
34 |
}
|