!function(t){function e(r){if(s[r])return s[r].exports;var n=s[r]={exports:{},id:r,loaded:!1};return t[r].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var s={};return e.m=t,e.c=s,e.p="",e(0)}([function(t,e,s){var r=s(3);t.exports={el:"#update",data:function(){return _.extend({view:"index",status:"success",finished:!1,update:!1,output:"",progress:0,releases:[],errors:[]},window.$data)},created:function(){this.getVersions()},computed:{hasUpdate:function(){return this.update&&r.compare(this.update.version,this.version,">")}},methods:{getVersions:function(){this.$http.get(this.api+"/api/update",{version:this.version}).then(function(t){var e=t.data,s=e["nightly"==this.channel?"nightly":"latest"];s?(this.update=s,this.releases=e.versions):this.error(this.$trans("Cannot obtain versions. Please try again later."))},function(){this.error(this.$trans("Cannot connect to the server. Please try again later."))})},install:function(){this.$set("view","installation"),this.doDownload(this.update)},doDownload:function(t){this.$set("progress",33),this.$http.post("admin/system/update/download",{url:t.url}).then(this.doInstall,this.error)},doInstall:function(){var t=this;this.$set("progress",66),this.$http.get("admin/system/update/update",null,{xhr:{onprogress:function(){t.setOutput(this.responseText)}}}).then(this.doMigration,this.error)},doMigration:function(){this.$set("progress",100),"success"===this.status?this.$http.get("admin/system/migration/migrate").then(function(t){var e=t.data;this.output+="\n\n"+e.message,this.finished=!0},this.error):this.error()},setOutput:function(t){var e=t.split("\n"),s=e[e.length-1].match(/^status=(success|error)$/);s?(this.status=s[1],delete e[e.length-1],this.output=e.join("\n")):this.output=t},error:function(t){this.errors.push(t.data||this.$trans("Whoops, something went wrong.")),this.status="error",this.finished=!0}},filters:{changelog:function(t){var e,s=new marked.Renderer;return s.heading=function(t){return e=t,""},s.listitem=function(t){switch(e){case"Added":return'<li><span class="uk-badge pk-badge-justify uk-badge-success uk-margin-right">'+e+"</span> "+t+"</li>";case"Deprecated":return'<li><span class="uk-badge pk-badge-justify uk-badge-warning uk-margin-right">'+e+"</span> "+t+"</li>";case"Removed":return'<li><span class="uk-badge pk-badge-justify uk-badge-warning uk-margin-right">'+e+"</span> "+t+"</li>";case"Fixed":return'<li><span class="uk-badge pk-badge-justify uk-badge-danger uk-margin-right">'+e+"</span> "+t+"</li>";case"Security":return'<li><span class="uk-badge pk-badge-justify uk-badge-danger uk-margin-right">'+e+"</span> "+t+"</li>";default:return'<li><span class="uk-badge pk-badge-justify uk-margin-right">'+e+"</span> "+t+"</li>"}},s.list=function(t){return t},marked(t,{renderer:s})},showChangelog:function(t){return r.compare(t,this.version,">")}}},Vue.ready(t.exports)},,,function(t,e){e.compare=function(t,e,s){this.php_js=this.php_js||{},this.php_js.ENV=this.php_js.ENV||{};var r,n,a=0,i={dev:-6,alpha:-5,a:-5,beta:-4,b:-4,RC:-3,rc:-3,"#":-2,p:1,pl:1},u=function(t){return t=(""+t).replace(/[_\-+]/g,"."),t=t.replace(/([^.\d]+)/g,".$1.").replace(/\.{2,}/g,"."),t.length?t.split("."):[-8]},o=function(t){return t?isNaN(t)?i[t]||-7:parseInt(t,10):0};for(t=u(t),e=u(e),n=Math.max(t.length,e.length),r=0;n>r;r++)if(t[r]!=e[r]){if(t[r]=o(t[r]),e[r]=o(e[r]),t[r]<e[r]){a=-1;break}if(t[r]>e[r]){a=1;break}}if(!s)return a;switch(s){case">":case"gt":return a>0;case">=":case"ge":return a>=0;case"<=":case"le":return 0>=a;case"==":case"=":case"eq":return 0===a;case"<>":case"!=":case"ne":return 0!==a;case"":case"<":case"lt":return 0>a;default:return null}}}]);