// source --> https://sieuthichamsocxe.com/wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart.min.js?ver=3.4.8 jQuery(function(e){if("undefined"==typeof wc_add_to_cart_params)return!1;var t=function(){e(document.body).on("click",".add_to_cart_button",this.onAddToCart).on("click",".remove_from_cart_button",this.onRemoveFromCart).on("added_to_cart",this.updateButton).on("added_to_cart",this.updateCartPage).on("added_to_cart removed_from_cart",this.updateFragments)};t.prototype.onAddToCart=function(t){var a=e(this);if(a.is(".ajax_add_to_cart")){if(!a.attr("data-product_id"))return!0;t.preventDefault(),a.removeClass("added"),a.addClass("loading");var o={};e.each(a.data(),function(t,a){o[t]=a}),e(document.body).trigger("adding_to_cart",[a,o]),e.post(wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","add_to_cart"),o,function(t){t&&(t.error&&t.product_url?window.location=t.product_url:"yes"!==wc_add_to_cart_params.cart_redirect_after_add?e(document.body).trigger("added_to_cart",[t.fragments,t.cart_hash,a]):window.location=wc_add_to_cart_params.cart_url)})}},t.prototype.onRemoveFromCart=function(t){var a=e(this),o=a.closest(".woocommerce-mini-cart-item");t.preventDefault(),o.block({message:null,overlayCSS:{opacity:.6}}),e.post(wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","remove_from_cart"),{cart_item_key:a.data("cart_item_key")},function(t){t&&t.fragments?e(document.body).trigger("removed_from_cart",[t.fragments,t.cart_hash]):window.location=a.attr("href")}).fail(function(){window.location=a.attr("href")})},t.prototype.updateButton=function(t,a,o,r){(r=void 0!==r&&r)&&(r.removeClass("loading"),r.addClass("added"),wc_add_to_cart_params.is_cart||0!==r.parent().find(".added_to_cart").length||r.after(' '+wc_add_to_cart_params.i18n_view_cart+""),e(document.body).trigger("wc_cart_button_updated",[r]))},t.prototype.updateCartPage=function(){var t=window.location.toString().replace("add-to-cart","added-to-cart");e(".shop_table.cart").load(t+" .shop_table.cart:eq(0) > *",function(){e(".shop_table.cart").stop(!0).css("opacity","1").unblock(),e(document.body).trigger("cart_page_refreshed")}),e(".cart_totals").load(t+" .cart_totals:eq(0) > *",function(){e(".cart_totals").stop(!0).css("opacity","1").unblock(),e(document.body).trigger("cart_totals_refreshed")})},t.prototype.updateFragments=function(t,a){a&&(e.each(a,function(t){e(t).addClass("updating").fadeTo("400","0.6").block({message:null,overlayCSS:{opacity:.6}})}),e.each(a,function(t,a){e(t).replaceWith(a),e(t).stop(!0).css("opacity","1").unblock()}),e(document.body).trigger("wc_fragments_loaded"))},new t}); // source --> https://sieuthichamsocxe.com/wp-content/plugins/js_composer/assets/js/vendors/woocommerce-add-to-cart.js?ver=5.5.2 window.jQuery( document ).ready( function ( $ ) { $( 'body' ).on( 'adding_to_cart', function ( event, $button, data ) { $button && $button.hasClass( 'vc_gitem-link' ) && $button .addClass( 'vc-gitem-add-to-cart-loading-btn' ) .parents( '.vc_grid-item-mini' ) .addClass( 'vc-woocommerce-add-to-cart-loading' ) .append( $( '
' ) ); } ).on( 'added_to_cart', function ( event, fragments, cart_hash, $button ) { if ( 'undefined' === typeof($button) ) { $button = $( '.vc-gitem-add-to-cart-loading-btn' ); } $button && $button.hasClass( 'vc_gitem-link' ) && $button .removeClass( 'vc-gitem-add-to-cart-loading-btn' ) .parents( '.vc_grid-item-mini' ) .removeClass( 'vc-woocommerce-add-to-cart-loading' ) .find( '.vc_wc-load-add-to-loader-wrapper' ).remove(); } ); } ); // source --> https://sieuthichamsocxe.com/wp-content/themes/noor/framework/asset/site/js/core/modernizr-custom.js?ver=2.8.4.1 /*! modernizr 3.5.0 (Custom Build) | MIT * * https://modernizr.com/download/?-csstransitions-forcetouch-mq !*/ !function(e,t,n){function r(e,t){return typeof e===t}function o(){var e,t,n,o,i,s,u;for(var a in g)if(g.hasOwnProperty(a)){if(e=[],t=g[a],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;np;p++)if(v=e[p],y=P.style[v],l(v,"-")&&(v=i(v)),P.style[v]!==n){if(u||r(o,"undefined"))return a(),"pfx"==t?v:!0;try{P.style[v]=o}catch(g){}if(P.style[v]!=y)return a(),"pfx"==t?v:!0}return a(),!1}function y(e,t,n,o,i){var s=e.charAt(0).toUpperCase()+e.slice(1),u=(e+" "+O.join(s+" ")+s).split(" ");return r(t,"string")||r(t,"undefined")?v(u,t,o,i):(u=(e+" "+z.join(s+" ")+s).split(" "),d(u,t,n))}function h(e,t,r){return y(e,n,n,t,r)}var g=[],C={_version:"3.5.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){g.push({name:e,fn:t,options:n})},addAsyncTest:function(e){g.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=C,Modernizr=new Modernizr;var _=[],S=t.documentElement,E="svg"===S.nodeName.toLowerCase(),w=function(){function e(e,t){var o;return e?(t&&"string"!=typeof t||(t=s(t||"div")),e="on"+e,o=e in t,!o&&r&&(t.setAttribute||(t=s("div")),t.setAttribute(e,""),o="function"==typeof t[e],t[e]!==n&&(t[e]=n),t.removeAttribute(e)),o):!1}var r=!("onblur"in t.documentElement);return e}();C.hasEvent=w;var x=function(){var t=e.matchMedia||e.msMatchMedia;return t?function(e){var n=t(e);return n&&n.matches||!1}:function(t){var n=!1;return a("@media "+t+" { #modernizr { position: absolute; } }",function(t){n="absolute"==(e.getComputedStyle?e.getComputedStyle(t,null):t.currentStyle).position}),n}}();C.mq=x;var b="Moz O ms Webkit",O=C._config.usePrefixes?b.split(" "):[];C._cssomPrefixes=O;var T=function(t){var r,o=prefixes.length,i=e.CSSRule;if("undefined"==typeof i)return n;if(!t)return!1;if(t=t.replace(/^@/,""),r=t.replace(/-/g,"_").toUpperCase()+"_RULE",r in i)return"@"+t;for(var s=0;o>s;s++){var u=prefixes[s],a=u.toUpperCase()+"_"+r;if(a in i)return"@-"+u.toLowerCase()+"-"+t}return!1};C.atRule=T;var z=C._config.usePrefixes?b.toLowerCase().split(" "):[];C._domPrefixes=z;var A={elem:s("modernizr")};Modernizr._q.push(function(){delete A.elem});var P={style:A.elem.style};Modernizr._q.unshift(function(){delete P.style}),C.testAllProps=y;var M=C.prefixed=function(e,t,n){return 0===e.indexOf("@")?T(e):(-1!=e.indexOf("-")&&(e=i(e)),t?y(e,t,n):y(e,"pfx"))};Modernizr.addTest("forcetouch",function(){return w(M("mouseforcewillbegin",e,!1),e)?MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN&&MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN:!1}),C.testAllProps=h,Modernizr.addTest("csstransitions",h("transition","all",!0)),o(),delete C.addTest,delete C.addAsyncTest;for(var N=0;N https://sieuthichamsocxe.com/wp-content/themes/noor/framework/asset/site/js/init-es6.js?ver=2.8.4.1 'use strict'; /*global window */ (function ($) { /*-------------VARIABLES--------------*/ var win = $(window); var doc = $(document); var body = $('body'); var windowWidth = win.width(); var nav = $(".dima-nav").outerHeight(); var windowHeight = win.height(); var isTouch = Modernizr.touch; var isTransitions = Modernizr.csstransitions; var adBlock = false; var html = jQuery('html'); /*!------------VARIABLES--------------*/ var ua = window.navigator.userAgent; var ie_version = void 0; var msie = ua.indexOf('MSIE '); if (msie > 0) { // IE 10 or older => return version number ie_version = parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10); $('html').addClass('dima-ie-detected ie-' + ie_version); } var trident = ua.indexOf('Trident/'); if (trident > 0) { // IE 11 => return version number var rv = ua.indexOf('rv:'); ie_version = parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10); $('html').addClass('dima-ie-detected ie-' + ie_version); } var edge = ua.indexOf('Edge/'); if (edge > 0) { // IE 12 => return version number ie_version = parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10); $('html').addClass('dima-ie-detected ie-' + ie_version); } function userAgentDetection() { var ua = navigator.userAgent.toLowerCase(); var platform = navigator.platform.toLowerCase(); var UA = ua.match(/(opera|ie|firefox|chrome|version)[\s\/:]([\w\d\.]+)?.*?(safari|version[\s\/:]([\w\d\.]+)|$)/) || [null, 'unknown', 0]; var mode = UA[1] == 'ie' && document.documentMode; window.gemBrowser = { name: UA[1] == 'version' ? UA[3] : UA[1], version: UA[2], platform: { name: ua.match(/ip(?:ad|od|hone)/) ? 'ios' : (ua.match(/(?:webos|android)/) || platform.match(/mac|win|linux/) || ['other'])[0] } }; } userAgentDetection(); /* BIG VIDEO*/ function getDivChildren(containerId, selector, fn) { if (containerId !== null) { var elements = containerId.querySelectorAll(selector); for (var i = 0; i < elements.length; i++) { fn(elements[i], i, elements.length); } } } function outerWidth(el, includeMargin) { var width = el.offsetWidth; if (includeMargin) { var style = el.currentStyle || getComputedStyle(el); width += parseInt(style.marginLeft) + parseInt(style.marginRight); } return width; } function outerHeight(el, includeMargin) { if (el != null) { var height = el.offsetHeight; if (includeMargin) { var style = el.currentStyle || getComputedStyle(el); height += parseInt(style.marginTop) + parseInt(style.marginBottom); } return height; } } // get the scrollbar width function getScrollBarWidth() { var outer = jQuery('
').css({ visibility: 'hidden', width: 100, overflow: 'scroll' }).appendTo('body'), widthHasScroll = jQuery('
').css({ width: '100%' }).appendTo(outer).outerWidth(); outer.remove(); return 100 - widthHasScroll; }; var initVideoComponent = function initVideoComponent(container, classTarget) { getDivChildren(container, classTarget, function (el, i) { var width = outerWidth(el); // player width, to be defined var pWidth = void 0; var height = outerHeight(el); // player height, tbd var pHeight = void 0; var $tubularPlayer = el.getElementsByTagName('iframe').length === 1 ? el.getElementsByTagName('iframe') : el.getElementsByTagName('video'); var ratio = el.getAttribute("data-ratio") !== null ? Number(el.getAttribute("data-ratio")) : null; var heightOffset = 80; var widthOffset = heightOffset * ratio; // when screen aspect ratio differs from video, video must center and underlay one dimension if ($tubularPlayer[0] !== undefined) { if (width / ratio < height) { // if new video height < window height (gap underneath) pWidth = Math.ceil((height + heightOffset) * ratio); // get new player width $tubularPlayer[0].style.width = pWidth + widthOffset + 'px'; $tubularPlayer[0].style.height = height + heightOffset + 'px'; //$tubularPlayer[0].style.left = `${((width - pWidth) / 2) - (widthOffset / 2)}px`; $tubularPlayer[0].style.top = '-' + heightOffset / 2 + 'px'; $tubularPlayer[0].style.position = 'absolute'; } else { // new video width < window width (gap to right) pHeight = Math.ceil(width / ratio); // get new player height $tubularPlayer[0].style.width = width + widthOffset + 'px'; $tubularPlayer[0].style.height = pHeight + heightOffset + 'px'; //$tubularPlayer[0].style.left = `-${widthOffset / 2}px`; $tubularPlayer[0].style.top = (height - pHeight) / 2 - heightOffset / 2 + 'px'; $tubularPlayer[0].style.position = 'absolute'; } } }); }; /* ! BIG VIDEO */ var PIXELDIMA = { doc: doc, body: body, isTouch: isTouch, isTransitions: isTransitions, windowWidth: windowWidth, windowHeight: windowHeight, win: win, initVideoComponent: initVideoComponent, getScrollBarWidth: getScrollBarWidth, adBlock: adBlock, html: html }; // transport if (typeof define === 'function' && define.amd) { // AMD define(PIXELDIMA); } else { // browser global window.PIXELDIMA = PIXELDIMA; } })(jQuery); //-------------------------- (function ($) { /* Plugin Name: scrollToTop for jQuery. */ $.extend({ scrollToTop: function scrollToTop() { var _isScrolling = false; var $id_top = $("#scrollToTop"); $id_top.click(function (e) { e.preventDefault(); $("body, html").velocity("scroll", { duration: 800, easing: "easeInBack" }); return false; }); // Show/Hide Button on Window Scroll event. $(window).scroll(function () { if (!_isScrolling) { _isScrolling = true; //noinspection JSValidateTypes if ($(window).scrollTop() > 150) { $id_top.stop(true, true).removeClass("off"); $id_top.stop(true, true).addClass("on"); _isScrolling = false; } else { $id_top.stop(true, true).removeClass("on"); $id_top.stop(true, true).addClass("off"); _isScrolling = false; } } }); } }); // http://www.cssnewbie.com/equalheights-jquery-plugin/ $.fn.equalHeights = function (options) { var settings = $.extend({ container: null }, options); var currentTallest = 0; var outerTallest = 0; var $this = $(this); $this.css({ 'height': 'auto', 'min-height': '0px' }).each(function () { var $el = $(this); if ($el.height() > currentTallest) { currentTallest = $el.height(); outerTallest = $el.outerHeight(); } }).css({ 'height': outerTallest, 'min-height': outerTallest }); if (settings.container !== null) { $this.parents(settings.container).css({ 'height': outerTallest, 'min-height': outerTallest }); } return this; }; })(jQuery); // source --> https://sieuthichamsocxe.com/wp-content/themes/noor/framework/asset/site/js/module/bootstrap.min.js?ver=2.8.4.1 /*! * Bootstrap v3.3.5 (http://getbootstrap.com) * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ /*! * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=5094de2ded8d4e43540a7d4eeaf5adb5) * Config saved to config.json and https://gist.github.com/5094de2ded8d4e43540a7d4eeaf5adb5 */ if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){"use strict";var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),n=i.data("bs.alert");n||i.data("bs.alert",n=new o(this)),"string"==typeof e&&n[e].call(i)})}var i='[data-dismiss="alert"]',o=function(e){t(e).on("click",i,this.close)};o.VERSION="3.3.6",o.TRANSITION_DURATION=150,o.prototype.close=function(e){function i(){r.detach().trigger("closed.bs.alert").remove()}var n=t(this),s=n.attr("data-target");s||(s=n.attr("href"),s=s&&s.replace(/.*(?=#[^\s]*$)/,""));var r=t(s);e&&e.preventDefault(),r.length||(r=n.closest(".alert")),r.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(r.removeClass("in"),t.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",i).emulateTransitionEnd(o.TRANSITION_DURATION):i())};var n=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=o,t.fn.alert.noConflict=function(){return t.fn.alert=n,this},t(document).on("click.bs.alert.data-api",i,o.prototype.close)}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.tooltip"),s="object"==typeof e&&e;(n||!/destroy|hide/.test(e))&&(n||o.data("bs.tooltip",n=new i(this,s)),"string"==typeof e&&n[e]())})}var i=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};i.VERSION="3.3.6",i.TRANSITION_DURATION=150,i.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},i.prototype.init=function(e,i,o){if(this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(o),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var n=this.options.trigger.split(" "),s=n.length;s--;){var r=n[s];if("click"==r)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=r){var a="hover"==r?"mouseenter":"focusin",l="hover"==r?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},i.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,o){i[t]!=o&&(e[t]=o)}),e},i.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusin"==e.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show())},i.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},i.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusout"==e.type?"focus":"hover"]=!1),i.isInStateTrue()?void 0:(clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide())},i.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var o=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!o)return;var n=this,s=this.tip(),r=this.getUID(this.type);this.setContent(),s.attr("id",r),this.$element.attr("aria-describedby",r),this.options.animation&&s.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,s[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,p=l.test(a);p&&(a=a.replace(l,"")||"top"),s.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?s.appendTo(this.options.container):s.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var h=this.getPosition(),c=s[0].offsetWidth,d=s[0].offsetHeight;if(p){var f=a,u=this.getPosition(this.$viewport);a="bottom"==a&&h.bottom+d>u.bottom?"top":"top"==a&&h.top-du.width?"left":"left"==a&&h.left-cr.top+r.height&&(n.top=r.top+r.height-l)}else{var p=e.left-s,h=e.left+s+i;pr.right&&(n.left=r.left+r.width-h)}return n},i.prototype.getTitle=function(){var t,e=this.$element,i=this.options;return t=e.attr("data-original-title")||("function"==typeof i.title?i.title.call(e[0]):i.title)},i.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},i.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},i.prototype.enable=function(){this.enabled=!0},i.prototype.disable=function(){this.enabled=!1},i.prototype.toggleEnabled=function(){this.enabled=!this.enabled},i.prototype.toggle=function(e){var i=this;e&&(i=t(e.currentTarget).data("bs."+this.type),i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),e?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)},i.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null})};var o=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=i,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=o,this}}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.popover"),s="object"==typeof e&&e;(n||!/destroy|hide/.test(e))&&(n||o.data("bs.popover",n=new i(this,s)),"string"==typeof e&&n[e]())})}var i=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");i.VERSION="3.3.6",i.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),i.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),i.prototype.constructor=i,i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof i?"html":"append":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},i.prototype.hasContent=function(){return this.getTitle()||this.getContent()},i.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var o=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=i,t.fn.popover.noConflict=function(){return t.fn.popover=o,this}}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.tab");n||o.data("bs.tab",n=new i(this)),"string"==typeof e&&n[e]()})}var i=function(e){this.element=t(e)};i.VERSION="3.3.6",i.TRANSITION_DURATION=150,i.prototype.show=function(){var e=this.element,i=e.closest("ul:not(.dropdown-menu)"),o=e.data("target");if(o||(o=e.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var n=i.find(".active:last a"),s=t.Event("hide.bs.tab",{relatedTarget:e[0]}),r=t.Event("show.bs.tab",{relatedTarget:n[0]});if(n.trigger(s),e.trigger(r),!r.isDefaultPrevented()&&!s.isDefaultPrevented()){var a=t(o);this.activate(e.closest("li"),i),this.activate(a,a.parent(),function(){n.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:n[0]})})}}},i.prototype.activate=function(e,o,n){function s(){r.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),n&&n()}var r=o.find("> .active"),a=n&&t.support.transition&&(r.length&&r.hasClass("fade")||!!o.find("> .fade").length);r.length&&a?r.one("bsTransitionEnd",s).emulateTransitionEnd(i.TRANSITION_DURATION):s(),r.removeClass("in")};var o=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=i,t.fn.tab.noConflict=function(){return t.fn.tab=o,this};var n=function(i){i.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',n).on("click.bs.tab.data-api",'[data-toggle="pill"]',n)}(jQuery),+function(t){"use strict";function e(e){var i,o=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(o)}function i(e){return this.each(function(){var i=t(this),n=i.data("bs.collapse"),s=t.extend({},o.DEFAULTS,i.data(),"object"==typeof e&&e);!n&&s.toggle&&/show|hide/.test(e)&&(s.toggle=!1),n||i.data("bs.collapse",n=new o(this,s)),"string"==typeof e&&n[e]()})}var o=function(e,i){this.$element=t(e),this.options=t.extend({},o.DEFAULTS,i),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};o.VERSION="3.3.6",o.TRANSITION_DURATION=350,o.DEFAULTS={toggle:!0},o.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},o.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,n=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(n&&n.length&&(e=n.data("bs.collapse"),e&&e.transitioning))){var s=t.Event("show.bs.collapse");if(this.$element.trigger(s),!s.isDefaultPrevented()){n&&n.length&&(i.call(n,"hide"),e||n.data("bs.collapse",null));var r=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[r](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[r](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",r].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(o.TRANSITION_DURATION)[r](this.$element[0][l])}}}},o.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var n=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[i](0).one("bsTransitionEnd",t.proxy(n,this)).emulateTransitionEnd(o.TRANSITION_DURATION):n.call(this)}}},o.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},o.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(i,o){var n=t(o);this.addAriaAndCollapsedClass(e(n),n)},this)).end()},o.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var n=t.fn.collapse;t.fn.collapse=i,t.fn.collapse.Constructor=o,t.fn.collapse.noConflict=function(){return t.fn.collapse=n,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(o){var n=t(this);n.attr("data-target")||o.preventDefault();var s=e(n),r=s.data("bs.collapse"),a=r?"toggle":n.data();i.call(s,a)})}(jQuery); // source --> https://sieuthichamsocxe.com/wp-content/themes/noor/framework/asset/site/js/module/bootstrap-transition.js?ver=2.8.4.1 /* ======================================================================== * Bootstrap: transition.js v3.2.0 * http://getbootstrap.com/javascript/#transitions * ======================================================================== * Copyright 2011-2014 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * ======================================================================== */ +function(e){"use strict";function t(){var e=document.createElement("bootstrap");var t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t){if(e.style[n]!==undefined){return{end:t[n]}}}return false}e.fn.emulateTransitionEnd=function(t){var n=false;var r=this;e(this).one("bsTransitionEnd",function(){n=true});var i=function(){if(!n)e(r).trigger(e.support.transition.end)};setTimeout(i,t);return this};e(function(){e.support.transition=t();if(!e.support.transition)return;e.event.special.bsTransitionEnd={bindType:e.support.transition.end,delegateType:e.support.transition.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}}})}(jQuery); // source --> https://sieuthichamsocxe.com/wp-content/themes/noor/framework/asset/site/js/module/countup.js?ver=2.8.4.1 (function(root, factory) { if (typeof define === 'function' && define.amd) { define(factory); } else if (typeof exports === 'object') { module.exports = factory(require, exports, module); } else { root.CountUp = factory(); } }(this, function(require, exports, module) { /* countUp.js by @inorganik */ // target = id of html element or var of previously selected html element where counting occurs // startVal = the value you want to begin at // endVal = the value you want to arrive at // decimals = number of decimal places, default 0 // duration = duration of animation in seconds, default 2 // options = optional object of options (see below) var CountUp = function(target, startVal, endVal, decimals, duration, options) { var self = this; self.version = function () { return '1.9.3'; }; // default options self.options = { useEasing: true, // toggle easing useGrouping: true, // 1,000,000 vs 1000000 separator: ',', // character to use as a separator decimal: '.', // character to use as a decimal easingFn: easeOutExpo, // optional custom easing function, default is Robert Penner's easeOutExpo formattingFn: formatNumber, // optional custom formatting function, default is formatNumber above prefix: '', // optional text before the result suffix: '', // optional text after the result numerals: [] // optionally pass an array of custom numerals for 0-9 }; // extend default options with passed options object if (options && typeof options === 'object') { for (var key in self.options) { if (options.hasOwnProperty(key) && options[key] !== null) { self.options[key] = options[key]; } } } if (self.options.separator === '') { self.options.useGrouping = false; } else { // ensure the separator is a string (formatNumber assumes this) self.options.separator = '' + self.options.separator; } // make sure requestAnimationFrame and cancelAnimationFrame are defined // polyfill for browsers without native support // by Opera engineer Erik Möller var lastTime = 0; var vendors = ['webkit', 'moz', 'ms', 'o']; for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame']; } if (!window.requestAnimationFrame) { window.requestAnimationFrame = function(callback, element) { var currTime = new Date().getTime(); var timeToCall = Math.max(0, 16 - (currTime - lastTime)); var id = window.setTimeout(function() { callback(currTime + timeToCall); }, timeToCall); lastTime = currTime + timeToCall; return id; }; } if (!window.cancelAnimationFrame) { window.cancelAnimationFrame = function(id) { clearTimeout(id); }; } function formatNumber(num) { var neg = (num < 0), x, x1, x2, x3, i, len; num = Math.abs(num).toFixed(self.decimals); num += ''; x = num.split('.'); x1 = x[0]; x2 = x.length > 1 ? self.options.decimal + x[1] : ''; if (self.options.useGrouping) { x3 = ''; for (i = 0, len = x1.length; i < len; ++i) { if (i !== 0 && ((i % 3) === 0)) { x3 = self.options.separator + x3; } x3 = x1[len - i - 1] + x3; } x1 = x3; } // optional numeral substitution if (self.options.numerals.length) { x1 = x1.replace(/[0-9]/g, function(w) { return self.options.numerals[+w]; }) x2 = x2.replace(/[0-9]/g, function(w) { return self.options.numerals[+w]; }) } return (neg ? '-' : '') + self.options.prefix + x1 + x2 + self.options.suffix; } // Robert Penner's easeOutExpo function easeOutExpo(t, b, c, d) { return c * (-Math.pow(2, -10 * t / d) + 1) * 1024 / 1023 + b; } function ensureNumber(n) { return (typeof n === 'number' && !isNaN(n)); } self.initialize = function() { if (self.initialized) return true; self.error = ''; self.d = (typeof target === 'string') ? document.getElementById(target) : target; if (!self.d) { self.error = '[CountUp] target is null or undefined' return false; } self.startVal = Number(startVal); self.endVal = Number(endVal); // error checks if (ensureNumber(self.startVal) && ensureNumber(self.endVal)) { self.decimals = Math.max(0, decimals || 0); self.dec = Math.pow(10, self.decimals); self.duration = Number(duration) * 1000 || 2000; self.countDown = (self.startVal > self.endVal); self.frameVal = self.startVal; self.initialized = true; return true; } else { self.error = '[CountUp] startVal ('+startVal+') or endVal ('+endVal+') is not a number'; return false; } }; // Print value to target self.printValue = function(value) { var result = self.options.formattingFn(value); if (self.d.tagName === 'INPUT') { this.d.value = result; } else if (self.d.tagName === 'text' || self.d.tagName === 'tspan') { this.d.textContent = result; } else { this.d.innerHTML = result; } }; self.count = function(timestamp) { if (!self.startTime) { self.startTime = timestamp; } self.timestamp = timestamp; var progress = timestamp - self.startTime; self.remaining = self.duration - progress; // to ease or not to ease if (self.options.useEasing) { if (self.countDown) { self.frameVal = self.startVal - self.options.easingFn(progress, 0, self.startVal - self.endVal, self.duration); } else { self.frameVal = self.options.easingFn(progress, self.startVal, self.endVal - self.startVal, self.duration); } } else { if (self.countDown) { self.frameVal = self.startVal - ((self.startVal - self.endVal) * (progress / self.duration)); } else { self.frameVal = self.startVal + (self.endVal - self.startVal) * (progress / self.duration); } } // don't go past endVal since progress can exceed duration in the last frame if (self.countDown) { self.frameVal = (self.frameVal < self.endVal) ? self.endVal : self.frameVal; } else { self.frameVal = (self.frameVal > self.endVal) ? self.endVal : self.frameVal; } // decimal self.frameVal = Math.round(self.frameVal*self.dec)/self.dec; // format and print value self.printValue(self.frameVal); // whether to continue if (progress < self.duration) { self.rAF = requestAnimationFrame(self.count); } else { if (self.callback) self.callback(); } }; // start your animation self.start = function(callback) { if (!self.initialize()) return; self.callback = callback; self.rAF = requestAnimationFrame(self.count); }; // toggles pause/resume animation self.pauseResume = function() { if (!self.paused) { self.paused = true; cancelAnimationFrame(self.rAF); } else { self.paused = false; delete self.startTime; self.duration = self.remaining; self.startVal = self.frameVal; requestAnimationFrame(self.count); } }; // reset to startVal so animation can be run again self.reset = function() { self.paused = false; delete self.startTime; self.initialized = false; if (self.initialize()) { cancelAnimationFrame(self.rAF); self.printValue(self.startVal); } }; // pass a new endVal and start animation self.update = function (newEndVal) { if (!self.initialize()) return; newEndVal = Number(newEndVal); if (!ensureNumber(newEndVal)) { self.error = '[CountUp] update() - new endVal is not a number: '+newEndVal; return; } self.error = ''; if (newEndVal === self.frameVal) return; cancelAnimationFrame(self.rAF); self.paused = false; delete self.startTime; self.startVal = self.frameVal; self.endVal = newEndVal; self.countDown = (self.startVal > self.endVal); self.rAF = requestAnimationFrame(self.count); }; // format startVal on initialization if (self.initialize()) self.printValue(self.startVal); }; return CountUp; })); // source --> https://sieuthichamsocxe.com/wp-content/themes/noor/framework/asset/site/js/module/dropkick.js?ver=2.8.4.1 /* * DropKick * * Highly customizable : ", sel); return false; } if ( sel.nodeName === "SELECT" ) { return this.init( sel, opts ); } }, noop = function() {}, _docListener, // DK default options defaults = { /** * Called once after the DK element is inserted into the DOM. * The value of `this` is the Dropkick object itself. * * @config initialize * @type Function * */ initialize: noop, /** * Whether or not you would like Dropkick to render on mobile devices. * * @default false * @property {boolean} mobile * @type boolean * */ mobile: false, /** * Called whenever the value of the Dropkick select changes (by user action or through the API). * The value of `this` is the Dropkick object itself. * * @config change * @type Function * */ change: noop, /** * Called whenever the Dropkick select is opened. The value of `this` is the Dropkick object itself. * * @config open * @type Function * */ open: noop, /** * Called whenever the Dropkick select is closed. The value of `this` is the Dropkick object itself. * * @config close * @type Function * */ close: noop, // Search method; "strict", "partial", or "fuzzy" /** * `"strict"` - The search string matches exactly from the beginning of the option's text value (case insensitive). * * `"partial"` - The search string matches part of the option's text value (case insensitive). * * `"fuzzy"` - The search string matches the characters in the given order (not exclusively). * The strongest match is selected first. (case insensitive). * * @default "strict" * @config search * @type string * */ search: "strict", /** * Bubble up the custom change event attached to Dropkick to the original element (select). */ bubble: true }, // Common Utilities _ = { hasClass: function( elem, classname ) { var reg = new RegExp( "(^|\\s+)" + classname + "(\\s+|$)" ); return elem && reg.test( elem.className ); }, addClass: function( elem, classname ) { if( elem && !_.hasClass( elem, classname ) ) { elem.className += " " + classname; } }, removeClass: function( elem, classname ) { var reg = new RegExp( "(^|\\s+)" + classname + "(\\s+|$)" ); elem && ( elem.className = elem.className.replace( reg, " " ) ); }, toggleClass: function( elem, classname ) { var fn = _.hasClass( elem, classname ) ? "remove" : "add"; _[ fn + "Class" ]( elem, classname ); }, // Shallow object extend extend: function( obj ) { Array.prototype.slice.call( arguments, 1 ).forEach( function( source ) { if ( source ) { for ( var prop in source ) obj[ prop ] = source[ prop ]; } }); return obj; }, // Returns the top and left offset of an element offset: function( elem ) { var box = elem.getBoundingClientRect() || { top: 0, left: 0 }, docElem = document.documentElement, offsetTop = isIE ? docElem.scrollTop : window.pageYOffset, offsetLeft = isIE ? docElem.scrollLeft : window.pageXOffset; return { top: box.top + offsetTop - docElem.clientTop, left: box.left + offsetLeft - docElem.clientLeft }; }, // Returns the top and left position of an element relative to an ancestor position: function( elem, relative ) { var pos = { top: 0, left: 0 }; while ( elem && elem !== relative ) { pos.top += elem.offsetTop; pos.left += elem.offsetLeft; elem = elem.parentNode; } return pos; }, // Returns the closest ancestor element of the child or false if not found closest: function( child, ancestor ) { while ( child ) { if ( child === ancestor ) { return child; } child = child.parentNode; } return false; }, // Creates a DOM node with the specified attributes create: function( name, attrs ) { var a, node = document.createElement( name ); if ( !attrs ) { attrs = {}; } for ( a in attrs ) { if ( attrs.hasOwnProperty( a ) ) { if ( a === "innerHTML" ) { node.innerHTML = attrs[ a ]; } else { node.setAttribute( a, attrs[ a ] ); } } } return node; }, deferred: function( fn ) { return function() { var args = arguments, ctx = this; window.setTimeout(function() { fn.apply(ctx, args); }, 1); }; } }; // Cache of DK Objects Dropkick.cache = {}; Dropkick.uid = 0; // Extends the DK objects's Prototype Dropkick.prototype = { // Emulate some of HTMLSelectElement's methods /** * Adds an element to the select. This option will not only add it to the original * select, but create a Dropkick option and add it to the Dropkick select. * * @method add * @param {string} elem HTMLOptionElement * @param {Node/Integer} before HTMLOptionElement/Index of Element * @example * ```js * var select = new Dropkick("#select"); * * select.add("New option", 5); * ``` */ add: function( elem, before ) { var text, option, i; if ( typeof elem === "string" ) { text = elem; elem = document.createElement("option"); elem.text = text; } if ( elem.nodeName === "OPTION" ) { option = _.create( "li", { "class": "dk-option", "data-value": elem.value, "text": elem.text, "innerHTML": elem.innerHTML, "role": "option", "aria-selected": "false", "id": "dk" + this.data.cacheID + "-" + ( elem.id || elem.value.replace( " ", "-" ) ) }); _.addClass( option, elem.className ); this.length += 1; if ( elem.disabled ) { _.addClass( option, "dk-option-disabled" ); option.setAttribute( "aria-disabled", "true" ); } if ( elem.hidden ) { _.addClass( option, "dk-option-hidden" ); option.setAttribute( "aria-hidden", "true" ); } this.data.select.add( elem, before ); if ( typeof before === "number" ) { before = this.item( before ); } i = this.options.indexOf( before ); if ( i > -1 ) { before.parentNode.insertBefore( option, before ); this.options.splice( i, 0, option ); } else { this.data.elem.lastChild.appendChild( option ); this.options.push( option ); } option.addEventListener( "mouseover", this ); if ( elem.selected ) { this.select( i ); } } }, /** * Selects an option in the list at the desired index (negative numbers select from the end). * * @method item * @param {Integer} index Index of element (positive or negative) * @return {Node} The DK option from the list, or null if not found * @example * ```js * var select = new Dropkick("#select"); * * select.item(4); //returns DOM node of index * ``` */ item: function( index ) { index = index < 0 ? this.options.length + index : index; return this.options[ index ] || null; }, /** * Removes the option (from both the select and Dropkick) at the given index. * * @method remove * @param {Integer} index Index of element (positive or negative) * @example * ```js * var select = new Dropkick("#select"); * * select.remove(4); * ``` */ remove: function( index ) { var dkOption = this.item( index ); dkOption.parentNode.removeChild( dkOption ); this.options.splice( index, 1 ); this.data.select.remove( index ); this.select( this.data.select.selectedIndex ); this.length -= 1; }, /** * Initializes the DK Object * * @method init * @private * @param {Node} sel [description] * @param {Object} opts Options to override defaults * @return {Object} The DK Object */ init: function( sel, opts ) { var i, dk = Dropkick.build( sel, "dk" + Dropkick.uid ); // Set some data on the DK Object this.data = {}; this.data.select = sel; this.data.elem = dk.elem; this.data.settings = _.extend({}, defaults, opts ); // Emulate some of HTMLSelectElement's properties /** * Whether the form is currently disabled or not * * @property {boolean} disabled * @example * ```js * var select = new Dropkick("#select"); * * select.disabled; * ``` */ this.disabled = sel.disabled; /** * The form associated with the select * * @property {node} form * @example * ```js * var select = new Dropkick("#select"); * * select.form; * ``` */ this.form = sel.form; /** * The number of options in the select * * @property {integer} length * @example * ```js * var select = new Dropkick("#select"); * * select.length; * ``` */ this.length = sel.length; /** * If this select is a multi-select * * @property {boolean} multiple * @example * ```js * var select = new Dropkick("#select"); * * select.multiple; * ``` */ this.multiple = sel.multiple; /** * An array of Dropkick options * * @property {array} options * @example * ```js * var select = new Dropkick("#select"); * * select.options; * ``` */ this.options = dk.options.slice( 0 ); /** * An index of the first selected option * * @property {integer} selectedIndex * @example * ```js * var select = new Dropkick("#select"); * * select.selectedIndex; * ``` */ this.selectedIndex = sel.selectedIndex; /** * An array of selected Dropkick options * * @property {array} selectedOptions * @example * ```js * var select = new Dropkick("#select"); * * select.selectedOptions; * ``` */ this.selectedOptions = dk.selected.slice( 0 ); /** * The current value of the select * * @property {string} value * @example * ```js * var select = new Dropkick("#select"); * * select.value; * ``` */ this.value = sel.value; // Add the DK Object to the cache this.data.cacheID = Dropkick.uid; Dropkick.cache[ this.data.cacheID ] = this; // Call the optional initialize function this.data.settings.initialize.call( this ); // Increment the index Dropkick.uid += 1; // Add the change listener to the select if ( !this._changeListener ) { sel.addEventListener( "change", this ); this._changeListener = true; } // Don't continue if we're not rendering on mobile if ( !( isMobile && !this.data.settings.mobile ) ) { // Insert the DK element before the original select sel.parentNode.insertBefore( this.data.elem, sel ); sel.setAttribute( "data-dkCacheId", this.data.cacheID ); // Bind events this.data.elem.addEventListener( "click", this ); this.data.elem.addEventListener( "keydown", this ); this.data.elem.addEventListener( "keypress", this ); if ( this.form ) { this.form.addEventListener( "reset", this ); } if ( !this.multiple ) { for ( i = 0; i < this.options.length; i++ ) { this.options[ i ].addEventListener( "mouseover", this ); } } if ( !_docListener ) { document.addEventListener( "click", Dropkick.onDocClick ); if ( isIframe ){ parent.document.addEventListener( "click", Dropkick.onDocClick ); } _docListener = true; } } return this; }, /** * Closes the DK dropdown * * @method close * @example * ```js * var select = new Dropkick("#select"); * * select.close(); //closes dk dropdown * ``` */ close: function() { var i, dk = this.data.elem; if ( !this.isOpen || this.multiple ) { return false; } for ( i = 0; i < this.options.length; i++ ) { _.removeClass( this.options[ i ], "dk-option-highlight" ); } dk.lastChild.setAttribute( "aria-expanded", "false" ); _.removeClass( dk.lastChild, "dk-select-options-highlight" ); _.removeClass( dk, "dk-select-open-(up|down)" ); this.isOpen = false; this.data.settings.close.call( this ); }, /** * Opens the DK dropdown * * @method open * @example * ```js * var select = new Dropkick("#select"); * * select.open(); //Opens the dk dropdown * ``` */ open: _.deferred(function() { var dropHeight, above, below, direction, dkTop, dkBottom, dk = this.data.elem, dkOptsList = dk.lastChild, // Using MDNs suggestion for crossbrowser scrollY: // https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY supportPageOffset = window.pageXOffset !== undefined, isCSS1Compat = ((document.compatMode || "") === "CSS1Compat"), scrollY = supportPageOffset ? window.pageYOffset : isCSS1Compat ? document.documentElement.scrollTop : document.body.scrollTop; dkTop = _.offset( dk ).top - scrollY; dkBottom = window.innerHeight - ( dkTop + dk.offsetHeight ); if ( this.isOpen || this.multiple ) { return false; } dkOptsList.style.display = "block"; dropHeight = dkOptsList.offsetHeight; dkOptsList.style.display = ""; above = dkTop > dropHeight; below = dkBottom > dropHeight; direction = above && !below ? "-up" : "-down"; this.isOpen = true; //_.addClass( dk, "dk-select-open" + direction ); _.addClass( dk, "dk-select-open-down" ); dkOptsList.setAttribute( "aria-expanded", "true" ); this._scrollTo( this.options.length - 1 ); this._scrollTo( this.selectedIndex ); this.data.settings.open.call( this ); }), /** * Disables or enables an option; if only a boolean is passed (or nothing), * then the entire Dropkick will be disabled or enabled. * * @method disable * @param {Integer} elem The element or index to disable * @param {Boolean} disabled Value of disabled * @example * ```js * var select = new Dropkick("#select"); * * // To disable the entire select * select.disable(); * * // To disable just an option with an index * select.disable(4, true); * * // To re-enable the entire select * select.disable(false); * * // To re-enable just an option with an index * select.disable(4, false); * ``` */ disable: function( elem, disabled ) { var disabledClass = "dk-option-disabled"; if ( arguments.length === 0 || typeof elem === "boolean" ) { disabled = elem === undefined ? true : false; elem = this.data.elem; disabledClass = "dk-select-disabled"; this.disabled = disabled; } if ( disabled === undefined ) { disabled = true; } if ( typeof elem === "number" ) { elem = this.item( elem ); } if (disabled) { elem.setAttribute( 'aria-disabled', true ); _.addClass( elem, disabledClass ); } else { elem.setAttribute( 'aria-disabled', false ); _.removeClass( elem, disabledClass ); } }, /** * Hides or shows an option. * * @method hide * @param {Integer} elem The element or index to hide * @param {Boolean} hidden Whether or not to hide the element * @example * ```js * var select = new Dropkick("#select"); * * // To hide an option with an index * select.hide(4, true); * * // To make an option visible with an index * select.hide(4, false); * ``` */ hide: function( elem, hidden ) { var hiddenClass = "dk-option-hidden"; if ( hidden === undefined ) { hidden = true; } elem = this.item( elem ); if (hidden) { elem.setAttribute( 'aria-hidden', true ); _.addClass( elem, hiddenClass ); } else { elem.setAttribute( 'aria-hidden', false ); _.removeClass( elem, hiddenClass ); } }, /** * Selects an option from the list * * @method select * @param {String} elem The element, index, or value to select * @param {Boolean} disabled Selects disabled options * @return {Node} The selected element * @example * ```js * var elm = new Dropkick("#select"); * * // Select by index * elm.select(4); //selects & returns 5th item in the list * * // Select by value * elm.select("AL"); // selects & returns option with the value "AL" * ``` */ select: function( elem, disabled ) { var i, index, option, combobox, select = this.data.select; if ( typeof elem === "number" ) { elem = this.item( elem ); } if ( typeof elem === "string" ) { for ( i = 0; i < this.length; i++ ) { if ( this.options[ i ].getAttribute( "data-value" ) === elem ) { elem = this.options[ i ]; } } } // No element or enabled option if ( !elem || typeof elem === "string" || ( !disabled && _.hasClass( elem, "dk-option-disabled" ) ) ) { return false; } if ( _.hasClass( elem, "dk-option" ) ) { index = this.options.indexOf( elem ); option = select.options[ index ]; if ( this.multiple ) { _.toggleClass( elem, "dk-option-selected" ); option.selected = !option.selected; if ( _.hasClass( elem, "dk-option-selected" ) ) { elem.setAttribute( "aria-selected", "true" ); this.selectedOptions.push( elem ); } else { elem.setAttribute( "aria-selected", "false" ); index = this.selectedOptions.indexOf( elem ); this.selectedOptions.splice( index, 1 ); } } else { combobox = this.data.elem.firstChild; if ( this.selectedOptions.length ) { _.removeClass( this.selectedOptions[0], "dk-option-selected" ); this.selectedOptions[0].setAttribute( "aria-selected", "false" ); } _.addClass( elem, "dk-option-selected" ); elem.setAttribute( "aria-selected", "true" ); combobox.setAttribute( "aria-activedescendant", elem.id ); combobox.className = "dk-selected " + option.className; combobox.innerHTML = option.innerHTML; this.selectedOptions[0] = elem; option.selected = true; } this.selectedIndex = select.selectedIndex; this.value = select.value; if ( !disabled ) { this.data.select.dispatchEvent( new CustomEvent("change", {bubbles: this.data.settings.bubble})); } return elem; } }, /** * Selects a single option from the list and scrolls to it (if the select is open or on multi-selects). * Useful for selecting an option after a search by the user. Important to note: this doesn't close the * dropdown when selecting. It keeps the dropdown open and scrolls to proper position. * * @method selectOne * @param {Integer} elem The element or index to select * @param {Boolean} disabled Selects disabled options * @return {Node} The selected element * @example * ```js * var select = new Dropkick("#select"); * * select.selectOne(4); * ``` */ selectOne: function( elem, disabled ) { this.reset( true ); this._scrollTo( elem ); return this.select( elem, disabled ); }, /** * Finds all options who's text matches a pattern (strict, partial, or fuzzy) * * `"strict"` - The search string matches exactly from the beginning of the * option's text value (case insensitive). * * `"partial"` - The search string matches part of the option's text value * (case insensitive). * * `"fuzzy"` - The search string matches the characters in the given order (not * exclusively). The strongest match is selected first. (case insensitive). * * @method search * @param {String} string The string to search for * @param {Integer} mode How to search; "strict", "partial", or "fuzzy" * @return {Boolean} An Array of matched elements */ search: function( pattern, mode ) { var i, tokens, str, tIndex, sIndex, cScore, tScore, reg, options = this.data.select.options, matches = []; if ( !pattern ) { return this.options; } // Fix Mode mode = mode ? mode.toLowerCase() : "strict"; mode = mode === "fuzzy" ? 2 : mode === "partial" ? 1 : 0; reg = new RegExp( ( mode ? "" : "^" ) + pattern, "i" ); for ( i = 0; i < options.length; i++ ) { str = options[ i ].text.toLowerCase(); // Fuzzy if ( mode == 2 ) { tokens = pattern.toLowerCase().split(""); tIndex = sIndex = cScore = tScore = 0; while ( sIndex < str.length ) { if ( str[ sIndex ] === tokens[ tIndex ] ) { cScore += 1 + cScore; tIndex++; } else { cScore = 0; } tScore += cScore; sIndex++; } if ( tIndex === tokens.length ) { matches.push({ e: this.options[ i ], s: tScore, i: i }); } // Partial or Strict (Default) } else { reg.test( str ) && matches.push( this.options[ i ] ); } } // Sort fuzzy results if ( mode === 2 ) { matches = matches.sort( function ( a, b ) { return ( b.s - a.s ) || a.i - b.i; }).reduce( function ( p, o ) { p[ p.length ] = o.e; return p; }, [] ); } return matches; }, /** * Brings focus to the proper DK element * * @method focus * @example * ```js * var select = new Dropkick("#select"); * * $("#some_elm").on("click", function() { * select.focus(); * }); * ``` */ focus: function() { if ( !this.disabled ) { ( this.multiple ? this.data.elem : this.data.elem.children[0] ).focus(); } }, /** * Resets the Dropkick and select to it's original selected options; if `clear` is `true`, * It will select the first option by default (or no options for multi-selects). * * @method reset * @param {Boolean} clear Defaults to first option if True * @example * ```js * var select = new Dropkick("#select"); * * // Reset to originally `selected` option * select.reset(); * * // Reset to first option in select * select.reset(true); * ``` */ reset: function( clear ) { var i, select = this.data.select; this.selectedOptions.length = 0; for ( i = 0; i < select.options.length; i++ ) { select.options[ i ].selected = false; _.removeClass( this.options[ i ], "dk-option-selected" ); this.options[ i ].setAttribute( "aria-selected", "false" ); if ( !clear && select.options[ i ].defaultSelected ) { this.select( i, true ); } } if ( !this.selectedOptions.length && !this.multiple ) { this.select( 0, true ); } }, /** * Rebuilds the DK Object * (use if HTMLSelectElement has changed) * * @method refresh * @example * ```js * var select = new Dropkick("#select"); * * //... [change original select] ... * * select.refresh(); * ``` */ refresh: function() { if(Object.keys(this).length > 0 && !( isMobile && !this.data.settings.mobile )) { this.dispose().init( this.data.select, this.data.settings ); } }, /** * Removes the DK Object from the cache and the element from the DOM * * @method dispose * @example * ```js * var select = new Dropkick("#select"); * * select.dispose(); * ``` */ dispose: function() { if (Object.keys(this).length > 0 && !( isMobile && !this.data.settings.mobile )) { delete Dropkick.cache[ this.data.cacheID ]; this.data.elem.parentNode.removeChild( this.data.elem ); this.data.select.removeAttribute( "data-dkCacheId" ); } return this; }, // Private Methods /** * @method handleEvent * @private */ handleEvent: function( event ) { if ( this.disabled ) { return; } switch ( event.type ) { case "click": this._delegate( event ); break; case "keydown": this._keyHandler( event ); break; case "keypress": this._searchOptions( event ); break; case "mouseover": this._highlight( event ); break; case "reset": this.reset(); break; case "change": this.data.settings.change.call( this ); break; } }, /** * @method delegate * @private */ _delegate: function( event ) { var selection, index, firstIndex, lastIndex, target = event.target; if ( _.hasClass( target, "dk-option-disabled" ) ) { return false; } if ( !this.multiple ) { this[ this.isOpen ? "close" : "open" ](); if ( _.hasClass( target, "dk-option" ) ) { this.select( target ); } } else { if ( _.hasClass( target, "dk-option" ) ) { selection = window.getSelection(); if ( selection.type === "Range" ) selection.collapseToStart(); if ( event.shiftKey ) { firstIndex = this.options.indexOf( this.selectedOptions[0] ); lastIndex = this.options.indexOf( this.selectedOptions[ this.selectedOptions.length - 1 ] ); index = this.options.indexOf( target ); if ( index > firstIndex && index < lastIndex ) index = firstIndex; if ( index > lastIndex && lastIndex > firstIndex ) lastIndex = firstIndex; this.reset( true ); if ( lastIndex > index ) { while ( index < lastIndex + 1 ) { this.select( index++ ); } } else { while ( index > lastIndex - 1 ) { this.select( index-- ); } } } else if ( event.ctrlKey || event.metaKey ) { this.select( target ); } else { this.reset( true ); this.select( target ); } } } }, /** * @method highlight * @private */ _highlight: function( event ) { var i, option = event.target; if ( !this.multiple ) { for ( i = 0; i < this.options.length; i++ ) { _.removeClass( this.options[ i ], "dk-option-highlight" ); } _.addClass( this.data.elem.lastChild, "dk-select-options-highlight" ); _.addClass( option, "dk-option-highlight" ); } }, /** * @method keyHandler * @private */ _keyHandler: function( event ) { var lastSelected, j, selected = this.selectedOptions, options = this.options, i = 1, keys = { tab: 9, enter: 13, esc: 27, space: 32, up: 38, down: 40 }; switch ( event.keyCode ) { case keys.up: i = -1; // deliberate fallthrough case keys.down: event.preventDefault(); lastSelected = selected[ selected.length - 1 ]; if ( _.hasClass( this.data.elem.lastChild, "dk-select-options-highlight" ) ) { _.removeClass( this.data.elem.lastChild, "dk-select-options-highlight" ); for ( j = 0; j < options.length; j++ ) { if ( _.hasClass( options[ j ], "dk-option-highlight" ) ) { _.removeClass( options[ j ], "dk-option-highlight" ); lastSelected = options[ j ]; } } } i = options.indexOf( lastSelected ) + i; if ( i > options.length - 1 ) { i = options.length - 1; } else if ( i < 0 ) { i = 0; } if ( !this.data.select.options[ i ].disabled ) { this.reset( true ); this.select( i ); this._scrollTo( i ); } break; case keys.space: if ( !this.isOpen ) { event.preventDefault(); this.open(); break; } // deliberate fallthrough case keys.tab: case keys.enter: for ( i = 0; i < options.length; i++ ) { if ( _.hasClass( options[ i ], "dk-option-highlight" ) ) { this.select( i ); } } // deliberate fallthrough case keys.esc: if ( this.isOpen ) { event.preventDefault(); this.close(); } break; } }, /** * @method searchOptions * @private */ _searchOptions: function( event ) { var results, self = this, keyChar = String.fromCharCode( event.keyCode || event.which ), waitToReset = function() { if ( self.data.searchTimeout ) { clearTimeout( self.data.searchTimeout ); } self.data.searchTimeout = setTimeout(function() { self.data.searchString = ""; }, 1000 ); }; if ( this.data.searchString === undefined ) { this.data.searchString = ""; } waitToReset(); this.data.searchString += keyChar; results = this.search( this.data.searchString, this.data.settings.search ); if ( results.length ) { if ( !_.hasClass( results[0], "dk-option-disabled" ) ) { this.selectOne( results[0] ); } } }, /** * @method scrollTo * @private */ _scrollTo: function( option ) { var optPos, optTop, optBottom, dkOpts = this.data.elem.lastChild; if ( option === -1 || ( typeof option !== "number" && !option ) || ( !this.isOpen && !this.multiple ) ) { return false; } if ( typeof option === "number" ) { option = this.item( option ); } optPos = _.position( option, dkOpts ).top; optTop = optPos - dkOpts.scrollTop; optBottom = optTop + option.offsetHeight; if ( optBottom > dkOpts.offsetHeight ) { optPos += option.offsetHeight; dkOpts.scrollTop = optPos - dkOpts.offsetHeight; } else if ( optTop < 0 ) { dkOpts.scrollTop = optPos; } } }; // Static Methods /** * Builds the Dropkick element from a select element * * @method build * @private * @param {Node} sel The HTMLSelectElement * @return {Object} An object containing the new DK element and it's options */ Dropkick.build = function( sel, idpre ) { var selOpt, optList, i, options = [], ret = { elem: null, options: [], selected: [] }, addOption = function ( node ) { var option, optgroup, optgroupList, i, children = []; switch ( node.nodeName ) { case "OPTION": option = _.create( "li", { "class": "dk-option ", "data-value": node.value, "text": node.text, "innerHTML": node.innerHTML, "role": "option", "aria-selected": "false", "id": idpre + "-" + ( node.id || node.value.replace( " ", "-" ) ) }); _.addClass( option, node.className ); if ( node.disabled ) { _.addClass( option, "dk-option-disabled" ); option.setAttribute( "aria-disabled", "true" ); } if ( node.hidden ) { _.addClass( option, "dk-option-hidden" ); option.setAttribute( "aria-hidden", "true" ); } if ( node.selected ) { _.addClass( option, "dk-option-selected" ); option.setAttribute( "aria-selected", "true" ); ret.selected.push( option ); } ret.options.push( this.appendChild( option ) ); break; case "OPTGROUP": optgroup = _.create( "li", { "class": "dk-optgroup" }); if ( node.label ) { optgroup.appendChild( _.create( "div", { "class": "dk-optgroup-label", "innerHTML": node.label })); } optgroupList = _.create( "ul", { "class": "dk-optgroup-options" }); for ( i = node.children.length; i--; children.unshift( node.children[ i ] ) ); children.forEach( addOption, optgroupList ); this.appendChild( optgroup ).appendChild( optgroupList ); break; } }; ret.elem = _.create( "div", { "class": "dk-select" + ( sel.multiple ? "-multi" : "" ) }); optList = _.create( "ul", { "class": "dk-select-options", "id": idpre + "-listbox", "role": "listbox" }); if (sel.disabled) { _.addClass( ret.elem, "dk-select-disabled" ); ret.elem.setAttribute( 'aria-disabled', true ); } ret.elem.id = idpre + ( sel.id ? "-" + sel.id : "" ); _.addClass( ret.elem, sel.className ); if ( !sel.multiple ) { selOpt = sel.options[ sel.selectedIndex ]; ret.elem.appendChild( _.create( "div", { "class": "dk-selected " + selOpt.className, "tabindex": sel.tabindex || 0, "innerHTML": selOpt ? selOpt.text : ' ', "id": idpre + "-combobox", "aria-live": "assertive", "aria-owns": optList.id, "role": "combobox" })); optList.setAttribute( "aria-expanded", "false" ); } else { ret.elem.setAttribute( "tabindex", sel.getAttribute( "tabindex" ) || "0" ); optList.setAttribute( "aria-multiselectable", "true" ); } for ( i = sel.children.length; i--; options.unshift( sel.children[ i ] ) ); options.forEach( addOption, ret.elem.appendChild( optList ) ); return ret; }; /** * Focus DK Element when corresponding label is clicked; close all other DK's * * @method onDocClick * @private * @param {Object} event Event from document click */ Dropkick.onDocClick = function( event ) { var tId, i; if (event.target.nodeType !== 1) { return false; } if ( ( tId = event.target.getAttribute( "data-dkcacheid" ) ) !== null ) { Dropkick.cache[ tId ].focus(); } for ( i in Dropkick.cache ) { if ( !_.closest( event.target, Dropkick.cache[ i ].data.elem ) && i !== tId ) { Dropkick.cache[ i ].disabled || Dropkick.cache[ i ].close(); } } }; // Add jQuery method if ( jQuery !== undefined ) { jQuery.fn.dropkick = function () { var args = Array.prototype.slice.call( arguments ); return jQuery( this ).each(function() { if ( !args[0] || typeof args[0] === 'object' ) { new Dropkick( this, args[0] || {} ); } else if ( typeof args[0] === 'string' ) { Dropkick.prototype[ args[0] ].apply( new Dropkick( this ), args.slice( 1 ) ); } }); }; } return Dropkick; })); // source --> https://sieuthichamsocxe.com/wp-content/themes/noor/framework/asset/site/js/module/headroom.min.js?ver=2.8.4.1 /*! * headroom.js v0.9.4 - Give your page some headroom. Hide your header until you need it * Copyright (c) 2017 Nick Williams - http://wicky.nillia.ms/headroom.js * License: MIT */ !function(a,b){"use strict";"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?module.exports=b():a.Headroom=b()}(this,function(){"use strict";function a(a){this.callback=a,this.ticking=!1}function b(a){return a&&"undefined"!=typeof window&&(a===window||a.nodeType)}function c(a){if(arguments.length<=0)throw new Error("Missing arguments in extend function");var d,e,f=a||{};for(e=1;ethis.getScrollerHeight();return b||c},toleranceExceeded:function(a,b){return Math.abs(a-this.lastKnownScrollY)>=this.tolerance[b]},shouldUnpin:function(a,b){var c=a>this.lastKnownScrollY,d=a>=this.offset;return c&&d&&b},shouldPin:function(a,b){var c=athis.lastKnownScrollY?"down":"up",c=this.toleranceExceeded(a,b);this.isOutOfBounds(a)||(a<=this.offset?this.top():this.notTop(),a+this.getViewportHeight()>=this.getScrollerHeight()?this.bottom():this.notBottom(),this.shouldUnpin(a,c)?this.unpin():this.shouldPin(a,c)&&this.pin(),this.lastKnownScrollY=a)}},e.options={tolerance:{up:0,down:0},offset:0,scroller:window,classes:{pinned:"headroom--pinned",unpinned:"headroom--unpinned",top:"headroom--top",notTop:"headroom--not-top",bottom:"headroom--bottom",notBottom:"headroom--not-bottom",initial:"headroom"}},e.cutsTheMustard="undefined"!=typeof f&&f.rAF&&f.bind&&f.classList,e}); // source --> https://sieuthichamsocxe.com/wp-content/themes/noor/framework/asset/site/js/module/hoverintent.js?ver=2.8.4.1 /*! * hoverIntent v1.8.1 // 2014.06.29 // jQuery v1.9.1+ * http://cherne.net/brian/resources/jquery.hoverIntent.html * * You may use hoverIntent under the terms of the MIT license. Basically that * means you are free to use hoverIntent as long as this header is left intact. * Copyright 2007, 2014 Brian Cherne */ !function(e){e.fn.hoverIntent=function(t,n,o){var r={interval:100,sensitivity:6,timeout:0};r="object"==typeof t?e.extend(r,t):e.isFunction(n)?e.extend(r,{over:t,out:n,selector:o}):e.extend(r,{over:t,out:t,selector:n});var v,i,u,s,h=function(e){v=e.pageX,i=e.pageY},I=function(t,n){return n.hoverIntent_t=clearTimeout(n.hoverIntent_t),Math.sqrt((u-v)*(u-v)+(s-i)*(s-i)) https://sieuthichamsocxe.com/wp-content/themes/noor/framework/asset/site/js/module/ie.js?ver=2.8.4.1 /*! DETECT IE */ function detectIE() { var msie = navigator.userAgent.indexOf('MSIE '); if (msie > 0) { return parseInt(navigator.userAgent.substring(msie + 5, navigator.userAgent.indexOf('.', msie)), 10); /*IE 10 or older*/ } var trident = navigator.userAgent.indexOf('Trident/'); if (trident > 0) { var rv = navigator.userAgent.indexOf('rv:'); return parseInt(navigator.userAgent.substring(rv + 3, navigator.userAgent.indexOf('.', rv)), 10); /* IE 11 */ } var edge = navigator.userAgent.indexOf('Edge/'); if (edge > 0) { return parseInt(navigator.userAgent.substring(edge + 5, navigator.userAgent.indexOf('.', edge)), 10); /* Edge (IE 12+) */ } return false; }; // source --> https://sieuthichamsocxe.com/wp-content/themes/noor/framework/asset/site/js/module/isotope.pkgd.min.js?ver=2.8.4.1 /*! * Isotope PACKAGED v3.0.5 * * Licensed GPLv3 for open source use * or Isotope Commercial License for commercial use * * https://isotope.metafizzy.co * Copyright 2017 Metafizzy */ !function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,s,a){function u(t,e,o){var n,s="$()."+i+'("'+e+'")';return t.each(function(t,u){var h=a.data(u,i);if(!h)return void r(i+" not initialized. Cannot call methods, i.e. "+s);var d=h[e];if(!d||"_"==e.charAt(0))return void r(s+" is not a valid method");var l=d.apply(h,o);n=void 0===n?l:n}),void 0!==n?n:t}function h(t,e){t.each(function(t,o){var n=a.data(o,i);n?(n.option(e),n._init()):(n=new s(o,e),a.data(o,i,n))})}a=a||e||t.jQuery,a&&(s.prototype.option||(s.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=n.call(arguments,1);return u(this,t,e)}return h(this,t),this},o(a))}function o(t){!t||t&&t.bridget||(t.bridget=i)}var n=Array.prototype.slice,s=t.console,r="undefined"==typeof s?function(){}:function(t){s.error(t)};return o(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},o=i[t]=i[t]||[];return o.indexOf(e)==-1&&o.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},o=i[t]=i[t]||{};return o[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var o=i.indexOf(e);return o!=-1&&i.splice(o,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var o=this._onceEvents&&this._onceEvents[t],n=0;n