/*! For license information please see amped.snippet.LICENSE.txt */ "use strict";(self.webpackChunkamped_snippet=self.webpackChunkamped_snippet||[]).push([[102],{2102:(t,e,n)=>{n.r(e),n.d(e,{CountdownService:()=>a});var o=n(3095);const r=t=>60*(t.hours||0)*60+60*(t.minutes||0)+(t.seconds||0),c=t=>{if(t.countdownType===o.Bh.RELATIVE){const e=r(t);return new Date(Date.now()+1e3*e)}return new Date(t.targetTimestamp)};var a=function(){function t(t){this.storageService=t}return t.prototype.initStorage=function(){this.storageService.set("countdowns",{})},t.prototype.getFromStorage=function(t,e,n){var o=(this.storageService.get("countdowns")||{})["".concat(t,"-").concat(e,"-").concat(r(n))];if(o)return new Date(o)},t.prototype.setToStorage=function(t,e,n){var o=this.storageService.get("countdowns")||{},a=c(n).valueOf();return o["".concat(t,"-").concat(e,"-").concat(r(n))]=a,this.storageService.set("countdowns",o),a},t.prototype.getCountdown=function(t,e,n){if(n.countdownType===o.Bh.ABSOLUTE)return c(n);var r=this.getFromStorage(t,e,n);if(r)return r;var a=this.setToStorage(t,e,n);return new Date(a)},t}()}}]);