-
-
- Search -
diff --git a/tempjpw/IndivLend - Copy.html b/tempjpw/IndivLend - Copy.html deleted file mode 100644 index 9fb1a6579..000000000 --- a/tempjpw/IndivLend - Copy.html +++ /dev/null @@ -1,1299 +0,0 @@ - - -
- - -
-
-
-
-
-
-
-
- " + jQuery.i18n.prop('dialog.messages.functionality.not.available') + "
"); - - var okButton = jQuery.i18n.prop('dialog.button.ok'); - - var buttonsOpts = {}; - buttonsOpts[okButton] = function() {$(this).dialog("close");}; - - dialogDiv.dialog({ - title: jQuery.i18n.prop(titleCode), - width: 300, - height: 200, - modal: true, - buttons: buttonsOpts, - close: function() { - // if i dont do this, theres a problem with errors being appended to dialog view second time round - $(this).remove(); - } - }).dialog('open'); - } - - $.fn.serializeObject = function() - { - var o = {}; - var a = this.serializeArray(); - $.each(a, function() { - if (o[this.name] !== undefined) { - if (!o[this.name].push) { - o[this.name] = [o[this.name]]; - } - o[this.name].push(this.value || ''); - } else { - - if (this.name === 'selectedItems' || this.name === 'notSelectedItems') { - o[this.name] = new Array(); - o[this.name].push(this.value || ''); - } else { - o[this.name] = this.value || ''; - } - } - }); - return o; - }; - - function popupDialogWithFormView(getUrl, postUrl, submitType, titleCode, templateSelector, width, height, saveSuccessFunction) { - var dialogDiv = $(""); - var jqxhr = $.ajax({ - url: getUrl, - type: 'GET', - contentType: 'application/json', - dataType: 'json', - cache: false, - beforeSend: function(xhr) { - xhr.setRequestHeader("Authorization", "Basic " + base64); - }, - success: function(data, textStatus, jqXHR) { - console.log(data); - var formHtml = $(templateSelector).render(data); - - dialogDiv.append(formHtml); - - var saveButton = jQuery.i18n.prop('dialog.button.save'); - var cancelButton = jQuery.i18n.prop('dialog.button.cancel'); - - var buttonsOpts = {}; - buttonsOpts[saveButton] = function() { - - $('#notSelectedItems option').each(function(i) { - $(this).attr("selected", "selected"); - }); - - $('#selectedItems option').each(function(i) { - $(this).attr("selected", "selected"); - }); - - var newFormData = JSON.stringify($('#entityform').serializeObject()); - console.log(newFormData); - - var jqxhr = $.ajax({ - url: postUrl, - type: submitType, - contentType: 'application/json', - dataType: 'json', - data: newFormData, - success: saveSuccessFunction, - cache: false, - beforeSend: function(xhr) { - xhr.setRequestHeader("Authorization", "Basic " + base64); - }, - error: function(jqXHR, textStatus, errorThrown) { - handleXhrError(jqXHR, textStatus, errorThrown, "#formErrorsTemplate", "#formerrors"); - } - }); - }; - - buttonsOpts[cancelButton] = function() {$(this).dialog( "close" );}; - - dialogDiv.dialog({ - title: jQuery.i18n.prop(titleCode), - width: width, - height: height, - modal: true, - buttons: buttonsOpts, - close: function() { - // if i dont do this, theres a problem with errors being appended to dialog view second time round - $(this).remove(); - }, - open: function (event, ui) { - - $('#add').click(function() { - return !$('#notSelectedItems option:selected').remove().appendTo('#selectedItems'); - }); - - $('#remove').click(function() { - return !$('#selectedItems option:selected').remove().appendTo('#notSelectedItems'); - }); - - $('.datepickerfield').datepicker({constrainInput: true, maxDate: 0, dateFormat: 'dd MM yy'}); - - $("#entityform textarea").first().focus(); - $('#entityform input').first().focus(); - } - }).dialog('open'); - } - }); - - jqxhr.error(function(jqXHR, textStatus, errorThrown) { - handleXhrError(jqXHR, textStatus, errorThrown, "#formErrorsTemplate", "#formerrors"); - }); - } - - - - -//all the code for the various functions - -function showILClientListing(baseApiUrl) { -//HOME list clients functionality - $("#tabs").tabs({ - "ajaxOptions": { - type: 'GET', - dataType: 'json', - contentType: 'application/json; charset=utf-8', - cache: false, - beforeSend: function(xhr) { - console.log("before send"); - xhr.setRequestHeader("Authorization", "Basic " + base64); - }, - success: function(data, status, xhr) { - }, - error: function(xhr, status, index, anchor) { - $(anchor.hash).html("error occured while ajax loading."); - } - }, - select: function(event, ui) { - console.log("selected.."); - }, - load: function(event, ui) { - console.log("load.."); - }, - show: function(event, ui) { - console.log("show.."); - - var jqxhr = $.ajax({ - url: baseApiUrl + 'clients', - type: 'GET', - contentType: 'application/json', - dataType: 'json', - cache: false, - beforeSend: function(xhr) { - xhr.setRequestHeader("Authorization", "Basic " + base64); - }, - success: function(data) { - var clientObject = new Object(); - clientObject.clients = data; - console.log(clientObject); - - var tableHtml = $("#clientSearchTabTemplate").render(clientObject); - $("#searchtab").html(tableHtml); - - $('#client').change(function() { - $('#viewClient').submit(); - }); - }, - error: function(jqXHR, textStatus, errorThrown) { - handleXhrError(jqXHR, textStatus, errorThrown, "#formErrorsTemplate", "#formerrors"); - } - }); - } - }); - - var addClientSuccessFunction = function(data, textStatus, jqXHR) { - $('#dialog-form').dialog("close"); - window.location.href = 'IndivLendClient.html?clientId=' + data.entityId; - } - - $("#addclient").button().click(function(e) { - var getUrl = baseApiUrl + 'clients/template'; - var postUrl = baseApiUrl + 'clients'; - var templateSelector = "#clientFormTemplate"; - var width = 600; - var height = 350; - - popupDialogWithFormView(getUrl, postUrl, 'POST', 'dialog.title.add.client', templateSelector, width, height, addClientSuccessFunction); - - e.preventDefault(); - }); - -} - - - - - -function showILClient(baseApiUrl, clientId) { - - var tab_counter = 1; - var $newtabs = $("#newtabs").tabs({ - - "add": function( event, ui ) { - $newtabs.tabs('select', '#' + ui.panel.id); - }, - "ajaxOptions": { - type: 'GET', - dataType: 'json', - contentType: 'application/json', - cache: false, - beforeSend: function(xhr) { - xhr.setRequestHeader("Authorization", "Basic " + base64); - }, - error: function(jqXHR, status, errorThrown, index, anchor) { - handleXhrError(jqXHR, textStatus, errorThrown, "#formErrorsTemplate", "#formerrors"); - - $(anchor.hash).html("error occured while ajax loading."); - }, - success: function(data, status, xhr) { - - var currentTabIndex = $newtabs.tabs('option', 'selected'); - var currentTabAnchor = $newtabs.data('tabs').anchors[currentTabIndex]; - - var offsetToSubmittedDate = 0; - var offsetToApprovalDate = 0; - var offsetToDisbursalDate = 0; - var maxOffset = 0; // today - - if (currentTabIndex < 1) { - var tableHtml = $("#clientDataTabTemplate").render(data); - $("#clienttab").html(tableHtml); - - $("#clienttabname").html(data.displayName); - - // retrieve accounts summary info - refreshLoanSummaryInfo(); - - // bind click listeners to buttons. - $('.casflowbtn').button().click(function(e) { - var linkId = this.id; - var clientId = linkId.replace("cashflowbtn", ""); - var url = '${rootContext}portfolio/client/' + clientId + '/cashflow/new'; - window.location.href = url; - e.preventDefault(); - }); - $('button.casflowbtn span').text(jQuery.i18n.prop('dialog.button.new.cashflow.analysis')); - - $('.newloanbtn').button().click(function(e) { - var linkId = this.id; - var clientId = linkId.replace("newloanbtn", ""); - // switch to jsp page focussed on new loan application flow. - var url = '${rootContext}portfolio/client/' + clientId + '/loan/new'; - window.location.href = url; - e.preventDefault(); - }); - $('button.newloanbtn span').text(jQuery.i18n.prop('dialog.button.new.loan.application')); - - $('.addnotebtn').button().click(function(e) { - var linkId = this.id; - var clientId = linkId.replace("addnotebtn", ""); - var getAndPostUrl = baseApiUrl + 'clients/' + clientId + '/notes'; - - var templateSelector = "#noteFormTemplate"; - var width = 600; - var height = 400; - - var saveSuccessFunction = function(data, textStatus, jqXHR) { - $("#dialog-form").dialog("close"); - refreshNoteWidget(); - } - - popupDialogWithFormView(getAndPostUrl, getAndPostUrl, 'POST', "dialog.title.add.note", templateSelector, width, height, saveSuccessFunction); - e.preventDefault(); - }); - $('button.addnotebtn span').text(jQuery.i18n.prop('dialog.button.add.note')); - - refreshNoteWidget(); - - // retrieve additional info - var additionalFieldsParams = { - url: baseApiUrl, - basicAuthKey: base64, - datasetType: "portfolio_client", - datasetPKValue: data.id, - datasetTypeDiv: "clientadditionaldata", - headingPrefix: "", - headingClass: "", - labelClass: "longrowlabel", - valueClass: "rowvalue" - }; - jQuery.stretchyData.displayAllExtraData(additionalFieldsParams); - - } else { - - var tableHtml = $("#loanDataTabTemplate").render(data); - - var currentTab = $("#newtabs").children(".ui-tabs-panel").not(".ui-tabs-hide"); - currentTab.html(tableHtml); - - var curTabID = currentTab.prop("id") - - offsetToSubmittedDate = data.convenienceData.maxSubmittedOnOffsetFromToday; - offsetToApprovalDate = data.convenienceData.maxApprovedOnOffsetFromToday; - offsetToDisbursalDate = data.convenienceData.maxDisbursedOnOffsetFromToday; - - var $loantabs = $(".loantabs").tabs({ - "show": function(event, ui) { - - var curTab = $('#newtabs .ui-tabs-panel:not(.ui-tabs-hide)'); - var curTabID = curTab.prop("id") - } - }); - - $('.rejectloan').button().click(function(e) { - var linkId = this.id; - var loanId = linkId.replace("rejectbtn", ""); - var postUrl = baseApiUrl + 'loans/' + loanId + '?command=reject'; - var templateSelector = "#stateTransitionLoanFormTemplate"; - var width = 500; - var height = 350; - var defaultOffset = offsetToSubmittedDate; - popupDialogWithPostOnlyFormView(postUrl, 'dialog.title.reject.loan', templateSelector, width, height, currentTabIndex, offsetToSubmittedDate, defaultOffset, maxOffset); - e.preventDefault(); - }); - $('button.rejectloan span').text(jQuery.i18n.prop('dialog.button.reject.loan')); - - $('.withdrawnbyapplicantloan').button().click(function(e) { - var linkId = this.id; - var loanId = linkId.replace("withdrawnbyapplicantloanbtn", ""); - var postUrl = baseApiUrl + 'loans/' + loanId + '?command=withdrewbyclient'; - var templateSelector = "#stateTransitionLoanFormTemplate"; - var width = 500; - var height = 350; - var defaultOffset = offsetToSubmittedDate; - popupDialogWithPostOnlyFormView(postUrl, 'dialog.title.loan.withdrawn.by.client', templateSelector, width, height, currentTabIndex, offsetToSubmittedDate, defaultOffset, maxOffset) - e.preventDefault(); - }); - $('button.withdrawnbyapplicantloan span').text(jQuery.i18n.prop('dialog.button.withdrawn.by.client.loan')); - - $('.approveloan').button().click(function(e) { - - var linkId = this.id; - var loanId = linkId.replace("approvebtn", ""); - var postUrl = baseApiUrl + 'loans/' + loanId + '?command=approve'; - var templateSelector = "#stateTransitionLoanFormTemplate"; - var width = 500; - var height = 350; - var defaultOffset = offsetToSubmittedDate; - popupDialogWithPostOnlyFormView(postUrl, 'dialog.title.approve.loan', templateSelector, width, height, currentTabIndex, offsetToSubmittedDate, defaultOffset, maxOffset) - e.preventDefault(); - }); - $('button.approveloan span').text(jQuery.i18n.prop('dialog.button.approve.loan')); - - $('.undoapproveloan').button().click(function(e) { - - var linkId = this.id; - var loanId = linkId.replace("undoapprovebtn", ""); - var postUrl = baseApiUrl + 'loans/' + loanId + '?command=undoapproval'; - var templateSelector = "#undoStateTransitionLoanFormTemplate"; - var width = 500; - var height = 350; - var defaultOffset = offsetToSubmittedDate; - popupDialogWithPostOnlyFormView(postUrl, 'dialog.title.undo.loan.approval', templateSelector, width, height, currentTabIndex, offsetToSubmittedDate, defaultOffset, maxOffset) - e.preventDefault(); - }); - $('button.undoapproveloan span').text(jQuery.i18n.prop('dialog.button.undo.loan.approval')); - - $('.deleteloan').button().click(function(e) { - var linkId = this.id; - var loanId = linkId.replace("deletebtn", ""); - var url = baseApiUrl + 'loans/' + loanId; - var width = 400; - var height = 225; - - var redirectUrl = '${clientUrl}'; - - popupConfirmationDialogAndPost(url, 'DELETE', 'dialog.title.confirmation.required', width, height, 0, redirectUrl); - e.preventDefault(); - }); - $('button.deleteloan span').text(jQuery.i18n.prop('dialog.button.delete.loan')); - - $('.disburseloan').button().click(function(e) { - - var linkId = this.id; - var loanId = linkId.replace("disbursebtn", ""); - var postUrl = baseApiUrl + 'loans/' + loanId + '?command=disburse'; - var templateSelector = "#stateTransitionLoanFormTemplate"; - var width = 500; - var height = 350; - var defaultOffset = offsetToApprovalDate; - popupDialogWithPostOnlyFormView(postUrl, 'dialog.title.disburse.loan', templateSelector, width, height, currentTabIndex, offsetToSubmittedDate, defaultOffset, maxOffset) - e.preventDefault(); - }); - $('button.disburseloan span').text(jQuery.i18n.prop('dialog.button.disburse.loan')); - - $('.undodisbursalloan').button().click(function(e) { - - var linkId = this.id; - var loanId = linkId.replace("undodisbursalbtn", ""); - var postUrl = baseApiUrl + 'loans/' + loanId + '?command=undodisbursal'; - var templateSelector = "#undoStateTransitionLoanFormTemplate"; - var width = 500; - var height = 350; - var defaultOffset = offsetToApprovalDate; - popupDialogWithPostOnlyFormView(postUrl, 'dialog.title.undo.loan.disbursal', templateSelector, width, height, currentTabIndex, offsetToSubmittedDate, defaultOffset, maxOffset) - e.preventDefault(); - }); - $('button.undodisbursalloan span').text(jQuery.i18n.prop('dialog.button.undo.loan.disbursal')); - - $('.repaymentloan').button().click(function(e) { - - var linkId = this.id; - var loanId = linkId.replace("repaymentbtn", ""); - var getUrl = baseApiUrl + 'loans/' + loanId + '/transactions/template?command=repayment'; - var postUrl = baseApiUrl + 'loans/' + loanId + '/transactions?command=repayment'; - - var templateSelector = "#transactionLoanFormTemplate"; - var width = 500; - var height = 350; - var defaultOffset = offsetToApprovalDate; - - var saveSuccessFunction = function(data, textStatus, jqXHR) { - $("#dialog-form").dialog("close"); - $newtabs.tabs('load', currentTabIndex); - } - - popupDialogWithFormView(getUrl, postUrl, 'POST', "dialog.title.loan.repayment", templateSelector, width, height, saveSuccessFunction); - //popupDialogWithFormView(getUrl, postUrl, 'POST', 'dialog.title.loan.repayment', templateSelector, width, height, currentTabIndex, offsetToSubmittedDate, defaultOffset, maxOffset) - e.preventDefault(); - }); - $('button.repaymentloan span').text(jQuery.i18n.prop('dialog.button.loan.repayment')); - - $('.waiveloan').button().click(function(e) { - var linkId = this.id; - var loanId = linkId.replace("waivebtn", ""); - - var getUrl = baseApiUrl + 'loans/' + loanId + '/transactions/template?command=waiver'; - var postUrl = baseApiUrl + 'loans/' + loanId + '/transactions?command=waiver'; - - var templateSelector = "#transactionLoanFormTemplate"; - var width = 500; - var height = 350; - var defaultOffset = offsetToApprovalDate; - - var saveSuccessFunction = function(data, textStatus, jqXHR) { - $("#dialog-form").dialog("close"); - $newtabs.tabs('load', currentTabIndex); - } - - popupDialogWithFormView(getUrl, postUrl, 'POST', "dialog.title.waive.loan", templateSelector, width, height, saveSuccessFunction); - e.preventDefault(); - }); - $('button.waiveloan span').text(jQuery.i18n.prop('dialog.button.loan.waive')); - - $('.adjustloanrepayment').button().click(function(e) { - - var linkId = this.id; - var loanAndRepaymentId = linkId.replace("adjustrepaymentbtn", ""); - var ids = loanAndRepaymentId.split("_"); - var loanId = ids[0]; - var transactionId = ids[1]; - var getAndPostUrl = baseApiUrl + 'loans/' + loanId + '/transactions/' + transactionId; - - var templateSelector = "#transactionLoanFormTemplate"; - var width = 500; - var height = 350; - var defaultOffset = offsetToApprovalDate; - - var saveSuccessFunction = function(data, textStatus, jqXHR) { - $("#dialog-form").dialog("close"); - $newtabs.tabs('load', currentTabIndex); - } - - popupDialogWithFormView(getAndPostUrl, getAndPostUrl, 'POST', "dialog.title.adjust.loan.repayment", templateSelector, width, height, saveSuccessFunction); - e.preventDefault(); - }); - $('button.adjustloanrepayment span').text(jQuery.i18n.prop('dialog.button.adjust.loan.repayment')); - - // additional data - var additionalFieldsParams = { - url: baseApiUrl, - basicAuthKey: base64, - datasetType: "portfolio_loan", - datasetPKValue: data.id, - datasetTypeDiv: "loanadditionaldata" + data.id, - headingPrefix: "", - headingClass: "", - labelClass: "longrowlabel", - valueClass: "rowvalue" - }; - jQuery.stretchyData.displayAllExtraData(additionalFieldsParams); - } - } - } - }); -} - - // function to retrieve and display loan summary information in it placeholder - function refreshLoanSummaryInfo() { - - var jqxhr = $.ajax({ - url: baseApiUrl + 'clients/' + clientId + '/loans', - type: 'GET', - contentType: 'application/json', - dataType: 'json', - cache: false, - beforeSend: function(xhr) { - xhr.setRequestHeader("Authorization", "Basic " + base64); - }, - success: function(data, textStatus, jqXHR) { - var tableHtml = $("#clientAccountSummariesTemplate").render(data); - $("#clientaccountssummary").html(tableHtml); - - $("a.openloanaccount").click( function(e) { - var tab_title = $(this).attr('title'); - var tab_href = this.href; - - $newtabs.tabs( "add", tab_href, tab_title ); - e.preventDefault(); - }); - } - }); - - jqxhr.error(function(jqXHR, textStatus, errorThrown) { - handleXhrError(jqXHR, textStatus, errorThrown, "#formErrorsTemplate", "#formerrors"); - }); - } - - function refreshNoteWidget() { - - var noteArray = new Array(); - var arrayIndex = 0; - - var jqxhr = $.ajax({ - url: baseApiUrl + 'clients/' + clientId + '/notes', - type: 'GET', - contentType: 'application/json', - dataType: 'json', - cache: false, - beforeSend: function(xhr) { - xhr.setRequestHeader("Authorization", "Basic " + base64); - }, - success: function(data, textStatus, jqXHR) { - var noteParent = new Object(); - noteParent.title = jQuery.i18n.prop('widget.notes.heading'); - noteParent.notes = data; - - var tableHtml = $("#noteListViewTemplate").render(noteParent); - $("#clienttabrightpane").html(tableHtml); - - $('.editclientnote').click(function(e) { - var linkId = this.id; - var noteId = linkId.replace("editclientnotelink", ""); - var getAndPutUrl = baseApiUrl + 'clients/' + clientId + '/notes/' + noteId; - var templateSelector = "#noteFormTemplate"; - var width = 600; - var height = 400; - - var saveSuccessFunction = function(data, textStatus, jqXHR) { - $("#dialog-form").dialog("close"); - refreshNoteWidget(); - } - - popupDialogWithFormView(getAndPutUrl, getAndPutUrl, 'PUT', "dialog.title.edit.note", templateSelector, width, height, saveSuccessFunction); - e.preventDefault(); - }); - } - }); - - jqxhr.error(function(jqXHR, textStatus, errorThrown) { - handleXhrError(jqXHR, textStatus, errorThrown, "#formErrorsTemplate", "#formerrors"); - }); - } - - function calculateAnnualPercentageRate() { - // alert('calculating interest'); - var periodInterestRate = parseFloat($('#nominalInterestRate').val()); - if (isNaN(periodInterestRate)) { - periodInterestRate = 0; - } - - var periodsInYear = 12; - var periodType = $('#selectedInterestFrequencyOption').val(); - if (periodType == 3) { - periodsInYear = 1; - } else if (periodType == 2) { - periodsInYear = 12; - } else if (periodType == 1) { - periodsInYear = 52; - } - - var apr = parseFloat(periodsInYear * periodInterestRate); - $('#interestRatePerYear').val(Globalize.format(apr, "n4")); - } - - - diff --git a/tempjpw/resources/libs/CryptoJS-v3.0.1/components/aes-min.js b/tempjpw/resources/libs/CryptoJS-v3.0.1/components/aes-min.js deleted file mode 100644 index 4a33a39d2..000000000 --- a/tempjpw/resources/libs/CryptoJS-v3.0.1/components/aes-min.js +++ /dev/null @@ -1,10 +0,0 @@ -/* -CryptoJS v3.0.1 -code.google.com/p/crypto-js -(c) 2009-2012 by Jeff Mott. All rights reserved. -code.google.com/p/crypto-js/wiki/License -*/ -(function(){var r=CryptoJS,u=r.lib.BlockCipher,o=r.algo,g=[],v=[],w=[],x=[],y=[],z=[],p=[],q=[],s=[],t=[];(function(){for(var b=[],c=0;256>c;c++)b[c]=128>c?c<<1:c<<1^283;for(var a=0,f=0,c=0;256>c;c++){var d=f^f<<1^f<<2^f<<3^f<<4,d=d>>>8^d&255^99;g[a]=d;v[d]=a;var e=b[a],A=b[e],h=b[A],i=257*b[d]^16843008*d;w[a]=i<<24|i>>>8;x[a]=i<<16|i>>>16;y[a]=i<<8|i>>>24;z[a]=i;i=16843009*h^65537*A^257*e^16843008*a;p[d]=i<<24|i>>>8;q[d]=i<<16|i>>>16;s[d]=i<<8|i>>>24;t[d]=i;a?(a=e^b[b[b[h^e]]],f^=b[b[f]]):a=f=1}})(); -var B=[0,1,2,4,8,16,32,64,128,27,54],o=o.AES=u.extend({_doReset:function(){for(var b=this._key,c=b.words,a=b.sigBytes/4,b=4*((this._nRounds=a+6)+1),f=this._keySchedule=[],d=0;d>>24]<<24|g[e>>>16&255]<<16|g[e>>>8&255]<<8|g[e&255]):(e=e<<8|e>>>24,e=g[e>>>24]<<24|g[e>>>16&255]<<16|g[e>>>8&255]<<8|g[e&255],e^=B[d/a|0]<<24);f[d]=f[d-a]^e}c=this._invKeySchedule=[];for(a=0;aa||4>=d?e:p[g[e>>>24]]^q[g[e>>> -16&255]]^s[g[e>>>8&255]]^t[g[e&255]]},encryptBlock:function(b,c){this._doCryptBlock(b,c,this._keySchedule,w,x,y,z,g)},decryptBlock:function(b,c){var a=b[c+1];b[c+1]=b[c+3];b[c+3]=a;this._doCryptBlock(b,c,this._invKeySchedule,p,q,s,t,v);a=b[c+1];b[c+1]=b[c+3];b[c+3]=a},_doCryptBlock:function(b,c,a,f,d,e,g,h){for(var i=this._nRounds,k=b[c]^a[0],l=b[c+1]^a[1],m=b[c+2]^a[2],j=b[c+3]^a[3],n=4,r=1;r>>24]^d[l>>>16&255]^e[m>>>8&255]^g[j&255]^a[n++],p=f[l>>>24]^d[m>>>16&255]^e[j>>>8&255]^ -g[k&255]^a[n++],q=f[m>>>24]^d[j>>>16&255]^e[k>>>8&255]^g[l&255]^a[n++],j=f[j>>>24]^d[k>>>16&255]^e[l>>>8&255]^g[m&255]^a[n++],k=o,l=p,m=q;o=(h[k>>>24]<<24|h[l>>>16&255]<<16|h[m>>>8&255]<<8|h[j&255])^a[n++];p=(h[l>>>24]<<24|h[m>>>16&255]<<16|h[j>>>8&255]<<8|h[k&255])^a[n++];q=(h[m>>>24]<<24|h[j>>>16&255]<<16|h[k>>>8&255]<<8|h[l&255])^a[n++];j=(h[j>>>24]<<24|h[k>>>16&255]<<16|h[l>>>8&255]<<8|h[m&255])^a[n++];b[c]=o;b[c+1]=p;b[c+2]=q;b[c+3]=j},keySize:8});r.AES=u._createHelper(o)})(); diff --git a/tempjpw/resources/libs/CryptoJS-v3.0.1/components/aes.js b/tempjpw/resources/libs/CryptoJS-v3.0.1/components/aes.js deleted file mode 100644 index cb90e1bae..000000000 --- a/tempjpw/resources/libs/CryptoJS-v3.0.1/components/aes.js +++ /dev/null @@ -1,213 +0,0 @@ -/* -CryptoJS v3.0.1 -code.google.com/p/crypto-js -(c) 2009-2012 by Jeff Mott. All rights reserved. -code.google.com/p/crypto-js/wiki/License -*/ -(function () { - // Shortcuts - var C = CryptoJS; - var C_lib = C.lib; - var BlockCipher = C_lib.BlockCipher; - var C_algo = C.algo; - - // Lookup tables - var SBOX = []; - var INV_SBOX = []; - var SUB_MIX_0 = []; - var SUB_MIX_1 = []; - var SUB_MIX_2 = []; - var SUB_MIX_3 = []; - var INV_SUB_MIX_0 = []; - var INV_SUB_MIX_1 = []; - var INV_SUB_MIX_2 = []; - var INV_SUB_MIX_3 = []; - - // Compute lookup tables - (function () { - // Compute double table - var d = []; - for (var i = 0; i < 256; i++) { - if (i < 128) { - d[i] = i << 1; - } else { - d[i] = (i << 1) ^ 0x11b; - } - } - - // Walk GF(2^8) - var x = 0; - var xi = 0; - for (var i = 0; i < 256; i++) { - // Compute sbox - var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4); - sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63; - SBOX[x] = sx; - INV_SBOX[sx] = x; - - // Compute multiplication - var x2 = d[x]; - var x4 = d[x2]; - var x8 = d[x4]; - - // Compute sub bytes, mix columns tables - var t = (d[sx] * 0x101) ^ (sx * 0x1010100); - SUB_MIX_0[x] = (t << 24) | (t >>> 8); - SUB_MIX_1[x] = (t << 16) | (t >>> 16); - SUB_MIX_2[x] = (t << 8) | (t >>> 24); - SUB_MIX_3[x] = t; - - // Compute inv sub bytes, inv mix columns tables - var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100); - INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8); - INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16); - INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24); - INV_SUB_MIX_3[sx] = t; - - // Compute next counter - if (!x) { - x = xi = 1; - } else { - x = x2 ^ d[d[d[x8 ^ x2]]]; - xi ^= d[d[xi]]; - } - } - }()); - - // Precomputed Rcon lookup - var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]; - - /** - * AES block cipher algorithm. - */ - var AES = C_algo.AES = BlockCipher.extend({ - _doReset: function () { - // Shortcuts - var key = this._key; - var keyWords = key.words; - var keySize = key.sigBytes / 4; - - // Compute number of rounds - var nRounds = this._nRounds = keySize + 6 - - // Compute number of key schedule rows - var ksRows = (nRounds + 1) * 4; - - // Compute key schedule - var keySchedule = this._keySchedule = []; - for (var ksRow = 0; ksRow < ksRows; ksRow++) { - if (ksRow < keySize) { - keySchedule[ksRow] = keyWords[ksRow]; - } else { - var t = keySchedule[ksRow - 1]; - - if (!(ksRow % keySize)) { - // Rot word - t = (t << 8) | (t >>> 24); - - // Sub word - t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; - - // Mix Rcon - t ^= RCON[(ksRow / keySize) | 0] << 24; - } else if (keySize > 6 && ksRow % keySize == 4) { - // Sub word - t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff]; - } - - keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; - } - } - - // Compute inv key schedule - var invKeySchedule = this._invKeySchedule = []; - for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { - var ksRow = ksRows - invKsRow; - - if (invKsRow % 4) { - var t = keySchedule[ksRow]; - } else { - var t = keySchedule[ksRow - 4]; - } - - if (invKsRow < 4 || ksRow <= 4) { - invKeySchedule[invKsRow] = t; - } else { - invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ - INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; - } - } - }, - - encryptBlock: function (M, offset) { - this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); - }, - - decryptBlock: function (M, offset) { - // Swap 2nd and 4th rows - var t = M[offset + 1]; - M[offset + 1] = M[offset + 3]; - M[offset + 3] = t; - - this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); - - // Inv swap 2nd and 4th rows - var t = M[offset + 1]; - M[offset + 1] = M[offset + 3]; - M[offset + 3] = t; - }, - - _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { - // Shortcut - var nRounds = this._nRounds; - - // Get input, add round key - var s0 = M[offset] ^ keySchedule[0]; - var s1 = M[offset + 1] ^ keySchedule[1]; - var s2 = M[offset + 2] ^ keySchedule[2]; - var s3 = M[offset + 3] ^ keySchedule[3]; - - // Key schedule row counter - var ksRow = 4; - - // Rounds - for (var round = 1; round < nRounds; round++) { - // Shift rows, sub bytes, mix columns, add round key - var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++]; - var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++]; - var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++]; - var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; - - // Update state - s0 = t0; - s1 = t1; - s2 = t2; - s3 = t3; - } - - // Shift rows, sub bytes, add round key - var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]; - var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]; - var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]; - var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; - - // Set output - M[offset] = t0; - M[offset + 1] = t1; - M[offset + 2] = t2; - M[offset + 3] = t3; - }, - - keySize: 256/32 - }); - - /** - * Shortcut functions to the cipher's object interface. - * - * @example - * - * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg); - * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg); - */ - C.AES = BlockCipher._createHelper(AES); -}()); diff --git a/tempjpw/resources/libs/CryptoJS-v3.0.1/components/cipher-core-min.js b/tempjpw/resources/libs/CryptoJS-v3.0.1/components/cipher-core-min.js deleted file mode 100644 index 9c377d6ab..000000000 --- a/tempjpw/resources/libs/CryptoJS-v3.0.1/components/cipher-core-min.js +++ /dev/null @@ -1,14 +0,0 @@ -/* -CryptoJS v3.0.1 -code.google.com/p/crypto-js -(c) 2009-2012 by Jeff Mott. All rights reserved. -code.google.com/p/crypto-js/wiki/License -*/ -CryptoJS.lib.Cipher||function(r){var f=CryptoJS,e=f.lib,i=e.Base,j=e.WordArray,o=e.BufferedBlockAlgorithm,p=f.enc.Base64,s=f.algo.EvpKDF,l=e.Cipher=o.extend({cfg:i.extend(),createEncryptor:function(a,b){return this.create(this._ENC_XFORM_MODE,a,b)},createDecryptor:function(a,b){return this.create(this._DEC_XFORM_MODE,a,b)},init:function(a,b,c){this.cfg=this.cfg.extend(c);this._xformMode=a;this._key=b;this.reset()},reset:function(){o.reset.call(this);this._doReset()},process:function(a){this._append(a); -return this._process()},finalize:function(a){a&&this._append(a);return this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){return function(a){return{encrypt:function(b,c,d){return("string"==typeof c?q:g).encrypt(a,b,c,d)},decrypt:function(b,c,d){return("string"==typeof c?q:g).decrypt(a,b,c,d)}}}}()});e.StreamCipher=l.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var k=f.mode={},t=e.BlockCipherMode=i.extend({createEncryptor:function(a, -b){return this.Encryptor.create(a,b)},createDecryptor:function(a,b){return this.Decryptor.create(a,b)},init:function(a,b){this._cipher=a;this._iv=b}}),k=k.CBC=function(){function a(a,b,m){var h=this._iv;h?this._iv=r:h=this._prevBlock;for(var e=0;e>>0?1:0);o.high=i;o.low=b}var W=k&Q^~k&R,p=h&z^~h&A,o=j&w^j&x^w&x,S=g&t^g&u^t&u,m=(j>>>28|g<<4)^(j<<30|g>>>2)^(j<<25|g>>>7),q=(g>>>28|j<<4)^(g<<30|j>>>2)^(g<<25|j>>>7),c=da[l],ea=c.high,ca=c.low,c=B+((h>>>14|k<<18)^(h>>>18|k<<14)^(h<<23|k>>>9)),n=V+((k>>>14|h<<18)^(k>>>18|h<<14)^(k<<23|h>>>9))+(c>>>0>>0?1:0),c=c+p,n=n+W+(c>>>0
>>0?1:0),c=c+ca,n=n+ea+
-(c>>>0 >>24]^f[n>>>16&255]^h[o>>>8&255]^l[q&255]^d[r++],v=e[n>>>24]^f[o>>>16&255]^h[q>>>8&255]^
-l[m&255]^d[r++],w=e[o>>>24]^f[q>>>16&255]^h[m>>>8&255]^l[n&255]^d[r++],q=e[q>>>24]^f[m>>>16&255]^h[n>>>8&255]^l[o&255]^d[r++],m=u,n=v,o=w;u=(i[m>>>24]<<24|i[n>>>16&255]<<16|i[o>>>8&255]<<8|i[q&255])^d[r++];v=(i[n>>>24]<<24|i[o>>>16&255]<<16|i[q>>>8&255]<<8|i[m&255])^d[r++];w=(i[o>>>24]<<24|i[q>>>16&255]<<16|i[m>>>8&255]<<8|i[n&255])^d[r++];q=(i[q>>>24]<<24|i[m>>>16&255]<<16|i[n>>>8&255]<<8|i[o&255])^d[r++];a[c]=u;a[c+1]=v;a[c+2]=w;a[c+3]=q},keySize:8});q.AES=i._createHelper(f)})();
diff --git a/tempjpw/resources/libs/CryptoJS-v3.0.1/rollups/hmac-md5.js b/tempjpw/resources/libs/CryptoJS-v3.0.1/rollups/hmac-md5.js
deleted file mode 100644
index 23f0f795d..000000000
--- a/tempjpw/resources/libs/CryptoJS-v3.0.1/rollups/hmac-md5.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-CryptoJS v3.0.1
-code.google.com/p/crypto-js
-(c) 2009-2012 by Jeff Mott. All rights reserved.
-code.google.com/p/crypto-js/wiki/License
-*/
-var CryptoJS=CryptoJS||function(l,q){var g={},i=g.lib={},p=i.Base=function(){function a(){}return{extend:function(f){a.prototype=this;var c=new a;f&&c.mixIn(f);c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.$super.extend(this)}}}(),m=i.WordArray=p.extend({init:function(a,f){a=
-this.words=a||[];this.sigBytes=f!=q?f:4*a.length},toString:function(a){return(a||r).stringify(this)},concat:function(a){var f=this.words,c=a.words,d=this.sigBytes,a=a.sigBytes;this.clamp();if(d%4)for(var b=0;b>>2]|=(c[b>>>2]>>>24-8*(b%4)&255)<<24-8*((d+b)%4);else if(65535 >>0?1:0);P=k.low=P+G;k.high=ba+S+(P>>>0>>0?1:0),V=R,B=A,R=Q,A=z,Q=k,z=h,h=y+c|0,k=U+n+(h>>>0