Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding minified files

  • Loading branch information...
commit 05b785c6fbdb1953add83440aadf435129870c43 1 parent fe1ef38
Finnsson authored
Showing with 2 additions and 3 deletions.
  1. +1 −1  dist/pager.min.js
  2. +0 −1  pager.js
  3. +1 −1  pagerjs.com/demo/pager.min.js
2  dist/pager.min.js
View
@@ -1,4 +1,4 @@
/*! pager.js - v0.7.0 - 2013-02-16
* http://oscar.finnsson.nu/pagerjs/
* Copyright (c) 2013 Oscar Finnsson; Licensed MIT */
-(function(e){var t=e.History,n=function(n,r){"use strict";var i=function(e,t){return function(){var n=arguments;return r.computed(function(){return e.apply(t,n)})}},s={};s.page=null,s.now=function(){return Date.now?Date.now():(new Date).valueOf()},s.extendWithPage=function(e){var t=new s.Page;e.$__page__=t,s.page=t},s.navigationFailed=r.observable(),s.onBindingError=n.Callbacks(),s.onSourceError=n.Callbacks(),s.showChild=function(e){var t=e&&e.length===1&&e[0]===""?[]:e;s.page.showPage(t)},s.getParentPage=function(e){while(e){if(e.$page&&e.$page.val("urlToggle")!=="none")return e.$page;if(e.$data&&e.$data.$__page__)return e.$data.$__page__;e=e.$parentContext}return null};var o=function(e){e.substring(0,s.Href.hash.length)===s.Href.hash&&(e=e.slice(s.Href.hash.length));var t=u(e);s.showChild(t)};s.navigate=function(e){s.useHTML5history?s.Href5.history.pushState(null,null,e):location.hash=e};var u=function(e){return n.map(e.replace(/\+/g," ").split("/"),decodeURIComponent)},a={};a.value=r.utils.unwrapObservable,a.arrayValue=function(e){return n.map(e,function(e){return a.value(e)})};var f=function(e){var t,n={},r=/([^&=]+)=?([^&]*)/g;while(t=r.exec(e))n[t[1]]=t[2];return n},l=function(e){if(!e)return{name:null,params:{}};var t=e.split("?"),n=t[0],r=t[1],i={};return r&&(i=f(r)),{name:n,params:i}};s.ChildManager=function(e,t){this.currentChildO=r.observable(null);var i=this;this.page=t,this.timeStamp=s.now(),this.hideChild=function(){i.currentChild&&i.currentChild.getId()!=="start"&&(i.currentChild.hidePage(function(){}),i.currentChild=null,i.currentChildO(null))},this.showChild=function(t){var r=t.length===0;this.timeStamp=s.now();var o=this.timeStamp,u=i.currentChild;i.currentChild=null;var f=!1,c=l(t[0]),h=c.name,p=null;n.each(e(),function(e,t){if(!f){var n=t.getId();if(n===h||(h===""||h==null)&&n==="start")f=!0,i.currentChild=t;n==="?"&&(p=t)}});var d=!1,v=i,m=function(e,t){if(!f){var n=t.getId(),r=t.getValue().modal;if(r){if(n===h||(h===""||h==null)&&n==="start")f=!0,i.currentChild=t,d=!0;n==="?"&&!p&&(p=t,d=!0)}}};while(!i.currentChild&&v.page.parentPage&&!v.page.getValue().modal){var g=v.page.parentPage.children;n.each(g(),m),i.currentChild||(v=v.page.parentPage.childManager)}!i.currentChild&&p&&!r&&(i.currentChild=p),i.currentChild&&(i.currentChildO(i.currentChild),d?i.currentChild.currentParentPage(i.page):i.currentChild.currentParentPage(null));var y=function(){s.navigationFailed&&s.navigationFailed({page:i.page,route:t}),i.page.getValue().navigationFailed&&a.value(i.page.getValue().navigationFailed)(i.page,t)},b=function(){var e=a.value(i.currentChild.getValue().guard);e?e(i.currentChild,t,function(){i.timeStamp===o&&i.currentChild.showPage(t.slice(1),c,t[0])},u):i.currentChild.showPage(t.slice(1),c,t[0])};u&&u===i.currentChild?b():u?u.hidePage(function(){i.currentChild?b():y()}):i.currentChild?b():y()}},s.Page=function(e,t,n,i,o){this.element=e,this.valueAccessor=t,this.allBindingsAccessor=n,this.viewModel=i,this.bindingContext=o,this.children=r.observableArray([]),this.childManager=new s.ChildManager(this.children,this),this.parentPage=null,this.currentId=null,this.getCurrentId=r.observable(),this.ctx=null,this.currentParentPage=r.observable(null),this.isVisible=r.observable(!1),this.originalRoute=r.observable(null),this.route=null};var c=s.Page.prototype;c.val=function(e){return a.value(this.getValue()[e])},c.currentChildPage=function(){return this.childManager.currentChildO},c.find=function(e){var t=a.value(e),r=this;if(t.substring(0,1)==="/")r=s.page,t=t.slice(1);else while(t.substring(0,3)==="../")r=r.currentParentPage&&r.currentParentPage()?r.currentParentPage():r.parentPage,t=t.slice(3);var i=u(t);return n.each(i,function(e,t){r=r.child(t)()}),r},c.find$=function(e){return i(this.find,this)(e)},c.path=function(e){var t=this,r=a.value(e);if(r&&typeof r=="object"&&r.path&&r.params&&!(r instanceof s.Page)){var i=r.path,o=r.params;return t.path(i)+"?"+n.param(o)}var u;if(r==null||r==="")u=t;else{if(!(r instanceof s.Page)){if(r.substring(0,1)==="/")return s.page.getFullRoute()()+r.substring(1);var f=0;while(r.substring(0,3)==="../")f++,r=r.slice(3);var l=t.getFullRoute()(),c=l.slice(0,l.length-f).join("/"),h=(c===""?"":c+"/")+r;return s.useHTML5history?n("base").attr("href")+h:s.Href.hash+h}u=r}var p=u.getFullRoute()().join("/");return s.useHTML5history?n("base").attr("href")+p:s.Href.hash+p},c.path$=function(e){return i(this.path,this)(e)},c.async=function(e,t,n){var r=this;return function(){var i=e();i.done(function(){s.navigate(r.path(t))}),i.fail(function(){s.navigate(r.path(n))})}},c.showPage=function(e,t,n){var r=this,i=r.currentId,s=r.pageRoute?r.pageRoute.params:null,o=r.isVisible();r.currentId=t?t.name||"":"",r.getCurrentId(r.currentId),r.isVisible(!0),n&&r.originalRoute(n),r.route=e,r.pageRoute=t,o?(r.getId()==="?"&&i!==r.currentId&&r.show(),t&&s!==t.params&&r.setParams()):(r.setParams(),r.show()),r.childManager.showChild(e)},c.setParams=function(){if(this.pageRoute&&this.pageRoute.params){var e=this.pageRoute.params,t=this.ctx,i=this.val("params")||{};n.isArray(i)?n.each(i,function(n,i){var s=e[i];t[i]?t[i](s):t[i]=r.observable(s)}):n.each(i,function(n,i){var s=e[n],o;s==null?o=a.value(i):o=s,t[n]?t[n](o):t[n]=r.observable(o)})}if(this.pageRoute){var s=this.getValue().nameParam;s&&(typeof s=="string"?this.ctx[s]?this.ctx[s](this.currentId):this.ctx[s]=r.observable(this.currentId):s(this.currentId))}},c.hidePage=function(e){var t=this;"show"!==t.val("urlToggle")?(t.hideElementWrapper(e),t.childManager.hideChild()):e&&e()};var h=function(e){try{r.applyBindingsToDescendants(e.childBindingContext,e.element)}catch(t){var n=e.val("onBindingError");n&&n(e.e),s.onBindingError.fire({page:e,error:t})}};c.init=function(){var e=this,t=e.val("urlToggle"),i=e.val("id");i!=="?"&&e.getCurrentId(i);var s=r.utils.domData.get(e.element,"__ko_pagerjsBindingData");if(s)return{controlsDescendantBindings:!0};r.utils.domData.set(e.element,"__ko_pagerjsBindingData",e),r.utils.domNodeDisposal.addDisposeCallback(e.element,function(){e.parentPage&&e.parentPage.children.remove(e)});var o=e.getValue();t!=="none"&&(e.parentPage=e.getParentPage(),e.parentPage.children.push(this),e.hideElement()),e.val("source")&&e.loadSource(e.val("source")),e.ctx=null;if(o.withOnShow)e.ctx={},e.childBindingContext=e.bindingContext.createChildContext(e.ctx),r.utils.extend(e.childBindingContext,{$page:this});else{var u=o["with"]||e.bindingContext.$observableData||e.viewModel;e.ctx=a.value(u),e.augmentContext();if(r.isObservable(u)){var f=r.observable(e.ctx);e.childBindingContext=e.bindingContext.createChildContext(f),r.utils.extend(e.childBindingContext,{$page:this,$observableData:u}),h(e),u.subscribe(function(){f(a.value(u))})}else e.childBindingContext=e.bindingContext.createChildContext(e.ctx),r.utils.extend(e.childBindingContext,{$page:this,$observableData:undefined}),h(e)}if(t!=="none")e.parentPage.route&&e.parentPage.route[0]===e.getId()&&setTimeout(function(){e.parentPage.showPage(e.parentPage.route)},0);else{var l=function(){n(e.element).is(":visible")&&e.showPage([])};setTimeout(l,0),e.getParentPage().isVisible.subscribe(function(e){e&&setTimeout(l,0)})}return{controlsDescendantBindings:!0}},c.augmentContext=function(){var e=this,t=e.val("params");t&&(n.isArray(t)?n.each(t,function(t,n){e.ctx[n]||(e.ctx[n]=r.observable())}):n.each(t,function(n,i){e.ctx[n]||(r.isObservable(i)?e.ctx[n]=i:i===null?(t[n]=r.observable(null),e.ctx[n]=r.observable(null)):e.ctx[n]=r.observable(i))})),this.val("vars")&&n.each(this.val("vars"),function(t,n){r.isObservable(n)?e.ctx[t]=n:e.ctx[t]=r.observable(n)});var i=this.getValue().nameParam;i&&typeof i=="string"&&(e.ctx[i]=r.observable(null)),this.setParams()},c.getValue=function(){return this.valueAccessor?a.value(this.valueAccessor()):{}},c.getParentPage=function(){return s.getParentPage(this.bindingContext)},c.getId=function(){return this.val("id")},c.id=function(){var e=this.getCurrentId();return e==null||e===""?this.getId():e},c.sourceUrl=function(e){var t=this;return this.getId()==="?"?r.computed(function(){var n;return t.val("deep")?n=[t.currentId].concat(t.route).join("/"):n=t.currentId,a.value(e).replace("{1}",n)}):r.computed(function(){return a.value(e)})},c.loadWithOnShow=function(){var e=this;if(!e.withOnShowLoaded||e.val("sourceCache")!==!0)e.withOnShowLoaded=!0,e.val("withOnShow")(function(t){var n=e.bindingContext.createChildContext(t);e.ctx=t,e.childBindingContext=n,e.augmentContext(),r.utils.extend(n,{$page:e}),h(e)},e)},c.loadSource=function(e){var t=this.getValue(),i=this,o=this.element,u=null,f=t.loader||s.loader;if(t.frame==="iframe"){var l=n("iframe",n(o));l.length===0&&(l=n("<iframe></iframe>"),n(o).append(l)),f&&(u=a.value(f)(i,l),u.load()),l.one("load",function(){u&&u.unload(),t.sourceLoaded&&t.sourceLoaded(i)}),r.applyBindingsToNode(l[0],{attr:{src:this.sourceUrl(e)}})}else{f&&(u=a.value(f)(i,i.element),u.load());var c=function(){u&&u.unload(),i.val("withOnShow")?i.val("withOnShow")&&i.loadWithOnShow():h(i),t.sourceLoaded&&t.sourceLoaded(i),i.route&&i.childManager.showChild(i.route)};if(typeof a.value(e)=="string"){var p=a.value(this.sourceUrl(e));d(o,p,function(){c()},i)}else n.each(n(o).children(),function(e,t){r.utils.domNodeDisposal.removeNode(t)}),a.value(e)(this,function(){c()})}};var p=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,d=function(e,t,i,o){var u,a,f,l=n(e),c=t.indexOf(" ");c>=0&&(u=t.slice(c,t.length),t=t.slice(0,c));var h=jQuery.ajax({url:t,type:"GET",dataType:"html",complete:function(e,t){i&&l.each(i,f||[e.responseText,t,e])}}).done(function(e){f=arguments,n.each(l.children(),function(e,t){r.utils.domNodeDisposal.removeNode(t)}),l.html(u?jQuery("<div>").append(e.replace(p,"")).find(u):e)});return h.fail(function(){o.val("onSourceError")&&o.val("onSourceError")({url:t,page:o,xhrPromise:h}),s.onSourceError.fire({url:t,page:o,xhrPromise:h})}),l};c.show=function(t){var n=this.element,r=this;r.showElementWrapper(t),r.val("title")&&(e.document.title=r.val("title"));if(r.val("sourceOnShow")){if(!r.val("sourceCache")||!n.__pagerLoaded__||typeof r.val("sourceCache")=="number"&&n.__pagerLoaded__+r.val("sourceCache")*1e3<s.now())n.__pagerLoaded__=s.now(),r.loadSource(r.val("sourceOnShow"))}else r.val("withOnShow")&&r.loadWithOnShow()},c.showElementWrapper=function(e){this.val("beforeShow")&&this.val("beforeShow")(this),this.showElement(e),this.val("afterShow")&&this.val("afterShow")(this)},c.showElement=function(e){this.val("showElement")?this.val("showElement")(this,e):this.val("fx")?s.fx[this.val("fx")].showElement(this,e):s.showElement?s.showElement(this,e):n(this.element).show(e)},c.hideElementWrapper=function(e){this.isVisible(!1),this.val("beforeHide")&&this.val("beforeHide")(this),this.hideElement(e),this.val("afterHide")&&this.val("afterHide")(this)},c.hideElement=function(e){this.val("hideElement")?this.val("hideElement")(this,e):this.val("fx")?s.fx[this.val("fx")].hideElement(this,e):s.hideElement?s.hideElement(this,e):(n(this.element).hide(),e&&e())},c.getFullRoute=function(){return this._fullRoute?this._fullRoute:(this._fullRoute=r.computed(function(){var e=null;return this.currentParentPage&&this.currentParentPage()?(e=this.currentParentPage().getFullRoute()().slice(0),e.push(this.originalRoute()||this.getId()),e):this.parentPage?(e=this.parentPage.getFullRoute()().slice(0),e.push(this.originalRoute()||this.getId()),e):[]},this),this._fullRoute)},c.nullObject=new s.Page,c.nullObject.children=r.observableArray([]),c.child=function(e){var t=this;return t._child==null&&(t._child={}),t._child[e]||(t._child[e]=r.computed(function(){var t=n.grep(this.children(),function(t){return t.id()===e})[0];return t||this.nullObject},this)),t._child[e]},r.bindingHandlers.page={init:function(e,t,n,r,i){var o=new s.Page(e,t,n,r,i);return o.init()}},s.useHTML5history=!1,s.rootURI="/",s.Href=function(e,t,n,i,s){this.element=e,this.bindingContext=s,this.path=r.observable(),this.pageOrRelativePath=r.observable(t)};var v=s.Href.prototype;return v.getParentPage=function(){return s.getParentPage(this.bindingContext)},v.init=function(){var e=this,t=e.getParentPage();e.path=r.computed(function(){var n=a.value(e.pageOrRelativePath()()),r=t.path(n);return t.path(n)})},s.Href.hash="#",v.bind=function(){r.applyBindingsToNode(this.element,{attr:{href:this.path}})},v.update=function(e){this.pageOrRelativePath(e)},s.Href5=function(e,t,n,r,i){s.Href.apply(this,arguments)},s.Href5.prototype=new s.Href,s.Href5.history=e.history,s.Href5.prototype.bind=function(){var e=this;r.applyBindingsToNode(e.element,{attr:{href:e.path},click:function(){var t=e.path();if(t===""||t==="/")t=n("base").attr("href");s.Href5.history.pushState(null,null,t)}})},r.bindingHandlers["page-hash"]={init:function(e,t,n,r,i){var o=new s.Href(e,t,n,r,i);o.init(),o.bind(),e.__ko__page=o},update:function(e,t){e.__ko__page.update(t)}},r.bindingHandlers["page-href5"]={init:function(e,t,n,r,i){var o=new s.Href5(e,t,n,r,i);o.init(),o.bind(),e.__ko__page=o},update:function(e,t){e.__ko__page.update(t)}},r.bindingHandlers["page-href"]={init:function(e,t,n,r,i){var o=s.useHTML5history?s.Href5:s.Href,u=new o(e,t,n,r,i);u.init(),u.bind(),e.__ko__page=u},update:function(e,t){e.__ko__page.update(t)}},s.fx={},s.fx.cssAsync=function(e){return{showElement:function(t,r){var i=n(t.element);i.addClass(e),i.show();var s=setInterval(function(){clearInterval(s),i.addClass(e+"-in")},10),o=setInterval(function(){clearInterval(o),r&&r()},300)},hideElement:function(t,r){var i=n(t.element);if(!t.pageHiddenOnce)t.pageHiddenOnce=!0,i.hide();else{i.removeClass(e+"-in");var s=setInterval(function(){clearInterval(s),r&&r(),i.hide()},300)}}}},s.fx.zoom=s.fx.cssAsync("pagerjs-fx-zoom"),s.fx.flip=s.fx.cssAsync("pagerjs-fx-flip"),s.fx.popout=s.fx.cssAsync("pagerjs-fx-popout-modal"),s.fx.jQuerySync=function(e,t){return{showElement:function(t,r){e.call(n(t.element),300,r)},hideElement:function(e,r){t.call(n(e.element),300,function(){n(e.element).hide()}),r&&r()}}},s.fx.slide=s.fx.jQuerySync(n.fn.slideDown,n.fn.slideUp),s.fx.fade=s.fx.jQuerySync(n.fn.fadeIn,n.fn.fadeOut),s.startHistoryJs=function(r){r&&s.Href5.history.pushState(null,null,r),t.Adapter.bind(e,"statechange",function(){var e=n("base").attr("href"),r=t.getState().url.replace(e,"");o(r)}),t.Adapter.bind(e,"anchorchange",function(){o(location.hash)}),o(t.getState().url.replace(t.getRootUrl(),""))},s.startHashChange=function(t){t&&(e.location.hash=s.Href.hash+t),n(e).hashchange(function(){o(e.location.hash)}),n(e).hashchange()},s.start=function(t){t&&(e.location.hash=s.Href.hash+t);var r=function(){o(e.location.hash)};n(e).bind("hashchange",r),r()},s},r=e.define;typeof r=="function"&&typeof r.amd=="object"&&r.amd?r(["knockout","jquery"],function(e){return n($,e)}):e.pager=n($,ko)})(window);
+(function(e){var t=e.History,n=function(n,r){"use strict";var i=function(e,t){return function(){var n=arguments;return r.computed(function(){return e.apply(t,n)})}},s={};s.page=null,s.now=function(){return Date.now?Date.now():(new Date).valueOf()},s.extendWithPage=function(e){var t=new s.Page;e.$__page__=t,s.page=t},s.navigationFailed=r.observable(),s.onBindingError=n.Callbacks(),s.onSourceError=n.Callbacks(),s.showChild=function(e){var t=e&&e.length===1&&e[0]===""?[]:e;s.page.showPage(t)},s.getParentPage=function(e){while(e){if(e.$page&&e.$page.val("urlToggle")!=="none")return e.$page;if(e.$data&&e.$data.$__page__)return e.$data.$__page__;e=e.$parentContext}return null};var o=function(e){e.substring(0,s.Href.hash.length)===s.Href.hash&&(e=e.slice(s.Href.hash.length));var t=u(e);s.showChild(t)};s.navigate=function(e){s.useHTML5history?s.Href5.history.pushState(null,null,e):location.hash=e};var u=function(e){return n.map(e.replace(/\+/g," ").split("/"),decodeURIComponent)},a={};a.value=r.utils.unwrapObservable,a.arrayValue=function(e){return n.map(e,function(e){return a.value(e)})};var f=function(e){var t,n={},r=/([^&=]+)=?([^&]*)/g;while(t=r.exec(e))n[t[1]]=t[2];return n},l=function(e){if(!e)return{name:null,params:{}};var t=e.split("?"),n=t[0],r=t[1],i={};return r&&(i=f(r)),{name:n,params:i}};s.ChildManager=function(e,t){this.currentChildO=r.observable(null);var i=this;this.page=t,this.timeStamp=s.now(),this.hideChild=function(){i.currentChild&&i.currentChild.getId()!=="start"&&(i.currentChild.hidePage(function(){}),i.currentChild=null,i.currentChildO(null))},this.showChild=function(t){var r=t.length===0;this.timeStamp=s.now();var o=this.timeStamp,u=i.currentChild;i.currentChild=null;var f=!1,c=l(t[0]),h=c.name,p=null;n.each(e(),function(e,t){if(!f){var n=t.getId();if(n===h||(h===""||h==null)&&n==="start")f=!0,i.currentChild=t;n==="?"&&(p=t)}});var d=!1,v=i,m=function(e,t){if(!f){var n=t.getId(),r=t.getValue().modal;if(r){if(n===h||(h===""||h==null)&&n==="start")f=!0,i.currentChild=t,d=!0;n==="?"&&!p&&(p=t,d=!0)}}};while(!i.currentChild&&v.page.parentPage&&!v.page.getValue().modal){var g=v.page.parentPage.children;n.each(g(),m),i.currentChild||(v=v.page.parentPage.childManager)}!i.currentChild&&p&&!r&&(i.currentChild=p),i.currentChild&&(i.currentChildO(i.currentChild),d?i.currentChild.currentParentPage(i.page):i.currentChild.currentParentPage(null));var y=function(){s.navigationFailed&&s.navigationFailed({page:i.page,route:t}),i.page.getValue().navigationFailed&&a.value(i.page.getValue().navigationFailed)(i.page,t)},b=function(){var e=a.value(i.currentChild.getValue().guard);e?e(i.currentChild,t,function(){i.timeStamp===o&&i.currentChild.showPage(t.slice(1),c,t[0])},u):i.currentChild.showPage(t.slice(1),c,t[0])};u&&u===i.currentChild?b():u?u.hidePage(function(){i.currentChild?b():y()}):i.currentChild?b():y()}},s.Page=function(e,t,n,i,o){this.element=e,this.valueAccessor=t,this.allBindingsAccessor=n,this.viewModel=i,this.bindingContext=o,this.children=r.observableArray([]),this.childManager=new s.ChildManager(this.children,this),this.parentPage=null,this.currentId=null,this.getCurrentId=r.observable(),this.ctx=null,this.currentParentPage=r.observable(null),this.isVisible=r.observable(!1),this.originalRoute=r.observable(null),this.route=null};var c=s.Page.prototype;c.val=function(e){return a.value(this.getValue()[e])},c.currentChildPage=function(){return this.childManager.currentChildO},c.find=function(e){var t=a.value(e),r=this;if(t.substring(0,1)==="/")r=s.page,t=t.slice(1);else while(t.substring(0,3)==="../")r=r.currentParentPage&&r.currentParentPage()?r.currentParentPage():r.parentPage,t=t.slice(3);var i=u(t);return n.each(i,function(e,t){r=r.child(t)()}),r},c.find$=function(e){return i(this.find,this)(e)},c.path=function(e){var t=this,r=a.value(e);if(r&&typeof r=="object"&&r.path&&r.params&&!(r instanceof s.Page)){var i=r.path,o=r.params;return t.path(i)+"?"+n.param(o)}var u;if(r==null||r==="")u=t;else{if(!(r instanceof s.Page)){if(r.substring(0,1)==="/")return s.page.getFullRoute()()+r.substring(1);var f=0;while(r.substring(0,3)==="../")f++,r=r.slice(3);var l=t.getFullRoute()(),c=l.slice(0,l.length-f).join("/"),h=(c===""?"":c+"/")+r;return s.useHTML5history?n("base").attr("href")+h:s.Href.hash+h}u=r}var p=u.getFullRoute()().join("/");return s.useHTML5history?n("base").attr("href")+p:s.Href.hash+p},c.path$=function(e){return i(this.path,this)(e)},c.async=function(e,t,n){var r=this;return function(){var i=e();i.done(function(){s.navigate(r.path(t))}),i.fail(function(){s.navigate(r.path(n))})}},c.showPage=function(e,t,n){var r=this,i=r.currentId,s=r.pageRoute?r.pageRoute.params:null,o=r.isVisible();r.currentId=t?t.name||"":"",r.getCurrentId(r.currentId),r.isVisible(!0),n&&r.originalRoute(n),r.route=e,r.pageRoute=t,o?(r.getId()==="?"&&i!==r.currentId&&r.show(),t&&s!==t.params&&r.setParams()):(r.setParams(),r.show()),r.childManager.showChild(e)},c.setParams=function(){if(this.pageRoute&&this.pageRoute.params){var e=this.pageRoute.params,t=this.ctx,i=this.val("params")||{};n.isArray(i)?n.each(i,function(n,i){var s=e[i];t[i]?t[i](s):t[i]=r.observable(s)}):n.each(i,function(n,i){var s=e[n],o;s==null?o=a.value(i):o=s,t[n]?t[n](o):t[n]=r.observable(o)})}if(this.pageRoute){var s=this.getValue().nameParam;s&&(typeof s=="string"?this.ctx[s]?this.ctx[s](this.currentId):this.ctx[s]=r.observable(this.currentId):s(this.currentId))}},c.hidePage=function(e){var t=this;"show"!==t.val("urlToggle")?(t.hideElementWrapper(e),t.childManager.hideChild()):e&&e()};var h=function(e){try{r.applyBindingsToDescendants(e.childBindingContext,e.element)}catch(t){var n=e.val("onBindingError");n&&n(e.e),s.onBindingError.fire({page:e,error:t})}};c.init=function(){var e=this,t=e.val("urlToggle"),i=e.val("id");i!=="?"&&e.getCurrentId(i);var s=r.utils.domData.get(e.element,"__ko_pagerjsBindingData");if(s)return{controlsDescendantBindings:!0};r.utils.domData.set(e.element,"__ko_pagerjsBindingData",e),r.utils.domNodeDisposal.addDisposeCallback(e.element,function(){e.parentPage&&e.parentPage.children.remove(e)});var o=e.getValue();t!=="none"&&(e.parentPage=e.getParentPage(),e.parentPage.children.push(this),e.hideElement()),e.val("source")&&e.loadSource(e.val("source")),e.ctx=null;if(o.withOnShow)e.ctx={},e.childBindingContext=e.bindingContext.createChildContext(e.ctx),r.utils.extend(e.childBindingContext,{$page:this});else{var u=o["with"]||e.bindingContext.$observableData||e.viewModel;e.ctx=a.value(u),e.augmentContext();if(r.isObservable(u)){var f=r.observable(e.ctx);e.childBindingContext=e.bindingContext.createChildContext(f),r.utils.extend(e.childBindingContext,{$page:this,$observableData:u}),h(e),u.subscribe(function(){f(a.value(u))})}else e.childBindingContext=e.bindingContext.createChildContext(e.ctx),r.utils.extend(e.childBindingContext,{$page:this,$observableData:undefined}),h(e)}if(t!=="none")e.parentPage.route&&e.parentPage.route[0]===e.getId()&&setTimeout(function(){e.parentPage.showPage(e.parentPage.route)},0);else{var l=function(){n(e.element).is(":visible")&&e.showPage([])};setTimeout(l,0),e.getParentPage().isVisible.subscribe(function(e){e&&setTimeout(l,0)})}var c=e.getValue().bind;return r.isObservable(c)&&c(e),{controlsDescendantBindings:!0}},c.augmentContext=function(){var e=this,t=e.val("params");t&&(n.isArray(t)?n.each(t,function(t,n){e.ctx[n]||(e.ctx[n]=r.observable())}):n.each(t,function(n,i){e.ctx[n]||(r.isObservable(i)?e.ctx[n]=i:i===null?(t[n]=r.observable(null),e.ctx[n]=r.observable(null)):e.ctx[n]=r.observable(i))})),this.val("vars")&&n.each(this.val("vars"),function(t,n){r.isObservable(n)?e.ctx[t]=n:e.ctx[t]=r.observable(n)});var i=this.getValue().nameParam;i&&typeof i=="string"&&(e.ctx[i]=r.observable(null)),this.setParams()},c.getValue=function(){return this.valueAccessor?a.value(this.valueAccessor()):{}},c.getParentPage=function(){return s.getParentPage(this.bindingContext)},c.getId=function(){return this.val("id")},c.id=function(){var e=this.getCurrentId();return e==null||e===""?this.getId():e},c.sourceUrl=function(e){var t=this;return this.getId()==="?"?r.computed(function(){var n;return t.val("deep")?n=[t.currentId].concat(t.route).join("/"):n=t.currentId,a.value(e).replace("{1}",n)}):r.computed(function(){return a.value(e)})},c.loadWithOnShow=function(){var e=this;if(!e.withOnShowLoaded||e.val("sourceCache")!==!0)e.withOnShowLoaded=!0,e.val("withOnShow")(function(t){var n=e.bindingContext.createChildContext(t);e.ctx=t,e.childBindingContext=n,e.augmentContext(),r.utils.extend(n,{$page:e}),h(e)},e)},c.loadSource=function(e){var t=this.getValue(),i=this,o=this.element,u=null,f=t.loader||s.loader;if(t.frame==="iframe"){var l=n("iframe",n(o));l.length===0&&(l=n("<iframe></iframe>"),n(o).append(l)),f&&(u=a.value(f)(i,l),u.load()),l.one("load",function(){u&&u.unload(),t.sourceLoaded&&t.sourceLoaded(i)}),r.applyBindingsToNode(l[0],{attr:{src:this.sourceUrl(e)}})}else{f&&(u=a.value(f)(i,i.element),u.load());var c=function(){u&&u.unload(),i.val("withOnShow")?i.val("withOnShow")&&i.loadWithOnShow():h(i),t.sourceLoaded&&t.sourceLoaded(i),i.route&&i.childManager.showChild(i.route)};if(typeof a.value(e)=="string"){var p=a.value(this.sourceUrl(e));d(o,p,function(){c()},i)}else n.each(n(o).children(),function(e,t){r.utils.domNodeDisposal.removeNode(t)}),a.value(e)(this,function(){c()})}};var p=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,d=function(e,t,i,o){var u,a,f,l=n(e),c=t.indexOf(" ");c>=0&&(u=t.slice(c,t.length),t=t.slice(0,c));var h=jQuery.ajax({url:t,type:"GET",dataType:"html",complete:function(e,t){i&&l.each(i,f||[e.responseText,t,e])}}).done(function(e){f=arguments,n.each(l.children(),function(e,t){r.utils.domNodeDisposal.removeNode(t)}),l.html(u?jQuery("<div>").append(e.replace(p,"")).find(u):e)});return h.fail(function(){o.val("onSourceError")&&o.val("onSourceError")({url:t,page:o,xhrPromise:h}),s.onSourceError.fire({url:t,page:o,xhrPromise:h})}),l};c.show=function(t){var n=this.element,r=this;r.showElementWrapper(t),r.val("title")&&(e.document.title=r.val("title"));if(r.val("sourceOnShow")){if(!r.val("sourceCache")||!n.__pagerLoaded__||typeof r.val("sourceCache")=="number"&&n.__pagerLoaded__+r.val("sourceCache")*1e3<s.now())n.__pagerLoaded__=s.now(),r.loadSource(r.val("sourceOnShow"))}else r.val("withOnShow")&&r.loadWithOnShow()},c.showElementWrapper=function(e){this.val("beforeShow")&&this.val("beforeShow")(this),this.showElement(e),this.val("afterShow")&&this.val("afterShow")(this)},c.showElement=function(e){this.val("showElement")?this.val("showElement")(this,e):this.val("fx")?s.fx[this.val("fx")].showElement(this,e):s.showElement?s.showElement(this,e):n(this.element).show(e)},c.hideElementWrapper=function(e){this.isVisible(!1),this.val("beforeHide")&&this.val("beforeHide")(this),this.hideElement(e),this.val("afterHide")&&this.val("afterHide")(this)},c.hideElement=function(e){this.val("hideElement")?this.val("hideElement")(this,e):this.val("fx")?s.fx[this.val("fx")].hideElement(this,e):s.hideElement?s.hideElement(this,e):(n(this.element).hide(),e&&e())},c.getFullRoute=function(){return this._fullRoute?this._fullRoute:(this._fullRoute=r.computed(function(){var e=null;return this.currentParentPage&&this.currentParentPage()?(e=this.currentParentPage().getFullRoute()().slice(0),e.push(this.originalRoute()||this.getId()),e):this.parentPage?(e=this.parentPage.getFullRoute()().slice(0),e.push(this.originalRoute()||this.getId()),e):[]},this),this._fullRoute)},c.nullObject=new s.Page,c.nullObject.children=r.observableArray([]),c.child=function(e){var t=this;return t._child==null&&(t._child={}),t._child[e]||(t._child[e]=r.computed(function(){var t=n.grep(this.children(),function(t){return t.id()===e})[0];return t||this.nullObject},this)),t._child[e]},r.bindingHandlers.page={init:function(e,t,n,r,i){var o=new s.Page(e,t,n,r,i);return o.init()}},s.useHTML5history=!1,s.rootURI="/",s.Href=function(e,t,n,i,s){this.element=e,this.bindingContext=s,this.path=r.observable(),this.pageOrRelativePath=r.observable(t)};var v=s.Href.prototype;return v.getParentPage=function(){return s.getParentPage(this.bindingContext)},v.init=function(){var e=this,t=e.getParentPage();e.path=r.computed(function(){var n=a.value(e.pageOrRelativePath()()),r=t.path(n);return t.path(n)})},s.Href.hash="#",v.bind=function(){r.applyBindingsToNode(this.element,{attr:{href:this.path}})},v.update=function(e){this.pageOrRelativePath(e)},s.Href5=function(e,t,n,r,i){s.Href.apply(this,arguments)},s.Href5.prototype=new s.Href,s.Href5.history=e.history,s.Href5.prototype.bind=function(){var e=this;r.applyBindingsToNode(e.element,{attr:{href:e.path},click:function(){var t=e.path();if(t===""||t==="/")t=n("base").attr("href");s.Href5.history.pushState(null,null,t)}})},r.bindingHandlers["page-hash"]={init:function(e,t,n,r,i){var o=new s.Href(e,t,n,r,i);o.init(),o.bind(),e.__ko__page=o},update:function(e,t){e.__ko__page.update(t)}},r.bindingHandlers["page-href5"]={init:function(e,t,n,r,i){var o=new s.Href5(e,t,n,r,i);o.init(),o.bind(),e.__ko__page=o},update:function(e,t){e.__ko__page.update(t)}},r.bindingHandlers["page-href"]={init:function(e,t,n,r,i){var o=s.useHTML5history?s.Href5:s.Href,u=new o(e,t,n,r,i);u.init(),u.bind(),e.__ko__page=u},update:function(e,t){e.__ko__page.update(t)}},s.fx={},s.fx.cssAsync=function(e){return{showElement:function(t,r){var i=n(t.element);i.addClass(e),i.show();var s=setInterval(function(){clearInterval(s),i.addClass(e+"-in")},10),o=setInterval(function(){clearInterval(o),r&&r()},300)},hideElement:function(t,r){var i=n(t.element);if(!t.pageHiddenOnce)t.pageHiddenOnce=!0,i.hide();else{i.removeClass(e+"-in");var s=setInterval(function(){clearInterval(s),r&&r(),i.hide()},300)}}}},s.fx.zoom=s.fx.cssAsync("pagerjs-fx-zoom"),s.fx.flip=s.fx.cssAsync("pagerjs-fx-flip"),s.fx.popout=s.fx.cssAsync("pagerjs-fx-popout-modal"),s.fx.jQuerySync=function(e,t){return{showElement:function(t,r){e.call(n(t.element),300,r)},hideElement:function(e,r){t.call(n(e.element),300,function(){n(e.element).hide()}),r&&r()}}},s.fx.slide=s.fx.jQuerySync(n.fn.slideDown,n.fn.slideUp),s.fx.fade=s.fx.jQuerySync(n.fn.fadeIn,n.fn.fadeOut),s.startHistoryJs=function(r){r&&s.Href5.history.pushState(null,null,r),t.Adapter.bind(e,"statechange",function(){var e=n("base").attr("href"),r=t.getState().url.replace(e,"");o(r)}),t.Adapter.bind(e,"anchorchange",function(){o(location.hash)}),o(t.getState().url.replace(t.getRootUrl(),""))},s.startHashChange=function(t){t&&(e.location.hash=s.Href.hash+t),n(e).hashchange(function(){o(e.location.hash)}),n(e).hashchange()},s.start=function(t){t&&(e.location.hash=s.Href.hash+t);var r=function(){o(e.location.hash)};n(e).bind("hashchange",r),r()},s},r=e.define;typeof r=="function"&&typeof r.amd=="object"&&r.amd?r(["knockout","jquery"],function(e){return n($,e)}):e.pager=n($,ko)})(window);
1  pager.js
View
@@ -1226,7 +1226,6 @@
me.path = ko.computed(function () {
var value = _ko.value(me.pageOrRelativePath()());
- var x = page.path(value);
return page.path(value);
});
};
2  pagerjs.com/demo/pager.min.js
View
@@ -1,4 +1,4 @@
/*! pager.js - v0.7.0 - 2013-02-16
* http://oscar.finnsson.nu/pagerjs/
* Copyright (c) 2013 Oscar Finnsson; Licensed MIT */
-(function(e){var t=e.History,n=function(n,r){"use strict";var i=function(e,t){return function(){var n=arguments;return r.computed(function(){return e.apply(t,n)})}},s={};s.page=null,s.now=function(){return Date.now?Date.now():(new Date).valueOf()},s.extendWithPage=function(e){var t=new s.Page;e.$__page__=t,s.page=t},s.navigationFailed=r.observable(),s.onBindingError=n.Callbacks(),s.onSourceError=n.Callbacks(),s.showChild=function(e){var t=e&&e.length===1&&e[0]===""?[]:e;s.page.showPage(t)},s.getParentPage=function(e){while(e){if(e.$page&&e.$page.val("urlToggle")!=="none")return e.$page;if(e.$data&&e.$data.$__page__)return e.$data.$__page__;e=e.$parentContext}return null};var o=function(e){e.substring(0,s.Href.hash.length)===s.Href.hash&&(e=e.slice(s.Href.hash.length));var t=u(e);s.showChild(t)};s.navigate=function(e){s.useHTML5history?s.Href5.history.pushState(null,null,e):location.hash=e};var u=function(e){return n.map(e.replace(/\+/g," ").split("/"),decodeURIComponent)},a={};a.value=r.utils.unwrapObservable,a.arrayValue=function(e){return n.map(e,function(e){return a.value(e)})};var f=function(e){var t,n={},r=/([^&=]+)=?([^&]*)/g;while(t=r.exec(e))n[t[1]]=t[2];return n},l=function(e){if(!e)return{name:null,params:{}};var t=e.split("?"),n=t[0],r=t[1],i={};return r&&(i=f(r)),{name:n,params:i}};s.ChildManager=function(e,t){this.currentChildO=r.observable(null);var i=this;this.page=t,this.timeStamp=s.now(),this.hideChild=function(){i.currentChild&&i.currentChild.getId()!=="start"&&(i.currentChild.hidePage(function(){}),i.currentChild=null,i.currentChildO(null))},this.showChild=function(t){var r=t.length===0;this.timeStamp=s.now();var o=this.timeStamp,u=i.currentChild;i.currentChild=null;var f=!1,c=l(t[0]),h=c.name,p=null;n.each(e(),function(e,t){if(!f){var n=t.getId();if(n===h||(h===""||h==null)&&n==="start")f=!0,i.currentChild=t;n==="?"&&(p=t)}});var d=!1,v=i,m=function(e,t){if(!f){var n=t.getId(),r=t.getValue().modal;if(r){if(n===h||(h===""||h==null)&&n==="start")f=!0,i.currentChild=t,d=!0;n==="?"&&!p&&(p=t,d=!0)}}};while(!i.currentChild&&v.page.parentPage&&!v.page.getValue().modal){var g=v.page.parentPage.children;n.each(g(),m),i.currentChild||(v=v.page.parentPage.childManager)}!i.currentChild&&p&&!r&&(i.currentChild=p),i.currentChild&&(i.currentChildO(i.currentChild),d?i.currentChild.currentParentPage(i.page):i.currentChild.currentParentPage(null));var y=function(){s.navigationFailed&&s.navigationFailed({page:i.page,route:t}),i.page.getValue().navigationFailed&&a.value(i.page.getValue().navigationFailed)(i.page,t)},b=function(){var e=a.value(i.currentChild.getValue().guard);e?e(i.currentChild,t,function(){i.timeStamp===o&&i.currentChild.showPage(t.slice(1),c,t[0])},u):i.currentChild.showPage(t.slice(1),c,t[0])};u&&u===i.currentChild?b():u?u.hidePage(function(){i.currentChild?b():y()}):i.currentChild?b():y()}},s.Page=function(e,t,n,i,o){this.element=e,this.valueAccessor=t,this.allBindingsAccessor=n,this.viewModel=i,this.bindingContext=o,this.children=r.observableArray([]),this.childManager=new s.ChildManager(this.children,this),this.parentPage=null,this.currentId=null,this.getCurrentId=r.observable(),this.ctx=null,this.currentParentPage=r.observable(null),this.isVisible=r.observable(!1),this.originalRoute=r.observable(null),this.route=null};var c=s.Page.prototype;c.val=function(e){return a.value(this.getValue()[e])},c.currentChildPage=function(){return this.childManager.currentChildO},c.find=function(e){var t=a.value(e),r=this;if(t.substring(0,1)==="/")r=s.page,t=t.slice(1);else while(t.substring(0,3)==="../")r=r.currentParentPage&&r.currentParentPage()?r.currentParentPage():r.parentPage,t=t.slice(3);var i=u(t);return n.each(i,function(e,t){r=r.child(t)()}),r},c.find$=function(e){return i(this.find,this)(e)},c.path=function(e){var t=this,r=a.value(e);if(r&&typeof r=="object"&&r.path&&r.params&&!(r instanceof s.Page)){var i=r.path,o=r.params;return t.path(i)+"?"+n.param(o)}var u;if(r==null||r==="")u=t;else{if(!(r instanceof s.Page)){if(r.substring(0,1)==="/")return s.page.getFullRoute()()+r.substring(1);var f=0;while(r.substring(0,3)==="../")f++,r=r.slice(3);var l=t.getFullRoute()(),c=l.slice(0,l.length-f).join("/"),h=(c===""?"":c+"/")+r;return s.useHTML5history?n("base").attr("href")+h:s.Href.hash+h}u=r}var p=u.getFullRoute()().join("/");return s.useHTML5history?n("base").attr("href")+p:s.Href.hash+p},c.path$=function(e){return i(this.path,this)(e)},c.async=function(e,t,n){var r=this;return function(){var i=e();i.done(function(){s.navigate(r.path(t))}),i.fail(function(){s.navigate(r.path(n))})}},c.showPage=function(e,t,n){var r=this,i=r.currentId,s=r.pageRoute?r.pageRoute.params:null,o=r.isVisible();r.currentId=t?t.name||"":"",r.getCurrentId(r.currentId),r.isVisible(!0),n&&r.originalRoute(n),r.route=e,r.pageRoute=t,o?(r.getId()==="?"&&i!==r.currentId&&r.show(),t&&s!==t.params&&r.setParams()):(r.setParams(),r.show()),r.childManager.showChild(e)},c.setParams=function(){if(this.pageRoute&&this.pageRoute.params){var e=this.pageRoute.params,t=this.ctx,i=this.val("params")||{};n.isArray(i)?n.each(i,function(n,i){var s=e[i];t[i]?t[i](s):t[i]=r.observable(s)}):n.each(i,function(n,i){var s=e[n],o;s==null?o=a.value(i):o=s,t[n]?t[n](o):t[n]=r.observable(o)})}if(this.pageRoute){var s=this.getValue().nameParam;s&&(typeof s=="string"?this.ctx[s]?this.ctx[s](this.currentId):this.ctx[s]=r.observable(this.currentId):s(this.currentId))}},c.hidePage=function(e){var t=this;"show"!==t.val("urlToggle")?(t.hideElementWrapper(e),t.childManager.hideChild()):e&&e()};var h=function(e){try{r.applyBindingsToDescendants(e.childBindingContext,e.element)}catch(t){var n=e.val("onBindingError");n&&n(e.e),s.onBindingError.fire({page:e,error:t})}};c.init=function(){var e=this,t=e.val("urlToggle"),i=e.val("id");i!=="?"&&e.getCurrentId(i);var s=r.utils.domData.get(e.element,"__ko_pagerjsBindingData");if(s)return{controlsDescendantBindings:!0};r.utils.domData.set(e.element,"__ko_pagerjsBindingData",e),r.utils.domNodeDisposal.addDisposeCallback(e.element,function(){e.parentPage&&e.parentPage.children.remove(e)});var o=e.getValue();t!=="none"&&(e.parentPage=e.getParentPage(),e.parentPage.children.push(this),e.hideElement()),e.val("source")&&e.loadSource(e.val("source")),e.ctx=null;if(o.withOnShow)e.ctx={},e.childBindingContext=e.bindingContext.createChildContext(e.ctx),r.utils.extend(e.childBindingContext,{$page:this});else{var u=o["with"]||e.bindingContext.$observableData||e.viewModel;e.ctx=a.value(u),e.augmentContext();if(r.isObservable(u)){var f=r.observable(e.ctx);e.childBindingContext=e.bindingContext.createChildContext(f),r.utils.extend(e.childBindingContext,{$page:this,$observableData:u}),h(e),u.subscribe(function(){f(a.value(u))})}else e.childBindingContext=e.bindingContext.createChildContext(e.ctx),r.utils.extend(e.childBindingContext,{$page:this,$observableData:undefined}),h(e)}if(t!=="none")e.parentPage.route&&e.parentPage.route[0]===e.getId()&&setTimeout(function(){e.parentPage.showPage(e.parentPage.route)},0);else{var l=function(){n(e.element).is(":visible")&&e.showPage([])};setTimeout(l,0),e.getParentPage().isVisible.subscribe(function(e){e&&setTimeout(l,0)})}return{controlsDescendantBindings:!0}},c.augmentContext=function(){var e=this,t=e.val("params");t&&(n.isArray(t)?n.each(t,function(t,n){e.ctx[n]||(e.ctx[n]=r.observable())}):n.each(t,function(n,i){e.ctx[n]||(r.isObservable(i)?e.ctx[n]=i:i===null?(t[n]=r.observable(null),e.ctx[n]=r.observable(null)):e.ctx[n]=r.observable(i))})),this.val("vars")&&n.each(this.val("vars"),function(t,n){r.isObservable(n)?e.ctx[t]=n:e.ctx[t]=r.observable(n)});var i=this.getValue().nameParam;i&&typeof i=="string"&&(e.ctx[i]=r.observable(null)),this.setParams()},c.getValue=function(){return this.valueAccessor?a.value(this.valueAccessor()):{}},c.getParentPage=function(){return s.getParentPage(this.bindingContext)},c.getId=function(){return this.val("id")},c.id=function(){var e=this.getCurrentId();return e==null||e===""?this.getId():e},c.sourceUrl=function(e){var t=this;return this.getId()==="?"?r.computed(function(){var n;return t.val("deep")?n=[t.currentId].concat(t.route).join("/"):n=t.currentId,a.value(e).replace("{1}",n)}):r.computed(function(){return a.value(e)})},c.loadWithOnShow=function(){var e=this;if(!e.withOnShowLoaded||e.val("sourceCache")!==!0)e.withOnShowLoaded=!0,e.val("withOnShow")(function(t){var n=e.bindingContext.createChildContext(t);e.ctx=t,e.childBindingContext=n,e.augmentContext(),r.utils.extend(n,{$page:e}),h(e)},e)},c.loadSource=function(e){var t=this.getValue(),i=this,o=this.element,u=null,f=t.loader||s.loader;if(t.frame==="iframe"){var l=n("iframe",n(o));l.length===0&&(l=n("<iframe></iframe>"),n(o).append(l)),f&&(u=a.value(f)(i,l),u.load()),l.one("load",function(){u&&u.unload(),t.sourceLoaded&&t.sourceLoaded(i)}),r.applyBindingsToNode(l[0],{attr:{src:this.sourceUrl(e)}})}else{f&&(u=a.value(f)(i,i.element),u.load());var c=function(){u&&u.unload(),i.val("withOnShow")?i.val("withOnShow")&&i.loadWithOnShow():h(i),t.sourceLoaded&&t.sourceLoaded(i),i.route&&i.childManager.showChild(i.route)};if(typeof a.value(e)=="string"){var p=a.value(this.sourceUrl(e));d(o,p,function(){c()},i)}else n.each(n(o).children(),function(e,t){r.utils.domNodeDisposal.removeNode(t)}),a.value(e)(this,function(){c()})}};var p=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,d=function(e,t,i,o){var u,a,f,l=n(e),c=t.indexOf(" ");c>=0&&(u=t.slice(c,t.length),t=t.slice(0,c));var h=jQuery.ajax({url:t,type:"GET",dataType:"html",complete:function(e,t){i&&l.each(i,f||[e.responseText,t,e])}}).done(function(e){f=arguments,n.each(l.children(),function(e,t){r.utils.domNodeDisposal.removeNode(t)}),l.html(u?jQuery("<div>").append(e.replace(p,"")).find(u):e)});return h.fail(function(){o.val("onSourceError")&&o.val("onSourceError")({url:t,page:o,xhrPromise:h}),s.onSourceError.fire({url:t,page:o,xhrPromise:h})}),l};c.show=function(t){var n=this.element,r=this;r.showElementWrapper(t),r.val("title")&&(e.document.title=r.val("title"));if(r.val("sourceOnShow")){if(!r.val("sourceCache")||!n.__pagerLoaded__||typeof r.val("sourceCache")=="number"&&n.__pagerLoaded__+r.val("sourceCache")*1e3<s.now())n.__pagerLoaded__=s.now(),r.loadSource(r.val("sourceOnShow"))}else r.val("withOnShow")&&r.loadWithOnShow()},c.showElementWrapper=function(e){this.val("beforeShow")&&this.val("beforeShow")(this),this.showElement(e),this.val("afterShow")&&this.val("afterShow")(this)},c.showElement=function(e){this.val("showElement")?this.val("showElement")(this,e):this.val("fx")?s.fx[this.val("fx")].showElement(this,e):s.showElement?s.showElement(this,e):n(this.element).show(e)},c.hideElementWrapper=function(e){this.isVisible(!1),this.val("beforeHide")&&this.val("beforeHide")(this),this.hideElement(e),this.val("afterHide")&&this.val("afterHide")(this)},c.hideElement=function(e){this.val("hideElement")?this.val("hideElement")(this,e):this.val("fx")?s.fx[this.val("fx")].hideElement(this,e):s.hideElement?s.hideElement(this,e):(n(this.element).hide(),e&&e())},c.getFullRoute=function(){return this._fullRoute?this._fullRoute:(this._fullRoute=r.computed(function(){var e=null;return this.currentParentPage&&this.currentParentPage()?(e=this.currentParentPage().getFullRoute()().slice(0),e.push(this.originalRoute()||this.getId()),e):this.parentPage?(e=this.parentPage.getFullRoute()().slice(0),e.push(this.originalRoute()||this.getId()),e):[]},this),this._fullRoute)},c.nullObject=new s.Page,c.nullObject.children=r.observableArray([]),c.child=function(e){var t=this;return t._child==null&&(t._child={}),t._child[e]||(t._child[e]=r.computed(function(){var t=n.grep(this.children(),function(t){return t.id()===e})[0];return t||this.nullObject},this)),t._child[e]},r.bindingHandlers.page={init:function(e,t,n,r,i){var o=new s.Page(e,t,n,r,i);return o.init()}},s.useHTML5history=!1,s.rootURI="/",s.Href=function(e,t,n,i,s){this.element=e,this.bindingContext=s,this.path=r.observable(),this.pageOrRelativePath=r.observable(t)};var v=s.Href.prototype;return v.getParentPage=function(){return s.getParentPage(this.bindingContext)},v.init=function(){var e=this,t=e.getParentPage();e.path=r.computed(function(){var n=a.value(e.pageOrRelativePath()()),r=t.path(n);return t.path(n)})},s.Href.hash="#",v.bind=function(){r.applyBindingsToNode(this.element,{attr:{href:this.path}})},v.update=function(e){this.pageOrRelativePath(e)},s.Href5=function(e,t,n,r,i){s.Href.apply(this,arguments)},s.Href5.prototype=new s.Href,s.Href5.history=e.history,s.Href5.prototype.bind=function(){var e=this;r.applyBindingsToNode(e.element,{attr:{href:e.path},click:function(){var t=e.path();if(t===""||t==="/")t=n("base").attr("href");s.Href5.history.pushState(null,null,t)}})},r.bindingHandlers["page-hash"]={init:function(e,t,n,r,i){var o=new s.Href(e,t,n,r,i);o.init(),o.bind(),e.__ko__page=o},update:function(e,t){e.__ko__page.update(t)}},r.bindingHandlers["page-href5"]={init:function(e,t,n,r,i){var o=new s.Href5(e,t,n,r,i);o.init(),o.bind(),e.__ko__page=o},update:function(e,t){e.__ko__page.update(t)}},r.bindingHandlers["page-href"]={init:function(e,t,n,r,i){var o=s.useHTML5history?s.Href5:s.Href,u=new o(e,t,n,r,i);u.init(),u.bind(),e.__ko__page=u},update:function(e,t){e.__ko__page.update(t)}},s.fx={},s.fx.cssAsync=function(e){return{showElement:function(t,r){var i=n(t.element);i.addClass(e),i.show();var s=setInterval(function(){clearInterval(s),i.addClass(e+"-in")},10),o=setInterval(function(){clearInterval(o),r&&r()},300)},hideElement:function(t,r){var i=n(t.element);if(!t.pageHiddenOnce)t.pageHiddenOnce=!0,i.hide();else{i.removeClass(e+"-in");var s=setInterval(function(){clearInterval(s),r&&r(),i.hide()},300)}}}},s.fx.zoom=s.fx.cssAsync("pagerjs-fx-zoom"),s.fx.flip=s.fx.cssAsync("pagerjs-fx-flip"),s.fx.popout=s.fx.cssAsync("pagerjs-fx-popout-modal"),s.fx.jQuerySync=function(e,t){return{showElement:function(t,r){e.call(n(t.element),300,r)},hideElement:function(e,r){t.call(n(e.element),300,function(){n(e.element).hide()}),r&&r()}}},s.fx.slide=s.fx.jQuerySync(n.fn.slideDown,n.fn.slideUp),s.fx.fade=s.fx.jQuerySync(n.fn.fadeIn,n.fn.fadeOut),s.startHistoryJs=function(r){r&&s.Href5.history.pushState(null,null,r),t.Adapter.bind(e,"statechange",function(){var e=n("base").attr("href"),r=t.getState().url.replace(e,"");o(r)}),t.Adapter.bind(e,"anchorchange",function(){o(location.hash)}),o(t.getState().url.replace(t.getRootUrl(),""))},s.startHashChange=function(t){t&&(e.location.hash=s.Href.hash+t),n(e).hashchange(function(){o(e.location.hash)}),n(e).hashchange()},s.start=function(t){t&&(e.location.hash=s.Href.hash+t);var r=function(){o(e.location.hash)};n(e).bind("hashchange",r),r()},s},r=e.define;typeof r=="function"&&typeof r.amd=="object"&&r.amd?r(["knockout","jquery"],function(e){return n($,e)}):e.pager=n($,ko)})(window);
+(function(e){var t=e.History,n=function(n,r){"use strict";var i=function(e,t){return function(){var n=arguments;return r.computed(function(){return e.apply(t,n)})}},s={};s.page=null,s.now=function(){return Date.now?Date.now():(new Date).valueOf()},s.extendWithPage=function(e){var t=new s.Page;e.$__page__=t,s.page=t},s.navigationFailed=r.observable(),s.onBindingError=n.Callbacks(),s.onSourceError=n.Callbacks(),s.showChild=function(e){var t=e&&e.length===1&&e[0]===""?[]:e;s.page.showPage(t)},s.getParentPage=function(e){while(e){if(e.$page&&e.$page.val("urlToggle")!=="none")return e.$page;if(e.$data&&e.$data.$__page__)return e.$data.$__page__;e=e.$parentContext}return null};var o=function(e){e.substring(0,s.Href.hash.length)===s.Href.hash&&(e=e.slice(s.Href.hash.length));var t=u(e);s.showChild(t)};s.navigate=function(e){s.useHTML5history?s.Href5.history.pushState(null,null,e):location.hash=e};var u=function(e){return n.map(e.replace(/\+/g," ").split("/"),decodeURIComponent)},a={};a.value=r.utils.unwrapObservable,a.arrayValue=function(e){return n.map(e,function(e){return a.value(e)})};var f=function(e){var t,n={},r=/([^&=]+)=?([^&]*)/g;while(t=r.exec(e))n[t[1]]=t[2];return n},l=function(e){if(!e)return{name:null,params:{}};var t=e.split("?"),n=t[0],r=t[1],i={};return r&&(i=f(r)),{name:n,params:i}};s.ChildManager=function(e,t){this.currentChildO=r.observable(null);var i=this;this.page=t,this.timeStamp=s.now(),this.hideChild=function(){i.currentChild&&i.currentChild.getId()!=="start"&&(i.currentChild.hidePage(function(){}),i.currentChild=null,i.currentChildO(null))},this.showChild=function(t){var r=t.length===0;this.timeStamp=s.now();var o=this.timeStamp,u=i.currentChild;i.currentChild=null;var f=!1,c=l(t[0]),h=c.name,p=null;n.each(e(),function(e,t){if(!f){var n=t.getId();if(n===h||(h===""||h==null)&&n==="start")f=!0,i.currentChild=t;n==="?"&&(p=t)}});var d=!1,v=i,m=function(e,t){if(!f){var n=t.getId(),r=t.getValue().modal;if(r){if(n===h||(h===""||h==null)&&n==="start")f=!0,i.currentChild=t,d=!0;n==="?"&&!p&&(p=t,d=!0)}}};while(!i.currentChild&&v.page.parentPage&&!v.page.getValue().modal){var g=v.page.parentPage.children;n.each(g(),m),i.currentChild||(v=v.page.parentPage.childManager)}!i.currentChild&&p&&!r&&(i.currentChild=p),i.currentChild&&(i.currentChildO(i.currentChild),d?i.currentChild.currentParentPage(i.page):i.currentChild.currentParentPage(null));var y=function(){s.navigationFailed&&s.navigationFailed({page:i.page,route:t}),i.page.getValue().navigationFailed&&a.value(i.page.getValue().navigationFailed)(i.page,t)},b=function(){var e=a.value(i.currentChild.getValue().guard);e?e(i.currentChild,t,function(){i.timeStamp===o&&i.currentChild.showPage(t.slice(1),c,t[0])},u):i.currentChild.showPage(t.slice(1),c,t[0])};u&&u===i.currentChild?b():u?u.hidePage(function(){i.currentChild?b():y()}):i.currentChild?b():y()}},s.Page=function(e,t,n,i,o){this.element=e,this.valueAccessor=t,this.allBindingsAccessor=n,this.viewModel=i,this.bindingContext=o,this.children=r.observableArray([]),this.childManager=new s.ChildManager(this.children,this),this.parentPage=null,this.currentId=null,this.getCurrentId=r.observable(),this.ctx=null,this.currentParentPage=r.observable(null),this.isVisible=r.observable(!1),this.originalRoute=r.observable(null),this.route=null};var c=s.Page.prototype;c.val=function(e){return a.value(this.getValue()[e])},c.currentChildPage=function(){return this.childManager.currentChildO},c.find=function(e){var t=a.value(e),r=this;if(t.substring(0,1)==="/")r=s.page,t=t.slice(1);else while(t.substring(0,3)==="../")r=r.currentParentPage&&r.currentParentPage()?r.currentParentPage():r.parentPage,t=t.slice(3);var i=u(t);return n.each(i,function(e,t){r=r.child(t)()}),r},c.find$=function(e){return i(this.find,this)(e)},c.path=function(e){var t=this,r=a.value(e);if(r&&typeof r=="object"&&r.path&&r.params&&!(r instanceof s.Page)){var i=r.path,o=r.params;return t.path(i)+"?"+n.param(o)}var u;if(r==null||r==="")u=t;else{if(!(r instanceof s.Page)){if(r.substring(0,1)==="/")return s.page.getFullRoute()()+r.substring(1);var f=0;while(r.substring(0,3)==="../")f++,r=r.slice(3);var l=t.getFullRoute()(),c=l.slice(0,l.length-f).join("/"),h=(c===""?"":c+"/")+r;return s.useHTML5history?n("base").attr("href")+h:s.Href.hash+h}u=r}var p=u.getFullRoute()().join("/");return s.useHTML5history?n("base").attr("href")+p:s.Href.hash+p},c.path$=function(e){return i(this.path,this)(e)},c.async=function(e,t,n){var r=this;return function(){var i=e();i.done(function(){s.navigate(r.path(t))}),i.fail(function(){s.navigate(r.path(n))})}},c.showPage=function(e,t,n){var r=this,i=r.currentId,s=r.pageRoute?r.pageRoute.params:null,o=r.isVisible();r.currentId=t?t.name||"":"",r.getCurrentId(r.currentId),r.isVisible(!0),n&&r.originalRoute(n),r.route=e,r.pageRoute=t,o?(r.getId()==="?"&&i!==r.currentId&&r.show(),t&&s!==t.params&&r.setParams()):(r.setParams(),r.show()),r.childManager.showChild(e)},c.setParams=function(){if(this.pageRoute&&this.pageRoute.params){var e=this.pageRoute.params,t=this.ctx,i=this.val("params")||{};n.isArray(i)?n.each(i,function(n,i){var s=e[i];t[i]?t[i](s):t[i]=r.observable(s)}):n.each(i,function(n,i){var s=e[n],o;s==null?o=a.value(i):o=s,t[n]?t[n](o):t[n]=r.observable(o)})}if(this.pageRoute){var s=this.getValue().nameParam;s&&(typeof s=="string"?this.ctx[s]?this.ctx[s](this.currentId):this.ctx[s]=r.observable(this.currentId):s(this.currentId))}},c.hidePage=function(e){var t=this;"show"!==t.val("urlToggle")?(t.hideElementWrapper(e),t.childManager.hideChild()):e&&e()};var h=function(e){try{r.applyBindingsToDescendants(e.childBindingContext,e.element)}catch(t){var n=e.val("onBindingError");n&&n(e.e),s.onBindingError.fire({page:e,error:t})}};c.init=function(){var e=this,t=e.val("urlToggle"),i=e.val("id");i!=="?"&&e.getCurrentId(i);var s=r.utils.domData.get(e.element,"__ko_pagerjsBindingData");if(s)return{controlsDescendantBindings:!0};r.utils.domData.set(e.element,"__ko_pagerjsBindingData",e),r.utils.domNodeDisposal.addDisposeCallback(e.element,function(){e.parentPage&&e.parentPage.children.remove(e)});var o=e.getValue();t!=="none"&&(e.parentPage=e.getParentPage(),e.parentPage.children.push(this),e.hideElement()),e.val("source")&&e.loadSource(e.val("source")),e.ctx=null;if(o.withOnShow)e.ctx={},e.childBindingContext=e.bindingContext.createChildContext(e.ctx),r.utils.extend(e.childBindingContext,{$page:this});else{var u=o["with"]||e.bindingContext.$observableData||e.viewModel;e.ctx=a.value(u),e.augmentContext();if(r.isObservable(u)){var f=r.observable(e.ctx);e.childBindingContext=e.bindingContext.createChildContext(f),r.utils.extend(e.childBindingContext,{$page:this,$observableData:u}),h(e),u.subscribe(function(){f(a.value(u))})}else e.childBindingContext=e.bindingContext.createChildContext(e.ctx),r.utils.extend(e.childBindingContext,{$page:this,$observableData:undefined}),h(e)}if(t!=="none")e.parentPage.route&&e.parentPage.route[0]===e.getId()&&setTimeout(function(){e.parentPage.showPage(e.parentPage.route)},0);else{var l=function(){n(e.element).is(":visible")&&e.showPage([])};setTimeout(l,0),e.getParentPage().isVisible.subscribe(function(e){e&&setTimeout(l,0)})}var c=e.getValue().bind;return r.isObservable(c)&&c(e),{controlsDescendantBindings:!0}},c.augmentContext=function(){var e=this,t=e.val("params");t&&(n.isArray(t)?n.each(t,function(t,n){e.ctx[n]||(e.ctx[n]=r.observable())}):n.each(t,function(n,i){e.ctx[n]||(r.isObservable(i)?e.ctx[n]=i:i===null?(t[n]=r.observable(null),e.ctx[n]=r.observable(null)):e.ctx[n]=r.observable(i))})),this.val("vars")&&n.each(this.val("vars"),function(t,n){r.isObservable(n)?e.ctx[t]=n:e.ctx[t]=r.observable(n)});var i=this.getValue().nameParam;i&&typeof i=="string"&&(e.ctx[i]=r.observable(null)),this.setParams()},c.getValue=function(){return this.valueAccessor?a.value(this.valueAccessor()):{}},c.getParentPage=function(){return s.getParentPage(this.bindingContext)},c.getId=function(){return this.val("id")},c.id=function(){var e=this.getCurrentId();return e==null||e===""?this.getId():e},c.sourceUrl=function(e){var t=this;return this.getId()==="?"?r.computed(function(){var n;return t.val("deep")?n=[t.currentId].concat(t.route).join("/"):n=t.currentId,a.value(e).replace("{1}",n)}):r.computed(function(){return a.value(e)})},c.loadWithOnShow=function(){var e=this;if(!e.withOnShowLoaded||e.val("sourceCache")!==!0)e.withOnShowLoaded=!0,e.val("withOnShow")(function(t){var n=e.bindingContext.createChildContext(t);e.ctx=t,e.childBindingContext=n,e.augmentContext(),r.utils.extend(n,{$page:e}),h(e)},e)},c.loadSource=function(e){var t=this.getValue(),i=this,o=this.element,u=null,f=t.loader||s.loader;if(t.frame==="iframe"){var l=n("iframe",n(o));l.length===0&&(l=n("<iframe></iframe>"),n(o).append(l)),f&&(u=a.value(f)(i,l),u.load()),l.one("load",function(){u&&u.unload(),t.sourceLoaded&&t.sourceLoaded(i)}),r.applyBindingsToNode(l[0],{attr:{src:this.sourceUrl(e)}})}else{f&&(u=a.value(f)(i,i.element),u.load());var c=function(){u&&u.unload(),i.val("withOnShow")?i.val("withOnShow")&&i.loadWithOnShow():h(i),t.sourceLoaded&&t.sourceLoaded(i),i.route&&i.childManager.showChild(i.route)};if(typeof a.value(e)=="string"){var p=a.value(this.sourceUrl(e));d(o,p,function(){c()},i)}else n.each(n(o).children(),function(e,t){r.utils.domNodeDisposal.removeNode(t)}),a.value(e)(this,function(){c()})}};var p=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,d=function(e,t,i,o){var u,a,f,l=n(e),c=t.indexOf(" ");c>=0&&(u=t.slice(c,t.length),t=t.slice(0,c));var h=jQuery.ajax({url:t,type:"GET",dataType:"html",complete:function(e,t){i&&l.each(i,f||[e.responseText,t,e])}}).done(function(e){f=arguments,n.each(l.children(),function(e,t){r.utils.domNodeDisposal.removeNode(t)}),l.html(u?jQuery("<div>").append(e.replace(p,"")).find(u):e)});return h.fail(function(){o.val("onSourceError")&&o.val("onSourceError")({url:t,page:o,xhrPromise:h}),s.onSourceError.fire({url:t,page:o,xhrPromise:h})}),l};c.show=function(t){var n=this.element,r=this;r.showElementWrapper(t),r.val("title")&&(e.document.title=r.val("title"));if(r.val("sourceOnShow")){if(!r.val("sourceCache")||!n.__pagerLoaded__||typeof r.val("sourceCache")=="number"&&n.__pagerLoaded__+r.val("sourceCache")*1e3<s.now())n.__pagerLoaded__=s.now(),r.loadSource(r.val("sourceOnShow"))}else r.val("withOnShow")&&r.loadWithOnShow()},c.showElementWrapper=function(e){this.val("beforeShow")&&this.val("beforeShow")(this),this.showElement(e),this.val("afterShow")&&this.val("afterShow")(this)},c.showElement=function(e){this.val("showElement")?this.val("showElement")(this,e):this.val("fx")?s.fx[this.val("fx")].showElement(this,e):s.showElement?s.showElement(this,e):n(this.element).show(e)},c.hideElementWrapper=function(e){this.isVisible(!1),this.val("beforeHide")&&this.val("beforeHide")(this),this.hideElement(e),this.val("afterHide")&&this.val("afterHide")(this)},c.hideElement=function(e){this.val("hideElement")?this.val("hideElement")(this,e):this.val("fx")?s.fx[this.val("fx")].hideElement(this,e):s.hideElement?s.hideElement(this,e):(n(this.element).hide(),e&&e())},c.getFullRoute=function(){return this._fullRoute?this._fullRoute:(this._fullRoute=r.computed(function(){var e=null;return this.currentParentPage&&this.currentParentPage()?(e=this.currentParentPage().getFullRoute()().slice(0),e.push(this.originalRoute()||this.getId()),e):this.parentPage?(e=this.parentPage.getFullRoute()().slice(0),e.push(this.originalRoute()||this.getId()),e):[]},this),this._fullRoute)},c.nullObject=new s.Page,c.nullObject.children=r.observableArray([]),c.child=function(e){var t=this;return t._child==null&&(t._child={}),t._child[e]||(t._child[e]=r.computed(function(){var t=n.grep(this.children(),function(t){return t.id()===e})[0];return t||this.nullObject},this)),t._child[e]},r.bindingHandlers.page={init:function(e,t,n,r,i){var o=new s.Page(e,t,n,r,i);return o.init()}},s.useHTML5history=!1,s.rootURI="/",s.Href=function(e,t,n,i,s){this.element=e,this.bindingContext=s,this.path=r.observable(),this.pageOrRelativePath=r.observable(t)};var v=s.Href.prototype;return v.getParentPage=function(){return s.getParentPage(this.bindingContext)},v.init=function(){var e=this,t=e.getParentPage();e.path=r.computed(function(){var n=a.value(e.pageOrRelativePath()()),r=t.path(n);return t.path(n)})},s.Href.hash="#",v.bind=function(){r.applyBindingsToNode(this.element,{attr:{href:this.path}})},v.update=function(e){this.pageOrRelativePath(e)},s.Href5=function(e,t,n,r,i){s.Href.apply(this,arguments)},s.Href5.prototype=new s.Href,s.Href5.history=e.history,s.Href5.prototype.bind=function(){var e=this;r.applyBindingsToNode(e.element,{attr:{href:e.path},click:function(){var t=e.path();if(t===""||t==="/")t=n("base").attr("href");s.Href5.history.pushState(null,null,t)}})},r.bindingHandlers["page-hash"]={init:function(e,t,n,r,i){var o=new s.Href(e,t,n,r,i);o.init(),o.bind(),e.__ko__page=o},update:function(e,t){e.__ko__page.update(t)}},r.bindingHandlers["page-href5"]={init:function(e,t,n,r,i){var o=new s.Href5(e,t,n,r,i);o.init(),o.bind(),e.__ko__page=o},update:function(e,t){e.__ko__page.update(t)}},r.bindingHandlers["page-href"]={init:function(e,t,n,r,i){var o=s.useHTML5history?s.Href5:s.Href,u=new o(e,t,n,r,i);u.init(),u.bind(),e.__ko__page=u},update:function(e,t){e.__ko__page.update(t)}},s.fx={},s.fx.cssAsync=function(e){return{showElement:function(t,r){var i=n(t.element);i.addClass(e),i.show();var s=setInterval(function(){clearInterval(s),i.addClass(e+"-in")},10),o=setInterval(function(){clearInterval(o),r&&r()},300)},hideElement:function(t,r){var i=n(t.element);if(!t.pageHiddenOnce)t.pageHiddenOnce=!0,i.hide();else{i.removeClass(e+"-in");var s=setInterval(function(){clearInterval(s),r&&r(),i.hide()},300)}}}},s.fx.zoom=s.fx.cssAsync("pagerjs-fx-zoom"),s.fx.flip=s.fx.cssAsync("pagerjs-fx-flip"),s.fx.popout=s.fx.cssAsync("pagerjs-fx-popout-modal"),s.fx.jQuerySync=function(e,t){return{showElement:function(t,r){e.call(n(t.element),300,r)},hideElement:function(e,r){t.call(n(e.element),300,function(){n(e.element).hide()}),r&&r()}}},s.fx.slide=s.fx.jQuerySync(n.fn.slideDown,n.fn.slideUp),s.fx.fade=s.fx.jQuerySync(n.fn.fadeIn,n.fn.fadeOut),s.startHistoryJs=function(r){r&&s.Href5.history.pushState(null,null,r),t.Adapter.bind(e,"statechange",function(){var e=n("base").attr("href"),r=t.getState().url.replace(e,"");o(r)}),t.Adapter.bind(e,"anchorchange",function(){o(location.hash)}),o(t.getState().url.replace(t.getRootUrl(),""))},s.startHashChange=function(t){t&&(e.location.hash=s.Href.hash+t),n(e).hashchange(function(){o(e.location.hash)}),n(e).hashchange()},s.start=function(t){t&&(e.location.hash=s.Href.hash+t);var r=function(){o(e.location.hash)};n(e).bind("hashchange",r),r()},s},r=e.define;typeof r=="function"&&typeof r.amd=="object"&&r.amd?r(["knockout","jquery"],function(e){return n($,e)}):e.pager=n($,ko)})(window);
Please sign in to comment.
Something went wrong with that request. Please try again.