Version Description
- 09-10-2022 =
- Improvement: Update notiflix version
- Improvement: Update chart js version
- Fix: Header and Footer Template issue
- Fix: Data Sanitize, Escape and Validate issue
- Tweak: Upgrade Bootstrap and Selectize library
Download this release
Release Info
Developer | fauzanjegstudio |
Plugin | Jeg Elementor Kit |
Version | 2.5.1 |
Comparing to | |
See all releases |
Code changes from version 2.5.0 to 2.5.1
- assets/js/dashboard/dashboard-container.js +1 -1
- assets/js/dashboard/dashboard-template.js +1 -1
- assets/js/dashboard/dashboard.js +1 -1
- assets/js/elements/elements.js +1 -1
- assets/js/elements/pie-chart.js +1 -1
- assets/js/notiflix/notiflix.min.css +2 -2
- assets/js/notiflix/notiflix.min.js +1 -1
- class/dashboard/class-dashboard.php +2 -2
- class/dashboard/template/class-template-dashboard-abstract.php +4 -4
- class/elements/views/class-gallery-view.php +8 -8
- class/elements/views/class-product-grid-view.php +6 -6
- class/templates/class-template.php +6 -10
- helper.php +162 -0
- jeg-elementor-kit.php +2 -2
- languages/jeg-elementor-kit.pot +24 -0
- lib/jeg-element/assets/css/selectize.default.css +6 -393
- lib/jeg-element/assets/js/selectize.js +0 -3763
- lib/jeg-element/assets/js/selectize.min.js +2 -0
- lib/jeg-element/includes/class/elementor/class-elementor-abstract.php +500 -500
- lib/jeg-element/includes/class/elementor/class-elementor-manager.php +2 -2
- lib/jeg-element/includes/class/widget/class-widget-abstract.php +4 -4
- lib/jeg-element/includes/class/wpbakery/class-wpbakery-integration.php +2 -2
- lib/jeg-element/includes/helper.php +1 -1
- lib/jeg-framework/assets/css/customizer.css +4 -0
- lib/jeg-framework/assets/css/form-builder.css +4 -0
- lib/jeg-framework/assets/css/selectize.default.css +6 -393
- lib/jeg-framework/assets/js/customizer-control/control-code-editor.js +1 -0
- lib/jeg-framework/assets/js/customizer-control/control-typography.js +2 -0
- lib/jeg-framework/assets/js/form/archive-container.js +22 -21
- lib/jeg-framework/assets/js/form/meta-box-container.js +6 -0
- lib/jeg-framework/assets/js/form/widget-container.js +9 -2
- lib/jeg-framework/assets/js/vendor/bootstrap.min.js +4 -4
- lib/jeg-framework/assets/js/vendor/selectize.min.js +2 -3
- lib/jeg-framework/bootstrap.php +2 -2
- lib/jeg-framework/customizer/class-customizer.php +20 -4
- lib/jeg-framework/customizer/control/class-code-editor.php +106 -0
- lib/jeg-framework/form/class-form-archive.php +9 -14
- lib/jeg-framework/form/class-form-builder.php +7 -6
- lib/jeg-framework/form/class-form-meta-box.php +10 -14
- lib/jeg-framework/form/class-form-widget.php +21 -35
- lib/jeg-framework/readme.txt +3 -0
- lib/jeg-framework/util/framework-helper.php +56 -35
- readme.txt +9 -1
- templates/dashboard/dashboard-header.php +2 -6
assets/js/dashboard/dashboard-container.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(t,e){"use strict";e.SingleSegment=e.noWrapSegment.extend({populateFields:function(){var t=this.prepareField(this.params.fields);this.setupField(this.id,t)},prepareField:function(t){var i=0,n=[];return _.each(t,function(o,a){var s=e.cloneObject(t[a]);n[a]=this.prepareFieldData(s,o,i++)}.bind(this)),e.helper.prioritySort(n)},prepareFieldData:function(t){var e=this.params.container;return t.container=this,t.fieldName=e.id+"["+t.fieldName+"]",t},listenFieldChange:function(t,e){this.params.container.listenSegmentChange(this.id,t,e)}}),e.MultiSegment=e.SingleSegment.extend({segmentType:"multi",segmentContentParent:".jkit-condition-content",ready:function(){this.activateSegment()},prepareFieldData:function(t){var e=this.params.index,i=this.params.container;return t.container=this,t.fieldName=i.id+"["+e+"]["+t.fieldName+"]",t},getParentContainer:function(){return this.params.container.container.find(".jkit-condition-wrapper")},attachEvent:function(){this.element.find(".jkit-condition-header").on("click",this.activateSegment.bind(this)),this.element.find(".tab-delete").on("click",this.removeSegment.bind(this))},activateSegment:function(){this.params.parentInstance.activateSegment(this.id)},toogleSegment:function(){setTimeout(function(){this.element.toggleClass("show").find(".jkit-condition-content").slideToggle("fast")}.bind(this),200)},closeSegment:function(){this.element.find(".jkit-condition-content").slideUp("fast")},removeSegment:function(t){t.stopPropagation(),this.element.remove(),this.params.parentInstance.removeSegment(this.id,this.params.index),void 0!==this.params.container.option.parent.saveValue&&this.params.container.option.parent.saveValue()}}),e.segmentConstructor.single=e.SingleSegment,e.segmentConstructor.multi=e.MultiSegment,e.SingleContainer=e.BaseContainer.extend({setContainerHolder:function(){this.containerHolder=this.option.parent.containerHolder},prepareSegmentData:function(t){return t.parent=this.id,t.container=this,t.fields=this.option.fields,t},populateSegments:function(){var t={[this.option.id]:{id:this.option.id,name:this.option.id,type:this.option.type}};t=this.prepareSegment(t),this.setupSegment(this.id,t)},prepareSegment:function(t){return _.each(t,function(i,n){var o=e.cloneObject(t[n]);t[n]=this.prepareSegmentData(o,i)}.bind(this)),e.helper.prioritySort(t)},getValues:function(){var t={};return this.segments(this.option.id).fields.each((function(e){t[e.id]=e.value.get()})),t},listenSegmentChange:function(t,e,i){void 0!==this.option.parent.listenContainerChange&&this.option.parent.listenContainerChange(t,e,i)}}),e.ConditionContainer=e.SingleContainer.extend({initialize:function(t,i,n){this.id=t,this.element=i,this.option=n,this.segments=new e.Values({defaultConstructor:e.Segment}),this.embeed(),this.setContainerHolder(),this.loadContainer()},populateSegments:function(){for(var t in this.option.fields){var e=this.createSegmentParam(t);e=this.prepareSegment(e),this.setupSegment(this.id,e)}},getValues:function(){var t=[];return this.segments.each((function(e){var i={};e.fields.each((function(t){i[t.id]=t.value.get()})),t.push(i)})),t},triggerFinish:function(){this.segments.each(function(t){this.segments(t.id).triggerLoaded()}.bind(this)),this.checkEmptySegment()},prepareSegmentData:function(t,e){return t.parent=this.id,t.container=this,t.parentInstance=this,void 0===this.option.fields?t.fields=this.option.default:t.fields=this.option.fields[e.index],t},activateSegment:function(t){this.segments.each((function(e){t===e.id&&e.toogleSegment()}))},removeSegment:function(t,e){this.segments.remove(t),this.checkEmptySegment()},checkEmptySegment:function(){this.getAllSegments().length?this.hideEmptyCondition():this.renderEmptySegment()},renderEmptySegment:function(){this.element.find(".jkit-condition-empty").show()},hideEmptyCondition:function(){this.element.find(".jkit-condition-empty").hide()},getAllSegments:function(){var t=[];return this.segments.each((function(e){t.push(e.id)})),t},attachEvent:function(){this.container.find(".jkit-condition-add button").on("click",this.buttonAddClicked.bind(this))},buttonAddClicked:function(){this.createMultiSegment(),void 0!==this.option.parent.saveValue&&this.option.parent.saveValue(),this.checkEmptySegment()},createMultiSegment:function(){var t=this.getNextSegmentIndex(),e=this.createSegmentParam(t),i=e.segment.id;(e=this.prepareSegment(e))[0].fields=this.option.default,this.setupSegment(this.id,e),this.segments(i).triggerLoaded(),this.segments(i).activateSegment()},getNextSegmentIndex:function(){var t=0,e=!1;return this.segments.each((function(i){t=i.params.index,e=!0})),e||0!==t?++t:t},createSegmentParam:function(t){var i=e.segmentName(this.option.id,t);return t=parseInt(t),{segment:{id:i,name:this.option.title+" "+(t+1),type:this.option.type,index:t}}},embeed:function(){this.container=t(this.renderContainer()),this.element.append(this.container)},renderContainer:function(){var t=wp.template("jkit-condition-container");return t?t({lang:JKitTemplateConfig.lang}):"<div></div>"}}),e.JKitOptionBuilder=e.Class.extend({initialize:function(t,i,n){this.id=t,this.options=e.cloneObject(i),this.$wrapper=n,this.createContainer()},createContainer:function(){this.containerHolder=new e.Values({defaultConstructor:e.BaseContainer}),_.each(this.options,function(t){t.parent=this,"single"===t.type?this.containerHolder.add(t.id,new e.SingleContainer(t.id,this.$wrapper,t)):this.containerHolder.add(t.id,new e.ConditionContainer(t.id,this.$wrapper,t))}.bind(this))},triggerFinish:function(){this.containerHolder.trigger(this.id,this)}}),e.JKitOptionWrapperBuilder=e.JKitOptionBuilder.extend({initialize:function(t,i,n,o){this.id=t,this.options=e.cloneObject(i),this.$wrapper=n,this.setting=o,this.timeout=null,this.loaded=!1,this.embeed(),this.attachEvent(),Notiflix.Notify.
|
1 |
+
!function(t,e){"use strict";e.SingleSegment=e.noWrapSegment.extend({populateFields:function(){var t=this.prepareField(this.params.fields);this.setupField(this.id,t)},prepareField:function(t){var i=0,n=[];return _.each(t,function(o,a){var s=e.cloneObject(t[a]);n[a]=this.prepareFieldData(s,o,i++)}.bind(this)),e.helper.prioritySort(n)},prepareFieldData:function(t){var e=this.params.container;return t.container=this,t.fieldName=e.id+"["+t.fieldName+"]",t},listenFieldChange:function(t,e){this.params.container.listenSegmentChange(this.id,t,e)}}),e.MultiSegment=e.SingleSegment.extend({segmentType:"multi",segmentContentParent:".jkit-condition-content",ready:function(){this.activateSegment()},prepareFieldData:function(t){var e=this.params.index,i=this.params.container;return t.container=this,t.fieldName=i.id+"["+e+"]["+t.fieldName+"]",t},getParentContainer:function(){return this.params.container.container.find(".jkit-condition-wrapper")},attachEvent:function(){this.element.find(".jkit-condition-header").on("click",this.activateSegment.bind(this)),this.element.find(".tab-delete").on("click",this.removeSegment.bind(this))},activateSegment:function(){this.params.parentInstance.activateSegment(this.id)},toogleSegment:function(){setTimeout(function(){this.element.toggleClass("show").find(".jkit-condition-content").slideToggle("fast")}.bind(this),200)},closeSegment:function(){this.element.find(".jkit-condition-content").slideUp("fast")},removeSegment:function(t){t.stopPropagation(),this.element.remove(),this.params.parentInstance.removeSegment(this.id,this.params.index),void 0!==this.params.container.option.parent.saveValue&&this.params.container.option.parent.saveValue()}}),e.segmentConstructor.single=e.SingleSegment,e.segmentConstructor.multi=e.MultiSegment,e.SingleContainer=e.BaseContainer.extend({setContainerHolder:function(){this.containerHolder=this.option.parent.containerHolder},prepareSegmentData:function(t){return t.parent=this.id,t.container=this,t.fields=this.option.fields,t},populateSegments:function(){var t={[this.option.id]:{id:this.option.id,name:this.option.id,type:this.option.type}};t=this.prepareSegment(t),this.setupSegment(this.id,t)},prepareSegment:function(t){return _.each(t,function(i,n){var o=e.cloneObject(t[n]);t[n]=this.prepareSegmentData(o,i)}.bind(this)),e.helper.prioritySort(t)},getValues:function(){var t={};return this.segments(this.option.id).fields.each((function(e){t[e.id]=e.value.get()})),t},listenSegmentChange:function(t,e,i){void 0!==this.option.parent.listenContainerChange&&this.option.parent.listenContainerChange(t,e,i)}}),e.ConditionContainer=e.SingleContainer.extend({initialize:function(t,i,n){this.id=t,this.element=i,this.option=n,this.segments=new e.Values({defaultConstructor:e.Segment}),this.embeed(),this.setContainerHolder(),this.loadContainer()},populateSegments:function(){for(var t in this.option.fields){var e=this.createSegmentParam(t);e=this.prepareSegment(e),this.setupSegment(this.id,e)}},getValues:function(){var t=[];return this.segments.each((function(e){var i={};e.fields.each((function(t){i[t.id]=t.value.get()})),t.push(i)})),t},triggerFinish:function(){this.segments.each(function(t){this.segments(t.id).triggerLoaded()}.bind(this)),this.checkEmptySegment()},prepareSegmentData:function(t,e){return t.parent=this.id,t.container=this,t.parentInstance=this,void 0===this.option.fields?t.fields=this.option.default:t.fields=this.option.fields[e.index],t},activateSegment:function(t){this.segments.each((function(e){t===e.id&&e.toogleSegment()}))},removeSegment:function(t,e){this.segments.remove(t),this.checkEmptySegment()},checkEmptySegment:function(){this.getAllSegments().length?this.hideEmptyCondition():this.renderEmptySegment()},renderEmptySegment:function(){this.element.find(".jkit-condition-empty").show()},hideEmptyCondition:function(){this.element.find(".jkit-condition-empty").hide()},getAllSegments:function(){var t=[];return this.segments.each((function(e){t.push(e.id)})),t},attachEvent:function(){this.container.find(".jkit-condition-add button").on("click",this.buttonAddClicked.bind(this))},buttonAddClicked:function(){this.createMultiSegment(),void 0!==this.option.parent.saveValue&&this.option.parent.saveValue(),this.checkEmptySegment()},createMultiSegment:function(){var t=this.getNextSegmentIndex(),e=this.createSegmentParam(t),i=e.segment.id;(e=this.prepareSegment(e))[0].fields=this.option.default,this.setupSegment(this.id,e),this.segments(i).triggerLoaded(),this.segments(i).activateSegment()},getNextSegmentIndex:function(){var t=0,e=!1;return this.segments.each((function(i){t=i.params.index,e=!0})),e||0!==t?++t:t},createSegmentParam:function(t){var i=e.segmentName(this.option.id,t);return t=parseInt(t),{segment:{id:i,name:this.option.title+" "+(t+1),type:this.option.type,index:t}}},embeed:function(){this.container=t(this.renderContainer()),this.element.append(this.container)},renderContainer:function(){var t=wp.template("jkit-condition-container");return t?t({lang:JKitTemplateConfig.lang}):"<div></div>"}}),e.JKitOptionBuilder=e.Class.extend({initialize:function(t,i,n){this.id=t,this.options=e.cloneObject(i),this.$wrapper=n,this.createContainer()},createContainer:function(){this.containerHolder=new e.Values({defaultConstructor:e.BaseContainer}),_.each(this.options,function(t){t.parent=this,"single"===t.type?this.containerHolder.add(t.id,new e.SingleContainer(t.id,this.$wrapper,t)):this.containerHolder.add(t.id,new e.ConditionContainer(t.id,this.$wrapper,t))}.bind(this))},triggerFinish:function(){this.containerHolder.trigger(this.id,this)}}),e.JKitOptionWrapperBuilder=e.JKitOptionBuilder.extend({initialize:function(t,i,n,o){this.id=t,this.options=e.cloneObject(i),this.$wrapper=n,this.setting=o,this.timeout=null,this.loaded=!1,this.embeed(),this.attachEvent(),Notiflix.Notify.init({position:"right-top",zindex:999999,showOnlyTheLastOne:!0,success:{notiflixIconColor:"#fff"}})},attachEvent:function(){this.$container.find(".jkit-container-header").on("click",this.headerClicked.bind(this)),this.$container.find(".jkit-header-action .tab-delete").on("click",this.deleteClicked.bind(this)),this.$container.find(".jkit-header-action .tab-edit").on("click",this.editClicked.bind(this)),this.$container.find(".jkit-header-action .tab-clone").on("click",this.cloneClicked.bind(this))},editClicked:function(t){t.stopPropagation()},cloneClicked:function(e){e.stopPropagation(),t(e.currentTarget).find("i").attr("class","fa fa-circle-o-notch fa-spin"),wp.ajax.send("jkit_clone_element",{data:{id:this.id,nonce:JKitTemplateConfig.nonce,type:JKitTemplateConfig.type,page:JKitTemplateConfig.page}}).done(function(t){window.ampdashboard.reRenderWrapper(t)}.bind(this))},deleteClicked:function(i){i.stopPropagation(),confirm(JKitTemplateConfig.lang.deleteelement)&&(t(i.currentTarget).find("i").attr("class","fa fa-circle-o-notch fa-spin"),wp.ajax.send("jkit_delete_element",{data:{id:this.id,nonce:JKitTemplateConfig.nonce}}).done(function(){this.$container.remove(),e.builderholder.remove(this.id),e.refreshPriority()}.bind(this)))},headerClicked:function(){this.loaded||(this.requestDetail(),this.loaded=!0),this.$container.siblings().each((function(){t(this).removeClass("show").find(".jkit-container-body").slideUp("fast")})),this.$container.toggleClass("show").find(".jkit-container-body").slideToggle("fast")},requestDetail:function(){wp.ajax.send("jkit_detail_element",{data:{id:this.id,nonce:JKitTemplateConfig.nonce,page:JKitTemplateConfig.page}}).done(function(t){this.$container.find(".jkit-container-body").html(""),this.createContainer(t),this.triggerFinish()}.bind(this))},embeed:function(){this.$container=t(this.renderContainer()),this.$wrapper.append(this.$container)},renderContainer:function(){var t=wp.template("jkit-element-container");return t?t({id:this.id,title:this.setting.title,url:this.setting.url,lang:JKitTemplateConfig.lang}):t},createContainer:function(t){this.containerHolder=new e.Values({defaultConstructor:e.BaseContainer});var i=this.$container.find(".jkit-container-body");_.each(this.options,function(n){n.parent=this,n.fields=t[n.id],"single"===n.type?this.containerHolder.add(n.id,new e.SingleContainer(n.id,i,n)):this.containerHolder.add(n.id,new e.ConditionContainer(n.id,i,n))}.bind(this))},listenContainerChange:function(t,e,i){"option"===t&&"title"===e&&this.$container.find(".jkit-container-header h3 span").text(i),this.saveValue()},getValues:function(){var t={};return this.containerHolder.each((function(e){t[e.id]=e.getValues()})),t},saveValue:function(){clearTimeout(this.timeout),this.timeout=setTimeout(function(){wp.ajax.send("jkit_update_element",{data:{id:this.id,data:this.getValues(),nonce:JKitTemplateConfig.nonce}}).done((function(){Notiflix.Notify.success(JKitTemplateConfig.success)}))}.bind(this),500)}})}(jQuery,wp.customize);
|
assets/js/dashboard/dashboard-template.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e,t){"use strict";window.ampdashboard={},t.builderholder=new t.Values({defaultConstructor:t.JKitOptionBuilder}),t.JKitPopup=t.Class.extend({loaded:!1,id:"popup",body:e("body"),popupContainer:null,parentContainer:null,initialize:function(t){this.loaded||(this.parentContainer=t,this.createButton=this.parentContainer.find(".create-element-button"),this.createPopupContainer=e(".create-element-builder-wrapper"),this.createPopupOverlay=e(".create-element-builder-overlay"),this.setupPopup(),this.loaded=!0)},setupPopup:function(){this.prepareContainer(),this.attachEvent()},prepareContainer:function(){this.createPopupContainer.append(this.popupContent()),this.popupContainer=e(".popup-content")},containerContent:function(){t.builderholder.add(this.id,new t.JKitOptionBuilder(this.id,this.changeTabToField(),this.popupContainer)),t.builderholder(this.id).triggerFinish()},changeTabToField:function(){var e=[];return _.each(JKitTemplateConfig.tab,(function(t){"single"===t.type&&(t.fields=t.default),e.push(t)})),e},popupContent:function(){var t=wp.template("jkit-popup");return e(t({lang:JKitTemplateConfig.lang}))},renderOption(){this.containerContent(),this.resetPosition()},resetPosition:function(){var t=e(window).height(),i=e(window).width(),n=Math.floor(80*i/100);n=n>600?600:n;var o=Math.floor(80*t/100),a=(i-n)/2,r=(t-(o=o>700?700:o))/2;this.createPopupContainer.css({width:n,height:o,top:r,left:a}),this.createPopupContainer.find(".popup-content").css({height:o-150})},attachEvent:function(){this.createButton.click(this.openCreatePopup.bind(this)),this.createPopupContainer.find(".close").click(this.hideCreatePopup.bind(this)),this.createPopupContainer.find(".generate").click(this.createElement.bind(this)),this.createPopupContainer.draggable({handle:".popup-header"})},attachOpenButton:function(){this.parentContainer.find(".create-element-button").click(this.openCreatePopup.bind(this))},createElement:function(){this.createPopupContainer.find(".generate").text(JKitTemplateConfig.lang.saving),this.ajaxCreateElement().done(function(e){ampdashboard.reRenderWrapper(e),this.hideCreatePopup()}.bind(this))},getValues:function(){var e={};return t.builderholder(this.id).containerHolder.each((function(t){e[t.id]=t.getValues()})),e},ajaxCreateElement:function(){return wp.ajax.send("jkit_create_element",{data:{data:this.getValues(),nonce:JKitTemplateConfig.nonce,type:JKitTemplateConfig.type,page:JKitTemplateConfig.page}})},openCreatePopup:function(){t.builderholder(this.id)&&t.builderholder.remove(this.id),this.popupContainer.html(""),this.resetPosition(),this.body.addClass("overflow-hidden"),this.createPopupContainer.find(".generate").text(JKitTemplateConfig.lang.create),this.createPopupOverlay.fadeIn(),this.createPopupContainer.fadeIn(),this.renderOption()},hideCreatePopup:function(){this.body.removeClass("overflow-hidden"),this.createPopupOverlay.fadeOut(),this.createPopupContainer.fadeOut()}}),t.JKitDashboard=t.Class.extend({empty:"",popupInstance:null,container:e("#jkit-builder-container"),initialize:function(){this.renderWrapper(JKitTemplateConfig.data),this.popupInstance=new t.JKitPopup(this.container),Notiflix.Notify.
|
1 |
+
!function(e,t){"use strict";window.ampdashboard={},t.builderholder=new t.Values({defaultConstructor:t.JKitOptionBuilder}),t.JKitPopup=t.Class.extend({loaded:!1,id:"popup",body:e("body"),popupContainer:null,parentContainer:null,initialize:function(t){this.loaded||(this.parentContainer=t,this.createButton=this.parentContainer.find(".create-element-button"),this.createPopupContainer=e(".create-element-builder-wrapper"),this.createPopupOverlay=e(".create-element-builder-overlay"),this.setupPopup(),this.loaded=!0)},setupPopup:function(){this.prepareContainer(),this.attachEvent()},prepareContainer:function(){this.createPopupContainer.append(this.popupContent()),this.popupContainer=e(".popup-content")},containerContent:function(){t.builderholder.add(this.id,new t.JKitOptionBuilder(this.id,this.changeTabToField(),this.popupContainer)),t.builderholder(this.id).triggerFinish()},changeTabToField:function(){var e=[];return _.each(JKitTemplateConfig.tab,(function(t){"single"===t.type&&(t.fields=t.default),e.push(t)})),e},popupContent:function(){var t=wp.template("jkit-popup");return e(t({lang:JKitTemplateConfig.lang}))},renderOption(){this.containerContent(),this.resetPosition()},resetPosition:function(){var t=e(window).height(),i=e(window).width(),n=Math.floor(80*i/100);n=n>600?600:n;var o=Math.floor(80*t/100),a=(i-n)/2,r=(t-(o=o>700?700:o))/2;this.createPopupContainer.css({width:n,height:o,top:r,left:a}),this.createPopupContainer.find(".popup-content").css({height:o-150})},attachEvent:function(){this.createButton.click(this.openCreatePopup.bind(this)),this.createPopupContainer.find(".close").click(this.hideCreatePopup.bind(this)),this.createPopupContainer.find(".generate").click(this.createElement.bind(this)),this.createPopupContainer.draggable({handle:".popup-header"})},attachOpenButton:function(){this.parentContainer.find(".create-element-button").click(this.openCreatePopup.bind(this))},createElement:function(){this.createPopupContainer.find(".generate").text(JKitTemplateConfig.lang.saving),this.ajaxCreateElement().done(function(e){ampdashboard.reRenderWrapper(e),this.hideCreatePopup()}.bind(this))},getValues:function(){var e={};return t.builderholder(this.id).containerHolder.each((function(t){e[t.id]=t.getValues()})),e},ajaxCreateElement:function(){return wp.ajax.send("jkit_create_element",{data:{data:this.getValues(),nonce:JKitTemplateConfig.nonce,type:JKitTemplateConfig.type,page:JKitTemplateConfig.page}})},openCreatePopup:function(){t.builderholder(this.id)&&t.builderholder.remove(this.id),this.popupContainer.html(""),this.resetPosition(),this.body.addClass("overflow-hidden"),this.createPopupContainer.find(".generate").text(JKitTemplateConfig.lang.create),this.createPopupOverlay.fadeIn(),this.createPopupContainer.fadeIn(),this.renderOption()},hideCreatePopup:function(){this.body.removeClass("overflow-hidden"),this.createPopupOverlay.fadeOut(),this.createPopupContainer.fadeOut()}}),t.JKitDashboard=t.Class.extend({empty:"",popupInstance:null,container:e("#jkit-builder-container"),initialize:function(){this.renderWrapper(JKitTemplateConfig.data),this.popupInstance=new t.JKitPopup(this.container),Notiflix.Notify.init({position:"right-top",zindex:999999,showOnlyTheLastOne:!0,success:{notiflixIconColor:"#fff"}})},renderWrapper:function(e){this.container.html(this.empty),this.container.append(this.dashboardContent(e)),this.injectBuilder(e),this.builderSortable(),t.refreshPriority()},reRenderWrapper:function(e){this.renderWrapper(e),this.popupInstance.attachOpenButton()},builderSortable:function(){e("#active-element, #inactive-element").sortable({connectWith:".connectedSortable",stop:function(){var i=[];e(".active-element-wrapper .jkit-element-container").each((function(t){i.push(e(this).data("id"))}));var n=[];e(".inactive-element-wrapper .jkit-element-container").each((function(){n.push(e(this).data("id"))})),this.saveSortable(i,n),t.refreshPriority()}.bind(this)}).disableSelection()},saveSortable:function(e,t){clearTimeout(this.sortableTimeout),this.sortableTimeout=setTimeout(function(){wp.ajax.send("jkit_update_sequence",{data:{id:this.id,publish:e,draft:t,nonce:JKitTemplateConfig.nonce}}).done((function(){Notiflix.Notify.success(JKitTemplateConfig.success)}))}.bind(this),500)},injectBuilder:function(t){this.removeBuilderHolder(),this.buildOption(t.publish,e(".active-element-wrapper .content-body")),this.buildOption(t.draft,e(".inactive-element-wrapper .content-body")),window.dispatchEvent(new Event("resize"))},buildOption:function(e,i){e.forEach(function(e){var n=e.id.toString(),o=this.mergeValues(JKitTemplateConfig.tab,e);t.builderholder.add(n,new t.JKitOptionWrapperBuilder(n,o,i,e))}.bind(this))},mergeValues:function(e,i){var n=[];return t.cloneObject(e).forEach((function(e){e.values=i[e.id],n.push(e)})),n},removeBuilderHolder:function(){t.builderholder.each((function(e){t.builderholder.remove(e.id)}))},dashboardContent:function(t){var i=null;return i=0===t.publish.length&&0===t.draft.length?wp.template("jkit-builder-empty"):wp.template("jkit-builder-content"),e(i({lang:JKitTemplateConfig.lang}))},getValues:function(){t.builderholder.each((function(e){var t=[];e.containerHolder.each((function(e){t[e.id]=e.getValues()}))}))}}),t.cloneObject=function(e){return JSON.parse(JSON.stringify(e))},t.segmentName=function(e,t){return e+"_"+t},t.refreshPriority=function(){e(".active-element-wrapper .jkit-container-header").each((function(t){e(this).find(".tab-priority").text(t+1)}))},e(document).ready((function(){window.ampdashboard=new t.JKitDashboard}))}(jQuery,wp.customize);
|
assets/js/dashboard/dashboard.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(t){"use strict";window.jkitdashboard=window.jkitdashboard||{},window.jkitdashboard={init:function(a){var n=this;n.xhr=null,n.container=void 0===a?t("body"):a,Notiflix.Notify.
|
1 |
+
!function(t){"use strict";window.jkitdashboard=window.jkitdashboard||{},window.jkitdashboard={init:function(a){var n=this;n.xhr=null,n.container=void 0===a?t("body"):a,Notiflix.Notify.init({position:"right-top",zindex:999999,showOnlyTheLastOne:!0,success:{notiflixIconColor:"#fff"}}),n.button_save=n.container.find(".jkit-dashboard-body-wrap .jkit-form-submit>button"),n.form_handler(),n.elements(),n.admin_menu()},admin_menu:function(){this.container.find(".jkit-support-menu").attr("target","_blank")},form_handler:function(){var a=this,n="undefined"!=typeof jkit_custom_dashboard_form_id&&jkit_custom_dashboard_form_id.name?"#"+jkit_custom_dashboard_form_id.name:"#jkit-user-data-form, #jkit-settings-form, #jkit-notfound-form",e=a.container.find(n);e.find(".jkit-form-content").on("click",(function(a){a.preventDefault();var n=t(this).parents(".jkit-form-tab ");n.hasClass("collapse")?n.removeClass("collapse"):n.addClass("collapse")})),e.on("submit",(function(n){n.preventDefault();var e=t(this).attr("id"),i={},o="",s="",d="",r=/\[([^\]]+)\]/;"jkit-user-data-form"===e?o="save_user_data":"jkit-settings-form"===e?o="save_settings":"jkit-notfound-form"===e?o="save_notfound":"undefined"!=typeof jkit_custom_dashboard_form_id&&jkit_custom_dashboard_form_id.name===e&&(o="save_"+jkit_custom_dashboard_form_id.name),t(this).find("input, select").each((function(a){s=r.exec(t(this).attr("name")),d=t(this).val(),i[s[1]]=d})),a.button_save.addClass("saving"),a.button_save.find("i").removeClass("fa-save").addClass("fa-spinner fa-spin"),t.ajax({type:"POST",url:"undefined"!=typeof jkit_custom_ajax_url?jkit_custom_ajax_url:jkit_ajax_url,data:{form_data:i,action:o,nonce:jkit_nonce},dataType:"json",encode:!0}).done((function(t){Notiflix.Notify.success(t.message),a.button_save.removeClass("saving"),a.button_save.find("i").removeClass("fa-spinner fa-spin").addClass("fa-save")})).fail((function(){Notiflix.Notify.failure(jkit_dashboard_localize.save_failed),a.button_save.removeClass("saving")}))}))},elements:function(){var a=this,n=a.container.find(".element-checkbox-option .switch"),e=a.container.find(".jkit-button.enable-all"),i=a.container.find(".jkit-button.disable-all"),o=a.container.find("#jkit-elements-enable-form");n.on("click",(function(a){a.preventDefault();var n=t(this).prev("input");n.is(":checked")?n.prop("checked",!1):n.prop("checked",!0)})),e.on("click",(function(t){t.preventDefault(),n.prev("input").prop("checked",!0)})),i.on("click",(function(t){t.preventDefault(),n.prev("input").prop("checked",!1)})),o.on("submit",(function(e){e.preventDefault();var i={};a.button_save.addClass("saving"),a.button_save.find("i").removeClass("fa-save").addClass("fa-spinner fa-spin"),n.each((function(a,n){var e=t(n).prev("input"),o=e.data("element-key");i[o]=e.is(":checked")})),t.ajax({type:"POST",url:jkit_ajax_url,data:{form_data:i,action:"save_elements_enable",nonce:jkit_nonce},dataType:"json",encode:!0}).done((function(t){Notiflix.Notify.success(t.message),a.button_save.removeClass("saving"),a.button_save.find("i").removeClass("fa-spinner fa-spin").addClass("fa-save")})).fail((function(){Notiflix.Notify.failure(jkit_dashboard_localize.save_failed),a.button_save.removeClass("saving")}))}))}},t(document).on("ready",(function(){window.jkitdashboard.init()}))}(jQuery);
|
assets/js/elements/elements.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function n(s){if(t[s])return t[s].exports;var o=t[s]={i:s,l:!1,exports:{}};return e[s].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,s){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(s,o,function(t){return e[t]}.bind(null,o));return s},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){n(1),n(2),n(3),n(4),n(5),n(6),n(7),n(8),n(9),n(10),n(11),n(12),n(13),n(14),n(15),n(16),n(17),n(18),n(19),e.exports=n(20)},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-accordion",cards:".card-wrapper"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$cards:this.$element.find(e.cards)}}bindEvents(){this.onClick()}onClick(){this.elements.$cards.each((function(){jQuery(this).on("click",(function(e){("A"!==e.target.nodeName||jQuery(e.target).hasClass("card-header-button"))&&(e.preventDefault(),jQuery(this).hasClass("expand")?(jQuery(this).find(".card-expand").slideUp(),jQuery(this).removeClass("expand")):(jQuery(this).parent().find(".card-expand").slideUp(),jQuery(this).parent().find(".card-wrapper").removeClass("expand"),jQuery(this).addClass("expand"),jQuery(this).find(".card-expand").slideDown()))}))}))}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_accordion.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-animated-text",dynamic:".dynamic-wrapper"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$dynamic:this.$element.find(e.dynamic)}}bindEvents(){this.onRenderElement()}onRenderElement(){if("rotating"==this.elements.$wrapper.data("style")){const e=this.elements.$wrapper.data("rotate"),t=this.elements.$dynamic.find(".dynamic-text");if(t.length>0){const n=t.first();["typing","swirl","blinds","wave"].includes(e)?this.animateText(n,this.getNextText(n)):this.showText(n,this.getNextText(n))}}}animateText(e,t){this.elements.$dynamic.removeClass("typing-delete"),e.addClass("show-text"),this.elements.$dynamic.removeClass("cursor-blink"),this.animateLetter(e.find(".dynamic-text-letter").first(),e,t)}animateLetter(e,t,n){const s=this,o=this.elements.$wrapper.data("letter-speed");e.addClass("show-letter"),setTimeout((function(){e.is(":last-child")?s.hideText(t,n):s.animateLetter(e.next(),t,n)}),o)}getNextText(e){return e.is(":last-child")?this.elements.$dynamic.find(".dynamic-text").first():e.next()}hideText(e,t){const n=this,s=n.elements.$wrapper.data("rotate"),o=n.elements.$wrapper.data("delay");this.elements.$dynamic.addClass("cursor-blink"),setTimeout((function(){if("typing"==s){const s=n.elements.$wrapper.data("delay-delete");n.elements.$dynamic.addClass("typing-delete"),setTimeout((function(){e.removeClass("show-text"),e.find(".dynamic-text-letter").removeClass("show-letter"),n.animateText(t,n.getNextText(t))}),s)}else e.removeClass("show-text"),e.find(".dynamic-text-letter").removeClass("show-letter"),n.animateText(t,n.getNextText(t))}),o)}showText(e,t){const n=this,s=n.elements.$wrapper.data("delay"),o=n.elements.$wrapper.data("rotate");if(e.addClass("show-text"),"clip"==o){const o=n.elements.$wrapper.data("clip-duration");n.elements.$dynamic.width(e.width()+10),n.elements.$dynamic.animate({width:0},o/2,(function(){e.removeClass("show-text"),t.addClass("show-text"),n.elements.$dynamic.animate({width:t.width()+10},o/2,(function(){setTimeout((function(){e.removeClass("show-text"),n.showText(t,n.getNextText(t))}),s)}))}))}else n.elements.$dynamic.width(e.width()),setTimeout((function(){e.removeClass("show-text"),n.showText(t,n.getNextText(t))}),s)}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_animated_text.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-client-logo",items:".client-track"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$items:this.$element.find(e.items)}}bindEvents(){this.onLoadElement()}onLoadElement(){this.loadCarousel()}loadCarousel(){const e=this.elements.$wrapper.data("id"),t=this.elements.$wrapper.data("settings"),n=this.getSettings("selectors"),s=t.responsive,o={};let a;Object.entries(s).forEach((([e,t])=>{""===t.items&&""===t.margin||(o[t.breakpoint]={},a=t.breakpoint,""!==t.items&&(o[t.breakpoint].items=t.items),""!==t.margin&&(o[t.breakpoint].gutter=t.margin))})),void 0!==a&&0!==a&&(o[0]=o[a],delete o[a]);const i={container:n.wrapper+'[data-id="'+e+'"] '+n.items,loop:!0,mouseDrag:!0,autoplay:t.autoplay,autoplayTimeout:t.autoplay_speed,autoplayHoverPause:t.autoplay_hover_pause,navPosition:"bottom",controlsPosition:t.arrow_position,controlsText:[t.navigation_left,t.navigation_right],responsiveClass:!0,responsive:o};tns(i),this.elements.$wrapper.find("button[data-action]").remove(),t.show_navigation||this.elements.$wrapper.find(".tns-controls").remove(),t.show_dots||this.elements.$wrapper.find(".tns-nav").remove()}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_client_logo.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-countdown",days:".timer-container.timer-days",hours:".timer-container.timer-hours",minutes:".timer-container.timer-minutes",seconds:".timer-container.timer-seconds",counts:".timer-container .timer-count"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$days:this.$element.find(e.days),$hours:this.$element.find(e.hours),$minutes:this.$element.find(e.minutes),$seconds:this.$element.find(e.seconds),$counts:this.$element.find(e.counts)}}bindEvents(){this.onRender()}onRender(){const e=this,t=new Date(e.elements.$wrapper.data("due-date")).getTime(),n=setInterval((function(){const s=new Date,o=t-s,a=Math.floor(o/864e5),i=Math.floor(o%864e5/36e5),r=Math.floor(o%36e5/6e4),l=Math.floor(o%6e4/1e3);e.elements.$counts.removeClass("timer-loading"),o>=0?(e.elements.$days&&e.elements.$days.find(".timer-count").text(a),e.elements.$hours&&e.elements.$hours.find(".timer-count").text(i),e.elements.$minutes&&e.elements.$minutes.find(".timer-count").text(r),e.elements.$seconds&&e.elements.$seconds.find(".timer-count").text(l)):(clearInterval(n),e.elements.$wrapper.addClass("countdown-expired"),e.onExpired())}),1e3)}onExpired(){const e=this.elements.$wrapper,t=e.data("expired-type");if("message"==t){const t=e.data("expired-title"),n=e.data("expired-content");e.html(`\n <div class="expire-message">\n <span class="expire-title">${t}</span>\n <span class="expire-content">${n}</span>\n </div>\n `)}else if("redirect"==t){const t=e.data("redirect-link");window.self!==window.top?e.html(`<div class="expire-message">\n <span class="expire-content">${iframe_content}</span>\n </div>\n `):location.href=t}else if("template"==t){const t=e.data("template");e.html(t)}}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_countdown.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-fun-fact",number:".number"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$number:this.$element.find(e.number)}}bindEvents(){this.onLoadElement()}onLoadElement(){this.countNumber(),jQuery(window).on("scroll",this.countNumber.bind(this))}countNumber(){const e=this.elements.$number;this.onScreen()&&!e.hasClass("loaded")&&(e.prop("Counter",0).animate({Counter:e.data("value")},{duration:e.data("animation-duration"),easing:"swing",step:function(t){e.text(Math.ceil(t).toLocaleString())},complete:function(){e.text(e.data("value").toLocaleString())}}),e.addClass("loaded"))}onScreen(){const e=jQuery(window).scrollTop()+jQuery(window).height();return this.elements.$wrapper.offset().top<=e}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_fun_fact.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-gallery",grid:".gallery-items",active_label:".jkit-gallery-control.active",filter:".jkit-gallery-control",filter_button:"#search-filter-trigger",filter_label:"#search-filter-trigger span",filter_list:".search-filter-controls",filter_form:"#jkit-gallery-search-box-input",load_more:".jkit-gallery-load-more"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$grid:this.$element.find(e.grid),$active_label:this.$element.find(e.active_label),$filter:this.$element.find(e.filter),$filter_button:this.$element.find(e.filter_button),$filter_label:this.$element.find(e.filter_label),$filter_list:this.$element.find(e.filter_list),$filter_form:this.$element.find(e.filter_form),$load_more:this.$element.find(e.load_more)}}bindEvents(){const e=this,t="masonry"==e.elements.$wrapper.data("grid")?"masonry":"fitRows",n=parseFloat((e.elements.$wrapper.data("animation-duration")/1e3).toFixed(2)).toString()+"s";e.grid=e.elements.$grid.isotope({itemSelector:".gallery-item-wrap",layoutMode:t,transitionDuration:n}),e.grid.imagesLoaded().progress((function(){e.grid.isotope("layout")})),e.onInitGallery(),e.onClickFilterButton(),e.onClickLoadMoreButton(),e.onFormChange()}onInitGallery(){const e=this;e.elements.$filter.each((function(){jQuery(this).on("click",(function(t){t.preventDefault();const n=e.getSettings("selectors"),s=jQuery(this).data("filter"),o=e.elements.$filter_label,a=e.elements.$filter_list,i=e.elements.$filter_button,r=e.elements.$filter_form;e.elements.$filter.removeClass("active"),jQuery(this).addClass("active"),e.elements.$active_label=e.$element.find(n.active_label),e.grid.isotope({filter:function(){const e="*"!==s?s.substring(1):"*",t=jQuery(this).attr("class").split(/\s+/);let n=!1;if(i.length>0){const s=r.val(),o=jQuery(this).find(".item-title").text(),a=jQuery(this).find(".item-content").text();n="*"!=e?(o.toLowerCase().includes(s.toLowerCase())||a.toLowerCase().includes(s.toLowerCase()))&&t.includes(e):o.toLowerCase().includes(s.toLowerCase())||a.toLowerCase().includes(s.toLowerCase())}else n="*"==e||t.includes(e);return n}}),i.length>0&&(o.text(jQuery(this).text()),a.removeClass("open-controls"))}))}))}onClickFilterButton(){const e=this;e.elements.$filter_button.on("click",(function(t){t.preventDefault();const n=e.elements.$filter_list;n.hasClass("open-controls")?n.removeClass("open-controls"):n.addClass("open-controls")}))}onFormChange(){const e=this,t=e.elements.$filter_form;void 0!==t&&t.on("change paste keyup",(function(){const t=jQuery(this).val();e.grid.isotope({filter:function(){const n=jQuery(this).find(".item-title").text(),s=jQuery(this).find(".item-content").text(),o=jQuery(this).attr("class").split(/\s+/),a="*"!==e.elements.$active_label.data("filter")?e.elements.$active_label.data("filter").substring(1):"*";let i=!1;return i="*"==a?n.toLowerCase().includes(t.toLowerCase())||s.toLowerCase().includes(t.toLowerCase()):(n.toLowerCase().includes(t.toLowerCase())||s.toLowerCase().includes(t.toLowerCase()))&&o.includes(a),i}})}))}onClickLoadMoreButton(){const e=this,t=e.elements.$wrapper.data("items");e.elements.$load_more.on("click",(function(n){n.preventDefault();const s=parseInt(e.elements.$wrapper.attr("data-current-loaded")),o=parseInt(e.elements.$wrapper.attr("data-count-items")),a=parseInt(e.elements.$wrapper.attr("data-load-more")),i=e.elements.$wrapper.attr("data-no-more");if(o>s)if(o-a-s>0){const n=[...t].splice(s,a);e.grid.append(n).isotope("reloadItems").isotope(),e.grid.imagesLoaded().progress((function(){e.grid.isotope("layout")})),e.elements.$wrapper.attr("data-current-loaded",s+a)}else{const n=[...t].splice(s,o-s);e.grid.append(n).isotope("reloadItems").isotope(),e.grid.imagesLoaded().progress((function(){e.grid.isotope("layout")})),e.elements.$wrapper.attr("data-current-loaded",o),e.elements.$load_more.find(".load-more-text").text(i),setTimeout((function(){e.elements.$load_more.fadeOut("slow")}),600)}}))}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_gallery.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-mailchimp",form:".jkit-mailchimp-form"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$form:this.$element.find(e.form)}}bindEvents(){this.onSubmit()}onSubmit(){this.elements.$form.on("submit",(function(e){e.preventDefault();const t=jQuery(this).find(".jkit-mailchimp-message"),n=jQuery(this).data("error-message"),s=jQuery(this).data("success-message"),o={first_name:jQuery(this).find('input[name="first-name"]').val(),last_name:jQuery(this).find('input[name="last-name"]').val(),phone:jQuery(this).find('input[name="phone"]').val(),email:jQuery(this).find('input[name="email"]').val(),list:jQuery(this).data("listed")};t.removeClass("error success"),jQuery.ajax({type:"POST",url:jkit_ajax_url,data:{data:o,action:"jkit_element_ajax_jkit_mailchimp"},dataType:"json",encode:!0}).done((function(e){e.status_code>=400?(t.addClass("error"),t.text(e.message)):(t.addClass("success"),t.text(s))})).fail((function(){t.addClass("error"),t.text(n)}))}))}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_mailchimp.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-nav-menu",container:".jkit-menu-wrapper",open_toggle:".jkit-hamburger-menu",close_toggle:'.jkit-close-menu, .menu-item:not(.menu-item-has-children) a[href^="#"]',dropdown_toggle:"li.menu-item-has-children > a i",menu_dropdown:"li.menu-item-has-children > a"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$container:this.$element.find(e.container),$open_toggle:this.$element.find(e.open_toggle),$close_toggle:this.$element.find(e.close_toggle),$dropdown_toggle:this.$element.find(e.dropdown_toggle),$menu_dropdown:this.$element.find(e.menu_dropdown)}}bindEvents(){this.onLoadElement()}onLoadElement(){this.addBodyClass(),this.addDropdownIcon(),this.onToogleClick()}addBodyClass(){this.elements.$wrapper.length>0&&jQuery("body").addClass("jkit-nav-menu-loaded")}addDropdownIcon(){const e=this.elements.$wrapper.data("item-indicator"),t=this.elements.$menu_dropdown,n=this.getSettings("selectors");t.each((function(){0==jQuery(this).find("i").length&&jQuery(this).append(e)})),this.elements.$dropdown_toggle=this.$element.find(n.dropdown_toggle)}onToogleClick(){const e=this,t=e.elements.$wrapper,n=e.elements.$menu_dropdown,s=e.elements.$open_toggle,o=e.elements.$close_toggle,a=e.elements.$dropdown_toggle;s.on("click",(function(t){t.preventDefault(),e.elements.$container.hasClass("active")?e.elements.$container.removeClass("active"):e.elements.$container.addClass("active")})),o.on("click",(function(t){t.preventDefault(),e.elements.$container.removeClass("active")})),t.hasClass("submenu-click-title")?n.each((function(){jQuery(this).on("click",(function(e){e.preventDefault();const t=jQuery(this).next();t.hasClass("dropdown-open")?t.removeClass("dropdown-open"):t.addClass("dropdown-open")}))})):a.each((function(){jQuery(this).on("click",(function(e){e.preventDefault();const t=jQuery(this).parents("a").next();t.hasClass("dropdown-open")?t.removeClass("dropdown-open"):t.addClass("dropdown-open")}))}))}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_nav_menu.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-off-canvas",sidebar:".offcanvas-sidebar",hamburger:".offcanvas-sidebar-button",close:".offcanvas-close-button",overlay:".bg-overlay"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$sidebar:this.$element.find(e.sidebar),$hamburger:this.$element.find(e.hamburger),$close:this.$element.find(e.close),$overlay:this.$element.find(e.overlay)}}bindEvents(){const e=this;e.elements.$hamburger.on("click",(function(t){t.preventDefault(),e.elements.$sidebar.hasClass("active")?e.elements.$sidebar.removeClass("active"):e.elements.$sidebar.addClass("active")})),e.elements.$close.on("click",(function(t){t.preventDefault(),e.elements.$sidebar.removeClass("active")})),e.elements.$overlay.on("click",(function(t){t.preventDefault(),e.elements.$sidebar.removeClass("active")}))}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_off_canvas.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-pie-chart",canvas_main:"canvas.main-canvas",canvas_bg:"canvas.background-canvas",number:".pie-chart-content"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$canvas_main:this.$element.find(e.canvas_main),$canvas_bg:this.$element.find(e.canvas_bg),$number:this.$element.find(e.number)}}bindEvents(){this.animateChart(),jQuery(window).on("scroll",this.animateChart.bind(this)),"percentage"==this.elements.$wrapper.data("content-type")&&(this.countNumber(),jQuery(window).on("scroll",this.countNumber.bind(this)))}animateChart(){const e=this,t=e.elements.$canvas_main,n=e.elements.$canvas_bg;if(this.onScreen()&&!t.hasClass("loaded")){const s=e.elements.$wrapper,o=t.get(0).getContext("2d"),a=n.get(0).getContext("2d"),i=s.data("percent"),r=s.data("cutout")+"%",l=s.data("color-type"),d=s.data("color"),m=s.data("bg-color"),c=s.data("gradient1"),u=s.data("gradient2"),p={datasets:[{data:[i,100-i],backgroundColor:["#80b1ff","transparent"],hoverBackgroundColor:["#80b1ff","transparent"],borderWidth:0}]},f={datasets:[{data:[100],backgroundColor:["#d1d1d1"],hoverBackgroundColor:["#d1d1d1"],borderWidth:0}]},h={animation:{duration:s.data("animation-duration")},responsive:!0,cutout:r,plugins:{title:{display:!1},legend:{display:!1},tooltip:{enabled:!1}}},g={animation:!1,responsive:!0,cutout:r,plugins:{title:{display:!1},legend:{display:!1},tooltip:{enabled:!1}}};if("normal"==l)""!==d&&(p.datasets[0].backgroundColor[0]=d,p.datasets[0].hoverBackgroundColor[0]=d);else if("gradient"==l&&(""!==c||""!==u)){const e=o.createLinearGradient(0,0,0,170);""!==c&&e.addColorStop(0,c),""!==u&&e.addColorStop(1,u),p.datasets[0].backgroundColor[0]=e,p.datasets[0].hoverBackgroundColor[0]=e}""!==m&&(f.datasets[0].backgroundColor[0]=m,f.datasets[0].hoverBackgroundColor[0]=m),new Chart(o,{type:"doughnut",data:p,options:h}),new Chart(a,{type:"doughnut",data:f,options:g}),t.addClass("loaded"),t.css("display",""),n.css("display","")}}countNumber(){const e=this.elements.$number,t=this.elements.$wrapper;this.onScreen()&&!e.hasClass("loaded")&&(e.prop("Counter",0).animate({Counter:t.data("percent")},{duration:t.data("animation-duration"),easing:"swing",step:function(t){e.text(Math.ceil(t).toString()+"%")}}),e.addClass("loaded"))}onScreen(){const e=jQuery(window).scrollTop()+jQuery(window).height();return this.elements.$wrapper.offset().top<=e}}jQuery(window).on("elementor/frontend/init",(()=>{console.log("find.this"),elementorFrontend.hooks.addAction("frontend/element_ready/jkit_pie_chart.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-portfolio-gallery",row_items:".row-item",gallery_items:".gallery-items",image_items:".image-item"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$row_items:this.$element.find(e.row_items),$gallery_items:this.$element.find(e.gallery_items),$image_items:this.$element.find(e.image_items)}}bindEvents(){this.onRenderInit(),this.onClickHover()}onRenderInit(){const e=this.elements.$row_items,t=this.elements.$image_items;jQuery(e.get().reverse()).each((function(){jQuery(this).hasClass("current-item")&&(e.removeClass("current-item"),jQuery(this).addClass("current-item"))})),jQuery(t.get().reverse()).each((function(){jQuery(this).hasClass("current-item")&&(t.removeClass("current-item"),jQuery(this).addClass("current-item"))}))}onClickHover(){const e=this,t=e.elements.$wrapper,n=e.elements.$row_items;t.hasClass("on-click")&&n.each((function(){jQuery(this).on({click:function(){n.removeClass("current-item"),jQuery(this).addClass("current-item"),e.onShowImage(jQuery(this).data("tab"))}})})),t.hasClass("on-hover")&&n.each((function(){jQuery(this).on({mouseenter:function(){n.removeClass("current-item"),jQuery(this).addClass("current-item"),e.onShowImage(jQuery(this).data("tab"))}})}))}onShowImage(e){this.elements.$image_items.removeClass("current-item"),this.elements.$gallery_items.find("#"+e).addClass("current-item")}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_portfolio_gallery.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.post-element",pagination:".jkit-block-pagination"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$pagination:this.$element.find(e.pagination)}}bindEvents(){this.onInitPagination()}onInitPagination(){const e=this.elements.$wrapper,t=this.elements.$pagination,n=e.data("settings"),s=n.pagination_scroll_limit,o=n.pagination_mode,a=n.sg_content_sorting,i=e.find(".product-order select"),r={action:jkit_element_pagination_option.element_prefix+n.class,data:{current_page:1,attr:n,default_sortby:n.sort_by}},l={parameter:{number_post:r.data.attr.number_post.size,current_page:r.data.current_page}};let d=!1,m=[],c=0;const u=function(){d||t.hasClass("disabled")||window.self!=window.top||(s>=r.data.current_page||"0"==s)&&t.find(".jkit-block-scrollload").elementorWaypoint((function(){r.data.current_page=r.data.current_page+1,c++,g(),this.destroy()}),{offset:"100%",context:window}),Waypoint.refreshAll()},p=function(e){e.preventDefault(),d||t.find(this).hasClass("disabled")||("prev"===e.data?r.data.current_page=r.data.current_page-1:r.data.current_page=r.data.current_page+1,g())},f=function(e){e.content="<div>"+e.content+"</div>";const t=jQuery(e.content);return e.content=t.html(),e},h=function(n){["loadmore","scrollload"].includes(o)?function(n){const s=jQuery(n.content);let a=0;s.each((function(){(jQuery(this).hasClass("jkit-post")||jQuery(this).hasClass("jkit-product-block"))&&jQuery(this).addClass("jkit-ajax-loaded anim-"+a),a++})),e.removeClass("loading"),e.addClass("loaded"),1===r.data.current_page?(e.find(".jkit-ajax-flag").html(s),t.removeClass("disabled"),t.show()):e.find(".jkit-ajax-flag").append(s),n.next||(t.addClass("disabled"),t.hide()),y(),jQuery(window).trigger("resize"),"scrollload"===o&&setTimeout((function(){u()}),500)}(n):"nextprev"===o?function(n){const s=jQuery(n.content);let o=0;s.each((function(){(jQuery(this).hasClass("jkit-post")||jQuery(this).hasClass("jkit-product-block"))&&jQuery(this).addClass("jkit-ajax-loaded anim-"+o),o++})),e.removeClass("loading"),e.addClass("loaded"),e.find(".jkit-ajax-flag").html(s),n.next?t.find(".jkit-pagination-button.jkit-block-nextprev .next").removeClass("disabled"):t.find(".jkit-pagination-button.jkit-block-nextprev .next").addClass("disabled"),n.prev?t.find(".jkit-pagination-button.jkit-block-nextprev .prev").removeClass("disabled"):t.find(".jkit-pagination-button.jkit-block-nextprev .prev").addClass("disabled"),y(),jQuery(window).trigger("resize"),jQuery("html, body").animate({scrollTop:e.offset().top-100},1e3)}(n):function(t){const n=jQuery(t.content);let s=0;n.each((function(){(jQuery(this).hasClass("jkit-post")||jQuery(this).hasClass("jkit-product-block"))&&jQuery(this).addClass("jkit-ajax-loaded anim-"+s),s++})),e.removeClass("loading"),e.addClass("loaded"),e.find(".jkit-ajax-flag").html(n),y(),jQuery(window).trigger("resize")}(n)},g=function(){return new Promise((function(e,t){w();const n=function(e){const t=JSON.stringify(e);for(let e=0;e<m.length;e++)if(t===m[e].param)return f(m[e].result)}(r);n?(h(n),e()):jQuery.ajax({url:jkit_ajax_url,type:"post",dataType:"json",data:r,success:function(t){h(t),function(e,t){m.push({param:JSON.stringify(e),result:t})}(r,t),e()}})}))},w=function(){d=!0,t.addClass("loading"),e.addClass("loading"),"nextprev"===o?e.find(".jkit-preloader-overlay").show():["loadmore","scrollload"].includes(o)?t.find("a").text(t.find("a").data("loading")):e.find(".jkit-preloader-overlay").show()},y=function(){d=!1,t.removeClass("loading"),"nextprev"===o?e.find(".jkit-preloader-overlay").hide():["loadmore","scrollload"].includes(o)?t.find("a").text(t.find("a").data("load")):e.find(".jkit-preloader-overlay").hide()};["loadmore","scrollload"].includes(o)&&("scrollload"===o&&u(),t.find(".jkit-pagination-button.jkit-block-loadmore, .jkit-pagination-button.jkit-block-scrollload").on("click",(function(e){e.preventDefault(),r.data.current_page=r.data.current_page+1,c++,d||t.hasClass("disabled")||g()}))),"nextprev"===o&&(t.find(".jkit-pagination-button.jkit-block-nextprev .next").on("click",null,"next",p),t.find(".jkit-pagination-button.jkit-block-nextprev .prev").on("click",null,"prev",p)),"yes"===a&&i.length&&i.on("change",(function(){const t="default"!==this.value?this.value:r.data.default_sortby;if(r.data.attr.sort_by=t,["loadmore","scrollload"].includes(o))l.parameter.current_page=r.data.current_page,r.data.current_page=1,r.data.attr.number_post.size+=r.data.attr.pagination_number_post.size*c,g().then((function(){r.data.attr.number_post.size=l.parameter.number_post,r.data.current_page=l.parameter.current_page}));else if("disable"===o){const t=e.find(".jkit-products > .jkit-product-block > .button").map((function(e){return jQuery(this).data("product_id")})).get().join();r.data.attr.wc_include_post=t,g()}else g()}))}}jQuery(window).on("elementor/frontend/init",(()=>{const e=e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})};elementorFrontend.hooks.addAction("frontend/element_ready/jkit_post_block.default",e),elementorFrontend.hooks.addAction("frontend/element_ready/jkit_post_list.default",e),elementorFrontend.hooks.addAction("frontend/element_ready/jkit_product_grid.default",e)}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-product-carousel",items:".jkit-products"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$items:this.$element.find(e.items)}}bindEvents(){this.onLoadElement()}onLoadElement(){this.elements.$wrapper.find(".jeg_empty_module").length||this.loadCarousel()}loadCarousel(){const e=this.elements.$wrapper.data("id"),t=this.getSettings("selectors"),n=this.elements.$wrapper.data("settings"),s=n.responsive,o={};let a;Object.entries(s).forEach((([e,t])=>{""===t.items&&""===t.margin||(o[t.breakpoint]={},a=t.breakpoint,""!==t.items&&(o[t.breakpoint].items=t.items),""!==t.margin&&(o[t.breakpoint].gutter=t.margin))})),void 0!==a&&0!==a&&(o[0]=o[a],delete o[a]);const i={container:t.wrapper+'[data-id="'+e+'"] '+t.items,loop:!0,mouseDrag:!0,autoplay:n.autoplay,autoplayTimeout:n.autoplay_speed,autoplayHoverPause:n.autoplay_hover_pause,navPosition:"bottom",controlsPosition:n.arrow_position,controlsText:[n.navigation_left,n.navigation_right],responsiveClass:!0,responsive:o};tns(i),this.elements.$wrapper.find("button[data-action]").remove(),n.show_navigation||this.elements.$wrapper.find(".tns-controls").remove(),n.show_dots||this.elements.$wrapper.find(".tns-nav").remove(),n.show_navigation&&(i.nav=!0,i.navText=['<i class="'+n.navigation_left+'" aria-hidden="true"></i>','<i class="'+n.navigation_right+'" aria-hidden="true"></i>'])}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_product_carousel.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-progress-bar",skill:".skill-track",number:".number-percentage"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$skill:this.$element.find(e.skill),$number:this.$element.find(e.number)}}bindEvents(){this.onLoadElement()}onLoadElement(){this.countNumber(),jQuery(window).on("scroll",this.countNumber.bind(this))}countNumber(){const e=this.elements.$number,t=this.elements.$skill;this.onScreen()&&!e.hasClass("loaded")&&(e.prop("Counter",0).animate({Counter:e.data("value")},{duration:e.data("animation-duration"),easing:"swing",step:function(n){e.text(Math.ceil(n).toString()+"%"),t.css("width",n.toString()+"%")}}),e.addClass("loaded"))}onScreen(){const e=jQuery(window).scrollTop()+jQuery(window).height();return this.elements.$wrapper.offset().top<=e}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_progress_bar.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-search"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper)}}bindEvents(){const e=this.elements.$wrapper;e.magnificPopup({mainClass:"mfp-fade jkit-magnific-popup",delegate:"a.jkit-search-modal",removalDelay:500,midClick:!0,showCloseBtn:!0,closeBtnInside:!1,prependTo:e,type:"inline",fixedContentPos:!0,fixedBgPos:!0,overflowY:"auto"})}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_search.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{bindEvents(){this.$element.data("stickyTop",this.$element.offset().top),this.runSticky()}runSticky(){if(!this.$element.hasClass("jkit-sticky-element--enabled"))return;const e=jQuery,t=this.$element,n=this.getElementSettings(),s=t.hasClass("jkit-sticky-element-on--down")?"down":t.hasClass("jkit-sticky-element-on--up")?"up":"both",o=t.hasClass("jkit-sticky-position--fixed")?"fixed":"sticky";let a=t.data("stickyTop");"fixed"===o?t.wrap('<div class="wrapper-sticky-fixed" style="height: '+t.height()+'px"></div>'):t.parent().hasClass("wrapper-sticky-fixed")&&t.unwrap(),e(window).on("load resize scroll",t,(function(){const i=e("body").attr("data-elementor-device-mode");let r=!0;if(Object.values(n.jkit_sticky_device).forEach((function(e){i!==e||(r=!1)})),r)return t.css("position","relative"),t.removeClass("sticky-pinned"),void(t.hasClass("elementor-column")||t.css("width","unset"));const l="down"===s?e(this).scrollTop():e(this).scrollTop()+e(this).height(),d="down"===s?a:a+t.outerHeight(!0),m="fixed"===o?t.parent().width()+"px":"unset";t.hasClass("sticky-pinned")||(a=t.offset().top,void 0!==n&&(void 0!==n.jkit_sticky_top_position&&(a-=n.jkit_sticky_top_position.size),void 0!==n.jkit_sticky_bottom_position&&(a+=n.jkit_sticky_bottom_position.size))),t.hasClass("elementor-column")||t.css("width",m),"down"===s&&d<l||"up"===s&&d>l||"both"===s&&"sticky"===o?(t.css("position",o),t.addClass("sticky-pinned")):(t.css("position","relative"),t.removeClass("sticky-pinned"))}))}onElementChange(e){-1!==["jkit_sticky_section","jkit_sticky_device","jkit_sticky_trigger","jkit_sticky_position"].indexOf(e)&&(jQuery(window).off("load resize scroll",this.$element),this.runSticky())}}jQuery(window).on("elementor/frontend/init",(()=>{const e=e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})};elementorFrontend.hooks.addAction("frontend/element_ready/section",e),elementorFrontend.hooks.addAction("frontend/element_ready/column",e)}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-tabs",tab:"li.tab-nav",content:".tab-content-list"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$tab:this.$element.find(e.tab),$content:this.$element.find(e.content)}}bindEvents(){const e=this,t="yes"===e.$element.find(".tab-nav-list").data("toggle");t&&e.$element.find("li.tab-nav.active").find(".tab-content").slideDown(),e.elements.$tab.on("click",(function(){if(jQuery(this).hasClass("active"))return;const n=jQuery(this).data("tab");e.elements.$tab.removeClass("active"),t&&(e.elements.$tab.find(".tab-content").slideUp(),jQuery(this).find(".tab-content").slideDown()),jQuery(this).addClass("active"),e.elements.$content.find(".tab-content").removeClass("active"),e.elements.$content.find("."+n).addClass("active")}))}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_tabs.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-team",close_modal:".team-modal-close"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$close_modal:this.$element.find(e.close_modal)}}bindEvents(){this.onClick()}onClick(){const e=this.elements.$wrapper,t=this.elements.$close_modal;e.magnificPopup({delegate:"a.jkit-team-modal",removalDelay:500,callbacks:{beforeOpen:function(){this.st.mainClass=this.st.el.attr("data-effect")}},midClick:!0,showCloseBtn:!1,prependTo:e,type:"inline",fixedContentPos:!0,fixedBgPos:!0,overflowY:"auto"}),t.on("click",(function(e){e.preventDefault(),jQuery.magnificPopup.close()}))}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_team.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-testimonials",items:".testimonials-track"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$items:this.$element.find(e.items)}}bindEvents(){this.onLoadElement()}onLoadElement(){this.loadCarousel()}loadCarousel(){const e=this.elements.$wrapper.data("id"),t=this.getSettings("selectors"),n=this.elements.$wrapper.data("settings"),s=n.responsive,o={0:{items:1,gutter:0},768:{items:2,gutter:0},1025:{items:3,gutter:10}},a={};Object.entries(s).forEach((([e,t])=>{a[t.breakpoint]={},""!==t.items?a[t.breakpoint].items=t.items:o[t.breakpoint]&&(a[t.breakpoint].items=o[t.breakpoint].items),""!==t.margin?a[t.breakpoint].gutter=t.margin:o[t.breakpoint]&&(a[t.breakpoint].gutter=o[t.breakpoint].gutter)}));const i={container:t.wrapper+'[data-id="'+e+'"] '+t.items,loop:!0,mouseDrag:!0,autoplay:n.autoplay,autoplayTimeout:n.autoplay_speed,autoplayHoverPause:n.autoplay_hover_pause,navPosition:"bottom",controlsPosition:n.arrow_position,controlsText:[n.navigation_left,n.navigation_right],responsiveClass:!0,responsive:a};tns(i),this.elements.$wrapper.find("button[data-action]").remove(),n.show_navigation||this.elements.$wrapper.find(".tns-controls").remove(),n.show_dots||this.elements.$wrapper.find(".tns-nav").remove(),n.show_navigation&&(i.nav=!0,i.navText=['<i class="'+n.navigation_left+'" aria-hidden="true"></i>','<i class="'+n.navigation_right+'" aria-hidden="true"></i>'])}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_testimonials.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-video-button",link:".jeg-elementor-kit.jkit-video-button .jkit-video-popup-btn"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$link:this.$element.find(e.link)}}bindEvents(){this.onClick()}onClick(){const e=this.elements.$wrapper,t=e.data("type"),n=e.data("autoplay"),s=e.data("mute"),o=e.data("loop"),a=e.data("controls"),i=e.data("unique-id");let r="//www.youtube.com/embed/";"self_hosted"===t?this.elements.$link.magnificPopup({type:"inline",src:"#jkit_video_button_"+i}):(r="youtube"==t?r+"?playlist=%id%&autoplay="+n+"&mute="+s+"&loop="+o+"&controls="+a+"&start="+e.data("start")+"&end="+e.data("end")+"&version=3":"//player.vimeo.com/video/%id%?autoplay="+n+"&muted="+s+"&loop="+o+"&controls="+a+"&title="+e.data("title")+"&portrait="+e.data("portrait")+"&byline="+e.data("byline"),this.elements.$link.magnificPopup({type:"iframe",iframe:{patterns:{youtube:{index:"youtube.com/",id:function(e){var t=e.match(/[\\?\\&]v=([^\\?\\&]+)/);return t&&t[1]?t[1]:null},src:r},vimeo:{index:"vimeo.com/",id:function(e){var t=e.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/);return t&&t[5]?t[5]:null},src:r}}},mainClass:"mfp-fade jkit-magnific-popup",removalDelay:160,preloader:!0,fixedContentPos:!1,showCloseBtn:!0}))}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_video_button.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))}]);
|
1 |
+
!function(e){var t={};function n(s){if(t[s])return t[s].exports;var o=t[s]={i:s,l:!1,exports:{}};return e[s].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,s){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(s,o,function(t){return e[t]}.bind(null,o));return s},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){n(1),n(2),n(3),n(4),n(5),n(6),n(7),n(8),n(9),n(10),n(11),n(12),n(13),n(14),n(15),n(16),n(17),n(18),n(19),e.exports=n(20)},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-accordion",cards:".card-wrapper"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$cards:this.$element.find(e.cards)}}bindEvents(){this.onClick()}onClick(){this.elements.$cards.each((function(){jQuery(this).on("click",(function(e){("A"!==e.target.nodeName||jQuery(e.target).hasClass("card-header-button"))&&(e.preventDefault(),jQuery(this).hasClass("expand")?(jQuery(this).find(".card-expand").slideUp(),jQuery(this).removeClass("expand")):(jQuery(this).parent().find(".card-expand").slideUp(),jQuery(this).parent().find(".card-wrapper").removeClass("expand"),jQuery(this).addClass("expand"),jQuery(this).find(".card-expand").slideDown()))}))}))}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_accordion.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-animated-text",dynamic:".dynamic-wrapper"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$dynamic:this.$element.find(e.dynamic)}}bindEvents(){this.onRenderElement()}onRenderElement(){if("rotating"==this.elements.$wrapper.data("style")){const e=this.elements.$wrapper.data("rotate"),t=this.elements.$dynamic.find(".dynamic-text");if(t.length>0){const n=t.first();["typing","swirl","blinds","wave"].includes(e)?this.animateText(n,this.getNextText(n)):this.showText(n,this.getNextText(n))}}}animateText(e,t){this.elements.$dynamic.removeClass("typing-delete"),e.addClass("show-text"),this.elements.$dynamic.removeClass("cursor-blink"),this.animateLetter(e.find(".dynamic-text-letter").first(),e,t)}animateLetter(e,t,n){const s=this,o=this.elements.$wrapper.data("letter-speed");e.addClass("show-letter"),setTimeout((function(){e.is(":last-child")?s.hideText(t,n):s.animateLetter(e.next(),t,n)}),o)}getNextText(e){return e.is(":last-child")?this.elements.$dynamic.find(".dynamic-text").first():e.next()}hideText(e,t){const n=this,s=n.elements.$wrapper.data("rotate"),o=n.elements.$wrapper.data("delay");this.elements.$dynamic.addClass("cursor-blink"),setTimeout((function(){if("typing"==s){const s=n.elements.$wrapper.data("delay-delete");n.elements.$dynamic.addClass("typing-delete"),setTimeout((function(){e.removeClass("show-text"),e.find(".dynamic-text-letter").removeClass("show-letter"),n.animateText(t,n.getNextText(t))}),s)}else e.removeClass("show-text"),e.find(".dynamic-text-letter").removeClass("show-letter"),n.animateText(t,n.getNextText(t))}),o)}showText(e,t){const n=this,s=n.elements.$wrapper.data("delay"),o=n.elements.$wrapper.data("rotate");if(e.addClass("show-text"),"clip"==o){const o=n.elements.$wrapper.data("clip-duration");n.elements.$dynamic.width(e.width()+10),n.elements.$dynamic.animate({width:0},o/2,(function(){e.removeClass("show-text"),t.addClass("show-text"),n.elements.$dynamic.animate({width:t.width()+10},o/2,(function(){setTimeout((function(){e.removeClass("show-text"),n.showText(t,n.getNextText(t))}),s)}))}))}else n.elements.$dynamic.width(e.width()),setTimeout((function(){e.removeClass("show-text"),n.showText(t,n.getNextText(t))}),s)}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_animated_text.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-client-logo",items:".client-track"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$items:this.$element.find(e.items)}}bindEvents(){this.onLoadElement()}onLoadElement(){this.loadCarousel()}loadCarousel(){const e=this.elements.$wrapper.data("id"),t=this.elements.$wrapper.data("settings"),n=this.getSettings("selectors"),s=t.responsive,o={};let a;Object.entries(s).forEach((([e,t])=>{""===t.items&&""===t.margin||(o[t.breakpoint]={},a=t.breakpoint,""!==t.items&&(o[t.breakpoint].items=t.items),""!==t.margin&&(o[t.breakpoint].gutter=t.margin))})),void 0!==a&&0!==a&&(o[0]=o[a],delete o[a]);const i={container:n.wrapper+'[data-id="'+e+'"] '+n.items,loop:!0,mouseDrag:!0,autoplay:t.autoplay,autoplayTimeout:t.autoplay_speed,autoplayHoverPause:t.autoplay_hover_pause,navPosition:"bottom",controlsPosition:t.arrow_position,controlsText:[t.navigation_left,t.navigation_right],responsiveClass:!0,responsive:o};tns(i),this.elements.$wrapper.find("button[data-action]").remove(),t.show_navigation||this.elements.$wrapper.find(".tns-controls").remove(),t.show_dots||this.elements.$wrapper.find(".tns-nav").remove()}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_client_logo.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-countdown",days:".timer-container.timer-days",hours:".timer-container.timer-hours",minutes:".timer-container.timer-minutes",seconds:".timer-container.timer-seconds",counts:".timer-container .timer-count"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$days:this.$element.find(e.days),$hours:this.$element.find(e.hours),$minutes:this.$element.find(e.minutes),$seconds:this.$element.find(e.seconds),$counts:this.$element.find(e.counts)}}bindEvents(){this.onRender()}onRender(){const e=this,t=new Date(e.elements.$wrapper.data("due-date")).getTime(),n=setInterval((function(){const s=new Date,o=t-s,a=Math.floor(o/864e5),i=Math.floor(o%864e5/36e5),r=Math.floor(o%36e5/6e4),l=Math.floor(o%6e4/1e3);e.elements.$counts.removeClass("timer-loading"),o>=0?(e.elements.$days&&e.elements.$days.find(".timer-count").text(a),e.elements.$hours&&e.elements.$hours.find(".timer-count").text(i),e.elements.$minutes&&e.elements.$minutes.find(".timer-count").text(r),e.elements.$seconds&&e.elements.$seconds.find(".timer-count").text(l)):(clearInterval(n),e.elements.$wrapper.addClass("countdown-expired"),e.onExpired())}),1e3)}onExpired(){const e=this.elements.$wrapper,t=e.data("expired-type");if("message"==t){const t=e.data("expired-title"),n=e.data("expired-content");e.html(`\n <div class="expire-message">\n <span class="expire-title">${t}</span>\n <span class="expire-content">${n}</span>\n </div>\n `)}else if("redirect"==t){const t=e.data("redirect-link");window.self!==window.top?e.html(`<div class="expire-message">\n <span class="expire-content">${iframe_content}</span>\n </div>\n `):location.href=t}else if("template"==t){const t=e.data("template");e.html(t)}}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_countdown.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-fun-fact",number:".number"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$number:this.$element.find(e.number)}}bindEvents(){this.onLoadElement()}onLoadElement(){this.countNumber(),jQuery(window).on("scroll",this.countNumber.bind(this))}countNumber(){const e=this.elements.$number;this.onScreen()&&!e.hasClass("loaded")&&(e.prop("Counter",0).animate({Counter:e.data("value")},{duration:e.data("animation-duration"),easing:"swing",step:function(t){e.text(Math.ceil(t).toLocaleString())},complete:function(){e.text(e.data("value").toLocaleString())}}),e.addClass("loaded"))}onScreen(){const e=jQuery(window).scrollTop()+jQuery(window).height();return this.elements.$wrapper.offset().top<=e}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_fun_fact.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-gallery",grid:".gallery-items",active_label:".jkit-gallery-control.active",filter:".jkit-gallery-control",filter_button:"#search-filter-trigger",filter_label:"#search-filter-trigger span",filter_list:".search-filter-controls",filter_form:"#jkit-gallery-search-box-input",load_more:".jkit-gallery-load-more"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$grid:this.$element.find(e.grid),$active_label:this.$element.find(e.active_label),$filter:this.$element.find(e.filter),$filter_button:this.$element.find(e.filter_button),$filter_label:this.$element.find(e.filter_label),$filter_list:this.$element.find(e.filter_list),$filter_form:this.$element.find(e.filter_form),$load_more:this.$element.find(e.load_more)}}bindEvents(){const e=this,t="masonry"==e.elements.$wrapper.data("grid")?"masonry":"fitRows",n=parseFloat((e.elements.$wrapper.data("animation-duration")/1e3).toFixed(2)).toString()+"s";e.grid=e.elements.$grid.isotope({itemSelector:".gallery-item-wrap",layoutMode:t,transitionDuration:n}),e.grid.imagesLoaded().progress((function(){e.grid.isotope("layout")})),e.onInitGallery(),e.onClickFilterButton(),e.onClickLoadMoreButton(),e.onFormChange()}onInitGallery(){const e=this;e.elements.$filter.each((function(){jQuery(this).on("click",(function(t){t.preventDefault();const n=e.getSettings("selectors"),s=jQuery(this).data("filter"),o=e.elements.$filter_label,a=e.elements.$filter_list,i=e.elements.$filter_button,r=e.elements.$filter_form;e.elements.$filter.removeClass("active"),jQuery(this).addClass("active"),e.elements.$active_label=e.$element.find(n.active_label),e.grid.isotope({filter:function(){const e="*"!==s?s.substring(1):"*",t=jQuery(this).attr("class").split(/\s+/);let n=!1;if(i.length>0){const s=r.val(),o=jQuery(this).find(".item-title").text(),a=jQuery(this).find(".item-content").text();n="*"!=e?(o.toLowerCase().includes(s.toLowerCase())||a.toLowerCase().includes(s.toLowerCase()))&&t.includes(e):o.toLowerCase().includes(s.toLowerCase())||a.toLowerCase().includes(s.toLowerCase())}else n="*"==e||t.includes(e);return n}}),i.length>0&&(o.text(jQuery(this).text()),a.removeClass("open-controls"))}))}))}onClickFilterButton(){const e=this;e.elements.$filter_button.on("click",(function(t){t.preventDefault();const n=e.elements.$filter_list;n.hasClass("open-controls")?n.removeClass("open-controls"):n.addClass("open-controls")}))}onFormChange(){const e=this,t=e.elements.$filter_form;void 0!==t&&t.on("change paste keyup",(function(){const t=jQuery(this).val();e.grid.isotope({filter:function(){const n=jQuery(this).find(".item-title").text(),s=jQuery(this).find(".item-content").text(),o=jQuery(this).attr("class").split(/\s+/),a="*"!==e.elements.$active_label.data("filter")?e.elements.$active_label.data("filter").substring(1):"*";let i=!1;return i="*"==a?n.toLowerCase().includes(t.toLowerCase())||s.toLowerCase().includes(t.toLowerCase()):(n.toLowerCase().includes(t.toLowerCase())||s.toLowerCase().includes(t.toLowerCase()))&&o.includes(a),i}})}))}onClickLoadMoreButton(){const e=this,t=e.elements.$wrapper.data("items");e.elements.$load_more.on("click",(function(n){n.preventDefault();const s=parseInt(e.elements.$wrapper.attr("data-current-loaded")),o=parseInt(e.elements.$wrapper.attr("data-count-items")),a=parseInt(e.elements.$wrapper.attr("data-load-more")),i=e.elements.$wrapper.attr("data-no-more");if(o>s)if(o-a-s>0){const n=[...t].splice(s,a);e.grid.append(n).isotope("reloadItems").isotope(),e.grid.imagesLoaded().progress((function(){e.grid.isotope("layout")})),e.elements.$wrapper.attr("data-current-loaded",s+a)}else{const n=[...t].splice(s,o-s);e.grid.append(n).isotope("reloadItems").isotope(),e.grid.imagesLoaded().progress((function(){e.grid.isotope("layout")})),e.elements.$wrapper.attr("data-current-loaded",o),e.elements.$load_more.find(".load-more-text").text(i),setTimeout((function(){e.elements.$load_more.fadeOut("slow")}),600)}}))}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_gallery.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-mailchimp",form:".jkit-mailchimp-form"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$form:this.$element.find(e.form)}}bindEvents(){this.onSubmit()}onSubmit(){this.elements.$form.on("submit",(function(e){e.preventDefault();const t=jQuery(this).find(".jkit-mailchimp-message"),n=jQuery(this).data("error-message"),s=jQuery(this).data("success-message"),o={first_name:jQuery(this).find('input[name="first-name"]').val(),last_name:jQuery(this).find('input[name="last-name"]').val(),phone:jQuery(this).find('input[name="phone"]').val(),email:jQuery(this).find('input[name="email"]').val(),list:jQuery(this).data("listed")};t.removeClass("error success"),jQuery.ajax({type:"POST",url:jkit_ajax_url,data:{data:o,action:"jkit_element_ajax_jkit_mailchimp"},dataType:"json",encode:!0}).done((function(e){e.status_code>=400?(t.addClass("error"),t.text(e.message)):(t.addClass("success"),t.text(s))})).fail((function(){t.addClass("error"),t.text(n)}))}))}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_mailchimp.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-nav-menu",container:".jkit-menu-wrapper",open_toggle:".jkit-hamburger-menu",close_toggle:'.jkit-close-menu, .menu-item:not(.menu-item-has-children) a[href^="#"]',dropdown_toggle:"li.menu-item-has-children > a i",menu_dropdown:"li.menu-item-has-children > a"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$container:this.$element.find(e.container),$open_toggle:this.$element.find(e.open_toggle),$close_toggle:this.$element.find(e.close_toggle),$dropdown_toggle:this.$element.find(e.dropdown_toggle),$menu_dropdown:this.$element.find(e.menu_dropdown)}}bindEvents(){this.onLoadElement()}onLoadElement(){this.addBodyClass(),this.addDropdownIcon(),this.onToogleClick()}addBodyClass(){this.elements.$wrapper.length>0&&jQuery("body").addClass("jkit-nav-menu-loaded")}addDropdownIcon(){const e=this.elements.$wrapper.data("item-indicator"),t=this.elements.$menu_dropdown,n=this.getSettings("selectors");t.each((function(){0==jQuery(this).find("i").length&&jQuery(this).append(e)})),this.elements.$dropdown_toggle=this.$element.find(n.dropdown_toggle)}onToogleClick(){const e=this,t=e.elements.$wrapper,n=e.elements.$menu_dropdown,s=e.elements.$open_toggle,o=e.elements.$close_toggle,a=e.elements.$dropdown_toggle;s.on("click",(function(t){t.preventDefault(),e.elements.$container.hasClass("active")?e.elements.$container.removeClass("active"):e.elements.$container.addClass("active")})),o.on("click",(function(t){t.preventDefault(),e.elements.$container.removeClass("active")})),t.hasClass("submenu-click-title")?n.each((function(){jQuery(this).on("click",(function(e){e.preventDefault();const t=jQuery(this).next();t.hasClass("dropdown-open")?t.removeClass("dropdown-open"):t.addClass("dropdown-open")}))})):a.each((function(){jQuery(this).on("click",(function(e){e.preventDefault();const t=jQuery(this).parents("a").next();t.hasClass("dropdown-open")?t.removeClass("dropdown-open"):t.addClass("dropdown-open")}))}))}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_nav_menu.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-off-canvas",sidebar:".offcanvas-sidebar",hamburger:".offcanvas-sidebar-button",close:".offcanvas-close-button",overlay:".bg-overlay"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$sidebar:this.$element.find(e.sidebar),$hamburger:this.$element.find(e.hamburger),$close:this.$element.find(e.close),$overlay:this.$element.find(e.overlay)}}bindEvents(){const e=this;e.elements.$hamburger.on("click",(function(t){t.preventDefault(),e.elements.$sidebar.hasClass("active")?e.elements.$sidebar.removeClass("active"):e.elements.$sidebar.addClass("active")})),e.elements.$close.on("click",(function(t){t.preventDefault(),e.elements.$sidebar.removeClass("active")})),e.elements.$overlay.on("click",(function(t){t.preventDefault(),e.elements.$sidebar.removeClass("active")}))}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_off_canvas.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-pie-chart",canvas_main:"canvas.main-canvas",canvas_bg:"canvas.background-canvas",number:".pie-chart-content"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$canvas_main:this.$element.find(e.canvas_main),$canvas_bg:this.$element.find(e.canvas_bg),$number:this.$element.find(e.number)}}bindEvents(){this.animateChart(),jQuery(window).on("scroll",this.animateChart.bind(this)),"percentage"==this.elements.$wrapper.data("content-type")&&(this.countNumber(),jQuery(window).on("scroll",this.countNumber.bind(this)))}animateChart(){const e=this,t=e.elements.$canvas_main,n=e.elements.$canvas_bg;if(this.onScreen()&&!t.hasClass("loaded")){const s=e.elements.$wrapper,o=t.get(0).getContext("2d"),a=n.get(0).getContext("2d"),i=s.data("percent"),r=s.data("cutout")+"%",l=s.data("color-type"),d=s.data("color"),m=s.data("bg-color"),c=s.data("gradient1"),u=s.data("gradient2"),p={datasets:[{data:[i,100-i],backgroundColor:["#80b1ff","transparent"],hoverBackgroundColor:["#80b1ff","transparent"],borderWidth:0}]},f={datasets:[{data:[100],backgroundColor:["#d1d1d1"],hoverBackgroundColor:["#d1d1d1"],borderWidth:0}]},h={animation:{duration:s.data("animation-duration")},responsive:!0,cutout:r,plugins:{title:{display:!1},legend:{display:!1},tooltip:{enabled:!1}}},g={animation:!1,responsive:!0,cutout:r,plugins:{title:{display:!1},legend:{display:!1},tooltip:{enabled:!1}}};if("normal"==l)""!==d&&(p.datasets[0].backgroundColor[0]=d,p.datasets[0].hoverBackgroundColor[0]=d);else if("gradient"==l&&(""!==c||""!==u)){const e=o.createLinearGradient(0,0,0,170);""!==c&&e.addColorStop(0,c),""!==u&&e.addColorStop(1,u),p.datasets[0].backgroundColor[0]=e,p.datasets[0].hoverBackgroundColor[0]=e}""!==m&&(f.datasets[0].backgroundColor[0]=m,f.datasets[0].hoverBackgroundColor[0]=m),new Chart(o,{type:"doughnut",data:p,options:h}),new Chart(a,{type:"doughnut",data:f,options:g}),t.addClass("loaded"),t.css("display",""),n.css("display","")}}countNumber(){const e=this.elements.$number,t=this.elements.$wrapper;this.onScreen()&&!e.hasClass("loaded")&&(e.prop("Counter",0).animate({Counter:t.data("percent")},{duration:t.data("animation-duration"),easing:"swing",step:function(t){e.text(Math.ceil(t).toString()+"%")}}),e.addClass("loaded"))}onScreen(){const e=jQuery(window).scrollTop()+jQuery(window).height();return this.elements.$wrapper.offset().top<=e}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_pie_chart.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-portfolio-gallery",row_items:".row-item",gallery_items:".gallery-items",image_items:".image-item"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$row_items:this.$element.find(e.row_items),$gallery_items:this.$element.find(e.gallery_items),$image_items:this.$element.find(e.image_items)}}bindEvents(){this.onRenderInit(),this.onClickHover()}onRenderInit(){const e=this.elements.$row_items,t=this.elements.$image_items;jQuery(e.get().reverse()).each((function(){jQuery(this).hasClass("current-item")&&(e.removeClass("current-item"),jQuery(this).addClass("current-item"))})),jQuery(t.get().reverse()).each((function(){jQuery(this).hasClass("current-item")&&(t.removeClass("current-item"),jQuery(this).addClass("current-item"))}))}onClickHover(){const e=this,t=e.elements.$wrapper,n=e.elements.$row_items;t.hasClass("on-click")&&n.each((function(){jQuery(this).on({click:function(){n.removeClass("current-item"),jQuery(this).addClass("current-item"),e.onShowImage(jQuery(this).data("tab"))}})})),t.hasClass("on-hover")&&n.each((function(){jQuery(this).on({mouseenter:function(){n.removeClass("current-item"),jQuery(this).addClass("current-item"),e.onShowImage(jQuery(this).data("tab"))}})}))}onShowImage(e){this.elements.$image_items.removeClass("current-item"),this.elements.$gallery_items.find("#"+e).addClass("current-item")}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_portfolio_gallery.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.post-element",pagination:".jkit-block-pagination"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$pagination:this.$element.find(e.pagination)}}bindEvents(){this.onInitPagination()}onInitPagination(){const e=this.elements.$wrapper,t=this.elements.$pagination,n=e.data("settings"),s=n.pagination_scroll_limit,o=n.pagination_mode,a=n.sg_content_sorting,i=e.find(".product-order select"),r={action:jkit_element_pagination_option.element_prefix+n.class,data:{current_page:1,attr:n,default_sortby:n.sort_by}},l={parameter:{number_post:r.data.attr.number_post.size,current_page:r.data.current_page}};let d=!1,m=[],c=0;const u=function(){d||t.hasClass("disabled")||window.self!=window.top||(s>=r.data.current_page||"0"==s)&&t.find(".jkit-block-scrollload").elementorWaypoint((function(){r.data.current_page=r.data.current_page+1,c++,g(),this.destroy()}),{offset:"100%",context:window}),Waypoint.refreshAll()},p=function(e){e.preventDefault(),d||t.find(this).hasClass("disabled")||("prev"===e.data?r.data.current_page=r.data.current_page-1:r.data.current_page=r.data.current_page+1,g())},f=function(e){e.content="<div>"+e.content+"</div>";const t=jQuery(e.content);return e.content=t.html(),e},h=function(n){["loadmore","scrollload"].includes(o)?function(n){const s=jQuery(n.content);let a=0;s.each((function(){(jQuery(this).hasClass("jkit-post")||jQuery(this).hasClass("jkit-product-block"))&&jQuery(this).addClass("jkit-ajax-loaded anim-"+a),a++})),e.removeClass("loading"),e.addClass("loaded"),1===r.data.current_page?(e.find(".jkit-ajax-flag").html(s),t.removeClass("disabled"),t.show()):e.find(".jkit-ajax-flag").append(s),n.next||(t.addClass("disabled"),t.hide()),y(),jQuery(window).trigger("resize"),"scrollload"===o&&setTimeout((function(){u()}),500)}(n):"nextprev"===o?function(n){const s=jQuery(n.content);let o=0;s.each((function(){(jQuery(this).hasClass("jkit-post")||jQuery(this).hasClass("jkit-product-block"))&&jQuery(this).addClass("jkit-ajax-loaded anim-"+o),o++})),e.removeClass("loading"),e.addClass("loaded"),e.find(".jkit-ajax-flag").html(s),n.next?t.find(".jkit-pagination-button.jkit-block-nextprev .next").removeClass("disabled"):t.find(".jkit-pagination-button.jkit-block-nextprev .next").addClass("disabled"),n.prev?t.find(".jkit-pagination-button.jkit-block-nextprev .prev").removeClass("disabled"):t.find(".jkit-pagination-button.jkit-block-nextprev .prev").addClass("disabled"),y(),jQuery(window).trigger("resize"),jQuery("html, body").animate({scrollTop:e.offset().top-100},1e3)}(n):function(t){const n=jQuery(t.content);let s=0;n.each((function(){(jQuery(this).hasClass("jkit-post")||jQuery(this).hasClass("jkit-product-block"))&&jQuery(this).addClass("jkit-ajax-loaded anim-"+s),s++})),e.removeClass("loading"),e.addClass("loaded"),e.find(".jkit-ajax-flag").html(n),y(),jQuery(window).trigger("resize")}(n)},g=function(){return new Promise((function(e,t){w();const n=function(e){const t=JSON.stringify(e);for(let e=0;e<m.length;e++)if(t===m[e].param)return f(m[e].result)}(r);n?(h(n),e()):jQuery.ajax({url:jkit_ajax_url,type:"post",dataType:"json",data:r,success:function(t){h(t),function(e,t){m.push({param:JSON.stringify(e),result:t})}(r,t),e()}})}))},w=function(){d=!0,t.addClass("loading"),e.addClass("loading"),"nextprev"===o?e.find(".jkit-preloader-overlay").show():["loadmore","scrollload"].includes(o)?t.find("a").text(t.find("a").data("loading")):e.find(".jkit-preloader-overlay").show()},y=function(){d=!1,t.removeClass("loading"),"nextprev"===o?e.find(".jkit-preloader-overlay").hide():["loadmore","scrollload"].includes(o)?t.find("a").text(t.find("a").data("load")):e.find(".jkit-preloader-overlay").hide()};["loadmore","scrollload"].includes(o)&&("scrollload"===o&&u(),t.find(".jkit-pagination-button.jkit-block-loadmore, .jkit-pagination-button.jkit-block-scrollload").on("click",(function(e){e.preventDefault(),r.data.current_page=r.data.current_page+1,c++,d||t.hasClass("disabled")||g()}))),"nextprev"===o&&(t.find(".jkit-pagination-button.jkit-block-nextprev .next").on("click",null,"next",p),t.find(".jkit-pagination-button.jkit-block-nextprev .prev").on("click",null,"prev",p)),"yes"===a&&i.length&&i.on("change",(function(){const t="default"!==this.value?this.value:r.data.default_sortby;if(r.data.attr.sort_by=t,["loadmore","scrollload"].includes(o))l.parameter.current_page=r.data.current_page,r.data.current_page=1,r.data.attr.number_post.size+=r.data.attr.pagination_number_post.size*c,g().then((function(){r.data.attr.number_post.size=l.parameter.number_post,r.data.current_page=l.parameter.current_page}));else if("disable"===o){const t=e.find(".jkit-products > .jkit-product-block > .button").map((function(e){return jQuery(this).data("product_id")})).get().join();r.data.attr.wc_include_post=t,g()}else g()}))}}jQuery(window).on("elementor/frontend/init",(()=>{const e=e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})};elementorFrontend.hooks.addAction("frontend/element_ready/jkit_post_block.default",e),elementorFrontend.hooks.addAction("frontend/element_ready/jkit_post_list.default",e),elementorFrontend.hooks.addAction("frontend/element_ready/jkit_product_grid.default",e)}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-product-carousel",items:".jkit-products"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$items:this.$element.find(e.items)}}bindEvents(){this.onLoadElement()}onLoadElement(){this.elements.$wrapper.find(".jeg_empty_module").length||this.loadCarousel()}loadCarousel(){const e=this.elements.$wrapper.data("id"),t=this.getSettings("selectors"),n=this.elements.$wrapper.data("settings"),s=n.responsive,o={};let a;Object.entries(s).forEach((([e,t])=>{""===t.items&&""===t.margin||(o[t.breakpoint]={},a=t.breakpoint,""!==t.items&&(o[t.breakpoint].items=t.items),""!==t.margin&&(o[t.breakpoint].gutter=t.margin))})),void 0!==a&&0!==a&&(o[0]=o[a],delete o[a]);const i={container:t.wrapper+'[data-id="'+e+'"] '+t.items,loop:!0,mouseDrag:!0,autoplay:n.autoplay,autoplayTimeout:n.autoplay_speed,autoplayHoverPause:n.autoplay_hover_pause,navPosition:"bottom",controlsPosition:n.arrow_position,controlsText:[n.navigation_left,n.navigation_right],responsiveClass:!0,responsive:o};tns(i),this.elements.$wrapper.find("button[data-action]").remove(),n.show_navigation||this.elements.$wrapper.find(".tns-controls").remove(),n.show_dots||this.elements.$wrapper.find(".tns-nav").remove(),n.show_navigation&&(i.nav=!0,i.navText=['<i class="'+n.navigation_left+'" aria-hidden="true"></i>','<i class="'+n.navigation_right+'" aria-hidden="true"></i>'])}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_product_carousel.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-progress-bar",skill:".skill-track",number:".number-percentage"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$skill:this.$element.find(e.skill),$number:this.$element.find(e.number)}}bindEvents(){this.onLoadElement()}onLoadElement(){this.countNumber(),jQuery(window).on("scroll",this.countNumber.bind(this))}countNumber(){const e=this.elements.$number,t=this.elements.$skill;this.onScreen()&&!e.hasClass("loaded")&&(e.prop("Counter",0).animate({Counter:e.data("value")},{duration:e.data("animation-duration"),easing:"swing",step:function(n){e.text(Math.ceil(n).toString()+"%"),t.css("width",n.toString()+"%")}}),e.addClass("loaded"))}onScreen(){const e=jQuery(window).scrollTop()+jQuery(window).height();return this.elements.$wrapper.offset().top<=e}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_progress_bar.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-search"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper)}}bindEvents(){const e=this.elements.$wrapper;e.magnificPopup({mainClass:"mfp-fade jkit-magnific-popup",delegate:"a.jkit-search-modal",removalDelay:500,midClick:!0,showCloseBtn:!0,closeBtnInside:!1,prependTo:e,type:"inline",fixedContentPos:!0,fixedBgPos:!0,overflowY:"auto"})}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_search.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{bindEvents(){this.$element.data("stickyTop",this.$element.offset().top),this.runSticky()}runSticky(){if(!this.$element.hasClass("jkit-sticky-element--enabled"))return;const e=jQuery,t=this.$element,n=this.getElementSettings(),s=t.hasClass("jkit-sticky-element-on--down")?"down":t.hasClass("jkit-sticky-element-on--up")?"up":"both",o=t.hasClass("jkit-sticky-position--fixed")?"fixed":"sticky";let a=t.data("stickyTop");"fixed"===o?t.wrap('<div class="wrapper-sticky-fixed" style="height: '+t.height()+'px"></div>'):t.parent().hasClass("wrapper-sticky-fixed")&&t.unwrap(),e(window).on("load resize scroll",t,(function(){const i=e("body").attr("data-elementor-device-mode");let r=!0;if(Object.values(n.jkit_sticky_device).forEach((function(e){i!==e||(r=!1)})),r)return t.css("position","relative"),t.removeClass("sticky-pinned"),void(t.hasClass("elementor-column")||t.css("width","unset"));const l="down"===s?e(this).scrollTop():e(this).scrollTop()+e(this).height(),d="down"===s?a:a+t.outerHeight(!0),m="fixed"===o?t.parent().width()+"px":"unset";t.hasClass("sticky-pinned")||(a=t.offset().top,void 0!==n&&(void 0!==n.jkit_sticky_top_position&&(a-=n.jkit_sticky_top_position.size),void 0!==n.jkit_sticky_bottom_position&&(a+=n.jkit_sticky_bottom_position.size))),t.hasClass("elementor-column")||t.css("width",m),"down"===s&&d<l||"up"===s&&d>l||"both"===s&&"sticky"===o?(t.css("position",o),t.addClass("sticky-pinned")):(t.css("position","relative"),t.removeClass("sticky-pinned"))}))}onElementChange(e){-1!==["jkit_sticky_section","jkit_sticky_device","jkit_sticky_trigger","jkit_sticky_position"].indexOf(e)&&(jQuery(window).off("load resize scroll",this.$element),this.runSticky())}}jQuery(window).on("elementor/frontend/init",(()=>{const e=e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})};elementorFrontend.hooks.addAction("frontend/element_ready/section",e),elementorFrontend.hooks.addAction("frontend/element_ready/column",e)}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-tabs",tab:"li.tab-nav",content:".tab-content-list"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$tab:this.$element.find(e.tab),$content:this.$element.find(e.content)}}bindEvents(){const e=this,t="yes"===e.$element.find(".tab-nav-list").data("toggle");t&&e.$element.find("li.tab-nav.active").find(".tab-content").slideDown(),e.elements.$tab.on("click",(function(){if(jQuery(this).hasClass("active"))return;const n=jQuery(this).data("tab");e.elements.$tab.removeClass("active"),t&&(e.elements.$tab.find(".tab-content").slideUp(),jQuery(this).find(".tab-content").slideDown()),jQuery(this).addClass("active"),e.elements.$content.find(".tab-content").removeClass("active"),e.elements.$content.find("."+n).addClass("active")}))}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_tabs.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-team",close_modal:".team-modal-close"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$close_modal:this.$element.find(e.close_modal)}}bindEvents(){this.onClick()}onClick(){const e=this.elements.$wrapper,t=this.elements.$close_modal;e.magnificPopup({delegate:"a.jkit-team-modal",removalDelay:500,callbacks:{beforeOpen:function(){this.st.mainClass=this.st.el.attr("data-effect")}},midClick:!0,showCloseBtn:!1,prependTo:e,type:"inline",fixedContentPos:!0,fixedBgPos:!0,overflowY:"auto"}),t.on("click",(function(e){e.preventDefault(),jQuery.magnificPopup.close()}))}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_team.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-testimonials",items:".testimonials-track"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$items:this.$element.find(e.items)}}bindEvents(){this.onLoadElement()}onLoadElement(){this.loadCarousel()}loadCarousel(){const e=this.elements.$wrapper.data("id"),t=this.getSettings("selectors"),n=this.elements.$wrapper.data("settings"),s=n.responsive,o={0:{items:1,gutter:0},768:{items:2,gutter:0},1025:{items:3,gutter:10}},a={};Object.entries(s).forEach((([e,t])=>{a[t.breakpoint]={},""!==t.items?a[t.breakpoint].items=t.items:o[t.breakpoint]&&(a[t.breakpoint].items=o[t.breakpoint].items),""!==t.margin?a[t.breakpoint].gutter=t.margin:o[t.breakpoint]&&(a[t.breakpoint].gutter=o[t.breakpoint].gutter)}));const i={container:t.wrapper+'[data-id="'+e+'"] '+t.items,loop:!0,mouseDrag:!0,autoplay:n.autoplay,autoplayTimeout:n.autoplay_speed,autoplayHoverPause:n.autoplay_hover_pause,navPosition:"bottom",controlsPosition:n.arrow_position,controlsText:[n.navigation_left,n.navigation_right],responsiveClass:!0,responsive:a};tns(i),this.elements.$wrapper.find("button[data-action]").remove(),n.show_navigation||this.elements.$wrapper.find(".tns-controls").remove(),n.show_dots||this.elements.$wrapper.find(".tns-nav").remove(),n.show_navigation&&(i.nav=!0,i.navText=['<i class="'+n.navigation_left+'" aria-hidden="true"></i>','<i class="'+n.navigation_right+'" aria-hidden="true"></i>'])}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_testimonials.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))},function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-video-button",link:".jeg-elementor-kit.jkit-video-button .jkit-video-popup-btn"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$link:this.$element.find(e.link)}}bindEvents(){this.onClick()}onClick(){const e=this.elements.$wrapper,t=e.data("type"),n=e.data("autoplay"),s=e.data("mute"),o=e.data("loop"),a=e.data("controls"),i=e.data("unique-id");let r="//www.youtube.com/embed/";"self_hosted"===t?this.elements.$link.magnificPopup({type:"inline",src:"#jkit_video_button_"+i}):(r="youtube"==t?r+"?playlist=%id%&autoplay="+n+"&mute="+s+"&loop="+o+"&controls="+a+"&start="+e.data("start")+"&end="+e.data("end")+"&version=3":"//player.vimeo.com/video/%id%?autoplay="+n+"&muted="+s+"&loop="+o+"&controls="+a+"&title="+e.data("title")+"&portrait="+e.data("portrait")+"&byline="+e.data("byline"),this.elements.$link.magnificPopup({type:"iframe",iframe:{patterns:{youtube:{index:"youtube.com/",id:function(e){var t=e.match(/[\\?\\&]v=([^\\?\\&]+)/);return t&&t[1]?t[1]:null},src:r},vimeo:{index:"vimeo.com/",id:function(e){var t=e.match(/(https?:\/\/)?(www.)?(player.)?vimeo.com\/([a-z]*\/)*([0-9]{6,11})[?]?.*/);return t&&t[5]?t[5]:null},src:r}}},mainClass:"mfp-fade jkit-magnific-popup",removalDelay:160,preloader:!0,fixedContentPos:!1,showCloseBtn:!0}))}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_video_button.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))}]);
|
assets/js/elements/pie-chart.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function n(a){if(t[a])return t[a].exports;var
|
1 |
+
!function(e){var t={};function n(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(a,r,function(t){return e[t]}.bind(null,r));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t){class n extends elementorModules.frontend.handlers.Base{getDefaultSettings(){return{selectors:{wrapper:".jeg-elementor-kit.jkit-pie-chart",canvas_main:"canvas.main-canvas",canvas_bg:"canvas.background-canvas",number:".pie-chart-content"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$wrapper:this.$element.find(e.wrapper),$canvas_main:this.$element.find(e.canvas_main),$canvas_bg:this.$element.find(e.canvas_bg),$number:this.$element.find(e.number)}}bindEvents(){this.animateChart(),jQuery(window).on("scroll",this.animateChart.bind(this)),"percentage"==this.elements.$wrapper.data("content-type")&&(this.countNumber(),jQuery(window).on("scroll",this.countNumber.bind(this)))}animateChart(){const e=this,t=e.elements.$canvas_main,n=e.elements.$canvas_bg;if(this.onScreen()&&!t.hasClass("loaded")){const a=e.elements.$wrapper,r=t.get(0).getContext("2d"),o=n.get(0).getContext("2d"),d=a.data("percent"),s=a.data("cutout")+"%",i=a.data("color-type"),l=a.data("color"),u=a.data("bg-color"),c=a.data("gradient1"),p=a.data("gradient2"),m={datasets:[{data:[d,100-d],backgroundColor:["#80b1ff","transparent"],hoverBackgroundColor:["#80b1ff","transparent"],borderWidth:0}]},f={datasets:[{data:[100],backgroundColor:["#d1d1d1"],hoverBackgroundColor:["#d1d1d1"],borderWidth:0}]},g={animation:{duration:a.data("animation-duration")},responsive:!0,cutout:s,plugins:{title:{display:!1},legend:{display:!1},tooltip:{enabled:!1}}},h={animation:!1,responsive:!0,cutout:s,plugins:{title:{display:!1},legend:{display:!1},tooltip:{enabled:!1}}};if("normal"==i)""!==l&&(m.datasets[0].backgroundColor[0]=l,m.datasets[0].hoverBackgroundColor[0]=l);else if("gradient"==i&&(""!==c||""!==p)){const e=r.createLinearGradient(0,0,0,170);""!==c&&e.addColorStop(0,c),""!==p&&e.addColorStop(1,p),m.datasets[0].backgroundColor[0]=e,m.datasets[0].hoverBackgroundColor[0]=e}""!==u&&(f.datasets[0].backgroundColor[0]=u,f.datasets[0].hoverBackgroundColor[0]=u),new Chart(r,{type:"doughnut",data:m,options:g}),new Chart(o,{type:"doughnut",data:f,options:h}),t.addClass("loaded"),t.css("display",""),n.css("display","")}}countNumber(){const e=this.elements.$number,t=this.elements.$wrapper;this.onScreen()&&!e.hasClass("loaded")&&(e.prop("Counter",0).animate({Counter:t.data("percent")},{duration:t.data("animation-duration"),easing:"swing",step:function(t){e.text(Math.ceil(t).toString()+"%")}}),e.addClass("loaded"))}onScreen(){const e=jQuery(window).scrollTop()+jQuery(window).height();return this.elements.$wrapper.offset().top<=e}}jQuery(window).on("elementor/frontend/init",(()=>{elementorFrontend.hooks.addAction("frontend/element_ready/jkit_pie_chart.default",(e=>{elementorFrontend.elementsHandler.addHandler(n,{$element:e})}))}))}]);
|
assets/js/notiflix/notiflix.min.css
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
/* Notiflix (https://
|
2 |
|
3 |
-
[id^=NotiflixNotifyWrap]{pointer-events:none;position:fixed;z-index:4001;opacity:1;right:10px;top:10px;width:280px;max-width:96%;-webkit-box-sizing:border-box;box-sizing:border-box;background:transparent}[id^=NotiflixNotifyWrap].nx-flex-center-center{max-height:calc(100vh - 20px);overflow-x:hidden;overflow-y:auto;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;margin:auto}[id^=NotiflixNotifyWrap]::-webkit-scrollbar{width:0;height:0}[id^=NotiflixNotifyWrap]::-webkit-scrollbar-thumb{background:transparent}[id^=NotiflixNotifyWrap]::-webkit-scrollbar-track{background:transparent}[id^=NotiflixNotifyWrap] *{-webkit-box-sizing:border-box;box-sizing:border-box}[id^=NotiflixNotifyOverlay]{-webkit-transition:background .3s ease-in-out;-o-transition:background .3s ease-in-out;transition:background .3s ease-in-out}[id^=NotiflixNotifyWrap]>div{pointer-events:all;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:"Quicksand",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;width:100%;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;position:relative;margin:0 0 10px;border-radius:5px;background:#1e1e1e;color:#fff;padding:10px 12px;font-size:14px;line-height:1.4}[id^=NotiflixNotifyWrap]>div:last-child{margin:0}[id^=NotiflixNotifyWrap]>div.with-callback{cursor:pointer}[id^=NotiflixNotifyWrap]>div.with-icon{padding:8px;min-height:56px}[id^=NotiflixNotifyWrap]>div.nx-paused{cursor:auto}[id^=NotiflixNotifyWrap]>div.click-to-close{cursor:pointer}[id^=NotiflixNotifyWrap]>div.with-close-button{padding:10px 30px 10px 12px}[id^=NotiflixNotifyWrap]>div.with-icon.with-close-button{padding:6px 30px 6px 6px}[id^=NotiflixNotifyWrap]>div>span.the-message{cursor:inherit;font-weight:normal;font-family:inherit!important;word-break:break-all;word-break:break-word}[id^=NotiflixNotifyWrap]>div>span.notify-close-button{cursor:pointer;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;position:absolute;right:8px;top:0;bottom:0;margin:auto;color:inherit;width:16px;height:16px}[id^=NotiflixNotifyWrap]>div>span.notify-close-button:hover{-webkit-transform:rotate(90deg);transform:rotate(90deg)}[id^=NotiflixNotifyWrap]>div>span.notify-close-button>svg{position:absolute;width:16px;height:16px;right:0;top:0}[id^=NotiflixNotifyWrap]>div>.nmi{position:absolute;width:40px;height:40px;font-size:30px;line-height:40px;text-align:center;left:8px;top:0;bottom:0;margin:auto;border-radius:inherit}[id^=NotiflixNotifyWrap]>div>.wfa.shadow{color:inherit;background:rgba(0,0,0,.15);box-shadow:inset 0 0 34px rgba(0,0,0,.2);text-shadow:0 0 10px rgba(0,0,0,.3)}[id^=NotiflixNotifyWrap]>div>span.with-icon{position:relative;float:left;width:calc(100% - 40px);margin:0 0 0 40px;padding:0 0 0 10px;-webkit-box-sizing:border-box;box-sizing:border-box}[id^=NotiflixNotifyWrap]>div.rtl-on>.nmi{left:auto;right:8px}[id^=NotiflixNotifyWrap]>div.rtl-on>span.with-icon{padding:0 10px 0 0;margin:0 40px 0 0}[id^=NotiflixNotifyWrap]>div.rtl-on>span.notify-close-button{right:auto;left:8px}[id^=NotiflixNotifyWrap]>div.with-icon.with-close-button.rtl-on{padding:6px 6px 6px 30px}[id^=NotiflixNotifyWrap]>div.with-close-button.rtl-on{padding:10px 12px 10px 30px}[id^=NotiflixNotifyOverlay].with-animation,[id^=NotiflixNotifyWrap]>div.with-animation.nx-fade{-webkit-animation:notify-animation-fade .3s ease-in-out 0s normal;animation:notify-animation-fade .3s ease-in-out 0s normal}@-webkit-keyframes notify-animation-fade{0%{opacity:0}100%{opacity:1}}@keyframes notify-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-zoom{-webkit-animation:notify-animation-zoom .3s ease-in-out 0s normal;animation:notify-animation-zoom .3s ease-in-out 0s normal}@-webkit-keyframes notify-animation-zoom{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.05);transform:scale(1.05)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes notify-animation-zoom{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.05);transform:scale(1.05)}100%{-webkit-transform:scale(1);transform:scale(1)}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-right{-webkit-animation:notify-animation-from-right .3s ease-in-out 0s normal;animation:notify-animation-from-right .3s ease-in-out 0s normal}@-webkit-keyframes notify-animation-from-right{0%{right:-300px;opacity:0}50%{right:8px;opacity:1}100%{right:0;opacity:1}}@keyframes notify-animation-from-right{0%{right:-300px;opacity:0}50%{right:8px;opacity:1}100%{right:0;opacity:1}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-left{-webkit-animation:notify-animation-from-left .3s ease-in-out 0s normal;animation:notify-animation-from-left .3s ease-in-out 0s normal}@-webkit-keyframes notify-animation-from-left{0%{left:-300px;opacity:0}50%{left:8px;opacity:1}100%{left:0;opacity:1}}@keyframes notify-animation-from-left{0%{left:-300px;opacity:0}50%{left:8px;opacity:1}100%{left:0;opacity:1}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-top{-webkit-animation:notify-animation-from-top .3s ease-in-out 0s normal;animation:notify-animation-from-top .3s ease-in-out 0s normal}@-webkit-keyframes notify-animation-from-top{0%{top:-50px;opacity:0}50%{top:8px;opacity:1}100%{top:0;opacity:1}}@keyframes notify-animation-from-top{0%{top:-50px;opacity:0}50%{top:8px;opacity:1}100%{top:0;opacity:1}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-bottom{-webkit-animation:notify-animation-from-bottom .3s ease-in-out 0s normal;animation:notify-animation-from-bottom .3s ease-in-out 0s normal}@-webkit-keyframes notify-animation-from-bottom{0%{bottom:-50px;opacity:0}50%{bottom:8px;opacity:1}100%{bottom:0;opacity:1}}@keyframes notify-animation-from-bottom{0%{bottom:-50px;opacity:0}50%{bottom:8px;opacity:1}100%{bottom:0;opacity:1}}[id^=NotiflixNotifyOverlay].with-animation.remove,[id^=NotiflixNotifyWrap]>div.with-animation.nx-fade.remove{opacity:0;-webkit-animation:notify-remove-fade .3s ease-in-out 0s normal;animation:notify-remove-fade .3s ease-in-out 0s normal}@-webkit-keyframes notify-remove-fade{0%{opacity:1}100%{opacity:0}}@keyframes notify-remove-fade{0%{opacity:1}100%{opacity:0}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-zoom.remove{-webkit-transform:scale(0);transform:scale(0);-webkit-animation:notify-remove-zoom .3s ease-in-out 0s normal;animation:notify-remove-zoom .3s ease-in-out 0s normal}@-webkit-keyframes notify-remove-zoom{0%{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.05);transform:scale(1.05)}100%{-webkit-transform:scale(0);transform:scale(0)}}@keyframes notify-remove-zoom{0%{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.05);transform:scale(1.05)}100%{-webkit-transform:scale(0);transform:scale(0)}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-top.remove{opacity:0;-webkit-animation:notify-remove-to-top .3s ease-in-out 0s normal;animation:notify-remove-to-top .3s ease-in-out 0s normal}@-webkit-keyframes notify-remove-to-top{0%{top:0;opacity:1}50%{top:8px;opacity:1}100%{top:-50px;opacity:0}}@keyframes notify-remove-to-top{0%{top:0;opacity:1}50%{top:8px;opacity:1}100%{top:-50px;opacity:0}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-right.remove{opacity:0;-webkit-animation:notify-remove-to-right .3s ease-in-out 0s normal;animation:notify-remove-to-right .3s ease-in-out 0s normal}@-webkit-keyframes notify-remove-to-right{0%{right:0;opacity:1}50%{right:8px;opacity:1}100%{right:-300px;opacity:0}}@keyframes notify-remove-to-right{0%{right:0;opacity:1}50%{right:8px;opacity:1}100%{right:-300px;opacity:0}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-bottom.remove{opacity:0;-webkit-animation:notify-remove-to-bottom .3s ease-in-out 0s normal;animation:notify-remove-to-bottom .3s ease-in-out 0s normal}@-webkit-keyframes notify-remove-to-bottom{0%{bottom:0;opacity:1}50%{bottom:8px;opacity:1}100%{bottom:-50px;opacity:0}}@keyframes notify-remove-to-bottom{0%{bottom:0;opacity:1}50%{bottom:8px;opacity:1}100%{bottom:-50px;opacity:0}}[id^=NotiflixNotifyWrap]>div.with-animation.nx-from-left.remove{opacity:0;-webkit-animation:notify-remove-to-left .3s ease-in-out 0s normal;animation:notify-remove-to-left .3s ease-in-out 0s normal}@-webkit-keyframes notify-remove-to-left{0%{left:0;opacity:1}50%{left:8px;opacity:1}100%{left:-300px;opacity:0}}@keyframes notify-remove-to-left{0%{left:0;opacity:1}50%{left:8px;opacity:1}100%{left:-300px;opacity:0}}[id^=NotiflixReportWrap]{position:fixed;z-index:4002;width:100%;height:100%;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Quicksand",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;left:0;top:0;padding:10px;color:#1e1e1e;border-radius:25px;background:transparent;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}[id^=NotiflixReportWrap] *{-webkit-box-sizing:border-box;box-sizing:border-box}[id^=NotiflixReportWrap]>div[class*="-overlay"]{width:100%;height:100%;left:0;top:0;background:rgba(255,255,255,.5);position:fixed;z-index:0}[id^=NotiflixReportWrap]>div[class*="-content"]{width:320px;max-width:100%;max-height:96vh;overflow-x:hidden;overflow-y:auto;border-radius:inherit;padding:10px;-webkit-filter:drop-shadow(0 0 5px rgba(0, 0, 0, .05));filter:drop-shadow(0 0 5px rgba(0, 0, 0, .05));border:1px solid rgba(0,0,0,.03);background:#f8f8f8;position:relative;z-index:1}[id^=NotiflixReportWrap]>div[class*="-content"]::-webkit-scrollbar{width:0;height:0}[id^=NotiflixReportWrap]>div[class*="-content"]::-webkit-scrollbar-thumb{background:transparent}[id^=NotiflixReportWrap]>div[class*="-content"]::-webkit-scrollbar-track{background:transparent}[id^=NotiflixReportWrap]>div[class*="-content"]>div[class$="-icon"]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:110px;height:110px;display:block;margin:6px auto 12px}[id^=NotiflixReportWrap]>div[class*="-content"]>div[class$="-icon"] svg{min-width:100%;max-width:100%;height:auto}[id^=NotiflixReportWrap]>*>h5{word-break:break-all;word-break:break-word;font-family:inherit!important;font-size:16px;font-weight:500;line-height:1.4;margin:0 0 10px;padding:0 0 10px;border-bottom:1px solid rgba(0,0,0,.1);float:left;width:100%;text-align:center}[id^=NotiflixReportWrap]>*>p{word-break:break-all;word-break:break-word;font-family:inherit!important;font-size:13px;line-height:1.4;font-weight:normal;float:left;width:100%;padding:0 10px;margin:0 0 10px}[id^=NotiflixReportWrap] a#NXReportButton{word-break:break-all;word-break:break-word;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:inherit!important;-webkit-transition:all .25s ease-in-out;-o-transition:all .25s ease-in-out;transition:all .25s ease-in-out;cursor:pointer;float:right;padding:7px 17px;background:#32c682;font-size:14px;line-height:1.4;font-weight:500;border-radius:inherit!important;color:#fff}[id^=NotiflixReportWrap] a#NXReportButton:hover{box-shadow:inset 0 -60px 5px -5px rgba(0,0,0,.25)}[id^=NotiflixReportWrap].rtl-on a#NXReportButton{float:left}[id^=NotiflixReportWrap]>div[class*="-overlay"].with-animation{-webkit-animation:report-overlay-animation .3s ease-in-out 0s normal;animation:report-overlay-animation .3s ease-in-out 0s normal}@-webkit-keyframes report-overlay-animation{0%{opacity:0}100%{opacity:1}}@keyframes report-overlay-animation{0%{opacity:0}100%{opacity:1}}[id^=NotiflixReportWrap]>div[class*="-content"].with-animation.nx-fade{-webkit-animation:report-animation-fade .3s ease-in-out 0s normal;animation:report-animation-fade .3s ease-in-out 0s normal}@-webkit-keyframes report-animation-fade{0%{opacity:0}100%{opacity:1}}@keyframes report-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixReportWrap]>div[class*="-content"].with-animation.nx-zoom{-webkit-animation:report-animation-zoom .3s ease-in-out 0s normal;animation:report-animation-zoom .3s ease-in-out 0s normal}@-webkit-keyframes report-animation-zoom{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}50%{opacity:1;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes report-animation-zoom{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}50%{opacity:1;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}[id^=NotiflixReportWrap].remove>div[class*="-overlay"].with-animation{opacity:0;-webkit-animation:report-overlay-animation-remove .3s ease-in-out 0s normal;animation:report-overlay-animation-remove .3s ease-in-out 0s normal}@-webkit-keyframes report-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}@keyframes report-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixReportWrap].remove>div[class*="-content"].with-animation.nx-fade{opacity:0;-webkit-animation:report-animation-fade-remove .3s ease-in-out 0s normal;animation:report-animation-fade-remove .3s ease-in-out 0s normal}@-webkit-keyframes report-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@keyframes report-animation-fade-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixReportWrap].remove>div[class*="-content"].with-animation.nx-zoom{opacity:0;-webkit-animation:report-animation-zoom-remove .3s ease-in-out 0s normal;animation:report-animation-zoom-remove .3s ease-in-out 0s normal}@-webkit-keyframes report-animation-zoom-remove{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:.5;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:0;-webkit-transform:scale(0);transform:scale(0)}}@keyframes report-animation-zoom-remove{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:.5;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:0;-webkit-transform:scale(0);transform:scale(0)}}[id^=NotiflixConfirmWrap]{position:fixed;z-index:4003;width:100%;height:100%;left:0;top:0;padding:10px;-webkit-box-sizing:border-box;box-sizing:border-box;background:transparent;font-family:"Quicksand",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}[id^=NotiflixConfirmWrap].nx-position-center-top{-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}[id^=NotiflixConfirmWrap].nx-position-center-bottom{-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}[id^=NotiflixConfirmWrap].nx-position-left-top{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}[id^=NotiflixConfirmWrap].nx-position-left-center{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}[id^=NotiflixConfirmWrap].nx-position-left-bottom{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}[id^=NotiflixConfirmWrap].nx-position-right-top{-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}[id^=NotiflixConfirmWrap].nx-position-right-center{-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end}[id^=NotiflixConfirmWrap].nx-position-right-bottom{-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}[id^=NotiflixConfirmWrap] *{-webkit-box-sizing:border-box;box-sizing:border-box}[id^=NotiflixConfirmWrap]>div[class*="-overlay"]{width:100%;height:100%;left:0;top:0;background:rgba(255,255,255,.5);position:fixed;z-index:0}[id^=NotiflixConfirmWrap]>div[class*="-overlay"].with-animation{-webkit-animation:confirm-overlay-animation .3s ease-in-out 0s normal;animation:confirm-overlay-animation .3s ease-in-out 0s normal}@-webkit-keyframes confirm-overlay-animation{0%{opacity:0}100%{opacity:1}}@keyframes confirm-overlay-animation{0%{opacity:0}100%{opacity:1}}[id^=NotiflixConfirmWrap].remove>div[class*="-overlay"].with-animation{opacity:0;-webkit-animation:confirm-overlay-animation-remove .3s ease-in-out 0s normal;animation:confirm-overlay-animation-remove .3s ease-in-out 0s normal}@-webkit-keyframes confirm-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}@keyframes confirm-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixConfirmWrap]>div[class*="-content"]{width:300px;max-width:100%;max-height:96vh;overflow-x:hidden;overflow-y:auto;border-radius:25px;padding:10px;margin:0;-webkit-filter:drop-shadow(0 0 5px rgba(0, 0, 0, .05));filter:drop-shadow(0 0 5px rgba(0, 0, 0, .05));background:#f8f8f8;color:#1e1e1e;position:relative;z-index:1;text-align:center}[id^=NotiflixConfirmWrap]>div[class*="-content"]::-webkit-scrollbar{width:0;height:0}[id^=NotiflixConfirmWrap]>div[class*="-content"]::-webkit-scrollbar-thumb{background:transparent}[id^=NotiflixConfirmWrap]>div[class*="-content"]::-webkit-scrollbar-track{background:transparent}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]{float:left;width:100%;text-align:inherit}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>h5{float:left;width:100%;margin:0;padding:0 0 10px;border-bottom:1px solid rgba(0,0,0,.1);color:#32c682;font-family:inherit!important;font-size:16px;line-height:1.4;font-weight:500;text-align:inherit}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>div{font-family:inherit!important;margin:15px 0 20px;padding:0 10px;float:left;width:100%;font-size:14px;line-height:1.4;font-weight:normal;color:inherit;text-align:inherit}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>div>div{font-family:inherit!important;float:left;width:100%;margin:15px 0 0;padding:0}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>div>div>input{font-family:inherit!important;float:left;width:100%;height:40px;margin:0;padding:0 15px;border:1px solid rgba(0,0,0,.1);border-radius:25px;font-size:14px;font-weight:normal;line-height:1;-webkit-transition:all .25s ease-in-out;-o-transition:all .25s ease-in-out;transition:all .25s ease-in-out;text-align:left}[id^=NotiflixConfirmWrap].rtl-on>div[class*="-content"]>div[class*="-head"]>div>div>input{text-align:right}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>div>div>input:hover{border-color:rgba(0,0,0,.1)}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>div>div>input:focus{border-color:rgba(0,0,0,.3)}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>div>div>input.nx-validation-failure{border-color:#ff5549}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>div>div>input.nx-validation-success{border-color:#32c682}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-buttons"]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:inherit;float:left;width:100%;text-align:inherit}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-buttons"]>a{cursor:pointer;font-family:inherit!important;-webkit-transition:all .25s ease-in-out;-o-transition:all .25s ease-in-out;transition:all .25s ease-in-out;float:left;width:48%;padding:9px 5px;border-radius:inherit!important;font-weight:500;font-size:15px;line-height:1.4;color:#f8f8f8;text-align:inherit}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-buttons"]>a.confirm-button-ok{margin:0 2% 0 0;background:#32c682}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-buttons"]>a.confirm-button-cancel{margin:0 0 0 2%;background:#a9a9a9}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-buttons"]>a.full{margin:0;width:100%}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-buttons"]>a:hover{box-shadow:inset 0 -60px 5px -5px rgba(0,0,0,.25)}[id^=NotiflixConfirmWrap].rtl-on>div[class*="-content"]>div[class*="-buttons"],[id^=NotiflixConfirmWrap].rtl-on>div[class*="-content"]>div[class*="-buttons"]>a{-webkit-transform:rotateY(180deg);transform:rotateY(180deg)}[id^=NotiflixConfirmWrap].with-animation.nx-fade>div[class*="-content"]{-webkit-animation:confirm-animation-fade .3s ease-in-out 0s normal;animation:confirm-animation-fade .3s ease-in-out 0s normal}@-webkit-keyframes confirm-animation-fade{0%{opacity:0}100%{opacity:1}}@keyframes confirm-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixConfirmWrap].with-animation.nx-zoom>div[class*="-content"]{-webkit-animation:confirm-animation-zoom .3s ease-in-out 0s normal;animation:confirm-animation-zoom .3s ease-in-out 0s normal}@-webkit-keyframes confirm-animation-zoom{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}50%{opacity:1;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes confirm-animation-zoom{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}50%{opacity:1;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}[id^=NotiflixConfirmWrap].with-animation.nx-fade.remove>div[class*="-content"]{opacity:0;-webkit-animation:confirm-animation-fade-remove .3s ease-in-out 0s normal;animation:confirm-animation-fade-remove .3s ease-in-out 0s normal}@-webkit-keyframes confirm-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@keyframes confirm-animation-fade-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixConfirmWrap].with-animation.nx-zoom.remove>div[class*="-content"]{opacity:0;-webkit-animation:confirm-animation-zoom-remove .3s ease-in-out 0s normal;animation:confirm-animation-zoom-remove .3s ease-in-out 0s normal}@-webkit-keyframes confirm-animation-zoom-remove{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:.5;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:0;-webkit-transform:scale(0);transform:scale(0)}}@keyframes confirm-animation-zoom-remove{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:.5;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:0;-webkit-transform:scale(0);transform:scale(0)}}[id^=NotiflixLoadingWrap]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:fixed;z-index:4000;width:100%;height:100%;left:0;top:0;right:0;bottom:0;margin:auto;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;background:rgba(0,0,0,.8);font-family:"Quicksand",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}[id^=NotiflixLoadingWrap] *{-webkit-box-sizing:border-box;box-sizing:border-box}[id^=NotiflixLoadingWrap].click-to-close{cursor:pointer}[id^=NotiflixLoadingWrap]>div[class*="-icon"]{width:60px;height:60px;position:relative;-webkit-transition:top .2s ease-in-out;-o-transition:top .2s ease-in-out;transition:top .2s ease-in-out;margin:0 auto}[id^=NotiflixLoadingWrap]>div[class*="-icon"] img,[id^=NotiflixLoadingWrap]>div[class*="-icon"] svg{max-width:unset;max-height:unset;width:100%;height:100%;position:absolute;left:0;top:0}[id^=NotiflixLoadingWrap]>p{position:relative;margin:10px auto 0;font-family:inherit!important;font-weight:normal;font-size:15px;line-height:1.4;padding:0 10px;width:100%;text-align:center}[id^=NotiflixLoadingWrap].with-animation{-webkit-animation:loading-animation-fade .3s ease-in-out 0s normal;animation:loading-animation-fade .3s ease-in-out 0s normal}@-webkit-keyframes loading-animation-fade{0%{opacity:0}100%{opacity:1}}@keyframes loading-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixLoadingWrap].with-animation.remove{opacity:0;-webkit-animation:loading-animation-fade-remove .3s ease-in-out 0s normal;animation:loading-animation-fade-remove .3s ease-in-out 0s normal}@-webkit-keyframes loading-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@keyframes loading-animation-fade-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixLoadingWrap]>p.new{-webkit-animation:loading-new-message-fade .3s ease-in-out 0s normal;animation:loading-new-message-fade .3s ease-in-out 0s normal}@-webkit-keyframes loading-new-message-fade{0%{opacity:0}100%{opacity:1}}@keyframes loading-new-message-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixBlockWrap]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;z-index:1000;font-family:"Quicksand",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;background:rgba(255,255,255,.9);text-align:center;animation-duration:.4s;width:100%;height:100%;left:0;top:0;border-radius:inherit;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}[id^=NotiflixBlockWrap] *{-webkit-box-sizing:border-box;box-sizing:border-box}[id^=NotiflixBlockWrap]>span[class*="-icon"]{display:block;width:45px;height:45px;position:relative;margin:0 auto}[id^=NotiflixBlockWrap]>span[class*="-icon"] svg{width:inherit;height:inherit}[id^=NotiflixBlockWrap]>span[class*="-message"]{position:relative;display:block;width:100%;margin:10px auto 0;padding:0 10px;font-family:inherit!important;font-weight:normal;font-size:14px;line-height:1.4}[id^=NotiflixBlockWrap].with-animation{-webkit-animation:block-animation-fade .3s ease-in-out 0s normal;animation:block-animation-fade .3s ease-in-out 0s normal}@-webkit-keyframes block-animation-fade{0%{opacity:0}100%{opacity:1}}@keyframes block-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixBlockWrap].with-animation.remove{opacity:0;-webkit-animation:block-animation-fade-remove .3s ease-in-out 0s normal;animation:block-animation-fade-remove .3s ease-in-out 0s normal}@-webkit-keyframes block-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@keyframes block-animation-fade-remove{0%{opacity:1}100%{opacity:0}}
|
1 |
+
/* Notiflix (https://notiflix.github.io) - Version: 3.2.5 - Author: Furkan MT (https://github.com/furcan) - Copyright 2019 - 2022 Notiflix, MIT Licence (https://opensource.org/licenses/MIT) */
|
2 |
|
3 |
+
[id^=NotiflixNotifyWrap]{pointer-events:none;position:fixed;z-index:4001;opacity:1;right:10px;top:10px;width:280px;max-width:96%;-webkit-box-sizing:border-box;box-sizing:border-box;background:transparent}[id^=NotiflixNotifyWrap].nx-flex-center-center{max-height:calc(100vh - 20px);overflow-x:hidden;overflow-y:auto;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;margin:auto}[id^=NotiflixNotifyWrap]::-webkit-scrollbar{width:0;height:0}[id^=NotiflixNotifyWrap]::-webkit-scrollbar-thumb{background:transparent}[id^=NotiflixNotifyWrap]::-webkit-scrollbar-track{background:transparent}[id^=NotiflixNotifyWrap] *{-webkit-box-sizing:border-box;box-sizing:border-box}[id^=NotiflixNotifyOverlay]{-webkit-transition:background .3s ease-in-out;-o-transition:background .3s ease-in-out;transition:background .3s ease-in-out}[id^=NotiflixNotifyWrap]>div{pointer-events:all;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:"Quicksand",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;width:100%;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;position:relative;margin:0 0 10px;border-radius:5px;background:#1e1e1e;color:#fff;padding:10px 12px;font-size:14px;line-height:1.4}[id^=NotiflixNotifyWrap]>div:last-child{margin:0}[id^=NotiflixNotifyWrap]>div.nx-with-callback{cursor:pointer}[id^=NotiflixNotifyWrap]>div.nx-with-icon{padding:8px;min-height:56px}[id^=NotiflixNotifyWrap]>div.nx-paused{cursor:auto}[id^=NotiflixNotifyWrap]>div.nx-notify-click-to-close{cursor:pointer}[id^=NotiflixNotifyWrap]>div.nx-with-close-button{padding:10px 36px 10px 12px}[id^=NotiflixNotifyWrap]>div.nx-with-icon.nx-with-close-button{padding:6px 36px 6px 6px}[id^=NotiflixNotifyWrap]>div>span.nx-message{cursor:inherit;font-weight:normal;font-family:inherit!important;word-break:break-all;word-break:break-word}[id^=NotiflixNotifyWrap]>div>span.nx-close-button{cursor:pointer;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;position:absolute;right:8px;top:0;bottom:0;margin:auto;color:inherit;width:20px;height:20px}[id^=NotiflixNotifyWrap]>div>span.nx-close-button:hover{-webkit-transform:rotate(90deg);transform:rotate(90deg)}[id^=NotiflixNotifyWrap]>div>span.nx-close-button>svg{position:absolute;width:16px;height:16px;right:2px;top:2px}[id^=NotiflixNotifyWrap]>div>.nx-message-icon{position:absolute;width:40px;height:40px;font-size:30px;line-height:40px;text-align:center;left:8px;top:0;bottom:0;margin:auto;border-radius:inherit}[id^=NotiflixNotifyWrap]>div>.nx-message-icon-fa.nx-message-icon-fa-shadow{color:inherit;background:rgba(0,0,0,.15);-webkit-box-shadow:inset 0 0 34px rgba(0,0,0,.2);box-shadow:inset 0 0 34px rgba(0,0,0,.2);text-shadow:0 0 10px rgba(0,0,0,.3)}[id^=NotiflixNotifyWrap]>div>span.nx-with-icon{position:relative;float:left;width:calc(100% - 40px);margin:0 0 0 40px;padding:0 0 0 10px;-webkit-box-sizing:border-box;box-sizing:border-box}[id^=NotiflixNotifyWrap]>div.nx-rtl-on>.nx-message-icon{left:auto;right:8px}[id^=NotiflixNotifyWrap]>div.nx-rtl-on>span.nx-with-icon{padding:0 10px 0 0;margin:0 40px 0 0}[id^=NotiflixNotifyWrap]>div.nx-rtl-on>span.nx-close-button{right:auto;left:8px}[id^=NotiflixNotifyWrap]>div.nx-with-icon.nx-with-close-button.nx-rtl-on{padding:6px 6px 6px 36px}[id^=NotiflixNotifyWrap]>div.nx-with-close-button.nx-rtl-on{padding:10px 12px 10px 36px}[id^=NotiflixNotifyOverlay].nx-with-animation,[id^=NotiflixNotifyWrap]>div.nx-with-animation.nx-fade{-webkit-animation:notify-animation-fade .3s ease-in-out 0s normal;animation:notify-animation-fade .3s ease-in-out 0s normal}@-webkit-keyframes notify-animation-fade{0%{opacity:0}100%{opacity:1}}@keyframes notify-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixNotifyWrap]>div.nx-with-animation.nx-zoom{-webkit-animation:notify-animation-zoom .3s ease-in-out 0s normal;animation:notify-animation-zoom .3s ease-in-out 0s normal}@-webkit-keyframes notify-animation-zoom{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.05);transform:scale(1.05)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes notify-animation-zoom{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.05);transform:scale(1.05)}100%{-webkit-transform:scale(1);transform:scale(1)}}[id^=NotiflixNotifyWrap]>div.nx-with-animation.nx-from-right{-webkit-animation:notify-animation-from-right .3s ease-in-out 0s normal;animation:notify-animation-from-right .3s ease-in-out 0s normal}@-webkit-keyframes notify-animation-from-right{0%{right:-300px;opacity:0}50%{right:8px;opacity:1}100%{right:0;opacity:1}}@keyframes notify-animation-from-right{0%{right:-300px;opacity:0}50%{right:8px;opacity:1}100%{right:0;opacity:1}}[id^=NotiflixNotifyWrap]>div.nx-with-animation.nx-from-left{-webkit-animation:notify-animation-from-left .3s ease-in-out 0s normal;animation:notify-animation-from-left .3s ease-in-out 0s normal}@-webkit-keyframes notify-animation-from-left{0%{left:-300px;opacity:0}50%{left:8px;opacity:1}100%{left:0;opacity:1}}@keyframes notify-animation-from-left{0%{left:-300px;opacity:0}50%{left:8px;opacity:1}100%{left:0;opacity:1}}[id^=NotiflixNotifyWrap]>div.nx-with-animation.nx-from-top{-webkit-animation:notify-animation-from-top .3s ease-in-out 0s normal;animation:notify-animation-from-top .3s ease-in-out 0s normal}@-webkit-keyframes notify-animation-from-top{0%{top:-50px;opacity:0}50%{top:8px;opacity:1}100%{top:0;opacity:1}}@keyframes notify-animation-from-top{0%{top:-50px;opacity:0}50%{top:8px;opacity:1}100%{top:0;opacity:1}}[id^=NotiflixNotifyWrap]>div.nx-with-animation.nx-from-bottom{-webkit-animation:notify-animation-from-bottom .3s ease-in-out 0s normal;animation:notify-animation-from-bottom .3s ease-in-out 0s normal}@-webkit-keyframes notify-animation-from-bottom{0%{bottom:-50px;opacity:0}50%{bottom:8px;opacity:1}100%{bottom:0;opacity:1}}@keyframes notify-animation-from-bottom{0%{bottom:-50px;opacity:0}50%{bottom:8px;opacity:1}100%{bottom:0;opacity:1}}[id^=NotiflixNotifyOverlay].nx-with-animation.nx-remove,[id^=NotiflixNotifyWrap]>div.nx-with-animation.nx-fade.nx-remove{opacity:0;-webkit-animation:notify-remove-fade .3s ease-in-out 0s normal;animation:notify-remove-fade .3s ease-in-out 0s normal}@-webkit-keyframes notify-remove-fade{0%{opacity:1}100%{opacity:0}}@keyframes notify-remove-fade{0%{opacity:1}100%{opacity:0}}[id^=NotiflixNotifyWrap]>div.nx-with-animation.nx-zoom.nx-remove{-webkit-transform:scale(0);transform:scale(0);-webkit-animation:notify-remove-zoom .3s ease-in-out 0s normal;animation:notify-remove-zoom .3s ease-in-out 0s normal}@-webkit-keyframes notify-remove-zoom{0%{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.05);transform:scale(1.05)}100%{-webkit-transform:scale(0);transform:scale(0)}}@keyframes notify-remove-zoom{0%{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.05);transform:scale(1.05)}100%{-webkit-transform:scale(0);transform:scale(0)}}[id^=NotiflixNotifyWrap]>div.nx-with-animation.nx-from-top.nx-remove{opacity:0;-webkit-animation:notify-remove-to-top .3s ease-in-out 0s normal;animation:notify-remove-to-top .3s ease-in-out 0s normal}@-webkit-keyframes notify-remove-to-top{0%{top:0;opacity:1}50%{top:8px;opacity:1}100%{top:-50px;opacity:0}}@keyframes notify-remove-to-top{0%{top:0;opacity:1}50%{top:8px;opacity:1}100%{top:-50px;opacity:0}}[id^=NotiflixNotifyWrap]>div.nx-with-animation.nx-from-right.nx-remove{opacity:0;-webkit-animation:notify-remove-to-right .3s ease-in-out 0s normal;animation:notify-remove-to-right .3s ease-in-out 0s normal}@-webkit-keyframes notify-remove-to-right{0%{right:0;opacity:1}50%{right:8px;opacity:1}100%{right:-300px;opacity:0}}@keyframes notify-remove-to-right{0%{right:0;opacity:1}50%{right:8px;opacity:1}100%{right:-300px;opacity:0}}[id^=NotiflixNotifyWrap]>div.nx-with-animation.nx-from-bottom.nx-remove{opacity:0;-webkit-animation:notify-remove-to-bottom .3s ease-in-out 0s normal;animation:notify-remove-to-bottom .3s ease-in-out 0s normal}@-webkit-keyframes notify-remove-to-bottom{0%{bottom:0;opacity:1}50%{bottom:8px;opacity:1}100%{bottom:-50px;opacity:0}}@keyframes notify-remove-to-bottom{0%{bottom:0;opacity:1}50%{bottom:8px;opacity:1}100%{bottom:-50px;opacity:0}}[id^=NotiflixNotifyWrap]>div.nx-with-animation.nx-from-left.nx-remove{opacity:0;-webkit-animation:notify-remove-to-left .3s ease-in-out 0s normal;animation:notify-remove-to-left .3s ease-in-out 0s normal}@-webkit-keyframes notify-remove-to-left{0%{left:0;opacity:1}50%{left:8px;opacity:1}100%{left:-300px;opacity:0}}@keyframes notify-remove-to-left{0%{left:0;opacity:1}50%{left:8px;opacity:1}100%{left:-300px;opacity:0}}[id^=NotiflixReportWrap]{position:fixed;z-index:4002;width:100%;height:100%;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Quicksand",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;left:0;top:0;padding:10px;color:#1e1e1e;border-radius:25px;background:transparent;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}[id^=NotiflixReportWrap] *{-webkit-box-sizing:border-box;box-sizing:border-box}[id^=NotiflixReportWrap]>div[class*="-overlay"]{width:100%;height:100%;left:0;top:0;background:rgba(255,255,255,.5);position:fixed;z-index:0}[id^=NotiflixReportWrap]>div.nx-report-click-to-close{cursor:pointer}[id^=NotiflixReportWrap]>div[class*="-content"]{width:320px;max-width:100%;max-height:96vh;overflow-x:hidden;overflow-y:auto;border-radius:inherit;padding:10px;-webkit-filter:drop-shadow(0 0 5px rgba(0,0,0,0.05));filter:drop-shadow(0 0 5px rgba(0, 0, 0, .05));border:1px solid rgba(0,0,0,.03);background:#f8f8f8;position:relative;z-index:1}[id^=NotiflixReportWrap]>div[class*="-content"]::-webkit-scrollbar{width:0;height:0}[id^=NotiflixReportWrap]>div[class*="-content"]::-webkit-scrollbar-thumb{background:transparent}[id^=NotiflixReportWrap]>div[class*="-content"]::-webkit-scrollbar-track{background:transparent}[id^=NotiflixReportWrap]>div[class*="-content"]>div[class$="-icon"]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:110px;height:110px;display:block;margin:6px auto 12px}[id^=NotiflixReportWrap]>div[class*="-content"]>div[class$="-icon"] svg{min-width:100%;max-width:100%;height:auto}[id^=NotiflixReportWrap]>*>h5{word-break:break-all;word-break:break-word;font-family:inherit!important;font-size:16px;font-weight:500;line-height:1.4;margin:0 0 10px;padding:0 0 10px;border-bottom:1px solid rgba(0,0,0,.1);float:left;width:100%;text-align:center}[id^=NotiflixReportWrap]>*>p{word-break:break-all;word-break:break-word;font-family:inherit!important;font-size:13px;line-height:1.4;font-weight:normal;float:left;width:100%;padding:0 10px;margin:0 0 10px}[id^=NotiflixReportWrap] a#NXReportButton{word-break:break-all;word-break:break-word;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:inherit!important;-webkit-transition:all .25s ease-in-out;-o-transition:all .25s ease-in-out;transition:all .25s ease-in-out;cursor:pointer;float:right;padding:7px 17px;background:#32c682;font-size:14px;line-height:1.4;font-weight:500;border-radius:inherit!important;color:#fff}[id^=NotiflixReportWrap] a#NXReportButton:hover{-webkit-box-shadow:inset 0 -60px 5px -5px rgba(0,0,0,.25);box-shadow:inset 0 -60px 5px -5px rgba(0,0,0,.25)}[id^=NotiflixReportWrap].nx-rtl-on a#NXReportButton{float:left}[id^=NotiflixReportWrap]>div[class*="-overlay"].nx-with-animation{-webkit-animation:report-overlay-animation .3s ease-in-out 0s normal;animation:report-overlay-animation .3s ease-in-out 0s normal}@-webkit-keyframes report-overlay-animation{0%{opacity:0}100%{opacity:1}}@keyframes report-overlay-animation{0%{opacity:0}100%{opacity:1}}[id^=NotiflixReportWrap]>div[class*="-content"].nx-with-animation.nx-fade{-webkit-animation:report-animation-fade .3s ease-in-out 0s normal;animation:report-animation-fade .3s ease-in-out 0s normal}@-webkit-keyframes report-animation-fade{0%{opacity:0}100%{opacity:1}}@keyframes report-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixReportWrap]>div[class*="-content"].nx-with-animation.nx-zoom{-webkit-animation:report-animation-zoom .3s ease-in-out 0s normal;animation:report-animation-zoom .3s ease-in-out 0s normal}@-webkit-keyframes report-animation-zoom{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}50%{opacity:1;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes report-animation-zoom{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}50%{opacity:1;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}[id^=NotiflixReportWrap].nx-remove>div[class*="-overlay"].nx-with-animation{opacity:0;-webkit-animation:report-overlay-animation-remove .3s ease-in-out 0s normal;animation:report-overlay-animation-remove .3s ease-in-out 0s normal}@-webkit-keyframes report-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}@keyframes report-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixReportWrap].nx-remove>div[class*="-content"].nx-with-animation.nx-fade{opacity:0;-webkit-animation:report-animation-fade-remove .3s ease-in-out 0s normal;animation:report-animation-fade-remove .3s ease-in-out 0s normal}@-webkit-keyframes report-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@keyframes report-animation-fade-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixReportWrap].nx-remove>div[class*="-content"].nx-with-animation.nx-zoom{opacity:0;-webkit-animation:report-animation-zoom-remove .3s ease-in-out 0s normal;animation:report-animation-zoom-remove .3s ease-in-out 0s normal}@-webkit-keyframes report-animation-zoom-remove{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:.5;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:0;-webkit-transform:scale(0);transform:scale(0)}}@keyframes report-animation-zoom-remove{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:.5;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:0;-webkit-transform:scale(0);transform:scale(0)}}[id^=NotiflixConfirmWrap]{position:fixed;z-index:4003;width:100%;height:100%;left:0;top:0;padding:10px;-webkit-box-sizing:border-box;box-sizing:border-box;background:transparent;font-family:"Quicksand",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}[id^=NotiflixConfirmWrap].nx-position-center-top{-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}[id^=NotiflixConfirmWrap].nx-position-center-bottom{-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}[id^=NotiflixConfirmWrap].nx-position-left-top{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}[id^=NotiflixConfirmWrap].nx-position-left-center{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}[id^=NotiflixConfirmWrap].nx-position-left-bottom{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}[id^=NotiflixConfirmWrap].nx-position-right-top{-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}[id^=NotiflixConfirmWrap].nx-position-right-center{-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end}[id^=NotiflixConfirmWrap].nx-position-right-bottom{-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}[id^=NotiflixConfirmWrap] *{-webkit-box-sizing:border-box;box-sizing:border-box}[id^=NotiflixConfirmWrap]>div[class*="-overlay"]{width:100%;height:100%;left:0;top:0;background:rgba(255,255,255,.5);position:fixed;z-index:0}[id^=NotiflixConfirmWrap]>div[class*="-overlay"].nx-with-animation{-webkit-animation:confirm-overlay-animation .3s ease-in-out 0s normal;animation:confirm-overlay-animation .3s ease-in-out 0s normal}@-webkit-keyframes confirm-overlay-animation{0%{opacity:0}100%{opacity:1}}@keyframes confirm-overlay-animation{0%{opacity:0}100%{opacity:1}}[id^=NotiflixConfirmWrap].nx-remove>div[class*="-overlay"].nx-with-animation{opacity:0;-webkit-animation:confirm-overlay-animation-remove .3s ease-in-out 0s normal;animation:confirm-overlay-animation-remove .3s ease-in-out 0s normal}@-webkit-keyframes confirm-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}@keyframes confirm-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixConfirmWrap]>div[class*="-content"]{width:300px;max-width:100%;max-height:96vh;overflow-x:hidden;overflow-y:auto;border-radius:25px;padding:10px;margin:0;-webkit-filter:drop-shadow(0 0 5px rgba(0,0,0,0.05));filter:drop-shadow(0 0 5px rgba(0, 0, 0, .05));background:#f8f8f8;color:#1e1e1e;position:relative;z-index:1;text-align:center}[id^=NotiflixConfirmWrap]>div[class*="-content"]::-webkit-scrollbar{width:0;height:0}[id^=NotiflixConfirmWrap]>div[class*="-content"]::-webkit-scrollbar-thumb{background:transparent}[id^=NotiflixConfirmWrap]>div[class*="-content"]::-webkit-scrollbar-track{background:transparent}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]{float:left;width:100%;text-align:inherit}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>h5{float:left;width:100%;margin:0;padding:0 0 10px;border-bottom:1px solid rgba(0,0,0,.1);color:#32c682;font-family:inherit!important;font-size:16px;line-height:1.4;font-weight:500;text-align:inherit}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>div{font-family:inherit!important;margin:15px 0 20px;padding:0 10px;float:left;width:100%;font-size:14px;line-height:1.4;font-weight:normal;color:inherit;text-align:inherit}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>div>div{font-family:inherit!important;float:left;width:100%;margin:15px 0 0;padding:0}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>div>div>input{font-family:inherit!important;float:left;width:100%;height:40px;margin:0;padding:0 15px;border:1px solid rgba(0,0,0,.1);border-radius:25px;font-size:14px;font-weight:normal;line-height:1;-webkit-transition:all .25s ease-in-out;-o-transition:all .25s ease-in-out;transition:all .25s ease-in-out;text-align:left}[id^=NotiflixConfirmWrap].nx-rtl-on>div[class*="-content"]>div[class*="-head"]>div>div>input{text-align:right}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>div>div>input:hover{border-color:rgba(0,0,0,.1)}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>div>div>input:focus{border-color:rgba(0,0,0,.3)}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>div>div>input.nx-validation-failure{border-color:#ff5549}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>div>div>input.nx-validation-success{border-color:#32c682}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-buttons"]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:inherit;float:left;width:100%;text-align:inherit}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-buttons"]>a{cursor:pointer;font-family:inherit!important;-webkit-transition:all .25s ease-in-out;-o-transition:all .25s ease-in-out;transition:all .25s ease-in-out;float:left;width:48%;padding:9px 5px;border-radius:inherit!important;font-weight:500;font-size:15px;line-height:1.4;color:#f8f8f8;text-align:inherit}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-buttons"]>a.nx-confirm-button-ok{margin:0 2% 0 0;background:#32c682}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-buttons"]>a.nx-confirm-button-cancel{margin:0 0 0 2%;background:#a9a9a9}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-buttons"]>a.nx-full{margin:0;width:100%}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-buttons"]>a:hover{-webkit-box-shadow:inset 0 -60px 5px -5px rgba(0,0,0,.25);box-shadow:inset 0 -60px 5px -5px rgba(0,0,0,.25)}[id^=NotiflixConfirmWrap].nx-rtl-on>div[class*="-content"]>div[class*="-buttons"],[id^=NotiflixConfirmWrap].nx-rtl-on>div[class*="-content"]>div[class*="-buttons"]>a{-webkit-transform:rotateY(180deg);transform:rotateY(180deg)}[id^=NotiflixConfirmWrap].nx-with-animation.nx-fade>div[class*="-content"]{-webkit-animation:confirm-animation-fade .3s ease-in-out 0s normal;animation:confirm-animation-fade .3s ease-in-out 0s normal}@-webkit-keyframes confirm-animation-fade{0%{opacity:0}100%{opacity:1}}@keyframes confirm-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixConfirmWrap].nx-with-animation.nx-zoom>div[class*="-content"]{-webkit-animation:confirm-animation-zoom .3s ease-in-out 0s normal;animation:confirm-animation-zoom .3s ease-in-out 0s normal}@-webkit-keyframes confirm-animation-zoom{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}50%{opacity:1;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes confirm-animation-zoom{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}50%{opacity:1;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}[id^=NotiflixConfirmWrap].nx-with-animation.nx-fade.nx-remove>div[class*="-content"]{opacity:0;-webkit-animation:confirm-animation-fade-remove .3s ease-in-out 0s normal;animation:confirm-animation-fade-remove .3s ease-in-out 0s normal}@-webkit-keyframes confirm-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@keyframes confirm-animation-fade-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixConfirmWrap].nx-with-animation.nx-zoom.nx-remove>div[class*="-content"]{opacity:0;-webkit-animation:confirm-animation-zoom-remove .3s ease-in-out 0s normal;animation:confirm-animation-zoom-remove .3s ease-in-out 0s normal}@-webkit-keyframes confirm-animation-zoom-remove{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:.5;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:0;-webkit-transform:scale(0);transform:scale(0)}}@keyframes confirm-animation-zoom-remove{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:.5;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:0;-webkit-transform:scale(0);transform:scale(0)}}[id^=NotiflixLoadingWrap]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:fixed;z-index:4000;width:100%;height:100%;left:0;top:0;right:0;bottom:0;margin:auto;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;background:rgba(0,0,0,.8);font-family:"Quicksand",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}[id^=NotiflixLoadingWrap] *{-webkit-box-sizing:border-box;box-sizing:border-box}[id^=NotiflixLoadingWrap].nx-loading-click-to-close{cursor:pointer}[id^=NotiflixLoadingWrap]>div[class*="-icon"]{width:60px;height:60px;position:relative;-webkit-transition:top .2s ease-in-out;-o-transition:top .2s ease-in-out;transition:top .2s ease-in-out;margin:0 auto}[id^=NotiflixLoadingWrap]>div[class*="-icon"] img,[id^=NotiflixLoadingWrap]>div[class*="-icon"] svg{max-width:unset;max-height:unset;width:100%;height:auto;position:absolute;left:0;top:0}[id^=NotiflixLoadingWrap]>p{position:relative;margin:10px auto 0;font-family:inherit!important;font-weight:normal;font-size:15px;line-height:1.4;padding:0 10px;width:100%;text-align:center}[id^=NotiflixLoadingWrap].nx-with-animation{-webkit-animation:loading-animation-fade .3s ease-in-out 0s normal;animation:loading-animation-fade .3s ease-in-out 0s normal}@-webkit-keyframes loading-animation-fade{0%{opacity:0}100%{opacity:1}}@keyframes loading-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixLoadingWrap].nx-with-animation.nx-remove{opacity:0;-webkit-animation:loading-animation-fade-remove .3s ease-in-out 0s normal;animation:loading-animation-fade-remove .3s ease-in-out 0s normal}@-webkit-keyframes loading-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@keyframes loading-animation-fade-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixLoadingWrap]>p.nx-loading-message-new{-webkit-animation:loading-new-message-fade .3s ease-in-out 0s normal;animation:loading-new-message-fade .3s ease-in-out 0s normal}@-webkit-keyframes loading-new-message-fade{0%{opacity:0}100%{opacity:1}}@keyframes loading-new-message-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixBlockWrap]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;z-index:1000;font-family:"Quicksand",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;background:rgba(255,255,255,.9);text-align:center;animation-duration:.4s;width:100%;height:100%;left:0;top:0;border-radius:inherit;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}[id^=NotiflixBlockWrap] *{-webkit-box-sizing:border-box;box-sizing:border-box}[id^=NotiflixBlockWrap]>span[class*="-icon"]{display:block;width:45px;height:45px;position:relative;margin:0 auto}[id^=NotiflixBlockWrap]>span[class*="-icon"] svg{width:inherit;height:inherit}[id^=NotiflixBlockWrap]>span[class*="-message"]{position:relative;display:block;width:100%;margin:10px auto 0;padding:0 10px;font-family:inherit!important;font-weight:normal;font-size:14px;line-height:1.4}[id^=NotiflixBlockWrap].nx-with-animation{-webkit-animation:block-animation-fade .3s ease-in-out 0s normal;animation:block-animation-fade .3s ease-in-out 0s normal}@-webkit-keyframes block-animation-fade{0%{opacity:0}100%{opacity:1}}@keyframes block-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixBlockWrap].nx-with-animation.nx-remove{opacity:0;-webkit-animation:block-animation-fade-remove .3s ease-in-out 0s normal;animation:block-animation-fade-remove .3s ease-in-out 0s normal}@-webkit-keyframes block-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@keyframes block-animation-fade-remove{0%{opacity:1}100%{opacity:0}}
|
assets/js/notiflix/notiflix.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(t,e){"function"==typeof define&&define.amd?define([],(function(){return e(t)})):"object"==typeof module&&"object"==typeof module.exports?module.exports=e(t):t.Notiflix=e(t)}("undefined"==typeof global?"undefined"==typeof window?this:window:global,(function(t){"use strict";if(void 0===t&&void 0===t.document)return!1;var e,n,a,i,o,r="\n\nVisit documentation page to learn more: https://www.notiflix.com/documentation",s='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',l={wrapID:"NotiflixNotifyWrap",width:"280px",position:"right-top",distance:"10px",opacity:1,borderRadius:"5px",rtl:!1,timeout:3e3,messageMaxLength:110,backOverlay:!1,backOverlayColor:"rgba(0,0,0,0.5)",plainText:!0,showOnlyTheLastOne:!1,clickToClose:!1,pauseOnHover:!0,ID:"NotiflixNotify",className:"notiflix-notify",zindex:4001,useGoogleFont:!1,fontFamily:"Quicksand",fontSize:"13px",cssAnimation:!0,cssAnimationDuration:400,cssAnimationStyle:"fade",closeButton:!1,useIcon:!0,useFontAwesome:!1,fontAwesomeIconStyle:"basic",fontAwesomeIconSize:"34px",success:{background:"#32c682",textColor:"#fff",childClassName:"success",notiflixIconColor:"rgba(0,0,0,0.2)",fontAwesomeClassName:"fas fa-check-circle",fontAwesomeIconColor:"rgba(0,0,0,0.2)",backOverlayColor:"rgba(50,198,130,0.2)"},failure:{background:"#ff5549",textColor:"#fff",childClassName:"failure",notiflixIconColor:"rgba(0,0,0,0.2)",fontAwesomeClassName:"fas fa-times-circle",fontAwesomeIconColor:"rgba(0,0,0,0.2)",backOverlayColor:"rgba(255,85,73,0.2)"},warning:{background:"#eebf31",textColor:"#fff",childClassName:"warning",notiflixIconColor:"rgba(0,0,0,0.2)",fontAwesomeClassName:"fas fa-exclamation-circle",fontAwesomeIconColor:"rgba(0,0,0,0.2)",backOverlayColor:"rgba(238,191,49,0.2)"},info:{background:"#26c0d3",textColor:"#fff",childClassName:"info",notiflixIconColor:"rgba(0,0,0,0.2)",fontAwesomeClassName:"fas fa-info-circle",fontAwesomeIconColor:"rgba(0,0,0,0.2)",backOverlayColor:"rgba(38,192,211,0.2)"}},c={ID:"NotiflixReportWrap",className:"notiflix-report",width:"320px",backgroundColor:"#f8f8f8",borderRadius:"25px",rtl:!1,zindex:4002,backOverlay:!0,backOverlayColor:"rgba(0,0,0,0.5)",useGoogleFont:!1,fontFamily:"Quicksand",svgSize:"110px",plainText:!0,titleFontSize:"16px",titleMaxLength:34,messageFontSize:"13px",messageMaxLength:400,buttonFontSize:"14px",buttonMaxLength:34,cssAnimation:!0,cssAnimationDuration:360,cssAnimationStyle:"fade",success:{svgColor:"#32c682",titleColor:"#1e1e1e",messageColor:"#242424",buttonBackground:"#32c682",buttonColor:"#fff",backOverlayColor:"rgba(50,198,130,0.2)"},failure:{svgColor:"#ff5549",titleColor:"#1e1e1e",messageColor:"#242424",buttonBackground:"#ff5549",buttonColor:"#fff",backOverlayColor:"rgba(255,85,73,0.2)"},warning:{svgColor:"#eebf31",titleColor:"#1e1e1e",messageColor:"#242424",buttonBackground:"#eebf31",buttonColor:"#fff",backOverlayColor:"rgba(238,191,49,0.2)"},info:{svgColor:"#26c0d3",titleColor:"#1e1e1e",messageColor:"#242424",buttonBackground:"#26c0d3",buttonColor:"#fff",backOverlayColor:"rgba(38,192,211,0.2)"}},m={ID:"NotiflixConfirmWrap",className:"notiflix-confirm",width:"300px",zindex:4003,position:"center",distance:"10px",backgroundColor:"#f8f8f8",borderRadius:"25px",backOverlay:!0,backOverlayColor:"rgba(0,0,0,0.5)",rtl:!1,useGoogleFont:!1,fontFamily:"Quicksand",cssAnimation:!0,cssAnimationStyle:"fade",cssAnimationDuration:300,plainText:!0,titleColor:"#32c682",titleFontSize:"16px",titleMaxLength:34,messageColor:"#1e1e1e",messageFontSize:"14px",messageMaxLength:110,buttonsFontSize:"15px",buttonsMaxLength:34,okButtonColor:"#f8f8f8",okButtonBackground:"#32c682",cancelButtonColor:"#f8f8f8",cancelButtonBackground:"#a9a9a9"},p={ID:"NotiflixLoadingWrap",className:"notiflix-loading",zindex:4e3,backgroundColor:"rgba(0,0,0,0.8)",rtl:!1,useGoogleFont:!1,fontFamily:"Quicksand",cssAnimation:!0,cssAnimationDuration:400,clickToClose:!1,customSvgUrl:null,svgSize:"80px",svgColor:"#32c682",messageID:"NotiflixLoadingMessage",messageFontSize:"15px",messageMaxLength:34,messageColor:"#dcdcdc"},f={ID:"NotiflixBlockWrap",querySelectorLimit:200,className:"notiflix-block",position:"absolute",zindex:1e3,backgroundColor:"rgba(255,255,255,0.9)",rtl:!1,useGoogleFont:!1,fontFamily:"Quicksand",cssAnimation:!0,cssAnimationDuration:300,svgSize:"45px",svgColor:"#383838",messageFontSize:"14px",messageMaxLength:34,messageColor:"#383838"},u=function(t,e){return console.error("%c "+t+" ","padding:2px;border-radius:20px;color:#fff;background:#ff5549","\n"+e+r)},d=function(t,e){return console.log("%c "+t+" ","padding:2px;border-radius:20px;color:#fff;background:#26c0d3","\n"+e+r)},g=function(e){return e||(e="head"),null!==t.document[e]||(u("Notiflix",'\nNotiflix needs to be appended to the "<'+e+'>" element, but you called it before the "<'+e+'>" element has been created.'),!1)},x=function(){var t={},e=!1,n=0;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(e=arguments[0],n++);for(var a=function(n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=e&&"[object Object]"===Object.prototype.toString.call(n[a])?x(t[a],n[a]):n[a])};n<arguments.length;n++)a(arguments[n]);return t},y=function(e){var n=t.document.createElement("div");return n.innerHTML=e,n.textContent||n.innerText||""},b=function(e,n){if(!t.document.getElementById("NotiflixQuicksand")&&e&&"string"==typeof n&&"quicksand"===n.toLocaleLowerCase("en")){if(!g("head"))return!1;var a=t.document.createRange();a.selectNode(t.document.head);var i=a.createContextualFragment('<link id="NotiflixGoogleDNS" rel="dns-prefetch" href="//fonts.googleapis.com" />');t.document.head.appendChild(i);var o=t.document.createRange();o.selectNode(t.document.head);var r=o.createContextualFragment('<link id="NotiflixQuicksand" href="https://fonts.googleapis.com/css?family=Quicksand:300,400,500,700&subset=latin-ext" rel="stylesheet" />');t.document.head.appendChild(r)}},h=function(t,e){return t||(t="60px"),e||(e="#32c682"),'<svg xmlns="http://www.w3.org/2000/svg" stroke="'+e+'" width="'+t+'" height="'+t+'" transform="scale(.8)" viewBox="0 0 38 38"><g fill="none" fill-rule="evenodd" stroke-width="2" transform="translate(1 1)"><circle cx="18" cy="18" r="18" stroke-opacity=".25"/><path d="M36 18c0-9.94-8.06-18-18-18"><animateTransform attributeName="transform" dur="1s" from="0 18 18" repeatCount="indefinite" to="360 18 18" type="rotate"/></path></g></svg>'},v=function(t,e){return t||(t="60px"),e||(e="#32c682"),'<svg xmlns="http://www.w3.org/2000/svg" id="NXLoadingHourglass" fill="'+e+'" width="'+t+'" height="'+t+'" fill-rule="evenodd" clip-rule="evenodd" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" version="1.1" viewBox="0 0 200 200" xml:space="preserve"><style>@-webkit-keyframes NXhourglass5-animation{0%{-webkit-transform:scale(1,1);transform:scale(1,1)}16.67%{-webkit-transform:scale(1,.8);transform:scale(1,.8)}33.33%{-webkit-transform:scale(.88,.6);transform:scale(.88,.6)}37.5%{-webkit-transform:scale(.85,.55);transform:scale(.85,.55)}41.67%{-webkit-transform:scale(.8,.5);transform:scale(.8,.5)}45.83%{-webkit-transform:scale(.75,.45);transform:scale(.75,.45)}50%{-webkit-transform:scale(.7,.4);transform:scale(.7,.4)}54.17%{-webkit-transform:scale(.6,.35);transform:scale(.6,.35)}58.33%{-webkit-transform:scale(.5,.3);transform:scale(.5,.3)}83.33%,to{-webkit-transform:scale(.2,0);transform:scale(.2,0)}}@keyframes NXhourglass5-animation{0%{-webkit-transform:scale(1,1);transform:scale(1,1)}16.67%{-webkit-transform:scale(1,.8);transform:scale(1,.8)}33.33%{-webkit-transform:scale(.88,.6);transform:scale(.88,.6)}37.5%{-webkit-transform:scale(.85,.55);transform:scale(.85,.55)}41.67%{-webkit-transform:scale(.8,.5);transform:scale(.8,.5)}45.83%{-webkit-transform:scale(.75,.45);transform:scale(.75,.45)}50%{-webkit-transform:scale(.7,.4);transform:scale(.7,.4)}54.17%{-webkit-transform:scale(.6,.35);transform:scale(.6,.35)}58.33%{-webkit-transform:scale(.5,.3);transform:scale(.5,.3)}83.33%,to{-webkit-transform:scale(.2,0);transform:scale(.2,0)}}@-webkit-keyframes NXhourglass3-animation{0%{-webkit-transform:scale(1,.02);transform:scale(1,.02)}79.17%,to{-webkit-transform:scale(1,1);transform:scale(1,1)}}@keyframes NXhourglass3-animation{0%{-webkit-transform:scale(1,.02);transform:scale(1,.02)}79.17%,to{-webkit-transform:scale(1,1);transform:scale(1,1)}}@-webkit-keyframes NXhourglass1-animation{0%,83.33%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(180deg);transform:rotate(180deg)}}@keyframes NXhourglass1-animation{0%,83.33%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(180deg);transform:rotate(180deg)}}#NXLoadingHourglass *{-webkit-animation-duration:1.2s;animation-duration:1.2s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:cubic-bezier(0,0,1,1);animation-timing-function:cubic-bezier(0,0,1,1)}</style><g data-animator-group="true" data-animator-type="1" style="-webkit-animation-name:NXhourglass1-animation;animation-name:NXhourglass1-animation;-webkit-transform-origin:50% 50%;transform-origin:50% 50%;transform-box:fill-box"><g id="NXhourglass2" fill="inherit"><g data-animator-group="true" data-animator-type="2" style="-webkit-animation-name:NXhourglass3-animation;animation-name:NXhourglass3-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1);-webkit-transform-origin:50% 100%;transform-origin:50% 100%;transform-box:fill-box" opacity=".4"><path id="NXhourglass4" d="M100 100l-34.38 32.08v31.14h68.76v-31.14z"/></g><g data-animator-group="true" data-animator-type="2" style="-webkit-animation-name:NXhourglass5-animation;animation-name:NXhourglass5-animation;-webkit-transform-origin:50% 100%;transform-origin:50% 100%;transform-box:fill-box" opacity=".4"><path id="NXhourglass6" d="M100 100L65.62 67.92V36.78h68.76v31.14z"/></g><path d="M51.14 38.89h8.33v14.93c0 15.1 8.29 28.99 23.34 39.1 1.88 1.25 3.04 3.97 3.04 7.08s-1.16 5.83-3.04 7.09c-15.05 10.1-23.34 23.99-23.34 39.09v14.93h-8.33a4.859 4.859 0 1 0 0 9.72h97.72a4.859 4.859 0 1 0 0-9.72h-8.33v-14.93c0-15.1-8.29-28.99-23.34-39.09-1.88-1.26-3.04-3.98-3.04-7.09s1.16-5.83 3.04-7.08c15.05-10.11 23.34-24 23.34-39.1V38.89h8.33a4.859 4.859 0 1 0 0-9.72H51.14a4.859 4.859 0 1 0 0 9.72zm79.67 14.93c0 15.87-11.93 26.25-19.04 31.03-4.6 3.08-7.34 8.75-7.34 15.15 0 6.41 2.74 12.07 7.34 15.15 7.11 4.78 19.04 15.16 19.04 31.03v14.93H69.19v-14.93c0-15.87 11.93-26.25 19.04-31.02 4.6-3.09 7.34-8.75 7.34-15.16 0-6.4-2.74-12.07-7.34-15.15-7.11-4.78-19.04-15.16-19.04-31.03V38.89h61.62v14.93z"/></g></g></svg>'},k=function(t,e){return t||(t="60px"),e||(e="#32c682"),'<svg xmlns="http://www.w3.org/2000/svg" width="'+t+'" height="'+t+'" viewBox="25 25 50 50" style="-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite;height:'+t+";-webkit-transform-origin:center center;-ms-transform-origin:center center;transform-origin:center center;width:"+t+';position:absolute;top:0;left:0;margin:auto"><style>@-webkit-keyframes rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35}to{stroke-dasharray:89,200;stroke-dashoffset:-124}}@keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35}to{stroke-dasharray:89,200;stroke-dashoffset:-124}}</style><circle cx="50" cy="50" r="20" fill="none" stroke="'+e+'" stroke-width="2" style="-webkit-animation:dash 1.5s ease-in-out infinite,color 1.5s ease-in-out infinite;animation:dash 1.5s ease-in-out infinite,color 1.5s ease-in-out infinite" stroke-dasharray="150 200" stroke-dashoffset="-10" stroke-linecap="round"/></svg>'},w=function(t,e){return t||(t="60px"),e||(e="#32c682"),'<svg xmlns="http://www.w3.org/2000/svg" fill="'+e+'" width="'+t+'" height="'+t+'" viewBox="0 0 128 128"><g><path fill="inherit" d="M109.25 55.5h-36l12-12a29.54 29.54 0 0 0-49.53 12H18.75A46.04 46.04 0 0 1 96.9 31.84l12.35-12.34v36zm-90.5 17h36l-12 12a29.54 29.54 0 0 0 49.53-12h16.97A46.04 46.04 0 0 1 31.1 96.16L18.74 108.5v-36z"/><animateTransform attributeName="transform" dur="1.5s" from="0 64 64" repeatCount="indefinite" to="360 64 64" type="rotate"/></g></svg>'},N=function(t,e){return t||(t="60px"),e||(e="#32c682"),'<svg xmlns="http://www.w3.org/2000/svg" fill="'+e+'" width="'+t+'" height="'+t+'" preserveAspectRatio="xMidYMid" viewBox="0 0 100 100"><g transform="translate(25 50)"><circle r="9" fill="inherit" transform="scale(.239)"><animateTransform attributeName="transform" begin="-0.266s" calcMode="spline" dur="0.8s" keySplines="0.3 0 0.7 1;0.3 0 0.7 1" keyTimes="0;0.5;1" repeatCount="indefinite" type="scale" values="0;1;0"/></circle></g><g transform="translate(50 50)"><circle r="9" fill="inherit" transform="scale(.00152)"><animateTransform attributeName="transform" begin="-0.133s" calcMode="spline" dur="0.8s" keySplines="0.3 0 0.7 1;0.3 0 0.7 1" keyTimes="0;0.5;1" repeatCount="indefinite" type="scale" values="0;1;0"/></circle></g><g transform="translate(75 50)"><circle r="9" fill="inherit" transform="scale(.299)"><animateTransform attributeName="transform" begin="0s" calcMode="spline" dur="0.8s" keySplines="0.3 0 0.7 1;0.3 0 0.7 1" keyTimes="0;0.5;1" repeatCount="indefinite" type="scale" values="0;1;0"/></circle></g></svg>'},C=function(t,e){return t||(t="60px"),e||(e="#32c682"),'<svg xmlns="http://www.w3.org/2000/svg" stroke="'+e+'" width="'+t+'" height="'+t+'" viewBox="0 0 44 44"><g fill="none" fill-rule="evenodd" stroke-width="2"><circle cx="22" cy="22" r="1"><animate attributeName="r" begin="0s" calcMode="spline" dur="1.8s" keySplines="0.165, 0.84, 0.44, 1" keyTimes="0; 1" repeatCount="indefinite" values="1; 20"/><animate attributeName="stroke-opacity" begin="0s" calcMode="spline" dur="1.8s" keySplines="0.3, 0.61, 0.355, 1" keyTimes="0; 1" repeatCount="indefinite" values="1; 0"/></circle><circle cx="22" cy="22" r="1"><animate attributeName="r" begin="-0.9s" calcMode="spline" dur="1.8s" keySplines="0.165, 0.84, 0.44, 1" keyTimes="0; 1" repeatCount="indefinite" values="1; 20"/><animate attributeName="stroke-opacity" begin="-0.9s" calcMode="spline" dur="1.8s" keySplines="0.3, 0.61, 0.355, 1" keyTimes="0; 1" repeatCount="indefinite" values="1; 0"/></circle></g></svg>'},z=0,S=0,I=function(n,a,i,o){if(!g("body"))return!1;e||T.Notify.Init({});var r=x(!0,e,{});if("object"==typeof a&&!Array.isArray(a)||"object"==typeof i&&!Array.isArray(i)){var c={};"object"==typeof a?c=a:"object"==typeof i&&(c=i),e=x(!0,e,c)}var m=e[o.toLocaleLowerCase("en")];z++,"function"==typeof a&&S++,"string"!=typeof n&&(n="Notiflix "+o),e.plainText&&(n=y(n)),!e.plainText&&n.length>e.messageMaxLength&&(e=x(!0,e,{closeButton:!0,messageMaxLength:100}),n='HTML Tags Error: Your content length is more than "messageMaxLength" option.'),n.length>e.messageMaxLength&&(n=n.substring(0,e.messageMaxLength)+"..."),"shadow"===e.fontAwesomeIconStyle&&(m.fontAwesomeIconColor=m.background),e.cssAnimation||(e.cssAnimationDuration=0);var p,f=t.document.createElement("div");f.id=l.wrapID,f.style.width=e.width,f.style.zIndex=e.zindex,f.style.opacity=e.opacity,"center-center"===e.position?(f.style.left=e.distance,f.style.top=e.distance,f.style.right=e.distance,f.style.bottom=e.distance,f.style.margin="auto",f.classList.add("nx-flex-center-center"),f.style.maxHeight="calc((100vh - "+e.distance+") - "+e.distance+")",f.style.display="flex",f.style.flexWrap="wrap",f.style.flexDirection="column",f.style.justifyContent="center",f.style.alignItems="center",f.style.pointerEvents="none"):"center-top"===e.position?(f.style.left=e.distance,f.style.right=e.distance,f.style.top=e.distance,f.style.bottom="auto",f.style.margin="auto"):"center-bottom"===e.position?(f.style.left=e.distance,f.style.right=e.distance,f.style.bottom=e.distance,f.style.top="auto",f.style.margin="auto"):"right-bottom"===e.position?(f.style.right=e.distance,f.style.bottom=e.distance,f.style.top="auto",f.style.left="auto"):"left-top"===e.position?(f.style.left=e.distance,f.style.top=e.distance,f.style.right="auto",f.style.bottom="auto"):"left-bottom"===e.position?(f.style.left=e.distance,f.style.bottom=e.distance,f.style.top="auto",f.style.right="auto"):(f.style.right=e.distance,f.style.top=e.distance,f.style.left="auto",f.style.bottom="auto"),e.backOverlay&&((p=t.document.createElement("div")).id=e.ID+"Overlay",p.style.width="100%",p.style.height="100%",p.style.position="fixed",p.style.zIndex=e.zindex,p.style.left=0,p.style.top=0,p.style.right=0,p.style.bottom=0,p.style.background=m.backOverlayColor||e.backOverlayColor,p.className=e.cssAnimation?"with-animation":"",p.style.animationDuration=e.cssAnimation?e.cssAnimationDuration+"ms":"",t.document.getElementById(p.id)?0===S&&(t.document.getElementById(p.id).style.background=m.backOverlayColor||e.backOverlayColor):t.document.body.appendChild(p)),t.document.getElementById(f.id)||t.document.body.appendChild(f);var u=t.document.createElement("div");u.id=e.ID+"-"+z,u.className=e.className+" "+m.childClassName+" "+(e.cssAnimation?"with-animation":"")+" "+(e.useIcon?"with-icon":"")+" nx-"+e.cssAnimationStyle+" "+(e.closeButton&&"function"!=typeof a?"with-close-button":"")+" "+("function"==typeof a?"with-callback":"")+" "+(e.clickToClose?"click-to-close":""),u.style.fontSize=e.fontSize,u.style.color=m.textColor,u.style.background=m.background,u.style.borderRadius=e.borderRadius,u.style.pointerEvents="all",e.rtl&&(u.setAttribute("dir","rtl"),u.classList.add("rtl-on")),u.style.fontFamily='"'+e.fontFamily+'", '+s,e.cssAnimation&&(u.style.animationDuration=e.cssAnimationDuration+"ms");var d="";if(e.closeButton&&"function"!=typeof a&&(d='<span class="notify-close-button"><svg class="clck2cls" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="20px" height="20px" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"viewBox="0 0 20 20"xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css">.click2close{fill:'+m.notiflixIconColor+'}</style></defs><g><path class="click2close" d="M0.38 2.19l7.8 7.81 -7.8 7.81c-0.51,0.5 -0.51,1.31 -0.01,1.81 0.25,0.25 0.57,0.38 0.91,0.38 0.34,0 0.67,-0.14 0.91,-0.38l7.81 -7.81 7.81 7.81c0.24,0.24 0.57,0.38 0.91,0.38 0.34,0 0.66,-0.14 0.9,-0.38 0.51,-0.5 0.51,-1.31 0,-1.81l-7.81 -7.81 7.81 -7.81c0.51,-0.5 0.51,-1.31 0,-1.82 -0.5,-0.5 -1.31,-0.5 -1.81,0l-7.81 7.81 -7.81 -7.81c-0.5,-0.5 -1.31,-0.5 -1.81,0 -0.51,0.51 -0.51,1.32 0,1.82z"/></g></svg></span>'),e.useIcon)if(e.useFontAwesome)u.innerHTML='<i style="color:'+m.fontAwesomeIconColor+"; font-size:"+e.fontAwesomeIconSize+';" class="nmi wfa '+m.fontAwesomeClassName+" "+("shadow"===e.fontAwesomeIconStyle?"shadow":"basic")+'"></i><span class="the-message with-icon">'+n+"</span>"+(e.closeButton?d:"");else{var b;b="Success"===o?'<svg class="nmi" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="40px" height="40px" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"viewBox="0 0 40 40"xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css">#Notiflix-Icon-Success{fill:'+m.notiflixIconColor+'}</style></defs><g><path id="Notiflix-Icon-Success" d="M20 0c11.03,0 20,8.97 20,20 0,11.03 -8.97,20 -20,20 -11.03,0 -20,-8.97 -20,-20 0,-11.03 8.97,-20 20,-20zm0 37.98c9.92,0 17.98,-8.06 17.98,-17.98 0,-9.92 -8.06,-17.98 -17.98,-17.98 -9.92,0 -17.98,8.06 -17.98,17.98 0,9.92 8.06,17.98 17.98,17.98zm-2.4 -13.29l11.52 -12.96c0.37,-0.41 1.01,-0.45 1.42,-0.08 0.42,0.37 0.46,1 0.09,1.42l-12.16 13.67c-0.19,0.22 -0.46,0.34 -0.75,0.34 -0.23,0 -0.45,-0.07 -0.63,-0.22l-7.6 -6.07c-0.43,-0.35 -0.5,-0.99 -0.16,-1.42 0.35,-0.43 0.99,-0.5 1.42,-0.16l6.85 5.48z"/></g></svg>':"Failure"===o?'<svg class="nmi" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="40px" height="40px" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"viewBox="0 0 40 40"xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css">#Notiflix-Icon-Failure{fill:'+m.notiflixIconColor+'}</style></defs><g><path id="Notiflix-Icon-Failure" d="M20 0c11.03,0 20,8.97 20,20 0,11.03 -8.97,20 -20,20 -11.03,0 -20,-8.97 -20,-20 0,-11.03 8.97,-20 20,-20zm0 37.98c9.92,0 17.98,-8.06 17.98,-17.98 0,-9.92 -8.06,-17.98 -17.98,-17.98 -9.92,0 -17.98,8.06 -17.98,17.98 0,9.92 8.06,17.98 17.98,17.98zm1.42 -17.98l6.13 6.12c0.39,0.4 0.39,1.04 0,1.43 -0.19,0.19 -0.45,0.29 -0.71,0.29 -0.27,0 -0.53,-0.1 -0.72,-0.29l-6.12 -6.13 -6.13 6.13c-0.19,0.19 -0.44,0.29 -0.71,0.29 -0.27,0 -0.52,-0.1 -0.71,-0.29 -0.39,-0.39 -0.39,-1.03 0,-1.43l6.13 -6.12 -6.13 -6.13c-0.39,-0.39 -0.39,-1.03 0,-1.42 0.39,-0.39 1.03,-0.39 1.42,0l6.13 6.12 6.12 -6.12c0.4,-0.39 1.04,-0.39 1.43,0 0.39,0.39 0.39,1.03 0,1.42l-6.13 6.13z"/></g></svg>':"Warning"===o?'<svg class="nmi" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="40px" height="40px" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"viewBox="0 0 40 40"xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css">#Notiflix-Icon-Warning{fill:'+m.notiflixIconColor+'}</style></defs><g><path id="Notiflix-Icon-Warning" d="M21.91 3.48l17.8 30.89c0.84,1.46 -0.23,3.25 -1.91,3.25l-35.6 0c-1.68,0 -2.75,-1.79 -1.91,-3.25l17.8 -30.89c0.85,-1.47 2.97,-1.47 3.82,0zm16.15 31.84l-17.8 -30.89c-0.11,-0.2 -0.41,-0.2 -0.52,0l-17.8 30.89c-0.12,0.2 0.05,0.4 0.26,0.4l35.6 0c0.21,0 0.38,-0.2 0.26,-0.4zm-19.01 -4.12l0 -1.05c0,-0.53 0.42,-0.95 0.95,-0.95 0.53,0 0.95,0.42 0.95,0.95l0 1.05c0,0.53 -0.42,0.95 -0.95,0.95 -0.53,0 -0.95,-0.42 -0.95,-0.95zm0 -4.66l0 -13.39c0,-0.52 0.42,-0.95 0.95,-0.95 0.53,0 0.95,0.43 0.95,0.95l0 13.39c0,0.53 -0.42,0.96 -0.95,0.96 -0.53,0 -0.95,-0.43 -0.95,-0.96z"/></g></svg>':"Info"===o?'<svg class="nmi" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="40px" height="40px" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd"viewBox="0 0 40 40"xmlns:xlink="http://www.w3.org/1999/xlink"><defs><style type="text/css">#Notiflix-Icon-Info{fill:'+m.notiflixIconColor+'}</style></defs><g><path id="Notiflix-Icon-Info" d="M20 0c11.03,0 20,8.97 20,20 0,11.03 -8.97,20 -20,20 -11.03,0 -20,-8.97 -20,-20 0,-11.03 8.97,-20 20,-20zm0 37.98c9.92,0 17.98,-8.06 17.98,-17.98 0,-9.92 -8.06,-17.98 -17.98,-17.98 -9.92,0 -17.98,8.06 -17.98,17.98 0,9.92 8.06,17.98 17.98,17.98zm-0.99 -23.3c0,-0.54 0.44,-0.98 0.99,-0.98 0.55,0 0.99,0.44 0.99,0.98l0 15.86c0,0.55 -0.44,0.99 -0.99,0.99 -0.55,0 -0.99,-0.44 -0.99,-0.99l0 -15.86zm0 -5.22c0,-0.55 0.44,-0.99 0.99,-0.99 0.55,0 0.99,0.44 0.99,0.99l0 1.09c0,0.54 -0.44,0.99 -0.99,0.99 -0.55,0 -0.99,-0.45 -0.99,-0.99l0 -1.09z"/></g></svg>':"",u.innerHTML=b+'<span class="the-message with-icon">'+n+"</span>"+(e.closeButton?d:"")}else u.innerHTML='<span class="the-message">'+n+"</span>"+(e.closeButton?d:"");if("left-bottom"===e.position||"right-bottom"===e.position){var h=t.document.getElementById(f.id);h.insertBefore(u,h.firstChild)}else t.document.getElementById(f.id).appendChild(u);var v=t.document.getElementById(u.id);if(v){var k,w=t.document.getElementById(f.id);e.backOverlay&&(k=t.document.getElementById(p.id));var N,C,I=function(){v.classList.add("remove"),e.backOverlay&&0>=w.childElementCount&&k.classList.add("remove"),clearTimeout(N)},L=function(){v&&null!==v.parentNode&&v.parentNode.removeChild(v),0>=w.childElementCount&&null!==w.parentNode&&(w.parentNode.removeChild(w),e.backOverlay&&null!==k.parentNode&&k.parentNode.removeChild(k)),clearTimeout(C)};if(e.closeButton&&"function"!=typeof a)t.document.getElementById(u.id).querySelectorAll("span.notify-close-button")[0].addEventListener("click",(function(){I();var t=setTimeout((function(){L(),clearTimeout(t)}),e.cssAnimationDuration)}));if(("function"==typeof a||e.clickToClose)&&v.addEventListener("click",(function(){"function"==typeof a&&(S--,a()),I();var t=setTimeout((function(){L(),clearTimeout(t)}),e.cssAnimationDuration)})),!e.closeButton&&"function"!=typeof a){var M=function(){N=setTimeout((function(){I()}),e.timeout),C=setTimeout((function(){L()}),e.timeout+e.cssAnimationDuration)};M(),e.pauseOnHover&&(v.addEventListener("mouseenter",(function(){v.classList.add("nx-paused"),clearTimeout(N),clearTimeout(C)})),v.addEventListener("mouseleave",(function(){v.classList.remove("nx-paused"),M()})))}}if(e.showOnlyTheLastOne&&0<z)for(var A,X=t.document.querySelectorAll("[id^="+e.ID+"-]:not([id="+e.ID+"-"+z+"])"),R=0;R<X.length;R++)null!==(A=X[R]).parentNode&&A.parentNode.removeChild(A);e=x(!0,e,r)},L=function(e,a,i,o,r,l){if(!g("body"))return!1;n||T.Report.Init({});var m={};if("object"==typeof o&&!Array.isArray(o)||"object"==typeof r&&!Array.isArray(r)){var p={};"object"==typeof o?p=o:"object"==typeof r&&(p=r),m=x(!0,n,{}),n=x(!0,n,p)}var f=n[l.toLocaleLowerCase("en")];"string"!=typeof e&&(e="Notiflix "+l),"string"!=typeof a&&("Success"===l?a='"Do not try to become a person of success but try to become a person of value." <br><br>- Albert Einstein':"Failure"===l?a='"Failure is simply the opportunity to begin again, this time more intelligently." <br><br>- Henry Ford':"Warning"===l?a='"The peoples who want to live comfortably without producing and fatigue; they are doomed to lose their dignity, then liberty, and then independence and destiny." <br><br>- Mustafa Kemal Ataturk':"Info"==l&&(a='"Knowledge rests not upon truth alone, but upon error also." <br><br>- Carl Gustav Jung')),"string"!=typeof i&&(i="Okay"),n.plainText&&(e=y(e),a=y(a),i=y(i)),n.plainText||(e.length>n.titleMaxLength&&(e="HTML Tags Error",a='Your Title content length is more than "titleMaxLength" option.',i="Okay"),a.length>n.messageMaxLength&&(e="HTML Tags Error",a='Your Message content length is more than "messageMaxLength" option.',i="Okay"),i.length>n.buttonMaxLength&&(e="HTML Tags Error",a='Your Button content length is more than "buttonMaxLength" option.',i="Okay")),e.length>n.titleMaxLength&&(e=e.substring(0,n.titleMaxLength)+"..."),a.length>n.messageMaxLength&&(a=a.substring(0,n.messageMaxLength)+"..."),i.length>n.buttonMaxLength&&(i=i.substring(0,n.buttonMaxLength)+"..."),n.cssAnimation||(n.cssAnimationDuration=0);var u=t.document.createElement("div");u.id=c.ID,u.className=n.className,u.style.zIndex=n.zindex,u.style.borderRadius=n.borderRadius,u.style.fontFamily='"'+n.fontFamily+'", '+s,n.rtl&&(u.setAttribute("dir","rtl"),u.classList.add("rtl-on")),u.style.display="flex",u.style.flexWrap="wrap",u.style.flexDirection="column",u.style.alignItems="center",u.style.justifyContent="center";var d="";n.backOverlay&&(d='<div class="'+n.className+"-overlay"+(n.cssAnimation?" with-animation":"")+'" style="background:'+(f.backOverlayColor||n.backOverlayColor)+";animation-duration:"+n.cssAnimationDuration+'ms;"></div>');var b="";if("Success"===l?b=function(t,e){return t||(t="110px"),e||(e="#32c682"),'<svg xmlns="http://www.w3.org/2000/svg" id="NXReportSuccess" width="'+t+'" height="'+t+'" fill="'+e+'" fill-rule="evenodd" clip-rule="evenodd" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" version="1.1" viewBox="0 0 120 120" xml:space="preserve"><style>@-webkit-keyframes NXReportSuccess5-animation{0%{-webkit-transform:translate(60px,57.7px) scale(.5,.5) translate(-60px,-57.7px);transform:translate(60px,57.7px) scale(.5,.5) translate(-60px,-57.7px)}50%,to{-webkit-transform:translate(60px,57.7px) scale(1,1) translate(-60px,-57.7px);transform:translate(60px,57.7px) scale(1,1) translate(-60px,-57.7px)}60%{-webkit-transform:translate(60px,57.7px) scale(.95,.95) translate(-60px,-57.7px);transform:translate(60px,57.7px) scale(.95,.95) translate(-60px,-57.7px)}}@keyframes NXReportSuccess5-animation{0%{-webkit-transform:translate(60px,57.7px) scale(.5,.5) translate(-60px,-57.7px);transform:translate(60px,57.7px) scale(.5,.5) translate(-60px,-57.7px)}50%,to{-webkit-transform:translate(60px,57.7px) scale(1,1) translate(-60px,-57.7px);transform:translate(60px,57.7px) scale(1,1) translate(-60px,-57.7px)}60%{-webkit-transform:translate(60px,57.7px) scale(.95,.95) translate(-60px,-57.7px);transform:translate(60px,57.7px) scale(.95,.95) translate(-60px,-57.7px)}}@-webkit-keyframes NXReportSuccess6-animation{0%{opacity:0}50%,to{opacity:1}}@keyframes NXReportSuccess6-animation{0%{opacity:0}50%,to{opacity:1}}@-webkit-keyframes NXReportSuccess4-animation{0%{opacity:0}40%,to{opacity:1}}@keyframes NXReportSuccess4-animation{0%{opacity:0}40%,to{opacity:1}}@-webkit-keyframes NXReportSuccess3-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}40%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@keyframes NXReportSuccess3-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}40%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}#NXReportSuccess *{-webkit-animation-duration:1.2s;animation-duration:1.2s;-webkit-animation-timing-function:cubic-bezier(0,0,1,1);animation-timing-function:cubic-bezier(0,0,1,1)}</style><g id="NXReportSuccess1"><g id="NXReportSuccess2"><g style="-webkit-animation-name:NXReportSuccess3-animation;animation-name:NXReportSuccess3-animation;-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)"><path d="M60 115.38C29.46 115.38 4.62 90.54 4.62 60 4.62 29.46 29.46 4.62 60 4.62c30.54 0 55.38 24.84 55.38 55.38 0 30.54-24.84 55.38-55.38 55.38zM60 0C26.92 0 0 26.92 0 60s26.92 60 60 60 60-26.92 60-60S93.08 0 60 0z" style="-webkit-animation-name:NXReportSuccess4-animation;animation-name:NXReportSuccess4-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)" fill="inherit" data-animator-group="true" data-animator-type="2"/></g><g style="-webkit-animation-name:NXReportSuccess5-animation;animation-name:NXReportSuccess5-animation;-webkit-transform:translate(60px,57.7px) scale(1,1) translate(-60px,-57.7px);-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)"><path d="M88.27 35.39L52.8 75.29 31.43 58.2c-.98-.81-2.44-.63-3.24.36-.79.99-.63 2.44.36 3.24l23.08 18.46c.43.34.93.51 1.44.51.64 0 1.27-.26 1.74-.78l36.91-41.53a2.3 2.3 0 0 0-.19-3.26c-.95-.86-2.41-.77-3.26.19z" style="-webkit-animation-name:NXReportSuccess6-animation;animation-name:NXReportSuccess6-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)" fill="inherit" data-animator-group="true" data-animator-type="2"/></g></g></g></svg>'}(n.svgSize,f.svgColor):"Failure"===l?b=function(t,e){return t||(t="110px"),e||(e="#ff5549"),'<svg xmlns="http://www.w3.org/2000/svg" id="NXReportFailure" width="'+t+'" height="'+t+'" fill="'+e+'" fill-rule="evenodd" clip-rule="evenodd" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" version="1.1" viewBox="0 0 120 120" xml:space="preserve"><style>@-webkit-keyframes NXReportFailure4-animation{0%{opacity:0}40%,to{opacity:1}}@keyframes NXReportFailure4-animation{0%{opacity:0}40%,to{opacity:1}}@-webkit-keyframes NXReportFailure3-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}40%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@keyframes NXReportFailure3-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}40%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@-webkit-keyframes NXReportFailure5-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}50%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@keyframes NXReportFailure5-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}50%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@-webkit-keyframes NXReportFailure6-animation{0%{opacity:0}50%,to{opacity:1}}@keyframes NXReportFailure6-animation{0%{opacity:0}50%,to{opacity:1}}#NXReportFailure *{-webkit-animation-duration:1.2s;animation-duration:1.2s;-webkit-animation-timing-function:cubic-bezier(0,0,1,1);animation-timing-function:cubic-bezier(0,0,1,1)}</style><g id="NXReportFailure1"><g id="NXReportFailure2"><g style="-webkit-animation-name:NXReportFailure3-animation;animation-name:NXReportFailure3-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1);-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)"><path d="M4.35 34.95c0-16.82 13.78-30.6 30.6-30.6h50.1c16.82 0 30.6 13.78 30.6 30.6v50.1c0 16.82-13.78 30.6-30.6 30.6h-50.1c-16.82 0-30.6-13.78-30.6-30.6v-50.1zM34.95 120h50.1c19.22 0 34.95-15.73 34.95-34.95v-50.1C120 15.73 104.27 0 85.05 0h-50.1C15.73 0 0 15.73 0 34.95v50.1C0 104.27 15.73 120 34.95 120z" style="-webkit-animation-name:NXReportFailure4-animation;animation-name:NXReportFailure4-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)" fill="inherit" data-animator-group="true" data-animator-type="2"/></g><g style="-webkit-animation-name:NXReportFailure5-animation;animation-name:NXReportFailure5-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1);-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)"><path d="M82.4 37.6c-.9-.9-2.37-.9-3.27 0L60 56.73 40.86 37.6a2.306 2.306 0 0 0-3.26 3.26L56.73 60 37.6 79.13c-.9.9-.9 2.37 0 3.27.45.45 1.04.68 1.63.68.59 0 1.18-.23 1.63-.68L60 63.26 79.13 82.4c.45.45 1.05.68 1.64.68.58 0 1.18-.23 1.63-.68.9-.9.9-2.37 0-3.27L63.26 60 82.4 40.86c.9-.91.9-2.36 0-3.26z" style="-webkit-animation-name:NXReportFailure6-animation;animation-name:NXReportFailure6-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)" fill="inherit" data-animator-group="true" data-animator-type="2"/></g></g></g></svg>'}(n.svgSize,f.svgColor):"Warning"===l?b=function(t,e){return t||(t="110px"),e||(e="#eebf31"),'<svg xmlns="http://www.w3.org/2000/svg" id="NXReportWarning" width="'+t+'" height="'+t+'" fill="'+e+'" fill-rule="evenodd" clip-rule="evenodd" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" version="1.1" viewBox="0 0 120 120" xml:space="preserve"><style>@-webkit-keyframes NXReportWarning3-animation{0%{opacity:0}40%,to{opacity:1}}@keyframes NXReportWarning3-animation{0%{opacity:0}40%,to{opacity:1}}@-webkit-keyframes NXReportWarning2-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}40%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@keyframes NXReportWarning2-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}40%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@-webkit-keyframes NXReportWarning4-animation{0%{-webkit-transform:translate(60px,66.6px) scale(.5,.5) translate(-60px,-66.6px);transform:translate(60px,66.6px) scale(.5,.5) translate(-60px,-66.6px)}50%,to{-webkit-transform:translate(60px,66.6px) scale(1,1) translate(-60px,-66.6px);transform:translate(60px,66.6px) scale(1,1) translate(-60px,-66.6px)}60%{-webkit-transform:translate(60px,66.6px) scale(.95,.95) translate(-60px,-66.6px);transform:translate(60px,66.6px) scale(.95,.95) translate(-60px,-66.6px)}}@keyframes NXReportWarning4-animation{0%{-webkit-transform:translate(60px,66.6px) scale(.5,.5) translate(-60px,-66.6px);transform:translate(60px,66.6px) scale(.5,.5) translate(-60px,-66.6px)}50%,to{-webkit-transform:translate(60px,66.6px) scale(1,1) translate(-60px,-66.6px);transform:translate(60px,66.6px) scale(1,1) translate(-60px,-66.6px)}60%{-webkit-transform:translate(60px,66.6px) scale(.95,.95) translate(-60px,-66.6px);transform:translate(60px,66.6px) scale(.95,.95) translate(-60px,-66.6px)}}@-webkit-keyframes NXReportWarning5-animation{0%{opacity:0}50%,to{opacity:1}}@keyframes NXReportWarning5-animation{0%{opacity:0}50%,to{opacity:1}}#NXReportWarning *{-webkit-animation-duration:1.2s;animation-duration:1.2s;-webkit-animation-timing-function:cubic-bezier(0,0,1,1);animation-timing-function:cubic-bezier(0,0,1,1)}</style><g id="NXReportWarning1"><g style="-webkit-animation-name:NXReportWarning2-animation;animation-name:NXReportWarning2-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1);-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)"><path d="M115.46 106.15l-54.04-93.8c-.61-1.06-2.23-1.06-2.84 0l-54.04 93.8c-.62 1.07.21 2.29 1.42 2.29h108.08c1.21 0 2.04-1.22 1.42-2.29zM65.17 10.2l54.04 93.8c2.28 3.96-.65 8.78-5.17 8.78H5.96c-4.52 0-7.45-4.82-5.17-8.78l54.04-93.8c2.28-3.95 8.03-4 10.34 0z" style="-webkit-animation-name:NXReportWarning3-animation;animation-name:NXReportWarning3-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)" fill="inherit" data-animator-group="true" data-animator-type="2"/></g><g style="-webkit-animation-name:NXReportWarning4-animation;animation-name:NXReportWarning4-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1);-webkit-transform:translate(60px,66.6px) scale(1,1) translate(-60px,-66.6px)"><path d="M57.83 94.01c0 1.2.97 2.17 2.17 2.17s2.17-.97 2.17-2.17v-3.2c0-1.2-.97-2.17-2.17-2.17s-2.17.97-2.17 2.17v3.2zm0-14.15c0 1.2.97 2.17 2.17 2.17s2.17-.97 2.17-2.17V39.21c0-1.2-.97-2.17-2.17-2.17s-2.17.97-2.17 2.17v40.65z" style="-webkit-animation-name:NXReportWarning5-animation;animation-name:NXReportWarning5-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)" fill="inherit" data-animator-group="true" data-animator-type="2"/></g></g></svg>'}(n.svgSize,f.svgColor):"Info"==l&&(b=function(t,e){return t||(t="110px"),e||(e="#26c0d3"),'<svg xmlns="http://www.w3.org/2000/svg" id="NXReportInfo" width="'+t+'" height="'+t+'" fill="'+e+'" fill-rule="evenodd" clip-rule="evenodd" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" version="1.1" viewBox="0 0 120 120" xml:space="preserve"><style>@-webkit-keyframes NXReportInfo5-animation{0%{opacity:0}50%,to{opacity:1}}@keyframes NXReportInfo5-animation{0%{opacity:0}50%,to{opacity:1}}@-webkit-keyframes NXReportInfo4-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}50%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@keyframes NXReportInfo4-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}50%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@-webkit-keyframes NXReportInfo3-animation{0%{opacity:0}40%,to{opacity:1}}@keyframes NXReportInfo3-animation{0%{opacity:0}40%,to{opacity:1}}@-webkit-keyframes NXReportInfo2-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}40%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@keyframes NXReportInfo2-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}40%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}#NXReportInfo *{-webkit-animation-duration:1.2s;animation-duration:1.2s;-webkit-animation-timing-function:cubic-bezier(0,0,1,1);animation-timing-function:cubic-bezier(0,0,1,1)}</style><g id="NXReportInfo1"><g style="-webkit-animation-name:NXReportInfo2-animation;animation-name:NXReportInfo2-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1);-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)"><path d="M60 115.38C29.46 115.38 4.62 90.54 4.62 60 4.62 29.46 29.46 4.62 60 4.62c30.54 0 55.38 24.84 55.38 55.38 0 30.54-24.84 55.38-55.38 55.38zM60 0C26.92 0 0 26.92 0 60s26.92 60 60 60 60-26.92 60-60S93.08 0 60 0z" style="-webkit-animation-name:NXReportInfo3-animation;animation-name:NXReportInfo3-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)" fill="inherit" data-animator-group="true" data-animator-type="2"/></g><g style="-webkit-animation-name:NXReportInfo4-animation;animation-name:NXReportInfo4-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1);-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)"><path d="M57.75 43.85c0-1.24 1.01-2.25 2.25-2.25s2.25 1.01 2.25 2.25v48.18c0 1.24-1.01 2.25-2.25 2.25s-2.25-1.01-2.25-2.25V43.85zm0-15.88c0-1.24 1.01-2.25 2.25-2.25s2.25 1.01 2.25 2.25v3.32c0 1.25-1.01 2.25-2.25 2.25s-2.25-1-2.25-2.25v-3.32z" style="-webkit-animation-name:NXReportInfo5-animation;animation-name:NXReportInfo5-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)" fill="inherit" data-animator-group="true" data-animator-type="2"/></g></g></svg>'}(n.svgSize,f.svgColor)),u.innerHTML=d+'<div class="'+n.className+"-content"+(n.cssAnimation?" with-animation ":"")+" nx-"+n.cssAnimationStyle+'" style="width:'+n.width+"; background:"+n.backgroundColor+"; animation-duration:"+n.cssAnimationDuration+'ms;"><div style="width:'+n.svgSize+"; height:"+n.svgSize+';" class="'+n.className+'-icon">'+b+'</div><h5 class="'+n.className+'-title" style="font-weight:500; font-size:'+n.titleFontSize+"; color:"+f.titleColor+';">'+e+'</h5><p class="'+n.className+'-message" style="font-size:'+n.messageFontSize+"; color:"+f.messageColor+';">'+a+'</p><a id="NXReportButton" class="'+n.className+'-button" style="font-weight:500; font-size:'+n.buttonFontSize+"; background:"+f.buttonBackground+"; color:"+f.buttonColor+';">'+i+"</a></div>",!t.document.getElementById(u.id)){t.document.body.appendChild(u);var h=t.document.getElementById(u.id);t.document.getElementById("NXReportButton").addEventListener("click",(function(){"function"==typeof o&&o(),h.classList.add("remove");var t=setTimeout((function(){null!==h.parentNode&&h.parentNode.removeChild(h),clearTimeout(t)}),n.cssAnimationDuration)}))}n=x(!0,n,m)},M=function(e,n,i,o,r,l,c,p,f){if(!g("body"))return!1;a||T.Confirm.Init({});var u=x(!0,a,{});"object"!=typeof c||Array.isArray(c)||(a=x(!0,a,c)),"string"!=typeof e&&(e="Notiflix Confirm"),"string"!=typeof n&&(n="Do you agree with me?"),"string"!=typeof i&&(i="Yes"),"string"!=typeof o&&(o="No"),"function"!=typeof r&&(r=void 0),"function"!=typeof l&&(l=void 0),a.plainText&&(e=y(e),n=y(n),i=y(i),o=y(o)),a.plainText||(e.length>a.titleMaxLength&&(e="HTML Tags Error",n='Your Title content length is more than "titleMaxLength" option.',i="Okay",o="..."),n.length>a.messageMaxLength&&(e="HTML Tags Error",n='Your Message content length is more than "messageMaxLength" option.',i="Okay",o="..."),(i.length||o.length)>a.buttonsMaxLength&&(e="HTML Tags Error",n='Your Buttons contents length is more than "buttonsMaxLength" option.',i="Okay",o="...")),e.length>a.titleMaxLength&&(e=e.substring(0,a.titleMaxLength)+"..."),n.length>a.messageMaxLength&&(n=n.substring(0,a.messageMaxLength)+"..."),i.length>a.buttonsMaxLength&&(i=i.substring(0,a.buttonsMaxLength)+"..."),o.length>a.buttonsMaxLength&&(o=o.substring(0,a.buttonsMaxLength)+"..."),a.cssAnimation||(a.cssAnimationDuration=0);var d=t.document.createElement("div");d.id=m.ID,d.className=a.className+(a.cssAnimation?" with-animation nx-"+a.cssAnimationStyle:""),d.style.zIndex=a.zindex,d.style.padding=a.distance,a.rtl&&(d.setAttribute("dir","rtl"),d.classList.add("rtl-on"));var b="string"==typeof a.position?a.position.trim():"center";d.classList.add("nx-position-"+b),d.style.fontFamily='"'+a.fontFamily+'", '+s;var h="";a.backOverlay&&(h='<div class="'+a.className+"-overlay"+(a.cssAnimation?" with-animation":"")+'" style="background:'+a.backOverlayColor+";animation-duration:"+a.cssAnimationDuration+'ms;"></div>');var v="";"function"==typeof r&&(v='<a id="NXConfirmButtonCancel" class="confirm-button-cancel" style="color:'+a.cancelButtonColor+";background:"+a.cancelButtonBackground+";font-size:"+a.buttonsFontSize+';">'+o+"</a>");var k="",w=!1;if(p&&"string"==typeof f&&0<f.length&&(w=f,k='<div><input id="NXConfirmValidationInput" type="text" style="font-size:'+a.messageFontSize+";border-radius: "+a.borderRadius+';" maxlength="'+f.length+'" autocomplete="off" spellcheck="false" autocapitalize="none" /></div>'),d.innerHTML=h+'<div class="'+a.className+'-content" style="width:'+a.width+"; background:"+a.backgroundColor+"; animation-duration:"+a.cssAnimationDuration+"ms; border-radius: "+a.borderRadius+';"><div class="'+a.className+'-head"><h5 style="color:'+a.titleColor+";font-size:"+a.titleFontSize+';">'+e+'</h5><div style="color:'+a.messageColor+";font-size:"+a.messageFontSize+';">'+n+k+'</div></div><div class="'+a.className+'-buttons"><a id="NXConfirmButtonOk" class="confirm-button-ok'+("function"==typeof r?"":" full")+'" style="color:'+a.okButtonColor+";background:"+a.okButtonBackground+";font-size:"+a.buttonsFontSize+';">'+i+"</a>"+v+"</div></div>",!t.document.getElementById(d.id)){t.document.body.appendChild(d);var N=t.document.getElementById(d.id),C=t.document.getElementById("NXConfirmButtonOk"),z=t.document.getElementById("NXConfirmValidationInput");if(z&&(z.focus(),z.addEventListener("keyup",(function(t){(t.target.value||"").toString()!==w?(z.classList.add("nx-validation-failure"),z.classList.remove("nx-validation-success")):(z.classList.remove("nx-validation-failure"),z.classList.add("nx-validation-success"),("enter"===(t.key||"").toLocaleLowerCase("en")||13===t.keyCode)&&C.dispatchEvent(new Event("click")))}))),C.addEventListener("click",(function(t){if(p&&w&&z){if((z.value||"").toString()!==w)return z.focus(),z.classList.add("nx-validation-failure"),t.stopPropagation(),t.preventDefault(),t.returnValue=!1,t.cancelBubble=!0,!1;z.classList.remove("nx-validation-failure")}"function"==typeof r&&r(),N.classList.add("remove");var e=setTimeout((function(){null!==N.parentNode&&(N.parentNode.removeChild(N),clearTimeout(e))}),a.cssAnimationDuration)})),"function"==typeof r)t.document.getElementById("NXConfirmButtonCancel").addEventListener("click",(function(){"function"==typeof l&&l(),N.classList.add("remove");var t=setTimeout((function(){null!==N.parentNode&&(N.parentNode.removeChild(N),clearTimeout(t))}),a.cssAnimationDuration)}))}a=x(!0,a,u)},A=function(e,n,a,o,r){if(!g("body"))return!1;i||T.Loading.Init({});var l=x(!0,i,{});if("object"==typeof e&&!Array.isArray(e)||"object"==typeof n&&!Array.isArray(n)){var c={};"object"==typeof e?c=e:"object"==typeof n&&(c=n),i=x(!0,i,c)}var m="";if("string"==typeof e&&0<e.length&&(m=e),o){var f="";0<(m=m.toString().length>i.messageMaxLength?y(m).toString().substring(0,i.messageMaxLength)+"...":y(m).toString()).length&&(f='<p id="'+i.messageID+'" class="loading-message" style="color:'+i.messageColor+";font-size:"+i.messageFontSize+';">'+m+"</p>"),i.cssAnimation||(i.cssAnimationDuration=0);var d="";if("standard"===a)d=h(i.svgSize,i.svgColor);else if("hourglass"===a)d=v(i.svgSize,i.svgColor);else if("circle"===a)d=k(i.svgSize,i.svgColor);else if("arrows"===a)d=w(i.svgSize,i.svgColor);else if("dots"===a)d=N(i.svgSize,i.svgColor);else if("pulse"===a)d=C(i.svgSize,i.svgColor);else if("custom"===a&&null!==i.customSvgUrl)d='<img class="custom-loading-icon" width="'+i.svgSize+'" height="'+i.svgSize+'" src="'+i.customSvgUrl+'" alt="Notiflix">';else{if("custom"===a&&null==i.customSvgUrl)return u("Notiflix Error",'You have to set a static SVG url to "customSvgUrl" option to use Loading Custom.'),!1;"notiflix"===a&&(d=function(t,e,n){return t||(t="60px"),e||(e="#f8f8f8"),n||(n="#32c682"),'<svg xmlns="http://www.w3.org/2000/svg" id="NXLoadingNotiflixLib" width="'+t+'" height="'+t+'" fill-rule="evenodd" clip-rule="evenodd" image-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" version="1.1" viewBox="0 0 200 200" xml:space="preserve"><defs><style>@keyframes notiflix-n{0%{stroke-dashoffset:1000}to{stroke-dashoffset:0}}@keyframes notiflix-x{0%{stroke-dashoffset:1000}to{stroke-dashoffset:0}}@keyframes notiflix-dot{0%,to{stroke-width:0}50%{stroke-width:12}}.nx-icon-line{stroke:'+e+';stroke-width:12;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:22;fill:none}</style></defs><path d="M47.97 135.05a6.5 6.5 0 1 1 0 13 6.5 6.5 0 0 1 0-13z" style="animation-name:notiflix-dot;animation-timing-function:ease-in-out;animation-duration:1.25s;animation-iteration-count:infinite;animation-direction:normal" fill="'+n+'" stroke="'+n+'" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22" stroke-width="12"/><path class="nx-icon-line" d="M10.14 144.76V87.55c0-5.68-4.54-41.36 37.83-41.36 42.36 0 37.82 35.68 37.82 41.36v57.21" style="animation-name:notiflix-n;animation-timing-function:linear;animation-duration:2.5s;animation-delay:0s;animation-iteration-count:infinite;animation-direction:normal" stroke-dasharray="500"/><path class="nx-icon-line" d="M115.06 144.49c24.98-32.68 49.96-65.35 74.94-98.03M114.89 46.6c25.09 32.58 50.19 65.17 75.29 97.75" style="animation-name:notiflix-x;animation-timing-function:linear;animation-duration:2.5s;animation-delay:.2s;animation-iteration-count:infinite;animation-direction:normal" stroke-dasharray="500"/></svg>'}(i.svgSize,"#f8f8f8","#32c682"))}var b=parseInt((i.svgSize||"").replace(/[^0-9]/g,"")),z=t.innerWidth,S=b>=z?z-40+"px":b+"px",I='<div style="width:'+S+"; height:"+S+';" class="'+i.className+"-icon"+(0<m.length?" with-message":"")+'">'+d+"</div>",L=t.document.createElement("div");if(L.id=p.ID,L.className=i.className+(i.cssAnimation?" with-animation":"")+(i.clickToClose?" click-to-close":""),L.style.zIndex=i.zindex,L.style.background=i.backgroundColor,L.style.animationDuration=i.cssAnimationDuration+"ms",L.style.fontFamily='"'+i.fontFamily+'", '+s,L.style.display="flex",L.style.flexWrap="wrap",L.style.flexDirection="column",L.style.alignItems="center",L.style.justifyContent="center",i.rtl&&(L.setAttribute("dir","rtl"),L.classList.add("rtl-on")),L.innerHTML=I+f,!t.document.getElementById(L.id)&&(t.document.body.appendChild(L),i.clickToClose))t.document.getElementById(L.id).addEventListener("click",(function(){L.classList.add("remove");var t=setTimeout((function(){null!==L.parentNode&&(L.parentNode.removeChild(L),clearTimeout(t))}),i.cssAnimationDuration)}))}else if(t.document.getElementById(p.ID))var M=t.document.getElementById(p.ID),A=setTimeout((function(){M.classList.add("remove");var t=setTimeout((function(){null!==M.parentNode&&(M.parentNode.removeChild(M),clearTimeout(t))}),i.cssAnimationDuration);clearTimeout(A)}),r);i=x(!0,i,l)},X=function(e){"string"!=typeof e&&(e="");var n=t.document.getElementById(p.ID);if(n)if(0<e.length){e=e.length>i.messageMaxLength?y(e).substring(0,i.messageMaxLength)+"...":y(e);var a=n.getElementsByTagName("p")[0];if(a)a.innerHTML=e;else{var o=t.document.createElement("p");o.id=i.messageID,o.className="loading-message new-loading-message",o.style.color=i.messageColor,o.style.fontSize=i.messageFontSize,o.innerHTML=e,n.appendChild(o)}}else u("Notiflix Error","Where is the new message?")},R=0,B=function(e,n,a,i,r,l){if("string"!=typeof n||1>(n||"").length||1===(n||"").length&&("#"===(n||"")[0]||"."===(n||"")[0]))return u("Notiflix Error","The selector parameter must be a String and matches a specified CSS selector(s)."),!1;var c=t.document.querySelectorAll(n);if(1>c.length)return u("Notiflix Error",'You called the "Notiflix.Block..." function with "'+n+'" selector, but there is no such element(s) in the document.'),!1;o||T.Block.Init({});var m=x(!0,o,{});if("object"==typeof i&&!Array.isArray(i)||"object"==typeof r&&!Array.isArray(r)){var p={};"object"==typeof i?p=i:"object"==typeof r&&(p=r),o=x(!0,o,p)}var b="";"string"==typeof i&&0<i.length&&(b=i),o.cssAnimation||(o.cssAnimationDuration=0);var z="notiflix-block";"string"==typeof o.className&&(z=o.className.trim());var S="number"==typeof o.querySelectorLimit?o.querySelectorLimit:200,I=c.length>=S?S:c.length;if(e)for(var L=0;L<I;L++){var M=c[L],A=M.querySelectorAll("[id^="+f.ID+"]");if(1>A.length){var X="";a&&(X="hourglass"===a?v(o.svgSize,o.svgColor):"circle"===a?k(o.svgSize,o.svgColor):"arrows"===a?w(o.svgSize,o.svgColor):"dots"===a?N(o.svgSize,o.svgColor):"pulse"===a?C(o.svgSize,o.svgColor):h(o.svgSize,o.svgColor));var B='<span class="'+z+'-icon" style="width:'+o.svgSize+";height:"+o.svgSize+';">'+X+"</span>",F="";0<b.length&&(b=b.length>o.messageMaxLength?y(b).substring(0,o.messageMaxLength)+"...":y(b),F='<span style="font-size:'+o.messageFontSize+";color:"+o.messageColor+';" class="'+z+'-message">'+b+"</span>"),R++;var E=t.document.createElement("div");E.id=f.ID+"-"+R,E.className=z+"-wrap"+(o.cssAnimation?" with-animation":""),E.style.position=o.position,E.style.zIndex=o.zindex,E.style.background=o.backgroundColor,E.style.animationDuration=o.cssAnimationDuration+"ms",E.style.fontFamily='"'+o.fontFamily+'", '+s,E.style.display="flex",E.style.flexWrap="wrap",E.style.flexDirection="column",E.style.alignItems="center",E.style.justifyContent="center",o.rtl&&(E.setAttribute("dir","rtl"),E.classList.add("rtl-on")),E.innerHTML=B+F;var D=t.getComputedStyle(M).getPropertyValue("position"),O="string"==typeof D?D.toLocaleLowerCase("en"):"relative",W=Math.round(1.25*parseInt(o.svgSize))+40,j="";W>(M.offsetHeight||0)&&(j="min-height:"+W+"px;");var H;H=M.getAttribute("id")?"#"+M.getAttribute("id"):M.classList[0]?"."+M.classList[0]:(M.tagName||"").toLocaleLowerCase("en");var P="",Q=-1>=["absolute","relative","fixed","sticky"].indexOf(O);if(Q||0<j.length){if(!g("head"))return!1;Q&&(P="position:relative!important;");var Y='<style id="Style-'+f.ID+"-"+R+'">'+H+"."+z+"-position{"+P+j+"}</style>",G=t.document.createRange();G.selectNode(t.document.head);var V=G.createContextualFragment(Y);t.document.head.appendChild(V),M.classList.add(z+"-position")}M.appendChild(E)}}else var q=function(e){var n=setTimeout((function(){null!==e.parentNode&&e.parentNode.removeChild(e);var a=e.getAttribute("id"),i=t.document.getElementById("Style-"+a);i&&null!==i.parentNode&&i.parentNode.removeChild(i),clearTimeout(n)}),o.cssAnimationDuration)},U=function(t){if(t&&0<t.length)for(var e,a=0;a<t.length;a++)(e=t[a])&&(e.classList.add("remove"),q(e));else d("Notiflix Info",'"Notiflix.Block.Remove();" function called with "'+n+'" selector, but this selector does not have a "Notiflix.Block..." element to remove.')},K=function(t){var e=setTimeout((function(){var n=z+"-position";t.classList.remove(n),clearTimeout(e)}),o.cssAnimationDuration+300)},J=setTimeout((function(){for(var t,e=0;e<I;e++)t=c[e],K(t),A=t.querySelectorAll("[id^="+f.ID+"]"),U(A);clearTimeout(J)}),l);o=x(!0,o,m)},T={Notify:{Init:function(t){e=x(!0,l,t),b(e.useGoogleFont,e.fontFamily)},Merge:function(t){return e?void(e=x(!0,e,t)):(u("Notiflix Error","You have to initialize the Notify module before call Merge function."),!1)},Success:function(t,e,n){I(t,e,n,"Success")},Failure:function(t,e,n){I(t,e,n,"Failure")},Warning:function(t,e,n){I(t,e,n,"Warning")},Info:function(t,e,n){I(t,e,n,"Info")}},Report:{Init:function(t){n=x(!0,c,t),b(n.useGoogleFont,n.fontFamily)},Merge:function(t){return n?void(n=x(!0,n,t)):(u("Notiflix Error","You have to initialize the Report module before call Merge function."),!1)},Success:function(t,e,n,a,i){L(t,e,n,a,i,"Success")},Failure:function(t,e,n,a,i){L(t,e,n,a,i,"Failure")},Warning:function(t,e,n,a,i){L(t,e,n,a,i,"Warning")},Info:function(t,e,n,a,i){L(t,e,n,a,i,"Info")}},Confirm:{Init:function(t){a=x(!0,m,t),b(a.useGoogleFont,a.fontFamily)},Merge:function(t){return a?void(a=x(!0,a,t)):(u("Notiflix Error","You have to initialize the Confirm module before call Merge function."),!1)},Show:function(t,e,n,a,i,o,r){M(t,e,n,a,i,o,r,!1,!1)},Ask:function(t,e,n,a,i,o,r,s){M(t,e,a,i,o,r,s,!0,n)}},Loading:{Init:function(t){i=x(!0,p,t),b(i.useGoogleFont,i.fontFamily)},Merge:function(t){return i?void(i=x(!0,i,t)):(u("Notiflix Error","You have to initialize the Loading module before call Merge function."),!1)},Standard:function(t,e){A(t,e,"standard",!0,0)},Hourglass:function(t,e){A(t,e,"hourglass",!0,0)},Circle:function(t,e){A(t,e,"circle",!0,0)},Arrows:function(t,e){A(t,e,"arrows",!0,0)},Dots:function(t,e){A(t,e,"dots",!0,0)},Pulse:function(t,e){A(t,e,"pulse",!0,0)},Custom:function(t,e){A(t,e,"custom",!0,0)},Notiflix:function(t,e){A(t,e,"notiflix",!0,0)},Remove:function(t){"number"!=typeof t&&(t=0),A(!1,!1,!1,!1,t)},Change:function(t){X(t)}},Block:{Init:function(t){o=x(!0,f,t),b(o.useGoogleFont,o.fontFamily)},Merge:function(t){return o?void(o=x(!0,o,t)):(u("Notiflix Error",'You have to initialize the "Notiflix.Block" module before call Merge function.'),!1)},Standard:function(t,e,n){B(!0,t,"standard",e,n)},Hourglass:function(t,e,n){B(!0,t,"hourglass",e,n)},Circle:function(t,e,n){B(!0,t,"circle",e,n)},Arrows:function(t,e,n){B(!0,t,"arrows",e,n)},Dots:function(t,e,n){B(!0,t,"dots",e,n)},Pulse:function(t,e,n){B(!0,t,"pulse",e,n)},Remove:function(t,e){"number"!=typeof e&&(e=0),B(!1,t,!1,!1,!1,e)}}};return{Notify:T.Notify,Report:T.Report,Confirm:T.Confirm,Loading:T.Loading,Block:T.Block}}));
|
1 |
+
!function(t,e){"function"==typeof define&&define.amd?define([],(function(){return e(t)})):"object"==typeof module&&"object"==typeof module.exports?module.exports=e(t):t.Notiflix=e(t)}("undefined"==typeof global?"undefined"==typeof window?this:window:global,(function(t){"use strict";if(void 0===t&&void 0===t.document)return!1;var e,i,a,n,o,r="\n\nVisit documentation page to learn more: https://notiflix.github.io/documentation",s='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif',l="Success",c="Failure",m="Warning",f="Info",p={wrapID:"NotiflixNotifyWrap",overlayID:"NotiflixNotifyOverlay",width:"280px",position:"right-top",distance:"10px",opacity:1,borderRadius:"5px",rtl:!1,timeout:3e3,messageMaxLength:110,backOverlay:!1,backOverlayColor:"rgba(0,0,0,0.5)",plainText:!0,showOnlyTheLastOne:!1,clickToClose:!1,pauseOnHover:!0,ID:"NotiflixNotify",className:"notiflix-notify",zindex:4001,fontFamily:"Quicksand",fontSize:"13px",cssAnimation:!0,cssAnimationDuration:400,cssAnimationStyle:"fade",closeButton:!1,useIcon:!0,useFontAwesome:!1,fontAwesomeIconStyle:"basic",fontAwesomeIconSize:"34px",success:{background:"#32c682",textColor:"#fff",childClassName:"notiflix-notify-success",notiflixIconColor:"rgba(0,0,0,0.2)",fontAwesomeClassName:"fas fa-check-circle",fontAwesomeIconColor:"rgba(0,0,0,0.2)",backOverlayColor:"rgba(50,198,130,0.2)"},failure:{background:"#ff5549",textColor:"#fff",childClassName:"notiflix-notify-failure",notiflixIconColor:"rgba(0,0,0,0.2)",fontAwesomeClassName:"fas fa-times-circle",fontAwesomeIconColor:"rgba(0,0,0,0.2)",backOverlayColor:"rgba(255,85,73,0.2)"},warning:{background:"#eebf31",textColor:"#fff",childClassName:"notiflix-notify-warning",notiflixIconColor:"rgba(0,0,0,0.2)",fontAwesomeClassName:"fas fa-exclamation-circle",fontAwesomeIconColor:"rgba(0,0,0,0.2)",backOverlayColor:"rgba(238,191,49,0.2)"},info:{background:"#26c0d3",textColor:"#fff",childClassName:"notiflix-notify-info",notiflixIconColor:"rgba(0,0,0,0.2)",fontAwesomeClassName:"fas fa-info-circle",fontAwesomeIconColor:"rgba(0,0,0,0.2)",backOverlayColor:"rgba(38,192,211,0.2)"}},x="Success",d="Failure",u="Warning",b="Info",g={ID:"NotiflixReportWrap",className:"notiflix-report",width:"320px",backgroundColor:"#f8f8f8",borderRadius:"25px",rtl:!1,zindex:4002,backOverlay:!0,backOverlayColor:"rgba(0,0,0,0.5)",backOverlayClickToClose:!1,fontFamily:"Quicksand",svgSize:"110px",plainText:!0,titleFontSize:"16px",titleMaxLength:34,messageFontSize:"13px",messageMaxLength:400,buttonFontSize:"14px",buttonMaxLength:34,cssAnimation:!0,cssAnimationDuration:360,cssAnimationStyle:"fade",success:{svgColor:"#32c682",titleColor:"#1e1e1e",messageColor:"#242424",buttonBackground:"#32c682",buttonColor:"#fff",backOverlayColor:"rgba(50,198,130,0.2)"},failure:{svgColor:"#ff5549",titleColor:"#1e1e1e",messageColor:"#242424",buttonBackground:"#ff5549",buttonColor:"#fff",backOverlayColor:"rgba(255,85,73,0.2)"},warning:{svgColor:"#eebf31",titleColor:"#1e1e1e",messageColor:"#242424",buttonBackground:"#eebf31",buttonColor:"#fff",backOverlayColor:"rgba(238,191,49,0.2)"},info:{svgColor:"#26c0d3",titleColor:"#1e1e1e",messageColor:"#242424",buttonBackground:"#26c0d3",buttonColor:"#fff",backOverlayColor:"rgba(38,192,211,0.2)"}},y="Show",k="Ask",w="Prompt",h={ID:"NotiflixConfirmWrap",className:"notiflix-confirm",width:"300px",zindex:4003,position:"center",distance:"10px",backgroundColor:"#f8f8f8",borderRadius:"25px",backOverlay:!0,backOverlayColor:"rgba(0,0,0,0.5)",rtl:!1,fontFamily:"Quicksand",cssAnimation:!0,cssAnimationDuration:300,cssAnimationStyle:"fade",plainText:!0,titleColor:"#32c682",titleFontSize:"16px",titleMaxLength:34,messageColor:"#1e1e1e",messageFontSize:"14px",messageMaxLength:110,buttonsFontSize:"15px",buttonsMaxLength:34,okButtonColor:"#f8f8f8",okButtonBackground:"#32c682",cancelButtonColor:"#f8f8f8",cancelButtonBackground:"#a9a9a9"},v="Standard",N="Hourglass",z="Circle",C="Arrows",L="Dots",S="Pulse",W="Custom",I="Notiflix",R={ID:"NotiflixLoadingWrap",className:"notiflix-loading",zindex:4e3,backgroundColor:"rgba(0,0,0,0.8)",rtl:!1,fontFamily:"Quicksand",cssAnimation:!0,cssAnimationDuration:400,clickToClose:!1,customSvgUrl:null,customSvgCode:null,svgSize:"80px",svgColor:"#32c682",messageID:"NotiflixLoadingMessage",messageFontSize:"15px",messageMaxLength:34,messageColor:"#dcdcdc"},A="Standard",M="Hourglass",T="Circle",B="Arrows",X="Dots",D="Pulse",E={ID:"NotiflixBlockWrap",querySelectorLimit:200,className:"notiflix-block",position:"absolute",zindex:1e3,backgroundColor:"rgba(255,255,255,0.9)",rtl:!1,fontFamily:"Quicksand",cssAnimation:!0,cssAnimationDuration:300,svgSize:"45px",svgColor:"#383838",messageFontSize:"14px",messageMaxLength:34,messageColor:"#383838"},F=function(t){return console.error("%c Notiflix Error ","padding:2px;border-radius:20px;color:#fff;background:#ff5549","\n"+t+r)},j=function(t){return console.log("%c Notiflix Info ","padding:2px;border-radius:20px;color:#fff;background:#26c0d3","\n"+t+r)},O=function(e){return e||(e="head"),null!==t.document[e]||(F('\nNotiflix needs to be appended to the "<'+e+'>" element, but you called it before the "<'+e+'>" element has been created.'),!1)},H=function(e,i){if(!O("head"))return!1;if(null!==e()&&!t.document.getElementById(i)){var a=t.document.createElement("style");a.id=i,a.innerHTML=e(),t.document.head.appendChild(a)}},P=function(){var t={},e=!1,i=0;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(e=arguments[0],i++);for(var a=function(i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=e&&"[object Object]"===Object.prototype.toString.call(i[a])?P(t[a],i[a]):i[a])};i<arguments.length;i++)a(arguments[i]);return t},U=function(e){var i=t.document.createElement("div");return i.innerHTML=e,i.textContent||i.innerText||""},V=function(t,e){return t||(t="60px"),e||(e="#32c682"),'<svg xmlns="http://www.w3.org/2000/svg" stroke="'+e+'" width="'+t+'" height="'+t+'" transform="scale(.8)" viewBox="0 0 38 38"><g fill="none" fill-rule="evenodd" stroke-width="2" transform="translate(1 1)"><circle cx="18" cy="18" r="18" stroke-opacity=".25"/><path d="M36 18c0-9.94-8.06-18-18-18"><animateTransform attributeName="transform" dur="1s" from="0 18 18" repeatCount="indefinite" to="360 18 18" type="rotate"/></path></g></svg>'},Q=function(t,e){return t||(t="60px"),e||(e="#32c682"),'<svg xmlns="http://www.w3.org/2000/svg" id="NXLoadingHourglass" fill="'+e+'" width="'+t+'" height="'+t+'" viewBox="0 0 200 200"><style>@-webkit-keyframes NXhourglass5-animation{0%{-webkit-transform:scale(1,1);transform:scale(1,1)}16.67%{-webkit-transform:scale(1,.8);transform:scale(1,.8)}33.33%{-webkit-transform:scale(.88,.6);transform:scale(.88,.6)}37.5%{-webkit-transform:scale(.85,.55);transform:scale(.85,.55)}41.67%{-webkit-transform:scale(.8,.5);transform:scale(.8,.5)}45.83%{-webkit-transform:scale(.75,.45);transform:scale(.75,.45)}50%{-webkit-transform:scale(.7,.4);transform:scale(.7,.4)}54.17%{-webkit-transform:scale(.6,.35);transform:scale(.6,.35)}58.33%{-webkit-transform:scale(.5,.3);transform:scale(.5,.3)}83.33%,to{-webkit-transform:scale(.2,0);transform:scale(.2,0)}}@keyframes NXhourglass5-animation{0%{-webkit-transform:scale(1,1);transform:scale(1,1)}16.67%{-webkit-transform:scale(1,.8);transform:scale(1,.8)}33.33%{-webkit-transform:scale(.88,.6);transform:scale(.88,.6)}37.5%{-webkit-transform:scale(.85,.55);transform:scale(.85,.55)}41.67%{-webkit-transform:scale(.8,.5);transform:scale(.8,.5)}45.83%{-webkit-transform:scale(.75,.45);transform:scale(.75,.45)}50%{-webkit-transform:scale(.7,.4);transform:scale(.7,.4)}54.17%{-webkit-transform:scale(.6,.35);transform:scale(.6,.35)}58.33%{-webkit-transform:scale(.5,.3);transform:scale(.5,.3)}83.33%,to{-webkit-transform:scale(.2,0);transform:scale(.2,0)}}@-webkit-keyframes NXhourglass3-animation{0%{-webkit-transform:scale(1,.02);transform:scale(1,.02)}79.17%,to{-webkit-transform:scale(1,1);transform:scale(1,1)}}@keyframes NXhourglass3-animation{0%{-webkit-transform:scale(1,.02);transform:scale(1,.02)}79.17%,to{-webkit-transform:scale(1,1);transform:scale(1,1)}}@-webkit-keyframes NXhourglass1-animation{0%,83.33%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(180deg);transform:rotate(180deg)}}@keyframes NXhourglass1-animation{0%,83.33%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(180deg);transform:rotate(180deg)}}#NXLoadingHourglass *{-webkit-animation-duration:1.2s;animation-duration:1.2s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:cubic-bezier(0,0,1,1);animation-timing-function:cubic-bezier(0,0,1,1)}</style><g data-animator-group="true" data-animator-type="1" style="-webkit-animation-name:NXhourglass1-animation;animation-name:NXhourglass1-animation;-webkit-transform-origin:50% 50%;transform-origin:50% 50%;transform-box:fill-box"><g id="NXhourglass2" fill="inherit"><g data-animator-group="true" data-animator-type="2" style="-webkit-animation-name:NXhourglass3-animation;animation-name:NXhourglass3-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1);-webkit-transform-origin:50% 100%;transform-origin:50% 100%;transform-box:fill-box" opacity=".4"><path id="NXhourglass4" d="M100 100l-34.38 32.08v31.14h68.76v-31.14z"/></g><g data-animator-group="true" data-animator-type="2" style="-webkit-animation-name:NXhourglass5-animation;animation-name:NXhourglass5-animation;-webkit-transform-origin:50% 100%;transform-origin:50% 100%;transform-box:fill-box" opacity=".4"><path id="NXhourglass6" d="M100 100L65.62 67.92V36.78h68.76v31.14z"/></g><path d="M51.14 38.89h8.33v14.93c0 15.1 8.29 28.99 23.34 39.1 1.88 1.25 3.04 3.97 3.04 7.08s-1.16 5.83-3.04 7.09c-15.05 10.1-23.34 23.99-23.34 39.09v14.93h-8.33a4.859 4.859 0 1 0 0 9.72h97.72a4.859 4.859 0 1 0 0-9.72h-8.33v-14.93c0-15.1-8.29-28.99-23.34-39.09-1.88-1.26-3.04-3.98-3.04-7.09s1.16-5.83 3.04-7.08c15.05-10.11 23.34-24 23.34-39.1V38.89h8.33a4.859 4.859 0 1 0 0-9.72H51.14a4.859 4.859 0 1 0 0 9.72zm79.67 14.93c0 15.87-11.93 26.25-19.04 31.03-4.6 3.08-7.34 8.75-7.34 15.15 0 6.41 2.74 12.07 7.34 15.15 7.11 4.78 19.04 15.16 19.04 31.03v14.93H69.19v-14.93c0-15.87 11.93-26.25 19.04-31.02 4.6-3.09 7.34-8.75 7.34-15.16 0-6.4-2.74-12.07-7.34-15.15-7.11-4.78-19.04-15.16-19.04-31.03V38.89h61.62v14.93z"/></g></g></svg>'},Y=function(t,e){return t||(t="60px"),e||(e="#32c682"),'<svg xmlns="http://www.w3.org/2000/svg" width="'+t+'" height="'+t+'" viewBox="25 25 50 50" style="-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite;height:'+t+";-webkit-transform-origin:center center;-ms-transform-origin:center center;transform-origin:center center;width:"+t+';position:absolute;top:0;left:0;margin:auto"><style>@-webkit-keyframes rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35}to{stroke-dasharray:89,200;stroke-dashoffset:-124}}@keyframes dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35}to{stroke-dasharray:89,200;stroke-dashoffset:-124}}</style><circle cx="50" cy="50" r="20" fill="none" stroke="'+e+'" stroke-width="2" style="-webkit-animation:dash 1.5s ease-in-out infinite,color 1.5s ease-in-out infinite;animation:dash 1.5s ease-in-out infinite,color 1.5s ease-in-out infinite" stroke-dasharray="150 200" stroke-dashoffset="-10" stroke-linecap="round"/></svg>'},q=function(t,e){return t||(t="60px"),e||(e="#32c682"),'<svg xmlns="http://www.w3.org/2000/svg" fill="'+e+'" width="'+t+'" height="'+t+'" viewBox="0 0 128 128"><g><path fill="inherit" d="M109.25 55.5h-36l12-12a29.54 29.54 0 0 0-49.53 12H18.75A46.04 46.04 0 0 1 96.9 31.84l12.35-12.34v36zm-90.5 17h36l-12 12a29.54 29.54 0 0 0 49.53-12h16.97A46.04 46.04 0 0 1 31.1 96.16L18.74 108.5v-36z"/><animateTransform attributeName="transform" dur="1.5s" from="0 64 64" repeatCount="indefinite" to="360 64 64" type="rotate"/></g></svg>'},G=function(t,e){return t||(t="60px"),e||(e="#32c682"),'<svg xmlns="http://www.w3.org/2000/svg" fill="'+e+'" width="'+t+'" height="'+t+'" viewBox="0 0 100 100"><g transform="translate(25 50)"><circle r="9" fill="inherit" transform="scale(.239)"><animateTransform attributeName="transform" begin="-0.266s" calcMode="spline" dur="0.8s" keySplines="0.3 0 0.7 1;0.3 0 0.7 1" keyTimes="0;0.5;1" repeatCount="indefinite" type="scale" values="0;1;0"/></circle></g><g transform="translate(50 50)"><circle r="9" fill="inherit" transform="scale(.00152)"><animateTransform attributeName="transform" begin="-0.133s" calcMode="spline" dur="0.8s" keySplines="0.3 0 0.7 1;0.3 0 0.7 1" keyTimes="0;0.5;1" repeatCount="indefinite" type="scale" values="0;1;0"/></circle></g><g transform="translate(75 50)"><circle r="9" fill="inherit" transform="scale(.299)"><animateTransform attributeName="transform" begin="0s" calcMode="spline" dur="0.8s" keySplines="0.3 0 0.7 1;0.3 0 0.7 1" keyTimes="0;0.5;1" repeatCount="indefinite" type="scale" values="0;1;0"/></circle></g></svg>'},K=function(t,e){return t||(t="60px"),e||(e="#32c682"),'<svg xmlns="http://www.w3.org/2000/svg" stroke="'+e+'" width="'+t+'" height="'+t+'" viewBox="0 0 44 44"><g fill="none" fill-rule="evenodd" stroke-width="2"><circle cx="22" cy="22" r="1"><animate attributeName="r" begin="0s" calcMode="spline" dur="1.8s" keySplines="0.165, 0.84, 0.44, 1" keyTimes="0; 1" repeatCount="indefinite" values="1; 20"/><animate attributeName="stroke-opacity" begin="0s" calcMode="spline" dur="1.8s" keySplines="0.3, 0.61, 0.355, 1" keyTimes="0; 1" repeatCount="indefinite" values="1; 0"/></circle><circle cx="22" cy="22" r="1"><animate attributeName="r" begin="-0.9s" calcMode="spline" dur="1.8s" keySplines="0.165, 0.84, 0.44, 1" keyTimes="0; 1" repeatCount="indefinite" values="1; 20"/><animate attributeName="stroke-opacity" begin="-0.9s" calcMode="spline" dur="1.8s" keySplines="0.3, 0.61, 0.355, 1" keyTimes="0; 1" repeatCount="indefinite" values="1; 0"/></circle></g></svg>'},$=function(){return'[id^=NotiflixNotifyWrap]{pointer-events:none;position:fixed;z-index:4001;opacity:1;right:10px;top:10px;width:280px;max-width:96%;-webkit-box-sizing:border-box;box-sizing:border-box;background:transparent}[id^=NotiflixNotifyWrap].nx-flex-center-center{max-height:calc(100vh - 20px);overflow-x:hidden;overflow-y:auto;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;margin:auto}[id^=NotiflixNotifyWrap]::-webkit-scrollbar{width:0;height:0}[id^=NotiflixNotifyWrap]::-webkit-scrollbar-thumb{background:transparent}[id^=NotiflixNotifyWrap]::-webkit-scrollbar-track{background:transparent}[id^=NotiflixNotifyWrap] *{-webkit-box-sizing:border-box;box-sizing:border-box}[id^=NotiflixNotifyOverlay]{-webkit-transition:background .3s ease-in-out;-o-transition:background .3s ease-in-out;transition:background .3s ease-in-out}[id^=NotiflixNotifyWrap]>div{pointer-events:all;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:"Quicksand",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;width:100%;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;position:relative;margin:0 0 10px;border-radius:5px;background:#1e1e1e;color:#fff;padding:10px 12px;font-size:14px;line-height:1.4}[id^=NotiflixNotifyWrap]>div:last-child{margin:0}[id^=NotiflixNotifyWrap]>div.nx-with-callback{cursor:pointer}[id^=NotiflixNotifyWrap]>div.nx-with-icon{padding:8px;min-height:56px}[id^=NotiflixNotifyWrap]>div.nx-paused{cursor:auto}[id^=NotiflixNotifyWrap]>div.nx-notify-click-to-close{cursor:pointer}[id^=NotiflixNotifyWrap]>div.nx-with-close-button{padding:10px 36px 10px 12px}[id^=NotiflixNotifyWrap]>div.nx-with-icon.nx-with-close-button{padding:6px 36px 6px 6px}[id^=NotiflixNotifyWrap]>div>span.nx-message{cursor:inherit;font-weight:normal;font-family:inherit!important;word-break:break-all;word-break:break-word}[id^=NotiflixNotifyWrap]>div>span.nx-close-button{cursor:pointer;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;position:absolute;right:8px;top:0;bottom:0;margin:auto;color:inherit;width:20px;height:20px}[id^=NotiflixNotifyWrap]>div>span.nx-close-button:hover{-webkit-transform:rotate(90deg);transform:rotate(90deg)}[id^=NotiflixNotifyWrap]>div>span.nx-close-button>svg{position:absolute;width:16px;height:16px;right:2px;top:2px}[id^=NotiflixNotifyWrap]>div>.nx-message-icon{position:absolute;width:40px;height:40px;font-size:30px;line-height:40px;text-align:center;left:8px;top:0;bottom:0;margin:auto;border-radius:inherit}[id^=NotiflixNotifyWrap]>div>.nx-message-icon-fa.nx-message-icon-fa-shadow{color:inherit;background:rgba(0,0,0,.15);-webkit-box-shadow:inset 0 0 34px rgba(0,0,0,.2);box-shadow:inset 0 0 34px rgba(0,0,0,.2);text-shadow:0 0 10px rgba(0,0,0,.3)}[id^=NotiflixNotifyWrap]>div>span.nx-with-icon{position:relative;float:left;width:calc(100% - 40px);margin:0 0 0 40px;padding:0 0 0 10px;-webkit-box-sizing:border-box;box-sizing:border-box}[id^=NotiflixNotifyWrap]>div.nx-rtl-on>.nx-message-icon{left:auto;right:8px}[id^=NotiflixNotifyWrap]>div.nx-rtl-on>span.nx-with-icon{padding:0 10px 0 0;margin:0 40px 0 0}[id^=NotiflixNotifyWrap]>div.nx-rtl-on>span.nx-close-button{right:auto;left:8px}[id^=NotiflixNotifyWrap]>div.nx-with-icon.nx-with-close-button.nx-rtl-on{padding:6px 6px 6px 36px}[id^=NotiflixNotifyWrap]>div.nx-with-close-button.nx-rtl-on{padding:10px 12px 10px 36px}[id^=NotiflixNotifyOverlay].nx-with-animation,[id^=NotiflixNotifyWrap]>div.nx-with-animation.nx-fade{-webkit-animation:notify-animation-fade .3s ease-in-out 0s normal;animation:notify-animation-fade .3s ease-in-out 0s normal}@-webkit-keyframes notify-animation-fade{0%{opacity:0}100%{opacity:1}}@keyframes notify-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixNotifyWrap]>div.nx-with-animation.nx-zoom{-webkit-animation:notify-animation-zoom .3s ease-in-out 0s normal;animation:notify-animation-zoom .3s ease-in-out 0s normal}@-webkit-keyframes notify-animation-zoom{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.05);transform:scale(1.05)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes notify-animation-zoom{0%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1.05);transform:scale(1.05)}100%{-webkit-transform:scale(1);transform:scale(1)}}[id^=NotiflixNotifyWrap]>div.nx-with-animation.nx-from-right{-webkit-animation:notify-animation-from-right .3s ease-in-out 0s normal;animation:notify-animation-from-right .3s ease-in-out 0s normal}@-webkit-keyframes notify-animation-from-right{0%{right:-300px;opacity:0}50%{right:8px;opacity:1}100%{right:0;opacity:1}}@keyframes notify-animation-from-right{0%{right:-300px;opacity:0}50%{right:8px;opacity:1}100%{right:0;opacity:1}}[id^=NotiflixNotifyWrap]>div.nx-with-animation.nx-from-left{-webkit-animation:notify-animation-from-left .3s ease-in-out 0s normal;animation:notify-animation-from-left .3s ease-in-out 0s normal}@-webkit-keyframes notify-animation-from-left{0%{left:-300px;opacity:0}50%{left:8px;opacity:1}100%{left:0;opacity:1}}@keyframes notify-animation-from-left{0%{left:-300px;opacity:0}50%{left:8px;opacity:1}100%{left:0;opacity:1}}[id^=NotiflixNotifyWrap]>div.nx-with-animation.nx-from-top{-webkit-animation:notify-animation-from-top .3s ease-in-out 0s normal;animation:notify-animation-from-top .3s ease-in-out 0s normal}@-webkit-keyframes notify-animation-from-top{0%{top:-50px;opacity:0}50%{top:8px;opacity:1}100%{top:0;opacity:1}}@keyframes notify-animation-from-top{0%{top:-50px;opacity:0}50%{top:8px;opacity:1}100%{top:0;opacity:1}}[id^=NotiflixNotifyWrap]>div.nx-with-animation.nx-from-bottom{-webkit-animation:notify-animation-from-bottom .3s ease-in-out 0s normal;animation:notify-animation-from-bottom .3s ease-in-out 0s normal}@-webkit-keyframes notify-animation-from-bottom{0%{bottom:-50px;opacity:0}50%{bottom:8px;opacity:1}100%{bottom:0;opacity:1}}@keyframes notify-animation-from-bottom{0%{bottom:-50px;opacity:0}50%{bottom:8px;opacity:1}100%{bottom:0;opacity:1}}[id^=NotiflixNotifyOverlay].nx-with-animation.nx-remove,[id^=NotiflixNotifyWrap]>div.nx-with-animation.nx-fade.nx-remove{opacity:0;-webkit-animation:notify-remove-fade .3s ease-in-out 0s normal;animation:notify-remove-fade .3s ease-in-out 0s normal}@-webkit-keyframes notify-remove-fade{0%{opacity:1}100%{opacity:0}}@keyframes notify-remove-fade{0%{opacity:1}100%{opacity:0}}[id^=NotiflixNotifyWrap]>div.nx-with-animation.nx-zoom.nx-remove{-webkit-transform:scale(0);transform:scale(0);-webkit-animation:notify-remove-zoom .3s ease-in-out 0s normal;animation:notify-remove-zoom .3s ease-in-out 0s normal}@-webkit-keyframes notify-remove-zoom{0%{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.05);transform:scale(1.05)}100%{-webkit-transform:scale(0);transform:scale(0)}}@keyframes notify-remove-zoom{0%{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.05);transform:scale(1.05)}100%{-webkit-transform:scale(0);transform:scale(0)}}[id^=NotiflixNotifyWrap]>div.nx-with-animation.nx-from-top.nx-remove{opacity:0;-webkit-animation:notify-remove-to-top .3s ease-in-out 0s normal;animation:notify-remove-to-top .3s ease-in-out 0s normal}@-webkit-keyframes notify-remove-to-top{0%{top:0;opacity:1}50%{top:8px;opacity:1}100%{top:-50px;opacity:0}}@keyframes notify-remove-to-top{0%{top:0;opacity:1}50%{top:8px;opacity:1}100%{top:-50px;opacity:0}}[id^=NotiflixNotifyWrap]>div.nx-with-animation.nx-from-right.nx-remove{opacity:0;-webkit-animation:notify-remove-to-right .3s ease-in-out 0s normal;animation:notify-remove-to-right .3s ease-in-out 0s normal}@-webkit-keyframes notify-remove-to-right{0%{right:0;opacity:1}50%{right:8px;opacity:1}100%{right:-300px;opacity:0}}@keyframes notify-remove-to-right{0%{right:0;opacity:1}50%{right:8px;opacity:1}100%{right:-300px;opacity:0}}[id^=NotiflixNotifyWrap]>div.nx-with-animation.nx-from-bottom.nx-remove{opacity:0;-webkit-animation:notify-remove-to-bottom .3s ease-in-out 0s normal;animation:notify-remove-to-bottom .3s ease-in-out 0s normal}@-webkit-keyframes notify-remove-to-bottom{0%{bottom:0;opacity:1}50%{bottom:8px;opacity:1}100%{bottom:-50px;opacity:0}}@keyframes notify-remove-to-bottom{0%{bottom:0;opacity:1}50%{bottom:8px;opacity:1}100%{bottom:-50px;opacity:0}}[id^=NotiflixNotifyWrap]>div.nx-with-animation.nx-from-left.nx-remove{opacity:0;-webkit-animation:notify-remove-to-left .3s ease-in-out 0s normal;animation:notify-remove-to-left .3s ease-in-out 0s normal}@-webkit-keyframes notify-remove-to-left{0%{left:0;opacity:1}50%{left:8px;opacity:1}100%{left:-300px;opacity:0}}@keyframes notify-remove-to-left{0%{left:0;opacity:1}50%{left:8px;opacity:1}100%{left:-300px;opacity:0}}'},J=0,Z=function(i,a,n,o){if(!O("body"))return!1;e||ct.Notify.init({});var r=P(!0,e,{});if("object"==typeof n&&!Array.isArray(n)||"object"==typeof o&&!Array.isArray(o)){var x={};"object"==typeof n?x=n:"object"==typeof o&&(x=o),e=P(!0,e,x)}var d=e[i.toLocaleLowerCase("en")];J++,"string"!=typeof a&&(a="Notiflix "+i),e.plainText&&(a=U(a)),!e.plainText&&a.length>e.messageMaxLength&&(e=P(!0,e,{closeButton:!0,messageMaxLength:150}),a='Possible HTML Tags Error: The "plainText" option is "false" and the notification content length is more than the "messageMaxLength" option.'),a.length>e.messageMaxLength&&(a=a.substring(0,e.messageMaxLength)+"..."),"shadow"===e.fontAwesomeIconStyle&&(d.fontAwesomeIconColor=d.background),e.cssAnimation||(e.cssAnimationDuration=0);var u=t.document.getElementById(p.wrapID)||t.document.createElement("div");if(u.id=p.wrapID,u.style.width=e.width,u.style.zIndex=e.zindex,u.style.opacity=e.opacity,"center-center"===e.position?(u.style.left=e.distance,u.style.top=e.distance,u.style.right=e.distance,u.style.bottom=e.distance,u.style.margin="auto",u.classList.add("nx-flex-center-center"),u.style.maxHeight="calc((100vh - "+e.distance+") - "+e.distance+")",u.style.display="flex",u.style.flexWrap="wrap",u.style.flexDirection="column",u.style.justifyContent="center",u.style.alignItems="center",u.style.pointerEvents="none"):"center-top"===e.position?(u.style.left=e.distance,u.style.right=e.distance,u.style.top=e.distance,u.style.bottom="auto",u.style.margin="auto"):"center-bottom"===e.position?(u.style.left=e.distance,u.style.right=e.distance,u.style.bottom=e.distance,u.style.top="auto",u.style.margin="auto"):"right-bottom"===e.position?(u.style.right=e.distance,u.style.bottom=e.distance,u.style.top="auto",u.style.left="auto"):"left-top"===e.position?(u.style.left=e.distance,u.style.top=e.distance,u.style.right="auto",u.style.bottom="auto"):"left-bottom"===e.position?(u.style.left=e.distance,u.style.bottom=e.distance,u.style.top="auto",u.style.right="auto"):(u.style.right=e.distance,u.style.top=e.distance,u.style.left="auto",u.style.bottom="auto"),e.backOverlay){var b=t.document.getElementById(p.overlayID)||t.document.createElement("div");b.id=p.overlayID,b.style.width="100%",b.style.height="100%",b.style.position="fixed",b.style.zIndex=e.zindex-1,b.style.left=0,b.style.top=0,b.style.right=0,b.style.bottom=0,b.style.background=d.backOverlayColor||e.backOverlayColor,b.className=e.cssAnimation?"nx-with-animation":"",b.style.animationDuration=e.cssAnimation?e.cssAnimationDuration+"ms":"",t.document.getElementById(p.overlayID)||t.document.body.appendChild(b)}t.document.getElementById(p.wrapID)||t.document.body.appendChild(u);var g=t.document.createElement("div");g.id=e.ID+"-"+J,g.className=e.className+" "+d.childClassName+" "+(e.cssAnimation?"nx-with-animation":"")+" "+(e.useIcon?"nx-with-icon":"")+" nx-"+e.cssAnimationStyle+" "+(e.closeButton&&"function"!=typeof n?"nx-with-close-button":"")+" "+("function"==typeof n?"nx-with-callback":"")+" "+(e.clickToClose?"nx-notify-click-to-close":""),g.style.fontSize=e.fontSize,g.style.color=d.textColor,g.style.background=d.background,g.style.borderRadius=e.borderRadius,g.style.pointerEvents="all",e.rtl&&(g.setAttribute("dir","rtl"),g.classList.add("nx-rtl-on")),g.style.fontFamily='"'+e.fontFamily+'", '+s,e.cssAnimation&&(g.style.animationDuration=e.cssAnimationDuration+"ms");var y="";if(e.closeButton&&"function"!=typeof n&&(y='<span class="nx-close-button"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><g><path fill="'+d.notiflixIconColor+'" d="M0.38 2.19l7.8 7.81 -7.8 7.81c-0.51,0.5 -0.51,1.31 -0.01,1.81 0.25,0.25 0.57,0.38 0.91,0.38 0.34,0 0.67,-0.14 0.91,-0.38l7.81 -7.81 7.81 7.81c0.24,0.24 0.57,0.38 0.91,0.38 0.34,0 0.66,-0.14 0.9,-0.38 0.51,-0.5 0.51,-1.31 0,-1.81l-7.81 -7.81 7.81 -7.81c0.51,-0.5 0.51,-1.31 0,-1.82 -0.5,-0.5 -1.31,-0.5 -1.81,0l-7.81 7.81 -7.81 -7.81c-0.5,-0.5 -1.31,-0.5 -1.81,0 -0.51,0.51 -0.51,1.32 0,1.82z"/></g></svg></span>'),e.useIcon)if(e.useFontAwesome)g.innerHTML='<i style="color:'+d.fontAwesomeIconColor+"; font-size:"+e.fontAwesomeIconSize+';" class="nx-message-icon nx-message-icon-fa '+d.fontAwesomeClassName+" "+("shadow"===e.fontAwesomeIconStyle?"nx-message-icon-fa-shadow":"nx-message-icon-fa-basic")+'"></i><span class="nx-message nx-with-icon">'+a+"</span>"+(e.closeButton?y:"");else{var k="";i===l?k='<svg class="nx-message-icon" xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40"><g><path fill="'+d.notiflixIconColor+'" d="M20 0c11.03,0 20,8.97 20,20 0,11.03 -8.97,20 -20,20 -11.03,0 -20,-8.97 -20,-20 0,-11.03 8.97,-20 20,-20zm0 37.98c9.92,0 17.98,-8.06 17.98,-17.98 0,-9.92 -8.06,-17.98 -17.98,-17.98 -9.92,0 -17.98,8.06 -17.98,17.98 0,9.92 8.06,17.98 17.98,17.98zm-2.4 -13.29l11.52 -12.96c0.37,-0.41 1.01,-0.45 1.42,-0.08 0.42,0.37 0.46,1 0.09,1.42l-12.16 13.67c-0.19,0.22 -0.46,0.34 -0.75,0.34 -0.23,0 -0.45,-0.07 -0.63,-0.22l-7.6 -6.07c-0.43,-0.35 -0.5,-0.99 -0.16,-1.42 0.35,-0.43 0.99,-0.5 1.42,-0.16l6.85 5.48z"/></g></svg>':i===c?k='<svg class="nx-message-icon" xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40"><g><path fill="'+d.notiflixIconColor+'" d="M20 0c11.03,0 20,8.97 20,20 0,11.03 -8.97,20 -20,20 -11.03,0 -20,-8.97 -20,-20 0,-11.03 8.97,-20 20,-20zm0 37.98c9.92,0 17.98,-8.06 17.98,-17.98 0,-9.92 -8.06,-17.98 -17.98,-17.98 -9.92,0 -17.98,8.06 -17.98,17.98 0,9.92 8.06,17.98 17.98,17.98zm1.42 -17.98l6.13 6.12c0.39,0.4 0.39,1.04 0,1.43 -0.19,0.19 -0.45,0.29 -0.71,0.29 -0.27,0 -0.53,-0.1 -0.72,-0.29l-6.12 -6.13 -6.13 6.13c-0.19,0.19 -0.44,0.29 -0.71,0.29 -0.27,0 -0.52,-0.1 -0.71,-0.29 -0.39,-0.39 -0.39,-1.03 0,-1.43l6.13 -6.12 -6.13 -6.13c-0.39,-0.39 -0.39,-1.03 0,-1.42 0.39,-0.39 1.03,-0.39 1.42,0l6.13 6.12 6.12 -6.12c0.4,-0.39 1.04,-0.39 1.43,0 0.39,0.39 0.39,1.03 0,1.42l-6.13 6.13z"/></g></svg>':i===m?k='<svg class="nx-message-icon" xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40"><g><path fill="'+d.notiflixIconColor+'" d="M21.91 3.48l17.8 30.89c0.84,1.46 -0.23,3.25 -1.91,3.25l-35.6 0c-1.68,0 -2.75,-1.79 -1.91,-3.25l17.8 -30.89c0.85,-1.47 2.97,-1.47 3.82,0zm16.15 31.84l-17.8 -30.89c-0.11,-0.2 -0.41,-0.2 -0.52,0l-17.8 30.89c-0.12,0.2 0.05,0.4 0.26,0.4l35.6 0c0.21,0 0.38,-0.2 0.26,-0.4zm-19.01 -4.12l0 -1.05c0,-0.53 0.42,-0.95 0.95,-0.95 0.53,0 0.95,0.42 0.95,0.95l0 1.05c0,0.53 -0.42,0.95 -0.95,0.95 -0.53,0 -0.95,-0.42 -0.95,-0.95zm0 -4.66l0 -13.39c0,-0.52 0.42,-0.95 0.95,-0.95 0.53,0 0.95,0.43 0.95,0.95l0 13.39c0,0.53 -0.42,0.96 -0.95,0.96 -0.53,0 -0.95,-0.43 -0.95,-0.96z"/></g></svg>':i===f&&(k='<svg class="nx-message-icon" xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40"><g><path fill="'+d.notiflixIconColor+'" d="M20 0c11.03,0 20,8.97 20,20 0,11.03 -8.97,20 -20,20 -11.03,0 -20,-8.97 -20,-20 0,-11.03 8.97,-20 20,-20zm0 37.98c9.92,0 17.98,-8.06 17.98,-17.98 0,-9.92 -8.06,-17.98 -17.98,-17.98 -9.92,0 -17.98,8.06 -17.98,17.98 0,9.92 8.06,17.98 17.98,17.98zm-0.99 -23.3c0,-0.54 0.44,-0.98 0.99,-0.98 0.55,0 0.99,0.44 0.99,0.98l0 15.86c0,0.55 -0.44,0.99 -0.99,0.99 -0.55,0 -0.99,-0.44 -0.99,-0.99l0 -15.86zm0 -5.22c0,-0.55 0.44,-0.99 0.99,-0.99 0.55,0 0.99,0.44 0.99,0.99l0 1.09c0,0.54 -0.44,0.99 -0.99,0.99 -0.55,0 -0.99,-0.45 -0.99,-0.99l0 -1.09z"/></g></svg>'),g.innerHTML=k+'<span class="nx-message nx-with-icon">'+a+"</span>"+(e.closeButton?y:"")}else g.innerHTML='<span class="nx-message">'+a+"</span>"+(e.closeButton?y:"");if("left-bottom"===e.position||"right-bottom"===e.position){var w=t.document.getElementById(p.wrapID);w.insertBefore(g,w.firstChild)}else t.document.getElementById(p.wrapID).appendChild(g);var h=t.document.getElementById(g.id);if(h){var v,N,z=function(){h.classList.add("nx-remove");var e=t.document.getElementById(p.overlayID);e&&0>=u.childElementCount&&e.classList.add("nx-remove"),clearTimeout(v)},C=function(){if(h&&null!==h.parentNode&&h.parentNode.removeChild(h),0>=u.childElementCount&&null!==u.parentNode){u.parentNode.removeChild(u);var e=t.document.getElementById(p.overlayID);e&&null!==e.parentNode&&e.parentNode.removeChild(e)}clearTimeout(N)};if(e.closeButton&&"function"!=typeof n)t.document.getElementById(g.id).querySelector("span.nx-close-button").addEventListener("click",(function(){z();var t=setTimeout((function(){C(),clearTimeout(t)}),e.cssAnimationDuration)}));if(("function"==typeof n||e.clickToClose)&&h.addEventListener("click",(function(){"function"==typeof n&&n(),z();var t=setTimeout((function(){C(),clearTimeout(t)}),e.cssAnimationDuration)})),!e.closeButton&&"function"!=typeof n){var L=function(){v=setTimeout((function(){z()}),e.timeout),N=setTimeout((function(){C()}),e.timeout+e.cssAnimationDuration)};L(),e.pauseOnHover&&(h.addEventListener("mouseenter",(function(){h.classList.add("nx-paused"),clearTimeout(v),clearTimeout(N)})),h.addEventListener("mouseleave",(function(){h.classList.remove("nx-paused"),L()})))}}if(e.showOnlyTheLastOne&&0<J)for(var S,W=t.document.querySelectorAll("[id^="+e.ID+"-]:not([id="+e.ID+"-"+J+"])"),I=0;I<W.length;I++)null!==(S=W[I]).parentNode&&S.parentNode.removeChild(S);e=P(!0,e,r)},_=function(){return'[id^=NotiflixReportWrap]{position:fixed;z-index:4002;width:100%;height:100%;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Quicksand",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;left:0;top:0;padding:10px;color:#1e1e1e;border-radius:25px;background:transparent;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}[id^=NotiflixReportWrap] *{-webkit-box-sizing:border-box;box-sizing:border-box}[id^=NotiflixReportWrap]>div[class*="-overlay"]{width:100%;height:100%;left:0;top:0;background:rgba(255,255,255,.5);position:fixed;z-index:0}[id^=NotiflixReportWrap]>div.nx-report-click-to-close{cursor:pointer}[id^=NotiflixReportWrap]>div[class*="-content"]{width:320px;max-width:100%;max-height:96vh;overflow-x:hidden;overflow-y:auto;border-radius:inherit;padding:10px;-webkit-filter:drop-shadow(0 0 5px rgba(0,0,0,0.05));filter:drop-shadow(0 0 5px rgba(0, 0, 0, .05));border:1px solid rgba(0,0,0,.03);background:#f8f8f8;position:relative;z-index:1}[id^=NotiflixReportWrap]>div[class*="-content"]::-webkit-scrollbar{width:0;height:0}[id^=NotiflixReportWrap]>div[class*="-content"]::-webkit-scrollbar-thumb{background:transparent}[id^=NotiflixReportWrap]>div[class*="-content"]::-webkit-scrollbar-track{background:transparent}[id^=NotiflixReportWrap]>div[class*="-content"]>div[class$="-icon"]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:110px;height:110px;display:block;margin:6px auto 12px}[id^=NotiflixReportWrap]>div[class*="-content"]>div[class$="-icon"] svg{min-width:100%;max-width:100%;height:auto}[id^=NotiflixReportWrap]>*>h5{word-break:break-all;word-break:break-word;font-family:inherit!important;font-size:16px;font-weight:500;line-height:1.4;margin:0 0 10px;padding:0 0 10px;border-bottom:1px solid rgba(0,0,0,.1);float:left;width:100%;text-align:center}[id^=NotiflixReportWrap]>*>p{word-break:break-all;word-break:break-word;font-family:inherit!important;font-size:13px;line-height:1.4;font-weight:normal;float:left;width:100%;padding:0 10px;margin:0 0 10px}[id^=NotiflixReportWrap] a#NXReportButton{word-break:break-all;word-break:break-word;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-family:inherit!important;-webkit-transition:all .25s ease-in-out;-o-transition:all .25s ease-in-out;transition:all .25s ease-in-out;cursor:pointer;float:right;padding:7px 17px;background:#32c682;font-size:14px;line-height:1.4;font-weight:500;border-radius:inherit!important;color:#fff}[id^=NotiflixReportWrap] a#NXReportButton:hover{-webkit-box-shadow:inset 0 -60px 5px -5px rgba(0,0,0,.25);box-shadow:inset 0 -60px 5px -5px rgba(0,0,0,.25)}[id^=NotiflixReportWrap].nx-rtl-on a#NXReportButton{float:left}[id^=NotiflixReportWrap]>div[class*="-overlay"].nx-with-animation{-webkit-animation:report-overlay-animation .3s ease-in-out 0s normal;animation:report-overlay-animation .3s ease-in-out 0s normal}@-webkit-keyframes report-overlay-animation{0%{opacity:0}100%{opacity:1}}@keyframes report-overlay-animation{0%{opacity:0}100%{opacity:1}}[id^=NotiflixReportWrap]>div[class*="-content"].nx-with-animation.nx-fade{-webkit-animation:report-animation-fade .3s ease-in-out 0s normal;animation:report-animation-fade .3s ease-in-out 0s normal}@-webkit-keyframes report-animation-fade{0%{opacity:0}100%{opacity:1}}@keyframes report-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixReportWrap]>div[class*="-content"].nx-with-animation.nx-zoom{-webkit-animation:report-animation-zoom .3s ease-in-out 0s normal;animation:report-animation-zoom .3s ease-in-out 0s normal}@-webkit-keyframes report-animation-zoom{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}50%{opacity:1;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes report-animation-zoom{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}50%{opacity:1;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}[id^=NotiflixReportWrap].nx-remove>div[class*="-overlay"].nx-with-animation{opacity:0;-webkit-animation:report-overlay-animation-remove .3s ease-in-out 0s normal;animation:report-overlay-animation-remove .3s ease-in-out 0s normal}@-webkit-keyframes report-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}@keyframes report-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixReportWrap].nx-remove>div[class*="-content"].nx-with-animation.nx-fade{opacity:0;-webkit-animation:report-animation-fade-remove .3s ease-in-out 0s normal;animation:report-animation-fade-remove .3s ease-in-out 0s normal}@-webkit-keyframes report-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@keyframes report-animation-fade-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixReportWrap].nx-remove>div[class*="-content"].nx-with-animation.nx-zoom{opacity:0;-webkit-animation:report-animation-zoom-remove .3s ease-in-out 0s normal;animation:report-animation-zoom-remove .3s ease-in-out 0s normal}@-webkit-keyframes report-animation-zoom-remove{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:.5;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:0;-webkit-transform:scale(0);transform:scale(0)}}@keyframes report-animation-zoom-remove{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:.5;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:0;-webkit-transform:scale(0);transform:scale(0)}}'},tt=function(e,a,n,o,r,l){if(!O("body"))return!1;i||ct.Report.init({});var c={};if("object"==typeof r&&!Array.isArray(r)||"object"==typeof l&&!Array.isArray(l)){var m={};"object"==typeof r?m=r:"object"==typeof l&&(m=l),c=P(!0,i,{}),i=P(!0,i,m)}var f=i[e.toLocaleLowerCase("en")];"string"!=typeof a&&(a="Notiflix "+e),"string"!=typeof n&&(e===x?n='"Do not try to become a person of success but try to become a person of value." <br><br>- Albert Einstein':e===d?n='"Failure is simply the opportunity to begin again, this time more intelligently." <br><br>- Henry Ford':e===u?n='"The peoples who want to live comfortably without producing and fatigue; they are doomed to lose their dignity, then liberty, and then independence and destiny." <br><br>- Mustafa Kemal Ataturk':e===b&&(n='"Knowledge rests not upon truth alone, but upon error also." <br><br>- Carl Gustav Jung')),"string"!=typeof o&&(o="Okay"),i.plainText&&(a=U(a),n=U(n),o=U(o)),i.plainText||(a.length>i.titleMaxLength&&(a="Possible HTML Tags Error",n='The "plainText" option is "false" and the title content length is more than the "titleMaxLength" option.',o="Okay"),n.length>i.messageMaxLength&&(a="Possible HTML Tags Error",n='The "plainText" option is "false" and the message content length is more than the "messageMaxLength" option.',o="Okay"),o.length>i.buttonMaxLength&&(a="Possible HTML Tags Error",n='The "plainText" option is "false" and the button content length is more than the "buttonMaxLength" option.',o="Okay")),a.length>i.titleMaxLength&&(a=a.substring(0,i.titleMaxLength)+"..."),n.length>i.messageMaxLength&&(n=n.substring(0,i.messageMaxLength)+"..."),o.length>i.buttonMaxLength&&(o=o.substring(0,i.buttonMaxLength)+"..."),i.cssAnimation||(i.cssAnimationDuration=0);var p=t.document.createElement("div");p.id=g.ID,p.className=i.className,p.style.zIndex=i.zindex,p.style.borderRadius=i.borderRadius,p.style.fontFamily='"'+i.fontFamily+'", '+s,i.rtl&&(p.setAttribute("dir","rtl"),p.classList.add("nx-rtl-on")),p.style.display="flex",p.style.flexWrap="wrap",p.style.flexDirection="column",p.style.alignItems="center",p.style.justifyContent="center";var y="",k=!0===i.backOverlayClickToClose;i.backOverlay&&(y='<div class="'+i.className+"-overlay"+(i.cssAnimation?" nx-with-animation":"")+(k?" nx-report-click-to-close":"")+'" style="background:'+(f.backOverlayColor||i.backOverlayColor)+";animation-duration:"+i.cssAnimationDuration+'ms;"></div>');var w="";if(e===x?w=function(t,e){return t||(t="110px"),e||(e="#32c682"),'<svg xmlns="http://www.w3.org/2000/svg" id="NXReportSuccess" width="'+t+'" height="'+t+'" fill="'+e+'" viewBox="0 0 120 120"><style>@-webkit-keyframes NXReportSuccess1-animation{0%{-webkit-transform:translate(60px,57.7px) scale(.5,.5) translate(-60px,-57.7px);transform:translate(60px,57.7px) scale(.5,.5) translate(-60px,-57.7px)}50%,to{-webkit-transform:translate(60px,57.7px) scale(1,1) translate(-60px,-57.7px);transform:translate(60px,57.7px) scale(1,1) translate(-60px,-57.7px)}60%{-webkit-transform:translate(60px,57.7px) scale(.95,.95) translate(-60px,-57.7px);transform:translate(60px,57.7px) scale(.95,.95) translate(-60px,-57.7px)}}@keyframes NXReportSuccess1-animation{0%{-webkit-transform:translate(60px,57.7px) scale(.5,.5) translate(-60px,-57.7px);transform:translate(60px,57.7px) scale(.5,.5) translate(-60px,-57.7px)}50%,to{-webkit-transform:translate(60px,57.7px) scale(1,1) translate(-60px,-57.7px);transform:translate(60px,57.7px) scale(1,1) translate(-60px,-57.7px)}60%{-webkit-transform:translate(60px,57.7px) scale(.95,.95) translate(-60px,-57.7px);transform:translate(60px,57.7px) scale(.95,.95) translate(-60px,-57.7px)}}@-webkit-keyframes NXReportSuccess4-animation{0%{opacity:0}50%,to{opacity:1}}@keyframes NXReportSuccess4-animation{0%{opacity:0}50%,to{opacity:1}}@-webkit-keyframes NXReportSuccess3-animation{0%{opacity:0}40%,to{opacity:1}}@keyframes NXReportSuccess3-animation{0%{opacity:0}40%,to{opacity:1}}@-webkit-keyframes NXReportSuccess2-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}40%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@keyframes NXReportSuccess2-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}40%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}#NXReportSuccess *{-webkit-animation-duration:1.2s;animation-duration:1.2s;-webkit-animation-timing-function:cubic-bezier(0,0,1,1);animation-timing-function:cubic-bezier(0,0,1,1)}</style><g style="-webkit-animation-name:NXReportSuccess2-animation;animation-name:NXReportSuccess2-animation;-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)"><path d="M60 115.38C29.46 115.38 4.62 90.54 4.62 60 4.62 29.46 29.46 4.62 60 4.62c30.54 0 55.38 24.84 55.38 55.38 0 30.54-24.84 55.38-55.38 55.38zM60 0C26.92 0 0 26.92 0 60s26.92 60 60 60 60-26.92 60-60S93.08 0 60 0z" style="-webkit-animation-name:NXReportSuccess3-animation;animation-name:NXReportSuccess3-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)" fill="inherit" data-animator-group="true" data-animator-type="2"/></g><g style="-webkit-animation-name:NXReportSuccess1-animation;animation-name:NXReportSuccess1-animation;-webkit-transform:translate(60px,57.7px) scale(1,1) translate(-60px,-57.7px);-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)"><path d="M88.27 35.39L52.8 75.29 31.43 58.2c-.98-.81-2.44-.63-3.24.36-.79.99-.63 2.44.36 3.24l23.08 18.46c.43.34.93.51 1.44.51.64 0 1.27-.26 1.74-.78l36.91-41.53a2.3 2.3 0 0 0-.19-3.26c-.95-.86-2.41-.77-3.26.19z" style="-webkit-animation-name:NXReportSuccess4-animation;animation-name:NXReportSuccess4-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)" fill="inherit" data-animator-group="true" data-animator-type="2"/></g></svg>'}(i.svgSize,f.svgColor):e===d?w=function(t,e){return t||(t="110px"),e||(e="#ff5549"),'<svg xmlns="http://www.w3.org/2000/svg" id="NXReportFailure" width="'+t+'" height="'+t+'" fill="'+e+'" viewBox="0 0 120 120"><style>@-webkit-keyframes NXReportFailure2-animation{0%{opacity:0}40%,to{opacity:1}}@keyframes NXReportFailure2-animation{0%{opacity:0}40%,to{opacity:1}}@-webkit-keyframes NXReportFailure1-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}40%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@keyframes NXReportFailure1-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}40%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@-webkit-keyframes NXReportFailure3-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}50%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@keyframes NXReportFailure3-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}50%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@-webkit-keyframes NXReportFailure4-animation{0%{opacity:0}50%,to{opacity:1}}@keyframes NXReportFailure4-animation{0%{opacity:0}50%,to{opacity:1}}#NXReportFailure *{-webkit-animation-duration:1.2s;animation-duration:1.2s;-webkit-animation-timing-function:cubic-bezier(0,0,1,1);animation-timing-function:cubic-bezier(0,0,1,1)}</style><g style="-webkit-animation-name:NXReportFailure1-animation;animation-name:NXReportFailure1-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1);-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)"><path d="M4.35 34.95c0-16.82 13.78-30.6 30.6-30.6h50.1c16.82 0 30.6 13.78 30.6 30.6v50.1c0 16.82-13.78 30.6-30.6 30.6h-50.1c-16.82 0-30.6-13.78-30.6-30.6v-50.1zM34.95 120h50.1c19.22 0 34.95-15.73 34.95-34.95v-50.1C120 15.73 104.27 0 85.05 0h-50.1C15.73 0 0 15.73 0 34.95v50.1C0 104.27 15.73 120 34.95 120z" style="-webkit-animation-name:NXReportFailure2-animation;animation-name:NXReportFailure2-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)" fill="inherit" data-animator-group="true" data-animator-type="2"/></g><g style="-webkit-animation-name:NXReportFailure3-animation;animation-name:NXReportFailure3-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1);-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)"><path d="M82.4 37.6c-.9-.9-2.37-.9-3.27 0L60 56.73 40.86 37.6a2.306 2.306 0 0 0-3.26 3.26L56.73 60 37.6 79.13c-.9.9-.9 2.37 0 3.27.45.45 1.04.68 1.63.68.59 0 1.18-.23 1.63-.68L60 63.26 79.13 82.4c.45.45 1.05.68 1.64.68.58 0 1.18-.23 1.63-.68.9-.9.9-2.37 0-3.27L63.26 60 82.4 40.86c.9-.91.9-2.36 0-3.26z" style="-webkit-animation-name:NXReportFailure4-animation;animation-name:NXReportFailure4-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)" fill="inherit" data-animator-group="true" data-animator-type="2"/></g></svg>'}(i.svgSize,f.svgColor):e===u?w=function(t,e){return t||(t="110px"),e||(e="#eebf31"),'<svg xmlns="http://www.w3.org/2000/svg" id="NXReportWarning" width="'+t+'" height="'+t+'" fill="'+e+'" viewBox="0 0 120 120"><style>@-webkit-keyframes NXReportWarning2-animation{0%{opacity:0}40%,to{opacity:1}}@keyframes NXReportWarning2-animation{0%{opacity:0}40%,to{opacity:1}}@-webkit-keyframes NXReportWarning1-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}40%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@keyframes NXReportWarning1-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}40%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@-webkit-keyframes NXReportWarning3-animation{0%{-webkit-transform:translate(60px,66.6px) scale(.5,.5) translate(-60px,-66.6px);transform:translate(60px,66.6px) scale(.5,.5) translate(-60px,-66.6px)}50%,to{-webkit-transform:translate(60px,66.6px) scale(1,1) translate(-60px,-66.6px);transform:translate(60px,66.6px) scale(1,1) translate(-60px,-66.6px)}60%{-webkit-transform:translate(60px,66.6px) scale(.95,.95) translate(-60px,-66.6px);transform:translate(60px,66.6px) scale(.95,.95) translate(-60px,-66.6px)}}@keyframes NXReportWarning3-animation{0%{-webkit-transform:translate(60px,66.6px) scale(.5,.5) translate(-60px,-66.6px);transform:translate(60px,66.6px) scale(.5,.5) translate(-60px,-66.6px)}50%,to{-webkit-transform:translate(60px,66.6px) scale(1,1) translate(-60px,-66.6px);transform:translate(60px,66.6px) scale(1,1) translate(-60px,-66.6px)}60%{-webkit-transform:translate(60px,66.6px) scale(.95,.95) translate(-60px,-66.6px);transform:translate(60px,66.6px) scale(.95,.95) translate(-60px,-66.6px)}}@-webkit-keyframes NXReportWarning4-animation{0%{opacity:0}50%,to{opacity:1}}@keyframes NXReportWarning4-animation{0%{opacity:0}50%,to{opacity:1}}#NXReportWarning *{-webkit-animation-duration:1.2s;animation-duration:1.2s;-webkit-animation-timing-function:cubic-bezier(0,0,1,1);animation-timing-function:cubic-bezier(0,0,1,1)}</style><g style="-webkit-animation-name:NXReportWarning1-animation;animation-name:NXReportWarning1-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1);-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)"><path d="M115.46 106.15l-54.04-93.8c-.61-1.06-2.23-1.06-2.84 0l-54.04 93.8c-.62 1.07.21 2.29 1.42 2.29h108.08c1.21 0 2.04-1.22 1.42-2.29zM65.17 10.2l54.04 93.8c2.28 3.96-.65 8.78-5.17 8.78H5.96c-4.52 0-7.45-4.82-5.17-8.78l54.04-93.8c2.28-3.95 8.03-4 10.34 0z" style="-webkit-animation-name:NXReportWarning2-animation;animation-name:NXReportWarning2-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)" fill="inherit" data-animator-group="true" data-animator-type="2"/></g><g style="-webkit-animation-name:NXReportWarning3-animation;animation-name:NXReportWarning3-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1);-webkit-transform:translate(60px,66.6px) scale(1,1) translate(-60px,-66.6px)"><path d="M57.83 94.01c0 1.2.97 2.17 2.17 2.17s2.17-.97 2.17-2.17v-3.2c0-1.2-.97-2.17-2.17-2.17s-2.17.97-2.17 2.17v3.2zm0-14.15c0 1.2.97 2.17 2.17 2.17s2.17-.97 2.17-2.17V39.21c0-1.2-.97-2.17-2.17-2.17s-2.17.97-2.17 2.17v40.65z" style="-webkit-animation-name:NXReportWarning4-animation;animation-name:NXReportWarning4-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)" fill="inherit" data-animator-group="true" data-animator-type="2"/></g></svg>'}(i.svgSize,f.svgColor):e===b&&(w=function(t,e){return t||(t="110px"),e||(e="#26c0d3"),'<svg xmlns="http://www.w3.org/2000/svg" id="NXReportInfo" width="'+t+'" height="'+t+'" fill="'+e+'" viewBox="0 0 120 120"><style>@-webkit-keyframes NXReportInfo4-animation{0%{opacity:0}50%,to{opacity:1}}@keyframes NXReportInfo4-animation{0%{opacity:0}50%,to{opacity:1}}@-webkit-keyframes NXReportInfo3-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}50%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@keyframes NXReportInfo3-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}50%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@-webkit-keyframes NXReportInfo2-animation{0%{opacity:0}40%,to{opacity:1}}@keyframes NXReportInfo2-animation{0%{opacity:0}40%,to{opacity:1}}@-webkit-keyframes NXReportInfo1-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}40%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}@keyframes NXReportInfo1-animation{0%{-webkit-transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px);transform:translate(60px,60px) scale(.5,.5) translate(-60px,-60px)}40%,to{-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px);transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)}60%{-webkit-transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px);transform:translate(60px,60px) scale(.95,.95) translate(-60px,-60px)}}#NXReportInfo *{-webkit-animation-duration:1.2s;animation-duration:1.2s;-webkit-animation-timing-function:cubic-bezier(0,0,1,1);animation-timing-function:cubic-bezier(0,0,1,1)}</style><g style="-webkit-animation-name:NXReportInfo1-animation;animation-name:NXReportInfo1-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1);-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)"><path d="M60 115.38C29.46 115.38 4.62 90.54 4.62 60 4.62 29.46 29.46 4.62 60 4.62c30.54 0 55.38 24.84 55.38 55.38 0 30.54-24.84 55.38-55.38 55.38zM60 0C26.92 0 0 26.92 0 60s26.92 60 60 60 60-26.92 60-60S93.08 0 60 0z" style="-webkit-animation-name:NXReportInfo2-animation;animation-name:NXReportInfo2-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)" fill="inherit" data-animator-group="true" data-animator-type="2"/></g><g style="-webkit-animation-name:NXReportInfo3-animation;animation-name:NXReportInfo3-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1);-webkit-transform:translate(60px,60px) scale(1,1) translate(-60px,-60px)"><path d="M57.75 43.85c0-1.24 1.01-2.25 2.25-2.25s2.25 1.01 2.25 2.25v48.18c0 1.24-1.01 2.25-2.25 2.25s-2.25-1.01-2.25-2.25V43.85zm0-15.88c0-1.24 1.01-2.25 2.25-2.25s2.25 1.01 2.25 2.25v3.32c0 1.25-1.01 2.25-2.25 2.25s-2.25-1-2.25-2.25v-3.32z" style="-webkit-animation-name:NXReportInfo4-animation;animation-name:NXReportInfo4-animation;-webkit-animation-timing-function:cubic-bezier(.42,0,.58,1);animation-timing-function:cubic-bezier(.42,0,.58,1)" fill="inherit" data-animator-group="true" data-animator-type="2"/></g></svg>'}(i.svgSize,f.svgColor)),p.innerHTML=y+'<div class="'+i.className+"-content"+(i.cssAnimation?" nx-with-animation ":"")+" nx-"+i.cssAnimationStyle+'" style="width:'+i.width+"; background:"+i.backgroundColor+"; animation-duration:"+i.cssAnimationDuration+'ms;"><div style="width:'+i.svgSize+"; height:"+i.svgSize+';" class="'+i.className+'-icon">'+w+'</div><h5 class="'+i.className+'-title" style="font-weight:500; font-size:'+i.titleFontSize+"; color:"+f.titleColor+';">'+a+'</h5><p class="'+i.className+'-message" style="font-size:'+i.messageFontSize+"; color:"+f.messageColor+';">'+n+'</p><a id="NXReportButton" class="'+i.className+'-button" style="font-weight:500; font-size:'+i.buttonFontSize+"; background:"+f.buttonBackground+"; color:"+f.buttonColor+';">'+o+"</a></div>",!t.document.getElementById(p.id)){t.document.body.appendChild(p);var h=function(){var e=t.document.getElementById(p.id);e.classList.add("nx-remove");var a=setTimeout((function(){null!==e.parentNode&&e.parentNode.removeChild(e),clearTimeout(a)}),i.cssAnimationDuration)};if(t.document.getElementById("NXReportButton").addEventListener("click",(function(){"function"==typeof r&&r(),h()})),y&&k)t.document.querySelector(".nx-report-click-to-close").addEventListener("click",(function(){h()}))}i=P(!0,i,c)},et=function(){return'[id^=NotiflixConfirmWrap]{position:fixed;z-index:4003;width:100%;height:100%;left:0;top:0;padding:10px;-webkit-box-sizing:border-box;box-sizing:border-box;background:transparent;font-family:"Quicksand",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}[id^=NotiflixConfirmWrap].nx-position-center-top{-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}[id^=NotiflixConfirmWrap].nx-position-center-bottom{-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}[id^=NotiflixConfirmWrap].nx-position-left-top{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}[id^=NotiflixConfirmWrap].nx-position-left-center{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start}[id^=NotiflixConfirmWrap].nx-position-left-bottom{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}[id^=NotiflixConfirmWrap].nx-position-right-top{-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}[id^=NotiflixConfirmWrap].nx-position-right-center{-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end}[id^=NotiflixConfirmWrap].nx-position-right-bottom{-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;align-items:flex-end;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}[id^=NotiflixConfirmWrap] *{-webkit-box-sizing:border-box;box-sizing:border-box}[id^=NotiflixConfirmWrap]>div[class*="-overlay"]{width:100%;height:100%;left:0;top:0;background:rgba(255,255,255,.5);position:fixed;z-index:0}[id^=NotiflixConfirmWrap]>div[class*="-overlay"].nx-with-animation{-webkit-animation:confirm-overlay-animation .3s ease-in-out 0s normal;animation:confirm-overlay-animation .3s ease-in-out 0s normal}@-webkit-keyframes confirm-overlay-animation{0%{opacity:0}100%{opacity:1}}@keyframes confirm-overlay-animation{0%{opacity:0}100%{opacity:1}}[id^=NotiflixConfirmWrap].nx-remove>div[class*="-overlay"].nx-with-animation{opacity:0;-webkit-animation:confirm-overlay-animation-remove .3s ease-in-out 0s normal;animation:confirm-overlay-animation-remove .3s ease-in-out 0s normal}@-webkit-keyframes confirm-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}@keyframes confirm-overlay-animation-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixConfirmWrap]>div[class*="-content"]{width:300px;max-width:100%;max-height:96vh;overflow-x:hidden;overflow-y:auto;border-radius:25px;padding:10px;margin:0;-webkit-filter:drop-shadow(0 0 5px rgba(0,0,0,0.05));filter:drop-shadow(0 0 5px rgba(0, 0, 0, .05));background:#f8f8f8;color:#1e1e1e;position:relative;z-index:1;text-align:center}[id^=NotiflixConfirmWrap]>div[class*="-content"]::-webkit-scrollbar{width:0;height:0}[id^=NotiflixConfirmWrap]>div[class*="-content"]::-webkit-scrollbar-thumb{background:transparent}[id^=NotiflixConfirmWrap]>div[class*="-content"]::-webkit-scrollbar-track{background:transparent}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]{float:left;width:100%;text-align:inherit}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>h5{float:left;width:100%;margin:0;padding:0 0 10px;border-bottom:1px solid rgba(0,0,0,.1);color:#32c682;font-family:inherit!important;font-size:16px;line-height:1.4;font-weight:500;text-align:inherit}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>div{font-family:inherit!important;margin:15px 0 20px;padding:0 10px;float:left;width:100%;font-size:14px;line-height:1.4;font-weight:normal;color:inherit;text-align:inherit}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>div>div{font-family:inherit!important;float:left;width:100%;margin:15px 0 0;padding:0}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>div>div>input{font-family:inherit!important;float:left;width:100%;height:40px;margin:0;padding:0 15px;border:1px solid rgba(0,0,0,.1);border-radius:25px;font-size:14px;font-weight:normal;line-height:1;-webkit-transition:all .25s ease-in-out;-o-transition:all .25s ease-in-out;transition:all .25s ease-in-out;text-align:left}[id^=NotiflixConfirmWrap].nx-rtl-on>div[class*="-content"]>div[class*="-head"]>div>div>input{text-align:right}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>div>div>input:hover{border-color:rgba(0,0,0,.1)}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>div>div>input:focus{border-color:rgba(0,0,0,.3)}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>div>div>input.nx-validation-failure{border-color:#ff5549}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-head"]>div>div>input.nx-validation-success{border-color:#32c682}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-buttons"]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:inherit;float:left;width:100%;text-align:inherit}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-buttons"]>a{cursor:pointer;font-family:inherit!important;-webkit-transition:all .25s ease-in-out;-o-transition:all .25s ease-in-out;transition:all .25s ease-in-out;float:left;width:48%;padding:9px 5px;border-radius:inherit!important;font-weight:500;font-size:15px;line-height:1.4;color:#f8f8f8;text-align:inherit}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-buttons"]>a.nx-confirm-button-ok{margin:0 2% 0 0;background:#32c682}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-buttons"]>a.nx-confirm-button-cancel{margin:0 0 0 2%;background:#a9a9a9}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-buttons"]>a.nx-full{margin:0;width:100%}[id^=NotiflixConfirmWrap]>div[class*="-content"]>div[class*="-buttons"]>a:hover{-webkit-box-shadow:inset 0 -60px 5px -5px rgba(0,0,0,.25);box-shadow:inset 0 -60px 5px -5px rgba(0,0,0,.25)}[id^=NotiflixConfirmWrap].nx-rtl-on>div[class*="-content"]>div[class*="-buttons"],[id^=NotiflixConfirmWrap].nx-rtl-on>div[class*="-content"]>div[class*="-buttons"]>a{-webkit-transform:rotateY(180deg);transform:rotateY(180deg)}[id^=NotiflixConfirmWrap].nx-with-animation.nx-fade>div[class*="-content"]{-webkit-animation:confirm-animation-fade .3s ease-in-out 0s normal;animation:confirm-animation-fade .3s ease-in-out 0s normal}@-webkit-keyframes confirm-animation-fade{0%{opacity:0}100%{opacity:1}}@keyframes confirm-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixConfirmWrap].nx-with-animation.nx-zoom>div[class*="-content"]{-webkit-animation:confirm-animation-zoom .3s ease-in-out 0s normal;animation:confirm-animation-zoom .3s ease-in-out 0s normal}@-webkit-keyframes confirm-animation-zoom{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}50%{opacity:1;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes confirm-animation-zoom{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}50%{opacity:1;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}[id^=NotiflixConfirmWrap].nx-with-animation.nx-fade.nx-remove>div[class*="-content"]{opacity:0;-webkit-animation:confirm-animation-fade-remove .3s ease-in-out 0s normal;animation:confirm-animation-fade-remove .3s ease-in-out 0s normal}@-webkit-keyframes confirm-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@keyframes confirm-animation-fade-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixConfirmWrap].nx-with-animation.nx-zoom.nx-remove>div[class*="-content"]{opacity:0;-webkit-animation:confirm-animation-zoom-remove .3s ease-in-out 0s normal;animation:confirm-animation-zoom-remove .3s ease-in-out 0s normal}@-webkit-keyframes confirm-animation-zoom-remove{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:.5;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:0;-webkit-transform:scale(0);transform:scale(0)}}@keyframes confirm-animation-zoom-remove{0%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}50%{opacity:.5;-webkit-transform:scale(1.05);transform:scale(1.05)}100%{opacity:0;-webkit-transform:scale(0);transform:scale(0)}}'},it=function(e,i,n,o,r,l,c,m,f){if(!O("body"))return!1;a||ct.Confirm.init({});var p=P(!0,a,{});"object"!=typeof f||Array.isArray(f)||(a=P(!0,a,f)),"string"!=typeof i&&(i="Notiflix Confirm"),"string"!=typeof n&&(n="Do you agree with me?"),"string"!=typeof r&&(r="Yes"),"string"!=typeof l&&(l="No"),"function"!=typeof c&&(c=void 0),"function"!=typeof m&&(m=void 0),a.plainText&&(i=U(i),n=U(n),r=U(r),l=U(l)),a.plainText||(i.length>a.titleMaxLength&&(i="Possible HTML Tags Error",n='The "plainText" option is "false" and the title content length is more than "titleMaxLength" option.',r="Okay",l="..."),n.length>a.messageMaxLength&&(i="Possible HTML Tags Error",n='The "plainText" option is "false" and the message content length is more than "messageMaxLength" option.',r="Okay",l="..."),(r.length||l.length)>a.buttonsMaxLength&&(i="Possible HTML Tags Error",n='The "plainText" option is "false" and the buttons content length is more than "buttonsMaxLength" option.',r="Okay",l="...")),i.length>a.titleMaxLength&&(i=i.substring(0,a.titleMaxLength)+"..."),n.length>a.messageMaxLength&&(n=n.substring(0,a.messageMaxLength)+"..."),r.length>a.buttonsMaxLength&&(r=r.substring(0,a.buttonsMaxLength)+"..."),l.length>a.buttonsMaxLength&&(l=l.substring(0,a.buttonsMaxLength)+"..."),a.cssAnimation||(a.cssAnimationDuration=0);var x=t.document.createElement("div");x.id=h.ID,x.className=a.className+(a.cssAnimation?" nx-with-animation nx-"+a.cssAnimationStyle:""),x.style.zIndex=a.zindex,x.style.padding=a.distance,a.rtl&&(x.setAttribute("dir","rtl"),x.classList.add("nx-rtl-on"));var d="string"==typeof a.position?a.position.trim():"center";x.classList.add("nx-position-"+d),x.style.fontFamily='"'+a.fontFamily+'", '+s;var u="";a.backOverlay&&(u='<div class="'+a.className+"-overlay"+(a.cssAnimation?" nx-with-animation":"")+'" style="background:'+a.backOverlayColor+";animation-duration:"+a.cssAnimationDuration+'ms;"></div>');var b="";"function"==typeof c&&(b='<a id="NXConfirmButtonCancel" class="nx-confirm-button-cancel" style="color:'+a.cancelButtonColor+";background:"+a.cancelButtonBackground+";font-size:"+a.buttonsFontSize+';">'+l+"</a>");var g="",y=null,v=void 0;if(e===k||e===w){y=o||"";var N=e===k||200<y.length?Math.ceil(1.5*y.length):250;g='<div><input id="NXConfirmValidationInput" type="text" '+(e===w?'value="'+y+'"':"")+' maxlength="'+N+'" style="font-size:'+a.messageFontSize+";border-radius: "+a.borderRadius+';" autocomplete="off" spellcheck="false" autocapitalize="none" /></div>'}if(x.innerHTML=u+'<div class="'+a.className+'-content" style="width:'+a.width+"; background:"+a.backgroundColor+"; animation-duration:"+a.cssAnimationDuration+"ms; border-radius: "+a.borderRadius+';"><div class="'+a.className+'-head"><h5 style="color:'+a.titleColor+";font-size:"+a.titleFontSize+';">'+i+'</h5><div style="color:'+a.messageColor+";font-size:"+a.messageFontSize+';">'+n+g+'</div></div><div class="'+a.className+'-buttons"><a id="NXConfirmButtonOk" class="nx-confirm-button-ok'+("function"==typeof c?"":" nx-full")+'" style="color:'+a.okButtonColor+";background:"+a.okButtonBackground+";font-size:"+a.buttonsFontSize+';">'+r+"</a>"+b+"</div></div>",!t.document.getElementById(x.id)){t.document.body.appendChild(x);var z=t.document.getElementById(x.id),C=t.document.getElementById("NXConfirmButtonOk"),L=t.document.getElementById("NXConfirmValidationInput");if(L&&(L.focus(),L.setSelectionRange(0,(L.value||"").length),L.addEventListener("keyup",(function(t){var i=t.target.value;e===k&&i!==y?(t.preventDefault(),L.classList.add("nx-validation-failure"),L.classList.remove("nx-validation-success")):(e===k&&(L.classList.remove("nx-validation-failure"),L.classList.add("nx-validation-success")),("enter"===(t.key||"").toLocaleLowerCase("en")||13===t.keyCode)&&C.dispatchEvent(new Event("click")))}))),C.addEventListener("click",(function(t){if(e===k&&y&&L){if((L.value||"").toString()!==y)return L.focus(),L.classList.add("nx-validation-failure"),t.stopPropagation(),t.preventDefault(),t.returnValue=!1,t.cancelBubble=!0,!1;L.classList.remove("nx-validation-failure")}"function"==typeof c&&(e===w&&L&&(v=L.value||""),c(v)),z.classList.add("nx-remove");var i=setTimeout((function(){null!==z.parentNode&&(z.parentNode.removeChild(z),clearTimeout(i))}),a.cssAnimationDuration)})),"function"==typeof c)t.document.getElementById("NXConfirmButtonCancel").addEventListener("click",(function(){"function"==typeof m&&(e===w&&L&&(v=L.value||""),m(v)),z.classList.add("nx-remove");var t=setTimeout((function(){null!==z.parentNode&&(z.parentNode.removeChild(z),clearTimeout(t))}),a.cssAnimationDuration)}))}a=P(!0,a,p)},at=function(){return'[id^=NotiflixLoadingWrap]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:fixed;z-index:4000;width:100%;height:100%;left:0;top:0;right:0;bottom:0;margin:auto;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;background:rgba(0,0,0,.8);font-family:"Quicksand",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}[id^=NotiflixLoadingWrap] *{-webkit-box-sizing:border-box;box-sizing:border-box}[id^=NotiflixLoadingWrap].nx-loading-click-to-close{cursor:pointer}[id^=NotiflixLoadingWrap]>div[class*="-icon"]{width:60px;height:60px;position:relative;-webkit-transition:top .2s ease-in-out;-o-transition:top .2s ease-in-out;transition:top .2s ease-in-out;margin:0 auto}[id^=NotiflixLoadingWrap]>div[class*="-icon"] img,[id^=NotiflixLoadingWrap]>div[class*="-icon"] svg{max-width:unset;max-height:unset;width:100%;height:auto;position:absolute;left:0;top:0}[id^=NotiflixLoadingWrap]>p{position:relative;margin:10px auto 0;font-family:inherit!important;font-weight:normal;font-size:15px;line-height:1.4;padding:0 10px;width:100%;text-align:center}[id^=NotiflixLoadingWrap].nx-with-animation{-webkit-animation:loading-animation-fade .3s ease-in-out 0s normal;animation:loading-animation-fade .3s ease-in-out 0s normal}@-webkit-keyframes loading-animation-fade{0%{opacity:0}100%{opacity:1}}@keyframes loading-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixLoadingWrap].nx-with-animation.nx-remove{opacity:0;-webkit-animation:loading-animation-fade-remove .3s ease-in-out 0s normal;animation:loading-animation-fade-remove .3s ease-in-out 0s normal}@-webkit-keyframes loading-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@keyframes loading-animation-fade-remove{0%{opacity:1}100%{opacity:0}}[id^=NotiflixLoadingWrap]>p.nx-loading-message-new{-webkit-animation:loading-new-message-fade .3s ease-in-out 0s normal;animation:loading-new-message-fade .3s ease-in-out 0s normal}@-webkit-keyframes loading-new-message-fade{0%{opacity:0}100%{opacity:1}}@keyframes loading-new-message-fade{0%{opacity:0}100%{opacity:1}}'},nt=function(e,i,a,o,r){if(!O("body"))return!1;n||ct.Loading.init({});var l=P(!0,n,{});if("object"==typeof i&&!Array.isArray(i)||"object"==typeof a&&!Array.isArray(a)){var c={};"object"==typeof i?c=i:"object"==typeof a&&(c=a),n=P(!0,n,c)}var m="";if("string"==typeof i&&0<i.length&&(m=i),o){var f="";0<(m=m.length>n.messageMaxLength?U(m).toString().substring(0,n.messageMaxLength)+"...":U(m).toString()).length&&(f='<p id="'+n.messageID+'" class="nx-loading-message" style="color:'+n.messageColor+";font-size:"+n.messageFontSize+';">'+m+"</p>"),n.cssAnimation||(n.cssAnimationDuration=0);var p="";if(e===v)p=V(n.svgSize,n.svgColor);else if(e===N)p=Q(n.svgSize,n.svgColor);else if(e===z)p=Y(n.svgSize,n.svgColor);else if(e===C)p=q(n.svgSize,n.svgColor);else if(e===L)p=G(n.svgSize,n.svgColor);else if(e===S)p=K(n.svgSize,n.svgColor);else if(e===W&&null!==n.customSvgCode&&null===n.customSvgUrl)p=n.customSvgCode||"";else if(e===W&&null!==n.customSvgUrl&&null===n.customSvgCode)p='<img class="nx-custom-loading-icon" width="'+n.svgSize+'" height="'+n.svgSize+'" src="'+n.customSvgUrl+'" alt="Notiflix">';else{if(e===W&&(null===n.customSvgUrl||null===n.customSvgCode))return F('You have to set a static SVG url to "customSvgUrl" option to use Loading Custom.'),!1;p=function(t,e,i){return t||(t="60px"),e||(e="#f8f8f8"),i||(i="#32c682"),'<svg xmlns="http://www.w3.org/2000/svg" id="NXLoadingNotiflixLib" width="'+t+'" height="'+t+'" viewBox="0 0 200 200"><defs><style>@keyframes notiflix-n{0%{stroke-dashoffset:1000}to{stroke-dashoffset:0}}@keyframes notiflix-x{0%{stroke-dashoffset:1000}to{stroke-dashoffset:0}}@keyframes notiflix-dot{0%,to{stroke-width:0}50%{stroke-width:12}}.nx-icon-line{stroke:'+e+';stroke-width:12;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:22;fill:none}</style></defs><path d="M47.97 135.05a6.5 6.5 0 1 1 0 13 6.5 6.5 0 0 1 0-13z" style="animation-name:notiflix-dot;animation-timing-function:ease-in-out;animation-duration:1.25s;animation-iteration-count:infinite;animation-direction:normal" fill="'+i+'" stroke="'+i+'" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="22" stroke-width="12"/><path class="nx-icon-line" d="M10.14 144.76V87.55c0-5.68-4.54-41.36 37.83-41.36 42.36 0 37.82 35.68 37.82 41.36v57.21" style="animation-name:notiflix-n;animation-timing-function:linear;animation-duration:2.5s;animation-delay:0s;animation-iteration-count:infinite;animation-direction:normal" stroke-dasharray="500"/><path class="nx-icon-line" d="M115.06 144.49c24.98-32.68 49.96-65.35 74.94-98.03M114.89 46.6c25.09 32.58 50.19 65.17 75.29 97.75" style="animation-name:notiflix-x;animation-timing-function:linear;animation-duration:2.5s;animation-delay:.2s;animation-iteration-count:infinite;animation-direction:normal" stroke-dasharray="500"/></svg>'}(n.svgSize,"#f8f8f8","#32c682")}var x=parseInt((n.svgSize||"").replace(/[^0-9]/g,"")),d=t.innerWidth,u=x>=d?d-40+"px":x+"px",b='<div style="width:'+u+"; height:"+u+';" class="'+n.className+"-icon"+(0<m.length?" nx-with-message":"")+'">'+p+"</div>",g=t.document.createElement("div");if(g.id=R.ID,g.className=n.className+(n.cssAnimation?" nx-with-animation":"")+(n.clickToClose?" nx-loading-click-to-close":""),g.style.zIndex=n.zindex,g.style.background=n.backgroundColor,g.style.animationDuration=n.cssAnimationDuration+"ms",g.style.fontFamily='"'+n.fontFamily+'", '+s,g.style.display="flex",g.style.flexWrap="wrap",g.style.flexDirection="column",g.style.alignItems="center",g.style.justifyContent="center",n.rtl&&(g.setAttribute("dir","rtl"),g.classList.add("nx-rtl-on")),g.innerHTML=b+f,!t.document.getElementById(g.id)&&(t.document.body.appendChild(g),n.clickToClose))t.document.getElementById(g.id).addEventListener("click",(function(){g.classList.add("nx-remove");var t=setTimeout((function(){null!==g.parentNode&&(g.parentNode.removeChild(g),clearTimeout(t))}),n.cssAnimationDuration)}))}else if(t.document.getElementById(R.ID))var y=t.document.getElementById(R.ID),k=setTimeout((function(){y.classList.add("nx-remove");var t=setTimeout((function(){null!==y.parentNode&&(y.parentNode.removeChild(y),clearTimeout(t))}),n.cssAnimationDuration);clearTimeout(k)}),r);n=P(!0,n,l)},ot=function(e){"string"!=typeof e&&(e="");var i=t.document.getElementById(R.ID);if(i)if(0<e.length){e=e.length>n.messageMaxLength?U(e).substring(0,n.messageMaxLength)+"...":U(e);var a=i.getElementsByTagName("p")[0];if(a)a.innerHTML=e;else{var o=t.document.createElement("p");o.id=n.messageID,o.className="nx-loading-message nx-loading-message-new",o.style.color=n.messageColor,o.style.fontSize=n.messageFontSize,o.innerHTML=e,i.appendChild(o)}}else F("Where is the new message?")},rt=function(){return'[id^=NotiflixBlockWrap]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;z-index:1000;font-family:"Quicksand",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;background:rgba(255,255,255,.9);text-align:center;animation-duration:.4s;width:100%;height:100%;left:0;top:0;border-radius:inherit;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}[id^=NotiflixBlockWrap] *{-webkit-box-sizing:border-box;box-sizing:border-box}[id^=NotiflixBlockWrap]>span[class*="-icon"]{display:block;width:45px;height:45px;position:relative;margin:0 auto}[id^=NotiflixBlockWrap]>span[class*="-icon"] svg{width:inherit;height:inherit}[id^=NotiflixBlockWrap]>span[class*="-message"]{position:relative;display:block;width:100%;margin:10px auto 0;padding:0 10px;font-family:inherit!important;font-weight:normal;font-size:14px;line-height:1.4}[id^=NotiflixBlockWrap].nx-with-animation{-webkit-animation:block-animation-fade .3s ease-in-out 0s normal;animation:block-animation-fade .3s ease-in-out 0s normal}@-webkit-keyframes block-animation-fade{0%{opacity:0}100%{opacity:1}}@keyframes block-animation-fade{0%{opacity:0}100%{opacity:1}}[id^=NotiflixBlockWrap].nx-with-animation.nx-remove{opacity:0;-webkit-animation:block-animation-fade-remove .3s ease-in-out 0s normal;animation:block-animation-fade-remove .3s ease-in-out 0s normal}@-webkit-keyframes block-animation-fade-remove{0%{opacity:1}100%{opacity:0}}@keyframes block-animation-fade-remove{0%{opacity:1}100%{opacity:0}}'},st=0,lt=function(e,i,a,n,r,l){var c;if(Array.isArray(a)){if(1>a.length)return F("Array of HTMLElements should contains at least one HTMLElement."),!1;c=a}else if(Object.prototype.isPrototypeOf.call(NodeList.prototype,a)){if(1>a.length)return F("NodeListOf<HTMLElement> should contains at least one HTMLElement."),!1;c=Array.prototype.slice.call(a)}else{if("string"!=typeof a||1>(a||"").length||1===(a||"").length&&("#"===(a||"")[0]||"."===(a||"")[0]))return F("The selector parameter must be a string and matches a specified CSS selector(s)."),!1;var m=t.document.querySelectorAll(a);if(1>m.length)return F('You called the "Notiflix.Block..." function with "'+a+'" selector, but there is no such element(s) in the document.'),!1;c=m}o||ct.Block.init({});var f=P(!0,o,{});if("object"==typeof n&&!Array.isArray(n)||"object"==typeof r&&!Array.isArray(r)){var p={};"object"==typeof n?p=n:"object"==typeof r&&(p=r),o=P(!0,o,p)}var x="";"string"==typeof n&&0<n.length&&(x=n),o.cssAnimation||(o.cssAnimationDuration=0);var d=E.className;"string"==typeof o.className&&(d=o.className.trim());var u="number"==typeof o.querySelectorLimit?o.querySelectorLimit:200,b=(c||[]).length>=u?u:c.length,g="nx-block-temporary-position";if(e){for(var y,k=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr","html","head","title","script","style","iframe"],w=0;w<b;w++)if(y=c[w]){if(-1<k.indexOf(y.tagName.toLocaleLowerCase("en")))break;var h=y.querySelectorAll("[id^="+E.ID+"]");if(1>h.length){var v="";i&&(v=i===M?Q(o.svgSize,o.svgColor):i===T?Y(o.svgSize,o.svgColor):i===B?q(o.svgSize,o.svgColor):i===X?G(o.svgSize,o.svgColor):i===D?K(o.svgSize,o.svgColor):V(o.svgSize,o.svgColor));var N='<span class="'+d+'-icon" style="width:'+o.svgSize+";height:"+o.svgSize+';">'+v+"</span>",z="";0<x.length&&(x=x.length>o.messageMaxLength?U(x).substring(0,o.messageMaxLength)+"...":U(x),z='<span style="font-size:'+o.messageFontSize+";color:"+o.messageColor+';" class="'+d+'-message">'+x+"</span>"),st++;var C=t.document.createElement("div");C.id=E.ID+"-"+st,C.className=d+(o.cssAnimation?" nx-with-animation":""),C.style.position=o.position,C.style.zIndex=o.zindex,C.style.background=o.backgroundColor,C.style.animationDuration=o.cssAnimationDuration+"ms",C.style.fontFamily='"'+o.fontFamily+'", '+s,C.style.display="flex",C.style.flexWrap="wrap",C.style.flexDirection="column",C.style.alignItems="center",C.style.justifyContent="center",o.rtl&&(C.setAttribute("dir","rtl"),C.classList.add("nx-rtl-on")),C.innerHTML=N+z;var L=t.getComputedStyle(y).getPropertyValue("position"),S="string"==typeof L?L.toLocaleLowerCase("en"):"relative",W=Math.round(1.25*parseInt(o.svgSize))+40,I="";W>(y.offsetHeight||0)&&(I="min-height:"+W+"px;");var R;R=y.getAttribute("id")?"#"+y.getAttribute("id"):y.classList[0]?"."+y.classList[0]:(y.tagName||"").toLocaleLowerCase("en");var A="",H=-1>=["absolute","relative","fixed","sticky"].indexOf(S);if(H||0<I.length){if(!O("head"))return!1;H&&(A="position:relative!important;");var $='<style id="Style-'+E.ID+"-"+st+'">'+R+"."+g+"{"+A+I+"}</style>",J=t.document.createRange();J.selectNode(t.document.head);var Z=J.createContextualFragment($);t.document.head.appendChild(Z),y.classList.add(g)}y.appendChild(C)}}}else var _=function(e){var i=setTimeout((function(){null!==e.parentNode&&e.parentNode.removeChild(e);var a=e.getAttribute("id"),n=t.document.getElementById("Style-"+a);n&&null!==n.parentNode&&n.parentNode.removeChild(n),clearTimeout(i)}),o.cssAnimationDuration)},tt=function(t){if(t&&0<t.length)for(var e,i=0;i<t.length;i++)(e=t[i])&&(e.classList.add("nx-remove"),_(e));else j("string"==typeof a?'"Notiflix.Block.remove();" function called with "'+a+'" selector, but this selector does not have a "Block" element to remove.':'"Notiflix.Block.remove();" function called with "'+a+'", but this "Array<HTMLElement>" or "NodeListOf<HTMLElement>" does not have a "Block" element to remove.')},et=function(t){var e=setTimeout((function(){t.classList.remove(g),clearTimeout(e)}),o.cssAnimationDuration+300)},it=setTimeout((function(){for(var t,e=0;e<b;e++)(t=c[e])&&(et(t),h=t.querySelectorAll("[id^="+E.ID+"]"),tt(h));clearTimeout(it)}),l);o=P(!0,o,f)},ct={Notify:{init:function(t){e=P(!0,p,t),H($,"NotiflixNotifyInternalCSS")},merge:function(t){return e?void(e=P(!0,e,t)):(F("You have to initialize the Notify module before call Merge function."),!1)},success:function(t,e,i){Z(l,t,e,i)},failure:function(t,e,i){Z(c,t,e,i)},warning:function(t,e,i){Z(m,t,e,i)},info:function(t,e,i){Z(f,t,e,i)}},Report:{init:function(t){i=P(!0,g,t),H(_,"NotiflixReportInternalCSS")},merge:function(t){return i?void(i=P(!0,i,t)):(F("You have to initialize the Report module before call Merge function."),!1)},success:function(t,e,i,a,n){tt(x,t,e,i,a,n)},failure:function(t,e,i,a,n){tt(d,t,e,i,a,n)},warning:function(t,e,i,a,n){tt(u,t,e,i,a,n)},info:function(t,e,i,a,n){tt(b,t,e,i,a,n)}},Confirm:{init:function(t){a=P(!0,h,t),H(et,"NotiflixConfirmInternalCSS")},merge:function(t){return a?void(a=P(!0,a,t)):(F("You have to initialize the Confirm module before call Merge function."),!1)},show:function(t,e,i,a,n,o,r){it(y,t,e,null,i,a,n,o,r)},ask:function(t,e,i,a,n,o,r,s){it(k,t,e,i,a,n,o,r,s)},prompt:function(t,e,i,a,n,o,r,s){it(w,t,e,i,a,n,o,r,s)}},Loading:{init:function(t){n=P(!0,R,t),H(at,"NotiflixLoadingInternalCSS")},merge:function(t){return n?void(n=P(!0,n,t)):(F("You have to initialize the Loading module before call Merge function."),!1)},standard:function(t,e){nt(v,t,e,!0,0)},hourglass:function(t,e){nt(N,t,e,!0,0)},circle:function(t,e){nt(z,t,e,!0,0)},arrows:function(t,e){nt(C,t,e,!0,0)},dots:function(t,e){nt(L,t,e,!0,0)},pulse:function(t,e){nt(S,t,e,!0,0)},custom:function(t,e){nt(W,t,e,!0,0)},notiflix:function(t,e){nt(I,t,e,!0,0)},remove:function(t){"number"!=typeof t&&(t=0),nt(null,null,null,!1,t)},change:function(t){ot(t)}},Block:{init:function(t){o=P(!0,E,t),H(rt,"NotiflixBlockInternalCSS")},merge:function(t){return o?void(o=P(!0,o,t)):(F('You have to initialize the "Notiflix.Block" module before call Merge function.'),!1)},standard:function(t,e,i){lt(!0,A,t,e,i)},hourglass:function(t,e,i){lt(!0,M,t,e,i)},circle:function(t,e,i){lt(!0,T,t,e,i)},arrows:function(t,e,i){lt(!0,B,t,e,i)},dots:function(t,e,i){lt(!0,X,t,e,i)},pulse:function(t,e,i){lt(!0,D,t,e,i)},remove:function(t,e){"number"!=typeof e&&(e=0),lt(!1,null,t,null,null,e)}}};return"object"==typeof t.Notiflix?P(!0,t.Notiflix,{Notify:ct.Notify,Report:ct.Report,Confirm:ct.Confirm,Loading:ct.Loading,Block:ct.Block}):{Notify:ct.Notify,Report:ct.Report,Confirm:ct.Confirm,Loading:ct.Loading,Block:ct.Block}}));
|
class/dashboard/class-dashboard.php
CHANGED
@@ -185,8 +185,8 @@ class Dashboard {
|
|
185 |
* Load scripts
|
186 |
*/
|
187 |
public function load_asset() {
|
188 |
-
wp_enqueue_style( 'notiflix', JEG_ELEMENTOR_KIT_URL . '/assets/js/notiflix/notiflix.min.css', null, '2.
|
189 |
-
wp_enqueue_script( 'notiflix', JEG_ELEMENTOR_KIT_URL . '/assets/js/notiflix/notiflix.min.js', array(), '2.
|
190 |
|
191 |
wp_register_script( 'jkit-dashboard', JEG_ELEMENTOR_KIT_URL . '/assets/js/dashboard/dashboard.js', array( 'underscore', 'jquery', 'jquery-ui-draggable', 'jquery-ui-sortable', 'notiflix' ), JEG_ELEMENTOR_KIT_VERSION, true );
|
192 |
wp_add_inline_script( 'jkit-dashboard', $this->ajax_url() );
|
185 |
* Load scripts
|
186 |
*/
|
187 |
public function load_asset() {
|
188 |
+
wp_enqueue_style( 'notiflix', JEG_ELEMENTOR_KIT_URL . '/assets/js/notiflix/notiflix.min.css', null, '3.2.5' );
|
189 |
+
wp_enqueue_script( 'notiflix', JEG_ELEMENTOR_KIT_URL . '/assets/js/notiflix/notiflix.min.js', array(), '3.2.5', true );
|
190 |
|
191 |
wp_register_script( 'jkit-dashboard', JEG_ELEMENTOR_KIT_URL . '/assets/js/dashboard/dashboard.js', array( 'underscore', 'jquery', 'jquery-ui-draggable', 'jquery-ui-sortable', 'notiflix' ), JEG_ELEMENTOR_KIT_VERSION, true );
|
192 |
wp_add_inline_script( 'jkit-dashboard', $this->ajax_url() );
|
class/dashboard/template/class-template-dashboard-abstract.php
CHANGED
@@ -29,11 +29,11 @@ abstract class Template_Dashboard_Abstract {
|
|
29 |
* Enqueue script
|
30 |
*/
|
31 |
protected function enqueue() {
|
32 |
-
wp_enqueue_style( 'notiflix', JEG_ELEMENTOR_KIT_URL . '/assets/js/notiflix/notiflix.min.css', null, '2.
|
33 |
-
wp_enqueue_script( 'notiflix', JEG_ELEMENTOR_KIT_URL . '/assets/js/notiflix/notiflix.min.js', array(), '2.
|
34 |
|
35 |
-
wp_register_script( 'jkit-dashboard-container', JEG_ELEMENTOR_KIT_URL . '/assets/js/dashboard/dashboard-container.js', array( 'jeg-form-builder-script' ), JEG_ELEMENTOR_KIT_VERSION, true );
|
36 |
-
wp_register_script( 'jkit-dashboard-template', JEG_ELEMENTOR_KIT_URL . '/assets/js/dashboard/dashboard-template.js', array( 'underscore', 'jquery', 'jquery-ui-draggable', 'jquery-ui-sortable', 'jkit-dashboard-container' ), JEG_ELEMENTOR_KIT_VERSION, true );
|
37 |
wp_localize_script( 'jkit-dashboard-template', 'JKitTemplateConfig', $this->config() );
|
38 |
wp_enqueue_script( 'jkit-dashboard-template' );
|
39 |
|
29 |
* Enqueue script
|
30 |
*/
|
31 |
protected function enqueue() {
|
32 |
+
wp_enqueue_style( 'notiflix', JEG_ELEMENTOR_KIT_URL . '/assets/js/notiflix/notiflix.min.css', null, '3.2.5' );
|
33 |
+
wp_enqueue_script( 'notiflix', JEG_ELEMENTOR_KIT_URL . '/assets/js/notiflix/notiflix.min.js', array(), '3.2.5', true );
|
34 |
|
35 |
+
wp_register_script( 'jkit-dashboard-container', JEG_ELEMENTOR_KIT_URL . '/assets/js/dashboard/dashboard-container.js', array( 'jeg-form-builder-script', 'notiflix' ), JEG_ELEMENTOR_KIT_VERSION, true );
|
36 |
+
wp_register_script( 'jkit-dashboard-template', JEG_ELEMENTOR_KIT_URL . '/assets/js/dashboard/dashboard-template.js', array( 'underscore', 'jquery', 'jquery-ui-draggable', 'jquery-ui-sortable', 'jkit-dashboard-container', 'notiflix' ), JEG_ELEMENTOR_KIT_VERSION, true );
|
37 |
wp_localize_script( 'jkit-dashboard-template', 'JKitTemplateConfig', $this->config() );
|
38 |
wp_enqueue_script( 'jkit-dashboard-template' );
|
39 |
|
class/elements/views/class-gallery-view.php
CHANGED
@@ -145,18 +145,18 @@ class Gallery_View extends View_Abstract {
|
|
145 |
|
146 |
$thumbnail = $image .
|
147 |
'<div class="video-wrap">' . $video_link . '</div>
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
} else {
|
153 |
$buttons = $this->render_button( $list );
|
154 |
$thumbnail = $image .
|
155 |
'<div class="caption-wrap search-hover-bg style-overlay">
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
}
|
161 |
} else {
|
162 |
$thumbnail = $image;
|
145 |
|
146 |
$thumbnail = $image .
|
147 |
'<div class="video-wrap">' . $video_link . '</div>
|
148 |
+
<div class="caption-wrap search-hover-bg style-overlay">
|
149 |
+
<div class="caption-head">' . $price_rating . '</div>
|
150 |
+
<div class="caption-category">' . $category . '</div>
|
151 |
+
</div>';
|
152 |
} else {
|
153 |
$buttons = $this->render_button( $list );
|
154 |
$thumbnail = $image .
|
155 |
'<div class="caption-wrap search-hover-bg style-overlay">
|
156 |
+
<div class="caption-head">' . $price_rating . '</div>
|
157 |
+
<div class="caption-button">' . $buttons . '</div>
|
158 |
+
<div class="caption-category">' . $category . '</div>
|
159 |
+
</div>';
|
160 |
}
|
161 |
} else {
|
162 |
$thumbnail = $image;
|
class/elements/views/class-product-grid-view.php
CHANGED
@@ -133,12 +133,12 @@ class Product_Grid_View extends View_WooCommerce_Abstract {
|
|
133 |
$template .=
|
134 |
'<div class="product-order">
|
135 |
<select class="orderby">
|
136 |
-
<option value="default">Default sorting</option>
|
137 |
-
<option value="popularity">Sort by popularity</option>
|
138 |
-
<option value="rating">Sort by average rating</option>
|
139 |
-
<option value="latest">Sort by latest</option>
|
140 |
-
<option value="price_high">Sort by price: low to high</option>
|
141 |
-
<option value="price_low">Sort by price: high to low</option>
|
142 |
</select>
|
143 |
</div>';
|
144 |
}
|
133 |
$template .=
|
134 |
'<div class="product-order">
|
135 |
<select class="orderby">
|
136 |
+
<option value="default">' . esc_html__( 'Default sorting', 'jeg-elementor-kit' ) . '</option>
|
137 |
+
<option value="popularity">' . esc_html__( 'Sort by popularity', 'jeg-elementor-kit' ) . '</option>
|
138 |
+
<option value="rating">' . esc_html__( 'Sort by average rating', 'jeg-elementor-kit' ) . '</option>
|
139 |
+
<option value="latest">' . esc_html__( 'Sort by latest', 'jeg-elementor-kit' ) . '</option>
|
140 |
+
<option value="price_high">' . esc_html__( 'Sort by price: low to high', 'jeg-elementor-kit' ) . '</option>
|
141 |
+
<option value="price_low">' . esc_html__( 'Sort by price: high to low', 'jeg-elementor-kit' ) . '</option>
|
142 |
</select>
|
143 |
</div>';
|
144 |
}
|
class/templates/class-template.php
CHANGED
@@ -193,13 +193,11 @@ class Template {
|
|
193 |
}
|
194 |
|
195 |
if ( $footer_id ) {
|
196 |
-
global $allowedposttags;
|
197 |
-
|
198 |
-
$allowed_html_tags = $allowedposttags;
|
199 |
-
$allowed_html_tags['style'] = array();
|
200 |
?>
|
201 |
<footer itemscope="itemscope" itemtype="https://schema.org/WPFooter">
|
202 |
-
<?php
|
|
|
|
|
203 |
</footer>
|
204 |
<?php
|
205 |
}
|
@@ -223,13 +221,11 @@ class Template {
|
|
223 |
}
|
224 |
|
225 |
if ( $header_id ) {
|
226 |
-
global $allowedposttags;
|
227 |
-
|
228 |
-
$allowed_html_tags = $allowedposttags;
|
229 |
-
$allowed_html_tags['style'] = array();
|
230 |
?>
|
231 |
<header id="masthead" itemscope="itemscope" itemtype="https://schema.org/WPHeader">
|
232 |
-
<?php
|
|
|
|
|
233 |
</header>
|
234 |
<?php
|
235 |
}
|
193 |
}
|
194 |
|
195 |
if ( $footer_id ) {
|
|
|
|
|
|
|
|
|
196 |
?>
|
197 |
<footer itemscope="itemscope" itemtype="https://schema.org/WPFooter">
|
198 |
+
<?php
|
199 |
+
echo wp_kses( $this->get_footer_content( $footer_id ), wp_kses_allowed_html( 'post' ) );
|
200 |
+
?>
|
201 |
</footer>
|
202 |
<?php
|
203 |
}
|
221 |
}
|
222 |
|
223 |
if ( $header_id ) {
|
|
|
|
|
|
|
|
|
224 |
?>
|
225 |
<header id="masthead" itemscope="itemscope" itemtype="https://schema.org/WPHeader">
|
226 |
+
<?php
|
227 |
+
echo wp_kses( $this->get_header_content( $header_id ), wp_kses_allowed_html( 'post' ) );
|
228 |
+
?>
|
229 |
</header>
|
230 |
<?php
|
231 |
}
|
helper.php
CHANGED
@@ -617,3 +617,165 @@ if ( ! function_exists( 'jkit_render_guteverse_banner' ) ) {
|
|
617 |
<?php
|
618 |
}
|
619 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
617 |
<?php
|
618 |
}
|
619 |
}
|
620 |
+
|
621 |
+
if ( ! function_exists( 'jkit_allowed_style_attr' ) ) {
|
622 |
+
|
623 |
+
add_filter( 'safe_style_css', 'jkit_allowed_style_attr' );
|
624 |
+
|
625 |
+
/**
|
626 |
+
* Allowed style attribute
|
627 |
+
*
|
628 |
+
* @param array $styles
|
629 |
+
*
|
630 |
+
* @return array
|
631 |
+
*/
|
632 |
+
function jkit_allowed_style_attr( $styles ) {
|
633 |
+
$styles[] = 'display';
|
634 |
+
|
635 |
+
return $styles;
|
636 |
+
}
|
637 |
+
}
|
638 |
+
|
639 |
+
if ( ! function_exists( 'jkit_allowed_html' ) ) {
|
640 |
+
|
641 |
+
add_filter( 'wp_kses_allowed_html', 'jkit_allowed_html', 99 );
|
642 |
+
|
643 |
+
/**
|
644 |
+
* Allowed HTML List by Jeg Elementor Kit
|
645 |
+
*/
|
646 |
+
function jkit_allowed_html( $allowedtags = array() ) {
|
647 |
+
$allowedtags['img'] = array_merge(
|
648 |
+
isset( $allowedtags['img'] ) ? $allowedtags['img'] : array(),
|
649 |
+
array(
|
650 |
+
'loading' => true,
|
651 |
+
'id' => true,
|
652 |
+
)
|
653 |
+
);
|
654 |
+
|
655 |
+
$allowedtags['a'] = array_merge(
|
656 |
+
isset( $allowedtags['a'] ) ? $allowedtags['a'] : array(),
|
657 |
+
array(
|
658 |
+
'rel' => true,
|
659 |
+
'data-*' => true,
|
660 |
+
'aria-expanded' => true,
|
661 |
+
'aria-controls' => true,
|
662 |
+
)
|
663 |
+
);
|
664 |
+
|
665 |
+
$allowedtags['i'] = array_merge(
|
666 |
+
isset( $allowedtags['i'] ) ? $allowedtags['i'] : array(),
|
667 |
+
array(
|
668 |
+
'aria-hidden' => true,
|
669 |
+
'class' => true,
|
670 |
+
)
|
671 |
+
);
|
672 |
+
|
673 |
+
$allowedtags['link'] = array_merge(
|
674 |
+
isset( $allowedtags['link'] ) ? $allowedtags['link'] : array(),
|
675 |
+
array(
|
676 |
+
'rel' => true,
|
677 |
+
'href' => true,
|
678 |
+
)
|
679 |
+
);
|
680 |
+
|
681 |
+
$allowedtags['form'] = array_merge(
|
682 |
+
isset( $allowedtags['form'] ) ? $allowedtags['form'] : array(),
|
683 |
+
array(
|
684 |
+
'method' => true,
|
685 |
+
'id' => true,
|
686 |
+
'class' => true,
|
687 |
+
'role' => true,
|
688 |
+
'action' => true,
|
689 |
+
'data-*' => true,
|
690 |
+
'autocomplete' => true,
|
691 |
+
)
|
692 |
+
);
|
693 |
+
|
694 |
+
$allowedtags['input'] = array_merge(
|
695 |
+
isset( $allowedtags['input'] ) ? $allowedtags['input'] : array(),
|
696 |
+
array(
|
697 |
+
'type' => true,
|
698 |
+
'name' => true,
|
699 |
+
'id' => true,
|
700 |
+
'class' => true,
|
701 |
+
'placeholder' => true,
|
702 |
+
'required' => true,
|
703 |
+
)
|
704 |
+
);
|
705 |
+
|
706 |
+
$allowedtags['canvas'] = array_merge(
|
707 |
+
isset( $allowedtags['canvas'] ) ? $allowedtags['canvas'] : array(),
|
708 |
+
array(
|
709 |
+
'height' => true,
|
710 |
+
'width' => true,
|
711 |
+
'class' => true,
|
712 |
+
)
|
713 |
+
);
|
714 |
+
|
715 |
+
$allowedtags['div'] = array_merge(
|
716 |
+
isset( $allowedtags['div'] ) ? $allowedtags['div'] : array(),
|
717 |
+
array(
|
718 |
+
'style' => true,
|
719 |
+
'data-*' => true,
|
720 |
+
'tabindex' => true,
|
721 |
+
)
|
722 |
+
);
|
723 |
+
|
724 |
+
$allowedtags['linearGradient'] = array_merge(
|
725 |
+
isset( $allowedtags['linearGradient'] ) ? $allowedtags['linearGradient'] : array(),
|
726 |
+
array(
|
727 |
+
'x1' => true,
|
728 |
+
'y1' => true,
|
729 |
+
'x2' => true,
|
730 |
+
'y2' => true,
|
731 |
+
'id' => true,
|
732 |
+
)
|
733 |
+
);
|
734 |
+
|
735 |
+
$allowedtags['stop'] = array_merge(
|
736 |
+
isset( $allowedtags['stop'] ) ? $allowedtags['stop'] : array(),
|
737 |
+
array(
|
738 |
+
'offset' => true,
|
739 |
+
)
|
740 |
+
);
|
741 |
+
|
742 |
+
$allowedtags['svg'] = array_merge(
|
743 |
+
isset( $allowedtags['svg'] ) ? $allowedtags['svg'] : array(),
|
744 |
+
array(
|
745 |
+
'id' => true,
|
746 |
+
'xmlns' => true,
|
747 |
+
'viewbox' => true,
|
748 |
+
'preserveaspectratio' => true,
|
749 |
+
)
|
750 |
+
);
|
751 |
+
|
752 |
+
$allowedtags['path'] = array_merge(
|
753 |
+
isset( $allowedtags['path'] ) ? $allowedtags['path'] : array(),
|
754 |
+
array(
|
755 |
+
'stroke' => true,
|
756 |
+
'class' => true,
|
757 |
+
'd' => true,
|
758 |
+
'transform' => true,
|
759 |
+
)
|
760 |
+
);
|
761 |
+
|
762 |
+
$allowedtags['select'] = array_merge(
|
763 |
+
isset( $allowedtags['select'] ) ? $allowedtags['select'] : array(),
|
764 |
+
array(
|
765 |
+
'class' => true,
|
766 |
+
)
|
767 |
+
);
|
768 |
+
|
769 |
+
$allowedtags['option'] = array_merge(
|
770 |
+
isset( $allowedtags['option'] ) ? $allowedtags['option'] : array(),
|
771 |
+
array(
|
772 |
+
'option' => true,
|
773 |
+
)
|
774 |
+
);
|
775 |
+
|
776 |
+
$allowedtags['style'] = array_merge( isset( $allowedtags['style'] ) ? $allowedtags['style'] : array(), array() );
|
777 |
+
$allowedtags['bdi'] = array_merge( isset( $allowedtags['bdi'] ) ? $allowedtags['bdi'] : array(), array() );
|
778 |
+
|
779 |
+
return $allowedtags;
|
780 |
+
}
|
781 |
+
}
|
jeg-elementor-kit.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Jeg Elementor Kit
|
4 |
* Plugin URI: http://jegtheme.com/
|
5 |
* Description: Additional highly customizable widgets for Elementor page builder
|
6 |
-
* Version: 2.5.
|
7 |
* Author: Jegstudio
|
8 |
* Author URI: http://jegtheme.com
|
9 |
* License: GPLv3
|
@@ -25,7 +25,7 @@ add_action(
|
|
25 |
function() {
|
26 |
defined( 'JEG_ELEMENTOR_KIT' ) || define( 'JEG_ELEMENTOR_KIT', 'jeg-elementor-kit' );
|
27 |
defined( 'JEG_ELEMENTOR_KIT_NAME' ) || define( 'JEG_ELEMENTOR_KIT_NAME', 'Jeg Elementor Kit' );
|
28 |
-
defined( 'JEG_ELEMENTOR_KIT_VERSION' ) || define( 'JEG_ELEMENTOR_KIT_VERSION', '2.5.
|
29 |
defined( 'JEG_ELEMENTOR_KIT_URL' ) || define( 'JEG_ELEMENTOR_KIT_URL', plugins_url( JEG_ELEMENTOR_KIT ) );
|
30 |
defined( 'JEG_ELEMENTOR_KIT_FILE' ) || define( 'JEG_ELEMENTOR_KIT_FILE', __FILE__ );
|
31 |
defined( 'JEG_ELEMENTOR_KIT_BASE' ) || define( 'JEG_ELEMENTOR_KIT_BASE', plugin_basename( __FILE__ ) );
|
3 |
* Plugin Name: Jeg Elementor Kit
|
4 |
* Plugin URI: http://jegtheme.com/
|
5 |
* Description: Additional highly customizable widgets for Elementor page builder
|
6 |
+
* Version: 2.5.1
|
7 |
* Author: Jegstudio
|
8 |
* Author URI: http://jegtheme.com
|
9 |
* License: GPLv3
|
25 |
function() {
|
26 |
defined( 'JEG_ELEMENTOR_KIT' ) || define( 'JEG_ELEMENTOR_KIT', 'jeg-elementor-kit' );
|
27 |
defined( 'JEG_ELEMENTOR_KIT_NAME' ) || define( 'JEG_ELEMENTOR_KIT_NAME', 'Jeg Elementor Kit' );
|
28 |
+
defined( 'JEG_ELEMENTOR_KIT_VERSION' ) || define( 'JEG_ELEMENTOR_KIT_VERSION', '2.5.1' );
|
29 |
defined( 'JEG_ELEMENTOR_KIT_URL' ) || define( 'JEG_ELEMENTOR_KIT_URL', plugins_url( JEG_ELEMENTOR_KIT ) );
|
30 |
defined( 'JEG_ELEMENTOR_KIT_FILE' ) || define( 'JEG_ELEMENTOR_KIT_FILE', __FILE__ );
|
31 |
defined( 'JEG_ELEMENTOR_KIT_BASE' ) || define( 'JEG_ELEMENTOR_KIT_BASE', plugin_basename( __FILE__ ) );
|
languages/jeg-elementor-kit.pot
CHANGED
@@ -4821,6 +4821,30 @@ msgstr ""
|
|
4821 |
msgid "Rated %s out of 5"
|
4822 |
msgstr ""
|
4823 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4824 |
#: jeg-elementor-kit/class/elements/views/class-view-abstract.php:306
|
4825 |
msgid "Previous"
|
4826 |
msgstr ""
|
4821 |
msgid "Rated %s out of 5"
|
4822 |
msgstr ""
|
4823 |
|
4824 |
+
#: jeg-elementor-kit/class/elements/views/class-product-grid-view.php:136
|
4825 |
+
msgid "Default sorting"
|
4826 |
+
msgstr ""
|
4827 |
+
|
4828 |
+
#: jeg-elementor-kit/class/elements/views/class-product-grid-view.php:137
|
4829 |
+
msgid "Sort by popularity"
|
4830 |
+
msgstr ""
|
4831 |
+
|
4832 |
+
#: jeg-elementor-kit/class/elements/views/class-product-grid-view.php:138
|
4833 |
+
msgid "Sort by average rating"
|
4834 |
+
msgstr ""
|
4835 |
+
|
4836 |
+
#: jeg-elementor-kit/class/elements/views/class-product-grid-view.php:139
|
4837 |
+
msgid "Sort by latest"
|
4838 |
+
msgstr ""
|
4839 |
+
|
4840 |
+
#: jeg-elementor-kit/class/elements/views/class-product-grid-view.php:140
|
4841 |
+
msgid "Sort by price: low to high"
|
4842 |
+
msgstr ""
|
4843 |
+
|
4844 |
+
#: jeg-elementor-kit/class/elements/views/class-product-grid-view.php:141
|
4845 |
+
msgid "Sort by price: high to low"
|
4846 |
+
msgstr ""
|
4847 |
+
|
4848 |
#: jeg-elementor-kit/class/elements/views/class-view-abstract.php:306
|
4849 |
msgid "Previous"
|
4850 |
msgstr ""
|
lib/jeg-element/assets/css/selectize.default.css
CHANGED
@@ -1,393 +1,6 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
*
|
7 |
-
* http://www.apache.org/licenses/LICENSE-2.0
|
8 |
-
*
|
9 |
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
10 |
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
11 |
-
* ANY KIND, either express or implied. See the License for the specific language
|
12 |
-
* governing permissions and limitations under the License.
|
13 |
-
*
|
14 |
-
* @author Brian Reavis <brian@thirdroute.com>
|
15 |
-
*/
|
16 |
-
.selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder {
|
17 |
-
visibility: visible !important;
|
18 |
-
background: #f2f2f2 !important;
|
19 |
-
background: rgba(0, 0, 0, 0.06) !important;
|
20 |
-
border: 0 none !important;
|
21 |
-
-webkit-box-shadow: inset 0 0 12px 4px #ffffff;
|
22 |
-
box-shadow: inset 0 0 12px 4px #ffffff;
|
23 |
-
}
|
24 |
-
.selectize-control.plugin-drag_drop .ui-sortable-placeholder::after {
|
25 |
-
content: '!';
|
26 |
-
visibility: hidden;
|
27 |
-
}
|
28 |
-
.selectize-control.plugin-drag_drop .ui-sortable-helper {
|
29 |
-
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
|
30 |
-
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
|
31 |
-
}
|
32 |
-
.selectize-dropdown-header {
|
33 |
-
position: relative;
|
34 |
-
padding: 5px 8px;
|
35 |
-
border-bottom: 1px solid #d0d0d0;
|
36 |
-
background: #f8f8f8;
|
37 |
-
-webkit-border-radius: 3px 3px 0 0;
|
38 |
-
-moz-border-radius: 3px 3px 0 0;
|
39 |
-
border-radius: 3px 3px 0 0;
|
40 |
-
}
|
41 |
-
.selectize-dropdown-header-close {
|
42 |
-
position: absolute;
|
43 |
-
right: 8px;
|
44 |
-
top: 50%;
|
45 |
-
color: #303030;
|
46 |
-
opacity: 0.4;
|
47 |
-
margin-top: -12px;
|
48 |
-
line-height: 20px;
|
49 |
-
font-size: 20px !important;
|
50 |
-
}
|
51 |
-
.selectize-dropdown-header-close:hover {
|
52 |
-
color: #000000;
|
53 |
-
}
|
54 |
-
.selectize-dropdown.plugin-optgroup_columns .optgroup {
|
55 |
-
border-right: 1px solid #f2f2f2;
|
56 |
-
border-top: 0 none;
|
57 |
-
float: left;
|
58 |
-
-webkit-box-sizing: border-box;
|
59 |
-
-moz-box-sizing: border-box;
|
60 |
-
box-sizing: border-box;
|
61 |
-
}
|
62 |
-
.selectize-dropdown.plugin-optgroup_columns .optgroup:last-child {
|
63 |
-
border-right: 0 none;
|
64 |
-
}
|
65 |
-
.selectize-dropdown.plugin-optgroup_columns .optgroup:before {
|
66 |
-
display: none;
|
67 |
-
}
|
68 |
-
.selectize-dropdown.plugin-optgroup_columns .optgroup-header {
|
69 |
-
border-top: 0 none;
|
70 |
-
}
|
71 |
-
.selectize-control.plugin-remove_button [data-value] {
|
72 |
-
position: relative;
|
73 |
-
padding-right: 24px !important;
|
74 |
-
}
|
75 |
-
.selectize-control.plugin-remove_button [data-value] .remove {
|
76 |
-
z-index: 1;
|
77 |
-
/* fixes ie bug (see #392) */
|
78 |
-
position: absolute;
|
79 |
-
top: 0;
|
80 |
-
right: 0;
|
81 |
-
bottom: 0;
|
82 |
-
width: 17px;
|
83 |
-
text-align: center;
|
84 |
-
font-weight: bold;
|
85 |
-
font-size: 12px;
|
86 |
-
color: inherit;
|
87 |
-
text-decoration: none;
|
88 |
-
vertical-align: middle;
|
89 |
-
display: inline-block;
|
90 |
-
padding: 2px 0 0 0;
|
91 |
-
border-left: 1px solid #0073bb;
|
92 |
-
-webkit-border-radius: 0 2px 2px 0;
|
93 |
-
-moz-border-radius: 0 2px 2px 0;
|
94 |
-
border-radius: 0 2px 2px 0;
|
95 |
-
-webkit-box-sizing: border-box;
|
96 |
-
-moz-box-sizing: border-box;
|
97 |
-
box-sizing: border-box;
|
98 |
-
}
|
99 |
-
.selectize-control.plugin-remove_button [data-value] .remove:hover {
|
100 |
-
background: rgba(0, 0, 0, 0.05);
|
101 |
-
}
|
102 |
-
.selectize-control.plugin-remove_button [data-value].active .remove {
|
103 |
-
border-left-color: #00578d;
|
104 |
-
}
|
105 |
-
.selectize-control.plugin-remove_button .disabled [data-value] .remove:hover {
|
106 |
-
background: none;
|
107 |
-
}
|
108 |
-
.selectize-control.plugin-remove_button .disabled [data-value] .remove {
|
109 |
-
border-left-color: #aaaaaa;
|
110 |
-
}
|
111 |
-
.selectize-control.plugin-remove_button .remove-single {
|
112 |
-
position: absolute;
|
113 |
-
right: 28px;
|
114 |
-
top: 6px;
|
115 |
-
font-size: 23px;
|
116 |
-
}
|
117 |
-
.selectize-control {
|
118 |
-
position: relative;
|
119 |
-
}
|
120 |
-
.selectize-dropdown,
|
121 |
-
.selectize-input,
|
122 |
-
.selectize-input input {
|
123 |
-
color: #303030;
|
124 |
-
font-family: inherit;
|
125 |
-
font-size: 13px;
|
126 |
-
line-height: 18px;
|
127 |
-
-webkit-font-smoothing: inherit;
|
128 |
-
}
|
129 |
-
.selectize-input,
|
130 |
-
.selectize-control.single .selectize-input.input-active {
|
131 |
-
background: #ffffff;
|
132 |
-
cursor: text;
|
133 |
-
display: inline-block;
|
134 |
-
}
|
135 |
-
.selectize-input {
|
136 |
-
border: 1px solid #d0d0d0;
|
137 |
-
padding: 8px 8px;
|
138 |
-
display: inline-block;
|
139 |
-
width: 100%;
|
140 |
-
overflow: hidden;
|
141 |
-
position: relative;
|
142 |
-
z-index: 1;
|
143 |
-
-webkit-box-sizing: border-box;
|
144 |
-
-moz-box-sizing: border-box;
|
145 |
-
box-sizing: border-box;
|
146 |
-
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);
|
147 |
-
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);
|
148 |
-
-webkit-border-radius: 3px;
|
149 |
-
-moz-border-radius: 3px;
|
150 |
-
border-radius: 3px;
|
151 |
-
}
|
152 |
-
.selectize-control.multi .selectize-input.has-items {
|
153 |
-
padding: 5px 8px 2px;
|
154 |
-
}
|
155 |
-
.selectize-input.full {
|
156 |
-
background-color: #ffffff;
|
157 |
-
}
|
158 |
-
.selectize-input.disabled,
|
159 |
-
.selectize-input.disabled * {
|
160 |
-
cursor: default !important;
|
161 |
-
}
|
162 |
-
.selectize-input.focus {
|
163 |
-
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
|
164 |
-
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
|
165 |
-
}
|
166 |
-
.selectize-input.dropdown-active {
|
167 |
-
-webkit-border-radius: 3px 3px 0 0;
|
168 |
-
-moz-border-radius: 3px 3px 0 0;
|
169 |
-
border-radius: 3px 3px 0 0;
|
170 |
-
}
|
171 |
-
.selectize-input > * {
|
172 |
-
vertical-align: baseline;
|
173 |
-
display: -moz-inline-stack;
|
174 |
-
display: inline-block;
|
175 |
-
zoom: 1;
|
176 |
-
*display: inline;
|
177 |
-
}
|
178 |
-
.selectize-control.multi .selectize-input > div {
|
179 |
-
cursor: pointer;
|
180 |
-
margin: 0 3px 3px 0;
|
181 |
-
padding: 2px 6px;
|
182 |
-
background: #1da7ee;
|
183 |
-
color: #ffffff;
|
184 |
-
border: 1px solid #0073bb;
|
185 |
-
}
|
186 |
-
.selectize-control.multi .selectize-input > div.active {
|
187 |
-
background: #92c836;
|
188 |
-
color: #ffffff;
|
189 |
-
border: 1px solid #00578d;
|
190 |
-
}
|
191 |
-
.selectize-control.multi .selectize-input.disabled > div,
|
192 |
-
.selectize-control.multi .selectize-input.disabled > div.active {
|
193 |
-
color: #ffffff;
|
194 |
-
background: #d2d2d2;
|
195 |
-
border: 1px solid #aaaaaa;
|
196 |
-
}
|
197 |
-
.selectize-input > input {
|
198 |
-
display: inline-block !important;
|
199 |
-
padding: 0 !important;
|
200 |
-
min-height: 0 !important;
|
201 |
-
max-height: none !important;
|
202 |
-
max-width: 100% !important;
|
203 |
-
margin: 0 1px !important;
|
204 |
-
text-indent: 0 !important;
|
205 |
-
border: 0 none !important;
|
206 |
-
background: none !important;
|
207 |
-
line-height: inherit !important;
|
208 |
-
-webkit-user-select: auto !important;
|
209 |
-
-webkit-box-shadow: none !important;
|
210 |
-
box-shadow: none !important;
|
211 |
-
}
|
212 |
-
.selectize-input > input::-ms-clear {
|
213 |
-
display: none;
|
214 |
-
}
|
215 |
-
.selectize-input > input:focus {
|
216 |
-
outline: none !important;
|
217 |
-
}
|
218 |
-
.selectize-input::after {
|
219 |
-
content: ' ';
|
220 |
-
display: block;
|
221 |
-
clear: left;
|
222 |
-
}
|
223 |
-
.selectize-input.dropdown-active::before {
|
224 |
-
content: ' ';
|
225 |
-
display: block;
|
226 |
-
position: absolute;
|
227 |
-
background: #f0f0f0;
|
228 |
-
height: 1px;
|
229 |
-
bottom: 0;
|
230 |
-
left: 0;
|
231 |
-
right: 0;
|
232 |
-
}
|
233 |
-
.selectize-dropdown {
|
234 |
-
position: absolute;
|
235 |
-
z-index: 10;
|
236 |
-
border: 1px solid #d0d0d0;
|
237 |
-
background: #ffffff;
|
238 |
-
margin: -1px 0 0 0;
|
239 |
-
border-top: 0 none;
|
240 |
-
-webkit-box-sizing: border-box;
|
241 |
-
-moz-box-sizing: border-box;
|
242 |
-
box-sizing: border-box;
|
243 |
-
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
244 |
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
245 |
-
-webkit-border-radius: 0 0 3px 3px;
|
246 |
-
-moz-border-radius: 0 0 3px 3px;
|
247 |
-
border-radius: 0 0 3px 3px;
|
248 |
-
}
|
249 |
-
.selectize-dropdown [data-selectable] {
|
250 |
-
cursor: pointer;
|
251 |
-
overflow: hidden;
|
252 |
-
}
|
253 |
-
.selectize-dropdown [data-selectable] .highlight {
|
254 |
-
background: rgba(125, 168, 208, 0.2);
|
255 |
-
-webkit-border-radius: 1px;
|
256 |
-
-moz-border-radius: 1px;
|
257 |
-
border-radius: 1px;
|
258 |
-
}
|
259 |
-
.selectize-dropdown [data-selectable],
|
260 |
-
.selectize-dropdown .optgroup-header {
|
261 |
-
padding: 5px 8px;
|
262 |
-
}
|
263 |
-
.selectize-dropdown .optgroup:first-child .optgroup-header {
|
264 |
-
border-top: 0 none;
|
265 |
-
}
|
266 |
-
.selectize-dropdown .optgroup-header {
|
267 |
-
color: #303030;
|
268 |
-
background: #ffffff;
|
269 |
-
cursor: default;
|
270 |
-
}
|
271 |
-
.selectize-dropdown .active {
|
272 |
-
background-color: #f5fafd;
|
273 |
-
color: #495c68;
|
274 |
-
}
|
275 |
-
.selectize-dropdown .active.create {
|
276 |
-
color: #495c68;
|
277 |
-
}
|
278 |
-
.selectize-dropdown .create {
|
279 |
-
color: rgba(48, 48, 48, 0.5);
|
280 |
-
}
|
281 |
-
.selectize-dropdown-content {
|
282 |
-
overflow-y: auto;
|
283 |
-
overflow-x: hidden;
|
284 |
-
max-height: 200px;
|
285 |
-
}
|
286 |
-
.selectize-control.single .selectize-input,
|
287 |
-
.selectize-control.single .selectize-input input {
|
288 |
-
cursor: pointer;
|
289 |
-
}
|
290 |
-
.selectize-control.single .selectize-input.input-active,
|
291 |
-
.selectize-control.single .selectize-input.input-active input {
|
292 |
-
cursor: text;
|
293 |
-
}
|
294 |
-
.selectize-control.single .selectize-input:after {
|
295 |
-
content: ' ';
|
296 |
-
display: block;
|
297 |
-
position: absolute;
|
298 |
-
top: 50%;
|
299 |
-
right: 15px;
|
300 |
-
margin-top: -3px;
|
301 |
-
width: 0;
|
302 |
-
height: 0;
|
303 |
-
border-style: solid;
|
304 |
-
border-width: 5px 5px 0 5px;
|
305 |
-
border-color: #808080 transparent transparent transparent;
|
306 |
-
}
|
307 |
-
.selectize-control.single .selectize-input.dropdown-active:after {
|
308 |
-
margin-top: -4px;
|
309 |
-
border-width: 0 5px 5px 5px;
|
310 |
-
border-color: transparent transparent #808080 transparent;
|
311 |
-
}
|
312 |
-
.selectize-control.rtl.single .selectize-input:after {
|
313 |
-
left: 15px;
|
314 |
-
right: auto;
|
315 |
-
}
|
316 |
-
.selectize-control.rtl .selectize-input > input {
|
317 |
-
margin: 0 4px 0 -2px !important;
|
318 |
-
}
|
319 |
-
.selectize-control .selectize-input.disabled {
|
320 |
-
opacity: 0.5;
|
321 |
-
background-color: #fafafa;
|
322 |
-
}
|
323 |
-
.selectize-control.multi .selectize-input.has-items {
|
324 |
-
padding-left: 5px;
|
325 |
-
padding-right: 5px;
|
326 |
-
}
|
327 |
-
.selectize-control.multi .selectize-input.disabled [data-value] {
|
328 |
-
color: #999;
|
329 |
-
text-shadow: none;
|
330 |
-
background: none;
|
331 |
-
-webkit-box-shadow: none;
|
332 |
-
box-shadow: none;
|
333 |
-
}
|
334 |
-
.selectize-control.multi .selectize-input.disabled [data-value],
|
335 |
-
.selectize-control.multi .selectize-input.disabled [data-value] .remove {
|
336 |
-
border-color: #e6e6e6;
|
337 |
-
}
|
338 |
-
.selectize-control.multi .selectize-input.disabled [data-value] .remove {
|
339 |
-
background: none;
|
340 |
-
}
|
341 |
-
.selectize-control.multi .selectize-input [data-value] {
|
342 |
-
text-shadow: 0 1px 0 rgba(0, 51, 83, 0.3);
|
343 |
-
-webkit-border-radius: 3px;
|
344 |
-
-moz-border-radius: 3px;
|
345 |
-
border-radius: 3px;
|
346 |
-
background-color: #1b9dec;
|
347 |
-
background-image: -moz-linear-gradient(top, #1da7ee, #178ee9);
|
348 |
-
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#1da7ee), to(#178ee9));
|
349 |
-
background-image: -webkit-linear-gradient(top, #1da7ee, #178ee9);
|
350 |
-
background-image: -o-linear-gradient(top, #1da7ee, #178ee9);
|
351 |
-
background-image: linear-gradient(to bottom, #1da7ee, #178ee9);
|
352 |
-
background-repeat: repeat-x;
|
353 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff1da7ee', endColorstr='#ff178ee9', GradientType=0);
|
354 |
-
-webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.2),inset 0 1px rgba(255,255,255,0.03);
|
355 |
-
box-shadow: 0 1px 0 rgba(0,0,0,0.2),inset 0 1px rgba(255,255,255,0.03);
|
356 |
-
}
|
357 |
-
.selectize-control.multi .selectize-input [data-value].active {
|
358 |
-
background-color: #0085d4;
|
359 |
-
background-image: -moz-linear-gradient(top, #008fd8, #0075cf);
|
360 |
-
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#008fd8), to(#0075cf));
|
361 |
-
background-image: -webkit-linear-gradient(top, #008fd8, #0075cf);
|
362 |
-
background-image: -o-linear-gradient(top, #008fd8, #0075cf);
|
363 |
-
background-image: linear-gradient(to bottom, #008fd8, #0075cf);
|
364 |
-
background-repeat: repeat-x;
|
365 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff008fd8', endColorstr='#ff0075cf', GradientType=0);
|
366 |
-
}
|
367 |
-
.selectize-control.single .selectize-input {
|
368 |
-
-webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.8);
|
369 |
-
box-shadow: 0 1px 0 rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.8);
|
370 |
-
background-color: #f9f9f9;
|
371 |
-
background-image: -moz-linear-gradient(top, #fefefe, #f2f2f2);
|
372 |
-
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fefefe), to(#f2f2f2));
|
373 |
-
background-image: -webkit-linear-gradient(top, #fefefe, #f2f2f2);
|
374 |
-
background-image: -o-linear-gradient(top, #fefefe, #f2f2f2);
|
375 |
-
background-image: linear-gradient(to bottom, #fefefe, #f2f2f2);
|
376 |
-
background-repeat: repeat-x;
|
377 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffefefe', endColorstr='#fff2f2f2', GradientType=0);
|
378 |
-
}
|
379 |
-
.selectize-control.single .selectize-input,
|
380 |
-
.selectize-dropdown.single {
|
381 |
-
border-color: #b8b8b8;
|
382 |
-
}
|
383 |
-
.selectize-dropdown .optgroup-header {
|
384 |
-
padding-top: 7px;
|
385 |
-
font-weight: bold;
|
386 |
-
font-size: 0.85em;
|
387 |
-
}
|
388 |
-
.selectize-dropdown .optgroup {
|
389 |
-
border-top: 1px solid #f0f0f0;
|
390 |
-
}
|
391 |
-
.selectize-dropdown .optgroup:first-child {
|
392 |
-
border-top: 0 none;
|
393 |
-
}
|
1 |
+
.selectize-control.plugin-drag_drop.multi>.selectize-input.dragging{overflow:visible}.selectize-control.plugin-drag_drop.multi>.selectize-input>div.ui-sortable-placeholder{visibility:visible !important;background:#f2f2f2 !important;background:rgba(0,0,0,.06) !important;border:0 none !important;box-shadow:inset 0 0 12px 4px #fff}.selectize-control.plugin-drag_drop .ui-sortable-placeholder::after{content:"!";visibility:hidden}.selectize-control.plugin-drag_drop .ui-sortable-helper{box-shadow:0 2px 5px rgba(0,0,0,.2)}.selectize-control .selectize-dropdown-header{position:relative;padding:10px 8px;border-bottom:1px solid #d0d0d0;background:#f8f8f8;border-radius:3px 3px 0 0}.selectize-control .selectize-dropdown-header-close{position:absolute;right:8px;top:50%;color:#303030;opacity:.4;margin-top:-12px;line-height:20px;font-size:20px !important}.selectize-control .selectize-dropdown-header-close:hover{color:#000}.selectize-dropdown.plugin-optgroup_columns .selectize-dropdown-content{display:flex}.selectize-dropdown.plugin-optgroup_columns .optgroup{border-right:1px solid #f2f2f2;border-top:0 none;flex-grow:1;flex-basis:0;min-width:0}.selectize-dropdown.plugin-optgroup_columns .optgroup:last-child{border-right:0 none}.selectize-dropdown.plugin-optgroup_columns .optgroup:before{display:none}.selectize-dropdown.plugin-optgroup_columns .optgroup-header{border-top:0 none}.selectize-control.plugin-remove_button .item{display:inline-flex;align-items:center;padding-right:0 !important}.selectize-control.plugin-remove_button .item .remove{color:inherit;text-decoration:none;vertical-align:middle;display:inline-block;padding:2px 6px;border-left:1px solid #0073bb;border-radius:0 2px 2px 0;box-sizing:border-box;margin-left:6px}.selectize-control.plugin-remove_button .item .remove:hover{background:rgba(0,0,0,.05)}.selectize-control.plugin-remove_button .item.active .remove{border-left-color:#00578d}.selectize-control.plugin-remove_button .disabled .item .remove:hover{background:none}.selectize-control.plugin-remove_button .disabled .item .remove{border-left-color:#aaa}.selectize-control.plugin-remove_button .remove-single{position:absolute;right:0;top:0;font-size:23px}.selectize-control.plugin-clear_button .clear{display:flex;position:absolute;height:100%;width:25px;top:0;right:calc(8px - 6px);color:#000;opacity:.4;font-weight:bold;border:none;cursor:pointer;z-index:1;font-size:21px;justify-content:center;align-items:center}.selectize-control.plugin-clear_button .clear:hover{opacity:1}.selectize-control.plugin-clear_button.single .clear{right:calc(8px - 6px + 1.5rem)}.selectize-control{position:relative}.selectize-dropdown,.selectize-input,.selectize-input input{color:#303030;font-family:inherit;font-size:13px;line-height:18px;font-smoothing:inherit}.selectize-input,.selectize-control.single .selectize-input.input-active{background:#fff;cursor:text;display:inline-block}.selectize-input{border:1px solid #d0d0d0;padding:8px 8px;display:inline-block;width:100%;position:relative;z-index:1;box-sizing:border-box;box-shadow:inset 0 1px 1px rgba(0,0,0,.1);border-radius:3px}.selectize-control.multi .selectize-input.has-items{padding:calc(
|
2 |
+
8px - 2px - 1px
|
3 |
+
) 8px calc(
|
4 |
+
8px - 2px - 3px -
|
5 |
+
1px
|
6 |
+
)}.selectize-input.full{background-color:#fff}.selectize-input.disabled,.selectize-input.disabled *{cursor:default !important}.selectize-input.focus{box-shadow:inset 0 1px 2px rgba(0,0,0,.15)}.selectize-input.dropdown-active{border-radius:3px 3px 0 0}.selectize-input>*{vertical-align:baseline;display:inline-block;zoom:1}.selectize-control.multi .selectize-input>div{cursor:pointer;margin:0 3px 3px 0;padding:2px 6px;background:#1da7ee;color:#fff;border:1px solid #0073bb}.selectize-control.multi .selectize-input>div.active{background:#92c836;color:#fff;border:1px solid #00578d}.selectize-control.multi .selectize-input.disabled>div,.selectize-control.multi .selectize-input.disabled>div.active{color:#fff;background:#d2d2d2;border:1px solid #aaa}.selectize-input>input{display:inline-block !important;padding:0 !important;min-height:0 !important;max-height:none !important;max-width:100% !important;margin:0 !important;text-indent:0 !important;border:0 none !important;background:none !important;line-height:inherit !important;user-select:auto !important;box-shadow:none !important}.selectize-input>input::-ms-clear{display:none}.selectize-input>input:focus{outline:none !important}.selectize-input>input[placeholder]{box-sizing:initial}.selectize-input.has-items>input{margin:0 0px !important}.selectize-input::after{content:" ";display:block;clear:left}.selectize-input.dropdown-active::before{content:" ";display:block;position:absolute;background:#f0f0f0;height:1px;bottom:0;left:0;right:0}.selectize-dropdown{position:absolute;top:100%;left:0;width:100%;z-index:10;border:1px solid #d0d0d0;background:#fff;margin:-1px 0 0 0;border-top:0 none;box-sizing:border-box;box-shadow:0 1px 3px rgba(0,0,0,.1);border-radius:0 0 3px 3px}.selectize-dropdown [data-selectable]{cursor:pointer;overflow:hidden}.selectize-dropdown [data-selectable] .highlight{background:rgba(125,168,208,.2);border-radius:1px}.selectize-dropdown .option,.selectize-dropdown .optgroup-header,.selectize-dropdown .no-results,.selectize-dropdown .create{padding:5px 8px}.selectize-dropdown .option,.selectize-dropdown [data-disabled],.selectize-dropdown [data-disabled] [data-selectable].option{cursor:inherit;opacity:.5}.selectize-dropdown [data-selectable].option{opacity:1;cursor:pointer}.selectize-dropdown .optgroup:first-child .optgroup-header{border-top:0 none}.selectize-dropdown .optgroup-header{color:#303030;background:#fff;cursor:default}.selectize-dropdown .active{background-color:#f5fafd;color:#495c68}.selectize-dropdown .active.create{color:#495c68}.selectize-dropdown .create{color:rgba(48,48,48,.5)}.selectize-dropdown-content{overflow-y:auto;overflow-x:hidden;max-height:200px;overflow-scrolling:touch}.selectize-dropdown-emptyoptionlabel{text-align:center}.selectize-dropdown .spinner{display:inline-block;width:30px;height:30px;margin:5px 8px}.selectize-dropdown .spinner:after{content:" ";display:block;width:24px;height:24px;margin:3px;border-radius:50%;border:5px solid #d0d0d0;border-color:#d0d0d0 rgba(0,0,0,0) #d0d0d0 rgba(0,0,0,0);animation:lds-dual-ring 1.2s linear infinite}@keyframes lds-dual-ring{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.selectize-control.single .selectize-input,.selectize-control.single .selectize-input input{cursor:pointer}.selectize-control.single .selectize-input.input-active,.selectize-control.single .selectize-input.input-active input{cursor:text}.selectize-control.single .selectize-input:after{content:" ";display:block;position:absolute;top:50%;right:15px;margin-top:-3px;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:gray rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.selectize-control.single .selectize-input.dropdown-active:after{margin-top:-4px;border-width:0 5px 5px 5px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) gray rgba(0,0,0,0)}.selectize-control.rtl{text-align:right}.selectize-control.rtl.single .selectize-input:after{left:15px;right:auto}.selectize-control.rtl .selectize-input>input{margin:0 4px 0 -2px !important}.selectize-control .selectize-input.disabled{opacity:.5;background-color:#fafafa}.selectize-control.multi .selectize-input.has-items{padding-left:5px;padding-right:5px}.selectize-control.multi .selectize-input.disabled [data-value]{color:#999;text-shadow:none;background:none;box-shadow:none}.selectize-control.multi .selectize-input.disabled [data-value],.selectize-control.multi .selectize-input.disabled [data-value] .remove{border-color:#e6e6e6}.selectize-control.multi .selectize-input.disabled [data-value] .remove{background:none}.selectize-control.multi .selectize-input [data-value]{text-shadow:0 1px 0 rgba(0,51,83,.3);border-radius:3px;background-color:#1b9dec;background-image:linear-gradient(to bottom, #1da7ee, #178ee9);background-repeat:repeat-x;box-shadow:0 1px 0 rgba(0,0,0,.2),inset 0 1px rgba(255,255,255,.03)}.selectize-control.multi .selectize-input [data-value].active{background-color:#0085d4;background-image:linear-gradient(to bottom, #008fd8, #0075cf);background-repeat:repeat-x}.selectize-control.single .selectize-input{box-shadow:0 1px 0 rgba(0,0,0,.05),inset 0 1px 0 rgba(255,255,255,.8);background-color:#f9f9f9;background-image:linear-gradient(to bottom, #fefefe, #f2f2f2);background-repeat:repeat-x}.selectize-control.single .selectize-input,.selectize-dropdown.single{border-color:#b8b8b8}.selectize-dropdown .optgroup-header{padding-top:7px;font-weight:bold;font-size:.85em}.selectize-dropdown .optgroup{border-top:1px solid #f0f0f0}.selectize-dropdown .optgroup:first-child{border-top:0 none}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/jeg-element/assets/js/selectize.js
DELETED
@@ -1,3763 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* sifter.js
|
3 |
-
* Copyright (c) 2013 Brian Reavis & contributors
|
4 |
-
*
|
5 |
-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
|
6 |
-
* file except in compliance with the License. You may obtain a copy of the License at:
|
7 |
-
* http://www.apache.org/licenses/LICENSE-2.0
|
8 |
-
*
|
9 |
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
10 |
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
11 |
-
* ANY KIND, either express or implied. See the License for the specific language
|
12 |
-
* governing permissions and limitations under the License.
|
13 |
-
*
|
14 |
-
* @author Brian Reavis <brian@thirdroute.com>
|
15 |
-
*/
|
16 |
-
|
17 |
-
(function(root, factory) {
|
18 |
-
if (typeof define === 'function' && define.amd) {
|
19 |
-
define('sifter', factory);
|
20 |
-
} else if (typeof exports === 'object') {
|
21 |
-
module.exports = factory();
|
22 |
-
} else {
|
23 |
-
root.Sifter = factory();
|
24 |
-
}
|
25 |
-
}(this, function() {
|
26 |
-
'use strict';
|
27 |
-
|
28 |
-
/**
|
29 |
-
* Textually searches arrays and hashes of objects
|
30 |
-
* by property (or multiple properties). Designed
|
31 |
-
* specifically for autocomplete.
|
32 |
-
*
|
33 |
-
* @constructor
|
34 |
-
* @param {array|object} items
|
35 |
-
* @param {object} items
|
36 |
-
*/
|
37 |
-
var Sifter = function(items, settings) {
|
38 |
-
this.items = items;
|
39 |
-
this.settings = settings || {diacritics: true};
|
40 |
-
};
|
41 |
-
|
42 |
-
/**
|
43 |
-
* Splits a search string into an array of individual
|
44 |
-
* regexps to be used to match results.
|
45 |
-
*
|
46 |
-
* @param {string} query
|
47 |
-
* @returns {array}
|
48 |
-
*/
|
49 |
-
Sifter.prototype.tokenize = function(query) {
|
50 |
-
query = trim(String(query || '').toLowerCase());
|
51 |
-
if (!query || !query.length) return [];
|
52 |
-
|
53 |
-
var i, n, regex, letter;
|
54 |
-
var tokens = [];
|
55 |
-
var words = query.split(/ +/);
|
56 |
-
|
57 |
-
for (i = 0, n = words.length; i < n; i++) {
|
58 |
-
regex = escape_regex(words[i]);
|
59 |
-
if (this.settings.diacritics) {
|
60 |
-
for (letter in DIACRITICS) {
|
61 |
-
if (DIACRITICS.hasOwnProperty(letter)) {
|
62 |
-
regex = regex.replace(new RegExp(letter, 'g'), DIACRITICS[letter]);
|
63 |
-
}
|
64 |
-
}
|
65 |
-
}
|
66 |
-
tokens.push({
|
67 |
-
string : words[i],
|
68 |
-
regex : new RegExp(regex, 'i')
|
69 |
-
});
|
70 |
-
}
|
71 |
-
|
72 |
-
return tokens;
|
73 |
-
};
|
74 |
-
|
75 |
-
/**
|
76 |
-
* Iterates over arrays and hashes.
|
77 |
-
*
|
78 |
-
* ```
|
79 |
-
* this.iterator(this.items, function(item, id) {
|
80 |
-
* // invoked for each item
|
81 |
-
* });
|
82 |
-
* ```
|
83 |
-
*
|
84 |
-
* @param {array|object} object
|
85 |
-
*/
|
86 |
-
Sifter.prototype.iterator = function(object, callback) {
|
87 |
-
var iterator;
|
88 |
-
if (is_array(object)) {
|
89 |
-
iterator = Array.prototype.forEach || function(callback) {
|
90 |
-
for (var i = 0, n = this.length; i < n; i++) {
|
91 |
-
callback(this[i], i, this);
|
92 |
-
}
|
93 |
-
};
|
94 |
-
} else {
|
95 |
-
iterator = function(callback) {
|
96 |
-
for (var key in this) {
|
97 |
-
if (this.hasOwnProperty(key)) {
|
98 |
-
callback(this[key], key, this);
|
99 |
-
}
|
100 |
-
}
|
101 |
-
};
|
102 |
-
}
|
103 |
-
|
104 |
-
iterator.apply(object, [callback]);
|
105 |
-
};
|
106 |
-
|
107 |
-
/**
|
108 |
-
* Returns a function to be used to score individual results.
|
109 |
-
*
|
110 |
-
* Good matches will have a higher score than poor matches.
|
111 |
-
* If an item is not a match, 0 will be returned by the function.
|
112 |
-
*
|
113 |
-
* @param {object|string} search
|
114 |
-
* @param {object} options (optional)
|
115 |
-
* @returns {function}
|
116 |
-
*/
|
117 |
-
Sifter.prototype.getScoreFunction = function(search, options) {
|
118 |
-
var self, fields, tokens, token_count, nesting;
|
119 |
-
|
120 |
-
self = this;
|
121 |
-
search = self.prepareSearch(search, options);
|
122 |
-
tokens = search.tokens;
|
123 |
-
fields = search.options.fields;
|
124 |
-
token_count = tokens.length;
|
125 |
-
nesting = search.options.nesting;
|
126 |
-
|
127 |
-
/**
|
128 |
-
* Calculates how close of a match the
|
129 |
-
* given value is against a search token.
|
130 |
-
*
|
131 |
-
* @param {mixed} value
|
132 |
-
* @param {object} token
|
133 |
-
* @return {number}
|
134 |
-
*/
|
135 |
-
var scoreValue = function(value, token) {
|
136 |
-
var score, pos;
|
137 |
-
|
138 |
-
if (!value) return 0;
|
139 |
-
value = String(value || '');
|
140 |
-
pos = value.search(token.regex);
|
141 |
-
if (pos === -1) return 0;
|
142 |
-
score = token.string.length / value.length;
|
143 |
-
if (pos === 0) score += 0.5;
|
144 |
-
return score;
|
145 |
-
};
|
146 |
-
|
147 |
-
/**
|
148 |
-
* Calculates the score of an object
|
149 |
-
* against the search query.
|
150 |
-
*
|
151 |
-
* @param {object} token
|
152 |
-
* @param {object} data
|
153 |
-
* @return {number}
|
154 |
-
*/
|
155 |
-
var scoreObject = (function() {
|
156 |
-
var field_count = fields.length;
|
157 |
-
if (!field_count) {
|
158 |
-
return function() { return 0; };
|
159 |
-
}
|
160 |
-
if (field_count === 1) {
|
161 |
-
return function(token, data) {
|
162 |
-
return scoreValue(getattr(data, fields[0], nesting), token);
|
163 |
-
};
|
164 |
-
}
|
165 |
-
return function(token, data) {
|
166 |
-
for (var i = 0, sum = 0; i < field_count; i++) {
|
167 |
-
sum += scoreValue(getattr(data, fields[i], nesting), token);
|
168 |
-
}
|
169 |
-
return sum / field_count;
|
170 |
-
};
|
171 |
-
})();
|
172 |
-
|
173 |
-
if (!token_count) {
|
174 |
-
return function() { return 0; };
|
175 |
-
}
|
176 |
-
if (token_count === 1) {
|
177 |
-
return function(data) {
|
178 |
-
return scoreObject(tokens[0], data);
|
179 |
-
};
|
180 |
-
}
|
181 |
-
|
182 |
-
if (search.options.conjunction === 'and') {
|
183 |
-
return function(data) {
|
184 |
-
var score;
|
185 |
-
for (var i = 0, sum = 0; i < token_count; i++) {
|
186 |
-
score = scoreObject(tokens[i], data);
|
187 |
-
if (score <= 0) return 0;
|
188 |
-
sum += score;
|
189 |
-
}
|
190 |
-
return sum / token_count;
|
191 |
-
};
|
192 |
-
} else {
|
193 |
-
return function(data) {
|
194 |
-
for (var i = 0, sum = 0; i < token_count; i++) {
|
195 |
-
sum += scoreObject(tokens[i], data);
|
196 |
-
}
|
197 |
-
return sum / token_count;
|
198 |
-
};
|
199 |
-
}
|
200 |
-
};
|
201 |
-
|
202 |
-
/**
|
203 |
-
* Returns a function that can be used to compare two
|
204 |
-
* results, for sorting purposes. If no sorting should
|
205 |
-
* be performed, `null` will be returned.
|
206 |
-
*
|
207 |
-
* @param {string|object} search
|
208 |
-
* @param {object} options
|
209 |
-
* @return function(a,b)
|
210 |
-
*/
|
211 |
-
Sifter.prototype.getSortFunction = function(search, options) {
|
212 |
-
var i, n, self, field, fields, fields_count, multiplier, multipliers, get_field, implicit_score, sort;
|
213 |
-
|
214 |
-
self = this;
|
215 |
-
search = self.prepareSearch(search, options);
|
216 |
-
sort = (!search.query && options.sort_empty) || options.sort;
|
217 |
-
|
218 |
-
/**
|
219 |
-
* Fetches the specified sort field value
|
220 |
-
* from a search result item.
|
221 |
-
*
|
222 |
-
* @param {string} name
|
223 |
-
* @param {object} result
|
224 |
-
* @return {mixed}
|
225 |
-
*/
|
226 |
-
get_field = function(name, result) {
|
227 |
-
if (name === '$score') return result.score;
|
228 |
-
return getattr(self.items[result.id], name, options.nesting);
|
229 |
-
};
|
230 |
-
|
231 |
-
// parse options
|
232 |
-
fields = [];
|
233 |
-
if (sort) {
|
234 |
-
for (i = 0, n = sort.length; i < n; i++) {
|
235 |
-
if (search.query || sort[i].field !== '$score') {
|
236 |
-
fields.push(sort[i]);
|
237 |
-
}
|
238 |
-
}
|
239 |
-
}
|
240 |
-
|
241 |
-
// the "$score" field is implied to be the primary
|
242 |
-
// sort field, unless it's manually specified
|
243 |
-
if (search.query) {
|
244 |
-
implicit_score = true;
|
245 |
-
for (i = 0, n = fields.length; i < n; i++) {
|
246 |
-
if (fields[i].field === '$score') {
|
247 |
-
implicit_score = false;
|
248 |
-
break;
|
249 |
-
}
|
250 |
-
}
|
251 |
-
if (implicit_score) {
|
252 |
-
fields.unshift({field: '$score', direction: 'desc'});
|
253 |
-
}
|
254 |
-
} else {
|
255 |
-
for (i = 0, n = fields.length; i < n; i++) {
|
256 |
-
if (fields[i].field === '$score') {
|
257 |
-
fields.splice(i, 1);
|
258 |
-
break;
|
259 |
-
}
|
260 |
-
}
|
261 |
-
}
|
262 |
-
|
263 |
-
multipliers = [];
|
264 |
-
for (i = 0, n = fields.length; i < n; i++) {
|
265 |
-
multipliers.push(fields[i].direction === 'desc' ? -1 : 1);
|
266 |
-
}
|
267 |
-
|
268 |
-
// build function
|
269 |
-
fields_count = fields.length;
|
270 |
-
if (!fields_count) {
|
271 |
-
return null;
|
272 |
-
} else if (fields_count === 1) {
|
273 |
-
field = fields[0].field;
|
274 |
-
multiplier = multipliers[0];
|
275 |
-
return function(a, b) {
|
276 |
-
return multiplier * cmp(
|
277 |
-
get_field(field, a),
|
278 |
-
get_field(field, b)
|
279 |
-
);
|
280 |
-
};
|
281 |
-
} else {
|
282 |
-
return function(a, b) {
|
283 |
-
var i, result, a_value, b_value, field;
|
284 |
-
for (i = 0; i < fields_count; i++) {
|
285 |
-
field = fields[i].field;
|
286 |
-
result = multipliers[i] * cmp(
|
287 |
-
get_field(field, a),
|
288 |
-
get_field(field, b)
|
289 |
-
);
|
290 |
-
if (result) return result;
|
291 |
-
}
|
292 |
-
return 0;
|
293 |
-
};
|
294 |
-
}
|
295 |
-
};
|
296 |
-
|
297 |
-
/**
|
298 |
-
* Parses a search query and returns an object
|
299 |
-
* with tokens and fields ready to be populated
|
300 |
-
* with results.
|
301 |
-
*
|
302 |
-
* @param {string} query
|
303 |
-
* @param {object} options
|
304 |
-
* @returns {object}
|
305 |
-
*/
|
306 |
-
Sifter.prototype.prepareSearch = function(query, options) {
|
307 |
-
if (typeof query === 'object') return query;
|
308 |
-
|
309 |
-
options = extend({}, options);
|
310 |
-
|
311 |
-
var option_fields = options.fields;
|
312 |
-
var option_sort = options.sort;
|
313 |
-
var option_sort_empty = options.sort_empty;
|
314 |
-
|
315 |
-
if (option_fields && !is_array(option_fields)) options.fields = [option_fields];
|
316 |
-
if (option_sort && !is_array(option_sort)) options.sort = [option_sort];
|
317 |
-
if (option_sort_empty && !is_array(option_sort_empty)) options.sort_empty = [option_sort_empty];
|
318 |
-
|
319 |
-
return {
|
320 |
-
options : options,
|
321 |
-
query : String(query || '').toLowerCase(),
|
322 |
-
tokens : this.tokenize(query),
|
323 |
-
total : 0,
|
324 |
-
items : []
|
325 |
-
};
|
326 |
-
};
|
327 |
-
|
328 |
-
/**
|
329 |
-
* Searches through all items and returns a sorted array of matches.
|
330 |
-
*
|
331 |
-
* The `options` parameter can contain:
|
332 |
-
*
|
333 |
-
* - fields {string|array}
|
334 |
-
* - sort {array}
|
335 |
-
* - score {function}
|
336 |
-
* - filter {bool}
|
337 |
-
* - limit {integer}
|
338 |
-
*
|
339 |
-
* Returns an object containing:
|
340 |
-
*
|
341 |
-
* - options {object}
|
342 |
-
* - query {string}
|
343 |
-
* - tokens {array}
|
344 |
-
* - total {int}
|
345 |
-
* - items {array}
|
346 |
-
*
|
347 |
-
* @param {string} query
|
348 |
-
* @param {object} options
|
349 |
-
* @returns {object}
|
350 |
-
*/
|
351 |
-
Sifter.prototype.search = function(query, options) {
|
352 |
-
var self = this, value, score, search, calculateScore;
|
353 |
-
var fn_sort;
|
354 |
-
var fn_score;
|
355 |
-
|
356 |
-
search = this.prepareSearch(query, options);
|
357 |
-
options = search.options;
|
358 |
-
query = search.query;
|
359 |
-
|
360 |
-
// generate result scoring function
|
361 |
-
fn_score = options.score || self.getScoreFunction(search);
|
362 |
-
|
363 |
-
// perform search and sort
|
364 |
-
if (query.length) {
|
365 |
-
self.iterator(self.items, function(item, id) {
|
366 |
-
score = fn_score(item);
|
367 |
-
if (options.filter === false || score > 0) {
|
368 |
-
search.items.push({'score': score, 'id': id});
|
369 |
-
}
|
370 |
-
});
|
371 |
-
} else {
|
372 |
-
self.iterator(self.items, function(item, id) {
|
373 |
-
search.items.push({'score': 1, 'id': id});
|
374 |
-
});
|
375 |
-
}
|
376 |
-
|
377 |
-
fn_sort = self.getSortFunction(search, options);
|
378 |
-
if (fn_sort) search.items.sort(fn_sort);
|
379 |
-
|
380 |
-
// apply limits
|
381 |
-
search.total = search.items.length;
|
382 |
-
if (typeof options.limit === 'number') {
|
383 |
-
search.items = search.items.slice(0, options.limit);
|
384 |
-
}
|
385 |
-
|
386 |
-
return search;
|
387 |
-
};
|
388 |
-
|
389 |
-
// utilities
|
390 |
-
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
391 |
-
|
392 |
-
var cmp = function(a, b) {
|
393 |
-
if (typeof a === 'number' && typeof b === 'number') {
|
394 |
-
return a > b ? 1 : (a < b ? -1 : 0);
|
395 |
-
}
|
396 |
-
a = asciifold(String(a || ''));
|
397 |
-
b = asciifold(String(b || ''));
|
398 |
-
if (a > b) return 1;
|
399 |
-
if (b > a) return -1;
|
400 |
-
return 0;
|
401 |
-
};
|
402 |
-
|
403 |
-
var extend = function(a, b) {
|
404 |
-
var i, n, k, object;
|
405 |
-
for (i = 1, n = arguments.length; i < n; i++) {
|
406 |
-
object = arguments[i];
|
407 |
-
if (!object) continue;
|
408 |
-
for (k in object) {
|
409 |
-
if (object.hasOwnProperty(k)) {
|
410 |
-
a[k] = object[k];
|
411 |
-
}
|
412 |
-
}
|
413 |
-
}
|
414 |
-
return a;
|
415 |
-
};
|
416 |
-
|
417 |
-
/**
|
418 |
-
* A property getter resolving dot-notation
|
419 |
-
* @param {Object} obj The root object to fetch property on
|
420 |
-
* @param {String} name The optionally dotted property name to fetch
|
421 |
-
* @param {Boolean} nesting Handle nesting or not
|
422 |
-
* @return {Object} The resolved property value
|
423 |
-
*/
|
424 |
-
var getattr = function(obj, name, nesting) {
|
425 |
-
if (!obj || !name) return;
|
426 |
-
if (!nesting) return obj[name];
|
427 |
-
var names = name.split(".");
|
428 |
-
while(names.length && (obj = obj[names.shift()]));
|
429 |
-
return obj;
|
430 |
-
};
|
431 |
-
|
432 |
-
var trim = function(str) {
|
433 |
-
return (str + '').replace(/^\s+|\s+$|/g, '');
|
434 |
-
};
|
435 |
-
|
436 |
-
var escape_regex = function(str) {
|
437 |
-
return (str + '').replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1');
|
438 |
-
};
|
439 |
-
|
440 |
-
var is_array = Array.isArray || (typeof $ !== 'undefined' && $.isArray) || function(object) {
|
441 |
-
return Object.prototype.toString.call(object) === '[object Array]';
|
442 |
-
};
|
443 |
-
|
444 |
-
var DIACRITICS = {
|
445 |
-
'a': '[aḀḁĂăÂâǍǎȺⱥȦȧẠạÄäÀàÁáĀāÃãÅåąĄÃąĄ]',
|
446 |
-
'b': '[b␢βΒB฿𐌁ᛒ]',
|
447 |
-
'c': '[cĆćĈĉČčĊċC̄c̄ÇçḈḉȻȼƇƈɕᴄCc]',
|
448 |
-
'd': '[dĎďḊḋḐḑḌḍḒḓḎḏĐđD̦d̦ƉɖƊɗƋƌᵭᶁᶑȡᴅDdð]',
|
449 |
-
'e': '[eÉéÈèÊêḘḙĚěĔĕẼẽḚḛẺẻĖėËëĒēȨȩĘęᶒɆɇȄȅẾếỀềỄễỂểḜḝḖḗḔḕȆȇẸẹỆệⱸᴇEeɘǝƏƐε]',
|
450 |
-
'f': '[fƑƒḞḟ]',
|
451 |
-
'g': '[gɢ₲ǤǥĜĝĞğĢģƓɠĠġ]',
|
452 |
-
'h': '[hĤĥĦħḨḩẖẖḤḥḢḣɦʰǶƕ]',
|
453 |
-
'i': '[iÍíÌìĬĭÎîǏǐÏïḮḯĨĩĮįĪīỈỉȈȉȊȋỊịḬḭƗɨɨ̆ᵻᶖİiIıɪIi]',
|
454 |
-
'j': '[jȷĴĵɈɉʝɟʲ]',
|
455 |
-
'k': '[kƘƙꝀꝁḰḱǨǩḲḳḴḵκϰ₭]',
|
456 |
-
'l': '[lŁłĽľĻļĹĺḶḷḸḹḼḽḺḻĿŀȽƚⱠⱡⱢɫɬᶅɭȴʟLl]',
|
457 |
-
'n': '[nŃńǸǹŇňÑñṄṅŅņṆṇṊṋṈṉN̈n̈ƝɲȠƞᵰᶇɳȵɴNnŊŋ]',
|
458 |
-
'o': '[oØøÖöÓóÒòÔôǑǒŐőŎŏȮȯỌọƟɵƠơỎỏŌōÕõǪǫȌȍՕօ]',
|
459 |
-
'p': '[pṔṕṖṗⱣᵽƤƥᵱ]',
|
460 |
-
'q': '[qꝖꝗʠɊɋꝘꝙq̃]',
|
461 |
-
'r': '[rŔŕɌɍŘřŖŗṘṙȐȑȒȓṚṛⱤɽ]',
|
462 |
-
's': '[sŚśṠṡṢṣꞨꞩŜŝŠšŞşȘșS̈s̈]',
|
463 |
-
't': '[tŤťṪṫŢţṬṭƮʈȚțṰṱṮṯƬƭ]',
|
464 |
-
'u': '[uŬŭɄʉỤụÜüÚúÙùÛûǓǔŰűŬŭƯưỦủŪūŨũŲųȔȕ∪]',
|
465 |
-
'v': '[vṼṽṾṿƲʋꝞꝟⱱʋ]',
|
466 |
-
'w': '[wẂẃẀẁŴŵẄẅẆẇẈẉ]',
|
467 |
-
'x': '[xẌẍẊẋχ]',
|
468 |
-
'y': '[yÝýỲỳŶŷŸÿỸỹẎẏỴỵɎɏƳƴ]',
|
469 |
-
'z': '[zŹźẐẑŽžŻżẒẓẔẕƵƶ]'
|
470 |
-
};
|
471 |
-
|
472 |
-
var asciifold = (function() {
|
473 |
-
var i, n, k, chunk;
|
474 |
-
var foreignletters = '';
|
475 |
-
var lookup = {};
|
476 |
-
for (k in DIACRITICS) {
|
477 |
-
if (DIACRITICS.hasOwnProperty(k)) {
|
478 |
-
chunk = DIACRITICS[k].substring(2, DIACRITICS[k].length - 1);
|
479 |
-
foreignletters += chunk;
|
480 |
-
for (i = 0, n = chunk.length; i < n; i++) {
|
481 |
-
lookup[chunk.charAt(i)] = k;
|
482 |
-
}
|
483 |
-
}
|
484 |
-
}
|
485 |
-
var regexp = new RegExp('[' + foreignletters + ']', 'g');
|
486 |
-
return function(str) {
|
487 |
-
return str.replace(regexp, function(foreignletter) {
|
488 |
-
return lookup[foreignletter];
|
489 |
-
}).toLowerCase();
|
490 |
-
};
|
491 |
-
})();
|
492 |
-
|
493 |
-
|
494 |
-
// export
|
495 |
-
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
496 |
-
|
497 |
-
return Sifter;
|
498 |
-
}));
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
/**
|
503 |
-
* microplugin.js
|
504 |
-
* Copyright (c) 2013 Brian Reavis & contributors
|
505 |
-
*
|
506 |
-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
|
507 |
-
* file except in compliance with the License. You may obtain a copy of the License at:
|
508 |
-
* http://www.apache.org/licenses/LICENSE-2.0
|
509 |
-
*
|
510 |
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
511 |
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
512 |
-
* ANY KIND, either express or implied. See the License for the specific language
|
513 |
-
* governing permissions and limitations under the License.
|
514 |
-
*
|
515 |
-
* @author Brian Reavis <brian@thirdroute.com>
|
516 |
-
*/
|
517 |
-
|
518 |
-
(function(root, factory) {
|
519 |
-
if (typeof define === 'function' && define.amd) {
|
520 |
-
define('microplugin', factory);
|
521 |
-
} else if (typeof exports === 'object') {
|
522 |
-
module.exports = factory();
|
523 |
-
} else {
|
524 |
-
root.MicroPlugin = factory();
|
525 |
-
}
|
526 |
-
}(this, function() {
|
527 |
-
var MicroPlugin = {};
|
528 |
-
|
529 |
-
MicroPlugin.mixin = function(Interface) {
|
530 |
-
Interface.plugins = {};
|
531 |
-
|
532 |
-
/**
|
533 |
-
* Initializes the listed plugins (with options).
|
534 |
-
* Acceptable formats:
|
535 |
-
*
|
536 |
-
* List (without options):
|
537 |
-
* ['a', 'b', 'c']
|
538 |
-
*
|
539 |
-
* List (with options):
|
540 |
-
* [{'name': 'a', options: {}}, {'name': 'b', options: {}}]
|
541 |
-
*
|
542 |
-
* Hash (with options):
|
543 |
-
* {'a': { ... }, 'b': { ... }, 'c': { ... }}
|
544 |
-
*
|
545 |
-
* @param {mixed} plugins
|
546 |
-
*/
|
547 |
-
Interface.prototype.initializePlugins = function(plugins) {
|
548 |
-
var i, n, key;
|
549 |
-
var self = this;
|
550 |
-
var queue = [];
|
551 |
-
|
552 |
-
self.plugins = {
|
553 |
-
names : [],
|
554 |
-
settings : {},
|
555 |
-
requested : {},
|
556 |
-
loaded : {}
|
557 |
-
};
|
558 |
-
|
559 |
-
if (utils.isArray(plugins)) {
|
560 |
-
for (i = 0, n = plugins.length; i < n; i++) {
|
561 |
-
if (typeof plugins[i] === 'string') {
|
562 |
-
queue.push(plugins[i]);
|
563 |
-
} else {
|
564 |
-
self.plugins.settings[plugins[i].name] = plugins[i].options;
|
565 |
-
queue.push(plugins[i].name);
|
566 |
-
}
|
567 |
-
}
|
568 |
-
} else if (plugins) {
|
569 |
-
for (key in plugins) {
|
570 |
-
if (plugins.hasOwnProperty(key)) {
|
571 |
-
self.plugins.settings[key] = plugins[key];
|
572 |
-
queue.push(key);
|
573 |
-
}
|
574 |
-
}
|
575 |
-
}
|
576 |
-
|
577 |
-
while (queue.length) {
|
578 |
-
self.require(queue.shift());
|
579 |
-
}
|
580 |
-
};
|
581 |
-
|
582 |
-
Interface.prototype.loadPlugin = function(name) {
|
583 |
-
var self = this;
|
584 |
-
var plugins = self.plugins;
|
585 |
-
var plugin = Interface.plugins[name];
|
586 |
-
|
587 |
-
if (!Interface.plugins.hasOwnProperty(name)) {
|
588 |
-
throw new Error('Unable to find "' + name + '" plugin');
|
589 |
-
}
|
590 |
-
|
591 |
-
plugins.requested[name] = true;
|
592 |
-
plugins.loaded[name] = plugin.fn.apply(self, [self.plugins.settings[name] || {}]);
|
593 |
-
plugins.names.push(name);
|
594 |
-
};
|
595 |
-
|
596 |
-
/**
|
597 |
-
* Initializes a plugin.
|
598 |
-
*
|
599 |
-
* @param {string} name
|
600 |
-
*/
|
601 |
-
Interface.prototype.require = function(name) {
|
602 |
-
var self = this;
|
603 |
-
var plugins = self.plugins;
|
604 |
-
|
605 |
-
if (!self.plugins.loaded.hasOwnProperty(name)) {
|
606 |
-
if (plugins.requested[name]) {
|
607 |
-
throw new Error('Plugin has circular dependency ("' + name + '")');
|
608 |
-
}
|
609 |
-
self.loadPlugin(name);
|
610 |
-
}
|
611 |
-
|
612 |
-
return plugins.loaded[name];
|
613 |
-
};
|
614 |
-
|
615 |
-
/**
|
616 |
-
* Registers a plugin.
|
617 |
-
*
|
618 |
-
* @param {string} name
|
619 |
-
* @param {function} fn
|
620 |
-
*/
|
621 |
-
Interface.define = function(name, fn) {
|
622 |
-
Interface.plugins[name] = {
|
623 |
-
'name' : name,
|
624 |
-
'fn' : fn
|
625 |
-
};
|
626 |
-
};
|
627 |
-
};
|
628 |
-
|
629 |
-
var utils = {
|
630 |
-
isArray: Array.isArray || function(vArg) {
|
631 |
-
return Object.prototype.toString.call(vArg) === '[object Array]';
|
632 |
-
}
|
633 |
-
};
|
634 |
-
|
635 |
-
return MicroPlugin;
|
636 |
-
}));
|
637 |
-
|
638 |
-
/**
|
639 |
-
* selectize.js (v0.12.2)
|
640 |
-
* Copyright (c) 2013–2015 Brian Reavis & contributors
|
641 |
-
*
|
642 |
-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
|
643 |
-
* file except in compliance with the License. You may obtain a copy of the License at:
|
644 |
-
* http://www.apache.org/licenses/LICENSE-2.0
|
645 |
-
*
|
646 |
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
647 |
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
648 |
-
* ANY KIND, either express or implied. See the License for the specific language
|
649 |
-
* governing permissions and limitations under the License.
|
650 |
-
*
|
651 |
-
* @author Brian Reavis <brian@thirdroute.com>
|
652 |
-
*/
|
653 |
-
|
654 |
-
/*jshint curly:false */
|
655 |
-
/*jshint browser:true */
|
656 |
-
|
657 |
-
(function(root, factory) {
|
658 |
-
if (typeof define === 'function' && define.amd) {
|
659 |
-
define('selectize', ['jquery','sifter','microplugin'], factory);
|
660 |
-
} else if (typeof exports === 'object') {
|
661 |
-
module.exports = factory(require('jquery'), require('sifter'), require('microplugin'));
|
662 |
-
} else {
|
663 |
-
root.Selectize = factory(root.jQuery, root.Sifter, root.MicroPlugin);
|
664 |
-
}
|
665 |
-
}(this, function($, Sifter, MicroPlugin) {
|
666 |
-
'use strict';
|
667 |
-
|
668 |
-
var highlight = function($element, pattern) {
|
669 |
-
if (typeof pattern === 'string' && !pattern.length) return;
|
670 |
-
var regex = (typeof pattern === 'string') ? new RegExp(pattern, 'i') : pattern;
|
671 |
-
|
672 |
-
var highlight = function(node) {
|
673 |
-
var skip = 0;
|
674 |
-
if (node.nodeType === 3) {
|
675 |
-
var pos = node.data.search(regex);
|
676 |
-
if (pos >= 0 && node.data.length > 0) {
|
677 |
-
var match = node.data.match(regex);
|
678 |
-
var spannode = document.createElement('span');
|
679 |
-
spannode.className = 'highlight';
|
680 |
-
var middlebit = node.splitText(pos);
|
681 |
-
var endbit = middlebit.splitText(match[0].length);
|
682 |
-
var middleclone = middlebit.cloneNode(true);
|
683 |
-
spannode.appendChild(middleclone);
|
684 |
-
middlebit.parentNode.replaceChild(spannode, middlebit);
|
685 |
-
skip = 1;
|
686 |
-
}
|
687 |
-
} else if (node.nodeType === 1 && node.childNodes && !/(script|style)/i.test(node.tagName)) {
|
688 |
-
for (var i = 0; i < node.childNodes.length; ++i) {
|
689 |
-
i += highlight(node.childNodes[i]);
|
690 |
-
}
|
691 |
-
}
|
692 |
-
return skip;
|
693 |
-
};
|
694 |
-
|
695 |
-
return $element.each(function() {
|
696 |
-
highlight(this);
|
697 |
-
});
|
698 |
-
};
|
699 |
-
|
700 |
-
var MicroEvent = function() {};
|
701 |
-
MicroEvent.prototype = {
|
702 |
-
on: function(event, fct){
|
703 |
-
this._events = this._events || {};
|
704 |
-
this._events[event] = this._events[event] || [];
|
705 |
-
this._events[event].push(fct);
|
706 |
-
},
|
707 |
-
off: function(event, fct){
|
708 |
-
var n = arguments.length;
|
709 |
-
if (n === 0) return delete this._events;
|
710 |
-
if (n === 1) return delete this._events[event];
|
711 |
-
|
712 |
-
this._events = this._events || {};
|
713 |
-
if (event in this._events === false) return;
|
714 |
-
this._events[event].splice(this._events[event].indexOf(fct), 1);
|
715 |
-
},
|
716 |
-
trigger: function(event /* , args... */){
|
717 |
-
this._events = this._events || {};
|
718 |
-
if (event in this._events === false) return;
|
719 |
-
for (var i = 0; i < this._events[event].length; i++){
|
720 |
-
this._events[event][i].apply(this, Array.prototype.slice.call(arguments, 1));
|
721 |
-
}
|
722 |
-
}
|
723 |
-
};
|
724 |
-
|
725 |
-
/**
|
726 |
-
* Mixin will delegate all MicroEvent.js function in the destination object.
|
727 |
-
*
|
728 |
-
* - MicroEvent.mixin(Foobar) will make Foobar able to use MicroEvent
|
729 |
-
*
|
730 |
-
* @param {object} the object which will support MicroEvent
|
731 |
-
*/
|
732 |
-
MicroEvent.mixin = function(destObject){
|
733 |
-
var props = ['on', 'off', 'trigger'];
|
734 |
-
for (var i = 0; i < props.length; i++){
|
735 |
-
destObject.prototype[props[i]] = MicroEvent.prototype[props[i]];
|
736 |
-
}
|
737 |
-
};
|
738 |
-
|
739 |
-
var IS_MAC = /Mac/.test(navigator.userAgent);
|
740 |
-
|
741 |
-
var KEY_A = 65;
|
742 |
-
var KEY_COMMA = 188;
|
743 |
-
var KEY_RETURN = 13;
|
744 |
-
var KEY_ESC = 27;
|
745 |
-
var KEY_LEFT = 37;
|
746 |
-
var KEY_UP = 38;
|
747 |
-
var KEY_P = 80;
|
748 |
-
var KEY_RIGHT = 39;
|
749 |
-
var KEY_DOWN = 40;
|
750 |
-
var KEY_N = 78;
|
751 |
-
var KEY_BACKSPACE = 8;
|
752 |
-
var KEY_DELETE = 46;
|
753 |
-
var KEY_SHIFT = 16;
|
754 |
-
var KEY_CMD = IS_MAC ? 91 : 17;
|
755 |
-
var KEY_CTRL = IS_MAC ? 18 : 17;
|
756 |
-
var KEY_TAB = 9;
|
757 |
-
|
758 |
-
var TAG_SELECT = 1;
|
759 |
-
var TAG_INPUT = 2;
|
760 |
-
|
761 |
-
// for now, android support in general is too spotty to support validity
|
762 |
-
var SUPPORTS_VALIDITY_API = !/android/i.test(window.navigator.userAgent) && !!document.createElement('form').validity;
|
763 |
-
|
764 |
-
var isset = function(object) {
|
765 |
-
return typeof object !== 'undefined';
|
766 |
-
};
|
767 |
-
|
768 |
-
/**
|
769 |
-
* Converts a scalar to its best string representation
|
770 |
-
* for hash keys and HTML attribute values.
|
771 |
-
*
|
772 |
-
* Transformations:
|
773 |
-
* 'str' -> 'str'
|
774 |
-
* null -> ''
|
775 |
-
* undefined -> ''
|
776 |
-
* true -> '1'
|
777 |
-
* false -> '0'
|
778 |
-
* 0 -> '0'
|
779 |
-
* 1 -> '1'
|
780 |
-
*
|
781 |
-
* @param {string} value
|
782 |
-
* @returns {string|null}
|
783 |
-
*/
|
784 |
-
var hash_key = function(value) {
|
785 |
-
if (typeof value === 'undefined' || value === null) return null;
|
786 |
-
if (typeof value === 'boolean') return value ? '1' : '0';
|
787 |
-
return value + '';
|
788 |
-
};
|
789 |
-
|
790 |
-
/**
|
791 |
-
* Escapes a string for use within HTML.
|
792 |
-
*
|
793 |
-
* @param {string} str
|
794 |
-
* @returns {string}
|
795 |
-
*/
|
796 |
-
var escape_html = function(str) {
|
797 |
-
return (str + '')
|
798 |
-
.replace(/&/g, '&')
|
799 |
-
.replace(/</g, '<')
|
800 |
-
.replace(/>/g, '>')
|
801 |
-
.replace(/"/g, '"');
|
802 |
-
};
|
803 |
-
|
804 |
-
/**
|
805 |
-
* Escapes "$" characters in replacement strings.
|
806 |
-
*
|
807 |
-
* @param {string} str
|
808 |
-
* @returns {string}
|
809 |
-
*/
|
810 |
-
var escape_replace = function(str) {
|
811 |
-
return (str + '').replace(/\$/g, '$$$$');
|
812 |
-
};
|
813 |
-
|
814 |
-
var hook = {};
|
815 |
-
|
816 |
-
/**
|
817 |
-
* Wraps `method` on `self` so that `fn`
|
818 |
-
* is invoked before the original method.
|
819 |
-
*
|
820 |
-
* @param {object} self
|
821 |
-
* @param {string} method
|
822 |
-
* @param {function} fn
|
823 |
-
*/
|
824 |
-
hook.before = function(self, method, fn) {
|
825 |
-
var original = self[method];
|
826 |
-
self[method] = function() {
|
827 |
-
fn.apply(self, arguments);
|
828 |
-
return original.apply(self, arguments);
|
829 |
-
};
|
830 |
-
};
|
831 |
-
|
832 |
-
/**
|
833 |
-
* Wraps `method` on `self` so that `fn`
|
834 |
-
* is invoked after the original method.
|
835 |
-
*
|
836 |
-
* @param {object} self
|
837 |
-
* @param {string} method
|
838 |
-
* @param {function} fn
|
839 |
-
*/
|
840 |
-
hook.after = function(self, method, fn) {
|
841 |
-
var original = self[method];
|
842 |
-
self[method] = function() {
|
843 |
-
var result = original.apply(self, arguments);
|
844 |
-
fn.apply(self, arguments);
|
845 |
-
return result;
|
846 |
-
};
|
847 |
-
};
|
848 |
-
|
849 |
-
/**
|
850 |
-
* Wraps `fn` so that it can only be invoked once.
|
851 |
-
*
|
852 |
-
* @param {function} fn
|
853 |
-
* @returns {function}
|
854 |
-
*/
|
855 |
-
var once = function(fn) {
|
856 |
-
var called = false;
|
857 |
-
return function() {
|
858 |
-
if (called) return;
|
859 |
-
called = true;
|
860 |
-
fn.apply(this, arguments);
|
861 |
-
};
|
862 |
-
};
|
863 |
-
|
864 |
-
/**
|
865 |
-
* Wraps `fn` so that it can only be called once
|
866 |
-
* every `delay` milliseconds (invoked on the falling edge).
|
867 |
-
*
|
868 |
-
* @param {function} fn
|
869 |
-
* @param {int} delay
|
870 |
-
* @returns {function}
|
871 |
-
*/
|
872 |
-
var debounce = function(fn, delay) {
|
873 |
-
var timeout;
|
874 |
-
return function() {
|
875 |
-
var self = this;
|
876 |
-
var args = arguments;
|
877 |
-
window.clearTimeout(timeout);
|
878 |
-
timeout = window.setTimeout(function() {
|
879 |
-
fn.apply(self, args);
|
880 |
-
}, delay);
|
881 |
-
};
|
882 |
-
};
|
883 |
-
|
884 |
-
/**
|
885 |
-
* Debounce all fired events types listed in `types`
|
886 |
-
* while executing the provided `fn`.
|
887 |
-
*
|
888 |
-
* @param {object} self
|
889 |
-
* @param {array} types
|
890 |
-
* @param {function} fn
|
891 |
-
*/
|
892 |
-
var debounce_events = function(self, types, fn) {
|
893 |
-
var type;
|
894 |
-
var trigger = self.trigger;
|
895 |
-
var event_args = {};
|
896 |
-
|
897 |
-
// override trigger method
|
898 |
-
self.trigger = function() {
|
899 |
-
var type = arguments[0];
|
900 |
-
if (types.indexOf(type) !== -1) {
|
901 |
-
event_args[type] = arguments;
|
902 |
-
} else {
|
903 |
-
return trigger.apply(self, arguments);
|
904 |
-
}
|
905 |
-
};
|
906 |
-
|
907 |
-
// invoke provided function
|
908 |
-
fn.apply(self, []);
|
909 |
-
self.trigger = trigger;
|
910 |
-
|
911 |
-
// trigger queued events
|
912 |
-
for (type in event_args) {
|
913 |
-
if (event_args.hasOwnProperty(type)) {
|
914 |
-
trigger.apply(self, event_args[type]);
|
915 |
-
}
|
916 |
-
}
|
917 |
-
};
|
918 |
-
|
919 |
-
/**
|
920 |
-
* A workaround for http://bugs.jquery.com/ticket/6696
|
921 |
-
*
|
922 |
-
* @param {object} $parent - Parent element to listen on.
|
923 |
-
* @param {string} event - Event name.
|
924 |
-
* @param {string} selector - Descendant selector to filter by.
|
925 |
-
* @param {function} fn - Event handler.
|
926 |
-
*/
|
927 |
-
var watchChildEvent = function($parent, event, selector, fn) {
|
928 |
-
$parent.on(event, selector, function(e) {
|
929 |
-
var child = e.target;
|
930 |
-
while (child && child.parentNode !== $parent[0]) {
|
931 |
-
child = child.parentNode;
|
932 |
-
}
|
933 |
-
e.currentTarget = child;
|
934 |
-
return fn.apply(this, [e]);
|
935 |
-
});
|
936 |
-
};
|
937 |
-
|
938 |
-
/**
|
939 |
-
* Determines the current selection within a text input control.
|
940 |
-
* Returns an object containing:
|
941 |
-
* - start
|
942 |
-
* - length
|
943 |
-
*
|
944 |
-
* @param {object} input
|
945 |
-
* @returns {object}
|
946 |
-
*/
|
947 |
-
var getSelection = function(input) {
|
948 |
-
var result = {};
|
949 |
-
if ('selectionStart' in input) {
|
950 |
-
result.start = input.selectionStart;
|
951 |
-
result.length = input.selectionEnd - result.start;
|
952 |
-
} else if (document.selection) {
|
953 |
-
input.focus();
|
954 |
-
var sel = document.selection.createRange();
|
955 |
-
var selLen = document.selection.createRange().text.length;
|
956 |
-
sel.moveStart('character', -input.value.length);
|
957 |
-
result.start = sel.text.length - selLen;
|
958 |
-
result.length = selLen;
|
959 |
-
}
|
960 |
-
return result;
|
961 |
-
};
|
962 |
-
|
963 |
-
/**
|
964 |
-
* Copies CSS properties from one element to another.
|
965 |
-
*
|
966 |
-
* @param {object} $from
|
967 |
-
* @param {object} $to
|
968 |
-
* @param {array} properties
|
969 |
-
*/
|
970 |
-
var transferStyles = function($from, $to, properties) {
|
971 |
-
var i, n, styles = {};
|
972 |
-
if (properties) {
|
973 |
-
for (i = 0, n = properties.length; i < n; i++) {
|
974 |
-
styles[properties[i]] = $from.css(properties[i]);
|
975 |
-
}
|
976 |
-
} else {
|
977 |
-
styles = $from.css();
|
978 |
-
}
|
979 |
-
$to.css(styles);
|
980 |
-
};
|
981 |
-
|
982 |
-
/**
|
983 |
-
* Measures the width of a string within a
|
984 |
-
* parent element (in pixels).
|
985 |
-
*
|
986 |
-
* @param {string} str
|
987 |
-
* @param {object} $parent
|
988 |
-
* @returns {int}
|
989 |
-
*/
|
990 |
-
var measureString = function(str, $parent) {
|
991 |
-
if (!str) {
|
992 |
-
return 0;
|
993 |
-
}
|
994 |
-
|
995 |
-
var $test = $('<test>').css({
|
996 |
-
position: 'absolute',
|
997 |
-
top: -99999,
|
998 |
-
left: -99999,
|
999 |
-
width: 'auto',
|
1000 |
-
padding: 0,
|
1001 |
-
whiteSpace: 'pre'
|
1002 |
-
}).text(str).appendTo('body');
|
1003 |
-
|
1004 |
-
transferStyles($parent, $test, [
|
1005 |
-
'letterSpacing',
|
1006 |
-
'fontSize',
|
1007 |
-
'fontFamily',
|
1008 |
-
'fontWeight',
|
1009 |
-
'textTransform'
|
1010 |
-
]);
|
1011 |
-
|
1012 |
-
var width = $test.width();
|
1013 |
-
$test.remove();
|
1014 |
-
|
1015 |
-
return width;
|
1016 |
-
};
|
1017 |
-
|
1018 |
-
/**
|
1019 |
-
* Sets up an input to grow horizontally as the user
|
1020 |
-
* types. If the value is changed manually, you can
|
1021 |
-
* trigger the "update" handler to resize:
|
1022 |
-
*
|
1023 |
-
* $input.trigger('update');
|
1024 |
-
*
|
1025 |
-
* @param {object} $input
|
1026 |
-
*/
|
1027 |
-
var autoGrow = function($input) {
|
1028 |
-
var currentWidth = null;
|
1029 |
-
|
1030 |
-
var update = function(e, options) {
|
1031 |
-
var value, keyCode, printable, placeholder, width;
|
1032 |
-
var shift, character, selection;
|
1033 |
-
e = e || window.event || {};
|
1034 |
-
options = options || {};
|
1035 |
-
|
1036 |
-
if (e.metaKey || e.altKey) return;
|
1037 |
-
if (!options.force && $input.data('grow') === false) return;
|
1038 |
-
|
1039 |
-
value = $input.val();
|
1040 |
-
if (e.type && e.type.toLowerCase() === 'keydown') {
|
1041 |
-
keyCode = e.keyCode;
|
1042 |
-
printable = (
|
1043 |
-
(keyCode >= 97 && keyCode <= 122) || // a-z
|
1044 |
-
(keyCode >= 65 && keyCode <= 90) || // A-Z
|
1045 |
-
(keyCode >= 48 && keyCode <= 57) || // 0-9
|
1046 |
-
keyCode === 32 // space
|
1047 |
-
);
|
1048 |
-
|
1049 |
-
if (keyCode === KEY_DELETE || keyCode === KEY_BACKSPACE) {
|
1050 |
-
selection = getSelection($input[0]);
|
1051 |
-
if (selection.length) {
|
1052 |
-
value = value.substring(0, selection.start) + value.substring(selection.start + selection.length);
|
1053 |
-
} else if (keyCode === KEY_BACKSPACE && selection.start) {
|
1054 |
-
value = value.substring(0, selection.start - 1) + value.substring(selection.start + 1);
|
1055 |
-
} else if (keyCode === KEY_DELETE && typeof selection.start !== 'undefined') {
|
1056 |
-
value = value.substring(0, selection.start) + value.substring(selection.start + 1);
|
1057 |
-
}
|
1058 |
-
} else if (printable) {
|
1059 |
-
shift = e.shiftKey;
|
1060 |
-
character = String.fromCharCode(e.keyCode);
|
1061 |
-
if (shift) character = character.toUpperCase();
|
1062 |
-
else character = character.toLowerCase();
|
1063 |
-
value += character;
|
1064 |
-
}
|
1065 |
-
}
|
1066 |
-
|
1067 |
-
placeholder = $input.attr('placeholder');
|
1068 |
-
if (!value && placeholder) {
|
1069 |
-
value = placeholder;
|
1070 |
-
}
|
1071 |
-
|
1072 |
-
width = measureString(value, $input) + 4;
|
1073 |
-
if (width !== currentWidth) {
|
1074 |
-
currentWidth = width;
|
1075 |
-
$input.width(width);
|
1076 |
-
$input.triggerHandler('resize');
|
1077 |
-
}
|
1078 |
-
};
|
1079 |
-
|
1080 |
-
$input.on('keydown keyup update blur', update);
|
1081 |
-
update();
|
1082 |
-
};
|
1083 |
-
|
1084 |
-
var domToString = function(d) {
|
1085 |
-
var tmp = document.createElement('div');
|
1086 |
-
|
1087 |
-
tmp.appendChild(d.cloneNode(true));
|
1088 |
-
|
1089 |
-
return tmp.innerHTML;
|
1090 |
-
};
|
1091 |
-
|
1092 |
-
|
1093 |
-
var Selectize = function($input, settings) {
|
1094 |
-
var key, i, n, dir, input, self = this;
|
1095 |
-
input = $input[0];
|
1096 |
-
input.selectize = self;
|
1097 |
-
|
1098 |
-
// detect rtl environment
|
1099 |
-
var computedStyle = window.getComputedStyle && window.getComputedStyle(input, null);
|
1100 |
-
dir = computedStyle ? computedStyle.getPropertyValue('direction') : input.currentStyle && input.currentStyle.direction;
|
1101 |
-
dir = dir || $input.parents('[dir]:first').attr('dir') || '';
|
1102 |
-
|
1103 |
-
// setup default state
|
1104 |
-
$.extend(self, {
|
1105 |
-
order : 0,
|
1106 |
-
settings : settings,
|
1107 |
-
$input : $input,
|
1108 |
-
tabIndex : $input.attr('tabindex') || '',
|
1109 |
-
tagType : input.tagName.toLowerCase() === 'select' ? TAG_SELECT : TAG_INPUT,
|
1110 |
-
rtl : /rtl/i.test(dir),
|
1111 |
-
|
1112 |
-
eventNS : '.selectize' + (++Selectize.count),
|
1113 |
-
highlightedValue : null,
|
1114 |
-
isOpen : false,
|
1115 |
-
isDisabled : false,
|
1116 |
-
isRequired : $input.is('[required]'),
|
1117 |
-
isInvalid : false,
|
1118 |
-
isLocked : false,
|
1119 |
-
isFocused : false,
|
1120 |
-
isInputHidden : false,
|
1121 |
-
isSetup : false,
|
1122 |
-
isShiftDown : false,
|
1123 |
-
isCmdDown : false,
|
1124 |
-
isCtrlDown : false,
|
1125 |
-
ignoreFocus : false,
|
1126 |
-
ignoreBlur : false,
|
1127 |
-
ignoreHover : false,
|
1128 |
-
hasOptions : false,
|
1129 |
-
currentResults : null,
|
1130 |
-
lastValue : '',
|
1131 |
-
caretPos : 0,
|
1132 |
-
loading : 0,
|
1133 |
-
loadedSearches : {},
|
1134 |
-
|
1135 |
-
$activeOption : null,
|
1136 |
-
$activeItems : [],
|
1137 |
-
|
1138 |
-
optgroups : {},
|
1139 |
-
options : {},
|
1140 |
-
userOptions : {},
|
1141 |
-
items : [],
|
1142 |
-
renderCache : {},
|
1143 |
-
onSearchChange : settings.loadThrottle === null ? self.onSearchChange : debounce(self.onSearchChange, settings.loadThrottle)
|
1144 |
-
});
|
1145 |
-
|
1146 |
-
// search system
|
1147 |
-
self.sifter = new Sifter(this.options, {diacritics: settings.diacritics});
|
1148 |
-
|
1149 |
-
// build options table
|
1150 |
-
if (self.settings.options) {
|
1151 |
-
for (i = 0, n = self.settings.options.length; i < n; i++) {
|
1152 |
-
self.registerOption(self.settings.options[i]);
|
1153 |
-
}
|
1154 |
-
delete self.settings.options;
|
1155 |
-
}
|
1156 |
-
|
1157 |
-
// build optgroup table
|
1158 |
-
if (self.settings.optgroups) {
|
1159 |
-
for (i = 0, n = self.settings.optgroups.length; i < n; i++) {
|
1160 |
-
self.registerOptionGroup(self.settings.optgroups[i]);
|
1161 |
-
}
|
1162 |
-
delete self.settings.optgroups;
|
1163 |
-
}
|
1164 |
-
|
1165 |
-
// option-dependent defaults
|
1166 |
-
self.settings.mode = self.settings.mode || (self.settings.maxItems === 1 ? 'single' : 'multi');
|
1167 |
-
if (typeof self.settings.hideSelected !== 'boolean') {
|
1168 |
-
self.settings.hideSelected = self.settings.mode === 'multi';
|
1169 |
-
}
|
1170 |
-
|
1171 |
-
self.initializePlugins(self.settings.plugins);
|
1172 |
-
self.setupCallbacks();
|
1173 |
-
self.setupTemplates();
|
1174 |
-
self.setup();
|
1175 |
-
};
|
1176 |
-
|
1177 |
-
// mixins
|
1178 |
-
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
1179 |
-
|
1180 |
-
MicroEvent.mixin(Selectize);
|
1181 |
-
MicroPlugin.mixin(Selectize);
|
1182 |
-
|
1183 |
-
// methods
|
1184 |
-
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
1185 |
-
|
1186 |
-
$.extend(Selectize.prototype, {
|
1187 |
-
|
1188 |
-
/**
|
1189 |
-
* Creates all elements and sets up event bindings.
|
1190 |
-
*/
|
1191 |
-
setup: function() {
|
1192 |
-
var self = this;
|
1193 |
-
var settings = self.settings;
|
1194 |
-
var eventNS = self.eventNS;
|
1195 |
-
var $window = $(window);
|
1196 |
-
var $document = $(document);
|
1197 |
-
var $input = self.$input;
|
1198 |
-
|
1199 |
-
var $wrapper;
|
1200 |
-
var $control;
|
1201 |
-
var $control_input;
|
1202 |
-
var $dropdown;
|
1203 |
-
var $dropdown_content;
|
1204 |
-
var $dropdown_parent;
|
1205 |
-
var inputMode;
|
1206 |
-
var timeout_blur;
|
1207 |
-
var timeout_focus;
|
1208 |
-
var classes;
|
1209 |
-
var classes_plugins;
|
1210 |
-
|
1211 |
-
inputMode = self.settings.mode;
|
1212 |
-
classes = $input.attr('class') || '';
|
1213 |
-
|
1214 |
-
$wrapper = $('<div>').addClass(settings.wrapperClass).addClass(classes).addClass(inputMode);
|
1215 |
-
$control = $('<div>').addClass(settings.inputClass).addClass('items').appendTo($wrapper);
|
1216 |
-
$control_input = $('<input type="text" autocomplete="off" />').appendTo($control).attr('tabindex', $input.is(':disabled') ? '-1' : self.tabIndex);
|
1217 |
-
$dropdown_parent = $(settings.dropdownParent || $wrapper);
|
1218 |
-
$dropdown = $('<div>').addClass(settings.dropdownClass).addClass(inputMode).hide().appendTo($dropdown_parent);
|
1219 |
-
$dropdown_content = $('<div>').addClass(settings.dropdownContentClass).appendTo($dropdown);
|
1220 |
-
|
1221 |
-
if(self.settings.copyClassesToDropdown) {
|
1222 |
-
$dropdown.addClass(classes);
|
1223 |
-
}
|
1224 |
-
|
1225 |
-
$wrapper.css({
|
1226 |
-
width: $input[0].style.width
|
1227 |
-
});
|
1228 |
-
|
1229 |
-
if (self.plugins.names.length) {
|
1230 |
-
classes_plugins = 'plugin-' + self.plugins.names.join(' plugin-');
|
1231 |
-
$wrapper.addClass(classes_plugins);
|
1232 |
-
$dropdown.addClass(classes_plugins);
|
1233 |
-
}
|
1234 |
-
|
1235 |
-
if ((settings.maxItems === null || settings.maxItems > 1) && self.tagType === TAG_SELECT) {
|
1236 |
-
$input.attr('multiple', 'multiple');
|
1237 |
-
}
|
1238 |
-
|
1239 |
-
if (self.settings.placeholder) {
|
1240 |
-
$control_input.attr('placeholder', settings.placeholder);
|
1241 |
-
}
|
1242 |
-
|
1243 |
-
// if splitOn was not passed in, construct it from the delimiter to allow pasting universally
|
1244 |
-
if (!self.settings.splitOn && self.settings.delimiter) {
|
1245 |
-
var delimiterEscaped = self.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
|
1246 |
-
self.settings.splitOn = new RegExp('\\s*' + delimiterEscaped + '+\\s*');
|
1247 |
-
}
|
1248 |
-
|
1249 |
-
if ($input.attr('autocorrect')) {
|
1250 |
-
$control_input.attr('autocorrect', $input.attr('autocorrect'));
|
1251 |
-
}
|
1252 |
-
|
1253 |
-
if ($input.attr('autocapitalize')) {
|
1254 |
-
$control_input.attr('autocapitalize', $input.attr('autocapitalize'));
|
1255 |
-
}
|
1256 |
-
|
1257 |
-
self.$wrapper = $wrapper;
|
1258 |
-
self.$control = $control;
|
1259 |
-
self.$control_input = $control_input;
|
1260 |
-
self.$dropdown = $dropdown;
|
1261 |
-
self.$dropdown_content = $dropdown_content;
|
1262 |
-
|
1263 |
-
$dropdown.on('mouseenter', '[data-selectable]', function() { return self.onOptionHover.apply(self, arguments); });
|
1264 |
-
$dropdown.on('mousedown click', '[data-selectable]', function() { return self.onOptionSelect.apply(self, arguments); });
|
1265 |
-
watchChildEvent($control, 'mousedown', '*:not(input)', function() { return self.onItemSelect.apply(self, arguments); });
|
1266 |
-
autoGrow($control_input);
|
1267 |
-
|
1268 |
-
$control.on({
|
1269 |
-
mousedown : function() { return self.onMouseDown.apply(self, arguments); },
|
1270 |
-
click : function() { return self.onClick.apply(self, arguments); }
|
1271 |
-
});
|
1272 |
-
|
1273 |
-
$control_input.on({
|
1274 |
-
mousedown : function(e) { e.stopPropagation(); },
|
1275 |
-
keydown : function() { return self.onKeyDown.apply(self, arguments); },
|
1276 |
-
keyup : function() { return self.onKeyUp.apply(self, arguments); },
|
1277 |
-
keypress : function() { return self.onKeyPress.apply(self, arguments); },
|
1278 |
-
resize : function() { self.positionDropdown.apply(self, []); },
|
1279 |
-
blur : function() { return self.onBlur.apply(self, arguments); },
|
1280 |
-
focus : function() { self.ignoreBlur = false; return self.onFocus.apply(self, arguments); },
|
1281 |
-
paste : function() { return self.onPaste.apply(self, arguments); }
|
1282 |
-
});
|
1283 |
-
|
1284 |
-
$document.on('keydown' + eventNS, function(e) {
|
1285 |
-
self.isCmdDown = e[IS_MAC ? 'metaKey' : 'ctrlKey'];
|
1286 |
-
self.isCtrlDown = e[IS_MAC ? 'altKey' : 'ctrlKey'];
|
1287 |
-
self.isShiftDown = e.shiftKey;
|
1288 |
-
});
|
1289 |
-
|
1290 |
-
$document.on('keyup' + eventNS, function(e) {
|
1291 |
-
if (e.keyCode === KEY_CTRL) self.isCtrlDown = false;
|
1292 |
-
if (e.keyCode === KEY_SHIFT) self.isShiftDown = false;
|
1293 |
-
if (e.keyCode === KEY_CMD) self.isCmdDown = false;
|
1294 |
-
});
|
1295 |
-
|
1296 |
-
$document.on('mousedown' + eventNS, function(e) {
|
1297 |
-
if (self.isFocused) {
|
1298 |
-
// prevent events on the dropdown scrollbar from causing the control to blur
|
1299 |
-
if (e.target === self.$dropdown[0] || e.target.parentNode === self.$dropdown[0]) {
|
1300 |
-
return false;
|
1301 |
-
}
|
1302 |
-
// blur on click outside
|
1303 |
-
if (!self.$control.has(e.target).length && e.target !== self.$control[0]) {
|
1304 |
-
self.blur(e.target);
|
1305 |
-
}
|
1306 |
-
}
|
1307 |
-
});
|
1308 |
-
|
1309 |
-
$window.on(['scroll' + eventNS, 'resize' + eventNS].join(' '), function() {
|
1310 |
-
if (self.isOpen) {
|
1311 |
-
self.positionDropdown.apply(self, arguments);
|
1312 |
-
}
|
1313 |
-
});
|
1314 |
-
$window.on('mousemove' + eventNS, function() {
|
1315 |
-
self.ignoreHover = false;
|
1316 |
-
});
|
1317 |
-
|
1318 |
-
// store original children and tab index so that they can be
|
1319 |
-
// restored when the destroy() method is called.
|
1320 |
-
this.revertSettings = {
|
1321 |
-
$children : $input.children().detach(),
|
1322 |
-
tabindex : $input.attr('tabindex')
|
1323 |
-
};
|
1324 |
-
|
1325 |
-
$input.attr('tabindex', -1).hide().after(self.$wrapper);
|
1326 |
-
|
1327 |
-
if ($.isArray(settings.items)) {
|
1328 |
-
self.setValue(settings.items);
|
1329 |
-
delete settings.items;
|
1330 |
-
}
|
1331 |
-
|
1332 |
-
// feature detect for the validation API
|
1333 |
-
if (SUPPORTS_VALIDITY_API) {
|
1334 |
-
$input.on('invalid' + eventNS, function(e) {
|
1335 |
-
e.preventDefault();
|
1336 |
-
self.isInvalid = true;
|
1337 |
-
self.refreshState();
|
1338 |
-
});
|
1339 |
-
}
|
1340 |
-
|
1341 |
-
self.updateOriginalInput();
|
1342 |
-
self.refreshItems();
|
1343 |
-
self.refreshState();
|
1344 |
-
self.updatePlaceholder();
|
1345 |
-
self.isSetup = true;
|
1346 |
-
|
1347 |
-
if ($input.is(':disabled')) {
|
1348 |
-
self.disable();
|
1349 |
-
}
|
1350 |
-
|
1351 |
-
self.on('change', this.onChange);
|
1352 |
-
|
1353 |
-
$input.data('selectize', self);
|
1354 |
-
$input.addClass('selectized');
|
1355 |
-
self.trigger('initialize');
|
1356 |
-
|
1357 |
-
// preload options
|
1358 |
-
if (settings.preload === true) {
|
1359 |
-
self.onSearchChange('');
|
1360 |
-
}
|
1361 |
-
|
1362 |
-
},
|
1363 |
-
|
1364 |
-
/**
|
1365 |
-
* Sets up default rendering functions.
|
1366 |
-
*/
|
1367 |
-
setupTemplates: function() {
|
1368 |
-
var self = this;
|
1369 |
-
var field_label = self.settings.labelField;
|
1370 |
-
var field_optgroup = self.settings.optgroupLabelField;
|
1371 |
-
|
1372 |
-
var templates = {
|
1373 |
-
'optgroup': function(data) {
|
1374 |
-
return '<div class="optgroup">' + data.html + '</div>';
|
1375 |
-
},
|
1376 |
-
'optgroup_header': function(data, escape) {
|
1377 |
-
return '<div class="optgroup-header">' + escape(data[field_optgroup]) + '</div>';
|
1378 |
-
},
|
1379 |
-
'option': function(data, escape) {
|
1380 |
-
return '<div class="option">' + escape(data[field_label]) + '</div>';
|
1381 |
-
},
|
1382 |
-
'item': function(data, escape) {
|
1383 |
-
return '<div class="item">' + escape(data[field_label]) + '</div>';
|
1384 |
-
},
|
1385 |
-
'option_create': function(data, escape) {
|
1386 |
-
return '<div class="create">Add <strong>' + escape(data.input) + '</strong>…</div>';
|
1387 |
-
}
|
1388 |
-
};
|
1389 |
-
|
1390 |
-
self.settings.render = $.extend({}, templates, self.settings.render);
|
1391 |
-
},
|
1392 |
-
|
1393 |
-
/**
|
1394 |
-
* Maps fired events to callbacks provided
|
1395 |
-
* in the settings used when creating the control.
|
1396 |
-
*/
|
1397 |
-
setupCallbacks: function() {
|
1398 |
-
var key, fn, callbacks = {
|
1399 |
-
'initialize' : 'onInitialize',
|
1400 |
-
'change' : 'onChange',
|
1401 |
-
'item_add' : 'onItemAdd',
|
1402 |
-
'item_remove' : 'onItemRemove',
|
1403 |
-
'clear' : 'onClear',
|
1404 |
-
'option_add' : 'onOptionAdd',
|
1405 |
-
'option_remove' : 'onOptionRemove',
|
1406 |
-
'option_clear' : 'onOptionClear',
|
1407 |
-
'optgroup_add' : 'onOptionGroupAdd',
|
1408 |
-
'optgroup_remove' : 'onOptionGroupRemove',
|
1409 |
-
'optgroup_clear' : 'onOptionGroupClear',
|
1410 |
-
'dropdown_open' : 'onDropdownOpen',
|
1411 |
-
'dropdown_close' : 'onDropdownClose',
|
1412 |
-
'type' : 'onType',
|
1413 |
-
'load' : 'onLoad',
|
1414 |
-
'focus' : 'onFocus',
|
1415 |
-
'blur' : 'onBlur'
|
1416 |
-
};
|
1417 |
-
|
1418 |
-
for (key in callbacks) {
|
1419 |
-
if (callbacks.hasOwnProperty(key)) {
|
1420 |
-
fn = this.settings[callbacks[key]];
|
1421 |
-
if (fn) this.on(key, fn);
|
1422 |
-
}
|
1423 |
-
}
|
1424 |
-
},
|
1425 |
-
|
1426 |
-
/**
|
1427 |
-
* Triggered when the main control element
|
1428 |
-
* has a click event.
|
1429 |
-
*
|
1430 |
-
* @param {object} e
|
1431 |
-
* @return {boolean}
|
1432 |
-
*/
|
1433 |
-
onClick: function(e) {
|
1434 |
-
var self = this;
|
1435 |
-
|
1436 |
-
// necessary for mobile webkit devices (manual focus triggering
|
1437 |
-
// is ignored unless invoked within a click event)
|
1438 |
-
if (!self.isFocused) {
|
1439 |
-
self.focus();
|
1440 |
-
e.preventDefault();
|
1441 |
-
}
|
1442 |
-
},
|
1443 |
-
|
1444 |
-
/**
|
1445 |
-
* Triggered when the main control element
|
1446 |
-
* has a mouse down event.
|
1447 |
-
*
|
1448 |
-
* @param {object} e
|
1449 |
-
* @return {boolean}
|
1450 |
-
*/
|
1451 |
-
onMouseDown: function(e) {
|
1452 |
-
var self = this;
|
1453 |
-
var defaultPrevented = e.isDefaultPrevented();
|
1454 |
-
var $target = $(e.target);
|
1455 |
-
|
1456 |
-
if (self.isFocused) {
|
1457 |
-
// retain focus by preventing native handling. if the
|
1458 |
-
// event target is the input it should not be modified.
|
1459 |
-
// otherwise, text selection within the input won't work.
|
1460 |
-
if (e.target !== self.$control_input[0]) {
|
1461 |
-
if (self.settings.mode === 'single') {
|
1462 |
-
// toggle dropdown
|
1463 |
-
self.isOpen ? self.close() : self.open();
|
1464 |
-
} else if (!defaultPrevented) {
|
1465 |
-
self.setActiveItem(null);
|
1466 |
-
}
|
1467 |
-
return false;
|
1468 |
-
}
|
1469 |
-
} else {
|
1470 |
-
// give control focus
|
1471 |
-
if (!defaultPrevented) {
|
1472 |
-
window.setTimeout(function() {
|
1473 |
-
self.focus();
|
1474 |
-
}, 0);
|
1475 |
-
}
|
1476 |
-
}
|
1477 |
-
},
|
1478 |
-
|
1479 |
-
/**
|
1480 |
-
* Triggered when the value of the control has been changed.
|
1481 |
-
* This should propagate the event to the original DOM
|
1482 |
-
* input / select element.
|
1483 |
-
*/
|
1484 |
-
onChange: function() {
|
1485 |
-
this.$input.trigger('change');
|
1486 |
-
},
|
1487 |
-
|
1488 |
-
/**
|
1489 |
-
* Triggered on <input> paste.
|
1490 |
-
*
|
1491 |
-
* @param {object} e
|
1492 |
-
* @returns {boolean}
|
1493 |
-
*/
|
1494 |
-
onPaste: function(e) {
|
1495 |
-
var self = this;
|
1496 |
-
if (self.isFull() || self.isInputHidden || self.isLocked) {
|
1497 |
-
e.preventDefault();
|
1498 |
-
} else {
|
1499 |
-
// If a regex or string is included, this will split the pasted
|
1500 |
-
// input and create Items for each separate value
|
1501 |
-
if (self.settings.splitOn) {
|
1502 |
-
setTimeout(function() {
|
1503 |
-
var splitInput = $.trim(self.$control_input.val() || '').split(self.settings.splitOn);
|
1504 |
-
for (var i = 0, n = splitInput.length; i < n; i++) {
|
1505 |
-
self.createItem(splitInput[i]);
|
1506 |
-
}
|
1507 |
-
}, 0);
|
1508 |
-
}
|
1509 |
-
}
|
1510 |
-
},
|
1511 |
-
|
1512 |
-
/**
|
1513 |
-
* Triggered on <input> keypress.
|
1514 |
-
*
|
1515 |
-
* @param {object} e
|
1516 |
-
* @returns {boolean}
|
1517 |
-
*/
|
1518 |
-
onKeyPress: function(e) {
|
1519 |
-
if (this.isLocked) return e && e.preventDefault();
|
1520 |
-
var character = String.fromCharCode(e.keyCode || e.which);
|
1521 |
-
if (this.settings.create && this.settings.mode === 'multi' && character === this.settings.delimiter) {
|
1522 |
-
this.createItem();
|
1523 |
-
e.preventDefault();
|
1524 |
-
return false;
|
1525 |
-
}
|
1526 |
-
},
|
1527 |
-
|
1528 |
-
/**
|
1529 |
-
* Triggered on <input> keydown.
|
1530 |
-
*
|
1531 |
-
* @param {object} e
|
1532 |
-
* @returns {boolean}
|
1533 |
-
*/
|
1534 |
-
onKeyDown: function(e) {
|
1535 |
-
var isInput = e.target === this.$control_input[0];
|
1536 |
-
var self = this;
|
1537 |
-
|
1538 |
-
if (self.isLocked) {
|
1539 |
-
if (e.keyCode !== KEY_TAB) {
|
1540 |
-
e.preventDefault();
|
1541 |
-
}
|
1542 |
-
return;
|
1543 |
-
}
|
1544 |
-
|
1545 |
-
switch (e.keyCode) {
|
1546 |
-
case KEY_A:
|
1547 |
-
if (self.isCmdDown) {
|
1548 |
-
self.selectAll();
|
1549 |
-
return;
|
1550 |
-
}
|
1551 |
-
break;
|
1552 |
-
case KEY_ESC:
|
1553 |
-
if (self.isOpen) {
|
1554 |
-
e.preventDefault();
|
1555 |
-
e.stopPropagation();
|
1556 |
-
self.close();
|
1557 |
-
}
|
1558 |
-
return;
|
1559 |
-
case KEY_N:
|
1560 |
-
if (!e.ctrlKey || e.altKey) break;
|
1561 |
-
case KEY_DOWN:
|
1562 |
-
if (!self.isOpen && self.hasOptions) {
|
1563 |
-
self.open();
|
1564 |
-
} else if (self.$activeOption) {
|
1565 |
-
self.ignoreHover = true;
|
1566 |
-
var $next = self.getAdjacentOption(self.$activeOption, 1);
|
1567 |
-
if ($next.length) self.setActiveOption($next, true, true);
|
1568 |
-
}
|
1569 |
-
e.preventDefault();
|
1570 |
-
return;
|
1571 |
-
case KEY_P:
|
1572 |
-
if (!e.ctrlKey || e.altKey) break;
|
1573 |
-
case KEY_UP:
|
1574 |
-
if (self.$activeOption) {
|
1575 |
-
self.ignoreHover = true;
|
1576 |
-
var $prev = self.getAdjacentOption(self.$activeOption, -1);
|
1577 |
-
if ($prev.length) self.setActiveOption($prev, true, true);
|
1578 |
-
}
|
1579 |
-
e.preventDefault();
|
1580 |
-
return;
|
1581 |
-
case KEY_RETURN:
|
1582 |
-
if (self.isOpen && self.$activeOption) {
|
1583 |
-
self.onOptionSelect({currentTarget: self.$activeOption});
|
1584 |
-
e.preventDefault();
|
1585 |
-
}
|
1586 |
-
return;
|
1587 |
-
case KEY_LEFT:
|
1588 |
-
self.advanceSelection(-1, e);
|
1589 |
-
return;
|
1590 |
-
case KEY_RIGHT:
|
1591 |
-
self.advanceSelection(1, e);
|
1592 |
-
return;
|
1593 |
-
case KEY_TAB:
|
1594 |
-
if (self.settings.selectOnTab && self.isOpen && self.$activeOption) {
|
1595 |
-
self.onOptionSelect({currentTarget: self.$activeOption});
|
1596 |
-
|
1597 |
-
// Default behaviour is to jump to the next field, we only want this
|
1598 |
-
// if the current field doesn't accept any more entries
|
1599 |
-
if (!self.isFull()) {
|
1600 |
-
e.preventDefault();
|
1601 |
-
}
|
1602 |
-
}
|
1603 |
-
if (self.settings.create && self.createItem()) {
|
1604 |
-
e.preventDefault();
|
1605 |
-
}
|
1606 |
-
return;
|
1607 |
-
case KEY_BACKSPACE:
|
1608 |
-
case KEY_DELETE:
|
1609 |
-
self.deleteSelection(e);
|
1610 |
-
return;
|
1611 |
-
}
|
1612 |
-
|
1613 |
-
if ((self.isFull() || self.isInputHidden) && !(IS_MAC ? e.metaKey : e.ctrlKey)) {
|
1614 |
-
e.preventDefault();
|
1615 |
-
return;
|
1616 |
-
}
|
1617 |
-
},
|
1618 |
-
|
1619 |
-
/**
|
1620 |
-
* Triggered on <input> keyup.
|
1621 |
-
*
|
1622 |
-
* @param {object} e
|
1623 |
-
* @returns {boolean}
|
1624 |
-
*/
|
1625 |
-
onKeyUp: function(e) {
|
1626 |
-
var self = this;
|
1627 |
-
|
1628 |
-
if (self.isLocked) return e && e.preventDefault();
|
1629 |
-
var value = self.$control_input.val() || '';
|
1630 |
-
if (self.lastValue !== value) {
|
1631 |
-
self.lastValue = value;
|
1632 |
-
self.onSearchChange(value);
|
1633 |
-
self.refreshOptions();
|
1634 |
-
self.trigger('type', value);
|
1635 |
-
}
|
1636 |
-
},
|
1637 |
-
|
1638 |
-
/**
|
1639 |
-
* Invokes the user-provide option provider / loader.
|
1640 |
-
*
|
1641 |
-
* Note: this function is debounced in the Selectize
|
1642 |
-
* constructor (by `settings.loadThrottle` milliseconds)
|
1643 |
-
*
|
1644 |
-
* @param {string} value
|
1645 |
-
*/
|
1646 |
-
onSearchChange: function(value) {
|
1647 |
-
var self = this;
|
1648 |
-
var fn = self.settings.load;
|
1649 |
-
if (!fn) return;
|
1650 |
-
if (self.loadedSearches.hasOwnProperty(value)) return;
|
1651 |
-
self.loadedSearches[value] = true;
|
1652 |
-
self.load(function(callback) {
|
1653 |
-
fn.apply(self, [value, callback]);
|
1654 |
-
});
|
1655 |
-
},
|
1656 |
-
|
1657 |
-
/**
|
1658 |
-
* Triggered on <input> focus.
|
1659 |
-
*
|
1660 |
-
* @param {object} e (optional)
|
1661 |
-
* @returns {boolean}
|
1662 |
-
*/
|
1663 |
-
onFocus: function(e) {
|
1664 |
-
var self = this;
|
1665 |
-
var wasFocused = self.isFocused;
|
1666 |
-
|
1667 |
-
if (self.isDisabled) {
|
1668 |
-
self.blur();
|
1669 |
-
e && e.preventDefault();
|
1670 |
-
return false;
|
1671 |
-
}
|
1672 |
-
|
1673 |
-
if (self.ignoreFocus) return;
|
1674 |
-
self.isFocused = true;
|
1675 |
-
if (self.settings.preload === 'focus') self.onSearchChange('');
|
1676 |
-
|
1677 |
-
if (!wasFocused) self.trigger('focus');
|
1678 |
-
|
1679 |
-
if (!self.$activeItems.length) {
|
1680 |
-
self.showInput();
|
1681 |
-
self.setActiveItem(null);
|
1682 |
-
self.refreshOptions(!!self.settings.openOnFocus);
|
1683 |
-
}
|
1684 |
-
|
1685 |
-
self.refreshState();
|
1686 |
-
},
|
1687 |
-
|
1688 |
-
/**
|
1689 |
-
* Triggered on <input> blur.
|
1690 |
-
*
|
1691 |
-
* @param {object} e
|
1692 |
-
* @param {Element} dest
|
1693 |
-
*/
|
1694 |
-
onBlur: function(e, dest) {
|
1695 |
-
var self = this;
|
1696 |
-
if (!self.isFocused) return;
|
1697 |
-
self.isFocused = false;
|
1698 |
-
|
1699 |
-
if (self.ignoreFocus) {
|
1700 |
-
return;
|
1701 |
-
} else if (!self.ignoreBlur && document.activeElement === self.$dropdown_content[0]) {
|
1702 |
-
// necessary to prevent IE closing the dropdown when the scrollbar is clicked
|
1703 |
-
self.ignoreBlur = true;
|
1704 |
-
self.onFocus(e);
|
1705 |
-
return;
|
1706 |
-
}
|
1707 |
-
|
1708 |
-
var deactivate = function() {
|
1709 |
-
self.close();
|
1710 |
-
self.setTextboxValue('');
|
1711 |
-
self.setActiveItem(null);
|
1712 |
-
self.setActiveOption(null);
|
1713 |
-
self.setCaret(self.items.length);
|
1714 |
-
self.refreshState();
|
1715 |
-
|
1716 |
-
// IE11 bug: element still marked as active
|
1717 |
-
dest && dest.focus();
|
1718 |
-
|
1719 |
-
self.ignoreFocus = false;
|
1720 |
-
self.trigger('blur');
|
1721 |
-
};
|
1722 |
-
|
1723 |
-
self.ignoreFocus = true;
|
1724 |
-
if (self.settings.create && self.settings.createOnBlur) {
|
1725 |
-
self.createItem(null, false, deactivate);
|
1726 |
-
} else {
|
1727 |
-
deactivate();
|
1728 |
-
}
|
1729 |
-
},
|
1730 |
-
|
1731 |
-
/**
|
1732 |
-
* Triggered when the user rolls over
|
1733 |
-
* an option in the autocomplete dropdown menu.
|
1734 |
-
*
|
1735 |
-
* @param {object} e
|
1736 |
-
* @returns {boolean}
|
1737 |
-
*/
|
1738 |
-
onOptionHover: function(e) {
|
1739 |
-
if (this.ignoreHover) return;
|
1740 |
-
this.setActiveOption(e.currentTarget, false);
|
1741 |
-
},
|
1742 |
-
|
1743 |
-
/**
|
1744 |
-
* Triggered when the user clicks on an option
|
1745 |
-
* in the autocomplete dropdown menu.
|
1746 |
-
*
|
1747 |
-
* @param {object} e
|
1748 |
-
* @returns {boolean}
|
1749 |
-
*/
|
1750 |
-
onOptionSelect: function(e) {
|
1751 |
-
var value, $target, $option, self = this;
|
1752 |
-
|
1753 |
-
if (e.preventDefault) {
|
1754 |
-
e.preventDefault();
|
1755 |
-
e.stopPropagation();
|
1756 |
-
}
|
1757 |
-
|
1758 |
-
$target = $(e.currentTarget);
|
1759 |
-
if ($target.hasClass('create')) {
|
1760 |
-
self.createItem(null, function() {
|
1761 |
-
if (self.settings.closeAfterSelect) {
|
1762 |
-
self.close();
|
1763 |
-
}
|
1764 |
-
});
|
1765 |
-
} else {
|
1766 |
-
value = $target.attr('data-value');
|
1767 |
-
if (typeof value !== 'undefined') {
|
1768 |
-
self.lastQuery = null;
|
1769 |
-
self.setTextboxValue('');
|
1770 |
-
self.addItem(value);
|
1771 |
-
if (self.settings.closeAfterSelect) {
|
1772 |
-
self.close();
|
1773 |
-
} else if (!self.settings.hideSelected && e.type && /mouse/.test(e.type)) {
|
1774 |
-
self.setActiveOption(self.getOption(value));
|
1775 |
-
}
|
1776 |
-
}
|
1777 |
-
}
|
1778 |
-
},
|
1779 |
-
|
1780 |
-
/**
|
1781 |
-
* Triggered when the user clicks on an item
|
1782 |
-
* that has been selected.
|
1783 |
-
*
|
1784 |
-
* @param {object} e
|
1785 |
-
* @returns {boolean}
|
1786 |
-
*/
|
1787 |
-
onItemSelect: function(e) {
|
1788 |
-
var self = this;
|
1789 |
-
|
1790 |
-
if (self.isLocked) return;
|
1791 |
-
if (self.settings.mode === 'multi') {
|
1792 |
-
e.preventDefault();
|
1793 |
-
self.setActiveItem(e.currentTarget, e);
|
1794 |
-
}
|
1795 |
-
},
|
1796 |
-
|
1797 |
-
/**
|
1798 |
-
* Invokes the provided method that provides
|
1799 |
-
* results to a callback---which are then added
|
1800 |
-
* as options to the control.
|
1801 |
-
*
|
1802 |
-
* @param {function} fn
|
1803 |
-
*/
|
1804 |
-
load: function(fn) {
|
1805 |
-
var self = this;
|
1806 |
-
var $wrapper = self.$wrapper.addClass(self.settings.loadingClass);
|
1807 |
-
|
1808 |
-
self.loading++;
|
1809 |
-
fn.apply(self, [function(results) {
|
1810 |
-
self.loading = Math.max(self.loading - 1, 0);
|
1811 |
-
if (results && results.length) {
|
1812 |
-
self.addOption(results);
|
1813 |
-
self.refreshOptions(self.isFocused && !self.isInputHidden);
|
1814 |
-
}
|
1815 |
-
if (!self.loading) {
|
1816 |
-
$wrapper.removeClass(self.settings.loadingClass);
|
1817 |
-
}
|
1818 |
-
self.trigger('load', results);
|
1819 |
-
}]);
|
1820 |
-
},
|
1821 |
-
|
1822 |
-
/**
|
1823 |
-
* Sets the input field of the control to the specified value.
|
1824 |
-
*
|
1825 |
-
* @param {string} value
|
1826 |
-
*/
|
1827 |
-
setTextboxValue: function(value) {
|
1828 |
-
var $input = this.$control_input;
|
1829 |
-
var changed = $input.val() !== value;
|
1830 |
-
if (changed) {
|
1831 |
-
$input.val(value).triggerHandler('update');
|
1832 |
-
this.lastValue = value;
|
1833 |
-
}
|
1834 |
-
},
|
1835 |
-
|
1836 |
-
/**
|
1837 |
-
* Returns the value of the control. If multiple items
|
1838 |
-
* can be selected (e.g. <select multiple>), this returns
|
1839 |
-
* an array. If only one item can be selected, this
|
1840 |
-
* returns a string.
|
1841 |
-
*
|
1842 |
-
* @returns {mixed}
|
1843 |
-
*/
|
1844 |
-
getValue: function() {
|
1845 |
-
if (this.tagType === TAG_SELECT && this.$input.attr('multiple')) {
|
1846 |
-
return this.items;
|
1847 |
-
} else {
|
1848 |
-
return this.items.join(this.settings.delimiter);
|
1849 |
-
}
|
1850 |
-
},
|
1851 |
-
|
1852 |
-
/**
|
1853 |
-
* Resets the selected items to the given value.
|
1854 |
-
*
|
1855 |
-
* @param {mixed} value
|
1856 |
-
*/
|
1857 |
-
setValue: function(value, silent) {
|
1858 |
-
var events = silent ? [] : ['change'];
|
1859 |
-
|
1860 |
-
debounce_events(this, events, function() {
|
1861 |
-
this.clear(silent);
|
1862 |
-
this.addItems(value, silent);
|
1863 |
-
});
|
1864 |
-
},
|
1865 |
-
|
1866 |
-
/**
|
1867 |
-
* Sets the selected item.
|
1868 |
-
*
|
1869 |
-
* @param {object} $item
|
1870 |
-
* @param {object} e (optional)
|
1871 |
-
*/
|
1872 |
-
setActiveItem: function($item, e) {
|
1873 |
-
var self = this;
|
1874 |
-
var eventName;
|
1875 |
-
var i, idx, begin, end, item, swap;
|
1876 |
-
var $last;
|
1877 |
-
|
1878 |
-
if (self.settings.mode === 'single') return;
|
1879 |
-
$item = $($item);
|
1880 |
-
|
1881 |
-
// clear the active selection
|
1882 |
-
if (!$item.length) {
|
1883 |
-
$(self.$activeItems).removeClass('active');
|
1884 |
-
self.$activeItems = [];
|
1885 |
-
if (self.isFocused) {
|
1886 |
-
self.showInput();
|
1887 |
-
}
|
1888 |
-
return;
|
1889 |
-
}
|
1890 |
-
|
1891 |
-
// modify selection
|
1892 |
-
eventName = e && e.type.toLowerCase();
|
1893 |
-
|
1894 |
-
if (eventName === 'mousedown' && self.isShiftDown && self.$activeItems.length) {
|
1895 |
-
$last = self.$control.children('.active:last');
|
1896 |
-
begin = Array.prototype.indexOf.apply(self.$control[0].childNodes, [$last[0]]);
|
1897 |
-
end = Array.prototype.indexOf.apply(self.$control[0].childNodes, [$item[0]]);
|
1898 |
-
if (begin > end) {
|
1899 |
-
swap = begin;
|
1900 |
-
begin = end;
|
1901 |
-
end = swap;
|
1902 |
-
}
|
1903 |
-
for (i = begin; i <= end; i++) {
|
1904 |
-
item = self.$control[0].childNodes[i];
|
1905 |
-
if (self.$activeItems.indexOf(item) === -1) {
|
1906 |
-
$(item).addClass('active');
|
1907 |
-
self.$activeItems.push(item);
|
1908 |
-
}
|
1909 |
-
}
|
1910 |
-
e.preventDefault();
|
1911 |
-
} else if ((eventName === 'mousedown' && self.isCtrlDown) || (eventName === 'keydown' && this.isShiftDown)) {
|
1912 |
-
if ($item.hasClass('active')) {
|
1913 |
-
idx = self.$activeItems.indexOf($item[0]);
|
1914 |
-
self.$activeItems.splice(idx, 1);
|
1915 |
-
$item.removeClass('active');
|
1916 |
-
} else {
|
1917 |
-
self.$activeItems.push($item.addClass('active')[0]);
|
1918 |
-
}
|
1919 |
-
} else {
|
1920 |
-
$(self.$activeItems).removeClass('active');
|
1921 |
-
self.$activeItems = [$item.addClass('active')[0]];
|
1922 |
-
}
|
1923 |
-
|
1924 |
-
// ensure control has focus
|
1925 |
-
self.hideInput();
|
1926 |
-
if (!this.isFocused) {
|
1927 |
-
self.focus();
|
1928 |
-
}
|
1929 |
-
},
|
1930 |
-
|
1931 |
-
/**
|
1932 |
-
* Sets the selected item in the dropdown menu
|
1933 |
-
* of available options.
|
1934 |
-
*
|
1935 |
-
* @param {object} $object
|
1936 |
-
* @param {boolean} scroll
|
1937 |
-
* @param {boolean} animate
|
1938 |
-
*/
|
1939 |
-
setActiveOption: function($option, scroll, animate) {
|
1940 |
-
var height_menu, height_item, y;
|
1941 |
-
var scroll_top, scroll_bottom;
|
1942 |
-
var self = this;
|
1943 |
-
|
1944 |
-
if (self.$activeOption) self.$activeOption.removeClass('active');
|
1945 |
-
self.$activeOption = null;
|
1946 |
-
|
1947 |
-
$option = $($option);
|
1948 |
-
if (!$option.length) return;
|
1949 |
-
|
1950 |
-
self.$activeOption = $option.addClass('active');
|
1951 |
-
|
1952 |
-
if (scroll || !isset(scroll)) {
|
1953 |
-
|
1954 |
-
height_menu = self.$dropdown_content.height();
|
1955 |
-
height_item = self.$activeOption.outerHeight(true);
|
1956 |
-
scroll = self.$dropdown_content.scrollTop() || 0;
|
1957 |
-
y = self.$activeOption.offset().top - self.$dropdown_content.offset().top + scroll;
|
1958 |
-
scroll_top = y;
|
1959 |
-
scroll_bottom = y - height_menu + height_item;
|
1960 |
-
|
1961 |
-
if (y + height_item > height_menu + scroll) {
|
1962 |
-
self.$dropdown_content.stop().animate({scrollTop: scroll_bottom}, animate ? self.settings.scrollDuration : 0);
|
1963 |
-
} else if (y < scroll) {
|
1964 |
-
self.$dropdown_content.stop().animate({scrollTop: scroll_top}, animate ? self.settings.scrollDuration : 0);
|
1965 |
-
}
|
1966 |
-
|
1967 |
-
}
|
1968 |
-
},
|
1969 |
-
|
1970 |
-
/**
|
1971 |
-
* Selects all items (CTRL + A).
|
1972 |
-
*/
|
1973 |
-
selectAll: function() {
|
1974 |
-
var self = this;
|
1975 |
-
if (self.settings.mode === 'single') return;
|
1976 |
-
|
1977 |
-
self.$activeItems = Array.prototype.slice.apply(self.$control.children(':not(input)').addClass('active'));
|
1978 |
-
if (self.$activeItems.length) {
|
1979 |
-
self.hideInput();
|
1980 |
-
self.close();
|
1981 |
-
}
|
1982 |
-
self.focus();
|
1983 |
-
},
|
1984 |
-
|
1985 |
-
/**
|
1986 |
-
* Hides the input element out of view, while
|
1987 |
-
* retaining its focus.
|
1988 |
-
*/
|
1989 |
-
hideInput: function() {
|
1990 |
-
var self = this;
|
1991 |
-
|
1992 |
-
self.setTextboxValue('');
|
1993 |
-
self.$control_input.css({opacity: 0, position: 'absolute', left: self.rtl ? 10000 : -10000});
|
1994 |
-
self.isInputHidden = true;
|
1995 |
-
},
|
1996 |
-
|
1997 |
-
/**
|
1998 |
-
* Restores input visibility.
|
1999 |
-
*/
|
2000 |
-
showInput: function() {
|
2001 |
-
this.$control_input.css({opacity: 1, position: 'relative', left: 0});
|
2002 |
-
this.isInputHidden = false;
|
2003 |
-
},
|
2004 |
-
|
2005 |
-
/**
|
2006 |
-
* Gives the control focus.
|
2007 |
-
*/
|
2008 |
-
focus: function() {
|
2009 |
-
var self = this;
|
2010 |
-
if (self.isDisabled) return;
|
2011 |
-
|
2012 |
-
self.ignoreFocus = true;
|
2013 |
-
self.$control_input[0].focus();
|
2014 |
-
window.setTimeout(function() {
|
2015 |
-
self.ignoreFocus = false;
|
2016 |
-
self.onFocus();
|
2017 |
-
}, 0);
|
2018 |
-
},
|
2019 |
-
|
2020 |
-
/**
|
2021 |
-
* Forces the control out of focus.
|
2022 |
-
*
|
2023 |
-
* @param {Element} dest
|
2024 |
-
*/
|
2025 |
-
blur: function(dest) {
|
2026 |
-
this.$control_input[0].blur();
|
2027 |
-
this.onBlur(null, dest);
|
2028 |
-
},
|
2029 |
-
|
2030 |
-
/**
|
2031 |
-
* Returns a function that scores an object
|
2032 |
-
* to show how good of a match it is to the
|
2033 |
-
* provided query.
|
2034 |
-
*
|
2035 |
-
* @param {string} query
|
2036 |
-
* @param {object} options
|
2037 |
-
* @return {function}
|
2038 |
-
*/
|
2039 |
-
getScoreFunction: function(query) {
|
2040 |
-
return this.sifter.getScoreFunction(query, this.getSearchOptions());
|
2041 |
-
},
|
2042 |
-
|
2043 |
-
/**
|
2044 |
-
* Returns search options for sifter (the system
|
2045 |
-
* for scoring and sorting results).
|
2046 |
-
*
|
2047 |
-
* @see https://github.com/brianreavis/sifter.js
|
2048 |
-
* @return {object}
|
2049 |
-
*/
|
2050 |
-
getSearchOptions: function() {
|
2051 |
-
var settings = this.settings;
|
2052 |
-
var sort = settings.sortField;
|
2053 |
-
if (typeof sort === 'string') {
|
2054 |
-
sort = [{field: sort}];
|
2055 |
-
}
|
2056 |
-
|
2057 |
-
return {
|
2058 |
-
fields : settings.searchField,
|
2059 |
-
conjunction : settings.searchConjunction,
|
2060 |
-
sort : sort
|
2061 |
-
};
|
2062 |
-
},
|
2063 |
-
|
2064 |
-
/**
|
2065 |
-
* Searches through available options and returns
|
2066 |
-
* a sorted array of matches.
|
2067 |
-
*
|
2068 |
-
* Returns an object containing:
|
2069 |
-
*
|
2070 |
-
* - query {string}
|
2071 |
-
* - tokens {array}
|
2072 |
-
* - total {int}
|
2073 |
-
* - items {array}
|
2074 |
-
*
|
2075 |
-
* @param {string} query
|
2076 |
-
* @returns {object}
|
2077 |
-
*/
|
2078 |
-
search: function(query) {
|
2079 |
-
var i, value, score, result, calculateScore;
|
2080 |
-
var self = this;
|
2081 |
-
var settings = self.settings;
|
2082 |
-
var options = this.getSearchOptions();
|
2083 |
-
|
2084 |
-
// validate user-provided result scoring function
|
2085 |
-
if (settings.score) {
|
2086 |
-
calculateScore = self.settings.score.apply(this, [query]);
|
2087 |
-
if (typeof calculateScore !== 'function') {
|
2088 |
-
throw new Error('Selectize "score" setting must be a function that returns a function');
|
2089 |
-
}
|
2090 |
-
}
|
2091 |
-
|
2092 |
-
// perform search
|
2093 |
-
if (query !== self.lastQuery) {
|
2094 |
-
self.lastQuery = query;
|
2095 |
-
result = self.sifter.search(query, $.extend(options, {score: calculateScore}));
|
2096 |
-
self.currentResults = result;
|
2097 |
-
} else {
|
2098 |
-
result = $.extend(true, {}, self.currentResults);
|
2099 |
-
}
|
2100 |
-
|
2101 |
-
// filter out selected items
|
2102 |
-
if (settings.hideSelected) {
|
2103 |
-
for (i = result.items.length - 1; i >= 0; i--) {
|
2104 |
-
if (self.items.indexOf(hash_key(result.items[i].id)) !== -1) {
|
2105 |
-
result.items.splice(i, 1);
|
2106 |
-
}
|
2107 |
-
}
|
2108 |
-
}
|
2109 |
-
|
2110 |
-
return result;
|
2111 |
-
},
|
2112 |
-
|
2113 |
-
/**
|
2114 |
-
* Refreshes the list of available options shown
|
2115 |
-
* in the autocomplete dropdown menu.
|
2116 |
-
*
|
2117 |
-
* @param {boolean} triggerDropdown
|
2118 |
-
*/
|
2119 |
-
refreshOptions: function(triggerDropdown) {
|
2120 |
-
var i, j, k, n, groups, groups_order, option, option_html, optgroup, optgroups, html, html_children, has_create_option;
|
2121 |
-
var $active, $active_before, $create;
|
2122 |
-
|
2123 |
-
if (typeof triggerDropdown === 'undefined') {
|
2124 |
-
triggerDropdown = true;
|
2125 |
-
}
|
2126 |
-
|
2127 |
-
var self = this;
|
2128 |
-
var query = $.trim(self.$control_input.val());
|
2129 |
-
var results = self.search(query);
|
2130 |
-
var $dropdown_content = self.$dropdown_content;
|
2131 |
-
var active_before = self.$activeOption && hash_key(self.$activeOption.attr('data-value'));
|
2132 |
-
|
2133 |
-
// build markup
|
2134 |
-
n = results.items.length;
|
2135 |
-
if (typeof self.settings.maxOptions === 'number') {
|
2136 |
-
n = Math.min(n, self.settings.maxOptions);
|
2137 |
-
}
|
2138 |
-
|
2139 |
-
// render and group available options individually
|
2140 |
-
groups = {};
|
2141 |
-
groups_order = [];
|
2142 |
-
|
2143 |
-
for (i = 0; i < n; i++) {
|
2144 |
-
option = self.options[results.items[i].id];
|
2145 |
-
option_html = self.render('option', option);
|
2146 |
-
optgroup = option[self.settings.optgroupField] || '';
|
2147 |
-
optgroups = $.isArray(optgroup) ? optgroup : [optgroup];
|
2148 |
-
|
2149 |
-
$(option_html).removeClass('selected');
|
2150 |
-
|
2151 |
-
for (j = 0, k = optgroups && optgroups.length; j < k; j++) {
|
2152 |
-
optgroup = optgroups[j];
|
2153 |
-
if (!self.optgroups.hasOwnProperty(optgroup)) {
|
2154 |
-
optgroup = '';
|
2155 |
-
}
|
2156 |
-
if (!groups.hasOwnProperty(optgroup)) {
|
2157 |
-
groups[optgroup] = document.createDocumentFragment();
|
2158 |
-
groups_order.push(optgroup);
|
2159 |
-
}
|
2160 |
-
groups[optgroup].appendChild(option_html);
|
2161 |
-
}
|
2162 |
-
}
|
2163 |
-
|
2164 |
-
// sort optgroups
|
2165 |
-
if (this.settings.lockOptgroupOrder) {
|
2166 |
-
groups_order.sort(function(a, b) {
|
2167 |
-
var a_order = self.optgroups[a].$order || 0;
|
2168 |
-
var b_order = self.optgroups[b].$order || 0;
|
2169 |
-
return a_order - b_order;
|
2170 |
-
});
|
2171 |
-
}
|
2172 |
-
|
2173 |
-
// render optgroup headers & join groups
|
2174 |
-
html = document.createDocumentFragment();
|
2175 |
-
for (i = 0, n = groups_order.length; i < n; i++) {
|
2176 |
-
optgroup = groups_order[i];
|
2177 |
-
if (self.optgroups.hasOwnProperty(optgroup) && groups[optgroup].childNodes.length) {
|
2178 |
-
// render the optgroup header and options within it,
|
2179 |
-
// then pass it to the wrapper template
|
2180 |
-
html_children = document.createDocumentFragment();
|
2181 |
-
html_children.appendChild(self.render('optgroup_header', self.optgroups[optgroup]));
|
2182 |
-
html_children.appendChild(groups[optgroup]);
|
2183 |
-
|
2184 |
-
html.appendChild(self.render('optgroup', $.extend({}, self.optgroups[optgroup], {
|
2185 |
-
html: domToString(html_children),
|
2186 |
-
dom: html_children
|
2187 |
-
})));
|
2188 |
-
} else {
|
2189 |
-
html.appendChild(groups[optgroup]);
|
2190 |
-
}
|
2191 |
-
}
|
2192 |
-
|
2193 |
-
$dropdown_content.html(html);
|
2194 |
-
|
2195 |
-
// highlight matching terms inline
|
2196 |
-
if (self.settings.highlight && results.query.length && results.tokens.length) {
|
2197 |
-
for (i = 0, n = results.tokens.length; i < n; i++) {
|
2198 |
-
highlight($dropdown_content, results.tokens[i].regex);
|
2199 |
-
}
|
2200 |
-
}
|
2201 |
-
|
2202 |
-
// add "selected" class to selected options
|
2203 |
-
if (!self.settings.hideSelected) {
|
2204 |
-
for (i = 0, n = self.items.length; i < n; i++) {
|
2205 |
-
self.getOption(self.items[i]).addClass('selected');
|
2206 |
-
}
|
2207 |
-
}
|
2208 |
-
|
2209 |
-
// add create option
|
2210 |
-
has_create_option = self.canCreate(query);
|
2211 |
-
if (has_create_option) {
|
2212 |
-
$dropdown_content.prepend(self.render('option_create', {input: query}));
|
2213 |
-
$create = $($dropdown_content[0].childNodes[0]);
|
2214 |
-
}
|
2215 |
-
|
2216 |
-
// activate
|
2217 |
-
self.hasOptions = results.items.length > 0 || has_create_option;
|
2218 |
-
if (self.hasOptions) {
|
2219 |
-
if (results.items.length > 0) {
|
2220 |
-
$active_before = active_before && self.getOption(active_before);
|
2221 |
-
if ($active_before && $active_before.length) {
|
2222 |
-
$active = $active_before;
|
2223 |
-
} else if (self.settings.mode === 'single' && self.items.length) {
|
2224 |
-
$active = self.getOption(self.items[0]);
|
2225 |
-
}
|
2226 |
-
if (!$active || !$active.length) {
|
2227 |
-
if ($create && !self.settings.addPrecedence) {
|
2228 |
-
$active = self.getAdjacentOption($create, 1);
|
2229 |
-
} else {
|
2230 |
-
$active = $dropdown_content.find('[data-selectable]:first');
|
2231 |
-
}
|
2232 |
-
}
|
2233 |
-
} else {
|
2234 |
-
$active = $create;
|
2235 |
-
}
|
2236 |
-
self.setActiveOption($active);
|
2237 |
-
if (triggerDropdown && !self.isOpen) { self.open(); }
|
2238 |
-
} else {
|
2239 |
-
self.setActiveOption(null);
|
2240 |
-
if (triggerDropdown && self.isOpen) { self.close(); }
|
2241 |
-
}
|
2242 |
-
},
|
2243 |
-
|
2244 |
-
/**
|
2245 |
-
* Adds an available option. If it already exists,
|
2246 |
-
* nothing will happen. Note: this does not refresh
|
2247 |
-
* the options list dropdown (use `refreshOptions`
|
2248 |
-
* for that).
|
2249 |
-
*
|
2250 |
-
* Usage:
|
2251 |
-
*
|
2252 |
-
* this.addOption(data)
|
2253 |
-
*
|
2254 |
-
* @param {object|array} data
|
2255 |
-
*/
|
2256 |
-
addOption: function(data) {
|
2257 |
-
var i, n, value, self = this;
|
2258 |
-
|
2259 |
-
if ($.isArray(data)) {
|
2260 |
-
for (i = 0, n = data.length; i < n; i++) {
|
2261 |
-
self.addOption(data[i]);
|
2262 |
-
}
|
2263 |
-
return;
|
2264 |
-
}
|
2265 |
-
|
2266 |
-
if (value = self.registerOption(data)) {
|
2267 |
-
self.userOptions[value] = true;
|
2268 |
-
self.lastQuery = null;
|
2269 |
-
self.trigger('option_add', value, data);
|
2270 |
-
}
|
2271 |
-
},
|
2272 |
-
|
2273 |
-
/**
|
2274 |
-
* Registers an option to the pool of options.
|
2275 |
-
*
|
2276 |
-
* @param {object} data
|
2277 |
-
* @return {boolean|string}
|
2278 |
-
*/
|
2279 |
-
registerOption: function(data) {
|
2280 |
-
var key = hash_key(data[this.settings.valueField]);
|
2281 |
-
if (typeof key === 'undefined' || key === null || this.options.hasOwnProperty(key)) return false;
|
2282 |
-
data.$order = data.$order || ++this.order;
|
2283 |
-
this.options[key] = data;
|
2284 |
-
return key;
|
2285 |
-
},
|
2286 |
-
|
2287 |
-
/**
|
2288 |
-
* Registers an option group to the pool of option groups.
|
2289 |
-
*
|
2290 |
-
* @param {object} data
|
2291 |
-
* @return {boolean|string}
|
2292 |
-
*/
|
2293 |
-
registerOptionGroup: function(data) {
|
2294 |
-
var key = hash_key(data[this.settings.optgroupValueField]);
|
2295 |
-
if (!key) return false;
|
2296 |
-
|
2297 |
-
data.$order = data.$order || ++this.order;
|
2298 |
-
this.optgroups[key] = data;
|
2299 |
-
return key;
|
2300 |
-
},
|
2301 |
-
|
2302 |
-
/**
|
2303 |
-
* Registers a new optgroup for options
|
2304 |
-
* to be bucketed into.
|
2305 |
-
*
|
2306 |
-
* @param {string} id
|
2307 |
-
* @param {object} data
|
2308 |
-
*/
|
2309 |
-
addOptionGroup: function(id, data) {
|
2310 |
-
data[this.settings.optgroupValueField] = id;
|
2311 |
-
if (id = this.registerOptionGroup(data)) {
|
2312 |
-
this.trigger('optgroup_add', id, data);
|
2313 |
-
}
|
2314 |
-
},
|
2315 |
-
|
2316 |
-
/**
|
2317 |
-
* Removes an existing option group.
|
2318 |
-
*
|
2319 |
-
* @param {string} id
|
2320 |
-
*/
|
2321 |
-
removeOptionGroup: function(id) {
|
2322 |
-
if (this.optgroups.hasOwnProperty(id)) {
|
2323 |
-
delete this.optgroups[id];
|
2324 |
-
this.renderCache = {};
|
2325 |
-
this.trigger('optgroup_remove', id);
|
2326 |
-
}
|
2327 |
-
},
|
2328 |
-
|
2329 |
-
/**
|
2330 |
-
* Clears all existing option groups.
|
2331 |
-
*/
|
2332 |
-
clearOptionGroups: function() {
|
2333 |
-
this.optgroups = {};
|
2334 |
-
this.renderCache = {};
|
2335 |
-
this.trigger('optgroup_clear');
|
2336 |
-
},
|
2337 |
-
|
2338 |
-
/**
|
2339 |
-
* Updates an option available for selection. If
|
2340 |
-
* it is visible in the selected items or options
|
2341 |
-
* dropdown, it will be re-rendered automatically.
|
2342 |
-
*
|
2343 |
-
* @param {string} value
|
2344 |
-
* @param {object} data
|
2345 |
-
*/
|
2346 |
-
updateOption: function(value, data) {
|
2347 |
-
var self = this;
|
2348 |
-
var $item, $item_new;
|
2349 |
-
var value_new, index_item, cache_items, cache_options, order_old;
|
2350 |
-
|
2351 |
-
value = hash_key(value);
|
2352 |
-
value_new = hash_key(data[self.settings.valueField]);
|
2353 |
-
|
2354 |
-
// sanity checks
|
2355 |
-
if (value === null) return;
|
2356 |
-
if (!self.options.hasOwnProperty(value)) return;
|
2357 |
-
if (typeof value_new !== 'string') throw new Error('Value must be set in option data');
|
2358 |
-
|
2359 |
-
order_old = self.options[value].$order;
|
2360 |
-
|
2361 |
-
// update references
|
2362 |
-
if (value_new !== value) {
|
2363 |
-
delete self.options[value];
|
2364 |
-
index_item = self.items.indexOf(value);
|
2365 |
-
if (index_item !== -1) {
|
2366 |
-
self.items.splice(index_item, 1, value_new);
|
2367 |
-
}
|
2368 |
-
}
|
2369 |
-
data.$order = data.$order || order_old;
|
2370 |
-
self.options[value_new] = data;
|
2371 |
-
|
2372 |
-
// invalidate render cache
|
2373 |
-
cache_items = self.renderCache['item'];
|
2374 |
-
cache_options = self.renderCache['option'];
|
2375 |
-
|
2376 |
-
if (cache_items) {
|
2377 |
-
delete cache_items[value];
|
2378 |
-
delete cache_items[value_new];
|
2379 |
-
}
|
2380 |
-
if (cache_options) {
|
2381 |
-
delete cache_options[value];
|
2382 |
-
delete cache_options[value_new];
|
2383 |
-
}
|
2384 |
-
|
2385 |
-
// update the item if it's selected
|
2386 |
-
if (self.items.indexOf(value_new) !== -1) {
|
2387 |
-
$item = self.getItem(value);
|
2388 |
-
$item_new = $(self.render('item', data));
|
2389 |
-
if ($item.hasClass('active')) $item_new.addClass('active');
|
2390 |
-
$item.replaceWith($item_new);
|
2391 |
-
}
|
2392 |
-
|
2393 |
-
// invalidate last query because we might have updated the sortField
|
2394 |
-
self.lastQuery = null;
|
2395 |
-
|
2396 |
-
// update dropdown contents
|
2397 |
-
if (self.isOpen) {
|
2398 |
-
self.refreshOptions(false);
|
2399 |
-
}
|
2400 |
-
},
|
2401 |
-
|
2402 |
-
/**
|
2403 |
-
* Removes a single option.
|
2404 |
-
*
|
2405 |
-
* @param {string} value
|
2406 |
-
* @param {boolean} silent
|
2407 |
-
*/
|
2408 |
-
removeOption: function(value, silent) {
|
2409 |
-
var self = this;
|
2410 |
-
value = hash_key(value);
|
2411 |
-
|
2412 |
-
var cache_items = self.renderCache['item'];
|
2413 |
-
var cache_options = self.renderCache['option'];
|
2414 |
-
if (cache_items) delete cache_items[value];
|
2415 |
-
if (cache_options) delete cache_options[value];
|
2416 |
-
|
2417 |
-
delete self.userOptions[value];
|
2418 |
-
delete self.options[value];
|
2419 |
-
self.lastQuery = null;
|
2420 |
-
self.trigger('option_remove', value);
|
2421 |
-
self.removeItem(value, silent);
|
2422 |
-
},
|
2423 |
-
|
2424 |
-
/**
|
2425 |
-
* Clears all options.
|
2426 |
-
*/
|
2427 |
-
clearOptions: function() {
|
2428 |
-
var self = this;
|
2429 |
-
|
2430 |
-
self.loadedSearches = {};
|
2431 |
-
self.userOptions = {};
|
2432 |
-
self.renderCache = {};
|
2433 |
-
self.options = self.sifter.items = {};
|
2434 |
-
self.lastQuery = null;
|
2435 |
-
self.trigger('option_clear');
|
2436 |
-
self.clear();
|
2437 |
-
},
|
2438 |
-
|
2439 |
-
/**
|
2440 |
-
* Returns the jQuery element of the option
|
2441 |
-
* matching the given value.
|
2442 |
-
*
|
2443 |
-
* @param {string} value
|
2444 |
-
* @returns {object}
|
2445 |
-
*/
|
2446 |
-
getOption: function(value) {
|
2447 |
-
return this.getElementWithValue(value, this.$dropdown_content.find('[data-selectable]'));
|
2448 |
-
},
|
2449 |
-
|
2450 |
-
/**
|
2451 |
-
* Returns the jQuery element of the next or
|
2452 |
-
* previous selectable option.
|
2453 |
-
*
|
2454 |
-
* @param {object} $option
|
2455 |
-
* @param {int} direction can be 1 for next or -1 for previous
|
2456 |
-
* @return {object}
|
2457 |
-
*/
|
2458 |
-
getAdjacentOption: function($option, direction) {
|
2459 |
-
var $options = this.$dropdown.find('[data-selectable]');
|
2460 |
-
var index = $options.index($option) + direction;
|
2461 |
-
|
2462 |
-
return index >= 0 && index < $options.length ? $options.eq(index) : $();
|
2463 |
-
},
|
2464 |
-
|
2465 |
-
/**
|
2466 |
-
* Finds the first element with a "data-value" attribute
|
2467 |
-
* that matches the given value.
|
2468 |
-
*
|
2469 |
-
* @param {mixed} value
|
2470 |
-
* @param {object} $els
|
2471 |
-
* @return {object}
|
2472 |
-
*/
|
2473 |
-
getElementWithValue: function(value, $els) {
|
2474 |
-
value = hash_key(value);
|
2475 |
-
|
2476 |
-
if (typeof value !== 'undefined' && value !== null) {
|
2477 |
-
for (var i = 0, n = $els.length; i < n; i++) {
|
2478 |
-
if ($els[i].getAttribute('data-value') === value) {
|
2479 |
-
return $($els[i]);
|
2480 |
-
}
|
2481 |
-
}
|
2482 |
-
}
|
2483 |
-
|
2484 |
-
return $();
|
2485 |
-
},
|
2486 |
-
|
2487 |
-
/**
|
2488 |
-
* Returns the jQuery element of the item
|
2489 |
-
* matching the given value.
|
2490 |
-
*
|
2491 |
-
* @param {string} value
|
2492 |
-
* @returns {object}
|
2493 |
-
*/
|
2494 |
-
getItem: function(value) {
|
2495 |
-
return this.getElementWithValue(value, this.$control.children());
|
2496 |
-
},
|
2497 |
-
|
2498 |
-
/**
|
2499 |
-
* "Selects" multiple items at once. Adds them to the list
|
2500 |
-
* at the current caret position.
|
2501 |
-
*
|
2502 |
-
* @param {string} value
|
2503 |
-
* @param {boolean} silent
|
2504 |
-
*/
|
2505 |
-
addItems: function(values, silent) {
|
2506 |
-
var items = $.isArray(values) ? values : [values];
|
2507 |
-
for (var i = 0, n = items.length; i < n; i++) {
|
2508 |
-
this.isPending = (i < n - 1);
|
2509 |
-
this.addItem(items[i], silent);
|
2510 |
-
}
|
2511 |
-
},
|
2512 |
-
|
2513 |
-
/**
|
2514 |
-
* "Selects" an item. Adds it to the list
|
2515 |
-
* at the current caret position.
|
2516 |
-
*
|
2517 |
-
* @param {string} value
|
2518 |
-
* @param {boolean} silent
|
2519 |
-
*/
|
2520 |
-
addItem: function(value, silent) {
|
2521 |
-
var events = silent ? [] : ['change'];
|
2522 |
-
|
2523 |
-
debounce_events(this, events, function() {
|
2524 |
-
var $item, $option, $options;
|
2525 |
-
var self = this;
|
2526 |
-
var inputMode = self.settings.mode;
|
2527 |
-
var i, active, value_next, wasFull;
|
2528 |
-
value = hash_key(value);
|
2529 |
-
|
2530 |
-
if (self.items.indexOf(value) !== -1) {
|
2531 |
-
if (inputMode === 'single') self.close();
|
2532 |
-
return;
|
2533 |
-
}
|
2534 |
-
|
2535 |
-
if (!self.options.hasOwnProperty(value)) return;
|
2536 |
-
if (inputMode === 'single') self.clear(silent);
|
2537 |
-
if (inputMode === 'multi' && self.isFull()) return;
|
2538 |
-
|
2539 |
-
$item = $(self.render('item', self.options[value]));
|
2540 |
-
wasFull = self.isFull();
|
2541 |
-
self.items.splice(self.caretPos, 0, value);
|
2542 |
-
self.insertAtCaret($item);
|
2543 |
-
if (!self.isPending || (!wasFull && self.isFull())) {
|
2544 |
-
self.refreshState();
|
2545 |
-
}
|
2546 |
-
|
2547 |
-
if (self.isSetup) {
|
2548 |
-
$options = self.$dropdown_content.find('[data-selectable]');
|
2549 |
-
|
2550 |
-
// update menu / remove the option (if this is not one item being added as part of series)
|
2551 |
-
if (!self.isPending) {
|
2552 |
-
$option = self.getOption(value);
|
2553 |
-
value_next = self.getAdjacentOption($option, 1).attr('data-value');
|
2554 |
-
self.refreshOptions(self.isFocused && inputMode !== 'single');
|
2555 |
-
if (value_next) {
|
2556 |
-
self.setActiveOption(self.getOption(value_next));
|
2557 |
-
}
|
2558 |
-
}
|
2559 |
-
|
2560 |
-
// hide the menu if the maximum number of items have been selected or no options are left
|
2561 |
-
if (!$options.length || self.isFull()) {
|
2562 |
-
self.close();
|
2563 |
-
} else {
|
2564 |
-
self.positionDropdown();
|
2565 |
-
}
|
2566 |
-
|
2567 |
-
self.updatePlaceholder();
|
2568 |
-
self.trigger('item_add', value, $item);
|
2569 |
-
self.updateOriginalInput({silent: silent});
|
2570 |
-
}
|
2571 |
-
});
|
2572 |
-
},
|
2573 |
-
|
2574 |
-
/**
|
2575 |
-
* Removes the selected item matching
|
2576 |
-
* the provided value.
|
2577 |
-
*
|
2578 |
-
* @param {string} value
|
2579 |
-
*/
|
2580 |
-
removeItem: function(value, silent) {
|
2581 |
-
var self = this;
|
2582 |
-
var $item, i, idx;
|
2583 |
-
|
2584 |
-
$item = (value instanceof $) ? value : self.getItem(value);
|
2585 |
-
value = hash_key($item.attr('data-value'));
|
2586 |
-
i = self.items.indexOf(value);
|
2587 |
-
|
2588 |
-
if (i !== -1) {
|
2589 |
-
$item.remove();
|
2590 |
-
if ($item.hasClass('active')) {
|
2591 |
-
idx = self.$activeItems.indexOf($item[0]);
|
2592 |
-
self.$activeItems.splice(idx, 1);
|
2593 |
-
}
|
2594 |
-
|
2595 |
-
self.items.splice(i, 1);
|
2596 |
-
self.lastQuery = null;
|
2597 |
-
if (!self.settings.persist && self.userOptions.hasOwnProperty(value)) {
|
2598 |
-
self.removeOption(value, silent);
|
2599 |
-
}
|
2600 |
-
|
2601 |
-
if (i < self.caretPos) {
|
2602 |
-
self.setCaret(self.caretPos - 1);
|
2603 |
-
}
|
2604 |
-
|
2605 |
-
self.refreshState();
|
2606 |
-
self.updatePlaceholder();
|
2607 |
-
self.updateOriginalInput({silent: silent});
|
2608 |
-
self.positionDropdown();
|
2609 |
-
self.trigger('item_remove', value, $item);
|
2610 |
-
}
|
2611 |
-
},
|
2612 |
-
|
2613 |
-
/**
|
2614 |
-
* Invokes the `create` method provided in the
|
2615 |
-
* selectize options that should provide the data
|
2616 |
-
* for the new item, given the user input.
|
2617 |
-
*
|
2618 |
-
* Once this completes, it will be added
|
2619 |
-
* to the item list.
|
2620 |
-
*
|
2621 |
-
* @param {string} value
|
2622 |
-
* @param {boolean} [triggerDropdown]
|
2623 |
-
* @param {function} [callback]
|
2624 |
-
* @return {boolean}
|
2625 |
-
*/
|
2626 |
-
createItem: function(input, triggerDropdown) {
|
2627 |
-
var self = this;
|
2628 |
-
var caret = self.caretPos;
|
2629 |
-
input = input || $.trim(self.$control_input.val() || '');
|
2630 |
-
|
2631 |
-
var callback = arguments[arguments.length - 1];
|
2632 |
-
if (typeof callback !== 'function') callback = function() {};
|
2633 |
-
|
2634 |
-
if (typeof triggerDropdown !== 'boolean') {
|
2635 |
-
triggerDropdown = true;
|
2636 |
-
}
|
2637 |
-
|
2638 |
-
if (!self.canCreate(input)) {
|
2639 |
-
callback();
|
2640 |
-
return false;
|
2641 |
-
}
|
2642 |
-
|
2643 |
-
self.lock();
|
2644 |
-
|
2645 |
-
var setup = (typeof self.settings.create === 'function') ? this.settings.create : function(input) {
|
2646 |
-
var data = {};
|
2647 |
-
data[self.settings.labelField] = input;
|
2648 |
-
data[self.settings.valueField] = input;
|
2649 |
-
return data;
|
2650 |
-
};
|
2651 |
-
|
2652 |
-
var create = once(function(data) {
|
2653 |
-
self.unlock();
|
2654 |
-
|
2655 |
-
if (!data || typeof data !== 'object') return callback();
|
2656 |
-
var value = hash_key(data[self.settings.valueField]);
|
2657 |
-
if (typeof value !== 'string') return callback();
|
2658 |
-
|
2659 |
-
self.setTextboxValue('');
|
2660 |
-
self.addOption(data);
|
2661 |
-
self.setCaret(caret);
|
2662 |
-
self.addItem(value);
|
2663 |
-
self.refreshOptions(triggerDropdown && self.settings.mode !== 'single');
|
2664 |
-
callback(data);
|
2665 |
-
});
|
2666 |
-
|
2667 |
-
var output = setup.apply(this, [input, create]);
|
2668 |
-
if (typeof output !== 'undefined') {
|
2669 |
-
create(output);
|
2670 |
-
}
|
2671 |
-
|
2672 |
-
return true;
|
2673 |
-
},
|
2674 |
-
|
2675 |
-
/**
|
2676 |
-
* Re-renders the selected item lists.
|
2677 |
-
*/
|
2678 |
-
refreshItems: function() {
|
2679 |
-
this.lastQuery = null;
|
2680 |
-
|
2681 |
-
if (this.isSetup) {
|
2682 |
-
this.addItem(this.items);
|
2683 |
-
}
|
2684 |
-
|
2685 |
-
this.refreshState();
|
2686 |
-
this.updateOriginalInput();
|
2687 |
-
},
|
2688 |
-
|
2689 |
-
/**
|
2690 |
-
* Updates all state-dependent attributes
|
2691 |
-
* and CSS classes.
|
2692 |
-
*/
|
2693 |
-
refreshState: function() {
|
2694 |
-
var invalid, self = this;
|
2695 |
-
if (self.isRequired) {
|
2696 |
-
if (self.items.length) self.isInvalid = false;
|
2697 |
-
self.$control_input.prop('required', invalid);
|
2698 |
-
}
|
2699 |
-
self.refreshClasses();
|
2700 |
-
},
|
2701 |
-
|
2702 |
-
/**
|
2703 |
-
* Updates all state-dependent CSS classes.
|
2704 |
-
*/
|
2705 |
-
refreshClasses: function() {
|
2706 |
-
var self = this;
|
2707 |
-
var isFull = self.isFull();
|
2708 |
-
var isLocked = self.isLocked;
|
2709 |
-
|
2710 |
-
self.$wrapper
|
2711 |
-
.toggleClass('rtl', self.rtl);
|
2712 |
-
|
2713 |
-
self.$control
|
2714 |
-
.toggleClass('focus', self.isFocused)
|
2715 |
-
.toggleClass('disabled', self.isDisabled)
|
2716 |
-
.toggleClass('required', self.isRequired)
|
2717 |
-
.toggleClass('invalid', self.isInvalid)
|
2718 |
-
.toggleClass('locked', isLocked)
|
2719 |
-
.toggleClass('full', isFull).toggleClass('not-full', !isFull)
|
2720 |
-
.toggleClass('input-active', self.isFocused && !self.isInputHidden)
|
2721 |
-
.toggleClass('dropdown-active', self.isOpen)
|
2722 |
-
.toggleClass('has-options', !$.isEmptyObject(self.options))
|
2723 |
-
.toggleClass('has-items', self.items.length > 0);
|
2724 |
-
|
2725 |
-
self.$control_input.data('grow', !isFull && !isLocked);
|
2726 |
-
},
|
2727 |
-
|
2728 |
-
/**
|
2729 |
-
* Determines whether or not more items can be added
|
2730 |
-
* to the control without exceeding the user-defined maximum.
|
2731 |
-
*
|
2732 |
-
* @returns {boolean}
|
2733 |
-
*/
|
2734 |
-
isFull: function() {
|
2735 |
-
return this.settings.maxItems !== null && this.items.length >= this.settings.maxItems;
|
2736 |
-
},
|
2737 |
-
|
2738 |
-
/**
|
2739 |
-
* Refreshes the original <select> or <input>
|
2740 |
-
* element to reflect the current state.
|
2741 |
-
*/
|
2742 |
-
updateOriginalInput: function(opts) {
|
2743 |
-
var i, n, options, label, self = this;
|
2744 |
-
opts = opts || {};
|
2745 |
-
|
2746 |
-
if (self.tagType === TAG_SELECT) {
|
2747 |
-
options = [];
|
2748 |
-
for (i = 0, n = self.items.length; i < n; i++) {
|
2749 |
-
label = self.options[self.items[i]][self.settings.labelField] || '';
|
2750 |
-
options.push('<option value="' + escape_html(self.items[i]) + '" selected="selected">' + escape_html(label) + '</option>');
|
2751 |
-
}
|
2752 |
-
if (!options.length && !this.$input.attr('multiple')) {
|
2753 |
-
options.push('<option value="" selected="selected"></option>');
|
2754 |
-
}
|
2755 |
-
self.$input.html(options.join(''));
|
2756 |
-
} else {
|
2757 |
-
self.$input.val(self.getValue());
|
2758 |
-
self.$input.attr('value',self.$input.val());
|
2759 |
-
}
|
2760 |
-
|
2761 |
-
if (self.isSetup) {
|
2762 |
-
if (!opts.silent) {
|
2763 |
-
self.trigger('change', self.$input.val());
|
2764 |
-
}
|
2765 |
-
}
|
2766 |
-
},
|
2767 |
-
|
2768 |
-
/**
|
2769 |
-
* Shows/hide the input placeholder depending
|
2770 |
-
* on if there items in the list already.
|
2771 |
-
*/
|
2772 |
-
updatePlaceholder: function() {
|
2773 |
-
if (!this.settings.placeholder) return;
|
2774 |
-
var $input = this.$control_input;
|
2775 |
-
|
2776 |
-
if (this.items.length) {
|
2777 |
-
$input.removeAttr('placeholder');
|
2778 |
-
} else {
|
2779 |
-
$input.attr('placeholder', this.settings.placeholder);
|
2780 |
-
}
|
2781 |
-
$input.triggerHandler('update', {force: true});
|
2782 |
-
},
|
2783 |
-
|
2784 |
-
/**
|
2785 |
-
* Shows the autocomplete dropdown containing
|
2786 |
-
* the available options.
|
2787 |
-
*/
|
2788 |
-
open: function() {
|
2789 |
-
var self = this;
|
2790 |
-
|
2791 |
-
if (self.isLocked || self.isOpen || (self.settings.mode === 'multi' && self.isFull())) return;
|
2792 |
-
self.focus();
|
2793 |
-
self.isOpen = true;
|
2794 |
-
self.refreshState();
|
2795 |
-
self.$dropdown.css({visibility: 'hidden', display: 'block'});
|
2796 |
-
self.positionDropdown();
|
2797 |
-
self.$dropdown.css({visibility: 'visible'});
|
2798 |
-
self.trigger('dropdown_open', self.$dropdown);
|
2799 |
-
},
|
2800 |
-
|
2801 |
-
/**
|
2802 |
-
* Closes the autocomplete dropdown menu.
|
2803 |
-
*/
|
2804 |
-
close: function() {
|
2805 |
-
var self = this;
|
2806 |
-
var trigger = self.isOpen;
|
2807 |
-
|
2808 |
-
if (self.settings.mode === 'single' && self.items.length) {
|
2809 |
-
self.hideInput();
|
2810 |
-
}
|
2811 |
-
|
2812 |
-
self.isOpen = false;
|
2813 |
-
self.$dropdown.hide();
|
2814 |
-
self.setActiveOption(null);
|
2815 |
-
self.refreshState();
|
2816 |
-
|
2817 |
-
if (trigger) self.trigger('dropdown_close', self.$dropdown);
|
2818 |
-
},
|
2819 |
-
|
2820 |
-
/**
|
2821 |
-
* Calculates and applies the appropriate
|
2822 |
-
* position of the dropdown.
|
2823 |
-
*/
|
2824 |
-
positionDropdown: function() {
|
2825 |
-
var $control = this.$control;
|
2826 |
-
var offset = this.settings.dropdownParent === 'body' ? $control.offset() : $control.position();
|
2827 |
-
offset.top += $control.outerHeight(true);
|
2828 |
-
|
2829 |
-
this.$dropdown.css({
|
2830 |
-
width : $control.outerWidth(),
|
2831 |
-
top : offset.top,
|
2832 |
-
left : offset.left
|
2833 |
-
});
|
2834 |
-
},
|
2835 |
-
|
2836 |
-
/**
|
2837 |
-
* Resets / clears all selected items
|
2838 |
-
* from the control.
|
2839 |
-
*
|
2840 |
-
* @param {boolean} silent
|
2841 |
-
*/
|
2842 |
-
clear: function(silent) {
|
2843 |
-
var self = this;
|
2844 |
-
|
2845 |
-
if (!self.items.length) return;
|
2846 |
-
self.$control.children(':not(input)').remove();
|
2847 |
-
self.items = [];
|
2848 |
-
self.lastQuery = null;
|
2849 |
-
self.setCaret(0);
|
2850 |
-
self.setActiveItem(null);
|
2851 |
-
self.updatePlaceholder();
|
2852 |
-
self.updateOriginalInput({silent: silent});
|
2853 |
-
self.refreshState();
|
2854 |
-
self.showInput();
|
2855 |
-
self.trigger('clear');
|
2856 |
-
},
|
2857 |
-
|
2858 |
-
/**
|
2859 |
-
* A helper method for inserting an element
|
2860 |
-
* at the current caret position.
|
2861 |
-
*
|
2862 |
-
* @param {object} $el
|
2863 |
-
*/
|
2864 |
-
insertAtCaret: function($el) {
|
2865 |
-
var caret = Math.min(this.caretPos, this.items.length);
|
2866 |
-
if (caret === 0) {
|
2867 |
-
this.$control.prepend($el);
|
2868 |
-
} else {
|
2869 |
-
$(this.$control[0].childNodes[caret]).before($el);
|
2870 |
-
}
|
2871 |
-
this.setCaret(caret + 1);
|
2872 |
-
},
|
2873 |
-
|
2874 |
-
/**
|
2875 |
-
* Removes the current selected item(s).
|
2876 |
-
*
|
2877 |
-
* @param {object} e (optional)
|
2878 |
-
* @returns {boolean}
|
2879 |
-
*/
|
2880 |
-
deleteSelection: function(e) {
|
2881 |
-
var i, n, direction, selection, values, caret, option_select, $option_select, $tail;
|
2882 |
-
var self = this;
|
2883 |
-
|
2884 |
-
direction = (e && e.keyCode === KEY_BACKSPACE) ? -1 : 1;
|
2885 |
-
selection = getSelection(self.$control_input[0]);
|
2886 |
-
|
2887 |
-
if (self.$activeOption && !self.settings.hideSelected) {
|
2888 |
-
option_select = self.getAdjacentOption(self.$activeOption, -1).attr('data-value');
|
2889 |
-
}
|
2890 |
-
|
2891 |
-
// determine items that will be removed
|
2892 |
-
values = [];
|
2893 |
-
|
2894 |
-
if (self.$activeItems.length) {
|
2895 |
-
$tail = self.$control.children('.active:' + (direction > 0 ? 'last' : 'first'));
|
2896 |
-
caret = self.$control.children(':not(input)').index($tail);
|
2897 |
-
if (direction > 0) { caret++; }
|
2898 |
-
|
2899 |
-
for (i = 0, n = self.$activeItems.length; i < n; i++) {
|
2900 |
-
values.push($(self.$activeItems[i]).attr('data-value'));
|
2901 |
-
}
|
2902 |
-
if (e) {
|
2903 |
-
e.preventDefault();
|
2904 |
-
e.stopPropagation();
|
2905 |
-
}
|
2906 |
-
} else if ((self.isFocused || self.settings.mode === 'single') && self.items.length) {
|
2907 |
-
if (direction < 0 && selection.start === 0 && selection.length === 0) {
|
2908 |
-
values.push(self.items[self.caretPos - 1]);
|
2909 |
-
} else if (direction > 0 && selection.start === self.$control_input.val().length) {
|
2910 |
-
values.push(self.items[self.caretPos]);
|
2911 |
-
}
|
2912 |
-
}
|
2913 |
-
|
2914 |
-
// allow the callback to abort
|
2915 |
-
if (!values.length || (typeof self.settings.onDelete === 'function' && self.settings.onDelete.apply(self, [values]) === false)) {
|
2916 |
-
return false;
|
2917 |
-
}
|
2918 |
-
|
2919 |
-
// perform removal
|
2920 |
-
if (typeof caret !== 'undefined') {
|
2921 |
-
self.setCaret(caret);
|
2922 |
-
}
|
2923 |
-
while (values.length) {
|
2924 |
-
self.removeItem(values.pop());
|
2925 |
-
}
|
2926 |
-
|
2927 |
-
self.showInput();
|
2928 |
-
self.positionDropdown();
|
2929 |
-
self.refreshOptions(true);
|
2930 |
-
|
2931 |
-
// select previous option
|
2932 |
-
if (option_select) {
|
2933 |
-
$option_select = self.getOption(option_select);
|
2934 |
-
if ($option_select.length) {
|
2935 |
-
self.setActiveOption($option_select);
|
2936 |
-
}
|
2937 |
-
}
|
2938 |
-
|
2939 |
-
return true;
|
2940 |
-
},
|
2941 |
-
|
2942 |
-
/**
|
2943 |
-
* Selects the previous / next item (depending
|
2944 |
-
* on the `direction` argument).
|
2945 |
-
*
|
2946 |
-
* > 0 - right
|
2947 |
-
* < 0 - left
|
2948 |
-
*
|
2949 |
-
* @param {int} direction
|
2950 |
-
* @param {object} e (optional)
|
2951 |
-
*/
|
2952 |
-
advanceSelection: function(direction, e) {
|
2953 |
-
var tail, selection, idx, valueLength, cursorAtEdge, $tail;
|
2954 |
-
var self = this;
|
2955 |
-
|
2956 |
-
if (direction === 0) return;
|
2957 |
-
if (self.rtl) direction *= -1;
|
2958 |
-
|
2959 |
-
tail = direction > 0 ? 'last' : 'first';
|
2960 |
-
selection = getSelection(self.$control_input[0]);
|
2961 |
-
|
2962 |
-
if (self.isFocused && !self.isInputHidden) {
|
2963 |
-
valueLength = self.$control_input.val().length;
|
2964 |
-
cursorAtEdge = direction < 0
|
2965 |
-
? selection.start === 0 && selection.length === 0
|
2966 |
-
: selection.start === valueLength;
|
2967 |
-
|
2968 |
-
if (cursorAtEdge && !valueLength) {
|
2969 |
-
self.advanceCaret(direction, e);
|
2970 |
-
}
|
2971 |
-
} else {
|
2972 |
-
$tail = self.$control.children('.active:' + tail);
|
2973 |
-
if ($tail.length) {
|
2974 |
-
idx = self.$control.children(':not(input)').index($tail);
|
2975 |
-
self.setActiveItem(null);
|
2976 |
-
self.setCaret(direction > 0 ? idx + 1 : idx);
|
2977 |
-
}
|
2978 |
-
}
|
2979 |
-
},
|
2980 |
-
|
2981 |
-
/**
|
2982 |
-
* Moves the caret left / right.
|
2983 |
-
*
|
2984 |
-
* @param {int} direction
|
2985 |
-
* @param {object} e (optional)
|
2986 |
-
*/
|
2987 |
-
advanceCaret: function(direction, e) {
|
2988 |
-
var self = this, fn, $adj;
|
2989 |
-
|
2990 |
-
if (direction === 0) return;
|
2991 |
-
|
2992 |
-
fn = direction > 0 ? 'next' : 'prev';
|
2993 |
-
if (self.isShiftDown) {
|
2994 |
-
$adj = self.$control_input[fn]();
|
2995 |
-
if ($adj.length) {
|
2996 |
-
self.hideInput();
|
2997 |
-
self.setActiveItem($adj);
|
2998 |
-
e && e.preventDefault();
|
2999 |
-
}
|
3000 |
-
} else {
|
3001 |
-
self.setCaret(self.caretPos + direction);
|
3002 |
-
}
|
3003 |
-
},
|
3004 |
-
|
3005 |
-
/**
|
3006 |
-
* Moves the caret to the specified index.
|
3007 |
-
*
|
3008 |
-
* @param {int} i
|
3009 |
-
*/
|
3010 |
-
setCaret: function(i) {
|
3011 |
-
var self = this;
|
3012 |
-
|
3013 |
-
if (self.settings.mode === 'single') {
|
3014 |
-
i = self.items.length;
|
3015 |
-
} else {
|
3016 |
-
i = Math.max(0, Math.min(self.items.length, i));
|
3017 |
-
}
|
3018 |
-
|
3019 |
-
if(!self.isPending) {
|
3020 |
-
// the input must be moved by leaving it in place and moving the
|
3021 |
-
// siblings, due to the fact that focus cannot be restored once lost
|
3022 |
-
// on mobile webkit devices
|
3023 |
-
var j, n, fn, $children, $child;
|
3024 |
-
$children = self.$control.children(':not(input)');
|
3025 |
-
for (j = 0, n = $children.length; j < n; j++) {
|
3026 |
-
$child = $($children[j]).detach();
|
3027 |
-
if (j < i) {
|
3028 |
-
self.$control_input.before($child);
|
3029 |
-
} else {
|
3030 |
-
self.$control.append($child);
|
3031 |
-
}
|
3032 |
-
}
|
3033 |
-
}
|
3034 |
-
|
3035 |
-
self.caretPos = i;
|
3036 |
-
},
|
3037 |
-
|
3038 |
-
/**
|
3039 |
-
* Disables user input on the control. Used while
|
3040 |
-
* items are being asynchronously created.
|
3041 |
-
*/
|
3042 |
-
lock: function() {
|
3043 |
-
this.close();
|
3044 |
-
this.isLocked = true;
|
3045 |
-
this.refreshState();
|
3046 |
-
},
|
3047 |
-
|
3048 |
-
/**
|
3049 |
-
* Re-enables user input on the control.
|
3050 |
-
*/
|
3051 |
-
unlock: function() {
|
3052 |
-
this.isLocked = false;
|
3053 |
-
this.refreshState();
|
3054 |
-
},
|
3055 |
-
|
3056 |
-
/**
|
3057 |
-
* Disables user input on the control completely.
|
3058 |
-
* While disabled, it cannot receive focus.
|
3059 |
-
*/
|
3060 |
-
disable: function() {
|
3061 |
-
var self = this;
|
3062 |
-
self.$input.prop('disabled', true);
|
3063 |
-
self.$control_input.prop('disabled', true).prop('tabindex', -1);
|
3064 |
-
self.isDisabled = true;
|
3065 |
-
self.lock();
|
3066 |
-
},
|
3067 |
-
|
3068 |
-
/**
|
3069 |
-
* Enables the control so that it can respond
|
3070 |
-
* to focus and user input.
|
3071 |
-
*/
|
3072 |
-
enable: function() {
|
3073 |
-
var self = this;
|
3074 |
-
self.$input.prop('disabled', false);
|
3075 |
-
self.$control_input.prop('disabled', false).prop('tabindex', self.tabIndex);
|
3076 |
-
self.isDisabled = false;
|
3077 |
-
self.unlock();
|
3078 |
-
},
|
3079 |
-
|
3080 |
-
/**
|
3081 |
-
* Completely destroys the control and
|
3082 |
-
* unbinds all event listeners so that it can
|
3083 |
-
* be garbage collected.
|
3084 |
-
*/
|
3085 |
-
destroy: function() {
|
3086 |
-
var self = this;
|
3087 |
-
var eventNS = self.eventNS;
|
3088 |
-
var revertSettings = self.revertSettings;
|
3089 |
-
|
3090 |
-
self.trigger('destroy');
|
3091 |
-
self.off();
|
3092 |
-
self.$wrapper.remove();
|
3093 |
-
self.$dropdown.remove();
|
3094 |
-
|
3095 |
-
self.$input
|
3096 |
-
.html('')
|
3097 |
-
.append(revertSettings.$children)
|
3098 |
-
.removeAttr('tabindex')
|
3099 |
-
.removeClass('selectized')
|
3100 |
-
.attr({tabindex: revertSettings.tabindex})
|
3101 |
-
.show();
|
3102 |
-
|
3103 |
-
self.$control_input.removeData('grow');
|
3104 |
-
self.$input.removeData('selectize');
|
3105 |
-
|
3106 |
-
$(window).off(eventNS);
|
3107 |
-
$(document).off(eventNS);
|
3108 |
-
$(document.body).off(eventNS);
|
3109 |
-
|
3110 |
-
delete self.$input[0].selectize;
|
3111 |
-
},
|
3112 |
-
|
3113 |
-
/**
|
3114 |
-
* A helper method for rendering "item" and
|
3115 |
-
* "option" templates, given the data.
|
3116 |
-
*
|
3117 |
-
* @param {string} templateName
|
3118 |
-
* @param {object} data
|
3119 |
-
* @returns {string}
|
3120 |
-
*/
|
3121 |
-
render: function(templateName, data) {
|
3122 |
-
var value, id, label;
|
3123 |
-
var html = '';
|
3124 |
-
var cache = false;
|
3125 |
-
var self = this;
|
3126 |
-
var regex_tag = /^[\t \r\n]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i;
|
3127 |
-
|
3128 |
-
if (templateName === 'option' || templateName === 'item') {
|
3129 |
-
value = hash_key(data[self.settings.valueField]);
|
3130 |
-
cache = !!value;
|
3131 |
-
}
|
3132 |
-
|
3133 |
-
// pull markup from cache if it exists
|
3134 |
-
if (cache) {
|
3135 |
-
if (!isset(self.renderCache[templateName])) {
|
3136 |
-
self.renderCache[templateName] = {};
|
3137 |
-
}
|
3138 |
-
if (self.renderCache[templateName].hasOwnProperty(value)) {
|
3139 |
-
return self.renderCache[templateName][value];
|
3140 |
-
}
|
3141 |
-
}
|
3142 |
-
|
3143 |
-
// render markup
|
3144 |
-
html = $(self.settings.render[templateName].apply(this, [data, escape_html]));
|
3145 |
-
|
3146 |
-
// add mandatory attributes
|
3147 |
-
if (templateName === 'option' || templateName === 'option_create') {
|
3148 |
-
html.attr('data-selectable', '');
|
3149 |
-
}
|
3150 |
-
else if (templateName === 'optgroup') {
|
3151 |
-
id = data[self.settings.optgroupValueField] || '';
|
3152 |
-
html.attr('data-group', id);
|
3153 |
-
}
|
3154 |
-
if (templateName === 'option' || templateName === 'item') {
|
3155 |
-
html.attr('data-value', value || '');
|
3156 |
-
}
|
3157 |
-
|
3158 |
-
// update cache
|
3159 |
-
if (cache) {
|
3160 |
-
self.renderCache[templateName][value] = html[0];
|
3161 |
-
}
|
3162 |
-
|
3163 |
-
return html[0];
|
3164 |
-
},
|
3165 |
-
|
3166 |
-
/**
|
3167 |
-
* Clears the render cache for a template. If
|
3168 |
-
* no template is given, clears all render
|
3169 |
-
* caches.
|
3170 |
-
*
|
3171 |
-
* @param {string} templateName
|
3172 |
-
*/
|
3173 |
-
clearCache: function(templateName) {
|
3174 |
-
var self = this;
|
3175 |
-
if (typeof templateName === 'undefined') {
|
3176 |
-
self.renderCache = {};
|
3177 |
-
} else {
|
3178 |
-
delete self.renderCache[templateName];
|
3179 |
-
}
|
3180 |
-
},
|
3181 |
-
|
3182 |
-
/**
|
3183 |
-
* Determines whether or not to display the
|
3184 |
-
* create item prompt, given a user input.
|
3185 |
-
*
|
3186 |
-
* @param {string} input
|
3187 |
-
* @return {boolean}
|
3188 |
-
*/
|
3189 |
-
canCreate: function(input) {
|
3190 |
-
var self = this;
|
3191 |
-
if (!self.settings.create) return false;
|
3192 |
-
var filter = self.settings.createFilter;
|
3193 |
-
return input.length
|
3194 |
-
&& (typeof filter !== 'function' || filter.apply(self, [input]))
|
3195 |
-
&& (typeof filter !== 'string' || new RegExp(filter).test(input))
|
3196 |
-
&& (!(filter instanceof RegExp) || filter.test(input));
|
3197 |
-
}
|
3198 |
-
|
3199 |
-
});
|
3200 |
-
|
3201 |
-
|
3202 |
-
Selectize.count = 0;
|
3203 |
-
Selectize.defaults = {
|
3204 |
-
options: [],
|
3205 |
-
optgroups: [],
|
3206 |
-
|
3207 |
-
plugins: [],
|
3208 |
-
delimiter: ',',
|
3209 |
-
splitOn: null, // regexp or string for splitting up values from a paste command
|
3210 |
-
persist: true,
|
3211 |
-
diacritics: true,
|
3212 |
-
create: false,
|
3213 |
-
createOnBlur: false,
|
3214 |
-
createFilter: null,
|
3215 |
-
highlight: true,
|
3216 |
-
openOnFocus: true,
|
3217 |
-
maxOptions: 1000,
|
3218 |
-
maxItems: null,
|
3219 |
-
hideSelected: null,
|
3220 |
-
addPrecedence: false,
|
3221 |
-
selectOnTab: false,
|
3222 |
-
preload: false,
|
3223 |
-
allowEmptyOption: false,
|
3224 |
-
closeAfterSelect: false,
|
3225 |
-
|
3226 |
-
scrollDuration: 60,
|
3227 |
-
loadThrottle: 300,
|
3228 |
-
loadingClass: 'loading',
|
3229 |
-
|
3230 |
-
dataAttr: 'data-data',
|
3231 |
-
optgroupField: 'optgroup',
|
3232 |
-
valueField: 'value',
|
3233 |
-
labelField: 'text',
|
3234 |
-
optgroupLabelField: 'label',
|
3235 |
-
optgroupValueField: 'value',
|
3236 |
-
lockOptgroupOrder: false,
|
3237 |
-
|
3238 |
-
sortField: '$order',
|
3239 |
-
searchField: ['text'],
|
3240 |
-
searchConjunction: 'and',
|
3241 |
-
|
3242 |
-
mode: null,
|
3243 |
-
wrapperClass: 'selectize-control',
|
3244 |
-
inputClass: 'selectize-input',
|
3245 |
-
dropdownClass: 'selectize-dropdown',
|
3246 |
-
dropdownContentClass: 'selectize-dropdown-content',
|
3247 |
-
|
3248 |
-
dropdownParent: null,
|
3249 |
-
|
3250 |
-
copyClassesToDropdown: true,
|
3251 |
-
|
3252 |
-
/*
|
3253 |
-
load : null, // function(query, callback) { ... }
|
3254 |
-
score : null, // function(search) { ... }
|
3255 |
-
onInitialize : null, // function() { ... }
|
3256 |
-
onChange : null, // function(value) { ... }
|
3257 |
-
onItemAdd : null, // function(value, $item) { ... }
|
3258 |
-
onItemRemove : null, // function(value) { ... }
|
3259 |
-
onClear : null, // function() { ... }
|
3260 |
-
onOptionAdd : null, // function(value, data) { ... }
|
3261 |
-
onOptionRemove : null, // function(value) { ... }
|
3262 |
-
onOptionClear : null, // function() { ... }
|
3263 |
-
onOptionGroupAdd : null, // function(id, data) { ... }
|
3264 |
-
onOptionGroupRemove : null, // function(id) { ... }
|
3265 |
-
onOptionGroupClear : null, // function() { ... }
|
3266 |
-
onDropdownOpen : null, // function($dropdown) { ... }
|
3267 |
-
onDropdownClose : null, // function($dropdown) { ... }
|
3268 |
-
onType : null, // function(str) { ... }
|
3269 |
-
onDelete : null, // function(values) { ... }
|
3270 |
-
*/
|
3271 |
-
|
3272 |
-
render: {
|
3273 |
-
/*
|
3274 |
-
item: null,
|
3275 |
-
optgroup: null,
|
3276 |
-
optgroup_header: null,
|
3277 |
-
option: null,
|
3278 |
-
option_create: null
|
3279 |
-
*/
|
3280 |
-
}
|
3281 |
-
};
|
3282 |
-
|
3283 |
-
|
3284 |
-
$.fn.selectize = function(settings_user) {
|
3285 |
-
var defaults = $.fn.selectize.defaults;
|
3286 |
-
var settings = $.extend({}, defaults, settings_user);
|
3287 |
-
var attr_data = settings.dataAttr;
|
3288 |
-
var field_label = settings.labelField;
|
3289 |
-
var field_value = settings.valueField;
|
3290 |
-
var field_optgroup = settings.optgroupField;
|
3291 |
-
var field_optgroup_label = settings.optgroupLabelField;
|
3292 |
-
var field_optgroup_value = settings.optgroupValueField;
|
3293 |
-
|
3294 |
-
/**
|
3295 |
-
* Initializes selectize from a <input type="text"> element.
|
3296 |
-
*
|
3297 |
-
* @param {object} $input
|
3298 |
-
* @param {object} settings_element
|
3299 |
-
*/
|
3300 |
-
var init_textbox = function($input, settings_element) {
|
3301 |
-
var i, n, values, option;
|
3302 |
-
|
3303 |
-
var data_raw = $input.attr(attr_data);
|
3304 |
-
|
3305 |
-
if (!data_raw) {
|
3306 |
-
var value = $.trim($input.val() || '');
|
3307 |
-
if (!settings.allowEmptyOption && !value.length) return;
|
3308 |
-
values = value.split(settings.delimiter);
|
3309 |
-
for (i = 0, n = values.length; i < n; i++) {
|
3310 |
-
option = {};
|
3311 |
-
option[field_label] = values[i];
|
3312 |
-
option[field_value] = values[i];
|
3313 |
-
settings_element.options.push(option);
|
3314 |
-
}
|
3315 |
-
settings_element.items = values;
|
3316 |
-
} else {
|
3317 |
-
settings_element.options = JSON.parse(data_raw);
|
3318 |
-
for (i = 0, n = settings_element.options.length; i < n; i++) {
|
3319 |
-
settings_element.items.push(settings_element.options[i][field_value]);
|
3320 |
-
}
|
3321 |
-
}
|
3322 |
-
};
|
3323 |
-
|
3324 |
-
/**
|
3325 |
-
* Initializes selectize from a <select> element.
|
3326 |
-
*
|
3327 |
-
* @param {object} $input
|
3328 |
-
* @param {object} settings_element
|
3329 |
-
*/
|
3330 |
-
var init_select = function($input, settings_element) {
|
3331 |
-
var i, n, tagName, $children, order = 0;
|
3332 |
-
var options = settings_element.options;
|
3333 |
-
var optionsMap = {};
|
3334 |
-
|
3335 |
-
var readData = function($el) {
|
3336 |
-
var data = attr_data && $el.attr(attr_data);
|
3337 |
-
if (typeof data === 'string' && data.length) {
|
3338 |
-
return JSON.parse(data);
|
3339 |
-
}
|
3340 |
-
return null;
|
3341 |
-
};
|
3342 |
-
|
3343 |
-
var addOption = function($option, group) {
|
3344 |
-
$option = $($option);
|
3345 |
-
|
3346 |
-
var value = hash_key($option.val());
|
3347 |
-
if (!value && !settings.allowEmptyOption) return;
|
3348 |
-
|
3349 |
-
// if the option already exists, it's probably been
|
3350 |
-
// duplicated in another optgroup. in this case, push
|
3351 |
-
// the current group to the "optgroup" property on the
|
3352 |
-
// existing option so that it's rendered in both places.
|
3353 |
-
if (optionsMap.hasOwnProperty(value)) {
|
3354 |
-
if (group) {
|
3355 |
-
var arr = optionsMap[value][field_optgroup];
|
3356 |
-
if (!arr) {
|
3357 |
-
optionsMap[value][field_optgroup] = group;
|
3358 |
-
} else if (!$.isArray(arr)) {
|
3359 |
-
optionsMap[value][field_optgroup] = [arr, group];
|
3360 |
-
} else {
|
3361 |
-
arr.push(group);
|
3362 |
-
}
|
3363 |
-
}
|
3364 |
-
return;
|
3365 |
-
}
|
3366 |
-
|
3367 |
-
var option = readData($option) || {};
|
3368 |
-
option[field_label] = option[field_label] || $option.text();
|
3369 |
-
option[field_value] = option[field_value] || value;
|
3370 |
-
option[field_optgroup] = option[field_optgroup] || group;
|
3371 |
-
|
3372 |
-
optionsMap[value] = option;
|
3373 |
-
options.push(option);
|
3374 |
-
|
3375 |
-
if ($option.is(':selected')) {
|
3376 |
-
settings_element.items.push(value);
|
3377 |
-
}
|
3378 |
-
};
|
3379 |
-
|
3380 |
-
var addGroup = function($optgroup) {
|
3381 |
-
var i, n, id, optgroup, $options;
|
3382 |
-
|
3383 |
-
$optgroup = $($optgroup);
|
3384 |
-
id = $optgroup.attr('label');
|
3385 |
-
|
3386 |
-
if (id) {
|
3387 |
-
optgroup = readData($optgroup) || {};
|
3388 |
-
optgroup[field_optgroup_label] = id;
|
3389 |
-
optgroup[field_optgroup_value] = id;
|
3390 |
-
settings_element.optgroups.push(optgroup);
|
3391 |
-
}
|
3392 |
-
|
3393 |
-
$options = $('option', $optgroup);
|
3394 |
-
for (i = 0, n = $options.length; i < n; i++) {
|
3395 |
-
addOption($options[i], id);
|
3396 |
-
}
|
3397 |
-
};
|
3398 |
-
|
3399 |
-
settings_element.maxItems = $input.attr('multiple') ? null : 1;
|
3400 |
-
|
3401 |
-
$children = $input.children();
|
3402 |
-
for (i = 0, n = $children.length; i < n; i++) {
|
3403 |
-
tagName = $children[i].tagName.toLowerCase();
|
3404 |
-
if (tagName === 'optgroup') {
|
3405 |
-
addGroup($children[i]);
|
3406 |
-
} else if (tagName === 'option') {
|
3407 |
-
addOption($children[i]);
|
3408 |
-
}
|
3409 |
-
}
|
3410 |
-
};
|
3411 |
-
|
3412 |
-
return this.each(function() {
|
3413 |
-
if (this.selectize) return;
|
3414 |
-
|
3415 |
-
var instance;
|
3416 |
-
var $input = $(this);
|
3417 |
-
var tag_name = this.tagName.toLowerCase();
|
3418 |
-
var placeholder = $input.attr('placeholder') || $input.attr('data-placeholder');
|
3419 |
-
if (!placeholder && !settings.allowEmptyOption) {
|
3420 |
-
placeholder = $input.children('option[value=""]').text();
|
3421 |
-
}
|
3422 |
-
|
3423 |
-
var settings_element = {
|
3424 |
-
'placeholder' : placeholder,
|
3425 |
-
'options' : [],
|
3426 |
-
'optgroups' : [],
|
3427 |
-
'items' : []
|
3428 |
-
};
|
3429 |
-
|
3430 |
-
if (tag_name === 'select') {
|
3431 |
-
init_select($input, settings_element);
|
3432 |
-
} else {
|
3433 |
-
init_textbox($input, settings_element);
|
3434 |
-
}
|
3435 |
-
|
3436 |
-
instance = new Selectize($input, $.extend(true, {}, defaults, settings_element, settings_user));
|
3437 |
-
});
|
3438 |
-
};
|
3439 |
-
|
3440 |
-
$.fn.selectize.defaults = Selectize.defaults;
|
3441 |
-
$.fn.selectize.support = {
|
3442 |
-
validity: SUPPORTS_VALIDITY_API
|
3443 |
-
};
|
3444 |
-
|
3445 |
-
|
3446 |
-
Selectize.define('drag_drop', function(options) {
|
3447 |
-
if (!$.fn.sortable) throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');
|
3448 |
-
if (this.settings.mode !== 'multi') return;
|
3449 |
-
var self = this;
|
3450 |
-
|
3451 |
-
self.lock = (function() {
|
3452 |
-
var original = self.lock;
|
3453 |
-
return function() {
|
3454 |
-
var sortable = self.$control.data('sortable');
|
3455 |
-
if (sortable) sortable.disable();
|
3456 |
-
return original.apply(self, arguments);
|
3457 |
-
};
|
3458 |
-
})();
|
3459 |
-
|
3460 |
-
self.unlock = (function() {
|
3461 |
-
var original = self.unlock;
|
3462 |
-
return function() {
|
3463 |
-
var sortable = self.$control.data('sortable');
|
3464 |
-
if (sortable) sortable.enable();
|
3465 |
-
return original.apply(self, arguments);
|
3466 |
-
};
|
3467 |
-
})();
|
3468 |
-
|
3469 |
-
self.setup = (function() {
|
3470 |
-
var original = self.setup;
|
3471 |
-
return function() {
|
3472 |
-
original.apply(this, arguments);
|
3473 |
-
|
3474 |
-
var $control = self.$control.sortable({
|
3475 |
-
items: '[data-value]',
|
3476 |
-
forcePlaceholderSize: true,
|
3477 |
-
disabled: self.isLocked,
|
3478 |
-
start: function(e, ui) {
|
3479 |
-
ui.placeholder.css('width', ui.helper.css('width'));
|
3480 |
-
$control.css({overflow: 'visible'});
|
3481 |
-
},
|
3482 |
-
stop: function() {
|
3483 |
-
$control.css({overflow: 'hidden'});
|
3484 |
-
var active = self.$activeItems ? self.$activeItems.slice() : null;
|
3485 |
-
var values = [];
|
3486 |
-
$control.children('[data-value]').each(function() {
|
3487 |
-
values.push($(this).attr('data-value'));
|
3488 |
-
});
|
3489 |
-
self.setValue(values);
|
3490 |
-
self.setActiveItem(active);
|
3491 |
-
}
|
3492 |
-
});
|
3493 |
-
};
|
3494 |
-
})();
|
3495 |
-
|
3496 |
-
});
|
3497 |
-
|
3498 |
-
Selectize.define('dropdown_header', function(options) {
|
3499 |
-
var self = this;
|
3500 |
-
|
3501 |
-
options = $.extend({
|
3502 |
-
title : 'Untitled',
|
3503 |
-
headerClass : 'selectize-dropdown-header',
|
3504 |
-
titleRowClass : 'selectize-dropdown-header-title',
|
3505 |
-
labelClass : 'selectize-dropdown-header-label',
|
3506 |
-
closeClass : 'selectize-dropdown-header-close',
|
3507 |
-
|
3508 |
-
html: function(data) {
|
3509 |
-
return (
|
3510 |
-
'<div class="' + data.headerClass + '">' +
|
3511 |
-
'<div class="' + data.titleRowClass + '">' +
|
3512 |
-
'<span class="' + data.labelClass + '">' + data.title + '</span>' +
|
3513 |
-
'<a href="javascript:void(0)" class="' + data.closeClass + '">×</a>' +
|
3514 |
-
'</div>' +
|
3515 |
-
'</div>'
|
3516 |
-
);
|
3517 |
-
}
|
3518 |
-
}, options);
|
3519 |
-
|
3520 |
-
self.setup = (function() {
|
3521 |
-
var original = self.setup;
|
3522 |
-
return function() {
|
3523 |
-
original.apply(self, arguments);
|
3524 |
-
self.$dropdown_header = $(options.html(options));
|
3525 |
-
self.$dropdown.prepend(self.$dropdown_header);
|
3526 |
-
};
|
3527 |
-
})();
|
3528 |
-
|
3529 |
-
});
|
3530 |
-
|
3531 |
-
Selectize.define('optgroup_columns', function(options) {
|
3532 |
-
var self = this;
|
3533 |
-
|
3534 |
-
options = $.extend({
|
3535 |
-
equalizeWidth : true,
|
3536 |
-
equalizeHeight : true
|
3537 |
-
}, options);
|
3538 |
-
|
3539 |
-
this.getAdjacentOption = function($option, direction) {
|
3540 |
-
var $options = $option.closest('[data-group]').find('[data-selectable]');
|
3541 |
-
var index = $options.index($option) + direction;
|
3542 |
-
|
3543 |
-
return index >= 0 && index < $options.length ? $options.eq(index) : $();
|
3544 |
-
};
|
3545 |
-
|
3546 |
-
this.onKeyDown = (function() {
|
3547 |
-
var original = self.onKeyDown;
|
3548 |
-
return function(e) {
|
3549 |
-
var index, $option, $options, $optgroup;
|
3550 |
-
|
3551 |
-
if (this.isOpen && (e.keyCode === KEY_LEFT || e.keyCode === KEY_RIGHT)) {
|
3552 |
-
self.ignoreHover = true;
|
3553 |
-
$optgroup = this.$activeOption.closest('[data-group]');
|
3554 |
-
index = $optgroup.find('[data-selectable]').index(this.$activeOption);
|
3555 |
-
|
3556 |
-
if(e.keyCode === KEY_LEFT) {
|
3557 |
-
$optgroup = $optgroup.prev('[data-group]');
|
3558 |
-
} else {
|
3559 |
-
$optgroup = $optgroup.next('[data-group]');
|
3560 |
-
}
|
3561 |
-
|
3562 |
-
$options = $optgroup.find('[data-selectable]');
|
3563 |
-
$option = $options.eq(Math.min($options.length - 1, index));
|
3564 |
-
if ($option.length) {
|
3565 |
-
this.setActiveOption($option);
|
3566 |
-
}
|
3567 |
-
return;
|
3568 |
-
}
|
3569 |
-
|
3570 |
-
return original.apply(this, arguments);
|
3571 |
-
};
|
3572 |
-
})();
|
3573 |
-
|
3574 |
-
var getScrollbarWidth = function() {
|
3575 |
-
var div;
|
3576 |
-
var width = getScrollbarWidth.width;
|
3577 |
-
var doc = document;
|
3578 |
-
|
3579 |
-
if (typeof width === 'undefined') {
|
3580 |
-
div = doc.createElement('div');
|
3581 |
-
div.innerHTML = '<div style="width:50px;height:50px;position:absolute;left:-50px;top:-50px;overflow:auto;"><div style="width:1px;height:100px;"></div></div>';
|
3582 |
-
div = div.firstChild;
|
3583 |
-
doc.body.appendChild(div);
|
3584 |
-
width = getScrollbarWidth.width = div.offsetWidth - div.clientWidth;
|
3585 |
-
doc.body.removeChild(div);
|
3586 |
-
}
|
3587 |
-
return width;
|
3588 |
-
};
|
3589 |
-
|
3590 |
-
var equalizeSizes = function() {
|
3591 |
-
var i, n, height_max, width, width_last, width_parent, $optgroups;
|
3592 |
-
|
3593 |
-
$optgroups = $('[data-group]', self.$dropdown_content);
|
3594 |
-
n = $optgroups.length;
|
3595 |
-
if (!n || !self.$dropdown_content.width()) return;
|
3596 |
-
|
3597 |
-
if (options.equalizeHeight) {
|
3598 |
-
height_max = 0;
|
3599 |
-
for (i = 0; i < n; i++) {
|
3600 |
-
height_max = Math.max(height_max, $optgroups.eq(i).height());
|
3601 |
-
}
|
3602 |
-
$optgroups.css({height: height_max});
|
3603 |
-
}
|
3604 |
-
|
3605 |
-
if (options.equalizeWidth) {
|
3606 |
-
width_parent = self.$dropdown_content.innerWidth() - getScrollbarWidth();
|
3607 |
-
width = Math.round(width_parent / n);
|
3608 |
-
$optgroups.css({width: width});
|
3609 |
-
if (n > 1) {
|
3610 |
-
width_last = width_parent - width * (n - 1);
|
3611 |
-
$optgroups.eq(n - 1).css({width: width_last});
|
3612 |
-
}
|
3613 |
-
}
|
3614 |
-
};
|
3615 |
-
|
3616 |
-
if (options.equalizeHeight || options.equalizeWidth) {
|
3617 |
-
hook.after(this, 'positionDropdown', equalizeSizes);
|
3618 |
-
hook.after(this, 'refreshOptions', equalizeSizes);
|
3619 |
-
}
|
3620 |
-
|
3621 |
-
|
3622 |
-
});
|
3623 |
-
|
3624 |
-
Selectize.define('remove_button', function(options) {
|
3625 |
-
options = $.extend({
|
3626 |
-
label : '×',
|
3627 |
-
title : 'Remove',
|
3628 |
-
className : 'remove',
|
3629 |
-
append : true
|
3630 |
-
}, options);
|
3631 |
-
|
3632 |
-
var singleClose = function(thisRef, options) {
|
3633 |
-
|
3634 |
-
options.className = 'remove-single';
|
3635 |
-
|
3636 |
-
var self = thisRef;
|
3637 |
-
var html = '<a href="javascript:void(0)" class="' + options.className + '" tabindex="-1" title="' + escape_html(options.title) + '">' + options.label + '</a>';
|
3638 |
-
|
3639 |
-
/**
|
3640 |
-
* Appends an element as a child (with raw HTML).
|
3641 |
-
*
|
3642 |
-
* @param {string} html_container
|
3643 |
-
* @param {string} html_element
|
3644 |
-
* @return {string}
|
3645 |
-
*/
|
3646 |
-
var append = function(html_container, html_element) {
|
3647 |
-
return html_container + html_element;
|
3648 |
-
};
|
3649 |
-
|
3650 |
-
thisRef.setup = (function() {
|
3651 |
-
var original = self.setup;
|
3652 |
-
return function() {
|
3653 |
-
// override the item rendering method to add the button to each
|
3654 |
-
if (options.append) {
|
3655 |
-
var id = $(self.$input.context).attr('id');
|
3656 |
-
var selectizer = $('#'+id);
|
3657 |
-
|
3658 |
-
var render_item = self.settings.render.item;
|
3659 |
-
self.settings.render.item = function(data) {
|
3660 |
-
return append(render_item.apply(thisRef, arguments), html);
|
3661 |
-
};
|
3662 |
-
}
|
3663 |
-
|
3664 |
-
original.apply(thisRef, arguments);
|
3665 |
-
|
3666 |
-
// add event listener
|
3667 |
-
thisRef.$control.on('click', '.' + options.className, function(e) {
|
3668 |
-
e.preventDefault();
|
3669 |
-
if (self.isLocked) return;
|
3670 |
-
|
3671 |
-
self.clear();
|
3672 |
-
});
|
3673 |
-
|
3674 |
-
};
|
3675 |
-
})();
|
3676 |
-
};
|
3677 |
-
|
3678 |
-
var multiClose = function(thisRef, options) {
|
3679 |
-
|
3680 |
-
var self = thisRef;
|
3681 |
-
var html = '<a href="javascript:void(0)" class="' + options.className + '" tabindex="-1" title="' + escape_html(options.title) + '">' + options.label + '</a>';
|
3682 |
-
|
3683 |
-
/**
|
3684 |
-
* Appends an element as a child (with raw HTML).
|
3685 |
-
*
|
3686 |
-
* @param {string} html_container
|
3687 |
-
* @param {string} html_element
|
3688 |
-
* @return {string}
|
3689 |
-
*/
|
3690 |
-
var append = function(html_container, html_element) {
|
3691 |
-
var pos = html_container.search(/(<\/[^>]+>\s*)$/);
|
3692 |
-
return html_container.substring(0, pos) + html_element + html_container.substring(pos);
|
3693 |
-
};
|
3694 |
-
|
3695 |
-
thisRef.setup = (function() {
|
3696 |
-
var original = self.setup;
|
3697 |
-
return function() {
|
3698 |
-
// override the item rendering method to add the button to each
|
3699 |
-
if (options.append) {
|
3700 |
-
var render_item = self.settings.render.item;
|
3701 |
-
self.settings.render.item = function(data) {
|
3702 |
-
return append(render_item.apply(thisRef, arguments), html);
|
3703 |
-
};
|
3704 |
-
}
|
3705 |
-
|
3706 |
-
original.apply(thisRef, arguments);
|
3707 |
-
|
3708 |
-
// add event listener
|
3709 |
-
thisRef.$control.on('click', '.' + options.className, function(e) {
|
3710 |
-
e.preventDefault();
|
3711 |
-
if (self.isLocked) return;
|
3712 |
-
|
3713 |
-
var $item = $(e.currentTarget).parent();
|
3714 |
-
self.setActiveItem($item);
|
3715 |
-
if (self.deleteSelection()) {
|
3716 |
-
self.setCaret(self.items.length);
|
3717 |
-
}
|
3718 |
-
});
|
3719 |
-
|
3720 |
-
};
|
3721 |
-
})();
|
3722 |
-
};
|
3723 |
-
|
3724 |
-
if (this.settings.mode === 'single') {
|
3725 |
-
singleClose(this, options);
|
3726 |
-
return;
|
3727 |
-
} else {
|
3728 |
-
multiClose(this, options);
|
3729 |
-
}
|
3730 |
-
});
|
3731 |
-
|
3732 |
-
|
3733 |
-
Selectize.define('restore_on_backspace', function(options) {
|
3734 |
-
var self = this;
|
3735 |
-
|
3736 |
-
options.text = options.text || function(option) {
|
3737 |
-
return option[this.settings.labelField];
|
3738 |
-
};
|
3739 |
-
|
3740 |
-
this.onKeyDown = (function() {
|
3741 |
-
var original = self.onKeyDown;
|
3742 |
-
return function(e) {
|
3743 |
-
var index, option;
|
3744 |
-
if (e.keyCode === KEY_BACKSPACE && this.$control_input.val() === '' && !this.$activeItems.length) {
|
3745 |
-
index = this.caretPos - 1;
|
3746 |
-
if (index >= 0 && index < this.items.length) {
|
3747 |
-
option = this.options[this.items[index]];
|
3748 |
-
if (this.deleteSelection(e)) {
|
3749 |
-
this.setTextboxValue(options.text.apply(this, [option]));
|
3750 |
-
this.refreshOptions(true);
|
3751 |
-
}
|
3752 |
-
e.preventDefault();
|
3753 |
-
return;
|
3754 |
-
}
|
3755 |
-
}
|
3756 |
-
return original.apply(this, arguments);
|
3757 |
-
};
|
3758 |
-
})();
|
3759 |
-
});
|
3760 |
-
|
3761 |
-
|
3762 |
-
return Selectize;
|
3763 |
-
}));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/jeg-element/assets/js/selectize.min.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
/*! selectize.js - v0.14.0 | https://github.com/selectize/selectize.js | Apache License (v2) */
|
2 |
+
!function(root,factory){"function"==typeof define&&define.amd?define("selectize",["jquery"],factory):"object"==typeof module&&"object"==typeof module.exports?module.exports=factory(require("jquery")):root.Selectize=factory(root.jQuery)}(this,function($){"use strict";function MicroEvent(){}$.fn.removeHighlight=function(){return this.find("span.highlight").each(function(){this.parentNode.firstChild.nodeName;var parent=this.parentNode;parent.replaceChild(this.firstChild,this),parent.normalize()}).end()};function Sifter(items,settings){this.items=items,this.settings=settings||{diacritics:!0}}MicroEvent.prototype={on:function(event,fct){this._events=this._events||{},this._events[event]=this._events[event]||[],this._events[event].push(fct)},off:function(event,fct){var n=arguments.length;return 0===n?delete this._events:1===n?delete this._events[event]:(this._events=this._events||{},void(event in this._events!=!1&&this._events[event].splice(this._events[event].indexOf(fct),1)))},trigger:function(event){const events=this._events=this._events||{};if(event in events!=!1)for(var i=0;i<events[event].length;i++)events[event][i].apply(this,Array.prototype.slice.call(arguments,1))}},MicroEvent.mixin=function(destObject){for(var props=["on","off","trigger"],i=0;i<props.length;i++)destObject.prototype[props[i]]=MicroEvent.prototype[props[i]]};var MicroPlugin={},utils=(MicroPlugin.mixin=function(Interface){Interface.plugins={},Interface.prototype.initializePlugins=function(plugins){var i,n,key,queue=[];if(this.plugins={names:[],settings:{},requested:{},loaded:{}},utils.isArray(plugins))for(i=0,n=plugins.length;i<n;i++)"string"==typeof plugins[i]?queue.push(plugins[i]):(this.plugins.settings[plugins[i].name]=plugins[i].options,queue.push(plugins[i].name));else if(plugins)for(key in plugins)plugins.hasOwnProperty(key)&&(this.plugins.settings[key]=plugins[key],queue.push(key));for(;queue.length;)this.require(queue.shift())},Interface.prototype.loadPlugin=function(name){var plugins=this.plugins,plugin=Interface.plugins[name];if(!Interface.plugins.hasOwnProperty(name))throw new Error('Unable to find "'+name+'" plugin');plugins.requested[name]=!0,plugins.loaded[name]=plugin.fn.apply(this,[this.plugins.settings[name]||{}]),plugins.names.push(name)},Interface.prototype.require=function(name){var plugins=this.plugins;if(!this.plugins.loaded.hasOwnProperty(name)){if(plugins.requested[name])throw new Error('Plugin has circular dependency ("'+name+'")');this.loadPlugin(name)}return plugins.loaded[name]},Interface.define=function(name,fn){Interface.plugins[name]={name:name,fn:fn}}},{isArray:Array.isArray||function(vArg){return"[object Array]"===Object.prototype.toString.call(vArg)}}),cmp=(Sifter.prototype.tokenize=function(query,respect_word_boundaries){if(!(query=trim(String(query||"").toLowerCase()))||!query.length)return[];for(var regex,letter,tokens=[],words=query.split(/ +/),i=0,n=words.length;i<n;i++){if(regex=escape_regex(words[i]),this.settings.diacritics)for(letter in DIACRITICS)DIACRITICS.hasOwnProperty(letter)&&(regex=regex.replace(new RegExp(letter,"g"),DIACRITICS[letter]));respect_word_boundaries&&(regex="\\b"+regex),tokens.push({string:words[i],regex:new RegExp(regex,"i")})}return tokens},Sifter.prototype.iterator=function(object,callback){var iterator=is_array(object)?Array.prototype.forEach||function(callback){for(var i=0,n=this.length;i<n;i++)callback(this[i],i,this)}:function(callback){for(var key in this)this.hasOwnProperty(key)&&callback(this[key],key,this)};iterator.apply(object,[callback])},Sifter.prototype.getScoreFunction=function(search,options){function scoreValue(value,token){var pos;return!value||-1===(pos=(value=String(value||"")).search(token.regex))?0:(token=token.string.length/value.length,0===pos&&(token+=.5),token)}var field_count,tokens=(search=this.prepareSearch(search,options)).tokens,fields=search.options.fields,token_count=tokens.length,nesting=search.options.nesting,scoreObject=(field_count=fields.length)?1===field_count?function(token,data){return scoreValue(getattr(data,fields[0],nesting),token)}:function(token,data){for(var i=0,sum=0;i<field_count;i++)sum+=scoreValue(getattr(data,fields[i],nesting),token);return sum/field_count}:function(){return 0};return token_count?1===token_count?function(data){return scoreObject(tokens[0],data)}:"and"===search.options.conjunction?function(data){for(var score,i=0,sum=0;i<token_count;i++){if((score=scoreObject(tokens[i],data))<=0)return 0;sum+=score}return sum/token_count}:function(data){for(var i=0,sum=0;i<token_count;i++)sum+=scoreObject(tokens[i],data);return sum/token_count}:function(){return 0}},Sifter.prototype.getSortFunction=function(search,options){var i,n,field,fields_count,multiplier,multipliers,implicit_score,self=this,sort=!(search=self.prepareSearch(search,options)).query&&options.sort_empty||options.sort,get_field=function(name,result){return"$score"===name?result.score:getattr(self.items[result.id],name,options.nesting)},fields=[];if(sort)for(i=0,n=sort.length;i<n;i++)!search.query&&"$score"===sort[i].field||fields.push(sort[i]);if(search.query){for(implicit_score=!0,i=0,n=fields.length;i<n;i++)if("$score"===fields[i].field){implicit_score=!1;break}implicit_score&&fields.unshift({field:"$score",direction:"desc"})}else for(i=0,n=fields.length;i<n;i++)if("$score"===fields[i].field){fields.splice(i,1);break}for(multipliers=[],i=0,n=fields.length;i<n;i++)multipliers.push("desc"===fields[i].direction?-1:1);return(fields_count=fields.length)?1===fields_count?(field=fields[0].field,multiplier=multipliers[0],function(a,b){return multiplier*cmp(get_field(field,a),get_field(field,b))}):function(a,b){for(var field,i=0;i<fields_count;i++)if(field=fields[i].field,field=multipliers[i]*cmp(get_field(field,a),get_field(field,b)))return field;return 0}:null},Sifter.prototype.prepareSearch=function(query,options){if("object"==typeof query)return query;var option_fields=(options=extend({},options)).fields,option_sort=options.sort,option_sort_empty=options.sort_empty;return option_fields&&!is_array(option_fields)&&(options.fields=[option_fields]),option_sort&&!is_array(option_sort)&&(options.sort=[option_sort]),option_sort_empty&&!is_array(option_sort_empty)&&(options.sort_empty=[option_sort_empty]),{options:options,query:String(query||"").toLowerCase(),tokens:this.tokenize(query,options.respect_word_boundaries),total:0,items:[]}},Sifter.prototype.search=function(query,options){var score,fn_score,search=this.prepareSearch(query,options);return options=search.options,query=search.query,fn_score=options.score||this.getScoreFunction(search),query.length?this.iterator(this.items,function(item,id){score=fn_score(item),(!1===options.filter||0<score)&&search.items.push({score:score,id:id})}):this.iterator(this.items,function(item,id){search.items.push({score:1,id:id})}),(query=this.getSortFunction(search,options))&&search.items.sort(query),search.total=search.items.length,"number"==typeof options.limit&&(search.items=search.items.slice(0,options.limit)),search},function(a,b){return"number"==typeof a&&"number"==typeof b?b<a?1:a<b?-1:0:(a=asciifold(String(a||"")),(b=asciifold(String(b||"")))<a?1:a<b?-1:0)}),extend=function(a,b){for(var k,object,i=1,n=arguments.length;i<n;i++)if(object=arguments[i])for(k in object)object.hasOwnProperty(k)&&(a[k]=object[k]);return a},getattr=function(obj,name,nesting){if(obj&&name){if(!nesting)return obj[name];for(var names=name.split(".");names.length&&(obj=obj[names.shift()]););return obj}},trim=function(str){return(str+"").replace(/^\s+|\s+$|/g,"")},escape_regex=function(str){return(str+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},is_array=Array.isArray||void 0!==$&&$.isArray||function(object){return"[object Array]"===Object.prototype.toString.call(object)},DIACRITICS={a:"[aḀḁĂăÂâǍǎȺⱥȦȧẠạÄäÀàÁáĀāÃãÅåąĄÃąĄ]",b:"[b␢βΒB฿𐌁ᛒ]",c:"[cĆćĈĉČčĊċC̄c̄ÇçḈḉȻȼƇƈɕᴄCc]",d:"[dĎďḊḋḐḑḌḍḒḓḎḏĐđD̦d̦ƉɖƊɗƋƌᵭᶁᶑȡᴅDdð]",e:"[eÉéÈèÊêḘḙĚěĔĕẼẽḚḛẺẻĖėËëĒēȨȩĘęᶒɆɇȄȅẾếỀềỄễỂểḜḝḖḗḔḕȆȇẸẹỆệⱸᴇEeɘǝƏƐε]",f:"[fƑƒḞḟ]",g:"[gɢ₲ǤǥĜĝĞğĢģƓɠĠġ]",h:"[hĤĥĦħḨḩẖẖḤḥḢḣɦʰǶƕ]",i:"[iÍíÌìĬĭÎîǏǐÏïḮḯĨĩĮįĪīỈỉȈȉȊȋỊịḬḭƗɨɨ̆ᵻᶖİiIıɪIi]",j:"[jȷĴĵɈɉʝɟʲ]",k:"[kƘƙꝀꝁḰḱǨǩḲḳḴḵκϰ₭]",l:"[lŁłĽľĻļĹĺḶḷḸḹḼḽḺḻĿŀȽƚⱠⱡⱢɫɬᶅɭȴʟLl]",n:"[nŃńǸǹŇňÑñṄṅŅņṆṇṊṋṈṉN̈n̈ƝɲȠƞᵰᶇɳȵɴNnŊŋ]",o:"[oØøÖöÓóÒòÔôǑǒŐőŎŏȮȯỌọƟɵƠơỎỏŌōÕõǪǫȌȍՕօ]",p:"[pṔṕṖṗⱣᵽƤƥᵱ]",q:"[qꝖꝗʠɊɋꝘꝙq̃]",r:"[rŔŕɌɍŘřŖŗṘṙȐȑȒȓṚṛⱤɽ]",s:"[sŚśṠṡṢṣꞨꞩŜŝŠšŞşȘșS̈s̈]",t:"[tŤťṪṫŢţṬṭƮʈȚțṰṱṮṯƬƭ]",u:"[uŬŭɄʉỤụÜüÚúÙùÛûǓǔŰűŬŭƯưỦủŪūŨũŲųȔȕ∪]",v:"[vṼṽṾṿƲʋꝞꝟⱱʋ]",w:"[wẂẃẀẁŴŵẄẅẆẇẈẉ]",x:"[xẌẍẊẋχ]",y:"[yÝýỲỳŶŷŸÿỸỹẎẏỴỵɎɏƳƴ]",z:"[zŹźẐẑŽžŻżẒẓẔẕƵƶ]"},asciifold=function(){var i,n,k,chunk,foreignletters="",lookup={};for(k in DIACRITICS)if(DIACRITICS.hasOwnProperty(k))for(foreignletters+=chunk=DIACRITICS[k].substring(2,DIACRITICS[k].length-1),i=0,n=chunk.length;i<n;i++)lookup[chunk.charAt(i)]=k;var regexp=new RegExp("["+foreignletters+"]","g");return function(str){return str.replace(regexp,function(foreignletter){return lookup[foreignletter]}).toLowerCase()}}();function uaDetect(platform,re){return navigator.userAgentData?platform===navigator.userAgentData.platform:re.test(navigator.userAgent)}function isset(object){return void 0!==object}function hash_key(value){return null==value?null:"boolean"==typeof value?value?"1":"0":value+""}function escape_html(str){return(str+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function debounce_events(self,types,fn){var type,trigger=self.trigger,event_args={};for(type in self.trigger=function(){var type=arguments[0];if(-1===types.indexOf(type))return trigger.apply(self,arguments);event_args[type]=arguments},fn.apply(self,[]),self.trigger=trigger,event_args)event_args.hasOwnProperty(type)&&trigger.apply(self,event_args[type])}function getSelection(input){var sel,selLen,result={};return void 0===input?console.warn("WARN getSelection cannot locate input control"):"selectionStart"in input?(result.start=input.selectionStart,result.length=input.selectionEnd-result.start):document.selection&&(input.focus(),sel=document.selection.createRange(),selLen=document.selection.createRange().text.length,sel.moveStart("character",-input.value.length),result.start=sel.text.length-selLen,result.length=selLen),result}function measureString(str,$parent){return str?(Selectize.$testInput||(Selectize.$testInput=$("<span />").css({position:"absolute",width:"auto",padding:0,whiteSpace:"pre"}),$("<div />").css({position:"absolute",width:0,height:0,overflow:"hidden"}).append(Selectize.$testInput).appendTo("body")),Selectize.$testInput.text(str),transferStyles($parent,Selectize.$testInput,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]),Selectize.$testInput.width()):0}function autoGrow($input){function update(e,options){var printable,keyCode,selection;options=options||{},(e=e||window.event||{}).metaKey||e.altKey||!options.force&&!1===$input.data("grow")||(options=$input.val(),e.type&&"keydown"===e.type.toLowerCase()&&(printable=48<=(keyCode=e.keyCode)&&keyCode<=57||65<=keyCode&&keyCode<=90||96<=keyCode&&keyCode<=111||186<=keyCode&&keyCode<=222||32===keyCode,46===keyCode||8===keyCode?(selection=getSelection($input[0])).length?options=options.substring(0,selection.start)+options.substring(selection.start+selection.length):8===keyCode&&selection.start?options=options.substring(0,selection.start-1)+options.substring(selection.start+1):46===keyCode&&void 0!==selection.start&&(options=options.substring(0,selection.start)+options.substring(selection.start+1)):printable&&(keyCode=e.shiftKey,selection=String.fromCharCode(e.keyCode),options+=selection=keyCode?selection.toUpperCase():selection.toLowerCase())),e=(printable=$input.attr("placeholder"))?measureString(printable,$input)+4:0,(keyCode=Math.max(measureString(options,$input),e)+4)!==currentWidth&&(currentWidth=keyCode,$input.width(keyCode),$input.triggerHandler("resize")))}var currentWidth=null;$input.on("keydown keyup update blur",update),update()}var IS_MAC=uaDetect("macOS",/Mac/),KEY_CMD=IS_MAC?91:17,KEY_CTRL=IS_MAC?18:17,SUPPORTS_VALIDITY_API=!uaDetect("Android",/android/i)&&!!document.createElement("input").validity,hook={before:function(self,method,fn){var original=self[method];self[method]=function(){return fn.apply(self,arguments),original.apply(self,arguments)}},after:function(self,method,fn){var original=self[method];self[method]=function(){var result=original.apply(self,arguments);return fn.apply(self,arguments),result}}},transferStyles=function($from,$to,properties){var i,n,styles={};if(properties)for(i=0,n=properties.length;i<n;i++)styles[properties[i]]=$from.css(properties[i]);else styles=$from.css();$to.css(styles)},Selectize=function($input,settings){var i,n,fn,delay,timeout,input=$input[0],computedStyle=(input.selectize=this,window.getComputedStyle&&window.getComputedStyle(input,null));if(computedStyle=(computedStyle?computedStyle.getPropertyValue("direction"):input.currentStyle&&input.currentStyle.direction)||$input.parents("[dir]:first").attr("dir")||"",$.extend(this,{order:0,settings:settings,$input:$input,tabIndex:$input.attr("tabindex")||"",tagType:"select"===input.tagName.toLowerCase()?1:2,rtl:/rtl/i.test(computedStyle),eventNS:".selectize"+ ++Selectize.count,highlightedValue:null,isBlurring:!1,isOpen:!1,isDisabled:!1,isRequired:$input.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",lastValidValue:"",caretPos:0,loading:0,loadedSearches:{},isDropdownClosing:!1,$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:null===settings.loadThrottle?this.onSearchChange:(fn=this.onSearchChange,delay=settings.loadThrottle,function(){var self=this,args=arguments;window.clearTimeout(timeout),timeout=window.setTimeout(function(){fn.apply(self,args)},delay)})}),this.sifter=new Sifter(this.options,{diacritics:settings.diacritics}),this.settings.options){for(i=0,n=this.settings.options.length;i<n;i++)this.registerOption(this.settings.options[i]);delete this.settings.options}if(this.settings.optgroups){for(i=0,n=this.settings.optgroups.length;i<n;i++)this.registerOptionGroup(this.settings.optgroups[i]);delete this.settings.optgroups}this.settings.mode=this.settings.mode||(1===this.settings.maxItems?"single":"multi"),"boolean"!=typeof this.settings.hideSelected&&(this.settings.hideSelected="multi"===this.settings.mode),this.initializePlugins(this.settings.plugins),this.setupCallbacks(),this.setupTemplates(),this.setup()};return MicroEvent.mixin(Selectize),MicroPlugin.mixin(Selectize),$.extend(Selectize.prototype,{setup:function(){var $parent,inputId,fn,self=this,settings=self.settings,eventNS=self.eventNS,$window=$(window),$document=$(document),$input=self.$input,inputMode=self.settings.mode,classes=$input.attr("class")||"",$wrapper=$("<div>").addClass(settings.wrapperClass).addClass(classes).addClass(inputMode),$control=$("<div>").addClass(settings.inputClass).addClass("items").appendTo($wrapper),$control_input=$('<input type="select-one" autocomplete="new-password" autofill="no" />').appendTo($control).attr("tabindex",$input.is(":disabled")?"-1":self.tabIndex),$dropdown_parent=$(settings.dropdownParent||$wrapper),inputMode=$("<div>").addClass(settings.dropdownClass).addClass(inputMode).hide().appendTo($dropdown_parent),$dropdown_parent=$("<div>").addClass(settings.dropdownContentClass).attr("tabindex","-1").appendTo(inputMode);(inputId=$input.attr("id"))&&($control_input.attr("id",inputId+"-selectized"),$("label[for='"+inputId+"']").attr("for",inputId+"-selectized")),self.settings.copyClassesToDropdown&&inputMode.addClass(classes),$wrapper.css({width:$input[0].style.width}),self.plugins.names.length&&(inputId="plugin-"+self.plugins.names.join(" plugin-"),$wrapper.addClass(inputId),inputMode.addClass(inputId)),(null===settings.maxItems||1<settings.maxItems)&&1===self.tagType&&$input.attr("multiple","multiple"),self.settings.placeholder&&$control_input.attr("placeholder",settings.placeholder),!self.settings.splitOn&&self.settings.delimiter&&(classes=self.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),self.settings.splitOn=new RegExp("\\s*"+classes+"+\\s*")),$input.attr("autocorrect")&&$control_input.attr("autocorrect",$input.attr("autocorrect")),$input.attr("autocapitalize")&&$control_input.attr("autocapitalize",$input.attr("autocapitalize")),$input.is("input")&&($control_input[0].type=$input[0].type),self.$wrapper=$wrapper,self.$control=$control,self.$control_input=$control_input,self.$dropdown=inputMode,self.$dropdown_content=$dropdown_parent,inputMode.on("mouseenter mousedown mouseup click","[data-disabled]>[data-selectable]",function(e){e.stopImmediatePropagation()}),inputMode.on("mouseenter","[data-selectable]",function(){return self.onOptionHover.apply(self,arguments)}),inputMode.on("mouseup click","[data-selectable]",function(){return self.onOptionSelect.apply(self,arguments)}),inputId="mouseup",classes="*:not(input)",fn=function(){return self.onItemSelect.apply(self,arguments)},($parent=$control).on(inputId,classes,function(e){for(var child=e.target;child&&child.parentNode!==$parent[0];)child=child.parentNode;return e.currentTarget=child,fn.apply(this,[e])}),autoGrow($control_input),$control.on({mousedown:function(){return self.onMouseDown.apply(self,arguments)},click:function(){return self.onClick.apply(self,arguments)}}),$control_input.on({mousedown:function(e){e.stopPropagation()},keydown:function(){return self.onKeyDown.apply(self,arguments)},keypress:function(){return self.onKeyPress.apply(self,arguments)},input:function(){return self.onInput.apply(self,arguments)},resize:function(){self.positionDropdown.apply(self,[])},focus:function(){return self.ignoreBlur=!1,self.onFocus.apply(self,arguments)},paste:function(){return self.onPaste.apply(self,arguments)}}),$document.on("keydown"+eventNS,function(e){self.isCmdDown=e[IS_MAC?"metaKey":"ctrlKey"],self.isCtrlDown=e[IS_MAC?"altKey":"ctrlKey"],self.isShiftDown=e.shiftKey}),$document.on("keyup"+eventNS,function(e){e.keyCode===KEY_CTRL&&(self.isCtrlDown=!1),16===e.keyCode&&(self.isShiftDown=!1),e.keyCode===KEY_CMD&&(self.isCmdDown=!1)}),$document.on("mousedown"+eventNS,function(e){if(self.isFocused){if(e.target===self.$dropdown[0]||e.target.parentNode===self.$dropdown[0])return!1;self.$dropdown.has(e.target).length||e.target===self.$control[0]||self.blur(e.target)}}),$window.on(["scroll"+eventNS,"resize"+eventNS].join(" "),function(){self.isOpen&&self.positionDropdown.apply(self,arguments)}),$window.on("mousemove"+eventNS,function(){self.ignoreHover=self.settings.ignoreHover}),this.revertSettings={$children:$input.children().detach(),tabindex:$input.attr("tabindex")},$input.attr("tabindex",-1).hide().after(self.$wrapper),Array.isArray(settings.items)&&(self.lastValidValue=settings.items,self.setValue(settings.items),delete settings.items),SUPPORTS_VALIDITY_API&&$input.on("invalid"+eventNS,function(e){e.preventDefault(),self.isInvalid=!0,self.refreshState()}),self.updateOriginalInput(),self.refreshItems(),self.refreshState(),self.updatePlaceholder(),self.isSetup=!0,$input.is(":disabled")&&self.disable(),self.on("change",this.onChange),$input.data("selectize",self),$input.addClass("selectized"),self.trigger("initialize"),!0===settings.preload&&self.onSearchChange("")},setupTemplates:function(){var field_label=this.settings.labelField,field_value=this.settings.valueField,field_optgroup=this.settings.optgroupLabelField;this.settings.render=$.extend({},{optgroup:function(data){return'<div class="optgroup">'+data.html+"</div>"},optgroup_header:function(data,escape){return'<div class="optgroup-header">'+escape(data[field_optgroup])+"</div>"},option:function(data,escape){return'<div class="option '+(""===data[field_value]?"selectize-dropdown-emptyoptionlabel":"")+'">'+escape(data[field_label])+"</div>"},item:function(data,escape){return'<div class="item">'+escape(data[field_label])+"</div>"},option_create:function(data,escape){return'<div class="create">Add <strong>'+escape(data.input)+"</strong>…</div>"}},this.settings.render)},setupCallbacks:function(){var key,fn,callbacks={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur",dropdown_item_activate:"onDropdownItemActivate",dropdown_item_deactivate:"onDropdownItemDeactivate"};for(key in callbacks)callbacks.hasOwnProperty(key)&&(fn=this.settings[callbacks[key]])&&this.on(key,fn)},onClick:function(e){this.isDropdownClosing||this.isFocused&&this.isOpen||(this.focus(),e.preventDefault())},onMouseDown:function(e){var self=this,defaultPrevented=e.isDefaultPrevented();$(e.target);if(self.isFocused){if(e.target!==self.$control_input[0])return"single"===self.settings.mode?(self.isOpen?self.close():self.open(),self.isDropdownClosing=!0,setTimeout(function(){self.isDropdownClosing=!1},self.settings.closeDropdownThreshold)):defaultPrevented||self.setActiveItem(null),!1}else defaultPrevented||window.setTimeout(function(){self.focus()},0)},onChange:function(){""!==this.getValue()&&(this.lastValidValue=this.getValue()),this.$input.trigger("input"),this.$input.trigger("change")},onPaste:function(e){var self=this;self.isFull()||self.isInputHidden||self.isLocked?e.preventDefault():self.settings.splitOn&&setTimeout(function(){var pastedText=self.$control_input.val();if(pastedText.match(self.settings.splitOn))for(var splitInput=pastedText.trim().split(self.settings.splitOn),i=0,n=splitInput.length;i<n;i++)self.createItem(splitInput[i])},0)},onKeyPress:function(e){if(this.isLocked)return e&&e.preventDefault();var character=String.fromCharCode(e.keyCode||e.which);return this.settings.create&&"multi"===this.settings.mode&&character===this.settings.delimiter?(this.createItem(),e.preventDefault(),!1):void 0},onKeyDown:function(e){var $next;e.target,this.$control_input[0];if(this.isLocked)9!==e.keyCode&&e.preventDefault();else{switch(e.keyCode){case 65:if(this.isCmdDown)return void this.selectAll();break;case 27:return void(this.isOpen&&(e.preventDefault(),e.stopPropagation(),this.close()));case 78:if(!e.ctrlKey||e.altKey)break;case 40:return!this.isOpen&&this.hasOptions?this.open():this.$activeOption&&(this.ignoreHover=!0,($next=this.getAdjacentOption(this.$activeOption,1)).length&&this.setActiveOption($next,!0,!0)),void e.preventDefault();case 80:if(!e.ctrlKey||e.altKey)break;case 38:return this.$activeOption&&(this.ignoreHover=!0,($next=this.getAdjacentOption(this.$activeOption,-1)).length&&this.setActiveOption($next,!0,!0)),void e.preventDefault();case 13:return void(this.isOpen&&this.$activeOption&&(this.onOptionSelect({currentTarget:this.$activeOption}),e.preventDefault()));case 37:return void this.advanceSelection(-1,e);case 39:return void this.advanceSelection(1,e);case 9:return this.settings.selectOnTab&&this.isOpen&&this.$activeOption&&(this.onOptionSelect({currentTarget:this.$activeOption}),this.isFull()||e.preventDefault()),void(this.settings.create&&this.createItem()&&this.settings.showAddOptionOnCreate&&e.preventDefault());case 8:case 46:return void this.deleteSelection(e)}!this.isFull()&&!this.isInputHidden||(IS_MAC?e.metaKey:e.ctrlKey)||e.preventDefault()}},onInput:function(e){var value=this.$control_input.val()||"";this.lastValue!==value&&(this.lastValue=value,this.onSearchChange(value),this.refreshOptions(),this.trigger("type",value))},onSearchChange:function(value){var self=this,fn=self.settings.load;fn&&!self.loadedSearches.hasOwnProperty(value)&&(self.loadedSearches[value]=!0,self.load(function(callback){fn.apply(self,[value,callback])}))},onFocus:function(e){var wasFocused=this.isFocused;if(this.isDisabled)return this.blur(),e&&e.preventDefault(),!1;this.ignoreFocus||(this.isFocused=!0,"focus"===this.settings.preload&&this.onSearchChange(""),wasFocused||this.trigger("focus"),this.$activeItems.length||(this.showInput(),this.setActiveItem(null),this.refreshOptions(!!this.settings.openOnFocus)),this.refreshState())},onBlur:function(e,dest){var deactivate,self=this;self.isFocused&&(self.isFocused=!1,self.ignoreFocus||(deactivate=function(){self.close(),self.setTextboxValue(""),self.setActiveItem(null),self.setActiveOption(null),self.setCaret(self.items.length),self.refreshState(),dest&&dest.focus&&dest.focus(),self.isBlurring=!1,self.ignoreFocus=!1,self.trigger("blur")},self.isBlurring=!0,self.ignoreFocus=!0,self.settings.create&&self.settings.createOnBlur?self.createItem(null,!1,deactivate):deactivate()))},onOptionHover:function(e){this.ignoreHover||this.setActiveOption(e.currentTarget,!1)},onOptionSelect:function(e){var $target,self=this;e.preventDefault&&(e.preventDefault(),e.stopPropagation()),($target=$(e.currentTarget)).hasClass("create")?self.createItem(null,function(){self.settings.closeAfterSelect&&self.close()}):void 0!==($target=$target.attr("data-value"))&&(self.lastQuery=null,self.setTextboxValue(""),self.addItem($target),self.settings.closeAfterSelect?self.close():!self.settings.hideSelected&&e.type&&/mouse/.test(e.type)&&self.setActiveOption(self.getOption($target)))},onItemSelect:function(e){this.isLocked||"multi"===this.settings.mode&&(e.preventDefault(),this.setActiveItem(e.currentTarget,e))},load:function(fn){var self=this,$wrapper=self.$wrapper.addClass(self.settings.loadingClass);self.loading++,fn.apply(self,[function(results){self.loading=Math.max(self.loading-1,0),results&&results.length&&(self.addOption(results),self.refreshOptions(self.isFocused&&!self.isInputHidden)),self.loading||$wrapper.removeClass(self.settings.loadingClass),self.trigger("load",results)}])},getTextboxValue:function(){return this.$control_input.val()},setTextboxValue:function(value){var $input=this.$control_input;$input.val()!==value&&($input.val(value).triggerHandler("update"),this.lastValue=value)},getValue:function(){return 1===this.tagType&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(value,silent){debounce_events(this,silent?[]:["change"],function(){this.clear(silent),this.addItems(value,silent)})},setMaxItems:function(value){this.settings.maxItems=value=0===value?null:value,this.settings.mode=this.settings.mode||(1===this.settings.maxItems?"single":"multi"),this.refreshState()},setActiveItem:function($item,e){var eventName,i,end,item,swap,$last;if("single"!==this.settings.mode){if(!($item=$($item)).length)return $(this.$activeItems).removeClass("active"),this.$activeItems=[],void(this.isFocused&&this.showInput());if("mousedown"===(eventName=e&&e.type.toLowerCase())&&this.isShiftDown&&this.$activeItems.length){for($last=this.$control.children(".active:last"),$last=Array.prototype.indexOf.apply(this.$control[0].childNodes,[$last[0]]),(end=Array.prototype.indexOf.apply(this.$control[0].childNodes,[$item[0]]))<$last&&(swap=$last,$last=end,end=swap),i=$last;i<=end;i++)item=this.$control[0].childNodes[i],-1===this.$activeItems.indexOf(item)&&($(item).addClass("active"),this.$activeItems.push(item));e.preventDefault()}else"mousedown"===eventName&&this.isCtrlDown||"keydown"===eventName&&this.isShiftDown?$item.hasClass("active")?(swap=this.$activeItems.indexOf($item[0]),this.$activeItems.splice(swap,1),$item.removeClass("active")):this.$activeItems.push($item.addClass("active")[0]):($(this.$activeItems).removeClass("active"),this.$activeItems=[$item.addClass("active")[0]]);this.hideInput(),this.isFocused||this.focus()}},setActiveOption:function($option,scroll,animate){var height_item,y,scroll_top,scroll_bottom;this.$activeOption&&(this.$activeOption.removeClass("active"),this.trigger("dropdown_item_deactivate",this.$activeOption.attr("data-value"))),this.$activeOption=null,($option=$($option)).length&&(this.$activeOption=$option.addClass("active"),this.isOpen&&this.trigger("dropdown_item_activate",this.$activeOption.attr("data-value")),!scroll&&isset(scroll)||($option=this.$dropdown_content.height(),height_item=this.$activeOption.outerHeight(!0),scroll=this.$dropdown_content.scrollTop()||0,scroll_bottom=(scroll_top=y=this.$activeOption.offset().top-this.$dropdown_content.offset().top+scroll)-$option+height_item,$option+scroll<y+height_item?this.$dropdown_content.stop().animate({scrollTop:scroll_bottom},animate?this.settings.scrollDuration:0):y<scroll&&this.$dropdown_content.stop().animate({scrollTop:scroll_top},animate?this.settings.scrollDuration:0)))},selectAll:function(){"single"!==this.settings.mode&&(this.$activeItems=Array.prototype.slice.apply(this.$control.children(":not(input)").addClass("active")),this.$activeItems.length&&(this.hideInput(),this.close()),this.focus())},hideInput:function(){this.setTextboxValue(""),this.$control_input.css({opacity:0,position:"absolute",left:this.rtl?1e4:0}),this.isInputHidden=!0},showInput:function(){this.$control_input.css({opacity:1,position:"relative",left:0}),this.isInputHidden=!1},focus:function(){var self=this;return self.isDisabled||(self.ignoreFocus=!0,self.$control_input[0].focus(),window.setTimeout(function(){self.ignoreFocus=!1,self.onFocus()},0)),self},blur:function(dest){return this.$control_input[0].blur(),this.onBlur(null,dest),this},getScoreFunction:function(query){return this.sifter.getScoreFunction(query,this.getSearchOptions())},getSearchOptions:function(){var settings=this.settings,sort=settings.sortField;return{fields:settings.searchField,conjunction:settings.searchConjunction,sort:sort="string"==typeof sort?[{field:sort}]:sort,nesting:settings.nesting,filter:settings.filter}},search:function(query){var i,result,calculateScore,settings=this.settings,options=this.getSearchOptions();if(settings.score&&"function"!=typeof(calculateScore=this.settings.score.apply(this,[query])))throw new Error('Selectize "score" setting must be a function that returns a function');if(query!==this.lastQuery?(settings.normalize&&(query=query.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),this.lastQuery=query,result=this.sifter.search(query,$.extend(options,{score:calculateScore})),this.currentResults=result):result=$.extend(!0,{},this.currentResults),settings.hideSelected)for(i=result.items.length-1;0<=i;i--)-1!==this.items.indexOf(hash_key(result.items[i].id))&&result.items.splice(i,1);return result},refreshOptions:function(triggerDropdown){void 0===triggerDropdown&&(triggerDropdown=!0);var i,j,k,groups,groups_order,option,option_html,optgroup,optgroups,html,html_children,has_create_option,$active,$create,d,tmp,self=this,query=self.$control_input.val().trim(),results=self.search(query),$dropdown_content=self.$dropdown_content,active_before=self.$activeOption&&hash_key(self.$activeOption.attr("data-value")),n=results.items.length;for("number"==typeof self.settings.maxOptions&&(n=Math.min(n,self.settings.maxOptions)),groups={},groups_order=[],i=0;i<n;i++)for(option=self.options[results.items[i].id],option_html=self.render("option",option),optgroup=option[self.settings.optgroupField]||"",j=0,k=(optgroups=Array.isArray(optgroup)?optgroup:[optgroup])&&optgroups.length;j<k;j++)optgroup=optgroups[j],self.optgroups.hasOwnProperty(optgroup)||(optgroup=""),groups.hasOwnProperty(optgroup)||(groups[optgroup]=document.createDocumentFragment(),groups_order.push(optgroup)),groups[optgroup].appendChild(option_html);for(this.settings.lockOptgroupOrder&&groups_order.sort(function(a,b){return(self.optgroups[a]&&self.optgroups[a].$order||0)-(self.optgroups[b]&&self.optgroups[b].$order||0)}),html=document.createDocumentFragment(),i=0,n=groups_order.length;i<n;i++)optgroup=groups_order[i],self.optgroups.hasOwnProperty(optgroup)&&groups[optgroup].childNodes.length?((html_children=document.createDocumentFragment()).appendChild(self.render("optgroup_header",self.optgroups[optgroup])),html_children.appendChild(groups[optgroup]),html.appendChild(self.render("optgroup",$.extend({},self.optgroups[optgroup],{html:(d=html_children,tmp=void 0,(tmp=document.createElement("div")).appendChild(d.cloneNode(!0)),tmp.innerHTML),dom:html_children})))):html.appendChild(groups[optgroup]);if($dropdown_content.html(html),self.settings.highlight&&($dropdown_content.removeHighlight(),results.query.length&&results.tokens.length))for(i=0,n=results.tokens.length;i<n;i++)!function($element,pattern){var regex,highlight;if("string"!=typeof pattern||pattern.length)regex="string"==typeof pattern?new RegExp(pattern,"i"):pattern,highlight=function(node){var skip=0;if(3===node.nodeType){var spannode,match,pos=node.data.search(regex);0<=pos&&0<node.data.length&&(match=node.data.match(regex),(spannode=document.createElement("span")).className="highlight",(pos=node.splitText(pos)).splitText(match[0].length),match=pos.cloneNode(!0),spannode.appendChild(match),pos.parentNode.replaceChild(spannode,pos),skip=1)}else if(1===node.nodeType&&node.childNodes&&!/(script|style)/i.test(node.tagName)&&("highlight"!==node.className||"SPAN"!==node.tagName))for(var i=0;i<node.childNodes.length;++i)i+=highlight(node.childNodes[i]);return skip},$element.each(function(){highlight(this)})}($dropdown_content,results.tokens[i].regex);if(!self.settings.hideSelected)for(self.$dropdown.find(".selected").removeClass("selected"),i=0,n=self.items.length;i<n;i++)self.getOption(self.items[i]).addClass("selected");(has_create_option=self.canCreate(query))&&self.settings.showAddOptionOnCreate&&($dropdown_content.prepend(self.render("option_create",{input:query})),$create=$($dropdown_content[0].childNodes[0])),self.hasOptions=0<results.items.length||has_create_option&&self.settings.showAddOptionOnCreate||self.settings.setFirstOptionActive,self.hasOptions?(0<results.items.length?(query=active_before&&self.getOption(active_before),""!==results.query&&self.settings.setFirstOptionActive?$active=$dropdown_content.find("[data-selectable]:first"):""!==results.query&&query&&query.length?$active=query:"single"===self.settings.mode&&self.items.length&&($active=self.getOption(self.items[0])),$active&&$active.length||($active=$create&&!self.settings.addPrecedence?self.getAdjacentOption($create,1):$dropdown_content.find("[data-selectable]:first"))):$active=$create,self.setActiveOption($active),triggerDropdown&&!self.isOpen&&self.open()):(self.setActiveOption(null),triggerDropdown&&self.isOpen&&self.close())},addOption:function(data){var i,n,value;if(Array.isArray(data))for(i=0,n=data.length;i<n;i++)this.addOption(data[i]);else(value=this.registerOption(data))&&(this.userOptions[value]=!0,this.lastQuery=null,this.trigger("option_add",value,data))},registerOption:function(data){var key=hash_key(data[this.settings.valueField]);return null!=key&&!this.options.hasOwnProperty(key)&&(data.$order=data.$order||++this.order,this.options[key]=data,key)},registerOptionGroup:function(data){var key=hash_key(data[this.settings.optgroupValueField]);return!!key&&(data.$order=data.$order||++this.order,this.optgroups[key]=data,key)},addOptionGroup:function(id,data){data[this.settings.optgroupValueField]=id,(id=this.registerOptionGroup(data))&&this.trigger("optgroup_add",id,data)},removeOptionGroup:function(id){this.optgroups.hasOwnProperty(id)&&(delete this.optgroups[id],this.renderCache={},this.trigger("optgroup_remove",id))},clearOptionGroups:function(){this.optgroups={},this.renderCache={},this.trigger("optgroup_clear")},updateOption:function(value,data){var value_new,index_item,order_old;if(value=hash_key(value),value_new=hash_key(data[this.settings.valueField]),null!==value&&this.options.hasOwnProperty(value)){if("string"!=typeof value_new)throw new Error("Value must be set in option data");order_old=this.options[value].$order,value_new!==value&&(delete this.options[value],-1!==(index_item=this.items.indexOf(value))&&this.items.splice(index_item,1,value_new)),data.$order=data.$order||order_old,this.options[value_new]=data,index_item=this.renderCache.item,order_old=this.renderCache.option,index_item&&(delete index_item[value],delete index_item[value_new]),order_old&&(delete order_old[value],delete order_old[value_new]),-1!==this.items.indexOf(value_new)&&(index_item=this.getItem(value),order_old=$(this.render("item",data)),index_item.hasClass("active")&&order_old.addClass("active"),index_item.replaceWith(order_old)),this.lastQuery=null,this.isOpen&&this.refreshOptions(!1)}},removeOption:function(value,silent){value=hash_key(value);var cache_items=this.renderCache.item,cache_options=this.renderCache.option;cache_items&&delete cache_items[value],cache_options&&delete cache_options[value],delete this.userOptions[value],delete this.options[value],this.lastQuery=null,this.trigger("option_remove",value),this.removeItem(value,silent)},clearOptions:function(silent){var self=this,options=(self.loadedSearches={},self.userOptions={},self.renderCache={},self.options);$.each(self.options,function(key,value){-1==self.items.indexOf(key)&&delete options[key]}),self.options=self.sifter.items=options,self.lastQuery=null,self.trigger("option_clear"),self.clear(silent)},getOption:function(value){return this.getElementWithValue(value,this.$dropdown_content.find("[data-selectable]"))},getFirstOption:function(){var $options=this.$dropdown.find("[data-selectable]");return 0<$options.length?$options.eq(0):$()},getAdjacentOption:function($option,direction){var $options=this.$dropdown.find("[data-selectable]"),$option=$options.index($option)+direction;return 0<=$option&&$option<$options.length?$options.eq($option):$()},getElementWithValue:function(value,$els){if(null!=(value=hash_key(value)))for(var i=0,n=$els.length;i<n;i++)if($els[i].getAttribute("data-value")===value)return $($els[i]);return $()},getElementWithTextContent:function(textContent,ignoreCase,$els){if(null!=(textContent=hash_key(textContent)))for(var i=0,n=$els.length;i<n;i++){var eleTextContent=$els[i].textContent;if(1==ignoreCase&&(eleTextContent=null!==eleTextContent?eleTextContent.toLowerCase():null,textContent=textContent.toLowerCase()),eleTextContent===textContent)return $($els[i])}return $()},getItem:function(value){return this.getElementWithValue(value,this.$control.children())},getFirstItemMatchedByTextContent:function(textContent,ignoreCase){return this.getElementWithTextContent(textContent,ignoreCase=null!==ignoreCase&&!0===ignoreCase,this.$dropdown_content.find("[data-selectable]"))},addItems:function(values,silent){this.buffer=document.createDocumentFragment();for(var childNodes=this.$control[0].childNodes,i=0;i<childNodes.length;i++)this.buffer.appendChild(childNodes[i]);for(var items=Array.isArray(values)?values:[values],i=0,n=items.length;i<n;i++)this.isPending=i<n-1,this.addItem(items[i],silent);values=this.$control[0];values.insertBefore(this.buffer,values.firstChild),this.buffer=null},addItem:function(value,silent){debounce_events(this,silent?[]:["change"],function(){var $item,$option,wasFull,inputMode=this.settings.mode;value=hash_key(value),-1!==this.items.indexOf(value)?"single"===inputMode&&this.close():this.options.hasOwnProperty(value)&&("single"===inputMode&&this.clear(silent),"multi"===inputMode&&this.isFull()||($item=$(this.render("item",this.options[value])),wasFull=this.isFull(),this.items.splice(this.caretPos,0,value),this.insertAtCaret($item),this.isPending&&(wasFull||!this.isFull())||this.refreshState(),this.isSetup&&(wasFull=this.$dropdown_content.find("[data-selectable]"),this.isPending||($option=this.getOption(value),$option=this.getAdjacentOption($option,1).attr("data-value"),this.refreshOptions(this.isFocused&&"single"!==inputMode),$option&&this.setActiveOption(this.getOption($option))),!wasFull.length||this.isFull()?this.close():this.isPending||this.positionDropdown(),this.updatePlaceholder(),this.trigger("item_add",value,$item),this.isPending||this.updateOriginalInput({silent:silent}))))})},removeItem:function(value,silent){var i,idx,$item=value instanceof $?value:this.getItem(value);value=hash_key($item.attr("data-value")),-1!==(i=this.items.indexOf(value))&&(this.trigger("item_before_remove",value,$item),$item.remove(),$item.hasClass("active")&&(idx=this.$activeItems.indexOf($item[0]),this.$activeItems.splice(idx,1)),this.items.splice(i,1),this.lastQuery=null,!this.settings.persist&&this.userOptions.hasOwnProperty(value)&&this.removeOption(value,silent),i<this.caretPos&&this.setCaret(this.caretPos-1),this.refreshState(),this.updatePlaceholder(),this.updateOriginalInput({silent:silent}),this.positionDropdown(),this.trigger("item_remove",value,$item))},createItem:function(input,triggerDropdown){var self=this,caret=self.caretPos,callback=(input=input||(self.$control_input.val()||"").trim(),arguments[arguments.length-1]);if("function"!=typeof callback&&(callback=function(){}),"boolean"!=typeof triggerDropdown&&(triggerDropdown=!0),!self.canCreate(input))return callback(),!1;self.lock();var fn,called,setup="function"==typeof self.settings.create?this.settings.create:function(input){var data={},input=data[self.settings.labelField]=input;if(!self.settings.formatValueToKey||"function"!=typeof self.settings.formatValueToKey||null!=(input=self.settings.formatValueToKey.apply(this,[input]))&&"object"!=typeof input&&"function"!=typeof input)return data[self.settings.valueField]=input,data;throw new Error('Selectize "formatValueToKey" setting must be a function that returns a value other than object or function.')},create=(called=!(fn=function(data){return self.unlock(),!data||"object"!=typeof data||"string"!=typeof(value=hash_key(data[self.settings.valueField]))?callback():(self.setTextboxValue(""),self.addOption(data),self.setCaret(caret),self.addItem(value),self.refreshOptions(triggerDropdown&&"single"!==self.settings.mode),void callback(data));var value}),function(){called||(called=!0,fn.apply(this,arguments))}),setup=setup.apply(this,[input,create]);return void 0!==setup&&create(setup),!0},refreshItems:function(){this.lastQuery=null,this.isSetup&&this.addItem(this.items),this.refreshState(),this.updateOriginalInput()},refreshState:function(){this.refreshValidityState(),this.refreshClasses()},refreshValidityState:function(){if(!this.isRequired)return!1;var invalid=!this.items.length;this.isInvalid=invalid,this.$control_input.prop("required",invalid),this.$input.prop("required",!invalid)},refreshClasses:function(){var isFull=this.isFull(),isLocked=this.isLocked;this.$wrapper.toggleClass("rtl",this.rtl),this.$control.toggleClass("focus",this.isFocused).toggleClass("disabled",this.isDisabled).toggleClass("required",this.isRequired).toggleClass("invalid",this.isInvalid).toggleClass("locked",isLocked).toggleClass("full",isFull).toggleClass("not-full",!isFull).toggleClass("input-active",this.isFocused&&!this.isInputHidden).toggleClass("dropdown-active",this.isOpen).toggleClass("has-options",!$.isEmptyObject(this.options)).toggleClass("has-items",0<this.items.length),this.$control_input.data("grow",!isFull&&!isLocked)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(opts){var i,n,options,label;if(opts=opts||{},1===this.tagType){for(options=[],i=0,n=this.items.length;i<n;i++)label=this.options[this.items[i]][this.settings.labelField]||"",options.push('<option value="'+escape_html(this.items[i])+'" selected="selected">'+escape_html(label)+"</option>");options.length||this.$input.attr("multiple")||options.push('<option value="" selected="selected"></option>'),this.$input.html(options.join(""))}else this.$input.val(this.getValue()),this.$input.attr("value",this.$input.val());this.isSetup&&!opts.silent&&this.trigger("change",this.$input.val())},updatePlaceholder:function(){var $input;this.settings.placeholder&&($input=this.$control_input,this.items.length?$input.removeAttr("placeholder"):$input.attr("placeholder",this.settings.placeholder),$input.triggerHandler("update",{force:!0}))},open:function(){this.isLocked||this.isOpen||"multi"===this.settings.mode&&this.isFull()||this.$control_input.is(":invalid")||(this.focus(),this.isOpen=!0,this.refreshState(),this.$dropdown.css({visibility:"hidden",display:"block"}),this.setupDropdownHeight(),this.positionDropdown(),this.$dropdown.css({visibility:"visible"}),this.trigger("dropdown_open",this.$dropdown))},close:function(){var trigger=this.isOpen;"single"===this.settings.mode&&this.items.length&&(this.hideInput(),this.isBlurring&&this.$control_input[0].blur()),this.isOpen=!1,this.$dropdown.hide(),this.setActiveOption(null),this.refreshState(),trigger&&this.trigger("dropdown_close",this.$dropdown)},positionDropdown:function(){var $control=this.$control,offset="body"===this.settings.dropdownParent?$control.offset():$control.position(),$control=(offset.top+=$control.outerHeight(!0),$control[0].getBoundingClientRect().width);this.settings.minWidth&&this.settings.minWidth>$control&&($control=this.settings.minWidth),this.$dropdown.css({width:$control,top:offset.top,left:offset.left})},setupDropdownHeight:function(){var totalHeight,$items,height;"object"==typeof this.settings.dropdownSize&&"auto"!==this.settings.dropdownSize.sizeType&&(height=this.settings.dropdownSize.sizeValue,"numberItems"===this.settings.dropdownSize.sizeType&&($items=this.$dropdown_content.children(),totalHeight=0,$items.each(function(i,$item){if(i===height)return!1;totalHeight+=$($item).outerHeight(!0)}),$items=this.$dropdown_content.css("padding-top")?this.$dropdown_content.css("padding-top").replace(/\W*(\w)\w*/g,"$1"):0,height=totalHeight-$items+"px"),this.$dropdown_content.css({height:height,maxHeight:"none"}))},clear:function(silent){this.items.length&&(this.$control.children(":not(input)").remove(),this.items=[],this.lastQuery=null,this.setCaret(0),this.setActiveItem(null),this.updatePlaceholder(),this.updateOriginalInput({silent:silent}),this.refreshState(),this.showInput(),this.trigger("clear"))},insertAtCaret:function($el){var caret=Math.min(this.caretPos,this.items.length),$el=$el[0],target=this.buffer||this.$control[0];0===caret?target.insertBefore($el,target.firstChild):target.insertBefore($el,target.childNodes[caret]),this.setCaret(caret+1)},deleteSelection:function(e){var i,n,values,option_select,$tail,direction=e&&8===e.keyCode?-1:1,selection=getSelection(this.$control_input[0]);if(this.$activeOption&&!this.settings.hideSelected&&(option_select=("string"==typeof this.settings.deselectBehavior&&"top"===this.settings.deselectBehavior?this.getFirstOption():this.getAdjacentOption(this.$activeOption,-1)).attr("data-value")),values=[],this.$activeItems.length){for($tail=this.$control.children(".active:"+(0<direction?"last":"first")),$tail=this.$control.children(":not(input)").index($tail),0<direction&&$tail++,i=0,n=this.$activeItems.length;i<n;i++)values.push($(this.$activeItems[i]).attr("data-value"));e&&(e.preventDefault(),e.stopPropagation())}else(this.isFocused||"single"===this.settings.mode)&&this.items.length&&(direction<0&&0===selection.start&&0===selection.length?values.push(this.items[this.caretPos-1]):0<direction&&selection.start===this.$control_input.val().length&&values.push(this.items[this.caretPos]));if(!values.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete.apply(this,[values]))return!1;for(void 0!==$tail&&this.setCaret($tail);values.length;)this.removeItem(values.pop());return this.showInput(),this.positionDropdown(),this.refreshOptions(!0),option_select&&(e=this.getOption(option_select)).length&&this.setActiveOption(e),!0},advanceSelection:function(direction,e){var tail,valueLength,selection;0!==direction&&(this.rtl&&(direction*=-1),tail=0<direction?"last":"first",selection=getSelection(this.$control_input[0]),this.isFocused&&!this.isInputHidden?(valueLength=this.$control_input.val().length,(direction<0?0!==selection.start||0!==selection.length:selection.start!==valueLength)||valueLength||this.advanceCaret(direction,e)):(selection=this.$control.children(".active:"+tail)).length&&(valueLength=this.$control.children(":not(input)").index(selection),this.setActiveItem(null),this.setCaret(0<direction?valueLength+1:valueLength)))},advanceCaret:function(direction,e){var $adj;0!==direction&&(this.isShiftDown?($adj=this.$control_input[0<direction?"next":"prev"]()).length&&(this.hideInput(),this.setActiveItem($adj),e&&e.preventDefault()):this.setCaret(this.caretPos+direction))},setCaret:function(i){if(i="single"===this.settings.mode?this.items.length:Math.max(0,Math.min(this.items.length,i)),!this.isPending)for(var $child,$children=this.$control.children(":not(input)"),j=0,n=$children.length;j<n;j++)$child=$($children[j]).detach(),j<i?this.$control_input.before($child):this.$control.append($child);this.caretPos=i},lock:function(){this.close(),this.isLocked=!0,this.refreshState()},unlock:function(){this.isLocked=!1,this.refreshState()},disable:function(){this.$input.prop("disabled",!0),this.$control_input.prop("disabled",!0).prop("tabindex",-1),this.isDisabled=!0,this.lock()},enable:function(){this.$input.prop("disabled",!1),this.$control_input.prop("disabled",!1).prop("tabindex",this.tabIndex),this.isDisabled=!1,this.unlock()},destroy:function(){var eventNS=this.eventNS,revertSettings=this.revertSettings;this.trigger("destroy"),this.off(),this.$wrapper.remove(),this.$dropdown.remove(),this.$input.html("").append(revertSettings.$children).removeAttr("tabindex").removeClass("selectized").attr({tabindex:revertSettings.tabindex}).show(),this.$control_input.removeData("grow"),this.$input.removeData("selectize"),0==--Selectize.count&&Selectize.$testInput&&(Selectize.$testInput.remove(),Selectize.$testInput=void 0),$(window).off(eventNS),$(document).off(eventNS),$(document.body).off(eventNS),delete this.$input[0].selectize},render:function(templateName,data){var value,id,html="",cache=!1;return(cache="option"!==templateName&&"item"!==templateName?cache:!!(value=hash_key(data[this.settings.valueField])))&&(isset(this.renderCache[templateName])||(this.renderCache[templateName]={}),this.renderCache[templateName].hasOwnProperty(value))?this.renderCache[templateName][value]:(html=$(this.settings.render[templateName].apply(this,[data,escape_html])),"option"===templateName||"option_create"===templateName?data[this.settings.disabledField]||html.attr("data-selectable",""):"optgroup"===templateName&&(id=data[this.settings.optgroupValueField]||"",html.attr("data-group",id),data[this.settings.disabledField]&&html.attr("data-disabled","")),"option"!==templateName&&"item"!==templateName||html.attr("data-value",value||""),cache&&(this.renderCache[templateName][value]=html[0]),html[0])},clearCache:function(templateName){void 0===templateName?this.renderCache={}:delete this.renderCache[templateName]},canCreate:function(input){if(!this.settings.create)return!1;var filter=this.settings.createFilter;return input.length&&("function"!=typeof filter||filter.apply(this,[input]))&&("string"!=typeof filter||new RegExp(filter).test(input))&&(!(filter instanceof RegExp)||filter.test(input))}}),Selectize.count=0,Selectize.defaults={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:!1,showAddOptionOnCreate:!0,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,hideSelected:null,addPrecedence:!1,selectOnTab:!0,preload:!1,allowEmptyOption:!1,showEmptyOptionInDropdown:!1,emptyOptionLabel:"--",setFirstOptionActive:!1,closeAfterSelect:!1,closeDropdownThreshold:250,scrollDuration:60,deselectBehavior:"previous",loadThrottle:300,loadingClass:"loading",dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"selectize-control",inputClass:"selectize-input",dropdownClass:"selectize-dropdown",dropdownContentClass:"selectize-dropdown-content",dropdownParent:null,copyClassesToDropdown:!0,dropdownSize:{sizeType:"auto",sizeValue:"auto"},normalize:!1,render:{}},$.fn.selectize=function(settings_user){function init_select($input,settings_element){function addOption($option,group){$option=$($option);var arr,value=hash_key($option.val());(value||settings.allowEmptyOption)&&(optionsMap.hasOwnProperty(value)?group&&((arr=optionsMap[value][field_optgroup])?$.isArray(arr)?arr.push(group):optionsMap[value][field_optgroup]=[arr,group]:optionsMap[value][field_optgroup]=group):((arr=readData($option)||{})[field_label]=arr[field_label]||$option.text(),arr[field_value]=arr[field_value]||value,arr[field_disabled]=arr[field_disabled]||$option.prop("disabled"),arr[field_optgroup]=arr[field_optgroup]||group,optionsMap[value]=arr,options.push(arr),$option.is(":selected")&&settings_element.items.push(value)))}var i,n,tagName,$children,options=settings_element.options,optionsMap={},readData=function($el){$el=attr_data&&$el.attr(attr_data);return"string"==typeof $el&&$el.length?JSON.parse($el):null};for(settings_element.maxItems=$input.attr("multiple")?null:1,i=0,n=($children=$input.children()).length;i<n;i++)"optgroup"===(tagName=$children[i].tagName.toLowerCase())?function($optgroup){var i,n,id,optgroup,$options;for((id=($optgroup=$($optgroup)).attr("label"))&&((optgroup=readData($optgroup)||{})[field_optgroup_label]=id,optgroup[field_optgroup_value]=id,optgroup[field_disabled]=$optgroup.prop("disabled"),settings_element.optgroups.push(optgroup)),i=0,n=($options=$("option",$optgroup)).length;i<n;i++)addOption($options[i],id)}($children[i]):"option"===tagName&&addOption($children[i])}var defaults=$.fn.selectize.defaults,settings=$.extend({},defaults,settings_user),attr_data=settings.dataAttr,field_label=settings.labelField,field_value=settings.valueField,field_disabled=settings.disabledField,field_optgroup=settings.optgroupField,field_optgroup_label=settings.optgroupLabelField,field_optgroup_value=settings.optgroupValueField;return this.each(function(){var $input,tag_name,placeholder,input_html;this.selectize||($input=$(this),tag_name=this.tagName.toLowerCase(),(placeholder=$input.attr("placeholder")||$input.attr("data-placeholder"))||settings.allowEmptyOption||(placeholder=$input.children('option[value=""]').text()),settings.allowEmptyOption&&settings.showEmptyOptionInDropdown&&!$input.children('option[value=""]').length&&(input_html=$input.html(),$input.html('<option value="">'+settings.emptyOptionLabel+"</option>"+input_html)),("select"===tag_name?init_select:function($input,settings_element){var i,n,values,option,data_raw=$input.attr(attr_data);if(data_raw)for(settings_element.options=JSON.parse(data_raw),i=0,n=settings_element.options.length;i<n;i++)settings_element.items.push(settings_element.options[i][field_value]);else{data_raw=$.trim($input.val()||"");if(settings.allowEmptyOption||data_raw.length){for(i=0,n=(values=data_raw.split(settings.delimiter)).length;i<n;i++)(option={})[field_label]=values[i],option[field_value]=values[i],settings_element.options.push(option);settings_element.items=values}}})($input,input_html={placeholder:placeholder,options:[],optgroups:[],items:[]}),new Selectize($input,$.extend(!0,{},defaults,input_html,settings_user)).settings_user=settings_user)})},$.fn.selectize.defaults=Selectize.defaults,$.fn.selectize.support={validity:SUPPORTS_VALIDITY_API},Selectize.define("auto_position",function(){const POSITION={top:"top",bottom:"bottom"};this.positionDropdown=function(){const $control=this.$control,offset="body"===this.settings.dropdownParent?$control.offset():$control.position();offset.top+=$control.outerHeight(!0);var dropdownHeight=this.$dropdown.prop("scrollHeight")+5,dropdownHeight=this.$control.get(0).getBoundingClientRect().top+dropdownHeight+this.$wrapper.height()>window.innerHeight?POSITION.top:POSITION.bottom,styles={width:$control.outerWidth(),left:offset.left};dropdownHeight===POSITION.top?(Object.assign(styles,{bottom:offset.top,top:"unset",margin:"0 0 5px 0"}),this.$dropdown.addClass("selectize-position-top")):(Object.assign(styles,{top:offset.top,bottom:"unset",margin:"5px 0 0 0"}),this.$dropdown.removeClass("selectize-position-top")),this.$dropdown.css(styles)}}),Selectize.define("auto_select_on_type",function(options){var originalBlur,self=this;self.onBlur=(originalBlur=self.onBlur,function(e){var $matchedItem=self.getFirstItemMatchedByTextContent(self.lastValue,!0);return void 0!==$matchedItem.attr("data-value")&&self.getValue()!==$matchedItem.attr("data-value")&&self.setValue($matchedItem.attr("data-value")),originalBlur.apply(this,arguments)})}),Selectize.define("autofill_disable",function(options){var original,self=this;self.setup=(original=self.setup,function(){original.apply(self,arguments),self.$control_input.attr({autocomplete:"new-password",autofill:"no"})})}),Selectize.define("clear_button",function(options){var original,self=this;options=$.extend({title:"Clear",className:"clear",label:"×",html:function(data){return'<a class="'+data.className+'" title="'+data.title+'"> '+data.label+"</a>"}},options),self.setup=(original=self.setup,function(){original.apply(self,arguments),self.$button_clear=$(options.html(options)),"single"===self.settings.mode&&self.$wrapper.addClass("single"),self.$wrapper.append(self.$button_clear),""!==self.getValue()&&0!==self.getValue().length||self.$wrapper.find("."+options.className).css("display","none"),self.on("change",function(){""!==self.getValue()||0===self.getValue().length?self.$wrapper.find("."+options.className).css("display",""):self.$wrapper.find("."+options.className).css("display","none")}),self.$wrapper.on("click","."+options.className,function(e){e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),self.isLocked||(self.clear(),self.$wrapper.find("."+options.className).css("display","none"))})})}),Selectize.define("drag_drop",function(options){if(!$.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');var self,original;"multi"===this.settings.mode&&((self=this).lock=(original=self.lock,function(){var sortable=self.$control.data("sortable");return sortable&&sortable.disable(),original.apply(self,arguments)}),self.unlock=function(){var original=self.unlock;return function(){var sortable=self.$control.data("sortable");return sortable&&sortable.enable(),original.apply(self,arguments)}}(),self.setup=function(){var original=self.setup;return function(){original.apply(this,arguments);var $control=self.$control.sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:self.isLocked,start:function(e,ui){ui.placeholder.css("width",ui.helper.css("width")),$control.addClass("dragging")},stop:function(){$control.removeClass("dragging");var active=self.$activeItems?self.$activeItems.slice():null,values=[];$control.children("[data-value]").each(function(){values.push($(this).attr("data-value"))}),self.isFocused=!1,self.setValue(values),self.isFocused=!0,self.setActiveItem(active),self.positionDropdown()}})}}())}),Selectize.define("dropdown_header",function(options){var original,self=this;options=$.extend({title:"Untitled",headerClass:"selectize-dropdown-header",titleRowClass:"selectize-dropdown-header-title",labelClass:"selectize-dropdown-header-label",closeClass:"selectize-dropdown-header-close",html:function(data){return'<div class="'+data.headerClass+'"><div class="'+data.titleRowClass+'"><span class="'+data.labelClass+'">'+data.title+'</span><a href="javascript:void(0)" class="'+data.closeClass+'">×</a></div></div>'}},options),self.setup=(original=self.setup,function(){original.apply(self,arguments),self.$dropdown_header=$(options.html(options)),self.$dropdown.prepend(self.$dropdown_header)})}),Selectize.define("optgroup_columns",function(options){function equalizeSizes(){var i,height_max,width,width_parent,$optgroups=$("[data-group]",self.$dropdown_content),n=$optgroups.length;if(n&&self.$dropdown_content.width()){if(options.equalizeHeight){for(i=height_max=0;i<n;i++)height_max=Math.max(height_max,$optgroups.eq(i).height());$optgroups.css({height:height_max})}options.equalizeWidth&&(width_parent=self.$dropdown_content.innerWidth()-getScrollbarWidth(),width=Math.round(width_parent/n),$optgroups.css({width:width}),1<n&&(width_parent=width_parent-width*(n-1),$optgroups.eq(n-1).css({width:width_parent})))}}var original,self=this,getScrollbarWidth=(options=$.extend({equalizeWidth:!0,equalizeHeight:!0},options),this.getAdjacentOption=function($option,direction){var $options=$option.closest("[data-group]").find("[data-selectable]"),$option=$options.index($option)+direction;return 0<=$option&&$option<$options.length?$options.eq($option):$()},this.onKeyDown=(original=self.onKeyDown,function(e){var index,$optgroup;if(!this.isOpen||37!==e.keyCode&&39!==e.keyCode)return original.apply(this,arguments);self.ignoreHover=!0,index=($optgroup=this.$activeOption.closest("[data-group]")).find("[data-selectable]").index(this.$activeOption),($optgroup=(e=($optgroup=37===e.keyCode?$optgroup.prev("[data-group]"):$optgroup.next("[data-group]")).find("[data-selectable]")).eq(Math.min(e.length-1,index))).length&&this.setActiveOption($optgroup)}),function(){var div,width=getScrollbarWidth.width,doc=document;return void 0===width&&((div=doc.createElement("div")).innerHTML='<div style="width:50px;height:50px;position:absolute;left:-50px;top:-50px;overflow:auto;"><div style="width:1px;height:100px;"></div></div>',div=div.firstChild,doc.body.appendChild(div),width=getScrollbarWidth.width=div.offsetWidth-div.clientWidth,doc.body.removeChild(div)),width});(options.equalizeHeight||options.equalizeWidth)&&(hook.after(this,"positionDropdown",equalizeSizes),hook.after(this,"refreshOptions",equalizeSizes))}),Selectize.define("remove_button",function(options){options=$.extend({label:"×",title:"Remove",className:"remove",append:!0},options),("single"===this.settings.mode?function(thisRef,options){options.className="remove-single";var original,self=thisRef,html='<a href="javascript:void(0)" class="'+options.className+'" tabindex="-1" title="'+escape_html(options.title)+'">'+options.label+"</a>";thisRef.setup=(original=self.setup,function(){var id,render_item;options.append&&(id=$(self.$input.context).attr("id"),$("#"+id),render_item=self.settings.render.item,self.settings.render.item=function(data){return html_container=render_item.apply(thisRef,arguments),html_element=html,$("<span>").append(html_container).append(html_element);var html_container,html_element}),original.apply(thisRef,arguments),thisRef.$control.on("click","."+options.className,function(e){e.preventDefault(),self.isLocked||self.clear()})})}:function(thisRef,options){var original,self=thisRef,html='<a href="javascript:void(0)" class="'+options.className+'" tabindex="-1" title="'+escape_html(options.title)+'">'+options.label+"</a>";thisRef.setup=(original=self.setup,function(){var render_item;options.append&&(render_item=self.settings.render.item,self.settings.render.item=function(data){return html_container=render_item.apply(thisRef,arguments),html_element=html,pos=html_container.search(/(<\/[^>]+>\s*)$/),html_container.substring(0,pos)+html_element+html_container.substring(pos);var html_container,html_element,pos}),original.apply(thisRef,arguments),thisRef.$control.on("click","."+options.className,function(e){if(e.preventDefault(),!self.isLocked)return e=$(e.currentTarget).parent(),self.setActiveItem(e),self.deleteSelection()&&self.setCaret(self.items.length),!1})})})(this,options)}),Selectize.define("restore_on_backspace",function(options){var original,self=this;options.text=options.text||function(option){return option[this.settings.labelField]},this.onKeyDown=(original=self.onKeyDown,function(e){var index;return 8===e.keyCode&&""===this.$control_input.val()&&!this.$activeItems.length&&0<=(index=this.caretPos-1)&&index<this.items.length?(index=this.options[this.items[index]],this.deleteSelection(e)&&(this.setTextboxValue(options.text.apply(this,[index])),this.refreshOptions(!0)),void e.preventDefault()):original.apply(this,arguments)})}),Selectize.define("select_on_focus",function(options){var originalFocus,originalBlur,self=this;self.on("focus",(originalFocus=self.onFocus,function(e){var value=self.getItem(self.getValue()).text();return self.clear(),self.setTextboxValue(value),self.$control_input.select(),setTimeout(function(){self.settings.selectOnTab&&self.setActiveOption(self.getFirstItemMatchedByTextContent(value)),self.settings.score=null},0),originalFocus.apply(this,arguments)})),self.onBlur=(originalBlur=self.onBlur,function(e){return""===self.getValue()&&self.lastValidValue!==self.getValue()&&self.setValue(self.lastValidValue),setTimeout(function(){self.settings.score=function(){return function(){return 1}}},0),originalBlur.apply(this,arguments)}),self.settings.score=function(){return function(){return 1}}}),Selectize.define("tag_limit",function(options){const self=this;options.tagLimit=options.tagLimit,this.onBlur=function(){const original=self.onBlur;return function(e){if(original.apply(this,e),e){const $control=this.$control,$items=$control.find(".item"),limit=options.tagLimit;void 0===limit||$items.length<=limit||($items.toArray().forEach(function(item,index){index<limit||$(item).hide()}),$control.append("<span><b>"+($items.length-limit)+"</b></span>"))}}}(),this.onFocus=function(){const original=self.onFocus;return function(e){if(original.apply(this,e),e){const $control=this.$control,$items=$control.find(".item");$items.show(),$control.find("span").remove()}}}()}),Selectize});
|
lib/jeg-element/includes/class/elementor/class-elementor-abstract.php
CHANGED
@@ -23,506 +23,506 @@ use Jeg\Element\Elements\Elements_Option_Abstract;
|
|
23 |
* @package Jeg\Element\Widget
|
24 |
*/
|
25 |
abstract class Elementor_Abstract extends Widget_Base {
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
}
|
480 |
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
}
|
23 |
* @package Jeg\Element\Widget
|
24 |
*/
|
25 |
abstract class Elementor_Abstract extends Widget_Base {
|
26 |
+
/**
|
27 |
+
* Get element name.
|
28 |
+
*
|
29 |
+
* @return string
|
30 |
+
*/
|
31 |
+
public function get_name() {
|
32 |
+
return $this->get_elementor_id();
|
33 |
+
}
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Get ID of this widget
|
37 |
+
*
|
38 |
+
* @return string
|
39 |
+
*/
|
40 |
+
abstract public function get_elementor_id();
|
41 |
+
|
42 |
+
/**
|
43 |
+
* Get widget icon.
|
44 |
+
*
|
45 |
+
* @return string Widget icon.
|
46 |
+
*/
|
47 |
+
public function get_icon() {
|
48 |
+
return $this->get_elementor_id();
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Get element title.
|
53 |
+
*
|
54 |
+
* @return string Element title.
|
55 |
+
*/
|
56 |
+
public function get_title() {
|
57 |
+
return $this->get_option_instance()->get_element_name();
|
58 |
+
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Get Element Option Instance
|
62 |
+
*
|
63 |
+
* @return Elements_Option_Abstract
|
64 |
+
*/
|
65 |
+
public function get_option_instance() {
|
66 |
+
return Element::instance()->manager->get_element_option( $this->get_elementor_id() );
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Get widget categories.
|
71 |
+
*
|
72 |
+
* @return array Widget categories.
|
73 |
+
*/
|
74 |
+
public function get_categories() {
|
75 |
+
$category = $this->get_option_instance()->get_category();
|
76 |
+
|
77 |
+
return array( jeg_slug_category( $category ) );
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Whether the reload preview is required.
|
82 |
+
*
|
83 |
+
* @return bool Whether the reload preview is required.
|
84 |
+
*/
|
85 |
+
public function is_reload_preview_required() {
|
86 |
+
return true;
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Register controls.
|
91 |
+
*
|
92 |
+
* @access protected
|
93 |
+
*/
|
94 |
+
protected function register_controls() {
|
95 |
+
$instance = $this->get_option_instance();
|
96 |
+
$this->build_option( $instance->get_segments(), $instance->get_options() );
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Build Element Option for Elementor
|
101 |
+
*
|
102 |
+
* @param array $segments Collection of group / segment.
|
103 |
+
* @param array $options Collection of control field.
|
104 |
+
*/
|
105 |
+
public function build_option( $segments, $options ) {
|
106 |
+
$segments = jeg_sort_segment( $segments );
|
107 |
+
|
108 |
+
foreach ( $segments as $segment ) {
|
109 |
+
if ( 'design' === $segment['id'] ) {
|
110 |
+
$section = array(
|
111 |
+
'label' => esc_html__( 'Style', 'jeg-elementor-kit' ),
|
112 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
113 |
+
);
|
114 |
+
} elseif ( 'content-filter' === $segment['id'] ) {
|
115 |
+
$section = array(
|
116 |
+
'label' => esc_html__( 'Setting', 'jeg-elementor-kit' ),
|
117 |
+
'tab' => Controls_Manager::TAB_CONTENT,
|
118 |
+
);
|
119 |
+
} else {
|
120 |
+
$section = array(
|
121 |
+
'label' => $segment['name'],
|
122 |
+
'tab' => Controls_Manager::TAB_CONTENT,
|
123 |
+
);
|
124 |
+
}
|
125 |
+
|
126 |
+
$this->start_controls_section( $segment['id'], $section );
|
127 |
+
$this->parse_control_option( $options, $segment['id'] );
|
128 |
+
$this->parse_typography_control_option( $segment['id'] );
|
129 |
+
$this->end_controls_section();
|
130 |
+
}
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Create control
|
135 |
+
*
|
136 |
+
* @param array $options Collection of control field.
|
137 |
+
* @param string $segment Segment ID.
|
138 |
+
* @param bool $repeater_options Repeater Check.
|
139 |
+
*/
|
140 |
+
public function parse_control_option( $options, $segment, $repeater_options = false ) {
|
141 |
+
$repeater = new Repeater();
|
142 |
+
|
143 |
+
foreach ( $options as $id => $option ) {
|
144 |
+
if ( $option['segment'] === $segment ) {
|
145 |
+
switch ( $option['type'] ) {
|
146 |
+
case 'textarea':
|
147 |
+
$args = array(
|
148 |
+
'label' => $option['title'],
|
149 |
+
'type' => Controls_Manager::TEXTAREA,
|
150 |
+
'default' => isset( $option['default'] ) ? $option['default'] : 0,
|
151 |
+
'label_block' => true,
|
152 |
+
'condition' => isset( $option['dependency'] ) ? $this->parse_dependency_option( $option['dependency'] ) : '',
|
153 |
+
'description' => isset( $option['description'] ) ? $option['description'] : '',
|
154 |
+
);
|
155 |
+
|
156 |
+
if ( $repeater_options ) {
|
157 |
+
$repeater->add_control( $id, $args );
|
158 |
+
} else {
|
159 |
+
$this->add_control( $id, $args );
|
160 |
+
}
|
161 |
+
|
162 |
+
break;
|
163 |
+
case 'color':
|
164 |
+
$args = array(
|
165 |
+
'label' => $option['title'],
|
166 |
+
'type' => Controls_Manager::COLOR,
|
167 |
+
'default' => isset( $option['default'] ) ? $option['default'] : '',
|
168 |
+
'condition' => isset( $option['dependency'] ) ? $this->parse_dependency_option( $option['dependency'] ) : '',
|
169 |
+
'description' => isset( $option['description'] ) ? $option['description'] : '',
|
170 |
+
);
|
171 |
+
|
172 |
+
if ( $repeater_options ) {
|
173 |
+
$repeater->add_control( $id, $args );
|
174 |
+
} else {
|
175 |
+
$this->add_control( $id, $args );
|
176 |
+
}
|
177 |
+
|
178 |
+
break;
|
179 |
+
case 'radioimage':
|
180 |
+
// Todo: need to test.
|
181 |
+
$args = array(
|
182 |
+
'label' => $option['title'],
|
183 |
+
'type' => Controls_Manager::CHOOSE,
|
184 |
+
'default' => isset( $option['default'] ) ? $option['default'] : '',
|
185 |
+
'options' => $this->parse_radioimage_option( $option['options'], $id ),
|
186 |
+
'label_block' => true,
|
187 |
+
'condition' => isset( $option['dependency'] ) ? $this->parse_dependency_option( $option['dependency'] ) : '',
|
188 |
+
'description' => isset( $option['description'] ) ? $option['description'] : '',
|
189 |
+
);
|
190 |
+
|
191 |
+
if ( $repeater_options ) {
|
192 |
+
$repeater->add_control( $id, $args );
|
193 |
+
} else {
|
194 |
+
$this->add_control( $id, $args );
|
195 |
+
}
|
196 |
+
|
197 |
+
break;
|
198 |
+
case 'image':
|
199 |
+
case 'attach_image':
|
200 |
+
$multiple = isset( $option['multiple'] ) ? $option['multiple'] : 1;
|
201 |
+
|
202 |
+
if ( 1 === $multiple ) {
|
203 |
+
$args = array(
|
204 |
+
'label' => $option['title'],
|
205 |
+
'type' => Controls_Manager::MEDIA,
|
206 |
+
'default' => array(
|
207 |
+
'url' => isset( $option['default'] ) ? $option['default'] : '',
|
208 |
+
),
|
209 |
+
'label_block' => true,
|
210 |
+
'condition' => isset( $option['dependency'] ) ? $this->parse_dependency_option( $option['dependency'] ) : '',
|
211 |
+
'description' => isset( $option['description'] ) ? $option['description'] : '',
|
212 |
+
);
|
213 |
+
} else {
|
214 |
+
$args = array(
|
215 |
+
'label' => $option['title'],
|
216 |
+
'type' => Controls_Manager::GALLERY,
|
217 |
+
'default' => isset( $option['default'] ) ? $option['default'] : array(),
|
218 |
+
'label_block' => true,
|
219 |
+
'condition' => isset( $option['dependency'] ) ? $this->parse_dependency_option( $option['dependency'] ) : '',
|
220 |
+
'description' => isset( $option['description'] ) ? $option['description'] : '',
|
221 |
+
);
|
222 |
+
}
|
223 |
+
|
224 |
+
if ( $repeater_options ) {
|
225 |
+
$repeater->add_control( $id, $args );
|
226 |
+
} else {
|
227 |
+
$this->add_control( $id, $args );
|
228 |
+
}
|
229 |
+
|
230 |
+
break;
|
231 |
+
case 'checkbox':
|
232 |
+
$default = isset( $option['default'] ) ? $option['default'] : 0;
|
233 |
+
|
234 |
+
if ( $default ) {
|
235 |
+
$default = 'yes';
|
236 |
+
}
|
237 |
+
|
238 |
+
$args = array(
|
239 |
+
'label' => $option['title'],
|
240 |
+
'type' => Controls_Manager::SWITCHER,
|
241 |
+
'default' => $default,
|
242 |
+
'condition' => isset( $option['dependency'] ) ? $this->parse_dependency_option( $option['dependency'] ) : '',
|
243 |
+
'description' => isset( $option['description'] ) ? $option['description'] : '',
|
244 |
+
);
|
245 |
+
|
246 |
+
if ( $repeater_options ) {
|
247 |
+
$repeater->add_control( $id, $args );
|
248 |
+
} else {
|
249 |
+
$this->add_control( $id, $args );
|
250 |
+
}
|
251 |
+
|
252 |
+
break;
|
253 |
+
case 'slider':
|
254 |
+
$args = array(
|
255 |
+
'label' => $option['title'],
|
256 |
+
'type' => Controls_Manager::SLIDER,
|
257 |
+
'default' => array(
|
258 |
+
'size' => isset( $option['default'] ) ? $option['default'] : 0,
|
259 |
+
),
|
260 |
+
'range' => array(
|
261 |
+
'px' => array(
|
262 |
+
'min' => $option['options']['min'],
|
263 |
+
'max' => $option['options']['max'],
|
264 |
+
'step' => $option['options']['step'],
|
265 |
+
),
|
266 |
+
),
|
267 |
+
'condition' => isset( $option['dependency'] ) ? $this->parse_dependency_option( $option['dependency'] ) : '',
|
268 |
+
'description' => isset( $option['description'] ) ? $option['description'] : '',
|
269 |
+
);
|
270 |
+
|
271 |
+
if ( $repeater_options ) {
|
272 |
+
$repeater->add_control( $id, $args );
|
273 |
+
} else {
|
274 |
+
$this->add_control( $id, $args );
|
275 |
+
}
|
276 |
+
|
277 |
+
break;
|
278 |
+
case 'number':
|
279 |
+
$args = array(
|
280 |
+
'label' => $option['title'],
|
281 |
+
'type' => Controls_Manager::NUMBER,
|
282 |
+
'default' => isset( $option['default'] ) ? $option['default'] : 0,
|
283 |
+
'min' => $option['options']['min'],
|
284 |
+
'max' => $option['options']['max'],
|
285 |
+
'step' => $option['options']['step'],
|
286 |
+
'label_block' => true,
|
287 |
+
'condition' => isset( $option['dependency'] ) ? $this->parse_dependency_option( $option['dependency'] ) : '',
|
288 |
+
'description' => isset( $option['description'] ) ? $option['description'] : '',
|
289 |
+
);
|
290 |
+
|
291 |
+
if ( $repeater_options ) {
|
292 |
+
$repeater->add_control( $id, $args );
|
293 |
+
} else {
|
294 |
+
$this->add_control( $id, $args );
|
295 |
+
}
|
296 |
+
|
297 |
+
break;
|
298 |
+
case 'html':
|
299 |
+
$args = array(
|
300 |
+
'label' => $option['title'],
|
301 |
+
'type' => Controls_Manager::CODE,
|
302 |
+
'default' => isset( $option['default'] ) ? $option['default'] : '',
|
303 |
+
'language' => 'html',
|
304 |
+
'label_block' => true,
|
305 |
+
'condition' => isset( $option['dependency'] ) ? $this->parse_dependency_option( $option['dependency'] ) : '',
|
306 |
+
'description' => isset( $option['description'] ) ? $option['description'] : '',
|
307 |
+
);
|
308 |
+
|
309 |
+
if ( $repeater_options ) {
|
310 |
+
$repeater->add_control( $id, $args );
|
311 |
+
} else {
|
312 |
+
$this->add_control( $id, $args );
|
313 |
+
}
|
314 |
+
|
315 |
+
break;
|
316 |
+
case 'alert':
|
317 |
+
$args = array(
|
318 |
+
'label' => $option['title'],
|
319 |
+
'type' => 'alert',
|
320 |
+
'default' => isset( $option['default'] ) ? $option['default'] : '',
|
321 |
+
'label_block' => true,
|
322 |
+
'condition' => isset( $option['dependency'] ) ? $this->parse_dependency_option( $option['dependency'] ) : '',
|
323 |
+
'description' => isset( $option['description'] ) ? $option['description'] : '',
|
324 |
+
);
|
325 |
+
|
326 |
+
if ( $repeater_options ) {
|
327 |
+
$repeater->add_control( $id, $args );
|
328 |
+
} else {
|
329 |
+
$this->add_control( $id, $args );
|
330 |
+
}
|
331 |
+
|
332 |
+
break;
|
333 |
+
case 'iconpicker':
|
334 |
+
$args = array(
|
335 |
+
'label' => $option['title'],
|
336 |
+
'type' => Controls_Manager::ICON,
|
337 |
+
'default' => isset( $option['default'] ) ? $option['default'] : '',
|
338 |
+
'label_block' => true,
|
339 |
+
'condition' => isset( $option['dependency'] ) ? $this->parse_dependency_option( $option['dependency'] ) : '',
|
340 |
+
'description' => isset( $option['description'] ) ? $option['description'] : '',
|
341 |
+
);
|
342 |
+
|
343 |
+
if ( $repeater_options ) {
|
344 |
+
$repeater->add_control( $id, $args );
|
345 |
+
} else {
|
346 |
+
$this->add_control( $id, $args );
|
347 |
+
}
|
348 |
+
|
349 |
+
break;
|
350 |
+
case 'repeater':
|
351 |
+
$args = array(
|
352 |
+
'label' => $option['title'],
|
353 |
+
'type' => Controls_Manager::REPEATER,
|
354 |
+
'fields' => $this->parse_control_option( $option['fields'], $id, true ),
|
355 |
+
'default' => isset( $option['default'] ) ? $option['default'] : array(),
|
356 |
+
);
|
357 |
+
|
358 |
+
if ( $repeater_options ) {
|
359 |
+
$repeater->add_control( $id, $args );
|
360 |
+
} else {
|
361 |
+
$this->add_control( $id, $args );
|
362 |
+
}
|
363 |
+
|
364 |
+
break;
|
365 |
+
case 'select':
|
366 |
+
$options = jeg_field_select_option( $option );
|
367 |
+
$multiple = isset( $option['multiple'] ) ? $option['multiple'] : 1;
|
368 |
+
|
369 |
+
if ( ! isset( $option['ajax'] ) && 1 === $multiple ) {
|
370 |
+
$args = array(
|
371 |
+
'label' => $option['title'],
|
372 |
+
'type' => Controls_Manager::SELECT,
|
373 |
+
'default' => isset( $option['default'] ) ? $option['default'] : '',
|
374 |
+
'options' => $options,
|
375 |
+
'label_block' => true,
|
376 |
+
'condition' => isset( $option['dependency'] ) ? $this->parse_dependency_option( $option['dependency'] ) : '',
|
377 |
+
'description' => isset( $option['description'] ) ? $option['description'] : '',
|
378 |
+
);
|
379 |
+
} else {
|
380 |
+
if ( isset( $option['options'] ) && 'jeg_get_custom_term_option' === $option['options'] ) {
|
381 |
+
$options = call_user_func_array( $option['options'], array( '', $option['slug'] ) );
|
382 |
+
}
|
383 |
+
|
384 |
+
$args = array(
|
385 |
+
'label' => $option['title'],
|
386 |
+
'type' => 'dynamic-select',
|
387 |
+
'default' => isset( $option['default'] ) ? $option['default'] : '',
|
388 |
+
'label_block' => true,
|
389 |
+
'multiple' => $multiple,
|
390 |
+
'ajax' => isset( $option['ajax'] ) ? $option['ajax'] : '',
|
391 |
+
'slug' => isset( $option['slug'] ) ? $option['slug'] : '',
|
392 |
+
'nonce' => isset( $option['nonce'] ) ? $option['nonce'] : '',
|
393 |
+
'retriever' => isset( $option['options'] ) ? $option['options'] : '',
|
394 |
+
'options' => wp_json_encode( $options ),
|
395 |
+
'condition' => isset( $option['dependency'] ) ? $this->parse_dependency_option( $option['dependency'] ) : '',
|
396 |
+
'description' => isset( $option['description'] ) ? $option['description'] : '',
|
397 |
+
);
|
398 |
+
}
|
399 |
+
|
400 |
+
if ( $repeater_options ) {
|
401 |
+
$repeater->add_control( $id, $args );
|
402 |
+
} else {
|
403 |
+
$this->add_control( $id, $args );
|
404 |
+
}
|
405 |
+
|
406 |
+
break;
|
407 |
+
default:
|
408 |
+
$args = array(
|
409 |
+
'label' => $option['title'],
|
410 |
+
'type' => Controls_Manager::TEXT,
|
411 |
+
'default' => isset( $option['default'] ) ? $option['default'] : '',
|
412 |
+
'label_block' => true,
|
413 |
+
'condition' => isset( $option['dependency'] ) ? $this->parse_dependency_option( $option['dependency'] ) : '',
|
414 |
+
'description' => isset( $option['description'] ) ? $option['description'] : '',
|
415 |
+
);
|
416 |
+
$custom_option = apply_filters( 'jeg_custom_control_elementor', array() );
|
417 |
+
|
418 |
+
if ( ! empty( $custom_option ) ) {
|
419 |
+
foreach ( $custom_option as $type ) {
|
420 |
+
if ( $option['type'] === $type ) {
|
421 |
+
$args = array(
|
422 |
+
'label' => $option['title'],
|
423 |
+
'type' => $type,
|
424 |
+
'default' => isset( $option['default'] ) ? $option['default'] : '',
|
425 |
+
'label_block' => true,
|
426 |
+
'condition' => isset( $option['dependency'] ) ? $this->parse_dependency_option( $option['dependency'] ) : '',
|
427 |
+
'description' => isset( $option['description'] ) ? $option['description'] : '',
|
428 |
+
);
|
429 |
+
|
430 |
+
if ( isset( $option['nonce'] ) ) {
|
431 |
+
$args['nonce'] = $option['nonce'];
|
432 |
+
}
|
433 |
+
|
434 |
+
if ( isset( $option['ajax'] ) ) {
|
435 |
+
$args['ajax'] = $option['ajax'];
|
436 |
+
}
|
437 |
+
|
438 |
+
if ( $repeater_options ) {
|
439 |
+
$repeater->add_control( $id, $args );
|
440 |
+
} else {
|
441 |
+
$this->add_control( $id, $args );
|
442 |
+
}
|
443 |
+
|
444 |
+
$args = array();
|
445 |
+
}
|
446 |
+
}
|
447 |
+
}
|
448 |
+
|
449 |
+
if ( ! empty( $args ) ) {
|
450 |
+
if ( $repeater_options ) {
|
451 |
+
$repeater->add_control( $id, $args );
|
452 |
+
} else {
|
453 |
+
$this->add_control( $id, $args );
|
454 |
+
}
|
455 |
+
}
|
456 |
+
|
457 |
+
break;
|
458 |
+
}
|
459 |
+
}
|
460 |
+
}
|
461 |
+
|
462 |
+
if ( $repeater_options ) {
|
463 |
+
return $repeater->get_controls();
|
464 |
+
}
|
465 |
+
}
|
466 |
+
|
467 |
+
/**
|
468 |
+
* Make dependency fit with elementor
|
469 |
+
*
|
470 |
+
* @param array $dependency Dependency.
|
471 |
+
* @return array
|
472 |
+
*/
|
473 |
+
public function parse_dependency_option( $dependency ) {
|
474 |
+
$dependencies = array();
|
475 |
+
|
476 |
+
foreach ( $dependency as $depend ) {
|
477 |
+
$value = true === $depend['value'] ? 'yes' : $depend['value'];
|
478 |
+
$dependencies[ $depend['field'] ] = $value;
|
479 |
}
|
480 |
|
481 |
+
return $dependencies;
|
482 |
+
}
|
483 |
+
|
484 |
+
/**
|
485 |
+
* Radio Image option for Elementor
|
486 |
+
*
|
487 |
+
* @param array $options Array of option.
|
488 |
+
* @param string $param Parameter name.
|
489 |
+
* @return array
|
490 |
+
*/
|
491 |
+
public function parse_radioimage_option( $options, $param ) {
|
492 |
+
$new_value = array();
|
493 |
+
|
494 |
+
foreach ( $options as $key => $item ) {
|
495 |
+
$new_value[ $key ] = array(
|
496 |
+
'icon' => $param,
|
497 |
+
);
|
498 |
+
}
|
499 |
+
|
500 |
+
return $new_value;
|
501 |
+
}
|
502 |
+
|
503 |
+
/**
|
504 |
+
* @param $group
|
505 |
+
*/
|
506 |
+
private function parse_typography_control_option( $group ) {
|
507 |
+
if ( 'design' === $group ) {
|
508 |
+
$this->get_option_instance()->set_typography_option( $this );
|
509 |
+
}
|
510 |
+
}
|
511 |
+
|
512 |
+
/**
|
513 |
+
* Render Element
|
514 |
+
*/
|
515 |
+
protected function render() {
|
516 |
+
$settings = $this->get_settings();
|
517 |
+
echo wp_kses( $this->get_view_instance()->build_element( $settings ), wp_kses_allowed_html( 'post' ) );
|
518 |
+
}
|
519 |
+
|
520 |
+
/**
|
521 |
+
* Get Element View Instance
|
522 |
+
*
|
523 |
+
* @return \Jeg\Element\Elements\Elements_View_Abstract
|
524 |
+
*/
|
525 |
+
public function get_view_instance() {
|
526 |
+
return Element::instance()->manager->get_element_view( $this->get_elementor_id() );
|
527 |
+
}
|
528 |
}
|
lib/jeg-element/includes/class/elementor/class-elementor-manager.php
CHANGED
@@ -46,7 +46,7 @@ class Elementor_Manager {
|
|
46 |
* Editor Style
|
47 |
*/
|
48 |
public function editor_style() {
|
49 |
-
wp_enqueue_style( 'selectize', JEG_ELEMENT_URL . '/assets/css/selectize.default.css', null,
|
50 |
wp_enqueue_style( 'jeg-elementor', JEG_ELEMENT_URL . '/assets/css/elementor-backend.css', null, JEG_ELEMENT_VERSION );
|
51 |
}
|
52 |
|
@@ -55,7 +55,7 @@ class Elementor_Manager {
|
|
55 |
*/
|
56 |
public function editor_script() {
|
57 |
wp_enqueue_script( 'jquery-ui-spinner' );
|
58 |
-
wp_enqueue_script( 'selectize', JEG_ELEMENT_URL . '/assets/js/selectize.js', null,
|
59 |
wp_enqueue_script( 'jeg-elementor-select', JEG_ELEMENT_URL . ( '/assets/js/elementor/elementor-control-select.js' ), null, JEG_ELEMENT_VERSION, true );
|
60 |
}
|
61 |
|
46 |
* Editor Style
|
47 |
*/
|
48 |
public function editor_style() {
|
49 |
+
wp_enqueue_style( 'selectize', JEG_ELEMENT_URL . '/assets/css/selectize.default.css', null, '0.14.0' );
|
50 |
wp_enqueue_style( 'jeg-elementor', JEG_ELEMENT_URL . '/assets/css/elementor-backend.css', null, JEG_ELEMENT_VERSION );
|
51 |
}
|
52 |
|
55 |
*/
|
56 |
public function editor_script() {
|
57 |
wp_enqueue_script( 'jquery-ui-spinner' );
|
58 |
+
wp_enqueue_script( 'selectize', JEG_ELEMENT_URL . '/assets/js/selectize.min.js', null, '0.14.0', true );
|
59 |
wp_enqueue_script( 'jeg-elementor-select', JEG_ELEMENT_URL . ( '/assets/js/elementor/elementor-control-select.js' ), null, JEG_ELEMENT_VERSION, true );
|
60 |
}
|
61 |
|
lib/jeg-element/includes/class/widget/class-widget-abstract.php
CHANGED
@@ -142,15 +142,15 @@ abstract class Widget_Abstract extends \WP_Widget {
|
|
142 |
public function widget( $args, $instance ) {
|
143 |
$title = apply_filters( 'widget_title', isset( $instance['title'] ) ? $instance['title'] : '' );
|
144 |
|
145 |
-
echo
|
146 |
|
147 |
if ( ! empty( $title ) ) {
|
148 |
-
echo
|
149 |
}
|
150 |
|
151 |
-
echo
|
152 |
|
153 |
-
echo
|
154 |
}
|
155 |
|
156 |
/**
|
142 |
public function widget( $args, $instance ) {
|
143 |
$title = apply_filters( 'widget_title', isset( $instance['title'] ) ? $instance['title'] : '' );
|
144 |
|
145 |
+
echo wp_kses( $args['before_widget'], wp_kses_allowed_html( 'post' ) );
|
146 |
|
147 |
if ( ! empty( $title ) ) {
|
148 |
+
echo wp_kses( $args['before_title'], wp_kses_allowed_html( 'post' ) ) . esc_html( $title ) . $args['after_title'];
|
149 |
}
|
150 |
|
151 |
+
echo wp_kses( $this->get_view_instance()->render_widget( $instance ), wp_kses_allowed_html( 'post' ) );
|
152 |
|
153 |
+
echo wp_kses( $args['after_widget'], wp_kses_allowed_html( 'post' ) );
|
154 |
}
|
155 |
|
156 |
/**
|
lib/jeg-element/includes/class/wpbakery/class-wpbakery-integration.php
CHANGED
@@ -133,9 +133,9 @@ class Wpbakery_Integration {
|
|
133 |
*/
|
134 |
public function admin_script() {
|
135 |
wp_enqueue_style( 'global-admin', JEG_ELEMENT_URL . '/assets/css/vc-admin.css', null, JEG_ELEMENT_VERSION );
|
136 |
-
wp_enqueue_style( 'selectize', JEG_ELEMENT_URL . '/assets/css/selectize.default.css', null,
|
137 |
wp_enqueue_script( 'jquery-ui-spinner' );
|
138 |
-
wp_enqueue_script( 'selectize', JEG_ELEMENT_URL . '/assets/js/selectize.js', null,
|
139 |
}
|
140 |
|
141 |
/**
|
133 |
*/
|
134 |
public function admin_script() {
|
135 |
wp_enqueue_style( 'global-admin', JEG_ELEMENT_URL . '/assets/css/vc-admin.css', null, JEG_ELEMENT_VERSION );
|
136 |
+
wp_enqueue_style( 'selectize', JEG_ELEMENT_URL . '/assets/css/selectize.default.css', null, '0.14.0' );
|
137 |
wp_enqueue_script( 'jquery-ui-spinner' );
|
138 |
+
wp_enqueue_script( 'selectize', JEG_ELEMENT_URL . '/assets/js/selectize.min.js', null, '0.14.0', true );
|
139 |
}
|
140 |
|
141 |
/**
|
lib/jeg-element/includes/helper.php
CHANGED
@@ -828,7 +828,7 @@ if ( ! function_exists( 'jeg_sanitize' ) ) {
|
|
828 |
* @return mixed
|
829 |
*/
|
830 |
function jeg_sanitize( $value ) {
|
831 |
-
return $value;
|
832 |
}
|
833 |
}
|
834 |
|
828 |
* @return mixed
|
829 |
*/
|
830 |
function jeg_sanitize( $value ) {
|
831 |
+
return wp_kses( $value, wp_kses_allowed_html( 'post' ) );
|
832 |
}
|
833 |
}
|
834 |
|
lib/jeg-framework/assets/css/customizer.css
CHANGED
@@ -3026,3 +3026,7 @@ h2.customize-control-title {
|
|
3026 |
.customize-control-jeg-number .ui-spinner.ui-widget-content .ui-spinner-button span.ui-icon.ui-icon-triangle-1-n {
|
3027 |
display: none;
|
3028 |
}
|
|
|
|
|
|
|
|
3026 |
.customize-control-jeg-number .ui-spinner.ui-widget-content .ui-spinner-button span.ui-icon.ui-icon-triangle-1-n {
|
3027 |
display: none;
|
3028 |
}
|
3029 |
+
|
3030 |
+
.selectize-dropdown [data-selectable], .selectize-dropdown .optgroup-header {
|
3031 |
+
padding: 5px 8px;
|
3032 |
+
}
|
lib/jeg-framework/assets/css/form-builder.css
CHANGED
@@ -826,4 +826,8 @@
|
|
826 |
.jeg-repeater-wrapper .jeg-image-attachment img {
|
827 |
max-width: 250px;
|
828 |
max-height: 500px;
|
|
|
|
|
|
|
|
|
829 |
}
|
826 |
.jeg-repeater-wrapper .jeg-image-attachment img {
|
827 |
max-width: 250px;
|
828 |
max-height: 500px;
|
829 |
+
}
|
830 |
+
|
831 |
+
.selectize-dropdown [data-selectable], .selectize-dropdown .optgroup-header {
|
832 |
+
padding: 5px 8px;
|
833 |
}
|
lib/jeg-framework/assets/css/selectize.default.css
CHANGED
@@ -1,393 +1,6 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
*
|
7 |
-
* http://www.apache.org/licenses/LICENSE-2.0
|
8 |
-
*
|
9 |
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
10 |
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
11 |
-
* ANY KIND, either express or implied. See the License for the specific language
|
12 |
-
* governing permissions and limitations under the License.
|
13 |
-
*
|
14 |
-
* @author Brian Reavis <brian@thirdroute.com>
|
15 |
-
*/
|
16 |
-
.selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder {
|
17 |
-
visibility: visible !important;
|
18 |
-
background: #f2f2f2 !important;
|
19 |
-
background: rgba(0, 0, 0, 0.06) !important;
|
20 |
-
border: 0 none !important;
|
21 |
-
-webkit-box-shadow: inset 0 0 12px 4px #ffffff;
|
22 |
-
box-shadow: inset 0 0 12px 4px #ffffff;
|
23 |
-
}
|
24 |
-
.selectize-control.plugin-drag_drop .ui-sortable-placeholder::after {
|
25 |
-
content: '!';
|
26 |
-
visibility: hidden;
|
27 |
-
}
|
28 |
-
.selectize-control.plugin-drag_drop .ui-sortable-helper {
|
29 |
-
-webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
|
30 |
-
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
|
31 |
-
}
|
32 |
-
.selectize-dropdown-header {
|
33 |
-
position: relative;
|
34 |
-
padding: 5px 8px;
|
35 |
-
border-bottom: 1px solid #d0d0d0;
|
36 |
-
background: #f8f8f8;
|
37 |
-
-webkit-border-radius: 3px 3px 0 0;
|
38 |
-
-moz-border-radius: 3px 3px 0 0;
|
39 |
-
border-radius: 3px 3px 0 0;
|
40 |
-
}
|
41 |
-
.selectize-dropdown-header-close {
|
42 |
-
position: absolute;
|
43 |
-
right: 8px;
|
44 |
-
top: 50%;
|
45 |
-
color: #303030;
|
46 |
-
opacity: 0.4;
|
47 |
-
margin-top: -12px;
|
48 |
-
line-height: 20px;
|
49 |
-
font-size: 20px !important;
|
50 |
-
}
|
51 |
-
.selectize-dropdown-header-close:hover {
|
52 |
-
color: #000000;
|
53 |
-
}
|
54 |
-
.selectize-dropdown.plugin-optgroup_columns .optgroup {
|
55 |
-
border-right: 1px solid #f2f2f2;
|
56 |
-
border-top: 0 none;
|
57 |
-
float: left;
|
58 |
-
-webkit-box-sizing: border-box;
|
59 |
-
-moz-box-sizing: border-box;
|
60 |
-
box-sizing: border-box;
|
61 |
-
}
|
62 |
-
.selectize-dropdown.plugin-optgroup_columns .optgroup:last-child {
|
63 |
-
border-right: 0 none;
|
64 |
-
}
|
65 |
-
.selectize-dropdown.plugin-optgroup_columns .optgroup:before {
|
66 |
-
display: none;
|
67 |
-
}
|
68 |
-
.selectize-dropdown.plugin-optgroup_columns .optgroup-header {
|
69 |
-
border-top: 0 none;
|
70 |
-
}
|
71 |
-
.selectize-control.plugin-remove_button [data-value] {
|
72 |
-
position: relative;
|
73 |
-
padding-right: 24px !important;
|
74 |
-
}
|
75 |
-
.selectize-control.plugin-remove_button [data-value] .remove {
|
76 |
-
z-index: 1;
|
77 |
-
/* fixes ie bug (see #392) */
|
78 |
-
position: absolute;
|
79 |
-
top: 0;
|
80 |
-
right: 0;
|
81 |
-
bottom: 0;
|
82 |
-
width: 17px;
|
83 |
-
text-align: center;
|
84 |
-
font-weight: bold;
|
85 |
-
font-size: 12px;
|
86 |
-
color: inherit;
|
87 |
-
text-decoration: none;
|
88 |
-
vertical-align: middle;
|
89 |
-
display: inline-block;
|
90 |
-
padding: 2px 0 0 0;
|
91 |
-
border-left: 1px solid #0073bb;
|
92 |
-
-webkit-border-radius: 0 2px 2px 0;
|
93 |
-
-moz-border-radius: 0 2px 2px 0;
|
94 |
-
border-radius: 0 2px 2px 0;
|
95 |
-
-webkit-box-sizing: border-box;
|
96 |
-
-moz-box-sizing: border-box;
|
97 |
-
box-sizing: border-box;
|
98 |
-
}
|
99 |
-
.selectize-control.plugin-remove_button [data-value] .remove:hover {
|
100 |
-
background: rgba(0, 0, 0, 0.05);
|
101 |
-
}
|
102 |
-
.selectize-control.plugin-remove_button [data-value].active .remove {
|
103 |
-
border-left-color: #00578d;
|
104 |
-
}
|
105 |
-
.selectize-control.plugin-remove_button .disabled [data-value] .remove:hover {
|
106 |
-
background: none;
|
107 |
-
}
|
108 |
-
.selectize-control.plugin-remove_button .disabled [data-value] .remove {
|
109 |
-
border-left-color: #aaaaaa;
|
110 |
-
}
|
111 |
-
.selectize-control.plugin-remove_button .remove-single {
|
112 |
-
position: absolute;
|
113 |
-
right: 28px;
|
114 |
-
top: 6px;
|
115 |
-
font-size: 23px;
|
116 |
-
}
|
117 |
-
.selectize-control {
|
118 |
-
position: relative;
|
119 |
-
}
|
120 |
-
.selectize-dropdown,
|
121 |
-
.selectize-input,
|
122 |
-
.selectize-input input {
|
123 |
-
color: #303030;
|
124 |
-
font-family: inherit;
|
125 |
-
font-size: 13px;
|
126 |
-
line-height: 18px;
|
127 |
-
-webkit-font-smoothing: inherit;
|
128 |
-
}
|
129 |
-
.selectize-input,
|
130 |
-
.selectize-control.single .selectize-input.input-active {
|
131 |
-
background: #ffffff;
|
132 |
-
cursor: text;
|
133 |
-
display: inline-block;
|
134 |
-
}
|
135 |
-
.selectize-input {
|
136 |
-
border: 1px solid #d0d0d0;
|
137 |
-
padding: 8px 8px;
|
138 |
-
display: inline-block;
|
139 |
-
width: 100%;
|
140 |
-
overflow: hidden;
|
141 |
-
position: relative;
|
142 |
-
z-index: 1;
|
143 |
-
-webkit-box-sizing: border-box;
|
144 |
-
-moz-box-sizing: border-box;
|
145 |
-
box-sizing: border-box;
|
146 |
-
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);
|
147 |
-
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.1);
|
148 |
-
-webkit-border-radius: 3px;
|
149 |
-
-moz-border-radius: 3px;
|
150 |
-
border-radius: 3px;
|
151 |
-
}
|
152 |
-
.selectize-control.multi .selectize-input.has-items {
|
153 |
-
padding: 5px 8px 2px;
|
154 |
-
}
|
155 |
-
.selectize-input.full {
|
156 |
-
background-color: #ffffff;
|
157 |
-
}
|
158 |
-
.selectize-input.disabled,
|
159 |
-
.selectize-input.disabled * {
|
160 |
-
cursor: default !important;
|
161 |
-
}
|
162 |
-
.selectize-input.focus {
|
163 |
-
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
|
164 |
-
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
|
165 |
-
}
|
166 |
-
.selectize-input.dropdown-active {
|
167 |
-
-webkit-border-radius: 3px 3px 0 0;
|
168 |
-
-moz-border-radius: 3px 3px 0 0;
|
169 |
-
border-radius: 3px 3px 0 0;
|
170 |
-
}
|
171 |
-
.selectize-input > * {
|
172 |
-
vertical-align: baseline;
|
173 |
-
display: -moz-inline-stack;
|
174 |
-
display: inline-block;
|
175 |
-
zoom: 1;
|
176 |
-
*display: inline;
|
177 |
-
}
|
178 |
-
.selectize-control.multi .selectize-input > div {
|
179 |
-
cursor: pointer;
|
180 |
-
margin: 0 3px 3px 0;
|
181 |
-
padding: 2px 6px;
|
182 |
-
background: #1da7ee;
|
183 |
-
color: #ffffff;
|
184 |
-
border: 1px solid #0073bb;
|
185 |
-
}
|
186 |
-
.selectize-control.multi .selectize-input > div.active {
|
187 |
-
background: #92c836;
|
188 |
-
color: #ffffff;
|
189 |
-
border: 1px solid #00578d;
|
190 |
-
}
|
191 |
-
.selectize-control.multi .selectize-input.disabled > div,
|
192 |
-
.selectize-control.multi .selectize-input.disabled > div.active {
|
193 |
-
color: #ffffff;
|
194 |
-
background: #d2d2d2;
|
195 |
-
border: 1px solid #aaaaaa;
|
196 |
-
}
|
197 |
-
.selectize-input > input {
|
198 |
-
display: inline-block !important;
|
199 |
-
padding: 0 !important;
|
200 |
-
min-height: 0 !important;
|
201 |
-
max-height: none !important;
|
202 |
-
max-width: 100% !important;
|
203 |
-
margin: 0 1px !important;
|
204 |
-
text-indent: 0 !important;
|
205 |
-
border: 0 none !important;
|
206 |
-
background: none !important;
|
207 |
-
line-height: inherit !important;
|
208 |
-
-webkit-user-select: auto !important;
|
209 |
-
-webkit-box-shadow: none !important;
|
210 |
-
box-shadow: none !important;
|
211 |
-
}
|
212 |
-
.selectize-input > input::-ms-clear {
|
213 |
-
display: none;
|
214 |
-
}
|
215 |
-
.selectize-input > input:focus {
|
216 |
-
outline: none !important;
|
217 |
-
}
|
218 |
-
.selectize-input::after {
|
219 |
-
content: ' ';
|
220 |
-
display: block;
|
221 |
-
clear: left;
|
222 |
-
}
|
223 |
-
.selectize-input.dropdown-active::before {
|
224 |
-
content: ' ';
|
225 |
-
display: block;
|
226 |
-
position: absolute;
|
227 |
-
background: #f0f0f0;
|
228 |
-
height: 1px;
|
229 |
-
bottom: 0;
|
230 |
-
left: 0;
|
231 |
-
right: 0;
|
232 |
-
}
|
233 |
-
.selectize-dropdown {
|
234 |
-
position: absolute;
|
235 |
-
z-index: 10;
|
236 |
-
border: 1px solid #d0d0d0;
|
237 |
-
background: #ffffff;
|
238 |
-
margin: -1px 0 0 0;
|
239 |
-
border-top: 0 none;
|
240 |
-
-webkit-box-sizing: border-box;
|
241 |
-
-moz-box-sizing: border-box;
|
242 |
-
box-sizing: border-box;
|
243 |
-
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
244 |
-
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
245 |
-
-webkit-border-radius: 0 0 3px 3px;
|
246 |
-
-moz-border-radius: 0 0 3px 3px;
|
247 |
-
border-radius: 0 0 3px 3px;
|
248 |
-
}
|
249 |
-
.selectize-dropdown [data-selectable] {
|
250 |
-
cursor: pointer;
|
251 |
-
overflow: hidden;
|
252 |
-
}
|
253 |
-
.selectize-dropdown [data-selectable] .highlight {
|
254 |
-
background: rgba(125, 168, 208, 0.2);
|
255 |
-
-webkit-border-radius: 1px;
|
256 |
-
-moz-border-radius: 1px;
|
257 |
-
border-radius: 1px;
|
258 |
-
}
|
259 |
-
.selectize-dropdown [data-selectable],
|
260 |
-
.selectize-dropdown .optgroup-header {
|
261 |
-
padding: 5px 8px;
|
262 |
-
}
|
263 |
-
.selectize-dropdown .optgroup:first-child .optgroup-header {
|
264 |
-
border-top: 0 none;
|
265 |
-
}
|
266 |
-
.selectize-dropdown .optgroup-header {
|
267 |
-
color: #303030;
|
268 |
-
background: #ffffff;
|
269 |
-
cursor: default;
|
270 |
-
}
|
271 |
-
.selectize-dropdown .active {
|
272 |
-
background-color: #f5fafd;
|
273 |
-
color: #495c68;
|
274 |
-
}
|
275 |
-
.selectize-dropdown .active.create {
|
276 |
-
color: #495c68;
|
277 |
-
}
|
278 |
-
.selectize-dropdown .create {
|
279 |
-
color: rgba(48, 48, 48, 0.5);
|
280 |
-
}
|
281 |
-
.selectize-dropdown-content {
|
282 |
-
overflow-y: auto;
|
283 |
-
overflow-x: hidden;
|
284 |
-
max-height: 200px;
|
285 |
-
}
|
286 |
-
.selectize-control.single .selectize-input,
|
287 |
-
.selectize-control.single .selectize-input input {
|
288 |
-
cursor: pointer;
|
289 |
-
}
|
290 |
-
.selectize-control.single .selectize-input.input-active,
|
291 |
-
.selectize-control.single .selectize-input.input-active input {
|
292 |
-
cursor: text;
|
293 |
-
}
|
294 |
-
.selectize-control.single .selectize-input:after {
|
295 |
-
content: ' ';
|
296 |
-
display: block;
|
297 |
-
position: absolute;
|
298 |
-
top: 50%;
|
299 |
-
right: 15px;
|
300 |
-
margin-top: -3px;
|
301 |
-
width: 0;
|
302 |
-
height: 0;
|
303 |
-
border-style: solid;
|
304 |
-
border-width: 5px 5px 0 5px;
|
305 |
-
border-color: #808080 transparent transparent transparent;
|
306 |
-
}
|
307 |
-
.selectize-control.single .selectize-input.dropdown-active:after {
|
308 |
-
margin-top: -4px;
|
309 |
-
border-width: 0 5px 5px 5px;
|
310 |
-
border-color: transparent transparent #808080 transparent;
|
311 |
-
}
|
312 |
-
.selectize-control.rtl.single .selectize-input:after {
|
313 |
-
left: 15px;
|
314 |
-
right: auto;
|
315 |
-
}
|
316 |
-
.selectize-control.rtl .selectize-input > input {
|
317 |
-
margin: 0 4px 0 -2px !important;
|
318 |
-
}
|
319 |
-
.selectize-control .selectize-input.disabled {
|
320 |
-
opacity: 0.5;
|
321 |
-
background-color: #fafafa;
|
322 |
-
}
|
323 |
-
.selectize-control.multi .selectize-input.has-items {
|
324 |
-
padding-left: 5px;
|
325 |
-
padding-right: 5px;
|
326 |
-
}
|
327 |
-
.selectize-control.multi .selectize-input.disabled [data-value] {
|
328 |
-
color: #999;
|
329 |
-
text-shadow: none;
|
330 |
-
background: none;
|
331 |
-
-webkit-box-shadow: none;
|
332 |
-
box-shadow: none;
|
333 |
-
}
|
334 |
-
.selectize-control.multi .selectize-input.disabled [data-value],
|
335 |
-
.selectize-control.multi .selectize-input.disabled [data-value] .remove {
|
336 |
-
border-color: #e6e6e6;
|
337 |
-
}
|
338 |
-
.selectize-control.multi .selectize-input.disabled [data-value] .remove {
|
339 |
-
background: none;
|
340 |
-
}
|
341 |
-
.selectize-control.multi .selectize-input [data-value] {
|
342 |
-
text-shadow: 0 1px 0 rgba(0, 51, 83, 0.3);
|
343 |
-
-webkit-border-radius: 3px;
|
344 |
-
-moz-border-radius: 3px;
|
345 |
-
border-radius: 3px;
|
346 |
-
background-color: #1b9dec;
|
347 |
-
background-image: -moz-linear-gradient(top, #1da7ee, #178ee9);
|
348 |
-
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#1da7ee), to(#178ee9));
|
349 |
-
background-image: -webkit-linear-gradient(top, #1da7ee, #178ee9);
|
350 |
-
background-image: -o-linear-gradient(top, #1da7ee, #178ee9);
|
351 |
-
background-image: linear-gradient(to bottom, #1da7ee, #178ee9);
|
352 |
-
background-repeat: repeat-x;
|
353 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff1da7ee', endColorstr='#ff178ee9', GradientType=0);
|
354 |
-
-webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.2),inset 0 1px rgba(255,255,255,0.03);
|
355 |
-
box-shadow: 0 1px 0 rgba(0,0,0,0.2),inset 0 1px rgba(255,255,255,0.03);
|
356 |
-
}
|
357 |
-
.selectize-control.multi .selectize-input [data-value].active {
|
358 |
-
background-color: #0085d4;
|
359 |
-
background-image: -moz-linear-gradient(top, #008fd8, #0075cf);
|
360 |
-
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#008fd8), to(#0075cf));
|
361 |
-
background-image: -webkit-linear-gradient(top, #008fd8, #0075cf);
|
362 |
-
background-image: -o-linear-gradient(top, #008fd8, #0075cf);
|
363 |
-
background-image: linear-gradient(to bottom, #008fd8, #0075cf);
|
364 |
-
background-repeat: repeat-x;
|
365 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff008fd8', endColorstr='#ff0075cf', GradientType=0);
|
366 |
-
}
|
367 |
-
.selectize-control.single .selectize-input {
|
368 |
-
-webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.8);
|
369 |
-
box-shadow: 0 1px 0 rgba(0,0,0,0.05), inset 0 1px 0 rgba(255,255,255,0.8);
|
370 |
-
background-color: #f9f9f9;
|
371 |
-
background-image: -moz-linear-gradient(top, #fefefe, #f2f2f2);
|
372 |
-
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fefefe), to(#f2f2f2));
|
373 |
-
background-image: -webkit-linear-gradient(top, #fefefe, #f2f2f2);
|
374 |
-
background-image: -o-linear-gradient(top, #fefefe, #f2f2f2);
|
375 |
-
background-image: linear-gradient(to bottom, #fefefe, #f2f2f2);
|
376 |
-
background-repeat: repeat-x;
|
377 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffefefe', endColorstr='#fff2f2f2', GradientType=0);
|
378 |
-
}
|
379 |
-
.selectize-control.single .selectize-input,
|
380 |
-
.selectize-dropdown.single {
|
381 |
-
border-color: #b8b8b8;
|
382 |
-
}
|
383 |
-
.selectize-dropdown .optgroup-header {
|
384 |
-
padding-top: 7px;
|
385 |
-
font-weight: bold;
|
386 |
-
font-size: 0.85em;
|
387 |
-
}
|
388 |
-
.selectize-dropdown .optgroup {
|
389 |
-
border-top: 1px solid #f0f0f0;
|
390 |
-
}
|
391 |
-
.selectize-dropdown .optgroup:first-child {
|
392 |
-
border-top: 0 none;
|
393 |
-
}
|
1 |
+
.selectize-control.plugin-drag_drop.multi>.selectize-input.dragging{overflow:visible}.selectize-control.plugin-drag_drop.multi>.selectize-input>div.ui-sortable-placeholder{visibility:visible !important;background:#f2f2f2 !important;background:rgba(0,0,0,.06) !important;border:0 none !important;box-shadow:inset 0 0 12px 4px #fff}.selectize-control.plugin-drag_drop .ui-sortable-placeholder::after{content:"!";visibility:hidden}.selectize-control.plugin-drag_drop .ui-sortable-helper{box-shadow:0 2px 5px rgba(0,0,0,.2)}.selectize-control .selectize-dropdown-header{position:relative;padding:10px 8px;border-bottom:1px solid #d0d0d0;background:#f8f8f8;border-radius:3px 3px 0 0}.selectize-control .selectize-dropdown-header-close{position:absolute;right:8px;top:50%;color:#303030;opacity:.4;margin-top:-12px;line-height:20px;font-size:20px !important}.selectize-control .selectize-dropdown-header-close:hover{color:#000}.selectize-dropdown.plugin-optgroup_columns .selectize-dropdown-content{display:flex}.selectize-dropdown.plugin-optgroup_columns .optgroup{border-right:1px solid #f2f2f2;border-top:0 none;flex-grow:1;flex-basis:0;min-width:0}.selectize-dropdown.plugin-optgroup_columns .optgroup:last-child{border-right:0 none}.selectize-dropdown.plugin-optgroup_columns .optgroup:before{display:none}.selectize-dropdown.plugin-optgroup_columns .optgroup-header{border-top:0 none}.selectize-control.plugin-remove_button .item{display:inline-flex;align-items:center;padding-right:0 !important}.selectize-control.plugin-remove_button .item .remove{color:inherit;text-decoration:none;vertical-align:middle;display:inline-block;padding:2px 6px;border-left:1px solid #0073bb;border-radius:0 2px 2px 0;box-sizing:border-box;margin-left:6px}.selectize-control.plugin-remove_button .item .remove:hover{background:rgba(0,0,0,.05)}.selectize-control.plugin-remove_button .item.active .remove{border-left-color:#00578d}.selectize-control.plugin-remove_button .disabled .item .remove:hover{background:none}.selectize-control.plugin-remove_button .disabled .item .remove{border-left-color:#aaa}.selectize-control.plugin-remove_button .remove-single{position:absolute;right:0;top:0;font-size:23px}.selectize-control.plugin-clear_button .clear{display:flex;position:absolute;height:100%;width:25px;top:0;right:calc(8px - 6px);color:#000;opacity:.4;font-weight:bold;border:none;cursor:pointer;z-index:1;font-size:21px;justify-content:center;align-items:center}.selectize-control.plugin-clear_button .clear:hover{opacity:1}.selectize-control.plugin-clear_button.single .clear{right:calc(8px - 6px + 1.5rem)}.selectize-control{position:relative}.selectize-dropdown,.selectize-input,.selectize-input input{color:#303030;font-family:inherit;font-size:13px;line-height:18px;font-smoothing:inherit}.selectize-input,.selectize-control.single .selectize-input.input-active{background:#fff;cursor:text;display:inline-block}.selectize-input{border:1px solid #d0d0d0;padding:8px 8px;display:inline-block;width:100%;position:relative;z-index:1;box-sizing:border-box;box-shadow:inset 0 1px 1px rgba(0,0,0,.1);border-radius:3px}.selectize-control.multi .selectize-input.has-items{padding:calc(
|
2 |
+
8px - 2px - 1px
|
3 |
+
) 8px calc(
|
4 |
+
8px - 2px - 3px -
|
5 |
+
1px
|
6 |
+
)}.selectize-input.full{background-color:#fff}.selectize-input.disabled,.selectize-input.disabled *{cursor:default !important}.selectize-input.focus{box-shadow:inset 0 1px 2px rgba(0,0,0,.15)}.selectize-input.dropdown-active{border-radius:3px 3px 0 0}.selectize-input>*{vertical-align:baseline;display:inline-block;zoom:1}.selectize-control.multi .selectize-input>div{cursor:pointer;margin:0 3px 3px 0;padding:2px 6px;background:#1da7ee;color:#fff;border:1px solid #0073bb}.selectize-control.multi .selectize-input>div.active{background:#92c836;color:#fff;border:1px solid #00578d}.selectize-control.multi .selectize-input.disabled>div,.selectize-control.multi .selectize-input.disabled>div.active{color:#fff;background:#d2d2d2;border:1px solid #aaa}.selectize-input>input{display:inline-block !important;padding:0 !important;min-height:0 !important;max-height:none !important;max-width:100% !important;margin:0 !important;text-indent:0 !important;border:0 none !important;background:none !important;line-height:inherit !important;user-select:auto !important;box-shadow:none !important}.selectize-input>input::-ms-clear{display:none}.selectize-input>input:focus{outline:none !important}.selectize-input>input[placeholder]{box-sizing:initial}.selectize-input.has-items>input{margin:0 0px !important}.selectize-input::after{content:" ";display:block;clear:left}.selectize-input.dropdown-active::before{content:" ";display:block;position:absolute;background:#f0f0f0;height:1px;bottom:0;left:0;right:0}.selectize-dropdown{position:absolute;top:100%;left:0;width:100%;z-index:10;border:1px solid #d0d0d0;background:#fff;margin:-1px 0 0 0;border-top:0 none;box-sizing:border-box;box-shadow:0 1px 3px rgba(0,0,0,.1);border-radius:0 0 3px 3px}.selectize-dropdown [data-selectable]{cursor:pointer;overflow:hidden}.selectize-dropdown [data-selectable] .highlight{background:rgba(125,168,208,.2);border-radius:1px}.selectize-dropdown .option,.selectize-dropdown .optgroup-header,.selectize-dropdown .no-results,.selectize-dropdown .create{padding:5px 8px}.selectize-dropdown .option,.selectize-dropdown [data-disabled],.selectize-dropdown [data-disabled] [data-selectable].option{cursor:inherit;opacity:.5}.selectize-dropdown [data-selectable].option{opacity:1;cursor:pointer}.selectize-dropdown .optgroup:first-child .optgroup-header{border-top:0 none}.selectize-dropdown .optgroup-header{color:#303030;background:#fff;cursor:default}.selectize-dropdown .active{background-color:#f5fafd;color:#495c68}.selectize-dropdown .active.create{color:#495c68}.selectize-dropdown .create{color:rgba(48,48,48,.5)}.selectize-dropdown-content{overflow-y:auto;overflow-x:hidden;max-height:200px;overflow-scrolling:touch}.selectize-dropdown-emptyoptionlabel{text-align:center}.selectize-dropdown .spinner{display:inline-block;width:30px;height:30px;margin:5px 8px}.selectize-dropdown .spinner:after{content:" ";display:block;width:24px;height:24px;margin:3px;border-radius:50%;border:5px solid #d0d0d0;border-color:#d0d0d0 rgba(0,0,0,0) #d0d0d0 rgba(0,0,0,0);animation:lds-dual-ring 1.2s linear infinite}@keyframes lds-dual-ring{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.selectize-control.single .selectize-input,.selectize-control.single .selectize-input input{cursor:pointer}.selectize-control.single .selectize-input.input-active,.selectize-control.single .selectize-input.input-active input{cursor:text}.selectize-control.single .selectize-input:after{content:" ";display:block;position:absolute;top:50%;right:15px;margin-top:-3px;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:gray rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.selectize-control.single .selectize-input.dropdown-active:after{margin-top:-4px;border-width:0 5px 5px 5px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) gray rgba(0,0,0,0)}.selectize-control.rtl{text-align:right}.selectize-control.rtl.single .selectize-input:after{left:15px;right:auto}.selectize-control.rtl .selectize-input>input{margin:0 4px 0 -2px !important}.selectize-control .selectize-input.disabled{opacity:.5;background-color:#fafafa}.selectize-control.multi .selectize-input.has-items{padding-left:5px;padding-right:5px}.selectize-control.multi .selectize-input.disabled [data-value]{color:#999;text-shadow:none;background:none;box-shadow:none}.selectize-control.multi .selectize-input.disabled [data-value],.selectize-control.multi .selectize-input.disabled [data-value] .remove{border-color:#e6e6e6}.selectize-control.multi .selectize-input.disabled [data-value] .remove{background:none}.selectize-control.multi .selectize-input [data-value]{text-shadow:0 1px 0 rgba(0,51,83,.3);border-radius:3px;background-color:#1b9dec;background-image:linear-gradient(to bottom, #1da7ee, #178ee9);background-repeat:repeat-x;box-shadow:0 1px 0 rgba(0,0,0,.2),inset 0 1px rgba(255,255,255,.03)}.selectize-control.multi .selectize-input [data-value].active{background-color:#0085d4;background-image:linear-gradient(to bottom, #008fd8, #0075cf);background-repeat:repeat-x}.selectize-control.single .selectize-input{box-shadow:0 1px 0 rgba(0,0,0,.05),inset 0 1px 0 rgba(255,255,255,.8);background-color:#f9f9f9;background-image:linear-gradient(to bottom, #fefefe, #f2f2f2);background-repeat:repeat-x}.selectize-control.single .selectize-input,.selectize-dropdown.single{border-color:#b8b8b8}.selectize-dropdown .optgroup-header{padding-top:7px;font-weight:bold;font-size:.85em}.selectize-dropdown .optgroup{border-top:1px solid #f0f0f0}.selectize-dropdown .optgroup:first-child{border-top:0 none}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lib/jeg-framework/assets/js/customizer-control/control-code-editor.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
wp.customize.controlConstructor['jeg-code-editor'] = wp.customize.controlConstructor.code_editor;
|
lib/jeg-framework/assets/js/customizer-control/control-typography.js
CHANGED
@@ -222,6 +222,8 @@ wp.customize.controlConstructor['jeg-typography'] = wp.customize.controlConstruc
|
|
222 |
|
223 |
// Add the value to the array and set the setting's value
|
224 |
value['font-family'] = jQuery( this ).val();
|
|
|
|
|
225 |
control.saveValue( value );
|
226 |
|
227 |
// Trigger changes to variants & subsets
|
222 |
|
223 |
// Add the value to the array and set the setting's value
|
224 |
value['font-family'] = jQuery( this ).val();
|
225 |
+
value.variant = [];
|
226 |
+
value.subsets = [];
|
227 |
control.saveValue( value );
|
228 |
|
229 |
// Trigger changes to variants & subsets
|
lib/jeg-framework/assets/js/form/archive-container.js
CHANGED
@@ -1,29 +1,30 @@
|
|
1 |
(function ($, api) {
|
2 |
"use strict";
|
3 |
-
|
4 |
-
api.archivecontainer = new api.Values({defaultConstructor: api.ArchiveContainer});
|
5 |
-
|
6 |
/**
|
7 |
-
|
8 |
-
|
9 |
-
|
|
|
|
|
10 |
/**
|
11 |
-
*
|
12 |
*/
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
window.jeg = window.jeg || {};
|
22 |
-
jeg.archive = {};
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
api.archivecontainer(id, new api.ArchiveContainer(id, parent, data));
|
27 |
-
};
|
28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
})(jQuery, wp.customize);
|
1 |
(function ($, api) {
|
2 |
"use strict";
|
|
|
|
|
|
|
3 |
/**
|
4 |
+
* Jeg Archive Builder
|
5 |
+
*/
|
6 |
+
$(document).on('ready', function() {
|
7 |
+
api.archivecontainer = new api.Values({defaultConstructor: api.ArchiveContainer});
|
8 |
+
|
9 |
/**
|
10 |
+
* Archive container class
|
11 |
*/
|
12 |
+
api.ArchiveContainer = api.BaseContainer.extend({
|
13 |
+
/**
|
14 |
+
* Set Container Holder
|
15 |
+
*/
|
16 |
+
setContainerHolder: function() {
|
17 |
+
this.containerHolder = api.archivecontainer;
|
18 |
+
},
|
19 |
+
});
|
|
|
|
|
20 |
|
21 |
+
window.jeg = window.jeg || {};
|
22 |
+
jeg.archive = {};
|
|
|
|
|
23 |
|
24 |
+
if ( 'undefined' !== typeof jeg && undefined !== jeg.archive && undefined !== window.jegWidgetData) {
|
25 |
+
var jegWidgetData = JSON.parse(window.jegWidgetData)
|
26 |
+
var parent = $("#" + jegWidgetData.id);
|
27 |
+
api.archivecontainer(jegWidgetData.id, new api.ArchiveContainer( jegWidgetData.id, parent, jegWidgetData.data));
|
28 |
+
}
|
29 |
+
})
|
30 |
})(jQuery, wp.customize);
|
lib/jeg-framework/assets/js/form/meta-box-container.js
CHANGED
@@ -83,5 +83,11 @@
|
|
83 |
}
|
84 |
};
|
85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
})(jQuery, wp.customize);
|
83 |
}
|
84 |
};
|
85 |
|
86 |
+
$(document).on('ready', function() {
|
87 |
+
var metaboxData = JSON.parse(window.jegMetaboxData)
|
88 |
+
if (undefined !== jeg.metabox) {
|
89 |
+
jeg.metabox.build(metaboxData.id, metaboxData.type, metaboxData.data);
|
90 |
+
}
|
91 |
+
})
|
92 |
|
93 |
})(jQuery, wp.customize);
|
lib/jeg-framework/assets/js/form/widget-container.js
CHANGED
@@ -59,10 +59,10 @@
|
|
59 |
if (undefined === data) {
|
60 |
//prevent if there are duplicate object id, causing parsing error
|
61 |
if ($('.widget-form-data[data-id="' + id + '"]').length>1) {
|
62 |
-
data = JSON.parse($('.widget-form-data[data-id="' + id + '"]')[0].
|
63 |
}
|
64 |
else{
|
65 |
-
data = JSON.parse($('.widget-form-data[data-id="' + id + '"]').
|
66 |
}
|
67 |
}
|
68 |
api.widgetcontainer.add(id, new api.WidgetContainer(id, parent, data))
|
@@ -293,6 +293,13 @@
|
|
293 |
jeg.widget.build(id, data)
|
294 |
}
|
295 |
}.bind(this))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
};
|
297 |
|
298 |
(function () {
|
59 |
if (undefined === data) {
|
60 |
//prevent if there are duplicate object id, causing parsing error
|
61 |
if ($('.widget-form-data[data-id="' + id + '"]').length>1) {
|
62 |
+
data = JSON.parse($('.widget-form-data[data-id="' + id + '"]')[0].val())
|
63 |
}
|
64 |
else{
|
65 |
+
data = JSON.parse($('.widget-form-data[data-id="' + id + '"]').val())
|
66 |
}
|
67 |
}
|
68 |
api.widgetcontainer.add(id, new api.WidgetContainer(id, parent, data))
|
293 |
jeg.widget.build(id, data)
|
294 |
}
|
295 |
}.bind(this))
|
296 |
+
|
297 |
+
$(document).ajaxComplete(function(e, xhr, settings) {
|
298 |
+
//rebuild the widget form after saving
|
299 |
+
if ('save-widget' === new URLSearchParams(settings.data).get('action') && undefined !== jeg.widget) {
|
300 |
+
jeg.widget.build($(xhr.responseText).closest('.widget-form-data').data('id'));
|
301 |
+
}
|
302 |
+
});
|
303 |
};
|
304 |
|
305 |
(function () {
|
lib/jeg-framework/assets/js/vendor/bootstrap.min.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/*!
|
2 |
-
* Bootstrap
|
3 |
-
* Copyright 2011-
|
4 |
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5 |
*/
|
6 |
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap={},t.jQuery,t.Popper)}(this,(function(t,e,n){"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=i(e),a=i(n);function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function l(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),t}function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function u(t){var e=this,n=!1;return o.default(this).one(d.TRANSITION_END,(function(){n=!0})),setTimeout((function(){n||d.triggerTransitionEnd(e)}),t),this}var d={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");if(!e||"#"===e){var n=t.getAttribute("href");e=n&&"#"!==n?n.trim():""}try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var e=o.default(t).css("transition-duration"),n=o.default(t).css("transition-delay"),i=parseFloat(e),a=parseFloat(n);return i||a?(e=e.split(",")[0],n=n.split(",")[0],1e3*(parseFloat(e)+parseFloat(n))):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){o.default(t).trigger("transitionend")},supportsTransitionEnd:function(){return Boolean("transitionend")},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var o=n[i],a=e[i],s=a&&d.isElement(a)?"element":null===(l=a)||"undefined"==typeof l?""+l:{}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(o).test(s))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+s+'" but expected type "'+o+'".')}var l},findShadowRoot:function(t){if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){var e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?d.findShadowRoot(t.parentNode):null},jQueryDetection:function(){if("undefined"==typeof o.default)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var t=o.default.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1===t[0]&&9===t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};d.jQueryDetection(),o.default.fn.emulateTransitionEnd=u,o.default.event.special[d.TRANSITION_END]={bindType:"transitionend",delegateType:"transitionend",handle:function(t){if(o.default(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}};var f="alert",c=o.default.fn[f],h=function(){function t(t){this._element=t}var e=t.prototype;return e.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.dispose=function(){o.default.removeData(this._element,"bs.alert"),this._element=null},e._getRootElement=function(t){var e=d.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n||(n=o.default(t).closest(".alert")[0]),n},e._triggerCloseEvent=function(t){var e=o.default.Event("close.bs.alert");return o.default(t).trigger(e),e},e._removeElement=function(t){var e=this;if(o.default(t).removeClass("show"),o.default(t).hasClass("fade")){var n=d.getTransitionDurationFromElement(t);o.default(t).one(d.TRANSITION_END,(function(n){return e._destroyElement(t,n)})).emulateTransitionEnd(n)}else this._destroyElement(t)},e._destroyElement=function(t){o.default(t).detach().trigger("closed.bs.alert").remove()},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this),i=n.data("bs.alert");i||(i=new t(this),n.data("bs.alert",i)),"close"===e&&i[e](this)}))},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},l(t,null,[{key:"VERSION",get:function(){return"4.5.3"}}]),t}();o.default(document).on("click.bs.alert.data-api",'[data-dismiss="alert"]',h._handleDismiss(new h)),o.default.fn[f]=h._jQueryInterface,o.default.fn[f].Constructor=h,o.default.fn[f].noConflict=function(){return o.default.fn[f]=c,h._jQueryInterface};var g=o.default.fn.button,m=function(){function t(t){this._element=t,this.shouldAvoidTriggerChange=!1}var e=t.prototype;return e.toggle=function(){var t=!0,e=!0,n=o.default(this._element).closest('[data-toggle="buttons"]')[0];if(n){var i=this._element.querySelector('input:not([type="hidden"])');if(i){if("radio"===i.type)if(i.checked&&this._element.classList.contains("active"))t=!1;else{var a=n.querySelector(".active");a&&o.default(a).removeClass("active")}t&&("checkbox"!==i.type&&"radio"!==i.type||(i.checked=!this._element.classList.contains("active")),this.shouldAvoidTriggerChange||o.default(i).trigger("change")),i.focus(),e=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(e&&this._element.setAttribute("aria-pressed",!this._element.classList.contains("active")),t&&o.default(this._element).toggleClass("active"))},e.dispose=function(){o.default.removeData(this._element,"bs.button"),this._element=null},t._jQueryInterface=function(e,n){return this.each((function(){var i=o.default(this),a=i.data("bs.button");a||(a=new t(this),i.data("bs.button",a)),a.shouldAvoidTriggerChange=n,"toggle"===e&&a[e]()}))},l(t,null,[{key:"VERSION",get:function(){return"4.5.3"}}]),t}();o.default(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(t){var e=t.target,n=e;if(o.default(e).hasClass("btn")||(e=o.default(e).closest(".btn")[0]),!e||e.hasAttribute("disabled")||e.classList.contains("disabled"))t.preventDefault();else{var i=e.querySelector('input:not([type="hidden"])');if(i&&(i.hasAttribute("disabled")||i.classList.contains("disabled")))return void t.preventDefault();"INPUT"!==n.tagName&&"LABEL"===e.tagName||m._jQueryInterface.call(o.default(e),"toggle","INPUT"===n.tagName)}})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(t){var e=o.default(t.target).closest(".btn")[0];o.default(e).toggleClass("focus",/^focus(in)?$/.test(t.type))})),o.default(window).on("load.bs.button.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),e=0,n=t.length;e<n;e++){var i=t[e],o=i.querySelector('input:not([type="hidden"])');o.checked||o.hasAttribute("checked")?i.classList.add("active"):i.classList.remove("active")}for(var a=0,s=(t=[].slice.call(document.querySelectorAll('[data-toggle="button"]'))).length;a<s;a++){var l=t[a];"true"===l.getAttribute("aria-pressed")?l.classList.add("active"):l.classList.remove("active")}})),o.default.fn.button=m._jQueryInterface,o.default.fn.button.Constructor=m,o.default.fn.button.noConflict=function(){return o.default.fn.button=g,m._jQueryInterface};var p="carousel",_=".bs.carousel",v=o.default.fn[p],b={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},y={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},E={TOUCH:"touch",PEN:"pen"},w=function(){function t(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._element=t,this._indicatorsElement=this._element.querySelector(".carousel-indicators"),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()}var e=t.prototype;return e.next=function(){this._isSliding||this._slide("next")},e.nextWhenVisible=function(){var t=o.default(this._element);!document.hidden&&t.is(":visible")&&"hidden"!==t.css("visibility")&&this.next()},e.prev=function(){this._isSliding||this._slide("prev")},e.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(d.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},e.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},e.to=function(t){var e=this;this._activeElement=this._element.querySelector(".active.carousel-item");var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)o.default(this._element).one("slid.bs.carousel",(function(){return e.to(t)}));else{if(n===t)return this.pause(),void this.cycle();var i=t>n?"next":"prev";this._slide(i,this._items[t])}},e.dispose=function(){o.default(this._element).off(_),o.default.removeData(this._element,"bs.carousel"),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},e._getConfig=function(t){return t=r({},b,t),d.typeCheckConfig(p,t,y),t},e._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0,e>0&&this.prev(),e<0&&this.next()}},e._addEventListeners=function(){var t=this;this._config.keyboard&&o.default(this._element).on("keydown.bs.carousel",(function(e){return t._keydown(e)})),"hover"===this._config.pause&&o.default(this._element).on("mouseenter.bs.carousel",(function(e){return t.pause(e)})).on("mouseleave.bs.carousel",(function(e){return t.cycle(e)})),this._config.touch&&this._addTouchEventListeners()},e._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var e=function(e){t._pointerEvent&&E[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},n=function(e){t._pointerEvent&&E[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&(t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};o.default(this._element.querySelectorAll(".carousel-item img")).on("dragstart.bs.carousel",(function(t){return t.preventDefault()})),this._pointerEvent?(o.default(this._element).on("pointerdown.bs.carousel",(function(t){return e(t)})),o.default(this._element).on("pointerup.bs.carousel",(function(t){return n(t)})),this._element.classList.add("pointer-event")):(o.default(this._element).on("touchstart.bs.carousel",(function(t){return e(t)})),o.default(this._element).on("touchmove.bs.carousel",(function(e){return function(e){e.originalEvent.touches&&e.originalEvent.touches.length>1?t.touchDeltaX=0:t.touchDeltaX=e.originalEvent.touches[0].clientX-t.touchStartX}(e)})),o.default(this._element).on("touchend.bs.carousel",(function(t){return n(t)})))}},e._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},e._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(t)},e._getItemByDirection=function(t,e){var n="next"===t,i="prev"===t,o=this._getItemIndex(e),a=this._items.length-1;if((i&&0===o||n&&o===a)&&!this._config.wrap)return e;var s=(o+("prev"===t?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},e._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),i=this._getItemIndex(this._element.querySelector(".active.carousel-item")),a=o.default.Event("slide.bs.carousel",{relatedTarget:t,direction:e,from:i,to:n});return o.default(this._element).trigger(a),a},e._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var e=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));o.default(e).removeClass("active");var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&o.default(n).addClass("active")}},e._slide=function(t,e){var n,i,a,s=this,l=this._element.querySelector(".active.carousel-item"),r=this._getItemIndex(l),u=e||l&&this._getItemByDirection(t,l),f=this._getItemIndex(u),c=Boolean(this._interval);if("next"===t?(n="carousel-item-left",i="carousel-item-next",a="left"):(n="carousel-item-right",i="carousel-item-prev",a="right"),u&&o.default(u).hasClass("active"))this._isSliding=!1;else if(!this._triggerSlideEvent(u,a).isDefaultPrevented()&&l&&u){this._isSliding=!0,c&&this.pause(),this._setActiveIndicatorElement(u);var h=o.default.Event("slid.bs.carousel",{relatedTarget:u,direction:a,from:r,to:f});if(o.default(this._element).hasClass("slide")){o.default(u).addClass(i),d.reflow(u),o.default(l).addClass(n),o.default(u).addClass(n);var g=parseInt(u.getAttribute("data-interval"),10);g?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=g):this._config.interval=this._config.defaultInterval||this._config.interval;var m=d.getTransitionDurationFromElement(l);o.default(l).one(d.TRANSITION_END,(function(){o.default(u).removeClass(n+" "+i).addClass("active"),o.default(l).removeClass("active "+i+" "+n),s._isSliding=!1,setTimeout((function(){return o.default(s._element).trigger(h)}),0)})).emulateTransitionEnd(m)}else o.default(l).removeClass("active"),o.default(u).addClass("active"),this._isSliding=!1,o.default(this._element).trigger(h);c&&this.cycle()}},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this).data("bs.carousel"),i=r({},b,o.default(this).data());"object"==typeof e&&(i=r({},i,e));var a="string"==typeof e?e:i.slide;if(n||(n=new t(this,i),o.default(this).data("bs.carousel",n)),"number"==typeof e)n.to(e);else if("string"==typeof a){if("undefined"==typeof n[a])throw new TypeError('No method named "'+a+'"');n[a]()}else i.interval&&i.ride&&(n.pause(),n.cycle())}))},t._dataApiClickHandler=function(e){var n=d.getSelectorFromElement(this);if(n){var i=o.default(n)[0];if(i&&o.default(i).hasClass("carousel")){var a=r({},o.default(i).data(),o.default(this).data()),s=this.getAttribute("data-slide-to");s&&(a.interval=!1),t._jQueryInterface.call(o.default(i),a),s&&o.default(i).data("bs.carousel").to(s),e.preventDefault()}}},l(t,null,[{key:"VERSION",get:function(){return"4.5.3"}},{key:"Default",get:function(){return b}}]),t}();o.default(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",w._dataApiClickHandler),o.default(window).on("load.bs.carousel.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-ride="carousel"]')),e=0,n=t.length;e<n;e++){var i=o.default(t[e]);w._jQueryInterface.call(i,i.data())}})),o.default.fn[p]=w._jQueryInterface,o.default.fn[p].Constructor=w,o.default.fn[p].noConflict=function(){return o.default.fn[p]=v,w._jQueryInterface};var T="collapse",C=o.default.fn[T],S={toggle:!0,parent:""},N={toggle:"boolean",parent:"(string|element)"},D=function(){function t(t,e){this._isTransitioning=!1,this._element=t,this._config=this._getConfig(e),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'));for(var n=[].slice.call(document.querySelectorAll('[data-toggle="collapse"]')),i=0,o=n.length;i<o;i++){var a=n[i],s=d.getSelectorFromElement(a),l=[].slice.call(document.querySelectorAll(s)).filter((function(e){return e===t}));null!==s&&l.length>0&&(this._selector=s,this._triggerArray.push(a))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var e=t.prototype;return e.toggle=function(){o.default(this._element).hasClass("show")?this.hide():this.show()},e.show=function(){var e,n,i=this;if(!this._isTransitioning&&!o.default(this._element).hasClass("show")&&(this._parent&&0===(e=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(t){return"string"==typeof i._config.parent?t.getAttribute("data-parent")===i._config.parent:t.classList.contains("collapse")}))).length&&(e=null),!(e&&(n=o.default(e).not(this._selector).data("bs.collapse"))&&n._isTransitioning))){var a=o.default.Event("show.bs.collapse");if(o.default(this._element).trigger(a),!a.isDefaultPrevented()){e&&(t._jQueryInterface.call(o.default(e).not(this._selector),"hide"),n||o.default(e).data("bs.collapse",null));var s=this._getDimension();o.default(this._element).removeClass("collapse").addClass("collapsing"),this._element.style[s]=0,this._triggerArray.length&&o.default(this._triggerArray).removeClass("collapsed").attr("aria-expanded",!0),this.setTransitioning(!0);var l="scroll"+(s[0].toUpperCase()+s.slice(1)),r=d.getTransitionDurationFromElement(this._element);o.default(this._element).one(d.TRANSITION_END,(function(){o.default(i._element).removeClass("collapsing").addClass("collapse show"),i._element.style[s]="",i.setTransitioning(!1),o.default(i._element).trigger("shown.bs.collapse")})).emulateTransitionEnd(r),this._element.style[s]=this._element[l]+"px"}}},e.hide=function(){var t=this;if(!this._isTransitioning&&o.default(this._element).hasClass("show")){var e=o.default.Event("hide.bs.collapse");if(o.default(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",d.reflow(this._element),o.default(this._element).addClass("collapsing").removeClass("collapse show");var i=this._triggerArray.length;if(i>0)for(var a=0;a<i;a++){var s=this._triggerArray[a],l=d.getSelectorFromElement(s);if(null!==l)o.default([].slice.call(document.querySelectorAll(l))).hasClass("show")||o.default(s).addClass("collapsed").attr("aria-expanded",!1)}this.setTransitioning(!0);this._element.style[n]="";var r=d.getTransitionDurationFromElement(this._element);o.default(this._element).one(d.TRANSITION_END,(function(){t.setTransitioning(!1),o.default(t._element).removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")})).emulateTransitionEnd(r)}}},e.setTransitioning=function(t){this._isTransitioning=t},e.dispose=function(){o.default.removeData(this._element,"bs.collapse"),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},e._getConfig=function(t){return(t=r({},S,t)).toggle=Boolean(t.toggle),d.typeCheckConfig(T,t,N),t},e._getDimension=function(){return o.default(this._element).hasClass("width")?"width":"height"},e._getParent=function(){var e,n=this;d.isElement(this._config.parent)?(e=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(e=this._config.parent[0])):e=document.querySelector(this._config.parent);var i='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',a=[].slice.call(e.querySelectorAll(i));return o.default(a).each((function(e,i){n._addAriaAndCollapsedClass(t._getTargetFromElement(i),[i])})),e},e._addAriaAndCollapsedClass=function(t,e){var n=o.default(t).hasClass("show");e.length&&o.default(e).toggleClass("collapsed",!n).attr("aria-expanded",n)},t._getTargetFromElement=function(t){var e=d.getSelectorFromElement(t);return e?document.querySelector(e):null},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this),i=n.data("bs.collapse"),a=r({},S,n.data(),"object"==typeof e&&e?e:{});if(!i&&a.toggle&&"string"==typeof e&&/show|hide/.test(e)&&(a.toggle=!1),i||(i=new t(this,a),n.data("bs.collapse",i)),"string"==typeof e){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}}))},l(t,null,[{key:"VERSION",get:function(){return"4.5.3"}},{key:"Default",get:function(){return S}}]),t}();o.default(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var e=o.default(this),n=d.getSelectorFromElement(this),i=[].slice.call(document.querySelectorAll(n));o.default(i).each((function(){var t=o.default(this),n=t.data("bs.collapse")?"toggle":e.data();D._jQueryInterface.call(t,n)}))})),o.default.fn[T]=D._jQueryInterface,o.default.fn[T].Constructor=D,o.default.fn[T].noConflict=function(){return o.default.fn[T]=C,D._jQueryInterface};var k="dropdown",A=o.default.fn[k],I=new RegExp("38|40|27"),j={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},O={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},x=function(){function t(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var e=t.prototype;return e.toggle=function(){if(!this._element.disabled&&!o.default(this._element).hasClass("disabled")){var e=o.default(this._menu).hasClass("show");t._clearMenus(),e||this.show(!0)}},e.show=function(e){if(void 0===e&&(e=!1),!(this._element.disabled||o.default(this._element).hasClass("disabled")||o.default(this._menu).hasClass("show"))){var n={relatedTarget:this._element},i=o.default.Event("show.bs.dropdown",n),s=t._getParentFromElement(this._element);if(o.default(s).trigger(i),!i.isDefaultPrevented()){if(!this._inNavbar&&e){if("undefined"==typeof a.default)throw new TypeError("Bootstrap's dropdowns require Popper.js (https://popper.js.org/)");var l=this._element;"parent"===this._config.reference?l=s:d.isElement(this._config.reference)&&(l=this._config.reference,"undefined"!=typeof this._config.reference.jquery&&(l=this._config.reference[0])),"scrollParent"!==this._config.boundary&&o.default(s).addClass("position-static"),this._popper=new a.default(l,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===o.default(s).closest(".navbar-nav").length&&o.default(document.body).children().on("mouseover",null,o.default.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),o.default(this._menu).toggleClass("show"),o.default(s).toggleClass("show").trigger(o.default.Event("shown.bs.dropdown",n))}}},e.hide=function(){if(!this._element.disabled&&!o.default(this._element).hasClass("disabled")&&o.default(this._menu).hasClass("show")){var e={relatedTarget:this._element},n=o.default.Event("hide.bs.dropdown",e),i=t._getParentFromElement(this._element);o.default(i).trigger(n),n.isDefaultPrevented()||(this._popper&&this._popper.destroy(),o.default(this._menu).toggleClass("show"),o.default(i).toggleClass("show").trigger(o.default.Event("hidden.bs.dropdown",e)))}},e.dispose=function(){o.default.removeData(this._element,"bs.dropdown"),o.default(this._element).off(".bs.dropdown"),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},e.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},e._addEventListeners=function(){var t=this;o.default(this._element).on("click.bs.dropdown",(function(e){e.preventDefault(),e.stopPropagation(),t.toggle()}))},e._getConfig=function(t){return t=r({},this.constructor.Default,o.default(this._element).data(),t),d.typeCheckConfig(k,t,this.constructor.DefaultType),t},e._getMenuElement=function(){if(!this._menu){var e=t._getParentFromElement(this._element);e&&(this._menu=e.querySelector(".dropdown-menu"))}return this._menu},e._getPlacement=function(){var t=o.default(this._element.parentNode),e="bottom-start";return t.hasClass("dropup")?e=o.default(this._menu).hasClass("dropdown-menu-right")?"top-end":"top-start":t.hasClass("dropright")?e="right-start":t.hasClass("dropleft")?e="left-start":o.default(this._menu).hasClass("dropdown-menu-right")&&(e="bottom-end"),e},e._detectNavbar=function(){return o.default(this._element).closest(".navbar").length>0},e._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=r({},e.offsets,t._config.offset(e.offsets,t._element)||{}),e}:e.offset=this._config.offset,e},e._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),r({},t,this._config.popperConfig)},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this).data("bs.dropdown");if(n||(n=new t(this,"object"==typeof e?e:null),o.default(this).data("bs.dropdown",n)),"string"==typeof e){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},t._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var n=[].slice.call(document.querySelectorAll('[data-toggle="dropdown"]')),i=0,a=n.length;i<a;i++){var s=t._getParentFromElement(n[i]),l=o.default(n[i]).data("bs.dropdown"),r={relatedTarget:n[i]};if(e&&"click"===e.type&&(r.clickEvent=e),l){var u=l._menu;if(o.default(s).hasClass("show")&&!(e&&("click"===e.type&&/input|textarea/i.test(e.target.tagName)||"keyup"===e.type&&9===e.which)&&o.default.contains(s,e.target))){var d=o.default.Event("hide.bs.dropdown",r);o.default(s).trigger(d),d.isDefaultPrevented()||("ontouchstart"in document.documentElement&&o.default(document.body).children().off("mouseover",null,o.default.noop),n[i].setAttribute("aria-expanded","false"),l._popper&&l._popper.destroy(),o.default(u).removeClass("show"),o.default(s).removeClass("show").trigger(o.default.Event("hidden.bs.dropdown",r)))}}}},t._getParentFromElement=function(t){var e,n=d.getSelectorFromElement(t);return n&&(e=document.querySelector(n)),e||t.parentNode},t._dataApiKeydownHandler=function(e){if(!(/input|textarea/i.test(e.target.tagName)?32===e.which||27!==e.which&&(40!==e.which&&38!==e.which||o.default(e.target).closest(".dropdown-menu").length):!I.test(e.which))&&!this.disabled&&!o.default(this).hasClass("disabled")){var n=t._getParentFromElement(this),i=o.default(n).hasClass("show");if(i||27!==e.which){if(e.preventDefault(),e.stopPropagation(),!i||27===e.which||32===e.which)return 27===e.which&&o.default(n.querySelector('[data-toggle="dropdown"]')).trigger("focus"),void o.default(this).trigger("click");var a=[].slice.call(n.querySelectorAll(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)")).filter((function(t){return o.default(t).is(":visible")}));if(0!==a.length){var s=a.indexOf(e.target);38===e.which&&s>0&&s--,40===e.which&&s<a.length-1&&s++,s<0&&(s=0),a[s].focus()}}}},l(t,null,[{key:"VERSION",get:function(){return"4.5.3"}},{key:"Default",get:function(){return j}},{key:"DefaultType",get:function(){return O}}]),t}();o.default(document).on("keydown.bs.dropdown.data-api",'[data-toggle="dropdown"]',x._dataApiKeydownHandler).on("keydown.bs.dropdown.data-api",".dropdown-menu",x._dataApiKeydownHandler).on("click.bs.dropdown.data-api keyup.bs.dropdown.data-api",x._clearMenus).on("click.bs.dropdown.data-api",'[data-toggle="dropdown"]',(function(t){t.preventDefault(),t.stopPropagation(),x._jQueryInterface.call(o.default(this),"toggle")})).on("click.bs.dropdown.data-api",".dropdown form",(function(t){t.stopPropagation()})),o.default.fn[k]=x._jQueryInterface,o.default.fn[k].Constructor=x,o.default.fn[k].noConflict=function(){return o.default.fn[k]=A,x._jQueryInterface};var P=o.default.fn.modal,R={backdrop:!0,keyboard:!0,focus:!0,show:!0},L={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},q=function(){function t(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=t.querySelector(".modal-dialog"),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollbarWidth=0}var e=t.prototype;return e.toggle=function(t){return this._isShown?this.hide():this.show(t)},e.show=function(t){var e=this;if(!this._isShown&&!this._isTransitioning){o.default(this._element).hasClass("fade")&&(this._isTransitioning=!0);var n=o.default.Event("show.bs.modal",{relatedTarget:t});o.default(this._element).trigger(n),this._isShown||n.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),o.default(this._element).on("click.dismiss.bs.modal",'[data-dismiss="modal"]',(function(t){return e.hide(t)})),o.default(this._dialog).on("mousedown.dismiss.bs.modal",(function(){o.default(e._element).one("mouseup.dismiss.bs.modal",(function(t){o.default(t.target).is(e._element)&&(e._ignoreBackdropClick=!0)}))})),this._showBackdrop((function(){return e._showElement(t)})))}},e.hide=function(t){var e=this;if(t&&t.preventDefault(),this._isShown&&!this._isTransitioning){var n=o.default.Event("hide.bs.modal");if(o.default(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()){this._isShown=!1;var i=o.default(this._element).hasClass("fade");if(i&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),o.default(document).off("focusin.bs.modal"),o.default(this._element).removeClass("show"),o.default(this._element).off("click.dismiss.bs.modal"),o.default(this._dialog).off("mousedown.dismiss.bs.modal"),i){var a=d.getTransitionDurationFromElement(this._element);o.default(this._element).one(d.TRANSITION_END,(function(t){return e._hideModal(t)})).emulateTransitionEnd(a)}else this._hideModal()}}},e.dispose=function(){[window,this._element,this._dialog].forEach((function(t){return o.default(t).off(".bs.modal")})),o.default(document).off("focusin.bs.modal"),o.default.removeData(this._element,"bs.modal"),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._isTransitioning=null,this._scrollbarWidth=null},e.handleUpdate=function(){this._adjustDialog()},e._getConfig=function(t){return t=r({},R,t),d.typeCheckConfig("modal",t,L),t},e._triggerBackdropTransition=function(){var t=this;if("static"===this._config.backdrop){var e=o.default.Event("hidePrevented.bs.modal");if(o.default(this._element).trigger(e),e.isDefaultPrevented())return;var n=this._element.scrollHeight>document.documentElement.clientHeight;n||(this._element.style.overflowY="hidden"),this._element.classList.add("modal-static");var i=d.getTransitionDurationFromElement(this._dialog);o.default(this._element).off(d.TRANSITION_END),o.default(this._element).one(d.TRANSITION_END,(function(){t._element.classList.remove("modal-static"),n||o.default(t._element).one(d.TRANSITION_END,(function(){t._element.style.overflowY=""})).emulateTransitionEnd(t._element,i)})).emulateTransitionEnd(i),this._element.focus()}else this.hide()},e._showElement=function(t){var e=this,n=o.default(this._element).hasClass("fade"),i=this._dialog?this._dialog.querySelector(".modal-body"):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),o.default(this._dialog).hasClass("modal-dialog-scrollable")&&i?i.scrollTop=0:this._element.scrollTop=0,n&&d.reflow(this._element),o.default(this._element).addClass("show"),this._config.focus&&this._enforceFocus();var a=o.default.Event("shown.bs.modal",{relatedTarget:t}),s=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,o.default(e._element).trigger(a)};if(n){var l=d.getTransitionDurationFromElement(this._dialog);o.default(this._dialog).one(d.TRANSITION_END,s).emulateTransitionEnd(l)}else s()},e._enforceFocus=function(){var t=this;o.default(document).off("focusin.bs.modal").on("focusin.bs.modal",(function(e){document!==e.target&&t._element!==e.target&&0===o.default(t._element).has(e.target).length&&t._element.focus()}))},e._setEscapeEvent=function(){var t=this;this._isShown?o.default(this._element).on("keydown.dismiss.bs.modal",(function(e){t._config.keyboard&&27===e.which?(e.preventDefault(),t.hide()):t._config.keyboard||27!==e.which||t._triggerBackdropTransition()})):this._isShown||o.default(this._element).off("keydown.dismiss.bs.modal")},e._setResizeEvent=function(){var t=this;this._isShown?o.default(window).on("resize.bs.modal",(function(e){return t.handleUpdate(e)})):o.default(window).off("resize.bs.modal")},e._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){o.default(document.body).removeClass("modal-open"),t._resetAdjustments(),t._resetScrollbar(),o.default(t._element).trigger("hidden.bs.modal")}))},e._removeBackdrop=function(){this._backdrop&&(o.default(this._backdrop).remove(),this._backdrop=null)},e._showBackdrop=function(t){var e=this,n=o.default(this._element).hasClass("fade")?"fade":"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",n&&this._backdrop.classList.add(n),o.default(this._backdrop).appendTo(document.body),o.default(this._element).on("click.dismiss.bs.modal",(function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&e._triggerBackdropTransition()})),n&&d.reflow(this._backdrop),o.default(this._backdrop).addClass("show"),!t)return;if(!n)return void t();var i=d.getTransitionDurationFromElement(this._backdrop);o.default(this._backdrop).one(d.TRANSITION_END,t).emulateTransitionEnd(i)}else if(!this._isShown&&this._backdrop){o.default(this._backdrop).removeClass("show");var a=function(){e._removeBackdrop(),t&&t()};if(o.default(this._element).hasClass("fade")){var s=d.getTransitionDurationFromElement(this._backdrop);o.default(this._backdrop).one(d.TRANSITION_END,a).emulateTransitionEnd(s)}else a()}else t&&t()},e._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},e._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},e._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},e._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){var e=[].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top")),n=[].slice.call(document.querySelectorAll(".sticky-top"));o.default(e).each((function(e,n){var i=n.style.paddingRight,a=o.default(n).css("padding-right");o.default(n).data("padding-right",i).css("padding-right",parseFloat(a)+t._scrollbarWidth+"px")})),o.default(n).each((function(e,n){var i=n.style.marginRight,a=o.default(n).css("margin-right");o.default(n).data("margin-right",i).css("margin-right",parseFloat(a)-t._scrollbarWidth+"px")}));var i=document.body.style.paddingRight,a=o.default(document.body).css("padding-right");o.default(document.body).data("padding-right",i).css("padding-right",parseFloat(a)+this._scrollbarWidth+"px")}o.default(document.body).addClass("modal-open")},e._resetScrollbar=function(){var t=[].slice.call(document.querySelectorAll(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top"));o.default(t).each((function(t,e){var n=o.default(e).data("padding-right");o.default(e).removeData("padding-right"),e.style.paddingRight=n||""}));var e=[].slice.call(document.querySelectorAll(".sticky-top"));o.default(e).each((function(t,e){var n=o.default(e).data("margin-right");"undefined"!=typeof n&&o.default(e).css("margin-right",n).removeData("margin-right")}));var n=o.default(document.body).data("padding-right");o.default(document.body).removeData("padding-right"),document.body.style.paddingRight=n||""},e._getScrollbarWidth=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},t._jQueryInterface=function(e,n){return this.each((function(){var i=o.default(this).data("bs.modal"),a=r({},R,o.default(this).data(),"object"==typeof e&&e?e:{});if(i||(i=new t(this,a),o.default(this).data("bs.modal",i)),"string"==typeof e){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e](n)}else a.show&&i.show(n)}))},l(t,null,[{key:"VERSION",get:function(){return"4.5.3"}},{key:"Default",get:function(){return R}}]),t}();o.default(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(t){var e,n=this,i=d.getSelectorFromElement(this);i&&(e=document.querySelector(i));var a=o.default(e).data("bs.modal")?"toggle":r({},o.default(e).data(),o.default(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var s=o.default(e).one("show.bs.modal",(function(t){t.isDefaultPrevented()||s.one("hidden.bs.modal",(function(){o.default(n).is(":visible")&&n.focus()}))}));q._jQueryInterface.call(o.default(e),a,this)})),o.default.fn.modal=q._jQueryInterface,o.default.fn.modal.Constructor=q,o.default.fn.modal.noConflict=function(){return o.default.fn.modal=P,q._jQueryInterface};var F=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],Q={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},B=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi,H=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;function U(t,e,n){if(0===t.length)return t;if(n&&"function"==typeof n)return n(t);for(var i=(new window.DOMParser).parseFromString(t,"text/html"),o=Object.keys(e),a=[].slice.call(i.body.querySelectorAll("*")),s=function(t,n){var i=a[t],s=i.nodeName.toLowerCase();if(-1===o.indexOf(i.nodeName.toLowerCase()))return i.parentNode.removeChild(i),"continue";var l=[].slice.call(i.attributes),r=[].concat(e["*"]||[],e[s]||[]);l.forEach((function(t){(function(t,e){var n=t.nodeName.toLowerCase();if(-1!==e.indexOf(n))return-1===F.indexOf(n)||Boolean(t.nodeValue.match(B)||t.nodeValue.match(H));for(var i=e.filter((function(t){return t instanceof RegExp})),o=0,a=i.length;o<a;o++)if(n.match(i[o]))return!0;return!1})(t,r)||i.removeAttribute(t.nodeName)}))},l=0,r=a.length;l<r;l++)s(l);return i.body.innerHTML}var M="tooltip",W=o.default.fn[M],V=new RegExp("(^|\\s)bs-tooltip\\S+","g"),z=["sanitize","whiteList","sanitizeFn"],K={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},X={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},Y={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",sanitize:!0,sanitizeFn:null,whiteList:Q,popperConfig:null},$={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},J=function(){function t(t,e){if("undefined"==typeof a.default)throw new TypeError("Bootstrap's tooltips require Popper.js (https://popper.js.org/)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var e=t.prototype;return e.enable=function(){this._isEnabled=!0},e.disable=function(){this._isEnabled=!1},e.toggleEnabled=function(){this._isEnabled=!this._isEnabled},e.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=o.default(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),o.default(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(o.default(this.getTipElement()).hasClass("show"))return void this._leave(null,this);this._enter(null,this)}},e.dispose=function(){clearTimeout(this._timeout),o.default.removeData(this.element,this.constructor.DATA_KEY),o.default(this.element).off(this.constructor.EVENT_KEY),o.default(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&o.default(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},e.show=function(){var t=this;if("none"===o.default(this.element).css("display"))throw new Error("Please use show on visible elements");var e=o.default.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){o.default(this.element).trigger(e);var n=d.findShadowRoot(this.element),i=o.default.contains(null!==n?n:this.element.ownerDocument.documentElement,this.element);if(e.isDefaultPrevented()||!i)return;var s=this.getTipElement(),l=d.getUID(this.constructor.NAME);s.setAttribute("id",l),this.element.setAttribute("aria-describedby",l),this.setContent(),this.config.animation&&o.default(s).addClass("fade");var r="function"==typeof this.config.placement?this.config.placement.call(this,s,this.element):this.config.placement,u=this._getAttachment(r);this.addAttachmentClass(u);var f=this._getContainer();o.default(s).data(this.constructor.DATA_KEY,this),o.default.contains(this.element.ownerDocument.documentElement,this.tip)||o.default(s).appendTo(f),o.default(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new a.default(this.element,s,this._getPopperConfig(u)),o.default(s).addClass("show"),"ontouchstart"in document.documentElement&&o.default(document.body).children().on("mouseover",null,o.default.noop);var c=function(){t.config.animation&&t._fixTransition();var e=t._hoverState;t._hoverState=null,o.default(t.element).trigger(t.constructor.Event.SHOWN),"out"===e&&t._leave(null,t)};if(o.default(this.tip).hasClass("fade")){var h=d.getTransitionDurationFromElement(this.tip);o.default(this.tip).one(d.TRANSITION_END,c).emulateTransitionEnd(h)}else c()}},e.hide=function(t){var e=this,n=this.getTipElement(),i=o.default.Event(this.constructor.Event.HIDE),a=function(){"show"!==e._hoverState&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),o.default(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(o.default(this.element).trigger(i),!i.isDefaultPrevented()){if(o.default(n).removeClass("show"),"ontouchstart"in document.documentElement&&o.default(document.body).children().off("mouseover",null,o.default.noop),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,o.default(this.tip).hasClass("fade")){var s=d.getTransitionDurationFromElement(n);o.default(n).one(d.TRANSITION_END,a).emulateTransitionEnd(s)}else a();this._hoverState=""}},e.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},e.isWithContent=function(){return Boolean(this.getTitle())},e.addAttachmentClass=function(t){o.default(this.getTipElement()).addClass("bs-tooltip-"+t)},e.getTipElement=function(){return this.tip=this.tip||o.default(this.config.template)[0],this.tip},e.setContent=function(){var t=this.getTipElement();this.setElementContent(o.default(t.querySelectorAll(".tooltip-inner")),this.getTitle()),o.default(t).removeClass("fade show")},e.setElementContent=function(t,e){"object"!=typeof e||!e.nodeType&&!e.jquery?this.config.html?(this.config.sanitize&&(e=U(e,this.config.whiteList,this.config.sanitizeFn)),t.html(e)):t.text(e):this.config.html?o.default(e).parent().is(t)||t.empty().append(e):t.text(o.default(e).text())},e.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},e._getPopperConfig=function(t){var e=this;return r({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}},this.config.popperConfig)},e._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=r({},e.offsets,t.config.offset(e.offsets,t.element)||{}),e}:e.offset=this.config.offset,e},e._getContainer=function(){return!1===this.config.container?document.body:d.isElement(this.config.container)?o.default(this.config.container):o.default(document).find(this.config.container)},e._getAttachment=function(t){return X[t.toUpperCase()]},e._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(e){if("click"===e)o.default(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==e){var n="hover"===e?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,i="hover"===e?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;o.default(t.element).on(n,t.config.selector,(function(e){return t._enter(e)})).on(i,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},o.default(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=r({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},e._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},e._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||o.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),o.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?"focus":"hover"]=!0),o.default(e.getTipElement()).hasClass("show")||"show"===e._hoverState?e._hoverState="show":(clearTimeout(e._timeout),e._hoverState="show",e.config.delay&&e.config.delay.show?e._timeout=setTimeout((function(){"show"===e._hoverState&&e.show()}),e.config.delay.show):e.show())},e._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||o.default(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),o.default(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?"focus":"hover"]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState="out",e.config.delay&&e.config.delay.hide?e._timeout=setTimeout((function(){"out"===e._hoverState&&e.hide()}),e.config.delay.hide):e.hide())},e._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},e._getConfig=function(t){var e=o.default(this.element).data();return Object.keys(e).forEach((function(t){-1!==z.indexOf(t)&&delete e[t]})),"number"==typeof(t=r({},this.constructor.Default,e,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),d.typeCheckConfig(M,t,this.constructor.DefaultType),t.sanitize&&(t.template=U(t.template,t.whiteList,t.sanitizeFn)),t},e._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},e._cleanTipClass=function(){var t=o.default(this.getTipElement()),e=t.attr("class").match(V);null!==e&&e.length&&t.removeClass(e.join(""))},e._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},e._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(o.default(t).removeClass("fade"),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this),i=n.data("bs.tooltip"),a="object"==typeof e&&e;if((i||!/dispose|hide/.test(e))&&(i||(i=new t(this,a),n.data("bs.tooltip",i)),"string"==typeof e)){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}}))},l(t,null,[{key:"VERSION",get:function(){return"4.5.3"}},{key:"Default",get:function(){return Y}},{key:"NAME",get:function(){return M}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return $}},{key:"EVENT_KEY",get:function(){return".bs.tooltip"}},{key:"DefaultType",get:function(){return K}}]),t}();o.default.fn[M]=J._jQueryInterface,o.default.fn[M].Constructor=J,o.default.fn[M].noConflict=function(){return o.default.fn[M]=W,J._jQueryInterface};var G="popover",Z=o.default.fn[G],tt=new RegExp("(^|\\s)bs-popover\\S+","g"),et=r({},J.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),nt=r({},J.DefaultType,{content:"(string|element|function)"}),it={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"},ot=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var a=i.prototype;return a.isWithContent=function(){return this.getTitle()||this._getContent()},a.addAttachmentClass=function(t){o.default(this.getTipElement()).addClass("bs-popover-"+t)},a.getTipElement=function(){return this.tip=this.tip||o.default(this.config.template)[0],this.tip},a.setContent=function(){var t=o.default(this.getTipElement());this.setElementContent(t.find(".popover-header"),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(".popover-body"),e),t.removeClass("fade show")},a._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},a._cleanTipClass=function(){var t=o.default(this.getTipElement()),e=t.attr("class").match(tt);null!==e&&e.length>0&&t.removeClass(e.join(""))},i._jQueryInterface=function(t){return this.each((function(){var e=o.default(this).data("bs.popover"),n="object"==typeof t?t:null;if((e||!/dispose|hide/.test(t))&&(e||(e=new i(this,n),o.default(this).data("bs.popover",e)),"string"==typeof t)){if("undefined"==typeof e[t])throw new TypeError('No method named "'+t+'"');e[t]()}}))},l(i,null,[{key:"VERSION",get:function(){return"4.5.3"}},{key:"Default",get:function(){return et}},{key:"NAME",get:function(){return G}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return it}},{key:"EVENT_KEY",get:function(){return".bs.popover"}},{key:"DefaultType",get:function(){return nt}}]),i}(J);o.default.fn[G]=ot._jQueryInterface,o.default.fn[G].Constructor=ot,o.default.fn[G].noConflict=function(){return o.default.fn[G]=Z,ot._jQueryInterface};var at="scrollspy",st=o.default.fn[at],lt={offset:10,method:"auto",target:""},rt={offset:"number",method:"string",target:"(string|element)"},ut=function(){function t(t,e){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" .nav-link,"+this._config.target+" .list-group-item,"+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,o.default(this._scrollElement).on("scroll.bs.scrollspy",(function(t){return n._process(t)})),this.refresh(),this._process()}var e=t.prototype;return e.refresh=function(){var t=this,e=this._scrollElement===this._scrollElement.window?"offset":"position",n="auto"===this._config.method?e:this._config.method,i="position"===n?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var e,a=d.getSelectorFromElement(t);if(a&&(e=document.querySelector(a)),e){var s=e.getBoundingClientRect();if(s.width||s.height)return[o.default(e)[n]().top+i,a]}return null})).filter((function(t){return t})).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},e.dispose=function(){o.default.removeData(this._element,"bs.scrollspy"),o.default(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},e._getConfig=function(t){if("string"!=typeof(t=r({},lt,"object"==typeof t&&t?t:{})).target&&d.isElement(t.target)){var e=o.default(t.target).attr("id");e||(e=d.getUID(at),o.default(t.target).attr("id",e)),t.target="#"+e}return d.typeCheckConfig(at,t,rt),t},e._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},e._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},e._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},e._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&("undefined"==typeof this._offsets[o+1]||t<this._offsets[o+1])&&this._activate(this._targets[o])}}},e._activate=function(t){this._activeTarget=t,this._clear();var e=this._selector.split(",").map((function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'})),n=o.default([].slice.call(document.querySelectorAll(e.join(","))));n.hasClass("dropdown-item")?(n.closest(".dropdown").find(".dropdown-toggle").addClass("active"),n.addClass("active")):(n.addClass("active"),n.parents(".nav, .list-group").prev(".nav-link, .list-group-item").addClass("active"),n.parents(".nav, .list-group").prev(".nav-item").children(".nav-link").addClass("active")),o.default(this._scrollElement).trigger("activate.bs.scrollspy",{relatedTarget:t})},e._clear=function(){[].slice.call(document.querySelectorAll(this._selector)).filter((function(t){return t.classList.contains("active")})).forEach((function(t){return t.classList.remove("active")}))},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this).data("bs.scrollspy");if(n||(n=new t(this,"object"==typeof e&&e),o.default(this).data("bs.scrollspy",n)),"string"==typeof e){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}}))},l(t,null,[{key:"VERSION",get:function(){return"4.5.3"}},{key:"Default",get:function(){return lt}}]),t}();o.default(window).on("load.bs.scrollspy.data-api",(function(){for(var t=[].slice.call(document.querySelectorAll('[data-spy="scroll"]')),e=t.length;e--;){var n=o.default(t[e]);ut._jQueryInterface.call(n,n.data())}})),o.default.fn[at]=ut._jQueryInterface,o.default.fn[at].Constructor=ut,o.default.fn[at].noConflict=function(){return o.default.fn[at]=st,ut._jQueryInterface};var dt=o.default.fn.tab,ft=function(){function t(t){this._element=t}var e=t.prototype;return e.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&o.default(this._element).hasClass("active")||o.default(this._element).hasClass("disabled"))){var e,n,i=o.default(this._element).closest(".nav, .list-group")[0],a=d.getSelectorFromElement(this._element);if(i){var s="UL"===i.nodeName||"OL"===i.nodeName?"> li > .active":".active";n=(n=o.default.makeArray(o.default(i).find(s)))[n.length-1]}var l=o.default.Event("hide.bs.tab",{relatedTarget:this._element}),r=o.default.Event("show.bs.tab",{relatedTarget:n});if(n&&o.default(n).trigger(l),o.default(this._element).trigger(r),!r.isDefaultPrevented()&&!l.isDefaultPrevented()){a&&(e=document.querySelector(a)),this._activate(this._element,i);var u=function(){var e=o.default.Event("hidden.bs.tab",{relatedTarget:t._element}),i=o.default.Event("shown.bs.tab",{relatedTarget:n});o.default(n).trigger(e),o.default(t._element).trigger(i)};e?this._activate(e,e.parentNode,u):u()}}},e.dispose=function(){o.default.removeData(this._element,"bs.tab"),this._element=null},e._activate=function(t,e,n){var i=this,a=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?o.default(e).children(".active"):o.default(e).find("> li > .active"))[0],s=n&&a&&o.default(a).hasClass("fade"),l=function(){return i._transitionComplete(t,a,n)};if(a&&s){var r=d.getTransitionDurationFromElement(a);o.default(a).removeClass("show").one(d.TRANSITION_END,l).emulateTransitionEnd(r)}else l()},e._transitionComplete=function(t,e,n){if(e){o.default(e).removeClass("active");var i=o.default(e.parentNode).find("> .dropdown-menu .active")[0];i&&o.default(i).removeClass("active"),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(o.default(t).addClass("active"),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),d.reflow(t),t.classList.contains("fade")&&t.classList.add("show"),t.parentNode&&o.default(t.parentNode).hasClass("dropdown-menu")){var a=o.default(t).closest(".dropdown")[0];if(a){var s=[].slice.call(a.querySelectorAll(".dropdown-toggle"));o.default(s).addClass("active")}t.setAttribute("aria-expanded",!0)}n&&n()},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this),i=n.data("bs.tab");if(i||(i=new t(this),n.data("bs.tab",i)),"string"==typeof e){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}}))},l(t,null,[{key:"VERSION",get:function(){return"4.5.3"}}]),t}();o.default(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',(function(t){t.preventDefault(),ft._jQueryInterface.call(o.default(this),"show")})),o.default.fn.tab=ft._jQueryInterface,o.default.fn.tab.Constructor=ft,o.default.fn.tab.noConflict=function(){return o.default.fn.tab=dt,ft._jQueryInterface};var ct=o.default.fn.toast,ht={animation:"boolean",autohide:"boolean",delay:"number"},gt={animation:!0,autohide:!0,delay:500},mt=function(){function t(t,e){this._element=t,this._config=this._getConfig(e),this._timeout=null,this._setListeners()}var e=t.prototype;return e.show=function(){var t=this,e=o.default.Event("show.bs.toast");if(o.default(this._element).trigger(e),!e.isDefaultPrevented()){this._clearTimeout(),this._config.animation&&this._element.classList.add("fade");var n=function(){t._element.classList.remove("showing"),t._element.classList.add("show"),o.default(t._element).trigger("shown.bs.toast"),t._config.autohide&&(t._timeout=setTimeout((function(){t.hide()}),t._config.delay))};if(this._element.classList.remove("hide"),d.reflow(this._element),this._element.classList.add("showing"),this._config.animation){var i=d.getTransitionDurationFromElement(this._element);o.default(this._element).one(d.TRANSITION_END,n).emulateTransitionEnd(i)}else n()}},e.hide=function(){if(this._element.classList.contains("show")){var t=o.default.Event("hide.bs.toast");o.default(this._element).trigger(t),t.isDefaultPrevented()||this._close()}},e.dispose=function(){this._clearTimeout(),this._element.classList.contains("show")&&this._element.classList.remove("show"),o.default(this._element).off("click.dismiss.bs.toast"),o.default.removeData(this._element,"bs.toast"),this._element=null,this._config=null},e._getConfig=function(t){return t=r({},gt,o.default(this._element).data(),"object"==typeof t&&t?t:{}),d.typeCheckConfig("toast",t,this.constructor.DefaultType),t},e._setListeners=function(){var t=this;o.default(this._element).on("click.dismiss.bs.toast",'[data-dismiss="toast"]',(function(){return t.hide()}))},e._close=function(){var t=this,e=function(){t._element.classList.add("hide"),o.default(t._element).trigger("hidden.bs.toast")};if(this._element.classList.remove("show"),this._config.animation){var n=d.getTransitionDurationFromElement(this._element);o.default(this._element).one(d.TRANSITION_END,e).emulateTransitionEnd(n)}else e()},e._clearTimeout=function(){clearTimeout(this._timeout),this._timeout=null},t._jQueryInterface=function(e){return this.each((function(){var n=o.default(this),i=n.data("bs.toast");if(i||(i=new t(this,"object"==typeof e&&e),n.data("bs.toast",i)),"string"==typeof e){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e](this)}}))},l(t,null,[{key:"VERSION",get:function(){return"4.5.3"}},{key:"DefaultType",get:function(){return ht}},{key:"Default",get:function(){return gt}}]),t}();o.default.fn.toast=mt._jQueryInterface,o.default.fn.toast.Constructor=mt,o.default.fn.toast.noConflict=function(){return o.default.fn.toast=ct,mt._jQueryInterface},t.Alert=h,t.Button=m,t.Carousel=w,t.Collapse=D,t.Dropdown=x,t.Modal=q,t.Popover=ot,t.Scrollspy=ut,t.Tab=ft,t.Toast=mt,t.Tooltip=J,t.Util=d,Object.defineProperty(t,"__esModule",{value:!0})}));
|
7 |
-
|
1 |
/*!
|
2 |
+
* Bootstrap v5.2.2 (https://getbootstrap.com/)
|
3 |
+
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4 |
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5 |
*/
|
6 |
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e(t.Popper)}(this,(function(t){"use strict";function e(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const i in t)if("default"!==i){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const i=e(t),s="transitionend",n=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e},o=t=>{const e=n(t);return e&&document.querySelector(e)?e:null},r=t=>{const e=n(t);return e?document.querySelector(e):null},a=t=>{t.dispatchEvent(new Event(s))},l=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),c=t=>l(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,h=t=>{if(!l(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},d=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),u=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?u(t.parentNode):null},_=()=>{},g=t=>{t.offsetHeight},f=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,p=[],m=()=>"rtl"===document.documentElement.dir,b=t=>{var e;e=()=>{const e=f();if(e){const i=t.NAME,s=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=s,t.jQueryInterface)}},"loading"===document.readyState?(p.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of p)t()})),p.push(e)):e()},v=t=>{"function"==typeof t&&t()},y=(t,e,i=!0)=>{if(!i)return void v(t);const n=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const s=Number.parseFloat(e),n=Number.parseFloat(i);return s||n?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let o=!1;const r=({target:i})=>{i===e&&(o=!0,e.removeEventListener(s,r),v(t))};e.addEventListener(s,r),setTimeout((()=>{o||a(e)}),n)},w=(t,e,i,s)=>{const n=t.length;let o=t.indexOf(e);return-1===o?!i&&s?t[n-1]:t[0]:(o+=i?1:-1,s&&(o=(o+n)%n),t[Math.max(0,Math.min(o,n-1))])},A=/[^.]*(?=\..*)\.|.*/,E=/\..*/,C=/::\d+$/,T={};let k=1;const L={mouseenter:"mouseover",mouseleave:"mouseout"},O=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function I(t,e){return e&&`${e}::${k++}`||t.uidEvent||k++}function S(t){const e=I(t);return t.uidEvent=e,T[e]=T[e]||{},T[e]}function D(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function N(t,e,i){const s="string"==typeof e,n=s?i:e||i;let o=j(t);return O.has(o)||(o=t),[s,n,o]}function P(t,e,i,s,n){if("string"!=typeof e||!t)return;let[o,r,a]=N(e,i,s);if(e in L){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=S(t),c=l[a]||(l[a]={}),h=D(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&n);const d=I(r,e.replace(A,"")),u=o?function(t,e,i){return function s(n){const o=t.querySelectorAll(e);for(let{target:r}=n;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return F(n,{delegateTarget:r}),s.oneOff&&$.off(t,n.type,e,i),i.apply(r,[n])}}(t,i,r):function(t,e){return function i(s){return F(s,{delegateTarget:t}),i.oneOff&&$.off(t,s.type,e),e.apply(t,[s])}}(t,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=n,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function x(t,e,i,s,n){const o=D(e[i],s,n);o&&(t.removeEventListener(i,o,Boolean(n)),delete e[i][o.uidEvent])}function M(t,e,i,s){const n=e[i]||{};for(const o of Object.keys(n))if(o.includes(s)){const s=n[o];x(t,e,i,s.callable,s.delegationSelector)}}function j(t){return t=t.replace(E,""),L[t]||t}const $={on(t,e,i,s){P(t,e,i,s,!1)},one(t,e,i,s){P(t,e,i,s,!0)},off(t,e,i,s){if("string"!=typeof e||!t)return;const[n,o,r]=N(e,i,s),a=r!==e,l=S(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))M(t,l,i,e.slice(1));for(const i of Object.keys(c)){const s=i.replace(C,"");if(!a||e.includes(s)){const e=c[i];x(t,l,r,e.callable,e.delegationSelector)}}}else{if(!Object.keys(c).length)return;x(t,l,r,o,n?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const s=f();let n=null,o=!0,r=!0,a=!1;e!==j(e)&&s&&(n=s.Event(e,i),s(t).trigger(n),o=!n.isPropagationStopped(),r=!n.isImmediatePropagationStopped(),a=n.isDefaultPrevented());let l=new Event(e,{bubbles:o,cancelable:!0});return l=F(l,i),a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&n&&n.preventDefault(),l}};function F(t,e){for(const[i,s]of Object.entries(e||{}))try{t[i]=s}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>s})}return t}const z=new Map,H={set(t,e,i){z.has(t)||z.set(t,new Map);const s=z.get(t);s.has(e)||0===s.size?s.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(t,e)=>z.has(t)&&z.get(t).get(e)||null,remove(t,e){if(!z.has(t))return;const i=z.get(t);i.delete(e),0===i.size&&z.delete(t)}};function q(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function B(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const W={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${B(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${B(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const s of i){let i=s.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=q(t.dataset[s])}return e},getDataAttribute:(t,e)=>q(t.getAttribute(`data-bs-${B(e)}`))};class R{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=l(e)?W.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...l(e)?W.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const s of Object.keys(e)){const n=e[s],o=t[s],r=l(o)?"element":null==(i=o)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(n).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${s}" provided type "${r}" but expected type "${n}".`)}var i}}class V extends R{constructor(t,e){super(),(t=c(t))&&(this._element=t,this._config=this._getConfig(e),H.set(this._element,this.constructor.DATA_KEY,this))}dispose(){H.remove(this._element,this.constructor.DATA_KEY),$.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){y(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return H.get(c(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.2.2"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const K=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,s=t.NAME;$.on(document,i,`[data-bs-dismiss="${s}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),d(this))return;const n=r(this)||this.closest(`.${s}`);t.getOrCreateInstance(n)[e]()}))};class Q extends V{static get NAME(){return"alert"}close(){if($.trigger(this._element,"close.bs.alert").defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),$.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=Q.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}K(Q,"close"),b(Q);const X='[data-bs-toggle="button"]';class Y extends V{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=Y.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}$.on(document,"click.bs.button.data-api",X,(t=>{t.preventDefault();const e=t.target.closest(X);Y.getOrCreateInstance(e).toggle()})),b(Y);const U={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let s=t.parentNode.closest(e);for(;s;)i.push(s),s=s.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!d(t)&&h(t)))}},G={endCallback:null,leftCallback:null,rightCallback:null},J={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Z extends R{constructor(t,e){super(),this._element=t,t&&Z.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return G}static get DefaultType(){return J}static get NAME(){return"swipe"}dispose(){$.off(this._element,".bs.swipe")}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),v(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&v(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?($.on(this._element,"pointerdown.bs.swipe",(t=>this._start(t))),$.on(this._element,"pointerup.bs.swipe",(t=>this._end(t))),this._element.classList.add("pointer-event")):($.on(this._element,"touchstart.bs.swipe",(t=>this._start(t))),$.on(this._element,"touchmove.bs.swipe",(t=>this._move(t))),$.on(this._element,"touchend.bs.swipe",(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const tt="next",et="prev",it="left",st="right",nt="slid.bs.carousel",ot="carousel",rt="active",at={ArrowLeft:st,ArrowRight:it},lt={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},ct={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class ht extends V{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=U.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===ot&&this.cycle()}static get Default(){return lt}static get DefaultType(){return ct}static get NAME(){return"carousel"}next(){this._slide(tt)}nextWhenVisible(){!document.hidden&&h(this._element)&&this.next()}prev(){this._slide(et)}pause(){this._isSliding&&a(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?$.one(this._element,nt,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void $.one(this._element,nt,(()=>this.to(t)));const i=this._getItemIndex(this._getActive());if(i===t)return;const s=t>i?tt:et;this._slide(s,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&$.on(this._element,"keydown.bs.carousel",(t=>this._keydown(t))),"hover"===this._config.pause&&($.on(this._element,"mouseenter.bs.carousel",(()=>this.pause())),$.on(this._element,"mouseleave.bs.carousel",(()=>this._maybeEnableCycle()))),this._config.touch&&Z.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of U.find(".carousel-item img",this._element))$.on(t,"dragstart.bs.carousel",(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(it)),rightCallback:()=>this._slide(this._directionToOrder(st)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new Z(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=at[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=U.findOne(".active",this._indicatorsElement);e.classList.remove(rt),e.removeAttribute("aria-current");const i=U.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(rt),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),s=t===tt,n=e||w(this._getItems(),i,s,this._config.wrap);if(n===i)return;const o=this._getItemIndex(n),r=e=>$.trigger(this._element,e,{relatedTarget:n,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r("slide.bs.carousel").defaultPrevented)return;if(!i||!n)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=n;const l=s?"carousel-item-start":"carousel-item-end",c=s?"carousel-item-next":"carousel-item-prev";n.classList.add(c),g(n),i.classList.add(l),n.classList.add(l),this._queueCallback((()=>{n.classList.remove(l,c),n.classList.add(rt),i.classList.remove(rt,c,l),this._isSliding=!1,r(nt)}),i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return U.findOne(".active.carousel-item",this._element)}_getItems(){return U.find(".carousel-item",this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return m()?t===it?et:tt:t===it?tt:et}_orderToDirection(t){return m()?t===et?it:st:t===et?st:it}static jQueryInterface(t){return this.each((function(){const e=ht.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}$.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",(function(t){const e=r(this);if(!e||!e.classList.contains(ot))return;t.preventDefault();const i=ht.getOrCreateInstance(e),s=this.getAttribute("data-bs-slide-to");return s?(i.to(s),void i._maybeEnableCycle()):"next"===W.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())})),$.on(window,"load.bs.carousel.data-api",(()=>{const t=U.find('[data-bs-ride="carousel"]');for(const e of t)ht.getOrCreateInstance(e)})),b(ht);const dt="show",ut="collapse",_t="collapsing",gt='[data-bs-toggle="collapse"]',ft={parent:null,toggle:!0},pt={parent:"(null|element)",toggle:"boolean"};class mt extends V{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=U.find(gt);for(const t of i){const e=o(t),i=U.find(e).filter((t=>t===this._element));null!==e&&i.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return ft}static get DefaultType(){return pt}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t=>t!==this._element)).map((t=>mt.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if($.trigger(this._element,"show.bs.collapse").defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(ut),this._element.classList.add(_t),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(_t),this._element.classList.add(ut,dt),this._element.style[e]="",$.trigger(this._element,"shown.bs.collapse")}),this._element,!0),this._element.style[e]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if($.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,g(this._element),this._element.classList.add(_t),this._element.classList.remove(ut,dt);for(const t of this._triggerArray){const e=r(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(_t),this._element.classList.add(ut),$.trigger(this._element,"hidden.bs.collapse")}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(dt)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=c(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(gt);for(const e of t){const t=r(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=U.find(":scope .collapse .collapse",this._config.parent);return U.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle("collapsed",!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const i=mt.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}$.on(document,"click.bs.collapse.data-api",gt,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=o(this),i=U.find(e);for(const t of i)mt.getOrCreateInstance(t,{toggle:!1}).toggle()})),b(mt);const bt="dropdown",vt="ArrowUp",yt="ArrowDown",wt="click.bs.dropdown.data-api",At="keydown.bs.dropdown.data-api",Et="show",Ct='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Tt=`${Ct}.show`,kt=".dropdown-menu",Lt=m()?"top-end":"top-start",Ot=m()?"top-start":"top-end",It=m()?"bottom-end":"bottom-start",St=m()?"bottom-start":"bottom-end",Dt=m()?"left-start":"right-start",Nt=m()?"right-start":"left-start",Pt={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},xt={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Mt extends V{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=U.next(this._element,kt)[0]||U.prev(this._element,kt)[0]||U.findOne(kt,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Pt}static get DefaultType(){return xt}static get NAME(){return bt}toggle(){return this._isShown()?this.hide():this.show()}show(){if(d(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!$.trigger(this._element,"show.bs.dropdown",t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))$.on(t,"mouseover",_);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Et),this._element.classList.add(Et),$.trigger(this._element,"shown.bs.dropdown",t)}}hide(){if(d(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!$.trigger(this._element,"hide.bs.dropdown",t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))$.off(t,"mouseover",_);this._popper&&this._popper.destroy(),this._menu.classList.remove(Et),this._element.classList.remove(Et),this._element.setAttribute("aria-expanded","false"),W.removeDataAttribute(this._menu,"popper"),$.trigger(this._element,"hidden.bs.dropdown",t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!l(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${bt.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===i)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:l(this._config.reference)?t=c(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=i.createPopper(t,this._menu,e)}_isShown(){return this._menu.classList.contains(Et)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return Dt;if(t.classList.contains("dropstart"))return Nt;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?Ot:Lt:e?St:It}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(W.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const i=U.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((t=>h(t)));i.length&&w(i,e,t===yt,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=Mt.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=U.find(Tt);for(const i of e){const e=Mt.getInstance(i);if(!e||!1===e._config.autoClose)continue;const s=t.composedPath(),n=s.includes(e._menu);if(s.includes(e._element)||"inside"===e._config.autoClose&&!n||"outside"===e._config.autoClose&&n)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i="Escape"===t.key,s=[vt,yt].includes(t.key);if(!s&&!i)return;if(e&&!i)return;t.preventDefault();const n=this.matches(Ct)?this:U.prev(this,Ct)[0]||U.next(this,Ct)[0]||U.findOne(Ct,t.delegateTarget.parentNode),o=Mt.getOrCreateInstance(n);if(s)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),n.focus())}}$.on(document,At,Ct,Mt.dataApiKeydownHandler),$.on(document,At,kt,Mt.dataApiKeydownHandler),$.on(document,wt,Mt.clearMenus),$.on(document,"keyup.bs.dropdown.data-api",Mt.clearMenus),$.on(document,wt,Ct,(function(t){t.preventDefault(),Mt.getOrCreateInstance(this).toggle()})),b(Mt);const jt=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",$t=".sticky-top",Ft="padding-right",zt="margin-right";class Ht{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Ft,(e=>e+t)),this._setElementAttributes(jt,Ft,(e=>e+t)),this._setElementAttributes($t,zt,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Ft),this._resetElementAttributes(jt,Ft),this._resetElementAttributes($t,zt)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const s=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+s)return;this._saveInitialAttribute(t,e);const n=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(n))}px`)}))}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&W.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const i=W.getDataAttribute(t,e);null!==i?(W.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(l(t))e(t);else for(const i of U.find(t,this._element))e(i)}}const qt="show",Bt="mousedown.bs.backdrop",Wt={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Rt={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Vt extends R{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Wt}static get DefaultType(){return Rt}static get NAME(){return"backdrop"}show(t){if(!this._config.isVisible)return void v(t);this._append();const e=this._getElement();this._config.isAnimated&&g(e),e.classList.add(qt),this._emulateAnimation((()=>{v(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(qt),this._emulateAnimation((()=>{this.dispose(),v(t)}))):v(t)}dispose(){this._isAppended&&($.off(this._element,Bt),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=c(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),$.on(t,Bt,(()=>{v(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){y(t,this._getElement(),this._config.isAnimated)}}const Kt=".bs.focustrap",Qt="backward",Xt={autofocus:!0,trapElement:null},Yt={autofocus:"boolean",trapElement:"element"};class Ut extends R{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Xt}static get DefaultType(){return Yt}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),$.off(document,Kt),$.on(document,"focusin.bs.focustrap",(t=>this._handleFocusin(t))),$.on(document,"keydown.tab.bs.focustrap",(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,$.off(document,Kt))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=U.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===Qt?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?Qt:"forward")}}const Gt="hidden.bs.modal",Jt="show.bs.modal",Zt="modal-open",te="show",ee="modal-static",ie={backdrop:!0,focus:!0,keyboard:!0},se={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class ne extends V{constructor(t,e){super(t,e),this._dialog=U.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Ht,this._addEventListeners()}static get Default(){return ie}static get DefaultType(){return se}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||$.trigger(this._element,Jt,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Zt),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&($.trigger(this._element,"hide.bs.modal").defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(te),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){for(const t of[window,this._dialog])$.off(t,".bs.modal");this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Vt({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Ut({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=U.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),g(this._element),this._element.classList.add(te),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,$.trigger(this._element,"shown.bs.modal",{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){$.on(this._element,"keydown.dismiss.bs.modal",(t=>{if("Escape"===t.key)return this._config.keyboard?(t.preventDefault(),void this.hide()):void this._triggerBackdropTransition()})),$.on(window,"resize.bs.modal",(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),$.on(this._element,"mousedown.dismiss.bs.modal",(t=>{$.one(this._element,"click.dismiss.bs.modal",(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(Zt),this._resetAdjustments(),this._scrollBar.reset(),$.trigger(this._element,Gt)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if($.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(ee)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(ee),this._queueCallback((()=>{this._element.classList.remove(ee),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=m()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=m()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=ne.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}$.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(t){const e=r(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),$.one(e,Jt,(t=>{t.defaultPrevented||$.one(e,Gt,(()=>{h(this)&&this.focus()}))}));const i=U.findOne(".modal.show");i&&ne.getInstance(i).hide(),ne.getOrCreateInstance(e).toggle(this)})),K(ne),b(ne);const oe="show",re="showing",ae="hiding",le=".offcanvas.show",ce="hidePrevented.bs.offcanvas",he="hidden.bs.offcanvas",de={backdrop:!0,keyboard:!0,scroll:!1},ue={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class _e extends V{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return de}static get DefaultType(){return ue}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||$.trigger(this._element,"show.bs.offcanvas",{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new Ht).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(re),this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(oe),this._element.classList.remove(re),$.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:t})}),this._element,!0))}hide(){this._isShown&&($.trigger(this._element,"hide.bs.offcanvas").defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(ae),this._backdrop.hide(),this._queueCallback((()=>{this._element.classList.remove(oe,ae),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new Ht).reset(),$.trigger(this._element,he)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new Vt({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():$.trigger(this._element,ce)}:null})}_initializeFocusTrap(){return new Ut({trapElement:this._element})}_addEventListeners(){$.on(this._element,"keydown.dismiss.bs.offcanvas",(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():$.trigger(this._element,ce))}))}static jQueryInterface(t){return this.each((function(){const e=_e.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}$.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',(function(t){const e=r(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),d(this))return;$.one(e,he,(()=>{h(this)&&this.focus()}));const i=U.findOne(le);i&&i!==e&&_e.getInstance(i).hide(),_e.getOrCreateInstance(e).toggle(this)})),$.on(window,"load.bs.offcanvas.data-api",(()=>{for(const t of U.find(le))_e.getOrCreateInstance(t).show()})),$.on(window,"resize.bs.offcanvas",(()=>{for(const t of U.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&_e.getOrCreateInstance(t).hide()})),K(_e),b(_e);const ge=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),fe=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,pe=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,me=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!ge.has(i)||Boolean(fe.test(t.nodeValue)||pe.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(i)))},be={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},ve={allowList:be,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},ye={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},we={entry:"(string|element|function|null)",selector:"(string|element)"};class Ae extends R{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return ve}static get DefaultType(){return ye}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},we)}_setContent(t,e,i){const s=U.findOne(i,t);s&&((e=this._resolvePossibleFunction(e))?l(e)?this._putElementInTemplate(c(e),s):this._config.html?s.innerHTML=this._maybeSanitize(e):s.textContent=e:s.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const s=(new window.DOMParser).parseFromString(t,"text/html"),n=[].concat(...s.body.querySelectorAll("*"));for(const t of n){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const s=[].concat(...t.attributes),n=[].concat(e["*"]||[],e[i]||[]);for(const e of s)me(e,n)||t.removeAttribute(e.nodeName)}return s.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return"function"==typeof t?t(this):t}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const Ee=new Set(["sanitize","allowList","sanitizeFn"]),Ce="fade",Te="show",ke=".modal",Le="hide.bs.modal",Oe="hover",Ie="focus",Se={AUTO:"auto",TOP:"top",RIGHT:m()?"left":"right",BOTTOM:"bottom",LEFT:m()?"right":"left"},De={allowList:be,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},Ne={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Pe extends V{constructor(t,e){if(void 0===i)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return De}static get DefaultType(){return Ne}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),$.off(this._element.closest(ke),Le,this._hideModalHandler),this.tip&&this.tip.remove(),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=$.trigger(this._element,this.constructor.eventName("show")),e=(u(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this.tip&&(this.tip.remove(),this.tip=null);const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:s}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(s.append(i),$.trigger(this._element,this.constructor.eventName("inserted"))),this._popper?this._popper.update():this._popper=this._createPopper(i),i.classList.add(Te),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))$.on(t,"mouseover",_);this._queueCallback((()=>{$.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(!this._isShown())return;if($.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented)return;const t=this._getTipElement();if(t.classList.remove(Te),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))$.off(t,"mouseover",_);this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||t.remove(),this._element.removeAttribute("aria-describedby"),$.trigger(this._element,this.constructor.eventName("hidden")),this._disposePopper())}),this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(Ce,Te),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(Ce),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new Ae({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Ce)}_isShown(){return this.tip&&this.tip.classList.contains(Te)}_createPopper(t){const e="function"==typeof this._config.placement?this._config.placement.call(this,t,this._element):this._config.placement,s=Se[e.toUpperCase()];return i.createPopper(this._element,t,this._getPopperConfig(s))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return"function"==typeof t?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)$.on(this._element,this.constructor.eventName("click"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const t=e===Oe?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=e===Oe?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");$.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?Ie:Oe]=!0,e._enter()})),$.on(this._element,i,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?Ie:Oe]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},$.on(this._element.closest(ke),Le,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=W.getDataAttributes(this._element);for(const t of Object.keys(e))Ee.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:c(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(t){return this.each((function(){const e=Pe.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}b(Pe);const xe={...Pe.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},Me={...Pe.DefaultType,content:"(null|string|element|function)"};class je extends Pe{static get Default(){return xe}static get DefaultType(){return Me}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=je.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}b(je);const $e="click.bs.scrollspy",Fe="active",ze="[href]",He={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},qe={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Be extends V{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return He}static get DefaultType(){return qe}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=c(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&($.off(this._config.target,$e),$.on(this._config.target,$e,ze,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,s=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:s,behavior:"smooth"});i.scrollTop=s}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},s=(this._rootElement||document.documentElement).scrollTop,n=s>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=s;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(n&&t){if(i(o),!s)return}else n||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=U.find(ze,this._config.target);for(const e of t){if(!e.hash||d(e))continue;const t=U.findOne(e.hash,this._element);h(t)&&(this._targetLinks.set(e.hash,e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Fe),this._activateParents(t),$.trigger(this._element,"activate.bs.scrollspy",{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))U.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Fe);else for(const e of U.parents(t,".nav, .list-group"))for(const t of U.prev(e,".nav-link, .nav-item > .nav-link, .list-group-item"))t.classList.add(Fe)}_clearActiveClass(t){t.classList.remove(Fe);const e=U.find("[href].active",t);for(const t of e)t.classList.remove(Fe)}static jQueryInterface(t){return this.each((function(){const e=Be.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}$.on(window,"load.bs.scrollspy.data-api",(()=>{for(const t of U.find('[data-bs-spy="scroll"]'))Be.getOrCreateInstance(t)})),b(Be);const We="ArrowLeft",Re="ArrowRight",Ve="ArrowUp",Ke="ArrowDown",Qe="active",Xe="fade",Ye="show",Ue='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Ge=`.nav-link:not(.dropdown-toggle), .list-group-item:not(.dropdown-toggle), [role="tab"]:not(.dropdown-toggle), ${Ue}`;class Je extends V{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),$.on(this._element,"keydown.bs.tab",(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?$.trigger(e,"hide.bs.tab",{relatedTarget:t}):null;$.trigger(t,"show.bs.tab",{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(Qe),this._activate(r(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),$.trigger(t,"shown.bs.tab",{relatedTarget:e})):t.classList.add(Ye)}),t,t.classList.contains(Xe)))}_deactivate(t,e){t&&(t.classList.remove(Qe),t.blur(),this._deactivate(r(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),$.trigger(t,"hidden.bs.tab",{relatedTarget:e})):t.classList.remove(Ye)}),t,t.classList.contains(Xe)))}_keydown(t){if(![We,Re,Ve,Ke].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=[Re,Ke].includes(t.key),i=w(this._getChildren().filter((t=>!d(t))),t.target,e,!0);i&&(i.focus({preventScroll:!0}),Je.getOrCreateInstance(i).show())}_getChildren(){return U.find(Ge,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=r(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`#${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains("dropdown"))return;const s=(t,s)=>{const n=U.findOne(t,i);n&&n.classList.toggle(s,e)};s(".dropdown-toggle",Qe),s(".dropdown-menu",Ye),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(Qe)}_getInnerElement(t){return t.matches(Ge)?t:U.findOne(Ge,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=Je.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}$.on(document,"click.bs.tab",Ue,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),d(this)||Je.getOrCreateInstance(this).show()})),$.on(window,"load.bs.tab",(()=>{for(const t of U.find('.active[data-bs-toggle="tab"], .active[data-bs-toggle="pill"], .active[data-bs-toggle="list"]'))Je.getOrCreateInstance(t)})),b(Je);const Ze="hide",ti="show",ei="showing",ii={animation:"boolean",autohide:"boolean",delay:"number"},si={animation:!0,autohide:!0,delay:5e3};class ni extends V{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return si}static get DefaultType(){return ii}static get NAME(){return"toast"}show(){$.trigger(this._element,"show.bs.toast").defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(Ze),g(this._element),this._element.classList.add(ti,ei),this._queueCallback((()=>{this._element.classList.remove(ei),$.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&($.trigger(this._element,"hide.bs.toast").defaultPrevented||(this._element.classList.add(ei),this._queueCallback((()=>{this._element.classList.add(Ze),this._element.classList.remove(ei,ti),$.trigger(this._element,"hidden.bs.toast")}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(ti),super.dispose()}isShown(){return this._element.classList.contains(ti)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){$.on(this._element,"mouseover.bs.toast",(t=>this._onInteraction(t,!0))),$.on(this._element,"mouseout.bs.toast",(t=>this._onInteraction(t,!1))),$.on(this._element,"focusin.bs.toast",(t=>this._onInteraction(t,!0))),$.on(this._element,"focusout.bs.toast",(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=ni.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}return K(ni),b(ni),{Alert:Q,Button:Y,Carousel:ht,Collapse:mt,Dropdown:Mt,Modal:ne,Offcanvas:_e,Popover:je,ScrollSpy:Be,Tab:Je,Toast:ni,Tooltip:Pe}}));
|
7 |
+
//# sourceMappingURL=bootstrap.min.js.map
|
lib/jeg-framework/assets/js/vendor/selectize.min.js
CHANGED
@@ -1,3 +1,2 @@
|
|
1 |
-
/*! selectize.js - v0.
|
2 |
-
!function(a,b){"function"==typeof define&&define.amd?define(["jquery","sifter","microplugin"],b):"object"==typeof exports?module.exports=b(require("jquery"),require("sifter"),require("microplugin")):a.Selectize=b(a.jQuery,a.Sifter,a.MicroPlugin)}(this,function(a,b,c){"use strict";var d=function(a,b){if("string"!=typeof b||b.length){var c="string"==typeof b?new RegExp(b,"i"):b,d=function(a){var b=0;if(3===a.nodeType){var e=a.data.search(c);if(e>=0&&a.data.length>0){var f=a.data.match(c),g=document.createElement("span");g.className="highlight";var h=a.splitText(e),i=(h.splitText(f[0].length),h.cloneNode(!0));g.appendChild(i),h.parentNode.replaceChild(g,h),b=1}}else if(1===a.nodeType&&a.childNodes&&!/(script|style)/i.test(a.tagName))for(var j=0;j<a.childNodes.length;++j)j+=d(a.childNodes[j]);return b};return a.each(function(){d(this)})}};a.fn.removeHighlight=function(){return this.find("span.highlight").each(function(){this.parentNode.firstChild.nodeName;var a=this.parentNode;a.replaceChild(this.firstChild,this),a.normalize()}).end()};var e=function(){};e.prototype={on:function(a,b){this._events=this._events||{},this._events[a]=this._events[a]||[],this._events[a].push(b)},off:function(a,b){var c=arguments.length;return 0===c?delete this._events:1===c?delete this._events[a]:(this._events=this._events||{},void(a in this._events!=!1&&this._events[a].splice(this._events[a].indexOf(b),1)))},trigger:function(a){if(this._events=this._events||{},a in this._events!=!1)for(var b=0;b<this._events[a].length;b++)this._events[a][b].apply(this,Array.prototype.slice.call(arguments,1))}},e.mixin=function(a){for(var b=["on","off","trigger"],c=0;c<b.length;c++)a.prototype[b[c]]=e.prototype[b[c]]};var f=/Mac/.test(navigator.userAgent),g=65,h=13,i=27,j=37,k=38,l=80,m=39,n=40,o=78,p=8,q=46,r=16,s=f?91:17,t=f?18:17,u=9,v=1,w=2,x=!/android/i.test(window.navigator.userAgent)&&!!document.createElement("input").validity,y=function(a){return"undefined"!=typeof a},z=function(a){return"undefined"==typeof a||null===a?null:"boolean"==typeof a?a?"1":"0":a+""},A=function(a){return(a+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},B={};B.before=function(a,b,c){var d=a[b];a[b]=function(){return c.apply(a,arguments),d.apply(a,arguments)}},B.after=function(a,b,c){var d=a[b];a[b]=function(){var b=d.apply(a,arguments);return c.apply(a,arguments),b}};var C=function(a){var b=!1;return function(){b||(b=!0,a.apply(this,arguments))}},D=function(a,b){var c;return function(){var d=this,e=arguments;window.clearTimeout(c),c=window.setTimeout(function(){a.apply(d,e)},b)}},E=function(a,b,c){var d,e=a.trigger,f={};a.trigger=function(){var c=arguments[0];return b.indexOf(c)===-1?e.apply(a,arguments):void(f[c]=arguments)},c.apply(a,[]),a.trigger=e;for(d in f)f.hasOwnProperty(d)&&e.apply(a,f[d])},F=function(a,b,c,d){a.on(b,c,function(b){for(var c=b.target;c&&c.parentNode!==a[0];)c=c.parentNode;return b.currentTarget=c,d.apply(this,[b])})},G=function(a){var b={};if("selectionStart"in a)b.start=a.selectionStart,b.length=a.selectionEnd-b.start;else if(document.selection){a.focus();var c=document.selection.createRange(),d=document.selection.createRange().text.length;c.moveStart("character",-a.value.length),b.start=c.text.length-d,b.length=d}return b},H=function(a,b,c){var d,e,f={};if(c)for(d=0,e=c.length;d<e;d++)f[c[d]]=a.css(c[d]);else f=a.css();b.css(f)},I=function(b,c){if(!b)return 0;var d=a("<test>").css({position:"absolute",top:-99999,left:-99999,width:"auto",padding:0,whiteSpace:"pre"}).text(b).appendTo("body");H(c,d,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]);var e=d.width();return d.remove(),e},J=function(a){var b=null,c=function(c,d){var e,f,g,h,i,j,k,l;c=c||window.event||{},d=d||{},c.metaKey||c.altKey||(d.force||a.data("grow")!==!1)&&(e=a.val(),c.type&&"keydown"===c.type.toLowerCase()&&(f=c.keyCode,g=f>=97&&f<=122||f>=65&&f<=90||f>=48&&f<=57||32===f,f===q||f===p?(l=G(a[0]),l.length?e=e.substring(0,l.start)+e.substring(l.start+l.length):f===p&&l.start?e=e.substring(0,l.start-1)+e.substring(l.start+1):f===q&&"undefined"!=typeof l.start&&(e=e.substring(0,l.start)+e.substring(l.start+1))):g&&(j=c.shiftKey,k=String.fromCharCode(c.keyCode),k=j?k.toUpperCase():k.toLowerCase(),e+=k)),h=a.attr("placeholder"),!e&&h&&(e=h),i=I(e,a)+4,i!==b&&(b=i,a.width(i),a.triggerHandler("resize")))};a.on("keydown keyup update blur",c),c()},K=function(a){var b=document.createElement("div");return b.appendChild(a.cloneNode(!0)),b.innerHTML},L=function(a,b){b||(b={});var c="Selectize";console.error(c+": "+a),b.explanation&&(console.group&&console.group(),console.error(b.explanation),console.group&&console.groupEnd())},M=function(c,d){var e,f,g,h,i=this;h=c[0],h.selectize=i;var j=window.getComputedStyle&&window.getComputedStyle(h,null);if(g=j?j.getPropertyValue("direction"):h.currentStyle&&h.currentStyle.direction,g=g||c.parents("[dir]:first").attr("dir")||"",a.extend(i,{order:0,settings:d,$input:c,tabIndex:c.attr("tabindex")||"",tagType:"select"===h.tagName.toLowerCase()?v:w,rtl:/rtl/i.test(g),eventNS:".selectize"+ ++M.count,highlightedValue:null,isOpen:!1,isDisabled:!1,isRequired:c.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",caretPos:0,loading:0,loadedSearches:{},$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:null===d.loadThrottle?i.onSearchChange:D(i.onSearchChange,d.loadThrottle)}),i.sifter=new b(this.options,{diacritics:d.diacritics}),i.settings.options){for(e=0,f=i.settings.options.length;e<f;e++)i.registerOption(i.settings.options[e]);delete i.settings.options}if(i.settings.optgroups){for(e=0,f=i.settings.optgroups.length;e<f;e++)i.registerOptionGroup(i.settings.optgroups[e]);delete i.settings.optgroups}i.settings.mode=i.settings.mode||(1===i.settings.maxItems?"single":"multi"),"boolean"!=typeof i.settings.hideSelected&&(i.settings.hideSelected="multi"===i.settings.mode),i.initializePlugins(i.settings.plugins),i.setupCallbacks(),i.setupTemplates(),i.setup()};return e.mixin(M),"undefined"!=typeof c?c.mixin(M):L("Dependency MicroPlugin is missing",{explanation:'Make sure you either: (1) are using the "standalone" version of Selectize, or (2) require MicroPlugin before you load Selectize.'}),a.extend(M.prototype,{setup:function(){var b,c,d,e,g,h,i,j,k,l,m=this,n=m.settings,o=m.eventNS,p=a(window),q=a(document),u=m.$input;if(i=m.settings.mode,j=u.attr("class")||"",b=a("<div>").addClass(n.wrapperClass).addClass(j).addClass(i),c=a("<div>").addClass(n.inputClass).addClass("items").appendTo(b),d=a('<input type="text" autocomplete="off" />').appendTo(c).attr("tabindex",u.is(":disabled")?"-1":m.tabIndex),h=a(n.dropdownParent||b),e=a("<div>").addClass(n.dropdownClass).addClass(i).hide().appendTo(h),g=a("<div>").addClass(n.dropdownContentClass).appendTo(e),(l=u.attr("id"))&&(d.attr("id",l+"-selectized"),a("label[for='"+l+"']").attr("for",l+"-selectized")),m.settings.copyClassesToDropdown&&e.addClass(j),b.css({width:u[0].style.width}),m.plugins.names.length&&(k="plugin-"+m.plugins.names.join(" plugin-"),b.addClass(k),e.addClass(k)),(null===n.maxItems||n.maxItems>1)&&m.tagType===v&&u.attr("multiple","multiple"),m.settings.placeholder&&d.attr("placeholder",n.placeholder),!m.settings.splitOn&&m.settings.delimiter){var w=m.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");m.settings.splitOn=new RegExp("\\s*"+w+"+\\s*")}u.attr("autocorrect")&&d.attr("autocorrect",u.attr("autocorrect")),u.attr("autocapitalize")&&d.attr("autocapitalize",u.attr("autocapitalize")),m.$wrapper=b,m.$control=c,m.$control_input=d,m.$dropdown=e,m.$dropdown_content=g,e.on("mouseenter","[data-selectable]",function(){return m.onOptionHover.apply(m,arguments)}),e.on("mousedown click","[data-selectable]",function(){return m.onOptionSelect.apply(m,arguments)}),F(c,"mousedown","*:not(input)",function(){return m.onItemSelect.apply(m,arguments)}),J(d),c.on({mousedown:function(){return m.onMouseDown.apply(m,arguments)},click:function(){return m.onClick.apply(m,arguments)}}),d.on({mousedown:function(a){a.stopPropagation()},keydown:function(){return m.onKeyDown.apply(m,arguments)},keyup:function(){return m.onKeyUp.apply(m,arguments)},keypress:function(){return m.onKeyPress.apply(m,arguments)},resize:function(){m.positionDropdown.apply(m,[])},blur:function(){return m.onBlur.apply(m,arguments)},focus:function(){return m.ignoreBlur=!1,m.onFocus.apply(m,arguments)},paste:function(){return m.onPaste.apply(m,arguments)}}),q.on("keydown"+o,function(a){m.isCmdDown=a[f?"metaKey":"ctrlKey"],m.isCtrlDown=a[f?"altKey":"ctrlKey"],m.isShiftDown=a.shiftKey}),q.on("keyup"+o,function(a){a.keyCode===t&&(m.isCtrlDown=!1),a.keyCode===r&&(m.isShiftDown=!1),a.keyCode===s&&(m.isCmdDown=!1)}),q.on("mousedown"+o,function(a){if(m.isFocused){if(a.target===m.$dropdown[0]||a.target.parentNode===m.$dropdown[0])return!1;m.$control.has(a.target).length||a.target===m.$control[0]||m.blur(a.target)}}),p.on(["scroll"+o,"resize"+o].join(" "),function(){m.isOpen&&m.positionDropdown.apply(m,arguments)}),p.on("mousemove"+o,function(){m.ignoreHover=!1}),this.revertSettings={$children:u.children().detach(),tabindex:u.attr("tabindex")},u.attr("tabindex",-1).hide().after(m.$wrapper),a.isArray(n.items)&&(m.setValue(n.items),delete n.items),x&&u.on("invalid"+o,function(a){a.preventDefault(),m.isInvalid=!0,m.refreshState()}),m.updateOriginalInput(),m.refreshItems(),m.refreshState(),m.updatePlaceholder(),m.isSetup=!0,u.is(":disabled")&&m.disable(),m.on("change",this.onChange),u.data("selectize",m),u.addClass("selectized"),m.trigger("initialize"),n.preload===!0&&m.onSearchChange("")},setupTemplates:function(){var b=this,c=b.settings.labelField,d=b.settings.optgroupLabelField,e={optgroup:function(a){return'<div class="optgroup">'+a.html+"</div>"},optgroup_header:function(a,b){return'<div class="optgroup-header">'+b(a[d])+"</div>"},option:function(a,b){return'<div class="option">'+b(a[c])+"</div>"},item:function(a,b){return'<div class="item">'+b(a[c])+"</div>"},option_create:function(a,b){return'<div class="create">Add <strong>'+b(a.input)+"</strong>…</div>"}};b.settings.render=a.extend({},e,b.settings.render)},setupCallbacks:function(){var a,b,c={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(a in c)c.hasOwnProperty(a)&&(b=this.settings[c[a]],b&&this.on(a,b))},onClick:function(a){var b=this;b.isFocused||(b.focus(),a.preventDefault())},onMouseDown:function(b){var c=this,d=b.isDefaultPrevented();a(b.target);if(c.isFocused){if(b.target!==c.$control_input[0])return"single"===c.settings.mode?c.isOpen?c.close():c.open():d||c.setActiveItem(null),!1}else d||window.setTimeout(function(){c.focus()},0)},onChange:function(){this.$input.trigger("change")},onPaste:function(b){var c=this;return c.isFull()||c.isInputHidden||c.isLocked?void b.preventDefault():void(c.settings.splitOn&&setTimeout(function(){var b=c.$control_input.val();if(b.match(c.settings.splitOn))for(var d=a.trim(b).split(c.settings.splitOn),e=0,f=d.length;e<f;e++)c.createItem(d[e])},0))},onKeyPress:function(a){if(this.isLocked)return a&&a.preventDefault();var b=String.fromCharCode(a.keyCode||a.which);return this.settings.create&&"multi"===this.settings.mode&&b===this.settings.delimiter?(this.createItem(),a.preventDefault(),!1):void 0},onKeyDown:function(a){var b=(a.target===this.$control_input[0],this);if(b.isLocked)return void(a.keyCode!==u&&a.preventDefault());switch(a.keyCode){case g:if(b.isCmdDown)return void b.selectAll();break;case i:return void(b.isOpen&&(a.preventDefault(),a.stopPropagation(),b.close()));case o:if(!a.ctrlKey||a.altKey)break;case n:if(!b.isOpen&&b.hasOptions)b.open();else if(b.$activeOption){b.ignoreHover=!0;var c=b.getAdjacentOption(b.$activeOption,1);c.length&&b.setActiveOption(c,!0,!0)}return void a.preventDefault();case l:if(!a.ctrlKey||a.altKey)break;case k:if(b.$activeOption){b.ignoreHover=!0;var d=b.getAdjacentOption(b.$activeOption,-1);d.length&&b.setActiveOption(d,!0,!0)}return void a.preventDefault();case h:return void(b.isOpen&&b.$activeOption&&(b.onOptionSelect({currentTarget:b.$activeOption}),a.preventDefault()));case j:return void b.advanceSelection(-1,a);case m:return void b.advanceSelection(1,a);case u:return b.settings.selectOnTab&&b.isOpen&&b.$activeOption&&(b.onOptionSelect({currentTarget:b.$activeOption}),b.isFull()||a.preventDefault()),void(b.settings.create&&b.createItem()&&a.preventDefault());case p:case q:return void b.deleteSelection(a)}return!b.isFull()&&!b.isInputHidden||(f?a.metaKey:a.ctrlKey)?void 0:void a.preventDefault()},onKeyUp:function(a){var b=this;if(b.isLocked)return a&&a.preventDefault();var c=b.$control_input.val()||"";b.lastValue!==c&&(b.lastValue=c,b.onSearchChange(c),b.refreshOptions(),b.trigger("type",c))},onSearchChange:function(a){var b=this,c=b.settings.load;c&&(b.loadedSearches.hasOwnProperty(a)||(b.loadedSearches[a]=!0,b.load(function(d){c.apply(b,[a,d])})))},onFocus:function(a){var b=this,c=b.isFocused;return b.isDisabled?(b.blur(),a&&a.preventDefault(),!1):void(b.ignoreFocus||(b.isFocused=!0,"focus"===b.settings.preload&&b.onSearchChange(""),c||b.trigger("focus"),b.$activeItems.length||(b.showInput(),b.setActiveItem(null),b.refreshOptions(!!b.settings.openOnFocus)),b.refreshState()))},onBlur:function(a,b){var c=this;if(c.isFocused&&(c.isFocused=!1,!c.ignoreFocus)){if(!c.ignoreBlur&&document.activeElement===c.$dropdown_content[0])return c.ignoreBlur=!0,void c.onFocus(a);var d=function(){c.close(),c.setTextboxValue(""),c.setActiveItem(null),c.setActiveOption(null),c.setCaret(c.items.length),c.refreshState(),b&&b.focus&&b.focus(),c.ignoreFocus=!1,c.trigger("blur")};c.ignoreFocus=!0,c.settings.create&&c.settings.createOnBlur?c.createItem(null,!1,d):d()}},onOptionHover:function(a){this.ignoreHover||this.setActiveOption(a.currentTarget,!1)},onOptionSelect:function(b){var c,d,e=this;b.preventDefault&&(b.preventDefault(),b.stopPropagation()),d=a(b.currentTarget),d.hasClass("create")?e.createItem(null,function(){e.settings.closeAfterSelect&&e.close()}):(c=d.attr("data-value"),"undefined"!=typeof c&&(e.lastQuery=null,e.setTextboxValue(""),e.addItem(c),e.settings.closeAfterSelect?e.close():!e.settings.hideSelected&&b.type&&/mouse/.test(b.type)&&e.setActiveOption(e.getOption(c))))},onItemSelect:function(a){var b=this;b.isLocked||"multi"===b.settings.mode&&(a.preventDefault(),b.setActiveItem(a.currentTarget,a))},load:function(a){var b=this,c=b.$wrapper.addClass(b.settings.loadingClass);b.loading++,a.apply(b,[function(a){b.loading=Math.max(b.loading-1,0),a&&a.length&&(b.addOption(a),b.refreshOptions(b.isFocused&&!b.isInputHidden)),b.loading||c.removeClass(b.settings.loadingClass),b.trigger("load",a)}])},setTextboxValue:function(a){var b=this.$control_input,c=b.val()!==a;c&&(b.val(a).triggerHandler("update"),this.lastValue=a)},getValue:function(){return this.tagType===v&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(a,b){var c=b?[]:["change"];E(this,c,function(){this.clear(b),this.addItems(a,b)})},setActiveItem:function(b,c){var d,e,f,g,h,i,j,k,l=this;if("single"!==l.settings.mode){if(b=a(b),!b.length)return a(l.$activeItems).removeClass("active"),l.$activeItems=[],void(l.isFocused&&l.showInput());if(d=c&&c.type.toLowerCase(),"mousedown"===d&&l.isShiftDown&&l.$activeItems.length){for(k=l.$control.children(".active:last"),g=Array.prototype.indexOf.apply(l.$control[0].childNodes,[k[0]]),h=Array.prototype.indexOf.apply(l.$control[0].childNodes,[b[0]]),g>h&&(j=g,g=h,h=j),e=g;e<=h;e++)i=l.$control[0].childNodes[e],l.$activeItems.indexOf(i)===-1&&(a(i).addClass("active"),l.$activeItems.push(i));c.preventDefault()}else"mousedown"===d&&l.isCtrlDown||"keydown"===d&&this.isShiftDown?b.hasClass("active")?(f=l.$activeItems.indexOf(b[0]),l.$activeItems.splice(f,1),b.removeClass("active")):l.$activeItems.push(b.addClass("active")[0]):(a(l.$activeItems).removeClass("active"),l.$activeItems=[b.addClass("active")[0]]);l.hideInput(),this.isFocused||l.focus()}},setActiveOption:function(b,c,d){var e,f,g,h,i,j=this;j.$activeOption&&j.$activeOption.removeClass("active"),j.$activeOption=null,b=a(b),b.length&&(j.$activeOption=b.addClass("active"),!c&&y(c)||(e=j.$dropdown_content.height(),f=j.$activeOption.outerHeight(!0),c=j.$dropdown_content.scrollTop()||0,g=j.$activeOption.offset().top-j.$dropdown_content.offset().top+c,h=g,i=g-e+f,g+f>e+c?j.$dropdown_content.stop().animate({scrollTop:i},d?j.settings.scrollDuration:0):g<c&&j.$dropdown_content.stop().animate({scrollTop:h},d?j.settings.scrollDuration:0)))},selectAll:function(){var a=this;"single"!==a.settings.mode&&(a.$activeItems=Array.prototype.slice.apply(a.$control.children(":not(input)").addClass("active")),a.$activeItems.length&&(a.hideInput(),a.close()),a.focus())},hideInput:function(){var a=this;a.setTextboxValue(""),a.$control_input.css({opacity:0,position:"absolute",left:a.rtl?1e4:-1e4}),a.isInputHidden=!0},showInput:function(){this.$control_input.css({opacity:1,position:"relative",left:0}),this.isInputHidden=!1},focus:function(){var a=this;a.isDisabled||(a.ignoreFocus=!0,a.$control_input[0].focus(),window.setTimeout(function(){a.ignoreFocus=!1,a.onFocus()},0))},blur:function(a){this.$control_input[0].blur(),this.onBlur(null,a)},getScoreFunction:function(a){return this.sifter.getScoreFunction(a,this.getSearchOptions())},getSearchOptions:function(){var a=this.settings,b=a.sortField;return"string"==typeof b&&(b=[{field:b}]),{fields:a.searchField,conjunction:a.searchConjunction,sort:b}},search:function(b){var c,d,e,f=this,g=f.settings,h=this.getSearchOptions();if(g.score&&(e=f.settings.score.apply(this,[b]),"function"!=typeof e))throw new Error('Selectize "score" setting must be a function that returns a function');if(b!==f.lastQuery?(f.lastQuery=b,d=f.sifter.search(b,a.extend(h,{score:e})),f.currentResults=d):d=a.extend(!0,{},f.currentResults),g.hideSelected)for(c=d.items.length-1;c>=0;c--)f.items.indexOf(z(d.items[c].id))!==-1&&d.items.splice(c,1);return d},refreshOptions:function(b){var c,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;"undefined"==typeof b&&(b=!0);var t=this,u=a.trim(t.$control_input.val()),v=t.search(u),w=t.$dropdown_content,x=t.$activeOption&&z(t.$activeOption.attr("data-value"));for(g=v.items.length,"number"==typeof t.settings.maxOptions&&(g=Math.min(g,t.settings.maxOptions)),h={},i=[],c=0;c<g;c++)for(j=t.options[v.items[c].id],k=t.render("option",j),l=j[t.settings.optgroupField]||"",m=a.isArray(l)?l:[l],e=0,f=m&&m.length;e<f;e++)l=m[e],t.optgroups.hasOwnProperty(l)||(l=""),h.hasOwnProperty(l)||(h[l]=document.createDocumentFragment(),i.push(l)),h[l].appendChild(k);for(this.settings.lockOptgroupOrder&&i.sort(function(a,b){var c=t.optgroups[a].$order||0,d=t.optgroups[b].$order||0;return c-d}),n=document.createDocumentFragment(),c=0,g=i.length;c<g;c++)l=i[c],t.optgroups.hasOwnProperty(l)&&h[l].childNodes.length?(o=document.createDocumentFragment(),o.appendChild(t.render("optgroup_header",t.optgroups[l])),o.appendChild(h[l]),n.appendChild(t.render("optgroup",a.extend({},t.optgroups[l],{html:K(o),dom:o})))):n.appendChild(h[l]);if(w.html(n),t.settings.highlight&&v.query.length&&v.tokens.length)for(w.removeHighlight(),c=0,g=v.tokens.length;c<g;c++)d(w,v.tokens[c].regex);if(!t.settings.hideSelected)for(c=0,g=t.items.length;c<g;c++)t.getOption(t.items[c]).addClass("selected");p=t.canCreate(u),p&&(w.prepend(t.render("option_create",{input:u})),s=a(w[0].childNodes[0])),t.hasOptions=v.items.length>0||p,t.hasOptions?(v.items.length>0?(r=x&&t.getOption(x),r&&r.length?q=r:"single"===t.settings.mode&&t.items.length&&(q=t.getOption(t.items[0])),q&&q.length||(q=s&&!t.settings.addPrecedence?t.getAdjacentOption(s,1):w.find("[data-selectable]:first"))):q=s,t.setActiveOption(q),b&&!t.isOpen&&t.open()):(t.setActiveOption(null),b&&t.isOpen&&t.close())},addOption:function(b){var c,d,e,f=this;if(a.isArray(b))for(c=0,d=b.length;c<d;c++)f.addOption(b[c]);else(e=f.registerOption(b))&&(f.userOptions[e]=!0,f.lastQuery=null,f.trigger("option_add",e,b))},registerOption:function(a){var b=z(a[this.settings.valueField]);return"undefined"!=typeof b&&null!==b&&!this.options.hasOwnProperty(b)&&(a.$order=a.$order||++this.order,this.options[b]=a,b)},registerOptionGroup:function(a){var b=z(a[this.settings.optgroupValueField]);return!!b&&(a.$order=a.$order||++this.order,this.optgroups[b]=a,b)},addOptionGroup:function(a,b){b[this.settings.optgroupValueField]=a,(a=this.registerOptionGroup(b))&&this.trigger("optgroup_add",a,b)},removeOptionGroup:function(a){this.optgroups.hasOwnProperty(a)&&(delete this.optgroups[a],this.renderCache={},this.trigger("optgroup_remove",a))},clearOptionGroups:function(){this.optgroups={},this.renderCache={},this.trigger("optgroup_clear")},updateOption:function(b,c){var d,e,f,g,h,i,j,k=this;if(b=z(b),f=z(c[k.settings.valueField]),null!==b&&k.options.hasOwnProperty(b)){if("string"!=typeof f)throw new Error("Value must be set in option data");j=k.options[b].$order,f!==b&&(delete k.options[b],g=k.items.indexOf(b),g!==-1&&k.items.splice(g,1,f)),c.$order=c.$order||j,k.options[f]=c,h=k.renderCache.item,i=k.renderCache.option,h&&(delete h[b],delete h[f]),i&&(delete i[b],delete i[f]),k.items.indexOf(f)!==-1&&(d=k.getItem(b),e=a(k.render("item",c)),d.hasClass("active")&&e.addClass("active"),d.replaceWith(e)),k.lastQuery=null,k.isOpen&&k.refreshOptions(!1)}},removeOption:function(a,b){var c=this;a=z(a);var d=c.renderCache.item,e=c.renderCache.option;d&&delete d[a],e&&delete e[a],delete c.userOptions[a],delete c.options[a],c.lastQuery=null,c.trigger("option_remove",a),c.removeItem(a,b)},clearOptions:function(){var a=this;a.loadedSearches={},a.userOptions={},a.renderCache={},a.options=a.sifter.items={},a.lastQuery=null,a.trigger("option_clear"),a.clear()},getOption:function(a){return this.getElementWithValue(a,this.$dropdown_content.find("[data-selectable]"))},getAdjacentOption:function(b,c){var d=this.$dropdown.find("[data-selectable]"),e=d.index(b)+c;return e>=0&&e<d.length?d.eq(e):a()},getElementWithValue:function(b,c){if(b=z(b),"undefined"!=typeof b&&null!==b)for(var d=0,e=c.length;d<e;d++)if(c[d].getAttribute("data-value")===b)return a(c[d]);return a()},getItem:function(a){return this.getElementWithValue(a,this.$control.children())},addItems:function(b,c){for(var d=a.isArray(b)?b:[b],e=0,f=d.length;e<f;e++)this.isPending=e<f-1,this.addItem(d[e],c)},addItem:function(b,c){var d=c?[]:["change"];E(this,d,function(){var d,e,f,g,h,i=this,j=i.settings.mode;return b=z(b),i.items.indexOf(b)!==-1?void("single"===j&&i.close()):void(i.options.hasOwnProperty(b)&&("single"===j&&i.clear(c),"multi"===j&&i.isFull()||(d=a(i.render("item",i.options[b])),h=i.isFull(),i.items.splice(i.caretPos,0,b),i.insertAtCaret(d),(!i.isPending||!h&&i.isFull())&&i.refreshState(),i.isSetup&&(f=i.$dropdown_content.find("[data-selectable]"),i.isPending||(e=i.getOption(b),g=i.getAdjacentOption(e,1).attr("data-value"),i.refreshOptions(i.isFocused&&"single"!==j),g&&i.setActiveOption(i.getOption(g))),!f.length||i.isFull()?i.close():i.positionDropdown(),i.updatePlaceholder(),i.trigger("item_add",b,d),i.updateOriginalInput({silent:c})))))})},removeItem:function(b,c){var d,e,f,g=this;d=b instanceof a?b:g.getItem(b),b=z(d.attr("data-value")),e=g.items.indexOf(b),e!==-1&&(d.remove(),d.hasClass("active")&&(f=g.$activeItems.indexOf(d[0]),g.$activeItems.splice(f,1)),g.items.splice(e,1),g.lastQuery=null,!g.settings.persist&&g.userOptions.hasOwnProperty(b)&&g.removeOption(b,c),e<g.caretPos&&g.setCaret(g.caretPos-1),g.refreshState(),g.updatePlaceholder(),g.updateOriginalInput({silent:c}),g.positionDropdown(),g.trigger("item_remove",b,d))},createItem:function(b,c){var d=this,e=d.caretPos;b=b||a.trim(d.$control_input.val()||"");var f=arguments[arguments.length-1];if("function"!=typeof f&&(f=function(){}),"boolean"!=typeof c&&(c=!0),!d.canCreate(b))return f(),!1;d.lock();var g="function"==typeof d.settings.create?this.settings.create:function(a){var b={};return b[d.settings.labelField]=a,b[d.settings.valueField]=a,b},h=C(function(a){if(d.unlock(),!a||"object"!=typeof a)return f();var b=z(a[d.settings.valueField]);return"string"!=typeof b?f():(d.setTextboxValue(""),d.addOption(a),d.setCaret(e),d.addItem(b),d.refreshOptions(c&&"single"!==d.settings.mode),void f(a))}),i=g.apply(this,[b,h]);return"undefined"!=typeof i&&h(i),!0},refreshItems:function(){this.lastQuery=null,this.isSetup&&this.addItem(this.items),this.refreshState(),this.updateOriginalInput()},refreshState:function(){this.refreshValidityState(),this.refreshClasses()},refreshValidityState:function(){if(!this.isRequired)return!1;var a=!this.items.length;this.isInvalid=a,this.$control_input.prop("required",a),this.$input.prop("required",!a)},refreshClasses:function(){var b=this,c=b.isFull(),d=b.isLocked;b.$wrapper.toggleClass("rtl",b.rtl),b.$control.toggleClass("focus",b.isFocused).toggleClass("disabled",b.isDisabled).toggleClass("required",b.isRequired).toggleClass("invalid",b.isInvalid).toggleClass("locked",d).toggleClass("full",c).toggleClass("not-full",!c).toggleClass("input-active",b.isFocused&&!b.isInputHidden).toggleClass("dropdown-active",b.isOpen).toggleClass("has-options",!a.isEmptyObject(b.options)).toggleClass("has-items",b.items.length>0),b.$control_input.data("grow",!c&&!d)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(a){var b,c,d,e,f=this;if(a=a||{},f.tagType===v){for(d=[],b=0,c=f.items.length;b<c;b++)e=f.options[f.items[b]][f.settings.labelField]||"",d.push('<option value="'+A(f.items[b])+'" selected="selected">'+A(e)+"</option>");d.length||this.$input.attr("multiple")||d.push('<option value="" selected="selected"></option>'),f.$input.html(d.join(""))}else f.$input.val(f.getValue()),f.$input.attr("value",f.$input.val());f.isSetup&&(a.silent||f.trigger("change",f.$input.val()))},updatePlaceholder:function(){if(this.settings.placeholder){var a=this.$control_input;this.items.length?a.removeAttr("placeholder"):a.attr("placeholder",this.settings.placeholder),a.triggerHandler("update",{force:!0})}},open:function(){var a=this;a.isLocked||a.isOpen||"multi"===a.settings.mode&&a.isFull()||(a.focus(),a.isOpen=!0,a.refreshState(),a.$dropdown.css({visibility:"hidden",display:"block"}),a.positionDropdown(),a.$dropdown.css({visibility:"visible"}),a.trigger("dropdown_open",a.$dropdown))},close:function(){var a=this,b=a.isOpen;"single"===a.settings.mode&&a.items.length&&(a.hideInput(),a.$control_input.blur()),a.isOpen=!1,a.$dropdown.hide(),a.setActiveOption(null),a.refreshState(),b&&a.trigger("dropdown_close",a.$dropdown)},positionDropdown:function(){var a=this.$control,b="body"===this.settings.dropdownParent?a.offset():a.position();b.top+=a.outerHeight(!0),this.$dropdown.css({width:a.outerWidth(),top:b.top,left:b.left})},clear:function(a){var b=this;b.items.length&&(b.$control.children(":not(input)").remove(),b.items=[],b.lastQuery=null,b.setCaret(0),b.setActiveItem(null),b.updatePlaceholder(),b.updateOriginalInput({silent:a}),b.refreshState(),b.showInput(),b.trigger("clear"))},insertAtCaret:function(b){var c=Math.min(this.caretPos,this.items.length);0===c?this.$control.prepend(b):a(this.$control[0].childNodes[c]).before(b),this.setCaret(c+1)},deleteSelection:function(b){var c,d,e,f,g,h,i,j,k,l=this;if(e=b&&b.keyCode===p?-1:1,f=G(l.$control_input[0]),l.$activeOption&&!l.settings.hideSelected&&(i=l.getAdjacentOption(l.$activeOption,-1).attr("data-value")),g=[],l.$activeItems.length){for(k=l.$control.children(".active:"+(e>0?"last":"first")),h=l.$control.children(":not(input)").index(k),e>0&&h++,c=0,d=l.$activeItems.length;c<d;c++)g.push(a(l.$activeItems[c]).attr("data-value"));b&&(b.preventDefault(),b.stopPropagation())}else(l.isFocused||"single"===l.settings.mode)&&l.items.length&&(e<0&&0===f.start&&0===f.length?g.push(l.items[l.caretPos-1]):e>0&&f.start===l.$control_input.val().length&&g.push(l.items[l.caretPos]));if(!g.length||"function"==typeof l.settings.onDelete&&l.settings.onDelete.apply(l,[g])===!1)return!1;for("undefined"!=typeof h&&l.setCaret(h);g.length;)l.removeItem(g.pop());return l.showInput(),l.positionDropdown(),l.refreshOptions(!0),i&&(j=l.getOption(i),j.length&&l.setActiveOption(j)),!0},advanceSelection:function(a,b){var c,d,e,f,g,h,i=this;0!==a&&(i.rtl&&(a*=-1),c=a>0?"last":"first",d=G(i.$control_input[0]),i.isFocused&&!i.isInputHidden?(f=i.$control_input.val().length,g=a<0?0===d.start&&0===d.length:d.start===f,g&&!f&&i.advanceCaret(a,b)):(h=i.$control.children(".active:"+c),h.length&&(e=i.$control.children(":not(input)").index(h),i.setActiveItem(null),i.setCaret(a>0?e+1:e))))},advanceCaret:function(a,b){var c,d,e=this;0!==a&&(c=a>0?"next":"prev",e.isShiftDown?(d=e.$control_input[c](),d.length&&(e.hideInput(),e.setActiveItem(d),b&&b.preventDefault())):e.setCaret(e.caretPos+a))},setCaret:function(b){var c=this;if(b="single"===c.settings.mode?c.items.length:Math.max(0,Math.min(c.items.length,b)),!c.isPending){var d,e,f,g;for(f=c.$control.children(":not(input)"),d=0,e=f.length;d<e;d++)g=a(f[d]).detach(),d<b?c.$control_input.before(g):c.$control.append(g)}c.caretPos=b},lock:function(){this.close(),this.isLocked=!0,this.refreshState()},unlock:function(){this.isLocked=!1,this.refreshState()},disable:function(){var a=this;a.$input.prop("disabled",!0),a.$control_input.prop("disabled",!0).prop("tabindex",-1),a.isDisabled=!0,a.lock()},enable:function(){var a=this;a.$input.prop("disabled",!1),a.$control_input.prop("disabled",!1).prop("tabindex",a.tabIndex),a.isDisabled=!1,a.unlock()},destroy:function(){var b=this,c=b.eventNS,d=b.revertSettings;b.trigger("destroy"),b.off(),b.$wrapper.remove(),b.$dropdown.remove(),b.$input.html("").append(d.$children).removeAttr("tabindex").removeClass("selectized").attr({tabindex:d.tabindex}).show(),b.$control_input.removeData("grow"),b.$input.removeData("selectize"),a(window).off(c),a(document).off(c),a(document.body).off(c),delete b.$input[0].selectize},render:function(b,c){var d,e,f="",g=!1,h=this;return"option"!==b&&"item"!==b||(d=z(c[h.settings.valueField]),g=!!d),g&&(y(h.renderCache[b])||(h.renderCache[b]={}),h.renderCache[b].hasOwnProperty(d))?h.renderCache[b][d]:(f=a(h.settings.render[b].apply(this,[c,A])),"option"===b||"option_create"===b?f.attr("data-selectable",""):"optgroup"===b&&(e=c[h.settings.optgroupValueField]||"",f.attr("data-group",e)),"option"!==b&&"item"!==b||f.attr("data-value",d||""),g&&(h.renderCache[b][d]=f[0]),f[0])},clearCache:function(a){var b=this;"undefined"==typeof a?b.renderCache={}:delete b.renderCache[a]},canCreate:function(a){var b=this;if(!b.settings.create)return!1;var c=b.settings.createFilter;return a.length&&("function"!=typeof c||c.apply(b,[a]))&&("string"!=typeof c||new RegExp(c).test(a))&&(!(c instanceof RegExp)||c.test(a))}}),M.count=0,M.defaults={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:!1,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,hideSelected:null,addPrecedence:!1,selectOnTab:!1,preload:!1,allowEmptyOption:!1,closeAfterSelect:!1,scrollDuration:60,loadThrottle:300,loadingClass:"loading",dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"selectize-control",inputClass:"selectize-input",dropdownClass:"selectize-dropdown",dropdownContentClass:"selectize-dropdown-content",
|
3 |
-
dropdownParent:null,copyClassesToDropdown:!0,render:{}},a.fn.selectize=function(b){var c=a.fn.selectize.defaults,d=a.extend({},c,b),e=d.dataAttr,f=d.labelField,g=d.valueField,h=d.optgroupField,i=d.optgroupLabelField,j=d.optgroupValueField,k=function(b,c){var h,i,j,k,l=b.attr(e);if(l)for(c.options=JSON.parse(l),h=0,i=c.options.length;h<i;h++)c.items.push(c.options[h][g]);else{var m=a.trim(b.val()||"");if(!d.allowEmptyOption&&!m.length)return;for(j=m.split(d.delimiter),h=0,i=j.length;h<i;h++)k={},k[f]=j[h],k[g]=j[h],c.options.push(k);c.items=j}},l=function(b,c){var k,l,m,n,o=c.options,p={},q=function(a){var b=e&&a.attr(e);return"string"==typeof b&&b.length?JSON.parse(b):null},r=function(b,e){b=a(b);var i=z(b.val());if(i||d.allowEmptyOption)if(p.hasOwnProperty(i)){if(e){var j=p[i][h];j?a.isArray(j)?j.push(e):p[i][h]=[j,e]:p[i][h]=e}}else{var k=q(b)||{};k[f]=k[f]||b.text(),k[g]=k[g]||i,k[h]=k[h]||e,p[i]=k,o.push(k),b.is(":selected")&&c.items.push(i)}},s=function(b){var d,e,f,g,h;for(b=a(b),f=b.attr("label"),f&&(g=q(b)||{},g[i]=f,g[j]=f,c.optgroups.push(g)),h=a("option",b),d=0,e=h.length;d<e;d++)r(h[d],f)};for(c.maxItems=b.attr("multiple")?null:1,n=b.children(),k=0,l=n.length;k<l;k++)m=n[k].tagName.toLowerCase(),"optgroup"===m?s(n[k]):"option"===m&&r(n[k])};return this.each(function(){if(!this.selectize){var e,f=a(this),g=this.tagName.toLowerCase(),h=f.attr("placeholder")||f.attr("data-placeholder");h||d.allowEmptyOption||(h=f.children('option[value=""]').text());var i={placeholder:h,options:[],optgroups:[],items:[]};"select"===g?l(f,i):k(f,i),e=new M(f,a.extend(!0,{},c,i,b))}})},a.fn.selectize.defaults=M.defaults,a.fn.selectize.support={validity:x},M.define("drag_drop",function(b){if(!a.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');if("multi"===this.settings.mode){var c=this;c.lock=function(){var a=c.lock;return function(){var b=c.$control.data("sortable");return b&&b.disable(),a.apply(c,arguments)}}(),c.unlock=function(){var a=c.unlock;return function(){var b=c.$control.data("sortable");return b&&b.enable(),a.apply(c,arguments)}}(),c.setup=function(){var b=c.setup;return function(){b.apply(this,arguments);var d=c.$control.sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:c.isLocked,start:function(a,b){b.placeholder.css("width",b.helper.css("width")),d.css({overflow:"visible"})},stop:function(){d.css({overflow:"hidden"});var b=c.$activeItems?c.$activeItems.slice():null,e=[];d.children("[data-value]").each(function(){e.push(a(this).attr("data-value"))}),c.setValue(e),c.setActiveItem(b)}})}}()}}),M.define("dropdown_header",function(b){var c=this;b=a.extend({title:"Untitled",headerClass:"selectize-dropdown-header",titleRowClass:"selectize-dropdown-header-title",labelClass:"selectize-dropdown-header-label",closeClass:"selectize-dropdown-header-close",html:function(a){return'<div class="'+a.headerClass+'"><div class="'+a.titleRowClass+'"><span class="'+a.labelClass+'">'+a.title+'</span><a href="javascript:void(0)" class="'+a.closeClass+'">×</a></div></div>'}},b),c.setup=function(){var d=c.setup;return function(){d.apply(c,arguments),c.$dropdown_header=a(b.html(b)),c.$dropdown.prepend(c.$dropdown_header)}}()}),M.define("optgroup_columns",function(b){var c=this;b=a.extend({equalizeWidth:!0,equalizeHeight:!0},b),this.getAdjacentOption=function(b,c){var d=b.closest("[data-group]").find("[data-selectable]"),e=d.index(b)+c;return e>=0&&e<d.length?d.eq(e):a()},this.onKeyDown=function(){var a=c.onKeyDown;return function(b){var d,e,f,g;return!this.isOpen||b.keyCode!==j&&b.keyCode!==m?a.apply(this,arguments):(c.ignoreHover=!0,g=this.$activeOption.closest("[data-group]"),d=g.find("[data-selectable]").index(this.$activeOption),g=b.keyCode===j?g.prev("[data-group]"):g.next("[data-group]"),f=g.find("[data-selectable]"),e=f.eq(Math.min(f.length-1,d)),void(e.length&&this.setActiveOption(e)))}}();var d=function(){var a,b=d.width,c=document;return"undefined"==typeof b&&(a=c.createElement("div"),a.innerHTML='<div style="width:50px;height:50px;position:absolute;left:-50px;top:-50px;overflow:auto;"><div style="width:1px;height:100px;"></div></div>',a=a.firstChild,c.body.appendChild(a),b=d.width=a.offsetWidth-a.clientWidth,c.body.removeChild(a)),b},e=function(){var e,f,g,h,i,j,k;if(k=a("[data-group]",c.$dropdown_content),f=k.length,f&&c.$dropdown_content.width()){if(b.equalizeHeight){for(g=0,e=0;e<f;e++)g=Math.max(g,k.eq(e).height());k.css({height:g})}b.equalizeWidth&&(j=c.$dropdown_content.innerWidth()-d(),h=Math.round(j/f),k.css({width:h}),f>1&&(i=j-h*(f-1),k.eq(f-1).css({width:i})))}};(b.equalizeHeight||b.equalizeWidth)&&(B.after(this,"positionDropdown",e),B.after(this,"refreshOptions",e))}),M.define("remove_button",function(b){b=a.extend({label:"×",title:"Remove",className:"remove",append:!0},b);var c=function(b,c){c.className="remove-single";var d=b,e='<a href="javascript:void(0)" class="'+c.className+'" tabindex="-1" title="'+A(c.title)+'">'+c.label+"</a>",f=function(a,b){return a+b};b.setup=function(){var g=d.setup;return function(){if(c.append){var h=a(d.$input.context).attr("id"),i=(a("#"+h),d.settings.render.item);d.settings.render.item=function(a){return f(i.apply(b,arguments),e)}}g.apply(b,arguments),b.$control.on("click","."+c.className,function(a){a.preventDefault(),d.isLocked||d.clear()})}}()},d=function(b,c){var d=b,e='<a href="javascript:void(0)" class="'+c.className+'" tabindex="-1" title="'+A(c.title)+'">'+c.label+"</a>",f=function(a,b){var c=a.search(/(<\/[^>]+>\s*)$/);return a.substring(0,c)+b+a.substring(c)};b.setup=function(){var g=d.setup;return function(){if(c.append){var h=d.settings.render.item;d.settings.render.item=function(a){return f(h.apply(b,arguments),e)}}g.apply(b,arguments),b.$control.on("click","."+c.className,function(b){if(b.preventDefault(),!d.isLocked){var c=a(b.currentTarget).parent();d.setActiveItem(c),d.deleteSelection()&&d.setCaret(d.items.length)}})}}()};return"single"===this.settings.mode?void c(this,b):void d(this,b)}),M.define("restore_on_backspace",function(a){var b=this;a.text=a.text||function(a){return a[this.settings.labelField]},this.onKeyDown=function(){var c=b.onKeyDown;return function(b){var d,e;return b.keyCode===p&&""===this.$control_input.val()&&!this.$activeItems.length&&(d=this.caretPos-1,d>=0&&d<this.items.length)?(e=this.options[this.items[d]],this.deleteSelection(b)&&(this.setTextboxValue(a.text.apply(this,[e])),this.refreshOptions(!0)),void b.preventDefault()):c.apply(this,arguments)}}()}),M});
|
1 |
+
/*! selectize.js - v0.14.0 | https://github.com/selectize/selectize.js | Apache License (v2) */
|
2 |
+
!function(root,factory){"function"==typeof define&&define.amd?define("selectize",["jquery"],factory):"object"==typeof module&&"object"==typeof module.exports?module.exports=factory(require("jquery")):root.Selectize=factory(root.jQuery)}(this,function($){"use strict";function MicroEvent(){}$.fn.removeHighlight=function(){return this.find("span.highlight").each(function(){this.parentNode.firstChild.nodeName;var parent=this.parentNode;parent.replaceChild(this.firstChild,this),parent.normalize()}).end()};function Sifter(items,settings){this.items=items,this.settings=settings||{diacritics:!0}}MicroEvent.prototype={on:function(event,fct){this._events=this._events||{},this._events[event]=this._events[event]||[],this._events[event].push(fct)},off:function(event,fct){var n=arguments.length;return 0===n?delete this._events:1===n?delete this._events[event]:(this._events=this._events||{},void(event in this._events!=!1&&this._events[event].splice(this._events[event].indexOf(fct),1)))},trigger:function(event){const events=this._events=this._events||{};if(event in events!=!1)for(var i=0;i<events[event].length;i++)events[event][i].apply(this,Array.prototype.slice.call(arguments,1))}},MicroEvent.mixin=function(destObject){for(var props=["on","off","trigger"],i=0;i<props.length;i++)destObject.prototype[props[i]]=MicroEvent.prototype[props[i]]};var MicroPlugin={},utils=(MicroPlugin.mixin=function(Interface){Interface.plugins={},Interface.prototype.initializePlugins=function(plugins){var i,n,key,queue=[];if(this.plugins={names:[],settings:{},requested:{},loaded:{}},utils.isArray(plugins))for(i=0,n=plugins.length;i<n;i++)"string"==typeof plugins[i]?queue.push(plugins[i]):(this.plugins.settings[plugins[i].name]=plugins[i].options,queue.push(plugins[i].name));else if(plugins)for(key in plugins)plugins.hasOwnProperty(key)&&(this.plugins.settings[key]=plugins[key],queue.push(key));for(;queue.length;)this.require(queue.shift())},Interface.prototype.loadPlugin=function(name){var plugins=this.plugins,plugin=Interface.plugins[name];if(!Interface.plugins.hasOwnProperty(name))throw new Error('Unable to find "'+name+'" plugin');plugins.requested[name]=!0,plugins.loaded[name]=plugin.fn.apply(this,[this.plugins.settings[name]||{}]),plugins.names.push(name)},Interface.prototype.require=function(name){var plugins=this.plugins;if(!this.plugins.loaded.hasOwnProperty(name)){if(plugins.requested[name])throw new Error('Plugin has circular dependency ("'+name+'")');this.loadPlugin(name)}return plugins.loaded[name]},Interface.define=function(name,fn){Interface.plugins[name]={name:name,fn:fn}}},{isArray:Array.isArray||function(vArg){return"[object Array]"===Object.prototype.toString.call(vArg)}}),cmp=(Sifter.prototype.tokenize=function(query,respect_word_boundaries){if(!(query=trim(String(query||"").toLowerCase()))||!query.length)return[];for(var regex,letter,tokens=[],words=query.split(/ +/),i=0,n=words.length;i<n;i++){if(regex=escape_regex(words[i]),this.settings.diacritics)for(letter in DIACRITICS)DIACRITICS.hasOwnProperty(letter)&&(regex=regex.replace(new RegExp(letter,"g"),DIACRITICS[letter]));respect_word_boundaries&&(regex="\\b"+regex),tokens.push({string:words[i],regex:new RegExp(regex,"i")})}return tokens},Sifter.prototype.iterator=function(object,callback){var iterator=is_array(object)?Array.prototype.forEach||function(callback){for(var i=0,n=this.length;i<n;i++)callback(this[i],i,this)}:function(callback){for(var key in this)this.hasOwnProperty(key)&&callback(this[key],key,this)};iterator.apply(object,[callback])},Sifter.prototype.getScoreFunction=function(search,options){function scoreValue(value,token){var pos;return!value||-1===(pos=(value=String(value||"")).search(token.regex))?0:(token=token.string.length/value.length,0===pos&&(token+=.5),token)}var field_count,tokens=(search=this.prepareSearch(search,options)).tokens,fields=search.options.fields,token_count=tokens.length,nesting=search.options.nesting,scoreObject=(field_count=fields.length)?1===field_count?function(token,data){return scoreValue(getattr(data,fields[0],nesting),token)}:function(token,data){for(var i=0,sum=0;i<field_count;i++)sum+=scoreValue(getattr(data,fields[i],nesting),token);return sum/field_count}:function(){return 0};return token_count?1===token_count?function(data){return scoreObject(tokens[0],data)}:"and"===search.options.conjunction?function(data){for(var score,i=0,sum=0;i<token_count;i++){if((score=scoreObject(tokens[i],data))<=0)return 0;sum+=score}return sum/token_count}:function(data){for(var i=0,sum=0;i<token_count;i++)sum+=scoreObject(tokens[i],data);return sum/token_count}:function(){return 0}},Sifter.prototype.getSortFunction=function(search,options){var i,n,field,fields_count,multiplier,multipliers,implicit_score,self=this,sort=!(search=self.prepareSearch(search,options)).query&&options.sort_empty||options.sort,get_field=function(name,result){return"$score"===name?result.score:getattr(self.items[result.id],name,options.nesting)},fields=[];if(sort)for(i=0,n=sort.length;i<n;i++)!search.query&&"$score"===sort[i].field||fields.push(sort[i]);if(search.query){for(implicit_score=!0,i=0,n=fields.length;i<n;i++)if("$score"===fields[i].field){implicit_score=!1;break}implicit_score&&fields.unshift({field:"$score",direction:"desc"})}else for(i=0,n=fields.length;i<n;i++)if("$score"===fields[i].field){fields.splice(i,1);break}for(multipliers=[],i=0,n=fields.length;i<n;i++)multipliers.push("desc"===fields[i].direction?-1:1);return(fields_count=fields.length)?1===fields_count?(field=fields[0].field,multiplier=multipliers[0],function(a,b){return multiplier*cmp(get_field(field,a),get_field(field,b))}):function(a,b){for(var field,i=0;i<fields_count;i++)if(field=fields[i].field,field=multipliers[i]*cmp(get_field(field,a),get_field(field,b)))return field;return 0}:null},Sifter.prototype.prepareSearch=function(query,options){if("object"==typeof query)return query;var option_fields=(options=extend({},options)).fields,option_sort=options.sort,option_sort_empty=options.sort_empty;return option_fields&&!is_array(option_fields)&&(options.fields=[option_fields]),option_sort&&!is_array(option_sort)&&(options.sort=[option_sort]),option_sort_empty&&!is_array(option_sort_empty)&&(options.sort_empty=[option_sort_empty]),{options:options,query:String(query||"").toLowerCase(),tokens:this.tokenize(query,options.respect_word_boundaries),total:0,items:[]}},Sifter.prototype.search=function(query,options){var score,fn_score,search=this.prepareSearch(query,options);return options=search.options,query=search.query,fn_score=options.score||this.getScoreFunction(search),query.length?this.iterator(this.items,function(item,id){score=fn_score(item),(!1===options.filter||0<score)&&search.items.push({score:score,id:id})}):this.iterator(this.items,function(item,id){search.items.push({score:1,id:id})}),(query=this.getSortFunction(search,options))&&search.items.sort(query),search.total=search.items.length,"number"==typeof options.limit&&(search.items=search.items.slice(0,options.limit)),search},function(a,b){return"number"==typeof a&&"number"==typeof b?b<a?1:a<b?-1:0:(a=asciifold(String(a||"")),(b=asciifold(String(b||"")))<a?1:a<b?-1:0)}),extend=function(a,b){for(var k,object,i=1,n=arguments.length;i<n;i++)if(object=arguments[i])for(k in object)object.hasOwnProperty(k)&&(a[k]=object[k]);return a},getattr=function(obj,name,nesting){if(obj&&name){if(!nesting)return obj[name];for(var names=name.split(".");names.length&&(obj=obj[names.shift()]););return obj}},trim=function(str){return(str+"").replace(/^\s+|\s+$|/g,"")},escape_regex=function(str){return(str+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},is_array=Array.isArray||void 0!==$&&$.isArray||function(object){return"[object Array]"===Object.prototype.toString.call(object)},DIACRITICS={a:"[aḀḁĂăÂâǍǎȺⱥȦȧẠạÄäÀàÁáĀāÃãÅåąĄÃąĄ]",b:"[b␢βΒB฿𐌁ᛒ]",c:"[cĆćĈĉČčĊċC̄c̄ÇçḈḉȻȼƇƈɕᴄCc]",d:"[dĎďḊḋḐḑḌḍḒḓḎḏĐđD̦d̦ƉɖƊɗƋƌᵭᶁᶑȡᴅDdð]",e:"[eÉéÈèÊêḘḙĚěĔĕẼẽḚḛẺẻĖėËëĒēȨȩĘęᶒɆɇȄȅẾếỀềỄễỂểḜḝḖḗḔḕȆȇẸẹỆệⱸᴇEeɘǝƏƐε]",f:"[fƑƒḞḟ]",g:"[gɢ₲ǤǥĜĝĞğĢģƓɠĠġ]",h:"[hĤĥĦħḨḩẖẖḤḥḢḣɦʰǶƕ]",i:"[iÍíÌìĬĭÎîǏǐÏïḮḯĨĩĮįĪīỈỉȈȉȊȋỊịḬḭƗɨɨ̆ᵻᶖİiIıɪIi]",j:"[jȷĴĵɈɉʝɟʲ]",k:"[kƘƙꝀꝁḰḱǨǩḲḳḴḵκϰ₭]",l:"[lŁłĽľĻļĹĺḶḷḸḹḼḽḺḻĿŀȽƚⱠⱡⱢɫɬᶅɭȴʟLl]",n:"[nŃńǸǹŇňÑñṄṅŅņṆṇṊṋṈṉN̈n̈ƝɲȠƞᵰᶇɳȵɴNnŊŋ]",o:"[oØøÖöÓóÒòÔôǑǒŐőŎŏȮȯỌọƟɵƠơỎỏŌōÕõǪǫȌȍՕօ]",p:"[pṔṕṖṗⱣᵽƤƥᵱ]",q:"[qꝖꝗʠɊɋꝘꝙq̃]",r:"[rŔŕɌɍŘřŖŗṘṙȐȑȒȓṚṛⱤɽ]",s:"[sŚśṠṡṢṣꞨꞩŜŝŠšŞşȘșS̈s̈]",t:"[tŤťṪṫŢţṬṭƮʈȚțṰṱṮṯƬƭ]",u:"[uŬŭɄʉỤụÜüÚúÙùÛûǓǔŰűŬŭƯưỦủŪūŨũŲųȔȕ∪]",v:"[vṼṽṾṿƲʋꝞꝟⱱʋ]",w:"[wẂẃẀẁŴŵẄẅẆẇẈẉ]",x:"[xẌẍẊẋχ]",y:"[yÝýỲỳŶŷŸÿỸỹẎẏỴỵɎɏƳƴ]",z:"[zŹźẐẑŽžŻżẒẓẔẕƵƶ]"},asciifold=function(){var i,n,k,chunk,foreignletters="",lookup={};for(k in DIACRITICS)if(DIACRITICS.hasOwnProperty(k))for(foreignletters+=chunk=DIACRITICS[k].substring(2,DIACRITICS[k].length-1),i=0,n=chunk.length;i<n;i++)lookup[chunk.charAt(i)]=k;var regexp=new RegExp("["+foreignletters+"]","g");return function(str){return str.replace(regexp,function(foreignletter){return lookup[foreignletter]}).toLowerCase()}}();function uaDetect(platform,re){return navigator.userAgentData?platform===navigator.userAgentData.platform:re.test(navigator.userAgent)}function isset(object){return void 0!==object}function hash_key(value){return null==value?null:"boolean"==typeof value?value?"1":"0":value+""}function escape_html(str){return(str+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function debounce_events(self,types,fn){var type,trigger=self.trigger,event_args={};for(type in self.trigger=function(){var type=arguments[0];if(-1===types.indexOf(type))return trigger.apply(self,arguments);event_args[type]=arguments},fn.apply(self,[]),self.trigger=trigger,event_args)event_args.hasOwnProperty(type)&&trigger.apply(self,event_args[type])}function getSelection(input){var sel,selLen,result={};return void 0===input?console.warn("WARN getSelection cannot locate input control"):"selectionStart"in input?(result.start=input.selectionStart,result.length=input.selectionEnd-result.start):document.selection&&(input.focus(),sel=document.selection.createRange(),selLen=document.selection.createRange().text.length,sel.moveStart("character",-input.value.length),result.start=sel.text.length-selLen,result.length=selLen),result}function measureString(str,$parent){return str?(Selectize.$testInput||(Selectize.$testInput=$("<span />").css({position:"absolute",width:"auto",padding:0,whiteSpace:"pre"}),$("<div />").css({position:"absolute",width:0,height:0,overflow:"hidden"}).append(Selectize.$testInput).appendTo("body")),Selectize.$testInput.text(str),transferStyles($parent,Selectize.$testInput,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]),Selectize.$testInput.width()):0}function autoGrow($input){function update(e,options){var printable,keyCode,selection;options=options||{},(e=e||window.event||{}).metaKey||e.altKey||!options.force&&!1===$input.data("grow")||(options=$input.val(),e.type&&"keydown"===e.type.toLowerCase()&&(printable=48<=(keyCode=e.keyCode)&&keyCode<=57||65<=keyCode&&keyCode<=90||96<=keyCode&&keyCode<=111||186<=keyCode&&keyCode<=222||32===keyCode,46===keyCode||8===keyCode?(selection=getSelection($input[0])).length?options=options.substring(0,selection.start)+options.substring(selection.start+selection.length):8===keyCode&&selection.start?options=options.substring(0,selection.start-1)+options.substring(selection.start+1):46===keyCode&&void 0!==selection.start&&(options=options.substring(0,selection.start)+options.substring(selection.start+1)):printable&&(keyCode=e.shiftKey,selection=String.fromCharCode(e.keyCode),options+=selection=keyCode?selection.toUpperCase():selection.toLowerCase())),e=(printable=$input.attr("placeholder"))?measureString(printable,$input)+4:0,(keyCode=Math.max(measureString(options,$input),e)+4)!==currentWidth&&(currentWidth=keyCode,$input.width(keyCode),$input.triggerHandler("resize")))}var currentWidth=null;$input.on("keydown keyup update blur",update),update()}var IS_MAC=uaDetect("macOS",/Mac/),KEY_CMD=IS_MAC?91:17,KEY_CTRL=IS_MAC?18:17,SUPPORTS_VALIDITY_API=!uaDetect("Android",/android/i)&&!!document.createElement("input").validity,hook={before:function(self,method,fn){var original=self[method];self[method]=function(){return fn.apply(self,arguments),original.apply(self,arguments)}},after:function(self,method,fn){var original=self[method];self[method]=function(){var result=original.apply(self,arguments);return fn.apply(self,arguments),result}}},transferStyles=function($from,$to,properties){var i,n,styles={};if(properties)for(i=0,n=properties.length;i<n;i++)styles[properties[i]]=$from.css(properties[i]);else styles=$from.css();$to.css(styles)},Selectize=function($input,settings){var i,n,fn,delay,timeout,input=$input[0],computedStyle=(input.selectize=this,window.getComputedStyle&&window.getComputedStyle(input,null));if(computedStyle=(computedStyle?computedStyle.getPropertyValue("direction"):input.currentStyle&&input.currentStyle.direction)||$input.parents("[dir]:first").attr("dir")||"",$.extend(this,{order:0,settings:settings,$input:$input,tabIndex:$input.attr("tabindex")||"",tagType:"select"===input.tagName.toLowerCase()?1:2,rtl:/rtl/i.test(computedStyle),eventNS:".selectize"+ ++Selectize.count,highlightedValue:null,isBlurring:!1,isOpen:!1,isDisabled:!1,isRequired:$input.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",lastValidValue:"",caretPos:0,loading:0,loadedSearches:{},isDropdownClosing:!1,$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:null===settings.loadThrottle?this.onSearchChange:(fn=this.onSearchChange,delay=settings.loadThrottle,function(){var self=this,args=arguments;window.clearTimeout(timeout),timeout=window.setTimeout(function(){fn.apply(self,args)},delay)})}),this.sifter=new Sifter(this.options,{diacritics:settings.diacritics}),this.settings.options){for(i=0,n=this.settings.options.length;i<n;i++)this.registerOption(this.settings.options[i]);delete this.settings.options}if(this.settings.optgroups){for(i=0,n=this.settings.optgroups.length;i<n;i++)this.registerOptionGroup(this.settings.optgroups[i]);delete this.settings.optgroups}this.settings.mode=this.settings.mode||(1===this.settings.maxItems?"single":"multi"),"boolean"!=typeof this.settings.hideSelected&&(this.settings.hideSelected="multi"===this.settings.mode),this.initializePlugins(this.settings.plugins),this.setupCallbacks(),this.setupTemplates(),this.setup()};return MicroEvent.mixin(Selectize),MicroPlugin.mixin(Selectize),$.extend(Selectize.prototype,{setup:function(){var $parent,inputId,fn,self=this,settings=self.settings,eventNS=self.eventNS,$window=$(window),$document=$(document),$input=self.$input,inputMode=self.settings.mode,classes=$input.attr("class")||"",$wrapper=$("<div>").addClass(settings.wrapperClass).addClass(classes).addClass(inputMode),$control=$("<div>").addClass(settings.inputClass).addClass("items").appendTo($wrapper),$control_input=$('<input type="select-one" autocomplete="new-password" autofill="no" />').appendTo($control).attr("tabindex",$input.is(":disabled")?"-1":self.tabIndex),$dropdown_parent=$(settings.dropdownParent||$wrapper),inputMode=$("<div>").addClass(settings.dropdownClass).addClass(inputMode).hide().appendTo($dropdown_parent),$dropdown_parent=$("<div>").addClass(settings.dropdownContentClass).attr("tabindex","-1").appendTo(inputMode);(inputId=$input.attr("id"))&&($control_input.attr("id",inputId+"-selectized"),$("label[for='"+inputId+"']").attr("for",inputId+"-selectized")),self.settings.copyClassesToDropdown&&inputMode.addClass(classes),$wrapper.css({width:$input[0].style.width}),self.plugins.names.length&&(inputId="plugin-"+self.plugins.names.join(" plugin-"),$wrapper.addClass(inputId),inputMode.addClass(inputId)),(null===settings.maxItems||1<settings.maxItems)&&1===self.tagType&&$input.attr("multiple","multiple"),self.settings.placeholder&&$control_input.attr("placeholder",settings.placeholder),!self.settings.splitOn&&self.settings.delimiter&&(classes=self.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),self.settings.splitOn=new RegExp("\\s*"+classes+"+\\s*")),$input.attr("autocorrect")&&$control_input.attr("autocorrect",$input.attr("autocorrect")),$input.attr("autocapitalize")&&$control_input.attr("autocapitalize",$input.attr("autocapitalize")),$input.is("input")&&($control_input[0].type=$input[0].type),self.$wrapper=$wrapper,self.$control=$control,self.$control_input=$control_input,self.$dropdown=inputMode,self.$dropdown_content=$dropdown_parent,inputMode.on("mouseenter mousedown mouseup click","[data-disabled]>[data-selectable]",function(e){e.stopImmediatePropagation()}),inputMode.on("mouseenter","[data-selectable]",function(){return self.onOptionHover.apply(self,arguments)}),inputMode.on("mouseup click","[data-selectable]",function(){return self.onOptionSelect.apply(self,arguments)}),inputId="mouseup",classes="*:not(input)",fn=function(){return self.onItemSelect.apply(self,arguments)},($parent=$control).on(inputId,classes,function(e){for(var child=e.target;child&&child.parentNode!==$parent[0];)child=child.parentNode;return e.currentTarget=child,fn.apply(this,[e])}),autoGrow($control_input),$control.on({mousedown:function(){return self.onMouseDown.apply(self,arguments)},click:function(){return self.onClick.apply(self,arguments)}}),$control_input.on({mousedown:function(e){e.stopPropagation()},keydown:function(){return self.onKeyDown.apply(self,arguments)},keypress:function(){return self.onKeyPress.apply(self,arguments)},input:function(){return self.onInput.apply(self,arguments)},resize:function(){self.positionDropdown.apply(self,[])},focus:function(){return self.ignoreBlur=!1,self.onFocus.apply(self,arguments)},paste:function(){return self.onPaste.apply(self,arguments)}}),$document.on("keydown"+eventNS,function(e){self.isCmdDown=e[IS_MAC?"metaKey":"ctrlKey"],self.isCtrlDown=e[IS_MAC?"altKey":"ctrlKey"],self.isShiftDown=e.shiftKey}),$document.on("keyup"+eventNS,function(e){e.keyCode===KEY_CTRL&&(self.isCtrlDown=!1),16===e.keyCode&&(self.isShiftDown=!1),e.keyCode===KEY_CMD&&(self.isCmdDown=!1)}),$document.on("mousedown"+eventNS,function(e){if(self.isFocused){if(e.target===self.$dropdown[0]||e.target.parentNode===self.$dropdown[0])return!1;self.$dropdown.has(e.target).length||e.target===self.$control[0]||self.blur(e.target)}}),$window.on(["scroll"+eventNS,"resize"+eventNS].join(" "),function(){self.isOpen&&self.positionDropdown.apply(self,arguments)}),$window.on("mousemove"+eventNS,function(){self.ignoreHover=self.settings.ignoreHover}),this.revertSettings={$children:$input.children().detach(),tabindex:$input.attr("tabindex")},$input.attr("tabindex",-1).hide().after(self.$wrapper),Array.isArray(settings.items)&&(self.lastValidValue=settings.items,self.setValue(settings.items),delete settings.items),SUPPORTS_VALIDITY_API&&$input.on("invalid"+eventNS,function(e){e.preventDefault(),self.isInvalid=!0,self.refreshState()}),self.updateOriginalInput(),self.refreshItems(),self.refreshState(),self.updatePlaceholder(),self.isSetup=!0,$input.is(":disabled")&&self.disable(),self.on("change",this.onChange),$input.data("selectize",self),$input.addClass("selectized"),self.trigger("initialize"),!0===settings.preload&&self.onSearchChange("")},setupTemplates:function(){var field_label=this.settings.labelField,field_value=this.settings.valueField,field_optgroup=this.settings.optgroupLabelField;this.settings.render=$.extend({},{optgroup:function(data){return'<div class="optgroup">'+data.html+"</div>"},optgroup_header:function(data,escape){return'<div class="optgroup-header">'+escape(data[field_optgroup])+"</div>"},option:function(data,escape){return'<div class="option '+(""===data[field_value]?"selectize-dropdown-emptyoptionlabel":"")+'">'+escape(data[field_label])+"</div>"},item:function(data,escape){return'<div class="item">'+escape(data[field_label])+"</div>"},option_create:function(data,escape){return'<div class="create">Add <strong>'+escape(data.input)+"</strong>…</div>"}},this.settings.render)},setupCallbacks:function(){var key,fn,callbacks={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur",dropdown_item_activate:"onDropdownItemActivate",dropdown_item_deactivate:"onDropdownItemDeactivate"};for(key in callbacks)callbacks.hasOwnProperty(key)&&(fn=this.settings[callbacks[key]])&&this.on(key,fn)},onClick:function(e){this.isDropdownClosing||this.isFocused&&this.isOpen||(this.focus(),e.preventDefault())},onMouseDown:function(e){var self=this,defaultPrevented=e.isDefaultPrevented();$(e.target);if(self.isFocused){if(e.target!==self.$control_input[0])return"single"===self.settings.mode?(self.isOpen?self.close():self.open(),self.isDropdownClosing=!0,setTimeout(function(){self.isDropdownClosing=!1},self.settings.closeDropdownThreshold)):defaultPrevented||self.setActiveItem(null),!1}else defaultPrevented||window.setTimeout(function(){self.focus()},0)},onChange:function(){""!==this.getValue()&&(this.lastValidValue=this.getValue()),this.$input.trigger("input"),this.$input.trigger("change")},onPaste:function(e){var self=this;self.isFull()||self.isInputHidden||self.isLocked?e.preventDefault():self.settings.splitOn&&setTimeout(function(){var pastedText=self.$control_input.val();if(pastedText.match(self.settings.splitOn))for(var splitInput=pastedText.trim().split(self.settings.splitOn),i=0,n=splitInput.length;i<n;i++)self.createItem(splitInput[i])},0)},onKeyPress:function(e){if(this.isLocked)return e&&e.preventDefault();var character=String.fromCharCode(e.keyCode||e.which);return this.settings.create&&"multi"===this.settings.mode&&character===this.settings.delimiter?(this.createItem(),e.preventDefault(),!1):void 0},onKeyDown:function(e){var $next;e.target,this.$control_input[0];if(this.isLocked)9!==e.keyCode&&e.preventDefault();else{switch(e.keyCode){case 65:if(this.isCmdDown)return void this.selectAll();break;case 27:return void(this.isOpen&&(e.preventDefault(),e.stopPropagation(),this.close()));case 78:if(!e.ctrlKey||e.altKey)break;case 40:return!this.isOpen&&this.hasOptions?this.open():this.$activeOption&&(this.ignoreHover=!0,($next=this.getAdjacentOption(this.$activeOption,1)).length&&this.setActiveOption($next,!0,!0)),void e.preventDefault();case 80:if(!e.ctrlKey||e.altKey)break;case 38:return this.$activeOption&&(this.ignoreHover=!0,($next=this.getAdjacentOption(this.$activeOption,-1)).length&&this.setActiveOption($next,!0,!0)),void e.preventDefault();case 13:return void(this.isOpen&&this.$activeOption&&(this.onOptionSelect({currentTarget:this.$activeOption}),e.preventDefault()));case 37:return void this.advanceSelection(-1,e);case 39:return void this.advanceSelection(1,e);case 9:return this.settings.selectOnTab&&this.isOpen&&this.$activeOption&&(this.onOptionSelect({currentTarget:this.$activeOption}),this.isFull()||e.preventDefault()),void(this.settings.create&&this.createItem()&&this.settings.showAddOptionOnCreate&&e.preventDefault());case 8:case 46:return void this.deleteSelection(e)}!this.isFull()&&!this.isInputHidden||(IS_MAC?e.metaKey:e.ctrlKey)||e.preventDefault()}},onInput:function(e){var value=this.$control_input.val()||"";this.lastValue!==value&&(this.lastValue=value,this.onSearchChange(value),this.refreshOptions(),this.trigger("type",value))},onSearchChange:function(value){var self=this,fn=self.settings.load;fn&&!self.loadedSearches.hasOwnProperty(value)&&(self.loadedSearches[value]=!0,self.load(function(callback){fn.apply(self,[value,callback])}))},onFocus:function(e){var wasFocused=this.isFocused;if(this.isDisabled)return this.blur(),e&&e.preventDefault(),!1;this.ignoreFocus||(this.isFocused=!0,"focus"===this.settings.preload&&this.onSearchChange(""),wasFocused||this.trigger("focus"),this.$activeItems.length||(this.showInput(),this.setActiveItem(null),this.refreshOptions(!!this.settings.openOnFocus)),this.refreshState())},onBlur:function(e,dest){var deactivate,self=this;self.isFocused&&(self.isFocused=!1,self.ignoreFocus||(deactivate=function(){self.close(),self.setTextboxValue(""),self.setActiveItem(null),self.setActiveOption(null),self.setCaret(self.items.length),self.refreshState(),dest&&dest.focus&&dest.focus(),self.isBlurring=!1,self.ignoreFocus=!1,self.trigger("blur")},self.isBlurring=!0,self.ignoreFocus=!0,self.settings.create&&self.settings.createOnBlur?self.createItem(null,!1,deactivate):deactivate()))},onOptionHover:function(e){this.ignoreHover||this.setActiveOption(e.currentTarget,!1)},onOptionSelect:function(e){var $target,self=this;e.preventDefault&&(e.preventDefault(),e.stopPropagation()),($target=$(e.currentTarget)).hasClass("create")?self.createItem(null,function(){self.settings.closeAfterSelect&&self.close()}):void 0!==($target=$target.attr("data-value"))&&(self.lastQuery=null,self.setTextboxValue(""),self.addItem($target),self.settings.closeAfterSelect?self.close():!self.settings.hideSelected&&e.type&&/mouse/.test(e.type)&&self.setActiveOption(self.getOption($target)))},onItemSelect:function(e){this.isLocked||"multi"===this.settings.mode&&(e.preventDefault(),this.setActiveItem(e.currentTarget,e))},load:function(fn){var self=this,$wrapper=self.$wrapper.addClass(self.settings.loadingClass);self.loading++,fn.apply(self,[function(results){self.loading=Math.max(self.loading-1,0),results&&results.length&&(self.addOption(results),self.refreshOptions(self.isFocused&&!self.isInputHidden)),self.loading||$wrapper.removeClass(self.settings.loadingClass),self.trigger("load",results)}])},getTextboxValue:function(){return this.$control_input.val()},setTextboxValue:function(value){var $input=this.$control_input;$input.val()!==value&&($input.val(value).triggerHandler("update"),this.lastValue=value)},getValue:function(){return 1===this.tagType&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(value,silent){debounce_events(this,silent?[]:["change"],function(){this.clear(silent),this.addItems(value,silent)})},setMaxItems:function(value){this.settings.maxItems=value=0===value?null:value,this.settings.mode=this.settings.mode||(1===this.settings.maxItems?"single":"multi"),this.refreshState()},setActiveItem:function($item,e){var eventName,i,end,item,swap,$last;if("single"!==this.settings.mode){if(!($item=$($item)).length)return $(this.$activeItems).removeClass("active"),this.$activeItems=[],void(this.isFocused&&this.showInput());if("mousedown"===(eventName=e&&e.type.toLowerCase())&&this.isShiftDown&&this.$activeItems.length){for($last=this.$control.children(".active:last"),$last=Array.prototype.indexOf.apply(this.$control[0].childNodes,[$last[0]]),(end=Array.prototype.indexOf.apply(this.$control[0].childNodes,[$item[0]]))<$last&&(swap=$last,$last=end,end=swap),i=$last;i<=end;i++)item=this.$control[0].childNodes[i],-1===this.$activeItems.indexOf(item)&&($(item).addClass("active"),this.$activeItems.push(item));e.preventDefault()}else"mousedown"===eventName&&this.isCtrlDown||"keydown"===eventName&&this.isShiftDown?$item.hasClass("active")?(swap=this.$activeItems.indexOf($item[0]),this.$activeItems.splice(swap,1),$item.removeClass("active")):this.$activeItems.push($item.addClass("active")[0]):($(this.$activeItems).removeClass("active"),this.$activeItems=[$item.addClass("active")[0]]);this.hideInput(),this.isFocused||this.focus()}},setActiveOption:function($option,scroll,animate){var height_item,y,scroll_top,scroll_bottom;this.$activeOption&&(this.$activeOption.removeClass("active"),this.trigger("dropdown_item_deactivate",this.$activeOption.attr("data-value"))),this.$activeOption=null,($option=$($option)).length&&(this.$activeOption=$option.addClass("active"),this.isOpen&&this.trigger("dropdown_item_activate",this.$activeOption.attr("data-value")),!scroll&&isset(scroll)||($option=this.$dropdown_content.height(),height_item=this.$activeOption.outerHeight(!0),scroll=this.$dropdown_content.scrollTop()||0,scroll_bottom=(scroll_top=y=this.$activeOption.offset().top-this.$dropdown_content.offset().top+scroll)-$option+height_item,$option+scroll<y+height_item?this.$dropdown_content.stop().animate({scrollTop:scroll_bottom},animate?this.settings.scrollDuration:0):y<scroll&&this.$dropdown_content.stop().animate({scrollTop:scroll_top},animate?this.settings.scrollDuration:0)))},selectAll:function(){"single"!==this.settings.mode&&(this.$activeItems=Array.prototype.slice.apply(this.$control.children(":not(input)").addClass("active")),this.$activeItems.length&&(this.hideInput(),this.close()),this.focus())},hideInput:function(){this.setTextboxValue(""),this.$control_input.css({opacity:0,position:"absolute",left:this.rtl?1e4:0}),this.isInputHidden=!0},showInput:function(){this.$control_input.css({opacity:1,position:"relative",left:0}),this.isInputHidden=!1},focus:function(){var self=this;return self.isDisabled||(self.ignoreFocus=!0,self.$control_input[0].focus(),window.setTimeout(function(){self.ignoreFocus=!1,self.onFocus()},0)),self},blur:function(dest){return this.$control_input[0].blur(),this.onBlur(null,dest),this},getScoreFunction:function(query){return this.sifter.getScoreFunction(query,this.getSearchOptions())},getSearchOptions:function(){var settings=this.settings,sort=settings.sortField;return{fields:settings.searchField,conjunction:settings.searchConjunction,sort:sort="string"==typeof sort?[{field:sort}]:sort,nesting:settings.nesting,filter:settings.filter}},search:function(query){var i,result,calculateScore,settings=this.settings,options=this.getSearchOptions();if(settings.score&&"function"!=typeof(calculateScore=this.settings.score.apply(this,[query])))throw new Error('Selectize "score" setting must be a function that returns a function');if(query!==this.lastQuery?(settings.normalize&&(query=query.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),this.lastQuery=query,result=this.sifter.search(query,$.extend(options,{score:calculateScore})),this.currentResults=result):result=$.extend(!0,{},this.currentResults),settings.hideSelected)for(i=result.items.length-1;0<=i;i--)-1!==this.items.indexOf(hash_key(result.items[i].id))&&result.items.splice(i,1);return result},refreshOptions:function(triggerDropdown){void 0===triggerDropdown&&(triggerDropdown=!0);var i,j,k,groups,groups_order,option,option_html,optgroup,optgroups,html,html_children,has_create_option,$active,$create,d,tmp,self=this,query=self.$control_input.val().trim(),results=self.search(query),$dropdown_content=self.$dropdown_content,active_before=self.$activeOption&&hash_key(self.$activeOption.attr("data-value")),n=results.items.length;for("number"==typeof self.settings.maxOptions&&(n=Math.min(n,self.settings.maxOptions)),groups={},groups_order=[],i=0;i<n;i++)for(option=self.options[results.items[i].id],option_html=self.render("option",option),optgroup=option[self.settings.optgroupField]||"",j=0,k=(optgroups=Array.isArray(optgroup)?optgroup:[optgroup])&&optgroups.length;j<k;j++)optgroup=optgroups[j],self.optgroups.hasOwnProperty(optgroup)||(optgroup=""),groups.hasOwnProperty(optgroup)||(groups[optgroup]=document.createDocumentFragment(),groups_order.push(optgroup)),groups[optgroup].appendChild(option_html);for(this.settings.lockOptgroupOrder&&groups_order.sort(function(a,b){return(self.optgroups[a]&&self.optgroups[a].$order||0)-(self.optgroups[b]&&self.optgroups[b].$order||0)}),html=document.createDocumentFragment(),i=0,n=groups_order.length;i<n;i++)optgroup=groups_order[i],self.optgroups.hasOwnProperty(optgroup)&&groups[optgroup].childNodes.length?((html_children=document.createDocumentFragment()).appendChild(self.render("optgroup_header",self.optgroups[optgroup])),html_children.appendChild(groups[optgroup]),html.appendChild(self.render("optgroup",$.extend({},self.optgroups[optgroup],{html:(d=html_children,tmp=void 0,(tmp=document.createElement("div")).appendChild(d.cloneNode(!0)),tmp.innerHTML),dom:html_children})))):html.appendChild(groups[optgroup]);if($dropdown_content.html(html),self.settings.highlight&&($dropdown_content.removeHighlight(),results.query.length&&results.tokens.length))for(i=0,n=results.tokens.length;i<n;i++)!function($element,pattern){var regex,highlight;if("string"!=typeof pattern||pattern.length)regex="string"==typeof pattern?new RegExp(pattern,"i"):pattern,highlight=function(node){var skip=0;if(3===node.nodeType){var spannode,match,pos=node.data.search(regex);0<=pos&&0<node.data.length&&(match=node.data.match(regex),(spannode=document.createElement("span")).className="highlight",(pos=node.splitText(pos)).splitText(match[0].length),match=pos.cloneNode(!0),spannode.appendChild(match),pos.parentNode.replaceChild(spannode,pos),skip=1)}else if(1===node.nodeType&&node.childNodes&&!/(script|style)/i.test(node.tagName)&&("highlight"!==node.className||"SPAN"!==node.tagName))for(var i=0;i<node.childNodes.length;++i)i+=highlight(node.childNodes[i]);return skip},$element.each(function(){highlight(this)})}($dropdown_content,results.tokens[i].regex);if(!self.settings.hideSelected)for(self.$dropdown.find(".selected").removeClass("selected"),i=0,n=self.items.length;i<n;i++)self.getOption(self.items[i]).addClass("selected");(has_create_option=self.canCreate(query))&&self.settings.showAddOptionOnCreate&&($dropdown_content.prepend(self.render("option_create",{input:query})),$create=$($dropdown_content[0].childNodes[0])),self.hasOptions=0<results.items.length||has_create_option&&self.settings.showAddOptionOnCreate||self.settings.setFirstOptionActive,self.hasOptions?(0<results.items.length?(query=active_before&&self.getOption(active_before),""!==results.query&&self.settings.setFirstOptionActive?$active=$dropdown_content.find("[data-selectable]:first"):""!==results.query&&query&&query.length?$active=query:"single"===self.settings.mode&&self.items.length&&($active=self.getOption(self.items[0])),$active&&$active.length||($active=$create&&!self.settings.addPrecedence?self.getAdjacentOption($create,1):$dropdown_content.find("[data-selectable]:first"))):$active=$create,self.setActiveOption($active),triggerDropdown&&!self.isOpen&&self.open()):(self.setActiveOption(null),triggerDropdown&&self.isOpen&&self.close())},addOption:function(data){var i,n,value;if(Array.isArray(data))for(i=0,n=data.length;i<n;i++)this.addOption(data[i]);else(value=this.registerOption(data))&&(this.userOptions[value]=!0,this.lastQuery=null,this.trigger("option_add",value,data))},registerOption:function(data){var key=hash_key(data[this.settings.valueField]);return null!=key&&!this.options.hasOwnProperty(key)&&(data.$order=data.$order||++this.order,this.options[key]=data,key)},registerOptionGroup:function(data){var key=hash_key(data[this.settings.optgroupValueField]);return!!key&&(data.$order=data.$order||++this.order,this.optgroups[key]=data,key)},addOptionGroup:function(id,data){data[this.settings.optgroupValueField]=id,(id=this.registerOptionGroup(data))&&this.trigger("optgroup_add",id,data)},removeOptionGroup:function(id){this.optgroups.hasOwnProperty(id)&&(delete this.optgroups[id],this.renderCache={},this.trigger("optgroup_remove",id))},clearOptionGroups:function(){this.optgroups={},this.renderCache={},this.trigger("optgroup_clear")},updateOption:function(value,data){var value_new,index_item,order_old;if(value=hash_key(value),value_new=hash_key(data[this.settings.valueField]),null!==value&&this.options.hasOwnProperty(value)){if("string"!=typeof value_new)throw new Error("Value must be set in option data");order_old=this.options[value].$order,value_new!==value&&(delete this.options[value],-1!==(index_item=this.items.indexOf(value))&&this.items.splice(index_item,1,value_new)),data.$order=data.$order||order_old,this.options[value_new]=data,index_item=this.renderCache.item,order_old=this.renderCache.option,index_item&&(delete index_item[value],delete index_item[value_new]),order_old&&(delete order_old[value],delete order_old[value_new]),-1!==this.items.indexOf(value_new)&&(index_item=this.getItem(value),order_old=$(this.render("item",data)),index_item.hasClass("active")&&order_old.addClass("active"),index_item.replaceWith(order_old)),this.lastQuery=null,this.isOpen&&this.refreshOptions(!1)}},removeOption:function(value,silent){value=hash_key(value);var cache_items=this.renderCache.item,cache_options=this.renderCache.option;cache_items&&delete cache_items[value],cache_options&&delete cache_options[value],delete this.userOptions[value],delete this.options[value],this.lastQuery=null,this.trigger("option_remove",value),this.removeItem(value,silent)},clearOptions:function(silent){var self=this,options=(self.loadedSearches={},self.userOptions={},self.renderCache={},self.options);$.each(self.options,function(key,value){-1==self.items.indexOf(key)&&delete options[key]}),self.options=self.sifter.items=options,self.lastQuery=null,self.trigger("option_clear"),self.clear(silent)},getOption:function(value){return this.getElementWithValue(value,this.$dropdown_content.find("[data-selectable]"))},getFirstOption:function(){var $options=this.$dropdown.find("[data-selectable]");return 0<$options.length?$options.eq(0):$()},getAdjacentOption:function($option,direction){var $options=this.$dropdown.find("[data-selectable]"),$option=$options.index($option)+direction;return 0<=$option&&$option<$options.length?$options.eq($option):$()},getElementWithValue:function(value,$els){if(null!=(value=hash_key(value)))for(var i=0,n=$els.length;i<n;i++)if($els[i].getAttribute("data-value")===value)return $($els[i]);return $()},getElementWithTextContent:function(textContent,ignoreCase,$els){if(null!=(textContent=hash_key(textContent)))for(var i=0,n=$els.length;i<n;i++){var eleTextContent=$els[i].textContent;if(1==ignoreCase&&(eleTextContent=null!==eleTextContent?eleTextContent.toLowerCase():null,textContent=textContent.toLowerCase()),eleTextContent===textContent)return $($els[i])}return $()},getItem:function(value){return this.getElementWithValue(value,this.$control.children())},getFirstItemMatchedByTextContent:function(textContent,ignoreCase){return this.getElementWithTextContent(textContent,ignoreCase=null!==ignoreCase&&!0===ignoreCase,this.$dropdown_content.find("[data-selectable]"))},addItems:function(values,silent){this.buffer=document.createDocumentFragment();for(var childNodes=this.$control[0].childNodes,i=0;i<childNodes.length;i++)this.buffer.appendChild(childNodes[i]);for(var items=Array.isArray(values)?values:[values],i=0,n=items.length;i<n;i++)this.isPending=i<n-1,this.addItem(items[i],silent);values=this.$control[0];values.insertBefore(this.buffer,values.firstChild),this.buffer=null},addItem:function(value,silent){debounce_events(this,silent?[]:["change"],function(){var $item,$option,wasFull,inputMode=this.settings.mode;value=hash_key(value),-1!==this.items.indexOf(value)?"single"===inputMode&&this.close():this.options.hasOwnProperty(value)&&("single"===inputMode&&this.clear(silent),"multi"===inputMode&&this.isFull()||($item=$(this.render("item",this.options[value])),wasFull=this.isFull(),this.items.splice(this.caretPos,0,value),this.insertAtCaret($item),this.isPending&&(wasFull||!this.isFull())||this.refreshState(),this.isSetup&&(wasFull=this.$dropdown_content.find("[data-selectable]"),this.isPending||($option=this.getOption(value),$option=this.getAdjacentOption($option,1).attr("data-value"),this.refreshOptions(this.isFocused&&"single"!==inputMode),$option&&this.setActiveOption(this.getOption($option))),!wasFull.length||this.isFull()?this.close():this.isPending||this.positionDropdown(),this.updatePlaceholder(),this.trigger("item_add",value,$item),this.isPending||this.updateOriginalInput({silent:silent}))))})},removeItem:function(value,silent){var i,idx,$item=value instanceof $?value:this.getItem(value);value=hash_key($item.attr("data-value")),-1!==(i=this.items.indexOf(value))&&(this.trigger("item_before_remove",value,$item),$item.remove(),$item.hasClass("active")&&(idx=this.$activeItems.indexOf($item[0]),this.$activeItems.splice(idx,1)),this.items.splice(i,1),this.lastQuery=null,!this.settings.persist&&this.userOptions.hasOwnProperty(value)&&this.removeOption(value,silent),i<this.caretPos&&this.setCaret(this.caretPos-1),this.refreshState(),this.updatePlaceholder(),this.updateOriginalInput({silent:silent}),this.positionDropdown(),this.trigger("item_remove",value,$item))},createItem:function(input,triggerDropdown){var self=this,caret=self.caretPos,callback=(input=input||(self.$control_input.val()||"").trim(),arguments[arguments.length-1]);if("function"!=typeof callback&&(callback=function(){}),"boolean"!=typeof triggerDropdown&&(triggerDropdown=!0),!self.canCreate(input))return callback(),!1;self.lock();var fn,called,setup="function"==typeof self.settings.create?this.settings.create:function(input){var data={},input=data[self.settings.labelField]=input;if(!self.settings.formatValueToKey||"function"!=typeof self.settings.formatValueToKey||null!=(input=self.settings.formatValueToKey.apply(this,[input]))&&"object"!=typeof input&&"function"!=typeof input)return data[self.settings.valueField]=input,data;throw new Error('Selectize "formatValueToKey" setting must be a function that returns a value other than object or function.')},create=(called=!(fn=function(data){return self.unlock(),!data||"object"!=typeof data||"string"!=typeof(value=hash_key(data[self.settings.valueField]))?callback():(self.setTextboxValue(""),self.addOption(data),self.setCaret(caret),self.addItem(value),self.refreshOptions(triggerDropdown&&"single"!==self.settings.mode),void callback(data));var value}),function(){called||(called=!0,fn.apply(this,arguments))}),setup=setup.apply(this,[input,create]);return void 0!==setup&&create(setup),!0},refreshItems:function(){this.lastQuery=null,this.isSetup&&this.addItem(this.items),this.refreshState(),this.updateOriginalInput()},refreshState:function(){this.refreshValidityState(),this.refreshClasses()},refreshValidityState:function(){if(!this.isRequired)return!1;var invalid=!this.items.length;this.isInvalid=invalid,this.$control_input.prop("required",invalid),this.$input.prop("required",!invalid)},refreshClasses:function(){var isFull=this.isFull(),isLocked=this.isLocked;this.$wrapper.toggleClass("rtl",this.rtl),this.$control.toggleClass("focus",this.isFocused).toggleClass("disabled",this.isDisabled).toggleClass("required",this.isRequired).toggleClass("invalid",this.isInvalid).toggleClass("locked",isLocked).toggleClass("full",isFull).toggleClass("not-full",!isFull).toggleClass("input-active",this.isFocused&&!this.isInputHidden).toggleClass("dropdown-active",this.isOpen).toggleClass("has-options",!$.isEmptyObject(this.options)).toggleClass("has-items",0<this.items.length),this.$control_input.data("grow",!isFull&&!isLocked)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(opts){var i,n,options,label;if(opts=opts||{},1===this.tagType){for(options=[],i=0,n=this.items.length;i<n;i++)label=this.options[this.items[i]][this.settings.labelField]||"",options.push('<option value="'+escape_html(this.items[i])+'" selected="selected">'+escape_html(label)+"</option>");options.length||this.$input.attr("multiple")||options.push('<option value="" selected="selected"></option>'),this.$input.html(options.join(""))}else this.$input.val(this.getValue()),this.$input.attr("value",this.$input.val());this.isSetup&&!opts.silent&&this.trigger("change",this.$input.val())},updatePlaceholder:function(){var $input;this.settings.placeholder&&($input=this.$control_input,this.items.length?$input.removeAttr("placeholder"):$input.attr("placeholder",this.settings.placeholder),$input.triggerHandler("update",{force:!0}))},open:function(){this.isLocked||this.isOpen||"multi"===this.settings.mode&&this.isFull()||this.$control_input.is(":invalid")||(this.focus(),this.isOpen=!0,this.refreshState(),this.$dropdown.css({visibility:"hidden",display:"block"}),this.setupDropdownHeight(),this.positionDropdown(),this.$dropdown.css({visibility:"visible"}),this.trigger("dropdown_open",this.$dropdown))},close:function(){var trigger=this.isOpen;"single"===this.settings.mode&&this.items.length&&(this.hideInput(),this.isBlurring&&this.$control_input[0].blur()),this.isOpen=!1,this.$dropdown.hide(),this.setActiveOption(null),this.refreshState(),trigger&&this.trigger("dropdown_close",this.$dropdown)},positionDropdown:function(){var $control=this.$control,offset="body"===this.settings.dropdownParent?$control.offset():$control.position(),$control=(offset.top+=$control.outerHeight(!0),$control[0].getBoundingClientRect().width);this.settings.minWidth&&this.settings.minWidth>$control&&($control=this.settings.minWidth),this.$dropdown.css({width:$control,top:offset.top,left:offset.left})},setupDropdownHeight:function(){var totalHeight,$items,height;"object"==typeof this.settings.dropdownSize&&"auto"!==this.settings.dropdownSize.sizeType&&(height=this.settings.dropdownSize.sizeValue,"numberItems"===this.settings.dropdownSize.sizeType&&($items=this.$dropdown_content.children(),totalHeight=0,$items.each(function(i,$item){if(i===height)return!1;totalHeight+=$($item).outerHeight(!0)}),$items=this.$dropdown_content.css("padding-top")?this.$dropdown_content.css("padding-top").replace(/\W*(\w)\w*/g,"$1"):0,height=totalHeight-$items+"px"),this.$dropdown_content.css({height:height,maxHeight:"none"}))},clear:function(silent){this.items.length&&(this.$control.children(":not(input)").remove(),this.items=[],this.lastQuery=null,this.setCaret(0),this.setActiveItem(null),this.updatePlaceholder(),this.updateOriginalInput({silent:silent}),this.refreshState(),this.showInput(),this.trigger("clear"))},insertAtCaret:function($el){var caret=Math.min(this.caretPos,this.items.length),$el=$el[0],target=this.buffer||this.$control[0];0===caret?target.insertBefore($el,target.firstChild):target.insertBefore($el,target.childNodes[caret]),this.setCaret(caret+1)},deleteSelection:function(e){var i,n,values,option_select,$tail,direction=e&&8===e.keyCode?-1:1,selection=getSelection(this.$control_input[0]);if(this.$activeOption&&!this.settings.hideSelected&&(option_select=("string"==typeof this.settings.deselectBehavior&&"top"===this.settings.deselectBehavior?this.getFirstOption():this.getAdjacentOption(this.$activeOption,-1)).attr("data-value")),values=[],this.$activeItems.length){for($tail=this.$control.children(".active:"+(0<direction?"last":"first")),$tail=this.$control.children(":not(input)").index($tail),0<direction&&$tail++,i=0,n=this.$activeItems.length;i<n;i++)values.push($(this.$activeItems[i]).attr("data-value"));e&&(e.preventDefault(),e.stopPropagation())}else(this.isFocused||"single"===this.settings.mode)&&this.items.length&&(direction<0&&0===selection.start&&0===selection.length?values.push(this.items[this.caretPos-1]):0<direction&&selection.start===this.$control_input.val().length&&values.push(this.items[this.caretPos]));if(!values.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete.apply(this,[values]))return!1;for(void 0!==$tail&&this.setCaret($tail);values.length;)this.removeItem(values.pop());return this.showInput(),this.positionDropdown(),this.refreshOptions(!0),option_select&&(e=this.getOption(option_select)).length&&this.setActiveOption(e),!0},advanceSelection:function(direction,e){var tail,valueLength,selection;0!==direction&&(this.rtl&&(direction*=-1),tail=0<direction?"last":"first",selection=getSelection(this.$control_input[0]),this.isFocused&&!this.isInputHidden?(valueLength=this.$control_input.val().length,(direction<0?0!==selection.start||0!==selection.length:selection.start!==valueLength)||valueLength||this.advanceCaret(direction,e)):(selection=this.$control.children(".active:"+tail)).length&&(valueLength=this.$control.children(":not(input)").index(selection),this.setActiveItem(null),this.setCaret(0<direction?valueLength+1:valueLength)))},advanceCaret:function(direction,e){var $adj;0!==direction&&(this.isShiftDown?($adj=this.$control_input[0<direction?"next":"prev"]()).length&&(this.hideInput(),this.setActiveItem($adj),e&&e.preventDefault()):this.setCaret(this.caretPos+direction))},setCaret:function(i){if(i="single"===this.settings.mode?this.items.length:Math.max(0,Math.min(this.items.length,i)),!this.isPending)for(var $child,$children=this.$control.children(":not(input)"),j=0,n=$children.length;j<n;j++)$child=$($children[j]).detach(),j<i?this.$control_input.before($child):this.$control.append($child);this.caretPos=i},lock:function(){this.close(),this.isLocked=!0,this.refreshState()},unlock:function(){this.isLocked=!1,this.refreshState()},disable:function(){this.$input.prop("disabled",!0),this.$control_input.prop("disabled",!0).prop("tabindex",-1),this.isDisabled=!0,this.lock()},enable:function(){this.$input.prop("disabled",!1),this.$control_input.prop("disabled",!1).prop("tabindex",this.tabIndex),this.isDisabled=!1,this.unlock()},destroy:function(){var eventNS=this.eventNS,revertSettings=this.revertSettings;this.trigger("destroy"),this.off(),this.$wrapper.remove(),this.$dropdown.remove(),this.$input.html("").append(revertSettings.$children).removeAttr("tabindex").removeClass("selectized").attr({tabindex:revertSettings.tabindex}).show(),this.$control_input.removeData("grow"),this.$input.removeData("selectize"),0==--Selectize.count&&Selectize.$testInput&&(Selectize.$testInput.remove(),Selectize.$testInput=void 0),$(window).off(eventNS),$(document).off(eventNS),$(document.body).off(eventNS),delete this.$input[0].selectize},render:function(templateName,data){var value,id,html="",cache=!1;return(cache="option"!==templateName&&"item"!==templateName?cache:!!(value=hash_key(data[this.settings.valueField])))&&(isset(this.renderCache[templateName])||(this.renderCache[templateName]={}),this.renderCache[templateName].hasOwnProperty(value))?this.renderCache[templateName][value]:(html=$(this.settings.render[templateName].apply(this,[data,escape_html])),"option"===templateName||"option_create"===templateName?data[this.settings.disabledField]||html.attr("data-selectable",""):"optgroup"===templateName&&(id=data[this.settings.optgroupValueField]||"",html.attr("data-group",id),data[this.settings.disabledField]&&html.attr("data-disabled","")),"option"!==templateName&&"item"!==templateName||html.attr("data-value",value||""),cache&&(this.renderCache[templateName][value]=html[0]),html[0])},clearCache:function(templateName){void 0===templateName?this.renderCache={}:delete this.renderCache[templateName]},canCreate:function(input){if(!this.settings.create)return!1;var filter=this.settings.createFilter;return input.length&&("function"!=typeof filter||filter.apply(this,[input]))&&("string"!=typeof filter||new RegExp(filter).test(input))&&(!(filter instanceof RegExp)||filter.test(input))}}),Selectize.count=0,Selectize.defaults={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:!1,showAddOptionOnCreate:!0,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,hideSelected:null,addPrecedence:!1,selectOnTab:!0,preload:!1,allowEmptyOption:!1,showEmptyOptionInDropdown:!1,emptyOptionLabel:"--",setFirstOptionActive:!1,closeAfterSelect:!1,closeDropdownThreshold:250,scrollDuration:60,deselectBehavior:"previous",loadThrottle:300,loadingClass:"loading",dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"selectize-control",inputClass:"selectize-input",dropdownClass:"selectize-dropdown",dropdownContentClass:"selectize-dropdown-content",dropdownParent:null,copyClassesToDropdown:!0,dropdownSize:{sizeType:"auto",sizeValue:"auto"},normalize:!1,render:{}},$.fn.selectize=function(settings_user){function init_select($input,settings_element){function addOption($option,group){$option=$($option);var arr,value=hash_key($option.val());(value||settings.allowEmptyOption)&&(optionsMap.hasOwnProperty(value)?group&&((arr=optionsMap[value][field_optgroup])?$.isArray(arr)?arr.push(group):optionsMap[value][field_optgroup]=[arr,group]:optionsMap[value][field_optgroup]=group):((arr=readData($option)||{})[field_label]=arr[field_label]||$option.text(),arr[field_value]=arr[field_value]||value,arr[field_disabled]=arr[field_disabled]||$option.prop("disabled"),arr[field_optgroup]=arr[field_optgroup]||group,optionsMap[value]=arr,options.push(arr),$option.is(":selected")&&settings_element.items.push(value)))}var i,n,tagName,$children,options=settings_element.options,optionsMap={},readData=function($el){$el=attr_data&&$el.attr(attr_data);return"string"==typeof $el&&$el.length?JSON.parse($el):null};for(settings_element.maxItems=$input.attr("multiple")?null:1,i=0,n=($children=$input.children()).length;i<n;i++)"optgroup"===(tagName=$children[i].tagName.toLowerCase())?function($optgroup){var i,n,id,optgroup,$options;for((id=($optgroup=$($optgroup)).attr("label"))&&((optgroup=readData($optgroup)||{})[field_optgroup_label]=id,optgroup[field_optgroup_value]=id,optgroup[field_disabled]=$optgroup.prop("disabled"),settings_element.optgroups.push(optgroup)),i=0,n=($options=$("option",$optgroup)).length;i<n;i++)addOption($options[i],id)}($children[i]):"option"===tagName&&addOption($children[i])}var defaults=$.fn.selectize.defaults,settings=$.extend({},defaults,settings_user),attr_data=settings.dataAttr,field_label=settings.labelField,field_value=settings.valueField,field_disabled=settings.disabledField,field_optgroup=settings.optgroupField,field_optgroup_label=settings.optgroupLabelField,field_optgroup_value=settings.optgroupValueField;return this.each(function(){var $input,tag_name,placeholder,input_html;this.selectize||($input=$(this),tag_name=this.tagName.toLowerCase(),(placeholder=$input.attr("placeholder")||$input.attr("data-placeholder"))||settings.allowEmptyOption||(placeholder=$input.children('option[value=""]').text()),settings.allowEmptyOption&&settings.showEmptyOptionInDropdown&&!$input.children('option[value=""]').length&&(input_html=$input.html(),$input.html('<option value="">'+settings.emptyOptionLabel+"</option>"+input_html)),("select"===tag_name?init_select:function($input,settings_element){var i,n,values,option,data_raw=$input.attr(attr_data);if(data_raw)for(settings_element.options=JSON.parse(data_raw),i=0,n=settings_element.options.length;i<n;i++)settings_element.items.push(settings_element.options[i][field_value]);else{data_raw=$.trim($input.val()||"");if(settings.allowEmptyOption||data_raw.length){for(i=0,n=(values=data_raw.split(settings.delimiter)).length;i<n;i++)(option={})[field_label]=values[i],option[field_value]=values[i],settings_element.options.push(option);settings_element.items=values}}})($input,input_html={placeholder:placeholder,options:[],optgroups:[],items:[]}),new Selectize($input,$.extend(!0,{},defaults,input_html,settings_user)).settings_user=settings_user)})},$.fn.selectize.defaults=Selectize.defaults,$.fn.selectize.support={validity:SUPPORTS_VALIDITY_API},Selectize.define("auto_position",function(){const POSITION={top:"top",bottom:"bottom"};this.positionDropdown=function(){const $control=this.$control,offset="body"===this.settings.dropdownParent?$control.offset():$control.position();offset.top+=$control.outerHeight(!0);var dropdownHeight=this.$dropdown.prop("scrollHeight")+5,dropdownHeight=this.$control.get(0).getBoundingClientRect().top+dropdownHeight+this.$wrapper.height()>window.innerHeight?POSITION.top:POSITION.bottom,styles={width:$control.outerWidth(),left:offset.left};dropdownHeight===POSITION.top?(Object.assign(styles,{bottom:offset.top,top:"unset",margin:"0 0 5px 0"}),this.$dropdown.addClass("selectize-position-top")):(Object.assign(styles,{top:offset.top,bottom:"unset",margin:"5px 0 0 0"}),this.$dropdown.removeClass("selectize-position-top")),this.$dropdown.css(styles)}}),Selectize.define("auto_select_on_type",function(options){var originalBlur,self=this;self.onBlur=(originalBlur=self.onBlur,function(e){var $matchedItem=self.getFirstItemMatchedByTextContent(self.lastValue,!0);return void 0!==$matchedItem.attr("data-value")&&self.getValue()!==$matchedItem.attr("data-value")&&self.setValue($matchedItem.attr("data-value")),originalBlur.apply(this,arguments)})}),Selectize.define("autofill_disable",function(options){var original,self=this;self.setup=(original=self.setup,function(){original.apply(self,arguments),self.$control_input.attr({autocomplete:"new-password",autofill:"no"})})}),Selectize.define("clear_button",function(options){var original,self=this;options=$.extend({title:"Clear",className:"clear",label:"×",html:function(data){return'<a class="'+data.className+'" title="'+data.title+'"> '+data.label+"</a>"}},options),self.setup=(original=self.setup,function(){original.apply(self,arguments),self.$button_clear=$(options.html(options)),"single"===self.settings.mode&&self.$wrapper.addClass("single"),self.$wrapper.append(self.$button_clear),""!==self.getValue()&&0!==self.getValue().length||self.$wrapper.find("."+options.className).css("display","none"),self.on("change",function(){""!==self.getValue()||0===self.getValue().length?self.$wrapper.find("."+options.className).css("display",""):self.$wrapper.find("."+options.className).css("display","none")}),self.$wrapper.on("click","."+options.className,function(e){e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),self.isLocked||(self.clear(),self.$wrapper.find("."+options.className).css("display","none"))})})}),Selectize.define("drag_drop",function(options){if(!$.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');var self,original;"multi"===this.settings.mode&&((self=this).lock=(original=self.lock,function(){var sortable=self.$control.data("sortable");return sortable&&sortable.disable(),original.apply(self,arguments)}),self.unlock=function(){var original=self.unlock;return function(){var sortable=self.$control.data("sortable");return sortable&&sortable.enable(),original.apply(self,arguments)}}(),self.setup=function(){var original=self.setup;return function(){original.apply(this,arguments);var $control=self.$control.sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:self.isLocked,start:function(e,ui){ui.placeholder.css("width",ui.helper.css("width")),$control.addClass("dragging")},stop:function(){$control.removeClass("dragging");var active=self.$activeItems?self.$activeItems.slice():null,values=[];$control.children("[data-value]").each(function(){values.push($(this).attr("data-value"))}),self.isFocused=!1,self.setValue(values),self.isFocused=!0,self.setActiveItem(active),self.positionDropdown()}})}}())}),Selectize.define("dropdown_header",function(options){var original,self=this;options=$.extend({title:"Untitled",headerClass:"selectize-dropdown-header",titleRowClass:"selectize-dropdown-header-title",labelClass:"selectize-dropdown-header-label",closeClass:"selectize-dropdown-header-close",html:function(data){return'<div class="'+data.headerClass+'"><div class="'+data.titleRowClass+'"><span class="'+data.labelClass+'">'+data.title+'</span><a href="javascript:void(0)" class="'+data.closeClass+'">×</a></div></div>'}},options),self.setup=(original=self.setup,function(){original.apply(self,arguments),self.$dropdown_header=$(options.html(options)),self.$dropdown.prepend(self.$dropdown_header)})}),Selectize.define("optgroup_columns",function(options){function equalizeSizes(){var i,height_max,width,width_parent,$optgroups=$("[data-group]",self.$dropdown_content),n=$optgroups.length;if(n&&self.$dropdown_content.width()){if(options.equalizeHeight){for(i=height_max=0;i<n;i++)height_max=Math.max(height_max,$optgroups.eq(i).height());$optgroups.css({height:height_max})}options.equalizeWidth&&(width_parent=self.$dropdown_content.innerWidth()-getScrollbarWidth(),width=Math.round(width_parent/n),$optgroups.css({width:width}),1<n&&(width_parent=width_parent-width*(n-1),$optgroups.eq(n-1).css({width:width_parent})))}}var original,self=this,getScrollbarWidth=(options=$.extend({equalizeWidth:!0,equalizeHeight:!0},options),this.getAdjacentOption=function($option,direction){var $options=$option.closest("[data-group]").find("[data-selectable]"),$option=$options.index($option)+direction;return 0<=$option&&$option<$options.length?$options.eq($option):$()},this.onKeyDown=(original=self.onKeyDown,function(e){var index,$optgroup;if(!this.isOpen||37!==e.keyCode&&39!==e.keyCode)return original.apply(this,arguments);self.ignoreHover=!0,index=($optgroup=this.$activeOption.closest("[data-group]")).find("[data-selectable]").index(this.$activeOption),($optgroup=(e=($optgroup=37===e.keyCode?$optgroup.prev("[data-group]"):$optgroup.next("[data-group]")).find("[data-selectable]")).eq(Math.min(e.length-1,index))).length&&this.setActiveOption($optgroup)}),function(){var div,width=getScrollbarWidth.width,doc=document;return void 0===width&&((div=doc.createElement("div")).innerHTML='<div style="width:50px;height:50px;position:absolute;left:-50px;top:-50px;overflow:auto;"><div style="width:1px;height:100px;"></div></div>',div=div.firstChild,doc.body.appendChild(div),width=getScrollbarWidth.width=div.offsetWidth-div.clientWidth,doc.body.removeChild(div)),width});(options.equalizeHeight||options.equalizeWidth)&&(hook.after(this,"positionDropdown",equalizeSizes),hook.after(this,"refreshOptions",equalizeSizes))}),Selectize.define("remove_button",function(options){options=$.extend({label:"×",title:"Remove",className:"remove",append:!0},options),("single"===this.settings.mode?function(thisRef,options){options.className="remove-single";var original,self=thisRef,html='<a href="javascript:void(0)" class="'+options.className+'" tabindex="-1" title="'+escape_html(options.title)+'">'+options.label+"</a>";thisRef.setup=(original=self.setup,function(){var id,render_item;options.append&&(id=$(self.$input.context).attr("id"),$("#"+id),render_item=self.settings.render.item,self.settings.render.item=function(data){return html_container=render_item.apply(thisRef,arguments),html_element=html,$("<span>").append(html_container).append(html_element);var html_container,html_element}),original.apply(thisRef,arguments),thisRef.$control.on("click","."+options.className,function(e){e.preventDefault(),self.isLocked||self.clear()})})}:function(thisRef,options){var original,self=thisRef,html='<a href="javascript:void(0)" class="'+options.className+'" tabindex="-1" title="'+escape_html(options.title)+'">'+options.label+"</a>";thisRef.setup=(original=self.setup,function(){var render_item;options.append&&(render_item=self.settings.render.item,self.settings.render.item=function(data){return html_container=render_item.apply(thisRef,arguments),html_element=html,pos=html_container.search(/(<\/[^>]+>\s*)$/),html_container.substring(0,pos)+html_element+html_container.substring(pos);var html_container,html_element,pos}),original.apply(thisRef,arguments),thisRef.$control.on("click","."+options.className,function(e){if(e.preventDefault(),!self.isLocked)return e=$(e.currentTarget).parent(),self.setActiveItem(e),self.deleteSelection()&&self.setCaret(self.items.length),!1})})})(this,options)}),Selectize.define("restore_on_backspace",function(options){var original,self=this;options.text=options.text||function(option){return option[this.settings.labelField]},this.onKeyDown=(original=self.onKeyDown,function(e){var index;return 8===e.keyCode&&""===this.$control_input.val()&&!this.$activeItems.length&&0<=(index=this.caretPos-1)&&index<this.items.length?(index=this.options[this.items[index]],this.deleteSelection(e)&&(this.setTextboxValue(options.text.apply(this,[index])),this.refreshOptions(!0)),void e.preventDefault()):original.apply(this,arguments)})}),Selectize.define("select_on_focus",function(options){var originalFocus,originalBlur,self=this;self.on("focus",(originalFocus=self.onFocus,function(e){var value=self.getItem(self.getValue()).text();return self.clear(),self.setTextboxValue(value),self.$control_input.select(),setTimeout(function(){self.settings.selectOnTab&&self.setActiveOption(self.getFirstItemMatchedByTextContent(value)),self.settings.score=null},0),originalFocus.apply(this,arguments)})),self.onBlur=(originalBlur=self.onBlur,function(e){return""===self.getValue()&&self.lastValidValue!==self.getValue()&&self.setValue(self.lastValidValue),setTimeout(function(){self.settings.score=function(){return function(){return 1}}},0),originalBlur.apply(this,arguments)}),self.settings.score=function(){return function(){return 1}}}),Selectize.define("tag_limit",function(options){const self=this;options.tagLimit=options.tagLimit,this.onBlur=function(){const original=self.onBlur;return function(e){if(original.apply(this,e),e){const $control=this.$control,$items=$control.find(".item"),limit=options.tagLimit;void 0===limit||$items.length<=limit||($items.toArray().forEach(function(item,index){index<limit||$(item).hide()}),$control.append("<span><b>"+($items.length-limit)+"</b></span>"))}}}(),this.onFocus=function(){const original=self.onFocus;return function(e){if(original.apply(this,e),e){const $control=this.$control,$items=$control.find(".item");$items.show(),$control.find("span").remove()}}}()}),Selectize});
|
|
lib/jeg-framework/bootstrap.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* https://github.com/aristath/kirki
|
5 |
*
|
6 |
* @author Jegstudio
|
7 |
-
* @since 1.2.
|
8 |
* @package jeg-framework
|
9 |
*/
|
10 |
|
@@ -14,7 +14,7 @@ if ( defined( 'JEG_VERSION' ) ) {
|
|
14 |
|
15 |
// Need to define JEG_URL on plugin / Themes.
|
16 |
defined( 'JEG_URL' ) || define( 'JEG_URL', JEG_THEME_URL . '/lib/jeg-framework' );
|
17 |
-
defined( 'JEG_VERSION' ) || define( 'JEG_VERSION', '1.2.
|
18 |
defined( 'JEG_DIR' ) || define( 'JEG_DIR', dirname( __FILE__ ) );
|
19 |
defined( 'JEG_CLASSPATH' ) || define( 'JEG_CLASSPATH', JEG_DIR );
|
20 |
|
4 |
* https://github.com/aristath/kirki
|
5 |
*
|
6 |
* @author Jegstudio
|
7 |
+
* @since 1.2.9
|
8 |
* @package jeg-framework
|
9 |
*/
|
10 |
|
14 |
|
15 |
// Need to define JEG_URL on plugin / Themes.
|
16 |
defined( 'JEG_URL' ) || define( 'JEG_URL', JEG_THEME_URL . '/lib/jeg-framework' );
|
17 |
+
defined( 'JEG_VERSION' ) || define( 'JEG_VERSION', '1.2.9' );
|
18 |
defined( 'JEG_DIR' ) || define( 'JEG_DIR', dirname( __FILE__ ) );
|
19 |
defined( 'JEG_CLASSPATH' ) || define( 'JEG_CLASSPATH', JEG_DIR );
|
20 |
|
lib/jeg-framework/customizer/class-customizer.php
CHANGED
@@ -874,6 +874,14 @@ class Customizer {
|
|
874 |
} : '__return_true';
|
875 |
}
|
876 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
877 |
return $control;
|
878 |
}
|
879 |
|
@@ -979,6 +987,7 @@ class Customizer {
|
|
979 |
'jeg-text' => 'Jeg\Customizer\Control\Text',
|
980 |
'jeg-password' => 'Jeg\Customizer\Control\Password',
|
981 |
'jeg-textarea' => 'Jeg\Customizer\Control\Textarea',
|
|
|
982 |
'jeg-radio' => 'Jeg\Customizer\Control\Radio',
|
983 |
'jeg-image' => 'Jeg\Customizer\Control\Image',
|
984 |
'jeg-upload' => 'Jeg\Customizer\Control\Upload',
|
@@ -1476,6 +1485,12 @@ class Customizer {
|
|
1476 |
$in_footer = 1;
|
1477 |
$wp_scripts->add( $handle, $src, $deps, $this->version, $in_footer );
|
1478 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1479 |
$handle = 'jeg-radio-control';
|
1480 |
$src = JEG_URL . '/assets/js/customizer-control/control-radio.js';
|
1481 |
$deps = array( 'jeg-default-control' );
|
@@ -1558,6 +1573,7 @@ class Customizer {
|
|
1558 |
'jeg-preset-image-control',
|
1559 |
'jeg-text-control',
|
1560 |
'jeg-textarea-control',
|
|
|
1561 |
'jeg-radio-control',
|
1562 |
'jeg-image-control',
|
1563 |
'jeg-upload-control',
|
@@ -1584,13 +1600,13 @@ class Customizer {
|
|
1584 |
* Load css on Customizer Panel
|
1585 |
*/
|
1586 |
public function customizer_styles() {
|
1587 |
-
wp_enqueue_style( 'selectize', JEG_URL . '/assets/css/selectize.default.css', null,
|
1588 |
wp_enqueue_style( 'jeg-customizer-css', JEG_URL . '/assets/css/customizer.css', array( 'wp-color-picker' ), $this->version );
|
1589 |
wp_enqueue_style( 'codemirror', JEG_URL . '/assets/js/vendor/codemirror/lib/codemirror.css', null, $this->version );
|
1590 |
-
wp_enqueue_style( 'font-awesome', JEG_URL . '/assets/font/font-awesome/font-awesome.css', null,
|
1591 |
|
1592 |
-
wp_enqueue_style( 'ion-range-slider', JEG_URL . '/assets/css/ion.rangeSlider.css', null,
|
1593 |
-
wp_enqueue_style( 'ion-range-slider-skin', JEG_URL . '/assets/css/ion.rangeSlider.skinFlat.css', null,
|
1594 |
|
1595 |
if ( is_rtl() ) {
|
1596 |
wp_enqueue_style( 'jeg-customizer-css-rtl', JEG_URL . '/assets/css/customizer-rtl.css', null, $this->version );
|
874 |
} : '__return_true';
|
875 |
}
|
876 |
|
877 |
+
// Code Editor
|
878 |
+
if ( isset( $field['input_attrs'] ) ) {
|
879 |
+
$control['input_attrs'] = $field['input_attrs'];
|
880 |
+
}
|
881 |
+
if ( isset( $field['code_type'] ) ) {
|
882 |
+
$control['code_type'] = $field['code_type'];
|
883 |
+
}
|
884 |
+
|
885 |
return $control;
|
886 |
}
|
887 |
|
987 |
'jeg-text' => 'Jeg\Customizer\Control\Text',
|
988 |
'jeg-password' => 'Jeg\Customizer\Control\Password',
|
989 |
'jeg-textarea' => 'Jeg\Customizer\Control\Textarea',
|
990 |
+
'jeg-code-editor' => 'Jeg\Customizer\Control\Code_Editor',
|
991 |
'jeg-radio' => 'Jeg\Customizer\Control\Radio',
|
992 |
'jeg-image' => 'Jeg\Customizer\Control\Image',
|
993 |
'jeg-upload' => 'Jeg\Customizer\Control\Upload',
|
1485 |
$in_footer = 1;
|
1486 |
$wp_scripts->add( $handle, $src, $deps, $this->version, $in_footer );
|
1487 |
|
1488 |
+
$handle = 'jeg-code-editor-control';
|
1489 |
+
$src = JEG_URL . '/assets/js/customizer-control/control-code-editor.js';
|
1490 |
+
$deps = array( 'jeg-default-control' );
|
1491 |
+
$in_footer = 1;
|
1492 |
+
$wp_scripts->add( $handle, $src, $deps, $this->version, $in_footer );
|
1493 |
+
|
1494 |
$handle = 'jeg-radio-control';
|
1495 |
$src = JEG_URL . '/assets/js/customizer-control/control-radio.js';
|
1496 |
$deps = array( 'jeg-default-control' );
|
1573 |
'jeg-preset-image-control',
|
1574 |
'jeg-text-control',
|
1575 |
'jeg-textarea-control',
|
1576 |
+
'jeg-code-editor-control',
|
1577 |
'jeg-radio-control',
|
1578 |
'jeg-image-control',
|
1579 |
'jeg-upload-control',
|
1600 |
* Load css on Customizer Panel
|
1601 |
*/
|
1602 |
public function customizer_styles() {
|
1603 |
+
wp_enqueue_style( 'selectize', JEG_URL . '/assets/css/selectize.default.css', null, '0.12.2' );
|
1604 |
wp_enqueue_style( 'jeg-customizer-css', JEG_URL . '/assets/css/customizer.css', array( 'wp-color-picker' ), $this->version );
|
1605 |
wp_enqueue_style( 'codemirror', JEG_URL . '/assets/js/vendor/codemirror/lib/codemirror.css', null, $this->version );
|
1606 |
+
wp_enqueue_style( 'font-awesome', JEG_URL . '/assets/font/font-awesome/font-awesome.css', null, '4.7.0' );
|
1607 |
|
1608 |
+
wp_enqueue_style( 'ion-range-slider', JEG_URL . '/assets/css/ion.rangeSlider.css', null, '2.0.3' );
|
1609 |
+
wp_enqueue_style( 'ion-range-slider-skin', JEG_URL . '/assets/css/ion.rangeSlider.skinFlat.css', null, '2.0.3' );
|
1610 |
|
1611 |
if ( is_rtl() ) {
|
1612 |
wp_enqueue_style( 'jeg-customizer-css-rtl', JEG_URL . '/assets/css/customizer-rtl.css', null, $this->version );
|
lib/jeg-framework/customizer/control/class-code-editor.php
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Customizer Control: Code Editor.
|
4 |
+
*
|
5 |
+
* Creates a Code Editor
|
6 |
+
*
|
7 |
+
* @author Jegstudio
|
8 |
+
* @since 1.0.0
|
9 |
+
* @package jeg-framework
|
10 |
+
*/
|
11 |
+
|
12 |
+
namespace Jeg\Customizer\Control;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Code Editor.
|
16 |
+
*/
|
17 |
+
class Code_Editor extends Control_Abstract {
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Customize control type.
|
21 |
+
*
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
+
public $type = 'jeg-code-editor';
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Type of code that is being edited.
|
28 |
+
*
|
29 |
+
* @var string
|
30 |
+
*/
|
31 |
+
public $code_type = '';
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Code editor settings.
|
35 |
+
*
|
36 |
+
* @see wp_enqueue_code_editor()
|
37 |
+
* @var array|false
|
38 |
+
*/
|
39 |
+
public $editor_settings = array();
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Enqueue control related scripts/styles.
|
43 |
+
*
|
44 |
+
* @since 4.9.0
|
45 |
+
*/
|
46 |
+
public function enqueue() {
|
47 |
+
$this->editor_settings = wp_enqueue_code_editor(
|
48 |
+
array_merge(
|
49 |
+
array(
|
50 |
+
'type' => $this->code_type,
|
51 |
+
'codemirror' => array(
|
52 |
+
'indentUnit' => 2,
|
53 |
+
'tabSize' => 2,
|
54 |
+
),
|
55 |
+
),
|
56 |
+
$this->editor_settings
|
57 |
+
)
|
58 |
+
);
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Refresh the parameters passed to the JavaScript via JSON.
|
63 |
+
*
|
64 |
+
* @since 4.9.0
|
65 |
+
*
|
66 |
+
* @see WP_Customize_Control::to_json()
|
67 |
+
*/
|
68 |
+
public function to_json() {
|
69 |
+
$this->enqueue();
|
70 |
+
parent::to_json();
|
71 |
+
$this->json['editor_settings'] = $this->editor_settings;
|
72 |
+
$this->json['input_attrs'] = $this->input_attrs;
|
73 |
+
}
|
74 |
+
|
75 |
+
/**
|
76 |
+
* Don't render the control content from PHP, as it's rendered via JS on load.
|
77 |
+
*
|
78 |
+
* @since 4.9.0
|
79 |
+
*/
|
80 |
+
public function render_content() {}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Render a JS template for control display.
|
84 |
+
*
|
85 |
+
* @since 4.9.0
|
86 |
+
*/
|
87 |
+
public function content_template() {
|
88 |
+
?>
|
89 |
+
<# var elementIdPrefix = 'el' + String( Math.random() ); #>
|
90 |
+
<# if ( data.label ) { #>
|
91 |
+
<label for="{{ elementIdPrefix }}_editor" class="customize-control-title">
|
92 |
+
{{ data.label }}
|
93 |
+
</label>
|
94 |
+
<# } #>
|
95 |
+
<# if ( data.description ) { #>
|
96 |
+
<span class="description customize-control-description">{{{ data.description }}}</span>
|
97 |
+
<# } #>
|
98 |
+
<div class="customize-control-notifications-container"></div>
|
99 |
+
<textarea id="{{ elementIdPrefix }}_editor"
|
100 |
+
<# _.each( _.extend( { 'class': 'code' }, data.input_attrs ), function( value, key ) { #>
|
101 |
+
{{{ key }}}="{{ value }}"
|
102 |
+
<# }); #>
|
103 |
+
></textarea>
|
104 |
+
<?php
|
105 |
+
}
|
106 |
+
}
|
lib/jeg-framework/form/class-form-archive.php
CHANGED
@@ -36,22 +36,17 @@ class Form_Archive {
|
|
36 |
* @param array $fields List of Fields available on widget.
|
37 |
*/
|
38 |
public static function render_form( $id, $segments, $fields ) {
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
43 |
?>
|
44 |
<div id="<?php echo esc_html( $id ); ?>" data-id="<?php echo esc_html( $id ); ?>" class="archive-form-holder"></div>
|
45 |
-
<script type="text/javascript">
|
46 |
-
(function ($) {
|
47 |
-
$(document).on('ready', function() {
|
48 |
-
window.widgetData = <?php echo wp_json_encode( $data ); ?>;
|
49 |
-
if ( 'undefined' !== typeof jeg && undefined !== jeg.archive) {
|
50 |
-
jeg.archive.build('<?php echo esc_html( $id ); ?>', widgetData);
|
51 |
-
}
|
52 |
-
})
|
53 |
-
})(jQuery);
|
54 |
-
</script>
|
55 |
<?php
|
56 |
}
|
57 |
}
|
36 |
* @param array $fields List of Fields available on widget.
|
37 |
*/
|
38 |
public static function render_form( $id, $segments, $fields ) {
|
39 |
+
wp_localize_script( 'jeg-form-archive-script', 'jegWidgetData', array(
|
40 |
+
wp_json_encode(array(
|
41 |
+
'id' => $id,
|
42 |
+
'data' => array(
|
43 |
+
'segments' => $segments,
|
44 |
+
'fields' => $fields,
|
45 |
+
),
|
46 |
+
))
|
47 |
+
));
|
48 |
?>
|
49 |
<div id="<?php echo esc_html( $id ); ?>" data-id="<?php echo esc_html( $id ); ?>" class="archive-form-holder"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
<?php
|
51 |
}
|
52 |
}
|
lib/jeg-framework/form/class-form-builder.php
CHANGED
@@ -119,17 +119,17 @@ class Form_Builder {
|
|
119 |
*/
|
120 |
public function form_control_script() {
|
121 |
// Style.
|
122 |
-
wp_enqueue_style( 'selectize', JEG_URL . '/assets/css/selectize.default.css', null,
|
123 |
-
wp_enqueue_style( 'font-awesome', JEG_URL . '/assets/font/font-awesome/font-awesome.css', null,
|
124 |
wp_enqueue_style( 'jeg-form-builder', JEG_URL . '/assets/css/form-builder.css', array( 'wp-color-picker' ), jeg_get_version() );
|
125 |
|
126 |
// Script.
|
127 |
wp_enqueue_script( 'microplugin', JEG_URL . '/assets/js/vendor/microplugin.js', null, jeg_get_version(), true );
|
128 |
wp_enqueue_script( 'sifter', JEG_URL . '/assets/js/vendor/sifter.min.js', null, jeg_get_version(), true );
|
129 |
-
wp_enqueue_script( 'selectize', JEG_URL . '/assets/js/vendor/selectize.min.js', null,
|
130 |
-
wp_enqueue_script( 'bootstrap', JEG_URL . '/assets/js/vendor/bootstrap.min.js', null,
|
131 |
-
wp_enqueue_script( 'bootstrap-iconpicker-iconset', JEG_URL . '/assets/js/vendor/bootstrap-iconpicker-iconset-all.min.js', null,
|
132 |
-
wp_enqueue_script( 'bootstrap-iconpicker', JEG_URL . '/assets/js/vendor/bootstrap-iconpicker.min.js', null,
|
133 |
wp_enqueue_script(
|
134 |
'jeg-form-builder-script',
|
135 |
JEG_URL . '/assets/js/form/form-builder.js',
|
@@ -141,6 +141,7 @@ class Form_Builder {
|
|
141 |
'customize-base',
|
142 |
'wp-color-picker',
|
143 |
'jquery-ui-spinner',
|
|
|
144 |
),
|
145 |
jeg_get_version(),
|
146 |
true
|
119 |
*/
|
120 |
public function form_control_script() {
|
121 |
// Style.
|
122 |
+
wp_enqueue_style( 'selectize', JEG_URL . '/assets/css/selectize.default.css', null, '0.14.0' );
|
123 |
+
wp_enqueue_style( 'font-awesome', JEG_URL . '/assets/font/font-awesome/font-awesome.css', null, '4.7.0' );
|
124 |
wp_enqueue_style( 'jeg-form-builder', JEG_URL . '/assets/css/form-builder.css', array( 'wp-color-picker' ), jeg_get_version() );
|
125 |
|
126 |
// Script.
|
127 |
wp_enqueue_script( 'microplugin', JEG_URL . '/assets/js/vendor/microplugin.js', null, jeg_get_version(), true );
|
128 |
wp_enqueue_script( 'sifter', JEG_URL . '/assets/js/vendor/sifter.min.js', null, jeg_get_version(), true );
|
129 |
+
wp_enqueue_script( 'selectize', JEG_URL . '/assets/js/vendor/selectize.min.js', null, '0.14.0', true );
|
130 |
+
wp_enqueue_script( 'bootstrap', JEG_URL . '/assets/js/vendor/bootstrap.min.js', null, '5.2.2', true );
|
131 |
+
wp_enqueue_script( 'bootstrap-iconpicker-iconset', JEG_URL . '/assets/js/vendor/bootstrap-iconpicker-iconset-all.min.js', null, '1.10.0', true );
|
132 |
+
wp_enqueue_script( 'bootstrap-iconpicker', JEG_URL . '/assets/js/vendor/bootstrap-iconpicker.min.js', null, '1.10.0', true );
|
133 |
wp_enqueue_script(
|
134 |
'jeg-form-builder-script',
|
135 |
JEG_URL . '/assets/js/form/form-builder.js',
|
141 |
'customize-base',
|
142 |
'wp-color-picker',
|
143 |
'jquery-ui-spinner',
|
144 |
+
'selectize',
|
145 |
),
|
146 |
jeg_get_version(),
|
147 |
true
|
lib/jeg-framework/form/class-form-meta-box.php
CHANGED
@@ -420,22 +420,18 @@ class Form_Meta_Box {
|
|
420 |
* Render meta_box script
|
421 |
*/
|
422 |
public function meta_box_script() {
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
427 |
?>
|
428 |
<input type="hidden" name="<?php echo esc_html( $this->meta_box_id . '[nonce]' ); ?>" value="<?php echo esc_attr( wp_create_nonce( $this->meta_box_id ) ); ?>">
|
429 |
-
<script type="text/javascript">
|
430 |
-
(function($){
|
431 |
-
$(document).on('ready', function() {
|
432 |
-
var metaboxData = <?php echo wp_json_encode( $data ); ?>;
|
433 |
-
if (undefined !== jeg.metabox) {
|
434 |
-
jeg.metabox.build('<?php echo esc_html( $this->meta_box_id ); ?>', '<?php echo esc_html( $this->type ); ?>', metaboxData);
|
435 |
-
}
|
436 |
-
})
|
437 |
-
})(jQuery)
|
438 |
-
</script>
|
439 |
<?php
|
440 |
}
|
441 |
}
|
420 |
* Render meta_box script
|
421 |
*/
|
422 |
public function meta_box_script() {
|
423 |
+
wp_localize_script( 'jeg-form-meta-box-script', 'jegMetaboxData', array(
|
424 |
+
wp_json_encode(array(
|
425 |
+
'id' => $this->meta_box_id,
|
426 |
+
'type' => $this->type,
|
427 |
+
'data' => array(
|
428 |
+
'segments' => $this->segments,
|
429 |
+
'fields' => $this->fields,
|
430 |
+
),
|
431 |
+
))
|
432 |
+
));
|
433 |
?>
|
434 |
<input type="hidden" name="<?php echo esc_html( $this->meta_box_id . '[nonce]' ); ?>" value="<?php echo esc_attr( wp_create_nonce( $this->meta_box_id ) ); ?>">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
435 |
<?php
|
436 |
}
|
437 |
}
|
lib/jeg-framework/form/class-form-widget.php
CHANGED
@@ -30,47 +30,33 @@ class Form_Widget {
|
|
30 |
wp_enqueue_script( 'jeg-form-widget-script', JEG_URL . '/assets/js/form/widget-container.js', array( 'jeg-form-builder-script' ), jeg_get_version(), true );
|
31 |
}
|
32 |
|
33 |
-
/**
|
34 |
-
* Render Widget Form
|
35 |
-
*
|
36 |
-
* @param string $id Field Identifier.
|
37 |
-
* @param array $segments List of Segment available on widget.
|
38 |
-
* @param array $fields List of Fields available on widget.
|
39 |
-
*/
|
40 |
public static function render_form( $id, $segments, $fields ) {
|
41 |
$data = array(
|
42 |
'segments' => $segments,
|
43 |
'fields' => $fields,
|
44 |
);
|
|
|
45 |
?>
|
46 |
<div id="<?php echo esc_html( $id ); ?>" data-id="<?php echo esc_html( $id ); ?>" class="widget-form-holder"></div>
|
47 |
-
<
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
}
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
}
|
62 |
-
})
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
jeg.widget.build('<?php echo esc_html( $id ); ?>');
|
67 |
-
}
|
68 |
-
} catch (e) {
|
69 |
-
// skip the error.
|
70 |
-
}
|
71 |
-
})(jQuery);
|
72 |
-
}
|
73 |
-
</script>
|
74 |
<?php
|
75 |
}
|
76 |
-
}
|
30 |
wp_enqueue_script( 'jeg-form-widget-script', JEG_URL . '/assets/js/form/widget-container.js', array( 'jeg-form-builder-script' ), jeg_get_version(), true );
|
31 |
}
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
public static function render_form( $id, $segments, $fields ) {
|
34 |
$data = array(
|
35 |
'segments' => $segments,
|
36 |
'fields' => $fields,
|
37 |
);
|
38 |
+
|
39 |
?>
|
40 |
<div id="<?php echo esc_html( $id ); ?>" data-id="<?php echo esc_html( $id ); ?>" class="widget-form-holder"></div>
|
41 |
+
<input type="hidden" class="widget-form-data" data-id="<?php echo esc_html( $id ); ?>" value="<?php echo esc_textarea( wp_json_encode( $data ) ); ?>">
|
42 |
+
<?php
|
43 |
+
add_action('wp_enqueue_scripts', wp_add_inline_script(
|
44 |
+
'jeg-form-widget-script','
|
45 |
+
if (undefined !== window.elementor) {
|
46 |
+
if (undefined !== jeg.widget) {
|
47 |
+
jeg.widget.build("' . $id . '");
|
48 |
+
}
|
49 |
+
} else {
|
50 |
+
(function ($) {
|
51 |
+
$(document).on("ready", function() {
|
52 |
+
if (undefined !== jeg.widget) {
|
53 |
+
jeg.widget.build("' . $id . '");
|
54 |
+
}
|
55 |
+
})
|
56 |
+
})(jQuery);
|
57 |
+
}'
|
58 |
+
));
|
59 |
+
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
<?php
|
61 |
}
|
62 |
+
}
|
lib/jeg-framework/readme.txt
CHANGED
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
1 |
=== 1.2.8 ==
|
2 |
- [BUG] Fix customizer style
|
3 |
|
1 |
+
=== 1.2.9 ==
|
2 |
+
- [BUG] Fix font variance and subset issue
|
3 |
+
|
4 |
=== 1.2.8 ==
|
5 |
- [BUG] Fix customizer style
|
6 |
|
lib/jeg-framework/util/framework-helper.php
CHANGED
@@ -133,41 +133,62 @@ if ( ! function_exists( 'jeg_allowed_html' ) ) {
|
|
133 |
* @return array
|
134 |
*/
|
135 |
function jeg_allowed_html( $allowedtags ) {
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
|
172 |
return $allowedtags;
|
173 |
}
|
133 |
* @return array
|
134 |
*/
|
135 |
function jeg_allowed_html( $allowedtags ) {
|
136 |
+
$allowedtags['br'] = array_merge( isset( $allowedtags['br'] ) ? $allowedtags['br'] : array(), array() );
|
137 |
+
$allowedtags['ul'] = array_merge(
|
138 |
+
isset( $allowedtags['ul'] ) ? $allowedtags['ul'] : array(),
|
139 |
+
array(
|
140 |
+
'class' => true,
|
141 |
+
'style' => true,
|
142 |
+
)
|
143 |
+
);
|
144 |
+
$allowedtags['ol'] = array_merge( isset( $allowedtags['ol'] ) ? $allowedtags['ol'] : array(), array() );
|
145 |
+
$allowedtags['li'] = array_merge( isset( $allowedtags['li'] ) ? $allowedtags['li'] : array(), array() );
|
146 |
+
$allowedtags['a'] = array_merge(
|
147 |
+
isset( $allowedtags['a'] ) ? $allowedtags['a'] : array(),
|
148 |
+
array(
|
149 |
+
'href' => true,
|
150 |
+
'title' => true,
|
151 |
+
'target' => true,
|
152 |
+
'class' => true,
|
153 |
+
'style' => true,
|
154 |
+
)
|
155 |
+
);
|
156 |
+
$allowedtags['span'] = array_merge(
|
157 |
+
isset( $allowedtags['span'] ) ? $allowedtags['span'] : array(),
|
158 |
+
array(
|
159 |
+
'class' => true,
|
160 |
+
'style' => true,
|
161 |
+
'data-*' => true,
|
162 |
+
'aria-hidden' => true,
|
163 |
+
)
|
164 |
+
);
|
165 |
+
$allowedtags['i'] = array_merge(
|
166 |
+
isset( $allowedtags['i'] ) ? $allowedtags['i'] : array(),
|
167 |
+
array(
|
168 |
+
'class' => true,
|
169 |
+
)
|
170 |
+
);
|
171 |
+
$allowedtags['div'] = array_merge(
|
172 |
+
isset( $allowedtags['div'] ) ? $allowedtags['div'] : array(),
|
173 |
+
array(
|
174 |
+
'id' => true,
|
175 |
+
'class' => true,
|
176 |
+
'data-id' => true,
|
177 |
+
'data-video' => true,
|
178 |
+
'style' => true,
|
179 |
+
)
|
180 |
+
);
|
181 |
+
$allowedtags['img'] = array_merge(
|
182 |
+
isset( $allowedtags['img'] ) ? $allowedtags['img'] : array(),
|
183 |
+
array(
|
184 |
+
'class' => true,
|
185 |
+
'src' => true,
|
186 |
+
'alt' => true,
|
187 |
+
'srcset' => true,
|
188 |
+
'width' => true,
|
189 |
+
'height' => true,
|
190 |
+
)
|
191 |
+
);
|
192 |
|
193 |
return $allowedtags;
|
194 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: elementor, element, addon, widget, extension, blog, post, elementor addon,
|
|
4 |
Requires at least: 5.0
|
5 |
Tested up to: 6.0.2
|
6 |
Requires PHP: 7.0
|
7 |
-
Stable tag: 2.5.
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -91,6 +91,14 @@ https://elementor.com/help/requirements/ Also you can disable some widgets that
|
|
91 |
|
92 |
== Changelog ==
|
93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
= 2.5.0 - 04-10-2022 =
|
95 |
* Improvement: Add a Icon Position option for the Icon Box widget
|
96 |
* Improvement: Update popup label text
|
4 |
Requires at least: 5.0
|
5 |
Tested up to: 6.0.2
|
6 |
Requires PHP: 7.0
|
7 |
+
Stable tag: 2.5.1
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
91 |
|
92 |
== Changelog ==
|
93 |
|
94 |
+
|
95 |
+
= 2.5.1 - 09-10-2022 =
|
96 |
+
* Improvement: Update notiflix version
|
97 |
+
* Improvement: Update chart js version
|
98 |
+
* Fix: Header and Footer Template issue
|
99 |
+
* Fix: Data Sanitize, Escape and Validate issue
|
100 |
+
* Tweak: Upgrade Bootstrap and Selectize library
|
101 |
+
|
102 |
= 2.5.0 - 04-10-2022 =
|
103 |
* Improvement: Add a Icon Position option for the Icon Box widget
|
104 |
* Improvement: Update popup label text
|
templates/dashboard/dashboard-header.php
CHANGED
@@ -62,14 +62,10 @@ $dashboard = new Dashboard();
|
|
62 |
}
|
63 |
|
64 |
if ( isset( $menu['class'] ) && $menu['class'] ) {
|
65 |
-
$classmenu = 'class="' .
|
66 |
}
|
67 |
|
68 |
-
|
69 |
-
<li <?php echo $classmenu; // phpcs:ignore ?>>
|
70 |
-
<?php echo $menuitem; // phpcs:ignore ?>
|
71 |
-
</li>
|
72 |
-
<?php
|
73 |
}
|
74 |
?>
|
75 |
</ul>
|
62 |
}
|
63 |
|
64 |
if ( isset( $menu['class'] ) && $menu['class'] ) {
|
65 |
+
$classmenu = 'class="' . $menu['class'] . '"';
|
66 |
}
|
67 |
|
68 |
+
echo wp_kses( "<li {$classmenu}>{$menuitem}</li>", 'post' );
|
|
|
|
|
|
|
|
|
69 |
}
|
70 |
?>
|
71 |
</ul>
|