UNPKG

filecat

Version:
2 lines 135 kB
/*! For license information please see 523.41bd2935b9fda5d375db.js.LICENSE.txt */ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[523],{447:(e,t,n)=>{n.d(t,{WA:()=>p,ZI:()=>m,Zp:()=>f,fq:()=>y,gz:()=>v,uF:()=>d,xP:()=>h});var r=n(6540),o=n(3413),a=n.n(o),i=n(505);function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var u=function(e){return e[e.common=0]="common",e[e.full=1]="full",e}(u||{});function s(e,t){var n=t===u.common?"card-content":t===u.full?"card-content full":"";return r.createElement("div",{className:"card",style:{}},r.createElement("div",{className:"card-title"},e.self_title?e.self_title:r.createElement("h2",null,e.title),r.createElement("div",{className:"not-select-div"},e.titleCom&&e.titleCom)),r.createElement("div",{className:n},e.children),r.createElement("div",{className:"card-action card-action-bottom-right"},e.rightBottomCom))}function f(e){return s(e,u.common)}function d(e){return s(e,u.full)}function h(e){var t,n,o,c=(0,r.useRef)(null);return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(t=e.context)&&void 0!==t?t:e.children),r.createElement("div",{className:"card-text-tip",ref:c,onClick:function(){var t,n;(0,i.l)(null!==(t=null!==(n=e.tip_context)&&void 0!==n?n:e.context)&&void 0!==t?t:e.children),new(a())({type:"info",text:"复制完成",timeout:1e3,layout:"bottomLeft"}).show()}},null!==(n=null!==(o=e.tip_context)&&void 0!==o?o:e.context)&&void 0!==n?n:e.children))}function p(e){var t,n;return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(t=e.context)&&void 0!==t?t:e.children),r.createElement("div",{className:"card-text-tip"},null!==(n=e.context)&&void 0!==n?n:e.children))}function m(e){var t,n;return r.createElement("div",{className:"card floating",onKeyPress:function(t){"Enter"===t.key&&e.confirm_enter&&e.confirm_enter()}},r.createElement("div",{className:"card-title"},r.createElement("h2",null,e.title)),r.createElement("div",{className:"card-content"},e.context&&e.context.map((function(e,t){return r.createElement("div",{key:t},e)}))),r.createElement("div",{className:"card-action"},r.createElement("button",{className:"button button--flat button--grey",onClick:e.cancel},null!==(t=e.cancel_t)&&void 0!==t?t:"cancel"),r.createElement("button",{className:"button button--flat",onClick:e.confirm},null!==(n=e.confirm_t)&&void 0!==n?n:"confirm")))}function v(e){return r.createElement("div",{className:"progress-card"},r.createElement("div",{className:"progress-per"},r.createElement("div",{style:{width:"".concat(e.progress,"%")}})))}var y=function(e){var t=c((0,r.useState)("var(--iconTertiary)"),2),n=t[0],o=t[1];(0,r.useEffect)((function(){void 0===e.ok?void 0===e.success?void 0!==e.running&&o("var(--icon-yellow)"):!0===e.success?o("var(--icon-green)"):!1===e.success&&o("var(--icon-red)"):o(e.ok?"var(--icon-green)":"var(--iconTertiary)")}),[e]);var a={width:"10px",height:"10px",borderRadius:"50%",backgroundColor:n,display:"inline-block"};return r.createElement("div",{style:a})}},505:(e,t,n)=>{function r(e){var t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.left="-9999px",document.body.appendChild(t),t.select(),t.setSelectionRange(0,99999),document.execCommand("copy"),document.body.removeChild(t)}n.d(t,{l:()=>r})},3033:(e,t,n)=>{n.d(t,{$Z:()=>u,GL:()=>m,Sm:()=>f,U6:()=>p,cA:()=>d,l6:()=>h});var r=n(6540);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==o(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u(e){var t=(0,r.useRef)(null),n=c(r.useState(""),2),o=n[0],a=n[1];return(0,r.useEffect)((function(){var n=e.value;null==n&&(n=""),t.current.value=n,a(e.value||"")}),[e.value]),r.createElement("div",{id:"search",className:"",style:{maxWidth:e.max_width,display:e.not_mobile?"block":void 0}},r.createElement("div",{id:"input"},r.createElement("i",{className:"material-icons"},e.icon),r.createElement("input",{type:"text",ref:t,placeholder:o||e.placeholder,onChange:function(t){e.handleInputChange&&e.handleInputChange(t.target.value,t.target),a(t.target.value)},onKeyPress:function(t){"Enter"===t.key&&e.handleEnterPress&&e.handleEnterPress()}})))}function s(e){var t=(0,r.useRef)(null),n=c(r.useState(""),2),o=n[0],a=n[1],i=c(r.useState("input input--block"),2),l=i[0],u=i[1];return(0,r.useEffect)((function(){a(void 0===e.value||null===e.value?"":e.value),e.focus&&t.current.focus(),e.no_border&&u("".concat(l," input--no_border"))}),[e.value]),r.createElement(r.Fragment,null,e.placeholderOut&&r.createElement("p",null,e.placeholderOut),r.createElement("div",{style:{display:"flex",alignItems:"center",width:e.width,maxWidth:e.maxWidth}},e.left_placeholder&&r.createElement("div",{style:{paddingRight:".3rem",width:"auto",whiteSpace:"nowrap"}},e.left_placeholder),r.createElement("input",{onClick:function(e){e.stopPropagation()},disabled:!!e.disabled,className:l,type:e.type,placeholder:o||e.placeholder,onChange:function(t){e.handleInputChange&&e.handleInputChange(t.target.value,t.target),a(t.target.value)},onKeyPress:function(t){"Enter"===t.key&&e.handlerEnter&&e.handlerEnter(t.target.value)},value:o,ref:t}),e.right_placeholder&&r.createElement("div",{style:{paddingLeft:".3rem",width:"auto",whiteSpace:"nowrap"}},e.right_placeholder)))}function f(e){return s(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e))}function d(e){return s({placeholder:e.placeholder,type:"password",handleInputChange:e.handleInputChange,handlerEnter:e.handleEnterPress,maxWidth:e.maxWidth,width:e.width})}function h(e){return r.createElement("div",{style:{display:"flex"}},e.tip&&r.createElement("p",{className:"input input_left "},e.tip),r.createElement("select",{defaultValue:e.defaultValue,value:e.value,style:{width:e.width},disabled:!!e.disabled,className:"input input--block ".concat(e.no_border?"input--no_border":""),onChange:function(t){return e.onChange(t.target.value)}},e.options.map((function(e,t){return r.createElement("option",{key:t,value:e.value},e.title)}))))}function p(e){var t;return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"radio",checked:e.selected,name:null!==(t=e.name)&&void 0!==t?t:"common_name",value:e.value,className:"input_radio",onChange:function(){e.onchange&&e.onchange(e.value)}}),e.context)}function m(e){var t,n=c((0,r.useState)(!1),2),o=n[0],a=n[1];return(0,r.useEffect)((function(){a(!!e.selected)}),[e.selected]),r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"checkbox",disabled:null!==(t=e.is_disable)&&void 0!==t&&t,checked:o,onChange:function(){e.onchange&&e.onchange()}}),e.context)}},3496:(e,t,n)=>{n.d(t,{s:()=>r});var r=function(e){return e.setting_sys_option_status_save="sys_option/status/save",e.setting_customer_router="customer_router",e.setting_customer_router_save="customer_router/save",e.setting_customer_workflow_router="customer_router/workflow",e.setting_customer_workflow_router_save="customer_router/workflow/save",e.user_save_user_file_list_show_type="save_user_file_list_show_type",e}({})},4777:(e,t,n)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}function a(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Gd:()=>u,U$:()=>f,aM:()=>l,jk:()=>s});var l=function(e){return e[e.close=0]="close",e[e.length=1]="length",e[e.forver=2]="forver",e}({}),u=a((function e(){c(this,e)})),s=function(e){return e.ffmpeg="ffmpeg",e.smartmontools="smartmontools",e.ntfs_3g="ntfs_3g",e}({}),f=function(e){return e[e.auth=0]="auth",e[e.cmd=1]="cmd",e[e.cyc=2]="cyc",e}({})},7481:(e,t,n)=>{n.d(t,{S:()=>c,X:()=>i});var r=n(6540);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function i(e){var t,n=o(r.useState([]),2),a=n[0],i=n[1];return(0,r.useEffect)((function(){e.children?i(Array.isArray(e.children)?e.children:[e.children]):i(e.rows)}),[e.rows,e.children]),r.createElement("table",null,r.createElement("thead",null,r.createElement("tr",null,null===(t=e.headers)||void 0===t?void 0:t.map((function(e,t){return r.createElement("th",{key:t},e)})))),r.createElement("tbody",null,a.map((function(t,n){return r.createElement("tr",{key:n},t.map((function(t,n){var o;return r.createElement("td",{style:{width:null!==(o=e.width)&&void 0!==o?o:"auto"},key:n,className:n===a.length-1?"small":""},t)})))}))))}function c(e){return r.createElement("div",{style:{display:e.isFlex?"flex":"block"}},e.columns.map((function(e,t){return r.createElement("div",{key:t},e)})))}},8523:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Me});var r=n(6540),o=n(5725),a=n(3430),i=n(3413),c=n.n(i),l=n(6007),u=n(3459),s=n(447),f=n(5997),d=n(3033),h=n(7481),p=n(2389);function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function v(e){return function(e){if(Array.isArray(e))return E(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||w(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(){y=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var a=t&&t.prototype instanceof g?t:g,i=Object.create(a.prototype),c=new V(r||[]);return o(i,"_invoke",{value:O(e,n,c)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",h="suspendedYield",p="executing",v="completed",_={};function g(){}function b(){}function w(){}var E={};u(E,i,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(N([])));k&&k!==n&&r.call(k,i)&&(E=k);var S=w.prototype=g.prototype=Object.create(E);function L(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function C(e,t){function n(o,a,i,c){var l=f(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==m(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function O(t,n,r){var o=d;return function(a,i){if(o===p)throw Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=A(c,r);if(l){if(l===_)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var u=f(t,n,r);if("normal"===u.type){if(o=r.done?v:h,u.arg===_)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=v,r.method="throw",r.arg=u.arg)}}}function A(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,A(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),_;var a=f(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,_;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,_):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,_)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function V(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function N(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(m(t)+" is not iterable")}return b.prototype=w,o(S,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:b,configurable:!0}),b.displayName=u(w,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,u(e,l,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},L(C.prototype),u(C.prototype,c,(function(){return this})),t.AsyncIterator=C,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new C(s(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},L(S),u(S,l,"Generator"),u(S,i,(function(){return this})),u(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=N,V.prototype={constructor:V,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,_):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),_},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),_}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;I(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),_}},t}function _(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function g(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){_(a,r,o,i,c,"next",e)}function c(e){_(a,r,o,i,c,"throw",e)}i(void 0)}))}}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||w(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){if(e){if("string"==typeof e)return E(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function x(e){var t=(0,p.Bd)().t,n=b((0,r.useState)([]),2),a=n[0],i=n[1],c=function(){var t=g(y().mark((function t(){var n;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.getItems){t.next=5;break}return t.next=3,e.getItems();case 3:n=t.sent,i(n);case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,r.useEffect)((function(){c()}),[]);var l=function(){var t=g(y().mark((function t(){return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.save){t.next=3;break}return t.next=3,e.save(a);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return r.createElement(o.xh,null,r.createElement(s.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,e.title),e.info_click&&r.createElement(f.rA,{icon:"info",onClick:function(){e.info_click()},title:"信息"})),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"add",title:t("添加"),onClick:function(){for(var t=[],n=0;n<e.headers.length-1;n++)t.push("");i([t].concat(v(a)))}}),r.createElement(f.rA,{icon:"save",title:t("保存"),onClick:l}))},r.createElement(h.X,{headers:e.headers,rows:a.map((function(n,o){for(var c=[],l=function(e){c.push(r.createElement(d.Sm,{value:n[e],handleInputChange:function(t){n[e]=t,i(v(a))},no_border:!0}))},u=0;u<e.headers.length;u++)l(u);return c.push(r.createElement(f.rA,{icon:"delete",title:t("删除"),onClick:function(){return function(e){a.splice(e,1),i(v(a))}(o)}})),c})),width:"10rem"})))}var k=n(7444),S=n(6417),L=n(8247),C=n(2042);function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function A(e){return function(e){if(Array.isArray(e))return T(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||P(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(){j=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),c=new V(r||[]);return o(i,"_invoke",{value:L(e,n,c)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",h="suspendedYield",p="executing",m="completed",v={};function y(){}function _(){}function g(){}var b={};u(b,i,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(N([])));E&&E!==n&&r.call(E,i)&&(b=E);var x=g.prototype=y.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,a,i,c){var l=f(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==O(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function L(t,n,r){var o=d;return function(a,i){if(o===p)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=C(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var u=f(t,n,r);if("normal"===u.type){if(o=r.done?m:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=m,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var a=f(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function V(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function N(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(O(t)+" is not iterable")}return _.prototype=g,o(x,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:_,configurable:!0}),_.displayName=u(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},k(S.prototype),u(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new S(s(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=N,V.prototype={constructor:V,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;I(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function I(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function V(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){I(a,r,o,i,c,"next",e)}function c(e){I(a,r,o,i,c,"throw",e)}i(void 0)}))}}function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||P(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e,t){if(e){if("string"==typeof e)return T(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function F(){var e=(0,p.Bd)().t,t=N((0,k.L4)(S.A.prompt_card),2),n=(t[0],t[1]),a=[e("路由"),e("auth"),e("备注")],i=N((0,k.L4)(S.A.editorSetting),2),m=(i[0],i[1]),v=N((0,r.useState)([]),2),y=v[0],_=v[1],g=function(){var e=V(j().mark((function e(){var t;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.get("api/customer_router");case 2:(t=e.sent).code===u.m.Sucess&&_(t.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,r.useEffect)((function(){g()}),[]);var b=function(){var e=V(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.post("api/customer_router/save",y);case 2:e.sent.code===u.m.Sucess&&new(c())({type:"success",text:"保存成功",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),w=function(){var e=V(j().mark((function e(t){var n;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.router){e.next=3;break}return(0,C.zN)("路由不能为空"),e.abrupt("return");case 3:return e.next=5,l.XO.get("jscode/".concat(encodeURIComponent(t.router)));case 5:n=e.sent,m({model:"ace/mode/javascript",open:!0,fileName:t.router,save:function(){var e=V(j().mark((function e(n){var r;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={context:n,router:t.router},e.next=3,l.XO.post("jscode/save",r);case 3:0===e.sent.code&&(L.xK.set_value_temp(""),m({open:!1,model:"",fileName:"",save:null}));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),L.xK.set_value_temp(n.data);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return r.createElement(o.xh,null,r.createElement(s.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,e("自定义api路由"))," ",r.createElement(f.rA,{icon:"info",onClick:function(){var e;e=r.createElement("div",null,'默认需要以 "/api" 开头的路由。'),n({open:!0,title:"信息",context_div:r.createElement("div",null,e)})},title:"信息"})),titleCom:r.createElement("div",null,r.createElement(f.rA,{icon:"add",title:e("添加"),onClick:function(){_([{note:"",needAuth:!1,router:""}].concat(A(y)))}}),r.createElement(f.rA,{icon:"save",title:e("保存"),onClick:b}))},r.createElement(h.X,{headers:a,rows:y.map((function(t,n){var o=[r.createElement(d.Sm,{value:t.router,handleInputChange:function(e){t.router=e,_(A(y))},no_border:!0}),r.createElement(d.l6,{defaultValue:t.needAuth,onChange:function(e){t.needAuth="true"===e,_(A(y))},options:[{title:e("是"),value:!0},{title:e("否"),value:!1}],no_border:!0}),r.createElement(d.Sm,{value:t.note,handleInputChange:function(e){t.note=e,_(A(y))},no_border:!0}),r.createElement("div",null,r.createElement(f.rA,{icon:"delete",title:e("删除"),onClick:function(){return function(e){y.splice(e,1),_(A(y))}(n)}}),r.createElement(f.rA,{icon:"edit",title:e("编辑"),onClick:function(){return w(t)}}))];return o})),width:"10rem"})))}var G=n(3496),X=n(7952);function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}function z(e){return function(e){if(Array.isArray(e))return K(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Z(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Z(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(c)throw a}}}}function B(){B=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),c=new j(r||[]);return o(i,"_invoke",{value:L(e,n,c)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",h="suspendedYield",p="executing",m="completed",v={};function y(){}function _(){}function g(){}var b={};u(b,i,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(I([])));E&&E!==n&&r.call(E,i)&&(b=E);var x=g.prototype=y.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,a,i,c){var l=f(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==M(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(s).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,o){n(e,r,t,o)}))}return a=a?a.then(o,o):o()}})}function L(t,n,r){var o=d;return function(a,i){if(o===p)throw Error("Generator is already running");if(o===m){if("throw"===a)throw i;return{value:e,done:!0}}for(r.method=a,r.arg=i;;){var c=r.delegate;if(c){var l=C(c,r);if(l){if(l===v)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=p;var u=f(t,n,r);if("normal"===u.type){if(o=r.done?m:h,u.arg===v)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=m,r.method="throw",r.arg=u.arg)}}}function C(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var a=f(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(M(t)+" is not iterable")}return _.prototype=g,o(x,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:_,configurable:!0}),_.displayName=u(g,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,u(e,l,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},k(S.prototype),u(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,o,a){void 0===a&&(a=Promise);var i=new S(s(e,n,r,o),a);return t.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},k(x),u(x,l,"Generator"),u(x,i,(function(){return this})),u(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function o(r,o){return c.type="throw",c.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function U(e,t,n,r,o,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function Y(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){U(a,r,o,i,c,"next",e)}function c(e){U(a,r,o,i,c,"throw",e)}i(void 0)}))}}function $(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,c=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return c}}(e,t)||Z(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Z(e,t){if(e){if("string"==typeof e)return K(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K(e,t):void 0}}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function H(){var e=(0,p.Bd)().t,t=$((0,k.L4)(S.A.prompt_card),2),n=(t[0],t[1]),a=$((0,k.L4)(S.A.router_jump),2),i=a[0],s=a[1],f=[e("路由"),e("路径"),e("过期时间(s)"),e("备注")],d=[e("路由"),e("文件路径"),"token","user id",e("备注")],h=function(){var e=Y(B().mark((function e(t){return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.post(G.s.setting_customer_router_save,t);case 2:e.sent.code===u.m.Sucess&&new(c())({type:"success",text:"保存成功",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),m=function(){var e=Y(B().mark((function e(){var t,n,r,o;return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.get(G.s.setting_customer_router);case 2:if((t=e.sent).code!==u.m.Sucess){e.next=6;break}if(null!=i&&i.page_self_router_api_data){n=W(t.data);try{for(n.s();!(r=n.n()).done;)r.value[1]===(null==i?void 0:i.page_self_router_api_data[1])&&(0,C.N9)("已经存在的页面资源路由配置目录设置")}catch(e){n.e(e)}finally{n.f()}o={},Object.assign(o,null==i?void 0:i.page_self_router_api_data),t.data=[o].concat(z(t.data)),s({})}return e.abrupt("return",t.data);case 6:return e.abrupt("return",[]);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return r.createElement(r.Fragment,null,r.createElement(X.A,null),r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(x,{title:e("页面资源路由"),headers:f,getItems:m,save:h,info_click:function(){var e=r.createElement("div",null,'默认需要以 "/api" 开头的路由,会自动识别地址,将页面转到对应结果。路径支持文件路径(如果是文件夹路径的最后最后一个名字将会成为资源实际地址,整个目录将会变成一个http目录),http地址。');n({open:!0,title:"信息",context_div:r.createElement("div",null,e)})}}),r.createElement(x,{title:e("workflow触发路由"),headers:d,getItems:Y(B().mark((function e(){var t;return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.get(G.s.setting_customer_workflow_router);case 2:if((t=e.sent).code!==u.m.Sucess){e.next=5;break}return e.abrupt("return",t.data);case 5:return e.abrupt("return",[]);case 6:case"end":return e.stop()}}),e)}))),save:function(){var e=Y(B().mark((function e(t){return B().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.XO.post(G.s.setting_customer_workflow_router_save,t);case 2:e.sent.code===u.m.Sucess&&new(c())({type:"success",text:"保存成功",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),info_click:function(){var e=r.createElement("div",null,'默认需要以 "/api" 开头的路由,文件路径是有效的workflow路径。token也可以是文件绝对路径,请求的时候请设置同样的authorization请求头字段。');n({open:!0,title:"信息",context_div:r.createElement("div",null,e)})}})),r.createElement(o.VP,null,r.createElement(F,null))))}var R=function(e){return e.username="username",e.password="password",e.password_hash="password_hash",e.navindex_remote_ssh_key="navindex_remote_ssh_key",e.user_id_name_mapping="user_id_name_mapping",e.user_id_info_data_mapping="user_id_info_data_mapping",e.user_unique_id_num="user_unique_id_num",e.role_unique_id_num="role_unique_id_num",e.sys_all_roles="sys_all_roles",e.ddns_http_url_key="ddns_http_url_key",e.ddns_tx_key="tengxun_ddns_key",e.ddns_dnspod_key="ddns_dnspod",e.ddns_ali_key="ali_ddns_key",e.navindex_net_key_list="navindex_net_key_list",e.navindex_wol_key="navindex_wol_key",e.customer_router_key="customer_router_key",e.customer_workflow_router_key="customer_workflow_router_key",e.customer_api_router_key="customer_api_router_key",e.token_setting="token_setting",e.sys_software="sys_software",e.protection_directory="sys_protection_directory",e.dir_upload_max_num="dir_upload_max_num",e.self_auth_jscode="self_auth_jscode",e.navindex_video_key="navindex_video_tag_key",e.systemd_key="systemd_key",e.vir_server_data_key="vir_server_net_data_key",e.vir_client_data_key="vir_client_net_data_key",e.vir_data_client_hash_key="vir_data_client_hash_key",e.vir_data_server_hash_key="vir_data_server_hash_key",e.language="user_language",e.navindex_rdp_key="navindex_rdp_tag_key",e.navindex_key="navindex_key_list",e.http_tag_key="http_tag_key",e.self_shell_cmd_check_open_status="self_shell_cmd_check_open_status",e.self_shell_cmd_jscode="self_shell_cmd_jscode",e.extra_env_path_list_key="extra_env_path_list_key",e.cmd_use_pty_key="cmd_use_pty_key",e.recycle_bin_key="recycle_bin_key",e.recycle_bin_status="recycle_bin_status",e}({});var q=R.self_auth_jscode,D=n(4777);function J(e){return J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},J(e)}function Q(){Q=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,i=Object.create(a.prototype),c=new j(r||[]);return o(i,"_invoke",{value:L(e,n,c)}),i}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",h="suspendedYield",p="executing",m="completed",v={};function y(){}function _(){}function g(){}var b={};u(b,i,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(I([])));E&&E!==n&&r.call(E,i)&&(b=E);var x=g.prototype=y.prototype=Object.create(b);function k(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(o,a,i,c){var l=f(e[o],e,a);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==J(s)&&r.call(s,"__await")?t.resolve(s.__await).then((function(e){n("next",e,i,c)}),(function(e){