Plugin Directory

Changeset 3401883


Ignore:
Timestamp:
11/24/2025 01:26:10 PM (4 months ago)
Author:
unitecms
Message:

updated version 2.0

Location:
unlimited-elements-for-elementor/trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • unlimited-elements-for-elementor/trunk/assets_libraries/owl-carousel-new/owl.carousel.js

    r3329756 r3401883  
    11/**
    2 * Owl Carousel v2.3.8 - UE23
     2* Owl Carousel v2.3.8 - UE25
    33* Copyright 2013-2018 David Deutsch
    44* Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
     
    270270    responsiveRefreshRate: 200,
    271271    responsiveBaseElement: window,
    272    
     272    progressScroll: false,
     273    progressScrollDistance: 200,
     274    progressScrollDistanceTablet: 200,
     275    progressScrollDistanceMobile: 200,
    273276    fallbackEasing: 'swing',
    274277    slideTransition: '',
     
    916919    this.invalidate('settings');
    917920    this.trigger('changed', { property: { name: 'settings', value: this.settings } });
     921    this.setupScroll();
    918922  };
    919923 
     
    19191923       
    19201924      }   
    1921      
     1925
     1926      /**
     1927       * Hooks into the scroll event if progressScroll is enabled.
     1928       *
     1929       */
     1930      Owl.prototype.setupScroll = function() {
     1931          if (this.settings.progressScroll) {
     1932              // Initialize state variables for tracking scroll progress
     1933              this._scroll = {
     1934                  lastScrollTop: 0,
     1935                  distanceScrolled: 0, // Single accumulation counter
     1936                  lastDirection: null // To reset accumulation on direction change
     1937              };
     1938
     1939              // Bind the window scroll event to the handler
     1940              $(window).on('scroll.owl.progress', $.proxy(this.onScrollProgress, this));
     1941          }
     1942      };
     1943
     1944      /**
     1945       * Handles the window scroll event, accumulating distance in the current direction
     1946       * before triggering a slide. Implements a simplified "Spike Zeroing" to discard
     1947       * massive momentum deltas that follow a change in scroll direction.
     1948       *
     1949       * @param {Event} event - The scroll event arguments.
     1950       */
     1951      Owl.prototype.onScrollProgress = function(event) {
     1952          if (this.settings.progressScroll === false) {
     1953              return;
     1954          }
     1955         
     1956          // Prevent scroll event processing while the carousel is busy.
     1957          if (this.isTransitioning || this.isAnimating || this.isDragging) {
     1958              this._scroll.lastScrollTop = $(window).scrollTop();
     1959              return;
     1960          }
     1961
     1962          var currentScrollTop = $(window).scrollTop();
     1963          var lastScrollTop = this._scroll.lastScrollTop;
     1964          var windowWidth = $(window).width();
     1965          var distanceThreshold;
     1966 
     1967          if (windowWidth < 767 && this.settings.progressScrollDistanceMobile) {
     1968              distanceThreshold = this.settings.progressScrollDistanceMobile;
     1969          } else if (windowWidth >= 767 && windowWidth < 1024 && this.settings.progressScrollDistanceTablet) {
     1970              distanceThreshold = this.settings.progressScrollDistanceTablet;
     1971          } else if (windowWidth >= 1024 && this.settings.progressScrollDistance) {
     1972              distanceThreshold = this.settings.progressScrollDistance;
     1973          }
     1974
     1975         
     1976          // Calculate instantaneous delta
     1977          var delta = currentScrollTop - lastScrollTop;
     1978         
     1979          // Exit if no scroll movement
     1980          if (delta === 0) {
     1981              return;
     1982          }
     1983
     1984          var absDelta = Math.abs(delta);
     1985
     1986          // Determine instantaneous direction
     1987          var newDirection;
     1988          if (currentScrollTop > lastScrollTop) {
     1989              newDirection = 'down';
     1990          } else { // Must be currentScrollTop < lastScrollTop since delta != 0
     1991              newDirection = 'up';
     1992          }
     1993         
     1994          // --- ACCUMULATION LOGIC ---
     1995         
     1996          // 1. Direction Change Check
     1997          var directionChanged = this._scroll.lastDirection !== newDirection;
     1998
     1999          if (directionChanged) {
     2000              // Direction just changed. Reset accumulation and update direction.
     2001              this._scroll.distanceScrolled = 0;
     2002              this._scroll.lastDirection = newDirection;
     2003          }
     2004         
     2005          // 2. MOMENTUM SPIKE CORRECTION (SPIKE ZEROING)
     2006          // If direction just changed AND the delta is massive, zero out the delta for accumulation.
     2007          const MOMENTUM_SPIKE_CAP = distanceThreshold; // Assumes any delta > 200px immediately after a direction change is corrupted momentum.
     2008         
     2009          if (directionChanged && absDelta > MOMENTUM_SPIKE_CAP) {
     2010              // Rogue spike detected after direction flip. We discard the distance for accumulation (by setting it to 0),
     2011              // but still allow the final position update to proceed.
     2012              absDelta = 0;
     2013             
     2014              // --- DEBUG OUTPUT (Spike Zeroed) ---
     2015              if(g_debug == true){
     2016
     2017                var positionHTML = '<div class="owl-debug" style="position: fixed; background: #960; color: #FFF; z-index: 1000; padding: 10px; left: 20px; top: 20px; border-radius: 4px; font-family: monospace; line-height: 1.4;">' +
     2018                + 'Direction: ' + newDirection +  '<span style="color: #FF0;">(SPIKE ZEROED)</span> <br>' +
     2019                + 'Original Delta: ' + Math.abs(currentScrollTop - lastScrollTop).toFixed(0) + 'px <br>' +
     2020                + 'Threshold: ' + distanceThreshold + 'px' +
     2021                + '</div>';
     2022               
     2023                var objWolDebug = jQuery('.owl-debug');
     2024                if(objWolDebug.length){
     2025                    objWolDebug.html(positionHTML);
     2026                } else {
     2027                    jQuery('body').append(positionHTML);
     2028                }
     2029              }
     2030          }
     2031
     2032
     2033          // 3. Add the (potentially zeroed) change to the tracker
     2034          this._scroll.distanceScrolled += absDelta;
     2035
     2036          // 4. Check if the threshold has been met
     2037          if (this._scroll.distanceScrolled >= distanceThreshold) {
     2038             
     2039              // --- SLIDE TRIGGER ---
     2040              var directionToTrigger = newDirection;
     2041              var triggerEvent = (directionToTrigger === 'down') ? 'next.owl' : 'prev.owl';
     2042
     2043              this.$element.trigger(triggerEvent);
     2044             
     2045              // Reset the tracker.
     2046              this._scroll.distanceScrolled = 0;
     2047             
     2048              // --- DEBUG OUTPUT (Triggered) ---
     2049              if(g_debug == true){
     2050                var positionHTML = '<div class="owl-debug" style="position: fixed; background: #060; color: #FFF; z-index: 1000; padding: 10px; left: 20px; top: 20px; border-radius: 4px; font-family: monospace; line-height: 1.4;">' +
     2051                + 'Scroll direction: ' + newDirection + '<span style="color: #FF0;">(TRIGGERED)</span> <br>' +
     2052                + 'Distance scrolled: ' + this._scroll.distanceScrolled.toFixed(0) + 'px <br>' +
     2053                + 'Threshold: ' + distanceThreshold + 'px' +
     2054                ' + </div>';
     2055               
     2056                var objWolDebug = jQuery('.owl-debug');
     2057                if(objWolDebug.length){
     2058                    objWolDebug.remove();
     2059                }
     2060                jQuery('body').append(positionHTML);
     2061
     2062              }
     2063             
     2064          } else {
     2065            if(g_debug == true){
     2066
     2067              // --- DEBUG OUTPUT (Non-Triggered) ---
     2068              var positionHTML = '<div class="owl-debug" style="position: fixed; background: #666; color: #FFF; z-index: 1000; padding: 10px; left: 20px; top: 20px; border-radius: 4px; font-family: monospace; line-height: 1.4;">'+
     2069              + 'Scroll direction: ' + newDirection + '<br>' +
     2070              + 'Distance scrolled: ' + this._scroll.distanceScrolled.toFixed(0) + 'px <br>' +
     2071              + 'Threshold: ' + distanceThreshold +'px' +
     2072              + '</div>';
     2073             
     2074              var objWolDebug = jQuery('.owl-debug');
     2075              if(objWolDebug.length){
     2076                  objWolDebug.html(positionHTML);
     2077              } else {
     2078                  jQuery('body').append(positionHTML);
     2079              }
     2080            }
     2081          }
     2082         
     2083       
     2084          this._scroll.lastScrollTop = currentScrollTop;
     2085      };
    19222086     
    19232087      /**
     
    19552119        .attr('class', this.$element.attr('class').replace(new RegExp(this.options.responsiveClass + '-\\S+\\s', 'g'), ''))
    19562120        .removeData('owl.carousel');
     2121        $(window).off('scroll.owl.progress');
    19572122      };
    19582123     
  • unlimited-elements-for-elementor/trunk/assets_libraries/owl-carousel-new/owl.carousel.min.js

    r3329756 r3401883  
    11/**
    2 * Owl Carousel v2.3.8 - UE23
     2* Owl Carousel v2.3.8 - UE25
    33* Copyright 2013-2018 David Deutsch
    44* Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
     
    1717*/
    1818
    19 !function(h,n,s,a){function e(t){console.log(t)}var o=!1;function l(t){0!=o&&e(t)}function c(t,e){this.settings=null,this.options=h.extend({},c.Defaults,e),this.$element=h(t),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this.getItemWidth=function(){switch(this.settings.paddingType){case"left":case"right":case"both":default:var t=Math.floor((this.width()/this.settings.items).toFixed(3)-this.settings.margin)}return this.settings.item_size_gap&&(t+=this.settings.item_size_gap),t},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},h.each(["onResize","onThrottledResize"],h.proxy(function(t,e){this._handlers[e]=h.proxy(this[e],this)},this)),h.each(c.Plugins,h.proxy(function(t,e){this._plugins[t.charAt(0).toLowerCase()+t.slice(1)]=new e(this)},this)),h.each(c.Workers,h.proxy(function(t,e){this._pipe.push({filter:e.filter,run:h.proxy(e.run,this)})},this)),this.setup(),this.initialize()}c.Defaults={items:3,loop:!1,center:!1,disableNoncenteredLinks:!1,rewind:!1,checkVisibility:!0,setActiveClass:!0,setActiveClassOnMobile:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,paddingType:"none",stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:n,fallbackEasing:"swing",slideTransition:"",info:!1,scrollToHead:!1,scrollToHeadForceOnMobile:!1,scrollToHeadOffset:0,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab",shuffle:!1,item_size_gap:0,pixel_gap_fix:!1,delayBeforeLoad:200,debug:!1},c.Width={Default:"default",Inner:"inner",Outer:"outer"},c.Type={Event:"event",State:"state"},c.Plugins={},c.Workers=[{filter:["width","settings"],run:function(){this._width=Math.floor(this.$element.width()),l("set total width this._width: "+this._width)}},{filter:["width","items","settings"],run:function(t){t.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(t){var e=this.settings.margin||"",i=!this.settings.autoWidth,s=this.settings.rtl,e={width:"auto","margin-left":s?e:"","margin-right":s?"":e};i||this.$stage.children().css(e),t.css=e}},{filter:["width","items","settings"],run:function(t){!0===this.settings.debug&&(o=!0),l("run!"),1==this.settings.items&&1==this.settings.pixel_gap_fix&&(this.settings.item_size_gap=1,l("set items size gap: 1")),l("settings - stage padding type: "+this.settings.paddingType),l("settings - stage padding: "+this.settings.stagePadding),this.settings.paddingType&&"none"!=this.settings.paddingType||!this.settings.stagePadding||(this.settings.paddingType="both",l("set stage padding type - both"));var e,i=this.getItemWidth();for(l("Item width: "+i),this.settings.stagePadding>i&&(this.settings.stagePadding=0,e=this.getItemWidth(),this.settings.stagePadding=Math.floor(.5*e),i=this.getItemWidth(),l("set new stagePadding: "+this.settings.stagePadding+" and item width: "+i)),merge=null,iterator=this._items.length,grid=!this.settings.autoWidth,widths=[],t.items={merge:!1,width:i};iterator--;)merge=this._mergers[iterator],merge=this.settings.mergeFit&&Math.min(merge,this.settings.items)||merge,t.items.merge=1<merge||t.items.merge,widths[iterator]=grid?i*merge:this._items[iterator].width();this._widths=widths}},{filter:["items","settings"],run:function(){var t=[],e=this._items,i=this.settings,s=Math.max(2*i.items,4),n=2*Math.ceil(e.length/2),o=i.loop&&e.length?i.rewind?s:Math.max(s,n):0,r="",a="";for(o/=2;0<o;)t.push(this.normalize(t.length/2,!0)),r+=e[t[t.length-1]][0].outerHTML,t.push(this.normalize(e.length-1-(t.length-1)/2,!0)),a=e[t[t.length-1]][0].outerHTML+a,--o;this._clones=t,h(r).addClass("cloned").appendTo(this.$stage),h(a).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var t=this.settings.rtl?1:-1,e=this._clones.length+this._items.length,i=-1,s=[];++i<e;){var n=(s[i-1]||0)+(this._widths[this.relative(i)]+this.settings.margin)*t;s.push(n)}if(this.settings.item_size_gap)for(var o in s)s[o]-=this.settings.item_size_gap;l("Set coordinates"),l(s),this._coordinates=s}},{filter:["width","items","settings"],run:function(){var t=this.settings.stagePadding,e=this._coordinates,i=this.settings.paddingType,s=this.$stage.parent(),n=s.width();l("parent Outer Stage Width: "+s.width()),l("element width this.$element.width(): "+this.$element.width());var o={width:Math.ceil(Math.abs(e[e.length-1])),"padding-left":"","padding-right":""},r={width:Math.ceil(Math.abs(e[e.length-1]))+2*t,"padding-left":t||"","padding-right":t||""},a={width:Math.ceil(Math.abs(e[e.length-1]))+t,"padding-left":t||"","padding-right":""},t={width:Math.ceil(Math.abs(e[e.length-1]))+t,"padding-left":"","padding-right":t||""},n={width:n};l("set outer stage css"),l(n),"none"==i?(this.$stage.css(o),s.width(n)):"both"==i?(this.$stage.css(r),s.css(n),l("Set stage width css (both)"),l(r)):"left"==i?(this.$stage.css(a),s.css(n),l("Set stage width css (left)"),l(a)):"right"==i&&(this.$stage.css(t),s.css(n),l("Set stage width css (right)"),l(t))}},{filter:["width","items","settings"],run:function(t){var e=this._coordinates.length,i=!this.settings.autoWidth,s=this.$stage.children();if(i&&t.items.merge)for(;e--;)t.css.width=this._widths[this.relative(e)],s.eq(e).css(t.css);else i&&(t.css.width=t.items.width,s.css(t.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(t){t.current=t.current?this.$stage.children().index(t.current):0,t.current=Math.max(this.minimum(),Math.min(this.maximum(),t.current)),this.reset(t.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var t,e,i,s,n=this.settings.rtl?1:-1,o=2*this.settings.stagePadding,r=this.coordinates(this.current())+o,a=r+this.width()*n,h=[];for("left"!=this.settings.paddingType&&"right"!=this.settings.paddingType||(o=this.settings.stagePadding),i=0,s=this._coordinates.length;i<s;i++)t=this._coordinates[i-1]||0,e=Math.abs(this._coordinates[i])+o*n,(this.op(t,"<=",r)&&this.op(t,">",a)||this.op(e,"<",r)&&this.op(e,">",a))&&h.push(i);if(this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+h.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center){if(this.$stage.children().eq(this.current()).addClass("center"),0==this.settings.disableNoncenteredLinks)return!1;var l=this.$stage.children().not(".center").find("a"),c=this.$stage.find(".center a");l.css({cursor:"default","pointer-events":"none"}),c.css({cursor:"","pointer-events":""})}}},{filter:["width","position","items","settings"],run:function(){var t;this.settings.setActiveClass&&this.settings.setActiveClass&&(t=!0,this.settings.setActiveClassOnMobile?1==this.$stage.children(".active").length&&(t=!0):this.settings.setActiveClassOnMobile||1==this.$stage.children(".active").length&&(t=!1),1==t?this.$stage.children().eq(this.current()).addClass("uc-active-item").siblings().removeClass("uc-active-item"):0==t&&this.$stage.children().removeClass("uc-active-item"))}}],c.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=h("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap(h("<div/>",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},c.prototype.initializeItems=function(){var t=this.$element.find(".owl-item");if(t.length)return this._items=t.get().map(function(t){return h(t)}),this._mergers=this._items.map(function(){return 1}),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},c.prototype.initialize=function(){var t,e,i;this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.shuffle&&(t=this.$element).children().sort(function(){return Math.round(Math.random())-.5}).each(function(){t.append(this)}),this.settings.autoWidth&&!this.is("pre-loading")&&(e=this.$element.find("img"),i=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:a,i=this.$element.children(i).width(),e.length&&i<=0&&this.preloadAutoWidthImages(e)),this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized");var s=this._handlers;setTimeout(function(){s.onResize()},this.settings.delayBeforeLoad);var n=this;this.$stage.children().each(function(){if(1==n.settings.lazyLoad)return!1;var t,e=jQuery(this),i=e.find("img");1!=i.hasClass("lazyloading")&&1!=i.hasClass("lazy-loaded")&&1!=i.hasClass("lazy-hidden")||(i.removeClass("lazyloading"),i.removeClass("lazy-loaded"),i.removeClass("lazy-hidden"),(t=i.data("src"))&&i.attr("src",t),t="data-src",jQuery.removeData(i,t));e=e.find('[loading="lazy"]');e&&0!=e.length&&e.removeAttr("loading")})},c.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},c.prototype.setup=function(){var e=this.viewport(),t=this.options.responsive,i=-1,s=null;t?(h.each(t,function(t){t<=e&&i<t&&(i=Number(t))}),"function"==typeof(s=h.extend({},this.options,t[i])).stagePadding&&(s.stagePadding=s.stagePadding()),delete s.responsive,s.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+i))):s=h.extend({},this.options),this.trigger("change",{property:{name:"settings",value:s}}),this._breakpoint=i,this.settings=s,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},c.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},c.prototype.prepare=function(t){var e=this.trigger("prepare",{content:t});return e.data||(e.data=h("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(t)),this.trigger("prepared",{content:e.data}),e.data},c.prototype.update=function(){for(var t=0,e=this._pipe.length,i=h.proxy(function(t){return this[t]},this._invalidated),s={};t<e;)(this._invalidated.all||0<h.grep(this._pipe[t].filter,i).length)&&this._pipe[t].run(s),t++;this._invalidated={},this.is("valid")||this.enter("valid")},c.prototype.width=function(t){var e;switch(t=t||c.Width.Default){case c.Width.Inner:case c.Width.Outer:e=this._width,l("calc width for dimention: "+t);default:switch(this.settings.paddingType){case"left":case"right":l("calc width with stagePadding: "+this.settings.paddingType),e=this._width-this.settings.stagePadding+this.settings.margin;break;case"both":l("calc width with stagePadding: "+this.settings.paddingType),e=this._width-2*this.settings.stagePadding+this.settings.margin;break;default:e=this._width+this.settings.margin,l("calc width without stagePadding for dimention: "+t)}}return l("carousel width (no stagepadding and margins): "+e),e},c.prototype.refresh=function(){l("---------------------refresh carousel-----------------------"),l("window width: "+n.innerWidth),l("element width: "+this.$element.width()),l("stage width: "+this.$stage.width()),this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},c.prototype.onThrottledResize=function(){n.clearTimeout(this.resizeTimer),this.resizeTimer=n.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},c.prototype.onResize=function(){return l("---------------------resize carousel-----------------------"),this._items.length?this.isVisible()?(l("resizing"),this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.$stage.parent().css({width:""}),this.refresh(),this.update(),this.leave("resizing"),void this.trigger("resized"))):(l("not visible"),!1):(l("same length"),!1)},c.prototype.registerEventHandlers=function(){h.support.transition&&this.$stage.on(h.support.transition.end+".owl.core",h.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(n,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",h.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",h.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",h.proxy(this.onDragEnd,this)))},c.prototype.onDragStart=function(t){var e=null;3!==t.which&&(e=h.support.transform?{x:(e=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","))[16===e.length?12:4],y:e[16===e.length?13:5]}:(e=this.$stage.position(),{x:this.settings.rtl?e.left+this.$stage.width()-this.width()+this.settings.margin:e.left,y:e.top}),this.is("animating")&&(h.support.transform?this.animate(e.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===t.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=h(t.target),this._drag.stage.start=e,this._drag.stage.current=e,this._drag.pointer=this.pointer(t),h(s).on("mouseup.owl.core touchend.owl.core",h.proxy(this.onDragEnd,this)),h(s).one("mousemove.owl.core touchmove.owl.core",h.proxy(function(t){var e=this.difference(this._drag.pointer,this.pointer(t));h(s).on("mousemove.owl.core touchmove.owl.core",h.proxy(this.onDragMove,this)),Math.abs(e.x)<Math.abs(e.y)&&this.is("valid")||(t.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},c.prototype.onDragMove=function(t){var e,i=null,s=null,n=this.difference(this._drag.pointer,this.pointer(t)),o=this.difference(this._drag.stage.start,n);this.is("dragging")&&(t.preventDefault(),this.settings.loop?(i=this.coordinates(this.minimum()),s=this.coordinates(this.maximum()+1)-i,o.x=((o.x-i)%s+s)%s+i):(i=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),s=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),e=this.settings.pullDrag?-1*n.x/5:0,o.x=Math.max(Math.min(o.x,i+e),s+e)),this._drag.stage.current=o,this.animate(o.x))},c.prototype.onDragEnd=function(t){var e=this.difference(this._drag.pointer,this.pointer(t)),i=this._drag.stage.current,t=0<e.x^this.settings.rtl?"left":"right";h(s).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==e.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(i.x,0!==e.x?t:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=t,(3<Math.abs(e.x)||300<(new Date).getTime()-this._drag.time)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},c.prototype.closest=function(i,s){var n=-1,o=this.width(),r=this.coordinates();return this.settings.freeDrag||h.each(r,h.proxy(function(t,e){return"left"===s&&e-30<i&&i<e+30?n=t:"right"===s&&e-o-30<i&&i<e-o+30?n=t+1:this.op(i,"<",e)&&this.op(i,">",r[t+1]!==a?r[t+1]:e-o)&&(n="left"===s?t+1:t),-1===n},this)),this.settings.loop||(this.op(i,">",r[this.minimum()])?n=i=this.minimum():this.op(i,"<",r[this.maximum()])&&(n=i=this.maximum())),n},c.prototype.animate=function(t){var e=0<this.speed();this.is("animating")&&this.onTransitionEnd(),e&&(this.enter("animating"),this.trigger("translate")),h.support.transition?(l("Go to coordinate: "+t),this.$stage.css({transform:"translateX("+t+"px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")})):e?this.$stage.animate({left:t+"px"},this.speed(),this.settings.fallbackEasing,h.proxy(this.onTransitionEnd,this)):this.$stage.css({left:t+"px"}),this.scrollToHead()},c.prototype.is=function(t){return this._states.current[t]&&0<this._states.current[t]},c.prototype.current=function(t){return t===a?this._current:0===this._items.length?a:(t=this.normalize(t),this._current!==t&&((e=this.trigger("change",{property:{name:"position",value:t}})).data!==a&&(t=this.normalize(e.data)),this._current=t,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})),this._current);var e},c.prototype.invalidate=function(t){return"string"===h.type(t)&&(this._invalidated[t]=!0,this.is("valid")&&this.leave("valid")),h.map(this._invalidated,function(t,e){return e})},c.prototype.reset=function(t){(t=this.normalize(t))!==a&&(this._speed=0,this._current=t,this.suppress(["translate","translated"]),this.animate(this.coordinates(t)),this.release(["translate","translated"]))},c.prototype.normalize=function(t,e){var i=this._items.length,e=e?0:this._clones.length;return!this.isNumeric(t)||i<1?t=a:(t<0||i+e<=t)&&(t=((t-e/2)%i+i)%i+e/2),t},c.prototype.relative=function(t){return t-=this._clones.length/2,this.normalize(t,!0)},c.prototype.maximum=function(t){var e,i,s,n=this.settings,o=this._coordinates.length;if(n.loop)o=this._clones.length/2+this._items.length-1;else if(n.autoWidth||n.merge){if(e=this._items.length)for(i=this._items[--e].width(),s=Math.floor(this.$element.width());e--&&!(s<(i+=this._items[e].width()+this.settings.margin)););o=e+1}else o=n.center?this._items.length-1:this._items.length-n.items;return t&&(o-=this._clones.length/2),Math.max(o,0)},c.prototype.minimum=function(t){return t?0:this._clones.length/2},c.prototype.items=function(t){return t===a?this._items.slice():(t=this.normalize(t,!0),this._items[t])},c.prototype.mergers=function(t){return t===a?this._mergers.slice():(t=this.normalize(t,!0),this._mergers[t])},c.prototype.clones=function(i){function s(t){return t%2==0?n+t/2:e-(t+1)/2}var e=this._clones.length/2,n=e+this._items.length;return i===a?h.map(this._clones,function(t,e){return s(e)}):h.map(this._clones,function(t,e){return t===i?s(e):null})},c.prototype.speed=function(t){return t!==a&&(this._speed=t),this._speed},c.prototype.coordinates=function(t){var e,i=1,s=t-1;return t===a?h.map(this._coordinates,h.proxy(function(t,e){return this.coordinates(e)},this)):(this.settings.center?(this.settings.rtl&&(i=-1,s=t+1),e=this._coordinates[t],e+=(this.width()-e+(this._coordinates[s]||0))/2*i):e=this._coordinates[s]||0,e=Math.ceil(e))},c.prototype.duration=function(t,e,i){return 0===i?0:Math.min(Math.max(Math.abs(e-t),1),6)*Math.abs(i||this.settings.smartSpeed)},c.prototype.to=function(t,e){var i,s=this.current(),n=t-this.relative(s),o=(0<n)-(n<0),r=this._items.length,a=this.minimum(),h=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(n)>r/2&&(n+=-1*o*r),(i=(((t=s+n)-a)%r+r)%r+a)!==t&&i-n<=h&&0<i-n&&(s=i-n,t=i,this.reset(s))):t=this.settings.rewind?(t%(h+=1)+h)%h:Math.max(a,Math.min(h,t)),this.speed(this.duration(s,t,e)),this.current(t),this.isVisible()&&this.update()},c.prototype.next=function(t){t=t||!1,this.to(this.relative(this.current())+1,t)},c.prototype.prev=function(t){t=t||!1,this.to(this.relative(this.current())-1,t)},c.prototype.onTransitionEnd=function(t){if(t!==a&&(t.stopPropagation(),(t.target||t.srcElement||t.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},c.prototype.viewport=function(){var t;return this.options.responsiveBaseElement!==n?t=h(this.options.responsiveBaseElement).width():n.innerWidth?t=n.innerWidth:s.documentElement&&s.documentElement.clientWidth?t=s.documentElement.clientWidth:console.warn("Can not detect viewport width."),t},c.prototype.replace=function(t){this.$stage.empty(),this._items=[],t=t&&(t instanceof jQuery?t:h(t)),this.settings.nestedItemSelector&&(t=t.find("."+this.settings.nestedItemSelector)),t&&t.length&&t.filter(function(){return 1===this.nodeType}).each(h.proxy(function(t,e){e=this.prepare(e),this.$stage.append(e),this._items.push(e),this._mergers.push(+e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items");t=this.settings.startPosition;h(this.$element).trigger("to.owl.carousel",t)},c.prototype.add=function(t,e){var i=this.relative(this._current);e=e===a?this._items.length:this.normalize(e,!0),t=t instanceof jQuery?t:h(t),this.trigger("add",{content:t,position:e}),t=this.prepare(t),0===this._items.length||e===this._items.length?(0===this._items.length&&this.$stage.append(t),0!==this._items.length&&this._items[e-1].after(t),this._items.push(t),this._mergers.push(+t.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[e].before(t),this._items.splice(e,0,t),this._mergers.splice(e,0,+t.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[i]&&this.reset(this._items[i].index()),this.invalidate("items"),this.trigger("added",{content:t,position:e})},c.prototype.remove=function(t){(t=this.normalize(t,!0))!==a&&(this.trigger("remove",{content:this._items[t],position:t}),this._items[t].remove(),this._items.splice(t,1),this._mergers.splice(t,1),this.invalidate("items"),this.trigger("removed",{content:null,position:t}))},c.prototype.preloadAutoWidthImages=function(t){t.each(h.proxy(function(t,e){this.enter("pre-loading"),e=h(e),h(new Image).one("load",h.proxy(function(t){e.attr("src",t.target.src),e.css("opacity",1),this.leave("pre-loading"),this.is("pre-loading")||this.is("initializing")||this.refresh()},this)).attr("src",e.attr("src")||e.attr("data-src")||e.attr("data-src-retina"))},this))},c.prototype.isElementInViewport=function(t){var e=t.offset().top,i=e+t.outerHeight(),s=jQuery(n).scrollTop(),t=s+jQuery(n).height();return s<i&&e<t},c.prototype.scrollToTop=function(t,e){jQuery("html, body").animate({scrollTop:t+e},400)},c.prototype.scrollToHead=function(){if(1==this.settings.autoplay)return!1;if(this.is("initializing"))return!1;if(this.is("resizing"))return!1;if(0==this.settings.scrollToHead)return!1;var t=this.$element;if(0==this.settings.scrollToHeadForceOnMobile&&1==this.isElementInViewport(t))return!1;var e=this.$element.offset().top,t=this.settings.scrollToHeadOffset;this.scrollToTop(e,t)},c.prototype.destroy=function(){for(var t in this.$element.off(".owl.core"),this.$stage.off(".owl.core"),h(s).off(".owl.core"),!1!==this.settings.responsive&&(n.clearTimeout(this.resizeTimer),this.off(n,"resize",this._handlers.onThrottledResize)),this._plugins)this._plugins[t].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},c.prototype.op=function(t,e,i){var s=this.settings.rtl;switch(e){case"<":return s?i<t:t<i;case">":return s?t<i:i<t;case">=":return s?t<=i:i<=t;case"<=":return s?i<=t:t<=i}},c.prototype.on=function(t,e,i,s){t.addEventListener?t.addEventListener(e,i,s):t.attachEvent&&t.attachEvent("on"+e,i)},c.prototype.off=function(t,e,i,s){t.removeEventListener?t.removeEventListener(e,i,s):t.detachEvent&&t.detachEvent("on"+e,i)},c.prototype.trigger=function(t,e,i,s,n){var o={item:{count:this._items.length,index:this.current()}},r=h.camelCase(h.grep(["on",t,i],function(t){return t}).join("-").toLowerCase()),a=h.Event([t,"owl",i||"carousel"].join(".").toLowerCase(),h.extend({relatedTarget:this},o,e));return this._supress[t]||(h.each(this._plugins,function(t,e){e.onTrigger&&e.onTrigger(a)}),this.register({type:c.Type.Event,name:t}),this.$element.trigger(a),this.settings&&"function"==typeof this.settings[r]&&this.settings[r].call(this,a)),a},c.prototype.enter=function(t){h.each([t].concat(this._states.tags[t]||[]),h.proxy(function(t,e){this._states.current[e]===a&&(this._states.current[e]=0),this._states.current[e]++},this))},c.prototype.leave=function(t){h.each([t].concat(this._states.tags[t]||[]),h.proxy(function(t,e){this._states.current[e]--},this))},c.prototype.register=function(i){var e;i.type===c.Type.Event?(h.event.special[i.name]||(h.event.special[i.name]={}),h.event.special[i.name].owl||(e=h.event.special[i.name]._default,h.event.special[i.name]._default=function(t){return!e||!e.apply||t.namespace&&-1!==t.namespace.indexOf("owl")?t.namespace&&-1<t.namespace.indexOf("owl"):e.apply(this,arguments)},h.event.special[i.name].owl=!0)):i.type===c.Type.State&&(this._states.tags[i.name]?this._states.tags[i.name]=this._states.tags[i.name].concat(i.tags):this._states.tags[i.name]=i.tags,this._states.tags[i.name]=h.grep(this._states.tags[i.name],h.proxy(function(t,e){return h.inArray(t,this._states.tags[i.name])===e},this)))},c.prototype.suppress=function(t){h.each(t,h.proxy(function(t,e){this._supress[e]=!0},this))},c.prototype.release=function(t){h.each(t,h.proxy(function(t,e){delete this._supress[e]},this))},c.prototype.pointer=function(t){var e={x:null,y:null};return(t=(t=t.originalEvent||t||n.event).touches&&t.touches.length?t.touches[0]:t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t).pageX?(e.x=t.pageX,e.y=t.pageY):(e.x=t.clientX,e.y=t.clientY),e},c.prototype.isNumeric=function(t){return!isNaN(parseFloat(t))},c.prototype.difference=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},h.fn.owlCarousel=function(e){var s=Array.prototype.slice.call(arguments,1);return this.each(function(){var t=h(this),i=t.data("owl.carousel");i||(i=new c(this,"object"==typeof e&&e),t.data("owl.carousel",i),h.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(t,e){i.register({type:c.Type.Event,name:e}),i.$element.on(e+".owl.carousel.core",h.proxy(function(t){t.namespace&&t.relatedTarget!==this&&(this.suppress([e]),i[e].apply(this,[].slice.call(arguments,1)),this.release([e]))},i))})),"string"==typeof e&&"_"!==e.charAt(0)&&i[e].apply(i,s)})},h.fn.owlCarousel.Constructor=c}(window.Zepto||window.jQuery,window,document),function(e,i){var s=function(t){this._core=t,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":e.proxy(function(t){t.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=e.extend({},s.Defaults,this._core.options),this._core.$element.on(this._handlers)};s.Defaults={autoRefresh:!0,autoRefreshInterval:500},s.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=i.setInterval(e.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},s.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},s.prototype.destroy=function(){var t,e;for(t in i.clearInterval(this._interval),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},e.fn.owlCarousel.Constructor.Plugins.AutoRefresh=s}(window.Zepto||window.jQuery,window,document),function(a,n){var e=function(t){this._core=t,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(t){if(t.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(t.property&&"position"==t.property.name||"initialized"==t.type)){var e=this._core.settings,i=e.center&&Math.ceil(e.items/2)||e.items,s=e.center&&-1*i||0,n=(t.property&&void 0!==t.property.value?t.property.value:this._core.current())+s,o=this._core.clones().length,r=a.proxy(function(t,e){this.load(e)},this);for(0<e.lazyLoadEager&&(i+=e.lazyLoadEager,e.loop&&(n-=e.lazyLoadEager,i++));s++<i;)this.load(o/2+this._core.relative(n)),o&&a.each(this._core.clones(this._core.relative(n)),r),n++}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1,lazyLoadEager:0},e.prototype.load=function(t){var e=this._core.$stage.children().eq(t),t=e&&e.find(".owl-lazy");!t||-1<a.inArray(e.get(0),this._loaded)||(t.each(a.proxy(function(t,e){var i=a(e),s=1<n.devicePixelRatio&&i.attr("data-src-retina")||i.attr("data-src")||i.attr("data-srcset");this._core.trigger("load",{element:i,url:s},"lazy"),i.is("img")?i.one("load.owl.lazy",a.proxy(function(){i.css("opacity",1),this._core.trigger("loaded",{element:i,url:s},"lazy")},this)).attr("src",s):i.is("source")?i.one("load.owl.lazy",a.proxy(function(){this._core.trigger("loaded",{element:i,url:s},"lazy")},this)).attr("srcset",s):((e=new Image).onload=a.proxy(function(){i.css({"background-image":'url("'+s+'")',opacity:"1"}),this._core.trigger("loaded",{element:i,url:s},"lazy")},this),e.src=s)},this)),this._loaded.push(e.get(0)))},e.prototype.destroy=function(){var t,e;for(t in this.handlers)this._core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(n,i){var s=function(t){this._core=t,this._previousHeight=null,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&"position"===t.property.name&&this.update()},this),"loaded.owl.lazy":n.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&t.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=n.extend({},s.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var e=this;n(i).on("load",function(){e._core.settings.autoHeight&&e.update()}),n(i).resize(function(){e._core.settings.autoHeight&&(null!=e._intervalId&&clearTimeout(e._intervalId),e._intervalId=setTimeout(function(){e.update()},250))})};s.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},s.prototype.update=function(){var t=this._core._current,e=t+this._core.settings.items,i=this._core.settings.lazyLoad,t=this._core.$stage.children().toArray().slice(t,e),s=[],e=0;n.each(t,function(t,e){s.push(n(e).height())}),(e=Math.max.apply(null,s))<=1&&i&&this._previousHeight&&(e=this._previousHeight),this._previousHeight=e,this._core.$stage.parent().height(e).addClass(this._core.settings.autoHeightClass)},s.prototype.destroy=function(){var t,e;for(t in this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},n.fn.owlCarousel.Constructor.Plugins.AutoHeight=s}(window.Zepto||window.jQuery,window,document),function(c,e){var i=function(t){this._core=t,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":c.proxy(function(t){t.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":c.proxy(function(t){t.namespace&&this._core.settings.video&&this.isInFullScreen()&&t.preventDefault()},this),"refreshed.owl.carousel":c.proxy(function(t){t.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":c.proxy(function(t){t.namespace&&"position"===t.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":c.proxy(function(t){var e;!t.namespace||(e=c(t.content).find(".owl-video")).length&&(e.css("display","none"),this.fetch(e,c(t.content)))},this)},this._core.options=c.extend({},i.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",c.proxy(function(t){this.play(t)},this))};i.Defaults={video:!1,videoHeight:!1,videoWidth:!1},i.prototype.fetch=function(t,e){var i=t.attr("data-vimeo-id")?"vimeo":t.attr("data-vzaar-id")?"vzaar":"youtube",s=t.attr("data-vimeo-id")||t.attr("data-youtube-id")||t.attr("data-vzaar-id"),n=t.attr("data-width")||this._core.settings.videoWidth,o=t.attr("data-height")||this._core.settings.videoHeight,r=t.attr("href");if(!r)throw new Error("Missing video URL.");if(-1<(s=r.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/))[3].indexOf("youtu"))i="youtube";else if(-1<s[3].indexOf("vimeo"))i="vimeo";else{if(!(-1<s[3].indexOf("vzaar")))throw new Error("Video URL not supported.");i="vzaar"}s=s[6],this._videos[r]={type:i,id:s,width:n,height:o},e.attr("data-video",r),this.thumbnail(t,this._videos[r])},i.prototype.thumbnail=function(e,t){function i(t){s=l.lazyLoad?c("<div/>",{class:"owl-video-tn "+h,srcType:t}):c("<div/>",{class:"owl-video-tn",style:"opacity:1;background-image:url("+t+")"}),e.after(s),e.after('<div class="owl-video-play-icon"></div>')}var s,n,o=t.width&&t.height?"width:"+t.width+"px;height:"+t.height+"px;":"",r=e.find("img"),a="src",h="",l=this._core.settings;if(e.wrap(c("<div/>",{class:"owl-video-wrapper",style:o})),this._core.settings.lazyLoad&&(a="data-src",h="owl-lazy"),r.length)return i(r.attr(a)),r.remove(),!1;"youtube"===t.type?(n="//img.youtube.com/vi/"+t.id+"/hqdefault.jpg",i(n)):"vimeo"===t.type?c.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+t.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){n=t[0].thumbnail_large,i(n)}}):"vzaar"===t.type&&c.ajax({type:"GET",url:"//vzaar.com/api/videos/"+t.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){n=t.framegrab_url,i(n)}})},i.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},i.prototype.play=function(t){var e=c(t.target).closest("."+this._core.settings.itemClass),i=this._videos[e.attr("data-video")],s=i.width||"100%",n=i.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),(t=c('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>')).attr("height",n),t.attr("width",s),"youtube"===i.type?t.attr("src","//www.youtube.com/embed/"+i.id+"?autoplay=1&rel=0&v="+i.id):"vimeo"===i.type?t.attr("src","//player.vimeo.com/video/"+i.id+"?autoplay=1"):"vzaar"===i.type&&t.attr("src","//view.vzaar.com/"+i.id+"/player?autoplay=true"),c(t).wrap('<div class="owl-video-frame" />').insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},i.prototype.isInFullScreen=function(){var t=e.fullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement;return t&&c(t).parent().hasClass("owl-video-frame")},i.prototype.destroy=function(){var t,e;for(t in this._core.$element.off("click.owl.video"),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},c.fn.owlCarousel.Constructor.Plugins.Video=i}(window.Zepto||window.jQuery,(window,document)),function(r){var e=function(t){this.core=t,this.core.options=r.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=void 0,this.next=void 0,this.handlers={"change.owl.carousel":r.proxy(function(t){t.namespace&&t.property.name&&"position"==t.property.name&&(this.previous=this.core.current(),this.next=t.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":r.proxy(function(t){t.namespace&&(this.swapping="translated"==t.type)},this),"translate.owl.carousel":r.proxy(function(t){t.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&r.support.animation&&r.support.transition){var t=this.core._speed;this.core.speed(0),t=t||1e3;var e=r.proxy(this.clear,this),i=this.core.$stage.children().eq(this.previous),s=this.core.$stage.children().eq(this.next),n=this.core.settings.animateIn,o=this.core.settings.animateOut;if(this.core.current()!==this.previous){if(o){if(i.one(r.support.animation.end,e).addClass("animated owl-animated-out").addClass(o),"none"==jQuery("."+o).css("animation-name"))return void this.core.speed(t);t=this.core.coordinates(this.previous)-this.core.coordinates(this.next),i.css({left:t+"px"})}n&&s.one(r.support.animation.end,e).addClass("animated owl-animated-in").addClass(n)}}},e.prototype.clear=function(t){r(t.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var t,e;for(t in this.handlers)this.core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},r.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,(window,document)),function(s,n,e){var i=function(t){this._core=t,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"change.owl.carousel":s.proxy(function(t){void 0!==t.property&&"position"===t.property.name&&1==this._core.settings.autoplay&&n.clearTimeout(this._call)},this),"changed.owl.carousel":s.proxy(function(t){t.namespace&&"settings"===t.property.name?this._core.settings.autoplay?this.play():this.stop():t.namespace&&"position"===t.property.name&&1==this._core.settings.autoplay&&(this._call=n.setTimeout(s.proxy(this._next,this,this._core.settings.autoplaySpeed),this._core.settings.autoplayTimeout))},this),"initialized.owl.carousel":s.proxy(function(t){t.namespace&&this._core.settings.autoplay&&this.play()},this),"start_autoplay.owl.autoplay":s.proxy(function(t){t.namespace&&this.start_autoplay()},this),"play.owl.autoplay":s.proxy(function(t,e,i){t.namespace&&this.play(e,i)},this),"stop.owl.autoplay":s.proxy(function(t){t.namespace&&this.stop()},this),"mouseover.owl.autoplay":s.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":s.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":s.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":s.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=s.extend({},i.Defaults,this._core.options)};i.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1,autoplayDevice:"both"},i.prototype._next=function(t){n.clearTimeout(this._call),this._call=n.setTimeout(s.proxy(this._next,this,t),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||e.hidden||this._core.next(t||this._core.settings.autoplaySpeed)},i.prototype.read=function(){return(new Date).getTime()-this._time},i.prototype.start_autoplay=function(){this._core.settings.autoplay=!0,this.play()},i.prototype.play=function(t,e){var i;if(0==this._core.settings.autoplay)return!1;this._core.is("rotating")||this._core.enter("rotating"),t=t||this._core.settings.autoplayTimeout,i=Math.min(this._time%(this._timeout||t),t),n.clearTimeout(this._call),this._paused?(this._time=this.read(),this._paused=!1):n.clearTimeout(this._call),this._time+=this.read()%t-i,this._timeout=t,this._call=n.setTimeout(s.proxy(this._next,this,e),t-i),this._core.trigger("play_autoplay"),this.autoplay_device()},i.prototype.stop=function(){this._core.settings.autoplay,this._core.is("rotating")&&(this._time=0,this._paused=!0,n.clearTimeout(this._call),this._core.leave("rotating"),this._core.trigger("stop_autoplay"))},i.prototype.autoplay_device=function(){if(0==this._core.settings.autoplay)return!1;var t=this._core.settings.autoplayDevice;if("both"==t)return!1;var e=this._core.viewport(),i=767<e;1==e<=767&&"desktop"==t&&this.stop(),1==i&&"mobile"==t&&this.stop()},i.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,n.clearTimeout(this._call),this._core.trigger("pause_autoplay")),n.clearTimeout(this._call)},i.prototype.destroy=function(){var t,e;for(t in this.stop(),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},s.fn.owlCarousel.Constructor.Plugins.autoplay=i}(window.Zepto||window.jQuery,window,document),function(n){"use strict";var e=function(t){this._core=t,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element;var i=!(this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to});this._handlers={"prepared.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+n(t.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,0,this._templates.pop())},this),"remove.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,1)},this),"changed.owl.carousel":n.proxy(function(t){t.namespace&&"position"==t.property.name&&this.draw()},this),"initialized.owl.carousel":n.proxy(function(t){t.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":n.proxy(function(t){t.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this),"mousewheel wheel DOMMouseScroll MozMousePixelScroll":n.proxy(function(t){if(0==this._core.settings.mousewheelControl)return!0;var e=this.$element;0==i&&(0<t.originalEvent.deltaY&&0==i&&e.trigger("next.owl"),t.originalEvent.deltaY<0&&0==i&&e.trigger("prev.owl"),i=!0),clearTimeout(n.data(this,"timer")),n.data(this,"timer",setTimeout(function(){i=!1},250))},this)},this._core.options=n.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:['<span aria-label="Previous">&#x2039;</span>','<span aria-label="Next">&#x203a;</span>'],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,changeItemOnClick:!1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1,mousewheelControl:!1},e.prototype.initialize=function(){var t,e,i,s=this._core.settings;for(t in this._controls.$relative=s.navContainer?n(s.navContainer):n("<div>").addClass(s.navContainerClass).appendTo(this.$element),this._controls.$previous=n("<"+s.navElement+' value="previous item" title="previous item">').addClass(s.navClass[0]).html(s.navText[0]).prependTo(this._controls.$relative).on("click",n.proxy(function(t){this.prev(s.navSpeed)},this)),this._controls.$next=n("<"+s.navElement+' value="next item" title="next item">').addClass(s.navClass[1]).html(s.navText[1]).appendTo(this._controls.$relative).on("click",n.proxy(function(t){this.next(s.navSpeed)},this)),s.changeItemOnClick&&(i=(e=this)._core.clones().length/2,setTimeout(function(){e._core.$stage.children().on("click",n.proxy(function(t){t=n(t.currentTarget).index();e.to(t-i,s.navSpeed,!0)},e))},300)),s.dotsData||(this._templates=[n('<button role="button">').addClass(s.dotClass).append(n("<span>")).prop("outerHTML")]),this._controls.$absolute=s.dotsContainer?n(s.dotsContainer):n("<div>").addClass(s.dotsClass).appendTo(this.$element),this._controls.$absolute.on("click","button",n.proxy(function(t){var e=(n(t.target).parent().is(this._controls.$absolute)?n(t.target):n(t.target).parent()).index();t.preventDefault(),this.to(e,s.dotsSpeed)},this)),this._overrides)this._core[t]=n.proxy(this[t],this)},e.prototype.destroy=function(){var t,e,i,s,n=this._core.settings;for(t in this._handlers)this.$element.off(t,this._handlers[t]);for(e in this._controls)"$relative"===e&&n.navContainer?this._controls[e].html(""):this._controls[e].remove();for(s in this.overides)this._core[s]=this._overrides[s];for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)},e.prototype.update=function(){var t,e,i=this._core.clones().length/2,s=i+this._core.items().length,n=this._core.maximum(!0),o=this._core.settings,r=o.center||o.autoWidth||o.dotsData?1:o.dotsEach||o.items;if("page"!==o.slideBy&&(o.slideBy=Math.min(o.slideBy,o.items)),o.dots||"page"==o.slideBy)for(this._pages=[],t=i,e=0;t<s;t++){if(r<=e||0===e){if(this._pages.push({start:Math.min(n,t-i),end:t-i+r-1}),Math.min(n,t-i)===n)break;e=0,0}e+=this._core.mergers(this._core.relative(t))}},e.prototype.draw=function(){var t=this._core.settings,e=(this._core.items().length,t.items,this._core.relative(this._core.current())),i=t.loop||t.rewind,s=this._core.$stage.children().children().children();0!=t.nav&&0!=this._core.items().length&&0!=s.length||this._controls.$relative.remove(),1==t.nav&&(this._controls.$previous.toggleClass("disabled",!i&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!i&&e>=this._core.maximum(!0))),0!=t.dots&&0!=this._core.items().length&&0!=s.length||this._controls.$absolute.remove(),t.dots&&(s=this._pages.length-this._controls.$absolute.children().length,t.dotsData&&0!=s?this._controls.$absolute.html(this._templates.join("")):0<s?this._controls.$absolute.append(new Array(1+s).join(this._templates[0])):s<0&&this._controls.$absolute.children().slice(s).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(n.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(t){var e=this._core.settings;t.page={index:n.inArray(this.current(),this._pages),count:this._pages.length,size:e&&(e.center||e.autoWidth||e.dotsData?1:e.dotsEach||e.items)}},e.prototype.current=function(){var i=this._core.relative(this._core.current());return n.grep(this._pages,n.proxy(function(t,e){return t.start<=i&&t.end>=i},this)).pop()},e.prototype.getPosition=function(t){var e,i,s=this._core.settings;return"page"==s.slideBy?(e=n.inArray(this.current(),this._pages),i=this._pages.length,t?++e:--e,e=this._pages[(e%i+i)%i].start):(e=this._core.relative(this._core.current()),i=this._core.items().length,t?e+=s.slideBy:e-=s.slideBy),e},e.prototype.next=function(t){n.proxy(this._overrides.to,this._core)(this.getPosition(!0),t)},e.prototype.prev=function(t){n.proxy(this._overrides.to,this._core)(this.getPosition(!1),t)},e.prototype.to=function(t,e,i){!i&&this._pages.length?(i=this._pages.length,n.proxy(this._overrides.to,this._core)(this._pages[(t%i+i)%i].start,e)):n.proxy(this._overrides.to,this._core)(t,e)},n.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,(window,document)),function(s,n){"use strict";var e=function(t){this._core=t,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":s.proxy(function(t){t.namespace&&"URLHash"===this._core.settings.startPosition&&s(n).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":s.proxy(function(t){var e;!t.namespace||(e=s(t.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash"))&&(this._hashes[e]=t.content)},this),"changed.owl.carousel":s.proxy(function(t){var i;t.namespace&&"position"===t.property.name&&(i=this._core.items(this._core.relative(this._core.current())),(t=s.map(this._hashes,function(t,e){return t===i?e:null}).join())&&n.location.hash.slice(1)!==t&&(n.location.hash=t))},this)},this._core.options=s.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),s(n).on("hashchange.owl.navigation",s.proxy(function(t){var e=n.location.hash.substring(1),i=this._core.$stage.children(),e=this._hashes[e]&&i.index(this._hashes[e]);void 0!==e&&e!==this._core.current()&&this._core.to(this._core.relative(e),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var t,e;for(t in s(n).off("hashchange.owl.navigation"),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},s.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(n,o){var r=n("<support>").get(0).style,a="Webkit Moz O ms".split(" "),t={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},e=function(){return!!h("transform")},i=function(){return!!h("perspective")},s=function(){return!!h("animation")};function h(t,i){var s=!1,e=t.charAt(0).toUpperCase()+t.slice(1);return n.each((t+" "+a.join(e+" ")+e).split(" "),function(t,e){if(r[e]!==o)return s=!i||e,!1}),s}function l(t){return h(t,!0)}!function(){return!!h("transition")}()||(n.support.transition=new String(l("transition")),n.support.transition.end=t.transition.end[n.support.transition]),s()&&(n.support.animation=new String(l("animation")),n.support.animation.end=t.animation.end[n.support.animation]),e()&&(n.support.transform=new String(l("transform")),n.support.transform3d=i())}(window.Zepto||window.jQuery,(window,void document));
     19!function(l,c,s,a){function e(t){console.log(t)}var d=!1;function h(t){0!=d&&e(t)}function p(t,e){this.settings=null,this.options=l.extend({},p.Defaults,e),this.$element=l(t),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this.getItemWidth=function(){switch(this.settings.paddingType){case"left":case"right":case"both":default:var t=Math.floor((this.width()/this.settings.items).toFixed(3)-this.settings.margin)}return this.settings.item_size_gap&&(t+=this.settings.item_size_gap),t},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},l.each(["onResize","onThrottledResize"],l.proxy(function(t,e){this._handlers[e]=l.proxy(this[e],this)},this)),l.each(p.Plugins,l.proxy(function(t,e){this._plugins[t.charAt(0).toLowerCase()+t.slice(1)]=new e(this)},this)),l.each(p.Workers,l.proxy(function(t,e){this._pipe.push({filter:e.filter,run:l.proxy(e.run,this)})},this)),this.setup(),this.initialize()}p.Defaults={items:3,loop:!1,center:!1,disableNoncenteredLinks:!1,rewind:!1,checkVisibility:!0,setActiveClass:!0,setActiveClassOnMobile:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,paddingType:"none",stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:c,progressScroll:!1,progressScrollDistance:200,progressScrollDistanceTablet:200,progressScrollDistanceMobile:200,fallbackEasing:"swing",slideTransition:"",info:!1,scrollToHead:!1,scrollToHeadForceOnMobile:!1,scrollToHeadOffset:0,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab",shuffle:!1,item_size_gap:0,pixel_gap_fix:!1,delayBeforeLoad:200,debug:!1},p.Width={Default:"default",Inner:"inner",Outer:"outer"},p.Type={Event:"event",State:"state"},p.Plugins={},p.Workers=[{filter:["width","settings"],run:function(){this._width=Math.floor(this.$element.width()),h("set total width this._width: "+this._width)}},{filter:["width","items","settings"],run:function(t){t.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(t){var e=this.settings.margin||"",i=!this.settings.autoWidth,s=this.settings.rtl,e={width:"auto","margin-left":s?e:"","margin-right":s?"":e};i||this.$stage.children().css(e),t.css=e}},{filter:["width","items","settings"],run:function(t){!0===this.settings.debug&&(d=!0),h("run!"),1==this.settings.items&&1==this.settings.pixel_gap_fix&&(this.settings.item_size_gap=1,h("set items size gap: 1")),h("settings - stage padding type: "+this.settings.paddingType),h("settings - stage padding: "+this.settings.stagePadding),this.settings.paddingType&&"none"!=this.settings.paddingType||!this.settings.stagePadding||(this.settings.paddingType="both",h("set stage padding type - both"));var e,i=this.getItemWidth();for(h("Item width: "+i),this.settings.stagePadding>i&&(this.settings.stagePadding=0,e=this.getItemWidth(),this.settings.stagePadding=Math.floor(.5*e),i=this.getItemWidth(),h("set new stagePadding: "+this.settings.stagePadding+" and item width: "+i)),merge=null,iterator=this._items.length,grid=!this.settings.autoWidth,widths=[],t.items={merge:!1,width:i};iterator--;)merge=this._mergers[iterator],merge=this.settings.mergeFit&&Math.min(merge,this.settings.items)||merge,t.items.merge=1<merge||t.items.merge,widths[iterator]=grid?i*merge:this._items[iterator].width();this._widths=widths}},{filter:["items","settings"],run:function(){var t=[],e=this._items,i=this.settings,s=Math.max(2*i.items,4),n=2*Math.ceil(e.length/2),o=i.loop&&e.length?i.rewind?s:Math.max(s,n):0,r="",a="";for(o/=2;0<o;)t.push(this.normalize(t.length/2,!0)),r+=e[t[t.length-1]][0].outerHTML,t.push(this.normalize(e.length-1-(t.length-1)/2,!0)),a=e[t[t.length-1]][0].outerHTML+a,--o;this._clones=t,l(r).addClass("cloned").appendTo(this.$stage),l(a).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var t=this.settings.rtl?1:-1,e=this._clones.length+this._items.length,i=-1,s=[];++i<e;){var n=(s[i-1]||0)+(this._widths[this.relative(i)]+this.settings.margin)*t;s.push(n)}if(this.settings.item_size_gap)for(var o in s)s[o]-=this.settings.item_size_gap;h("Set coordinates"),h(s),this._coordinates=s}},{filter:["width","items","settings"],run:function(){var t=this.settings.stagePadding,e=this._coordinates,i=this.settings.paddingType,s=this.$stage.parent(),n=s.width();h("parent Outer Stage Width: "+s.width()),h("element width this.$element.width(): "+this.$element.width());var o={width:Math.ceil(Math.abs(e[e.length-1])),"padding-left":"","padding-right":""},r={width:Math.ceil(Math.abs(e[e.length-1]))+2*t,"padding-left":t||"","padding-right":t||""},a={width:Math.ceil(Math.abs(e[e.length-1]))+t,"padding-left":t||"","padding-right":""},t={width:Math.ceil(Math.abs(e[e.length-1]))+t,"padding-left":"","padding-right":t||""},n={width:n};h("set outer stage css"),h(n),"none"==i?(this.$stage.css(o),s.width(n)):"both"==i?(this.$stage.css(r),s.css(n),h("Set stage width css (both)"),h(r)):"left"==i?(this.$stage.css(a),s.css(n),h("Set stage width css (left)"),h(a)):"right"==i&&(this.$stage.css(t),s.css(n),h("Set stage width css (right)"),h(t))}},{filter:["width","items","settings"],run:function(t){var e=this._coordinates.length,i=!this.settings.autoWidth,s=this.$stage.children();if(i&&t.items.merge)for(;e--;)t.css.width=this._widths[this.relative(e)],s.eq(e).css(t.css);else i&&(t.css.width=t.items.width,s.css(t.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(t){t.current=t.current?this.$stage.children().index(t.current):0,t.current=Math.max(this.minimum(),Math.min(this.maximum(),t.current)),this.reset(t.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var t,e,i,s,n=this.settings.rtl?1:-1,o=2*this.settings.stagePadding,r=this.coordinates(this.current())+o,a=r+this.width()*n,h=[];for("left"!=this.settings.paddingType&&"right"!=this.settings.paddingType||(o=this.settings.stagePadding),i=0,s=this._coordinates.length;i<s;i++)t=this._coordinates[i-1]||0,e=Math.abs(this._coordinates[i])+o*n,(this.op(t,"<=",r)&&this.op(t,">",a)||this.op(e,"<",r)&&this.op(e,">",a))&&h.push(i);if(this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+h.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center){if(this.$stage.children().eq(this.current()).addClass("center"),0==this.settings.disableNoncenteredLinks)return!1;var l=this.$stage.children().not(".center").find("a"),c=this.$stage.find(".center a");l.css({cursor:"default","pointer-events":"none"}),c.css({cursor:"","pointer-events":""})}}},{filter:["width","position","items","settings"],run:function(){var t;this.settings.setActiveClass&&this.settings.setActiveClass&&(t=!0,this.settings.setActiveClassOnMobile?1==this.$stage.children(".active").length&&(t=!0):this.settings.setActiveClassOnMobile||1==this.$stage.children(".active").length&&(t=!1),1==t?this.$stage.children().eq(this.current()).addClass("uc-active-item").siblings().removeClass("uc-active-item"):0==t&&this.$stage.children().removeClass("uc-active-item"))}}],p.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=l("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap(l("<div/>",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},p.prototype.initializeItems=function(){var t=this.$element.find(".owl-item");if(t.length)return this._items=t.get().map(function(t){return l(t)}),this._mergers=this._items.map(function(){return 1}),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},p.prototype.initialize=function(){var t,e,i;this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.shuffle&&(t=this.$element).children().sort(function(){return Math.round(Math.random())-.5}).each(function(){t.append(this)}),this.settings.autoWidth&&!this.is("pre-loading")&&(e=this.$element.find("img"),i=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:a,i=this.$element.children(i).width(),e.length&&i<=0&&this.preloadAutoWidthImages(e)),this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized");var s=this._handlers;setTimeout(function(){s.onResize()},this.settings.delayBeforeLoad);var n=this;this.$stage.children().each(function(){if(1==n.settings.lazyLoad)return!1;var t,e=jQuery(this),i=e.find("img");1!=i.hasClass("lazyloading")&&1!=i.hasClass("lazy-loaded")&&1!=i.hasClass("lazy-hidden")||(i.removeClass("lazyloading"),i.removeClass("lazy-loaded"),i.removeClass("lazy-hidden"),(t=i.data("src"))&&i.attr("src",t),t="data-src",jQuery.removeData(i,t));e=e.find('[loading="lazy"]');e&&0!=e.length&&e.removeAttr("loading")})},p.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},p.prototype.setup=function(){var e=this.viewport(),t=this.options.responsive,i=-1,s=null;t?(l.each(t,function(t){t<=e&&i<t&&(i=Number(t))}),"function"==typeof(s=l.extend({},this.options,t[i])).stagePadding&&(s.stagePadding=s.stagePadding()),delete s.responsive,s.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+i))):s=l.extend({},this.options),this.trigger("change",{property:{name:"settings",value:s}}),this._breakpoint=i,this.settings=s,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}}),this.setupScroll()},p.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},p.prototype.prepare=function(t){var e=this.trigger("prepare",{content:t});return e.data||(e.data=l("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(t)),this.trigger("prepared",{content:e.data}),e.data},p.prototype.update=function(){for(var t=0,e=this._pipe.length,i=l.proxy(function(t){return this[t]},this._invalidated),s={};t<e;)(this._invalidated.all||0<l.grep(this._pipe[t].filter,i).length)&&this._pipe[t].run(s),t++;this._invalidated={},this.is("valid")||this.enter("valid")},p.prototype.width=function(t){var e;switch(t=t||p.Width.Default){case p.Width.Inner:case p.Width.Outer:e=this._width,h("calc width for dimention: "+t);default:switch(this.settings.paddingType){case"left":case"right":h("calc width with stagePadding: "+this.settings.paddingType),e=this._width-this.settings.stagePadding+this.settings.margin;break;case"both":h("calc width with stagePadding: "+this.settings.paddingType),e=this._width-2*this.settings.stagePadding+this.settings.margin;break;default:e=this._width+this.settings.margin,h("calc width without stagePadding for dimention: "+t)}}return h("carousel width (no stagepadding and margins): "+e),e},p.prototype.refresh=function(){h("---------------------refresh carousel-----------------------"),h("window width: "+c.innerWidth),h("element width: "+this.$element.width()),h("stage width: "+this.$stage.width()),this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},p.prototype.onThrottledResize=function(){c.clearTimeout(this.resizeTimer),this.resizeTimer=c.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},p.prototype.onResize=function(){return h("---------------------resize carousel-----------------------"),this._items.length?this.isVisible()?(h("resizing"),this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.$stage.parent().css({width:""}),this.refresh(),this.update(),this.leave("resizing"),void this.trigger("resized"))):(h("not visible"),!1):(h("same length"),!1)},p.prototype.registerEventHandlers=function(){l.support.transition&&this.$stage.on(l.support.transition.end+".owl.core",l.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(c,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",l.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",l.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",l.proxy(this.onDragEnd,this)))},p.prototype.onDragStart=function(t){var e=null;3!==t.which&&(e=l.support.transform?{x:(e=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","))[16===e.length?12:4],y:e[16===e.length?13:5]}:(e=this.$stage.position(),{x:this.settings.rtl?e.left+this.$stage.width()-this.width()+this.settings.margin:e.left,y:e.top}),this.is("animating")&&(l.support.transform?this.animate(e.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===t.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=l(t.target),this._drag.stage.start=e,this._drag.stage.current=e,this._drag.pointer=this.pointer(t),l(s).on("mouseup.owl.core touchend.owl.core",l.proxy(this.onDragEnd,this)),l(s).one("mousemove.owl.core touchmove.owl.core",l.proxy(function(t){var e=this.difference(this._drag.pointer,this.pointer(t));l(s).on("mousemove.owl.core touchmove.owl.core",l.proxy(this.onDragMove,this)),Math.abs(e.x)<Math.abs(e.y)&&this.is("valid")||(t.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},p.prototype.onDragMove=function(t){var e,i=null,s=null,n=this.difference(this._drag.pointer,this.pointer(t)),o=this.difference(this._drag.stage.start,n);this.is("dragging")&&(t.preventDefault(),this.settings.loop?(i=this.coordinates(this.minimum()),s=this.coordinates(this.maximum()+1)-i,o.x=((o.x-i)%s+s)%s+i):(i=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),s=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),e=this.settings.pullDrag?-1*n.x/5:0,o.x=Math.max(Math.min(o.x,i+e),s+e)),this._drag.stage.current=o,this.animate(o.x))},p.prototype.onDragEnd=function(t){var e=this.difference(this._drag.pointer,this.pointer(t)),i=this._drag.stage.current,t=0<e.x^this.settings.rtl?"left":"right";l(s).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==e.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(i.x,0!==e.x?t:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=t,(3<Math.abs(e.x)||300<(new Date).getTime()-this._drag.time)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},p.prototype.closest=function(i,s){var n=-1,o=this.width(),r=this.coordinates();return this.settings.freeDrag||l.each(r,l.proxy(function(t,e){return"left"===s&&e-30<i&&i<e+30?n=t:"right"===s&&e-o-30<i&&i<e-o+30?n=t+1:this.op(i,"<",e)&&this.op(i,">",r[t+1]!==a?r[t+1]:e-o)&&(n="left"===s?t+1:t),-1===n},this)),this.settings.loop||(this.op(i,">",r[this.minimum()])?n=i=this.minimum():this.op(i,"<",r[this.maximum()])&&(n=i=this.maximum())),n},p.prototype.animate=function(t){var e=0<this.speed();this.is("animating")&&this.onTransitionEnd(),e&&(this.enter("animating"),this.trigger("translate")),l.support.transition?(h("Go to coordinate: "+t),this.$stage.css({transform:"translateX("+t+"px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")})):e?this.$stage.animate({left:t+"px"},this.speed(),this.settings.fallbackEasing,l.proxy(this.onTransitionEnd,this)):this.$stage.css({left:t+"px"}),this.scrollToHead()},p.prototype.is=function(t){return this._states.current[t]&&0<this._states.current[t]},p.prototype.current=function(t){return t===a?this._current:0===this._items.length?a:(t=this.normalize(t),this._current!==t&&((e=this.trigger("change",{property:{name:"position",value:t}})).data!==a&&(t=this.normalize(e.data)),this._current=t,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})),this._current);var e},p.prototype.invalidate=function(t){return"string"===l.type(t)&&(this._invalidated[t]=!0,this.is("valid")&&this.leave("valid")),l.map(this._invalidated,function(t,e){return e})},p.prototype.reset=function(t){(t=this.normalize(t))!==a&&(this._speed=0,this._current=t,this.suppress(["translate","translated"]),this.animate(this.coordinates(t)),this.release(["translate","translated"]))},p.prototype.normalize=function(t,e){var i=this._items.length,e=e?0:this._clones.length;return!this.isNumeric(t)||i<1?t=a:(t<0||i+e<=t)&&(t=((t-e/2)%i+i)%i+e/2),t},p.prototype.relative=function(t){return t-=this._clones.length/2,this.normalize(t,!0)},p.prototype.maximum=function(t){var e,i,s,n=this.settings,o=this._coordinates.length;if(n.loop)o=this._clones.length/2+this._items.length-1;else if(n.autoWidth||n.merge){if(e=this._items.length)for(i=this._items[--e].width(),s=Math.floor(this.$element.width());e--&&!(s<(i+=this._items[e].width()+this.settings.margin)););o=e+1}else o=n.center?this._items.length-1:this._items.length-n.items;return t&&(o-=this._clones.length/2),Math.max(o,0)},p.prototype.minimum=function(t){return t?0:this._clones.length/2},p.prototype.items=function(t){return t===a?this._items.slice():(t=this.normalize(t,!0),this._items[t])},p.prototype.mergers=function(t){return t===a?this._mergers.slice():(t=this.normalize(t,!0),this._mergers[t])},p.prototype.clones=function(i){function s(t){return t%2==0?n+t/2:e-(t+1)/2}var e=this._clones.length/2,n=e+this._items.length;return i===a?l.map(this._clones,function(t,e){return s(e)}):l.map(this._clones,function(t,e){return t===i?s(e):null})},p.prototype.speed=function(t){return t!==a&&(this._speed=t),this._speed},p.prototype.coordinates=function(t){var e,i=1,s=t-1;return t===a?l.map(this._coordinates,l.proxy(function(t,e){return this.coordinates(e)},this)):(this.settings.center?(this.settings.rtl&&(i=-1,s=t+1),e=this._coordinates[t],e+=(this.width()-e+(this._coordinates[s]||0))/2*i):e=this._coordinates[s]||0,e=Math.ceil(e))},p.prototype.duration=function(t,e,i){return 0===i?0:Math.min(Math.max(Math.abs(e-t),1),6)*Math.abs(i||this.settings.smartSpeed)},p.prototype.to=function(t,e){var i,s=this.current(),n=t-this.relative(s),o=(0<n)-(n<0),r=this._items.length,a=this.minimum(),h=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(n)>r/2&&(n+=-1*o*r),(i=(((t=s+n)-a)%r+r)%r+a)!==t&&i-n<=h&&0<i-n&&(s=i-n,t=i,this.reset(s))):t=this.settings.rewind?(t%(h+=1)+h)%h:Math.max(a,Math.min(h,t)),this.speed(this.duration(s,t,e)),this.current(t),this.isVisible()&&this.update()},p.prototype.next=function(t){t=t||!1,this.to(this.relative(this.current())+1,t)},p.prototype.prev=function(t){t=t||!1,this.to(this.relative(this.current())-1,t)},p.prototype.onTransitionEnd=function(t){if(t!==a&&(t.stopPropagation(),(t.target||t.srcElement||t.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},p.prototype.viewport=function(){var t;return this.options.responsiveBaseElement!==c?t=l(this.options.responsiveBaseElement).width():c.innerWidth?t=c.innerWidth:s.documentElement&&s.documentElement.clientWidth?t=s.documentElement.clientWidth:console.warn("Can not detect viewport width."),t},p.prototype.replace=function(t){this.$stage.empty(),this._items=[],t=t&&(t instanceof jQuery?t:l(t)),this.settings.nestedItemSelector&&(t=t.find("."+this.settings.nestedItemSelector)),t&&t.length&&t.filter(function(){return 1===this.nodeType}).each(l.proxy(function(t,e){e=this.prepare(e),this.$stage.append(e),this._items.push(e),this._mergers.push(+e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items");t=this.settings.startPosition;l(this.$element).trigger("to.owl.carousel",t)},p.prototype.add=function(t,e){var i=this.relative(this._current);e=e===a?this._items.length:this.normalize(e,!0),t=t instanceof jQuery?t:l(t),this.trigger("add",{content:t,position:e}),t=this.prepare(t),0===this._items.length||e===this._items.length?(0===this._items.length&&this.$stage.append(t),0!==this._items.length&&this._items[e-1].after(t),this._items.push(t),this._mergers.push(+t.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[e].before(t),this._items.splice(e,0,t),this._mergers.splice(e,0,+t.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[i]&&this.reset(this._items[i].index()),this.invalidate("items"),this.trigger("added",{content:t,position:e})},p.prototype.remove=function(t){(t=this.normalize(t,!0))!==a&&(this.trigger("remove",{content:this._items[t],position:t}),this._items[t].remove(),this._items.splice(t,1),this._mergers.splice(t,1),this.invalidate("items"),this.trigger("removed",{content:null,position:t}))},p.prototype.preloadAutoWidthImages=function(t){t.each(l.proxy(function(t,e){this.enter("pre-loading"),e=l(e),l(new Image).one("load",l.proxy(function(t){e.attr("src",t.target.src),e.css("opacity",1),this.leave("pre-loading"),this.is("pre-loading")||this.is("initializing")||this.refresh()},this)).attr("src",e.attr("src")||e.attr("data-src")||e.attr("data-src-retina"))},this))},p.prototype.isElementInViewport=function(t){var e=t.offset().top,i=e+t.outerHeight(),s=jQuery(c).scrollTop(),t=s+jQuery(c).height();return s<i&&e<t},p.prototype.scrollToTop=function(t,e){jQuery("html, body").animate({scrollTop:t+e},400)},p.prototype.scrollToHead=function(){if(1==this.settings.autoplay)return!1;if(this.is("initializing"))return!1;if(this.is("resizing"))return!1;if(0==this.settings.scrollToHead)return!1;var t=this.$element;if(0==this.settings.scrollToHeadForceOnMobile&&1==this.isElementInViewport(t))return!1;var e=this.$element.offset().top,t=this.settings.scrollToHeadOffset;this.scrollToTop(e,t)},p.prototype.setupScroll=function(){this.settings.progressScroll&&(this._scroll={lastScrollTop:0,distanceScrolled:0,lastDirection:null},l(c).on("scroll.owl.progress",l.proxy(this.onScrollProgress,this)))},p.prototype.onScrollProgress=function(t){var e,i,s,n,o,r,a,h;!1!==this.settings.progressScroll&&(this.isTransitioning||this.isAnimating||this.isDragging?this._scroll.lastScrollTop=l(c).scrollTop():(e=l(c).scrollTop(),i=this._scroll.lastScrollTop,(n=l(c).width())<767&&this.settings.progressScrollDistanceMobile?s=this.settings.progressScrollDistanceMobile:767<=n&&n<1024&&this.settings.progressScrollDistanceTablet?s=this.settings.progressScrollDistanceTablet:1024<=n&&this.settings.progressScrollDistance&&(s=this.settings.progressScrollDistance),0!=(o=e-i)&&(r=Math.abs(o),n=i<e?"down":"up",(o=this._scroll.lastDirection!==n)&&(this._scroll.distanceScrolled=0,this._scroll.lastDirection=n),o&&s<r&&(r=0,1==d&&(a='<div class="owl-debug" style="position: fixed; background: #960; color: #FFF; z-index: 1000; padding: 10px; left: 20px; top: 20px; border-radius: 4px; font-family: monospace; line-height: 1.4;">NaN'+n+'<span style="color: #FF0;">(SPIKE ZEROED)</span> <br>NaN'+Math.abs(e-i).toFixed(0)+"px <br>NaN"+s+"pxNaN",(h=jQuery(".owl-debug")).length?h.html(a):jQuery("body").append(a))),this._scroll.distanceScrolled+=r,this._scroll.distanceScrolled>=s?(r="down"===n?"next.owl":"prev.owl",this.$element.trigger(r),this._scroll.distanceScrolled=0,1==d&&(a='<div class="owl-debug" style="position: fixed; background: #060; color: #FFF; z-index: 1000; padding: 10px; left: 20px; top: 20px; border-radius: 4px; font-family: monospace; line-height: 1.4;">NaN'+n+'<span style="color: #FF0;">(TRIGGERED)</span> <br>NaN'+this._scroll.distanceScrolled.toFixed(0)+"px <br>NaN"+s+"px + </div>",(h=jQuery(".owl-debug")).length&&h.remove(),jQuery("body").append(a))):1==d&&(a='<div class="owl-debug" style="position: fixed; background: #666; color: #FFF; z-index: 1000; padding: 10px; left: 20px; top: 20px; border-radius: 4px; font-family: monospace; line-height: 1.4;">NaN'+n+"<br>NaN"+this._scroll.distanceScrolled.toFixed(0)+"px <br>NaN"+s+"pxNaN",(h=jQuery(".owl-debug")).length?h.html(a):jQuery("body").append(a)),this._scroll.lastScrollTop=e)))},p.prototype.destroy=function(){for(var t in this.$element.off(".owl.core"),this.$stage.off(".owl.core"),l(s).off(".owl.core"),!1!==this.settings.responsive&&(c.clearTimeout(this.resizeTimer),this.off(c,"resize",this._handlers.onThrottledResize)),this._plugins)this._plugins[t].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel"),l(c).off("scroll.owl.progress")},p.prototype.op=function(t,e,i){var s=this.settings.rtl;switch(e){case"<":return s?i<t:t<i;case">":return s?t<i:i<t;case">=":return s?t<=i:i<=t;case"<=":return s?i<=t:t<=i}},p.prototype.on=function(t,e,i,s){t.addEventListener?t.addEventListener(e,i,s):t.attachEvent&&t.attachEvent("on"+e,i)},p.prototype.off=function(t,e,i,s){t.removeEventListener?t.removeEventListener(e,i,s):t.detachEvent&&t.detachEvent("on"+e,i)},p.prototype.trigger=function(t,e,i,s,n){var o={item:{count:this._items.length,index:this.current()}},r=l.camelCase(l.grep(["on",t,i],function(t){return t}).join("-").toLowerCase()),a=l.Event([t,"owl",i||"carousel"].join(".").toLowerCase(),l.extend({relatedTarget:this},o,e));return this._supress[t]||(l.each(this._plugins,function(t,e){e.onTrigger&&e.onTrigger(a)}),this.register({type:p.Type.Event,name:t}),this.$element.trigger(a),this.settings&&"function"==typeof this.settings[r]&&this.settings[r].call(this,a)),a},p.prototype.enter=function(t){l.each([t].concat(this._states.tags[t]||[]),l.proxy(function(t,e){this._states.current[e]===a&&(this._states.current[e]=0),this._states.current[e]++},this))},p.prototype.leave=function(t){l.each([t].concat(this._states.tags[t]||[]),l.proxy(function(t,e){this._states.current[e]--},this))},p.prototype.register=function(i){var e;i.type===p.Type.Event?(l.event.special[i.name]||(l.event.special[i.name]={}),l.event.special[i.name].owl||(e=l.event.special[i.name]._default,l.event.special[i.name]._default=function(t){return!e||!e.apply||t.namespace&&-1!==t.namespace.indexOf("owl")?t.namespace&&-1<t.namespace.indexOf("owl"):e.apply(this,arguments)},l.event.special[i.name].owl=!0)):i.type===p.Type.State&&(this._states.tags[i.name]?this._states.tags[i.name]=this._states.tags[i.name].concat(i.tags):this._states.tags[i.name]=i.tags,this._states.tags[i.name]=l.grep(this._states.tags[i.name],l.proxy(function(t,e){return l.inArray(t,this._states.tags[i.name])===e},this)))},p.prototype.suppress=function(t){l.each(t,l.proxy(function(t,e){this._supress[e]=!0},this))},p.prototype.release=function(t){l.each(t,l.proxy(function(t,e){delete this._supress[e]},this))},p.prototype.pointer=function(t){var e={x:null,y:null};return(t=(t=t.originalEvent||t||c.event).touches&&t.touches.length?t.touches[0]:t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t).pageX?(e.x=t.pageX,e.y=t.pageY):(e.x=t.clientX,e.y=t.clientY),e},p.prototype.isNumeric=function(t){return!isNaN(parseFloat(t))},p.prototype.difference=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},l.fn.owlCarousel=function(e){var s=Array.prototype.slice.call(arguments,1);return this.each(function(){var t=l(this),i=t.data("owl.carousel");i||(i=new p(this,"object"==typeof e&&e),t.data("owl.carousel",i),l.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(t,e){i.register({type:p.Type.Event,name:e}),i.$element.on(e+".owl.carousel.core",l.proxy(function(t){t.namespace&&t.relatedTarget!==this&&(this.suppress([e]),i[e].apply(this,[].slice.call(arguments,1)),this.release([e]))},i))})),"string"==typeof e&&"_"!==e.charAt(0)&&i[e].apply(i,s)})},l.fn.owlCarousel.Constructor=p}(window.Zepto||window.jQuery,window,document),function(e,i){var s=function(t){this._core=t,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":e.proxy(function(t){t.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=e.extend({},s.Defaults,this._core.options),this._core.$element.on(this._handlers)};s.Defaults={autoRefresh:!0,autoRefreshInterval:500},s.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=i.setInterval(e.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},s.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},s.prototype.destroy=function(){var t,e;for(t in i.clearInterval(this._interval),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},e.fn.owlCarousel.Constructor.Plugins.AutoRefresh=s}(window.Zepto||window.jQuery,window,document),function(a,n){var e=function(t){this._core=t,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(t){if(t.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(t.property&&"position"==t.property.name||"initialized"==t.type)){var e=this._core.settings,i=e.center&&Math.ceil(e.items/2)||e.items,s=e.center&&-1*i||0,n=(t.property&&void 0!==t.property.value?t.property.value:this._core.current())+s,o=this._core.clones().length,r=a.proxy(function(t,e){this.load(e)},this);for(0<e.lazyLoadEager&&(i+=e.lazyLoadEager,e.loop&&(n-=e.lazyLoadEager,i++));s++<i;)this.load(o/2+this._core.relative(n)),o&&a.each(this._core.clones(this._core.relative(n)),r),n++}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1,lazyLoadEager:0},e.prototype.load=function(t){var e=this._core.$stage.children().eq(t),t=e&&e.find(".owl-lazy");!t||-1<a.inArray(e.get(0),this._loaded)||(t.each(a.proxy(function(t,e){var i=a(e),s=1<n.devicePixelRatio&&i.attr("data-src-retina")||i.attr("data-src")||i.attr("data-srcset");this._core.trigger("load",{element:i,url:s},"lazy"),i.is("img")?i.one("load.owl.lazy",a.proxy(function(){i.css("opacity",1),this._core.trigger("loaded",{element:i,url:s},"lazy")},this)).attr("src",s):i.is("source")?i.one("load.owl.lazy",a.proxy(function(){this._core.trigger("loaded",{element:i,url:s},"lazy")},this)).attr("srcset",s):((e=new Image).onload=a.proxy(function(){i.css({"background-image":'url("'+s+'")',opacity:"1"}),this._core.trigger("loaded",{element:i,url:s},"lazy")},this),e.src=s)},this)),this._loaded.push(e.get(0)))},e.prototype.destroy=function(){var t,e;for(t in this.handlers)this._core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(n,i){var s=function(t){this._core=t,this._previousHeight=null,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&"position"===t.property.name&&this.update()},this),"loaded.owl.lazy":n.proxy(function(t){t.namespace&&this._core.settings.autoHeight&&t.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=n.extend({},s.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var e=this;n(i).on("load",function(){e._core.settings.autoHeight&&e.update()}),n(i).resize(function(){e._core.settings.autoHeight&&(null!=e._intervalId&&clearTimeout(e._intervalId),e._intervalId=setTimeout(function(){e.update()},250))})};s.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},s.prototype.update=function(){var t=this._core._current,e=t+this._core.settings.items,i=this._core.settings.lazyLoad,t=this._core.$stage.children().toArray().slice(t,e),s=[],e=0;n.each(t,function(t,e){s.push(n(e).height())}),(e=Math.max.apply(null,s))<=1&&i&&this._previousHeight&&(e=this._previousHeight),this._previousHeight=e,this._core.$stage.parent().height(e).addClass(this._core.settings.autoHeightClass)},s.prototype.destroy=function(){var t,e;for(t in this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},n.fn.owlCarousel.Constructor.Plugins.AutoHeight=s}(window.Zepto||window.jQuery,window,document),function(c,e){var i=function(t){this._core=t,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":c.proxy(function(t){t.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":c.proxy(function(t){t.namespace&&this._core.settings.video&&this.isInFullScreen()&&t.preventDefault()},this),"refreshed.owl.carousel":c.proxy(function(t){t.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":c.proxy(function(t){t.namespace&&"position"===t.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":c.proxy(function(t){var e;!t.namespace||(e=c(t.content).find(".owl-video")).length&&(e.css("display","none"),this.fetch(e,c(t.content)))},this)},this._core.options=c.extend({},i.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",c.proxy(function(t){this.play(t)},this))};i.Defaults={video:!1,videoHeight:!1,videoWidth:!1},i.prototype.fetch=function(t,e){var i=t.attr("data-vimeo-id")?"vimeo":t.attr("data-vzaar-id")?"vzaar":"youtube",s=t.attr("data-vimeo-id")||t.attr("data-youtube-id")||t.attr("data-vzaar-id"),n=t.attr("data-width")||this._core.settings.videoWidth,o=t.attr("data-height")||this._core.settings.videoHeight,r=t.attr("href");if(!r)throw new Error("Missing video URL.");if(-1<(s=r.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/))[3].indexOf("youtu"))i="youtube";else if(-1<s[3].indexOf("vimeo"))i="vimeo";else{if(!(-1<s[3].indexOf("vzaar")))throw new Error("Video URL not supported.");i="vzaar"}s=s[6],this._videos[r]={type:i,id:s,width:n,height:o},e.attr("data-video",r),this.thumbnail(t,this._videos[r])},i.prototype.thumbnail=function(e,t){function i(t){s=l.lazyLoad?c("<div/>",{class:"owl-video-tn "+h,srcType:t}):c("<div/>",{class:"owl-video-tn",style:"opacity:1;background-image:url("+t+")"}),e.after(s),e.after('<div class="owl-video-play-icon"></div>')}var s,n,o=t.width&&t.height?"width:"+t.width+"px;height:"+t.height+"px;":"",r=e.find("img"),a="src",h="",l=this._core.settings;if(e.wrap(c("<div/>",{class:"owl-video-wrapper",style:o})),this._core.settings.lazyLoad&&(a="data-src",h="owl-lazy"),r.length)return i(r.attr(a)),r.remove(),!1;"youtube"===t.type?(n="//img.youtube.com/vi/"+t.id+"/hqdefault.jpg",i(n)):"vimeo"===t.type?c.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+t.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){n=t[0].thumbnail_large,i(n)}}):"vzaar"===t.type&&c.ajax({type:"GET",url:"//vzaar.com/api/videos/"+t.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){n=t.framegrab_url,i(n)}})},i.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},i.prototype.play=function(t){var e=c(t.target).closest("."+this._core.settings.itemClass),i=this._videos[e.attr("data-video")],s=i.width||"100%",n=i.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),(t=c('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>')).attr("height",n),t.attr("width",s),"youtube"===i.type?t.attr("src","//www.youtube.com/embed/"+i.id+"?autoplay=1&rel=0&v="+i.id):"vimeo"===i.type?t.attr("src","//player.vimeo.com/video/"+i.id+"?autoplay=1"):"vzaar"===i.type&&t.attr("src","//view.vzaar.com/"+i.id+"/player?autoplay=true"),c(t).wrap('<div class="owl-video-frame" />').insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},i.prototype.isInFullScreen=function(){var t=e.fullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement;return t&&c(t).parent().hasClass("owl-video-frame")},i.prototype.destroy=function(){var t,e;for(t in this._core.$element.off("click.owl.video"),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},c.fn.owlCarousel.Constructor.Plugins.Video=i}(window.Zepto||window.jQuery,(window,document)),function(r){var e=function(t){this.core=t,this.core.options=r.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=void 0,this.next=void 0,this.handlers={"change.owl.carousel":r.proxy(function(t){t.namespace&&t.property.name&&"position"==t.property.name&&(this.previous=this.core.current(),this.next=t.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":r.proxy(function(t){t.namespace&&(this.swapping="translated"==t.type)},this),"translate.owl.carousel":r.proxy(function(t){t.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&r.support.animation&&r.support.transition){var t=this.core._speed;this.core.speed(0),t=t||1e3;var e=r.proxy(this.clear,this),i=this.core.$stage.children().eq(this.previous),s=this.core.$stage.children().eq(this.next),n=this.core.settings.animateIn,o=this.core.settings.animateOut;if(this.core.current()!==this.previous){if(o){if(i.one(r.support.animation.end,e).addClass("animated owl-animated-out").addClass(o),"none"==jQuery("."+o).css("animation-name"))return void this.core.speed(t);t=this.core.coordinates(this.previous)-this.core.coordinates(this.next),i.css({left:t+"px"})}n&&s.one(r.support.animation.end,e).addClass("animated owl-animated-in").addClass(n)}}},e.prototype.clear=function(t){r(t.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var t,e;for(t in this.handlers)this.core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},r.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,(window,document)),function(s,n,e){var i=function(t){this._core=t,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"change.owl.carousel":s.proxy(function(t){void 0!==t.property&&"position"===t.property.name&&1==this._core.settings.autoplay&&n.clearTimeout(this._call)},this),"changed.owl.carousel":s.proxy(function(t){t.namespace&&"settings"===t.property.name?this._core.settings.autoplay?this.play():this.stop():t.namespace&&"position"===t.property.name&&1==this._core.settings.autoplay&&(this._call=n.setTimeout(s.proxy(this._next,this,this._core.settings.autoplaySpeed),this._core.settings.autoplayTimeout))},this),"initialized.owl.carousel":s.proxy(function(t){t.namespace&&this._core.settings.autoplay&&this.play()},this),"start_autoplay.owl.autoplay":s.proxy(function(t){t.namespace&&this.start_autoplay()},this),"play.owl.autoplay":s.proxy(function(t,e,i){t.namespace&&this.play(e,i)},this),"stop.owl.autoplay":s.proxy(function(t){t.namespace&&this.stop()},this),"mouseover.owl.autoplay":s.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":s.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":s.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":s.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=s.extend({},i.Defaults,this._core.options)};i.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1,autoplayDevice:"both"},i.prototype._next=function(t){n.clearTimeout(this._call),this._call=n.setTimeout(s.proxy(this._next,this,t),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||e.hidden||this._core.next(t||this._core.settings.autoplaySpeed)},i.prototype.read=function(){return(new Date).getTime()-this._time},i.prototype.start_autoplay=function(){this._core.settings.autoplay=!0,this.play()},i.prototype.play=function(t,e){var i;if(0==this._core.settings.autoplay)return!1;this._core.is("rotating")||this._core.enter("rotating"),t=t||this._core.settings.autoplayTimeout,i=Math.min(this._time%(this._timeout||t),t),n.clearTimeout(this._call),this._paused?(this._time=this.read(),this._paused=!1):n.clearTimeout(this._call),this._time+=this.read()%t-i,this._timeout=t,this._call=n.setTimeout(s.proxy(this._next,this,e),t-i),this._core.trigger("play_autoplay"),this.autoplay_device()},i.prototype.stop=function(){this._core.settings.autoplay,this._core.is("rotating")&&(this._time=0,this._paused=!0,n.clearTimeout(this._call),this._core.leave("rotating"),this._core.trigger("stop_autoplay"))},i.prototype.autoplay_device=function(){if(0==this._core.settings.autoplay)return!1;var t=this._core.settings.autoplayDevice;if("both"==t)return!1;var e=this._core.viewport(),i=767<e;1==e<=767&&"desktop"==t&&this.stop(),1==i&&"mobile"==t&&this.stop()},i.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,n.clearTimeout(this._call),this._core.trigger("pause_autoplay")),n.clearTimeout(this._call)},i.prototype.destroy=function(){var t,e;for(t in this.stop(),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},s.fn.owlCarousel.Constructor.Plugins.autoplay=i}(window.Zepto||window.jQuery,window,document),function(n){"use strict";var e=function(t){this._core=t,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element;var i=!(this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to});this._handlers={"prepared.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+n(t.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,0,this._templates.pop())},this),"remove.owl.carousel":n.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,1)},this),"changed.owl.carousel":n.proxy(function(t){t.namespace&&"position"==t.property.name&&this.draw()},this),"initialized.owl.carousel":n.proxy(function(t){t.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":n.proxy(function(t){t.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this),"mousewheel wheel DOMMouseScroll MozMousePixelScroll":n.proxy(function(t){if(0==this._core.settings.mousewheelControl)return!0;var e=this.$element;0==i&&(0<t.originalEvent.deltaY&&0==i&&e.trigger("next.owl"),t.originalEvent.deltaY<0&&0==i&&e.trigger("prev.owl"),i=!0),clearTimeout(n.data(this,"timer")),n.data(this,"timer",setTimeout(function(){i=!1},250))},this)},this._core.options=n.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:['<span aria-label="Previous">&#x2039;</span>','<span aria-label="Next">&#x203a;</span>'],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,changeItemOnClick:!1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1,mousewheelControl:!1},e.prototype.initialize=function(){var t,e,i,s=this._core.settings;for(t in this._controls.$relative=s.navContainer?n(s.navContainer):n("<div>").addClass(s.navContainerClass).appendTo(this.$element),this._controls.$previous=n("<"+s.navElement+' value="previous item" title="previous item">').addClass(s.navClass[0]).html(s.navText[0]).prependTo(this._controls.$relative).on("click",n.proxy(function(t){this.prev(s.navSpeed)},this)),this._controls.$next=n("<"+s.navElement+' value="next item" title="next item">').addClass(s.navClass[1]).html(s.navText[1]).appendTo(this._controls.$relative).on("click",n.proxy(function(t){this.next(s.navSpeed)},this)),s.changeItemOnClick&&(i=(e=this)._core.clones().length/2,setTimeout(function(){e._core.$stage.children().on("click",n.proxy(function(t){t=n(t.currentTarget).index();e.to(t-i,s.navSpeed,!0)},e))},300)),s.dotsData||(this._templates=[n('<button role="button">').addClass(s.dotClass).append(n("<span>")).prop("outerHTML")]),this._controls.$absolute=s.dotsContainer?n(s.dotsContainer):n("<div>").addClass(s.dotsClass).appendTo(this.$element),this._controls.$absolute.on("click","button",n.proxy(function(t){var e=(n(t.target).parent().is(this._controls.$absolute)?n(t.target):n(t.target).parent()).index();t.preventDefault(),this.to(e,s.dotsSpeed)},this)),this._overrides)this._core[t]=n.proxy(this[t],this)},e.prototype.destroy=function(){var t,e,i,s,n=this._core.settings;for(t in this._handlers)this.$element.off(t,this._handlers[t]);for(e in this._controls)"$relative"===e&&n.navContainer?this._controls[e].html(""):this._controls[e].remove();for(s in this.overides)this._core[s]=this._overrides[s];for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)},e.prototype.update=function(){var t,e,i=this._core.clones().length/2,s=i+this._core.items().length,n=this._core.maximum(!0),o=this._core.settings,r=o.center||o.autoWidth||o.dotsData?1:o.dotsEach||o.items;if("page"!==o.slideBy&&(o.slideBy=Math.min(o.slideBy,o.items)),o.dots||"page"==o.slideBy)for(this._pages=[],t=i,e=0;t<s;t++){if(r<=e||0===e){if(this._pages.push({start:Math.min(n,t-i),end:t-i+r-1}),Math.min(n,t-i)===n)break;e=0,0}e+=this._core.mergers(this._core.relative(t))}},e.prototype.draw=function(){var t=this._core.settings,e=(this._core.items().length,t.items,this._core.relative(this._core.current())),i=t.loop||t.rewind,s=this._core.$stage.children().children().children();0!=t.nav&&0!=this._core.items().length&&0!=s.length||this._controls.$relative.remove(),1==t.nav&&(this._controls.$previous.toggleClass("disabled",!i&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!i&&e>=this._core.maximum(!0))),0!=t.dots&&0!=this._core.items().length&&0!=s.length||this._controls.$absolute.remove(),t.dots&&(s=this._pages.length-this._controls.$absolute.children().length,t.dotsData&&0!=s?this._controls.$absolute.html(this._templates.join("")):0<s?this._controls.$absolute.append(new Array(1+s).join(this._templates[0])):s<0&&this._controls.$absolute.children().slice(s).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(n.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(t){var e=this._core.settings;t.page={index:n.inArray(this.current(),this._pages),count:this._pages.length,size:e&&(e.center||e.autoWidth||e.dotsData?1:e.dotsEach||e.items)}},e.prototype.current=function(){var i=this._core.relative(this._core.current());return n.grep(this._pages,n.proxy(function(t,e){return t.start<=i&&t.end>=i},this)).pop()},e.prototype.getPosition=function(t){var e,i,s=this._core.settings;return"page"==s.slideBy?(e=n.inArray(this.current(),this._pages),i=this._pages.length,t?++e:--e,e=this._pages[(e%i+i)%i].start):(e=this._core.relative(this._core.current()),i=this._core.items().length,t?e+=s.slideBy:e-=s.slideBy),e},e.prototype.next=function(t){n.proxy(this._overrides.to,this._core)(this.getPosition(!0),t)},e.prototype.prev=function(t){n.proxy(this._overrides.to,this._core)(this.getPosition(!1),t)},e.prototype.to=function(t,e,i){!i&&this._pages.length?(i=this._pages.length,n.proxy(this._overrides.to,this._core)(this._pages[(t%i+i)%i].start,e)):n.proxy(this._overrides.to,this._core)(t,e)},n.fn.owlCarousel.Constructor.Plugins.Navigation=e}(window.Zepto||window.jQuery,(window,document)),function(s,n){"use strict";var e=function(t){this._core=t,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":s.proxy(function(t){t.namespace&&"URLHash"===this._core.settings.startPosition&&s(n).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":s.proxy(function(t){var e;!t.namespace||(e=s(t.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash"))&&(this._hashes[e]=t.content)},this),"changed.owl.carousel":s.proxy(function(t){var i;t.namespace&&"position"===t.property.name&&(i=this._core.items(this._core.relative(this._core.current())),(t=s.map(this._hashes,function(t,e){return t===i?e:null}).join())&&n.location.hash.slice(1)!==t&&(n.location.hash=t))},this)},this._core.options=s.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),s(n).on("hashchange.owl.navigation",s.proxy(function(t){var e=n.location.hash.substring(1),i=this._core.$stage.children(),e=this._hashes[e]&&i.index(this._hashes[e]);void 0!==e&&e!==this._core.current()&&this._core.to(this._core.relative(e),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var t,e;for(t in s(n).off("hashchange.owl.navigation"),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},s.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(n,o){var r=n("<support>").get(0).style,a="Webkit Moz O ms".split(" "),t={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},e=function(){return!!h("transform")},i=function(){return!!h("perspective")},s=function(){return!!h("animation")};function h(t,i){var s=!1,e=t.charAt(0).toUpperCase()+t.slice(1);return n.each((t+" "+a.join(e+" ")+e).split(" "),function(t,e){if(r[e]!==o)return s=!i||e,!1}),s}function l(t){return h(t,!0)}!function(){return!!h("transition")}()||(n.support.transition=new String(l("transition")),n.support.transition.end=t.transition.end[n.support.transition]),s()&&(n.support.animation=new String(l("animation")),n.support.animation.end=t.animation.end[n.support.animation]),e()&&(n.support.transform=new String(l("transform")),n.support.transform3d=i())}(window.Zepto||window.jQuery,(window,void document));
  • unlimited-elements-for-elementor/trunk/changelog.txt

    r3379552 r3401883  
     1
     2== Changelog ==
     3
     4
     5version 2.0: 2025-11-24 =
     6
     7Plugin Changes:
     8
     9* Feature: added schema options to posts and multisource widget types
     10* Feature: made options for ai visibility (the schema)
     11
     12Widgets Changes:
     13
     14* Feature: Background Switcher (Free) - Added Hover Blur Effect option, allowing a subtle blur to be applied when hovering over elements for enhanced visual interaction.
     15* Feature: Post Grid (Free) - Added Meta Data One, Two, Three, Four, and Five Typography Override options, allowing full control over the styling of each individual metadata field.
     16* Feature: Icon Bullets (Free) - Separated the Gap option into two independent controls: Column Gap and Row Gap, providing more precise spacing adjustments for grid layouts.
     17* Feature: Icon Bullets (Free) - Added Item Justify Content option, allowing greater control over horizontal alignment within each item.
     18* Fix: Justified Image Carousel (Pro) - Fixed issue where a hash name was incorrectly added to the URL after opening the lightbox, ensuring clean and consistent URL behavior.
     19* Fix: Animated Border Icon Box (Free) - Fixed issue where the full-box link was not functioning correctly on hover, ensuring the entire item remains fully clickable as intended.
     20* Fix: Content Accordion (Free) - Increased the priority of the Heading Text Typography option, ensuring it can successfully override conflicting CSS rules applied by various themes.
     21* Fix: Fullscreen Menu (Free) - Rebuilt the option so the icon size now updates automatically in the editor, and adjusted the default styling to ensure the icon is vertically centered.
     22* Fix: Content Tabs (Free) - Removed outdated and unnecessary code that was preventing widgets from functioning correctly when their parent container was hidden using Elementor’s responsive visibility options.
     23
     24
     25version 1.5.152: 2025-11-17 =
     26
     27* Fix: disable short pixel plugin on ajax requests, because it's breaking the json response
     28* Fix: fixed some wpml language with thumb id issues
     29* Feature: added the schema for multisource and post list params authomatically
     30* Fix: make sure that there are images url's in all of the schemas
     31* Change: added black friday theme to the plugin
     32
    133
    234
  • unlimited-elements-for-elementor/trunk/inc_php/framework/functions.class.php

    r3379552 r3401883  
    798798     * Modify data array for show - for DEBUG purposes
    799799     * Convert single arrays like in post meta (multi-level support)
     800     * fordebug for debug debug array debug
    800801     */
    801802    public static function modifyDataArrayForShow($arrData, $convertSingleArray = false) {
    802         // Check if input is not an array
     803
     804        // Check if input is not an array
    803805        if (!is_array($arrData)) {
    804806            return $arrData;
     
    820822            }
    821823           
    822             if(is_string($value))
     824            if(is_string($value)){
    823825                $value = htmlspecialchars($value);
     826               
     827            }
    824828           
    825829            // If the value is an array, process it recursively
     
    11381142   
    11391143    /**
    1140      * strip all tags, leave only needed for the text
    1141      */
    1142     public static function normalizeContentForText($content){
    1143        
    1144         $content = wp_strip_all_tags($content, "<br><em><b><strong>");
    1145        
    1146         return($content);
     1144     * normalize content for text output
     1145     */
     1146    public static function normalizeContentForText( $content ) {
     1147   
     1148        $allowed_tags = array(
     1149            'br'     => array(),
     1150            'p'      => array(),
     1151            'strong' => array(),
     1152            'b'      => array(),
     1153            'em'     => array(),
     1154            'i'      => array(),
     1155            'u'      => array(),
     1156            'span'   => array(
     1157                'style' => array(),
     1158                'class' => array(),
     1159            ),
     1160            'ul'     => array(),
     1161            'ol'     => array(),
     1162            'li'     => array(),
     1163            'a'      => array(
     1164                'href'  => array(),
     1165                'title' => array(),
     1166                'rel'   => array(),
     1167                'target'=> array(),
     1168            ),
     1169        );
     1170   
     1171        return wp_kses( $content, $allowed_tags );
    11471172    }
    11481173   
     
    11591184        $originalValue = $value;
    11601185       
    1161         $value = wp_strip_all_tags($value,"<br><em><b><strong>");
     1186        $value = self::normalizeContentForText($value);
    11621187       
    11631188        $stringLen = mb_strlen($value, $charset);
     
    18761901        return($str);
    18771902    }
    1878 
     1903   
     1904    /**
     1905     * validate json string
     1906     */
     1907    public static function jsonDecodeValidate($str){
     1908       
     1909        if(empty($str))
     1910            return(array());
     1911       
     1912        $arrJSON = self::jsonDecode($str);
     1913       
     1914        if(!empty($arrJSON))
     1915            return($arrJSON);
     1916               
     1917        $errorMessage = json_last_error_msg();
     1918       
     1919        UniteFunctionsUC::throwError($errorMessage);
     1920       
     1921        return($errorMessage);
     1922    }
     1923   
     1924   
    18791925    /**
    18801926     * maybe json decode
     
    24092455     */
    24102456    public static function isAlphaNumeric($val){
     2457       
    24112458        $match = preg_match('/^[\w_]+$/', $val);
    24122459
     
    24162463        return(true);
    24172464    }
    2418 
     2465   
     2466    /**
     2467     * check that meta key is valid
     2468     */
     2469    public static function isMetaKeyValid($metaKey){
     2470       
     2471        if(is_string($metaKey) == false)
     2472            return(false);
     2473           
     2474        if(empty($metaKey))
     2475            return(false);
     2476       
     2477         // length limit
     2478        if ( strlen( $metaKey ) > 255 )
     2479            return false;
     2480           
     2481        if ( ! preg_match('/^[A-Za-z0-9_\-]+$/', $metaKey) )
     2482            return false;
     2483       
     2484        return(true);
     2485    }
     2486   
     2487   
     2488    /**
     2489     * check if taxonomy name is valid
     2490     */
     2491    public static function isTaxonomyNameValid($taxonomy){
     2492       
     2493        // must be a string
     2494        if ( ! is_string( $taxonomy ) ) {
     2495            return false;
     2496        }
     2497   
     2498        // not empty
     2499        if ( $taxonomy === '' ) {
     2500            return false;
     2501        }
     2502   
     2503        // max length 32 chars (WordPress internal limit)
     2504        if ( strlen( $taxonomy ) > 32 ) {
     2505            return false;
     2506        }
     2507   
     2508        // must be lowercase only
     2509        if ( strtolower( $taxonomy ) !== $taxonomy ) {
     2510            return false;
     2511        }
     2512   
     2513        // allowed characters: letters, digits, underscore
     2514        if ( ! preg_match('/^[a-z0-9_]+$/', $taxonomy) ) {
     2515            return false;
     2516        }
     2517   
     2518        // cannot start with a number
     2519        if ( preg_match('/^[0-9]/', $taxonomy) ) {
     2520            return false;
     2521        }
     2522   
     2523        return true;
     2524    }
     2525   
     2526   
     2527   
    24192528    /**
    24202529     * validate id's list, allowed only numbers and commas
     
    25962705            return $arrErrors;
    25972706    }
    2598 
     2707   
     2708   
    25992709    public static function z________SANITIZE________(){}
    26002710   
  • unlimited-elements-for-elementor/trunk/inc_php/unitecreator_helperhtml.class.php

    r3397365 r3401883  
    503503            if(is_string($data))
    504504                $data = htmlspecialchars($data);
    505            
     505                           
    506506            dmp($data);
    507507           
  • unlimited-elements-for-elementor/trunk/inc_php/unitecreator_output.class.php

    r3397365 r3401883  
    19211921        return($html);
    19221922    }
    1923 
    1924     /**
    1925      * modify debug array
     1923   
     1924    /**
     1925     * modify debug array - output for debug, fordebug
    19261926     */
    19271927    private function modifyDebugArray($arrDebug){
     
    19881988        $html .= dmpGet("<b> ----------Terms--------- </b>");
    19891989
    1990         $terms = UniteFunctionsWPUC::getPostTerms($post);
    1991 
     1990        $terms = UniteFunctionsWPUC::getPostTermsTitlesString($post, true);
     1991       
    19921992        $html .= dmpGet($terms);
    19931993       
     
    20002000     */
    20012001    private function putDebugDataHtml_posts($arrItemData){
    2002 
     2002       
    20032003        $numPosts = count($arrItemData);
    20042004
     
    20092009        if(empty($arrItemData))
    20102010            return($html);
    2011 
     2011       
    20122012        $isShowMeta = ($this->debugDataType == "post_meta");
    20132013
    20142014        foreach($arrItemData as $index => $item){
    2015 
     2015                       
    20162016            $isPost = false;
    20172017            if($item instanceof WP_Post)
    20182018                $isPost = true;
    20192019
     2020            //check the multisource type
    20202021            if($isPost == false){
    2021 
     2022               
     2023                $itemTest = UniteFunctionsUC::getVal($item, "item");
     2024               
     2025                $objectType = UniteFunctionsUC::getVal($itemTest, "object_type");
     2026                $objectID = UniteFunctionsUC::getVal($itemTest, "object_id");
     2027               
     2028                if(!empty($objectID) && $objectType === "posts"){
     2029                    $item = get_post($objectID);
     2030                    $isPost = true;                 
     2031                }
     2032            }
     2033
     2034           
     2035            if($isPost == false){
     2036               
    20222037                $item = UniteFunctionsUC::getVal($item, "item");
    2023 
     2038                               
    20242039                $postData = UniteFunctionsUC::getArrFirstValue($item);
    2025 
     2040                                   
    20262041                $title = UniteFunctionsUC::getVal($postData, "title");
    20272042                $alias = UniteFunctionsUC::getVal($postData, "alias");
     
    20562071            if($isShowMeta == false)
    20572072                continue;
    2058 
     2073       
     2074            $html .= ("<b> ------- Post Meta ------- </b>");
     2075           
    20592076            $postMeta = get_post_meta($id, "", false);
    2060 
    2061             $postMeta = UniteFunctionsUC::modifyDataArrayForShow($postMeta, true);
    2062 
     2077                       
     2078            $postMeta = $this->modifyDebugArray($postMeta);
     2079           
    20632080            $html .= dmpGet($postMeta);
    20642081
    2065             //$postMeta = get_post_meta($post_id)
    2066 
     2082            $html .= ("<b> ------- Post Terms ------- </b>");
     2083           
     2084            $terms = UniteFunctionsWPUC::getPostTermsTitlesString($post, true);
     2085           
     2086            $html .= dmpGet($terms);
     2087           
    20672088        }
    20682089
     
    21112132     */
    21122133    private function putDebugDataHtml($arrData, $arrItemData){
    2113 
     2134       
    21142135        $html = "<div class='uc-debug-output' style='font-size:16px;color:black;text-decoration:none;background-color:white;padding:3px;'>";
    2115 
     2136       
    21162137        $html .= dmpGet("<b>Widget Debug Data</b> (turned on by setting in widget advanced section)<br>",true);
    21172138
     
    21202141       
    21212142        if(!empty($paramListing) && $this->itemsType == "template"){
    2122 
     2143           
    21232144            $arrItemData = $this->putDebugDataHtml_getItemsFromListing($paramListing, $arrData);
    21242145        }
    2125 
     2146       
     2147       
    21262148        switch($this->debugDataType){
    21272149            case "post_titles":
  • unlimited-elements-for-elementor/trunk/inc_php/unitecreator_schema.class.php

    r3397365 r3401883  
    1616   
    1717    private static $showDebug = false;
     18   
     19    private $arrSchemaDebugContent = array();
     20   
     21    private $lastCustomSchema;
     22   
    1823    private $objAddon;
    1924   
     25    private static $showJsonErrorOnce = false;
    2026   
    2127    const ROLE_TITLE = "title";
     
    2733    const ROLE_IMAGE = "image";
    2834   
     35    const ROLE_EXTRA_FIELD1 = "field1";
     36    const ROLE_EXTRA_FIELD2 = "field2";
     37    const ROLE_EXTRA_FIELD3 = "field3";
     38    const ROLE_EXTRA_FIELD4 = "field4";
     39   
    2940    const ROLE_AUTO = "_auto_";
    3041   
     
    3445   
    3546    const MULTIPLE_SCHEMA_NAME = "ue_schema";
     47   
     48   
     49    /**
     50     * get roles keys
     51     */
     52    private function getArrRolesKeys(){
     53       
     54        $arrRoles = array(
     55            self::ROLE_TITLE,
     56            self::ROLE_DESCRIPTION,
     57            self::ROLE_HEADING,
     58            self::ROLE_LINK,
     59            self::ROLE_CONTENT,
     60            self::ROLE_IMAGE,
     61            self::ROLE_EXTRA_FIELD1,
     62            self::ROLE_EXTRA_FIELD2,
     63            self::ROLE_EXTRA_FIELD3,
     64            self::ROLE_EXTRA_FIELD4
     65        );
     66       
     67        return($arrRoles);
     68    }
    3669   
    3770   
     
    5891            ),
    5992            array(
    60                 "type"=>"Recepy"
     93                "type"=>"Recipe"
    6194            ),         
    6295            array(
     
    149182    public function setObjAddon($addon){
    150183       
    151         $this->objAddon = new UniteCreatorAddon();
     184        //$this->objAddon = new UniteCreatorAddon();
    152185       
    153186        $this->objAddon = $addon;
     
    206239            break;
    207240            case UniteCreatorAddon::ITEMS_TYPE_MULTISOURCE:
     241               
     242                $this->putSchemaItems($schemaType, $arrItems, $arrParamsItems , $arrSettings);
     243               
     244            break;
     245           
     246        }
    208247                               
    209                 $this->putSchemaItems($schemaType, $arrItems, $arrParamsItems , $arrSettings);
    210                
    211             break;
    212            
    213         }
    214                                
    215248    }
    216249       
     
    220253     */
    221254    public function putSchemaItems($schemaType, $arrItems, $paramsItems, $arrSettings){
    222                
     255       
    223256        if(empty($schemaType))
    224             $schemaType = self::SCHEMA_TYPE_FAQ;
     257            $schemaType = "faqpage";
    225258       
    226259        $title = UniteFunctionsUC::getVal($arrSettings, "title");
     
    292325            return;
    293326       
     327        //clean certain keys that not goo to leave empty
     328        $arrSchema = $this->cleanSchemaArray($arrSchema, array(
     329            'description',
     330            'image',
     331            'sameAs',
     332        ));
     333       
     334       
    294335        $jsonItems = json_encode($arrSchema, JSON_UNESCAPED_UNICODE);
    295336       
     
    305346        echo $strSchema;
    306347    }
    307    
    308 
    309 
     348
     349   
     350    private function a____________SCHEMA_ITEM_CONTENT________(){}
     351   
     352
     353    /**
     354     * sanitize item value
     355     */
     356    private function sanitizeItemValue($value, $role){
     357       
     358        switch($role){
     359            case self::ROLE_TITLE:
     360            case self::ROLE_CONTENT:
     361            case self::ROLE_HEADING:
     362            case self::ROLE_DESCRIPTION:
     363            case self::ROLE_EXTRA_FIELD1:
     364            case self::ROLE_EXTRA_FIELD2:
     365            case self::ROLE_EXTRA_FIELD3:
     366            case self::ROLE_EXTRA_FIELD4:
     367                $value = UniteFunctionsUC::normalizeContentForText($value);
     368                $value = trim($value);
     369            break;
     370            case self::ROLE_IMAGE:
     371            case self::ROLE_LINK:
     372                $value = UniteFunctionsUC::sanitize($value, UniteFunctionsUC::SANITIZE_URL);
     373            break;
     374        }
     375       
     376        return($value);
     377    }
     378   
     379    /**
     380     * get extra field placeholder type. meta:key or term:key
     381     * Enter description here ...
     382     */
     383    private function getExtraFieldPlaceholderType($fieldName){
     384       
     385        if(strpos($fieldName, "meta:") !== false)
     386            return("meta");
     387       
     388        if(strpos($fieldName, "term:") !== false)
     389            return("term");
     390       
     391        return("");
     392    }
     393   
     394   
     395    /**
     396     * get item extra field
     397     */
     398    private function getItemExtraFieldValue($fieldName, $postID, $fieldNameType){
     399       
     400        if(empty($postID))
     401            return("");
     402                           
     403        //get the meta
     404       
     405        if($fieldNameType == "meta"){
     406                       
     407            $metaKey = str_replace("meta:", "", $fieldName);
     408               
     409            $metaValue = UniteFunctionsWPUC::getPostCustomField($postID, $metaKey);
     410           
     411            if(empty($metaValue))
     412                return("");
     413           
     414            if(is_array($metaValue))
     415                 $metaValue = implode(',', $metaValue);
     416           
     417            if(is_string($metaValue) == false)
     418                $metaValue = "";
     419           
     420            return($metaValue);
     421        }
     422       
     423        //get the term
     424       
     425        if($fieldNameType == "term"){
     426           
     427            $taxonomu = str_replace("term:", "", $fieldName);
     428           
     429            $termName = UniteFunctionsWPUC::getPostTerm_firstTermName($postID, $taxonomu);
     430           
     431            return($termName);
     432        }
     433
     434       
     435        return("");
     436    }
     437   
     438   
    310439    /**
    311440     * get item schema content
    312441     */
    313     private function getItemSchemaContent($item, $arrFieldsByRoles){
     442    private function getItemSchemaContent($item, $arrFieldsByRoles, $itemType){
    314443       
    315444        if(isset($item["item"]))
    316445            $item = $item["item"];
    317446       
     447                       
    318448        $arrContent = array();
    319                
     449       
     450        $postID = null;
     451       
     452        switch($itemType){
     453            case UniteCreatorAddon::ITEMS_TYPE_POST:
     454               
     455                $postID = UniteFunctionsUC::getVal($item, "id");
     456            break;
     457            case UniteCreatorAddon::ITEMS_TYPE_MULTISOURCE:
     458               
     459                $itemSource = UniteFunctionsUC::getVal($item, "item_source");
     460                if($itemSource == "posts")
     461                    $postID = UniteFunctionsUC::getVal($item, "object_id");
     462               
     463            break;
     464        }
     465       
     466       
    320467        foreach($arrFieldsByRoles as $role => $fieldName){
    321468           
    322             $value = UniteFunctionsUC::getVal($item, $fieldName);
    323            
    324             switch($role){
    325                 case self::ROLE_TITLE:
    326                 case self::ROLE_CONTENT:
    327                 case self::ROLE_HEADING:
    328                 case self::ROLE_DESCRIPTION:
    329                     $value = wp_strip_all_tags($value);
    330                     $value = trim($value);
    331                 break;
    332                 case self::ROLE_IMAGE:
    333                 case self::ROLE_LINK:
    334                     $value = UniteFunctionsUC::sanitize($value, UniteFunctionsUC::SANITIZE_URL);
    335                 break;
    336                
    337             }
     469            //get value
     470           
     471            //meta or term type
     472            $extraFieldType = $this->getExtraFieldPlaceholderType($fieldName);
     473           
     474            if(!empty($extraFieldType))     //take the value from the extra field
     475                $value = $this->getItemExtraFieldValue($fieldName, $postID, $extraFieldType);
     476            else   
     477                    //take the value from the item
     478                $value = UniteFunctionsUC::getVal($item, $fieldName);
     479                   
     480            $value = $this->sanitizeItemValue($value, $role);
    338481           
    339482            $arrContent[$role] = $value;
    340            
    341         }       
     483        }
     484       
    342485       
    343486        return($arrContent);
    344487    }
     488   
    345489   
    346490    private function a____________MAP_FIELDS________(){}
     
    479623        return($arrOutput);
    480624    }
    481 
     625   
     626    /**
     627     * check the extra fields fields mapping, modify to meta:key or term:key
     628     */
     629    private function getFieldsByRoles_checkMetaTermKeys($arrFieldsByRoles, $fieldMap, $roleKey, $arrSettings){
     630       
     631        //--- check if related to meta and term
     632       
     633        if($fieldMap != "meta" && $fieldMap != "term")
     634            return($arrFieldsByRoles);
     635
     636        //---- get the extra field key
     637       
     638        $fieldKey = UniteFunctionsUC::getVal($arrSettings, "extrafieldkey_" . $roleKey);
     639       
     640        if(empty($fieldKey))
     641            return($arrFieldsByRoles);
     642       
     643        //check the key and sanitize
     644       
     645        switch($fieldMap){
     646            case "meta":    // check that meta field is valid
     647               
     648                $isValid = UniteFunctionsUC::isMetaKeyValid($fieldKey);
     649               
     650                if($isValid == false){
     651                    $fieldKey = UniteFunctionsUC::sanitize($fieldKey, UniteFunctionsUC::SANITIZE_HTML);
     652                    UniteFunctionsUC::throwError("The meta name: $fieldKey is not valid");
     653                }
     654                                   
     655            break;
     656            case "term":    //check that taxonomy is valid
     657                $isValid = UniteFunctionsUC::isTaxonomyNameValid($fieldKey);
     658               
     659                if($isValid == false){
     660                    $fieldKey = UniteFunctionsUC::sanitize($fieldKey, UniteFunctionsUC::SANITIZE_HTML);
     661                    UniteFunctionsUC::throwError("The taxonomy name: $fieldKey is not valid");
     662                }
     663                           
     664            break;
     665        }
     666
     667        //put the new field with the key
     668       
     669        $arrFieldsByRoles[$roleKey] = $fieldMap.":".$fieldKey;
     670           
     671        return($arrFieldsByRoles);
     672    }
     673   
    482674    /**
    483675     * Get final fields mapping by roles, using manual settings if enabled.
     
    516708        if ($isMappingEnabled == false)
    517709            return $arrFieldsByRoles;
    518    
     710       
    519711        $arrManualRoles = array(
    520712            self::ROLE_TITLE,
     
    525717   
    526718        foreach ($arrManualRoles as $roleKey) {
     719           
    527720            $manualValue = UniteFunctionsUC::getVal($arrSettings, "fieldmap_" . $roleKey);
    528721           
    529722            if (!empty($manualValue) && $manualValue !== self::ROLE_AUTO) {
    530723                $arrFieldsByRoles[$roleKey] = $manualValue;
     724               
     725                //check for meta or term, add the extra key
     726               
     727                $arrFieldsByRoles = $this->getFieldsByRoles_checkMetaTermKeys($arrFieldsByRoles, $manualValue, $roleKey, $arrSettings);
     728               
    531729            }
     730           
    532731        }
    533        
     732       
     733        //-- add extra fields:
     734        $arrExtraFields = array(
     735            self::ROLE_EXTRA_FIELD1,
     736            self::ROLE_EXTRA_FIELD2,
     737            self::ROLE_EXTRA_FIELD3,
     738            self::ROLE_EXTRA_FIELD4
     739        );
     740       
     741        foreach($arrExtraFields as $roleKey){
     742           
     743            $fieldMap = UniteFunctionsUC::getVal($arrSettings, "fieldmap_" . $roleKey);
     744               
     745            $arrFieldsByRoles[$roleKey] = "";
     746           
     747            if($fieldMap == "nothing" || empty($fieldMap))
     748                continue;
     749           
     750            $arrFieldsByRoles = $this->getFieldsByRoles_checkMetaTermKeys($arrFieldsByRoles, $fieldMap, $roleKey, $arrSettings);
     751           
     752        }
     753       
     754       
    534755        return $arrFieldsByRoles;
    535756    }   
     
    548769 */
    549770private function addFieldsMappingSettings($objSettings, $name, $paramsItems, $isPost) {
    550 
     771   
     772   
    551773    // ---- Add master toggle: enable mapping yes/no ----
    552774    $arrParam = array();
    553775    $arrParam["origtype"] = UniteCreatorDialogParam::PARAM_RADIOBOOLEAN;
    554776    $arrParam["elementor_condition"] = array($name . "_enable" => "true");
    555     $arrParam["description"] = __("Enable manual fields mapping by roles", "unlimited-elements-for-elementor");
     777    $arrParam["description"] = __("Enable manual fields mapping by roles. The post related fields are relevant only if the content from posts", "unlimited-elements-for-elementor");
    556778   
    557779    $objSettings->addRadioBoolean(
     
    567789    // ---- Build field options: only textfield, textarea, editor ----
    568790   
     791    $arrExtraFieldOptions = array();
     792    $arrExtraFieldOptions["nothing"] = __("[Select Content]", "unlimited-elements-for-elementor");
     793    $arrExtraFieldOptions["meta"] = __("Post Meta Field", "unlimited-elements-for-elementor");
     794    $arrExtraFieldOptions["term"] = __("Post Term", "unlimited-elements-for-elementor");
     795   
     796   
    569797    $arrFieldOptions = array();
    570798    $arrFieldOptions[self::ROLE_AUTO] = __("[Auto Detect]", "unlimited-elements-for-elementor");
     
    577805        $arrFieldOptions['content'] = __("Post Content", "unlimited-elements-for-elementor");
    578806       
    579        // $arrFieldOptions['post_meta'] = __("Post Meta Field", "unlimited-elements-for-elementor");       
    580807    }else{
    581808       
     
    599826            $arrFieldOptions[$paramName] = $paramTitle;
    600827        }
    601        
    602828    }   
    603829   
     830    //add extra field option. meta or term
     831   
     832    $arrFieldOptions['meta'] = __("Post Meta Field", "unlimited-elements-for-elementor");
     833    $arrFieldOptions['term'] = __("Post Term", "unlimited-elements-for-elementor");
     834   
     835   
    604836    // ---- Flip options: label => value ----
    605837   
    606838    $arrFieldOptions = array_flip($arrFieldOptions);
     839   
     840    $arrExtraFieldOptions = array_flip($arrExtraFieldOptions);
     841   
    607842   
    608843    // ---- Define roles (only text/content roles) ----
     
    613848        self::ROLE_HEADING => __("Heading Field", "unlimited-elements-for-elementor"),
    614849        self::ROLE_CONTENT => __("Content Field", "unlimited-elements-for-elementor"),
     850        self::ROLE_EXTRA_FIELD1 => __("Extra Field 1", "unlimited-elements-for-elementor"),
     851        self::ROLE_EXTRA_FIELD2 => __("Extra Field 2", "unlimited-elements-for-elementor"),
     852        self::ROLE_EXTRA_FIELD3 => __("Extra Field 3", "unlimited-elements-for-elementor"),
     853        self::ROLE_EXTRA_FIELD4 => __("Extra Field 4", "unlimited-elements-for-elementor")
    615854    );
    616 
     855   
     856   
    617857    // ---- Add a select control for each text/content role ----
    618858    foreach ($arrRoles as $roleKey => $roleLabel) {
     
    624864            "{$name}_enable_mapping" => "true"
    625865        );
    626 
     866       
     867        $arrOptions = $arrFieldOptions;
     868        $defaultValue = self::ROLE_AUTO;
     869       
     870        $isExtraField = (strpos($roleKey, "field") !== false);
     871       
     872        if($isExtraField == true){
     873            $arrOptions = $arrExtraFieldOptions;
     874            $defaultValue = "nothing";
     875        }   
     876       
    627877        $objSettings->addSelect(
    628878            "{$name}_fieldmap_{$roleKey}",
    629             $arrFieldOptions,   //options
     879            $arrOptions,    //options
    630880            $roleLabel,     //label
    631             self::ROLE_AUTO,        //default
     881            $defaultValue,      //default
    632882            $arrParam
    633883        );
     884       
     885       
     886        //add meta and term field name
     887                   
     888        $arrParam = array();
     889        $arrParam["origtype"] = UniteCreatorDialogParam::PARAM_TEXTFIELD;
     890        $arrParam["description"] = "Meta Field name or Term Taxonomy name";
     891         
     892        $arrParam["elementor_condition"] = array(
     893            $name . "_enable" => "true",
     894            "{$name}_enable_mapping" => "true",
     895            "{$name}_fieldmap_{$roleKey}"=>array("meta","term")
     896        );
     897       
     898        $objSettings->addTextBox("{$name}_extrafieldkey_{$roleKey}", "", esc_html__("Field Name", "unlimited-elements-for-elementor"),$arrParam);
     899               
     900       
    634901    }
    635902}
     
    670937            $arrParam["elementor_condition"] = array($name."_enable"=>"true",$name."_selection"=>"custom");
    671938           
     939            $descripiton = __("Paste any JSON schema from ","unlimited-elements-for-elementor");
     940            $descripiton .= "<a href='https://schema.org/Person' target='_blank'>schema.org</a>";
     941            $descripiton .= __(" site","unlimited-elements-for-elementor");
     942           
     943            $descripiton .= __("<br>Posible Placeholders Are: %title%, %description%, %heading%, %link%, %content%, %image%, %field1%, %field2%, %field3%, %field4% ","unlimited-elements-for-elementor");
     944           
     945            $arrParam["description"] = $descripiton;
     946           
    672947            $objSettings->addTextArea($name."_custom", "", __("Custom JSON Schema","unlimited-elements-for-elementor") , $arrParam);
    673        
    674         }
     948           
     949        }
     950       
    675951       
    676952        //------- schema types
     
    707983        $arrParam["elementor_condition"] = array($name."_enable"=>"true",$name."_type"=>
    708984            array("howto",
    709                   "recepy",
    710                   "faq",
     985                  "recipe",
     986                  "faqpage",
    711987                  "itemlist",
    712988                  "eventseries",
     
    714990                  "searchresultspage"));
    715991       
    716         $arrParam["decsription"] = __('Use to describe the action, like how to tie a shoes',"unlimited-elements-for-elementor");
     992        $arrParam["description"] = __('Use to describe the action, like how to tie a shoes',"unlimited-elements-for-elementor");
    717993        $arrParam["label_block"] = true;
    718994       
     
    7461022       
    7471023       
    748         //------- debug
     1024        //------- debug ------
    7491025       
    7501026        $arrParam = array();
     
    7571033        $objSettings->addRadioBoolean($name."_debug", $title, false, "Yes","No", $arrParam);
    7581034       
     1035        //------- debug ------
     1036       
     1037        $arrParam = array();
     1038        $arrParam["origtype"] = UniteCreatorDialogParam::PARAM_STATIC_TEXT;
     1039        $arrParam["elementor_condition"] = array($name."_enable"=>"true");
     1040       
     1041        $text = __('To show post meta fields and terms turn on debug option in Advanced Section',"unlimited-elements-for-elementor");
     1042       
     1043        $objSettings->addStaticText($text, $name."_debug_meta_text", $arrParam);
     1044       
    7591045    }
    7601046   
     
    7981084        dmp("Schema Output Debug: $schemaType");
    7991085       
    800         dmp("The Fields Mapping");
     1086        dmp("The Fields Mapping and Content");
    8011087       
    8021088        HelperHtmlUC::putHtmlDataDebugBox($this->debugFields);
     
    8101096    private function a____________SCHEMAS________(){}
    8111097
     1098
     1099    /**
     1100     * Clean only selected keys from schema array.
     1101     *
     1102     * @param mixed $data
     1103     * @param array $keysToClean  Keys that should be removed when empty.
     1104     * @return mixed
     1105     */
     1106    private function cleanSchemaArray($data, $keysToClean = array()) {
     1107   
     1108        // If not array – return as is
     1109        if (!is_array($data)) {
     1110            return $data;
     1111        }
     1112   
     1113        $clean = array();
     1114   
     1115        foreach ($data as $key => $value) {
     1116   
     1117            // --- Nested array ---
     1118            if (is_array($value)) {
     1119   
     1120                // Clean recursively
     1121                $value = $this->cleanSchemaArray($value, $keysToClean);
     1122   
     1123                // If the key is one of the "to clean" keys AND empty – skip it
     1124                if (in_array($key, $keysToClean, true) && empty($value)) {
     1125                    continue;
     1126                }
     1127   
     1128                $clean[$key] = $value;
     1129                continue;
     1130            }
     1131   
     1132            // Normalize scalar values
     1133            if (is_string($value)) {
     1134                $value = trim($value);
     1135            }
     1136   
     1137            // --- Clean only selected keys ---
     1138            if (in_array($key, $keysToClean, true)) {
     1139   
     1140                // Remove ONLY if empty (empty string or null)
     1141                if ($value === '' || $value === null) {
     1142                    continue;
     1143                }
     1144            }
     1145   
     1146            // Keep ZERO, false, numeric values
     1147            $clean[$key] = $value;
     1148        }
     1149   
     1150        return $clean;
     1151    }
     1152   
     1153
     1154    /**
     1155     * normalize custom schema template, remove the tags
     1156     * in case that the user pasted the "script" tag around json
     1157     */
     1158    private function normalizeCustomSchemaTemplate($strJsonSchema){
     1159       
     1160        $strJsonSchema = trim($strJsonSchema);
     1161       
     1162        $strJsonSchema = strip_tags($strJsonSchema,"script");
     1163       
     1164        return($strJsonSchema);
     1165    }
     1166   
    8121167    /**
    8131168     * get all schemas items content
     
    8211176           
    8221177        $arrItemsContent = array();
    823                
     1178       
    8241179        foreach($arrAddonsData as $addonData){
    8251180           
     
    8281183            $settings = UniteFunctionsUC::getVal($addonData, "settings");
    8291184           
     1185           
    8301186            //field quessing
    8311187            $arrFieldsByRoles = $this->getFieldsByRolesFinal($params, $settings);
     
    8331189            $schemaContent = null;
    8341190            if($schemaType == "custom"){
     1191               
    8351192                $schemaContent = UniteFunctionsUC::getVal($settings, "custom");
     1193               
     1194                $schemaContent = $this->normalizeCustomSchemaTemplate($schemaContent);
    8361195            }
    837                
     1196
     1197            $itemType = UniteFunctionsUC::getVal($settings, "item_type");
    8381198           
    8391199            //add debug
    8401200           
     1201            $arrDebug = array();
     1202           
    8411203            if(self::$showDebug == true){
    8421204               
    8431205                $arrParamsAssoc = UniteFunctionsUC::arrayToAssoc($params, "name", "type");
    8441206               
    845                 $this->debugFields[$schemaType][] = array("params"=>$arrParamsAssoc,"fieldsbyroles"=>$arrFieldsByRoles);
     1207                $arrDebug = array("params"=>$arrParamsAssoc,"fieldsbyroles"=>$arrFieldsByRoles);
     1208                               
    8461209            }
    8471210           
     1211            $arrDebugContent = array();
     1212           
    8481213            foreach($items as $item){
    8491214               
    850                 $arrContent = $this->getItemSchemaContent($item, $arrFieldsByRoles);
     1215                $arrContent = $this->getItemSchemaContent($item, $arrFieldsByRoles, $itemType);
     1216               
     1217                if(self::$showDebug == true)
     1218                    $arrDebugContent[] = $arrContent;
    8511219               
    8521220                if(!empty($schemaContent))
     
    8551223                $arrItemsContent[] = $arrContent;
    8561224            }
    857         }
    858        
     1225           
     1226            //---- show debug
     1227           
     1228            if(self::$showDebug == true){
     1229                               
     1230                $arrDebug["items_content"] = $arrDebugContent;
     1231               
     1232                $this->debugFields[$schemaType][] = $arrDebug;
     1233            }
     1234           
     1235        }
    8591236       
    8601237       
     
    8791256            case "course":
    8801257                return $this->schemaCourse($items);
     1258            case "recipe":
     1259                return $this->schemaRecipe($items);
    8811260            case "book":
    8821261                return $this->schemaBook($items);
     
    9081287            break;
    9091288            default:
    910             case "faq":
     1289            case "faqpage":
    9111290                return $this->schemaFaq($items, $title);
    9121291        }
     
    9141293}
    9151294
     1295    private function a____________CUSTOM_SCHEMA________(){}
     1296   
     1297   
     1298    /**
     1299     * replace placeholders in the value string
     1300     */
     1301    private function replacePlaceholders_values($value, $item){
     1302       
     1303        if(is_string($value) == false)
     1304            return($value);
     1305                   
     1306        //check for %something%
     1307        if (preg_match('/%[a-zA-Z0-9_]+%/', $value) == false)
     1308            return($value);
     1309       
     1310        $arrRoles = $this->getArrRolesKeys();
     1311               
     1312        foreach($arrRoles as $role){
     1313           
     1314            $content = UniteFunctionsUC::getVal($item, $role);
     1315           
     1316            $value = str_replace("%{$role}%", $content, $value);
     1317        }
     1318       
     1319        //check error, if found some unknown placeholder:
     1320        if (preg_match('/%[a-zA-Z0-9_]+%/', $value) == true){
     1321           
     1322            if(HelperUC::isRunCodeOnce("uc_schema_replace_placeholders") == true){
     1323               
     1324                $message = "Custom Schema Error: Unknown Placeholder: ".$value." Please change for a known placeholder from the list.";
     1325               
     1326                $htmlError = HelperHtmlUC::getErrorMessageHtml($message,"",true);
     1327                dmp($htmlError);
     1328               
     1329            }
     1330           
     1331        }
     1332       
     1333       
     1334        return($value);     
     1335    }
     1336   
     1337   
     1338    /**
     1339     * replace placeholders
     1340     */
     1341    private function replacePlaceholders($arrSchema, $item){
     1342       
     1343        if(empty($arrSchema))
     1344            return($arrSchema);
     1345       
     1346        foreach ($arrSchema as $key => $value){
     1347           
     1348            if (is_array($value))
     1349                $value = $this->replacePlaceholders($value, $item);
     1350             else {
     1351                $value = $this->replacePlaceholders_values($value, $item);
     1352             }
     1353             
     1354             $arrSchema[$key] = $value;
     1355             
     1356        }
     1357       
     1358       
     1359        return($arrSchema);
     1360    }
     1361   
     1362   
     1363    /**
     1364     * put schema custom item
     1365     */
     1366    private function schemaCustomItem($item){
     1367       
     1368        $schemaJson = UniteFunctionsUC::getVal($item, "schema_custom_json");
     1369       
     1370        $this->lastCustomSchema = $schemaJson;
     1371       
     1372        if(empty($schemaJson))
     1373            return($schemaJson);
     1374       
     1375        try{
     1376           
     1377            $arrSchema = UniteFunctionsUC::jsonDecodeValidate($schemaJson);
     1378           
     1379            $arrSchema = $this->replacePlaceholders($arrSchema, $item);
     1380           
     1381        }catch(Exception $e){
     1382           
     1383            if(self::$showJsonErrorOnce == true)
     1384                return(array());
     1385           
     1386            self::$showJsonErrorOnce = true;
     1387           
     1388            $message = $e->getMessage();
     1389           
     1390            $message = "Schema JSON Decode Error: <b> $message </b> in schema: ";
     1391           
     1392            $htmlError = HelperHtmlUC::getErrorMessageHtml($message,"",true);
     1393           
     1394            dmp($htmlError);
     1395            dmpHtml($schemaJson);
     1396           
     1397            $message2 = "You can copy paste this json into chat gpt, and it will tell you where is the error";
     1398            $htmlError = HelperHtmlUC::getErrorMessageHtml($message2,"",true);
     1399           
     1400            dmp($htmlError);
     1401           
     1402            return(array());
     1403        }
     1404       
     1405        return($arrSchema);
     1406    }
     1407   
     1408   
     1409   
     1410    /**
     1411     * custom schema
     1412     */
     1413    private function schemaCustom($items, $title){
     1414       
     1415        $arrSchema = array();
     1416       
     1417        foreach($items as $item){
     1418           
     1419            $arrSchemaItem = $this->schemaCustomItem($item);
     1420           
     1421            $arrSchema[] = $arrSchemaItem;
     1422        }
     1423       
     1424        return($arrSchema);
     1425    }
     1426   
     1427   
    9161428    private function a____________SCHEMA_FUNCTIONS________(){}
    917 
    918 /**
    919  * custom schema
    920  */
    921 private function schemaCustom($items, $title){
    922    
    923    
    924     dmp("put custom schema");
    925     dmp($items);
    926     exit();
    927    
    928 }
    929    
     1429   
     1430   
     1431
    9301432/**
    9311433 * FAQ
     
    9931495
    9941496/**
    995  * Recepy
     1497 * Recipe
    9961498 */
    997 private function schemaRecepy($items, $title = "") {
     1499private function schemaRecipe($items, $title = "") {
    9981500   
    9991501    $schema = array(
     
    10051507        $schema['name'] = $title;
    10061508   
    1007     $schema['step'] = array();
     1509    $schema['recipeInstructions'] = array();
     1510   
    10081511    foreach ($items as $item) {
    10091512       
     
    10351538    );
    10361539    if (!empty($title)) $schema['name'] = $title;
    1037 
     1540   
    10381541    $schema['itemListElement'] = array();
     1542    $position = 1;
     1543    foreach ($items as $item) {
     1544       
     1545        $listItem = array(
     1546            '@type'    => 'ListItem',
     1547            'position' => $position++,
     1548            'item' => array(
     1549                'name' => $item[self::ROLE_TITLE],
     1550                'url'  => $item[self::ROLE_LINK]
     1551            )
     1552        );
     1553       
     1554        if (!empty($item[self::ROLE_IMAGE])) {
     1555            $listItem['item']['image'] = $item[self::ROLE_IMAGE];
     1556        }
     1557       
     1558        $schema['itemListElement'][] = $listItem;
     1559               
     1560    }
     1561    return $schema;
     1562}
     1563
     1564/**
     1565 * SearchResultsPage
     1566 */
     1567private function schemaSearchResultsPage($items, $title = "") {
     1568    $schema = array(
     1569        '@context' => self::SCHEMA_ORG_SITE,
     1570        '@type' => 'SearchResultsPage',
     1571    );
     1572    if (!empty($title)) $schema['name'] = $title;
     1573
     1574    $schema['mainEntity'] = array(
     1575        '@type' => 'ItemList',
     1576        'itemListElement' => array(),
     1577    );
     1578
    10391579    $position = 1;
    10401580    foreach ($items as $item) {
     
    10491589            $listItem['image'] = $item[self::ROLE_IMAGE];
    10501590        }
    1051         $schema['itemListElement'][] = $listItem;
    1052                
    1053     }
    1054     return $schema;
    1055 }
    1056 
    1057 /**
    1058  * SearchResultsPage
    1059  */
    1060 private function schemaSearchResultsPage($items, $title = "") {
    1061     $schema = array(
    1062         '@context' => self::SCHEMA_ORG_SITE,
    1063         '@type' => 'SearchResultsPage',
    1064     );
    1065     if (!empty($title)) $schema['name'] = $title;
    1066 
    1067     $schema['mainEntity'] = array(
    1068         '@type' => 'ItemList',
    1069         'itemListElement' => array(),
    1070     );
    1071 
    1072     $position = 1;
    1073     foreach ($items as $item) {
    1074        
    1075         $listItem = array(
    1076             '@type'    => 'ListItem',
    1077             'position' => $position++,
    1078             'name'     => $item[self::ROLE_TITLE],
    1079             'url'      => $item[self::ROLE_LINK],
    1080         );
    1081         if (!empty($item[self::ROLE_IMAGE])) {
    1082             $listItem['image'] = $item[self::ROLE_IMAGE];
    1083         }
    10841591        $schema['mainEntity']['itemListElement'][] = $listItem;       
    10851592       
     
    10901597
    10911598/**
    1092  * Person
     1599 * Person Schema
    10931600 */
    10941601private function schemaPerson($items) {
     1602
    10951603    $schema = array();
     1604
    10961605    foreach ($items as $item) {
    1097         $schema[] = array(
    1098             '@context' => self::SCHEMA_ORG_SITE,
    1099             '@type' => 'Person',
    1100             'name' => $item[self::ROLE_TITLE],
    1101             'jobTitle' => $item[self::ROLE_HEADING],
    1102             'description' => $item[self::ROLE_DESCRIPTION],
    1103             'image' => $item[self::ROLE_IMAGE],
    1104             'sameAs' => $item[self::ROLE_LINK],
     1606
     1607        $person = array(
     1608            '@context'     => self::SCHEMA_ORG_SITE,
     1609            '@type'        => 'Person',
     1610            'name'         => $item[self::ROLE_TITLE],
    11051611        );
     1612
     1613        // Optional fields added only if not empty
     1614        if (!empty($item[self::ROLE_HEADING])) {
     1615            $person['jobTitle'] = $item[self::ROLE_HEADING];
     1616        }
     1617
     1618        if (!empty($item[self::ROLE_DESCRIPTION])) {
     1619            $person['description'] = $item[self::ROLE_DESCRIPTION];
     1620        }
     1621
     1622        if (!empty($item[self::ROLE_IMAGE])) {
     1623            $person['image'] = $item[self::ROLE_IMAGE];
     1624        }
     1625
     1626        if (!empty($item[self::ROLE_LINK])) {
     1627            $person['sameAs'] = array($item[self::ROLE_LINK]); // must be array
     1628        }
     1629
     1630        $schema[] = $person;
    11061631    }
     1632
    11071633    return $schema;
    11081634}
     1635
    11091636
    11101637/**
     
    11121639 */
    11131640private function schemaCourse($items) {
    1114    
    1115     $schema = array();
    1116    
     1641
     1642    $schema = array();
     1643
    11171644    foreach ($items as $item) {
    1118        
    1119         $course = array(
     1645
     1646        $course = array(
    11201647            '@context'    => self::SCHEMA_ORG_SITE,
    11211648            '@type'       => 'Course',
    11221649            'name'        => $item[self::ROLE_TITLE],
    1123             'description' => $item[self::ROLE_DESCRIPTION],
    1124             'provider'    => array(
    1125                 '@type'  => 'Organization',
    1126                 'name'   => $item[self::ROLE_HEADING],
    1127                 'sameAs' => $item[self::ROLE_LINK],
    1128             ),
    11291650        );
     1651
     1652        // optional: description
     1653        if (!empty($item[self::ROLE_DESCRIPTION])) {
     1654            $course['description'] = $item[self::ROLE_DESCRIPTION];
     1655        }
     1656
     1657        // Build provider only if needed
     1658        $provider = array(
     1659            '@type' => 'Organization'
     1660        );
     1661
     1662        $hasProvider = false;
     1663
     1664        if (!empty($item[self::ROLE_HEADING])) {
     1665            $provider['name'] = $item[self::ROLE_HEADING];
     1666            $hasProvider = true;
     1667        }
     1668
     1669        if (!empty($item[self::ROLE_LINK])) {
     1670            $provider['sameAs'] = array($item[self::ROLE_LINK]); // must be array
     1671            $hasProvider = true;
     1672        }
     1673
     1674        if ($hasProvider) {
     1675            $course['provider'] = $provider;
     1676        }
     1677
     1678        // Optional image
    11301679        if (!empty($item[self::ROLE_IMAGE])) {
    11311680            $course['image'] = $item[self::ROLE_IMAGE];
    11321681        }
    1133        
     1682
     1683        $schema[] = $course;
    11341684    }
    1135    
     1685
    11361686    return $schema;
    11371687}
     1688
    11381689
    11391690
     
    11421693 */
    11431694private function schemaBook($items) {
    1144    
    1145     $schema = array();
    1146    
     1695
     1696    $schema = array();
     1697
    11471698    foreach ($items as $item) {
    1148        
    1149         $course = array(
    1150             '@context'    => self::SCHEMA_ORG_SITE,
    1151             '@type'       => 'Book',
    1152             'name'        => $item[self::ROLE_TITLE],
    1153             'description' => $item[self::ROLE_DESCRIPTION],
    1154             'provider'    => array(
    1155                 '@type'  => 'Person',
    1156                 'name'   => $item[self::ROLE_HEADING],
    1157                 'sameAs' => $item[self::ROLE_LINK],
    1158             ),
     1699
     1700        $book = array(
     1701            '@context' => self::SCHEMA_ORG_SITE,
     1702            '@type'    => 'Book',
     1703            'name'     => $item[self::ROLE_TITLE],
    11591704        );
    1160        
     1705
     1706        // Optional: Description
     1707        if (!empty($item[self::ROLE_DESCRIPTION])) {
     1708            $book['description'] = $item[self::ROLE_DESCRIPTION];
     1709        }
     1710
     1711        // Optional: Image
    11611712        if (!empty($item[self::ROLE_IMAGE])) {
    1162             $course['image'] = $item[self::ROLE_IMAGE];
    1163         }
    1164        
     1713            $book['image'] = $item[self::ROLE_IMAGE];
     1714        }
     1715
     1716        // Optional: URL
     1717        if (!empty($item[self::ROLE_LINK])) {
     1718            $book['url'] = $item[self::ROLE_LINK];
     1719            $book['sameAs'] = array($item[self::ROLE_LINK]);
     1720        }
     1721
     1722        // Optional: Author (use heading field as author name)
     1723        if (!empty($item[self::ROLE_HEADING])) {
     1724            $book['author'] = array(
     1725                '@type' => 'Person',
     1726                'name'  => $item[self::ROLE_HEADING]
     1727            );
     1728        }
     1729
     1730        $schema[] = $book;
    11651731    }
    1166    
     1732
    11671733    return $schema;
    11681734}
    11691735
    11701736
    1171 /**
    1172  * Event
    1173  */
    1174 private function schemaEvent($items) {
    1175     $schema = array();
    1176     foreach ($items as $item) {
    1177         $schema[] = array(
    1178             '@context' => self::SCHEMA_ORG_SITE,
    1179             '@type' => 'Event',
    1180             'name' => $item[self::ROLE_TITLE],
    1181             'description' => $item[self::ROLE_DESCRIPTION],
    1182             'image' => $item[self::ROLE_IMAGE],
    1183             'url' => $item[self::ROLE_LINK],
    1184         );
    1185     }
    1186     return $schema;
    1187 }
    1188 
     1737    /**
     1738     * Event
     1739     */
     1740    private function schemaEvent($items) {
     1741        $schema = array();
     1742        foreach ($items as $item) {
     1743            $schema[] = array(
     1744                '@context' => self::SCHEMA_ORG_SITE,
     1745                '@type' => 'Event',
     1746                'name' => $item[self::ROLE_TITLE],
     1747                'description' => $item[self::ROLE_DESCRIPTION],
     1748                'image' => $item[self::ROLE_IMAGE],
     1749                'url' => $item[self::ROLE_LINK],
     1750            );
     1751        }
     1752        return $schema;
     1753    }
     1754
     1755   
    11891756/**
    11901757 * EventSeries
    11911758 */
    11921759private function schemaEventSeries($items) {
     1760
    11931761    $schema = array();
     1762
    11941763    foreach ($items as $item) {
    1195         $schema[] = array(
     1764
     1765        $eventSeries = array(
    11961766            '@context' => self::SCHEMA_ORG_SITE,
    1197             '@type' => 'EventSeries',
    1198             'name' => $item[self::ROLE_TITLE],
    1199             'description' => $item[self::ROLE_DESCRIPTION],
    1200             'image' => $item[self::ROLE_IMAGE],
    1201             'sameAs' => $item[self::ROLE_LINK],
     1767            '@type'    => 'EventSeries',
     1768            'name'     => $item[self::ROLE_TITLE],
    12021769        );
     1770
     1771        // Optional: description
     1772        if (!empty($item[self::ROLE_DESCRIPTION])) {
     1773            $eventSeries['description'] = $item[self::ROLE_DESCRIPTION];
     1774        }
     1775
     1776        // Optional: image
     1777        if (!empty($item[self::ROLE_IMAGE])) {
     1778            $eventSeries['image'] = $item[self::ROLE_IMAGE];
     1779        }
     1780
     1781        // Optional: sameAs (must be an array)
     1782        if (!empty($item[self::ROLE_LINK])) {
     1783            $eventSeries['sameAs'] = array($item[self::ROLE_LINK]);
     1784        }
     1785
     1786        $schema[] = $eventSeries;
    12031787    }
     1788
    12041789    return $schema;
    12051790}
     
    12291814 */
    12301815private function schemaPlace($items) {
     1816
    12311817    $schema = array();
     1818
    12321819    foreach ($items as $item) {
    1233         $schema[] = array(
     1820
     1821        $place = array(
    12341822            '@context' => self::SCHEMA_ORG_SITE,
    1235             '@type' => 'Place',
    1236             'name' => $item[self::ROLE_TITLE],
    1237             'description' => $item[self::ROLE_DESCRIPTION],
    1238             'image' => $item[self::ROLE_IMAGE],
    1239             'sameAs' => $item[self::ROLE_LINK],
     1823            '@type'    => 'Place',
     1824            'name'     => $item[self::ROLE_TITLE],
    12401825        );
     1826
     1827        // optional: description
     1828        if (!empty($item[self::ROLE_DESCRIPTION])) {
     1829            $place['description'] = $item[self::ROLE_DESCRIPTION];
     1830        }
     1831
     1832        // optional: image
     1833        if (!empty($item[self::ROLE_IMAGE])) {
     1834            $place['image'] = $item[self::ROLE_IMAGE];
     1835        }
     1836
     1837        // optional: url / sameAs
     1838        if (!empty($item[self::ROLE_LINK])) {
     1839            $place['url'] = $item[self::ROLE_LINK];
     1840            $place['sameAs'] = array($item[self::ROLE_LINK]);
     1841        }
     1842
     1843        $schema[] = $place;
    12411844    }
     1845
    12421846    return $schema;
    12431847}
     
    12481852 */
    12491853private function schemaProduct($items) {
     1854
    12501855    $schema = array();
     1856
    12511857    foreach ($items as $item) {
    1252         $schema[] = array(
     1858
     1859        $product = array(
    12531860            '@context' => self::SCHEMA_ORG_SITE,
    1254             '@type' => 'Product',
    1255             'name' => $item[self::ROLE_TITLE],
    1256             'description' => $item[self::ROLE_DESCRIPTION],
    1257             'image' => $item[self::ROLE_IMAGE],
    1258             'sameAs' => $item[self::ROLE_LINK],
     1861            '@type'    => 'Product',
     1862            'name'     => $item[self::ROLE_TITLE],
    12591863        );
     1864
     1865        // Optional: description
     1866        if (!empty($item[self::ROLE_DESCRIPTION])) {
     1867            $product['description'] = $item[self::ROLE_DESCRIPTION];
     1868        }
     1869
     1870        // Optional: image
     1871        if (!empty($item[self::ROLE_IMAGE])) {
     1872            $product['image'] = $item[self::ROLE_IMAGE];
     1873        }
     1874
     1875        // Optional: main URL + sameAs
     1876        if (!empty($item[self::ROLE_LINK])) {
     1877            $product['url']    = $item[self::ROLE_LINK];
     1878            $product['sameAs'] = array($item[self::ROLE_LINK]); // must be array for Google
     1879        }
     1880
     1881        $schema[] = $product;
    12601882    }
     1883
    12611884    return $schema;
    12621885}
     
    12671890 */
    12681891private function schemaTouristDestination($items) {
     1892
    12691893    $schema = array();
     1894
    12701895    foreach ($items as $item) {
    1271         $schema[] = array(
     1896
     1897        $dest = array(
    12721898            '@context' => self::SCHEMA_ORG_SITE,
    1273             '@type' => 'TouristDestination',
    1274             'name' => $item[self::ROLE_TITLE],
    1275             'description' => $item[self::ROLE_DESCRIPTION],
    1276             'image' => $item[self::ROLE_IMAGE],
    1277             'sameAs' => $item[self::ROLE_LINK],
     1899            '@type'    => 'TouristDestination',
     1900            'name'     => $item[self::ROLE_TITLE],
    12781901        );
     1902
     1903        // optional description
     1904        if (!empty($item[self::ROLE_DESCRIPTION])) {
     1905            $dest['description'] = $item[self::ROLE_DESCRIPTION];
     1906        }
     1907
     1908        // optional image
     1909        if (!empty($item[self::ROLE_IMAGE])) {
     1910            $dest['image'] = $item[self::ROLE_IMAGE];
     1911        }
     1912
     1913        // optional sameAs / link
     1914        if (!empty($item[self::ROLE_LINK])) {
     1915            $dest['sameAs'] = array($item[self::ROLE_LINK]);
     1916            $dest['url']    = $item[self::ROLE_LINK]; // recommended for Google
     1917        }
     1918
     1919        $schema[] = $dest;
    12791920    }
     1921
    12801922    return $schema;
    12811923}
    1282    
     1924
     1925
    12831926}
    12841927
  • unlimited-elements-for-elementor/trunk/includes.php

    r3397365 r3401883  
    1313
    1414if(!defined("UNLIMITED_ELEMENTS_VERSION"))
    15     define("UNLIMITED_ELEMENTS_VERSION", "1.5.152");
     15    define("UNLIMITED_ELEMENTS_VERSION", "2.0");
    1616
    1717//disable elementor support for debugging purposes. keep it commented
    1818//define("UE_DISABLE_ELEMENTOR_SUPPORT", true);
    1919
    20 
     20   
    2121$currentFile = __FILE__;
    2222$currentFolder = dirname($currentFile);
  • unlimited-elements-for-elementor/trunk/provider/core/unlimited_elements/globals.class.php

    r3397365 r3401883  
    4747   
    4848    public static $enableSchema = true; //enable the schema!
    49     public static $enableCustomSchema = false;  //enable the custom schema
     49    public static $enableCustomSchema = true;   //enable the custom schema
    5050   
    5151    public static $insideNotificationText = "<b>Black Friday Deal</b>! <br> Limited Time Offer for <b>Pro Version</b> <br> Best Deal Of The Year! <br> <a style='text-decoration:underline;' href='https://unlimited-elements.com/pricing/' target='_blank'>Get 50% Off Now</a> ";
  • unlimited-elements-for-elementor/trunk/provider/functions_wordpress.class.php

    r3397365 r3401883  
    890890            return(null);
    891891        }
    892 
     892       
     893        /**
     894         * get first post term name by taxonomy
     895         */
     896        public static function getPostTerm_firstTermName($postID, $taxName){
     897           
     898            if(empty($taxName))
     899                $taxName = "category";
     900           
     901            $arrTerms = wp_get_post_terms($postID, $taxName);
     902
     903            if(empty($arrTerms))
     904                return(null);
     905
     906            foreach($arrTerms as $term){
     907
     908                $slug = $term->name;
     909               
     910                return($slug);
     911            }
     912
     913            return("");
     914        }
     915       
     916       
    893917        /**
    894918         * get post terms title string
  • unlimited-elements-for-elementor/trunk/readme.txt

    r3397365 r3401883  
    947947
    948948== Changelog ==
     949
     950version 2.0: 2025-11-24 =
     951
     952Plugin Changes:
     953
     954* Feature: added schema options to posts and multisource widget types
     955* Feature: made options for ai visibility (the schema)
     956
     957Widgets Changes:
     958
     959* Feature: Background Switcher (Free) - Added Hover Blur Effect option, allowing a subtle blur to be applied when hovering over elements for enhanced visual interaction.
     960* Feature: Post Grid (Free) - Added Meta Data One, Two, Three, Four, and Five Typography Override options, allowing full control over the styling of each individual metadata field.
     961* Feature: Icon Bullets (Free) - Separated the Gap option into two independent controls: Column Gap and Row Gap, providing more precise spacing adjustments for grid layouts.
     962* Feature: Icon Bullets (Free) - Added Item Justify Content option, allowing greater control over horizontal alignment within each item.
     963* Fix: Justified Image Carousel (Pro) - Fixed issue where a hash name was incorrectly added to the URL after opening the lightbox, ensuring clean and consistent URL behavior.
     964* Fix: Animated Border Icon Box (Free) - Fixed issue where the full-box link was not functioning correctly on hover, ensuring the entire item remains fully clickable as intended.
     965* Fix: Content Accordion (Free) - Increased the priority of the Heading Text Typography option, ensuring it can successfully override conflicting CSS rules applied by various themes.
     966* Fix: Fullscreen Menu (Free) - Rebuilt the option so the icon size now updates automatically in the editor, and adjusted the default styling to ensure the icon is vertically centered.
     967* Fix: Content Tabs (Free) - Removed outdated and unnecessary code that was preventing widgets from functioning correctly when their parent container was hidden using Elementor’s responsive visibility options.
    949968
    950969
  • unlimited-elements-for-elementor/trunk/release_log.txt

    r3397365 r3401883  
    11
     2
     3version 2.0:
     4
     5* Feature: added schema options to posts and multisource widget types
     6* Feature: made options for ai visibility (the schema)
    27
    38
Note: See TracChangeset for help on using the changeset viewer.