PATH:
home
/
thebhoeo
/
.trash
/
backwpup
/
vendor
/
inpsyde
/
backwpup-restore-shared
/
resources
/
js
window.BWU=window.BWU||{},window.BWU.Restore=window.BWU.Restore||{},window.BWU.Restore.Factory=window.BWU.Restore.Factory||{},((h,p,a,s)=>{function r(e,t){var s=h.Restore.FactoryDatabase(this.url,this.nonce,JSON.stringify({dbhost:document.querySelector("#db_host").value.trim(),dbname:document.querySelector("#db_name").value.trim(),dbuser:document.querySelector("#db_user").value.trim(),dbpassword:document.querySelector("#db_pw").value.trim(),dbcharset:document.querySelector("#db_charset").value.trim()}));e?p.isFunction(t)&&s.saveConnectionSettings(t):s.testConnection()}function e(e,t){let s={message:""};t&&t.data&&(s=JSON.parse(t.data)),!e.state&&s.message!==h.States.NEED_DECRYPTION_KEY||this.decrypter.needDecryption(e.state)}function n(e){return e.preventDefault(),h.Restore.Functions.loadNextStep(parseInt(e.currentTarget.getAttribute("data-next-step"),10),this.nonce),this}function t(){a("#submit_decrypt_key").on("click",function(){this.decrypter.decrypt({backwpup_action_nonce:this.nonce,encrypted_file_path:this.urlParser("?restore_file")})}.bind(this)),a("body").on(this.ACTION_UPLOAD_SUCCESS,function(){a(".restore-progress-container .progressbar").fadeIn(function(){this.decompresser.decompress()}.bind(this))}.bind(this)),this.downloader&&(a("body").on(this.downloader.ACTION_DOWNLOAD_REQUIRE_DECRYPTION,e.bind(this)),a("body").on(this.downloader.ACTION_DOWNLOAD_SUCCESS,this.decompresser.decompress)),a("body").on(this.decrypter.ACTION_DECRYPTION_SUCCESS,this.decompresser.decompress),a("body").on(this.decompresser.ACTION_DECOMPRESS_FAILED,e.bind(this)),a("body").on(this.decompresser.ACTION_DECOMPRESS_SUCCESS,function(){h.Restore.Functions.loadNextStep(2,this.nonce)}.bind(this))}var f={step1:function(){return this.downloader&&function(){if(!this.urlParser("?trigger_download"))return!1;a(this.uploadElement).hide(),a("#upload_progress").text(s.downloadingArchive),a(".restore-progress-container .progressbar").fadeIn(),this.downloader.download()}.call(this),function(){return this.uploader=new this.uploader.Uploader({runtimes:"html5,flash,silverlight,html4",browse_button:"plupload-browse-button",drop_element:"drag-drop-area",multi_selection:!1,url:this.url+"?action=upload&backwpup_action_nonce="+this.nonce,chunk_size:"2mb",filters:{max_file_size:"0",mime_types:[{title:"Zip files",extensions:"zip,tar,tar.gz,tar.bz2,sql,sql.gz"}]},flash_swf_url:"components/moxie/bin/flash/Moxie.swf",silverlight_xap_url:"components/moxie/bin/silverlight/Moxie.xap",id:"restore",init:{FilesAdded:function(){a(this.uploadElement).hide(),this.uploader.start()}.bind(this),UploadProgress:function(e,t){t=Number.isFinite(t.percent)?t.percent:0;a("#upload_progress").text(s.uploadingArchive+` ${t}%`)},FileUploaded:function(e,t){-1===t.name.indexOf(".sql")&&a("body").trigger(this.ACTION_UPLOAD_SUCCESS,e,t)}.bind(this),Error:function(e,t){h.Functions.printMessageError(t.message,a("#restore_step")),a("body").trigger(this.ACTION_UPLOAD_FAILED,e,t)}}}),this.uploader.init(),this}.call(this),a(this.uploadElement).on("dragover",function(){a(this.uploadElement).addClass("drag-drop-active")}.bind(this)).on("dragleave",function(){a(this.uploadElement).removeClass("drag-drop-active")}.bind(this)).on("drop",function(){a(this.uploadElement).removeClass("drag-drop-active")}.bind(this)),this},step2:function(){return a(".restore-select-strategy").on("click",function(e){e.preventDefault(),this.strategy.save(e.currentTarget.getAttribute("data-strategy"),()=>n.call(this,e))}.bind(this)),this},step3:function(){this.strategy.retrieve(function(e){"files only restore"===e?.data?.message&&h.Restore.Functions.loadNextStep(4,this.nonce)}.bind(this));var t=this;return a("#db_edit_btn").on("click",function(e){e.preventDefault(),a("#db-settings-form").find("input").removeAttr("readonly"),a("#db_host").focus()}),a("#db_test_btn").on("click",function(e){e.preventDefault(),r.call(t,!1)}),a("#db_form_continue_btn").on("click",function(e){e.preventDefault(),r.call(t,!0,function(){n.call(t,e)})}),this},step4:function(){return this.strategy.retrieve(function(e){"files only restore"===e?.data?.message&&h.Restore.Functions.loadNextStep(5,this.nonce)}.bind(this)),a("#do-migrate").on("change",function(t){this.migrate.retrieve(function(e){1==t.currentTarget.checked?(a("#migration-old-url").val(e.data.message),a("#migration-settings-container").removeClass("hidden")):a("#migration-settings-container").addClass("hidden")})}.bind(this)),a("#migration-form-continue-btn").on("click",function(t){t.preventDefault(),a("#do-migrate").is(":checked")?this.migrate.save(a("#migration-old-url").val(),a("#migration-new-url").val(),function(e){!0===e.success?n.call(this,t):h.Functions.printMessageError(e.data.message,a("#restore_step"))}):n.call(this,t)}.bind(this)),this},step5:function(){return a("#start-restore").on("click",function(e){e.preventDefault();function r(){h.Restore.Functions.loadNextStep(6,o.nonce)}function n(e){o.filesrestore.options=o.filesrestore.options||{},o.filesrestore.options.onSuccessCallback=e}function i(e){o.databaserestore.options=o.databaserestore.options||{},o.databaserestore.options.onSuccessCallback=e}var o=this;this.strategy.retrieve(function(e){let t=e&&e.data?e.data.message:null;var s;t||(s="1"===(e=document.querySelector("#restore_step"))?.getAttribute("data-has-db"),(e="1"===e?.getAttribute("data-has-files"))&&!s&&(t="files only restore"),s&&!e&&(t="db only restore")),"complete restore"===t?(i(r),n(function(){o.databaserestore.init().restore()}),o.filesrestore.init().restore()):"db only restore"===t?(o.filesrestore.options=o.filesrestore.options||{},o.filesrestore.options.onSuccessCallback=function(){},i(r),o.databaserestore.init().restore()):"files only restore"===t?(n(r),o.filesrestore.init().restore()):h.Functions.printMessageError(`Unknown restore strategy ${t}. Please restart the restore wizard.`,a("#restore_step"))})}.bind(this)),this},init:function(){return t.call(this),this},construct:function(e,t,s,r,n,i,o,a,d,c,l,u){return p.bindAll(this,"step1","step2","step3","step4","step5","init"),this.url=e,this.nonce=t,this.urlParser=s,this.uploadElement=n,this.uploader=r,this.strategy=i,this.databaserestore=o,this.filesrestore=a,this.decompresser=d,this.downloader=c,this.decrypter=l,this.migrate=u,this}};h.Restore.FactoryController=function(e,t,s,r,n,i,o,a,d,c,l,u){return Object.create(f,{ACTION_UPLOAD_SUCCESS:h.Functions.makeConstant("backwpup.upload_success"),ACTION_UPLOAD_FAILED:h.Functions.makeConstant("backwpup.upload_error")}).construct(e,t,s,r,n,i,o,a,d,c,l,u)}})(window.BWU,window._,window.jQuery,window.backwpupRestoreLocalized);
[-] decrypter.js
[edit]
[-] database-restore.js
[edit]
[-] database.min.js
[edit]
[-] restore-functions.min.js
[edit]
[-] database.js
[edit]
[-] decompress.js
[edit]
[-] restore-functions.js
[edit]
[-] decompress.min.js
[edit]
[-] migrate.min.js
[edit]
[-] strategy.js
[edit]
[+]
..
[-] controller.js
[edit]
[-] download.js
[edit]
[-] files-restore.min.js
[edit]
[-] strategy.min.js
[edit]
[-] database-restore.min.js
[edit]
[-] controller.min.js
[edit]
[-] download.min.js
[edit]
[-] files-restore.js
[edit]
[-] migrate.js
[edit]
[-] decrypter.min.js
[edit]