From 9375aa7ab24e452c9fdc335b2852b881eae1fb9b Mon Sep 17 00:00:00 2001 From: Rik Schennink Date: Mon, 2 Nov 2020 09:52:22 +0100 Subject: [PATCH] add credits prop --- .nvmrc | 1 + CHANGELOG.md | 5 ++ dist/flip.css | 76 ++++--------------------------- dist/flip.js | 28 ++++++++++-- dist/flip.min.css | 4 +- dist/flip.min.js | 4 +- dist/tick.view.flip.amd.js | 2 +- dist/tick.view.flip.commonjs.js | 2 +- dist/tick.view.flip.css | 2 +- dist/tick.view.flip.global.js | 2 +- dist/tick.view.flip.global.min.js | 2 +- dist/tick.view.flip.jquery.js | 2 +- dist/tick.view.flip.jquery.min.js | 2 +- dist/tick.view.flip.min.css | 2 +- dist/tick.view.flip.module.js | 2 +- example/flip/flip.min.css | 4 +- example/flip/flip.min.js | 4 +- example/index.html | 5 +- package.json | 2 +- tick/tick.core.amd.js | 26 ++++++++++- tick/tick.core.commonjs.js | 26 ++++++++++- tick/tick.core.css | 74 ++++-------------------------- tick/tick.core.global.js | 26 ++++++++++- tick/tick.core.global.min.js | 6 +-- tick/tick.core.jquery.js | 26 ++++++++++- tick/tick.core.jquery.min.js | 6 +-- tick/tick.core.kickstart.js | 26 ++++++++++- tick/tick.core.kickstart.min.js | 6 +-- tick/tick.core.min.css | 4 +- tick/tick.core.module.js | 26 ++++++++++- 30 files changed, 226 insertions(+), 177 deletions(-) create mode 100644 .nvmrc diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..399cb98 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v10.15.3 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b2bf9d..4fcdae4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +**1.8.0** | 02-11-2020 + +- Add credits property. + + **1.7.2** | 25-06-2019 - Fix issue with JavaScript based templates not rendering correctly. diff --git a/dist/flip.css b/dist/flip.css index 252852e..cb16094 100644 --- a/dist/flip.css +++ b/dist/flip.css @@ -1,5 +1,5 @@ /* - * @pqina/tick v1.7.6 - Counters Made Easy + * @pqina/tick v1.8.0 - Counters Made Easy * Copyright (c) 2020 PQINA - https://github.com/pqina/tick/ */ .tick { @@ -18,6 +18,14 @@ max-width: 100%; } .tick span[data-view] { display: inline-block; } + .tick .tick-credits { + position: absolute; + right: 0; + bottom: 0; + opacity: .4; + text-decoration: none; + font-size: 11px; + color: inherit; } .tick [data-layout~='pad'] { margin: -.25em; } .tick [data-layout~='pad'] > * { @@ -182,72 +190,8 @@ top: 0; bottom: 0; } -/* - -// Default Visual Style - - -.tick-text[data-style*='transition'] { - // prevents width changes when animating between empty space and characters - min-width:1ex; - text-align:center; -} - -// flipper -.tick-flip { - - // distance from other possible flippers - margin-left:.0625em; - margin-right:.0625em; - - // prevents width changes when animating between empty space and characters - min-width:1.125em; - - // sets default border radius - border-radius:.125em; - - // default spacing - letter-spacing: .25em; - text-indent: .25em; -} - -.tick-flip-front, -.tick-flip-back { - color:#eee; - background-color:#333; - box-shadow:0 .125em .3125em rgba(0,0,0,.25), 0 .02125em .06125em rgba(0,0,0,.25); -} - -// matrix -.tick-matrix-char { - margin:0 .05em; -} - -.tick-matrix-pixel { - width:5px; - height:5px; - margin:1px; - background-color:currentColor; - border-radius:2px; -} - -// meter (horizontal / vertical) -.tick-meter-rail { - background-color:#eee; -} - -.tick-meter-fill { - background-color:currentColor; -} - -// meter (ring) -.tick-meter canvas { - -} - */ - /* - * @pqina/flip v1.7.7 - A Beautifully Animated Flip Clock + * @pqina/flip v1.8.0 - A Beautifully Animated Flip Clock * Copyright (c) 2020 PQINA - https://pqina.nl/flip/ */ /** diff --git a/dist/flip.js b/dist/flip.js index 0d28b1f..b7dce76 100644 --- a/dist/flip.js +++ b/dist/flip.js @@ -239,7 +239,7 @@ if (!Object.keys) { /* eslint-disable */ /* - * @pqina/flip v1.7.7 - A Beautifully Animated Flip Clock + * @pqina/flip v1.8.0 - A Beautifully Animated Flip Clock * Copyright (c) 2020 PQINA - https://pqina.nl/flip/ */ (function(root, undefined) { @@ -743,7 +743,7 @@ module.exports = index; /* eslint-disable */ /* - * @pqina/tick v1.7.6 - Counters Made Easy + * @pqina/tick v1.8.0 - Counters Made Easy * Copyright (c) 2020 PQINA - https://github.com/pqina/tick/ */ (function(root, plugins, undefined) { @@ -3644,6 +3644,7 @@ var Tick = function () { this._constants = null; this._presets = null; this._updater = null; + this._credits = null; // callback methods this._didInit = null; @@ -3735,6 +3736,7 @@ var Tick = function () { this._value = this._options.value; this._presets = this._options.presets; this._constants = this._options.constants; + this._credits = this._options.credits; // no more use of options behind this line // --------------------------------------- @@ -3775,6 +3777,18 @@ var Tick = function () { // done with init this._didInit(this, this.value); + + // credits + if (this._credits) { + var credits = document.createElement('a'); + credits.className = 'tick-credits'; + credits.href = this._credits.url; + credits.tabindex = -1; + credits.target = '_blank'; + credits.rel = 'noopener noreferrer'; + credits.textContent = this._credits.label; + this._element.appendChild(credits); + } } }, { key: '_update', @@ -3819,7 +3833,11 @@ var Tick = function () { didInit: function didInit(tick) {}, didUpdate: function didUpdate(tick, value) {}, willDestroy: function willDestroy(tick) {}, - didDestroy: function didDestroy(tick) {} + didDestroy: function didDestroy(tick) {}, + credits: { + label: 'Powered by PQINA', + url: 'https://pqina.nl/?ref=credits' + } }; } }]); @@ -3936,6 +3954,10 @@ var getOptionsFromAttributes = function getOptionsFromAttributes(element) { } } + if (dataset.credits === 'false') { + options.credits = false; + } + return options; }; diff --git a/dist/flip.min.css b/dist/flip.min.css index ee933a8..f3133bc 100644 --- a/dist/flip.min.css +++ b/dist/flip.min.css @@ -1,5 +1,5 @@ /* - * @pqina/flip v1.7.7 - A Beautifully Animated Flip Clock + * @pqina/flip v1.8.0 - A Beautifully Animated Flip Clock * Copyright (c) 2020 PQINA - https://pqina.nl/flip/ */ -.tick{box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default;position:relative;z-index:1;line-height:1.4}.tick *{box-sizing:inherit}.tick [data-view]{max-width:100%}.tick span[data-view]{display:inline-block}.tick [data-layout~=pad]{margin:-.25em}.tick [data-layout~=pad]>*{margin:.25em}.tick [data-layout~=horizontal]{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}.tick [data-layout~=horizontal][data-layout~=baseline]{-ms-flex-align:baseline;align-items:baseline}.tick [data-layout~=horizontal][data-layout~=center]{-ms-flex-pack:center;justify-content:center}.tick [data-layout~=horizontal][data-layout~=right]{-ms-flex-pack:end;justify-content:flex-end}.tick [data-layout~=horizontal][data-layout~=left]{-ms-flex-pack:start;justify-content:flex-start}.tick [data-layout~=horizontal][data-layout~=fill],.tick [data-layout~=horizontal][data-layout~=stretch]{-ms-flex-line-pack:stretch;align-content:stretch;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.tick [data-layout~=horizontal][data-layout~=fill]>*,.tick [data-layout~=horizontal][data-layout~=stretch]>*{-ms-flex:1 0 0px;flex:1 0 0;width:100%}.tick [data-layout~=horizontal][data-layout~=multi-line]{-ms-flex-wrap:wrap;flex-wrap:wrap}.tick [data-layout~=horizontal][data-layout~=fit]{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-line-pack:center;align-content:center;white-space:nowrap;-ms-flex-pack:start;justify-content:flex-start}.tick [data-layout~=vertical]{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.tick [data-layout~=vertical][data-layout~=top]{-ms-flex-pack:start;justify-content:flex-start}.tick [data-layout~=vertical][data-layout~=bottom]{-ms-flex-pack:end;justify-content:flex-end;min-height:100%}.tick [data-layout~=vertical][data-layout~=middle]{-ms-flex-pack:center;justify-content:center;min-height:100%}.tick [data-layout~=vertical][data-layout~=left]{-ms-flex-align:start;align-items:flex-start}.tick [data-layout~=vertical][data-layout~=right]{-ms-flex-align:end;align-items:flex-end}.tick [data-layout~=vertical][data-layout~=center]{text-align:center}.tick [data-layout~=vertical][data-layout~=fill],.tick [data-layout~=vertical][data-layout~=stretch]{-ms-flex-align:stretch;align-items:stretch;min-height:100%}.tick [data-layout~=vertical][data-layout~=fill]>*,.tick [data-layout~=vertical][data-layout~=stretch]>*{-ms-flex:1 0 0px;flex:1 0 0}.tick [data-layout~=vertical]>*+*{margin-top:.5em}.tick [data-layout~=overlay]{position:relative}.tick [data-layout~=overlay]>*{margin:0}.tick [data-layout~=overlay][data-layout~=center]{text-align:center}.tick [data-layout~=overlay][data-layout~=left]{text-align:left}.tick [data-layout~=overlay][data-layout~=right]{text-align:right}.tick [data-layout~=overlay]>[data-overlay=fill],.tick [data-layout~=overlay]>[data-overlay=stretch]{position:absolute;left:0;right:0;top:0;bottom:0}.tick [data-layout~=overlay]>[data-overlay=center]{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;position:absolute;left:0;right:0;top:0;bottom:0}.tick-flip{position:relative;text-align:center}.tick-flip *{border-radius:inherit;white-space:pre;letter-spacing:inherit;text-indent:inherit}.tick-flip-front{border-bottom-left-radius:0;border-bottom-right-radius:0}.tick-flip-back{border-top-left-radius:0;border-top-right-radius:0}.tick-flip-spacer{display:block;visibility:hidden}.tick-flip-shadow{position:absolute;left:1px;right:1px;top:1px;bottom:1px;color:transparent!important;background:transparent!important}.tick-flip-shadow-top{bottom:calc(50% - 1px)}.tick-flip-shadow-bottom{top:calc(50% + 1px)}.tick-flip-card-shadow{position:absolute;left:.15em;right:.15em;bottom:.125em;height:.5em;background-color:transparent;border-radius:0;opacity:0;transform-origin:0 100%;box-shadow:0 .125em .25em rgba(0,0,0,.5),0 .125em .5em rgba(0,0,0,.75);z-index:0}.tick-flip-card{position:absolute;z-index:1;left:0;top:0;width:100%;height:100%;perspective:4em}.tick-flip-panel-back,.tick-flip-panel-front{position:absolute;left:0;width:100%;height:51%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform-style:preserve-3d}.tick-flip-panel-back-text,.tick-flip-panel-front-text{position:absolute;left:-1px;top:0;right:-1px;height:100%;overflow:hidden}.tick-flip-panel-text-wrapper{position:absolute;left:0;top:0;right:0;height:100%}.tick-flip-panel-back-text .tick-flip-panel-text-wrapper{height:200%;top:-100%}.tick-flip-panel-front{transform-origin:center bottom;top:0;z-index:2;box-shadow:inset 0 1px hsla(0,0%,100%,.05)}.tick-flip-panel-back{transform-origin:center top;top:50%;z-index:1;box-shadow:inset 0 -1px rgba(0,0,0,.1)}.tick-flip-panel-back:after{z-index:1;content:"";position:absolute;left:0;top:0;width:100%;height:100%;background-image:linear-gradient(180deg,rgba(0,0,0,.3) 1px,rgba(0,0,0,.15) 0,transparent 30%)}.tick-flip-panel-back-shadow{z-index:2}.tick-flip-panel-back-highlight{z-index:3}.tick-flip-panel-back-highlight,.tick-flip-panel-back-shadow{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.tick-flip-panel-back-highlight,.tick-flip-panel-back-shadow,.tick-flip-panel-front-shadow{position:absolute;left:0;top:0;right:0;bottom:0;opacity:0}.tick-flip-panel-front-shadow{background-image:linear-gradient(0deg,rgba(0,0,0,.8),rgba(0,0,0,.3))}.tick-flip-panel-back-shadow{background-image:linear-gradient(180deg,rgba(0,0,0,.7),rgba(0,0,0,.5))}.tick-flip-panel-back-highlight{background-image:linear-gradient(180deg,hsla(0,0%,100%,.15),hsla(0,0%,100%,.3))}.tick [data-style*="shadow:inner"],.tick [data-style*="shadow:inner"] .tick-flip-card-shadow,.tick [data-style*="shadow:none"] .tick-flip-card-shadow,.tick [data-style*="shadow:none"] .tick-flip-panel-back,.tick [data-style*="shadow:none"] .tick-flip-panel-front,.tick [data-style*="shadow:none"] .tick-flip-shadow{box-shadow:none}.tick [data-style*="shadow:none"] .tick-flip-back:after,.tick [data-style*="shadow:none"] .tick-flip-panel-back-shadow,.tick [data-style*="shadow:none"] .tick-flip-panel-back-text:after,.tick [data-style*="shadow:none"] .tick-flip-panel-front-shadow{background-image:none}.tick [data-style*="rounded:none"]{border-radius:0}.tick [data-style*="rounded:panels"] .tick-flip-front,.tick [data-style*="rounded:panels"] .tick-flip-shadow-bottom{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.tick [data-style*="rounded:panels"] .tick-flip-back,.tick [data-style*="rounded:panels"] .tick-flip-panel-back:after,.tick [data-style*="rounded:panels"] .tick-flip-shadow-top{border-top-left-radius:inherit;border-top-right-radius:inherit}.tick-flip{margin-left:.0625em;margin-right:.0625em;min-width:1.125em;border-radius:.125em;letter-spacing:.25em;text-indent:.25em}.tick-flip-panel{color:#edebeb;background-color:#333232}.tick-flip-shadow{box-shadow:0 .125em .3125em rgba(0,0,0,.25),0 .02125em .06125em rgba(0,0,0,.25)} \ No newline at end of file +.tick{box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default;position:relative;z-index:1;line-height:1.4}.tick *{box-sizing:inherit}.tick [data-view]{max-width:100%}.tick span[data-view]{display:inline-block}.tick .tick-credits{position:absolute;right:0;bottom:0;opacity:.4;text-decoration:none;font-size:11px;color:inherit}.tick [data-layout~=pad]{margin:-.25em}.tick [data-layout~=pad]>*{margin:.25em}.tick [data-layout~=horizontal]{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}.tick [data-layout~=horizontal][data-layout~=baseline]{-ms-flex-align:baseline;align-items:baseline}.tick [data-layout~=horizontal][data-layout~=center]{-ms-flex-pack:center;justify-content:center}.tick [data-layout~=horizontal][data-layout~=right]{-ms-flex-pack:end;justify-content:flex-end}.tick [data-layout~=horizontal][data-layout~=left]{-ms-flex-pack:start;justify-content:flex-start}.tick [data-layout~=horizontal][data-layout~=fill],.tick [data-layout~=horizontal][data-layout~=stretch]{-ms-flex-line-pack:stretch;align-content:stretch;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.tick [data-layout~=horizontal][data-layout~=fill]>*,.tick [data-layout~=horizontal][data-layout~=stretch]>*{-ms-flex:1 0 0px;flex:1 0 0;width:100%}.tick [data-layout~=horizontal][data-layout~=multi-line]{-ms-flex-wrap:wrap;flex-wrap:wrap}.tick [data-layout~=horizontal][data-layout~=fit]{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-line-pack:center;align-content:center;white-space:nowrap;-ms-flex-pack:start;justify-content:flex-start}.tick [data-layout~=vertical]{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.tick [data-layout~=vertical][data-layout~=top]{-ms-flex-pack:start;justify-content:flex-start}.tick [data-layout~=vertical][data-layout~=bottom]{-ms-flex-pack:end;justify-content:flex-end;min-height:100%}.tick [data-layout~=vertical][data-layout~=middle]{-ms-flex-pack:center;justify-content:center;min-height:100%}.tick [data-layout~=vertical][data-layout~=left]{-ms-flex-align:start;align-items:flex-start}.tick [data-layout~=vertical][data-layout~=right]{-ms-flex-align:end;align-items:flex-end}.tick [data-layout~=vertical][data-layout~=center]{text-align:center}.tick [data-layout~=vertical][data-layout~=fill],.tick [data-layout~=vertical][data-layout~=stretch]{-ms-flex-align:stretch;align-items:stretch;min-height:100%}.tick [data-layout~=vertical][data-layout~=fill]>*,.tick [data-layout~=vertical][data-layout~=stretch]>*{-ms-flex:1 0 0px;flex:1 0 0}.tick [data-layout~=vertical]>*+*{margin-top:.5em}.tick [data-layout~=overlay]{position:relative}.tick [data-layout~=overlay]>*{margin:0}.tick [data-layout~=overlay][data-layout~=center]{text-align:center}.tick [data-layout~=overlay][data-layout~=left]{text-align:left}.tick [data-layout~=overlay][data-layout~=right]{text-align:right}.tick [data-layout~=overlay]>[data-overlay=fill],.tick [data-layout~=overlay]>[data-overlay=stretch]{position:absolute;left:0;right:0;top:0;bottom:0}.tick [data-layout~=overlay]>[data-overlay=center]{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;position:absolute;left:0;right:0;top:0;bottom:0}.tick-flip{position:relative;text-align:center}.tick-flip *{border-radius:inherit;white-space:pre;letter-spacing:inherit;text-indent:inherit}.tick-flip-front{border-bottom-left-radius:0;border-bottom-right-radius:0}.tick-flip-back{border-top-left-radius:0;border-top-right-radius:0}.tick-flip-spacer{display:block;visibility:hidden}.tick-flip-shadow{position:absolute;left:1px;right:1px;top:1px;bottom:1px;color:transparent!important;background:transparent!important}.tick-flip-shadow-top{bottom:calc(50% - 1px)}.tick-flip-shadow-bottom{top:calc(50% + 1px)}.tick-flip-card-shadow{position:absolute;left:.15em;right:.15em;bottom:.125em;height:.5em;background-color:transparent;border-radius:0;opacity:0;transform-origin:0 100%;box-shadow:0 .125em .25em rgba(0,0,0,.5),0 .125em .5em rgba(0,0,0,.75);z-index:0}.tick-flip-card{position:absolute;z-index:1;left:0;top:0;width:100%;height:100%;perspective:4em}.tick-flip-panel-back,.tick-flip-panel-front{position:absolute;left:0;width:100%;height:51%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform-style:preserve-3d}.tick-flip-panel-back-text,.tick-flip-panel-front-text{position:absolute;left:-1px;top:0;right:-1px;height:100%;overflow:hidden}.tick-flip-panel-text-wrapper{position:absolute;left:0;top:0;right:0;height:100%}.tick-flip-panel-back-text .tick-flip-panel-text-wrapper{height:200%;top:-100%}.tick-flip-panel-front{transform-origin:center bottom;top:0;z-index:2;box-shadow:inset 0 1px hsla(0,0%,100%,.05)}.tick-flip-panel-back{transform-origin:center top;top:50%;z-index:1;box-shadow:inset 0 -1px rgba(0,0,0,.1)}.tick-flip-panel-back:after{z-index:1;content:"";position:absolute;left:0;top:0;width:100%;height:100%;background-image:linear-gradient(180deg,rgba(0,0,0,.3) 1px,rgba(0,0,0,.15) 0,transparent 30%)}.tick-flip-panel-back-shadow{z-index:2}.tick-flip-panel-back-highlight{z-index:3}.tick-flip-panel-back-highlight,.tick-flip-panel-back-shadow{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.tick-flip-panel-back-highlight,.tick-flip-panel-back-shadow,.tick-flip-panel-front-shadow{position:absolute;left:0;top:0;right:0;bottom:0;opacity:0}.tick-flip-panel-front-shadow{background-image:linear-gradient(0deg,rgba(0,0,0,.8),rgba(0,0,0,.3))}.tick-flip-panel-back-shadow{background-image:linear-gradient(180deg,rgba(0,0,0,.7),rgba(0,0,0,.5))}.tick-flip-panel-back-highlight{background-image:linear-gradient(180deg,hsla(0,0%,100%,.15),hsla(0,0%,100%,.3))}.tick [data-style*="shadow:inner"],.tick [data-style*="shadow:inner"] .tick-flip-card-shadow,.tick [data-style*="shadow:none"] .tick-flip-card-shadow,.tick [data-style*="shadow:none"] .tick-flip-panel-back,.tick [data-style*="shadow:none"] .tick-flip-panel-front,.tick [data-style*="shadow:none"] .tick-flip-shadow{box-shadow:none}.tick [data-style*="shadow:none"] .tick-flip-back:after,.tick [data-style*="shadow:none"] .tick-flip-panel-back-shadow,.tick [data-style*="shadow:none"] .tick-flip-panel-back-text:after,.tick [data-style*="shadow:none"] .tick-flip-panel-front-shadow{background-image:none}.tick [data-style*="rounded:none"]{border-radius:0}.tick [data-style*="rounded:panels"] .tick-flip-front,.tick [data-style*="rounded:panels"] .tick-flip-shadow-bottom{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.tick [data-style*="rounded:panels"] .tick-flip-back,.tick [data-style*="rounded:panels"] .tick-flip-panel-back:after,.tick [data-style*="rounded:panels"] .tick-flip-shadow-top{border-top-left-radius:inherit;border-top-right-radius:inherit}.tick-flip{margin-left:.0625em;margin-right:.0625em;min-width:1.125em;border-radius:.125em;letter-spacing:.25em;text-indent:.25em}.tick-flip-panel{color:#edebeb;background-color:#333232}.tick-flip-shadow{box-shadow:0 .125em .3125em rgba(0,0,0,.25),0 .02125em .06125em rgba(0,0,0,.25)} \ No newline at end of file diff --git a/dist/flip.min.js b/dist/flip.min.js index ff37e69..11857c0 100644 --- a/dist/flip.min.js +++ b/dist/flip.min.js @@ -1,7 +1,7 @@ /* eslint-disable */ /* - * @pqina/flip v1.7.7 - A Beautifully Animated Flip Clock + * @pqina/flip v1.8.0 - A Beautifully Animated Flip Clock * Copyright (c) 2020 PQINA - https://pqina.nl/flip/ */ -!function(){"use strict";function c(t){return"function"==typeof t||"[object Function]"===e.call(t)}function f(t){var e,n=(e=Number(t),isNaN(e)?0:0!==e&&isFinite(e)?(0>>0,r=arguments[1]>>0,i=r<0?Math.max(n+r,0):Math.min(r,n),o=arguments[2],a=void 0===o?n:o>>0,u=a<0?Math.max(n+a,0):Math.min(a,n);i>>0,r=arguments[1],i=0;i!==n;i++)if(t.call(r,this[i],i,e))return this[i]}}),Array.from||(Array.from=(e=Object.prototype.toString,r=Math.pow(2,53)-1,function(t,e,n){var r=Object(t);if(null==t)throw new TypeError("Array.from requires an array-like object - not null or undefined");var i,o=1t.length)for(;r.definitions.length>t.length;){r.definitions.pop().presenter.destroy()}t.forEach(function(t,e){var n=r.definitions[e];n||(n=r.definitions[e]=ie(r.definition),r.update=i(n),n.presenter.appendTo(r.root,"right"===r.align?"first":"last"))}),t.forEach(function(t,e){return r.update(r.definitions[e],t)}),r.views=t,at(r)}function W(t,e){var n=document.createElement(t);return e&&(n.className=e),n}function Y(n,r,i){var t=new MutationObserver(function(e){r.forEach(function(t){e.filter(function(t){return r.includes(t.attributeName)}).length&&i(n.getAttribute(t))})});return t.observe(n,{attributes:!0}),t}function V(t){return t instanceof HTMLElement}function B(t,e,n,r){var i=3window.scrollY+window.innerHeight)}function $(t){return t.trim()}function X(t,e){var n=e.toString();return st[n]||(st[n]={}),st[n][t]||(st[n][t]=e(t)),st[n][t]}function Z(t){return t?parseFloat(t)*(/ms$/.test(t)?1:1e3):0}function J(t){return t.match(/[a-z]+(?:\(.*?\))?\s?(?:origin\(.*?\))?\s?(?:[a-z]+\(.*?\))?[ .a-z-0-9]*/g).map(wt)}function K(t){var e=t.match(/follow-gradient|horizontal-gradient|vertical-gradient/)[0];return{type:e,colors:t.substr(e.length).match(/(?:transparent|rgb\(.*?\)|hsl\(.*?\)|hsla\(.*?\)|rgba\(.*?\)|[a-z]+|#[abcdefABCDEF\d]+)\s?(?:[\d]{1,3}%?)?/g).map(_t)}}function Q(t){return"string"!=typeof t?t:t.match(/([-.\d]+(?:%|ms|s|deg|cm|em|ch|ex|q|in|mm|pc|pt|px|vh|vw|vmin|vmax)?)|[%#A-Za-z0-9,.()]+/g)}function tt(t){return t.trim().split("-").map(function(t,e){return 0=t.destination||t.origin>=t.destination&&t.position<=t.destination)&&(e(),t.velocity=0,t.position=t.destination)})}},Lt=function(e,t){var n=1=t.destination||t.origin>=t.destination&&t.position<=t.destination)&&(e(),t.velocity=0,t.position=t.destination)})}},Ut=function(e,t,n,r){var i=1"===i[o+1]?(c=!0,u.trim().length&&(l.push([u.trim()]),u=""),e+=2):","===f?(c&&u.trim().length&&(l.push([u.trim()]),u="",c=!1),l=Xt(l,r),u=$t(r,u)):u+=f,e++}}return(c&&u.trim().length||!c&&u.trim().length&&!l.length)&&(l.push([u.trim()]),u=""),Xt(l,r),$t(r,u),e}(0,t,e),e}function Jt(a){function u(e,t){e.transform(t,function(t){e.presenter.update(t)},a),n||(n=!0,r())}var n=!1,r=function t(){a.baseDefinition.presenter.draw(),requestAnimationFrame(t)};return function t(e){var n,r,i,o;return e.presenter=(r=t,o=void 0,(n=e).repeat?o=Yt(n.root,n.repeat,r):"string"==typeof n.view?o=Vt(n.view,n.root,n.style):(i=n).children&&i.children.length&&(o=Wt(n.root,n.children,r)),o),e.transform=ue(e.transform,a),u}(a.baseDefinition)}function Kt(i){for(var t=arguments.length,o=Array(1=h.Week-o.idle)return o.wait=!0,o;o.dist=a}else{o.time=f(S(r),o.day);var u=Je(o.time,e);if(u.wait)return o;o.time=S(m(r,o.time)&&u.date?u.date:u.from);var l=o.time-r;l<0&&o.time.setDate(o.time.getDate()+7),o.dist=l}return o.date=S(o.time),o}function je(t,e){return/januari|februari|march|april|may|june|july|august|september|october|november|december/.test(e)?function(n,e){var t=e.match(/januari|februari|march|april|may|june|july|august|september|october|november|december|[\d]+th|\dst|\dnd|first|last|at\s[\d]+(?::[\d]+)?(?::[\d]+)?/g);if(1=h.Day-r.idle?r.wait=!0:(r.dist=i,r.date=S(r.time)),r):/hours|hour|minutes|minute|seconds|second/.test(e)?Je(t,e):null;var n,r,i}function qe(t,e){if(!0===t)return n=function(t){e(t.getTime()-b().getTime())},r=new XMLHttpRequest,i=Date.now(),r.open("HEAD",window.location+"?noCache="+i),r.setRequestHeader("Content-Type","text/html"),r.setRequestHeader("Cache-Control","no-cache"),r.onload=function(){var t=.5*(i-Date.now()),e=new Date(r.getResponseHeader("Date"));n(new Date(e.getTime()+t))},void r.send();var n,r,i;"string"!=typeof t?setTimeout(function(){e(0)},0):setTimeout(function(){e(l(t).getTime()-b().getTime())},0)}function Ge(t){return it({complete:!1,offset:null,value:null,timer:null,onload:function(){},onupdate:function(){}},t)}function We(){var n=0=n.till)return n;if(n.interval>n.till-n.from)return n;var r=t-n.from,i=n.interval-r%n.interval;return null!==n.idle&&i>=n.interval-n.idle?n.wait=!0:(n.dist=i,n.date=new Date(t.getTime()+n.dist)),n},Ke={format:["d","h","m","s"],cascade:!0,server:null,interval:1e3},Qe=function(t,e,n,r){e[t]=n[t],r(Ae(e))},tn={ascii:function(){return function(t,e){return e((t+"").charCodeAt(0))}},char:function(t){var r=1(""+t).length?"left"===r?(""+n+t).slice(-n.length):(""+t+n).substring(0,n.length):t)}},number:function(){var r=0>>0,r=arguments[1]>>0,i=r<0?Math.max(n+r,0):Math.min(r,n),o=arguments[2],a=void 0===o?n:o>>0,u=a<0?Math.max(n+a,0):Math.min(a,n);i>>0,r=arguments[1],i=0;i!==n;i++)if(t.call(r,this[i],i,e))return this[i]}}),Array.from||(Array.from=(e=Object.prototype.toString,r=Math.pow(2,53)-1,function(t,e,n){var r=Object(t);if(null==t)throw new TypeError("Array.from requires an array-like object - not null or undefined");var i,o=1t.length)for(;r.definitions.length>t.length;){r.definitions.pop().presenter.destroy()}t.forEach(function(t,e){var n=r.definitions[e];n||(n=r.definitions[e]=ie(r.definition),r.update=i(n),n.presenter.appendTo(r.root,"right"===r.align?"first":"last"))}),t.forEach(function(t,e){return r.update(r.definitions[e],t)}),r.views=t,at(r)}function W(t,e){var n=document.createElement(t);return e&&(n.className=e),n}function Y(n,r,i){var t=new MutationObserver(function(e){r.forEach(function(t){e.filter(function(t){return r.includes(t.attributeName)}).length&&i(n.getAttribute(t))})});return t.observe(n,{attributes:!0}),t}function V(t){return t instanceof HTMLElement}function B(t,e,n,r){var i=3window.scrollY+window.innerHeight)}function $(t){return t.trim()}function X(t,e){var n=e.toString();return st[n]||(st[n]={}),st[n][t]||(st[n][t]=e(t)),st[n][t]}function Z(t){return t?parseFloat(t)*(/ms$/.test(t)?1:1e3):0}function J(t){return t.match(/[a-z]+(?:\(.*?\))?\s?(?:origin\(.*?\))?\s?(?:[a-z]+\(.*?\))?[ .a-z-0-9]*/g).map(wt)}function K(t){var e=t.match(/follow-gradient|horizontal-gradient|vertical-gradient/)[0];return{type:e,colors:t.substr(e.length).match(/(?:transparent|rgb\(.*?\)|hsl\(.*?\)|hsla\(.*?\)|rgba\(.*?\)|[a-z]+|#[abcdefABCDEF\d]+)\s?(?:[\d]{1,3}%?)?/g).map(_t)}}function Q(t){return"string"!=typeof t?t:t.match(/([-.\d]+(?:%|ms|s|deg|cm|em|ch|ex|q|in|mm|pc|pt|px|vh|vw|vmin|vmax)?)|[%#A-Za-z0-9,.()]+/g)}function tt(t){return t.trim().split("-").map(function(t,e){return 0=t.destination||t.origin>=t.destination&&t.position<=t.destination)&&(e(),t.velocity=0,t.position=t.destination)})}},Lt=function(e,t){var n=1=t.destination||t.origin>=t.destination&&t.position<=t.destination)&&(e(),t.velocity=0,t.position=t.destination)})}},Ut=function(e,t,n,r){var i=1"===i[o+1]?(c=!0,u.trim().length&&(l.push([u.trim()]),u=""),e+=2):","===f?(c&&u.trim().length&&(l.push([u.trim()]),u="",c=!1),l=Xt(l,r),u=$t(r,u)):u+=f,e++}}return(c&&u.trim().length||!c&&u.trim().length&&!l.length)&&(l.push([u.trim()]),u=""),Xt(l,r),$t(r,u),e}(0,t,e),e}function Jt(a){function u(e,t){e.transform(t,function(t){e.presenter.update(t)},a),n||(n=!0,r())}var n=!1,r=function t(){a.baseDefinition.presenter.draw(),requestAnimationFrame(t)};return function t(e){var n,r,i,o;return e.presenter=(r=t,o=void 0,(n=e).repeat?o=Yt(n.root,n.repeat,r):"string"==typeof n.view?o=Vt(n.view,n.root,n.style):(i=n).children&&i.children.length&&(o=Wt(n.root,n.children,r)),o),e.transform=ue(e.transform,a),u}(a.baseDefinition)}function Kt(i){for(var t=arguments.length,o=Array(1=h.Week-o.idle)return o.wait=!0,o;o.dist=a}else{o.time=f(O(r),o.day);var u=Je(o.time,e);if(u.wait)return o;o.time=O(m(r,o.time)&&u.date?u.date:u.from);var l=o.time-r;l<0&&o.time.setDate(o.time.getDate()+7),o.dist=l}return o.date=O(o.time),o}function je(t,e){return/januari|februari|march|april|may|june|july|august|september|october|november|december/.test(e)?function(n,e){var t=e.match(/januari|februari|march|april|may|june|july|august|september|october|november|december|[\d]+th|\dst|\dnd|first|last|at\s[\d]+(?::[\d]+)?(?::[\d]+)?/g);if(1=h.Day-r.idle?r.wait=!0:(r.dist=i,r.date=O(r.time)),r):/hours|hour|minutes|minute|seconds|second/.test(e)?Je(t,e):null;var n,r,i}function qe(t,e){if(!0===t)return n=function(t){e(t.getTime()-b().getTime())},r=new XMLHttpRequest,i=Date.now(),r.open("HEAD",window.location+"?noCache="+i),r.setRequestHeader("Content-Type","text/html"),r.setRequestHeader("Cache-Control","no-cache"),r.onload=function(){var t=.5*(i-Date.now()),e=new Date(r.getResponseHeader("Date"));n(new Date(e.getTime()+t))},void r.send();var n,r,i;"string"!=typeof t?setTimeout(function(){e(0)},0):setTimeout(function(){e(l(t).getTime()-b().getTime())},0)}function Ge(t){return it({complete:!1,offset:null,value:null,timer:null,onload:function(){},onupdate:function(){}},t)}function We(){var n=0=n.till)return n;if(n.interval>n.till-n.from)return n;var r=t-n.from,i=n.interval-r%n.interval;return null!==n.idle&&i>=n.interval-n.idle?n.wait=!0:(n.dist=i,n.date=new Date(t.getTime()+n.dist)),n},Ke={format:["d","h","m","s"],cascade:!0,server:null,interval:1e3},Qe=function(t,e,n,r){e[t]=n[t],r(Ae(e))},tn={ascii:function(){return function(t,e){return e((t+"").charCodeAt(0))}},char:function(t){var r=1(""+t).length?"left"===r?(""+n+t).slice(-n.length):(""+t+n).substring(0,n.length):t)}},number:function(){var r=0*{margin:.25em}.tick [data-layout~=horizontal]{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}.tick [data-layout~=horizontal][data-layout~=baseline]{-ms-flex-align:baseline;align-items:baseline}.tick [data-layout~=horizontal][data-layout~=center]{-ms-flex-pack:center;justify-content:center}.tick [data-layout~=horizontal][data-layout~=right]{-ms-flex-pack:end;justify-content:flex-end}.tick [data-layout~=horizontal][data-layout~=left]{-ms-flex-pack:start;justify-content:flex-start}.tick [data-layout~=horizontal][data-layout~=fill],.tick [data-layout~=horizontal][data-layout~=stretch]{-ms-flex-line-pack:stretch;align-content:stretch;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.tick [data-layout~=horizontal][data-layout~=fill]>*,.tick [data-layout~=horizontal][data-layout~=stretch]>*{-ms-flex:1 0 0px;flex:1 0 0;width:100%}.tick [data-layout~=horizontal][data-layout~=multi-line]{-ms-flex-wrap:wrap;flex-wrap:wrap}.tick [data-layout~=horizontal][data-layout~=fit]{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-line-pack:center;align-content:center;white-space:nowrap;-ms-flex-pack:start;justify-content:flex-start}.tick [data-layout~=vertical]{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.tick [data-layout~=vertical][data-layout~=top]{-ms-flex-pack:start;justify-content:flex-start}.tick [data-layout~=vertical][data-layout~=bottom]{-ms-flex-pack:end;justify-content:flex-end;min-height:100%}.tick [data-layout~=vertical][data-layout~=middle]{-ms-flex-pack:center;justify-content:center;min-height:100%}.tick [data-layout~=vertical][data-layout~=left]{-ms-flex-align:start;align-items:flex-start}.tick [data-layout~=vertical][data-layout~=right]{-ms-flex-align:end;align-items:flex-end}.tick [data-layout~=vertical][data-layout~=center]{text-align:center}.tick [data-layout~=vertical][data-layout~=fill],.tick [data-layout~=vertical][data-layout~=stretch]{-ms-flex-align:stretch;align-items:stretch;min-height:100%}.tick [data-layout~=vertical][data-layout~=fill]>*,.tick [data-layout~=vertical][data-layout~=stretch]>*{-ms-flex:1 0 0px;flex:1 0 0}.tick [data-layout~=vertical]>*+*{margin-top:.5em}.tick [data-layout~=overlay]{position:relative}.tick [data-layout~=overlay]>*{margin:0}.tick [data-layout~=overlay][data-layout~=center]{text-align:center}.tick [data-layout~=overlay][data-layout~=left]{text-align:left}.tick [data-layout~=overlay][data-layout~=right]{text-align:right}.tick [data-layout~=overlay]>[data-overlay=fill],.tick [data-layout~=overlay]>[data-overlay=stretch]{position:absolute;left:0;right:0;top:0;bottom:0}.tick [data-layout~=overlay]>[data-overlay=center]{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;position:absolute;left:0;right:0;top:0;bottom:0}.tick-flip{position:relative;text-align:center}.tick-flip *{border-radius:inherit;white-space:pre;letter-spacing:inherit;text-indent:inherit}.tick-flip-front{border-bottom-left-radius:0;border-bottom-right-radius:0}.tick-flip-back{border-top-left-radius:0;border-top-right-radius:0}.tick-flip-spacer{display:block;visibility:hidden}.tick-flip-shadow{position:absolute;left:1px;right:1px;top:1px;bottom:1px;color:transparent!important;background:transparent!important}.tick-flip-shadow-top{bottom:calc(50% - 1px)}.tick-flip-shadow-bottom{top:calc(50% + 1px)}.tick-flip-card-shadow{position:absolute;left:.15em;right:.15em;bottom:.125em;height:.5em;background-color:transparent;border-radius:0;opacity:0;transform-origin:0 100%;box-shadow:0 .125em .25em rgba(0,0,0,.5),0 .125em .5em rgba(0,0,0,.75);z-index:0}.tick-flip-card{position:absolute;z-index:1;left:0;top:0;width:100%;height:100%;perspective:4em}.tick-flip-panel-back,.tick-flip-panel-front{position:absolute;left:0;width:100%;height:51%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform-style:preserve-3d}.tick-flip-panel-back-text,.tick-flip-panel-front-text{position:absolute;left:-1px;top:0;right:-1px;height:100%;overflow:hidden}.tick-flip-panel-text-wrapper{position:absolute;left:0;top:0;right:0;height:100%}.tick-flip-panel-back-text .tick-flip-panel-text-wrapper{height:200%;top:-100%}.tick-flip-panel-front{transform-origin:center bottom;top:0;z-index:2;box-shadow:inset 0 1px hsla(0,0%,100%,.05)}.tick-flip-panel-back{transform-origin:center top;top:50%;z-index:1;box-shadow:inset 0 -1px rgba(0,0,0,.1)}.tick-flip-panel-back:after{z-index:1;content:"";position:absolute;left:0;top:0;width:100%;height:100%;background-image:linear-gradient(180deg,rgba(0,0,0,.3) 1px,rgba(0,0,0,.15) 0,transparent 30%)}.tick-flip-panel-back-shadow{z-index:2}.tick-flip-panel-back-highlight{z-index:3}.tick-flip-panel-back-highlight,.tick-flip-panel-back-shadow{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.tick-flip-panel-back-highlight,.tick-flip-panel-back-shadow,.tick-flip-panel-front-shadow{position:absolute;left:0;top:0;right:0;bottom:0;opacity:0}.tick-flip-panel-front-shadow{background-image:linear-gradient(0deg,rgba(0,0,0,.8),rgba(0,0,0,.3))}.tick-flip-panel-back-shadow{background-image:linear-gradient(180deg,rgba(0,0,0,.7),rgba(0,0,0,.5))}.tick-flip-panel-back-highlight{background-image:linear-gradient(180deg,hsla(0,0%,100%,.15),hsla(0,0%,100%,.3))}.tick [data-style*="shadow:inner"],.tick [data-style*="shadow:inner"] .tick-flip-card-shadow,.tick [data-style*="shadow:none"] .tick-flip-card-shadow,.tick [data-style*="shadow:none"] .tick-flip-panel-back,.tick [data-style*="shadow:none"] .tick-flip-panel-front,.tick [data-style*="shadow:none"] .tick-flip-shadow{box-shadow:none}.tick [data-style*="shadow:none"] .tick-flip-back:after,.tick [data-style*="shadow:none"] .tick-flip-panel-back-shadow,.tick [data-style*="shadow:none"] .tick-flip-panel-back-text:after,.tick [data-style*="shadow:none"] .tick-flip-panel-front-shadow{background-image:none}.tick [data-style*="rounded:none"]{border-radius:0}.tick [data-style*="rounded:panels"] .tick-flip-front,.tick [data-style*="rounded:panels"] .tick-flip-shadow-bottom{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.tick [data-style*="rounded:panels"] .tick-flip-back,.tick [data-style*="rounded:panels"] .tick-flip-panel-back:after,.tick [data-style*="rounded:panels"] .tick-flip-shadow-top{border-top-left-radius:inherit;border-top-right-radius:inherit}.tick-flip{margin-left:.0625em;margin-right:.0625em;min-width:1.125em;border-radius:.125em;letter-spacing:.25em;text-indent:.25em}.tick-flip-panel{color:#edebeb;background-color:#333232}.tick-flip-shadow{box-shadow:0 .125em .3125em rgba(0,0,0,.25),0 .02125em .06125em rgba(0,0,0,.25)} \ No newline at end of file + .tick{box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default;position:relative;z-index:1;line-height:1.4}.tick *{box-sizing:inherit}.tick [data-view]{max-width:100%}.tick span[data-view]{display:inline-block}.tick .tick-credits{position:absolute;right:0;bottom:0;opacity:.4;text-decoration:none;font-size:11px;color:inherit}.tick [data-layout~=pad]{margin:-.25em}.tick [data-layout~=pad]>*{margin:.25em}.tick [data-layout~=horizontal]{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}.tick [data-layout~=horizontal][data-layout~=baseline]{-ms-flex-align:baseline;align-items:baseline}.tick [data-layout~=horizontal][data-layout~=center]{-ms-flex-pack:center;justify-content:center}.tick [data-layout~=horizontal][data-layout~=right]{-ms-flex-pack:end;justify-content:flex-end}.tick [data-layout~=horizontal][data-layout~=left]{-ms-flex-pack:start;justify-content:flex-start}.tick [data-layout~=horizontal][data-layout~=fill],.tick [data-layout~=horizontal][data-layout~=stretch]{-ms-flex-line-pack:stretch;align-content:stretch;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.tick [data-layout~=horizontal][data-layout~=fill]>*,.tick [data-layout~=horizontal][data-layout~=stretch]>*{-ms-flex:1 0 0px;flex:1 0 0;width:100%}.tick [data-layout~=horizontal][data-layout~=multi-line]{-ms-flex-wrap:wrap;flex-wrap:wrap}.tick [data-layout~=horizontal][data-layout~=fit]{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-line-pack:center;align-content:center;white-space:nowrap;-ms-flex-pack:start;justify-content:flex-start}.tick [data-layout~=vertical]{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.tick [data-layout~=vertical][data-layout~=top]{-ms-flex-pack:start;justify-content:flex-start}.tick [data-layout~=vertical][data-layout~=bottom]{-ms-flex-pack:end;justify-content:flex-end;min-height:100%}.tick [data-layout~=vertical][data-layout~=middle]{-ms-flex-pack:center;justify-content:center;min-height:100%}.tick [data-layout~=vertical][data-layout~=left]{-ms-flex-align:start;align-items:flex-start}.tick [data-layout~=vertical][data-layout~=right]{-ms-flex-align:end;align-items:flex-end}.tick [data-layout~=vertical][data-layout~=center]{text-align:center}.tick [data-layout~=vertical][data-layout~=fill],.tick [data-layout~=vertical][data-layout~=stretch]{-ms-flex-align:stretch;align-items:stretch;min-height:100%}.tick [data-layout~=vertical][data-layout~=fill]>*,.tick [data-layout~=vertical][data-layout~=stretch]>*{-ms-flex:1 0 0px;flex:1 0 0}.tick [data-layout~=vertical]>*+*{margin-top:.5em}.tick [data-layout~=overlay]{position:relative}.tick [data-layout~=overlay]>*{margin:0}.tick [data-layout~=overlay][data-layout~=center]{text-align:center}.tick [data-layout~=overlay][data-layout~=left]{text-align:left}.tick [data-layout~=overlay][data-layout~=right]{text-align:right}.tick [data-layout~=overlay]>[data-overlay=fill],.tick [data-layout~=overlay]>[data-overlay=stretch]{position:absolute;left:0;right:0;top:0;bottom:0}.tick [data-layout~=overlay]>[data-overlay=center]{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;position:absolute;left:0;right:0;top:0;bottom:0}.tick-flip{position:relative;text-align:center}.tick-flip *{border-radius:inherit;white-space:pre;letter-spacing:inherit;text-indent:inherit}.tick-flip-front{border-bottom-left-radius:0;border-bottom-right-radius:0}.tick-flip-back{border-top-left-radius:0;border-top-right-radius:0}.tick-flip-spacer{display:block;visibility:hidden}.tick-flip-shadow{position:absolute;left:1px;right:1px;top:1px;bottom:1px;color:transparent!important;background:transparent!important}.tick-flip-shadow-top{bottom:calc(50% - 1px)}.tick-flip-shadow-bottom{top:calc(50% + 1px)}.tick-flip-card-shadow{position:absolute;left:.15em;right:.15em;bottom:.125em;height:.5em;background-color:transparent;border-radius:0;opacity:0;transform-origin:0 100%;box-shadow:0 .125em .25em rgba(0,0,0,.5),0 .125em .5em rgba(0,0,0,.75);z-index:0}.tick-flip-card{position:absolute;z-index:1;left:0;top:0;width:100%;height:100%;perspective:4em}.tick-flip-panel-back,.tick-flip-panel-front{position:absolute;left:0;width:100%;height:51%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform-style:preserve-3d}.tick-flip-panel-back-text,.tick-flip-panel-front-text{position:absolute;left:-1px;top:0;right:-1px;height:100%;overflow:hidden}.tick-flip-panel-text-wrapper{position:absolute;left:0;top:0;right:0;height:100%}.tick-flip-panel-back-text .tick-flip-panel-text-wrapper{height:200%;top:-100%}.tick-flip-panel-front{transform-origin:center bottom;top:0;z-index:2;box-shadow:inset 0 1px hsla(0,0%,100%,.05)}.tick-flip-panel-back{transform-origin:center top;top:50%;z-index:1;box-shadow:inset 0 -1px rgba(0,0,0,.1)}.tick-flip-panel-back:after{z-index:1;content:"";position:absolute;left:0;top:0;width:100%;height:100%;background-image:linear-gradient(180deg,rgba(0,0,0,.3) 1px,rgba(0,0,0,.15) 0,transparent 30%)}.tick-flip-panel-back-shadow{z-index:2}.tick-flip-panel-back-highlight{z-index:3}.tick-flip-panel-back-highlight,.tick-flip-panel-back-shadow{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.tick-flip-panel-back-highlight,.tick-flip-panel-back-shadow,.tick-flip-panel-front-shadow{position:absolute;left:0;top:0;right:0;bottom:0;opacity:0}.tick-flip-panel-front-shadow{background-image:linear-gradient(0deg,rgba(0,0,0,.8),rgba(0,0,0,.3))}.tick-flip-panel-back-shadow{background-image:linear-gradient(180deg,rgba(0,0,0,.7),rgba(0,0,0,.5))}.tick-flip-panel-back-highlight{background-image:linear-gradient(180deg,hsla(0,0%,100%,.15),hsla(0,0%,100%,.3))}.tick [data-style*="shadow:inner"],.tick [data-style*="shadow:inner"] .tick-flip-card-shadow,.tick [data-style*="shadow:none"] .tick-flip-card-shadow,.tick [data-style*="shadow:none"] .tick-flip-panel-back,.tick [data-style*="shadow:none"] .tick-flip-panel-front,.tick [data-style*="shadow:none"] .tick-flip-shadow{box-shadow:none}.tick [data-style*="shadow:none"] .tick-flip-back:after,.tick [data-style*="shadow:none"] .tick-flip-panel-back-shadow,.tick [data-style*="shadow:none"] .tick-flip-panel-back-text:after,.tick [data-style*="shadow:none"] .tick-flip-panel-front-shadow{background-image:none}.tick [data-style*="rounded:none"]{border-radius:0}.tick [data-style*="rounded:panels"] .tick-flip-front,.tick [data-style*="rounded:panels"] .tick-flip-shadow-bottom{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.tick [data-style*="rounded:panels"] .tick-flip-back,.tick [data-style*="rounded:panels"] .tick-flip-panel-back:after,.tick [data-style*="rounded:panels"] .tick-flip-shadow-top{border-top-left-radius:inherit;border-top-right-radius:inherit}.tick-flip{margin-left:.0625em;margin-right:.0625em;min-width:1.125em;border-radius:.125em;letter-spacing:.25em;text-indent:.25em}.tick-flip-panel{color:#edebeb;background-color:#333232}.tick-flip-shadow{box-shadow:0 .125em .3125em rgba(0,0,0,.25),0 .02125em .06125em rgba(0,0,0,.25)} \ No newline at end of file diff --git a/example/flip/flip.min.js b/example/flip/flip.min.js index c01015b..11857c0 100644 --- a/example/flip/flip.min.js +++ b/example/flip/flip.min.js @@ -1,7 +1,7 @@ /* eslint-disable */ /* - * flip v1.7.1 - A Beautifully Animated Flip Clock + * @pqina/flip v1.8.0 - A Beautifully Animated Flip Clock * Copyright (c) 2020 PQINA - https://pqina.nl/flip/ */ -!function(){"use strict";function c(t){return"function"==typeof t||"[object Function]"===e.call(t)}function f(t){var e,n=(e=Number(t),isNaN(e)?0:0!==e&&isFinite(e)?(0>>0,r=arguments[1]>>0,i=r<0?Math.max(n+r,0):Math.min(r,n),o=arguments[2],a=void 0===o?n:o>>0,u=a<0?Math.max(n+a,0):Math.min(a,n);i>>0,r=arguments[1],i=0;i!==n;i++)if(t.call(r,this[i],i,e))return this[i]}}),Array.from||(Array.from=(e=Object.prototype.toString,r=Math.pow(2,53)-1,function(t,e,n){var r=Object(t);if(null==t)throw new TypeError("Array.from requires an array-like object - not null or undefined");var i,o=1t.length)for(;r.definitions.length>t.length;){r.definitions.pop().presenter.destroy()}t.forEach(function(t,e){var n=r.definitions[e];n||(n=r.definitions[e]=ie(r.definition),r.update=i(n),n.presenter.appendTo(r.root,"right"===r.align?"first":"last"))}),t.forEach(function(t,e){return r.update(r.definitions[e],t)}),r.views=t,at(r)}function W(t,e){var n=document.createElement(t);return e&&(n.className=e),n}function Y(n,r,i){var t=new MutationObserver(function(e){r.forEach(function(t){e.filter(function(t){return r.includes(t.attributeName)}).length&&i(n.getAttribute(t))})});return t.observe(n,{attributes:!0}),t}function V(t){return t instanceof HTMLElement}function B(t,e,n,r){var i=3window.scrollY+window.innerHeight)}function $(t){return t.trim()}function X(t,e){var n=e.toString();return st[n]||(st[n]={}),st[n][t]||(st[n][t]=e(t)),st[n][t]}function Z(t){return t?parseFloat(t)*(/ms$/.test(t)?1:1e3):0}function J(t){return t.match(/[a-z]+(?:\(.*?\))?\s?(?:origin\(.*?\))?\s?(?:[a-z]+\(.*?\))?[ .a-z-0-9]*/g).map(wt)}function K(t){var e=t.match(/follow-gradient|horizontal-gradient|vertical-gradient/)[0];return{type:e,colors:t.substr(e.length).match(/(?:transparent|rgb\(.*?\)|hsl\(.*?\)|hsla\(.*?\)|rgba\(.*?\)|[a-z]+|#[abcdefABCDEF\d]+)\s?(?:[\d]{1,3}%?)?/g).map(_t)}}function Q(t){return"string"!=typeof t?t:t.match(/([-.\d]+(?:%|ms|s|deg|cm|em|ch|ex|q|in|mm|pc|pt|px|vh|vw|vmin|vmax)?)|[%#A-Za-z0-9,.()]+/g)}function tt(t){return t.trim().split("-").map(function(t,e){return 0=t.destination||t.origin>=t.destination&&t.position<=t.destination)&&(e(),t.velocity=0,t.position=t.destination)})}},Lt=function(e,t){var n=1=t.destination||t.origin>=t.destination&&t.position<=t.destination)&&(e(),t.velocity=0,t.position=t.destination)})}},Ut=function(e,t,n,r){var i=1"===i[o+1]?(c=!0,u.trim().length&&(l.push([u.trim()]),u=""),e+=2):","===f?(c&&u.trim().length&&(l.push([u.trim()]),u="",c=!1),l=Xt(l,r),u=$t(r,u)):u+=f,e++}}return(c&&u.trim().length||!c&&u.trim().length&&!l.length)&&(l.push([u.trim()]),u=""),Xt(l,r),$t(r,u),e}(0,t,e),e}function Jt(a){function u(e,t){e.transform(t,function(t){e.presenter.update(t)},a),n||(n=!0,r())}var n=!1,r=function t(){a.baseDefinition.presenter.draw(),requestAnimationFrame(t)};return function t(e){var n,r,i,o;return e.presenter=(r=t,o=void 0,(n=e).repeat?o=Yt(n.root,n.repeat,r):"string"==typeof n.view?o=Vt(n.view,n.root,n.style):(i=n).children&&i.children.length&&(o=Wt(n.root,n.children,r)),o),e.transform=ue(e.transform,a),u}(a.baseDefinition)}function Kt(i){for(var t=arguments.length,o=Array(1=h.Week-o.idle)return o.wait=!0,o;o.dist=a}else{o.time=f(S(r),o.day);var u=Je(o.time,e);if(u.wait)return o;o.time=S(m(r,o.time)&&u.date?u.date:u.from);var l=o.time-r;l<0&&o.time.setDate(o.time.getDate()+7),o.dist=l}return o.date=S(o.time),o}function je(t,e){return/januari|februari|march|april|may|june|july|august|september|october|november|december/.test(e)?function(n,e){var t=e.match(/januari|februari|march|april|may|june|july|august|september|october|november|december|[\d]+th|\dst|\dnd|first|last|at\s[\d]+(?::[\d]+)?(?::[\d]+)?/g);if(1=h.Day-r.idle?r.wait=!0:(r.dist=i,r.date=S(r.time)),r):/hours|hour|minutes|minute|seconds|second/.test(e)?Je(t,e):null;var n,r,i}function qe(t,e){if(!0===t)return n=function(t){e(t.getTime()-b().getTime())},r=new XMLHttpRequest,i=Date.now(),r.open("HEAD",window.location+"?noCache="+i),r.setRequestHeader("Content-Type","text/html"),r.setRequestHeader("Cache-Control","no-cache"),r.onload=function(){var t=.5*(i-Date.now()),e=new Date(r.getResponseHeader("Date"));n(new Date(e.getTime()+t))},void r.send();var n,r,i;"string"!=typeof t?setTimeout(function(){e(0)},0):setTimeout(function(){e(l(t).getTime()-b().getTime())},0)}function Ge(t){return it({complete:!1,offset:null,value:null,timer:null,onload:function(){},onupdate:function(){}},t)}function We(){var n=0=n.till)return n;if(n.interval>n.till-n.from)return n;var r=t-n.from,i=n.interval-r%n.interval;return null!==n.idle&&i>=n.interval-n.idle?n.wait=!0:(n.dist=i,n.date=new Date(t.getTime()+n.dist)),n},Ke={format:["d","h","m","s"],cascade:!0,server:null,interval:1e3},Qe=function(t,e,n,r){e[t]=n[t],r(Ae(e))},tn={ascii:function(){return function(t,e){return e((t+"").charCodeAt(0))}},char:function(t){var r=1(""+t).length?"left"===r?(""+n+t).slice(-n.length):(""+t+n).substring(0,n.length):t)}},number:function(){var r=0>>0,r=arguments[1]>>0,i=r<0?Math.max(n+r,0):Math.min(r,n),o=arguments[2],a=void 0===o?n:o>>0,u=a<0?Math.max(n+a,0):Math.min(a,n);i>>0,r=arguments[1],i=0;i!==n;i++)if(t.call(r,this[i],i,e))return this[i]}}),Array.from||(Array.from=(e=Object.prototype.toString,r=Math.pow(2,53)-1,function(t,e,n){var r=Object(t);if(null==t)throw new TypeError("Array.from requires an array-like object - not null or undefined");var i,o=1t.length)for(;r.definitions.length>t.length;){r.definitions.pop().presenter.destroy()}t.forEach(function(t,e){var n=r.definitions[e];n||(n=r.definitions[e]=ie(r.definition),r.update=i(n),n.presenter.appendTo(r.root,"right"===r.align?"first":"last"))}),t.forEach(function(t,e){return r.update(r.definitions[e],t)}),r.views=t,at(r)}function W(t,e){var n=document.createElement(t);return e&&(n.className=e),n}function Y(n,r,i){var t=new MutationObserver(function(e){r.forEach(function(t){e.filter(function(t){return r.includes(t.attributeName)}).length&&i(n.getAttribute(t))})});return t.observe(n,{attributes:!0}),t}function V(t){return t instanceof HTMLElement}function B(t,e,n,r){var i=3window.scrollY+window.innerHeight)}function $(t){return t.trim()}function X(t,e){var n=e.toString();return st[n]||(st[n]={}),st[n][t]||(st[n][t]=e(t)),st[n][t]}function Z(t){return t?parseFloat(t)*(/ms$/.test(t)?1:1e3):0}function J(t){return t.match(/[a-z]+(?:\(.*?\))?\s?(?:origin\(.*?\))?\s?(?:[a-z]+\(.*?\))?[ .a-z-0-9]*/g).map(wt)}function K(t){var e=t.match(/follow-gradient|horizontal-gradient|vertical-gradient/)[0];return{type:e,colors:t.substr(e.length).match(/(?:transparent|rgb\(.*?\)|hsl\(.*?\)|hsla\(.*?\)|rgba\(.*?\)|[a-z]+|#[abcdefABCDEF\d]+)\s?(?:[\d]{1,3}%?)?/g).map(_t)}}function Q(t){return"string"!=typeof t?t:t.match(/([-.\d]+(?:%|ms|s|deg|cm|em|ch|ex|q|in|mm|pc|pt|px|vh|vw|vmin|vmax)?)|[%#A-Za-z0-9,.()]+/g)}function tt(t){return t.trim().split("-").map(function(t,e){return 0=t.destination||t.origin>=t.destination&&t.position<=t.destination)&&(e(),t.velocity=0,t.position=t.destination)})}},Lt=function(e,t){var n=1=t.destination||t.origin>=t.destination&&t.position<=t.destination)&&(e(),t.velocity=0,t.position=t.destination)})}},Ut=function(e,t,n,r){var i=1"===i[o+1]?(c=!0,u.trim().length&&(l.push([u.trim()]),u=""),e+=2):","===f?(c&&u.trim().length&&(l.push([u.trim()]),u="",c=!1),l=Xt(l,r),u=$t(r,u)):u+=f,e++}}return(c&&u.trim().length||!c&&u.trim().length&&!l.length)&&(l.push([u.trim()]),u=""),Xt(l,r),$t(r,u),e}(0,t,e),e}function Jt(a){function u(e,t){e.transform(t,function(t){e.presenter.update(t)},a),n||(n=!0,r())}var n=!1,r=function t(){a.baseDefinition.presenter.draw(),requestAnimationFrame(t)};return function t(e){var n,r,i,o;return e.presenter=(r=t,o=void 0,(n=e).repeat?o=Yt(n.root,n.repeat,r):"string"==typeof n.view?o=Vt(n.view,n.root,n.style):(i=n).children&&i.children.length&&(o=Wt(n.root,n.children,r)),o),e.transform=ue(e.transform,a),u}(a.baseDefinition)}function Kt(i){for(var t=arguments.length,o=Array(1=h.Week-o.idle)return o.wait=!0,o;o.dist=a}else{o.time=f(O(r),o.day);var u=Je(o.time,e);if(u.wait)return o;o.time=O(m(r,o.time)&&u.date?u.date:u.from);var l=o.time-r;l<0&&o.time.setDate(o.time.getDate()+7),o.dist=l}return o.date=O(o.time),o}function je(t,e){return/januari|februari|march|april|may|june|july|august|september|october|november|december/.test(e)?function(n,e){var t=e.match(/januari|februari|march|april|may|june|july|august|september|october|november|december|[\d]+th|\dst|\dnd|first|last|at\s[\d]+(?::[\d]+)?(?::[\d]+)?/g);if(1=h.Day-r.idle?r.wait=!0:(r.dist=i,r.date=O(r.time)),r):/hours|hour|minutes|minute|seconds|second/.test(e)?Je(t,e):null;var n,r,i}function qe(t,e){if(!0===t)return n=function(t){e(t.getTime()-b().getTime())},r=new XMLHttpRequest,i=Date.now(),r.open("HEAD",window.location+"?noCache="+i),r.setRequestHeader("Content-Type","text/html"),r.setRequestHeader("Cache-Control","no-cache"),r.onload=function(){var t=.5*(i-Date.now()),e=new Date(r.getResponseHeader("Date"));n(new Date(e.getTime()+t))},void r.send();var n,r,i;"string"!=typeof t?setTimeout(function(){e(0)},0):setTimeout(function(){e(l(t).getTime()-b().getTime())},0)}function Ge(t){return it({complete:!1,offset:null,value:null,timer:null,onload:function(){},onupdate:function(){}},t)}function We(){var n=0=n.till)return n;if(n.interval>n.till-n.from)return n;var r=t-n.from,i=n.interval-r%n.interval;return null!==n.idle&&i>=n.interval-n.idle?n.wait=!0:(n.dist=i,n.date=new Date(t.getTime()+n.dist)),n},Ke={format:["d","h","m","s"],cascade:!0,server:null,interval:1e3},Qe=function(t,e,n,r){e[t]=n[t],r(Ae(e))},tn={ascii:function(){return function(t,e){return e((t+"").charCodeAt(0))}},char:function(t){var r=1(""+t).length?"left"===r?(""+n+t).slice(-n.length):(""+t+n).substring(0,n.length):t)}},number:function(){var r=0 Flip Example Preset - + @@ -16,6 +16,7 @@