File: /www/server/panel/BTPanel/static/js/index-legacy513.js
!function(){function t(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var n,r,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.toStringTag||"@@toStringTag";function c(t,o,i,a){var c=o&&o.prototype instanceof s?o:s,f=Object.create(c.prototype);return e(f,"_invoke",function(t,e,o){var i,a,c,s=0,f=o||[],l=!1,p={p:0,n:0,v:n,a:m,f:m.bind(n,4),d:function(t,e){return i=t,a=0,c=n,p.n=e,u}};function m(t,e){for(a=t,c=e,r=0;!l&&s&&!o&&r<f.length;r++){var o,i=f[r],m=p.p,d=i[2];t>3?(o=d===e)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=n):i[0]<=m&&((o=t<2&&m<i[1])?(a=0,p.v=e,p.n=i[1]):m<d&&(o=t<3||i[0]>e||e>d)&&(i[4]=t,i[5]=e,p.n=d,a=0))}if(o||t>1)return u;throw l=!0,e}return function(o,f,d){if(s>1)throw TypeError("Generator is already running");for(l&&1===f&&m(f,d),a=f,c=d;(r=a<2?n:c)||!l;){i||(a?a<3?(a>1&&(p.n=-1),m(a,c)):p.n=c:p.v=c);try{if(s=2,i){if(a||(o="next"),r=i[o]){if(!(r=r.call(i,c)))throw TypeError("iterator result is not an object");if(!r.done)return r;c=r.value,a<2&&(a=0)}else 1===a&&(r=i.return)&&r.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=n}else if((r=(l=p.n<0)?c:t.call(e,p))!==u)break}catch(r){i=n,a=1,c=r}finally{s=1}}return{value:r,done:l}}}(t,i,a),!0),f}var u={};function s(){}function f(){}function l(){}r=Object.getPrototypeOf;var p=[][i]?r(r([][i]())):(e(r={},i,function(){return this}),r),m=l.prototype=s.prototype=Object.create(p);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,e(t,a,"GeneratorFunction")),t.prototype=Object.create(m),t}return f.prototype=l,e(m,"constructor",l),e(l,"constructor",f),f.displayName="GeneratorFunction",e(l,a,"GeneratorFunction"),e(m),e(m,a,"Generator"),e(m,i,function(){return this}),e(m,"toString",function(){return"[object Generator]"}),(t=function(){return{w:c,m:d}})()}function e(t,n,r,o){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}e=function(t,n,r,o){function a(n,r){e(t,n,function(t){return this._invoke(n,r,t)})}n?i?i(t,n,{value:r,enumerable:!o,configurable:!o,writable:!o}):t[n]=r:(a("next",0),a("throw",1),a("return",2))},e(t,n,r,o)}function n(t,e,n,r,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,o)}function r(t){return function(){var e=this,r=arguments;return new Promise(function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,u,"next",t)}function u(t){n(a,o,i,c,u,"throw",t)}c(void 0)})}}System.register(["./index-legacy118.js?v=1777008528","./utils-lib-legacy.js?v=1777008528","./index-legacy3.js?v=1777008528","./base-lib-legacy.js?v=1777008528","./__commonjsHelpers__-legacy.js?v=1777008528","./index-legacy119.js?v=1777008528","./index-legacy116.js?v=1777008528"],function(e,n){"use strict";var o,i,a,c,u,s,f,l,p,m,d,y,b,v,h,g,w,j,k,_,x,O,T,P,S,G,N,q,E;return{setters:[function(t){o=t._},function(t){i=t.w,a=t.k,c=t.R,u=t.d3,s=t.d4,f=t.f},function(t){l=t.e,p=t.g,m=t.bO,d=t.bP,y=t.W,b=t.bQ,v=t.bR,h=t.bS,g=t.bT,w=t.bU,j=t.bV,k=t.bW},function(t){_=t.c,x=t._,O=t.r,T=t.aF,P=t.o,S=t.j,G=t.k,N=t.e,q=t.v,E=t.p},null,null,null],execute:function(){var n={class:"py-[1rem] px-16px"};e("default",_({__name:"index",props:{compData:{default:function(){return{}}}},emits:["close"],setup:function(e,_){var D,F=_.expose,R=_.emit,C=f(),L=e,V=R,W=x("fileTableRef"),A=O(L.compData.editorTabsActive.history||[]),H=[{label:"删除",value:"del",event:(D=r(t().m(function e(n,r,o,c,u,s){return t().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,i({title:"提示",width:"35rem",content:"是否删除选中历史文件?删除历史文件后,将无法恢复!"});case 1:return t.n=2,a({loading:"正在删除历史文件,请稍后...",request:m({filename:d.path,history:o.value.map(function(t){return t.time}).join(",")}),message:!0});case 2:t.v.status&&(null==u||u(),I()),t.n=4;break;case 3:t.p=3,t.v;case 4:return t.a(2)}},e,null,[[0,3]])})),function(t,e,n,r,o,i){return D.apply(this,arguments)})}],Q=function(){var e=r(t().m(function e(n){return t().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i({title:"恢复历史文件",content:"是否恢复历史文件 ".concat(c(Number(n.time)),"?恢复历史文件后,当前文件内容将会被替换!")});case 1:a({loading:"正在恢复历史文件,请稍后...",request:y({filename:d.path,history:n.time}),message:!0,success:function(t){t.status&&(L.compData.callback(),I())}});case 2:return t.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),U=function(){var e=r(t().m(function e(n){var r,o,i;return t().w(function(t){for(;;)switch(t.n){case 0:return r={filename:d.path,history:n.time},t.n=1,a({request:b(r)});case 1:if(o=t.v,i=v(d.id),!o.status){t.n=4;break}return h.value={id:d.id,st_mtime:n.time,path:d.path,type:"editor"},V("close"),t.n=2,g({title:"".concat(d.title," <-> ").concat(d.title),type:"diff",mode:"diff",path:d.path});case 2:return t.n=3,w({mode:"ace/mode/".concat(d.mode),left:{content:o.data.data,editable:!1,copyLinkEnabled:!1},right:{content:i.getValue(),editable:!1,copyLinkEnabled:!1}});case 3:t.n=5;break;case 4:C.request(o);case 5:return t.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),z=function(){var e=r(t().m(function e(n){return t().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i({title:"删除历史文件",content:"是否删除历史文件 ".concat(c(Number(n.time)),"?删除历史文件后,将无法恢复!")});case 1:a({loading:"正在删除历史文件,请稍后...",request:j({filename:d.path||"",history:n.time}),message:!0,success:function(t){t.status&&I()}});case 2:return t.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),B=[l({key:"time"}),{label:"版本时间",prop:"time",render:function(t){var e,n;return T("span",{},(e=t.time,n=new Date(1e3*Number(e)),isNaN(n.getTime())?e:c(n)))}},p([{onClick:U,width:65,title:"文件对比"},{onClick:Q,title:"恢复"},{onClick:z,title:"删除"}])],I=function(){var e=r(t().m(function e(){var n,r;return t().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,k(d.path);case 1:n=t.v,r=n.data,A.value=r.historys.map(function(t){return{time:t}}),t.n=3;break;case 2:t.p=2,t.v;case 3:return t.a(2)}},e,null,[[0,2]])}));return function(){return e.apply(this,arguments)}}();return P(function(){I()}),F({}),function(t,e){var r=u,i=s,a=o;return S(),G("div",n,[N(a,null,{content:q(function(){return[N(r,{ref_key:"fileTableRef",ref:W,height:"40rem",column:B,description:"列表为空",data:E(A)},null,8,["data"])]}),"footer-left":q(function(){return[N(i,{options:H,"table-ref":E(W)},null,8,["table-ref"])]}),_:1})])}}}))}}})}();