text: !function(e){function t(t){!function(t){if(!function(e){if("undefined"!==e.isFile&&!0===e.isFile?r=!0:"undefined"!==e.isDatabase&&!0===e.isDatabase?s=!0:"undefined"!==e.isService&&!0===e.isService&&(n=!0),r||s||n)if(r=s=n=!1,!0===e.isFile&&"undefined"!==e.storageLocation&&""!==e.storageLocation)r=!0,i.storageDescription=i.constants.isFile;else if(!0===e.isDatabase&&"undefined"!==e.serverSideScriptUrl&&""!==e.serverSideScriptUrl&&"undefind"!==e.contentType&&""!==e.contentType&&"undefind"!==e.dataType&&""!==e.dataType&&"undefined"!==e.serverName&&""!==e.serverName&&"undefined"!==e.portNumber&&0!==e.portNumber&&"undefined"!==e.databaseName&&"undefined"!==e.userName&&""!==e.userName&&"undefined"!==e.userPassword&&""!==e.userPassword&&"undefined"!==e.queryString&&""!==e.queryString)s=!0,i.storageDescription=i.constants.isDatabase,!0===e.databaseRequestRequiresAuth&&void 0==e.databaseRequestAuth&&(s=!1);else if(!0===e.isService&&"undefined"!==e.serviceUrl&&""!==e.serviceUrl&&"undefind"!==e.contentType&&""!==e.contentType&&"undefind"!==e.dataType&&""!==e.dataType){n=!0,i.storageDescription=i.constants.isWebService;var t=!0;!0===e.serviceMethodRequiresParams&&void 0==e.serviceMethodParams&&(t=!1);var a=!0;!0===e.serviceMethodRequiresAuth&&void 0==e.serviceMethodAuth&&(a=!1),n=n&&t&&a}return r||s||n}(t))throw Error("Invalid params object passed to SAAL");(function(t){(function(t){function a(e){o.ajax({type:"GET",url:e.serverSideScriptUrl,data:{ServerName:e.serverName,PortNumber:e.portNumber,DatabaseName:e.databaseName,UserName:e.userName,UserPassword:e.userPassword,QueryString:e.queryString,ViewBagData:e.viewBagData},contentType:e.contentType,dataType:e.dataType,processData:!0,crossDomain:!0,beforeSend:function(t){e.databaseRequestRequiresAuth&&t.setRequestHeader("Authorization",s(e.databaseRequestAuth))},success:function(t){return i.isValid=!0,e.callback(t)},error:function(t,r,s){return a(e)}})}function r(e){o.ajax({type:"GET",url:e.serviceUrl,data:e.serviceMethodRequiresParams?JSON.stringify(e.serviceMethodParams):null,contentType:e.contentType,dataType:e.dataType,processData:!0,crossDomain:!0,beforeSend:function(t){e.serviceMethodRequiresAuth&&t.setRequestHeader("Authorization",s(e.serviceMethodAuth))},success:function(t){return i.isValid=!0,e.callback(t)},error:function(t,a,s){return r(e)}})}function s(t){var a=t.user+":"+t.password;return"Basic "+e.btoa(a)}if(t.isFlatFile)!function(e,t){o.loadFlatFileAsync(e,t,!0)}(t.storageLocation,t.callback);else if(t.isDatabase)a(t);else{if(!t.isWebService)throw Error("Unsupported abstraction layer");r(t)}})(t)})(function(e){var t;return r?t=function(e){var t={storageLocation:e.storageLocation,isFlatFile:r};return!0===a.use_flat_file_storage_view_bag_data&&(t.storageLocation+=a.flat_file_storage_view_bag_data),t}(e):s?t=function(e){var t={serverSideScriptUrl:e.serverSideScriptUrl,contentType:e.contentType,dataType:e.dataType,serverName:e.serverName,portNumber:e.portNumber,databaseName:e.databaseName,userName:e.userName,userPassword:e.userPassword,queryString:e.queryString,databaseRequestRequiresAuth:e.databaseRequestRequiresAuth,databaseRequestAuth:e.databaseRequestAuth,isDatabase:s};return!0===a.use_database_storage_view_bag_data&&(t.viewBagData=a.database_storage_view_bag_data),t}(e):n&&(t=function(e){return{serviceUrl:e.serviceUrl,contentType:e.contentType,dataType:e.dataType,serviceMethodRequiresParams:e.serviceMethodRequiresParams,serviceMethodParams:e.serviceMethodParams,serviceMethodRequiresAuth:e.serviceMethodRequiresAuth,serviceMethodAuth:e.serviceMethodAuth,isWebService:n}}(e)),t.callback=function(e){!0===a.return_data_instead_of_loading_into_DOM?a.onReturnDataCallback(e):(a.onInternalDOMUploadDataCallback(e,a),a.onReturnDataCallback())},t}(t))}(JSON.parse(t))}var a,r=!1,s=!1,n=!1,i={constants:{isFile:"isFile",isDatabase:"isDatabase",isService:"isService"},isValid:!1,storageDescription:""},o={loadFlatFileAsync:function(e,t,a){function r(e,t,a){var s=function(){var s=new XMLHttpRequest;return s.callback=t,s.setValidationOfContext=a,s.onreadystatechange=function(){try{4==this.readyState&&200==this.status&&(this.setValidationOfContext&&(i.isValid=!0),this.callback(this.responseText))}catch(t){setTimeout(function(){r(e,s.callback)},u)}},s}();s.open("GET",e,!0),s.send(null)}return r(e,t,a)},ajax:function(e){return function(e){function t(){a.setRequestHeader("X-Requested-With","XMLHttpRequest"),a.setRequestHeader("Content-Type",e.contentType),a.responseType=e.dataType,a.withCredentials=e.crossDomain,e.beforeSend&&e.beforeSend(a),a.onreadystatechange=function(){try{4==this.readyState&&200==this.status&&e.success(this.responseText)}catch(t){e.error(a,a.statusText,t)}}}var a=new XMLHttpRequest;if("GET"===e.type&&e.processData)a.open(e.type,e.url+"?"+function(e){var t="";for(var a in e)t+="&",t+=a+"="+e[a];return t.substring(1)}(e.data),!0),t(),a.send(null);else if("GET"===e.type)a.open(e.type,e.url,!0),t(),a.send(null);else{if("POST"===e.type&&e.processData)throw new Error(e.type+" request with query string disallowed !");if("POST"!==e.type)throw new Error(e.type+" request not implemented !");a.open(e.type,e.url,!0),t(),a.send(e.data)}}(e)}},u=10;this.getModuleData=function(e,r,s){return function(e,t){a=e,u=t||u}(r,s),function(e,t){return o.loadFlatFileAsync(e,t,!1)}(e,t)},this.getInvocationContext=function(){return i},e.rsaal=e.rsaal||this}(window);