foundation-sites
Version:
The most advanced responsive front-end framework in the world.
3 lines (2 loc) • 2.45 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("./foundation.core")):"function"==typeof define&&define.amd?define(["./foundation.core"],e):"object"==typeof exports?exports["foundation.util.timer"]=e(require("./foundation.core")):(t.__FOUNDATION_EXTERNAL__=t.__FOUNDATION_EXTERNAL__||{},t.__FOUNDATION_EXTERNAL__["foundation.util.timer"]=e(t.__FOUNDATION_EXTERNAL__["foundation.core"]))}(window,function(n){return o={"./foundation.core":function(t,e){t.exports=n},"./js/entries/plugins/foundation.util.timer.js":function(t,e,n){"use strict";n.r(e);var o=n("./foundation.core");n.d(e,"Foundation",function(){return o.Foundation});var r=n("./js/foundation.util.timer.js");n.d(e,"Timer",function(){return r.Timer}),o.Foundation.Timer=r.Timer},"./js/foundation.util.timer.js":function(t,e,n){"use strict";function o(e,t,n){var o,r,i=this,u=t.duration,a=Object.keys(e.data())[0]||"timer",f=-1;this.isPaused=!1,this.restart=function(){f=-1,clearTimeout(r),this.start()},this.start=function(){this.isPaused=!1,clearTimeout(r),f=f<=0?u:f,e.data("paused",!1),o=Date.now(),r=setTimeout(function(){t.infinite&&i.restart(),n&&"function"==typeof n&&n()},f),e.trigger("timerstart.zf.".concat(a))},this.pause=function(){this.isPaused=!0,clearTimeout(r),e.data("paused",!0);var t=Date.now();f-=t-o,e.trigger("timerpaused.zf.".concat(a))}}n.r(e),n.d(e,"Timer",function(){return o})},27:function(t,e,n){t.exports=n("./js/entries/plugins/foundation.util.timer.js")}},i={},r.m=o,r.c=i,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=27);function r(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};return o[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}var o,i});
//# sourceMappingURL=foundation.util.timer.min.js.map