window.VT=window.VT||{},VT.TodoFrameDays=function(a){function b(){for(var b=280,c=a.querySelector(".container"),d=0,e=c.children.length;d\n

\n

\n

\n\n
\n",setTimeout(function(){a.classList.add("-animated")},200),a.querySelectorAll(".app-icon").forEach(VT.AppIcon),a.querySelector(".backward").addEventListener("click",function(){a.dispatchEvent(new CustomEvent("seek",{detail:-1,bubbles:!0}))}),a.querySelector(".forward").addEventListener("click",function(){a.dispatchEvent(new CustomEvent("seek",{detail:1,bubbles:!0}))}),a.querySelector(".fastbackward").addEventListener("click",function(){a.dispatchEvent(new CustomEvent("seek",{detail:-5,bubbles:!0}))}),a.querySelector(".fastforward").addEventListener("click",function(){a.dispatchEvent(new CustomEvent("seek",{detail:5,bubbles:!0}))}),a.querySelector(".home").addEventListener("click",function(){a.dispatchEvent(new CustomEvent("seekHome",{bubbles:!0}))}),a.todoFrameDays={update:function(d){Object.assign(e,d);var f=c(),g=a.querySelector(".container"),h=new Set(g.children),i=new Map;h.forEach(function(a){i.set(a.dataset.key,a)});var j=f.map(function(a){var b=i.get(a.id);return b?h.delete(b):(b=document.createElement("div"),b.className="card todo-day",b.dataset.key=a.id,VT.TodoDay(b)),b.todoDay.update(a),b.style.transform="translateX("+100*a.position+"%)",b});h.forEach(function(a){g.removeChild(a)}),j.forEach(function(a,b){a!==g.children[b]&&g.insertBefore(a,g.children[b])}),b()}}};