Comparing version 1.1.11 to 1.1.12
@@ -602,5 +602,2 @@ !function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.bigfoot=e():"undefined"!=typeof global?global.bigfoot=e():"undefined"!=typeof self&&(self.bigfoot=e())}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
var updating = false | ||
, raf = window.requestAnimationFrame; | ||
var oldY, viewTop, windowHeight, stickyHeight, parentTop, parentBottom; | ||
@@ -625,16 +622,7 @@ | ||
function onScroll() { | ||
function update() { | ||
if (!enabled) | ||
return; | ||
viewTop = $wnd.scrollTop(); | ||
requestUpdate(); | ||
} | ||
function requestUpdate() { | ||
if (!updating) raf(update); | ||
updating = true; | ||
} | ||
function update() { | ||
var newY = oldY | ||
, viewTop = $wnd.scrollTop() | ||
, viewBottom = viewTop + windowHeight | ||
@@ -644,3 +632,2 @@ , boundTop = Math.max(viewTop + 16, parentTop) - parentTop | ||
, alwaysAtTop = stickyHeight < windowHeight && boundTop + stickyHeight < boundBottom; | ||
updating = false; | ||
if (boundTop > oldY && boundBottom < oldY + stickyHeight) | ||
@@ -669,3 +656,3 @@ return; | ||
$wnd.resizeStop(reinit); | ||
$wnd.scroll(onScroll); | ||
$wnd.scrollAnim(update); | ||
@@ -1013,2 +1000,25 @@ }); | ||
// Events on scroll per animation frame | ||
$.fn.scrollAnim = function(cb) { | ||
var updating = false | ||
, raf = window.requestAnimationFrame; | ||
if (typeof raf != 'function') | ||
return $(this).scroll(cb); | ||
function onScroll(ev) { | ||
if (!updating) | ||
raf(function() { | ||
updating = false; | ||
cb(ev); | ||
}); | ||
updating = true; | ||
} | ||
return $(this).bind('scroll', onScroll); | ||
}; | ||
},{}],17:[function(require,module,exports){ | ||
@@ -1015,0 +1025,0 @@ (function(f){var m=8;var k=function(q,t){var s=(q&65535)+(t&65535);var r=(q>>16)+(t>>16)+(s>>16);return(r<<16)|(s&65535)};var e=function(r,q){return(r>>>q)|(r<<(32-q))};var g=function(r,q){return(r>>>q)};var a=function(q,s,r){return((q&s)^((~q)&r))};var d=function(q,s,r){return((q&s)^(q&r)^(s&r))};var h=function(q){return(e(q,2)^e(q,13)^e(q,22))};var b=function(q){return(e(q,6)^e(q,11)^e(q,25))};var p=function(q){return(e(q,7)^e(q,18)^g(q,3))};var l=function(q){return(e(q,17)^e(q,19)^g(q,10))};var c=function(r,s){var E=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298);var t=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225);var q=new Array(64);var G,F,D,C,A,y,x,w,v,u;var B,z;r[s>>5]|=128<<(24-s%32);r[((s+64>>9)<<4)+15]=s;for(var v=0;v<r.length;v+=16){G=t[0];F=t[1];D=t[2];C=t[3];A=t[4];y=t[5];x=t[6];w=t[7];for(var u=0;u<64;u++){if(u<16){q[u]=r[u+v]}else{q[u]=k(k(k(l(q[u-2]),q[u-7]),p(q[u-15])),q[u-16])}B=k(k(k(k(w,b(A)),a(A,y,x)),E[u]),q[u]);z=k(h(G),d(G,F,D));w=x;x=y;y=A;A=k(C,B);C=D;D=F;F=G;G=k(B,z)}t[0]=k(G,t[0]);t[1]=k(F,t[1]);t[2]=k(D,t[2]);t[3]=k(C,t[3]);t[4]=k(A,t[4]);t[5]=k(y,t[5]);t[6]=k(x,t[6]);t[7]=k(w,t[7])}return t};var j=function(t){var s=Array();var q=(1<<m)-1;for(var r=0;r<t.length*m;r+=m){s[r>>5]|=(t.charCodeAt(r/m)&q)<<(24-r%32)}return s};var n=function(s){var r="0123456789abcdef";var t="";for(var q=0;q<s.length*4;q++){t+=r.charAt((s[q>>2]>>((3-q%4)*8+4))&15)+r.charAt((s[q>>2]>>((3-q%4)*8))&15)}return t};var o=function(s,v){var u=j(s);if(u.length>16){u=core_sha1(u,s.length*m)}var q=Array(16),t=Array(16);for(var r=0;r<16;r++){q[r]=u[r]^909522486;t[r]=u[r]^1549556828}var w=c(q.concat(j(v)),512+v.length*m);return c(t.concat(w),512+256)};var i=function(q){q=typeof q=="object"?f(q).val():q.toString();return q};f.extend({sha256:function(q){q=i(q);return n(c(j(q),q.length*m))},sha256hmac:function(q,r){q=i(q);r=i(r);return n(o(q,r))},sha256config:function(q){m=parseInt(q)||8}});f.fn.sha256=function(r){f.sha256config(r);var q=i(f(this).val());var s=f.sha256(q);f.sha256config(8);return s}})(jQuery); |
@@ -1,2 +0,2 @@ | ||
/*! Bigfoot v.1.1.10 */ | ||
!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define(a):"undefined"!=typeof window?window.bigfoot=a():"undefined"!=typeof global?global.bigfoot=a():"undefined"!=typeof self&&(self.bigfoot=a())}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};a[g][0].call(j.exports,function(b){var c=a[g][1][b];return e(c?c:b)},j,j.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(){$.bigfoot.msg["ajax.authRequired"]="You need to login to continue.",$.bigfoot.msg["ajax.accessDenied"]="You have insufficient permissions to access the resource.",$.bigfoot.msg["ajax.failed"]="Your request could not be processed. Please contact technical support.",$.bigfoot.msg["ajax.tooLarge"]="Your request exceeds the size limit.",$.bigfoot.ajax={processResponse:function(a,b){$.bigfoot.notices.clear(),$.bigfoot.notices.addAll(a),a.redirect&&!b&&($.bigfoot.notices.stash(),window.location.replace(a.redirect))},processErrors:function(a){switch(a.status){case 0:return!0;case 401:$.bigfoot.notices.warn($.bigfoot.msg["ajax.authRequired"]);break;case 403:$.bigfoot.notices.error($.bigfoot.msg["ajax.accessDenied"]);break;case 413:$.bigfoot.notices.error($.bigfoot.msg["ajax.tooLarge"]);break;default:$.bigfoot.notices.error($.bigfoot.msg["ajax.failed"])}return!1}}},{}],2:[function(){$.bigfoot={settings:{},msg:{},log:function(a){"undefined"!=typeof console&&"function"==typeof console.log&&console.log(a)},queue:[],init:function(a){this.queue.forEach(function(b){a.lookup(b.selector).each(b.fn)})},install:function(a,b){return this.queue.push({selector:a,fn:b}),this},installLast:this.install,installFirst:function(a,b){return this.queue.unshift({selector:a,fn:b}),this},installBefore:function(a,b,c){for(var d=0;d<this.queue.length&&this.queue[d].selector!=a;d++);return this.queue.splice(d,0,{selector:b,fn:c}),this},installAfter:function(a,b,c){for(var d=0;d<this.queue.length&&this.queue[d].selector!=a;d++);d==this.queue.length?this.installLast(b,c):this.queue.splice(d+1,0,{selector:b,fn:c})},replace:function(a,b){for(var c=0;c<this.queue.length&&this.queue[c].selector!=a;c++);c==this.queue.length?$.bigfoot.log("Replacing “"+a+"” failed. Try installing instead."):this.queue.splice(c,1,{selector:a,fn:b})}}},{}],3:[function(b){a(["jquery"],function(a){return b("./modules"),a.bigfoot})(jQuery)},{"./modules":4}],4:[function(a){a("../jquery-ext"),a("../jquery-sha256"),a("../bigfoot"),a("../notices"),a("../viewport"),a("../ajax"),a("../ibox"),a("../components/commons"),a("../components/forms"),a("../components/switch"),a("../components/toggler"),a("../components/scroll-load"),a("../components/checkbox-toggle"),a("../components/retina"),a("../components/load-into"),a("../components/lightform"),a("../components/sticky")},{"../ajax":1,"../bigfoot":2,"../components/checkbox-toggle":5,"../components/commons":6,"../components/forms":7,"../components/lightform":8,"../components/load-into":9,"../components/retina":10,"../components/scroll-load":11,"../components/sticky":12,"../components/switch":13,"../components/toggler":14,"../ibox":15,"../jquery-ext":16,"../jquery-sha256":17,"../notices":18,"../viewport":19}],5:[function(){$.bigfoot.install('input[type="checkbox"][data-toggle]',function(){function a(){"false"==localStorage.getItem(e)?c.removeAttr("checked"):"true"==localStorage.getItem(e)&&c.attr("checked","checked"),b(0)}function b(a){var b=c.is(":checked");localStorage.setItem(e,b);var f=$(d);b?f.fadeIn(a):f.fadeOut(a)}var c=$(this),d=c.attr("data-toggle"),e=c.attr("data-key")||"bigfoot.toggle("+d+")";a(),c.unbind(".bigfoot.toggle").bind("change.bigfoot.toggle",function(){b(300)})})},{}],6:[function(){$.bigfoot.placeholder=function(){return $('<div class="loading"/>')},$.bigfoot.install("[data-ref]",function(){var a=$(this).attr("data-ref"),b=$(this).attr("data-ref-class");b||(b="active"),$(a).addClass(b)}),$.bigfoot.install(".focus",function(){$(this).focus()}),$.bigfoot.install("[data-set-focus]",function(){$(this).unbind(".bigfoot.setFocus").bind("click.bigfoot.setFocus",function(){$($(this).attr("data-set-focus")).focus()})}),$.bigfoot.install('a[rel="popup"]',function(){$(this).unbind("click.bigfoot.popup").bind("click.bigfoot.popup",function(a){var b=$(this),c=b.attr("href");return c?($.bigfoot.ibox.load(c),a.preventDefault(),!1):void 0})}),$.bigfoot.install("[data-show]",function(){var a=$(this);a.unbind(".bigfoot.show").bind("click.bigfoot.show",function(){$(a.attr("data-show")).show(0,function(){$(a.attr("data-set-focus")).focus()})})}),$.bigfoot.install("[data-hide]",function(){$(this).unbind(".bigfoot.hide").bind("click.bigfoot.hide",function(){$($(this).attr("data-hide")).hide()})})},{}],7:[function(){"use strict";$.bigfoot.install("form",function(){var a=$(this);a.bind("submit.bigfoot.forms",function(b){return b.preventDefault(),a.hasClass("readonly")?!1:(this.submit(),!1)}),a[0].handlers=[],a[0].executeHandlers=function(b){for(var c in a[0].handlers){var d=a[0].handlers[c],e=d.call(a[0],{params:b});if(e===!1)return!1}return!0}}),$.bigfoot.install("form.partial",function(){var a=$(this),b=a.hasClass("stay"),c=a.attr("action"),d=a.attr("method").toUpperCase(),e="multipart/form-data"==a.attr("enctype");a[0].submit=function(){if(!a.hasClass("readonly")){var f=$.bigfoot.placeholder(),g=$(".submits",a),h=g.height();g.hide(),f.insertAfter(g),f.height(h);var i=new FormData(a[0]);if(e)$.bigfoot.log(d+" "+c+" [multipart data]");else{if(i=$(":input:not(.exclude)",a).serializeArray(),i.push({name:"__",value:(new Date).getTime().toString()}),!a[0].executeHandlers(i))return g.show(),f.remove(),void 0;$.bigfoot.log(d+" "+c+" "+JSON.stringify(i))}if("GET"==d){var j=c+"?"+$.param(i);$.bigfoot.viewport.navigate(j)}else{var k={data:i,dataType:"json",url:c,type:d,cache:!1,success:function(c){a.trigger("postSubmit",c),$.bigfoot.ajax.processResponse(c,b),c.redirect||(g.show(),f.remove(),$("input[type='password'], .cleanup",a).val(""))},error:function(a){g.show(),f.remove(),$.bigfoot.ajax.processErrors(a)}};e&&(k.processData=!1,k.contentType=!1),$.ajax(k)}}}}),$.bigfoot.install("form :input.submit",function(){var a=$(this);a.unbind(".bigfoot.submit").bind("change.bigfoot.submit",function(){var b=a.parents("form");b.submit()})}),$.bigfoot.install("form a.submit",function(){var a=$(this);a.unbind(".bigfoot.submit").bind("click.bigfoot.submit",function(b){return a.parents("form").submit(),b.preventDefault(),!1})}),$.bigfoot.install("form[data-load-into]",function(){var a=$(this),b=$(a.attr("data-load-into")),c=a.attr("method"),d=a.attr("action");a[0].submit=function(){var e=$.bigfoot.placeholder(),f=$(".submits",a);f.hide(),b.empty().append(e);var g=$(":input:not(.exclude)",a).serializeArray();return g.push({name:"__",value:(new Date).getTime().toString()}),a[0].executeHandlers(g)?($.bigfoot.log(c+" "+d+" "+JSON.stringify(g)),$.ajax({data:g,dataType:"html",url:d,type:c,success:function(c){a.trigger("postSubmit",c),e.remove(),b.append(c),$.bigfoot.init(b)},error:function(a){e.remove(),f.show(),$.bigfoot.ajax.processErrors(a)}}),void 0):(f.show(),e.remove(),void 0)}}),$.bigfoot.msg["form.unload.warn"]="Warning! If you leave this page, all unsaved changes will be lost.",$.bigfoot.msg["viewportUnload.warn"]="Warning! If you continue, all unsaved changed will be lost. Are you sure you want to continue?",$.bigfoot.install("form.unload-warn",function(){function a(){var a=$(":input:not(.exclude)",b).serialize();b.data("initial-state",a)}var b=$(this);a(),b.bind("submit.bigfoot.unload-warn",a),$(window).unbind("beforeunload.bigfoot").bind("beforeunload.bigfoot.unload-warn",function(){var a=$("form.unload-warn").filter(function(){var a=$(this),b=$(":input:not(.exclude)",a).serialize(),c=a.data("initial-state");return b!=c&&a.is(":visible")});return a.size()>0?$.bigfoot.msg["form.unload.warn"]:void 0}),$(window).unbind("viewportUnload.bigfoot").bind("viewportUnload.bigfoot.unload-warn",function(a){var b=$("form.unload-warn").filter(function(){var a=$(this),b=$(":input:not(.exclude)",a).serialize(),c=a.data("initial-state");return b!=c});b.size()>0&&(confirm($.bigfoot.msg["viewportUnload.warn"])||a.preventDefault())})})},{}],8:[function(){$.bigfoot.install("[data-method][data-action]",function(){var a=$(this),b=a.attr("data-method").toUpperCase(),c=a.attr("data-action");a.click(function(d){return d.preventDefault(),$.bigfoot.viewport.showStandBy(),$.ajax({dataType:"json",url:c,data:{__:(new Date).getTime().toString()},type:b,success:function(b){a.trigger("postSubmit",b),$.bigfoot.ajax.processResponse(b),b.redirect||$.bigfoot.viewport.hideStandBy()},error:function(a){$.bigfoot.ajax.processErrors(a),$.bigfoot.viewport.hideStandBy()}}),!1})})},{}],9:[function(){$.bigfoot.install("a[data-load-into]",function(){var a=$(this),b=a.attr("href"),c=$(a.attr("data-load-into"));if(c.size()>0&&b){var d=a.attr("data-class"),e=a.attr("data-style");a.click(function(a){a.preventDefault();var f=$.bigfoot.placeholder(),g=$(window).scrollTop();return c.empty().append(f),$.ajax({dataType:"html",url:b,data:{__:(new Date).getTime().toString()},type:"get",success:function(a){var c=$("<div/>");c.attr("data-loaded",b),c.attr("class",d),c.attr("style",e),c.append(a),f.replaceWith(c).remove(),$(window).scrollTop(g),$.bigfoot.init(c)},error:function(){f.remove()}}),!1})}})},{}],10:[function(){$.bigfoot.isRetina=function(){var a="(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)";return window.devicePixelRatio>1?!0:window.matchMedia&&window.matchMedia(a).matches},$.bigfoot.install("img.retina",function(){function a(){var a=b.width(),c=b.height();b.attr("src",b.attr("src").replace(/\.([^.]+)$/,"@2X.$1")),b.attr("width",a),b.attr("height",c)}var b=$(this);$.bigfoot.isRetina()&&(b[0].complete?a():b.one("load.bigfoot.retina",a))})},{}],11:[function(){$.bigfoot.install("[data-load]",function(){function a(){clearTimeout(c),c=setTimeout(function(){var a=e.scrollTop()+e.height();d.offset().top<a&&b()},200)}function b(){e.unbind(g);var a=d[0].tagName.toLowerCase(),b="<"+a+"></"+a+">",c=$.bigfoot.placeholder(),h=d.attr("class"),i=d.attr("style");d.replaceWith(c).remove(),$.ajax({dataType:"html",url:f,data:{__:(new Date).getTime().toString()},type:"get",success:function(a){$.bigfoot.log("Loaded "+f);var d=$(b);d.attr("data-loaded",f),d.attr("class",h),d.attr("style",i),d.append(a),c.replaceWith(d).remove(),$.bigfoot.init(d)},error:function(){$.bigfoot.log("Failed to load "+f),c.remove()}})}var c,d=$(this),e=$(window),f=d.attr("data-load"),g="scroll.bigfoot.scrollLoad-"+$.sha256(f);e.unbind(g).bind(g,a),$(a)})},{}],12:[function(){$.bigfoot.install("[data-sticky]",function(){function a(){var a=l.css("float"),b="left"==a||"right"==a;o!=b&&l.removeAttr("style"),o=b,e=0,f=n.scrollTop(),g=n.height(),h=l.height(),i=m.offset().top,j=i+m.height(),d()}function b(){o&&(f=n.scrollTop(),c())}function c(){p||q(d),p=!0}function d(){var a=e,b=f+g,c=Math.max(f+16,i)-i,d=Math.min(b-16,j)-i,m=g>h&&d>c+h;p=!1,c>e&&e+h>d||(e>c||m?a=c:d>e+h&&(a=d-h),a!=e&&(e=a,k.style.webkitTransform=k.style.MozTransform=k.style.msTransform=k.style.OTransform=k.style.transform="translateY("+e+"px)"),0==a?l.addClass("atTop"):l.removeClass("atTop"))}var e,f,g,h,i,j,k=this,l=$(this),m=$(this.parentNode),n=$(window),o=!0,p=!1,q=window.requestAnimationFrame;a(),n.resizeStop(a),n.scroll(b)})},{}],13:[function(){$.bigfoot.switcher={hideAll:function(a){$(".switch-target").filter(function(){return this!=a}).hide(),$("[data-switch]").each(function(){var a=$(this),b=a.attr("data-switch-class");b||(b="active"),a.removeClass(b)})}},$(function(){$("html").bind("click.bigfoot.switcher",function(){$.bigfoot.switcher.hideAll()})}),$.bigfoot.install("[data-switch]",function(){function a(){f.is(":visible")?d.addClass(e):d.removeClass(e)}function b(){f.toggle(0,a)}function c(){f.hide(0,a)}var d=$(this),e=d.attr("data-switch-class");e||(e="active");var f=$(d.attr("data-switch"));f.addClass("switch-target"),d.hasClass("switch-stay")&&f.click(function(a){a.stopPropagation()}),a(),d.unbind(".bigfoot.switch").bind("click.bigfoot.switch",function(a){return a.preventDefault(),$.bigfoot.switcher.hideAll(f[0]),b(),!1}),$(d).find(".close").unbind(".bigfoot.switch").bind("click.bigfoot.switch",function(a){return a.preventDefault(),c(),!1})})},{}],14:[function(){$.bigfoot.install(".toggler",function(){function a(){d.each(function(){var a=$(this),b=$(a.attr("data-for"));b.is(":visible")?a.addClass(e):a.removeClass(e)})}function b(){d.each(function(){$($(this).attr("data-for")).hide()})}var c=$(this),d=$("*[data-for]",c),e=c.attr("data-toggler-class");e||(e="active"),d.unbind(".bigfoot.toggler").bind("click.bigfoot.toggler",function(c){c.preventDefault();var d=$(this);return b(),$(d.attr("data-for")).show(),a(),!1});var f=d.filter("."+e);0==f.size()?a():(b(),$(f.attr("data-for")).show())})},{}],15:[function(){"use strict";$.bigfoot.msg.Close="Close",$.bigfoot.ibox={get:function(){return this.init(),$("#ibox")},init:function(){var a=this,b=$("#ibox");b.size()>0||(b=$('<div id="ibox"></div>'),b.hide(),$("body").prepend(b),$(window).unbind(".ibox").bind("keydown.ibox",function(b){27==b.keyCode&&a.close()}),b.bind("click.ibox",function(){a.close()}))},close:function(){var a=$("#ibox");$("iframe",a).remove(),a.fadeOut(300,function(){$(this).remove()})},isVisible:function(){return $("#ibox").is(":visible")},show:function(a){var b=this,c=$(a),d=$.Event("viewportUnload");if($(window).trigger(d),!d.isDefaultPrevented()){var e=this.get().empty(),f=$('<div id="ibox-wrapper"></div>');f.append(c),e.append(f);var g=$('<div id="ibox-close"></div>');g.attr("title",$.bigfoot.msg.Close),f.append(g),e.fadeIn(300,function(){$("body").animate({scrollTop:e.offset().top},300),e.trigger("ibox_load"),$.bigfoot.init(f),f.unbind(".ibox").bind("click.ibox",function(a){a.stopPropagation()}),$("a.close",c).add(g).bind("click.ibox",function(a){return b.close(),a.preventDefault(),!1})})}},load:function(a){var b=this;$.ajax({url:a,dataType:"html",type:"GET",data:{__:(new Date).getTime().toString()},success:function(a){b.show(a)},error:$.bigfoot.ajax.processErrors})}}},{}],16:[function(){$.fn.lookup=function(a){if(!a)return this;var b=this.find(a);return this.is(a)?b.add(this):b},$.fn.insertAt=function(a,b){var c=this.children().size();return 0>a&&(a=Math.max(0,c+1+a)),this.append(b),c>a&&this.children().eq(a).before(this.children().last()),this},$.fn.insertAtCaret=function(a){return this.each(function(){if(document.selection){this.focus();var b=document.selection.createRange();b.text=a,this.focus()}else if("undefined"!=typeof this.selectionStart){var c=this.selectionStart,d=this.selectionEnd,e=this.scrollTop;this.value=this.value.substring(0,c)+a+this.value.substring(d,this.value.length),this.focus(),this.selectionStart=c+a.length,this.selectionEnd=c+a.length,this.scrollTop=e}else this.value+=a,this.focus()})},$.fn.scrollTo=function(){var a=-1;this.each(function(){a=$(this).offset().top}),a>=0&&$("html, body").animate({scrollTop:a},300)},$.fn.shuffle=function(){function a(a){return Math.floor(Math.random()*a)}var b=this.get(),c=$.map(b,function(){var c=a(b.length),d=$(b[c]).clone(!0)[0];return b.splice(c,1),d});return this.each(function(a){$(this).replaceWith($(c[a]))}),$(c)},$.fn.scrollStop=function(a){var b;$(this).bind("scroll.scrollStop",function(c){var d=this;clearTimeout(b),b=setTimeout(function(){a.call(d,c)},100)})},$.fn.resizeStop=function(a){var b;$(this).bind("resize.resizeStop",function(c){var d=this;clearTimeout(b),b=setTimeout(function(){a.call(d,c)},100)})}},{}],17:[function(){!function(a){var b=8,c=function(a,b){var c=(65535&a)+(65535&b),d=(a>>16)+(b>>16)+(c>>16);return d<<16|65535&c},d=function(a,b){return a>>>b|a<<32-b},e=function(a,b){return a>>>b},f=function(a,b,c){return a&b^~a&c},g=function(a,b,c){return a&b^a&c^b&c},h=function(a){return d(a,2)^d(a,13)^d(a,22)},i=function(a){return d(a,6)^d(a,11)^d(a,25)},j=function(a){return d(a,7)^d(a,18)^e(a,3)},k=function(a){return d(a,17)^d(a,19)^e(a,10)},l=function(a,b){var d,e,l,m,n,o,p,q,r,s,t,u,v=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),w=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),x=new Array(64);a[b>>5]|=128<<24-b%32,a[(b+64>>9<<4)+15]=b;for(var r=0;r<a.length;r+=16){d=w[0],e=w[1],l=w[2],m=w[3],n=w[4],o=w[5],p=w[6],q=w[7];for(var s=0;64>s;s++)x[s]=16>s?a[s+r]:c(c(c(k(x[s-2]),x[s-7]),j(x[s-15])),x[s-16]),t=c(c(c(c(q,i(n)),f(n,o,p)),v[s]),x[s]),u=c(h(d),g(d,e,l)),q=p,p=o,o=n,n=c(m,t),m=l,l=e,e=d,d=c(t,u);w[0]=c(d,w[0]),w[1]=c(e,w[1]),w[2]=c(l,w[2]),w[3]=c(m,w[3]),w[4]=c(n,w[4]),w[5]=c(o,w[5]),w[6]=c(p,w[6]),w[7]=c(q,w[7])}return w},m=function(a){for(var c=Array(),d=(1<<b)-1,e=0;e<a.length*b;e+=b)c[e>>5]|=(a.charCodeAt(e/b)&d)<<24-e%32;return c},n=function(a){for(var b="0123456789abcdef",c="",d=0;d<4*a.length;d++)c+=b.charAt(a[d>>2]>>8*(3-d%4)+4&15)+b.charAt(a[d>>2]>>8*(3-d%4)&15);return c},o=function(a,c){var d=m(a);d.length>16&&(d=core_sha1(d,a.length*b));for(var e=Array(16),f=Array(16),g=0;16>g;g++)e[g]=909522486^d[g],f[g]=1549556828^d[g];var h=l(e.concat(m(c)),512+c.length*b);return l(f.concat(h),768)},p=function(b){return b="object"==typeof b?a(b).val():b.toString()};a.extend({sha256:function(a){return a=p(a),n(l(m(a),a.length*b))},sha256hmac:function(a,b){return a=p(a),b=p(b),n(o(a,b))},sha256config:function(a){b=parseInt(a)||8}}),a.fn.sha256=function(b){a.sha256config(b);var c=p(a(this).val()),d=a.sha256(c);return a.sha256config(8),d}}(jQuery)},{}],18:[function(){$.bigfoot.notices={timeout:function(){var a=$.bigfoot.settings.notices||{};return a.timeout||1e4},container:function(){return $("#notices")},hasErrors:function(){return $(".notice.error:not(:animated)",this.container()).size()>0},stash:function(){if(window.sessionStorage){var a=this.container();$(".notice:animated",a).remove(),window.sessionStorage.setItem("bigfoot.notices",a.html()),a.empty()}return this},unstash:function(){var a=this;if(window.sessionStorage){var b=window.sessionStorage.getItem("bigfoot.notices");b&&(a.container().append(b),window.sessionStorage.removeItem("bigfoot.notices"),$(".notice",a.container()).each(function(){a.initElem(this)}))}return this},initElem:function(a){var b=this,c=$(a);$(".hide",c).remove();var d=$("<span class='hide'/>");d.bind("click.bigfoot.notices",function(){b.dispose(c)}),c.prepend(d),setTimeout(function(){b.dispose(c)},this.timeout())},mkElem:function(a){var b=a.kind,c=a.msg.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"),d=$('<div class="notice '+b+'">'+c+"</div>");return this.initElem(d),d},add:function(a){return this.container().append(this.mkElem(a)),this},error:function(a){return this.add({kind:"error",msg:a})},warn:function(a){return this.add({kind:"warn",msg:a})},info:function(a){return this.add({kind:"info",msg:a})},addAll:function(a){if(a&&a.notices)for(var b in a.notices)this.add(a.notices[b]);return this},clear:function(){return this.dispose($(".notice",this.container()))},dispose:function(a){return a.fadeOut("fast",function(){$(this).remove()}),this}},window.addEventListener("keydown",function(a){27==a.keyCode&&$.bigfoot.notices.clear()}),$(function(){$.bigfoot.notices.unstash()})},{}],19:[function(){"use strict";$.bigfoot.msg.standby="Please wait...";var a="function"==typeof history.pushState;a&&$(function(){window.addEventListener("popstate",function(a){if(a.state){var b=a.state.id;b&&b==$.bigfoot.viewport.id()?$.bigfoot.viewport.load(location.href):location.reload(!0)}},!1)}),$.bigfoot.viewport={id:function(){var a=this.container(),b=a.attr("data-viewport-id");if(b)return b;var c=Math.random().toString();return a.attr("data-viewport-id",c),c},container:function(){return $("#viewport")},timeout:function(){var a=$.bigfoot.settings.viewport||{};return a.timeout||500},showStandBy:function(){var a=$("#viewport-standby");0==a.size()&&(a=$('<div id="viewport-standby"></div>'),a.hide(),a.append('<div class="message">'+$.bigfoot.msg.standby+"</div>")),$("body").append(a),this._standByTimer=setTimeout(function(){a.fadeIn(300)},this.timeout())},hideStandBy:function(){clearTimeout(this._standByTimer),$("#viewport-standby").remove()},load:function(a){var b=this,c=$.Event("viewportUnload");$(window).trigger(c),c.isDefaultPrevented()||(b.showStandBy(),$.ajax({url:a,headers:{"X-Render-Mode":"partial-viewport"},dataType:"html",data:{__:(new Date).getTime().toString()},type:"GET",success:function(a){var c=b.id(),d=$(a);"viewport"!=d.attr("id")&&(d=$('<div id="viewport"/>').append(d)),d.attr("data-viewport-id",c),b.hideStandBy(),b.container().replaceWith(d).remove(),$("a[rel='partial']").removeClass("active"),$.bigfoot.init(d);var e=$("title",d);e.size()>0&&($("head title").text(e.text()),e.remove()),$("body").trigger("viewportLoad"),b.scrollToAnchor()},error:function(a){$.bigfoot.ajax.processErrors(a),b.hideStandBy()}}))},navigate:function(b,c){if(a){var d=$.bigfoot.viewport.id();window.history.replaceState({id:d},"",location.href),c?window.history.replaceState({id:d},"",b):window.history.pushState({id:d},"",b),this.load(b)}else $.bigfoot.notices.stash(),c?window.location.replace(b):window.location.href=b},scrollToAnchor:function(){var a=location.href.replace(/.*?(?=#|$)/,""),b=$(a);0==b.size()&&(b=$(".viewport-anchor").first()),b.scrollTo()}},a&&$.bigfoot.install("a[rel='partial']",function(){var a=$(this);"popup"!=a.attr("rel")&&"_blank"!=a.attr("target")&&(a.addClass("partial-link"),a.unbind(".bigfoot.partial-link").bind("click.bigfoot.partial-link",function(a){if(0!=a.button||a.metaKey||a.ctrlKey)return!0;a.preventDefault();var b=$(this).attr("href");return $.bigfoot.viewport.navigate(b),!1}))})},{}]},{},[3])(3)}); | ||
/*! Bigfoot v.1.1.11 */ | ||
!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define(a):"undefined"!=typeof window?window.bigfoot=a():"undefined"!=typeof global?global.bigfoot=a():"undefined"!=typeof self&&(self.bigfoot=a())}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};a[g][0].call(j.exports,function(b){var c=a[g][1][b];return e(c?c:b)},j,j.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(){$.bigfoot.msg["ajax.authRequired"]="You need to login to continue.",$.bigfoot.msg["ajax.accessDenied"]="You have insufficient permissions to access the resource.",$.bigfoot.msg["ajax.failed"]="Your request could not be processed. Please contact technical support.",$.bigfoot.msg["ajax.tooLarge"]="Your request exceeds the size limit.",$.bigfoot.ajax={processResponse:function(a,b){$.bigfoot.notices.clear(),$.bigfoot.notices.addAll(a),a.redirect&&!b&&($.bigfoot.notices.stash(),window.location.replace(a.redirect))},processErrors:function(a){switch(a.status){case 0:return!0;case 401:$.bigfoot.notices.warn($.bigfoot.msg["ajax.authRequired"]);break;case 403:$.bigfoot.notices.error($.bigfoot.msg["ajax.accessDenied"]);break;case 413:$.bigfoot.notices.error($.bigfoot.msg["ajax.tooLarge"]);break;default:$.bigfoot.notices.error($.bigfoot.msg["ajax.failed"])}return!1}}},{}],2:[function(){$.bigfoot={settings:{},msg:{},log:function(a){"undefined"!=typeof console&&"function"==typeof console.log&&console.log(a)},queue:[],init:function(a){this.queue.forEach(function(b){a.lookup(b.selector).each(b.fn)})},install:function(a,b){return this.queue.push({selector:a,fn:b}),this},installLast:this.install,installFirst:function(a,b){return this.queue.unshift({selector:a,fn:b}),this},installBefore:function(a,b,c){for(var d=0;d<this.queue.length&&this.queue[d].selector!=a;d++);return this.queue.splice(d,0,{selector:b,fn:c}),this},installAfter:function(a,b,c){for(var d=0;d<this.queue.length&&this.queue[d].selector!=a;d++);d==this.queue.length?this.installLast(b,c):this.queue.splice(d+1,0,{selector:b,fn:c})},replace:function(a,b){for(var c=0;c<this.queue.length&&this.queue[c].selector!=a;c++);c==this.queue.length?$.bigfoot.log("Replacing “"+a+"” failed. Try installing instead."):this.queue.splice(c,1,{selector:a,fn:b})}}},{}],3:[function(b){a(["jquery"],function(a){return b("./modules"),a.bigfoot})(jQuery)},{"./modules":4}],4:[function(a){a("../jquery-ext"),a("../jquery-sha256"),a("../bigfoot"),a("../notices"),a("../viewport"),a("../ajax"),a("../ibox"),a("../components/commons"),a("../components/forms"),a("../components/switch"),a("../components/toggler"),a("../components/scroll-load"),a("../components/checkbox-toggle"),a("../components/retina"),a("../components/load-into"),a("../components/lightform"),a("../components/sticky")},{"../ajax":1,"../bigfoot":2,"../components/checkbox-toggle":5,"../components/commons":6,"../components/forms":7,"../components/lightform":8,"../components/load-into":9,"../components/retina":10,"../components/scroll-load":11,"../components/sticky":12,"../components/switch":13,"../components/toggler":14,"../ibox":15,"../jquery-ext":16,"../jquery-sha256":17,"../notices":18,"../viewport":19}],5:[function(){$.bigfoot.install('input[type="checkbox"][data-toggle]',function(){function a(){"false"==localStorage.getItem(e)?c.removeAttr("checked"):"true"==localStorage.getItem(e)&&c.attr("checked","checked"),b(0)}function b(a){var b=c.is(":checked");localStorage.setItem(e,b);var f=$(d);b?f.fadeIn(a):f.fadeOut(a)}var c=$(this),d=c.attr("data-toggle"),e=c.attr("data-key")||"bigfoot.toggle("+d+")";a(),c.unbind(".bigfoot.toggle").bind("change.bigfoot.toggle",function(){b(300)})})},{}],6:[function(){$.bigfoot.placeholder=function(){return $('<div class="loading"/>')},$.bigfoot.install("[data-ref]",function(){var a=$(this).attr("data-ref"),b=$(this).attr("data-ref-class");b||(b="active"),$(a).addClass(b)}),$.bigfoot.install(".focus",function(){$(this).focus()}),$.bigfoot.install("[data-set-focus]",function(){$(this).unbind(".bigfoot.setFocus").bind("click.bigfoot.setFocus",function(){$($(this).attr("data-set-focus")).focus()})}),$.bigfoot.install('a[rel="popup"]',function(){$(this).unbind("click.bigfoot.popup").bind("click.bigfoot.popup",function(a){var b=$(this),c=b.attr("href");return c?($.bigfoot.ibox.load(c),a.preventDefault(),!1):void 0})}),$.bigfoot.install("[data-show]",function(){var a=$(this);a.unbind(".bigfoot.show").bind("click.bigfoot.show",function(){$(a.attr("data-show")).show(0,function(){$(a.attr("data-set-focus")).focus()})})}),$.bigfoot.install("[data-hide]",function(){$(this).unbind(".bigfoot.hide").bind("click.bigfoot.hide",function(){$($(this).attr("data-hide")).hide()})})},{}],7:[function(){"use strict";$.bigfoot.install("form",function(){var a=$(this);a.bind("submit.bigfoot.forms",function(b){return b.preventDefault(),a.hasClass("readonly")?!1:(this.submit(),!1)}),a[0].handlers=[],a[0].executeHandlers=function(b){for(var c in a[0].handlers){var d=a[0].handlers[c],e=d.call(a[0],{params:b});if(e===!1)return!1}return!0}}),$.bigfoot.install("form.partial",function(){var a=$(this),b=a.hasClass("stay"),c=a.attr("action"),d=a.attr("method").toUpperCase(),e="multipart/form-data"==a.attr("enctype");a[0].submit=function(){if(!a.hasClass("readonly")){var f=$.bigfoot.placeholder(),g=$(".submits",a),h=g.height();g.hide(),f.insertAfter(g),f.height(h);var i=new FormData(a[0]);if(e)$.bigfoot.log(d+" "+c+" [multipart data]");else{if(i=$(":input:not(.exclude)",a).serializeArray(),i.push({name:"__",value:(new Date).getTime().toString()}),!a[0].executeHandlers(i))return g.show(),f.remove(),void 0;$.bigfoot.log(d+" "+c+" "+JSON.stringify(i))}if("GET"==d){var j=c+"?"+$.param(i);$.bigfoot.viewport.navigate(j)}else{var k={data:i,dataType:"json",url:c,type:d,cache:!1,success:function(c){a.trigger("postSubmit",c),$.bigfoot.ajax.processResponse(c,b),c.redirect||(g.show(),f.remove(),$("input[type='password'], .cleanup",a).val(""))},error:function(a){g.show(),f.remove(),$.bigfoot.ajax.processErrors(a)}};e&&(k.processData=!1,k.contentType=!1),$.ajax(k)}}}}),$.bigfoot.install("form :input.submit",function(){var a=$(this);a.unbind(".bigfoot.submit").bind("change.bigfoot.submit",function(){var b=a.parents("form");b.submit()})}),$.bigfoot.install("form a.submit",function(){var a=$(this);a.unbind(".bigfoot.submit").bind("click.bigfoot.submit",function(b){return a.parents("form").submit(),b.preventDefault(),!1})}),$.bigfoot.install("form[data-load-into]",function(){var a=$(this),b=$(a.attr("data-load-into")),c=a.attr("method"),d=a.attr("action");a[0].submit=function(){var e=$.bigfoot.placeholder(),f=$(".submits",a);f.hide(),b.empty().append(e);var g=$(":input:not(.exclude)",a).serializeArray();return g.push({name:"__",value:(new Date).getTime().toString()}),a[0].executeHandlers(g)?($.bigfoot.log(c+" "+d+" "+JSON.stringify(g)),$.ajax({data:g,dataType:"html",url:d,type:c,success:function(c){a.trigger("postSubmit",c),e.remove(),b.append(c),$.bigfoot.init(b)},error:function(a){e.remove(),f.show(),$.bigfoot.ajax.processErrors(a)}}),void 0):(f.show(),e.remove(),void 0)}}),$.bigfoot.msg["form.unload.warn"]="Warning! If you leave this page, all unsaved changes will be lost.",$.bigfoot.msg["viewportUnload.warn"]="Warning! If you continue, all unsaved changed will be lost. Are you sure you want to continue?",$.bigfoot.install("form.unload-warn",function(){function a(){var a=$(":input:not(.exclude)",b).serialize();b.data("initial-state",a)}var b=$(this);a(),b.bind("submit.bigfoot.unload-warn",a),$(window).unbind("beforeunload.bigfoot").bind("beforeunload.bigfoot.unload-warn",function(){var a=$("form.unload-warn").filter(function(){var a=$(this),b=$(":input:not(.exclude)",a).serialize(),c=a.data("initial-state");return b!=c&&a.is(":visible")});return a.size()>0?$.bigfoot.msg["form.unload.warn"]:void 0}),$(window).unbind("viewportUnload.bigfoot").bind("viewportUnload.bigfoot.unload-warn",function(a){var b=$("form.unload-warn").filter(function(){var a=$(this),b=$(":input:not(.exclude)",a).serialize(),c=a.data("initial-state");return b!=c});b.size()>0&&(confirm($.bigfoot.msg["viewportUnload.warn"])||a.preventDefault())})})},{}],8:[function(){$.bigfoot.install("[data-method][data-action]",function(){var a=$(this),b=a.attr("data-method").toUpperCase(),c=a.attr("data-action");a.click(function(d){return d.preventDefault(),$.bigfoot.viewport.showStandBy(),$.ajax({dataType:"json",url:c,data:{__:(new Date).getTime().toString()},type:b,success:function(b){a.trigger("postSubmit",b),$.bigfoot.ajax.processResponse(b),b.redirect||$.bigfoot.viewport.hideStandBy()},error:function(a){$.bigfoot.ajax.processErrors(a),$.bigfoot.viewport.hideStandBy()}}),!1})})},{}],9:[function(){$.bigfoot.install("a[data-load-into]",function(){var a=$(this),b=a.attr("href"),c=$(a.attr("data-load-into"));if(c.size()>0&&b){var d=a.attr("data-class"),e=a.attr("data-style");a.click(function(a){a.preventDefault();var f=$.bigfoot.placeholder(),g=$(window).scrollTop();return c.empty().append(f),$.ajax({dataType:"html",url:b,data:{__:(new Date).getTime().toString()},type:"get",success:function(a){var c=$("<div/>");c.attr("data-loaded",b),c.attr("class",d),c.attr("style",e),c.append(a),f.replaceWith(c).remove(),$(window).scrollTop(g),$.bigfoot.init(c)},error:function(){f.remove()}}),!1})}})},{}],10:[function(){$.bigfoot.isRetina=function(){var a="(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)";return window.devicePixelRatio>1?!0:window.matchMedia&&window.matchMedia(a).matches},$.bigfoot.install("img.retina",function(){function a(){var a=b.width(),c=b.height();b.attr("src",b.attr("src").replace(/\.([^.]+)$/,"@2X.$1")),b.attr("width",a),b.attr("height",c)}var b=$(this);$.bigfoot.isRetina()&&(b[0].complete?a():b.one("load.bigfoot.retina",a))})},{}],11:[function(){$.bigfoot.install("[data-load]",function(){function a(){clearTimeout(c),c=setTimeout(function(){var a=e.scrollTop()+e.height();d.offset().top<a&&b()},200)}function b(){e.unbind(g);var a=d[0].tagName.toLowerCase(),b="<"+a+"></"+a+">",c=$.bigfoot.placeholder(),h=d.attr("class"),i=d.attr("style");d.replaceWith(c).remove(),$.ajax({dataType:"html",url:f,data:{__:(new Date).getTime().toString()},type:"get",success:function(a){$.bigfoot.log("Loaded "+f);var d=$(b);d.attr("data-loaded",f),d.attr("class",h),d.attr("style",i),d.append(a),c.replaceWith(d).remove(),$.bigfoot.init(d)},error:function(){$.bigfoot.log("Failed to load "+f),c.remove()}})}var c,d=$(this),e=$(window),f=d.attr("data-load"),g="scroll.bigfoot.scrollLoad-"+$.sha256(f);e.unbind(g).bind(g,a),$(a)})},{}],12:[function(){$.bigfoot.install("[data-sticky]",function(){function a(){var a=j.css("float"),i="left"==a||"right"==a;m!=i&&j.removeAttr("style"),m=i,c=0,d=l.scrollTop(),e=l.height(),f=j.height(),g=k.offset().top,h=g+k.height(),b()}function b(){if(m){var a=c,b=l.scrollTop(),d=b+e,k=Math.max(b+16,g)-g,n=Math.min(d-16,h)-g,o=e>f&&n>k+f;k>c&&c+f>n||(c>k||o?a=k:n>c+f&&(a=n-f),a!=c&&(c=a,i.style.webkitTransform=i.style.MozTransform=i.style.msTransform=i.style.OTransform=i.style.transform="translateY("+c+"px)"),0==a?j.addClass("atTop"):j.removeClass("atTop"))}}var c,d,e,f,g,h,i=this,j=$(this),k=$(this.parentNode),l=$(window),m=!0;a(),l.resizeStop(a),l.scrollAnim(b)})},{}],13:[function(){$.bigfoot.switcher={hideAll:function(a){$(".switch-target").filter(function(){return this!=a}).hide(),$("[data-switch]").each(function(){var a=$(this),b=a.attr("data-switch-class");b||(b="active"),a.removeClass(b)})}},$(function(){$("html").bind("click.bigfoot.switcher",function(){$.bigfoot.switcher.hideAll()})}),$.bigfoot.install("[data-switch]",function(){function a(){f.is(":visible")?d.addClass(e):d.removeClass(e)}function b(){f.toggle(0,a)}function c(){f.hide(0,a)}var d=$(this),e=d.attr("data-switch-class");e||(e="active");var f=$(d.attr("data-switch"));f.addClass("switch-target"),d.hasClass("switch-stay")&&f.click(function(a){a.stopPropagation()}),a(),d.unbind(".bigfoot.switch").bind("click.bigfoot.switch",function(a){return a.preventDefault(),$.bigfoot.switcher.hideAll(f[0]),b(),!1}),$(d).find(".close").unbind(".bigfoot.switch").bind("click.bigfoot.switch",function(a){return a.preventDefault(),c(),!1})})},{}],14:[function(){$.bigfoot.install(".toggler",function(){function a(){d.each(function(){var a=$(this),b=$(a.attr("data-for"));b.is(":visible")?a.addClass(e):a.removeClass(e)})}function b(){d.each(function(){$($(this).attr("data-for")).hide()})}var c=$(this),d=$("*[data-for]",c),e=c.attr("data-toggler-class");e||(e="active"),d.unbind(".bigfoot.toggler").bind("click.bigfoot.toggler",function(c){c.preventDefault();var d=$(this);return b(),$(d.attr("data-for")).show(),a(),!1});var f=d.filter("."+e);0==f.size()?a():(b(),$(f.attr("data-for")).show())})},{}],15:[function(){"use strict";$.bigfoot.msg.Close="Close",$.bigfoot.ibox={get:function(){return this.init(),$("#ibox")},init:function(){var a=this,b=$("#ibox");b.size()>0||(b=$('<div id="ibox"></div>'),b.hide(),$("body").prepend(b),$(window).unbind(".ibox").bind("keydown.ibox",function(b){27==b.keyCode&&a.close()}),b.bind("click.ibox",function(){a.close()}))},close:function(){var a=$("#ibox");$("iframe",a).remove(),a.fadeOut(300,function(){$(this).remove()})},isVisible:function(){return $("#ibox").is(":visible")},show:function(a){var b=this,c=$(a),d=$.Event("viewportUnload");if($(window).trigger(d),!d.isDefaultPrevented()){var e=this.get().empty(),f=$('<div id="ibox-wrapper"></div>');f.append(c),e.append(f);var g=$('<div id="ibox-close"></div>');g.attr("title",$.bigfoot.msg.Close),f.append(g),e.fadeIn(300,function(){$("body").animate({scrollTop:e.offset().top},300),e.trigger("ibox_load"),$.bigfoot.init(f),f.unbind(".ibox").bind("click.ibox",function(a){a.stopPropagation()}),$("a.close",c).add(g).bind("click.ibox",function(a){return b.close(),a.preventDefault(),!1})})}},load:function(a){var b=this;$.ajax({url:a,dataType:"html",type:"GET",data:{__:(new Date).getTime().toString()},success:function(a){b.show(a)},error:$.bigfoot.ajax.processErrors})}}},{}],16:[function(){$.fn.lookup=function(a){if(!a)return this;var b=this.find(a);return this.is(a)?b.add(this):b},$.fn.insertAt=function(a,b){var c=this.children().size();return 0>a&&(a=Math.max(0,c+1+a)),this.append(b),c>a&&this.children().eq(a).before(this.children().last()),this},$.fn.insertAtCaret=function(a){return this.each(function(){if(document.selection){this.focus();var b=document.selection.createRange();b.text=a,this.focus()}else if("undefined"!=typeof this.selectionStart){var c=this.selectionStart,d=this.selectionEnd,e=this.scrollTop;this.value=this.value.substring(0,c)+a+this.value.substring(d,this.value.length),this.focus(),this.selectionStart=c+a.length,this.selectionEnd=c+a.length,this.scrollTop=e}else this.value+=a,this.focus()})},$.fn.scrollTo=function(){var a=-1;this.each(function(){a=$(this).offset().top}),a>=0&&$("html, body").animate({scrollTop:a},300)},$.fn.shuffle=function(){function a(a){return Math.floor(Math.random()*a)}var b=this.get(),c=$.map(b,function(){var c=a(b.length),d=$(b[c]).clone(!0)[0];return b.splice(c,1),d});return this.each(function(a){$(this).replaceWith($(c[a]))}),$(c)},$.fn.scrollStop=function(a){var b;$(this).bind("scroll.scrollStop",function(c){var d=this;clearTimeout(b),b=setTimeout(function(){a.call(d,c)},100)})},$.fn.resizeStop=function(a){var b;$(this).bind("resize.resizeStop",function(c){var d=this;clearTimeout(b),b=setTimeout(function(){a.call(d,c)},100)})},$.fn.scrollAnim=function(a){function b(b){c||d(function(){c=!1,a(b)}),c=!0}var c=!1,d=window.requestAnimationFrame;return"function"!=typeof d?$(this).scroll(a):$(this).bind("scroll",b)}},{}],17:[function(){!function(a){var b=8,c=function(a,b){var c=(65535&a)+(65535&b),d=(a>>16)+(b>>16)+(c>>16);return d<<16|65535&c},d=function(a,b){return a>>>b|a<<32-b},e=function(a,b){return a>>>b},f=function(a,b,c){return a&b^~a&c},g=function(a,b,c){return a&b^a&c^b&c},h=function(a){return d(a,2)^d(a,13)^d(a,22)},i=function(a){return d(a,6)^d(a,11)^d(a,25)},j=function(a){return d(a,7)^d(a,18)^e(a,3)},k=function(a){return d(a,17)^d(a,19)^e(a,10)},l=function(a,b){var d,e,l,m,n,o,p,q,r,s,t,u,v=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),w=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),x=new Array(64);a[b>>5]|=128<<24-b%32,a[(b+64>>9<<4)+15]=b;for(var r=0;r<a.length;r+=16){d=w[0],e=w[1],l=w[2],m=w[3],n=w[4],o=w[5],p=w[6],q=w[7];for(var s=0;64>s;s++)x[s]=16>s?a[s+r]:c(c(c(k(x[s-2]),x[s-7]),j(x[s-15])),x[s-16]),t=c(c(c(c(q,i(n)),f(n,o,p)),v[s]),x[s]),u=c(h(d),g(d,e,l)),q=p,p=o,o=n,n=c(m,t),m=l,l=e,e=d,d=c(t,u);w[0]=c(d,w[0]),w[1]=c(e,w[1]),w[2]=c(l,w[2]),w[3]=c(m,w[3]),w[4]=c(n,w[4]),w[5]=c(o,w[5]),w[6]=c(p,w[6]),w[7]=c(q,w[7])}return w},m=function(a){for(var c=Array(),d=(1<<b)-1,e=0;e<a.length*b;e+=b)c[e>>5]|=(a.charCodeAt(e/b)&d)<<24-e%32;return c},n=function(a){for(var b="0123456789abcdef",c="",d=0;d<4*a.length;d++)c+=b.charAt(a[d>>2]>>8*(3-d%4)+4&15)+b.charAt(a[d>>2]>>8*(3-d%4)&15);return c},o=function(a,c){var d=m(a);d.length>16&&(d=core_sha1(d,a.length*b));for(var e=Array(16),f=Array(16),g=0;16>g;g++)e[g]=909522486^d[g],f[g]=1549556828^d[g];var h=l(e.concat(m(c)),512+c.length*b);return l(f.concat(h),768)},p=function(b){return b="object"==typeof b?a(b).val():b.toString()};a.extend({sha256:function(a){return a=p(a),n(l(m(a),a.length*b))},sha256hmac:function(a,b){return a=p(a),b=p(b),n(o(a,b))},sha256config:function(a){b=parseInt(a)||8}}),a.fn.sha256=function(b){a.sha256config(b);var c=p(a(this).val()),d=a.sha256(c);return a.sha256config(8),d}}(jQuery)},{}],18:[function(){$.bigfoot.notices={timeout:function(){var a=$.bigfoot.settings.notices||{};return a.timeout||1e4},container:function(){return $("#notices")},hasErrors:function(){return $(".notice.error:not(:animated)",this.container()).size()>0},stash:function(){if(window.sessionStorage){var a=this.container();$(".notice:animated",a).remove(),window.sessionStorage.setItem("bigfoot.notices",a.html()),a.empty()}return this},unstash:function(){var a=this;if(window.sessionStorage){var b=window.sessionStorage.getItem("bigfoot.notices");b&&(a.container().append(b),window.sessionStorage.removeItem("bigfoot.notices"),$(".notice",a.container()).each(function(){a.initElem(this)}))}return this},initElem:function(a){var b=this,c=$(a);$(".hide",c).remove();var d=$("<span class='hide'/>");d.bind("click.bigfoot.notices",function(){b.dispose(c)}),c.prepend(d),setTimeout(function(){b.dispose(c)},this.timeout())},mkElem:function(a){var b=a.kind,c=a.msg.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"),d=$('<div class="notice '+b+'">'+c+"</div>");return this.initElem(d),d},add:function(a){return this.container().append(this.mkElem(a)),this},error:function(a){return this.add({kind:"error",msg:a})},warn:function(a){return this.add({kind:"warn",msg:a})},info:function(a){return this.add({kind:"info",msg:a})},addAll:function(a){if(a&&a.notices)for(var b in a.notices)this.add(a.notices[b]);return this},clear:function(){return this.dispose($(".notice",this.container()))},dispose:function(a){return a.fadeOut("fast",function(){$(this).remove()}),this}},window.addEventListener("keydown",function(a){27==a.keyCode&&$.bigfoot.notices.clear()}),$(function(){$.bigfoot.notices.unstash()})},{}],19:[function(){"use strict";$.bigfoot.msg.standby="Please wait...";var a="function"==typeof history.pushState;a&&$(function(){window.addEventListener("popstate",function(a){if(a.state){var b=a.state.id;b&&b==$.bigfoot.viewport.id()?$.bigfoot.viewport.load(location.href):location.reload(!0)}},!1)}),$.bigfoot.viewport={id:function(){var a=this.container(),b=a.attr("data-viewport-id");if(b)return b;var c=Math.random().toString();return a.attr("data-viewport-id",c),c},container:function(){return $("#viewport")},timeout:function(){var a=$.bigfoot.settings.viewport||{};return a.timeout||500},showStandBy:function(){var a=$("#viewport-standby");0==a.size()&&(a=$('<div id="viewport-standby"></div>'),a.hide(),a.append('<div class="message">'+$.bigfoot.msg.standby+"</div>")),$("body").append(a),this._standByTimer=setTimeout(function(){a.fadeIn(300)},this.timeout())},hideStandBy:function(){clearTimeout(this._standByTimer),$("#viewport-standby").remove()},load:function(a){var b=this,c=$.Event("viewportUnload");$(window).trigger(c),c.isDefaultPrevented()||(b.showStandBy(),$.ajax({url:a,headers:{"X-Render-Mode":"partial-viewport"},dataType:"html",data:{__:(new Date).getTime().toString()},type:"GET",success:function(a){var c=b.id(),d=$(a);"viewport"!=d.attr("id")&&(d=$('<div id="viewport"/>').append(d)),d.attr("data-viewport-id",c),b.hideStandBy(),b.container().replaceWith(d).remove(),$("a[rel='partial']").removeClass("active"),$.bigfoot.init(d);var e=$("title",d);e.size()>0&&($("head title").text(e.text()),e.remove()),$("body").trigger("viewportLoad"),b.scrollToAnchor()},error:function(a){$.bigfoot.ajax.processErrors(a),b.hideStandBy()}}))},navigate:function(b,c){if(a){var d=$.bigfoot.viewport.id();window.history.replaceState({id:d},"",location.href),c?window.history.replaceState({id:d},"",b):window.history.pushState({id:d},"",b),this.load(b)}else $.bigfoot.notices.stash(),c?window.location.replace(b):window.location.href=b},scrollToAnchor:function(){var a=location.href.replace(/.*?(?=#|$)/,""),b=$(a);0==b.size()&&(b=$(".viewport-anchor").first()),b.scrollTo()}},a&&$.bigfoot.install("a[rel='partial']",function(){var a=$(this);"popup"!=a.attr("rel")&&"_blank"!=a.attr("target")&&(a.addClass("partial-link"),a.unbind(".bigfoot.partial-link").bind("click.bigfoot.partial-link",function(a){if(0!=a.button||a.metaKey||a.ctrlKey)return!0;a.preventDefault();var b=$(this).attr("href");return $.bigfoot.viewport.navigate(b),!1}))})},{}]},{},[3])(3)}); |
@@ -602,5 +602,2 @@ ;(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
var updating = false | ||
, raf = window.requestAnimationFrame; | ||
var oldY, viewTop, windowHeight, stickyHeight, parentTop, parentBottom; | ||
@@ -625,16 +622,7 @@ | ||
function onScroll() { | ||
function update() { | ||
if (!enabled) | ||
return; | ||
viewTop = $wnd.scrollTop(); | ||
requestUpdate(); | ||
} | ||
function requestUpdate() { | ||
if (!updating) raf(update); | ||
updating = true; | ||
} | ||
function update() { | ||
var newY = oldY | ||
, viewTop = $wnd.scrollTop() | ||
, viewBottom = viewTop + windowHeight | ||
@@ -644,3 +632,2 @@ , boundTop = Math.max(viewTop + 16, parentTop) - parentTop | ||
, alwaysAtTop = stickyHeight < windowHeight && boundTop + stickyHeight < boundBottom; | ||
updating = false; | ||
if (boundTop > oldY && boundBottom < oldY + stickyHeight) | ||
@@ -669,3 +656,3 @@ return; | ||
$wnd.resizeStop(reinit); | ||
$wnd.scroll(onScroll); | ||
$wnd.scrollAnim(update); | ||
@@ -1013,2 +1000,25 @@ }); | ||
// Events on scroll per animation frame | ||
$.fn.scrollAnim = function(cb) { | ||
var updating = false | ||
, raf = window.requestAnimationFrame; | ||
if (typeof raf != 'function') | ||
return $(this).scroll(cb); | ||
function onScroll(ev) { | ||
if (!updating) | ||
raf(function() { | ||
updating = false; | ||
cb(ev); | ||
}); | ||
updating = true; | ||
} | ||
return $(this).bind('scroll', onScroll); | ||
}; | ||
},{}],17:[function(require,module,exports){ | ||
@@ -1015,0 +1025,0 @@ (function(f){var m=8;var k=function(q,t){var s=(q&65535)+(t&65535);var r=(q>>16)+(t>>16)+(s>>16);return(r<<16)|(s&65535)};var e=function(r,q){return(r>>>q)|(r<<(32-q))};var g=function(r,q){return(r>>>q)};var a=function(q,s,r){return((q&s)^((~q)&r))};var d=function(q,s,r){return((q&s)^(q&r)^(s&r))};var h=function(q){return(e(q,2)^e(q,13)^e(q,22))};var b=function(q){return(e(q,6)^e(q,11)^e(q,25))};var p=function(q){return(e(q,7)^e(q,18)^g(q,3))};var l=function(q){return(e(q,17)^e(q,19)^g(q,10))};var c=function(r,s){var E=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298);var t=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225);var q=new Array(64);var G,F,D,C,A,y,x,w,v,u;var B,z;r[s>>5]|=128<<(24-s%32);r[((s+64>>9)<<4)+15]=s;for(var v=0;v<r.length;v+=16){G=t[0];F=t[1];D=t[2];C=t[3];A=t[4];y=t[5];x=t[6];w=t[7];for(var u=0;u<64;u++){if(u<16){q[u]=r[u+v]}else{q[u]=k(k(k(l(q[u-2]),q[u-7]),p(q[u-15])),q[u-16])}B=k(k(k(k(w,b(A)),a(A,y,x)),E[u]),q[u]);z=k(h(G),d(G,F,D));w=x;x=y;y=A;A=k(C,B);C=D;D=F;F=G;G=k(B,z)}t[0]=k(G,t[0]);t[1]=k(F,t[1]);t[2]=k(D,t[2]);t[3]=k(C,t[3]);t[4]=k(A,t[4]);t[5]=k(y,t[5]);t[6]=k(x,t[6]);t[7]=k(w,t[7])}return t};var j=function(t){var s=Array();var q=(1<<m)-1;for(var r=0;r<t.length*m;r+=m){s[r>>5]|=(t.charCodeAt(r/m)&q)<<(24-r%32)}return s};var n=function(s){var r="0123456789abcdef";var t="";for(var q=0;q<s.length*4;q++){t+=r.charAt((s[q>>2]>>((3-q%4)*8+4))&15)+r.charAt((s[q>>2]>>((3-q%4)*8))&15)}return t};var o=function(s,v){var u=j(s);if(u.length>16){u=core_sha1(u,s.length*m)}var q=Array(16),t=Array(16);for(var r=0;r<16;r++){q[r]=u[r]^909522486;t[r]=u[r]^1549556828}var w=c(q.concat(j(v)),512+v.length*m);return c(t.concat(w),512+256)};var i=function(q){q=typeof q=="object"?f(q).val():q.toString();return q};f.extend({sha256:function(q){q=i(q);return n(c(j(q),q.length*m))},sha256hmac:function(q,r){q=i(q);r=i(r);return n(o(q,r))},sha256config:function(q){m=parseInt(q)||8}});f.fn.sha256=function(r){f.sha256config(r);var q=i(f(this).val());var s=f.sha256(q);f.sha256config(8);return s}})(jQuery); |
@@ -1,2 +0,2 @@ | ||
/*! Bigfoot v.1.1.10 */ | ||
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(){$.bigfoot.msg["ajax.authRequired"]="You need to login to continue.",$.bigfoot.msg["ajax.accessDenied"]="You have insufficient permissions to access the resource.",$.bigfoot.msg["ajax.failed"]="Your request could not be processed. Please contact technical support.",$.bigfoot.msg["ajax.tooLarge"]="Your request exceeds the size limit.",$.bigfoot.ajax={processResponse:function(a,b){$.bigfoot.notices.clear(),$.bigfoot.notices.addAll(a),a.redirect&&!b&&($.bigfoot.notices.stash(),window.location.replace(a.redirect))},processErrors:function(a){switch(a.status){case 0:return!0;case 401:$.bigfoot.notices.warn($.bigfoot.msg["ajax.authRequired"]);break;case 403:$.bigfoot.notices.error($.bigfoot.msg["ajax.accessDenied"]);break;case 413:$.bigfoot.notices.error($.bigfoot.msg["ajax.tooLarge"]);break;default:$.bigfoot.notices.error($.bigfoot.msg["ajax.failed"])}return!1}}},{}],2:[function(){$.bigfoot={settings:{},msg:{},log:function(a){"undefined"!=typeof console&&"function"==typeof console.log&&console.log(a)},queue:[],init:function(a){this.queue.forEach(function(b){a.lookup(b.selector).each(b.fn)})},install:function(a,b){return this.queue.push({selector:a,fn:b}),this},installLast:this.install,installFirst:function(a,b){return this.queue.unshift({selector:a,fn:b}),this},installBefore:function(a,b,c){for(var d=0;d<this.queue.length&&this.queue[d].selector!=a;d++);return this.queue.splice(d,0,{selector:b,fn:c}),this},installAfter:function(a,b,c){for(var d=0;d<this.queue.length&&this.queue[d].selector!=a;d++);d==this.queue.length?this.installLast(b,c):this.queue.splice(d+1,0,{selector:b,fn:c})},replace:function(a,b){for(var c=0;c<this.queue.length&&this.queue[c].selector!=a;c++);c==this.queue.length?$.bigfoot.log("Replacing “"+a+"” failed. Try installing instead."):this.queue.splice(c,1,{selector:a,fn:b})}}},{}],3:[function(a){!function(b){a("./modules"),b(function(){b.bigfoot.init(b("body"))})}(jQuery)},{"./modules":4}],4:[function(a){a("../jquery-ext"),a("../jquery-sha256"),a("../bigfoot"),a("../notices"),a("../viewport"),a("../ajax"),a("../ibox"),a("../components/commons"),a("../components/forms"),a("../components/switch"),a("../components/toggler"),a("../components/scroll-load"),a("../components/checkbox-toggle"),a("../components/retina"),a("../components/load-into"),a("../components/lightform"),a("../components/sticky")},{"../ajax":1,"../bigfoot":2,"../components/checkbox-toggle":5,"../components/commons":6,"../components/forms":7,"../components/lightform":8,"../components/load-into":9,"../components/retina":10,"../components/scroll-load":11,"../components/sticky":12,"../components/switch":13,"../components/toggler":14,"../ibox":15,"../jquery-ext":16,"../jquery-sha256":17,"../notices":18,"../viewport":19}],5:[function(){$.bigfoot.install('input[type="checkbox"][data-toggle]',function(){function a(){"false"==localStorage.getItem(e)?c.removeAttr("checked"):"true"==localStorage.getItem(e)&&c.attr("checked","checked"),b(0)}function b(a){var b=c.is(":checked");localStorage.setItem(e,b);var f=$(d);b?f.fadeIn(a):f.fadeOut(a)}var c=$(this),d=c.attr("data-toggle"),e=c.attr("data-key")||"bigfoot.toggle("+d+")";a(),c.unbind(".bigfoot.toggle").bind("change.bigfoot.toggle",function(){b(300)})})},{}],6:[function(){$.bigfoot.placeholder=function(){return $('<div class="loading"/>')},$.bigfoot.install("[data-ref]",function(){var a=$(this).attr("data-ref"),b=$(this).attr("data-ref-class");b||(b="active"),$(a).addClass(b)}),$.bigfoot.install(".focus",function(){$(this).focus()}),$.bigfoot.install("[data-set-focus]",function(){$(this).unbind(".bigfoot.setFocus").bind("click.bigfoot.setFocus",function(){$($(this).attr("data-set-focus")).focus()})}),$.bigfoot.install('a[rel="popup"]',function(){$(this).unbind("click.bigfoot.popup").bind("click.bigfoot.popup",function(a){var b=$(this),c=b.attr("href");return c?($.bigfoot.ibox.load(c),a.preventDefault(),!1):void 0})}),$.bigfoot.install("[data-show]",function(){var a=$(this);a.unbind(".bigfoot.show").bind("click.bigfoot.show",function(){$(a.attr("data-show")).show(0,function(){$(a.attr("data-set-focus")).focus()})})}),$.bigfoot.install("[data-hide]",function(){$(this).unbind(".bigfoot.hide").bind("click.bigfoot.hide",function(){$($(this).attr("data-hide")).hide()})})},{}],7:[function(){"use strict";$.bigfoot.install("form",function(){var a=$(this);a.bind("submit.bigfoot.forms",function(b){return b.preventDefault(),a.hasClass("readonly")?!1:(this.submit(),!1)}),a[0].handlers=[],a[0].executeHandlers=function(b){for(var c in a[0].handlers){var d=a[0].handlers[c],e=d.call(a[0],{params:b});if(e===!1)return!1}return!0}}),$.bigfoot.install("form.partial",function(){var a=$(this),b=a.hasClass("stay"),c=a.attr("action"),d=a.attr("method").toUpperCase(),e="multipart/form-data"==a.attr("enctype");a[0].submit=function(){if(!a.hasClass("readonly")){var f=$.bigfoot.placeholder(),g=$(".submits",a),h=g.height();g.hide(),f.insertAfter(g),f.height(h);var i=new FormData(a[0]);if(e)$.bigfoot.log(d+" "+c+" [multipart data]");else{if(i=$(":input:not(.exclude)",a).serializeArray(),i.push({name:"__",value:(new Date).getTime().toString()}),!a[0].executeHandlers(i))return g.show(),f.remove(),void 0;$.bigfoot.log(d+" "+c+" "+JSON.stringify(i))}if("GET"==d){var j=c+"?"+$.param(i);$.bigfoot.viewport.navigate(j)}else{var k={data:i,dataType:"json",url:c,type:d,cache:!1,success:function(c){a.trigger("postSubmit",c),$.bigfoot.ajax.processResponse(c,b),c.redirect||(g.show(),f.remove(),$("input[type='password'], .cleanup",a).val(""))},error:function(a){g.show(),f.remove(),$.bigfoot.ajax.processErrors(a)}};e&&(k.processData=!1,k.contentType=!1),$.ajax(k)}}}}),$.bigfoot.install("form :input.submit",function(){var a=$(this);a.unbind(".bigfoot.submit").bind("change.bigfoot.submit",function(){var b=a.parents("form");b.submit()})}),$.bigfoot.install("form a.submit",function(){var a=$(this);a.unbind(".bigfoot.submit").bind("click.bigfoot.submit",function(b){return a.parents("form").submit(),b.preventDefault(),!1})}),$.bigfoot.install("form[data-load-into]",function(){var a=$(this),b=$(a.attr("data-load-into")),c=a.attr("method"),d=a.attr("action");a[0].submit=function(){var e=$.bigfoot.placeholder(),f=$(".submits",a);f.hide(),b.empty().append(e);var g=$(":input:not(.exclude)",a).serializeArray();return g.push({name:"__",value:(new Date).getTime().toString()}),a[0].executeHandlers(g)?($.bigfoot.log(c+" "+d+" "+JSON.stringify(g)),$.ajax({data:g,dataType:"html",url:d,type:c,success:function(c){a.trigger("postSubmit",c),e.remove(),b.append(c),$.bigfoot.init(b)},error:function(a){e.remove(),f.show(),$.bigfoot.ajax.processErrors(a)}}),void 0):(f.show(),e.remove(),void 0)}}),$.bigfoot.msg["form.unload.warn"]="Warning! If you leave this page, all unsaved changes will be lost.",$.bigfoot.msg["viewportUnload.warn"]="Warning! If you continue, all unsaved changed will be lost. Are you sure you want to continue?",$.bigfoot.install("form.unload-warn",function(){function a(){var a=$(":input:not(.exclude)",b).serialize();b.data("initial-state",a)}var b=$(this);a(),b.bind("submit.bigfoot.unload-warn",a),$(window).unbind("beforeunload.bigfoot").bind("beforeunload.bigfoot.unload-warn",function(){var a=$("form.unload-warn").filter(function(){var a=$(this),b=$(":input:not(.exclude)",a).serialize(),c=a.data("initial-state");return b!=c&&a.is(":visible")});return a.size()>0?$.bigfoot.msg["form.unload.warn"]:void 0}),$(window).unbind("viewportUnload.bigfoot").bind("viewportUnload.bigfoot.unload-warn",function(a){var b=$("form.unload-warn").filter(function(){var a=$(this),b=$(":input:not(.exclude)",a).serialize(),c=a.data("initial-state");return b!=c});b.size()>0&&(confirm($.bigfoot.msg["viewportUnload.warn"])||a.preventDefault())})})},{}],8:[function(){$.bigfoot.install("[data-method][data-action]",function(){var a=$(this),b=a.attr("data-method").toUpperCase(),c=a.attr("data-action");a.click(function(d){return d.preventDefault(),$.bigfoot.viewport.showStandBy(),$.ajax({dataType:"json",url:c,data:{__:(new Date).getTime().toString()},type:b,success:function(b){a.trigger("postSubmit",b),$.bigfoot.ajax.processResponse(b),b.redirect||$.bigfoot.viewport.hideStandBy()},error:function(a){$.bigfoot.ajax.processErrors(a),$.bigfoot.viewport.hideStandBy()}}),!1})})},{}],9:[function(){$.bigfoot.install("a[data-load-into]",function(){var a=$(this),b=a.attr("href"),c=$(a.attr("data-load-into"));if(c.size()>0&&b){var d=a.attr("data-class"),e=a.attr("data-style");a.click(function(a){a.preventDefault();var f=$.bigfoot.placeholder(),g=$(window).scrollTop();return c.empty().append(f),$.ajax({dataType:"html",url:b,data:{__:(new Date).getTime().toString()},type:"get",success:function(a){var c=$("<div/>");c.attr("data-loaded",b),c.attr("class",d),c.attr("style",e),c.append(a),f.replaceWith(c).remove(),$(window).scrollTop(g),$.bigfoot.init(c)},error:function(){f.remove()}}),!1})}})},{}],10:[function(){$.bigfoot.isRetina=function(){var a="(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)";return window.devicePixelRatio>1?!0:window.matchMedia&&window.matchMedia(a).matches},$.bigfoot.install("img.retina",function(){function a(){var a=b.width(),c=b.height();b.attr("src",b.attr("src").replace(/\.([^.]+)$/,"@2X.$1")),b.attr("width",a),b.attr("height",c)}var b=$(this);$.bigfoot.isRetina()&&(b[0].complete?a():b.one("load.bigfoot.retina",a))})},{}],11:[function(){$.bigfoot.install("[data-load]",function(){function a(){clearTimeout(c),c=setTimeout(function(){var a=e.scrollTop()+e.height();d.offset().top<a&&b()},200)}function b(){e.unbind(g);var a=d[0].tagName.toLowerCase(),b="<"+a+"></"+a+">",c=$.bigfoot.placeholder(),h=d.attr("class"),i=d.attr("style");d.replaceWith(c).remove(),$.ajax({dataType:"html",url:f,data:{__:(new Date).getTime().toString()},type:"get",success:function(a){$.bigfoot.log("Loaded "+f);var d=$(b);d.attr("data-loaded",f),d.attr("class",h),d.attr("style",i),d.append(a),c.replaceWith(d).remove(),$.bigfoot.init(d)},error:function(){$.bigfoot.log("Failed to load "+f),c.remove()}})}var c,d=$(this),e=$(window),f=d.attr("data-load"),g="scroll.bigfoot.scrollLoad-"+$.sha256(f);e.unbind(g).bind(g,a),$(a)})},{}],12:[function(){$.bigfoot.install("[data-sticky]",function(){function a(){var a=l.css("float"),b="left"==a||"right"==a;o!=b&&l.removeAttr("style"),o=b,e=0,f=n.scrollTop(),g=n.height(),h=l.height(),i=m.offset().top,j=i+m.height(),d()}function b(){o&&(f=n.scrollTop(),c())}function c(){p||q(d),p=!0}function d(){var a=e,b=f+g,c=Math.max(f+16,i)-i,d=Math.min(b-16,j)-i,m=g>h&&d>c+h;p=!1,c>e&&e+h>d||(e>c||m?a=c:d>e+h&&(a=d-h),a!=e&&(e=a,k.style.webkitTransform=k.style.MozTransform=k.style.msTransform=k.style.OTransform=k.style.transform="translateY("+e+"px)"),0==a?l.addClass("atTop"):l.removeClass("atTop"))}var e,f,g,h,i,j,k=this,l=$(this),m=$(this.parentNode),n=$(window),o=!0,p=!1,q=window.requestAnimationFrame;a(),n.resizeStop(a),n.scroll(b)})},{}],13:[function(){$.bigfoot.switcher={hideAll:function(a){$(".switch-target").filter(function(){return this!=a}).hide(),$("[data-switch]").each(function(){var a=$(this),b=a.attr("data-switch-class");b||(b="active"),a.removeClass(b)})}},$(function(){$("html").bind("click.bigfoot.switcher",function(){$.bigfoot.switcher.hideAll()})}),$.bigfoot.install("[data-switch]",function(){function a(){f.is(":visible")?d.addClass(e):d.removeClass(e)}function b(){f.toggle(0,a)}function c(){f.hide(0,a)}var d=$(this),e=d.attr("data-switch-class");e||(e="active");var f=$(d.attr("data-switch"));f.addClass("switch-target"),d.hasClass("switch-stay")&&f.click(function(a){a.stopPropagation()}),a(),d.unbind(".bigfoot.switch").bind("click.bigfoot.switch",function(a){return a.preventDefault(),$.bigfoot.switcher.hideAll(f[0]),b(),!1}),$(d).find(".close").unbind(".bigfoot.switch").bind("click.bigfoot.switch",function(a){return a.preventDefault(),c(),!1})})},{}],14:[function(){$.bigfoot.install(".toggler",function(){function a(){d.each(function(){var a=$(this),b=$(a.attr("data-for"));b.is(":visible")?a.addClass(e):a.removeClass(e)})}function b(){d.each(function(){$($(this).attr("data-for")).hide()})}var c=$(this),d=$("*[data-for]",c),e=c.attr("data-toggler-class");e||(e="active"),d.unbind(".bigfoot.toggler").bind("click.bigfoot.toggler",function(c){c.preventDefault();var d=$(this);return b(),$(d.attr("data-for")).show(),a(),!1});var f=d.filter("."+e);0==f.size()?a():(b(),$(f.attr("data-for")).show())})},{}],15:[function(){"use strict";$.bigfoot.msg.Close="Close",$.bigfoot.ibox={get:function(){return this.init(),$("#ibox")},init:function(){var a=this,b=$("#ibox");b.size()>0||(b=$('<div id="ibox"></div>'),b.hide(),$("body").prepend(b),$(window).unbind(".ibox").bind("keydown.ibox",function(b){27==b.keyCode&&a.close()}),b.bind("click.ibox",function(){a.close()}))},close:function(){var a=$("#ibox");$("iframe",a).remove(),a.fadeOut(300,function(){$(this).remove()})},isVisible:function(){return $("#ibox").is(":visible")},show:function(a){var b=this,c=$(a),d=$.Event("viewportUnload");if($(window).trigger(d),!d.isDefaultPrevented()){var e=this.get().empty(),f=$('<div id="ibox-wrapper"></div>');f.append(c),e.append(f);var g=$('<div id="ibox-close"></div>');g.attr("title",$.bigfoot.msg.Close),f.append(g),e.fadeIn(300,function(){$("body").animate({scrollTop:e.offset().top},300),e.trigger("ibox_load"),$.bigfoot.init(f),f.unbind(".ibox").bind("click.ibox",function(a){a.stopPropagation()}),$("a.close",c).add(g).bind("click.ibox",function(a){return b.close(),a.preventDefault(),!1})})}},load:function(a){var b=this;$.ajax({url:a,dataType:"html",type:"GET",data:{__:(new Date).getTime().toString()},success:function(a){b.show(a)},error:$.bigfoot.ajax.processErrors})}}},{}],16:[function(){$.fn.lookup=function(a){if(!a)return this;var b=this.find(a);return this.is(a)?b.add(this):b},$.fn.insertAt=function(a,b){var c=this.children().size();return 0>a&&(a=Math.max(0,c+1+a)),this.append(b),c>a&&this.children().eq(a).before(this.children().last()),this},$.fn.insertAtCaret=function(a){return this.each(function(){if(document.selection){this.focus();var b=document.selection.createRange();b.text=a,this.focus()}else if("undefined"!=typeof this.selectionStart){var c=this.selectionStart,d=this.selectionEnd,e=this.scrollTop;this.value=this.value.substring(0,c)+a+this.value.substring(d,this.value.length),this.focus(),this.selectionStart=c+a.length,this.selectionEnd=c+a.length,this.scrollTop=e}else this.value+=a,this.focus()})},$.fn.scrollTo=function(){var a=-1;this.each(function(){a=$(this).offset().top}),a>=0&&$("html, body").animate({scrollTop:a},300)},$.fn.shuffle=function(){function a(a){return Math.floor(Math.random()*a)}var b=this.get(),c=$.map(b,function(){var c=a(b.length),d=$(b[c]).clone(!0)[0];return b.splice(c,1),d});return this.each(function(a){$(this).replaceWith($(c[a]))}),$(c)},$.fn.scrollStop=function(a){var b;$(this).bind("scroll.scrollStop",function(c){var d=this;clearTimeout(b),b=setTimeout(function(){a.call(d,c)},100)})},$.fn.resizeStop=function(a){var b;$(this).bind("resize.resizeStop",function(c){var d=this;clearTimeout(b),b=setTimeout(function(){a.call(d,c)},100)})}},{}],17:[function(){!function(a){var b=8,c=function(a,b){var c=(65535&a)+(65535&b),d=(a>>16)+(b>>16)+(c>>16);return d<<16|65535&c},d=function(a,b){return a>>>b|a<<32-b},e=function(a,b){return a>>>b},f=function(a,b,c){return a&b^~a&c},g=function(a,b,c){return a&b^a&c^b&c},h=function(a){return d(a,2)^d(a,13)^d(a,22)},i=function(a){return d(a,6)^d(a,11)^d(a,25)},j=function(a){return d(a,7)^d(a,18)^e(a,3)},k=function(a){return d(a,17)^d(a,19)^e(a,10)},l=function(a,b){var d,e,l,m,n,o,p,q,r,s,t,u,v=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),w=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),x=new Array(64);a[b>>5]|=128<<24-b%32,a[(b+64>>9<<4)+15]=b;for(var r=0;r<a.length;r+=16){d=w[0],e=w[1],l=w[2],m=w[3],n=w[4],o=w[5],p=w[6],q=w[7];for(var s=0;64>s;s++)x[s]=16>s?a[s+r]:c(c(c(k(x[s-2]),x[s-7]),j(x[s-15])),x[s-16]),t=c(c(c(c(q,i(n)),f(n,o,p)),v[s]),x[s]),u=c(h(d),g(d,e,l)),q=p,p=o,o=n,n=c(m,t),m=l,l=e,e=d,d=c(t,u);w[0]=c(d,w[0]),w[1]=c(e,w[1]),w[2]=c(l,w[2]),w[3]=c(m,w[3]),w[4]=c(n,w[4]),w[5]=c(o,w[5]),w[6]=c(p,w[6]),w[7]=c(q,w[7])}return w},m=function(a){for(var c=Array(),d=(1<<b)-1,e=0;e<a.length*b;e+=b)c[e>>5]|=(a.charCodeAt(e/b)&d)<<24-e%32;return c},n=function(a){for(var b="0123456789abcdef",c="",d=0;d<4*a.length;d++)c+=b.charAt(a[d>>2]>>8*(3-d%4)+4&15)+b.charAt(a[d>>2]>>8*(3-d%4)&15);return c},o=function(a,c){var d=m(a);d.length>16&&(d=core_sha1(d,a.length*b));for(var e=Array(16),f=Array(16),g=0;16>g;g++)e[g]=909522486^d[g],f[g]=1549556828^d[g];var h=l(e.concat(m(c)),512+c.length*b);return l(f.concat(h),768)},p=function(b){return b="object"==typeof b?a(b).val():b.toString()};a.extend({sha256:function(a){return a=p(a),n(l(m(a),a.length*b))},sha256hmac:function(a,b){return a=p(a),b=p(b),n(o(a,b))},sha256config:function(a){b=parseInt(a)||8}}),a.fn.sha256=function(b){a.sha256config(b);var c=p(a(this).val()),d=a.sha256(c);return a.sha256config(8),d}}(jQuery)},{}],18:[function(){$.bigfoot.notices={timeout:function(){var a=$.bigfoot.settings.notices||{};return a.timeout||1e4},container:function(){return $("#notices")},hasErrors:function(){return $(".notice.error:not(:animated)",this.container()).size()>0},stash:function(){if(window.sessionStorage){var a=this.container();$(".notice:animated",a).remove(),window.sessionStorage.setItem("bigfoot.notices",a.html()),a.empty()}return this},unstash:function(){var a=this;if(window.sessionStorage){var b=window.sessionStorage.getItem("bigfoot.notices");b&&(a.container().append(b),window.sessionStorage.removeItem("bigfoot.notices"),$(".notice",a.container()).each(function(){a.initElem(this)}))}return this},initElem:function(a){var b=this,c=$(a);$(".hide",c).remove();var d=$("<span class='hide'/>");d.bind("click.bigfoot.notices",function(){b.dispose(c)}),c.prepend(d),setTimeout(function(){b.dispose(c)},this.timeout())},mkElem:function(a){var b=a.kind,c=a.msg.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"),d=$('<div class="notice '+b+'">'+c+"</div>");return this.initElem(d),d},add:function(a){return this.container().append(this.mkElem(a)),this},error:function(a){return this.add({kind:"error",msg:a})},warn:function(a){return this.add({kind:"warn",msg:a})},info:function(a){return this.add({kind:"info",msg:a})},addAll:function(a){if(a&&a.notices)for(var b in a.notices)this.add(a.notices[b]);return this},clear:function(){return this.dispose($(".notice",this.container()))},dispose:function(a){return a.fadeOut("fast",function(){$(this).remove()}),this}},window.addEventListener("keydown",function(a){27==a.keyCode&&$.bigfoot.notices.clear()}),$(function(){$.bigfoot.notices.unstash()})},{}],19:[function(){"use strict";$.bigfoot.msg.standby="Please wait...";var a="function"==typeof history.pushState;a&&$(function(){window.addEventListener("popstate",function(a){if(a.state){var b=a.state.id;b&&b==$.bigfoot.viewport.id()?$.bigfoot.viewport.load(location.href):location.reload(!0)}},!1)}),$.bigfoot.viewport={id:function(){var a=this.container(),b=a.attr("data-viewport-id");if(b)return b;var c=Math.random().toString();return a.attr("data-viewport-id",c),c},container:function(){return $("#viewport")},timeout:function(){var a=$.bigfoot.settings.viewport||{};return a.timeout||500},showStandBy:function(){var a=$("#viewport-standby");0==a.size()&&(a=$('<div id="viewport-standby"></div>'),a.hide(),a.append('<div class="message">'+$.bigfoot.msg.standby+"</div>")),$("body").append(a),this._standByTimer=setTimeout(function(){a.fadeIn(300)},this.timeout())},hideStandBy:function(){clearTimeout(this._standByTimer),$("#viewport-standby").remove()},load:function(a){var b=this,c=$.Event("viewportUnload");$(window).trigger(c),c.isDefaultPrevented()||(b.showStandBy(),$.ajax({url:a,headers:{"X-Render-Mode":"partial-viewport"},dataType:"html",data:{__:(new Date).getTime().toString()},type:"GET",success:function(a){var c=b.id(),d=$(a);"viewport"!=d.attr("id")&&(d=$('<div id="viewport"/>').append(d)),d.attr("data-viewport-id",c),b.hideStandBy(),b.container().replaceWith(d).remove(),$("a[rel='partial']").removeClass("active"),$.bigfoot.init(d);var e=$("title",d);e.size()>0&&($("head title").text(e.text()),e.remove()),$("body").trigger("viewportLoad"),b.scrollToAnchor()},error:function(a){$.bigfoot.ajax.processErrors(a),b.hideStandBy()}}))},navigate:function(b,c){if(a){var d=$.bigfoot.viewport.id();window.history.replaceState({id:d},"",location.href),c?window.history.replaceState({id:d},"",b):window.history.pushState({id:d},"",b),this.load(b)}else $.bigfoot.notices.stash(),c?window.location.replace(b):window.location.href=b},scrollToAnchor:function(){var a=location.href.replace(/.*?(?=#|$)/,""),b=$(a);0==b.size()&&(b=$(".viewport-anchor").first()),b.scrollTo()}},a&&$.bigfoot.install("a[rel='partial']",function(){var a=$(this);"popup"!=a.attr("rel")&&"_blank"!=a.attr("target")&&(a.addClass("partial-link"),a.unbind(".bigfoot.partial-link").bind("click.bigfoot.partial-link",function(a){if(0!=a.button||a.metaKey||a.ctrlKey)return!0;a.preventDefault();var b=$(this).attr("href");return $.bigfoot.viewport.navigate(b),!1}))})},{}]},{},[3]); | ||
/*! Bigfoot v.1.1.11 */ | ||
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(){$.bigfoot.msg["ajax.authRequired"]="You need to login to continue.",$.bigfoot.msg["ajax.accessDenied"]="You have insufficient permissions to access the resource.",$.bigfoot.msg["ajax.failed"]="Your request could not be processed. Please contact technical support.",$.bigfoot.msg["ajax.tooLarge"]="Your request exceeds the size limit.",$.bigfoot.ajax={processResponse:function(a,b){$.bigfoot.notices.clear(),$.bigfoot.notices.addAll(a),a.redirect&&!b&&($.bigfoot.notices.stash(),window.location.replace(a.redirect))},processErrors:function(a){switch(a.status){case 0:return!0;case 401:$.bigfoot.notices.warn($.bigfoot.msg["ajax.authRequired"]);break;case 403:$.bigfoot.notices.error($.bigfoot.msg["ajax.accessDenied"]);break;case 413:$.bigfoot.notices.error($.bigfoot.msg["ajax.tooLarge"]);break;default:$.bigfoot.notices.error($.bigfoot.msg["ajax.failed"])}return!1}}},{}],2:[function(){$.bigfoot={settings:{},msg:{},log:function(a){"undefined"!=typeof console&&"function"==typeof console.log&&console.log(a)},queue:[],init:function(a){this.queue.forEach(function(b){a.lookup(b.selector).each(b.fn)})},install:function(a,b){return this.queue.push({selector:a,fn:b}),this},installLast:this.install,installFirst:function(a,b){return this.queue.unshift({selector:a,fn:b}),this},installBefore:function(a,b,c){for(var d=0;d<this.queue.length&&this.queue[d].selector!=a;d++);return this.queue.splice(d,0,{selector:b,fn:c}),this},installAfter:function(a,b,c){for(var d=0;d<this.queue.length&&this.queue[d].selector!=a;d++);d==this.queue.length?this.installLast(b,c):this.queue.splice(d+1,0,{selector:b,fn:c})},replace:function(a,b){for(var c=0;c<this.queue.length&&this.queue[c].selector!=a;c++);c==this.queue.length?$.bigfoot.log("Replacing “"+a+"” failed. Try installing instead."):this.queue.splice(c,1,{selector:a,fn:b})}}},{}],3:[function(a){!function(b){a("./modules"),b(function(){b.bigfoot.init(b("body"))})}(jQuery)},{"./modules":4}],4:[function(a){a("../jquery-ext"),a("../jquery-sha256"),a("../bigfoot"),a("../notices"),a("../viewport"),a("../ajax"),a("../ibox"),a("../components/commons"),a("../components/forms"),a("../components/switch"),a("../components/toggler"),a("../components/scroll-load"),a("../components/checkbox-toggle"),a("../components/retina"),a("../components/load-into"),a("../components/lightform"),a("../components/sticky")},{"../ajax":1,"../bigfoot":2,"../components/checkbox-toggle":5,"../components/commons":6,"../components/forms":7,"../components/lightform":8,"../components/load-into":9,"../components/retina":10,"../components/scroll-load":11,"../components/sticky":12,"../components/switch":13,"../components/toggler":14,"../ibox":15,"../jquery-ext":16,"../jquery-sha256":17,"../notices":18,"../viewport":19}],5:[function(){$.bigfoot.install('input[type="checkbox"][data-toggle]',function(){function a(){"false"==localStorage.getItem(e)?c.removeAttr("checked"):"true"==localStorage.getItem(e)&&c.attr("checked","checked"),b(0)}function b(a){var b=c.is(":checked");localStorage.setItem(e,b);var f=$(d);b?f.fadeIn(a):f.fadeOut(a)}var c=$(this),d=c.attr("data-toggle"),e=c.attr("data-key")||"bigfoot.toggle("+d+")";a(),c.unbind(".bigfoot.toggle").bind("change.bigfoot.toggle",function(){b(300)})})},{}],6:[function(){$.bigfoot.placeholder=function(){return $('<div class="loading"/>')},$.bigfoot.install("[data-ref]",function(){var a=$(this).attr("data-ref"),b=$(this).attr("data-ref-class");b||(b="active"),$(a).addClass(b)}),$.bigfoot.install(".focus",function(){$(this).focus()}),$.bigfoot.install("[data-set-focus]",function(){$(this).unbind(".bigfoot.setFocus").bind("click.bigfoot.setFocus",function(){$($(this).attr("data-set-focus")).focus()})}),$.bigfoot.install('a[rel="popup"]',function(){$(this).unbind("click.bigfoot.popup").bind("click.bigfoot.popup",function(a){var b=$(this),c=b.attr("href");return c?($.bigfoot.ibox.load(c),a.preventDefault(),!1):void 0})}),$.bigfoot.install("[data-show]",function(){var a=$(this);a.unbind(".bigfoot.show").bind("click.bigfoot.show",function(){$(a.attr("data-show")).show(0,function(){$(a.attr("data-set-focus")).focus()})})}),$.bigfoot.install("[data-hide]",function(){$(this).unbind(".bigfoot.hide").bind("click.bigfoot.hide",function(){$($(this).attr("data-hide")).hide()})})},{}],7:[function(){"use strict";$.bigfoot.install("form",function(){var a=$(this);a.bind("submit.bigfoot.forms",function(b){return b.preventDefault(),a.hasClass("readonly")?!1:(this.submit(),!1)}),a[0].handlers=[],a[0].executeHandlers=function(b){for(var c in a[0].handlers){var d=a[0].handlers[c],e=d.call(a[0],{params:b});if(e===!1)return!1}return!0}}),$.bigfoot.install("form.partial",function(){var a=$(this),b=a.hasClass("stay"),c=a.attr("action"),d=a.attr("method").toUpperCase(),e="multipart/form-data"==a.attr("enctype");a[0].submit=function(){if(!a.hasClass("readonly")){var f=$.bigfoot.placeholder(),g=$(".submits",a),h=g.height();g.hide(),f.insertAfter(g),f.height(h);var i=new FormData(a[0]);if(e)$.bigfoot.log(d+" "+c+" [multipart data]");else{if(i=$(":input:not(.exclude)",a).serializeArray(),i.push({name:"__",value:(new Date).getTime().toString()}),!a[0].executeHandlers(i))return g.show(),f.remove(),void 0;$.bigfoot.log(d+" "+c+" "+JSON.stringify(i))}if("GET"==d){var j=c+"?"+$.param(i);$.bigfoot.viewport.navigate(j)}else{var k={data:i,dataType:"json",url:c,type:d,cache:!1,success:function(c){a.trigger("postSubmit",c),$.bigfoot.ajax.processResponse(c,b),c.redirect||(g.show(),f.remove(),$("input[type='password'], .cleanup",a).val(""))},error:function(a){g.show(),f.remove(),$.bigfoot.ajax.processErrors(a)}};e&&(k.processData=!1,k.contentType=!1),$.ajax(k)}}}}),$.bigfoot.install("form :input.submit",function(){var a=$(this);a.unbind(".bigfoot.submit").bind("change.bigfoot.submit",function(){var b=a.parents("form");b.submit()})}),$.bigfoot.install("form a.submit",function(){var a=$(this);a.unbind(".bigfoot.submit").bind("click.bigfoot.submit",function(b){return a.parents("form").submit(),b.preventDefault(),!1})}),$.bigfoot.install("form[data-load-into]",function(){var a=$(this),b=$(a.attr("data-load-into")),c=a.attr("method"),d=a.attr("action");a[0].submit=function(){var e=$.bigfoot.placeholder(),f=$(".submits",a);f.hide(),b.empty().append(e);var g=$(":input:not(.exclude)",a).serializeArray();return g.push({name:"__",value:(new Date).getTime().toString()}),a[0].executeHandlers(g)?($.bigfoot.log(c+" "+d+" "+JSON.stringify(g)),$.ajax({data:g,dataType:"html",url:d,type:c,success:function(c){a.trigger("postSubmit",c),e.remove(),b.append(c),$.bigfoot.init(b)},error:function(a){e.remove(),f.show(),$.bigfoot.ajax.processErrors(a)}}),void 0):(f.show(),e.remove(),void 0)}}),$.bigfoot.msg["form.unload.warn"]="Warning! If you leave this page, all unsaved changes will be lost.",$.bigfoot.msg["viewportUnload.warn"]="Warning! If you continue, all unsaved changed will be lost. Are you sure you want to continue?",$.bigfoot.install("form.unload-warn",function(){function a(){var a=$(":input:not(.exclude)",b).serialize();b.data("initial-state",a)}var b=$(this);a(),b.bind("submit.bigfoot.unload-warn",a),$(window).unbind("beforeunload.bigfoot").bind("beforeunload.bigfoot.unload-warn",function(){var a=$("form.unload-warn").filter(function(){var a=$(this),b=$(":input:not(.exclude)",a).serialize(),c=a.data("initial-state");return b!=c&&a.is(":visible")});return a.size()>0?$.bigfoot.msg["form.unload.warn"]:void 0}),$(window).unbind("viewportUnload.bigfoot").bind("viewportUnload.bigfoot.unload-warn",function(a){var b=$("form.unload-warn").filter(function(){var a=$(this),b=$(":input:not(.exclude)",a).serialize(),c=a.data("initial-state");return b!=c});b.size()>0&&(confirm($.bigfoot.msg["viewportUnload.warn"])||a.preventDefault())})})},{}],8:[function(){$.bigfoot.install("[data-method][data-action]",function(){var a=$(this),b=a.attr("data-method").toUpperCase(),c=a.attr("data-action");a.click(function(d){return d.preventDefault(),$.bigfoot.viewport.showStandBy(),$.ajax({dataType:"json",url:c,data:{__:(new Date).getTime().toString()},type:b,success:function(b){a.trigger("postSubmit",b),$.bigfoot.ajax.processResponse(b),b.redirect||$.bigfoot.viewport.hideStandBy()},error:function(a){$.bigfoot.ajax.processErrors(a),$.bigfoot.viewport.hideStandBy()}}),!1})})},{}],9:[function(){$.bigfoot.install("a[data-load-into]",function(){var a=$(this),b=a.attr("href"),c=$(a.attr("data-load-into"));if(c.size()>0&&b){var d=a.attr("data-class"),e=a.attr("data-style");a.click(function(a){a.preventDefault();var f=$.bigfoot.placeholder(),g=$(window).scrollTop();return c.empty().append(f),$.ajax({dataType:"html",url:b,data:{__:(new Date).getTime().toString()},type:"get",success:function(a){var c=$("<div/>");c.attr("data-loaded",b),c.attr("class",d),c.attr("style",e),c.append(a),f.replaceWith(c).remove(),$(window).scrollTop(g),$.bigfoot.init(c)},error:function(){f.remove()}}),!1})}})},{}],10:[function(){$.bigfoot.isRetina=function(){var a="(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)";return window.devicePixelRatio>1?!0:window.matchMedia&&window.matchMedia(a).matches},$.bigfoot.install("img.retina",function(){function a(){var a=b.width(),c=b.height();b.attr("src",b.attr("src").replace(/\.([^.]+)$/,"@2X.$1")),b.attr("width",a),b.attr("height",c)}var b=$(this);$.bigfoot.isRetina()&&(b[0].complete?a():b.one("load.bigfoot.retina",a))})},{}],11:[function(){$.bigfoot.install("[data-load]",function(){function a(){clearTimeout(c),c=setTimeout(function(){var a=e.scrollTop()+e.height();d.offset().top<a&&b()},200)}function b(){e.unbind(g);var a=d[0].tagName.toLowerCase(),b="<"+a+"></"+a+">",c=$.bigfoot.placeholder(),h=d.attr("class"),i=d.attr("style");d.replaceWith(c).remove(),$.ajax({dataType:"html",url:f,data:{__:(new Date).getTime().toString()},type:"get",success:function(a){$.bigfoot.log("Loaded "+f);var d=$(b);d.attr("data-loaded",f),d.attr("class",h),d.attr("style",i),d.append(a),c.replaceWith(d).remove(),$.bigfoot.init(d)},error:function(){$.bigfoot.log("Failed to load "+f),c.remove()}})}var c,d=$(this),e=$(window),f=d.attr("data-load"),g="scroll.bigfoot.scrollLoad-"+$.sha256(f);e.unbind(g).bind(g,a),$(a)})},{}],12:[function(){$.bigfoot.install("[data-sticky]",function(){function a(){var a=j.css("float"),i="left"==a||"right"==a;m!=i&&j.removeAttr("style"),m=i,c=0,d=l.scrollTop(),e=l.height(),f=j.height(),g=k.offset().top,h=g+k.height(),b()}function b(){if(m){var a=c,b=l.scrollTop(),d=b+e,k=Math.max(b+16,g)-g,n=Math.min(d-16,h)-g,o=e>f&&n>k+f;k>c&&c+f>n||(c>k||o?a=k:n>c+f&&(a=n-f),a!=c&&(c=a,i.style.webkitTransform=i.style.MozTransform=i.style.msTransform=i.style.OTransform=i.style.transform="translateY("+c+"px)"),0==a?j.addClass("atTop"):j.removeClass("atTop"))}}var c,d,e,f,g,h,i=this,j=$(this),k=$(this.parentNode),l=$(window),m=!0;a(),l.resizeStop(a),l.scrollAnim(b)})},{}],13:[function(){$.bigfoot.switcher={hideAll:function(a){$(".switch-target").filter(function(){return this!=a}).hide(),$("[data-switch]").each(function(){var a=$(this),b=a.attr("data-switch-class");b||(b="active"),a.removeClass(b)})}},$(function(){$("html").bind("click.bigfoot.switcher",function(){$.bigfoot.switcher.hideAll()})}),$.bigfoot.install("[data-switch]",function(){function a(){f.is(":visible")?d.addClass(e):d.removeClass(e)}function b(){f.toggle(0,a)}function c(){f.hide(0,a)}var d=$(this),e=d.attr("data-switch-class");e||(e="active");var f=$(d.attr("data-switch"));f.addClass("switch-target"),d.hasClass("switch-stay")&&f.click(function(a){a.stopPropagation()}),a(),d.unbind(".bigfoot.switch").bind("click.bigfoot.switch",function(a){return a.preventDefault(),$.bigfoot.switcher.hideAll(f[0]),b(),!1}),$(d).find(".close").unbind(".bigfoot.switch").bind("click.bigfoot.switch",function(a){return a.preventDefault(),c(),!1})})},{}],14:[function(){$.bigfoot.install(".toggler",function(){function a(){d.each(function(){var a=$(this),b=$(a.attr("data-for"));b.is(":visible")?a.addClass(e):a.removeClass(e)})}function b(){d.each(function(){$($(this).attr("data-for")).hide()})}var c=$(this),d=$("*[data-for]",c),e=c.attr("data-toggler-class");e||(e="active"),d.unbind(".bigfoot.toggler").bind("click.bigfoot.toggler",function(c){c.preventDefault();var d=$(this);return b(),$(d.attr("data-for")).show(),a(),!1});var f=d.filter("."+e);0==f.size()?a():(b(),$(f.attr("data-for")).show())})},{}],15:[function(){"use strict";$.bigfoot.msg.Close="Close",$.bigfoot.ibox={get:function(){return this.init(),$("#ibox")},init:function(){var a=this,b=$("#ibox");b.size()>0||(b=$('<div id="ibox"></div>'),b.hide(),$("body").prepend(b),$(window).unbind(".ibox").bind("keydown.ibox",function(b){27==b.keyCode&&a.close()}),b.bind("click.ibox",function(){a.close()}))},close:function(){var a=$("#ibox");$("iframe",a).remove(),a.fadeOut(300,function(){$(this).remove()})},isVisible:function(){return $("#ibox").is(":visible")},show:function(a){var b=this,c=$(a),d=$.Event("viewportUnload");if($(window).trigger(d),!d.isDefaultPrevented()){var e=this.get().empty(),f=$('<div id="ibox-wrapper"></div>');f.append(c),e.append(f);var g=$('<div id="ibox-close"></div>');g.attr("title",$.bigfoot.msg.Close),f.append(g),e.fadeIn(300,function(){$("body").animate({scrollTop:e.offset().top},300),e.trigger("ibox_load"),$.bigfoot.init(f),f.unbind(".ibox").bind("click.ibox",function(a){a.stopPropagation()}),$("a.close",c).add(g).bind("click.ibox",function(a){return b.close(),a.preventDefault(),!1})})}},load:function(a){var b=this;$.ajax({url:a,dataType:"html",type:"GET",data:{__:(new Date).getTime().toString()},success:function(a){b.show(a)},error:$.bigfoot.ajax.processErrors})}}},{}],16:[function(){$.fn.lookup=function(a){if(!a)return this;var b=this.find(a);return this.is(a)?b.add(this):b},$.fn.insertAt=function(a,b){var c=this.children().size();return 0>a&&(a=Math.max(0,c+1+a)),this.append(b),c>a&&this.children().eq(a).before(this.children().last()),this},$.fn.insertAtCaret=function(a){return this.each(function(){if(document.selection){this.focus();var b=document.selection.createRange();b.text=a,this.focus()}else if("undefined"!=typeof this.selectionStart){var c=this.selectionStart,d=this.selectionEnd,e=this.scrollTop;this.value=this.value.substring(0,c)+a+this.value.substring(d,this.value.length),this.focus(),this.selectionStart=c+a.length,this.selectionEnd=c+a.length,this.scrollTop=e}else this.value+=a,this.focus()})},$.fn.scrollTo=function(){var a=-1;this.each(function(){a=$(this).offset().top}),a>=0&&$("html, body").animate({scrollTop:a},300)},$.fn.shuffle=function(){function a(a){return Math.floor(Math.random()*a)}var b=this.get(),c=$.map(b,function(){var c=a(b.length),d=$(b[c]).clone(!0)[0];return b.splice(c,1),d});return this.each(function(a){$(this).replaceWith($(c[a]))}),$(c)},$.fn.scrollStop=function(a){var b;$(this).bind("scroll.scrollStop",function(c){var d=this;clearTimeout(b),b=setTimeout(function(){a.call(d,c)},100)})},$.fn.resizeStop=function(a){var b;$(this).bind("resize.resizeStop",function(c){var d=this;clearTimeout(b),b=setTimeout(function(){a.call(d,c)},100)})},$.fn.scrollAnim=function(a){function b(b){c||d(function(){c=!1,a(b)}),c=!0}var c=!1,d=window.requestAnimationFrame;return"function"!=typeof d?$(this).scroll(a):$(this).bind("scroll",b)}},{}],17:[function(){!function(a){var b=8,c=function(a,b){var c=(65535&a)+(65535&b),d=(a>>16)+(b>>16)+(c>>16);return d<<16|65535&c},d=function(a,b){return a>>>b|a<<32-b},e=function(a,b){return a>>>b},f=function(a,b,c){return a&b^~a&c},g=function(a,b,c){return a&b^a&c^b&c},h=function(a){return d(a,2)^d(a,13)^d(a,22)},i=function(a){return d(a,6)^d(a,11)^d(a,25)},j=function(a){return d(a,7)^d(a,18)^e(a,3)},k=function(a){return d(a,17)^d(a,19)^e(a,10)},l=function(a,b){var d,e,l,m,n,o,p,q,r,s,t,u,v=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),w=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),x=new Array(64);a[b>>5]|=128<<24-b%32,a[(b+64>>9<<4)+15]=b;for(var r=0;r<a.length;r+=16){d=w[0],e=w[1],l=w[2],m=w[3],n=w[4],o=w[5],p=w[6],q=w[7];for(var s=0;64>s;s++)x[s]=16>s?a[s+r]:c(c(c(k(x[s-2]),x[s-7]),j(x[s-15])),x[s-16]),t=c(c(c(c(q,i(n)),f(n,o,p)),v[s]),x[s]),u=c(h(d),g(d,e,l)),q=p,p=o,o=n,n=c(m,t),m=l,l=e,e=d,d=c(t,u);w[0]=c(d,w[0]),w[1]=c(e,w[1]),w[2]=c(l,w[2]),w[3]=c(m,w[3]),w[4]=c(n,w[4]),w[5]=c(o,w[5]),w[6]=c(p,w[6]),w[7]=c(q,w[7])}return w},m=function(a){for(var c=Array(),d=(1<<b)-1,e=0;e<a.length*b;e+=b)c[e>>5]|=(a.charCodeAt(e/b)&d)<<24-e%32;return c},n=function(a){for(var b="0123456789abcdef",c="",d=0;d<4*a.length;d++)c+=b.charAt(a[d>>2]>>8*(3-d%4)+4&15)+b.charAt(a[d>>2]>>8*(3-d%4)&15);return c},o=function(a,c){var d=m(a);d.length>16&&(d=core_sha1(d,a.length*b));for(var e=Array(16),f=Array(16),g=0;16>g;g++)e[g]=909522486^d[g],f[g]=1549556828^d[g];var h=l(e.concat(m(c)),512+c.length*b);return l(f.concat(h),768)},p=function(b){return b="object"==typeof b?a(b).val():b.toString()};a.extend({sha256:function(a){return a=p(a),n(l(m(a),a.length*b))},sha256hmac:function(a,b){return a=p(a),b=p(b),n(o(a,b))},sha256config:function(a){b=parseInt(a)||8}}),a.fn.sha256=function(b){a.sha256config(b);var c=p(a(this).val()),d=a.sha256(c);return a.sha256config(8),d}}(jQuery)},{}],18:[function(){$.bigfoot.notices={timeout:function(){var a=$.bigfoot.settings.notices||{};return a.timeout||1e4},container:function(){return $("#notices")},hasErrors:function(){return $(".notice.error:not(:animated)",this.container()).size()>0},stash:function(){if(window.sessionStorage){var a=this.container();$(".notice:animated",a).remove(),window.sessionStorage.setItem("bigfoot.notices",a.html()),a.empty()}return this},unstash:function(){var a=this;if(window.sessionStorage){var b=window.sessionStorage.getItem("bigfoot.notices");b&&(a.container().append(b),window.sessionStorage.removeItem("bigfoot.notices"),$(".notice",a.container()).each(function(){a.initElem(this)}))}return this},initElem:function(a){var b=this,c=$(a);$(".hide",c).remove();var d=$("<span class='hide'/>");d.bind("click.bigfoot.notices",function(){b.dispose(c)}),c.prepend(d),setTimeout(function(){b.dispose(c)},this.timeout())},mkElem:function(a){var b=a.kind,c=a.msg.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"),d=$('<div class="notice '+b+'">'+c+"</div>");return this.initElem(d),d},add:function(a){return this.container().append(this.mkElem(a)),this},error:function(a){return this.add({kind:"error",msg:a})},warn:function(a){return this.add({kind:"warn",msg:a})},info:function(a){return this.add({kind:"info",msg:a})},addAll:function(a){if(a&&a.notices)for(var b in a.notices)this.add(a.notices[b]);return this},clear:function(){return this.dispose($(".notice",this.container()))},dispose:function(a){return a.fadeOut("fast",function(){$(this).remove()}),this}},window.addEventListener("keydown",function(a){27==a.keyCode&&$.bigfoot.notices.clear()}),$(function(){$.bigfoot.notices.unstash()})},{}],19:[function(){"use strict";$.bigfoot.msg.standby="Please wait...";var a="function"==typeof history.pushState;a&&$(function(){window.addEventListener("popstate",function(a){if(a.state){var b=a.state.id;b&&b==$.bigfoot.viewport.id()?$.bigfoot.viewport.load(location.href):location.reload(!0)}},!1)}),$.bigfoot.viewport={id:function(){var a=this.container(),b=a.attr("data-viewport-id");if(b)return b;var c=Math.random().toString();return a.attr("data-viewport-id",c),c},container:function(){return $("#viewport")},timeout:function(){var a=$.bigfoot.settings.viewport||{};return a.timeout||500},showStandBy:function(){var a=$("#viewport-standby");0==a.size()&&(a=$('<div id="viewport-standby"></div>'),a.hide(),a.append('<div class="message">'+$.bigfoot.msg.standby+"</div>")),$("body").append(a),this._standByTimer=setTimeout(function(){a.fadeIn(300)},this.timeout())},hideStandBy:function(){clearTimeout(this._standByTimer),$("#viewport-standby").remove()},load:function(a){var b=this,c=$.Event("viewportUnload");$(window).trigger(c),c.isDefaultPrevented()||(b.showStandBy(),$.ajax({url:a,headers:{"X-Render-Mode":"partial-viewport"},dataType:"html",data:{__:(new Date).getTime().toString()},type:"GET",success:function(a){var c=b.id(),d=$(a);"viewport"!=d.attr("id")&&(d=$('<div id="viewport"/>').append(d)),d.attr("data-viewport-id",c),b.hideStandBy(),b.container().replaceWith(d).remove(),$("a[rel='partial']").removeClass("active"),$.bigfoot.init(d);var e=$("title",d);e.size()>0&&($("head title").text(e.text()),e.remove()),$("body").trigger("viewportLoad"),b.scrollToAnchor()},error:function(a){$.bigfoot.ajax.processErrors(a),b.hideStandBy()}}))},navigate:function(b,c){if(a){var d=$.bigfoot.viewport.id();window.history.replaceState({id:d},"",location.href),c?window.history.replaceState({id:d},"",b):window.history.pushState({id:d},"",b),this.load(b)}else $.bigfoot.notices.stash(),c?window.location.replace(b):window.location.href=b},scrollToAnchor:function(){var a=location.href.replace(/.*?(?=#|$)/,""),b=$(a);0==b.size()&&(b=$(".viewport-anchor").first()),b.scrollTo()}},a&&$.bigfoot.install("a[rel='partial']",function(){var a=$(this);"popup"!=a.attr("rel")&&"_blank"!=a.attr("target")&&(a.addClass("partial-link"),a.unbind(".bigfoot.partial-link").bind("click.bigfoot.partial-link",function(a){if(0!=a.button||a.metaKey||a.ctrlKey)return!0;a.preventDefault();var b=$(this).attr("href");return $.bigfoot.viewport.navigate(b),!1}))})},{}]},{},[3]); |
@@ -600,5 +600,2 @@ ;(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | ||
var updating = false | ||
, raf = window.requestAnimationFrame; | ||
var oldY, viewTop, windowHeight, stickyHeight, parentTop, parentBottom; | ||
@@ -623,16 +620,7 @@ | ||
function onScroll() { | ||
function update() { | ||
if (!enabled) | ||
return; | ||
viewTop = $wnd.scrollTop(); | ||
requestUpdate(); | ||
} | ||
function requestUpdate() { | ||
if (!updating) raf(update); | ||
updating = true; | ||
} | ||
function update() { | ||
var newY = oldY | ||
, viewTop = $wnd.scrollTop() | ||
, viewBottom = viewTop + windowHeight | ||
@@ -642,3 +630,2 @@ , boundTop = Math.max(viewTop + 16, parentTop) - parentTop | ||
, alwaysAtTop = stickyHeight < windowHeight && boundTop + stickyHeight < boundBottom; | ||
updating = false; | ||
if (boundTop > oldY && boundBottom < oldY + stickyHeight) | ||
@@ -667,3 +654,3 @@ return; | ||
$wnd.resizeStop(reinit); | ||
$wnd.scroll(onScroll); | ||
$wnd.scrollAnim(update); | ||
@@ -1011,2 +998,25 @@ }); | ||
// Events on scroll per animation frame | ||
$.fn.scrollAnim = function(cb) { | ||
var updating = false | ||
, raf = window.requestAnimationFrame; | ||
if (typeof raf != 'function') | ||
return $(this).scroll(cb); | ||
function onScroll(ev) { | ||
if (!updating) | ||
raf(function() { | ||
updating = false; | ||
cb(ev); | ||
}); | ||
updating = true; | ||
} | ||
return $(this).bind('scroll', onScroll); | ||
}; | ||
},{}],17:[function(require,module,exports){ | ||
@@ -1013,0 +1023,0 @@ (function(f){var m=8;var k=function(q,t){var s=(q&65535)+(t&65535);var r=(q>>16)+(t>>16)+(s>>16);return(r<<16)|(s&65535)};var e=function(r,q){return(r>>>q)|(r<<(32-q))};var g=function(r,q){return(r>>>q)};var a=function(q,s,r){return((q&s)^((~q)&r))};var d=function(q,s,r){return((q&s)^(q&r)^(s&r))};var h=function(q){return(e(q,2)^e(q,13)^e(q,22))};var b=function(q){return(e(q,6)^e(q,11)^e(q,25))};var p=function(q){return(e(q,7)^e(q,18)^g(q,3))};var l=function(q){return(e(q,17)^e(q,19)^g(q,10))};var c=function(r,s){var E=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298);var t=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225);var q=new Array(64);var G,F,D,C,A,y,x,w,v,u;var B,z;r[s>>5]|=128<<(24-s%32);r[((s+64>>9)<<4)+15]=s;for(var v=0;v<r.length;v+=16){G=t[0];F=t[1];D=t[2];C=t[3];A=t[4];y=t[5];x=t[6];w=t[7];for(var u=0;u<64;u++){if(u<16){q[u]=r[u+v]}else{q[u]=k(k(k(l(q[u-2]),q[u-7]),p(q[u-15])),q[u-16])}B=k(k(k(k(w,b(A)),a(A,y,x)),E[u]),q[u]);z=k(h(G),d(G,F,D));w=x;x=y;y=A;A=k(C,B);C=D;D=F;F=G;G=k(B,z)}t[0]=k(G,t[0]);t[1]=k(F,t[1]);t[2]=k(D,t[2]);t[3]=k(C,t[3]);t[4]=k(A,t[4]);t[5]=k(y,t[5]);t[6]=k(x,t[6]);t[7]=k(w,t[7])}return t};var j=function(t){var s=Array();var q=(1<<m)-1;for(var r=0;r<t.length*m;r+=m){s[r>>5]|=(t.charCodeAt(r/m)&q)<<(24-r%32)}return s};var n=function(s){var r="0123456789abcdef";var t="";for(var q=0;q<s.length*4;q++){t+=r.charAt((s[q>>2]>>((3-q%4)*8+4))&15)+r.charAt((s[q>>2]>>((3-q%4)*8))&15)}return t};var o=function(s,v){var u=j(s);if(u.length>16){u=core_sha1(u,s.length*m)}var q=Array(16),t=Array(16);for(var r=0;r<16;r++){q[r]=u[r]^909522486;t[r]=u[r]^1549556828}var w=c(q.concat(j(v)),512+v.length*m);return c(t.concat(w),512+256)};var i=function(q){q=typeof q=="object"?f(q).val():q.toString();return q};f.extend({sha256:function(q){q=i(q);return n(c(j(q),q.length*m))},sha256hmac:function(q,r){q=i(q);r=i(r);return n(o(q,r))},sha256config:function(q){m=parseInt(q)||8}});f.fn.sha256=function(r){f.sha256config(r);var q=i(f(this).val());var s=f.sha256(q);f.sha256config(8);return s}})(jQuery); |
@@ -1,2 +0,2 @@ | ||
/*! Bigfoot v.1.1.10 */ | ||
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(){$.bigfoot.msg["ajax.authRequired"]="You need to login to continue.",$.bigfoot.msg["ajax.accessDenied"]="You have insufficient permissions to access the resource.",$.bigfoot.msg["ajax.failed"]="Your request could not be processed. Please contact technical support.",$.bigfoot.msg["ajax.tooLarge"]="Your request exceeds the size limit.",$.bigfoot.ajax={processResponse:function(a,b){$.bigfoot.notices.clear(),$.bigfoot.notices.addAll(a),a.redirect&&!b&&($.bigfoot.notices.stash(),window.location.replace(a.redirect))},processErrors:function(a){switch(a.status){case 0:return!0;case 401:$.bigfoot.notices.warn($.bigfoot.msg["ajax.authRequired"]);break;case 403:$.bigfoot.notices.error($.bigfoot.msg["ajax.accessDenied"]);break;case 413:$.bigfoot.notices.error($.bigfoot.msg["ajax.tooLarge"]);break;default:$.bigfoot.notices.error($.bigfoot.msg["ajax.failed"])}return!1}}},{}],2:[function(){$.bigfoot={settings:{},msg:{},log:function(a){"undefined"!=typeof console&&"function"==typeof console.log&&console.log(a)},queue:[],init:function(a){this.queue.forEach(function(b){a.lookup(b.selector).each(b.fn)})},install:function(a,b){return this.queue.push({selector:a,fn:b}),this},installLast:this.install,installFirst:function(a,b){return this.queue.unshift({selector:a,fn:b}),this},installBefore:function(a,b,c){for(var d=0;d<this.queue.length&&this.queue[d].selector!=a;d++);return this.queue.splice(d,0,{selector:b,fn:c}),this},installAfter:function(a,b,c){for(var d=0;d<this.queue.length&&this.queue[d].selector!=a;d++);d==this.queue.length?this.installLast(b,c):this.queue.splice(d+1,0,{selector:b,fn:c})},replace:function(a,b){for(var c=0;c<this.queue.length&&this.queue[c].selector!=a;c++);c==this.queue.length?$.bigfoot.log("Replacing “"+a+"” failed. Try installing instead."):this.queue.splice(c,1,{selector:a,fn:b})}}},{}],3:[function(a){a("../jquery-ext"),a("../jquery-sha256"),a("../bigfoot"),a("../notices"),a("../viewport"),a("../ajax"),a("../ibox"),a("../components/commons"),a("../components/forms"),a("../components/switch"),a("../components/toggler"),a("../components/scroll-load"),a("../components/checkbox-toggle"),a("../components/retina"),a("../components/load-into"),a("../components/lightform"),a("../components/sticky")},{"../ajax":1,"../bigfoot":2,"../components/checkbox-toggle":5,"../components/commons":6,"../components/forms":7,"../components/lightform":8,"../components/load-into":9,"../components/retina":10,"../components/scroll-load":11,"../components/sticky":12,"../components/switch":13,"../components/toggler":14,"../ibox":15,"../jquery-ext":16,"../jquery-sha256":17,"../notices":18,"../viewport":19}],4:[function(a){!function(){a("./modules")}(jQuery)},{"./modules":3}],5:[function(){$.bigfoot.install('input[type="checkbox"][data-toggle]',function(){function a(){"false"==localStorage.getItem(e)?c.removeAttr("checked"):"true"==localStorage.getItem(e)&&c.attr("checked","checked"),b(0)}function b(a){var b=c.is(":checked");localStorage.setItem(e,b);var f=$(d);b?f.fadeIn(a):f.fadeOut(a)}var c=$(this),d=c.attr("data-toggle"),e=c.attr("data-key")||"bigfoot.toggle("+d+")";a(),c.unbind(".bigfoot.toggle").bind("change.bigfoot.toggle",function(){b(300)})})},{}],6:[function(){$.bigfoot.placeholder=function(){return $('<div class="loading"/>')},$.bigfoot.install("[data-ref]",function(){var a=$(this).attr("data-ref"),b=$(this).attr("data-ref-class");b||(b="active"),$(a).addClass(b)}),$.bigfoot.install(".focus",function(){$(this).focus()}),$.bigfoot.install("[data-set-focus]",function(){$(this).unbind(".bigfoot.setFocus").bind("click.bigfoot.setFocus",function(){$($(this).attr("data-set-focus")).focus()})}),$.bigfoot.install('a[rel="popup"]',function(){$(this).unbind("click.bigfoot.popup").bind("click.bigfoot.popup",function(a){var b=$(this),c=b.attr("href");return c?($.bigfoot.ibox.load(c),a.preventDefault(),!1):void 0})}),$.bigfoot.install("[data-show]",function(){var a=$(this);a.unbind(".bigfoot.show").bind("click.bigfoot.show",function(){$(a.attr("data-show")).show(0,function(){$(a.attr("data-set-focus")).focus()})})}),$.bigfoot.install("[data-hide]",function(){$(this).unbind(".bigfoot.hide").bind("click.bigfoot.hide",function(){$($(this).attr("data-hide")).hide()})})},{}],7:[function(){"use strict";$.bigfoot.install("form",function(){var a=$(this);a.bind("submit.bigfoot.forms",function(b){return b.preventDefault(),a.hasClass("readonly")?!1:(this.submit(),!1)}),a[0].handlers=[],a[0].executeHandlers=function(b){for(var c in a[0].handlers){var d=a[0].handlers[c],e=d.call(a[0],{params:b});if(e===!1)return!1}return!0}}),$.bigfoot.install("form.partial",function(){var a=$(this),b=a.hasClass("stay"),c=a.attr("action"),d=a.attr("method").toUpperCase(),e="multipart/form-data"==a.attr("enctype");a[0].submit=function(){if(!a.hasClass("readonly")){var f=$.bigfoot.placeholder(),g=$(".submits",a),h=g.height();g.hide(),f.insertAfter(g),f.height(h);var i=new FormData(a[0]);if(e)$.bigfoot.log(d+" "+c+" [multipart data]");else{if(i=$(":input:not(.exclude)",a).serializeArray(),i.push({name:"__",value:(new Date).getTime().toString()}),!a[0].executeHandlers(i))return g.show(),f.remove(),void 0;$.bigfoot.log(d+" "+c+" "+JSON.stringify(i))}if("GET"==d){var j=c+"?"+$.param(i);$.bigfoot.viewport.navigate(j)}else{var k={data:i,dataType:"json",url:c,type:d,cache:!1,success:function(c){a.trigger("postSubmit",c),$.bigfoot.ajax.processResponse(c,b),c.redirect||(g.show(),f.remove(),$("input[type='password'], .cleanup",a).val(""))},error:function(a){g.show(),f.remove(),$.bigfoot.ajax.processErrors(a)}};e&&(k.processData=!1,k.contentType=!1),$.ajax(k)}}}}),$.bigfoot.install("form :input.submit",function(){var a=$(this);a.unbind(".bigfoot.submit").bind("change.bigfoot.submit",function(){var b=a.parents("form");b.submit()})}),$.bigfoot.install("form a.submit",function(){var a=$(this);a.unbind(".bigfoot.submit").bind("click.bigfoot.submit",function(b){return a.parents("form").submit(),b.preventDefault(),!1})}),$.bigfoot.install("form[data-load-into]",function(){var a=$(this),b=$(a.attr("data-load-into")),c=a.attr("method"),d=a.attr("action");a[0].submit=function(){var e=$.bigfoot.placeholder(),f=$(".submits",a);f.hide(),b.empty().append(e);var g=$(":input:not(.exclude)",a).serializeArray();return g.push({name:"__",value:(new Date).getTime().toString()}),a[0].executeHandlers(g)?($.bigfoot.log(c+" "+d+" "+JSON.stringify(g)),$.ajax({data:g,dataType:"html",url:d,type:c,success:function(c){a.trigger("postSubmit",c),e.remove(),b.append(c),$.bigfoot.init(b)},error:function(a){e.remove(),f.show(),$.bigfoot.ajax.processErrors(a)}}),void 0):(f.show(),e.remove(),void 0)}}),$.bigfoot.msg["form.unload.warn"]="Warning! If you leave this page, all unsaved changes will be lost.",$.bigfoot.msg["viewportUnload.warn"]="Warning! If you continue, all unsaved changed will be lost. Are you sure you want to continue?",$.bigfoot.install("form.unload-warn",function(){function a(){var a=$(":input:not(.exclude)",b).serialize();b.data("initial-state",a)}var b=$(this);a(),b.bind("submit.bigfoot.unload-warn",a),$(window).unbind("beforeunload.bigfoot").bind("beforeunload.bigfoot.unload-warn",function(){var a=$("form.unload-warn").filter(function(){var a=$(this),b=$(":input:not(.exclude)",a).serialize(),c=a.data("initial-state");return b!=c&&a.is(":visible")});return a.size()>0?$.bigfoot.msg["form.unload.warn"]:void 0}),$(window).unbind("viewportUnload.bigfoot").bind("viewportUnload.bigfoot.unload-warn",function(a){var b=$("form.unload-warn").filter(function(){var a=$(this),b=$(":input:not(.exclude)",a).serialize(),c=a.data("initial-state");return b!=c});b.size()>0&&(confirm($.bigfoot.msg["viewportUnload.warn"])||a.preventDefault())})})},{}],8:[function(){$.bigfoot.install("[data-method][data-action]",function(){var a=$(this),b=a.attr("data-method").toUpperCase(),c=a.attr("data-action");a.click(function(d){return d.preventDefault(),$.bigfoot.viewport.showStandBy(),$.ajax({dataType:"json",url:c,data:{__:(new Date).getTime().toString()},type:b,success:function(b){a.trigger("postSubmit",b),$.bigfoot.ajax.processResponse(b),b.redirect||$.bigfoot.viewport.hideStandBy()},error:function(a){$.bigfoot.ajax.processErrors(a),$.bigfoot.viewport.hideStandBy()}}),!1})})},{}],9:[function(){$.bigfoot.install("a[data-load-into]",function(){var a=$(this),b=a.attr("href"),c=$(a.attr("data-load-into"));if(c.size()>0&&b){var d=a.attr("data-class"),e=a.attr("data-style");a.click(function(a){a.preventDefault();var f=$.bigfoot.placeholder(),g=$(window).scrollTop();return c.empty().append(f),$.ajax({dataType:"html",url:b,data:{__:(new Date).getTime().toString()},type:"get",success:function(a){var c=$("<div/>");c.attr("data-loaded",b),c.attr("class",d),c.attr("style",e),c.append(a),f.replaceWith(c).remove(),$(window).scrollTop(g),$.bigfoot.init(c)},error:function(){f.remove()}}),!1})}})},{}],10:[function(){$.bigfoot.isRetina=function(){var a="(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)";return window.devicePixelRatio>1?!0:window.matchMedia&&window.matchMedia(a).matches},$.bigfoot.install("img.retina",function(){function a(){var a=b.width(),c=b.height();b.attr("src",b.attr("src").replace(/\.([^.]+)$/,"@2X.$1")),b.attr("width",a),b.attr("height",c)}var b=$(this);$.bigfoot.isRetina()&&(b[0].complete?a():b.one("load.bigfoot.retina",a))})},{}],11:[function(){$.bigfoot.install("[data-load]",function(){function a(){clearTimeout(c),c=setTimeout(function(){var a=e.scrollTop()+e.height();d.offset().top<a&&b()},200)}function b(){e.unbind(g);var a=d[0].tagName.toLowerCase(),b="<"+a+"></"+a+">",c=$.bigfoot.placeholder(),h=d.attr("class"),i=d.attr("style");d.replaceWith(c).remove(),$.ajax({dataType:"html",url:f,data:{__:(new Date).getTime().toString()},type:"get",success:function(a){$.bigfoot.log("Loaded "+f);var d=$(b);d.attr("data-loaded",f),d.attr("class",h),d.attr("style",i),d.append(a),c.replaceWith(d).remove(),$.bigfoot.init(d)},error:function(){$.bigfoot.log("Failed to load "+f),c.remove()}})}var c,d=$(this),e=$(window),f=d.attr("data-load"),g="scroll.bigfoot.scrollLoad-"+$.sha256(f);e.unbind(g).bind(g,a),$(a)})},{}],12:[function(){$.bigfoot.install("[data-sticky]",function(){function a(){var a=l.css("float"),b="left"==a||"right"==a;o!=b&&l.removeAttr("style"),o=b,e=0,f=n.scrollTop(),g=n.height(),h=l.height(),i=m.offset().top,j=i+m.height(),d()}function b(){o&&(f=n.scrollTop(),c())}function c(){p||q(d),p=!0}function d(){var a=e,b=f+g,c=Math.max(f+16,i)-i,d=Math.min(b-16,j)-i,m=g>h&&d>c+h;p=!1,c>e&&e+h>d||(e>c||m?a=c:d>e+h&&(a=d-h),a!=e&&(e=a,k.style.webkitTransform=k.style.MozTransform=k.style.msTransform=k.style.OTransform=k.style.transform="translateY("+e+"px)"),0==a?l.addClass("atTop"):l.removeClass("atTop"))}var e,f,g,h,i,j,k=this,l=$(this),m=$(this.parentNode),n=$(window),o=!0,p=!1,q=window.requestAnimationFrame;a(),n.resizeStop(a),n.scroll(b)})},{}],13:[function(){$.bigfoot.switcher={hideAll:function(a){$(".switch-target").filter(function(){return this!=a}).hide(),$("[data-switch]").each(function(){var a=$(this),b=a.attr("data-switch-class");b||(b="active"),a.removeClass(b)})}},$(function(){$("html").bind("click.bigfoot.switcher",function(){$.bigfoot.switcher.hideAll()})}),$.bigfoot.install("[data-switch]",function(){function a(){f.is(":visible")?d.addClass(e):d.removeClass(e)}function b(){f.toggle(0,a)}function c(){f.hide(0,a)}var d=$(this),e=d.attr("data-switch-class");e||(e="active");var f=$(d.attr("data-switch"));f.addClass("switch-target"),d.hasClass("switch-stay")&&f.click(function(a){a.stopPropagation()}),a(),d.unbind(".bigfoot.switch").bind("click.bigfoot.switch",function(a){return a.preventDefault(),$.bigfoot.switcher.hideAll(f[0]),b(),!1}),$(d).find(".close").unbind(".bigfoot.switch").bind("click.bigfoot.switch",function(a){return a.preventDefault(),c(),!1})})},{}],14:[function(){$.bigfoot.install(".toggler",function(){function a(){d.each(function(){var a=$(this),b=$(a.attr("data-for"));b.is(":visible")?a.addClass(e):a.removeClass(e)})}function b(){d.each(function(){$($(this).attr("data-for")).hide()})}var c=$(this),d=$("*[data-for]",c),e=c.attr("data-toggler-class");e||(e="active"),d.unbind(".bigfoot.toggler").bind("click.bigfoot.toggler",function(c){c.preventDefault();var d=$(this);return b(),$(d.attr("data-for")).show(),a(),!1});var f=d.filter("."+e);0==f.size()?a():(b(),$(f.attr("data-for")).show())})},{}],15:[function(){"use strict";$.bigfoot.msg.Close="Close",$.bigfoot.ibox={get:function(){return this.init(),$("#ibox")},init:function(){var a=this,b=$("#ibox");b.size()>0||(b=$('<div id="ibox"></div>'),b.hide(),$("body").prepend(b),$(window).unbind(".ibox").bind("keydown.ibox",function(b){27==b.keyCode&&a.close()}),b.bind("click.ibox",function(){a.close()}))},close:function(){var a=$("#ibox");$("iframe",a).remove(),a.fadeOut(300,function(){$(this).remove()})},isVisible:function(){return $("#ibox").is(":visible")},show:function(a){var b=this,c=$(a),d=$.Event("viewportUnload");if($(window).trigger(d),!d.isDefaultPrevented()){var e=this.get().empty(),f=$('<div id="ibox-wrapper"></div>');f.append(c),e.append(f);var g=$('<div id="ibox-close"></div>');g.attr("title",$.bigfoot.msg.Close),f.append(g),e.fadeIn(300,function(){$("body").animate({scrollTop:e.offset().top},300),e.trigger("ibox_load"),$.bigfoot.init(f),f.unbind(".ibox").bind("click.ibox",function(a){a.stopPropagation()}),$("a.close",c).add(g).bind("click.ibox",function(a){return b.close(),a.preventDefault(),!1})})}},load:function(a){var b=this;$.ajax({url:a,dataType:"html",type:"GET",data:{__:(new Date).getTime().toString()},success:function(a){b.show(a)},error:$.bigfoot.ajax.processErrors})}}},{}],16:[function(){$.fn.lookup=function(a){if(!a)return this;var b=this.find(a);return this.is(a)?b.add(this):b},$.fn.insertAt=function(a,b){var c=this.children().size();return 0>a&&(a=Math.max(0,c+1+a)),this.append(b),c>a&&this.children().eq(a).before(this.children().last()),this},$.fn.insertAtCaret=function(a){return this.each(function(){if(document.selection){this.focus();var b=document.selection.createRange();b.text=a,this.focus()}else if("undefined"!=typeof this.selectionStart){var c=this.selectionStart,d=this.selectionEnd,e=this.scrollTop;this.value=this.value.substring(0,c)+a+this.value.substring(d,this.value.length),this.focus(),this.selectionStart=c+a.length,this.selectionEnd=c+a.length,this.scrollTop=e}else this.value+=a,this.focus()})},$.fn.scrollTo=function(){var a=-1;this.each(function(){a=$(this).offset().top}),a>=0&&$("html, body").animate({scrollTop:a},300)},$.fn.shuffle=function(){function a(a){return Math.floor(Math.random()*a)}var b=this.get(),c=$.map(b,function(){var c=a(b.length),d=$(b[c]).clone(!0)[0];return b.splice(c,1),d});return this.each(function(a){$(this).replaceWith($(c[a]))}),$(c)},$.fn.scrollStop=function(a){var b;$(this).bind("scroll.scrollStop",function(c){var d=this;clearTimeout(b),b=setTimeout(function(){a.call(d,c)},100)})},$.fn.resizeStop=function(a){var b;$(this).bind("resize.resizeStop",function(c){var d=this;clearTimeout(b),b=setTimeout(function(){a.call(d,c)},100)})}},{}],17:[function(){!function(a){var b=8,c=function(a,b){var c=(65535&a)+(65535&b),d=(a>>16)+(b>>16)+(c>>16);return d<<16|65535&c},d=function(a,b){return a>>>b|a<<32-b},e=function(a,b){return a>>>b},f=function(a,b,c){return a&b^~a&c},g=function(a,b,c){return a&b^a&c^b&c},h=function(a){return d(a,2)^d(a,13)^d(a,22)},i=function(a){return d(a,6)^d(a,11)^d(a,25)},j=function(a){return d(a,7)^d(a,18)^e(a,3)},k=function(a){return d(a,17)^d(a,19)^e(a,10)},l=function(a,b){var d,e,l,m,n,o,p,q,r,s,t,u,v=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),w=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),x=new Array(64);a[b>>5]|=128<<24-b%32,a[(b+64>>9<<4)+15]=b;for(var r=0;r<a.length;r+=16){d=w[0],e=w[1],l=w[2],m=w[3],n=w[4],o=w[5],p=w[6],q=w[7];for(var s=0;64>s;s++)x[s]=16>s?a[s+r]:c(c(c(k(x[s-2]),x[s-7]),j(x[s-15])),x[s-16]),t=c(c(c(c(q,i(n)),f(n,o,p)),v[s]),x[s]),u=c(h(d),g(d,e,l)),q=p,p=o,o=n,n=c(m,t),m=l,l=e,e=d,d=c(t,u);w[0]=c(d,w[0]),w[1]=c(e,w[1]),w[2]=c(l,w[2]),w[3]=c(m,w[3]),w[4]=c(n,w[4]),w[5]=c(o,w[5]),w[6]=c(p,w[6]),w[7]=c(q,w[7])}return w},m=function(a){for(var c=Array(),d=(1<<b)-1,e=0;e<a.length*b;e+=b)c[e>>5]|=(a.charCodeAt(e/b)&d)<<24-e%32;return c},n=function(a){for(var b="0123456789abcdef",c="",d=0;d<4*a.length;d++)c+=b.charAt(a[d>>2]>>8*(3-d%4)+4&15)+b.charAt(a[d>>2]>>8*(3-d%4)&15);return c},o=function(a,c){var d=m(a);d.length>16&&(d=core_sha1(d,a.length*b));for(var e=Array(16),f=Array(16),g=0;16>g;g++)e[g]=909522486^d[g],f[g]=1549556828^d[g];var h=l(e.concat(m(c)),512+c.length*b);return l(f.concat(h),768)},p=function(b){return b="object"==typeof b?a(b).val():b.toString()};a.extend({sha256:function(a){return a=p(a),n(l(m(a),a.length*b))},sha256hmac:function(a,b){return a=p(a),b=p(b),n(o(a,b))},sha256config:function(a){b=parseInt(a)||8}}),a.fn.sha256=function(b){a.sha256config(b);var c=p(a(this).val()),d=a.sha256(c);return a.sha256config(8),d}}(jQuery)},{}],18:[function(){$.bigfoot.notices={timeout:function(){var a=$.bigfoot.settings.notices||{};return a.timeout||1e4},container:function(){return $("#notices")},hasErrors:function(){return $(".notice.error:not(:animated)",this.container()).size()>0},stash:function(){if(window.sessionStorage){var a=this.container();$(".notice:animated",a).remove(),window.sessionStorage.setItem("bigfoot.notices",a.html()),a.empty()}return this},unstash:function(){var a=this;if(window.sessionStorage){var b=window.sessionStorage.getItem("bigfoot.notices");b&&(a.container().append(b),window.sessionStorage.removeItem("bigfoot.notices"),$(".notice",a.container()).each(function(){a.initElem(this)}))}return this},initElem:function(a){var b=this,c=$(a);$(".hide",c).remove();var d=$("<span class='hide'/>");d.bind("click.bigfoot.notices",function(){b.dispose(c)}),c.prepend(d),setTimeout(function(){b.dispose(c)},this.timeout())},mkElem:function(a){var b=a.kind,c=a.msg.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"),d=$('<div class="notice '+b+'">'+c+"</div>");return this.initElem(d),d},add:function(a){return this.container().append(this.mkElem(a)),this},error:function(a){return this.add({kind:"error",msg:a})},warn:function(a){return this.add({kind:"warn",msg:a})},info:function(a){return this.add({kind:"info",msg:a})},addAll:function(a){if(a&&a.notices)for(var b in a.notices)this.add(a.notices[b]);return this},clear:function(){return this.dispose($(".notice",this.container()))},dispose:function(a){return a.fadeOut("fast",function(){$(this).remove()}),this}},window.addEventListener("keydown",function(a){27==a.keyCode&&$.bigfoot.notices.clear()}),$(function(){$.bigfoot.notices.unstash()})},{}],19:[function(){"use strict";$.bigfoot.msg.standby="Please wait...";var a="function"==typeof history.pushState;a&&$(function(){window.addEventListener("popstate",function(a){if(a.state){var b=a.state.id;b&&b==$.bigfoot.viewport.id()?$.bigfoot.viewport.load(location.href):location.reload(!0)}},!1)}),$.bigfoot.viewport={id:function(){var a=this.container(),b=a.attr("data-viewport-id");if(b)return b;var c=Math.random().toString();return a.attr("data-viewport-id",c),c},container:function(){return $("#viewport")},timeout:function(){var a=$.bigfoot.settings.viewport||{};return a.timeout||500},showStandBy:function(){var a=$("#viewport-standby");0==a.size()&&(a=$('<div id="viewport-standby"></div>'),a.hide(),a.append('<div class="message">'+$.bigfoot.msg.standby+"</div>")),$("body").append(a),this._standByTimer=setTimeout(function(){a.fadeIn(300)},this.timeout())},hideStandBy:function(){clearTimeout(this._standByTimer),$("#viewport-standby").remove()},load:function(a){var b=this,c=$.Event("viewportUnload");$(window).trigger(c),c.isDefaultPrevented()||(b.showStandBy(),$.ajax({url:a,headers:{"X-Render-Mode":"partial-viewport"},dataType:"html",data:{__:(new Date).getTime().toString()},type:"GET",success:function(a){var c=b.id(),d=$(a);"viewport"!=d.attr("id")&&(d=$('<div id="viewport"/>').append(d)),d.attr("data-viewport-id",c),b.hideStandBy(),b.container().replaceWith(d).remove(),$("a[rel='partial']").removeClass("active"),$.bigfoot.init(d);var e=$("title",d);e.size()>0&&($("head title").text(e.text()),e.remove()),$("body").trigger("viewportLoad"),b.scrollToAnchor()},error:function(a){$.bigfoot.ajax.processErrors(a),b.hideStandBy()}}))},navigate:function(b,c){if(a){var d=$.bigfoot.viewport.id();window.history.replaceState({id:d},"",location.href),c?window.history.replaceState({id:d},"",b):window.history.pushState({id:d},"",b),this.load(b)}else $.bigfoot.notices.stash(),c?window.location.replace(b):window.location.href=b},scrollToAnchor:function(){var a=location.href.replace(/.*?(?=#|$)/,""),b=$(a);0==b.size()&&(b=$(".viewport-anchor").first()),b.scrollTo()}},a&&$.bigfoot.install("a[rel='partial']",function(){var a=$(this);"popup"!=a.attr("rel")&&"_blank"!=a.attr("target")&&(a.addClass("partial-link"),a.unbind(".bigfoot.partial-link").bind("click.bigfoot.partial-link",function(a){if(0!=a.button||a.metaKey||a.ctrlKey)return!0;a.preventDefault();var b=$(this).attr("href");return $.bigfoot.viewport.navigate(b),!1}))})},{}]},{},[4]); | ||
/*! Bigfoot v.1.1.11 */ | ||
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(){$.bigfoot.msg["ajax.authRequired"]="You need to login to continue.",$.bigfoot.msg["ajax.accessDenied"]="You have insufficient permissions to access the resource.",$.bigfoot.msg["ajax.failed"]="Your request could not be processed. Please contact technical support.",$.bigfoot.msg["ajax.tooLarge"]="Your request exceeds the size limit.",$.bigfoot.ajax={processResponse:function(a,b){$.bigfoot.notices.clear(),$.bigfoot.notices.addAll(a),a.redirect&&!b&&($.bigfoot.notices.stash(),window.location.replace(a.redirect))},processErrors:function(a){switch(a.status){case 0:return!0;case 401:$.bigfoot.notices.warn($.bigfoot.msg["ajax.authRequired"]);break;case 403:$.bigfoot.notices.error($.bigfoot.msg["ajax.accessDenied"]);break;case 413:$.bigfoot.notices.error($.bigfoot.msg["ajax.tooLarge"]);break;default:$.bigfoot.notices.error($.bigfoot.msg["ajax.failed"])}return!1}}},{}],2:[function(){$.bigfoot={settings:{},msg:{},log:function(a){"undefined"!=typeof console&&"function"==typeof console.log&&console.log(a)},queue:[],init:function(a){this.queue.forEach(function(b){a.lookup(b.selector).each(b.fn)})},install:function(a,b){return this.queue.push({selector:a,fn:b}),this},installLast:this.install,installFirst:function(a,b){return this.queue.unshift({selector:a,fn:b}),this},installBefore:function(a,b,c){for(var d=0;d<this.queue.length&&this.queue[d].selector!=a;d++);return this.queue.splice(d,0,{selector:b,fn:c}),this},installAfter:function(a,b,c){for(var d=0;d<this.queue.length&&this.queue[d].selector!=a;d++);d==this.queue.length?this.installLast(b,c):this.queue.splice(d+1,0,{selector:b,fn:c})},replace:function(a,b){for(var c=0;c<this.queue.length&&this.queue[c].selector!=a;c++);c==this.queue.length?$.bigfoot.log("Replacing “"+a+"” failed. Try installing instead."):this.queue.splice(c,1,{selector:a,fn:b})}}},{}],3:[function(a){a("../jquery-ext"),a("../jquery-sha256"),a("../bigfoot"),a("../notices"),a("../viewport"),a("../ajax"),a("../ibox"),a("../components/commons"),a("../components/forms"),a("../components/switch"),a("../components/toggler"),a("../components/scroll-load"),a("../components/checkbox-toggle"),a("../components/retina"),a("../components/load-into"),a("../components/lightform"),a("../components/sticky")},{"../ajax":1,"../bigfoot":2,"../components/checkbox-toggle":5,"../components/commons":6,"../components/forms":7,"../components/lightform":8,"../components/load-into":9,"../components/retina":10,"../components/scroll-load":11,"../components/sticky":12,"../components/switch":13,"../components/toggler":14,"../ibox":15,"../jquery-ext":16,"../jquery-sha256":17,"../notices":18,"../viewport":19}],4:[function(a){!function(){a("./modules")}(jQuery)},{"./modules":3}],5:[function(){$.bigfoot.install('input[type="checkbox"][data-toggle]',function(){function a(){"false"==localStorage.getItem(e)?c.removeAttr("checked"):"true"==localStorage.getItem(e)&&c.attr("checked","checked"),b(0)}function b(a){var b=c.is(":checked");localStorage.setItem(e,b);var f=$(d);b?f.fadeIn(a):f.fadeOut(a)}var c=$(this),d=c.attr("data-toggle"),e=c.attr("data-key")||"bigfoot.toggle("+d+")";a(),c.unbind(".bigfoot.toggle").bind("change.bigfoot.toggle",function(){b(300)})})},{}],6:[function(){$.bigfoot.placeholder=function(){return $('<div class="loading"/>')},$.bigfoot.install("[data-ref]",function(){var a=$(this).attr("data-ref"),b=$(this).attr("data-ref-class");b||(b="active"),$(a).addClass(b)}),$.bigfoot.install(".focus",function(){$(this).focus()}),$.bigfoot.install("[data-set-focus]",function(){$(this).unbind(".bigfoot.setFocus").bind("click.bigfoot.setFocus",function(){$($(this).attr("data-set-focus")).focus()})}),$.bigfoot.install('a[rel="popup"]',function(){$(this).unbind("click.bigfoot.popup").bind("click.bigfoot.popup",function(a){var b=$(this),c=b.attr("href");return c?($.bigfoot.ibox.load(c),a.preventDefault(),!1):void 0})}),$.bigfoot.install("[data-show]",function(){var a=$(this);a.unbind(".bigfoot.show").bind("click.bigfoot.show",function(){$(a.attr("data-show")).show(0,function(){$(a.attr("data-set-focus")).focus()})})}),$.bigfoot.install("[data-hide]",function(){$(this).unbind(".bigfoot.hide").bind("click.bigfoot.hide",function(){$($(this).attr("data-hide")).hide()})})},{}],7:[function(){"use strict";$.bigfoot.install("form",function(){var a=$(this);a.bind("submit.bigfoot.forms",function(b){return b.preventDefault(),a.hasClass("readonly")?!1:(this.submit(),!1)}),a[0].handlers=[],a[0].executeHandlers=function(b){for(var c in a[0].handlers){var d=a[0].handlers[c],e=d.call(a[0],{params:b});if(e===!1)return!1}return!0}}),$.bigfoot.install("form.partial",function(){var a=$(this),b=a.hasClass("stay"),c=a.attr("action"),d=a.attr("method").toUpperCase(),e="multipart/form-data"==a.attr("enctype");a[0].submit=function(){if(!a.hasClass("readonly")){var f=$.bigfoot.placeholder(),g=$(".submits",a),h=g.height();g.hide(),f.insertAfter(g),f.height(h);var i=new FormData(a[0]);if(e)$.bigfoot.log(d+" "+c+" [multipart data]");else{if(i=$(":input:not(.exclude)",a).serializeArray(),i.push({name:"__",value:(new Date).getTime().toString()}),!a[0].executeHandlers(i))return g.show(),f.remove(),void 0;$.bigfoot.log(d+" "+c+" "+JSON.stringify(i))}if("GET"==d){var j=c+"?"+$.param(i);$.bigfoot.viewport.navigate(j)}else{var k={data:i,dataType:"json",url:c,type:d,cache:!1,success:function(c){a.trigger("postSubmit",c),$.bigfoot.ajax.processResponse(c,b),c.redirect||(g.show(),f.remove(),$("input[type='password'], .cleanup",a).val(""))},error:function(a){g.show(),f.remove(),$.bigfoot.ajax.processErrors(a)}};e&&(k.processData=!1,k.contentType=!1),$.ajax(k)}}}}),$.bigfoot.install("form :input.submit",function(){var a=$(this);a.unbind(".bigfoot.submit").bind("change.bigfoot.submit",function(){var b=a.parents("form");b.submit()})}),$.bigfoot.install("form a.submit",function(){var a=$(this);a.unbind(".bigfoot.submit").bind("click.bigfoot.submit",function(b){return a.parents("form").submit(),b.preventDefault(),!1})}),$.bigfoot.install("form[data-load-into]",function(){var a=$(this),b=$(a.attr("data-load-into")),c=a.attr("method"),d=a.attr("action");a[0].submit=function(){var e=$.bigfoot.placeholder(),f=$(".submits",a);f.hide(),b.empty().append(e);var g=$(":input:not(.exclude)",a).serializeArray();return g.push({name:"__",value:(new Date).getTime().toString()}),a[0].executeHandlers(g)?($.bigfoot.log(c+" "+d+" "+JSON.stringify(g)),$.ajax({data:g,dataType:"html",url:d,type:c,success:function(c){a.trigger("postSubmit",c),e.remove(),b.append(c),$.bigfoot.init(b)},error:function(a){e.remove(),f.show(),$.bigfoot.ajax.processErrors(a)}}),void 0):(f.show(),e.remove(),void 0)}}),$.bigfoot.msg["form.unload.warn"]="Warning! If you leave this page, all unsaved changes will be lost.",$.bigfoot.msg["viewportUnload.warn"]="Warning! If you continue, all unsaved changed will be lost. Are you sure you want to continue?",$.bigfoot.install("form.unload-warn",function(){function a(){var a=$(":input:not(.exclude)",b).serialize();b.data("initial-state",a)}var b=$(this);a(),b.bind("submit.bigfoot.unload-warn",a),$(window).unbind("beforeunload.bigfoot").bind("beforeunload.bigfoot.unload-warn",function(){var a=$("form.unload-warn").filter(function(){var a=$(this),b=$(":input:not(.exclude)",a).serialize(),c=a.data("initial-state");return b!=c&&a.is(":visible")});return a.size()>0?$.bigfoot.msg["form.unload.warn"]:void 0}),$(window).unbind("viewportUnload.bigfoot").bind("viewportUnload.bigfoot.unload-warn",function(a){var b=$("form.unload-warn").filter(function(){var a=$(this),b=$(":input:not(.exclude)",a).serialize(),c=a.data("initial-state");return b!=c});b.size()>0&&(confirm($.bigfoot.msg["viewportUnload.warn"])||a.preventDefault())})})},{}],8:[function(){$.bigfoot.install("[data-method][data-action]",function(){var a=$(this),b=a.attr("data-method").toUpperCase(),c=a.attr("data-action");a.click(function(d){return d.preventDefault(),$.bigfoot.viewport.showStandBy(),$.ajax({dataType:"json",url:c,data:{__:(new Date).getTime().toString()},type:b,success:function(b){a.trigger("postSubmit",b),$.bigfoot.ajax.processResponse(b),b.redirect||$.bigfoot.viewport.hideStandBy()},error:function(a){$.bigfoot.ajax.processErrors(a),$.bigfoot.viewport.hideStandBy()}}),!1})})},{}],9:[function(){$.bigfoot.install("a[data-load-into]",function(){var a=$(this),b=a.attr("href"),c=$(a.attr("data-load-into"));if(c.size()>0&&b){var d=a.attr("data-class"),e=a.attr("data-style");a.click(function(a){a.preventDefault();var f=$.bigfoot.placeholder(),g=$(window).scrollTop();return c.empty().append(f),$.ajax({dataType:"html",url:b,data:{__:(new Date).getTime().toString()},type:"get",success:function(a){var c=$("<div/>");c.attr("data-loaded",b),c.attr("class",d),c.attr("style",e),c.append(a),f.replaceWith(c).remove(),$(window).scrollTop(g),$.bigfoot.init(c)},error:function(){f.remove()}}),!1})}})},{}],10:[function(){$.bigfoot.isRetina=function(){var a="(-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (min-resolution: 1.5dppx)";return window.devicePixelRatio>1?!0:window.matchMedia&&window.matchMedia(a).matches},$.bigfoot.install("img.retina",function(){function a(){var a=b.width(),c=b.height();b.attr("src",b.attr("src").replace(/\.([^.]+)$/,"@2X.$1")),b.attr("width",a),b.attr("height",c)}var b=$(this);$.bigfoot.isRetina()&&(b[0].complete?a():b.one("load.bigfoot.retina",a))})},{}],11:[function(){$.bigfoot.install("[data-load]",function(){function a(){clearTimeout(c),c=setTimeout(function(){var a=e.scrollTop()+e.height();d.offset().top<a&&b()},200)}function b(){e.unbind(g);var a=d[0].tagName.toLowerCase(),b="<"+a+"></"+a+">",c=$.bigfoot.placeholder(),h=d.attr("class"),i=d.attr("style");d.replaceWith(c).remove(),$.ajax({dataType:"html",url:f,data:{__:(new Date).getTime().toString()},type:"get",success:function(a){$.bigfoot.log("Loaded "+f);var d=$(b);d.attr("data-loaded",f),d.attr("class",h),d.attr("style",i),d.append(a),c.replaceWith(d).remove(),$.bigfoot.init(d)},error:function(){$.bigfoot.log("Failed to load "+f),c.remove()}})}var c,d=$(this),e=$(window),f=d.attr("data-load"),g="scroll.bigfoot.scrollLoad-"+$.sha256(f);e.unbind(g).bind(g,a),$(a)})},{}],12:[function(){$.bigfoot.install("[data-sticky]",function(){function a(){var a=j.css("float"),i="left"==a||"right"==a;m!=i&&j.removeAttr("style"),m=i,c=0,d=l.scrollTop(),e=l.height(),f=j.height(),g=k.offset().top,h=g+k.height(),b()}function b(){if(m){var a=c,b=l.scrollTop(),d=b+e,k=Math.max(b+16,g)-g,n=Math.min(d-16,h)-g,o=e>f&&n>k+f;k>c&&c+f>n||(c>k||o?a=k:n>c+f&&(a=n-f),a!=c&&(c=a,i.style.webkitTransform=i.style.MozTransform=i.style.msTransform=i.style.OTransform=i.style.transform="translateY("+c+"px)"),0==a?j.addClass("atTop"):j.removeClass("atTop"))}}var c,d,e,f,g,h,i=this,j=$(this),k=$(this.parentNode),l=$(window),m=!0;a(),l.resizeStop(a),l.scrollAnim(b)})},{}],13:[function(){$.bigfoot.switcher={hideAll:function(a){$(".switch-target").filter(function(){return this!=a}).hide(),$("[data-switch]").each(function(){var a=$(this),b=a.attr("data-switch-class");b||(b="active"),a.removeClass(b)})}},$(function(){$("html").bind("click.bigfoot.switcher",function(){$.bigfoot.switcher.hideAll()})}),$.bigfoot.install("[data-switch]",function(){function a(){f.is(":visible")?d.addClass(e):d.removeClass(e)}function b(){f.toggle(0,a)}function c(){f.hide(0,a)}var d=$(this),e=d.attr("data-switch-class");e||(e="active");var f=$(d.attr("data-switch"));f.addClass("switch-target"),d.hasClass("switch-stay")&&f.click(function(a){a.stopPropagation()}),a(),d.unbind(".bigfoot.switch").bind("click.bigfoot.switch",function(a){return a.preventDefault(),$.bigfoot.switcher.hideAll(f[0]),b(),!1}),$(d).find(".close").unbind(".bigfoot.switch").bind("click.bigfoot.switch",function(a){return a.preventDefault(),c(),!1})})},{}],14:[function(){$.bigfoot.install(".toggler",function(){function a(){d.each(function(){var a=$(this),b=$(a.attr("data-for"));b.is(":visible")?a.addClass(e):a.removeClass(e)})}function b(){d.each(function(){$($(this).attr("data-for")).hide()})}var c=$(this),d=$("*[data-for]",c),e=c.attr("data-toggler-class");e||(e="active"),d.unbind(".bigfoot.toggler").bind("click.bigfoot.toggler",function(c){c.preventDefault();var d=$(this);return b(),$(d.attr("data-for")).show(),a(),!1});var f=d.filter("."+e);0==f.size()?a():(b(),$(f.attr("data-for")).show())})},{}],15:[function(){"use strict";$.bigfoot.msg.Close="Close",$.bigfoot.ibox={get:function(){return this.init(),$("#ibox")},init:function(){var a=this,b=$("#ibox");b.size()>0||(b=$('<div id="ibox"></div>'),b.hide(),$("body").prepend(b),$(window).unbind(".ibox").bind("keydown.ibox",function(b){27==b.keyCode&&a.close()}),b.bind("click.ibox",function(){a.close()}))},close:function(){var a=$("#ibox");$("iframe",a).remove(),a.fadeOut(300,function(){$(this).remove()})},isVisible:function(){return $("#ibox").is(":visible")},show:function(a){var b=this,c=$(a),d=$.Event("viewportUnload");if($(window).trigger(d),!d.isDefaultPrevented()){var e=this.get().empty(),f=$('<div id="ibox-wrapper"></div>');f.append(c),e.append(f);var g=$('<div id="ibox-close"></div>');g.attr("title",$.bigfoot.msg.Close),f.append(g),e.fadeIn(300,function(){$("body").animate({scrollTop:e.offset().top},300),e.trigger("ibox_load"),$.bigfoot.init(f),f.unbind(".ibox").bind("click.ibox",function(a){a.stopPropagation()}),$("a.close",c).add(g).bind("click.ibox",function(a){return b.close(),a.preventDefault(),!1})})}},load:function(a){var b=this;$.ajax({url:a,dataType:"html",type:"GET",data:{__:(new Date).getTime().toString()},success:function(a){b.show(a)},error:$.bigfoot.ajax.processErrors})}}},{}],16:[function(){$.fn.lookup=function(a){if(!a)return this;var b=this.find(a);return this.is(a)?b.add(this):b},$.fn.insertAt=function(a,b){var c=this.children().size();return 0>a&&(a=Math.max(0,c+1+a)),this.append(b),c>a&&this.children().eq(a).before(this.children().last()),this},$.fn.insertAtCaret=function(a){return this.each(function(){if(document.selection){this.focus();var b=document.selection.createRange();b.text=a,this.focus()}else if("undefined"!=typeof this.selectionStart){var c=this.selectionStart,d=this.selectionEnd,e=this.scrollTop;this.value=this.value.substring(0,c)+a+this.value.substring(d,this.value.length),this.focus(),this.selectionStart=c+a.length,this.selectionEnd=c+a.length,this.scrollTop=e}else this.value+=a,this.focus()})},$.fn.scrollTo=function(){var a=-1;this.each(function(){a=$(this).offset().top}),a>=0&&$("html, body").animate({scrollTop:a},300)},$.fn.shuffle=function(){function a(a){return Math.floor(Math.random()*a)}var b=this.get(),c=$.map(b,function(){var c=a(b.length),d=$(b[c]).clone(!0)[0];return b.splice(c,1),d});return this.each(function(a){$(this).replaceWith($(c[a]))}),$(c)},$.fn.scrollStop=function(a){var b;$(this).bind("scroll.scrollStop",function(c){var d=this;clearTimeout(b),b=setTimeout(function(){a.call(d,c)},100)})},$.fn.resizeStop=function(a){var b;$(this).bind("resize.resizeStop",function(c){var d=this;clearTimeout(b),b=setTimeout(function(){a.call(d,c)},100)})},$.fn.scrollAnim=function(a){function b(b){c||d(function(){c=!1,a(b)}),c=!0}var c=!1,d=window.requestAnimationFrame;return"function"!=typeof d?$(this).scroll(a):$(this).bind("scroll",b)}},{}],17:[function(){!function(a){var b=8,c=function(a,b){var c=(65535&a)+(65535&b),d=(a>>16)+(b>>16)+(c>>16);return d<<16|65535&c},d=function(a,b){return a>>>b|a<<32-b},e=function(a,b){return a>>>b},f=function(a,b,c){return a&b^~a&c},g=function(a,b,c){return a&b^a&c^b&c},h=function(a){return d(a,2)^d(a,13)^d(a,22)},i=function(a){return d(a,6)^d(a,11)^d(a,25)},j=function(a){return d(a,7)^d(a,18)^e(a,3)},k=function(a){return d(a,17)^d(a,19)^e(a,10)},l=function(a,b){var d,e,l,m,n,o,p,q,r,s,t,u,v=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),w=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),x=new Array(64);a[b>>5]|=128<<24-b%32,a[(b+64>>9<<4)+15]=b;for(var r=0;r<a.length;r+=16){d=w[0],e=w[1],l=w[2],m=w[3],n=w[4],o=w[5],p=w[6],q=w[7];for(var s=0;64>s;s++)x[s]=16>s?a[s+r]:c(c(c(k(x[s-2]),x[s-7]),j(x[s-15])),x[s-16]),t=c(c(c(c(q,i(n)),f(n,o,p)),v[s]),x[s]),u=c(h(d),g(d,e,l)),q=p,p=o,o=n,n=c(m,t),m=l,l=e,e=d,d=c(t,u);w[0]=c(d,w[0]),w[1]=c(e,w[1]),w[2]=c(l,w[2]),w[3]=c(m,w[3]),w[4]=c(n,w[4]),w[5]=c(o,w[5]),w[6]=c(p,w[6]),w[7]=c(q,w[7])}return w},m=function(a){for(var c=Array(),d=(1<<b)-1,e=0;e<a.length*b;e+=b)c[e>>5]|=(a.charCodeAt(e/b)&d)<<24-e%32;return c},n=function(a){for(var b="0123456789abcdef",c="",d=0;d<4*a.length;d++)c+=b.charAt(a[d>>2]>>8*(3-d%4)+4&15)+b.charAt(a[d>>2]>>8*(3-d%4)&15);return c},o=function(a,c){var d=m(a);d.length>16&&(d=core_sha1(d,a.length*b));for(var e=Array(16),f=Array(16),g=0;16>g;g++)e[g]=909522486^d[g],f[g]=1549556828^d[g];var h=l(e.concat(m(c)),512+c.length*b);return l(f.concat(h),768)},p=function(b){return b="object"==typeof b?a(b).val():b.toString()};a.extend({sha256:function(a){return a=p(a),n(l(m(a),a.length*b))},sha256hmac:function(a,b){return a=p(a),b=p(b),n(o(a,b))},sha256config:function(a){b=parseInt(a)||8}}),a.fn.sha256=function(b){a.sha256config(b);var c=p(a(this).val()),d=a.sha256(c);return a.sha256config(8),d}}(jQuery)},{}],18:[function(){$.bigfoot.notices={timeout:function(){var a=$.bigfoot.settings.notices||{};return a.timeout||1e4},container:function(){return $("#notices")},hasErrors:function(){return $(".notice.error:not(:animated)",this.container()).size()>0},stash:function(){if(window.sessionStorage){var a=this.container();$(".notice:animated",a).remove(),window.sessionStorage.setItem("bigfoot.notices",a.html()),a.empty()}return this},unstash:function(){var a=this;if(window.sessionStorage){var b=window.sessionStorage.getItem("bigfoot.notices");b&&(a.container().append(b),window.sessionStorage.removeItem("bigfoot.notices"),$(".notice",a.container()).each(function(){a.initElem(this)}))}return this},initElem:function(a){var b=this,c=$(a);$(".hide",c).remove();var d=$("<span class='hide'/>");d.bind("click.bigfoot.notices",function(){b.dispose(c)}),c.prepend(d),setTimeout(function(){b.dispose(c)},this.timeout())},mkElem:function(a){var b=a.kind,c=a.msg.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"),d=$('<div class="notice '+b+'">'+c+"</div>");return this.initElem(d),d},add:function(a){return this.container().append(this.mkElem(a)),this},error:function(a){return this.add({kind:"error",msg:a})},warn:function(a){return this.add({kind:"warn",msg:a})},info:function(a){return this.add({kind:"info",msg:a})},addAll:function(a){if(a&&a.notices)for(var b in a.notices)this.add(a.notices[b]);return this},clear:function(){return this.dispose($(".notice",this.container()))},dispose:function(a){return a.fadeOut("fast",function(){$(this).remove()}),this}},window.addEventListener("keydown",function(a){27==a.keyCode&&$.bigfoot.notices.clear()}),$(function(){$.bigfoot.notices.unstash()})},{}],19:[function(){"use strict";$.bigfoot.msg.standby="Please wait...";var a="function"==typeof history.pushState;a&&$(function(){window.addEventListener("popstate",function(a){if(a.state){var b=a.state.id;b&&b==$.bigfoot.viewport.id()?$.bigfoot.viewport.load(location.href):location.reload(!0)}},!1)}),$.bigfoot.viewport={id:function(){var a=this.container(),b=a.attr("data-viewport-id");if(b)return b;var c=Math.random().toString();return a.attr("data-viewport-id",c),c},container:function(){return $("#viewport")},timeout:function(){var a=$.bigfoot.settings.viewport||{};return a.timeout||500},showStandBy:function(){var a=$("#viewport-standby");0==a.size()&&(a=$('<div id="viewport-standby"></div>'),a.hide(),a.append('<div class="message">'+$.bigfoot.msg.standby+"</div>")),$("body").append(a),this._standByTimer=setTimeout(function(){a.fadeIn(300)},this.timeout())},hideStandBy:function(){clearTimeout(this._standByTimer),$("#viewport-standby").remove()},load:function(a){var b=this,c=$.Event("viewportUnload");$(window).trigger(c),c.isDefaultPrevented()||(b.showStandBy(),$.ajax({url:a,headers:{"X-Render-Mode":"partial-viewport"},dataType:"html",data:{__:(new Date).getTime().toString()},type:"GET",success:function(a){var c=b.id(),d=$(a);"viewport"!=d.attr("id")&&(d=$('<div id="viewport"/>').append(d)),d.attr("data-viewport-id",c),b.hideStandBy(),b.container().replaceWith(d).remove(),$("a[rel='partial']").removeClass("active"),$.bigfoot.init(d);var e=$("title",d);e.size()>0&&($("head title").text(e.text()),e.remove()),$("body").trigger("viewportLoad"),b.scrollToAnchor()},error:function(a){$.bigfoot.ajax.processErrors(a),b.hideStandBy()}}))},navigate:function(b,c){if(a){var d=$.bigfoot.viewport.id();window.history.replaceState({id:d},"",location.href),c?window.history.replaceState({id:d},"",b):window.history.pushState({id:d},"",b),this.load(b)}else $.bigfoot.notices.stash(),c?window.location.replace(b):window.location.href=b},scrollToAnchor:function(){var a=location.href.replace(/.*?(?=#|$)/,""),b=$(a);0==b.size()&&(b=$(".viewport-anchor").first()),b.scrollTo()}},a&&$.bigfoot.install("a[rel='partial']",function(){var a=$(this);"popup"!=a.attr("rel")&&"_blank"!=a.attr("target")&&(a.addClass("partial-link"),a.unbind(".bigfoot.partial-link").bind("click.bigfoot.partial-link",function(a){if(0!=a.button||a.metaKey||a.ctrlKey)return!0;a.preventDefault();var b=$(this).attr("href");return $.bigfoot.viewport.navigate(b),!1}))})},{}]},{},[4]); |
@@ -8,5 +8,2 @@ $.bigfoot.install('[data-sticky]', function() { | ||
var updating = false | ||
, raf = window.requestAnimationFrame; | ||
var oldY, viewTop, windowHeight, stickyHeight, parentTop, parentBottom; | ||
@@ -31,16 +28,7 @@ | ||
function onScroll() { | ||
function update() { | ||
if (!enabled) | ||
return; | ||
viewTop = $wnd.scrollTop(); | ||
requestUpdate(); | ||
} | ||
function requestUpdate() { | ||
if (!updating) raf(update); | ||
updating = true; | ||
} | ||
function update() { | ||
var newY = oldY | ||
, viewTop = $wnd.scrollTop() | ||
, viewBottom = viewTop + windowHeight | ||
@@ -50,3 +38,2 @@ , boundTop = Math.max(viewTop + 16, parentTop) - parentTop | ||
, alwaysAtTop = stickyHeight < windowHeight && boundTop + stickyHeight < boundBottom; | ||
updating = false; | ||
if (boundTop > oldY && boundBottom < oldY + stickyHeight) | ||
@@ -75,4 +62,4 @@ return; | ||
$wnd.resizeStop(reinit); | ||
$wnd.scroll(onScroll); | ||
$wnd.scrollAnim(update); | ||
}); |
@@ -116,1 +116,24 @@ $.fn.lookup = function(selector) { | ||
}; | ||
// Events on scroll per animation frame | ||
$.fn.scrollAnim = function(cb) { | ||
var updating = false | ||
, raf = window.requestAnimationFrame; | ||
if (typeof raf != 'function') | ||
return $(this).scroll(cb); | ||
function onScroll(ev) { | ||
if (!updating) | ||
raf(function() { | ||
updating = false; | ||
cb(ev); | ||
}); | ||
updating = true; | ||
} | ||
return $(this).bind('scroll', onScroll); | ||
}; |
{ | ||
"name": "bigfoot", | ||
"version": "1.1.11", | ||
"version": "1.1.12", | ||
"description": "Client-side Application Framework", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
217825
4539