(function (factory){
var existingVersion=jQuery.fn.select2||null;
if(existingVersion){
delete jQuery.fn.select2;
}
if(typeof define==='function'&&define.amd){
define(['jquery'], factory);
}else if(typeof module==='object'&&module.exports){
module.exports=function (root, jQuery){
if(jQuery===undefined){
if(typeof window!=='undefined'){
jQuery=require('jquery');
}else{
jQuery=require('jquery')(root);
}}
factory(jQuery);
return jQuery;
};}else{
factory(jQuery);
}
jQuery.fn.astselect2=jQuery.fn.select2;
if(existingVersion){
delete jQuery.fn.select2;
jQuery.fn.select2=existingVersion;
}
} (function (jQuery){
var S2=(function (){
if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd){
var S2=jQuery.fn.select2.amd;
}
var S2;(function (){ if(!S2||!S2.requirejs){
if(!S2){ S2={};}else{ require=S2; }
var requirejs, require, define;
(function (undef){
var main, req, makeMap, handlers,
defined={},
waiting={},
config={},
defining={},
hasOwn=Object.prototype.hasOwnProperty,
aps=[].slice,
jsSuffixRegExp=/\.js$/;
function hasProp(obj, prop){
return hasOwn.call(obj, prop);
}
function normalize(name, baseName){
var nameParts, nameSegment, mapValue, foundMap, lastIndex,
foundI, foundStarMap, starI, i, j, part, normalizedBaseParts,
baseParts=baseName&&baseName.split("/"),
map=config.map,
starMap=(map&&map['*'])||{};
if(name){
name=name.split('/');
lastIndex=name.length - 1;
if(config.nodeIdCompat&&jsSuffixRegExp.test(name[lastIndex])){
name[lastIndex]=name[lastIndex].replace(jsSuffixRegExp, '');
}
if(name[0].charAt(0)==='.'&&baseParts){
normalizedBaseParts=baseParts.slice(0, baseParts.length - 1);
name=normalizedBaseParts.concat(name);
}
for (i=0; i < name.length; i++){
part=name[i];
if(part==='.'){
name.splice(i, 1);
i -=1;
}else if(part==='..'){
if(i===0||(i===1&&name[2]==='..')||name[i - 1]==='..'){
continue;
}else if(i > 0){
name.splice(i - 1, 2);
i -=2;
}}
}
name=name.join('/');
}
if((baseParts||starMap)&&map){
nameParts=name.split('/');
for (i=nameParts.length; i > 0; i -=1){
nameSegment=nameParts.slice(0, i).join("/");
if(baseParts){
for (j=baseParts.length; j > 0; j -=1){
mapValue=map[baseParts.slice(0, j).join('/')];
if(mapValue){
mapValue=mapValue[nameSegment];
if(mapValue){
foundMap=mapValue;
foundI=i;
break;
}}
}}
if(foundMap){
break;
}
if(!foundStarMap&&starMap&&starMap[nameSegment]){
foundStarMap=starMap[nameSegment];
starI=i;
}}
if(!foundMap&&foundStarMap){
foundMap=foundStarMap;
foundI=starI;
}
if(foundMap){
nameParts.splice(0, foundI, foundMap);
name=nameParts.join('/');
}}
return name;
}
function makeRequire(relName, forceSync){
return function (){
var args=aps.call(arguments, 0);
if(typeof args[0]!=='string'&&args.length===1){
args.push(null);
}
return req.apply(undef, args.concat([relName, forceSync]));
};}
function makeNormalize(relName){
return function (name){
return normalize(name, relName);
};}
function makeLoad(depName){
return function (value){
defined[depName]=value;
};}
function callDep(name){
if(hasProp(waiting, name)){
var args=waiting[name];
delete waiting[name];
defining[name]=true;
main.apply(undef, args);
}
if(!hasProp(defined, name)&&!hasProp(defining, name)){
throw new Error('No ' + name);
}
return defined[name];
}
function splitPrefix(name){
var prefix,
index=name ? name.indexOf('!'):-1;
if(index > -1){
prefix=name.substring(0, index);
name=name.substring(index + 1, name.length);
}
return [prefix, name];
}
function makeRelParts(relName){
return relName ? splitPrefix(relName):[];
}
makeMap=function (name, relParts){
var plugin,
parts=splitPrefix(name),
prefix=parts[0],
relResourceName=relParts[1];
name=parts[1];
if(prefix){
prefix=normalize(prefix, relResourceName);
plugin=callDep(prefix);
}
if(prefix){
if(plugin&&plugin.normalize){
name=plugin.normalize(name, makeNormalize(relResourceName));
}else{
name=normalize(name, relResourceName);
}}else{
name=normalize(name, relResourceName);
parts=splitPrefix(name);
prefix=parts[0];
name=parts[1];
if(prefix){
plugin=callDep(prefix);
}}
return {
f: prefix ? prefix + '!' + name:name,
n: name,
pr: prefix,
p: plugin
};};
function makeConfig(name){
return function (){
return (config&&config.config&&config.config[name])||{};};
}
handlers={
require: function (name){
return makeRequire(name);
},
exports: function (name){
var e=defined[name];
if(typeof e!=='undefined'){
return e;
}else{
return (defined[name]={});
}},
module: function (name){
return {
id: name,
uri: '',
exports: defined[name],
config: makeConfig(name)
};}};
main=function (name, deps, callback, relName){
var cjsModule, depName, ret, map, i, relParts,
args=[],
callbackType=typeof callback,
usingExports;
relName=relName||name;
relParts=makeRelParts(relName);
if(callbackType==='undefined'||callbackType==='function'){
deps = !deps.length&&callback.length ? ['require', 'exports', 'module']:deps;
for (i=0; i < deps.length; i +=1){
map=makeMap(deps[i], relParts);
depName=map.f;
if(depName==="require"){
args[i]=handlers.require(name);
}else if(depName==="exports"){
args[i]=handlers.exports(name);
usingExports=true;
}else if(depName==="module"){
cjsModule=args[i]=handlers.module(name);
}else if(hasProp(defined, depName) ||
hasProp(waiting, depName) ||
hasProp(defining, depName)){
args[i]=callDep(depName);
}else if(map.p){
map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
args[i]=defined[depName];
}else{
throw new Error(name + ' missing ' + depName);
}}
ret=callback ? callback.apply(defined[name], args):undefined;
if(name){
if(cjsModule&&cjsModule.exports!==undef &&
cjsModule.exports!==defined[name]){
defined[name]=cjsModule.exports;
}else if(ret!==undef||!usingExports){
defined[name]=ret;
}}
}else if(name){
defined[name]=callback;
}};
requirejs=require=req=function (deps, callback, relName, forceSync, alt){
if(typeof deps==="string"){
if(handlers[deps]){
return handlers[deps](callback);
}
return callDep(makeMap(deps, makeRelParts(callback)).f);
}else if(!deps.splice){
config=deps;
if(config.deps){
req(config.deps, config.callback);
}
if(!callback){
return;
}
if(callback.splice){
deps=callback;
callback=relName;
relName=null;
}else{
deps=undef;
}}
callback=callback||function (){};
if(typeof relName==='function'){
relName=forceSync;
forceSync=alt;
}
if(forceSync){
main(undef, deps, callback, relName);
}else{
setTimeout(function (){
main(undef, deps, callback, relName);
}, 4);
}
return req;
};
req.config=function (cfg){
return req(cfg);
};
requirejs._defined=defined;
define=function (name, deps, callback){
if(typeof name!=='string'){
throw new Error('See almond README: incorrect module build, no module name');
}
if(!deps.splice){
callback=deps;
deps=[];
}
if(!hasProp(defined, name)&&!hasProp(waiting, name)){
waiting[name]=[name, deps, callback];
}};
define.amd={
jQuery: true
};}());
S2.requirejs=requirejs;S2.require=require;S2.define=define;
}}());
S2.define("almond", function(){});
S2.define('jquery',[],function (){
var _$=jQuery||$;
if(_$==null&&console&&console.error){
console.error('Select2: An instance of jQuery or a jQuery-compatible library was not ' +
'found. Make sure that you are including jQuery before Select2 on your ' +
'web page.'
);
}
return _$;
});
S2.define('select2/utils',[
'jquery'
], function ($){
var Utils={};
Utils.Extend=function (ChildClass, SuperClass){
var __hasProp={}.hasOwnProperty;
function BaseConstructor (){
this.constructor=ChildClass;
}
for (var key in SuperClass){
if(__hasProp.call(SuperClass, key)){
ChildClass[key]=SuperClass[key];
}}
BaseConstructor.prototype=SuperClass.prototype;
ChildClass.prototype=new BaseConstructor();
ChildClass.__super__=SuperClass.prototype;
return ChildClass;
};
function getMethods (theClass){
var proto=theClass.prototype;
var methods=[];
for (var methodName in proto){
var m=proto[methodName];
if(typeof m!=='function'){
continue;
}
if(methodName==='constructor'){
continue;
}
methods.push(methodName);
}
return methods;
}
Utils.Decorate=function (SuperClass, DecoratorClass){
var decoratedMethods=getMethods(DecoratorClass);
var superMethods=getMethods(SuperClass);
function DecoratedClass (){
var unshift=Array.prototype.unshift;
var argCount=DecoratorClass.prototype.constructor.length;
var calledConstructor=SuperClass.prototype.constructor;
if(argCount > 0){
unshift.call(arguments, SuperClass.prototype.constructor);
calledConstructor=DecoratorClass.prototype.constructor;
}
calledConstructor.apply(this, arguments);
}
DecoratorClass.displayName=SuperClass.displayName;
function ctr (){
this.constructor=DecoratedClass;
}
DecoratedClass.prototype=new ctr();
for (var m=0; m < superMethods.length; m++){
var superMethod=superMethods[m];
DecoratedClass.prototype[superMethod] =
SuperClass.prototype[superMethod];
}
var calledMethod=function (methodName){
var originalMethod=function (){};
if(methodName in DecoratedClass.prototype){
originalMethod=DecoratedClass.prototype[methodName];
}
var decoratedMethod=DecoratorClass.prototype[methodName];
return function (){
var unshift=Array.prototype.unshift;
unshift.call(arguments, originalMethod);
return decoratedMethod.apply(this, arguments);
};};
for (var d=0; d < decoratedMethods.length; d++){
var decoratedMethod=decoratedMethods[d];
DecoratedClass.prototype[decoratedMethod]=calledMethod(decoratedMethod);
}
return DecoratedClass;
};
var Observable=function (){
this.listeners={};};
Observable.prototype.on=function (event, callback){
this.listeners=this.listeners||{};
if(event in this.listeners){
this.listeners[event].push(callback);
}else{
this.listeners[event]=[callback];
}};
Observable.prototype.trigger=function (event){
var slice=Array.prototype.slice;
var params=slice.call(arguments, 1);
this.listeners=this.listeners||{};
if(params==null){
params=[];
}
if(params.length===0){
params.push({});
}
params[0]._type=event;
if(event in this.listeners){
this.invoke(this.listeners[event], slice.call(arguments, 1));
}
if('*' in this.listeners){
this.invoke(this.listeners['*'], arguments);
}};
Observable.prototype.invoke=function (listeners, params){
for (var i=0, len=listeners.length; i < len; i++){
listeners[i].apply(this, params);
}};
Utils.Observable=Observable;
Utils.generateChars=function (length){
var chars='';
for (var i=0; i < length; i++){
var randomChar=Math.floor(Math.random() * 36);
chars +=randomChar.toString(36);
}
return chars;
};
Utils.bind=function (func, context){
return function (){
func.apply(context, arguments);
};};
Utils._convertData=function (data){
for (var originalKey in data){
var keys=originalKey.split('-');
var dataLevel=data;
if(keys.length===1){
continue;
}
for (var k=0; k < keys.length; k++){
var key=keys[k];
key=key.substring(0, 1).toLowerCase() + key.substring(1);
if(!(key in dataLevel)){
dataLevel[key]={};}
if(k==keys.length - 1){
dataLevel[key]=data[originalKey];
}
dataLevel=dataLevel[key];
}
delete data[originalKey];
}
return data;
};
Utils.hasScroll=function (index, el){
var $el=$(el);
var overflowX=el.style.overflowX;
var overflowY=el.style.overflowY;
if(overflowX===overflowY &&
(overflowY==='hidden'||overflowY==='visible')){
return false;
}
if(overflowX==='scroll'||overflowY==='scroll'){
return true;
}
return ($el.innerHeight() < el.scrollHeight ||
$el.innerWidth() < el.scrollWidth);
};
Utils.escapeMarkup=function (markup){
var replaceMap={
'\\': '&#92;',
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
'\'': '&#39;',
'/': '&#47;'
};
if(typeof markup!=='string'){
return markup;
}
return String(markup).replace(/[&<>"'\/\\]/g, function (match){
return replaceMap[match];
});
};
Utils.appendMany=function ($element, $nodes){
if($.fn.jquery.substr(0, 3)==='1.7'){
var $jqNodes=$();
$.map($nodes, function (node){
$jqNodes=$jqNodes.add(node);
});
$nodes=$jqNodes;
}
$element.append($nodes);
};
return Utils;
});
S2.define('select2/results',[
'jquery',
'./utils'
], function ($, Utils){
function Results ($element, options, dataAdapter){
this.$element=$element;
this.data=dataAdapter;
this.options=options;
Results.__super__.constructor.call(this);
}
Utils.Extend(Results, Utils.Observable);
Results.prototype.render=function (){
var $results=$(
'<ul class="select2-results__options" role="tree"></ul>'
);
if(this.options.get('multiple')){
$results.attr('aria-multiselectable', 'true');
}
this.$results=$results;
return $results;
};
Results.prototype.clear=function (){
this.$results.empty();
};
Results.prototype.displayMessage=function (params){
var escapeMarkup=this.options.get('escapeMarkup');
this.clear();
this.hideLoading();
var $message=$(
'<li role="treeitem" aria-live="assertive"' +
' class="select2-results__option"></li>'
);
var message=this.options.get('translations').get(params.message);
$message.append(escapeMarkup(
message(params.args)
)
);
$message[0].className +=' select2-results__message';
this.$results.append($message);
};
Results.prototype.hideMessages=function (){
this.$results.find('.select2-results__message').remove();
};
Results.prototype.append=function (data){
this.hideLoading();
var $options=[];
if(data.results==null||data.results.length===0){
if(this.$results.children().length===0){
this.trigger('results:message', {
message: 'noResults'
});
}
return;
}
data.results=this.sort(data.results);
for (var d=0; d < data.results.length; d++){
var item=data.results[d];
var $option=this.option(item);
$options.push($option);
}
this.$results.append($options);
};
Results.prototype.position=function ($results, $dropdown){
var $resultsContainer=$dropdown.find('.select2-results');
$resultsContainer.append($results);
};
Results.prototype.sort=function (data){
var sorter=this.options.get('sorter');
return sorter(data);
};
Results.prototype.highlightFirstItem=function (){
var $options=this.$results
.find('.select2-results__option[aria-selected]');
var $selected=$options.filter('[aria-selected=true]');
if($selected.length > 0){
$selected.first().trigger('mouseenter');
}else{
$options.first().trigger('mouseenter');
}
this.ensureHighlightVisible();
};
Results.prototype.setClasses=function (){
var self=this;
this.data.current(function (selected){
var selectedIds=$.map(selected, function (s){
return s.id.toString();
});
var $options=self.$results
.find('.select2-results__option[aria-selected]');
$options.each(function (){
var $option=$(this);
var item=$.data(this, 'data');
var id='' + item.id;
if((item.element!=null&&item.element.selected) ||
(item.element==null&&$.inArray(id, selectedIds) > -1)){
$option.attr('aria-selected', 'true');
}else{
$option.attr('aria-selected', 'false');
}});
});
};
Results.prototype.showLoading=function (params){
this.hideLoading();
var loadingMore=this.options.get('translations').get('searching');
var loading={
disabled: true,
loading: true,
text: loadingMore(params)
};
var $loading=this.option(loading);
$loading.className +=' loading-results';
this.$results.prepend($loading);
};
Results.prototype.hideLoading=function (){
this.$results.find('.loading-results').remove();
};
Results.prototype.option=function (data){
var option=document.createElement('li');
option.className='select2-results__option';
var attrs={
'role': 'treeitem',
'aria-selected': 'false'
};
if(data.disabled){
delete attrs['aria-selected'];
attrs['aria-disabled']='true';
}
if(data.id==null){
delete attrs['aria-selected'];
}
if(data._resultId!=null){
option.id=data._resultId;
}
if(data.title){
option.title=data.title;
}
if(data.children){
attrs.role='group';
attrs['aria-label']=data.text;
delete attrs['aria-selected'];
}
for (var attr in attrs){
var val=attrs[attr];
option.setAttribute(attr, val);
}
if(data.children){
var $option=$(option);
var label=document.createElement('strong');
label.className='select2-results__group';
var $label=$(label);
this.template(data, label);
var $children=[];
for (var c=0; c < data.children.length; c++){
var child=data.children[c];
var $child=this.option(child);
$children.push($child);
}
var $childrenContainer=$('<ul></ul>', {
'class': 'select2-results__options select2-results__options--nested'
});
$childrenContainer.append($children);
$option.append(label);
$option.append($childrenContainer);
}else{
this.template(data, option);
}
$.data(option, 'data', data);
return option;
};
Results.prototype.bind=function (container, $container){
var self=this;
var id=container.id + '-results';
this.$results.attr('id', id);
container.on('results:all', function (params){
self.clear();
self.append(params.data);
if(container.isOpen()){
self.setClasses();
self.highlightFirstItem();
}});
container.on('results:append', function (params){
self.append(params.data);
if(container.isOpen()){
self.setClasses();
}});
container.on('query', function (params){
self.hideMessages();
self.showLoading(params);
});
container.on('select', function (){
if(!container.isOpen()){
return;
}
self.setClasses();
self.highlightFirstItem();
});
container.on('unselect', function (){
if(!container.isOpen()){
return;
}
self.setClasses();
self.highlightFirstItem();
});
container.on('open', function (){
self.$results.attr('aria-expanded', 'true');
self.$results.attr('aria-hidden', 'false');
self.setClasses();
self.ensureHighlightVisible();
});
container.on('close', function (){
self.$results.attr('aria-expanded', 'false');
self.$results.attr('aria-hidden', 'true');
self.$results.removeAttr('aria-activedescendant');
});
container.on('results:toggle', function (){
var $highlighted=self.getHighlightedResults();
if($highlighted.length===0){
return;
}
$highlighted.trigger('mouseup');
});
container.on('results:select', function (){
var $highlighted=self.getHighlightedResults();
if($highlighted.length===0){
return;
}
var data=$highlighted.data('data');
if($highlighted.attr('aria-selected')=='true'){
self.trigger('close', {});
}else{
self.trigger('select', {
data: data
});
}});
container.on('results:previous', function (){
var $highlighted=self.getHighlightedResults();
var $options=self.$results.find('[aria-selected]');
var currentIndex=$options.index($highlighted);
if(currentIndex===0){
return;
}
var nextIndex=currentIndex - 1;
if($highlighted.length===0){
nextIndex=0;
}
var $next=$options.eq(nextIndex);
$next.trigger('mouseenter');
var currentOffset=self.$results.offset().top;
var nextTop=$next.offset().top;
var nextOffset=self.$results.scrollTop() + (nextTop - currentOffset);
if(nextIndex===0){
self.$results.scrollTop(0);
}else if(nextTop - currentOffset < 0){
self.$results.scrollTop(nextOffset);
}});
container.on('results:next', function (){
var $highlighted=self.getHighlightedResults();
var $options=self.$results.find('[aria-selected]');
var currentIndex=$options.index($highlighted);
var nextIndex=currentIndex + 1;
if(nextIndex >=$options.length){
return;
}
var $next=$options.eq(nextIndex);
$next.trigger('mouseenter');
var currentOffset=self.$results.offset().top +
self.$results.outerHeight(false);
var nextBottom=$next.offset().top + $next.outerHeight(false);
var nextOffset=self.$results.scrollTop() + nextBottom - currentOffset;
if(nextIndex===0){
self.$results.scrollTop(0);
}else if(nextBottom > currentOffset){
self.$results.scrollTop(nextOffset);
}});
container.on('results:focus', function (params){
params.element.addClass('select2-results__option--highlighted');
});
container.on('results:message', function (params){
self.displayMessage(params);
});
if($.fn.mousewheel){
this.$results.on('mousewheel', function (e){
var top=self.$results.scrollTop();
var bottom=self.$results.get(0).scrollHeight - top + e.deltaY;
var isAtTop=e.deltaY > 0&&top - e.deltaY <=0;
var isAtBottom=e.deltaY < 0&&bottom <=self.$results.height();
if(isAtTop){
self.$results.scrollTop(0);
e.preventDefault();
e.stopPropagation();
}else if(isAtBottom){
self.$results.scrollTop(self.$results.get(0).scrollHeight - self.$results.height()
);
e.preventDefault();
e.stopPropagation();
}});
}
this.$results.on('mouseup', '.select2-results__option[aria-selected]',
function (evt){
var $this=$(this);
var data=$this.data('data');
if($this.attr('aria-selected')==='true'){
if(self.options.get('multiple')){
self.trigger('unselect', {
originalEvent: evt,
data: data
});
}else{
self.trigger('close', {});
}
return;
}
self.trigger('select', {
originalEvent: evt,
data: data
});
});
this.$results.on('mouseenter', '.select2-results__option[aria-selected]',
function (evt){
var data=$(this).data('data');
self.getHighlightedResults()
.removeClass('select2-results__option--highlighted');
self.trigger('results:focus', {
data: data,
element: $(this)
});
});
};
Results.prototype.getHighlightedResults=function (){
var $highlighted=this.$results
.find('.select2-results__option--highlighted');
return $highlighted;
};
Results.prototype.destroy=function (){
this.$results.remove();
};
Results.prototype.ensureHighlightVisible=function (){
var $highlighted=this.getHighlightedResults();
if($highlighted.length===0){
return;
}
var $options=this.$results.find('[aria-selected]');
var currentIndex=$options.index($highlighted);
var currentOffset=this.$results.offset().top;
var nextTop=$highlighted.offset().top;
var nextOffset=this.$results.scrollTop() + (nextTop - currentOffset);
var offsetDelta=nextTop - currentOffset;
nextOffset -=$highlighted.outerHeight(false) * 2;
if(currentIndex <=2){
this.$results.scrollTop(0);
}else if(offsetDelta > this.$results.outerHeight()||offsetDelta < 0){
this.$results.scrollTop(nextOffset);
}};
Results.prototype.template=function (result, container){
var template=this.options.get('templateResult');
var escapeMarkup=this.options.get('escapeMarkup');
var content=template(result, container);
if(content==null){
container.style.display='none';
}else if(typeof content==='string'){
container.innerHTML=escapeMarkup(content);
}else{
$(container).append(content);
}};
return Results;
});
S2.define('select2/keys',[
], function (){
var KEYS={
BACKSPACE: 8,
TAB: 9,
ENTER: 13,
SHIFT: 16,
CTRL: 17,
ALT: 18,
ESC: 27,
SPACE: 32,
PAGE_UP: 33,
PAGE_DOWN: 34,
END: 35,
HOME: 36,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40,
DELETE: 46
};
return KEYS;
});
S2.define('select2/selection/base',[
'jquery',
'../utils',
'../keys'
], function ($, Utils, KEYS){
function BaseSelection ($element, options){
this.$element=$element;
this.options=options;
BaseSelection.__super__.constructor.call(this);
}
Utils.Extend(BaseSelection, Utils.Observable);
BaseSelection.prototype.render=function (){
var $selection=$(
'<span class="select2-selection" role="combobox" ' +
' aria-haspopup="true" aria-expanded="false">' +
'</span>'
);
this._tabindex=0;
if(this.$element.data('old-tabindex')!=null){
this._tabindex=this.$element.data('old-tabindex');
}else if(this.$element.attr('tabindex')!=null){
this._tabindex=this.$element.attr('tabindex');
}
$selection.attr('title', this.$element.attr('title'));
$selection.attr('tabindex', this._tabindex);
this.$selection=$selection;
return $selection;
};
BaseSelection.prototype.bind=function (container, $container){
var self=this;
var id=container.id + '-container';
var resultsId=container.id + '-results';
this.container=container;
this.$selection.on('focus', function (evt){
self.trigger('focus', evt);
});
this.$selection.on('blur', function (evt){
self._handleBlur(evt);
});
this.$selection.on('keydown', function (evt){
self.trigger('keypress', evt);
if(evt.which===KEYS.SPACE){
evt.preventDefault();
}});
container.on('results:focus', function (params){
self.$selection.attr('aria-activedescendant', params.data._resultId);
});
container.on('selection:update', function (params){
self.update(params.data);
});
container.on('open', function (){
self.$selection.attr('aria-expanded', 'true');
self.$selection.attr('aria-owns', resultsId);
self._attachCloseHandler(container);
});
container.on('close', function (){
self.$selection.attr('aria-expanded', 'false');
self.$selection.removeAttr('aria-activedescendant');
self.$selection.removeAttr('aria-owns');
self.$selection.focus();
self._detachCloseHandler(container);
});
container.on('enable', function (){
self.$selection.attr('tabindex', self._tabindex);
});
container.on('disable', function (){
self.$selection.attr('tabindex', '-1');
});
};
BaseSelection.prototype._handleBlur=function (evt){
var self=this;
window.setTimeout(function (){
if((document.activeElement==self.$selection[0]) ||
($.contains(self.$selection[0], document.activeElement))
){
return;
}
self.trigger('blur', evt);
}, 1);
};
BaseSelection.prototype._attachCloseHandler=function (container){
var self=this;
$(document.body).on('mousedown.select2.' + container.id, function (e){
var $target=$(e.target);
var $select=$target.closest('.select2');
var $all=$('.select2.select2-container--open');
$all.each(function (){
var $this=$(this);
if(this==$select[0]){
return;
}
var $element=$this.data('element');
$element.select2('close');
});
});
};
BaseSelection.prototype._detachCloseHandler=function (container){
$(document.body).off('mousedown.select2.' + container.id);
};
BaseSelection.prototype.position=function ($selection, $container){
var $selectionContainer=$container.find('.selection');
$selectionContainer.append($selection);
};
BaseSelection.prototype.destroy=function (){
this._detachCloseHandler(this.container);
};
BaseSelection.prototype.update=function (data){
throw new Error('The `update` method must be defined in child classes.');
};
return BaseSelection;
});
S2.define('select2/selection/single',[
'jquery',
'./base',
'../utils',
'../keys'
], function ($, BaseSelection, Utils, KEYS){
function SingleSelection (){
SingleSelection.__super__.constructor.apply(this, arguments);
}
Utils.Extend(SingleSelection, BaseSelection);
SingleSelection.prototype.render=function (){
var $selection=SingleSelection.__super__.render.call(this);
$selection.addClass('select2-selection--single');
$selection.html('<span class="select2-selection__rendered"></span>' +
'<span class="select2-selection__arrow" role="presentation">' +
'<b role="presentation"></b>' +
'</span>'
);
return $selection;
};
SingleSelection.prototype.bind=function (container, $container){
var self=this;
SingleSelection.__super__.bind.apply(this, arguments);
var id=container.id + '-container';
this.$selection.find('.select2-selection__rendered').attr('id', id);
this.$selection.attr('aria-labelledby', id);
this.$selection.on('mousedown', function (evt){
if(evt.which!==1){
return;
}
self.trigger('toggle', {
originalEvent: evt
});
});
this.$selection.on('focus', function (evt){
});
this.$selection.on('blur', function (evt){
});
container.on('focus', function (evt){
if(!container.isOpen()){
self.$selection.focus();
}});
container.on('selection:update', function (params){
self.update(params.data);
});
};
SingleSelection.prototype.clear=function (){
this.$selection.find('.select2-selection__rendered').empty();
};
SingleSelection.prototype.display=function (data, container){
var template=this.options.get('templateSelection');
var escapeMarkup=this.options.get('escapeMarkup');
return escapeMarkup(template(data, container));
};
SingleSelection.prototype.selectionContainer=function (){
return $('<span></span>');
};
SingleSelection.prototype.update=function (data){
if(data.length===0){
this.clear();
return;
}
var selection=data[0];
var $rendered=this.$selection.find('.select2-selection__rendered');
var formatted=this.display(selection, $rendered);
$rendered.empty().append(formatted);
$rendered.prop('title', selection.title||selection.text);
};
return SingleSelection;
});
S2.define('select2/selection/multiple',[
'jquery',
'./base',
'../utils'
], function ($, BaseSelection, Utils){
function MultipleSelection ($element, options){
MultipleSelection.__super__.constructor.apply(this, arguments);
}
Utils.Extend(MultipleSelection, BaseSelection);
MultipleSelection.prototype.render=function (){
var $selection=MultipleSelection.__super__.render.call(this);
$selection.addClass('select2-selection--multiple');
$selection.html('<ul class="select2-selection__rendered"></ul>'
);
return $selection;
};
MultipleSelection.prototype.bind=function (container, $container){
var self=this;
MultipleSelection.__super__.bind.apply(this, arguments);
this.$selection.on('click', function (evt){
self.trigger('toggle', {
originalEvent: evt
});
});
this.$selection.on('click',
'.select2-selection__choice__remove',
function (evt){
if(self.options.get('disabled')){
return;
}
var $remove=$(this);
var $selection=$remove.parent();
var data=$selection.data('data');
self.trigger('unselect', {
originalEvent: evt,
data: data
});
}
);
};
MultipleSelection.prototype.clear=function (){
this.$selection.find('.select2-selection__rendered').empty();
};
MultipleSelection.prototype.display=function (data, container){
var template=this.options.get('templateSelection');
var escapeMarkup=this.options.get('escapeMarkup');
return escapeMarkup(template(data, container));
};
MultipleSelection.prototype.selectionContainer=function (){
var $container=$(
'<li class="select2-selection__choice">' +
'<span class="select2-selection__choice__remove" role="presentation">' +
'&times;' +
'</span>' +
'</li>'
);
return $container;
};
MultipleSelection.prototype.update=function (data){
this.clear();
if(data.length===0){
return;
}
var $selections=[];
for (var d=0; d < data.length; d++){
var selection=data[d];
var $selection=this.selectionContainer();
var formatted=this.display(selection, $selection);
$selection.append(formatted);
$selection.prop('title', selection.title||selection.text);
$selection.data('data', selection);
$selections.push($selection);
}
var $rendered=this.$selection.find('.select2-selection__rendered');
Utils.appendMany($rendered, $selections);
};
return MultipleSelection;
});
S2.define('select2/selection/placeholder',[
'../utils'
], function (Utils){
function Placeholder (decorated, $element, options){
this.placeholder=this.normalizePlaceholder(options.get('placeholder'));
decorated.call(this, $element, options);
}
Placeholder.prototype.normalizePlaceholder=function (_, placeholder){
if(typeof placeholder==='string'){
placeholder={
id: '',
text: placeholder
};}
return placeholder;
};
Placeholder.prototype.createPlaceholder=function (decorated, placeholder){
var $placeholder=this.selectionContainer();
$placeholder.html(this.display(placeholder));
$placeholder.addClass('select2-selection__placeholder')
.removeClass('select2-selection__choice');
return $placeholder;
};
Placeholder.prototype.update=function (decorated, data){
var singlePlaceholder=(
data.length==1&&data[0].id!=this.placeholder.id
);
var multipleSelections=data.length > 1;
if(multipleSelections||singlePlaceholder){
return decorated.call(this, data);
}
this.clear();
var $placeholder=this.createPlaceholder(this.placeholder);
this.$selection.find('.select2-selection__rendered').append($placeholder);
};
return Placeholder;
});
S2.define('select2/selection/allowClear',[
'jquery',
'../keys'
], function ($, KEYS){
function AllowClear (){ }
AllowClear.prototype.bind=function (decorated, container, $container){
var self=this;
decorated.call(this, container, $container);
if(this.placeholder==null){
if(this.options.get('debug')&&window.console&&console.error){
console.error('Select2: The `allowClear` option should be used in combination ' +
'with the `placeholder` option.'
);
}}
this.$selection.on('mousedown', '.select2-selection__clear',
function (evt){
self._handleClear(evt);
});
container.on('keypress', function (evt){
self._handleKeyboardClear(evt, container);
});
};
AllowClear.prototype._handleClear=function (_, evt){
if(this.options.get('disabled')){
return;
}
var $clear=this.$selection.find('.select2-selection__clear');
if($clear.length===0){
return;
}
evt.stopPropagation();
var data=$clear.data('data');
for (var d=0; d < data.length; d++){
var unselectData={
data: data[d]
};
this.trigger('unselect', unselectData);
if(unselectData.prevented){
return;
}}
this.$element.val(this.placeholder.id).trigger('change');
this.trigger('toggle', {});
};
AllowClear.prototype._handleKeyboardClear=function (_, evt, container){
if(container.isOpen()){
return;
}
if(evt.which==KEYS.DELETE||evt.which==KEYS.BACKSPACE){
this._handleClear(evt);
}};
AllowClear.prototype.update=function (decorated, data){
decorated.call(this, data);
if(this.$selection.find('.select2-selection__placeholder').length > 0 ||
data.length===0){
return;
}
var $remove=$(
'<span class="select2-selection__clear">' +
'&times;' +
'</span>'
);
$remove.data('data', data);
this.$selection.find('.select2-selection__rendered').prepend($remove);
};
return AllowClear;
});
S2.define('select2/selection/search',[
'jquery',
'../utils',
'../keys'
], function ($, Utils, KEYS){
function Search (decorated, $element, options){
decorated.call(this, $element, options);
}
Search.prototype.render=function (decorated){
var $search=$(
'<li class="select2-search select2-search--inline">' +
'<input class="select2-search__field" type="search" tabindex="-1"' +
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
' spellcheck="false" role="textbox" aria-autocomplete="list" />' +
'</li>'
);
this.$searchContainer=$search;
this.$search=$search.find('input');
var $rendered=decorated.call(this);
this._transferTabIndex();
return $rendered;
};
Search.prototype.bind=function (decorated, container, $container){
var self=this;
decorated.call(this, container, $container);
container.on('open', function (){
self.$search.trigger('focus');
});
container.on('close', function (){
self.$search.val('');
self.$search.removeAttr('aria-activedescendant');
self.$search.trigger('focus');
});
container.on('enable', function (){
self.$search.prop('disabled', false);
self._transferTabIndex();
});
container.on('disable', function (){
self.$search.prop('disabled', true);
});
container.on('focus', function (evt){
self.$search.trigger('focus');
});
container.on('results:focus', function (params){
self.$search.attr('aria-activedescendant', params.id);
});
this.$selection.on('focusin', '.select2-search--inline', function (evt){
self.trigger('focus', evt);
});
this.$selection.on('focusout', '.select2-search--inline', function (evt){
self._handleBlur(evt);
});
this.$selection.on('keydown', '.select2-search--inline', function (evt){
evt.stopPropagation();
self.trigger('keypress', evt);
self._keyUpPrevented=evt.isDefaultPrevented();
var key=evt.which;
if(key===KEYS.BACKSPACE&&self.$search.val()===''){
var $previousChoice=self.$searchContainer
.prev('.select2-selection__choice');
if($previousChoice.length > 0){
var item=$previousChoice.data('data');
self.searchRemoveChoice(item);
evt.preventDefault();
}}
});
var msie=document.documentMode;
var disableInputEvents=msie&&msie <=11;
this.$selection.on('input.searchcheck',
'.select2-search--inline',
function (evt){
if(disableInputEvents){
self.$selection.off('input.search input.searchcheck');
return;
}
self.$selection.off('keyup.search');
}
);
this.$selection.on('keyup.search input.search',
'.select2-search--inline',
function (evt){
if(disableInputEvents&&evt.type==='input'){
self.$selection.off('input.search input.searchcheck');
return;
}
var key=evt.which;
if(key==KEYS.SHIFT||key==KEYS.CTRL||key==KEYS.ALT){
return;
}
if(key==KEYS.TAB){
return;
}
self.handleSearch(evt);
}
);
};
Search.prototype._transferTabIndex=function (decorated){
this.$search.attr('tabindex', this.$selection.attr('tabindex'));
this.$selection.attr('tabindex', '-1');
};
Search.prototype.createPlaceholder=function (decorated, placeholder){
this.$search.attr('placeholder', placeholder.text);
};
Search.prototype.update=function (decorated, data){
var searchHadFocus=this.$search[0]==document.activeElement;
this.$search.attr('placeholder', '');
decorated.call(this, data);
this.$selection.find('.select2-selection__rendered')
.append(this.$searchContainer);
this.resizeSearch();
if(searchHadFocus){
this.$search.focus();
}};
Search.prototype.handleSearch=function (){
this.resizeSearch();
if(!this._keyUpPrevented){
var input=this.$search.val();
this.trigger('query', {
term: input
});
}
this._keyUpPrevented=false;
};
Search.prototype.searchRemoveChoice=function (decorated, item){
this.trigger('unselect', {
data: item
});
this.$search.val(item.text);
this.handleSearch();
};
Search.prototype.resizeSearch=function (){
this.$search.css('width', '25px');
var width='';
if(this.$search.attr('placeholder')!==''){
width=this.$selection.find('.select2-selection__rendered').innerWidth();
}else{
var minimumWidth=this.$search.val().length + 1;
width=(minimumWidth * 0.75) + 'em';
}
this.$search.css('width', width);
};
return Search;
});
S2.define('select2/selection/eventRelay',[
'jquery'
], function ($){
function EventRelay (){ }
EventRelay.prototype.bind=function (decorated, container, $container){
var self=this;
var relayEvents=[
'open', 'opening',
'close', 'closing',
'select', 'selecting',
'unselect', 'unselecting'
];
var preventableEvents=['opening', 'closing', 'selecting', 'unselecting'];
decorated.call(this, container, $container);
container.on('*', function (name, params){
if($.inArray(name, relayEvents)===-1){
return;
}
params=params||{};
var evt=$.Event('select2:' + name, {
params: params
});
self.$element.trigger(evt);
if($.inArray(name, preventableEvents)===-1){
return;
}
params.prevented=evt.isDefaultPrevented();
});
};
return EventRelay;
});
S2.define('select2/translation',[
'jquery',
'require'
], function ($, require){
function Translation (dict){
this.dict=dict||{};}
Translation.prototype.all=function (){
return this.dict;
};
Translation.prototype.get=function (key){
return this.dict[key];
};
Translation.prototype.extend=function (translation){
this.dict=$.extend({}, translation.all(), this.dict);
};
Translation._cache={};
Translation.loadPath=function (path){
if(!(path in Translation._cache)){
var translations=require(path);
Translation._cache[path]=translations;
}
return new Translation(Translation._cache[path]);
};
return Translation;
});
S2.define('select2/diacritics',[
], function (){
var diacritics={
'\u24B6': 'A',
'\uFF21': 'A',
'\u00C0': 'A',
'\u00C1': 'A',
'\u00C2': 'A',
'\u1EA6': 'A',
'\u1EA4': 'A',
'\u1EAA': 'A',
'\u1EA8': 'A',
'\u00C3': 'A',
'\u0100': 'A',
'\u0102': 'A',
'\u1EB0': 'A',
'\u1EAE': 'A',
'\u1EB4': 'A',
'\u1EB2': 'A',
'\u0226': 'A',
'\u01E0': 'A',
'\u00C4': 'A',
'\u01DE': 'A',
'\u1EA2': 'A',
'\u00C5': 'A',
'\u01FA': 'A',
'\u01CD': 'A',
'\u0200': 'A',
'\u0202': 'A',
'\u1EA0': 'A',
'\u1EAC': 'A',
'\u1EB6': 'A',
'\u1E00': 'A',
'\u0104': 'A',
'\u023A': 'A',
'\u2C6F': 'A',
'\uA732': 'AA',
'\u00C6': 'AE',
'\u01FC': 'AE',
'\u01E2': 'AE',
'\uA734': 'AO',
'\uA736': 'AU',
'\uA738': 'AV',
'\uA73A': 'AV',
'\uA73C': 'AY',
'\u24B7': 'B',
'\uFF22': 'B',
'\u1E02': 'B',
'\u1E04': 'B',
'\u1E06': 'B',
'\u0243': 'B',
'\u0182': 'B',
'\u0181': 'B',
'\u24B8': 'C',
'\uFF23': 'C',
'\u0106': 'C',
'\u0108': 'C',
'\u010A': 'C',
'\u010C': 'C',
'\u00C7': 'C',
'\u1E08': 'C',
'\u0187': 'C',
'\u023B': 'C',
'\uA73E': 'C',
'\u24B9': 'D',
'\uFF24': 'D',
'\u1E0A': 'D',
'\u010E': 'D',
'\u1E0C': 'D',
'\u1E10': 'D',
'\u1E12': 'D',
'\u1E0E': 'D',
'\u0110': 'D',
'\u018B': 'D',
'\u018A': 'D',
'\u0189': 'D',
'\uA779': 'D',
'\u01F1': 'DZ',
'\u01C4': 'DZ',
'\u01F2': 'Dz',
'\u01C5': 'Dz',
'\u24BA': 'E',
'\uFF25': 'E',
'\u00C8': 'E',
'\u00C9': 'E',
'\u00CA': 'E',
'\u1EC0': 'E',
'\u1EBE': 'E',
'\u1EC4': 'E',
'\u1EC2': 'E',
'\u1EBC': 'E',
'\u0112': 'E',
'\u1E14': 'E',
'\u1E16': 'E',
'\u0114': 'E',
'\u0116': 'E',
'\u00CB': 'E',
'\u1EBA': 'E',
'\u011A': 'E',
'\u0204': 'E',
'\u0206': 'E',
'\u1EB8': 'E',
'\u1EC6': 'E',
'\u0228': 'E',
'\u1E1C': 'E',
'\u0118': 'E',
'\u1E18': 'E',
'\u1E1A': 'E',
'\u0190': 'E',
'\u018E': 'E',
'\u24BB': 'F',
'\uFF26': 'F',
'\u1E1E': 'F',
'\u0191': 'F',
'\uA77B': 'F',
'\u24BC': 'G',
'\uFF27': 'G',
'\u01F4': 'G',
'\u011C': 'G',
'\u1E20': 'G',
'\u011E': 'G',
'\u0120': 'G',
'\u01E6': 'G',
'\u0122': 'G',
'\u01E4': 'G',
'\u0193': 'G',
'\uA7A0': 'G',
'\uA77D': 'G',
'\uA77E': 'G',
'\u24BD': 'H',
'\uFF28': 'H',
'\u0124': 'H',
'\u1E22': 'H',
'\u1E26': 'H',
'\u021E': 'H',
'\u1E24': 'H',
'\u1E28': 'H',
'\u1E2A': 'H',
'\u0126': 'H',
'\u2C67': 'H',
'\u2C75': 'H',
'\uA78D': 'H',
'\u24BE': 'I',
'\uFF29': 'I',
'\u00CC': 'I',
'\u00CD': 'I',
'\u00CE': 'I',
'\u0128': 'I',
'\u012A': 'I',
'\u012C': 'I',
'\u0130': 'I',
'\u00CF': 'I',
'\u1E2E': 'I',
'\u1EC8': 'I',
'\u01CF': 'I',
'\u0208': 'I',
'\u020A': 'I',
'\u1ECA': 'I',
'\u012E': 'I',
'\u1E2C': 'I',
'\u0197': 'I',
'\u24BF': 'J',
'\uFF2A': 'J',
'\u0134': 'J',
'\u0248': 'J',
'\u24C0': 'K',
'\uFF2B': 'K',
'\u1E30': 'K',
'\u01E8': 'K',
'\u1E32': 'K',
'\u0136': 'K',
'\u1E34': 'K',
'\u0198': 'K',
'\u2C69': 'K',
'\uA740': 'K',
'\uA742': 'K',
'\uA744': 'K',
'\uA7A2': 'K',
'\u24C1': 'L',
'\uFF2C': 'L',
'\u013F': 'L',
'\u0139': 'L',
'\u013D': 'L',
'\u1E36': 'L',
'\u1E38': 'L',
'\u013B': 'L',
'\u1E3C': 'L',
'\u1E3A': 'L',
'\u0141': 'L',
'\u023D': 'L',
'\u2C62': 'L',
'\u2C60': 'L',
'\uA748': 'L',
'\uA746': 'L',
'\uA780': 'L',
'\u01C7': 'LJ',
'\u01C8': 'Lj',
'\u24C2': 'M',
'\uFF2D': 'M',
'\u1E3E': 'M',
'\u1E40': 'M',
'\u1E42': 'M',
'\u2C6E': 'M',
'\u019C': 'M',
'\u24C3': 'N',
'\uFF2E': 'N',
'\u01F8': 'N',
'\u0143': 'N',
'\u00D1': 'N',
'\u1E44': 'N',
'\u0147': 'N',
'\u1E46': 'N',
'\u0145': 'N',
'\u1E4A': 'N',
'\u1E48': 'N',
'\u0220': 'N',
'\u019D': 'N',
'\uA790': 'N',
'\uA7A4': 'N',
'\u01CA': 'NJ',
'\u01CB': 'Nj',
'\u24C4': 'O',
'\uFF2F': 'O',
'\u00D2': 'O',
'\u00D3': 'O',
'\u00D4': 'O',
'\u1ED2': 'O',
'\u1ED0': 'O',
'\u1ED6': 'O',
'\u1ED4': 'O',
'\u00D5': 'O',
'\u1E4C': 'O',
'\u022C': 'O',
'\u1E4E': 'O',
'\u014C': 'O',
'\u1E50': 'O',
'\u1E52': 'O',
'\u014E': 'O',
'\u022E': 'O',
'\u0230': 'O',
'\u00D6': 'O',
'\u022A': 'O',
'\u1ECE': 'O',
'\u0150': 'O',
'\u01D1': 'O',
'\u020C': 'O',
'\u020E': 'O',
'\u01A0': 'O',
'\u1EDC': 'O',
'\u1EDA': 'O',
'\u1EE0': 'O',
'\u1EDE': 'O',
'\u1EE2': 'O',
'\u1ECC': 'O',
'\u1ED8': 'O',
'\u01EA': 'O',
'\u01EC': 'O',
'\u00D8': 'O',
'\u01FE': 'O',
'\u0186': 'O',
'\u019F': 'O',
'\uA74A': 'O',
'\uA74C': 'O',
'\u01A2': 'OI',
'\uA74E': 'OO',
'\u0222': 'OU',
'\u24C5': 'P',
'\uFF30': 'P',
'\u1E54': 'P',
'\u1E56': 'P',
'\u01A4': 'P',
'\u2C63': 'P',
'\uA750': 'P',
'\uA752': 'P',
'\uA754': 'P',
'\u24C6': 'Q',
'\uFF31': 'Q',
'\uA756': 'Q',
'\uA758': 'Q',
'\u024A': 'Q',
'\u24C7': 'R',
'\uFF32': 'R',
'\u0154': 'R',
'\u1E58': 'R',
'\u0158': 'R',
'\u0210': 'R',
'\u0212': 'R',
'\u1E5A': 'R',
'\u1E5C': 'R',
'\u0156': 'R',
'\u1E5E': 'R',
'\u024C': 'R',
'\u2C64': 'R',
'\uA75A': 'R',
'\uA7A6': 'R',
'\uA782': 'R',
'\u24C8': 'S',
'\uFF33': 'S',
'\u1E9E': 'S',
'\u015A': 'S',
'\u1E64': 'S',
'\u015C': 'S',
'\u1E60': 'S',
'\u0160': 'S',
'\u1E66': 'S',
'\u1E62': 'S',
'\u1E68': 'S',
'\u0218': 'S',
'\u015E': 'S',
'\u2C7E': 'S',
'\uA7A8': 'S',
'\uA784': 'S',
'\u24C9': 'T',
'\uFF34': 'T',
'\u1E6A': 'T',
'\u0164': 'T',
'\u1E6C': 'T',
'\u021A': 'T',
'\u0162': 'T',
'\u1E70': 'T',
'\u1E6E': 'T',
'\u0166': 'T',
'\u01AC': 'T',
'\u01AE': 'T',
'\u023E': 'T',
'\uA786': 'T',
'\uA728': 'TZ',
'\u24CA': 'U',
'\uFF35': 'U',
'\u00D9': 'U',
'\u00DA': 'U',
'\u00DB': 'U',
'\u0168': 'U',
'\u1E78': 'U',
'\u016A': 'U',
'\u1E7A': 'U',
'\u016C': 'U',
'\u00DC': 'U',
'\u01DB': 'U',
'\u01D7': 'U',
'\u01D5': 'U',
'\u01D9': 'U',
'\u1EE6': 'U',
'\u016E': 'U',
'\u0170': 'U',
'\u01D3': 'U',
'\u0214': 'U',
'\u0216': 'U',
'\u01AF': 'U',
'\u1EEA': 'U',
'\u1EE8': 'U',
'\u1EEE': 'U',
'\u1EEC': 'U',
'\u1EF0': 'U',
'\u1EE4': 'U',
'\u1E72': 'U',
'\u0172': 'U',
'\u1E76': 'U',
'\u1E74': 'U',
'\u0244': 'U',
'\u24CB': 'V',
'\uFF36': 'V',
'\u1E7C': 'V',
'\u1E7E': 'V',
'\u01B2': 'V',
'\uA75E': 'V',
'\u0245': 'V',
'\uA760': 'VY',
'\u24CC': 'W',
'\uFF37': 'W',
'\u1E80': 'W',
'\u1E82': 'W',
'\u0174': 'W',
'\u1E86': 'W',
'\u1E84': 'W',
'\u1E88': 'W',
'\u2C72': 'W',
'\u24CD': 'X',
'\uFF38': 'X',
'\u1E8A': 'X',
'\u1E8C': 'X',
'\u24CE': 'Y',
'\uFF39': 'Y',
'\u1EF2': 'Y',
'\u00DD': 'Y',
'\u0176': 'Y',
'\u1EF8': 'Y',
'\u0232': 'Y',
'\u1E8E': 'Y',
'\u0178': 'Y',
'\u1EF6': 'Y',
'\u1EF4': 'Y',
'\u01B3': 'Y',
'\u024E': 'Y',
'\u1EFE': 'Y',
'\u24CF': 'Z',
'\uFF3A': 'Z',
'\u0179': 'Z',
'\u1E90': 'Z',
'\u017B': 'Z',
'\u017D': 'Z',
'\u1E92': 'Z',
'\u1E94': 'Z',
'\u01B5': 'Z',
'\u0224': 'Z',
'\u2C7F': 'Z',
'\u2C6B': 'Z',
'\uA762': 'Z',
'\u24D0': 'a',
'\uFF41': 'a',
'\u1E9A': 'a',
'\u00E0': 'a',
'\u00E1': 'a',
'\u00E2': 'a',
'\u1EA7': 'a',
'\u1EA5': 'a',
'\u1EAB': 'a',
'\u1EA9': 'a',
'\u00E3': 'a',
'\u0101': 'a',
'\u0103': 'a',
'\u1EB1': 'a',
'\u1EAF': 'a',
'\u1EB5': 'a',
'\u1EB3': 'a',
'\u0227': 'a',
'\u01E1': 'a',
'\u00E4': 'a',
'\u01DF': 'a',
'\u1EA3': 'a',
'\u00E5': 'a',
'\u01FB': 'a',
'\u01CE': 'a',
'\u0201': 'a',
'\u0203': 'a',
'\u1EA1': 'a',
'\u1EAD': 'a',
'\u1EB7': 'a',
'\u1E01': 'a',
'\u0105': 'a',
'\u2C65': 'a',
'\u0250': 'a',
'\uA733': 'aa',
'\u00E6': 'ae',
'\u01FD': 'ae',
'\u01E3': 'ae',
'\uA735': 'ao',
'\uA737': 'au',
'\uA739': 'av',
'\uA73B': 'av',
'\uA73D': 'ay',
'\u24D1': 'b',
'\uFF42': 'b',
'\u1E03': 'b',
'\u1E05': 'b',
'\u1E07': 'b',
'\u0180': 'b',
'\u0183': 'b',
'\u0253': 'b',
'\u24D2': 'c',
'\uFF43': 'c',
'\u0107': 'c',
'\u0109': 'c',
'\u010B': 'c',
'\u010D': 'c',
'\u00E7': 'c',
'\u1E09': 'c',
'\u0188': 'c',
'\u023C': 'c',
'\uA73F': 'c',
'\u2184': 'c',
'\u24D3': 'd',
'\uFF44': 'd',
'\u1E0B': 'd',
'\u010F': 'd',
'\u1E0D': 'd',
'\u1E11': 'd',
'\u1E13': 'd',
'\u1E0F': 'd',
'\u0111': 'd',
'\u018C': 'd',
'\u0256': 'd',
'\u0257': 'd',
'\uA77A': 'd',
'\u01F3': 'dz',
'\u01C6': 'dz',
'\u24D4': 'e',
'\uFF45': 'e',
'\u00E8': 'e',
'\u00E9': 'e',
'\u00EA': 'e',
'\u1EC1': 'e',
'\u1EBF': 'e',
'\u1EC5': 'e',
'\u1EC3': 'e',
'\u1EBD': 'e',
'\u0113': 'e',
'\u1E15': 'e',
'\u1E17': 'e',
'\u0115': 'e',
'\u0117': 'e',
'\u00EB': 'e',
'\u1EBB': 'e',
'\u011B': 'e',
'\u0205': 'e',
'\u0207': 'e',
'\u1EB9': 'e',
'\u1EC7': 'e',
'\u0229': 'e',
'\u1E1D': 'e',
'\u0119': 'e',
'\u1E19': 'e',
'\u1E1B': 'e',
'\u0247': 'e',
'\u025B': 'e',
'\u01DD': 'e',
'\u24D5': 'f',
'\uFF46': 'f',
'\u1E1F': 'f',
'\u0192': 'f',
'\uA77C': 'f',
'\u24D6': 'g',
'\uFF47': 'g',
'\u01F5': 'g',
'\u011D': 'g',
'\u1E21': 'g',
'\u011F': 'g',
'\u0121': 'g',
'\u01E7': 'g',
'\u0123': 'g',
'\u01E5': 'g',
'\u0260': 'g',
'\uA7A1': 'g',
'\u1D79': 'g',
'\uA77F': 'g',
'\u24D7': 'h',
'\uFF48': 'h',
'\u0125': 'h',
'\u1E23': 'h',
'\u1E27': 'h',
'\u021F': 'h',
'\u1E25': 'h',
'\u1E29': 'h',
'\u1E2B': 'h',
'\u1E96': 'h',
'\u0127': 'h',
'\u2C68': 'h',
'\u2C76': 'h',
'\u0265': 'h',
'\u0195': 'hv',
'\u24D8': 'i',
'\uFF49': 'i',
'\u00EC': 'i',
'\u00ED': 'i',
'\u00EE': 'i',
'\u0129': 'i',
'\u012B': 'i',
'\u012D': 'i',
'\u00EF': 'i',
'\u1E2F': 'i',
'\u1EC9': 'i',
'\u01D0': 'i',
'\u0209': 'i',
'\u020B': 'i',
'\u1ECB': 'i',
'\u012F': 'i',
'\u1E2D': 'i',
'\u0268': 'i',
'\u0131': 'i',
'\u24D9': 'j',
'\uFF4A': 'j',
'\u0135': 'j',
'\u01F0': 'j',
'\u0249': 'j',
'\u24DA': 'k',
'\uFF4B': 'k',
'\u1E31': 'k',
'\u01E9': 'k',
'\u1E33': 'k',
'\u0137': 'k',
'\u1E35': 'k',
'\u0199': 'k',
'\u2C6A': 'k',
'\uA741': 'k',
'\uA743': 'k',
'\uA745': 'k',
'\uA7A3': 'k',
'\u24DB': 'l',
'\uFF4C': 'l',
'\u0140': 'l',
'\u013A': 'l',
'\u013E': 'l',
'\u1E37': 'l',
'\u1E39': 'l',
'\u013C': 'l',
'\u1E3D': 'l',
'\u1E3B': 'l',
'\u017F': 'l',
'\u0142': 'l',
'\u019A': 'l',
'\u026B': 'l',
'\u2C61': 'l',
'\uA749': 'l',
'\uA781': 'l',
'\uA747': 'l',
'\u01C9': 'lj',
'\u24DC': 'm',
'\uFF4D': 'm',
'\u1E3F': 'm',
'\u1E41': 'm',
'\u1E43': 'm',
'\u0271': 'm',
'\u026F': 'm',
'\u24DD': 'n',
'\uFF4E': 'n',
'\u01F9': 'n',
'\u0144': 'n',
'\u00F1': 'n',
'\u1E45': 'n',
'\u0148': 'n',
'\u1E47': 'n',
'\u0146': 'n',
'\u1E4B': 'n',
'\u1E49': 'n',
'\u019E': 'n',
'\u0272': 'n',
'\u0149': 'n',
'\uA791': 'n',
'\uA7A5': 'n',
'\u01CC': 'nj',
'\u24DE': 'o',
'\uFF4F': 'o',
'\u00F2': 'o',
'\u00F3': 'o',
'\u00F4': 'o',
'\u1ED3': 'o',
'\u1ED1': 'o',
'\u1ED7': 'o',
'\u1ED5': 'o',
'\u00F5': 'o',
'\u1E4D': 'o',
'\u022D': 'o',
'\u1E4F': 'o',
'\u014D': 'o',
'\u1E51': 'o',
'\u1E53': 'o',
'\u014F': 'o',
'\u022F': 'o',
'\u0231': 'o',
'\u00F6': 'o',
'\u022B': 'o',
'\u1ECF': 'o',
'\u0151': 'o',
'\u01D2': 'o',
'\u020D': 'o',
'\u020F': 'o',
'\u01A1': 'o',
'\u1EDD': 'o',
'\u1EDB': 'o',
'\u1EE1': 'o',
'\u1EDF': 'o',
'\u1EE3': 'o',
'\u1ECD': 'o',
'\u1ED9': 'o',
'\u01EB': 'o',
'\u01ED': 'o',
'\u00F8': 'o',
'\u01FF': 'o',
'\u0254': 'o',
'\uA74B': 'o',
'\uA74D': 'o',
'\u0275': 'o',
'\u01A3': 'oi',
'\u0223': 'ou',
'\uA74F': 'oo',
'\u24DF': 'p',
'\uFF50': 'p',
'\u1E55': 'p',
'\u1E57': 'p',
'\u01A5': 'p',
'\u1D7D': 'p',
'\uA751': 'p',
'\uA753': 'p',
'\uA755': 'p',
'\u24E0': 'q',
'\uFF51': 'q',
'\u024B': 'q',
'\uA757': 'q',
'\uA759': 'q',
'\u24E1': 'r',
'\uFF52': 'r',
'\u0155': 'r',
'\u1E59': 'r',
'\u0159': 'r',
'\u0211': 'r',
'\u0213': 'r',
'\u1E5B': 'r',
'\u1E5D': 'r',
'\u0157': 'r',
'\u1E5F': 'r',
'\u024D': 'r',
'\u027D': 'r',
'\uA75B': 'r',
'\uA7A7': 'r',
'\uA783': 'r',
'\u24E2': 's',
'\uFF53': 's',
'\u00DF': 's',
'\u015B': 's',
'\u1E65': 's',
'\u015D': 's',
'\u1E61': 's',
'\u0161': 's',
'\u1E67': 's',
'\u1E63': 's',
'\u1E69': 's',
'\u0219': 's',
'\u015F': 's',
'\u023F': 's',
'\uA7A9': 's',
'\uA785': 's',
'\u1E9B': 's',
'\u24E3': 't',
'\uFF54': 't',
'\u1E6B': 't',
'\u1E97': 't',
'\u0165': 't',
'\u1E6D': 't',
'\u021B': 't',
'\u0163': 't',
'\u1E71': 't',
'\u1E6F': 't',
'\u0167': 't',
'\u01AD': 't',
'\u0288': 't',
'\u2C66': 't',
'\uA787': 't',
'\uA729': 'tz',
'\u24E4': 'u',
'\uFF55': 'u',
'\u00F9': 'u',
'\u00FA': 'u',
'\u00FB': 'u',
'\u0169': 'u',
'\u1E79': 'u',
'\u016B': 'u',
'\u1E7B': 'u',
'\u016D': 'u',
'\u00FC': 'u',
'\u01DC': 'u',
'\u01D8': 'u',
'\u01D6': 'u',
'\u01DA': 'u',
'\u1EE7': 'u',
'\u016F': 'u',
'\u0171': 'u',
'\u01D4': 'u',
'\u0215': 'u',
'\u0217': 'u',
'\u01B0': 'u',
'\u1EEB': 'u',
'\u1EE9': 'u',
'\u1EEF': 'u',
'\u1EED': 'u',
'\u1EF1': 'u',
'\u1EE5': 'u',
'\u1E73': 'u',
'\u0173': 'u',
'\u1E77': 'u',
'\u1E75': 'u',
'\u0289': 'u',
'\u24E5': 'v',
'\uFF56': 'v',
'\u1E7D': 'v',
'\u1E7F': 'v',
'\u028B': 'v',
'\uA75F': 'v',
'\u028C': 'v',
'\uA761': 'vy',
'\u24E6': 'w',
'\uFF57': 'w',
'\u1E81': 'w',
'\u1E83': 'w',
'\u0175': 'w',
'\u1E87': 'w',
'\u1E85': 'w',
'\u1E98': 'w',
'\u1E89': 'w',
'\u2C73': 'w',
'\u24E7': 'x',
'\uFF58': 'x',
'\u1E8B': 'x',
'\u1E8D': 'x',
'\u24E8': 'y',
'\uFF59': 'y',
'\u1EF3': 'y',
'\u00FD': 'y',
'\u0177': 'y',
'\u1EF9': 'y',
'\u0233': 'y',
'\u1E8F': 'y',
'\u00FF': 'y',
'\u1EF7': 'y',
'\u1E99': 'y',
'\u1EF5': 'y',
'\u01B4': 'y',
'\u024F': 'y',
'\u1EFF': 'y',
'\u24E9': 'z',
'\uFF5A': 'z',
'\u017A': 'z',
'\u1E91': 'z',
'\u017C': 'z',
'\u017E': 'z',
'\u1E93': 'z',
'\u1E95': 'z',
'\u01B6': 'z',
'\u0225': 'z',
'\u0240': 'z',
'\u2C6C': 'z',
'\uA763': 'z',
'\u0386': '\u0391',
'\u0388': '\u0395',
'\u0389': '\u0397',
'\u038A': '\u0399',
'\u03AA': '\u0399',
'\u038C': '\u039F',
'\u038E': '\u03A5',
'\u03AB': '\u03A5',
'\u038F': '\u03A9',
'\u03AC': '\u03B1',
'\u03AD': '\u03B5',
'\u03AE': '\u03B7',
'\u03AF': '\u03B9',
'\u03CA': '\u03B9',
'\u0390': '\u03B9',
'\u03CC': '\u03BF',
'\u03CD': '\u03C5',
'\u03CB': '\u03C5',
'\u03B0': '\u03C5',
'\u03C9': '\u03C9',
'\u03C2': '\u03C3'
};
return diacritics;
});
S2.define('select2/data/base',[
'../utils'
], function (Utils){
function BaseAdapter ($element, options){
BaseAdapter.__super__.constructor.call(this);
}
Utils.Extend(BaseAdapter, Utils.Observable);
BaseAdapter.prototype.current=function (callback){
throw new Error('The `current` method must be defined in child classes.');
};
BaseAdapter.prototype.query=function (params, callback){
throw new Error('The `query` method must be defined in child classes.');
};
BaseAdapter.prototype.bind=function (container, $container){
};
BaseAdapter.prototype.destroy=function (){
};
BaseAdapter.prototype.generateResultId=function (container, data){
var id=container.id + '-result-';
id +=Utils.generateChars(4);
if(data.id!=null){
id +='-' + data.id.toString();
}else{
id +='-' + Utils.generateChars(4);
}
return id;
};
return BaseAdapter;
});
S2.define('select2/data/select',[
'./base',
'../utils',
'jquery'
], function (BaseAdapter, Utils, $){
function SelectAdapter ($element, options){
this.$element=$element;
this.options=options;
SelectAdapter.__super__.constructor.call(this);
}
Utils.Extend(SelectAdapter, BaseAdapter);
SelectAdapter.prototype.current=function (callback){
var data=[];
var self=this;
this.$element.find(':selected').each(function (){
var $option=$(this);
var option=self.item($option);
data.push(option);
});
callback(data);
};
SelectAdapter.prototype.select=function (data){
var self=this;
data.selected=true;
if($(data.element).is('option')){
data.element.selected=true;
this.$element.trigger('change');
return;
}
if(this.$element.prop('multiple')){
this.current(function (currentData){
var val=[];
data=[data];
data.push.apply(data, currentData);
for (var d=0; d < data.length; d++){
var id=data[d].id;
if($.inArray(id, val)===-1){
val.push(id);
}}
self.$element.val(val);
self.$element.trigger('change');
});
}else{
var val=data.id;
this.$element.val(val);
this.$element.trigger('change');
}};
SelectAdapter.prototype.unselect=function (data){
var self=this;
if(!this.$element.prop('multiple')){
return;
}
data.selected=false;
if($(data.element).is('option')){
data.element.selected=false;
this.$element.trigger('change');
return;
}
this.current(function (currentData){
var val=[];
for (var d=0; d < currentData.length; d++){
var id=currentData[d].id;
if(id!==data.id&&$.inArray(id, val)===-1){
val.push(id);
}}
self.$element.val(val);
self.$element.trigger('change');
});
};
SelectAdapter.prototype.bind=function (container, $container){
var self=this;
this.container=container;
container.on('select', function (params){
self.select(params.data);
});
container.on('unselect', function (params){
self.unselect(params.data);
});
};
SelectAdapter.prototype.destroy=function (){
this.$element.find('*').each(function (){
$.removeData(this, 'data');
});
};
SelectAdapter.prototype.query=function (params, callback){
var data=[];
var self=this;
var $options=this.$element.children();
$options.each(function (){
var $option=$(this);
if(!$option.is('option')&&!$option.is('optgroup')){
return;
}
var option=self.item($option);
var matches=self.matches(params, option);
if(matches!==null){
data.push(matches);
}});
callback({
results: data
});
};
SelectAdapter.prototype.addOptions=function ($options){
Utils.appendMany(this.$element, $options);
};
SelectAdapter.prototype.option=function (data){
var option;
if(data.children){
option=document.createElement('optgroup');
option.label=data.text;
}else{
option=document.createElement('option');
if(option.textContent!==undefined){
option.textContent=data.text;
}else{
option.innerText=data.text;
}}
if(data.id!==undefined){
option.value=data.id;
}
if(data.disabled){
option.disabled=true;
}
if(data.selected){
option.selected=true;
}
if(data.title){
option.title=data.title;
}
var $option=$(option);
var normalizedData=this._normalizeItem(data);
normalizedData.element=option;
$.data(option, 'data', normalizedData);
return $option;
};
SelectAdapter.prototype.item=function ($option){
var data={};
data=$.data($option[0], 'data');
if(data!=null){
return data;
}
if($option.is('option')){
data={
id: $option.val(),
text: $option.text(),
disabled: $option.prop('disabled'),
selected: $option.prop('selected'),
title: $option.prop('title')
};}else if($option.is('optgroup')){
data={
text: $option.prop('label'),
children: [],
title: $option.prop('title')
};
var $children=$option.children('option');
var children=[];
for (var c=0; c < $children.length; c++){
var $child=$($children[c]);
var child=this.item($child);
children.push(child);
}
data.children=children;
}
data=this._normalizeItem(data);
data.element=$option[0];
$.data($option[0], 'data', data);
return data;
};
SelectAdapter.prototype._normalizeItem=function (item){
if(!$.isPlainObject(item)){
item={
id: item,
text: item
};}
item=$.extend({}, {
text: ''
}, item);
var defaults={
selected: false,
disabled: false
};
if(item.id!=null){
item.id=item.id.toString();
}
if(item.text!=null){
item.text=item.text.toString();
}
if(item._resultId==null&&item.id&&this.container!=null){
item._resultId=this.generateResultId(this.container, item);
}
return $.extend({}, defaults, item);
};
SelectAdapter.prototype.matches=function (params, data){
var matcher=this.options.get('matcher');
return matcher(params, data);
};
return SelectAdapter;
});
S2.define('select2/data/array',[
'./select',
'../utils',
'jquery'
], function (SelectAdapter, Utils, $){
function ArrayAdapter ($element, options){
var data=options.get('data')||[];
ArrayAdapter.__super__.constructor.call(this, $element, options);
this.addOptions(this.convertToOptions(data));
}
Utils.Extend(ArrayAdapter, SelectAdapter);
ArrayAdapter.prototype.select=function (data){
var $option=this.$element.find('option').filter(function (i, elm){
return elm.value==data.id.toString();
});
if($option.length===0){
$option=this.option(data);
this.addOptions($option);
}
ArrayAdapter.__super__.select.call(this, data);
};
ArrayAdapter.prototype.convertToOptions=function (data){
var self=this;
var $existing=this.$element.find('option');
var existingIds=$existing.map(function (){
return self.item($(this)).id;
}).get();
var $options=[];
function onlyItem (item){
return function (){
return $(this).val()==item.id;
};}
for (var d=0; d < data.length; d++){
var item=this._normalizeItem(data[d]);
if($.inArray(item.id, existingIds) >=0){
var $existingOption=$existing.filter(onlyItem(item));
var existingData=this.item($existingOption);
var newData=$.extend(true, {}, item, existingData);
var $newOption=this.option(newData);
$existingOption.replaceWith($newOption);
continue;
}
var $option=this.option(item);
if(item.children){
var $children=this.convertToOptions(item.children);
Utils.appendMany($option, $children);
}
$options.push($option);
}
return $options;
};
return ArrayAdapter;
});
S2.define('select2/data/ajax',[
'./array',
'../utils',
'jquery'
], function (ArrayAdapter, Utils, $){
function AjaxAdapter ($element, options){
this.ajaxOptions=this._applyDefaults(options.get('ajax'));
if(this.ajaxOptions.processResults!=null){
this.processResults=this.ajaxOptions.processResults;
}
AjaxAdapter.__super__.constructor.call(this, $element, options);
}
Utils.Extend(AjaxAdapter, ArrayAdapter);
AjaxAdapter.prototype._applyDefaults=function (options){
var defaults={
data: function (params){
return $.extend({}, params, {
q: params.term
});
},
transport: function (params, success, failure){
var $request=$.ajax(params);
$request.then(success);
$request.fail(failure);
return $request;
}};
return $.extend({}, defaults, options, true);
};
AjaxAdapter.prototype.processResults=function (results){
return results;
};
AjaxAdapter.prototype.query=function (params, callback){
var matches=[];
var self=this;
if(this._request!=null){
if($.isFunction(this._request.abort)){
this._request.abort();
}
this._request=null;
}
var options=$.extend({
type: 'GET'
}, this.ajaxOptions);
if(typeof options.url==='function'){
options.url=options.url.call(this.$element, params);
}
if(typeof options.data==='function'){
options.data=options.data.call(this.$element, params);
}
function request (){
var $request=options.transport(options, function (data){
var results=self.processResults(data, params);
if(self.options.get('debug')&&window.console&&console.error){
if(!results||!results.results||!$.isArray(results.results)){
console.error('Select2: The AJAX results did not return an array in the ' +
'`results` key of the response.'
);
}}
callback(results);
}, function (){
if($request.status&&$request.status==='0'){
return;
}
self.trigger('results:message', {
message: 'errorLoading'
});
});
self._request=$request;
}
if(this.ajaxOptions.delay&&params.term!=null){
if(this._queryTimeout){
window.clearTimeout(this._queryTimeout);
}
this._queryTimeout=window.setTimeout(request, this.ajaxOptions.delay);
}else{
request();
}};
return AjaxAdapter;
});
S2.define('select2/data/tags',[
'jquery'
], function ($){
function Tags (decorated, $element, options){
var tags=options.get('tags');
var createTag=options.get('createTag');
if(createTag!==undefined){
this.createTag=createTag;
}
var insertTag=options.get('insertTag');
if(insertTag!==undefined){
this.insertTag=insertTag;
}
decorated.call(this, $element, options);
if($.isArray(tags)){
for (var t=0; t < tags.length; t++){
var tag=tags[t];
var item=this._normalizeItem(tag);
var $option=this.option(item);
this.$element.append($option);
}}
}
Tags.prototype.query=function (decorated, params, callback){
var self=this;
this._removeOldTags();
if(params.term==null||params.page!=null){
decorated.call(this, params, callback);
return;
}
function wrapper (obj, child){
var data=obj.results;
for (var i=0; i < data.length; i++){
var option=data[i];
var checkChildren=(
option.children!=null &&
!wrapper({
results: option.children
}, true)
);
var optionText=(option.text||'').toUpperCase();
var paramsTerm=(params.term||'').toUpperCase();
var checkText=optionText===paramsTerm;
if(checkText||checkChildren){
if(child){
return false;
}
obj.data=data;
callback(obj);
return;
}}
if(child){
return true;
}
var tag=self.createTag(params);
if(tag!=null){
var $option=self.option(tag);
$option.attr('data-select2-tag', true);
self.addOptions([$option]);
self.insertTag(data, tag);
}
obj.results=data;
callback(obj);
}
decorated.call(this, params, wrapper);
};
Tags.prototype.createTag=function (decorated, params){
var term=$.trim(params.term);
if(term===''){
return null;
}
return {
id: term,
text: term
};};
Tags.prototype.insertTag=function (_, data, tag){
data.unshift(tag);
};
Tags.prototype._removeOldTags=function (_){
var tag=this._lastTag;
var $options=this.$element.find('option[data-select2-tag]');
$options.each(function (){
if(this.selected){
return;
}
$(this).remove();
});
};
return Tags;
});
S2.define('select2/data/tokenizer',[
'jquery'
], function ($){
function Tokenizer (decorated, $element, options){
var tokenizer=options.get('tokenizer');
if(tokenizer!==undefined){
this.tokenizer=tokenizer;
}
decorated.call(this, $element, options);
}
Tokenizer.prototype.bind=function (decorated, container, $container){
decorated.call(this, container, $container);
this.$search=container.dropdown.$search||container.selection.$search ||
$container.find('.select2-search__field');
};
Tokenizer.prototype.query=function (decorated, params, callback){
var self=this;
function createAndSelect (data){
var item=self._normalizeItem(data);
var $existingOptions=self.$element.find('option').filter(function (){
return $(this).val()===item.id;
});
if(!$existingOptions.length){
var $option=self.option(item);
$option.attr('data-select2-tag', true);
self._removeOldTags();
self.addOptions([$option]);
}
select(item);
}
function select (data){
self.trigger('select', {
data: data
});
}
params.term=params.term||'';
var tokenData=this.tokenizer(params, this.options, createAndSelect);
if(tokenData.term!==params.term){
if(this.$search.length){
this.$search.val(tokenData.term);
this.$search.focus();
}
params.term=tokenData.term;
}
decorated.call(this, params, callback);
};
Tokenizer.prototype.tokenizer=function (_, params, options, callback){
var separators=options.get('tokenSeparators')||[];
var term=params.term;
var i=0;
var createTag=this.createTag||function (params){
return {
id: params.term,
text: params.term
};};
while (i < term.length){
var termChar=term[i];
if($.inArray(termChar, separators)===-1){
i++;
continue;
}
var part=term.substr(0, i);
var partParams=$.extend({}, params, {
term: part
});
var data=createTag(partParams);
if(data==null){
i++;
continue;
}
callback(data);
term=term.substr(i + 1)||'';
i=0;
}
return {
term: term
};};
return Tokenizer;
});
S2.define('select2/data/minimumInputLength',[
], function (){
function MinimumInputLength (decorated, $e, options){
this.minimumInputLength=options.get('minimumInputLength');
decorated.call(this, $e, options);
}
MinimumInputLength.prototype.query=function (decorated, params, callback){
params.term=params.term||'';
if(params.term.length < this.minimumInputLength){
this.trigger('results:message', {
message: 'inputTooShort',
args: {
minimum: this.minimumInputLength,
input: params.term,
params: params
}});
return;
}
decorated.call(this, params, callback);
};
return MinimumInputLength;
});
S2.define('select2/data/maximumInputLength',[
], function (){
function MaximumInputLength (decorated, $e, options){
this.maximumInputLength=options.get('maximumInputLength');
decorated.call(this, $e, options);
}
MaximumInputLength.prototype.query=function (decorated, params, callback){
params.term=params.term||'';
if(this.maximumInputLength > 0 &&
params.term.length > this.maximumInputLength){
this.trigger('results:message', {
message: 'inputTooLong',
args: {
maximum: this.maximumInputLength,
input: params.term,
params: params
}});
return;
}
decorated.call(this, params, callback);
};
return MaximumInputLength;
});
S2.define('select2/data/maximumSelectionLength',[
], function (){
function MaximumSelectionLength (decorated, $e, options){
this.maximumSelectionLength=options.get('maximumSelectionLength');
decorated.call(this, $e, options);
}
MaximumSelectionLength.prototype.query =
function (decorated, params, callback){
var self=this;
this.current(function (currentData){
var count=currentData!=null ? currentData.length:0;
if(self.maximumSelectionLength > 0 &&
count >=self.maximumSelectionLength){
self.trigger('results:message', {
message: 'maximumSelected',
args: {
maximum: self.maximumSelectionLength
}});
return;
}
decorated.call(self, params, callback);
});
};
return MaximumSelectionLength;
});
S2.define('select2/dropdown',[
'jquery',
'./utils'
], function ($, Utils){
function Dropdown ($element, options){
this.$element=$element;
this.options=options;
Dropdown.__super__.constructor.call(this);
}
Utils.Extend(Dropdown, Utils.Observable);
Dropdown.prototype.render=function (){
var $dropdown=$(
'<span class="select2-dropdown">' +
'<span class="select2-results"></span>' +
'</span>'
);
$dropdown.attr('dir', this.options.get('dir'));
this.$dropdown=$dropdown;
return $dropdown;
};
Dropdown.prototype.bind=function (){
};
Dropdown.prototype.position=function ($dropdown, $container){
};
Dropdown.prototype.destroy=function (){
this.$dropdown.remove();
};
return Dropdown;
});
S2.define('select2/dropdown/search',[
'jquery',
'../utils'
], function ($, Utils){
function Search (){ }
Search.prototype.render=function (decorated){
var $rendered=decorated.call(this);
var $search=$(
'<span class="select2-search select2-search--dropdown">' +
'<input class="select2-search__field" type="search" tabindex="-1"' +
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
' spellcheck="false" role="textbox" />' +
'</span>'
);
this.$searchContainer=$search;
this.$search=$search.find('input');
$rendered.prepend($search);
return $rendered;
};
Search.prototype.bind=function (decorated, container, $container){
var self=this;
decorated.call(this, container, $container);
this.$search.on('keydown', function (evt){
self.trigger('keypress', evt);
self._keyUpPrevented=evt.isDefaultPrevented();
});
this.$search.on('input', function (evt){
$(this).off('keyup');
});
this.$search.on('keyup input', function (evt){
self.handleSearch(evt);
});
container.on('open', function (){
self.$search.attr('tabindex', 0);
self.$search.focus();
window.setTimeout(function (){
self.$search.focus();
}, 0);
});
container.on('close', function (){
self.$search.attr('tabindex', -1);
self.$search.val('');
});
container.on('focus', function (){
if(!container.isOpen()){
self.$search.focus();
}});
container.on('results:all', function (params){
if(params.query.term==null||params.query.term===''){
var showSearch=self.showSearch(params);
if(showSearch){
self.$searchContainer.removeClass('select2-search--hide');
}else{
self.$searchContainer.addClass('select2-search--hide');
}}
});
};
Search.prototype.handleSearch=function (evt){
if(!this._keyUpPrevented){
var input=this.$search.val();
this.trigger('query', {
term: input
});
}
this._keyUpPrevented=false;
};
Search.prototype.showSearch=function (_, params){
return true;
};
return Search;
});
S2.define('select2/dropdown/hidePlaceholder',[
], function (){
function HidePlaceholder (decorated, $element, options, dataAdapter){
this.placeholder=this.normalizePlaceholder(options.get('placeholder'));
decorated.call(this, $element, options, dataAdapter);
}
HidePlaceholder.prototype.append=function (decorated, data){
data.results=this.removePlaceholder(data.results);
decorated.call(this, data);
};
HidePlaceholder.prototype.normalizePlaceholder=function (_, placeholder){
if(typeof placeholder==='string'){
placeholder={
id: '',
text: placeholder
};}
return placeholder;
};
HidePlaceholder.prototype.removePlaceholder=function (_, data){
var modifiedData=data.slice(0);
for (var d=data.length - 1; d >=0; d--){
var item=data[d];
if(this.placeholder.id===item.id){
modifiedData.splice(d, 1);
}}
return modifiedData;
};
return HidePlaceholder;
});
S2.define('select2/dropdown/infiniteScroll',[
'jquery'
], function ($){
function InfiniteScroll (decorated, $element, options, dataAdapter){
this.lastParams={};
decorated.call(this, $element, options, dataAdapter);
this.$loadingMore=this.createLoadingMore();
this.loading=false;
}
InfiniteScroll.prototype.append=function (decorated, data){
this.$loadingMore.remove();
this.loading=false;
decorated.call(this, data);
if(this.showLoadingMore(data)){
this.$results.append(this.$loadingMore);
}};
InfiniteScroll.prototype.bind=function (decorated, container, $container){
var self=this;
decorated.call(this, container, $container);
container.on('query', function (params){
self.lastParams=params;
self.loading=true;
});
container.on('query:append', function (params){
self.lastParams=params;
self.loading=true;
});
this.$results.on('scroll', function (){
var isLoadMoreVisible=$.contains(document.documentElement,
self.$loadingMore[0]
);
if(self.loading||!isLoadMoreVisible){
return;
}
var currentOffset=self.$results.offset().top +
self.$results.outerHeight(false);
var loadingMoreOffset=self.$loadingMore.offset().top +
self.$loadingMore.outerHeight(false);
if(currentOffset + 50 >=loadingMoreOffset){
self.loadMore();
}});
};
InfiniteScroll.prototype.loadMore=function (){
this.loading=true;
var params=$.extend({}, {page: 1}, this.lastParams);
params.page++;
this.trigger('query:append', params);
};
InfiniteScroll.prototype.showLoadingMore=function (_, data){
return data.pagination&&data.pagination.more;
};
InfiniteScroll.prototype.createLoadingMore=function (){
var $option=$(
'<li ' +
'class="select2-results__option select2-results__option--load-more"' +
'role="treeitem" aria-disabled="true"></li>'
);
var message=this.options.get('translations').get('loadingMore');
$option.html(message(this.lastParams));
return $option;
};
return InfiniteScroll;
});
S2.define('select2/dropdown/attachBody',[
'jquery',
'../utils'
], function ($, Utils){
function AttachBody (decorated, $element, options){
this.$dropdownParent=options.get('dropdownParent')||$(document.body);
decorated.call(this, $element, options);
}
AttachBody.prototype.bind=function (decorated, container, $container){
var self=this;
var setupResultsEvents=false;
decorated.call(this, container, $container);
container.on('open', function (){
self._showDropdown();
self._attachPositioningHandler(container);
if(!setupResultsEvents){
setupResultsEvents=true;
container.on('results:all', function (){
self._positionDropdown();
self._resizeDropdown();
});
container.on('results:append', function (){
self._positionDropdown();
self._resizeDropdown();
});
}});
container.on('close', function (){
self._hideDropdown();
self._detachPositioningHandler(container);
});
this.$dropdownContainer.on('mousedown', function (evt){
evt.stopPropagation();
});
};
AttachBody.prototype.destroy=function (decorated){
decorated.call(this);
this.$dropdownContainer.remove();
};
AttachBody.prototype.position=function (decorated, $dropdown, $container){
$dropdown.attr('class', $container.attr('class'));
$dropdown.removeClass('select2');
$dropdown.addClass('select2-container--open');
$dropdown.css({
position: 'absolute',
top: -999999
});
this.$container=$container;
};
AttachBody.prototype.render=function (decorated){
var $container=$('<span></span>');
var $dropdown=decorated.call(this);
$container.append($dropdown);
this.$dropdownContainer=$container;
return $container;
};
AttachBody.prototype._hideDropdown=function (decorated){
this.$dropdownContainer.detach();
};
AttachBody.prototype._attachPositioningHandler =
function (decorated, container){
var self=this;
var scrollEvent='scroll.select2.' + container.id;
var resizeEvent='resize.select2.' + container.id;
var orientationEvent='orientationchange.select2.' + container.id;
var $watchers=this.$container.parents().filter(Utils.hasScroll);
$watchers.each(function (){
$(this).data('select2-scroll-position', {
x: $(this).scrollLeft(),
y: $(this).scrollTop()
});
});
$watchers.on(scrollEvent, function (ev){
var position=$(this).data('select2-scroll-position');
$(this).scrollTop(position.y);
});
$(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent,
function (e){
self._positionDropdown();
self._resizeDropdown();
});
};
AttachBody.prototype._detachPositioningHandler =
function (decorated, container){
var scrollEvent='scroll.select2.' + container.id;
var resizeEvent='resize.select2.' + container.id;
var orientationEvent='orientationchange.select2.' + container.id;
var $watchers=this.$container.parents().filter(Utils.hasScroll);
$watchers.off(scrollEvent);
$(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent);
};
AttachBody.prototype._positionDropdown=function (){
var $window=$(window);
var isCurrentlyAbove=this.$dropdown.hasClass('select2-dropdown--above');
var isCurrentlyBelow=this.$dropdown.hasClass('select2-dropdown--below');
var newDirection=null;
var offset=this.$container.offset();
offset.bottom=offset.top + this.$container.outerHeight(false);
var container={
height: this.$container.outerHeight(false)
};
container.top=offset.top;
container.bottom=offset.top + container.height;
var dropdown={
height: this.$dropdown.outerHeight(false)
};
var viewport={
top: $window.scrollTop(),
bottom: $window.scrollTop() + $window.height()
};
var enoughRoomAbove=viewport.top < (offset.top - dropdown.height);
var enoughRoomBelow=viewport.bottom > (offset.bottom + dropdown.height);
var css={
left: offset.left,
top: container.bottom
};
var $offsetParent=this.$dropdownParent;
if($offsetParent.css('position')==='static'){
$offsetParent=$offsetParent.offsetParent();
}
var parentOffset=$offsetParent.offset();
css.top -=parentOffset.top;
css.left -=parentOffset.left;
if(!isCurrentlyAbove&&!isCurrentlyBelow){
newDirection='below';
}
if(!enoughRoomBelow&&enoughRoomAbove&&!isCurrentlyAbove){
newDirection='above';
}else if(!enoughRoomAbove&&enoughRoomBelow&&isCurrentlyAbove){
newDirection='below';
}
if(newDirection=='above' ||
(isCurrentlyAbove&&newDirection!=='below')){
css.top=container.top - parentOffset.top - dropdown.height;
}
if(newDirection!=null){
this.$dropdown
.removeClass('select2-dropdown--below select2-dropdown--above')
.addClass('select2-dropdown--' + newDirection);
this.$container
.removeClass('select2-container--below select2-container--above')
.addClass('select2-container--' + newDirection);
}
this.$dropdownContainer.css(css);
};
AttachBody.prototype._resizeDropdown=function (){
var css={
width: this.$container.outerWidth(false) + 'px'
};
if(this.options.get('dropdownAutoWidth')){
css.minWidth=css.width;
css.position='relative';
css.width='auto';
}
this.$dropdown.css(css);
};
AttachBody.prototype._showDropdown=function (decorated){
this.$dropdownContainer.appendTo(this.$dropdownParent);
this._positionDropdown();
this._resizeDropdown();
};
return AttachBody;
});
S2.define('select2/dropdown/minimumResultsForSearch',[
], function (){
function countResults (data){
var count=0;
for (var d=0; d < data.length; d++){
var item=data[d];
if(item.children){
count +=countResults(item.children);
}else{
count++;
}}
return count;
}
function MinimumResultsForSearch (decorated, $element, options, dataAdapter){
this.minimumResultsForSearch=options.get('minimumResultsForSearch');
if(this.minimumResultsForSearch < 0){
this.minimumResultsForSearch=Infinity;
}
decorated.call(this, $element, options, dataAdapter);
}
MinimumResultsForSearch.prototype.showSearch=function (decorated, params){
if(countResults(params.data.results) < this.minimumResultsForSearch){
return false;
}
return decorated.call(this, params);
};
return MinimumResultsForSearch;
});
S2.define('select2/dropdown/selectOnClose',[
], function (){
function SelectOnClose (){ }
SelectOnClose.prototype.bind=function (decorated, container, $container){
var self=this;
decorated.call(this, container, $container);
container.on('close', function (params){
self._handleSelectOnClose(params);
});
};
SelectOnClose.prototype._handleSelectOnClose=function (_, params){
if(params&&params.originalSelect2Event!=null){
var event=params.originalSelect2Event;
if(event._type==='select'||event._type==='unselect'){
return;
}}
var $highlightedResults=this.getHighlightedResults();
if($highlightedResults.length < 1){
return;
}
var data=$highlightedResults.data('data');
if((data.element!=null&&data.element.selected) ||
(data.element==null&&data.selected)
){
return;
}
this.trigger('select', {
data: data
});
};
return SelectOnClose;
});
S2.define('select2/dropdown/closeOnSelect',[
], function (){
function CloseOnSelect (){ }
CloseOnSelect.prototype.bind=function (decorated, container, $container){
var self=this;
decorated.call(this, container, $container);
container.on('select', function (evt){
self._selectTriggered(evt);
});
container.on('unselect', function (evt){
self._selectTriggered(evt);
});
};
CloseOnSelect.prototype._selectTriggered=function (_, evt){
var originalEvent=evt.originalEvent;
if(originalEvent&&originalEvent.ctrlKey){
return;
}
this.trigger('close', {
originalEvent: originalEvent,
originalSelect2Event: evt
});
};
return CloseOnSelect;
});
S2.define('select2/i18n/en',[],function (){
return {
errorLoading: function (){
return 'The results could not be loaded.';
},
inputTooLong: function (args){
var overChars=args.input.length - args.maximum;
var message='Please delete ' + overChars + ' character';
if(overChars!=1){
message +='s';
}
return message;
},
inputTooShort: function (args){
var remainingChars=args.minimum - args.input.length;
var message='Please enter ' + remainingChars + ' or more characters';
return message;
},
loadingMore: function (){
return 'Loading more results…';
},
maximumSelected: function (args){
var message='You can only select ' + args.maximum + ' item';
if(args.maximum!=1){
message +='s';
}
return message;
},
noResults: function (){
return 'No results found';
},
searching: function (){
return 'Searching…';
}};});
S2.define('select2/defaults',[
'jquery',
'require',
'./results',
'./selection/single',
'./selection/multiple',
'./selection/placeholder',
'./selection/allowClear',
'./selection/search',
'./selection/eventRelay',
'./utils',
'./translation',
'./diacritics',
'./data/select',
'./data/array',
'./data/ajax',
'./data/tags',
'./data/tokenizer',
'./data/minimumInputLength',
'./data/maximumInputLength',
'./data/maximumSelectionLength',
'./dropdown',
'./dropdown/search',
'./dropdown/hidePlaceholder',
'./dropdown/infiniteScroll',
'./dropdown/attachBody',
'./dropdown/minimumResultsForSearch',
'./dropdown/selectOnClose',
'./dropdown/closeOnSelect',
'./i18n/en'
], function ($, require,
ResultsList,
SingleSelection, MultipleSelection, Placeholder, AllowClear,
SelectionSearch, EventRelay,
Utils, Translation, DIACRITICS,
SelectData, ArrayData, AjaxData, Tags, Tokenizer,
MinimumInputLength, MaximumInputLength, MaximumSelectionLength,
Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll,
AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect,
EnglishTranslation){
function Defaults (){
this.reset();
}
Defaults.prototype.apply=function (options){
options=$.extend(true, {}, this.defaults, options);
if(options.dataAdapter==null){
if(options.ajax!=null){
options.dataAdapter=AjaxData;
}else if(options.data!=null){
options.dataAdapter=ArrayData;
}else{
options.dataAdapter=SelectData;
}
if(options.minimumInputLength > 0){
options.dataAdapter=Utils.Decorate(options.dataAdapter,
MinimumInputLength
);
}
if(options.maximumInputLength > 0){
options.dataAdapter=Utils.Decorate(options.dataAdapter,
MaximumInputLength
);
}
if(options.maximumSelectionLength > 0){
options.dataAdapter=Utils.Decorate(options.dataAdapter,
MaximumSelectionLength
);
}
if(options.tags){
options.dataAdapter=Utils.Decorate(options.dataAdapter, Tags);
}
if(options.tokenSeparators!=null||options.tokenizer!=null){
options.dataAdapter=Utils.Decorate(options.dataAdapter,
Tokenizer
);
}
if(options.query!=null){
var Query=require(options.amdBase + 'compat/query');
options.dataAdapter=Utils.Decorate(options.dataAdapter,
Query
);
}
if(options.initSelection!=null){
var InitSelection=require(options.amdBase + 'compat/initSelection');
options.dataAdapter=Utils.Decorate(options.dataAdapter,
InitSelection
);
}}
if(options.resultsAdapter==null){
options.resultsAdapter=ResultsList;
if(options.ajax!=null){
options.resultsAdapter=Utils.Decorate(options.resultsAdapter,
InfiniteScroll
);
}
if(options.placeholder!=null){
options.resultsAdapter=Utils.Decorate(options.resultsAdapter,
HidePlaceholder
);
}
if(options.selectOnClose){
options.resultsAdapter=Utils.Decorate(options.resultsAdapter,
SelectOnClose
);
}}
if(options.dropdownAdapter==null){
if(options.multiple){
options.dropdownAdapter=Dropdown;
}else{
var SearchableDropdown=Utils.Decorate(Dropdown, DropdownSearch);
options.dropdownAdapter=SearchableDropdown;
}
if(options.minimumResultsForSearch!==0){
options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,
MinimumResultsForSearch
);
}
if(options.closeOnSelect){
options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,
CloseOnSelect
);
}
if(options.dropdownCssClass!=null ||
options.dropdownCss!=null ||
options.adaptDropdownCssClass!=null
){
var DropdownCSS=require(options.amdBase + 'compat/dropdownCss');
options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,
DropdownCSS
);
}
options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,
AttachBody
);
}
if(options.selectionAdapter==null){
if(options.multiple){
options.selectionAdapter=MultipleSelection;
}else{
options.selectionAdapter=SingleSelection;
}
if(options.placeholder!=null){
options.selectionAdapter=Utils.Decorate(options.selectionAdapter,
Placeholder
);
}
if(options.allowClear){
options.selectionAdapter=Utils.Decorate(options.selectionAdapter,
AllowClear
);
}
if(options.multiple){
options.selectionAdapter=Utils.Decorate(options.selectionAdapter,
SelectionSearch
);
}
if(options.containerCssClass!=null ||
options.containerCss!=null ||
options.adaptContainerCssClass!=null
){
var ContainerCSS=require(options.amdBase + 'compat/containerCss');
options.selectionAdapter=Utils.Decorate(options.selectionAdapter,
ContainerCSS
);
}
options.selectionAdapter=Utils.Decorate(options.selectionAdapter,
EventRelay
);
}
if(typeof options.language==='string'){
if(options.language.indexOf('-') > 0){
var languageParts=options.language.split('-');
var baseLanguage=languageParts[0];
options.language=[options.language, baseLanguage];
}else{
options.language=[options.language];
}}
if($.isArray(options.language)){
var languages=new Translation();
options.language.push('en');
var languageNames=options.language;
for (var l=0; l < languageNames.length; l++){
var name=languageNames[l];
var language={};
try {
language=Translation.loadPath(name);
} catch (e){
try {
name=this.defaults.amdLanguageBase + name;
language=Translation.loadPath(name);
} catch (ex){
if(options.debug&&window.console&&console.warn){
console.warn('Select2: The language file for "' + name + '" could not be ' +
'automatically loaded. A fallback will be used instead.'
);
}
continue;
}}
languages.extend(language);
}
options.translations=languages;
}else{
var baseTranslation=Translation.loadPath(this.defaults.amdLanguageBase + 'en'
);
var customTranslation=new Translation(options.language);
customTranslation.extend(baseTranslation);
options.translations=customTranslation;
}
return options;
};
Defaults.prototype.reset=function (){
function stripDiacritics (text){
function match(a){
return DIACRITICS[a]||a;
}
return text.replace(/[^\u0000-\u007E]/g, match);
}
function matcher (params, data){
if($.trim(params.term)===''){
return data;
}
if(data.children&&data.children.length > 0){
var match=$.extend(true, {}, data);
for (var c=data.children.length - 1; c >=0; c--){
var child=data.children[c];
var matches=matcher(params, child);
if(matches==null){
match.children.splice(c, 1);
}}
if(match.children.length > 0){
return match;
}
return matcher(params, match);
}
var original=stripDiacritics(data.text).toUpperCase();
var term=stripDiacritics(params.term).toUpperCase();
if(original.indexOf(term) > -1){
return data;
}
return null;
}
this.defaults={
amdBase: './',
amdLanguageBase: './i18n/',
closeOnSelect: true,
debug: false,
dropdownAutoWidth: false,
escapeMarkup: Utils.escapeMarkup,
language: EnglishTranslation,
matcher: matcher,
minimumInputLength: 0,
maximumInputLength: 0,
maximumSelectionLength: 0,
minimumResultsForSearch: 0,
selectOnClose: false,
sorter: function (data){
return data;
},
templateResult: function (result){
return result.text;
},
templateSelection: function (selection){
return selection.text;
},
theme: 'default',
width: 'resolve'
};};
Defaults.prototype.set=function (key, value){
var camelKey=$.camelCase(key);
var data={};
data[camelKey]=value;
var convertedData=Utils._convertData(data);
$.extend(this.defaults, convertedData);
};
var defaults=new Defaults();
return defaults;
});
S2.define('select2/options',[
'require',
'jquery',
'./defaults',
'./utils'
], function (require, $, Defaults, Utils){
function Options (options, $element){
this.options=options;
if($element!=null){
this.fromElement($element);
}
this.options=Defaults.apply(this.options);
if($element&&$element.is('input')){
var InputCompat=require(this.get('amdBase') + 'compat/inputData');
this.options.dataAdapter=Utils.Decorate(this.options.dataAdapter,
InputCompat
);
}}
Options.prototype.fromElement=function ($e){
var excludedData=['select2'];
if(this.options.multiple==null){
this.options.multiple=$e.prop('multiple');
}
if(this.options.disabled==null){
this.options.disabled=$e.prop('disabled');
}
if(this.options.language==null){
if($e.prop('lang')){
this.options.language=$e.prop('lang').toLowerCase();
}else if($e.closest('[lang]').prop('lang')){
this.options.language=$e.closest('[lang]').prop('lang');
}}
if(this.options.dir==null){
if($e.prop('dir')){
this.options.dir=$e.prop('dir');
}else if($e.closest('[dir]').prop('dir')){
this.options.dir=$e.closest('[dir]').prop('dir');
}else{
this.options.dir='ltr';
}}
$e.prop('disabled', this.options.disabled);
$e.prop('multiple', this.options.multiple);
if($e.data('select2Tags')){
if(this.options.debug&&window.console&&console.warn){
console.warn('Select2: The `data-select2-tags` attribute has been changed to ' +
'use the `data-data` and `data-tags="true"` attributes and will be ' +
'removed in future versions of Select2.'
);
}
$e.data('data', $e.data('select2Tags'));
$e.data('tags', true);
}
if($e.data('ajaxUrl')){
if(this.options.debug&&window.console&&console.warn){
console.warn('Select2: The `data-ajax-url` attribute has been changed to ' +
'`data-ajax--url` and support for the old attribute will be removed' +
' in future versions of Select2.'
);
}
$e.attr('ajax--url', $e.data('ajaxUrl'));
$e.data('ajax--url', $e.data('ajaxUrl'));
}
var dataset={};
if($.fn.jquery&&$.fn.jquery.substr(0, 2)=='1.'&&$e[0].dataset){
dataset=$.extend(true, {}, $e[0].dataset, $e.data());
}else{
dataset=$e.data();
}
var data=$.extend(true, {}, dataset);
data=Utils._convertData(data);
for (var key in data){
if($.inArray(key, excludedData) > -1){
continue;
}
if($.isPlainObject(this.options[key])){
$.extend(this.options[key], data[key]);
}else{
this.options[key]=data[key];
}}
return this;
};
Options.prototype.get=function (key){
return this.options[key];
};
Options.prototype.set=function (key, val){
this.options[key]=val;
};
return Options;
});
S2.define('select2/core',[
'jquery',
'./options',
'./utils',
'./keys'
], function ($, Options, Utils, KEYS){
var Select2=function ($element, options){
if($element.data('select2')!=null){
$element.data('select2').destroy();
}
this.$element=$element;
this.id=this._generateId($element);
options=options||{};
this.options=new Options(options, $element);
Select2.__super__.constructor.call(this);
var tabindex=$element.attr('tabindex')||0;
$element.data('old-tabindex', tabindex);
$element.attr('tabindex', '-1');
var DataAdapter=this.options.get('dataAdapter');
this.dataAdapter=new DataAdapter($element, this.options);
var $container=this.render();
this._placeContainer($container);
var SelectionAdapter=this.options.get('selectionAdapter');
this.selection=new SelectionAdapter($element, this.options);
this.$selection=this.selection.render();
this.selection.position(this.$selection, $container);
var DropdownAdapter=this.options.get('dropdownAdapter');
this.dropdown=new DropdownAdapter($element, this.options);
this.$dropdown=this.dropdown.render();
this.dropdown.position(this.$dropdown, $container);
var ResultsAdapter=this.options.get('resultsAdapter');
this.results=new ResultsAdapter($element, this.options, this.dataAdapter);
this.$results=this.results.render();
this.results.position(this.$results, this.$dropdown);
var self=this;
this._bindAdapters();
this._registerDomEvents();
this._registerDataEvents();
this._registerSelectionEvents();
this._registerDropdownEvents();
this._registerResultsEvents();
this._registerEvents();
this.dataAdapter.current(function (initialData){
self.trigger('selection:update', {
data: initialData
});
});
$element.addClass('select2-hidden-accessible');
$element.attr('aria-hidden', 'true');
this._syncAttributes();
$element.data('select2', this);
};
Utils.Extend(Select2, Utils.Observable);
Select2.prototype._generateId=function ($element){
var id='';
if($element.attr('id')!=null){
id=$element.attr('id');
}else if($element.attr('name')!=null){
id=$element.attr('name') + '-' + Utils.generateChars(2);
}else{
id=Utils.generateChars(4);
}
id=id.replace(/(:|\.|\[|\]|,)/g, '');
id='select2-' + id;
return id;
};
Select2.prototype._placeContainer=function ($container){
$container.insertAfter(this.$element);
var width=this._resolveWidth(this.$element, this.options.get('width'));
if(width!=null){
$container.css('width', width);
}};
Select2.prototype._resolveWidth=function ($element, method){
var WIDTH=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;
if(method=='resolve'){
var styleWidth=this._resolveWidth($element, 'style');
if(styleWidth!=null){
return styleWidth;
}
return this._resolveWidth($element, 'element');
}
if(method=='element'){
var elementWidth=$element.outerWidth(false);
if(elementWidth <=0){
return 'auto';
}
return elementWidth + 'px';
}
if(method=='style'){
var style=$element.attr('style');
if(typeof(style)!=='string'){
return null;
}
var attrs=style.split(';');
for (var i=0, l=attrs.length; i < l; i=i + 1){
var attr=attrs[i].replace(/\s/g, '');
var matches=attr.match(WIDTH);
if(matches!==null&&matches.length >=1){
return matches[1];
}}
return null;
}
return method;
};
Select2.prototype._bindAdapters=function (){
this.dataAdapter.bind(this, this.$container);
this.selection.bind(this, this.$container);
this.dropdown.bind(this, this.$container);
this.results.bind(this, this.$container);
};
Select2.prototype._registerDomEvents=function (){
var self=this;
this.$element.on('change.select2', function (){
self.dataAdapter.current(function (data){
self.trigger('selection:update', {
data: data
});
});
});
this.$element.on('focus.select2', function (evt){
self.trigger('focus', evt);
});
this._syncA=Utils.bind(this._syncAttributes, this);
this._syncS=Utils.bind(this._syncSubtree, this);
if(this.$element[0].attachEvent){
this.$element[0].attachEvent('onpropertychange', this._syncA);
}
var observer=window.MutationObserver ||
window.WebKitMutationObserver ||
window.MozMutationObserver
;
if(observer!=null){
this._observer=new observer(function (mutations){
$.each(mutations, self._syncA);
$.each(mutations, self._syncS);
});
this._observer.observe(this.$element[0], {
attributes: true,
childList: true,
subtree: false
});
}else if(this.$element[0].addEventListener){
this.$element[0].addEventListener('DOMAttrModified',
self._syncA,
false
);
this.$element[0].addEventListener('DOMNodeInserted',
self._syncS,
false
);
this.$element[0].addEventListener('DOMNodeRemoved',
self._syncS,
false
);
}};
Select2.prototype._registerDataEvents=function (){
var self=this;
this.dataAdapter.on('*', function (name, params){
self.trigger(name, params);
});
};
Select2.prototype._registerSelectionEvents=function (){
var self=this;
var nonRelayEvents=['toggle', 'focus'];
this.selection.on('toggle', function (){
self.toggleDropdown();
});
this.selection.on('focus', function (params){
self.focus(params);
});
this.selection.on('*', function (name, params){
if($.inArray(name, nonRelayEvents)!==-1){
return;
}
self.trigger(name, params);
});
};
Select2.prototype._registerDropdownEvents=function (){
var self=this;
this.dropdown.on('*', function (name, params){
self.trigger(name, params);
});
};
Select2.prototype._registerResultsEvents=function (){
var self=this;
this.results.on('*', function (name, params){
self.trigger(name, params);
});
};
Select2.prototype._registerEvents=function (){
var self=this;
this.on('open', function (){
self.$container.addClass('select2-container--open');
});
this.on('close', function (){
self.$container.removeClass('select2-container--open');
});
this.on('enable', function (){
self.$container.removeClass('select2-container--disabled');
});
this.on('disable', function (){
self.$container.addClass('select2-container--disabled');
});
this.on('blur', function (){
self.$container.removeClass('select2-container--focus');
});
this.on('query', function (params){
if(!self.isOpen()){
self.trigger('open', {});
}
this.dataAdapter.query(params, function (data){
self.trigger('results:all', {
data: data,
query: params
});
});
});
this.on('query:append', function (params){
this.dataAdapter.query(params, function (data){
self.trigger('results:append', {
data: data,
query: params
});
});
});
this.on('keypress', function (evt){
var key=evt.which;
if(self.isOpen()){
if(key===KEYS.ESC||key===KEYS.TAB ||
(key===KEYS.UP&&evt.altKey)){
self.close();
evt.preventDefault();
}else if(key===KEYS.ENTER){
self.trigger('results:select', {});
evt.preventDefault();
}else if((key===KEYS.SPACE&&evt.ctrlKey)){
self.trigger('results:toggle', {});
evt.preventDefault();
}else if(key===KEYS.UP){
self.trigger('results:previous', {});
evt.preventDefault();
}else if(key===KEYS.DOWN){
self.trigger('results:next', {});
evt.preventDefault();
}}else{
if(key===KEYS.ENTER||key===KEYS.SPACE ||
(key===KEYS.DOWN&&evt.altKey)){
self.open();
evt.preventDefault();
}}
});
};
Select2.prototype._syncAttributes=function (){
this.options.set('disabled', this.$element.prop('disabled'));
if(this.options.get('disabled')){
if(this.isOpen()){
this.close();
}
this.trigger('disable', {});
}else{
this.trigger('enable', {});
}};
Select2.prototype._syncSubtree=function (evt, mutations){
var changed=false;
var self=this;
if(evt&&evt.target&&(
evt.target.nodeName!=='OPTION'&&evt.target.nodeName!=='OPTGROUP'
)
){
return;
}
if(!mutations){
changed=true;
}else if(mutations.addedNodes&&mutations.addedNodes.length > 0){
for (var n=0; n < mutations.addedNodes.length; n++){
var node=mutations.addedNodes[n];
if(node.selected){
changed=true;
}}
}else if(mutations.removedNodes&&mutations.removedNodes.length > 0){
changed=true;
}
if(changed){
this.dataAdapter.current(function (currentData){
self.trigger('selection:update', {
data: currentData
});
});
}};
Select2.prototype.trigger=function (name, args){
var actualTrigger=Select2.__super__.trigger;
var preTriggerMap={
'open': 'opening',
'close': 'closing',
'select': 'selecting',
'unselect': 'unselecting'
};
if(args===undefined){
args={};}
if(name in preTriggerMap){
var preTriggerName=preTriggerMap[name];
var preTriggerArgs={
prevented: false,
name: name,
args: args
};
actualTrigger.call(this, preTriggerName, preTriggerArgs);
if(preTriggerArgs.prevented){
args.prevented=true;
return;
}}
actualTrigger.call(this, name, args);
};
Select2.prototype.toggleDropdown=function (){
if(this.options.get('disabled')){
return;
}
if(this.isOpen()){
this.close();
}else{
this.open();
}};
Select2.prototype.open=function (){
if(this.isOpen()){
return;
}
this.trigger('query', {});
};
Select2.prototype.close=function (){
if(!this.isOpen()){
return;
}
this.trigger('close', {});
};
Select2.prototype.isOpen=function (){
return this.$container.hasClass('select2-container--open');
};
Select2.prototype.hasFocus=function (){
return this.$container.hasClass('select2-container--focus');
};
Select2.prototype.focus=function (data){
if(this.hasFocus()){
return;
}
this.$container.addClass('select2-container--focus');
this.trigger('focus', {});
};
Select2.prototype.enable=function (args){
if(this.options.get('debug')&&window.console&&console.warn){
console.warn('Select2: The `select2("enable")` method has been deprecated and will' +
' be removed in later Select2 versions. Use $element.prop("disabled")' +
' instead.'
);
}
if(args==null||args.length===0){
args=[true];
}
var disabled = !args[0];
this.$element.prop('disabled', disabled);
};
Select2.prototype.data=function (){
if(this.options.get('debug') &&
arguments.length > 0&&window.console&&console.warn){
console.warn('Select2: Data can no longer be set using `select2("data")`. You ' +
'should consider setting the value instead using `$element.val()`.'
);
}
var data=[];
this.dataAdapter.current(function (currentData){
data=currentData;
});
return data;
};
Select2.prototype.val=function (args){
if(this.options.get('debug')&&window.console&&console.warn){
console.warn('Select2: The `select2("val")` method has been deprecated and will be' +
' removed in later Select2 versions. Use $element.val() instead.'
);
}
if(args==null||args.length===0){
return this.$element.val();
}
var newVal=args[0];
if($.isArray(newVal)){
newVal=$.map(newVal, function (obj){
return obj.toString();
});
}
this.$element.val(newVal).trigger('change');
};
Select2.prototype.destroy=function (){
this.$container.remove();
if(this.$element[0].detachEvent){
this.$element[0].detachEvent('onpropertychange', this._syncA);
}
if(this._observer!=null){
this._observer.disconnect();
this._observer=null;
}else if(this.$element[0].removeEventListener){
this.$element[0]
.removeEventListener('DOMAttrModified', this._syncA, false);
this.$element[0]
.removeEventListener('DOMNodeInserted', this._syncS, false);
this.$element[0]
.removeEventListener('DOMNodeRemoved', this._syncS, false);
}
this._syncA=null;
this._syncS=null;
this.$element.off('.select2');
this.$element.attr('tabindex', this.$element.data('old-tabindex'));
this.$element.removeClass('select2-hidden-accessible');
this.$element.attr('aria-hidden', 'false');
this.$element.removeData('select2');
this.dataAdapter.destroy();
this.selection.destroy();
this.dropdown.destroy();
this.results.destroy();
this.dataAdapter=null;
this.selection=null;
this.dropdown=null;
this.results=null;
};
Select2.prototype.render=function (){
var $container=$(
'<span class="select2 select2-container">' +
'<span class="selection"></span>' +
'<span class="dropdown-wrapper" aria-hidden="true"></span>' +
'</span>'
);
$container.attr('dir', this.options.get('dir'));
this.$container=$container;
this.$container.addClass('select2-container--' + this.options.get('theme'));
$container.data('element', this.$element);
return $container;
};
return Select2;
});
S2.define('jquery-mousewheel',[
'jquery'
], function ($){
return $;
});
S2.define('jquery.select2',[
'jquery',
'jquery-mousewheel',
'./select2/core',
'./select2/defaults'
], function ($, _, Select2, Defaults){
if($.fn.select2==null){
var thisMethods=['open', 'close', 'destroy'];
$.fn.select2=function (options){
options=options||{};
if(typeof options==='object'){
this.each(function (){
var instanceOptions=$.extend(true, {}, options);
var instance=new Select2($(this), instanceOptions);
});
return this;
}else if(typeof options==='string'){
var ret;
var args=Array.prototype.slice.call(arguments, 1);
this.each(function (){
var instance=$(this).data('select2');
if(instance==null&&window.console&&console.error){
console.error('The select2(\'' + options + '\') method was called on an ' +
'element that is not using Select2.'
);
}
ret=instance[options].apply(instance, args);
});
if($.inArray(options, thisMethods) > -1){
return this;
}
return ret;
}else{
throw new Error('Invalid arguments for Select2: ' + options);
}};}
if($.fn.select2.defaults==null){
$.fn.select2.defaults=Defaults;
}
return Select2;
});
return {
define: S2.define,
require: S2.require
};}());
var select2=S2.require('jquery.select2');
jQuery.fn.select2.amd=S2;
return select2;
}));
;(function($, window, undefined){
var init_target_rule_select2=function(selector){
$(selector).astselect2({
placeholder: astRules.search,
ajax: {
url: ajaxurl,
dataType: 'json',
method: 'post',
delay: 250,
data: function (params){
return {
q: params.term,
page: params.page,
action: 'zhf_get_posts_by_query',
nonce: astRules.ajax_nonce
};},
processResults: function (data){
return {
results: data
};},
cache: true
},
minimumInputLength: 2,
language: astRules.ast_lang
});
};
var update_target_rule_input=function(wrapper){
var rule_input=wrapper.find('.ast-target_rule-input');
var old_value=rule_input.val();
var new_value=[];
wrapper.find('.zozo-target-rule-condition').each(function(i){
var $this=$(this);
var temp_obj={};
var rule_condition=$this.find('select.target_rule-condition');
var specific_page=$this.find('select.target_rule-specific-page');
var rule_condition_val=rule_condition.val();
var specific_page_val=specific_page.val();
if(''!=rule_condition_val){
temp_obj={
type:rule_condition_val,
specific: specific_page_val
}
new_value.push(temp_obj);
};})
var rules_string=JSON.stringify(new_value);
rule_input.val(rules_string);
};
var update_close_button=function(wrapper){
type=wrapper.closest('.ast-target-rule-wrapper').attr('data-type');
rules=wrapper.find('.zozo-target-rule-condition');
show_close=false;
if('display'==type){
if(rules.length > 1){
show_close=true;
}}else{
show_close=true;
}
rules.each(function(){
if(show_close){
jQuery(this).find('.target_rule-condition-delete').removeClass('ast-hidden');
}else{
jQuery(this).find('.target_rule-condition-delete').addClass('ast-hidden');
}});
};
var update_exclusion_button=function(force_show, force_hide){
var display_on=$('.ast-target-rule-display-on-wrap');
var exclude_on=$('.ast-target-rule-exclude-on-wrap');
var exclude_field_wrap=exclude_on.closest('tr');
var add_exclude_block=display_on.find('.target_rule-add-exclusion-rule');
var exclude_conditions=exclude_on.find('.zozo-target-rule-condition');
if(true==force_hide){
exclude_field_wrap.addClass('ast-hidden');
add_exclude_block.removeClass('ast-hidden');
}else if(true==force_show){
exclude_field_wrap.removeClass('ast-hidden');
add_exclude_block.addClass('ast-hidden');
}else{
if(1==exclude_conditions.length&&''==$(exclude_conditions[0]).find('select.target_rule-condition').val()){
exclude_field_wrap.addClass('ast-hidden');
add_exclude_block.removeClass('ast-hidden');
}else{
exclude_field_wrap.removeClass('ast-hidden');
add_exclude_block.addClass('ast-hidden');
}}
};
var zozo_hide_shortcode_field=function(){
var selected=$('#zhf_template_type').val()||'none';
$('.zhf-options-table').removeClass().addClass('zhf-options-table widefat zhf-selected-template-type-' + selected);
}
$(document).ready(function($){
var $document=$(document);
$document.on('change', '#zhf_template_type', function(e){
zozo_hide_shortcode_field();
});
zozo_hide_shortcode_field();
jQuery('.zozo-target-rule-condition').each(function(){
var $this=$(this),
condition=$this.find('select.target_rule-condition'),
condition_val=condition.val(),
specific_page=$this.next('.target_rule-specific-page-wrap');
if('specifics'==condition_val){
specific_page.slideDown(300);
}});
jQuery('select.target-rule-select2').each(function(index, el){
init_target_rule_select2(el);
});
jQuery('.ast-target-rule-selector-wrapper').each(function(){
update_close_button(jQuery(this));
})
update_exclusion_button();
jQuery(document).on('change', '.zozo-target-rule-condition select.target_rule-condition' , function(e){
var $this=jQuery(this),
this_val=$this.val(),
field_wrap=$this.closest('.ast-target-rule-wrapper');
if('specifics'==this_val){
$this.closest('.zozo-target-rule-condition').next('.target_rule-specific-page-wrap').slideDown(300);
}else{
$this.closest('.zozo-target-rule-condition').next('.target_rule-specific-page-wrap').slideUp(300);
}
update_target_rule_input(field_wrap);
});
jQuery('.ast-target-rule-selector-wrapper').on('change', '.target-rule-select2', function(e){
var $this=jQuery(this),
field_wrap=$this.closest('.ast-target-rule-wrapper');
update_target_rule_input(field_wrap);
});
jQuery('.ast-target-rule-selector-wrapper').on('click', '.target_rule-add-rule-wrap a', function(e){
console.log("test");
e.preventDefault();
e.stopPropagation();
var $this=jQuery(this),
id=$this.attr('data-rule-id'),
new_id=parseInt(id) + 1,
type=$this.attr('data-rule-type'),
rule_wrap=$this.closest('.ast-target-rule-selector-wrapper').find('.target_rule-builder-wrap'),
template=wp.template('zozo-target-rule-' + type + '-condition'),
field_wrap=$this.closest('.ast-target-rule-wrapper');
rule_wrap.append(template( { id:new_id, type:type }) );
init_target_rule_select2('.ast-target-rule-'+type+'-on .target-rule-select2');
$this.attr('data-rule-id', new_id);
update_close_button(field_wrap);
});
jQuery('.ast-target-rule-selector-wrapper').on('click', '.target_rule-condition-delete', function(e){
var $this=jQuery(this),
rule_condition=$this.closest('.zozo-target-rule-condition'),
field_wrap=$this.closest('.ast-target-rule-wrapper');
cnt=0,
data_type=field_wrap.attr('data-type'),
optionVal=$this.siblings('.target_rule-condition-wrap').children('.target_rule-condition').val();
if('exclude'==data_type){
if(1===field_wrap.find('.target_rule-condition').length){
field_wrap.find('.target_rule-condition').val('');
field_wrap.find('.target_rule-specific-page').val('');
field_wrap.find('.target_rule-condition').trigger('change');
update_exclusion_button(false, true);
}else{
$this.parent('.zozo-target-rule-condition').next('.target_rule-specific-page-wrap').remove();
rule_condition.remove();
}}else{
$this.parent('.zozo-target-rule-condition').next('.target_rule-specific-page-wrap').remove();
rule_condition.remove();
}
field_wrap.find('.zozo-target-rule-condition').each(function(i){
var condition=jQuery(this),
old_rule_id=condition.attr('data-rule'),
select_location=condition.find('.target_rule-condition'),
select_specific=condition.find('.target_rule-specific-page'),
location_name=select_location.attr('name');
condition.attr('data-rule', i);
select_location.attr('name', location_name.replace('['+old_rule_id+']', '['+i+']'));
condition.removeClass('ast-target-rule-'+old_rule_id).addClass('ast-target-rule-'+i);
cnt=i;
});
field_wrap.find('.target_rule-add-rule-wrap a').attr('data-rule-id', cnt)
update_close_button(field_wrap);
update_target_rule_input(field_wrap);
});
jQuery('.ast-target-rule-selector-wrapper').on('click', '.target_rule-add-exclusion-rule a', function(e){
e.preventDefault();
e.stopPropagation();
update_exclusion_button(true);
});
});
}(jQuery, window));
;(function($, window, undefined){
var user_role_update_close_button=function(wrapper){
type=wrapper.closest('.ast-user-role-wrapper').attr('data-type');
rules=wrapper.find('.zozo-user-role-condition');
show_close=false;
if(rules.length > 1){
show_close=true;
}
rules.each(function(){
if(show_close){
jQuery(this).find('.user_role-condition-delete').removeClass('ast-hidden');
}else{
jQuery(this).find('.user_role-condition-delete').addClass('ast-hidden');
}});
};
$(document).ready(function($){
jQuery('.ast-user-role-selector-wrapper').each(function(){
user_role_update_close_button(jQuery(this));
})
jQuery('.ast-user-role-selector-wrapper').on('click', '.user_role-add-rule-wrap a', function(e){
e.preventDefault();
e.stopPropagation();
var $this=jQuery(this),
id=$this.attr('data-rule-id'),
new_id=parseInt(id) + 1,
rule_wrap=$this.closest('.ast-user-role-selector-wrapper').find('.user_role-builder-wrap'),
template=wp.template('zozo-user-role-condition'),
field_wrap=$this.closest('.ast-user-role-wrapper');
rule_wrap.append(template( { id:new_id }) );
$this.attr('data-rule-id', new_id);
user_role_update_close_button(field_wrap);
});
jQuery('.ast-user-role-selector-wrapper').on('click', '.user_role-condition-delete', function(e){
var $this=jQuery(this),
rule_condition=$this.closest('.zozo-user-role-condition'),
field_wrap=$this.closest('.ast-user-role-wrapper');
cnt=0,
data_type=field_wrap.attr('data-type'),
optionVal=$this.siblings('.user_role-condition-wrap').children('.user_role-condition').val();
rule_condition.remove();
field_wrap.find('.zozo-user-role-condition').each(function(i){
var condition=jQuery(this),
old_rule_id=condition.attr('data-rule'),
select_location=condition.find('.user_role-condition'),
location_name=select_location.attr('name');
condition.attr('data-rule', i);
select_location.attr('name', location_name.replace('['+old_rule_id+']', '['+i+']'));
condition.removeClass('ast-user-role-'+old_rule_id).addClass('ast-user-role-'+i);
cnt=i;
});
field_wrap.find('.user_role-add-rule-wrap a').attr('data-rule-id', cnt)
user_role_update_close_button(field_wrap);
});
});
}(jQuery, window));
!function(i){i.fn.theiaStickySidebar=function(t){function e(t,e){var a=o(t,e);a||(console.log("TSS: Body width smaller than options.minWidth. Init is delayed."),i(document).on("scroll."+t.namespace,function(t,e){return function(a){var n=o(t,e);n&&i(this).unbind(a)}}(t,e)),i(window).on("resize."+t.namespace,function(t,e){return function(a){var n=o(t,e);n&&i(this).unbind(a)}}(t,e)))}function o(t,e){return t.initialized===!0||!(i("body").width()<t.minWidth)&&(a(t,e),!0)}function a(t,e){t.initialized=!0;var o=i("#theia-sticky-sidebar-stylesheet-"+t.namespace);0===o.length&&i("head").append(i('<style id="theia-sticky-sidebar-stylesheet-'+t.namespace+'">.theiaStickySidebar:after {content: ""; display: table; clear: both;}</style>')),e.each(function(){function e(){a.fixedScrollTop=0,a.sidebar.css({"min-height":"1px"}),a.stickySidebar.css({position:"static",width:"",transform:"none"})}function o(t){var e=t.height();return t.children().each(function(){e=Math.max(e,i(this).height())}),e}var a={};if(a.sidebar=i(this),a.options=t||{},a.container=i(a.options.containerSelector),0==a.container.length&&(a.container=a.sidebar.parent()),a.sidebar.parents().css("-webkit-transform","none"),a.sidebar.css({position:a.options.defaultPosition,overflow:"visible","-webkit-box-sizing":"border-box","-moz-box-sizing":"border-box","box-sizing":"border-box"}),a.stickySidebar=a.sidebar.find(".theiaStickySidebar"),0==a.stickySidebar.length){var s=/(?:text|application)\/(?:x-)?(?:javascript|ecmascript)/i;a.sidebar.find("script").filter(function(i,t){return 0===t.type.length||t.type.match(s)}).remove(),a.stickySidebar=i("<div>").addClass("theiaStickySidebar").append(a.sidebar.children()),a.sidebar.append(a.stickySidebar)}a.marginBottom=parseInt(a.sidebar.css("margin-bottom")),a.paddingTop=parseInt(a.sidebar.css("padding-top")),a.paddingBottom=parseInt(a.sidebar.css("padding-bottom"));var r=a.stickySidebar.offset().top,d=a.stickySidebar.outerHeight();a.stickySidebar.css("padding-top",1),a.stickySidebar.css("padding-bottom",1),r-=a.stickySidebar.offset().top,d=a.stickySidebar.outerHeight()-d-r,0==r?(a.stickySidebar.css("padding-top",0),a.stickySidebarPaddingTop=0):a.stickySidebarPaddingTop=1,0==d?(a.stickySidebar.css("padding-bottom",0),a.stickySidebarPaddingBottom=0):a.stickySidebarPaddingBottom=1,a.previousScrollTop=null,a.fixedScrollTop=0,e(),a.onScroll=function(a){if(a.stickySidebar.is(":visible")){if(i("body").width()<a.options.minWidth)return void e();if(a.options.disableOnResponsiveLayouts){var s=a.sidebar.outerWidth("none"==a.sidebar.css("float"));if(s+50>a.container.width())return void e()}var r=i(document).scrollTop(),d="static";if(r>=a.sidebar.offset().top+(a.paddingTop-a.options.additionalMarginTop)){var c,p=a.paddingTop+t.additionalMarginTop,b=a.paddingBottom+a.marginBottom+t.additionalMarginBottom,l=a.sidebar.offset().top,f=a.sidebar.offset().top+o(a.container),h=0+t.additionalMarginTop,g=a.stickySidebar.outerHeight()+p+b<i(window).height();c=g?h+a.stickySidebar.outerHeight():i(window).height()-a.marginBottom-a.paddingBottom-t.additionalMarginBottom;var u=l-r+a.paddingTop,S=f-r-a.paddingBottom-a.marginBottom,y=a.stickySidebar.offset().top-r,m=a.previousScrollTop-r;"fixed"==a.stickySidebar.css("position")&&"modern"==a.options.sidebarBehavior&&(y+=m),"stick-to-top"==a.options.sidebarBehavior&&(y=t.additionalMarginTop),"stick-to-bottom"==a.options.sidebarBehavior&&(y=c-a.stickySidebar.outerHeight()),y=m>0?Math.min(y,h):Math.max(y,c-a.stickySidebar.outerHeight()),y=Math.max(y,u),y=Math.min(y,S-a.stickySidebar.outerHeight());var k=a.container.height()==a.stickySidebar.outerHeight();d=(k||y!=h)&&(k||y!=c-a.stickySidebar.outerHeight())?r+y-a.sidebar.offset().top-a.paddingTop<=t.additionalMarginTop?"static":"absolute":"fixed"}if("fixed"==d){var v=i(document).scrollLeft();a.stickySidebar.css({position:"fixed",width:n(a.stickySidebar)+"px",transform:"translateY("+y+"px)",left:a.sidebar.offset().left+parseInt(a.sidebar.css("padding-left"))-v+"px",top:"0px"})}else if("absolute"==d){var x={};"absolute"!=a.stickySidebar.css("position")&&(x.position="absolute",x.transform="translateY("+(r+y-a.sidebar.offset().top-a.stickySidebarPaddingTop-a.stickySidebarPaddingBottom)+"px)",x.top="0px"),x.width=n(a.stickySidebar)+"px",x.left="",a.stickySidebar.css(x)}else"static"==d&&e();"static"!=d&&1==a.options.updateSidebarHeight&&a.sidebar.css({"min-height":a.stickySidebar.outerHeight()+a.stickySidebar.offset().top-a.sidebar.offset().top+a.paddingBottom}),a.previousScrollTop=r}},a.onScroll(a),i(document).on("scroll."+a.options.namespace,function(i){return function(){i.onScroll(i)}}(a)),i(window).on("resize."+a.options.namespace,function(i){return function(){i.stickySidebar.css({position:"static"}),i.onScroll(i)}}(a)),"undefined"!=typeof ResizeSensor&&new ResizeSensor(a.stickySidebar[0],function(i){return function(){i.onScroll(i)}}(a))})}function n(i){var t;try{t=i[0].getBoundingClientRect().width}catch(i){}return"undefined"==typeof t&&(t=i.width()),t}var s={containerSelector:"",additionalMarginTop:0,additionalMarginBottom:0,updateSidebarHeight:!0,minWidth:0,disableOnResponsiveLayouts:!0,sidebarBehavior:"modern",defaultPosition:"relative",namespace:"TSS"};return t=i.extend(s,t),t.additionalMarginTop=parseInt(t.additionalMarginTop)||0,t.additionalMarginBottom=parseInt(t.additionalMarginBottom)||0,e(t,this),this}}(jQuery);
(function ($){
$.fn.ceaRowSticky=function (options){
var defaults={
containerSelector: "",
additionalMarginTop: 0,
additionalMarginBottom: 0,
updateSidebarHeight: true,
minWidth: 0,
disableOnResponsiveLayouts: true,
sidebarBehavior: "modern",
defaultPosition: "relative",
namespace: "TSS",
};
options=$.extend(defaults, options);
options.additionalMarginTop =
parseInt(options.additionalMarginTop)||0;
options.additionalMarginBottom =
parseInt(options.additionalMarginBottom)||0;
tryInitOrHookIntoEvents(options, this);
function tryInitOrHookIntoEvents(options, $that){
var success=tryInit(options, $that);
if(!success){
console.log("TSS: Body width smaller than options.minWidth. Init is delayed."
);
$(document).on("scroll." + options.namespace,
(function (options, $that){
return function (evt){
var success=tryInit(options, $that);
if(success){
$(this).unbind(evt);
}};})(options, $that)
);
$(window).on("resize." + options.namespace,
(function (options, $that){
return function (evt){
var success=tryInit(options, $that);
if(success){
$(this).unbind(evt);
}};})(options, $that)
);
}}
function tryInit(options, $that){
if(options.initialized===true){
return true;
}
if($("body").width() < options.minWidth){
return false;
}
init(options, $that);
return true;
}
function init(options, $that){
options.initialized=true;
var existingStylesheet=$(
"#theia-sticky-sidebar-stylesheet-" + options.namespace
);
if(existingStylesheet.length===0){
$("head").append($(
'<style id="theia-sticky-sidebar-stylesheet-' +
options.namespace +
'">.ceaRowSticky:after {content: ""; display: table; clear: both;}</style>'
)
);
}
$that.each(function (){
var o={};
o.sidebar=$(this);
o.options=options||{};
o.sideBarNext=o.sidebar.next();
o.container=$(o.options.containerSelector);
if(o.container.length==0){
o.container=o.sidebar.parent();
}
o.sidebar.parents().css("-webkit-transform", "none"); // Fix for WebKit bug - https://code.google.com/p/chromium/issues/detail?id=20574
o.sidebar.closest(".e-con-inner").css({
"position": "relative",
});
o.sidebar.css({
"position": "static",
overflow: "visible",
"-webkit-box-sizing": "border-box",
"-moz-box-sizing": "border-box",
"box-sizing": "border-box",
"z-index": 9,
});
o.stickySidebar=o.sidebar.find(".ceaRowSticky");
if(o.stickySidebar.length==0){
var javaScriptMIMETypes =
/(?:text|application)\/(?:x-)?(?:javascript|ecmascript)/i;
o.sidebar
.find("script")
.filter(function (index, script){
return (
script.type.length===0 ||
script.type.match(javaScriptMIMETypes)
);
})
.remove();
o.stickySidebar=$("<div>")
.addClass("ceaRowSticky")
.append(o.sidebar.children());
o.sidebar.append(o.stickySidebar);
}
o.marginBottom=parseInt(o.sidebar.css("margin-bottom"));
o.paddingTop=parseInt(o.sidebar.css("padding-top"));
o.paddingBottom=parseInt(o.sidebar.css("padding-bottom"));
var collapsedTopHeight=o.stickySidebar.offset().top;
var collapsedBottomHeight=o.stickySidebar.outerHeight();
o.stickySidebar.css("padding-top", 1);
o.stickySidebar.css("padding-bottom", 1);
collapsedTopHeight -=o.stickySidebar.offset().top;
collapsedBottomHeight =
o.stickySidebar.outerHeight() -
collapsedBottomHeight -
collapsedTopHeight;
if(collapsedTopHeight==0){
o.stickySidebar.css("padding-top", 0);
o.stickySidebarPaddingTop=0;
}else{
o.stickySidebarPaddingTop=1;
}
if(collapsedBottomHeight==0){
o.stickySidebar.css("padding-bottom", 0);
o.stickySidebarPaddingBottom=0;
}else{
o.stickySidebarPaddingBottom=1;
}
o.previousScrollTop=null;
o.fixedScrollTop=0;
resetSidebar();
o.onScroll=function (o){
if(!o.stickySidebar.is(":visible")){
return;
}
if($("body").width() < o.options.minWidth){
resetSidebar();
return;
}
if(o.options.disableOnResponsiveLayouts){
var sidebarWidth=o.sidebar.outerWidth(o.sidebar.css("float")=="none"
);
}
var scrollTop=$(document).scrollTop();
var position="static";
if(scrollTop >=
o.sidebar.offset().top +
(o.paddingTop - o.options.additionalMarginTop)
){
var offsetTop =
o.paddingTop + options.additionalMarginTop;
var offsetBottom =
o.paddingBottom +
o.marginBottom +
options.additionalMarginBottom;
var containerTop=o.sidebar.offset().top;
var containerBottom =
o.sidebar.offset().top +
getClearedHeight(o.container);
var windowOffsetTop=0 + options.additionalMarginTop;
var windowOffsetBottom;
var sidebarSmallerThanWindow =
o.stickySidebar.outerHeight() +
offsetTop +
offsetBottom <
$(window).height();
if(sidebarSmallerThanWindow){
windowOffsetBottom =
windowOffsetTop + o.stickySidebar.outerHeight();
}else{
windowOffsetBottom =
$(window).height() -
o.marginBottom -
o.paddingBottom -
options.additionalMarginBottom;
}
var staticLimitTop =
containerTop - scrollTop + o.paddingTop;
var staticLimitBottom =
containerBottom -
scrollTop -
o.paddingBottom -
o.marginBottom;
var top=o.stickySidebar.offset().top - scrollTop;
var scrollTopDiff=o.previousScrollTop - scrollTop;
if(o.stickySidebar.css("position")=="fixed"){
if(o.options.sidebarBehavior=="modern"){
top +=scrollTopDiff;
}}
if(o.options.sidebarBehavior=="stick-to-top"){
top=options.additionalMarginTop;
}
if(o.options.sidebarBehavior=="stick-to-bottom"){
top =
windowOffsetBottom -
o.stickySidebar.outerHeight();
}
if(scrollTopDiff > 0){
top=Math.min(top, windowOffsetTop);
}else{
top=Math.max(top,
windowOffsetBottom -
o.stickySidebar.outerHeight()
);
}
top=Math.max(top, staticLimitTop);
top=Math.min(top,
staticLimitBottom - o.stickySidebar.outerHeight()
);
var sidebarSameHeightAsContainer =
o.container.height()==o.stickySidebar.outerHeight();
if(!sidebarSameHeightAsContainer &&
top==windowOffsetTop
){
position="fixed";
}else if(!sidebarSameHeightAsContainer &&
top==windowOffsetBottom -
o.stickySidebar.outerHeight()
){
position="fixed";
}else if(scrollTop +
top -
o.sidebar.offset().top -
o.paddingTop <=
options.additionalMarginTop
){
position="static";
}else{
position="absolute";
}}
if(position=="fixed"){
var scrollLeft=$(document).scrollLeft();
o.stickySidebar.css({
position: "fixed",
width: getWidthForObject(o.stickySidebar) + "px",
transform: "translateY(" + top + "px)",
left:
o.sidebar.offset().left +
parseInt(o.sidebar.css("padding-left")) -
scrollLeft +
"px",
top: "0px",
});
}else if(position=="absolute"){
var css={};
if(o.stickySidebar.css("position")!="absolute"){
css.position="absolute";
css.transform =
"translateY(" +
(scrollTop +
top -
o.sidebar.offset().top -
o.stickySidebarPaddingTop -
o.stickySidebarPaddingBottom) +
"px)";
css.top="0px";
}
css.width=getWidthForObject(o.stickySidebar) + "px";
css.left="";
o.stickySidebar.css(css);
}else if(position=="static"){
resetSidebar();
}
if(position!="static"){
if(o.options.updateSidebarHeight==true){
o.sideBarNext.css({
"margin-top": o.stickySidebar.outerHeight(),
});
o.sidebar.css({
"position": "absolute",
"min-height":
o.stickySidebar.outerHeight() +
o.stickySidebar.offset().top -
o.sidebar.offset().top +
o.paddingBottom,
});
}}
o.previousScrollTop=scrollTop;
};
o.onScroll(o);
$(document).on("scroll." + o.options.namespace,
(function (o){
return function (){
o.onScroll(o);
};})(o)
);
$(window).on("resize." + o.options.namespace,
(function (o){
return function (){
o.stickySidebar.css({ position: "static" });
o.onScroll(o);
};})(o)
);
if(typeof ResizeSensor!=="undefined"){
new ResizeSensor(
o.stickySidebar[0],
(function (o){
return function (){
o.onScroll(o);
};})(o)
);
}
function resetSidebar(){
o.fixedScrollTop=0;
o.sideBarNext.css({
"margin-top": "",
});
o.sidebar.css({
position: "static",
"min-height": "1px",
});
o.stickySidebar.css({
position: "static",
width: "",
transform: "none",
});
}
function getClearedHeight(e){
var height=e.height();
e.children().each(function (){
height=Math.max(height, $(this).height());
});
return height;
}});
}
function getWidthForObject(object){
var width;
try {
width=object[0].getBoundingClientRect().width;
} catch (err){}
if(typeof width==="undefined"){
width=object.width();
}
return width;
}
return this;
};})(jQuery);
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).SplitType=e()}(this,(function(){"use strict";function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function e(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}function n(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?r(Object(o),!0).forEach((function(e){n(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(t,e)||c(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||c(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){if(t){if("string"==typeof t)return s(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function l(t,e){return Object.getOwnPropertyNames(Object(t)).reduce((function(n,r){var o=Object.getOwnPropertyDescriptor(Object(t),r),i=Object.getOwnPropertyDescriptor(Object(e),r);return Object.defineProperty(n,r,i||o)}),{})}function u(t){return"string"==typeof t}function f(t){return Array.isArray(t)}function p(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=l(e);return void 0!==n.types?t=n.types:void 0!==n.split&&(t=n.split),void 0!==t&&(n.types=(u(t)||f(t)?String(t):"").split(",").map((function(t){return String(t).trim()})).filter((function(t){return/((line)|(word)|(char))/i.test(t)}))),(n.absolute||n.position)&&(n.absolute=n.absolute||/absolute/.test(e.position)),n}function d(t){var e=u(t)||f(t)?String(t):"";return{none:!e,lines:/line/i.test(e),words:/word/i.test(e),chars:/char/i.test(e)}}function h(t){return null!==t&&"object"==typeof t}function y(t){return h(t)&&/^(1|3|11)$/.test(t.nodeType)}function g(t){return f(t)?t:null==t?[]:function(t){return h(t)&&function(t){return"number"==typeof t&&t>-1&&t%1==0}(t.length)}(t)?Array.prototype.slice.call(t):[t]}function v(t){var e=t;return u(t)&&(e=/^(#[a-z]\w+)$/.test(t.trim())?document.getElementById(t.trim().slice(1)):document.querySelectorAll(t)),g(e).reduce((function(t,e){return[].concat(a(t),a(g(e).filter(y)))}),[])}!function(){function t(){for(var t=arguments.length,e=0;e<t;e++){var n=e<0||arguments.length<=e?void 0:arguments[e];1===n.nodeType||11===n.nodeType?this.appendChild(n):this.appendChild(document.createTextNode(String(n)))}}function e(){for(;this.lastChild;)this.removeChild(this.lastChild);arguments.length&&this.append.apply(this,arguments)}function n(){for(var t=this.parentNode,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o=n.length;if(t)for(o||t.removeChild(this);o--;){var i=n[o];"object"!=typeof i?i=this.ownerDocument.createTextNode(i):i.parentNode&&i.parentNode.removeChild(i),o?t.insertBefore(this.previousSibling,i):t.replaceChild(i,this)}}"undefined"!=typeof Element&&(Element.prototype.append||(Element.prototype.append=t,DocumentFragment.prototype.append=t),Element.prototype.replaceChildren||(Element.prototype.replaceChildren=e,DocumentFragment.prototype.replaceChildren=e),Element.prototype.replaceWith||(Element.prototype.replaceWith=n,DocumentFragment.prototype.replaceWith=n))}();var m=Object.entries,b="_splittype",w={},O=0;function j(t,e,n){if(!h(t))return console.warn("[data.set] owner is not an object"),null;var r=t[b]||(t[b]=++O),i=w[r]||(w[r]={});return void 0===n?e&&Object.getPrototypeOf(e)===Object.prototype&&(w[r]=o(o({},i),e)):void 0!==e&&(i[e]=n),n}function C(t,e){var n=h(t)?t[b]:null,r=n&&w[n]||{};return void 0===e?r:r[e]}function E(t){var e=t&&t[b];e&&(delete t[e],delete w[e])}var S="\\ud800-\\udfff",x="\\u0300-\\u036f\\ufe20-\\ufe23",T="\\u20d0-\\u20f0",W="\\ufe0e\\ufe0f",k="[".concat(S,"]"),A="[".concat(x).concat(T,"]"),P="\\ud83c[\\udffb-\\udfff]",D="(?:".concat(A,"|").concat(P,")"),N="[^".concat(S,"]"),R="(?:\\ud83c[\\udde6-\\uddff]){2}",$="[\\ud800-\\udbff][\\udc00-\\udfff]",B="\\u200d",F="".concat(D,"?"),I="[".concat(W,"]?"),L=I+F+("(?:\\u200d(?:"+[N,R,$].join("|")+")"+I+F+")*"),H="(?:".concat(["".concat(N).concat(A,"?"),A,R,$,k].join("|"),"\n)"),M=RegExp("".concat(P,"(?=").concat(P,")|").concat(H).concat(L),"g"),z=RegExp("[".concat([B,S,x,T,W].join(""),"]"));function V(t){return z.test(t)}function q(t){return V(t)?function(t){return t.match(M)||[]}(t):function(t){return t.split("")}(t)}function U(t){return null==t?"":String(t)}function X(t,e){var n=document.createElement(t);return e?(Object.keys(e).forEach((function(t){var r=e[t],o=u(r)?r.trim():r;null!==o&&""!==o&&("children"===t?n.append.apply(n,a(g(o))):n.setAttribute(t,o))})),n):n}var Y={splitClass:"",lineClass:"line",wordClass:"word",charClass:"char",types:["lines","words","chars"],absolute:!1,tagName:"div"};function _(t,e){var n,r=d((e=l(Y,e)).types),o=e.tagName,i=t.nodeValue,c=document.createDocumentFragment(),s=[];return/^\s/.test(i)&&c.append(" "),n=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return(t?String(t):"").trim().replace(/\s+/g," ").split(e)}(i).reduce((function(t,n,i,l){var f,p;return r.chars&&(p=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(t=U(t))&&u(t)&&!e&&V(t)?q(t):t.split(e)}(n).map((function(t){var n=X(o,{class:"".concat(e.splitClass," ").concat(e.charClass),style:"display: inline-block;",children:t});return j(n,"isChar",!0),s=[].concat(a(s),[n]),n}))),r.words||r.lines?(j(f=X(o,{class:"".concat(e.wordClass," ").concat(e.splitClass),style:"display: inline-block; ".concat(r.words&&e.absolute?"position: relative;":""),children:r.chars?p:n}),{isWord:!0,isWordStart:!0,isWordEnd:!0}),c.appendChild(f)):p.forEach((function(t){c.appendChild(t)})),i<l.length-1&&c.append(" "),r.words?t.concat(f):t}),[]),/\s$/.test(i)&&c.append(" "),t.replaceWith(c),{words:n,chars:s}}function G(t,e){var n=t.nodeType,r={words:[],chars:[]};if(!/(1|3|11)/.test(n))return r;if(3===n&&/\S/.test(t.nodeValue))return _(t,e);var o=g(t.childNodes);if(o.length&&(j(t,"isSplit",!0),!C(t).isRoot)){t.style.display="inline-block",t.style.position="relative";var i=t.nextSibling,c=t.previousSibling,s=t.textContent||"",l=i?i.textContent:" ",u=c?c.textContent:" ";j(t,{isWordEnd:/\s$/.test(s)||/^\s/.test(l),isWordStart:/^\s/.test(s)||/\s$/.test(u)})}return o.reduce((function(t,n){var r=G(n,e),o=r.words,i=r.chars;return{words:[].concat(a(t.words),a(o)),chars:[].concat(a(t.chars),a(i))}}),r)}function J(t){C(t).isWord?(E(t),t.replaceWith.apply(t,a(t.childNodes))):g(t.children).forEach((function(t){return J(t)}))}function K(t,e,n){var r,o,a,c=d(e.types),s=e.tagName,l=t.getElementsByTagName("*"),u=[],f=[],p=null,h=[],y=t.parentElement,v=t.nextElementSibling,m=document.createDocumentFragment(),b=window.getComputedStyle(t),w=b.textAlign,O=.2*parseFloat(b.fontSize);return e.absolute&&(a={left:t.offsetLeft,top:t.offsetTop,width:t.offsetWidth},o=t.offsetWidth,r=t.offsetHeight,j(t,{cssWidth:t.style.width,cssHeight:t.style.height})),g(l).forEach((function(r){var o=r.parentElement===t,a=function(t,e,n,r){if(!n.absolute)return{top:e?t.offsetTop:null};var o=t.offsetParent,a=i(r,2),c=a[0],s=a[1],l=0,u=0;if(o&&o!==document.body){var f=o.getBoundingClientRect();l=f.x+c,u=f.y+s}var p=t.getBoundingClientRect(),d=p.width,h=p.height,y=p.x;return{width:d,height:h,top:p.y+s-u,left:y+c-l}}(r,o,e,n),s=a.width,l=a.height,d=a.top,h=a.left;/^br$/i.test(r.nodeName)||(c.lines&&o&&((null===p||d-p>=O)&&(p=d,u.push(f=[])),f.push(r)),e.absolute&&j(r,{top:d,left:h,width:s,height:l}))})),y&&y.removeChild(t),c.lines&&(h=u.map((function(t){var n=X(s,{class:"".concat(e.splitClass," ").concat(e.lineClass),style:"display: block; text-align: ".concat(w,"; width: 100%;")});j(n,"isLine",!0);var r={height:0,top:1e4};return m.appendChild(n),t.forEach((function(t,e,o){var i=C(t),a=i.isWordEnd,c=i.top,s=i.height,l=o[e+1];r.height=Math.max(r.height,s),r.top=Math.min(r.top,c),n.appendChild(t),a&&C(l).isWordStart&&n.append(" ")})),e.absolute&&j(n,{height:r.height,top:r.top}),n})),c.words||J(m),t.replaceChildren(m)),e.absolute&&(t.style.width="".concat(t.style.width||o,"px"),t.style.height="".concat(r,"px"),g(l).forEach((function(t){var e=C(t),n=e.isLine,r=e.top,o=e.left,i=e.width,c=e.height,s=C(t.parentElement),l=!n&&s.isLine;t.style.top="".concat(l?r-s.top:r,"px"),t.style.left="".concat(n?a.left:o-(l?a.left:0),"px"),t.style.height="".concat(c,"px"),t.style.width="".concat(n?a.width:i,"px"),t.style.position="absolute"}))),y&&(v?y.insertBefore(t,v):y.appendChild(t)),h}var Q=l(Y,{});return function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.isSplit=!1,this.settings=l(Q,p(n)),this.elements=v(e),this.split()}return e(t,null,[{key:"clearData",value:function(){Object.keys(w).forEach((function(t){delete w[t]}))}},{key:"setDefaults",value:function(t){return Q=l(Q,p(t)),Y}},{key:"revert",value:function(t){v(t).forEach((function(t){var e=C(t),n=e.isSplit,r=e.html,o=e.cssWidth,i=e.cssHeight;n&&(t.innerHTML=r,t.style.width=o||"",t.style.height=i||"",E(t))}))}},{key:"create",value:function(e,n){return new t(e,n)}},{key:"data",get:function(){return w}},{key:"defaults",get:function(){return Q},set:function(t){Q=l(Q,p(t))}}]),e(t,[{key:"split",value:function(t){var e=this;this.revert(),this.elements.forEach((function(t){j(t,"html",t.innerHTML)})),this.lines=[],this.words=[],this.chars=[];var n=[window.pageXOffset,window.pageYOffset];void 0!==t&&(this.settings=l(this.settings,p(t)));var r=d(this.settings.types);r.none||(this.elements.forEach((function(t){j(t,"isRoot",!0);var n=G(t,e.settings),r=n.words,o=n.chars;e.words=[].concat(a(e.words),a(r)),e.chars=[].concat(a(e.chars),a(o))})),this.elements.forEach((function(t){if(r.lines||e.settings.absolute){var o=K(t,e.settings,n);e.lines=[].concat(a(e.lines),a(o))}})),this.isSplit=!0,window.scrollTo(n[0],n[1]),m(w).forEach((function(t){var e=i(t,2),n=e[0],r=e[1],o=r.isRoot,a=r.isSplit;o&&a||(w[n]=null,delete w[n])})))}},{key:"revert",value:function(){this.isSplit&&(this.lines=null,this.words=null,this.chars=null,this.isSplit=!1),t.revert(this.elements)}}]),t}()}));
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Parallax=t()}}(function(){return function t(e,i,n){function o(r,a){if(!i[r]){if(!e[r]){var l="function"==typeof require&&require;if(!a&&l)return l(r,!0);if(s)return s(r,!0);var h=new Error("Cannot find module '"+r+"'");throw h.code="MODULE_NOT_FOUND",h}var u=i[r]={exports:{}};e[r][0].call(u.exports,function(t){var i=e[r][1][t];return o(i||t)},u,u.exports,t,e,i,n)}return i[r].exports}for(var s="function"==typeof require&&require,r=0;r<n.length;r++)o(n[r]);return o}({1:[function(t,e,i){"use strict";function n(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var o=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},i=0;i<10;i++)e["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var i,a,l=n(t),h=1;h<arguments.length;h++){i=Object(arguments[h]);for(var u in i)s.call(i,u)&&(l[u]=i[u]);if(o){a=o(i);for(var c=0;c<a.length;c++)r.call(i,a[c])&&(l[a[c]]=i[a[c]])}}return l}},{}],2:[function(t,e,i){(function(t){(function(){var i,n,o,s,r,a;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:void 0!==t&&null!==t&&t.hrtime?(e.exports=function(){return(i()-r)/1e6},n=t.hrtime,s=(i=function(){var t;return 1e9*(t=n())[0]+t[1]})(),a=1e9*t.uptime(),r=s-a):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,t("_process"))},{_process:3}],3:[function(t,e,i){function n(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(c===setTimeout)return setTimeout(t,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function r(t){if(d===clearTimeout)return clearTimeout(t);if((d===o||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(t);try{return d(t)}catch(e){try{return d.call(null,t)}catch(e){return d.call(this,t)}}}function a(){v&&p&&(v=!1,p.length?f=p.concat(f):y=-1,f.length&&l())}function l(){if(!v){var t=s(a);v=!0;for(var e=f.length;e;){for(p=f,f=[];++y<e;)p&&p[y].run();y=-1,e=f.length}p=null,v=!1,r(t)}}function h(t,e){this.fun=t,this.array=e}function u(){}var c,d,m=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(t){c=n}try{d="function"==typeof clearTimeout?clearTimeout:o}catch(t){d=o}}();var p,f=[],v=!1,y=-1;m.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];f.push(new h(t,e)),1!==f.length||v||s(l)},h.prototype.run=function(){this.fun.apply(null,this.array)},m.title="browser",m.browser=!0,m.env={},m.argv=[],m.version="",m.versions={},m.on=u,m.addListener=u,m.once=u,m.off=u,m.removeListener=u,m.removeAllListeners=u,m.emit=u,m.prependListener=u,m.prependOnceListener=u,m.listeners=function(t){return[]},m.binding=function(t){throw new Error("process.binding is not supported")},m.cwd=function(){return"/"},m.chdir=function(t){throw new Error("process.chdir is not supported")},m.umask=function(){return 0}},{}],4:[function(t,e,i){(function(i){for(var n=t("performance-now"),o="undefined"==typeof window?i:window,s=["moz","webkit"],r="AnimationFrame",a=o["request"+r],l=o["cancel"+r]||o["cancelRequest"+r],h=0;!a&&h<s.length;h++)a=o[s[h]+"Request"+r],l=o[s[h]+"Cancel"+r]||o[s[h]+"CancelRequest"+r];if(!a||!l){var u=0,c=0,d=[];a=function(t){if(0===d.length){var e=n(),i=Math.max(0,1e3/60-(e-u));u=i+e,setTimeout(function(){var t=d.slice(0);d.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(u)}catch(t){setTimeout(function(){throw t},0)}},Math.round(i))}return d.push({handle:++c,callback:t,cancelled:!1}),c},l=function(t){for(var e=0;e<d.length;e++)d[e].handle===t&&(d[e].cancelled=!0)}}e.exports=function(t){return a.call(o,t)},e.exports.cancel=function(){l.apply(o,arguments)},e.exports.polyfill=function(){o.requestAnimationFrame=a,o.cancelAnimationFrame=l}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"performance-now":2}],5:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),s=t("raf"),r=t("object-assign"),a={propertyCache:{},vendors:[null,["-webkit-","webkit"],["-moz-","Moz"],["-o-","O"],["-ms-","ms"]],clamp:function(t,e,i){return e<i?t<e?e:t>i?i:t:t<i?i:t>e?e:t},data:function(t,e){return a.deserialize(t.getAttribute("data-"+e))},deserialize:function(t){return"true"===t||"false"!==t&&("null"===t?null:!isNaN(parseFloat(t))&&isFinite(t)?parseFloat(t):t)},camelCase:function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},accelerate:function(t){a.css(t,"transform","translate3d(0,0,0) rotate(0.0001deg)"),a.css(t,"transform-style","preserve-3d"),a.css(t,"backface-visibility","hidden")},transformSupport:function(t){for(var e=document.createElement("div"),i=!1,n=null,o=!1,s=null,r=null,l=0,h=a.vendors.length;l<h;l++)if(null!==a.vendors[l]?(s=a.vendors[l][0]+"transform",r=a.vendors[l][1]+"Transform"):(s="transform",r="transform"),void 0!==e.style[r]){i=!0;break}switch(t){case"2D":o=i;break;case"3D":if(i){var u=document.body||document.createElement("body"),c=document.documentElement,d=c.style.overflow,m=!1;document.body||(m=!0,c.style.overflow="hidden",c.appendChild(u),u.style.overflow="hidden",u.style.background=""),u.appendChild(e),e.style[r]="translate3d(1px,1px,1px)",o=void 0!==(n=window.getComputedStyle(e).getPropertyValue(s))&&n.length>0&&"none"!==n,c.style.overflow=d,u.removeChild(e),m&&(u.removeAttribute("style"),u.parentNode.removeChild(u))}}return o},css:function(t,e,i){var n=a.propertyCache[e];if(!n)for(var o=0,s=a.vendors.length;o<s;o++)if(n=null!==a.vendors[o]?a.camelCase(a.vendors[o][1]+"-"+e):e,void 0!==t.style[n]){a.propertyCache[e]=n;break}t.style[n]=i}},l={relativeInput:!1,clipRelativeInput:!1,inputElement:null,hoverOnly:!1,calibrationThreshold:100,calibrationDelay:500,supportDelay:500,calibrateX:!1,calibrateY:!0,invertX:!0,invertY:!0,limitX:!1,limitY:!1,scalarX:10,scalarY:10,frictionX:.1,frictionY:.1,originX:.5,originY:.5,pointerEvents:!1,precision:1,onReady:null,selector:null},h=function(){function t(e,i){n(this,t),this.element=e;var o={calibrateX:a.data(this.element,"calibrate-x"),calibrateY:a.data(this.element,"calibrate-y"),invertX:a.data(this.element,"invert-x"),invertY:a.data(this.element,"invert-y"),limitX:a.data(this.element,"limit-x"),limitY:a.data(this.element,"limit-y"),scalarX:a.data(this.element,"scalar-x"),scalarY:a.data(this.element,"scalar-y"),frictionX:a.data(this.element,"friction-x"),frictionY:a.data(this.element,"friction-y"),originX:a.data(this.element,"origin-x"),originY:a.data(this.element,"origin-y"),pointerEvents:a.data(this.element,"pointer-events"),precision:a.data(this.element,"precision"),relativeInput:a.data(this.element,"relative-input"),clipRelativeInput:a.data(this.element,"clip-relative-input"),hoverOnly:a.data(this.element,"hover-only"),inputElement:document.querySelector(a.data(this.element,"input-element")),selector:a.data(this.element,"selector")};for(var s in o)null===o[s]&&delete o[s];r(this,l,o,i),this.inputElement||(this.inputElement=this.element),this.calibrationTimer=null,this.calibrationFlag=!0,this.enabled=!1,this.depthsX=[],this.depthsY=[],this.raf=null,this.bounds=null,this.elementPositionX=0,this.elementPositionY=0,this.elementWidth=0,this.elementHeight=0,this.elementCenterX=0,this.elementCenterY=0,this.elementRangeX=0,this.elementRangeY=0,this.calibrationX=0,this.calibrationY=0,this.inputX=0,this.inputY=0,this.motionX=0,this.motionY=0,this.velocityX=0,this.velocityY=0,this.onMouseMove=this.onMouseMove.bind(this),this.onDeviceOrientation=this.onDeviceOrientation.bind(this),this.onDeviceMotion=this.onDeviceMotion.bind(this),this.onOrientationTimer=this.onOrientationTimer.bind(this),this.onMotionTimer=this.onMotionTimer.bind(this),this.onCalibrationTimer=this.onCalibrationTimer.bind(this),this.onAnimationFrame=this.onAnimationFrame.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.windowWidth=null,this.windowHeight=null,this.windowCenterX=null,this.windowCenterY=null,this.windowRadiusX=null,this.windowRadiusY=null,this.portrait=!1,this.desktop=!navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry|BB10|mobi|tablet|opera mini|nexus 7)/i),this.motionSupport=!!window.DeviceMotionEvent&&!this.desktop,this.orientationSupport=!!window.DeviceOrientationEvent&&!this.desktop,this.orientationStatus=0,this.motionStatus=0,this.initialise()}return o(t,[{key:"initialise",value:function(){void 0===this.transform2DSupport&&(this.transform2DSupport=a.transformSupport("2D"),this.transform3DSupport=a.transformSupport("3D")),this.transform3DSupport&&a.accelerate(this.element),"static"===window.getComputedStyle(this.element).getPropertyValue("position")&&(this.element.style.position="relative"),this.pointerEvents||(this.element.style.pointerEvents="none"),this.updateLayers(),this.updateDimensions(),this.enable(),this.queueCalibration(this.calibrationDelay)}},{key:"doReadyCallback",value:function(){this.onReady&&this.onReady()}},{key:"updateLayers",value:function(){this.selector?this.layers=this.element.querySelectorAll(this.selector):this.layers=this.element.children,this.layers.length||console.warn("ParallaxJS: Your scene does not have any layers."),this.depthsX=[],this.depthsY=[];for(var t=0;t<this.layers.length;t++){var e=this.layers[t];this.transform3DSupport&&a.accelerate(e),e.style.position=t?"absolute":"relative",e.style.display="block",e.style.left=0,e.style.top=0;var i=a.data(e,"depth")||0;this.depthsX.push(a.data(e,"depth-x")||i),this.depthsY.push(a.data(e,"depth-y")||i)}}},{key:"updateDimensions",value:function(){this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight,this.windowCenterX=this.windowWidth*this.originX,this.windowCenterY=this.windowHeight*this.originY,this.windowRadiusX=Math.max(this.windowCenterX,this.windowWidth-this.windowCenterX),this.windowRadiusY=Math.max(this.windowCenterY,this.windowHeight-this.windowCenterY)}},{key:"updateBounds",value:function(){this.bounds=this.inputElement.getBoundingClientRect(),this.elementPositionX=this.bounds.left,this.elementPositionY=this.bounds.top,this.elementWidth=this.bounds.width,this.elementHeight=this.bounds.height,this.elementCenterX=this.elementWidth*this.originX,this.elementCenterY=this.elementHeight*this.originY,this.elementRangeX=Math.max(this.elementCenterX,this.elementWidth-this.elementCenterX),this.elementRangeY=Math.max(this.elementCenterY,this.elementHeight-this.elementCenterY)}},{key:"queueCalibration",value:function(t){clearTimeout(this.calibrationTimer),this.calibrationTimer=setTimeout(this.onCalibrationTimer,t)}},{key:"enable",value:function(){this.enabled||(this.enabled=!0,this.orientationSupport?(this.portrait=!1,window.addEventListener("deviceorientation",this.onDeviceOrientation),this.detectionTimer=setTimeout(this.onOrientationTimer,this.supportDelay)):this.motionSupport?(this.portrait=!1,window.addEventListener("devicemotion",this.onDeviceMotion),this.detectionTimer=setTimeout(this.onMotionTimer,this.supportDelay)):(this.calibrationX=0,this.calibrationY=0,this.portrait=!1,window.addEventListener("mousemove",this.onMouseMove),this.doReadyCallback()),window.addEventListener("resize",this.onWindowResize),this.raf=s(this.onAnimationFrame))}},{key:"disable",value:function(){this.enabled&&(this.enabled=!1,this.orientationSupport?window.removeEventListener("deviceorientation",this.onDeviceOrientation):this.motionSupport?window.removeEventListener("devicemotion",this.onDeviceMotion):window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("resize",this.onWindowResize),s.cancel(this.raf))}},{key:"calibrate",value:function(t,e){this.calibrateX=void 0===t?this.calibrateX:t,this.calibrateY=void 0===e?this.calibrateY:e}},{key:"invert",value:function(t,e){this.invertX=void 0===t?this.invertX:t,this.invertY=void 0===e?this.invertY:e}},{key:"friction",value:function(t,e){this.frictionX=void 0===t?this.frictionX:t,this.frictionY=void 0===e?this.frictionY:e}},{key:"scalar",value:function(t,e){this.scalarX=void 0===t?this.scalarX:t,this.scalarY=void 0===e?this.scalarY:e}},{key:"limit",value:function(t,e){this.limitX=void 0===t?this.limitX:t,this.limitY=void 0===e?this.limitY:e}},{key:"origin",value:function(t,e){this.originX=void 0===t?this.originX:t,this.originY=void 0===e?this.originY:e}},{key:"setInputElement",value:function(t){this.inputElement=t,this.updateDimensions()}},{key:"setPosition",value:function(t,e,i){e=e.toFixed(this.precision)+"px",i=i.toFixed(this.precision)+"px",this.transform3DSupport?a.css(t,"transform","translate3d("+e+","+i+",0)"):this.transform2DSupport?a.css(t,"transform","translate("+e+","+i+")"):(t.style.left=e,t.style.top=i)}},{key:"onOrientationTimer",value:function(){this.orientationSupport&&0===this.orientationStatus?(this.disable(),this.orientationSupport=!1,this.enable()):this.doReadyCallback()}},{key:"onMotionTimer",value:function(){this.motionSupport&&0===this.motionStatus?(this.disable(),this.motionSupport=!1,this.enable()):this.doReadyCallback()}},{key:"onCalibrationTimer",value:function(){this.calibrationFlag=!0}},{key:"onWindowResize",value:function(){this.updateDimensions()}},{key:"onAnimationFrame",value:function(){this.updateBounds();var t=this.inputX-this.calibrationX,e=this.inputY-this.calibrationY;(Math.abs(t)>this.calibrationThreshold||Math.abs(e)>this.calibrationThreshold)&&this.queueCalibration(0),this.portrait?(this.motionX=this.calibrateX?e:this.inputY,this.motionY=this.calibrateY?t:this.inputX):(this.motionX=this.calibrateX?t:this.inputX,this.motionY=this.calibrateY?e:this.inputY),this.motionX*=this.elementWidth*(this.scalarX/100),this.motionY*=this.elementHeight*(this.scalarY/100),isNaN(parseFloat(this.limitX))||(this.motionX=a.clamp(this.motionX,-this.limitX,this.limitX)),isNaN(parseFloat(this.limitY))||(this.motionY=a.clamp(this.motionY,-this.limitY,this.limitY)),this.velocityX+=(this.motionX-this.velocityX)*this.frictionX,this.velocityY+=(this.motionY-this.velocityY)*this.frictionY;for(var i=0;i<this.layers.length;i++){var n=this.layers[i],o=this.depthsX[i],r=this.depthsY[i],l=this.velocityX*(o*(this.invertX?-1:1)),h=this.velocityY*(r*(this.invertY?-1:1));this.setPosition(n,l,h)}this.raf=s(this.onAnimationFrame)}},{key:"rotate",value:function(t,e){var i=(t||0)/30,n=(e||0)/30,o=this.windowHeight>this.windowWidth;this.portrait!==o&&(this.portrait=o,this.calibrationFlag=!0),this.calibrationFlag&&(this.calibrationFlag=!1,this.calibrationX=i,this.calibrationY=n),this.inputX=i,this.inputY=n}},{key:"onDeviceOrientation",value:function(t){var e=t.beta,i=t.gamma;null!==e&&null!==i&&(this.orientationStatus=1,this.rotate(e,i))}},{key:"onDeviceMotion",value:function(t){var e=t.rotationRate.beta,i=t.rotationRate.gamma;null!==e&&null!==i&&(this.motionStatus=1,this.rotate(e,i))}},{key:"onMouseMove",value:function(t){var e=t.clientX,i=t.clientY;if(this.hoverOnly&&(e<this.elementPositionX||e>this.elementPositionX+this.elementWidth||i<this.elementPositionY||i>this.elementPositionY+this.elementHeight))return this.inputX=0,void(this.inputY=0);this.relativeInput?(this.clipRelativeInput&&(e=Math.max(e,this.elementPositionX),e=Math.min(e,this.elementPositionX+this.elementWidth),i=Math.max(i,this.elementPositionY),i=Math.min(i,this.elementPositionY+this.elementHeight)),this.elementRangeX&&this.elementRangeY&&(this.inputX=(e-this.elementPositionX-this.elementCenterX)/this.elementRangeX,this.inputY=(i-this.elementPositionY-this.elementCenterY)/this.elementRangeY)):this.windowRadiusX&&this.windowRadiusY&&(this.inputX=(e-this.windowCenterX)/this.windowRadiusX,this.inputY=(i-this.windowCenterY)/this.windowRadiusY)}},{key:"destroy",value:function(){this.disable(),clearTimeout(this.calibrationTimer),clearTimeout(this.detectionTimer),this.element.removeAttribute("style");for(var t=0;t<this.layers.length;t++)this.layers[t].removeAttribute("style");delete this.element,delete this.layers}},{key:"version",value:function(){return"3.1.0"}}]),t}();e.exports=h},{"object-assign":1,raf:4}]},{},[5])(5)});
(function($){
var WidgetAnimateTextHandler=function($scope, $){
$scope.find('.cea-typing-text').each(function(index){
ceaAnimatedTextSettings(this, index);
});
};
var WidgetButtonHandler=function($scope, $){
$scope.find('.cea-button').each(function(index){
ceaButtonSettings(this);
});
};
var WidgetIsotopeHandler=function($scope, $){
$scope.find('.isotope').each(function(){
ceaIsotopeLayout(this);
});
};
var WidgetOwlCarouselHandler=function($scope, $){
$scope.find('.owl-carousel').each(function(){
ceaOwlSettings(this);
});
};
var WidgetMouseCursorHandler=function($scope, $){
$scope.find(".blog-wrapper").each(function(){
cursorCPTContent(this);
});
}
var WidgetCPTHandler=function($scope, $){
const cptNormal=[".portfolio-normal-model",".service-normal-model",".team-normal-model",".event-normal-model"];
cptNormal.forEach((cpt)=> {
$scope.find(cpt).each(function (){
ceaCPTAjaxLoad(this);
});
});
const cptWrapper=[".portfolio-wrapper",".service-wrapper",".team-wrapper",".event-wrapper", ".testimonial-wrapper"];
cptWrapper.forEach((cpt)=> {
$scope.find(cpt).each(function (){
cursorCPTContent(this);
});
})
}
var WidgetImageAccordionHandler=function($scope, $){
const ceaAccordion=[ ".cea-image-accordion-vertical", ".cea-image-accordion-horizontal" ];
ceaAccordion.forEach((cpt)=> {
$scope.find(cpt).each(function (){
ceaImageAccordion(this);
});
});
};
var WidgetPoupHandler=function($scope, $){
if($scope.find('.image-gallery').length){
$scope.find('.image-gallery').each(function(){
ceaPopupGallerySettings(this);
});
}};
var WidgetCircleProgressHandler=function($scope, $){
if($scope.find('.circle-progress-circle').length){
var circle_ele=$scope.find('.circle-progress-circle');
ceaCircleProgresSettings(circle_ele);
}};
var WidgetCounterUpHandler=function($scope, $){
if($scope.find('.counter-up').length){
var counter_ele=$scope.find('.counter-up');
ceaCounterUpSettings(counter_ele);
}};
var WidgetImageBeforeAfterHandler=function($scope, $){
if($scope.find('.cea-imgc-wrap').length){
var img_ba_ele=$scope.find('.cea-imgc-wrap');
ceaImageBeforeAfterSettings(img_ba_ele);
}};
var WidgetMailchimpHandler=function($scope, $){
if($scope.find(".cea-mailchimp-wrapper").length){
$scope.find('.cea-mailchimp-wrapper').each(function(index){
ceaMailchimp(this);
});
}};
var WidgetDayCounterHandler=function($scope, $){
$scope.find('.day-counter').each(function(){
ceaDayCounterSettings(this);
});
};
var WidgetChartHandler=function($scope, $){
function isInViewport(el){
var rect=el.getBoundingClientRect();
return (
rect.top < window.innerHeight&&rect.bottom > 0
);
}
function initOnVisible($elements, initFunction){
$elements.each(function (){
var el=this;
var $el=$(el);
if(!$el.data('chart-init-handler')){
var observer=new IntersectionObserver(function (entries){
entries.forEach(function (entry){
if(entry.isIntersecting){
if($el.data('chart-instance')){
$el.data('chart-instance').destroy();
}
var chartInstance=initFunction(el);
$el.data('chart-instance', chartInstance);
}});
}, {
threshold: 0.3
});
observer.observe(el);
$el.data('chart-init-handler', observer);
}});
}
initOnVisible($scope.find('.pie-chart'), ceaPieChartSettings);
initOnVisible($scope.find('.line-chart'), ceaLineChartSettings);
};
var WidgetModalPopupHandler=function($scope, $){
if($scope.find('.modal-popup-wrapper.page-load-modal').length){
var modal_id=$scope.find('.modal-popup-wrapper.page-load-modal .modal').attr("id");
$('#'+modal_id).modal('show');
}};
var WidgetAgonHandler=function($scope, $){
if($scope.find(".canvas_agon").length){
$scope.find('.canvas_agon').each(function(){
ceaAgon(this);
});
}};
var WidgetCloud9CarouselHandler=function($scope, $){
if($scope.find(".cloud9-carousel").length){
$scope.find('.cloud9-carousel').each(function(){
ceaCloud9Carousel(this);
});
}};
var WidgetCEAMapHandler=function($scope, $){
if($scope.find(".ceagmap").length){
initCEAGmap();
}};
var WidgetTimelineSliderHandler=function($scope, $){
if($scope.find('.cd-horizontal-timeline').length){
var line_dist=$scope.find('.cd-horizontal-timeline').data("distance") ? $scope.find('.cd-horizontal-timeline').data("distance"):60;
$scope.find('.cd-horizontal-timeline').zozotimeline({
distance: line_dist
});
}};
var WidgetModalPopupHandler=function($scope, $){
if($scope.find(".cea-modal-box-trigger").length){
$scope.find('.cea-modal-box-trigger').each(function(){
ceaModalPopup(this);
});
}
if($scope.find('.cea-page-load-modal').length){
var modal_id=$scope.find('.cea-page-load-modal .white-popup-block').attr("id");
$.magnificPopup.open({
items: {
src: '#'+modal_id
},
type: 'inline'
});
}
$(document).on('click', '.cea-popup-modal-dismiss', function (e){
e.preventDefault();
$.magnificPopup.close();
});
};
var WidgetPopupAnythingHandler=function($scope, $){
if($scope.find(".cea-popup-anything").length){
$scope.find('.cea-popup-anything').each(function(){
ceaPopupAnything(this);
});
}};
var WidgetPopoverHandler=function($scope, $){
if($scope.find(".cea-popover-trigger").length){
$scope.find('.cea-popover-trigger').each(function(){
ceaPopover(this);
});
}};
var WidgetRecentPopularToggleHandler=function($scope, $){
if($scope.find(".cea-toggle-post-trigger").length){
$scope.find(".cea-toggle-post-trigger .switch-checkbox").change(function(){
ceaSwitchTabToggle(this);
});
}};
var WidgetRainDropsHandler=function($scope, $){
if($scope.find(".cea-rain-drops").length){
$scope.find('.cea-rain-drops').each(function(index){
ceaRainDrops(this);
});
}};
var SectionCustomOptionsHandler=function($scope, $){
if($scope.is('section')){
if($scope.is('section[data-cea-float]') ){
ceaSectionFloatParallax($scope);
}
if($scope.is('section[data-cea-raindrops]') ){
ceaSectionRainDrops($scope);
}
if($scope.is('section[data-cea-parallax-data]') ){
ceaSectionParallax($scope);
}}
};
var WidgetMousePointerHandler=function ($scope, $){
var settings=$scope.data('cursor-settings');
if(!settings||settings.enable_animation!=='yes') return;
var cursorContainer=$('<div class="custom-cursor"></div>');
$('body').append(cursorContainer);
cursorContainer.addClass(settings.widget_cls);
if(settings.animation_type==='circle_text'){
cursorContainer.html('<span class="cursor-text">' + settings.cursor_text + '</span>');
}else if(settings.animation_type==='icon'){
cursorContainer.html('<i class="' + settings.cursor_icon + '"></i>');
}else if(settings.animation_type==='image'){
cursorContainer.html('<img src="' + settings.cursor_image + '" alt="Cursor Image">');
}
$scope.on('mousemove', function (event){
const containerRect=$scope[0].getBoundingClientRect();
const cursorX=event.clientX;
const cursorY=event.clientY;
const containerLeft=containerRect.left;
const containerRight=containerRect.right;
const containerTop=containerRect.top;
const containerBottom=containerRect.bottom;
const width=containerRect.width;
const height=containerRect.height;
const marginX=width * 0.1;
const marginY=height * 0.1;
const insideX =
cursorX >=containerLeft&&cursorX <=containerRight;
const insideY =
cursorY >=containerTop&&cursorY <=containerBottom;
if(!insideX||!insideY){
cursorContainer.css({
display: "none",
opacity: 0,
transform: "translate(-50%, -50%) scale(0)",
});
return;
}
const distLeft=cursorX - containerLeft;
const distRight=containerRight - cursorX;
const distTop=cursorY - containerTop;
const distBottom=containerBottom - cursorY;
const scaleX=distLeft < marginX ? distLeft / marginX:distRight < marginX ? distRight / marginX:1;
const scaleY=distTop < marginY ? distTop / marginY:distBottom < marginY ? distBottom / marginY:1;
const scale=Math.max(0.3, Math.min(scaleX, scaleY));
cursorContainer.css({
top: cursorY + "px",
left: cursorX + "px",
transform: `translate(-50%, -50%) scale(${scale})`,
display: "block",
opacity: scale,
});
});
$scope.on('mouseleave', function (){
cursorContainer.css({
display: "none",
opacity: 0,
transform: "translate(-50%, -50%) scale(0)",
});
});
$scope.on('elementor:destroy', function (){
cursorContainer.remove();
});
};
function ceaVideoZoom(video_ele){
const $container=$(video_ele);
const $wrapper=$container.find(".cea-zoom_wrapper");
const $videoItem=$container.find(".zoom-video-item");
const data_attr=$container.data("zoom");
const disableOnMobile=data_attr.disable_mobile==="yes";
const scale_from=parseFloat($container.css("--zoom-scale-from"))||0.5;
const scale_to=parseFloat($container.css("--zoom-scale-to"))||1.5;
const opacity_from=parseFloat($container.css("--zoom-opacity-from"))||0;
const opacity_to=parseFloat($container.css("--zoom-opacity-to"))||1;
const config={
speed: 1,
scaleFrom: scale_from,
scaleTo: scale_to,
opacityFrom: opacity_from,
opacityTo: opacity_to,
timeFrom: 0,
timeTo: 1,
};
const lerp=(x, y, a)=> x * (1 - a) + y * a;
const invlerp=(x, y, a)=> clamp((a - x) / (y - x));
const clamp=(a, min=0, max=1)=> Math.min(max, Math.max(min, a));
const range=(x1, y1, x2, y2, a)=> lerp(x2, y2, invlerp(x1, y1, a));
let scrollHandlerAttached=false;
function getScrollProgress(){
const rect=$container[0].getBoundingClientRect();
const viewportHeight=window.innerHeight;
let progress=(viewportHeight - rect.top) / (rect.height * config.speed);
progress=progress - (config.timeFrom / config.speed);
return clamp(invlerp(config.timeFrom, config.timeTo, progress));
}
function applyTransformations(progress){
const scale=range(0, 1, config.scaleFrom, config.scaleTo, progress);
const opacity=range(0, 1, config.opacityFrom, config.opacityTo, progress);
$videoItem.css({
transform: `scale(${scale})`,
opacity: opacity,
'transform-origin': 'center center'
});
$wrapper.toggleClass('zoom-active', progress > 0&&progress < 1);
$wrapper.toggleClass('zoom-completed', progress >=1);
}
function handleScroll(){
const rect=$container[0].getBoundingClientRect();
const viewportHeight=window.innerHeight;
if(rect.bottom < 0||rect.top > viewportHeight){
if(rect.bottom < 0){
applyTransformations(1);
}
return;
}
const progress=getScrollProgress();
applyTransformations(progress);
}
function attachScroll(){
if(!scrollHandlerAttached){
window.addEventListener("scroll", handleScroll, {
passive: true,
});
handleScroll();
scrollHandlerAttached=true;
}}
function detachScroll(){
if(scrollHandlerAttached){
window.removeEventListener("scroll", handleScroll);
scrollHandlerAttached=false;
}}
function updateAnimationState(){
const isMobile=window.innerWidth < 500;
if(isMobile&&disableOnMobile){
detachScroll();
$container.css({
"height": "auto",
});
if(window.innerWidth <=499&&window.innerWidth >=425){
$container.css({
"margin-bottom": "8%",
});
}else{
$container.css({
"margin-bottom": "auto",
});
}
$wrapper.css("position", "static");
$wrapper.find(".zoom-video-wrapper").css({
"position": "static",
"height": "auto"
});
$videoItem.css({ transform: "", opacity: "" });
$wrapper.removeClass("zoom-active zoom-completed");
}else{
const videoNaturalHeight=$videoItem[0].videoHeight||360;
const videoNaturalWidth=$videoItem[0].videoWidth||640;
const aspectRatio=videoNaturalHeight / videoNaturalWidth;
const containerWidth=$container.width();
const baseVideoHeight=containerWidth * aspectRatio;
const scaledHeight=baseVideoHeight * scale_to;
const buffer=100;
$container.css("height", `${scaledHeight + buffer}px`);
$wrapper.css("position", "absolute");
$wrapper.find(".zoom-video-wrapper").css({
position: "absolute",
height: `${baseVideoHeight}px`,
});
attachScroll();
}}
updateAnimationState();
window.addEventListener("resize", updateAnimationState);
return function cleanup(){
detachScroll();
window.removeEventListener("resize", updateAnimationState);
};}
function ceaImageZoom(imgzoom_ele){
const $ele=$(imgzoom_ele);
const $img=$ele.find("img");
const $text=$ele.find(".image-zoom-text");
const $sub=$ele.find(".image-zoom-sub-title");
const data_attr=$ele.data("zoom");
const disableOnMobile=data_attr.disable_mobile==="yes";
const scale_from=parseFloat($ele.css("--zoom-scale-from"))||0.5;
const scale_to=parseFloat($ele.css("--zoom-scale-to"))||1.5;
const opacity_from=parseFloat($ele.css("--zoom-opacity-from"))||0;
const opacity_to=parseFloat($ele.css("--zoom-opacity-to"))||1;
const config={
speed: 1,
scaleFrom: scale_from,
scaleTo: scale_to,
opacityFrom: opacity_from,
opacityTo: opacity_to,
timeFrom: 0,
timeTo: 1,
};
const lerp=(x, y, a)=> x * (1 - a) + y * a;
const clamp=(a, min=0, max=1)=> Math.min(max, Math.max(min, a));
const invlerp=(x, y, a)=> clamp((a - x) / (y - x));
const range=(x1, y1, x2, y2, a)=> lerp(x2, y2, invlerp(x1, y1, a));
let scrollHandlerAttached=false;
function getScrollProgress(){
const rect=$ele[0].getBoundingClientRect();
const viewportHeight=window.innerHeight;
let progress=(viewportHeight - rect.top) / (rect.height * config.speed);
progress=progress - config.timeFrom / config.speed;
return clamp(invlerp(config.timeFrom, config.timeTo, progress));
}
function applyTransformations(progress){
const scale=range(
0,
1,
config.scaleFrom,
config.scaleTo,
progress
);
const opacity=range(
0,
1,
config.opacityFrom,
config.opacityTo,
progress
);
const yOffset=(1 - opacity) * 40;
$img.css({
transform: `scale(${scale})`,
opacity: opacity,
});
$text.css({
transform: `scale(${scale}) translateY(-${yOffset}px)`,
opacity: opacity,
});
$sub.css({
transform: `scale(${scale}) translateY(-${yOffset / 1.5}px)`,
opacity: opacity,
});
if($text.length||$sub.length||$img.length){
}}
function handleScroll(){
const viewportHeight=window.innerHeight;
const rect=$ele[0].getBoundingClientRect();
if(rect.bottom < 0||rect.top > viewportHeight){
if(rect.bottom < 0){
applyTransformations(1);
}
return;
}
const progress=getScrollProgress();
applyTransformations(progress);
}
function attachScroll(){
if(!scrollHandlerAttached){
window.addEventListener("scroll", handleScroll, {
passive: true,
});
handleScroll();
scrollHandlerAttached=true;
}}
function detachScroll(){
if(scrollHandlerAttached){
window.removeEventListener("scroll", handleScroll);
scrollHandlerAttached=false;
}}
function updateAnimationState(){
const isMobile=window.innerWidth < 768;
if(isMobile&&disableOnMobile){
detachScroll();
$img.css({ transform: "", opacity: "" });
$text.css({ transform: "", opacity: "" });
$sub.css({ transform: "", opacity: "" });
$ele.css({ height: "fit-content" });
}else{
const naturalHeight=$img[0].naturalHeight||400;
const naturalWidth=$img[0].naturalWidth||600;
const aspectRatio=naturalHeight / naturalWidth;
const containerWidth=$ele.width();
const baseHeight=containerWidth * aspectRatio;
const scaledHeight=baseHeight * scale_to;
const buffer=100;
$ele.css({
height: `${scaledHeight + buffer}px`,
position: "relative",
});
attachScroll();
}}
updateAnimationState();
window.addEventListener("resize", updateAnimationState);
}
function ceaZoomImageGrid(grid_ele){
const grid=$(grid_ele);
const $text=grid.find(".image-zoom-text");
const $sub=grid.find(".image-zoom-sub-title");
const items=grid.find("[zoom_grid_item]");
const blurScale=grid.data("blur")||0;
if($text.length||$sub.length||items.length){
grid.css({
perspective: "1000px",
overflow: "visible",
height: "100vh",
});
}
const gridOffset=grid.offset();
const gridWidth=grid.outerWidth();
const gridHeight=grid.outerHeight();
const entryStates=[];
items.each(function (){
const $item=$(this);
const itemOffset=$item.offset();
const itemWidth=$item.outerWidth();
const itemHeight=$item.outerHeight();
const itemCenterX =
itemOffset.left - gridOffset.left + itemWidth / 2;
const itemCenterY =
itemOffset.top - gridOffset.top + itemHeight / 2;
const normX=itemCenterX / gridWidth;
const normY=itemCenterY / gridHeight;
const offsetX=(normX - 0.5) * 2;
const offsetY=(normY - 0.5) * 2;
const offsetZ=100 + 50 * Math.sqrt(offsetX ** 2 + offsetY ** 2);
entryStates.push({
offsetX,
offsetY,
offsetZ,
$item,
});
});
items.each(function (i){
const entry=entryStates[i];
const x=entry.offsetX * 50;
const y=entry.offsetY * 50;
const z=entry.offsetZ;
entry.$item.css({
filter: `blur(${blurScale}px)`,
transform: `translate3d(${x}px, ${y}px, ${z}px) scale(1.2)`,
transition: "transform 0.3s ease, filter 0.3s ease",
transformStyle: "preserve-3d",
willChange: "transform, filter",
});
});
function updateOnScroll(){
const windowHeight=window.innerHeight;
const targetTop=windowHeight * 0.7;
entryStates.forEach((entry, i)=> {
const itemRect=entry.$item[0].getBoundingClientRect();
const visibleTop=itemRect.top < windowHeight;
const visibleBottom=itemRect.bottom > 0;
if(visibleTop&&visibleBottom){
const itemHeight=entry.$item.outerHeight();
const itemCenter=itemRect.top + itemHeight / 2;
const distance=itemCenter - targetTop;
const maxDistance=windowHeight - targetTop;
const progress=Math.max(0, Math.min(1, 1 - distance / maxDistance));
const x=entry.offsetX * 50 * (1 - progress);
const y=entry.offsetY * 50 * (1 - progress);
const z=entry.offsetZ * (1 - progress);
const scale=1.2 - progress * 0.2;
const blur=blurScale - progress * blurScale;
const transform=`translate3d(${x}px, ${y}px, ${z}px) scale(${scale})`;
const delay=i * 30;
setTimeout(()=> {
entry.$item.css({
filter: `blur(${blur}px)`,
transform,
});
}, delay);
}});
}
let ticking=false;
window.addEventListener("scroll",
()=> {
if(!ticking){
requestAnimationFrame(()=> {
updateOnScroll();
ticking=false;
});
ticking=true;
}},
{ passive: true }
);
updateOnScroll();
}
var SectionListScroll=function($scope, $){
var listParent=$(".list-step-section");
var listItems=listParent.find(".e-child");
listItems.addClass("list-section-	items");
listParent.css("min-height", listParent.outerHeight() + "px");
function updateSticky(){
const $parentTop=parseFloat(
listParent.css("--section-stack-top")
);
const stickyStart=$parentTop;
if(!isElementInViewport(listParent[0])) return;
const containerWidth=listParent.width();
if(listParent.hasClass("e-con-boxed")){
}else{
console.log("It is not boxed");
}
console.log(containerWidth);
const scrollTop=$(window).scrollTop();
const containerTop=listParent.offset().top;
const containerHeight=listParent.outerHeight();
const containerBottom=containerTop + containerHeight;
listItems
.css({
position: "",
top: "",
width: "",
zIndex: "",
})
.each(function (){
const $item=$(this);
if($item.data("placeholder")){
$item.data("placeholder").remove();
$item.removeData("placeholder");
}});
let stickyIndex=-1;
const lastItemIndex=listItems.length - 1;
const lastItem=listItems.eq(lastItemIndex);
const lastItemBottom =
lastItem.offset().top + lastItem.outerHeight();
listItems.each(function (i){
const $item=$(this);
const itemTop=$item.offset().top;
const itemHeight=$item.outerHeight();
if(itemTop - scrollTop <=stickyStart){
stickyIndex=i;
}});
const itemHeight=listItems.eq(0).outerHeight();
const totalStackHeight=(stickyIndex + 1) * itemHeight;
const shouldReleaseAll =
scrollTop + stickyStart + itemHeight >=containerBottom;
const stickyOffset=scrollTop + stickyStart - containerTop;
listItems.each(function (i){
const $item=$(this);
const itemHeight=$item.outerHeight();
const itemMargin=parseInt($item.css("margin-bottom"))||0;
if($item.data("placeholder")){
$item.data("placeholder").remove();
$item.removeData("placeholder");
}
const isLast=i===listItems.length - 1;
if(shouldReleaseAll&&isLast){
$item.css({
position: "relative",
top: "",
width: "",
opacity: 1,
});
}else if(shouldReleaseAll&&!isLast){
$item.css({
position: "relative",
top: "-" + stickyStart * 2 + "px",
});
}else if(i===stickyIndex){
$item.css({
position: "fixed",
top: stickyStart + "px",
width: containerWidth + "px",
});
const placeholder=$("<div>").css({
height: itemHeight + itemMargin + "px",
visibility: "hidden",
});
$item.data("placeholder", placeholder);
$item.after(placeholder);
}else if(i <=stickyIndex){
const distance=stickyIndex - i;
$item.css({
position: "fixed",
top: stickyStart + "px",
width: containerWidth + "px",
opacity: 1,
transition: "top 0.2s ease, opacity 0.2s ease",
});
const placeholder=$("<div>").css({
height: itemHeight + itemMargin + "px",
visibility: "hidden",
});
$item.data("placeholder", placeholder);
$item.after(placeholder);
}else{
$item.css({
position: "relative",
});
}});
listParent.css("min-height", listParent.outerHeight() + "px");
}
if(listParent.length > 0){
function isElementInViewport(el){
const rect=el.getBoundingClientRect();
return (
rect.top <=
(window.innerHeight ||
document.documentElement.clientHeight) &&
rect.bottom >=0
);
}
let ticking=false;
function onScroll(){
if(!ticking){
window.requestAnimationFrame(function (){
updateSticky();
ticking=false;
});
ticking=true;
}}
$(window).on("scroll", onScroll);
$(window).on("resize", function (){
listParent.css("min-height", "auto");
updateSticky();
listParent.css("min-height", listParent.outerHeight() + "px");
});
updateSticky();
}}
var SectionHorizontalScroll=function($scope, $){
var horizontalParent=$('.cea-horizontal-scroll-yes');
var disable_mobile=horizontalParent.data("hs-disable");
var horizontalChild=horizontalParent.children().addClass('cea-horizontal-scroll-main');
var horizontalSections=horizontalChild.children().addClass('cea-horizontal-scroll-section');
function horizontalScroll(scroll, windowWidth, windowHeight, disableMobile){
horizontalParent.each(function(){
var $this=$(this),
container=$this.find('.e-con, .e-container').eq(0),
containerTop=$this.offset().top,
totalWidth=0,
extraWidth=0,
passed=scroll - containerTop,
translate=passed,
minHeight=$this.css('--min-height') ? $this.css('--min-height'):'100vh';
container.children('.elementor-element').each(function(){
totalWidth +=$(this).outerWidth() + parseFloat($(this).css('margin-left')) + parseFloat($(this).css('margin-right'));
});
if(windowWidth <=1440&&disableMobile){
totalWidth=windowWidth;
$this.addClass('hs-disabled');
}else{
$this.removeClass('hs-disabled');
}
$this.addClass('e-con-full');
if($this.hasClass('e-con-boxed')){
$this.removeClass('e-con-boxed');
}
$this.attr('total-width', totalWidth);
if(totalWidth > windowWidth){
extraWidth=totalWidth - windowWidth;
}
$this.height('calc(' + minHeight + ' + ' + extraWidth + 'px)');
if(passed < 0){
translate=0;
}
if(passed > extraWidth){
translate=extraWidth;
}
var progress=translate / extraWidth;
if(progress <=0){
$this.removeClass('fixed bottom');
}
if(progress > 0&&progress < 1){
$this.addClass('fixed');
$this.removeClass('bottom');
}
if(progress >=1){
$this.removeClass('fixed');
$this.addClass('bottom');
}
container.css('transform', 'translateX(-' + translate + 'px)');
$this.css('--progress', progress);
if($this.css('--progress-bar')&&$this.css('--progress-bar')==='true'){
$this.removeClass('progress-bar-disabled');
}else{
$this.addClass('progress-bar-disabled');
}});
}
function scrollActivity(delayCall=true){
var scroll=$(window).scrollTop(),
windowWidth=$(window).width(),
windowHeight=$('.cea-100vh').height();
let disableMobile=false;
if(disable_mobile=='yes'){
disableMobile=true;
}else{
disableMobile=false;
}
lastTime=new Date();
setTimeout(function(){
currentTime=new Date();
if(currentTime - lastTime > 200&&delayCall){
scrollActivity(false);
}}, 500);
horizontalScroll(scroll, windowWidth, windowHeight, disableMobile);
}
if(horizontalParent.length){
$(window).on('load resize scroll', scrollActivity);
}}
var SectionTextRevealAnimation=function($scope, $){
if($('.text-reveal-yes').length){
$('.text-reveal-yes').each(function(){
var text_ele=$(this);
var settings=text_ele.data('tag');
var disableRepeat=text_ele.data("animate-repeat");
var disableMobile=text_ele.data("disable-mobile");
var textTag=settings.textTag;
var styleType=(settings.styleType) ? settings.styleType:'none';
var animationDelay=(settings.aniDelay) ? settings.aniDelay:0.005;
var textContent=text_ele.find(textTag);
var observer;
function textRevealAnimation(){
if(observer){
observer.disconnect();
}
const deviceWidth=$(window).width();
const isMobile=deviceWidth < 768;
if(isMobile&&disableMobile==='yes'){
textContent.removeClass(styleType).removeClass('animated-section-title');
return;
}
observer=new IntersectionObserver(function (entries){
entries.forEach(function (entry){
if(disableRepeat==='yes'){
if(entry.isIntersecting){
$(entry.target).addClass(styleType);
$(entry.target).css("opacity", 1);
setInterval(function(){
$(entry.target).addClass("animated-section-title");
}, 500);
}}else{
if(entry.isIntersecting){
$(entry.target).removeClass('animated-section-title');
$(entry.target).addClass(styleType);
$(entry.target).css("opacity", 1);
setInterval(function(){
$(entry.target).addClass("animated-section-title");
}, 500);
}else{
textContent.css("opacity", 0);
$(entry.target).removeClass(styleType);
$(entry.target).removeClass('animated-section-title');
}}
});
}, {
threshold: 0.5
});
observer.observe(textContent[0]);
if(styleType!=="none"){
const isRTL=$('html').attr('dir')==='rtl';
textContent.css({
direction: 'ltr',
'unicode-bidi': 'isolate'
});
const textSplitter=new SplitType(textContent[0], {
types: "words, chars"
});
const animate_text=textContent.find(".char");
animate_text.each(function (index){
$(this).css({
animationDelay: (index + 1) * animationDelay + "s",
});
});
textContent.css("opacity", 0);
}
$(window).trigger('resize');
}
if(textContent.length > 0){
textRevealAnimation();
$(window).on('load', function(){
textRevealAnimation();
});
}});
}}
function ceaListStep(liststep_ele){
const $container=$(liststep_ele);
const $items=$container.find(".list-step-item");
const $content=$container.find(".list-step-content");
$container.css("min-height", $container.outerHeight() + "px");
function updateSticky(){
const $parentTop=parseFloat($container.css("--stack-top"));
const stickyStart=$parentTop;
const wrapContainer=$container.data("wrap");
const $width=$(window).width();
if(wrapContainer=="mobile"){
if($width < 767){
$content.addClass("flex-column");
}else{
$content.removeClass("flex-column");
}}
else if(wrapContainer=="tablet"){
if($width < 1024){
$content.addClass("flex-column");
}else{
$content.removeClass("flex-column");
}}else{
}
if($container.data("hide-sm")=="yes"){
$items.find(".list-step-left").addClass("hide-on-mobile");
}
if(!isElementInViewport($container[0])) return;
const scrollTop=$(window).scrollTop();
const containerTop=$container.offset().top;
const containerHeight=$container.outerHeight();
const containerBottom=containerTop + containerHeight;
$items
.css({
position: "",
top: "",
width: "",
zIndex: "",
})
.each(function (){
const $item=$(this);
if($item.data("placeholder")){
$item.data("placeholder").remove();
$item.removeData("placeholder");
}});
let stickyIndex=-1;
const lastItemIndex=$items.length - 1;
const lastItem=$items.eq(lastItemIndex);
const lastItemBottom=lastItem.offset().top + lastItem.outerHeight();
$items.each(function (i){
const $item=$(this);
const itemTop=$item.offset().top;
const itemHeight=$item.outerHeight();
if(itemTop - scrollTop <=stickyStart){
stickyIndex=i;
}});
const itemHeight=$items.eq(0).outerHeight();
const totalStackHeight=(stickyIndex + 1) * itemHeight;
const shouldReleaseAll=scrollTop + stickyStart + itemHeight >=containerBottom;
const stickyOffset=scrollTop + stickyStart - containerTop;
$items.each(function (i){
const $item=$(this);
const itemHeight=$item.outerHeight();
const itemMargin=parseInt($item.css("margin-bottom"))||0;
if($item.data("placeholder")){
$item.data("placeholder").remove();
$item.removeData("placeholder");
}
const isLast=i===$items.length - 1;
if(shouldReleaseAll&&isLast){
$item.css({
position: "relative",
top: "",
width: "",
opacity: 1,
});
}else if(shouldReleaseAll&&!isLast){
$item.css({
position: "relative",
top: "-" + stickyStart + "px",
});
}else if(i===stickyIndex){
$item.css({
position: "fixed",
top: stickyStart + "px",
width: $container.width() + "px",
});
const placeholder=$("<div>").css({
height: itemHeight + itemMargin + "px",
visibility: "hidden",
});
$item.data("placeholder", placeholder);
$item.after(placeholder);
}else if(i <=stickyIndex){
const distance=stickyIndex - i;
$item.css({
position: "fixed",
top: stickyStart + "px",
width: $container.width() + "px",
opacity: 1,
transition: "top 0.3s ease, opacity 0.3s ease",
});
const placeholder=$("<div>").css({
height: itemHeight + itemMargin + "px",
visibility: "hidden",
});
$item.data("placeholder", placeholder);
$item.after(placeholder);
}else{
$item.css({
position: "relative",
});
}});
$container.css("min-height", $container.outerHeight() + "px");
}
function isElementInViewport(el){
const rect=el.getBoundingClientRect();
return (
rect.top <=
(window.innerHeight ||
document.documentElement.clientHeight) &&
rect.bottom >=0
);
}
let ticking=false;
function onScroll(){
if(!ticking){
window.requestAnimationFrame(function (){
updateSticky();
ticking=false;
});
ticking=true;
}}
$(window).on("scroll", onScroll);
$(window).on("resize", function (){
$container.css("min-height", "auto");
updateSticky();
$container.css("min-height", $container.outerHeight() + "px");
});
updateSticky();
}
function ceaBubbleFloat(bubblefloat_ele){
var bubblefloat_ele=$(bubblefloat_ele);
const canvas=bubblefloat_ele.find("#matter-bubbles-canvas")[0];
var bubblesData=bubblefloat_ele.data('bubbles');
if(typeof bubblesData==="string"){
bubblesData=JSON.parse(bubblesData);
}
const { Engine, Render, Runner, Bodies, Composite, Mouse, MouseConstraint }=Matter;
const engine=Engine.create();
const world=engine.world;
world.gravity.y=1;
const width=bubblefloat_ele.width();
const height=bubblefloat_ele.height();
canvas.width=width;
canvas.height=height;
const render=Render.create({
canvas,
engine,
options: {
width: width,
height: height,
wireframes: false,
background: 'none'
}});
Render.run(render);
Runner.run(Runner.create(), engine);
const bubbles=[];
for (let i=0; i < bubblesData.length; i++){
const data=bubblesData[i];
const radius=data.size ? parseInt(data.size):90;
const spacing=80;
const x=Math.random() * (width - 2 * radius) + radius;
const y=100 + i * spacing;
let bubble;
if(data.shape==='rectangle'){
bubble=Bodies.rectangle(x, y, radius * 2, radius * 2, {
restitution: 0.9,
friction: 0.001,
inertia: Infinity,
density: 0.001,
render: {
visible: false,
}});
bubble.circleRadius=radius;
}else if(data.shape==='polygon'){
const sides=data.sides ? parseInt(data.sides):5;
bubble=Bodies.polygon(x, y, sides, radius, {
restitution: 0.9,
friction: 0.001,
inertia: Infinity,
density: 0.001,
render: {
visible: false,
}});
bubble.circleRadius=radius;
}else{
bubble=Bodies.circle(x, y, radius, {
restitution: 0.9,
friction: 0.001,
inertia: Infinity,
density: 0.001,
render: {
visible: false,
}});
bubble.circleRadius=radius;
}
bubble.label=data.text;
bubble.bubbleStyle=data;
Composite.add(world, bubble);
bubbles.push(bubble);
}
const wallOptions={
isStatic: true,
render: {
visible: false
}};
const ground=Bodies.rectangle(width / 2, height + 20, width, 40, wallOptions);
const leftWall=Bodies.rectangle(-20, height / 2, 40, height, wallOptions);
const rightWall=Bodies.rectangle(width + 20, height / 2, 40, height, wallOptions);
const ceiling=Bodies.rectangle(width / 2, -20, width, 40, wallOptions);
Composite.add(world, [ground, leftWall, rightWall, ceiling]);
const isTouchDevice='ontouchstart' in window||navigator.maxTouchPoints > 0;
const mouse=Mouse.create(render.canvas);
const mouseConstraint=MouseConstraint.create(engine, {
mouse,
constraint: {
stiffness: 0.2,
render: { visible: false }}
});
if(!isTouchDevice){
Composite.add(world, mouseConstraint);
}
render.mouse=mouse;
let hoveredBubble=null;
canvas.addEventListener('mousemove', function(event){
const rect=canvas.getBoundingClientRect();
const mouseX=event.clientX - rect.left;
const mouseY=event.clientY - rect.top;
hoveredBubble=null;
for (let bubble of bubbles){
const dx=mouseX - bubble.position.x;
const dy=mouseY - bubble.position.y;
if(Math.sqrt(dx * dx + dy * dy) < bubble.circleRadius){
hoveredBubble=bubble;
break;
}}
});
canvas.addEventListener('wheel', (e)=> {
}, { passive: true });
Matter.Events.on(render, 'afterRender', ()=> {
const ctx=render.context;
for (let bubble of bubbles){
const pos=bubble.position;
const style=(bubble===hoveredBubble&&bubble.bubbleStyle.color_hover) ? {
fill: bubble.bubbleStyle.background_hover,
stroke: bubble.bubbleStyle.border_hover,
text: bubble.bubbleStyle.color_hover
}:{
fill: bubble.bubbleStyle.background,
stroke: bubble.bubbleStyle.border,
text: bubble.bubbleStyle.color
};
const fontFamily=bubble.bubbleStyle.font_family||'Arial';
const fontWeight=bubble.bubbleStyle.font_weight||'normal';
const fontSize=bubble.bubbleStyle.font_size||32;
const fontSizeUnit=bubble.bubbleStyle.font_size_unit||'px';
ctx.save();
ctx.beginPath();
if(bubble.bubbleStyle.shape==='rectangle'){
ctx.rect(pos.x - bubble.circleRadius,
pos.y - bubble.circleRadius,
bubble.circleRadius * 2,
bubble.circleRadius * 2
);
}else if(bubble.bubbleStyle.shape==='polygon'){
const sides=bubble.bubbleStyle.sides||5;
const radius=bubble.circleRadius;
const pos=bubble.position;
const rotation=bubble.angle||0;
for (let j=0; j < sides; j++){
const angle=(j / sides) * 2 * Math.PI - Math.PI / 2;
const px=pos.x + bubble.circleRadius * Math.cos(angle);
const py=pos.y + bubble.circleRadius * Math.sin(angle);
if(j===0) ctx.moveTo(px, py);
else ctx.lineTo(px, py);
}
ctx.closePath();
}else{
ctx.arc(pos.x, pos.y, bubble.circleRadius, 0, 2 * Math.PI);
}
ctx.fillStyle=style.fill||'#fff';
ctx.fill();
ctx.strokeStyle=style.stroke||'#000';
ctx.lineWidth=1;
ctx.stroke();
const bubbleImageCache={};
if(bubble.bubbleStyle.image){
if(!bubbleImageCache[bubble.bubbleStyle.image]){
const img=new window.Image();
img.src=bubble.bubbleStyle.image;
bubbleImageCache[bubble.bubbleStyle.image]=img;
}
const img=bubbleImageCache[bubble.bubbleStyle.image];
if(img.complete&&img.naturalWidth!==0){
ctx.save();
ctx.clip();
const shapeSize=bubble.circleRadius * 2;
const imgRatio=img.width / img.height;
const shapeRatio=1;
let drawWidth, drawHeight, dx, dy;
if(imgRatio > shapeRatio){
drawHeight=shapeSize;
drawWidth=img.width * (shapeSize / img.height);
dx=pos.x - drawWidth / 2;
dy=pos.y - drawHeight / 2;
}else{
drawWidth=shapeSize;
drawHeight=img.height * (shapeSize / img.width);
dx=pos.x - drawWidth / 2;
dy=pos.y - drawHeight / 2;
}
ctx.drawImage(img,
dx,
dy,
drawWidth,
drawHeight
);
ctx.restore();
}}else{
ctx.font=`${fontWeight} ${fontSize}${fontSizeUnit} ${fontFamily}`;
ctx.fillStyle=style.text||'#000';
ctx.textAlign='center';
ctx.textBaseline='middle';
ctx.fillText(bubble.label, pos.x, pos.y);
}
ctx.restore();
}});
}
var SectionColumnSticky=function ($scope, $){
if(jQuery('.sticky-sidebar').length){
jQuery('body').addClass('sticky-sidebar_init');
jQuery('.sticky-sidebar').each(function (){
var stickyElement=jQuery(this);
stickyElement.theiaStickySidebar({
additionalMarginTop: 150,
additionalMarginBottom: 30,
containerSelector: stickyElement.closest('.elementor-section, .elementor-column, .elementor-container'),
sidebarBehavior: 'modern',
resizeSensor: true,
minWidth: 1024
});
});
}
if(jQuery('.sticky_layout .info-wrapper').length){
jQuery('.sticky_layout .info-wrapper').each(function (){
jQuery(this).theiaStickySidebar({
additionalMarginTop: 150,
additionalMarginBottom: 150
});
});
}};
var SectionContainerOptionsHandler=function($scope, $){
if($scope.is('div')){
if($scope.is('div[data-cea-float]') ){
ceaSectionFloatParallax($scope);
}
if($scope.is('div[data-cea-raindrops]') ){
ceaSectionRainDrops($scope);
}
if($scope.is('div[data-cea-parallax-data]') ){
ceaSectionParallax($scope);
}}
};
var ColumnCustomOptionsHandler=function($scope, $){
if($scope.is('.elementor-element.elementor-column') ){
if($scope.is('.elementor-element.elementor-column[data-cea-slide]') ){
ceaContentSlider($scope);
}}
};
var WidgetToggleContentHandler=function($scope, $){
if($scope.find(".toggle-content-wrapper").length){
$scope.find('.toggle-content-wrapper').each(function(index){
ceaToggleContent(this);
});
$(window).resize(function(){
setTimeout(function(){
$scope.find('.toggle-content-wrapper').each(function(index){
ceaToggleContent(this);
});
}, 100);
});
}};
var WidgetCeaTabHandler=function($scope, $){
if($scope.find(".cea-tab-elementor-widget").length){
$scope.find('.cea-tab-elementor-widget').each(function(index){
ceaTabContent(this);
});
CeaCallEveryElement($scope)
}};
var WidgetCeaAccordionHandler=function($scope, $){
if(!window._ceaAccordionsLogged){
window._ceaAccordionsLogged=true;
var $allAccordions=$('.cea-accordion-elementor-widget');
$allAccordions.each(function(index){
ceaAccordionContent(this, index);
});
}};
var WidgetCeaDrawSVGHandler=function($scope, $){
if($scope.find(".cea-svg-draw-container").length){
$scope.find(".cea-svg-draw-container").each(function (index){
ceaDrawSVGContent(this);
});
}};
var WidgetTextImageHandler=function ($scope, $){
if($scope.find(".cea-text-image").length){
$scope.find('.cea-text-image').each(function (index){
ceaTextImageContent(this);
});
}};
var WidgetImageZoomHandler=function($scope, $){
if($scope.find('.image-zoom-scroll').length){
$scope.find('.image-zoom-scroll').each(function($index){
ceaImageZoom(this);
});
}
if($scope.find(".cea-zoom-video").length){
$scope.find(".cea-zoom-video").each(function (){
ceaVideoZoom(this);
});
}
if($scope.find("[zoom_grid_container]").length){
$scope.find("[zoom_grid_container]").each(function ($index){
ceaZoomImageGrid(this);
});
}}
var WidgetListStepHandler=function($scope, $){
if($scope.find('.list-step').length){
$scope.find('.list-step').each(function($index){
ceaListStep(this);
});
}}
var WidgetBubbleFloatHandler=function($scope, $){
if($scope.find('.cea-bubbles-widget').length){
$scope.find('.cea-bubbles-widget').each(function($index){
ceaBubbleFloat(this);
});
}}
var WidgetSwitcherContentHandler=function($scope, $){
if($scope.find(".switcher-content-wrapper").length){
$scope.find('.switcher-content-wrapper').each(function(index){
ceaSwitcherContent(this);
});
CeaCallEveryElement($scope)
}};
var WidgetCeaOffcanvasHandler=function($scope, $){
if($scope.find(".cea-offcanvas-elementor-widget").length){
$scope.find('.cea-offcanvas-elementor-widget').each(function(index){
ceaOffcanvasContent(this);
});
$(document).find(".cea-offcanvas-close").on("click", function(){
$("body").removeClass("cea-offcanvas-active");
$(this).parent(".cea-offcanvas-wrap").removeClass("active");
var ani_type=$(this).parent(".cea-offcanvas-wrap").data("canvas-animation");
if(ani_type=='left-push'){
$("body").css({"margin-left":"", "margin-right":""});
}else if(ani_type=='right-push'){
$("body").css({"margin-left":"", "margin-right":""});
}
return false;
});
}};
var WidgetSectionTitleHandler=function($scope, $){
if($scope.find('.section-title').length){
$scope.find(".section-title").each(function(index){
ceaSectionTitle(this);
});
}}
var WidgetVideoPlaylistHandler=function($scope, $){
if($scope.find('.cea-video-audio-widget').length){
$scope.find('.cea-video-audio-widget').each(function(index){
ceaVideoPlaylist(this);
});
}}
var WidgetTiltHandler=function($scope, $){
if($scope.find(".cea-tilt").length){
$scope.find('.cea-tilt').each(function(){
ceaTilt(this);
});
}};
var WidgetAllInOneHandler=function($scope, $){
CeaCallEveryElement($scope);
};
$(window).on('elementor/frontend/init', function(){
elementorFrontend.hooks.addAction('frontend/element_ready/ceaanimatedtext.default', WidgetAnimateTextHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceabutton.default', WidgetButtonHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceacircleprogress.default', WidgetCircleProgressHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceacounter.default', WidgetCounterUpHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceadaycounter.default',WidgetDayCounterHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/imagebeforeafter.default', WidgetImageBeforeAfterHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceamailchimp.default', WidgetMailchimpHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaimagegrid.default', WidgetOwlCarouselHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaimagegrid.default', WidgetPoupHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceasliderwidget.default', WidgetOwlCarouselHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceasliderwidget.default', WidgetPoupHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceamodalpopup.default', WidgetModalPopupHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceatimeline.default', WidgetAgonHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceagooglemap.default', WidgetCEAMapHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceatimelineslide.default', WidgetTimelineSliderHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceachart.default', WidgetChartHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/carousel3d.default', WidgetCloud9CarouselHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/raindrops.default', WidgetRainDropsHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceapopover.default', WidgetPopoverHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceapopupanything.default', WidgetPopupAnythingHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/togglecontent.default', WidgetToggleContentHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceatab.default', WidgetCeaTabHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaaccordion.default', WidgetCeaAccordionHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceadrawsvg.default', WidgetCeaDrawSVGHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceatextimage.default', WidgetTextImageHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaimagezoom.default', WidgetImageZoomHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/cealiststep.default', WidgetListStepHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceabubblefloat.default', WidgetBubbleFloatHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaswitchercontent.default', WidgetSwitcherContentHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaoffcanvas.default', WidgetCeaOffcanvasHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceasectiontitle.default', WidgetSectionTitleHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaposts.default', WidgetIsotopeHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaposts.default', WidgetOwlCarouselHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaposts.default', WidgetMouseCursorHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaposts.default', WidgetImageAccordionHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/cearecentpopular.default', WidgetRecentPopularToggleHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaservice.default', WidgetIsotopeHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceateam.default', WidgetIsotopeHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceatestimonial.default', WidgetIsotopeHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaevent.default', WidgetIsotopeHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceafeaturebox.default', WidgetTiltHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceacounter.default', WidgetTiltHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaimagegrid.default', WidgetTiltHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceasliderwidget.default', WidgetTiltHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaevent.default', WidgetTiltHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceateam.default', WidgetTiltHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaservice.default', WidgetTiltHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceatestimonial.default', WidgetTiltHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaportfolio.default', WidgetTiltHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceateam.default', WidgetOwlCarouselHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaevent.default', WidgetOwlCarouselHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceatestimonial.default', WidgetOwlCarouselHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaportfolio.default', WidgetIsotopeHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaportfolio.default', WidgetOwlCarouselHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaportfolio.default', WidgetPoupHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaservice.default', WidgetOwlCarouselHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/section', SectionCustomOptionsHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/container', SectionContainerOptionsHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/column', ColumnCustomOptionsHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaevent.default', WidgetCPTHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceateam.default', WidgetCPTHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceatestimonial.default', WidgetCPTHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaportfolio.default', WidgetCPTHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaservice.default', WidgetCPTHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaevent.default', WidgetImageAccordionHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceateam.default', WidgetImageAccordionHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceatestimonial.default', WidgetImageAccordionHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaportfolio.default', WidgetImageAccordionHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ceaservice.default', WidgetImageAccordionHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/contentcarousel.default', WidgetAllInOneHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/section', SectionContentParallax);
elementorFrontend.hooks.addAction('frontend/element_ready/column', SectionContentParallax);
elementorFrontend.hooks.addAction('frontend/element_ready/container', SectionContentParallax);
elementorFrontend.hooks.addAction('frontend/element_ready/section', WidgetMousePointerHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/column', WidgetMousePointerHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/container', WidgetMousePointerHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/section', SectionColumnSticky);
elementorFrontend.hooks.addAction('frontend/element_ready/column', SectionColumnSticky);
elementorFrontend.hooks.addAction('frontend/element_ready/container', SectionColumnSticky);
elementorFrontend.hooks.addAction('frontend/element_ready/section', SectionAutoActivate);
elementorFrontend.hooks.addAction('frontend/element_ready/column', SectionAutoActivate);
elementorFrontend.hooks.addAction('frontend/element_ready/container', SectionAutoActivate);
elementorFrontend.hooks.addAction('frontend/element_ready/section', SectionRowSticky);
elementorFrontend.hooks.addAction('frontend/element_ready/column', SectionRowSticky);
elementorFrontend.hooks.addAction('frontend/element_ready/container', SectionRowSticky);
elementorFrontend.hooks.addAction("frontend/element_ready/section", SectionTextRevealAnimation);
elementorFrontend.hooks.addAction("frontend/element_ready/container", SectionTextRevealAnimation);
elementorFrontend.hooks.addAction("frontend/element_ready/column", SectionTextRevealAnimation);
elementorFrontend.hooks.addAction("frontend/element_ready/section", SectionHorizontalScroll);
elementorFrontend.hooks.addAction("frontend/element_ready/container", SectionHorizontalScroll);
elementorFrontend.hooks.addAction("frontend/element_ready/column", SectionHorizontalScroll);
elementorFrontend.hooks.addAction("frontend/element_ready/section", SectionListScroll);
elementorFrontend.hooks.addAction("frontend/element_ready/container", SectionListScroll);
elementorFrontend.hooks.addAction("frontend/element_ready/column", SectionListScroll);
elementorFrontend.hooks.addAction('frontend/element_ready/ceavideoplaylist.default', WidgetVideoPlaylistHandler);
});
$(window).on('load', function(){
if(!$("body.elementor-editor-active").length){
}});
function CeaCallEveryElement($scope){
$(document).find('.cea-typing-text').each(function(index){
ceaAnimatedTextSettings(this, index);
});
$(document).find('.isotope').each(function(){
ceaIsotopeLayout(this);
});
if($(document).find('.circle-progress-circle').length){
var circle_ele=$(document).find('.circle-progress-circle');
ceaCircleProgresSettings(circle_ele);
}
$(document).find('.owl-carousel').each(function(){
ceaOwlSettings(this);
});
if($(document).find('.counter-up').length){
var counter_ele=$(document).find('.counter-up');
ceaCounterUpSettings(counter_ele);
}
$(document).find('.day-counter').each(function(){
ceaDayCounterSettings(this);
});
$(document).find('.pie-chart').each(function(){
ceaPieChartSettings(this);
});
$(document).find('.line-chart').each(function(){
ceaLineChartSettings(this);
});
if($(document).find('.modal-popup-wrapper.page-load-modal').length){
var modal_id=$(document).find('.modal-popup-wrapper.page-load-modal .modal').attr("id");
$('#'+modal_id).modal('show');
}
if($(document).find(".cloud9-carousel").length){
$(document).find('.cloud9-carousel').each(function(){
ceaCloud9Carousel(this);
});
}
if($(document).find(".canvas_agon").length){
$(document).find('.canvas_agon').each(function(){
ceaAgon(this);
});
}
if($(document).find('.cd-horizontal-timeline').length){
var cur_ele=$(document).find('.cd-horizontal-timeline');
var line_dist=cur_ele.data("distance") ? cur_ele.data("distance"):60;
cur_ele.zozotimeline({
distance: line_dist
});
}
if($(document).find(".ceagmap").length){
initCEAGmap();
}}
function cea_scroll_animation(c_elem){
setTimeout(function(){
var anim_time=300;
$(c_elem).find('.cea-animate:not(.run-animate)').each(function(){
var elem=$(this);
var bottom_of_object=elem.offset().top;
var bottom_of_window=$(window).scrollTop() + $(window).height();
if(bottom_of_window > bottom_of_object){
setTimeout(function(){
elem.addClass("run-animate");
}, anim_time);
}
anim_time +=300;
});
}, 300);
}
function ceaOffcanvasContent(offcanvas_ele){
var offcanvas_ele=$(offcanvas_ele);
if($(document).find(".cea-offcanvas-id-to-element").length&&! $("body.elementor-editor-active").length){
$(document).find(".cea-offcanvas-id-to-element").each(function(index){
var offcanvas_id_ele=$(this).data("id");
var clone_offcanvas=$("#"+offcanvas_id_ele).clone();
$(document).find("#"+offcanvas_id_ele).remove();
$(this).replaceWith(clone_offcanvas);
});
}
$(offcanvas_ele).find(".cea-offcanvas-trigger").on("click", function(){
$("body").toggleClass("cea-offcanvas-active");
var offcanvas_id=$(this).data("offcanvas-id");
if($('#'+offcanvas_id).length){
$('#'+offcanvas_id).addClass("active");
var ani_type=$('#'+offcanvas_id).data("canvas-animation");
if(ani_type=='left-push'){
$("body").css({"margin-left": $('#'+offcanvas_id).outerWidth() +"px", "margin-right": "-"+ $('#'+offcanvas_id).outerWidth() +"px"});
}else if(ani_type=='right-push'){
$("body").css({"margin-left": "-"+ $('#'+offcanvas_id).outerWidth() +"px", "margin-right": $('#'+offcanvas_id).outerWidth() +"px"});
}}
setTimeout(function(){
CeaCallEveryElement(document);
}, 350);
return false;
});
}
function ceaSectionTitle(title_ele){
var title_ele=$(title_ele);
var animationTitle=title_ele.attr('data-animation');
var disableRepeat=title_ele.data('animate-repeat');
var disableMobile=title_ele.data('disable-mobile');
var observer;
function setupAnimation(){
if(observer){
observer.disconnect();
}
const deviceWidth=$(window).width();
const isMobile=deviceWidth < 768;
if(isMobile&&disableMobile==='yes'){
title_ele.removeClass(animationTitle).removeClass('animated-section-title');
return;
}
observer=new IntersectionObserver(function (entries){
entries.forEach(function (entry){
if(disableRepeat==='yes'){
if(entry.isIntersecting){
$(entry.target).addClass(animationTitle);
setTimeout(function (){
$(entry.target).addClass("animated-section-title");
}, 500);
}}else{
if(entry.isIntersecting){
$(entry.target).removeClass('animated-section-title');
$(entry.target).addClass(animationTitle);
setTimeout(function (){
$(entry.target).addClass("animated-section-title");
}, 500);
}else{
$(entry.target).removeClass(animationTitle).removeClass('animated-section-title');
}}
});
}, {
threshold: 0.5
});
observer.observe(title_ele[0]);
if(animationTitle!=='none'){
var textSplitter=new SplitType(title_ele, {
types: "words, chars"
});
if(title_ele.hasClass("cea-nrml")){
var letter_animate=title_ele.find(".char");
letter_animate.each(function (index){
$(this).css({
animationDelay: (index + 1) * 0.05 + "s",
});
});
}}
}
setupAnimation();
$(window).on('resize', function (){
setupAnimation();
});
}
function ceaSwitcherContent(switcher_ele){
var switcher_ele=$(switcher_ele);
if(switcher_ele.find(".cea-switcher-id-to-element").length&&! $("body.elementor-editor-active").length){
switcher_ele.find(".cea-switcher-id-to-element").each(function(index){
var switcher_id_ele=$(this).data("id");
var clone_tab=$("#"+switcher_id_ele).clone();
$(document).find("#"+switcher_id_ele).remove();
$(this).replaceWith(clone_tab);
});
}
$(switcher_ele).find(".switch-checkbox").on("change", function(){
$(switcher_ele).find(".cea-switcher-content > div").fadeOut(0);
if(this.checked){
$(this).parents("ul").find("li").removeClass("switcher-active");
$(this).parents("ul").find(".cea-secondary-switch").addClass("switcher-active");
$(switcher_ele).find(".cea-switcher-content > div.cea-switcher-secondary").fadeIn(350);
}else{
$(this).parents("ul").find("li").removeClass("switcher-active");
$(this).parents("ul").find(".cea-primary-switch").addClass("switcher-active");
$(switcher_ele).find(".cea-switcher-content > div.cea-switcher-primary").fadeIn(350);
}});
}
function ceaAccordionContent(accordion_ele, index){
var accordion_ele=$(accordion_ele);
if(accordion_ele.find(".cea-accordion-id-to-element").length&&!$("body.elementor-editor-active").length){
accordion_ele.find(".cea-accordion-id-to-element").each(function(index){
var accordion_id_ele=$(this).data("id");
var clone_tab=$("#" + accordion_id_ele).clone();
$(document).find("#" + accordion_id_ele).remove();
$(this).replaceWith(clone_tab);
});
}
$(accordion_ele).find(".cea-accordion-header a").on("click", function(){
var cur_tab=$(this);
var accordion_id=$(cur_tab).attr("href");
var accordion_wrap=$(cur_tab).parents(".cea-accordion-elementor-widget");
if($(accordion_wrap).data("toggle")==1){
$(accordion_wrap).find(".cea-accordion-header a").toggleClass("active");
$(accordion_wrap).find(accordion_id).slideToggle(350);
}else{
if(!cur_tab.hasClass("active")){
$(accordion_wrap).find(".cea-accordion-header a").removeClass("active");
$(cur_tab).addClass("active");
$(accordion_wrap).find(".cea-accordion-content").slideUp(350);
$(accordion_wrap).find(accordion_id).slideDown(350);
}else{
$(cur_tab).removeClass("active");
$(accordion_wrap).find(".cea-accordion-content").slideUp(350);
}}
return false;
});
var randId=index + 1;
$("#search-input-" + randId).on("keyup", function(){
var searchTerm=$(this).val().toLowerCase();
$("#cea-accordion-" + randId + " .cea-accordion").each(function(){
var questionText=$(this).find(".cea-accordion-header a").text().toLowerCase();
var answerText=$(this).find(".cea-accordion-content .cea-accordion-pane").text().toLowerCase();
if(questionText.includes(searchTerm)||answerText.includes(searchTerm)){
$(this).show();
}else{
$(this).hide();
}});
});
}
function ceaDrawSVGContent(drawsvg_ele){
const draw_svg=$(drawsvg_ele);
if(!draw_svg.hasClass("cea-svg-animated")){
return;
}
const duration=draw_svg.data("svg");
const shouldPauseOnHover=draw_svg.data("hover-pause");
let animate_type="";
if(draw_svg.hasClass("cea-draw-svg-on-load")){
animate_type="onLoad";
}else if(draw_svg.hasClass("cea-draw-svg-on-scroll")){
animate_type="onScroll";
}else if(draw_svg.hasClass("cea-draw-svg-on-hover")){
animate_type="onHover";
}
const svg_ele=draw_svg.find("svg");
const path=svg_ele.find("path");
if(!path.length) return;
const totalLength=path[0].getTotalLength();
path.css({
"stroke-dasharray": totalLength,
"stroke-dashoffset": totalLength,
transition: "stroke-dashoffset 0.02s ease-out",
});
let isPaused=false;
let animationFrameId=null;
function animateOnLoad(path, totalLength, shouldPauseOnHover){
let timeoutId=null;
let startTime=null;
let remainingTime=duration * 1000;
let isDrawing=false;
let rafId=null;
function animate(offsetFrom, offsetTo, time, callback){
path.css({
"stroke-dasharray": totalLength,
"stroke-dashoffset": offsetFrom,
transition: `stroke-dashoffset ${time / 1000}s linear`,
});
path[0].getBoundingClientRect();
path.css("stroke-dashoffset", offsetTo);
startTime=Date.now();
remainingTime=time;
timeoutId=setTimeout(()=> {
callback();
}, time + 50);
}
function draw(){
isDrawing=true;
animate(totalLength, 0, duration * 1000, ()=> {
erase();
});
}
function erase(){
isDrawing=false;
animate(0, totalLength, duration * 1000, ()=> {
draw();
});
}
function pauseAnimation(){
const elapsed=Date.now() - startTime;
remainingTime -=elapsed;
const computedOffset=parseFloat(
getComputedStyle(path[0]).strokeDashoffset
);
path.css({
transition: "none",
"stroke-dashoffset": computedOffset,
});
clearTimeout(timeoutId);
cancelAnimationFrame(rafId);
}
function resumeAnimation(){
const currentOffset=parseFloat(
getComputedStyle(path[0]).strokeDashoffset
);
const targetOffset=isDrawing ? 0:totalLength;
animate(currentOffset, targetOffset, remainingTime, ()=> {
if(isDrawing){
erase();
}else{
draw();
}});
}
if(shouldPauseOnHover=="yes"){
path.parent().on("mouseenter", pauseAnimation);
path.parent().on("mouseleave", resumeAnimation);
}
erase();
}
function animateOnScroll(svgEle, path, totalLength){
function updateDraw(){
const svgTop=svgEle.offset().top;
const scrollTop=$(window).scrollTop();
const windowHeight=$(window).height();
const scrollY=scrollTop;
const elementTopInView=svgTop - scrollY;
const startTrigger=windowHeight * 0.7;
const endTrigger=windowHeight * 0.3;
let progress =
(startTrigger - elementTopInView) /
(startTrigger - endTrigger);
progress=Math.min(Math.max(progress, 0), 1);
progress=Math.pow(progress, 0.9);
path.css("transition", "none");
path.css("stroke-dashoffset", totalLength * (1 - progress));
}
$(window).on("scroll resize", updateDraw);
updateDraw();
}
function animateOnHover(path, totalLength, duration){
let direction=1;
let animationFrameId=null;
let lastTimestamp=null;
let progress=0;
let isHovering=false;
function animate(timestamp){
if(!isHovering) return;
if(!lastTimestamp) lastTimestamp=timestamp;
const deltaTime=(timestamp - lastTimestamp) / 1000;
lastTimestamp=timestamp;
progress +=(deltaTime / duration) * direction;
progress=Math.max(0, Math.min(1, progress));
path.css("stroke-dashoffset", totalLength * (1 - progress));
if(progress===1||progress===0){
direction *=-1;
}
animationFrameId=requestAnimationFrame(animate);
}
path.parent().hover(function (){
if(!isHovering){
isHovering=true;
lastTimestamp=null;
animationFrameId=requestAnimationFrame(animate);
}},
function (){
isHovering=false;
if(animationFrameId){
cancelAnimationFrame(animationFrameId);
animationFrameId=null;
lastTimestamp=null;
}}
);
path.css({
"stroke-dasharray": totalLength,
"stroke-dashoffset": totalLength,
});
}
if(animate_type=="onLoad"){
animateOnLoad(path, totalLength, shouldPauseOnHover);
}else if(animate_type=="onScroll"){
animateOnScroll(svg_ele, path, totalLength);
}else if(animate_type=="onHover"){
animateOnHover(path, totalLength, duration);
}}
function ceaTextImageContent(textimage_ele){
var textimage_ele=$(textimage_ele);
var settings=textimage_ele.data("settings");
var ele_cls=settings.element_cls;
var wid_cls=settings.widget_cls;
var img_animation=settings.img_animation;
var animation_delay=settings.ani_delay;
function ceaTextresize(){
var mobileDisable=textimage_ele.data("mobile-hide");
var $width=$(window).width();
if(mobileDisable=="yes"&&$width <=768){
$(".cursor-image").remove();
}else{
var cursorContainer=$(
'<div class="cursor-image animate__animated animate__' +
img_animation +
" " +
ele_cls +
'" data-delay="' +
animation_delay +
'"></div></div>'
);
$("body").append(cursorContainer);
var widgetContainer=$('<div class="' + wid_cls + '">');
cursorContainer.html(widgetContainer);
const key=[];
for (const i in settings.link_image){
key.push(i);
}
key.forEach((value)=> {
value=value.replace(/[.,]/g, '_');
textimage_ele
.find("." + value)
.on("mousemove", function (event){
widgetContainer.html('<img class="cursor-photo" src="' +
settings.link_image[value] +
'" alt="img-' +
value +
'">'
);
cursorContainer.css({
top: event.clientY + "px",
left: event.clientX + "px",
display: "block",
});
});
textimage_ele
.find("." + value)
.on("mouseleave", function (){
cursorContainer.css({
display: "none",
});
});
});
}}
$(window).on("resize", ceaTextresize);
ceaTextresize();
}
function ceaTabContent(tabs_ele){
var tabs_ele=$(tabs_ele);
if(tabs_ele.find(".cea-tab-id-to-element").length&&! $("body.elementor-editor-active").length){
tabs_ele.find(".cea-tab-id-to-element").each(function(index){
var tab_id_ele=$(this).data("id");
var clone_tab=$("#"+tab_id_ele).clone();
$(document).find("#"+tab_id_ele).remove();
$(this).replaceWith(clone_tab);
});
}
function checkMobileAccordion(){
const deviceWidth=$(window).width();
const isMobile=deviceWidth <=500;
if(isMobile){
tabs_ele.addClass("cea-mobile-accordion");
tabs_ele.find('.tab-content.cea-tab-content').hide();
tabs_ele.find(".cea-tabs a").each(function(){
const $tab=$(this);
const $tabID=$tab.attr("href");
const $content=tabs_ele.find($tabID);
$content.insertAfter($tab);
$content.addClass('tab-content');
$content.addClass('cea-accordion-content');
if(!$tab.hasClass('active')){
$content.hide();
}});
}else{
tabs_ele.removeClass('cea-mobile-accordion');
tabs_ele.find('.tab-content.cea-tab-content').show();
const $tabContent=tabs_ele.find('.cea-tab-content');
tabs_ele.find('.cea-accordion-content').appendTo($tabContent);
tabs_ele.find('.cea-accordion-content').removeClass('cea-accordion-content');
tabs_ele.find('.cea-tabs a').removeClass('active');
tabs_ele.find('.cea-tabs a:first').addClass('active');
tabs_ele.find('.cea-tab-pane').removeClass('active').hide();
tabs_ele.find('.cea-tab-pane:first').addClass('active').show();
}}
checkMobileAccordion();
$(window).on('resize', checkMobileAccordion);
function observeChartAnimation($scope){
$scope.find('canvas.pie-chart, canvas.line-chart').each(function(){
const canvas=this;
if(canvas._ceaObserved) return;
canvas._ceaObserved=true;
const observer=new IntersectionObserver((entries)=> {
entries.forEach(entry=> {
if(entry.isIntersecting){
if(canvas.chartInstance){
canvas.chartInstance.destroy();
}
if(canvas.chartConfig){
canvas.chartInstance=new Chart(canvas.getContext('2d'), canvas.chartConfig);
}}
});
}, { threshold: 0.5 });
observer.observe(canvas);
});
}
observeChartAnimation(tabs_ele);
$(tabs_ele).find(".cea-tabs a").on("click", function(){
var cur_tab=$(this);
var tab_id=$(cur_tab).attr("href");
const isMobile=$(window).width() <=500;
$(cur_tab).parents(".cea-tabs").find("a").removeClass("active");
$(cur_tab).addClass("active");
if(isMobile){
const $content=tabs_ele.find(tab_id);
tabs_ele.find('.cea-tab-pane').not($content).slideUp(350).removeClass("active");
$content.slideToggle(350, function(){
$content.addClass("active");
observeChartAnimation($(this));
});
}else{
var tab_content_wrap=$(cur_tab).parents(".cea-tabs").next(".cea-tab-content");
$(tab_content_wrap).find(".cea-tab-pane").fadeOut(0);
$(tab_content_wrap).find(".cea-tab-pane").removeClass("active");
$(tab_content_wrap).find(tab_id).fadeIn(350, function(){
$(tab_content_wrap).find(tab_id).addClass("active");
observeChartAnimation($(this));
});
}
return false;
});
}
function ceaToggleContent(toggle_ele){
var toggle_ele=$(toggle_ele).find(".toggle-content");
$(toggle_ele).css('max-height', '');
$(toggle_ele).removeClass("toggle-content-shown");
var c=parseFloat($(toggle_ele).css("line-height"));
var line_height=c.toFixed(2);
var data_hght=$(toggle_ele).data("height");
data_hght=data_hght ? data_hght:5;
var toggle_hgt=data_hght * line_height;
toggle_hgt=toggle_hgt.toFixed(2);
toggle_hgt=toggle_hgt + 'px';
var org_hgt=$(toggle_ele).height();
$(toggle_ele).css('max-height', toggle_hgt);
$(toggle_ele).addClass("toggle-content-shown");
var btn_txt_wrap=$(toggle_ele).parents(".toggle-content-inner").find(".toggle-btn-txt");
var btn_org_txt=$(btn_txt_wrap).text();
var btn_atl_txt=$(toggle_ele).parents(".toggle-content-inner").find(".toggle-content-trigger").data("less");
$(toggle_ele).parents(".toggle-content-inner").find(".toggle-content-trigger").unbind("click");
$(toggle_ele).parents(".toggle-content-inner").find(".toggle-content-trigger").bind("click", function(e){
event.preventDefault();
$(toggle_ele).toggleClass("height-expandable");
$(toggle_ele).parent(".toggle-content-inner").find('.toggle-content-trigger .button-inner-down').fadeToggle(0);
$(toggle_ele).parent(".toggle-content-inner").find('.toggle-content-trigger .button-inner-up').fadeToggle(0);
if($(toggle_ele).hasClass("height-expandable")){
$(toggle_ele).css('max-height', org_hgt);
$(btn_txt_wrap).text(btn_atl_txt);
}else{
$(toggle_ele).css('max-height', toggle_hgt);
$(btn_txt_wrap).text(btn_org_txt);
}});
}
function ceazozotimeline(cur_ele){
var cur_ele=$(cur_ele);
var line_dist=cur_ele.data("distance") ? cur_ele.data("distance"):60;
cur_ele.zozotimeline({
distance: line_dist
});
}
function ceaContentSlider(slide_ele){
var slide_ele=$(slide_ele);
var slide_json=JSON.parse(decodeURIComponent(slide_ele.attr("data-cea-slide")));
var children_ele=slide_ele.children(".elementor-column-wrap").children(".elementor-widget-wrap");
$(children_ele).addClass("owl-carousel");
ceaOwlJsonSettings(children_ele, slide_json);
}
function ceaSectionRainDrops(rd_ele){
rd_ele.addClass("section-raindrops-actived");
var rd_json=JSON.parse(decodeURIComponent(rd_ele.attr("data-cea-raindrops")));
rd_ele.append('<div class="cea-raindrops-wrap"></div>');
var rd_color=rd_json.rd_color;
var rd_height=rd_json.rd_height;
var rd_speed=rd_json.rd_speed;
var rd_freq=rd_json.rd_freq;
var rd_density=rd_json.rd_density;
var rd_id=rd_json.id;
var rd_pos=rd_json.rd_pos;
if(rd_pos=="top"){
rd_ele.find(".cea-raindrops-wrap").css({"top":"-"+ rd_height +"px"});
}else{
rd_ele.find(".cea-raindrops-wrap").css({"bottom":"0"});
}
rd_ele.find(".cea-raindrops-wrap").css("height", rd_height + "px");
var rain_ele=rd_ele.find(".cea-raindrops-wrap").raindrops({
color: rd_color,
canvasHeight: rd_height,
rippleSpeed: rd_speed,
frequency: rd_freq,
density: rd_density,
positionBottom: '0'
});
}
var SectionRowSticky=function ($scope, $){
if($(".sticky-row").length > 0){
var headerHeight=$('.site-header').height();
if($(window).width() < 1024&&headerHeight==0){
headerHeight=60;
}
if($("#wpadminbar").length){
var adminHead=$("#wpadminbar").height();
headerHeight=headerHeight + adminHead;
}
$(".sticky-row").each(function (){
var stickyRow=$(this);
stickyRow.ceaRowSticky({
additionalMarginTop: headerHeight,
additionalMarginBottom: 30,
});
});
}};
var SectionAutoActivate=function ($scope, $){
if($(".auto-activate").length){
$(".auto-activate").each(function (){
const autoActivate=$(this);
let autoItems=autoActivate.find(".elementor-widget-container"
);
if(autoItems.length===0) autoItems=autoActivate.find(".elementor-widget");
autoItems.addClass("auto-items");
autoItems.each(function (index){
$(this).attr("data-target",
"active-content-" + (index + 1)
);
});
autoItems.eq(0).addClass("active-auto");
const contentContainer=autoActivate.siblings();
const contentItems=contentContainer.find(".e-child");
contentItems.each(function (index){
$(this).attr("id", "active-content-" + (index + 1));
});
const $content=contentContainer.find("[id^='active-content']");
let lastDeviceWidth=$(window).width();
function updateLayout(){
const deviceWidth=$(window).width();
if(deviceWidth <=1024&&lastDeviceWidth > 1024){
autoItems.removeClass("auto-items");
autoActivate.addClass("auto-activate-column");
contentContainer.hide();
$content.each(function (index){
$(this).insertAfter(autoItems.eq(index));
});
}else if(deviceWidth > 1024&&lastDeviceWidth <=1024){
autoItems.addClass("auto-items");
autoActivate.removeClass("auto-activate-column");
contentContainer.show();
$content.appendTo(contentContainer);
}
lastDeviceWidth=deviceWidth;
}
function updateScrollState(){
const deviceWidth=$(window).width();
if(deviceWidth <=1024) return;
const activeHeight=$(".active-auto").outerHeight()||0;
const scrollPosition=$(window).scrollTop() + activeHeight;
let activeNow=null;
contentItems.each(function (){
const $el=$(this);
const top=$el.offset().top;
const bottom=top + $el.outerHeight();
if(scrollPosition >=top&&scrollPosition < bottom){
activeNow=$el.attr("id");
return false;
}});
if(activeNow){
autoItems.removeClass("active-auto");
autoItems.each(function (){
if($(this).data("target")===activeNow){
$(this).addClass("active-auto");
return false;
}});
}}
let ticking=false;
function onScrollOrResize(){
if(!ticking){
window.requestAnimationFrame(function (){
updateLayout();
updateScrollState();
ticking=false;
});
ticking=true;
}}
updateLayout();
updateScrollState();
$(window).on("scroll", onScrollOrResize);
$(window).on("resize", onScrollOrResize);
});
}};
var SectionContentParallax=function ($scope, $){
if($('.content-parallax-yes').length){
$('.content-parallax-yes').each(function (){
var contentParallax=$(this);
var parallaxData=contentParallax.data("parallax-ctrl");
var dataDepth=parallaxData['data_depth'];
var parallaxIndex=parallaxData['parallax_index'];
var parallaxHoverOnly=parallaxData['parallax_hover_only'];
var parallaxScaleX=parallaxData['scale_x'];
var parallaxScaleY=parallaxData['scale_y'];
var parallaxFrictionX=parallaxData['friction_x'];
var parallaxFrictionY=parallaxData['friction_y'];
if(contentParallax.find('.e-con-inner')){
contentParallax.find('.e-con-inner').css({
width: parallax_full_width + 'vw',
});
contentParallax.find('.e-con-inner').removeClass('e-con-inner');
}
contentParallax.css({ 'z-index': parallaxIndex });
var parallexContainer=contentParallax.find(".elementor-widget");
parallexContainer.addClass('parallax-container');
var parallaxItem=contentParallax.find('.elementor-widget-container');
if(contentParallax.hasClass('parallax-img-full-width')){
var parallax_full_width=parallaxData['img_full_width'];
var parallax_full_left=parallaxData['img_full_left'];
contentParallax.css({
left: '-' + parallax_full_left + '%',
});
contentParallax.css({
width: parallax_full_width + 'vw',
});
parallexContainer.css({
width: parallax_full_width + 'vw',
});
parallaxItem.css({
width: parallax_full_width + 'vw',
});
parallaxItem.find('img').css({
width: parallax_full_width + 'vw',
});
}
parallaxItem.attr('data-depth', dataDepth);
parallexContainer.each(function(){
var parallaxInstance=new Parallax(this, {
relativeInput: true,
hoverOnly: parallaxHoverOnly,
scalarX: parallaxScaleX,
scalarY: parallaxScaleY,
frictionX: parallaxFrictionX,
frictionY: parallaxFrictionY,
});
});
parallexContainer.css({
'pointer-events': 'auto',
});
});
}};
function ceaSectionParallax(pr_ele){
var pr_ele=$(pr_ele);
var pr_json=JSON.parse(decodeURIComponent(pr_ele.attr("data-cea-parallax-data")));
var parallax_ratio=pr_json.parallax_ratio;
var parallax_img=pr_json.parallax_image;
pr_ele.prepend('<div class="cea-parallax" data-cea-parallax data-speed="'+ parallax_ratio +'" style="background-image:url('+ parallax_img +')"></div>');
var $fwindow=$(window);
var scrollTop=window.pageYOffset||document.documentElement.scrollTop;
$fwindow.on('scroll resize', function(){
scrollTop=window.pageYOffset||document.documentElement.scrollTop;
});
$(pr_ele).find('.cea-parallax').each(function(){
var $backgroundObj=$(this);
var bgOffset=parseInt($backgroundObj.offset().top);
var yPos;
var coords;
var speed=($backgroundObj.data('speed')||0);
$fwindow.on('scroll resize', function(){
yPos=- ((scrollTop - bgOffset) / speed);
coords='10% '+ yPos + 'px';
$backgroundObj.css({ backgroundPosition: coords });
});
});
$fwindow.trigger('scroll');
}
function ceaSectionFloatParallax(pr_ele){
var pr_ele=$(pr_ele);
var pr_json=JSON.parse(decodeURIComponent(pr_ele.attr("data-cea-float")));
var data_id=pr_ele.attr("data-id");
var fload_id=parseInt(data_id, 16);
$.each(pr_json, function(idx, obj){
var float_title=obj.float_title;
var float_img=obj.float_img;
var float_left=obj.float_left;
var float_top=obj.float_top;
var float_distance=obj.float_distance;
var float_animation=obj.float_animation;
var float_mouse=obj.float_mouse;
var float_width=obj.float_width;
var classname=float_animation!='0' ? ' floating-animate-model-' + float_animation:'';
pr_ele.prepend('<div id="float-parallax-'+ fload_id +'" class="float-parallax'+  classname  +'" data-mouse="'+  float_mouse  +'" data-left="'+  float_left  +'" data-top="'+  float_top  +'" data-distance="'+  float_distance  +'"><img alt="'+  float_title  +'" src="'+ float_img  +'" /></div>');
$("#float-parallax-"+fload_id).ceaparallax({
t_top: float_top,
t_left: float_left,
x_level: float_distance,
y_level: float_distance,
mouse_animation: float_mouse,
ele_width: float_width
});
fload_id++;
});
}
function ceaModalPopup(popup_ele){
var popup_ele=$(popup_ele);
popup_ele.magnificPopup({
type: 'inline',
preloader: false,
modal: true,
mainClass: 'mfp-fade',
removalDelay: 300
});
}
function ceaVideoPlaylist(cur_video){
var cur_video=$(cur_video);
(function($){
$(document).ready(function(){
$autoplay=cur_video.data('autoplay');
muted=cur_video.data('muted');
control=cur_video.data('controls');
background=cur_video.data('background');
cur_video.find('.cea-video-item').on('click', function(){
var videoId=$(this).data('video-id');
cur_video.find('#cea-video-frame').attr('src', 'https://www.youtube.com/embed/' + videoId + '?autoplay='+ $autoplay +'&mute=' + muted + '&controls=' + control);
cur_video.find(".cea-video-item").removeClass("active");
$(this).addClass('active');
});
cur_video.find('.cea-upload-playlist-item').on('click', function(e){
e.preventDefault();
const mediaUrl=$(this).data('media-url');
const mediaTitle=$(this).data('title');
const mediaImage=$(this).data('image');
cur_video.find('#cea-audio-player').attr('src', mediaUrl).trigger('play');
cur_video.find("#cea-audio-title").text(mediaTitle);
cur_video.find('#cea-audio-thumbnail').attr('src', mediaImage);
cur_video.find('.cea-upload-playlist-item').removeClass('active');
$(this).addClass('active');
});
cur_video.find('.cea-video-playlist-item').on('click', function(e){
e.preventDefault();
const mediaUrl=$(this).data('media-url');
const mediaTitle=$(this).data('title');
cur_video.find('#cea-video-player').attr('src', mediaUrl).trigger('play');
cur_video.find("#cea-video-title").text(mediaTitle);
cur_video.find('.cea-video-playlist-item').removeClass('active');
$(this).addClass('active');
});
cur_video.find(".cea-vimeo-item").on('click', function(e){
e.preventDefault();
const newUrl=$(this).data("vimeo-url") + "?autoplay=" + $autoplay + "&muted=" + muted + "&background=" + background;
cur_video.find("#cea-vimeo-frame").attr('src', newUrl).trigger('play');
cur_video.find(".cea-vimeo-item").removeClass("active");
$(this).addClass('active');
});
});
})(jQuery);
}
function ceaTilt(tilt_ele){
var tilt_ele=$(tilt_ele);
var _max_tilt=tilt_ele.data("max_tilt") ? tilt_ele.data("max_tilt"):20;
var _tilt_perspective=tilt_ele.data("tilt_perspective") ? tilt_ele.data("tilt_perspective"):500;
var _tilt_scale=tilt_ele.data("tilt_scale") ? tilt_ele.data("tilt_scale"):1.1;
var _tilt_speed=tilt_ele.data("tilt_speed") ? tilt_ele.data("tilt_speed"):400;
var _tilt_transition=tilt_ele.data("tilt_trans") ? tilt_ele.data("tilt_trans"):false;
const cea_tilt=$(tilt_ele).tilt({
maxTilt: _max_tilt,
perspective: _tilt_perspective,
scale: _tilt_scale,
speed: _tilt_speed,
transition: _tilt_transition
});
}
function ceaPopupAnything(popup_ele){
var popup_ele=$(popup_ele);
popup_ele.magnificPopup({
disableOn: 700,
type: 'iframe',
mainClass: 'mfp-fade',
removalDelay: 160,
preloader: false,
fixedContentPos: false,
/*callbacks: {
open: function(){
$($(this.items).find('video')[0]).each(function(){this.player.load()});
},
close: function(){
$($(this.items).find('video')[0]).each(function(){this.player.pause()});
}}*/
iframe: {
markup: '<div class="mfp-iframe-scaler">'+
'<div class="mfp-close"></div>'+
'<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+
'</div>',
patterns: {
youtube: {
index: 'youtube.com/',
id: 'v=',
src: '//www.youtube.com/embed/%id%?autoplay=1' // URL that will be set as a source for iframe.
},
vimeo: {
index: 'vimeo.com/',
id: '/',
src: '//player.vimeo.com/video/%id%?autoplay=1'
},
gmaps: {
index: '//maps.google.',
src: '%id%&output=embed'
}},
srcAction: 'iframe_src',
}});
}
function ceaPopover(popover_ele){
var popover_ele=$(popover_ele);
var evnt_name=popover_ele.attr("data-event") ? popover_ele.attr("data-event"):'hover';
if(evnt_name=='hover'){
popover_ele.on('mouseover', function(e){
e.preventDefault();
$(this).parents(".popover-wrapper").addClass("popover-active");
}).on('mouseout', function(e){
e.preventDefault();
$(this).parents(".popover-wrapper").removeClass("popover-active");
});
}else{
popover_ele.on('click', function(e){
e.preventDefault();
$(this).parents(".popover-wrapper").toggleClass("popover-active");
})
}}
function ceaSwitchTabToggle(toggle_ele){
if(toggle_ele.checked){
var toggle_ele=$(toggle_ele);
toggle_ele.parents(".cea-toggle-post-wrap").addClass("cea-active-post");
}else{
var toggle_ele=$(toggle_ele);
toggle_ele.parents(".cea-toggle-post-wrap").removeClass("cea-active-post");
}}
function ceaAgon(canvas_ele){
var canvas_ele=$(canvas_ele);
var canvas=canvas_ele[0];
var cxt=canvas.getContext("2d");
var agon_size=canvas_ele.attr("data-size");
var agon_side=canvas_ele.attr("data-side");
var agon_color=canvas_ele.attr("data-color");
var div_val=1;
switch(parseInt(agon_side) ){
case 3:
div_val=6;
break;
case 4:
div_val=4;
break;
case 5:
div_val=3.3;
break;
case 6:
div_val=3;
break;
case 7:
div_val=2.8;
break;
case 8:
div_val=2.7;
break;
case 9:
div_val=2.6;
break;
case 10:
div_val=2.5;
break;
}
var numberOfSides=parseInt(agon_side),
size=parseInt(agon_size),
Xcenter=parseInt(agon_size),
Ycenter=parseInt(agon_size),
step=2 * Math.PI / numberOfSides,
shift=(Math.PI / div_val);//(Math.PI / 180.0);// * 44;//Quick fix ;)
cxt.beginPath();
for (var i=0; i <=numberOfSides;i++){
var curStep=i * step + shift;
cxt.lineTo (Xcenter + size * Math.cos(curStep), Ycenter + size * Math.sin(curStep));
}
cxt.fillStyle=agon_color;
cxt.fill();
}
function initCEAGmap(){
var map_styles='{ "Aubergine":[	{"elementType":"geometry","stylers":[{"color":"#1d2c4d"}]},{"elementType":"labels.text.fill","stylers":[{"color":"#8ec3b9"}]},{"elementType":"labels.text.stroke","stylers":[{"color":"#1a3646"}]},{"featureType":"administrative.country","elementType":"geometry.stroke","stylers":[{"color":"#4b6878"}]},{"featureType":"administrative.land_parcel","elementType":"labels.text.fill","stylers":[{"color":"#64779e"}]},{"featureType":"administrative.province","elementType":"geometry.stroke","stylers":[{"color":"#4b6878"}]},{"featureType":"landscape.man_made","elementType":"geometry.stroke","stylers":[{"color":"#334e87"}]},{"featureType":"landscape.natural","elementType":"geometry","stylers":[{"color":"#023e58"}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#283d6a"}]},{"featureType":"poi","elementType":"labels.text.fill","stylers":[{"color":"#6f9ba5"}]},{"featureType":"poi","elementType":"labels.text.stroke","stylers":[{"color":"#1d2c4d"}]},{"featureType":"poi.park","elementType":"geometry.fill","stylers":[{"color":"#023e58"}]},{"featureType":"poi.park","elementType":"labels.text.fill","stylers":[{"color":"#3C7680"}]},{"featureType":"road","elementType":"geometry","stylers":[{"color":"#304a7d"}]},{"featureType":"road","elementType":"labels.text.fill","stylers":[{"color":"#98a5be"}]},{"featureType":"road","elementType":"labels.text.stroke","stylers":[{"color":"#1d2c4d"}]},{"featureType":"road.highway","elementType":"geometry","stylers":[{"color":"#2c6675"}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#255763"}]},{"featureType":"road.highway","elementType":"labels.text.fill","stylers":[{"color":"#b0d5ce"}]},{"featureType":"road.highway","elementType":"labels.text.stroke","stylers":[{"color":"#023e58"}]},{"featureType":"transit","elementType":"labels.text.fill","stylers":[{"color":"#98a5be"}]},{"featureType":"transit","elementType":"labels.text.stroke","stylers":[{"color":"#1d2c4d"}]},{"featureType":"transit.line","elementType":"geometry.fill","stylers":[{"color":"#283d6a"}]},{"featureType":"transit.station","elementType":"geometry","stylers":[{"color":"#3a4762"}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#0e1626"}]},{"featureType":"water","elementType":"labels.text.fill","stylers":[{"color":"#4e6d70"}]}], "Silver":[{"elementType":"geometry","stylers":[{"color":"#f5f5f5"}]},{"elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"elementType":"labels.text.fill","stylers":[{"color":"#616161"}]},{"elementType":"labels.text.stroke","stylers":[{"color":"#f5f5f5"}]},{"featureType":"administrative.land_parcel","elementType":"labels.text.fill","stylers":[{"color":"#bdbdbd"}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#eeeeee"}]},{"featureType":"poi","elementType":"labels.text.fill","stylers":[{"color":"#757575"}]},{"featureType":"poi.park","elementType":"geometry","stylers":[{"color":"#e5e5e5"}]},{"featureType":"poi.park","elementType":"labels.text.fill","stylers":[{"color":"#9e9e9e"}]},{"featureType":"road","elementType":"geometry","stylers":[{"color":"#ffffff"}]},{"featureType":"road.arterial","elementType":"labels.text.fill","stylers":[{"color":"#757575"}]},{"featureType":"road.highway","elementType":"geometry","stylers":[{"color":"#dadada"}]},{"featureType":"road.highway","elementType":"labels.text.fill","stylers":[{"color":"#616161"}]},{"featureType":"road.local","elementType":"labels.text.fill","stylers":[{"color":"#9e9e9e"}]},{"featureType":"transit.line","elementType":"geometry","stylers":[{"color":"#e5e5e5"}]},{"featureType":"transit.station","elementType":"geometry","stylers":[{"color":"#eeeeee"}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#c9c9c9"}]},{"featureType":"water","elementType":"labels.text.fill","stylers":[{"color":"#9e9e9e"}]}], "Retro":[{"elementType":"geometry","stylers":[{"color":"#ebe3cd"}]},{"elementType":"labels.text.fill","stylers":[{"color":"#523735"}]},{"elementType":"labels.text.stroke","stylers":[{"color":"#f5f1e6"}]},{"featureType":"administrative","elementType":"geometry.stroke","stylers":[{"color":"#c9b2a6"}]},{"featureType":"administrative.land_parcel","elementType":"geometry.stroke","stylers":[{"color":"#dcd2be"}]},{"featureType":"administrative.land_parcel","elementType":"labels.text.fill","stylers":[{"color":"#ae9e90"}]},{"featureType":"landscape.natural","elementType":"geometry","stylers":[{"color":"#dfd2ae"}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#dfd2ae"}]},{"featureType":"poi","elementType":"labels.text.fill","stylers":[{"color":"#93817c"}]},{"featureType":"poi.park","elementType":"geometry.fill","stylers":[{"color":"#a5b076"}]},{"featureType":"poi.park","elementType":"labels.text.fill","stylers":[{"color":"#447530"}]},{"featureType":"road","elementType":"geometry","stylers":[{"color":"#f5f1e6"}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#fdfcf8"}]},{"featureType":"road.highway","elementType":"geometry","stylers":[{"color":"#f8c967"}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#e9bc62"}]},{"featureType":"road.highway.controlled_access","elementType":"geometry","stylers":[{"color":"#e98d58"}]},{"featureType":"road.highway.controlled_access","elementType":"geometry.stroke","stylers":[{"color":"#db8555"}]},{"featureType":"road.local","elementType":"labels.text.fill","stylers":[{"color":"#806b63"}]},{"featureType":"transit.line","elementType":"geometry","stylers":[{"color":"#dfd2ae"}]},{"featureType":"transit.line","elementType":"labels.text.fill","stylers":[{"color":"#8f7d77"}]},{"featureType":"transit.line","elementType":"labels.text.stroke","stylers":[{"color":"#ebe3cd"}]},{"featureType":"transit.station","elementType":"geometry","stylers":[{"color":"#dfd2ae"}]},{"featureType":"water","elementType":"geometry.fill","stylers":[{"color":"#b9d3c2"}]},{"featureType":"water","elementType":"labels.text.fill","stylers":[{"color":"#92998d"}]}], "Dark":[{"elementType":"geometry","stylers":[{"color":"#212121"}]},{"elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"elementType":"labels.text.fill","stylers":[{"color":"#757575"}]},{"elementType":"labels.text.stroke","stylers":[{"color":"#212121"}]},{"featureType":"administrative","elementType":"geometry","stylers":[{"color":"#757575"}]},{"featureType":"administrative.country","elementType":"labels.text.fill","stylers":[{"color":"#9e9e9e"}]},{"featureType":"administrative.land_parcel","stylers":[{"visibility":"off"}]},{"featureType":"administrative.locality","elementType":"labels.text.fill","stylers":[{"color":"#bdbdbd"}]},{"featureType":"poi","elementType":"labels.text.fill","stylers":[{"color":"#757575"}]},{"featureType":"poi.park","elementType":"geometry","stylers":[{"color":"#181818"}]},{"featureType":"poi.park","elementType":"labels.text.fill","stylers":[{"color":"#616161"}]},{"featureType":"poi.park","elementType":"labels.text.stroke","stylers":[{"color":"#1b1b1b"}]},{"featureType":"road","elementType":"geometry.fill","stylers":[{"color":"#2c2c2c"}]},{"featureType":"road","elementType":"labels.text.fill","stylers":[{"color":"#8a8a8a"}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#373737"}]},{"featureType":"road.highway","elementType":"geometry","stylers":[{"color":"#3c3c3c"}]},{"featureType":"road.highway.controlled_access","elementType":"geometry","stylers":[{"color":"#4e4e4e"}]},{"featureType":"road.local","elementType":"labels.text.fill","stylers":[{"color":"#616161"}]},{"featureType":"transit","elementType":"labels.text.fill","stylers":[{"color":"#757575"}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#000000"}]},{"featureType":"water","elementType":"labels.text.fill","stylers":[{"color":"#3d3d3d"}]}], "Night":[{"elementType":"geometry","stylers":[{"color":"#242f3e"}]},{"elementType":"labels.text.fill","stylers":[{"color":"#746855"}]},{"elementType":"labels.text.stroke","stylers":[{"color":"#242f3e"}]},{"featureType":"administrative.locality","elementType":"labels.text.fill","stylers":[{"color":"#d59563"}]},{"featureType":"poi","elementType":"labels.text.fill","stylers":[{"color":"#d59563"}]},{"featureType":"poi.park","elementType":"geometry","stylers":[{"color":"#263c3f"}]},{"featureType":"poi.park","elementType":"labels.text.fill","stylers":[{"color":"#6b9a76"}]},{"featureType":"road","elementType":"geometry","stylers":[{"color":"#38414e"}]},{"featureType":"road","elementType":"geometry.stroke","stylers":[{"color":"#212a37"}]},{"featureType":"road","elementType":"labels.text.fill","stylers":[{"color":"#9ca5b3"}]},{"featureType":"road.highway","elementType":"geometry","stylers":[{"color":"#746855"}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#1f2835"}]},{"featureType":"road.highway","elementType":"labels.text.fill","stylers":[{"color":"#f3d19c"}]},{"featureType":"transit","elementType":"geometry","stylers":[{"color":"#2f3948"}]},{"featureType":"transit.station","elementType":"labels.text.fill","stylers":[{"color":"#d59563"}]},{"featureType":"water","elementType":"geometry","stylers":[{"color":"#17263c"}]},{"featureType":"water","elementType":"labels.text.fill","stylers":[{"color":"#515c6d"}]},{"featureType":"water","elementType":"labels.text.stroke","stylers":[{"color":"#17263c"}]}] }';
var map_style_obj=JSON.parse(map_styles);
$(".ceagmap").each(function (index){
var gmap=this;
var map_mode=$(gmap).data("map-style");
var map_style_mode=[];
if(map_mode==='aubergine')
map_style_mode=map_style_obj.Aubergine;
else if(map_mode==='silver')
map_style_mode=map_style_obj.Silver;
else if(map_mode==='retro')
map_style_mode=map_style_obj.Retro;
else if(map_mode==='dark')
map_style_mode=map_style_obj.Dark;
else if(map_mode==='night')
map_style_mode=map_style_obj.Night;
else if(map_mode==='custom'){
var c_style=$(gmap).data("custom-style") ? JSON.parse($(gmap).data("custom-style")):[];
map_style_mode=c_style;
}
if($(gmap).data("multi-map")){
var map_values=JSON.parse($(gmap).data("maps"));
var map_wheel=$(gmap).data("wheel")===true;
var map_zoom=$(gmap).data("zoom")||14;
var map;
var map_stat=1;
map_values.forEach(function (map_value){
var LatLng=new google.maps.LatLng(map_value.map_latitude, map_value.map_longitude);
var mapProp={
center: LatLng,
scrollwheel: map_wheel,
zoom: map_zoom,
styles: map_style_mode
};
if(map_stat){
map=new google.maps.Map(gmap, mapProp);
google.maps.event.addDomListener(window, 'resize', function (){
var center=map.getCenter();
google.maps.event.trigger(map, "resize");
map.setCenter(LatLng);
});
map_stat=0;
}
var marker=new google.maps.Marker({
position: LatLng,
icon: map_value.map_marker,
map: map
});
if(map_value.map_info_opt==='on'){
var contentString='<div class="gmap-info-wrap"><h3>' + map_value.map_info_title + '</h3><p>' + map_value.map_info_address + '</p></div>';
var infowindow=new google.maps.InfoWindow({
content: contentString
});
marker.addListener('click', function (){
infowindow.open(map, marker);
});
}});
}else{
var LatLng={ lat: parseFloat($(gmap).data("map-lat")), lng: parseFloat($(gmap).data("map-lang")) };
var map_wheel=$(gmap).data("wheel")===true;
var map_zoom=$(gmap).data("zoom")||14;
var mapProp={
center: LatLng,
scrollwheel: map_wheel,
zoom: map_zoom,
styles: map_style_mode
};
var map=new google.maps.Map(gmap, mapProp);
var marker=new google.maps.Marker({
position: LatLng,
icon: $(gmap).data("map-marker"),
map: map
});
if($(gmap).data("info")==1){
var contentString='<div class="gmap-info-wrap"><h3>' + $(gmap).data("info-title") + '</h3><p>' + $(gmap).data("info-addr") + '</p></div>';
var infowindow=new google.maps.InfoWindow({
content: contentString
});
marker.addListener('click', function (){
infowindow.open(map, marker);
});
}
google.maps.event.addDomListener(window, 'resize', function (){
var center=map.getCenter();
google.maps.event.trigger(map, "resize");
map.setCenter(LatLng);
});
}});
}
function ceaCounterUpSettings(counterup){
counterup.appear(function(){
var $this=$(this),
countTo=$this.attr("data-count"),
duration=$this.attr("data-duration");
$({ countNum: $this.text()}).animate({
countNum: countTo
},
{
duration: parseInt(duration),
easing: 'swing',
step: function(){
$this.text(Math.floor(this.countNum) );
},
complete: function(){
$this.text(this.countNum);
}});
});
}
function ceaDayCounterSettings(day_counter){
var day_counter=$(day_counter);
var c_date=day_counter.attr('data-date');
day_counter.countdown(c_date, function(event){
if(day_counter.find('.counter-day').length){
day_counter.find('.counter-day h3').text(event.strftime('%D'));
}
if(day_counter.find('.counter-hour').length){
day_counter.find('.counter-hour h3').text(event.strftime('%H'));
}
if(day_counter.find('.counter-min').length){
day_counter.find('.counter-min h3').text(event.strftime('%M'));
}
if(day_counter.find('.counter-sec').length){
day_counter.find('.counter-sec h3').text(event.strftime('%S'));
}
if(day_counter.find('.counter-week').length){
day_counter.find('.counter-week h3').text(event.strftime('%w'));
}});
}
function ceaPieChartSettings(chart_ele){
var chart_ele=$(chart_ele);
var c_chart=$('#' + chart_ele.attr("id"));
var chart_labels=c_chart.attr("data-labels")?.split(",")||[];
var chart_values=c_chart.attr("data-values")?.split(",")||[];
var chart_bgs=c_chart.attr("data-backgrounds")?.split(",")||[];
var chart_responsive=parseInt(c_chart.attr("data-responsive")||1);
var chart_legend=c_chart.attr("data-legend-position")||'none';
var chart_type=c_chart.attr("data-type")||'doughnut';
var chart_zorobegining=c_chart.attr("data-yaxes-zorobegining");
let scales=undefined;
if(chart_zorobegining){
scales={
yAxes: [{
ticks: {
beginAtZero: parseInt(chart_zorobegining)
}}]
};}
var ctx=c_chart[0].getContext('2d');
c_chart[0].chartConfig={
type: chart_type,
data: {
labels: chart_labels,
datasets: [
{
label: "# of Votes",
data: chart_values,
backgroundColor: chart_bgs,
borderWidth: 1,
},
],
},
options: {
responsive: true,
maintainAspectRatio: false,
aspectRatio: 1.5,
scales: scales,
legend: {
position: chart_legend,
},
},
};
var myChart=new Chart(ctx, c_chart[0].chartConfig);
c_chart[0].chartInstance=myChart;
return myChart;
}
function ceaLineChartSettings(chart_ele){
var chart_ele=$(chart_ele);
var c_chart=$('#' + chart_ele.attr("id"));
var chart_labels=c_chart.attr("data-labels");
var chart_values=c_chart.attr("data-values");
var chart_bg=c_chart.attr("data-background");
var chart_border=c_chart.attr("data-border");
var chart_fill=c_chart.attr("data-fill");
var chart_zorobegining=c_chart.attr("data-yaxes-zorobegining");
var chart_title=c_chart.attr("data-title-display");
var chart_responsive=c_chart.attr("data-responsive");
var chart_legend=c_chart.attr("data-legend-position");
chart_labels=chart_labels ? chart_labels.split(","):[];
chart_values=chart_values ? chart_values.split(","):[];
chart_bg=chart_bg ? chart_bg:'';
chart_border=chart_border ? chart_border:'';
chart_fill=chart_fill ? chart_fill:0;
chart_zorobegining=chart_zorobegining ? chart_zorobegining:1;
chart_title=chart_title ? chart_title:1;
chart_responsive=chart_responsive ? chart_responsive:1;
chart_legend=chart_legend ? chart_legend:'none';
var ctx=c_chart[0].getContext('2d');
c_chart[0].chartConfig={
type: "line",
data: {
labels: chart_labels,
datasets: [
{
label: "# of Votes",
data: chart_values,
fill: parseInt(chart_fill),
backgroundColor: chart_bg,
borderColor: chart_border,
borderWidth: 1,
},
],
},
options: {
responsive: true,
maintainAspectRatio: false,
aspectRatio: 2,
scales: {
yAxes: [
{
ticks: {
beginAtZero: parseInt(chart_zorobegining),
},
},
],
},
legend: {
position: chart_legend,
},
title: {
display: parseInt(chart_title),
},
},
};
var myChart=new Chart(ctx, c_chart[0].chartConfig);
c_chart[0].chartInstance=myChart;
return myChart;
}
function ceaAnimatedTextSettings(cur_ele, index){
var cur_ele=$(cur_ele);
var typing_text=cur_ele.attr("data-typing") ? cur_ele.attr("data-typing"):[];
if(typing_text){
typing_text=typing_text.split(",");
var type_speed=cur_ele.data("typespeed") ? cur_ele.data("typespeed"):100;
var back_speed=cur_ele.data("backspeed") ? cur_ele.data("backspeed"):100;
var back_delay=cur_ele.data("backdelay") ? cur_ele.data("backdelay"):1000;
var start_delay=cur_ele.data("startdelay") ? cur_ele.data("startdelay"):1000;
var cur_char=cur_ele.data("char") ? cur_ele.data("char"):'|';
var loop=cur_ele.data("loop") ? cur_ele.data("loop"):false;
var typed=new Typed(cur_ele[index], {
typeSpeed: type_speed,
backSpeed: back_speed,
backDelay: back_delay,
startDelay: start_delay,
strings: typing_text,
loop: loop,
fadeOut: true,
cursorChar: cur_char,
});
}}
function ceaButtonSettings(button_ele){
var cur_ele=$(button_ele);
if(!cur_ele.hasClass("cea-btn-scroll")){
return;
}
var headerHeight=$(".site-header").height();
if($(window).width() < 1024&&headerHeight==0){
headerHeight=60;
}
if($("#wpadminbar").length){
var adminHead=$("#wpadminbar").height();
headerHeight=headerHeight + adminHead;
}
cur_ele.on("click", function(e){
e.preventDefault();
var target=$(this).attr("href");
$("html, body").animate({
scrollTop: $(target).offset().top - headerHeight - 10,
},500);
});
}
function ceaCircleProgresSettings(circle_ele){
circle_ele.appear(function(){
var c_circle=$(this);
var c_value=c_circle.attr("data-value");
var c_size=c_circle.attr("data-size");
var c_thickness=c_circle.attr("data-thickness");
var c_duration=c_circle.attr("data-duration");
var c_empty=c_circle.attr("data-empty")!='' ? c_circle.attr("data-empty"):'transparent';
var c_scolor=c_circle.attr("data-scolor");
var c_ecolor=c_circle.attr("data-ecolor")!='' ? c_circle.attr("data-ecolor"):c_scolor;
c_circle.circleProgress({
value: Math.floor(c_value) / 100,
size: Math.floor(c_size),
thickness: Math.floor(c_thickness),
emptyFill: c_empty,
animation: {
duration: Math.floor(c_duration)
},
lineCap: 'round',
fill: {
gradient: [c_scolor, c_ecolor]
}}).on('circle-animation-progress', function(event, progress){
$(this).find('.progress-value').html(Math.round(c_value * progress) + '%');
});
});
}
function ceaImageBeforeAfterSettings(c_imgc){
var c_imgc=$(c_imgc);
var _offset=c_imgc.attr("data-offset") ? c_imgc.attr("data-offset"):0.5;
var _orientation=c_imgc.attr("data-orientation") ? c_imgc.attr("data-orientation"):'horizontal';
var _before=c_imgc.attr("data-before") ? c_imgc.attr("data-before"):'';
var _after=c_imgc.attr("data-after") ? c_imgc.attr("data-after"):'';
var _noverlay=c_imgc.attr("data-noverlay") ? c_imgc.attr("data-noverlay"):false;
var _hover=c_imgc.attr("data-hover") ? c_imgc.attr("data-hover"):false;
var _swipe=c_imgc.attr("data-swipe") ? c_imgc.attr("data-swipe"):false;
var _move=c_imgc.attr("data-move") ? c_imgc.attr("data-move"):false;
c_imgc.zozoimgc({
default_offset_pct: _offset,
orientation: _orientation,
before_label: _before,
after_label: _after,
no_overlay: _noverlay,
move_slider_on_hover: _hover,
move_with_handle_only: _swipe,
click_to_move: _move
});
}
function ceaMailchimp(mc_wrap){
var mc_wrap=$(mc_wrap);
mc_wrap.on("keyup", ".cea-mc", function(e){
mc_wrap.find('input').removeClass("must-fill");
});
mc_wrap.on("click", ".cea-mc", function(e){
e.preventDefault();
var c_btn=$(this);
var mc_form=$(this).parents('.zozo-mc-form');
mc_wrap.find('.mc-notice-msg').removeClass("mc-success mc-failure");
mc_wrap.find('input').removeClass("must-fill");
if(mc_form.find('input[name="cea_mc_email"]').val()==''){
mc_form.find('input[name="cea_mc_email"]').addClass("must-fill");
}else{
var mc_nounce=mc_wrap.find('input[name="cea_mc_nonce"]').val();
c_btn.attr("disabled", "disabled");
$.ajax({
type: "POST",
url: cea_ajax_var.ajax_url,
data: 'action=cea_mailchimp&nonce='+ mc_nounce +'&'+ mc_form.serialize(),
success: function (data){
c_btn.removeAttr("disabled");
if(data=='success'){
mc_wrap.find('.mc-notice-msg').addClass("mc-success");
mc_wrap.find('.mc-notice-msg').text(mc_wrap.find('.mc-notice-group').attr('data-success'));
}else{
mc_wrap.find('.mc-notice-msg').addClass("mc-failure");
mc_wrap.find('.mc-notice-msg').text(mc_wrap.find('.mc-notice-group').attr('data-fail'));
}},error: function(xhr, status, error){
c_btn.removeAttr("disabled");
mc_wrap.find('.mc-notice-msg').text(mc_wrap.find('.mc-notice-group').attr('data-fail'));
}});
}});
}
function ceaIsotopeLayout(c_elem){
var c_elem=$(c_elem);
var parent_width=c_elem.width();
var gutter_size=c_elem.data("gutter");
var grid_cols=c_elem.data("cols");
var filter='';
var layoutmode=c_elem.is('[data-layout]') ? c_elem.data("layout"):'';
var lazyload=c_elem.is('[data-lazyload]') ? c_elem.data("lazyload"):'';
layoutmode=layoutmode ? layoutmode:'masonry';
lazyload=lazyload ? '0s':'0.4s';
if($(window).width() < 768) grid_cols=1;
var net_width=Math.floor(( parent_width -(gutter_size *(grid_cols - 1) )) / grid_cols);
c_elem.find(".isotope-item").css({'width':net_width+'px', 'margin-bottom':gutter_size+'px'});
var cur_isotope;
cur_isotope=c_elem.isotope({
itemSelector: '.isotope-item',
layoutMode: layoutmode,
filter: filter,
transitionDuration: lazyload,
masonry: {
gutter: gutter_size
},
fitRows: {
gutter: gutter_size
}});
var filter_wrap='';
if($(c_elem).parent(".woocommerce").length){
filter_wrap=$(c_elem).parent(".woocommerce").prev(".isotope-filter");
}else{
filter_wrap=$(c_elem).prev(".isotope-filter");
}
$(filter_wrap).find(".isotope-filter-item").on('click', function(){
$(this).parents("ul.nav").find("li").removeClass("active");
$(this).parent("li").addClass("active");
filter=$(this).attr("data-filter");
if(c_elem.find(".isotope-item" + filter).hasClass("cea-animate") ){
if(filter){
c_elem.find(".isotope-item" + filter).removeClass("run-animate");
}else{
c_elem.find(".isotope-item").removeClass("run-animate");
}
cea_scroll_animation(c_elem);
}
cur_isotope.isotope({
filter: filter
});
return false;
});
if(c_elem.find(".isotope-item").hasClass("cea-animate") ){
cea_scroll_animation(c_elem);
$(window).on('scroll', function(){
cea_scroll_animation(c_elem);
});
}else{
c_elem.children(".isotope-item").addClass("item-visible");
}
if(c_elem.data("infinite")==1&&$("ul.post-pagination").length){
var loadmsg=c_elem.data("loadmsg");
var loadend=c_elem.data("loadend");
var loadimg=c_elem.data("loadimg");
let msnry=cur_isotope.data('isotope');
cur_isotope.infiniteScroll({
path: 'a.next-page',
status: '.page-load-status',
history: false
});
cur_isotope.on('load.infiniteScroll', function(event, response, path){
var $items=$(response).find('.isotope-item');
$items.css({'width':net_width+'px', 'margin-bottom':gutter_size+'px'});
$items.imagesLoaded(function(){
cur_isotope.append($items);
cur_isotope.isotope('insert', $items);
cea_scroll_animation(c_elem);
if($items.hasClass("cea-animate") ){
cea_scroll_animation(c_elem);
}else{
$items.addClass("item-visible");
}});
});
}
$(window).resize(function(){
grid_cols=c_elem.data("cols");
if($(window).width() < 768) grid_cols=1;
var parent_width=c_elem.width();
net_width=Math.floor(( parent_width -(gutter_size *(grid_cols - 1) )) / grid_cols);
c_elem.find(".isotope-item").css({'width':net_width+'px', 'margin-bottom':gutter_size+'px'});
var $isot=c_elem.isotope({
itemSelector: '.isotope-item',
isotope: {
gutter: gutter_size
}});
});
$(window).load(function(){
$(window).trigger("resize");
});
}
function ceaPopupGallerySettings(c_popup){
$(c_popup).magnificPopup({
delegate: '.image-gallery-link',
type: 'image',
closeOnContentClick: false,
closeBtnInside: false,
mainClass: 'mfp-with-zoom mfp-img-mobile',
gallery: {
enabled: true
},
});
}
function ceaImageAccordion(acc_ele){
var acc_ele=$(acc_ele);
var isHorizontal=false;
if(acc_ele.hasClass("cea-image-accordion-horizontal")){
isHorizontal=true;
}
function updateResponsive(){
var breakPts=acc_ele.data("wrap");
const $width=$(window).width();
if(breakPts=="mobile"){
if($width < 767){
if(isHorizontal){
acc_ele.removeClass("cea-image-accordion-horizontal");
}
acc_ele.addClass("cea-image-accordion-vertical");
}else{
if(isHorizontal){
acc_ele.addClass("cea-image-accordion-horizontal");
acc_ele.removeClass("cea-image-accordion-vertical");
}}
}else if(breakPts=="tablet"){
if($width <=1024){
if(isHorizontal){
acc_ele.removeClass("cea-image-accordion-horizontal");
}
acc_ele.addClass("cea-image-accordion-vertical");
}else{
if(isHorizontal){
acc_ele.addClass("cea-image-accordion-horizontal");
acc_ele.removeClass("cea-image-accordion-vertical");
}}
}else{
}}
$(window).on("resize", updateResponsive);
updateResponsive();
}
function cursorCPTContent(cpt_ele){
var cpt_ele=$(cpt_ele);
var slides=cpt_ele.find(".cursor-hover-content");
if(slides.length){
const $cursor=$('<div class="mouse-hover-text"></div>');
$("body").append($cursor);
slides.each(function(){
const $slide=$(this);
var $thumb_img=$slide.find("img");
var $img_title=$thumb_img.attr('title')
$slide.on('mousemove', function(e){
const cursorText=$slide.attr('data-cursor')||'';
$cursor.text(cursorText);
$cursor.css({
left: e.clientX + "px",
top: e.clientY + "px",
});
$thumb_img.removeAttr("title");
});
$slide.on('mouseenter', function(){
$cursor.show();
});
$slide.on('mouseleave', function(){
$cursor.hide();
$thumb_img.attr('title', $img_title);
});
});
}}
function ceaCPTAjaxLoad(cpt_ele){
var ctp_ele=$(cpt_ele);
const loadMoreBtn=ctp_ele.find(".cpt-load-more");
const observer=new IntersectionObserver((entries)=> {
entries.forEach((entry)=> {
if(entry.isIntersecting){
loadMoreBtn.click();
}});
});
if(loadMoreBtn.length){
var loadMoreContainer;
const cptType=loadMoreBtn.data('cpt');
if(cptType==='cea-portfolio'){
loadMoreContainer=ctp_ele.find('#portfolio-load-more-container');
}else if(cptType==='cea-service'){
loadMoreContainer=ctp_ele.find('#service-load-more-container');
}else if(cptType==='cea-event'){
loadMoreContainer=ctp_ele.find('#event-load-more-container');
}else if(cptType==='cea-team'){
loadMoreContainer=ctp_ele.find('#teams-load-more-container');
}
loadMoreContainer.addClass('row');
const elementSet=loadMoreBtn.data('elementor');
Object.entries(elementSet);
if(loadMoreBtn.hasClass('load-btn-scroll')){
observer.observe(loadMoreBtn[0]);
}
let currentPage=1;
loadMoreBtn.on('click', function(){
currentPage++;
$.ajax({
url: cea_ajax_var.ajax_url,
type: 'POST',
data: {
action: 'cea_cpt_load_more',
page: currentPage,
cpt_type: cptType,
element_set: elementSet,
},
beforeSend: function (){
loadMoreBtn.text('Loading...');
},
success: function (response){
if(response.success&&response.data.items){
const newItems=$(response.data.items);
loadMoreContainer.append(newItems);
if(response.data.items=='<p class="alert alert-danger load-more-text w-100">No more post to load.</p>'){
loadMoreBtn.hide();
setTimeout(function (){
loadMoreContainer.find(".load-more-text").fadeOut(500, function (){
$(this).remove();
});
}, 2000);
}else{
loadMoreBtn.text("Load More");
}}else{
loadMoreBtn.hide();
}},
error: function (error){
loadMoreBtn.text('Button Error');
console.log(error);
},
});
});
}}
function ceaOwlSettings(c_owlCarousel){
var c_owlCarousel=$(c_owlCarousel);
var loop=c_owlCarousel.data("loop");
var navRotate=c_owlCarousel.data("nav-rotate")||0;
var navZIndex=c_owlCarousel.data("nav-z-index")||'auto';
var margin=c_owlCarousel.data("margin");
var center=c_owlCarousel.data("center");
var nav=c_owlCarousel.data("nav");
var dots_=c_owlCarousel.data("dots");
var items=c_owlCarousel.data("items");
var items_tab=c_owlCarousel.data("items-tab");
var items_mob=c_owlCarousel.data("items-mob");
var duration=c_owlCarousel.data("duration");
var smartspeed=c_owlCarousel.data("smartspeed");
var scrollby=c_owlCarousel.data("scrollby");
var autoheight=c_owlCarousel.data("autoheight");
var autoplay=c_owlCarousel.data("autoplay");
var autoplayDir=c_owlCarousel.data("autoplaydir")||"default";
var autoplayHoverPause=c_owlCarousel.data("pauseonhover");
var rewind=c_owlCarousel.data("lazyload");
var rewind=c_owlCarousel.data("rewind");
var mouseDrag=c_owlCarousel.data("mousedrag");
var navprev=c_owlCarousel.data("preview-icon");
var navnext=c_owlCarousel.data("next-icon");
var naviconcolor=c_owlCarousel.data("icon-color");
var naviconsize=c_owlCarousel.data("icon-size");
var naviconbgcolor=c_owlCarousel.data("icon-bg-color");
var naviconborderradius=c_owlCarousel.data("icon-border-radius");
var pagination_color=c_owlCarousel.data("pagination-color");
var navRotate=c_owlCarousel.data("nav-rotate");
var dotsTransform=c_owlCarousel.data("dots-rotate");
var nav_enable_icon_text=c_owlCarousel.data("nav-type");
var nav_prev_text=c_owlCarousel.data("prev-text");
var nav_next_text=c_owlCarousel.data("next-text");
var nav_padding=c_owlCarousel.data("nav-padding");
var navTextPrev='';
var navTextNext='';
if(nav_enable_icon_text==='nav-icon'){
navTextPrev='<i class="' + navprev + '" style="color:' + naviconcolor + '; font-size:' + naviconsize + 'px; background-color:' + naviconbgcolor + '; border-radius:' + naviconborderradius + '%; padding:' + nav_padding + 'px;"></i>';
navTextNext='<i class="' + navnext + '" style="color:' + naviconcolor + '; font-size:' + naviconsize + 'px; background-color:' + naviconbgcolor + '; border-radius:' + naviconborderradius + '%; padding:' + nav_padding + 'px;"></i>';
}else if(nav_enable_icon_text==='nav-text'){
navTextPrev='<span style="color:' + naviconcolor + '; font-size:' + naviconsize + 'px; background-color:' + naviconbgcolor + '; border-radius:' + naviconborderradius + '%; padding:' + nav_padding + 'px;">' + nav_prev_text + '</span>';
navTextNext='<span style="color:' + naviconcolor + '; font-size:' + naviconsize + 'px; background-color:' + naviconbgcolor + '; border-radius:' + naviconborderradius + '%; padding:' + nav_padding + 'px;">' + nav_next_text + '</span>';
}
var rtl=$("body.rtl").length||autoplayDir=="reverse" ? true:false;
if(c_owlCarousel.hasClass("vertical-carousel")){
let prevoisIndex=0;
$(c_owlCarousel).owlCarousel({
items: 1,
rewind: rewind,
rtl: rtl,
loop: true,
autoplayTimeout: duration,
smartSpeed: smartspeed,
center: center,
margin: margin,
nav: navigation,
dots: dots_,
autoplay: autoplay,
autoheight: autoheight,
autoplayHoverPause: autoplayHoverPause,
mouseDrag: false,
touchDrag: false,
pullDrag: false,
animateOut: "animate__slideOutUp",
navElement:
'button type="button" name="prev-slide" role="presentation"',
navText: [navTextPrev, navTextNext],
onTranslate: function (event){
$(event.target).find(".owl-item").removeClass('animate__animated animate__slideInUp animate__slideInDown animate__slideOutUp animate__slideOutDown');
const newIndex=event.relatedTarget.relative(event.item.index
);
const totalItems=event.item['count'];
let direction="down";
if((newIndex > prevoisIndex&&prevoisIndex!==0)||(newIndex==0&&prevoisIndex==totalItems - 1)||(newIndex==1&&prevoisIndex < newIndex) ){
direction="down";
}else if(prevoisIndex==0&&newIndex==totalItems - 1){
direction="up";
}else{
direction="up";
}
const inClass=direction==="down" ? "animate__slideInUp":"animate__slideInDown";
const outClass=direction==="down" ? "animate__slideOutUp":"animate__slideOutDown";
const $curr_ele=$(event.target).find(".owl-item").eq(event.item.index);
$curr_ele.addClass("animate__animated " + inClass);
$(event.target).find(".owl-item").eq(event.item.index - 1).addClass("animate__animated " + outClass);
$(event.target).find(".owl-item").eq(event.item.index + 1).addClass("animate__animated " + outClass);
prevoisIndex=newIndex;
},
});
}else{
$(c_owlCarousel).owlCarousel({
rewind: rewind,
mouseDrag: mouseDrag,
autoplayHoverPause: autoplayHoverPause,
rtl: rtl,
loop: loop,
autoplayTimeout: duration,
smartSpeed: smartspeed,
center: center,
margin: margin,
nav: nav,
dots: dots_,
autoplay: autoplay,
autoheight: autoheight,
slideBy: scrollby,
navElement: 'button type="button" name="prev-slide" role="presentation"',
navText: [navTextPrev, navTextNext],
responsive: {
0: {
items: items_mob,
},
544: {
items: items_tab,
},
992: {
items: items,
}},
onInitialized: function(event){
var $carousel=$(event.target);
$carousel.find('.owl-prev').addClass('custom-prev-button');
$carousel.find('.owl-next').addClass('custom-next-button');
$carousel.find('.owl-nav').css({
'z-index': navZIndex
});
$carousel.find('.owl-dots button.owl-dot').css({
'transform': `rotate(${dotsTransform}deg)`,
});
},
onTranslate: function(event){
$(event.target)
.find(".slide-title-wrapper, .slide-content-wrapper, .slider-foreground-image_1, .slider-foreground-image_2, .slider-foreground-image_3, .slider-foreground-image_4, .slider-foreground-image_5, .slider-button, .slider-button-2")
.each(function(){
var $element=$(this);
var animation=$element.data("animation");
$element.removeClass("animate__" + animation);
});
},
onTranslated: function(event){
$(event.target)
.find(".slide-title-wrapper, .slide-content-wrapper, .slider-foreground-image_1, .slider-foreground-image_2, .slider-foreground-image_3, .slider-foreground-image_4, .slider-foreground-image_5, .slider-button, .slider-button-2")
.each(function(){
var $element=$(this);
var animation=$element.data("animation");
var delay=$element.data("delay")||0;
setTimeout(function(){
$element.addClass("animate__" + animation);
}, delay);
});
}});
$(window).on('load', function(){
$('.owl-carousel').trigger('refresh.owl.carousel');
});
}
jQuery.fn.redraw=function(){
return this.hide(0, function(){
$(this).show();
});
};}})(jQuery);
(function($){
"use strict";
$(document).ready(function(){
initCEAIsotopeLayout();
var css_out='';
$(".cea-inline-css").each(function(){
var shortcode=$(this);
var shortcode_css=shortcode.attr("data-css");
css_out +=($).parseJSON(shortcode_css);
shortcode.removeAttr("data-css");
});
if(css_out!=''){
$('head').append('<style id="cea-shortcode-styles">' + css_out + '</style>');
}
if($('#cea-panorama').length){
var img_src=$('#cea-panorama').attr("data-src");
pannellum.viewer('cea-panorama', {
"type": "equirectangular",
"panorama": img_src
});
$(".pnlm-load-button").trigger("click");
}});
$(window).on('load', function(){
$('.cea-related-slider').each(function(index, value){
if($(value).length){
cea_owl_carousel($(value));
}});
});
function initCEAIsotopeLayout(){
$(".cea-archive-template > .isotope").each(function(index, value){
ceaArchiveIsotopeLayout(value);
});
}
function ceaArchiveIsotopeLayout(c_elem){
var $c_elem=$(c_elem);
var parent_width=$c_elem.width();
var gutter_size=$c_elem.data("gutter")||10;
var grid_cols=$c_elem.data("cols")||4;
var filter='';
var layoutmode=$c_elem.data("layout")||'masonry';
var lazyload=$c_elem.data("lazyload") ? '0s':'0.4s';
if($(window).width() < 768) grid_cols=1;
var net_width=Math.floor((parent_width - (gutter_size * (grid_cols - 1))) / grid_cols);
$c_elem.find(".isotope-item").css({'width': net_width + 'px', 'margin-bottom': gutter_size + 'px !important'});
var cur_isotope;
$c_elem.imagesLoaded(function(){
cur_isotope=$c_elem.isotope({
itemSelector: '.isotope-item',
layoutMode: layoutmode,
filter: filter,
transitionDuration: lazyload,
masonry: {
gutter: gutter_size
},
fitRows: {
gutter: gutter_size
}});
});
$c_elem.prev(".isotope-filter").find(".isotope-filter-item").on('click', function(){
$(this).parents("ul.nav").find("li").removeClass("active");
$(this).parent("li").addClass("active");
filter=$(this).attr("data-filter");
if($c_elem.find(".isotope-item" + filter).hasClass("cea-animate")){
if(filter){
$c_elem.find(".isotope-item" + filter).removeClass("run-animate");
}else{
$c_elem.find(".isotope-item").removeClass("run-animate");
}
cea_scroll_animation($c_elem);
}
cur_isotope.isotope({
filter: filter
});
return false;
});
if($c_elem.find(".isotope-item").hasClass("cea-animate")){
cea_scroll_animation($c_elem);
$(window).on('scroll', function(){
cea_scroll_animation($c_elem);
});
}else{
$c_elem.children(".isotope-item").addClass("item-visible");
}
if($c_elem.data("infinite")==1&&$("ul.post-pagination").length){
var loadmsg=$c_elem.data("loadmsg");
var loadend=$c_elem.data("loadend");
var loadimg=$c_elem.data("loadimg");
$c_elem.infinitescroll({
navSelector: '.post-pagination',
nextSelector: 'a.next-page',
itemSelector: '.isotope-item',
loading: {
msgText: loadmsg,
finishedMsg: loadend,
img: loadimg
}},
function(newElements){
var elems=$(newElements);
var net_width=Math.floor((parent_width - (gutter_size * (grid_cols - 1))) / grid_cols);
$c_elem.find(".isotope-item").css({'width': net_width + 'px', 'margin-bottom': gutter_size + 'px'});
elems.imagesLoaded(function(){
$c_elem.isotope('appended', elems);
});
if($c_elem.find(".isotope-item").hasClass("cea-animate")){
cea_scroll_animation($c_elem);
}else{
$c_elem.children(".isotope-item").addClass("item-visible");
}});
}
$(window).resize(function(){
setTimeout(function(){
grid_cols=$c_elem.data("cols")||4;
if($(window).width() < 768) grid_cols=1;
parent_width=$c_elem.width();
net_width=Math.floor((parent_width - (gutter_size * (grid_cols - 1))) / grid_cols);
$c_elem.find(".isotope-item").css({'width': net_width + 'px'});
$c_elem.imagesLoaded(function(){
$c_elem.isotope('layout');
});
}, 200);
});
}
function cea_owl_carousel(c_owlCarousel){
var loop=c_owlCarousel.data("loop");
var margin=c_owlCarousel.data("margin");
var center=c_owlCarousel.data("center");
var nav=c_owlCarousel.data("nav");
var dots_=c_owlCarousel.data("dots");
var items=c_owlCarousel.data("items");
var items_tab=c_owlCarousel.data("items-tab");
var items_mob=c_owlCarousel.data("items-mob");
var duration=c_owlCarousel.data("duration");
var smartspeed=c_owlCarousel.data("smartspeed");
var scrollby=c_owlCarousel.data("scrollby");
var autoheight=c_owlCarousel.data("autoheight");
var autoplay=c_owlCarousel.data("autoplay");
var rtl=$("body.rtl").length ? true:false;
$(c_owlCarousel).owlCarousel({
rtl:rtl,
loop:loop,
autoplayTimeout:duration,
smartSpeed:smartspeed,
center: center,
margin:margin,
nav:nav,
dots:dots_,
autoplay:autoplay,
autoheight:autoheight,
slideBy:scrollby,
responsive:{
0:{
items: items_mob
},
544:{
items: items_tab
},
992:{
items: items
}}
});
}})(jQuery);
jQuery("body").on("click", ".ajax-post-link", function (e){
e.preventDefault();
const postID=jQuery(this).data("post-id");
const postType=jQuery(this).data("type");
const titleContainer=jQuery(".page-title");
const breadcrumbContent=jQuery(".breadcrumb.nav li span.current");
var contentContainer="";
if(postType=="cea-portfolio"||postType=="cea-service"){
contentContainer=jQuery(".portfolio-content-area");
}else if(postType=="cea-testimonial"){
contentContainer=jQuery(".testimonial-content-area");
}else if(postType=="cea-event"){
contentContainer=jQuery(".event-content-area");
}else if(postType=="cea-team"){
contentContainer=jQuery(".team-content-area");
}
jQuery.ajax({
url: cea_ajax_var.ajax_url,
type: "POST",
dataType: "json",
data: {
action: "load_single_post",
post_id: postID,
post_type: postType,
},
beforeSend: function (){
console.log("Loading!...");
},
success: function (response){
if(response.success){
titleContainer.html(response.data.title + response.data.style_url);
breadcrumbContent.html(response.data.title);
contentContainer.html(response.data.content);
if(response.data.url){
window.history.pushState({}, "", response.data.url);
}
if(response.data.doc_title){
document.title=response.data.doc_title;
}
let editLink=jQuery("#wp-admin-bar-edit a");
if(editLink.length){
editLink.attr("href", response.data.edit_url);
}
let elementorLink=jQuery("#wp-admin-bar-elementor_edit_page a");
if(elementorLink.length){
elementorLink.attr("href", response.data.elementor_url);
}
if(response.data.is_elementor){
if(response.data.style_url){
jQuery('head').append(response.data.style_url);
var light_styles =
"<style> .dialog-widget-content.dialog-lightbox-widget-content {  top: 0px !important; left: 0px !important; } </style>";
jQuery('head').append(light_styles);
}
if(typeof elementorFrontend!=="undefined"&&elementorFrontend.init){
elementorFrontend.init();
}}
}else{
console.error("AJAX failed, data:", response);
}},
error: function (xhr, status, error){
console.log(xhr);
},
});
});
var pJS=function(tag_id, params){
var canvas_el=document.querySelector('#'+tag_id+' > .particles-js-canvas-el');
this.pJS={
canvas: {
el: canvas_el,
w: canvas_el.offsetWidth,
h: canvas_el.offsetHeight
},
particles: {
number: {
value: 400,
density: {
enable: true,
value_area: 800
}},
color: {
value: '#fff'
},
shape: {
type: 'circle',
stroke: {
width: 0,
color: '#ff0000'
},
polygon: {
nb_sides: 5
},
image: {
src: '',
width: 100,
height: 100
}},
opacity: {
value: 1,
random: false,
anim: {
enable: false,
speed: 2,
opacity_min: 0,
sync: false
}},
size: {
value: 20,
random: false,
anim: {
enable: false,
speed: 20,
size_min: 0,
sync: false
}},
line_linked: {
enable: true,
distance: 100,
color: '#fff',
opacity: 1,
width: 1
},
move: {
enable: true,
speed: 2,
direction: 'none',
random: false,
straight: false,
out_mode: 'out',
bounce: false,
attract: {
enable: false,
rotateX: 3000,
rotateY: 3000
}},
array: []
},
interactivity: {
detect_on: 'canvas',
events: {
onhover: {
enable: true,
mode: 'grab'
},
onclick: {
enable: true,
mode: 'push'
},
resize: true
},
modes: {
grab:{
distance: 100,
line_linked:{
opacity: 1
}},
bubble:{
distance: 200,
size: 80,
duration: 0.4
},
repulse:{
distance: 200,
duration: 0.4
},
push:{
particles_nb: 4
},
remove:{
particles_nb: 2
}},
mouse:{}},
retina_detect: false,
fn: {
interact: {},
modes: {},
vendors:{}},
tmp: {}};
var pJS=this.pJS;
if(params){
Object.deepExtend(pJS, params);
}
pJS.tmp.obj={
size_value: pJS.particles.size.value,
size_anim_speed: pJS.particles.size.anim.speed,
move_speed: pJS.particles.move.speed,
line_linked_distance: pJS.particles.line_linked.distance,
line_linked_width: pJS.particles.line_linked.width,
mode_grab_distance: pJS.interactivity.modes.grab.distance,
mode_bubble_distance: pJS.interactivity.modes.bubble.distance,
mode_bubble_size: pJS.interactivity.modes.bubble.size,
mode_repulse_distance: pJS.interactivity.modes.repulse.distance
};
pJS.fn.retinaInit=function(){
if(pJS.retina_detect&&window.devicePixelRatio > 1){
pJS.canvas.pxratio=window.devicePixelRatio;
pJS.tmp.retina=true;
}else{
pJS.canvas.pxratio=1;
pJS.tmp.retina=false;
}
pJS.canvas.w=pJS.canvas.el.offsetWidth * pJS.canvas.pxratio;
pJS.canvas.h=pJS.canvas.el.offsetHeight * pJS.canvas.pxratio;
pJS.particles.size.value=pJS.tmp.obj.size_value * pJS.canvas.pxratio;
pJS.particles.size.anim.speed=pJS.tmp.obj.size_anim_speed * pJS.canvas.pxratio;
pJS.particles.move.speed=pJS.tmp.obj.move_speed * pJS.canvas.pxratio;
pJS.particles.line_linked.distance=pJS.tmp.obj.line_linked_distance * pJS.canvas.pxratio;
pJS.interactivity.modes.grab.distance=pJS.tmp.obj.mode_grab_distance * pJS.canvas.pxratio;
pJS.interactivity.modes.bubble.distance=pJS.tmp.obj.mode_bubble_distance * pJS.canvas.pxratio;
pJS.particles.line_linked.width=pJS.tmp.obj.line_linked_width * pJS.canvas.pxratio;
pJS.interactivity.modes.bubble.size=pJS.tmp.obj.mode_bubble_size * pJS.canvas.pxratio;
pJS.interactivity.modes.repulse.distance=pJS.tmp.obj.mode_repulse_distance * pJS.canvas.pxratio;
};
pJS.fn.canvasInit=function(){
pJS.canvas.ctx=pJS.canvas.el.getContext('2d');
};
pJS.fn.canvasSize=function(){
pJS.canvas.el.width=pJS.canvas.w;
pJS.canvas.el.height=pJS.canvas.h;
if(pJS&&pJS.interactivity.events.resize){
window.addEventListener('resize', function(){
pJS.canvas.w=pJS.canvas.el.offsetWidth;
pJS.canvas.h=pJS.canvas.el.offsetHeight;
if(pJS.tmp.retina){
pJS.canvas.w *=pJS.canvas.pxratio;
pJS.canvas.h *=pJS.canvas.pxratio;
}
pJS.canvas.el.width=pJS.canvas.w;
pJS.canvas.el.height=pJS.canvas.h;
if(!pJS.particles.move.enable){
pJS.fn.particlesEmpty();
pJS.fn.particlesCreate();
pJS.fn.particlesDraw();
pJS.fn.vendors.densityAutoParticles();
}
pJS.fn.vendors.densityAutoParticles();
});
}};
pJS.fn.canvasPaint=function(){
pJS.canvas.ctx.fillRect(0, 0, pJS.canvas.w, pJS.canvas.h);
};
pJS.fn.canvasClear=function(){
pJS.canvas.ctx.clearRect(0, 0, pJS.canvas.w, pJS.canvas.h);
};
pJS.fn.particle=function(color, opacity, position){
this.radius=(pJS.particles.size.random ? Math.random():1) * pJS.particles.size.value;
if(pJS.particles.size.anim.enable){
this.size_status=false;
this.vs=pJS.particles.size.anim.speed / 100;
if(!pJS.particles.size.anim.sync){
this.vs=this.vs * Math.random();
}}
this.x=position ? position.x:Math.random() * pJS.canvas.w;
this.y=position ? position.y:Math.random() * pJS.canvas.h;
if(this.x > pJS.canvas.w - this.radius*2) this.x=this.x - this.radius;
else if(this.x < this.radius*2) this.x=this.x + this.radius;
if(this.y > pJS.canvas.h - this.radius*2) this.y=this.y - this.radius;
else if(this.y < this.radius*2) this.y=this.y + this.radius;
if(pJS.particles.move.bounce){
pJS.fn.vendors.checkOverlap(this, position);
}
this.color={};
if(typeof(color.value)=='object'){
if(color.value instanceof Array){
var color_selected=color.value[Math.floor(Math.random() * pJS.particles.color.value.length)];
this.color.rgb=hexToRgb(color_selected);
}else{
if(color.value.r!=undefined&&color.value.g!=undefined&&color.value.b!=undefined){
this.color.rgb={
r: color.value.r,
g: color.value.g,
b: color.value.b
}}
if(color.value.h!=undefined&&color.value.s!=undefined&&color.value.l!=undefined){
this.color.hsl={
h: color.value.h,
s: color.value.s,
l: color.value.l
}}
}}
else if(color.value=='random'){
this.color.rgb={
r: (Math.floor(Math.random() * (255 - 0 + 1)) + 0),
g: (Math.floor(Math.random() * (255 - 0 + 1)) + 0),
b: (Math.floor(Math.random() * (255 - 0 + 1)) + 0)
}}
else if(typeof(color.value)=='string'){
this.color=color;
this.color.rgb=hexToRgb(this.color.value);
}
this.opacity=(pJS.particles.opacity.random ? Math.random():1) * pJS.particles.opacity.value;
if(pJS.particles.opacity.anim.enable){
this.opacity_status=false;
this.vo=pJS.particles.opacity.anim.speed / 100;
if(!pJS.particles.opacity.anim.sync){
this.vo=this.vo * Math.random();
}}
var velbase={}
switch(pJS.particles.move.direction){
case 'top':
velbase={ x:0, y:-1 };
break;
case 'top-right':
velbase={ x:0.5, y:-0.5 };
break;
case 'right':
velbase={ x:1, y:-0 };
break;
case 'bottom-right':
velbase={ x:0.5, y:0.5 };
break;
case 'bottom':
velbase={ x:0, y:1 };
break;
case 'bottom-left':
velbase={ x:-0.5, y:1 };
break;
case 'left':
velbase={ x:-1, y:0 };
break;
case 'top-left':
velbase={ x:-0.5, y:-0.5 };
break;
default:
velbase={ x:0, y:0 };
break;
}
if(pJS.particles.move.straight){
this.vx=velbase.x;
this.vy=velbase.y;
if(pJS.particles.move.random){
this.vx=this.vx * (Math.random());
this.vy=this.vy * (Math.random());
}}else{
this.vx=velbase.x + Math.random()-0.5;
this.vy=velbase.y + Math.random()-0.5;
}
this.vx_i=this.vx;
this.vy_i=this.vy;
var shape_type=pJS.particles.shape.type;
if(typeof(shape_type)=='object'){
if(shape_type instanceof Array){
var shape_selected=shape_type[Math.floor(Math.random() * shape_type.length)];
this.shape=shape_selected;
}}else{
this.shape=shape_type;
}
if(this.shape=='image'){
var sh=pJS.particles.shape;
this.img={
src: sh.image.src,
ratio: sh.image.width / sh.image.height
}
if(!this.img.ratio) this.img.ratio=1;
if(pJS.tmp.img_type=='svg'&&pJS.tmp.source_svg!=undefined){
pJS.fn.vendors.createSvgImg(this);
if(pJS.tmp.pushing){
this.img.loaded=false;
}}
}};
pJS.fn.particle.prototype.draw=function(){
var p=this;
if(p.radius_bubble!=undefined){
var radius=p.radius_bubble;
}else{
var radius=p.radius;
}
if(p.opacity_bubble!=undefined){
var opacity=p.opacity_bubble;
}else{
var opacity=p.opacity;
}
if(p.color.rgb){
var color_value='rgba('+p.color.rgb.r+','+p.color.rgb.g+','+p.color.rgb.b+','+opacity+')';
}else{
var color_value='hsla('+p.color.hsl.h+','+p.color.hsl.s+'%,'+p.color.hsl.l+'%,'+opacity+')';
}
pJS.canvas.ctx.fillStyle=color_value;
pJS.canvas.ctx.beginPath();
switch(p.shape){
case 'circle':
pJS.canvas.ctx.arc(p.x, p.y, radius, 0, Math.PI * 2, false);
break;
case 'edge':
pJS.canvas.ctx.rect(p.x-radius, p.y-radius, radius*2, radius*2);
break;
case 'triangle':
pJS.fn.vendors.drawShape(pJS.canvas.ctx, p.x-radius, p.y+radius / 1.66, radius*2, 3, 2);
break;
case 'polygon':
pJS.fn.vendors.drawShape(pJS.canvas.ctx,
p.x - radius / (pJS.particles.shape.polygon.nb_sides/3.5),
p.y - radius / (2.66/3.5),
radius*2.66 / (pJS.particles.shape.polygon.nb_sides/3),
pJS.particles.shape.polygon.nb_sides,
1 
);
break;
case 'star':
pJS.fn.vendors.drawShape(pJS.canvas.ctx,
p.x - radius*2 / (pJS.particles.shape.polygon.nb_sides/4),
p.y - radius / (2*2.66/3.5),
radius*2*2.66 / (pJS.particles.shape.polygon.nb_sides/3),
pJS.particles.shape.polygon.nb_sides,
2 
);
break;
case 'image':
function draw(){
pJS.canvas.ctx.drawImage(img_obj,
p.x-radius,
p.y-radius,
radius*2,
radius*2 / p.img.ratio
);
}
if(pJS.tmp.img_type=='svg'){
var img_obj=p.img.obj;
}else{
var img_obj=pJS.tmp.img_obj;
}
if(img_obj){
draw();
}
break;
}
pJS.canvas.ctx.closePath();
if(pJS.particles.shape.stroke.width > 0){
pJS.canvas.ctx.strokeStyle=pJS.particles.shape.stroke.color;
pJS.canvas.ctx.lineWidth=pJS.particles.shape.stroke.width;
pJS.canvas.ctx.stroke();
}
pJS.canvas.ctx.fill();
};
pJS.fn.particlesCreate=function(){
for(var i=0; i < pJS.particles.number.value; i++){
pJS.particles.array.push(new pJS.fn.particle(pJS.particles.color, pJS.particles.opacity.value));
}};
pJS.fn.particlesUpdate=function(){
for(var i=0; i < pJS.particles.array.length; i++){
var p=pJS.particles.array[i];
if(pJS.particles.move.enable){
var ms=pJS.particles.move.speed/2;
p.x +=p.vx * ms;
p.y +=p.vy * ms;
}
if(pJS.particles.opacity.anim.enable){
if(p.opacity_status==true){
if(p.opacity >=pJS.particles.opacity.value) p.opacity_status=false;
p.opacity +=p.vo;
}else{
if(p.opacity <=pJS.particles.opacity.anim.opacity_min) p.opacity_status=true;
p.opacity -=p.vo;
}
if(p.opacity < 0) p.opacity=0;
}
if(pJS.particles.size.anim.enable){
if(p.size_status==true){
if(p.radius >=pJS.particles.size.value) p.size_status=false;
p.radius +=p.vs;
}else{
if(p.radius <=pJS.particles.size.anim.size_min) p.size_status=true;
p.radius -=p.vs;
}
if(p.radius < 0) p.radius=0;
}
if(pJS.particles.move.out_mode=='bounce'){
var new_pos={
x_left: p.radius,
x_right:  pJS.canvas.w,
y_top: p.radius,
y_bottom: pJS.canvas.h
}}else{
var new_pos={
x_left: -p.radius,
x_right: pJS.canvas.w + p.radius,
y_top: -p.radius,
y_bottom: pJS.canvas.h + p.radius
}}
if(p.x - p.radius > pJS.canvas.w){
p.x=new_pos.x_left;
p.y=Math.random() * pJS.canvas.h;
}
else if(p.x + p.radius < 0){
p.x=new_pos.x_right;
p.y=Math.random() * pJS.canvas.h;
}
if(p.y - p.radius > pJS.canvas.h){
p.y=new_pos.y_top;
p.x=Math.random() * pJS.canvas.w;
}
else if(p.y + p.radius < 0){
p.y=new_pos.y_bottom;
p.x=Math.random() * pJS.canvas.w;
}
switch(pJS.particles.move.out_mode){
case 'bounce':
if(p.x + p.radius > pJS.canvas.w) p.vx=-p.vx;
else if(p.x - p.radius < 0) p.vx=-p.vx;
if(p.y + p.radius > pJS.canvas.h) p.vy=-p.vy;
else if(p.y - p.radius < 0) p.vy=-p.vy;
break;
}
if(isInArray('grab', pJS.interactivity.events.onhover.mode)){
pJS.fn.modes.grabParticle(p);
}
if(isInArray('bubble', pJS.interactivity.events.onhover.mode)||isInArray('bubble', pJS.interactivity.events.onclick.mode)){
pJS.fn.modes.bubbleParticle(p);
}
if(isInArray('repulse', pJS.interactivity.events.onhover.mode)||isInArray('repulse', pJS.interactivity.events.onclick.mode)){
pJS.fn.modes.repulseParticle(p);
}
if(pJS.particles.line_linked.enable||pJS.particles.move.attract.enable){
for(var j=i + 1; j < pJS.particles.array.length; j++){
var p2=pJS.particles.array[j];
if(pJS.particles.line_linked.enable){
pJS.fn.interact.linkParticles(p,p2);
}
if(pJS.particles.move.attract.enable){
pJS.fn.interact.attractParticles(p,p2);
}
if(pJS.particles.move.bounce){
pJS.fn.interact.bounceParticles(p,p2);
}}
}}
};
pJS.fn.particlesDraw=function(){
pJS.canvas.ctx.clearRect(0, 0, pJS.canvas.w, pJS.canvas.h);
pJS.fn.particlesUpdate();
for(var i=0; i < pJS.particles.array.length; i++){
var p=pJS.particles.array[i];
p.draw();
}};
pJS.fn.particlesEmpty=function(){
pJS.particles.array=[];
};
pJS.fn.particlesRefresh=function(){
cancelRequestAnimFrame(pJS.fn.checkAnimFrame);
cancelRequestAnimFrame(pJS.fn.drawAnimFrame);
pJS.tmp.source_svg=undefined;
pJS.tmp.img_obj=undefined;
pJS.tmp.count_svg=0;
pJS.fn.particlesEmpty();
pJS.fn.canvasClear();
pJS.fn.vendors.start();
};
pJS.fn.interact.linkParticles=function(p1, p2){
var dx=p1.x - p2.x,
dy=p1.y - p2.y,
dist=Math.sqrt(dx*dx + dy*dy);
if(dist <=pJS.particles.line_linked.distance){
var opacity_line=pJS.particles.line_linked.opacity - (dist / (1/pJS.particles.line_linked.opacity)) / pJS.particles.line_linked.distance;
if(opacity_line > 0){
var color_line=pJS.particles.line_linked.color_rgb_line;
pJS.canvas.ctx.strokeStyle='rgba('+color_line.r+','+color_line.g+','+color_line.b+','+opacity_line+')';
pJS.canvas.ctx.lineWidth=pJS.particles.line_linked.width;
pJS.canvas.ctx.beginPath();
pJS.canvas.ctx.moveTo(p1.x, p1.y);
pJS.canvas.ctx.lineTo(p2.x, p2.y);
pJS.canvas.ctx.stroke();
pJS.canvas.ctx.closePath();
}}
};
pJS.fn.interact.attractParticles=function(p1, p2){
var dx=p1.x - p2.x,
dy=p1.y - p2.y,
dist=Math.sqrt(dx*dx + dy*dy);
if(dist <=pJS.particles.line_linked.distance){
var ax=dx/(pJS.particles.move.attract.rotateX*1000),
ay=dy/(pJS.particles.move.attract.rotateY*1000);
p1.vx -=ax;
p1.vy -=ay;
p2.vx +=ax;
p2.vy +=ay;
}}
pJS.fn.interact.bounceParticles=function(p1, p2){
var dx=p1.x - p2.x,
dy=p1.y - p2.y,
dist=Math.sqrt(dx*dx + dy*dy),
dist_p=p1.radius+p2.radius;
if(dist <=dist_p){
p1.vx=-p1.vx;
p1.vy=-p1.vy;
p2.vx=-p2.vx;
p2.vy=-p2.vy;
}}
pJS.fn.modes.pushParticles=function(nb, pos){
pJS.tmp.pushing=true;
for(var i=0; i < nb; i++){
pJS.particles.array.push(new pJS.fn.particle(pJS.particles.color,
pJS.particles.opacity.value,
{
'x': pos ? pos.pos_x:Math.random() * pJS.canvas.w,
'y': pos ? pos.pos_y:Math.random() * pJS.canvas.h
}
)
)
if(i==nb-1){
if(!pJS.particles.move.enable){
pJS.fn.particlesDraw();
}
pJS.tmp.pushing=false;
}}
};
pJS.fn.modes.removeParticles=function(nb){
pJS.particles.array.splice(0, nb);
if(!pJS.particles.move.enable){
pJS.fn.particlesDraw();
}};
pJS.fn.modes.bubbleParticle=function(p){
if(pJS.interactivity.events.onhover.enable&&isInArray('bubble', pJS.interactivity.events.onhover.mode)){
var dx_mouse=p.x - pJS.interactivity.mouse.pos_x,
dy_mouse=p.y - pJS.interactivity.mouse.pos_y,
dist_mouse=Math.sqrt(dx_mouse*dx_mouse + dy_mouse*dy_mouse),
ratio=1 - dist_mouse / pJS.interactivity.modes.bubble.distance;
function init(){
p.opacity_bubble=p.opacity;
p.radius_bubble=p.radius;
}
if(dist_mouse <=pJS.interactivity.modes.bubble.distance){
if(ratio >=0&&pJS.interactivity.status=='mousemove'){
if(pJS.interactivity.modes.bubble.size!=pJS.particles.size.value){
if(pJS.interactivity.modes.bubble.size > pJS.particles.size.value){
var size=p.radius + (pJS.interactivity.modes.bubble.size*ratio);
if(size >=0){
p.radius_bubble=size;
}}else{
var dif=p.radius - pJS.interactivity.modes.bubble.size,
size=p.radius - (dif*ratio);
if(size > 0){
p.radius_bubble=size;
}else{
p.radius_bubble=0;
}}
}
if(pJS.interactivity.modes.bubble.opacity!=pJS.particles.opacity.value){
if(pJS.interactivity.modes.bubble.opacity > pJS.particles.opacity.value){
var opacity=pJS.interactivity.modes.bubble.opacity*ratio;
if(opacity > p.opacity&&opacity <=pJS.interactivity.modes.bubble.opacity){
p.opacity_bubble=opacity;
}}else{
var opacity=p.opacity - (pJS.particles.opacity.value-pJS.interactivity.modes.bubble.opacity)*ratio;
if(opacity < p.opacity&&opacity >=pJS.interactivity.modes.bubble.opacity){
p.opacity_bubble=opacity;
}}
}}
}else{
init();
}
if(pJS.interactivity.status=='mouseleave'){
init();
}}
else if(pJS.interactivity.events.onclick.enable&&isInArray('bubble', pJS.interactivity.events.onclick.mode)){
if(pJS.tmp.bubble_clicking){
var dx_mouse=p.x - pJS.interactivity.mouse.click_pos_x,
dy_mouse=p.y - pJS.interactivity.mouse.click_pos_y,
dist_mouse=Math.sqrt(dx_mouse*dx_mouse + dy_mouse*dy_mouse),
time_spent=(new Date().getTime() - pJS.interactivity.mouse.click_time)/1000;
if(time_spent > pJS.interactivity.modes.bubble.duration){
pJS.tmp.bubble_duration_end=true;
}
if(time_spent > pJS.interactivity.modes.bubble.duration*2){
pJS.tmp.bubble_clicking=false;
pJS.tmp.bubble_duration_end=false;
}}
function process(bubble_param, particles_param, p_obj_bubble, p_obj, id){
if(bubble_param!=particles_param){
if(!pJS.tmp.bubble_duration_end){
if(dist_mouse <=pJS.interactivity.modes.bubble.distance){
if(p_obj_bubble!=undefined) var obj=p_obj_bubble;
else var obj=p_obj;
if(obj!=bubble_param){
var value=p_obj - (time_spent * (p_obj - bubble_param) / pJS.interactivity.modes.bubble.duration);
if(id=='size') p.radius_bubble=value;
if(id=='opacity') p.opacity_bubble=value;
}}else{
if(id=='size') p.radius_bubble=undefined;
if(id=='opacity') p.opacity_bubble=undefined;
}}else{
if(p_obj_bubble!=undefined){
var value_tmp=p_obj - (time_spent * (p_obj - bubble_param) / pJS.interactivity.modes.bubble.duration),
dif=bubble_param - value_tmp;
value=bubble_param + dif;
if(id=='size') p.radius_bubble=value;
if(id=='opacity') p.opacity_bubble=value;
}}
}}
if(pJS.tmp.bubble_clicking){
process(pJS.interactivity.modes.bubble.size, pJS.particles.size.value, p.radius_bubble, p.radius, 'size');
process(pJS.interactivity.modes.bubble.opacity, pJS.particles.opacity.value, p.opacity_bubble, p.opacity, 'opacity');
}}
};
pJS.fn.modes.repulseParticle=function(p){
if(pJS.interactivity.events.onhover.enable&&isInArray('repulse', pJS.interactivity.events.onhover.mode)&&pJS.interactivity.status=='mousemove'){
var dx_mouse=p.x - pJS.interactivity.mouse.pos_x,
dy_mouse=p.y - pJS.interactivity.mouse.pos_y,
dist_mouse=Math.sqrt(dx_mouse*dx_mouse + dy_mouse*dy_mouse);
var normVec={x: dx_mouse/dist_mouse, y: dy_mouse/dist_mouse},
repulseRadius=pJS.interactivity.modes.repulse.distance,
velocity=100,
repulseFactor=clamp((1/repulseRadius)*(-1*Math.pow(dist_mouse/repulseRadius,2)+1)*repulseRadius*velocity, 0, 50);
var pos={
x: p.x + normVec.x * repulseFactor,
y: p.y + normVec.y * repulseFactor
}
if(pJS.particles.move.out_mode=='bounce'){
if(pos.x - p.radius > 0&&pos.x + p.radius < pJS.canvas.w) p.x=pos.x;
if(pos.y - p.radius > 0&&pos.y + p.radius < pJS.canvas.h) p.y=pos.y;
}else{
p.x=pos.x;
p.y=pos.y;
}}
else if(pJS.interactivity.events.onclick.enable&&isInArray('repulse', pJS.interactivity.events.onclick.mode)){
if(!pJS.tmp.repulse_finish){
pJS.tmp.repulse_count++;
if(pJS.tmp.repulse_count==pJS.particles.array.length){
pJS.tmp.repulse_finish=true;
}}
if(pJS.tmp.repulse_clicking){
var repulseRadius=Math.pow(pJS.interactivity.modes.repulse.distance/6, 3);
var dx=pJS.interactivity.mouse.click_pos_x - p.x,
dy=pJS.interactivity.mouse.click_pos_y - p.y,
d=dx*dx + dy*dy;
var force=-repulseRadius / d * 1;
function process(){
var f=Math.atan2(dy,dx);
p.vx=force * Math.cos(f);
p.vy=force * Math.sin(f);
if(pJS.particles.move.out_mode=='bounce'){
var pos={
x: p.x + p.vx,
y: p.y + p.vy
}
if(pos.x + p.radius > pJS.canvas.w) p.vx=-p.vx;
else if(pos.x - p.radius < 0) p.vx=-p.vx;
if(pos.y + p.radius > pJS.canvas.h) p.vy=-p.vy;
else if(pos.y - p.radius < 0) p.vy=-p.vy;
}}
if(d <=repulseRadius){
process();
}}else{
if(pJS.tmp.repulse_clicking==false){
p.vx=p.vx_i;
p.vy=p.vy_i;
}}
}}
pJS.fn.modes.grabParticle=function(p){
if(pJS.interactivity.events.onhover.enable&&pJS.interactivity.status=='mousemove'){
var dx_mouse=p.x - pJS.interactivity.mouse.pos_x,
dy_mouse=p.y - pJS.interactivity.mouse.pos_y,
dist_mouse=Math.sqrt(dx_mouse*dx_mouse + dy_mouse*dy_mouse);
if(dist_mouse <=pJS.interactivity.modes.grab.distance){
var opacity_line=pJS.interactivity.modes.grab.line_linked.opacity - (dist_mouse / (1/pJS.interactivity.modes.grab.line_linked.opacity)) / pJS.interactivity.modes.grab.distance;
if(opacity_line > 0){
var color_line=pJS.particles.line_linked.color_rgb_line;
pJS.canvas.ctx.strokeStyle='rgba('+color_line.r+','+color_line.g+','+color_line.b+','+opacity_line+')';
pJS.canvas.ctx.lineWidth=pJS.particles.line_linked.width;
pJS.canvas.ctx.beginPath();
pJS.canvas.ctx.moveTo(p.x, p.y);
pJS.canvas.ctx.lineTo(pJS.interactivity.mouse.pos_x, pJS.interactivity.mouse.pos_y);
pJS.canvas.ctx.stroke();
pJS.canvas.ctx.closePath();
}}
}};
pJS.fn.vendors.eventsListeners=function(){
if(pJS.interactivity.detect_on=='window'){
pJS.interactivity.el=window;
}else{
pJS.interactivity.el=pJS.canvas.el;
}
if(pJS.interactivity.events.onhover.enable||pJS.interactivity.events.onclick.enable){
pJS.interactivity.el.addEventListener('mousemove', function(e){
if(pJS.interactivity.el==window){
var pos_x=e.clientX,
pos_y=e.clientY;
}else{
var pos_x=e.offsetX||e.clientX,
pos_y=e.offsetY||e.clientY;
}
pJS.interactivity.mouse.pos_x=pos_x;
pJS.interactivity.mouse.pos_y=pos_y;
if(pJS.tmp.retina){
pJS.interactivity.mouse.pos_x *=pJS.canvas.pxratio;
pJS.interactivity.mouse.pos_y *=pJS.canvas.pxratio;
}
pJS.interactivity.status='mousemove';
});
pJS.interactivity.el.addEventListener('mouseleave', function(e){
pJS.interactivity.mouse.pos_x=null;
pJS.interactivity.mouse.pos_y=null;
pJS.interactivity.status='mouseleave';
});
}
if(pJS.interactivity.events.onclick.enable){
pJS.interactivity.el.addEventListener('click', function(){
pJS.interactivity.mouse.click_pos_x=pJS.interactivity.mouse.pos_x;
pJS.interactivity.mouse.click_pos_y=pJS.interactivity.mouse.pos_y;
pJS.interactivity.mouse.click_time=new Date().getTime();
if(pJS.interactivity.events.onclick.enable){
switch(pJS.interactivity.events.onclick.mode){
case 'push':
if(pJS.particles.move.enable){
pJS.fn.modes.pushParticles(pJS.interactivity.modes.push.particles_nb, pJS.interactivity.mouse);
}else{
if(pJS.interactivity.modes.push.particles_nb==1){
pJS.fn.modes.pushParticles(pJS.interactivity.modes.push.particles_nb, pJS.interactivity.mouse);
}
else if(pJS.interactivity.modes.push.particles_nb > 1){
pJS.fn.modes.pushParticles(pJS.interactivity.modes.push.particles_nb);
}}
break;
case 'remove':
pJS.fn.modes.removeParticles(pJS.interactivity.modes.remove.particles_nb);
break;
case 'bubble':
pJS.tmp.bubble_clicking=true;
break;
case 'repulse':
pJS.tmp.repulse_clicking=true;
pJS.tmp.repulse_count=0;
pJS.tmp.repulse_finish=false;
setTimeout(function(){
pJS.tmp.repulse_clicking=false;
}, pJS.interactivity.modes.repulse.duration*1000)
break;
}}
});
}};
pJS.fn.vendors.densityAutoParticles=function(){
if(pJS.particles.number.density.enable){
var area=pJS.canvas.el.width * pJS.canvas.el.height / 1000;
if(pJS.tmp.retina){
area=area/(pJS.canvas.pxratio*2);
}
var nb_particles=area * pJS.particles.number.value / pJS.particles.number.density.value_area;
var missing_particles=pJS.particles.array.length - nb_particles;
if(missing_particles < 0) pJS.fn.modes.pushParticles(Math.abs(missing_particles));
else pJS.fn.modes.removeParticles(missing_particles);
}};
pJS.fn.vendors.checkOverlap=function(p1, position){
for(var i=0; i < pJS.particles.array.length; i++){
var p2=pJS.particles.array[i];
var dx=p1.x - p2.x,
dy=p1.y - p2.y,
dist=Math.sqrt(dx*dx + dy*dy);
if(dist <=p1.radius + p2.radius){
p1.x=position ? position.x:Math.random() * pJS.canvas.w;
p1.y=position ? position.y:Math.random() * pJS.canvas.h;
pJS.fn.vendors.checkOverlap(p1);
}}
};
pJS.fn.vendors.createSvgImg=function(p){
var svgXml=pJS.tmp.source_svg,
rgbHex=/#([0-9A-F]{3,6})/gi,
coloredSvgXml=svgXml.replace(rgbHex, function (m, r, g, b){
if(p.color.rgb){
var color_value='rgba('+p.color.rgb.r+','+p.color.rgb.g+','+p.color.rgb.b+','+p.opacity+')';
}else{
var color_value='hsla('+p.color.hsl.h+','+p.color.hsl.s+'%,'+p.color.hsl.l+'%,'+p.opacity+')';
}
return color_value;
});
var svg=new Blob([coloredSvgXml], {type: 'image/svg+xml;charset=utf-8'}),
DOMURL=window.URL||window.webkitURL||window,
url=DOMURL.createObjectURL(svg);
var img=new Image();
img.addEventListener('load', function(){
p.img.obj=img;
p.img.loaded=true;
DOMURL.revokeObjectURL(url);
pJS.tmp.count_svg++;
});
img.src=url;
};
pJS.fn.vendors.destroypJS=function(){
cancelAnimationFrame(pJS.fn.drawAnimFrame);
canvas_el.remove();
pJSDom=null;
};
pJS.fn.vendors.drawShape=function(c, startX, startY, sideLength, sideCountNumerator, sideCountDenominator){
var sideCount=sideCountNumerator * sideCountDenominator;
var decimalSides=sideCountNumerator / sideCountDenominator;
var interiorAngleDegrees=(180 * (decimalSides - 2)) / decimalSides;
var interiorAngle=Math.PI - Math.PI * interiorAngleDegrees / 180;
c.save();
c.beginPath();
c.translate(startX, startY);
c.moveTo(0,0);
for (var i=0; i < sideCount; i++){
c.lineTo(sideLength,0);
c.translate(sideLength,0);
c.rotate(interiorAngle);
}
c.fill();
c.restore();
};
pJS.fn.vendors.exportImg=function(){
window.open(pJS.canvas.el.toDataURL('image/png'), '_blank');
};
pJS.fn.vendors.loadImg=function(type){
pJS.tmp.img_error=undefined;
if(pJS.particles.shape.image.src!=''){
if(type=='svg'){
var xhr=new XMLHttpRequest();
xhr.open('GET', pJS.particles.shape.image.src);
xhr.onreadystatechange=function (data){
if(xhr.readyState==4){
if(xhr.status==200){
pJS.tmp.source_svg=data.currentTarget.response;
pJS.fn.vendors.checkBeforeDraw();
}else{
console.log('Error pJS - Image not found');
pJS.tmp.img_error=true;
}}
}
xhr.send();
}else{
var img=new Image();
img.addEventListener('load', function(){
pJS.tmp.img_obj=img;
pJS.fn.vendors.checkBeforeDraw();
});
img.src=pJS.particles.shape.image.src;
}}else{
console.log('Error pJS - No image.src');
pJS.tmp.img_error=true;
}};
pJS.fn.vendors.draw=function(){
if(pJS.particles.shape.type=='image'){
if(pJS.tmp.img_type=='svg'){
if(pJS.tmp.count_svg >=pJS.particles.number.value){
pJS.fn.particlesDraw();
if(!pJS.particles.move.enable) cancelRequestAnimFrame(pJS.fn.drawAnimFrame);
else pJS.fn.drawAnimFrame=requestAnimFrame(pJS.fn.vendors.draw);
}else{
if(!pJS.tmp.img_error) pJS.fn.drawAnimFrame=requestAnimFrame(pJS.fn.vendors.draw);
}}else{
if(pJS.tmp.img_obj!=undefined){
pJS.fn.particlesDraw();
if(!pJS.particles.move.enable) cancelRequestAnimFrame(pJS.fn.drawAnimFrame);
else pJS.fn.drawAnimFrame=requestAnimFrame(pJS.fn.vendors.draw);
}else{
if(!pJS.tmp.img_error) pJS.fn.drawAnimFrame=requestAnimFrame(pJS.fn.vendors.draw);
}}
}else{
pJS.fn.particlesDraw();
if(!pJS.particles.move.enable) cancelRequestAnimFrame(pJS.fn.drawAnimFrame);
else pJS.fn.drawAnimFrame=requestAnimFrame(pJS.fn.vendors.draw);
}};
pJS.fn.vendors.checkBeforeDraw=function(){
if(pJS.particles.shape.type=='image'){
if(pJS.tmp.img_type=='svg'&&pJS.tmp.source_svg==undefined){
pJS.tmp.checkAnimFrame=requestAnimFrame(check);
}else{
cancelRequestAnimFrame(pJS.tmp.checkAnimFrame);
if(!pJS.tmp.img_error){
pJS.fn.vendors.init();
pJS.fn.vendors.draw();
}}
}else{
pJS.fn.vendors.init();
pJS.fn.vendors.draw();
}};
pJS.fn.vendors.init=function(){
pJS.fn.retinaInit();
pJS.fn.canvasInit();
pJS.fn.canvasSize();
pJS.fn.canvasPaint();
pJS.fn.particlesCreate();
pJS.fn.vendors.densityAutoParticles();
pJS.particles.line_linked.color_rgb_line=hexToRgb(pJS.particles.line_linked.color);
};
pJS.fn.vendors.start=function(){
if(isInArray('image', pJS.particles.shape.type)){
pJS.tmp.img_type=pJS.particles.shape.image.src.substr(pJS.particles.shape.image.src.length - 3);
pJS.fn.vendors.loadImg(pJS.tmp.img_type);
}else{
pJS.fn.vendors.checkBeforeDraw();
}};
pJS.fn.vendors.eventsListeners();
pJS.fn.vendors.start();
};
Object.deepExtend=function(destination, source){
for (var property in source){
if(source[property]&&source[property].constructor &&
source[property].constructor===Object){
destination[property]=destination[property]||{};
arguments.callee(destination[property], source[property]);
}else{
destination[property]=source[property];
}}
return destination;
};
window.requestAnimFrame=(function(){
return  window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame    ||
window.oRequestAnimationFrame      ||
window.msRequestAnimationFrame     ||
function(callback){
window.setTimeout(callback, 1000 / 60);
};})();
window.cancelRequestAnimFrame=(function(){
return window.cancelAnimationFrame         ||
window.webkitCancelRequestAnimationFrame ||
window.mozCancelRequestAnimationFrame    ||
window.oCancelRequestAnimationFrame      ||
window.msCancelRequestAnimationFrame     ||
clearTimeout
})();
function hexToRgb(hex){
var shorthandRegex=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;
hex=hex.replace(shorthandRegex, function(m, r, g, b){
return r + r + g + g + b + b;
});
var result=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
return result ? {
r: parseInt(result[1], 16),
g: parseInt(result[2], 16),
b: parseInt(result[3], 16)
}:null;
};
function clamp(number, min, max){
return Math.min(Math.max(number, min), max);
};
function isInArray(value, array){
return array.indexOf(value) > -1;
}
window.pJSDom=[];
window.particlesJS=function(tag_id, params){
if(typeof(tag_id)!='string'){
params=tag_id;
tag_id='particles-js';
}
if(!tag_id){
tag_id='particles-js';
}
var pJS_tag=document.getElementById(tag_id),
pJS_canvas_class='particles-js-canvas-el',
exist_canvas=pJS_tag.getElementsByClassName(pJS_canvas_class);
if(exist_canvas.length){
while(exist_canvas.length > 0){
pJS_tag.removeChild(exist_canvas[0]);
}}
var canvas_el=document.createElement('canvas');
canvas_el.className=pJS_canvas_class;
canvas_el.style.width="100%";
canvas_el.style.height="100%";
var canvas=document.getElementById(tag_id).appendChild(canvas_el);
if(canvas!=null){
pJSDom.push(new pJS(tag_id, params));
}};
window.particlesJS.load=function(tag_id, path_config_json, callback){
var xhr=new XMLHttpRequest();
xhr.open('GET', path_config_json);
xhr.onreadystatechange=function (data){
if(xhr.readyState==4){
if(xhr.status==200){
var params=JSON.parse(data.currentTarget.response);
window.particlesJS(tag_id, params);
if(callback) callback();
}else{
console.log('Error pJS - XMLHttpRequest status: '+xhr.status);
console.log('Error pJS - File config not found');
}}
};
xhr.send();
};
!function(n){var o={};function i(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=n,i.c=o,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=10)}([,,function(e,t){e.exports=function(e){"complete"===document.readyState||"interactive"===document.readyState?e.call():document.attachEvent?document.attachEvent("onreadystatechange",function(){"interactive"===document.readyState&&e.call()}):document.addEventListener&&document.addEventListener("DOMContentLoaded",e)}},function(t,e,n){!function(e){e="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};t.exports=e}.call(this,n(4))},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=function(){return this}();try{o=o||new Function("return this")()}catch(e){"object"===("undefined"==typeof window?"undefined":n(window))&&(o=window)}e.exports=o},,,,,,function(e,t,n){e.exports=n(11)},function(e,t,n){"use strict";n.r(t);var t=n(2),t=n.n(t),i=n(3),a=n(12);function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o,l=i.window.jarallax;i.window.jarallax=a.default,i.window.jarallax.noConflict=function(){return i.window.jarallax=l,this},void 0!==i.jQuery&&((n=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Array.prototype.unshift.call(t,this);var o=a.default.apply(i.window,t);return"object"!==r(o)?o:this}).constructor=a.default.constructor,o=i.jQuery.fn.jarallax,i.jQuery.fn.jarallax=n,i.jQuery.fn.jarallax.noConflict=function(){return i.jQuery.fn.jarallax=o,this}),t()(function(){Object(a.default)(document.querySelectorAll("[data-jarallax]"))})},function(e,t,n){"use strict";n.r(t);var o=n(2),o=n.n(o),f=n(3);function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var o,i,a=[],r=!0,l=!1;try{for(n=n.call(e);!(r=(o=n.next()).done)&&(a.push(o.value),!t||a.length!==t);r=!0);}catch(e){l=!0,i=e}finally{try{r||null==n.return||n.return()}finally{if(l)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var r,g,u=f.window.navigator,p=-1<u.userAgent.indexOf("MSIE ")||-1<u.userAgent.indexOf("Trident/")||-1<u.userAgent.indexOf("Edge/"),l=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(u.userAgent),d=function(){for(var e="transform WebkitTransform MozTransform".split(" "),t=document.createElement("div"),n=0;n<e.length;n+=1)if(t&&void 0!==t.style[e[n]])return e[n];return!1}();function m(){g=l?(!r&&document.body&&((r=document.createElement("div")).style.cssText="position: fixed; top: -9999px; left: 0; height: 100vh; width: 0;",document.body.appendChild(r)),(r?r.clientHeight:0)||f.window.innerHeight||document.documentElement.clientHeight):f.window.innerHeight||document.documentElement.clientHeight}m(),f.window.addEventListener("resize",m),f.window.addEventListener("orientationchange",m),f.window.addEventListener("load",m),o()(function(){m()});var y=[];function b(){y.length&&(y.forEach(function(e,t){var n=e.instance,o=e.oldData,i=n.$item.getBoundingClientRect(),e={width:i.width,height:i.height,top:i.top,bottom:i.bottom,wndW:f.window.innerWidth,wndH:g},i=!o||o.wndW!==e.wndW||o.wndH!==e.wndH||o.width!==e.width||o.height!==e.height,o=i||!o||o.top!==e.top||o.bottom!==e.bottom;y[t].oldData=e,i&&n.onResize(),o&&n.onScroll()}),f.window.requestAnimationFrame(b))}var h=0,v=function(){function l(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l);var n=this;n.instanceID=h,h+=1,n.$item=e,n.defaults={type:"scroll",speed:.5,imgSrc:null,imgElement:".jarallax-img",imgSize:"cover",imgPosition:"50% 50%",imgRepeat:"no-repeat",keepImg:!1,elementInViewport:null,zIndex:-100,disableParallax:!1,disableVideo:!1,videoSrc:null,videoStartTime:0,videoEndTime:0,videoVolume:0,videoLoop:!0,videoPlayOnlyVisible:!0,videoLazyLoading:!0,onScroll:null,onInit:null,onDestroy:null,onCoverImage:null};var o,i,a=n.$item.dataset||{},r={};Object.keys(a).forEach(function(e){var t=e.substr(0,1).toLowerCase()+e.substr(1);t&&void 0!==n.defaults[t]&&(r[t]=a[e])}),n.options=n.extend({},n.defaults,r,t),n.pureOptions=n.extend({},n.options),Object.keys(n.options).forEach(function(e){"true"===n.options[e]?n.options[e]=!0:"false"===n.options[e]&&(n.options[e]=!1)}),n.options.speed=Math.min(2,Math.max(-1,parseFloat(n.options.speed))),"string"==typeof n.options.disableParallax&&(n.options.disableParallax=new RegExp(n.options.disableParallax)),n.options.disableParallax instanceof RegExp&&(o=n.options.disableParallax,n.options.disableParallax=function(){return o.test(u.userAgent)}),"function"!=typeof n.options.disableParallax&&(n.options.disableParallax=function(){return!1}),"string"==typeof n.options.disableVideo&&(n.options.disableVideo=new RegExp(n.options.disableVideo)),n.options.disableVideo instanceof RegExp&&(i=n.options.disableVideo,n.options.disableVideo=function(){return i.test(u.userAgent)}),"function"!=typeof n.options.disableVideo&&(n.options.disableVideo=function(){return!1});t=n.options.elementInViewport;(t=t&&"object"===c(t)&&void 0!==t.length?s(t,1)[0]:t)instanceof Element||(t=null),n.options.elementInViewport=t,n.image={src:n.options.imgSrc||null,$container:null,useImgTag:!1,position:/iPad|iPhone|iPod|Android/.test(u.userAgent)?"absolute":"fixed"},n.initImg()&&n.canInitParallax()&&n.init()}var e,t,n;return e=l,(t=[{key:"css",value:function(t,n){return"string"==typeof n?f.window.getComputedStyle(t).getPropertyValue(n):(n.transform&&d&&(n[d]=n.transform),Object.keys(n).forEach(function(e){t.style[e]=n[e]}),t)}},{key:"extend",value:function(n){for(var e=arguments.length,o=new Array(1<e?e-1:0),t=1;t<e;t++)o[t-1]=arguments[t];return n=n||{},Object.keys(o).forEach(function(t){o[t]&&Object.keys(o[t]).forEach(function(e){n[e]=o[t][e]})}),n}},{key:"getWindowData",value:function(){return{width:f.window.innerWidth||document.documentElement.clientWidth,height:g,y:document.documentElement.scrollTop}}},{key:"initImg",value:function(){var e=this,t=e.options.imgElement;return(t=t&&"string"==typeof t?e.$item.querySelector(t):t)instanceof Element||(e.options.imgSrc?(t=new Image).src=e.options.imgSrc:t=null),t&&(e.options.keepImg?e.image.$item=t.cloneNode(!0):(e.image.$item=t,e.image.$itemParent=t.parentNode),e.image.useImgTag=!0),!!e.image.$item||(null===e.image.src&&(e.image.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",e.image.bgImage=e.css(e.$item,"background-image")),!(!e.image.bgImage||"none"===e.image.bgImage))}},{key:"canInitParallax",value:function(){return d&&!this.options.disableParallax()}},{key:"init",value:function(){var e,t=this,n={position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"hidden"},o={pointerEvents:"none",transformStyle:"preserve-3d",backfaceVisibility:"hidden",willChange:"transform,opacity"};t.options.keepImg||((e=t.$item.getAttribute("style"))&&t.$item.setAttribute("data-jarallax-original-styles",e),!t.image.useImgTag||(e=t.image.$item.getAttribute("style"))&&t.image.$item.setAttribute("data-jarallax-original-styles",e)),"static"===t.css(t.$item,"position")&&t.css(t.$item,{position:"relative"}),"auto"===t.css(t.$item,"z-index")&&t.css(t.$item,{zIndex:0}),t.image.$container=document.createElement("div"),t.css(t.image.$container,n),t.css(t.image.$container,{"z-index":t.options.zIndex}),p&&t.css(t.image.$container,{opacity:.9999}),t.image.$container.setAttribute("id","jarallax-container-".concat(t.instanceID)),t.$item.appendChild(t.image.$container),t.image.useImgTag?o=t.extend({"object-fit":t.options.imgSize,"object-position":t.options.imgPosition,"font-family":"object-fit: ".concat(t.options.imgSize,"; object-position: ").concat(t.options.imgPosition,";"),"max-width":"none"},n,o):(t.image.$item=document.createElement("div"),t.image.src&&(o=t.extend({"background-position":t.options.imgPosition,"background-size":t.options.imgSize,"background-repeat":t.options.imgRepeat,"background-image":t.image.bgImage||'url("'.concat(t.image.src,'")')},n,o))),"opacity"!==t.options.type&&"scale"!==t.options.type&&"scale-opacity"!==t.options.type&&1!==t.options.speed||(t.image.position="absolute"),"fixed"===t.image.position&&(n=function(e){for(var t=[];null!==e.parentElement;)1===(e=e.parentElement).nodeType&&t.push(e);return t}(t.$item).filter(function(e){var t=f.window.getComputedStyle(e),e=t["-webkit-transform"]||t["-moz-transform"]||t.transform;return e&&"none"!==e||/(auto|scroll)/.test(t.overflow+t["overflow-y"]+t["overflow-x"])}),t.image.position=n.length?"absolute":"fixed"),o.position=t.image.position,t.css(t.image.$item,o),t.image.$container.appendChild(t.image.$item),t.onResize(),t.onScroll(!0),t.options.onInit&&t.options.onInit.call(t),"none"!==t.css(t.$item,"background-image")&&t.css(t.$item,{"background-image":"none"}),t.addToParallaxList()}},{key:"addToParallaxList",value:function(){y.push({instance:this}),1===y.length&&f.window.requestAnimationFrame(b)}},{key:"removeFromParallaxList",value:function(){var n=this;y.forEach(function(e,t){e.instance.instanceID===n.instanceID&&y.splice(t,1)})}},{key:"destroy",value:function(){var e=this;e.removeFromParallaxList();var t,n=e.$item.getAttribute("data-jarallax-original-styles");e.$item.removeAttribute("data-jarallax-original-styles"),n?e.$item.setAttribute("style",n):e.$item.removeAttribute("style"),e.image.useImgTag&&(t=e.image.$item.getAttribute("data-jarallax-original-styles"),e.image.$item.removeAttribute("data-jarallax-original-styles"),t?e.image.$item.setAttribute("style",n):e.image.$item.removeAttribute("style"),e.image.$itemParent&&e.image.$itemParent.appendChild(e.image.$item)),e.$clipStyles&&e.$clipStyles.parentNode.removeChild(e.$clipStyles),e.image.$container&&e.image.$container.parentNode.removeChild(e.image.$container),e.options.onDestroy&&e.options.onDestroy.call(e),delete e.$item.jarallax}},{key:"clipContainer",value:function(){var e,t,n;"fixed"===this.image.position&&(t=(n=(e=this).image.$container.getBoundingClientRect()).width,n=n.height,e.$clipStyles||(e.$clipStyles=document.createElement("style"),e.$clipStyles.setAttribute("type","text/css"),e.$clipStyles.setAttribute("id","jarallax-clip-".concat(e.instanceID)),(document.head||document.getElementsByTagName("head")[0]).appendChild(e.$clipStyles)),n="#jarallax-container-".concat(e.instanceID," {\n            clip: rect(0 ").concat(t,"px ").concat(n,"px 0);\n            clip: rect(0, ").concat(t,"px, ").concat(n,"px, 0);\n            -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);\n            clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);\n        }"),e.$clipStyles.styleSheet?e.$clipStyles.styleSheet.cssText=n:e.$clipStyles.innerHTML=n)}},{key:"coverImage",value:function(){var e=this,t=e.image.$container.getBoundingClientRect(),n=t.height,o=e.options.speed,i="scroll"===e.options.type||"scroll-opacity"===e.options.type,a=0,r=n,l=0;return i&&(o<0?(a=o*Math.max(n,g),g<n&&(a-=o*(n-g))):a=o*(n+g),1<o?r=Math.abs(a-g):o<0?r=a/o+Math.abs(a):r+=(g-n)*(1-o),a/=2),e.parallaxScrollDistance=a,l=i?(g-r)/2:(n-r)/2,e.css(e.image.$item,{height:"".concat(r,"px"),marginTop:"".concat(l,"px"),left:"fixed"===e.image.position?"".concat(t.left,"px"):"0",width:"".concat(t.width,"px")}),e.options.onCoverImage&&e.options.onCoverImage.call(e),{image:{height:r,marginTop:l},container:t}}},{key:"isVisible",value:function(){return this.isElementInViewport||!1}},{key:"onScroll",value:function(e){var t,n,o,i,a,r,l,s=this,c=s.$item.getBoundingClientRect(),u=c.top,p=c.height,d={},m=c;s.options.elementInViewport&&(m=s.options.elementInViewport.getBoundingClientRect()),s.isElementInViewport=0<=m.bottom&&0<=m.right&&m.top<=g&&m.left<=f.window.innerWidth,(e||s.isElementInViewport)&&(t=Math.max(0,u),n=Math.max(0,p+u),o=Math.max(0,-u),i=Math.max(0,u+p-g),a=Math.max(0,p-(u+p-g)),r=Math.max(0,-u+g-p),m=1-(g-u)/(g+p)*2,e=1,p<g?e=1-(o||i)/p:n<=g?e=n/g:a<=g&&(e=a/g),"opacity"!==s.options.type&&"scale-opacity"!==s.options.type&&"scroll-opacity"!==s.options.type||(d.transform="translate3d(0,0,0)",d.opacity=e),"scale"!==s.options.type&&"scale-opacity"!==s.options.type||(l=1,s.options.speed<0?l-=s.options.speed*e:l+=s.options.speed*(1-e),d.transform="scale(".concat(l,") translate3d(0,0,0)")),"scroll"!==s.options.type&&"scroll-opacity"!==s.options.type||(l=s.parallaxScrollDistance*m,"absolute"===s.image.position&&(l-=u),d.transform="translate3d(0,".concat(l,"px,0)")),s.css(s.image.$item,d),s.options.onScroll&&s.options.onScroll.call(s,{section:c,beforeTop:t,beforeTopEnd:n,afterTop:o,beforeBottom:i,beforeBottomEnd:a,afterBottom:r,visiblePercent:e,fromViewportCenter:m}))}},{key:"onResize",value:function(){this.coverImage(),this.clipContainer()}}])&&a(e.prototype,t),n&&a(e,n),l}(),o=function(e,t){for(var n,o=(e=("object"===("undefined"==typeof HTMLElement?"undefined":c(HTMLElement))?e instanceof HTMLElement:e&&"object"===c(e)&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)?[e]:e).length,i=0,a=arguments.length,r=new Array(2<a?a-2:0),l=2;l<a;l++)r[l-2]=arguments[l];for(;i<o;i+=1)if("object"===c(t)||void 0===t?e[i].jarallax||(e[i].jarallax=new v(e[i],t)):e[i].jarallax&&(n=e[i].jarallax[t].apply(e[i].jarallax,r)),void 0!==n)return n;return e};o.constructor=v,t.default=o}]);
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Parallax=t()}}(function(){return function t(e,i,n){function o(r,a){if(!i[r]){if(!e[r]){var l="function"==typeof require&&require;if(!a&&l)return l(r,!0);if(s)return s(r,!0);var h=new Error("Cannot find module '"+r+"'");throw h.code="MODULE_NOT_FOUND",h}var u=i[r]={exports:{}};e[r][0].call(u.exports,function(t){var i=e[r][1][t];return o(i||t)},u,u.exports,t,e,i,n)}return i[r].exports}for(var s="function"==typeof require&&require,r=0;r<n.length;r++)o(n[r]);return o}({1:[function(t,e,i){"use strict";function n(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var o=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},i=0;i<10;i++)e["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var i,a,l=n(t),h=1;h<arguments.length;h++){i=Object(arguments[h]);for(var u in i)s.call(i,u)&&(l[u]=i[u]);if(o){a=o(i);for(var c=0;c<a.length;c++)r.call(i,a[c])&&(l[a[c]]=i[a[c]])}}return l}},{}],2:[function(t,e,i){(function(t){(function(){var i,n,o,s,r,a;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:void 0!==t&&null!==t&&t.hrtime?(e.exports=function(){return(i()-r)/1e6},n=t.hrtime,s=(i=function(){var t;return 1e9*(t=n())[0]+t[1]})(),a=1e9*t.uptime(),r=s-a):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,t("_process"))},{_process:3}],3:[function(t,e,i){function n(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(c===setTimeout)return setTimeout(t,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function r(t){if(d===clearTimeout)return clearTimeout(t);if((d===o||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(t);try{return d(t)}catch(e){try{return d.call(null,t)}catch(e){return d.call(this,t)}}}function a(){v&&p&&(v=!1,p.length?f=p.concat(f):y=-1,f.length&&l())}function l(){if(!v){var t=s(a);v=!0;for(var e=f.length;e;){for(p=f,f=[];++y<e;)p&&p[y].run();y=-1,e=f.length}p=null,v=!1,r(t)}}function h(t,e){this.fun=t,this.array=e}function u(){}var c,d,m=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(t){c=n}try{d="function"==typeof clearTimeout?clearTimeout:o}catch(t){d=o}}();var p,f=[],v=!1,y=-1;m.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];f.push(new h(t,e)),1!==f.length||v||s(l)},h.prototype.run=function(){this.fun.apply(null,this.array)},m.title="browser",m.browser=!0,m.env={},m.argv=[],m.version="",m.versions={},m.on=u,m.addListener=u,m.once=u,m.off=u,m.removeListener=u,m.removeAllListeners=u,m.emit=u,m.prependListener=u,m.prependOnceListener=u,m.listeners=function(t){return[]},m.binding=function(t){throw new Error("process.binding is not supported")},m.cwd=function(){return"/"},m.chdir=function(t){throw new Error("process.chdir is not supported")},m.umask=function(){return 0}},{}],4:[function(t,e,i){(function(i){for(var n=t("performance-now"),o="undefined"==typeof window?i:window,s=["moz","webkit"],r="AnimationFrame",a=o["request"+r],l=o["cancel"+r]||o["cancelRequest"+r],h=0;!a&&h<s.length;h++)a=o[s[h]+"Request"+r],l=o[s[h]+"Cancel"+r]||o[s[h]+"CancelRequest"+r];if(!a||!l){var u=0,c=0,d=[];a=function(t){if(0===d.length){var e=n(),i=Math.max(0,1e3/60-(e-u));u=i+e,setTimeout(function(){var t=d.slice(0);d.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(u)}catch(t){setTimeout(function(){throw t},0)}},Math.round(i))}return d.push({handle:++c,callback:t,cancelled:!1}),c},l=function(t){for(var e=0;e<d.length;e++)d[e].handle===t&&(d[e].cancelled=!0)}}e.exports=function(t){return a.call(o,t)},e.exports.cancel=function(){l.apply(o,arguments)},e.exports.polyfill=function(){o.requestAnimationFrame=a,o.cancelAnimationFrame=l}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"performance-now":2}],5:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),s=t("raf"),r=t("object-assign"),a={propertyCache:{},vendors:[null,["-webkit-","webkit"],["-moz-","Moz"],["-o-","O"],["-ms-","ms"]],clamp:function(t,e,i){return e<i?t<e?e:t>i?i:t:t<i?i:t>e?e:t},data:function(t,e){return a.deserialize(t.getAttribute("data-"+e))},deserialize:function(t){return"true"===t||"false"!==t&&("null"===t?null:!isNaN(parseFloat(t))&&isFinite(t)?parseFloat(t):t)},camelCase:function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},accelerate:function(t){a.css(t,"transform","translate3d(0,0,0) rotate(0.0001deg)"),a.css(t,"transform-style","preserve-3d"),a.css(t,"backface-visibility","hidden")},transformSupport:function(t){for(var e=document.createElement("div"),i=!1,n=null,o=!1,s=null,r=null,l=0,h=a.vendors.length;l<h;l++)if(null!==a.vendors[l]?(s=a.vendors[l][0]+"transform",r=a.vendors[l][1]+"Transform"):(s="transform",r="transform"),void 0!==e.style[r]){i=!0;break}switch(t){case"2D":o=i;break;case"3D":if(i){var u=document.body||document.createElement("body"),c=document.documentElement,d=c.style.overflow,m=!1;document.body||(m=!0,c.style.overflow="hidden",c.appendChild(u),u.style.overflow="hidden",u.style.background=""),u.appendChild(e),e.style[r]="translate3d(1px,1px,1px)",o=void 0!==(n=window.getComputedStyle(e).getPropertyValue(s))&&n.length>0&&"none"!==n,c.style.overflow=d,u.removeChild(e),m&&(u.removeAttribute("style"),u.parentNode.removeChild(u))}}return o},css:function(t,e,i){var n=a.propertyCache[e];if(!n)for(var o=0,s=a.vendors.length;o<s;o++)if(n=null!==a.vendors[o]?a.camelCase(a.vendors[o][1]+"-"+e):e,void 0!==t.style[n]){a.propertyCache[e]=n;break}t.style[n]=i}},l={relativeInput:!1,clipRelativeInput:!1,inputElement:null,hoverOnly:!1,calibrationThreshold:100,calibrationDelay:500,supportDelay:500,calibrateX:!1,calibrateY:!0,invertX:!0,invertY:!0,limitX:!1,limitY:!1,scalarX:10,scalarY:10,frictionX:.1,frictionY:.1,originX:.5,originY:.5,pointerEvents:!1,precision:1,onReady:null,selector:null},h=function(){function t(e,i){n(this,t),this.element=e;var o={calibrateX:a.data(this.element,"calibrate-x"),calibrateY:a.data(this.element,"calibrate-y"),invertX:a.data(this.element,"invert-x"),invertY:a.data(this.element,"invert-y"),limitX:a.data(this.element,"limit-x"),limitY:a.data(this.element,"limit-y"),scalarX:a.data(this.element,"scalar-x"),scalarY:a.data(this.element,"scalar-y"),frictionX:a.data(this.element,"friction-x"),frictionY:a.data(this.element,"friction-y"),originX:a.data(this.element,"origin-x"),originY:a.data(this.element,"origin-y"),pointerEvents:a.data(this.element,"pointer-events"),precision:a.data(this.element,"precision"),relativeInput:a.data(this.element,"relative-input"),clipRelativeInput:a.data(this.element,"clip-relative-input"),hoverOnly:a.data(this.element,"hover-only"),inputElement:document.querySelector(a.data(this.element,"input-element")),selector:a.data(this.element,"selector")};for(var s in o)null===o[s]&&delete o[s];r(this,l,o,i),this.inputElement||(this.inputElement=this.element),this.calibrationTimer=null,this.calibrationFlag=!0,this.enabled=!1,this.depthsX=[],this.depthsY=[],this.raf=null,this.bounds=null,this.elementPositionX=0,this.elementPositionY=0,this.elementWidth=0,this.elementHeight=0,this.elementCenterX=0,this.elementCenterY=0,this.elementRangeX=0,this.elementRangeY=0,this.calibrationX=0,this.calibrationY=0,this.inputX=0,this.inputY=0,this.motionX=0,this.motionY=0,this.velocityX=0,this.velocityY=0,this.onMouseMove=this.onMouseMove.bind(this),this.onDeviceOrientation=this.onDeviceOrientation.bind(this),this.onDeviceMotion=this.onDeviceMotion.bind(this),this.onOrientationTimer=this.onOrientationTimer.bind(this),this.onMotionTimer=this.onMotionTimer.bind(this),this.onCalibrationTimer=this.onCalibrationTimer.bind(this),this.onAnimationFrame=this.onAnimationFrame.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.windowWidth=null,this.windowHeight=null,this.windowCenterX=null,this.windowCenterY=null,this.windowRadiusX=null,this.windowRadiusY=null,this.portrait=!1,this.desktop=!navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry|BB10|mobi|tablet|opera mini|nexus 7)/i),this.motionSupport=!!window.DeviceMotionEvent&&!this.desktop,this.orientationSupport=!!window.DeviceOrientationEvent&&!this.desktop,this.orientationStatus=0,this.motionStatus=0,this.initialise()}return o(t,[{key:"initialise",value:function(){void 0===this.transform2DSupport&&(this.transform2DSupport=a.transformSupport("2D"),this.transform3DSupport=a.transformSupport("3D")),this.transform3DSupport&&a.accelerate(this.element),"static"===window.getComputedStyle(this.element).getPropertyValue("position")&&(this.element.style.position="relative"),this.pointerEvents||(this.element.style.pointerEvents="none"),this.updateLayers(),this.updateDimensions(),this.enable(),this.queueCalibration(this.calibrationDelay)}},{key:"doReadyCallback",value:function(){this.onReady&&this.onReady()}},{key:"updateLayers",value:function(){this.selector?this.layers=this.element.querySelectorAll(this.selector):this.layers=this.element.children,this.layers.length||console.warn("ParallaxJS: Your scene does not have any layers."),this.depthsX=[],this.depthsY=[];for(var t=0;t<this.layers.length;t++){var e=this.layers[t];this.transform3DSupport&&a.accelerate(e),e.style.position=t?"absolute":"relative",e.style.display="block",e.style.left=0,e.style.top=0;var i=a.data(e,"depth")||0;this.depthsX.push(a.data(e,"depth-x")||i),this.depthsY.push(a.data(e,"depth-y")||i)}}},{key:"updateDimensions",value:function(){this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight,this.windowCenterX=this.windowWidth*this.originX,this.windowCenterY=this.windowHeight*this.originY,this.windowRadiusX=Math.max(this.windowCenterX,this.windowWidth-this.windowCenterX),this.windowRadiusY=Math.max(this.windowCenterY,this.windowHeight-this.windowCenterY)}},{key:"updateBounds",value:function(){this.bounds=this.inputElement.getBoundingClientRect(),this.elementPositionX=this.bounds.left,this.elementPositionY=this.bounds.top,this.elementWidth=this.bounds.width,this.elementHeight=this.bounds.height,this.elementCenterX=this.elementWidth*this.originX,this.elementCenterY=this.elementHeight*this.originY,this.elementRangeX=Math.max(this.elementCenterX,this.elementWidth-this.elementCenterX),this.elementRangeY=Math.max(this.elementCenterY,this.elementHeight-this.elementCenterY)}},{key:"queueCalibration",value:function(t){clearTimeout(this.calibrationTimer),this.calibrationTimer=setTimeout(this.onCalibrationTimer,t)}},{key:"enable",value:function(){this.enabled||(this.enabled=!0,this.orientationSupport?(this.portrait=!1,window.addEventListener("deviceorientation",this.onDeviceOrientation),this.detectionTimer=setTimeout(this.onOrientationTimer,this.supportDelay)):this.motionSupport?(this.portrait=!1,window.addEventListener("devicemotion",this.onDeviceMotion),this.detectionTimer=setTimeout(this.onMotionTimer,this.supportDelay)):(this.calibrationX=0,this.calibrationY=0,this.portrait=!1,window.addEventListener("mousemove",this.onMouseMove),this.doReadyCallback()),window.addEventListener("resize",this.onWindowResize),this.raf=s(this.onAnimationFrame))}},{key:"disable",value:function(){this.enabled&&(this.enabled=!1,this.orientationSupport?window.removeEventListener("deviceorientation",this.onDeviceOrientation):this.motionSupport?window.removeEventListener("devicemotion",this.onDeviceMotion):window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("resize",this.onWindowResize),s.cancel(this.raf))}},{key:"calibrate",value:function(t,e){this.calibrateX=void 0===t?this.calibrateX:t,this.calibrateY=void 0===e?this.calibrateY:e}},{key:"invert",value:function(t,e){this.invertX=void 0===t?this.invertX:t,this.invertY=void 0===e?this.invertY:e}},{key:"friction",value:function(t,e){this.frictionX=void 0===t?this.frictionX:t,this.frictionY=void 0===e?this.frictionY:e}},{key:"scalar",value:function(t,e){this.scalarX=void 0===t?this.scalarX:t,this.scalarY=void 0===e?this.scalarY:e}},{key:"limit",value:function(t,e){this.limitX=void 0===t?this.limitX:t,this.limitY=void 0===e?this.limitY:e}},{key:"origin",value:function(t,e){this.originX=void 0===t?this.originX:t,this.originY=void 0===e?this.originY:e}},{key:"setInputElement",value:function(t){this.inputElement=t,this.updateDimensions()}},{key:"setPosition",value:function(t,e,i){e=e.toFixed(this.precision)+"px",i=i.toFixed(this.precision)+"px",this.transform3DSupport?a.css(t,"transform","translate3d("+e+","+i+",0)"):this.transform2DSupport?a.css(t,"transform","translate("+e+","+i+")"):(t.style.left=e,t.style.top=i)}},{key:"onOrientationTimer",value:function(){this.orientationSupport&&0===this.orientationStatus?(this.disable(),this.orientationSupport=!1,this.enable()):this.doReadyCallback()}},{key:"onMotionTimer",value:function(){this.motionSupport&&0===this.motionStatus?(this.disable(),this.motionSupport=!1,this.enable()):this.doReadyCallback()}},{key:"onCalibrationTimer",value:function(){this.calibrationFlag=!0}},{key:"onWindowResize",value:function(){this.updateDimensions()}},{key:"onAnimationFrame",value:function(){this.updateBounds();var t=this.inputX-this.calibrationX,e=this.inputY-this.calibrationY;(Math.abs(t)>this.calibrationThreshold||Math.abs(e)>this.calibrationThreshold)&&this.queueCalibration(0),this.portrait?(this.motionX=this.calibrateX?e:this.inputY,this.motionY=this.calibrateY?t:this.inputX):(this.motionX=this.calibrateX?t:this.inputX,this.motionY=this.calibrateY?e:this.inputY),this.motionX*=this.elementWidth*(this.scalarX/100),this.motionY*=this.elementHeight*(this.scalarY/100),isNaN(parseFloat(this.limitX))||(this.motionX=a.clamp(this.motionX,-this.limitX,this.limitX)),isNaN(parseFloat(this.limitY))||(this.motionY=a.clamp(this.motionY,-this.limitY,this.limitY)),this.velocityX+=(this.motionX-this.velocityX)*this.frictionX,this.velocityY+=(this.motionY-this.velocityY)*this.frictionY;for(var i=0;i<this.layers.length;i++){var n=this.layers[i],o=this.depthsX[i],r=this.depthsY[i],l=this.velocityX*(o*(this.invertX?-1:1)),h=this.velocityY*(r*(this.invertY?-1:1));this.setPosition(n,l,h)}this.raf=s(this.onAnimationFrame)}},{key:"rotate",value:function(t,e){var i=(t||0)/30,n=(e||0)/30,o=this.windowHeight>this.windowWidth;this.portrait!==o&&(this.portrait=o,this.calibrationFlag=!0),this.calibrationFlag&&(this.calibrationFlag=!1,this.calibrationX=i,this.calibrationY=n),this.inputX=i,this.inputY=n}},{key:"onDeviceOrientation",value:function(t){var e=t.beta,i=t.gamma;null!==e&&null!==i&&(this.orientationStatus=1,this.rotate(e,i))}},{key:"onDeviceMotion",value:function(t){var e=t.rotationRate.beta,i=t.rotationRate.gamma;null!==e&&null!==i&&(this.motionStatus=1,this.rotate(e,i))}},{key:"onMouseMove",value:function(t){var e=t.clientX,i=t.clientY;if(this.hoverOnly&&(e<this.elementPositionX||e>this.elementPositionX+this.elementWidth||i<this.elementPositionY||i>this.elementPositionY+this.elementHeight))return this.inputX=0,void(this.inputY=0);this.relativeInput?(this.clipRelativeInput&&(e=Math.max(e,this.elementPositionX),e=Math.min(e,this.elementPositionX+this.elementWidth),i=Math.max(i,this.elementPositionY),i=Math.min(i,this.elementPositionY+this.elementHeight)),this.elementRangeX&&this.elementRangeY&&(this.inputX=(e-this.elementPositionX-this.elementCenterX)/this.elementRangeX,this.inputY=(i-this.elementPositionY-this.elementCenterY)/this.elementRangeY)):this.windowRadiusX&&this.windowRadiusY&&(this.inputX=(e-this.windowCenterX)/this.windowRadiusX,this.inputY=(i-this.windowCenterY)/this.windowRadiusY)}},{key:"destroy",value:function(){this.disable(),clearTimeout(this.calibrationTimer),clearTimeout(this.detectionTimer),this.element.removeAttribute("style");for(var t=0;t<this.layers.length;t++)this.layers[t].removeAttribute("style");delete this.element,delete this.layers}},{key:"version",value:function(){return"3.1.0"}}]),t}();e.exports=h},{"object-assign":1,raf:4}]},{},[5])(5)});
(function ($){
"use strict";
$(document).ready(function (){
$(document).on("click", ".mega-nav-btn", function (e){
e.preventDefault();
if($(this).hasClass("disabled")) return;
var button=$(this);
var category=button.data("category");
var page=button.attr("data-page");
var wrapper=button.data("wrapper");
var container=button.closest(".mega-menu-posts-container");
var wrapper_container=container.find(".mega-posts-grid." + wrapper);
var prevBtn=container.find(".mega-prev-btn");
var nextBtn=container.find(".mega-next-btn");
$.ajax({
url: mega_menu_ajax.ajax_url,
type: "POST",
data: {
action: "load_mega_menu_posts",
category_id: category,
page: page,
wrapper_class: wrapper,
nonce: mega_menu_ajax.nonce,
},
success: function(response){
wrapper_container.html(response.posts);
if(response.current_page==1){
prevBtn.addClass("disabled");
}else{
prevBtn.removeClass("disabled");
prevBtn.attr('data-page', response.current_page - 1);
}
if(response.current_page==response.total_pages){
nextBtn.addClass("disabled");
}else{
nextBtn.removeClass("disabled");
nextBtn.attr('data-page', response.current_page + 1);
}},
error: function(xhr, status, error){
console.log(xhr);
}});
});
});
})(jQuery);
(()=>{"use strict";var e,r,_,t,a,n={},i={};function __webpack_require__(e){var r=i[e];if(void 0!==r)return r.exports;var _=i[e]={exports:{}};return n[e].call(_.exports,_,_.exports,__webpack_require__),_.exports}__webpack_require__.m=n,e=[],__webpack_require__.O=(r,_,t,a)=>{if(!_){var n=1/0;for(b=0;b<e.length;b++){for(var[_,t,a]=e[b],i=!0,c=0;c<_.length;c++)(!1&a||n>=a)&&Object.keys(__webpack_require__.O).every(e=>__webpack_require__.O[e](_[c]))?_.splice(c--,1):(i=!1,a<n&&(n=a));if(i){e.splice(b--,1);var o=t();void 0!==o&&(r=o)}}return r}a=a||0;for(var b=e.length;b>0&&e[b-1][2]>a;b--)e[b]=e[b-1];e[b]=[_,t,a]},_=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,__webpack_require__.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var a=Object.create(null);__webpack_require__.r(a);var n={};r=r||[null,_({}),_([]),_(_)];for(var i=2&t&&e;("object"==typeof i||"function"==typeof i)&&!~r.indexOf(i);i=_(i))Object.getOwnPropertyNames(i).forEach(r=>n[r]=()=>e[r]);return n.default=()=>e,__webpack_require__.d(a,n),a},__webpack_require__.d=(e,r)=>{for(var _ in r)__webpack_require__.o(r,_)&&!__webpack_require__.o(e,_)&&Object.defineProperty(e,_,{enumerable:!0,get:r[_]})},__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce((r,_)=>(__webpack_require__.f[_](e,r),r),[])),__webpack_require__.u=e=>786===e?"397f2d183c19202777d6.bundle.min.js":216===e?"lightbox.570c05c5a283cfb6b223.bundle.min.js":30===e?"text-path.a67c1f3a78d208bc7e1b.bundle.min.js":131===e?"accordion.8b0db5058afeb74622f5.bundle.min.js":707===e?"alert.42cc1d522ef5c60bf874.bundle.min.js":457===e?"counter.12335f45aaa79d244f24.bundle.min.js":234===e?"progress.0ea083b809812c0e3aa1.bundle.min.js":575===e?"tabs.18344b05d8d1ea0702bc.bundle.min.js":775===e?"toggle.2a177a3ef4785d3dfbc5.bundle.min.js":180===e?"video.86d44e46e43d0807e708.bundle.min.js":177===e?"image-carousel.6167d20b95b33386757b.bundle.min.js":212===e?"text-editor.45609661e409413f1cef.bundle.min.js":211===e?"wp-audio.c9624cb6e5dc9de86abd.bundle.min.js":215===e?"nested-tabs.a2401356d329f179475e.bundle.min.js":915===e?"nested-accordion.294d40984397351fd0f5.bundle.min.js":1===e?"contact-buttons.e98d0220ce8c38404e7e.bundle.min.js":336===e?"floating-bars.740d06d17cea5cebdb61.bundle.min.js":557===e?"shared-frontend-handlers.03caa53373b56d3bab67.bundle.min.js":396===e?"shared-editor-handlers.cacdcbed391abf4b48b0.bundle.min.js":768===e?"container-editor-handlers.a2e8e48d28c5544fb183.bundle.min.js":77===e?"section-frontend-handlers.d85ab872da118940910d.bundle.min.js":220===e?"section-editor-handlers.53ffedef32043348b99b.bundle.min.js":304===e?"nested-title-keyboard-handler.2a67d3cc630e11815acc.bundle.min.js":void 0,__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t={},a="elementorFrontend:",__webpack_require__.l=(e,r,_,n)=>{if(t[e])t[e].push(r);else{var i,c;if(void 0!==_)for(var o=document.getElementsByTagName("script"),b=0;b<o.length;b++){var u=o[b];if(u.getAttribute("src")==e||u.getAttribute("data-webpack")==a+_){i=u;break}}i||(c=!0,(i=document.createElement("script")).charset="utf-8",__webpack_require__.nc&&i.setAttribute("nonce",__webpack_require__.nc),i.setAttribute("data-webpack",a+_),i.src=e),t[e]=[r];var onScriptComplete=(r,_)=>{i.onerror=i.onload=null,clearTimeout(d);var a=t[e];if(delete t[e],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach(e=>e(_)),r)return r(_)},d=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=onScriptComplete.bind(null,i.onerror),i.onload=onScriptComplete.bind(null,i.onload),c&&document.head.appendChild(i)}},__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;__webpack_require__.g.importScripts&&(e=__webpack_require__.g.location+"");var r=__webpack_require__.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var _=r.getElementsByTagName("script");if(_.length)for(var t=_.length-1;t>-1&&(!e||!/^http(s?):/.test(e));)e=_[t--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=e})(),(()=>{var e={76:0};__webpack_require__.f.j=(r,_)=>{var t=__webpack_require__.o(e,r)?e[r]:void 0;if(0!==t)if(t)_.push(t[2]);else if(76!=r){var a=new Promise((_,a)=>t=e[r]=[_,a]);_.push(t[2]=a);var n=__webpack_require__.p+__webpack_require__.u(r),i=new Error;__webpack_require__.l(n,_=>{if(__webpack_require__.o(e,r)&&(0!==(t=e[r])&&(e[r]=void 0),t)){var a=_&&("load"===_.type?"missing":_.type),n=_&&_.target&&_.target.src;i.message="Loading chunk "+r+" failed.\n("+a+": "+n+")",i.name="ChunkLoadError",i.type=a,i.request=n,t[1](i)}},"chunk-"+r,r)}else e[r]=0},__webpack_require__.O.j=r=>0===e[r];var webpackJsonpCallback=(r,_)=>{var t,a,[n,i,c]=_,o=0;if(n.some(r=>0!==e[r])){for(t in i)__webpack_require__.o(i,t)&&(__webpack_require__.m[t]=i[t]);if(c)var b=c(__webpack_require__)}for(r&&r(_);o<n.length;o++)a=n[o],__webpack_require__.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return __webpack_require__.O(b)},r=self.webpackChunkelementorFrontend=self.webpackChunkelementorFrontend||[];r.forEach(webpackJsonpCallback.bind(null,0)),r.push=webpackJsonpCallback.bind(null,r.push.bind(r))})()})();
(self.webpackChunkelementorFrontend=self.webpackChunkelementorFrontend||[]).push([[941],{1:(e,t,r)=>{"use strict";var n=r(5578),i=r(7255),s=r(5755),o=r(1866),a=r(6029),c=r(5022),l=n.Symbol,u=i("wks"),p=c?l.for||l:l&&l.withoutSetter||o;e.exports=function(e){return s(u,e)||(u[e]=a&&s(l,e)?l[e]:p("Symbol."+e)),u[e]}},41:e=>{"use strict";e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},169:(e,t,r)=>{"use strict";var n=r(4762),i=r(8473),s=r(1483),o=r(5755),a=r(382),c=r(2048).CONFIGURABLE,l=r(7268),u=r(4483),p=u.enforce,d=u.get,h=String,f=Object.defineProperty,g=n("".slice),m=n("".replace),v=n([].join),y=a&&!i(function(){return 8!==f(function(){},"length",{value:8}).length}),w=String(String).split("String"),b=e.exports=function(e,t,r){"Symbol("===g(h(t),0,7)&&(t="["+m(h(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!o(e,"name")||c&&e.name!==t)&&(a?f(e,"name",{value:t,configurable:!0}):e.name=t),y&&r&&o(r,"arity")&&e.length!==r.arity&&f(e,"length",{value:r.arity});try{r&&o(r,"constructor")&&r.constructor?a&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=p(e);return o(n,"source")||(n.source=v(w,"string"==typeof t?t:"")),e};Function.prototype.toString=b(function toString(){return s(this)&&d(this).source||l(this)},"toString")},274:(e,t,r)=>{"use strict";var n=r(8473);e.exports=!n(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},348:(e,t,r)=>{"use strict";var n=r(1807),i=r(1483),s=r(1704),o=TypeError;e.exports=function(e,t){var r,a;if("string"===t&&i(r=e.toString)&&!s(a=n(r,e)))return a;if(i(r=e.valueOf)&&!s(a=n(r,e)))return a;if("string"!==t&&i(r=e.toString)&&!s(a=n(r,e)))return a;throw new o("Can't convert object to primitive value")}},382:(e,t,r)=>{"use strict";var n=r(8473);e.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},641:(e,t,r)=>{"use strict";r(5724),r(4846),r(7458),r(9655);const Module=function(){const e=jQuery,t=arguments,r=this,n={};let i;this.getItems=function(e,t){if(t){const r=t.split("."),n=r.splice(0,1);if(!r.length)return e[n];if(!e[n])return;return this.getItems(e[n],r.join("."))}return e},this.getSettings=function(e){return this.getItems(i,e)},this.setSettings=function(t,n,s){if(s||(s=i),"object"==typeof t)return e.extend(s,t),r;const o=t.split("."),a=o.splice(0,1);return o.length?(s[a]||(s[a]={}),r.setSettings(o.join("."),n,s[a])):(s[a]=n,r)},this.getErrorMessage=function(e,t){let r;if("forceMethodImplementation"===e)r=`The method '${t}' must to be implemented in the inheritor child.`;else r="An error occurs";return r},this.forceMethodImplementation=function(e){throw new Error(this.getErrorMessage("forceMethodImplementation",e))},this.on=function(t,i){if("object"==typeof t)return e.each(t,function(e){r.on(e,this)}),r;return t.split(" ").forEach(function(e){n[e]||(n[e]=[]),n[e].push(i)}),r},this.off=function(e,t){if(!n[e])return r;if(!t)return delete n[e],r;const i=n[e].indexOf(t);return-1!==i&&(delete n[e][i],n[e]=n[e].filter(e=>e)),r},this.trigger=function(t){const i="on"+t[0].toUpperCase()+t.slice(1),s=Array.prototype.slice.call(arguments,1);r[i]&&r[i].apply(r,s);const o=n[t];return o?(e.each(o,function(e,t){t.apply(r,s)}),r):r},r.__construct.apply(r,t),e.each(r,function(e){const t=r[e];"function"==typeof t&&(r[e]=function(){return t.apply(r,arguments)})}),function(){i=r.getDefaultSettings();const n=t[0];n&&e.extend(!0,i,n)}(),r.trigger("init")};Module.prototype.__construct=function(){},Module.prototype.getDefaultSettings=function(){return{}},Module.prototype.getConstructorID=function(){return this.constructor.name},Module.extend=function(e){const t=jQuery,r=this,child=function(){return r.apply(this,arguments)};return t.extend(child,r),(child.prototype=Object.create(t.extend({},r.prototype,e))).constructor=child,child.__super__=r.prototype,child},e.exports=Module},670:(e,t,r)=>{"use strict";var n=r(382),i=r(5835),s=r(7738);e.exports=function(e,t,r){n?i.f(e,t,s(0,r)):e[t]=r}},751:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(5724),r(4846),r(9655);class InstanceType{static[Symbol.hasInstance](e){let t=super[Symbol.hasInstance](e);if(e&&!e.constructor.getInstanceType)return t;if(e&&(e.instanceTypes||(e.instanceTypes=[]),t||this.getInstanceType()===e.constructor.getInstanceType()&&(t=!0),t)){const t=this.getInstanceType===InstanceType.getInstanceType?"BaseInstanceType":this.getInstanceType();-1===e.instanceTypes.indexOf(t)&&e.instanceTypes.push(t)}return!t&&e&&(t=e.instanceTypes&&Array.isArray(e.instanceTypes)&&-1!==e.instanceTypes.indexOf(this.getInstanceType())),t}static getInstanceType(){elementorModules.ForceMethodImplementation()}constructor(){let e=new.target;const t=[];for(;e.__proto__&&e.__proto__.name;)t.push(e.__proto__),e=e.__proto__;t.reverse().forEach(e=>this instanceof e)}}t.default=InstanceType},1091:e=>{"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},1265:(e,t,r)=>{"use strict";var n=r(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(641)),s=n(r(2425)),o=n(r(2946)),a=n(r(3980)),c=n(r(2970)),l=n(r(8685)),u=r(9031),p=r(1462);const d={Module:i.default,ViewModule:s.default,ArgsObject:o.default,ForceMethodImplementation:l.default,utils:{Masonry:a.default,Scroll:c.default},importExport:{createGetInitialState:u.createGetInitialState,customizationDialogsRegistry:p.customizationDialogsRegistry}};window.elementorModules?Object.assign(window.elementorModules,d):window.elementorModules=d;t.default=window.elementorModules},1278:(e,t,r)=>{"use strict";var n=r(4762),i=n({}.toString),s=n("".slice);e.exports=function(e){return s(i(e),8,-1)}},1409:(e,t,r)=>{"use strict";var n=r(5578),i=r(1483);e.exports=function(e,t){return arguments.length<2?(r=n[e],i(r)?r:void 0):n[e]&&n[e][t];var r}},1423:(e,t,r)=>{"use strict";var n=r(1409),i=r(1483),s=r(4815),o=r(5022),a=Object;e.exports=o?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return i(t)&&s(t.prototype,a(e))}},1462:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.customizationDialogsRegistry=void 0;var n=r(7958);t.customizationDialogsRegistry=new n.BaseRegistry},1483:e=>{"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},1506:(e,t,r)=>{"use strict";var n=r(2914),i=r(1807),s=r(2293),o=r(8761),a=r(5299),c=r(6960),l=r(4815),u=r(4887),p=r(6665),d=r(6721),h=TypeError,Result=function(e,t){this.stopped=e,this.result=t},f=Result.prototype;e.exports=function(e,t,r){var g,m,v,y,w,b,S,x=r&&r.that,E=!(!r||!r.AS_ENTRIES),I=!(!r||!r.IS_RECORD),_=!(!r||!r.IS_ITERATOR),C=!(!r||!r.INTERRUPTED),O=n(t,x),stop=function(e){return g&&d(g,"normal"),new Result(!0,e)},callFn=function(e){return E?(s(e),C?O(e[0],e[1],stop):O(e[0],e[1])):C?O(e,stop):O(e)};if(I)g=e.iterator;else if(_)g=e;else{if(!(m=p(e)))throw new h(o(e)+" is not iterable");if(a(m)){for(v=0,y=c(e);y>v;v++)if((w=callFn(e[v]))&&l(f,w))return w;return new Result(!1)}g=u(e,m)}for(b=I?e.next:g.next;!(S=i(b,g)).done;){try{w=callFn(S.value)}catch(e){d(g,"throw",e)}if("object"==typeof w&&w&&l(f,w))return w}return new Result(!1)}},1507:e=>{"use strict";e.exports={}},1703:e=>{"use strict";var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function trunc(e){var n=+e;return(n>0?r:t)(n)}},1704:(e,t,r)=>{"use strict";var n=r(1483);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},1799:(e,t,r)=>{"use strict";var n=r(382),i=r(8473),s=r(3145);e.exports=!n&&!i(function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a})},1807:(e,t,r)=>{"use strict";var n=r(274),i=Function.prototype.call;e.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},1831:(e,t,r)=>{"use strict";var n=r(9557),i=r(5578),s=r(2095),o="__core-js_shared__",a=e.exports=i[o]||s(o,{});(a.versions||(a.versions=[])).push({version:"3.46.0",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE",source:"https://github.com/zloirock/core-js"})},1851:(e,t,r)=>{"use strict";var n,i,s,o=r(8473),a=r(1483),c=r(1704),l=r(5290),u=r(3181),p=r(7914),d=r(1),h=r(9557),f=d("iterator"),g=!1;[].keys&&("next"in(s=[].keys())?(i=u(u(s)))!==Object.prototype&&(n=i):g=!0),!c(n)||o(function(){var e={};return n[f].call(e)!==e})?n={}:h&&(n=l(n)),a(n[f])||p(n,f,function(){return this}),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:g}},1866:(e,t,r)=>{"use strict";var n=r(4762),i=0,s=Math.random(),o=n(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+o(++i+s,36)}},1975:(e,t,r)=>{"use strict";var n=r(8612),i=r(1807),s=r(8120),o=r(2293),a=r(41),c=r(8660),l=r(8901),u=r(9557),p=r(6721),d=r(7486),h=r(5267),f=!u&&!d("filter",function(){}),g=!u&&!f&&h("filter",TypeError),m=u||f||g,v=c(function(){for(var e,t,r=this.iterator,n=this.predicate,s=this.next;;){if(e=o(i(s,r)),this.done=!!e.done)return;if(t=e.value,l(r,n,[t,this.counter++],!0))return t}});n({target:"Iterator",proto:!0,real:!0,forced:m},{filter:function filter(e){o(this);try{s(e)}catch(e){p(this,"throw",e)}return g?i(g,this,e):new v(a(this),{predicate:e})}})},1983:(e,t,r)=>{"use strict";var n=r(6721);e.exports=function(e,t,r){for(var i=e.length-1;i>=0;i--)if(void 0!==e[i])try{r=n(e[i].iterator,t,r)}catch(e){t="throw",r=e}if("throw"===t)throw r;return r}},2048:(e,t,r)=>{"use strict";var n=r(382),i=r(5755),s=Function.prototype,o=n&&Object.getOwnPropertyDescriptor,a=i(s,"name"),c=a&&"something"===function something(){}.name,l=a&&(!n||n&&o(s,"name").configurable);e.exports={EXISTS:a,PROPER:c,CONFIGURABLE:l}},2095:(e,t,r)=>{"use strict";var n=r(5578),i=Object.defineProperty;e.exports=function(e,t){try{i(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},2121:(e,t,r)=>{"use strict";var n=r(4762),i=r(8473),s=r(1278),o=Object,a=n("".split);e.exports=i(function(){return!o("z").propertyIsEnumerable(0)})?function(e){return"String"===s(e)?a(e,""):o(e)}:o},2278:(e,t,r)=>{"use strict";var n=r(6742),i=r(4741).concat("length","prototype");t.f=Object.getOwnPropertyNames||function getOwnPropertyNames(e){return n(e,i)}},2293:(e,t,r)=>{"use strict";var n=r(1704),i=String,s=TypeError;e.exports=function(e){if(n(e))return e;throw new s(i(e)+" is not an object")}},2313:(e,t,r)=>{"use strict";var n=r(7914);e.exports=function(e,t,r){for(var i in t)n(e,i,t[i],r);return e}},2347:(e,t,r)=>{"use strict";var n=r(3312),i=Object;e.exports=function(e){return i(n(e))}},2355:(e,t,r)=>{"use strict";var n=r(1807),i=r(1704),s=r(1423),o=r(2564),a=r(348),c=r(1),l=TypeError,u=c("toPrimitive");e.exports=function(e,t){if(!i(e)||s(e))return e;var r,c=o(e,u);if(c){if(void 0===t&&(t="default"),r=n(c,e,t),!i(r)||s(r))return r;throw new l("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},2425:(e,t,r)=>{"use strict";var n=r(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(641));t.default=i.default.extend({elements:null,getDefaultElements:()=>({}),bindEvents(){},onInit(){this.initElements(),this.bindEvents()},initElements(){this.elements=this.getDefaultElements()}})},2564:(e,t,r)=>{"use strict";var n=r(8120),i=r(5983);e.exports=function(e,t){var r=e[t];return i(r)?void 0:n(r)}},2811:(e,t,r)=>{"use strict";var n=r(1409);e.exports=n("document","documentElement")},2890:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4846),r(6211);class _default extends elementorModules.ViewModule{getDefaultSettings(){return{selectors:{elements:".elementor-element",nestedDocumentElements:".elementor .elementor-element"},classes:{editMode:"elementor-edit-mode"}}}getDefaultElements(){const e=this.getSettings("selectors");return{$elements:this.$element.find(e.elements).not(this.$element.find(e.nestedDocumentElements))}}getDocumentSettings(e){let t;if(this.isEdit){t={};const e=elementor.settings.page.model;jQuery.each(e.getActiveControls(),r=>{t[r]=e.attributes[r]})}else t=this.$element.data("elementor-settings")||{};return this.getItems(t,e)}runElementsHandlers(){this.elements.$elements.each((e,t)=>setTimeout(()=>elementorFrontend.elementsHandler.runReadyTrigger(t)))}onInit(){this.$element=this.getSettings("$element"),super.onInit(),this.isEdit=this.$element.hasClass(this.getSettings("classes.editMode")),this.isEdit?elementor.on("document:loaded",()=>{elementor.settings.page.model.on("change",this.onSettingsChange.bind(this))}):this.runElementsHandlers()}onSettingsChange(){}}t.default=_default},2914:(e,t,r)=>{"use strict";var n=r(3786),i=r(8120),s=r(274),o=n(n.bind);e.exports=function(e,t){return i(e),void 0===t?e:s?o(e,t):function(){return e.apply(t,arguments)}}},2946:(e,t,r)=>{"use strict";var n=r(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(751)),s=n(r(5213));class ArgsObject extends i.default{static getInstanceType(){return"ArgsObject"}constructor(e){super(),this.args=e}requireArgument(e,t=this.args){if(!Object.prototype.hasOwnProperty.call(t,e))throw Error(`${e} is required.`)}requireArgumentType(e,t,r=this.args){if(this.requireArgument(e,r),typeof r[e]!==t)throw Error(`${e} invalid type: ${t}.`)}requireArgumentInstance(e,t,r=this.args){if(this.requireArgument(e,r),!(r[e]instanceof t||(0,s.default)(r[e],t)))throw Error(`${e} invalid instance.`)}requireArgumentConstructor(e,t,r=this.args){if(this.requireArgument(e,r),r[e].constructor.toString()!==t.prototype.constructor.toString())throw Error(`${e} invalid constructor type.`)}}t.default=ArgsObject},2970:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(5724);t.default=class Scroll{static scrollObserver(e){let t=0;const r={root:e.root||null,rootMargin:e.offset||"0px",threshold:((e=0)=>{const t=[];if(e>0&&e<=100){const r=100/e;for(let e=0;e<=100;e+=r)t.push(e/100)}else t.push(0);return t})(e.sensitivity)};return new IntersectionObserver(function handleIntersect(r){const n=r[0].boundingClientRect.y,i=r[0].isIntersecting,s=n<t?"down":"up",o=Math.abs(parseFloat((100*r[0].intersectionRatio).toFixed(2)));e.callback({sensitivity:e.sensitivity,isInViewport:i,scrollPercentage:o,intersectionScrollDirection:s}),t=n},r)}static getElementViewportPercentage(e,t={}){const r=e[0].getBoundingClientRect(),n=t.start||0,i=t.end||0,s=window.innerHeight*n/100,o=window.innerHeight*i/100,a=r.top-window.innerHeight,c=0-a+s,l=r.top+s+e.height()-a+o,u=Math.max(0,Math.min(c/l,1));return parseFloat((100*u).toFixed(2))}static getPageScrollPercentage(e={},t){const r=e.start||0,n=e.end||0,i=t||document.documentElement.scrollHeight-document.documentElement.clientHeight,s=i*r/100,o=i+s+i*n/100;return(document.documentElement.scrollTop+document.body.scrollTop+s)/o*100}}},3005:(e,t,r)=>{"use strict";var n=r(1703);e.exports=function(e){var t=+e;return t!=t||0===t?0:n(t)}},3145:(e,t,r)=>{"use strict";var n=r(5578),i=r(1704),s=n.document,o=i(s)&&i(s.createElement);e.exports=function(e){return o?s.createElement(e):{}}},3181:(e,t,r)=>{"use strict";var n=r(5755),i=r(1483),s=r(2347),o=r(5409),a=r(9441),c=o("IE_PROTO"),l=Object,u=l.prototype;e.exports=a?l.getPrototypeOf:function(e){var t=s(e);if(n(t,c))return t[c];var r=t.constructor;return i(r)&&t instanceof r?r.prototype:t instanceof l?u:null}},3242:(e,t,r)=>{"use strict";var n=r(8612),i=r(1807),s=r(1506),o=r(8120),a=r(2293),c=r(41),l=r(6721),u=r(5267)("find",TypeError);n({target:"Iterator",proto:!0,real:!0,forced:u},{find:function find(e){a(this);try{o(e)}catch(e){l(this,"throw",e)}if(u)return i(u,this,e);var t=c(this),r=0;return s(t,function(t,n){if(e(t,r++))return n(t)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})},3312:(e,t,r)=>{"use strict";var n=r(5983),i=TypeError;e.exports=function(e){if(n(e))throw new i("Can't call method on "+e);return e}},3392:(e,t,r)=>{"use strict";var n=r(3005),i=Math.max,s=Math.min;e.exports=function(e,t){var r=n(e);return r<0?i(r+t,0):s(r,t)}},3617:(e,t,r)=>{"use strict";var n=r(8612),i=r(5578),s=r(6021),o=r(2293),a=r(1483),c=r(3181),l=r(3864),u=r(670),p=r(8473),d=r(5755),h=r(1),f=r(1851).IteratorPrototype,g=r(382),m=r(9557),v="constructor",y="Iterator",w=h("toStringTag"),b=TypeError,S=i[y],x=m||!a(S)||S.prototype!==f||!p(function(){S({})}),E=function Iterator(){if(s(this,f),c(this)===f)throw new b("Abstract class Iterator not directly constructable")},defineIteratorPrototypeAccessor=function(e,t){g?l(f,e,{configurable:!0,get:function(){return t},set:function(t){if(o(this),this===f)throw new b("You can't redefine this property");d(this,e)?this[e]=t:u(this,e,t)}}):f[e]=t};d(f,w)||defineIteratorPrototypeAccessor(w,y),!x&&d(f,v)&&f[v]!==Object||defineIteratorPrototypeAccessor(v,E),E.prototype=f,n({global:!0,constructor:!0,forced:x},{Iterator:E})},3658:(e,t,r)=>{"use strict";var n=r(6742),i=r(4741);e.exports=Object.keys||function keys(e){return n(e,i)}},3786:(e,t,r)=>{"use strict";var n=r(1278),i=r(4762);e.exports=function(e){if("Function"===n(e))return i(e)}},3815:(e,t,r)=>{"use strict";var n=r(2355),i=r(1423);e.exports=function(e){var t=n(e,"string");return i(t)?t:t+""}},3864:(e,t,r)=>{"use strict";var n=r(169),i=r(5835);e.exports=function(e,t,r){return r.get&&n(r.get,t,{getter:!0}),r.set&&n(r.set,t,{setter:!0}),i.f(e,t,r)}},3896:(e,t,r)=>{"use strict";var n=r(382),i=r(8473);e.exports=n&&i(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},3980:(e,t,r)=>{"use strict";var n=r(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(5724);var i=n(r(2425));t.default=i.default.extend({getDefaultSettings:()=>({container:null,items:null,columnsCount:3,verticalSpaceBetween:30}),getDefaultElements(){return{$container:jQuery(this.getSettings("container")),$items:jQuery(this.getSettings("items"))}},run(){var e=[],t=this.elements.$container.position().top,r=this.getSettings(),n=r.columnsCount;t+=parseInt(this.elements.$container.css("margin-top"),10),this.elements.$items.each(function(i){var s=Math.floor(i/n),o=jQuery(this),a=o[0].getBoundingClientRect().height+r.verticalSpaceBetween;if(s){var c=o.position(),l=i%n,u=c.top-t-e[l];u-=parseInt(o.css("margin-top"),10),u*=-1,o.css("margin-top",u+"px"),e[l]+=a}else e.push(a)})}})},3991:(e,t,r)=>{"use strict";var n=r(8612),i=r(1807),s=r(8120),o=r(2293),a=r(41),c=r(8660),l=r(8901),u=r(6721),p=r(7486),d=r(5267),h=r(9557),f=!h&&!p("map",function(){}),g=!h&&!f&&d("map",TypeError),m=h||f||g,v=c(function(){var e=this.iterator,t=o(i(this.next,e));if(!(this.done=!!t.done))return l(e,this.mapper,[t.value,this.counter++],!0)});n({target:"Iterator",proto:!0,real:!0,forced:m},{map:function map(e){o(this);try{s(e)}catch(e){u(this,"throw",e)}return g?i(g,this,e):new v(a(this),{mapper:e})}})},4338:(e,t,r)=>{"use strict";var n={};n[r(1)("toStringTag")]="z",e.exports="[object z]"===String(n)},4347:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},4364:(e,t,r)=>{"use strict";r(3991)},4483:(e,t,r)=>{"use strict";var n,i,s,o=r(4644),a=r(5578),c=r(1704),l=r(9037),u=r(5755),p=r(1831),d=r(5409),h=r(1507),f="Object already initialized",g=a.TypeError,m=a.WeakMap;if(o||p.state){var v=p.state||(p.state=new m);v.get=v.get,v.has=v.has,v.set=v.set,n=function(e,t){if(v.has(e))throw new g(f);return t.facade=e,v.set(e,t),t},i=function(e){return v.get(e)||{}},s=function(e){return v.has(e)}}else{var y=d("state");h[y]=!0,n=function(e,t){if(u(e,y))throw new g(f);return t.facade=e,l(e,y,t),t},i=function(e){return u(e,y)?e[y]:{}},s=function(e){return u(e,y)}}e.exports={set:n,get:i,has:s,enforce:function(e){return s(e)?i(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!c(t)||(r=i(t)).type!==e)throw new g("Incompatible receiver, "+e+" required");return r}}}},4644:(e,t,r)=>{"use strict";var n=r(5578),i=r(1483),s=n.WeakMap;e.exports=i(s)&&/native code/.test(String(s))},4741:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},4762:(e,t,r)=>{"use strict";var n=r(274),i=Function.prototype,s=i.call,o=n&&i.bind.bind(s,s);e.exports=n?o:function(e){return function(){return s.apply(e,arguments)}}},4815:(e,t,r)=>{"use strict";var n=r(4762);e.exports=n({}.isPrototypeOf)},4846:(e,t,r)=>{"use strict";r(3617)},4887:(e,t,r)=>{"use strict";var n=r(1807),i=r(8120),s=r(2293),o=r(8761),a=r(6665),c=TypeError;e.exports=function(e,t){var r=arguments.length<2?a(e):t;if(i(r))return s(n(r,e));throw new c(o(e)+" is not iterable")}},4914:(e,t,r)=>{"use strict";var n=r(1278);e.exports=Array.isArray||function isArray(e){return"Array"===n(e)}},4946:(e,t,r)=>{"use strict";var n=r(6784),i=n(r(1265)),s=n(r(2890)),o=n(r(7955)),a=n(r(8140)),c=n(r(7224)),l=n(r(5633)),u=n(r(9603));i.default.frontend={Document:s.default,tools:{StretchElement:o.default},handlers:{Base:c.default,StretchedElement:a.default,SwiperBase:l.default,CarouselBase:u.default}}},4961:(e,t,r)=>{"use strict";var n=r(382),i=r(1807),s=r(7611),o=r(7738),a=r(5599),c=r(3815),l=r(5755),u=r(1799),p=Object.getOwnPropertyDescriptor;t.f=n?p:function getOwnPropertyDescriptor(e,t){if(e=a(e),t=c(t),u)try{return p(e,t)}catch(e){}if(l(e,t))return o(!i(s.f,e,t),e[t])}},5022:(e,t,r)=>{"use strict";var n=r(6029);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5213:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=(e,t)=>{t=Array.isArray(t)?t:[t];for(const r of t)if(e.constructor.name===r.prototype[Symbol.toStringTag])return!0;return!1}},5247:e=>{"use strict";e.exports=function(e,t){return{value:e,done:t}}},5267:(e,t,r)=>{"use strict";var n=r(5578);e.exports=function(e,t){var r=n.Iterator,i=r&&r.prototype,s=i&&i[e],o=!1;if(s)try{s.call({next:function(){return{done:!0}},return:function(){o=!0}},-1)}catch(e){e instanceof t||(o=!1)}if(!o)return s}},5290:(e,t,r)=>{"use strict";var n,i=r(2293),s=r(5799),o=r(4741),a=r(1507),c=r(2811),l=r(3145),u=r(5409),p="prototype",d="script",h=u("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return"<"+d+">"+e+"</"+d+">"},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObject=function(){try{n=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;NullProtoObject="undefined"!=typeof document?document.domain&&n?NullProtoObjectViaActiveX(n):(t=l("iframe"),r="java"+d+":",t.style.display="none",c.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(scriptTag("document.F=Object")),e.close(),e.F):NullProtoObjectViaActiveX(n);for(var i=o.length;i--;)delete NullProtoObject[p][o[i]];return NullProtoObject()};a[h]=!0,e.exports=Object.create||function create(e,t){var r;return null!==e?(EmptyConstructor[p]=i(e),r=new EmptyConstructor,EmptyConstructor[p]=null,r[h]=e):r=NullProtoObject(),void 0===t?r:s.f(r,t)}},5299:(e,t,r)=>{"use strict";var n=r(1),i=r(6775),s=n("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||o[s]===e)}},5409:(e,t,r)=>{"use strict";var n=r(7255),i=r(1866),s=n("keys");e.exports=function(e){return s[e]||(s[e]=i(e))}},5578:function(e,t,r){"use strict";var check=function(e){return e&&e.Math===Math&&e};e.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof r.g&&r.g)||check("object"==typeof this&&this)||function(){return this}()||Function("return this")()},5599:(e,t,r)=>{"use strict";var n=r(2121),i=r(3312);e.exports=function(e){return n(i(e))}},5633:(e,t,r)=>{"use strict";var n=r(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n(r(7224));class SwiperHandlerBase extends i.default{getInitialSlide(){const e=this.getEditSettings();return e.activeItemIndex?e.activeItemIndex-1:0}getSlidesCount(){return this.elements.$slides.length}togglePauseOnHover(e){e?this.elements.$swiperContainer.on({mouseenter:()=>{this.swiper.autoplay.stop()},mouseleave:()=>{this.swiper.autoplay.start()}}):this.elements.$swiperContainer.off("mouseenter mouseleave")}handleKenBurns(){const e=this.getSettings();this.$activeImageBg&&this.$activeImageBg.removeClass(e.classes.kenBurnsActive),this.activeItemIndex=this.swiper?this.swiper.activeIndex:this.getInitialSlide(),this.swiper?this.$activeImageBg=jQuery(this.swiper.slides[this.activeItemIndex]).children("."+e.classes.slideBackground):this.$activeImageBg=jQuery(this.elements.$slides[0]).children("."+e.classes.slideBackground),this.$activeImageBg.addClass(e.classes.kenBurnsActive)}}t.default=SwiperHandlerBase},5724:(e,t,r)=>{"use strict";var n=r(8612),i=r(2347),s=r(6960),o=r(9273),a=r(1091);n({target:"Array",proto:!0,arity:1,forced:r(8473)(function(){return 4294967297!==[].push.call({length:4294967296},1)})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function push(e){var t=i(this),r=s(t),n=arguments.length;a(r+n);for(var c=0;c<n;c++)t[r]=arguments[c],r++;return o(t,r),r}})},5755:(e,t,r)=>{"use strict";var n=r(4762),i=r(2347),s=n({}.hasOwnProperty);e.exports=Object.hasOwn||function hasOwn(e,t){return s(i(e),t)}},5799:(e,t,r)=>{"use strict";var n=r(382),i=r(3896),s=r(5835),o=r(2293),a=r(5599),c=r(3658);t.f=n&&!i?Object.defineProperties:function defineProperties(e,t){o(e);for(var r,n=a(t),i=c(t),l=i.length,u=0;l>u;)s.f(e,r=i[u++],n[r]);return e}},5835:(e,t,r)=>{"use strict";var n=r(382),i=r(1799),s=r(3896),o=r(2293),a=r(3815),c=TypeError,l=Object.defineProperty,u=Object.getOwnPropertyDescriptor,p="enumerable",d="configurable",h="writable";t.f=n?s?function defineProperty(e,t,r){if(o(e),t=a(t),o(r),"function"==typeof e&&"prototype"===t&&"value"in r&&h in r&&!r[h]){var n=u(e,t);n&&n[h]&&(e[t]=r.value,r={configurable:d in r?r[d]:n[d],enumerable:p in r?r[p]:n[p],writable:!1})}return l(e,t,r)}:l:function defineProperty(e,t,r){if(o(e),t=a(t),o(r),i)try{return l(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new c("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},5983:e=>{"use strict";e.exports=function(e){return null==e}},6021:(e,t,r)=>{"use strict";var n=r(4815),i=TypeError;e.exports=function(e,t){if(n(t,e))return e;throw new i("Incorrect invocation")}},6029:(e,t,r)=>{"use strict";var n=r(6477),i=r(8473),s=r(5578).String;e.exports=!!Object.getOwnPropertySymbols&&!i(function(){var e=Symbol("symbol detection");return!s(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})},6145:(e,t,r)=>{"use strict";var n=r(4338),i=r(1483),s=r(1278),o=r(1)("toStringTag"),a=Object,c="Arguments"===s(function(){return arguments}());e.exports=n?s:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=a(e),o))?r:c?s(t):"Object"===(n=s(t))&&i(t.callee)?"Arguments":n}},6211:(e,t,r)=>{"use strict";r(3242)},6477:(e,t,r)=>{"use strict";var n,i,s=r(5578),o=r(9461),a=s.process,c=s.Deno,l=a&&a.versions||c&&c.version,u=l&&l.v8;u&&(i=(n=u.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&o&&(!(n=o.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=o.match(/Chrome\/(\d+)/))&&(i=+n[1]),e.exports=i},6651:(e,t,r)=>{"use strict";var n=r(5599),i=r(3392),s=r(6960),createMethod=function(e){return function(t,r,o){var a=n(t),c=s(a);if(0===c)return!e&&-1;var l,u=i(o,c);if(e&&r!=r){for(;c>u;)if((l=a[u++])!=l)return!0}else for(;c>u;u++)if((e||u in a)&&a[u]===r)return e||u||0;return!e&&-1}};e.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},6665:(e,t,r)=>{"use strict";var n=r(6145),i=r(2564),s=r(5983),o=r(6775),a=r(1)("iterator");e.exports=function(e){if(!s(e))return i(e,a)||i(e,"@@iterator")||o[n(e)]}},6721:(e,t,r)=>{"use strict";var n=r(1807),i=r(2293),s=r(2564);e.exports=function(e,t,r){var o,a;i(e);try{if(!(o=s(e,"return"))){if("throw"===t)throw r;return r}o=n(o,e)}catch(e){a=!0,o=e}if("throw"===t)throw r;if(a)throw o;return i(o),r}},6726:(e,t,r)=>{"use strict";var n=r(5755),i=r(9497),s=r(4961),o=r(5835);e.exports=function(e,t,r){for(var a=i(t),c=o.f,l=s.f,u=0;u<a.length;u++){var p=a[u];n(e,p)||r&&n(r,p)||c(e,p,l(t,p))}}},6742:(e,t,r)=>{"use strict";var n=r(4762),i=r(5755),s=r(5599),o=r(6651).indexOf,a=r(1507),c=n([].push);e.exports=function(e,t){var r,n=s(e),l=0,u=[];for(r in n)!i(a,r)&&i(n,r)&&c(u,r);for(;t.length>l;)i(n,r=t[l++])&&(~o(u,r)||c(u,r));return u}},6775:e=>{"use strict";e.exports={}},6784:e=>{e.exports=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},6960:(e,t,r)=>{"use strict";var n=r(8324);e.exports=function(e){return n(e.length)}},7224:(e,t,r)=>{"use strict";r(5724),r(4846),r(7458),r(6211),r(9655),e.exports=elementorModules.ViewModule.extend({$element:null,editorListeners:null,onElementChange:null,onEditSettingsChange:null,onPageSettingsChange:null,isEdit:null,__construct(e){this.isActive(e)&&(this.$element=e.$element,this.isEdit=this.$element.hasClass("elementor-element-edit-mode"),this.isEdit&&this.addEditorListeners())},isActive:()=>!0,isElementInTheCurrentDocument(){return!!elementorFrontend.isEditMode()&&elementor.documents.currentDocument.id.toString()===this.$element[0].closest(".elementor").dataset.elementorId},findElement(e){var t=this.$element;return t.find(e).filter(function(){return jQuery(this).parent().closest(".elementor-element").is(t)})},getUniqueHandlerID(e,t){return e||(e=this.getModelCID()),t||(t=this.$element),e+t.attr("data-element_type")+this.getConstructorID()},initEditorListeners(){var e=this;if(e.editorListeners=[{event:"element:destroy",to:elementor.channels.data,callback(t){t.cid===e.getModelCID()&&e.onDestroy()}}],e.onElementChange){const t=e.getWidgetType()||e.getElementType();let r="change";"global"!==t&&(r+=":"+t),e.editorListeners.push({event:r,to:elementor.channels.editor,callback(t,r){e.getUniqueHandlerID(r.model.cid,r.$el)===e.getUniqueHandlerID()&&e.onElementChange(t.model.get("name"),t,r)}})}e.onEditSettingsChange&&e.editorListeners.push({event:"change:editSettings",to:elementor.channels.editor,callback(t,r){if(r.model.cid!==e.getModelCID())return;const n=Object.keys(t.changed)[0];e.onEditSettingsChange(n,t.changed[n])}}),["page"].forEach(function(t){var r="on"+t[0].toUpperCase()+t.slice(1)+"SettingsChange";e[r]&&e.editorListeners.push({event:"change",to:elementor.settings[t].model,callback(t){e[r](t.changed)}})})},getEditorListeners(){return this.editorListeners||this.initEditorListeners(),this.editorListeners},addEditorListeners(){var e=this.getUniqueHandlerID();this.getEditorListeners().forEach(function(t){elementorFrontend.addListenerOnce(e,t.event,t.callback,t.to)})},removeEditorListeners(){var e=this.getUniqueHandlerID();this.getEditorListeners().forEach(function(t){elementorFrontend.removeListeners(e,t.event,null,t.to)})},getElementType(){return this.$element.data("element_type")},getWidgetType(){const e=this.$element.data("widget_type");if(e)return e.split(".")[0]},getID(){return this.$element.data("id")},getModelCID(){return this.$element.data("model-cid")},getElementSettings(e){let t={};const r=this.getModelCID();if(this.isEdit&&r){const e=elementorFrontend.config.elements.data[r],n=e.attributes;let i=n.widgetType||n.elType;n.isInner&&(i="inner-"+i);let s=elementorFrontend.config.elements.keys[i];s||(s=elementorFrontend.config.elements.keys[i]=[],jQuery.each(e.controls,(e,t)=>{(t.frontend_available||t.editor_available)&&s.push(e)})),jQuery.each(e.getActiveControls(),function(e){if(-1!==s.indexOf(e)){let r=n[e];r.toJSON&&(r=r.toJSON()),t[e]=r}})}else t=this.$element.data("settings")||{};return this.getItems(t,e)},getEditSettings(e){var t={};return this.isEdit&&(t=elementorFrontend.config.elements.editSettings[this.getModelCID()].attributes),this.getItems(t,e)},getCurrentDeviceSetting(e){return elementorFrontend.getCurrentDeviceSetting(this.getElementSettings(),e)},onInit(){this.isActive(this.getSettings())&&elementorModules.ViewModule.prototype.onInit.apply(this,arguments)},onDestroy(){this.isEdit&&this.removeEditorListeners(),this.unbindEvents&&this.unbindEvents()}})},7255:(e,t,r)=>{"use strict";var n=r(1831);e.exports=function(e,t){return n[e]||(n[e]=t||{})}},7268:(e,t,r)=>{"use strict";var n=r(4762),i=r(1483),s=r(1831),o=n(Function.toString);i(s.inspectSource)||(s.inspectSource=function(e){return o(e)}),e.exports=s.inspectSource},7458:(e,t,r)=>{"use strict";r(1975)},7486:e=>{"use strict";e.exports=function(e,t){var r="function"==typeof Iterator&&Iterator.prototype[e];if(r)try{r.call({next:null},t).next()}catch(e){return!0}}},7611:(e,t)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);t.f=i?function propertyIsEnumerable(e){var t=n(this,e);return!!t&&t.enumerable}:r},7738:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},7914:(e,t,r)=>{"use strict";var n=r(1483),i=r(5835),s=r(169),o=r(2095);e.exports=function(e,t,r,a){a||(a={});var c=a.enumerable,l=void 0!==a.name?a.name:t;if(n(r)&&s(r,l,a),a.global)c?e[t]=r:o(t,r);else{try{a.unsafe?e[t]&&(c=!0):delete e[t]}catch(e){}c?e[t]=r:i.f(e,t,{value:r,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},7955:e=>{"use strict";e.exports=elementorModules.ViewModule.extend({getDefaultSettings:()=>({element:null,direction:elementorFrontend.config.is_rtl?"right":"left",selectors:{container:window},considerScrollbar:!1,cssOutput:"inline"}),getDefaultElements(){return{$element:jQuery(this.getSettings("element"))}},stretch(){const e=this.getSettings();let t;try{t=jQuery(e.selectors.container)}catch(e){}t&&t.length||(t=jQuery(this.getDefaultSettings().selectors.container)),this.reset();var r=this.elements.$element,n=t.innerWidth(),i=r.offset().left,s="fixed"===r.css("position"),o=s?0:i,a=window===t[0];if(!a){var c=t.offset().left;s&&(o=c),i>c&&(o=i-c)}if(e.considerScrollbar&&a){o-=window.innerWidth-n}s||(elementorFrontend.config.is_rtl&&(o=n-(r.outerWidth()+o)),o=-o),e.margin&&(o+=e.margin);var l={};let u=n;e.margin&&(u-=2*e.margin),l.width=u+"px",l[e.direction]=o+"px","variables"!==e.cssOutput?r.css(l):this.applyCssVariables(r,l)},reset(){const e={},t=this.getSettings(),r=this.elements.$element;"variables"!==t.cssOutput?(e.width="",e[t.direction]="",r.css(e)):this.resetCssVariables(r)},applyCssVariables(e,t){e.css("--stretch-width",t.width),t.left?e.css("--stretch-left",t.left):e.css("--stretch-right",t.right)},resetCssVariables(e){e.css({"--stretch-width":"","--stretch-left":"","--stretch-right":""})}})},7958:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseRegistry=void 0,r(4846),r(7458),r(9655),r(4364);t.BaseRegistry=class BaseRegistry{constructor(){this.sections=new Map}register(e){if(!e.key||!e.title)throw new Error("Template type must have key and title");const t=this.get(e.key)||this.formatSection(e);if(e.children)if(t.children){const r=new Map(t.children.map(e=>[e.key,e]));e.children.forEach(e=>{const t=this.formatSection(e);r.set(e.key,t)}),t.children=Array.from(r.values())}else t.children=e.children.map(e=>this.formatSection(e));this.sections.set(e.key,t)}formatSection({children:e,...t}){return{key:t.key,title:t.title,description:t.description||"",useParentDefault:!1!==t.useParentDefault,getInitialState:t.getInitialState||null,component:t.component||null,order:t.order||10,isAvailable:t.isAvailable||(()=>!0),...t}}getAll(){return Array.from(this.sections.values()).filter(e=>e.isAvailable()).map(e=>e.children?{...e,children:[...e.children].sort((e,t)=>e.order-t.order)}:e).sort((e,t)=>e.order-t.order)}get(e){return this.sections.get(e)}}},8120:(e,t,r)=>{"use strict";var n=r(1483),i=r(8761),s=TypeError;e.exports=function(e){if(n(e))return e;throw new s(i(e)+" is not a function")}},8140:(e,t,r)=>{"use strict";var n=r(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4846),r(6211);var i=n(r(7224));class StretchedElement extends i.default{getStretchedClass(){return"e-stretched"}getStretchSettingName(){return"stretch_element"}getStretchActiveValue(){return"yes"}bindEvents(){const e=this.getUniqueHandlerID();elementorFrontend.addListenerOnce(e,"resize",this.stretch),elementorFrontend.addListenerOnce(e,"sticky:stick",this.stretch,this.$element),elementorFrontend.addListenerOnce(e,"sticky:unstick",this.stretch,this.$element),elementorFrontend.isEditMode()&&(this.onKitChangeStretchContainerChange=this.onKitChangeStretchContainerChange.bind(this),elementor.channels.editor.on("kit:change:stretchContainer",this.onKitChangeStretchContainerChange))}unbindEvents(){elementorFrontend.removeListeners(this.getUniqueHandlerID(),"resize",this.stretch),elementorFrontend.isEditMode()&&elementor.channels.editor.off("kit:change:stretchContainer",this.onKitChangeStretchContainerChange)}isActive(e){return elementorFrontend.isEditMode()||e.$element.hasClass(this.getStretchedClass())}getStretchElementForConfig(e=null){return e?this.$element.find(e):this.$element}getStretchElementConfig(){return{element:this.getStretchElementForConfig(),selectors:{container:this.getStretchContainer()},considerScrollbar:elementorFrontend.isEditMode()&&elementorFrontend.config.is_rtl}}initStretch(){this.stretch=this.stretch.bind(this),this.stretchElement=new elementorModules.frontend.tools.StretchElement(this.getStretchElementConfig())}getStretchContainer(){return elementorFrontend.getKitSettings("stretched_section_container")||window}isStretchSettingEnabled(){return this.getElementSettings(this.getStretchSettingName())===this.getStretchActiveValue()}stretch(){this.isStretchSettingEnabled()&&this.stretchElement.stretch()}onInit(...e){this.isActive(this.getSettings())&&(this.initStretch(),super.onInit(...e),this.stretch())}onElementChange(e){this.getStretchSettingName()===e&&(this.isStretchSettingEnabled()?this.stretch():this.stretchElement.reset())}onKitChangeStretchContainerChange(){this.stretchElement.setSettings("selectors.container",this.getStretchContainer()),this.stretch()}}t.default=StretchedElement},8324:(e,t,r)=>{"use strict";var n=r(3005),i=Math.min;e.exports=function(e){var t=n(e);return t>0?i(t,9007199254740991):0}},8473:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},8612:(e,t,r)=>{"use strict";var n=r(5578),i=r(4961).f,s=r(9037),o=r(7914),a=r(2095),c=r(6726),l=r(8730);e.exports=function(e,t){var r,u,p,d,h,f=e.target,g=e.global,m=e.stat;if(r=g?n:m?n[f]||a(f,{}):n[f]&&n[f].prototype)for(u in t){if(d=t[u],p=e.dontCallGetSet?(h=i(r,u))&&h.value:r[u],!l(g?u:f+(m?".":"#")+u,e.forced)&&void 0!==p){if(typeof d==typeof p)continue;c(d,p)}(e.sham||p&&p.sham)&&s(d,"sham",!0),o(r,u,d,e)}}},8660:(e,t,r)=>{"use strict";var n=r(1807),i=r(5290),s=r(9037),o=r(2313),a=r(1),c=r(4483),l=r(2564),u=r(1851).IteratorPrototype,p=r(5247),d=r(6721),h=r(1983),f=a("toStringTag"),g="IteratorHelper",m="WrapForValidIterator",v="normal",y="throw",w=c.set,createIteratorProxyPrototype=function(e){var t=c.getterFor(e?m:g);return o(i(u),{next:function next(){var r=t(this);if(e)return r.nextHandler();if(r.done)return p(void 0,!0);try{var n=r.nextHandler();return r.returnHandlerResult?n:p(n,r.done)}catch(e){throw r.done=!0,e}},return:function(){var r=t(this),i=r.iterator;if(r.done=!0,e){var s=l(i,"return");return s?n(s,i):p(void 0,!0)}if(r.inner)try{d(r.inner.iterator,v)}catch(e){return d(i,y,e)}if(r.openIters)try{h(r.openIters,v)}catch(e){return d(i,y,e)}return i&&d(i,v),p(void 0,!0)}})},b=createIteratorProxyPrototype(!0),S=createIteratorProxyPrototype(!1);s(S,f,"Iterator Helper"),e.exports=function(e,t,r){var n=function Iterator(n,i){i?(i.iterator=n.iterator,i.next=n.next):i=n,i.type=t?m:g,i.returnHandlerResult=!!r,i.nextHandler=e,i.counter=0,i.done=!1,w(this,i)};return n.prototype=t?b:S,n}},8685:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ForceMethodImplementation=void 0;class ForceMethodImplementation extends Error{constructor(e={},t={}){super(`${e.isStatic?"static ":""}${e.fullName}() should be implemented, please provide '${e.functionName||e.fullName}' functionality.`,t),Object.keys(t).length&&console.error(t),Error.captureStackTrace(this,ForceMethodImplementation)}}t.ForceMethodImplementation=ForceMethodImplementation;t.default=e=>{const t=Error().stack.split("\n")[2].trim(),r=t.startsWith("at new")?"constructor":t.split(" ")[1],n={};if(n.functionName=r,n.fullName=r,n.functionName.includes(".")){const e=n.functionName.split(".");n.className=e[0],n.functionName=e[1]}else n.isStatic=!0;throw new ForceMethodImplementation(n,e)}},8730:(e,t,r)=>{"use strict";var n=r(8473),i=r(1483),s=/#|\.prototype\./,isForced=function(e,t){var r=a[o(e)];return r===l||r!==c&&(i(t)?n(t):!!t)},o=isForced.normalize=function(e){return String(e).replace(s,".").toLowerCase()},a=isForced.data={},c=isForced.NATIVE="N",l=isForced.POLYFILL="P";e.exports=isForced},8761:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},8901:(e,t,r)=>{"use strict";var n=r(2293),i=r(6721);e.exports=function(e,t,r,s){try{return s?t(n(r)[0],r[1]):t(r)}catch(t){i(e,"throw",t)}}},9031:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createGetInitialState=function createGetInitialState(e,t={}){return(r,n)=>{let i=n;if(r.hasOwnProperty("uploadedData")){i=!1;const t=r.uploadedData.manifest.templates,n=elementorAppConfig?.["import-export-customization"]?.exportGroups||{};for(const r in t){if(n[t[r].doc_type]===e){i=!0;break}}}return{enabled:i,...t}}}},9037:(e,t,r)=>{"use strict";var n=r(382),i=r(5835),s=r(7738);e.exports=n?function(e,t,r){return i.f(e,t,s(1,r))}:function(e,t,r){return e[t]=r,e}},9273:(e,t,r)=>{"use strict";var n=r(382),i=r(4914),s=TypeError,o=Object.getOwnPropertyDescriptor,a=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=a?function(e,t){if(i(e)&&!o(e,"length").writable)throw new s("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},9441:(e,t,r)=>{"use strict";var n=r(8473);e.exports=!n(function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype})},9461:(e,t,r)=>{"use strict";var n=r(5578).navigator,i=n&&n.userAgent;e.exports=i?String(i):""},9497:(e,t,r)=>{"use strict";var n=r(1409),i=r(4762),s=r(2278),o=r(4347),a=r(2293),c=i([].concat);e.exports=n("Reflect","ownKeys")||function ownKeys(e){var t=s.f(a(e)),r=o.f;return r?c(t,r(e)):t}},9557:e=>{"use strict";e.exports=!1},9603:(e,t,r)=>{"use strict";var n=r(6784);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r(4846),r(6211),r(9655);var i=n(r(5633));class CarouselHandlerBase extends i.default{getDefaultSettings(){return{selectors:{carousel:".swiper",swiperWrapper:".swiper-wrapper",slideContent:".swiper-slide",swiperArrow:".elementor-swiper-button",paginationWrapper:".swiper-pagination",paginationBullet:".swiper-pagination-bullet",paginationBulletWrapper:".swiper-pagination-bullets"}}}getDefaultElements(){const e=this.getSettings("selectors"),t={$swiperContainer:this.$element.find(e.carousel),$swiperWrapper:this.$element.find(e.swiperWrapper),$swiperArrows:this.$element.find(e.swiperArrow),$paginationWrapper:this.$element.find(e.paginationWrapper),$paginationBullets:this.$element.find(e.paginationBullet),$paginationBulletWrapper:this.$element.find(e.paginationBulletWrapper)};return t.$slides=t.$swiperContainer.find(e.slideContent),t}getSwiperSettings(){const e=this.getElementSettings(),t=+e.slides_to_show||3,r=1===t,n=elementorFrontend.config.responsive.activeBreakpoints,i={mobile:1,tablet:r?1:2},s={slidesPerView:t,loop:"yes"===e.infinite,speed:e.speed,handleElementorBreakpoints:!0,breakpoints:{}};let o=t;Object.keys(n).reverse().forEach(t=>{const r=i[t]?i[t]:o;s.breakpoints[n[t].value]={slidesPerView:+e["slides_to_show_"+t]||r,slidesPerGroup:+e["slides_to_scroll_"+t]||1},e.image_spacing_custom&&(s.breakpoints[n[t].value].spaceBetween=this.getSpaceBetween(t)),o=+e["slides_to_show_"+t]||r}),"yes"===e.autoplay&&(s.autoplay={delay:e.autoplay_speed,disableOnInteraction:"yes"===e.pause_on_interaction}),r?(s.effect=e.effect,"fade"===e.effect&&(s.fadeEffect={crossFade:!0})):s.slidesPerGroup=+e.slides_to_scroll||1,e.image_spacing_custom&&(s.spaceBetween=this.getSpaceBetween());const a="arrows"===e.navigation||"both"===e.navigation,c="dots"===e.navigation||"both"===e.navigation||e.pagination;return a&&(s.navigation={prevEl:".elementor-swiper-button-prev",nextEl:".elementor-swiper-button-next"}),c&&(s.pagination={el:`.elementor-element-${this.getID()} .swiper-pagination`,type:e.pagination?e.pagination:"bullets",clickable:!0,renderBullet:(e,t)=>`<span class="${t}" role="button" tabindex="0" data-bullet-index="${e}" aria-label="${elementorFrontend.config.i18n.a11yCarouselPaginationBulletMessage} ${e+1}"></span>`}),"yes"===e.lazyload&&(s.lazy={loadPrevNext:!0,loadPrevNextAmount:1}),s.a11y={enabled:!0,prevSlideMessage:elementorFrontend.config.i18n.a11yCarouselPrevSlideMessage,nextSlideMessage:elementorFrontend.config.i18n.a11yCarouselNextSlideMessage,firstSlideMessage:elementorFrontend.config.i18n.a11yCarouselFirstSlideMessage,lastSlideMessage:elementorFrontend.config.i18n.a11yCarouselLastSlideMessage},s.on={slideChange:()=>{this.a11ySetPaginationTabindex(),this.handleElementHandlers(),this.a11ySetSlideAriaHidden()},init:()=>{this.a11ySetPaginationTabindex(),this.a11ySetSlideAriaHidden("initialisation")}},this.applyOffsetSettings(e,s,t),s}getOffsetWidth(){const e=elementorFrontend.getCurrentDeviceMode();return elementorFrontend.utils.controls.getResponsiveControlValue(this.getElementSettings(),"offset_width","size",e)||0}applyOffsetSettings(e,t,r){const n=e.offset_sides;if(!(elementorFrontend.isEditMode()&&"NestedCarousel"===this.constructor.name)&&n&&"none"!==n)switch(n){case"right":this.forceSliderToShowNextSlideWhenOnLast(t,r),this.addClassToSwiperContainer("offset-right");break;case"left":this.addClassToSwiperContainer("offset-left");break;case"both":this.forceSliderToShowNextSlideWhenOnLast(t,r),this.addClassToSwiperContainer("offset-both")}}forceSliderToShowNextSlideWhenOnLast(e,t){e.slidesPerView=t+.001}addClassToSwiperContainer(e){this.getDefaultElements().$swiperContainer[0].classList.add(e)}async onInit(...e){if(super.onInit(...e),!this.elements.$swiperContainer.length||2>this.elements.$slides.length)return;await this.initSwiper();"yes"===this.getElementSettings().pause_on_hover&&this.togglePauseOnHover(!0)}async initSwiper(){const e=elementorFrontend.utils.swiper;this.swiper=await new e(this.elements.$swiperContainer,this.getSwiperSettings()),this.elements.$swiperContainer.data("swiper",this.swiper)}bindEvents(){this.elements.$swiperArrows.on("keydown",this.onDirectionArrowKeydown.bind(this)),this.elements.$paginationWrapper.on("keydown",".swiper-pagination-bullet",this.onDirectionArrowKeydown.bind(this)),this.elements.$swiperContainer.on("keydown",".swiper-slide",this.onDirectionArrowKeydown.bind(this)),this.$element.find(":focusable").on("focus",this.onFocusDisableAutoplay.bind(this)),elementorFrontend.elements.$window.on("resize",this.getSwiperSettings.bind(this))}unbindEvents(){this.elements.$swiperArrows.off(),this.elements.$paginationWrapper.off(),this.elements.$swiperContainer.off(),this.$element.find(":focusable").off(),elementorFrontend.elements.$window.off("resize")}onDirectionArrowKeydown(e){const t=elementorFrontend.config.is_rtl,r=e.originalEvent.code,n=t?"ArrowLeft":"ArrowRight";if(!(-1!==["ArrowLeft","ArrowRight"].indexOf(r)))return!0;(t?"ArrowRight":"ArrowLeft")===r?this.swiper.slidePrev():n===r&&this.swiper.slideNext()}onFocusDisableAutoplay(){this.swiper.autoplay.stop()}updateSwiperOption(e){const t=this.getElementSettings()[e],r=this.swiper.params;switch(e){case"autoplay_speed":r.autoplay.delay=t;break;case"speed":r.speed=t}this.swiper.update()}getChangeableProperties(){return{pause_on_hover:"pauseOnHover",autoplay_speed:"delay",speed:"speed",arrows_position:"arrows_position"}}onElementChange(e){if(0===e.indexOf("image_spacing_custom"))return void this.updateSpaceBetween(e);if(this.getChangeableProperties()[e])if("pause_on_hover"===e){const e=this.getElementSettings("pause_on_hover");this.togglePauseOnHover("yes"===e)}else this.updateSwiperOption(e)}onEditSettingsChange(e){"activeItemIndex"===e&&this.swiper.slideToLoop(this.getEditSettings("activeItemIndex")-1)}getSpaceBetween(e=null){const t=elementorFrontend.utils.controls.getResponsiveControlValue(this.getElementSettings(),"image_spacing_custom","size",e);return Number(t)||0}updateSpaceBetween(e){const t=e.match("image_spacing_custom_(.*)"),r=t?t[1]:"desktop",n=this.getSpaceBetween(r);"desktop"!==r&&(this.swiper.params.breakpoints[elementorFrontend.config.responsive.activeBreakpoints[r].value].spaceBetween=n),this.swiper.params.spaceBetween=n,this.swiper.update()}getPaginationBullets(e="array"){const t=this.$element.find(this.getSettings("selectors").paginationBullet);return"array"===e?Array.from(t):t}a11ySetPaginationTabindex(){const e=this.swiper?.params?.pagination.bulletClass,t=this.swiper?.params?.pagination.bulletActiveClass;this.getPaginationBullets().forEach(e=>{e.classList?.contains(t)||e.removeAttribute("tabindex")});const r="ArrowLeft"===event?.code||"ArrowRight"===event?.code;event?.target?.classList?.contains(e)&&r&&this.$element.find(`.${t}`).trigger("focus")}getSwiperWrapperTranformXValue(){let e=this.elements.$swiperWrapper[0]?.style.transform;return e=e.replace("translate3d(",""),e=e.split(","),e=parseInt(e[0].replace("px","")),e||0}a11ySetSlideAriaHidden(e=""){if("number"!=typeof("initialisation"===e?0:this.swiper?.activeIndex))return;const t=this.getSwiperWrapperTranformXValue(),r=this.elements.$swiperWrapper[0].clientWidth;this.elements.$swiperContainer.find(this.getSettings("selectors").slideContent).each((e,n)=>{0<=n.offsetLeft+t&&r>n.offsetLeft+t?(n.removeAttribute("aria-hidden"),n.removeAttribute("inert")):(n.setAttribute("aria-hidden",!0),n.setAttribute("inert",""))})}handleElementHandlers(){}}t.default=CarouselHandlerBase},9655:(e,t,r)=>{"use strict";r(9930)},9930:(e,t,r)=>{"use strict";var n=r(8612),i=r(1807),s=r(1506),o=r(8120),a=r(2293),c=r(41),l=r(6721),u=r(5267)("forEach",TypeError);n({target:"Iterator",proto:!0,real:!0,forced:u},{forEach:function forEach(e){a(this);try{o(e)}catch(e){l(this,"throw",e)}if(u)return i(u,this,e);var t=c(this),r=0;s(t,function(t){e(t,r++)},{IS_RECORD:!0})}})}},e=>{var t;t=4946,e(e.s=t)}]);
!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(x){"use strict";var t,e,i,n,W,C,o,s,r,l,a,h,u;function E(t,e,i){return[parseFloat(t[0])*(a.test(t[0])?e/100:1),parseFloat(t[1])*(a.test(t[1])?i/100:1)]}function L(t,e){return parseInt(x.css(t,e),10)||0}function N(t){return null!=t&&t===t.window}x.ui=x.ui||{},x.ui.version="1.13.3",
x.extend(x.expr.pseudos,{data:x.expr.createPseudo?x.expr.createPseudo(function(e){return function(t){return!!x.data(t,e)}}):function(t,e,i){return!!x.data(t,i[3])}}),
x.fn.extend({disableSelection:(t="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}}),
x.ui.focusable=function(t,e){var i,n,o,s=t.nodeName.toLowerCase();return"area"===s?(o=(i=t.parentNode).name,!(!t.href||!o||"map"!==i.nodeName.toLowerCase())&&0<(i=x("img[usemap='#"+o+"']")).length&&i.is(":visible")):(/^(input|select|textarea|button|object)$/.test(s)?(n=!t.disabled)&&(o=x(t).closest("fieldset")[0])&&(n=!o.disabled):n="a"===s&&t.href||e,n&&x(t).is(":visible")&&function(t){var e=t.css("visibility");for(;"inherit"===e;)t=t.parent(),e=t.css("visibility");return"visible"===e}(x(t)))},x.extend(x.expr.pseudos,{focusable:function(t){return x.ui.focusable(t,null!=x.attr(t,"tabindex"))}}),x.fn._form=function(){return"string"==typeof this[0].form?this.closest("form"):x(this[0].form)},
x.ui.formResetMixin={_formResetHandler:function(){var e=x(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");x.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){var t;this.form=this.element._form(),this.form.length&&((t=this.form.data("ui-form-reset-instances")||[]).length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t))},_unbindFormResetHandler:function(){var t;this.form.length&&((t=this.form.data("ui-form-reset-instances")).splice(x.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset"))}},x.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),
x.expr.pseudos||(x.expr.pseudos=x.expr[":"]),x.uniqueSort||(x.uniqueSort=x.unique),x.escapeSelector||(e=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,i=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},x.escapeSelector=function(t){return(t+"").replace(e,i)}),x.fn.even&&x.fn.odd||x.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}}),
x.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},
x.fn.labels=function(){var t,e,i;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(e=this.eq(0).parents("label"),(t=this.attr("id"))&&(i=(i=this.eq(0).parents().last()).add((i.length?i:this).siblings()),t="label[for='"+x.escapeSelector(t)+"']",e=e.add(i.find(t).addBack(t))),this.pushStack(e)):this.pushStack([])},x.ui.plugin={add:function(t,e,i){var n,o=x.ui[t].prototype;for(n in i)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([e,i[n]])},call:function(t,e,i,n){var o,s=t.plugins[e];if(s&&(n||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<s.length;o++)t.options[s[o][0]]&&s[o][1].apply(t.element,i)}},
W=Math.max,C=Math.abs,o=/left|center|right/,s=/top|center|bottom/,r=/[\+\-]\d+(\.[\d]+)?%?/,l=/^\w+/,a=/%$/,h=x.fn.position,x.position={scrollbarWidth:function(){var t,e,i;return void 0!==n?n:(i=(e=x("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>")).children()[0],x("body").append(e),t=i.offsetWidth,e.css("overflow","scroll"),t===(i=i.offsetWidth)&&(i=e[0].clientWidth),e.remove(),n=t-i)},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),e="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?x.position.scrollbarWidth():0,height:e?x.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=x(t||window),i=N(e[0]),n=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:n,offset:!i&&!n?x(t).offset():{left:0,top:0},scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},x.fn.position=function(f){var c,d,p,g,m,v,y,w,b,_,t,e;return f&&f.of?(v="string"==typeof(f=x.extend({},f)).of?x(document).find(f.of):x(f.of),y=x.position.getWithinInfo(f.within),w=x.position.getScrollInfo(y),b=(f.collision||"flip").split(" "),_={},e=9===(e=(t=v)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:N(e)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:e.preventDefault?{width:0,height:0,offset:{top:e.pageY,left:e.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()},v[0].preventDefault&&(f.at="left top"),d=e.width,p=e.height,m=x.extend({},g=e.offset),x.each(["my","at"],function(){var t,e,i=(f[this]||"").split(" ");(i=1===i.length?o.test(i[0])?i.concat(["center"]):s.test(i[0])?["center"].concat(i):["center","center"]:i)[0]=o.test(i[0])?i[0]:"center",i[1]=s.test(i[1])?i[1]:"center",t=r.exec(i[0]),e=r.exec(i[1]),_[this]=[t?t[0]:0,e?e[0]:0],f[this]=[l.exec(i[0])[0],l.exec(i[1])[0]]}),1===b.length&&(b[1]=b[0]),"right"===f.at[0]?m.left+=d:"center"===f.at[0]&&(m.left+=d/2),"bottom"===f.at[1]?m.top+=p:"center"===f.at[1]&&(m.top+=p/2),c=E(_.at,d,p),m.left+=c[0],m.top+=c[1],this.each(function(){var i,t,r=x(this),l=r.outerWidth(),a=r.outerHeight(),e=L(this,"marginLeft"),n=L(this,"marginTop"),o=l+e+L(this,"marginRight")+w.width,s=a+n+L(this,"marginBottom")+w.height,h=x.extend({},m),u=E(_.my,r.outerWidth(),r.outerHeight());"right"===f.my[0]?h.left-=l:"center"===f.my[0]&&(h.left-=l/2),"bottom"===f.my[1]?h.top-=a:"center"===f.my[1]&&(h.top-=a/2),h.left+=u[0],h.top+=u[1],i={marginLeft:e,marginTop:n},x.each(["left","top"],function(t,e){x.ui.position[b[t]]&&x.ui.position[b[t]][e](h,{targetWidth:d,targetHeight:p,elemWidth:l,elemHeight:a,collisionPosition:i,collisionWidth:o,collisionHeight:s,offset:[c[0]+u[0],c[1]+u[1]],my:f.my,at:f.at,within:y,elem:r})}),f.using&&(t=function(t){var e=g.left-h.left,i=e+d-l,n=g.top-h.top,o=n+p-a,s={target:{element:v,left:g.left,top:g.top,width:d,height:p},element:{element:r,left:h.left,top:h.top,width:l,height:a},horizontal:i<0?"left":0<e?"right":"center",vertical:o<0?"top":0<n?"bottom":"middle"};d<l&&C(e+i)<d&&(s.horizontal="center"),p<a&&C(n+o)<p&&(s.vertical="middle"),W(C(e),C(i))>W(C(n),C(o))?s.important="horizontal":s.important="vertical",f.using.call(this,t,s)}),r.offset(x.extend(h,{using:t}))})):h.apply(this,arguments)},x.ui.position={fit:{left:function(t,e){var i,n=e.within,o=n.isWindow?n.scrollLeft:n.offset.left,n=n.width,s=t.left-e.collisionPosition.marginLeft,r=o-s,l=s+e.collisionWidth-n-o;n<e.collisionWidth?0<r&&l<=0?(i=t.left+r+e.collisionWidth-n-o,t.left+=r-i):t.left=!(0<l&&r<=0)&&l<r?o+n-e.collisionWidth:o:0<r?t.left+=r:0<l?t.left-=l:t.left=W(t.left-s,t.left)},top:function(t,e){var i,n=e.within,n=n.isWindow?n.scrollTop:n.offset.top,o=e.within.height,s=t.top-e.collisionPosition.marginTop,r=n-s,l=s+e.collisionHeight-o-n;o<e.collisionHeight?0<r&&l<=0?(i=t.top+r+e.collisionHeight-o-n,t.top+=r-i):t.top=!(0<l&&r<=0)&&l<r?n+o-e.collisionHeight:n:0<r?t.top+=r:0<l?t.top-=l:t.top=W(t.top-s,t.top)}},flip:{left:function(t,e){var i=e.within,n=i.offset.left+i.scrollLeft,o=i.width,i=i.isWindow?i.scrollLeft:i.offset.left,s=t.left-e.collisionPosition.marginLeft,r=s-i,s=s+e.collisionWidth-o-i,l="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,a="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,h=-2*e.offset[0];r<0?((o=t.left+l+a+h+e.collisionWidth-o-n)<0||o<C(r))&&(t.left+=l+a+h):0<s&&(0<(n=t.left-e.collisionPosition.marginLeft+l+a+h-i)||C(n)<s)&&(t.left+=l+a+h)},top:function(t,e){var i=e.within,n=i.offset.top+i.scrollTop,o=i.height,i=i.isWindow?i.scrollTop:i.offset.top,s=t.top-e.collisionPosition.marginTop,r=s-i,s=s+e.collisionHeight-o-i,l="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,a="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,h=-2*e.offset[1];r<0?((o=t.top+l+a+h+e.collisionHeight-o-n)<0||o<C(r))&&(t.top+=l+a+h):0<s&&(0<(n=t.top-e.collisionPosition.marginTop+l+a+h-i)||C(n)<s)&&(t.top+=l+a+h)}},flipfit:{left:function(){x.ui.position.flip.left.apply(this,arguments),x.ui.position.fit.left.apply(this,arguments)},top:function(){x.ui.position.flip.top.apply(this,arguments),x.ui.position.fit.top.apply(this,arguments)}}},x.ui.safeActiveElement=function(e){var i;try{i=e.activeElement}catch(t){i=e.body}return i=(i=i||e.body).nodeName?i:e.body},x.ui.safeBlur=function(t){t&&"body"!==t.nodeName.toLowerCase()&&x(t).trigger("blur")},
x.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,t=this.parents().filter(function(){var t=x(this);return(!i||"static"!==t.css("position"))&&n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&t.length?t:x(this[0].ownerDocument||document)},
x.extend(x.expr.pseudos,{tabbable:function(t){var e=x.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&x.ui.focusable(t,i)}}),
x.fn.extend({uniqueId:(u=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++u)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&x(this).removeAttr("id")})}});
var f,c=0,d=Array.prototype.hasOwnProperty,p=Array.prototype.slice;x.cleanData=(f=x.cleanData,function(t){for(var e,i,n=0;null!=(i=t[n]);n++)(e=x._data(i,"events"))&&e.remove&&x(i).triggerHandler("remove");f(t)}),x.widget=function(t,i,e){var n,o,s,r={},l=t.split(".")[0],a=l+"-"+(t=t.split(".")[1]);return e||(e=i,i=x.Widget),Array.isArray(e)&&(e=x.extend.apply(null,[{}].concat(e))),x.expr.pseudos[a.toLowerCase()]=function(t){return!!x.data(t,a)},x[l]=x[l]||{},n=x[l][t],o=x[l][t]=function(t,e){if(!this||!this._createWidget)return new o(t,e);arguments.length&&this._createWidget(t,e)},x.extend(o,n,{version:e.version,_proto:x.extend({},e),_childConstructors:[]}),(s=new i).options=x.widget.extend({},s.options),x.each(e,function(e,n){function o(){return i.prototype[e].apply(this,arguments)}function s(t){return i.prototype[e].apply(this,t)}r[e]="function"!=typeof n?n:function(){var t,e=this._super,i=this._superApply;return this._super=o,this._superApply=s,t=n.apply(this,arguments),this._super=e,this._superApply=i,t}}),o.prototype=x.widget.extend(s,{widgetEventPrefix:n&&s.widgetEventPrefix||t},r,{constructor:o,namespace:l,widgetName:t,widgetFullName:a}),n?(x.each(n._childConstructors,function(t,e){var i=e.prototype;x.widget(i.namespace+"."+i.widgetName,o,e._proto)}),delete n._childConstructors):i._childConstructors.push(o),x.widget.bridge(t,o),o},x.widget.extend=function(t){for(var e,i,n=p.call(arguments,1),o=0,s=n.length;o<s;o++)for(e in n[o])i=n[o][e],d.call(n[o],e)&&void 0!==i&&(x.isPlainObject(i)?t[e]=x.isPlainObject(t[e])?x.widget.extend({},t[e],i):x.widget.extend({},i):t[e]=i);return t},x.widget.bridge=function(s,e){var r=e.prototype.widgetFullName||s;x.fn[s]=function(i){var t="string"==typeof i,n=p.call(arguments,1),o=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=x.data(this,r);return"instance"===i?(o=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?x.error("no such method '"+i+"' for "+s+" widget instance"):(t=e[i].apply(e,n))!==e&&void 0!==t?(o=t&&t.jquery?o.pushStack(t.get()):t,!1):void 0:x.error("cannot call methods on "+s+" prior to initialization; attempted to call method '"+i+"'")}):o=void 0:(n.length&&(i=x.widget.extend.apply(null,[i].concat(n))),this.each(function(){var t=x.data(this,r);t?(t.option(i||{}),t._init&&t._init()):x.data(this,r,new e(i,this))})),o}},x.Widget=function(){},x.Widget._childConstructors=[],x.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=x(e||this.defaultElement||this)[0],this.element=x(e),this.uuid=c++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},e!==this&&(x.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=x(e.style?e.ownerDocument:e.document||e),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var i=this;this._destroy(),x.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(t,e){var i,n,o,s=t;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof t)if(s={},t=(i=t.split(".")).shift(),i.length){for(n=s[t]=x.widget.extend({},this.options[t]),o=0;o<i.length-1;o++)n[i[o]]=n[i[o]]||{},n=n[i[o]];if(t=i.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];s[t]=e}return this._setOptions(s),this},_setOptions:function(t){for(var e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,n;for(e in t)n=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&n&&n.length&&(i=x(n.get()),this._removeClass(n,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(o){var s=[],r=this;function t(t,e){for(var i,n=0;n<t.length;n++)i=r.classesElementLookup[t[n]]||x(),i=o.add?(function(){var i=[];o.element.each(function(t,e){x.map(r.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),r._on(x(i),{remove:"_untrackClassesElement"})}(),x(x.uniqueSort(i.get().concat(o.element.get())))):x(i.not(o.element).get()),r.classesElementLookup[t[n]]=i,s.push(t[n]),e&&o.classes[t[n]]&&s.push(o.classes[t[n]])}return(o=x.extend({element:this.element,classes:this.options.classes||{}},o)).keys&&t(o.keys.match(/\S+/g)||[],!0),o.extra&&t(o.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(i){var n=this;x.each(n.classesElementLookup,function(t,e){-1!==x.inArray(i.target,e)&&(n.classesElementLookup[t]=x(e.not(i.target).get()))}),this._off(x(i.target))},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,n){var o="string"==typeof t||null===t,e={extra:o?e:i,keys:o?t:e,element:o?this.element:t,add:n="boolean"==typeof n?n:i};return e.element.toggleClass(this._classes(e),n),this},_on:function(o,s,t){var r,l=this;"boolean"!=typeof o&&(t=s,s=o,o=!1),t?(s=r=x(s),this.bindings=this.bindings.add(s)):(t=s,s=this.element,r=this.widget()),x.each(t,function(t,e){function i(){if(o||!0!==l.options.disabled&&!x(this).hasClass("ui-state-disabled"))return("string"==typeof e?l[e]:e).apply(l,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||x.guid++);var t=t.match(/^([\w:-]*)\s*(.*)$/),n=t[1]+l.eventNamespace,t=t[2];t?r.on(n,t,i):s.on(n,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=x(this.bindings.not(t).get()),this.focusable=x(this.focusable.not(t).get()),this.hoverable=x(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(x(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(x(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(x(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var n,o,s=this.options[t];if(i=i||{},(e=x.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],o=e.originalEvent)for(n in o)n in e||(e[n]=o[n]);return this.element.trigger(e,i),!("function"==typeof s&&!1===s.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},x.each({show:"fadeIn",hide:"fadeOut"},function(s,r){x.Widget.prototype["_"+s]=function(e,t,i){var n,o=(t="string"==typeof t?{effect:t}:t)?!0!==t&&"number"!=typeof t&&t.effect||r:s;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),n=!x.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),n&&x.effects&&x.effects.effect[o]?e[s](t):o!==s&&e[o]?e[o](t.duration,t.easing,i):e.queue(function(t){x(this)[s](),i&&i.call(e[0]),t()})}})});