webpackJsonp([38],{0:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__webpack_require__.p=function(){function make_url(){for(var seg,len,output="",i=0,l=arguments.length;i<l;i++)seg=arguments[i].toString(),len=seg.length,len>1&&"/"==seg.charAt(len-1)&&(seg=seg.substring(0,len-1)),output+="/"!=seg.charAt(0)?"/"+seg:seg;if("/"!=output){var segments=output.split("/"),firstseg=segments[1];if("static"==firstseg||"modules"==firstseg){var postfix=output.substring(firstseg.length+2,output.length);output="/"+firstseg,window.$C.BUILD_NUMBER&&(output+="/@"+window.$C.BUILD_NUMBER),window.$C.BUILD_PUSH_NUMBER&&(output+="."+window.$C.BUILD_PUSH_NUMBER),"app"==segments[2]&&(output+=":"+getConfigValue("APP_BUILD",0)),output+="/"+postfix}}var root=getConfigValue("MRSPARKLE_ROOT_PATH","/"),djangoRoot=getConfigValue("DJANGO_ROOT_PATH",""),locale=getConfigValue("LOCALE","en-US"),combinedPath="";return combinedPath=djangoRoot&&output.substring(0,djangoRoot.length)===djangoRoot?output.replace(djangoRoot,djangoRoot+"/"+locale.toLowerCase()):"/"+locale+output,""==root||"/"==root?combinedPath:root+combinedPath}function getConfigValue(key,defaultValue){if(window.$C&&window.$C.hasOwnProperty(key))return window.$C[key];if(void 0!==defaultValue)return defaultValue;throw new Error("getConfigValue - "+key+" not set, no default provided")}return make_url("/static/build/pages/lite")+"/"}(),__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__("routers/Error"),__webpack_require__("util/router_utils")],__WEBPACK_AMD_DEFINE_RESULT__=function(ErrorRouter,router_utils){new ErrorRouter;router_utils.start_backbone_history()}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),!(void 0!==__WEBPACK_AMD_DEFINE_RESULT__&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))},"routers/Error":function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;__WEBPACK_AMD_DEFINE_ARRAY__=[__webpack_require__("require/underscore"),__webpack_require__("shim/jquery"),__webpack_require__("routers/Base"),__webpack_require__("models/shared/Error"),__webpack_require__("views/error/Master")],__WEBPACK_AMD_DEFINE_RESULT__=function(_,$,BaseRouter,ErrorModel,ErrorView){return BaseRouter.extend({routes:{":locale/*splat":"page"},initialize:function(){BaseRouter.prototype.initialize.apply(this,arguments),this.enableAppBar=!1,this.model.error=new ErrorModel,this.deferreds.error=$.Deferred()},page:function(locale,splat){BaseRouter.prototype.page.call(this,locale,"search",""),this.updateErrorModel(),$.when(this.deferreds.error).then(function(){var status=this.model.error.get("status");if(status&&status.indexOf("402")!=-1){var newStatus="Restricted by License";status=newStatus,this.model.error.set("status",newStatus)}this.setPageTitle(_(status).t())}.bind(this)),$.when(this.deferreds.error,this.deferreds.pageViewRendered).then(function(){this.shouldRender&&(this.initializeErrorView(),$(".preload").replaceWith(this.pageView.el),this.errorView.render().replaceContentsOf($(".main-section-body")))}.bind(this))},updateErrorModel:function(){"resolved"!=this.deferreds.error.state()&&("undefined"!=typeof __error_status__?(this.model.error.set("message",__error_status__.message),this.model.error.set("status",__error_status__.status)):(this.model.error.set("message",_("An unknown error has occurred.").t()),this.model.error.set("status",_("Error").t())),this.deferreds.error.resolve())},initializeErrorView:function(){this.errorView||(this.errorView=new ErrorView({model:{error:this.model.error,application:this.model.application}}))}})}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),!(void 0!==__WEBPACK_AMD_DEFINE_RESULT__&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))}});