w-ftp 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +17 -17
- package/.github/workflows/ci-test.yml +24 -0
- package/babel.config.js +1 -0
- package/dist/w-ftp.umd.js +2 -2
- package/dist/w-ftp.umd.js.map +1 -1
- package/docs/WFtp.mjs.html +5 -2
- package/docs/global.html +227 -211
- package/docs/index.html +5 -2
- package/docs/jsftp.js.html +5 -2
- package/docs/scripts/collapse.js +19 -0
- package/docs/scripts/commonNav.js +28 -0
- package/docs/scripts/search.js +16 -0
- package/docs/styles/jsdoc.css +13 -2
- package/docs/styles/prettify.css +1 -0
- package/package.json +3 -3
package/.eslintrc.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
'env': {
|
|
3
|
+
'browser': true,
|
|
4
|
+
'es6': true,
|
|
5
|
+
'mocha': true
|
|
6
6
|
},
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
'extends': ['plugin:vue/base', 'plugin:vue/essential', 'standard'],
|
|
8
|
+
'plugins': [
|
|
9
|
+
'vue'
|
|
10
10
|
],
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
'globals': {
|
|
12
|
+
'Atomics': 'readonly',
|
|
13
|
+
'SharedArrayBuffer': 'readonly'
|
|
14
14
|
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
'parser': 'vue-eslint-parser',
|
|
16
|
+
'parserOptions': {
|
|
17
|
+
'parser': '@babel/eslint-parser',
|
|
18
|
+
'ecmaVersion': 2019,
|
|
19
|
+
'sourceType': 'module',
|
|
20
20
|
},
|
|
21
|
-
rules: {
|
|
21
|
+
'rules': {
|
|
22
22
|
'generator-star-spacing': 'off',
|
|
23
23
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
|
24
24
|
'indent': ['error', 4],
|
|
@@ -51,4 +51,4 @@ module.exports = {
|
|
|
51
51
|
'array-callback-return': 'off',
|
|
52
52
|
'no-unreachable-loop': 'off',
|
|
53
53
|
}
|
|
54
|
-
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Node.js CI
|
|
2
|
+
|
|
3
|
+
on: [push]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
build:
|
|
7
|
+
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
|
|
10
|
+
strategy:
|
|
11
|
+
matrix:
|
|
12
|
+
node-version: [18.x]
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v2
|
|
16
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
17
|
+
uses: actions/setup-node@v1
|
|
18
|
+
with:
|
|
19
|
+
node-version: ${{ matrix.node-version }}
|
|
20
|
+
- run: npm cache clean -f
|
|
21
|
+
- run: npm install
|
|
22
|
+
- run: npm test
|
|
23
|
+
env:
|
|
24
|
+
CI: true
|
package/babel.config.js
CHANGED
|
@@ -7,6 +7,7 @@ module.exports = {
|
|
|
7
7
|
],
|
|
8
8
|
'plugins': [
|
|
9
9
|
'@babel/plugin-transform-runtime',
|
|
10
|
+
'@babel/plugin-syntax-import-assertions',
|
|
10
11
|
'@babel/plugin-proposal-export-default-from',
|
|
11
12
|
'@babel/plugin-proposal-nullish-coalescing-operator',
|
|
12
13
|
'@babel/plugin-proposal-optional-chaining'
|
package/dist/w-ftp.umd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* w-ftp v1.0.
|
|
2
|
+
* w-ftp v1.0.8
|
|
3
3
|
* (c) 2018-2021 yuda-lyu(semisphere)
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("path"),require("fs"),require("net"),require("events"),require("util"),require("stream"),require("stream-combiner"),require("ftp-response-parser"),require("parse-listing"),require("once"),require("unorm"),require("debug")):"function"==typeof define&&define.amd?define(["path","fs","net","events","util","stream","stream-combiner","ftp-response-parser","parse-listing","once","unorm","debug"],e):(t="undefined"!=typeof globalThis?globalThis:t||self)["w-ftp"]=e(t.path,t.fs,t.net,t.events,t.util,t.stream,t["stream-combiner"],t["ftp-response-parser"],t["parse-listing"],t.once,t.unorm,t.debug)}(this,(function(t,e,r,n,i,o,a,u,s,c,f,l){"use strict";function h(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var p=h(t),d=h(e),v=h(r),y=h(n),m=h(i),g=h(o),b=h(a),_=h(u),j=h(s),w=h(c),S=h(f),k=h(l),$=Array.isArray,O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function x(t){var e={exports:{}};return t(e,e.exports),e.exports}var M="object"==typeof O&&O&&O.Object===Object&&O,P="object"==typeof self&&self&&self.Object===Object&&self,T=M||P||Function("return this")(),z=T.Symbol,A=Object.prototype,D=A.hasOwnProperty,F=A.toString,E=z?z.toStringTag:void 0;var L=function(t){var e=D.call(t,E),r=t[E];try{t[E]=void 0;var n=!0}catch(t){}var i=F.call(t);return n&&(e?t[E]=r:delete t[E]),i},C=Object.prototype.toString;var R=function(t){return C.call(t)},I=z?z.toStringTag:void 0;var N=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":I&&I in Object(t)?L(t):R(t)};var q=function(t){return null!=t&&"object"==typeof t};var U=function(t){return"symbol"==typeof t||q(t)&&"[object Symbol]"==N(t)},Y=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,W=/^\w*$/;var H=function(t,e){if($(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!U(t))||(W.test(t)||!Y.test(t)||null!=e&&t in Object(e))};var B=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var V,Q=function(t){if(!B(t))return!1;var e=N(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},Z=T["__core-js_shared__"],J=(V=/[^.]+$/.exec(Z&&Z.keys&&Z.keys.IE_PROTO||""))?"Symbol(src)_1."+V:"";var G=function(t){return!!J&&J in t},K=Function.prototype.toString;var X=function(t){if(null!=t){try{return K.call(t)}catch(t){}try{return t+""}catch(t){}}return""},tt=/^\[object .+?Constructor\]$/,et=Function.prototype,rt=Object.prototype,nt=et.toString,it=rt.hasOwnProperty,ot=RegExp("^"+nt.call(it).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var at=function(t){return!(!B(t)||G(t))&&(Q(t)?ot:tt).test(X(t))};var ut=function(t,e){return null==t?void 0:t[e]};var st=function(t,e){var r=ut(t,e);return at(r)?r:void 0},ct=st(Object,"create");var ft=function(){this.__data__=ct?ct(null):{},this.size=0};var lt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ht=Object.prototype.hasOwnProperty;var pt=function(t){var e=this.__data__;if(ct){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return ht.call(e,t)?e[t]:void 0},dt=Object.prototype.hasOwnProperty;var vt=function(t){var e=this.__data__;return ct?void 0!==e[t]:dt.call(e,t)};var yt=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=ct&&void 0===e?"__lodash_hash_undefined__":e,this};function mt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}mt.prototype.clear=ft,mt.prototype.delete=lt,mt.prototype.get=pt,mt.prototype.has=vt,mt.prototype.set=yt;var gt=mt;var bt=function(){this.__data__=[],this.size=0};var _t=function(t,e){return t===e||t!=t&&e!=e};var jt=function(t,e){for(var r=t.length;r--;)if(_t(t[r][0],e))return r;return-1},wt=Array.prototype.splice;var St=function(t){var e=this.__data__,r=jt(e,t);return!(r<0)&&(r==e.length-1?e.pop():wt.call(e,r,1),--this.size,!0)};var kt=function(t){var e=this.__data__,r=jt(e,t);return r<0?void 0:e[r][1]};var $t=function(t){return jt(this.__data__,t)>-1};var Ot=function(t,e){var r=this.__data__,n=jt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function xt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}xt.prototype.clear=bt,xt.prototype.delete=St,xt.prototype.get=kt,xt.prototype.has=$t,xt.prototype.set=Ot;var Mt=xt,Pt=st(T,"Map");var Tt=function(){this.size=0,this.__data__={hash:new gt,map:new(Pt||Mt),string:new gt}};var zt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var At=function(t,e){var r=t.__data__;return zt(e)?r["string"==typeof e?"string":"hash"]:r.map};var Dt=function(t){var e=At(this,t).delete(t);return this.size-=e?1:0,e};var Ft=function(t){return At(this,t).get(t)};var Et=function(t){return At(this,t).has(t)};var Lt=function(t,e){var r=At(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function Ct(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ct.prototype.clear=Tt,Ct.prototype.delete=Dt,Ct.prototype.get=Ft,Ct.prototype.has=Et,Ct.prototype.set=Lt;var Rt=Ct;function It(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(It.Cache||Rt),r}It.Cache=Rt;var Nt=It;var qt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ut=/\\(\\)?/g,Yt=function(t){var e=Nt(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(qt,(function(t,r,n,i){e.push(n?i.replace(Ut,"$1"):r||t)})),e}));var Wt=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i},Ht=z?z.prototype:void 0,Bt=Ht?Ht.toString:void 0;var Vt=function t(e){if("string"==typeof e)return e;if($(e))return Wt(e,t)+"";if(U(e))return Bt?Bt.call(e):"";var r=e+"";return"0"==r&&1/e==-Infinity?"-0":r};var Qt=function(t){return null==t?"":Vt(t)};var Zt=function(t,e){return $(t)?t:H(t,e)?[t]:Yt(Qt(t))};var Jt=function(t){if("string"==typeof t||U(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var Gt=function(t,e){for(var r=0,n=(e=Zt(e,t)).length;null!=t&&r<n;)t=t[Jt(e[r++])];return r&&r==n?t:void 0};var Kt=function(t,e,r){var n=null==t?void 0:Gt(t,e);return void 0===n?r:n},Xt=Object.prototype;var te=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Xt)};var ee=function(t,e){return function(r){return t(e(r))}}(Object.keys,Object),re=Object.prototype.hasOwnProperty;var ne=function(t){if(!te(t))return ee(t);var e=[];for(var r in Object(t))re.call(t,r)&&"constructor"!=r&&e.push(r);return e},ie=st(T,"DataView"),oe=st(T,"Promise"),ae=st(T,"Set"),ue=st(T,"WeakMap"),se="[object Map]",ce="[object Promise]",fe="[object Set]",le="[object WeakMap]",he="[object DataView]",pe=X(ie),de=X(Pt),ve=X(oe),ye=X(ae),me=X(ue),ge=N;(ie&&ge(new ie(new ArrayBuffer(1)))!=he||Pt&&ge(new Pt)!=se||oe&&ge(oe.resolve())!=ce||ae&&ge(new ae)!=fe||ue&&ge(new ue)!=le)&&(ge=function(t){var e=N(t),r="[object Object]"==e?t.constructor:void 0,n=r?X(r):"";if(n)switch(n){case pe:return he;case de:return se;case ve:return ce;case ye:return fe;case me:return le}return e});var be=ge;var _e=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991};var je=function(t){return null!=t&&_e(t.length)&&!Q(t)};var we=function(t){return"string"==typeof t||!$(t)&&q(t)&&"[object String]"==N(t)};var Se=function(t){return function(e){return null==e?void 0:e[t]}},ke=Se("length"),$e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Oe=function(t){return $e.test(t)},xe="[\\ud800-\\udfff]",Me="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Pe="\\ud83c[\\udffb-\\udfff]",Te="[^\\ud800-\\udfff]",ze="(?:\\ud83c[\\udde6-\\uddff]){2}",Ae="[\\ud800-\\udbff][\\udc00-\\udfff]",De="(?:"+Me+"|"+Pe+")"+"?",Fe="[\\ufe0e\\ufe0f]?",Ee=Fe+De+("(?:\\u200d(?:"+[Te,ze,Ae].join("|")+")"+Fe+De+")*"),Le="(?:"+[Te+Me+"?",Me,ze,Ae,xe].join("|")+")",Ce=RegExp(Pe+"(?="+Pe+")|"+Le+Ee,"g");var Re=function(t){for(var e=Ce.lastIndex=0;Ce.test(t);)++e;return e};var Ie=function(t){return Oe(t)?Re(t):ke(t)};var Ne=function(t){if(null==t)return 0;if(je(t))return we(t)?Ie(t):t.length;var e=be(t);return"[object Map]"==e||"[object Set]"==e?t.size:ne(t).length};var qe=function(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var a=t[r];e(a,r,t)&&(o[i++]=a)}return o};var Ue=function(t){return function(e,r,n){for(var i=-1,o=Object(e),a=n(e),u=a.length;u--;){var s=a[t?u:++i];if(!1===r(o[s],s,o))break}return e}}();var Ye=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n};var We=function(t){return q(t)&&"[object Arguments]"==N(t)},He=Object.prototype,Be=He.hasOwnProperty,Ve=He.propertyIsEnumerable,Qe=We(function(){return arguments}())?We:function(t){return q(t)&&Be.call(t,"callee")&&!Ve.call(t,"callee")},Ze=Qe;var Je=function(){return!1},Ge=x((function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,i=n&&n.exports===r?T.Buffer:void 0,o=(i?i.isBuffer:void 0)||Je;t.exports=o})),Ke=/^(?:0|[1-9]\d*)$/;var Xe=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&Ke.test(t))&&t>-1&&t%1==0&&t<e},tr={};tr["[object Float32Array]"]=tr["[object Float64Array]"]=tr["[object Int8Array]"]=tr["[object Int16Array]"]=tr["[object Int32Array]"]=tr["[object Uint8Array]"]=tr["[object Uint8ClampedArray]"]=tr["[object Uint16Array]"]=tr["[object Uint32Array]"]=!0,tr["[object Arguments]"]=tr["[object Array]"]=tr["[object ArrayBuffer]"]=tr["[object Boolean]"]=tr["[object DataView]"]=tr["[object Date]"]=tr["[object Error]"]=tr["[object Function]"]=tr["[object Map]"]=tr["[object Number]"]=tr["[object Object]"]=tr["[object RegExp]"]=tr["[object Set]"]=tr["[object String]"]=tr["[object WeakMap]"]=!1;var er=function(t){return q(t)&&_e(t.length)&&!!tr[N(t)]};var rr=function(t){return function(e){return t(e)}},nr=x((function(t,e){var r=e&&!e.nodeType&&e,n=r&&t&&!t.nodeType&&t,i=n&&n.exports===r&&M.process,o=function(){try{var t=n&&n.require&&n.require("util").types;return t||i&&i.binding&&i.binding("util")}catch(t){}}();t.exports=o})),ir=nr&&nr.isTypedArray,or=ir?rr(ir):er,ar=Object.prototype.hasOwnProperty;var ur=function(t,e){var r=$(t),n=!r&&Ze(t),i=!r&&!n&&Ge(t),o=!r&&!n&&!i&&or(t),a=r||n||i||o,u=a?Ye(t.length,String):[],s=u.length;for(var c in t)!e&&!ar.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Xe(c,s))||u.push(c);return u};var sr=function(t){return je(t)?ur(t):ne(t)};var cr=function(t,e){return function(r,n){if(null==r)return r;if(!je(r))return t(r,n);for(var i=r.length,o=e?i:-1,a=Object(r);(e?o--:++o<i)&&!1!==n(a[o],o,a););return r}}((function(t,e){return t&&Ue(t,e,sr)}));var fr=function(t,e){var r=[];return cr(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r};var lr=function(){this.__data__=new Mt,this.size=0};var hr=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var pr=function(t){return this.__data__.get(t)};var dr=function(t){return this.__data__.has(t)};var vr=function(t,e){var r=this.__data__;if(r instanceof Mt){var n=r.__data__;if(!Pt||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Rt(n)}return r.set(t,e),this.size=r.size,this};function yr(t){var e=this.__data__=new Mt(t);this.size=e.size}yr.prototype.clear=lr,yr.prototype.delete=hr,yr.prototype.get=pr,yr.prototype.has=dr,yr.prototype.set=vr;var mr=yr;var gr=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};var br=function(t){return this.__data__.has(t)};function _r(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new Rt;++e<r;)this.add(t[e])}_r.prototype.add=_r.prototype.push=gr,_r.prototype.has=br;var jr=_r;var wr=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1};var Sr=function(t,e){return t.has(e)};var kr=function(t,e,r,n,i,o){var a=1&r,u=t.length,s=e.length;if(u!=s&&!(a&&s>u))return!1;var c=o.get(t),f=o.get(e);if(c&&f)return c==e&&f==t;var l=-1,h=!0,p=2&r?new jr:void 0;for(o.set(t,e),o.set(e,t);++l<u;){var d=t[l],v=e[l];if(n)var y=a?n(v,d,l,e,t,o):n(d,v,l,t,e,o);if(void 0!==y){if(y)continue;h=!1;break}if(p){if(!wr(e,(function(t,e){if(!Sr(p,e)&&(d===t||i(d,t,r,n,o)))return p.push(e)}))){h=!1;break}}else if(d!==v&&!i(d,v,r,n,o)){h=!1;break}}return o.delete(t),o.delete(e),h},$r=T.Uint8Array;var Or=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r};var xr=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},Mr=z?z.prototype:void 0,Pr=Mr?Mr.valueOf:void 0;var Tr=function(t,e,r,n,i,o,a){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new $r(t),new $r(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return _t(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var u=Or;case"[object Set]":var s=1&n;if(u||(u=xr),t.size!=e.size&&!s)return!1;var c=a.get(t);if(c)return c==e;n|=2,a.set(t,e);var f=kr(u(t),u(e),n,i,o,a);return a.delete(t),f;case"[object Symbol]":if(Pr)return Pr.call(t)==Pr.call(e)}return!1};var zr=function(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t};var Ar=function(t,e,r){var n=e(t);return $(t)?n:zr(n,r(t))};var Dr=function(){return[]},Fr=Object.prototype.propertyIsEnumerable,Er=Object.getOwnPropertySymbols,Lr=Er?function(t){return null==t?[]:(t=Object(t),qe(Er(t),(function(e){return Fr.call(t,e)})))}:Dr;var Cr=function(t){return Ar(t,sr,Lr)},Rr=Object.prototype.hasOwnProperty;var Ir=function(t,e,r,n,i,o){var a=1&r,u=Cr(t),s=u.length;if(s!=Cr(e).length&&!a)return!1;for(var c=s;c--;){var f=u[c];if(!(a?f in e:Rr.call(e,f)))return!1}var l=o.get(t),h=o.get(e);if(l&&h)return l==e&&h==t;var p=!0;o.set(t,e),o.set(e,t);for(var d=a;++c<s;){var v=t[f=u[c]],y=e[f];if(n)var m=a?n(y,v,f,e,t,o):n(v,y,f,t,e,o);if(!(void 0===m?v===y||i(v,y,r,n,o):m)){p=!1;break}d||(d="constructor"==f)}if(p&&!d){var g=t.constructor,b=e.constructor;g==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof g&&g instanceof g&&"function"==typeof b&&b instanceof b||(p=!1)}return o.delete(t),o.delete(e),p},Nr="[object Arguments]",qr="[object Array]",Ur="[object Object]",Yr=Object.prototype.hasOwnProperty;var Wr=function(t,e,r,n,i,o){var a=$(t),u=$(e),s=a?qr:be(t),c=u?qr:be(e),f=(s=s==Nr?Ur:s)==Ur,l=(c=c==Nr?Ur:c)==Ur,h=s==c;if(h&&Ge(t)){if(!Ge(e))return!1;a=!0,f=!1}if(h&&!f)return o||(o=new mr),a||or(t)?kr(t,e,r,n,i,o):Tr(t,e,s,r,n,i,o);if(!(1&r)){var p=f&&Yr.call(t,"__wrapped__"),d=l&&Yr.call(e,"__wrapped__");if(p||d){var v=p?t.value():t,y=d?e.value():e;return o||(o=new mr),i(v,y,r,n,o)}}return!!h&&(o||(o=new mr),Ir(t,e,r,n,i,o))};var Hr=function t(e,r,n,i,o){return e===r||(null==e||null==r||!q(e)&&!q(r)?e!=e&&r!=r:Wr(e,r,n,i,t,o))};var Br=function(t,e,r,n){var i=r.length,o=i,a=!n;if(null==t)return!o;for(t=Object(t);i--;){var u=r[i];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++i<o;){var s=(u=r[i])[0],c=t[s],f=u[1];if(a&&u[2]){if(void 0===c&&!(s in t))return!1}else{var l=new mr;if(n)var h=n(c,f,s,t,e,l);if(!(void 0===h?Hr(f,c,3,n,l):h))return!1}}return!0};var Vr=function(t){return t==t&&!B(t)};var Qr=function(t){for(var e=sr(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,Vr(i)]}return e};var Zr=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}};var Jr=function(t){var e=Qr(t);return 1==e.length&&e[0][2]?Zr(e[0][0],e[0][1]):function(r){return r===t||Br(r,t,e)}};var Gr=function(t,e){return null!=t&&e in Object(t)};var Kr=function(t,e,r){for(var n=-1,i=(e=Zt(e,t)).length,o=!1;++n<i;){var a=Jt(e[n]);if(!(o=null!=t&&r(t,a)))break;t=t[a]}return o||++n!=i?o:!!(i=null==t?0:t.length)&&_e(i)&&Xe(a,i)&&($(t)||Ze(t))};var Xr=function(t,e){return null!=t&&Kr(t,e,Gr)};var tn=function(t,e){return H(t)&&Vr(e)?Zr(Jt(t),e):function(r){var n=Kt(r,t);return void 0===n&&n===e?Xr(r,t):Hr(e,n,3)}};var en=function(t){return t};var rn=function(t){return function(e){return Gt(e,t)}};var nn=function(t){return H(t)?Se(Jt(t)):rn(t)};var on=function(t){return"function"==typeof t?t:null==t?en:"object"==typeof t?$(t)?tn(t[0],t[1]):Jr(t):nn(t)};var an=function(t,e){return($(t)?qe:fr)(t,on(e))};var un=function(t){return function(e,r,n){var i=Object(e);if(!je(e)){var o=on(r);e=sr(e),r=function(t){return o(i[t],t,i)}}var a=t(e,r,n);return a>-1?i[o?e[a]:a]:void 0}};var sn=function(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1},cn=/\s/;var fn=function(t){for(var e=t.length;e--&&cn.test(t.charAt(e)););return e},ln=/^\s+/;var hn=function(t){return t?t.slice(0,fn(t)+1).replace(ln,""):t},pn=/^[-+]0x[0-9a-f]+$/i,dn=/^0b[01]+$/i,vn=/^0o[0-7]+$/i,yn=parseInt;var mn=function(t){if("number"==typeof t)return t;if(U(t))return NaN;if(B(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=B(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=hn(t);var r=dn.test(t);return r||vn.test(t)?yn(t.slice(2),r?2:8):pn.test(t)?NaN:+t},gn=1/0;var bn=function(t){return t?(t=mn(t))===gn||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0};var _n=function(t){var e=bn(t),r=e%1;return e==e?r?e-r:e:0},jn=Math.max;var wn=un((function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:_n(r);return i<0&&(i=jn(n+i,0)),sn(t,on(e),i)}));var Sn=function(t,e){var r=-1,n=je(t)?Array(t.length):[];return cr(t,(function(t,i,o){n[++r]=e(t,i,o)})),n};var kn=function(t,e){return($(t)?Wt:Sn)(t,on(e))};function $n(){let t,e,r=new Promise((function(){t=arguments[0],e=arguments[1]}));return r.resolve=t,r.reject=e,r}var On=T.isFinite,xn=Math.min;var Mn=function(t){var e=Math[t];return function(t,r){if(t=mn(t),(r=null==r?0:xn(_n(r),292))&&On(t)){var n=(Qt(t)+"e").split("e"),i=e(n[0]+"e"+(+n[1]+r));return+((n=(Qt(i)+"e").split("e"))[0]+"e"+(+n[1]-r))}return e(t)}}("round");function Pn(t){return!(!function(t){return"[object String]"===Object.prototype.toString.call(t)}(t)||""===t)}function Tn(t){let e=!1;return Pn(t)?e=!isNaN(Number(t)):function(t){return"[object Number]"===Object.prototype.toString.call(t)}(t)&&(e=!0),e}function zn(t){if(!Tn(t))return 0;return bn(t)}function An(t){if(!Tn(t))return 0;t=zn(t);let e=Mn(t);return"0"===String(e)?0:e}function Dn(t){if(!Pn(t)&&!Tn(t)&&!U(t))return"";let e="";try{e=String(t)}catch(t){}try{e=t.toString()}catch(t){}return e}var Fn=function(t){return"number"==typeof t&&t==_n(t)};function En(t){return!!Tn(t)&&(t=zn(t),Fn(t))}function Ln(t){if(!En(t))return!1;return An(t)>0}function Cn(t){return"[object Object]"===Object.prototype.toString.call(t)}function Rn(t){if(Cn(t)){for(let e in t)return!0;return!1}return!1}function In(t){let e=Object.prototype.toString.call(t);return"[object Function]"===e||"[object AsyncFunction]"===e}function Nn(t){if(!En(t))return!1;return An(t)>=0}function qn(t,e){return Pn(t)&&Nn(e)?0===(e=An(e))?"":t.substring(0,e):""}var Un=function(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=Array(i);++n<i;)o[n]=t[n+e];return o};var Yn=function(t,e,r){var n=null==t?0:t.length;return n?(e=r||void 0===e?1:_n(e),Un(t,e<0?0:e,n)):[]};var Wn=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t};var Hn=function(t){return"function"==typeof t?t:en};var Bn=function(t,e){return($(t)?Wn:cr)(t,Hn(e))};function Vn(t,e){let r=$n();if(n=t,"[object Array]"!==Object.prototype.toString.call(n)&&!Cn(t))return r.reject("rs is not an array or object"),r;var n;let i=!1;if(Cn(t)){i=!0;let e=[];Bn(t,((t,r)=>{e.push({k:r,v:t})})),t=e}In(e)||(e=function(t){return t});let o=-1,a=[];return t.reduce((function(t,r){return t.then((function(t){a.push(t),o+=1;let n=o,u=r;return i&&(n=r.k,u=r.v),In(e)?e(u,n):u}))}),Promise.resolve()).then((function(t){a.push(t),a=Yn(a),r.resolve(a)})).catch((function(t){r.reject(t)})),r}function Qn(t,e){if(!Pn(t))return"";if(!Nn(e))return"";if(0===(e=An(e)))return"";let r=t.length-e;return r<0&&(r=0),t.substr(r,e)}function Zn(t,e){return Pn(t)&&Nn(e)?0===(e=An(e))?t:qn(t,t.length-e):""}function Jn(t){if(!Pn(t))return"";let e=function(t){if(!Pn(t))return{path:"",isRoot:!1};for(;t.indexOf("\\\\")>=0;)t=t.replace("\\\\","\\");for(;t.indexOf("//")>=0;)t=t.replace("//","/");if(":"===Qn(t,1))return{path:"".concat(t,"\\"),isRoot:!0};if("\\"===Qn(t,1)){let e=Zn(t,1);return":"===Qn(e,1)?{path:t,isRoot:!0}:{path:e,isRoot:!1}}if("/"===Qn(t,1)){let e=Zn(t,1);return 0===Ne(e)?{path:t,isRoot:!0}:{path:e,isRoot:!1}}return{path:t,isRoot:!1}}(t);if(e.isRoot)return e.path;let r=e.path;try{r=r.split("\\").pop().split("/").pop()}catch(t){}return r}function Gn(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=1;function n(t){let i=[],o=d.default.readdirSync(t);return Bn(o,(function(o){let a=p.default.resolve(t,o),u=null;try{u=d.default.statSync(a)}catch(t){}u&&u.isDirectory()?(i.push({isFolder:!0,level:r,path:a,name:p.default.basename(a)}),r+=1,(r<=e||null===e)&&(i=i.concat(n(a))),r-=1):i.push({isFolder:!1,level:r,path:a,name:p.default.basename(a)})})),i}return n(t)}function Kn(t){return!!d.default.existsSync(t)&&(!d.default.lstatSync(t).isFile()&&!d.default.lstatSync(t).isSymbolicLink())}function Xn(t){return!!d.default.existsSync(t)&&(!d.default.lstatSync(t).isDirectory()&&!d.default.lstatSync(t).isSymbolicLink())}function ti(t){if(Kn(t))return{success:"input folder is already exists: "+t};if(d.default.existsSync(t))return{error:"input path already exists: "+t};try{d.default.mkdirSync(t,{recursive:!0})}catch(t){return{error:t}}return{success:"done: "+t}}var ei=x((function(t,e){t.exports=function(){var t=1e3,e=6e4,r=36e5,n="millisecond",i="second",o="minute",a="hour",u="day",s="week",c="month",f="quarter",l="year",h="date",p="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},m=function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},g={s:m,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),n=Math.floor(r/60),i=r%60;return(e<=0?"+":"-")+m(n,2,"0")+":"+m(i,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var n=12*(r.year()-e.year())+(r.month()-e.month()),i=e.clone().add(n,c),o=r-i<0,a=e.clone().add(n+(o?-1:1),c);return+(-(n+(r-i)/(o?i-a:a-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:l,w:s,d:u,D:h,h:a,m:o,s:i,ms:n,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",_={};_[b]=y;var j=function(t){return t instanceof $},w=function t(e,r,n){var i;if(!e)return b;if("string"==typeof e){var o=e.toLowerCase();_[o]&&(i=o),r&&(_[o]=r,i=o);var a=e.split("-");if(!i&&a.length>1)return t(a[0])}else{var u=e.name;_[u]=e,i=u}return!n&&i&&(b=i),i||!n&&b},S=function(t,e){if(j(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new $(r)},k=g;k.l=w,k.i=j,k.w=function(t,e){return S(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var $=function(){function y(t){this.$L=w(t.locale,null,!0),this.parse(t)}var m=y.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(k.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var n=e.match(d);if(n){var i=n[2]-1||0,o=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return k},m.isValid=function(){return!(this.$d.toString()===p)},m.isSame=function(t,e){var r=S(t);return this.startOf(e)<=r&&r<=this.endOf(e)},m.isAfter=function(t,e){return S(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<S(t)},m.$g=function(t,e,r){return k.u(t)?this[e]:this.set(r,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var r=this,n=!!k.u(e)||e,f=k.p(t),p=function(t,e){var i=k.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return n?i:i.endOf(u)},d=function(t,e){return k.w(r.toDate()[t].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},v=this.$W,y=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(f){case l:return n?p(1,0):p(31,11);case c:return n?p(1,y):p(0,y+1);case s:var b=this.$locale().weekStart||0,_=(v<b?v+7:v)-b;return p(n?m-_:m+(6-_),y);case u:case h:return d(g+"Hours",0);case a:return d(g+"Minutes",1);case o:return d(g+"Seconds",2);case i:return d(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var r,s=k.p(t),f="set"+(this.$u?"UTC":""),p=(r={},r[u]=f+"Date",r[h]=f+"Date",r[c]=f+"Month",r[l]=f+"FullYear",r[a]=f+"Hours",r[o]=f+"Minutes",r[i]=f+"Seconds",r[n]=f+"Milliseconds",r)[s],d=s===u?this.$D+(e-this.$W):e;if(s===c||s===l){var v=this.clone().set(h,1);v.$d[p](d),v.init(),this.$d=v.set(h,Math.min(this.$D,v.daysInMonth())).$d}else p&&this.$d[p](d);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[k.p(t)]()},m.add=function(n,f){var h,p=this;n=Number(n);var d=k.p(f),v=function(t){var e=S(p);return k.w(e.date(e.date()+Math.round(t*n)),p)};if(d===c)return this.set(c,this.$M+n);if(d===l)return this.set(l,this.$y+n);if(d===u)return v(1);if(d===s)return v(7);var y=(h={},h[o]=e,h[a]=r,h[i]=t,h)[d]||1,m=this.$d.getTime()+n*y;return k.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var n=t||"YYYY-MM-DDTHH:mm:ssZ",i=k.z(this),o=this.$H,a=this.$m,u=this.$M,s=r.weekdays,c=r.months,f=function(t,r,i,o){return t&&(t[r]||t(e,n))||i[r].slice(0,o)},l=function(t){return k.s(o%12||12,t,"0")},h=r.meridiem||function(t,e,r){var n=t<12?"AM":"PM";return r?n.toLowerCase():n},d={YY:String(this.$y).slice(-2),YYYY:this.$y,M:u+1,MM:k.s(u+1,2,"0"),MMM:f(r.monthsShort,u,c,3),MMMM:f(c,u),D:this.$D,DD:k.s(this.$D,2,"0"),d:String(this.$W),dd:f(r.weekdaysMin,this.$W,s,2),ddd:f(r.weekdaysShort,this.$W,s,3),dddd:s[this.$W],H:String(o),HH:k.s(o,2,"0"),h:l(1),hh:l(2),a:h(o,a,!0),A:h(o,a,!1),m:String(a),mm:k.s(a,2,"0"),s:String(this.$s),ss:k.s(this.$s,2,"0"),SSS:k.s(this.$ms,3,"0"),Z:i};return n.replace(v,(function(t,e){return e||d[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(n,h,p){var d,v=k.p(h),y=S(n),m=(y.utcOffset()-this.utcOffset())*e,g=this-y,b=k.m(this,y);return b=(d={},d[l]=b/12,d[c]=b,d[f]=b/3,d[s]=(g-m)/6048e5,d[u]=(g-m)/864e5,d[a]=g/r,d[o]=g/e,d[i]=g/t,d)[v]||g,p?b:k.a(b)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return _[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),n=w(t,e,!0);return n&&(r.$L=n),r},m.clone=function(){return k.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},y}(),O=$.prototype;return S.prototype=O,[["$ms",n],["$s",i],["$m",o],["$H",a],["$W",u],["$M",c],["$y",l],["$D",h]].forEach((function(t){O[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),S.extend=function(t,e){return t.$i||(t(e,$,S),t.$i=!0),S},S.locale=w,S.isDayjs=j,S.unix=function(t){return S(1e3*t)},S.en=_[b],S.Ls=_,S.p={},S}()}));const ri=v.default.createConnection,ni=y.default.EventEmitter,ii=m.default.inherits,oi=S.default.nfc,ai=k.default("jsftp:general"),ui=k.default("jsftp:command"),si=k.default("jsftp:response"),ci=6e5,fi=function(){},li={marks:[125,150],ignore:226},hi=/([-\d]+,[-\d]+,[-\d]+,[-\d]+),([-\d]+),([-\d]+)/,pi=/\r\n|\n/;function di(t){let e=fi,r=t+" ";for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];"function"==typeof i[i.length-1]&&(e=i.pop()),r+=i.join(" "),this.execute(r.trim(),e)}function vi(t){this.host=t.host||"localhost",this.port=t.port||21,this.user=t.user||"anonymous",this.pass=t.pass||"@anonymous",this.createSocket=t.createSocket,this.useList=t.useList||!1,this.commandQueue=[],ni.call(this),this.on("data",si),this.on("error",si),this._createSocket(this.port,this.host)}ii(vi,ni),vi.prototype.raw=function(){di.apply(this,arguments)},vi.prototype.reemit=function(t){return e=>{this.emit(t,e),ai("event:".concat(t),e||{})}},vi.prototype._createSocket=function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:fi;this.socket&&this.socket.destroy&&this.socket.destroy(),this.resParser&&this.resParser.end(),this.resParser=new _.default,this.authenticated=!1,this.socket=this.createSocket?this.createSocket({port:t,host:e},r):ri(t,e,r),this.socket.on("connect",this.reemit("connect")),this.socket.on("timeout",this.reemit("timeout")),this.pipeline=b.default(this.socket,this.resParser),this.pipeline.on("data",(t=>{this.emit("data",t),si(t.text),this.parseResponse(t)})),this.pipeline.on("error",this.reemit("error"))},vi.prototype.parseResponse=function(t){if(0===this.commandQueue.length)return;if([220].indexOf(t.code)>-1)return;const e=this.commandQueue[0].callback;if(t.isMark){if(!e.expectsMark||-1===e.expectsMark.marks.indexOf(t.code))return;e.expectsMark.ignore&&(this.ignoreCmdCode=e.expectsMark.ignore)}this.ignoreCmdCode!==t.code?this.parse(t,this.commandQueue.shift()):this.ignoreCmdCode=null},vi.prototype.send=function(t){t&&(ui(t),this.pipeline.write(t+"\r\n"),ui(t))},vi.prototype.nextCmd=function(){const t=this.commandQueue[0];!this.inProgress&&t&&(this.send(t.action),this.inProgress=!0)},vi.prototype.execute=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:fi;if(this.socket&&this.socket.writable)return this.runCommand({action:t,callback:e});this.authenticated=!1,this._createSocket(this.port,this.host,(()=>{this.runCommand({action:t,callback:e})}))},vi.prototype.runCommand=function(t){if(this.authenticated||/^(feat|syst|user|pass)/.test(t.action))return this.commandQueue.push(t),void this.nextCmd();this.getFeatures((()=>{this.auth(this.user,this.pass,(()=>{this.commandQueue.push(t),this.nextCmd()}))}))},vi.prototype.parse=function(t,e){let r=null;t.isError&&(r=new Error(t.text||"Unknown FTP error."),r.code=t.code),this.inProgress=!1,e.callback(r,t),this.nextCmd()},vi.prototype.getPasvPort=function(t){const e=hi.exec(t);if(!e)return null;let r=e[1].replace(/,/g,".");return"127.0.0.1"===r&&(r=this.host),{host:r,port:256*(255&parseInt(e[2],10))+(255&parseInt(e[3],10))}},vi.prototype.hasFeat=function(t){return!!t&&this.features.indexOf(t.toLowerCase())>-1},vi.prototype._parseFeats=function(t){return t.split(pi).slice(1,-1).map((t=>t.trim().toLowerCase())).filter((t=>!!t))},vi.prototype.getFeatures=function(t){if(this.features)return t(null,this.features);this.raw("feat",((e,r)=>{this.features=e?[]:this._parseFeats(r.text),this.raw("syst",((e,r)=>{e||215!==r.code||(this.system=r.text.toLowerCase()),t(null,this.features)}))}))},vi.prototype.auth=function(t,e,r){if(!0===this.authenticating)return r(new Error("This client is already authenticating"));"string"!=typeof t&&(t=this.user),"string"!=typeof e&&(e=this.pass),this.authenticating=!0,this.raw("user",t,((n,i)=>{if(n||-1===[230,331,332].indexOf(i.code))return this.authenticating=!1,void r(n);this.raw("pass",e,((n,i)=>{this.authenticating=!1,n?r(n):[230,202].indexOf(i.code)>-1?(this.authenticated=!0,this.user=t,this.pass=e,this.raw("type","I",(()=>{r(void 0,i)}))):332===i.code&&this.raw("acct","")}))}))},vi.prototype.setType=function(t,e){if(t=t.toUpperCase(),this.type===t)return e();this.raw("type",t,((r,n)=>{r||(this.type=t),e(r,n)}))},vi.prototype.list=function(t,e){1===arguments.length&&(e=arguments[0],t="");let r="";e=w.default(e),this.getPasvSocket(((n,i)=>{if(n)return e(n);function o(t,r){if(t)return e(t);li.marks.some((t=>t===r.code))||e(new Error("Expected marks ".concat(li.toString()," instead of: ").concat(r.text)))}i.setEncoding("utf8"),i.on("data",(t=>{r+=t})),this.pasvTimeout(i,e),i.once("close",(n=>n?e(n):r?void e(null,r):e({code:451,text:"Could not retrieve a file listing for ".concat(t,"."),isMark:!1,isError:!0}))),i.once("error",e),o.expectsMark=li,this.execute("list ".concat(t||""),o)}))},vi.prototype.emitProgress=function(t){this.emit("progress",{filename:t.filename,action:t.action,total:t.totalSize||0,transferred:t.socket["get"===t.action?"bytesRead":"bytesWritten"]})},vi.prototype.get=function(t,e){let r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:fi;const i=typeof e;"function"===i?r=e:"string"===i&&(n=w.default(n),r=(r,i)=>{if(r)return n(r);const o=d.default.createWriteStream(e);o.on("error",n),i.on("readable",(()=>{this.emitProgress({filename:t,action:"get",socket:i})})),i.on("error",n),i.on("end",n),i.on("close",n),i.pipe(o)}),this.getGetSocket(t,w.default(r))},vi.prototype.getGetSocket=function(t,e){e=w.default(e),this.getPasvSocket(((r,n)=>{if(r)return i(r);function i(t,r){return t?(n&&n.destroy(),e(t)):n?125===r.code||150===r.code?e(null,n):(n.destroy(),e(new Error("Unexpected command "+r.text))):e(new Error("Error when retrieving PASV socket"))}n.on("error",(t=>{"ECONNREFUSED"===t.code&&(t.msg="Probably trying a PASV operation while one is in progress"),i(t)})),this.pasvTimeout(n,i),n.pause(),i.expectsMark=li,this.execute("retr "+t,i)}))},vi.prototype.put=function(t,e,r){const n=(t,e,n)=>{t.on("readable",(()=>{this.emitProgress({filename:e,action:"put",socket:t,totalSize:n})})),this.getPutSocket(t,e,r)};t instanceof Buffer?this.getPutSocket(t,e,((e,n)=>{if(e)return r(new Error(e));let i,o=0,a=1048576,u=!1;i=t.slice(o,o+a),o+=a,r(null,i),n.write(t.slice(0,a)),i.length===t.length&&(n.end(),r(null,[])),n.on("drain",(()=>{t.length>o+a?(i=t.slice(o,o+a),o+=a):(i=t.slice(o),u=!0),r(null,i),n.write(i),u&&(n.end(),r(null,[]))}))})):"string"==typeof t?d.default.stat(t,((i,o)=>{if(i&&"ENOENT"===i.code)return r(new Error("Local file doesn't exist."));if(o.isDirectory())return r(new Error("Local path cannot be a directory"));const a=i?0:o.size;n(d.default.createReadStream(t),e,a)})):t instanceof g.default.Readable?n(t,e,0):r(new Error("Expected `from` parameter to be a Buffer, Stream, or a String"))},vi.prototype.getPutSocket=function(t,e,r){r=w.default(r||fi),this.getPasvSocket(((n,i)=>{if(n)return i&&i.destroy(),r(n);i.on("close",r),i.on("error",r);const o=w.default(((e,n)=>e?(i&&i.destroy(),r(e)):125!==n.code&&150!==n.code?(i&&i.destroy(),r(new Error("Unexpected command "+n.text))):(this.pasvTimeout(i,r),void(t instanceof Buffer?r(null,i):t instanceof g.default.Readable&&(r(null,i),t.pipe(i))))));o.expectsMark=li,this.execute("stor ".concat(e),o)}))},vi.prototype.pasvTimeout=function(t,e){t.once("timeout",(()=>{ai("PASV socket timeout"),this.emit("timeout"),t.end(),e(new Error("Passive socket timeout"))}))},vi.prototype.getPasvSocket=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fi;t=w.default(t),this.execute("pasv",((e,r)=>{if(e)return t(e);const n=this.getPasvPort(r.text);if(!n)return t(new Error("Bad passive host/port combination"));const i=this._pasvSocket=this.createSocket?this.createSocket(n):ri(n);i.setTimeout(this.timeout||ci),i.once("close",(()=>{this._pasvSocket=void 0})),t(null,i)}))},vi.prototype.ls=function(t,e){function r(t,r){if(t)return e(t);j.default.parseFtpEntries(r.text||r,((t,r)=>{if(t)return e(t);r.forEach((t=>{t.name=oi(t.name)})),e(null,r)}))}this.useList?this.list(t,r):this.raw("stat",t,((e,n)=>{const i=e&&(502===e.code||500===e.code),o=this.system&&this.system.indexOf("hummingbird")>-1;i||o?(this.useList=!0,this.list(t,r)):r(e,n)}))},vi.prototype.rename=function(t,e,r){this.raw("rnfr",t,(t=>{if(t)return r(t);this.raw("rnto",e,r)}))},vi.prototype.keepAlive=function(t){this._keepAliveInterval&&clearInterval(this._keepAliveInterval),this._keepAliveInterval=setInterval(this.raw.bind(this,"noop"),t||3e4)},vi.prototype.destroy=function(){this._keepAliveInterval&&clearInterval(this._keepAliveInterval),this.socket&&this.socket.writable&&this.socket.end(),this._pasvSocket&&this._pasvSocket.writable&&this._pasvSocket.end(),this.resParser.end(),this.socket=void 0,this._pasvSocket=void 0,this.features=null,this.authenticated=!1};var yi=vi;async function mi(){return null}async function gi(){return null}async function bi(){return null}async function _i(t){return null}async function ji(t){return null}async function wi(t){return null}async function Si(t,e){return null}async function ki(t,e,r){return null}async function $i(t,e,r){return null}async function Oi(t,e,r){return null}return function(){let t={doc_conn:mi,doc_ls:gi,doc_quit:bi,doc_stateFile:_i,doc_isFile:ji,doc_isFolder:wi,doc_download:Si,doc_upload:ki,doc_syncToLocal:$i,doc_syncToRemote:Oi};return new function(){let e=null,r=6e4;async function n(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:".",n=$n();if(null===e)return n.reject("FTP has not been initialized. please use 'conn' to construct FTP"),n;let i=setTimeout((()=>{n.reject("ftpLs timeout[".concat(r,"]"))}),r);return e.ls(t,((t,e)=>{clearTimeout(i),t?n.reject(t):(e=kn(e,(t=>{let e=ei(t.time);return t.ctime=e.format("YYYY-MM-DDTHH:mm:ssZ"),t.isFolder=o(t),t})),n.resolve(e))})),n}async function i(t){let e=null;return await n(t).then((t=>{e=t})).catch((()=>{e=null})),e=Kt(e,0,null),e}function o(t){if(!Rn(t))return!1;return 1===Kt(t,"type",-1)}function a(t){if(!Rn(t))return!1;return 0===Kt(t,"type",-1)}async function u(t,n){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,u=$n();if(null===e)return u.reject("FTP has not been initialized. please use 'conn' to construct FTP"),u;if(!Pn(t))return u.reject("fpRemote[".concat(t,"] is not a effective string")),u;if(!Pn(n))return u.reject("fpLocal[".concat(n,"] is not a effective string")),u;let s=p.default.basename(p.default.dirname(n));Kn(s)||ti(s);let c=await i(t),f=await a(c);if(!f)return u.reject("fpRemote[".concat(t,"] is not a file")),u;if(!Rn(c))return u.reject("fpRemote[".concat(t,"] does not have information")),u;let l=Kt(c,"size");if(!Tn(l))return u.reject("can not get the size of file[".concat(t,"]")),u;l=An(l);let h=setTimeout((()=>{u.reject("ftpDownload timeout[".concat(r,"]"))}),r);return e.get(t,((e,r)=>{e&&(clearTimeout(h),u.reject(e)),Xn(n)&&d.default.unlinkSync(n);let i=d.default.createWriteStream(n),a=0;r.on("data",(e=>{if(In(o)){let r=Ne(e);a+=r,o({progress:a/l*100,name:Jn(n),fpRemote:t,fpLocal:n})}i.write(e)})),r.on("close",(t=>{clearTimeout(h),t?u.reject(t):u.resolve("ok")})),r.resume()})),u}async function s(t,n,i){let o=$n();if(null===e)return o.reject("FTP has not been initialized. please use 'conn' to construct FTP"),o;if(!Pn(n))return o.reject("fpRemote[".concat(n,"] is not a effective string")),o;if(!Pn(t))return o.reject("fpLocal[".concat(t,"] is not a effective string")),o;if(!Xn(t))return o.reject("fpLocal[".concat(t,"] is not a file")),o;let a=d.default.statSync(t),u=Kt(a,"size");if(!Tn(u))return o.reject("can not get the size of file[".concat(t,"]")),o;u=An(u);let s=d.default.readFileSync(t),c=setTimeout((()=>{o.reject("ftpUpload timeout[".concat(r,"]"))}),r),f=0;return e.put(s,n,((e,r)=>{if(e)return clearTimeout(c),void o.reject(e);if(0===Ne(r))return clearTimeout(c),void o.resolve("ok");if(In(i)){let e=Ne(r);f+=e,i({progress:f/u*100,name:Jn(t),fpRemote:n,fpLocal:t})}})),o}return{conn:async function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=$n(),o=Kt(n,"hostname");if(!Pn(o))return i.reject("hostname[".concat(o,"] is not a effective string")),i;let a=Kt(n,"port");if(!Ln(a))return i.reject("port[".concat(a,"] is not a positive integer")),i;a=An(a);let u=Kt(n,"username");if(!Pn(u))return i.reject("username[".concat(u,"] is not a effective string")),i;let s=Kt(n,"password");if(!Pn(s))return i.reject("password[".concat(s,"] is not a effective string")),i;let c=Kt(n,"timeLimit");Tn(c)&&(c=An(c),r=c);try{e=new yi({host:o,port:a,user:u,pass:s}),e.__doc__=t,i.resolve("ok")}catch(t){i.reject(t)}return i},ls:n,stateFile:i,isFile:async function(t){return await a(t)},isFolder:async function(t){return o(await i(t))},download:u,syncToLocal:async function(t,r,i){if(null===e)return Promise.reject("FTP has not been initialized. please use 'conn' to construct FTP");let o=await n(t);o=an(o,(t=>!t.isFolder)),Kn(r)||ti(r);let a=Gn(r);a=an(a,(t=>!t.isFolder)),a=kn(a,(t=>{let e=d.default.statSync(t.path);return t.size=Dn(Kt(e,"size","")),t}));let s=0,c=[];return await Vn(o,(async e=>{let n=wn(a,{name:e.name}),o=t;"/"!==!qn(o,1)&&(o+="/"),o+=Kt(e,"name","");let f=p.default.resolve(r,Kt(e,"name","")),l=t=>{In(i)&&i(t)};Rn(n)?e.size!==n.size&&(await u(o,f,l),s++,c.push({name:e.name,reason:"size[".concat(n.size,"] of local file != size[").concat(e.size,"] of remote file")})):(await u(o,f,l),s++,c.push({name:e.name,reason:"no local file"}))})),{num:s,files:c}},syncToRemote:async function(t,r,i){if(null===e)return Promise.reject("FTP has not been initialized. please use 'conn' to construct FTP");let o=await n(r);if(!Kn(t))return Promise.reject("fdLocal[".concat(t,"] is not a folder"));let a=Gn(t);a=an(a,(t=>!t.isFolder)),a=kn(a,(t=>{let e=d.default.statSync(t.path);return t.size=Dn(Kt(e,"size","")),t}));let u=0,c=[];return await Vn(a,(async e=>{let n=wn(o,{name:e.name}),a=r;"/"!==!qn(a,1)&&(a+="/"),a+=Kt(e,"name","");let f=p.default.resolve(t,Kt(e,"name","")),l=t=>{In(i)&&i(t)};Rn(n)?e.size!==n.size&&(await s(f,a,l),u++,c.push({name:e.name,reason:"size[".concat(n.size,"] of remote file != size[").concat(e.size,"] of local file")})):(await s(f,a,l),u++,c.push({name:e.name,reason:"no Remote file"}))})),{num:u,files:c}},upload:s,quit:async function(){let t=$n();if(null===e)return t.reject("FTP has not been initialized. please use 'conn' to construct FTP"),t;let n=setTimeout((()=>{e.destroy(),e=null,t.reject("ftpQuit timeout[".concat(r,"]"))}),r);return e.raw("quit",((r,i)=>{clearTimeout(n),e.destroy(),e=null,r?t.reject(r):t.resolve(i)})),t}}}}}));
|
|
6
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("path"),require("fs"),require("net"),require("events"),require("util"),require("stream"),require("stream-combiner"),require("ftp-response-parser"),require("parse-listing"),require("once"),require("unorm"),require("debug")):"function"==typeof define&&define.amd?define(["path","fs","net","events","util","stream","stream-combiner","ftp-response-parser","parse-listing","once","unorm","debug"],e):(t="undefined"!=typeof globalThis?globalThis:t||self)["w-ftp"]=e(t.path,t.fs,t.net,t.events,t.util,t.stream,t["stream-combiner"],t["ftp-response-parser"],t["parse-listing"],t.once,t.unorm,t.debug)}(this,(function(t,e,r,n,i,o,u,s,a,c,f,l){"use strict";var h="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var d=Array.isArray,v="object"==typeof h&&h&&h.Object===Object&&h,y=v,m="object"==typeof self&&self&&self.Object===Object&&self,g=y||m||Function("return this")(),b=g.Symbol,_=b,j=Object.prototype,w=j.hasOwnProperty,$=j.toString,S=_?_.toStringTag:void 0;var k=function(t){var e=w.call(t,S),r=t[S];try{t[S]=void 0;var n=!0}catch(t){}var i=$.call(t);return n&&(e?t[S]=r:delete t[S]),i},O=Object.prototype.toString;var x=k,M=function(t){return O.call(t)},P=b?b.toStringTag:void 0;var T=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":P&&P in Object(t)?x(t):M(t)};var z=function(t){return null!=t&&"object"==typeof t},A=T,D=z;var F=function(t){return"symbol"==typeof t||D(t)&&"[object Symbol]"==A(t)},E=d,L=F,C=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,R=/^\w*$/;var I=function(t,e){if(E(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!L(t))||(R.test(t)||!C.test(t)||null!=e&&t in Object(e))};var N=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},q=T,U=N;var Y,W=function(t){if(!U(t))return!1;var e=q(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},H=g["__core-js_shared__"],B=(Y=/[^.]+$/.exec(H&&H.keys&&H.keys.IE_PROTO||""))?"Symbol(src)_1."+Y:"";var V=function(t){return!!B&&B in t},Q=Function.prototype.toString;var Z=function(t){if(null!=t){try{return Q.call(t)}catch(t){}try{return t+""}catch(t){}}return""},J=W,G=V,K=N,X=Z,tt=/^\[object .+?Constructor\]$/,et=Function.prototype,rt=Object.prototype,nt=et.toString,it=rt.hasOwnProperty,ot=RegExp("^"+nt.call(it).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var ut=function(t){return!(!K(t)||G(t))&&(J(t)?ot:tt).test(X(t))},st=function(t,e){return null==t?void 0:t[e]};var at=function(t,e){var r=st(t,e);return ut(r)?r:void 0},ct=at(Object,"create"),ft=ct;var lt=function(){this.__data__=ft?ft(null):{},this.size=0};var ht=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},pt=ct,dt=Object.prototype.hasOwnProperty;var vt=function(t){var e=this.__data__;if(pt){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return dt.call(e,t)?e[t]:void 0},yt=ct,mt=Object.prototype.hasOwnProperty;var gt=ct;var bt=lt,_t=ht,jt=vt,wt=function(t){var e=this.__data__;return yt?void 0!==e[t]:mt.call(e,t)},$t=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=gt&&void 0===e?"__lodash_hash_undefined__":e,this};function St(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}St.prototype.clear=bt,St.prototype.delete=_t,St.prototype.get=jt,St.prototype.has=wt,St.prototype.set=$t;var kt=St;var Ot=function(){this.__data__=[],this.size=0};var xt=function(t,e){return t===e||t!=t&&e!=e},Mt=xt;var Pt=function(t,e){for(var r=t.length;r--;)if(Mt(t[r][0],e))return r;return-1},Tt=Pt,zt=Array.prototype.splice;var At=Pt;var Dt=Pt;var Ft=Pt;var Et=Ot,Lt=function(t){var e=this.__data__,r=Tt(e,t);return!(r<0)&&(r==e.length-1?e.pop():zt.call(e,r,1),--this.size,!0)},Ct=function(t){var e=this.__data__,r=At(e,t);return r<0?void 0:e[r][1]},Rt=function(t){return Dt(this.__data__,t)>-1},It=function(t,e){var r=this.__data__,n=Ft(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function Nt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Nt.prototype.clear=Et,Nt.prototype.delete=Lt,Nt.prototype.get=Ct,Nt.prototype.has=Rt,Nt.prototype.set=It;var qt=Nt,Ut=at(g,"Map"),Yt=kt,Wt=qt,Ht=Ut;var Bt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Vt=function(t,e){var r=t.__data__;return Bt(e)?r["string"==typeof e?"string":"hash"]:r.map},Qt=Vt;var Zt=Vt;var Jt=Vt;var Gt=Vt;var Kt=function(t,e){var r=Gt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},Xt=function(){this.size=0,this.__data__={hash:new Yt,map:new(Ht||Wt),string:new Yt}},te=function(t){var e=Qt(this,t).delete(t);return this.size-=e?1:0,e},ee=function(t){return Zt(this,t).get(t)},re=function(t){return Jt(this,t).has(t)},ne=Kt;function ie(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ie.prototype.clear=Xt,ie.prototype.delete=te,ie.prototype.get=ee,ie.prototype.has=re,ie.prototype.set=ne;var oe=ie,ue=oe;function se(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var u=t.apply(this,n);return r.cache=o.set(i,u)||o,u};return r.cache=new(se.Cache||ue),r}se.Cache=ue;var ae=se;var ce=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fe=/\\(\\)?/g,le=function(t){var e=ae(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(ce,(function(t,r,n,i){e.push(n?i.replace(fe,"$1"):r||t)})),e}));var he=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i},pe=he,de=d,ve=F,ye=b?b.prototype:void 0,me=ye?ye.toString:void 0;var ge=function t(e){if("string"==typeof e)return e;if(de(e))return pe(e,t)+"";if(ve(e))return me?me.call(e):"";var r=e+"";return"0"==r&&1/e==-Infinity?"-0":r},be=ge;var _e=function(t){return null==t?"":be(t)},je=d,we=I,$e=le,Se=_e;var ke=function(t,e){return je(t)?t:we(t,e)?[t]:$e(Se(t))},Oe=F;var xe=function(t){if("string"==typeof t||Oe(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e},Me=ke,Pe=xe;var Te=function(t,e){for(var r=0,n=(e=Me(e,t)).length;null!=t&&r<n;)t=t[Pe(e[r++])];return r&&r==n?t:void 0},ze=Te;var Ae=function(t,e,r){var n=null==t?void 0:ze(t,e);return void 0===n?r:n},De=Object.prototype;var Fe=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||De)};var Ee=function(t,e){return function(r){return t(e(r))}}(Object.keys,Object),Le=Fe,Ce=Ee,Re=Object.prototype.hasOwnProperty;var Ie=function(t){if(!Le(t))return Ce(t);var e=[];for(var r in Object(t))Re.call(t,r)&&"constructor"!=r&&e.push(r);return e},Ne=at(g,"DataView"),qe=Ut,Ue=at(g,"Promise"),Ye=at(g,"Set"),We=at(g,"WeakMap"),He=T,Be=Z,Ve="[object Map]",Qe="[object Promise]",Ze="[object Set]",Je="[object WeakMap]",Ge="[object DataView]",Ke=Be(Ne),Xe=Be(qe),tr=Be(Ue),er=Be(Ye),rr=Be(We),nr=He;(Ne&&nr(new Ne(new ArrayBuffer(1)))!=Ge||qe&&nr(new qe)!=Ve||Ue&&nr(Ue.resolve())!=Qe||Ye&&nr(new Ye)!=Ze||We&&nr(new We)!=Je)&&(nr=function(t){var e=He(t),r="[object Object]"==e?t.constructor:void 0,n=r?Be(r):"";if(n)switch(n){case Ke:return Ge;case Xe:return Ve;case tr:return Qe;case er:return Ze;case rr:return Je}return e});var ir=nr;var or=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},ur=W,sr=or;var ar=function(t){return null!=t&&sr(t.length)&&!ur(t)},cr=T,fr=d,lr=z;var hr=function(t){return"string"==typeof t||!fr(t)&&lr(t)&&"[object String]"==cr(t)};var pr=function(t){return function(e){return null==e?void 0:e[t]}},dr=pr("length"),vr=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var yr=function(t){return vr.test(t)},mr="\\ud800-\\udfff",gr="["+mr+"]",br="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",_r="\\ud83c[\\udffb-\\udfff]",jr="[^"+mr+"]",wr="(?:\\ud83c[\\udde6-\\uddff]){2}",$r="[\\ud800-\\udbff][\\udc00-\\udfff]",Sr="(?:"+br+"|"+_r+")"+"?",kr="[\\ufe0e\\ufe0f]?",Or=kr+Sr+("(?:\\u200d(?:"+[jr,wr,$r].join("|")+")"+kr+Sr+")*"),xr="(?:"+[jr+br+"?",br,wr,$r,gr].join("|")+")",Mr=RegExp(_r+"(?="+_r+")|"+xr+Or,"g");var Pr=dr,Tr=yr,zr=function(t){for(var e=Mr.lastIndex=0;Mr.test(t);)++e;return e};var Ar=Ie,Dr=ir,Fr=ar,Er=hr,Lr=function(t){return Tr(t)?zr(t):Pr(t)};var Cr=function(t){if(null==t)return 0;if(Fr(t))return Er(t)?Lr(t):t.length;var e=Dr(t);return"[object Map]"==e||"[object Set]"==e?t.size:Ar(t).length};var Rr=function(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var u=t[r];e(u,r,t)&&(o[i++]=u)}return o};var Ir=function(t){return function(e,r,n){for(var i=-1,o=Object(e),u=n(e),s=u.length;s--;){var a=u[t?s:++i];if(!1===r(o[a],a,o))break}return e}}();var Nr=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n},qr=T,Ur=z;var Yr=function(t){return Ur(t)&&"[object Arguments]"==qr(t)},Wr=z,Hr=Object.prototype,Br=Hr.hasOwnProperty,Vr=Hr.propertyIsEnumerable,Qr=Yr(function(){return arguments}())?Yr:function(t){return Wr(t)&&Br.call(t,"callee")&&!Vr.call(t,"callee")},Zr=Qr,Jr={};var Gr=function(){return!1};!function(t,e){var r=g,n=Gr,i=e&&!e.nodeType&&e,o=i&&t&&!t.nodeType&&t,u=o&&o.exports===i?r.Buffer:void 0,s=(u?u.isBuffer:void 0)||n;t.exports=s}({get exports(){return Jr},set exports(t){Jr=t}},Jr);var Kr=/^(?:0|[1-9]\d*)$/;var Xr=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&Kr.test(t))&&t>-1&&t%1==0&&t<e},tn=T,en=or,rn=z,nn={};nn["[object Float32Array]"]=nn["[object Float64Array]"]=nn["[object Int8Array]"]=nn["[object Int16Array]"]=nn["[object Int32Array]"]=nn["[object Uint8Array]"]=nn["[object Uint8ClampedArray]"]=nn["[object Uint16Array]"]=nn["[object Uint32Array]"]=!0,nn["[object Arguments]"]=nn["[object Array]"]=nn["[object ArrayBuffer]"]=nn["[object Boolean]"]=nn["[object DataView]"]=nn["[object Date]"]=nn["[object Error]"]=nn["[object Function]"]=nn["[object Map]"]=nn["[object Number]"]=nn["[object Object]"]=nn["[object RegExp]"]=nn["[object Set]"]=nn["[object String]"]=nn["[object WeakMap]"]=!1;var on=function(t){return rn(t)&&en(t.length)&&!!nn[tn(t)]};var un=function(t){return function(e){return t(e)}},sn={};!function(t,e){var r=v,n=e&&!e.nodeType&&e,i=n&&t&&!t.nodeType&&t,o=i&&i.exports===n&&r.process,u=function(){try{var t=i&&i.require&&i.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=u}({get exports(){return sn},set exports(t){sn=t}},sn);var an=on,cn=un,fn=sn&&sn.isTypedArray,ln=fn?cn(fn):an,hn=Nr,pn=Zr,dn=d,vn=Jr,yn=Xr,mn=ln,gn=Object.prototype.hasOwnProperty;var bn=function(t,e){var r=dn(t),n=!r&&pn(t),i=!r&&!n&&vn(t),o=!r&&!n&&!i&&mn(t),u=r||n||i||o,s=u?hn(t.length,String):[],a=s.length;for(var c in t)!e&&!gn.call(t,c)||u&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||yn(c,a))||s.push(c);return s},_n=Ie,jn=ar;var wn=function(t){return jn(t)?bn(t):_n(t)},$n=Ir,Sn=wn;var kn=ar;var On=function(t,e){return function(r,n){if(null==r)return r;if(!kn(r))return t(r,n);for(var i=r.length,o=e?i:-1,u=Object(r);(e?o--:++o<i)&&!1!==n(u[o],o,u););return r}}((function(t,e){return t&&$n(t,e,Sn)})),xn=On;var Mn=function(t,e){var r=[];return xn(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r},Pn=qt;var Tn=qt,zn=Ut,An=oe;var Dn=qt,Fn=function(){this.__data__=new Pn,this.size=0},En=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Ln=function(t){return this.__data__.get(t)},Cn=function(t){return this.__data__.has(t)},Rn=function(t,e){var r=this.__data__;if(r instanceof Tn){var n=r.__data__;if(!zn||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new An(n)}return r.set(t,e),this.size=r.size,this};function In(t){var e=this.__data__=new Dn(t);this.size=e.size}In.prototype.clear=Fn,In.prototype.delete=En,In.prototype.get=Ln,In.prototype.has=Cn,In.prototype.set=Rn;var Nn=In;var qn=oe,Un=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Yn=function(t){return this.__data__.has(t)};function Wn(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new qn;++e<r;)this.add(t[e])}Wn.prototype.add=Wn.prototype.push=Un,Wn.prototype.has=Yn;var Hn=Wn,Bn=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1},Vn=function(t,e){return t.has(e)};var Qn=function(t,e,r,n,i,o){var u=1&r,s=t.length,a=e.length;if(s!=a&&!(u&&a>s))return!1;var c=o.get(t),f=o.get(e);if(c&&f)return c==e&&f==t;var l=-1,h=!0,p=2&r?new Hn:void 0;for(o.set(t,e),o.set(e,t);++l<s;){var d=t[l],v=e[l];if(n)var y=u?n(v,d,l,e,t,o):n(d,v,l,t,e,o);if(void 0!==y){if(y)continue;h=!1;break}if(p){if(!Bn(e,(function(t,e){if(!Vn(p,e)&&(d===t||i(d,t,r,n,o)))return p.push(e)}))){h=!1;break}}else if(d!==v&&!i(d,v,r,n,o)){h=!1;break}}return o.delete(t),o.delete(e),h};var Zn=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r};var Jn=g.Uint8Array,Gn=xt,Kn=Qn,Xn=Zn,ti=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},ei=b?b.prototype:void 0,ri=ei?ei.valueOf:void 0;var ni=function(t,e,r,n,i,o,u){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new Jn(t),new Jn(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Gn(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=Xn;case"[object Set]":var a=1&n;if(s||(s=ti),t.size!=e.size&&!a)return!1;var c=u.get(t);if(c)return c==e;n|=2,u.set(t,e);var f=Kn(s(t),s(e),n,i,o,u);return u.delete(t),f;case"[object Symbol]":if(ri)return ri.call(t)==ri.call(e)}return!1};var ii=function(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t},oi=d;var ui=function(t,e,r){var n=e(t);return oi(t)?n:ii(n,r(t))};var si=Rr,ai=function(){return[]},ci=Object.prototype.propertyIsEnumerable,fi=Object.getOwnPropertySymbols,li=ui,hi=fi?function(t){return null==t?[]:(t=Object(t),si(fi(t),(function(e){return ci.call(t,e)})))}:ai,pi=wn;var di=function(t){return li(t,pi,hi)},vi=Object.prototype.hasOwnProperty;var yi=Nn,mi=Qn,gi=ni,bi=function(t,e,r,n,i,o){var u=1&r,s=di(t),a=s.length;if(a!=di(e).length&&!u)return!1;for(var c=a;c--;){var f=s[c];if(!(u?f in e:vi.call(e,f)))return!1}var l=o.get(t),h=o.get(e);if(l&&h)return l==e&&h==t;var p=!0;o.set(t,e),o.set(e,t);for(var d=u;++c<a;){var v=t[f=s[c]],y=e[f];if(n)var m=u?n(y,v,f,e,t,o):n(v,y,f,t,e,o);if(!(void 0===m?v===y||i(v,y,r,n,o):m)){p=!1;break}d||(d="constructor"==f)}if(p&&!d){var g=t.constructor,b=e.constructor;g==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof g&&g instanceof g&&"function"==typeof b&&b instanceof b||(p=!1)}return o.delete(t),o.delete(e),p},_i=ir,ji=d,wi=Jr,$i=ln,Si="[object Arguments]",ki="[object Array]",Oi="[object Object]",xi=Object.prototype.hasOwnProperty;var Mi=function(t,e,r,n,i,o){var u=ji(t),s=ji(e),a=u?ki:_i(t),c=s?ki:_i(e),f=(a=a==Si?Oi:a)==Oi,l=(c=c==Si?Oi:c)==Oi,h=a==c;if(h&&wi(t)){if(!wi(e))return!1;u=!0,f=!1}if(h&&!f)return o||(o=new yi),u||$i(t)?mi(t,e,r,n,i,o):gi(t,e,a,r,n,i,o);if(!(1&r)){var p=f&&xi.call(t,"__wrapped__"),d=l&&xi.call(e,"__wrapped__");if(p||d){var v=p?t.value():t,y=d?e.value():e;return o||(o=new yi),i(v,y,r,n,o)}}return!!h&&(o||(o=new yi),bi(t,e,r,n,i,o))},Pi=z;var Ti=function t(e,r,n,i,o){return e===r||(null==e||null==r||!Pi(e)&&!Pi(r)?e!=e&&r!=r:Mi(e,r,n,i,t,o))},zi=Nn,Ai=Ti;var Di=N;var Fi=function(t){return t==t&&!Di(t)},Ei=Fi,Li=wn;var Ci=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}},Ri=function(t,e,r,n){var i=r.length,o=i,u=!n;if(null==t)return!o;for(t=Object(t);i--;){var s=r[i];if(u&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){var a=(s=r[i])[0],c=t[a],f=s[1];if(u&&s[2]){if(void 0===c&&!(a in t))return!1}else{var l=new zi;if(n)var h=n(c,f,a,t,e,l);if(!(void 0===h?Ai(f,c,3,n,l):h))return!1}}return!0},Ii=function(t){for(var e=Li(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,Ei(i)]}return e},Ni=Ci;var qi=ke,Ui=Zr,Yi=d,Wi=Xr,Hi=or,Bi=xe;var Vi=function(t,e,r){for(var n=-1,i=(e=qi(e,t)).length,o=!1;++n<i;){var u=Bi(e[n]);if(!(o=null!=t&&r(t,u)))break;t=t[u]}return o||++n!=i?o:!!(i=null==t?0:t.length)&&Hi(i)&&Wi(u,i)&&(Yi(t)||Ui(t))},Qi=function(t,e){return null!=t&&e in Object(t)},Zi=Vi;var Ji=function(t,e){return null!=t&&Zi(t,e,Qi)},Gi=Ti,Ki=Ae,Xi=Ji,to=I,eo=Fi,ro=Ci,no=xe;var io=function(t,e){return to(t)&&eo(e)?ro(no(t),e):function(r){var n=Ki(r,t);return void 0===n&&n===e?Xi(r,t):Gi(e,n,3)}};var oo=function(t){return t},uo=Te;var so=function(t){return function(e){return uo(e,t)}},ao=pr,co=so,fo=I,lo=xe;var ho=function(t){return fo(t)?ao(lo(t)):co(t)},po=function(t){var e=Ii(t);return 1==e.length&&e[0][2]?Ni(e[0][0],e[0][1]):function(r){return r===t||Ri(r,t,e)}},vo=io,yo=oo,mo=d,go=ho;var bo=function(t){return"function"==typeof t?t:null==t?yo:"object"==typeof t?mo(t)?vo(t[0],t[1]):po(t):go(t)},_o=Rr,jo=Mn,wo=bo,$o=d;var So=function(t,e){return($o(t)?_o:jo)(t,wo(e))},ko=bo,Oo=ar,xo=wn;var Mo=function(t){return function(e,r,n){var i=Object(e);if(!Oo(e)){var o=ko(r);e=xo(e),r=function(t){return o(i[t],t,i)}}var u=t(e,r,n);return u>-1?i[o?e[u]:u]:void 0}};var Po=/\s/;var To=function(t){for(var e=t.length;e--&&Po.test(t.charAt(e)););return e},zo=/^\s+/;var Ao=function(t){return t?t.slice(0,To(t)+1).replace(zo,""):t},Do=N,Fo=F,Eo=/^[-+]0x[0-9a-f]+$/i,Lo=/^0b[01]+$/i,Co=/^0o[0-7]+$/i,Ro=parseInt;var Io=function(t){if("number"==typeof t)return t;if(Fo(t))return NaN;if(Do(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Do(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ao(t);var r=Lo.test(t);return r||Co.test(t)?Ro(t.slice(2),r?2:8):Eo.test(t)?NaN:+t},No=Io,qo=1/0;var Uo=function(t){return t?(t=No(t))===qo||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0},Yo=Uo;var Wo=function(t){var e=Yo(t),r=e%1;return e==e?r?e-r:e:0},Ho=function(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1},Bo=bo,Vo=Wo,Qo=Math.max;var Zo=Mo((function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:Vo(r);return i<0&&(i=Qo(n+i,0)),Ho(t,Bo(e),i)})),Jo=On,Go=ar;var Ko=he,Xo=bo,tu=function(t,e){var r=-1,n=Go(t)?Array(t.length):[];return Jo(t,(function(t,i,o){n[++r]=e(t,i,o)})),n},eu=d;var ru=function(t,e){return(eu(t)?Ko:tu)(t,Xo(e))};function nu(){let t,e,r=new Promise((function(){t=arguments[0],e=arguments[1]}));return r.resolve=t,r.reject=e,r}var iu=Wo,ou=Io,uu=_e,su=g.isFinite,au=Math.min;var cu=function(t){var e=Math[t];return function(t,r){if(t=ou(t),(r=null==r?0:au(iu(r),292))&&su(t)){var n=(uu(t)+"e").split("e"),i=e(n[0]+"e"+(+n[1]+r));return+((n=(uu(i)+"e").split("e"))[0]+"e"+(+n[1]-r))}return e(t)}}("round");function fu(t){return!(!function(t){return"[object String]"===Object.prototype.toString.call(t)}(t)||""===t)}function lu(t){let e=!1;return fu(t)?e=!isNaN(Number(t)):function(t){return"[object Number]"===Object.prototype.toString.call(t)}(t)&&(e=!0),e}function hu(t){if(!lu(t))return 0;return Uo(t)}function pu(t){if(!lu(t))return 0;t=hu(t);let e=cu(t);return"0"===String(e)?0:e}function du(t){if(!fu(t)&&!lu(t)&&!F(t))return"";let e="";try{e=String(t)}catch(t){}try{e=t.toString()}catch(t){}return e}var vu=Wo;var yu=function(t){return"number"==typeof t&&t==vu(t)};function mu(t){return!!lu(t)&&(t=hu(t),yu(t))}function gu(t){return"[object Object]"===Object.prototype.toString.call(t)}function bu(t){if(gu(t)){for(let e in t)return!0;return!1}return!1}function _u(t){let e=Object.prototype.toString.call(t);return"[object Function]"===e||"[object AsyncFunction]"===e}function ju(t){if(!mu(t))return!1;return pu(t)>=0}function wu(t,e){return fu(t)&&ju(e)?0===(e=pu(e))?"":t.substring(0,e):""}var $u=function(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=Array(i);++n<i;)o[n]=t[n+e];return o},Su=Wo;var ku=function(t,e,r){var n=null==t?0:t.length;return n?(e=r||void 0===e?1:Su(e),$u(t,e<0?0:e,n)):[]},Ou={};var xu=oo;var Mu=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t},Pu=On,Tu=function(t){return"function"==typeof t?t:xu},zu=d;var Au=function(t,e){return(zu(t)?Mu:Pu)(t,Tu(e))};!function(t){t.exports=Au}({get exports(){return Ou},set exports(t){Ou=t}});var Du=p(Ou);function Fu(t,e){let r=nu();if(n=t,"[object Array]"!==Object.prototype.toString.call(n)&&!gu(t))return r.reject("rs is not an array or object"),r;var n;let i=!1;if(gu(t)){i=!0;let e=[];Du(t,((t,r)=>{e.push({k:r,v:t})})),t=e}_u(e)||(e=function(t){return t});let o=-1,u=[];return t.reduce((function(t,r){return t.then((function(t){u.push(t),o+=1;let n=o,s=r;return i&&(n=r.k,s=r.v),_u(e)?e(s,n):s}))}),Promise.resolve()).then((function(t){u.push(t),u=ku(u),r.resolve(u)})).catch((function(t){r.reject(t)})),r}function Eu(t,e){if(!fu(t))return"";if(!ju(e))return"";if(0===(e=pu(e)))return"";let r=t.length-e;return r<0&&(r=0),t.substr(r,e)}function Lu(t,e){return fu(t)&&ju(e)?0===(e=pu(e))?t:wu(t,t.length-e):""}function Cu(t){if(!fu(t))return"";let e=function(t){if(!fu(t))return{path:"",isRoot:!1};for(;t.indexOf("\\\\")>=0;)t=t.replace("\\\\","\\");for(;t.indexOf("//")>=0;)t=t.replace("//","/");if(":"===Eu(t,1))return{path:`${t}\\`,isRoot:!0};if("\\"===Eu(t,1)){let e=Lu(t,1);return":"===Eu(e,1)?{path:t,isRoot:!0}:{path:e,isRoot:!1}}if("/"===Eu(t,1)){let e=Lu(t,1);return 0===Cr(e)?{path:t,isRoot:!0}:{path:e,isRoot:!1}}return{path:t,isRoot:!1}}(t);if(e.isRoot)return e.path;let r=e.path;try{r=r.split("\\").pop().split("/").pop()}catch(t){}return r}function Ru(r){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=1;return function r(o){let u=[],s=e.readdirSync(o);return Du(s,(function(s){let a=t.resolve(o,s),c=null;try{c=e.statSync(a)}catch(t){}c&&c.isDirectory()?(u.push({isFolder:!0,level:i,path:a,name:t.basename(a)}),i+=1,(i<=n||null===n)&&(u=u.concat(r(a))),i-=1):u.push({isFolder:!1,level:i,path:a,name:t.basename(a)})})),u}(r)}function Iu(t){return!!e.existsSync(t)&&(!e.lstatSync(t).isFile()&&!e.lstatSync(t).isSymbolicLink())}function Nu(t){return!!e.existsSync(t)&&(!e.lstatSync(t).isDirectory()&&!e.lstatSync(t).isSymbolicLink())}function qu(t){if(Iu(t))return{success:"input folder is already exists: "+t};if(e.existsSync(t))return{error:"input path already exists: "+t};try{e.mkdirSync(t,{recursive:!0})}catch(t){return{error:t}}return{success:"done: "+t}}var Uu={};!function(t,e){t.exports=function(){var t=1e3,e=6e4,r=36e5,n="millisecond",i="second",o="minute",u="hour",s="day",a="week",c="month",f="quarter",l="year",h="date",p="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},m=function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},g={s:m,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),n=Math.floor(r/60),i=r%60;return(e<=0?"+":"-")+m(n,2,"0")+":"+m(i,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var n=12*(r.year()-e.year())+(r.month()-e.month()),i=e.clone().add(n,c),o=r-i<0,u=e.clone().add(n+(o?-1:1),c);return+(-(n+(r-i)/(o?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:l,w:a,d:s,D:h,h:u,m:o,s:i,ms:n,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",_={};_[b]=y;var j=function(t){return t instanceof k},w=function t(e,r,n){var i;if(!e)return b;if("string"==typeof e){var o=e.toLowerCase();_[o]&&(i=o),r&&(_[o]=r,i=o);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else{var s=e.name;_[s]=e,i=s}return!n&&i&&(b=i),i||!n&&b},$=function(t,e){if(j(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new k(r)},S=g;S.l=w,S.i=j,S.w=function(t,e){return $(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var k=function(){function y(t){this.$L=w(t.locale,null,!0),this.parse(t)}var m=y.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(S.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var n=e.match(d);if(n){var i=n[2]-1||0,o=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)):new Date(n[1],i,n[3]||1,n[4]||0,n[5]||0,n[6]||0,o)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return S},m.isValid=function(){return!(this.$d.toString()===p)},m.isSame=function(t,e){var r=$(t);return this.startOf(e)<=r&&r<=this.endOf(e)},m.isAfter=function(t,e){return $(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<$(t)},m.$g=function(t,e,r){return S.u(t)?this[e]:this.set(r,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var r=this,n=!!S.u(e)||e,f=S.p(t),p=function(t,e){var i=S.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return n?i:i.endOf(s)},d=function(t,e){return S.w(r.toDate()[t].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},v=this.$W,y=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(f){case l:return n?p(1,0):p(31,11);case c:return n?p(1,y):p(0,y+1);case a:var b=this.$locale().weekStart||0,_=(v<b?v+7:v)-b;return p(n?m-_:m+(6-_),y);case s:case h:return d(g+"Hours",0);case u:return d(g+"Minutes",1);case o:return d(g+"Seconds",2);case i:return d(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var r,a=S.p(t),f="set"+(this.$u?"UTC":""),p=(r={},r[s]=f+"Date",r[h]=f+"Date",r[c]=f+"Month",r[l]=f+"FullYear",r[u]=f+"Hours",r[o]=f+"Minutes",r[i]=f+"Seconds",r[n]=f+"Milliseconds",r)[a],d=a===s?this.$D+(e-this.$W):e;if(a===c||a===l){var v=this.clone().set(h,1);v.$d[p](d),v.init(),this.$d=v.set(h,Math.min(this.$D,v.daysInMonth())).$d}else p&&this.$d[p](d);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[S.p(t)]()},m.add=function(n,f){var h,p=this;n=Number(n);var d=S.p(f),v=function(t){var e=$(p);return S.w(e.date(e.date()+Math.round(t*n)),p)};if(d===c)return this.set(c,this.$M+n);if(d===l)return this.set(l,this.$y+n);if(d===s)return v(1);if(d===a)return v(7);var y=(h={},h[o]=e,h[u]=r,h[i]=t,h)[d]||1,m=this.$d.getTime()+n*y;return S.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var n=t||"YYYY-MM-DDTHH:mm:ssZ",i=S.z(this),o=this.$H,u=this.$m,s=this.$M,a=r.weekdays,c=r.months,f=function(t,r,i,o){return t&&(t[r]||t(e,n))||i[r].slice(0,o)},l=function(t){return S.s(o%12||12,t,"0")},h=r.meridiem||function(t,e,r){var n=t<12?"AM":"PM";return r?n.toLowerCase():n},d={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:S.s(s+1,2,"0"),MMM:f(r.monthsShort,s,c,3),MMMM:f(c,s),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:f(r.weekdaysMin,this.$W,a,2),ddd:f(r.weekdaysShort,this.$W,a,3),dddd:a[this.$W],H:String(o),HH:S.s(o,2,"0"),h:l(1),hh:l(2),a:h(o,u,!0),A:h(o,u,!1),m:String(u),mm:S.s(u,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:i};return n.replace(v,(function(t,e){return e||d[t]||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(n,h,p){var d,v=S.p(h),y=$(n),m=(y.utcOffset()-this.utcOffset())*e,g=this-y,b=S.m(this,y);return b=(d={},d[l]=b/12,d[c]=b,d[f]=b/3,d[a]=(g-m)/6048e5,d[s]=(g-m)/864e5,d[u]=g/r,d[o]=g/e,d[i]=g/t,d)[v]||g,p?b:S.a(b)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return _[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),n=w(t,e,!0);return n&&(r.$L=n),r},m.clone=function(){return S.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},y}(),O=k.prototype;return $.prototype=O,[["$ms",n],["$s",i],["$m",o],["$H",u],["$W",s],["$M",c],["$y",l],["$D",h]].forEach((function(t){O[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),$.extend=function(t,e){return t.$i||(t(e,k,$),t.$i=!0),$},$.locale=w,$.isDayjs=j,$.unix=function(t){return $(1e3*t)},$.en=_[b],$.Ls=_,$.p={},$}()}({get exports(){return Uu},set exports(t){Uu=t}});var Yu=Uu;const Wu=r.createConnection,Hu=n.EventEmitter,Bu=i.inherits,Vu=o,Qu=e,Zu=u,Ju=s,Gu=a,Ku=c,Xu=f.nfc,ts=l("jsftp:general"),es=l("jsftp:command"),rs=l("jsftp:response"),ns=function(){},is={marks:[125,150],ignore:226},os=/([-\d]+,[-\d]+,[-\d]+,[-\d]+),([-\d]+),([-\d]+)/,us=/\r\n|\n/;function ss(t){let e=ns,r=t+" ";for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];"function"==typeof i[i.length-1]&&(e=i.pop()),r+=i.join(" "),this.execute(r.trim(),e)}function as(t){this.host=t.host||"localhost",this.port=t.port||21,this.user=t.user||"anonymous",this.pass=t.pass||"@anonymous",this.createSocket=t.createSocket,this.useList=t.useList||!1,this.commandQueue=[],Hu.call(this),this.on("data",rs),this.on("error",rs),this._createSocket(this.port,this.host)}Bu(as,Hu),as.prototype.raw=function(){ss.apply(this,arguments)},as.prototype.reemit=function(t){return e=>{this.emit(t,e),ts(`event:${t}`,e||{})}},as.prototype._createSocket=function(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ns;this.socket&&this.socket.destroy&&this.socket.destroy(),this.resParser&&this.resParser.end(),this.resParser=new Ju,this.authenticated=!1,this.socket=this.createSocket?this.createSocket({port:t,host:e},r):Wu(t,e,r),this.socket.on("connect",this.reemit("connect")),this.socket.on("timeout",this.reemit("timeout")),this.pipeline=Zu(this.socket,this.resParser),this.pipeline.on("data",(t=>{this.emit("data",t),rs(t.text),this.parseResponse(t)})),this.pipeline.on("error",this.reemit("error"))},as.prototype.parseResponse=function(t){if(0===this.commandQueue.length)return;if([220].indexOf(t.code)>-1)return;const e=this.commandQueue[0].callback;if(t.isMark){if(!e.expectsMark||-1===e.expectsMark.marks.indexOf(t.code))return;e.expectsMark.ignore&&(this.ignoreCmdCode=e.expectsMark.ignore)}this.ignoreCmdCode!==t.code?this.parse(t,this.commandQueue.shift()):this.ignoreCmdCode=null},as.prototype.send=function(t){t&&(es(t),this.pipeline.write(t+"\r\n"),es(t))},as.prototype.nextCmd=function(){const t=this.commandQueue[0];!this.inProgress&&t&&(this.send(t.action),this.inProgress=!0)},as.prototype.execute=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ns;if(this.socket&&this.socket.writable)return this.runCommand({action:t,callback:e});this.authenticated=!1,this._createSocket(this.port,this.host,(()=>{this.runCommand({action:t,callback:e})}))},as.prototype.runCommand=function(t){if(this.authenticated||/^(feat|syst|user|pass)/.test(t.action))return this.commandQueue.push(t),void this.nextCmd();this.getFeatures((()=>{this.auth(this.user,this.pass,(()=>{this.commandQueue.push(t),this.nextCmd()}))}))},as.prototype.parse=function(t,e){let r=null;t.isError&&(r=new Error(t.text||"Unknown FTP error."),r.code=t.code),this.inProgress=!1,e.callback(r,t),this.nextCmd()},as.prototype.getPasvPort=function(t){const e=os.exec(t);if(!e)return null;let r=e[1].replace(/,/g,".");return"127.0.0.1"===r&&(r=this.host),{host:r,port:256*(255&parseInt(e[2],10))+(255&parseInt(e[3],10))}},as.prototype.hasFeat=function(t){return!!t&&this.features.indexOf(t.toLowerCase())>-1},as.prototype._parseFeats=function(t){return t.split(us).slice(1,-1).map((t=>t.trim().toLowerCase())).filter((t=>!!t))},as.prototype.getFeatures=function(t){if(this.features)return t(null,this.features);this.raw("feat",((e,r)=>{this.features=e?[]:this._parseFeats(r.text),this.raw("syst",((e,r)=>{e||215!==r.code||(this.system=r.text.toLowerCase()),t(null,this.features)}))}))},as.prototype.auth=function(t,e,r){if(!0===this.authenticating)return r(new Error("This client is already authenticating"));"string"!=typeof t&&(t=this.user),"string"!=typeof e&&(e=this.pass),this.authenticating=!0,this.raw("user",t,((n,i)=>{if(n||-1===[230,331,332].indexOf(i.code))return this.authenticating=!1,void r(n);this.raw("pass",e,((n,i)=>{this.authenticating=!1,n?r(n):[230,202].indexOf(i.code)>-1?(this.authenticated=!0,this.user=t,this.pass=e,this.raw("type","I",(()=>{r(void 0,i)}))):332===i.code&&this.raw("acct","")}))}))},as.prototype.setType=function(t,e){if(t=t.toUpperCase(),this.type===t)return e();this.raw("type",t,((r,n)=>{r||(this.type=t),e(r,n)}))},as.prototype.list=function(t,e){1===arguments.length&&(e=arguments[0],t="");let r="";e=Ku(e),this.getPasvSocket(((n,i)=>{if(n)return e(n);function o(t,r){if(t)return e(t);is.marks.some((t=>t===r.code))||e(new Error(`Expected marks ${is.toString()} instead of: ${r.text}`))}i.setEncoding("utf8"),i.on("data",(t=>{r+=t})),this.pasvTimeout(i,e),i.once("close",(n=>n?e(n):r?void e(null,r):e({code:451,text:`Could not retrieve a file listing for ${t}.`,isMark:!1,isError:!0}))),i.once("error",e),o.expectsMark=is,this.execute(`list ${t||""}`,o)}))},as.prototype.emitProgress=function(t){this.emit("progress",{filename:t.filename,action:t.action,total:t.totalSize||0,transferred:t.socket["get"===t.action?"bytesRead":"bytesWritten"]})},as.prototype.get=function(t,e){let r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ns;const i=typeof e;"function"===i?r=e:"string"===i&&(n=Ku(n),r=(r,i)=>{if(r)return n(r);const o=Qu.createWriteStream(e);o.on("error",n),i.on("readable",(()=>{this.emitProgress({filename:t,action:"get",socket:i})})),i.on("error",n),i.on("end",n),i.on("close",n),i.pipe(o)}),this.getGetSocket(t,Ku(r))},as.prototype.getGetSocket=function(t,e){e=Ku(e),this.getPasvSocket(((r,n)=>{if(r)return i(r);function i(t,r){return t?(n&&n.destroy(),e(t)):n?125===r.code||150===r.code?e(null,n):(n.destroy(),e(new Error("Unexpected command "+r.text))):e(new Error("Error when retrieving PASV socket"))}n.on("error",(t=>{"ECONNREFUSED"===t.code&&(t.msg="Probably trying a PASV operation while one is in progress"),i(t)})),this.pasvTimeout(n,i),n.pause(),i.expectsMark=is,this.execute("retr "+t,i)}))},as.prototype.put=function(t,e,r){const n=(t,e,n)=>{t.on("readable",(()=>{this.emitProgress({filename:e,action:"put",socket:t,totalSize:n})})),this.getPutSocket(t,e,r)};t instanceof Buffer?this.getPutSocket(t,e,((e,n)=>{if(e)return r(new Error(e));let i,o=0,u=1048576,s=!1;i=t.slice(o,o+u),o+=u,r(null,i),n.write(t.slice(0,u)),i.length===t.length&&(n.end(),r(null,[])),n.on("drain",(()=>{t.length>o+u?(i=t.slice(o,o+u),o+=u):(i=t.slice(o),s=!0),r(null,i),n.write(i),s&&(n.end(),r(null,[]))}))})):"string"==typeof t?Qu.stat(t,((i,o)=>{if(i&&"ENOENT"===i.code)return r(new Error("Local file doesn't exist."));if(o.isDirectory())return r(new Error("Local path cannot be a directory"));const u=i?0:o.size;n(Qu.createReadStream(t),e,u)})):t instanceof Vu.Readable?n(t,e,0):r(new Error("Expected `from` parameter to be a Buffer, Stream, or a String"))},as.prototype.getPutSocket=function(t,e,r){r=Ku(r||ns),this.getPasvSocket(((n,i)=>{if(n)return i&&i.destroy(),r(n);i.on("close",r),i.on("error",r);const o=Ku(((e,n)=>e?(i&&i.destroy(),r(e)):125!==n.code&&150!==n.code?(i&&i.destroy(),r(new Error("Unexpected command "+n.text))):(this.pasvTimeout(i,r),void(t instanceof Buffer?r(null,i):t instanceof Vu.Readable&&(r(null,i),t.pipe(i))))));o.expectsMark=is,this.execute(`stor ${e}`,o)}))},as.prototype.pasvTimeout=function(t,e){t.once("timeout",(()=>{ts("PASV socket timeout"),this.emit("timeout"),t.end(),e(new Error("Passive socket timeout"))}))},as.prototype.getPasvSocket=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ns;t=Ku(t),this.execute("pasv",((e,r)=>{if(e)return t(e);const n=this.getPasvPort(r.text);if(!n)return t(new Error("Bad passive host/port combination"));const i=this._pasvSocket=this.createSocket?this.createSocket(n):Wu(n);i.setTimeout(this.timeout||6e5),i.once("close",(()=>{this._pasvSocket=void 0})),t(null,i)}))},as.prototype.ls=function(t,e){function r(t,r){if(t)return e(t);Gu.parseFtpEntries(r.text||r,((t,r)=>{if(t)return e(t);r.forEach((t=>{t.name=Xu(t.name)})),e(null,r)}))}this.useList?this.list(t,r):this.raw("stat",t,((e,n)=>{const i=e&&(502===e.code||500===e.code),o=this.system&&this.system.indexOf("hummingbird")>-1;i||o?(this.useList=!0,this.list(t,r)):r(e,n)}))},as.prototype.rename=function(t,e,r){this.raw("rnfr",t,(t=>{if(t)return r(t);this.raw("rnto",e,r)}))},as.prototype.keepAlive=function(t){this._keepAliveInterval&&clearInterval(this._keepAliveInterval),this._keepAliveInterval=setInterval(this.raw.bind(this,"noop"),t||3e4)},as.prototype.destroy=function(){this._keepAliveInterval&&clearInterval(this._keepAliveInterval),this.socket&&this.socket.writable&&this.socket.end(),this._pasvSocket&&this._pasvSocket.writable&&this._pasvSocket.end(),this.resParser.end(),this.socket=void 0,this._pasvSocket=void 0,this.features=null,this.authenticated=!1};var cs=as;async function fs(){return null}async function ls(){return null}async function hs(){return null}async function ps(t){return null}async function ds(t){return null}async function vs(t){return null}async function ys(t,e){return null}async function ms(t,e,r){return null}async function gs(t,e,r){return null}async function bs(t,e,r){return null}return function(){let r={doc_conn:fs,doc_ls:ls,doc_quit:hs,doc_stateFile:ps,doc_isFile:ds,doc_isFolder:vs,doc_download:ys,doc_upload:ms,doc_syncToLocal:gs,doc_syncToRemote:bs};return new function(){let n=null,i=6e4;async function o(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:".",e=nu();if(null===n)return e.reject("FTP has not been initialized. please use 'conn' to construct FTP"),e;let r=setTimeout((()=>{e.reject(`ftpLs timeout[${i}]`)}),i);return n.ls(t,((t,n)=>{clearTimeout(r),t?e.reject(t):(n=ru(n,(t=>{let e=Yu(t.time);return t.ctime=e.format("YYYY-MM-DDTHH:mm:ssZ"),t.isFolder=s(t),t})),e.resolve(n))})),e}async function u(t){let e=null;return await o(t).then((t=>{e=t})).catch((()=>{e=null})),e=Ae(e,0,null),e}function s(t){if(!bu(t))return!1;return 1===Ae(t,"type",-1)}function a(t){if(!bu(t))return!1;return 0===Ae(t,"type",-1)}async function c(r,o){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,c=nu();if(null===n)return c.reject("FTP has not been initialized. please use 'conn' to construct FTP"),c;if(!fu(r))return c.reject(`fpRemote[${r}] is not a effective string`),c;if(!fu(o))return c.reject(`fpLocal[${o}] is not a effective string`),c;let f=t.basename(t.dirname(o));Iu(f)||qu(f);let l=await u(r);if(!await a(l))return c.reject(`fpRemote[${r}] is not a file`),c;if(!bu(l))return c.reject(`fpRemote[${r}] does not have information`),c;let h=Ae(l,"size");if(!lu(h))return c.reject(`can not get the size of file[${r}]`),c;h=pu(h);let p=setTimeout((()=>{c.reject(`ftpDownload timeout[${i}]`)}),i);return n.get(r,((t,n)=>{t&&(clearTimeout(p),c.reject(t)),Nu(o)&&e.unlinkSync(o);let i=e.createWriteStream(o),u=0;n.on("data",(t=>{if(_u(s)){let e=Cr(t);u+=e,s({progress:u/h*100,name:Cu(o),fpRemote:r,fpLocal:o})}i.write(t)})),n.on("close",(t=>{clearTimeout(p),t?c.reject(t):c.resolve("ok")})),n.resume()})),c}async function f(t,r,o){let u=nu();if(null===n)return u.reject("FTP has not been initialized. please use 'conn' to construct FTP"),u;if(!fu(r))return u.reject(`fpRemote[${r}] is not a effective string`),u;if(!fu(t))return u.reject(`fpLocal[${t}] is not a effective string`),u;if(!Nu(t))return u.reject(`fpLocal[${t}] is not a file`),u;let s=e.statSync(t),a=Ae(s,"size");if(!lu(a))return u.reject(`can not get the size of file[${t}]`),u;a=pu(a);let c=e.readFileSync(t),f=setTimeout((()=>{u.reject(`ftpUpload timeout[${i}]`)}),i),l=0;return n.put(c,r,((e,n)=>{if(e)return clearTimeout(f),void u.reject(e);if(0===Cr(n))return clearTimeout(f),void u.resolve("ok");if(_u(o)){let e=Cr(n);l+=e,o({progress:l/a*100,name:Cu(t),fpRemote:r,fpLocal:t})}})),u}return{conn:async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=nu(),o=Ae(t,"hostname");if(!fu(o))return e.reject(`hostname[${o}] is not a effective string`),e;let u=Ae(t,"port");if(!(mu(s=u)&&pu(s)>0))return e.reject(`port[${u}] is not a positive integer`),e;var s;u=pu(u);let a=Ae(t,"username");if(!fu(a))return e.reject(`username[${a}] is not a effective string`),e;let c=Ae(t,"password");if(!fu(c))return e.reject(`password[${c}] is not a effective string`),e;let f=Ae(t,"timeLimit");lu(f)&&(f=pu(f),i=f);try{n=new cs({host:o,port:u,user:a,pass:c}),n.__doc__=r,e.resolve("ok")}catch(t){e.reject(t)}return e},ls:o,stateFile:u,isFile:async function(t){return await a(t)},isFolder:async function(t){return s(await u(t))},download:c,syncToLocal:async function(r,i,u){if(null===n)return Promise.reject("FTP has not been initialized. please use 'conn' to construct FTP");let s=await o(r);s=So(s,(t=>!t.isFolder)),Iu(i)||qu(i);let a=Ru(i);a=So(a,(t=>!t.isFolder)),a=ru(a,(t=>{let r=e.statSync(t.path);return t.size=du(Ae(r,"size","")),t}));let f=0,l=[];return await Fu(s,(async e=>{let n=Zo(a,{name:e.name}),o=r;"/"!==!wu(o,1)&&(o+="/"),o+=Ae(e,"name","");let s=t.resolve(i,Ae(e,"name","")),h=t=>{_u(u)&&u(t)};bu(n)?e.size!==n.size&&(await c(o,s,h),f++,l.push({name:e.name,reason:`size[${n.size}] of local file != size[${e.size}] of remote file`})):(await c(o,s,h),f++,l.push({name:e.name,reason:"no local file"}))})),{num:f,files:l}},syncToRemote:async function(r,i,u){if(null===n)return Promise.reject("FTP has not been initialized. please use 'conn' to construct FTP");let s=await o(i);if(!Iu(r))return Promise.reject(`fdLocal[${r}] is not a folder`);let a=Ru(r);a=So(a,(t=>!t.isFolder)),a=ru(a,(t=>{let r=e.statSync(t.path);return t.size=du(Ae(r,"size","")),t}));let c=0,l=[];return await Fu(a,(async e=>{let n=Zo(s,{name:e.name}),o=i;"/"!==!wu(o,1)&&(o+="/"),o+=Ae(e,"name","");let a=t.resolve(r,Ae(e,"name","")),h=t=>{_u(u)&&u(t)};bu(n)?e.size!==n.size&&(await f(a,o,h),c++,l.push({name:e.name,reason:`size[${n.size}] of remote file != size[${e.size}] of local file`})):(await f(a,o,h),c++,l.push({name:e.name,reason:"no Remote file"}))})),{num:c,files:l}},upload:f,quit:async function(){let t=nu();if(null===n)return t.reject("FTP has not been initialized. please use 'conn' to construct FTP"),t;let e=setTimeout((()=>{n.destroy(),n=null,t.reject(`ftpQuit timeout[${i}]`)}),i);return n.raw("quit",((r,i)=>{clearTimeout(e),n.destroy(),n=null,r?t.reject(r):t.resolve(i)})),t}}}}}));
|
|
7
7
|
//# sourceMappingURL=w-ftp.umd.js.map
|