Quantcast
Channel: , Author at Compass
Viewing all articles
Browse latest Browse all 840

2687a875ed4ddd8d4646a02e9688f1b9-scripts

$
0
0

/**handles:hurryt-cookie,hurryt-countdown,hurrytimer**/
/**
* Minified by jsDelivr using Terser v3.14.1.
* Original file: /npm/js-cookie@2.2.0/src/js.cookie.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
!function (e) { var n = !1; if (“function” == typeof define && define.amd && (define(e), n = !0), “object” == typeof exports && (module.exports = e(), n = !0), !n) { var o = window.Cookies, t = window.Cookies = e(); t.noConflict = function () { return window.Cookies = o, t } } }(function () { function e() { for (var e = 0, n = {}; e 1) { if (“number” == typeof (i = e({ path: “/” }, t.defaults, i)).expires) { var a = new Date; a.setMilliseconds(a.getMilliseconds() + 864e5 * i.expires), i.expires = a } i.expires = i.expires ? i.expires.toUTCString() : “”; try { c = JSON.stringify(r), /^[\{\[]/.test(c) && (r = c) } catch (e) { } r = o.write ? o.write(r, n) : encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent), n = (n = (n = encodeURIComponent(String(n))).replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)).replace(/[\(\)]/g, escape); var s = “”; for (var f in i) i[f] && (s += “; ” + f, !0 !== i[f] && (s += “=” + i[f])); return document.cookie = n + “=” + r + s } n || (c = {}); for (var p = document.cookie ? document.cookie.split(“; “) : [], d = /(%[0-9A-Z]{2})+/g, u = 0; u < p.length; u++) { var l = p[u].split("="), C = l.slice(1).join("="); this.json || '"' !== C.charAt(0) || (C = C.slice(1, -1)); try { var g = l[0].replace(d, decodeURIComponent); if (C = o.read ? o.read(C, g) : o(C, g) || C.replace(d, decodeURIComponent), this.json) try { C = JSON.parse(C) } catch (e) { } if (n === g) { c = C; break } n || (c[g] = C) } catch (e) { } } return c } } return t.set = t, t.get = function (e) { return t.call(t, e) }, t.getJSON = function () { return t.apply({ json: !0 }, [].slice.call(arguments)) }, t.defaults = {}, t.remove = function (n, o) { t(n, "", e(o, { expires: -1 })) }, t.withConverter = n, t }(function () { }) });
//# sourceMappingURL=/sm/203d9606ffea7a776ef56994ac4d4a1ab0a18611bf5f22fd2f82e9b682eea54f.map
/*!
* The Final Countdown for jQuery v2.2.0 (http://hilios.github.io/jQuery.countdown/)
* Copyright (c) 2016 Edson Hilios
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";function b(a){if(a instanceof Date)return a;if(String(a).match(g))return String(a).match(/^[0-9]*$/)&&(a=Number(a)),String(a).match(/\-/)&&(a=String(a).replace(/\-/g,"/")),new Date(a);throw new Error("Couldn't cast `"+a+"` to a date object.")}function c(a){var b=a.toString().replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");return new RegExp(b)}function d(a){return function(b){var d=b.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(d)for(var f=0,g=d.length;f<g;++f){var h=d[f].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),j=c(h[0]),k=h[1]||"",l=h[3]||"",m=null;h=h[2],i.hasOwnProperty(h)&&(m=i[h],m=Number(a[m])),null!==m&&("!"===k&&(m=e(l,m)),""===k&&m1?c:d}var f=[],g=[],h={precision:100,elapse:!1,defer:!1};g.push(/^[0-9]*$/.source),g.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g=new RegExp(g.join(“|”));var i={Y:”years”,m:”months”,n:”daysToMonth”,d:”daysToWeek”,w:”weeks”,W:”weeksToMonth”,H:”hours”,M:”minutes”,S:”seconds”,D:”totalDays”,I:”totalHours”,N:”totalMinutes”,T:”totalSeconds”},j=function(b,c,d){this.el=b,this.$el=a(b),this.interval=null,this.offset={},this.options=a.extend({},h),this.instanceNumber=f.length,f.push(this),this.$el.data(“countdown-instance”,this.instanceNumber),d&&(“function”==typeof d?(this.$el.on(“update.countdown”,d),this.$el.on(“stoped.countdown”,d),this.$el.on(“finish.countdown”,d)):this.options=a.extend({},h,d)),this.setFinalDate(c),this.options.defer===!1&&this.start()};a.extend(j.prototype,{start:function(){null!==this.interval&&clearInterval(this.interval);var a=this;this.update(),this.interval=setInterval(function(){a.update.call(a)},this.options.precision)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent(“stoped”)},toggle:function(){this.interval?this.stop():this.start()},pause:function(){this.stop()},resume:function(){this.start()},remove:function(){this.stop.call(this),f[this.instanceNumber]=null,delete this.$el.data().countdownInstance},setFinalDate:function(a){this.finalDate=b(a)},update:function(){if(0===this.$el.closest(“html”).length)return void this.remove();var b,c=void 0!==a._data(this.el,”events”),d=new Date;b=this.finalDate.getTime()-d.getTime(),b=Math.ceil(b/1e3),b=!this.options.elapse&&b=this.finalDate,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToWeek:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToMonth:Math.floor(this.totalSecsLeft/60/60/24%30.4368),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),weeksToMonth:Math.floor(this.totalSecsLeft/60/60/24/7)%4,months:Math.floor(this.totalSecsLeft/60/60/24/30.4368),years:Math.abs(this.finalDate.getFullYear()-d.getFullYear()),totalDays:Math.floor(this.totalSecsLeft/60/60/24),totalHours:Math.floor(this.totalSecsLeft/60/60),totalMinutes:Math.floor(this.totalSecsLeft/60),totalSeconds:this.totalSecsLeft},this.options.elapse||0!==this.totalSecsLeft?this.dispatchEvent(“update”):(this.stop(),this.dispatchEvent(“finish”)))},dispatchEvent:function(b){var c=a.Event(b+”.countdown”);c.finalDate=this.finalDate,c.elapsed=this.elapsed,c.offset=a.extend({},this.offset),c.strftime=d(this.offset),this.$el.trigger(c)}}),a.fn.countdown=function(){var b=Array.prototype.slice.call(arguments,0);return this.each(function(){var c=a(this).data(“countdown-instance”);if(void 0!==c){var d=f[c],e=b[0];j.prototype.hasOwnProperty(e)?d[e].apply(d,b.slice(1)):null===String(e).match(/^[$A-Z_][0-9A-Z_$]*$/i)?(d.setFinalDate.call(d,e),d.start()):a.error(“Method %s does not exist on jQuery.countdown”.replace(/\%s/gi,e))}else new j(this,b[0],b[1])})}});
“use strict”;function _createForOfIteratorHelper(t,e){var r;if(“undefined”==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=_unsupportedIterableToArray(t))||e&&t&&”number”==typeof t.length){r&&(t=r);var i=0,e=function e(){};return{s:e,n:function e(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:e}}throw new TypeError(“Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.”)}var n=!0,a=!1,o;return{s:function e(){r=t[Symbol.iterator]()},n:function e(){var t=r.next();return n=t.done,t},e:function e(t){a=!0,o=t},f:function e(){try{n||null==r.return||r.return()}finally{if(a)throw o}}}}function _unsupportedIterableToArray(e,t){if(e){if(“string”==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return”Map”===(r=”Object”===r&&e.constructor?e.constructor.name:r)||”Set”===r?Array.from(e):”Arguments”===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r”,”+”,”~”],a=[“+”,”~”],s=[“ATTR”,”PSEUDO”,”ID”,”CLASS”];function c(e){if(!o.find.tokenize)return e.isCombinatorial=!0,e.isFraternal=!0,void(e.isComplex=!0);e.isCombinatorial=!1,e.isFraternal=!1,e.isComplex=!1;for(var t=o.find.tokenize(e.selector),r=0;r<t.length;r++)for(var i=0;i<t[r].length;i++)-1!=n.indexOf(t[r][i].type)&&(e.isCombinatorial=!0),-1!=a.indexOf(t[r][i].type)&&(e.isFraternal=!0),-1!=s.indexOf(t[r][i].type)&&(e.isComplex=!0)}var u=function e(t,r,i){this.selector=t.trim(),this.callback=r,this.options=i,c(this)},i=[];i.initialize=function(e,t,r){var i=[],n=function e(){-1==i.indexOf(this)&&(i.push(this),o(this).each(t))};o(r.target).find(e).each(n);var a=new u(e,n,r);this.push(a);var e=new MutationObserver(function(e){for(var t=[],r=0;r<e.length;r++)if("attributes"==e[r].type&&(e[r].target.matches(a.selector)&&t.push(e[r].target),a.isFraternal?t.push.apply(t,e[r].target.parentElement.querySelectorAll(a.selector)):t.push.apply(t,e[r].target.querySelectorAll(a.selector))),"childList"==e[r].type)for(var i=0;i<e[r].addedNodes.length;i++)e[r].addedNodes[i]instanceof Element&&(e[r].addedNodes[i].matches(a.selector)&&t.push(e[r].addedNodes[i]),a.isFraternal?t.push.apply(t,e[r].addedNodes[i].parentElement.querySelectorAll(a.selector)):t.push.apply(t,e[r].addedNodes[i].querySelectorAll(a.selector)));for(var n=0;n<t.length;n++)o(t[n]).each(a.callback)}),n={childList:!0,subtree:!0,attributes:a.isComplex};return e.observe(r.target,r.observer||n),e},o.fn.initialize=function(e,t){return i.initialize(this.selector,e,o.extend({},o.initialize.defaults,t))},o.initialize=function(e,t,r){return i.initialize(e,t,o.extend({},o.initialize.defaults,r))},o.initialize.defaults={target:document.documentElement,observer:null}}(jQuery);var HurrytimerAction=function(){function r(e,t){_classCallCheck(this,r),this.elementRef=e,this.config=t}return _createClass(r,[{key:"changeStockStatus",value:function e(t,r){jQuery.post&&jQuery.post(hurrytimer_ajax_object.ajax_url,{nonce:hurrytimer_ajax_object.ajax_nonce,action:"change_stock_status",status:r,campaign_id:t})}},{key:"hasMessageAction",value:function e(){var t=_createForOfIteratorHelper(this.config.actions),r,i;try{for(t.s();!(r=t.n()).done;){if(r.value.id==hurrytimer_ajax_object.actionsOptions.displayMessage)return!0}}catch(e){t.e(e)}finally{t.f()}return!1}},{key:"hide",value:function e(){var t;this.hasMessageAction()||((t=this.elementRef.closest(".hurrytimer-sticky")).length?t:this.elementRef).addClass("hurryt-loading")}},{key:"hideAddToCartButton",value:function e(){var t=jQuery(".single_add_to_cart_button").closest("form.cart");t.length&&t.remove()}},{key:"displayMessage",value:function e(t){var r='

‘).concat(t,”

“);this.elementRef.find(“.hurrytimer-campaign-message”).remove();var t=this.elementRef.closest(“.hurrytimer-sticky”);t.length?(this.elementRef.addClass(“hurryt-loading”),t.find(“.hurrytimer-sticky-inner”).append(r)):(this.elementRef.addClass(“hurryt-loading”),this.elementRef.after(r))}},{key:”expireCoupon”,value:function e(n,a){jQuery.ajaxPrefilter(function(e,t,r){var i;-1!==e.url.indexOf(“wc-ajax=apply_coupon”)&&”string”==typeof t.data.coupon_code&&”string”==typeof n&&t.data.coupon_code.toLowerCase()===n.toLowerCase()&&(r.abort(),jQuery(“.woocommerce-error”).remove(),(jQuery(“.woocommerce-notices-wrapper:first”)||jQuery(“.cart-empty”).closest(“.woocommerce”)||jQuery(“.woocommerce-cart-form”)).prepend(‘

“)),jQuery(“.checkout_coupon”).removeClass(“processing”).unblock(),jQuery(“.woocommerce-cart-form”).removeClass(“processing”).unblock())})}}],[{key:”redirect”,value:function e(t){document.body.style.opacity=”0″,document.body.style.display=”none”,0!==t.trim().length&&(hurrytimer_ajax_object.redirect_no_back?window.location.replace(t):window.location.href=t)}}]),r}();function _createForOfIteratorHelper(t,e){var r;if(“undefined”==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=_unsupportedIterableToArray(t))||e&&t&&”number”==typeof t.length){r&&(t=r);var i=0,e=function e(){};return{s:e,n:function e(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function e(t){throw t},f:e}}throw new TypeError(“Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.”)}var n=!0,a=!1,o;return{s:function e(){r=t[Symbol.iterator]()},n:function e(){var t=r.next();return n=t.done,t},e:function e(t){a=!0,o=t},f:function e(){try{n||null==r.return||r.return()}finally{if(a)throw o}}}}function _unsupportedIterableToArray(e,t){if(e){if(“string”==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return”Map”===(r=”Object”===r&&e.constructor?e.constructor.name:r)||”Set”===r?Array.from(e):”Arguments”===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function e(t){return typeof t}:function e(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}var HurrytimerCampaign=function(){function i(e,t,r){_classCallCheck(this,i),this.config=t,this.elementRef=e,this.actionsOptions=hurrytimer_ajax_object.actionsOptions,this.restartOptions=hurrytimer_ajax_object.restartOptions,this.recurTimeoutId=-1,this.recurIntervalId=-1,this.retryCount=0,this.startEventDispatched=!1,this.state=r,this.restartIntervalId=-1,this.currentEndDate=null}return _createClass(i,[{key:"setCookie",value:function e(t){var r={expires:365};hurrytimer_ajax_object.COOKIEPATH&&(r.path=hurrytimer_ajax_object.COOKIEPATH),hurrytimer_ajax_object.COOKIE_DOMAIN&&(r.domain=hurrytimer_ajax_object.COOKIE_DOMAIN),Cookies.set(this.config.cookieName,t,r),this.config.reset_token&&Cookies.set("".concat(this.config.cookieName,"_reset_token"),this.config.reset_token,{expires:365})}},{key:"getEndDate",value:function e(){if(this.config.isRegular)return new Date(this.config.endDate);var t=new Date(parseInt(this.config.endDate));return this.isValidDate(t)&&this.config.endDate&&!this.should_reset()&&!this.allowRestart()&&!this.config.reload_reset||"object"!==_typeof(t)||null==t.setTime||(this.unDismissStickyBar(),t.setTime(this.calculateDate().getTime())),this.setCookie(t.getTime()),this.updateTimestamp(t.getTime()),this.currentEndDate=t}},{key:"isValidDate",value:function e(t){return"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(t.getTime())}},{key:"updateTimestamp",value:function e(t){var t;void 0!==jQuery.ajax&&(t={url:hurrytimer_ajax_object.ajax_url,async:!0,type:"POST",data:{nonce:hurrytimer_ajax_object.ajax_nonce,timestamp:t,cid:this.config.id,action:"hurryt/update_timestamp"}},jQuery.ajax(t))}},{key:"should_reset",value:function e(){return this.config.should_reset}},{key:"unDismissStickyBar",value:function e(){Cookies.remove("_ht_CDT-".concat(this.config.id,"_dismissed"))}},{key:"allowRestart",value:function e(){return!this.config.isRegular&&(this.isExpired()&&(this.allowRestartImmediately()||this.allowRestartAfterReload()||this.durationSinceExpiryIsOver()))}},{key:"isExpired",value:function e(){var t=new Date;return this.config.endDate=this.config.restart_duration}},{key:”allowRestartAfterReload”,value:function e(){return parseInt(this.config.restart)===parseInt(this.restartOptions.afterReload)}},{key:”allowRestartImmediately”,value:function e(){return parseInt(this.config.restart)===parseInt(this.restartOptions.immediately)}},{key:”shouldRestartAfterDuration”,value:function e(){return this.config.restart==this.restartOptions.after_duration}},{key:”hasAction”,value:function e(){return this.config.actions.length}},{key:”calculateDate”,value:function e(){var t=new Date;return t.setSeconds(t.getSeconds()+this.config.duration),t}},{key:”executeActions”,value:function e(){if(1===parseInt(hurrytimer_ajax_object.disable_actions))return!1;if(this.hasAction()){var t=_createForOfIteratorHelper(this.config.actions),r;try{for(t.s();!(r=t.n()).done;){var i=r.value,n=new HurrytimerAction(this.elementRef,this.config);switch(i.id){case this.actionsOptions.redirect:HurrytimerAction.redirect(i.redirectUrl);break;case this.actionsOptions.displayMessage:n.displayMessage(i.message);break;case this.actionsOptions.hideAddToCartButton:n.hideAddToCartButton();break;case this.actionsOptions.stockStatus:this.config.isRegular&&n.changeStockStatus(this.config.id,i.wcStockStatus);break;case this.actionsOptions.hide:n.hide();break;case this.actionsOptions.expire_coupon:n.expireCoupon(i.coupon,hurrytimer_ajax_object.expire_coupon_message)}}}catch(e){t.e(e)}finally{t.f()}}}},{key:”maybeShowCampaign”,value:function e(){var t;this.elementRef.length&&!this.config.run_in_background&&((t=this.elementRef.parent().find(‘.hurrytimer-campaign-message[data-id=”‘.concat(this.config.id,'”]’))).length&&t.remove(),this.elementRef.removeClass(“hurryt-loading”));var r=this.elementRef.closest(“.hurrytimer-sticky”),t;r.length&&((t=this.elementRef.find(“.hurrytimer-campaign-message”)).length&&t.remove(),r.removeClass(“hurryt-loading”))}},{key:”waitThenRun”,value:function e(){var t=this;this.restartIntervalId=setInterval(function(){t.durationSinceExpiryIsOver()&&(clearInterval(t.restartIntervalId),t.run())},1e3)}},{key:”run”,value:function e(){var t=this;this.triggerInitEvent(),this.elementRef.countdown(this.getEndDate(),function(e){return t.onCountdownUpdate(e)});var r=this.elementRef.closest(“.hurrytimer-sticky”);this.handleStickyBar(r)}},{key:”handleStickyBar”,value:function e(t){var r=this,i;0!==t.length&&(null==Cookies.get(“_ht_CDT-“.concat(this.config.id,”_dismissed”))?t.on(“click”,”.hurrytimer-sticky-close”,function(){return r.onStickyBarDismiss(t)}):this.hideStickyBar(t))}},{key:”hideStickyBar”,value:function e(t){var r;0!==t.length&&(r=”0px”===t.css(“top”),t.remove(),r?jQuery(“body”).css(“margin-top”,0):jQuery(“body”).css(“margin-bottom”,0))}},{key:”onStickyBarDismiss”,value:function e(t){this.hideStickyBar(t),Cookies.set(“_ht_CDT-“.concat(this.config.id,”_dismissed”),”1″,{expires:+this.config.sticky_bar_hide_timeout})}},{key:”onCountdownUpdate”,value:function e(t){this.render(t),this.maybeShowCampaign(),t.elapsed&&”finish”===t.type&&(this.executeActions(),this.triggerFinishEvent(),this.maybeRecur(),this.allowRestartImmediately()&&this.run(),this.shouldRestartAfterDuration()&&this.waitThenRun())}},{key:”triggerFinishEvent”,value:function e(){var t={id:this.config.id,mode:this.config.mode,endAt:this.config.endDate};this.elementRef.trigger(“hurryt:finished”,t)}},{key:”triggerInitEvent”,value:function e(){var t={id:this.config.id,mode:this.config.mode,endAt:this.config.endDate};jQuery(“.hurrytimer-campaign”).trigger(“hurryt:init”,t)}},{key:”triggerStartEvent”,value:function e(){var t;this.startEventDispatched||(t={id:this.config.id,mode:this.config.mode,endAt:this.config.endDate},this.elementRef.trigger(“hurryt:started”,t),this.startEventDispatched=!0)}},{key:”render”,value:function e(t){hurrytimer_ajax_object.run_in_background?this.elementRef.html(“”):this.elementRef.find(“.hurrytimer-timer”).html(t.strftime(this.config.template)),this.triggerStartEvent()}},{key:”willRecurNow”,value:function e(){var t=new Date;return t.getTime()+1e3*(60-t.getSeconds())>=this.getEndDate().getTime()+1e3*this.config.timeToNextRecurrence}},{key:”maybeRecur”,value:function e(){var r=this;this.config.recurr&&void 0!==jQuery.ajax&&(clearTimeout(this.recurTimeoutId),clearInterval(this.recurIntervalId),this.recurIntervalId=setInterval(function(){r.willRecurNow()&&(clearInterval(r.recurIntervalId),jQuery.ajax({url:hurrytimer_ajax_object.ajax_url,data:{action:”next_recurrence”,nonce:hurrytimer_ajax_object.ajax_nonce,id:r.config.id},error:function e(){10!==r.retryCount&&(r.retryCount++,setTimeout(function(){r.maybeRecur()},1e3))},success:function e(t){var t=t.data;r.retryCount=0,t&&(isNaN(t.endTimestamp)||(r.config.endDate=t.endTimestamp,r.run()))}}))},1e3))}}]),i}();function _typeof(e){return(_typeof=”function”==typeof Symbol&&”symbol”==typeof Symbol.iterator?function e(t){return typeof t}:function e(t){return t&&”function”==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?”symbol”:typeof t})(e)}!function(i){var n={reseting:[]},a=i(“body”);function r(e){var t=e.data(“config”),r;void 0!==t&&(“object”!==_typeof(t)&&(t=JSON.parse(t.replace(/\s+/g,” “))),e.removeAttr(“data-config”),e.trigger(“hurryt:pre-init”,{id:t.id,mode:t.mode,endAt:t.endAt}),(r=e.closest(“.hurrytimer-sticky”)).length&&(a.append(r),i(window).resize(function(){“0px”===r.css(“top”)?a.css(“margin-top”,r.outerHeight()):a.css(“margin-bottom”,r.outerHeight())}),setTimeout(function(){i(window).trigger(“resize”)})),new HurrytimerCampaign(e,t,n).run())}i.initialize(“.hurrytimer-campaign”,function(){0===i(this).parents(“div[data-elementor-type=popup]”).length&&r(i(this))}),i(document).on(“elementor/popup/show”,function(e,t){i(“.elementor-“.concat(t,” .hurrytimer-campaign”)).each(function(){r(i(this))})})}(jQuery);

The post 2687a875ed4ddd8d4646a02e9688f1b9-scripts appeared first on Compass.


Viewing all articles
Browse latest Browse all 840

Trending Articles