text: define("Router/History",["require","exports","Router/UrlRewriter","Router/Data"],function(t,e,r,o){function i(){return o.getHistory()[o.getHistoryPosition()-1]}function s(){return o.getHistory()[o.getHistoryPosition()]}function n(){return o.getHistory()[o.getHistoryPosition()+1]}function u(){var t=o.getHistory(),e=o.getHistoryPosition();if(0===e){var i=o.getVisibleRelativeUrl();t.unshift({id:t[0].id-1,state:r.get(i),href:i})}else o.setHistoryPosition(e-1);y()}function g(){var t=o.getHistory(),e=o.getHistoryPosition()+1;if(o.setHistoryPosition(e),e===t.length){var i=o.getRelativeUrl();t.push({id:t[e-1].id+1,state:r.get(i),href:i})}y()}function a(t){var e=o.getHistory(),i=o.getHistoryPosition();e.length=i+1,t.id=e[i].id+1,e.push(t),o.setHistoryPosition(i+1),y();var r=t.href||t.state;window.history.pushState(t,r,r)}function y(){o.setRelativeUrl(o.getHistory()[o.getHistoryPosition()].state)}return Object.defineProperty(e,"__esModule",{value:true}),e.getPrevState=i,e.getCurrentState=s,e.getNextState=n,e.back=u,e.forward=g,e.push=a,e});