define(["handlebars","moment","utils","text!/v2/components/Layout/Templates/PageTemplate.html"],function(d,c,a,b){d.registerHelper("Page",function(f){var g=d.compile(b);var e=g({pageContent:f.fn(this)});return e;});d.registerHelper("Footer",function(f){var g=new RegExp(/(?:\/v[1-9]+\/)(.+?(?=\/)?)(?:$|\/.*)/).exec(window.location)[1];var e=f.fn({year:g==="FirstAccess"?"2015 - "+(new Date()).getFullYear():"2017 - "+(new Date()).getFullYear(),product:g+"."});return'<div class="footer clear-both" >'+e+"</div>";});d.registerHelper("i18n",function(h){var g=Array.prototype.slice.call(arguments,0);var f=g.pop();var e=($.i18n!==undefined?$.i18n.prop.apply(this,g):h);return e;});d.registerHelper("formatTimestamp",function(h,f,e){var g=f&&f.length>0?c(h).format(f):"";var i=e&&e.length>0?"   "+c(h).format(e):"";return g+i;});d.registerHelper("showToolTipIf",function(f,e){if(f!==undefined&&f!==null&&f.length>e){return'data-tooltip="'+f+'" data-position="top left"';}else{return"";}});d.registerHelper("substring",function(f,g,e){return f.substring(g,e);});d.registerHelper("ifEquals",function(g,f,e){if(g!==f){return e.inverse(this);}else{return e.fn(this);}});d.registerHelper("ifNotEquals",function(g,f,e){if(g===f){return e.inverse(this);}else{return e.fn(this);}});d.registerHelper("truncateText",function(f,e){if(f!==null&&f!==undefined&&$.trim(f).length>0){var g="";if($.trim(f).length>e){g=$.trim(f).substr(0,e)+"...";}else{g=$.trim(f);}return g;}});d.registerHelper("repeat",function(h,g){var e="";for(var f=0;f<h;++f){e+=g.fn(f);}return e;});d.registerHelper("buildnumber",function(e){return $("#build-number-hdn").val();});});