@pqina/flip
Version:
A Beautifully Animated Flip Clock
8 lines (7 loc) • 53.3 kB
JavaScript
/* eslint-disable */
/*
* @pqina/tick v1.8.2 - Counters Made Easy
* Copyright (c) 2023 PQINA - https://github.com/pqina/tick/
*/
!function(t,n,e){"use strict";var r=function(){if(!t)var t={};var n={FONT:"font",VIEW:"view",TRANSFORM:"transform",EASING_FUNCTION:"easing-function",TRANSITION:"transition"},r={};r[n.FONT]={},r[n.VIEW]={},r[n.TRANSFORM]={},r[n.EASING_FUNCTION]={},r[n.TRANSITION]={};var i=function(t,n){if(!r[t])return null;for(var e in n)if(n.hasOwnProperty(e)){if(r[t][e])return null;r[t][e]=n[e]}},o=function(t,n,e){if(!r[t])throw"Can't add extension with type of \""+t+'", "'+t+'" is not a valid extension type. The following types are valid: '+ze(r);if(!/^[-a-z]+$/.test(n))throw"Can't add extension with name \""+n+'", "'+n+'" is contains invalid characters. Only lowercase alphabetical characters and dashes are allowed.';if(r[t][n])throw"Can't add extension with name \""+n+'", "'+n+'" is already added.';r[t][n]=e},u=function(t,n){if(!r[t])throw"Can't get extension with type of \""+t+'", "'+t+'" is not a valid extension type. The following types are available: '+ze(r);if(!r[t][n])throw"Can't get extension with name \""+n+'", "'+n+'" is not available. The following extensions are available: '+ze(r[t]);return r[t][n]},a=1,l=1e3,s=6e4,c=36e5,f=864e5,d=6048e5,h=2628e6,v=31536e6,p={Week:d,Day:f,Hour:c,Minute:s,Second:l,Millisecond:a,Month:h,Year:v},m=["Januari","Februari","March","April","May","June","July","August","September","October","November","December"];for(var g in p)if(p.hasOwnProperty(g)){var y=p[g];y===a?(p.mi=y,p.ms=y):y===h?p.M=y:p[g.charAt(0).toLowerCase()]=y,p[g.toLowerCase()]=y,p[g.toLowerCase()+"s"]=y}var w={Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6,Sunday:0},b={M:1,y:12},A=function(t){var n=new XMLHttpRequest,e=Date.now();n.open("HEAD",window.location+"?noCache="+e),n.setRequestHeader("Content-Type","text/html"),n.setRequestHeader("Cache-Control","no-cache"),n.onload=function(){var r=.5*(e-Date.now()),i=new Date(n.getResponseHeader("Date"));t(new Date(i.getTime()+r))},n.send()},_=function(t){return t instanceof Date},M=function(t,n){return t.setHours(n[0]||0,n[1]||0,n[2]||0,n[3]||0),t},D=function(t,n){var e=t.getDay(),r=n-e;return t.setDate(t.getDate()+r),t},N=function(t,n){var e=C(t.getMonth()+1,t.getFullYear());return n="last"===n?e:Math.max(1,Math.min(e,n)),t.setDate(n),t},E=function(t,n){return t.setMonth(m.map(function(t){return t.toLowerCase()}).indexOf(n)),t},I=function(t){var n=6e4*(new Date).getTimezoneOffset();if("Z"===t)return n;var e=t.match(/\+|-|[\d]{2}|[\d]{2}/g),r="-"===e.shift()?-1:1,i=parseInt(e[0],10),o=parseInt(e[1],10);return r*(36e5*i+6e4*o)+n},S=function(t){return new Date(Date.now()+t)},R=function(t,n){return new Date(t.getTime()+n)},T=function(t,n){return t.toDateString()===n.toDateString()},x=function(t,n){return t.getTime()===n.getTime()},C=function(t,n){return new Date(n,t,0).getDate()},O=function(t){return t.match(/(Z)|([+\-][0-9]{2}:?[0-9]*$)/g)?new Date(t):(t+=t.indexOf("T")!==-1?"Z":"",L(new Date(t)))},L=function(t){return new Date(t.getTime()+6e4*t.getTimezoneOffset())},U=function(t,n){return n.map(function(n){var e=p[n],r=Math.max(0,Math.floor(t/e));return t%=e,r})},k=function(t,n,e){var r=n-t,i=!1;if(r<0){r=t-n;var o=[n,t];t=o[0],n=o[1],i=!0}e||(e=["d","h","m"]);var u=e.indexOf("m");u>=0&&("y"===e[u-1]||"d"===e[u+1])&&(e[u].key="M");var a=void 0,l=void 0,s=void 0,c=e.includes("y"),f=e.includes("M");(f||c)&&(a=new Date(t.valueOf()+r),l=W(a,t),s=f?Math.floor(l):12*Math.floor(l/12),r=a.valueOf()-q(z(t),s).valueOf());var d=e.map(function(t){if("y"===t||"M"===t){var n=Math.max(0,Math.floor(l/b[t]));return l-=n*b[t],n}var e=p[t],i=Math.max(0,Math.floor(r/e));return r%=e,i});return i?d.map(function(t){return t>0?-t:t}):d},F=function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];if("number"==typeof n[0]&&"string"==typeof n[1]){if(!p[n[1]])throw'"'+n[1]+'" is not a valid amount.';return n[0]*p[n[1]]}return _(n[0])?k.apply(e,n):"number"==typeof n[0]&&Array.isArray(n[1])?U.apply(e,n):null},P=function(){return new Date},z=function(t){return new Date(t.valueOf())},q=function(t,n){return t.setMonth(t.getMonth()+n),t},W=function(t,n){var e=12*(n.getFullYear()-t.getFullYear())+(n.getMonth()-t.getMonth()),r=q(z(t),e),i=void 0,o=void 0;return n-r<0?(i=q(z(t),e-1),o=(n-r)/(r-i)):(i=q(z(t),e+1),o=(n-r)/(i-r)),-(e+o)},j=function(t){return{destroy:function(){t.destroyed=!0,t.frame&&cancelAnimationFrame(t.frame),t.styleObserver&&t.styleObserver.disconnect(),t.didResizeWindow&&window.removeEventListener("resize",t.didResizeWindow),t.root&&t.root.parentNode&&t.root.parentNode.removeChild(t.root)}}},G=function(t){var n=arguments.length>1&&arguments[1]!==e?arguments[1]:document.createElement("span"),r=arguments.length>2&&arguments[2]!==e?arguments[2]:null;return t.root=n,t.aligned=null,t.destroyed=!1,n&&r&&(t.root.classList.add("tick-"+r),t.root.setAttribute("data-view",r)),n&&n.dataset.layout&&(t.align=(n.dataset.layout.match(/left|right|center/)||[])[0]||"left"),{appendTo:function(n){var r=arguments.length>1&&arguments[1]!==e?arguments[1]:"last";if(!(!t.root||t.root&&t.root.parentNode)){if("last"===r)return void(n.childNodes.length&&n.childNodes[n.childNodes.length-1].nodeType===Node.TEXT_NODE?n.insertBefore(t.root,n.childNodes[n.childNodes.length-1]):n.appendChild(t.root));"first"===r&&(0===n.childNodes.length?n.appendChild(t.root):0===n.children.length&&n.childNodes.length?n.insertBefore(t.root,n.childNodes[n.childNodes.length-1]):n.insertBefore(t.root,n.children[0])),"string"!=typeof r&&n.insertBefore(t.root,r)}}}},Y=function(t,n){return t.definition=n,{setDefinition:function(n){t.definition=n}}},H=function(t,n,e,r){return{draw:function(){if(!t.dirty){if(e){var i=e(t);i&&$(t)}return!1}return n(t,r),$(t),t.dirty=!1,!0}}},$=function Di(t){if(!t.fit){if(!t.root||!(t.root.getAttribute("data-layout")||"").match(/fit/))return void(t.fit=!1);var n=window.getComputedStyle(t.root,null);t.fit=!0,t.fitInfo={currentFontSize:parseInt(n.getPropertyValue("font-size"),10)}}t.fitInfo.availableWidth=t.root.parentNode.clientWidth,t.fitInfo.currentWidth=t.root.scrollWidth;var e=Math.min(Math.max(4,t.fitInfo.availableWidth/t.fitInfo.currentWidth*t.fitInfo.currentFontSize),1024),r=Math.abs(e-t.fitInfo.currentFontSize);r<=1||(t.fitInfo.currentFontSize=e,t.root.style.fontSize=t.fitInfo.currentFontSize+"px",t.fitInfo.currentWidth/t.fitInfo.availableWidth<.5&&requestAnimationFrame(function(){return Di(t)}))},V=function(t){return t.dirty=!0,t.value=null,t.valueUpdateCount=0,t.isInitialValue=function(){return t.valueUpdateCount<=1},{reset:function(){t.dirty=!0,t.value=null,t.valueUpdateCount=0},update:function(n){Ue(t.value,n)||(t.value=n,t.valueUpdateCount++,t.dirty=!0)}}},Z=function(t){t.didResizeWindow=function(){t.dirty=!0},window.addEventListener("resize",t.didResizeWindow)},B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},X=(function(){function t(t){this.value=t}function n(n){function r(t,n){return new Promise(function(e,r){var o={key:t,arg:n,resolve:e,reject:r,next:null};a?a=a.next=o:(u=a=o,i(t,n))})}function i(e,r){try{var u=n[e](r),a=u.value;a instanceof t?Promise.resolve(a.value).then(function(t){i("next",t)},function(t){i("throw",t)}):o(u.done?"return":"normal",u.value)}catch(l){o("throw",l)}}function o(t,n){switch(t){case"return":u.resolve({value:n,done:!0});break;case"throw":u.reject(n);break;default:u.resolve({value:n,done:!1})}u=u.next,u?i(u.key,u.arg):a=null}var u,a;this._invoke=r,"function"!=typeof n["return"]&&(this["return"]=e)}return"function"==typeof Symbol&&Symbol.asyncIterator&&(n.prototype[Symbol.asyncIterator]=function(){return this}),n.prototype.next=function(t){return this._invoke("next",t)},n.prototype["throw"]=function(t){return this._invoke("throw",t)},n.prototype["return"]=function(t){return this._invoke("return",t)},{wrap:function(t){return function(){return new n(t.apply(this,arguments))}},await:function(n){return new t(n)}}}(),function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}),J=function(){function t(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(n,e,r){return e&&t(n.prototype,e),r&&t(n,r),n}}(),K=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t},Q=function(t){if(Array.isArray(t)){for(var n=0,e=Array(t.length);n<t.length;n++)e[n]=t[n];return e}return Array.from(t)},tt=function(t,n){var r=(t.definition||[]).concat();"right"===t.align&&r.reverse();var i=Array.isArray(t.value)?t.value.concat():"object"===B(t.value)?Se(t.value):t.value;r.forEach(function(e){if(!e.presenter){if(t.update=n(e),!e.presenter)return;e.presenter.appendTo(t.root)}}),r.filter(function(t){return t.presenter!==e}).forEach(function(n){Array.isArray(i)&&t.valueMapping?t.update(n,"indexes"===t.valueMapping?"right"===t.align?i.pop():i.shift():i):n.key&&i[n.key]!==e?t.update(n,i[n.key]):t.update(n,i)}),t.views=r,nt(t)},nt=function(t){var n=!1;return t.views.filter(function(t){return t.presenter!==e}).forEach(function(t){t.presenter.draw()&&(n=!0)}),n},et=function(t,n,e){var r={valueMapping:null};if(t&&t.dataset.valueMapping){var i=["none","indexes"],o=t.dataset.valueMapping;r.valueMapping=i.indexOf(o)!==-1?o:null}return Object.assign({},G(r,t),Z(r),V(r),Y(r,n),H(r,tt,nt,e),j(r))},rt=function(t,n,e){var r=Re(Array.isArray(t.value)?t.value:(t.value+"").split(""));if("right"===t.align&&r.reverse(),t.definitions.length>r.length)for(;t.definitions.length>r.length;){var i=t.definitions.pop();i.presenter.destroy()}r.forEach(function(e,r){var i=t.definitions[r];i||(i=t.definitions[r]=Qn(t.definition),t.update=n(i),i.presenter.appendTo(t.root,"right"===t.align?"first":"last"))}),r.forEach(function(n,e){return t.update(t.definitions[e],n)}),t.views=r,it(t)},it=function(t){var n=!1;return t.views.forEach(function(e,r){t.definitions[r].presenter.draw()&&(n=!0)}),n},ot=function(t,n,e){var r={definitions:[]};return Object.assign({},G(r,t),V(r),Y(r,n),H(r,rt,it,e),j(r))},ut="undefined"==typeof document?null:function(){for(var t=["webkit","Moz","ms","O"],n=0,e=t.length,r=void 0,i=document.createElement("div").style;n<e;n++)if(r=t[n]+"Transform",r in i)return t[n];return null}(),at=function(t,n){var e=t.childNodes[0];e?n!==e.nodeValue&&(e.nodeValue=n):(e=document.createTextNode(n),t.appendChild(e))},lt=function(t,n){var e=document.createElement(t);return n&&(e.className=n),e},st=function(t,n,e){var r=new MutationObserver(function(r){n.forEach(function(i){r.filter(function(t){return n.includes(t.attributeName)}).length&&e(t.getAttribute(i))})});return r.observe(t,{attributes:!0}),r},ct=function(t){return t instanceof HTMLElement},ft=function(t,n){t.style.transformOrigin=n},dt=function(t,n,r){var i=arguments.length>3&&arguments[3]!==e?arguments[3]:"";t.transforms||(t.transforms=[]);var o=t.transforms.find(function(t){return t.name===n});o?o.value=r:t.transforms.push({name:n,value:r,unit:i}),ht(t,t.transforms)},ht=function(t,n){t.style.transform=n.map(function(t){return t.name+"("+t.value+t.unit+")"}).join(" ")},vt=function(t){var n=t.getBoundingClientRect();return!(n.bottom<0)&&!(n.top>window.scrollY+window.innerHeight)},pt=function(t){return"string"==typeof t?"true"===t:t},mt=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},gt=function(t){return t.trim()},yt={},wt=function(t,n){var e=n.toString();return yt[e]||(yt[e]={}),yt[e][t]||(yt[e][t]=n(t)),yt[e][t]},bt=new RegExp("^[0-9]+$"),At=new RegExp("^(true|false)$"),_t=new RegExp("^[0-9.]+$"),Mt=new RegExp("color"),Dt=new RegExp("shadow"),Nt=new RegExp("^(follow-gradient|horizontal-gradient|vertical-gradient)"),Et=new RegExp("^[.0-9]+(?:ms|s){1}$"),It=new RegExp("^transition-?(?:in|out)?$"),St=new RegExp("^url\\("),Rt=function(t){return t?parseFloat(t)*(/ms$/.test(t)?1:1e3):0},Tt=function(t){return t.match(/[a-z]+(?:\(.*?\))?\s?(?:origin\(.*?\))?\s?(?:[a-z]+\(.*?\))?[ .a-z-0-9]*/g).map(xt)},xt=function(t){var n=t.match(/([a-z]+(?:\(.*?\))?)\s?(?:origin\((.*?)\))?\s?([a-z]+(?:\(.*?\))?)?\s?(?:([.0-9ms]+)?\s?(?:(ease-[a-z-]+))?\s?([.0-9ms]+)?)?/),r=se(n[1]),i=e,o=e,u=e,a=e,l=e;return n.slice(2).filter(function(t){return"undefined"!=typeof t}).forEach(function(t){Et.test(t)?"undefined"==typeof o?o=Rt(t):a=Rt(t):/ /.test(t)?i=t:/^ease-[a-z-]+$/.test(t)?u=t:/^[a-z]+/.test(t)&&(l=se(t))}),l&&(o=e,u=e),{name:r.name,parameters:r.parameters,duration:o,ease:u,delay:a,origin:i,resolver:l}},Ct=function(t){var n=t.match(/follow-gradient|horizontal-gradient|vertical-gradient/)[0],e=t.substring(n.length).match(/(?:transparent|rgb\(.*?\)|hsl\(.*?\)|hsla\(.*?\)|rgba\(.*?\)|[a-z]+|#[abcdefABCDEF\d]+)\s?(?:[\d]{1,3}%?)?/g).map(Lt);return{type:n,colors:e}},Ot=/\s([\d]{1,3})%?$/,Lt=function(t){var n=t.match(Ot);return{offset:n?parseFloat(n[1])/100:null,value:zt(t.replace(Ot,""))}},Ut=[],kt=function(t,n){return Ut[t]?Ut[t].find(function(t){return t.node.parentNode===n}):null},Ft=function(t,n){Ut[t]||(Ut[t]=[]),Ut[t].push(n)},Pt="undefined"==typeof document?function(t){return 0}:function(t){var n=arguments.length>1&&arguments[1]!==e?arguments[1]:document.body,r=arguments.length>2&&arguments[2]!==e?arguments[2]:null;if(0==t)return 0;if(r){var i=kt(r,n)||{};return i.node||(i.node=document.createElement("span"),i.node.style.cssText="position:absolute;padding:0;visibility:hidden;",n.appendChild(i.node)),i.node.style.marginTop=t,i.style||(i.style=window.getComputedStyle(i.node)),Ft(r,i),parseInt(i.style.marginTop,10)}var o=document.createElement("span");return o.style.cssText="position:absolute;padding:0;visibility:hidden;margin-top:"+t,n.appendChild(o),requestAnimationFrame(function(){o.parentNode.removeChild(o)}),parseInt(window.getComputedStyle(o).marginTop,10)},zt="undefined"==typeof document?function(t){return t}:function(t){if("transparent"===t)return"rgba(0,0,0,0)";var n=document.createElement("span");return n.style.cssText="position:absolute;visibility:hidden;color:"+t,document.body.appendChild(n),requestAnimationFrame(function(){n.parentNode.removeChild(n)}),window.getComputedStyle(n).getPropertyValue("color")},qt=function(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)},Wt=function(t){var n=t.match(/url\((.*?)\)/g).map(function(t){return t.substring(4,t.length-1)});return 1===n.length?n[0]:n},jt=function(t){return t.trim().split("-").map(function(t,n){return n>0?mt(t):t}).join("")},Gt=function(t,n){return At.test(t)?pt(t):bt.test(t)?parseInt(t,10):_t.test(t)?parseFloat(t):St.test(t)?Wt(t):Mt.test(n)?Nt.test(t)?wt(t,Ct):wt(t,zt):Dt.test(n)?wt(t,qt):It.test(n)?"none"===t?t:wt(t,Tt):t},Yt=function(t){var n=t.split(":").map(gt),e=jt(n[0]),r=Gt(n[1],n[0]);return e&&null!==r&&"undefined"!=typeof r?{property:e,value:r}:null},Ht=function(t){return t.split(";").filter(function(t){return t.trim().length}).map(Yt).filter(function(t){return null!==t}).reduce(function(t,n){return t[n.property]=n.value,t},{})},$t=function(t){return t},Vt=function(t){return-1*Math.cos(t*(Math.PI/2))+1},Zt=function(t){return Math.sin(t*(Math.PI/2))},Bt=function(t){return-.5*(Math.cos(Math.PI*t)-1)},Xt=function(t){return t*t},Jt=function(t){return t*(2-t)},Kt=function(t){return t<.5?2*t*t:-1+(4-2*t)*t},Qt=function(t){return t*t*t},tn=function(t){var n=t-1;return n*n*n+1},nn=function(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},en=function(t){return t*t*t*t},rn=function(t){return 1- --t*t*t*t},on=function(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},un=function(t){return 0===t?0:Math.pow(2,10*(t-1))},an=function(t){return 1===t?1:-Math.pow(2,-10*t)+1},ln=function(t){if(0===t||1===t)return t;var n=2*t,e=n-1;return n<1?.5*Math.pow(2,10*e):.5*(-Math.pow(2,-10*e)+2)},sn=function(t){var n=t/1;return-1*(Math.sqrt(1-n*t)-1)},cn=function(t){var n=t-1;return Math.sqrt(1-n*n)},fn=function(t){var n=2*t,e=n-2;return n<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-e*e)+1)},dn=function(t){var n=arguments.length>1&&arguments[1]!==e?arguments[1]:1.70158,r=t/1;return r*r*((n+1)*r-n)},hn=function(t){var n=arguments.length>1&&arguments[1]!==e?arguments[1]:1.70158,r=t/1-1;return r*r*((n+1)*r+n)+1},vn=function(t){var n=arguments.length>1&&arguments[1]!==e?arguments[1]:1.70158,r=2*t,i=r-2,o=1.525*n;return r<1?.5*r*r*((o+1)*r-o):.5*(i*i*((o+1)*i+o)+2)},pn=function(t){var n=arguments.length>1&&arguments[1]!==e?arguments[1]:.7,r=1-n,i=2*t;if(0===t||1===t)return t;var o=r/(2*Math.PI)*Math.asin(1);return Math.pow(2,-10*i)*Math.sin((i-o)*(2*Math.PI)/r)+1},mn=function(t){var n=t/1;if(n<1/2.75)return 7.5625*n*n;if(n<2/2.75){var e=n-1.5/2.75;return 7.5625*e*e+.75}if(n<2.5/2.75){var r=n-2.25/2.75;return 7.5625*r*r+.9375}var i=n-2.625/2.75;return 7.5625*i*i+.984375},gn={"ease-linear":$t,"ease-in-sine":Vt,"ease-out-sine":Zt,"ease-in-out-sine":Bt,"ease-in-cubic":Qt,"ease-out-cubic":tn,"ease-in-out-cubic":nn,"ease-in-circ":sn,"ease-out-circ":cn,"ease-in-out-circ":fn,"ease-in-quad":Xt,"ease-out-quad":Jt,"ease-in-out-quad":Kt,"ease-in-quart":en,"ease-out-quart":rn,"ease-in-out-quart":on,"ease-in-expo":un,"ease-out-expo":an,"ease-in-out-expo":ln,"ease-in-back":dn,"ease-out-back":hn,"ease-in-out-back":vn,"ease-out-elastic":pn,"ease-out-bounce":mn};i(n.EASING_FUNCTION,gn);var yn=function(t,n){var r=arguments.length>2&&arguments[2]!==e?arguments[2]:500,i=arguments.length>3&&arguments[3]!==e?arguments[3]:$t,o=arguments.length>4&&arguments[4]!==e?arguments[4]:0;return wn(function(n){t(i(n))},n,r,o)},wn=function(t){var n=arguments.length>1&&arguments[1]!==e?arguments[1]:null,r=arguments.length>2&&arguments[2]!==e?arguments[2]:500,i=arguments.length>3&&arguments[3]!==e?arguments[3]:0;if(!t)return null;var o=null,u=void 0,a=null,l=function s(e){return null===o&&(o=e),u=e-o-i,u<r?(t(u>=0?u/r:0),a=requestAnimationFrame(s),null):(t(1),void(n&&n()))};return l(Oe()),function(){cancelAnimationFrame(a)}},bn=function(){var t=24,n=1e3/t,e=null,r={velocity:0,origin:0,position:0,destination:1},i=function(){cancelAnimationFrame(e)},o=function(t,o,u,a){i(),null===u?r.destination=o:(r.position=o,r.destination=u,r.velocity=0),r.origin=r.position;var l=null,s=function c(o){e=requestAnimationFrame(c),l||(l=o);var u=o-l;u<=n||(l=o-u%n,a(r,i),t(r.position))};s(Oe())};return{getPosition:function(){return r.position},cancel:i,translate:o}},An=function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=bn(),u={update:null,cancel:o.cancel,getPosition:o.getPosition};return"arrive"===t?u.update=_n.apply(e,[o.translate].concat(r)):"spring"===t?u.update=Dn.apply(e,[o.translate].concat(r)):"step"===t&&(u.update=Mn.apply(e,[o.translate].concat(r))),u},_n=function(t){var n=arguments.length>1&&arguments[1]!==e?arguments[1]:1,r=arguments.length>2&&arguments[2]!==e?arguments[2]:.01;return function(i){var o=arguments.length>1&&arguments[1]!==e?arguments[1]:null,u=arguments.length>2&&arguments[2]!==e?arguments[2]:null;t(i,o,u,function(t,e){var i=t.destination-t.position,o=t.origin+.5*(t.destination-t.origin);t.velocity+=2*(-(o-t.origin)+i)*r,t.position+=t.velocity<0?Math.max(t.velocity,-n):Math.min(t.velocity,n),(t.origin<t.destination&&t.position>=t.destination||t.origin>=t.destination&&t.position<=t.destination)&&(e(),t.velocity=0,t.position=t.destination)})}},Mn=function(t){var n=arguments.length>1&&arguments[1]!==e?arguments[1]:.01;return function(r){var i=arguments.length>1&&arguments[1]!==e?arguments[1]:null,o=arguments.length>2&&arguments[2]!==e?arguments[2]:null;t(r,i,o,function(t,e){t.velocity=n,t.position+=t.velocity,(t.origin<t.destination&&t.position>=t.destination||t.origin>=t.destination&&t.position<=t.destination)&&(e(),t.velocity=0,t.position=t.destination)})}},Dn=function(t){var n=arguments.length>1&&arguments[1]!==e?arguments[1]:.5,r=arguments.length>2&&arguments[2]!==e?arguments[2]:.75,i=arguments.length>3&&arguments[3]!==e?arguments[3]:10;return function(o){var u=arguments.length>1&&arguments[1]!==e?arguments[1]:null,a=arguments.length>2&&arguments[2]!==e?arguments[2]:null;t(o,u,a,function(t,e){var o=-(t.position-t.destination)*n;t.velocity+=o/i,t.position+=t.velocity,t.velocity*=r,Nn(t.position,t.destination,t.velocity)&&(e(),t.position=t.destination,t.velocity=0)})}},Nn=function(t,n,r){var i=arguments.length>3&&arguments[3]!==e?arguments[3]:.001;return Math.abs(t-n)<i&&Math.abs(r)<i},En=function(t){var n=t.map(function(t){return Sn(In(t.name,t.parameters,t.ease),t.origin,t.duration,t.delay)});return function(t,e,r){if(!ct(t))return!1;var i=n.length;n.forEach(function(n){n(t,e,function(){i--,!i&&r&&r(t)})})}},In=function(t,r,i){var o=i?u(n.EASING_FUNCTION,i):i,a=u(n.TRANSITION,t);return function(t,n,i){a.apply(e,[t,i,n,o].concat(Q(r)))}},Sn=function(t){var n=arguments.length>1&&arguments[1]!==e?arguments[1]:"50% 50% 0",r=arguments.length>2&&arguments[2]!==e?arguments[2]:500,i=arguments[3];return function(o){var u=arguments.length>1&&arguments[1]!==e?arguments[1]:1,a=arguments[2];ft(o,n),wn(function(n){t(o,u,n)},a,r,i)}},Rn=function(t){return u(n.TRANSITION,t.name).apply(e,Q(t.parameters||[]))},Tn=function(t){var n=arguments.length>1&&arguments[1]!==e?arguments[1]:{};return t.lastAppliedStyles=null,xn(t,n,t.root.dataset.style),t.styleObserver=st(t.root,["data-style"],function(e){xn(t,n,e)}),{setStyle:function(e){xn(t,n,e)}}},xn=function(t,n,e){if(t.lastAppliedStyles!==e){t.lastAppliedStyles=e,t.style=e?Ae(n,Ht(e)):n;var r=[],i=[];t.style.transitionIn&&t.style.transitionIn.length?(r=t.style.transitionIn,i=t.style.transitionOut):t.style.transition&&"none"!==t.style.transition&&t.style.transition.forEach(function(t){var n=Rn(t);r=r.concat(n.intro),i=i.concat(n.outro)}),r&&i&&(t.transitionIn=En(r),t.transitionOut=En(i),t.skipToTransitionInEnd=En(r.map(Cn)),t.skipToTransitionOutEnd=En(i.map(Cn))),t.dirty=!0}},Cn=function(t){var n=Se(t);return n.duration=0,n.delay=0,n},On=function(t){return t[ut+"BackingStorePixelRatio"]||t.backingStorePixelRatio||1},Ln=function(){return window.devicePixelRatio||1},Un=function(t){var n=t.getContext("2d");n.clearRect(0,0,t.width,t.height)},kn={text:function(){return function(t){var n={},e=function(t){t.root.setAttribute("data-value",t.value),at(t.root,t.value)};return Object.assign({},G(n,t,"text"),V(n),H(n,e),j(n))}}};i(n.VIEW,kn);var Fn=function(){return{Extension:{Type:n,getExtension:u},Utils:{toPixels:Pt,toColor:zt},Canvas:{clear:Un,getDevicePixelRatio:Ln,getBackingStoreRatio:On},DOM:{visible:vt,create:lt,transform:dt},Animation:{animate:yn},Data:{request:Le},Date:{performance:Oe},View:{rooter:G,drawer:H,updater:V,styler:Tn,grouper:Y,resizer:Z,destroyer:j}}},Pn=function(t,n,e){return et(t,n,e)},zn=function(t,n,e){return ot(t,n,e)},qn=function(t,e,r){var i=u(n.VIEW,t);return i?i(Fn())(e,r):null},Wn=function(t,n){return"-"===t[n]&&">"===t[n+1]},jn=function(t){return"'"===t||'"'===t},Gn=function(t){return","===t},Yn=function(t){return"("===t},Hn=function(t){return")"===t},$n=function(t){return 0!==t.trim().length},Vn=function(t,n){return t.push(n.trim())},Zn=function(t,n){return $n(n)?(Vn(t,n),""):n},Bn=function(t,n){return t.length&&n.push(t.length>1?t.concat():t[0]),[]},Xn=function Ni(t,n,e){for(var r="",i=[],o=null,u=!1;t<n.length;){var a=n[t];if(Yn(a)){u=!1;var l=[r.trim()];t=Ni(t+1,n,l),a=n[t],i.push(l),r=""}else{if(Hn(a))return u&&r.trim().length&&(i.push([r.trim()]),r="",u=!1),$n(r)&&Vn(i,r),i=Bn(i,e),t+1;null!==o&&a!==o?r+=a:a===o?(i.push(r),r="",o=null):jn(a)?(r="",o=a):Wn(n,t)?(u=!0,r.trim().length&&(i.push([r.trim()]),r=""),t+=2):Gn(a)?(u&&r.trim().length&&(i.push([r.trim()]),r="",u=!1),i=Bn(i,e),r=Zn(e,r)):r+=a,t++}}return(u&&r.trim().length||!u&&r.trim().length&&!i.length)&&(i.push([r.trim()]),r=""),Bn(i,e),Zn(e,r),t},Jn=function(t){var n=[];return Xn(0,t,n),n},Kn=function(t){return t.children&&t.children.length},Qn=function Ei(t){var n={};for(var e in t)t.hasOwnProperty(e)&&("root"!==e?"children"!==e?"repeat"!==e?n[e]=t[e]:n[e]=null===t[e]?null:Ei(t[e]):n[e]=null===t[e]?null:t[e].map(Ei):n[e]=t[e].cloneNode());return n.presenter=null,n},te={root:null,key:null,view:null,overlay:null,presenter:null,transform:null,layout:null,style:null,repeat:null,children:null,className:null},ne=function Ii(t){return Array.from(t).map(function(t){var n=Ae(te,{root:t});for(var e in t.dataset)t.dataset.hasOwnProperty(e)&&"undefined"!=typeof n[e]&&(n[e]=t.dataset[e]);return n.repeat?(n.repeat=Ii(t.children).pop(),Array.from(t.children).forEach(function(t){t.parentNode.removeChild(t)})):t.children.length&&(n.children=Ii(t.children)),n})},ee=function Si(t){return t.map(function(t){return t=Ae(te,t),"string"==typeof t.root?t.root=document.createElement(t.root):t.root=document.createElement("span"),t.transform&&(t.root.dataset.transform=t.transform),t.className&&(t.root.className=t.className),t.overlay&&(t.root.dataset.overlay=t.overlay),t.view?(t.root.dataset.view=t.view,t.style&&(t.root.dataset.style=t.style),t.repeat=null):(t.layout&&(t.root.dataset.layout=t.layout),t.repeat?(t.root.dataset.repeat=!0,t.repeat=Si(t.children).pop()):t.children&&(t.children=Si(t.children),t.children.forEach(function(n){t.root.appendChild(n.root)}))),t})},re=function(t,n){var e=void 0;return t.repeat?e=zn(t.root,t.repeat,n):"string"==typeof t.view?e=qn(t.view,t.root,t.style):Kn(t)&&(e=Pn(t.root,t.children,n)),e},ie=function(t){var n=!1,e=function(e,i){e.transform(i,function(t){e.presenter.update(t)},t),n||(n=!0,r())},r=function o(){t.baseDefinition.presenter.draw(),requestAnimationFrame(o)},i=function u(n){return n.presenter=re(n,u),n.transform=ae(n.transform,t),e};return i(t.baseDefinition)},oe=function(t){for(var n=arguments.length,e=Array(n>1?n-1:0),r=1;r<n;r++)e[r-1]=arguments[r];return function(n,r){function i(n,o){return e.length<=n?void r(o):void e[n](o,ue(i,[n+1]),t)}i(0,n)}},ue=function(t){var n=arguments.length>1&&arguments[1]!==e?arguments[1]:[],r=arguments[2];return function(){var e=Array.from(n);return Array.prototype.push.apply(e,arguments),t.apply(r,e)}},ae=function(t,n){if(!t)return function(t,n){return n(t)};if("function"==typeof t)return t;var e=Jn("transform("+(/^[a-z]+$/.test(t)?t+"()":t)+")");return le(e,n)},le=function Ri(t,r){var i=t.map(function(t){var i=t.shift(),o=u(n.TRANSFORM,i)||function(t,n,e){n(t)},a=t.map(function(t){return Array.isArray(t)?"string"==typeof t[0]?Ri([t],r):Ri(t,r):we(t)});return o.apply(e,Q(a))});return oe.apply(e,[r].concat(Q(i)))},se=function(t){var n=t.match(/[a-z]+/)[0],e=ce(t.substring(n.length));return{name:n,parameters:e}},ce=function(t){return(t.match(/('.+?')|(".+?")|(\[.+?])|([.:\-\d\sa-zA-Z]+%?)/g)||[]).map(Ne).filter(function(t){return t.length}).map(we)},fe=function(t){return t.substring(1,t.length-1)},de=/^([\d]{4}-[\d]{1,2}-[\d]{1,2})/,he=/^(true|false)$/,ve=/^[\a-zA-Z]+$/,pe=/^0[\d]+/,me=/^('|")/,ge=/^-?(?:\d+)?(?:\.|0\.)?[\d]+$/,ye=/^(\[)/,we=function(t){return he.test(t)?"true"===t:ye.test(t)?ce(fe(t)):de.test(t)?O(t):me.test(t)?fe(t):ve.test(t)||pe.test(t)?t:ge.test(t)?parseFloat(t):t},be=function(t){var n=(t+"").match(/(-?[.\d]+)(%|ms|s|deg|cm|em|ch|ex|q|in|mm|pc|pt|px|vh|vw|vmin|vmax)?/);return{value:parseFloat(n[1]),units:n[2]}},Ae=function(t){var n=arguments.length>1&&arguments[1]!==e?arguments[1]:{},r=void 0,i={};for(r in t)t.hasOwnProperty(r)&&(i[r]="undefined"==typeof n[r]?t[r]:n[r]);return i},_e=function(t){var n=window,e=t.split(".");return e.forEach(function(t,r){n[e[r]]&&(n=n[e[r]])}),n!==window?n:null},Me=function(t){return/^(?:[\w]+\s?:\s?[\w.]+,\s?)+(?:[\w]+\s?:\s?[\w.]+)$/g.test(t)?t.match(/(?:(\w+)\s?:\s?([\w.]+))/g).reduce(function(t,n){var e=n.split(":");return t[e[0]]=we(e[1]),t},{}):we(t)},De=function(t){return parseInt(t,10)},Ne=function(t){return t.trim()},Ee=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},Ie=function(t){return t.replace(/-./g,function(t){return t.charAt(1).toUpperCase()})},Se=function(t){return"object"===("undefined"==typeof t?"undefined":B(t))&&null!==t?JSON.parse(JSON.stringify(t)):t},Re=function(t){return t.slice()},Te=function(){var t=arguments.length>0&&arguments[0]!==e?arguments[0]:0,n=arguments.length>1&&arguments[1]!==e?arguments[1]:1;return t+Math.random()*(n-t)},xe=function(t){for(var n=[],e=0;e<t;e++)n.push(e);return n},Ce=function(t){for(var n=t.length;n;n--){var e=Math.floor(Math.random()*n),r=[t[e],t[n-1]];t[n-1]=r[0],t[e]=r[1]}},Oe=function(){return window.performance.now()},Le=function(t,n,e,r){var i=new XMLHttpRequest;r&&r(i),i.open("GET",t,!0),i.onload=function(){n(i.response)},e&&(i.onerror=function(){e(i,i.status)}),i.send()},Ue=function(t,n){return ke(t)?Fe(t,n):Array.isArray(t)?Pe(t,n):t===n},ke=function(t){return t===Object(t)},Fe=function(t,n){for(var e in t)if(!n.hasOwnProperty(e)||t[e]!==n[e])return!1;return!0},Pe=function(t,n){return t.length==n.length&&t.every(function(t,e){return t===n[e]})},ze=function(t){return Object.keys(t).map(function(t){return'"'+t+'"'}).join(", ")},qe=function(){function t(){var n=arguments.length>0&&arguments[0]!==e?arguments[0]:{},r=arguments.length>1&&arguments[1]!==e?arguments[1]:document.createElement("div");X(this,t),this._options=Ae(t.options(),n),this._element=r,this._value=null,this._observer=null,this._viewDefinition=null,this._constants=null,this._presets=null,this._updater=null,this._credits=null,this._didInit=null,this._didDestroy=null,this._willDestroy=null,this._didUpdate=null,this._init()}return J(t,[{key:"isRootElement",value:function(t){return this._element===t}},{key:"setConstant",value:function(t,n){this._constants[t]=n}},{key:"getConstants",value:function(){return this._constants}},{key:"getConstant",value:function(t){return this._constants[t]}},{key:"setPreset",value:function(t,n){this._presets[t]=n}},{key:"getPreset",value:function(t){return this._presets[t]}},{key:"destroy",value:function(){this._willDestroy(this),this._observer.disconnect(),this.baseDefinition.presenter.destroy(),this._didDestroy(this)}},{key:"redraw",value:function(){this.baseDefinition&&this.baseDefinition.presenter&&(this.baseDefinition.presenter.reset(),this.baseDefinition.presenter.draw(),this._updater(this.baseDefinition,this._value))}},{key:"_init",value:function(){var t=this;if(this._viewDefinition=this._options.view,this._willDestroy=this._options.willDestroy,this._didDestroy=this._options.didDestroy,this._didInit=this._options.didInit,this._didUpdate=this._options.didUpdate,this._value=this._options.value,this._presets=this._options.presets,this._constants=this._options.constants,this._credits=this._options.credits,this._element.classList.contains("tick")||this._element.classList.add("tick"),this._observer=st(this._element,["data-value"],function(n){t.value=n}),this._viewDefinition.root!==this._element&&(Array.from(this._viewDefinition.root.children).forEach(function(n){t._element.appendChild(n)}),this._viewDefinition.root=this._element),this._viewDefinition.view||this._viewDefinition.children||(this._viewDefinition.view="text"),this._updater=ie(this),null!==this.value&&this._update(this.value),this._element.dataset.state="initialised",this._didInit(this,this.value),this._credits){var n=document.createElement("a");n.className="tick-credits",n.href=this._credits.url,n.tabindex=-1,n.target="_blank",n.rel="noopener noreferrer",n.textContent=this._credits.label,this._element.appendChild(n)}}},{key:"_update",value:function(t){this._updater(this.baseDefinition,t),this._didUpdate(this,t)}},{key:"baseDefinition",get:function(){return this._viewDefinition}},{key:"root",get:function(){return this._element}},{key:"value",get:function(){return this._value},set:function(t){this._value="string"==typeof t?Me(t):t,this._update(t)}}],[{key:"options",value:function(){return{constants:He(),presets:$e(),value:null,view:null,didInit:function(t){},didUpdate:function(t,n){},willDestroy:function(t){},didDestroy:function(t){},credits:{label:"Powered by PQINA",url:"https://pqina.nl/?ref=credits"}}}}]),t}(),We=function(t,n,e,r){return{label:1===t?n:e,progress:t/r,
value:t}},je=[],Ge=function(t,n){Ve[t]=n},Ye=function(t,n){Ze[t]=n},He=function(){return Ve},$e=function(){return Ze},Ve={YEAR_PLURAL:"Years",YEAR_SINGULAR:"Year",MONTH_PLURAL:"Months",MONTH_SINGULAR:"Month",WEEK_PLURAL:"Weeks",WEEK_SINGULAR:"Week",DAY_PLURAL:"Days",DAY_SINGULAR:"Day",HOUR_PLURAL:"Hours",HOUR_SINGULAR:"Hour",MINUTE_PLURAL:"Minutes",MINUTE_SINGULAR:"Minute",SECOND_PLURAL:"Seconds",SECOND_SINGULAR:"Second",MILLISECOND_PLURAL:"Milliseconds",MILLISECOND_SINGULAR:"Millisecond"},Ze={y:function(t,n){return We(t,n.YEAR_SINGULAR,n.YEAR_PLURAL,10)},M:function(t,n){return We(t,n.MONTH_SINGULAR,n.MONTH_PLURAL,12)},w:function(t,n){return We(t,n.WEEK_SINGULAR,n.WEEK_PLURAL,52)},d:function(t,n){return We(t,n.DAY_SINGULAR,n.DAY_PLURAL,365)},h:function(t,n){return We(t,n.HOUR_SINGULAR,n.HOUR_PLURAL,24)},m:function(t,n){return We(t,n.MINUTE_SINGULAR,n.MINUTE_PLURAL,60)},s:function(t,n){return We(t,n.SECOND_SINGULAR,n.SECOND_PLURAL,60)},mi:function(t,n){return We(t,n.MILLISECOND_SINGULAR,n.MILLISECOND_PLURAL,1e3)}},Be={value:Me,didInit:_e,didUpdate:_e,didDestroy:_e,willDestroy:_e},Xe=function(t){var n=arguments.length>1&&arguments[1]!==e?arguments[1]:{},r=arguments.length>2&&arguments[2]!==e?arguments[2]:{},i=t.dataset,o={meta:{}};for(var u in i)if(i.hasOwnProperty(u)){var a=n[u],l=i[u];a&&(l=a(l),l=null===l?Se(r[u]):l,o[u]=l)}return"false"===i.credits&&(o.credits=!1),o},Je=function(t,n){for(var e=0,r=t.length;e<r;e++)if(t[e].isRootElement(n))return e;return-1},Ke=function(t){var n=void 0,e=void 0,r=void 0,i=[];for(n=t.querySelectorAll(".tick:not([data-state])"),r=n.length;r--;)e=n[r],i.push(nr(e));return i},Qe=function(t){var n=je.filter(function(n){return n.isRootElement(t)});return n?n[0]:null},tr=function(){return K({},qe.options(),{constants:K({},Ve),presets:K({},Ze)})},nr=function(){var t=arguments.length>0&&arguments[0]!==e?arguments[0]:e,n=arguments.length>1&&arguments[1]!==e?arguments[1]:e;if(t&&!ct(t)&&(n=t,t=e),!t||!Qe(t)){n&&n.view&&(n.view=ee([n.view])[0]),!n&&t&&(n=Xe(t,Be,tr())),t&&(n||(n={}),n.view||(n.view=ne([t])[0]));var r=new qe(n,t);return je.push(r),r}},er=function(t){var n=Je(je,t);return!(n<0)&&(je[n].destroy(),je.splice(n,1),!0)},rr=function(t){return function(){setTimeout(t,0)}},ir=function(){return Date.now()},or=function(t){var n=arguments.length>1&&arguments[1]!==e?arguments[1]:1e3,r=arguments.length>2&&arguments[2]!==e?arguments[2]:{},i=Ae({autostart:!0},r),o=null,u=null,a=null,l=0,s=null,c=!1,f=null,d=function(){return c},h=function(){return null!==u},v=function(){return document.hidden},p=function S(){var e=ir(),r=o-e,i=n+r;o=e+i;var a=e-u-l+r;t(a),f=setTimeout(S,i)},m=function(){if(d())return void b();if(!h())return u=ir(),setTimeout(function(){t(0)},0),o=ir()+n,E(),v()?void M():void(f=setTimeout(function(){p()},n))},g=function(){clearTimeout(f),f=null,u=null,o=null,a=null,l=0,s=null,c=!1,N()},y=function(){g(),m()},w=function(){h()&&!v()&&(c=!0,N(),A())},b=function(){d()&&h()&&!v()&&(c=!1,E(),_())},A=function(){clearTimeout(f),a=ir(),s=o-a},_=function(){l+=ir()-a,a=null,o=ir()+s,f=setTimeout(function(){p()},s)},M=function(){A()},D=function(){h()&&_()},N=function(){document.removeEventListener("visibilitychange",I)},E=function(){document.addEventListener("visibilitychange",I)},I=function(){v()?M():D()};return i.autostart&&m(),{start:m,stop:rr(g),reset:rr(y),pause:rr(w),resume:b}},ur=function(t){/^[\d]+/.test(t)||(t="1 "+t);var n=t.split(" ");return parseFloat(n[0])*p[n[1].toLowerCase()]},ar=function(t,n){return M(t,n.split(":").map(De))},lr=function(t,n){var e=n.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(e.length>1){var r="";e.forEach(function(t){r=n.split(t)[1]||""});var i=r.trim().match(/wait\s[\d]+\s[a-z]+/);i&&e.push(i[0])}var o=e.reduce(function(n,e){return/([\d]+th|\dst|\dnd|first|last)/.test(e)&&(n.day=/^[\d]/.test(e)?parseInt(e,10):"first"===e?1:e),/^at/.test(e)?n.time=ar(z(t),e.substring(3)):/wait/.test(e)?n.idle=ur(e.substring(5)):/^[\a-zA-Z]+$/.test(e)&&(n.month=e),n},{idle:null,day:null,month:null,time:null,date:null,dist:null,wait:!1});if(o.time){o.time.setDate(1),o.time=E(o.time,o.month),o.time=N(o.time,o.day);var u=o.time-t,a=0;if(u<0&&(a=u,o.time.setFullYear(o.time.getFullYear()+1),u=o.time-t),null!==o.idle&&a+o.idle>0)return o.wait=!0,o;o.dist=u}else{o.time=z(t),o.time.setDate(1),o.time=E(o.time,o.month),o.time=N(o.time,o.day);var l=dr(o.time,n);if(l.wait)return o;o.time=z(T(t,o.time)&&l.date?l.date:l.from);var s=o.time-t;s<0&&(o.time=z(l.from),o.time.setFullYear(o.time.getFullYear()+1),s=o.time-t),o.dist=s}return o.date=z(o.time),o},sr=function(t,n){var e=n.match(/[\d]+th|\dst|\dnd|first|last|at\s[\d]+(?::[\d]+)?(?::[\d]+)?/g);if(e.length>1){var r="";e.forEach(function(t){r=n.split(t)[1]||""});var i=r.trim().match(/wait\s[\d]+\s[a-z]+/);i&&e.push(i[0])}var o=e.reduce(function(n,e){return/([\d]+th|\dst|\dnd|first|last)/.test(e)&&(n.day=/^[\d]/.test(e)?parseInt(e,10):"first"===e?1:e),/^at/.test(e)?n.time=ar(z(t),e.substring(3)):/wait/.test(e)&&(n.idle=ur(e.substring(5))),n},{idle:null,day:null,time:null,date:null,dist:null,wait:!1});if(o.time){o.time=N(o.time,o.day);var u=o.time-t,a=0;if(u<0&&(a=u,o.time.setDate(1),o.time.setMonth(o.time.getMonth()+1),N(o.time,o.day),u=o.time-t),null!==o.idle&&a+o.idle>0)return o.wait=!0,o;o.dist=u}else{o.time=N(z(t),o.day);var l=dr(o.time,n);if(l.wait)return o;o.time=z(T(t,o.time)&&l.date?l.date:l.from);var s=o.time-t;s<0&&(o.time=z(l.from),o.time.setDate(1),o.time.setMonth(o.time.getMonth()+1),N(o.time,o.day),s=o.time-t),o.dist=s}return o.date=z(o.time),o},cr=function(t,n){var e=n.match(/(?:mon|tues|wednes|thurs|fri|satur|sun)day|at\s[\d]+(?::[\d]+)?(?::[\d]+)?/g);if(e.length>1){var r="";e.forEach(function(t){r=n.split(t)[1]||""});var i=r.trim().match(/wait\s[\d]+\s[a-z]+/);i&&e.push(i[0])}var o=e.reduce(function(n,e){return/(?:mon|tues|wednes|thurs|fri|satur|sun)day/.test(e)&&(n.day=w[Ee(e)]),/^at/.test(e)?n.time=ar(z(t),e.substring(3)):/wait/.test(e)&&(n.idle=ur(e.substring(5))),n},{idle:null,day:null,time:null,date:null,dist:null,wait:!1});if(o.time){o.time=D(o.time,o.day);var u=o.time-t;if(u<0&&(o.time.setDate(o.time.getDate()+7),u=o.time-t),null!==o.idle&&u>=p.Week-o.idle)return o.wait=!0,o;o.dist=u}else{o.time=D(z(t),o.day);var a=dr(o.time,n);if(a.wait)return o;o.time=z(T(t,o.time)&&a.date?a.date:a.from);var l=o.time-t;l<0&&o.time.setDate(o.time.getDate()+7),o.dist=l}return o.date=z(o.time),o},fr=function(t,n){var e=n.match(/([\d]+(?::[\d]+)?(?::[\d]+)?)|(wait\s[\d]+\s[a-z]+)/g),r=e.reduce(function(n,e){return/^[\d]/.test(e)?n.time=ar(z(t),e):/wait/.test(e)&&(n.idle=ur(e.substring(5))),n},{idle:null,time:null,date:null,wait:!1,dist:null}),i=r.time-t;return i<0&&(r.time.setDate(r.time.getDate()+1),i=r.time-t),null!==r.idle&&i>=p.Day-r.idle?(r.wait=!0,r):(r.dist=i,r.date=z(r.time),r)},dr=function(t,n){var e=n.match(/((?:[\d]+\s)?(?:hours|hour|minutes|minute|seconds|second))|((?:from|till)\s[\d]+(?::[\d]+)?(?::[\d]+)?)|(wait\s[\d]+\s[a-z]+)/g),r=e.reduce(function(t,n){return/from/.test(n)?t.from=ar(t.from,n.split(" ")[1]):/till/.test(n)?t.till=ar(t.till,n.split(" ")[1]):/wait/.test(n)?t.idle=ur(n.substring(5)):/hours|hour|minutes|minute|seconds|second/.test(n)&&(t.interval=ur(n)),t},{idle:null,interval:null,date:null,dist:null,wait:!1,from:ar(z(t),"0"),till:ar(z(t),"23:59:59:999")});if(t<r.from||t>=r.till)return r;if(r.interval>r.till-r.from)return r;var i=t-r.from,o=r.interval-i%r.interval;return null!==r.idle&&o>=r.interval-r.idle?(r.wait=!0,r):(r.dist=o,r.date=new Date(t.getTime()+r.dist),r)},hr=function(t,n){return/januari|februari|march|april|may|june|july|august|september|october|november|december/.test(n)?lr(t,n):/month/.test(n)?sr(t,n):/(?:mon|tues|wednes|thurs|fri|satur|sun)day/.test(n)?cr(t,n):/day at/.test(n)||/^at /.test(n)?fr(t,n):/hours|hour|minutes|minute|seconds|second/.test(n)?dr(t,n):null},vr=function(t,n){for(var e=n.split(",").map(Ne).map(function(n){return hr(t,n)}),r=null,i=0;i<e.length;i++){var o=e[i];if(null===r&&o.wait)return null;null===r?r=o:null===r.dist&&null!==o.dist?r=o:null!==o.dist&&o.dist<r.dist&&(r=o)}return r.date},pr=function(t,n){return t===!0?void A(function(t){n(t.getTime()-P().getTime())}):"string"==typeof t?void setTimeout(function(){n(O(t).getTime()-P().getTime())},0):void setTimeout(function(){n(0)},0)},mr={format:["d","h","m","s"],cascade:!0,server:null,interval:1e3},gr=function(t){return K({complete:!1,offset:null,value:null,timer:null,onload:function(){},onupdate:function(t){}},t)},yr=function(t){var n=arguments.length>1&&arguments[1]!==e?arguments[1]:{};if("number"!=typeof t)throw'Can\'t start counter, the "milliseconds" parameter is required';n=Ae({units:"seconds",target:0,amount:1e3,interval:1e3},n);var r=n.target,i=t,o=gr({target:r,onended:function(){}});return setTimeout(function(){var e=function(e){return i=t-e/n.interval*n.amount,i<=r?(o.value=n.target,o.onupdate(o.value/p[n.units]),o.timer.stop(),void o.onended()):(o.value=i,void o.onupdate(o.value/p[n.units]))};o.timer=or(e,n.interval,{autostart:!1}),o.complete=!0,o.onload(),o.timer.start()},0),o},wr=function(t){var n=arguments.length>1&&arguments[1]!==e?arguments[1]:{};if("undefined"==typeof t)throw'Can\'t start counter, the "due" parameter is required';n=Ae(mr,n);var r=_(t)?t:O(t),i=gr({due:z(r),onended:function(){}});return pr(n.server,function(t){i.offset=t;var e=function(){var e=S(t);return r-e<=0?(i.value=new Array(n.format.length).fill(0),i.onupdate(i.value),i.timer.stop(),void i.onended()):(i.value=k(e,r,n.format,n.cascade),void i.onupdate(i.value))};i.timer=or(e,n.interval,{autostart:!1}),i.complete=!0,i.onload(),i.timer.start()}),i},br=function(t){var n=arguments.length>1&&arguments[1]!==e?arguments[1]:{};if("undefined"==typeof t)throw'Can\'t start counter, the "since" parameter is required';n=Ae(mr,n);var r=_(t)?t:O(t),i=gr({since:z(r)});return pr(n.server,function(t){i.offset=t;var e=function(){var e=S(t);i.value=k(r,e,n.format,n.cascade),i.onupdate(i.value)};i.timer=or(e,n.interval,{autostart:!1}),i.complete=!0,i.onload(),i.timer.start()}),i},Ar=function(t){var n=arguments.length>1&&arguments[1]!==e?arguments[1]:{};if("string"!=typeof t)throw'Can\'t start scheduler, "schedule" is a required parameter';n=Ae(K({},mr,{timezone:null}),n);var r=n.timezone?I(n.timezone):null,i=gr({waiting:null,nextScheduledDate:null,previouslyScheduledDate:null,onrepeat:function(t,n){},onresume:function(t){},onwait:function(t){}}),o=e,u=null;return pr(n.server,function(a){i.offset=a;var l=function(){var l=S(a);return null!==r&&(l=R(l,r)),u=vr(l,t),i.waiting=null===u,i.waiting?(o===e&&(o=null),i.value=new Array(n.format.length).fill(0),i.nextScheduledDate&&(i.previouslyScheduledDate=z(i.nextScheduledDate)),i.nextScheduledDate=null===u?null:z(u),void i.onwait(i.previouslyScheduledDate?z(i.previouslyScheduledDate):null)):(i.nextScheduledDate=z(u),null===o&&i.onresume(z(u)),(null===o||o!==e&&!x(o,u))&&(i.onrepeat(z(u),o?z(o):null),o&&(i.previouslyScheduledDate=z(o))),o=z(u),i.value=k(l,u,n.format,n.cascade),void i.onupdate(i.value))};i.timer=or(l,n.interval,{autostart:!1}),i.complete=!0,i.onload(),i.timer.start()}),i},_r=function(){var t=window;if("undefined"==typeof t)return!1;var n=t.CSS&&t.CSS.supports,e=!!t.MSInputMethodContext&&!!document.documentMode,r=n&&CSS.supports("transform","translateX(0)"),i=["MutationObserver","requestAnimationFrame"];return e||n&&r&&!!i.filter(function(n){return n in t}).length},Mr=function(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];return function(t,e){var r=[],i=t;n.forEach(function(t,o){t(i,function(t){r[o]=t,o===n.length-1&&e(1===r.length?r[0]:r)})})}},Dr=function(){var t=arguments.length>0&&arguments[0]!==e?arguments[0]:"",n=arguments.length>1&&arguments[1]!==e?arguments[1]:"left";return function(e,r){return r(t.length>(""+e).length?"left"===n?(""+t+e).slice(-t.length):(""+e+t).substring(0,t.length):e)}},Nr=function(){return function(t,n){return n((t+"").charCodeAt(0))}},Er=function(t){return function(n,e){return e(n+t)}},Ir=function(){return function(t,n){return n(Math.abs(t))}},Sr=function(t){return function(n,e){return e(t)}},Rr=function(t){return function(n,e){return e(n%t)}},Tr=function(t){return function(n,e){return e(n-t)}},xr=function(t,n){return function(e,r){return r((e+"").replace(new RegExp("."===t?"\\"+t:t,"g"),n))}},Cr=function(){var t=arguments.length>0&&arguments[0]!==e?arguments[0]:0;return function(n,e){return e(t?n.toFixed(t):Math.round(n))}},Or=function(){return function(t,n){return n(Math.floor(t))}},Lr=function(){return function(t,n){return n(Math.ceil(t))}},Ur=function(){var t=arguments.length>0&&arguments[0]!==e?arguments[0]:0,n=arguments.length>1&&arguments[1]!==e?arguments[1]:100;return function(e,r){return r((parseFloat(e)-t)/(n-t))}},kr=function(t){return function(n,e){return e(n*t)}},Fr=function(t){return function(n,e){return e(n/t)}},Pr=function(t){return function(n,e){return e(t.replace(/\$0/gi,n))}},zr=function(){var t=arguments.length>0&&arguments[0]!==e?arguments[0]:"";return function(n,e){return e((n+"").split(t))}},qr=function(t,n){return function(e,r){return r(1===e?t:n)}},Wr=function(){var t=arguments.length>0&&arguments[0]!==e?arguments[0]:0,n=arguments.length>1&&arguments[1]!==e?arguments[1]:1;return function(e,r){return r(Math.min(Math.max(e,t),n))}},jr=function(){return function(t,n){return n(Array.isArray(t)?t.reverse():(t+"").split("").reverse().join(""))}},Gr=function(t,n){var r=arguments.length>2&&arguments[2]!==e&&arguments[2],i=!(arguments.length>3&&arguments[3]!==e)||arguments[3],o=null,u=null,a=null;return function(e,l){return e=parseFloat(e),null===o?(o=e,void l(e)):(r&&null!==u&&o===e&&(a.cancel(),a=null),i&&null!==u&&e-a.getPosition()>1?(a.cancel(),a=null,u=null,o=e,void l(e)):(a?a.update(l,e):(a=An("arrive",t,n),a.update(l,o,e)),void(u=e)))}},Yr=function(t,n,e){var r=null,i=null;return function(o,u){return o=parseFloat(o),null===r?(r=o,void u(o)):void(i?i.update(u,o):(i=An("spring",t,n,e),i.update(u,r,o)))}},Hr=function(){var t=arguments.length>0&&arguments[0]!==e?arguments[0]:"rtl",n=arguments.length>1&&arguments[1]!==e?arguments[1]:50,r=arguments.length>2&&arguments[2]!==e?arguments[2]:50,i=null;return function(e,o){if(!i)return i=Re(e),void o(Re(i));i="rtl"===t?i.slice(i.length-e.length,i.length):i.slice(0,e.length);var u=xe(e.length);"random"===t&&Ce(u),"rtl"===t&&u.reverse();var a=function l(){$r(u.shift(),i,e,o),u.length&&setTimeout(l,Te(n,r))};a()}},$r=function(t,n,e,r){n[t]=e[t],r(Re(n))},Vr=function(){var t=arguments.length>0&&arguments[0]!==e?arguments[0]:".",n=arguments.length>1&&arguments[1]!==e?arguments[1]:",",r=arguments.length>2&&arguments[2]!==e?arguments[2]:2;return function(e,i){i((e<0?"-":"")+parseFloat(Math.abs(e)).toFixed(r).replace(/./g,function(e,r,i){return"."===e?t:r&&(i.length-r)%3===0?n+e:e}))}},Zr=function(){var t=arguments.length>0&&arguments[0]!==e?arguments[0]:0,n=arguments.length>1&&arguments[1]!==e?arguments[1]:100,r=Ur(t,n);return function(t,n){r(t,function(t){n(100*t)})}},Br=function(t){var n=null,e=null,r=null;return function(i,o){return i=parseFloat(i),null===n?(n=i,void o(i)):(null!==e&&n===i&&(r.cancel(),r=null),r?r.update(o,i):(r=An("step",t),r.update(o,n,i)),void(e=i))}},Xr=function(){return function(t,n){return n((t+"").toUpperCase())}},Jr=function(){return function(t,n){return n((t+"").toLowerCase())}},Kr=function(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];return function(t,e){return e(U(t,n))}},Qr=function(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];return function(t,e){var r={};t.forEach(function(t,e){r[n[e]]=t}),e(r)}},ti=function(t){return function(n,e){var r=[],i=n;i.forEach(function(n,o){t(n,function(t){r[o]=t,o===i.length-1&&e(r.concat())})})}},ni=function(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];return function(t,e){var r=Array.isArray(t)?t:[t],i=[],o=n.length;r.forEach(function(t,u){n[u%o](t,function(t){i[u]=t,u===r.length-1&&e(i)})})}},ei=function(){return function(t,n){return n(t)}},ri=function(t,n){return function(e,r){return r((e+"").substring(t,n))}},ii=function(t){var r=arguments.length>1&&arguments[1]!==e?arguments[1]:"ease-linear",i=arguments[2];t=Rt(t);var o=u(n.EASING_FUNCTION,r),a=null,l=null;return function(n,e){if(n=parseFloat(n),a&&a(),null===l||n===l)return l=n,void e(n);var r=n,u=l,s=r-u;a=yn(function(t){e(u+t*s)},function(){a=null},t,o,i),l=n}},oi=function(){for(var t=arguments.length,n=Array(t),e=0;e<t;e++)n[e]=arguments[e];return function(t,e,r){return e(t.map(function(t,e){return r.getPreset(n[e])(t,r.getConstants(),r)}))}},ui=function(t){var n=arguments.length>1&&arguments[1]!==e?arguments[1]:"",r=t?new RegExp("[^"+t+"]","g"):null;return function(t,e){var i=String.fromCharCode(t);r&&(i=i.replace(r,n)),e(i)}},ai={ascii:Nr,"char":ui,tween:ii,value:Sr,input:ei,rotate:ni,map:ti,transform:Mr,upper:Xr,lower:Jr,abs:Ir,add:Er,subtract:Tr,modulus:Rr,pad:Dr,number:Vr,replace:xr,round:Cr,ceil:Lr,floor:Or,fraction:Ur,percentage:Zr,multiply:kr,divide:Fr,split:zr,format:Pr,plural:qr,limit:Wr,reverse:jr,arrive:Gr,spring:Yr,delay:Hr,step:Br,keys:Qr,duration:Kr,substring:ri,preset:oi};i(n.TRANSFORM,ai);var li=function(){var t=arguments.length>0&&arguments[0]!==e?arguments[0]:1,n=arguments[1],r=arguments[2];return{intro:[{name:"fade",parameters:[0,1],duration:1e3*t,delay:Rt(n)}],outro:[{name:"fade",parameters:[1,0],duration:1e3*t,delay:Rt(r)}]}},si=function(){var t=arguments.length>0&&arguments[0]!==e?arguments[0]:"y",n=arguments.length>1&&arguments[1]!==e?arguments[1]:1,r=arguments.length>2&&arguments[2]!==e?arguments[2]:1,i=arguments[3],o=arguments[4];return{intro:[{name:"move",parameters:[""+100*-n,"0%",t],duration:1e3*r,delay:Rt(i)}],outro:[{name:"move",parameters:["0%"